diff --git a/README.md b/README.md index 786ccd9d..e32e0366 100644 --- a/README.md +++ b/README.md @@ -76,9 +76,10 @@ The customizer has already included this. ### Khronos APIs -| Library | Description | -|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| -| [OpenGL](https://www.khronos.org/opengl/) | The most widely adopted 2D and 3D graphics API in the industry, bringing thousands of applications to a wide variety of computer platforms. | +| Library | Description | +|-------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [OpenGL](https://www.khronos.org/opengl/) | The most widely adopted 2D and 3D graphics API in the industry, bringing thousands of applications to a wide variety of computer platforms. | +| [Vulkan](https://www.khronos.org/vulkan/) | A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms. | ### Display and Input @@ -89,9 +90,10 @@ The customizer has already included this. ### Audio -| Library | Description | -|-----------------------------------|------------------------------------------------------------------------------------------------------------------------| -| [OpenAL](https://www.openal.org/) | A cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applications. | +| Library | Description | +|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------| +| [OpenAL](https://www.openal.org/) | A cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applications. | +| [OpenAL Soft](https://openal-soft.org/) | An LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. | ### [stb](https://github.com/nothings/stb) - single-file public domain libraries for C/C++ diff --git a/buildSrc/src/main/kotlin/natives.kt b/buildSrc/src/main/kotlin/natives.kt index 2330d886..39a202e9 100644 --- a/buildSrc/src/main/kotlin/natives.kt +++ b/buildSrc/src/main/kotlin/natives.kt @@ -89,9 +89,11 @@ enum class Artifact( "Single-file public domain libraries for fonts, images, ogg vorbis files and more.", ":stb" ), -// VULKAN("overrungl-vulkan", "OverrunGL - Vulkan bindings", -// "A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.", -// ":vulkan", "Vulkan", null), + VULKAN( + "OverrunGL - Vulkan bindings", + "A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.", + ":vulkan" + ), } fun nativeFileName(nativeBinding: NativeBinding, platform: NativePlatform): String { diff --git a/doc/customizer/doc_on_customizer.md b/doc/customizer/doc_on_customizer.md index c525f3d4..e1b982b5 100644 --- a/doc/customizer/doc_on_customizer.md +++ b/doc/customizer/doc_on_customizer.md @@ -1,12 +1,14 @@ # The Modules Customizer +This documentation is for customizer in version 0.6.0. + ## Introduction The modules customizer is provided in order to comfort the start of users' development. ## Selecting Version -Only the latest snapshot version is provided. +The latest pre-release and snapshot version are provided. ## Selecting Modules diff --git a/doc/notes/0.x/0.1.0.md b/doc/notes/0.x/0.1.0.md index 4d663ccf..daea16ad 100644 --- a/doc/notes/0.x/0.1.0.md +++ b/doc/notes/0.x/0.1.0.md @@ -10,3 +10,4 @@ This version includes the following features: - Native memory access for JOML - Native File Dialog Extended - OpenAL and extensions +- Vulkan and extensions diff --git a/generators/glfw/src/main/kotlin/overrungl/glfw/GLFWGenerator.kt b/generators/glfw/src/main/kotlin/overrungl/glfw/GLFWGenerator.kt index c3c02e38..8147003d 100644 --- a/generators/glfw/src/main/kotlin/overrungl/glfw/GLFWGenerator.kt +++ b/generators/glfw/src/main/kotlin/overrungl/glfw/GLFWGenerator.kt @@ -19,8 +19,8 @@ package overrungl.glfw import com.palantir.javapoet.TypeName import overrungl.gen.* -val glfwPackage = "overrungl.glfw" -val glfwLookup = "GLFWInternal.lookup()" +const val glfwPackage = "overrungl.glfw" +const val glfwLookup = "GLFWInternal.lookup()" val glfw_boolean = CustomTypeSpec( carrier = TypeName.INT, @@ -186,8 +186,8 @@ fun main() { }.pointerType c "const GLFWimage*" val GLFWgamepadstate_ptr = Struct(glfwPackage, "GLFWGamepadState", cType = "GLFWgamepadstate") { - fixedSize(uchar, "buttons", 15) - fixedSize(float, "axes", 6) + fixedSize(uchar, "buttons", "15") + fixedSize(float, "axes", "6") }.pointerType c "GLFWgamepadstate*" val const_GLFWallocator_ptr = Struct(glfwPackage, "GLFWAllocator", cType = "GLFWallocator") { @@ -1136,7 +1136,7 @@ fun main() { "glfwGetX11Display"(Display_ptr, entrypoint = "glfwGetX11Display", optional = true) "glfwGetX11Adapter"(RRCrtc, GLFWmonitor_ptr("monitor"), entrypoint = "glfwGetX11Adapter", optional = true) "glfwGetX11Monitor"(RROutput, GLFWmonitor_ptr("monitor"), entrypoint = "glfwGetX11Monitor", optional = true) - "glfwGetX11Window"(RROutput, GLFWwindow_ptr("window"), entrypoint = "glfwGetX11Window", optional = true) + "glfwGetX11Window"(Window, GLFWwindow_ptr("window"), entrypoint = "glfwGetX11Window", optional = true) +"glfwSetX11SelectionString"( void, const_char_ptr("string"), diff --git a/generators/opengl/src/main/kotlin/overrungl/opengl/OpenGLGenerator.kt b/generators/opengl/src/main/kotlin/overrungl/opengl/OpenGLGenerator.kt index d79246f3..3628fe05 100644 --- a/generators/opengl/src/main/kotlin/overrungl/opengl/OpenGLGenerator.kt +++ b/generators/opengl/src/main/kotlin/overrungl/opengl/OpenGLGenerator.kt @@ -29,7 +29,7 @@ import kotlin.io.path.createDirectories private val recordingErrorType = mutableSetOf() -val openglPackage = "overrungl.opengl" +const val openglPackage = "overrungl.opengl" fun extPackage(vendor: String): String { val lowercase = vendor.lowercase() if (lowercase == "3dfx") return "$openglPackage.threedfx" diff --git a/generators/src/main/kotlin/overrungl/gen/Struct.kt b/generators/src/main/kotlin/overrungl/gen/Struct.kt index 54e057e9..9d491663 100644 --- a/generators/src/main/kotlin/overrungl/gen/Struct.kt +++ b/generators/src/main/kotlin/overrungl/gen/Struct.kt @@ -18,6 +18,7 @@ package overrungl.gen import com.palantir.javapoet.ArrayTypeName import com.palantir.javapoet.ClassName +import java.nio.file.Files import kotlin.io.path.Path class Struct( @@ -25,6 +26,7 @@ class Struct( private val name: String, private val cType: String? = null, private val opaque: Boolean = false, + private val union: Boolean = false, action: Struct.() -> Unit ) { private val members = mutableListOf() @@ -51,6 +53,7 @@ class Struct( } private var doLast: (StringBuilder) -> Unit = {} val byValue: ByValueWrapper by lazy { ByValueWrapper(this) } + val imports = mutableListOf() @JvmInline value class ByValueWrapper(val struct: Struct) @@ -72,7 +75,7 @@ class Struct( members.add(ByValueStructStructMember(this.struct, name)) } - fun fixedSize(type: CustomTypeSpec, name: String, size: Long) { + fun fixedSize(type: CustomTypeSpec, name: String, size: String) { members.add(FixedSizeStructMember(type, size, name)) } @@ -89,9 +92,12 @@ class Struct( import overrungl.annotation.*; import overrungl.struct.*; import overrungl.util.*; - """.trimIndent() ) + imports.forEach { + sb.appendLine("import $it;") + } + sb.appendLine() // javadoc sb.appendLine("/// ## Members") @@ -102,7 +108,7 @@ class Struct( when (it) { is ValueStructMember -> "/// [VarHandle][#VH_${it.name}] - [Getter][#${it.name}()] - [Setter][#${it.name}(${it.type.carrier})]" is ByValueStructStructMember -> "/// [Byte offset][#OFFSET_${it.name}] - [Memory layout][#ML_${it.name}] - [Getter][#${it.name}()] - [Setter][#${it.name}(${it.type.carrier})]" - is FixedSizeStructMember -> "/// [Byte offset handle][#MH_${it.name}] - [Memory layout][#ML_${it.name}] - Getter - Setter" + is FixedSizeStructMember -> "/// [Byte offset handle][#MH_${it.name}] - [Memory layout][#ML_${it.name}] - [Getter][#${it.name}(long)] - [Setter][#${it.name}(long, ${it.type.carrier})]" } ) } @@ -112,7 +118,7 @@ class Struct( /// ## Layout /// [Java definition][#LAYOUT] /// ```c - /// typedef struct ${if (cType != null) "$cType " else ""}{ + /// typedef ${if (union) "union" else "struct"} ${if (cType != null) "$cType " else ""}{ """.trimIndent() ) members.forEach { @@ -127,9 +133,9 @@ class Struct( sb.appendLine( """ - public final class $name extends Struct { - /// The struct layout of `$cType`. - public static final StructLayout LAYOUT = LayoutBuilder.struct( + public final class $name extends ${if (union) "Union" else "Struct"} { + /// The ${if (union) "union" else "struct"} layout of `$cType`. + public static final ${if (union) "Union" else "Struct"}Layout LAYOUT = ${if (union) "MemoryLayout.unionLayout" else "LayoutBuilder.struct"}( """.trimIndent() ) sb.appendLine(members.joinToString(",\n") { @@ -182,6 +188,21 @@ class Struct( | /// @return the created instance or `null` if the segment is `NULL` | public static $name of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new $name(segment); } | + | /// Creates `$name` with the given segment. + | /// + | /// Reinterprets the segment if zero-length. + | /// @param segment the memory segment + | /// @return the created instance or `null` if the segment is `NULL` + | public static $name ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new $name(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + | + | /// Creates `$name` with the given segment. + | /// + | /// Reinterprets the segment if zero-length. + | /// @param segment the memory segment + | /// @param count the count of the buffer + | /// @return the created instance or `null` if the segment is `NULL` + | public static $name ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new $name(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + | """.trimMargin() ) @@ -391,7 +412,9 @@ class Struct( doLast.invoke(sb) sb.appendLine("}") - writeString(Path(packageName.replace('.', '/'), "$name.java"), sb.toString()) + val base = Path(packageName.replace('.', '/')) + Files.createDirectories(base) + writeString(base.resolve("$name.java"), sb.toString()) } } @@ -414,7 +437,7 @@ data class ByValueStructStructMember( data class FixedSizeStructMember( val componentType: CustomTypeSpec, - val size: Long, + val size: String, override val name: String ) : StructMember { override val type: CustomTypeSpec @@ -422,7 +445,7 @@ data class FixedSizeStructMember( carrier = MemorySegment_, javaType = ArrayTypeName.of(componentType.javaType), processor = IdentityValueProcessor, - layout = "MemoryLayout.sequenceLayout(${size}L, ${componentType.layout})", + layout = "MemoryLayout.sequenceLayout(${size}, ${componentType.layout})", cType = "${componentType.cType}[$size]", allocatorRequirement = AllocatorRequirement.STACK ) diff --git a/generators/src/main/kotlin/overrungl/gen/Upcall.kt b/generators/src/main/kotlin/overrungl/gen/Upcall.kt index 28cf6492..485b984f 100644 --- a/generators/src/main/kotlin/overrungl/gen/Upcall.kt +++ b/generators/src/main/kotlin/overrungl/gen/Upcall.kt @@ -18,6 +18,7 @@ package overrungl.gen import com.palantir.javapoet.ClassName import com.palantir.javapoet.TypeName +import java.nio.file.Files import kotlin.io.path.Path fun generateUpcallType(packageName: String, name: String): CustomTypeSpec { @@ -74,7 +75,6 @@ class Upcall( .reduceOrNull(AllocatorRequirement::stricter) ?: AllocatorRequirement.NO - val path = Path("${packageName.replace('.', '/')}/$name.java") val sb = StringBuilder() sb.appendLine(commentedFileHeader) @@ -301,6 +301,9 @@ class Upcall( sb.appendLine("}") + val base = Path(packageName.replace('.', '/')) + Files.createDirectories(base) + val path = base.resolve("$name.java") writeString(path, sb.toString()) } } diff --git a/generators/stb/src/main/kotlin/overrungl/stb/STBRectPack.kt b/generators/stb/src/main/kotlin/overrungl/stb/STBRectPack.kt index 76e18e2f..92967041 100644 --- a/generators/stb/src/main/kotlin/overrungl/stb/STBRectPack.kt +++ b/generators/stb/src/main/kotlin/overrungl/stb/STBRectPack.kt @@ -44,7 +44,7 @@ fun STBRectPack() { int("num_nodes") stbrp_node_ptr("active_head") stbrp_node_ptr("free_head") - fixedSize(stbrp_node.byValueType, "extra", 2) + fixedSize(stbrp_node.byValueType, "extra", "2") }.pointerType c "stbrp_context *" StaticDowncall(stbPackage, "STBRectPack", symbolLookup = stbLookup) { diff --git a/generators/vulkan/build.gradle.kts b/generators/vulkan/build.gradle.kts index b000fa96..3189aed1 100644 --- a/generators/vulkan/build.gradle.kts +++ b/generators/vulkan/build.gradle.kts @@ -22,7 +22,4 @@ dependencies { implementation(project(":generators")) } -/*tasks.register("generate") { - mainClass.set("overrungl.vulkan.VulkanGeneratorKt") - workingDir = project(":vulkan").projectDir.resolve("src/main/java/overrungl/vulkan") -}*/ +registerGenerateTask("overrungl.vulkan.VulkanGeneratorKt", ":vulkan") diff --git a/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkDowncall.kt b/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkDowncall.kt new file mode 100644 index 00000000..3e62a195 --- /dev/null +++ b/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkDowncall.kt @@ -0,0 +1,262 @@ +/* + * MIT License + * + * Copyright (c) 2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +package overrungl.vulkan + +import overrungl.gen.commentedFileHeader +import overrungl.gen.writeString +import kotlin.io.path.Path + +class VkDowncall( + private val packageName: String, + private val className: String, + write: Boolean = true, + action: VkDowncall.() -> Unit +) { + val imports = mutableSetOf() + val extends = mutableListOf() + val fields = mutableListOf() + val aliasFields = mutableListOf() + val handleFields = mutableListOf() + val pfnFields = mutableListOf() + val addedField = mutableSetOf() + val methods = mutableListOf() + var constructor: String? = null + var customCode: String? = null + + init { + action(this) + if (write) { + write() + } + } + + fun addReqTypes(list: List) { + list.forEach { reqType -> + vkEnums[reqType]?.also { enumType -> + val type = enumType.javaType() + enumType.enums.forEach { enum -> + val name = enum.name + if (enum.alias != null) { + aliasFields.add(VkDowncallField(type, name, enum.alias)) + } else { + if (!addedField.contains(name)) { + fields.add( + VkDowncallField( + type, + name, + enum.value + ?: if (enum.bitpos != null) "0x${"%08x".format(1L shl enum.bitpos.toInt())}${if (type == "long") "L" else ""}" + else error("both enum.value and enum.bitpos are null") + ) + ) + addedField.add(name) + } + } + vkEnumClass[name] = "$packageName.$className" + } + } + } + } + + fun addReqEnums(list: List) { + list.forEach { reqEnum -> + if (reqEnum.api != null && reqEnum.api == "vulkansc") return@forEach + val name = reqEnum.name + if (reqEnum.alias != null) { + val alias = reqEnum.alias + val enumType = vkEnums[reqEnum.extends] + val enumConstant = enumConstants[alias] + aliasFields.add( + VkDowncallField( + enumType?.javaType() ?: (enumConstant?.type ?: error(name)), + name, + alias + ) + ) + if (enumType == null) { + enumConstants[name] = VkEnumConstant(enumConstant!!.type, name, alias) + } + } else { + if (!addedField.contains(name)) { + if (reqEnum.extends != null) { + val enumType = vkEnums[reqEnum.extends]!! + val type = enumType.javaType() + val value = if (reqEnum.bitpos != null) { + "0x${"%08x".format(1L shl reqEnum.bitpos.toInt())}${if (type == "long") "L" else ""}" + } else if (reqEnum.offset != null) { + buildString { + if (reqEnum.dir != null) { + append(reqEnum.dir) + } + append(extBase + (reqEnum.extnumber!!.toInt() - 1) * extBlockSize + reqEnum.offset.toInt()) + } + } else reqEnum.value ?: error(reqEnum.name) + fields.add(VkDowncallField(type, name, value)) + } else if (reqEnum.value != null) { + val value = reqEnum.value + val type = if (value.contains('"')) "String" else "int" + fields.add(VkDowncallField(type, name, value)) + enumConstants[name] = VkEnumConstant(type, name, value) + } else { + val enumConstant = enumConstants[name] ?: error(name) + fields.add( + VkDowncallField( + enumConstant.type, + name, + enumConstant.value + ) + ) + } + addedField.add(name) + } + } + vkEnumClass.putIfAbsent(name, "$packageName.$className") + } + } + + fun addReqCommand( + list: List, + commandMap: Map, + commandAliasMap: Map> + ) { + list.forEach { reqCommand -> + val cmd = commandMap[reqCommand] + ?: commandMap[(commandAliasMap[reqCommand] ?: error(reqCommand)).find(commandMap::containsKey)] + ?: error(reqCommand) + handleFields.add( + VkDowncallField( + "MethodHandle", + "MH_${reqCommand}", + buildString { + append("RuntimeHelper.downcall(FunctionDescriptor.of") + if (cmd.type.javaName == "void") { + append("Void") + } + append("(") + if (cmd.type.javaName != "void") { + append(cmd.type.layout) + if (cmd.params.isNotEmpty()) { + append(", ") + } + } + append(cmd.params.joinToString(", ") { it.type.layout.toString() }) + append("))") + } + ) + ) + pfnFields.add( + VkDowncallField( + "MemorySegment", + "PFN_${reqCommand}", + null, + modifier = "public final" + ) + ) + + methods.add( + VkDowncallMethod( + cmd.type, + reqCommand, + cmd.params.map { VkDowncallParam(it.type, it.name) } + ) + ) + } + } + + fun write() { + val sb = StringBuilder() + sb.appendLine(commentedFileHeader) + sb.appendLine( + """ + package $packageName; + import java.lang.foreign.*; + import java.lang.invoke.*; + import overrungl.annotation.*; + import overrungl.internal.RuntimeHelper; + import overrungl.util.*; + import overrungl.vulkan.*; + """.trimIndent() + ) + imports.sorted().forEach { sb.appendLine("import $it;") } + sb.append("public class $className") + if (extends.isNotEmpty()) { + sb.append(" extends ${extends.joinToString(", ")}") + } + sb.appendLine(" {") + + fun writeFields(list: List) { + list.forEach { + sb.append(" ${it.modifier} ${it.type} ${it.name}") + if (it.value != null) { + sb.append(" = ") + sb.append(it.value) + } + sb.appendLine(";") + } + } + writeFields(fields) + // write aliases later to avoid forward declaration + writeFields(aliasFields) + writeFields(handleFields) + writeFields(pfnFields) + sb.appendLine() + + if (constructor != null) { + sb.appendLine(constructor!!.prependIndent(" ")) + } + sb.appendLine() + + methods.forEach { m -> + sb.append(" public ${m.type.annotatedTypeName()} ${m.name.substring(2)}(") + sb.append(m.parameters.joinToString(", ") { "${it.type.annotatedTypeName()} ${it.name}" }) + sb.appendLine(") {") + sb.appendLine(""" if (Unmarshal.isNullPointer(PFN_${m.name})) throw new SymbolNotFoundError("Symbol not found: ${m.name}");""") + sb.append(" try { ") + if (m.type.javaName != "void") { + sb.append("return (${m.type.javaName}) ") + } + sb.appendLine("MH_${m.name}.invokeExact(PFN_${m.name}, ${m.parameters.joinToString(", ") { it.name }}); }") + sb.appendLine(""" catch (Throwable e) { throw new RuntimeException("error in ${m.name}", e); }""") + sb.appendLine(" }") + sb.appendLine() + } + + if (customCode != null) { + sb.appendLine(" // --- OverrunGL custom code ---") + sb.appendLine(customCode!!.prependIndent(" ")) + } + + sb.appendLine("}") + + writeString(Path(packageName.replace('.', '/'), "$className.java"), sb.toString()) + } +} + +data class VkDowncallField( + val type: String, + val name: String, + val value: String?, + val modifier: String? = "public static final" +) + +data class VkDowncallParam(val type: VkType, val name: String) + +data class VkDowncallMethod( + val type: VkType, + val name: String, + val parameters: List, +) diff --git a/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkFuncPointer.kt b/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkFuncPointer.kt new file mode 100644 index 00000000..bec1dd29 --- /dev/null +++ b/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkFuncPointer.kt @@ -0,0 +1,178 @@ +/* + * MIT License + * + * Copyright (c) 2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +package overrungl.vulkan + +private val keywords = listOf( + "typedef", + "const", + "VKAPI_PTR" +) + +data class VkFuncPointerParam(val type: List, val name: String) +data class VkFuncPointer(val type: List, val name: String, val params: List) + +class VkFuncPointerLexer(private val source: String) { + private var start = 0 + private var position = 0 + private val tokens = mutableListOf() + + fun parse(): List { + while (!isEOF()) { + start = position + scan() + } + tokens.add(Token(TokenType.EOF, null)) + return tokens + } + + private fun isEOF(): Boolean = position >= source.length + private fun advance(): Int { + return if (isEOF()) -1 + else source.codePointAt(position++) + } + + private fun peek(): Int { + return if (isEOF()) -1 + else source.codePointAt(position) + } + + private fun scan() { + when (val c = advance()) { + '('.code -> addToken(TokenType.LEFT_PARENTHESIS) + ')'.code -> addToken(TokenType.RIGHT_PARENTHESIS) + '*'.code -> addToken(TokenType.STAR) + ','.code -> addToken(TokenType.COMMA) + ';'.code -> addToken(TokenType.SEMICOLON) + else -> { + if (Character.isWhitespace(c)) return + else if (Character.isJavaIdentifierStart(c)) scanIdentifier() + else error("Unexpected character: ${c.toChar()}") + } + } + } + + private fun scanIdentifier() { + while (!isEOF() && Character.isJavaIdentifierPart(peek())) { + advance() + } + if (keywords.contains(source.substring(start, position))) { + addToken(TokenType.KEYWORD) + } else { + addToken(TokenType.LITERAL) + } + } + + private fun addToken(type: TokenType) { + tokens.add(Token(type, source.substring(start, position))) + } +} + +class VkFuncPointerParser(private val tokens: List) { + private var position = 0 + private val type = mutableListOf() + private var name: String? = null + private val params = mutableListOf() + + fun parse(): VkFuncPointer { + while (!isEOF()) { + scanTypedef() + } + return VkFuncPointer(type, name!!, params) + } + + private fun isEOF(): Boolean = position >= tokens.size || tokens[position].type == TokenType.EOF + private fun advance(): Token? = if (isEOF()) null else tokens[position++] + private fun peek(): Token? = if (isEOF()) null else tokens[position] + private fun next(): Token? = if (position + 1 >= tokens.size) null else tokens[++position] + + private fun scanTypedef() { + val token = peek() + if (token != null && token.type == TokenType.KEYWORD && token.literal == "typedef") { + next() + scanPFNType() + scanPFNName() + scanPFNParams() + next() // ; + } else error(token.toString()) + } + + private fun scanPFNType() { + var token = peek() + while (token != null && token.type != TokenType.LEFT_PARENTHESIS) { + if (token.type == TokenType.LITERAL) { + type.add(VkTypeResolving(token.literal!!)) + } else if (token.type == TokenType.KEYWORD || token.type == TokenType.STAR) { + type.add(VkTypeLiteral(token.literal!!)) + } + token = next() + } + } + + private fun scanPFNName() { + advance() // ( + advance() // VKAPI_PTR + advance() // * + name = advance()!!.literal + advance() // ) + } + + private fun scanPFNParams() { + var token = peek() + if (token != null && token.type == TokenType.LEFT_PARENTHESIS) { + token = next() + while (token != null && token.type != TokenType.RIGHT_PARENTHESIS) { + token = scanPFNParam() + } + next() + } else error(token.toString()) + } + + private fun scanPFNParam(): Token? { + val pendingTokens = mutableListOf() + var token = peek() + while (token != null && token.type != TokenType.COMMA && token.type != TokenType.RIGHT_PARENTHESIS) { + pendingTokens.add(token) + token = next() + } + val type = mutableListOf() + val name = pendingTokens.last().literal + pendingTokens.forEachIndexed { index, token -> + if (index != pendingTokens.lastIndex) { + if (token.type == TokenType.LITERAL) { + type.add(VkTypeResolving(token.literal!!)) + } else if (token.type == TokenType.KEYWORD || token.type == TokenType.STAR) { + type.add(VkTypeLiteral(token.literal!!)) + } + } + } + params.add(VkFuncPointerParam(type, name!!)) + return advance() + } +} + +enum class TokenType { + EOF, + LITERAL, + KEYWORD, + LEFT_PARENTHESIS, + RIGHT_PARENTHESIS, + STAR, + COMMA, + SEMICOLON, +} + +data class Token(val type: TokenType, val literal: String?) diff --git a/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkStruct.kt b/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkStruct.kt new file mode 100644 index 00000000..912a94ef --- /dev/null +++ b/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkStruct.kt @@ -0,0 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +package overrungl.vulkan + +class VkStruct( + val packageName: String, + val name: String, + val union: Boolean, + val members: List, + val usedEnums: Set, +) + +data class VkStructMember( + val type: List, + val name: String, + val fixedSize: String? +) diff --git a/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkType.kt b/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkType.kt new file mode 100644 index 00000000..670e8ff7 --- /dev/null +++ b/generators/vulkan/src/main/kotlin/overrungl/vulkan/VkType.kt @@ -0,0 +1,204 @@ +/* + * MIT License + * + * Copyright (c) 2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +package overrungl.vulkan + +import com.palantir.javapoet.ClassName +import com.palantir.javapoet.TypeName +import overrungl.gen.CustomTypeSpec + +data class VkType( + val originalName: String, + val javaName: String, + val layout: String?, + val struct: Boolean +) { + fun toCustomTypeSpec(): CustomTypeSpec { + //todo no TypeName + val typeName = when (javaName) { + "void" -> TypeName.VOID + "byte" -> TypeName.BYTE + "short" -> TypeName.SHORT + "int" -> TypeName.INT + "long" -> TypeName.LONG + "float" -> TypeName.FLOAT + "double" -> TypeName.DOUBLE + "MemorySegment" -> ClassName.get("java.lang.foreign", "MemorySegment") + else -> error(javaName) + } + return CustomTypeSpec(carrier = typeName, javaType = typeName, layout = layout, cType = originalName) + } + + fun annotatedTypeName(): String { + if (originalName == javaName) return javaName + return """@CType("$originalName") $javaName""" + } +} + +val enumConstants = mutableMapOf() +val vkEnums = mutableMapOf() +val vkEnumClass = mutableMapOf() // defines where they first appeared + +data class VkEnumConstant(val type: String, val name: String, val value: String) +data class VkEnum(val name: String, val value: String?, val bitpos: String?, val alias: String?) +data class VkEnumType(val name: String, val type: String, val bitwidth: String?, val enums: MutableList) { + fun javaType(): String = + if (bitwidth != null) { + when (bitwidth) { + "64" -> "long" + else -> error(bitwidth) + } + } else "int" +} + +data class VkCommandParam(val type: VkType, val name: String) +data class VkCommand(val type: VkType, val name: String, val params: List) + +data class VkRequireEnum( + val extends: String?, + val name: String, + val extnumber: String?, + val offset: String?, + val dir: String?, + val bitpos: String?, + val value: String?, + val alias: String?, + val api: String? +) + +val recordingErrorType = mutableSetOf() +val typeMap = mutableMapOf() + +private fun basicType(originalName: String, javaName: String, layout: String?): VkType = + VkType(originalName, javaName, layout, struct = false).also { typeMap[it.originalName] = it } + +internal fun typedef(from: VkType, name: String): VkType = + from.copy(originalName = name).also { typeMap[it.originalName] = it } + +val void = basicType("void", "void", null) +val char = basicType("char", "byte", "ValueLayout.JAVA_BYTE") +val float = basicType("float", "float", "ValueLayout.JAVA_FLOAT") +val double = basicType("double", "double", "ValueLayout.JAVA_DOUBLE") +val int8_t = basicType("int8_t", "byte", "ValueLayout.JAVA_BYTE") +val uint8_t = basicType("uint8_t", "byte", "ValueLayout.JAVA_BYTE") +val int16_t = basicType("int16_t", "short", "ValueLayout.JAVA_SHORT") +val uint16_t = basicType("uint16_t", "short", "ValueLayout.JAVA_SHORT") +val uint32_t = basicType("uint32_t", "int", "ValueLayout.JAVA_INT") +val uint64_t = basicType("uint64_t", "long", "ValueLayout.JAVA_LONG") +val int32_t = basicType("int32_t", "int", "ValueLayout.JAVA_INT") +val int64_t = basicType("int64_t", "long", "ValueLayout.JAVA_LONG") +val size_t = basicType("size_t", "long", "ValueLayout.JAVA_LONG") +val int = basicType("int", "int", "ValueLayout.JAVA_INT") + +val address = VkType("MemorySegment", "MemorySegment", "ValueLayout.ADDRESS", struct = false) + +val ANativeWindow = typedef(address, "ANativeWindow") +val AHardwareBuffer = typedef(address, "AHardwareBuffer") +val CAMetalLayer = typedef(void, "CAMetalLayer") +val MTLDevice_id = typedef(address, "MTLDevice_id") +val MTLCommandQueue_id = typedef(address, "MTLCommandQueue_id") +val MTLBuffer_id = typedef(address, "MTLBuffer_id") +val MTLTexture_id = typedef(address, "MTLTexture_id") +val MTLSharedEvent_id = typedef(address, "MTLSharedEvent_id") +val IOSurfaceRef = typedef(address, "IOSurfaceRef") +val VkSampleMask = typedef(uint32_t, "VkSampleMask") +val VkBool32 = typedef(uint32_t, "VkBool32") +val VkFlags = typedef(uint32_t, "VkFlags") +val VkFlags64 = typedef(uint64_t, "VkFlags64") +val VkDeviceSize = typedef(uint64_t, "VkDeviceSize") +val VkDeviceAddress = typedef(uint64_t, "VkDeviceAddress") +val VkRemoteAddressNV = typedef(address, "VkRemoteAddressNV") + +val Display = typedef(address, "Display") +val VisualID = typedef(uint64_t, "VisualID") +val Window = typedef(uint64_t, "Window") +val RROutput = typedef(uint64_t, "RROutput") +val wl_display = typedef(address, "wl_display") +val wl_surface = typedef(address, "wl_surface") +val HINSTANCE = typedef(address, "HINSTANCE") +val HWND = typedef(address, "HWND") +val HMONITOR = typedef(address, "HMONITOR") +val HANDLE = typedef(address, "HANDLE") +val SECURITY_ATTRIBUTES = typedef(address, "SECURITY_ATTRIBUTES") +val DWORD = typedef(int32_t, "DWORD") +val LPCWSTR = typedef(address, "LPCWSTR") +val xcb_connection_t = typedef(address, "xcb_connection_t") +val xcb_visualid_t = typedef(uint32_t, "xcb_visualid_t") +val xcb_window_t = typedef(uint32_t, "xcb_window_t") +val IDirectFB = typedef(address, "IDirectFB") +val IDirectFBSurface = typedef(address, "IDirectFBSurface") +val zx_handle_t = typedef(int32_t, "zx_handle_t") +val GgpStreamDescriptor = typedef(address, "GgpStreamDescriptor") // todo what type? +val GgpFrameToken = typedef(address, "GgpFrameToken") +val _screen_context = typedef(address, "_screen_context") +val _screen_window = typedef(address, "_screen_window") +val _screen_buffer = typedef(address, "_screen_buffer") +val NvSciSyncAttrList = typedef(address, "NvSciSyncAttrList") +val NvSciSyncObj = typedef(address, "NvSciSyncObj") +val NvSciSyncFence = typedef(address, "NvSciSyncFence") +val NvSciBufAttrList = typedef(address, "NvSciBufAttrList") +val NvSciBufObj = typedef(address, "NvSciBufObj") + +sealed interface VkTypeComponent { + val literal: String +} + +data class VkTypeLiteral(override val literal: String) : VkTypeComponent +data class VkTypeResolving(override val literal: String) : VkTypeComponent + +internal fun findType(typeResolving: VkTypeResolving): VkType { + return typeMap[typeResolving.literal] ?: run { + recordingErrorType.add(typeResolving.literal) + int + } +} + +fun resolveType(components: List, selfReference: String? = null): VkType { + val originalType = StringBuilder() + var javaName: String? = null + var layout: String? = null + var struct = false + components.forEachIndexed { index, it -> + when (it) { + is VkTypeLiteral -> { + if (it.literal.isNotBlank()) { + if (index > 0) originalType.append(" ") + originalType.append(it.literal) + } + } + + is VkTypeResolving -> { + if (index > 0) originalType.append(" ") + originalType.append(it.literal) + val find = + if (it.literal == selfReference) address + else findType(it) + javaName = find.javaName + layout = find.layout + struct = find.struct + } + } + } + if (originalType.contains('*')) { + javaName = "MemorySegment" + layout = "ValueLayout.ADDRESS" + struct = false + } + if (javaName == null) { + error("""no Java name: "$originalType"""") + } + return VkType(originalType.toString(), javaName!!, layout, struct) +} diff --git a/generators/vulkan/src/main/kotlin/overrungl/vulkan/VulkanGenerator.kt b/generators/vulkan/src/main/kotlin/overrungl/vulkan/VulkanGenerator.kt index 16bd4f7c..45173952 100644 --- a/generators/vulkan/src/main/kotlin/overrungl/vulkan/VulkanGenerator.kt +++ b/generators/vulkan/src/main/kotlin/overrungl/vulkan/VulkanGenerator.kt @@ -16,12 +16,746 @@ package overrungl.vulkan -// vulkan_core update: 2024-04-13 -// vk.xml: 2024-04-13 +import org.w3c.dom.Element +import org.w3c.dom.Text +import overrungl.gen.* +import javax.xml.parsers.DocumentBuilder +import javax.xml.parsers.DocumentBuilderFactory +import kotlin.io.path.Path + +// vk.xml: 2025-01-08 +// video.xml: 2025-01-09 + +const val vulkanPackage = "overrungl.vulkan" + +const val extBase = 1000000000 +const val extBlockSize = 1000 + +val vkApiVersionRegex = Regex("VK_API_VERSION_\\d+_\\d+") + +val vkExtends = mapOf( + "1.1" to "10", + "1.2" to "11", + "1.3" to "12", + "1.4" to "13", +) + +fun videoXML(xmlBuilder: DocumentBuilder) { + val document = ClassLoader.getSystemResourceAsStream("video.xml")!!.use { xmlBuilder.parse(it) } + val root = document.documentElement + + val defineMap = mapOf( + "VK_MAKE_VIDEO_STD_VERSION" to """ + public static int VK_MAKE_VIDEO_STD_VERSION(int major, int minor, int patch) { + return (major << 22) | (minor << 12) | patch; + } + """.trimIndent(), + "VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0" to "public static final int VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0);", + "VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0" to "public static final int VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0);", + "VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0" to "public static final int VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0);", + "VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0" to "public static final int VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0);", + "VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0" to "public static final int VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0);", + "VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0" to "public static final int VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0);" + ) + val enumMap = mutableMapOf>() + val typeNodeList = (root.getElementsByTagName("types").item(0) as Element).getElementsByTagName("type") + for (i in 0 until typeNodeList.length) { + val typeNode = typeNodeList.item(i) as Element + when (val category = typeNode.getAttribute("category")) { + "enum" -> { + val name = typeNode.getAttribute("name") + typedef(int, name) + enumMap[name] = mutableListOf() + } + + "struct" -> { + val name = typeNode.getAttribute("name") + Struct("$vulkanPackage.video", name, cType = name) { + val memberNodeList = typeNode.getElementsByTagName("member") + for (i1 in 0 until memberNodeList.length) { + val memberNode = memberNodeList.item(i1) as Element + val childNodeList = memberNode.childNodes + val memberType = mutableListOf() + var memberName: String? = null + for (i2 in 0 until childNodeList.length) { + when (val childNode = childNodeList.item(i2)) { + is Text -> memberType.add(VkTypeLiteral(childNode.wholeText.trim())) + is Element -> when (childNode.tagName) { + "type" -> memberType.add(VkTypeResolving(childNode.textContent)) + "name" -> memberName = childNode.textContent + } + } + } + resolveType(memberType).toCustomTypeSpec()(memberName!!) + } + } + typedef(VkType(name, address.javaName, "$name.LAYOUT", true), name) + } + + "", "define", "include" -> {} + else -> error(category) + } + } + + val enumsNodeList = root.getElementsByTagName("enums") + for (i in 0 until enumsNodeList.length) { + val enumsNode = enumsNodeList.item(i) as Element + val list = enumMap[enumsNode.getAttribute("name")]!! + val enumNodeList = enumsNode.getElementsByTagName("enum") + for (i1 in 0 until enumNodeList.length) { + val enumNode = enumNodeList.item(i1) as Element + val name = enumNode.getAttribute("name") + if (enumNode.hasAttribute("alias")) { + list.add(VkEnum(name, value = enumNode.getAttribute("alias"), bitpos = null, alias = null)) + } else { + list.add(VkEnum(name, value = enumNode.getAttribute("value"), bitpos = null, alias = null)) + } + } + } + + val extensionNodeList = + (root.getElementsByTagName("extensions").item(0) as Element).getElementsByTagName("extension") + for (i in 0 until extensionNodeList.length) { + val extensionNode = extensionNodeList.item(i) as Element + val name = extensionNode.getAttribute("name") + .split('_') + .joinToString("") { it.replaceFirstChar(Char::uppercaseChar) } + writeString(Path("overrungl/vulkan/video/$name.java"), buildString { + appendLine(commentedFileHeader) + appendLine("package overrungl.vulkan.video;") + if (name != "VulkanVideoCodecsCommon") { + appendLine("import static overrungl.vulkan.video.VulkanVideoCodecsCommon.*;") + } + appendLine("public final class $name {") + val requireNodeList = extensionNode.getElementsByTagName("require") + for (i1 in 0 until requireNodeList.length) { + val requireNode = requireNodeList.item(i1) as Element + val childNodes = requireNode.childNodes + for (i2 in 0 until childNodes.length) { + val childNode = childNodes.item(i2) + if (childNode is Element) { + when (childNode.tagName) { + "type" -> { + val typeName = childNode.getAttribute("name") + if (defineMap.containsKey(typeName)) appendLine(defineMap[typeName]!!.prependIndent(" ")) + else if (enumMap.containsKey(typeName)) { + enumMap[typeName]!!.forEach { appendLine(" public static final int ${it.name} = ${it.value};") } + } + } + + "enum" -> { + val value = childNode.getAttribute("value") + val type = if (value.contains('"')) "String" else "int" + appendLine( + " public static final $type ${childNode.getAttribute("name")} = $value;" + ) + } + } + } + } + } + appendLine(" private $name() { }") + appendLine("}") + }) + } +} /** * @author squid233 * @since 0.1.0 */ fun main() { + val xmlFactory = DocumentBuilderFactory.newInstance() + val xmlBuilder = xmlFactory.newDocumentBuilder() + + videoXML(xmlBuilder) + + val document = ClassLoader.getSystemResourceAsStream("vk.xml")!!.use { xmlBuilder.parse(it) } + val root = document.documentElement + + // vendors + val vendors = buildList { + (root.getElementsByTagName("tags").item(0) as Element).getElementsByTagName("tag").also { + for (i in 0 until it.length) { + add((it.item(i) as Element).getAttribute("name")) + } + } + } + + // types + val defineVkVersion = mutableMapOf() + val addedStructPackages = mutableSetOf() + val vkStructMap = mutableMapOf() + val vkFuncPointerMap = mutableMapOf() + val typeNodeList = (root.getElementsByTagName("types").item(0) as Element).getElementsByTagName("type") + for (i in 0 until typeNodeList.length) { + val typeNode = typeNodeList.item(i) as Element + when (val category = typeNode.getAttribute("category")) { + "bitmask" -> { + if (typeNode.hasAttribute("name") && typeNode.hasAttribute("alias")) { + typedef( + findType(VkTypeResolving(typeNode.getAttribute("alias"))), + typeNode.getAttribute("name") + ) + } else { + typedef( + findType(VkTypeResolving(typeNode.getElementsByTagName("type").item(0).textContent)), + typeNode.getElementsByTagName("name").item(0).textContent + ) + } + } + + "handle" -> { + if (typeNode.hasAttribute("name") && typeNode.hasAttribute("alias")) { + typedef( + findType(VkTypeResolving(typeNode.getAttribute("alias"))), + typeNode.getAttribute("name") + ) + } else { + typedef( + address, + typeNode.getElementsByTagName("name").item(0).textContent + ) + } + } + + "enum" -> { + val name = typeNode.getAttribute("name") + if (typeNode.hasAttribute("alias")) { + typedef( + findType(VkTypeResolving(typeNode.getAttribute("alias"))), + name + ) + } else { + typedef(int, name) + } + } + + "funcpointer" -> { + val pfn = VkFuncPointerParser(VkFuncPointerLexer(typeNode.textContent).parse()).parse() + vkFuncPointerMap[pfn.name] = pfn + typedef(VkType(pfn.name, address.javaName, address.layout, false), pfn.name) + } + + "struct", "union" -> { + val name = typeNode.getAttribute("name") + if (typeNode.hasAttribute("alias")) { + typedef( + VkType(name, address.javaName, "${typeNode.getAttribute("alias")}.LAYOUT", true), + name + ) + } else { + val vendor = vendors.find { name.endsWith(it) } + val union = category == "union" + val packageName: String + if (vendor != null) { + val lowercase = vendor.lowercase() + packageName = "$vulkanPackage.$lowercase.$category" + } else { + packageName = "$vulkanPackage.$category" + } + addedStructPackages.add(packageName) + val usedEnums = mutableSetOf() + val members = mutableListOf() + val memberNodeList = typeNode.getElementsByTagName("member") + for (i1 in 0 until memberNodeList.length) { + val memberNode = memberNodeList.item(i1) as Element + if (memberNode.hasAttribute("api") && memberNode.getAttribute("api") == "vulkansc") { + continue + } + val childNodeList = memberNode.childNodes + val typeComp = mutableListOf() + var memberName: String? = null + var fixedSize: String? = null + // scan until name + var nameIndex = 0 + for (i2 in 0 until childNodeList.length) { + when (val node = childNodeList.item(i2)) { + is Text -> typeComp.add(VkTypeLiteral(node.wholeText.trim())) + is Element -> { + if (node.tagName == "name") { + memberName = node.textContent + nameIndex = i2 + break + } else if (node.tagName == "type") { + typeComp.add(VkTypeResolving(node.textContent)) + } + } + } + } + nameIndex++ + if (nameIndex < childNodeList.length - 1) { + // scan fixed size array + val sb = StringBuilder() + for (i2 in nameIndex until childNodeList.length) { + when (val node = childNodeList.item(i2)) { + is Text -> sb.append(node.wholeText.trim()) + is Element -> { + if (node.tagName != "comment") { + sb.append(node.textContent) + } + } + } + } + fixedSize = sb.split('[', ']')[1] + } + members.add(VkStructMember(typeComp, memberName!!, fixedSize)) + if (fixedSize != null && fixedSize.startsWith("VK_")) { + usedEnums.add(fixedSize) + } + } + val struct = VkStruct(packageName, name, union = union, members, usedEnums) + vkStructMap[name] = struct + typedef( + VkType(name, address.javaName, "$name.LAYOUT", struct = true), + name + ) + } + } + + "define" -> { + val nameNodeList = typeNode.getElementsByTagName("name") + if (nameNodeList.length > 0) { + val item = nameNodeList.item(0) + if (item is Element && item.textContent.matches(vkApiVersionRegex)) { + // 0: name + // 1: type + // 2: args + var readingState = 0 + var name: String? = null + var type: String? = null + var args: String? = null + for (i1 in 0 until typeNode.childNodes.length) { + when (val childNode = typeNode.childNodes.item(i1)) { + is Text -> if (readingState == 2) { + args = childNode.textContent.substringBefore("//") + } + + is Element -> when (readingState) { + 0 -> if (childNode.tagName == "name") { + name = childNode.textContent + readingState = 1 + } + + 1 -> if (childNode.tagName == "type") { + type = childNode.textContent + readingState = 2 + } + + else -> error(readingState) + } + } + } + defineVkVersion[name!!] = "$type$args" + } + } + } + + "", "include", "basetype" -> { + } + + else -> error(category) + } + } + + val vkStructSpecMap = mutableMapOf() + fun structToStruct(it: VkStruct) { + val struct = Struct(it.packageName, it.name, cType = it.name, union = it.union) { + it.members.forEach { member -> + val type = resolveType(member.type, it.name) + val fixedSize = member.fixedSize + if (fixedSize != null) { + if (fixedSize.startsWith("VK_")) { + imports.add("static ${vkEnumClass[fixedSize]}.*") + } + fixedSize(type.toCustomTypeSpec(), member.name, fixedSize) + } else if (type.struct) { + vkStructSpecMap[type.originalName]!!.byValue(member.name) + } else { + type.toCustomTypeSpec()(member.name) + } + } + } + vkStructSpecMap[it.name] = struct + } + // generate upcalls + vkFuncPointerMap.values.forEach { + Upcall("$vulkanPackage.upcall", it.name.substringAfter("PFN_").replaceFirstChar(Char::uppercaseChar)) { + targetMethod = "invoke"( + returnType = resolveType(it.type).toCustomTypeSpec(), + parameters = + if (it.params.size == 1 + && it.params.first().let { p -> p.type.isEmpty() && p.name == "void" } + ) arrayOf() + else it.params.map { p -> + UpcallMethodParameter( + resolveType(p.type).toCustomTypeSpec(), + p.name + ) + }.toTypedArray() + ) + } + } + + // enums + root.getElementsByTagName("enums").also { enumsNodeList -> + for (i in 0 until enumsNodeList.length) { + val enumsNode = enumsNodeList.item(i) as Element + when (enumsNode.getAttribute("type")) { + "constants" -> { + enumsNode.getElementsByTagName("enum").also { enumNodeList -> + for (i1 in 0 until enumNodeList.length) { + val node = enumNodeList.item(i1) as Element + val name = node.getAttribute("name") + enumConstants[name] = VkEnumConstant( + resolveType(listOf(VkTypeResolving(node.getAttribute("type")))).javaName, + name, + node.getAttribute("value") + .replace("U)", ")") + .replace("ULL)", "L)") + ) + } + } + } + + "enum", "bitmask" -> { + enumsNode.getElementsByTagName("enum").also { enumNodeList -> + val list = mutableListOf() + for (i1 in 0 until enumNodeList.length) { + val node = enumNodeList.item(i1) as Element + val name = node.getAttribute("name") + list.add( + VkEnum( + name, + node.findAttribute("value"), + node.findAttribute("bitpos"), + node.findAttribute("alias") + ) + ) + } + val enumsNodeName = enumsNode.getAttribute("name") + vkEnums[enumsNodeName] = VkEnumType( + enumsNodeName, + enumsNode.getAttribute("type"), + enumsNode.findAttribute("bitwidth"), + list + ) + } + } + } + } + } + + // commands + val commandAliasMap = mutableMapOf>() + val commandMap = mutableMapOf() + val commandNodeList = (root.getElementsByTagName("commands").item(0) as Element).getElementsByTagName("command") + for (i in 0 until commandNodeList.length) { + val commandNode = commandNodeList.item(i) as Element + if (commandNode.hasAttribute("alias")) { + val alias = commandNode.getAttribute("alias") + val name = commandNode.getAttribute("name") + commandAliasMap.computeIfAbsent(alias) { mutableListOf() }.add(name) + commandAliasMap.computeIfAbsent(name) { mutableListOf() }.add(alias) + } else { + val proto = commandNode.getElementsByTagName("proto").item(0) + var name: String? = null + val protoTypeList = mutableListOf() + for (i1 in 0 until proto.childNodes.length) { + when (val node = proto.childNodes.item(i1)) { + is Text -> protoTypeList.add(VkTypeLiteral(node.wholeText.trim())) + is Element -> { + if (node.tagName == "name") { + name = node.textContent + } else { + protoTypeList.add(VkTypeResolving(node.textContent)) + } + } + } + } + val type = resolveType(protoTypeList) + + val params = mutableListOf() + val childNodeList = commandNode.childNodes + for (i1 in 0 until childNodeList.length) { + val paramNode = childNodeList.item(i1) + if (paramNode !is Element || paramNode.tagName != "param") + continue + if (paramNode.hasAttribute("api") && paramNode.getAttribute("api") == "vulkansc") + continue + var paramName: String? = null + val paramTypeList = mutableListOf() + for (i2 in 0 until paramNode.childNodes.length) { + when (val node = paramNode.childNodes.item(i2)) { + is Text -> paramTypeList.add(VkTypeLiteral(node.wholeText.trim())) + is Element -> { + if (node.tagName == "name") { + paramName = node.textContent + } else { + paramTypeList.add(VkTypeResolving(node.textContent)) + } + } + } + } + val paramType = resolveType(paramTypeList) + params.add(VkCommandParam(paramType, paramName!!)) + } + + commandMap[name!!] = VkCommand(type, name, params) + } + } + + // feature + val featureNodeList = root.getElementsByTagName("feature") + for (i in 0 until featureNodeList.length) { + val featureNode = featureNodeList.item(i) as Element + if (featureNode.hasAttribute("api") && featureNode.getAttribute("api").split(',').contains("vulkan")) { + val featureNumber = featureNode.getAttribute("number") + val featureReqTypes = mutableListOf() + val featureReqCommands = mutableListOf() + val featureReqEnums = mutableListOf() + val requireNodeList = featureNode.getElementsByTagName("require") + for (i1 in 0 until requireNodeList.length) { + val requireNode = requireNodeList.item(i1) as Element + val childNodeList = requireNode.childNodes + for (i2 in 0 until childNodeList.length) { + val childNode = childNodeList.item(i2) + if (childNode is Element) { + when (childNode.tagName) { + "type" -> featureReqTypes.add(childNode.getAttribute("name")) + "command" -> featureReqCommands.add(childNode.getAttribute("name")) + "enum" -> { + if (childNode.hasAttribute("api") && childNode.getAttribute("api") == "vulkansc") + continue + featureReqEnums.add( + VkRequireEnum( + extends = childNode.findAttribute("extends"), + name = childNode.getAttribute("name"), + extnumber = childNode.findAttribute("extnumber"), + offset = childNode.findAttribute("offset"), + dir = childNode.findAttribute("dir"), + bitpos = childNode.findAttribute("bitpos"), + value = childNode.findAttribute("value"), + alias = childNode.findAttribute("alias"), + api = childNode.findAttribute("api"), + ) + ) + } + } + } + } + } + + val className = "VK${featureNumber.replace(".", "")}" + VkDowncall(vulkanPackage, className) { + vkExtends[featureNumber]?.also { extends.add("VK$it") } + + defineVkVersion.forEach { (k, v) -> + fields.add( + VkDowncallField("int", k, v) + ) + } + + addReqTypes(featureReqTypes) + addReqEnums(featureReqEnums) + addReqCommand(featureReqCommands, commandMap, commandAliasMap) + + constructor = buildString { + appendLine("""public $className(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) {""") + if (vkExtends.containsKey(featureNumber)) { + appendLine(" super(instance, func);") + } + featureReqCommands.forEach { command -> + append(""" PFN_$command = func.invoke(instance, "$command"""") + commandAliasMap[command]?.onEach { append(""", "$it"""") } + appendLine(");") + } + append("}") + } + + if (featureNumber == "1.0") { + customCode = """ + public static int VK_MAKE_API_VERSION(int variant, int major, int minor, int patch) { + return (variant << 29) | (major << 22) | (minor << 12) | patch; + } + public static int VK_API_VERSION_VARIANT(int version) { return version >> 29; } + public static int VK_API_VERSION_MAJOR(int version) { return (version >> 22) & 0x7F; } + public static int VK_API_VERSION_MINOR(int version) { return (version >> 12) & 0x3FF; } + public static int VK_API_VERSION_PATCH(int version) { return version & 0xFFF; } + + public static @CType("VkResult") int vkEnumerateInstanceExtensionProperties(VKLoadFunc func, @CType("const char *") MemorySegment pLayerName, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkExtensionProperties *") MemorySegment pProperties) { + var p = func.invoke(MemorySegment.NULL, "vkEnumerateInstanceExtensionProperties"); + if (Unmarshal.isNullPointer(p)) throw new SymbolNotFoundError("Symbol not found: vkEnumerateInstanceExtensionProperties"); + try { return (int) MH_vkEnumerateInstanceExtensionProperties.invokeExact(p, pLayerName, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumerateInstanceExtensionProperties", e); } + } + + public static @CType("VkResult") int vkEnumerateInstanceLayerProperties(VKLoadFunc func, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkLayerProperties *") MemorySegment pProperties) { + var p = func.invoke(MemorySegment.NULL, "vkEnumerateInstanceLayerProperties"); + if (Unmarshal.isNullPointer(p)) throw new SymbolNotFoundError("Symbol not found: vkEnumerateInstanceLayerProperties"); + try { return (int) MH_vkEnumerateInstanceLayerProperties.invokeExact(p, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumerateInstanceLayerProperties", e); } + } + + public static @CType("VkResult") int vkCreateInstance(VKLoadFunc func, @CType("const VkInstanceCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkInstance *") MemorySegment pInstance) { + var p = func.invoke(MemorySegment.NULL, "vkCreateInstance"); + if (Unmarshal.isNullPointer(p)) throw new SymbolNotFoundError("Symbol not found: vkCreateInstance"); + try { return (int) MH_vkCreateInstance.invokeExact(p, pCreateInfo, pAllocator, pInstance); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateInstance", e); } + } + + public static @CType("PFN_vkVoidFunction") MemorySegment vkGetInstanceProcAddr(VKLoadFunc func, @CType("VkInstance") MemorySegment instance, @CType("const char *") MemorySegment pName) { + var p = func.invoke(MemorySegment.NULL, "vkGetInstanceProcAddr"); + if (Unmarshal.isNullPointer(p)) throw new SymbolNotFoundError("Symbol not found: vkGetInstanceProcAddr"); + try { return (MemorySegment) MH_vkGetInstanceProcAddr.invokeExact(p, instance, pName); } + catch (Throwable e) { throw new RuntimeException("error in vkGetInstanceProcAddr", e); } + } + """.trimIndent() + } + } + } + } + + // extensions + val extensionNodeList = + (root.getElementsByTagName("extensions").item(0) as Element).getElementsByTagName("extension") + val extensionVendors = mutableSetOf() + val extensionDowncalls = mutableMapOf() + for (i in 0 until extensionNodeList.length) { + val extensionNode = extensionNodeList.item(i) as Element + if (extensionNode.getAttribute("supported").split(',').contains("vulkan")) { + val rawName = extensionNode.getAttribute("name") + val extName = rawName + .split('_') + .joinToString("") { it.replaceFirstChar(Char::uppercaseChar) } + val extType = extensionNode.getAttribute("type") + val extNumber = extensionNode.getAttribute("number") + val extVendor = rawName + .substringAfter("VK_") + .substringBefore('_') + .lowercase() + extensionVendors.add(extVendor) + + val extReqTypes = mutableListOf() + val extReqCommands = mutableListOf() + val extReqEnums = mutableListOf() + val requireNodeList = extensionNode.getElementsByTagName("require") + for (i1 in 0 until requireNodeList.length) { + val requireNode = requireNodeList.item(i1) as Element + for (i2 in 0 until requireNode.childNodes.length) { + val childNode = requireNode.childNodes.item(i2) + if (childNode is Element) { + when (childNode.tagName) { + "type" -> extReqTypes.add(childNode.getAttribute("name")) + "command" -> extReqCommands.add(childNode.getAttribute("name")) + "enum" -> extReqEnums.add( + VkRequireEnum( + extends = childNode.findAttribute("extends"), + name = childNode.getAttribute("name"), + extnumber = extNumber, + offset = childNode.findAttribute("offset"), + dir = childNode.findAttribute("dir"), + bitpos = childNode.findAttribute("bitpos"), + value = childNode.findAttribute("value"), + alias = childNode.findAttribute("alias"), + api = childNode.findAttribute("api"), + ) + ) + } + } + } + } + + val downcall = VkDowncall("$vulkanPackage.$extVendor", extName, write = false) { + addReqTypes(extReqTypes) + addReqEnums(extReqEnums) + addReqCommand(extReqCommands, commandMap, commandAliasMap) + + constructor = buildString { + append("public $extName(") + when (extType) { + "device" -> append("""@CType("VkDevice") MemorySegment device""") + "instance" -> append("""@CType("VkInstance") MemorySegment instance""") + } + appendLine(", VKLoadFunc func) {") + extReqCommands.forEach { command -> + append(""" PFN_$command = func.invoke($extType, "$command"""") + commandAliasMap[command]?.onEach { append(""", "$it"""") } + appendLine(");") + } + append("}") + } + } + extensionDowncalls[rawName] = downcall + } + } + for (i in 0 until extensionNodeList.length) { + val extensionNode = extensionNodeList.item(i) as Element + if (extensionNode.getAttribute("supported").split(',').contains("vulkan")) { + val rawName = extensionNode.getAttribute("name") + val requireNodeList = extensionNode.getElementsByTagName("require") + for (i1 in 0 until requireNodeList.length) { + val requireNode = requireNodeList.item(i1) as Element + for (i2 in 0 until requireNode.childNodes.length) { + val childNode = requireNode.childNodes.item(i2) + if (childNode is Element) { + when (childNode.tagName) { + "enum" -> { + if (childNode.hasAttribute("api") && childNode.getAttribute("api") == "vulkansc") continue + if (childNode.hasAttribute("alias")) { + val alias = childNode.getAttribute("alias") + (vkEnumClass[alias] ?: error("${childNode.getAttribute("name")}: $alias")).also { + extensionDowncalls[rawName]!!.imports.add("static $it.*") + } + } + } + } + } + } + } + } + } + extensionDowncalls.values.forEach(VkDowncall::write) + + // generate structs + // scan dependencies + vkStructMap.values.forEach { + it.members.forEach { member -> + val type = resolveType(member.type, it.name) + if (type.struct) { + structToStruct(vkStructMap[type.originalName]!!) + } + } + } + vkStructMap.values.forEach { + if (!vkStructSpecMap.containsKey(it.name)) { + structToStruct(it) + } + } + + // module-info.java + writeString(Path("module-info.java"), buildString { + appendLine(commentedFileHeader) + appendLine() + appendLine("/// The Vulkan binding.") + appendLine("module overrungl.vulkan {") + appendLine(" exports $vulkanPackage;") + extensionVendors.sorted().forEach { appendLine(" exports $vulkanPackage.$it;") } + addedStructPackages.sorted().forEach { appendLine(" exports $it;") } + appendLine(" exports $vulkanPackage.upcall;") + appendLine(" exports $vulkanPackage.video;") + appendLine() + appendLine(" requires transitive overrungl.core;") + appendLine("}") + appendLine() + }) + + if (recordingErrorType.isNotEmpty()) { + System.err.println("Recorded error types:") + recordingErrorType.forEach { + System.err.println(it) + } + } } + +fun Element.findAttribute(name: String): String? = if (hasAttribute(name)) getAttribute(name) else null diff --git a/generators/vulkan/src/main/resources/video.xml b/generators/vulkan/src/main/resources/video.xml new file mode 100644 index 00000000..cc629c20 --- /dev/null +++ b/generators/vulkan/src/main/resources/video.xml @@ -0,0 +1,1830 @@ + + + +Copyright 2021-2024 The Khronos Group Inc. +SPDX-License-Identifier: Apache-2.0 OR MIT + + + +This file, video.xml, provides the machine readable definition of data +structures and enumerations that are related to the externally-provided +video compression standards. + +The current public version of video.xml is maintained in the default branch +(currently named main) of the Khronos Vulkan GitHub project. + + + + + #if !defined(VK_NO_STDINT_H) + #include <stdint.h> +#endif + + + + + + + + #include "vulkan_video_codecs_common.h" + #include "vulkan_video_codec_h264std.h" + #include "vulkan_video_codec_h265std.h" + #include "vulkan_video_codec_av1std.h" + + + #define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \ + ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) + + + +#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + + + +#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + + + +#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + + + +#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + + + +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + + + +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + + + + + + + + + + + + + + + + + + + uint32_t aspect_ratio_info_present_flag : 1 + uint32_t overscan_info_present_flag : 1 + uint32_t overscan_appropriate_flag : 1 + uint32_t video_signal_type_present_flag : 1 + uint32_t video_full_range_flag : 1 + uint32_t color_description_present_flag : 1colour_description_present_flag + uint32_t chroma_loc_info_present_flag : 1 + uint32_t timing_info_present_flag : 1 + uint32_t fixed_frame_rate_flag : 1 + uint32_t bitstream_restriction_flag : 1 + uint32_t nal_hrd_parameters_present_flag : 1 + uint32_t vcl_hrd_parameters_present_flag : 1 + + + uint8_t cpb_cnt_minus1 + uint8_t bit_rate_scale + uint8_t cpb_size_scale + uint8_t reserved1Reserved for future use and must be initialized with 0. + uint32_t bit_rate_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE]cpb_cnt_minus1 number of valid elements + uint32_t cpb_size_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE]cpb_cnt_minus1 number of valid elements + uint8_t cbr_flag[STD_VIDEO_H264_CPB_CNT_LIST_SIZE]cpb_cnt_minus1 number of valid elements + uint32_t initial_cpb_removal_delay_length_minus1 + uint32_t cpb_removal_delay_length_minus1 + uint32_t dpb_output_delay_length_minus1 + uint32_t time_offset_length + + + StdVideoH264SpsVuiFlags flags + StdVideoH264AspectRatioIdc aspect_ratio_idc + uint16_t sar_width + uint16_t sar_height + uint8_t video_format + uint8_t colour_primaries + uint8_t transfer_characteristics + uint8_t matrix_coefficients + uint32_t num_units_in_tick + uint32_t time_scale + uint8_t max_num_reorder_frames + uint8_t max_dec_frame_buffering + uint8_t chroma_sample_loc_type_top_field + uint8_t chroma_sample_loc_type_bottom_field + uint32_t reserved1Reserved for future use and must be initialized with 0. + const StdVideoH264HrdParameters* pHrdParametersmust be a valid ptr to hrd_parameters, if nal_hrd_parameters_present_flag or vcl_hrd_parameters_present_flag are set + + + uint32_t constraint_set0_flag : 1 + uint32_t constraint_set1_flag : 1 + uint32_t constraint_set2_flag : 1 + uint32_t constraint_set3_flag : 1 + uint32_t constraint_set4_flag : 1 + uint32_t constraint_set5_flag : 1 + uint32_t direct_8x8_inference_flag : 1 + uint32_t mb_adaptive_frame_field_flag : 1 + uint32_t frame_mbs_only_flag : 1 + uint32_t delta_pic_order_always_zero_flag : 1 + uint32_t separate_colour_plane_flag : 1 + uint32_t gaps_in_frame_num_value_allowed_flag : 1 + uint32_t qpprime_y_zero_transform_bypass_flag : 1 + uint32_t frame_cropping_flag : 1 + uint32_t seq_scaling_matrix_present_flag : 1 + uint32_t vui_parameters_present_flag : 1 + + + + scaling_list_present_mask has one bit for each + seq_scaling_list_present_flag[i] for SPS OR + pic_scaling_list_present_flag[i] for PPS, + bit 0 - 5 are for each entry of ScalingList4x4 + bit 6 - 11 are for each entry plus 6 for ScalingList8x8 + + uint16_t scaling_list_present_mask + + use_default_scaling_matrix_mask has one bit for each + UseDefaultScalingMatrix4x4Flag[ i ] and + UseDefaultScalingMatrix8x8Flag[ i - 6 ] for SPS OR PPS + bit 0 - 5 are for each entry of ScalingList4x4 + bit 6 - 11 are for each entry plus 6 for ScalingList8x8 + + uint16_t use_default_scaling_matrix_mask + uint8_t ScalingList4x4[STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS] + uint8_t ScalingList8x8[STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS] + + + StdVideoH264SpsFlags flags + StdVideoH264ProfileIdc profile_idc + StdVideoH264LevelIdc level_idc + StdVideoH264ChromaFormatIdc chroma_format_idc + uint8_t seq_parameter_set_id + uint8_t bit_depth_luma_minus8 + uint8_t bit_depth_chroma_minus8 + uint8_t log2_max_frame_num_minus4 + StdVideoH264PocType pic_order_cnt_type + int32_t offset_for_non_ref_pic + int32_t offset_for_top_to_bottom_field + uint8_t log2_max_pic_order_cnt_lsb_minus4 + uint8_t num_ref_frames_in_pic_order_cnt_cycle + uint8_t max_num_ref_frames + uint8_t reserved1Reserved for future use and must be initialized with 0. + uint32_t pic_width_in_mbs_minus1 + uint32_t pic_height_in_map_units_minus1 + uint32_t frame_crop_left_offset + uint32_t frame_crop_right_offset + uint32_t frame_crop_top_offset + uint32_t frame_crop_bottom_offset + uint32_t reserved2Reserved for future use and must be initialized with 0. + + pOffsetForRefFrame is a pointer representing the offset_for_ref_frame array with num_ref_frames_in_pic_order_cnt_cycle number of elements. + If pOffsetForRefFrame has nullptr value, then num_ref_frames_in_pic_order_cnt_cycle must also be "0". + + const int32_t* pOffsetForRefFrame + const StdVideoH264ScalingLists* pScalingListsMust be a valid pointer if seq_scaling_matrix_present_flag is set + const StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVuiMust be a valid pointer if StdVideoH264SpsFlags:vui_parameters_present_flag is set + + + uint32_t transform_8x8_mode_flag : 1 + uint32_t redundant_pic_cnt_present_flag : 1 + uint32_t constrained_intra_pred_flag : 1 + uint32_t deblocking_filter_control_present_flag : 1 + uint32_t weighted_pred_flag : 1 + uint32_t bottom_field_pic_order_in_frame_present_flag : 1 + uint32_t entropy_coding_mode_flag : 1 + uint32_t pic_scaling_matrix_present_flag : 1 + + + StdVideoH264PpsFlags flags + uint8_t seq_parameter_set_id + uint8_t pic_parameter_set_id + uint8_t num_ref_idx_l0_default_active_minus1 + uint8_t num_ref_idx_l1_default_active_minus1 + StdVideoH264WeightedBipredIdc weighted_bipred_idc + int8_t pic_init_qp_minus26 + int8_t pic_init_qs_minus26 + int8_t chroma_qp_index_offset + int8_t second_chroma_qp_index_offset + const StdVideoH264ScalingLists* pScalingListsMust be a valid pointer if StdVideoH264PpsFlags::pic_scaling_matrix_present_flag is set. + + + + + + + + uint32_t field_pic_flag : 1Is field picture + uint32_t is_intra : 1Is intra picture + uint32_t IdrPicFlag : 1instantaneous decoding refresh (IDR) picture + uint32_t bottom_field_flag : 1bottom (true) or top (false) field if field_pic_flag is set. + uint32_t is_reference : 1This only applies to picture info, and not to the DPB lists. + uint32_t complementary_field_pair : 1complementary field pair, complementary non-reference field pair, complementary reference field pair + + + StdVideoDecodeH264PictureInfoFlags flags + uint8_t seq_parameter_set_idSelecting SPS id from the Sequence Parameters Set + uint8_t pic_parameter_set_idSelecting PPS id from the Picture Parameters Set + uint8_t reserved1Reserved for future use and must be initialized with 0. + uint8_t reserved2Reserved for future use and must be initialized with 0. + uint16_t frame_num7.4.3 Slice header semantics + uint16_t idr_pic_id7.4.3 Slice header semantics + + PicOrderCnt is based on TopFieldOrderCnt and BottomFieldOrderCnt. See 8.2.1 Decoding process for picture order count type 0 - 2 + + int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE]TopFieldOrderCnt and BottomFieldOrderCnt fields. + + + uint32_t top_field_flag : 1Reference is used for top field reference. + uint32_t bottom_field_flag : 1Reference is used for bottom field reference. + uint32_t used_for_long_term_reference : 1A picture that is marked as "used for long-term reference", derived binary value from clause 8.2.5.1 Sequence of operations for decoded reference picture marking process + uint32_t is_non_existing : 1Must be handled in accordance with 8.2.5.2: Decoding process for gaps in frame_num + + + StdVideoDecodeH264ReferenceInfoFlags flags + + FrameNum = used_for_long_term_reference ? long_term_frame_idx : frame_num + + uint16_t FrameNum7.4.3.3 Decoded reference picture marking semantics + uint16_t reservedfor structure members 32-bit packing/alignment + int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE]TopFieldOrderCnt and BottomFieldOrderCnt fields. + + + + + uint32_t luma_weight_l0_flageach bit n represents the nth entry in reference list l0, n <= num_ref_idx_l0_active_minus1 + uint32_t chroma_weight_l0_flageach bit n represents the nth entry in reference list l0, n <= num_ref_idx_l0_active_minus1 + uint32_t luma_weight_l1_flageach bit n represents the nth entry in reference list l1, n <= num_ref_idx_l1_active_minus1 + uint32_t chroma_weight_l1_flageach bit n represents the nth entry in reference list l1, n <= num_ref_idx_l1_active_minus1 + + + + + StdVideoEncodeH264WeightTable corresponds to the values produced by pred_weight_table() for the h.264 specification. + For details, refer to weighted_pred_flag, weighted_bipred_idc, pre_pred_weight_table_src and pred_weight_table(). + + StdVideoEncodeH264WeightTableFlags flags + uint8_t luma_log2_weight_denom + uint8_t chroma_log2_weight_denom + int8_t luma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF]valid entry range is [0, num_ref_idx_l0_active_minus1] + int8_t luma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF]valid entry range is [0, num_ref_idx_l0_active_minus1] + int8_t chroma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES][i][j]: valid entry range for i is [0, num_ref_idx_l0_active_minus1]; j = 0 for Cb, j = 1 for Cr + int8_t chroma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES][i][j]: valid entry range for i is [0, num_ref_idx_l0_active_minus1]; j = 0 for Cb, j = 1 for Cr + int8_t luma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF]valid entry range is [0, num_ref_idx_l1_active_minus1] + int8_t luma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF]valid entry range is [0, num_ref_idx_l1_active_minus1] + int8_t chroma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES][i][j]: valid entry range for i is [0, num_ref_idx_l1_active_minus1]; j = 0 for Cb, j = 1 for Cr + int8_t chroma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES][i][j]: valid entry range for i is [0, num_ref_idx_l1_active_minus1]; j = 0 for Cb, j = 1 for Cr + + + + uint32_t direct_spatial_mv_pred_flag : 1 + uint32_t num_ref_idx_active_override_flag : 1 + uint32_t reserved : 30 + + + uint32_t IdrPicFlag : 1 + uint32_t is_reference : 1A reference picture, i.e. a picture with nal_ref_idc not equal to 0, as defined in clause 3.136 + uint32_t no_output_of_prior_pics_flag : 1 + uint32_t long_term_reference_flag : 1 + uint32_t adaptive_ref_pic_marking_mode_flag : 1 + uint32_t reserved : 27 + + + uint32_t used_for_long_term_reference : 1A picture that is marked as "used for long-term reference", derived binary value from clause 8.2.5.1 Sequence of operations for decoded reference picture marking process + uint32_t reserved : 31 + + + uint32_t ref_pic_list_modification_flag_l0 : 1 + uint32_t ref_pic_list_modification_flag_l1 : 1 + uint32_t reserved : 30 + + + StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc + uint16_t abs_diff_pic_num_minus1 + uint16_t long_term_pic_num + + + StdVideoH264MemMgmtControlOp memory_management_control_operation + uint16_t difference_of_pic_nums_minus1 + uint16_t long_term_pic_num + uint16_t long_term_frame_idx + uint16_t max_long_term_frame_idx_plus1 + + + StdVideoEncodeH264ReferenceListsInfoFlags flags + uint8_t num_ref_idx_l0_active_minus1 + uint8_t num_ref_idx_l1_active_minus1 + uint8_t RefPicList0[STD_VIDEO_H264_MAX_NUM_LIST_REF]slotIndex as used in VkVideoReferenceSlotInfoKHR structures or STD_VIDEO_H264_NO_REFERENCE_PICTURE + uint8_t RefPicList1[STD_VIDEO_H264_MAX_NUM_LIST_REF]slotIndex as used in VkVideoReferenceSlotInfoKHR structures or STD_VIDEO_H264_NO_REFERENCE_PICTURE + uint8_t refList0ModOpCount + uint8_t refList1ModOpCount + uint8_t refPicMarkingOpCount + uint8_t reserved1[7]Reserved for future use and must be initialized with 0. + const StdVideoEncodeH264RefListModEntry* pRefList0ModOperationsMust be a valid pointer to an array with size refList0ModOpCount if ref_pic_list_modification_flag_l0 is set and contains the RefList0 modification parameters as defined in section 7.4.3.1 + const StdVideoEncodeH264RefListModEntry* pRefList1ModOperationsMust be a valid pointer to an array with size refList1ModOpCount if ref_pic_list_modification_flag_l1 is set and contains the RefList1 modification parameters as defined in section 7.4.3.1 + const StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperationsMust be a valid pointer to an array with size refPicMarkingOpCount and contains the reference picture markings as defined in section 7.4.3.3 + + + StdVideoEncodeH264PictureInfoFlags flags + uint8_t seq_parameter_set_idSelecting SPS id from the Sequence Parameters Set + uint8_t pic_parameter_set_idSelecting PPS from the Picture Parameters for all StdVideoEncodeH264SliceHeader(s) + uint16_t idr_pic_id + StdVideoH264PictureType primary_pic_type + uint32_t frame_num + int32_t PicOrderCntPicture order count, as defined in 8.2 + uint8_t temporal_idTemporal identifier of the picture, as defined in G.7.3.1.1 / G.7.4.1.1 + uint8_t reserved1[3]Reserved for future use and must be initialized with 0. + const StdVideoEncodeH264ReferenceListsInfo* pRefLists + + + StdVideoEncodeH264ReferenceInfoFlags flags + StdVideoH264PictureType primary_pic_type + uint32_t FrameNumFrame number, as defined in 8.2 + int32_t PicOrderCntPicture order count, as defined in 8.2 + uint16_t long_term_pic_num + uint16_t long_term_frame_idx + uint8_t temporal_idTemporal identifier of the picture, as defined in G.7.3.1.1 / G.7.4.1.1 + + + StdVideoEncodeH264SliceHeaderFlags flags + uint32_t first_mb_in_slice + StdVideoH264SliceType slice_type + int8_t slice_alpha_c0_offset_div2 + int8_t slice_beta_offset_div2 + int8_t slice_qp_delta + uint8_t reserved1Reserved for future use and must be initialized with 0. + StdVideoH264CabacInitIdc cabac_init_idc + StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc + const StdVideoEncodeH264WeightTable* pWeightTable + + + + + + + + + + + + + uint32_t general_tier_flag : 1 + uint32_t general_progressive_source_flag : 1 + uint32_t general_interlaced_source_flag : 1 + uint32_t general_non_packed_constraint_flag : 1 + uint32_t general_frame_only_constraint_flag : 1 + + + StdVideoH265ProfileTierLevelFlags flags + StdVideoH265ProfileIdc general_profile_idc + StdVideoH265LevelIdc general_level_idc + + + uint32_t max_latency_increase_plus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE]represents sps_max_latency_increase_plus1 or vps_max_latency_increase_plus1 + uint8_t max_dec_pic_buffering_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE]represents sps_max_dec_pic_buffering_minus1 or vps_max_dec_pic_buffering_minus1 + uint8_t max_num_reorder_pics[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE]represents sps_max_num_reorder_pics or vps_max_num_reorder_pics + + + uint32_t bit_rate_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE] + uint32_t cpb_size_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE] + uint32_t cpb_size_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE] + uint32_t bit_rate_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE] + uint32_t cbr_flageach bit represents a range of CpbCounts (bit 0 - cpb_cnt_minus1) per sub-layer + + + uint32_t nal_hrd_parameters_present_flag : 1 + uint32_t vcl_hrd_parameters_present_flag : 1 + uint32_t sub_pic_hrd_params_present_flag : 1 + uint32_t sub_pic_cpb_params_in_pic_timing_sei_flag : 1 + uint32_t fixed_pic_rate_general_flag : 8each bit represents a sublayer, bit 0 - vps_max_sub_layers_minus1 + uint32_t fixed_pic_rate_within_cvs_flag : 8each bit represents a sublayer, bit 0 - vps_max_sub_layers_minus1 + uint32_t low_delay_hrd_flag : 8each bit represents a sublayer, bit 0 - vps_max_sub_layers_minus1 + + + StdVideoH265HrdFlags flags + uint8_t tick_divisor_minus2 + uint8_t du_cpb_removal_delay_increment_length_minus1 + uint8_t dpb_output_delay_du_length_minus1 + uint8_t bit_rate_scale + uint8_t cpb_size_scale + uint8_t cpb_size_du_scale + uint8_t initial_cpb_removal_delay_length_minus1 + uint8_t au_cpb_removal_delay_length_minus1 + uint8_t dpb_output_delay_length_minus1 + uint8_t cpb_cnt_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE] + uint16_t elemental_duration_in_tc_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE] + uint16_t reserved[3]Reserved for future use and must be initialized with 0. + const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersNalif flags.nal_hrd_parameters_present_flag is set, then this must be a ptr to an array of StdVideoH265SubLayerHrdParameters with a size specified by sps_max_sub_layers_minus1 + 1 or vps_max_sub_layers_minus1 + 1, depending on whether the HRD parameters are part of the SPS or VPS, respectively. + const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersVclif flags.vcl_hrd_parameters_present_flag is set, then this must be a ptr to an array of StdVideoH265SubLayerHrdParameters with a size specified by sps_max_sub_layers_minus1 + 1 or vps_max_sub_layers_minus1 + 1, depending on whether the HRD parameters are part of the SPS or VPS, respectively. + + + uint32_t vps_temporal_id_nesting_flag : 1 + uint32_t vps_sub_layer_ordering_info_present_flag : 1 + uint32_t vps_timing_info_present_flag : 1 + uint32_t vps_poc_proportional_to_timing_flag : 1 + + + StdVideoH265VpsFlags flags + uint8_t vps_video_parameter_set_id + uint8_t vps_max_sub_layers_minus1 + uint8_t reserved1Reserved for future use and must be initialized with 0. + uint8_t reserved2Reserved for future use and must be initialized with 0. + uint32_t vps_num_units_in_tick + uint32_t vps_time_scale + uint32_t vps_num_ticks_poc_diff_one_minus1 + uint32_t reserved3Reserved for future use and must be initialized with 0. + const StdVideoH265DecPicBufMgr* pDecPicBufMgr + const StdVideoH265HrdParameters* pHrdParameters + const StdVideoH265ProfileTierLevel* pProfileTierLevel + + + uint8_t ScalingList4x4[STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS]ScalingList[ 0 ][ MatrixID ][ i ] (sizeID = 0) + uint8_t ScalingList8x8[STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS]ScalingList[ 1 ][ MatrixID ][ i ] (sizeID = 1) + uint8_t ScalingList16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS]ScalingList[ 2 ][ Matri]xID ][ i ] (sizeID = 2) + uint8_t ScalingList32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS]ScalingList[ 3 ][ MatrixID ][ i ] (sizeID = 3) + uint8_t ScalingListDCCoef16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS]scaling_list_dc_coef_minus8[ sizeID - 2 ][ matrixID ] + 8, sizeID = 2 + uint8_t ScalingListDCCoef32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS]scaling_list_dc_coef_minus8[ sizeID - 2 ][ matrixID ] + 8. sizeID = 3 + + + uint32_t inter_ref_pic_set_prediction_flag : 1 + uint32_t delta_rps_sign : 1 + + + StdVideoH265ShortTermRefPicSetFlags flags + uint32_t delta_idx_minus1 + uint16_t use_delta_flageach bit represents a use_delta_flag[j] syntax + uint16_t abs_delta_rps_minus1 + uint16_t used_by_curr_pic_flageach bit represents a used_by_curr_pic_flag[j] syntax + uint16_t used_by_curr_pic_s0_flageach bit represents a used_by_curr_pic_s0_flag[i] syntax + uint16_t used_by_curr_pic_s1_flageach bit represents a used_by_curr_pic_s1_flag[i] syntax + uint16_t reserved1Reserved for future use and must be initialized with 0. + uint8_t reserved2Reserved for future use and must be initialized with 0. + uint8_t reserved3Reserved for future use and must be initialized with 0. + uint8_t num_negative_pics + uint8_t num_positive_pics + uint16_t delta_poc_s0_minus1[STD_VIDEO_H265_MAX_DPB_SIZE] + uint16_t delta_poc_s1_minus1[STD_VIDEO_H265_MAX_DPB_SIZE] + + + uint32_t used_by_curr_pic_lt_sps_flageach bit represents a used_by_curr_pic_lt_sps_flag[i] syntax + uint32_t lt_ref_pic_poc_lsb_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS] + + + uint32_t aspect_ratio_info_present_flag : 1 + uint32_t overscan_info_present_flag : 1 + uint32_t overscan_appropriate_flag : 1 + uint32_t video_signal_type_present_flag : 1 + uint32_t video_full_range_flag : 1 + uint32_t colour_description_present_flag : 1 + uint32_t chroma_loc_info_present_flag : 1 + uint32_t neutral_chroma_indication_flag : 1 + uint32_t field_seq_flag : 1 + uint32_t frame_field_info_present_flag : 1 + uint32_t default_display_window_flag : 1 + uint32_t vui_timing_info_present_flag : 1 + uint32_t vui_poc_proportional_to_timing_flag : 1 + uint32_t vui_hrd_parameters_present_flag : 1 + uint32_t bitstream_restriction_flag : 1 + uint32_t tiles_fixed_structure_flag : 1 + uint32_t motion_vectors_over_pic_boundaries_flag : 1 + uint32_t restricted_ref_pic_lists_flag : 1 + + + StdVideoH265SpsVuiFlags flags + StdVideoH265AspectRatioIdc aspect_ratio_idc + uint16_t sar_width + uint16_t sar_height + uint8_t video_format + uint8_t colour_primaries + uint8_t transfer_characteristics + uint8_t matrix_coeffs + uint8_t chroma_sample_loc_type_top_field + uint8_t chroma_sample_loc_type_bottom_field + uint8_t reserved1Reserved for future use and must be initialized with 0. + uint8_t reserved2Reserved for future use and must be initialized with 0. + uint16_t def_disp_win_left_offset + uint16_t def_disp_win_right_offset + uint16_t def_disp_win_top_offset + uint16_t def_disp_win_bottom_offset + uint32_t vui_num_units_in_tick + uint32_t vui_time_scale + uint32_t vui_num_ticks_poc_diff_one_minus1 + uint16_t min_spatial_segmentation_idc + uint16_t reserved3Reserved for future use and must be initialized with 0. + uint8_t max_bytes_per_pic_denom + uint8_t max_bits_per_min_cu_denom + uint8_t log2_max_mv_length_horizontal + uint8_t log2_max_mv_length_vertical + const StdVideoH265HrdParameters* pHrdParameters + + + uint16_t PredictorPaletteEntries[STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE][STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE] + + + uint32_t sps_temporal_id_nesting_flag : 1 + uint32_t separate_colour_plane_flag : 1 + uint32_t conformance_window_flag : 1 + uint32_t sps_sub_layer_ordering_info_present_flag : 1 + uint32_t scaling_list_enabled_flag : 1 + uint32_t sps_scaling_list_data_present_flag : 1 + uint32_t amp_enabled_flag : 1 + uint32_t sample_adaptive_offset_enabled_flag : 1 + uint32_t pcm_enabled_flag : 1 + uint32_t pcm_loop_filter_disabled_flag : 1 + uint32_t long_term_ref_pics_present_flag : 1 + uint32_t sps_temporal_mvp_enabled_flag : 1 + uint32_t strong_intra_smoothing_enabled_flag : 1 + uint32_t vui_parameters_present_flag : 1 + uint32_t sps_extension_present_flag : 1 + uint32_t sps_range_extension_flag : 1 + + extension SPS flags, valid when STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS is set + + uint32_t transform_skip_rotation_enabled_flag : 1 + uint32_t transform_skip_context_enabled_flag : 1 + uint32_t implicit_rdpcm_enabled_flag : 1 + uint32_t explicit_rdpcm_enabled_flag : 1 + uint32_t extended_precision_processing_flag : 1 + uint32_t intra_smoothing_disabled_flag : 1 + uint32_t high_precision_offsets_enabled_flag : 1 + uint32_t persistent_rice_adaptation_enabled_flag : 1 + uint32_t cabac_bypass_alignment_enabled_flag : 1 + + extension SPS flags, valid when STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS is set + + uint32_t sps_scc_extension_flag : 1 + uint32_t sps_curr_pic_ref_enabled_flag : 1 + uint32_t palette_mode_enabled_flag : 1 + uint32_t sps_palette_predictor_initializers_present_flag : 1 + uint32_t intra_boundary_filtering_disabled_flag : 1 + + + StdVideoH265SpsFlags flags + StdVideoH265ChromaFormatIdc chroma_format_idc + uint32_t pic_width_in_luma_samples + uint32_t pic_height_in_luma_samples + uint8_t sps_video_parameter_set_id + uint8_t sps_max_sub_layers_minus1 + uint8_t sps_seq_parameter_set_id + uint8_t bit_depth_luma_minus8 + uint8_t bit_depth_chroma_minus8 + uint8_t log2_max_pic_order_cnt_lsb_minus4 + uint8_t log2_min_luma_coding_block_size_minus3 + uint8_t log2_diff_max_min_luma_coding_block_size + uint8_t log2_min_luma_transform_block_size_minus2 + uint8_t log2_diff_max_min_luma_transform_block_size + uint8_t max_transform_hierarchy_depth_inter + uint8_t max_transform_hierarchy_depth_intra + uint8_t num_short_term_ref_pic_sets + uint8_t num_long_term_ref_pics_sps + uint8_t pcm_sample_bit_depth_luma_minus1 + uint8_t pcm_sample_bit_depth_chroma_minus1 + uint8_t log2_min_pcm_luma_coding_block_size_minus3 + uint8_t log2_diff_max_min_pcm_luma_coding_block_size + uint8_t reserved1Reserved for future use and must be initialized with 0. + uint8_t reserved2Reserved for future use and must be initialized with 0. + + Start extension SPS flags, valid when STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS is set + + uint8_t palette_max_size + uint8_t delta_palette_max_predictor_size + uint8_t motion_vector_resolution_control_idc + uint8_t sps_num_palette_predictor_initializers_minus1 + + End extension SPS flags, valid when STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS is set + + uint32_t conf_win_left_offset + uint32_t conf_win_right_offset + uint32_t conf_win_top_offset + uint32_t conf_win_bottom_offset + const StdVideoH265ProfileTierLevel* pProfileTierLevel + const StdVideoH265DecPicBufMgr* pDecPicBufMgr + const StdVideoH265ScalingLists* pScalingListsMust be a valid pointer if sps_scaling_list_data_present_flag is set + const StdVideoH265ShortTermRefPicSet* pShortTermRefPicSetMust be a valid pointer to an array with size num_short_term_ref_pic_sets if num_short_term_ref_pic_sets is not 0. + const StdVideoH265LongTermRefPicsSps* pLongTermRefPicsSpsMust be a valid pointer if long_term_ref_pics_present_flag is set + const StdVideoH265SequenceParameterSetVui* pSequenceParameterSetVuiMust be a valid pointer if StdVideoH265SpsFlags:vui_parameters_present_flag is set palette_max_size + const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntriesMust be a valid pointer if sps_palette_predictor_initializer_present_flag is set + + + uint32_t dependent_slice_segments_enabled_flag : 1 + uint32_t output_flag_present_flag : 1 + uint32_t sign_data_hiding_enabled_flag : 1 + uint32_t cabac_init_present_flag : 1 + uint32_t constrained_intra_pred_flag : 1 + uint32_t transform_skip_enabled_flag : 1 + uint32_t cu_qp_delta_enabled_flag : 1 + uint32_t pps_slice_chroma_qp_offsets_present_flag : 1 + uint32_t weighted_pred_flag : 1 + uint32_t weighted_bipred_flag : 1 + uint32_t transquant_bypass_enabled_flag : 1 + uint32_t tiles_enabled_flag : 1 + uint32_t entropy_coding_sync_enabled_flag : 1 + uint32_t uniform_spacing_flag : 1 + uint32_t loop_filter_across_tiles_enabled_flag : 1 + uint32_t pps_loop_filter_across_slices_enabled_flag : 1 + uint32_t deblocking_filter_control_present_flag : 1 + uint32_t deblocking_filter_override_enabled_flag : 1 + uint32_t pps_deblocking_filter_disabled_flag : 1 + uint32_t pps_scaling_list_data_present_flag : 1 + uint32_t lists_modification_present_flag : 1 + uint32_t slice_segment_header_extension_present_flag : 1 + uint32_t pps_extension_present_flag : 1 + + extension PPS flags, valid when STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS is set + + uint32_t cross_component_prediction_enabled_flag : 1 + uint32_t chroma_qp_offset_list_enabled_flag : 1 + + extension PPS flags, valid when STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS is set + + uint32_t pps_curr_pic_ref_enabled_flag : 1 + uint32_t residual_adaptive_colour_transform_enabled_flag : 1 + uint32_t pps_slice_act_qp_offsets_present_flag : 1 + uint32_t pps_palette_predictor_initializers_present_flag : 1 + uint32_t monochrome_palette_flag : 1 + uint32_t pps_range_extension_flag : 1 + + + StdVideoH265PpsFlags flags + uint8_t pps_pic_parameter_set_id + uint8_t pps_seq_parameter_set_id + uint8_t sps_video_parameter_set_id + uint8_t num_extra_slice_header_bits + uint8_t num_ref_idx_l0_default_active_minus1 + uint8_t num_ref_idx_l1_default_active_minus1 + int8_t init_qp_minus26 + uint8_t diff_cu_qp_delta_depth + int8_t pps_cb_qp_offset + int8_t pps_cr_qp_offset + int8_t pps_beta_offset_div2 + int8_t pps_tc_offset_div2 + uint8_t log2_parallel_merge_level_minus2 + + extension PPS, valid when STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS is set + + uint8_t log2_max_transform_skip_block_size_minus2 + uint8_t diff_cu_chroma_qp_offset_depth + uint8_t chroma_qp_offset_list_len_minus1 + int8_t cb_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE] + int8_t cr_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE] + uint8_t log2_sao_offset_scale_luma + uint8_t log2_sao_offset_scale_chroma + + extension PPS, valid when STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS is set + + int8_t pps_act_y_qp_offset_plus5 + int8_t pps_act_cb_qp_offset_plus5 + int8_t pps_act_cr_qp_offset_plus3 + uint8_t pps_num_palette_predictor_initializers + uint8_t luma_bit_depth_entry_minus8 + uint8_t chroma_bit_depth_entry_minus8 + uint8_t num_tile_columns_minus1 + uint8_t num_tile_rows_minus1 + uint8_t reserved1Reserved for future use and must be initialized with 0. + uint8_t reserved2Reserved for future use and must be initialized with 0. + uint16_t column_width_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE] + uint16_t row_height_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE] + uint32_t reserved3Reserved for future use and must be initialized with 0. + const StdVideoH265ScalingLists* pScalingListsMust be a valid pointer if pps_scaling_list_data_present_flag is set + const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntriesMust be a valid pointer if pps_palette_predictor_initializer_present_flag is set + + + + + uint32_t IrapPicFlag : 1 + uint32_t IdrPicFlag : 1 + uint32_t IsReference : 1 + uint32_t short_term_ref_pic_set_sps_flag : 1 + + + StdVideoDecodeH265PictureInfoFlags flags + uint8_t sps_video_parameter_set_idSelecting VPS id from the Video Parameters Set + uint8_t pps_seq_parameter_set_idSelecting SPS id from the Sequence Parameters Set + uint8_t pps_pic_parameter_set_idSelecting PPS id from the Picture Parameters Set + uint8_t NumDeltaPocsOfRefRpsIdxNumDeltaPocs[ RefRpsIdx ] when short_term_ref_pic_set_sps_flag = 1, otherwise 0 + int32_t PicOrderCntVal + uint16_t NumBitsForSTRefPicSetInSlicenumber of bits used in st_ref_pic_set() when short_term_ref_pic_set_sps_flag is 0otherwise set to 0. + uint16_t reserved + uint8_t RefPicSetStCurrBefore[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE]slotIndex as used in VkVideoReferenceSlotInfoKHR structures representing pReferenceSlots in VkVideoDecodeInfoKHR or STD_VIDEO_H265_NO_REFERENCE_PICTURE + uint8_t RefPicSetStCurrAfter[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE]slotIndex as used in VkVideoReferenceSlotInfoKHR structures representing pReferenceSlots in VkVideoDecodeInfoKHR or STD_VIDEO_H265_NO_REFERENCE_PICTURE + uint8_t RefPicSetLtCurr[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE]slotIndex as used in VkVideoReferenceSlotInfoKHR structures representing pReferenceSlots in VkVideoDecodeInfoKHR or STD_VIDEO_H265_NO_REFERENCE_PICTURE + + + uint32_t used_for_long_term_reference : 1A picture that is marked as "used for long-term reference", derived binary value from clause 8.3.2 Decoding process for reference picture set + uint32_t unused_for_reference : 1A picture that is marked as "unused for reference", derived binary value from clause 8.3.2 Decoding process for reference picture set + + + StdVideoDecodeH265ReferenceInfoFlags flags + int32_t PicOrderCntVal + + + + + uint16_t luma_weight_l0_flageach bit n represents the nth entry in reference list l0, n <= num_ref_idx_l0_active_minus1 + uint16_t chroma_weight_l0_flageach bit n represents the nth entry in reference list l0, n <= num_ref_idx_l0_active_minus1 + uint16_t luma_weight_l1_flageach bit n represents the nth entry in reference list l1, n <= num_ref_idx_l1_active_minus1 + uint16_t chroma_weight_l1_flageach bit n represents the nth entry in reference list l1, n <= num_ref_idx_l1_active_minus1 + + + + + StdVideoEncodeH265WeightTable corresponds to the values produced by pred_weight_table() for the h.265 specification. + For details, refer to weighted_pred_flag, weighted_bipred_flag and pred_weight_table(). + + StdVideoEncodeH265WeightTableFlags flags + uint8_t luma_log2_weight_denom[0, 7] + int8_t delta_chroma_log2_weight_denom + int8_t delta_luma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF]comment + int8_t luma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF]comment + int8_t delta_chroma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES][i][j]: valid entry range for i is [0, num_ref_idx_l0_active_minus1]; j = 0 for Cb, j = 1 for Cr + int8_t delta_chroma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES][i][j]: valid entry range for i is [0, num_ref_idx_l0_active_minus1]; j = 0 for Cb, j = 1 for Cr + int8_t delta_luma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF] + int8_t luma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF] + int8_t delta_chroma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES][i][j]: valid entry range for i is [0, num_ref_idx_l1_active_minus1]; j = 0 for Cb, j = 1 for Cr + int8_t delta_chroma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES][i][j]: valid entry range for i is [0, num_ref_idx_l1_active_minus1]; j = 0 for Cb, j = 1 for Cr + + + + uint8_t num_long_term_sps + uint8_t num_long_term_pics + uint8_t lt_idx_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS] + uint8_t poc_lsb_lt[STD_VIDEO_H265_MAX_LONG_TERM_PICS] + uint16_t used_by_curr_pic_lt_flageach bit represents a used_by_curr_pic_lt_flag[i] syntax + uint8_t delta_poc_msb_present_flag[STD_VIDEO_H265_MAX_DELTA_POC] + uint8_t delta_poc_msb_cycle_lt[STD_VIDEO_H265_MAX_DELTA_POC] + + + + uint32_t first_slice_segment_in_pic_flag : 1 + uint32_t dependent_slice_segment_flag : 1 + uint32_t slice_sao_luma_flag : 1 + uint32_t slice_sao_chroma_flag : 1 + uint32_t num_ref_idx_active_override_flag : 1 + uint32_t mvd_l1_zero_flag : 1 + uint32_t cabac_init_flag : 1 + uint32_t cu_chroma_qp_offset_enabled_flag : 1 + uint32_t deblocking_filter_override_flag : 1 + uint32_t slice_deblocking_filter_disabled_flag : 1 + uint32_t collocated_from_l0_flag : 1 + uint32_t slice_loop_filter_across_slices_enabled_flag : 1 + uint32_t reserved : 20 + + + StdVideoEncodeH265SliceSegmentHeaderFlags flags + StdVideoH265SliceType slice_type + uint32_t slice_segment_address + uint8_t collocated_ref_idx + uint8_t MaxNumMergeCand + int8_t slice_cb_qp_offset[-12, 12] + int8_t slice_cr_qp_offset[-12, 12] + int8_t slice_beta_offset_div2[-6, 6] + int8_t slice_tc_offset_div2[-6, 6] + int8_t slice_act_y_qp_offset + int8_t slice_act_cb_qp_offset + int8_t slice_act_cr_qp_offset + int8_t slice_qp_delta + uint16_t reserved1Reserved for future use and must be initialized with 0. + const StdVideoEncodeH265WeightTable* pWeightTable + + + uint32_t ref_pic_list_modification_flag_l0 : 1 + uint32_t ref_pic_list_modification_flag_l1 : 1 + uint32_t reserved : 30 + + + StdVideoEncodeH265ReferenceListsInfoFlags flags + uint8_t num_ref_idx_l0_active_minus1 + uint8_t num_ref_idx_l1_active_minus1 + uint8_t RefPicList0[STD_VIDEO_H265_MAX_NUM_LIST_REF]slotIndex as used in VkVideoReferenceSlotInfoKHR structures or STD_VIDEO_H265_NO_REFERENCE_PICTURE + uint8_t RefPicList1[STD_VIDEO_H265_MAX_NUM_LIST_REF]slotIndex as used in VkVideoReferenceSlotInfoKHR structures or STD_VIDEO_H265_NO_REFERENCE_PICTURE + uint8_t list_entry_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF] + uint8_t list_entry_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF] + + + uint32_t is_reference : 1A reference picture, as defined in clause 3.132 + uint32_t IrapPicFlag : 1A reference picture, as defined in clause 3.73 + uint32_t used_for_long_term_reference : 1A picture that is marked as "used for long-term reference", derived binary value from clause 8.3.2 Decoding process for reference picture set + uint32_t discardable_flag : 1 + uint32_t cross_layer_bla_flag : 1 + uint32_t pic_output_flag : 1 + uint32_t no_output_of_prior_pics_flag : 1 + uint32_t short_term_ref_pic_set_sps_flag : 1 + uint32_t slice_temporal_mvp_enabled_flag : 1 + uint32_t reserved : 23 + + + StdVideoEncodeH265PictureInfoFlags flags + StdVideoH265PictureType pic_type + uint8_t sps_video_parameter_set_idSelecting VPS id from the Video Parameters Set + uint8_t pps_seq_parameter_set_idSelecting SPS id from the Sequence Parameters Set + uint8_t pps_pic_parameter_set_idSelecting PPS id from the Picture Parameters Set + uint8_t short_term_ref_pic_set_idx + int32_t PicOrderCntValPicture order count derived as specified in 8.3.1 + uint8_t TemporalIdTemporal ID, as defined in 7.4.2.2 + uint8_t reserved1[7]Reserved for future use and must be initialized with 0. + const StdVideoEncodeH265ReferenceListsInfo* pRefLists + const StdVideoH265ShortTermRefPicSet* pShortTermRefPicSetMust be a valid pointer if short_term_ref_pic_set_sps_flag is not set + const StdVideoEncodeH265LongTermRefPics* pLongTermRefPicsMust be a valid pointer if long_term_ref_pics_present_flag is set + + + uint32_t used_for_long_term_reference : 1A picture that is marked as "used for long-term reference", derived binary value from clause 8.3.2 Decoding process for reference picture set + uint32_t unused_for_reference : 1A picture that is marked as "unused for reference", derived binary value from clause 8.3.2 Decoding process for reference picture set + uint32_t reserved : 30 + + + + StdVideoEncodeH265ReferenceInfoFlags flags + StdVideoH265PictureType pic_type + int32_t PicOrderCntValPicture order count derived as specified in 8.3.1 + uint8_t TemporalIdTemporal ID, as defined in 7.4.2.2 + + + + + + + + + + + + + + + + + Syntax defined in section 5.5.2, semantics defined in section 6.4.2 + uint32_t mono_chrome : 1 + uint32_t color_range : 1 + uint32_t separate_uv_delta_q : 1 + uint32_t color_description_present_flag : 1 + uint32_t reserved : 28 + + + Syntax defined in section 5.5.2, semantics defined in section 6.4.2 + StdVideoAV1ColorConfigFlags flags + uint8_t BitDepth + uint8_t subsampling_x + uint8_t subsampling_y + uint8_t reserved1Reserved for future use and must be initialized with 0. + StdVideoAV1ColorPrimaries color_primaries + StdVideoAV1TransferCharacteristics transfer_characteristics + StdVideoAV1MatrixCoefficients matrix_coefficients + StdVideoAV1ChromaSamplePosition chroma_sample_position + + + Syntax defined in section 5.5.3, semantics defined in section 6.4.3 + uint32_t equal_picture_interval : 1 + uint32_t reserved : 31 + + + Syntax defined in section 5.5.3, semantics defined in section 6.4.3 + StdVideoAV1TimingInfoFlags flags + uint32_t num_units_in_display_tick + uint32_t time_scale + uint32_t num_ticks_per_picture_minus_1 + + + Syntax defined in section 5.5, semantics defined in section 6.4 + uint32_t still_picture : 1 + uint32_t reduced_still_picture_header : 1 + uint32_t use_128x128_superblock : 1 + uint32_t enable_filter_intra : 1 + uint32_t enable_intra_edge_filter : 1 + uint32_t enable_interintra_compound : 1 + uint32_t enable_masked_compound : 1 + uint32_t enable_warped_motion : 1 + uint32_t enable_dual_filter : 1 + uint32_t enable_order_hint : 1 + uint32_t enable_jnt_comp : 1 + uint32_t enable_ref_frame_mvs : 1 + uint32_t frame_id_numbers_present_flag : 1 + uint32_t enable_superres : 1 + uint32_t enable_cdef : 1 + uint32_t enable_restoration : 1 + uint32_t film_grain_params_present : 1 + uint32_t timing_info_present_flag : 1 + uint32_t initial_display_delay_present_flag : 1 + uint32_t reserved : 13 + + + Syntax defined in section 5.5, semantics defined in section 6.4 + StdVideoAV1SequenceHeaderFlags flags + StdVideoAV1Profile seq_profile + uint8_t frame_width_bits_minus_1 + uint8_t frame_height_bits_minus_1 + uint16_t max_frame_width_minus_1 + uint16_t max_frame_height_minus_1 + uint8_t delta_frame_id_length_minus_2 + uint8_t additional_frame_id_length_minus_1 + uint8_t order_hint_bits_minus_1 + uint8_t seq_force_integer_mvThe final value of of seq_force_integer_mv per the value of seq_choose_integer_mv. + uint8_t seq_force_screen_content_toolsThe final value of of seq_force_screen_content_tools per the value of seq_choose_screen_content_tools. + uint8_t reserved1[5]Reserved for future use and must be initialized with 0. + const StdVideoAV1ColorConfig* pColorConfig + const StdVideoAV1TimingInfo* pTimingInfo + + + Syntax defined in section 5.9.11, semantics defined in section 6.8.10 + uint32_t loop_filter_delta_enabled : 1 + uint32_t loop_filter_delta_update : 1 + uint32_t reserved : 30 + + + Syntax defined in section 5.9.11, semantics defined in section 6.8.10 + StdVideoAV1LoopFilterFlags flags + uint8_t loop_filter_level[STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS] + uint8_t loop_filter_sharpness + uint8_t update_ref_delta + int8_t loop_filter_ref_deltas[STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME] + uint8_t update_mode_delta + int8_t loop_filter_mode_deltas[STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS] + + + Syntax defined in section 5.9.12, semantics defined in section 6.8.11 + uint32_t using_qmatrix : 1 + uint32_t diff_uv_delta : 1 + uint32_t reserved : 30 + + + Syntax defined in section 5.9.12, semantics defined in section 6.8.11 + StdVideoAV1QuantizationFlags flags + uint8_t base_q_idx + int8_t DeltaQYDc + int8_t DeltaQUDc + int8_t DeltaQUAc + int8_t DeltaQVDc + int8_t DeltaQVAc + uint8_t qm_y + uint8_t qm_u + uint8_t qm_v + + + Syntax defined in section 5.9.14, semantics defined in section 6.8.13 + uint8_t FeatureEnabled[STD_VIDEO_AV1_MAX_SEGMENTS]Each element contains 8 (SEG_LVL_MAX) bits, one bit for each feature within the segment + int16_t FeatureData[STD_VIDEO_AV1_MAX_SEGMENTS][STD_VIDEO_AV1_SEG_LVL_MAX] + + + Syntax defined in section 5.9.15, semantics defined in section 6.8.14 + uint32_t uniform_tile_spacing_flag : 1 + uint32_t reserved : 31 + + + Syntax defined in section 5.9.15, semantics defined in section 6.8.14 + StdVideoAV1TileInfoFlags flags + uint8_t TileCols + uint8_t TileRows + uint16_t context_update_tile_id + uint8_t tile_size_bytes_minus_1 + uint8_t reserved1[7]Reserved for future use and must be initialized with 0. + const uint16_t* pMiColStartsTileCols number of elements + const uint16_t* pMiRowStartsTileRows number of elements + const uint16_t* pWidthInSbsMinus1TileCols number of elements + const uint16_t* pHeightInSbsMinus1TileRows number of elements + + + Syntax defined in section 5.9.19, semantics defined in section 6.10.14 + uint8_t cdef_damping_minus_3 + uint8_t cdef_bits + uint8_t cdef_y_pri_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS] + uint8_t cdef_y_sec_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS] + uint8_t cdef_uv_pri_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS] + uint8_t cdef_uv_sec_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS] + + + Syntax defined in section 5.9.20, semantics defined in section 6.10.15 + StdVideoAV1FrameRestorationType FrameRestorationType[STD_VIDEO_AV1_MAX_NUM_PLANES] + uint16_t LoopRestorationSize[STD_VIDEO_AV1_MAX_NUM_PLANES] + + + Syntax defined in section 5.9.24, semantics defined in section 7.10 + uint8_t GmType[STD_VIDEO_AV1_NUM_REF_FRAMES] + int32_t gm_params[STD_VIDEO_AV1_NUM_REF_FRAMES][STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS] + + + Syntax defined in section 5.9.30, semantics defined in section 6.8.20 + uint32_t chroma_scaling_from_luma : 1 + uint32_t overlap_flag : 1 + uint32_t clip_to_restricted_range : 1 + uint32_t update_grain : 1 + uint32_t reserved : 28 + + + Syntax defined in section 5.9.30, semantics defined in section 6.8.20 + StdVideoAV1FilmGrainFlags flags + uint8_t grain_scaling_minus_8 + uint8_t ar_coeff_lag + uint8_t ar_coeff_shift_minus_6 + uint8_t grain_scale_shift + uint16_t grain_seed + uint8_t film_grain_params_ref_idx + uint8_t num_y_points + uint8_t point_y_value[STD_VIDEO_AV1_MAX_NUM_Y_POINTS] + uint8_t point_y_scaling[STD_VIDEO_AV1_MAX_NUM_Y_POINTS] + uint8_t num_cb_points + uint8_t point_cb_value[STD_VIDEO_AV1_MAX_NUM_CB_POINTS] + uint8_t point_cb_scaling[STD_VIDEO_AV1_MAX_NUM_CB_POINTS] + uint8_t num_cr_points + uint8_t point_cr_value[STD_VIDEO_AV1_MAX_NUM_CR_POINTS] + uint8_t point_cr_scaling[STD_VIDEO_AV1_MAX_NUM_CR_POINTS] + int8_t ar_coeffs_y_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_LUMA] + int8_t ar_coeffs_cb_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_CHROMA] + int8_t ar_coeffs_cr_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_CHROMA] + uint8_t cb_mult + uint8_t cb_luma_mult + uint16_t cb_offset + uint8_t cr_mult + uint8_t cr_luma_mult + uint16_t cr_offset + + + Syntax defined in section 5.9, semantics defined in section 6.8 + uint32_t error_resilient_mode : 1 + uint32_t disable_cdf_update : 1 + uint32_t use_superres : 1 + uint32_t render_and_frame_size_different : 1 + uint32_t allow_screen_content_tools : 1 + uint32_t is_filter_switchable : 1 + uint32_t force_integer_mv : 1 + uint32_t frame_size_override_flag : 1 + uint32_t buffer_removal_time_present_flag : 1 + uint32_t allow_intrabc : 1 + uint32_t frame_refs_short_signaling : 1 + uint32_t allow_high_precision_mv : 1 + uint32_t is_motion_mode_switchable : 1 + uint32_t use_ref_frame_mvs : 1 + uint32_t disable_frame_end_update_cdf : 1 + uint32_t allow_warped_motion : 1 + uint32_t reduced_tx_set : 1 + uint32_t reference_select : 1 + uint32_t skip_mode_present : 1 + uint32_t delta_q_present : 1 + uint32_t delta_lf_present : 1 + uint32_t delta_lf_multi : 1 + uint32_t segmentation_enabled : 1 + uint32_t segmentation_update_map : 1 + uint32_t segmentation_temporal_update : 1 + uint32_t segmentation_update_data : 1 + uint32_t UsesLr : 1 + uint32_t usesChromaLr : 1 + uint32_t apply_grain : 1 + uint32_t reserved : 3 + + + Syntax defined in sections 5.9 and 5.11.1, semantics defined in sections 6.8 and 6.10.1 + StdVideoDecodeAV1PictureInfoFlags flags + StdVideoAV1FrameType frame_type + uint32_t current_frame_id + uint8_t OrderHint + uint8_t primary_ref_frame + uint8_t refresh_frame_flags + uint8_t reserved1Reserved for future use and must be initialized with 0. + StdVideoAV1InterpolationFilter interpolation_filter + StdVideoAV1TxMode TxMode + uint8_t delta_q_res + uint8_t delta_lf_res + uint8_t SkipModeFrame[STD_VIDEO_AV1_SKIP_MODE_FRAMES] + uint8_t coded_denom + uint8_t reserved2[3]Reserved for future use and must be initialized with 0. + uint8_t OrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES] + uint32_t expectedFrameId[STD_VIDEO_AV1_NUM_REF_FRAMES] + const StdVideoAV1TileInfo* pTileInfo + const StdVideoAV1Quantization* pQuantization + const StdVideoAV1Segmentation* pSegmentation + const StdVideoAV1LoopFilter* pLoopFilter + const StdVideoAV1CDEF* pCDEF + const StdVideoAV1LoopRestoration* pLoopRestoration + const StdVideoAV1GlobalMotion* pGlobalMotion + const StdVideoAV1FilmGrain* pFilmGrain + + + uint32_t disable_frame_end_update_cdf : 1 + uint32_t segmentation_enabled : 1 + uint32_t reserved : 30 + + + StdVideoDecodeAV1ReferenceInfoFlags flags + uint8_t frame_type + uint8_t RefFrameSignBias + uint8_t OrderHint + uint8_t SavedOrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES] + + + Syntax defined in section 5.3.3, semantics defined in section 6.2.3 + uint8_t temporal_id + uint8_t spatial_id + + + uint8_t buffer_delay_length_minus_1 + uint8_t buffer_removal_time_length_minus_1 + uint8_t frame_presentation_time_length_minus_1 + uint8_t reserved1Reserved for future use and must be initialized with 0. + uint32_t num_units_in_decoding_tick + + + uint32_t decoder_model_present_for_this_op : 1 + uint32_t low_delay_mode_flag : 1 + uint32_t initial_display_delay_present_for_this_op : 1 + uint32_t reserved : 29 + + + StdVideoEncodeAV1OperatingPointInfoFlags flags + uint16_t operating_point_idc + uint8_t seq_level_idx + uint8_t seq_tier + uint32_t decoder_buffer_delay + uint32_t encoder_buffer_delay + uint8_t initial_display_delay_minus_1 + + + Syntax defined in section 5.9, semantics defined in section 6.8 + uint32_t error_resilient_mode : 1 + uint32_t disable_cdf_update : 1 + uint32_t use_superres : 1 + uint32_t render_and_frame_size_different : 1 + uint32_t allow_screen_content_tools : 1 + uint32_t is_filter_switchable : 1 + uint32_t force_integer_mv : 1 + uint32_t frame_size_override_flag : 1 + uint32_t buffer_removal_time_present_flag : 1 + uint32_t allow_intrabc : 1 + uint32_t frame_refs_short_signaling : 1 + uint32_t allow_high_precision_mv : 1 + uint32_t is_motion_mode_switchable : 1 + uint32_t use_ref_frame_mvs : 1 + uint32_t disable_frame_end_update_cdf : 1 + uint32_t allow_warped_motion : 1 + uint32_t reduced_tx_set : 1 + uint32_t skip_mode_present : 1 + uint32_t delta_q_present : 1 + uint32_t delta_lf_present : 1 + uint32_t delta_lf_multi : 1 + uint32_t segmentation_enabled : 1 + uint32_t segmentation_update_map : 1 + uint32_t segmentation_temporal_update : 1 + uint32_t segmentation_update_data : 1 + uint32_t UsesLr : 1 + uint32_t usesChromaLr : 1 + uint32_t show_frame : 1 + uint32_t showable_frame : 1 + uint32_t reserved : 3 + + + Syntax defined in sections 5.9 and 5.11.1, semantics defined in sections 6.8 and 6.10.1 + StdVideoEncodeAV1PictureInfoFlags flags + StdVideoAV1FrameType frame_type + uint32_t frame_presentation_time + uint32_t current_frame_id + uint8_t order_hint + uint8_t primary_ref_frame + uint8_t refresh_frame_flags + uint8_t coded_denom + uint16_t render_width_minus_1 + uint16_t render_height_minus_1 + StdVideoAV1InterpolationFilter interpolation_filter + StdVideoAV1TxMode TxMode + uint8_t delta_q_res + uint8_t delta_lf_res + uint8_t ref_order_hint[STD_VIDEO_AV1_NUM_REF_FRAMES] + int8_t ref_frame_idx[STD_VIDEO_AV1_REFS_PER_FRAME] + uint8_t reserved1[3]Reserved for future use and must be initialized with 0. + uint32_t delta_frame_id_minus_1[STD_VIDEO_AV1_REFS_PER_FRAME] + const StdVideoAV1TileInfo* pTileInfo + const StdVideoAV1Quantization* pQuantization + const StdVideoAV1Segmentation* pSegmentation + const StdVideoAV1LoopFilter* pLoopFilter + const StdVideoAV1CDEF* pCDEF + const StdVideoAV1LoopRestoration* pLoopRestoration + const StdVideoAV1GlobalMotion* pGlobalMotion + const StdVideoEncodeAV1ExtensionHeader* pExtensionHeader + const uint32_t* pBufferRemovalTimes + + + + uint32_t disable_frame_end_update_cdf : 1 + uint32_t segmentation_enabled : 1 + uint32_t reserved : 30 + + + StdVideoEncodeAV1ReferenceInfoFlags flags + uint32_t RefFrameId + StdVideoAV1FrameType frame_type + uint8_t OrderHint + uint8_t reserved1[3]Reserved for future use and must be initialized with 0. + const StdVideoEncodeAV1ExtensionHeader* pExtensionHeader + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + reserved STD_VIDEO_H264_SLICE_TYPE_SP = 3 + reserved STD_VIDEO_H264_SLICE_TYPE_SI = 4 + + + + + + + + + reserved STD_VIDEO_H264_PICTURE_TYPE_SP = 3 + reserved STD_VIDEO_H264_PICTURE_TYPE_SI = 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generators/vulkan/src/main/resources/vk.xml b/generators/vulkan/src/main/resources/vk.xml index 9a7cfb46..12f5551a 100644 --- a/generators/vulkan/src/main/resources/vk.xml +++ b/generators/vulkan/src/main/resources/vk.xml @@ -39,8 +39,8 @@ branch of the member gitlab server. - - + + @@ -55,19 +55,19 @@ branch of the member gitlab server. - + - - - + + + - - + + - + @@ -76,6 +76,8 @@ branch of the member gitlab server. + + @@ -171,15 +173,17 @@ branch of the member gitlab server. #define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0)// Patch version should always be set to 0 // Vulkan 1.3 version number #define VK_API_VERSION_1_3 VK_MAKE_API_VERSION(0, 1, 3, 0)// Patch version should always be set to 0 + // Vulkan 1.4 version number +#define VK_API_VERSION_1_4 VK_MAKE_API_VERSION(0, 1, 4, 0)// Patch version should always be set to 0 // Vulkan SC 1.0 version number #define VKSC_API_VERSION_1_0 VK_MAKE_API_VERSION(VKSC_API_VARIANT, 1, 0, 0)// Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 282 +#define VK_HEADER_VERSION 304 // Complete version of this file -#define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 3, VK_HEADER_VERSION) +#define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 4, VK_HEADER_VERSION) // Version of this file -#define VK_HEADER_VERSION 14 +#define VK_HEADER_VERSION 17 // Complete version of this file #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(VKSC_API_VARIANT, 1, 0, VK_HEADER_VERSION) @@ -339,7 +343,8 @@ typedef void* MTLSharedEvent_id; typedef VkFlags VkCommandBufferUsageFlags; typedef VkFlags VkQueryPipelineStatisticFlags; typedef VkFlags VkMemoryMapFlags; - typedef VkFlags VkMemoryUnmapFlagsKHR; + typedef VkFlags VkMemoryUnmapFlags; + typedef VkFlags VkImageAspectFlags; typedef VkFlags VkSparseMemoryBindFlags; typedef VkFlags VkSparseImageFormatFlags; @@ -389,9 +394,13 @@ typedef void* MTLSharedEvent_id; typedef VkFlags VkBuildMicromapFlagsEXT; typedef VkFlags VkMicromapCreateFlagsEXT; + typedef VkFlags VkIndirectCommandsLayoutUsageFlagsEXT; + typedef VkFlags VkIndirectCommandsInputModeFlagsEXT; typedef VkFlags VkDirectDriverLoadingFlagsLUNARG; - typedef VkFlags64 VkPipelineCreateFlags2KHR; - typedef VkFlags64 VkBufferUsageFlags2KHR; + typedef VkFlags64 VkPipelineCreateFlags2; + + typedef VkFlags64 VkBufferUsageFlags2; + WSI extensions typedef VkFlags VkCompositeAlphaFlagsKHR; @@ -467,7 +476,8 @@ typedef void* MTLSharedEvent_id; typedef VkFlags VkSubmitFlags; typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA; - typedef VkFlags VkHostImageCopyFlagsEXT; + typedef VkFlags VkHostImageCopyFlags; + typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA; typedef VkFlags VkGraphicsPipelineLibraryFlagsEXT; typedef VkFlags VkImageCompressionFlagsEXT; @@ -488,7 +498,7 @@ typedef void* MTLSharedEvent_id; typedef VkFlags VkVideoCodecOperationFlagsKHR; typedef VkFlags VkVideoCapabilityFlagsKHR; typedef VkFlags VkVideoSessionCreateFlagsKHR; - typedef VkFlags VkVideoSessionParametersCreateFlagsKHR; + typedef VkFlags VkVideoSessionParametersCreateFlagsKHR; typedef VkFlags VkVideoBeginCodingFlagsKHR; typedef VkFlags VkVideoEndCodingFlagsKHR; typedef VkFlags VkVideoCodingControlFlagsKHR; @@ -524,6 +534,12 @@ typedef void* MTLSharedEvent_id; typedef VkFlags VkVideoEncodeH265CtbSizeFlagsKHR; typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsKHR; + Video Encode AV1 extension + typedef VkFlags VkVideoEncodeAV1CapabilityFlagsKHR; + typedef VkFlags VkVideoEncodeAV1StdFlagsKHR; + typedef VkFlags VkVideoEncodeAV1RateControlFlagsKHR; + typedef VkFlags VkVideoEncodeAV1SuperblockSizeFlagsKHR; + Types which can be void pointers or class pointers, selected at compile time VK_DEFINE_HANDLE(VkInstance) VK_DEFINE_HANDLE(VkPhysicalDevice) @@ -550,7 +566,10 @@ typedef void* MTLSharedEvent_id; VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineBinaryKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNV) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutEXT) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectExecutionSetEXT) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) @@ -628,6 +647,7 @@ typedef void* MTLSharedEvent_id; + @@ -685,8 +705,9 @@ typedef void* MTLSharedEvent_id; - - + + + @@ -733,8 +754,9 @@ typedef void* MTLSharedEvent_id; - - + + + @@ -757,7 +779,8 @@ typedef void* MTLSharedEvent_id; - + + @@ -768,8 +791,10 @@ typedef void* MTLSharedEvent_id; - - + + + + @@ -780,12 +805,19 @@ typedef void* MTLSharedEvent_id; + + + - - + + + + + + @@ -796,6 +828,8 @@ typedef void* MTLSharedEvent_id; + + WSI extensions @@ -803,6 +837,7 @@ typedef void* MTLSharedEvent_id; + @@ -873,7 +908,9 @@ typedef void* MTLSharedEvent_id; - + + + Enumerated types in the header, but not used by the API @@ -889,6 +926,7 @@ typedef void* MTLSharedEvent_id; + @@ -922,6 +960,14 @@ typedef void* MTLSharedEvent_id; + Video AV1 Encode extensions + + + + + + + The PFN_vk*Function types are used by VkAllocationCallbacks below typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( void* pUserData, @@ -1202,11 +1248,12 @@ typedef void* MTLSharedEvent_id; uint32_t dstArrayElementArray element within the destination binding to copy to uint32_t descriptorCountNumber of descriptors to write (determines the size of the array pointed by pDescriptors) - - VkStructureType sType + + VkStructureType sType const void* pNext - VkBufferUsageFlags2KHR usage + VkBufferUsageFlags2 usage + VkStructureType sType const void* pNext @@ -1474,11 +1521,12 @@ typedef void* MTLSharedEvent_id; VkDeviceSize size VkDeviceAddress pipelineDeviceAddressCaptureReplay - - VkStructureType sType + + VkStructureType sType const void* pNext - VkPipelineCreateFlags2KHR flags + VkPipelineCreateFlags2 flags + uint32_t bindingVertex buffer binding id uint32_t strideDistance between vertices in bytes (0 = no advancement) @@ -1664,7 +1712,55 @@ typedef void* MTLSharedEvent_id; uint32_t offsetStart of the range, in bytes uint32_t sizeSize of the range, in bytes - + + VkStructureType sType + const void* pNext + const VkPipelineBinaryKeysAndDataKHR* pKeysAndDataInfo + VkPipeline pipeline + const VkPipelineCreateInfoKHR* pPipelineCreateInfo + + + VkStructureType sType + const void* pNext + uint32_t pipelineBinaryCount + VkPipelineBinaryKHR* pPipelineBinaries + + + size_t dataSize + void* pData + + + uint32_t binaryCount + const VkPipelineBinaryKeyKHR* pPipelineBinaryKeys + const VkPipelineBinaryDataKHR* pPipelineBinaryData + + + VkStructureType sType + void* pNext + uint32_t keySize + uint8_t key[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR] + + + VkStructureType sType + const void* pNext + uint32_t binaryCount + const VkPipelineBinaryKHR* pPipelineBinaries + + + VkStructureType sType + void* pNext + VkPipeline pipeline + + + VkStructureType sType + void* pNext + VkPipelineBinaryKHR pipelineBinary + + + VkStructureType sType + void* pNext + + VkStructureType sType const void* pNext VkPipelineLayoutCreateFlags flags @@ -1731,7 +1827,7 @@ typedef void* MTLSharedEvent_id; uint32_t clearValueCount const VkClearValue* pClearValues - + float float32[4] int32_t int32[4] uint32_t uint32[4] @@ -1835,7 +1931,7 @@ typedef void* MTLSharedEvent_id; VkBool32 vertexPipelineStoresAndAtomicsstores and atomic ops on storage buffers and images are supported in vertex, tessellation, and geometry stages VkBool32 fragmentStoresAndAtomicsstores and atomic ops on storage buffers and images are supported in the fragment stage VkBool32 shaderTessellationAndGeometryPointSizetessellation and geometry stages can export point size - VkBool32 shaderImageGatherExtendedimage gather with run-time values and independent offsets + VkBool32 shaderImageGatherExtendedimage gather with runtime values and independent offsets VkBool32 shaderStorageImageExtendedFormatsthe extended set of formats can be used for storage images VkBool32 shaderStorageImageMultisamplemultisample images can be used for storage images VkBool32 shaderStorageImageReadWithoutFormatread from storage image does not require format qualifier @@ -1875,7 +1971,7 @@ typedef void* MTLSharedEvent_id; uint32_t maxImageDimension1Dmax 1D image dimension uint32_t maxImageDimension2Dmax 2D image dimension uint32_t maxImageDimension3Dmax 3D image dimension - uint32_t maxImageDimensionCubemax cubemap image dimension + uint32_t maxImageDimensionCubemax cube map image dimension uint32_t maxImageArrayLayersmax layers for image arrays uint32_t maxTexelBufferElementsmax texel buffer size (fstexels) uint32_t maxUniformBufferRangemax uniform buffer range (bytes) @@ -1946,7 +2042,7 @@ typedef void* MTLSharedEvent_id; uint32_t maxViewportDimensions[2]max viewport dimensions (x,y) float viewportBoundsRange[2]viewport bounds range (min,max) uint32_t viewportSubPixelBitsnumber bits of subpixel precision for viewport - size_t minMemoryMapAlignmentmin required alignment of pointers returned by MapMemory (bytes) + size_t minMemoryMapAlignmentmin required alignment of pointers returned by MapMemory (bytes) VkDeviceSize minTexelBufferOffsetAlignmentmin required alignment for texel buffer offsets (bytes) VkDeviceSize minUniformBufferOffsetAlignmentmin required alignment for uniform buffer sizes and offsets (bytes) VkDeviceSize minStorageBufferOffsetAlignmentmin required alignment for storage buffer offsets (bytes) @@ -2097,9 +2193,14 @@ typedef void* MTLSharedEvent_id; uint32_t planeStackIndexThe z-order of the plane. VkSurfaceTransformFlagBitsKHR transformTransform to apply to the images as part of the scanout operation float globalAlphaGlobal alpha value. Must be between 0 and 1, inclusive. Ignored if alphaMode is not VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR - VkDisplayPlaneAlphaFlagBitsKHR alphaModeWhat type of alpha blending to use. Must be a bit from vkGetDisplayPlanePropertiesKHR::supportedAlpha. + VkDisplayPlaneAlphaFlagBitsKHR alphaModeThe type of alpha blending to use. Must be one of the bits from VkDisplayPlaneCapabilitiesKHR::supportedAlpha for this display plane VkExtent2D imageExtentsize of the images to use with this surface + + VkStructureType sType + const void* pNext + VkDisplaySurfaceStereoTypeNV stereoTypeThe 3D stereo type to use when presenting this surface. + VkStructureType sType const void* pNext @@ -2225,7 +2326,7 @@ typedef void* MTLSharedEvent_id; const void* pNext VkDebugReportFlagsEXT flagsIndicates which events call this callback PFN_vkDebugReportCallbackEXT pfnCallbackFunction pointer of a callback function - void* pUserDataUser data provided to callback function + void* pUserDataData provided to callback function VkStructureType sTypeMust be VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT @@ -2233,7 +2334,7 @@ typedef void* MTLSharedEvent_id; uint32_t disabledValidationCheckCountNumber of validation checks to disable const VkValidationCheckEXT* pDisabledValidationChecksValidation checks to disable - + VkStructureType sTypeMust be VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT const void* pNext uint32_t enabledValidationFeatureCountNumber of validation features to enable @@ -2252,7 +2353,7 @@ typedef void* MTLSharedEvent_id; const char* pSettingName VkLayerSettingTypeEXT typeThe type of the object uint32_t valueCountNumber of values of the setting - const void* pValuesValues to pass for a setting + const void* pValuesValues to pass for a setting VkStructureType sType @@ -2376,7 +2477,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkBool32 deviceGeneratedCommands + VkBool32 deviceGeneratedCommands VkStructureType sType @@ -2580,11 +2681,12 @@ typedef void* MTLSharedEvent_id; VkImageTiling tiling - - VkStructureType sType + + VkStructureType sType void* pNext uint32_t maxPushDescriptors + uint8_t major uint8_t minor @@ -2942,10 +3044,10 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkBool32 sciSyncFence + VkBool32 sciSyncFence VkBool32 sciSyncSemaphore2 - VkBool32 sciSyncImport - VkBool32 sciSyncExport + VkBool32 sciSyncImport + VkBool32 sciSyncExport VkStructureType sType @@ -2966,9 +3068,9 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkBool32 multiviewMultiple views in a renderpass - VkBool32 multiviewGeometryShaderMultiple views in a renderpass w/ geometry shader - VkBool32 multiviewTessellationShaderMultiple views in a renderpass w/ tessellation shader + VkBool32 multiviewMultiple views in a render pass + VkBool32 multiviewGeometryShaderMultiple views in a render pass w/ geometry shader + VkBool32 multiviewTessellationShaderMultiple views in a render pass w/ tessellation shader @@ -3205,6 +3307,12 @@ typedef void* MTLSharedEvent_id; float maxContentLightLevelContent maximum luminance float maxFrameAverageLightLevel + + VkStructureType sType + const void* pNext + size_t dynamicMetadataSizeSpecified in bytes + const void* pDynamicMetadataBinary code of size dynamicMetadataSize + VkStructureType sType void* pNext @@ -3338,6 +3446,11 @@ typedef void* MTLSharedEvent_id; void* pNext VkDisplayModePropertiesKHR displayModeProperties + + VkStructureType sType + const void* pNext + VkBool32 hdmi3DSupportedWhether this mode supports HDMI 3D stereo rendering. + VkStructureType sType const void* pNext @@ -3707,13 +3820,14 @@ typedef void* MTLSharedEvent_id; VkDeviceSize maxBufferSize - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 maintenance5 - - VkStructureType sType + + + VkStructureType sType void* pNext VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting @@ -3722,20 +3836,59 @@ typedef void* MTLSharedEvent_id; VkBool32 nonStrictSinglePixelWideLinesUseParallelogram VkBool32 nonStrictWideLinesUseParallelogram - - VkStructureType sType + + + VkStructureType sType void* pNext VkBool32 maintenance6 - - VkStructureType sType + + + VkStructureType sType void* pNext VkBool32 blockTexelViewCompatibleMultipleLayers - uint32_t maxCombinedImageSamplerDescriptorCount + uint32_t maxCombinedImageSamplerDescriptorCount VkBool32 fragmentShadingRateClampCombinerInputs - - VkStructureType sType + + + VkStructureType sType + void* pNext + VkBool32 maintenance7 + + + VkStructureType sType + void* pNext + VkBool32 robustFragmentShadingRateAttachmentAccess + VkBool32 separateDepthStencilAttachmentAccess + uint32_t maxDescriptorSetTotalUniformBuffersDynamic + uint32_t maxDescriptorSetTotalStorageBuffersDynamic + uint32_t maxDescriptorSetTotalBuffersDynamic + uint32_t maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic + uint32_t maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic + uint32_t maxDescriptorSetUpdateAfterBindTotalBuffersDynamic + + + VkStructureType sType + void* pNext + uint32_t layeredApiCount + VkPhysicalDeviceLayeredApiPropertiesKHR* pLayeredApisOutput list of layered implementations underneath the physical device + + + VkStructureType sType + void* pNext + uint32_t vendorID + uint32_t deviceID + VkPhysicalDeviceLayeredApiKHR layeredAPI + char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] + + + VkStructureType sType + void* pNext + VkPhysicalDeviceProperties2 properties + + + VkStructureType sType const void* pNext uint32_t viewMask uint32_t colorAttachmentCount @@ -3743,6 +3896,7 @@ typedef void* MTLSharedEvent_id; VkFormat depthAttachmentFormat VkFormat stencilAttachmentFormat + VkStructureType sType void* pNext @@ -3830,25 +3984,28 @@ typedef void* MTLSharedEvent_id; uint32_t numAvailableSgprs uint32_t computeWorkGroupSize[3] - - VkStructureType sType - const void* pNext - VkQueueGlobalPriorityKHR globalPriority + + VkStructureType sType + const void* pNext + VkQueueGlobalPriority globalPriority - - - VkStructureType sType + + + + VkStructureType sType void* pNext VkBool32 globalPriorityQuery - - - VkStructureType sType + + + + VkStructureType sType void* pNext uint32_t priorityCount - VkQueueGlobalPriorityKHR priorities[VK_MAX_GLOBAL_PRIORITY_SIZE_KHR] + VkQueueGlobalPriority priorities[VK_MAX_GLOBAL_PRIORITY_SIZE] - + + VkStructureType sType const void* pNext @@ -4176,29 +4333,32 @@ typedef void* MTLSharedEvent_id; uint64_t value - + uint32_t binding uint32_t divisor - - - VkStructureType sType + + + + VkStructureType sType const void* pNext uint32_t vertexBindingDivisorCount - const VkVertexInputBindingDivisorDescriptionKHR* pVertexBindingDivisors + const VkVertexInputBindingDivisorDescription* pVertexBindingDivisors - + + VkStructureType sType void* pNext uint32_t maxVertexAttribDivisormax value of vertex attribute divisor - - VkStructureType sType + + VkStructureType sType void* pNext uint32_t maxVertexAttribDivisormax value of vertex attribute divisor VkBool32 supportsNonZeroFirstInstance + VkStructureType sType void* pNext @@ -4311,13 +4471,14 @@ typedef void* MTLSharedEvent_id; VkBool32 shaderImageFloat32AtomicMinMax VkBool32 sparseImageFloat32AtomicMinMax - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 vertexAttributeInstanceRateDivisor VkBool32 vertexAttributeInstanceRateZeroDivisor - + + VkStructureType sType void* pNext @@ -4408,12 +4569,18 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 cornerSampledImage - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 computeDerivativeGroupQuads VkBool32 computeDerivativeGroupLinear + + + VkStructureType sType + void* pNext + VkBool32 meshAndTaskShaderDerivatives + VkStructureType sType @@ -4496,8 +4663,8 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkBool32 taskShader - VkBool32 meshShader + VkBool32 taskShader + VkBool32 meshShader VkStructureType sType @@ -4883,7 +5050,7 @@ typedef void* MTLSharedEvent_id; VkBool32 scalarBlockLayout - + VkStructureType sType const void* pNext VkBool32 supportsProtectedRepresents if surface can be protected @@ -4937,9 +5104,9 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkBool32 bufferDeviceAddress - VkBool32 bufferDeviceAddressCaptureReplay - VkBool32 bufferDeviceAddressMultiDevice + VkBool32 bufferDeviceAddress + VkBool32 bufferDeviceAddressCaptureReplay + VkBool32 bufferDeviceAddressMultiDevice @@ -5012,8 +5179,8 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkBool32 cooperativeMatrix - VkBool32 cooperativeMatrixRobustBufferAccess + VkBool32 cooperativeMatrix + VkBool32 cooperativeMatrixRobustBufferAccess VkStructureType sType @@ -5078,7 +5245,7 @@ typedef void* MTLSharedEvent_id; const void* pNext HMONITOR hmonitor - + VkStructureType sType void* pNext VkBool32 fullScreenExclusiveSupported @@ -5088,7 +5255,7 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 presentBarrier - + VkStructureType sType void* pNext VkBool32 presentBarrierSupported @@ -5196,7 +5363,7 @@ typedef void* MTLSharedEvent_id; VkPerformanceValueTypeINTEL type VkPerformanceValueDataINTEL data - + VkStructureType sType const void* pNext void* pUserData @@ -5235,12 +5402,13 @@ typedef void* MTLSharedEvent_id; VkBool32 shaderSubgroupClock VkBool32 shaderDeviceClock - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 indexTypeUint8 - + + VkStructureType sType void* pNext @@ -5406,8 +5574,8 @@ typedef void* MTLSharedEvent_id; VkDeviceMemory memory - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 rectangularLines VkBool32 bresenhamLines @@ -5416,22 +5584,25 @@ typedef void* MTLSharedEvent_id; VkBool32 stippledBresenhamLines VkBool32 stippledSmoothLines - - - VkStructureType sType + + + + VkStructureType sType void* pNext uint32_t lineSubPixelPrecisionBits - - - VkStructureType sType + + + + VkStructureType sType const void* pNext - VkLineRasterizationModeKHR lineRasterizationMode + VkLineRasterizationMode lineRasterizationMode VkBool32 stippledLineEnable uint32_t lineStippleFactor uint16_t lineStipplePattern - + + VkStructureType sType void* pNext @@ -5445,9 +5616,9 @@ typedef void* MTLSharedEvent_id; VkBool32 uniformAndStorageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock and Block VkBool32 storagePushConstant1616-bit integer/floating-point variables supported in PushConstant VkBool32 storageInputOutput1616-bit integer/floating-point variables supported in shader inputs and outputs - VkBool32 multiviewMultiple views in a renderpass - VkBool32 multiviewGeometryShaderMultiple views in a renderpass w/ geometry shader - VkBool32 multiviewTessellationShaderMultiple views in a renderpass w/ tessellation shader + VkBool32 multiviewMultiple views in a render pass + VkBool32 multiviewGeometryShaderMultiple views in a render pass w/ geometry shader + VkBool32 multiviewTessellationShaderMultiple views in a render pass w/ tessellation shader VkBool32 variablePointersStorageBuffer VkBool32 variablePointers VkBool32 protectedMemory @@ -5642,12 +5813,66 @@ typedef void* MTLSharedEvent_id; VkBool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated VkBool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated VkBool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated - VkDeviceSize storageTexelBufferOffsetAlignmentBytes - VkBool32 storageTexelBufferOffsetSingleTexelAlignment - VkDeviceSize uniformTexelBufferOffsetAlignmentBytes - VkBool32 uniformTexelBufferOffsetSingleTexelAlignment + VkDeviceSize storageTexelBufferOffsetAlignmentBytes + VkBool32 storageTexelBufferOffsetSingleTexelAlignment + VkDeviceSize uniformTexelBufferOffsetAlignmentBytes + VkBool32 uniformTexelBufferOffsetSingleTexelAlignment VkDeviceSize maxBufferSize + + VkStructureType sType + void* pNext + VkBool32 globalPriorityQuery + VkBool32 shaderSubgroupRotate + VkBool32 shaderSubgroupRotateClustered + VkBool32 shaderFloatControls2 + VkBool32 shaderExpectAssume + VkBool32 rectangularLines + VkBool32 bresenhamLines + VkBool32 smoothLines + VkBool32 stippledRectangularLines + VkBool32 stippledBresenhamLines + VkBool32 stippledSmoothLines + VkBool32 vertexAttributeInstanceRateDivisor + VkBool32 vertexAttributeInstanceRateZeroDivisor + VkBool32 indexTypeUint8 + VkBool32 dynamicRenderingLocalRead + VkBool32 maintenance5 + VkBool32 maintenance6 + VkBool32 pipelineProtectedAccess + VkBool32 pipelineRobustness + VkBool32 hostImageCopy + VkBool32 pushDescriptor + + + VkStructureType sType + void* pNext + uint32_t lineSubPixelPrecisionBits + uint32_t maxVertexAttribDivisormax value of vertex attribute divisor + VkBool32 supportsNonZeroFirstInstance + uint32_t maxPushDescriptors + VkBool32 dynamicRenderingLocalReadDepthStencilAttachments + VkBool32 dynamicRenderingLocalReadMultisampledAttachments + VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting + VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting + VkBool32 depthStencilSwizzleOneSupport + VkBool32 polygonModePointSize + VkBool32 nonStrictSinglePixelWideLinesUseParallelogram + VkBool32 nonStrictWideLinesUseParallelogram + VkBool32 blockTexelViewCompatibleMultipleLayers + uint32_t maxCombinedImageSamplerDescriptorCount + VkBool32 fragmentShadingRateClampCombinerInputs + VkPipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers + VkPipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers + VkPipelineRobustnessBufferBehavior defaultRobustnessVertexInputs + VkPipelineRobustnessImageBehavior defaultRobustnessImages + uint32_t copySrcLayoutCount + VkImageLayout* pCopySrcLayouts + uint32_t copyDstLayoutCount + VkImageLayout* pCopyDstLayouts + uint8_t optimalTilingLayoutUUID[VK_UUID_SIZE] + VkBool32 identicalMemoryTypeRequirements + VkStructureType sType const void* pNext @@ -6258,6 +6483,16 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 attachmentFeedbackLoopDynamicState + + VkStructureType sType + void* pNext + VkBool32 legacyVertexAttributes + + + VkStructureType sType + void* pNext + VkBool32 nativeUnalignedPerformance + VkStructureType sType void* pNext @@ -6281,11 +6516,172 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 depthClipControl + + VkStructureType sType + void* pNext + VkBool32 deviceGeneratedCommands + VkBool32 dynamicGeneratedPipelineLayout + + + VkStructureType sType + void* pNext + uint32_t maxIndirectPipelineCount + uint32_t maxIndirectShaderObjectCount + uint32_t maxIndirectSequenceCount + uint32_t maxIndirectCommandsTokenCount + uint32_t maxIndirectCommandsTokenOffset + uint32_t maxIndirectCommandsIndirectStride + VkIndirectCommandsInputModeFlagsEXT supportedIndirectCommandsInputModes + VkShaderStageFlags supportedIndirectCommandsShaderStages + VkShaderStageFlags supportedIndirectCommandsShaderStagesPipelineBinding + VkShaderStageFlags supportedIndirectCommandsShaderStagesShaderBinding + VkBool32 deviceGeneratedCommandsTransformFeedback + VkBool32 deviceGeneratedCommandsMultiDrawIndirectCount + + + VkStructureType sType + void* pNext + VkPipeline pipeline + + + VkStructureType sType + void* pNext + uint32_t shaderCount + const VkShaderEXT* pShaders + + + VkStructureType sType + const void* pNext + VkIndirectExecutionSetEXT indirectExecutionSet + VkIndirectCommandsLayoutEXT indirectCommandsLayout + uint32_t maxSequenceCount + uint32_t maxDrawCount + + + VkStructureType sType + const void* pNext + VkPipeline initialPipeline + uint32_t maxPipelineCount + + + VkStructureType sType + const void* pNext + uint32_t setLayoutCount + const VkDescriptorSetLayout* pSetLayouts + + + VkStructureType sType + const void* pNext + uint32_t shaderCount + const VkShaderEXT* pInitialShaders + const VkIndirectExecutionSetShaderLayoutInfoEXT* pSetLayoutInfos + uint32_t maxShaderCount + uint32_t pushConstantRangeCount + const VkPushConstantRange* pPushConstantRanges + + + const VkIndirectExecutionSetPipelineInfoEXT* pPipelineInfo + const VkIndirectExecutionSetShaderInfoEXT* pShaderInfo + + + VkStructureType sType + const void* pNext + VkIndirectExecutionSetInfoTypeEXT type + VkIndirectExecutionSetInfoEXT info + + + VkStructureType sType + const void* pNext + VkShaderStageFlags shaderStages + VkIndirectExecutionSetEXT indirectExecutionSet + VkIndirectCommandsLayoutEXT indirectCommandsLayout + VkDeviceAddress indirectAddress + VkDeviceSize indirectAddressSize + VkDeviceAddress preprocessAddress + VkDeviceSize preprocessSize + uint32_t maxSequenceCount + VkDeviceAddress sequenceCountAddress + uint32_t maxDrawCount + + + VkStructureType sType + const void* pNext + uint32_t index + VkPipeline pipeline + + + VkStructureType sType + const void* pNext + uint32_t index + VkShaderEXT shader + + + VkStructureType sType + const void* pNext + VkIndirectCommandsLayoutUsageFlagsEXT flags + VkShaderStageFlags shaderStages + uint32_t indirectStride + VkPipelineLayout pipelineLayout + uint32_t tokenCount + const VkIndirectCommandsLayoutTokenEXT* pTokens + + + VkStructureType sType + const void* pNext + VkIndirectCommandsTokenTypeEXT type + VkIndirectCommandsTokenDataEXT data + uint32_t offset + + + VkDeviceAddress bufferAddress + uint32_t stride + uint32_t commandCount + + + uint32_t vertexBindingUnit + + + VkDeviceAddress bufferAddress + uint32_t size + uint32_t stride + + + VkIndirectCommandsInputModeFlagBitsEXT mode + + + VkDeviceAddress bufferAddress + uint32_t size + VkIndexType indexType + + + VkPushConstantRange updateRange + + + VkIndirectExecutionSetInfoTypeEXT type + VkShaderStageFlags shaderStages + + + const VkIndirectCommandsPushConstantTokenEXT* pPushConstant + const VkIndirectCommandsVertexBufferTokenEXT* pVertexBuffer + const VkIndirectCommandsIndexBufferTokenEXT* pIndexBuffer + const VkIndirectCommandsExecutionSetTokenEXT* pExecutionSet + VkStructureType sType const void* pNext VkBool32 negativeOneToOne + + VkStructureType sType + void* pNext + VkBool32 depthClampControl + + + VkStructureType sType + const void* pNext + VkDepthClampModeEXT depthClampMode + const VkDepthClampRangeEXT* pDepthClampRange + VkStructureType sType void* pNext @@ -6296,6 +6692,11 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 externalMemoryRDMA + + VkStructureType sType + void* pNext + VkBool32 shaderRelaxedExtendedInstruction + VkStructureType sType void* pNext @@ -6418,13 +6819,14 @@ typedef void* MTLSharedEvent_id; VkBool32 synchronization2 - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 hostImageCopy - - VkStructureType sType + + + VkStructureType sType void* pNext uint32_t copySrcLayoutCount VkImageLayout* pCopySrcLayouts @@ -6433,8 +6835,9 @@ typedef void* MTLSharedEvent_id; uint8_t optimalTilingLayoutUUID[VK_UUID_SIZE] VkBool32 identicalMemoryTypeRequirements - - VkStructureType sType + + + VkStructureType sType const void* pNext const void* pHostPointer uint32_t memoryRowLengthSpecified in texels @@ -6443,8 +6846,9 @@ typedef void* MTLSharedEvent_id; VkOffset3D imageOffset VkExtent3D imageExtent - - VkStructureType sType + + + VkStructureType sType const void* pNext void* pHostPointer uint32_t memoryRowLengthSpecified in texels @@ -6453,28 +6857,31 @@ typedef void* MTLSharedEvent_id; VkOffset3D imageOffset VkExtent3D imageExtent - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkHostImageCopyFlagsEXT flags + VkHostImageCopyFlags flags VkImage dstImage VkImageLayout dstImageLayout uint32_t regionCount - const VkMemoryToImageCopyEXT* pRegions + const VkMemoryToImageCopy* pRegions - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkHostImageCopyFlagsEXT flags + VkHostImageCopyFlags flags VkImage srcImage VkImageLayout srcImageLayout uint32_t regionCount - const VkImageToMemoryCopyEXT* pRegions + const VkImageToMemoryCopy* pRegions - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkHostImageCopyFlagsEXT flags + VkHostImageCopyFlags flags VkImage srcImage VkImageLayout srcImageLayout VkImage dstImage @@ -6482,25 +6889,29 @@ typedef void* MTLSharedEvent_id; uint32_t regionCount const VkImageCopy2* pRegions - - VkStructureType sType + + + VkStructureType sType const void* pNext VkImage image VkImageLayout oldLayout VkImageLayout newLayout VkImageSubresourceRange subresourceRange - - VkStructureType sType + + + VkStructureType sType void* pNext VkDeviceSize sizeSpecified in bytes - - VkStructureType sType + + + VkStructureType sType void* pNext VkBool32 optimalDeviceAccessSpecifies if device access is optimal VkBool32 identicalMemoryLayoutSpecifies if memory layout is identical + VkStructureType sType void* pNext @@ -6620,11 +7031,12 @@ typedef void* MTLSharedEvent_id; VkBool32 multisampledRenderToSingleSampledEnable VkSampleCountFlagBits rasterizationSamples - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 pipelineProtectedAccess + VkStructureType sType void* pNext @@ -6649,12 +7061,50 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkFormat format - VkComponentMapping componentMapping - VkImageCreateFlags imageCreateFlags - VkImageType imageType - VkImageTiling imageTiling - VkImageUsageFlags imageUsageFlags + VkFormat format + VkComponentMapping componentMapping + VkImageCreateFlags imageCreateFlags + VkImageType imageType + VkImageTiling imageTiling + VkImageUsageFlags imageUsageFlags + + + VkStructureType sType + void* pNext + VkExtent2D maxQuantizationMapExtent + + + VkStructureType sType + void* pNext + int32_t minQpDelta + int32_t maxQpDelta + + + VkStructureType sType + void* pNext + int32_t minQpDelta + int32_t maxQpDelta + + + VkStructureType sType + void* pNext + int32_t minQIndexDelta + int32_t maxQIndexDelta + + + VkStructureType sType + void* pNext + VkExtent2D quantizationMapTexelSize + + + VkStructureType sType + void* pNext + VkVideoEncodeH265CtbSizeFlagsKHR compatibleCtbSizes + + + VkStructureType sType + void* pNext + VkVideoEncodeAV1SuperblockSizeFlagsKHR compatibleSuperblockSizes VkStructureType sType @@ -6666,16 +7116,16 @@ typedef void* MTLSharedEvent_id; VkStructureType sType - void* pNext - VkVideoCapabilityFlagsKHR flags - VkDeviceSize minBitstreamBufferOffsetAlignment - VkDeviceSize minBitstreamBufferSizeAlignment - VkExtent2D pictureAccessGranularity - VkExtent2D minCodedExtent - VkExtent2D maxCodedExtent - uint32_t maxDpbSlots - uint32_t maxActiveReferencePictures - VkExtensionProperties stdHeaderVersion + void* pNext + VkVideoCapabilityFlagsKHR flags + VkDeviceSize minBitstreamBufferOffsetAlignment + VkDeviceSize minBitstreamBufferSizeAlignment + VkExtent2D pictureAccessGranularity + VkExtent2D minCodedExtent + VkExtent2D maxCodedExtent + uint32_t maxDpbSlots + uint32_t maxActiveReferencePictures + VkExtensionProperties stdHeaderVersion VkStructureType sType @@ -6708,7 +7158,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkVideoDecodeCapabilityFlagsKHR flags + VkVideoDecodeCapabilityFlagsKHR flags VkStructureType sType @@ -6743,27 +7193,9 @@ typedef void* MTLSharedEvent_id; #include "vk_video/vulkan_video_codec_h264std.h" - - - - - - - - - - - - - - - - #include "vk_video/vulkan_video_codec_h264std_decode.h" - - VkStructureType sType const void* pNext @@ -6772,9 +7204,9 @@ typedef void* MTLSharedEvent_id; VkStructureType sType - void* pNext - StdVideoH264LevelIdc maxLevelIdc - VkOffset2D fieldOffsetGranularity + void* pNext + StdVideoH264LevelIdc maxLevelIdc + VkOffset2D fieldOffsetGranularity @@ -6810,25 +7242,10 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - - - - #include "vk_video/vulkan_video_codec_h265std_decode.h" - - VkStructureType sType const void* pNext @@ -6837,7 +7254,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - StdVideoH265LevelIdc maxLevelIdc + StdVideoH265LevelIdc maxLevelIdc VkStructureType sType @@ -6885,7 +7302,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - StdVideoAV1Level maxLevel + StdVideoAV1Level maxLevel VkStructureType sType @@ -6981,6 +7398,22 @@ typedef void* MTLSharedEvent_id; const VkVideoReferenceSlotInfoKHR* pReferenceSlots uint32_t precedingExternallyEncodedBytes + + VkStructureType sType + const void* pNext + VkImageView quantizationMap + VkExtent2D quantizationMapExtent + + + VkStructureType sType + const void* pNext + VkExtent2D quantizationMapTexelSize + + + VkStructureType sType + void* pNext + VkBool32 videoEncodeQuantizationMap + VkStructureType sType const void* pNext @@ -7024,30 +7457,30 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkVideoEncodeCapabilityFlagsKHR flags - VkVideoEncodeRateControlModeFlagsKHR rateControlModes - uint32_t maxRateControlLayers - uint64_t maxBitrate - uint32_t maxQualityLevels - VkExtent2D encodeInputPictureGranularity - VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags + VkVideoEncodeCapabilityFlagsKHR flags + VkVideoEncodeRateControlModeFlagsKHR rateControlModes + uint32_t maxRateControlLayers + uint64_t maxBitrate + uint32_t maxQualityLevels + VkExtent2D encodeInputPictureGranularity + VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags VkStructureType sType void* pNext - VkVideoEncodeH264CapabilityFlagsKHR flags - StdVideoH264LevelIdc maxLevelIdc - uint32_t maxSliceCount - uint32_t maxPPictureL0ReferenceCount - uint32_t maxBPictureL0ReferenceCount - uint32_t maxL1ReferenceCount - uint32_t maxTemporalLayerCount - VkBool32 expectDyadicTemporalLayerPattern - int32_t minQp - int32_t maxQp - VkBool32 prefersGopRemainingFrames - VkBool32 requiresGopRemainingFrames - VkVideoEncodeH264StdFlagsKHR stdSyntaxFlags + VkVideoEncodeH264CapabilityFlagsKHR flags + StdVideoH264LevelIdc maxLevelIdc + uint32_t maxSliceCount + uint32_t maxPPictureL0ReferenceCount + uint32_t maxBPictureL0ReferenceCount + uint32_t maxL1ReferenceCount + uint32_t maxTemporalLayerCount + VkBool32 expectDyadicTemporalLayerPattern + int32_t minQp + int32_t maxQp + VkBool32 prefersGopRemainingFrames + VkBool32 requiresGopRemainingFrames + VkVideoEncodeH264StdFlagsKHR stdSyntaxFlags VkStructureType sType @@ -7066,13 +7499,6 @@ typedef void* MTLSharedEvent_id; - - - - - - - VkStructureType sType const void* pNext @@ -7172,22 +7598,22 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkVideoEncodeH265CapabilityFlagsKHR flags - StdVideoH265LevelIdc maxLevelIdc - uint32_t maxSliceSegmentCount - VkExtent2D maxTiles - VkVideoEncodeH265CtbSizeFlagsKHR ctbSizes - VkVideoEncodeH265TransformBlockSizeFlagsKHR transformBlockSizes - uint32_t maxPPictureL0ReferenceCount - uint32_t maxBPictureL0ReferenceCount - uint32_t maxL1ReferenceCount - uint32_t maxSubLayerCount - VkBool32 expectDyadicTemporalSubLayerPattern - int32_t minQp - int32_t maxQp - VkBool32 prefersGopRemainingFrames - VkBool32 requiresGopRemainingFrames - VkVideoEncodeH265StdFlagsKHR stdSyntaxFlags + VkVideoEncodeH265CapabilityFlagsKHR flags + StdVideoH265LevelIdc maxLevelIdc + uint32_t maxSliceSegmentCount + VkExtent2D maxTiles + VkVideoEncodeH265CtbSizeFlagsKHR ctbSizes + VkVideoEncodeH265TransformBlockSizeFlagsKHR transformBlockSizes + uint32_t maxPPictureL0ReferenceCount + uint32_t maxBPictureL0ReferenceCount + uint32_t maxL1ReferenceCount + uint32_t maxSubLayerCount + VkBool32 expectDyadicTemporalSubLayerPattern + int32_t minQp + int32_t maxQp + VkBool32 prefersGopRemainingFrames + VkBool32 requiresGopRemainingFrames + VkVideoEncodeH265StdFlagsKHR stdSyntaxFlags VkStructureType sType @@ -7202,14 +7628,9 @@ typedef void* MTLSharedEvent_id; uint32_t preferredMaxL1ReferenceCount #include "vk_video/vulkan_video_codec_h265std_encode.h" - - - - - VkStructureType sType const void* pNext @@ -7311,6 +7732,136 @@ typedef void* MTLSharedEvent_id; const void* pNext const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo + + VkStructureType sType + void* pNext + VkVideoEncodeAV1CapabilityFlagsKHR flags + StdVideoAV1Level maxLevel + VkExtent2D codedPictureAlignment + VkExtent2D maxTiles + VkExtent2D minTileSize + VkExtent2D maxTileSize + VkVideoEncodeAV1SuperblockSizeFlagsKHR superblockSizes + uint32_t maxSingleReferenceCount + uint32_t singleReferenceNameMask + uint32_t maxUnidirectionalCompoundReferenceCount + uint32_t maxUnidirectionalCompoundGroup1ReferenceCount + uint32_t unidirectionalCompoundReferenceNameMask + uint32_t maxBidirectionalCompoundReferenceCount + uint32_t maxBidirectionalCompoundGroup1ReferenceCount + uint32_t maxBidirectionalCompoundGroup2ReferenceCount + uint32_t bidirectionalCompoundReferenceNameMask + uint32_t maxTemporalLayerCount + uint32_t maxSpatialLayerCount + uint32_t maxOperatingPoints + uint32_t minQIndex + uint32_t maxQIndex + VkBool32 prefersGopRemainingFrames + VkBool32 requiresGopRemainingFrames + VkVideoEncodeAV1StdFlagsKHR stdSyntaxFlags + + + VkStructureType sType + void* pNext + VkVideoEncodeAV1RateControlFlagsKHR preferredRateControlFlags + uint32_t preferredGopFrameCount + uint32_t preferredKeyFramePeriod + uint32_t preferredConsecutiveBipredictiveFrameCount + uint32_t preferredTemporalLayerCount + VkVideoEncodeAV1QIndexKHR preferredConstantQIndex + uint32_t preferredMaxSingleReferenceCount + uint32_t preferredSingleReferenceNameMask + uint32_t preferredMaxUnidirectionalCompoundReferenceCount + uint32_t preferredMaxUnidirectionalCompoundGroup1ReferenceCount + uint32_t preferredUnidirectionalCompoundReferenceNameMask + uint32_t preferredMaxBidirectionalCompoundReferenceCount + uint32_t preferredMaxBidirectionalCompoundGroup1ReferenceCount + uint32_t preferredMaxBidirectionalCompoundGroup2ReferenceCount + uint32_t preferredBidirectionalCompoundReferenceNameMask + + #include "vk_video/vulkan_video_codec_av1std_encode.h" + + + + + + + VkStructureType sType + void* pNext + VkBool32 videoEncodeAV1 + + + VkStructureType sType + const void* pNext + VkBool32 useMaxLevel + StdVideoAV1Level maxLevel + + + VkStructureType sType + const void* pNext + const StdVideoAV1SequenceHeader* pStdSequenceHeader + const StdVideoEncodeAV1DecoderModelInfo* pStdDecoderModelInfo + uint32_t stdOperatingPointCount + const StdVideoEncodeAV1OperatingPointInfo* pStdOperatingPoints + + + VkStructureType sType + const void* pNext + const StdVideoEncodeAV1ReferenceInfo* pStdReferenceInfo + + + VkStructureType sType + const void* pNext + VkVideoEncodeAV1PredictionModeKHR predictionMode + VkVideoEncodeAV1RateControlGroupKHR rateControlGroup + uint32_t constantQIndex + const StdVideoEncodeAV1PictureInfo* pStdPictureInfo + int32_t referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR] + VkBool32 primaryReferenceCdfOnly + VkBool32 generateObuExtensionHeader + + + VkStructureType sType + const void* pNext + StdVideoAV1Profile stdProfile + + + VkStructureType sType + const void* pNext + VkVideoEncodeAV1RateControlFlagsKHR flags + uint32_t gopFrameCount + uint32_t keyFramePeriod + uint32_t consecutiveBipredictiveFrameCount + uint32_t temporalLayerCount + + + uint32_t intraQIndex + uint32_t predictiveQIndex + uint32_t bipredictiveQIndex + + + uint32_t intraFrameSize + uint32_t predictiveFrameSize + uint32_t bipredictiveFrameSize + + + VkStructureType sType + const void* pNext + VkBool32 useGopRemainingFrames + uint32_t gopRemainingIntra + uint32_t gopRemainingPredictive + uint32_t gopRemainingBipredictive + + + VkStructureType sType + const void* pNext + VkBool32 useMinQIndex + VkVideoEncodeAV1QIndexKHR minQIndex + VkBool32 useMaxQIndex + VkVideoEncodeAV1QIndexKHR maxQIndex + VkBool32 useMaxFrameSize + VkVideoEncodeAV1FrameSizeKHR maxFrameSize + VkStructureType sType void* pNext @@ -7351,6 +7902,11 @@ typedef void* MTLSharedEvent_id; size_t dataSize const void* pData + + VkStructureType sType + const void* pNext + VkBool32 use64bitTexturing + VkStructureType sType const void* pNext @@ -7432,14 +7988,14 @@ typedef void* MTLSharedEvent_id; VkStructureType sType - void* pNext + const void* pNext VkDeviceAddress address VkBufferUsageFlags usage VkStructureType sType - void* pNext - VkBuffer buffer + const void* pNext + VkBuffer buffer const VkSampler* pSampler @@ -7882,6 +8438,25 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 graphicsPipelineLibrary + + VkStructureType sType + void* pNext + VkBool32 pipelineBinaries + + + VkStructureType sType + const void* pNext + VkBool32 disableInternalCache + + + VkStructureType sType + void* pNext + VkBool32 pipelineBinaryInternalCache + VkBool32 pipelineBinaryInternalCacheControl + VkBool32 pipelineBinaryPrefersInternalCache + VkBool32 pipelineBinaryPrecompiledInternalCache + VkBool32 pipelineBinaryCompressedData + VkStructureType sType void* pNext @@ -7956,7 +8531,7 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 imageCompressionControl - + VkStructureType sType void* pNext VkImageCompressionFlagsEXT imageCompressionFlags @@ -7967,18 +8542,20 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 imageCompressionControlSwapchain - - VkStructureType sType + + VkStructureType sType void* pNext VkImageSubresource imageSubresource - - - VkStructureType sType + + + + VkStructureType sType void* pNext VkSubresourceLayout subresourceLayout - + + VkStructureType sType const void* pNext @@ -8229,27 +8806,30 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 nonSeamlessCubeMap - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 pipelineRobustness - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkPipelineRobustnessBufferBehaviorEXT storageBuffers - VkPipelineRobustnessBufferBehaviorEXT uniformBuffers - VkPipelineRobustnessBufferBehaviorEXT vertexInputs - VkPipelineRobustnessImageBehaviorEXT images - - - VkStructureType sType + VkPipelineRobustnessBufferBehavior storageBuffers + VkPipelineRobustnessBufferBehavior uniformBuffers + VkPipelineRobustnessBufferBehavior vertexInputs + VkPipelineRobustnessImageBehavior images + + + + VkStructureType sType void* pNext - VkPipelineRobustnessBufferBehaviorEXT defaultRobustnessStorageBuffers - VkPipelineRobustnessBufferBehaviorEXT defaultRobustnessUniformBuffers - VkPipelineRobustnessBufferBehaviorEXT defaultRobustnessVertexInputs - VkPipelineRobustnessImageBehaviorEXT defaultRobustnessImages + VkPipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers + VkPipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers + VkPipelineRobustnessBufferBehavior defaultRobustnessVertexInputs + VkPipelineRobustnessImageBehavior defaultRobustnessImages + VkStructureType sType const void* pNext @@ -8343,7 +8923,7 @@ typedef void* MTLSharedEvent_id; const void* pNext VkOpticalFlowUsageFlagsNV usage - + VkStructureType sType const void* pNext VkFormat format @@ -8485,7 +9065,7 @@ typedef void* MTLSharedEvent_id; void* pNext VkPresentModeKHR presentMode - + VkStructureType sType void* pNext VkPresentScalingFlagsEXT supportedPresentScaling @@ -8509,7 +9089,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType const void* pNext uint32_t swapchainCountCopy of VkPresentInfoKHR::swapchainCount - const VkFence* pFencesFence to signal for each swapchain + const VkFence* pFencesFence to signal for each swapchain VkStructureType sType @@ -8590,12 +9170,13 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 rayTracingPositionFetch - - VkStructureType sType + + VkStructureType sType const void* pNext const VkImageCreateInfo* pCreateInfo - const VkImageSubresource2KHR* pSubresource + const VkImageSubresource2* pSubresource + VkStructureType sType void* pNext @@ -8619,20 +9200,22 @@ typedef void* MTLSharedEvent_id; const void* pNext void* pQueriedLowLatencyData - - VkStructureType sType + + VkStructureType sType const void* pNext VkMemoryMapFlags flags VkDeviceMemory memory VkDeviceSize offset VkDeviceSize size - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkMemoryUnmapFlagsKHR flags + VkMemoryUnmapFlags flags VkDeviceMemory memory + VkStructureType sType void* pNext @@ -8740,11 +9323,14 @@ typedef void* MTLSharedEvent_id; uint32_t maxExecutionGraphShaderPayloadSize uint32_t maxExecutionGraphShaderPayloadCount uint32_t executionGraphDispatchAddressAlignment + uint32_t maxExecutionGraphWorkgroupCount[3] + uint32_t maxExecutionGraphWorkgroups VkStructureType sType void* pNext VkBool32 shaderEnqueue + VkBool32 shaderMeshEnqueue VkStructureType sType @@ -8766,7 +9352,9 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkDeviceSize size + VkDeviceSize minSize + VkDeviceSize maxSize + VkDeviceSize sizeGranularity uint32_t nodeIndex @@ -8779,13 +9367,32 @@ typedef void* MTLSharedEvent_id; VkDeviceOrHostAddressConstAMDX infos uint64_t stride - - VkStructureType sType + + VkStructureType sType + void* pNext + VkBool32 antiLag + + + VkStructureType sType + const void* pNext + VkAntiLagModeAMD mode + uint32_t maxFPS + const VkAntiLagPresentationInfoAMD* pPresentationInfo + + + VkStructureType sType + void* pNext + VkAntiLagStageAMD stage + uint64_t frameIndex + + + VkStructureType sType const void* pNext VkResult* pResult - - VkStructureType sType + + + VkStructureType sType const void* pNext VkShaderStageFlags stageFlags VkPipelineLayout layout @@ -8795,8 +9402,9 @@ typedef void* MTLSharedEvent_id; uint32_t dynamicOffsetCount const uint32_t* pDynamicOffsets - - VkStructureType sType + + + VkStructureType sType const void* pNext VkPipelineLayout layout VkShaderStageFlags stageFlags @@ -8804,8 +9412,9 @@ typedef void* MTLSharedEvent_id; uint32_t size const void* pValues - - VkStructureType sType + + + VkStructureType sType const void* pNext VkShaderStageFlags stageFlags VkPipelineLayout layout @@ -8813,14 +9422,16 @@ typedef void* MTLSharedEvent_id; uint32_t descriptorWriteCount const VkWriteDescriptorSet* pDescriptorWrites - - VkStructureType sType + + + VkStructureType sType const void* pNext VkDescriptorUpdateTemplate descriptorUpdateTemplate VkPipelineLayout layout uint32_t set const void* pData + VkStructureType sType const void* pNext @@ -9046,41 +9657,47 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 shaderMaximalReconvergence - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 shaderSubgroupRotate VkBool32 shaderSubgroupRotateClustered - - VkStructureType sType + + + VkStructureType sType void* pNext VkBool32 shaderExpectAssume - - VkStructureType sType + + + VkStructureType sType void* pNext VkBool32 shaderFloatControls2 - - VkStructureType sType + + + VkStructureType sType void* pNext VkBool32 dynamicRenderingLocalRead - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t colorAttachmentCount const uint32_t* pColorAttachmentLocations - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t colorAttachmentCount const uint32_t* pColorAttachmentInputIndices const uint32_t* pDepthInputAttachmentIndex const uint32_t* pStencilInputAttachmentIndex + VkStructureType sType void* pNext @@ -9103,7 +9720,7 @@ typedef void* MTLSharedEvent_id; void* pNext VkDeviceSize minPlacedMemoryMapAlignment - + VkStructureType sType const void* pNext void* pPlacedAddress @@ -9113,16 +9730,91 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 shaderRawAccessChains + + VkStructureType sType + void* pNext + VkBool32 commandBufferInheritance + + + VkStructureType sType + void* pNext + VkBool32 imageAlignmentControl + + + VkStructureType sType + void* pNext + uint32_t supportedImageAlignmentMask + + + VkStructureType sType + const void* pNext + uint32_t maximumRequestedAlignment + + + VkStructureType sType + void* pNext + VkBool32 shaderReplicatedComposites + + + VkStructureType sType + void* pNext + VkBool32 presentModeFifoLatestReady + + + float minDepthClamp + float maxDepthClamp + + + VkStructureType sType + void* pNext + VkBool32 cooperativeMatrixWorkgroupScope + VkBool32 cooperativeMatrixFlexibleDimensions + VkBool32 cooperativeMatrixReductions + VkBool32 cooperativeMatrixConversions + VkBool32 cooperativeMatrixPerElementOperations + VkBool32 cooperativeMatrixTensorAddressing + VkBool32 cooperativeMatrixBlockLoads + + + VkStructureType sType + void* pNext + uint32_t cooperativeMatrixWorkgroupScopeMaxWorkgroupSize + uint32_t cooperativeMatrixFlexibleDimensionsMaxDimension + uint32_t cooperativeMatrixWorkgroupScopeReservedSharedMemory + + + VkStructureType sType + void* pNext + uint32_t MGranularity + uint32_t NGranularity + uint32_t KGranularity + VkComponentTypeKHR AType + VkComponentTypeKHR BType + VkComponentTypeKHR CType + VkComponentTypeKHR ResultType + VkBool32 saturatingAccumulation + VkScopeKHR scope + uint32_t workgroupInvocations + + + VkStructureType sType + void* pNext + VkBool32 hdrVivid + + + VkStructureType sType + void* pNext + VkBool32 vertexAttributeRobustness + Vulkan enumerant (token) definitions - + - @@ -9137,20 +9829,15 @@ typedef void* MTLSharedEvent_id; - - - - - - - + + @@ -9702,6 +10389,15 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + Flags @@ -9760,16 +10456,16 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - + + + + + + + + + + @@ -9812,10 +10508,16 @@ typedef void* MTLSharedEvent_id; - - - - + + + + + + + + + + @@ -9983,6 +10685,12 @@ typedef void* MTLSharedEvent_id; + + + + + + @@ -10265,15 +10973,11 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - + + + + + @@ -10301,6 +11005,7 @@ typedef void* MTLSharedEvent_id; Vendor IDs are now represented as enums instead of the old <vendorids> tag, allowing them to be included in the API headers. + @@ -10339,7 +11044,8 @@ typedef void* MTLSharedEvent_id; - + + @@ -10395,8 +11101,6 @@ typedef void* MTLSharedEvent_id; - - @@ -10452,11 +11156,8 @@ typedef void* MTLSharedEvent_id; - - - @@ -10540,15 +11241,11 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - + + + + + @@ -10574,15 +11271,10 @@ typedef void* MTLSharedEvent_id; - - - - - @@ -10630,107 +11322,59 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - - - - - - - - - bitpos 17-31 are specified by extensions to the original VkAccessFlagBits enum - - - - - + - - - - - - - - - - - - - - - + - - - - bitpos 17-31 are specified by extensions to the original VkPipelineStageFlagBits enum - - - - - - - - @@ -10814,6 +11458,8 @@ typedef void* MTLSharedEvent_id; + + @@ -10914,8 +11560,8 @@ typedef void* MTLSharedEvent_id; - - + + @@ -10928,67 +11574,37 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - - - - - - + bitpos 13 is an extension interaction with VK_EXT_filter_cubic" - - - - - - - - - - - - - - - - @@ -11043,6 +11659,40 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11086,17 +11736,17 @@ typedef void* MTLSharedEvent_id; - - - - - + + + + + - - - - - + + + + + @@ -11187,6 +11837,30 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + + + + + + + + + + @@ -11228,6 +11902,13 @@ typedef void* MTLSharedEvent_id; + + + + + + + @@ -11250,7 +11931,13 @@ typedef void* MTLSharedEvent_id; - + + + + + + + @@ -11710,6 +12397,39 @@ typedef void* MTLSharedEvent_id; uint32_t srcCacheCount const VkPipelineCache* pSrcCaches + + VkResult vkCreatePipelineBinariesKHR + VkDevice device + const VkPipelineBinaryCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkPipelineBinaryHandlesInfoKHR* pBinaries + + + void vkDestroyPipelineBinaryKHR + VkDevice device + VkPipelineBinaryKHR pipelineBinary + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetPipelineKeyKHR + VkDevice device + const VkPipelineCreateInfoKHR* pPipelineCreateInfo + VkPipelineBinaryKeyKHR* pPipelineKey + + + VkResult vkGetPipelineBinaryDataKHR + VkDevice device + const VkPipelineBinaryDataInfoKHR* pInfo + VkPipelineBinaryKeyKHR* pPipelineBinaryKey + size_t* pPipelineBinaryDataSize + void* pPipelineBinaryData + + + VkResult vkReleaseCapturedPipelineDataKHR + VkDevice device + const VkReleaseCapturedPipelineDataInfoKHR* pInfo + const VkAllocationCallbacks* pAllocator + VkResult vkCreateGraphicsPipelines VkDevice device @@ -11873,11 +12593,12 @@ typedef void* MTLSharedEvent_id; VkExtent2D* pGranularity - void vkGetRenderingAreaGranularityKHR + void vkGetRenderingAreaGranularity VkDevice device - const VkRenderingAreaInfoKHR* pRenderingAreaInfo + const VkRenderingAreaInfo* pRenderingAreaInfo VkExtent2D* pGranularity + VkResult vkCreateCommandPool VkDevice device @@ -12680,6 +13401,66 @@ typedef void* MTLSharedEvent_id; VkIndirectCommandsLayoutNV indirectCommandsLayout const VkAllocationCallbacks* pAllocator + + + void vkCmdExecuteGeneratedCommandsEXT + VkCommandBuffer commandBuffer + VkBool32 isPreprocessed + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo + + + void vkCmdPreprocessGeneratedCommandsEXT + VkCommandBuffer commandBuffer + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo + VkCommandBuffer stateCommandBuffer + + + void vkGetGeneratedCommandsMemoryRequirementsEXT + VkDevice device + const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo + VkMemoryRequirements2* pMemoryRequirements + + + VkResult vkCreateIndirectCommandsLayoutEXT + VkDevice device + const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout + + + void vkDestroyIndirectCommandsLayoutEXT + VkDevice device + VkIndirectCommandsLayoutEXT indirectCommandsLayout + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateIndirectExecutionSetEXT + VkDevice device + const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkIndirectExecutionSetEXT* pIndirectExecutionSet + + + void vkDestroyIndirectExecutionSetEXT + VkDevice device + VkIndirectExecutionSetEXT indirectExecutionSet + const VkAllocationCallbacks* pAllocator + + + void vkUpdateIndirectExecutionSetPipelineEXT + VkDevice device + VkIndirectExecutionSetEXT indirectExecutionSet + uint32_t executionSetWriteCount + const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites + + + void vkUpdateIndirectExecutionSetShaderEXT + VkDevice device + VkIndirectExecutionSetEXT indirectExecutionSet + uint32_t executionSetWriteCount + const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites + + void vkGetPhysicalDeviceFeatures2 VkPhysicalDevice physicalDevice @@ -12728,7 +13509,7 @@ typedef void* MTLSharedEvent_id; - void vkCmdPushDescriptorSetKHR + void vkCmdPushDescriptorSet VkCommandBuffer commandBuffer VkPipelineBindPoint pipelineBindPoint VkPipelineLayout layout @@ -12736,6 +13517,7 @@ typedef void* MTLSharedEvent_id; uint32_t descriptorWriteCount const VkWriteDescriptorSet* pDescriptorWrites + void vkTrimCommandPool VkDevice device @@ -12882,35 +13664,35 @@ typedef void* MTLSharedEvent_id; VkDevice device const VkImportFenceFdInfoKHR* pImportFenceFdInfo - + VkResult vkGetFenceSciSyncFenceNV VkDevice device const VkFenceGetSciSyncInfoNV* pGetSciSyncHandleInfo void* pHandle - + VkResult vkGetFenceSciSyncObjNV VkDevice device const VkFenceGetSciSyncInfoNV* pGetSciSyncHandleInfo void* pHandle - + VkResult vkImportFenceSciSyncFenceNV VkDevice device const VkImportFenceSciSyncInfoNV* pImportFenceSciSyncInfo - + VkResult vkImportFenceSciSyncObjNV VkDevice device const VkImportFenceSciSyncInfoNV* pImportFenceSciSyncInfo - + VkResult vkGetSemaphoreSciSyncObjNV VkDevice device const VkSemaphoreGetSciSyncInfoNV* pGetSciSyncInfo void* pHandle - + VkResult vkImportSemaphoreSciSyncObjNV VkDevice device const VkImportSemaphoreSciSyncInfoNV* pImportSemaphoreSciSyncInfo @@ -13092,13 +13874,14 @@ typedef void* MTLSharedEvent_id; - void vkCmdPushDescriptorSetWithTemplateKHR + void vkCmdPushDescriptorSetWithTemplate VkCommandBuffer commandBuffer VkDescriptorUpdateTemplate descriptorUpdateTemplate VkPipelineLayout layout uint32_t set const void* pData + void vkSetHdrMetadataEXT VkDevice device @@ -13940,6 +14723,11 @@ typedef void* MTLSharedEvent_id; VkDevice device const VkImageViewHandleInfoNVX* pInfo + + uint64_t vkGetImageViewHandle64NVX + VkDevice device + const VkImageViewHandleInfoNVX* pInfo + VkResult vkGetImageViewAddressNVX VkDevice device @@ -14098,12 +14886,13 @@ typedef void* MTLSharedEvent_id; VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations - void vkCmdSetLineStippleKHR + void vkCmdSetLineStipple VkCommandBuffer commandBuffer uint32_t lineStippleFactor uint16_t lineStipplePattern - + + VkResult vkGetFaultData VkDevice device @@ -14193,6 +14982,11 @@ typedef void* MTLSharedEvent_id; VkDevice device const VkPipelineIndirectDeviceAddressInfoNV* pInfo + + void vkAntiLagUpdateAMD + VkDevice device + const VkAntiLagDataAMD* pData + void vkCmdSetCullMode VkCommandBuffer commandBuffer @@ -14226,13 +15020,14 @@ typedef void* MTLSharedEvent_id; - void vkCmdBindIndexBuffer2KHR + void vkCmdBindIndexBuffer2 VkCommandBuffer commandBuffer VkBuffer buffer VkDeviceSize offset VkDeviceSize size VkIndexType indexType + void vkCmdBindVertexBuffers2 VkCommandBuffer commandBuffer @@ -14658,26 +15453,30 @@ typedef void* MTLSharedEvent_id; VkCheckpointData2NV* pCheckpointData - VkResult vkCopyMemoryToImageEXT + VkResult vkCopyMemoryToImage VkDevice device - const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo + const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo + - VkResult vkCopyImageToMemoryEXT + VkResult vkCopyImageToMemory VkDevice device - const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo + const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo + - VkResult vkCopyImageToImageEXT + VkResult vkCopyImageToImage VkDevice device - const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo + const VkCopyImageToImageInfo* pCopyImageToImageInfo + - VkResult vkTransitionImageLayoutEXT + VkResult vkTransitionImageLayout VkDevice device uint32_t transitionCount - const VkHostImageLayoutTransitionInfoEXT* pTransitions + const VkHostImageLayoutTransitionInfo* pTransitions + void vkGetCommandPoolMemoryConsumption VkDevice device @@ -15123,13 +15922,14 @@ typedef void* MTLSharedEvent_id; VkShaderModuleIdentifierEXT* pIdentifier - void vkGetImageSubresourceLayout2KHR + void vkGetImageSubresourceLayout2 VkDevice device VkImage image - const VkImageSubresource2KHR* pSubresource - VkSubresourceLayout2KHR* pLayout + const VkImageSubresource2* pSubresource + VkSubresourceLayout2* pLayout - + + VkResult vkGetPipelinePropertiesEXT VkDevice device @@ -15205,22 +16005,25 @@ typedef void* MTLSharedEvent_id; const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo - void vkGetDeviceImageSubresourceLayoutKHR + void vkGetDeviceImageSubresourceLayout VkDevice device - const VkDeviceImageSubresourceInfoKHR* pInfo - VkSubresourceLayout2KHR* pLayout + const VkDeviceImageSubresourceInfo* pInfo + VkSubresourceLayout2* pLayout + - VkResult vkMapMemory2KHR + VkResult vkMapMemory2 VkDevice device - const VkMemoryMapInfoKHR* pMemoryMapInfo + const VkMemoryMapInfo* pMemoryMapInfo void** ppData + - VkResult vkUnmapMemory2KHR + VkResult vkUnmapMemory2 VkDevice device - const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo + const VkMemoryUnmapInfo* pMemoryUnmapInfo + VkResult vkCreateShadersEXT VkDevice device @@ -15265,13 +16068,13 @@ typedef void* MTLSharedEvent_id; VkResult vkGetExecutionGraphPipelineScratchSizeAMDX VkDevice device VkPipeline executionGraph - VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo + VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo VkResult vkGetExecutionGraphPipelineNodeIndexAMDX VkDevice device VkPipeline executionGraph - const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo + const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo uint32_t* pNodeIndex @@ -15283,49 +16086,58 @@ typedef void* MTLSharedEvent_id; const VkAllocationCallbacks* pAllocator VkPipeline* pPipelines - + void vkCmdInitializeGraphScratchMemoryAMDX VkCommandBuffer commandBuffer + VkPipeline executionGraph VkDeviceAddress scratch + VkDeviceSize scratchSize - + void vkCmdDispatchGraphAMDX VkCommandBuffer commandBuffer VkDeviceAddress scratch - const VkDispatchGraphCountInfoAMDX* pCountInfo + VkDeviceSize scratchSize + const VkDispatchGraphCountInfoAMDX* pCountInfo - + void vkCmdDispatchGraphIndirectAMDX VkCommandBuffer commandBuffer VkDeviceAddress scratch - const VkDispatchGraphCountInfoAMDX* pCountInfo + VkDeviceSize scratchSize + const VkDispatchGraphCountInfoAMDX* pCountInfo - + void vkCmdDispatchGraphIndirectCountAMDX VkCommandBuffer commandBuffer VkDeviceAddress scratch + VkDeviceSize scratchSize VkDeviceAddress countInfo - void vkCmdBindDescriptorSets2KHR + void vkCmdBindDescriptorSets2 VkCommandBuffer commandBuffer - const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo + const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo + - void vkCmdPushConstants2KHR + void vkCmdPushConstants2 VkCommandBuffer commandBuffer - const VkPushConstantsInfoKHR* pPushConstantsInfo + const VkPushConstantsInfo* pPushConstantsInfo + - void vkCmdPushDescriptorSet2KHR + void vkCmdPushDescriptorSet2 VkCommandBuffer commandBuffer - const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo + const VkPushDescriptorSetInfo* pPushDescriptorSetInfo + - void vkCmdPushDescriptorSetWithTemplate2KHR + void vkCmdPushDescriptorSetWithTemplate2 VkCommandBuffer commandBuffer - const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo + const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo + void vkCmdSetDescriptorBufferOffsets2EXT VkCommandBuffer commandBuffer @@ -15366,14 +16178,28 @@ typedef void* MTLSharedEvent_id; const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo - void vkCmdSetRenderingAttachmentLocationsKHR + void vkCmdSetRenderingAttachmentLocations VkCommandBuffer commandBuffer - const VkRenderingAttachmentLocationInfoKHR* pLocationInfo + const VkRenderingAttachmentLocationInfo* pLocationInfo + - void vkCmdSetRenderingInputAttachmentIndicesKHR + void vkCmdSetRenderingInputAttachmentIndices VkCommandBuffer commandBuffer - const VkRenderingInputAttachmentIndexInfoKHR* pLocationInfo + const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo + + + + void vkCmdSetDepthClampRangeEXT + VkCommandBuffer commandBuffer + VkDepthClampModeEXT depthClampMode + const VkDepthClampRangeEXT* pDepthClampRange + + + VkResult vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties @@ -15499,6 +16325,7 @@ typedef void* MTLSharedEvent_id; + @@ -15892,7 +16719,7 @@ typedef void* MTLSharedEvent_id; - + @@ -15920,6 +16747,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -16043,6 +16873,7 @@ typedef void* MTLSharedEvent_id; + @@ -16223,8 +17054,11 @@ typedef void* MTLSharedEvent_id; + + + - + @@ -16237,6 +17071,7 @@ typedef void* MTLSharedEvent_id; + @@ -16245,10 +17080,16 @@ typedef void* MTLSharedEvent_id; + + + + + + @@ -16273,6 +17114,10 @@ typedef void* MTLSharedEvent_id; + + + + @@ -16285,6 +17130,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -16311,6 +17159,26 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + + + + + + @@ -16324,6 +17192,10 @@ typedef void* MTLSharedEvent_id; + + + + @@ -16336,6 +17208,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -16350,14 +17225,20 @@ typedef void* MTLSharedEvent_id; + + + + + + @@ -16372,11 +17253,15 @@ typedef void* MTLSharedEvent_id; + + + + @@ -16397,6 +17282,8 @@ typedef void* MTLSharedEvent_id; + + @@ -16419,7 +17306,7 @@ typedef void* MTLSharedEvent_id; - + @@ -16442,6 +17329,8 @@ typedef void* MTLSharedEvent_id; + + @@ -16453,6 +17342,8 @@ typedef void* MTLSharedEvent_id; + + @@ -16470,6 +17361,8 @@ typedef void* MTLSharedEvent_id; + + @@ -16478,6 +17371,8 @@ typedef void* MTLSharedEvent_id; + + @@ -16513,14 +17408,20 @@ typedef void* MTLSharedEvent_id; + + + + + + @@ -16561,6 +17462,10 @@ typedef void* MTLSharedEvent_id; + + + + @@ -16617,6 +17522,8 @@ typedef void* MTLSharedEvent_id; + + @@ -16649,6 +17556,8 @@ typedef void* MTLSharedEvent_id; + + @@ -16659,6 +17568,7 @@ typedef void* MTLSharedEvent_id; + @@ -16681,10 +17591,274 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -16738,6 +17912,10 @@ typedef void* MTLSharedEvent_id; + + + + @@ -16781,6 +17959,10 @@ typedef void* MTLSharedEvent_id; + + + + @@ -16816,10 +17998,17 @@ typedef void* MTLSharedEvent_id; + + + + + + + - + @@ -16841,7 +18030,7 @@ typedef void* MTLSharedEvent_id; - + @@ -16883,10 +18072,10 @@ typedef void* MTLSharedEvent_id; - + - + @@ -16917,7 +18106,7 @@ typedef void* MTLSharedEvent_id; - + @@ -16927,7 +18116,7 @@ typedef void* MTLSharedEvent_id; - + @@ -16938,7 +18127,7 @@ typedef void* MTLSharedEvent_id; - + @@ -16949,7 +18138,7 @@ typedef void* MTLSharedEvent_id; - + @@ -16966,7 +18155,7 @@ typedef void* MTLSharedEvent_id; - + @@ -16977,7 +18166,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17010,7 +18199,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17035,20 +18224,20 @@ typedef void* MTLSharedEvent_id; - + - + - + @@ -17056,7 +18245,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17076,7 +18265,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17091,19 +18280,19 @@ typedef void* MTLSharedEvent_id; - + - + - + @@ -17121,7 +18310,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17143,8 +18332,8 @@ typedef void* MTLSharedEvent_id; - - + + @@ -17210,7 +18399,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17251,13 +18440,13 @@ typedef void* MTLSharedEvent_id; - + - + @@ -17306,20 +18495,23 @@ typedef void* MTLSharedEvent_id; + - + - + + + @@ -17333,15 +18525,16 @@ typedef void* MTLSharedEvent_id; - + - + + @@ -17357,7 +18550,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17371,25 +18564,25 @@ typedef void* MTLSharedEvent_id; - + - + - + - + @@ -17433,7 +18626,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17481,7 +18674,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17502,7 +18695,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17510,7 +18703,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17538,6 +18731,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -17545,30 +18741,7 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - - - - - - - - - - - - - - - + @@ -17577,7 +18750,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17595,7 +18768,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17612,9 +18785,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -17638,9 +18812,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -17654,7 +18829,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17666,7 +18841,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17676,7 +18851,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17687,7 +18862,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17695,7 +18870,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17726,7 +18901,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17787,7 +18962,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17796,7 +18971,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17806,25 +18981,25 @@ typedef void* MTLSharedEvent_id; - + - + - + - + @@ -17844,9 +19019,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -17856,21 +19032,30 @@ typedef void* MTLSharedEvent_id; - + - - - + + + + + + + + + + + + - + @@ -17884,20 +19069,20 @@ typedef void* MTLSharedEvent_id; - + - + - + @@ -17906,7 +19091,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17930,7 +19115,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17938,13 +19123,13 @@ typedef void* MTLSharedEvent_id; - + - + @@ -17960,7 +19145,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17974,7 +19159,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17982,7 +19167,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18007,7 +19192,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18018,7 +19203,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18034,7 +19219,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18046,22 +19231,18 @@ typedef void* MTLSharedEvent_id; - + - - + + - - - - - + - + @@ -18073,7 +19254,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18081,6 +19262,7 @@ typedef void* MTLSharedEvent_id; + @@ -18091,6 +19273,7 @@ typedef void* MTLSharedEvent_id; + @@ -18099,9 +19282,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -18111,7 +19295,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18129,7 +19313,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18141,7 +19325,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18152,14 +19336,14 @@ typedef void* MTLSharedEvent_id; - + - + @@ -18167,7 +19351,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18179,7 +19363,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18200,7 +19384,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18219,7 +19403,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18230,13 +19414,13 @@ typedef void* MTLSharedEvent_id; - + - + @@ -18244,7 +19428,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18253,8 +19437,12 @@ typedef void* MTLSharedEvent_id; + + + + - + @@ -18265,7 +19453,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18289,7 +19477,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18301,7 +19489,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18310,6 +19498,7 @@ typedef void* MTLSharedEvent_id; + @@ -18319,9 +19508,9 @@ typedef void* MTLSharedEvent_id; - + - + @@ -18331,7 +19520,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18340,9 +19529,9 @@ typedef void* MTLSharedEvent_id; - + - + @@ -18375,9 +19564,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -18407,9 +19597,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -18421,7 +19612,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18445,7 +19636,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18456,7 +19647,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18470,7 +19661,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18513,13 +19704,14 @@ typedef void* MTLSharedEvent_id; + - + @@ -18552,7 +19744,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18574,9 +19766,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -18596,7 +19789,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18606,7 +19799,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18622,21 +19815,21 @@ typedef void* MTLSharedEvent_id; - + - + - + @@ -18646,7 +19839,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18682,7 +19875,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18708,7 +19901,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18723,13 +19916,13 @@ typedef void* MTLSharedEvent_id; - + - + @@ -18741,10 +19934,10 @@ typedef void* MTLSharedEvent_id; - + - - + + @@ -18768,32 +19961,46 @@ typedef void* MTLSharedEvent_id; + - - + + + + + + - + - - + + + + + - - - - + + + + + + - + + + + + - + @@ -18812,6 +20019,13 @@ typedef void* MTLSharedEvent_id; + + + + + + + @@ -18820,7 +20034,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18838,7 +20052,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18861,7 +20075,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18873,7 +20087,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18892,7 +20106,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18900,7 +20114,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18960,7 +20174,7 @@ typedef void* MTLSharedEvent_id; - + @@ -18999,6 +20213,8 @@ typedef void* MTLSharedEvent_id; + + @@ -19052,6 +20268,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -19059,6 +20278,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -19103,6 +20325,11 @@ typedef void* MTLSharedEvent_id; + + + + + @@ -19111,6 +20338,7 @@ typedef void* MTLSharedEvent_id; + @@ -19119,7 +20347,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19128,8 +20356,12 @@ typedef void* MTLSharedEvent_id; + + + + - + @@ -19144,9 +20376,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -19229,13 +20462,14 @@ typedef void* MTLSharedEvent_id; + - + @@ -19248,7 +20482,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19283,7 +20517,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19301,7 +20535,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19324,15 +20558,30 @@ typedef void* MTLSharedEvent_id; - - - + + + + + + + + + + + + + + + + + + - + @@ -19341,6 +20590,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -19368,13 +20620,14 @@ typedef void* MTLSharedEvent_id; + - + - + @@ -19478,6 +20731,7 @@ typedef void* MTLSharedEvent_id; + @@ -19486,7 +20740,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19499,7 +20753,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19507,7 +20761,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19519,7 +20773,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19539,12 +20793,16 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + + @@ -19555,6 +20813,7 @@ typedef void* MTLSharedEvent_id; + @@ -19569,9 +20828,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -19586,12 +20846,15 @@ typedef void* MTLSharedEvent_id; - + + + + @@ -19599,6 +20862,7 @@ typedef void* MTLSharedEvent_id; + @@ -19607,6 +20871,7 @@ typedef void* MTLSharedEvent_id; + @@ -19615,7 +20880,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19625,7 +20890,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19640,7 +20905,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19654,7 +20919,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19675,22 +20940,27 @@ typedef void* MTLSharedEvent_id; - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -19699,20 +20969,21 @@ typedef void* MTLSharedEvent_id; - + - - + + + - + @@ -19720,11 +20991,14 @@ typedef void* MTLSharedEvent_id; - + + + + @@ -19749,13 +21023,13 @@ typedef void* MTLSharedEvent_id; - + - - + + @@ -19773,7 +21047,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19785,14 +21059,14 @@ typedef void* MTLSharedEvent_id; - + - + @@ -19809,19 +21083,20 @@ typedef void* MTLSharedEvent_id; - + - + - + + @@ -19836,13 +21111,20 @@ typedef void* MTLSharedEvent_id; - + + + + + + + + - + @@ -19856,6 +21138,7 @@ typedef void* MTLSharedEvent_id; + @@ -19870,9 +21153,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -19883,6 +21167,13 @@ typedef void* MTLSharedEvent_id; + + + + + + + @@ -19909,6 +21200,7 @@ typedef void* MTLSharedEvent_id; + @@ -19923,9 +21215,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -19970,9 +21263,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -19980,7 +21274,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19992,7 +21286,7 @@ typedef void* MTLSharedEvent_id; - + @@ -20008,6 +21302,7 @@ typedef void* MTLSharedEvent_id; + @@ -20016,7 +21311,7 @@ typedef void* MTLSharedEvent_id; - + @@ -20027,7 +21322,7 @@ typedef void* MTLSharedEvent_id; - + @@ -20046,10 +21341,17 @@ typedef void* MTLSharedEvent_id; + + + + + + + @@ -20070,6 +21372,7 @@ typedef void* MTLSharedEvent_id; + @@ -20078,7 +21381,7 @@ typedef void* MTLSharedEvent_id; - + @@ -20086,13 +21389,13 @@ typedef void* MTLSharedEvent_id; - + - + @@ -20104,12 +21407,14 @@ typedef void* MTLSharedEvent_id; + + - + @@ -20129,12 +21434,21 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + - + @@ -20158,6 +21472,7 @@ typedef void* MTLSharedEvent_id; + @@ -20172,19 +21487,20 @@ typedef void* MTLSharedEvent_id; - + - + - - - + + + + @@ -20193,12 +21509,14 @@ typedef void* MTLSharedEvent_id; - + + + @@ -20207,15 +21525,16 @@ typedef void* MTLSharedEvent_id; + - + - + @@ -20223,7 +21542,7 @@ typedef void* MTLSharedEvent_id; - + @@ -20231,9 +21550,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20247,6 +21567,7 @@ typedef void* MTLSharedEvent_id; + @@ -20263,6 +21584,7 @@ typedef void* MTLSharedEvent_id; + @@ -20294,13 +21616,19 @@ typedef void* MTLSharedEvent_id; + - + + + + + + @@ -20317,7 +21645,7 @@ typedef void* MTLSharedEvent_id; - + @@ -20325,7 +21653,7 @@ typedef void* MTLSharedEvent_id; - + @@ -20342,6 +21670,7 @@ typedef void* MTLSharedEvent_id; + @@ -20372,6 +21701,7 @@ typedef void* MTLSharedEvent_id; + @@ -20387,22 +21717,25 @@ typedef void* MTLSharedEvent_id; + - + + - + + @@ -20411,9 +21744,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20424,9 +21758,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20444,14 +21779,11 @@ typedef void* MTLSharedEvent_id; - - - - + - + @@ -20483,9 +21815,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20499,23 +21832,35 @@ typedef void* MTLSharedEvent_id; - - - - + + + + + + + + + - + + + + + + + + @@ -20525,6 +21870,7 @@ typedef void* MTLSharedEvent_id; + @@ -20549,9 +21895,10 @@ typedef void* MTLSharedEvent_id; - - + + + @@ -20560,7 +21907,7 @@ typedef void* MTLSharedEvent_id; - + @@ -20590,9 +21937,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20602,11 +21950,11 @@ typedef void* MTLSharedEvent_id; - - - - - + + + + + @@ -20632,24 +21980,26 @@ typedef void* MTLSharedEvent_id; + - + - - - - - - - - - - - - + + + + + + + + + + + + + @@ -20666,18 +22016,18 @@ typedef void* MTLSharedEvent_id; - + - + - - + + @@ -20686,7 +22036,7 @@ typedef void* MTLSharedEvent_id; - + @@ -20694,21 +22044,26 @@ typedef void* MTLSharedEvent_id; - + + - + + + + + - + @@ -20742,14 +22097,16 @@ typedef void* MTLSharedEvent_id; + - + + @@ -20798,6 +22155,7 @@ typedef void* MTLSharedEvent_id; + @@ -20808,6 +22166,7 @@ typedef void* MTLSharedEvent_id; + @@ -20824,9 +22183,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20834,9 +22194,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20859,9 +22220,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20874,9 +22236,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20884,7 +22247,7 @@ typedef void* MTLSharedEvent_id; - + @@ -20892,9 +22255,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20906,6 +22270,7 @@ typedef void* MTLSharedEvent_id; + @@ -20949,13 +22314,13 @@ typedef void* MTLSharedEvent_id; - + - + @@ -20980,9 +22345,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -20996,6 +22362,7 @@ typedef void* MTLSharedEvent_id; + @@ -21015,6 +22382,7 @@ typedef void* MTLSharedEvent_id; + @@ -21036,6 +22404,7 @@ typedef void* MTLSharedEvent_id; + @@ -21044,7 +22413,7 @@ typedef void* MTLSharedEvent_id; - + @@ -21132,9 +22501,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -21195,13 +22565,14 @@ typedef void* MTLSharedEvent_id; + - + @@ -21219,14 +22590,14 @@ typedef void* MTLSharedEvent_id; - + - + @@ -21234,7 +22605,7 @@ typedef void* MTLSharedEvent_id; - + @@ -21302,6 +22673,54 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21323,6 +22742,7 @@ typedef void* MTLSharedEvent_id; + @@ -21332,13 +22752,18 @@ typedef void* MTLSharedEvent_id; - + + + + + + @@ -21372,16 +22797,6 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - @@ -21393,7 +22808,7 @@ typedef void* MTLSharedEvent_id; - + @@ -21444,6 +22859,7 @@ typedef void* MTLSharedEvent_id; + @@ -21471,7 +22887,7 @@ typedef void* MTLSharedEvent_id; - + @@ -21487,6 +22903,7 @@ typedef void* MTLSharedEvent_id; + @@ -21495,6 +22912,7 @@ typedef void* MTLSharedEvent_id; + @@ -21505,6 +22923,7 @@ typedef void* MTLSharedEvent_id; + @@ -21513,6 +22932,7 @@ typedef void* MTLSharedEvent_id; + @@ -21527,6 +22947,7 @@ typedef void* MTLSharedEvent_id; + @@ -21542,6 +22963,7 @@ typedef void* MTLSharedEvent_id; + @@ -21565,6 +22987,7 @@ typedef void* MTLSharedEvent_id; + @@ -21582,14 +23005,25 @@ typedef void* MTLSharedEvent_id; - + + + + + + + + + + + + @@ -21597,7 +23031,7 @@ typedef void* MTLSharedEvent_id; - + VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT and @@ -21612,6 +23046,7 @@ typedef void* MTLSharedEvent_id; + @@ -21620,7 +23055,7 @@ typedef void* MTLSharedEvent_id; - + @@ -21629,9 +23064,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -21645,12 +23081,13 @@ typedef void* MTLSharedEvent_id; - + + @@ -21659,9 +23096,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -21703,9 +23141,9 @@ typedef void* MTLSharedEvent_id; - + - + @@ -21715,9 +23153,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -21728,9 +23167,10 @@ typedef void* MTLSharedEvent_id; + - + VkPhysicalDevice4444FormatsFeaturesEXT and @@ -21743,9 +23183,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -21761,9 +23202,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -21783,15 +23225,16 @@ typedef void* MTLSharedEvent_id; - + + - + @@ -21799,7 +23242,7 @@ typedef void* MTLSharedEvent_id; - + @@ -21834,9 +23277,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -21848,15 +23292,14 @@ typedef void* MTLSharedEvent_id; + - + - - @@ -21867,14 +23310,15 @@ typedef void* MTLSharedEvent_id; - - - - - + + + + + + - + @@ -21882,14 +23326,16 @@ typedef void* MTLSharedEvent_id; + - + + @@ -21910,20 +23356,55 @@ typedef void* MTLSharedEvent_id; - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + + @@ -21938,7 +23419,7 @@ typedef void* MTLSharedEvent_id; - + @@ -21953,7 +23434,7 @@ typedef void* MTLSharedEvent_id; - + @@ -21966,7 +23447,7 @@ typedef void* MTLSharedEvent_id; - + @@ -22034,6 +23515,7 @@ typedef void* MTLSharedEvent_id; + @@ -22046,6 +23528,7 @@ typedef void* MTLSharedEvent_id; + @@ -22060,6 +23543,7 @@ typedef void* MTLSharedEvent_id; + @@ -22073,6 +23557,7 @@ typedef void* MTLSharedEvent_id; + @@ -22107,6 +23592,8 @@ typedef void* MTLSharedEvent_id; + + @@ -22129,6 +23616,7 @@ typedef void* MTLSharedEvent_id; + @@ -22141,9 +23629,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -22154,9 +23643,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -22172,9 +23662,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -22197,7 +23688,7 @@ typedef void* MTLSharedEvent_id; - + @@ -22207,15 +23698,17 @@ typedef void* MTLSharedEvent_id; + - + + @@ -22244,6 +23737,7 @@ typedef void* MTLSharedEvent_id; + @@ -22256,6 +23750,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -22267,11 +23764,12 @@ typedef void* MTLSharedEvent_id; - - - + + + + @@ -22286,7 +23784,7 @@ typedef void* MTLSharedEvent_id; - + @@ -22294,9 +23792,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -22308,18 +23807,20 @@ typedef void* MTLSharedEvent_id; + - + + - + @@ -22334,6 +23835,7 @@ typedef void* MTLSharedEvent_id; + @@ -22400,6 +23902,7 @@ typedef void* MTLSharedEvent_id; + @@ -22416,6 +23919,7 @@ typedef void* MTLSharedEvent_id; + @@ -22430,11 +23934,11 @@ typedef void* MTLSharedEvent_id; - + - + @@ -22471,6 +23975,7 @@ typedef void* MTLSharedEvent_id; + @@ -22509,7 +24014,7 @@ typedef void* MTLSharedEvent_id; - + @@ -22517,6 +24022,7 @@ typedef void* MTLSharedEvent_id; + @@ -22526,6 +24032,7 @@ typedef void* MTLSharedEvent_id; + @@ -22544,6 +24051,7 @@ typedef void* MTLSharedEvent_id; + @@ -22552,7 +24060,7 @@ typedef void* MTLSharedEvent_id; - + @@ -22560,14 +24068,15 @@ typedef void* MTLSharedEvent_id; - + - - - + + + + @@ -22582,6 +24091,7 @@ typedef void* MTLSharedEvent_id; + @@ -22593,6 +24103,7 @@ typedef void* MTLSharedEvent_id; + @@ -22614,23 +24125,26 @@ typedef void* MTLSharedEvent_id; + - + + - + + @@ -22653,11 +24167,12 @@ typedef void* MTLSharedEvent_id; + - + @@ -22666,6 +24181,7 @@ typedef void* MTLSharedEvent_id; + @@ -22680,6 +24196,7 @@ typedef void* MTLSharedEvent_id; + @@ -22695,6 +24212,7 @@ typedef void* MTLSharedEvent_id; + @@ -22714,13 +24232,14 @@ typedef void* MTLSharedEvent_id; + - + @@ -22730,6 +24249,7 @@ typedef void* MTLSharedEvent_id; + @@ -22747,7 +24267,7 @@ typedef void* MTLSharedEvent_id; - + @@ -22759,9 +24279,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -22781,6 +24302,7 @@ typedef void* MTLSharedEvent_id; + @@ -22812,6 +24334,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -22888,10 +24413,11 @@ typedef void* MTLSharedEvent_id; - - + + + @@ -22902,10 +24428,10 @@ typedef void* MTLSharedEvent_id; - + - + @@ -22913,7 +24439,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23024,6 +24550,24 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + + + + @@ -23052,9 +24596,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -23081,7 +24626,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23096,9 +24641,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -23158,35 +24704,38 @@ typedef void* MTLSharedEvent_id; + - + + - - + + + - + - - - + + + + - @@ -23199,6 +24748,7 @@ typedef void* MTLSharedEvent_id; + @@ -23210,18 +24760,18 @@ typedef void* MTLSharedEvent_id; - + - - - - + + + + - - + + @@ -23230,115 +24780,126 @@ typedef void* MTLSharedEvent_id; - - + + + + + + + + + + + + + + + + + - - - - - - + + - + - - + + - - + + - - + + - + - - - - - - - + + + + + + + - + - + - + - + - + - - + + - - - + + + - + - + - + - + - + - - + + - - + + - - + + - + - - + + - - - + + + - - + + @@ -23371,10 +24932,20 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + + + + + + + + @@ -23387,7 +24958,6 @@ typedef void* MTLSharedEvent_id; - @@ -23409,6 +24979,7 @@ typedef void* MTLSharedEvent_id; + @@ -23469,6 +25040,7 @@ typedef void* MTLSharedEvent_id; + @@ -23536,12 +25108,48 @@ typedef void* MTLSharedEvent_id; - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -23554,6 +25162,7 @@ typedef void* MTLSharedEvent_id; + @@ -23567,6 +25176,7 @@ typedef void* MTLSharedEvent_id; + @@ -23587,13 +25197,14 @@ typedef void* MTLSharedEvent_id; + - + @@ -23603,6 +25214,8 @@ typedef void* MTLSharedEvent_id; + + @@ -23637,6 +25250,7 @@ typedef void* MTLSharedEvent_id; + @@ -23654,6 +25268,7 @@ typedef void* MTLSharedEvent_id; + @@ -23674,15 +25289,21 @@ typedef void* MTLSharedEvent_id; + - + - - + + + + + + + - + @@ -23700,6 +25321,7 @@ typedef void* MTLSharedEvent_id; + @@ -23708,6 +25330,7 @@ typedef void* MTLSharedEvent_id; + @@ -23716,6 +25339,7 @@ typedef void* MTLSharedEvent_id; + @@ -23746,9 +25370,10 @@ typedef void* MTLSharedEvent_id; + - + @@ -23792,17 +25417,18 @@ typedef void* MTLSharedEvent_id; + - - - - - + + + + + @@ -23824,16 +25450,22 @@ typedef void* MTLSharedEvent_id; - + + - + - - + + + + + + + - + @@ -23851,10 +25483,47 @@ typedef void* MTLSharedEvent_id; - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -23874,15 +25543,17 @@ typedef void* MTLSharedEvent_id; + - + + @@ -23902,6 +25573,7 @@ typedef void* MTLSharedEvent_id; + @@ -23915,6 +25587,7 @@ typedef void* MTLSharedEvent_id; + @@ -23925,6 +25598,7 @@ typedef void* MTLSharedEvent_id; + @@ -23934,6 +25608,7 @@ typedef void* MTLSharedEvent_id; + @@ -23948,7 +25623,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23956,26 +25631,28 @@ typedef void* MTLSharedEvent_id; + - + - - - + + + + - + - + @@ -23985,33 +25662,35 @@ typedef void* MTLSharedEvent_id; - + + - + - + - - - - - + + + + + + - + @@ -24023,7 +25702,7 @@ typedef void* MTLSharedEvent_id; - + @@ -24032,28 +25711,34 @@ typedef void* MTLSharedEvent_id; - + - - - - + + + + + - + - - - - - - + + + + + + + + + + + @@ -24104,7 +25789,7 @@ typedef void* MTLSharedEvent_id; - + @@ -24115,23 +25800,24 @@ typedef void* MTLSharedEvent_id; - + - - - + + + + - + - - - - - + + + + + @@ -24139,10 +25825,11 @@ typedef void* MTLSharedEvent_id; + - - + + @@ -24167,6 +25854,7 @@ typedef void* MTLSharedEvent_id; + @@ -24185,6 +25873,7 @@ typedef void* MTLSharedEvent_id; + @@ -24196,10 +25885,15 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + + + @@ -24208,20 +25902,53 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -24236,6 +25963,7 @@ typedef void* MTLSharedEvent_id; + @@ -24250,16 +25978,22 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + - + - - + + + + + @@ -24274,10 +26008,24 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + + + + + + + + + + + + @@ -24286,12 +26034,16 @@ typedef void* MTLSharedEvent_id; + - + - - + + + + + @@ -24318,6 +26070,7 @@ typedef void* MTLSharedEvent_id; + @@ -24338,11 +26091,82 @@ typedef void* MTLSharedEvent_id; - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -24355,12 +26179,267 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + @@ -24409,13 +26488,13 @@ typedef void* MTLSharedEvent_id; - + - + @@ -25998,12 +28077,15 @@ typedef void* MTLSharedEvent_id; + + + @@ -26012,6 +28094,21 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + @@ -26216,8 +28313,6 @@ typedef void* MTLSharedEvent_id; - - @@ -26359,21 +28454,17 @@ typedef void* MTLSharedEvent_id; - + + - + + - - - - - - @@ -26404,13 +28495,14 @@ typedef void* MTLSharedEvent_id; + - + @@ -26428,7 +28520,7 @@ typedef void* MTLSharedEvent_id; - + @@ -26446,24 +28538,25 @@ typedef void* MTLSharedEvent_id; - + - + - + - + + @@ -26495,6 +28588,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -26511,23 +28607,44 @@ typedef void* MTLSharedEvent_id; - + + - + + - + + - - - + + + + + + + + + + + + + + + + + + + + + @@ -26619,6 +28736,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -26759,6 +28879,12 @@ typedef void* MTLSharedEvent_id; + + + + + + @@ -26838,8 +28964,8 @@ typedef void* MTLSharedEvent_id; VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI - - VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV + + VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR @@ -26864,4 +28990,114 @@ typedef void* MTLSharedEvent_id; VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/overrungl.core/src/main/java/module-info.java b/modules/overrungl.core/src/main/java/module-info.java index 9a688dfa..8fd6be19 100644 --- a/modules/overrungl.core/src/main/java/module-info.java +++ b/modules/overrungl.core/src/main/java/module-info.java @@ -29,7 +29,8 @@ overrungl.nfd, overrungl.openal, overrungl.opengl, - overrungl.stb; + overrungl.stb, + overrungl.vulkan; requires transitive io.github.overrun.platform; requires static org.jetbrains.annotations; diff --git a/modules/overrungl.core/src/main/java/overrungl/struct/Struct.java b/modules/overrungl.core/src/main/java/overrungl/struct/Struct.java index aa46e0cf..318d825d 100644 --- a/modules/overrungl.core/src/main/java/overrungl/struct/Struct.java +++ b/modules/overrungl.core/src/main/java/overrungl/struct/Struct.java @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2024 Overrun Organization + * Copyright (c) 2024-2025 Overrun Organization * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -69,7 +69,7 @@ public MemorySegment segment() { } /// {@return the layout of this struct} - public StructLayout layout() { + public StructLayout structLayout() { return layout; } } diff --git a/modules/overrungl.core/src/main/java/overrungl/struct/Union.java b/modules/overrungl.core/src/main/java/overrungl/struct/Union.java new file mode 100644 index 00000000..0ad99868 --- /dev/null +++ b/modules/overrungl.core/src/main/java/overrungl/struct/Union.java @@ -0,0 +1,71 @@ +/* + * MIT License + * + * Copyright (c) 2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +package overrungl.struct; + +import overrungl.util.Unmarshal; + +import java.lang.foreign.MemorySegment; +import java.lang.foreign.UnionLayout; + +/// A representation of a C union. Subclasses should declare a [UnionLayout]. +/// +/// @author squid233 +/// @since 0.1.0 +public abstract class Union { + private final MemorySegment segment; + private final UnionLayout layout; + + /// The constructor which accepts a backing segment and the layout of a `Union` instance. + /// + /// Subclasses should pass their own layout to this constructor. + /// + /// @param segment the backing segment + /// @param layout the layout of the union + public Union(MemorySegment segment, UnionLayout layout) { + this.segment = segment; + this.layout = layout; + } + + /// Estimates the element count of the union buffer in the given segment. + /// + /// @param segment the segment which contains a buffer of union + /// @param layout the layout of the union + /// @return the estimated element count of the union buffer + public static long estimateCount(MemorySegment segment, UnionLayout layout) { + if (Unmarshal.isNullPointer(segment)) { + return 0; + } + return segment.byteSize() / layout.byteSize(); + } + + /// Estimates the element count of this union buffer. + /// + /// @return the estimated element count of the union buffer + public long estimateCount() { + return estimateCount(segment, layout); + } + + /// {@return the segment of this union} + public MemorySegment segment() { + return segment; + } + + /// {@return the layout of this union} + public UnionLayout unionLayout() { + return layout; + } +} diff --git a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWAllocator.java b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWAllocator.java index f6eb85bc..fdd6be24 100644 --- a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWAllocator.java +++ b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWAllocator.java @@ -69,6 +69,21 @@ public final class GLFWAllocator extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static GLFWAllocator of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new GLFWAllocator(segment); } + /// Creates `GLFWAllocator` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static GLFWAllocator ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new GLFWAllocator(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `GLFWAllocator` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static GLFWAllocator ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new GLFWAllocator(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `GLFWAllocator` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `GLFWAllocator` diff --git a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWGamepadState.java b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWGamepadState.java index cce48b42..8497acb2 100644 --- a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWGamepadState.java +++ b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWGamepadState.java @@ -26,9 +26,9 @@ /// ## Members /// ### buttons -/// [Byte offset handle][#MH_buttons] - [Memory layout][#ML_buttons] - Getter - Setter +/// [Byte offset handle][#MH_buttons] - [Memory layout][#ML_buttons] - [Getter][#buttons(long)] - [Setter][#buttons(long, java.lang.foreign.MemorySegment)] /// ### axes -/// [Byte offset handle][#MH_axes] - [Memory layout][#ML_axes] - Getter - Setter +/// [Byte offset handle][#MH_axes] - [Memory layout][#ML_axes] - [Getter][#axes(long)] - [Setter][#axes(long, java.lang.foreign.MemorySegment)] /// ## Layout /// [Java definition][#LAYOUT] /// ```c @@ -40,8 +40,8 @@ public final class GLFWGamepadState extends Struct { /// The struct layout of `GLFWgamepadstate`. public static final StructLayout LAYOUT = LayoutBuilder.struct( - MemoryLayout.sequenceLayout(15L, ValueLayout.JAVA_BYTE).withName("buttons"), - MemoryLayout.sequenceLayout(6L, ValueLayout.JAVA_FLOAT).withName("axes") + MemoryLayout.sequenceLayout(15, ValueLayout.JAVA_BYTE).withName("buttons"), + MemoryLayout.sequenceLayout(6, ValueLayout.JAVA_FLOAT).withName("axes") ); /// The byte offset handle of `buttons` of type `(long baseOffset, long elementIndex)long`. public static final MethodHandle MH_buttons = LAYOUT.byteOffsetHandle(PathElement.groupElement("buttons"), PathElement.sequenceElement()); @@ -61,6 +61,21 @@ public final class GLFWGamepadState extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static GLFWGamepadState of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new GLFWGamepadState(segment); } + /// Creates `GLFWGamepadState` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static GLFWGamepadState ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new GLFWGamepadState(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `GLFWGamepadState` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static GLFWGamepadState ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new GLFWGamepadState(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `GLFWGamepadState` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `GLFWGamepadState` diff --git a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWGammaRamp.java b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWGammaRamp.java index e2dee9cd..2a0f389a 100644 --- a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWGammaRamp.java +++ b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWGammaRamp.java @@ -69,6 +69,21 @@ public final class GLFWGammaRamp extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static GLFWGammaRamp of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new GLFWGammaRamp(segment); } + /// Creates `GLFWGammaRamp` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static GLFWGammaRamp ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new GLFWGammaRamp(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `GLFWGammaRamp` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static GLFWGammaRamp ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new GLFWGammaRamp(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `GLFWGammaRamp` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `GLFWGammaRamp` diff --git a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWImage.java b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWImage.java index 02ec160b..1eae9171 100644 --- a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWImage.java +++ b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWImage.java @@ -63,6 +63,21 @@ public final class GLFWImage extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static GLFWImage of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new GLFWImage(segment); } + /// Creates `GLFWImage` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static GLFWImage ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new GLFWImage(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `GLFWImage` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static GLFWImage ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new GLFWImage(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `GLFWImage` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `GLFWImage` diff --git a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWNative.java b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWNative.java index e11a6a8d..8bea261e 100644 --- a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWNative.java +++ b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWNative.java @@ -203,7 +203,7 @@ private Handles() { } } else { throw new SymbolNotFoundError("Symbol not found: glfwGetX11Monitor"); } } - public static @CType("RROutput") long glfwGetX11Window(@CType("GLFWwindow*") java.lang.foreign.MemorySegment window) { + public static @CType("Window") long glfwGetX11Window(@CType("GLFWwindow*") java.lang.foreign.MemorySegment window) { if (Handles.MH_glfwGetX11Window != null) { try { return (long) Handles.MH_glfwGetX11Window.invokeExact(window); diff --git a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWVidMode.java b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWVidMode.java index 869ec4d5..ea6404af 100644 --- a/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWVidMode.java +++ b/modules/overrungl.glfw/src/main/java/overrungl/glfw/GLFWVidMode.java @@ -81,6 +81,21 @@ public final class GLFWVidMode extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static GLFWVidMode of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new GLFWVidMode(segment); } + /// Creates `GLFWVidMode` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static GLFWVidMode ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new GLFWVidMode(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `GLFWVidMode` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static GLFWVidMode ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new GLFWVidMode(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `GLFWVidMode` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `GLFWVidMode` diff --git a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDFilterItem.java b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDFilterItem.java index 1909b3d7..2baf0a22 100644 --- a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDFilterItem.java +++ b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDFilterItem.java @@ -57,6 +57,21 @@ public final class NFDFilterItem extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static NFDFilterItem of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new NFDFilterItem(segment); } + /// Creates `NFDFilterItem` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static NFDFilterItem ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new NFDFilterItem(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `NFDFilterItem` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static NFDFilterItem ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new NFDFilterItem(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `NFDFilterItem` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `NFDFilterItem` diff --git a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDOpenDialogArgs.java b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDOpenDialogArgs.java index 52e8461c..effcad2b 100644 --- a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDOpenDialogArgs.java +++ b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDOpenDialogArgs.java @@ -71,6 +71,21 @@ public final class NFDOpenDialogArgs extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static NFDOpenDialogArgs of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new NFDOpenDialogArgs(segment); } + /// Creates `NFDOpenDialogArgs` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static NFDOpenDialogArgs ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new NFDOpenDialogArgs(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `NFDOpenDialogArgs` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static NFDOpenDialogArgs ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new NFDOpenDialogArgs(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `NFDOpenDialogArgs` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `NFDOpenDialogArgs` diff --git a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDPickFolderArgs.java b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDPickFolderArgs.java index b4c95776..a9090526 100644 --- a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDPickFolderArgs.java +++ b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDPickFolderArgs.java @@ -59,6 +59,21 @@ public final class NFDPickFolderArgs extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static NFDPickFolderArgs of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new NFDPickFolderArgs(segment); } + /// Creates `NFDPickFolderArgs` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static NFDPickFolderArgs ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new NFDPickFolderArgs(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `NFDPickFolderArgs` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static NFDPickFolderArgs ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new NFDPickFolderArgs(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `NFDPickFolderArgs` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `NFDPickFolderArgs` diff --git a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDSaveDialogArgs.java b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDSaveDialogArgs.java index 6adf3fde..912f5e28 100644 --- a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDSaveDialogArgs.java +++ b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDSaveDialogArgs.java @@ -77,6 +77,21 @@ public final class NFDSaveDialogArgs extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static NFDSaveDialogArgs of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new NFDSaveDialogArgs(segment); } + /// Creates `NFDSaveDialogArgs` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static NFDSaveDialogArgs ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new NFDSaveDialogArgs(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `NFDSaveDialogArgs` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static NFDSaveDialogArgs ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new NFDSaveDialogArgs(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `NFDSaveDialogArgs` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `NFDSaveDialogArgs` diff --git a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDWindowHandle.java b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDWindowHandle.java index f72ad277..babc79f4 100644 --- a/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDWindowHandle.java +++ b/modules/overrungl.nfd/src/main/java/overrungl/nfd/NFDWindowHandle.java @@ -57,6 +57,21 @@ public final class NFDWindowHandle extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static NFDWindowHandle of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new NFDWindowHandle(segment); } + /// Creates `NFDWindowHandle` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static NFDWindowHandle ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new NFDWindowHandle(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `NFDWindowHandle` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static NFDWindowHandle ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new NFDWindowHandle(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `NFDWindowHandle` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `NFDWindowHandle` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIIOCallbacks.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBIIOCallbacks.java index 93b89a13..d0555fab 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIIOCallbacks.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBIIOCallbacks.java @@ -63,6 +63,21 @@ public final class STBIIOCallbacks extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBIIOCallbacks of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBIIOCallbacks(segment); } + /// Creates `STBIIOCallbacks` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBIIOCallbacks ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBIIOCallbacks(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBIIOCallbacks` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBIIOCallbacks ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBIIOCallbacks(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBIIOCallbacks` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBIIOCallbacks` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIR_RESIZE.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBIR_RESIZE.java index fc31b3a4..166a90ca 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBIR_RESIZE.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBIR_RESIZE.java @@ -261,6 +261,21 @@ public final class STBIR_RESIZE extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBIR_RESIZE of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBIR_RESIZE(segment); } + /// Creates `STBIR_RESIZE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBIR_RESIZE ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBIR_RESIZE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBIR_RESIZE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBIR_RESIZE ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBIR_RESIZE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBIR_RESIZE` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBIR_RESIZE` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPContext.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPContext.java index c77d571a..cfeaa1bd 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPContext.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPContext.java @@ -60,7 +60,7 @@ public final class STBRPContext extends Struct { ValueLayout.JAVA_INT.withName("num_nodes"), ValueLayout.ADDRESS.withTargetLayout(overrungl.stb.STBRPNode.LAYOUT).withName("active_head"), ValueLayout.ADDRESS.withTargetLayout(overrungl.stb.STBRPNode.LAYOUT).withName("free_head"), - MemoryLayout.sequenceLayout(2L, overrungl.stb.STBRPNode.LAYOUT).withName("extra") + MemoryLayout.sequenceLayout(2, overrungl.stb.STBRPNode.LAYOUT).withName("extra") ); /// Creates `STBRPContext` with the given segment. @@ -72,6 +72,21 @@ public final class STBRPContext extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBRPContext of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBRPContext(segment); } + /// Creates `STBRPContext` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBRPContext ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBRPContext(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBRPContext` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBRPContext ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBRPContext(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBRPContext` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBRPContext` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPNode.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPNode.java index ffded714..96f676be 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPNode.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPNode.java @@ -54,6 +54,21 @@ public final class STBRPNode extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBRPNode of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBRPNode(segment); } + /// Creates `STBRPNode` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBRPNode ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBRPNode(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBRPNode` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBRPNode ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBRPNode(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBRPNode` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBRPNode` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPRect.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPRect.java index dfb3eaaa..a7381e08 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPRect.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBRPRect.java @@ -81,6 +81,21 @@ public final class STBRPRect extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBRPRect of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBRPRect(segment); } + /// Creates `STBRPRect` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBRPRect ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBRPRect(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBRPRect` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBRPRect ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBRPRect(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBRPRect` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBRPRect` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTAlignedQuad.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTAlignedQuad.java index ce846f4e..735575b6 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTAlignedQuad.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTAlignedQuad.java @@ -93,6 +93,21 @@ public final class STBTTAlignedQuad extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBTTAlignedQuad of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTAlignedQuad(segment); } + /// Creates `STBTTAlignedQuad` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTAlignedQuad ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTAlignedQuad(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBTTAlignedQuad` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTAlignedQuad ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBTTAlignedQuad(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBTTAlignedQuad` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBTTAlignedQuad` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTBakedChar.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTBakedChar.java index bbe9913c..510cff71 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTBakedChar.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTBakedChar.java @@ -87,6 +87,21 @@ public final class STBTTBakedChar extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBTTBakedChar of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTBakedChar(segment); } + /// Creates `STBTTBakedChar` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTBakedChar ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTBakedChar(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBTTBakedChar` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTBakedChar ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBTTBakedChar(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBTTBakedChar` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBTTBakedChar` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTFontInfo.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTFontInfo.java index df6f83bb..ec942001 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTFontInfo.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTFontInfo.java @@ -105,6 +105,21 @@ public final class STBTTFontInfo extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBTTFontInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTFontInfo(segment); } + /// Creates `STBTTFontInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTFontInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTFontInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBTTFontInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTFontInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBTTFontInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBTTFontInfo` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBTTFontInfo` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTKerningEntry.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTKerningEntry.java index 16e40346..664b2bf9 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTKerningEntry.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTKerningEntry.java @@ -63,6 +63,21 @@ public final class STBTTKerningEntry extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBTTKerningEntry of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTKerningEntry(segment); } + /// Creates `STBTTKerningEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTKerningEntry ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTKerningEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBTTKerningEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTKerningEntry ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBTTKerningEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBTTKerningEntry` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBTTKerningEntry` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTPackRange.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTPackRange.java index de3a6a81..a0d6c2a5 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTPackRange.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTPackRange.java @@ -87,6 +87,21 @@ public final class STBTTPackRange extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBTTPackRange of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTPackRange(segment); } + /// Creates `STBTTPackRange` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTPackRange ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTPackRange(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBTTPackRange` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTPackRange ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBTTPackRange(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBTTPackRange` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBTTPackRange` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTPackedChar.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTPackedChar.java index b39b71c3..cf60cef5 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTPackedChar.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTPackedChar.java @@ -99,6 +99,21 @@ public final class STBTTPackedChar extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBTTPackedChar of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTPackedChar(segment); } + /// Creates `STBTTPackedChar` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTPackedChar ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTPackedChar(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBTTPackedChar` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTPackedChar ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBTTPackedChar(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBTTPackedChar` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBTTPackedChar` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTVertex.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTVertex.java index 43cd7124..702d267f 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTVertex.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTTVertex.java @@ -93,6 +93,21 @@ public final class STBTTVertex extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBTTVertex of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTVertex(segment); } + /// Creates `STBTTVertex` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTVertex ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTTVertex(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBTTVertex` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBTTVertex ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBTTVertex(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBTTVertex` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBTTVertex` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTT__bitmap.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTT__bitmap.java index 042275ca..cfff8bef 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTT__bitmap.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTT__bitmap.java @@ -57,6 +57,21 @@ public final class STBTT__bitmap extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBTT__bitmap of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTT__bitmap(segment); } + /// Creates `STBTT__bitmap` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBTT__bitmap ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTT__bitmap(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBTT__bitmap` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBTT__bitmap ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBTT__bitmap(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBTT__bitmap` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBTT__bitmap` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTT__buf.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTT__buf.java index f9b43648..92e1f4c4 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBTT__buf.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBTT__buf.java @@ -54,6 +54,21 @@ public final class STBTT__buf extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBTT__buf of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTT__buf(segment); } + /// Creates `STBTT__buf` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBTT__buf ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBTT__buf(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBTT__buf` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBTT__buf ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBTT__buf(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBTT__buf` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBTT__buf` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisAlloc.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisAlloc.java index 72ae9445..c201ecbb 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisAlloc.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisAlloc.java @@ -57,6 +57,21 @@ public final class STBVorbisAlloc extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBVorbisAlloc of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBVorbisAlloc(segment); } + /// Creates `STBVorbisAlloc` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBVorbisAlloc ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBVorbisAlloc(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBVorbisAlloc` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBVorbisAlloc ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBVorbisAlloc(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBVorbisAlloc` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBVorbisAlloc` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisComment.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisComment.java index 0dabf3ce..b0938cc9 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisComment.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisComment.java @@ -63,6 +63,21 @@ public final class STBVorbisComment extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBVorbisComment of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBVorbisComment(segment); } + /// Creates `STBVorbisComment` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBVorbisComment ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBVorbisComment(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBVorbisComment` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBVorbisComment ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBVorbisComment(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBVorbisComment` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBVorbisComment` diff --git a/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisInfo.java b/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisInfo.java index fef75e25..c8ee7832 100644 --- a/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisInfo.java +++ b/modules/overrungl.stb/src/main/java/overrungl/stb/STBVorbisInfo.java @@ -81,6 +81,21 @@ public final class STBVorbisInfo extends Struct { /// @return the created instance or `null` if the segment is `NULL` public static STBVorbisInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBVorbisInfo(segment); } + /// Creates `STBVorbisInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static STBVorbisInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new STBVorbisInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `STBVorbisInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static STBVorbisInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new STBVorbisInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + /// Allocates a `STBVorbisInfo` with the given segment allocator. /// @param allocator the segment allocator /// @return the allocated `STBVorbisInfo` diff --git a/modules/overrungl.vulkan/build.gradle.kts b/modules/overrungl.vulkan/build.gradle.kts index 0e3160fe..49ddfb6c 100644 --- a/modules/overrungl.vulkan/build.gradle.kts +++ b/modules/overrungl.vulkan/build.gradle.kts @@ -1,3 +1,19 @@ +/* + * MIT License + * + * Copyright (c) 2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + plugins { id("module.conventions") id("submodule.conventions") @@ -5,4 +21,5 @@ plugins { overrunglModule { artifactName = "overrungl-vulkan" + publishInfo = Artifact.VULKAN } diff --git a/modules/overrungl.vulkan/src/main/java/module-info.java b/modules/overrungl.vulkan/src/main/java/module-info.java new file mode 100644 index 00000000..07299c18 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/module-info.java @@ -0,0 +1,80 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! + +/// The Vulkan binding. +module overrungl.vulkan { + exports overrungl.vulkan; + exports overrungl.vulkan.amd; + exports overrungl.vulkan.amdx; + exports overrungl.vulkan.android; + exports overrungl.vulkan.arm; + exports overrungl.vulkan.ext; + exports overrungl.vulkan.fuchsia; + exports overrungl.vulkan.ggp; + exports overrungl.vulkan.google; + exports overrungl.vulkan.huawei; + exports overrungl.vulkan.img; + exports overrungl.vulkan.intel; + exports overrungl.vulkan.khr; + exports overrungl.vulkan.lunarg; + exports overrungl.vulkan.mesa; + exports overrungl.vulkan.msft; + exports overrungl.vulkan.mvk; + exports overrungl.vulkan.nn; + exports overrungl.vulkan.nv; + exports overrungl.vulkan.nvx; + exports overrungl.vulkan.qcom; + exports overrungl.vulkan.qnx; + exports overrungl.vulkan.sec; + exports overrungl.vulkan.valve; + exports overrungl.vulkan.amd.struct; + exports overrungl.vulkan.amdx.struct; + exports overrungl.vulkan.amdx.union; + exports overrungl.vulkan.android.struct; + exports overrungl.vulkan.arm.struct; + exports overrungl.vulkan.ext.struct; + exports overrungl.vulkan.ext.union; + exports overrungl.vulkan.fuchsia.struct; + exports overrungl.vulkan.ggp.struct; + exports overrungl.vulkan.google.struct; + exports overrungl.vulkan.huawei.struct; + exports overrungl.vulkan.img.struct; + exports overrungl.vulkan.intel.struct; + exports overrungl.vulkan.intel.union; + exports overrungl.vulkan.khr.struct; + exports overrungl.vulkan.khr.union; + exports overrungl.vulkan.lunarg.struct; + exports overrungl.vulkan.mesa.struct; + exports overrungl.vulkan.msft.struct; + exports overrungl.vulkan.mvk.struct; + exports overrungl.vulkan.nn.struct; + exports overrungl.vulkan.nv.struct; + exports overrungl.vulkan.nv.union; + exports overrungl.vulkan.nvx.struct; + exports overrungl.vulkan.qcom.struct; + exports overrungl.vulkan.qnx.struct; + exports overrungl.vulkan.sec.struct; + exports overrungl.vulkan.struct; + exports overrungl.vulkan.union; + exports overrungl.vulkan.valve.struct; + exports overrungl.vulkan.upcall; + exports overrungl.vulkan.video; + + requires transitive overrungl.core; +} + diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK.java new file mode 100644 index 00000000..af001bb5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +package overrungl.vulkan; + +import overrungl.annotation.CType; + +import java.lang.foreign.MemorySegment; + +/** + * The latest Vulkan functions. + * + * @author squid233 + * @since 0.1.0 + */ +public class VK extends VK14 { + /// Creates an instance of Vulkan functions. + /// + /// @param instance the `VkInstance` + /// @param func the loading function + public VK(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + super(instance, func); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK10.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK10.java new file mode 100644 index 00000000..2a3a43a3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK10.java @@ -0,0 +1,1919 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VK10 { + public static final int VK_API_VERSION_1_0 = VK_MAKE_API_VERSION(0, 1, 0, 0); + public static final int VK_API_VERSION_1_1 = VK_MAKE_API_VERSION(0, 1, 1, 0); + public static final int VK_API_VERSION_1_2 = VK_MAKE_API_VERSION(0, 1, 2, 0); + public static final int VK_API_VERSION_1_3 = VK_MAKE_API_VERSION(0, 1, 3, 0); + public static final int VK_API_VERSION_1_4 = VK_MAKE_API_VERSION(0, 1, 4, 0); + public static final int VK_SUCCESS = 0; + public static final int VK_NOT_READY = 1; + public static final int VK_TIMEOUT = 2; + public static final int VK_EVENT_SET = 3; + public static final int VK_EVENT_RESET = 4; + public static final int VK_INCOMPLETE = 5; + public static final int VK_ERROR_OUT_OF_HOST_MEMORY = -1; + public static final int VK_ERROR_OUT_OF_DEVICE_MEMORY = -2; + public static final int VK_ERROR_INITIALIZATION_FAILED = -3; + public static final int VK_ERROR_DEVICE_LOST = -4; + public static final int VK_ERROR_MEMORY_MAP_FAILED = -5; + public static final int VK_ERROR_LAYER_NOT_PRESENT = -6; + public static final int VK_ERROR_EXTENSION_NOT_PRESENT = -7; + public static final int VK_ERROR_FEATURE_NOT_PRESENT = -8; + public static final int VK_ERROR_INCOMPATIBLE_DRIVER = -9; + public static final int VK_ERROR_TOO_MANY_OBJECTS = -10; + public static final int VK_ERROR_FORMAT_NOT_SUPPORTED = -11; + public static final int VK_ERROR_FRAGMENTED_POOL = -12; + public static final int VK_ERROR_UNKNOWN = -13; + public static final int VK_STRUCTURE_TYPE_APPLICATION_INFO = 0; + public static final int VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1; + public static final int VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2; + public static final int VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3; + public static final int VK_STRUCTURE_TYPE_SUBMIT_INFO = 4; + public static final int VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5; + public static final int VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6; + public static final int VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7; + public static final int VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9; + public static final int VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10; + public static final int VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11; + public static final int VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12; + public static final int VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13; + public static final int VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14; + public static final int VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15; + public static final int VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16; + public static final int VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17; + public static final int VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19; + public static final int VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20; + public static final int VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23; + public static final int VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24; + public static final int VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25; + public static final int VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26; + public static final int VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27; + public static final int VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28; + public static final int VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29; + public static final int VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30; + public static final int VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34; + public static final int VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35; + public static final int VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36; + public static final int VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38; + public static final int VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39; + public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40; + public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41; + public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43; + public static final int VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44; + public static final int VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45; + public static final int VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46; + public static final int VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47; + public static final int VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48; + public static final int VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1; + public static final int VK_OBJECT_TYPE_UNKNOWN = 0; + public static final int VK_OBJECT_TYPE_INSTANCE = 1; + public static final int VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2; + public static final int VK_OBJECT_TYPE_DEVICE = 3; + public static final int VK_OBJECT_TYPE_QUEUE = 4; + public static final int VK_OBJECT_TYPE_SEMAPHORE = 5; + public static final int VK_OBJECT_TYPE_COMMAND_BUFFER = 6; + public static final int VK_OBJECT_TYPE_FENCE = 7; + public static final int VK_OBJECT_TYPE_DEVICE_MEMORY = 8; + public static final int VK_OBJECT_TYPE_BUFFER = 9; + public static final int VK_OBJECT_TYPE_IMAGE = 10; + public static final int VK_OBJECT_TYPE_EVENT = 11; + public static final int VK_OBJECT_TYPE_QUERY_POOL = 12; + public static final int VK_OBJECT_TYPE_BUFFER_VIEW = 13; + public static final int VK_OBJECT_TYPE_IMAGE_VIEW = 14; + public static final int VK_OBJECT_TYPE_SHADER_MODULE = 15; + public static final int VK_OBJECT_TYPE_PIPELINE_CACHE = 16; + public static final int VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17; + public static final int VK_OBJECT_TYPE_RENDER_PASS = 18; + public static final int VK_OBJECT_TYPE_PIPELINE = 19; + public static final int VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20; + public static final int VK_OBJECT_TYPE_SAMPLER = 21; + public static final int VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22; + public static final int VK_OBJECT_TYPE_DESCRIPTOR_SET = 23; + public static final int VK_OBJECT_TYPE_FRAMEBUFFER = 24; + public static final int VK_OBJECT_TYPE_COMMAND_POOL = 25; + public static final int VK_VENDOR_ID_KHRONOS = 0x10000; + public static final int VK_VENDOR_ID_VIV = 0x10001; + public static final int VK_VENDOR_ID_VSI = 0x10002; + public static final int VK_VENDOR_ID_KAZAN = 0x10003; + public static final int VK_VENDOR_ID_CODEPLAY = 0x10004; + public static final int VK_VENDOR_ID_MESA = 0x10005; + public static final int VK_VENDOR_ID_POCL = 0x10006; + public static final int VK_VENDOR_ID_MOBILEYE = 0x10007; + public static final int VK_FORMAT_UNDEFINED = 0; + public static final int VK_FORMAT_R4G4_UNORM_PACK8 = 1; + public static final int VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2; + public static final int VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3; + public static final int VK_FORMAT_R5G6B5_UNORM_PACK16 = 4; + public static final int VK_FORMAT_B5G6R5_UNORM_PACK16 = 5; + public static final int VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6; + public static final int VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7; + public static final int VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8; + public static final int VK_FORMAT_R8_UNORM = 9; + public static final int VK_FORMAT_R8_SNORM = 10; + public static final int VK_FORMAT_R8_USCALED = 11; + public static final int VK_FORMAT_R8_SSCALED = 12; + public static final int VK_FORMAT_R8_UINT = 13; + public static final int VK_FORMAT_R8_SINT = 14; + public static final int VK_FORMAT_R8_SRGB = 15; + public static final int VK_FORMAT_R8G8_UNORM = 16; + public static final int VK_FORMAT_R8G8_SNORM = 17; + public static final int VK_FORMAT_R8G8_USCALED = 18; + public static final int VK_FORMAT_R8G8_SSCALED = 19; + public static final int VK_FORMAT_R8G8_UINT = 20; + public static final int VK_FORMAT_R8G8_SINT = 21; + public static final int VK_FORMAT_R8G8_SRGB = 22; + public static final int VK_FORMAT_R8G8B8_UNORM = 23; + public static final int VK_FORMAT_R8G8B8_SNORM = 24; + public static final int VK_FORMAT_R8G8B8_USCALED = 25; + public static final int VK_FORMAT_R8G8B8_SSCALED = 26; + public static final int VK_FORMAT_R8G8B8_UINT = 27; + public static final int VK_FORMAT_R8G8B8_SINT = 28; + public static final int VK_FORMAT_R8G8B8_SRGB = 29; + public static final int VK_FORMAT_B8G8R8_UNORM = 30; + public static final int VK_FORMAT_B8G8R8_SNORM = 31; + public static final int VK_FORMAT_B8G8R8_USCALED = 32; + public static final int VK_FORMAT_B8G8R8_SSCALED = 33; + public static final int VK_FORMAT_B8G8R8_UINT = 34; + public static final int VK_FORMAT_B8G8R8_SINT = 35; + public static final int VK_FORMAT_B8G8R8_SRGB = 36; + public static final int VK_FORMAT_R8G8B8A8_UNORM = 37; + public static final int VK_FORMAT_R8G8B8A8_SNORM = 38; + public static final int VK_FORMAT_R8G8B8A8_USCALED = 39; + public static final int VK_FORMAT_R8G8B8A8_SSCALED = 40; + public static final int VK_FORMAT_R8G8B8A8_UINT = 41; + public static final int VK_FORMAT_R8G8B8A8_SINT = 42; + public static final int VK_FORMAT_R8G8B8A8_SRGB = 43; + public static final int VK_FORMAT_B8G8R8A8_UNORM = 44; + public static final int VK_FORMAT_B8G8R8A8_SNORM = 45; + public static final int VK_FORMAT_B8G8R8A8_USCALED = 46; + public static final int VK_FORMAT_B8G8R8A8_SSCALED = 47; + public static final int VK_FORMAT_B8G8R8A8_UINT = 48; + public static final int VK_FORMAT_B8G8R8A8_SINT = 49; + public static final int VK_FORMAT_B8G8R8A8_SRGB = 50; + public static final int VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51; + public static final int VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52; + public static final int VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53; + public static final int VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54; + public static final int VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55; + public static final int VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56; + public static final int VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57; + public static final int VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58; + public static final int VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59; + public static final int VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60; + public static final int VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61; + public static final int VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62; + public static final int VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63; + public static final int VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64; + public static final int VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65; + public static final int VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66; + public static final int VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67; + public static final int VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68; + public static final int VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69; + public static final int VK_FORMAT_R16_UNORM = 70; + public static final int VK_FORMAT_R16_SNORM = 71; + public static final int VK_FORMAT_R16_USCALED = 72; + public static final int VK_FORMAT_R16_SSCALED = 73; + public static final int VK_FORMAT_R16_UINT = 74; + public static final int VK_FORMAT_R16_SINT = 75; + public static final int VK_FORMAT_R16_SFLOAT = 76; + public static final int VK_FORMAT_R16G16_UNORM = 77; + public static final int VK_FORMAT_R16G16_SNORM = 78; + public static final int VK_FORMAT_R16G16_USCALED = 79; + public static final int VK_FORMAT_R16G16_SSCALED = 80; + public static final int VK_FORMAT_R16G16_UINT = 81; + public static final int VK_FORMAT_R16G16_SINT = 82; + public static final int VK_FORMAT_R16G16_SFLOAT = 83; + public static final int VK_FORMAT_R16G16B16_UNORM = 84; + public static final int VK_FORMAT_R16G16B16_SNORM = 85; + public static final int VK_FORMAT_R16G16B16_USCALED = 86; + public static final int VK_FORMAT_R16G16B16_SSCALED = 87; + public static final int VK_FORMAT_R16G16B16_UINT = 88; + public static final int VK_FORMAT_R16G16B16_SINT = 89; + public static final int VK_FORMAT_R16G16B16_SFLOAT = 90; + public static final int VK_FORMAT_R16G16B16A16_UNORM = 91; + public static final int VK_FORMAT_R16G16B16A16_SNORM = 92; + public static final int VK_FORMAT_R16G16B16A16_USCALED = 93; + public static final int VK_FORMAT_R16G16B16A16_SSCALED = 94; + public static final int VK_FORMAT_R16G16B16A16_UINT = 95; + public static final int VK_FORMAT_R16G16B16A16_SINT = 96; + public static final int VK_FORMAT_R16G16B16A16_SFLOAT = 97; + public static final int VK_FORMAT_R32_UINT = 98; + public static final int VK_FORMAT_R32_SINT = 99; + public static final int VK_FORMAT_R32_SFLOAT = 100; + public static final int VK_FORMAT_R32G32_UINT = 101; + public static final int VK_FORMAT_R32G32_SINT = 102; + public static final int VK_FORMAT_R32G32_SFLOAT = 103; + public static final int VK_FORMAT_R32G32B32_UINT = 104; + public static final int VK_FORMAT_R32G32B32_SINT = 105; + public static final int VK_FORMAT_R32G32B32_SFLOAT = 106; + public static final int VK_FORMAT_R32G32B32A32_UINT = 107; + public static final int VK_FORMAT_R32G32B32A32_SINT = 108; + public static final int VK_FORMAT_R32G32B32A32_SFLOAT = 109; + public static final int VK_FORMAT_R64_UINT = 110; + public static final int VK_FORMAT_R64_SINT = 111; + public static final int VK_FORMAT_R64_SFLOAT = 112; + public static final int VK_FORMAT_R64G64_UINT = 113; + public static final int VK_FORMAT_R64G64_SINT = 114; + public static final int VK_FORMAT_R64G64_SFLOAT = 115; + public static final int VK_FORMAT_R64G64B64_UINT = 116; + public static final int VK_FORMAT_R64G64B64_SINT = 117; + public static final int VK_FORMAT_R64G64B64_SFLOAT = 118; + public static final int VK_FORMAT_R64G64B64A64_UINT = 119; + public static final int VK_FORMAT_R64G64B64A64_SINT = 120; + public static final int VK_FORMAT_R64G64B64A64_SFLOAT = 121; + public static final int VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122; + public static final int VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123; + public static final int VK_FORMAT_D16_UNORM = 124; + public static final int VK_FORMAT_X8_D24_UNORM_PACK32 = 125; + public static final int VK_FORMAT_D32_SFLOAT = 126; + public static final int VK_FORMAT_S8_UINT = 127; + public static final int VK_FORMAT_D16_UNORM_S8_UINT = 128; + public static final int VK_FORMAT_D24_UNORM_S8_UINT = 129; + public static final int VK_FORMAT_D32_SFLOAT_S8_UINT = 130; + public static final int VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131; + public static final int VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132; + public static final int VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133; + public static final int VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134; + public static final int VK_FORMAT_BC2_UNORM_BLOCK = 135; + public static final int VK_FORMAT_BC2_SRGB_BLOCK = 136; + public static final int VK_FORMAT_BC3_UNORM_BLOCK = 137; + public static final int VK_FORMAT_BC3_SRGB_BLOCK = 138; + public static final int VK_FORMAT_BC4_UNORM_BLOCK = 139; + public static final int VK_FORMAT_BC4_SNORM_BLOCK = 140; + public static final int VK_FORMAT_BC5_UNORM_BLOCK = 141; + public static final int VK_FORMAT_BC5_SNORM_BLOCK = 142; + public static final int VK_FORMAT_BC6H_UFLOAT_BLOCK = 143; + public static final int VK_FORMAT_BC6H_SFLOAT_BLOCK = 144; + public static final int VK_FORMAT_BC7_UNORM_BLOCK = 145; + public static final int VK_FORMAT_BC7_SRGB_BLOCK = 146; + public static final int VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147; + public static final int VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148; + public static final int VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149; + public static final int VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150; + public static final int VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151; + public static final int VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152; + public static final int VK_FORMAT_EAC_R11_UNORM_BLOCK = 153; + public static final int VK_FORMAT_EAC_R11_SNORM_BLOCK = 154; + public static final int VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155; + public static final int VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156; + public static final int VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157; + public static final int VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158; + public static final int VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159; + public static final int VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160; + public static final int VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161; + public static final int VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162; + public static final int VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163; + public static final int VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164; + public static final int VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165; + public static final int VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166; + public static final int VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167; + public static final int VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168; + public static final int VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169; + public static final int VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170; + public static final int VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171; + public static final int VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172; + public static final int VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173; + public static final int VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174; + public static final int VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175; + public static final int VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176; + public static final int VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177; + public static final int VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178; + public static final int VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179; + public static final int VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180; + public static final int VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181; + public static final int VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182; + public static final int VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183; + public static final int VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001; + public static final int VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002; + public static final int VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004; + public static final int VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008; + public static final int VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010; + public static final int VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020; + public static final int VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040; + public static final int VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080; + public static final int VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100; + public static final int VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200; + public static final int VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400; + public static final int VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000; + public static final int VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001; + public static final int VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002; + public static final int VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004; + public static final int VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008; + public static final int VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010; + public static final int VK_IMAGE_TILING_OPTIMAL = 0; + public static final int VK_IMAGE_TILING_LINEAR = 1; + public static final int VK_IMAGE_TYPE_1D = 0; + public static final int VK_IMAGE_TYPE_2D = 1; + public static final int VK_IMAGE_TYPE_3D = 2; + public static final int VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001; + public static final int VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002; + public static final int VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004; + public static final int VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008; + public static final int VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010; + public static final int VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020; + public static final int VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040; + public static final int VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080; + public static final int VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0; + public static final int VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001; + public static final int VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001; + public static final int VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002; + public static final int VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004; + public static final int VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008; + public static final int VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010; + public static final int VK_PHYSICAL_DEVICE_TYPE_OTHER = 0; + public static final int VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1; + public static final int VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2; + public static final int VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3; + public static final int VK_PHYSICAL_DEVICE_TYPE_CPU = 4; + public static final int VK_QUEUE_GRAPHICS_BIT = 0x00000001; + public static final int VK_QUEUE_COMPUTE_BIT = 0x00000002; + public static final int VK_QUEUE_TRANSFER_BIT = 0x00000004; + public static final int VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008; + public static final int VK_SAMPLE_COUNT_1_BIT = 0x00000001; + public static final int VK_SAMPLE_COUNT_2_BIT = 0x00000002; + public static final int VK_SAMPLE_COUNT_4_BIT = 0x00000004; + public static final int VK_SAMPLE_COUNT_8_BIT = 0x00000008; + public static final int VK_SAMPLE_COUNT_16_BIT = 0x00000010; + public static final int VK_SAMPLE_COUNT_32_BIT = 0x00000020; + public static final int VK_SAMPLE_COUNT_64_BIT = 0x00000040; + public static final int VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0; + public static final int VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1; + public static final int VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2; + public static final int VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3; + public static final int VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4; + public static final int VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001; + public static final int VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002; + public static final int VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004; + public static final int VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008; + public static final int VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010; + public static final int VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020; + public static final int VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040; + public static final int VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080; + public static final int VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100; + public static final int VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200; + public static final int VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400; + public static final int VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800; + public static final int VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000; + public static final int VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000; + public static final int VK_PIPELINE_STAGE_HOST_BIT = 0x00004000; + public static final int VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000; + public static final int VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000; + public static final int VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001; + public static final int VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002; + public static final int VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004; + public static final int VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008; + public static final int VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001; + public static final int VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002; + public static final int VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004; + public static final int VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001; + public static final int VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001; + public static final int VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001; + public static final int VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002; + public static final int VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004; + public static final int VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008; + public static final int VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010; + public static final int VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020; + public static final int VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040; + public static final int VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080; + public static final int VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100; + public static final int VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200; + public static final int VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400; + public static final int VK_QUERY_RESULT_64_BIT = 0x00000001; + public static final int VK_QUERY_RESULT_WAIT_BIT = 0x00000002; + public static final int VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004; + public static final int VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008; + public static final int VK_QUERY_TYPE_OCCLUSION = 0; + public static final int VK_QUERY_TYPE_PIPELINE_STATISTICS = 1; + public static final int VK_QUERY_TYPE_TIMESTAMP = 2; + public static final int VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001; + public static final int VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002; + public static final int VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004; + public static final int VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001; + public static final int VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002; + public static final int VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004; + public static final int VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008; + public static final int VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010; + public static final int VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020; + public static final int VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040; + public static final int VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080; + public static final int VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100; + public static final int VK_SHARING_MODE_EXCLUSIVE = 0; + public static final int VK_SHARING_MODE_CONCURRENT = 1; + public static final int VK_IMAGE_LAYOUT_UNDEFINED = 0; + public static final int VK_IMAGE_LAYOUT_GENERAL = 1; + public static final int VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2; + public static final int VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3; + public static final int VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4; + public static final int VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5; + public static final int VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6; + public static final int VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7; + public static final int VK_IMAGE_LAYOUT_PREINITIALIZED = 8; + public static final int VK_COMPONENT_SWIZZLE_IDENTITY = 0; + public static final int VK_COMPONENT_SWIZZLE_ZERO = 1; + public static final int VK_COMPONENT_SWIZZLE_ONE = 2; + public static final int VK_COMPONENT_SWIZZLE_R = 3; + public static final int VK_COMPONENT_SWIZZLE_G = 4; + public static final int VK_COMPONENT_SWIZZLE_B = 5; + public static final int VK_COMPONENT_SWIZZLE_A = 6; + public static final int VK_IMAGE_VIEW_TYPE_1D = 0; + public static final int VK_IMAGE_VIEW_TYPE_2D = 1; + public static final int VK_IMAGE_VIEW_TYPE_3D = 2; + public static final int VK_IMAGE_VIEW_TYPE_CUBE = 3; + public static final int VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4; + public static final int VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5; + public static final int VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6; + public static final int VK_BLEND_FACTOR_ZERO = 0; + public static final int VK_BLEND_FACTOR_ONE = 1; + public static final int VK_BLEND_FACTOR_SRC_COLOR = 2; + public static final int VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3; + public static final int VK_BLEND_FACTOR_DST_COLOR = 4; + public static final int VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5; + public static final int VK_BLEND_FACTOR_SRC_ALPHA = 6; + public static final int VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7; + public static final int VK_BLEND_FACTOR_DST_ALPHA = 8; + public static final int VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9; + public static final int VK_BLEND_FACTOR_CONSTANT_COLOR = 10; + public static final int VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11; + public static final int VK_BLEND_FACTOR_CONSTANT_ALPHA = 12; + public static final int VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13; + public static final int VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14; + public static final int VK_BLEND_FACTOR_SRC1_COLOR = 15; + public static final int VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16; + public static final int VK_BLEND_FACTOR_SRC1_ALPHA = 17; + public static final int VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18; + public static final int VK_BLEND_OP_ADD = 0; + public static final int VK_BLEND_OP_SUBTRACT = 1; + public static final int VK_BLEND_OP_REVERSE_SUBTRACT = 2; + public static final int VK_BLEND_OP_MIN = 3; + public static final int VK_BLEND_OP_MAX = 4; + public static final int VK_COLOR_COMPONENT_R_BIT = 0x00000001; + public static final int VK_COLOR_COMPONENT_G_BIT = 0x00000002; + public static final int VK_COLOR_COMPONENT_B_BIT = 0x00000004; + public static final int VK_COLOR_COMPONENT_A_BIT = 0x00000008; + public static final int VK_COMPARE_OP_NEVER = 0; + public static final int VK_COMPARE_OP_LESS = 1; + public static final int VK_COMPARE_OP_EQUAL = 2; + public static final int VK_COMPARE_OP_LESS_OR_EQUAL = 3; + public static final int VK_COMPARE_OP_GREATER = 4; + public static final int VK_COMPARE_OP_NOT_EQUAL = 5; + public static final int VK_COMPARE_OP_GREATER_OR_EQUAL = 6; + public static final int VK_COMPARE_OP_ALWAYS = 7; + public static final int VK_CULL_MODE_NONE = 0; + public static final int VK_CULL_MODE_FRONT_BIT = 0x00000001; + public static final int VK_CULL_MODE_BACK_BIT = 0x00000002; + public static final int VK_CULL_MODE_FRONT_AND_BACK = 0x00000003; + public static final int VK_DYNAMIC_STATE_VIEWPORT = 0; + public static final int VK_DYNAMIC_STATE_SCISSOR = 1; + public static final int VK_DYNAMIC_STATE_LINE_WIDTH = 2; + public static final int VK_DYNAMIC_STATE_DEPTH_BIAS = 3; + public static final int VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4; + public static final int VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5; + public static final int VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6; + public static final int VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7; + public static final int VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8; + public static final int VK_FRONT_FACE_COUNTER_CLOCKWISE = 0; + public static final int VK_FRONT_FACE_CLOCKWISE = 1; + public static final int VK_LOGIC_OP_CLEAR = 0; + public static final int VK_LOGIC_OP_AND = 1; + public static final int VK_LOGIC_OP_AND_REVERSE = 2; + public static final int VK_LOGIC_OP_COPY = 3; + public static final int VK_LOGIC_OP_AND_INVERTED = 4; + public static final int VK_LOGIC_OP_NO_OP = 5; + public static final int VK_LOGIC_OP_XOR = 6; + public static final int VK_LOGIC_OP_OR = 7; + public static final int VK_LOGIC_OP_NOR = 8; + public static final int VK_LOGIC_OP_EQUIVALENT = 9; + public static final int VK_LOGIC_OP_INVERT = 10; + public static final int VK_LOGIC_OP_OR_REVERSE = 11; + public static final int VK_LOGIC_OP_COPY_INVERTED = 12; + public static final int VK_LOGIC_OP_OR_INVERTED = 13; + public static final int VK_LOGIC_OP_NAND = 14; + public static final int VK_LOGIC_OP_SET = 15; + public static final int VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001; + public static final int VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002; + public static final int VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004; + public static final int VK_POLYGON_MODE_FILL = 0; + public static final int VK_POLYGON_MODE_LINE = 1; + public static final int VK_POLYGON_MODE_POINT = 2; + public static final int VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0; + public static final int VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1; + public static final int VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2; + public static final int VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3; + public static final int VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4; + public static final int VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5; + public static final int VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6; + public static final int VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7; + public static final int VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8; + public static final int VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9; + public static final int VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10; + public static final int VK_SHADER_STAGE_VERTEX_BIT = 0x00000001; + public static final int VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002; + public static final int VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004; + public static final int VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008; + public static final int VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010; + public static final int VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020; + public static final int VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F; + public static final int VK_SHADER_STAGE_ALL = 0x7FFFFFFF; + public static final int VK_STENCIL_OP_KEEP = 0; + public static final int VK_STENCIL_OP_ZERO = 1; + public static final int VK_STENCIL_OP_REPLACE = 2; + public static final int VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3; + public static final int VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4; + public static final int VK_STENCIL_OP_INVERT = 5; + public static final int VK_STENCIL_OP_INCREMENT_AND_WRAP = 6; + public static final int VK_STENCIL_OP_DECREMENT_AND_WRAP = 7; + public static final int VK_VERTEX_INPUT_RATE_VERTEX = 0; + public static final int VK_VERTEX_INPUT_RATE_INSTANCE = 1; + public static final int VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0; + public static final int VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1; + public static final int VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2; + public static final int VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3; + public static final int VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4; + public static final int VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5; + public static final int VK_FILTER_NEAREST = 0; + public static final int VK_FILTER_LINEAR = 1; + public static final int VK_SAMPLER_ADDRESS_MODE_REPEAT = 0; + public static final int VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1; + public static final int VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2; + public static final int VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3; + public static final int VK_SAMPLER_MIPMAP_MODE_NEAREST = 0; + public static final int VK_SAMPLER_MIPMAP_MODE_LINEAR = 1; + public static final int VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001; + public static final int VK_DESCRIPTOR_TYPE_SAMPLER = 0; + public static final int VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1; + public static final int VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2; + public static final int VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3; + public static final int VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4; + public static final int VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5; + public static final int VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6; + public static final int VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7; + public static final int VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8; + public static final int VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9; + public static final int VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10; + public static final int VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001; + public static final int VK_ACCESS_INDEX_READ_BIT = 0x00000002; + public static final int VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004; + public static final int VK_ACCESS_UNIFORM_READ_BIT = 0x00000008; + public static final int VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010; + public static final int VK_ACCESS_SHADER_READ_BIT = 0x00000020; + public static final int VK_ACCESS_SHADER_WRITE_BIT = 0x00000040; + public static final int VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080; + public static final int VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100; + public static final int VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200; + public static final int VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400; + public static final int VK_ACCESS_TRANSFER_READ_BIT = 0x00000800; + public static final int VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000; + public static final int VK_ACCESS_HOST_READ_BIT = 0x00002000; + public static final int VK_ACCESS_HOST_WRITE_BIT = 0x00004000; + public static final int VK_ACCESS_MEMORY_READ_BIT = 0x00008000; + public static final int VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000; + public static final int VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001; + public static final int VK_ATTACHMENT_LOAD_OP_LOAD = 0; + public static final int VK_ATTACHMENT_LOAD_OP_CLEAR = 1; + public static final int VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2; + public static final int VK_ATTACHMENT_STORE_OP_STORE = 0; + public static final int VK_ATTACHMENT_STORE_OP_DONT_CARE = 1; + public static final int VK_DEPENDENCY_BY_REGION_BIT = 0x00000001; + public static final int VK_PIPELINE_BIND_POINT_GRAPHICS = 0; + public static final int VK_PIPELINE_BIND_POINT_COMPUTE = 1; + public static final int VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001; + public static final int VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002; + public static final int VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001; + public static final int VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0; + public static final int VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1; + public static final int VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001; + public static final int VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001; + public static final int VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002; + public static final int VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004; + public static final int VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001; + public static final int VK_INDEX_TYPE_UINT16 = 0; + public static final int VK_INDEX_TYPE_UINT32 = 1; + public static final int VK_STENCIL_FACE_FRONT_BIT = 0x00000001; + public static final int VK_STENCIL_FACE_BACK_BIT = 0x00000002; + public static final int VK_STENCIL_FACE_FRONT_AND_BACK = 0x00000003; + public static final int VK_SUBPASS_CONTENTS_INLINE = 0; + public static final int VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1; + public static final int VK_ATTACHMENT_UNUSED = (~0); + public static final int VK_FALSE = 0; + public static final float VK_LOD_CLAMP_NONE = 1000.0F; + public static final int VK_QUEUE_FAMILY_IGNORED = (~0); + public static final int VK_REMAINING_ARRAY_LAYERS = (~0); + public static final int VK_REMAINING_MIP_LEVELS = (~0); + public static final int VK_SUBPASS_EXTERNAL = (~0); + public static final int VK_TRUE = 1; + public static final long VK_WHOLE_SIZE = (~0L); + public static final int VK_MAX_MEMORY_TYPES = 32; + public static final int VK_MAX_PHYSICAL_DEVICE_NAME_SIZE = 256; + public static final int VK_UUID_SIZE = 16; + public static final int VK_MAX_EXTENSION_NAME_SIZE = 256; + public static final int VK_MAX_DESCRIPTION_SIZE = 256; + public static final int VK_MAX_MEMORY_HEAPS = 16; + public static final int VK_STENCIL_FRONT_AND_BACK = VK_STENCIL_FACE_FRONT_AND_BACK; + public static final MethodHandle MH_vkCreateInstance = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyInstance = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkEnumeratePhysicalDevices = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceFeatures = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceFormatProperties = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceImageFormatProperties = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceProperties = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceQueueFamilyProperties = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceMemoryProperties = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetInstanceProcAddr = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceProcAddr = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateDevice = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyDevice = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkEnumerateInstanceExtensionProperties = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkEnumerateDeviceExtensionProperties = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkEnumerateInstanceLayerProperties = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkEnumerateDeviceLayerProperties = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceQueue = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkQueueSubmit = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkQueueWaitIdle = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDeviceWaitIdle = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkAllocateMemory = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkFreeMemory = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkMapMemory = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkUnmapMemory = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkFlushMappedMemoryRanges = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkInvalidateMappedMemoryRanges = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceMemoryCommitment = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkBindBufferMemory = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkBindImageMemory = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkGetBufferMemoryRequirements = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageMemoryRequirements = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageSparseMemoryRequirements = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceSparseImageFormatProperties = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkQueueBindSparse = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateFence = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyFence = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkResetFences = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetFenceStatus = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkWaitForFences = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkCreateSemaphore = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroySemaphore = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateEvent = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyEvent = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetEventStatus = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkSetEvent = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkResetEvent = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateQueryPool = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyQueryPool = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetQueryPoolResults = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCreateBuffer = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyBuffer = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateBufferView = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyBufferView = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateImage = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyImage = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageSubresourceLayout = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateImageView = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyImageView = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateShaderModule = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyShaderModule = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreatePipelineCache = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyPipelineCache = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPipelineCacheData = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkMergePipelineCaches = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateGraphicsPipelines = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateComputePipelines = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyPipeline = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreatePipelineLayout = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyPipelineLayout = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateSampler = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroySampler = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateDescriptorSetLayout = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyDescriptorSetLayout = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateDescriptorPool = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyDescriptorPool = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkResetDescriptorPool = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkAllocateDescriptorSets = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkFreeDescriptorSets = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkUpdateDescriptorSets = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateFramebuffer = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyFramebuffer = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateRenderPass = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyRenderPass = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetRenderAreaGranularity = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateCommandPool = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyCommandPool = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkResetCommandPool = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkAllocateCommandBuffers = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkFreeCommandBuffers = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkBeginCommandBuffer = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkEndCommandBuffer = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkResetCommandBuffer = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdBindPipeline = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetViewport = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetScissor = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetLineWidth = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_FLOAT)); + public static final MethodHandle MH_vkCmdSetDepthBias = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_FLOAT, ValueLayout.JAVA_FLOAT, ValueLayout.JAVA_FLOAT)); + public static final MethodHandle MH_vkCmdSetBlendConstants = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_FLOAT)); + public static final MethodHandle MH_vkCmdSetDepthBounds = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_FLOAT, ValueLayout.JAVA_FLOAT)); + public static final MethodHandle MH_vkCmdSetStencilCompareMask = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetStencilWriteMask = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetStencilReference = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdBindDescriptorSets = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindIndexBuffer = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdBindVertexBuffers = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdDraw = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawIndexed = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawIndirect = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawIndexedIndirect = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDispatch = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDispatchIndirect = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkCmdCopyBuffer = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyImage = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBlitImage = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdCopyBufferToImage = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyImageToBuffer = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdUpdateBuffer = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdFillBuffer = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdClearColorImage = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdClearDepthStencilImage = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdClearAttachments = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdResolveImage = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetEvent = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdResetEvent = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdWaitEvents = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPipelineBarrier = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBeginQuery = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdEndQuery = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdResetQueryPool = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdWriteTimestamp = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdCopyQueryPoolResults = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdPushConstants = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBeginRenderPass = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdNextSubpass = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdEndRenderPass = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdExecuteCommands = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateInstance; + public final MemorySegment PFN_vkDestroyInstance; + public final MemorySegment PFN_vkEnumeratePhysicalDevices; + public final MemorySegment PFN_vkGetPhysicalDeviceFeatures; + public final MemorySegment PFN_vkGetPhysicalDeviceFormatProperties; + public final MemorySegment PFN_vkGetPhysicalDeviceImageFormatProperties; + public final MemorySegment PFN_vkGetPhysicalDeviceProperties; + public final MemorySegment PFN_vkGetPhysicalDeviceQueueFamilyProperties; + public final MemorySegment PFN_vkGetPhysicalDeviceMemoryProperties; + public final MemorySegment PFN_vkGetInstanceProcAddr; + public final MemorySegment PFN_vkGetDeviceProcAddr; + public final MemorySegment PFN_vkCreateDevice; + public final MemorySegment PFN_vkDestroyDevice; + public final MemorySegment PFN_vkEnumerateInstanceExtensionProperties; + public final MemorySegment PFN_vkEnumerateDeviceExtensionProperties; + public final MemorySegment PFN_vkEnumerateInstanceLayerProperties; + public final MemorySegment PFN_vkEnumerateDeviceLayerProperties; + public final MemorySegment PFN_vkGetDeviceQueue; + public final MemorySegment PFN_vkQueueSubmit; + public final MemorySegment PFN_vkQueueWaitIdle; + public final MemorySegment PFN_vkDeviceWaitIdle; + public final MemorySegment PFN_vkAllocateMemory; + public final MemorySegment PFN_vkFreeMemory; + public final MemorySegment PFN_vkMapMemory; + public final MemorySegment PFN_vkUnmapMemory; + public final MemorySegment PFN_vkFlushMappedMemoryRanges; + public final MemorySegment PFN_vkInvalidateMappedMemoryRanges; + public final MemorySegment PFN_vkGetDeviceMemoryCommitment; + public final MemorySegment PFN_vkBindBufferMemory; + public final MemorySegment PFN_vkBindImageMemory; + public final MemorySegment PFN_vkGetBufferMemoryRequirements; + public final MemorySegment PFN_vkGetImageMemoryRequirements; + public final MemorySegment PFN_vkGetImageSparseMemoryRequirements; + public final MemorySegment PFN_vkGetPhysicalDeviceSparseImageFormatProperties; + public final MemorySegment PFN_vkQueueBindSparse; + public final MemorySegment PFN_vkCreateFence; + public final MemorySegment PFN_vkDestroyFence; + public final MemorySegment PFN_vkResetFences; + public final MemorySegment PFN_vkGetFenceStatus; + public final MemorySegment PFN_vkWaitForFences; + public final MemorySegment PFN_vkCreateSemaphore; + public final MemorySegment PFN_vkDestroySemaphore; + public final MemorySegment PFN_vkCreateEvent; + public final MemorySegment PFN_vkDestroyEvent; + public final MemorySegment PFN_vkGetEventStatus; + public final MemorySegment PFN_vkSetEvent; + public final MemorySegment PFN_vkResetEvent; + public final MemorySegment PFN_vkCreateQueryPool; + public final MemorySegment PFN_vkDestroyQueryPool; + public final MemorySegment PFN_vkGetQueryPoolResults; + public final MemorySegment PFN_vkCreateBuffer; + public final MemorySegment PFN_vkDestroyBuffer; + public final MemorySegment PFN_vkCreateBufferView; + public final MemorySegment PFN_vkDestroyBufferView; + public final MemorySegment PFN_vkCreateImage; + public final MemorySegment PFN_vkDestroyImage; + public final MemorySegment PFN_vkGetImageSubresourceLayout; + public final MemorySegment PFN_vkCreateImageView; + public final MemorySegment PFN_vkDestroyImageView; + public final MemorySegment PFN_vkCreateShaderModule; + public final MemorySegment PFN_vkDestroyShaderModule; + public final MemorySegment PFN_vkCreatePipelineCache; + public final MemorySegment PFN_vkDestroyPipelineCache; + public final MemorySegment PFN_vkGetPipelineCacheData; + public final MemorySegment PFN_vkMergePipelineCaches; + public final MemorySegment PFN_vkCreateGraphicsPipelines; + public final MemorySegment PFN_vkCreateComputePipelines; + public final MemorySegment PFN_vkDestroyPipeline; + public final MemorySegment PFN_vkCreatePipelineLayout; + public final MemorySegment PFN_vkDestroyPipelineLayout; + public final MemorySegment PFN_vkCreateSampler; + public final MemorySegment PFN_vkDestroySampler; + public final MemorySegment PFN_vkCreateDescriptorSetLayout; + public final MemorySegment PFN_vkDestroyDescriptorSetLayout; + public final MemorySegment PFN_vkCreateDescriptorPool; + public final MemorySegment PFN_vkDestroyDescriptorPool; + public final MemorySegment PFN_vkResetDescriptorPool; + public final MemorySegment PFN_vkAllocateDescriptorSets; + public final MemorySegment PFN_vkFreeDescriptorSets; + public final MemorySegment PFN_vkUpdateDescriptorSets; + public final MemorySegment PFN_vkCreateFramebuffer; + public final MemorySegment PFN_vkDestroyFramebuffer; + public final MemorySegment PFN_vkCreateRenderPass; + public final MemorySegment PFN_vkDestroyRenderPass; + public final MemorySegment PFN_vkGetRenderAreaGranularity; + public final MemorySegment PFN_vkCreateCommandPool; + public final MemorySegment PFN_vkDestroyCommandPool; + public final MemorySegment PFN_vkResetCommandPool; + public final MemorySegment PFN_vkAllocateCommandBuffers; + public final MemorySegment PFN_vkFreeCommandBuffers; + public final MemorySegment PFN_vkBeginCommandBuffer; + public final MemorySegment PFN_vkEndCommandBuffer; + public final MemorySegment PFN_vkResetCommandBuffer; + public final MemorySegment PFN_vkCmdBindPipeline; + public final MemorySegment PFN_vkCmdSetViewport; + public final MemorySegment PFN_vkCmdSetScissor; + public final MemorySegment PFN_vkCmdSetLineWidth; + public final MemorySegment PFN_vkCmdSetDepthBias; + public final MemorySegment PFN_vkCmdSetBlendConstants; + public final MemorySegment PFN_vkCmdSetDepthBounds; + public final MemorySegment PFN_vkCmdSetStencilCompareMask; + public final MemorySegment PFN_vkCmdSetStencilWriteMask; + public final MemorySegment PFN_vkCmdSetStencilReference; + public final MemorySegment PFN_vkCmdBindDescriptorSets; + public final MemorySegment PFN_vkCmdBindIndexBuffer; + public final MemorySegment PFN_vkCmdBindVertexBuffers; + public final MemorySegment PFN_vkCmdDraw; + public final MemorySegment PFN_vkCmdDrawIndexed; + public final MemorySegment PFN_vkCmdDrawIndirect; + public final MemorySegment PFN_vkCmdDrawIndexedIndirect; + public final MemorySegment PFN_vkCmdDispatch; + public final MemorySegment PFN_vkCmdDispatchIndirect; + public final MemorySegment PFN_vkCmdCopyBuffer; + public final MemorySegment PFN_vkCmdCopyImage; + public final MemorySegment PFN_vkCmdBlitImage; + public final MemorySegment PFN_vkCmdCopyBufferToImage; + public final MemorySegment PFN_vkCmdCopyImageToBuffer; + public final MemorySegment PFN_vkCmdUpdateBuffer; + public final MemorySegment PFN_vkCmdFillBuffer; + public final MemorySegment PFN_vkCmdClearColorImage; + public final MemorySegment PFN_vkCmdClearDepthStencilImage; + public final MemorySegment PFN_vkCmdClearAttachments; + public final MemorySegment PFN_vkCmdResolveImage; + public final MemorySegment PFN_vkCmdSetEvent; + public final MemorySegment PFN_vkCmdResetEvent; + public final MemorySegment PFN_vkCmdWaitEvents; + public final MemorySegment PFN_vkCmdPipelineBarrier; + public final MemorySegment PFN_vkCmdBeginQuery; + public final MemorySegment PFN_vkCmdEndQuery; + public final MemorySegment PFN_vkCmdResetQueryPool; + public final MemorySegment PFN_vkCmdWriteTimestamp; + public final MemorySegment PFN_vkCmdCopyQueryPoolResults; + public final MemorySegment PFN_vkCmdPushConstants; + public final MemorySegment PFN_vkCmdBeginRenderPass; + public final MemorySegment PFN_vkCmdNextSubpass; + public final MemorySegment PFN_vkCmdEndRenderPass; + public final MemorySegment PFN_vkCmdExecuteCommands; + + public VK10(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateInstance = func.invoke(instance, "vkCreateInstance"); + PFN_vkDestroyInstance = func.invoke(instance, "vkDestroyInstance"); + PFN_vkEnumeratePhysicalDevices = func.invoke(instance, "vkEnumeratePhysicalDevices"); + PFN_vkGetPhysicalDeviceFeatures = func.invoke(instance, "vkGetPhysicalDeviceFeatures"); + PFN_vkGetPhysicalDeviceFormatProperties = func.invoke(instance, "vkGetPhysicalDeviceFormatProperties"); + PFN_vkGetPhysicalDeviceImageFormatProperties = func.invoke(instance, "vkGetPhysicalDeviceImageFormatProperties"); + PFN_vkGetPhysicalDeviceProperties = func.invoke(instance, "vkGetPhysicalDeviceProperties"); + PFN_vkGetPhysicalDeviceQueueFamilyProperties = func.invoke(instance, "vkGetPhysicalDeviceQueueFamilyProperties"); + PFN_vkGetPhysicalDeviceMemoryProperties = func.invoke(instance, "vkGetPhysicalDeviceMemoryProperties"); + PFN_vkGetInstanceProcAddr = func.invoke(instance, "vkGetInstanceProcAddr"); + PFN_vkGetDeviceProcAddr = func.invoke(instance, "vkGetDeviceProcAddr"); + PFN_vkCreateDevice = func.invoke(instance, "vkCreateDevice"); + PFN_vkDestroyDevice = func.invoke(instance, "vkDestroyDevice"); + PFN_vkEnumerateInstanceExtensionProperties = func.invoke(instance, "vkEnumerateInstanceExtensionProperties"); + PFN_vkEnumerateDeviceExtensionProperties = func.invoke(instance, "vkEnumerateDeviceExtensionProperties"); + PFN_vkEnumerateInstanceLayerProperties = func.invoke(instance, "vkEnumerateInstanceLayerProperties"); + PFN_vkEnumerateDeviceLayerProperties = func.invoke(instance, "vkEnumerateDeviceLayerProperties"); + PFN_vkGetDeviceQueue = func.invoke(instance, "vkGetDeviceQueue"); + PFN_vkQueueSubmit = func.invoke(instance, "vkQueueSubmit"); + PFN_vkQueueWaitIdle = func.invoke(instance, "vkQueueWaitIdle"); + PFN_vkDeviceWaitIdle = func.invoke(instance, "vkDeviceWaitIdle"); + PFN_vkAllocateMemory = func.invoke(instance, "vkAllocateMemory"); + PFN_vkFreeMemory = func.invoke(instance, "vkFreeMemory"); + PFN_vkMapMemory = func.invoke(instance, "vkMapMemory"); + PFN_vkUnmapMemory = func.invoke(instance, "vkUnmapMemory"); + PFN_vkFlushMappedMemoryRanges = func.invoke(instance, "vkFlushMappedMemoryRanges"); + PFN_vkInvalidateMappedMemoryRanges = func.invoke(instance, "vkInvalidateMappedMemoryRanges"); + PFN_vkGetDeviceMemoryCommitment = func.invoke(instance, "vkGetDeviceMemoryCommitment"); + PFN_vkBindBufferMemory = func.invoke(instance, "vkBindBufferMemory"); + PFN_vkBindImageMemory = func.invoke(instance, "vkBindImageMemory"); + PFN_vkGetBufferMemoryRequirements = func.invoke(instance, "vkGetBufferMemoryRequirements"); + PFN_vkGetImageMemoryRequirements = func.invoke(instance, "vkGetImageMemoryRequirements"); + PFN_vkGetImageSparseMemoryRequirements = func.invoke(instance, "vkGetImageSparseMemoryRequirements"); + PFN_vkGetPhysicalDeviceSparseImageFormatProperties = func.invoke(instance, "vkGetPhysicalDeviceSparseImageFormatProperties"); + PFN_vkQueueBindSparse = func.invoke(instance, "vkQueueBindSparse"); + PFN_vkCreateFence = func.invoke(instance, "vkCreateFence"); + PFN_vkDestroyFence = func.invoke(instance, "vkDestroyFence"); + PFN_vkResetFences = func.invoke(instance, "vkResetFences"); + PFN_vkGetFenceStatus = func.invoke(instance, "vkGetFenceStatus"); + PFN_vkWaitForFences = func.invoke(instance, "vkWaitForFences"); + PFN_vkCreateSemaphore = func.invoke(instance, "vkCreateSemaphore"); + PFN_vkDestroySemaphore = func.invoke(instance, "vkDestroySemaphore"); + PFN_vkCreateEvent = func.invoke(instance, "vkCreateEvent"); + PFN_vkDestroyEvent = func.invoke(instance, "vkDestroyEvent"); + PFN_vkGetEventStatus = func.invoke(instance, "vkGetEventStatus"); + PFN_vkSetEvent = func.invoke(instance, "vkSetEvent"); + PFN_vkResetEvent = func.invoke(instance, "vkResetEvent"); + PFN_vkCreateQueryPool = func.invoke(instance, "vkCreateQueryPool"); + PFN_vkDestroyQueryPool = func.invoke(instance, "vkDestroyQueryPool"); + PFN_vkGetQueryPoolResults = func.invoke(instance, "vkGetQueryPoolResults"); + PFN_vkCreateBuffer = func.invoke(instance, "vkCreateBuffer"); + PFN_vkDestroyBuffer = func.invoke(instance, "vkDestroyBuffer"); + PFN_vkCreateBufferView = func.invoke(instance, "vkCreateBufferView"); + PFN_vkDestroyBufferView = func.invoke(instance, "vkDestroyBufferView"); + PFN_vkCreateImage = func.invoke(instance, "vkCreateImage"); + PFN_vkDestroyImage = func.invoke(instance, "vkDestroyImage"); + PFN_vkGetImageSubresourceLayout = func.invoke(instance, "vkGetImageSubresourceLayout"); + PFN_vkCreateImageView = func.invoke(instance, "vkCreateImageView"); + PFN_vkDestroyImageView = func.invoke(instance, "vkDestroyImageView"); + PFN_vkCreateShaderModule = func.invoke(instance, "vkCreateShaderModule"); + PFN_vkDestroyShaderModule = func.invoke(instance, "vkDestroyShaderModule"); + PFN_vkCreatePipelineCache = func.invoke(instance, "vkCreatePipelineCache"); + PFN_vkDestroyPipelineCache = func.invoke(instance, "vkDestroyPipelineCache"); + PFN_vkGetPipelineCacheData = func.invoke(instance, "vkGetPipelineCacheData"); + PFN_vkMergePipelineCaches = func.invoke(instance, "vkMergePipelineCaches"); + PFN_vkCreateGraphicsPipelines = func.invoke(instance, "vkCreateGraphicsPipelines"); + PFN_vkCreateComputePipelines = func.invoke(instance, "vkCreateComputePipelines"); + PFN_vkDestroyPipeline = func.invoke(instance, "vkDestroyPipeline"); + PFN_vkCreatePipelineLayout = func.invoke(instance, "vkCreatePipelineLayout"); + PFN_vkDestroyPipelineLayout = func.invoke(instance, "vkDestroyPipelineLayout"); + PFN_vkCreateSampler = func.invoke(instance, "vkCreateSampler"); + PFN_vkDestroySampler = func.invoke(instance, "vkDestroySampler"); + PFN_vkCreateDescriptorSetLayout = func.invoke(instance, "vkCreateDescriptorSetLayout"); + PFN_vkDestroyDescriptorSetLayout = func.invoke(instance, "vkDestroyDescriptorSetLayout"); + PFN_vkCreateDescriptorPool = func.invoke(instance, "vkCreateDescriptorPool"); + PFN_vkDestroyDescriptorPool = func.invoke(instance, "vkDestroyDescriptorPool"); + PFN_vkResetDescriptorPool = func.invoke(instance, "vkResetDescriptorPool"); + PFN_vkAllocateDescriptorSets = func.invoke(instance, "vkAllocateDescriptorSets"); + PFN_vkFreeDescriptorSets = func.invoke(instance, "vkFreeDescriptorSets"); + PFN_vkUpdateDescriptorSets = func.invoke(instance, "vkUpdateDescriptorSets"); + PFN_vkCreateFramebuffer = func.invoke(instance, "vkCreateFramebuffer"); + PFN_vkDestroyFramebuffer = func.invoke(instance, "vkDestroyFramebuffer"); + PFN_vkCreateRenderPass = func.invoke(instance, "vkCreateRenderPass"); + PFN_vkDestroyRenderPass = func.invoke(instance, "vkDestroyRenderPass"); + PFN_vkGetRenderAreaGranularity = func.invoke(instance, "vkGetRenderAreaGranularity"); + PFN_vkCreateCommandPool = func.invoke(instance, "vkCreateCommandPool"); + PFN_vkDestroyCommandPool = func.invoke(instance, "vkDestroyCommandPool"); + PFN_vkResetCommandPool = func.invoke(instance, "vkResetCommandPool"); + PFN_vkAllocateCommandBuffers = func.invoke(instance, "vkAllocateCommandBuffers"); + PFN_vkFreeCommandBuffers = func.invoke(instance, "vkFreeCommandBuffers"); + PFN_vkBeginCommandBuffer = func.invoke(instance, "vkBeginCommandBuffer"); + PFN_vkEndCommandBuffer = func.invoke(instance, "vkEndCommandBuffer"); + PFN_vkResetCommandBuffer = func.invoke(instance, "vkResetCommandBuffer"); + PFN_vkCmdBindPipeline = func.invoke(instance, "vkCmdBindPipeline"); + PFN_vkCmdSetViewport = func.invoke(instance, "vkCmdSetViewport"); + PFN_vkCmdSetScissor = func.invoke(instance, "vkCmdSetScissor"); + PFN_vkCmdSetLineWidth = func.invoke(instance, "vkCmdSetLineWidth"); + PFN_vkCmdSetDepthBias = func.invoke(instance, "vkCmdSetDepthBias"); + PFN_vkCmdSetBlendConstants = func.invoke(instance, "vkCmdSetBlendConstants"); + PFN_vkCmdSetDepthBounds = func.invoke(instance, "vkCmdSetDepthBounds"); + PFN_vkCmdSetStencilCompareMask = func.invoke(instance, "vkCmdSetStencilCompareMask"); + PFN_vkCmdSetStencilWriteMask = func.invoke(instance, "vkCmdSetStencilWriteMask"); + PFN_vkCmdSetStencilReference = func.invoke(instance, "vkCmdSetStencilReference"); + PFN_vkCmdBindDescriptorSets = func.invoke(instance, "vkCmdBindDescriptorSets"); + PFN_vkCmdBindIndexBuffer = func.invoke(instance, "vkCmdBindIndexBuffer"); + PFN_vkCmdBindVertexBuffers = func.invoke(instance, "vkCmdBindVertexBuffers"); + PFN_vkCmdDraw = func.invoke(instance, "vkCmdDraw"); + PFN_vkCmdDrawIndexed = func.invoke(instance, "vkCmdDrawIndexed"); + PFN_vkCmdDrawIndirect = func.invoke(instance, "vkCmdDrawIndirect"); + PFN_vkCmdDrawIndexedIndirect = func.invoke(instance, "vkCmdDrawIndexedIndirect"); + PFN_vkCmdDispatch = func.invoke(instance, "vkCmdDispatch"); + PFN_vkCmdDispatchIndirect = func.invoke(instance, "vkCmdDispatchIndirect"); + PFN_vkCmdCopyBuffer = func.invoke(instance, "vkCmdCopyBuffer"); + PFN_vkCmdCopyImage = func.invoke(instance, "vkCmdCopyImage"); + PFN_vkCmdBlitImage = func.invoke(instance, "vkCmdBlitImage"); + PFN_vkCmdCopyBufferToImage = func.invoke(instance, "vkCmdCopyBufferToImage"); + PFN_vkCmdCopyImageToBuffer = func.invoke(instance, "vkCmdCopyImageToBuffer"); + PFN_vkCmdUpdateBuffer = func.invoke(instance, "vkCmdUpdateBuffer"); + PFN_vkCmdFillBuffer = func.invoke(instance, "vkCmdFillBuffer"); + PFN_vkCmdClearColorImage = func.invoke(instance, "vkCmdClearColorImage"); + PFN_vkCmdClearDepthStencilImage = func.invoke(instance, "vkCmdClearDepthStencilImage"); + PFN_vkCmdClearAttachments = func.invoke(instance, "vkCmdClearAttachments"); + PFN_vkCmdResolveImage = func.invoke(instance, "vkCmdResolveImage"); + PFN_vkCmdSetEvent = func.invoke(instance, "vkCmdSetEvent"); + PFN_vkCmdResetEvent = func.invoke(instance, "vkCmdResetEvent"); + PFN_vkCmdWaitEvents = func.invoke(instance, "vkCmdWaitEvents"); + PFN_vkCmdPipelineBarrier = func.invoke(instance, "vkCmdPipelineBarrier"); + PFN_vkCmdBeginQuery = func.invoke(instance, "vkCmdBeginQuery"); + PFN_vkCmdEndQuery = func.invoke(instance, "vkCmdEndQuery"); + PFN_vkCmdResetQueryPool = func.invoke(instance, "vkCmdResetQueryPool"); + PFN_vkCmdWriteTimestamp = func.invoke(instance, "vkCmdWriteTimestamp"); + PFN_vkCmdCopyQueryPoolResults = func.invoke(instance, "vkCmdCopyQueryPoolResults"); + PFN_vkCmdPushConstants = func.invoke(instance, "vkCmdPushConstants"); + PFN_vkCmdBeginRenderPass = func.invoke(instance, "vkCmdBeginRenderPass"); + PFN_vkCmdNextSubpass = func.invoke(instance, "vkCmdNextSubpass"); + PFN_vkCmdEndRenderPass = func.invoke(instance, "vkCmdEndRenderPass"); + PFN_vkCmdExecuteCommands = func.invoke(instance, "vkCmdExecuteCommands"); + } + + public @CType("VkResult") int CreateInstance(@CType("const VkInstanceCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkInstance *") MemorySegment pInstance) { + if (Unmarshal.isNullPointer(PFN_vkCreateInstance)) throw new SymbolNotFoundError("Symbol not found: vkCreateInstance"); + try { return (int) MH_vkCreateInstance.invokeExact(PFN_vkCreateInstance, pCreateInfo, pAllocator, pInstance); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateInstance", e); } + } + + public void DestroyInstance(@CType("VkInstance") MemorySegment instance, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyInstance)) throw new SymbolNotFoundError("Symbol not found: vkDestroyInstance"); + try { MH_vkDestroyInstance.invokeExact(PFN_vkDestroyInstance, instance, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyInstance", e); } + } + + public @CType("VkResult") int EnumeratePhysicalDevices(@CType("VkInstance") MemorySegment instance, @CType("uint32_t *") MemorySegment pPhysicalDeviceCount, @CType("VkPhysicalDevice *") MemorySegment pPhysicalDevices) { + if (Unmarshal.isNullPointer(PFN_vkEnumeratePhysicalDevices)) throw new SymbolNotFoundError("Symbol not found: vkEnumeratePhysicalDevices"); + try { return (int) MH_vkEnumeratePhysicalDevices.invokeExact(PFN_vkEnumeratePhysicalDevices, instance, pPhysicalDeviceCount, pPhysicalDevices); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumeratePhysicalDevices", e); } + } + + public void GetPhysicalDeviceFeatures(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkPhysicalDeviceFeatures *") MemorySegment pFeatures) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceFeatures)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceFeatures"); + try { MH_vkGetPhysicalDeviceFeatures.invokeExact(PFN_vkGetPhysicalDeviceFeatures, physicalDevice, pFeatures); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceFeatures", e); } + } + + public void GetPhysicalDeviceFormatProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkFormat") int format, @CType("VkFormatProperties *") MemorySegment pFormatProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceFormatProperties)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceFormatProperties"); + try { MH_vkGetPhysicalDeviceFormatProperties.invokeExact(PFN_vkGetPhysicalDeviceFormatProperties, physicalDevice, format, pFormatProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceFormatProperties", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceImageFormatProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkFormat") int format, @CType("VkImageType") int type, @CType("VkImageTiling") int tiling, @CType("VkImageUsageFlags") int usage, @CType("VkImageCreateFlags") int flags, @CType("VkImageFormatProperties *") MemorySegment pImageFormatProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceImageFormatProperties)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceImageFormatProperties"); + try { return (int) MH_vkGetPhysicalDeviceImageFormatProperties.invokeExact(PFN_vkGetPhysicalDeviceImageFormatProperties, physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceImageFormatProperties", e); } + } + + public void GetPhysicalDeviceProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkPhysicalDeviceProperties *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceProperties)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceProperties"); + try { MH_vkGetPhysicalDeviceProperties.invokeExact(PFN_vkGetPhysicalDeviceProperties, physicalDevice, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceProperties", e); } + } + + public void GetPhysicalDeviceQueueFamilyProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pQueueFamilyPropertyCount, @CType("VkQueueFamilyProperties *") MemorySegment pQueueFamilyProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceQueueFamilyProperties)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceQueueFamilyProperties"); + try { MH_vkGetPhysicalDeviceQueueFamilyProperties.invokeExact(PFN_vkGetPhysicalDeviceQueueFamilyProperties, physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceQueueFamilyProperties", e); } + } + + public void GetPhysicalDeviceMemoryProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkPhysicalDeviceMemoryProperties *") MemorySegment pMemoryProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceMemoryProperties)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceMemoryProperties"); + try { MH_vkGetPhysicalDeviceMemoryProperties.invokeExact(PFN_vkGetPhysicalDeviceMemoryProperties, physicalDevice, pMemoryProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceMemoryProperties", e); } + } + + public @CType("PFN_vkVoidFunction") MemorySegment GetInstanceProcAddr(@CType("VkInstance") MemorySegment instance, @CType("const char *") MemorySegment pName) { + if (Unmarshal.isNullPointer(PFN_vkGetInstanceProcAddr)) throw new SymbolNotFoundError("Symbol not found: vkGetInstanceProcAddr"); + try { return (MemorySegment) MH_vkGetInstanceProcAddr.invokeExact(PFN_vkGetInstanceProcAddr, instance, pName); } + catch (Throwable e) { throw new RuntimeException("error in vkGetInstanceProcAddr", e); } + } + + public @CType("PFN_vkVoidFunction") MemorySegment GetDeviceProcAddr(@CType("VkDevice") MemorySegment device, @CType("const char *") MemorySegment pName) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceProcAddr)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceProcAddr"); + try { return (MemorySegment) MH_vkGetDeviceProcAddr.invokeExact(PFN_vkGetDeviceProcAddr, device, pName); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceProcAddr", e); } + } + + public @CType("VkResult") int CreateDevice(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkDeviceCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkDevice *") MemorySegment pDevice) { + if (Unmarshal.isNullPointer(PFN_vkCreateDevice)) throw new SymbolNotFoundError("Symbol not found: vkCreateDevice"); + try { return (int) MH_vkCreateDevice.invokeExact(PFN_vkCreateDevice, physicalDevice, pCreateInfo, pAllocator, pDevice); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDevice", e); } + } + + public void DestroyDevice(@CType("VkDevice") MemorySegment device, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyDevice)) throw new SymbolNotFoundError("Symbol not found: vkDestroyDevice"); + try { MH_vkDestroyDevice.invokeExact(PFN_vkDestroyDevice, device, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyDevice", e); } + } + + public @CType("VkResult") int EnumerateInstanceExtensionProperties(@CType("const char *") MemorySegment pLayerName, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkExtensionProperties *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkEnumerateInstanceExtensionProperties)) throw new SymbolNotFoundError("Symbol not found: vkEnumerateInstanceExtensionProperties"); + try { return (int) MH_vkEnumerateInstanceExtensionProperties.invokeExact(PFN_vkEnumerateInstanceExtensionProperties, pLayerName, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumerateInstanceExtensionProperties", e); } + } + + public @CType("VkResult") int EnumerateDeviceExtensionProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const char *") MemorySegment pLayerName, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkExtensionProperties *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkEnumerateDeviceExtensionProperties)) throw new SymbolNotFoundError("Symbol not found: vkEnumerateDeviceExtensionProperties"); + try { return (int) MH_vkEnumerateDeviceExtensionProperties.invokeExact(PFN_vkEnumerateDeviceExtensionProperties, physicalDevice, pLayerName, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumerateDeviceExtensionProperties", e); } + } + + public @CType("VkResult") int EnumerateInstanceLayerProperties(@CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkLayerProperties *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkEnumerateInstanceLayerProperties)) throw new SymbolNotFoundError("Symbol not found: vkEnumerateInstanceLayerProperties"); + try { return (int) MH_vkEnumerateInstanceLayerProperties.invokeExact(PFN_vkEnumerateInstanceLayerProperties, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumerateInstanceLayerProperties", e); } + } + + public @CType("VkResult") int EnumerateDeviceLayerProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkLayerProperties *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkEnumerateDeviceLayerProperties)) throw new SymbolNotFoundError("Symbol not found: vkEnumerateDeviceLayerProperties"); + try { return (int) MH_vkEnumerateDeviceLayerProperties.invokeExact(PFN_vkEnumerateDeviceLayerProperties, physicalDevice, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumerateDeviceLayerProperties", e); } + } + + public void GetDeviceQueue(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int queueFamilyIndex, @CType("uint32_t") int queueIndex, @CType("VkQueue *") MemorySegment pQueue) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceQueue)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceQueue"); + try { MH_vkGetDeviceQueue.invokeExact(PFN_vkGetDeviceQueue, device, queueFamilyIndex, queueIndex, pQueue); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceQueue", e); } + } + + public @CType("VkResult") int QueueSubmit(@CType("VkQueue") MemorySegment queue, @CType("uint32_t") int submitCount, @CType("const VkSubmitInfo *") MemorySegment pSubmits, @CType("VkFence") MemorySegment fence) { + if (Unmarshal.isNullPointer(PFN_vkQueueSubmit)) throw new SymbolNotFoundError("Symbol not found: vkQueueSubmit"); + try { return (int) MH_vkQueueSubmit.invokeExact(PFN_vkQueueSubmit, queue, submitCount, pSubmits, fence); } + catch (Throwable e) { throw new RuntimeException("error in vkQueueSubmit", e); } + } + + public @CType("VkResult") int QueueWaitIdle(@CType("VkQueue") MemorySegment queue) { + if (Unmarshal.isNullPointer(PFN_vkQueueWaitIdle)) throw new SymbolNotFoundError("Symbol not found: vkQueueWaitIdle"); + try { return (int) MH_vkQueueWaitIdle.invokeExact(PFN_vkQueueWaitIdle, queue); } + catch (Throwable e) { throw new RuntimeException("error in vkQueueWaitIdle", e); } + } + + public @CType("VkResult") int DeviceWaitIdle(@CType("VkDevice") MemorySegment device) { + if (Unmarshal.isNullPointer(PFN_vkDeviceWaitIdle)) throw new SymbolNotFoundError("Symbol not found: vkDeviceWaitIdle"); + try { return (int) MH_vkDeviceWaitIdle.invokeExact(PFN_vkDeviceWaitIdle, device); } + catch (Throwable e) { throw new RuntimeException("error in vkDeviceWaitIdle", e); } + } + + public @CType("VkResult") int AllocateMemory(@CType("VkDevice") MemorySegment device, @CType("const VkMemoryAllocateInfo *") MemorySegment pAllocateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkDeviceMemory *") MemorySegment pMemory) { + if (Unmarshal.isNullPointer(PFN_vkAllocateMemory)) throw new SymbolNotFoundError("Symbol not found: vkAllocateMemory"); + try { return (int) MH_vkAllocateMemory.invokeExact(PFN_vkAllocateMemory, device, pAllocateInfo, pAllocator, pMemory); } + catch (Throwable e) { throw new RuntimeException("error in vkAllocateMemory", e); } + } + + public void FreeMemory(@CType("VkDevice") MemorySegment device, @CType("VkDeviceMemory") MemorySegment memory, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkFreeMemory)) throw new SymbolNotFoundError("Symbol not found: vkFreeMemory"); + try { MH_vkFreeMemory.invokeExact(PFN_vkFreeMemory, device, memory, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkFreeMemory", e); } + } + + public @CType("VkResult") int MapMemory(@CType("VkDevice") MemorySegment device, @CType("VkDeviceMemory") MemorySegment memory, @CType("VkDeviceSize") long offset, @CType("VkDeviceSize") long size, @CType("VkMemoryMapFlags") int flags, @CType("void **") MemorySegment ppData) { + if (Unmarshal.isNullPointer(PFN_vkMapMemory)) throw new SymbolNotFoundError("Symbol not found: vkMapMemory"); + try { return (int) MH_vkMapMemory.invokeExact(PFN_vkMapMemory, device, memory, offset, size, flags, ppData); } + catch (Throwable e) { throw new RuntimeException("error in vkMapMemory", e); } + } + + public void UnmapMemory(@CType("VkDevice") MemorySegment device, @CType("VkDeviceMemory") MemorySegment memory) { + if (Unmarshal.isNullPointer(PFN_vkUnmapMemory)) throw new SymbolNotFoundError("Symbol not found: vkUnmapMemory"); + try { MH_vkUnmapMemory.invokeExact(PFN_vkUnmapMemory, device, memory); } + catch (Throwable e) { throw new RuntimeException("error in vkUnmapMemory", e); } + } + + public @CType("VkResult") int FlushMappedMemoryRanges(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int memoryRangeCount, @CType("const VkMappedMemoryRange *") MemorySegment pMemoryRanges) { + if (Unmarshal.isNullPointer(PFN_vkFlushMappedMemoryRanges)) throw new SymbolNotFoundError("Symbol not found: vkFlushMappedMemoryRanges"); + try { return (int) MH_vkFlushMappedMemoryRanges.invokeExact(PFN_vkFlushMappedMemoryRanges, device, memoryRangeCount, pMemoryRanges); } + catch (Throwable e) { throw new RuntimeException("error in vkFlushMappedMemoryRanges", e); } + } + + public @CType("VkResult") int InvalidateMappedMemoryRanges(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int memoryRangeCount, @CType("const VkMappedMemoryRange *") MemorySegment pMemoryRanges) { + if (Unmarshal.isNullPointer(PFN_vkInvalidateMappedMemoryRanges)) throw new SymbolNotFoundError("Symbol not found: vkInvalidateMappedMemoryRanges"); + try { return (int) MH_vkInvalidateMappedMemoryRanges.invokeExact(PFN_vkInvalidateMappedMemoryRanges, device, memoryRangeCount, pMemoryRanges); } + catch (Throwable e) { throw new RuntimeException("error in vkInvalidateMappedMemoryRanges", e); } + } + + public void GetDeviceMemoryCommitment(@CType("VkDevice") MemorySegment device, @CType("VkDeviceMemory") MemorySegment memory, @CType("VkDeviceSize *") MemorySegment pCommittedMemoryInBytes) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceMemoryCommitment)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceMemoryCommitment"); + try { MH_vkGetDeviceMemoryCommitment.invokeExact(PFN_vkGetDeviceMemoryCommitment, device, memory, pCommittedMemoryInBytes); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceMemoryCommitment", e); } + } + + public @CType("VkResult") int BindBufferMemory(@CType("VkDevice") MemorySegment device, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceMemory") MemorySegment memory, @CType("VkDeviceSize") long memoryOffset) { + if (Unmarshal.isNullPointer(PFN_vkBindBufferMemory)) throw new SymbolNotFoundError("Symbol not found: vkBindBufferMemory"); + try { return (int) MH_vkBindBufferMemory.invokeExact(PFN_vkBindBufferMemory, device, buffer, memory, memoryOffset); } + catch (Throwable e) { throw new RuntimeException("error in vkBindBufferMemory", e); } + } + + public @CType("VkResult") int BindImageMemory(@CType("VkDevice") MemorySegment device, @CType("VkImage") MemorySegment image, @CType("VkDeviceMemory") MemorySegment memory, @CType("VkDeviceSize") long memoryOffset) { + if (Unmarshal.isNullPointer(PFN_vkBindImageMemory)) throw new SymbolNotFoundError("Symbol not found: vkBindImageMemory"); + try { return (int) MH_vkBindImageMemory.invokeExact(PFN_vkBindImageMemory, device, image, memory, memoryOffset); } + catch (Throwable e) { throw new RuntimeException("error in vkBindImageMemory", e); } + } + + public void GetBufferMemoryRequirements(@CType("VkDevice") MemorySegment device, @CType("VkBuffer") MemorySegment buffer, @CType("VkMemoryRequirements *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetBufferMemoryRequirements)) throw new SymbolNotFoundError("Symbol not found: vkGetBufferMemoryRequirements"); + try { MH_vkGetBufferMemoryRequirements.invokeExact(PFN_vkGetBufferMemoryRequirements, device, buffer, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetBufferMemoryRequirements", e); } + } + + public void GetImageMemoryRequirements(@CType("VkDevice") MemorySegment device, @CType("VkImage") MemorySegment image, @CType("VkMemoryRequirements *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetImageMemoryRequirements)) throw new SymbolNotFoundError("Symbol not found: vkGetImageMemoryRequirements"); + try { MH_vkGetImageMemoryRequirements.invokeExact(PFN_vkGetImageMemoryRequirements, device, image, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageMemoryRequirements", e); } + } + + public void GetImageSparseMemoryRequirements(@CType("VkDevice") MemorySegment device, @CType("VkImage") MemorySegment image, @CType("uint32_t *") MemorySegment pSparseMemoryRequirementCount, @CType("VkSparseImageMemoryRequirements *") MemorySegment pSparseMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetImageSparseMemoryRequirements)) throw new SymbolNotFoundError("Symbol not found: vkGetImageSparseMemoryRequirements"); + try { MH_vkGetImageSparseMemoryRequirements.invokeExact(PFN_vkGetImageSparseMemoryRequirements, device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageSparseMemoryRequirements", e); } + } + + public void GetPhysicalDeviceSparseImageFormatProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkFormat") int format, @CType("VkImageType") int type, @CType("VkSampleCountFlagBits") int samples, @CType("VkImageUsageFlags") int usage, @CType("VkImageTiling") int tiling, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkSparseImageFormatProperties *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSparseImageFormatProperties)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSparseImageFormatProperties"); + try { MH_vkGetPhysicalDeviceSparseImageFormatProperties.invokeExact(PFN_vkGetPhysicalDeviceSparseImageFormatProperties, physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSparseImageFormatProperties", e); } + } + + public @CType("VkResult") int QueueBindSparse(@CType("VkQueue") MemorySegment queue, @CType("uint32_t") int bindInfoCount, @CType("const VkBindSparseInfo *") MemorySegment pBindInfo, @CType("VkFence") MemorySegment fence) { + if (Unmarshal.isNullPointer(PFN_vkQueueBindSparse)) throw new SymbolNotFoundError("Symbol not found: vkQueueBindSparse"); + try { return (int) MH_vkQueueBindSparse.invokeExact(PFN_vkQueueBindSparse, queue, bindInfoCount, pBindInfo, fence); } + catch (Throwable e) { throw new RuntimeException("error in vkQueueBindSparse", e); } + } + + public @CType("VkResult") int CreateFence(@CType("VkDevice") MemorySegment device, @CType("const VkFenceCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkFence *") MemorySegment pFence) { + if (Unmarshal.isNullPointer(PFN_vkCreateFence)) throw new SymbolNotFoundError("Symbol not found: vkCreateFence"); + try { return (int) MH_vkCreateFence.invokeExact(PFN_vkCreateFence, device, pCreateInfo, pAllocator, pFence); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateFence", e); } + } + + public void DestroyFence(@CType("VkDevice") MemorySegment device, @CType("VkFence") MemorySegment fence, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyFence)) throw new SymbolNotFoundError("Symbol not found: vkDestroyFence"); + try { MH_vkDestroyFence.invokeExact(PFN_vkDestroyFence, device, fence, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyFence", e); } + } + + public @CType("VkResult") int ResetFences(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int fenceCount, @CType("const VkFence *") MemorySegment pFences) { + if (Unmarshal.isNullPointer(PFN_vkResetFences)) throw new SymbolNotFoundError("Symbol not found: vkResetFences"); + try { return (int) MH_vkResetFences.invokeExact(PFN_vkResetFences, device, fenceCount, pFences); } + catch (Throwable e) { throw new RuntimeException("error in vkResetFences", e); } + } + + public @CType("VkResult") int GetFenceStatus(@CType("VkDevice") MemorySegment device, @CType("VkFence") MemorySegment fence) { + if (Unmarshal.isNullPointer(PFN_vkGetFenceStatus)) throw new SymbolNotFoundError("Symbol not found: vkGetFenceStatus"); + try { return (int) MH_vkGetFenceStatus.invokeExact(PFN_vkGetFenceStatus, device, fence); } + catch (Throwable e) { throw new RuntimeException("error in vkGetFenceStatus", e); } + } + + public @CType("VkResult") int WaitForFences(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int fenceCount, @CType("const VkFence *") MemorySegment pFences, @CType("VkBool32") int waitAll, @CType("uint64_t") long timeout) { + if (Unmarshal.isNullPointer(PFN_vkWaitForFences)) throw new SymbolNotFoundError("Symbol not found: vkWaitForFences"); + try { return (int) MH_vkWaitForFences.invokeExact(PFN_vkWaitForFences, device, fenceCount, pFences, waitAll, timeout); } + catch (Throwable e) { throw new RuntimeException("error in vkWaitForFences", e); } + } + + public @CType("VkResult") int CreateSemaphore(@CType("VkDevice") MemorySegment device, @CType("const VkSemaphoreCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSemaphore *") MemorySegment pSemaphore) { + if (Unmarshal.isNullPointer(PFN_vkCreateSemaphore)) throw new SymbolNotFoundError("Symbol not found: vkCreateSemaphore"); + try { return (int) MH_vkCreateSemaphore.invokeExact(PFN_vkCreateSemaphore, device, pCreateInfo, pAllocator, pSemaphore); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateSemaphore", e); } + } + + public void DestroySemaphore(@CType("VkDevice") MemorySegment device, @CType("VkSemaphore") MemorySegment semaphore, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroySemaphore)) throw new SymbolNotFoundError("Symbol not found: vkDestroySemaphore"); + try { MH_vkDestroySemaphore.invokeExact(PFN_vkDestroySemaphore, device, semaphore, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroySemaphore", e); } + } + + public @CType("VkResult") int CreateEvent(@CType("VkDevice") MemorySegment device, @CType("const VkEventCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkEvent *") MemorySegment pEvent) { + if (Unmarshal.isNullPointer(PFN_vkCreateEvent)) throw new SymbolNotFoundError("Symbol not found: vkCreateEvent"); + try { return (int) MH_vkCreateEvent.invokeExact(PFN_vkCreateEvent, device, pCreateInfo, pAllocator, pEvent); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateEvent", e); } + } + + public void DestroyEvent(@CType("VkDevice") MemorySegment device, @CType("VkEvent") MemorySegment event, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyEvent)) throw new SymbolNotFoundError("Symbol not found: vkDestroyEvent"); + try { MH_vkDestroyEvent.invokeExact(PFN_vkDestroyEvent, device, event, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyEvent", e); } + } + + public @CType("VkResult") int GetEventStatus(@CType("VkDevice") MemorySegment device, @CType("VkEvent") MemorySegment event) { + if (Unmarshal.isNullPointer(PFN_vkGetEventStatus)) throw new SymbolNotFoundError("Symbol not found: vkGetEventStatus"); + try { return (int) MH_vkGetEventStatus.invokeExact(PFN_vkGetEventStatus, device, event); } + catch (Throwable e) { throw new RuntimeException("error in vkGetEventStatus", e); } + } + + public @CType("VkResult") int SetEvent(@CType("VkDevice") MemorySegment device, @CType("VkEvent") MemorySegment event) { + if (Unmarshal.isNullPointer(PFN_vkSetEvent)) throw new SymbolNotFoundError("Symbol not found: vkSetEvent"); + try { return (int) MH_vkSetEvent.invokeExact(PFN_vkSetEvent, device, event); } + catch (Throwable e) { throw new RuntimeException("error in vkSetEvent", e); } + } + + public @CType("VkResult") int ResetEvent(@CType("VkDevice") MemorySegment device, @CType("VkEvent") MemorySegment event) { + if (Unmarshal.isNullPointer(PFN_vkResetEvent)) throw new SymbolNotFoundError("Symbol not found: vkResetEvent"); + try { return (int) MH_vkResetEvent.invokeExact(PFN_vkResetEvent, device, event); } + catch (Throwable e) { throw new RuntimeException("error in vkResetEvent", e); } + } + + public @CType("VkResult") int CreateQueryPool(@CType("VkDevice") MemorySegment device, @CType("const VkQueryPoolCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkQueryPool *") MemorySegment pQueryPool) { + if (Unmarshal.isNullPointer(PFN_vkCreateQueryPool)) throw new SymbolNotFoundError("Symbol not found: vkCreateQueryPool"); + try { return (int) MH_vkCreateQueryPool.invokeExact(PFN_vkCreateQueryPool, device, pCreateInfo, pAllocator, pQueryPool); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateQueryPool", e); } + } + + public void DestroyQueryPool(@CType("VkDevice") MemorySegment device, @CType("VkQueryPool") MemorySegment queryPool, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyQueryPool)) throw new SymbolNotFoundError("Symbol not found: vkDestroyQueryPool"); + try { MH_vkDestroyQueryPool.invokeExact(PFN_vkDestroyQueryPool, device, queryPool, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyQueryPool", e); } + } + + public @CType("VkResult") int GetQueryPoolResults(@CType("VkDevice") MemorySegment device, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int firstQuery, @CType("uint32_t") int queryCount, @CType("size_t") long dataSize, @CType("void *") MemorySegment pData, @CType("VkDeviceSize") long stride, @CType("VkQueryResultFlags") int flags) { + if (Unmarshal.isNullPointer(PFN_vkGetQueryPoolResults)) throw new SymbolNotFoundError("Symbol not found: vkGetQueryPoolResults"); + try { return (int) MH_vkGetQueryPoolResults.invokeExact(PFN_vkGetQueryPoolResults, device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); } + catch (Throwable e) { throw new RuntimeException("error in vkGetQueryPoolResults", e); } + } + + public @CType("VkResult") int CreateBuffer(@CType("VkDevice") MemorySegment device, @CType("const VkBufferCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkBuffer *") MemorySegment pBuffer) { + if (Unmarshal.isNullPointer(PFN_vkCreateBuffer)) throw new SymbolNotFoundError("Symbol not found: vkCreateBuffer"); + try { return (int) MH_vkCreateBuffer.invokeExact(PFN_vkCreateBuffer, device, pCreateInfo, pAllocator, pBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateBuffer", e); } + } + + public void DestroyBuffer(@CType("VkDevice") MemorySegment device, @CType("VkBuffer") MemorySegment buffer, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyBuffer)) throw new SymbolNotFoundError("Symbol not found: vkDestroyBuffer"); + try { MH_vkDestroyBuffer.invokeExact(PFN_vkDestroyBuffer, device, buffer, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyBuffer", e); } + } + + public @CType("VkResult") int CreateBufferView(@CType("VkDevice") MemorySegment device, @CType("const VkBufferViewCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkBufferView *") MemorySegment pView) { + if (Unmarshal.isNullPointer(PFN_vkCreateBufferView)) throw new SymbolNotFoundError("Symbol not found: vkCreateBufferView"); + try { return (int) MH_vkCreateBufferView.invokeExact(PFN_vkCreateBufferView, device, pCreateInfo, pAllocator, pView); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateBufferView", e); } + } + + public void DestroyBufferView(@CType("VkDevice") MemorySegment device, @CType("VkBufferView") MemorySegment bufferView, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyBufferView)) throw new SymbolNotFoundError("Symbol not found: vkDestroyBufferView"); + try { MH_vkDestroyBufferView.invokeExact(PFN_vkDestroyBufferView, device, bufferView, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyBufferView", e); } + } + + public @CType("VkResult") int CreateImage(@CType("VkDevice") MemorySegment device, @CType("const VkImageCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkImage *") MemorySegment pImage) { + if (Unmarshal.isNullPointer(PFN_vkCreateImage)) throw new SymbolNotFoundError("Symbol not found: vkCreateImage"); + try { return (int) MH_vkCreateImage.invokeExact(PFN_vkCreateImage, device, pCreateInfo, pAllocator, pImage); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateImage", e); } + } + + public void DestroyImage(@CType("VkDevice") MemorySegment device, @CType("VkImage") MemorySegment image, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyImage)) throw new SymbolNotFoundError("Symbol not found: vkDestroyImage"); + try { MH_vkDestroyImage.invokeExact(PFN_vkDestroyImage, device, image, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyImage", e); } + } + + public void GetImageSubresourceLayout(@CType("VkDevice") MemorySegment device, @CType("VkImage") MemorySegment image, @CType("const VkImageSubresource *") MemorySegment pSubresource, @CType("VkSubresourceLayout *") MemorySegment pLayout) { + if (Unmarshal.isNullPointer(PFN_vkGetImageSubresourceLayout)) throw new SymbolNotFoundError("Symbol not found: vkGetImageSubresourceLayout"); + try { MH_vkGetImageSubresourceLayout.invokeExact(PFN_vkGetImageSubresourceLayout, device, image, pSubresource, pLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageSubresourceLayout", e); } + } + + public @CType("VkResult") int CreateImageView(@CType("VkDevice") MemorySegment device, @CType("const VkImageViewCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkImageView *") MemorySegment pView) { + if (Unmarshal.isNullPointer(PFN_vkCreateImageView)) throw new SymbolNotFoundError("Symbol not found: vkCreateImageView"); + try { return (int) MH_vkCreateImageView.invokeExact(PFN_vkCreateImageView, device, pCreateInfo, pAllocator, pView); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateImageView", e); } + } + + public void DestroyImageView(@CType("VkDevice") MemorySegment device, @CType("VkImageView") MemorySegment imageView, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyImageView)) throw new SymbolNotFoundError("Symbol not found: vkDestroyImageView"); + try { MH_vkDestroyImageView.invokeExact(PFN_vkDestroyImageView, device, imageView, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyImageView", e); } + } + + public @CType("VkResult") int CreateShaderModule(@CType("VkDevice") MemorySegment device, @CType("const VkShaderModuleCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkShaderModule *") MemorySegment pShaderModule) { + if (Unmarshal.isNullPointer(PFN_vkCreateShaderModule)) throw new SymbolNotFoundError("Symbol not found: vkCreateShaderModule"); + try { return (int) MH_vkCreateShaderModule.invokeExact(PFN_vkCreateShaderModule, device, pCreateInfo, pAllocator, pShaderModule); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateShaderModule", e); } + } + + public void DestroyShaderModule(@CType("VkDevice") MemorySegment device, @CType("VkShaderModule") MemorySegment shaderModule, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyShaderModule)) throw new SymbolNotFoundError("Symbol not found: vkDestroyShaderModule"); + try { MH_vkDestroyShaderModule.invokeExact(PFN_vkDestroyShaderModule, device, shaderModule, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyShaderModule", e); } + } + + public @CType("VkResult") int CreatePipelineCache(@CType("VkDevice") MemorySegment device, @CType("const VkPipelineCacheCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkPipelineCache *") MemorySegment pPipelineCache) { + if (Unmarshal.isNullPointer(PFN_vkCreatePipelineCache)) throw new SymbolNotFoundError("Symbol not found: vkCreatePipelineCache"); + try { return (int) MH_vkCreatePipelineCache.invokeExact(PFN_vkCreatePipelineCache, device, pCreateInfo, pAllocator, pPipelineCache); } + catch (Throwable e) { throw new RuntimeException("error in vkCreatePipelineCache", e); } + } + + public void DestroyPipelineCache(@CType("VkDevice") MemorySegment device, @CType("VkPipelineCache") MemorySegment pipelineCache, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyPipelineCache)) throw new SymbolNotFoundError("Symbol not found: vkDestroyPipelineCache"); + try { MH_vkDestroyPipelineCache.invokeExact(PFN_vkDestroyPipelineCache, device, pipelineCache, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyPipelineCache", e); } + } + + public @CType("VkResult") int GetPipelineCacheData(@CType("VkDevice") MemorySegment device, @CType("VkPipelineCache") MemorySegment pipelineCache, @CType("size_t *") MemorySegment pDataSize, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetPipelineCacheData)) throw new SymbolNotFoundError("Symbol not found: vkGetPipelineCacheData"); + try { return (int) MH_vkGetPipelineCacheData.invokeExact(PFN_vkGetPipelineCacheData, device, pipelineCache, pDataSize, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPipelineCacheData", e); } + } + + public @CType("VkResult") int MergePipelineCaches(@CType("VkDevice") MemorySegment device, @CType("VkPipelineCache") MemorySegment dstCache, @CType("uint32_t") int srcCacheCount, @CType("const VkPipelineCache *") MemorySegment pSrcCaches) { + if (Unmarshal.isNullPointer(PFN_vkMergePipelineCaches)) throw new SymbolNotFoundError("Symbol not found: vkMergePipelineCaches"); + try { return (int) MH_vkMergePipelineCaches.invokeExact(PFN_vkMergePipelineCaches, device, dstCache, srcCacheCount, pSrcCaches); } + catch (Throwable e) { throw new RuntimeException("error in vkMergePipelineCaches", e); } + } + + public @CType("VkResult") int CreateGraphicsPipelines(@CType("VkDevice") MemorySegment device, @CType("VkPipelineCache") MemorySegment pipelineCache, @CType("uint32_t") int createInfoCount, @CType("const VkGraphicsPipelineCreateInfo *") MemorySegment pCreateInfos, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkPipeline *") MemorySegment pPipelines) { + if (Unmarshal.isNullPointer(PFN_vkCreateGraphicsPipelines)) throw new SymbolNotFoundError("Symbol not found: vkCreateGraphicsPipelines"); + try { return (int) MH_vkCreateGraphicsPipelines.invokeExact(PFN_vkCreateGraphicsPipelines, device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateGraphicsPipelines", e); } + } + + public @CType("VkResult") int CreateComputePipelines(@CType("VkDevice") MemorySegment device, @CType("VkPipelineCache") MemorySegment pipelineCache, @CType("uint32_t") int createInfoCount, @CType("const VkComputePipelineCreateInfo *") MemorySegment pCreateInfos, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkPipeline *") MemorySegment pPipelines) { + if (Unmarshal.isNullPointer(PFN_vkCreateComputePipelines)) throw new SymbolNotFoundError("Symbol not found: vkCreateComputePipelines"); + try { return (int) MH_vkCreateComputePipelines.invokeExact(PFN_vkCreateComputePipelines, device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateComputePipelines", e); } + } + + public void DestroyPipeline(@CType("VkDevice") MemorySegment device, @CType("VkPipeline") MemorySegment pipeline, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyPipeline)) throw new SymbolNotFoundError("Symbol not found: vkDestroyPipeline"); + try { MH_vkDestroyPipeline.invokeExact(PFN_vkDestroyPipeline, device, pipeline, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyPipeline", e); } + } + + public @CType("VkResult") int CreatePipelineLayout(@CType("VkDevice") MemorySegment device, @CType("const VkPipelineLayoutCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkPipelineLayout *") MemorySegment pPipelineLayout) { + if (Unmarshal.isNullPointer(PFN_vkCreatePipelineLayout)) throw new SymbolNotFoundError("Symbol not found: vkCreatePipelineLayout"); + try { return (int) MH_vkCreatePipelineLayout.invokeExact(PFN_vkCreatePipelineLayout, device, pCreateInfo, pAllocator, pPipelineLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkCreatePipelineLayout", e); } + } + + public void DestroyPipelineLayout(@CType("VkDevice") MemorySegment device, @CType("VkPipelineLayout") MemorySegment pipelineLayout, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyPipelineLayout)) throw new SymbolNotFoundError("Symbol not found: vkDestroyPipelineLayout"); + try { MH_vkDestroyPipelineLayout.invokeExact(PFN_vkDestroyPipelineLayout, device, pipelineLayout, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyPipelineLayout", e); } + } + + public @CType("VkResult") int CreateSampler(@CType("VkDevice") MemorySegment device, @CType("const VkSamplerCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSampler *") MemorySegment pSampler) { + if (Unmarshal.isNullPointer(PFN_vkCreateSampler)) throw new SymbolNotFoundError("Symbol not found: vkCreateSampler"); + try { return (int) MH_vkCreateSampler.invokeExact(PFN_vkCreateSampler, device, pCreateInfo, pAllocator, pSampler); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateSampler", e); } + } + + public void DestroySampler(@CType("VkDevice") MemorySegment device, @CType("VkSampler") MemorySegment sampler, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroySampler)) throw new SymbolNotFoundError("Symbol not found: vkDestroySampler"); + try { MH_vkDestroySampler.invokeExact(PFN_vkDestroySampler, device, sampler, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroySampler", e); } + } + + public @CType("VkResult") int CreateDescriptorSetLayout(@CType("VkDevice") MemorySegment device, @CType("const VkDescriptorSetLayoutCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkDescriptorSetLayout *") MemorySegment pSetLayout) { + if (Unmarshal.isNullPointer(PFN_vkCreateDescriptorSetLayout)) throw new SymbolNotFoundError("Symbol not found: vkCreateDescriptorSetLayout"); + try { return (int) MH_vkCreateDescriptorSetLayout.invokeExact(PFN_vkCreateDescriptorSetLayout, device, pCreateInfo, pAllocator, pSetLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDescriptorSetLayout", e); } + } + + public void DestroyDescriptorSetLayout(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorSetLayout") MemorySegment descriptorSetLayout, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyDescriptorSetLayout)) throw new SymbolNotFoundError("Symbol not found: vkDestroyDescriptorSetLayout"); + try { MH_vkDestroyDescriptorSetLayout.invokeExact(PFN_vkDestroyDescriptorSetLayout, device, descriptorSetLayout, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyDescriptorSetLayout", e); } + } + + public @CType("VkResult") int CreateDescriptorPool(@CType("VkDevice") MemorySegment device, @CType("const VkDescriptorPoolCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkDescriptorPool *") MemorySegment pDescriptorPool) { + if (Unmarshal.isNullPointer(PFN_vkCreateDescriptorPool)) throw new SymbolNotFoundError("Symbol not found: vkCreateDescriptorPool"); + try { return (int) MH_vkCreateDescriptorPool.invokeExact(PFN_vkCreateDescriptorPool, device, pCreateInfo, pAllocator, pDescriptorPool); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDescriptorPool", e); } + } + + public void DestroyDescriptorPool(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorPool") MemorySegment descriptorPool, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyDescriptorPool)) throw new SymbolNotFoundError("Symbol not found: vkDestroyDescriptorPool"); + try { MH_vkDestroyDescriptorPool.invokeExact(PFN_vkDestroyDescriptorPool, device, descriptorPool, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyDescriptorPool", e); } + } + + public @CType("VkResult") int ResetDescriptorPool(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorPool") MemorySegment descriptorPool, @CType("VkDescriptorPoolResetFlags") int flags) { + if (Unmarshal.isNullPointer(PFN_vkResetDescriptorPool)) throw new SymbolNotFoundError("Symbol not found: vkResetDescriptorPool"); + try { return (int) MH_vkResetDescriptorPool.invokeExact(PFN_vkResetDescriptorPool, device, descriptorPool, flags); } + catch (Throwable e) { throw new RuntimeException("error in vkResetDescriptorPool", e); } + } + + public @CType("VkResult") int AllocateDescriptorSets(@CType("VkDevice") MemorySegment device, @CType("const VkDescriptorSetAllocateInfo *") MemorySegment pAllocateInfo, @CType("VkDescriptorSet *") MemorySegment pDescriptorSets) { + if (Unmarshal.isNullPointer(PFN_vkAllocateDescriptorSets)) throw new SymbolNotFoundError("Symbol not found: vkAllocateDescriptorSets"); + try { return (int) MH_vkAllocateDescriptorSets.invokeExact(PFN_vkAllocateDescriptorSets, device, pAllocateInfo, pDescriptorSets); } + catch (Throwable e) { throw new RuntimeException("error in vkAllocateDescriptorSets", e); } + } + + public @CType("VkResult") int FreeDescriptorSets(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorPool") MemorySegment descriptorPool, @CType("uint32_t") int descriptorSetCount, @CType("const VkDescriptorSet *") MemorySegment pDescriptorSets) { + if (Unmarshal.isNullPointer(PFN_vkFreeDescriptorSets)) throw new SymbolNotFoundError("Symbol not found: vkFreeDescriptorSets"); + try { return (int) MH_vkFreeDescriptorSets.invokeExact(PFN_vkFreeDescriptorSets, device, descriptorPool, descriptorSetCount, pDescriptorSets); } + catch (Throwable e) { throw new RuntimeException("error in vkFreeDescriptorSets", e); } + } + + public void UpdateDescriptorSets(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int descriptorWriteCount, @CType("const VkWriteDescriptorSet *") MemorySegment pDescriptorWrites, @CType("uint32_t") int descriptorCopyCount, @CType("const VkCopyDescriptorSet *") MemorySegment pDescriptorCopies) { + if (Unmarshal.isNullPointer(PFN_vkUpdateDescriptorSets)) throw new SymbolNotFoundError("Symbol not found: vkUpdateDescriptorSets"); + try { MH_vkUpdateDescriptorSets.invokeExact(PFN_vkUpdateDescriptorSets, device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); } + catch (Throwable e) { throw new RuntimeException("error in vkUpdateDescriptorSets", e); } + } + + public @CType("VkResult") int CreateFramebuffer(@CType("VkDevice") MemorySegment device, @CType("const VkFramebufferCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkFramebuffer *") MemorySegment pFramebuffer) { + if (Unmarshal.isNullPointer(PFN_vkCreateFramebuffer)) throw new SymbolNotFoundError("Symbol not found: vkCreateFramebuffer"); + try { return (int) MH_vkCreateFramebuffer.invokeExact(PFN_vkCreateFramebuffer, device, pCreateInfo, pAllocator, pFramebuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateFramebuffer", e); } + } + + public void DestroyFramebuffer(@CType("VkDevice") MemorySegment device, @CType("VkFramebuffer") MemorySegment framebuffer, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyFramebuffer)) throw new SymbolNotFoundError("Symbol not found: vkDestroyFramebuffer"); + try { MH_vkDestroyFramebuffer.invokeExact(PFN_vkDestroyFramebuffer, device, framebuffer, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyFramebuffer", e); } + } + + public @CType("VkResult") int CreateRenderPass(@CType("VkDevice") MemorySegment device, @CType("const VkRenderPassCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkRenderPass *") MemorySegment pRenderPass) { + if (Unmarshal.isNullPointer(PFN_vkCreateRenderPass)) throw new SymbolNotFoundError("Symbol not found: vkCreateRenderPass"); + try { return (int) MH_vkCreateRenderPass.invokeExact(PFN_vkCreateRenderPass, device, pCreateInfo, pAllocator, pRenderPass); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateRenderPass", e); } + } + + public void DestroyRenderPass(@CType("VkDevice") MemorySegment device, @CType("VkRenderPass") MemorySegment renderPass, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyRenderPass)) throw new SymbolNotFoundError("Symbol not found: vkDestroyRenderPass"); + try { MH_vkDestroyRenderPass.invokeExact(PFN_vkDestroyRenderPass, device, renderPass, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyRenderPass", e); } + } + + public void GetRenderAreaGranularity(@CType("VkDevice") MemorySegment device, @CType("VkRenderPass") MemorySegment renderPass, @CType("VkExtent2D *") MemorySegment pGranularity) { + if (Unmarshal.isNullPointer(PFN_vkGetRenderAreaGranularity)) throw new SymbolNotFoundError("Symbol not found: vkGetRenderAreaGranularity"); + try { MH_vkGetRenderAreaGranularity.invokeExact(PFN_vkGetRenderAreaGranularity, device, renderPass, pGranularity); } + catch (Throwable e) { throw new RuntimeException("error in vkGetRenderAreaGranularity", e); } + } + + public @CType("VkResult") int CreateCommandPool(@CType("VkDevice") MemorySegment device, @CType("const VkCommandPoolCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkCommandPool *") MemorySegment pCommandPool) { + if (Unmarshal.isNullPointer(PFN_vkCreateCommandPool)) throw new SymbolNotFoundError("Symbol not found: vkCreateCommandPool"); + try { return (int) MH_vkCreateCommandPool.invokeExact(PFN_vkCreateCommandPool, device, pCreateInfo, pAllocator, pCommandPool); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateCommandPool", e); } + } + + public void DestroyCommandPool(@CType("VkDevice") MemorySegment device, @CType("VkCommandPool") MemorySegment commandPool, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyCommandPool)) throw new SymbolNotFoundError("Symbol not found: vkDestroyCommandPool"); + try { MH_vkDestroyCommandPool.invokeExact(PFN_vkDestroyCommandPool, device, commandPool, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyCommandPool", e); } + } + + public @CType("VkResult") int ResetCommandPool(@CType("VkDevice") MemorySegment device, @CType("VkCommandPool") MemorySegment commandPool, @CType("VkCommandPoolResetFlags") int flags) { + if (Unmarshal.isNullPointer(PFN_vkResetCommandPool)) throw new SymbolNotFoundError("Symbol not found: vkResetCommandPool"); + try { return (int) MH_vkResetCommandPool.invokeExact(PFN_vkResetCommandPool, device, commandPool, flags); } + catch (Throwable e) { throw new RuntimeException("error in vkResetCommandPool", e); } + } + + public @CType("VkResult") int AllocateCommandBuffers(@CType("VkDevice") MemorySegment device, @CType("const VkCommandBufferAllocateInfo *") MemorySegment pAllocateInfo, @CType("VkCommandBuffer *") MemorySegment pCommandBuffers) { + if (Unmarshal.isNullPointer(PFN_vkAllocateCommandBuffers)) throw new SymbolNotFoundError("Symbol not found: vkAllocateCommandBuffers"); + try { return (int) MH_vkAllocateCommandBuffers.invokeExact(PFN_vkAllocateCommandBuffers, device, pAllocateInfo, pCommandBuffers); } + catch (Throwable e) { throw new RuntimeException("error in vkAllocateCommandBuffers", e); } + } + + public void FreeCommandBuffers(@CType("VkDevice") MemorySegment device, @CType("VkCommandPool") MemorySegment commandPool, @CType("uint32_t") int commandBufferCount, @CType("const VkCommandBuffer *") MemorySegment pCommandBuffers) { + if (Unmarshal.isNullPointer(PFN_vkFreeCommandBuffers)) throw new SymbolNotFoundError("Symbol not found: vkFreeCommandBuffers"); + try { MH_vkFreeCommandBuffers.invokeExact(PFN_vkFreeCommandBuffers, device, commandPool, commandBufferCount, pCommandBuffers); } + catch (Throwable e) { throw new RuntimeException("error in vkFreeCommandBuffers", e); } + } + + public @CType("VkResult") int BeginCommandBuffer(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCommandBufferBeginInfo *") MemorySegment pBeginInfo) { + if (Unmarshal.isNullPointer(PFN_vkBeginCommandBuffer)) throw new SymbolNotFoundError("Symbol not found: vkBeginCommandBuffer"); + try { return (int) MH_vkBeginCommandBuffer.invokeExact(PFN_vkBeginCommandBuffer, commandBuffer, pBeginInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkBeginCommandBuffer", e); } + } + + public @CType("VkResult") int EndCommandBuffer(@CType("VkCommandBuffer") MemorySegment commandBuffer) { + if (Unmarshal.isNullPointer(PFN_vkEndCommandBuffer)) throw new SymbolNotFoundError("Symbol not found: vkEndCommandBuffer"); + try { return (int) MH_vkEndCommandBuffer.invokeExact(PFN_vkEndCommandBuffer, commandBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkEndCommandBuffer", e); } + } + + public @CType("VkResult") int ResetCommandBuffer(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCommandBufferResetFlags") int flags) { + if (Unmarshal.isNullPointer(PFN_vkResetCommandBuffer)) throw new SymbolNotFoundError("Symbol not found: vkResetCommandBuffer"); + try { return (int) MH_vkResetCommandBuffer.invokeExact(PFN_vkResetCommandBuffer, commandBuffer, flags); } + catch (Throwable e) { throw new RuntimeException("error in vkResetCommandBuffer", e); } + } + + public void CmdBindPipeline(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineBindPoint") int pipelineBindPoint, @CType("VkPipeline") MemorySegment pipeline) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindPipeline)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindPipeline"); + try { MH_vkCmdBindPipeline.invokeExact(PFN_vkCmdBindPipeline, commandBuffer, pipelineBindPoint, pipeline); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindPipeline", e); } + } + + public void CmdSetViewport(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstViewport, @CType("uint32_t") int viewportCount, @CType("const VkViewport *") MemorySegment pViewports) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetViewport)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetViewport"); + try { MH_vkCmdSetViewport.invokeExact(PFN_vkCmdSetViewport, commandBuffer, firstViewport, viewportCount, pViewports); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetViewport", e); } + } + + public void CmdSetScissor(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstScissor, @CType("uint32_t") int scissorCount, @CType("const VkRect2D *") MemorySegment pScissors) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetScissor)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetScissor"); + try { MH_vkCmdSetScissor.invokeExact(PFN_vkCmdSetScissor, commandBuffer, firstScissor, scissorCount, pScissors); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetScissor", e); } + } + + public void CmdSetLineWidth(@CType("VkCommandBuffer") MemorySegment commandBuffer, float lineWidth) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLineWidth)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLineWidth"); + try { MH_vkCmdSetLineWidth.invokeExact(PFN_vkCmdSetLineWidth, commandBuffer, lineWidth); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLineWidth", e); } + } + + public void CmdSetDepthBias(@CType("VkCommandBuffer") MemorySegment commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthBias)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthBias"); + try { MH_vkCmdSetDepthBias.invokeExact(PFN_vkCmdSetDepthBias, commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthBias", e); } + } + + public void CmdSetBlendConstants(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const float [4]") float blendConstants) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetBlendConstants)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetBlendConstants"); + try { MH_vkCmdSetBlendConstants.invokeExact(PFN_vkCmdSetBlendConstants, commandBuffer, blendConstants); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetBlendConstants", e); } + } + + public void CmdSetDepthBounds(@CType("VkCommandBuffer") MemorySegment commandBuffer, float minDepthBounds, float maxDepthBounds) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthBounds)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthBounds"); + try { MH_vkCmdSetDepthBounds.invokeExact(PFN_vkCmdSetDepthBounds, commandBuffer, minDepthBounds, maxDepthBounds); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthBounds", e); } + } + + public void CmdSetStencilCompareMask(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkStencilFaceFlags") int faceMask, @CType("uint32_t") int compareMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetStencilCompareMask)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetStencilCompareMask"); + try { MH_vkCmdSetStencilCompareMask.invokeExact(PFN_vkCmdSetStencilCompareMask, commandBuffer, faceMask, compareMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetStencilCompareMask", e); } + } + + public void CmdSetStencilWriteMask(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkStencilFaceFlags") int faceMask, @CType("uint32_t") int writeMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetStencilWriteMask)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetStencilWriteMask"); + try { MH_vkCmdSetStencilWriteMask.invokeExact(PFN_vkCmdSetStencilWriteMask, commandBuffer, faceMask, writeMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetStencilWriteMask", e); } + } + + public void CmdSetStencilReference(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkStencilFaceFlags") int faceMask, @CType("uint32_t") int reference) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetStencilReference)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetStencilReference"); + try { MH_vkCmdSetStencilReference.invokeExact(PFN_vkCmdSetStencilReference, commandBuffer, faceMask, reference); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetStencilReference", e); } + } + + public void CmdBindDescriptorSets(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineBindPoint") int pipelineBindPoint, @CType("VkPipelineLayout") MemorySegment layout, @CType("uint32_t") int firstSet, @CType("uint32_t") int descriptorSetCount, @CType("const VkDescriptorSet *") MemorySegment pDescriptorSets, @CType("uint32_t") int dynamicOffsetCount, @CType("const uint32_t *") MemorySegment pDynamicOffsets) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindDescriptorSets)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindDescriptorSets"); + try { MH_vkCmdBindDescriptorSets.invokeExact(PFN_vkCmdBindDescriptorSets, commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindDescriptorSets", e); } + } + + public void CmdBindIndexBuffer(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkIndexType") int indexType) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindIndexBuffer)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindIndexBuffer"); + try { MH_vkCmdBindIndexBuffer.invokeExact(PFN_vkCmdBindIndexBuffer, commandBuffer, buffer, offset, indexType); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindIndexBuffer", e); } + } + + public void CmdBindVertexBuffers(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstBinding, @CType("uint32_t") int bindingCount, @CType("const VkBuffer *") MemorySegment pBuffers, @CType("const VkDeviceSize *") MemorySegment pOffsets) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindVertexBuffers)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindVertexBuffers"); + try { MH_vkCmdBindVertexBuffers.invokeExact(PFN_vkCmdBindVertexBuffers, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindVertexBuffers", e); } + } + + public void CmdDraw(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int vertexCount, @CType("uint32_t") int instanceCount, @CType("uint32_t") int firstVertex, @CType("uint32_t") int firstInstance) { + if (Unmarshal.isNullPointer(PFN_vkCmdDraw)) throw new SymbolNotFoundError("Symbol not found: vkCmdDraw"); + try { MH_vkCmdDraw.invokeExact(PFN_vkCmdDraw, commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDraw", e); } + } + + public void CmdDrawIndexed(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int indexCount, @CType("uint32_t") int instanceCount, @CType("uint32_t") int firstIndex, @CType("int32_t") int vertexOffset, @CType("uint32_t") int firstInstance) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawIndexed)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawIndexed"); + try { MH_vkCmdDrawIndexed.invokeExact(PFN_vkCmdDrawIndexed, commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawIndexed", e); } + } + + public void CmdDrawIndirect(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("uint32_t") int drawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawIndirect)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawIndirect"); + try { MH_vkCmdDrawIndirect.invokeExact(PFN_vkCmdDrawIndirect, commandBuffer, buffer, offset, drawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawIndirect", e); } + } + + public void CmdDrawIndexedIndirect(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("uint32_t") int drawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawIndexedIndirect)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawIndexedIndirect"); + try { MH_vkCmdDrawIndexedIndirect.invokeExact(PFN_vkCmdDrawIndexedIndirect, commandBuffer, buffer, offset, drawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawIndexedIndirect", e); } + } + + public void CmdDispatch(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int groupCountX, @CType("uint32_t") int groupCountY, @CType("uint32_t") int groupCountZ) { + if (Unmarshal.isNullPointer(PFN_vkCmdDispatch)) throw new SymbolNotFoundError("Symbol not found: vkCmdDispatch"); + try { MH_vkCmdDispatch.invokeExact(PFN_vkCmdDispatch, commandBuffer, groupCountX, groupCountY, groupCountZ); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDispatch", e); } + } + + public void CmdDispatchIndirect(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset) { + if (Unmarshal.isNullPointer(PFN_vkCmdDispatchIndirect)) throw new SymbolNotFoundError("Symbol not found: vkCmdDispatchIndirect"); + try { MH_vkCmdDispatchIndirect.invokeExact(PFN_vkCmdDispatchIndirect, commandBuffer, buffer, offset); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDispatchIndirect", e); } + } + + public void CmdCopyBuffer(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment srcBuffer, @CType("VkBuffer") MemorySegment dstBuffer, @CType("uint32_t") int regionCount, @CType("const VkBufferCopy *") MemorySegment pRegions) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyBuffer)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyBuffer"); + try { MH_vkCmdCopyBuffer.invokeExact(PFN_vkCmdCopyBuffer, commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyBuffer", e); } + } + + public void CmdCopyImage(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkImage") MemorySegment srcImage, @CType("VkImageLayout") int srcImageLayout, @CType("VkImage") MemorySegment dstImage, @CType("VkImageLayout") int dstImageLayout, @CType("uint32_t") int regionCount, @CType("const VkImageCopy *") MemorySegment pRegions) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyImage)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyImage"); + try { MH_vkCmdCopyImage.invokeExact(PFN_vkCmdCopyImage, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyImage", e); } + } + + public void CmdBlitImage(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkImage") MemorySegment srcImage, @CType("VkImageLayout") int srcImageLayout, @CType("VkImage") MemorySegment dstImage, @CType("VkImageLayout") int dstImageLayout, @CType("uint32_t") int regionCount, @CType("const VkImageBlit *") MemorySegment pRegions, @CType("VkFilter") int filter) { + if (Unmarshal.isNullPointer(PFN_vkCmdBlitImage)) throw new SymbolNotFoundError("Symbol not found: vkCmdBlitImage"); + try { MH_vkCmdBlitImage.invokeExact(PFN_vkCmdBlitImage, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBlitImage", e); } + } + + public void CmdCopyBufferToImage(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment srcBuffer, @CType("VkImage") MemorySegment dstImage, @CType("VkImageLayout") int dstImageLayout, @CType("uint32_t") int regionCount, @CType("const VkBufferImageCopy *") MemorySegment pRegions) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyBufferToImage)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyBufferToImage"); + try { MH_vkCmdCopyBufferToImage.invokeExact(PFN_vkCmdCopyBufferToImage, commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyBufferToImage", e); } + } + + public void CmdCopyImageToBuffer(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkImage") MemorySegment srcImage, @CType("VkImageLayout") int srcImageLayout, @CType("VkBuffer") MemorySegment dstBuffer, @CType("uint32_t") int regionCount, @CType("const VkBufferImageCopy *") MemorySegment pRegions) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyImageToBuffer)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyImageToBuffer"); + try { MH_vkCmdCopyImageToBuffer.invokeExact(PFN_vkCmdCopyImageToBuffer, commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyImageToBuffer", e); } + } + + public void CmdUpdateBuffer(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment dstBuffer, @CType("VkDeviceSize") long dstOffset, @CType("VkDeviceSize") long dataSize, @CType("const void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkCmdUpdateBuffer)) throw new SymbolNotFoundError("Symbol not found: vkCmdUpdateBuffer"); + try { MH_vkCmdUpdateBuffer.invokeExact(PFN_vkCmdUpdateBuffer, commandBuffer, dstBuffer, dstOffset, dataSize, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdUpdateBuffer", e); } + } + + public void CmdFillBuffer(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment dstBuffer, @CType("VkDeviceSize") long dstOffset, @CType("VkDeviceSize") long size, @CType("uint32_t") int data) { + if (Unmarshal.isNullPointer(PFN_vkCmdFillBuffer)) throw new SymbolNotFoundError("Symbol not found: vkCmdFillBuffer"); + try { MH_vkCmdFillBuffer.invokeExact(PFN_vkCmdFillBuffer, commandBuffer, dstBuffer, dstOffset, size, data); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdFillBuffer", e); } + } + + public void CmdClearColorImage(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkImage") MemorySegment image, @CType("VkImageLayout") int imageLayout, @CType("const VkClearColorValue *") MemorySegment pColor, @CType("uint32_t") int rangeCount, @CType("const VkImageSubresourceRange *") MemorySegment pRanges) { + if (Unmarshal.isNullPointer(PFN_vkCmdClearColorImage)) throw new SymbolNotFoundError("Symbol not found: vkCmdClearColorImage"); + try { MH_vkCmdClearColorImage.invokeExact(PFN_vkCmdClearColorImage, commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdClearColorImage", e); } + } + + public void CmdClearDepthStencilImage(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkImage") MemorySegment image, @CType("VkImageLayout") int imageLayout, @CType("const VkClearDepthStencilValue *") MemorySegment pDepthStencil, @CType("uint32_t") int rangeCount, @CType("const VkImageSubresourceRange *") MemorySegment pRanges) { + if (Unmarshal.isNullPointer(PFN_vkCmdClearDepthStencilImage)) throw new SymbolNotFoundError("Symbol not found: vkCmdClearDepthStencilImage"); + try { MH_vkCmdClearDepthStencilImage.invokeExact(PFN_vkCmdClearDepthStencilImage, commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdClearDepthStencilImage", e); } + } + + public void CmdClearAttachments(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int attachmentCount, @CType("const VkClearAttachment *") MemorySegment pAttachments, @CType("uint32_t") int rectCount, @CType("const VkClearRect *") MemorySegment pRects) { + if (Unmarshal.isNullPointer(PFN_vkCmdClearAttachments)) throw new SymbolNotFoundError("Symbol not found: vkCmdClearAttachments"); + try { MH_vkCmdClearAttachments.invokeExact(PFN_vkCmdClearAttachments, commandBuffer, attachmentCount, pAttachments, rectCount, pRects); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdClearAttachments", e); } + } + + public void CmdResolveImage(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkImage") MemorySegment srcImage, @CType("VkImageLayout") int srcImageLayout, @CType("VkImage") MemorySegment dstImage, @CType("VkImageLayout") int dstImageLayout, @CType("uint32_t") int regionCount, @CType("const VkImageResolve *") MemorySegment pRegions) { + if (Unmarshal.isNullPointer(PFN_vkCmdResolveImage)) throw new SymbolNotFoundError("Symbol not found: vkCmdResolveImage"); + try { MH_vkCmdResolveImage.invokeExact(PFN_vkCmdResolveImage, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdResolveImage", e); } + } + + public void CmdSetEvent(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkEvent") MemorySegment event, @CType("VkPipelineStageFlags") int stageMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetEvent)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetEvent"); + try { MH_vkCmdSetEvent.invokeExact(PFN_vkCmdSetEvent, commandBuffer, event, stageMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetEvent", e); } + } + + public void CmdResetEvent(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkEvent") MemorySegment event, @CType("VkPipelineStageFlags") int stageMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdResetEvent)) throw new SymbolNotFoundError("Symbol not found: vkCmdResetEvent"); + try { MH_vkCmdResetEvent.invokeExact(PFN_vkCmdResetEvent, commandBuffer, event, stageMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdResetEvent", e); } + } + + public void CmdWaitEvents(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int eventCount, @CType("const VkEvent *") MemorySegment pEvents, @CType("VkPipelineStageFlags") int srcStageMask, @CType("VkPipelineStageFlags") int dstStageMask, @CType("uint32_t") int memoryBarrierCount, @CType("const VkMemoryBarrier *") MemorySegment pMemoryBarriers, @CType("uint32_t") int bufferMemoryBarrierCount, @CType("const VkBufferMemoryBarrier *") MemorySegment pBufferMemoryBarriers, @CType("uint32_t") int imageMemoryBarrierCount, @CType("const VkImageMemoryBarrier *") MemorySegment pImageMemoryBarriers) { + if (Unmarshal.isNullPointer(PFN_vkCmdWaitEvents)) throw new SymbolNotFoundError("Symbol not found: vkCmdWaitEvents"); + try { MH_vkCmdWaitEvents.invokeExact(PFN_vkCmdWaitEvents, commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWaitEvents", e); } + } + + public void CmdPipelineBarrier(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineStageFlags") int srcStageMask, @CType("VkPipelineStageFlags") int dstStageMask, @CType("VkDependencyFlags") int dependencyFlags, @CType("uint32_t") int memoryBarrierCount, @CType("const VkMemoryBarrier *") MemorySegment pMemoryBarriers, @CType("uint32_t") int bufferMemoryBarrierCount, @CType("const VkBufferMemoryBarrier *") MemorySegment pBufferMemoryBarriers, @CType("uint32_t") int imageMemoryBarrierCount, @CType("const VkImageMemoryBarrier *") MemorySegment pImageMemoryBarriers) { + if (Unmarshal.isNullPointer(PFN_vkCmdPipelineBarrier)) throw new SymbolNotFoundError("Symbol not found: vkCmdPipelineBarrier"); + try { MH_vkCmdPipelineBarrier.invokeExact(PFN_vkCmdPipelineBarrier, commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPipelineBarrier", e); } + } + + public void CmdBeginQuery(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int query, @CType("VkQueryControlFlags") int flags) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginQuery)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginQuery"); + try { MH_vkCmdBeginQuery.invokeExact(PFN_vkCmdBeginQuery, commandBuffer, queryPool, query, flags); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginQuery", e); } + } + + public void CmdEndQuery(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int query) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndQuery)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndQuery"); + try { MH_vkCmdEndQuery.invokeExact(PFN_vkCmdEndQuery, commandBuffer, queryPool, query); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndQuery", e); } + } + + public void CmdResetQueryPool(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int firstQuery, @CType("uint32_t") int queryCount) { + if (Unmarshal.isNullPointer(PFN_vkCmdResetQueryPool)) throw new SymbolNotFoundError("Symbol not found: vkCmdResetQueryPool"); + try { MH_vkCmdResetQueryPool.invokeExact(PFN_vkCmdResetQueryPool, commandBuffer, queryPool, firstQuery, queryCount); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdResetQueryPool", e); } + } + + public void CmdWriteTimestamp(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineStageFlagBits") int pipelineStage, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int query) { + if (Unmarshal.isNullPointer(PFN_vkCmdWriteTimestamp)) throw new SymbolNotFoundError("Symbol not found: vkCmdWriteTimestamp"); + try { MH_vkCmdWriteTimestamp.invokeExact(PFN_vkCmdWriteTimestamp, commandBuffer, pipelineStage, queryPool, query); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWriteTimestamp", e); } + } + + public void CmdCopyQueryPoolResults(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int firstQuery, @CType("uint32_t") int queryCount, @CType("VkBuffer") MemorySegment dstBuffer, @CType("VkDeviceSize") long dstOffset, @CType("VkDeviceSize") long stride, @CType("VkQueryResultFlags") int flags) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyQueryPoolResults)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyQueryPoolResults"); + try { MH_vkCmdCopyQueryPoolResults.invokeExact(PFN_vkCmdCopyQueryPoolResults, commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyQueryPoolResults", e); } + } + + public void CmdPushConstants(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineLayout") MemorySegment layout, @CType("VkShaderStageFlags") int stageFlags, @CType("uint32_t") int offset, @CType("uint32_t") int size, @CType("const void *") MemorySegment pValues) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushConstants)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushConstants"); + try { MH_vkCmdPushConstants.invokeExact(PFN_vkCmdPushConstants, commandBuffer, layout, stageFlags, offset, size, pValues); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushConstants", e); } + } + + public void CmdBeginRenderPass(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkRenderPassBeginInfo *") MemorySegment pRenderPassBegin, @CType("VkSubpassContents") int contents) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginRenderPass)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginRenderPass"); + try { MH_vkCmdBeginRenderPass.invokeExact(PFN_vkCmdBeginRenderPass, commandBuffer, pRenderPassBegin, contents); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginRenderPass", e); } + } + + public void CmdNextSubpass(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkSubpassContents") int contents) { + if (Unmarshal.isNullPointer(PFN_vkCmdNextSubpass)) throw new SymbolNotFoundError("Symbol not found: vkCmdNextSubpass"); + try { MH_vkCmdNextSubpass.invokeExact(PFN_vkCmdNextSubpass, commandBuffer, contents); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdNextSubpass", e); } + } + + public void CmdEndRenderPass(@CType("VkCommandBuffer") MemorySegment commandBuffer) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndRenderPass)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndRenderPass"); + try { MH_vkCmdEndRenderPass.invokeExact(PFN_vkCmdEndRenderPass, commandBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndRenderPass", e); } + } + + public void CmdExecuteCommands(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int commandBufferCount, @CType("const VkCommandBuffer *") MemorySegment pCommandBuffers) { + if (Unmarshal.isNullPointer(PFN_vkCmdExecuteCommands)) throw new SymbolNotFoundError("Symbol not found: vkCmdExecuteCommands"); + try { MH_vkCmdExecuteCommands.invokeExact(PFN_vkCmdExecuteCommands, commandBuffer, commandBufferCount, pCommandBuffers); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdExecuteCommands", e); } + } + + // --- OverrunGL custom code --- + public static int VK_MAKE_API_VERSION(int variant, int major, int minor, int patch) { + return (variant << 29) | (major << 22) | (minor << 12) | patch; + } + public static int VK_API_VERSION_VARIANT(int version) { return version >> 29; } + public static int VK_API_VERSION_MAJOR(int version) { return (version >> 22) & 0x7F; } + public static int VK_API_VERSION_MINOR(int version) { return (version >> 12) & 0x3FF; } + public static int VK_API_VERSION_PATCH(int version) { return version & 0xFFF; } + + public static @CType("VkResult") int vkEnumerateInstanceExtensionProperties(VKLoadFunc func, @CType("const char *") MemorySegment pLayerName, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkExtensionProperties *") MemorySegment pProperties) { + var p = func.invoke(MemorySegment.NULL, "vkEnumerateInstanceExtensionProperties"); + if (Unmarshal.isNullPointer(p)) throw new SymbolNotFoundError("Symbol not found: vkEnumerateInstanceExtensionProperties"); + try { return (int) MH_vkEnumerateInstanceExtensionProperties.invokeExact(p, pLayerName, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumerateInstanceExtensionProperties", e); } + } + + public static @CType("VkResult") int vkEnumerateInstanceLayerProperties(VKLoadFunc func, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkLayerProperties *") MemorySegment pProperties) { + var p = func.invoke(MemorySegment.NULL, "vkEnumerateInstanceLayerProperties"); + if (Unmarshal.isNullPointer(p)) throw new SymbolNotFoundError("Symbol not found: vkEnumerateInstanceLayerProperties"); + try { return (int) MH_vkEnumerateInstanceLayerProperties.invokeExact(p, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumerateInstanceLayerProperties", e); } + } + + public static @CType("VkResult") int vkCreateInstance(VKLoadFunc func, @CType("const VkInstanceCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkInstance *") MemorySegment pInstance) { + var p = func.invoke(MemorySegment.NULL, "vkCreateInstance"); + if (Unmarshal.isNullPointer(p)) throw new SymbolNotFoundError("Symbol not found: vkCreateInstance"); + try { return (int) MH_vkCreateInstance.invokeExact(p, pCreateInfo, pAllocator, pInstance); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateInstance", e); } + } + + public static @CType("PFN_vkVoidFunction") MemorySegment vkGetInstanceProcAddr(VKLoadFunc func, @CType("VkInstance") MemorySegment instance, @CType("const char *") MemorySegment pName) { + var p = func.invoke(MemorySegment.NULL, "vkGetInstanceProcAddr"); + if (Unmarshal.isNullPointer(p)) throw new SymbolNotFoundError("Symbol not found: vkGetInstanceProcAddr"); + try { return (MemorySegment) MH_vkGetInstanceProcAddr.invokeExact(p, instance, pName); } + catch (Throwable e) { throw new RuntimeException("error in vkGetInstanceProcAddr", e); } + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK11.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK11.java new file mode 100644 index 00000000..d0f334d9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK11.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VK11 extends VK10 { + public static final int VK_API_VERSION_1_0 = VK_MAKE_API_VERSION(0, 1, 0, 0); + public static final int VK_API_VERSION_1_1 = VK_MAKE_API_VERSION(0, 1, 1, 0); + public static final int VK_API_VERSION_1_2 = VK_MAKE_API_VERSION(0, 1, 2, 0); + public static final int VK_API_VERSION_1_3 = VK_MAKE_API_VERSION(0, 1, 3, 0); + public static final int VK_API_VERSION_1_4 = VK_MAKE_API_VERSION(0, 1, 4, 0); + public static final int VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001; + public static final int VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002; + public static final int VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004; + public static final int VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008; + public static final int VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010; + public static final int VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020; + public static final int VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040; + public static final int VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080; + public static final int VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 0x00000001; + public static final int VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 0x00000002; + public static final int VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 0x00000004; + public static final int VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 0x00000008; + public static final int VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001; + public static final int VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0; + public static final int VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1; + public static final int VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0; + public static final int VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1; + public static final int VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0; + public static final int VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1; + public static final int VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2; + public static final int VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3; + public static final int VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4; + public static final int VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0; + public static final int VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1; + public static final int VK_CHROMA_LOCATION_COSITED_EVEN = 0; + public static final int VK_CHROMA_LOCATION_MIDPOINT = 1; + public static final int VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 0x00000008; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 0x00000010; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 0x00000020; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 0x00000040; + public static final int VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 0x00000001; + public static final int VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 0x00000002; + public static final int VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 0x00000004; + public static final int VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001; + public static final int VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002; + public static final int VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004; + public static final int VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000008; + public static final int VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 0x00000001; + public static final int VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 0x00000002; + public static final int VK_FENCE_IMPORT_TEMPORARY_BIT = 0x00000001; + public static final int VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 0x00000001; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 0x00000008; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000010; + public static final int VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 0x00000001; + public static final int VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 0x00000002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000; + public static final int VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000; + public static final int VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001; + public static final int VK_IMAGE_CREATE_ALIAS_BIT = 0x00000400; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000; + public static final int VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000; + public static final int VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001; + public static final int VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006; + public static final int VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008; + public static final int VK_PIPELINE_CREATE_DISPATCH_BASE_BIT = 0x00000010; + public static final int VK_DEPENDENCY_DEVICE_GROUP_BIT = 0x00000004; + public static final int VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013; + public static final int VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014; + public static final int VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT = 0x00000040; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001; + public static final int VK_MAX_DEVICE_GROUP_SIZE = 32; + public static final int VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 0x00000002; + public static final int VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000; + public static final int VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001; + public static final int VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002; + public static final int VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003; + public static final int VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001; + public static final int VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002; + public static final int VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004; + public static final int VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006; + public static final int VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008; + public static final int VK_ERROR_OUT_OF_POOL_MEMORY = -1000069000; + public static final int VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 0x00004000; + public static final int VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 0x00008000; + public static final int VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 0x00000020; + public static final int VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 0x00000080; + public static final int VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 0x00000100; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001; + public static final int VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002; + public static final int VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003; + public static final int VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000; + public static final int VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002; + public static final int VK_DEPENDENCY_VIEW_LOCAL_BIT = 0x00000002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000; + public static final int VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002; + public static final int VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003; + public static final int VK_QUEUE_PROTECTED_BIT = 0x00000010; + public static final int VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 0x00000001; + public static final int VK_MEMORY_PROPERTY_PROTECTED_BIT = 0x00000020; + public static final int VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008; + public static final int VK_IMAGE_CREATE_PROTECTED_BIT = 0x00000800; + public static final int VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 0x00000004; + public static final int VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000; + public static final int VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001; + public static final int VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002; + public static final int VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004; + public static final int VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005; + public static final int VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000; + public static final int VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000; + public static final int VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001; + public static final int VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002; + public static final int VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003; + public static final int VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004; + public static final int VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005; + public static final int VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006; + public static final int VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007; + public static final int VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008; + public static final int VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009; + public static final int VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010; + public static final int VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011; + public static final int VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012; + public static final int VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013; + public static final int VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014; + public static final int VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015; + public static final int VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016; + public static final int VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017; + public static final int VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018; + public static final int VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019; + public static final int VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020; + public static final int VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021; + public static final int VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022; + public static final int VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023; + public static final int VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024; + public static final int VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025; + public static final int VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026; + public static final int VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027; + public static final int VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028; + public static final int VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029; + public static final int VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030; + public static final int VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031; + public static final int VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032; + public static final int VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033; + public static final int VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010; + public static final int VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020; + public static final int VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040; + public static final int VK_IMAGE_CREATE_DISJOINT_BIT = 0x00000200; + public static final int VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000; + public static final int VK_FORMAT_FEATURE_DISJOINT_BIT = 0x00400000; + public static final int VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 0x00800000; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000; + public static final int VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004; + public static final int VK_LUID_SIZE = 8; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001; + public static final int VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002; + public static final int VK_ERROR_INVALID_EXTERNAL_HANDLE = -1000072003; + public static final int VK_QUEUE_FAMILY_EXTERNAL = (~1); + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001; + public static final int VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000; + public static final int VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT; + public static final int VK_PIPELINE_CREATE_DISPATCH_BASE = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES; + public static final MethodHandle MH_vkEnumerateInstanceVersion = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkBindBufferMemory2 = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkBindImageMemory2 = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceGroupPeerMemoryFeatures = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetDeviceMask = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDispatchBase = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkEnumeratePhysicalDeviceGroups = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageMemoryRequirements2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetBufferMemoryRequirements2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageSparseMemoryRequirements2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceFeatures2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceProperties2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceFormatProperties2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceImageFormatProperties2 = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceQueueFamilyProperties2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceMemoryProperties2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceSparseImageFormatProperties2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkTrimCommandPool = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkGetDeviceQueue2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateSamplerYcbcrConversion = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroySamplerYcbcrConversion = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateDescriptorUpdateTemplate = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyDescriptorUpdateTemplate = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkUpdateDescriptorSetWithTemplate = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceExternalBufferProperties = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceExternalFenceProperties = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceExternalSemaphoreProperties = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDescriptorSetLayoutSupport = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkEnumerateInstanceVersion; + public final MemorySegment PFN_vkBindBufferMemory2; + public final MemorySegment PFN_vkBindImageMemory2; + public final MemorySegment PFN_vkGetDeviceGroupPeerMemoryFeatures; + public final MemorySegment PFN_vkCmdSetDeviceMask; + public final MemorySegment PFN_vkCmdDispatchBase; + public final MemorySegment PFN_vkEnumeratePhysicalDeviceGroups; + public final MemorySegment PFN_vkGetImageMemoryRequirements2; + public final MemorySegment PFN_vkGetBufferMemoryRequirements2; + public final MemorySegment PFN_vkGetImageSparseMemoryRequirements2; + public final MemorySegment PFN_vkGetPhysicalDeviceFeatures2; + public final MemorySegment PFN_vkGetPhysicalDeviceProperties2; + public final MemorySegment PFN_vkGetPhysicalDeviceFormatProperties2; + public final MemorySegment PFN_vkGetPhysicalDeviceImageFormatProperties2; + public final MemorySegment PFN_vkGetPhysicalDeviceQueueFamilyProperties2; + public final MemorySegment PFN_vkGetPhysicalDeviceMemoryProperties2; + public final MemorySegment PFN_vkGetPhysicalDeviceSparseImageFormatProperties2; + public final MemorySegment PFN_vkTrimCommandPool; + public final MemorySegment PFN_vkGetDeviceQueue2; + public final MemorySegment PFN_vkCreateSamplerYcbcrConversion; + public final MemorySegment PFN_vkDestroySamplerYcbcrConversion; + public final MemorySegment PFN_vkCreateDescriptorUpdateTemplate; + public final MemorySegment PFN_vkDestroyDescriptorUpdateTemplate; + public final MemorySegment PFN_vkUpdateDescriptorSetWithTemplate; + public final MemorySegment PFN_vkGetPhysicalDeviceExternalBufferProperties; + public final MemorySegment PFN_vkGetPhysicalDeviceExternalFenceProperties; + public final MemorySegment PFN_vkGetPhysicalDeviceExternalSemaphoreProperties; + public final MemorySegment PFN_vkGetDescriptorSetLayoutSupport; + + public VK11(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + super(instance, func); + PFN_vkEnumerateInstanceVersion = func.invoke(instance, "vkEnumerateInstanceVersion"); + PFN_vkBindBufferMemory2 = func.invoke(instance, "vkBindBufferMemory2", "vkBindBufferMemory2KHR"); + PFN_vkBindImageMemory2 = func.invoke(instance, "vkBindImageMemory2", "vkBindImageMemory2KHR"); + PFN_vkGetDeviceGroupPeerMemoryFeatures = func.invoke(instance, "vkGetDeviceGroupPeerMemoryFeatures", "vkGetDeviceGroupPeerMemoryFeaturesKHR"); + PFN_vkCmdSetDeviceMask = func.invoke(instance, "vkCmdSetDeviceMask", "vkCmdSetDeviceMaskKHR"); + PFN_vkCmdDispatchBase = func.invoke(instance, "vkCmdDispatchBase", "vkCmdDispatchBaseKHR"); + PFN_vkEnumeratePhysicalDeviceGroups = func.invoke(instance, "vkEnumeratePhysicalDeviceGroups", "vkEnumeratePhysicalDeviceGroupsKHR"); + PFN_vkGetImageMemoryRequirements2 = func.invoke(instance, "vkGetImageMemoryRequirements2", "vkGetImageMemoryRequirements2KHR"); + PFN_vkGetBufferMemoryRequirements2 = func.invoke(instance, "vkGetBufferMemoryRequirements2", "vkGetBufferMemoryRequirements2KHR"); + PFN_vkGetImageSparseMemoryRequirements2 = func.invoke(instance, "vkGetImageSparseMemoryRequirements2", "vkGetImageSparseMemoryRequirements2KHR"); + PFN_vkGetPhysicalDeviceFeatures2 = func.invoke(instance, "vkGetPhysicalDeviceFeatures2", "vkGetPhysicalDeviceFeatures2KHR"); + PFN_vkGetPhysicalDeviceProperties2 = func.invoke(instance, "vkGetPhysicalDeviceProperties2", "vkGetPhysicalDeviceProperties2KHR"); + PFN_vkGetPhysicalDeviceFormatProperties2 = func.invoke(instance, "vkGetPhysicalDeviceFormatProperties2", "vkGetPhysicalDeviceFormatProperties2KHR"); + PFN_vkGetPhysicalDeviceImageFormatProperties2 = func.invoke(instance, "vkGetPhysicalDeviceImageFormatProperties2", "vkGetPhysicalDeviceImageFormatProperties2KHR"); + PFN_vkGetPhysicalDeviceQueueFamilyProperties2 = func.invoke(instance, "vkGetPhysicalDeviceQueueFamilyProperties2", "vkGetPhysicalDeviceQueueFamilyProperties2KHR"); + PFN_vkGetPhysicalDeviceMemoryProperties2 = func.invoke(instance, "vkGetPhysicalDeviceMemoryProperties2", "vkGetPhysicalDeviceMemoryProperties2KHR"); + PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 = func.invoke(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2", "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"); + PFN_vkTrimCommandPool = func.invoke(instance, "vkTrimCommandPool", "vkTrimCommandPoolKHR"); + PFN_vkGetDeviceQueue2 = func.invoke(instance, "vkGetDeviceQueue2"); + PFN_vkCreateSamplerYcbcrConversion = func.invoke(instance, "vkCreateSamplerYcbcrConversion", "vkCreateSamplerYcbcrConversionKHR"); + PFN_vkDestroySamplerYcbcrConversion = func.invoke(instance, "vkDestroySamplerYcbcrConversion", "vkDestroySamplerYcbcrConversionKHR"); + PFN_vkCreateDescriptorUpdateTemplate = func.invoke(instance, "vkCreateDescriptorUpdateTemplate", "vkCreateDescriptorUpdateTemplateKHR"); + PFN_vkDestroyDescriptorUpdateTemplate = func.invoke(instance, "vkDestroyDescriptorUpdateTemplate", "vkDestroyDescriptorUpdateTemplateKHR"); + PFN_vkUpdateDescriptorSetWithTemplate = func.invoke(instance, "vkUpdateDescriptorSetWithTemplate", "vkUpdateDescriptorSetWithTemplateKHR"); + PFN_vkGetPhysicalDeviceExternalBufferProperties = func.invoke(instance, "vkGetPhysicalDeviceExternalBufferProperties", "vkGetPhysicalDeviceExternalBufferPropertiesKHR"); + PFN_vkGetPhysicalDeviceExternalFenceProperties = func.invoke(instance, "vkGetPhysicalDeviceExternalFenceProperties", "vkGetPhysicalDeviceExternalFencePropertiesKHR"); + PFN_vkGetPhysicalDeviceExternalSemaphoreProperties = func.invoke(instance, "vkGetPhysicalDeviceExternalSemaphoreProperties", "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"); + PFN_vkGetDescriptorSetLayoutSupport = func.invoke(instance, "vkGetDescriptorSetLayoutSupport", "vkGetDescriptorSetLayoutSupportKHR"); + } + + public @CType("VkResult") int EnumerateInstanceVersion(@CType("uint32_t *") MemorySegment pApiVersion) { + if (Unmarshal.isNullPointer(PFN_vkEnumerateInstanceVersion)) throw new SymbolNotFoundError("Symbol not found: vkEnumerateInstanceVersion"); + try { return (int) MH_vkEnumerateInstanceVersion.invokeExact(PFN_vkEnumerateInstanceVersion, pApiVersion); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumerateInstanceVersion", e); } + } + + public @CType("VkResult") int BindBufferMemory2(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int bindInfoCount, @CType("const VkBindBufferMemoryInfo *") MemorySegment pBindInfos) { + if (Unmarshal.isNullPointer(PFN_vkBindBufferMemory2)) throw new SymbolNotFoundError("Symbol not found: vkBindBufferMemory2"); + try { return (int) MH_vkBindBufferMemory2.invokeExact(PFN_vkBindBufferMemory2, device, bindInfoCount, pBindInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkBindBufferMemory2", e); } + } + + public @CType("VkResult") int BindImageMemory2(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int bindInfoCount, @CType("const VkBindImageMemoryInfo *") MemorySegment pBindInfos) { + if (Unmarshal.isNullPointer(PFN_vkBindImageMemory2)) throw new SymbolNotFoundError("Symbol not found: vkBindImageMemory2"); + try { return (int) MH_vkBindImageMemory2.invokeExact(PFN_vkBindImageMemory2, device, bindInfoCount, pBindInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkBindImageMemory2", e); } + } + + public void GetDeviceGroupPeerMemoryFeatures(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int heapIndex, @CType("uint32_t") int localDeviceIndex, @CType("uint32_t") int remoteDeviceIndex, @CType("VkPeerMemoryFeatureFlags *") MemorySegment pPeerMemoryFeatures) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceGroupPeerMemoryFeatures)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceGroupPeerMemoryFeatures"); + try { MH_vkGetDeviceGroupPeerMemoryFeatures.invokeExact(PFN_vkGetDeviceGroupPeerMemoryFeatures, device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceGroupPeerMemoryFeatures", e); } + } + + public void CmdSetDeviceMask(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int deviceMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDeviceMask)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDeviceMask"); + try { MH_vkCmdSetDeviceMask.invokeExact(PFN_vkCmdSetDeviceMask, commandBuffer, deviceMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDeviceMask", e); } + } + + public void CmdDispatchBase(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int baseGroupX, @CType("uint32_t") int baseGroupY, @CType("uint32_t") int baseGroupZ, @CType("uint32_t") int groupCountX, @CType("uint32_t") int groupCountY, @CType("uint32_t") int groupCountZ) { + if (Unmarshal.isNullPointer(PFN_vkCmdDispatchBase)) throw new SymbolNotFoundError("Symbol not found: vkCmdDispatchBase"); + try { MH_vkCmdDispatchBase.invokeExact(PFN_vkCmdDispatchBase, commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDispatchBase", e); } + } + + public @CType("VkResult") int EnumeratePhysicalDeviceGroups(@CType("VkInstance") MemorySegment instance, @CType("uint32_t *") MemorySegment pPhysicalDeviceGroupCount, @CType("VkPhysicalDeviceGroupProperties *") MemorySegment pPhysicalDeviceGroupProperties) { + if (Unmarshal.isNullPointer(PFN_vkEnumeratePhysicalDeviceGroups)) throw new SymbolNotFoundError("Symbol not found: vkEnumeratePhysicalDeviceGroups"); + try { return (int) MH_vkEnumeratePhysicalDeviceGroups.invokeExact(PFN_vkEnumeratePhysicalDeviceGroups, instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumeratePhysicalDeviceGroups", e); } + } + + public void GetImageMemoryRequirements2(@CType("VkDevice") MemorySegment device, @CType("const VkImageMemoryRequirementsInfo2 *") MemorySegment pInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetImageMemoryRequirements2)) throw new SymbolNotFoundError("Symbol not found: vkGetImageMemoryRequirements2"); + try { MH_vkGetImageMemoryRequirements2.invokeExact(PFN_vkGetImageMemoryRequirements2, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageMemoryRequirements2", e); } + } + + public void GetBufferMemoryRequirements2(@CType("VkDevice") MemorySegment device, @CType("const VkBufferMemoryRequirementsInfo2 *") MemorySegment pInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetBufferMemoryRequirements2)) throw new SymbolNotFoundError("Symbol not found: vkGetBufferMemoryRequirements2"); + try { MH_vkGetBufferMemoryRequirements2.invokeExact(PFN_vkGetBufferMemoryRequirements2, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetBufferMemoryRequirements2", e); } + } + + public void GetImageSparseMemoryRequirements2(@CType("VkDevice") MemorySegment device, @CType("const VkImageSparseMemoryRequirementsInfo2 *") MemorySegment pInfo, @CType("uint32_t *") MemorySegment pSparseMemoryRequirementCount, @CType("VkSparseImageMemoryRequirements2 *") MemorySegment pSparseMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetImageSparseMemoryRequirements2)) throw new SymbolNotFoundError("Symbol not found: vkGetImageSparseMemoryRequirements2"); + try { MH_vkGetImageSparseMemoryRequirements2.invokeExact(PFN_vkGetImageSparseMemoryRequirements2, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageSparseMemoryRequirements2", e); } + } + + public void GetPhysicalDeviceFeatures2(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkPhysicalDeviceFeatures2 *") MemorySegment pFeatures) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceFeatures2)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceFeatures2"); + try { MH_vkGetPhysicalDeviceFeatures2.invokeExact(PFN_vkGetPhysicalDeviceFeatures2, physicalDevice, pFeatures); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceFeatures2", e); } + } + + public void GetPhysicalDeviceProperties2(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkPhysicalDeviceProperties2 *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceProperties2)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceProperties2"); + try { MH_vkGetPhysicalDeviceProperties2.invokeExact(PFN_vkGetPhysicalDeviceProperties2, physicalDevice, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceProperties2", e); } + } + + public void GetPhysicalDeviceFormatProperties2(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkFormat") int format, @CType("VkFormatProperties2 *") MemorySegment pFormatProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceFormatProperties2)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceFormatProperties2"); + try { MH_vkGetPhysicalDeviceFormatProperties2.invokeExact(PFN_vkGetPhysicalDeviceFormatProperties2, physicalDevice, format, pFormatProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceFormatProperties2", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceImageFormatProperties2(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceImageFormatInfo2 *") MemorySegment pImageFormatInfo, @CType("VkImageFormatProperties2 *") MemorySegment pImageFormatProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceImageFormatProperties2)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceImageFormatProperties2"); + try { return (int) MH_vkGetPhysicalDeviceImageFormatProperties2.invokeExact(PFN_vkGetPhysicalDeviceImageFormatProperties2, physicalDevice, pImageFormatInfo, pImageFormatProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceImageFormatProperties2", e); } + } + + public void GetPhysicalDeviceQueueFamilyProperties2(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pQueueFamilyPropertyCount, @CType("VkQueueFamilyProperties2 *") MemorySegment pQueueFamilyProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceQueueFamilyProperties2)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceQueueFamilyProperties2"); + try { MH_vkGetPhysicalDeviceQueueFamilyProperties2.invokeExact(PFN_vkGetPhysicalDeviceQueueFamilyProperties2, physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceQueueFamilyProperties2", e); } + } + + public void GetPhysicalDeviceMemoryProperties2(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkPhysicalDeviceMemoryProperties2 *") MemorySegment pMemoryProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceMemoryProperties2)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceMemoryProperties2"); + try { MH_vkGetPhysicalDeviceMemoryProperties2.invokeExact(PFN_vkGetPhysicalDeviceMemoryProperties2, physicalDevice, pMemoryProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceMemoryProperties2", e); } + } + + public void GetPhysicalDeviceSparseImageFormatProperties2(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceSparseImageFormatInfo2 *") MemorySegment pFormatInfo, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkSparseImageFormatProperties2 *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSparseImageFormatProperties2"); + try { MH_vkGetPhysicalDeviceSparseImageFormatProperties2.invokeExact(PFN_vkGetPhysicalDeviceSparseImageFormatProperties2, physicalDevice, pFormatInfo, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSparseImageFormatProperties2", e); } + } + + public void TrimCommandPool(@CType("VkDevice") MemorySegment device, @CType("VkCommandPool") MemorySegment commandPool, @CType("VkCommandPoolTrimFlags") int flags) { + if (Unmarshal.isNullPointer(PFN_vkTrimCommandPool)) throw new SymbolNotFoundError("Symbol not found: vkTrimCommandPool"); + try { MH_vkTrimCommandPool.invokeExact(PFN_vkTrimCommandPool, device, commandPool, flags); } + catch (Throwable e) { throw new RuntimeException("error in vkTrimCommandPool", e); } + } + + public void GetDeviceQueue2(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceQueueInfo2 *") MemorySegment pQueueInfo, @CType("VkQueue *") MemorySegment pQueue) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceQueue2)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceQueue2"); + try { MH_vkGetDeviceQueue2.invokeExact(PFN_vkGetDeviceQueue2, device, pQueueInfo, pQueue); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceQueue2", e); } + } + + public @CType("VkResult") int CreateSamplerYcbcrConversion(@CType("VkDevice") MemorySegment device, @CType("const VkSamplerYcbcrConversionCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSamplerYcbcrConversion *") MemorySegment pYcbcrConversion) { + if (Unmarshal.isNullPointer(PFN_vkCreateSamplerYcbcrConversion)) throw new SymbolNotFoundError("Symbol not found: vkCreateSamplerYcbcrConversion"); + try { return (int) MH_vkCreateSamplerYcbcrConversion.invokeExact(PFN_vkCreateSamplerYcbcrConversion, device, pCreateInfo, pAllocator, pYcbcrConversion); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateSamplerYcbcrConversion", e); } + } + + public void DestroySamplerYcbcrConversion(@CType("VkDevice") MemorySegment device, @CType("VkSamplerYcbcrConversion") MemorySegment ycbcrConversion, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroySamplerYcbcrConversion)) throw new SymbolNotFoundError("Symbol not found: vkDestroySamplerYcbcrConversion"); + try { MH_vkDestroySamplerYcbcrConversion.invokeExact(PFN_vkDestroySamplerYcbcrConversion, device, ycbcrConversion, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroySamplerYcbcrConversion", e); } + } + + public @CType("VkResult") int CreateDescriptorUpdateTemplate(@CType("VkDevice") MemorySegment device, @CType("const VkDescriptorUpdateTemplateCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkDescriptorUpdateTemplate *") MemorySegment pDescriptorUpdateTemplate) { + if (Unmarshal.isNullPointer(PFN_vkCreateDescriptorUpdateTemplate)) throw new SymbolNotFoundError("Symbol not found: vkCreateDescriptorUpdateTemplate"); + try { return (int) MH_vkCreateDescriptorUpdateTemplate.invokeExact(PFN_vkCreateDescriptorUpdateTemplate, device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDescriptorUpdateTemplate", e); } + } + + public void DestroyDescriptorUpdateTemplate(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorUpdateTemplate") MemorySegment descriptorUpdateTemplate, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyDescriptorUpdateTemplate)) throw new SymbolNotFoundError("Symbol not found: vkDestroyDescriptorUpdateTemplate"); + try { MH_vkDestroyDescriptorUpdateTemplate.invokeExact(PFN_vkDestroyDescriptorUpdateTemplate, device, descriptorUpdateTemplate, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyDescriptorUpdateTemplate", e); } + } + + public void UpdateDescriptorSetWithTemplate(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorSet") MemorySegment descriptorSet, @CType("VkDescriptorUpdateTemplate") MemorySegment descriptorUpdateTemplate, @CType("const void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkUpdateDescriptorSetWithTemplate)) throw new SymbolNotFoundError("Symbol not found: vkUpdateDescriptorSetWithTemplate"); + try { MH_vkUpdateDescriptorSetWithTemplate.invokeExact(PFN_vkUpdateDescriptorSetWithTemplate, device, descriptorSet, descriptorUpdateTemplate, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkUpdateDescriptorSetWithTemplate", e); } + } + + public void GetPhysicalDeviceExternalBufferProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceExternalBufferInfo *") MemorySegment pExternalBufferInfo, @CType("VkExternalBufferProperties *") MemorySegment pExternalBufferProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceExternalBufferProperties)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceExternalBufferProperties"); + try { MH_vkGetPhysicalDeviceExternalBufferProperties.invokeExact(PFN_vkGetPhysicalDeviceExternalBufferProperties, physicalDevice, pExternalBufferInfo, pExternalBufferProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceExternalBufferProperties", e); } + } + + public void GetPhysicalDeviceExternalFenceProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceExternalFenceInfo *") MemorySegment pExternalFenceInfo, @CType("VkExternalFenceProperties *") MemorySegment pExternalFenceProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceExternalFenceProperties)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceExternalFenceProperties"); + try { MH_vkGetPhysicalDeviceExternalFenceProperties.invokeExact(PFN_vkGetPhysicalDeviceExternalFenceProperties, physicalDevice, pExternalFenceInfo, pExternalFenceProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceExternalFenceProperties", e); } + } + + public void GetPhysicalDeviceExternalSemaphoreProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceExternalSemaphoreInfo *") MemorySegment pExternalSemaphoreInfo, @CType("VkExternalSemaphoreProperties *") MemorySegment pExternalSemaphoreProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceExternalSemaphoreProperties"); + try { MH_vkGetPhysicalDeviceExternalSemaphoreProperties.invokeExact(PFN_vkGetPhysicalDeviceExternalSemaphoreProperties, physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceExternalSemaphoreProperties", e); } + } + + public void GetDescriptorSetLayoutSupport(@CType("VkDevice") MemorySegment device, @CType("const VkDescriptorSetLayoutCreateInfo *") MemorySegment pCreateInfo, @CType("VkDescriptorSetLayoutSupport *") MemorySegment pSupport) { + if (Unmarshal.isNullPointer(PFN_vkGetDescriptorSetLayoutSupport)) throw new SymbolNotFoundError("Symbol not found: vkGetDescriptorSetLayoutSupport"); + try { MH_vkGetDescriptorSetLayoutSupport.invokeExact(PFN_vkGetDescriptorSetLayoutSupport, device, pCreateInfo, pSupport); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDescriptorSetLayoutSupport", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK12.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK12.java new file mode 100644 index 00000000..9571d150 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK12.java @@ -0,0 +1,265 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VK12 extends VK11 { + public static final int VK_API_VERSION_1_0 = VK_MAKE_API_VERSION(0, 1, 0, 0); + public static final int VK_API_VERSION_1_1 = VK_MAKE_API_VERSION(0, 1, 1, 0); + public static final int VK_API_VERSION_1_2 = VK_MAKE_API_VERSION(0, 1, 2, 0); + public static final int VK_API_VERSION_1_3 = VK_MAKE_API_VERSION(0, 1, 3, 0); + public static final int VK_API_VERSION_1_4 = VK_MAKE_API_VERSION(0, 1, 4, 0); + public static final int VK_DRIVER_ID_AMD_PROPRIETARY = 1; + public static final int VK_DRIVER_ID_AMD_OPEN_SOURCE = 2; + public static final int VK_DRIVER_ID_MESA_RADV = 3; + public static final int VK_DRIVER_ID_NVIDIA_PROPRIETARY = 4; + public static final int VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS = 5; + public static final int VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA = 6; + public static final int VK_DRIVER_ID_IMAGINATION_PROPRIETARY = 7; + public static final int VK_DRIVER_ID_QUALCOMM_PROPRIETARY = 8; + public static final int VK_DRIVER_ID_ARM_PROPRIETARY = 9; + public static final int VK_DRIVER_ID_GOOGLE_SWIFTSHADER = 10; + public static final int VK_DRIVER_ID_GGP_PROPRIETARY = 11; + public static final int VK_DRIVER_ID_BROADCOM_PROPRIETARY = 12; + public static final int VK_DRIVER_ID_MESA_LLVMPIPE = 13; + public static final int VK_DRIVER_ID_MOLTENVK = 14; + public static final int VK_DRIVER_ID_COREAVI_PROPRIETARY = 15; + public static final int VK_DRIVER_ID_JUICE_PROPRIETARY = 16; + public static final int VK_DRIVER_ID_VERISILICON_PROPRIETARY = 17; + public static final int VK_DRIVER_ID_MESA_TURNIP = 18; + public static final int VK_DRIVER_ID_MESA_V3DV = 19; + public static final int VK_DRIVER_ID_MESA_PANVK = 20; + public static final int VK_DRIVER_ID_SAMSUNG_PROPRIETARY = 21; + public static final int VK_DRIVER_ID_MESA_VENUS = 22; + public static final int VK_DRIVER_ID_MESA_DOZEN = 23; + public static final int VK_DRIVER_ID_MESA_NVK = 24; + public static final int VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA = 25; + public static final int VK_DRIVER_ID_MESA_HONEYKRISP = 26; + public static final int VK_DRIVER_ID_VULKAN_SC_EMULATION_ON_VULKAN = 27; + public static final int VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY = 0; + public static final int VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL = 1; + public static final int VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE = 2; + public static final int VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT = 0x00000001; + public static final int VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT = 0x00000002; + public static final int VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT = 0x00000004; + public static final int VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT = 0x00000008; + public static final int VK_RESOLVE_MODE_NONE = 0; + public static final int VK_RESOLVE_MODE_SAMPLE_ZERO_BIT = 0x00000001; + public static final int VK_RESOLVE_MODE_AVERAGE_BIT = 0x00000002; + public static final int VK_RESOLVE_MODE_MIN_BIT = 0x00000004; + public static final int VK_RESOLVE_MODE_MAX_BIT = 0x00000008; + public static final int VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE = 0; + public static final int VK_SAMPLER_REDUCTION_MODE_MIN = 1; + public static final int VK_SAMPLER_REDUCTION_MODE_MAX = 2; + public static final int VK_SEMAPHORE_TYPE_BINARY = 0; + public static final int VK_SEMAPHORE_TYPE_TIMELINE = 1; + public static final int VK_SEMAPHORE_WAIT_ANY_BIT = 0x00000001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES = 49; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES = 50; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES = 51; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES = 52; + public static final int VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO = 1000147000; + public static final int VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4; + public static final int VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2 = 1000109000; + public static final int VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2 = 1000109001; + public static final int VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2 = 1000109002; + public static final int VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2 = 1000109003; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2 = 1000109004; + public static final int VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO = 1000109005; + public static final int VK_STRUCTURE_TYPE_SUBPASS_END_INFO = 1000109006; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES = 1000177000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES = 1000196000; + public static final int VK_MAX_DRIVER_NAME_SIZE = 256; + public static final int VK_MAX_DRIVER_INFO_SIZE = 256; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES = 1000180000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES = 1000082000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES = 1000197000; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO = 1000161000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES = 1000161001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES = 1000161002; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO = 1000161003; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT = 1000161004; + public static final int VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT = 0x00000002; + public static final int VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT = 0x00000002; + public static final int VK_ERROR_FRAGMENTATION = -1000161000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES = 1000199000; + public static final int VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE = 1000199001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES = 1000221000; + public static final int VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO = 1000246000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES = 1000130000; + public static final int VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO = 1000130001; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT = 0x00010000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES = 1000211000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES = 1000108000; + public static final int VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO = 1000108001; + public static final int VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO = 1000108002; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO = 1000108003; + public static final int VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT = 0x00000001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES = 1000253000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES = 1000175000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES = 1000241000; + public static final int VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT = 1000241001; + public static final int VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT = 1000241002; + public static final int VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL = 1000241000; + public static final int VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL = 1000241001; + public static final int VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL = 1000241002; + public static final int VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL = 1000241003; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES = 1000261000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES = 1000207000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES = 1000207001; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO = 1000207002; + public static final int VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO = 1000207003; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO = 1000207004; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO = 1000207005; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES = 1000257000; + public static final int VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO = 1000244001; + public static final int VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO = 1000257002; + public static final int VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO = 1000257003; + public static final int VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO = 1000257004; + public static final int VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT = 0x00020000; + public static final int VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000010; + public static final int VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT = 0x00000002; + public static final int VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000004; + public static final int VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS = -1000257000; + public static final MethodHandle MH_vkCmdDrawIndirectCount = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawIndexedIndirectCount = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCreateRenderPass2 = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBeginRenderPass2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdNextSubpass2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdEndRenderPass2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkResetQueryPool = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkGetSemaphoreCounterValue = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkWaitSemaphores = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkSignalSemaphore = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetBufferDeviceAddress = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetBufferOpaqueCaptureAddress = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceMemoryOpaqueCaptureAddress = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdDrawIndirectCount; + public final MemorySegment PFN_vkCmdDrawIndexedIndirectCount; + public final MemorySegment PFN_vkCreateRenderPass2; + public final MemorySegment PFN_vkCmdBeginRenderPass2; + public final MemorySegment PFN_vkCmdNextSubpass2; + public final MemorySegment PFN_vkCmdEndRenderPass2; + public final MemorySegment PFN_vkResetQueryPool; + public final MemorySegment PFN_vkGetSemaphoreCounterValue; + public final MemorySegment PFN_vkWaitSemaphores; + public final MemorySegment PFN_vkSignalSemaphore; + public final MemorySegment PFN_vkGetBufferDeviceAddress; + public final MemorySegment PFN_vkGetBufferOpaqueCaptureAddress; + public final MemorySegment PFN_vkGetDeviceMemoryOpaqueCaptureAddress; + + public VK12(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + super(instance, func); + PFN_vkCmdDrawIndirectCount = func.invoke(instance, "vkCmdDrawIndirectCount", "vkCmdDrawIndirectCountKHR", "vkCmdDrawIndirectCountAMD"); + PFN_vkCmdDrawIndexedIndirectCount = func.invoke(instance, "vkCmdDrawIndexedIndirectCount", "vkCmdDrawIndexedIndirectCountKHR", "vkCmdDrawIndexedIndirectCountAMD"); + PFN_vkCreateRenderPass2 = func.invoke(instance, "vkCreateRenderPass2", "vkCreateRenderPass2KHR"); + PFN_vkCmdBeginRenderPass2 = func.invoke(instance, "vkCmdBeginRenderPass2", "vkCmdBeginRenderPass2KHR"); + PFN_vkCmdNextSubpass2 = func.invoke(instance, "vkCmdNextSubpass2", "vkCmdNextSubpass2KHR"); + PFN_vkCmdEndRenderPass2 = func.invoke(instance, "vkCmdEndRenderPass2", "vkCmdEndRenderPass2KHR"); + PFN_vkResetQueryPool = func.invoke(instance, "vkResetQueryPool", "vkResetQueryPoolEXT"); + PFN_vkGetSemaphoreCounterValue = func.invoke(instance, "vkGetSemaphoreCounterValue", "vkGetSemaphoreCounterValueKHR"); + PFN_vkWaitSemaphores = func.invoke(instance, "vkWaitSemaphores", "vkWaitSemaphoresKHR"); + PFN_vkSignalSemaphore = func.invoke(instance, "vkSignalSemaphore", "vkSignalSemaphoreKHR"); + PFN_vkGetBufferDeviceAddress = func.invoke(instance, "vkGetBufferDeviceAddress", "vkGetBufferDeviceAddressKHR", "vkGetBufferDeviceAddressEXT"); + PFN_vkGetBufferOpaqueCaptureAddress = func.invoke(instance, "vkGetBufferOpaqueCaptureAddress", "vkGetBufferOpaqueCaptureAddressKHR"); + PFN_vkGetDeviceMemoryOpaqueCaptureAddress = func.invoke(instance, "vkGetDeviceMemoryOpaqueCaptureAddress", "vkGetDeviceMemoryOpaqueCaptureAddressKHR"); + } + + public void CmdDrawIndirectCount(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkBuffer") MemorySegment countBuffer, @CType("VkDeviceSize") long countBufferOffset, @CType("uint32_t") int maxDrawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawIndirectCount)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawIndirectCount"); + try { MH_vkCmdDrawIndirectCount.invokeExact(PFN_vkCmdDrawIndirectCount, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawIndirectCount", e); } + } + + public void CmdDrawIndexedIndirectCount(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkBuffer") MemorySegment countBuffer, @CType("VkDeviceSize") long countBufferOffset, @CType("uint32_t") int maxDrawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawIndexedIndirectCount)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawIndexedIndirectCount"); + try { MH_vkCmdDrawIndexedIndirectCount.invokeExact(PFN_vkCmdDrawIndexedIndirectCount, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawIndexedIndirectCount", e); } + } + + public @CType("VkResult") int CreateRenderPass2(@CType("VkDevice") MemorySegment device, @CType("const VkRenderPassCreateInfo2 *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkRenderPass *") MemorySegment pRenderPass) { + if (Unmarshal.isNullPointer(PFN_vkCreateRenderPass2)) throw new SymbolNotFoundError("Symbol not found: vkCreateRenderPass2"); + try { return (int) MH_vkCreateRenderPass2.invokeExact(PFN_vkCreateRenderPass2, device, pCreateInfo, pAllocator, pRenderPass); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateRenderPass2", e); } + } + + public void CmdBeginRenderPass2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkRenderPassBeginInfo *") MemorySegment pRenderPassBegin, @CType("const VkSubpassBeginInfo *") MemorySegment pSubpassBeginInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginRenderPass2)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginRenderPass2"); + try { MH_vkCmdBeginRenderPass2.invokeExact(PFN_vkCmdBeginRenderPass2, commandBuffer, pRenderPassBegin, pSubpassBeginInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginRenderPass2", e); } + } + + public void CmdNextSubpass2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkSubpassBeginInfo *") MemorySegment pSubpassBeginInfo, @CType("const VkSubpassEndInfo *") MemorySegment pSubpassEndInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdNextSubpass2)) throw new SymbolNotFoundError("Symbol not found: vkCmdNextSubpass2"); + try { MH_vkCmdNextSubpass2.invokeExact(PFN_vkCmdNextSubpass2, commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdNextSubpass2", e); } + } + + public void CmdEndRenderPass2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkSubpassEndInfo *") MemorySegment pSubpassEndInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndRenderPass2)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndRenderPass2"); + try { MH_vkCmdEndRenderPass2.invokeExact(PFN_vkCmdEndRenderPass2, commandBuffer, pSubpassEndInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndRenderPass2", e); } + } + + public void ResetQueryPool(@CType("VkDevice") MemorySegment device, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int firstQuery, @CType("uint32_t") int queryCount) { + if (Unmarshal.isNullPointer(PFN_vkResetQueryPool)) throw new SymbolNotFoundError("Symbol not found: vkResetQueryPool"); + try { MH_vkResetQueryPool.invokeExact(PFN_vkResetQueryPool, device, queryPool, firstQuery, queryCount); } + catch (Throwable e) { throw new RuntimeException("error in vkResetQueryPool", e); } + } + + public @CType("VkResult") int GetSemaphoreCounterValue(@CType("VkDevice") MemorySegment device, @CType("VkSemaphore") MemorySegment semaphore, @CType("uint64_t *") MemorySegment pValue) { + if (Unmarshal.isNullPointer(PFN_vkGetSemaphoreCounterValue)) throw new SymbolNotFoundError("Symbol not found: vkGetSemaphoreCounterValue"); + try { return (int) MH_vkGetSemaphoreCounterValue.invokeExact(PFN_vkGetSemaphoreCounterValue, device, semaphore, pValue); } + catch (Throwable e) { throw new RuntimeException("error in vkGetSemaphoreCounterValue", e); } + } + + public @CType("VkResult") int WaitSemaphores(@CType("VkDevice") MemorySegment device, @CType("const VkSemaphoreWaitInfo *") MemorySegment pWaitInfo, @CType("uint64_t") long timeout) { + if (Unmarshal.isNullPointer(PFN_vkWaitSemaphores)) throw new SymbolNotFoundError("Symbol not found: vkWaitSemaphores"); + try { return (int) MH_vkWaitSemaphores.invokeExact(PFN_vkWaitSemaphores, device, pWaitInfo, timeout); } + catch (Throwable e) { throw new RuntimeException("error in vkWaitSemaphores", e); } + } + + public @CType("VkResult") int SignalSemaphore(@CType("VkDevice") MemorySegment device, @CType("const VkSemaphoreSignalInfo *") MemorySegment pSignalInfo) { + if (Unmarshal.isNullPointer(PFN_vkSignalSemaphore)) throw new SymbolNotFoundError("Symbol not found: vkSignalSemaphore"); + try { return (int) MH_vkSignalSemaphore.invokeExact(PFN_vkSignalSemaphore, device, pSignalInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkSignalSemaphore", e); } + } + + public @CType("VkDeviceAddress") long GetBufferDeviceAddress(@CType("VkDevice") MemorySegment device, @CType("const VkBufferDeviceAddressInfo *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetBufferDeviceAddress)) throw new SymbolNotFoundError("Symbol not found: vkGetBufferDeviceAddress"); + try { return (long) MH_vkGetBufferDeviceAddress.invokeExact(PFN_vkGetBufferDeviceAddress, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetBufferDeviceAddress", e); } + } + + public @CType("uint64_t") long GetBufferOpaqueCaptureAddress(@CType("VkDevice") MemorySegment device, @CType("const VkBufferDeviceAddressInfo *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetBufferOpaqueCaptureAddress)) throw new SymbolNotFoundError("Symbol not found: vkGetBufferOpaqueCaptureAddress"); + try { return (long) MH_vkGetBufferOpaqueCaptureAddress.invokeExact(PFN_vkGetBufferOpaqueCaptureAddress, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetBufferOpaqueCaptureAddress", e); } + } + + public @CType("uint64_t") long GetDeviceMemoryOpaqueCaptureAddress(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceMemoryOpaqueCaptureAddressInfo *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceMemoryOpaqueCaptureAddress)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceMemoryOpaqueCaptureAddress"); + try { return (long) MH_vkGetDeviceMemoryOpaqueCaptureAddress.invokeExact(PFN_vkGetDeviceMemoryOpaqueCaptureAddress, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceMemoryOpaqueCaptureAddress", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK13.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK13.java new file mode 100644 index 00000000..02c6b17c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK13.java @@ -0,0 +1,557 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VK13 extends VK12 { + public static final int VK_API_VERSION_1_0 = VK_MAKE_API_VERSION(0, 1, 0, 0); + public static final int VK_API_VERSION_1_1 = VK_MAKE_API_VERSION(0, 1, 1, 0); + public static final int VK_API_VERSION_1_2 = VK_MAKE_API_VERSION(0, 1, 2, 0); + public static final int VK_API_VERSION_1_3 = VK_MAKE_API_VERSION(0, 1, 3, 0); + public static final int VK_API_VERSION_1_4 = VK_MAKE_API_VERSION(0, 1, 4, 0); + public static final int VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT = 0x00000001; + public static final int VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT = 0x00000002; + public static final int VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT = 0x00000004; + public static final int VK_TOOL_PURPOSE_VALIDATION_BIT = 0x00000001; + public static final int VK_TOOL_PURPOSE_PROFILING_BIT = 0x00000002; + public static final int VK_TOOL_PURPOSE_TRACING_BIT = 0x00000004; + public static final int VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT = 0x00000008; + public static final int VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT = 0x00000010; + public static final long VK_PIPELINE_STAGE_2_NONE = 0; + public static final long VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT = 0x00000001L; + public static final long VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT = 0x00000002L; + public static final long VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT = 0x00000004L; + public static final long VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT = 0x00000008L; + public static final long VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010L; + public static final long VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020L; + public static final long VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT = 0x00000040L; + public static final long VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT = 0x00000080L; + public static final long VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT = 0x00000100L; + public static final long VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT = 0x00000200L; + public static final long VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400L; + public static final long VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT = 0x00000800L; + public static final long VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT = 0x00001000L; + public static final long VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT = 0x00002000L; + public static final long VK_PIPELINE_STAGE_2_HOST_BIT = 0x00004000L; + public static final long VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT = 0x00008000L; + public static final long VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT = 0x00010000L; + public static final long VK_PIPELINE_STAGE_2_COPY_BIT = 0x100000000L; + public static final long VK_PIPELINE_STAGE_2_RESOLVE_BIT = 0x200000000L; + public static final long VK_PIPELINE_STAGE_2_BLIT_BIT = 0x400000000L; + public static final long VK_PIPELINE_STAGE_2_CLEAR_BIT = 0x800000000L; + public static final long VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT = 0x1000000000L; + public static final long VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT = 0x2000000000L; + public static final long VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT = 0x4000000000L; + public static final long VK_ACCESS_2_NONE = 0; + public static final long VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT = 0x00000001L; + public static final long VK_ACCESS_2_INDEX_READ_BIT = 0x00000002L; + public static final long VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004L; + public static final long VK_ACCESS_2_UNIFORM_READ_BIT = 0x00000008L; + public static final long VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT = 0x00000010L; + public static final long VK_ACCESS_2_SHADER_READ_BIT = 0x00000020L; + public static final long VK_ACCESS_2_SHADER_WRITE_BIT = 0x00000040L; + public static final long VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT = 0x00000080L; + public static final long VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100L; + public static final long VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200L; + public static final long VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400L; + public static final long VK_ACCESS_2_TRANSFER_READ_BIT = 0x00000800L; + public static final long VK_ACCESS_2_TRANSFER_WRITE_BIT = 0x00001000L; + public static final long VK_ACCESS_2_HOST_READ_BIT = 0x00002000L; + public static final long VK_ACCESS_2_HOST_WRITE_BIT = 0x00004000L; + public static final long VK_ACCESS_2_MEMORY_READ_BIT = 0x00008000L; + public static final long VK_ACCESS_2_MEMORY_WRITE_BIT = 0x00010000L; + public static final long VK_ACCESS_2_SHADER_SAMPLED_READ_BIT = 0x100000000L; + public static final long VK_ACCESS_2_SHADER_STORAGE_READ_BIT = 0x200000000L; + public static final long VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT = 0x400000000L; + public static final int VK_SUBMIT_PROTECTED_BIT = 0x00000001; + public static final int VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT = 0x00000001; + public static final int VK_RENDERING_SUSPENDING_BIT = 0x00000002; + public static final int VK_RENDERING_RESUMING_BIT = 0x00000004; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT = 0x00000001L; + public static final long VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT = 0x00000002L; + public static final long VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004L; + public static final long VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008L; + public static final long VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT = 0x00000010L; + public static final long VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020L; + public static final long VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT = 0x00000040L; + public static final long VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT = 0x00000080L; + public static final long VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100L; + public static final long VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200L; + public static final long VK_FORMAT_FEATURE_2_BLIT_SRC_BIT = 0x00000400L; + public static final long VK_FORMAT_FEATURE_2_BLIT_DST_BIT = 0x00000800L; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000L; + public static final long VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT = 0x00004000L; + public static final long VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT = 0x00008000L; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT = 0x00010000L; + public static final long VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000L; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000L; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000L; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000L; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000L; + public static final long VK_FORMAT_FEATURE_2_DISJOINT_BIT = 0x00400000L; + public static final long VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT = 0x00800000L; + public static final long VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT = 0x80000000L; + public static final long VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT = 0x100000000L; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT = 0x200000000L; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES = 53; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES = 54; + public static final int VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO = 1000192000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES = 1000215000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES = 1000245000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES = 1000276000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES = 1000295000; + public static final int VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO = 1000295001; + public static final int VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO = 1000295002; + public static final int VK_OBJECT_TYPE_PRIVATE_DATA_SLOT = 1000295000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES = 1000297000; + public static final int VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT = 0x00000100; + public static final int VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT = 0x00000200; + public static final int VK_PIPELINE_COMPILE_REQUIRED = 1000297000; + public static final int VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT = 0x00000001; + public static final int VK_STRUCTURE_TYPE_MEMORY_BARRIER_2 = 1000314000; + public static final int VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2 = 1000314001; + public static final int VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2 = 1000314002; + public static final int VK_STRUCTURE_TYPE_DEPENDENCY_INFO = 1000314003; + public static final int VK_STRUCTURE_TYPE_SUBMIT_INFO_2 = 1000314004; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO = 1000314005; + public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO = 1000314006; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES = 1000314007; + public static final int VK_EVENT_CREATE_DEVICE_ONLY_BIT = 0x00000001; + public static final int VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL = 1000314000; + public static final int VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL = 1000314001; + public static final int VK_PIPELINE_STAGE_NONE = 0; + public static final int VK_ACCESS_NONE = 0; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES = 1000325000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES = 1000335000; + public static final int VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2 = 1000337000; + public static final int VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2 = 1000337001; + public static final int VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2 = 1000337002; + public static final int VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2 = 1000337003; + public static final int VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2 = 1000337004; + public static final int VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2 = 1000337005; + public static final int VK_STRUCTURE_TYPE_BUFFER_COPY_2 = 1000337006; + public static final int VK_STRUCTURE_TYPE_IMAGE_COPY_2 = 1000337007; + public static final int VK_STRUCTURE_TYPE_IMAGE_BLIT_2 = 1000337008; + public static final int VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2 = 1000337009; + public static final int VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2 = 1000337010; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES = 1000225000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO = 1000225001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES = 1000225002; + public static final int VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT = 0x00000001; + public static final int VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT = 0x00000002; + public static final int VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK = 1000138000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES = 1000138000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES = 1000138001; + public static final int VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK = 1000138002; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO = 1000138003; + public static final int VK_FORMAT_G8_B8R8_2PLANE_444_UNORM = 1000330000; + public static final int VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 = 1000330001; + public static final int VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 = 1000330002; + public static final int VK_FORMAT_G16_B16R16_2PLANE_444_UNORM = 1000330003; + public static final int VK_FORMAT_A4R4G4B4_UNORM_PACK16 = 1000340000; + public static final int VK_FORMAT_A4B4G4R4_UNORM_PACK16 = 1000340001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES = 1000066000; + public static final int VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK = 1000066000; + public static final int VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK = 1000066001; + public static final int VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK = 1000066002; + public static final int VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK = 1000066003; + public static final int VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK = 1000066004; + public static final int VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK = 1000066005; + public static final int VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK = 1000066006; + public static final int VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK = 1000066007; + public static final int VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK = 1000066008; + public static final int VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK = 1000066009; + public static final int VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK = 1000066010; + public static final int VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK = 1000066011; + public static final int VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK = 1000066012; + public static final int VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK = 1000066013; + public static final int VK_STRUCTURE_TYPE_RENDERING_INFO = 1000044000; + public static final int VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO = 1000044001; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO = 1000044002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES = 1000044003; + public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO = 1000044004; + public static final int VK_ATTACHMENT_STORE_OP_NONE = 1000301000; + public static final int VK_DYNAMIC_STATE_CULL_MODE = 1000267000; + public static final int VK_DYNAMIC_STATE_FRONT_FACE = 1000267001; + public static final int VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY = 1000267002; + public static final int VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT = 1000267003; + public static final int VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT = 1000267004; + public static final int VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE = 1000267005; + public static final int VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE = 1000267006; + public static final int VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE = 1000267007; + public static final int VK_DYNAMIC_STATE_DEPTH_COMPARE_OP = 1000267008; + public static final int VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE = 1000267009; + public static final int VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE = 1000267010; + public static final int VK_DYNAMIC_STATE_STENCIL_OP = 1000267011; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES = 1000280000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES = 1000280001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES = 1000281001; + public static final int VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3 = 1000360000; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT = 0x00002000L; + public static final int VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE = 1000377001; + public static final int VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE = 1000377002; + public static final int VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE = 1000377004; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES = 1000413000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES = 1000413001; + public static final int VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS = 1000413002; + public static final int VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS = 1000413003; + public static final int VK_IMAGE_ASPECT_NONE = 0; + public static final long VK_PIPELINE_STAGE_2_TRANSFER_BIT = VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT; + public static final MethodHandle MH_vkGetPhysicalDeviceToolProperties = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreatePrivateDataSlot = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyPrivateDataSlot = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkSetPrivateData = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkGetPrivateData = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetEvent2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdResetEvent2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkCmdWaitEvents2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPipelineBarrier2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdWriteTimestamp2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkQueueSubmit2 = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyBuffer2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyImage2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyBufferToImage2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyImageToBuffer2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBlitImage2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdResolveImage2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBeginRendering = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdEndRendering = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetCullMode = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetFrontFace = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetPrimitiveTopology = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetViewportWithCount = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetScissorWithCount = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindVertexBuffers2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetDepthTestEnable = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthWriteEnable = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthCompareOp = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthBoundsTestEnable = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetStencilTestEnable = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetStencilOp = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetRasterizerDiscardEnable = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthBiasEnable = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetPrimitiveRestartEnable = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkGetDeviceBufferMemoryRequirements = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceImageMemoryRequirements = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceImageSparseMemoryRequirements = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceToolProperties; + public final MemorySegment PFN_vkCreatePrivateDataSlot; + public final MemorySegment PFN_vkDestroyPrivateDataSlot; + public final MemorySegment PFN_vkSetPrivateData; + public final MemorySegment PFN_vkGetPrivateData; + public final MemorySegment PFN_vkCmdSetEvent2; + public final MemorySegment PFN_vkCmdResetEvent2; + public final MemorySegment PFN_vkCmdWaitEvents2; + public final MemorySegment PFN_vkCmdPipelineBarrier2; + public final MemorySegment PFN_vkCmdWriteTimestamp2; + public final MemorySegment PFN_vkQueueSubmit2; + public final MemorySegment PFN_vkCmdCopyBuffer2; + public final MemorySegment PFN_vkCmdCopyImage2; + public final MemorySegment PFN_vkCmdCopyBufferToImage2; + public final MemorySegment PFN_vkCmdCopyImageToBuffer2; + public final MemorySegment PFN_vkCmdBlitImage2; + public final MemorySegment PFN_vkCmdResolveImage2; + public final MemorySegment PFN_vkCmdBeginRendering; + public final MemorySegment PFN_vkCmdEndRendering; + public final MemorySegment PFN_vkCmdSetCullMode; + public final MemorySegment PFN_vkCmdSetFrontFace; + public final MemorySegment PFN_vkCmdSetPrimitiveTopology; + public final MemorySegment PFN_vkCmdSetViewportWithCount; + public final MemorySegment PFN_vkCmdSetScissorWithCount; + public final MemorySegment PFN_vkCmdBindVertexBuffers2; + public final MemorySegment PFN_vkCmdSetDepthTestEnable; + public final MemorySegment PFN_vkCmdSetDepthWriteEnable; + public final MemorySegment PFN_vkCmdSetDepthCompareOp; + public final MemorySegment PFN_vkCmdSetDepthBoundsTestEnable; + public final MemorySegment PFN_vkCmdSetStencilTestEnable; + public final MemorySegment PFN_vkCmdSetStencilOp; + public final MemorySegment PFN_vkCmdSetRasterizerDiscardEnable; + public final MemorySegment PFN_vkCmdSetDepthBiasEnable; + public final MemorySegment PFN_vkCmdSetPrimitiveRestartEnable; + public final MemorySegment PFN_vkGetDeviceBufferMemoryRequirements; + public final MemorySegment PFN_vkGetDeviceImageMemoryRequirements; + public final MemorySegment PFN_vkGetDeviceImageSparseMemoryRequirements; + + public VK13(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + super(instance, func); + PFN_vkGetPhysicalDeviceToolProperties = func.invoke(instance, "vkGetPhysicalDeviceToolProperties", "vkGetPhysicalDeviceToolPropertiesEXT"); + PFN_vkCreatePrivateDataSlot = func.invoke(instance, "vkCreatePrivateDataSlot", "vkCreatePrivateDataSlotEXT"); + PFN_vkDestroyPrivateDataSlot = func.invoke(instance, "vkDestroyPrivateDataSlot", "vkDestroyPrivateDataSlotEXT"); + PFN_vkSetPrivateData = func.invoke(instance, "vkSetPrivateData", "vkSetPrivateDataEXT"); + PFN_vkGetPrivateData = func.invoke(instance, "vkGetPrivateData", "vkGetPrivateDataEXT"); + PFN_vkCmdSetEvent2 = func.invoke(instance, "vkCmdSetEvent2", "vkCmdSetEvent2KHR"); + PFN_vkCmdResetEvent2 = func.invoke(instance, "vkCmdResetEvent2", "vkCmdResetEvent2KHR"); + PFN_vkCmdWaitEvents2 = func.invoke(instance, "vkCmdWaitEvents2", "vkCmdWaitEvents2KHR"); + PFN_vkCmdPipelineBarrier2 = func.invoke(instance, "vkCmdPipelineBarrier2", "vkCmdPipelineBarrier2KHR"); + PFN_vkCmdWriteTimestamp2 = func.invoke(instance, "vkCmdWriteTimestamp2", "vkCmdWriteTimestamp2KHR"); + PFN_vkQueueSubmit2 = func.invoke(instance, "vkQueueSubmit2", "vkQueueSubmit2KHR"); + PFN_vkCmdCopyBuffer2 = func.invoke(instance, "vkCmdCopyBuffer2", "vkCmdCopyBuffer2KHR"); + PFN_vkCmdCopyImage2 = func.invoke(instance, "vkCmdCopyImage2", "vkCmdCopyImage2KHR"); + PFN_vkCmdCopyBufferToImage2 = func.invoke(instance, "vkCmdCopyBufferToImage2", "vkCmdCopyBufferToImage2KHR"); + PFN_vkCmdCopyImageToBuffer2 = func.invoke(instance, "vkCmdCopyImageToBuffer2", "vkCmdCopyImageToBuffer2KHR"); + PFN_vkCmdBlitImage2 = func.invoke(instance, "vkCmdBlitImage2", "vkCmdBlitImage2KHR"); + PFN_vkCmdResolveImage2 = func.invoke(instance, "vkCmdResolveImage2", "vkCmdResolveImage2KHR"); + PFN_vkCmdBeginRendering = func.invoke(instance, "vkCmdBeginRendering", "vkCmdBeginRenderingKHR"); + PFN_vkCmdEndRendering = func.invoke(instance, "vkCmdEndRendering", "vkCmdEndRenderingKHR"); + PFN_vkCmdSetCullMode = func.invoke(instance, "vkCmdSetCullMode", "vkCmdSetCullModeEXT"); + PFN_vkCmdSetFrontFace = func.invoke(instance, "vkCmdSetFrontFace", "vkCmdSetFrontFaceEXT"); + PFN_vkCmdSetPrimitiveTopology = func.invoke(instance, "vkCmdSetPrimitiveTopology", "vkCmdSetPrimitiveTopologyEXT"); + PFN_vkCmdSetViewportWithCount = func.invoke(instance, "vkCmdSetViewportWithCount", "vkCmdSetViewportWithCountEXT"); + PFN_vkCmdSetScissorWithCount = func.invoke(instance, "vkCmdSetScissorWithCount", "vkCmdSetScissorWithCountEXT"); + PFN_vkCmdBindVertexBuffers2 = func.invoke(instance, "vkCmdBindVertexBuffers2", "vkCmdBindVertexBuffers2EXT"); + PFN_vkCmdSetDepthTestEnable = func.invoke(instance, "vkCmdSetDepthTestEnable", "vkCmdSetDepthTestEnableEXT"); + PFN_vkCmdSetDepthWriteEnable = func.invoke(instance, "vkCmdSetDepthWriteEnable", "vkCmdSetDepthWriteEnableEXT"); + PFN_vkCmdSetDepthCompareOp = func.invoke(instance, "vkCmdSetDepthCompareOp", "vkCmdSetDepthCompareOpEXT"); + PFN_vkCmdSetDepthBoundsTestEnable = func.invoke(instance, "vkCmdSetDepthBoundsTestEnable", "vkCmdSetDepthBoundsTestEnableEXT"); + PFN_vkCmdSetStencilTestEnable = func.invoke(instance, "vkCmdSetStencilTestEnable", "vkCmdSetStencilTestEnableEXT"); + PFN_vkCmdSetStencilOp = func.invoke(instance, "vkCmdSetStencilOp", "vkCmdSetStencilOpEXT"); + PFN_vkCmdSetRasterizerDiscardEnable = func.invoke(instance, "vkCmdSetRasterizerDiscardEnable", "vkCmdSetRasterizerDiscardEnableEXT"); + PFN_vkCmdSetDepthBiasEnable = func.invoke(instance, "vkCmdSetDepthBiasEnable", "vkCmdSetDepthBiasEnableEXT"); + PFN_vkCmdSetPrimitiveRestartEnable = func.invoke(instance, "vkCmdSetPrimitiveRestartEnable", "vkCmdSetPrimitiveRestartEnableEXT"); + PFN_vkGetDeviceBufferMemoryRequirements = func.invoke(instance, "vkGetDeviceBufferMemoryRequirements", "vkGetDeviceBufferMemoryRequirementsKHR"); + PFN_vkGetDeviceImageMemoryRequirements = func.invoke(instance, "vkGetDeviceImageMemoryRequirements", "vkGetDeviceImageMemoryRequirementsKHR"); + PFN_vkGetDeviceImageSparseMemoryRequirements = func.invoke(instance, "vkGetDeviceImageSparseMemoryRequirements", "vkGetDeviceImageSparseMemoryRequirementsKHR"); + } + + public @CType("VkResult") int GetPhysicalDeviceToolProperties(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pToolCount, @CType("VkPhysicalDeviceToolProperties *") MemorySegment pToolProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceToolProperties)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceToolProperties"); + try { return (int) MH_vkGetPhysicalDeviceToolProperties.invokeExact(PFN_vkGetPhysicalDeviceToolProperties, physicalDevice, pToolCount, pToolProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceToolProperties", e); } + } + + public @CType("VkResult") int CreatePrivateDataSlot(@CType("VkDevice") MemorySegment device, @CType("const VkPrivateDataSlotCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkPrivateDataSlot *") MemorySegment pPrivateDataSlot) { + if (Unmarshal.isNullPointer(PFN_vkCreatePrivateDataSlot)) throw new SymbolNotFoundError("Symbol not found: vkCreatePrivateDataSlot"); + try { return (int) MH_vkCreatePrivateDataSlot.invokeExact(PFN_vkCreatePrivateDataSlot, device, pCreateInfo, pAllocator, pPrivateDataSlot); } + catch (Throwable e) { throw new RuntimeException("error in vkCreatePrivateDataSlot", e); } + } + + public void DestroyPrivateDataSlot(@CType("VkDevice") MemorySegment device, @CType("VkPrivateDataSlot") MemorySegment privateDataSlot, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyPrivateDataSlot)) throw new SymbolNotFoundError("Symbol not found: vkDestroyPrivateDataSlot"); + try { MH_vkDestroyPrivateDataSlot.invokeExact(PFN_vkDestroyPrivateDataSlot, device, privateDataSlot, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyPrivateDataSlot", e); } + } + + public @CType("VkResult") int SetPrivateData(@CType("VkDevice") MemorySegment device, @CType("VkObjectType") int objectType, @CType("uint64_t") long objectHandle, @CType("VkPrivateDataSlot") MemorySegment privateDataSlot, @CType("uint64_t") long data) { + if (Unmarshal.isNullPointer(PFN_vkSetPrivateData)) throw new SymbolNotFoundError("Symbol not found: vkSetPrivateData"); + try { return (int) MH_vkSetPrivateData.invokeExact(PFN_vkSetPrivateData, device, objectType, objectHandle, privateDataSlot, data); } + catch (Throwable e) { throw new RuntimeException("error in vkSetPrivateData", e); } + } + + public void GetPrivateData(@CType("VkDevice") MemorySegment device, @CType("VkObjectType") int objectType, @CType("uint64_t") long objectHandle, @CType("VkPrivateDataSlot") MemorySegment privateDataSlot, @CType("uint64_t *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetPrivateData)) throw new SymbolNotFoundError("Symbol not found: vkGetPrivateData"); + try { MH_vkGetPrivateData.invokeExact(PFN_vkGetPrivateData, device, objectType, objectHandle, privateDataSlot, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPrivateData", e); } + } + + public void CmdSetEvent2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkEvent") MemorySegment event, @CType("const VkDependencyInfo *") MemorySegment pDependencyInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetEvent2)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetEvent2"); + try { MH_vkCmdSetEvent2.invokeExact(PFN_vkCmdSetEvent2, commandBuffer, event, pDependencyInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetEvent2", e); } + } + + public void CmdResetEvent2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkEvent") MemorySegment event, @CType("VkPipelineStageFlags2") long stageMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdResetEvent2)) throw new SymbolNotFoundError("Symbol not found: vkCmdResetEvent2"); + try { MH_vkCmdResetEvent2.invokeExact(PFN_vkCmdResetEvent2, commandBuffer, event, stageMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdResetEvent2", e); } + } + + public void CmdWaitEvents2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int eventCount, @CType("const VkEvent *") MemorySegment pEvents, @CType("const VkDependencyInfo *") MemorySegment pDependencyInfos) { + if (Unmarshal.isNullPointer(PFN_vkCmdWaitEvents2)) throw new SymbolNotFoundError("Symbol not found: vkCmdWaitEvents2"); + try { MH_vkCmdWaitEvents2.invokeExact(PFN_vkCmdWaitEvents2, commandBuffer, eventCount, pEvents, pDependencyInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWaitEvents2", e); } + } + + public void CmdPipelineBarrier2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkDependencyInfo *") MemorySegment pDependencyInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdPipelineBarrier2)) throw new SymbolNotFoundError("Symbol not found: vkCmdPipelineBarrier2"); + try { MH_vkCmdPipelineBarrier2.invokeExact(PFN_vkCmdPipelineBarrier2, commandBuffer, pDependencyInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPipelineBarrier2", e); } + } + + public void CmdWriteTimestamp2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineStageFlags2") long stage, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int query) { + if (Unmarshal.isNullPointer(PFN_vkCmdWriteTimestamp2)) throw new SymbolNotFoundError("Symbol not found: vkCmdWriteTimestamp2"); + try { MH_vkCmdWriteTimestamp2.invokeExact(PFN_vkCmdWriteTimestamp2, commandBuffer, stage, queryPool, query); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWriteTimestamp2", e); } + } + + public @CType("VkResult") int QueueSubmit2(@CType("VkQueue") MemorySegment queue, @CType("uint32_t") int submitCount, @CType("const VkSubmitInfo2 *") MemorySegment pSubmits, @CType("VkFence") MemorySegment fence) { + if (Unmarshal.isNullPointer(PFN_vkQueueSubmit2)) throw new SymbolNotFoundError("Symbol not found: vkQueueSubmit2"); + try { return (int) MH_vkQueueSubmit2.invokeExact(PFN_vkQueueSubmit2, queue, submitCount, pSubmits, fence); } + catch (Throwable e) { throw new RuntimeException("error in vkQueueSubmit2", e); } + } + + public void CmdCopyBuffer2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyBufferInfo2 *") MemorySegment pCopyBufferInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyBuffer2)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyBuffer2"); + try { MH_vkCmdCopyBuffer2.invokeExact(PFN_vkCmdCopyBuffer2, commandBuffer, pCopyBufferInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyBuffer2", e); } + } + + public void CmdCopyImage2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyImageInfo2 *") MemorySegment pCopyImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyImage2)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyImage2"); + try { MH_vkCmdCopyImage2.invokeExact(PFN_vkCmdCopyImage2, commandBuffer, pCopyImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyImage2", e); } + } + + public void CmdCopyBufferToImage2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyBufferToImageInfo2 *") MemorySegment pCopyBufferToImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyBufferToImage2)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyBufferToImage2"); + try { MH_vkCmdCopyBufferToImage2.invokeExact(PFN_vkCmdCopyBufferToImage2, commandBuffer, pCopyBufferToImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyBufferToImage2", e); } + } + + public void CmdCopyImageToBuffer2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyImageToBufferInfo2 *") MemorySegment pCopyImageToBufferInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyImageToBuffer2)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyImageToBuffer2"); + try { MH_vkCmdCopyImageToBuffer2.invokeExact(PFN_vkCmdCopyImageToBuffer2, commandBuffer, pCopyImageToBufferInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyImageToBuffer2", e); } + } + + public void CmdBlitImage2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkBlitImageInfo2 *") MemorySegment pBlitImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBlitImage2)) throw new SymbolNotFoundError("Symbol not found: vkCmdBlitImage2"); + try { MH_vkCmdBlitImage2.invokeExact(PFN_vkCmdBlitImage2, commandBuffer, pBlitImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBlitImage2", e); } + } + + public void CmdResolveImage2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkResolveImageInfo2 *") MemorySegment pResolveImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdResolveImage2)) throw new SymbolNotFoundError("Symbol not found: vkCmdResolveImage2"); + try { MH_vkCmdResolveImage2.invokeExact(PFN_vkCmdResolveImage2, commandBuffer, pResolveImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdResolveImage2", e); } + } + + public void CmdBeginRendering(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkRenderingInfo *") MemorySegment pRenderingInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginRendering)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginRendering"); + try { MH_vkCmdBeginRendering.invokeExact(PFN_vkCmdBeginRendering, commandBuffer, pRenderingInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginRendering", e); } + } + + public void CmdEndRendering(@CType("VkCommandBuffer") MemorySegment commandBuffer) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndRendering)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndRendering"); + try { MH_vkCmdEndRendering.invokeExact(PFN_vkCmdEndRendering, commandBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndRendering", e); } + } + + public void CmdSetCullMode(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCullModeFlags") int cullMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCullMode)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCullMode"); + try { MH_vkCmdSetCullMode.invokeExact(PFN_vkCmdSetCullMode, commandBuffer, cullMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCullMode", e); } + } + + public void CmdSetFrontFace(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkFrontFace") int frontFace) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetFrontFace)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetFrontFace"); + try { MH_vkCmdSetFrontFace.invokeExact(PFN_vkCmdSetFrontFace, commandBuffer, frontFace); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetFrontFace", e); } + } + + public void CmdSetPrimitiveTopology(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPrimitiveTopology") int primitiveTopology) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPrimitiveTopology)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPrimitiveTopology"); + try { MH_vkCmdSetPrimitiveTopology.invokeExact(PFN_vkCmdSetPrimitiveTopology, commandBuffer, primitiveTopology); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPrimitiveTopology", e); } + } + + public void CmdSetViewportWithCount(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int viewportCount, @CType("const VkViewport *") MemorySegment pViewports) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetViewportWithCount)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetViewportWithCount"); + try { MH_vkCmdSetViewportWithCount.invokeExact(PFN_vkCmdSetViewportWithCount, commandBuffer, viewportCount, pViewports); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetViewportWithCount", e); } + } + + public void CmdSetScissorWithCount(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int scissorCount, @CType("const VkRect2D *") MemorySegment pScissors) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetScissorWithCount)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetScissorWithCount"); + try { MH_vkCmdSetScissorWithCount.invokeExact(PFN_vkCmdSetScissorWithCount, commandBuffer, scissorCount, pScissors); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetScissorWithCount", e); } + } + + public void CmdBindVertexBuffers2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstBinding, @CType("uint32_t") int bindingCount, @CType("const VkBuffer *") MemorySegment pBuffers, @CType("const VkDeviceSize *") MemorySegment pOffsets, @CType("const VkDeviceSize *") MemorySegment pSizes, @CType("const VkDeviceSize *") MemorySegment pStrides) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindVertexBuffers2)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindVertexBuffers2"); + try { MH_vkCmdBindVertexBuffers2.invokeExact(PFN_vkCmdBindVertexBuffers2, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindVertexBuffers2", e); } + } + + public void CmdSetDepthTestEnable(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthTestEnable)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthTestEnable"); + try { MH_vkCmdSetDepthTestEnable.invokeExact(PFN_vkCmdSetDepthTestEnable, commandBuffer, depthTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthTestEnable", e); } + } + + public void CmdSetDepthWriteEnable(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthWriteEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthWriteEnable)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthWriteEnable"); + try { MH_vkCmdSetDepthWriteEnable.invokeExact(PFN_vkCmdSetDepthWriteEnable, commandBuffer, depthWriteEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthWriteEnable", e); } + } + + public void CmdSetDepthCompareOp(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCompareOp") int depthCompareOp) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthCompareOp)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthCompareOp"); + try { MH_vkCmdSetDepthCompareOp.invokeExact(PFN_vkCmdSetDepthCompareOp, commandBuffer, depthCompareOp); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthCompareOp", e); } + } + + public void CmdSetDepthBoundsTestEnable(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthBoundsTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthBoundsTestEnable)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthBoundsTestEnable"); + try { MH_vkCmdSetDepthBoundsTestEnable.invokeExact(PFN_vkCmdSetDepthBoundsTestEnable, commandBuffer, depthBoundsTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthBoundsTestEnable", e); } + } + + public void CmdSetStencilTestEnable(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int stencilTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetStencilTestEnable)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetStencilTestEnable"); + try { MH_vkCmdSetStencilTestEnable.invokeExact(PFN_vkCmdSetStencilTestEnable, commandBuffer, stencilTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetStencilTestEnable", e); } + } + + public void CmdSetStencilOp(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkStencilFaceFlags") int faceMask, @CType("VkStencilOp") int failOp, @CType("VkStencilOp") int passOp, @CType("VkStencilOp") int depthFailOp, @CType("VkCompareOp") int compareOp) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetStencilOp)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetStencilOp"); + try { MH_vkCmdSetStencilOp.invokeExact(PFN_vkCmdSetStencilOp, commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetStencilOp", e); } + } + + public void CmdSetRasterizerDiscardEnable(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int rasterizerDiscardEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRasterizerDiscardEnable)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRasterizerDiscardEnable"); + try { MH_vkCmdSetRasterizerDiscardEnable.invokeExact(PFN_vkCmdSetRasterizerDiscardEnable, commandBuffer, rasterizerDiscardEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRasterizerDiscardEnable", e); } + } + + public void CmdSetDepthBiasEnable(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthBiasEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthBiasEnable)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthBiasEnable"); + try { MH_vkCmdSetDepthBiasEnable.invokeExact(PFN_vkCmdSetDepthBiasEnable, commandBuffer, depthBiasEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthBiasEnable", e); } + } + + public void CmdSetPrimitiveRestartEnable(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int primitiveRestartEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPrimitiveRestartEnable)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPrimitiveRestartEnable"); + try { MH_vkCmdSetPrimitiveRestartEnable.invokeExact(PFN_vkCmdSetPrimitiveRestartEnable, commandBuffer, primitiveRestartEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPrimitiveRestartEnable", e); } + } + + public void GetDeviceBufferMemoryRequirements(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceBufferMemoryRequirements *") MemorySegment pInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceBufferMemoryRequirements)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceBufferMemoryRequirements"); + try { MH_vkGetDeviceBufferMemoryRequirements.invokeExact(PFN_vkGetDeviceBufferMemoryRequirements, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceBufferMemoryRequirements", e); } + } + + public void GetDeviceImageMemoryRequirements(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceImageMemoryRequirements *") MemorySegment pInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceImageMemoryRequirements)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceImageMemoryRequirements"); + try { MH_vkGetDeviceImageMemoryRequirements.invokeExact(PFN_vkGetDeviceImageMemoryRequirements, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceImageMemoryRequirements", e); } + } + + public void GetDeviceImageSparseMemoryRequirements(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceImageMemoryRequirements *") MemorySegment pInfo, @CType("uint32_t *") MemorySegment pSparseMemoryRequirementCount, @CType("VkSparseImageMemoryRequirements2 *") MemorySegment pSparseMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceImageSparseMemoryRequirements)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceImageSparseMemoryRequirements"); + try { MH_vkGetDeviceImageSparseMemoryRequirements.invokeExact(PFN_vkGetDeviceImageSparseMemoryRequirements, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceImageSparseMemoryRequirements", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK14.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK14.java new file mode 100644 index 00000000..af2f27a4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VK14.java @@ -0,0 +1,309 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VK14 extends VK13 { + public static final int VK_API_VERSION_1_0 = VK_MAKE_API_VERSION(0, 1, 0, 0); + public static final int VK_API_VERSION_1_1 = VK_MAKE_API_VERSION(0, 1, 1, 0); + public static final int VK_API_VERSION_1_2 = VK_MAKE_API_VERSION(0, 1, 2, 0); + public static final int VK_API_VERSION_1_3 = VK_MAKE_API_VERSION(0, 1, 3, 0); + public static final int VK_API_VERSION_1_4 = VK_MAKE_API_VERSION(0, 1, 4, 0); + public static final int VK_QUEUE_GLOBAL_PRIORITY_LOW = 128; + public static final int VK_QUEUE_GLOBAL_PRIORITY_MEDIUM = 256; + public static final int VK_QUEUE_GLOBAL_PRIORITY_HIGH = 512; + public static final int VK_QUEUE_GLOBAL_PRIORITY_REALTIME = 1024; + public static final int VK_LINE_RASTERIZATION_MODE_DEFAULT = 0; + public static final int VK_LINE_RASTERIZATION_MODE_RECTANGULAR = 1; + public static final int VK_LINE_RASTERIZATION_MODE_BRESENHAM = 2; + public static final int VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH = 3; + public static final long VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT = 0x00000001L; + public static final long VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT = 0x00000002L; + public static final long VK_PIPELINE_CREATE_2_DERIVATIVE_BIT = 0x00000004L; + public static final long VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008L; + public static final long VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT = 0x00000010L; + public static final long VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT = 0x00000100L; + public static final long VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT = 0x00000200L; + public static final long VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT = 0x08000000L; + public static final long VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT = 0x40000000L; + public static final long VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT = 0x00000001L; + public static final long VK_BUFFER_USAGE_2_TRANSFER_DST_BIT = 0x00000002L; + public static final long VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004L; + public static final long VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT = 0x00000008L; + public static final long VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT = 0x00000010L; + public static final long VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT = 0x00000020L; + public static final long VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT = 0x00000040L; + public static final long VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT = 0x00000080L; + public static final long VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT = 0x00000100L; + public static final int VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT = 0; + public static final int VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED = 1; + public static final int VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS = 2; + public static final int VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 = 3; + public static final int VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT = 0; + public static final int VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED = 1; + public static final int VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS = 2; + public static final int VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2 = 3; + public static final int VK_HOST_IMAGE_COPY_MEMCPY = 0x00000001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES = 55; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES = 56; + public static final int VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO = 1000174000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES = 1000388000; + public static final int VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES = 1000388001; + public static final int VK_ERROR_NOT_PERMITTED = -1000174001; + public static final int VK_MAX_GLOBAL_PRIORITY_SIZE = 16; + public static final int VK_ATTACHMENT_LOAD_OP_NONE = 1000400000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES = 1000416000; + public static final int VK_SUBGROUP_FEATURE_ROTATE_BIT = 0x00000200; + public static final int VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT = 0x00000400; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES = 1000528000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES = 1000544000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES = 1000259000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO = 1000259001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES = 1000259002; + public static final int VK_DYNAMIC_STATE_LINE_STIPPLE = 1000259000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES = 1000525000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO = 1000190001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES = 1000190002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES = 1000265000; + public static final int VK_INDEX_TYPE_UINT8 = 1000265000; + public static final int VK_STRUCTURE_TYPE_MEMORY_MAP_INFO = 1000271000; + public static final int VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO = 1000271001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES = 1000470000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES = 1000470001; + public static final int VK_STRUCTURE_TYPE_RENDERING_AREA_INFO = 1000470003; + public static final int VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO = 1000470004; + public static final int VK_FORMAT_A1B5G5R5_UNORM_PACK16 = 1000470000; + public static final int VK_FORMAT_A8_UNORM = 1000470001; + public static final int VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2 = 1000338002; + public static final int VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2 = 1000338003; + public static final int VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO = 1000470005; + public static final int VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO = 1000470006; + public static final long VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT = 0x00020000L; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES = 1000080000; + public static final int VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT = 0x00000001; + public static final int VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS = 1; + public static final int VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ = 1000232000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES = 1000232000; + public static final int VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO = 1000232001; + public static final int VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO = 1000232002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES = 1000545000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES = 1000545001; + public static final int VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS = 1000545002; + public static final int VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO = 1000545003; + public static final int VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO = 1000545004; + public static final int VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO = 1000545005; + public static final int VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO = 1000545006; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES = 1000466000; + public static final int VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT = 0x08000000; + public static final int VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT = 0x40000000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO = 1000068000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES = 1000068001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES = 1000068002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES = 1000270000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES = 1000270001; + public static final int VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY = 1000270002; + public static final int VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY = 1000270003; + public static final int VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO = 1000270004; + public static final int VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO = 1000270005; + public static final int VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO = 1000270006; + public static final int VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO = 1000270007; + public static final int VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE = 1000270008; + public static final int VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY = 1000270009; + public static final int VK_IMAGE_USAGE_HOST_TRANSFER_BIT = 0x00400000; + public static final long VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT = 0x400000000000L; + public static final MethodHandle MH_vkCmdSetLineStipple = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_SHORT)); + public static final MethodHandle MH_vkMapMemory2 = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkUnmapMemory2 = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindIndexBuffer2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkGetRenderingAreaGranularity = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceImageSubresourceLayout = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageSubresourceLayout2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPushDescriptorSet = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPushDescriptorSetWithTemplate = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetRenderingAttachmentLocations = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetRenderingInputAttachmentIndices = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindDescriptorSets2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPushConstants2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPushDescriptorSet2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPushDescriptorSetWithTemplate2 = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyMemoryToImage = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyImageToMemory = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyImageToImage = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkTransitionImageLayout = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetLineStipple; + public final MemorySegment PFN_vkMapMemory2; + public final MemorySegment PFN_vkUnmapMemory2; + public final MemorySegment PFN_vkCmdBindIndexBuffer2; + public final MemorySegment PFN_vkGetRenderingAreaGranularity; + public final MemorySegment PFN_vkGetDeviceImageSubresourceLayout; + public final MemorySegment PFN_vkGetImageSubresourceLayout2; + public final MemorySegment PFN_vkCmdPushDescriptorSet; + public final MemorySegment PFN_vkCmdPushDescriptorSetWithTemplate; + public final MemorySegment PFN_vkCmdSetRenderingAttachmentLocations; + public final MemorySegment PFN_vkCmdSetRenderingInputAttachmentIndices; + public final MemorySegment PFN_vkCmdBindDescriptorSets2; + public final MemorySegment PFN_vkCmdPushConstants2; + public final MemorySegment PFN_vkCmdPushDescriptorSet2; + public final MemorySegment PFN_vkCmdPushDescriptorSetWithTemplate2; + public final MemorySegment PFN_vkCopyMemoryToImage; + public final MemorySegment PFN_vkCopyImageToMemory; + public final MemorySegment PFN_vkCopyImageToImage; + public final MemorySegment PFN_vkTransitionImageLayout; + + public VK14(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + super(instance, func); + PFN_vkCmdSetLineStipple = func.invoke(instance, "vkCmdSetLineStipple", "vkCmdSetLineStippleKHR", "vkCmdSetLineStippleEXT"); + PFN_vkMapMemory2 = func.invoke(instance, "vkMapMemory2", "vkMapMemory2KHR"); + PFN_vkUnmapMemory2 = func.invoke(instance, "vkUnmapMemory2", "vkUnmapMemory2KHR"); + PFN_vkCmdBindIndexBuffer2 = func.invoke(instance, "vkCmdBindIndexBuffer2", "vkCmdBindIndexBuffer2KHR"); + PFN_vkGetRenderingAreaGranularity = func.invoke(instance, "vkGetRenderingAreaGranularity", "vkGetRenderingAreaGranularityKHR"); + PFN_vkGetDeviceImageSubresourceLayout = func.invoke(instance, "vkGetDeviceImageSubresourceLayout", "vkGetDeviceImageSubresourceLayoutKHR"); + PFN_vkGetImageSubresourceLayout2 = func.invoke(instance, "vkGetImageSubresourceLayout2", "vkGetImageSubresourceLayout2KHR", "vkGetImageSubresourceLayout2EXT"); + PFN_vkCmdPushDescriptorSet = func.invoke(instance, "vkCmdPushDescriptorSet", "vkCmdPushDescriptorSetKHR"); + PFN_vkCmdPushDescriptorSetWithTemplate = func.invoke(instance, "vkCmdPushDescriptorSetWithTemplate", "vkCmdPushDescriptorSetWithTemplateKHR"); + PFN_vkCmdSetRenderingAttachmentLocations = func.invoke(instance, "vkCmdSetRenderingAttachmentLocations", "vkCmdSetRenderingAttachmentLocationsKHR"); + PFN_vkCmdSetRenderingInputAttachmentIndices = func.invoke(instance, "vkCmdSetRenderingInputAttachmentIndices", "vkCmdSetRenderingInputAttachmentIndicesKHR"); + PFN_vkCmdBindDescriptorSets2 = func.invoke(instance, "vkCmdBindDescriptorSets2", "vkCmdBindDescriptorSets2KHR"); + PFN_vkCmdPushConstants2 = func.invoke(instance, "vkCmdPushConstants2", "vkCmdPushConstants2KHR"); + PFN_vkCmdPushDescriptorSet2 = func.invoke(instance, "vkCmdPushDescriptorSet2", "vkCmdPushDescriptorSet2KHR"); + PFN_vkCmdPushDescriptorSetWithTemplate2 = func.invoke(instance, "vkCmdPushDescriptorSetWithTemplate2", "vkCmdPushDescriptorSetWithTemplate2KHR"); + PFN_vkCopyMemoryToImage = func.invoke(instance, "vkCopyMemoryToImage", "vkCopyMemoryToImageEXT"); + PFN_vkCopyImageToMemory = func.invoke(instance, "vkCopyImageToMemory", "vkCopyImageToMemoryEXT"); + PFN_vkCopyImageToImage = func.invoke(instance, "vkCopyImageToImage", "vkCopyImageToImageEXT"); + PFN_vkTransitionImageLayout = func.invoke(instance, "vkTransitionImageLayout", "vkTransitionImageLayoutEXT"); + } + + public void CmdSetLineStipple(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int lineStippleFactor, @CType("uint16_t") short lineStipplePattern) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLineStipple)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLineStipple"); + try { MH_vkCmdSetLineStipple.invokeExact(PFN_vkCmdSetLineStipple, commandBuffer, lineStippleFactor, lineStipplePattern); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLineStipple", e); } + } + + public @CType("VkResult") int MapMemory2(@CType("VkDevice") MemorySegment device, @CType("const VkMemoryMapInfo *") MemorySegment pMemoryMapInfo, @CType("void **") MemorySegment ppData) { + if (Unmarshal.isNullPointer(PFN_vkMapMemory2)) throw new SymbolNotFoundError("Symbol not found: vkMapMemory2"); + try { return (int) MH_vkMapMemory2.invokeExact(PFN_vkMapMemory2, device, pMemoryMapInfo, ppData); } + catch (Throwable e) { throw new RuntimeException("error in vkMapMemory2", e); } + } + + public @CType("VkResult") int UnmapMemory2(@CType("VkDevice") MemorySegment device, @CType("const VkMemoryUnmapInfo *") MemorySegment pMemoryUnmapInfo) { + if (Unmarshal.isNullPointer(PFN_vkUnmapMemory2)) throw new SymbolNotFoundError("Symbol not found: vkUnmapMemory2"); + try { return (int) MH_vkUnmapMemory2.invokeExact(PFN_vkUnmapMemory2, device, pMemoryUnmapInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkUnmapMemory2", e); } + } + + public void CmdBindIndexBuffer2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkDeviceSize") long size, @CType("VkIndexType") int indexType) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindIndexBuffer2)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindIndexBuffer2"); + try { MH_vkCmdBindIndexBuffer2.invokeExact(PFN_vkCmdBindIndexBuffer2, commandBuffer, buffer, offset, size, indexType); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindIndexBuffer2", e); } + } + + public void GetRenderingAreaGranularity(@CType("VkDevice") MemorySegment device, @CType("const VkRenderingAreaInfo *") MemorySegment pRenderingAreaInfo, @CType("VkExtent2D *") MemorySegment pGranularity) { + if (Unmarshal.isNullPointer(PFN_vkGetRenderingAreaGranularity)) throw new SymbolNotFoundError("Symbol not found: vkGetRenderingAreaGranularity"); + try { MH_vkGetRenderingAreaGranularity.invokeExact(PFN_vkGetRenderingAreaGranularity, device, pRenderingAreaInfo, pGranularity); } + catch (Throwable e) { throw new RuntimeException("error in vkGetRenderingAreaGranularity", e); } + } + + public void GetDeviceImageSubresourceLayout(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceImageSubresourceInfo *") MemorySegment pInfo, @CType("VkSubresourceLayout2 *") MemorySegment pLayout) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceImageSubresourceLayout)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceImageSubresourceLayout"); + try { MH_vkGetDeviceImageSubresourceLayout.invokeExact(PFN_vkGetDeviceImageSubresourceLayout, device, pInfo, pLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceImageSubresourceLayout", e); } + } + + public void GetImageSubresourceLayout2(@CType("VkDevice") MemorySegment device, @CType("VkImage") MemorySegment image, @CType("const VkImageSubresource2 *") MemorySegment pSubresource, @CType("VkSubresourceLayout2 *") MemorySegment pLayout) { + if (Unmarshal.isNullPointer(PFN_vkGetImageSubresourceLayout2)) throw new SymbolNotFoundError("Symbol not found: vkGetImageSubresourceLayout2"); + try { MH_vkGetImageSubresourceLayout2.invokeExact(PFN_vkGetImageSubresourceLayout2, device, image, pSubresource, pLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageSubresourceLayout2", e); } + } + + public void CmdPushDescriptorSet(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineBindPoint") int pipelineBindPoint, @CType("VkPipelineLayout") MemorySegment layout, @CType("uint32_t") int set, @CType("uint32_t") int descriptorWriteCount, @CType("const VkWriteDescriptorSet *") MemorySegment pDescriptorWrites) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushDescriptorSet)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushDescriptorSet"); + try { MH_vkCmdPushDescriptorSet.invokeExact(PFN_vkCmdPushDescriptorSet, commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushDescriptorSet", e); } + } + + public void CmdPushDescriptorSetWithTemplate(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDescriptorUpdateTemplate") MemorySegment descriptorUpdateTemplate, @CType("VkPipelineLayout") MemorySegment layout, @CType("uint32_t") int set, @CType("const void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushDescriptorSetWithTemplate)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushDescriptorSetWithTemplate"); + try { MH_vkCmdPushDescriptorSetWithTemplate.invokeExact(PFN_vkCmdPushDescriptorSetWithTemplate, commandBuffer, descriptorUpdateTemplate, layout, set, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushDescriptorSetWithTemplate", e); } + } + + public void CmdSetRenderingAttachmentLocations(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkRenderingAttachmentLocationInfo *") MemorySegment pLocationInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRenderingAttachmentLocations)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRenderingAttachmentLocations"); + try { MH_vkCmdSetRenderingAttachmentLocations.invokeExact(PFN_vkCmdSetRenderingAttachmentLocations, commandBuffer, pLocationInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRenderingAttachmentLocations", e); } + } + + public void CmdSetRenderingInputAttachmentIndices(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkRenderingInputAttachmentIndexInfo *") MemorySegment pInputAttachmentIndexInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRenderingInputAttachmentIndices)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRenderingInputAttachmentIndices"); + try { MH_vkCmdSetRenderingInputAttachmentIndices.invokeExact(PFN_vkCmdSetRenderingInputAttachmentIndices, commandBuffer, pInputAttachmentIndexInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRenderingInputAttachmentIndices", e); } + } + + public void CmdBindDescriptorSets2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkBindDescriptorSetsInfo *") MemorySegment pBindDescriptorSetsInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindDescriptorSets2)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindDescriptorSets2"); + try { MH_vkCmdBindDescriptorSets2.invokeExact(PFN_vkCmdBindDescriptorSets2, commandBuffer, pBindDescriptorSetsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindDescriptorSets2", e); } + } + + public void CmdPushConstants2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkPushConstantsInfo *") MemorySegment pPushConstantsInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushConstants2)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushConstants2"); + try { MH_vkCmdPushConstants2.invokeExact(PFN_vkCmdPushConstants2, commandBuffer, pPushConstantsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushConstants2", e); } + } + + public void CmdPushDescriptorSet2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkPushDescriptorSetInfo *") MemorySegment pPushDescriptorSetInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushDescriptorSet2)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushDescriptorSet2"); + try { MH_vkCmdPushDescriptorSet2.invokeExact(PFN_vkCmdPushDescriptorSet2, commandBuffer, pPushDescriptorSetInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushDescriptorSet2", e); } + } + + public void CmdPushDescriptorSetWithTemplate2(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkPushDescriptorSetWithTemplateInfo *") MemorySegment pPushDescriptorSetWithTemplateInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushDescriptorSetWithTemplate2)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushDescriptorSetWithTemplate2"); + try { MH_vkCmdPushDescriptorSetWithTemplate2.invokeExact(PFN_vkCmdPushDescriptorSetWithTemplate2, commandBuffer, pPushDescriptorSetWithTemplateInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushDescriptorSetWithTemplate2", e); } + } + + public @CType("VkResult") int CopyMemoryToImage(@CType("VkDevice") MemorySegment device, @CType("const VkCopyMemoryToImageInfo *") MemorySegment pCopyMemoryToImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyMemoryToImage)) throw new SymbolNotFoundError("Symbol not found: vkCopyMemoryToImage"); + try { return (int) MH_vkCopyMemoryToImage.invokeExact(PFN_vkCopyMemoryToImage, device, pCopyMemoryToImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyMemoryToImage", e); } + } + + public @CType("VkResult") int CopyImageToMemory(@CType("VkDevice") MemorySegment device, @CType("const VkCopyImageToMemoryInfo *") MemorySegment pCopyImageToMemoryInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyImageToMemory)) throw new SymbolNotFoundError("Symbol not found: vkCopyImageToMemory"); + try { return (int) MH_vkCopyImageToMemory.invokeExact(PFN_vkCopyImageToMemory, device, pCopyImageToMemoryInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyImageToMemory", e); } + } + + public @CType("VkResult") int CopyImageToImage(@CType("VkDevice") MemorySegment device, @CType("const VkCopyImageToImageInfo *") MemorySegment pCopyImageToImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyImageToImage)) throw new SymbolNotFoundError("Symbol not found: vkCopyImageToImage"); + try { return (int) MH_vkCopyImageToImage.invokeExact(PFN_vkCopyImageToImage, device, pCopyImageToImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyImageToImage", e); } + } + + public @CType("VkResult") int TransitionImageLayout(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int transitionCount, @CType("const VkHostImageLayoutTransitionInfo *") MemorySegment pTransitions) { + if (Unmarshal.isNullPointer(PFN_vkTransitionImageLayout)) throw new SymbolNotFoundError("Symbol not found: vkTransitionImageLayout"); + try { return (int) MH_vkTransitionImageLayout.invokeExact(PFN_vkTransitionImageLayout, device, transitionCount, pTransitions); } + catch (Throwable e) { throw new RuntimeException("error in vkTransitionImageLayout", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VKLoadFunc.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VKLoadFunc.java new file mode 100644 index 00000000..4c1bd892 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/VKLoadFunc.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +package overrungl.vulkan; + +import overrungl.util.Marshal; +import overrungl.util.MemoryStack; +import overrungl.util.Unmarshal; + +import java.lang.foreign.MemorySegment; + +/// The Vulkan loading function. +/// +/// ## Example +/// ```java +/// VKLoadFunc func = GLFW::glfwGetInstanceProcAddress; +/// pInstance = stack.allocate(ADDRESS); // VkInstance instance; +/// vkCreateInstance(func, createInfo.segment(), NULL, pInstance); // vkCreateInstance(createInfo, NULL, &instance); +/// instance = pInstance.get(ADDRESS, 0L); +/// vk = new VK(instance, func); +///``` +/// +/// ## Extensions +/// +/// +/// @author squid233 +/// @since 0.1.0 +public interface VKLoadFunc { + /// Gets the function pointer of the given Vulkan function. + /// + /// @param segment the `VkInstance` or `VkDevice` + /// @param name the name of the function. + /// @return the function pointer. + MemorySegment invoke(MemorySegment segment, MemorySegment name); + + /// Gets the function pointer of the given Vulkan function. + /// + /// @param segment the `VkInstance` or `VkDevice` + /// @param name the name of the function. + /// @return the function pointer. + default MemorySegment invoke(MemorySegment segment, String name) { + try (MemoryStack stack = MemoryStack.pushLocal()) { + return invoke(segment, Marshal.marshal(stack, name)); + } + } + + + /// Gets the function pointer of the given Vulkan function. + /// + /// @param segment the `VkInstance` or `VkDevice` + /// @param name the name of the function. + /// @param aliases the aliases to be used + /// @return the function pointer. + default MemorySegment invoke(MemorySegment segment, String name, String... aliases) { + MemorySegment p = invoke(segment, name); + if (!Unmarshal.isNullPointer(p)) return p; + for (String alias : aliases) { + MemorySegment p1 = invoke(segment, alias); + if (!Unmarshal.isNullPointer(p1)) return p1; + break; + } + return MemorySegment.NULL; + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDAntiLag.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDAntiLag.java new file mode 100644 index 00000000..4314847b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDAntiLag.java @@ -0,0 +1,49 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDAntiLag { + public static final int VK_ANTI_LAG_MODE_DRIVER_CONTROL_AMD = 0; + public static final int VK_ANTI_LAG_MODE_ON_AMD = 1; + public static final int VK_ANTI_LAG_MODE_OFF_AMD = 2; + public static final int VK_ANTI_LAG_STAGE_INPUT_AMD = 0; + public static final int VK_ANTI_LAG_STAGE_PRESENT_AMD = 1; + public static final int VK_AMD_ANTI_LAG_SPEC_VERSION = 1; + public static final String VK_AMD_ANTI_LAG_EXTENSION_NAME = "VK_AMD_anti_lag"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD = 1000476000; + public static final int VK_STRUCTURE_TYPE_ANTI_LAG_DATA_AMD = 1000476001; + public static final int VK_STRUCTURE_TYPE_ANTI_LAG_PRESENTATION_INFO_AMD = 1000476002; + public static final MethodHandle MH_vkAntiLagUpdateAMD = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkAntiLagUpdateAMD; + + public VKAMDAntiLag(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkAntiLagUpdateAMD = func.invoke(device, "vkAntiLagUpdateAMD"); + } + + public void AntiLagUpdateAMD(@CType("VkDevice") MemorySegment device, @CType("const VkAntiLagDataAMD *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkAntiLagUpdateAMD)) throw new SymbolNotFoundError("Symbol not found: vkAntiLagUpdateAMD"); + try { MH_vkAntiLagUpdateAMD.invokeExact(PFN_vkAntiLagUpdateAMD, device, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkAntiLagUpdateAMD", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDBufferMarker.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDBufferMarker.java new file mode 100644 index 00000000..83885b5d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDBufferMarker.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDBufferMarker { + public static final int VK_AMD_BUFFER_MARKER_SPEC_VERSION = 1; + public static final String VK_AMD_BUFFER_MARKER_EXTENSION_NAME = "VK_AMD_buffer_marker"; + public static final MethodHandle MH_vkCmdWriteBufferMarkerAMD = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdWriteBufferMarker2AMD = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdWriteBufferMarkerAMD; + public final MemorySegment PFN_vkCmdWriteBufferMarker2AMD; + + public VKAMDBufferMarker(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdWriteBufferMarkerAMD = func.invoke(device, "vkCmdWriteBufferMarkerAMD"); + PFN_vkCmdWriteBufferMarker2AMD = func.invoke(device, "vkCmdWriteBufferMarker2AMD"); + } + + public void CmdWriteBufferMarkerAMD(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineStageFlagBits") int pipelineStage, @CType("VkBuffer") MemorySegment dstBuffer, @CType("VkDeviceSize") long dstOffset, @CType("uint32_t") int marker) { + if (Unmarshal.isNullPointer(PFN_vkCmdWriteBufferMarkerAMD)) throw new SymbolNotFoundError("Symbol not found: vkCmdWriteBufferMarkerAMD"); + try { MH_vkCmdWriteBufferMarkerAMD.invokeExact(PFN_vkCmdWriteBufferMarkerAMD, commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWriteBufferMarkerAMD", e); } + } + + public void CmdWriteBufferMarker2AMD(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineStageFlags2") long stage, @CType("VkBuffer") MemorySegment dstBuffer, @CType("VkDeviceSize") long dstOffset, @CType("uint32_t") int marker) { + if (Unmarshal.isNullPointer(PFN_vkCmdWriteBufferMarker2AMD)) throw new SymbolNotFoundError("Symbol not found: vkCmdWriteBufferMarker2AMD"); + try { MH_vkCmdWriteBufferMarker2AMD.invokeExact(PFN_vkCmdWriteBufferMarker2AMD, commandBuffer, stage, dstBuffer, dstOffset, marker); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWriteBufferMarker2AMD", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDDeviceCoherentMemory.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDDeviceCoherentMemory.java new file mode 100644 index 00000000..c43e34cd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDDeviceCoherentMemory.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDDeviceCoherentMemory { + public static final int VK_AMD_DEVICE_COHERENT_MEMORY_SPEC_VERSION = 1; + public static final String VK_AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME = "VK_AMD_device_coherent_memory"; + public static final int VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD = 0x00000040; + public static final int VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD = 0x00000080; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000; + + public VKAMDDeviceCoherentMemory(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDDisplayNativeHdr.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDDisplayNativeHdr.java new file mode 100644 index 00000000..5f62cfc1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDDisplayNativeHdr.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDDisplayNativeHdr { + public static final int VK_AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION = 1; + public static final String VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME = "VK_AMD_display_native_hdr"; + public static final int VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD = 1000213000; + public static final int VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD = 1000213001; + public static final int VK_COLOR_SPACE_DISPLAY_NATIVE_AMD = 1000213000; + public static final MethodHandle MH_vkSetLocalDimmingAMD = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkSetLocalDimmingAMD; + + public VKAMDDisplayNativeHdr(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkSetLocalDimmingAMD = func.invoke(device, "vkSetLocalDimmingAMD"); + } + + public void SetLocalDimmingAMD(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapChain, @CType("VkBool32") int localDimmingEnable) { + if (Unmarshal.isNullPointer(PFN_vkSetLocalDimmingAMD)) throw new SymbolNotFoundError("Symbol not found: vkSetLocalDimmingAMD"); + try { MH_vkSetLocalDimmingAMD.invokeExact(PFN_vkSetLocalDimmingAMD, device, swapChain, localDimmingEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkSetLocalDimmingAMD", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDDrawIndirectCount.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDDrawIndirectCount.java new file mode 100644 index 00000000..d795f084 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDDrawIndirectCount.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDDrawIndirectCount { + public static final int VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION = 2; + public static final String VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME = "VK_AMD_draw_indirect_count"; + public static final MethodHandle MH_vkCmdDrawIndirectCountAMD = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawIndexedIndirectCountAMD = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdDrawIndirectCountAMD; + public final MemorySegment PFN_vkCmdDrawIndexedIndirectCountAMD; + + public VKAMDDrawIndirectCount(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdDrawIndirectCountAMD = func.invoke(device, "vkCmdDrawIndirectCountAMD", "vkCmdDrawIndirectCount"); + PFN_vkCmdDrawIndexedIndirectCountAMD = func.invoke(device, "vkCmdDrawIndexedIndirectCountAMD", "vkCmdDrawIndexedIndirectCount"); + } + + public void CmdDrawIndirectCountAMD(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkBuffer") MemorySegment countBuffer, @CType("VkDeviceSize") long countBufferOffset, @CType("uint32_t") int maxDrawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawIndirectCountAMD)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawIndirectCountAMD"); + try { MH_vkCmdDrawIndirectCountAMD.invokeExact(PFN_vkCmdDrawIndirectCountAMD, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawIndirectCountAMD", e); } + } + + public void CmdDrawIndexedIndirectCountAMD(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkBuffer") MemorySegment countBuffer, @CType("VkDeviceSize") long countBufferOffset, @CType("uint32_t") int maxDrawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawIndexedIndirectCountAMD)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawIndexedIndirectCountAMD"); + try { MH_vkCmdDrawIndexedIndirectCountAMD.invokeExact(PFN_vkCmdDrawIndexedIndirectCountAMD, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawIndexedIndirectCountAMD", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDGcnShader.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDGcnShader.java new file mode 100644 index 00000000..ba3fc7ad --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDGcnShader.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDGcnShader { + public static final int VK_AMD_GCN_SHADER_SPEC_VERSION = 1; + public static final String VK_AMD_GCN_SHADER_EXTENSION_NAME = "VK_AMD_gcn_shader"; + + public VKAMDGcnShader(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDGpuShaderHalfFloat.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDGpuShaderHalfFloat.java new file mode 100644 index 00000000..1814f043 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDGpuShaderHalfFloat.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDGpuShaderHalfFloat { + public static final int VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION = 2; + public static final String VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME = "VK_AMD_gpu_shader_half_float"; + + public VKAMDGpuShaderHalfFloat(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDGpuShaderInt16.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDGpuShaderInt16.java new file mode 100644 index 00000000..a11b37c8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDGpuShaderInt16.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDGpuShaderInt16 { + public static final int VK_AMD_GPU_SHADER_INT16_SPEC_VERSION = 2; + public static final String VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME = "VK_AMD_gpu_shader_int16"; + + public VKAMDGpuShaderInt16(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDMemoryOverallocationBehavior.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDMemoryOverallocationBehavior.java new file mode 100644 index 00000000..1ed39222 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDMemoryOverallocationBehavior.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDMemoryOverallocationBehavior { + public static final int VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = 0; + public static final int VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = 1; + public static final int VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD = 2; + public static final int VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION = 1; + public static final String VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME = "VK_AMD_memory_overallocation_behavior"; + public static final int VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000; + + public VKAMDMemoryOverallocationBehavior(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDMixedAttachmentSamples.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDMixedAttachmentSamples.java new file mode 100644 index 00000000..7e709fbf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDMixedAttachmentSamples.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDMixedAttachmentSamples { + public static final int VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION = 1; + public static final String VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME = "VK_AMD_mixed_attachment_samples"; + public static final int VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD = 1000136008; + + public VKAMDMixedAttachmentSamples(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDNegativeViewportHeight.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDNegativeViewportHeight.java new file mode 100644 index 00000000..6e691e94 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDNegativeViewportHeight.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDNegativeViewportHeight { + public static final int VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION = 1; + public static final String VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME = "VK_AMD_negative_viewport_height"; + + public VKAMDNegativeViewportHeight(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDPipelineCompilerControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDPipelineCompilerControl.java new file mode 100644 index 00000000..dffd4ee2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDPipelineCompilerControl.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDPipelineCompilerControl { + public static final int VK_AMD_PIPELINE_COMPILER_CONTROL_SPEC_VERSION = 1; + public static final String VK_AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME = "VK_AMD_pipeline_compiler_control"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000; + + public VKAMDPipelineCompilerControl(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDRasterizationOrder.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDRasterizationOrder.java new file mode 100644 index 00000000..0d3dbc8c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDRasterizationOrder.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDRasterizationOrder { + public static final int VK_RASTERIZATION_ORDER_STRICT_AMD = 0; + public static final int VK_RASTERIZATION_ORDER_RELAXED_AMD = 1; + public static final int VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION = 1; + public static final String VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME = "VK_AMD_rasterization_order"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000; + + public VKAMDRasterizationOrder(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderBallot.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderBallot.java new file mode 100644 index 00000000..1c91f19c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderBallot.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDShaderBallot { + public static final int VK_AMD_SHADER_BALLOT_SPEC_VERSION = 1; + public static final String VK_AMD_SHADER_BALLOT_EXTENSION_NAME = "VK_AMD_shader_ballot"; + + public VKAMDShaderBallot(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderCoreProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderCoreProperties.java new file mode 100644 index 00000000..6e0c02b0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderCoreProperties.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDShaderCoreProperties { + public static final int VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION = 2; + public static final String VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_AMD_shader_core_properties"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000; + + public VKAMDShaderCoreProperties(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderCoreProperties2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderCoreProperties2.java new file mode 100644 index 00000000..d8e2ac40 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderCoreProperties2.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDShaderCoreProperties2 { + public static final int VK_AMD_SHADER_CORE_PROPERTIES_2_SPEC_VERSION = 1; + public static final String VK_AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME = "VK_AMD_shader_core_properties2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000; + + public VKAMDShaderCoreProperties2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderEarlyAndLateFragmentTests.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderEarlyAndLateFragmentTests.java new file mode 100644 index 00000000..9cb86132 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderEarlyAndLateFragmentTests.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDShaderEarlyAndLateFragmentTests { + public static final int VK_AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_SPEC_VERSION = 1; + public static final String VK_AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_EXTENSION_NAME = "VK_AMD_shader_early_and_late_fragment_tests"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD = 1000321000; + + public VKAMDShaderEarlyAndLateFragmentTests(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderExplicitVertexParameter.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderExplicitVertexParameter.java new file mode 100644 index 00000000..a993e025 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderExplicitVertexParameter.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDShaderExplicitVertexParameter { + public static final int VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION = 1; + public static final String VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME = "VK_AMD_shader_explicit_vertex_parameter"; + + public VKAMDShaderExplicitVertexParameter(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderFragmentMask.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderFragmentMask.java new file mode 100644 index 00000000..724eb611 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderFragmentMask.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDShaderFragmentMask { + public static final int VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION = 1; + public static final String VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME = "VK_AMD_shader_fragment_mask"; + + public VKAMDShaderFragmentMask(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderImageLoadStoreLod.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderImageLoadStoreLod.java new file mode 100644 index 00000000..452ddd74 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderImageLoadStoreLod.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDShaderImageLoadStoreLod { + public static final int VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION = 1; + public static final String VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME = "VK_AMD_shader_image_load_store_lod"; + + public VKAMDShaderImageLoadStoreLod(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderInfo.java new file mode 100644 index 00000000..b091da3b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderInfo.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDShaderInfo { + public static final int VK_SHADER_INFO_TYPE_STATISTICS_AMD = 0; + public static final int VK_SHADER_INFO_TYPE_BINARY_AMD = 1; + public static final int VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2; + public static final int VK_AMD_SHADER_INFO_SPEC_VERSION = 1; + public static final String VK_AMD_SHADER_INFO_EXTENSION_NAME = "VK_AMD_shader_info"; + public static final MethodHandle MH_vkGetShaderInfoAMD = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetShaderInfoAMD; + + public VKAMDShaderInfo(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetShaderInfoAMD = func.invoke(device, "vkGetShaderInfoAMD"); + } + + public @CType("VkResult") int GetShaderInfoAMD(@CType("VkDevice") MemorySegment device, @CType("VkPipeline") MemorySegment pipeline, @CType("VkShaderStageFlagBits") int shaderStage, @CType("VkShaderInfoTypeAMD") int infoType, @CType("size_t *") MemorySegment pInfoSize, @CType("void *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetShaderInfoAMD)) throw new SymbolNotFoundError("Symbol not found: vkGetShaderInfoAMD"); + try { return (int) MH_vkGetShaderInfoAMD.invokeExact(PFN_vkGetShaderInfoAMD, device, pipeline, shaderStage, infoType, pInfoSize, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetShaderInfoAMD", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderTrinaryMinmax.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderTrinaryMinmax.java new file mode 100644 index 00000000..2a7c4a87 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDShaderTrinaryMinmax.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDShaderTrinaryMinmax { + public static final int VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION = 1; + public static final String VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME = "VK_AMD_shader_trinary_minmax"; + + public VKAMDShaderTrinaryMinmax(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDTextureGatherBiasLod.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDTextureGatherBiasLod.java new file mode 100644 index 00000000..37826818 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/VKAMDTextureGatherBiasLod.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDTextureGatherBiasLod { + public static final int VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION = 1; + public static final String VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME = "VK_AMD_texture_gather_bias_lod"; + public static final int VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000; + + public VKAMDTextureGatherBiasLod(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkAntiLagDataAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkAntiLagDataAMD.java new file mode 100644 index 00000000..b118bcff --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkAntiLagDataAMD.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ### maxFPS +/// [VarHandle][#VH_maxFPS] - [Getter][#maxFPS()] - [Setter][#maxFPS(int)] +/// ### pPresentationInfo +/// [VarHandle][#VH_pPresentationInfo] - [Getter][#pPresentationInfo()] - [Setter][#pPresentationInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAntiLagDataAMD { +/// VkStructureType sType; +/// const void * pNext; +/// VkAntiLagModeAMD mode; +/// uint32_t maxFPS; +/// const VkAntiLagPresentationInfoAMD * pPresentationInfo; +/// } VkAntiLagDataAMD; +/// ``` +public final class VkAntiLagDataAMD extends Struct { + /// The struct layout of `VkAntiLagDataAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("mode"), + ValueLayout.JAVA_INT.withName("maxFPS"), + ValueLayout.ADDRESS.withName("pPresentationInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + /// The [VarHandle] of `maxFPS` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFPS = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFPS")); + /// The [VarHandle] of `pPresentationInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPresentationInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPresentationInfo")); + + /// Creates `VkAntiLagDataAMD` with the given segment. + /// @param segment the memory segment + public VkAntiLagDataAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAntiLagDataAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAntiLagDataAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAntiLagDataAMD(segment); } + + /// Creates `VkAntiLagDataAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAntiLagDataAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAntiLagDataAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAntiLagDataAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAntiLagDataAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAntiLagDataAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAntiLagDataAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAntiLagDataAMD` + public static VkAntiLagDataAMD alloc(SegmentAllocator allocator) { return new VkAntiLagDataAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAntiLagDataAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAntiLagDataAMD` + public static VkAntiLagDataAMD alloc(SegmentAllocator allocator, long count) { return new VkAntiLagDataAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAntiLagDataAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAntiLagDataAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAntiLagDataAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAntiLagDataAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAntiLagDataAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkAntiLagDataAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAntiLagDataAMD sType(@CType("VkStructureType") int value) { VkAntiLagDataAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAntiLagDataAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAntiLagDataAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAntiLagDataAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAntiLagDataAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAntiLagDataAMD pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAntiLagDataAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAntiLagDataAMD pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAntiLagDataAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAntiLagModeAMD") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkAntiLagModeAMD") int get_mode(MemorySegment segment) { return VkAntiLagDataAMD.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkAntiLagModeAMD") int modeAt(long index) { return VkAntiLagDataAMD.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkAntiLagModeAMD") int mode() { return VkAntiLagDataAMD.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkAntiLagModeAMD") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkAntiLagModeAMD") int value) { VkAntiLagDataAMD.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAntiLagDataAMD modeAt(long index, @CType("VkAntiLagModeAMD") int value) { VkAntiLagDataAMD.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkAntiLagDataAMD mode(@CType("VkAntiLagModeAMD") int value) { VkAntiLagDataAMD.set_mode(this.segment(), value); return this; } + + /// {@return `maxFPS` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFPS(MemorySegment segment, long index) { return (int) VH_maxFPS.get(segment, 0L, index); } + /// {@return `maxFPS`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFPS(MemorySegment segment) { return VkAntiLagDataAMD.get_maxFPS(segment, 0L); } + /// {@return `maxFPS` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFPSAt(long index) { return VkAntiLagDataAMD.get_maxFPS(this.segment(), index); } + /// {@return `maxFPS`} + public @CType("uint32_t") int maxFPS() { return VkAntiLagDataAMD.get_maxFPS(this.segment()); } + /// Sets `maxFPS` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFPS(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFPS.set(segment, 0L, index, value); } + /// Sets `maxFPS` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFPS(MemorySegment segment, @CType("uint32_t") int value) { VkAntiLagDataAMD.set_maxFPS(segment, 0L, value); } + /// Sets `maxFPS` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAntiLagDataAMD maxFPSAt(long index, @CType("uint32_t") int value) { VkAntiLagDataAMD.set_maxFPS(this.segment(), index, value); return this; } + /// Sets `maxFPS` with the given value. + /// @param value the value + /// @return `this` + public VkAntiLagDataAMD maxFPS(@CType("uint32_t") int value) { VkAntiLagDataAMD.set_maxFPS(this.segment(), value); return this; } + + /// {@return `pPresentationInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAntiLagPresentationInfoAMD *") java.lang.foreign.MemorySegment get_pPresentationInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPresentationInfo.get(segment, 0L, index); } + /// {@return `pPresentationInfo`} + /// @param segment the segment of the struct + public static @CType("const VkAntiLagPresentationInfoAMD *") java.lang.foreign.MemorySegment get_pPresentationInfo(MemorySegment segment) { return VkAntiLagDataAMD.get_pPresentationInfo(segment, 0L); } + /// {@return `pPresentationInfo` at the given index} + /// @param index the index + public @CType("const VkAntiLagPresentationInfoAMD *") java.lang.foreign.MemorySegment pPresentationInfoAt(long index) { return VkAntiLagDataAMD.get_pPresentationInfo(this.segment(), index); } + /// {@return `pPresentationInfo`} + public @CType("const VkAntiLagPresentationInfoAMD *") java.lang.foreign.MemorySegment pPresentationInfo() { return VkAntiLagDataAMD.get_pPresentationInfo(this.segment()); } + /// Sets `pPresentationInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPresentationInfo(MemorySegment segment, long index, @CType("const VkAntiLagPresentationInfoAMD *") java.lang.foreign.MemorySegment value) { VH_pPresentationInfo.set(segment, 0L, index, value); } + /// Sets `pPresentationInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPresentationInfo(MemorySegment segment, @CType("const VkAntiLagPresentationInfoAMD *") java.lang.foreign.MemorySegment value) { VkAntiLagDataAMD.set_pPresentationInfo(segment, 0L, value); } + /// Sets `pPresentationInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAntiLagDataAMD pPresentationInfoAt(long index, @CType("const VkAntiLagPresentationInfoAMD *") java.lang.foreign.MemorySegment value) { VkAntiLagDataAMD.set_pPresentationInfo(this.segment(), index, value); return this; } + /// Sets `pPresentationInfo` with the given value. + /// @param value the value + /// @return `this` + public VkAntiLagDataAMD pPresentationInfo(@CType("const VkAntiLagPresentationInfoAMD *") java.lang.foreign.MemorySegment value) { VkAntiLagDataAMD.set_pPresentationInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkAntiLagPresentationInfoAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkAntiLagPresentationInfoAMD.java new file mode 100644 index 00000000..93b64867 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkAntiLagPresentationInfoAMD.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stage +/// [VarHandle][#VH_stage] - [Getter][#stage()] - [Setter][#stage(int)] +/// ### frameIndex +/// [VarHandle][#VH_frameIndex] - [Getter][#frameIndex()] - [Setter][#frameIndex(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAntiLagPresentationInfoAMD { +/// VkStructureType sType; +/// void * pNext; +/// VkAntiLagStageAMD stage; +/// uint64_t frameIndex; +/// } VkAntiLagPresentationInfoAMD; +/// ``` +public final class VkAntiLagPresentationInfoAMD extends Struct { + /// The struct layout of `VkAntiLagPresentationInfoAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stage"), + ValueLayout.JAVA_LONG.withName("frameIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stage")); + /// The [VarHandle] of `frameIndex` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_frameIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameIndex")); + + /// Creates `VkAntiLagPresentationInfoAMD` with the given segment. + /// @param segment the memory segment + public VkAntiLagPresentationInfoAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAntiLagPresentationInfoAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAntiLagPresentationInfoAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAntiLagPresentationInfoAMD(segment); } + + /// Creates `VkAntiLagPresentationInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAntiLagPresentationInfoAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAntiLagPresentationInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAntiLagPresentationInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAntiLagPresentationInfoAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAntiLagPresentationInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAntiLagPresentationInfoAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAntiLagPresentationInfoAMD` + public static VkAntiLagPresentationInfoAMD alloc(SegmentAllocator allocator) { return new VkAntiLagPresentationInfoAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAntiLagPresentationInfoAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAntiLagPresentationInfoAMD` + public static VkAntiLagPresentationInfoAMD alloc(SegmentAllocator allocator, long count) { return new VkAntiLagPresentationInfoAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAntiLagPresentationInfoAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAntiLagPresentationInfoAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAntiLagPresentationInfoAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAntiLagPresentationInfoAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAntiLagPresentationInfoAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkAntiLagPresentationInfoAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAntiLagPresentationInfoAMD sType(@CType("VkStructureType") int value) { VkAntiLagPresentationInfoAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAntiLagPresentationInfoAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAntiLagPresentationInfoAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkAntiLagPresentationInfoAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAntiLagPresentationInfoAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAntiLagPresentationInfoAMD pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAntiLagPresentationInfoAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAntiLagPresentationInfoAMD pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkAntiLagPresentationInfoAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `stage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAntiLagStageAMD") int get_stage(MemorySegment segment, long index) { return (int) VH_stage.get(segment, 0L, index); } + /// {@return `stage`} + /// @param segment the segment of the struct + public static @CType("VkAntiLagStageAMD") int get_stage(MemorySegment segment) { return VkAntiLagPresentationInfoAMD.get_stage(segment, 0L); } + /// {@return `stage` at the given index} + /// @param index the index + public @CType("VkAntiLagStageAMD") int stageAt(long index) { return VkAntiLagPresentationInfoAMD.get_stage(this.segment(), index); } + /// {@return `stage`} + public @CType("VkAntiLagStageAMD") int stage() { return VkAntiLagPresentationInfoAMD.get_stage(this.segment()); } + /// Sets `stage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stage(MemorySegment segment, long index, @CType("VkAntiLagStageAMD") int value) { VH_stage.set(segment, 0L, index, value); } + /// Sets `stage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stage(MemorySegment segment, @CType("VkAntiLagStageAMD") int value) { VkAntiLagPresentationInfoAMD.set_stage(segment, 0L, value); } + /// Sets `stage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAntiLagPresentationInfoAMD stageAt(long index, @CType("VkAntiLagStageAMD") int value) { VkAntiLagPresentationInfoAMD.set_stage(this.segment(), index, value); return this; } + /// Sets `stage` with the given value. + /// @param value the value + /// @return `this` + public VkAntiLagPresentationInfoAMD stage(@CType("VkAntiLagStageAMD") int value) { VkAntiLagPresentationInfoAMD.set_stage(this.segment(), value); return this; } + + /// {@return `frameIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_frameIndex(MemorySegment segment, long index) { return (long) VH_frameIndex.get(segment, 0L, index); } + /// {@return `frameIndex`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_frameIndex(MemorySegment segment) { return VkAntiLagPresentationInfoAMD.get_frameIndex(segment, 0L); } + /// {@return `frameIndex` at the given index} + /// @param index the index + public @CType("uint64_t") long frameIndexAt(long index) { return VkAntiLagPresentationInfoAMD.get_frameIndex(this.segment(), index); } + /// {@return `frameIndex`} + public @CType("uint64_t") long frameIndex() { return VkAntiLagPresentationInfoAMD.get_frameIndex(this.segment()); } + /// Sets `frameIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameIndex(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_frameIndex.set(segment, 0L, index, value); } + /// Sets `frameIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameIndex(MemorySegment segment, @CType("uint64_t") long value) { VkAntiLagPresentationInfoAMD.set_frameIndex(segment, 0L, value); } + /// Sets `frameIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAntiLagPresentationInfoAMD frameIndexAt(long index, @CType("uint64_t") long value) { VkAntiLagPresentationInfoAMD.set_frameIndex(this.segment(), index, value); return this; } + /// Sets `frameIndex` with the given value. + /// @param value the value + /// @return `this` + public VkAntiLagPresentationInfoAMD frameIndex(@CType("uint64_t") long value) { VkAntiLagPresentationInfoAMD.set_frameIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkAttachmentSampleCountInfoAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkAttachmentSampleCountInfoAMD.java new file mode 100644 index 00000000..02dac384 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkAttachmentSampleCountInfoAMD.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### colorAttachmentCount +/// [VarHandle][#VH_colorAttachmentCount] - [Getter][#colorAttachmentCount()] - [Setter][#colorAttachmentCount(int)] +/// ### pColorAttachmentSamples +/// [VarHandle][#VH_pColorAttachmentSamples] - [Getter][#pColorAttachmentSamples()] - [Setter][#pColorAttachmentSamples(java.lang.foreign.MemorySegment)] +/// ### depthStencilAttachmentSamples +/// [VarHandle][#VH_depthStencilAttachmentSamples] - [Getter][#depthStencilAttachmentSamples()] - [Setter][#depthStencilAttachmentSamples(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAttachmentSampleCountInfoAMD { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t colorAttachmentCount; +/// const VkSampleCountFlagBits * pColorAttachmentSamples; +/// VkSampleCountFlagBits depthStencilAttachmentSamples; +/// } VkAttachmentSampleCountInfoAMD; +/// ``` +public final class VkAttachmentSampleCountInfoAMD extends Struct { + /// The struct layout of `VkAttachmentSampleCountInfoAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("colorAttachmentCount"), + ValueLayout.ADDRESS.withName("pColorAttachmentSamples"), + ValueLayout.JAVA_INT.withName("depthStencilAttachmentSamples") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `colorAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachmentCount")); + /// The [VarHandle] of `pColorAttachmentSamples` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorAttachmentSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorAttachmentSamples")); + /// The [VarHandle] of `depthStencilAttachmentSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthStencilAttachmentSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthStencilAttachmentSamples")); + + /// Creates `VkAttachmentSampleCountInfoAMD` with the given segment. + /// @param segment the memory segment + public VkAttachmentSampleCountInfoAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAttachmentSampleCountInfoAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentSampleCountInfoAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentSampleCountInfoAMD(segment); } + + /// Creates `VkAttachmentSampleCountInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentSampleCountInfoAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentSampleCountInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAttachmentSampleCountInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentSampleCountInfoAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentSampleCountInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAttachmentSampleCountInfoAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAttachmentSampleCountInfoAMD` + public static VkAttachmentSampleCountInfoAMD alloc(SegmentAllocator allocator) { return new VkAttachmentSampleCountInfoAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAttachmentSampleCountInfoAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAttachmentSampleCountInfoAMD` + public static VkAttachmentSampleCountInfoAMD alloc(SegmentAllocator allocator, long count) { return new VkAttachmentSampleCountInfoAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAttachmentSampleCountInfoAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAttachmentSampleCountInfoAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAttachmentSampleCountInfoAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAttachmentSampleCountInfoAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentSampleCountInfoAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkAttachmentSampleCountInfoAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentSampleCountInfoAMD sType(@CType("VkStructureType") int value) { VkAttachmentSampleCountInfoAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAttachmentSampleCountInfoAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAttachmentSampleCountInfoAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAttachmentSampleCountInfoAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAttachmentSampleCountInfoAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentSampleCountInfoAMD pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAttachmentSampleCountInfoAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentSampleCountInfoAMD pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAttachmentSampleCountInfoAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `colorAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment, long index) { return (int) VH_colorAttachmentCount.get(segment, 0L, index); } + /// {@return `colorAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment) { return VkAttachmentSampleCountInfoAMD.get_colorAttachmentCount(segment, 0L); } + /// {@return `colorAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int colorAttachmentCountAt(long index) { return VkAttachmentSampleCountInfoAMD.get_colorAttachmentCount(this.segment(), index); } + /// {@return `colorAttachmentCount`} + public @CType("uint32_t") int colorAttachmentCount() { return VkAttachmentSampleCountInfoAMD.get_colorAttachmentCount(this.segment()); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorAttachmentCount.set(segment, 0L, index, value); } + /// Sets `colorAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkAttachmentSampleCountInfoAMD.set_colorAttachmentCount(segment, 0L, value); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentSampleCountInfoAMD colorAttachmentCountAt(long index, @CType("uint32_t") int value) { VkAttachmentSampleCountInfoAMD.set_colorAttachmentCount(this.segment(), index, value); return this; } + /// Sets `colorAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentSampleCountInfoAMD colorAttachmentCount(@CType("uint32_t") int value) { VkAttachmentSampleCountInfoAMD.set_colorAttachmentCount(this.segment(), value); return this; } + + /// {@return `pColorAttachmentSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSampleCountFlagBits *") java.lang.foreign.MemorySegment get_pColorAttachmentSamples(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorAttachmentSamples.get(segment, 0L, index); } + /// {@return `pColorAttachmentSamples`} + /// @param segment the segment of the struct + public static @CType("const VkSampleCountFlagBits *") java.lang.foreign.MemorySegment get_pColorAttachmentSamples(MemorySegment segment) { return VkAttachmentSampleCountInfoAMD.get_pColorAttachmentSamples(segment, 0L); } + /// {@return `pColorAttachmentSamples` at the given index} + /// @param index the index + public @CType("const VkSampleCountFlagBits *") java.lang.foreign.MemorySegment pColorAttachmentSamplesAt(long index) { return VkAttachmentSampleCountInfoAMD.get_pColorAttachmentSamples(this.segment(), index); } + /// {@return `pColorAttachmentSamples`} + public @CType("const VkSampleCountFlagBits *") java.lang.foreign.MemorySegment pColorAttachmentSamples() { return VkAttachmentSampleCountInfoAMD.get_pColorAttachmentSamples(this.segment()); } + /// Sets `pColorAttachmentSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorAttachmentSamples(MemorySegment segment, long index, @CType("const VkSampleCountFlagBits *") java.lang.foreign.MemorySegment value) { VH_pColorAttachmentSamples.set(segment, 0L, index, value); } + /// Sets `pColorAttachmentSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorAttachmentSamples(MemorySegment segment, @CType("const VkSampleCountFlagBits *") java.lang.foreign.MemorySegment value) { VkAttachmentSampleCountInfoAMD.set_pColorAttachmentSamples(segment, 0L, value); } + /// Sets `pColorAttachmentSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentSampleCountInfoAMD pColorAttachmentSamplesAt(long index, @CType("const VkSampleCountFlagBits *") java.lang.foreign.MemorySegment value) { VkAttachmentSampleCountInfoAMD.set_pColorAttachmentSamples(this.segment(), index, value); return this; } + /// Sets `pColorAttachmentSamples` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentSampleCountInfoAMD pColorAttachmentSamples(@CType("const VkSampleCountFlagBits *") java.lang.foreign.MemorySegment value) { VkAttachmentSampleCountInfoAMD.set_pColorAttachmentSamples(this.segment(), value); return this; } + + /// {@return `depthStencilAttachmentSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_depthStencilAttachmentSamples(MemorySegment segment, long index) { return (int) VH_depthStencilAttachmentSamples.get(segment, 0L, index); } + /// {@return `depthStencilAttachmentSamples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_depthStencilAttachmentSamples(MemorySegment segment) { return VkAttachmentSampleCountInfoAMD.get_depthStencilAttachmentSamples(segment, 0L); } + /// {@return `depthStencilAttachmentSamples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int depthStencilAttachmentSamplesAt(long index) { return VkAttachmentSampleCountInfoAMD.get_depthStencilAttachmentSamples(this.segment(), index); } + /// {@return `depthStencilAttachmentSamples`} + public @CType("VkSampleCountFlagBits") int depthStencilAttachmentSamples() { return VkAttachmentSampleCountInfoAMD.get_depthStencilAttachmentSamples(this.segment()); } + /// Sets `depthStencilAttachmentSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthStencilAttachmentSamples(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_depthStencilAttachmentSamples.set(segment, 0L, index, value); } + /// Sets `depthStencilAttachmentSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthStencilAttachmentSamples(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkAttachmentSampleCountInfoAMD.set_depthStencilAttachmentSamples(segment, 0L, value); } + /// Sets `depthStencilAttachmentSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentSampleCountInfoAMD depthStencilAttachmentSamplesAt(long index, @CType("VkSampleCountFlagBits") int value) { VkAttachmentSampleCountInfoAMD.set_depthStencilAttachmentSamples(this.segment(), index, value); return this; } + /// Sets `depthStencilAttachmentSamples` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentSampleCountInfoAMD depthStencilAttachmentSamples(@CType("VkSampleCountFlagBits") int value) { VkAttachmentSampleCountInfoAMD.set_depthStencilAttachmentSamples(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkDeviceMemoryOverallocationCreateInfoAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkDeviceMemoryOverallocationCreateInfoAMD.java new file mode 100644 index 00000000..497eab18 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkDeviceMemoryOverallocationCreateInfoAMD.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### overallocationBehavior +/// [VarHandle][#VH_overallocationBehavior] - [Getter][#overallocationBehavior()] - [Setter][#overallocationBehavior(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceMemoryOverallocationCreateInfoAMD { +/// VkStructureType sType; +/// const void * pNext; +/// VkMemoryOverallocationBehaviorAMD overallocationBehavior; +/// } VkDeviceMemoryOverallocationCreateInfoAMD; +/// ``` +public final class VkDeviceMemoryOverallocationCreateInfoAMD extends Struct { + /// The struct layout of `VkDeviceMemoryOverallocationCreateInfoAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("overallocationBehavior") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `overallocationBehavior` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_overallocationBehavior = LAYOUT.arrayElementVarHandle(PathElement.groupElement("overallocationBehavior")); + + /// Creates `VkDeviceMemoryOverallocationCreateInfoAMD` with the given segment. + /// @param segment the memory segment + public VkDeviceMemoryOverallocationCreateInfoAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceMemoryOverallocationCreateInfoAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceMemoryOverallocationCreateInfoAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceMemoryOverallocationCreateInfoAMD(segment); } + + /// Creates `VkDeviceMemoryOverallocationCreateInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceMemoryOverallocationCreateInfoAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceMemoryOverallocationCreateInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceMemoryOverallocationCreateInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceMemoryOverallocationCreateInfoAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceMemoryOverallocationCreateInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceMemoryOverallocationCreateInfoAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceMemoryOverallocationCreateInfoAMD` + public static VkDeviceMemoryOverallocationCreateInfoAMD alloc(SegmentAllocator allocator) { return new VkDeviceMemoryOverallocationCreateInfoAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceMemoryOverallocationCreateInfoAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceMemoryOverallocationCreateInfoAMD` + public static VkDeviceMemoryOverallocationCreateInfoAMD alloc(SegmentAllocator allocator, long count) { return new VkDeviceMemoryOverallocationCreateInfoAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceMemoryOverallocationCreateInfoAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceMemoryOverallocationCreateInfoAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceMemoryOverallocationCreateInfoAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceMemoryOverallocationCreateInfoAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryOverallocationCreateInfoAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceMemoryOverallocationCreateInfoAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryOverallocationCreateInfoAMD sType(@CType("VkStructureType") int value) { VkDeviceMemoryOverallocationCreateInfoAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceMemoryOverallocationCreateInfoAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceMemoryOverallocationCreateInfoAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceMemoryOverallocationCreateInfoAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceMemoryOverallocationCreateInfoAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryOverallocationCreateInfoAMD pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceMemoryOverallocationCreateInfoAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryOverallocationCreateInfoAMD pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceMemoryOverallocationCreateInfoAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `overallocationBehavior` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMemoryOverallocationBehaviorAMD") int get_overallocationBehavior(MemorySegment segment, long index) { return (int) VH_overallocationBehavior.get(segment, 0L, index); } + /// {@return `overallocationBehavior`} + /// @param segment the segment of the struct + public static @CType("VkMemoryOverallocationBehaviorAMD") int get_overallocationBehavior(MemorySegment segment) { return VkDeviceMemoryOverallocationCreateInfoAMD.get_overallocationBehavior(segment, 0L); } + /// {@return `overallocationBehavior` at the given index} + /// @param index the index + public @CType("VkMemoryOverallocationBehaviorAMD") int overallocationBehaviorAt(long index) { return VkDeviceMemoryOverallocationCreateInfoAMD.get_overallocationBehavior(this.segment(), index); } + /// {@return `overallocationBehavior`} + public @CType("VkMemoryOverallocationBehaviorAMD") int overallocationBehavior() { return VkDeviceMemoryOverallocationCreateInfoAMD.get_overallocationBehavior(this.segment()); } + /// Sets `overallocationBehavior` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_overallocationBehavior(MemorySegment segment, long index, @CType("VkMemoryOverallocationBehaviorAMD") int value) { VH_overallocationBehavior.set(segment, 0L, index, value); } + /// Sets `overallocationBehavior` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_overallocationBehavior(MemorySegment segment, @CType("VkMemoryOverallocationBehaviorAMD") int value) { VkDeviceMemoryOverallocationCreateInfoAMD.set_overallocationBehavior(segment, 0L, value); } + /// Sets `overallocationBehavior` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryOverallocationCreateInfoAMD overallocationBehaviorAt(long index, @CType("VkMemoryOverallocationBehaviorAMD") int value) { VkDeviceMemoryOverallocationCreateInfoAMD.set_overallocationBehavior(this.segment(), index, value); return this; } + /// Sets `overallocationBehavior` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryOverallocationCreateInfoAMD overallocationBehavior(@CType("VkMemoryOverallocationBehaviorAMD") int value) { VkDeviceMemoryOverallocationCreateInfoAMD.set_overallocationBehavior(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkDisplayNativeHdrSurfaceCapabilitiesAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkDisplayNativeHdrSurfaceCapabilitiesAMD.java new file mode 100644 index 00000000..0c20ec27 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkDisplayNativeHdrSurfaceCapabilitiesAMD.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### localDimmingSupport +/// [VarHandle][#VH_localDimmingSupport] - [Getter][#localDimmingSupport()] - [Setter][#localDimmingSupport(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayNativeHdrSurfaceCapabilitiesAMD { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 localDimmingSupport; +/// } VkDisplayNativeHdrSurfaceCapabilitiesAMD; +/// ``` +public final class VkDisplayNativeHdrSurfaceCapabilitiesAMD extends Struct { + /// The struct layout of `VkDisplayNativeHdrSurfaceCapabilitiesAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("localDimmingSupport") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `localDimmingSupport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_localDimmingSupport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("localDimmingSupport")); + + /// Creates `VkDisplayNativeHdrSurfaceCapabilitiesAMD` with the given segment. + /// @param segment the memory segment + public VkDisplayNativeHdrSurfaceCapabilitiesAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayNativeHdrSurfaceCapabilitiesAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayNativeHdrSurfaceCapabilitiesAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayNativeHdrSurfaceCapabilitiesAMD(segment); } + + /// Creates `VkDisplayNativeHdrSurfaceCapabilitiesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayNativeHdrSurfaceCapabilitiesAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayNativeHdrSurfaceCapabilitiesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayNativeHdrSurfaceCapabilitiesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayNativeHdrSurfaceCapabilitiesAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayNativeHdrSurfaceCapabilitiesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayNativeHdrSurfaceCapabilitiesAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayNativeHdrSurfaceCapabilitiesAMD` + public static VkDisplayNativeHdrSurfaceCapabilitiesAMD alloc(SegmentAllocator allocator) { return new VkDisplayNativeHdrSurfaceCapabilitiesAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayNativeHdrSurfaceCapabilitiesAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayNativeHdrSurfaceCapabilitiesAMD` + public static VkDisplayNativeHdrSurfaceCapabilitiesAMD alloc(SegmentAllocator allocator, long count) { return new VkDisplayNativeHdrSurfaceCapabilitiesAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayNativeHdrSurfaceCapabilitiesAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayNativeHdrSurfaceCapabilitiesAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayNativeHdrSurfaceCapabilitiesAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayNativeHdrSurfaceCapabilitiesAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayNativeHdrSurfaceCapabilitiesAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayNativeHdrSurfaceCapabilitiesAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayNativeHdrSurfaceCapabilitiesAMD sType(@CType("VkStructureType") int value) { VkDisplayNativeHdrSurfaceCapabilitiesAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayNativeHdrSurfaceCapabilitiesAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayNativeHdrSurfaceCapabilitiesAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayNativeHdrSurfaceCapabilitiesAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayNativeHdrSurfaceCapabilitiesAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayNativeHdrSurfaceCapabilitiesAMD pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayNativeHdrSurfaceCapabilitiesAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayNativeHdrSurfaceCapabilitiesAMD pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayNativeHdrSurfaceCapabilitiesAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `localDimmingSupport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_localDimmingSupport(MemorySegment segment, long index) { return (int) VH_localDimmingSupport.get(segment, 0L, index); } + /// {@return `localDimmingSupport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_localDimmingSupport(MemorySegment segment) { return VkDisplayNativeHdrSurfaceCapabilitiesAMD.get_localDimmingSupport(segment, 0L); } + /// {@return `localDimmingSupport` at the given index} + /// @param index the index + public @CType("VkBool32") int localDimmingSupportAt(long index) { return VkDisplayNativeHdrSurfaceCapabilitiesAMD.get_localDimmingSupport(this.segment(), index); } + /// {@return `localDimmingSupport`} + public @CType("VkBool32") int localDimmingSupport() { return VkDisplayNativeHdrSurfaceCapabilitiesAMD.get_localDimmingSupport(this.segment()); } + /// Sets `localDimmingSupport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_localDimmingSupport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_localDimmingSupport.set(segment, 0L, index, value); } + /// Sets `localDimmingSupport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_localDimmingSupport(MemorySegment segment, @CType("VkBool32") int value) { VkDisplayNativeHdrSurfaceCapabilitiesAMD.set_localDimmingSupport(segment, 0L, value); } + /// Sets `localDimmingSupport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayNativeHdrSurfaceCapabilitiesAMD localDimmingSupportAt(long index, @CType("VkBool32") int value) { VkDisplayNativeHdrSurfaceCapabilitiesAMD.set_localDimmingSupport(this.segment(), index, value); return this; } + /// Sets `localDimmingSupport` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayNativeHdrSurfaceCapabilitiesAMD localDimmingSupport(@CType("VkBool32") int value) { VkDisplayNativeHdrSurfaceCapabilitiesAMD.set_localDimmingSupport(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceAntiLagFeaturesAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceAntiLagFeaturesAMD.java new file mode 100644 index 00000000..245b9fbb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceAntiLagFeaturesAMD.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### antiLag +/// [VarHandle][#VH_antiLag] - [Getter][#antiLag()] - [Setter][#antiLag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceAntiLagFeaturesAMD { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 antiLag; +/// } VkPhysicalDeviceAntiLagFeaturesAMD; +/// ``` +public final class VkPhysicalDeviceAntiLagFeaturesAMD extends Struct { + /// The struct layout of `VkPhysicalDeviceAntiLagFeaturesAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("antiLag") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `antiLag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_antiLag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("antiLag")); + + /// Creates `VkPhysicalDeviceAntiLagFeaturesAMD` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceAntiLagFeaturesAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceAntiLagFeaturesAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAntiLagFeaturesAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAntiLagFeaturesAMD(segment); } + + /// Creates `VkPhysicalDeviceAntiLagFeaturesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAntiLagFeaturesAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAntiLagFeaturesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceAntiLagFeaturesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAntiLagFeaturesAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAntiLagFeaturesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceAntiLagFeaturesAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceAntiLagFeaturesAMD` + public static VkPhysicalDeviceAntiLagFeaturesAMD alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceAntiLagFeaturesAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceAntiLagFeaturesAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceAntiLagFeaturesAMD` + public static VkPhysicalDeviceAntiLagFeaturesAMD alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceAntiLagFeaturesAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceAntiLagFeaturesAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceAntiLagFeaturesAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceAntiLagFeaturesAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceAntiLagFeaturesAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAntiLagFeaturesAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceAntiLagFeaturesAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAntiLagFeaturesAMD sType(@CType("VkStructureType") int value) { VkPhysicalDeviceAntiLagFeaturesAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceAntiLagFeaturesAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceAntiLagFeaturesAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceAntiLagFeaturesAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAntiLagFeaturesAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAntiLagFeaturesAMD pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAntiLagFeaturesAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAntiLagFeaturesAMD pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAntiLagFeaturesAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `antiLag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_antiLag(MemorySegment segment, long index) { return (int) VH_antiLag.get(segment, 0L, index); } + /// {@return `antiLag`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_antiLag(MemorySegment segment) { return VkPhysicalDeviceAntiLagFeaturesAMD.get_antiLag(segment, 0L); } + /// {@return `antiLag` at the given index} + /// @param index the index + public @CType("VkBool32") int antiLagAt(long index) { return VkPhysicalDeviceAntiLagFeaturesAMD.get_antiLag(this.segment(), index); } + /// {@return `antiLag`} + public @CType("VkBool32") int antiLag() { return VkPhysicalDeviceAntiLagFeaturesAMD.get_antiLag(this.segment()); } + /// Sets `antiLag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_antiLag(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_antiLag.set(segment, 0L, index, value); } + /// Sets `antiLag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_antiLag(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceAntiLagFeaturesAMD.set_antiLag(segment, 0L, value); } + /// Sets `antiLag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAntiLagFeaturesAMD antiLagAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceAntiLagFeaturesAMD.set_antiLag(this.segment(), index, value); return this; } + /// Sets `antiLag` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAntiLagFeaturesAMD antiLag(@CType("VkBool32") int value) { VkPhysicalDeviceAntiLagFeaturesAMD.set_antiLag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceCoherentMemoryFeaturesAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceCoherentMemoryFeaturesAMD.java new file mode 100644 index 00000000..1183e3e1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceCoherentMemoryFeaturesAMD.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceCoherentMemory +/// [VarHandle][#VH_deviceCoherentMemory] - [Getter][#deviceCoherentMemory()] - [Setter][#deviceCoherentMemory(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCoherentMemoryFeaturesAMD { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 deviceCoherentMemory; +/// } VkPhysicalDeviceCoherentMemoryFeaturesAMD; +/// ``` +public final class VkPhysicalDeviceCoherentMemoryFeaturesAMD extends Struct { + /// The struct layout of `VkPhysicalDeviceCoherentMemoryFeaturesAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceCoherentMemory") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceCoherentMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceCoherentMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceCoherentMemory")); + + /// Creates `VkPhysicalDeviceCoherentMemoryFeaturesAMD` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCoherentMemoryFeaturesAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCoherentMemoryFeaturesAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCoherentMemoryFeaturesAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCoherentMemoryFeaturesAMD(segment); } + + /// Creates `VkPhysicalDeviceCoherentMemoryFeaturesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCoherentMemoryFeaturesAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCoherentMemoryFeaturesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCoherentMemoryFeaturesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCoherentMemoryFeaturesAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCoherentMemoryFeaturesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCoherentMemoryFeaturesAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCoherentMemoryFeaturesAMD` + public static VkPhysicalDeviceCoherentMemoryFeaturesAMD alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCoherentMemoryFeaturesAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCoherentMemoryFeaturesAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCoherentMemoryFeaturesAMD` + public static VkPhysicalDeviceCoherentMemoryFeaturesAMD alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCoherentMemoryFeaturesAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCoherentMemoryFeaturesAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCoherentMemoryFeaturesAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCoherentMemoryFeaturesAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCoherentMemoryFeaturesAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoherentMemoryFeaturesAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCoherentMemoryFeaturesAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoherentMemoryFeaturesAMD sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCoherentMemoryFeaturesAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCoherentMemoryFeaturesAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCoherentMemoryFeaturesAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCoherentMemoryFeaturesAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCoherentMemoryFeaturesAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoherentMemoryFeaturesAMD pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCoherentMemoryFeaturesAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoherentMemoryFeaturesAMD pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCoherentMemoryFeaturesAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceCoherentMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceCoherentMemory(MemorySegment segment, long index) { return (int) VH_deviceCoherentMemory.get(segment, 0L, index); } + /// {@return `deviceCoherentMemory`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceCoherentMemory(MemorySegment segment) { return VkPhysicalDeviceCoherentMemoryFeaturesAMD.get_deviceCoherentMemory(segment, 0L); } + /// {@return `deviceCoherentMemory` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceCoherentMemoryAt(long index) { return VkPhysicalDeviceCoherentMemoryFeaturesAMD.get_deviceCoherentMemory(this.segment(), index); } + /// {@return `deviceCoherentMemory`} + public @CType("VkBool32") int deviceCoherentMemory() { return VkPhysicalDeviceCoherentMemoryFeaturesAMD.get_deviceCoherentMemory(this.segment()); } + /// Sets `deviceCoherentMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceCoherentMemory(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceCoherentMemory.set(segment, 0L, index, value); } + /// Sets `deviceCoherentMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceCoherentMemory(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCoherentMemoryFeaturesAMD.set_deviceCoherentMemory(segment, 0L, value); } + /// Sets `deviceCoherentMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoherentMemoryFeaturesAMD deviceCoherentMemoryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCoherentMemoryFeaturesAMD.set_deviceCoherentMemory(this.segment(), index, value); return this; } + /// Sets `deviceCoherentMemory` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoherentMemoryFeaturesAMD deviceCoherentMemory(@CType("VkBool32") int value) { VkPhysicalDeviceCoherentMemoryFeaturesAMD.set_deviceCoherentMemory(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceShaderCoreProperties2AMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceShaderCoreProperties2AMD.java new file mode 100644 index 00000000..c8f26e6f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceShaderCoreProperties2AMD.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderCoreFeatures +/// [VarHandle][#VH_shaderCoreFeatures] - [Getter][#shaderCoreFeatures()] - [Setter][#shaderCoreFeatures(int)] +/// ### activeComputeUnitCount +/// [VarHandle][#VH_activeComputeUnitCount] - [Getter][#activeComputeUnitCount()] - [Setter][#activeComputeUnitCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderCoreProperties2AMD { +/// VkStructureType sType; +/// void * pNext; +/// VkShaderCorePropertiesFlagsAMD shaderCoreFeatures; +/// uint32_t activeComputeUnitCount; +/// } VkPhysicalDeviceShaderCoreProperties2AMD; +/// ``` +public final class VkPhysicalDeviceShaderCoreProperties2AMD extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderCoreProperties2AMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderCoreFeatures"), + ValueLayout.JAVA_INT.withName("activeComputeUnitCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderCoreFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderCoreFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderCoreFeatures")); + /// The [VarHandle] of `activeComputeUnitCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_activeComputeUnitCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("activeComputeUnitCount")); + + /// Creates `VkPhysicalDeviceShaderCoreProperties2AMD` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderCoreProperties2AMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderCoreProperties2AMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCoreProperties2AMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCoreProperties2AMD(segment); } + + /// Creates `VkPhysicalDeviceShaderCoreProperties2AMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCoreProperties2AMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCoreProperties2AMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderCoreProperties2AMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCoreProperties2AMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCoreProperties2AMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderCoreProperties2AMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderCoreProperties2AMD` + public static VkPhysicalDeviceShaderCoreProperties2AMD alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderCoreProperties2AMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderCoreProperties2AMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderCoreProperties2AMD` + public static VkPhysicalDeviceShaderCoreProperties2AMD alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderCoreProperties2AMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderCoreProperties2AMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderCoreProperties2AMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderCoreProperties2AMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreProperties2AMD sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreProperties2AMD sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderCoreProperties2AMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderCoreProperties2AMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderCoreProperties2AMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreProperties2AMD pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreProperties2AMD pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderCoreFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderCorePropertiesFlagsAMD") int get_shaderCoreFeatures(MemorySegment segment, long index) { return (int) VH_shaderCoreFeatures.get(segment, 0L, index); } + /// {@return `shaderCoreFeatures`} + /// @param segment the segment of the struct + public static @CType("VkShaderCorePropertiesFlagsAMD") int get_shaderCoreFeatures(MemorySegment segment) { return VkPhysicalDeviceShaderCoreProperties2AMD.get_shaderCoreFeatures(segment, 0L); } + /// {@return `shaderCoreFeatures` at the given index} + /// @param index the index + public @CType("VkShaderCorePropertiesFlagsAMD") int shaderCoreFeaturesAt(long index) { return VkPhysicalDeviceShaderCoreProperties2AMD.get_shaderCoreFeatures(this.segment(), index); } + /// {@return `shaderCoreFeatures`} + public @CType("VkShaderCorePropertiesFlagsAMD") int shaderCoreFeatures() { return VkPhysicalDeviceShaderCoreProperties2AMD.get_shaderCoreFeatures(this.segment()); } + /// Sets `shaderCoreFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderCoreFeatures(MemorySegment segment, long index, @CType("VkShaderCorePropertiesFlagsAMD") int value) { VH_shaderCoreFeatures.set(segment, 0L, index, value); } + /// Sets `shaderCoreFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderCoreFeatures(MemorySegment segment, @CType("VkShaderCorePropertiesFlagsAMD") int value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_shaderCoreFeatures(segment, 0L, value); } + /// Sets `shaderCoreFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreProperties2AMD shaderCoreFeaturesAt(long index, @CType("VkShaderCorePropertiesFlagsAMD") int value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_shaderCoreFeatures(this.segment(), index, value); return this; } + /// Sets `shaderCoreFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreProperties2AMD shaderCoreFeatures(@CType("VkShaderCorePropertiesFlagsAMD") int value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_shaderCoreFeatures(this.segment(), value); return this; } + + /// {@return `activeComputeUnitCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_activeComputeUnitCount(MemorySegment segment, long index) { return (int) VH_activeComputeUnitCount.get(segment, 0L, index); } + /// {@return `activeComputeUnitCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_activeComputeUnitCount(MemorySegment segment) { return VkPhysicalDeviceShaderCoreProperties2AMD.get_activeComputeUnitCount(segment, 0L); } + /// {@return `activeComputeUnitCount` at the given index} + /// @param index the index + public @CType("uint32_t") int activeComputeUnitCountAt(long index) { return VkPhysicalDeviceShaderCoreProperties2AMD.get_activeComputeUnitCount(this.segment(), index); } + /// {@return `activeComputeUnitCount`} + public @CType("uint32_t") int activeComputeUnitCount() { return VkPhysicalDeviceShaderCoreProperties2AMD.get_activeComputeUnitCount(this.segment()); } + /// Sets `activeComputeUnitCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_activeComputeUnitCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_activeComputeUnitCount.set(segment, 0L, index, value); } + /// Sets `activeComputeUnitCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_activeComputeUnitCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_activeComputeUnitCount(segment, 0L, value); } + /// Sets `activeComputeUnitCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreProperties2AMD activeComputeUnitCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_activeComputeUnitCount(this.segment(), index, value); return this; } + /// Sets `activeComputeUnitCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreProperties2AMD activeComputeUnitCount(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCoreProperties2AMD.set_activeComputeUnitCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceShaderCorePropertiesAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceShaderCorePropertiesAMD.java new file mode 100644 index 00000000..7a7410e1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceShaderCorePropertiesAMD.java @@ -0,0 +1,666 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderEngineCount +/// [VarHandle][#VH_shaderEngineCount] - [Getter][#shaderEngineCount()] - [Setter][#shaderEngineCount(int)] +/// ### shaderArraysPerEngineCount +/// [VarHandle][#VH_shaderArraysPerEngineCount] - [Getter][#shaderArraysPerEngineCount()] - [Setter][#shaderArraysPerEngineCount(int)] +/// ### computeUnitsPerShaderArray +/// [VarHandle][#VH_computeUnitsPerShaderArray] - [Getter][#computeUnitsPerShaderArray()] - [Setter][#computeUnitsPerShaderArray(int)] +/// ### simdPerComputeUnit +/// [VarHandle][#VH_simdPerComputeUnit] - [Getter][#simdPerComputeUnit()] - [Setter][#simdPerComputeUnit(int)] +/// ### wavefrontsPerSimd +/// [VarHandle][#VH_wavefrontsPerSimd] - [Getter][#wavefrontsPerSimd()] - [Setter][#wavefrontsPerSimd(int)] +/// ### wavefrontSize +/// [VarHandle][#VH_wavefrontSize] - [Getter][#wavefrontSize()] - [Setter][#wavefrontSize(int)] +/// ### sgprsPerSimd +/// [VarHandle][#VH_sgprsPerSimd] - [Getter][#sgprsPerSimd()] - [Setter][#sgprsPerSimd(int)] +/// ### minSgprAllocation +/// [VarHandle][#VH_minSgprAllocation] - [Getter][#minSgprAllocation()] - [Setter][#minSgprAllocation(int)] +/// ### maxSgprAllocation +/// [VarHandle][#VH_maxSgprAllocation] - [Getter][#maxSgprAllocation()] - [Setter][#maxSgprAllocation(int)] +/// ### sgprAllocationGranularity +/// [VarHandle][#VH_sgprAllocationGranularity] - [Getter][#sgprAllocationGranularity()] - [Setter][#sgprAllocationGranularity(int)] +/// ### vgprsPerSimd +/// [VarHandle][#VH_vgprsPerSimd] - [Getter][#vgprsPerSimd()] - [Setter][#vgprsPerSimd(int)] +/// ### minVgprAllocation +/// [VarHandle][#VH_minVgprAllocation] - [Getter][#minVgprAllocation()] - [Setter][#minVgprAllocation(int)] +/// ### maxVgprAllocation +/// [VarHandle][#VH_maxVgprAllocation] - [Getter][#maxVgprAllocation()] - [Setter][#maxVgprAllocation(int)] +/// ### vgprAllocationGranularity +/// [VarHandle][#VH_vgprAllocationGranularity] - [Getter][#vgprAllocationGranularity()] - [Setter][#vgprAllocationGranularity(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderCorePropertiesAMD { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t shaderEngineCount; +/// uint32_t shaderArraysPerEngineCount; +/// uint32_t computeUnitsPerShaderArray; +/// uint32_t simdPerComputeUnit; +/// uint32_t wavefrontsPerSimd; +/// uint32_t wavefrontSize; +/// uint32_t sgprsPerSimd; +/// uint32_t minSgprAllocation; +/// uint32_t maxSgprAllocation; +/// uint32_t sgprAllocationGranularity; +/// uint32_t vgprsPerSimd; +/// uint32_t minVgprAllocation; +/// uint32_t maxVgprAllocation; +/// uint32_t vgprAllocationGranularity; +/// } VkPhysicalDeviceShaderCorePropertiesAMD; +/// ``` +public final class VkPhysicalDeviceShaderCorePropertiesAMD extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderCorePropertiesAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderEngineCount"), + ValueLayout.JAVA_INT.withName("shaderArraysPerEngineCount"), + ValueLayout.JAVA_INT.withName("computeUnitsPerShaderArray"), + ValueLayout.JAVA_INT.withName("simdPerComputeUnit"), + ValueLayout.JAVA_INT.withName("wavefrontsPerSimd"), + ValueLayout.JAVA_INT.withName("wavefrontSize"), + ValueLayout.JAVA_INT.withName("sgprsPerSimd"), + ValueLayout.JAVA_INT.withName("minSgprAllocation"), + ValueLayout.JAVA_INT.withName("maxSgprAllocation"), + ValueLayout.JAVA_INT.withName("sgprAllocationGranularity"), + ValueLayout.JAVA_INT.withName("vgprsPerSimd"), + ValueLayout.JAVA_INT.withName("minVgprAllocation"), + ValueLayout.JAVA_INT.withName("maxVgprAllocation"), + ValueLayout.JAVA_INT.withName("vgprAllocationGranularity") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderEngineCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderEngineCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderEngineCount")); + /// The [VarHandle] of `shaderArraysPerEngineCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderArraysPerEngineCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderArraysPerEngineCount")); + /// The [VarHandle] of `computeUnitsPerShaderArray` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_computeUnitsPerShaderArray = LAYOUT.arrayElementVarHandle(PathElement.groupElement("computeUnitsPerShaderArray")); + /// The [VarHandle] of `simdPerComputeUnit` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_simdPerComputeUnit = LAYOUT.arrayElementVarHandle(PathElement.groupElement("simdPerComputeUnit")); + /// The [VarHandle] of `wavefrontsPerSimd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_wavefrontsPerSimd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("wavefrontsPerSimd")); + /// The [VarHandle] of `wavefrontSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_wavefrontSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("wavefrontSize")); + /// The [VarHandle] of `sgprsPerSimd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sgprsPerSimd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sgprsPerSimd")); + /// The [VarHandle] of `minSgprAllocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minSgprAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minSgprAllocation")); + /// The [VarHandle] of `maxSgprAllocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSgprAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSgprAllocation")); + /// The [VarHandle] of `sgprAllocationGranularity` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sgprAllocationGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sgprAllocationGranularity")); + /// The [VarHandle] of `vgprsPerSimd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vgprsPerSimd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vgprsPerSimd")); + /// The [VarHandle] of `minVgprAllocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minVgprAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minVgprAllocation")); + /// The [VarHandle] of `maxVgprAllocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVgprAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVgprAllocation")); + /// The [VarHandle] of `vgprAllocationGranularity` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vgprAllocationGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vgprAllocationGranularity")); + + /// Creates `VkPhysicalDeviceShaderCorePropertiesAMD` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderCorePropertiesAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderCorePropertiesAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCorePropertiesAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCorePropertiesAMD(segment); } + + /// Creates `VkPhysicalDeviceShaderCorePropertiesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCorePropertiesAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCorePropertiesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderCorePropertiesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCorePropertiesAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCorePropertiesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderCorePropertiesAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderCorePropertiesAMD` + public static VkPhysicalDeviceShaderCorePropertiesAMD alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderCorePropertiesAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderCorePropertiesAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderCorePropertiesAMD` + public static VkPhysicalDeviceShaderCorePropertiesAMD alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderCorePropertiesAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderEngineCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderEngineCount(MemorySegment segment, long index) { return (int) VH_shaderEngineCount.get(segment, 0L, index); } + /// {@return `shaderEngineCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderEngineCount(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_shaderEngineCount(segment, 0L); } + /// {@return `shaderEngineCount` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderEngineCountAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_shaderEngineCount(this.segment(), index); } + /// {@return `shaderEngineCount`} + public @CType("uint32_t") int shaderEngineCount() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_shaderEngineCount(this.segment()); } + /// Sets `shaderEngineCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderEngineCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderEngineCount.set(segment, 0L, index, value); } + /// Sets `shaderEngineCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderEngineCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_shaderEngineCount(segment, 0L, value); } + /// Sets `shaderEngineCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD shaderEngineCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_shaderEngineCount(this.segment(), index, value); return this; } + /// Sets `shaderEngineCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD shaderEngineCount(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_shaderEngineCount(this.segment(), value); return this; } + + /// {@return `shaderArraysPerEngineCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderArraysPerEngineCount(MemorySegment segment, long index) { return (int) VH_shaderArraysPerEngineCount.get(segment, 0L, index); } + /// {@return `shaderArraysPerEngineCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderArraysPerEngineCount(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_shaderArraysPerEngineCount(segment, 0L); } + /// {@return `shaderArraysPerEngineCount` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderArraysPerEngineCountAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_shaderArraysPerEngineCount(this.segment(), index); } + /// {@return `shaderArraysPerEngineCount`} + public @CType("uint32_t") int shaderArraysPerEngineCount() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_shaderArraysPerEngineCount(this.segment()); } + /// Sets `shaderArraysPerEngineCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderArraysPerEngineCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderArraysPerEngineCount.set(segment, 0L, index, value); } + /// Sets `shaderArraysPerEngineCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderArraysPerEngineCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_shaderArraysPerEngineCount(segment, 0L, value); } + /// Sets `shaderArraysPerEngineCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD shaderArraysPerEngineCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_shaderArraysPerEngineCount(this.segment(), index, value); return this; } + /// Sets `shaderArraysPerEngineCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD shaderArraysPerEngineCount(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_shaderArraysPerEngineCount(this.segment(), value); return this; } + + /// {@return `computeUnitsPerShaderArray` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_computeUnitsPerShaderArray(MemorySegment segment, long index) { return (int) VH_computeUnitsPerShaderArray.get(segment, 0L, index); } + /// {@return `computeUnitsPerShaderArray`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_computeUnitsPerShaderArray(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_computeUnitsPerShaderArray(segment, 0L); } + /// {@return `computeUnitsPerShaderArray` at the given index} + /// @param index the index + public @CType("uint32_t") int computeUnitsPerShaderArrayAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_computeUnitsPerShaderArray(this.segment(), index); } + /// {@return `computeUnitsPerShaderArray`} + public @CType("uint32_t") int computeUnitsPerShaderArray() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_computeUnitsPerShaderArray(this.segment()); } + /// Sets `computeUnitsPerShaderArray` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_computeUnitsPerShaderArray(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_computeUnitsPerShaderArray.set(segment, 0L, index, value); } + /// Sets `computeUnitsPerShaderArray` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_computeUnitsPerShaderArray(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_computeUnitsPerShaderArray(segment, 0L, value); } + /// Sets `computeUnitsPerShaderArray` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD computeUnitsPerShaderArrayAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_computeUnitsPerShaderArray(this.segment(), index, value); return this; } + /// Sets `computeUnitsPerShaderArray` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD computeUnitsPerShaderArray(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_computeUnitsPerShaderArray(this.segment(), value); return this; } + + /// {@return `simdPerComputeUnit` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_simdPerComputeUnit(MemorySegment segment, long index) { return (int) VH_simdPerComputeUnit.get(segment, 0L, index); } + /// {@return `simdPerComputeUnit`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_simdPerComputeUnit(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_simdPerComputeUnit(segment, 0L); } + /// {@return `simdPerComputeUnit` at the given index} + /// @param index the index + public @CType("uint32_t") int simdPerComputeUnitAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_simdPerComputeUnit(this.segment(), index); } + /// {@return `simdPerComputeUnit`} + public @CType("uint32_t") int simdPerComputeUnit() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_simdPerComputeUnit(this.segment()); } + /// Sets `simdPerComputeUnit` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_simdPerComputeUnit(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_simdPerComputeUnit.set(segment, 0L, index, value); } + /// Sets `simdPerComputeUnit` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_simdPerComputeUnit(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_simdPerComputeUnit(segment, 0L, value); } + /// Sets `simdPerComputeUnit` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD simdPerComputeUnitAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_simdPerComputeUnit(this.segment(), index, value); return this; } + /// Sets `simdPerComputeUnit` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD simdPerComputeUnit(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_simdPerComputeUnit(this.segment(), value); return this; } + + /// {@return `wavefrontsPerSimd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_wavefrontsPerSimd(MemorySegment segment, long index) { return (int) VH_wavefrontsPerSimd.get(segment, 0L, index); } + /// {@return `wavefrontsPerSimd`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_wavefrontsPerSimd(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_wavefrontsPerSimd(segment, 0L); } + /// {@return `wavefrontsPerSimd` at the given index} + /// @param index the index + public @CType("uint32_t") int wavefrontsPerSimdAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_wavefrontsPerSimd(this.segment(), index); } + /// {@return `wavefrontsPerSimd`} + public @CType("uint32_t") int wavefrontsPerSimd() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_wavefrontsPerSimd(this.segment()); } + /// Sets `wavefrontsPerSimd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_wavefrontsPerSimd(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_wavefrontsPerSimd.set(segment, 0L, index, value); } + /// Sets `wavefrontsPerSimd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_wavefrontsPerSimd(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_wavefrontsPerSimd(segment, 0L, value); } + /// Sets `wavefrontsPerSimd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD wavefrontsPerSimdAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_wavefrontsPerSimd(this.segment(), index, value); return this; } + /// Sets `wavefrontsPerSimd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD wavefrontsPerSimd(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_wavefrontsPerSimd(this.segment(), value); return this; } + + /// {@return `wavefrontSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_wavefrontSize(MemorySegment segment, long index) { return (int) VH_wavefrontSize.get(segment, 0L, index); } + /// {@return `wavefrontSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_wavefrontSize(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_wavefrontSize(segment, 0L); } + /// {@return `wavefrontSize` at the given index} + /// @param index the index + public @CType("uint32_t") int wavefrontSizeAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_wavefrontSize(this.segment(), index); } + /// {@return `wavefrontSize`} + public @CType("uint32_t") int wavefrontSize() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_wavefrontSize(this.segment()); } + /// Sets `wavefrontSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_wavefrontSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_wavefrontSize.set(segment, 0L, index, value); } + /// Sets `wavefrontSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_wavefrontSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_wavefrontSize(segment, 0L, value); } + /// Sets `wavefrontSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD wavefrontSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_wavefrontSize(this.segment(), index, value); return this; } + /// Sets `wavefrontSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD wavefrontSize(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_wavefrontSize(this.segment(), value); return this; } + + /// {@return `sgprsPerSimd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sgprsPerSimd(MemorySegment segment, long index) { return (int) VH_sgprsPerSimd.get(segment, 0L, index); } + /// {@return `sgprsPerSimd`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sgprsPerSimd(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_sgprsPerSimd(segment, 0L); } + /// {@return `sgprsPerSimd` at the given index} + /// @param index the index + public @CType("uint32_t") int sgprsPerSimdAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_sgprsPerSimd(this.segment(), index); } + /// {@return `sgprsPerSimd`} + public @CType("uint32_t") int sgprsPerSimd() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_sgprsPerSimd(this.segment()); } + /// Sets `sgprsPerSimd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sgprsPerSimd(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sgprsPerSimd.set(segment, 0L, index, value); } + /// Sets `sgprsPerSimd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sgprsPerSimd(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_sgprsPerSimd(segment, 0L, value); } + /// Sets `sgprsPerSimd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD sgprsPerSimdAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_sgprsPerSimd(this.segment(), index, value); return this; } + /// Sets `sgprsPerSimd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD sgprsPerSimd(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_sgprsPerSimd(this.segment(), value); return this; } + + /// {@return `minSgprAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minSgprAllocation(MemorySegment segment, long index) { return (int) VH_minSgprAllocation.get(segment, 0L, index); } + /// {@return `minSgprAllocation`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minSgprAllocation(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_minSgprAllocation(segment, 0L); } + /// {@return `minSgprAllocation` at the given index} + /// @param index the index + public @CType("uint32_t") int minSgprAllocationAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_minSgprAllocation(this.segment(), index); } + /// {@return `minSgprAllocation`} + public @CType("uint32_t") int minSgprAllocation() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_minSgprAllocation(this.segment()); } + /// Sets `minSgprAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minSgprAllocation(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minSgprAllocation.set(segment, 0L, index, value); } + /// Sets `minSgprAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minSgprAllocation(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_minSgprAllocation(segment, 0L, value); } + /// Sets `minSgprAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD minSgprAllocationAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_minSgprAllocation(this.segment(), index, value); return this; } + /// Sets `minSgprAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD minSgprAllocation(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_minSgprAllocation(this.segment(), value); return this; } + + /// {@return `maxSgprAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSgprAllocation(MemorySegment segment, long index) { return (int) VH_maxSgprAllocation.get(segment, 0L, index); } + /// {@return `maxSgprAllocation`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSgprAllocation(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_maxSgprAllocation(segment, 0L); } + /// {@return `maxSgprAllocation` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSgprAllocationAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_maxSgprAllocation(this.segment(), index); } + /// {@return `maxSgprAllocation`} + public @CType("uint32_t") int maxSgprAllocation() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_maxSgprAllocation(this.segment()); } + /// Sets `maxSgprAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSgprAllocation(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSgprAllocation.set(segment, 0L, index, value); } + /// Sets `maxSgprAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSgprAllocation(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_maxSgprAllocation(segment, 0L, value); } + /// Sets `maxSgprAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD maxSgprAllocationAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_maxSgprAllocation(this.segment(), index, value); return this; } + /// Sets `maxSgprAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD maxSgprAllocation(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_maxSgprAllocation(this.segment(), value); return this; } + + /// {@return `sgprAllocationGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sgprAllocationGranularity(MemorySegment segment, long index) { return (int) VH_sgprAllocationGranularity.get(segment, 0L, index); } + /// {@return `sgprAllocationGranularity`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sgprAllocationGranularity(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_sgprAllocationGranularity(segment, 0L); } + /// {@return `sgprAllocationGranularity` at the given index} + /// @param index the index + public @CType("uint32_t") int sgprAllocationGranularityAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_sgprAllocationGranularity(this.segment(), index); } + /// {@return `sgprAllocationGranularity`} + public @CType("uint32_t") int sgprAllocationGranularity() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_sgprAllocationGranularity(this.segment()); } + /// Sets `sgprAllocationGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sgprAllocationGranularity(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sgprAllocationGranularity.set(segment, 0L, index, value); } + /// Sets `sgprAllocationGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sgprAllocationGranularity(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_sgprAllocationGranularity(segment, 0L, value); } + /// Sets `sgprAllocationGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD sgprAllocationGranularityAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_sgprAllocationGranularity(this.segment(), index, value); return this; } + /// Sets `sgprAllocationGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD sgprAllocationGranularity(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_sgprAllocationGranularity(this.segment(), value); return this; } + + /// {@return `vgprsPerSimd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vgprsPerSimd(MemorySegment segment, long index) { return (int) VH_vgprsPerSimd.get(segment, 0L, index); } + /// {@return `vgprsPerSimd`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vgprsPerSimd(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_vgprsPerSimd(segment, 0L); } + /// {@return `vgprsPerSimd` at the given index} + /// @param index the index + public @CType("uint32_t") int vgprsPerSimdAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_vgprsPerSimd(this.segment(), index); } + /// {@return `vgprsPerSimd`} + public @CType("uint32_t") int vgprsPerSimd() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_vgprsPerSimd(this.segment()); } + /// Sets `vgprsPerSimd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vgprsPerSimd(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vgprsPerSimd.set(segment, 0L, index, value); } + /// Sets `vgprsPerSimd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vgprsPerSimd(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_vgprsPerSimd(segment, 0L, value); } + /// Sets `vgprsPerSimd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD vgprsPerSimdAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_vgprsPerSimd(this.segment(), index, value); return this; } + /// Sets `vgprsPerSimd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD vgprsPerSimd(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_vgprsPerSimd(this.segment(), value); return this; } + + /// {@return `minVgprAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minVgprAllocation(MemorySegment segment, long index) { return (int) VH_minVgprAllocation.get(segment, 0L, index); } + /// {@return `minVgprAllocation`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minVgprAllocation(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_minVgprAllocation(segment, 0L); } + /// {@return `minVgprAllocation` at the given index} + /// @param index the index + public @CType("uint32_t") int minVgprAllocationAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_minVgprAllocation(this.segment(), index); } + /// {@return `minVgprAllocation`} + public @CType("uint32_t") int minVgprAllocation() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_minVgprAllocation(this.segment()); } + /// Sets `minVgprAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minVgprAllocation(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minVgprAllocation.set(segment, 0L, index, value); } + /// Sets `minVgprAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minVgprAllocation(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_minVgprAllocation(segment, 0L, value); } + /// Sets `minVgprAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD minVgprAllocationAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_minVgprAllocation(this.segment(), index, value); return this; } + /// Sets `minVgprAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD minVgprAllocation(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_minVgprAllocation(this.segment(), value); return this; } + + /// {@return `maxVgprAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVgprAllocation(MemorySegment segment, long index) { return (int) VH_maxVgprAllocation.get(segment, 0L, index); } + /// {@return `maxVgprAllocation`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVgprAllocation(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_maxVgprAllocation(segment, 0L); } + /// {@return `maxVgprAllocation` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVgprAllocationAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_maxVgprAllocation(this.segment(), index); } + /// {@return `maxVgprAllocation`} + public @CType("uint32_t") int maxVgprAllocation() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_maxVgprAllocation(this.segment()); } + /// Sets `maxVgprAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVgprAllocation(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVgprAllocation.set(segment, 0L, index, value); } + /// Sets `maxVgprAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVgprAllocation(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_maxVgprAllocation(segment, 0L, value); } + /// Sets `maxVgprAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD maxVgprAllocationAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_maxVgprAllocation(this.segment(), index, value); return this; } + /// Sets `maxVgprAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD maxVgprAllocation(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_maxVgprAllocation(this.segment(), value); return this; } + + /// {@return `vgprAllocationGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vgprAllocationGranularity(MemorySegment segment, long index) { return (int) VH_vgprAllocationGranularity.get(segment, 0L, index); } + /// {@return `vgprAllocationGranularity`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vgprAllocationGranularity(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_vgprAllocationGranularity(segment, 0L); } + /// {@return `vgprAllocationGranularity` at the given index} + /// @param index the index + public @CType("uint32_t") int vgprAllocationGranularityAt(long index) { return VkPhysicalDeviceShaderCorePropertiesAMD.get_vgprAllocationGranularity(this.segment(), index); } + /// {@return `vgprAllocationGranularity`} + public @CType("uint32_t") int vgprAllocationGranularity() { return VkPhysicalDeviceShaderCorePropertiesAMD.get_vgprAllocationGranularity(this.segment()); } + /// Sets `vgprAllocationGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vgprAllocationGranularity(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vgprAllocationGranularity.set(segment, 0L, index, value); } + /// Sets `vgprAllocationGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vgprAllocationGranularity(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_vgprAllocationGranularity(segment, 0L, value); } + /// Sets `vgprAllocationGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD vgprAllocationGranularityAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_vgprAllocationGranularity(this.segment(), index, value); return this; } + /// Sets `vgprAllocationGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesAMD vgprAllocationGranularity(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesAMD.set_vgprAllocationGranularity(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.java new file mode 100644 index 00000000..776737b6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderEarlyAndLateFragmentTests +/// [VarHandle][#VH_shaderEarlyAndLateFragmentTests] - [Getter][#shaderEarlyAndLateFragmentTests()] - [Setter][#shaderEarlyAndLateFragmentTests(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderEarlyAndLateFragmentTests; +/// } VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; +/// ``` +public final class VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderEarlyAndLateFragmentTests") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderEarlyAndLateFragmentTests` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderEarlyAndLateFragmentTests = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderEarlyAndLateFragmentTests")); + + /// Creates `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD(segment); } + + /// Creates `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD` + public static VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD` + public static VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderEarlyAndLateFragmentTests` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderEarlyAndLateFragmentTests(MemorySegment segment, long index) { return (int) VH_shaderEarlyAndLateFragmentTests.get(segment, 0L, index); } + /// {@return `shaderEarlyAndLateFragmentTests`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderEarlyAndLateFragmentTests(MemorySegment segment) { return VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.get_shaderEarlyAndLateFragmentTests(segment, 0L); } + /// {@return `shaderEarlyAndLateFragmentTests` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderEarlyAndLateFragmentTestsAt(long index) { return VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.get_shaderEarlyAndLateFragmentTests(this.segment(), index); } + /// {@return `shaderEarlyAndLateFragmentTests`} + public @CType("VkBool32") int shaderEarlyAndLateFragmentTests() { return VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.get_shaderEarlyAndLateFragmentTests(this.segment()); } + /// Sets `shaderEarlyAndLateFragmentTests` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderEarlyAndLateFragmentTests(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderEarlyAndLateFragmentTests.set(segment, 0L, index, value); } + /// Sets `shaderEarlyAndLateFragmentTests` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderEarlyAndLateFragmentTests(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.set_shaderEarlyAndLateFragmentTests(segment, 0L, value); } + /// Sets `shaderEarlyAndLateFragmentTests` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD shaderEarlyAndLateFragmentTestsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.set_shaderEarlyAndLateFragmentTests(this.segment(), index, value); return this; } + /// Sets `shaderEarlyAndLateFragmentTests` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD shaderEarlyAndLateFragmentTests(@CType("VkBool32") int value) { VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.set_shaderEarlyAndLateFragmentTests(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPipelineCompilerControlCreateInfoAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPipelineCompilerControlCreateInfoAMD.java new file mode 100644 index 00000000..56cb4577 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPipelineCompilerControlCreateInfoAMD.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### compilerControlFlags +/// [VarHandle][#VH_compilerControlFlags] - [Getter][#compilerControlFlags()] - [Setter][#compilerControlFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCompilerControlCreateInfoAMD { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCompilerControlFlagsAMD compilerControlFlags; +/// } VkPipelineCompilerControlCreateInfoAMD; +/// ``` +public final class VkPipelineCompilerControlCreateInfoAMD extends Struct { + /// The struct layout of `VkPipelineCompilerControlCreateInfoAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("compilerControlFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `compilerControlFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compilerControlFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compilerControlFlags")); + + /// Creates `VkPipelineCompilerControlCreateInfoAMD` with the given segment. + /// @param segment the memory segment + public VkPipelineCompilerControlCreateInfoAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCompilerControlCreateInfoAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCompilerControlCreateInfoAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCompilerControlCreateInfoAMD(segment); } + + /// Creates `VkPipelineCompilerControlCreateInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCompilerControlCreateInfoAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCompilerControlCreateInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCompilerControlCreateInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCompilerControlCreateInfoAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCompilerControlCreateInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCompilerControlCreateInfoAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCompilerControlCreateInfoAMD` + public static VkPipelineCompilerControlCreateInfoAMD alloc(SegmentAllocator allocator) { return new VkPipelineCompilerControlCreateInfoAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCompilerControlCreateInfoAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCompilerControlCreateInfoAMD` + public static VkPipelineCompilerControlCreateInfoAMD alloc(SegmentAllocator allocator, long count) { return new VkPipelineCompilerControlCreateInfoAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineCompilerControlCreateInfoAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineCompilerControlCreateInfoAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineCompilerControlCreateInfoAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineCompilerControlCreateInfoAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCompilerControlCreateInfoAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineCompilerControlCreateInfoAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCompilerControlCreateInfoAMD sType(@CType("VkStructureType") int value) { VkPipelineCompilerControlCreateInfoAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineCompilerControlCreateInfoAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineCompilerControlCreateInfoAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineCompilerControlCreateInfoAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCompilerControlCreateInfoAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCompilerControlCreateInfoAMD pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCompilerControlCreateInfoAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCompilerControlCreateInfoAMD pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCompilerControlCreateInfoAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `compilerControlFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCompilerControlFlagsAMD") int get_compilerControlFlags(MemorySegment segment, long index) { return (int) VH_compilerControlFlags.get(segment, 0L, index); } + /// {@return `compilerControlFlags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCompilerControlFlagsAMD") int get_compilerControlFlags(MemorySegment segment) { return VkPipelineCompilerControlCreateInfoAMD.get_compilerControlFlags(segment, 0L); } + /// {@return `compilerControlFlags` at the given index} + /// @param index the index + public @CType("VkPipelineCompilerControlFlagsAMD") int compilerControlFlagsAt(long index) { return VkPipelineCompilerControlCreateInfoAMD.get_compilerControlFlags(this.segment(), index); } + /// {@return `compilerControlFlags`} + public @CType("VkPipelineCompilerControlFlagsAMD") int compilerControlFlags() { return VkPipelineCompilerControlCreateInfoAMD.get_compilerControlFlags(this.segment()); } + /// Sets `compilerControlFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compilerControlFlags(MemorySegment segment, long index, @CType("VkPipelineCompilerControlFlagsAMD") int value) { VH_compilerControlFlags.set(segment, 0L, index, value); } + /// Sets `compilerControlFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compilerControlFlags(MemorySegment segment, @CType("VkPipelineCompilerControlFlagsAMD") int value) { VkPipelineCompilerControlCreateInfoAMD.set_compilerControlFlags(segment, 0L, value); } + /// Sets `compilerControlFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCompilerControlCreateInfoAMD compilerControlFlagsAt(long index, @CType("VkPipelineCompilerControlFlagsAMD") int value) { VkPipelineCompilerControlCreateInfoAMD.set_compilerControlFlags(this.segment(), index, value); return this; } + /// Sets `compilerControlFlags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCompilerControlCreateInfoAMD compilerControlFlags(@CType("VkPipelineCompilerControlFlagsAMD") int value) { VkPipelineCompilerControlCreateInfoAMD.set_compilerControlFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPipelineRasterizationStateRasterizationOrderAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPipelineRasterizationStateRasterizationOrderAMD.java new file mode 100644 index 00000000..0382f4f3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkPipelineRasterizationStateRasterizationOrderAMD.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rasterizationOrder +/// [VarHandle][#VH_rasterizationOrder] - [Getter][#rasterizationOrder()] - [Setter][#rasterizationOrder(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineRasterizationStateRasterizationOrderAMD { +/// VkStructureType sType; +/// const void * pNext; +/// VkRasterizationOrderAMD rasterizationOrder; +/// } VkPipelineRasterizationStateRasterizationOrderAMD; +/// ``` +public final class VkPipelineRasterizationStateRasterizationOrderAMD extends Struct { + /// The struct layout of `VkPipelineRasterizationStateRasterizationOrderAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rasterizationOrder") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rasterizationOrder` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rasterizationOrder = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rasterizationOrder")); + + /// Creates `VkPipelineRasterizationStateRasterizationOrderAMD` with the given segment. + /// @param segment the memory segment + public VkPipelineRasterizationStateRasterizationOrderAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineRasterizationStateRasterizationOrderAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationStateRasterizationOrderAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationStateRasterizationOrderAMD(segment); } + + /// Creates `VkPipelineRasterizationStateRasterizationOrderAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationStateRasterizationOrderAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationStateRasterizationOrderAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineRasterizationStateRasterizationOrderAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationStateRasterizationOrderAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationStateRasterizationOrderAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineRasterizationStateRasterizationOrderAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineRasterizationStateRasterizationOrderAMD` + public static VkPipelineRasterizationStateRasterizationOrderAMD alloc(SegmentAllocator allocator) { return new VkPipelineRasterizationStateRasterizationOrderAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineRasterizationStateRasterizationOrderAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineRasterizationStateRasterizationOrderAMD` + public static VkPipelineRasterizationStateRasterizationOrderAMD alloc(SegmentAllocator allocator, long count) { return new VkPipelineRasterizationStateRasterizationOrderAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineRasterizationStateRasterizationOrderAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineRasterizationStateRasterizationOrderAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineRasterizationStateRasterizationOrderAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineRasterizationStateRasterizationOrderAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateRasterizationOrderAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineRasterizationStateRasterizationOrderAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateRasterizationOrderAMD sType(@CType("VkStructureType") int value) { VkPipelineRasterizationStateRasterizationOrderAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineRasterizationStateRasterizationOrderAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineRasterizationStateRasterizationOrderAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineRasterizationStateRasterizationOrderAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationStateRasterizationOrderAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateRasterizationOrderAMD pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationStateRasterizationOrderAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateRasterizationOrderAMD pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationStateRasterizationOrderAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `rasterizationOrder` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRasterizationOrderAMD") int get_rasterizationOrder(MemorySegment segment, long index) { return (int) VH_rasterizationOrder.get(segment, 0L, index); } + /// {@return `rasterizationOrder`} + /// @param segment the segment of the struct + public static @CType("VkRasterizationOrderAMD") int get_rasterizationOrder(MemorySegment segment) { return VkPipelineRasterizationStateRasterizationOrderAMD.get_rasterizationOrder(segment, 0L); } + /// {@return `rasterizationOrder` at the given index} + /// @param index the index + public @CType("VkRasterizationOrderAMD") int rasterizationOrderAt(long index) { return VkPipelineRasterizationStateRasterizationOrderAMD.get_rasterizationOrder(this.segment(), index); } + /// {@return `rasterizationOrder`} + public @CType("VkRasterizationOrderAMD") int rasterizationOrder() { return VkPipelineRasterizationStateRasterizationOrderAMD.get_rasterizationOrder(this.segment()); } + /// Sets `rasterizationOrder` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rasterizationOrder(MemorySegment segment, long index, @CType("VkRasterizationOrderAMD") int value) { VH_rasterizationOrder.set(segment, 0L, index, value); } + /// Sets `rasterizationOrder` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rasterizationOrder(MemorySegment segment, @CType("VkRasterizationOrderAMD") int value) { VkPipelineRasterizationStateRasterizationOrderAMD.set_rasterizationOrder(segment, 0L, value); } + /// Sets `rasterizationOrder` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateRasterizationOrderAMD rasterizationOrderAt(long index, @CType("VkRasterizationOrderAMD") int value) { VkPipelineRasterizationStateRasterizationOrderAMD.set_rasterizationOrder(this.segment(), index, value); return this; } + /// Sets `rasterizationOrder` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateRasterizationOrderAMD rasterizationOrder(@CType("VkRasterizationOrderAMD") int value) { VkPipelineRasterizationStateRasterizationOrderAMD.set_rasterizationOrder(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkShaderResourceUsageAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkShaderResourceUsageAMD.java new file mode 100644 index 00000000..db3988c5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkShaderResourceUsageAMD.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### numUsedVgprs +/// [VarHandle][#VH_numUsedVgprs] - [Getter][#numUsedVgprs()] - [Setter][#numUsedVgprs(int)] +/// ### numUsedSgprs +/// [VarHandle][#VH_numUsedSgprs] - [Getter][#numUsedSgprs()] - [Setter][#numUsedSgprs(int)] +/// ### ldsSizePerLocalWorkGroup +/// [VarHandle][#VH_ldsSizePerLocalWorkGroup] - [Getter][#ldsSizePerLocalWorkGroup()] - [Setter][#ldsSizePerLocalWorkGroup(int)] +/// ### ldsUsageSizeInBytes +/// [VarHandle][#VH_ldsUsageSizeInBytes] - [Getter][#ldsUsageSizeInBytes()] - [Setter][#ldsUsageSizeInBytes(long)] +/// ### scratchMemUsageInBytes +/// [VarHandle][#VH_scratchMemUsageInBytes] - [Getter][#scratchMemUsageInBytes()] - [Setter][#scratchMemUsageInBytes(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkShaderResourceUsageAMD { +/// uint32_t numUsedVgprs; +/// uint32_t numUsedSgprs; +/// uint32_t ldsSizePerLocalWorkGroup; +/// size_t ldsUsageSizeInBytes; +/// size_t scratchMemUsageInBytes; +/// } VkShaderResourceUsageAMD; +/// ``` +public final class VkShaderResourceUsageAMD extends Struct { + /// The struct layout of `VkShaderResourceUsageAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("numUsedVgprs"), + ValueLayout.JAVA_INT.withName("numUsedSgprs"), + ValueLayout.JAVA_INT.withName("ldsSizePerLocalWorkGroup"), + ValueLayout.JAVA_LONG.withName("ldsUsageSizeInBytes"), + ValueLayout.JAVA_LONG.withName("scratchMemUsageInBytes") + ); + /// The [VarHandle] of `numUsedVgprs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_numUsedVgprs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("numUsedVgprs")); + /// The [VarHandle] of `numUsedSgprs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_numUsedSgprs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("numUsedSgprs")); + /// The [VarHandle] of `ldsSizePerLocalWorkGroup` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ldsSizePerLocalWorkGroup = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ldsSizePerLocalWorkGroup")); + /// The [VarHandle] of `ldsUsageSizeInBytes` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_ldsUsageSizeInBytes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ldsUsageSizeInBytes")); + /// The [VarHandle] of `scratchMemUsageInBytes` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_scratchMemUsageInBytes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scratchMemUsageInBytes")); + + /// Creates `VkShaderResourceUsageAMD` with the given segment. + /// @param segment the memory segment + public VkShaderResourceUsageAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkShaderResourceUsageAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderResourceUsageAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderResourceUsageAMD(segment); } + + /// Creates `VkShaderResourceUsageAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderResourceUsageAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderResourceUsageAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkShaderResourceUsageAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderResourceUsageAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderResourceUsageAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkShaderResourceUsageAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkShaderResourceUsageAMD` + public static VkShaderResourceUsageAMD alloc(SegmentAllocator allocator) { return new VkShaderResourceUsageAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkShaderResourceUsageAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkShaderResourceUsageAMD` + public static VkShaderResourceUsageAMD alloc(SegmentAllocator allocator, long count) { return new VkShaderResourceUsageAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `numUsedVgprs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_numUsedVgprs(MemorySegment segment, long index) { return (int) VH_numUsedVgprs.get(segment, 0L, index); } + /// {@return `numUsedVgprs`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_numUsedVgprs(MemorySegment segment) { return VkShaderResourceUsageAMD.get_numUsedVgprs(segment, 0L); } + /// {@return `numUsedVgprs` at the given index} + /// @param index the index + public @CType("uint32_t") int numUsedVgprsAt(long index) { return VkShaderResourceUsageAMD.get_numUsedVgprs(this.segment(), index); } + /// {@return `numUsedVgprs`} + public @CType("uint32_t") int numUsedVgprs() { return VkShaderResourceUsageAMD.get_numUsedVgprs(this.segment()); } + /// Sets `numUsedVgprs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_numUsedVgprs(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_numUsedVgprs.set(segment, 0L, index, value); } + /// Sets `numUsedVgprs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_numUsedVgprs(MemorySegment segment, @CType("uint32_t") int value) { VkShaderResourceUsageAMD.set_numUsedVgprs(segment, 0L, value); } + /// Sets `numUsedVgprs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderResourceUsageAMD numUsedVgprsAt(long index, @CType("uint32_t") int value) { VkShaderResourceUsageAMD.set_numUsedVgprs(this.segment(), index, value); return this; } + /// Sets `numUsedVgprs` with the given value. + /// @param value the value + /// @return `this` + public VkShaderResourceUsageAMD numUsedVgprs(@CType("uint32_t") int value) { VkShaderResourceUsageAMD.set_numUsedVgprs(this.segment(), value); return this; } + + /// {@return `numUsedSgprs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_numUsedSgprs(MemorySegment segment, long index) { return (int) VH_numUsedSgprs.get(segment, 0L, index); } + /// {@return `numUsedSgprs`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_numUsedSgprs(MemorySegment segment) { return VkShaderResourceUsageAMD.get_numUsedSgprs(segment, 0L); } + /// {@return `numUsedSgprs` at the given index} + /// @param index the index + public @CType("uint32_t") int numUsedSgprsAt(long index) { return VkShaderResourceUsageAMD.get_numUsedSgprs(this.segment(), index); } + /// {@return `numUsedSgprs`} + public @CType("uint32_t") int numUsedSgprs() { return VkShaderResourceUsageAMD.get_numUsedSgprs(this.segment()); } + /// Sets `numUsedSgprs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_numUsedSgprs(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_numUsedSgprs.set(segment, 0L, index, value); } + /// Sets `numUsedSgprs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_numUsedSgprs(MemorySegment segment, @CType("uint32_t") int value) { VkShaderResourceUsageAMD.set_numUsedSgprs(segment, 0L, value); } + /// Sets `numUsedSgprs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderResourceUsageAMD numUsedSgprsAt(long index, @CType("uint32_t") int value) { VkShaderResourceUsageAMD.set_numUsedSgprs(this.segment(), index, value); return this; } + /// Sets `numUsedSgprs` with the given value. + /// @param value the value + /// @return `this` + public VkShaderResourceUsageAMD numUsedSgprs(@CType("uint32_t") int value) { VkShaderResourceUsageAMD.set_numUsedSgprs(this.segment(), value); return this; } + + /// {@return `ldsSizePerLocalWorkGroup` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_ldsSizePerLocalWorkGroup(MemorySegment segment, long index) { return (int) VH_ldsSizePerLocalWorkGroup.get(segment, 0L, index); } + /// {@return `ldsSizePerLocalWorkGroup`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_ldsSizePerLocalWorkGroup(MemorySegment segment) { return VkShaderResourceUsageAMD.get_ldsSizePerLocalWorkGroup(segment, 0L); } + /// {@return `ldsSizePerLocalWorkGroup` at the given index} + /// @param index the index + public @CType("uint32_t") int ldsSizePerLocalWorkGroupAt(long index) { return VkShaderResourceUsageAMD.get_ldsSizePerLocalWorkGroup(this.segment(), index); } + /// {@return `ldsSizePerLocalWorkGroup`} + public @CType("uint32_t") int ldsSizePerLocalWorkGroup() { return VkShaderResourceUsageAMD.get_ldsSizePerLocalWorkGroup(this.segment()); } + /// Sets `ldsSizePerLocalWorkGroup` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ldsSizePerLocalWorkGroup(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_ldsSizePerLocalWorkGroup.set(segment, 0L, index, value); } + /// Sets `ldsSizePerLocalWorkGroup` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ldsSizePerLocalWorkGroup(MemorySegment segment, @CType("uint32_t") int value) { VkShaderResourceUsageAMD.set_ldsSizePerLocalWorkGroup(segment, 0L, value); } + /// Sets `ldsSizePerLocalWorkGroup` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderResourceUsageAMD ldsSizePerLocalWorkGroupAt(long index, @CType("uint32_t") int value) { VkShaderResourceUsageAMD.set_ldsSizePerLocalWorkGroup(this.segment(), index, value); return this; } + /// Sets `ldsSizePerLocalWorkGroup` with the given value. + /// @param value the value + /// @return `this` + public VkShaderResourceUsageAMD ldsSizePerLocalWorkGroup(@CType("uint32_t") int value) { VkShaderResourceUsageAMD.set_ldsSizePerLocalWorkGroup(this.segment(), value); return this; } + + /// {@return `ldsUsageSizeInBytes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_ldsUsageSizeInBytes(MemorySegment segment, long index) { return (long) VH_ldsUsageSizeInBytes.get(segment, 0L, index); } + /// {@return `ldsUsageSizeInBytes`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_ldsUsageSizeInBytes(MemorySegment segment) { return VkShaderResourceUsageAMD.get_ldsUsageSizeInBytes(segment, 0L); } + /// {@return `ldsUsageSizeInBytes` at the given index} + /// @param index the index + public @CType("size_t") long ldsUsageSizeInBytesAt(long index) { return VkShaderResourceUsageAMD.get_ldsUsageSizeInBytes(this.segment(), index); } + /// {@return `ldsUsageSizeInBytes`} + public @CType("size_t") long ldsUsageSizeInBytes() { return VkShaderResourceUsageAMD.get_ldsUsageSizeInBytes(this.segment()); } + /// Sets `ldsUsageSizeInBytes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ldsUsageSizeInBytes(MemorySegment segment, long index, @CType("size_t") long value) { VH_ldsUsageSizeInBytes.set(segment, 0L, index, value); } + /// Sets `ldsUsageSizeInBytes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ldsUsageSizeInBytes(MemorySegment segment, @CType("size_t") long value) { VkShaderResourceUsageAMD.set_ldsUsageSizeInBytes(segment, 0L, value); } + /// Sets `ldsUsageSizeInBytes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderResourceUsageAMD ldsUsageSizeInBytesAt(long index, @CType("size_t") long value) { VkShaderResourceUsageAMD.set_ldsUsageSizeInBytes(this.segment(), index, value); return this; } + /// Sets `ldsUsageSizeInBytes` with the given value. + /// @param value the value + /// @return `this` + public VkShaderResourceUsageAMD ldsUsageSizeInBytes(@CType("size_t") long value) { VkShaderResourceUsageAMD.set_ldsUsageSizeInBytes(this.segment(), value); return this; } + + /// {@return `scratchMemUsageInBytes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_scratchMemUsageInBytes(MemorySegment segment, long index) { return (long) VH_scratchMemUsageInBytes.get(segment, 0L, index); } + /// {@return `scratchMemUsageInBytes`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_scratchMemUsageInBytes(MemorySegment segment) { return VkShaderResourceUsageAMD.get_scratchMemUsageInBytes(segment, 0L); } + /// {@return `scratchMemUsageInBytes` at the given index} + /// @param index the index + public @CType("size_t") long scratchMemUsageInBytesAt(long index) { return VkShaderResourceUsageAMD.get_scratchMemUsageInBytes(this.segment(), index); } + /// {@return `scratchMemUsageInBytes`} + public @CType("size_t") long scratchMemUsageInBytes() { return VkShaderResourceUsageAMD.get_scratchMemUsageInBytes(this.segment()); } + /// Sets `scratchMemUsageInBytes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scratchMemUsageInBytes(MemorySegment segment, long index, @CType("size_t") long value) { VH_scratchMemUsageInBytes.set(segment, 0L, index, value); } + /// Sets `scratchMemUsageInBytes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scratchMemUsageInBytes(MemorySegment segment, @CType("size_t") long value) { VkShaderResourceUsageAMD.set_scratchMemUsageInBytes(segment, 0L, value); } + /// Sets `scratchMemUsageInBytes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderResourceUsageAMD scratchMemUsageInBytesAt(long index, @CType("size_t") long value) { VkShaderResourceUsageAMD.set_scratchMemUsageInBytes(this.segment(), index, value); return this; } + /// Sets `scratchMemUsageInBytes` with the given value. + /// @param value the value + /// @return `this` + public VkShaderResourceUsageAMD scratchMemUsageInBytes(@CType("size_t") long value) { VkShaderResourceUsageAMD.set_scratchMemUsageInBytes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkShaderStatisticsInfoAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkShaderStatisticsInfoAMD.java new file mode 100644 index 00000000..a7b0c05c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkShaderStatisticsInfoAMD.java @@ -0,0 +1,335 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### shaderStageMask +/// [VarHandle][#VH_shaderStageMask] - [Getter][#shaderStageMask()] - [Setter][#shaderStageMask(int)] +/// ### resourceUsage +/// [Byte offset][#OFFSET_resourceUsage] - [Memory layout][#ML_resourceUsage] - [Getter][#resourceUsage()] - [Setter][#resourceUsage(java.lang.foreign.MemorySegment)] +/// ### numPhysicalVgprs +/// [VarHandle][#VH_numPhysicalVgprs] - [Getter][#numPhysicalVgprs()] - [Setter][#numPhysicalVgprs(int)] +/// ### numPhysicalSgprs +/// [VarHandle][#VH_numPhysicalSgprs] - [Getter][#numPhysicalSgprs()] - [Setter][#numPhysicalSgprs(int)] +/// ### numAvailableVgprs +/// [VarHandle][#VH_numAvailableVgprs] - [Getter][#numAvailableVgprs()] - [Setter][#numAvailableVgprs(int)] +/// ### numAvailableSgprs +/// [VarHandle][#VH_numAvailableSgprs] - [Getter][#numAvailableSgprs()] - [Setter][#numAvailableSgprs(int)] +/// ### computeWorkGroupSize +/// [VarHandle][#VH_computeWorkGroupSize] - [Getter][#computeWorkGroupSize()] - [Setter][#computeWorkGroupSize(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkShaderStatisticsInfoAMD { +/// VkShaderStageFlags shaderStageMask; +/// VkShaderResourceUsageAMD resourceUsage; +/// uint32_t numPhysicalVgprs; +/// uint32_t numPhysicalSgprs; +/// uint32_t numAvailableVgprs; +/// uint32_t numAvailableSgprs; +/// uint32_t computeWorkGroupSize; +/// } VkShaderStatisticsInfoAMD; +/// ``` +public final class VkShaderStatisticsInfoAMD extends Struct { + /// The struct layout of `VkShaderStatisticsInfoAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("shaderStageMask"), + overrungl.vulkan.amd.struct.VkShaderResourceUsageAMD.LAYOUT.withName("resourceUsage"), + ValueLayout.JAVA_INT.withName("numPhysicalVgprs"), + ValueLayout.JAVA_INT.withName("numPhysicalSgprs"), + ValueLayout.JAVA_INT.withName("numAvailableVgprs"), + ValueLayout.JAVA_INT.withName("numAvailableSgprs"), + ValueLayout.JAVA_INT.withName("computeWorkGroupSize") + ); + /// The [VarHandle] of `shaderStageMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStageMask")); + /// The byte offset of `resourceUsage`. + public static final long OFFSET_resourceUsage = LAYOUT.byteOffset(PathElement.groupElement("resourceUsage")); + /// The memory layout of `resourceUsage`. + public static final MemoryLayout ML_resourceUsage = LAYOUT.select(PathElement.groupElement("resourceUsage")); + /// The [VarHandle] of `numPhysicalVgprs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_numPhysicalVgprs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("numPhysicalVgprs")); + /// The [VarHandle] of `numPhysicalSgprs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_numPhysicalSgprs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("numPhysicalSgprs")); + /// The [VarHandle] of `numAvailableVgprs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_numAvailableVgprs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("numAvailableVgprs")); + /// The [VarHandle] of `numAvailableSgprs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_numAvailableSgprs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("numAvailableSgprs")); + /// The [VarHandle] of `computeWorkGroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_computeWorkGroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("computeWorkGroupSize")); + + /// Creates `VkShaderStatisticsInfoAMD` with the given segment. + /// @param segment the memory segment + public VkShaderStatisticsInfoAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkShaderStatisticsInfoAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderStatisticsInfoAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderStatisticsInfoAMD(segment); } + + /// Creates `VkShaderStatisticsInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderStatisticsInfoAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderStatisticsInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkShaderStatisticsInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderStatisticsInfoAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderStatisticsInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkShaderStatisticsInfoAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkShaderStatisticsInfoAMD` + public static VkShaderStatisticsInfoAMD alloc(SegmentAllocator allocator) { return new VkShaderStatisticsInfoAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkShaderStatisticsInfoAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkShaderStatisticsInfoAMD` + public static VkShaderStatisticsInfoAMD alloc(SegmentAllocator allocator, long count) { return new VkShaderStatisticsInfoAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `shaderStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_shaderStageMask(MemorySegment segment, long index) { return (int) VH_shaderStageMask.get(segment, 0L, index); } + /// {@return `shaderStageMask`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_shaderStageMask(MemorySegment segment) { return VkShaderStatisticsInfoAMD.get_shaderStageMask(segment, 0L); } + /// {@return `shaderStageMask` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int shaderStageMaskAt(long index) { return VkShaderStatisticsInfoAMD.get_shaderStageMask(this.segment(), index); } + /// {@return `shaderStageMask`} + public @CType("VkShaderStageFlags") int shaderStageMask() { return VkShaderStatisticsInfoAMD.get_shaderStageMask(this.segment()); } + /// Sets `shaderStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStageMask(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_shaderStageMask.set(segment, 0L, index, value); } + /// Sets `shaderStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStageMask(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkShaderStatisticsInfoAMD.set_shaderStageMask(segment, 0L, value); } + /// Sets `shaderStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD shaderStageMaskAt(long index, @CType("VkShaderStageFlags") int value) { VkShaderStatisticsInfoAMD.set_shaderStageMask(this.segment(), index, value); return this; } + /// Sets `shaderStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD shaderStageMask(@CType("VkShaderStageFlags") int value) { VkShaderStatisticsInfoAMD.set_shaderStageMask(this.segment(), value); return this; } + + /// {@return `resourceUsage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderResourceUsageAMD") java.lang.foreign.MemorySegment get_resourceUsage(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_resourceUsage, index), ML_resourceUsage); } + /// {@return `resourceUsage`} + /// @param segment the segment of the struct + public static @CType("VkShaderResourceUsageAMD") java.lang.foreign.MemorySegment get_resourceUsage(MemorySegment segment) { return VkShaderStatisticsInfoAMD.get_resourceUsage(segment, 0L); } + /// {@return `resourceUsage` at the given index} + /// @param index the index + public @CType("VkShaderResourceUsageAMD") java.lang.foreign.MemorySegment resourceUsageAt(long index) { return VkShaderStatisticsInfoAMD.get_resourceUsage(this.segment(), index); } + /// {@return `resourceUsage`} + public @CType("VkShaderResourceUsageAMD") java.lang.foreign.MemorySegment resourceUsage() { return VkShaderStatisticsInfoAMD.get_resourceUsage(this.segment()); } + /// Sets `resourceUsage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_resourceUsage(MemorySegment segment, long index, @CType("VkShaderResourceUsageAMD") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_resourceUsage, index), ML_resourceUsage.byteSize()); } + /// Sets `resourceUsage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_resourceUsage(MemorySegment segment, @CType("VkShaderResourceUsageAMD") java.lang.foreign.MemorySegment value) { VkShaderStatisticsInfoAMD.set_resourceUsage(segment, 0L, value); } + /// Sets `resourceUsage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD resourceUsageAt(long index, @CType("VkShaderResourceUsageAMD") java.lang.foreign.MemorySegment value) { VkShaderStatisticsInfoAMD.set_resourceUsage(this.segment(), index, value); return this; } + /// Sets `resourceUsage` with the given value. + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD resourceUsage(@CType("VkShaderResourceUsageAMD") java.lang.foreign.MemorySegment value) { VkShaderStatisticsInfoAMD.set_resourceUsage(this.segment(), value); return this; } + + /// {@return `numPhysicalVgprs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_numPhysicalVgprs(MemorySegment segment, long index) { return (int) VH_numPhysicalVgprs.get(segment, 0L, index); } + /// {@return `numPhysicalVgprs`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_numPhysicalVgprs(MemorySegment segment) { return VkShaderStatisticsInfoAMD.get_numPhysicalVgprs(segment, 0L); } + /// {@return `numPhysicalVgprs` at the given index} + /// @param index the index + public @CType("uint32_t") int numPhysicalVgprsAt(long index) { return VkShaderStatisticsInfoAMD.get_numPhysicalVgprs(this.segment(), index); } + /// {@return `numPhysicalVgprs`} + public @CType("uint32_t") int numPhysicalVgprs() { return VkShaderStatisticsInfoAMD.get_numPhysicalVgprs(this.segment()); } + /// Sets `numPhysicalVgprs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_numPhysicalVgprs(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_numPhysicalVgprs.set(segment, 0L, index, value); } + /// Sets `numPhysicalVgprs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_numPhysicalVgprs(MemorySegment segment, @CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numPhysicalVgprs(segment, 0L, value); } + /// Sets `numPhysicalVgprs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD numPhysicalVgprsAt(long index, @CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numPhysicalVgprs(this.segment(), index, value); return this; } + /// Sets `numPhysicalVgprs` with the given value. + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD numPhysicalVgprs(@CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numPhysicalVgprs(this.segment(), value); return this; } + + /// {@return `numPhysicalSgprs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_numPhysicalSgprs(MemorySegment segment, long index) { return (int) VH_numPhysicalSgprs.get(segment, 0L, index); } + /// {@return `numPhysicalSgprs`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_numPhysicalSgprs(MemorySegment segment) { return VkShaderStatisticsInfoAMD.get_numPhysicalSgprs(segment, 0L); } + /// {@return `numPhysicalSgprs` at the given index} + /// @param index the index + public @CType("uint32_t") int numPhysicalSgprsAt(long index) { return VkShaderStatisticsInfoAMD.get_numPhysicalSgprs(this.segment(), index); } + /// {@return `numPhysicalSgprs`} + public @CType("uint32_t") int numPhysicalSgprs() { return VkShaderStatisticsInfoAMD.get_numPhysicalSgprs(this.segment()); } + /// Sets `numPhysicalSgprs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_numPhysicalSgprs(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_numPhysicalSgprs.set(segment, 0L, index, value); } + /// Sets `numPhysicalSgprs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_numPhysicalSgprs(MemorySegment segment, @CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numPhysicalSgprs(segment, 0L, value); } + /// Sets `numPhysicalSgprs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD numPhysicalSgprsAt(long index, @CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numPhysicalSgprs(this.segment(), index, value); return this; } + /// Sets `numPhysicalSgprs` with the given value. + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD numPhysicalSgprs(@CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numPhysicalSgprs(this.segment(), value); return this; } + + /// {@return `numAvailableVgprs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_numAvailableVgprs(MemorySegment segment, long index) { return (int) VH_numAvailableVgprs.get(segment, 0L, index); } + /// {@return `numAvailableVgprs`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_numAvailableVgprs(MemorySegment segment) { return VkShaderStatisticsInfoAMD.get_numAvailableVgprs(segment, 0L); } + /// {@return `numAvailableVgprs` at the given index} + /// @param index the index + public @CType("uint32_t") int numAvailableVgprsAt(long index) { return VkShaderStatisticsInfoAMD.get_numAvailableVgprs(this.segment(), index); } + /// {@return `numAvailableVgprs`} + public @CType("uint32_t") int numAvailableVgprs() { return VkShaderStatisticsInfoAMD.get_numAvailableVgprs(this.segment()); } + /// Sets `numAvailableVgprs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_numAvailableVgprs(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_numAvailableVgprs.set(segment, 0L, index, value); } + /// Sets `numAvailableVgprs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_numAvailableVgprs(MemorySegment segment, @CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numAvailableVgprs(segment, 0L, value); } + /// Sets `numAvailableVgprs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD numAvailableVgprsAt(long index, @CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numAvailableVgprs(this.segment(), index, value); return this; } + /// Sets `numAvailableVgprs` with the given value. + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD numAvailableVgprs(@CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numAvailableVgprs(this.segment(), value); return this; } + + /// {@return `numAvailableSgprs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_numAvailableSgprs(MemorySegment segment, long index) { return (int) VH_numAvailableSgprs.get(segment, 0L, index); } + /// {@return `numAvailableSgprs`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_numAvailableSgprs(MemorySegment segment) { return VkShaderStatisticsInfoAMD.get_numAvailableSgprs(segment, 0L); } + /// {@return `numAvailableSgprs` at the given index} + /// @param index the index + public @CType("uint32_t") int numAvailableSgprsAt(long index) { return VkShaderStatisticsInfoAMD.get_numAvailableSgprs(this.segment(), index); } + /// {@return `numAvailableSgprs`} + public @CType("uint32_t") int numAvailableSgprs() { return VkShaderStatisticsInfoAMD.get_numAvailableSgprs(this.segment()); } + /// Sets `numAvailableSgprs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_numAvailableSgprs(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_numAvailableSgprs.set(segment, 0L, index, value); } + /// Sets `numAvailableSgprs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_numAvailableSgprs(MemorySegment segment, @CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numAvailableSgprs(segment, 0L, value); } + /// Sets `numAvailableSgprs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD numAvailableSgprsAt(long index, @CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numAvailableSgprs(this.segment(), index, value); return this; } + /// Sets `numAvailableSgprs` with the given value. + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD numAvailableSgprs(@CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_numAvailableSgprs(this.segment(), value); return this; } + + /// {@return `computeWorkGroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_computeWorkGroupSize(MemorySegment segment, long index) { return (int) VH_computeWorkGroupSize.get(segment, 0L, index); } + /// {@return `computeWorkGroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_computeWorkGroupSize(MemorySegment segment) { return VkShaderStatisticsInfoAMD.get_computeWorkGroupSize(segment, 0L); } + /// {@return `computeWorkGroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int computeWorkGroupSizeAt(long index) { return VkShaderStatisticsInfoAMD.get_computeWorkGroupSize(this.segment(), index); } + /// {@return `computeWorkGroupSize`} + public @CType("uint32_t") int computeWorkGroupSize() { return VkShaderStatisticsInfoAMD.get_computeWorkGroupSize(this.segment()); } + /// Sets `computeWorkGroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_computeWorkGroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_computeWorkGroupSize.set(segment, 0L, index, value); } + /// Sets `computeWorkGroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_computeWorkGroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_computeWorkGroupSize(segment, 0L, value); } + /// Sets `computeWorkGroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD computeWorkGroupSizeAt(long index, @CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_computeWorkGroupSize(this.segment(), index, value); return this; } + /// Sets `computeWorkGroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkShaderStatisticsInfoAMD computeWorkGroupSize(@CType("uint32_t") int value) { VkShaderStatisticsInfoAMD.set_computeWorkGroupSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkSwapchainDisplayNativeHdrCreateInfoAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkSwapchainDisplayNativeHdrCreateInfoAMD.java new file mode 100644 index 00000000..3d5cff4f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkSwapchainDisplayNativeHdrCreateInfoAMD.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### localDimmingEnable +/// [VarHandle][#VH_localDimmingEnable] - [Getter][#localDimmingEnable()] - [Setter][#localDimmingEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSwapchainDisplayNativeHdrCreateInfoAMD { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 localDimmingEnable; +/// } VkSwapchainDisplayNativeHdrCreateInfoAMD; +/// ``` +public final class VkSwapchainDisplayNativeHdrCreateInfoAMD extends Struct { + /// The struct layout of `VkSwapchainDisplayNativeHdrCreateInfoAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("localDimmingEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `localDimmingEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_localDimmingEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("localDimmingEnable")); + + /// Creates `VkSwapchainDisplayNativeHdrCreateInfoAMD` with the given segment. + /// @param segment the memory segment + public VkSwapchainDisplayNativeHdrCreateInfoAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSwapchainDisplayNativeHdrCreateInfoAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainDisplayNativeHdrCreateInfoAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainDisplayNativeHdrCreateInfoAMD(segment); } + + /// Creates `VkSwapchainDisplayNativeHdrCreateInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainDisplayNativeHdrCreateInfoAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainDisplayNativeHdrCreateInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSwapchainDisplayNativeHdrCreateInfoAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainDisplayNativeHdrCreateInfoAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainDisplayNativeHdrCreateInfoAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSwapchainDisplayNativeHdrCreateInfoAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSwapchainDisplayNativeHdrCreateInfoAMD` + public static VkSwapchainDisplayNativeHdrCreateInfoAMD alloc(SegmentAllocator allocator) { return new VkSwapchainDisplayNativeHdrCreateInfoAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSwapchainDisplayNativeHdrCreateInfoAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSwapchainDisplayNativeHdrCreateInfoAMD` + public static VkSwapchainDisplayNativeHdrCreateInfoAMD alloc(SegmentAllocator allocator, long count) { return new VkSwapchainDisplayNativeHdrCreateInfoAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSwapchainDisplayNativeHdrCreateInfoAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSwapchainDisplayNativeHdrCreateInfoAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSwapchainDisplayNativeHdrCreateInfoAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSwapchainDisplayNativeHdrCreateInfoAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainDisplayNativeHdrCreateInfoAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkSwapchainDisplayNativeHdrCreateInfoAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainDisplayNativeHdrCreateInfoAMD sType(@CType("VkStructureType") int value) { VkSwapchainDisplayNativeHdrCreateInfoAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSwapchainDisplayNativeHdrCreateInfoAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSwapchainDisplayNativeHdrCreateInfoAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSwapchainDisplayNativeHdrCreateInfoAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainDisplayNativeHdrCreateInfoAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainDisplayNativeHdrCreateInfoAMD pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainDisplayNativeHdrCreateInfoAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainDisplayNativeHdrCreateInfoAMD pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainDisplayNativeHdrCreateInfoAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `localDimmingEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_localDimmingEnable(MemorySegment segment, long index) { return (int) VH_localDimmingEnable.get(segment, 0L, index); } + /// {@return `localDimmingEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_localDimmingEnable(MemorySegment segment) { return VkSwapchainDisplayNativeHdrCreateInfoAMD.get_localDimmingEnable(segment, 0L); } + /// {@return `localDimmingEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int localDimmingEnableAt(long index) { return VkSwapchainDisplayNativeHdrCreateInfoAMD.get_localDimmingEnable(this.segment(), index); } + /// {@return `localDimmingEnable`} + public @CType("VkBool32") int localDimmingEnable() { return VkSwapchainDisplayNativeHdrCreateInfoAMD.get_localDimmingEnable(this.segment()); } + /// Sets `localDimmingEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_localDimmingEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_localDimmingEnable.set(segment, 0L, index, value); } + /// Sets `localDimmingEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_localDimmingEnable(MemorySegment segment, @CType("VkBool32") int value) { VkSwapchainDisplayNativeHdrCreateInfoAMD.set_localDimmingEnable(segment, 0L, value); } + /// Sets `localDimmingEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainDisplayNativeHdrCreateInfoAMD localDimmingEnableAt(long index, @CType("VkBool32") int value) { VkSwapchainDisplayNativeHdrCreateInfoAMD.set_localDimmingEnable(this.segment(), index, value); return this; } + /// Sets `localDimmingEnable` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainDisplayNativeHdrCreateInfoAMD localDimmingEnable(@CType("VkBool32") int value) { VkSwapchainDisplayNativeHdrCreateInfoAMD.set_localDimmingEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkTextureLODGatherFormatPropertiesAMD.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkTextureLODGatherFormatPropertiesAMD.java new file mode 100644 index 00000000..cf5461ed --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amd/struct/VkTextureLODGatherFormatPropertiesAMD.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amd.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### supportsTextureGatherLODBiasAMD +/// [VarHandle][#VH_supportsTextureGatherLODBiasAMD] - [Getter][#supportsTextureGatherLODBiasAMD()] - [Setter][#supportsTextureGatherLODBiasAMD(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkTextureLODGatherFormatPropertiesAMD { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 supportsTextureGatherLODBiasAMD; +/// } VkTextureLODGatherFormatPropertiesAMD; +/// ``` +public final class VkTextureLODGatherFormatPropertiesAMD extends Struct { + /// The struct layout of `VkTextureLODGatherFormatPropertiesAMD`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("supportsTextureGatherLODBiasAMD") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `supportsTextureGatherLODBiasAMD` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportsTextureGatherLODBiasAMD = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportsTextureGatherLODBiasAMD")); + + /// Creates `VkTextureLODGatherFormatPropertiesAMD` with the given segment. + /// @param segment the memory segment + public VkTextureLODGatherFormatPropertiesAMD(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkTextureLODGatherFormatPropertiesAMD` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTextureLODGatherFormatPropertiesAMD of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTextureLODGatherFormatPropertiesAMD(segment); } + + /// Creates `VkTextureLODGatherFormatPropertiesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTextureLODGatherFormatPropertiesAMD ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTextureLODGatherFormatPropertiesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkTextureLODGatherFormatPropertiesAMD` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkTextureLODGatherFormatPropertiesAMD ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkTextureLODGatherFormatPropertiesAMD(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkTextureLODGatherFormatPropertiesAMD` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkTextureLODGatherFormatPropertiesAMD` + public static VkTextureLODGatherFormatPropertiesAMD alloc(SegmentAllocator allocator) { return new VkTextureLODGatherFormatPropertiesAMD(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkTextureLODGatherFormatPropertiesAMD` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkTextureLODGatherFormatPropertiesAMD` + public static VkTextureLODGatherFormatPropertiesAMD alloc(SegmentAllocator allocator, long count) { return new VkTextureLODGatherFormatPropertiesAMD(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkTextureLODGatherFormatPropertiesAMD.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkTextureLODGatherFormatPropertiesAMD.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkTextureLODGatherFormatPropertiesAMD.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkTextureLODGatherFormatPropertiesAMD.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTextureLODGatherFormatPropertiesAMD sTypeAt(long index, @CType("VkStructureType") int value) { VkTextureLODGatherFormatPropertiesAMD.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkTextureLODGatherFormatPropertiesAMD sType(@CType("VkStructureType") int value) { VkTextureLODGatherFormatPropertiesAMD.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkTextureLODGatherFormatPropertiesAMD.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkTextureLODGatherFormatPropertiesAMD.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkTextureLODGatherFormatPropertiesAMD.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkTextureLODGatherFormatPropertiesAMD.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTextureLODGatherFormatPropertiesAMD pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkTextureLODGatherFormatPropertiesAMD.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkTextureLODGatherFormatPropertiesAMD pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkTextureLODGatherFormatPropertiesAMD.set_pNext(this.segment(), value); return this; } + + /// {@return `supportsTextureGatherLODBiasAMD` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_supportsTextureGatherLODBiasAMD(MemorySegment segment, long index) { return (int) VH_supportsTextureGatherLODBiasAMD.get(segment, 0L, index); } + /// {@return `supportsTextureGatherLODBiasAMD`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_supportsTextureGatherLODBiasAMD(MemorySegment segment) { return VkTextureLODGatherFormatPropertiesAMD.get_supportsTextureGatherLODBiasAMD(segment, 0L); } + /// {@return `supportsTextureGatherLODBiasAMD` at the given index} + /// @param index the index + public @CType("VkBool32") int supportsTextureGatherLODBiasAMDAt(long index) { return VkTextureLODGatherFormatPropertiesAMD.get_supportsTextureGatherLODBiasAMD(this.segment(), index); } + /// {@return `supportsTextureGatherLODBiasAMD`} + public @CType("VkBool32") int supportsTextureGatherLODBiasAMD() { return VkTextureLODGatherFormatPropertiesAMD.get_supportsTextureGatherLODBiasAMD(this.segment()); } + /// Sets `supportsTextureGatherLODBiasAMD` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportsTextureGatherLODBiasAMD(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_supportsTextureGatherLODBiasAMD.set(segment, 0L, index, value); } + /// Sets `supportsTextureGatherLODBiasAMD` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportsTextureGatherLODBiasAMD(MemorySegment segment, @CType("VkBool32") int value) { VkTextureLODGatherFormatPropertiesAMD.set_supportsTextureGatherLODBiasAMD(segment, 0L, value); } + /// Sets `supportsTextureGatherLODBiasAMD` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTextureLODGatherFormatPropertiesAMD supportsTextureGatherLODBiasAMDAt(long index, @CType("VkBool32") int value) { VkTextureLODGatherFormatPropertiesAMD.set_supportsTextureGatherLODBiasAMD(this.segment(), index, value); return this; } + /// Sets `supportsTextureGatherLODBiasAMD` with the given value. + /// @param value the value + /// @return `this` + public VkTextureLODGatherFormatPropertiesAMD supportsTextureGatherLODBiasAMD(@CType("VkBool32") int value) { VkTextureLODGatherFormatPropertiesAMD.set_supportsTextureGatherLODBiasAMD(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/VKAMDXShaderEnqueue.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/VKAMDXShaderEnqueue.java new file mode 100644 index 00000000..e6b05b4b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/VKAMDXShaderEnqueue.java @@ -0,0 +1,105 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amdx; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKAMDXShaderEnqueue { + public static final int VK_AMDX_SHADER_ENQUEUE_SPEC_VERSION = 2; + public static final String VK_AMDX_SHADER_ENQUEUE_EXTENSION_NAME = "VK_AMDX_shader_enqueue"; + public static final int VK_SHADER_INDEX_UNUSED_AMDX = (~0); + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX = 1000134000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_PROPERTIES_AMDX = 1000134001; + public static final int VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_SCRATCH_SIZE_AMDX = 1000134002; + public static final int VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX = 1000134003; + public static final int VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_NODE_CREATE_INFO_AMDX = 1000134004; + public static final int VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000; + public static final int VK_PIPELINE_BIND_POINT_EXECUTION_GRAPH_AMDX = 1000134000; + public static final long VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000L; + public static final long VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX = 0x100000000L; + public static final MethodHandle MH_vkCreateExecutionGraphPipelinesAMDX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetExecutionGraphPipelineScratchSizeAMDX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetExecutionGraphPipelineNodeIndexAMDX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdInitializeGraphScratchMemoryAMDX = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkCmdDispatchGraphAMDX = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdDispatchGraphIndirectAMDX = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdDispatchGraphIndirectCountAMDX = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG)); + public final MemorySegment PFN_vkCreateExecutionGraphPipelinesAMDX; + public final MemorySegment PFN_vkGetExecutionGraphPipelineScratchSizeAMDX; + public final MemorySegment PFN_vkGetExecutionGraphPipelineNodeIndexAMDX; + public final MemorySegment PFN_vkCmdInitializeGraphScratchMemoryAMDX; + public final MemorySegment PFN_vkCmdDispatchGraphAMDX; + public final MemorySegment PFN_vkCmdDispatchGraphIndirectAMDX; + public final MemorySegment PFN_vkCmdDispatchGraphIndirectCountAMDX; + + public VKAMDXShaderEnqueue(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateExecutionGraphPipelinesAMDX = func.invoke(device, "vkCreateExecutionGraphPipelinesAMDX"); + PFN_vkGetExecutionGraphPipelineScratchSizeAMDX = func.invoke(device, "vkGetExecutionGraphPipelineScratchSizeAMDX"); + PFN_vkGetExecutionGraphPipelineNodeIndexAMDX = func.invoke(device, "vkGetExecutionGraphPipelineNodeIndexAMDX"); + PFN_vkCmdInitializeGraphScratchMemoryAMDX = func.invoke(device, "vkCmdInitializeGraphScratchMemoryAMDX"); + PFN_vkCmdDispatchGraphAMDX = func.invoke(device, "vkCmdDispatchGraphAMDX"); + PFN_vkCmdDispatchGraphIndirectAMDX = func.invoke(device, "vkCmdDispatchGraphIndirectAMDX"); + PFN_vkCmdDispatchGraphIndirectCountAMDX = func.invoke(device, "vkCmdDispatchGraphIndirectCountAMDX"); + } + + public @CType("VkResult") int CreateExecutionGraphPipelinesAMDX(@CType("VkDevice") MemorySegment device, @CType("VkPipelineCache") MemorySegment pipelineCache, @CType("uint32_t") int createInfoCount, @CType("const VkExecutionGraphPipelineCreateInfoAMDX *") MemorySegment pCreateInfos, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkPipeline *") MemorySegment pPipelines) { + if (Unmarshal.isNullPointer(PFN_vkCreateExecutionGraphPipelinesAMDX)) throw new SymbolNotFoundError("Symbol not found: vkCreateExecutionGraphPipelinesAMDX"); + try { return (int) MH_vkCreateExecutionGraphPipelinesAMDX.invokeExact(PFN_vkCreateExecutionGraphPipelinesAMDX, device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateExecutionGraphPipelinesAMDX", e); } + } + + public @CType("VkResult") int GetExecutionGraphPipelineScratchSizeAMDX(@CType("VkDevice") MemorySegment device, @CType("VkPipeline") MemorySegment executionGraph, @CType("VkExecutionGraphPipelineScratchSizeAMDX *") MemorySegment pSizeInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetExecutionGraphPipelineScratchSizeAMDX)) throw new SymbolNotFoundError("Symbol not found: vkGetExecutionGraphPipelineScratchSizeAMDX"); + try { return (int) MH_vkGetExecutionGraphPipelineScratchSizeAMDX.invokeExact(PFN_vkGetExecutionGraphPipelineScratchSizeAMDX, device, executionGraph, pSizeInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetExecutionGraphPipelineScratchSizeAMDX", e); } + } + + public @CType("VkResult") int GetExecutionGraphPipelineNodeIndexAMDX(@CType("VkDevice") MemorySegment device, @CType("VkPipeline") MemorySegment executionGraph, @CType("const VkPipelineShaderStageNodeCreateInfoAMDX *") MemorySegment pNodeInfo, @CType("uint32_t *") MemorySegment pNodeIndex) { + if (Unmarshal.isNullPointer(PFN_vkGetExecutionGraphPipelineNodeIndexAMDX)) throw new SymbolNotFoundError("Symbol not found: vkGetExecutionGraphPipelineNodeIndexAMDX"); + try { return (int) MH_vkGetExecutionGraphPipelineNodeIndexAMDX.invokeExact(PFN_vkGetExecutionGraphPipelineNodeIndexAMDX, device, executionGraph, pNodeInfo, pNodeIndex); } + catch (Throwable e) { throw new RuntimeException("error in vkGetExecutionGraphPipelineNodeIndexAMDX", e); } + } + + public void CmdInitializeGraphScratchMemoryAMDX(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipeline") MemorySegment executionGraph, @CType("VkDeviceAddress") long scratch, @CType("VkDeviceSize") long scratchSize) { + if (Unmarshal.isNullPointer(PFN_vkCmdInitializeGraphScratchMemoryAMDX)) throw new SymbolNotFoundError("Symbol not found: vkCmdInitializeGraphScratchMemoryAMDX"); + try { MH_vkCmdInitializeGraphScratchMemoryAMDX.invokeExact(PFN_vkCmdInitializeGraphScratchMemoryAMDX, commandBuffer, executionGraph, scratch, scratchSize); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdInitializeGraphScratchMemoryAMDX", e); } + } + + public void CmdDispatchGraphAMDX(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDeviceAddress") long scratch, @CType("VkDeviceSize") long scratchSize, @CType("const VkDispatchGraphCountInfoAMDX *") MemorySegment pCountInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdDispatchGraphAMDX)) throw new SymbolNotFoundError("Symbol not found: vkCmdDispatchGraphAMDX"); + try { MH_vkCmdDispatchGraphAMDX.invokeExact(PFN_vkCmdDispatchGraphAMDX, commandBuffer, scratch, scratchSize, pCountInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDispatchGraphAMDX", e); } + } + + public void CmdDispatchGraphIndirectAMDX(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDeviceAddress") long scratch, @CType("VkDeviceSize") long scratchSize, @CType("const VkDispatchGraphCountInfoAMDX *") MemorySegment pCountInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdDispatchGraphIndirectAMDX)) throw new SymbolNotFoundError("Symbol not found: vkCmdDispatchGraphIndirectAMDX"); + try { MH_vkCmdDispatchGraphIndirectAMDX.invokeExact(PFN_vkCmdDispatchGraphIndirectAMDX, commandBuffer, scratch, scratchSize, pCountInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDispatchGraphIndirectAMDX", e); } + } + + public void CmdDispatchGraphIndirectCountAMDX(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDeviceAddress") long scratch, @CType("VkDeviceSize") long scratchSize, @CType("VkDeviceAddress") long countInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdDispatchGraphIndirectCountAMDX)) throw new SymbolNotFoundError("Symbol not found: vkCmdDispatchGraphIndirectCountAMDX"); + try { MH_vkCmdDispatchGraphIndirectCountAMDX.invokeExact(PFN_vkCmdDispatchGraphIndirectCountAMDX, commandBuffer, scratch, scratchSize, countInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDispatchGraphIndirectCountAMDX", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkDispatchGraphCountInfoAMDX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkDispatchGraphCountInfoAMDX.java new file mode 100644 index 00000000..8b0dd488 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkDispatchGraphCountInfoAMDX.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amdx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### count +/// [VarHandle][#VH_count] - [Getter][#count()] - [Setter][#count(int)] +/// ### infos +/// [Byte offset][#OFFSET_infos] - [Memory layout][#ML_infos] - [Getter][#infos()] - [Setter][#infos(java.lang.foreign.MemorySegment)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDispatchGraphCountInfoAMDX { +/// uint32_t count; +/// VkDeviceOrHostAddressConstAMDX infos; +/// uint64_t stride; +/// } VkDispatchGraphCountInfoAMDX; +/// ``` +public final class VkDispatchGraphCountInfoAMDX extends Struct { + /// The struct layout of `VkDispatchGraphCountInfoAMDX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("count"), + overrungl.vulkan.amdx.union.VkDeviceOrHostAddressConstAMDX.LAYOUT.withName("infos"), + ValueLayout.JAVA_LONG.withName("stride") + ); + /// The [VarHandle] of `count` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_count = LAYOUT.arrayElementVarHandle(PathElement.groupElement("count")); + /// The byte offset of `infos`. + public static final long OFFSET_infos = LAYOUT.byteOffset(PathElement.groupElement("infos")); + /// The memory layout of `infos`. + public static final MemoryLayout ML_infos = LAYOUT.select(PathElement.groupElement("infos")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + + /// Creates `VkDispatchGraphCountInfoAMDX` with the given segment. + /// @param segment the memory segment + public VkDispatchGraphCountInfoAMDX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDispatchGraphCountInfoAMDX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDispatchGraphCountInfoAMDX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDispatchGraphCountInfoAMDX(segment); } + + /// Creates `VkDispatchGraphCountInfoAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDispatchGraphCountInfoAMDX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDispatchGraphCountInfoAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDispatchGraphCountInfoAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDispatchGraphCountInfoAMDX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDispatchGraphCountInfoAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDispatchGraphCountInfoAMDX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDispatchGraphCountInfoAMDX` + public static VkDispatchGraphCountInfoAMDX alloc(SegmentAllocator allocator) { return new VkDispatchGraphCountInfoAMDX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDispatchGraphCountInfoAMDX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDispatchGraphCountInfoAMDX` + public static VkDispatchGraphCountInfoAMDX alloc(SegmentAllocator allocator, long count) { return new VkDispatchGraphCountInfoAMDX(allocator.allocate(LAYOUT, count)); } + + /// {@return `count` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_count(MemorySegment segment, long index) { return (int) VH_count.get(segment, 0L, index); } + /// {@return `count`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_count(MemorySegment segment) { return VkDispatchGraphCountInfoAMDX.get_count(segment, 0L); } + /// {@return `count` at the given index} + /// @param index the index + public @CType("uint32_t") int countAt(long index) { return VkDispatchGraphCountInfoAMDX.get_count(this.segment(), index); } + /// {@return `count`} + public @CType("uint32_t") int count() { return VkDispatchGraphCountInfoAMDX.get_count(this.segment()); } + /// Sets `count` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_count(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_count.set(segment, 0L, index, value); } + /// Sets `count` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_count(MemorySegment segment, @CType("uint32_t") int value) { VkDispatchGraphCountInfoAMDX.set_count(segment, 0L, value); } + /// Sets `count` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDispatchGraphCountInfoAMDX countAt(long index, @CType("uint32_t") int value) { VkDispatchGraphCountInfoAMDX.set_count(this.segment(), index, value); return this; } + /// Sets `count` with the given value. + /// @param value the value + /// @return `this` + public VkDispatchGraphCountInfoAMDX count(@CType("uint32_t") int value) { VkDispatchGraphCountInfoAMDX.set_count(this.segment(), value); return this; } + + /// {@return `infos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment get_infos(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_infos, index), ML_infos); } + /// {@return `infos`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment get_infos(MemorySegment segment) { return VkDispatchGraphCountInfoAMDX.get_infos(segment, 0L); } + /// {@return `infos` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment infosAt(long index) { return VkDispatchGraphCountInfoAMDX.get_infos(this.segment(), index); } + /// {@return `infos`} + public @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment infos() { return VkDispatchGraphCountInfoAMDX.get_infos(this.segment()); } + /// Sets `infos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_infos(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_infos, index), ML_infos.byteSize()); } + /// Sets `infos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_infos(MemorySegment segment, @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment value) { VkDispatchGraphCountInfoAMDX.set_infos(segment, 0L, value); } + /// Sets `infos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDispatchGraphCountInfoAMDX infosAt(long index, @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment value) { VkDispatchGraphCountInfoAMDX.set_infos(this.segment(), index, value); return this; } + /// Sets `infos` with the given value. + /// @param value the value + /// @return `this` + public VkDispatchGraphCountInfoAMDX infos(@CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment value) { VkDispatchGraphCountInfoAMDX.set_infos(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_stride(MemorySegment segment, long index) { return (long) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_stride(MemorySegment segment) { return VkDispatchGraphCountInfoAMDX.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("uint64_t") long strideAt(long index) { return VkDispatchGraphCountInfoAMDX.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("uint64_t") long stride() { return VkDispatchGraphCountInfoAMDX.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("uint64_t") long value) { VkDispatchGraphCountInfoAMDX.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDispatchGraphCountInfoAMDX strideAt(long index, @CType("uint64_t") long value) { VkDispatchGraphCountInfoAMDX.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkDispatchGraphCountInfoAMDX stride(@CType("uint64_t") long value) { VkDispatchGraphCountInfoAMDX.set_stride(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkDispatchGraphInfoAMDX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkDispatchGraphInfoAMDX.java new file mode 100644 index 00000000..433ff099 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkDispatchGraphInfoAMDX.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amdx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### nodeIndex +/// [VarHandle][#VH_nodeIndex] - [Getter][#nodeIndex()] - [Setter][#nodeIndex(int)] +/// ### payloadCount +/// [VarHandle][#VH_payloadCount] - [Getter][#payloadCount()] - [Setter][#payloadCount(int)] +/// ### payloads +/// [Byte offset][#OFFSET_payloads] - [Memory layout][#ML_payloads] - [Getter][#payloads()] - [Setter][#payloads(java.lang.foreign.MemorySegment)] +/// ### payloadStride +/// [VarHandle][#VH_payloadStride] - [Getter][#payloadStride()] - [Setter][#payloadStride(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDispatchGraphInfoAMDX { +/// uint32_t nodeIndex; +/// uint32_t payloadCount; +/// VkDeviceOrHostAddressConstAMDX payloads; +/// uint64_t payloadStride; +/// } VkDispatchGraphInfoAMDX; +/// ``` +public final class VkDispatchGraphInfoAMDX extends Struct { + /// The struct layout of `VkDispatchGraphInfoAMDX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("nodeIndex"), + ValueLayout.JAVA_INT.withName("payloadCount"), + overrungl.vulkan.amdx.union.VkDeviceOrHostAddressConstAMDX.LAYOUT.withName("payloads"), + ValueLayout.JAVA_LONG.withName("payloadStride") + ); + /// The [VarHandle] of `nodeIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nodeIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nodeIndex")); + /// The [VarHandle] of `payloadCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_payloadCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("payloadCount")); + /// The byte offset of `payloads`. + public static final long OFFSET_payloads = LAYOUT.byteOffset(PathElement.groupElement("payloads")); + /// The memory layout of `payloads`. + public static final MemoryLayout ML_payloads = LAYOUT.select(PathElement.groupElement("payloads")); + /// The [VarHandle] of `payloadStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_payloadStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("payloadStride")); + + /// Creates `VkDispatchGraphInfoAMDX` with the given segment. + /// @param segment the memory segment + public VkDispatchGraphInfoAMDX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDispatchGraphInfoAMDX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDispatchGraphInfoAMDX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDispatchGraphInfoAMDX(segment); } + + /// Creates `VkDispatchGraphInfoAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDispatchGraphInfoAMDX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDispatchGraphInfoAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDispatchGraphInfoAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDispatchGraphInfoAMDX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDispatchGraphInfoAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDispatchGraphInfoAMDX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDispatchGraphInfoAMDX` + public static VkDispatchGraphInfoAMDX alloc(SegmentAllocator allocator) { return new VkDispatchGraphInfoAMDX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDispatchGraphInfoAMDX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDispatchGraphInfoAMDX` + public static VkDispatchGraphInfoAMDX alloc(SegmentAllocator allocator, long count) { return new VkDispatchGraphInfoAMDX(allocator.allocate(LAYOUT, count)); } + + /// {@return `nodeIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_nodeIndex(MemorySegment segment, long index) { return (int) VH_nodeIndex.get(segment, 0L, index); } + /// {@return `nodeIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_nodeIndex(MemorySegment segment) { return VkDispatchGraphInfoAMDX.get_nodeIndex(segment, 0L); } + /// {@return `nodeIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int nodeIndexAt(long index) { return VkDispatchGraphInfoAMDX.get_nodeIndex(this.segment(), index); } + /// {@return `nodeIndex`} + public @CType("uint32_t") int nodeIndex() { return VkDispatchGraphInfoAMDX.get_nodeIndex(this.segment()); } + /// Sets `nodeIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nodeIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_nodeIndex.set(segment, 0L, index, value); } + /// Sets `nodeIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nodeIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDispatchGraphInfoAMDX.set_nodeIndex(segment, 0L, value); } + /// Sets `nodeIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDispatchGraphInfoAMDX nodeIndexAt(long index, @CType("uint32_t") int value) { VkDispatchGraphInfoAMDX.set_nodeIndex(this.segment(), index, value); return this; } + /// Sets `nodeIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDispatchGraphInfoAMDX nodeIndex(@CType("uint32_t") int value) { VkDispatchGraphInfoAMDX.set_nodeIndex(this.segment(), value); return this; } + + /// {@return `payloadCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_payloadCount(MemorySegment segment, long index) { return (int) VH_payloadCount.get(segment, 0L, index); } + /// {@return `payloadCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_payloadCount(MemorySegment segment) { return VkDispatchGraphInfoAMDX.get_payloadCount(segment, 0L); } + /// {@return `payloadCount` at the given index} + /// @param index the index + public @CType("uint32_t") int payloadCountAt(long index) { return VkDispatchGraphInfoAMDX.get_payloadCount(this.segment(), index); } + /// {@return `payloadCount`} + public @CType("uint32_t") int payloadCount() { return VkDispatchGraphInfoAMDX.get_payloadCount(this.segment()); } + /// Sets `payloadCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_payloadCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_payloadCount.set(segment, 0L, index, value); } + /// Sets `payloadCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_payloadCount(MemorySegment segment, @CType("uint32_t") int value) { VkDispatchGraphInfoAMDX.set_payloadCount(segment, 0L, value); } + /// Sets `payloadCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDispatchGraphInfoAMDX payloadCountAt(long index, @CType("uint32_t") int value) { VkDispatchGraphInfoAMDX.set_payloadCount(this.segment(), index, value); return this; } + /// Sets `payloadCount` with the given value. + /// @param value the value + /// @return `this` + public VkDispatchGraphInfoAMDX payloadCount(@CType("uint32_t") int value) { VkDispatchGraphInfoAMDX.set_payloadCount(this.segment(), value); return this; } + + /// {@return `payloads` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment get_payloads(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_payloads, index), ML_payloads); } + /// {@return `payloads`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment get_payloads(MemorySegment segment) { return VkDispatchGraphInfoAMDX.get_payloads(segment, 0L); } + /// {@return `payloads` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment payloadsAt(long index) { return VkDispatchGraphInfoAMDX.get_payloads(this.segment(), index); } + /// {@return `payloads`} + public @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment payloads() { return VkDispatchGraphInfoAMDX.get_payloads(this.segment()); } + /// Sets `payloads` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_payloads(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_payloads, index), ML_payloads.byteSize()); } + /// Sets `payloads` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_payloads(MemorySegment segment, @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment value) { VkDispatchGraphInfoAMDX.set_payloads(segment, 0L, value); } + /// Sets `payloads` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDispatchGraphInfoAMDX payloadsAt(long index, @CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment value) { VkDispatchGraphInfoAMDX.set_payloads(this.segment(), index, value); return this; } + /// Sets `payloads` with the given value. + /// @param value the value + /// @return `this` + public VkDispatchGraphInfoAMDX payloads(@CType("VkDeviceOrHostAddressConstAMDX") java.lang.foreign.MemorySegment value) { VkDispatchGraphInfoAMDX.set_payloads(this.segment(), value); return this; } + + /// {@return `payloadStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_payloadStride(MemorySegment segment, long index) { return (long) VH_payloadStride.get(segment, 0L, index); } + /// {@return `payloadStride`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_payloadStride(MemorySegment segment) { return VkDispatchGraphInfoAMDX.get_payloadStride(segment, 0L); } + /// {@return `payloadStride` at the given index} + /// @param index the index + public @CType("uint64_t") long payloadStrideAt(long index) { return VkDispatchGraphInfoAMDX.get_payloadStride(this.segment(), index); } + /// {@return `payloadStride`} + public @CType("uint64_t") long payloadStride() { return VkDispatchGraphInfoAMDX.get_payloadStride(this.segment()); } + /// Sets `payloadStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_payloadStride(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_payloadStride.set(segment, 0L, index, value); } + /// Sets `payloadStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_payloadStride(MemorySegment segment, @CType("uint64_t") long value) { VkDispatchGraphInfoAMDX.set_payloadStride(segment, 0L, value); } + /// Sets `payloadStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDispatchGraphInfoAMDX payloadStrideAt(long index, @CType("uint64_t") long value) { VkDispatchGraphInfoAMDX.set_payloadStride(this.segment(), index, value); return this; } + /// Sets `payloadStride` with the given value. + /// @param value the value + /// @return `this` + public VkDispatchGraphInfoAMDX payloadStride(@CType("uint64_t") long value) { VkDispatchGraphInfoAMDX.set_payloadStride(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkExecutionGraphPipelineCreateInfoAMDX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkExecutionGraphPipelineCreateInfoAMDX.java new file mode 100644 index 00000000..65eee713 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkExecutionGraphPipelineCreateInfoAMDX.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amdx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### stageCount +/// [VarHandle][#VH_stageCount] - [Getter][#stageCount()] - [Setter][#stageCount(int)] +/// ### pStages +/// [VarHandle][#VH_pStages] - [Getter][#pStages()] - [Setter][#pStages(java.lang.foreign.MemorySegment)] +/// ### pLibraryInfo +/// [VarHandle][#VH_pLibraryInfo] - [Getter][#pLibraryInfo()] - [Setter][#pLibraryInfo(java.lang.foreign.MemorySegment)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### basePipelineHandle +/// [VarHandle][#VH_basePipelineHandle] - [Getter][#basePipelineHandle()] - [Setter][#basePipelineHandle(java.lang.foreign.MemorySegment)] +/// ### basePipelineIndex +/// [VarHandle][#VH_basePipelineIndex] - [Getter][#basePipelineIndex()] - [Setter][#basePipelineIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExecutionGraphPipelineCreateInfoAMDX { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCreateFlags flags; +/// uint32_t stageCount; +/// const VkPipelineShaderStageCreateInfo * pStages; +/// const VkPipelineLibraryCreateInfoKHR * pLibraryInfo; +/// VkPipelineLayout layout; +/// VkPipeline basePipelineHandle; +/// int32_t basePipelineIndex; +/// } VkExecutionGraphPipelineCreateInfoAMDX; +/// ``` +public final class VkExecutionGraphPipelineCreateInfoAMDX extends Struct { + /// The struct layout of `VkExecutionGraphPipelineCreateInfoAMDX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("stageCount"), + ValueLayout.ADDRESS.withName("pStages"), + ValueLayout.ADDRESS.withName("pLibraryInfo"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.ADDRESS.withName("basePipelineHandle"), + ValueLayout.JAVA_INT.withName("basePipelineIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `stageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageCount")); + /// The [VarHandle] of `pStages` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStages")); + /// The [VarHandle] of `pLibraryInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLibraryInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLibraryInfo")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `basePipelineHandle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_basePipelineHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("basePipelineHandle")); + /// The [VarHandle] of `basePipelineIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_basePipelineIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("basePipelineIndex")); + + /// Creates `VkExecutionGraphPipelineCreateInfoAMDX` with the given segment. + /// @param segment the memory segment + public VkExecutionGraphPipelineCreateInfoAMDX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExecutionGraphPipelineCreateInfoAMDX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExecutionGraphPipelineCreateInfoAMDX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExecutionGraphPipelineCreateInfoAMDX(segment); } + + /// Creates `VkExecutionGraphPipelineCreateInfoAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExecutionGraphPipelineCreateInfoAMDX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExecutionGraphPipelineCreateInfoAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExecutionGraphPipelineCreateInfoAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExecutionGraphPipelineCreateInfoAMDX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExecutionGraphPipelineCreateInfoAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExecutionGraphPipelineCreateInfoAMDX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExecutionGraphPipelineCreateInfoAMDX` + public static VkExecutionGraphPipelineCreateInfoAMDX alloc(SegmentAllocator allocator) { return new VkExecutionGraphPipelineCreateInfoAMDX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExecutionGraphPipelineCreateInfoAMDX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExecutionGraphPipelineCreateInfoAMDX` + public static VkExecutionGraphPipelineCreateInfoAMDX alloc(SegmentAllocator allocator, long count) { return new VkExecutionGraphPipelineCreateInfoAMDX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExecutionGraphPipelineCreateInfoAMDX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExecutionGraphPipelineCreateInfoAMDX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExecutionGraphPipelineCreateInfoAMDX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX sTypeAt(long index, @CType("VkStructureType") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX sType(@CType("VkStructureType") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExecutionGraphPipelineCreateInfoAMDX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExecutionGraphPipelineCreateInfoAMDX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExecutionGraphPipelineCreateInfoAMDX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCreateFlags") int get_flags(MemorySegment segment) { return VkExecutionGraphPipelineCreateInfoAMDX.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCreateFlags") int flagsAt(long index) { return VkExecutionGraphPipelineCreateInfoAMDX.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCreateFlags") int flags() { return VkExecutionGraphPipelineCreateInfoAMDX.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCreateFlags") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX flagsAt(long index, @CType("VkPipelineCreateFlags") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX flags(@CType("VkPipelineCreateFlags") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_flags(this.segment(), value); return this; } + + /// {@return `stageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stageCount(MemorySegment segment, long index) { return (int) VH_stageCount.get(segment, 0L, index); } + /// {@return `stageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stageCount(MemorySegment segment) { return VkExecutionGraphPipelineCreateInfoAMDX.get_stageCount(segment, 0L); } + /// {@return `stageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stageCountAt(long index) { return VkExecutionGraphPipelineCreateInfoAMDX.get_stageCount(this.segment(), index); } + /// {@return `stageCount`} + public @CType("uint32_t") int stageCount() { return VkExecutionGraphPipelineCreateInfoAMDX.get_stageCount(this.segment()); } + /// Sets `stageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stageCount.set(segment, 0L, index, value); } + /// Sets `stageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageCount(MemorySegment segment, @CType("uint32_t") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_stageCount(segment, 0L, value); } + /// Sets `stageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX stageCountAt(long index, @CType("uint32_t") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_stageCount(this.segment(), index, value); return this; } + /// Sets `stageCount` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX stageCount(@CType("uint32_t") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_stageCount(this.segment(), value); return this; } + + /// {@return `pStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment get_pStages(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStages.get(segment, 0L, index); } + /// {@return `pStages`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment get_pStages(MemorySegment segment) { return VkExecutionGraphPipelineCreateInfoAMDX.get_pStages(segment, 0L); } + /// {@return `pStages` at the given index} + /// @param index the index + public @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment pStagesAt(long index) { return VkExecutionGraphPipelineCreateInfoAMDX.get_pStages(this.segment(), index); } + /// {@return `pStages`} + public @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment pStages() { return VkExecutionGraphPipelineCreateInfoAMDX.get_pStages(this.segment()); } + /// Sets `pStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStages(MemorySegment segment, long index, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pStages.set(segment, 0L, index, value); } + /// Sets `pStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStages(MemorySegment segment, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_pStages(segment, 0L, value); } + /// Sets `pStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX pStagesAt(long index, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_pStages(this.segment(), index, value); return this; } + /// Sets `pStages` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX pStages(@CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_pStages(this.segment(), value); return this; } + + /// {@return `pLibraryInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment get_pLibraryInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLibraryInfo.get(segment, 0L, index); } + /// {@return `pLibraryInfo`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment get_pLibraryInfo(MemorySegment segment) { return VkExecutionGraphPipelineCreateInfoAMDX.get_pLibraryInfo(segment, 0L); } + /// {@return `pLibraryInfo` at the given index} + /// @param index the index + public @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment pLibraryInfoAt(long index) { return VkExecutionGraphPipelineCreateInfoAMDX.get_pLibraryInfo(this.segment(), index); } + /// {@return `pLibraryInfo`} + public @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment pLibraryInfo() { return VkExecutionGraphPipelineCreateInfoAMDX.get_pLibraryInfo(this.segment()); } + /// Sets `pLibraryInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLibraryInfo(MemorySegment segment, long index, @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pLibraryInfo.set(segment, 0L, index, value); } + /// Sets `pLibraryInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLibraryInfo(MemorySegment segment, @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_pLibraryInfo(segment, 0L, value); } + /// Sets `pLibraryInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX pLibraryInfoAt(long index, @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_pLibraryInfo(this.segment(), index, value); return this; } + /// Sets `pLibraryInfo` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX pLibraryInfo(@CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_pLibraryInfo(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkExecutionGraphPipelineCreateInfoAMDX.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkExecutionGraphPipelineCreateInfoAMDX.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkExecutionGraphPipelineCreateInfoAMDX.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_layout(this.segment(), value); return this; } + + /// {@return `basePipelineHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_basePipelineHandle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_basePipelineHandle.get(segment, 0L, index); } + /// {@return `basePipelineHandle`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_basePipelineHandle(MemorySegment segment) { return VkExecutionGraphPipelineCreateInfoAMDX.get_basePipelineHandle(segment, 0L); } + /// {@return `basePipelineHandle` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment basePipelineHandleAt(long index) { return VkExecutionGraphPipelineCreateInfoAMDX.get_basePipelineHandle(this.segment(), index); } + /// {@return `basePipelineHandle`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment basePipelineHandle() { return VkExecutionGraphPipelineCreateInfoAMDX.get_basePipelineHandle(this.segment()); } + /// Sets `basePipelineHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_basePipelineHandle(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_basePipelineHandle.set(segment, 0L, index, value); } + /// Sets `basePipelineHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_basePipelineHandle(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_basePipelineHandle(segment, 0L, value); } + /// Sets `basePipelineHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX basePipelineHandleAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_basePipelineHandle(this.segment(), index, value); return this; } + /// Sets `basePipelineHandle` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX basePipelineHandle(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineCreateInfoAMDX.set_basePipelineHandle(this.segment(), value); return this; } + + /// {@return `basePipelineIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_basePipelineIndex(MemorySegment segment, long index) { return (int) VH_basePipelineIndex.get(segment, 0L, index); } + /// {@return `basePipelineIndex`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_basePipelineIndex(MemorySegment segment) { return VkExecutionGraphPipelineCreateInfoAMDX.get_basePipelineIndex(segment, 0L); } + /// {@return `basePipelineIndex` at the given index} + /// @param index the index + public @CType("int32_t") int basePipelineIndexAt(long index) { return VkExecutionGraphPipelineCreateInfoAMDX.get_basePipelineIndex(this.segment(), index); } + /// {@return `basePipelineIndex`} + public @CType("int32_t") int basePipelineIndex() { return VkExecutionGraphPipelineCreateInfoAMDX.get_basePipelineIndex(this.segment()); } + /// Sets `basePipelineIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_basePipelineIndex(MemorySegment segment, long index, @CType("int32_t") int value) { VH_basePipelineIndex.set(segment, 0L, index, value); } + /// Sets `basePipelineIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_basePipelineIndex(MemorySegment segment, @CType("int32_t") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_basePipelineIndex(segment, 0L, value); } + /// Sets `basePipelineIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX basePipelineIndexAt(long index, @CType("int32_t") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_basePipelineIndex(this.segment(), index, value); return this; } + /// Sets `basePipelineIndex` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineCreateInfoAMDX basePipelineIndex(@CType("int32_t") int value) { VkExecutionGraphPipelineCreateInfoAMDX.set_basePipelineIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkExecutionGraphPipelineScratchSizeAMDX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkExecutionGraphPipelineScratchSizeAMDX.java new file mode 100644 index 00000000..72cc3b33 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkExecutionGraphPipelineScratchSizeAMDX.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amdx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minSize +/// [VarHandle][#VH_minSize] - [Getter][#minSize()] - [Setter][#minSize(long)] +/// ### maxSize +/// [VarHandle][#VH_maxSize] - [Getter][#maxSize()] - [Setter][#maxSize(long)] +/// ### sizeGranularity +/// [VarHandle][#VH_sizeGranularity] - [Getter][#sizeGranularity()] - [Setter][#sizeGranularity(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExecutionGraphPipelineScratchSizeAMDX { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize minSize; +/// VkDeviceSize maxSize; +/// VkDeviceSize sizeGranularity; +/// } VkExecutionGraphPipelineScratchSizeAMDX; +/// ``` +public final class VkExecutionGraphPipelineScratchSizeAMDX extends Struct { + /// The struct layout of `VkExecutionGraphPipelineScratchSizeAMDX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("minSize"), + ValueLayout.JAVA_LONG.withName("maxSize"), + ValueLayout.JAVA_LONG.withName("sizeGranularity") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_minSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minSize")); + /// The [VarHandle] of `maxSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSize")); + /// The [VarHandle] of `sizeGranularity` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_sizeGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sizeGranularity")); + + /// Creates `VkExecutionGraphPipelineScratchSizeAMDX` with the given segment. + /// @param segment the memory segment + public VkExecutionGraphPipelineScratchSizeAMDX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExecutionGraphPipelineScratchSizeAMDX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExecutionGraphPipelineScratchSizeAMDX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExecutionGraphPipelineScratchSizeAMDX(segment); } + + /// Creates `VkExecutionGraphPipelineScratchSizeAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExecutionGraphPipelineScratchSizeAMDX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExecutionGraphPipelineScratchSizeAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExecutionGraphPipelineScratchSizeAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExecutionGraphPipelineScratchSizeAMDX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExecutionGraphPipelineScratchSizeAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExecutionGraphPipelineScratchSizeAMDX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExecutionGraphPipelineScratchSizeAMDX` + public static VkExecutionGraphPipelineScratchSizeAMDX alloc(SegmentAllocator allocator) { return new VkExecutionGraphPipelineScratchSizeAMDX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExecutionGraphPipelineScratchSizeAMDX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExecutionGraphPipelineScratchSizeAMDX` + public static VkExecutionGraphPipelineScratchSizeAMDX alloc(SegmentAllocator allocator, long count) { return new VkExecutionGraphPipelineScratchSizeAMDX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExecutionGraphPipelineScratchSizeAMDX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExecutionGraphPipelineScratchSizeAMDX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExecutionGraphPipelineScratchSizeAMDX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExecutionGraphPipelineScratchSizeAMDX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineScratchSizeAMDX sTypeAt(long index, @CType("VkStructureType") int value) { VkExecutionGraphPipelineScratchSizeAMDX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineScratchSizeAMDX sType(@CType("VkStructureType") int value) { VkExecutionGraphPipelineScratchSizeAMDX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExecutionGraphPipelineScratchSizeAMDX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExecutionGraphPipelineScratchSizeAMDX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkExecutionGraphPipelineScratchSizeAMDX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineScratchSizeAMDX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineScratchSizeAMDX pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineScratchSizeAMDX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineScratchSizeAMDX pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkExecutionGraphPipelineScratchSizeAMDX.set_pNext(this.segment(), value); return this; } + + /// {@return `minSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_minSize(MemorySegment segment, long index) { return (long) VH_minSize.get(segment, 0L, index); } + /// {@return `minSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_minSize(MemorySegment segment) { return VkExecutionGraphPipelineScratchSizeAMDX.get_minSize(segment, 0L); } + /// {@return `minSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long minSizeAt(long index) { return VkExecutionGraphPipelineScratchSizeAMDX.get_minSize(this.segment(), index); } + /// {@return `minSize`} + public @CType("VkDeviceSize") long minSize() { return VkExecutionGraphPipelineScratchSizeAMDX.get_minSize(this.segment()); } + /// Sets `minSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_minSize.set(segment, 0L, index, value); } + /// Sets `minSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkExecutionGraphPipelineScratchSizeAMDX.set_minSize(segment, 0L, value); } + /// Sets `minSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineScratchSizeAMDX minSizeAt(long index, @CType("VkDeviceSize") long value) { VkExecutionGraphPipelineScratchSizeAMDX.set_minSize(this.segment(), index, value); return this; } + /// Sets `minSize` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineScratchSizeAMDX minSize(@CType("VkDeviceSize") long value) { VkExecutionGraphPipelineScratchSizeAMDX.set_minSize(this.segment(), value); return this; } + + /// {@return `maxSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_maxSize(MemorySegment segment, long index) { return (long) VH_maxSize.get(segment, 0L, index); } + /// {@return `maxSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_maxSize(MemorySegment segment) { return VkExecutionGraphPipelineScratchSizeAMDX.get_maxSize(segment, 0L); } + /// {@return `maxSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long maxSizeAt(long index) { return VkExecutionGraphPipelineScratchSizeAMDX.get_maxSize(this.segment(), index); } + /// {@return `maxSize`} + public @CType("VkDeviceSize") long maxSize() { return VkExecutionGraphPipelineScratchSizeAMDX.get_maxSize(this.segment()); } + /// Sets `maxSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_maxSize.set(segment, 0L, index, value); } + /// Sets `maxSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkExecutionGraphPipelineScratchSizeAMDX.set_maxSize(segment, 0L, value); } + /// Sets `maxSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineScratchSizeAMDX maxSizeAt(long index, @CType("VkDeviceSize") long value) { VkExecutionGraphPipelineScratchSizeAMDX.set_maxSize(this.segment(), index, value); return this; } + /// Sets `maxSize` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineScratchSizeAMDX maxSize(@CType("VkDeviceSize") long value) { VkExecutionGraphPipelineScratchSizeAMDX.set_maxSize(this.segment(), value); return this; } + + /// {@return `sizeGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_sizeGranularity(MemorySegment segment, long index) { return (long) VH_sizeGranularity.get(segment, 0L, index); } + /// {@return `sizeGranularity`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_sizeGranularity(MemorySegment segment) { return VkExecutionGraphPipelineScratchSizeAMDX.get_sizeGranularity(segment, 0L); } + /// {@return `sizeGranularity` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeGranularityAt(long index) { return VkExecutionGraphPipelineScratchSizeAMDX.get_sizeGranularity(this.segment(), index); } + /// {@return `sizeGranularity`} + public @CType("VkDeviceSize") long sizeGranularity() { return VkExecutionGraphPipelineScratchSizeAMDX.get_sizeGranularity(this.segment()); } + /// Sets `sizeGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sizeGranularity(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_sizeGranularity.set(segment, 0L, index, value); } + /// Sets `sizeGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sizeGranularity(MemorySegment segment, @CType("VkDeviceSize") long value) { VkExecutionGraphPipelineScratchSizeAMDX.set_sizeGranularity(segment, 0L, value); } + /// Sets `sizeGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineScratchSizeAMDX sizeGranularityAt(long index, @CType("VkDeviceSize") long value) { VkExecutionGraphPipelineScratchSizeAMDX.set_sizeGranularity(this.segment(), index, value); return this; } + /// Sets `sizeGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkExecutionGraphPipelineScratchSizeAMDX sizeGranularity(@CType("VkDeviceSize") long value) { VkExecutionGraphPipelineScratchSizeAMDX.set_sizeGranularity(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkPhysicalDeviceShaderEnqueueFeaturesAMDX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkPhysicalDeviceShaderEnqueueFeaturesAMDX.java new file mode 100644 index 00000000..e20d16f8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkPhysicalDeviceShaderEnqueueFeaturesAMDX.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amdx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderEnqueue +/// [VarHandle][#VH_shaderEnqueue] - [Getter][#shaderEnqueue()] - [Setter][#shaderEnqueue(int)] +/// ### shaderMeshEnqueue +/// [VarHandle][#VH_shaderMeshEnqueue] - [Getter][#shaderMeshEnqueue()] - [Setter][#shaderMeshEnqueue(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderEnqueueFeaturesAMDX { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderEnqueue; +/// VkBool32 shaderMeshEnqueue; +/// } VkPhysicalDeviceShaderEnqueueFeaturesAMDX; +/// ``` +public final class VkPhysicalDeviceShaderEnqueueFeaturesAMDX extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderEnqueueFeaturesAMDX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderEnqueue"), + ValueLayout.JAVA_INT.withName("shaderMeshEnqueue") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderEnqueue` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderEnqueue = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderEnqueue")); + /// The [VarHandle] of `shaderMeshEnqueue` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderMeshEnqueue = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderMeshEnqueue")); + + /// Creates `VkPhysicalDeviceShaderEnqueueFeaturesAMDX` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderEnqueueFeaturesAMDX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderEnqueueFeaturesAMDX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderEnqueueFeaturesAMDX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderEnqueueFeaturesAMDX(segment); } + + /// Creates `VkPhysicalDeviceShaderEnqueueFeaturesAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderEnqueueFeaturesAMDX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderEnqueueFeaturesAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderEnqueueFeaturesAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderEnqueueFeaturesAMDX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderEnqueueFeaturesAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderEnqueueFeaturesAMDX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderEnqueueFeaturesAMDX` + public static VkPhysicalDeviceShaderEnqueueFeaturesAMDX alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderEnqueueFeaturesAMDX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderEnqueueFeaturesAMDX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderEnqueueFeaturesAMDX` + public static VkPhysicalDeviceShaderEnqueueFeaturesAMDX alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderEnqueueFeaturesAMDX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueueFeaturesAMDX sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueueFeaturesAMDX sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueueFeaturesAMDX pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueueFeaturesAMDX pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderEnqueue` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderEnqueue(MemorySegment segment, long index) { return (int) VH_shaderEnqueue.get(segment, 0L, index); } + /// {@return `shaderEnqueue`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderEnqueue(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_shaderEnqueue(segment, 0L); } + /// {@return `shaderEnqueue` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderEnqueueAt(long index) { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_shaderEnqueue(this.segment(), index); } + /// {@return `shaderEnqueue`} + public @CType("VkBool32") int shaderEnqueue() { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_shaderEnqueue(this.segment()); } + /// Sets `shaderEnqueue` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderEnqueue(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderEnqueue.set(segment, 0L, index, value); } + /// Sets `shaderEnqueue` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderEnqueue(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_shaderEnqueue(segment, 0L, value); } + /// Sets `shaderEnqueue` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueueFeaturesAMDX shaderEnqueueAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_shaderEnqueue(this.segment(), index, value); return this; } + /// Sets `shaderEnqueue` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueueFeaturesAMDX shaderEnqueue(@CType("VkBool32") int value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_shaderEnqueue(this.segment(), value); return this; } + + /// {@return `shaderMeshEnqueue` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderMeshEnqueue(MemorySegment segment, long index) { return (int) VH_shaderMeshEnqueue.get(segment, 0L, index); } + /// {@return `shaderMeshEnqueue`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderMeshEnqueue(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_shaderMeshEnqueue(segment, 0L); } + /// {@return `shaderMeshEnqueue` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderMeshEnqueueAt(long index) { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_shaderMeshEnqueue(this.segment(), index); } + /// {@return `shaderMeshEnqueue`} + public @CType("VkBool32") int shaderMeshEnqueue() { return VkPhysicalDeviceShaderEnqueueFeaturesAMDX.get_shaderMeshEnqueue(this.segment()); } + /// Sets `shaderMeshEnqueue` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderMeshEnqueue(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderMeshEnqueue.set(segment, 0L, index, value); } + /// Sets `shaderMeshEnqueue` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderMeshEnqueue(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_shaderMeshEnqueue(segment, 0L, value); } + /// Sets `shaderMeshEnqueue` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueueFeaturesAMDX shaderMeshEnqueueAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_shaderMeshEnqueue(this.segment(), index, value); return this; } + /// Sets `shaderMeshEnqueue` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueueFeaturesAMDX shaderMeshEnqueue(@CType("VkBool32") int value) { VkPhysicalDeviceShaderEnqueueFeaturesAMDX.set_shaderMeshEnqueue(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkPhysicalDeviceShaderEnqueuePropertiesAMDX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkPhysicalDeviceShaderEnqueuePropertiesAMDX.java new file mode 100644 index 00000000..101faca2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkPhysicalDeviceShaderEnqueuePropertiesAMDX.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amdx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxExecutionGraphDepth +/// [VarHandle][#VH_maxExecutionGraphDepth] - [Getter][#maxExecutionGraphDepth()] - [Setter][#maxExecutionGraphDepth(int)] +/// ### maxExecutionGraphShaderOutputNodes +/// [VarHandle][#VH_maxExecutionGraphShaderOutputNodes] - [Getter][#maxExecutionGraphShaderOutputNodes()] - [Setter][#maxExecutionGraphShaderOutputNodes(int)] +/// ### maxExecutionGraphShaderPayloadSize +/// [VarHandle][#VH_maxExecutionGraphShaderPayloadSize] - [Getter][#maxExecutionGraphShaderPayloadSize()] - [Setter][#maxExecutionGraphShaderPayloadSize(int)] +/// ### maxExecutionGraphShaderPayloadCount +/// [VarHandle][#VH_maxExecutionGraphShaderPayloadCount] - [Getter][#maxExecutionGraphShaderPayloadCount()] - [Setter][#maxExecutionGraphShaderPayloadCount(int)] +/// ### executionGraphDispatchAddressAlignment +/// [VarHandle][#VH_executionGraphDispatchAddressAlignment] - [Getter][#executionGraphDispatchAddressAlignment()] - [Setter][#executionGraphDispatchAddressAlignment(int)] +/// ### maxExecutionGraphWorkgroupCount +/// [VarHandle][#VH_maxExecutionGraphWorkgroupCount] - [Getter][#maxExecutionGraphWorkgroupCount()] - [Setter][#maxExecutionGraphWorkgroupCount(int)] +/// ### maxExecutionGraphWorkgroups +/// [VarHandle][#VH_maxExecutionGraphWorkgroups] - [Getter][#maxExecutionGraphWorkgroups()] - [Setter][#maxExecutionGraphWorkgroups(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderEnqueuePropertiesAMDX { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxExecutionGraphDepth; +/// uint32_t maxExecutionGraphShaderOutputNodes; +/// uint32_t maxExecutionGraphShaderPayloadSize; +/// uint32_t maxExecutionGraphShaderPayloadCount; +/// uint32_t executionGraphDispatchAddressAlignment; +/// uint32_t maxExecutionGraphWorkgroupCount; +/// uint32_t maxExecutionGraphWorkgroups; +/// } VkPhysicalDeviceShaderEnqueuePropertiesAMDX; +/// ``` +public final class VkPhysicalDeviceShaderEnqueuePropertiesAMDX extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderEnqueuePropertiesAMDX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxExecutionGraphDepth"), + ValueLayout.JAVA_INT.withName("maxExecutionGraphShaderOutputNodes"), + ValueLayout.JAVA_INT.withName("maxExecutionGraphShaderPayloadSize"), + ValueLayout.JAVA_INT.withName("maxExecutionGraphShaderPayloadCount"), + ValueLayout.JAVA_INT.withName("executionGraphDispatchAddressAlignment"), + ValueLayout.JAVA_INT.withName("maxExecutionGraphWorkgroupCount"), + ValueLayout.JAVA_INT.withName("maxExecutionGraphWorkgroups") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxExecutionGraphDepth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxExecutionGraphDepth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxExecutionGraphDepth")); + /// The [VarHandle] of `maxExecutionGraphShaderOutputNodes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxExecutionGraphShaderOutputNodes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxExecutionGraphShaderOutputNodes")); + /// The [VarHandle] of `maxExecutionGraphShaderPayloadSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxExecutionGraphShaderPayloadSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxExecutionGraphShaderPayloadSize")); + /// The [VarHandle] of `maxExecutionGraphShaderPayloadCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxExecutionGraphShaderPayloadCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxExecutionGraphShaderPayloadCount")); + /// The [VarHandle] of `executionGraphDispatchAddressAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_executionGraphDispatchAddressAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("executionGraphDispatchAddressAlignment")); + /// The [VarHandle] of `maxExecutionGraphWorkgroupCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxExecutionGraphWorkgroupCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxExecutionGraphWorkgroupCount")); + /// The [VarHandle] of `maxExecutionGraphWorkgroups` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxExecutionGraphWorkgroups = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxExecutionGraphWorkgroups")); + + /// Creates `VkPhysicalDeviceShaderEnqueuePropertiesAMDX` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderEnqueuePropertiesAMDX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderEnqueuePropertiesAMDX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderEnqueuePropertiesAMDX(segment); } + + /// Creates `VkPhysicalDeviceShaderEnqueuePropertiesAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderEnqueuePropertiesAMDX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderEnqueuePropertiesAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderEnqueuePropertiesAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderEnqueuePropertiesAMDX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderEnqueuePropertiesAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderEnqueuePropertiesAMDX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderEnqueuePropertiesAMDX` + public static VkPhysicalDeviceShaderEnqueuePropertiesAMDX alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderEnqueuePropertiesAMDX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderEnqueuePropertiesAMDX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderEnqueuePropertiesAMDX` + public static VkPhysicalDeviceShaderEnqueuePropertiesAMDX alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderEnqueuePropertiesAMDX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_pNext(this.segment(), value); return this; } + + /// {@return `maxExecutionGraphDepth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxExecutionGraphDepth(MemorySegment segment, long index) { return (int) VH_maxExecutionGraphDepth.get(segment, 0L, index); } + /// {@return `maxExecutionGraphDepth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxExecutionGraphDepth(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphDepth(segment, 0L); } + /// {@return `maxExecutionGraphDepth` at the given index} + /// @param index the index + public @CType("uint32_t") int maxExecutionGraphDepthAt(long index) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphDepth(this.segment(), index); } + /// {@return `maxExecutionGraphDepth`} + public @CType("uint32_t") int maxExecutionGraphDepth() { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphDepth(this.segment()); } + /// Sets `maxExecutionGraphDepth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxExecutionGraphDepth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxExecutionGraphDepth.set(segment, 0L, index, value); } + /// Sets `maxExecutionGraphDepth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxExecutionGraphDepth(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphDepth(segment, 0L, value); } + /// Sets `maxExecutionGraphDepth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphDepthAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphDepth(this.segment(), index, value); return this; } + /// Sets `maxExecutionGraphDepth` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphDepth(@CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphDepth(this.segment(), value); return this; } + + /// {@return `maxExecutionGraphShaderOutputNodes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxExecutionGraphShaderOutputNodes(MemorySegment segment, long index) { return (int) VH_maxExecutionGraphShaderOutputNodes.get(segment, 0L, index); } + /// {@return `maxExecutionGraphShaderOutputNodes`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxExecutionGraphShaderOutputNodes(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphShaderOutputNodes(segment, 0L); } + /// {@return `maxExecutionGraphShaderOutputNodes` at the given index} + /// @param index the index + public @CType("uint32_t") int maxExecutionGraphShaderOutputNodesAt(long index) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphShaderOutputNodes(this.segment(), index); } + /// {@return `maxExecutionGraphShaderOutputNodes`} + public @CType("uint32_t") int maxExecutionGraphShaderOutputNodes() { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphShaderOutputNodes(this.segment()); } + /// Sets `maxExecutionGraphShaderOutputNodes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxExecutionGraphShaderOutputNodes(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxExecutionGraphShaderOutputNodes.set(segment, 0L, index, value); } + /// Sets `maxExecutionGraphShaderOutputNodes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxExecutionGraphShaderOutputNodes(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphShaderOutputNodes(segment, 0L, value); } + /// Sets `maxExecutionGraphShaderOutputNodes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphShaderOutputNodesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphShaderOutputNodes(this.segment(), index, value); return this; } + /// Sets `maxExecutionGraphShaderOutputNodes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphShaderOutputNodes(@CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphShaderOutputNodes(this.segment(), value); return this; } + + /// {@return `maxExecutionGraphShaderPayloadSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxExecutionGraphShaderPayloadSize(MemorySegment segment, long index) { return (int) VH_maxExecutionGraphShaderPayloadSize.get(segment, 0L, index); } + /// {@return `maxExecutionGraphShaderPayloadSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxExecutionGraphShaderPayloadSize(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphShaderPayloadSize(segment, 0L); } + /// {@return `maxExecutionGraphShaderPayloadSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxExecutionGraphShaderPayloadSizeAt(long index) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphShaderPayloadSize(this.segment(), index); } + /// {@return `maxExecutionGraphShaderPayloadSize`} + public @CType("uint32_t") int maxExecutionGraphShaderPayloadSize() { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphShaderPayloadSize(this.segment()); } + /// Sets `maxExecutionGraphShaderPayloadSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxExecutionGraphShaderPayloadSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxExecutionGraphShaderPayloadSize.set(segment, 0L, index, value); } + /// Sets `maxExecutionGraphShaderPayloadSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxExecutionGraphShaderPayloadSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphShaderPayloadSize(segment, 0L, value); } + /// Sets `maxExecutionGraphShaderPayloadSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphShaderPayloadSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphShaderPayloadSize(this.segment(), index, value); return this; } + /// Sets `maxExecutionGraphShaderPayloadSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphShaderPayloadSize(@CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphShaderPayloadSize(this.segment(), value); return this; } + + /// {@return `maxExecutionGraphShaderPayloadCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxExecutionGraphShaderPayloadCount(MemorySegment segment, long index) { return (int) VH_maxExecutionGraphShaderPayloadCount.get(segment, 0L, index); } + /// {@return `maxExecutionGraphShaderPayloadCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxExecutionGraphShaderPayloadCount(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphShaderPayloadCount(segment, 0L); } + /// {@return `maxExecutionGraphShaderPayloadCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxExecutionGraphShaderPayloadCountAt(long index) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphShaderPayloadCount(this.segment(), index); } + /// {@return `maxExecutionGraphShaderPayloadCount`} + public @CType("uint32_t") int maxExecutionGraphShaderPayloadCount() { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphShaderPayloadCount(this.segment()); } + /// Sets `maxExecutionGraphShaderPayloadCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxExecutionGraphShaderPayloadCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxExecutionGraphShaderPayloadCount.set(segment, 0L, index, value); } + /// Sets `maxExecutionGraphShaderPayloadCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxExecutionGraphShaderPayloadCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphShaderPayloadCount(segment, 0L, value); } + /// Sets `maxExecutionGraphShaderPayloadCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphShaderPayloadCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphShaderPayloadCount(this.segment(), index, value); return this; } + /// Sets `maxExecutionGraphShaderPayloadCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphShaderPayloadCount(@CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphShaderPayloadCount(this.segment(), value); return this; } + + /// {@return `executionGraphDispatchAddressAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_executionGraphDispatchAddressAlignment(MemorySegment segment, long index) { return (int) VH_executionGraphDispatchAddressAlignment.get(segment, 0L, index); } + /// {@return `executionGraphDispatchAddressAlignment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_executionGraphDispatchAddressAlignment(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_executionGraphDispatchAddressAlignment(segment, 0L); } + /// {@return `executionGraphDispatchAddressAlignment` at the given index} + /// @param index the index + public @CType("uint32_t") int executionGraphDispatchAddressAlignmentAt(long index) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_executionGraphDispatchAddressAlignment(this.segment(), index); } + /// {@return `executionGraphDispatchAddressAlignment`} + public @CType("uint32_t") int executionGraphDispatchAddressAlignment() { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_executionGraphDispatchAddressAlignment(this.segment()); } + /// Sets `executionGraphDispatchAddressAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_executionGraphDispatchAddressAlignment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_executionGraphDispatchAddressAlignment.set(segment, 0L, index, value); } + /// Sets `executionGraphDispatchAddressAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_executionGraphDispatchAddressAlignment(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_executionGraphDispatchAddressAlignment(segment, 0L, value); } + /// Sets `executionGraphDispatchAddressAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX executionGraphDispatchAddressAlignmentAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_executionGraphDispatchAddressAlignment(this.segment(), index, value); return this; } + /// Sets `executionGraphDispatchAddressAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX executionGraphDispatchAddressAlignment(@CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_executionGraphDispatchAddressAlignment(this.segment(), value); return this; } + + /// {@return `maxExecutionGraphWorkgroupCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxExecutionGraphWorkgroupCount(MemorySegment segment, long index) { return (int) VH_maxExecutionGraphWorkgroupCount.get(segment, 0L, index); } + /// {@return `maxExecutionGraphWorkgroupCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxExecutionGraphWorkgroupCount(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphWorkgroupCount(segment, 0L); } + /// {@return `maxExecutionGraphWorkgroupCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxExecutionGraphWorkgroupCountAt(long index) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphWorkgroupCount(this.segment(), index); } + /// {@return `maxExecutionGraphWorkgroupCount`} + public @CType("uint32_t") int maxExecutionGraphWorkgroupCount() { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphWorkgroupCount(this.segment()); } + /// Sets `maxExecutionGraphWorkgroupCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxExecutionGraphWorkgroupCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxExecutionGraphWorkgroupCount.set(segment, 0L, index, value); } + /// Sets `maxExecutionGraphWorkgroupCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxExecutionGraphWorkgroupCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphWorkgroupCount(segment, 0L, value); } + /// Sets `maxExecutionGraphWorkgroupCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphWorkgroupCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphWorkgroupCount(this.segment(), index, value); return this; } + /// Sets `maxExecutionGraphWorkgroupCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphWorkgroupCount(@CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphWorkgroupCount(this.segment(), value); return this; } + + /// {@return `maxExecutionGraphWorkgroups` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxExecutionGraphWorkgroups(MemorySegment segment, long index) { return (int) VH_maxExecutionGraphWorkgroups.get(segment, 0L, index); } + /// {@return `maxExecutionGraphWorkgroups`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxExecutionGraphWorkgroups(MemorySegment segment) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphWorkgroups(segment, 0L); } + /// {@return `maxExecutionGraphWorkgroups` at the given index} + /// @param index the index + public @CType("uint32_t") int maxExecutionGraphWorkgroupsAt(long index) { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphWorkgroups(this.segment(), index); } + /// {@return `maxExecutionGraphWorkgroups`} + public @CType("uint32_t") int maxExecutionGraphWorkgroups() { return VkPhysicalDeviceShaderEnqueuePropertiesAMDX.get_maxExecutionGraphWorkgroups(this.segment()); } + /// Sets `maxExecutionGraphWorkgroups` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxExecutionGraphWorkgroups(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxExecutionGraphWorkgroups.set(segment, 0L, index, value); } + /// Sets `maxExecutionGraphWorkgroups` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxExecutionGraphWorkgroups(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphWorkgroups(segment, 0L, value); } + /// Sets `maxExecutionGraphWorkgroups` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphWorkgroupsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphWorkgroups(this.segment(), index, value); return this; } + /// Sets `maxExecutionGraphWorkgroups` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderEnqueuePropertiesAMDX maxExecutionGraphWorkgroups(@CType("uint32_t") int value) { VkPhysicalDeviceShaderEnqueuePropertiesAMDX.set_maxExecutionGraphWorkgroups(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkPipelineShaderStageNodeCreateInfoAMDX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkPipelineShaderStageNodeCreateInfoAMDX.java new file mode 100644 index 00000000..72499852 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/struct/VkPipelineShaderStageNodeCreateInfoAMDX.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amdx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pName +/// [VarHandle][#VH_pName] - [Getter][#pName()] - [Setter][#pName(java.lang.foreign.MemorySegment)] +/// ### index +/// [VarHandle][#VH_index] - [Getter][#index()] - [Setter][#index(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineShaderStageNodeCreateInfoAMDX { +/// VkStructureType sType; +/// const void * pNext; +/// const char * pName; +/// uint32_t index; +/// } VkPipelineShaderStageNodeCreateInfoAMDX; +/// ``` +public final class VkPipelineShaderStageNodeCreateInfoAMDX extends Struct { + /// The struct layout of `VkPipelineShaderStageNodeCreateInfoAMDX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pName"), + ValueLayout.JAVA_INT.withName("index") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pName")); + /// The [VarHandle] of `index` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_index = LAYOUT.arrayElementVarHandle(PathElement.groupElement("index")); + + /// Creates `VkPipelineShaderStageNodeCreateInfoAMDX` with the given segment. + /// @param segment the memory segment + public VkPipelineShaderStageNodeCreateInfoAMDX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineShaderStageNodeCreateInfoAMDX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageNodeCreateInfoAMDX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageNodeCreateInfoAMDX(segment); } + + /// Creates `VkPipelineShaderStageNodeCreateInfoAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageNodeCreateInfoAMDX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageNodeCreateInfoAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineShaderStageNodeCreateInfoAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageNodeCreateInfoAMDX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageNodeCreateInfoAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineShaderStageNodeCreateInfoAMDX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineShaderStageNodeCreateInfoAMDX` + public static VkPipelineShaderStageNodeCreateInfoAMDX alloc(SegmentAllocator allocator) { return new VkPipelineShaderStageNodeCreateInfoAMDX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineShaderStageNodeCreateInfoAMDX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineShaderStageNodeCreateInfoAMDX` + public static VkPipelineShaderStageNodeCreateInfoAMDX alloc(SegmentAllocator allocator, long count) { return new VkPipelineShaderStageNodeCreateInfoAMDX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType(" VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType(" VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineShaderStageNodeCreateInfoAMDX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType(" VkStructureType") int sTypeAt(long index) { return VkPipelineShaderStageNodeCreateInfoAMDX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType(" VkStructureType") int sType() { return VkPipelineShaderStageNodeCreateInfoAMDX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType(" VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType(" VkStructureType") int value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageNodeCreateInfoAMDX sTypeAt(long index, @CType(" VkStructureType") int value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageNodeCreateInfoAMDX sType(@CType(" VkStructureType") int value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineShaderStageNodeCreateInfoAMDX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineShaderStageNodeCreateInfoAMDX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineShaderStageNodeCreateInfoAMDX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageNodeCreateInfoAMDX pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageNodeCreateInfoAMDX pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_pNext(this.segment(), value); return this; } + + /// {@return `pName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pName.get(segment, 0L, index); } + /// {@return `pName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pName(MemorySegment segment) { return VkPipelineShaderStageNodeCreateInfoAMDX.get_pName(segment, 0L); } + /// {@return `pName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pNameAt(long index) { return VkPipelineShaderStageNodeCreateInfoAMDX.get_pName(this.segment(), index); } + /// {@return `pName`} + public @CType("const char *") java.lang.foreign.MemorySegment pName() { return VkPipelineShaderStageNodeCreateInfoAMDX.get_pName(this.segment()); } + /// Sets `pName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pName.set(segment, 0L, index, value); } + /// Sets `pName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_pName(segment, 0L, value); } + /// Sets `pName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageNodeCreateInfoAMDX pNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_pName(this.segment(), index, value); return this; } + /// Sets `pName` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageNodeCreateInfoAMDX pName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_pName(this.segment(), value); return this; } + + /// {@return `index` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_index(MemorySegment segment, long index) { return (int) VH_index.get(segment, 0L, index); } + /// {@return `index`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_index(MemorySegment segment) { return VkPipelineShaderStageNodeCreateInfoAMDX.get_index(segment, 0L); } + /// {@return `index` at the given index} + /// @param index the index + public @CType("uint32_t") int indexAt(long index) { return VkPipelineShaderStageNodeCreateInfoAMDX.get_index(this.segment(), index); } + /// {@return `index`} + public @CType("uint32_t") int index() { return VkPipelineShaderStageNodeCreateInfoAMDX.get_index(this.segment()); } + /// Sets `index` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_index(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_index.set(segment, 0L, index, value); } + /// Sets `index` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_index(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_index(segment, 0L, value); } + /// Sets `index` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageNodeCreateInfoAMDX indexAt(long index, @CType("uint32_t") int value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_index(this.segment(), index, value); return this; } + /// Sets `index` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageNodeCreateInfoAMDX index(@CType("uint32_t") int value) { VkPipelineShaderStageNodeCreateInfoAMDX.set_index(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/union/VkDeviceOrHostAddressConstAMDX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/union/VkDeviceOrHostAddressConstAMDX.java new file mode 100644 index 00000000..14cc4dc1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/amdx/union/VkDeviceOrHostAddressConstAMDX.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.amdx.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### deviceAddress +/// [VarHandle][#VH_deviceAddress] - [Getter][#deviceAddress()] - [Setter][#deviceAddress(long)] +/// ### hostAddress +/// [VarHandle][#VH_hostAddress] - [Getter][#hostAddress()] - [Setter][#hostAddress(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkDeviceOrHostAddressConstAMDX { +/// VkDeviceAddress deviceAddress; +/// const void * hostAddress; +/// } VkDeviceOrHostAddressConstAMDX; +/// ``` +public final class VkDeviceOrHostAddressConstAMDX extends Union { + /// The union layout of `VkDeviceOrHostAddressConstAMDX`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + ValueLayout.JAVA_LONG.withName("deviceAddress"), + ValueLayout.ADDRESS.withName("hostAddress") + ); + /// The [VarHandle] of `deviceAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_deviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceAddress")); + /// The [VarHandle] of `hostAddress` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_hostAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hostAddress")); + + /// Creates `VkDeviceOrHostAddressConstAMDX` with the given segment. + /// @param segment the memory segment + public VkDeviceOrHostAddressConstAMDX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceOrHostAddressConstAMDX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceOrHostAddressConstAMDX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceOrHostAddressConstAMDX(segment); } + + /// Creates `VkDeviceOrHostAddressConstAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceOrHostAddressConstAMDX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceOrHostAddressConstAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceOrHostAddressConstAMDX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceOrHostAddressConstAMDX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceOrHostAddressConstAMDX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceOrHostAddressConstAMDX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceOrHostAddressConstAMDX` + public static VkDeviceOrHostAddressConstAMDX alloc(SegmentAllocator allocator) { return new VkDeviceOrHostAddressConstAMDX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceOrHostAddressConstAMDX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceOrHostAddressConstAMDX` + public static VkDeviceOrHostAddressConstAMDX alloc(SegmentAllocator allocator, long count) { return new VkDeviceOrHostAddressConstAMDX(allocator.allocate(LAYOUT, count)); } + + /// {@return `deviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment, long index) { return (long) VH_deviceAddress.get(segment, 0L, index); } + /// {@return `deviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment) { return VkDeviceOrHostAddressConstAMDX.get_deviceAddress(segment, 0L); } + /// {@return `deviceAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long deviceAddressAt(long index) { return VkDeviceOrHostAddressConstAMDX.get_deviceAddress(this.segment(), index); } + /// {@return `deviceAddress`} + public @CType("VkDeviceAddress") long deviceAddress() { return VkDeviceOrHostAddressConstAMDX.get_deviceAddress(this.segment()); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_deviceAddress.set(segment, 0L, index, value); } + /// Sets `deviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDeviceOrHostAddressConstAMDX.set_deviceAddress(segment, 0L, value); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressConstAMDX deviceAddressAt(long index, @CType("VkDeviceAddress") long value) { VkDeviceOrHostAddressConstAMDX.set_deviceAddress(this.segment(), index, value); return this; } + /// Sets `deviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressConstAMDX deviceAddress(@CType("VkDeviceAddress") long value) { VkDeviceOrHostAddressConstAMDX.set_deviceAddress(this.segment(), value); return this; } + + /// {@return `hostAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_hostAddress(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_hostAddress.get(segment, 0L, index); } + /// {@return `hostAddress`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_hostAddress(MemorySegment segment) { return VkDeviceOrHostAddressConstAMDX.get_hostAddress(segment, 0L); } + /// {@return `hostAddress` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment hostAddressAt(long index) { return VkDeviceOrHostAddressConstAMDX.get_hostAddress(this.segment(), index); } + /// {@return `hostAddress`} + public @CType("const void *") java.lang.foreign.MemorySegment hostAddress() { return VkDeviceOrHostAddressConstAMDX.get_hostAddress(this.segment()); } + /// Sets `hostAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hostAddress(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_hostAddress.set(segment, 0L, index, value); } + /// Sets `hostAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hostAddress(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceOrHostAddressConstAMDX.set_hostAddress(segment, 0L, value); } + /// Sets `hostAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressConstAMDX hostAddressAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceOrHostAddressConstAMDX.set_hostAddress(this.segment(), index, value); return this; } + /// Sets `hostAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressConstAMDX hostAddress(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceOrHostAddressConstAMDX.set_hostAddress(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/VKANDROIDExternalFormatResolve.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/VKANDROIDExternalFormatResolve.java new file mode 100644 index 00000000..eee92121 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/VKANDROIDExternalFormatResolve.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKANDROIDExternalFormatResolve { + public static final int VK_ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION = 1; + public static final String VK_ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME = "VK_ANDROID_external_format_resolve"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID = 1000468000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468001; + public static final int VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468002; + public static final int VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID = 0x00000010; + + public VKANDROIDExternalFormatResolve(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/VKANDROIDExternalMemoryAndroidHardwareBuffer.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/VKANDROIDExternalMemoryAndroidHardwareBuffer.java new file mode 100644 index 00000000..459836c4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/VKANDROIDExternalMemoryAndroidHardwareBuffer.java @@ -0,0 +1,58 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKANDROIDExternalMemoryAndroidHardwareBuffer { + public static final int VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION = 5; + public static final String VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME = "VK_ANDROID_external_memory_android_hardware_buffer"; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID = 0x00000400; + public static final int VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID = 1000129000; + public static final int VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID = 1000129001; + public static final int VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID = 1000129002; + public static final int VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003; + public static final int VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID = 1000129005; + public static final int VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006; + public static final MethodHandle MH_vkGetAndroidHardwareBufferPropertiesANDROID = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetMemoryAndroidHardwareBufferANDROID = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetAndroidHardwareBufferPropertiesANDROID; + public final MemorySegment PFN_vkGetMemoryAndroidHardwareBufferANDROID; + + public VKANDROIDExternalMemoryAndroidHardwareBuffer(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetAndroidHardwareBufferPropertiesANDROID = func.invoke(device, "vkGetAndroidHardwareBufferPropertiesANDROID"); + PFN_vkGetMemoryAndroidHardwareBufferANDROID = func.invoke(device, "vkGetMemoryAndroidHardwareBufferANDROID"); + } + + public @CType("VkResult") int GetAndroidHardwareBufferPropertiesANDROID(@CType("VkDevice") MemorySegment device, @CType("const struct AHardwareBuffer *") MemorySegment buffer, @CType("VkAndroidHardwareBufferPropertiesANDROID *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetAndroidHardwareBufferPropertiesANDROID)) throw new SymbolNotFoundError("Symbol not found: vkGetAndroidHardwareBufferPropertiesANDROID"); + try { return (int) MH_vkGetAndroidHardwareBufferPropertiesANDROID.invokeExact(PFN_vkGetAndroidHardwareBufferPropertiesANDROID, device, buffer, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetAndroidHardwareBufferPropertiesANDROID", e); } + } + + public @CType("VkResult") int GetMemoryAndroidHardwareBufferANDROID(@CType("VkDevice") MemorySegment device, @CType("const VkMemoryGetAndroidHardwareBufferInfoANDROID *") MemorySegment pInfo, @CType("struct AHardwareBuffer **") MemorySegment pBuffer) { + if (Unmarshal.isNullPointer(PFN_vkGetMemoryAndroidHardwareBufferANDROID)) throw new SymbolNotFoundError("Symbol not found: vkGetMemoryAndroidHardwareBufferANDROID"); + try { return (int) MH_vkGetMemoryAndroidHardwareBufferANDROID.invokeExact(PFN_vkGetMemoryAndroidHardwareBufferANDROID, device, pInfo, pBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMemoryAndroidHardwareBufferANDROID", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferFormatProperties2ANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferFormatProperties2ANDROID.java new file mode 100644 index 00000000..50814ab8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferFormatProperties2ANDROID.java @@ -0,0 +1,446 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### externalFormat +/// [VarHandle][#VH_externalFormat] - [Getter][#externalFormat()] - [Setter][#externalFormat(long)] +/// ### formatFeatures +/// [VarHandle][#VH_formatFeatures] - [Getter][#formatFeatures()] - [Setter][#formatFeatures(long)] +/// ### samplerYcbcrConversionComponents +/// [Byte offset][#OFFSET_samplerYcbcrConversionComponents] - [Memory layout][#ML_samplerYcbcrConversionComponents] - [Getter][#samplerYcbcrConversionComponents()] - [Setter][#samplerYcbcrConversionComponents(java.lang.foreign.MemorySegment)] +/// ### suggestedYcbcrModel +/// [VarHandle][#VH_suggestedYcbcrModel] - [Getter][#suggestedYcbcrModel()] - [Setter][#suggestedYcbcrModel(int)] +/// ### suggestedYcbcrRange +/// [VarHandle][#VH_suggestedYcbcrRange] - [Getter][#suggestedYcbcrRange()] - [Setter][#suggestedYcbcrRange(int)] +/// ### suggestedXChromaOffset +/// [VarHandle][#VH_suggestedXChromaOffset] - [Getter][#suggestedXChromaOffset()] - [Setter][#suggestedXChromaOffset(int)] +/// ### suggestedYChromaOffset +/// [VarHandle][#VH_suggestedYChromaOffset] - [Getter][#suggestedYChromaOffset()] - [Setter][#suggestedYChromaOffset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID { +/// VkStructureType sType; +/// void * pNext; +/// VkFormat format; +/// uint64_t externalFormat; +/// VkFormatFeatureFlags2 formatFeatures; +/// VkComponentMapping samplerYcbcrConversionComponents; +/// VkSamplerYcbcrModelConversion suggestedYcbcrModel; +/// VkSamplerYcbcrRange suggestedYcbcrRange; +/// VkChromaLocation suggestedXChromaOffset; +/// VkChromaLocation suggestedYChromaOffset; +/// } VkAndroidHardwareBufferFormatProperties2ANDROID; +/// ``` +public final class VkAndroidHardwareBufferFormatProperties2ANDROID extends Struct { + /// The struct layout of `VkAndroidHardwareBufferFormatProperties2ANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_LONG.withName("externalFormat"), + ValueLayout.JAVA_LONG.withName("formatFeatures"), + overrungl.vulkan.struct.VkComponentMapping.LAYOUT.withName("samplerYcbcrConversionComponents"), + ValueLayout.JAVA_INT.withName("suggestedYcbcrModel"), + ValueLayout.JAVA_INT.withName("suggestedYcbcrRange"), + ValueLayout.JAVA_INT.withName("suggestedXChromaOffset"), + ValueLayout.JAVA_INT.withName("suggestedYChromaOffset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `externalFormat` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_externalFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalFormat")); + /// The [VarHandle] of `formatFeatures` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_formatFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("formatFeatures")); + /// The byte offset of `samplerYcbcrConversionComponents`. + public static final long OFFSET_samplerYcbcrConversionComponents = LAYOUT.byteOffset(PathElement.groupElement("samplerYcbcrConversionComponents")); + /// The memory layout of `samplerYcbcrConversionComponents`. + public static final MemoryLayout ML_samplerYcbcrConversionComponents = LAYOUT.select(PathElement.groupElement("samplerYcbcrConversionComponents")); + /// The [VarHandle] of `suggestedYcbcrModel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYcbcrModel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYcbcrModel")); + /// The [VarHandle] of `suggestedYcbcrRange` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYcbcrRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYcbcrRange")); + /// The [VarHandle] of `suggestedXChromaOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedXChromaOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedXChromaOffset")); + /// The [VarHandle] of `suggestedYChromaOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYChromaOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYChromaOffset")); + + /// Creates `VkAndroidHardwareBufferFormatProperties2ANDROID` with the given segment. + /// @param segment the memory segment + public VkAndroidHardwareBufferFormatProperties2ANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAndroidHardwareBufferFormatProperties2ANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferFormatProperties2ANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferFormatProperties2ANDROID(segment); } + + /// Creates `VkAndroidHardwareBufferFormatProperties2ANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferFormatProperties2ANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferFormatProperties2ANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAndroidHardwareBufferFormatProperties2ANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferFormatProperties2ANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferFormatProperties2ANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAndroidHardwareBufferFormatProperties2ANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAndroidHardwareBufferFormatProperties2ANDROID` + public static VkAndroidHardwareBufferFormatProperties2ANDROID alloc(SegmentAllocator allocator) { return new VkAndroidHardwareBufferFormatProperties2ANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAndroidHardwareBufferFormatProperties2ANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAndroidHardwareBufferFormatProperties2ANDROID` + public static VkAndroidHardwareBufferFormatProperties2ANDROID alloc(SegmentAllocator allocator, long count) { return new VkAndroidHardwareBufferFormatProperties2ANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID sType(@CType("VkStructureType") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID formatAt(long index, @CType("VkFormat") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID format(@CType("VkFormat") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_format(this.segment(), value); return this; } + + /// {@return `externalFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_externalFormat(MemorySegment segment, long index) { return (long) VH_externalFormat.get(segment, 0L, index); } + /// {@return `externalFormat`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_externalFormat(MemorySegment segment) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_externalFormat(segment, 0L); } + /// {@return `externalFormat` at the given index} + /// @param index the index + public @CType("uint64_t") long externalFormatAt(long index) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_externalFormat(this.segment(), index); } + /// {@return `externalFormat`} + public @CType("uint64_t") long externalFormat() { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_externalFormat(this.segment()); } + /// Sets `externalFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalFormat(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_externalFormat.set(segment, 0L, index, value); } + /// Sets `externalFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalFormat(MemorySegment segment, @CType("uint64_t") long value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_externalFormat(segment, 0L, value); } + /// Sets `externalFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID externalFormatAt(long index, @CType("uint64_t") long value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_externalFormat(this.segment(), index, value); return this; } + /// Sets `externalFormat` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID externalFormat(@CType("uint64_t") long value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_externalFormat(this.segment(), value); return this; } + + /// {@return `formatFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags2") long get_formatFeatures(MemorySegment segment, long index) { return (long) VH_formatFeatures.get(segment, 0L, index); } + /// {@return `formatFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags2") long get_formatFeatures(MemorySegment segment) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_formatFeatures(segment, 0L); } + /// {@return `formatFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags2") long formatFeaturesAt(long index) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_formatFeatures(this.segment(), index); } + /// {@return `formatFeatures`} + public @CType("VkFormatFeatureFlags2") long formatFeatures() { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_formatFeatures(this.segment()); } + /// Sets `formatFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_formatFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags2") long value) { VH_formatFeatures.set(segment, 0L, index, value); } + /// Sets `formatFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_formatFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags2") long value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_formatFeatures(segment, 0L, value); } + /// Sets `formatFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID formatFeaturesAt(long index, @CType("VkFormatFeatureFlags2") long value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_formatFeatures(this.segment(), index, value); return this; } + /// Sets `formatFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID formatFeatures(@CType("VkFormatFeatureFlags2") long value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_formatFeatures(this.segment(), value); return this; } + + /// {@return `samplerYcbcrConversionComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_samplerYcbcrConversionComponents(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_samplerYcbcrConversionComponents, index), ML_samplerYcbcrConversionComponents); } + /// {@return `samplerYcbcrConversionComponents`} + /// @param segment the segment of the struct + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_samplerYcbcrConversionComponents(MemorySegment segment) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_samplerYcbcrConversionComponents(segment, 0L); } + /// {@return `samplerYcbcrConversionComponents` at the given index} + /// @param index the index + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment samplerYcbcrConversionComponentsAt(long index) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_samplerYcbcrConversionComponents(this.segment(), index); } + /// {@return `samplerYcbcrConversionComponents`} + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment samplerYcbcrConversionComponents() { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_samplerYcbcrConversionComponents(this.segment()); } + /// Sets `samplerYcbcrConversionComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerYcbcrConversionComponents(MemorySegment segment, long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_samplerYcbcrConversionComponents, index), ML_samplerYcbcrConversionComponents.byteSize()); } + /// Sets `samplerYcbcrConversionComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerYcbcrConversionComponents(MemorySegment segment, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_samplerYcbcrConversionComponents(segment, 0L, value); } + /// Sets `samplerYcbcrConversionComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID samplerYcbcrConversionComponentsAt(long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_samplerYcbcrConversionComponents(this.segment(), index, value); return this; } + /// Sets `samplerYcbcrConversionComponents` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID samplerYcbcrConversionComponents(@CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_samplerYcbcrConversionComponents(this.segment(), value); return this; } + + /// {@return `suggestedYcbcrModel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrModelConversion") int get_suggestedYcbcrModel(MemorySegment segment, long index) { return (int) VH_suggestedYcbcrModel.get(segment, 0L, index); } + /// {@return `suggestedYcbcrModel`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrModelConversion") int get_suggestedYcbcrModel(MemorySegment segment) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedYcbcrModel(segment, 0L); } + /// {@return `suggestedYcbcrModel` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrModelConversion") int suggestedYcbcrModelAt(long index) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedYcbcrModel(this.segment(), index); } + /// {@return `suggestedYcbcrModel`} + public @CType("VkSamplerYcbcrModelConversion") int suggestedYcbcrModel() { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedYcbcrModel(this.segment()); } + /// Sets `suggestedYcbcrModel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYcbcrModel(MemorySegment segment, long index, @CType("VkSamplerYcbcrModelConversion") int value) { VH_suggestedYcbcrModel.set(segment, 0L, index, value); } + /// Sets `suggestedYcbcrModel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYcbcrModel(MemorySegment segment, @CType("VkSamplerYcbcrModelConversion") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedYcbcrModel(segment, 0L, value); } + /// Sets `suggestedYcbcrModel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID suggestedYcbcrModelAt(long index, @CType("VkSamplerYcbcrModelConversion") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedYcbcrModel(this.segment(), index, value); return this; } + /// Sets `suggestedYcbcrModel` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID suggestedYcbcrModel(@CType("VkSamplerYcbcrModelConversion") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedYcbcrModel(this.segment(), value); return this; } + + /// {@return `suggestedYcbcrRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrRange") int get_suggestedYcbcrRange(MemorySegment segment, long index) { return (int) VH_suggestedYcbcrRange.get(segment, 0L, index); } + /// {@return `suggestedYcbcrRange`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrRange") int get_suggestedYcbcrRange(MemorySegment segment) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedYcbcrRange(segment, 0L); } + /// {@return `suggestedYcbcrRange` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrRange") int suggestedYcbcrRangeAt(long index) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedYcbcrRange(this.segment(), index); } + /// {@return `suggestedYcbcrRange`} + public @CType("VkSamplerYcbcrRange") int suggestedYcbcrRange() { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedYcbcrRange(this.segment()); } + /// Sets `suggestedYcbcrRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYcbcrRange(MemorySegment segment, long index, @CType("VkSamplerYcbcrRange") int value) { VH_suggestedYcbcrRange.set(segment, 0L, index, value); } + /// Sets `suggestedYcbcrRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYcbcrRange(MemorySegment segment, @CType("VkSamplerYcbcrRange") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedYcbcrRange(segment, 0L, value); } + /// Sets `suggestedYcbcrRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID suggestedYcbcrRangeAt(long index, @CType("VkSamplerYcbcrRange") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedYcbcrRange(this.segment(), index, value); return this; } + /// Sets `suggestedYcbcrRange` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID suggestedYcbcrRange(@CType("VkSamplerYcbcrRange") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedYcbcrRange(this.segment(), value); return this; } + + /// {@return `suggestedXChromaOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_suggestedXChromaOffset(MemorySegment segment, long index) { return (int) VH_suggestedXChromaOffset.get(segment, 0L, index); } + /// {@return `suggestedXChromaOffset`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_suggestedXChromaOffset(MemorySegment segment) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedXChromaOffset(segment, 0L); } + /// {@return `suggestedXChromaOffset` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int suggestedXChromaOffsetAt(long index) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedXChromaOffset(this.segment(), index); } + /// {@return `suggestedXChromaOffset`} + public @CType("VkChromaLocation") int suggestedXChromaOffset() { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedXChromaOffset(this.segment()); } + /// Sets `suggestedXChromaOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedXChromaOffset(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_suggestedXChromaOffset.set(segment, 0L, index, value); } + /// Sets `suggestedXChromaOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedXChromaOffset(MemorySegment segment, @CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedXChromaOffset(segment, 0L, value); } + /// Sets `suggestedXChromaOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID suggestedXChromaOffsetAt(long index, @CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedXChromaOffset(this.segment(), index, value); return this; } + /// Sets `suggestedXChromaOffset` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID suggestedXChromaOffset(@CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedXChromaOffset(this.segment(), value); return this; } + + /// {@return `suggestedYChromaOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_suggestedYChromaOffset(MemorySegment segment, long index) { return (int) VH_suggestedYChromaOffset.get(segment, 0L, index); } + /// {@return `suggestedYChromaOffset`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_suggestedYChromaOffset(MemorySegment segment) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedYChromaOffset(segment, 0L); } + /// {@return `suggestedYChromaOffset` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int suggestedYChromaOffsetAt(long index) { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedYChromaOffset(this.segment(), index); } + /// {@return `suggestedYChromaOffset`} + public @CType("VkChromaLocation") int suggestedYChromaOffset() { return VkAndroidHardwareBufferFormatProperties2ANDROID.get_suggestedYChromaOffset(this.segment()); } + /// Sets `suggestedYChromaOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYChromaOffset(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_suggestedYChromaOffset.set(segment, 0L, index, value); } + /// Sets `suggestedYChromaOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYChromaOffset(MemorySegment segment, @CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedYChromaOffset(segment, 0L, value); } + /// Sets `suggestedYChromaOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID suggestedYChromaOffsetAt(long index, @CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedYChromaOffset(this.segment(), index, value); return this; } + /// Sets `suggestedYChromaOffset` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatProperties2ANDROID suggestedYChromaOffset(@CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatProperties2ANDROID.set_suggestedYChromaOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferFormatPropertiesANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferFormatPropertiesANDROID.java new file mode 100644 index 00000000..4eab119e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferFormatPropertiesANDROID.java @@ -0,0 +1,446 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### externalFormat +/// [VarHandle][#VH_externalFormat] - [Getter][#externalFormat()] - [Setter][#externalFormat(long)] +/// ### formatFeatures +/// [VarHandle][#VH_formatFeatures] - [Getter][#formatFeatures()] - [Setter][#formatFeatures(int)] +/// ### samplerYcbcrConversionComponents +/// [Byte offset][#OFFSET_samplerYcbcrConversionComponents] - [Memory layout][#ML_samplerYcbcrConversionComponents] - [Getter][#samplerYcbcrConversionComponents()] - [Setter][#samplerYcbcrConversionComponents(java.lang.foreign.MemorySegment)] +/// ### suggestedYcbcrModel +/// [VarHandle][#VH_suggestedYcbcrModel] - [Getter][#suggestedYcbcrModel()] - [Setter][#suggestedYcbcrModel(int)] +/// ### suggestedYcbcrRange +/// [VarHandle][#VH_suggestedYcbcrRange] - [Getter][#suggestedYcbcrRange()] - [Setter][#suggestedYcbcrRange(int)] +/// ### suggestedXChromaOffset +/// [VarHandle][#VH_suggestedXChromaOffset] - [Getter][#suggestedXChromaOffset()] - [Setter][#suggestedXChromaOffset(int)] +/// ### suggestedYChromaOffset +/// [VarHandle][#VH_suggestedYChromaOffset] - [Getter][#suggestedYChromaOffset()] - [Setter][#suggestedYChromaOffset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID { +/// VkStructureType sType; +/// void * pNext; +/// VkFormat format; +/// uint64_t externalFormat; +/// VkFormatFeatureFlags formatFeatures; +/// VkComponentMapping samplerYcbcrConversionComponents; +/// VkSamplerYcbcrModelConversion suggestedYcbcrModel; +/// VkSamplerYcbcrRange suggestedYcbcrRange; +/// VkChromaLocation suggestedXChromaOffset; +/// VkChromaLocation suggestedYChromaOffset; +/// } VkAndroidHardwareBufferFormatPropertiesANDROID; +/// ``` +public final class VkAndroidHardwareBufferFormatPropertiesANDROID extends Struct { + /// The struct layout of `VkAndroidHardwareBufferFormatPropertiesANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_LONG.withName("externalFormat"), + ValueLayout.JAVA_INT.withName("formatFeatures"), + overrungl.vulkan.struct.VkComponentMapping.LAYOUT.withName("samplerYcbcrConversionComponents"), + ValueLayout.JAVA_INT.withName("suggestedYcbcrModel"), + ValueLayout.JAVA_INT.withName("suggestedYcbcrRange"), + ValueLayout.JAVA_INT.withName("suggestedXChromaOffset"), + ValueLayout.JAVA_INT.withName("suggestedYChromaOffset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `externalFormat` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_externalFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalFormat")); + /// The [VarHandle] of `formatFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_formatFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("formatFeatures")); + /// The byte offset of `samplerYcbcrConversionComponents`. + public static final long OFFSET_samplerYcbcrConversionComponents = LAYOUT.byteOffset(PathElement.groupElement("samplerYcbcrConversionComponents")); + /// The memory layout of `samplerYcbcrConversionComponents`. + public static final MemoryLayout ML_samplerYcbcrConversionComponents = LAYOUT.select(PathElement.groupElement("samplerYcbcrConversionComponents")); + /// The [VarHandle] of `suggestedYcbcrModel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYcbcrModel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYcbcrModel")); + /// The [VarHandle] of `suggestedYcbcrRange` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYcbcrRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYcbcrRange")); + /// The [VarHandle] of `suggestedXChromaOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedXChromaOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedXChromaOffset")); + /// The [VarHandle] of `suggestedYChromaOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYChromaOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYChromaOffset")); + + /// Creates `VkAndroidHardwareBufferFormatPropertiesANDROID` with the given segment. + /// @param segment the memory segment + public VkAndroidHardwareBufferFormatPropertiesANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAndroidHardwareBufferFormatPropertiesANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferFormatPropertiesANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferFormatPropertiesANDROID(segment); } + + /// Creates `VkAndroidHardwareBufferFormatPropertiesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferFormatPropertiesANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferFormatPropertiesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAndroidHardwareBufferFormatPropertiesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferFormatPropertiesANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferFormatPropertiesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAndroidHardwareBufferFormatPropertiesANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAndroidHardwareBufferFormatPropertiesANDROID` + public static VkAndroidHardwareBufferFormatPropertiesANDROID alloc(SegmentAllocator allocator) { return new VkAndroidHardwareBufferFormatPropertiesANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAndroidHardwareBufferFormatPropertiesANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAndroidHardwareBufferFormatPropertiesANDROID` + public static VkAndroidHardwareBufferFormatPropertiesANDROID alloc(SegmentAllocator allocator, long count) { return new VkAndroidHardwareBufferFormatPropertiesANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID sType(@CType("VkStructureType") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID formatAt(long index, @CType("VkFormat") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID format(@CType("VkFormat") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_format(this.segment(), value); return this; } + + /// {@return `externalFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_externalFormat(MemorySegment segment, long index) { return (long) VH_externalFormat.get(segment, 0L, index); } + /// {@return `externalFormat`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_externalFormat(MemorySegment segment) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_externalFormat(segment, 0L); } + /// {@return `externalFormat` at the given index} + /// @param index the index + public @CType("uint64_t") long externalFormatAt(long index) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_externalFormat(this.segment(), index); } + /// {@return `externalFormat`} + public @CType("uint64_t") long externalFormat() { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_externalFormat(this.segment()); } + /// Sets `externalFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalFormat(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_externalFormat.set(segment, 0L, index, value); } + /// Sets `externalFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalFormat(MemorySegment segment, @CType("uint64_t") long value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_externalFormat(segment, 0L, value); } + /// Sets `externalFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID externalFormatAt(long index, @CType("uint64_t") long value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_externalFormat(this.segment(), index, value); return this; } + /// Sets `externalFormat` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID externalFormat(@CType("uint64_t") long value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_externalFormat(this.segment(), value); return this; } + + /// {@return `formatFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags") int get_formatFeatures(MemorySegment segment, long index) { return (int) VH_formatFeatures.get(segment, 0L, index); } + /// {@return `formatFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags") int get_formatFeatures(MemorySegment segment) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_formatFeatures(segment, 0L); } + /// {@return `formatFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags") int formatFeaturesAt(long index) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_formatFeatures(this.segment(), index); } + /// {@return `formatFeatures`} + public @CType("VkFormatFeatureFlags") int formatFeatures() { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_formatFeatures(this.segment()); } + /// Sets `formatFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_formatFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags") int value) { VH_formatFeatures.set(segment, 0L, index, value); } + /// Sets `formatFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_formatFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_formatFeatures(segment, 0L, value); } + /// Sets `formatFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID formatFeaturesAt(long index, @CType("VkFormatFeatureFlags") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_formatFeatures(this.segment(), index, value); return this; } + /// Sets `formatFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID formatFeatures(@CType("VkFormatFeatureFlags") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_formatFeatures(this.segment(), value); return this; } + + /// {@return `samplerYcbcrConversionComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_samplerYcbcrConversionComponents(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_samplerYcbcrConversionComponents, index), ML_samplerYcbcrConversionComponents); } + /// {@return `samplerYcbcrConversionComponents`} + /// @param segment the segment of the struct + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_samplerYcbcrConversionComponents(MemorySegment segment) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_samplerYcbcrConversionComponents(segment, 0L); } + /// {@return `samplerYcbcrConversionComponents` at the given index} + /// @param index the index + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment samplerYcbcrConversionComponentsAt(long index) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_samplerYcbcrConversionComponents(this.segment(), index); } + /// {@return `samplerYcbcrConversionComponents`} + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment samplerYcbcrConversionComponents() { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_samplerYcbcrConversionComponents(this.segment()); } + /// Sets `samplerYcbcrConversionComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerYcbcrConversionComponents(MemorySegment segment, long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_samplerYcbcrConversionComponents, index), ML_samplerYcbcrConversionComponents.byteSize()); } + /// Sets `samplerYcbcrConversionComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerYcbcrConversionComponents(MemorySegment segment, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_samplerYcbcrConversionComponents(segment, 0L, value); } + /// Sets `samplerYcbcrConversionComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID samplerYcbcrConversionComponentsAt(long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_samplerYcbcrConversionComponents(this.segment(), index, value); return this; } + /// Sets `samplerYcbcrConversionComponents` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID samplerYcbcrConversionComponents(@CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_samplerYcbcrConversionComponents(this.segment(), value); return this; } + + /// {@return `suggestedYcbcrModel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrModelConversion") int get_suggestedYcbcrModel(MemorySegment segment, long index) { return (int) VH_suggestedYcbcrModel.get(segment, 0L, index); } + /// {@return `suggestedYcbcrModel`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrModelConversion") int get_suggestedYcbcrModel(MemorySegment segment) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedYcbcrModel(segment, 0L); } + /// {@return `suggestedYcbcrModel` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrModelConversion") int suggestedYcbcrModelAt(long index) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedYcbcrModel(this.segment(), index); } + /// {@return `suggestedYcbcrModel`} + public @CType("VkSamplerYcbcrModelConversion") int suggestedYcbcrModel() { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedYcbcrModel(this.segment()); } + /// Sets `suggestedYcbcrModel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYcbcrModel(MemorySegment segment, long index, @CType("VkSamplerYcbcrModelConversion") int value) { VH_suggestedYcbcrModel.set(segment, 0L, index, value); } + /// Sets `suggestedYcbcrModel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYcbcrModel(MemorySegment segment, @CType("VkSamplerYcbcrModelConversion") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedYcbcrModel(segment, 0L, value); } + /// Sets `suggestedYcbcrModel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID suggestedYcbcrModelAt(long index, @CType("VkSamplerYcbcrModelConversion") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedYcbcrModel(this.segment(), index, value); return this; } + /// Sets `suggestedYcbcrModel` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID suggestedYcbcrModel(@CType("VkSamplerYcbcrModelConversion") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedYcbcrModel(this.segment(), value); return this; } + + /// {@return `suggestedYcbcrRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrRange") int get_suggestedYcbcrRange(MemorySegment segment, long index) { return (int) VH_suggestedYcbcrRange.get(segment, 0L, index); } + /// {@return `suggestedYcbcrRange`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrRange") int get_suggestedYcbcrRange(MemorySegment segment) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedYcbcrRange(segment, 0L); } + /// {@return `suggestedYcbcrRange` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrRange") int suggestedYcbcrRangeAt(long index) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedYcbcrRange(this.segment(), index); } + /// {@return `suggestedYcbcrRange`} + public @CType("VkSamplerYcbcrRange") int suggestedYcbcrRange() { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedYcbcrRange(this.segment()); } + /// Sets `suggestedYcbcrRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYcbcrRange(MemorySegment segment, long index, @CType("VkSamplerYcbcrRange") int value) { VH_suggestedYcbcrRange.set(segment, 0L, index, value); } + /// Sets `suggestedYcbcrRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYcbcrRange(MemorySegment segment, @CType("VkSamplerYcbcrRange") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedYcbcrRange(segment, 0L, value); } + /// Sets `suggestedYcbcrRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID suggestedYcbcrRangeAt(long index, @CType("VkSamplerYcbcrRange") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedYcbcrRange(this.segment(), index, value); return this; } + /// Sets `suggestedYcbcrRange` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID suggestedYcbcrRange(@CType("VkSamplerYcbcrRange") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedYcbcrRange(this.segment(), value); return this; } + + /// {@return `suggestedXChromaOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_suggestedXChromaOffset(MemorySegment segment, long index) { return (int) VH_suggestedXChromaOffset.get(segment, 0L, index); } + /// {@return `suggestedXChromaOffset`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_suggestedXChromaOffset(MemorySegment segment) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedXChromaOffset(segment, 0L); } + /// {@return `suggestedXChromaOffset` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int suggestedXChromaOffsetAt(long index) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedXChromaOffset(this.segment(), index); } + /// {@return `suggestedXChromaOffset`} + public @CType("VkChromaLocation") int suggestedXChromaOffset() { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedXChromaOffset(this.segment()); } + /// Sets `suggestedXChromaOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedXChromaOffset(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_suggestedXChromaOffset.set(segment, 0L, index, value); } + /// Sets `suggestedXChromaOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedXChromaOffset(MemorySegment segment, @CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedXChromaOffset(segment, 0L, value); } + /// Sets `suggestedXChromaOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID suggestedXChromaOffsetAt(long index, @CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedXChromaOffset(this.segment(), index, value); return this; } + /// Sets `suggestedXChromaOffset` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID suggestedXChromaOffset(@CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedXChromaOffset(this.segment(), value); return this; } + + /// {@return `suggestedYChromaOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_suggestedYChromaOffset(MemorySegment segment, long index) { return (int) VH_suggestedYChromaOffset.get(segment, 0L, index); } + /// {@return `suggestedYChromaOffset`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_suggestedYChromaOffset(MemorySegment segment) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedYChromaOffset(segment, 0L); } + /// {@return `suggestedYChromaOffset` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int suggestedYChromaOffsetAt(long index) { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedYChromaOffset(this.segment(), index); } + /// {@return `suggestedYChromaOffset`} + public @CType("VkChromaLocation") int suggestedYChromaOffset() { return VkAndroidHardwareBufferFormatPropertiesANDROID.get_suggestedYChromaOffset(this.segment()); } + /// Sets `suggestedYChromaOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYChromaOffset(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_suggestedYChromaOffset.set(segment, 0L, index, value); } + /// Sets `suggestedYChromaOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYChromaOffset(MemorySegment segment, @CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedYChromaOffset(segment, 0L, value); } + /// Sets `suggestedYChromaOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID suggestedYChromaOffsetAt(long index, @CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedYChromaOffset(this.segment(), index, value); return this; } + /// Sets `suggestedYChromaOffset` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatPropertiesANDROID suggestedYChromaOffset(@CType("VkChromaLocation") int value) { VkAndroidHardwareBufferFormatPropertiesANDROID.set_suggestedYChromaOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferFormatResolvePropertiesANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferFormatResolvePropertiesANDROID.java new file mode 100644 index 00000000..92dd0cad --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferFormatResolvePropertiesANDROID.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### colorAttachmentFormat +/// [VarHandle][#VH_colorAttachmentFormat] - [Getter][#colorAttachmentFormat()] - [Setter][#colorAttachmentFormat(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAndroidHardwareBufferFormatResolvePropertiesANDROID { +/// VkStructureType sType; +/// void * pNext; +/// VkFormat colorAttachmentFormat; +/// } VkAndroidHardwareBufferFormatResolvePropertiesANDROID; +/// ``` +public final class VkAndroidHardwareBufferFormatResolvePropertiesANDROID extends Struct { + /// The struct layout of `VkAndroidHardwareBufferFormatResolvePropertiesANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("colorAttachmentFormat") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `colorAttachmentFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachmentFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachmentFormat")); + + /// Creates `VkAndroidHardwareBufferFormatResolvePropertiesANDROID` with the given segment. + /// @param segment the memory segment + public VkAndroidHardwareBufferFormatResolvePropertiesANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAndroidHardwareBufferFormatResolvePropertiesANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferFormatResolvePropertiesANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferFormatResolvePropertiesANDROID(segment); } + + /// Creates `VkAndroidHardwareBufferFormatResolvePropertiesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferFormatResolvePropertiesANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferFormatResolvePropertiesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAndroidHardwareBufferFormatResolvePropertiesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferFormatResolvePropertiesANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferFormatResolvePropertiesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAndroidHardwareBufferFormatResolvePropertiesANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAndroidHardwareBufferFormatResolvePropertiesANDROID` + public static VkAndroidHardwareBufferFormatResolvePropertiesANDROID alloc(SegmentAllocator allocator) { return new VkAndroidHardwareBufferFormatResolvePropertiesANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAndroidHardwareBufferFormatResolvePropertiesANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAndroidHardwareBufferFormatResolvePropertiesANDROID` + public static VkAndroidHardwareBufferFormatResolvePropertiesANDROID alloc(SegmentAllocator allocator, long count) { return new VkAndroidHardwareBufferFormatResolvePropertiesANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAndroidHardwareBufferFormatResolvePropertiesANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAndroidHardwareBufferFormatResolvePropertiesANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAndroidHardwareBufferFormatResolvePropertiesANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAndroidHardwareBufferFormatResolvePropertiesANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatResolvePropertiesANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkAndroidHardwareBufferFormatResolvePropertiesANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatResolvePropertiesANDROID sType(@CType("VkStructureType") int value) { VkAndroidHardwareBufferFormatResolvePropertiesANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAndroidHardwareBufferFormatResolvePropertiesANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAndroidHardwareBufferFormatResolvePropertiesANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkAndroidHardwareBufferFormatResolvePropertiesANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatResolvePropertiesANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatResolvePropertiesANDROID pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatResolvePropertiesANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatResolvePropertiesANDROID pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferFormatResolvePropertiesANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `colorAttachmentFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_colorAttachmentFormat(MemorySegment segment, long index) { return (int) VH_colorAttachmentFormat.get(segment, 0L, index); } + /// {@return `colorAttachmentFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_colorAttachmentFormat(MemorySegment segment) { return VkAndroidHardwareBufferFormatResolvePropertiesANDROID.get_colorAttachmentFormat(segment, 0L); } + /// {@return `colorAttachmentFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int colorAttachmentFormatAt(long index) { return VkAndroidHardwareBufferFormatResolvePropertiesANDROID.get_colorAttachmentFormat(this.segment(), index); } + /// {@return `colorAttachmentFormat`} + public @CType("VkFormat") int colorAttachmentFormat() { return VkAndroidHardwareBufferFormatResolvePropertiesANDROID.get_colorAttachmentFormat(this.segment()); } + /// Sets `colorAttachmentFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachmentFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_colorAttachmentFormat.set(segment, 0L, index, value); } + /// Sets `colorAttachmentFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachmentFormat(MemorySegment segment, @CType("VkFormat") int value) { VkAndroidHardwareBufferFormatResolvePropertiesANDROID.set_colorAttachmentFormat(segment, 0L, value); } + /// Sets `colorAttachmentFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatResolvePropertiesANDROID colorAttachmentFormatAt(long index, @CType("VkFormat") int value) { VkAndroidHardwareBufferFormatResolvePropertiesANDROID.set_colorAttachmentFormat(this.segment(), index, value); return this; } + /// Sets `colorAttachmentFormat` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferFormatResolvePropertiesANDROID colorAttachmentFormat(@CType("VkFormat") int value) { VkAndroidHardwareBufferFormatResolvePropertiesANDROID.set_colorAttachmentFormat(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferPropertiesANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferPropertiesANDROID.java new file mode 100644 index 00000000..c6110193 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferPropertiesANDROID.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### allocationSize +/// [VarHandle][#VH_allocationSize] - [Getter][#allocationSize()] - [Setter][#allocationSize(long)] +/// ### memoryTypeBits +/// [VarHandle][#VH_memoryTypeBits] - [Getter][#memoryTypeBits()] - [Setter][#memoryTypeBits(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAndroidHardwareBufferPropertiesANDROID { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize allocationSize; +/// uint32_t memoryTypeBits; +/// } VkAndroidHardwareBufferPropertiesANDROID; +/// ``` +public final class VkAndroidHardwareBufferPropertiesANDROID extends Struct { + /// The struct layout of `VkAndroidHardwareBufferPropertiesANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("allocationSize"), + ValueLayout.JAVA_INT.withName("memoryTypeBits") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `allocationSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_allocationSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allocationSize")); + /// The [VarHandle] of `memoryTypeBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeBits")); + + /// Creates `VkAndroidHardwareBufferPropertiesANDROID` with the given segment. + /// @param segment the memory segment + public VkAndroidHardwareBufferPropertiesANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAndroidHardwareBufferPropertiesANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferPropertiesANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferPropertiesANDROID(segment); } + + /// Creates `VkAndroidHardwareBufferPropertiesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferPropertiesANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferPropertiesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAndroidHardwareBufferPropertiesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferPropertiesANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferPropertiesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAndroidHardwareBufferPropertiesANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAndroidHardwareBufferPropertiesANDROID` + public static VkAndroidHardwareBufferPropertiesANDROID alloc(SegmentAllocator allocator) { return new VkAndroidHardwareBufferPropertiesANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAndroidHardwareBufferPropertiesANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAndroidHardwareBufferPropertiesANDROID` + public static VkAndroidHardwareBufferPropertiesANDROID alloc(SegmentAllocator allocator, long count) { return new VkAndroidHardwareBufferPropertiesANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAndroidHardwareBufferPropertiesANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAndroidHardwareBufferPropertiesANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAndroidHardwareBufferPropertiesANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAndroidHardwareBufferPropertiesANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferPropertiesANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkAndroidHardwareBufferPropertiesANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferPropertiesANDROID sType(@CType("VkStructureType") int value) { VkAndroidHardwareBufferPropertiesANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAndroidHardwareBufferPropertiesANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAndroidHardwareBufferPropertiesANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkAndroidHardwareBufferPropertiesANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferPropertiesANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferPropertiesANDROID pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferPropertiesANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferPropertiesANDROID pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferPropertiesANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `allocationSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_allocationSize(MemorySegment segment, long index) { return (long) VH_allocationSize.get(segment, 0L, index); } + /// {@return `allocationSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_allocationSize(MemorySegment segment) { return VkAndroidHardwareBufferPropertiesANDROID.get_allocationSize(segment, 0L); } + /// {@return `allocationSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long allocationSizeAt(long index) { return VkAndroidHardwareBufferPropertiesANDROID.get_allocationSize(this.segment(), index); } + /// {@return `allocationSize`} + public @CType("VkDeviceSize") long allocationSize() { return VkAndroidHardwareBufferPropertiesANDROID.get_allocationSize(this.segment()); } + /// Sets `allocationSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allocationSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_allocationSize.set(segment, 0L, index, value); } + /// Sets `allocationSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allocationSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAndroidHardwareBufferPropertiesANDROID.set_allocationSize(segment, 0L, value); } + /// Sets `allocationSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferPropertiesANDROID allocationSizeAt(long index, @CType("VkDeviceSize") long value) { VkAndroidHardwareBufferPropertiesANDROID.set_allocationSize(this.segment(), index, value); return this; } + /// Sets `allocationSize` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferPropertiesANDROID allocationSize(@CType("VkDeviceSize") long value) { VkAndroidHardwareBufferPropertiesANDROID.set_allocationSize(this.segment(), value); return this; } + + /// {@return `memoryTypeBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment, long index) { return (int) VH_memoryTypeBits.get(segment, 0L, index); } + /// {@return `memoryTypeBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment) { return VkAndroidHardwareBufferPropertiesANDROID.get_memoryTypeBits(segment, 0L); } + /// {@return `memoryTypeBits` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeBitsAt(long index) { return VkAndroidHardwareBufferPropertiesANDROID.get_memoryTypeBits(this.segment(), index); } + /// {@return `memoryTypeBits`} + public @CType("uint32_t") int memoryTypeBits() { return VkAndroidHardwareBufferPropertiesANDROID.get_memoryTypeBits(this.segment()); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeBits.set(segment, 0L, index, value); } + /// Sets `memoryTypeBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, @CType("uint32_t") int value) { VkAndroidHardwareBufferPropertiesANDROID.set_memoryTypeBits(segment, 0L, value); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferPropertiesANDROID memoryTypeBitsAt(long index, @CType("uint32_t") int value) { VkAndroidHardwareBufferPropertiesANDROID.set_memoryTypeBits(this.segment(), index, value); return this; } + /// Sets `memoryTypeBits` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferPropertiesANDROID memoryTypeBits(@CType("uint32_t") int value) { VkAndroidHardwareBufferPropertiesANDROID.set_memoryTypeBits(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferUsageANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferUsageANDROID.java new file mode 100644 index 00000000..76e2490d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkAndroidHardwareBufferUsageANDROID.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### androidHardwareBufferUsage +/// [VarHandle][#VH_androidHardwareBufferUsage] - [Getter][#androidHardwareBufferUsage()] - [Setter][#androidHardwareBufferUsage(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAndroidHardwareBufferUsageANDROID { +/// VkStructureType sType; +/// void * pNext; +/// uint64_t androidHardwareBufferUsage; +/// } VkAndroidHardwareBufferUsageANDROID; +/// ``` +public final class VkAndroidHardwareBufferUsageANDROID extends Struct { + /// The struct layout of `VkAndroidHardwareBufferUsageANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("androidHardwareBufferUsage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `androidHardwareBufferUsage` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_androidHardwareBufferUsage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("androidHardwareBufferUsage")); + + /// Creates `VkAndroidHardwareBufferUsageANDROID` with the given segment. + /// @param segment the memory segment + public VkAndroidHardwareBufferUsageANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAndroidHardwareBufferUsageANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferUsageANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferUsageANDROID(segment); } + + /// Creates `VkAndroidHardwareBufferUsageANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferUsageANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferUsageANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAndroidHardwareBufferUsageANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidHardwareBufferUsageANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidHardwareBufferUsageANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAndroidHardwareBufferUsageANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAndroidHardwareBufferUsageANDROID` + public static VkAndroidHardwareBufferUsageANDROID alloc(SegmentAllocator allocator) { return new VkAndroidHardwareBufferUsageANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAndroidHardwareBufferUsageANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAndroidHardwareBufferUsageANDROID` + public static VkAndroidHardwareBufferUsageANDROID alloc(SegmentAllocator allocator, long count) { return new VkAndroidHardwareBufferUsageANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAndroidHardwareBufferUsageANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAndroidHardwareBufferUsageANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAndroidHardwareBufferUsageANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAndroidHardwareBufferUsageANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferUsageANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkAndroidHardwareBufferUsageANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferUsageANDROID sType(@CType("VkStructureType") int value) { VkAndroidHardwareBufferUsageANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAndroidHardwareBufferUsageANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAndroidHardwareBufferUsageANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkAndroidHardwareBufferUsageANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferUsageANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferUsageANDROID pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferUsageANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferUsageANDROID pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkAndroidHardwareBufferUsageANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `androidHardwareBufferUsage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_androidHardwareBufferUsage(MemorySegment segment, long index) { return (long) VH_androidHardwareBufferUsage.get(segment, 0L, index); } + /// {@return `androidHardwareBufferUsage`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_androidHardwareBufferUsage(MemorySegment segment) { return VkAndroidHardwareBufferUsageANDROID.get_androidHardwareBufferUsage(segment, 0L); } + /// {@return `androidHardwareBufferUsage` at the given index} + /// @param index the index + public @CType("uint64_t") long androidHardwareBufferUsageAt(long index) { return VkAndroidHardwareBufferUsageANDROID.get_androidHardwareBufferUsage(this.segment(), index); } + /// {@return `androidHardwareBufferUsage`} + public @CType("uint64_t") long androidHardwareBufferUsage() { return VkAndroidHardwareBufferUsageANDROID.get_androidHardwareBufferUsage(this.segment()); } + /// Sets `androidHardwareBufferUsage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_androidHardwareBufferUsage(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_androidHardwareBufferUsage.set(segment, 0L, index, value); } + /// Sets `androidHardwareBufferUsage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_androidHardwareBufferUsage(MemorySegment segment, @CType("uint64_t") long value) { VkAndroidHardwareBufferUsageANDROID.set_androidHardwareBufferUsage(segment, 0L, value); } + /// Sets `androidHardwareBufferUsage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferUsageANDROID androidHardwareBufferUsageAt(long index, @CType("uint64_t") long value) { VkAndroidHardwareBufferUsageANDROID.set_androidHardwareBufferUsage(this.segment(), index, value); return this; } + /// Sets `androidHardwareBufferUsage` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidHardwareBufferUsageANDROID androidHardwareBufferUsage(@CType("uint64_t") long value) { VkAndroidHardwareBufferUsageANDROID.set_androidHardwareBufferUsage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkExternalFormatANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkExternalFormatANDROID.java new file mode 100644 index 00000000..321cbdaf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkExternalFormatANDROID.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### externalFormat +/// [VarHandle][#VH_externalFormat] - [Getter][#externalFormat()] - [Setter][#externalFormat(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalFormatANDROID { +/// VkStructureType sType; +/// void * pNext; +/// uint64_t externalFormat; +/// } VkExternalFormatANDROID; +/// ``` +public final class VkExternalFormatANDROID extends Struct { + /// The struct layout of `VkExternalFormatANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("externalFormat") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `externalFormat` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_externalFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalFormat")); + + /// Creates `VkExternalFormatANDROID` with the given segment. + /// @param segment the memory segment + public VkExternalFormatANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalFormatANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalFormatANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalFormatANDROID(segment); } + + /// Creates `VkExternalFormatANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalFormatANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalFormatANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalFormatANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalFormatANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalFormatANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalFormatANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalFormatANDROID` + public static VkExternalFormatANDROID alloc(SegmentAllocator allocator) { return new VkExternalFormatANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalFormatANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalFormatANDROID` + public static VkExternalFormatANDROID alloc(SegmentAllocator allocator, long count) { return new VkExternalFormatANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExternalFormatANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExternalFormatANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExternalFormatANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExternalFormatANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFormatANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkExternalFormatANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFormatANDROID sType(@CType("VkStructureType") int value) { VkExternalFormatANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExternalFormatANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExternalFormatANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkExternalFormatANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalFormatANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFormatANDROID pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalFormatANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFormatANDROID pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkExternalFormatANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `externalFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_externalFormat(MemorySegment segment, long index) { return (long) VH_externalFormat.get(segment, 0L, index); } + /// {@return `externalFormat`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_externalFormat(MemorySegment segment) { return VkExternalFormatANDROID.get_externalFormat(segment, 0L); } + /// {@return `externalFormat` at the given index} + /// @param index the index + public @CType("uint64_t") long externalFormatAt(long index) { return VkExternalFormatANDROID.get_externalFormat(this.segment(), index); } + /// {@return `externalFormat`} + public @CType("uint64_t") long externalFormat() { return VkExternalFormatANDROID.get_externalFormat(this.segment()); } + /// Sets `externalFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalFormat(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_externalFormat.set(segment, 0L, index, value); } + /// Sets `externalFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalFormat(MemorySegment segment, @CType("uint64_t") long value) { VkExternalFormatANDROID.set_externalFormat(segment, 0L, value); } + /// Sets `externalFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFormatANDROID externalFormatAt(long index, @CType("uint64_t") long value) { VkExternalFormatANDROID.set_externalFormat(this.segment(), index, value); return this; } + /// Sets `externalFormat` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFormatANDROID externalFormat(@CType("uint64_t") long value) { VkExternalFormatANDROID.set_externalFormat(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkImportAndroidHardwareBufferInfoANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkImportAndroidHardwareBufferInfoANDROID.java new file mode 100644 index 00000000..87172264 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkImportAndroidHardwareBufferInfoANDROID.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportAndroidHardwareBufferInfoANDROID { +/// VkStructureType sType; +/// const void * pNext; +/// struct AHardwareBuffer * buffer; +/// } VkImportAndroidHardwareBufferInfoANDROID; +/// ``` +public final class VkImportAndroidHardwareBufferInfoANDROID extends Struct { + /// The struct layout of `VkImportAndroidHardwareBufferInfoANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("buffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + + /// Creates `VkImportAndroidHardwareBufferInfoANDROID` with the given segment. + /// @param segment the memory segment + public VkImportAndroidHardwareBufferInfoANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportAndroidHardwareBufferInfoANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportAndroidHardwareBufferInfoANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportAndroidHardwareBufferInfoANDROID(segment); } + + /// Creates `VkImportAndroidHardwareBufferInfoANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportAndroidHardwareBufferInfoANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportAndroidHardwareBufferInfoANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportAndroidHardwareBufferInfoANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportAndroidHardwareBufferInfoANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportAndroidHardwareBufferInfoANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportAndroidHardwareBufferInfoANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportAndroidHardwareBufferInfoANDROID` + public static VkImportAndroidHardwareBufferInfoANDROID alloc(SegmentAllocator allocator) { return new VkImportAndroidHardwareBufferInfoANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportAndroidHardwareBufferInfoANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportAndroidHardwareBufferInfoANDROID` + public static VkImportAndroidHardwareBufferInfoANDROID alloc(SegmentAllocator allocator, long count) { return new VkImportAndroidHardwareBufferInfoANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportAndroidHardwareBufferInfoANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportAndroidHardwareBufferInfoANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportAndroidHardwareBufferInfoANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportAndroidHardwareBufferInfoANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportAndroidHardwareBufferInfoANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkImportAndroidHardwareBufferInfoANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportAndroidHardwareBufferInfoANDROID sType(@CType("VkStructureType") int value) { VkImportAndroidHardwareBufferInfoANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportAndroidHardwareBufferInfoANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportAndroidHardwareBufferInfoANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportAndroidHardwareBufferInfoANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportAndroidHardwareBufferInfoANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportAndroidHardwareBufferInfoANDROID pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportAndroidHardwareBufferInfoANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportAndroidHardwareBufferInfoANDROID pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportAndroidHardwareBufferInfoANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("struct AHardwareBuffer *") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("struct AHardwareBuffer *") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkImportAndroidHardwareBufferInfoANDROID.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("struct AHardwareBuffer *") java.lang.foreign.MemorySegment bufferAt(long index) { return VkImportAndroidHardwareBufferInfoANDROID.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("struct AHardwareBuffer *") java.lang.foreign.MemorySegment buffer() { return VkImportAndroidHardwareBufferInfoANDROID.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("struct AHardwareBuffer *") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("struct AHardwareBuffer *") java.lang.foreign.MemorySegment value) { VkImportAndroidHardwareBufferInfoANDROID.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportAndroidHardwareBufferInfoANDROID bufferAt(long index, @CType("struct AHardwareBuffer *") java.lang.foreign.MemorySegment value) { VkImportAndroidHardwareBufferInfoANDROID.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkImportAndroidHardwareBufferInfoANDROID buffer(@CType("struct AHardwareBuffer *") java.lang.foreign.MemorySegment value) { VkImportAndroidHardwareBufferInfoANDROID.set_buffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkMemoryGetAndroidHardwareBufferInfoANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkMemoryGetAndroidHardwareBufferInfoANDROID.java new file mode 100644 index 00000000..4378bc90 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkMemoryGetAndroidHardwareBufferInfoANDROID.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceMemory memory; +/// } VkMemoryGetAndroidHardwareBufferInfoANDROID; +/// ``` +public final class VkMemoryGetAndroidHardwareBufferInfoANDROID extends Struct { + /// The struct layout of `VkMemoryGetAndroidHardwareBufferInfoANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("memory") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + + /// Creates `VkMemoryGetAndroidHardwareBufferInfoANDROID` with the given segment. + /// @param segment the memory segment + public VkMemoryGetAndroidHardwareBufferInfoANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryGetAndroidHardwareBufferInfoANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetAndroidHardwareBufferInfoANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetAndroidHardwareBufferInfoANDROID(segment); } + + /// Creates `VkMemoryGetAndroidHardwareBufferInfoANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetAndroidHardwareBufferInfoANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetAndroidHardwareBufferInfoANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryGetAndroidHardwareBufferInfoANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetAndroidHardwareBufferInfoANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetAndroidHardwareBufferInfoANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryGetAndroidHardwareBufferInfoANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryGetAndroidHardwareBufferInfoANDROID` + public static VkMemoryGetAndroidHardwareBufferInfoANDROID alloc(SegmentAllocator allocator) { return new VkMemoryGetAndroidHardwareBufferInfoANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryGetAndroidHardwareBufferInfoANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryGetAndroidHardwareBufferInfoANDROID` + public static VkMemoryGetAndroidHardwareBufferInfoANDROID alloc(SegmentAllocator allocator, long count) { return new VkMemoryGetAndroidHardwareBufferInfoANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryGetAndroidHardwareBufferInfoANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryGetAndroidHardwareBufferInfoANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryGetAndroidHardwareBufferInfoANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryGetAndroidHardwareBufferInfoANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetAndroidHardwareBufferInfoANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryGetAndroidHardwareBufferInfoANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetAndroidHardwareBufferInfoANDROID sType(@CType("VkStructureType") int value) { VkMemoryGetAndroidHardwareBufferInfoANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryGetAndroidHardwareBufferInfoANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryGetAndroidHardwareBufferInfoANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryGetAndroidHardwareBufferInfoANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetAndroidHardwareBufferInfoANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetAndroidHardwareBufferInfoANDROID pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetAndroidHardwareBufferInfoANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetAndroidHardwareBufferInfoANDROID pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetAndroidHardwareBufferInfoANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkMemoryGetAndroidHardwareBufferInfoANDROID.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkMemoryGetAndroidHardwareBufferInfoANDROID.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkMemoryGetAndroidHardwareBufferInfoANDROID.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetAndroidHardwareBufferInfoANDROID.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetAndroidHardwareBufferInfoANDROID memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetAndroidHardwareBufferInfoANDROID.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetAndroidHardwareBufferInfoANDROID memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetAndroidHardwareBufferInfoANDROID.set_memory(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkNativeBufferANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkNativeBufferANDROID.java new file mode 100644 index 00000000..f7b3e677 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkNativeBufferANDROID.java @@ -0,0 +1,335 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handle +/// [VarHandle][#VH_handle] - [Getter][#handle()] - [Setter][#handle(java.lang.foreign.MemorySegment)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(int)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ### usage2 +/// [Byte offset][#OFFSET_usage2] - [Memory layout][#ML_usage2] - [Getter][#usage2()] - [Setter][#usage2(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkNativeBufferANDROID { +/// VkStructureType sType; +/// const void * pNext; +/// const void * handle; +/// int stride; +/// int format; +/// int usage; +/// VkNativeBufferUsage2ANDROID usage2; +/// } VkNativeBufferANDROID; +/// ``` +public final class VkNativeBufferANDROID extends Struct { + /// The struct layout of `VkNativeBufferANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("handle"), + ValueLayout.JAVA_INT.withName("stride"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_INT.withName("usage"), + overrungl.vulkan.android.struct.VkNativeBufferUsage2ANDROID.LAYOUT.withName("usage2") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_handle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handle")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + /// The byte offset of `usage2`. + public static final long OFFSET_usage2 = LAYOUT.byteOffset(PathElement.groupElement("usage2")); + /// The memory layout of `usage2`. + public static final MemoryLayout ML_usage2 = LAYOUT.select(PathElement.groupElement("usage2")); + + /// Creates `VkNativeBufferANDROID` with the given segment. + /// @param segment the memory segment + public VkNativeBufferANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkNativeBufferANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkNativeBufferANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkNativeBufferANDROID(segment); } + + /// Creates `VkNativeBufferANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkNativeBufferANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkNativeBufferANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkNativeBufferANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkNativeBufferANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkNativeBufferANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkNativeBufferANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkNativeBufferANDROID` + public static VkNativeBufferANDROID alloc(SegmentAllocator allocator) { return new VkNativeBufferANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkNativeBufferANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkNativeBufferANDROID` + public static VkNativeBufferANDROID alloc(SegmentAllocator allocator, long count) { return new VkNativeBufferANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkNativeBufferANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkNativeBufferANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkNativeBufferANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkNativeBufferANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkNativeBufferANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID sType(@CType("VkStructureType") int value) { VkNativeBufferANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkNativeBufferANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkNativeBufferANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkNativeBufferANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkNativeBufferANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkNativeBufferANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkNativeBufferANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `handle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_handle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_handle.get(segment, 0L, index); } + /// {@return `handle`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_handle(MemorySegment segment) { return VkNativeBufferANDROID.get_handle(segment, 0L); } + /// {@return `handle` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment handleAt(long index) { return VkNativeBufferANDROID.get_handle(this.segment(), index); } + /// {@return `handle`} + public @CType("const void *") java.lang.foreign.MemorySegment handle() { return VkNativeBufferANDROID.get_handle(this.segment()); } + /// Sets `handle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handle(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_handle.set(segment, 0L, index, value); } + /// Sets `handle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handle(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkNativeBufferANDROID.set_handle(segment, 0L, value); } + /// Sets `handle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID handleAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkNativeBufferANDROID.set_handle(this.segment(), index, value); return this; } + /// Sets `handle` with the given value. + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID handle(@CType("const void *") java.lang.foreign.MemorySegment value) { VkNativeBufferANDROID.set_handle(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int") int get_stride(MemorySegment segment, long index) { return (int) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("int") int get_stride(MemorySegment segment) { return VkNativeBufferANDROID.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("int") int strideAt(long index) { return VkNativeBufferANDROID.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("int") int stride() { return VkNativeBufferANDROID.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("int") int value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("int") int value) { VkNativeBufferANDROID.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID strideAt(long index, @CType("int") int value) { VkNativeBufferANDROID.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID stride(@CType("int") int value) { VkNativeBufferANDROID.set_stride(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("int") int get_format(MemorySegment segment) { return VkNativeBufferANDROID.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("int") int formatAt(long index) { return VkNativeBufferANDROID.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("int") int format() { return VkNativeBufferANDROID.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("int") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("int") int value) { VkNativeBufferANDROID.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID formatAt(long index, @CType("int") int value) { VkNativeBufferANDROID.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID format(@CType("int") int value) { VkNativeBufferANDROID.set_format(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("int") int get_usage(MemorySegment segment) { return VkNativeBufferANDROID.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("int") int usageAt(long index) { return VkNativeBufferANDROID.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("int") int usage() { return VkNativeBufferANDROID.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("int") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("int") int value) { VkNativeBufferANDROID.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID usageAt(long index, @CType("int") int value) { VkNativeBufferANDROID.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID usage(@CType("int") int value) { VkNativeBufferANDROID.set_usage(this.segment(), value); return this; } + + /// {@return `usage2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkNativeBufferUsage2ANDROID") java.lang.foreign.MemorySegment get_usage2(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_usage2, index), ML_usage2); } + /// {@return `usage2`} + /// @param segment the segment of the struct + public static @CType("VkNativeBufferUsage2ANDROID") java.lang.foreign.MemorySegment get_usage2(MemorySegment segment) { return VkNativeBufferANDROID.get_usage2(segment, 0L); } + /// {@return `usage2` at the given index} + /// @param index the index + public @CType("VkNativeBufferUsage2ANDROID") java.lang.foreign.MemorySegment usage2At(long index) { return VkNativeBufferANDROID.get_usage2(this.segment(), index); } + /// {@return `usage2`} + public @CType("VkNativeBufferUsage2ANDROID") java.lang.foreign.MemorySegment usage2() { return VkNativeBufferANDROID.get_usage2(this.segment()); } + /// Sets `usage2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage2(MemorySegment segment, long index, @CType("VkNativeBufferUsage2ANDROID") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_usage2, index), ML_usage2.byteSize()); } + /// Sets `usage2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage2(MemorySegment segment, @CType("VkNativeBufferUsage2ANDROID") java.lang.foreign.MemorySegment value) { VkNativeBufferANDROID.set_usage2(segment, 0L, value); } + /// Sets `usage2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID usage2At(long index, @CType("VkNativeBufferUsage2ANDROID") java.lang.foreign.MemorySegment value) { VkNativeBufferANDROID.set_usage2(this.segment(), index, value); return this; } + /// Sets `usage2` with the given value. + /// @param value the value + /// @return `this` + public VkNativeBufferANDROID usage2(@CType("VkNativeBufferUsage2ANDROID") java.lang.foreign.MemorySegment value) { VkNativeBufferANDROID.set_usage2(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkNativeBufferUsage2ANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkNativeBufferUsage2ANDROID.java new file mode 100644 index 00000000..9538933e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkNativeBufferUsage2ANDROID.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### consumer +/// [VarHandle][#VH_consumer] - [Getter][#consumer()] - [Setter][#consumer(long)] +/// ### producer +/// [VarHandle][#VH_producer] - [Getter][#producer()] - [Setter][#producer(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkNativeBufferUsage2ANDROID { +/// uint64_t consumer; +/// uint64_t producer; +/// } VkNativeBufferUsage2ANDROID; +/// ``` +public final class VkNativeBufferUsage2ANDROID extends Struct { + /// The struct layout of `VkNativeBufferUsage2ANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("consumer"), + ValueLayout.JAVA_LONG.withName("producer") + ); + /// The [VarHandle] of `consumer` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_consumer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("consumer")); + /// The [VarHandle] of `producer` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_producer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("producer")); + + /// Creates `VkNativeBufferUsage2ANDROID` with the given segment. + /// @param segment the memory segment + public VkNativeBufferUsage2ANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkNativeBufferUsage2ANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkNativeBufferUsage2ANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkNativeBufferUsage2ANDROID(segment); } + + /// Creates `VkNativeBufferUsage2ANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkNativeBufferUsage2ANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkNativeBufferUsage2ANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkNativeBufferUsage2ANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkNativeBufferUsage2ANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkNativeBufferUsage2ANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkNativeBufferUsage2ANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkNativeBufferUsage2ANDROID` + public static VkNativeBufferUsage2ANDROID alloc(SegmentAllocator allocator) { return new VkNativeBufferUsage2ANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkNativeBufferUsage2ANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkNativeBufferUsage2ANDROID` + public static VkNativeBufferUsage2ANDROID alloc(SegmentAllocator allocator, long count) { return new VkNativeBufferUsage2ANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `consumer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_consumer(MemorySegment segment, long index) { return (long) VH_consumer.get(segment, 0L, index); } + /// {@return `consumer`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_consumer(MemorySegment segment) { return VkNativeBufferUsage2ANDROID.get_consumer(segment, 0L); } + /// {@return `consumer` at the given index} + /// @param index the index + public @CType("uint64_t") long consumerAt(long index) { return VkNativeBufferUsage2ANDROID.get_consumer(this.segment(), index); } + /// {@return `consumer`} + public @CType("uint64_t") long consumer() { return VkNativeBufferUsage2ANDROID.get_consumer(this.segment()); } + /// Sets `consumer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_consumer(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_consumer.set(segment, 0L, index, value); } + /// Sets `consumer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_consumer(MemorySegment segment, @CType("uint64_t") long value) { VkNativeBufferUsage2ANDROID.set_consumer(segment, 0L, value); } + /// Sets `consumer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkNativeBufferUsage2ANDROID consumerAt(long index, @CType("uint64_t") long value) { VkNativeBufferUsage2ANDROID.set_consumer(this.segment(), index, value); return this; } + /// Sets `consumer` with the given value. + /// @param value the value + /// @return `this` + public VkNativeBufferUsage2ANDROID consumer(@CType("uint64_t") long value) { VkNativeBufferUsage2ANDROID.set_consumer(this.segment(), value); return this; } + + /// {@return `producer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_producer(MemorySegment segment, long index) { return (long) VH_producer.get(segment, 0L, index); } + /// {@return `producer`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_producer(MemorySegment segment) { return VkNativeBufferUsage2ANDROID.get_producer(segment, 0L); } + /// {@return `producer` at the given index} + /// @param index the index + public @CType("uint64_t") long producerAt(long index) { return VkNativeBufferUsage2ANDROID.get_producer(this.segment(), index); } + /// {@return `producer`} + public @CType("uint64_t") long producer() { return VkNativeBufferUsage2ANDROID.get_producer(this.segment()); } + /// Sets `producer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_producer(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_producer.set(segment, 0L, index, value); } + /// Sets `producer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_producer(MemorySegment segment, @CType("uint64_t") long value) { VkNativeBufferUsage2ANDROID.set_producer(segment, 0L, value); } + /// Sets `producer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkNativeBufferUsage2ANDROID producerAt(long index, @CType("uint64_t") long value) { VkNativeBufferUsage2ANDROID.set_producer(this.segment(), index, value); return this; } + /// Sets `producer` with the given value. + /// @param value the value + /// @return `this` + public VkNativeBufferUsage2ANDROID producer(@CType("uint64_t") long value) { VkNativeBufferUsage2ANDROID.set_producer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.java new file mode 100644 index 00000000..eba06e70 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### externalFormatResolve +/// [VarHandle][#VH_externalFormatResolve] - [Getter][#externalFormatResolve()] - [Setter][#externalFormatResolve(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalFormatResolveFeaturesANDROID { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 externalFormatResolve; +/// } VkPhysicalDeviceExternalFormatResolveFeaturesANDROID; +/// ``` +public final class VkPhysicalDeviceExternalFormatResolveFeaturesANDROID extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalFormatResolveFeaturesANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("externalFormatResolve") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `externalFormatResolve` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_externalFormatResolve = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalFormatResolve")); + + /// Creates `VkPhysicalDeviceExternalFormatResolveFeaturesANDROID` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalFormatResolveFeaturesANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalFormatResolveFeaturesANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalFormatResolveFeaturesANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalFormatResolveFeaturesANDROID(segment); } + + /// Creates `VkPhysicalDeviceExternalFormatResolveFeaturesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalFormatResolveFeaturesANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalFormatResolveFeaturesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalFormatResolveFeaturesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalFormatResolveFeaturesANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalFormatResolveFeaturesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalFormatResolveFeaturesANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalFormatResolveFeaturesANDROID` + public static VkPhysicalDeviceExternalFormatResolveFeaturesANDROID alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalFormatResolveFeaturesANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalFormatResolveFeaturesANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalFormatResolveFeaturesANDROID` + public static VkPhysicalDeviceExternalFormatResolveFeaturesANDROID alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalFormatResolveFeaturesANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolveFeaturesANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolveFeaturesANDROID sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolveFeaturesANDROID pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolveFeaturesANDROID pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `externalFormatResolve` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_externalFormatResolve(MemorySegment segment, long index) { return (int) VH_externalFormatResolve.get(segment, 0L, index); } + /// {@return `externalFormatResolve`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_externalFormatResolve(MemorySegment segment) { return VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.get_externalFormatResolve(segment, 0L); } + /// {@return `externalFormatResolve` at the given index} + /// @param index the index + public @CType("VkBool32") int externalFormatResolveAt(long index) { return VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.get_externalFormatResolve(this.segment(), index); } + /// {@return `externalFormatResolve`} + public @CType("VkBool32") int externalFormatResolve() { return VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.get_externalFormatResolve(this.segment()); } + /// Sets `externalFormatResolve` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalFormatResolve(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_externalFormatResolve.set(segment, 0L, index, value); } + /// Sets `externalFormatResolve` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalFormatResolve(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.set_externalFormatResolve(segment, 0L, value); } + /// Sets `externalFormatResolve` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolveFeaturesANDROID externalFormatResolveAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.set_externalFormatResolve(this.segment(), index, value); return this; } + /// Sets `externalFormatResolve` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolveFeaturesANDROID externalFormatResolve(@CType("VkBool32") int value) { VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.set_externalFormatResolve(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.java new file mode 100644 index 00000000..0fe767f8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### nullColorAttachmentWithExternalFormatResolve +/// [VarHandle][#VH_nullColorAttachmentWithExternalFormatResolve] - [Getter][#nullColorAttachmentWithExternalFormatResolve()] - [Setter][#nullColorAttachmentWithExternalFormatResolve(int)] +/// ### externalFormatResolveChromaOffsetX +/// [VarHandle][#VH_externalFormatResolveChromaOffsetX] - [Getter][#externalFormatResolveChromaOffsetX()] - [Setter][#externalFormatResolveChromaOffsetX(int)] +/// ### externalFormatResolveChromaOffsetY +/// [VarHandle][#VH_externalFormatResolveChromaOffsetY] - [Getter][#externalFormatResolveChromaOffsetY()] - [Setter][#externalFormatResolveChromaOffsetY(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalFormatResolvePropertiesANDROID { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 nullColorAttachmentWithExternalFormatResolve; +/// VkChromaLocation externalFormatResolveChromaOffsetX; +/// VkChromaLocation externalFormatResolveChromaOffsetY; +/// } VkPhysicalDeviceExternalFormatResolvePropertiesANDROID; +/// ``` +public final class VkPhysicalDeviceExternalFormatResolvePropertiesANDROID extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalFormatResolvePropertiesANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("nullColorAttachmentWithExternalFormatResolve"), + ValueLayout.JAVA_INT.withName("externalFormatResolveChromaOffsetX"), + ValueLayout.JAVA_INT.withName("externalFormatResolveChromaOffsetY") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `nullColorAttachmentWithExternalFormatResolve` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nullColorAttachmentWithExternalFormatResolve = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nullColorAttachmentWithExternalFormatResolve")); + /// The [VarHandle] of `externalFormatResolveChromaOffsetX` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_externalFormatResolveChromaOffsetX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalFormatResolveChromaOffsetX")); + /// The [VarHandle] of `externalFormatResolveChromaOffsetY` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_externalFormatResolveChromaOffsetY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalFormatResolveChromaOffsetY")); + + /// Creates `VkPhysicalDeviceExternalFormatResolvePropertiesANDROID` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalFormatResolvePropertiesANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalFormatResolvePropertiesANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalFormatResolvePropertiesANDROID(segment); } + + /// Creates `VkPhysicalDeviceExternalFormatResolvePropertiesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalFormatResolvePropertiesANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalFormatResolvePropertiesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalFormatResolvePropertiesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalFormatResolvePropertiesANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalFormatResolvePropertiesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalFormatResolvePropertiesANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalFormatResolvePropertiesANDROID` + public static VkPhysicalDeviceExternalFormatResolvePropertiesANDROID alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalFormatResolvePropertiesANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalFormatResolvePropertiesANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalFormatResolvePropertiesANDROID` + public static VkPhysicalDeviceExternalFormatResolvePropertiesANDROID alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalFormatResolvePropertiesANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `nullColorAttachmentWithExternalFormatResolve` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nullColorAttachmentWithExternalFormatResolve(MemorySegment segment, long index) { return (int) VH_nullColorAttachmentWithExternalFormatResolve.get(segment, 0L, index); } + /// {@return `nullColorAttachmentWithExternalFormatResolve`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nullColorAttachmentWithExternalFormatResolve(MemorySegment segment) { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_nullColorAttachmentWithExternalFormatResolve(segment, 0L); } + /// {@return `nullColorAttachmentWithExternalFormatResolve` at the given index} + /// @param index the index + public @CType("VkBool32") int nullColorAttachmentWithExternalFormatResolveAt(long index) { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_nullColorAttachmentWithExternalFormatResolve(this.segment(), index); } + /// {@return `nullColorAttachmentWithExternalFormatResolve`} + public @CType("VkBool32") int nullColorAttachmentWithExternalFormatResolve() { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_nullColorAttachmentWithExternalFormatResolve(this.segment()); } + /// Sets `nullColorAttachmentWithExternalFormatResolve` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nullColorAttachmentWithExternalFormatResolve(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nullColorAttachmentWithExternalFormatResolve.set(segment, 0L, index, value); } + /// Sets `nullColorAttachmentWithExternalFormatResolve` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nullColorAttachmentWithExternalFormatResolve(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_nullColorAttachmentWithExternalFormatResolve(segment, 0L, value); } + /// Sets `nullColorAttachmentWithExternalFormatResolve` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID nullColorAttachmentWithExternalFormatResolveAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_nullColorAttachmentWithExternalFormatResolve(this.segment(), index, value); return this; } + /// Sets `nullColorAttachmentWithExternalFormatResolve` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID nullColorAttachmentWithExternalFormatResolve(@CType("VkBool32") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_nullColorAttachmentWithExternalFormatResolve(this.segment(), value); return this; } + + /// {@return `externalFormatResolveChromaOffsetX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_externalFormatResolveChromaOffsetX(MemorySegment segment, long index) { return (int) VH_externalFormatResolveChromaOffsetX.get(segment, 0L, index); } + /// {@return `externalFormatResolveChromaOffsetX`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_externalFormatResolveChromaOffsetX(MemorySegment segment) { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_externalFormatResolveChromaOffsetX(segment, 0L); } + /// {@return `externalFormatResolveChromaOffsetX` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int externalFormatResolveChromaOffsetXAt(long index) { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_externalFormatResolveChromaOffsetX(this.segment(), index); } + /// {@return `externalFormatResolveChromaOffsetX`} + public @CType("VkChromaLocation") int externalFormatResolveChromaOffsetX() { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_externalFormatResolveChromaOffsetX(this.segment()); } + /// Sets `externalFormatResolveChromaOffsetX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalFormatResolveChromaOffsetX(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_externalFormatResolveChromaOffsetX.set(segment, 0L, index, value); } + /// Sets `externalFormatResolveChromaOffsetX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalFormatResolveChromaOffsetX(MemorySegment segment, @CType("VkChromaLocation") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_externalFormatResolveChromaOffsetX(segment, 0L, value); } + /// Sets `externalFormatResolveChromaOffsetX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID externalFormatResolveChromaOffsetXAt(long index, @CType("VkChromaLocation") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_externalFormatResolveChromaOffsetX(this.segment(), index, value); return this; } + /// Sets `externalFormatResolveChromaOffsetX` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID externalFormatResolveChromaOffsetX(@CType("VkChromaLocation") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_externalFormatResolveChromaOffsetX(this.segment(), value); return this; } + + /// {@return `externalFormatResolveChromaOffsetY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_externalFormatResolveChromaOffsetY(MemorySegment segment, long index) { return (int) VH_externalFormatResolveChromaOffsetY.get(segment, 0L, index); } + /// {@return `externalFormatResolveChromaOffsetY`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_externalFormatResolveChromaOffsetY(MemorySegment segment) { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_externalFormatResolveChromaOffsetY(segment, 0L); } + /// {@return `externalFormatResolveChromaOffsetY` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int externalFormatResolveChromaOffsetYAt(long index) { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_externalFormatResolveChromaOffsetY(this.segment(), index); } + /// {@return `externalFormatResolveChromaOffsetY`} + public @CType("VkChromaLocation") int externalFormatResolveChromaOffsetY() { return VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.get_externalFormatResolveChromaOffsetY(this.segment()); } + /// Sets `externalFormatResolveChromaOffsetY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalFormatResolveChromaOffsetY(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_externalFormatResolveChromaOffsetY.set(segment, 0L, index, value); } + /// Sets `externalFormatResolveChromaOffsetY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalFormatResolveChromaOffsetY(MemorySegment segment, @CType("VkChromaLocation") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_externalFormatResolveChromaOffsetY(segment, 0L, value); } + /// Sets `externalFormatResolveChromaOffsetY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID externalFormatResolveChromaOffsetYAt(long index, @CType("VkChromaLocation") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_externalFormatResolveChromaOffsetY(this.segment(), index, value); return this; } + /// Sets `externalFormatResolveChromaOffsetY` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFormatResolvePropertiesANDROID externalFormatResolveChromaOffsetY(@CType("VkChromaLocation") int value) { VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.set_externalFormatResolveChromaOffsetY(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkPhysicalDevicePresentationPropertiesANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkPhysicalDevicePresentationPropertiesANDROID.java new file mode 100644 index 00000000..ddcb2699 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkPhysicalDevicePresentationPropertiesANDROID.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sharedImage +/// [VarHandle][#VH_sharedImage] - [Getter][#sharedImage()] - [Setter][#sharedImage(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePresentationPropertiesANDROID { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 sharedImage; +/// } VkPhysicalDevicePresentationPropertiesANDROID; +/// ``` +public final class VkPhysicalDevicePresentationPropertiesANDROID extends Struct { + /// The struct layout of `VkPhysicalDevicePresentationPropertiesANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sharedImage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sharedImage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sharedImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sharedImage")); + + /// Creates `VkPhysicalDevicePresentationPropertiesANDROID` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePresentationPropertiesANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePresentationPropertiesANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentationPropertiesANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentationPropertiesANDROID(segment); } + + /// Creates `VkPhysicalDevicePresentationPropertiesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentationPropertiesANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentationPropertiesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePresentationPropertiesANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentationPropertiesANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentationPropertiesANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePresentationPropertiesANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePresentationPropertiesANDROID` + public static VkPhysicalDevicePresentationPropertiesANDROID alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePresentationPropertiesANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePresentationPropertiesANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePresentationPropertiesANDROID` + public static VkPhysicalDevicePresentationPropertiesANDROID alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePresentationPropertiesANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePresentationPropertiesANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePresentationPropertiesANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePresentationPropertiesANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePresentationPropertiesANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentationPropertiesANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePresentationPropertiesANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentationPropertiesANDROID sType(@CType("VkStructureType") int value) { VkPhysicalDevicePresentationPropertiesANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePresentationPropertiesANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePresentationPropertiesANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePresentationPropertiesANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentationPropertiesANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentationPropertiesANDROID pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentationPropertiesANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentationPropertiesANDROID pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentationPropertiesANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `sharedImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sharedImage(MemorySegment segment, long index) { return (int) VH_sharedImage.get(segment, 0L, index); } + /// {@return `sharedImage`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sharedImage(MemorySegment segment) { return VkPhysicalDevicePresentationPropertiesANDROID.get_sharedImage(segment, 0L); } + /// {@return `sharedImage` at the given index} + /// @param index the index + public @CType("VkBool32") int sharedImageAt(long index) { return VkPhysicalDevicePresentationPropertiesANDROID.get_sharedImage(this.segment(), index); } + /// {@return `sharedImage`} + public @CType("VkBool32") int sharedImage() { return VkPhysicalDevicePresentationPropertiesANDROID.get_sharedImage(this.segment()); } + /// Sets `sharedImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sharedImage(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sharedImage.set(segment, 0L, index, value); } + /// Sets `sharedImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sharedImage(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePresentationPropertiesANDROID.set_sharedImage(segment, 0L, value); } + /// Sets `sharedImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentationPropertiesANDROID sharedImageAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePresentationPropertiesANDROID.set_sharedImage(this.segment(), index, value); return this; } + /// Sets `sharedImage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentationPropertiesANDROID sharedImage(@CType("VkBool32") int value) { VkPhysicalDevicePresentationPropertiesANDROID.set_sharedImage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkSwapchainImageCreateInfoANDROID.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkSwapchainImageCreateInfoANDROID.java new file mode 100644 index 00000000..0d9c58d4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/android/struct/VkSwapchainImageCreateInfoANDROID.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.android.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSwapchainImageCreateInfoANDROID { +/// VkStructureType sType; +/// const void * pNext; +/// VkSwapchainImageUsageFlagsANDROID usage; +/// } VkSwapchainImageCreateInfoANDROID; +/// ``` +public final class VkSwapchainImageCreateInfoANDROID extends Struct { + /// The struct layout of `VkSwapchainImageCreateInfoANDROID`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("usage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + + /// Creates `VkSwapchainImageCreateInfoANDROID` with the given segment. + /// @param segment the memory segment + public VkSwapchainImageCreateInfoANDROID(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSwapchainImageCreateInfoANDROID` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainImageCreateInfoANDROID of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainImageCreateInfoANDROID(segment); } + + /// Creates `VkSwapchainImageCreateInfoANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainImageCreateInfoANDROID ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainImageCreateInfoANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSwapchainImageCreateInfoANDROID` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainImageCreateInfoANDROID ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainImageCreateInfoANDROID(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSwapchainImageCreateInfoANDROID` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSwapchainImageCreateInfoANDROID` + public static VkSwapchainImageCreateInfoANDROID alloc(SegmentAllocator allocator) { return new VkSwapchainImageCreateInfoANDROID(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSwapchainImageCreateInfoANDROID` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSwapchainImageCreateInfoANDROID` + public static VkSwapchainImageCreateInfoANDROID alloc(SegmentAllocator allocator, long count) { return new VkSwapchainImageCreateInfoANDROID(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSwapchainImageCreateInfoANDROID.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSwapchainImageCreateInfoANDROID.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSwapchainImageCreateInfoANDROID.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSwapchainImageCreateInfoANDROID.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainImageCreateInfoANDROID sTypeAt(long index, @CType("VkStructureType") int value) { VkSwapchainImageCreateInfoANDROID.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainImageCreateInfoANDROID sType(@CType("VkStructureType") int value) { VkSwapchainImageCreateInfoANDROID.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSwapchainImageCreateInfoANDROID.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSwapchainImageCreateInfoANDROID.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSwapchainImageCreateInfoANDROID.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainImageCreateInfoANDROID.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainImageCreateInfoANDROID pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainImageCreateInfoANDROID.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainImageCreateInfoANDROID pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainImageCreateInfoANDROID.set_pNext(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSwapchainImageUsageFlagsANDROID") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkSwapchainImageUsageFlagsANDROID") int get_usage(MemorySegment segment) { return VkSwapchainImageCreateInfoANDROID.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkSwapchainImageUsageFlagsANDROID") int usageAt(long index) { return VkSwapchainImageCreateInfoANDROID.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkSwapchainImageUsageFlagsANDROID") int usage() { return VkSwapchainImageCreateInfoANDROID.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkSwapchainImageUsageFlagsANDROID") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkSwapchainImageUsageFlagsANDROID") int value) { VkSwapchainImageCreateInfoANDROID.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainImageCreateInfoANDROID usageAt(long index, @CType("VkSwapchainImageUsageFlagsANDROID") int value) { VkSwapchainImageCreateInfoANDROID.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainImageCreateInfoANDROID usage(@CType("VkSwapchainImageUsageFlagsANDROID") int value) { VkSwapchainImageCreateInfoANDROID.set_usage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMRasterizationOrderAttachmentAccess.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMRasterizationOrderAttachmentAccess.java new file mode 100644 index 00000000..20586d2d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMRasterizationOrderAttachmentAccess.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.ext.VKEXTRasterizationOrderAttachmentAccess.*; +public class VKARMRasterizationOrderAttachmentAccess { + public static final int VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION = 1; + public static final String VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = "VK_ARM_rasterization_order_attachment_access"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT; + public static final int VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT; + public static final int VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT; + public static final int VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT; + public static final int VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT; + public static final int VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT; + public static final int VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT; + + public VKARMRasterizationOrderAttachmentAccess(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMRenderPassStriped.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMRenderPassStriped.java new file mode 100644 index 00000000..b7ff5085 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMRenderPassStriped.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKARMRenderPassStriped { + public static final int VK_ARM_RENDER_PASS_STRIPED_SPEC_VERSION = 1; + public static final String VK_ARM_RENDER_PASS_STRIPED_EXTENSION_NAME = "VK_ARM_render_pass_striped"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_FEATURES_ARM = 1000424000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_PROPERTIES_ARM = 1000424001; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_BEGIN_INFO_ARM = 1000424002; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM = 1000424003; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM = 1000424004; + + public VKARMRenderPassStriped(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMSchedulingControls.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMSchedulingControls.java new file mode 100644 index 00000000..ebb150eb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMSchedulingControls.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKARMSchedulingControls { + public static final long VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM = 0x00000001L; + public static final int VK_ARM_SCHEDULING_CONTROLS_SPEC_VERSION = 1; + public static final String VK_ARM_SCHEDULING_CONTROLS_EXTENSION_NAME = "VK_ARM_scheduling_controls"; + public static final int VK_STRUCTURE_TYPE_DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM = 1000417000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM = 1000417001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM = 1000417002; + + public VKARMSchedulingControls(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMShaderCoreBuiltins.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMShaderCoreBuiltins.java new file mode 100644 index 00000000..7bc0efc0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMShaderCoreBuiltins.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKARMShaderCoreBuiltins { + public static final int VK_ARM_SHADER_CORE_BUILTINS_SPEC_VERSION = 2; + public static final String VK_ARM_SHADER_CORE_BUILTINS_EXTENSION_NAME = "VK_ARM_shader_core_builtins"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM = 1000497000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM = 1000497001; + + public VKARMShaderCoreBuiltins(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMShaderCoreProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMShaderCoreProperties.java new file mode 100644 index 00000000..02e781ad --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/VKARMShaderCoreProperties.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKARMShaderCoreProperties { + public static final int VK_ARM_SHADER_CORE_PROPERTIES_SPEC_VERSION = 1; + public static final String VK_ARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_ARM_shader_core_properties"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM = 1000415000; + + public VKARMShaderCoreProperties(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkDeviceQueueShaderCoreControlCreateInfoARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkDeviceQueueShaderCoreControlCreateInfoARM.java new file mode 100644 index 00000000..093d498e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkDeviceQueueShaderCoreControlCreateInfoARM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderCoreCount +/// [VarHandle][#VH_shaderCoreCount] - [Getter][#shaderCoreCount()] - [Setter][#shaderCoreCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceQueueShaderCoreControlCreateInfoARM { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t shaderCoreCount; +/// } VkDeviceQueueShaderCoreControlCreateInfoARM; +/// ``` +public final class VkDeviceQueueShaderCoreControlCreateInfoARM extends Struct { + /// The struct layout of `VkDeviceQueueShaderCoreControlCreateInfoARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderCoreCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderCoreCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderCoreCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderCoreCount")); + + /// Creates `VkDeviceQueueShaderCoreControlCreateInfoARM` with the given segment. + /// @param segment the memory segment + public VkDeviceQueueShaderCoreControlCreateInfoARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceQueueShaderCoreControlCreateInfoARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueShaderCoreControlCreateInfoARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueShaderCoreControlCreateInfoARM(segment); } + + /// Creates `VkDeviceQueueShaderCoreControlCreateInfoARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueShaderCoreControlCreateInfoARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueShaderCoreControlCreateInfoARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceQueueShaderCoreControlCreateInfoARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueShaderCoreControlCreateInfoARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueShaderCoreControlCreateInfoARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceQueueShaderCoreControlCreateInfoARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceQueueShaderCoreControlCreateInfoARM` + public static VkDeviceQueueShaderCoreControlCreateInfoARM alloc(SegmentAllocator allocator) { return new VkDeviceQueueShaderCoreControlCreateInfoARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceQueueShaderCoreControlCreateInfoARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceQueueShaderCoreControlCreateInfoARM` + public static VkDeviceQueueShaderCoreControlCreateInfoARM alloc(SegmentAllocator allocator, long count) { return new VkDeviceQueueShaderCoreControlCreateInfoARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceQueueShaderCoreControlCreateInfoARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceQueueShaderCoreControlCreateInfoARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceQueueShaderCoreControlCreateInfoARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceQueueShaderCoreControlCreateInfoARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueShaderCoreControlCreateInfoARM sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceQueueShaderCoreControlCreateInfoARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueShaderCoreControlCreateInfoARM sType(@CType("VkStructureType") int value) { VkDeviceQueueShaderCoreControlCreateInfoARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceQueueShaderCoreControlCreateInfoARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceQueueShaderCoreControlCreateInfoARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceQueueShaderCoreControlCreateInfoARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueShaderCoreControlCreateInfoARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueShaderCoreControlCreateInfoARM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueShaderCoreControlCreateInfoARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueShaderCoreControlCreateInfoARM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueShaderCoreControlCreateInfoARM.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderCoreCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderCoreCount(MemorySegment segment, long index) { return (int) VH_shaderCoreCount.get(segment, 0L, index); } + /// {@return `shaderCoreCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderCoreCount(MemorySegment segment) { return VkDeviceQueueShaderCoreControlCreateInfoARM.get_shaderCoreCount(segment, 0L); } + /// {@return `shaderCoreCount` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderCoreCountAt(long index) { return VkDeviceQueueShaderCoreControlCreateInfoARM.get_shaderCoreCount(this.segment(), index); } + /// {@return `shaderCoreCount`} + public @CType("uint32_t") int shaderCoreCount() { return VkDeviceQueueShaderCoreControlCreateInfoARM.get_shaderCoreCount(this.segment()); } + /// Sets `shaderCoreCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderCoreCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderCoreCount.set(segment, 0L, index, value); } + /// Sets `shaderCoreCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderCoreCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceQueueShaderCoreControlCreateInfoARM.set_shaderCoreCount(segment, 0L, value); } + /// Sets `shaderCoreCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueShaderCoreControlCreateInfoARM shaderCoreCountAt(long index, @CType("uint32_t") int value) { VkDeviceQueueShaderCoreControlCreateInfoARM.set_shaderCoreCount(this.segment(), index, value); return this; } + /// Sets `shaderCoreCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueShaderCoreControlCreateInfoARM shaderCoreCount(@CType("uint32_t") int value) { VkDeviceQueueShaderCoreControlCreateInfoARM.set_shaderCoreCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceRenderPassStripedFeaturesARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceRenderPassStripedFeaturesARM.java new file mode 100644 index 00000000..a49705d2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceRenderPassStripedFeaturesARM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### renderPassStriped +/// [VarHandle][#VH_renderPassStriped] - [Getter][#renderPassStriped()] - [Setter][#renderPassStriped(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRenderPassStripedFeaturesARM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 renderPassStriped; +/// } VkPhysicalDeviceRenderPassStripedFeaturesARM; +/// ``` +public final class VkPhysicalDeviceRenderPassStripedFeaturesARM extends Struct { + /// The struct layout of `VkPhysicalDeviceRenderPassStripedFeaturesARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("renderPassStriped") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `renderPassStriped` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_renderPassStriped = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderPassStriped")); + + /// Creates `VkPhysicalDeviceRenderPassStripedFeaturesARM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRenderPassStripedFeaturesARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRenderPassStripedFeaturesARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRenderPassStripedFeaturesARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRenderPassStripedFeaturesARM(segment); } + + /// Creates `VkPhysicalDeviceRenderPassStripedFeaturesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRenderPassStripedFeaturesARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRenderPassStripedFeaturesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRenderPassStripedFeaturesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRenderPassStripedFeaturesARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRenderPassStripedFeaturesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRenderPassStripedFeaturesARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRenderPassStripedFeaturesARM` + public static VkPhysicalDeviceRenderPassStripedFeaturesARM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRenderPassStripedFeaturesARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRenderPassStripedFeaturesARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRenderPassStripedFeaturesARM` + public static VkPhysicalDeviceRenderPassStripedFeaturesARM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRenderPassStripedFeaturesARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRenderPassStripedFeaturesARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRenderPassStripedFeaturesARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRenderPassStripedFeaturesARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRenderPassStripedFeaturesARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedFeaturesARM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRenderPassStripedFeaturesARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedFeaturesARM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRenderPassStripedFeaturesARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRenderPassStripedFeaturesARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRenderPassStripedFeaturesARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRenderPassStripedFeaturesARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRenderPassStripedFeaturesARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedFeaturesARM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRenderPassStripedFeaturesARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedFeaturesARM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRenderPassStripedFeaturesARM.set_pNext(this.segment(), value); return this; } + + /// {@return `renderPassStriped` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_renderPassStriped(MemorySegment segment, long index) { return (int) VH_renderPassStriped.get(segment, 0L, index); } + /// {@return `renderPassStriped`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_renderPassStriped(MemorySegment segment) { return VkPhysicalDeviceRenderPassStripedFeaturesARM.get_renderPassStriped(segment, 0L); } + /// {@return `renderPassStriped` at the given index} + /// @param index the index + public @CType("VkBool32") int renderPassStripedAt(long index) { return VkPhysicalDeviceRenderPassStripedFeaturesARM.get_renderPassStriped(this.segment(), index); } + /// {@return `renderPassStriped`} + public @CType("VkBool32") int renderPassStriped() { return VkPhysicalDeviceRenderPassStripedFeaturesARM.get_renderPassStriped(this.segment()); } + /// Sets `renderPassStriped` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderPassStriped(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_renderPassStriped.set(segment, 0L, index, value); } + /// Sets `renderPassStriped` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderPassStriped(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRenderPassStripedFeaturesARM.set_renderPassStriped(segment, 0L, value); } + /// Sets `renderPassStriped` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedFeaturesARM renderPassStripedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRenderPassStripedFeaturesARM.set_renderPassStriped(this.segment(), index, value); return this; } + /// Sets `renderPassStriped` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedFeaturesARM renderPassStriped(@CType("VkBool32") int value) { VkPhysicalDeviceRenderPassStripedFeaturesARM.set_renderPassStriped(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceRenderPassStripedPropertiesARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceRenderPassStripedPropertiesARM.java new file mode 100644 index 00000000..f696f7b8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceRenderPassStripedPropertiesARM.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### renderPassStripeGranularity +/// [Byte offset][#OFFSET_renderPassStripeGranularity] - [Memory layout][#ML_renderPassStripeGranularity] - [Getter][#renderPassStripeGranularity()] - [Setter][#renderPassStripeGranularity(java.lang.foreign.MemorySegment)] +/// ### maxRenderPassStripes +/// [VarHandle][#VH_maxRenderPassStripes] - [Getter][#maxRenderPassStripes()] - [Setter][#maxRenderPassStripes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRenderPassStripedPropertiesARM { +/// VkStructureType sType; +/// void * pNext; +/// VkExtent2D renderPassStripeGranularity; +/// uint32_t maxRenderPassStripes; +/// } VkPhysicalDeviceRenderPassStripedPropertiesARM; +/// ``` +public final class VkPhysicalDeviceRenderPassStripedPropertiesARM extends Struct { + /// The struct layout of `VkPhysicalDeviceRenderPassStripedPropertiesARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("renderPassStripeGranularity"), + ValueLayout.JAVA_INT.withName("maxRenderPassStripes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `renderPassStripeGranularity`. + public static final long OFFSET_renderPassStripeGranularity = LAYOUT.byteOffset(PathElement.groupElement("renderPassStripeGranularity")); + /// The memory layout of `renderPassStripeGranularity`. + public static final MemoryLayout ML_renderPassStripeGranularity = LAYOUT.select(PathElement.groupElement("renderPassStripeGranularity")); + /// The [VarHandle] of `maxRenderPassStripes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxRenderPassStripes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxRenderPassStripes")); + + /// Creates `VkPhysicalDeviceRenderPassStripedPropertiesARM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRenderPassStripedPropertiesARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRenderPassStripedPropertiesARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRenderPassStripedPropertiesARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRenderPassStripedPropertiesARM(segment); } + + /// Creates `VkPhysicalDeviceRenderPassStripedPropertiesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRenderPassStripedPropertiesARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRenderPassStripedPropertiesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRenderPassStripedPropertiesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRenderPassStripedPropertiesARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRenderPassStripedPropertiesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRenderPassStripedPropertiesARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRenderPassStripedPropertiesARM` + public static VkPhysicalDeviceRenderPassStripedPropertiesARM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRenderPassStripedPropertiesARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRenderPassStripedPropertiesARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRenderPassStripedPropertiesARM` + public static VkPhysicalDeviceRenderPassStripedPropertiesARM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRenderPassStripedPropertiesARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedPropertiesARM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedPropertiesARM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedPropertiesARM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedPropertiesARM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_pNext(this.segment(), value); return this; } + + /// {@return `renderPassStripeGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_renderPassStripeGranularity(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_renderPassStripeGranularity, index), ML_renderPassStripeGranularity); } + /// {@return `renderPassStripeGranularity`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_renderPassStripeGranularity(MemorySegment segment) { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_renderPassStripeGranularity(segment, 0L); } + /// {@return `renderPassStripeGranularity` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment renderPassStripeGranularityAt(long index) { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_renderPassStripeGranularity(this.segment(), index); } + /// {@return `renderPassStripeGranularity`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment renderPassStripeGranularity() { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_renderPassStripeGranularity(this.segment()); } + /// Sets `renderPassStripeGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderPassStripeGranularity(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_renderPassStripeGranularity, index), ML_renderPassStripeGranularity.byteSize()); } + /// Sets `renderPassStripeGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderPassStripeGranularity(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_renderPassStripeGranularity(segment, 0L, value); } + /// Sets `renderPassStripeGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedPropertiesARM renderPassStripeGranularityAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_renderPassStripeGranularity(this.segment(), index, value); return this; } + /// Sets `renderPassStripeGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedPropertiesARM renderPassStripeGranularity(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_renderPassStripeGranularity(this.segment(), value); return this; } + + /// {@return `maxRenderPassStripes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxRenderPassStripes(MemorySegment segment, long index) { return (int) VH_maxRenderPassStripes.get(segment, 0L, index); } + /// {@return `maxRenderPassStripes`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxRenderPassStripes(MemorySegment segment) { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_maxRenderPassStripes(segment, 0L); } + /// {@return `maxRenderPassStripes` at the given index} + /// @param index the index + public @CType("uint32_t") int maxRenderPassStripesAt(long index) { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_maxRenderPassStripes(this.segment(), index); } + /// {@return `maxRenderPassStripes`} + public @CType("uint32_t") int maxRenderPassStripes() { return VkPhysicalDeviceRenderPassStripedPropertiesARM.get_maxRenderPassStripes(this.segment()); } + /// Sets `maxRenderPassStripes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxRenderPassStripes(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxRenderPassStripes.set(segment, 0L, index, value); } + /// Sets `maxRenderPassStripes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxRenderPassStripes(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_maxRenderPassStripes(segment, 0L, value); } + /// Sets `maxRenderPassStripes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedPropertiesARM maxRenderPassStripesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_maxRenderPassStripes(this.segment(), index, value); return this; } + /// Sets `maxRenderPassStripes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRenderPassStripedPropertiesARM maxRenderPassStripes(@CType("uint32_t") int value) { VkPhysicalDeviceRenderPassStripedPropertiesARM.set_maxRenderPassStripes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceSchedulingControlsFeaturesARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceSchedulingControlsFeaturesARM.java new file mode 100644 index 00000000..ce064c8e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceSchedulingControlsFeaturesARM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### schedulingControls +/// [VarHandle][#VH_schedulingControls] - [Getter][#schedulingControls()] - [Setter][#schedulingControls(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSchedulingControlsFeaturesARM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 schedulingControls; +/// } VkPhysicalDeviceSchedulingControlsFeaturesARM; +/// ``` +public final class VkPhysicalDeviceSchedulingControlsFeaturesARM extends Struct { + /// The struct layout of `VkPhysicalDeviceSchedulingControlsFeaturesARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("schedulingControls") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `schedulingControls` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_schedulingControls = LAYOUT.arrayElementVarHandle(PathElement.groupElement("schedulingControls")); + + /// Creates `VkPhysicalDeviceSchedulingControlsFeaturesARM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSchedulingControlsFeaturesARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSchedulingControlsFeaturesARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSchedulingControlsFeaturesARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSchedulingControlsFeaturesARM(segment); } + + /// Creates `VkPhysicalDeviceSchedulingControlsFeaturesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSchedulingControlsFeaturesARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSchedulingControlsFeaturesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSchedulingControlsFeaturesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSchedulingControlsFeaturesARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSchedulingControlsFeaturesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSchedulingControlsFeaturesARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSchedulingControlsFeaturesARM` + public static VkPhysicalDeviceSchedulingControlsFeaturesARM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSchedulingControlsFeaturesARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSchedulingControlsFeaturesARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSchedulingControlsFeaturesARM` + public static VkPhysicalDeviceSchedulingControlsFeaturesARM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSchedulingControlsFeaturesARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSchedulingControlsFeaturesARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSchedulingControlsFeaturesARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSchedulingControlsFeaturesARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSchedulingControlsFeaturesARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsFeaturesARM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSchedulingControlsFeaturesARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsFeaturesARM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSchedulingControlsFeaturesARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSchedulingControlsFeaturesARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSchedulingControlsFeaturesARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSchedulingControlsFeaturesARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSchedulingControlsFeaturesARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsFeaturesARM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSchedulingControlsFeaturesARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsFeaturesARM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSchedulingControlsFeaturesARM.set_pNext(this.segment(), value); return this; } + + /// {@return `schedulingControls` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_schedulingControls(MemorySegment segment, long index) { return (int) VH_schedulingControls.get(segment, 0L, index); } + /// {@return `schedulingControls`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_schedulingControls(MemorySegment segment) { return VkPhysicalDeviceSchedulingControlsFeaturesARM.get_schedulingControls(segment, 0L); } + /// {@return `schedulingControls` at the given index} + /// @param index the index + public @CType("VkBool32") int schedulingControlsAt(long index) { return VkPhysicalDeviceSchedulingControlsFeaturesARM.get_schedulingControls(this.segment(), index); } + /// {@return `schedulingControls`} + public @CType("VkBool32") int schedulingControls() { return VkPhysicalDeviceSchedulingControlsFeaturesARM.get_schedulingControls(this.segment()); } + /// Sets `schedulingControls` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_schedulingControls(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_schedulingControls.set(segment, 0L, index, value); } + /// Sets `schedulingControls` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_schedulingControls(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSchedulingControlsFeaturesARM.set_schedulingControls(segment, 0L, value); } + /// Sets `schedulingControls` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsFeaturesARM schedulingControlsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSchedulingControlsFeaturesARM.set_schedulingControls(this.segment(), index, value); return this; } + /// Sets `schedulingControls` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsFeaturesARM schedulingControls(@CType("VkBool32") int value) { VkPhysicalDeviceSchedulingControlsFeaturesARM.set_schedulingControls(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceSchedulingControlsPropertiesARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceSchedulingControlsPropertiesARM.java new file mode 100644 index 00000000..8eed8f6d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceSchedulingControlsPropertiesARM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### schedulingControlsFlags +/// [VarHandle][#VH_schedulingControlsFlags] - [Getter][#schedulingControlsFlags()] - [Setter][#schedulingControlsFlags(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSchedulingControlsPropertiesARM { +/// VkStructureType sType; +/// void * pNext; +/// VkPhysicalDeviceSchedulingControlsFlagsARM schedulingControlsFlags; +/// } VkPhysicalDeviceSchedulingControlsPropertiesARM; +/// ``` +public final class VkPhysicalDeviceSchedulingControlsPropertiesARM extends Struct { + /// The struct layout of `VkPhysicalDeviceSchedulingControlsPropertiesARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("schedulingControlsFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `schedulingControlsFlags` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_schedulingControlsFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("schedulingControlsFlags")); + + /// Creates `VkPhysicalDeviceSchedulingControlsPropertiesARM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSchedulingControlsPropertiesARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSchedulingControlsPropertiesARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSchedulingControlsPropertiesARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSchedulingControlsPropertiesARM(segment); } + + /// Creates `VkPhysicalDeviceSchedulingControlsPropertiesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSchedulingControlsPropertiesARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSchedulingControlsPropertiesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSchedulingControlsPropertiesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSchedulingControlsPropertiesARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSchedulingControlsPropertiesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSchedulingControlsPropertiesARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSchedulingControlsPropertiesARM` + public static VkPhysicalDeviceSchedulingControlsPropertiesARM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSchedulingControlsPropertiesARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSchedulingControlsPropertiesARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSchedulingControlsPropertiesARM` + public static VkPhysicalDeviceSchedulingControlsPropertiesARM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSchedulingControlsPropertiesARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSchedulingControlsPropertiesARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSchedulingControlsPropertiesARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSchedulingControlsPropertiesARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSchedulingControlsPropertiesARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsPropertiesARM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSchedulingControlsPropertiesARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsPropertiesARM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSchedulingControlsPropertiesARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSchedulingControlsPropertiesARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSchedulingControlsPropertiesARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSchedulingControlsPropertiesARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSchedulingControlsPropertiesARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsPropertiesARM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSchedulingControlsPropertiesARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsPropertiesARM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSchedulingControlsPropertiesARM.set_pNext(this.segment(), value); return this; } + + /// {@return `schedulingControlsFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPhysicalDeviceSchedulingControlsFlagsARM") long get_schedulingControlsFlags(MemorySegment segment, long index) { return (long) VH_schedulingControlsFlags.get(segment, 0L, index); } + /// {@return `schedulingControlsFlags`} + /// @param segment the segment of the struct + public static @CType("VkPhysicalDeviceSchedulingControlsFlagsARM") long get_schedulingControlsFlags(MemorySegment segment) { return VkPhysicalDeviceSchedulingControlsPropertiesARM.get_schedulingControlsFlags(segment, 0L); } + /// {@return `schedulingControlsFlags` at the given index} + /// @param index the index + public @CType("VkPhysicalDeviceSchedulingControlsFlagsARM") long schedulingControlsFlagsAt(long index) { return VkPhysicalDeviceSchedulingControlsPropertiesARM.get_schedulingControlsFlags(this.segment(), index); } + /// {@return `schedulingControlsFlags`} + public @CType("VkPhysicalDeviceSchedulingControlsFlagsARM") long schedulingControlsFlags() { return VkPhysicalDeviceSchedulingControlsPropertiesARM.get_schedulingControlsFlags(this.segment()); } + /// Sets `schedulingControlsFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_schedulingControlsFlags(MemorySegment segment, long index, @CType("VkPhysicalDeviceSchedulingControlsFlagsARM") long value) { VH_schedulingControlsFlags.set(segment, 0L, index, value); } + /// Sets `schedulingControlsFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_schedulingControlsFlags(MemorySegment segment, @CType("VkPhysicalDeviceSchedulingControlsFlagsARM") long value) { VkPhysicalDeviceSchedulingControlsPropertiesARM.set_schedulingControlsFlags(segment, 0L, value); } + /// Sets `schedulingControlsFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsPropertiesARM schedulingControlsFlagsAt(long index, @CType("VkPhysicalDeviceSchedulingControlsFlagsARM") long value) { VkPhysicalDeviceSchedulingControlsPropertiesARM.set_schedulingControlsFlags(this.segment(), index, value); return this; } + /// Sets `schedulingControlsFlags` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSchedulingControlsPropertiesARM schedulingControlsFlags(@CType("VkPhysicalDeviceSchedulingControlsFlagsARM") long value) { VkPhysicalDeviceSchedulingControlsPropertiesARM.set_schedulingControlsFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.java new file mode 100644 index 00000000..815863c5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderCoreBuiltins +/// [VarHandle][#VH_shaderCoreBuiltins] - [Getter][#shaderCoreBuiltins()] - [Setter][#shaderCoreBuiltins(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderCoreBuiltins; +/// } VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM; +/// ``` +public final class VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderCoreBuiltins") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderCoreBuiltins` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderCoreBuiltins = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderCoreBuiltins")); + + /// Creates `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM(segment); } + + /// Creates `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM` + public static VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM` + public static VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderCoreBuiltins` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderCoreBuiltins(MemorySegment segment, long index) { return (int) VH_shaderCoreBuiltins.get(segment, 0L, index); } + /// {@return `shaderCoreBuiltins`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderCoreBuiltins(MemorySegment segment) { return VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.get_shaderCoreBuiltins(segment, 0L); } + /// {@return `shaderCoreBuiltins` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderCoreBuiltinsAt(long index) { return VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.get_shaderCoreBuiltins(this.segment(), index); } + /// {@return `shaderCoreBuiltins`} + public @CType("VkBool32") int shaderCoreBuiltins() { return VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.get_shaderCoreBuiltins(this.segment()); } + /// Sets `shaderCoreBuiltins` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderCoreBuiltins(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderCoreBuiltins.set(segment, 0L, index, value); } + /// Sets `shaderCoreBuiltins` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderCoreBuiltins(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.set_shaderCoreBuiltins(segment, 0L, value); } + /// Sets `shaderCoreBuiltins` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM shaderCoreBuiltinsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.set_shaderCoreBuiltins(this.segment(), index, value); return this; } + /// Sets `shaderCoreBuiltins` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM shaderCoreBuiltins(@CType("VkBool32") int value) { VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.set_shaderCoreBuiltins(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.java new file mode 100644 index 00000000..0223650c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderCoreMask +/// [VarHandle][#VH_shaderCoreMask] - [Getter][#shaderCoreMask()] - [Setter][#shaderCoreMask(long)] +/// ### shaderCoreCount +/// [VarHandle][#VH_shaderCoreCount] - [Getter][#shaderCoreCount()] - [Setter][#shaderCoreCount(int)] +/// ### shaderWarpsPerCore +/// [VarHandle][#VH_shaderWarpsPerCore] - [Getter][#shaderWarpsPerCore()] - [Setter][#shaderWarpsPerCore(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM { +/// VkStructureType sType; +/// void * pNext; +/// uint64_t shaderCoreMask; +/// uint32_t shaderCoreCount; +/// uint32_t shaderWarpsPerCore; +/// } VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM; +/// ``` +public final class VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("shaderCoreMask"), + ValueLayout.JAVA_INT.withName("shaderCoreCount"), + ValueLayout.JAVA_INT.withName("shaderWarpsPerCore") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderCoreMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_shaderCoreMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderCoreMask")); + /// The [VarHandle] of `shaderCoreCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderCoreCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderCoreCount")); + /// The [VarHandle] of `shaderWarpsPerCore` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderWarpsPerCore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderWarpsPerCore")); + + /// Creates `VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM(segment); } + + /// Creates `VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM` + public static VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM` + public static VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderCoreMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_shaderCoreMask(MemorySegment segment, long index) { return (long) VH_shaderCoreMask.get(segment, 0L, index); } + /// {@return `shaderCoreMask`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_shaderCoreMask(MemorySegment segment) { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_shaderCoreMask(segment, 0L); } + /// {@return `shaderCoreMask` at the given index} + /// @param index the index + public @CType("uint64_t") long shaderCoreMaskAt(long index) { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_shaderCoreMask(this.segment(), index); } + /// {@return `shaderCoreMask`} + public @CType("uint64_t") long shaderCoreMask() { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_shaderCoreMask(this.segment()); } + /// Sets `shaderCoreMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderCoreMask(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_shaderCoreMask.set(segment, 0L, index, value); } + /// Sets `shaderCoreMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderCoreMask(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_shaderCoreMask(segment, 0L, value); } + /// Sets `shaderCoreMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM shaderCoreMaskAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_shaderCoreMask(this.segment(), index, value); return this; } + /// Sets `shaderCoreMask` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM shaderCoreMask(@CType("uint64_t") long value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_shaderCoreMask(this.segment(), value); return this; } + + /// {@return `shaderCoreCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderCoreCount(MemorySegment segment, long index) { return (int) VH_shaderCoreCount.get(segment, 0L, index); } + /// {@return `shaderCoreCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderCoreCount(MemorySegment segment) { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_shaderCoreCount(segment, 0L); } + /// {@return `shaderCoreCount` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderCoreCountAt(long index) { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_shaderCoreCount(this.segment(), index); } + /// {@return `shaderCoreCount`} + public @CType("uint32_t") int shaderCoreCount() { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_shaderCoreCount(this.segment()); } + /// Sets `shaderCoreCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderCoreCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderCoreCount.set(segment, 0L, index, value); } + /// Sets `shaderCoreCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderCoreCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_shaderCoreCount(segment, 0L, value); } + /// Sets `shaderCoreCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM shaderCoreCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_shaderCoreCount(this.segment(), index, value); return this; } + /// Sets `shaderCoreCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM shaderCoreCount(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_shaderCoreCount(this.segment(), value); return this; } + + /// {@return `shaderWarpsPerCore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderWarpsPerCore(MemorySegment segment, long index) { return (int) VH_shaderWarpsPerCore.get(segment, 0L, index); } + /// {@return `shaderWarpsPerCore`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderWarpsPerCore(MemorySegment segment) { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_shaderWarpsPerCore(segment, 0L); } + /// {@return `shaderWarpsPerCore` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderWarpsPerCoreAt(long index) { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_shaderWarpsPerCore(this.segment(), index); } + /// {@return `shaderWarpsPerCore`} + public @CType("uint32_t") int shaderWarpsPerCore() { return VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.get_shaderWarpsPerCore(this.segment()); } + /// Sets `shaderWarpsPerCore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderWarpsPerCore(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderWarpsPerCore.set(segment, 0L, index, value); } + /// Sets `shaderWarpsPerCore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderWarpsPerCore(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_shaderWarpsPerCore(segment, 0L, value); } + /// Sets `shaderWarpsPerCore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM shaderWarpsPerCoreAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_shaderWarpsPerCore(this.segment(), index, value); return this; } + /// Sets `shaderWarpsPerCore` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM shaderWarpsPerCore(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.set_shaderWarpsPerCore(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceShaderCorePropertiesARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceShaderCorePropertiesARM.java new file mode 100644 index 00000000..713b3275 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkPhysicalDeviceShaderCorePropertiesARM.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pixelRate +/// [VarHandle][#VH_pixelRate] - [Getter][#pixelRate()] - [Setter][#pixelRate(int)] +/// ### texelRate +/// [VarHandle][#VH_texelRate] - [Getter][#texelRate()] - [Setter][#texelRate(int)] +/// ### fmaRate +/// [VarHandle][#VH_fmaRate] - [Getter][#fmaRate()] - [Setter][#fmaRate(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderCorePropertiesARM { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t pixelRate; +/// uint32_t texelRate; +/// uint32_t fmaRate; +/// } VkPhysicalDeviceShaderCorePropertiesARM; +/// ``` +public final class VkPhysicalDeviceShaderCorePropertiesARM extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderCorePropertiesARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pixelRate"), + ValueLayout.JAVA_INT.withName("texelRate"), + ValueLayout.JAVA_INT.withName("fmaRate") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pixelRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pixelRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pixelRate")); + /// The [VarHandle] of `texelRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_texelRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("texelRate")); + /// The [VarHandle] of `fmaRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fmaRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fmaRate")); + + /// Creates `VkPhysicalDeviceShaderCorePropertiesARM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderCorePropertiesARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderCorePropertiesARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCorePropertiesARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCorePropertiesARM(segment); } + + /// Creates `VkPhysicalDeviceShaderCorePropertiesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCorePropertiesARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCorePropertiesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderCorePropertiesARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderCorePropertiesARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderCorePropertiesARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderCorePropertiesARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderCorePropertiesARM` + public static VkPhysicalDeviceShaderCorePropertiesARM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderCorePropertiesARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderCorePropertiesARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderCorePropertiesARM` + public static VkPhysicalDeviceShaderCorePropertiesARM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderCorePropertiesARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderCorePropertiesARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderCorePropertiesARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesARM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesARM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderCorePropertiesARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderCorePropertiesARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCorePropertiesARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesARM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCorePropertiesARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesARM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderCorePropertiesARM.set_pNext(this.segment(), value); return this; } + + /// {@return `pixelRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pixelRate(MemorySegment segment, long index) { return (int) VH_pixelRate.get(segment, 0L, index); } + /// {@return `pixelRate`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pixelRate(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesARM.get_pixelRate(segment, 0L); } + /// {@return `pixelRate` at the given index} + /// @param index the index + public @CType("uint32_t") int pixelRateAt(long index) { return VkPhysicalDeviceShaderCorePropertiesARM.get_pixelRate(this.segment(), index); } + /// {@return `pixelRate`} + public @CType("uint32_t") int pixelRate() { return VkPhysicalDeviceShaderCorePropertiesARM.get_pixelRate(this.segment()); } + /// Sets `pixelRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pixelRate(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pixelRate.set(segment, 0L, index, value); } + /// Sets `pixelRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pixelRate(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_pixelRate(segment, 0L, value); } + /// Sets `pixelRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesARM pixelRateAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_pixelRate(this.segment(), index, value); return this; } + /// Sets `pixelRate` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesARM pixelRate(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_pixelRate(this.segment(), value); return this; } + + /// {@return `texelRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_texelRate(MemorySegment segment, long index) { return (int) VH_texelRate.get(segment, 0L, index); } + /// {@return `texelRate`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_texelRate(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesARM.get_texelRate(segment, 0L); } + /// {@return `texelRate` at the given index} + /// @param index the index + public @CType("uint32_t") int texelRateAt(long index) { return VkPhysicalDeviceShaderCorePropertiesARM.get_texelRate(this.segment(), index); } + /// {@return `texelRate`} + public @CType("uint32_t") int texelRate() { return VkPhysicalDeviceShaderCorePropertiesARM.get_texelRate(this.segment()); } + /// Sets `texelRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_texelRate(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_texelRate.set(segment, 0L, index, value); } + /// Sets `texelRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_texelRate(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_texelRate(segment, 0L, value); } + /// Sets `texelRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesARM texelRateAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_texelRate(this.segment(), index, value); return this; } + /// Sets `texelRate` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesARM texelRate(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_texelRate(this.segment(), value); return this; } + + /// {@return `fmaRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_fmaRate(MemorySegment segment, long index) { return (int) VH_fmaRate.get(segment, 0L, index); } + /// {@return `fmaRate`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_fmaRate(MemorySegment segment) { return VkPhysicalDeviceShaderCorePropertiesARM.get_fmaRate(segment, 0L); } + /// {@return `fmaRate` at the given index} + /// @param index the index + public @CType("uint32_t") int fmaRateAt(long index) { return VkPhysicalDeviceShaderCorePropertiesARM.get_fmaRate(this.segment(), index); } + /// {@return `fmaRate`} + public @CType("uint32_t") int fmaRate() { return VkPhysicalDeviceShaderCorePropertiesARM.get_fmaRate(this.segment()); } + /// Sets `fmaRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fmaRate(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_fmaRate.set(segment, 0L, index, value); } + /// Sets `fmaRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fmaRate(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_fmaRate(segment, 0L, value); } + /// Sets `fmaRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesARM fmaRateAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_fmaRate(this.segment(), index, value); return this; } + /// Sets `fmaRate` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderCorePropertiesARM fmaRate(@CType("uint32_t") int value) { VkPhysicalDeviceShaderCorePropertiesARM.set_fmaRate(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkRenderPassStripeBeginInfoARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkRenderPassStripeBeginInfoARM.java new file mode 100644 index 00000000..f918e9f4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkRenderPassStripeBeginInfoARM.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stripeInfoCount +/// [VarHandle][#VH_stripeInfoCount] - [Getter][#stripeInfoCount()] - [Setter][#stripeInfoCount(int)] +/// ### pStripeInfos +/// [VarHandle][#VH_pStripeInfos] - [Getter][#pStripeInfos()] - [Setter][#pStripeInfos(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassStripeBeginInfoARM { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t stripeInfoCount; +/// const VkRenderPassStripeInfoARM * pStripeInfos; +/// } VkRenderPassStripeBeginInfoARM; +/// ``` +public final class VkRenderPassStripeBeginInfoARM extends Struct { + /// The struct layout of `VkRenderPassStripeBeginInfoARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stripeInfoCount"), + ValueLayout.ADDRESS.withName("pStripeInfos") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stripeInfoCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stripeInfoCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stripeInfoCount")); + /// The [VarHandle] of `pStripeInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStripeInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStripeInfos")); + + /// Creates `VkRenderPassStripeBeginInfoARM` with the given segment. + /// @param segment the memory segment + public VkRenderPassStripeBeginInfoARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassStripeBeginInfoARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassStripeBeginInfoARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassStripeBeginInfoARM(segment); } + + /// Creates `VkRenderPassStripeBeginInfoARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassStripeBeginInfoARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassStripeBeginInfoARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassStripeBeginInfoARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassStripeBeginInfoARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassStripeBeginInfoARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassStripeBeginInfoARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassStripeBeginInfoARM` + public static VkRenderPassStripeBeginInfoARM alloc(SegmentAllocator allocator) { return new VkRenderPassStripeBeginInfoARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassStripeBeginInfoARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassStripeBeginInfoARM` + public static VkRenderPassStripeBeginInfoARM alloc(SegmentAllocator allocator, long count) { return new VkRenderPassStripeBeginInfoARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassStripeBeginInfoARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassStripeBeginInfoARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassStripeBeginInfoARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassStripeBeginInfoARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeBeginInfoARM sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassStripeBeginInfoARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeBeginInfoARM sType(@CType("VkStructureType") int value) { VkRenderPassStripeBeginInfoARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassStripeBeginInfoARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassStripeBeginInfoARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassStripeBeginInfoARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeBeginInfoARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeBeginInfoARM pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeBeginInfoARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeBeginInfoARM pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeBeginInfoARM.set_pNext(this.segment(), value); return this; } + + /// {@return `stripeInfoCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stripeInfoCount(MemorySegment segment, long index) { return (int) VH_stripeInfoCount.get(segment, 0L, index); } + /// {@return `stripeInfoCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stripeInfoCount(MemorySegment segment) { return VkRenderPassStripeBeginInfoARM.get_stripeInfoCount(segment, 0L); } + /// {@return `stripeInfoCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stripeInfoCountAt(long index) { return VkRenderPassStripeBeginInfoARM.get_stripeInfoCount(this.segment(), index); } + /// {@return `stripeInfoCount`} + public @CType("uint32_t") int stripeInfoCount() { return VkRenderPassStripeBeginInfoARM.get_stripeInfoCount(this.segment()); } + /// Sets `stripeInfoCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stripeInfoCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stripeInfoCount.set(segment, 0L, index, value); } + /// Sets `stripeInfoCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stripeInfoCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassStripeBeginInfoARM.set_stripeInfoCount(segment, 0L, value); } + /// Sets `stripeInfoCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeBeginInfoARM stripeInfoCountAt(long index, @CType("uint32_t") int value) { VkRenderPassStripeBeginInfoARM.set_stripeInfoCount(this.segment(), index, value); return this; } + /// Sets `stripeInfoCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeBeginInfoARM stripeInfoCount(@CType("uint32_t") int value) { VkRenderPassStripeBeginInfoARM.set_stripeInfoCount(this.segment(), value); return this; } + + /// {@return `pStripeInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRenderPassStripeInfoARM *") java.lang.foreign.MemorySegment get_pStripeInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStripeInfos.get(segment, 0L, index); } + /// {@return `pStripeInfos`} + /// @param segment the segment of the struct + public static @CType("const VkRenderPassStripeInfoARM *") java.lang.foreign.MemorySegment get_pStripeInfos(MemorySegment segment) { return VkRenderPassStripeBeginInfoARM.get_pStripeInfos(segment, 0L); } + /// {@return `pStripeInfos` at the given index} + /// @param index the index + public @CType("const VkRenderPassStripeInfoARM *") java.lang.foreign.MemorySegment pStripeInfosAt(long index) { return VkRenderPassStripeBeginInfoARM.get_pStripeInfos(this.segment(), index); } + /// {@return `pStripeInfos`} + public @CType("const VkRenderPassStripeInfoARM *") java.lang.foreign.MemorySegment pStripeInfos() { return VkRenderPassStripeBeginInfoARM.get_pStripeInfos(this.segment()); } + /// Sets `pStripeInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStripeInfos(MemorySegment segment, long index, @CType("const VkRenderPassStripeInfoARM *") java.lang.foreign.MemorySegment value) { VH_pStripeInfos.set(segment, 0L, index, value); } + /// Sets `pStripeInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStripeInfos(MemorySegment segment, @CType("const VkRenderPassStripeInfoARM *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeBeginInfoARM.set_pStripeInfos(segment, 0L, value); } + /// Sets `pStripeInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeBeginInfoARM pStripeInfosAt(long index, @CType("const VkRenderPassStripeInfoARM *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeBeginInfoARM.set_pStripeInfos(this.segment(), index, value); return this; } + /// Sets `pStripeInfos` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeBeginInfoARM pStripeInfos(@CType("const VkRenderPassStripeInfoARM *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeBeginInfoARM.set_pStripeInfos(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkRenderPassStripeInfoARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkRenderPassStripeInfoARM.java new file mode 100644 index 00000000..6218c822 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkRenderPassStripeInfoARM.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stripeArea +/// [Byte offset][#OFFSET_stripeArea] - [Memory layout][#ML_stripeArea] - [Getter][#stripeArea()] - [Setter][#stripeArea(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassStripeInfoARM { +/// VkStructureType sType; +/// const void * pNext; +/// VkRect2D stripeArea; +/// } VkRenderPassStripeInfoARM; +/// ``` +public final class VkRenderPassStripeInfoARM extends Struct { + /// The struct layout of `VkRenderPassStripeInfoARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkRect2D.LAYOUT.withName("stripeArea") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `stripeArea`. + public static final long OFFSET_stripeArea = LAYOUT.byteOffset(PathElement.groupElement("stripeArea")); + /// The memory layout of `stripeArea`. + public static final MemoryLayout ML_stripeArea = LAYOUT.select(PathElement.groupElement("stripeArea")); + + /// Creates `VkRenderPassStripeInfoARM` with the given segment. + /// @param segment the memory segment + public VkRenderPassStripeInfoARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassStripeInfoARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassStripeInfoARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassStripeInfoARM(segment); } + + /// Creates `VkRenderPassStripeInfoARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassStripeInfoARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassStripeInfoARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassStripeInfoARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassStripeInfoARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassStripeInfoARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassStripeInfoARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassStripeInfoARM` + public static VkRenderPassStripeInfoARM alloc(SegmentAllocator allocator) { return new VkRenderPassStripeInfoARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassStripeInfoARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassStripeInfoARM` + public static VkRenderPassStripeInfoARM alloc(SegmentAllocator allocator, long count) { return new VkRenderPassStripeInfoARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassStripeInfoARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassStripeInfoARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassStripeInfoARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassStripeInfoARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeInfoARM sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassStripeInfoARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeInfoARM sType(@CType("VkStructureType") int value) { VkRenderPassStripeInfoARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassStripeInfoARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassStripeInfoARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassStripeInfoARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeInfoARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeInfoARM pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeInfoARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeInfoARM pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeInfoARM.set_pNext(this.segment(), value); return this; } + + /// {@return `stripeArea` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_stripeArea(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_stripeArea, index), ML_stripeArea); } + /// {@return `stripeArea`} + /// @param segment the segment of the struct + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_stripeArea(MemorySegment segment) { return VkRenderPassStripeInfoARM.get_stripeArea(segment, 0L); } + /// {@return `stripeArea` at the given index} + /// @param index the index + public @CType("VkRect2D") java.lang.foreign.MemorySegment stripeAreaAt(long index) { return VkRenderPassStripeInfoARM.get_stripeArea(this.segment(), index); } + /// {@return `stripeArea`} + public @CType("VkRect2D") java.lang.foreign.MemorySegment stripeArea() { return VkRenderPassStripeInfoARM.get_stripeArea(this.segment()); } + /// Sets `stripeArea` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stripeArea(MemorySegment segment, long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_stripeArea, index), ML_stripeArea.byteSize()); } + /// Sets `stripeArea` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stripeArea(MemorySegment segment, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkRenderPassStripeInfoARM.set_stripeArea(segment, 0L, value); } + /// Sets `stripeArea` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeInfoARM stripeAreaAt(long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkRenderPassStripeInfoARM.set_stripeArea(this.segment(), index, value); return this; } + /// Sets `stripeArea` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeInfoARM stripeArea(@CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkRenderPassStripeInfoARM.set_stripeArea(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkRenderPassStripeSubmitInfoARM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkRenderPassStripeSubmitInfoARM.java new file mode 100644 index 00000000..6ef088e2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/arm/struct/VkRenderPassStripeSubmitInfoARM.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.arm.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stripeSemaphoreInfoCount +/// [VarHandle][#VH_stripeSemaphoreInfoCount] - [Getter][#stripeSemaphoreInfoCount()] - [Setter][#stripeSemaphoreInfoCount(int)] +/// ### pStripeSemaphoreInfos +/// [VarHandle][#VH_pStripeSemaphoreInfos] - [Getter][#pStripeSemaphoreInfos()] - [Setter][#pStripeSemaphoreInfos(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassStripeSubmitInfoARM { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t stripeSemaphoreInfoCount; +/// const VkSemaphoreSubmitInfo * pStripeSemaphoreInfos; +/// } VkRenderPassStripeSubmitInfoARM; +/// ``` +public final class VkRenderPassStripeSubmitInfoARM extends Struct { + /// The struct layout of `VkRenderPassStripeSubmitInfoARM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stripeSemaphoreInfoCount"), + ValueLayout.ADDRESS.withName("pStripeSemaphoreInfos") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stripeSemaphoreInfoCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stripeSemaphoreInfoCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stripeSemaphoreInfoCount")); + /// The [VarHandle] of `pStripeSemaphoreInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStripeSemaphoreInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStripeSemaphoreInfos")); + + /// Creates `VkRenderPassStripeSubmitInfoARM` with the given segment. + /// @param segment the memory segment + public VkRenderPassStripeSubmitInfoARM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassStripeSubmitInfoARM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassStripeSubmitInfoARM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassStripeSubmitInfoARM(segment); } + + /// Creates `VkRenderPassStripeSubmitInfoARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassStripeSubmitInfoARM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassStripeSubmitInfoARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassStripeSubmitInfoARM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassStripeSubmitInfoARM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassStripeSubmitInfoARM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassStripeSubmitInfoARM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassStripeSubmitInfoARM` + public static VkRenderPassStripeSubmitInfoARM alloc(SegmentAllocator allocator) { return new VkRenderPassStripeSubmitInfoARM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassStripeSubmitInfoARM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassStripeSubmitInfoARM` + public static VkRenderPassStripeSubmitInfoARM alloc(SegmentAllocator allocator, long count) { return new VkRenderPassStripeSubmitInfoARM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassStripeSubmitInfoARM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassStripeSubmitInfoARM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassStripeSubmitInfoARM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassStripeSubmitInfoARM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeSubmitInfoARM sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassStripeSubmitInfoARM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeSubmitInfoARM sType(@CType("VkStructureType") int value) { VkRenderPassStripeSubmitInfoARM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassStripeSubmitInfoARM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassStripeSubmitInfoARM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassStripeSubmitInfoARM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeSubmitInfoARM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeSubmitInfoARM pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeSubmitInfoARM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeSubmitInfoARM pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeSubmitInfoARM.set_pNext(this.segment(), value); return this; } + + /// {@return `stripeSemaphoreInfoCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stripeSemaphoreInfoCount(MemorySegment segment, long index) { return (int) VH_stripeSemaphoreInfoCount.get(segment, 0L, index); } + /// {@return `stripeSemaphoreInfoCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stripeSemaphoreInfoCount(MemorySegment segment) { return VkRenderPassStripeSubmitInfoARM.get_stripeSemaphoreInfoCount(segment, 0L); } + /// {@return `stripeSemaphoreInfoCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stripeSemaphoreInfoCountAt(long index) { return VkRenderPassStripeSubmitInfoARM.get_stripeSemaphoreInfoCount(this.segment(), index); } + /// {@return `stripeSemaphoreInfoCount`} + public @CType("uint32_t") int stripeSemaphoreInfoCount() { return VkRenderPassStripeSubmitInfoARM.get_stripeSemaphoreInfoCount(this.segment()); } + /// Sets `stripeSemaphoreInfoCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stripeSemaphoreInfoCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stripeSemaphoreInfoCount.set(segment, 0L, index, value); } + /// Sets `stripeSemaphoreInfoCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stripeSemaphoreInfoCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassStripeSubmitInfoARM.set_stripeSemaphoreInfoCount(segment, 0L, value); } + /// Sets `stripeSemaphoreInfoCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeSubmitInfoARM stripeSemaphoreInfoCountAt(long index, @CType("uint32_t") int value) { VkRenderPassStripeSubmitInfoARM.set_stripeSemaphoreInfoCount(this.segment(), index, value); return this; } + /// Sets `stripeSemaphoreInfoCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeSubmitInfoARM stripeSemaphoreInfoCount(@CType("uint32_t") int value) { VkRenderPassStripeSubmitInfoARM.set_stripeSemaphoreInfoCount(this.segment(), value); return this; } + + /// {@return `pStripeSemaphoreInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment get_pStripeSemaphoreInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStripeSemaphoreInfos.get(segment, 0L, index); } + /// {@return `pStripeSemaphoreInfos`} + /// @param segment the segment of the struct + public static @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment get_pStripeSemaphoreInfos(MemorySegment segment) { return VkRenderPassStripeSubmitInfoARM.get_pStripeSemaphoreInfos(segment, 0L); } + /// {@return `pStripeSemaphoreInfos` at the given index} + /// @param index the index + public @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment pStripeSemaphoreInfosAt(long index) { return VkRenderPassStripeSubmitInfoARM.get_pStripeSemaphoreInfos(this.segment(), index); } + /// {@return `pStripeSemaphoreInfos`} + public @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment pStripeSemaphoreInfos() { return VkRenderPassStripeSubmitInfoARM.get_pStripeSemaphoreInfos(this.segment()); } + /// Sets `pStripeSemaphoreInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStripeSemaphoreInfos(MemorySegment segment, long index, @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VH_pStripeSemaphoreInfos.set(segment, 0L, index, value); } + /// Sets `pStripeSemaphoreInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStripeSemaphoreInfos(MemorySegment segment, @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeSubmitInfoARM.set_pStripeSemaphoreInfos(segment, 0L, value); } + /// Sets `pStripeSemaphoreInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassStripeSubmitInfoARM pStripeSemaphoreInfosAt(long index, @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeSubmitInfoARM.set_pStripeSemaphoreInfos(this.segment(), index, value); return this; } + /// Sets `pStripeSemaphoreInfos` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassStripeSubmitInfoARM pStripeSemaphoreInfos(@CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VkRenderPassStripeSubmitInfoARM.set_pStripeSemaphoreInfos(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXT4444Formats.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXT4444Formats.java new file mode 100644 index 00000000..0b0766ee --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXT4444Formats.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXT4444Formats { + public static final int VK_EXT_4444_FORMATS_SPEC_VERSION = 1; + public static final String VK_EXT_4444_FORMATS_EXTENSION_NAME = "VK_EXT_4444_formats"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT = 1000340000; + public static final int VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT = VK_FORMAT_A4R4G4B4_UNORM_PACK16; + public static final int VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT = VK_FORMAT_A4B4G4R4_UNORM_PACK16; + + public VKEXT4444Formats(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAcquireDrmDisplay.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAcquireDrmDisplay.java new file mode 100644 index 00000000..a66d3d9d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAcquireDrmDisplay.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTAcquireDrmDisplay { + public static final int VK_EXT_ACQUIRE_DRM_DISPLAY_SPEC_VERSION = 1; + public static final String VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_drm_display"; + public static final MethodHandle MH_vkAcquireDrmDisplayEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDrmDisplayEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkAcquireDrmDisplayEXT; + public final MemorySegment PFN_vkGetDrmDisplayEXT; + + public VKEXTAcquireDrmDisplay(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkAcquireDrmDisplayEXT = func.invoke(instance, "vkAcquireDrmDisplayEXT"); + PFN_vkGetDrmDisplayEXT = func.invoke(instance, "vkGetDrmDisplayEXT"); + } + + public @CType("VkResult") int AcquireDrmDisplayEXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("int32_t") int drmFd, @CType("VkDisplayKHR") MemorySegment display) { + if (Unmarshal.isNullPointer(PFN_vkAcquireDrmDisplayEXT)) throw new SymbolNotFoundError("Symbol not found: vkAcquireDrmDisplayEXT"); + try { return (int) MH_vkAcquireDrmDisplayEXT.invokeExact(PFN_vkAcquireDrmDisplayEXT, physicalDevice, drmFd, display); } + catch (Throwable e) { throw new RuntimeException("error in vkAcquireDrmDisplayEXT", e); } + } + + public @CType("VkResult") int GetDrmDisplayEXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("int32_t") int drmFd, @CType("uint32_t") int connectorId, @CType("VkDisplayKHR *") MemorySegment display) { + if (Unmarshal.isNullPointer(PFN_vkGetDrmDisplayEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetDrmDisplayEXT"); + try { return (int) MH_vkGetDrmDisplayEXT.invokeExact(PFN_vkGetDrmDisplayEXT, physicalDevice, drmFd, connectorId, display); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDrmDisplayEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAcquireXlibDisplay.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAcquireXlibDisplay.java new file mode 100644 index 00000000..f9b79eb6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAcquireXlibDisplay.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTAcquireXlibDisplay { + public static final int VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION = 1; + public static final String VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_xlib_display"; + public static final MethodHandle MH_vkAcquireXlibDisplayEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetRandROutputDisplayEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkAcquireXlibDisplayEXT; + public final MemorySegment PFN_vkGetRandROutputDisplayEXT; + + public VKEXTAcquireXlibDisplay(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkAcquireXlibDisplayEXT = func.invoke(instance, "vkAcquireXlibDisplayEXT"); + PFN_vkGetRandROutputDisplayEXT = func.invoke(instance, "vkGetRandROutputDisplayEXT"); + } + + public @CType("VkResult") int AcquireXlibDisplayEXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("Display *") MemorySegment dpy, @CType("VkDisplayKHR") MemorySegment display) { + if (Unmarshal.isNullPointer(PFN_vkAcquireXlibDisplayEXT)) throw new SymbolNotFoundError("Symbol not found: vkAcquireXlibDisplayEXT"); + try { return (int) MH_vkAcquireXlibDisplayEXT.invokeExact(PFN_vkAcquireXlibDisplayEXT, physicalDevice, dpy, display); } + catch (Throwable e) { throw new RuntimeException("error in vkAcquireXlibDisplayEXT", e); } + } + + public @CType("VkResult") int GetRandROutputDisplayEXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("Display *") MemorySegment dpy, @CType("RROutput") long rrOutput, @CType("VkDisplayKHR *") MemorySegment pDisplay) { + if (Unmarshal.isNullPointer(PFN_vkGetRandROutputDisplayEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetRandROutputDisplayEXT"); + try { return (int) MH_vkGetRandROutputDisplayEXT.invokeExact(PFN_vkGetRandROutputDisplayEXT, physicalDevice, dpy, rrOutput, pDisplay); } + catch (Throwable e) { throw new RuntimeException("error in vkGetRandROutputDisplayEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAstcDecodeMode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAstcDecodeMode.java new file mode 100644 index 00000000..04066500 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAstcDecodeMode.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTAstcDecodeMode { + public static final int VK_EXT_ASTC_DECODE_MODE_SPEC_VERSION = 1; + public static final String VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME = "VK_EXT_astc_decode_mode"; + public static final int VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT = 1000067001; + + public VKEXTAstcDecodeMode(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAttachmentFeedbackLoopDynamicState.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAttachmentFeedbackLoopDynamicState.java new file mode 100644 index 00000000..14ab1991 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAttachmentFeedbackLoopDynamicState.java @@ -0,0 +1,43 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTAttachmentFeedbackLoopDynamicState { + public static final int VK_EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_SPEC_VERSION = 1; + public static final String VK_EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_attachment_feedback_loop_dynamic_state"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT = 1000524000; + public static final int VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT = 1000524000; + public static final MethodHandle MH_vkCmdSetAttachmentFeedbackLoopEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT; + + public VKEXTAttachmentFeedbackLoopDynamicState(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT = func.invoke(device, "vkCmdSetAttachmentFeedbackLoopEnableEXT"); + } + + public void CmdSetAttachmentFeedbackLoopEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkImageAspectFlags") int aspectMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetAttachmentFeedbackLoopEnableEXT"); + try { MH_vkCmdSetAttachmentFeedbackLoopEnableEXT.invokeExact(PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT, commandBuffer, aspectMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetAttachmentFeedbackLoopEnableEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAttachmentFeedbackLoopLayout.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAttachmentFeedbackLoopLayout.java new file mode 100644 index 00000000..fddd90b4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTAttachmentFeedbackLoopLayout.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTAttachmentFeedbackLoopLayout { + public static final int VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_SPEC_VERSION = 2; + public static final String VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME = "VK_EXT_attachment_feedback_loop_layout"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT = 1000339000; + public static final int VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000; + public static final int VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x00080000; + public static final int VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000; + public static final int VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000; + public static final int VK_DEPENDENCY_FEEDBACK_LOOP_BIT_EXT = 0x00000008; + + public VKEXTAttachmentFeedbackLoopLayout(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTBlendOperationAdvanced.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTBlendOperationAdvanced.java new file mode 100644 index 00000000..e6d7b861 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTBlendOperationAdvanced.java @@ -0,0 +1,85 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTBlendOperationAdvanced { + public static final int VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0; + public static final int VK_BLEND_OVERLAP_DISJOINT_EXT = 1; + public static final int VK_BLEND_OVERLAP_CONJOINT_EXT = 2; + public static final int VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION = 2; + public static final String VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME = "VK_EXT_blend_operation_advanced"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001; + public static final int VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002; + public static final int VK_BLEND_OP_ZERO_EXT = 1000148000; + public static final int VK_BLEND_OP_SRC_EXT = 1000148001; + public static final int VK_BLEND_OP_DST_EXT = 1000148002; + public static final int VK_BLEND_OP_SRC_OVER_EXT = 1000148003; + public static final int VK_BLEND_OP_DST_OVER_EXT = 1000148004; + public static final int VK_BLEND_OP_SRC_IN_EXT = 1000148005; + public static final int VK_BLEND_OP_DST_IN_EXT = 1000148006; + public static final int VK_BLEND_OP_SRC_OUT_EXT = 1000148007; + public static final int VK_BLEND_OP_DST_OUT_EXT = 1000148008; + public static final int VK_BLEND_OP_SRC_ATOP_EXT = 1000148009; + public static final int VK_BLEND_OP_DST_ATOP_EXT = 1000148010; + public static final int VK_BLEND_OP_XOR_EXT = 1000148011; + public static final int VK_BLEND_OP_MULTIPLY_EXT = 1000148012; + public static final int VK_BLEND_OP_SCREEN_EXT = 1000148013; + public static final int VK_BLEND_OP_OVERLAY_EXT = 1000148014; + public static final int VK_BLEND_OP_DARKEN_EXT = 1000148015; + public static final int VK_BLEND_OP_LIGHTEN_EXT = 1000148016; + public static final int VK_BLEND_OP_COLORDODGE_EXT = 1000148017; + public static final int VK_BLEND_OP_COLORBURN_EXT = 1000148018; + public static final int VK_BLEND_OP_HARDLIGHT_EXT = 1000148019; + public static final int VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020; + public static final int VK_BLEND_OP_DIFFERENCE_EXT = 1000148021; + public static final int VK_BLEND_OP_EXCLUSION_EXT = 1000148022; + public static final int VK_BLEND_OP_INVERT_EXT = 1000148023; + public static final int VK_BLEND_OP_INVERT_RGB_EXT = 1000148024; + public static final int VK_BLEND_OP_LINEARDODGE_EXT = 1000148025; + public static final int VK_BLEND_OP_LINEARBURN_EXT = 1000148026; + public static final int VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027; + public static final int VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028; + public static final int VK_BLEND_OP_PINLIGHT_EXT = 1000148029; + public static final int VK_BLEND_OP_HARDMIX_EXT = 1000148030; + public static final int VK_BLEND_OP_HSL_HUE_EXT = 1000148031; + public static final int VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032; + public static final int VK_BLEND_OP_HSL_COLOR_EXT = 1000148033; + public static final int VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034; + public static final int VK_BLEND_OP_PLUS_EXT = 1000148035; + public static final int VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036; + public static final int VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037; + public static final int VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038; + public static final int VK_BLEND_OP_MINUS_EXT = 1000148039; + public static final int VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040; + public static final int VK_BLEND_OP_CONTRAST_EXT = 1000148041; + public static final int VK_BLEND_OP_INVERT_OVG_EXT = 1000148042; + public static final int VK_BLEND_OP_RED_EXT = 1000148043; + public static final int VK_BLEND_OP_GREEN_EXT = 1000148044; + public static final int VK_BLEND_OP_BLUE_EXT = 1000148045; + public static final int VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000; + + public VKEXTBlendOperationAdvanced(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTBorderColorSwizzle.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTBorderColorSwizzle.java new file mode 100644 index 00000000..c9776342 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTBorderColorSwizzle.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTBorderColorSwizzle { + public static final int VK_EXT_BORDER_COLOR_SWIZZLE_SPEC_VERSION = 1; + public static final String VK_EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME = "VK_EXT_border_color_swizzle"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT = 1000411000; + public static final int VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001; + + public VKEXTBorderColorSwizzle(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTBufferDeviceAddress.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTBufferDeviceAddress.java new file mode 100644 index 00000000..443a187f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTBufferDeviceAddress.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +import static overrungl.vulkan.ext.VKEXTBufferDeviceAddress.*; +public class VKEXTBufferDeviceAddress { + public static final int VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION = 2; + public static final String VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_EXT_buffer_device_address"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000; + public static final int VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT; + public static final int VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO; + public static final int VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT; + public static final int VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT; + public static final int VK_ERROR_INVALID_DEVICE_ADDRESS_EXT = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS; + public static final MethodHandle MH_vkGetBufferDeviceAddressEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetBufferDeviceAddressEXT; + + public VKEXTBufferDeviceAddress(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetBufferDeviceAddressEXT = func.invoke(device, "vkGetBufferDeviceAddressEXT", "vkGetBufferDeviceAddress"); + } + + public @CType("VkDeviceAddress") long GetBufferDeviceAddressEXT(@CType("VkDevice") MemorySegment device, @CType("const VkBufferDeviceAddressInfo *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetBufferDeviceAddressEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetBufferDeviceAddressEXT"); + try { return (long) MH_vkGetBufferDeviceAddressEXT.invokeExact(PFN_vkGetBufferDeviceAddressEXT, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetBufferDeviceAddressEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTCalibratedTimestamps.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTCalibratedTimestamps.java new file mode 100644 index 00000000..807b436c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTCalibratedTimestamps.java @@ -0,0 +1,56 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.khr.VKKHRCalibratedTimestamps.*; +public class VKEXTCalibratedTimestamps { + public static final int VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION = 2; + public static final String VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME = "VK_EXT_calibrated_timestamps"; + public static final int VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR; + public static final int VK_TIME_DOMAIN_DEVICE_EXT = VK_TIME_DOMAIN_DEVICE_KHR; + public static final int VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR; + public static final int VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR; + public static final int VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR; + public static final MethodHandle MH_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetCalibratedTimestampsEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT; + public final MemorySegment PFN_vkGetCalibratedTimestampsEXT; + + public VKEXTCalibratedTimestamps(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = func.invoke(device, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT", "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR"); + PFN_vkGetCalibratedTimestampsEXT = func.invoke(device, "vkGetCalibratedTimestampsEXT", "vkGetCalibratedTimestampsKHR"); + } + + public @CType("VkResult") int GetPhysicalDeviceCalibrateableTimeDomainsEXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pTimeDomainCount, @CType("VkTimeDomainKHR *") MemorySegment pTimeDomains) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceCalibrateableTimeDomainsEXT"); + try { return (int) MH_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT.invokeExact(PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT, physicalDevice, pTimeDomainCount, pTimeDomains); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceCalibrateableTimeDomainsEXT", e); } + } + + public @CType("VkResult") int GetCalibratedTimestampsEXT(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int timestampCount, @CType("const VkCalibratedTimestampInfoKHR *") MemorySegment pTimestampInfos, @CType("uint64_t *") MemorySegment pTimestamps, @CType("uint64_t *") MemorySegment pMaxDeviation) { + if (Unmarshal.isNullPointer(PFN_vkGetCalibratedTimestampsEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetCalibratedTimestampsEXT"); + try { return (int) MH_vkGetCalibratedTimestampsEXT.invokeExact(PFN_vkGetCalibratedTimestampsEXT, device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); } + catch (Throwable e) { throw new RuntimeException("error in vkGetCalibratedTimestampsEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTColorWriteEnable.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTColorWriteEnable.java new file mode 100644 index 00000000..21debe60 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTColorWriteEnable.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTColorWriteEnable { + public static final int VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSION = 1; + public static final String VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME = "VK_EXT_color_write_enable"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT = 1000381000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT = 1000381001; + public static final int VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT = 1000381000; + public static final MethodHandle MH_vkCmdSetColorWriteEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetColorWriteEnableEXT; + + public VKEXTColorWriteEnable(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetColorWriteEnableEXT = func.invoke(device, "vkCmdSetColorWriteEnableEXT"); + } + + public void CmdSetColorWriteEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int attachmentCount, @CType("const VkBool32 *") MemorySegment pColorWriteEnables) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetColorWriteEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetColorWriteEnableEXT"); + try { MH_vkCmdSetColorWriteEnableEXT.invokeExact(PFN_vkCmdSetColorWriteEnableEXT, commandBuffer, attachmentCount, pColorWriteEnables); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetColorWriteEnableEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTConditionalRendering.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTConditionalRendering.java new file mode 100644 index 00000000..bccb5bcb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTConditionalRendering.java @@ -0,0 +1,57 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTConditionalRendering { + public static final int VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 0x00000001; + public static final int VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION = 2; + public static final String VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME = "VK_EXT_conditional_rendering"; + public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001; + public static final int VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002; + public static final int VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000; + public static final int VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200; + public static final int VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000; + public static final MethodHandle MH_vkCmdBeginConditionalRenderingEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdEndConditionalRenderingEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdBeginConditionalRenderingEXT; + public final MemorySegment PFN_vkCmdEndConditionalRenderingEXT; + + public VKEXTConditionalRendering(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdBeginConditionalRenderingEXT = func.invoke(device, "vkCmdBeginConditionalRenderingEXT"); + PFN_vkCmdEndConditionalRenderingEXT = func.invoke(device, "vkCmdEndConditionalRenderingEXT"); + } + + public void CmdBeginConditionalRenderingEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkConditionalRenderingBeginInfoEXT *") MemorySegment pConditionalRenderingBegin) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginConditionalRenderingEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginConditionalRenderingEXT"); + try { MH_vkCmdBeginConditionalRenderingEXT.invokeExact(PFN_vkCmdBeginConditionalRenderingEXT, commandBuffer, pConditionalRenderingBegin); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginConditionalRenderingEXT", e); } + } + + public void CmdEndConditionalRenderingEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndConditionalRenderingEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndConditionalRenderingEXT"); + try { MH_vkCmdEndConditionalRenderingEXT.invokeExact(PFN_vkCmdEndConditionalRenderingEXT, commandBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndConditionalRenderingEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTConservativeRasterization.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTConservativeRasterization.java new file mode 100644 index 00000000..65105164 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTConservativeRasterization.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTConservativeRasterization { + public static final int VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0; + public static final int VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1; + public static final int VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT = 2; + public static final int VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION = 1; + public static final String VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_conservative_rasterization"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001; + + public VKEXTConservativeRasterization(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTCustomBorderColor.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTCustomBorderColor.java new file mode 100644 index 00000000..4c0b0d20 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTCustomBorderColor.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTCustomBorderColor { + public static final int VK_EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION = 12; + public static final String VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME = "VK_EXT_custom_border_color"; + public static final int VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT = 1000287000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT = 1000287001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT = 1000287002; + public static final int VK_BORDER_COLOR_FLOAT_CUSTOM_EXT = 1000287003; + public static final int VK_BORDER_COLOR_INT_CUSTOM_EXT = 1000287004; + + public VKEXTCustomBorderColor(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDebugMarker.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDebugMarker.java new file mode 100644 index 00000000..d5b6be15 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDebugMarker.java @@ -0,0 +1,114 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDebugMarker { + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33; + public static final int VK_EXT_DEBUG_MARKER_SPEC_VERSION = 4; + public static final String VK_EXT_DEBUG_MARKER_EXTENSION_NAME = "VK_EXT_debug_marker"; + public static final int VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000; + public static final int VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001; + public static final int VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT; + public static final MethodHandle MH_vkDebugMarkerSetObjectTagEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDebugMarkerSetObjectNameEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdDebugMarkerBeginEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdDebugMarkerEndEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdDebugMarkerInsertEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkDebugMarkerSetObjectTagEXT; + public final MemorySegment PFN_vkDebugMarkerSetObjectNameEXT; + public final MemorySegment PFN_vkCmdDebugMarkerBeginEXT; + public final MemorySegment PFN_vkCmdDebugMarkerEndEXT; + public final MemorySegment PFN_vkCmdDebugMarkerInsertEXT; + + public VKEXTDebugMarker(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkDebugMarkerSetObjectTagEXT = func.invoke(device, "vkDebugMarkerSetObjectTagEXT"); + PFN_vkDebugMarkerSetObjectNameEXT = func.invoke(device, "vkDebugMarkerSetObjectNameEXT"); + PFN_vkCmdDebugMarkerBeginEXT = func.invoke(device, "vkCmdDebugMarkerBeginEXT"); + PFN_vkCmdDebugMarkerEndEXT = func.invoke(device, "vkCmdDebugMarkerEndEXT"); + PFN_vkCmdDebugMarkerInsertEXT = func.invoke(device, "vkCmdDebugMarkerInsertEXT"); + } + + public @CType("VkResult") int DebugMarkerSetObjectTagEXT(@CType("VkDevice") MemorySegment device, @CType("const VkDebugMarkerObjectTagInfoEXT *") MemorySegment pTagInfo) { + if (Unmarshal.isNullPointer(PFN_vkDebugMarkerSetObjectTagEXT)) throw new SymbolNotFoundError("Symbol not found: vkDebugMarkerSetObjectTagEXT"); + try { return (int) MH_vkDebugMarkerSetObjectTagEXT.invokeExact(PFN_vkDebugMarkerSetObjectTagEXT, device, pTagInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkDebugMarkerSetObjectTagEXT", e); } + } + + public @CType("VkResult") int DebugMarkerSetObjectNameEXT(@CType("VkDevice") MemorySegment device, @CType("const VkDebugMarkerObjectNameInfoEXT *") MemorySegment pNameInfo) { + if (Unmarshal.isNullPointer(PFN_vkDebugMarkerSetObjectNameEXT)) throw new SymbolNotFoundError("Symbol not found: vkDebugMarkerSetObjectNameEXT"); + try { return (int) MH_vkDebugMarkerSetObjectNameEXT.invokeExact(PFN_vkDebugMarkerSetObjectNameEXT, device, pNameInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkDebugMarkerSetObjectNameEXT", e); } + } + + public void CmdDebugMarkerBeginEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkDebugMarkerMarkerInfoEXT *") MemorySegment pMarkerInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdDebugMarkerBeginEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdDebugMarkerBeginEXT"); + try { MH_vkCmdDebugMarkerBeginEXT.invokeExact(PFN_vkCmdDebugMarkerBeginEXT, commandBuffer, pMarkerInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDebugMarkerBeginEXT", e); } + } + + public void CmdDebugMarkerEndEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer) { + if (Unmarshal.isNullPointer(PFN_vkCmdDebugMarkerEndEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdDebugMarkerEndEXT"); + try { MH_vkCmdDebugMarkerEndEXT.invokeExact(PFN_vkCmdDebugMarkerEndEXT, commandBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDebugMarkerEndEXT", e); } + } + + public void CmdDebugMarkerInsertEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkDebugMarkerMarkerInfoEXT *") MemorySegment pMarkerInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdDebugMarkerInsertEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdDebugMarkerInsertEXT"); + try { MH_vkCmdDebugMarkerInsertEXT.invokeExact(PFN_vkCmdDebugMarkerInsertEXT, commandBuffer, pMarkerInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDebugMarkerInsertEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDebugReport.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDebugReport.java new file mode 100644 index 00000000..07233cb2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDebugReport.java @@ -0,0 +1,105 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.ext.VKEXTDebugReport.*; +public class VKEXTDebugReport { + public static final int VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001; + public static final int VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002; + public static final int VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004; + public static final int VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008; + public static final int VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33; + public static final int VK_EXT_DEBUG_REPORT_SPEC_VERSION = 10; + public static final String VK_EXT_DEBUG_REPORT_EXTENSION_NAME = "VK_EXT_debug_report"; + public static final int VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000; + public static final int VK_ERROR_VALIDATION_FAILED_EXT = -1000011001; + public static final int VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000011000; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000011000; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT; + public static final int VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; + public static final MethodHandle MH_vkCreateDebugReportCallbackEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyDebugReportCallbackEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDebugReportMessageEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateDebugReportCallbackEXT; + public final MemorySegment PFN_vkDestroyDebugReportCallbackEXT; + public final MemorySegment PFN_vkDebugReportMessageEXT; + + public VKEXTDebugReport(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateDebugReportCallbackEXT = func.invoke(instance, "vkCreateDebugReportCallbackEXT"); + PFN_vkDestroyDebugReportCallbackEXT = func.invoke(instance, "vkDestroyDebugReportCallbackEXT"); + PFN_vkDebugReportMessageEXT = func.invoke(instance, "vkDebugReportMessageEXT"); + } + + public @CType("VkResult") int CreateDebugReportCallbackEXT(@CType("VkInstance") MemorySegment instance, @CType("const VkDebugReportCallbackCreateInfoEXT *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkDebugReportCallbackEXT *") MemorySegment pCallback) { + if (Unmarshal.isNullPointer(PFN_vkCreateDebugReportCallbackEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreateDebugReportCallbackEXT"); + try { return (int) MH_vkCreateDebugReportCallbackEXT.invokeExact(PFN_vkCreateDebugReportCallbackEXT, instance, pCreateInfo, pAllocator, pCallback); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDebugReportCallbackEXT", e); } + } + + public void DestroyDebugReportCallbackEXT(@CType("VkInstance") MemorySegment instance, @CType("VkDebugReportCallbackEXT") MemorySegment callback, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyDebugReportCallbackEXT)) throw new SymbolNotFoundError("Symbol not found: vkDestroyDebugReportCallbackEXT"); + try { MH_vkDestroyDebugReportCallbackEXT.invokeExact(PFN_vkDestroyDebugReportCallbackEXT, instance, callback, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyDebugReportCallbackEXT", e); } + } + + public void DebugReportMessageEXT(@CType("VkInstance") MemorySegment instance, @CType("VkDebugReportFlagsEXT") int flags, @CType("VkDebugReportObjectTypeEXT") int objectType, @CType("uint64_t") long object, @CType("size_t") long location, @CType("int32_t") int messageCode, @CType("const char *") MemorySegment pLayerPrefix, @CType("const char *") MemorySegment pMessage) { + if (Unmarshal.isNullPointer(PFN_vkDebugReportMessageEXT)) throw new SymbolNotFoundError("Symbol not found: vkDebugReportMessageEXT"); + try { MH_vkDebugReportMessageEXT.invokeExact(PFN_vkDebugReportMessageEXT, instance, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage); } + catch (Throwable e) { throw new RuntimeException("error in vkDebugReportMessageEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDebugUtils.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDebugUtils.java new file mode 100644 index 00000000..f99390d9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDebugUtils.java @@ -0,0 +1,144 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDebugUtils { + public static final int VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 0x00000001; + public static final int VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 0x00000010; + public static final int VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 0x00000100; + public static final int VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 0x00001000; + public static final int VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 0x00000001; + public static final int VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 0x00000002; + public static final int VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 0x00000004; + public static final int VK_EXT_DEBUG_UTILS_SPEC_VERSION = 2; + public static final String VK_EXT_DEBUG_UTILS_EXTENSION_NAME = "VK_EXT_debug_utils"; + public static final int VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000; + public static final int VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT = 1000128001; + public static final int VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT = 1000128002; + public static final int VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000128003; + public static final int VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000128004; + public static final int VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT = 1000128000; + public static final MethodHandle MH_vkSetDebugUtilsObjectNameEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkSetDebugUtilsObjectTagEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkQueueBeginDebugUtilsLabelEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkQueueEndDebugUtilsLabelEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkQueueInsertDebugUtilsLabelEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBeginDebugUtilsLabelEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdEndDebugUtilsLabelEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdInsertDebugUtilsLabelEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateDebugUtilsMessengerEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyDebugUtilsMessengerEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkSubmitDebugUtilsMessageEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkSetDebugUtilsObjectNameEXT; + public final MemorySegment PFN_vkSetDebugUtilsObjectTagEXT; + public final MemorySegment PFN_vkQueueBeginDebugUtilsLabelEXT; + public final MemorySegment PFN_vkQueueEndDebugUtilsLabelEXT; + public final MemorySegment PFN_vkQueueInsertDebugUtilsLabelEXT; + public final MemorySegment PFN_vkCmdBeginDebugUtilsLabelEXT; + public final MemorySegment PFN_vkCmdEndDebugUtilsLabelEXT; + public final MemorySegment PFN_vkCmdInsertDebugUtilsLabelEXT; + public final MemorySegment PFN_vkCreateDebugUtilsMessengerEXT; + public final MemorySegment PFN_vkDestroyDebugUtilsMessengerEXT; + public final MemorySegment PFN_vkSubmitDebugUtilsMessageEXT; + + public VKEXTDebugUtils(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkSetDebugUtilsObjectNameEXT = func.invoke(instance, "vkSetDebugUtilsObjectNameEXT"); + PFN_vkSetDebugUtilsObjectTagEXT = func.invoke(instance, "vkSetDebugUtilsObjectTagEXT"); + PFN_vkQueueBeginDebugUtilsLabelEXT = func.invoke(instance, "vkQueueBeginDebugUtilsLabelEXT"); + PFN_vkQueueEndDebugUtilsLabelEXT = func.invoke(instance, "vkQueueEndDebugUtilsLabelEXT"); + PFN_vkQueueInsertDebugUtilsLabelEXT = func.invoke(instance, "vkQueueInsertDebugUtilsLabelEXT"); + PFN_vkCmdBeginDebugUtilsLabelEXT = func.invoke(instance, "vkCmdBeginDebugUtilsLabelEXT"); + PFN_vkCmdEndDebugUtilsLabelEXT = func.invoke(instance, "vkCmdEndDebugUtilsLabelEXT"); + PFN_vkCmdInsertDebugUtilsLabelEXT = func.invoke(instance, "vkCmdInsertDebugUtilsLabelEXT"); + PFN_vkCreateDebugUtilsMessengerEXT = func.invoke(instance, "vkCreateDebugUtilsMessengerEXT"); + PFN_vkDestroyDebugUtilsMessengerEXT = func.invoke(instance, "vkDestroyDebugUtilsMessengerEXT"); + PFN_vkSubmitDebugUtilsMessageEXT = func.invoke(instance, "vkSubmitDebugUtilsMessageEXT"); + } + + public @CType("VkResult") int SetDebugUtilsObjectNameEXT(@CType("VkDevice") MemorySegment device, @CType("const VkDebugUtilsObjectNameInfoEXT *") MemorySegment pNameInfo) { + if (Unmarshal.isNullPointer(PFN_vkSetDebugUtilsObjectNameEXT)) throw new SymbolNotFoundError("Symbol not found: vkSetDebugUtilsObjectNameEXT"); + try { return (int) MH_vkSetDebugUtilsObjectNameEXT.invokeExact(PFN_vkSetDebugUtilsObjectNameEXT, device, pNameInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkSetDebugUtilsObjectNameEXT", e); } + } + + public @CType("VkResult") int SetDebugUtilsObjectTagEXT(@CType("VkDevice") MemorySegment device, @CType("const VkDebugUtilsObjectTagInfoEXT *") MemorySegment pTagInfo) { + if (Unmarshal.isNullPointer(PFN_vkSetDebugUtilsObjectTagEXT)) throw new SymbolNotFoundError("Symbol not found: vkSetDebugUtilsObjectTagEXT"); + try { return (int) MH_vkSetDebugUtilsObjectTagEXT.invokeExact(PFN_vkSetDebugUtilsObjectTagEXT, device, pTagInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkSetDebugUtilsObjectTagEXT", e); } + } + + public void QueueBeginDebugUtilsLabelEXT(@CType("VkQueue") MemorySegment queue, @CType("const VkDebugUtilsLabelEXT *") MemorySegment pLabelInfo) { + if (Unmarshal.isNullPointer(PFN_vkQueueBeginDebugUtilsLabelEXT)) throw new SymbolNotFoundError("Symbol not found: vkQueueBeginDebugUtilsLabelEXT"); + try { MH_vkQueueBeginDebugUtilsLabelEXT.invokeExact(PFN_vkQueueBeginDebugUtilsLabelEXT, queue, pLabelInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkQueueBeginDebugUtilsLabelEXT", e); } + } + + public void QueueEndDebugUtilsLabelEXT(@CType("VkQueue") MemorySegment queue) { + if (Unmarshal.isNullPointer(PFN_vkQueueEndDebugUtilsLabelEXT)) throw new SymbolNotFoundError("Symbol not found: vkQueueEndDebugUtilsLabelEXT"); + try { MH_vkQueueEndDebugUtilsLabelEXT.invokeExact(PFN_vkQueueEndDebugUtilsLabelEXT, queue); } + catch (Throwable e) { throw new RuntimeException("error in vkQueueEndDebugUtilsLabelEXT", e); } + } + + public void QueueInsertDebugUtilsLabelEXT(@CType("VkQueue") MemorySegment queue, @CType("const VkDebugUtilsLabelEXT *") MemorySegment pLabelInfo) { + if (Unmarshal.isNullPointer(PFN_vkQueueInsertDebugUtilsLabelEXT)) throw new SymbolNotFoundError("Symbol not found: vkQueueInsertDebugUtilsLabelEXT"); + try { MH_vkQueueInsertDebugUtilsLabelEXT.invokeExact(PFN_vkQueueInsertDebugUtilsLabelEXT, queue, pLabelInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkQueueInsertDebugUtilsLabelEXT", e); } + } + + public void CmdBeginDebugUtilsLabelEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkDebugUtilsLabelEXT *") MemorySegment pLabelInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginDebugUtilsLabelEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginDebugUtilsLabelEXT"); + try { MH_vkCmdBeginDebugUtilsLabelEXT.invokeExact(PFN_vkCmdBeginDebugUtilsLabelEXT, commandBuffer, pLabelInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginDebugUtilsLabelEXT", e); } + } + + public void CmdEndDebugUtilsLabelEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndDebugUtilsLabelEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndDebugUtilsLabelEXT"); + try { MH_vkCmdEndDebugUtilsLabelEXT.invokeExact(PFN_vkCmdEndDebugUtilsLabelEXT, commandBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndDebugUtilsLabelEXT", e); } + } + + public void CmdInsertDebugUtilsLabelEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkDebugUtilsLabelEXT *") MemorySegment pLabelInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdInsertDebugUtilsLabelEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdInsertDebugUtilsLabelEXT"); + try { MH_vkCmdInsertDebugUtilsLabelEXT.invokeExact(PFN_vkCmdInsertDebugUtilsLabelEXT, commandBuffer, pLabelInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdInsertDebugUtilsLabelEXT", e); } + } + + public @CType("VkResult") int CreateDebugUtilsMessengerEXT(@CType("VkInstance") MemorySegment instance, @CType("const VkDebugUtilsMessengerCreateInfoEXT *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkDebugUtilsMessengerEXT *") MemorySegment pMessenger) { + if (Unmarshal.isNullPointer(PFN_vkCreateDebugUtilsMessengerEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreateDebugUtilsMessengerEXT"); + try { return (int) MH_vkCreateDebugUtilsMessengerEXT.invokeExact(PFN_vkCreateDebugUtilsMessengerEXT, instance, pCreateInfo, pAllocator, pMessenger); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDebugUtilsMessengerEXT", e); } + } + + public void DestroyDebugUtilsMessengerEXT(@CType("VkInstance") MemorySegment instance, @CType("VkDebugUtilsMessengerEXT") MemorySegment messenger, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyDebugUtilsMessengerEXT)) throw new SymbolNotFoundError("Symbol not found: vkDestroyDebugUtilsMessengerEXT"); + try { MH_vkDestroyDebugUtilsMessengerEXT.invokeExact(PFN_vkDestroyDebugUtilsMessengerEXT, instance, messenger, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyDebugUtilsMessengerEXT", e); } + } + + public void SubmitDebugUtilsMessageEXT(@CType("VkInstance") MemorySegment instance, @CType("VkDebugUtilsMessageSeverityFlagBitsEXT") int messageSeverity, @CType("VkDebugUtilsMessageTypeFlagsEXT") int messageTypes, @CType("const VkDebugUtilsMessengerCallbackDataEXT *") MemorySegment pCallbackData) { + if (Unmarshal.isNullPointer(PFN_vkSubmitDebugUtilsMessageEXT)) throw new SymbolNotFoundError("Symbol not found: vkSubmitDebugUtilsMessageEXT"); + try { MH_vkSubmitDebugUtilsMessageEXT.invokeExact(PFN_vkSubmitDebugUtilsMessageEXT, instance, messageSeverity, messageTypes, pCallbackData); } + catch (Throwable e) { throw new RuntimeException("error in vkSubmitDebugUtilsMessageEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthBiasControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthBiasControl.java new file mode 100644 index 00000000..1969e432 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthBiasControl.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDepthBiasControl { + public static final int VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORMAT_EXT = 0; + public static final int VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORCE_UNORM_EXT = 1; + public static final int VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT = 2; + public static final int VK_EXT_DEPTH_BIAS_CONTROL_SPEC_VERSION = 1; + public static final String VK_EXT_DEPTH_BIAS_CONTROL_EXTENSION_NAME = "VK_EXT_depth_bias_control"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT = 1000283000; + public static final int VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT = 1000283001; + public static final int VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT = 1000283002; + public static final MethodHandle MH_vkCmdSetDepthBias2EXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetDepthBias2EXT; + + public VKEXTDepthBiasControl(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetDepthBias2EXT = func.invoke(device, "vkCmdSetDepthBias2EXT"); + } + + public void CmdSetDepthBias2EXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkDepthBiasInfoEXT *") MemorySegment pDepthBiasInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthBias2EXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthBias2EXT"); + try { MH_vkCmdSetDepthBias2EXT.invokeExact(PFN_vkCmdSetDepthBias2EXT, commandBuffer, pDepthBiasInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthBias2EXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClampControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClampControl.java new file mode 100644 index 00000000..eafe5a87 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClampControl.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDepthClampControl { + public static final int VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT = 0; + public static final int VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT = 1; + public static final int VK_EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION = 1; + public static final String VK_EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clamp_control"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT = 1000582000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT = 1000582001; + public static final int VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT = 1000582000; + public static final MethodHandle MH_vkCmdSetDepthClampRangeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetDepthClampRangeEXT; + + public VKEXTDepthClampControl(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetDepthClampRangeEXT = func.invoke(device, "vkCmdSetDepthClampRangeEXT"); + } + + public void CmdSetDepthClampRangeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDepthClampModeEXT") int depthClampMode, @CType("const VkDepthClampRangeEXT *") MemorySegment pDepthClampRange) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthClampRangeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthClampRangeEXT"); + try { MH_vkCmdSetDepthClampRangeEXT.invokeExact(PFN_vkCmdSetDepthClampRangeEXT, commandBuffer, depthClampMode, pDepthClampRange); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthClampRangeEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClampZeroOne.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClampZeroOne.java new file mode 100644 index 00000000..ab45a7d8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClampZeroOne.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDepthClampZeroOne { + public static final int VK_EXT_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION = 1; + public static final String VK_EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME = "VK_EXT_depth_clamp_zero_one"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT = 1000421000; + + public VKEXTDepthClampZeroOne(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClipControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClipControl.java new file mode 100644 index 00000000..896a5975 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClipControl.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDepthClipControl { + public static final int VK_EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION = 1; + public static final String VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clip_control"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT = 1000355000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT = 1000355001; + + public VKEXTDepthClipControl(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClipEnable.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClipEnable.java new file mode 100644 index 00000000..1d2723ad --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthClipEnable.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDepthClipEnable { + public static final int VK_EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION = 1; + public static final String VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME = "VK_EXT_depth_clip_enable"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT = 1000102000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT = 1000102001; + + public VKEXTDepthClipEnable(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthRangeUnrestricted.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthRangeUnrestricted.java new file mode 100644 index 00000000..9f816ba2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDepthRangeUnrestricted.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDepthRangeUnrestricted { + public static final int VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION = 1; + public static final String VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME = "VK_EXT_depth_range_unrestricted"; + + public VKEXTDepthRangeUnrestricted(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDescriptorBuffer.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDescriptorBuffer.java new file mode 100644 index 00000000..8e06f296 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDescriptorBuffer.java @@ -0,0 +1,156 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDescriptorBuffer { + public static final int VK_EXT_DESCRIPTOR_BUFFER_SPEC_VERSION = 1; + public static final String VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME = "VK_EXT_descriptor_buffer"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT = 1000316000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT = 1000316001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT = 1000316002; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT = 1000316003; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT = 1000316004; + public static final int VK_STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316005; + public static final int VK_STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316006; + public static final int VK_STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316007; + public static final int VK_STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316008; + public static final int VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT = 1000316010; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT = 1000316011; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT = 1000316012; + public static final int VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00000010; + public static final int VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT = 0x00000020; + public static final int VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000; + public static final int VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000; + public static final int VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000; + public static final int VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000020; + public static final int VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00010000; + public static final int VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000004; + public static final int VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000008; + public static final int VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000008; + public static final long VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT = 0x20000000000L; + public static final int VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316009; + public static final MethodHandle MH_vkGetDescriptorSetLayoutSizeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDescriptorSetLayoutBindingOffsetEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDescriptorEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindDescriptorBuffersEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetDescriptorBufferOffsetsEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindDescriptorBufferEmbeddedSamplersEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkGetBufferOpaqueCaptureDescriptorDataEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageOpaqueCaptureDescriptorDataEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageViewOpaqueCaptureDescriptorDataEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetSamplerOpaqueCaptureDescriptorDataEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetDescriptorSetLayoutSizeEXT; + public final MemorySegment PFN_vkGetDescriptorSetLayoutBindingOffsetEXT; + public final MemorySegment PFN_vkGetDescriptorEXT; + public final MemorySegment PFN_vkCmdBindDescriptorBuffersEXT; + public final MemorySegment PFN_vkCmdSetDescriptorBufferOffsetsEXT; + public final MemorySegment PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT; + public final MemorySegment PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT; + public final MemorySegment PFN_vkGetImageOpaqueCaptureDescriptorDataEXT; + public final MemorySegment PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT; + public final MemorySegment PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT; + public final MemorySegment PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT; + + public VKEXTDescriptorBuffer(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetDescriptorSetLayoutSizeEXT = func.invoke(device, "vkGetDescriptorSetLayoutSizeEXT"); + PFN_vkGetDescriptorSetLayoutBindingOffsetEXT = func.invoke(device, "vkGetDescriptorSetLayoutBindingOffsetEXT"); + PFN_vkGetDescriptorEXT = func.invoke(device, "vkGetDescriptorEXT"); + PFN_vkCmdBindDescriptorBuffersEXT = func.invoke(device, "vkCmdBindDescriptorBuffersEXT"); + PFN_vkCmdSetDescriptorBufferOffsetsEXT = func.invoke(device, "vkCmdSetDescriptorBufferOffsetsEXT"); + PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT = func.invoke(device, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT"); + PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT = func.invoke(device, "vkGetBufferOpaqueCaptureDescriptorDataEXT"); + PFN_vkGetImageOpaqueCaptureDescriptorDataEXT = func.invoke(device, "vkGetImageOpaqueCaptureDescriptorDataEXT"); + PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT = func.invoke(device, "vkGetImageViewOpaqueCaptureDescriptorDataEXT"); + PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT = func.invoke(device, "vkGetSamplerOpaqueCaptureDescriptorDataEXT"); + PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = func.invoke(device, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT"); + } + + public void GetDescriptorSetLayoutSizeEXT(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorSetLayout") MemorySegment layout, @CType("VkDeviceSize *") MemorySegment pLayoutSizeInBytes) { + if (Unmarshal.isNullPointer(PFN_vkGetDescriptorSetLayoutSizeEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetDescriptorSetLayoutSizeEXT"); + try { MH_vkGetDescriptorSetLayoutSizeEXT.invokeExact(PFN_vkGetDescriptorSetLayoutSizeEXT, device, layout, pLayoutSizeInBytes); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDescriptorSetLayoutSizeEXT", e); } + } + + public void GetDescriptorSetLayoutBindingOffsetEXT(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorSetLayout") MemorySegment layout, @CType("uint32_t") int binding, @CType("VkDeviceSize *") MemorySegment pOffset) { + if (Unmarshal.isNullPointer(PFN_vkGetDescriptorSetLayoutBindingOffsetEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetDescriptorSetLayoutBindingOffsetEXT"); + try { MH_vkGetDescriptorSetLayoutBindingOffsetEXT.invokeExact(PFN_vkGetDescriptorSetLayoutBindingOffsetEXT, device, layout, binding, pOffset); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDescriptorSetLayoutBindingOffsetEXT", e); } + } + + public void GetDescriptorEXT(@CType("VkDevice") MemorySegment device, @CType("const VkDescriptorGetInfoEXT *") MemorySegment pDescriptorInfo, @CType("size_t") long dataSize, @CType("void *") MemorySegment pDescriptor) { + if (Unmarshal.isNullPointer(PFN_vkGetDescriptorEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetDescriptorEXT"); + try { MH_vkGetDescriptorEXT.invokeExact(PFN_vkGetDescriptorEXT, device, pDescriptorInfo, dataSize, pDescriptor); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDescriptorEXT", e); } + } + + public void CmdBindDescriptorBuffersEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int bufferCount, @CType("const VkDescriptorBufferBindingInfoEXT *") MemorySegment pBindingInfos) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindDescriptorBuffersEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindDescriptorBuffersEXT"); + try { MH_vkCmdBindDescriptorBuffersEXT.invokeExact(PFN_vkCmdBindDescriptorBuffersEXT, commandBuffer, bufferCount, pBindingInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindDescriptorBuffersEXT", e); } + } + + public void CmdSetDescriptorBufferOffsetsEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineBindPoint") int pipelineBindPoint, @CType("VkPipelineLayout") MemorySegment layout, @CType("uint32_t") int firstSet, @CType("uint32_t") int setCount, @CType("const uint32_t *") MemorySegment pBufferIndices, @CType("const VkDeviceSize *") MemorySegment pOffsets) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDescriptorBufferOffsetsEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDescriptorBufferOffsetsEXT"); + try { MH_vkCmdSetDescriptorBufferOffsetsEXT.invokeExact(PFN_vkCmdSetDescriptorBufferOffsetsEXT, commandBuffer, pipelineBindPoint, layout, firstSet, setCount, pBufferIndices, pOffsets); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDescriptorBufferOffsetsEXT", e); } + } + + public void CmdBindDescriptorBufferEmbeddedSamplersEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineBindPoint") int pipelineBindPoint, @CType("VkPipelineLayout") MemorySegment layout, @CType("uint32_t") int set) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindDescriptorBufferEmbeddedSamplersEXT"); + try { MH_vkCmdBindDescriptorBufferEmbeddedSamplersEXT.invokeExact(PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT, commandBuffer, pipelineBindPoint, layout, set); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindDescriptorBufferEmbeddedSamplersEXT", e); } + } + + public @CType("VkResult") int GetBufferOpaqueCaptureDescriptorDataEXT(@CType("VkDevice") MemorySegment device, @CType("const VkBufferCaptureDescriptorDataInfoEXT *") MemorySegment pInfo, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetBufferOpaqueCaptureDescriptorDataEXT"); + try { return (int) MH_vkGetBufferOpaqueCaptureDescriptorDataEXT.invokeExact(PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT, device, pInfo, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetBufferOpaqueCaptureDescriptorDataEXT", e); } + } + + public @CType("VkResult") int GetImageOpaqueCaptureDescriptorDataEXT(@CType("VkDevice") MemorySegment device, @CType("const VkImageCaptureDescriptorDataInfoEXT *") MemorySegment pInfo, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetImageOpaqueCaptureDescriptorDataEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetImageOpaqueCaptureDescriptorDataEXT"); + try { return (int) MH_vkGetImageOpaqueCaptureDescriptorDataEXT.invokeExact(PFN_vkGetImageOpaqueCaptureDescriptorDataEXT, device, pInfo, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageOpaqueCaptureDescriptorDataEXT", e); } + } + + public @CType("VkResult") int GetImageViewOpaqueCaptureDescriptorDataEXT(@CType("VkDevice") MemorySegment device, @CType("const VkImageViewCaptureDescriptorDataInfoEXT *") MemorySegment pInfo, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetImageViewOpaqueCaptureDescriptorDataEXT"); + try { return (int) MH_vkGetImageViewOpaqueCaptureDescriptorDataEXT.invokeExact(PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT, device, pInfo, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageViewOpaqueCaptureDescriptorDataEXT", e); } + } + + public @CType("VkResult") int GetSamplerOpaqueCaptureDescriptorDataEXT(@CType("VkDevice") MemorySegment device, @CType("const VkSamplerCaptureDescriptorDataInfoEXT *") MemorySegment pInfo, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetSamplerOpaqueCaptureDescriptorDataEXT"); + try { return (int) MH_vkGetSamplerOpaqueCaptureDescriptorDataEXT.invokeExact(PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT, device, pInfo, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetSamplerOpaqueCaptureDescriptorDataEXT", e); } + } + + public @CType("VkResult") int GetAccelerationStructureOpaqueCaptureDescriptorDataEXT(@CType("VkDevice") MemorySegment device, @CType("const VkAccelerationStructureCaptureDescriptorDataInfoEXT *") MemorySegment pInfo, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT"); + try { return (int) MH_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT.invokeExact(PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT, device, pInfo, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDescriptorIndexing.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDescriptorIndexing.java new file mode 100644 index 00000000..36f45b18 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDescriptorIndexing.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKEXTDescriptorIndexing { + public static final int VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION = 2; + public static final String VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME = "VK_EXT_descriptor_indexing"; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT; + public static final int VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT; + public static final int VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT; + public static final int VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT = VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT; + public static final int VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT; + public static final int VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT; + public static final int VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT; + public static final int VK_ERROR_FRAGMENTATION_EXT = VK_ERROR_FRAGMENTATION; + + public VKEXTDescriptorIndexing(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceAddressBindingReport.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceAddressBindingReport.java new file mode 100644 index 00000000..7b0c6626 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceAddressBindingReport.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDeviceAddressBindingReport { + public static final int VK_DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT = 0x00000001; + public static final int VK_DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT = 0; + public static final int VK_DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT = 1; + public static final int VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION = 1; + public static final String VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME = "VK_EXT_device_address_binding_report"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT = 1000354000; + public static final int VK_STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT = 1000354001; + public static final int VK_DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT = 0x00000008; + + public VKEXTDeviceAddressBindingReport(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceFault.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceFault.java new file mode 100644 index 00000000..4f0c3127 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceFault.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDeviceFault { + public static final int VK_DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT = 0; + public static final int VK_DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT = 1; + public static final int VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT = 2; + public static final int VK_DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT = 3; + public static final int VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT = 4; + public static final int VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT = 5; + public static final int VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT = 6; + public static final int VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT = 1; + public static final int VK_EXT_DEVICE_FAULT_SPEC_VERSION = 2; + public static final String VK_EXT_DEVICE_FAULT_EXTENSION_NAME = "VK_EXT_device_fault"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT = 1000341000; + public static final int VK_STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT = 1000341001; + public static final int VK_STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT = 1000341002; + public static final MethodHandle MH_vkGetDeviceFaultInfoEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetDeviceFaultInfoEXT; + + public VKEXTDeviceFault(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetDeviceFaultInfoEXT = func.invoke(device, "vkGetDeviceFaultInfoEXT"); + } + + public @CType("VkResult") int GetDeviceFaultInfoEXT(@CType("VkDevice") MemorySegment device, @CType("VkDeviceFaultCountsEXT *") MemorySegment pFaultCounts, @CType("VkDeviceFaultInfoEXT *") MemorySegment pFaultInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceFaultInfoEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceFaultInfoEXT"); + try { return (int) MH_vkGetDeviceFaultInfoEXT.invokeExact(PFN_vkGetDeviceFaultInfoEXT, device, pFaultCounts, pFaultInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceFaultInfoEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceGeneratedCommands.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceGeneratedCommands.java new file mode 100644 index 00000000..cf35eb45 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceGeneratedCommands.java @@ -0,0 +1,152 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.nv.VKNVDeviceGeneratedCommands.*; +public class VKEXTDeviceGeneratedCommands { + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT = 0; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT = 1; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT = 2; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT = 3; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT = 4; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT = 5; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT = 6; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT = 7; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT = 8; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT = 9; + public static final int VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT = 0; + public static final int VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT = 1; + public static final int VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT = 0x00000001; + public static final int VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT = 0x00000002; + public static final int VK_INDIRECT_COMMANDS_INPUT_MODE_VULKAN_INDEX_BUFFER_EXT = 0x00000001; + public static final int VK_INDIRECT_COMMANDS_INPUT_MODE_DXGI_INDEX_BUFFER_EXT = 0x00000002; + public static final int VK_EXT_DEVICE_GENERATED_COMMANDS_SPEC_VERSION = 1; + public static final String VK_EXT_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_EXT_device_generated_commands"; + public static final int VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT = 0x00000080; + public static final long VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT = 0x80000000L; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_EXT = 1000572000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_EXT = 1000572001; + public static final int VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_EXT = 1000572002; + public static final int VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_CREATE_INFO_EXT = 1000572003; + public static final int VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXT = 1000572004; + public static final int VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_EXT = 1000572006; + public static final int VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_EXT = 1000572007; + public static final int VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_PIPELINE_EXT = 1000572008; + public static final int VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_SHADER_EXT = 1000572009; + public static final int VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_PIPELINE_INFO_EXT = 1000572010; + public static final int VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_INFO_EXT = 1000572011; + public static final int VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_LAYOUT_INFO_EXT = 1000572012; + public static final int VK_STRUCTURE_TYPE_GENERATED_COMMANDS_PIPELINE_INFO_EXT = 1000572013; + public static final int VK_STRUCTURE_TYPE_GENERATED_COMMANDS_SHADER_INFO_EXT = 1000572014; + public static final int VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_EXT = 1000572000; + public static final int VK_OBJECT_TYPE_INDIRECT_EXECUTION_SET_EXT = 1000572001; + public static final long VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT = 0x4000000000L; + public static final int VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT = VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV; + public static final int VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV; + public static final int VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV; + public static final MethodHandle MH_vkGetGeneratedCommandsMemoryRequirementsEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPreprocessGeneratedCommandsEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdExecuteGeneratedCommandsEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateIndirectCommandsLayoutEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyIndirectCommandsLayoutEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateIndirectExecutionSetEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyIndirectExecutionSetEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkUpdateIndirectExecutionSetPipelineEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkUpdateIndirectExecutionSetShaderEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetGeneratedCommandsMemoryRequirementsEXT; + public final MemorySegment PFN_vkCmdPreprocessGeneratedCommandsEXT; + public final MemorySegment PFN_vkCmdExecuteGeneratedCommandsEXT; + public final MemorySegment PFN_vkCreateIndirectCommandsLayoutEXT; + public final MemorySegment PFN_vkDestroyIndirectCommandsLayoutEXT; + public final MemorySegment PFN_vkCreateIndirectExecutionSetEXT; + public final MemorySegment PFN_vkDestroyIndirectExecutionSetEXT; + public final MemorySegment PFN_vkUpdateIndirectExecutionSetPipelineEXT; + public final MemorySegment PFN_vkUpdateIndirectExecutionSetShaderEXT; + + public VKEXTDeviceGeneratedCommands(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetGeneratedCommandsMemoryRequirementsEXT = func.invoke(device, "vkGetGeneratedCommandsMemoryRequirementsEXT"); + PFN_vkCmdPreprocessGeneratedCommandsEXT = func.invoke(device, "vkCmdPreprocessGeneratedCommandsEXT"); + PFN_vkCmdExecuteGeneratedCommandsEXT = func.invoke(device, "vkCmdExecuteGeneratedCommandsEXT"); + PFN_vkCreateIndirectCommandsLayoutEXT = func.invoke(device, "vkCreateIndirectCommandsLayoutEXT"); + PFN_vkDestroyIndirectCommandsLayoutEXT = func.invoke(device, "vkDestroyIndirectCommandsLayoutEXT"); + PFN_vkCreateIndirectExecutionSetEXT = func.invoke(device, "vkCreateIndirectExecutionSetEXT"); + PFN_vkDestroyIndirectExecutionSetEXT = func.invoke(device, "vkDestroyIndirectExecutionSetEXT"); + PFN_vkUpdateIndirectExecutionSetPipelineEXT = func.invoke(device, "vkUpdateIndirectExecutionSetPipelineEXT"); + PFN_vkUpdateIndirectExecutionSetShaderEXT = func.invoke(device, "vkUpdateIndirectExecutionSetShaderEXT"); + } + + public void GetGeneratedCommandsMemoryRequirementsEXT(@CType("VkDevice") MemorySegment device, @CType("const VkGeneratedCommandsMemoryRequirementsInfoEXT *") MemorySegment pInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetGeneratedCommandsMemoryRequirementsEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetGeneratedCommandsMemoryRequirementsEXT"); + try { MH_vkGetGeneratedCommandsMemoryRequirementsEXT.invokeExact(PFN_vkGetGeneratedCommandsMemoryRequirementsEXT, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetGeneratedCommandsMemoryRequirementsEXT", e); } + } + + public void CmdPreprocessGeneratedCommandsEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkGeneratedCommandsInfoEXT *") MemorySegment pGeneratedCommandsInfo, @CType("VkCommandBuffer") MemorySegment stateCommandBuffer) { + if (Unmarshal.isNullPointer(PFN_vkCmdPreprocessGeneratedCommandsEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdPreprocessGeneratedCommandsEXT"); + try { MH_vkCmdPreprocessGeneratedCommandsEXT.invokeExact(PFN_vkCmdPreprocessGeneratedCommandsEXT, commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPreprocessGeneratedCommandsEXT", e); } + } + + public void CmdExecuteGeneratedCommandsEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int isPreprocessed, @CType("const VkGeneratedCommandsInfoEXT *") MemorySegment pGeneratedCommandsInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdExecuteGeneratedCommandsEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdExecuteGeneratedCommandsEXT"); + try { MH_vkCmdExecuteGeneratedCommandsEXT.invokeExact(PFN_vkCmdExecuteGeneratedCommandsEXT, commandBuffer, isPreprocessed, pGeneratedCommandsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdExecuteGeneratedCommandsEXT", e); } + } + + public @CType("VkResult") int CreateIndirectCommandsLayoutEXT(@CType("VkDevice") MemorySegment device, @CType("const VkIndirectCommandsLayoutCreateInfoEXT *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkIndirectCommandsLayoutEXT *") MemorySegment pIndirectCommandsLayout) { + if (Unmarshal.isNullPointer(PFN_vkCreateIndirectCommandsLayoutEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreateIndirectCommandsLayoutEXT"); + try { return (int) MH_vkCreateIndirectCommandsLayoutEXT.invokeExact(PFN_vkCreateIndirectCommandsLayoutEXT, device, pCreateInfo, pAllocator, pIndirectCommandsLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateIndirectCommandsLayoutEXT", e); } + } + + public void DestroyIndirectCommandsLayoutEXT(@CType("VkDevice") MemorySegment device, @CType("VkIndirectCommandsLayoutEXT") MemorySegment indirectCommandsLayout, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyIndirectCommandsLayoutEXT)) throw new SymbolNotFoundError("Symbol not found: vkDestroyIndirectCommandsLayoutEXT"); + try { MH_vkDestroyIndirectCommandsLayoutEXT.invokeExact(PFN_vkDestroyIndirectCommandsLayoutEXT, device, indirectCommandsLayout, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyIndirectCommandsLayoutEXT", e); } + } + + public @CType("VkResult") int CreateIndirectExecutionSetEXT(@CType("VkDevice") MemorySegment device, @CType("const VkIndirectExecutionSetCreateInfoEXT *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkIndirectExecutionSetEXT *") MemorySegment pIndirectExecutionSet) { + if (Unmarshal.isNullPointer(PFN_vkCreateIndirectExecutionSetEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreateIndirectExecutionSetEXT"); + try { return (int) MH_vkCreateIndirectExecutionSetEXT.invokeExact(PFN_vkCreateIndirectExecutionSetEXT, device, pCreateInfo, pAllocator, pIndirectExecutionSet); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateIndirectExecutionSetEXT", e); } + } + + public void DestroyIndirectExecutionSetEXT(@CType("VkDevice") MemorySegment device, @CType("VkIndirectExecutionSetEXT") MemorySegment indirectExecutionSet, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyIndirectExecutionSetEXT)) throw new SymbolNotFoundError("Symbol not found: vkDestroyIndirectExecutionSetEXT"); + try { MH_vkDestroyIndirectExecutionSetEXT.invokeExact(PFN_vkDestroyIndirectExecutionSetEXT, device, indirectExecutionSet, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyIndirectExecutionSetEXT", e); } + } + + public void UpdateIndirectExecutionSetPipelineEXT(@CType("VkDevice") MemorySegment device, @CType("VkIndirectExecutionSetEXT") MemorySegment indirectExecutionSet, @CType("uint32_t") int executionSetWriteCount, @CType("const VkWriteIndirectExecutionSetPipelineEXT *") MemorySegment pExecutionSetWrites) { + if (Unmarshal.isNullPointer(PFN_vkUpdateIndirectExecutionSetPipelineEXT)) throw new SymbolNotFoundError("Symbol not found: vkUpdateIndirectExecutionSetPipelineEXT"); + try { MH_vkUpdateIndirectExecutionSetPipelineEXT.invokeExact(PFN_vkUpdateIndirectExecutionSetPipelineEXT, device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites); } + catch (Throwable e) { throw new RuntimeException("error in vkUpdateIndirectExecutionSetPipelineEXT", e); } + } + + public void UpdateIndirectExecutionSetShaderEXT(@CType("VkDevice") MemorySegment device, @CType("VkIndirectExecutionSetEXT") MemorySegment indirectExecutionSet, @CType("uint32_t") int executionSetWriteCount, @CType("const VkWriteIndirectExecutionSetShaderEXT *") MemorySegment pExecutionSetWrites) { + if (Unmarshal.isNullPointer(PFN_vkUpdateIndirectExecutionSetShaderEXT)) throw new SymbolNotFoundError("Symbol not found: vkUpdateIndirectExecutionSetShaderEXT"); + try { MH_vkUpdateIndirectExecutionSetShaderEXT.invokeExact(PFN_vkUpdateIndirectExecutionSetShaderEXT, device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites); } + catch (Throwable e) { throw new RuntimeException("error in vkUpdateIndirectExecutionSetShaderEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceMemoryReport.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceMemoryReport.java new file mode 100644 index 00000000..f2183d35 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDeviceMemoryReport.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDeviceMemoryReport { + public static final int VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT = 0; + public static final int VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT = 1; + public static final int VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT = 2; + public static final int VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT = 3; + public static final int VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT = 4; + public static final int VK_EXT_DEVICE_MEMORY_REPORT_SPEC_VERSION = 2; + public static final String VK_EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME = "VK_EXT_device_memory_report"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT = 1000284000; + public static final int VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT = 1000284001; + public static final int VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT = 1000284002; + + public VKEXTDeviceMemoryReport(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDirectModeDisplay.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDirectModeDisplay.java new file mode 100644 index 00000000..c420d1a5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDirectModeDisplay.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDirectModeDisplay { + public static final int VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION = 1; + public static final String VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME = "VK_EXT_direct_mode_display"; + public static final MethodHandle MH_vkReleaseDisplayEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkReleaseDisplayEXT; + + public VKEXTDirectModeDisplay(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkReleaseDisplayEXT = func.invoke(instance, "vkReleaseDisplayEXT"); + } + + public @CType("VkResult") int ReleaseDisplayEXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkDisplayKHR") MemorySegment display) { + if (Unmarshal.isNullPointer(PFN_vkReleaseDisplayEXT)) throw new SymbolNotFoundError("Symbol not found: vkReleaseDisplayEXT"); + try { return (int) MH_vkReleaseDisplayEXT.invokeExact(PFN_vkReleaseDisplayEXT, physicalDevice, display); } + catch (Throwable e) { throw new RuntimeException("error in vkReleaseDisplayEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDirectfbSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDirectfbSurface.java new file mode 100644 index 00000000..76a07bf9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDirectfbSurface.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDirectfbSurface { + public static final int VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION = 1; + public static final String VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME = "VK_EXT_directfb_surface"; + public static final int VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT = 1000346000; + public static final MethodHandle MH_vkCreateDirectFBSurfaceEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceDirectFBPresentationSupportEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateDirectFBSurfaceEXT; + public final MemorySegment PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT; + + public VKEXTDirectfbSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateDirectFBSurfaceEXT = func.invoke(instance, "vkCreateDirectFBSurfaceEXT"); + PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT = func.invoke(instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT"); + } + + public @CType("VkResult") int CreateDirectFBSurfaceEXT(@CType("VkInstance") MemorySegment instance, @CType("const VkDirectFBSurfaceCreateInfoEXT *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateDirectFBSurfaceEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreateDirectFBSurfaceEXT"); + try { return (int) MH_vkCreateDirectFBSurfaceEXT.invokeExact(PFN_vkCreateDirectFBSurfaceEXT, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDirectFBSurfaceEXT", e); } + } + + public @CType("VkBool32") int GetPhysicalDeviceDirectFBPresentationSupportEXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t") int queueFamilyIndex, @CType("IDirectFB *") MemorySegment dfb) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceDirectFBPresentationSupportEXT"); + try { return (int) MH_vkGetPhysicalDeviceDirectFBPresentationSupportEXT.invokeExact(PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT, physicalDevice, queueFamilyIndex, dfb); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceDirectFBPresentationSupportEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDiscardRectangles.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDiscardRectangles.java new file mode 100644 index 00000000..c9552cca --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDiscardRectangles.java @@ -0,0 +1,66 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDiscardRectangles { + public static final int VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0; + public static final int VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1; + public static final int VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION = 2; + public static final String VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME = "VK_EXT_discard_rectangles"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001; + public static final int VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000; + public static final int VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT = 1000099001; + public static final int VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT = 1000099002; + public static final MethodHandle MH_vkCmdSetDiscardRectangleEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetDiscardRectangleEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDiscardRectangleModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdSetDiscardRectangleEXT; + public final MemorySegment PFN_vkCmdSetDiscardRectangleEnableEXT; + public final MemorySegment PFN_vkCmdSetDiscardRectangleModeEXT; + + public VKEXTDiscardRectangles(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetDiscardRectangleEXT = func.invoke(device, "vkCmdSetDiscardRectangleEXT"); + PFN_vkCmdSetDiscardRectangleEnableEXT = func.invoke(device, "vkCmdSetDiscardRectangleEnableEXT"); + PFN_vkCmdSetDiscardRectangleModeEXT = func.invoke(device, "vkCmdSetDiscardRectangleModeEXT"); + } + + public void CmdSetDiscardRectangleEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstDiscardRectangle, @CType("uint32_t") int discardRectangleCount, @CType("const VkRect2D *") MemorySegment pDiscardRectangles) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDiscardRectangleEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDiscardRectangleEXT"); + try { MH_vkCmdSetDiscardRectangleEXT.invokeExact(PFN_vkCmdSetDiscardRectangleEXT, commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDiscardRectangleEXT", e); } + } + + public void CmdSetDiscardRectangleEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int discardRectangleEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDiscardRectangleEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDiscardRectangleEnableEXT"); + try { MH_vkCmdSetDiscardRectangleEnableEXT.invokeExact(PFN_vkCmdSetDiscardRectangleEnableEXT, commandBuffer, discardRectangleEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDiscardRectangleEnableEXT", e); } + } + + public void CmdSetDiscardRectangleModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDiscardRectangleModeEXT") int discardRectangleMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDiscardRectangleModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDiscardRectangleModeEXT"); + try { MH_vkCmdSetDiscardRectangleModeEXT.invokeExact(PFN_vkCmdSetDiscardRectangleModeEXT, commandBuffer, discardRectangleMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDiscardRectangleModeEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDisplayControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDisplayControl.java new file mode 100644 index 00000000..f74768b9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDisplayControl.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDisplayControl { + public static final int VK_DISPLAY_POWER_STATE_OFF_EXT = 0; + public static final int VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1; + public static final int VK_DISPLAY_POWER_STATE_ON_EXT = 2; + public static final int VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0; + public static final int VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0; + public static final int VK_EXT_DISPLAY_CONTROL_SPEC_VERSION = 1; + public static final String VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME = "VK_EXT_display_control"; + public static final int VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000; + public static final int VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001; + public static final int VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002; + public static final int VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003; + public static final MethodHandle MH_vkDisplayPowerControlEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkRegisterDeviceEventEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkRegisterDisplayEventEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetSwapchainCounterEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkDisplayPowerControlEXT; + public final MemorySegment PFN_vkRegisterDeviceEventEXT; + public final MemorySegment PFN_vkRegisterDisplayEventEXT; + public final MemorySegment PFN_vkGetSwapchainCounterEXT; + + public VKEXTDisplayControl(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkDisplayPowerControlEXT = func.invoke(device, "vkDisplayPowerControlEXT"); + PFN_vkRegisterDeviceEventEXT = func.invoke(device, "vkRegisterDeviceEventEXT"); + PFN_vkRegisterDisplayEventEXT = func.invoke(device, "vkRegisterDisplayEventEXT"); + PFN_vkGetSwapchainCounterEXT = func.invoke(device, "vkGetSwapchainCounterEXT"); + } + + public @CType("VkResult") int DisplayPowerControlEXT(@CType("VkDevice") MemorySegment device, @CType("VkDisplayKHR") MemorySegment display, @CType("const VkDisplayPowerInfoEXT *") MemorySegment pDisplayPowerInfo) { + if (Unmarshal.isNullPointer(PFN_vkDisplayPowerControlEXT)) throw new SymbolNotFoundError("Symbol not found: vkDisplayPowerControlEXT"); + try { return (int) MH_vkDisplayPowerControlEXT.invokeExact(PFN_vkDisplayPowerControlEXT, device, display, pDisplayPowerInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkDisplayPowerControlEXT", e); } + } + + public @CType("VkResult") int RegisterDeviceEventEXT(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceEventInfoEXT *") MemorySegment pDeviceEventInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkFence *") MemorySegment pFence) { + if (Unmarshal.isNullPointer(PFN_vkRegisterDeviceEventEXT)) throw new SymbolNotFoundError("Symbol not found: vkRegisterDeviceEventEXT"); + try { return (int) MH_vkRegisterDeviceEventEXT.invokeExact(PFN_vkRegisterDeviceEventEXT, device, pDeviceEventInfo, pAllocator, pFence); } + catch (Throwable e) { throw new RuntimeException("error in vkRegisterDeviceEventEXT", e); } + } + + public @CType("VkResult") int RegisterDisplayEventEXT(@CType("VkDevice") MemorySegment device, @CType("VkDisplayKHR") MemorySegment display, @CType("const VkDisplayEventInfoEXT *") MemorySegment pDisplayEventInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkFence *") MemorySegment pFence) { + if (Unmarshal.isNullPointer(PFN_vkRegisterDisplayEventEXT)) throw new SymbolNotFoundError("Symbol not found: vkRegisterDisplayEventEXT"); + try { return (int) MH_vkRegisterDisplayEventEXT.invokeExact(PFN_vkRegisterDisplayEventEXT, device, display, pDisplayEventInfo, pAllocator, pFence); } + catch (Throwable e) { throw new RuntimeException("error in vkRegisterDisplayEventEXT", e); } + } + + public @CType("VkResult") int GetSwapchainCounterEXT(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("VkSurfaceCounterFlagBitsEXT") int counter, @CType("uint64_t *") MemorySegment pCounterValue) { + if (Unmarshal.isNullPointer(PFN_vkGetSwapchainCounterEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetSwapchainCounterEXT"); + try { return (int) MH_vkGetSwapchainCounterEXT.invokeExact(PFN_vkGetSwapchainCounterEXT, device, swapchain, counter, pCounterValue); } + catch (Throwable e) { throw new RuntimeException("error in vkGetSwapchainCounterEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDisplaySurfaceCounter.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDisplaySurfaceCounter.java new file mode 100644 index 00000000..32d1ba92 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDisplaySurfaceCounter.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.ext.VKEXTDisplaySurfaceCounter.*; +public class VKEXTDisplaySurfaceCounter { + public static final int VK_SURFACE_COUNTER_VBLANK_BIT_EXT = 0x00000001; + public static final int VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION = 1; + public static final String VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME = "VK_EXT_display_surface_counter"; + public static final int VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000; + public static final int VK_SURFACE_COUNTER_VBLANK_EXT = VK_SURFACE_COUNTER_VBLANK_BIT_EXT; + public static final int VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT; + public static final MethodHandle MH_vkGetPhysicalDeviceSurfaceCapabilities2EXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT; + + public VKEXTDisplaySurfaceCounter(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT = func.invoke(instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT"); + } + + public @CType("VkResult") int GetPhysicalDeviceSurfaceCapabilities2EXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkSurfaceKHR") MemorySegment surface, @CType("VkSurfaceCapabilities2EXT *") MemorySegment pSurfaceCapabilities) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSurfaceCapabilities2EXT"); + try { return (int) MH_vkGetPhysicalDeviceSurfaceCapabilities2EXT.invokeExact(PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT, physicalDevice, surface, pSurfaceCapabilities); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSurfaceCapabilities2EXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDynamicRenderingUnusedAttachments.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDynamicRenderingUnusedAttachments.java new file mode 100644 index 00000000..a8c25455 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTDynamicRenderingUnusedAttachments.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTDynamicRenderingUnusedAttachments { + public static final int VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_SPEC_VERSION = 1; + public static final String VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_EXTENSION_NAME = "VK_EXT_dynamic_rendering_unused_attachments"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT = 1000499000; + + public VKEXTDynamicRenderingUnusedAttachments(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExtendedDynamicState.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExtendedDynamicState.java new file mode 100644 index 00000000..cd33bd25 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExtendedDynamicState.java @@ -0,0 +1,154 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTExtendedDynamicState { + public static final int VK_EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION = 1; + public static final String VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_extended_dynamic_state"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000; + public static final int VK_DYNAMIC_STATE_CULL_MODE_EXT = VK_DYNAMIC_STATE_CULL_MODE; + public static final int VK_DYNAMIC_STATE_FRONT_FACE_EXT = VK_DYNAMIC_STATE_FRONT_FACE; + public static final int VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY; + public static final int VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT = VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT; + public static final int VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT = VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT; + public static final int VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE; + public static final int VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE; + public static final int VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE; + public static final int VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT = VK_DYNAMIC_STATE_DEPTH_COMPARE_OP; + public static final int VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE; + public static final int VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE; + public static final int VK_DYNAMIC_STATE_STENCIL_OP_EXT = VK_DYNAMIC_STATE_STENCIL_OP; + public static final MethodHandle MH_vkCmdSetCullModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetFrontFaceEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetPrimitiveTopologyEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetViewportWithCountEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetScissorWithCountEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindVertexBuffers2EXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetDepthTestEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthWriteEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthCompareOpEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthBoundsTestEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetStencilTestEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetStencilOpEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdSetCullModeEXT; + public final MemorySegment PFN_vkCmdSetFrontFaceEXT; + public final MemorySegment PFN_vkCmdSetPrimitiveTopologyEXT; + public final MemorySegment PFN_vkCmdSetViewportWithCountEXT; + public final MemorySegment PFN_vkCmdSetScissorWithCountEXT; + public final MemorySegment PFN_vkCmdBindVertexBuffers2EXT; + public final MemorySegment PFN_vkCmdSetDepthTestEnableEXT; + public final MemorySegment PFN_vkCmdSetDepthWriteEnableEXT; + public final MemorySegment PFN_vkCmdSetDepthCompareOpEXT; + public final MemorySegment PFN_vkCmdSetDepthBoundsTestEnableEXT; + public final MemorySegment PFN_vkCmdSetStencilTestEnableEXT; + public final MemorySegment PFN_vkCmdSetStencilOpEXT; + + public VKEXTExtendedDynamicState(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetCullModeEXT = func.invoke(device, "vkCmdSetCullModeEXT", "vkCmdSetCullMode"); + PFN_vkCmdSetFrontFaceEXT = func.invoke(device, "vkCmdSetFrontFaceEXT", "vkCmdSetFrontFace"); + PFN_vkCmdSetPrimitiveTopologyEXT = func.invoke(device, "vkCmdSetPrimitiveTopologyEXT", "vkCmdSetPrimitiveTopology"); + PFN_vkCmdSetViewportWithCountEXT = func.invoke(device, "vkCmdSetViewportWithCountEXT", "vkCmdSetViewportWithCount"); + PFN_vkCmdSetScissorWithCountEXT = func.invoke(device, "vkCmdSetScissorWithCountEXT", "vkCmdSetScissorWithCount"); + PFN_vkCmdBindVertexBuffers2EXT = func.invoke(device, "vkCmdBindVertexBuffers2EXT", "vkCmdBindVertexBuffers2"); + PFN_vkCmdSetDepthTestEnableEXT = func.invoke(device, "vkCmdSetDepthTestEnableEXT", "vkCmdSetDepthTestEnable"); + PFN_vkCmdSetDepthWriteEnableEXT = func.invoke(device, "vkCmdSetDepthWriteEnableEXT", "vkCmdSetDepthWriteEnable"); + PFN_vkCmdSetDepthCompareOpEXT = func.invoke(device, "vkCmdSetDepthCompareOpEXT", "vkCmdSetDepthCompareOp"); + PFN_vkCmdSetDepthBoundsTestEnableEXT = func.invoke(device, "vkCmdSetDepthBoundsTestEnableEXT", "vkCmdSetDepthBoundsTestEnable"); + PFN_vkCmdSetStencilTestEnableEXT = func.invoke(device, "vkCmdSetStencilTestEnableEXT", "vkCmdSetStencilTestEnable"); + PFN_vkCmdSetStencilOpEXT = func.invoke(device, "vkCmdSetStencilOpEXT", "vkCmdSetStencilOp"); + } + + public void CmdSetCullModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCullModeFlags") int cullMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCullModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCullModeEXT"); + try { MH_vkCmdSetCullModeEXT.invokeExact(PFN_vkCmdSetCullModeEXT, commandBuffer, cullMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCullModeEXT", e); } + } + + public void CmdSetFrontFaceEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkFrontFace") int frontFace) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetFrontFaceEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetFrontFaceEXT"); + try { MH_vkCmdSetFrontFaceEXT.invokeExact(PFN_vkCmdSetFrontFaceEXT, commandBuffer, frontFace); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetFrontFaceEXT", e); } + } + + public void CmdSetPrimitiveTopologyEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPrimitiveTopology") int primitiveTopology) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPrimitiveTopologyEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPrimitiveTopologyEXT"); + try { MH_vkCmdSetPrimitiveTopologyEXT.invokeExact(PFN_vkCmdSetPrimitiveTopologyEXT, commandBuffer, primitiveTopology); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPrimitiveTopologyEXT", e); } + } + + public void CmdSetViewportWithCountEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int viewportCount, @CType("const VkViewport *") MemorySegment pViewports) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetViewportWithCountEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetViewportWithCountEXT"); + try { MH_vkCmdSetViewportWithCountEXT.invokeExact(PFN_vkCmdSetViewportWithCountEXT, commandBuffer, viewportCount, pViewports); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetViewportWithCountEXT", e); } + } + + public void CmdSetScissorWithCountEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int scissorCount, @CType("const VkRect2D *") MemorySegment pScissors) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetScissorWithCountEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetScissorWithCountEXT"); + try { MH_vkCmdSetScissorWithCountEXT.invokeExact(PFN_vkCmdSetScissorWithCountEXT, commandBuffer, scissorCount, pScissors); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetScissorWithCountEXT", e); } + } + + public void CmdBindVertexBuffers2EXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstBinding, @CType("uint32_t") int bindingCount, @CType("const VkBuffer *") MemorySegment pBuffers, @CType("const VkDeviceSize *") MemorySegment pOffsets, @CType("const VkDeviceSize *") MemorySegment pSizes, @CType("const VkDeviceSize *") MemorySegment pStrides) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindVertexBuffers2EXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindVertexBuffers2EXT"); + try { MH_vkCmdBindVertexBuffers2EXT.invokeExact(PFN_vkCmdBindVertexBuffers2EXT, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindVertexBuffers2EXT", e); } + } + + public void CmdSetDepthTestEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthTestEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthTestEnableEXT"); + try { MH_vkCmdSetDepthTestEnableEXT.invokeExact(PFN_vkCmdSetDepthTestEnableEXT, commandBuffer, depthTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthTestEnableEXT", e); } + } + + public void CmdSetDepthWriteEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthWriteEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthWriteEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthWriteEnableEXT"); + try { MH_vkCmdSetDepthWriteEnableEXT.invokeExact(PFN_vkCmdSetDepthWriteEnableEXT, commandBuffer, depthWriteEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthWriteEnableEXT", e); } + } + + public void CmdSetDepthCompareOpEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCompareOp") int depthCompareOp) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthCompareOpEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthCompareOpEXT"); + try { MH_vkCmdSetDepthCompareOpEXT.invokeExact(PFN_vkCmdSetDepthCompareOpEXT, commandBuffer, depthCompareOp); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthCompareOpEXT", e); } + } + + public void CmdSetDepthBoundsTestEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthBoundsTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthBoundsTestEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthBoundsTestEnableEXT"); + try { MH_vkCmdSetDepthBoundsTestEnableEXT.invokeExact(PFN_vkCmdSetDepthBoundsTestEnableEXT, commandBuffer, depthBoundsTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthBoundsTestEnableEXT", e); } + } + + public void CmdSetStencilTestEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int stencilTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetStencilTestEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetStencilTestEnableEXT"); + try { MH_vkCmdSetStencilTestEnableEXT.invokeExact(PFN_vkCmdSetStencilTestEnableEXT, commandBuffer, stencilTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetStencilTestEnableEXT", e); } + } + + public void CmdSetStencilOpEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkStencilFaceFlags") int faceMask, @CType("VkStencilOp") int failOp, @CType("VkStencilOp") int passOp, @CType("VkStencilOp") int depthFailOp, @CType("VkCompareOp") int compareOp) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetStencilOpEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetStencilOpEXT"); + try { MH_vkCmdSetStencilOpEXT.invokeExact(PFN_vkCmdSetStencilOpEXT, commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetStencilOpEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExtendedDynamicState2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExtendedDynamicState2.java new file mode 100644 index 00000000..0936d0c0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExtendedDynamicState2.java @@ -0,0 +1,84 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTExtendedDynamicState2 { + public static final int VK_EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION = 1; + public static final String VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME = "VK_EXT_extended_dynamic_state2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT = 1000377000; + public static final int VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT = 1000377000; + public static final int VK_DYNAMIC_STATE_LOGIC_OP_EXT = 1000377003; + public static final int VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT = VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE; + public static final int VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE; + public static final int VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE; + public static final MethodHandle MH_vkCmdSetPatchControlPointsEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetRasterizerDiscardEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthBiasEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetLogicOpEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetPrimitiveRestartEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdSetPatchControlPointsEXT; + public final MemorySegment PFN_vkCmdSetRasterizerDiscardEnableEXT; + public final MemorySegment PFN_vkCmdSetDepthBiasEnableEXT; + public final MemorySegment PFN_vkCmdSetLogicOpEXT; + public final MemorySegment PFN_vkCmdSetPrimitiveRestartEnableEXT; + + public VKEXTExtendedDynamicState2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetPatchControlPointsEXT = func.invoke(device, "vkCmdSetPatchControlPointsEXT"); + PFN_vkCmdSetRasterizerDiscardEnableEXT = func.invoke(device, "vkCmdSetRasterizerDiscardEnableEXT", "vkCmdSetRasterizerDiscardEnable"); + PFN_vkCmdSetDepthBiasEnableEXT = func.invoke(device, "vkCmdSetDepthBiasEnableEXT", "vkCmdSetDepthBiasEnable"); + PFN_vkCmdSetLogicOpEXT = func.invoke(device, "vkCmdSetLogicOpEXT"); + PFN_vkCmdSetPrimitiveRestartEnableEXT = func.invoke(device, "vkCmdSetPrimitiveRestartEnableEXT", "vkCmdSetPrimitiveRestartEnable"); + } + + public void CmdSetPatchControlPointsEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int patchControlPoints) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPatchControlPointsEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPatchControlPointsEXT"); + try { MH_vkCmdSetPatchControlPointsEXT.invokeExact(PFN_vkCmdSetPatchControlPointsEXT, commandBuffer, patchControlPoints); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPatchControlPointsEXT", e); } + } + + public void CmdSetRasterizerDiscardEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int rasterizerDiscardEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRasterizerDiscardEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRasterizerDiscardEnableEXT"); + try { MH_vkCmdSetRasterizerDiscardEnableEXT.invokeExact(PFN_vkCmdSetRasterizerDiscardEnableEXT, commandBuffer, rasterizerDiscardEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRasterizerDiscardEnableEXT", e); } + } + + public void CmdSetDepthBiasEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthBiasEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthBiasEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthBiasEnableEXT"); + try { MH_vkCmdSetDepthBiasEnableEXT.invokeExact(PFN_vkCmdSetDepthBiasEnableEXT, commandBuffer, depthBiasEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthBiasEnableEXT", e); } + } + + public void CmdSetLogicOpEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkLogicOp") int logicOp) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLogicOpEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLogicOpEXT"); + try { MH_vkCmdSetLogicOpEXT.invokeExact(PFN_vkCmdSetLogicOpEXT, commandBuffer, logicOp); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLogicOpEXT", e); } + } + + public void CmdSetPrimitiveRestartEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int primitiveRestartEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPrimitiveRestartEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPrimitiveRestartEnableEXT"); + try { MH_vkCmdSetPrimitiveRestartEnableEXT.invokeExact(PFN_vkCmdSetPrimitiveRestartEnableEXT, commandBuffer, primitiveRestartEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPrimitiveRestartEnableEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExtendedDynamicState3.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExtendedDynamicState3.java new file mode 100644 index 00000000..d002f641 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExtendedDynamicState3.java @@ -0,0 +1,344 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTExtendedDynamicState3 { + public static final int VK_EXT_EXTENDED_DYNAMIC_STATE_3_SPEC_VERSION = 2; + public static final String VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME = "VK_EXT_extended_dynamic_state3"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT = 1000455000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT = 1000455001; + public static final int VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT = 1000455003; + public static final int VK_DYNAMIC_STATE_POLYGON_MODE_EXT = 1000455004; + public static final int VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT = 1000455005; + public static final int VK_DYNAMIC_STATE_SAMPLE_MASK_EXT = 1000455006; + public static final int VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT = 1000455007; + public static final int VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT = 1000455008; + public static final int VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT = 1000455009; + public static final int VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT = 1000455010; + public static final int VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT = 1000455011; + public static final int VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT = 1000455012; + public static final int VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002; + public static final int VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT = 1000455013; + public static final int VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT = 1000455014; + public static final int VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT = 1000455015; + public static final int VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT = 1000455016; + public static final int VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT = 1000455017; + public static final int VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT = 1000455018; + public static final int VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT = 1000455019; + public static final int VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT = 1000455020; + public static final int VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT = 1000455021; + public static final int VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT = 1000455022; + public static final int VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV = 1000455023; + public static final int VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV = 1000455024; + public static final int VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV = 1000455025; + public static final int VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV = 1000455026; + public static final int VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV = 1000455027; + public static final int VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV = 1000455028; + public static final int VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV = 1000455029; + public static final int VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV = 1000455030; + public static final int VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV = 1000455031; + public static final int VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV = 1000455032; + public static final MethodHandle MH_vkCmdSetDepthClampEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetPolygonModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetRasterizationSamplesEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetSampleMaskEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetAlphaToCoverageEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetAlphaToOneEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetLogicOpEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetColorBlendEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetColorBlendEquationEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetColorWriteMaskEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetTessellationDomainOriginEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetRasterizationStreamEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetConservativeRasterizationModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetExtraPrimitiveOverestimationSizeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_FLOAT)); + public static final MethodHandle MH_vkCmdSetDepthClipEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetSampleLocationsEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetColorBlendAdvancedEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetProvokingVertexModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetLineRasterizationModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetLineStippleEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthClipNegativeOneToOneEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetViewportWScalingEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetViewportSwizzleNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetCoverageToColorEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetCoverageToColorLocationNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetCoverageModulationModeNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetCoverageModulationTableEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetCoverageModulationTableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetShadingRateImageEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetRepresentativeFragmentTestEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetCoverageReductionModeNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdSetDepthClampEnableEXT; + public final MemorySegment PFN_vkCmdSetPolygonModeEXT; + public final MemorySegment PFN_vkCmdSetRasterizationSamplesEXT; + public final MemorySegment PFN_vkCmdSetSampleMaskEXT; + public final MemorySegment PFN_vkCmdSetAlphaToCoverageEnableEXT; + public final MemorySegment PFN_vkCmdSetAlphaToOneEnableEXT; + public final MemorySegment PFN_vkCmdSetLogicOpEnableEXT; + public final MemorySegment PFN_vkCmdSetColorBlendEnableEXT; + public final MemorySegment PFN_vkCmdSetColorBlendEquationEXT; + public final MemorySegment PFN_vkCmdSetColorWriteMaskEXT; + public final MemorySegment PFN_vkCmdSetTessellationDomainOriginEXT; + public final MemorySegment PFN_vkCmdSetRasterizationStreamEXT; + public final MemorySegment PFN_vkCmdSetConservativeRasterizationModeEXT; + public final MemorySegment PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT; + public final MemorySegment PFN_vkCmdSetDepthClipEnableEXT; + public final MemorySegment PFN_vkCmdSetSampleLocationsEnableEXT; + public final MemorySegment PFN_vkCmdSetColorBlendAdvancedEXT; + public final MemorySegment PFN_vkCmdSetProvokingVertexModeEXT; + public final MemorySegment PFN_vkCmdSetLineRasterizationModeEXT; + public final MemorySegment PFN_vkCmdSetLineStippleEnableEXT; + public final MemorySegment PFN_vkCmdSetDepthClipNegativeOneToOneEXT; + public final MemorySegment PFN_vkCmdSetViewportWScalingEnableNV; + public final MemorySegment PFN_vkCmdSetViewportSwizzleNV; + public final MemorySegment PFN_vkCmdSetCoverageToColorEnableNV; + public final MemorySegment PFN_vkCmdSetCoverageToColorLocationNV; + public final MemorySegment PFN_vkCmdSetCoverageModulationModeNV; + public final MemorySegment PFN_vkCmdSetCoverageModulationTableEnableNV; + public final MemorySegment PFN_vkCmdSetCoverageModulationTableNV; + public final MemorySegment PFN_vkCmdSetShadingRateImageEnableNV; + public final MemorySegment PFN_vkCmdSetRepresentativeFragmentTestEnableNV; + public final MemorySegment PFN_vkCmdSetCoverageReductionModeNV; + + public VKEXTExtendedDynamicState3(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetDepthClampEnableEXT = func.invoke(device, "vkCmdSetDepthClampEnableEXT"); + PFN_vkCmdSetPolygonModeEXT = func.invoke(device, "vkCmdSetPolygonModeEXT"); + PFN_vkCmdSetRasterizationSamplesEXT = func.invoke(device, "vkCmdSetRasterizationSamplesEXT"); + PFN_vkCmdSetSampleMaskEXT = func.invoke(device, "vkCmdSetSampleMaskEXT"); + PFN_vkCmdSetAlphaToCoverageEnableEXT = func.invoke(device, "vkCmdSetAlphaToCoverageEnableEXT"); + PFN_vkCmdSetAlphaToOneEnableEXT = func.invoke(device, "vkCmdSetAlphaToOneEnableEXT"); + PFN_vkCmdSetLogicOpEnableEXT = func.invoke(device, "vkCmdSetLogicOpEnableEXT"); + PFN_vkCmdSetColorBlendEnableEXT = func.invoke(device, "vkCmdSetColorBlendEnableEXT"); + PFN_vkCmdSetColorBlendEquationEXT = func.invoke(device, "vkCmdSetColorBlendEquationEXT"); + PFN_vkCmdSetColorWriteMaskEXT = func.invoke(device, "vkCmdSetColorWriteMaskEXT"); + PFN_vkCmdSetTessellationDomainOriginEXT = func.invoke(device, "vkCmdSetTessellationDomainOriginEXT"); + PFN_vkCmdSetRasterizationStreamEXT = func.invoke(device, "vkCmdSetRasterizationStreamEXT"); + PFN_vkCmdSetConservativeRasterizationModeEXT = func.invoke(device, "vkCmdSetConservativeRasterizationModeEXT"); + PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT = func.invoke(device, "vkCmdSetExtraPrimitiveOverestimationSizeEXT"); + PFN_vkCmdSetDepthClipEnableEXT = func.invoke(device, "vkCmdSetDepthClipEnableEXT"); + PFN_vkCmdSetSampleLocationsEnableEXT = func.invoke(device, "vkCmdSetSampleLocationsEnableEXT"); + PFN_vkCmdSetColorBlendAdvancedEXT = func.invoke(device, "vkCmdSetColorBlendAdvancedEXT"); + PFN_vkCmdSetProvokingVertexModeEXT = func.invoke(device, "vkCmdSetProvokingVertexModeEXT"); + PFN_vkCmdSetLineRasterizationModeEXT = func.invoke(device, "vkCmdSetLineRasterizationModeEXT"); + PFN_vkCmdSetLineStippleEnableEXT = func.invoke(device, "vkCmdSetLineStippleEnableEXT"); + PFN_vkCmdSetDepthClipNegativeOneToOneEXT = func.invoke(device, "vkCmdSetDepthClipNegativeOneToOneEXT"); + PFN_vkCmdSetViewportWScalingEnableNV = func.invoke(device, "vkCmdSetViewportWScalingEnableNV"); + PFN_vkCmdSetViewportSwizzleNV = func.invoke(device, "vkCmdSetViewportSwizzleNV"); + PFN_vkCmdSetCoverageToColorEnableNV = func.invoke(device, "vkCmdSetCoverageToColorEnableNV"); + PFN_vkCmdSetCoverageToColorLocationNV = func.invoke(device, "vkCmdSetCoverageToColorLocationNV"); + PFN_vkCmdSetCoverageModulationModeNV = func.invoke(device, "vkCmdSetCoverageModulationModeNV"); + PFN_vkCmdSetCoverageModulationTableEnableNV = func.invoke(device, "vkCmdSetCoverageModulationTableEnableNV"); + PFN_vkCmdSetCoverageModulationTableNV = func.invoke(device, "vkCmdSetCoverageModulationTableNV"); + PFN_vkCmdSetShadingRateImageEnableNV = func.invoke(device, "vkCmdSetShadingRateImageEnableNV"); + PFN_vkCmdSetRepresentativeFragmentTestEnableNV = func.invoke(device, "vkCmdSetRepresentativeFragmentTestEnableNV"); + PFN_vkCmdSetCoverageReductionModeNV = func.invoke(device, "vkCmdSetCoverageReductionModeNV"); + } + + public void CmdSetDepthClampEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthClampEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthClampEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthClampEnableEXT"); + try { MH_vkCmdSetDepthClampEnableEXT.invokeExact(PFN_vkCmdSetDepthClampEnableEXT, commandBuffer, depthClampEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthClampEnableEXT", e); } + } + + public void CmdSetPolygonModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPolygonMode") int polygonMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPolygonModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPolygonModeEXT"); + try { MH_vkCmdSetPolygonModeEXT.invokeExact(PFN_vkCmdSetPolygonModeEXT, commandBuffer, polygonMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPolygonModeEXT", e); } + } + + public void CmdSetRasterizationSamplesEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkSampleCountFlagBits") int rasterizationSamples) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRasterizationSamplesEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRasterizationSamplesEXT"); + try { MH_vkCmdSetRasterizationSamplesEXT.invokeExact(PFN_vkCmdSetRasterizationSamplesEXT, commandBuffer, rasterizationSamples); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRasterizationSamplesEXT", e); } + } + + public void CmdSetSampleMaskEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkSampleCountFlagBits") int samples, @CType("const VkSampleMask *") MemorySegment pSampleMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetSampleMaskEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetSampleMaskEXT"); + try { MH_vkCmdSetSampleMaskEXT.invokeExact(PFN_vkCmdSetSampleMaskEXT, commandBuffer, samples, pSampleMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetSampleMaskEXT", e); } + } + + public void CmdSetAlphaToCoverageEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int alphaToCoverageEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetAlphaToCoverageEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetAlphaToCoverageEnableEXT"); + try { MH_vkCmdSetAlphaToCoverageEnableEXT.invokeExact(PFN_vkCmdSetAlphaToCoverageEnableEXT, commandBuffer, alphaToCoverageEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetAlphaToCoverageEnableEXT", e); } + } + + public void CmdSetAlphaToOneEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int alphaToOneEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetAlphaToOneEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetAlphaToOneEnableEXT"); + try { MH_vkCmdSetAlphaToOneEnableEXT.invokeExact(PFN_vkCmdSetAlphaToOneEnableEXT, commandBuffer, alphaToOneEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetAlphaToOneEnableEXT", e); } + } + + public void CmdSetLogicOpEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int logicOpEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLogicOpEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLogicOpEnableEXT"); + try { MH_vkCmdSetLogicOpEnableEXT.invokeExact(PFN_vkCmdSetLogicOpEnableEXT, commandBuffer, logicOpEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLogicOpEnableEXT", e); } + } + + public void CmdSetColorBlendEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstAttachment, @CType("uint32_t") int attachmentCount, @CType("const VkBool32 *") MemorySegment pColorBlendEnables) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetColorBlendEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetColorBlendEnableEXT"); + try { MH_vkCmdSetColorBlendEnableEXT.invokeExact(PFN_vkCmdSetColorBlendEnableEXT, commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetColorBlendEnableEXT", e); } + } + + public void CmdSetColorBlendEquationEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstAttachment, @CType("uint32_t") int attachmentCount, @CType("const VkColorBlendEquationEXT *") MemorySegment pColorBlendEquations) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetColorBlendEquationEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetColorBlendEquationEXT"); + try { MH_vkCmdSetColorBlendEquationEXT.invokeExact(PFN_vkCmdSetColorBlendEquationEXT, commandBuffer, firstAttachment, attachmentCount, pColorBlendEquations); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetColorBlendEquationEXT", e); } + } + + public void CmdSetColorWriteMaskEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstAttachment, @CType("uint32_t") int attachmentCount, @CType("const VkColorComponentFlags *") MemorySegment pColorWriteMasks) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetColorWriteMaskEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetColorWriteMaskEXT"); + try { MH_vkCmdSetColorWriteMaskEXT.invokeExact(PFN_vkCmdSetColorWriteMaskEXT, commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetColorWriteMaskEXT", e); } + } + + public void CmdSetTessellationDomainOriginEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkTessellationDomainOrigin") int domainOrigin) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetTessellationDomainOriginEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetTessellationDomainOriginEXT"); + try { MH_vkCmdSetTessellationDomainOriginEXT.invokeExact(PFN_vkCmdSetTessellationDomainOriginEXT, commandBuffer, domainOrigin); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetTessellationDomainOriginEXT", e); } + } + + public void CmdSetRasterizationStreamEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int rasterizationStream) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRasterizationStreamEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRasterizationStreamEXT"); + try { MH_vkCmdSetRasterizationStreamEXT.invokeExact(PFN_vkCmdSetRasterizationStreamEXT, commandBuffer, rasterizationStream); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRasterizationStreamEXT", e); } + } + + public void CmdSetConservativeRasterizationModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkConservativeRasterizationModeEXT") int conservativeRasterizationMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetConservativeRasterizationModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetConservativeRasterizationModeEXT"); + try { MH_vkCmdSetConservativeRasterizationModeEXT.invokeExact(PFN_vkCmdSetConservativeRasterizationModeEXT, commandBuffer, conservativeRasterizationMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetConservativeRasterizationModeEXT", e); } + } + + public void CmdSetExtraPrimitiveOverestimationSizeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, float extraPrimitiveOverestimationSize) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetExtraPrimitiveOverestimationSizeEXT"); + try { MH_vkCmdSetExtraPrimitiveOverestimationSizeEXT.invokeExact(PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT, commandBuffer, extraPrimitiveOverestimationSize); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetExtraPrimitiveOverestimationSizeEXT", e); } + } + + public void CmdSetDepthClipEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthClipEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthClipEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthClipEnableEXT"); + try { MH_vkCmdSetDepthClipEnableEXT.invokeExact(PFN_vkCmdSetDepthClipEnableEXT, commandBuffer, depthClipEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthClipEnableEXT", e); } + } + + public void CmdSetSampleLocationsEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int sampleLocationsEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetSampleLocationsEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetSampleLocationsEnableEXT"); + try { MH_vkCmdSetSampleLocationsEnableEXT.invokeExact(PFN_vkCmdSetSampleLocationsEnableEXT, commandBuffer, sampleLocationsEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetSampleLocationsEnableEXT", e); } + } + + public void CmdSetColorBlendAdvancedEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstAttachment, @CType("uint32_t") int attachmentCount, @CType("const VkColorBlendAdvancedEXT *") MemorySegment pColorBlendAdvanced) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetColorBlendAdvancedEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetColorBlendAdvancedEXT"); + try { MH_vkCmdSetColorBlendAdvancedEXT.invokeExact(PFN_vkCmdSetColorBlendAdvancedEXT, commandBuffer, firstAttachment, attachmentCount, pColorBlendAdvanced); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetColorBlendAdvancedEXT", e); } + } + + public void CmdSetProvokingVertexModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkProvokingVertexModeEXT") int provokingVertexMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetProvokingVertexModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetProvokingVertexModeEXT"); + try { MH_vkCmdSetProvokingVertexModeEXT.invokeExact(PFN_vkCmdSetProvokingVertexModeEXT, commandBuffer, provokingVertexMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetProvokingVertexModeEXT", e); } + } + + public void CmdSetLineRasterizationModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkLineRasterizationModeEXT") int lineRasterizationMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLineRasterizationModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLineRasterizationModeEXT"); + try { MH_vkCmdSetLineRasterizationModeEXT.invokeExact(PFN_vkCmdSetLineRasterizationModeEXT, commandBuffer, lineRasterizationMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLineRasterizationModeEXT", e); } + } + + public void CmdSetLineStippleEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int stippledLineEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLineStippleEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLineStippleEnableEXT"); + try { MH_vkCmdSetLineStippleEnableEXT.invokeExact(PFN_vkCmdSetLineStippleEnableEXT, commandBuffer, stippledLineEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLineStippleEnableEXT", e); } + } + + public void CmdSetDepthClipNegativeOneToOneEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int negativeOneToOne) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthClipNegativeOneToOneEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthClipNegativeOneToOneEXT"); + try { MH_vkCmdSetDepthClipNegativeOneToOneEXT.invokeExact(PFN_vkCmdSetDepthClipNegativeOneToOneEXT, commandBuffer, negativeOneToOne); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthClipNegativeOneToOneEXT", e); } + } + + public void CmdSetViewportWScalingEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int viewportWScalingEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetViewportWScalingEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetViewportWScalingEnableNV"); + try { MH_vkCmdSetViewportWScalingEnableNV.invokeExact(PFN_vkCmdSetViewportWScalingEnableNV, commandBuffer, viewportWScalingEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetViewportWScalingEnableNV", e); } + } + + public void CmdSetViewportSwizzleNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstViewport, @CType("uint32_t") int viewportCount, @CType("const VkViewportSwizzleNV *") MemorySegment pViewportSwizzles) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetViewportSwizzleNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetViewportSwizzleNV"); + try { MH_vkCmdSetViewportSwizzleNV.invokeExact(PFN_vkCmdSetViewportSwizzleNV, commandBuffer, firstViewport, viewportCount, pViewportSwizzles); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetViewportSwizzleNV", e); } + } + + public void CmdSetCoverageToColorEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int coverageToColorEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageToColorEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageToColorEnableNV"); + try { MH_vkCmdSetCoverageToColorEnableNV.invokeExact(PFN_vkCmdSetCoverageToColorEnableNV, commandBuffer, coverageToColorEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageToColorEnableNV", e); } + } + + public void CmdSetCoverageToColorLocationNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int coverageToColorLocation) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageToColorLocationNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageToColorLocationNV"); + try { MH_vkCmdSetCoverageToColorLocationNV.invokeExact(PFN_vkCmdSetCoverageToColorLocationNV, commandBuffer, coverageToColorLocation); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageToColorLocationNV", e); } + } + + public void CmdSetCoverageModulationModeNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCoverageModulationModeNV") int coverageModulationMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageModulationModeNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageModulationModeNV"); + try { MH_vkCmdSetCoverageModulationModeNV.invokeExact(PFN_vkCmdSetCoverageModulationModeNV, commandBuffer, coverageModulationMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageModulationModeNV", e); } + } + + public void CmdSetCoverageModulationTableEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int coverageModulationTableEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageModulationTableEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageModulationTableEnableNV"); + try { MH_vkCmdSetCoverageModulationTableEnableNV.invokeExact(PFN_vkCmdSetCoverageModulationTableEnableNV, commandBuffer, coverageModulationTableEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageModulationTableEnableNV", e); } + } + + public void CmdSetCoverageModulationTableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int coverageModulationTableCount, @CType("const float *") MemorySegment pCoverageModulationTable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageModulationTableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageModulationTableNV"); + try { MH_vkCmdSetCoverageModulationTableNV.invokeExact(PFN_vkCmdSetCoverageModulationTableNV, commandBuffer, coverageModulationTableCount, pCoverageModulationTable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageModulationTableNV", e); } + } + + public void CmdSetShadingRateImageEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int shadingRateImageEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetShadingRateImageEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetShadingRateImageEnableNV"); + try { MH_vkCmdSetShadingRateImageEnableNV.invokeExact(PFN_vkCmdSetShadingRateImageEnableNV, commandBuffer, shadingRateImageEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetShadingRateImageEnableNV", e); } + } + + public void CmdSetRepresentativeFragmentTestEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int representativeFragmentTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRepresentativeFragmentTestEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRepresentativeFragmentTestEnableNV"); + try { MH_vkCmdSetRepresentativeFragmentTestEnableNV.invokeExact(PFN_vkCmdSetRepresentativeFragmentTestEnableNV, commandBuffer, representativeFragmentTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRepresentativeFragmentTestEnableNV", e); } + } + + public void CmdSetCoverageReductionModeNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCoverageReductionModeNV") int coverageReductionMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageReductionModeNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageReductionModeNV"); + try { MH_vkCmdSetCoverageReductionModeNV.invokeExact(PFN_vkCmdSetCoverageReductionModeNV, commandBuffer, coverageReductionMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageReductionModeNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExternalMemoryAcquireUnmodified.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExternalMemoryAcquireUnmodified.java new file mode 100644 index 00000000..98e084c8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExternalMemoryAcquireUnmodified.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTExternalMemoryAcquireUnmodified { + public static final int VK_EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_SPEC_VERSION = 1; + public static final String VK_EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXTENSION_NAME = "VK_EXT_external_memory_acquire_unmodified"; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT = 1000453000; + + public VKEXTExternalMemoryAcquireUnmodified(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExternalMemoryDmaBuf.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExternalMemoryDmaBuf.java new file mode 100644 index 00000000..24398d2f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExternalMemoryDmaBuf.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTExternalMemoryDmaBuf { + public static final int VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION = 1; + public static final String VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME = "VK_EXT_external_memory_dma_buf"; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT = 0x00000200; + + public VKEXTExternalMemoryDmaBuf(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExternalMemoryHost.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExternalMemoryHost.java new file mode 100644 index 00000000..5ced35b6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTExternalMemoryHost.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTExternalMemoryHost { + public static final int VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION = 1; + public static final String VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME = "VK_EXT_external_memory_host"; + public static final int VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000; + public static final int VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT = 0x00000080; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100; + public static final MethodHandle MH_vkGetMemoryHostPointerPropertiesEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetMemoryHostPointerPropertiesEXT; + + public VKEXTExternalMemoryHost(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetMemoryHostPointerPropertiesEXT = func.invoke(device, "vkGetMemoryHostPointerPropertiesEXT"); + } + + public @CType("VkResult") int GetMemoryHostPointerPropertiesEXT(@CType("VkDevice") MemorySegment device, @CType("VkExternalMemoryHandleTypeFlagBits") int handleType, @CType("const void *") MemorySegment pHostPointer, @CType("VkMemoryHostPointerPropertiesEXT *") MemorySegment pMemoryHostPointerProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetMemoryHostPointerPropertiesEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetMemoryHostPointerPropertiesEXT"); + try { return (int) MH_vkGetMemoryHostPointerPropertiesEXT.invokeExact(PFN_vkGetMemoryHostPointerPropertiesEXT, device, handleType, pHostPointer, pMemoryHostPointerProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMemoryHostPointerPropertiesEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFilterCubic.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFilterCubic.java new file mode 100644 index 00000000..4546144c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFilterCubic.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTFilterCubic { + public static final int VK_EXT_FILTER_CUBIC_SPEC_VERSION = 3; + public static final String VK_EXT_FILTER_CUBIC_EXTENSION_NAME = "VK_EXT_filter_cubic"; + public static final int VK_FILTER_CUBIC_EXT = 1000170000; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 0x00002000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT = 1000170000; + public static final int VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001; + + public VKEXTFilterCubic(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFragmentDensityMap.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFragmentDensityMap.java new file mode 100644 index 00000000..9ba9fbcc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFragmentDensityMap.java @@ -0,0 +1,49 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.ext.VKEXTFragmentDensityMap.*; +public class VKEXTFragmentDensityMap { + public static final int VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION = 2; + public static final String VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME = "VK_EXT_fragment_density_map"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT = 1000218000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT = 1000218001; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT = 1000218002; + public static final int VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT = 0x00004000; + public static final int VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000; + public static final int VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000; + public static final int VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000; + public static final int VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200; + public static final int VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT = 0x00000001; + public static final int VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000; + public static final int VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT = 0x00000001; + public static final int VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT = 0x00000002; + public static final long VK_FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000L; + public static final int VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000; + public static final int VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT = 1000218007; + public static final int VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT; + + public VKEXTFragmentDensityMap(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFragmentDensityMap2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFragmentDensityMap2.java new file mode 100644 index 00000000..839208ba --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFragmentDensityMap2.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTFragmentDensityMap2 { + public static final int VK_EXT_FRAGMENT_DENSITY_MAP_2_SPEC_VERSION = 1; + public static final String VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME = "VK_EXT_fragment_density_map2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT = 1000332000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT = 1000332001; + public static final int VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT = 0x00000002; + + public VKEXTFragmentDensityMap2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFragmentShaderInterlock.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFragmentShaderInterlock.java new file mode 100644 index 00000000..b781a016 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFragmentShaderInterlock.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTFragmentShaderInterlock { + public static final int VK_EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION = 1; + public static final String VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME = "VK_EXT_fragment_shader_interlock"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT = 1000251000; + + public VKEXTFragmentShaderInterlock(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFrameBoundary.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFrameBoundary.java new file mode 100644 index 00000000..13cd8ced --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFrameBoundary.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTFrameBoundary { + public static final int VK_FRAME_BOUNDARY_FRAME_END_BIT_EXT = 0x00000001; + public static final int VK_EXT_FRAME_BOUNDARY_SPEC_VERSION = 1; + public static final String VK_EXT_FRAME_BOUNDARY_EXTENSION_NAME = "VK_EXT_frame_boundary"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT = 1000375000; + public static final int VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT = 1000375001; + + public VKEXTFrameBoundary(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFullScreenExclusive.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFullScreenExclusive.java new file mode 100644 index 00000000..39b2e5f0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTFullScreenExclusive.java @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTFullScreenExclusive { + public static final int VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0; + public static final int VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1; + public static final int VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2; + public static final int VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3; + public static final int VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION = 4; + public static final String VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME = "VK_EXT_full_screen_exclusive"; + public static final int VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT = 1000255000; + public static final int VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002; + public static final int VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = -1000255000; + public static final int VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001; + public static final MethodHandle MH_vkGetPhysicalDeviceSurfacePresentModes2EXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkAcquireFullScreenExclusiveModeEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkReleaseFullScreenExclusiveModeEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceGroupSurfacePresentModes2EXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT; + public final MemorySegment PFN_vkAcquireFullScreenExclusiveModeEXT; + public final MemorySegment PFN_vkReleaseFullScreenExclusiveModeEXT; + public final MemorySegment PFN_vkGetDeviceGroupSurfacePresentModes2EXT; + + public VKEXTFullScreenExclusive(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT = func.invoke(device, "vkGetPhysicalDeviceSurfacePresentModes2EXT"); + PFN_vkAcquireFullScreenExclusiveModeEXT = func.invoke(device, "vkAcquireFullScreenExclusiveModeEXT"); + PFN_vkReleaseFullScreenExclusiveModeEXT = func.invoke(device, "vkReleaseFullScreenExclusiveModeEXT"); + PFN_vkGetDeviceGroupSurfacePresentModes2EXT = func.invoke(device, "vkGetDeviceGroupSurfacePresentModes2EXT"); + } + + public @CType("VkResult") int GetPhysicalDeviceSurfacePresentModes2EXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceSurfaceInfo2KHR *") MemorySegment pSurfaceInfo, @CType("uint32_t *") MemorySegment pPresentModeCount, @CType("VkPresentModeKHR *") MemorySegment pPresentModes) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSurfacePresentModes2EXT"); + try { return (int) MH_vkGetPhysicalDeviceSurfacePresentModes2EXT.invokeExact(PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT, physicalDevice, pSurfaceInfo, pPresentModeCount, pPresentModes); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSurfacePresentModes2EXT", e); } + } + + public @CType("VkResult") int AcquireFullScreenExclusiveModeEXT(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain) { + if (Unmarshal.isNullPointer(PFN_vkAcquireFullScreenExclusiveModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkAcquireFullScreenExclusiveModeEXT"); + try { return (int) MH_vkAcquireFullScreenExclusiveModeEXT.invokeExact(PFN_vkAcquireFullScreenExclusiveModeEXT, device, swapchain); } + catch (Throwable e) { throw new RuntimeException("error in vkAcquireFullScreenExclusiveModeEXT", e); } + } + + public @CType("VkResult") int ReleaseFullScreenExclusiveModeEXT(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain) { + if (Unmarshal.isNullPointer(PFN_vkReleaseFullScreenExclusiveModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkReleaseFullScreenExclusiveModeEXT"); + try { return (int) MH_vkReleaseFullScreenExclusiveModeEXT.invokeExact(PFN_vkReleaseFullScreenExclusiveModeEXT, device, swapchain); } + catch (Throwable e) { throw new RuntimeException("error in vkReleaseFullScreenExclusiveModeEXT", e); } + } + + public @CType("VkResult") int GetDeviceGroupSurfacePresentModes2EXT(@CType("VkDevice") MemorySegment device, @CType("const VkPhysicalDeviceSurfaceInfo2KHR *") MemorySegment pSurfaceInfo, @CType("VkDeviceGroupPresentModeFlagsKHR *") MemorySegment pModes) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceGroupSurfacePresentModes2EXT)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceGroupSurfacePresentModes2EXT"); + try { return (int) MH_vkGetDeviceGroupSurfacePresentModes2EXT.invokeExact(PFN_vkGetDeviceGroupSurfacePresentModes2EXT, device, pSurfaceInfo, pModes); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceGroupSurfacePresentModes2EXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTGlobalPriority.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTGlobalPriority.java new file mode 100644 index 00000000..8fac1ba6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTGlobalPriority.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKEXTGlobalPriority { + public static final int VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION = 2; + public static final String VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_EXT_global_priority"; + public static final int VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO; + public static final int VK_ERROR_NOT_PERMITTED_EXT = VK_ERROR_NOT_PERMITTED; + public static final int VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW; + public static final int VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM; + public static final int VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = VK_QUEUE_GLOBAL_PRIORITY_HIGH; + public static final int VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME; + + public VKEXTGlobalPriority(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTGlobalPriorityQuery.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTGlobalPriorityQuery.java new file mode 100644 index 00000000..0dc9b805 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTGlobalPriorityQuery.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKEXTGlobalPriorityQuery { + public static final int VK_EXT_GLOBAL_PRIORITY_QUERY_SPEC_VERSION = 1; + public static final String VK_EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME = "VK_EXT_global_priority_query"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES; + public static final int VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES; + public static final int VK_MAX_GLOBAL_PRIORITY_SIZE_EXT = VK_MAX_GLOBAL_PRIORITY_SIZE; + + public VKEXTGlobalPriorityQuery(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTGraphicsPipelineLibrary.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTGraphicsPipelineLibrary.java new file mode 100644 index 00000000..067db11b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTGraphicsPipelineLibrary.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTGraphicsPipelineLibrary { + public static final int VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT = 0x00000001; + public static final int VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT = 0x00000002; + public static final int VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT = 0x00000004; + public static final int VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT = 0x00000008; + public static final int VK_EXT_GRAPHICS_PIPELINE_LIBRARY_SPEC_VERSION = 1; + public static final String VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME = "VK_EXT_graphics_pipeline_library"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT = 1000320000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT = 1000320001; + public static final int VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT = 1000320002; + public static final int VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000; + public static final int VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400; + public static final int VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT = 0x00000002; + + public VKEXTGraphicsPipelineLibrary(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHdrMetadata.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHdrMetadata.java new file mode 100644 index 00000000..930f1411 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHdrMetadata.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTHdrMetadata { + public static final int VK_EXT_HDR_METADATA_SPEC_VERSION = 3; + public static final String VK_EXT_HDR_METADATA_EXTENSION_NAME = "VK_EXT_hdr_metadata"; + public static final int VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000; + public static final MethodHandle MH_vkSetHdrMetadataEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkSetHdrMetadataEXT; + + public VKEXTHdrMetadata(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkSetHdrMetadataEXT = func.invoke(device, "vkSetHdrMetadataEXT"); + } + + public void SetHdrMetadataEXT(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int swapchainCount, @CType("const VkSwapchainKHR *") MemorySegment pSwapchains, @CType("const VkHdrMetadataEXT *") MemorySegment pMetadata) { + if (Unmarshal.isNullPointer(PFN_vkSetHdrMetadataEXT)) throw new SymbolNotFoundError("Symbol not found: vkSetHdrMetadataEXT"); + try { MH_vkSetHdrMetadataEXT.invokeExact(PFN_vkSetHdrMetadataEXT, device, swapchainCount, pSwapchains, pMetadata); } + catch (Throwable e) { throw new RuntimeException("error in vkSetHdrMetadataEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHeadlessSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHeadlessSurface.java new file mode 100644 index 00000000..492fceb8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHeadlessSurface.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTHeadlessSurface { + public static final int VK_EXT_HEADLESS_SURFACE_SPEC_VERSION = 1; + public static final String VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME = "VK_EXT_headless_surface"; + public static final int VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000; + public static final MethodHandle MH_vkCreateHeadlessSurfaceEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateHeadlessSurfaceEXT; + + public VKEXTHeadlessSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateHeadlessSurfaceEXT = func.invoke(instance, "vkCreateHeadlessSurfaceEXT"); + } + + public @CType("VkResult") int CreateHeadlessSurfaceEXT(@CType("VkInstance") MemorySegment instance, @CType("const VkHeadlessSurfaceCreateInfoEXT *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateHeadlessSurfaceEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreateHeadlessSurfaceEXT"); + try { return (int) MH_vkCreateHeadlessSurfaceEXT.invokeExact(PFN_vkCreateHeadlessSurfaceEXT, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateHeadlessSurfaceEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHostImageCopy.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHostImageCopy.java new file mode 100644 index 00000000..af1ad0c2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHostImageCopy.java @@ -0,0 +1,91 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKEXTHostImageCopy { + public static final int VK_EXT_HOST_IMAGE_COPY_SPEC_VERSION = 1; + public static final String VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME = "VK_EXT_host_image_copy"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT = VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY; + public static final int VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT = VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY; + public static final int VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO; + public static final int VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO; + public static final int VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT = VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO; + public static final int VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO; + public static final int VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE; + public static final int VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT = VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY; + public static final int VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT = VK_IMAGE_USAGE_HOST_TRANSFER_BIT; + public static final long VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT = VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT; + public static final int VK_HOST_IMAGE_COPY_MEMCPY_EXT = VK_HOST_IMAGE_COPY_MEMCPY; + public static final MethodHandle MH_vkCopyMemoryToImageEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyImageToMemoryEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyImageToImageEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkTransitionImageLayoutEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageSubresourceLayout2EXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCopyMemoryToImageEXT; + public final MemorySegment PFN_vkCopyImageToMemoryEXT; + public final MemorySegment PFN_vkCopyImageToImageEXT; + public final MemorySegment PFN_vkTransitionImageLayoutEXT; + public final MemorySegment PFN_vkGetImageSubresourceLayout2EXT; + + public VKEXTHostImageCopy(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCopyMemoryToImageEXT = func.invoke(device, "vkCopyMemoryToImageEXT", "vkCopyMemoryToImage"); + PFN_vkCopyImageToMemoryEXT = func.invoke(device, "vkCopyImageToMemoryEXT", "vkCopyImageToMemory"); + PFN_vkCopyImageToImageEXT = func.invoke(device, "vkCopyImageToImageEXT", "vkCopyImageToImage"); + PFN_vkTransitionImageLayoutEXT = func.invoke(device, "vkTransitionImageLayoutEXT", "vkTransitionImageLayout"); + PFN_vkGetImageSubresourceLayout2EXT = func.invoke(device, "vkGetImageSubresourceLayout2EXT", "vkGetImageSubresourceLayout2"); + } + + public @CType("VkResult") int CopyMemoryToImageEXT(@CType("VkDevice") MemorySegment device, @CType("const VkCopyMemoryToImageInfo *") MemorySegment pCopyMemoryToImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyMemoryToImageEXT)) throw new SymbolNotFoundError("Symbol not found: vkCopyMemoryToImageEXT"); + try { return (int) MH_vkCopyMemoryToImageEXT.invokeExact(PFN_vkCopyMemoryToImageEXT, device, pCopyMemoryToImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyMemoryToImageEXT", e); } + } + + public @CType("VkResult") int CopyImageToMemoryEXT(@CType("VkDevice") MemorySegment device, @CType("const VkCopyImageToMemoryInfo *") MemorySegment pCopyImageToMemoryInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyImageToMemoryEXT)) throw new SymbolNotFoundError("Symbol not found: vkCopyImageToMemoryEXT"); + try { return (int) MH_vkCopyImageToMemoryEXT.invokeExact(PFN_vkCopyImageToMemoryEXT, device, pCopyImageToMemoryInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyImageToMemoryEXT", e); } + } + + public @CType("VkResult") int CopyImageToImageEXT(@CType("VkDevice") MemorySegment device, @CType("const VkCopyImageToImageInfo *") MemorySegment pCopyImageToImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyImageToImageEXT)) throw new SymbolNotFoundError("Symbol not found: vkCopyImageToImageEXT"); + try { return (int) MH_vkCopyImageToImageEXT.invokeExact(PFN_vkCopyImageToImageEXT, device, pCopyImageToImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyImageToImageEXT", e); } + } + + public @CType("VkResult") int TransitionImageLayoutEXT(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int transitionCount, @CType("const VkHostImageLayoutTransitionInfo *") MemorySegment pTransitions) { + if (Unmarshal.isNullPointer(PFN_vkTransitionImageLayoutEXT)) throw new SymbolNotFoundError("Symbol not found: vkTransitionImageLayoutEXT"); + try { return (int) MH_vkTransitionImageLayoutEXT.invokeExact(PFN_vkTransitionImageLayoutEXT, device, transitionCount, pTransitions); } + catch (Throwable e) { throw new RuntimeException("error in vkTransitionImageLayoutEXT", e); } + } + + public void GetImageSubresourceLayout2EXT(@CType("VkDevice") MemorySegment device, @CType("VkImage") MemorySegment image, @CType("const VkImageSubresource2 *") MemorySegment pSubresource, @CType("VkSubresourceLayout2 *") MemorySegment pLayout) { + if (Unmarshal.isNullPointer(PFN_vkGetImageSubresourceLayout2EXT)) throw new SymbolNotFoundError("Symbol not found: vkGetImageSubresourceLayout2EXT"); + try { MH_vkGetImageSubresourceLayout2EXT.invokeExact(PFN_vkGetImageSubresourceLayout2EXT, device, image, pSubresource, pLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageSubresourceLayout2EXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHostQueryReset.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHostQueryReset.java new file mode 100644 index 00000000..224a56db --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTHostQueryReset.java @@ -0,0 +1,43 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKEXTHostQueryReset { + public static final int VK_EXT_HOST_QUERY_RESET_SPEC_VERSION = 1; + public static final String VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME = "VK_EXT_host_query_reset"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES; + public static final MethodHandle MH_vkResetQueryPoolEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkResetQueryPoolEXT; + + public VKEXTHostQueryReset(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkResetQueryPoolEXT = func.invoke(device, "vkResetQueryPoolEXT", "vkResetQueryPool"); + } + + public void ResetQueryPoolEXT(@CType("VkDevice") MemorySegment device, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int firstQuery, @CType("uint32_t") int queryCount) { + if (Unmarshal.isNullPointer(PFN_vkResetQueryPoolEXT)) throw new SymbolNotFoundError("Symbol not found: vkResetQueryPoolEXT"); + try { MH_vkResetQueryPoolEXT.invokeExact(PFN_vkResetQueryPoolEXT, device, queryPool, firstQuery, queryCount); } + catch (Throwable e) { throw new RuntimeException("error in vkResetQueryPoolEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImage2dViewOf3d.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImage2dViewOf3d.java new file mode 100644 index 00000000..a8ea421b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImage2dViewOf3d.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTImage2dViewOf3d { + public static final int VK_EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION = 1; + public static final String VK_EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME = "VK_EXT_image_2d_view_of_3d"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT = 1000393000; + public static final int VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000; + + public VKEXTImage2dViewOf3d(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageCompressionControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageCompressionControl.java new file mode 100644 index 00000000..4c292b21 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageCompressionControl.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKEXTImageCompressionControl { + public static final int VK_IMAGE_COMPRESSION_DEFAULT_EXT = 0; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT = 0x00000001; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT = 0x00000002; + public static final int VK_IMAGE_COMPRESSION_DISABLED_EXT = 0x00000004; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT = 0; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT = 0x00000001; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT = 0x00000002; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT = 0x00000004; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT = 0x00000008; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT = 0x00000010; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT = 0x00000020; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT = 0x00000040; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT = 0x00000080; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT = 0x00000100; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT = 0x00000200; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT = 0x00000400; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT = 0x00000800; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT = 0x00001000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT = 0x00002000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT = 0x00004000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT = 0x00008000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT = 0x00010000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT = 0x00020000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT = 0x00040000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT = 0x00080000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT = 0x00100000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT = 0x00200000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT = 0x00400000; + public static final int VK_IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT = 0x00800000; + public static final int VK_EXT_IMAGE_COMPRESSION_CONTROL_SPEC_VERSION = 1; + public static final String VK_EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME = "VK_EXT_image_compression_control"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT = 1000338000; + public static final int VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT = 1000338001; + public static final int VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT = 1000338004; + public static final int VK_ERROR_COMPRESSION_EXHAUSTED_EXT = -1000338000; + public static final int VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2; + public static final int VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2; + public static final MethodHandle MH_vkGetImageSubresourceLayout2EXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetImageSubresourceLayout2EXT; + + public VKEXTImageCompressionControl(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetImageSubresourceLayout2EXT = func.invoke(device, "vkGetImageSubresourceLayout2EXT", "vkGetImageSubresourceLayout2"); + } + + public void GetImageSubresourceLayout2EXT(@CType("VkDevice") MemorySegment device, @CType("VkImage") MemorySegment image, @CType("const VkImageSubresource2 *") MemorySegment pSubresource, @CType("VkSubresourceLayout2 *") MemorySegment pLayout) { + if (Unmarshal.isNullPointer(PFN_vkGetImageSubresourceLayout2EXT)) throw new SymbolNotFoundError("Symbol not found: vkGetImageSubresourceLayout2EXT"); + try { MH_vkGetImageSubresourceLayout2EXT.invokeExact(PFN_vkGetImageSubresourceLayout2EXT, device, image, pSubresource, pLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageSubresourceLayout2EXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageCompressionControlSwapchain.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageCompressionControlSwapchain.java new file mode 100644 index 00000000..57d9cc8a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageCompressionControlSwapchain.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTImageCompressionControlSwapchain { + public static final int VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_SPEC_VERSION = 1; + public static final String VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME = "VK_EXT_image_compression_control_swapchain"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT = 1000437000; + + public VKEXTImageCompressionControlSwapchain(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageDrmFormatModifier.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageDrmFormatModifier.java new file mode 100644 index 00000000..97d7e4de --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageDrmFormatModifier.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTImageDrmFormatModifier { + public static final int VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION = 2; + public static final String VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME = "VK_EXT_image_drm_format_modifier"; + public static final int VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = -1000158000; + public static final int VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT = 1000158000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT = 1000158002; + public static final int VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003; + public static final int VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT = 1000158004; + public static final int VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005; + public static final int VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = 1000158000; + public static final int VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT = 0x00000080; + public static final int VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT = 0x00000100; + public static final int VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT = 0x00000200; + public static final int VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT = 0x00000400; + public static final int VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT = 1000158006; + public static final MethodHandle MH_vkGetImageDrmFormatModifierPropertiesEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetImageDrmFormatModifierPropertiesEXT; + + public VKEXTImageDrmFormatModifier(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetImageDrmFormatModifierPropertiesEXT = func.invoke(device, "vkGetImageDrmFormatModifierPropertiesEXT"); + } + + public @CType("VkResult") int GetImageDrmFormatModifierPropertiesEXT(@CType("VkDevice") MemorySegment device, @CType("VkImage") MemorySegment image, @CType("VkImageDrmFormatModifierPropertiesEXT *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetImageDrmFormatModifierPropertiesEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetImageDrmFormatModifierPropertiesEXT"); + try { return (int) MH_vkGetImageDrmFormatModifierPropertiesEXT.invokeExact(PFN_vkGetImageDrmFormatModifierPropertiesEXT, device, image, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageDrmFormatModifierPropertiesEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageRobustness.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageRobustness.java new file mode 100644 index 00000000..2c57a724 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageRobustness.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTImageRobustness { + public static final int VK_EXT_IMAGE_ROBUSTNESS_SPEC_VERSION = 1; + public static final String VK_EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_image_robustness"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES; + + public VKEXTImageRobustness(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageSlicedViewOf3d.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageSlicedViewOf3d.java new file mode 100644 index 00000000..dffe4ece --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageSlicedViewOf3d.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTImageSlicedViewOf3d { + public static final int VK_EXT_IMAGE_SLICED_VIEW_OF_3D_SPEC_VERSION = 1; + public static final String VK_EXT_IMAGE_SLICED_VIEW_OF_3D_EXTENSION_NAME = "VK_EXT_image_sliced_view_of_3d"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT = 1000418000; + public static final int VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT = 1000418001; + public static final int VK_REMAINING_3D_SLICES_EXT = (~0); + + public VKEXTImageSlicedViewOf3d(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageViewMinLod.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageViewMinLod.java new file mode 100644 index 00000000..2c2573f9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTImageViewMinLod.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTImageViewMinLod { + public static final int VK_EXT_IMAGE_VIEW_MIN_LOD_SPEC_VERSION = 1; + public static final String VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME = "VK_EXT_image_view_min_lod"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT = 1000391000; + public static final int VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT = 1000391001; + + public VKEXTImageViewMinLod(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTIndexTypeUint8.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTIndexTypeUint8.java new file mode 100644 index 00000000..902de74e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTIndexTypeUint8.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKEXTIndexTypeUint8 { + public static final int VK_EXT_INDEX_TYPE_UINT8_SPEC_VERSION = 1; + public static final String VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME = "VK_EXT_index_type_uint8"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES; + public static final int VK_INDEX_TYPE_UINT8_EXT = VK_INDEX_TYPE_UINT8; + + public VKEXTIndexTypeUint8(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTInlineUniformBlock.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTInlineUniformBlock.java new file mode 100644 index 00000000..b561ff97 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTInlineUniformBlock.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTInlineUniformBlock { + public static final int VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION = 1; + public static final String VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME = "VK_EXT_inline_uniform_block"; + public static final int VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT = VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO; + + public VKEXTInlineUniformBlock(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLayerSettings.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLayerSettings.java new file mode 100644 index 00000000..64a962f0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLayerSettings.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTLayerSettings { + public static final int VK_LAYER_SETTING_TYPE_BOOL32_EXT = 0; + public static final int VK_LAYER_SETTING_TYPE_INT32_EXT = 1; + public static final int VK_LAYER_SETTING_TYPE_INT64_EXT = 2; + public static final int VK_LAYER_SETTING_TYPE_UINT32_EXT = 3; + public static final int VK_LAYER_SETTING_TYPE_UINT64_EXT = 4; + public static final int VK_LAYER_SETTING_TYPE_FLOAT32_EXT = 5; + public static final int VK_LAYER_SETTING_TYPE_FLOAT64_EXT = 6; + public static final int VK_LAYER_SETTING_TYPE_STRING_EXT = 7; + public static final int VK_EXT_LAYER_SETTINGS_SPEC_VERSION = 2; + public static final String VK_EXT_LAYER_SETTINGS_EXTENSION_NAME = "VK_EXT_layer_settings"; + public static final int VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT = 1000496000; + + public VKEXTLayerSettings(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLegacyDithering.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLegacyDithering.java new file mode 100644 index 00000000..28fdc52b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLegacyDithering.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTLegacyDithering { + public static final int VK_EXT_LEGACY_DITHERING_SPEC_VERSION = 2; + public static final String VK_EXT_LEGACY_DITHERING_EXTENSION_NAME = "VK_EXT_legacy_dithering"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT = 1000465000; + public static final int VK_SUBPASS_DESCRIPTION_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x00000080; + public static final int VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x00000008; + public static final long VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x400000000L; + + public VKEXTLegacyDithering(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLegacyVertexAttributes.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLegacyVertexAttributes.java new file mode 100644 index 00000000..c24b7af1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLegacyVertexAttributes.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTLegacyVertexAttributes { + public static final int VK_EXT_LEGACY_VERTEX_ATTRIBUTES_SPEC_VERSION = 1; + public static final String VK_EXT_LEGACY_VERTEX_ATTRIBUTES_EXTENSION_NAME = "VK_EXT_legacy_vertex_attributes"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT = 1000495000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT = 1000495001; + + public VKEXTLegacyVertexAttributes(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLineRasterization.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLineRasterization.java new file mode 100644 index 00000000..6cb89bbf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLineRasterization.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKEXTLineRasterization { + public static final int VK_EXT_LINE_RASTERIZATION_SPEC_VERSION = 1; + public static final String VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_line_rasterization"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES; + public static final int VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = VK_DYNAMIC_STATE_LINE_STIPPLE; + public static final int VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = VK_LINE_RASTERIZATION_MODE_DEFAULT; + public static final int VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR; + public static final int VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = VK_LINE_RASTERIZATION_MODE_BRESENHAM; + public static final int VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH; + public static final MethodHandle MH_vkCmdSetLineStippleEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_SHORT)); + public final MemorySegment PFN_vkCmdSetLineStippleEXT; + + public VKEXTLineRasterization(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetLineStippleEXT = func.invoke(device, "vkCmdSetLineStippleEXT", "vkCmdSetLineStipple"); + } + + public void CmdSetLineStippleEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int lineStippleFactor, @CType("uint16_t") short lineStipplePattern) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLineStippleEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLineStippleEXT"); + try { MH_vkCmdSetLineStippleEXT.invokeExact(PFN_vkCmdSetLineStippleEXT, commandBuffer, lineStippleFactor, lineStipplePattern); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLineStippleEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLoadStoreOpNone.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLoadStoreOpNone.java new file mode 100644 index 00000000..2eee7c7d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTLoadStoreOpNone.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +import static overrungl.vulkan.VK14.*; +public class VKEXTLoadStoreOpNone { + public static final int VK_EXT_LOAD_STORE_OP_NONE_SPEC_VERSION = 1; + public static final String VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME = "VK_EXT_load_store_op_none"; + public static final int VK_ATTACHMENT_LOAD_OP_NONE_EXT = VK_ATTACHMENT_LOAD_OP_NONE; + public static final int VK_ATTACHMENT_STORE_OP_NONE_EXT = VK_ATTACHMENT_STORE_OP_NONE; + + public VKEXTLoadStoreOpNone(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMapMemoryPlaced.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMapMemoryPlaced.java new file mode 100644 index 00000000..4aec7fa3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMapMemoryPlaced.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTMapMemoryPlaced { + public static final int VK_EXT_MAP_MEMORY_PLACED_SPEC_VERSION = 1; + public static final String VK_EXT_MAP_MEMORY_PLACED_EXTENSION_NAME = "VK_EXT_map_memory_placed"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT = 1000272000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT = 1000272001; + public static final int VK_STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT = 1000272002; + public static final int VK_MEMORY_MAP_PLACED_BIT_EXT = 0x00000001; + public static final int VK_MEMORY_UNMAP_RESERVE_BIT_EXT = 0x00000001; + + public VKEXTMapMemoryPlaced(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMemoryBudget.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMemoryBudget.java new file mode 100644 index 00000000..a4cec693 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMemoryBudget.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTMemoryBudget { + public static final int VK_EXT_MEMORY_BUDGET_SPEC_VERSION = 1; + public static final String VK_EXT_MEMORY_BUDGET_EXTENSION_NAME = "VK_EXT_memory_budget"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000; + + public VKEXTMemoryBudget(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMemoryPriority.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMemoryPriority.java new file mode 100644 index 00000000..a908258b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMemoryPriority.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTMemoryPriority { + public static final int VK_EXT_MEMORY_PRIORITY_SPEC_VERSION = 1; + public static final String VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME = "VK_EXT_memory_priority"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000; + public static final int VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001; + + public VKEXTMemoryPriority(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMeshShader.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMeshShader.java new file mode 100644 index 00000000..5f1942d3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMeshShader.java @@ -0,0 +1,71 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTMeshShader { + public static final int VK_EXT_MESH_SHADER_SPEC_VERSION = 1; + public static final String VK_EXT_MESH_SHADER_EXTENSION_NAME = "VK_EXT_mesh_shader"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT = 1000328000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT = 1000328001; + public static final int VK_SHADER_STAGE_TASK_BIT_EXT = 0x00000040; + public static final int VK_SHADER_STAGE_MESH_BIT_EXT = 0x00000080; + public static final int VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT = 0x00080000; + public static final int VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT = 0x00100000; + public static final int VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT = 1000328000; + public static final int VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT = 0x00000800; + public static final int VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT = 0x00001000; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV = 1000328000; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT = 1000328000; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT = 1000328001; + public static final MethodHandle MH_vkCmdDrawMeshTasksEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawMeshTasksIndirectEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawMeshTasksIndirectCountEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdDrawMeshTasksEXT; + public final MemorySegment PFN_vkCmdDrawMeshTasksIndirectEXT; + public final MemorySegment PFN_vkCmdDrawMeshTasksIndirectCountEXT; + + public VKEXTMeshShader(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdDrawMeshTasksEXT = func.invoke(device, "vkCmdDrawMeshTasksEXT"); + PFN_vkCmdDrawMeshTasksIndirectEXT = func.invoke(device, "vkCmdDrawMeshTasksIndirectEXT"); + PFN_vkCmdDrawMeshTasksIndirectCountEXT = func.invoke(device, "vkCmdDrawMeshTasksIndirectCountEXT"); + } + + public void CmdDrawMeshTasksEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int groupCountX, @CType("uint32_t") int groupCountY, @CType("uint32_t") int groupCountZ) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawMeshTasksEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawMeshTasksEXT"); + try { MH_vkCmdDrawMeshTasksEXT.invokeExact(PFN_vkCmdDrawMeshTasksEXT, commandBuffer, groupCountX, groupCountY, groupCountZ); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawMeshTasksEXT", e); } + } + + public void CmdDrawMeshTasksIndirectEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("uint32_t") int drawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawMeshTasksIndirectEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawMeshTasksIndirectEXT"); + try { MH_vkCmdDrawMeshTasksIndirectEXT.invokeExact(PFN_vkCmdDrawMeshTasksIndirectEXT, commandBuffer, buffer, offset, drawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawMeshTasksIndirectEXT", e); } + } + + public void CmdDrawMeshTasksIndirectCountEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkBuffer") MemorySegment countBuffer, @CType("VkDeviceSize") long countBufferOffset, @CType("uint32_t") int maxDrawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawMeshTasksIndirectCountEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawMeshTasksIndirectCountEXT"); + try { MH_vkCmdDrawMeshTasksIndirectCountEXT.invokeExact(PFN_vkCmdDrawMeshTasksIndirectCountEXT, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawMeshTasksIndirectCountEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMetalObjects.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMetalObjects.java new file mode 100644 index 00000000..d19743ce --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMetalObjects.java @@ -0,0 +1,59 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTMetalObjects { + public static final int VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001; + public static final int VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002; + public static final int VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004; + public static final int VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008; + public static final int VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010; + public static final int VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020; + public static final int VK_EXT_METAL_OBJECTS_SPEC_VERSION = 2; + public static final String VK_EXT_METAL_OBJECTS_EXTENSION_NAME = "VK_EXT_metal_objects"; + public static final int VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT = 1000311000; + public static final int VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT = 1000311001; + public static final int VK_STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT = 1000311002; + public static final int VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT = 1000311003; + public static final int VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT = 1000311004; + public static final int VK_STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT = 1000311005; + public static final int VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT = 1000311006; + public static final int VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT = 1000311007; + public static final int VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT = 1000311008; + public static final int VK_STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT = 1000311009; + public static final int VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311010; + public static final int VK_STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311011; + public static final MethodHandle MH_vkExportMetalObjectsEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkExportMetalObjectsEXT; + + public VKEXTMetalObjects(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkExportMetalObjectsEXT = func.invoke(device, "vkExportMetalObjectsEXT"); + } + + public void ExportMetalObjectsEXT(@CType("VkDevice") MemorySegment device, @CType("VkExportMetalObjectsInfoEXT *") MemorySegment pMetalObjectsInfo) { + if (Unmarshal.isNullPointer(PFN_vkExportMetalObjectsEXT)) throw new SymbolNotFoundError("Symbol not found: vkExportMetalObjectsEXT"); + try { MH_vkExportMetalObjectsEXT.invokeExact(PFN_vkExportMetalObjectsEXT, device, pMetalObjectsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkExportMetalObjectsEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMetalSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMetalSurface.java new file mode 100644 index 00000000..1409c538 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMetalSurface.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTMetalSurface { + public static final int VK_EXT_METAL_SURFACE_SPEC_VERSION = 1; + public static final String VK_EXT_METAL_SURFACE_EXTENSION_NAME = "VK_EXT_metal_surface"; + public static final int VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000; + public static final MethodHandle MH_vkCreateMetalSurfaceEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateMetalSurfaceEXT; + + public VKEXTMetalSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateMetalSurfaceEXT = func.invoke(instance, "vkCreateMetalSurfaceEXT"); + } + + public @CType("VkResult") int CreateMetalSurfaceEXT(@CType("VkInstance") MemorySegment instance, @CType("const VkMetalSurfaceCreateInfoEXT *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateMetalSurfaceEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreateMetalSurfaceEXT"); + try { return (int) MH_vkCreateMetalSurfaceEXT.invokeExact(PFN_vkCreateMetalSurfaceEXT, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateMetalSurfaceEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMultiDraw.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMultiDraw.java new file mode 100644 index 00000000..5089f9b3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMultiDraw.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTMultiDraw { + public static final int VK_EXT_MULTI_DRAW_SPEC_VERSION = 1; + public static final String VK_EXT_MULTI_DRAW_EXTENSION_NAME = "VK_EXT_multi_draw"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT = 1000392000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT = 1000392001; + public static final MethodHandle MH_vkCmdDrawMultiEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawMultiIndexedEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdDrawMultiEXT; + public final MemorySegment PFN_vkCmdDrawMultiIndexedEXT; + + public VKEXTMultiDraw(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdDrawMultiEXT = func.invoke(device, "vkCmdDrawMultiEXT"); + PFN_vkCmdDrawMultiIndexedEXT = func.invoke(device, "vkCmdDrawMultiIndexedEXT"); + } + + public void CmdDrawMultiEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int drawCount, @CType("const VkMultiDrawInfoEXT *") MemorySegment pVertexInfo, @CType("uint32_t") int instanceCount, @CType("uint32_t") int firstInstance, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawMultiEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawMultiEXT"); + try { MH_vkCmdDrawMultiEXT.invokeExact(PFN_vkCmdDrawMultiEXT, commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawMultiEXT", e); } + } + + public void CmdDrawMultiIndexedEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int drawCount, @CType("const VkMultiDrawIndexedInfoEXT *") MemorySegment pIndexInfo, @CType("uint32_t") int instanceCount, @CType("uint32_t") int firstInstance, @CType("uint32_t") int stride, @CType("const int32_t *") MemorySegment pVertexOffset) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawMultiIndexedEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawMultiIndexedEXT"); + try { MH_vkCmdDrawMultiIndexedEXT.invokeExact(PFN_vkCmdDrawMultiIndexedEXT, commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, stride, pVertexOffset); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawMultiIndexedEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMultisampledRenderToSingleSampled.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMultisampledRenderToSingleSampled.java new file mode 100644 index 00000000..ce5fc60c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMultisampledRenderToSingleSampled.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTMultisampledRenderToSingleSampled { + public static final int VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION = 1; + public static final String VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME = "VK_EXT_multisampled_render_to_single_sampled"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT = 1000376000; + public static final int VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT = 1000376001; + public static final int VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT = 1000376002; + public static final int VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00040000; + + public VKEXTMultisampledRenderToSingleSampled(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMutableDescriptorType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMutableDescriptorType.java new file mode 100644 index 00000000..cb979cfd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTMutableDescriptorType.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTMutableDescriptorType { + public static final int VK_EXT_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION = 1; + public static final String VK_EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME = "VK_EXT_mutable_descriptor_type"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT = 1000494000; + public static final int VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT = 1000494002; + public static final int VK_DESCRIPTOR_TYPE_MUTABLE_EXT = 1000494000; + public static final int VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT = 0x00000004; + public static final int VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT = 0x00000004; + + public VKEXTMutableDescriptorType(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTNestedCommandBuffer.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTNestedCommandBuffer.java new file mode 100644 index 00000000..b7993962 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTNestedCommandBuffer.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.khr.VKKHRMaintenance7.*; +public class VKEXTNestedCommandBuffer { + public static final int VK_EXT_NESTED_COMMAND_BUFFER_SPEC_VERSION = 1; + public static final String VK_EXT_NESTED_COMMAND_BUFFER_EXTENSION_NAME = "VK_EXT_nested_command_buffer"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT = 1000451000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT = 1000451001; + public static final int VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_EXT = VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR; + public static final int VK_RENDERING_CONTENTS_INLINE_BIT_EXT = VK_RENDERING_CONTENTS_INLINE_BIT_KHR; + + public VKEXTNestedCommandBuffer(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTNonSeamlessCubeMap.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTNonSeamlessCubeMap.java new file mode 100644 index 00000000..90843bfc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTNonSeamlessCubeMap.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTNonSeamlessCubeMap { + public static final int VK_EXT_NON_SEAMLESS_CUBE_MAP_SPEC_VERSION = 1; + public static final String VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME = "VK_EXT_non_seamless_cube_map"; + public static final int VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT = 0x00000004; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT = 1000422000; + + public VKEXTNonSeamlessCubeMap(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTOpacityMicromap.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTOpacityMicromap.java new file mode 100644 index 00000000..4b60d51d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTOpacityMicromap.java @@ -0,0 +1,198 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTOpacityMicromap { + public static final int VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT = 0; + public static final int VK_BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT = 0x00000001; + public static final int VK_BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT = 0x00000002; + public static final int VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT = 0x00000004; + public static final int VK_COPY_MICROMAP_MODE_CLONE_EXT = 0; + public static final int VK_COPY_MICROMAP_MODE_SERIALIZE_EXT = 1; + public static final int VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT = 2; + public static final int VK_COPY_MICROMAP_MODE_COMPACT_EXT = 3; + public static final int VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 0x00000001; + public static final int VK_BUILD_MICROMAP_MODE_BUILD_EXT = 0; + public static final int VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT = 1; + public static final int VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT = 2; + public static final int VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT = -1; + public static final int VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT = -2; + public static final int VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT = -3; + public static final int VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT = -4; + public static final int VK_EXT_OPACITY_MICROMAP_SPEC_VERSION = 2; + public static final String VK_EXT_OPACITY_MICROMAP_EXTENSION_NAME = "VK_EXT_opacity_micromap"; + public static final int VK_STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT = 1000396000; + public static final int VK_STRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXT = 1000396001; + public static final int VK_STRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT = 1000396002; + public static final int VK_STRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT = 1000396003; + public static final int VK_STRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT = 1000396004; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT = 1000396005; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT = 1000396006; + public static final int VK_STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT = 1000396007; + public static final int VK_STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXT = 1000396008; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT = 1000396009; + public static final long VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT = 0x40000000L; + public static final long VK_ACCESS_2_MICROMAP_READ_BIT_EXT = 0x100000000000L; + public static final long VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT = 0x200000000000L; + public static final int VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT = 1000396000; + public static final int VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT = 1000396001; + public static final int VK_OBJECT_TYPE_MICROMAP_EXT = 1000396000; + public static final int VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000; + public static final int VK_BUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT = 0x01000000; + public static final int VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000; + public static final int VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT = 0x00000010; + public static final int VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT = 0x00000020; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = 0x00000040; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = 0x00000080; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT = 0x00000100; + public static final MethodHandle MH_vkCreateMicromapEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyMicromapEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBuildMicromapsEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkBuildMicromapsEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyMicromapEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyMicromapToMemoryEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyMemoryToMicromapEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkWriteMicromapsPropertiesEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkCmdCopyMicromapEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyMicromapToMemoryEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyMemoryToMicromapEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdWriteMicromapsPropertiesEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkGetDeviceMicromapCompatibilityEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetMicromapBuildSizesEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateMicromapEXT; + public final MemorySegment PFN_vkDestroyMicromapEXT; + public final MemorySegment PFN_vkCmdBuildMicromapsEXT; + public final MemorySegment PFN_vkBuildMicromapsEXT; + public final MemorySegment PFN_vkCopyMicromapEXT; + public final MemorySegment PFN_vkCopyMicromapToMemoryEXT; + public final MemorySegment PFN_vkCopyMemoryToMicromapEXT; + public final MemorySegment PFN_vkWriteMicromapsPropertiesEXT; + public final MemorySegment PFN_vkCmdCopyMicromapEXT; + public final MemorySegment PFN_vkCmdCopyMicromapToMemoryEXT; + public final MemorySegment PFN_vkCmdCopyMemoryToMicromapEXT; + public final MemorySegment PFN_vkCmdWriteMicromapsPropertiesEXT; + public final MemorySegment PFN_vkGetDeviceMicromapCompatibilityEXT; + public final MemorySegment PFN_vkGetMicromapBuildSizesEXT; + + public VKEXTOpacityMicromap(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateMicromapEXT = func.invoke(device, "vkCreateMicromapEXT"); + PFN_vkDestroyMicromapEXT = func.invoke(device, "vkDestroyMicromapEXT"); + PFN_vkCmdBuildMicromapsEXT = func.invoke(device, "vkCmdBuildMicromapsEXT"); + PFN_vkBuildMicromapsEXT = func.invoke(device, "vkBuildMicromapsEXT"); + PFN_vkCopyMicromapEXT = func.invoke(device, "vkCopyMicromapEXT"); + PFN_vkCopyMicromapToMemoryEXT = func.invoke(device, "vkCopyMicromapToMemoryEXT"); + PFN_vkCopyMemoryToMicromapEXT = func.invoke(device, "vkCopyMemoryToMicromapEXT"); + PFN_vkWriteMicromapsPropertiesEXT = func.invoke(device, "vkWriteMicromapsPropertiesEXT"); + PFN_vkCmdCopyMicromapEXT = func.invoke(device, "vkCmdCopyMicromapEXT"); + PFN_vkCmdCopyMicromapToMemoryEXT = func.invoke(device, "vkCmdCopyMicromapToMemoryEXT"); + PFN_vkCmdCopyMemoryToMicromapEXT = func.invoke(device, "vkCmdCopyMemoryToMicromapEXT"); + PFN_vkCmdWriteMicromapsPropertiesEXT = func.invoke(device, "vkCmdWriteMicromapsPropertiesEXT"); + PFN_vkGetDeviceMicromapCompatibilityEXT = func.invoke(device, "vkGetDeviceMicromapCompatibilityEXT"); + PFN_vkGetMicromapBuildSizesEXT = func.invoke(device, "vkGetMicromapBuildSizesEXT"); + } + + public @CType("VkResult") int CreateMicromapEXT(@CType("VkDevice") MemorySegment device, @CType("const VkMicromapCreateInfoEXT *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkMicromapEXT *") MemorySegment pMicromap) { + if (Unmarshal.isNullPointer(PFN_vkCreateMicromapEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreateMicromapEXT"); + try { return (int) MH_vkCreateMicromapEXT.invokeExact(PFN_vkCreateMicromapEXT, device, pCreateInfo, pAllocator, pMicromap); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateMicromapEXT", e); } + } + + public void DestroyMicromapEXT(@CType("VkDevice") MemorySegment device, @CType("VkMicromapEXT") MemorySegment micromap, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyMicromapEXT)) throw new SymbolNotFoundError("Symbol not found: vkDestroyMicromapEXT"); + try { MH_vkDestroyMicromapEXT.invokeExact(PFN_vkDestroyMicromapEXT, device, micromap, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyMicromapEXT", e); } + } + + public void CmdBuildMicromapsEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int infoCount, @CType("const VkMicromapBuildInfoEXT *") MemorySegment pInfos) { + if (Unmarshal.isNullPointer(PFN_vkCmdBuildMicromapsEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBuildMicromapsEXT"); + try { MH_vkCmdBuildMicromapsEXT.invokeExact(PFN_vkCmdBuildMicromapsEXT, commandBuffer, infoCount, pInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBuildMicromapsEXT", e); } + } + + public @CType("VkResult") int BuildMicromapsEXT(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment deferredOperation, @CType("uint32_t") int infoCount, @CType("const VkMicromapBuildInfoEXT *") MemorySegment pInfos) { + if (Unmarshal.isNullPointer(PFN_vkBuildMicromapsEXT)) throw new SymbolNotFoundError("Symbol not found: vkBuildMicromapsEXT"); + try { return (int) MH_vkBuildMicromapsEXT.invokeExact(PFN_vkBuildMicromapsEXT, device, deferredOperation, infoCount, pInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkBuildMicromapsEXT", e); } + } + + public @CType("VkResult") int CopyMicromapEXT(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment deferredOperation, @CType("const VkCopyMicromapInfoEXT *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyMicromapEXT)) throw new SymbolNotFoundError("Symbol not found: vkCopyMicromapEXT"); + try { return (int) MH_vkCopyMicromapEXT.invokeExact(PFN_vkCopyMicromapEXT, device, deferredOperation, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyMicromapEXT", e); } + } + + public @CType("VkResult") int CopyMicromapToMemoryEXT(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment deferredOperation, @CType("const VkCopyMicromapToMemoryInfoEXT *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyMicromapToMemoryEXT)) throw new SymbolNotFoundError("Symbol not found: vkCopyMicromapToMemoryEXT"); + try { return (int) MH_vkCopyMicromapToMemoryEXT.invokeExact(PFN_vkCopyMicromapToMemoryEXT, device, deferredOperation, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyMicromapToMemoryEXT", e); } + } + + public @CType("VkResult") int CopyMemoryToMicromapEXT(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment deferredOperation, @CType("const VkCopyMemoryToMicromapInfoEXT *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyMemoryToMicromapEXT)) throw new SymbolNotFoundError("Symbol not found: vkCopyMemoryToMicromapEXT"); + try { return (int) MH_vkCopyMemoryToMicromapEXT.invokeExact(PFN_vkCopyMemoryToMicromapEXT, device, deferredOperation, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyMemoryToMicromapEXT", e); } + } + + public @CType("VkResult") int WriteMicromapsPropertiesEXT(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int micromapCount, @CType("const VkMicromapEXT *") MemorySegment pMicromaps, @CType("VkQueryType") int queryType, @CType("size_t") long dataSize, @CType("void *") MemorySegment pData, @CType("size_t") long stride) { + if (Unmarshal.isNullPointer(PFN_vkWriteMicromapsPropertiesEXT)) throw new SymbolNotFoundError("Symbol not found: vkWriteMicromapsPropertiesEXT"); + try { return (int) MH_vkWriteMicromapsPropertiesEXT.invokeExact(PFN_vkWriteMicromapsPropertiesEXT, device, micromapCount, pMicromaps, queryType, dataSize, pData, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkWriteMicromapsPropertiesEXT", e); } + } + + public void CmdCopyMicromapEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyMicromapInfoEXT *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyMicromapEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyMicromapEXT"); + try { MH_vkCmdCopyMicromapEXT.invokeExact(PFN_vkCmdCopyMicromapEXT, commandBuffer, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyMicromapEXT", e); } + } + + public void CmdCopyMicromapToMemoryEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyMicromapToMemoryInfoEXT *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyMicromapToMemoryEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyMicromapToMemoryEXT"); + try { MH_vkCmdCopyMicromapToMemoryEXT.invokeExact(PFN_vkCmdCopyMicromapToMemoryEXT, commandBuffer, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyMicromapToMemoryEXT", e); } + } + + public void CmdCopyMemoryToMicromapEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyMemoryToMicromapInfoEXT *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyMemoryToMicromapEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyMemoryToMicromapEXT"); + try { MH_vkCmdCopyMemoryToMicromapEXT.invokeExact(PFN_vkCmdCopyMemoryToMicromapEXT, commandBuffer, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyMemoryToMicromapEXT", e); } + } + + public void CmdWriteMicromapsPropertiesEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int micromapCount, @CType("const VkMicromapEXT *") MemorySegment pMicromaps, @CType("VkQueryType") int queryType, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int firstQuery) { + if (Unmarshal.isNullPointer(PFN_vkCmdWriteMicromapsPropertiesEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdWriteMicromapsPropertiesEXT"); + try { MH_vkCmdWriteMicromapsPropertiesEXT.invokeExact(PFN_vkCmdWriteMicromapsPropertiesEXT, commandBuffer, micromapCount, pMicromaps, queryType, queryPool, firstQuery); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWriteMicromapsPropertiesEXT", e); } + } + + public void GetDeviceMicromapCompatibilityEXT(@CType("VkDevice") MemorySegment device, @CType("const VkMicromapVersionInfoEXT *") MemorySegment pVersionInfo, @CType("VkAccelerationStructureCompatibilityKHR *") MemorySegment pCompatibility) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceMicromapCompatibilityEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceMicromapCompatibilityEXT"); + try { MH_vkGetDeviceMicromapCompatibilityEXT.invokeExact(PFN_vkGetDeviceMicromapCompatibilityEXT, device, pVersionInfo, pCompatibility); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceMicromapCompatibilityEXT", e); } + } + + public void GetMicromapBuildSizesEXT(@CType("VkDevice") MemorySegment device, @CType("VkAccelerationStructureBuildTypeKHR") int buildType, @CType("const VkMicromapBuildInfoEXT *") MemorySegment pBuildInfo, @CType("VkMicromapBuildSizesInfoEXT *") MemorySegment pSizeInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetMicromapBuildSizesEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetMicromapBuildSizesEXT"); + try { MH_vkGetMicromapBuildSizesEXT.invokeExact(PFN_vkGetMicromapBuildSizesEXT, device, buildType, pBuildInfo, pSizeInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMicromapBuildSizesEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPageableDeviceLocalMemory.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPageableDeviceLocalMemory.java new file mode 100644 index 00000000..c0c1ea81 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPageableDeviceLocalMemory.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTPageableDeviceLocalMemory { + public static final int VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_SPEC_VERSION = 1; + public static final String VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME = "VK_EXT_pageable_device_local_memory"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000; + public static final MethodHandle MH_vkSetDeviceMemoryPriorityEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_FLOAT)); + public final MemorySegment PFN_vkSetDeviceMemoryPriorityEXT; + + public VKEXTPageableDeviceLocalMemory(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkSetDeviceMemoryPriorityEXT = func.invoke(device, "vkSetDeviceMemoryPriorityEXT"); + } + + public void SetDeviceMemoryPriorityEXT(@CType("VkDevice") MemorySegment device, @CType("VkDeviceMemory") MemorySegment memory, float priority) { + if (Unmarshal.isNullPointer(PFN_vkSetDeviceMemoryPriorityEXT)) throw new SymbolNotFoundError("Symbol not found: vkSetDeviceMemoryPriorityEXT"); + try { MH_vkSetDeviceMemoryPriorityEXT.invokeExact(PFN_vkSetDeviceMemoryPriorityEXT, device, memory, priority); } + catch (Throwable e) { throw new RuntimeException("error in vkSetDeviceMemoryPriorityEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPciBusInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPciBusInfo.java new file mode 100644 index 00000000..f9ee91b4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPciBusInfo.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTPciBusInfo { + public static final int VK_EXT_PCI_BUS_INFO_SPEC_VERSION = 2; + public static final String VK_EXT_PCI_BUS_INFO_EXTENSION_NAME = "VK_EXT_pci_bus_info"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000; + + public VKEXTPciBusInfo(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPhysicalDeviceDrm.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPhysicalDeviceDrm.java new file mode 100644 index 00000000..3761c9e0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPhysicalDeviceDrm.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTPhysicalDeviceDrm { + public static final int VK_EXT_PHYSICAL_DEVICE_DRM_SPEC_VERSION = 1; + public static final String VK_EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME = "VK_EXT_physical_device_drm"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT = 1000353000; + + public VKEXTPhysicalDeviceDrm(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineCreationCacheControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineCreationCacheControl.java new file mode 100644 index 00000000..6ddde4b4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineCreationCacheControl.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTPipelineCreationCacheControl { + public static final int VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_SPEC_VERSION = 3; + public static final String VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME = "VK_EXT_pipeline_creation_cache_control"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES; + public static final int VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT; + public static final int VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT = VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT; + public static final int VK_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED; + public static final int VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED; + public static final int VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT; + + public VKEXTPipelineCreationCacheControl(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineCreationFeedback.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineCreationFeedback.java new file mode 100644 index 00000000..e18fd221 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineCreationFeedback.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTPipelineCreationFeedback { + public static final int VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION = 1; + public static final String VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME = "VK_EXT_pipeline_creation_feedback"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO; + public static final int VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT; + public static final int VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT; + public static final int VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT; + + public VKEXTPipelineCreationFeedback(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineLibraryGroupHandles.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineLibraryGroupHandles.java new file mode 100644 index 00000000..50c7b0ca --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineLibraryGroupHandles.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTPipelineLibraryGroupHandles { + public static final int VK_EXT_PIPELINE_LIBRARY_GROUP_HANDLES_SPEC_VERSION = 1; + public static final String VK_EXT_PIPELINE_LIBRARY_GROUP_HANDLES_EXTENSION_NAME = "VK_EXT_pipeline_library_group_handles"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT = 1000498000; + + public VKEXTPipelineLibraryGroupHandles(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineProperties.java new file mode 100644 index 00000000..17bc3cff --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineProperties.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.khr.VKKHRPipelineExecutableProperties.*; +public class VKEXTPipelineProperties { + public static final int VK_EXT_PIPELINE_PROPERTIES_SPEC_VERSION = 1; + public static final String VK_EXT_PIPELINE_PROPERTIES_EXTENSION_NAME = "VK_EXT_pipeline_properties"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT = 1000372000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT = 1000372001; + public static final int VK_STRUCTURE_TYPE_PIPELINE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR; + public static final MethodHandle MH_vkGetPipelinePropertiesEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPipelinePropertiesEXT; + + public VKEXTPipelineProperties(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPipelinePropertiesEXT = func.invoke(device, "vkGetPipelinePropertiesEXT"); + } + + public @CType("VkResult") int GetPipelinePropertiesEXT(@CType("VkDevice") MemorySegment device, @CType("const VkPipelineInfoEXT *") MemorySegment pPipelineInfo, @CType("VkBaseOutStructure *") MemorySegment pPipelineProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPipelinePropertiesEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetPipelinePropertiesEXT"); + try { return (int) MH_vkGetPipelinePropertiesEXT.invokeExact(PFN_vkGetPipelinePropertiesEXT, device, pPipelineInfo, pPipelineProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPipelinePropertiesEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineProtectedAccess.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineProtectedAccess.java new file mode 100644 index 00000000..495f22eb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineProtectedAccess.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKEXTPipelineProtectedAccess { + public static final int VK_EXT_PIPELINE_PROTECTED_ACCESS_SPEC_VERSION = 1; + public static final String VK_EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME = "VK_EXT_pipeline_protected_access"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES; + public static final int VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT = VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT; + public static final int VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT = VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT; + + public VKEXTPipelineProtectedAccess(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineRobustness.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineRobustness.java new file mode 100644 index 00000000..7b12f695 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPipelineRobustness.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKEXTPipelineRobustness { + public static final int VK_EXT_PIPELINE_ROBUSTNESS_SPEC_VERSION = 1; + public static final String VK_EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_pipeline_robustness"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES; + public static final int VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT; + public static final int VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED; + public static final int VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS; + public static final int VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2; + public static final int VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT; + public static final int VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED; + public static final int VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS; + public static final int VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2; + + public VKEXTPipelineRobustness(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPostDepthCoverage.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPostDepthCoverage.java new file mode 100644 index 00000000..3532d740 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPostDepthCoverage.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTPostDepthCoverage { + public static final int VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION = 1; + public static final String VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME = "VK_EXT_post_depth_coverage"; + + public VKEXTPostDepthCoverage(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPresentModeFifoLatestReady.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPresentModeFifoLatestReady.java new file mode 100644 index 00000000..f58ea813 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPresentModeFifoLatestReady.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTPresentModeFifoLatestReady { + public static final int VK_EXT_PRESENT_MODE_FIFO_LATEST_READY_SPEC_VERSION = 1; + public static final String VK_EXT_PRESENT_MODE_FIFO_LATEST_READY_EXTENSION_NAME = "VK_EXT_present_mode_fifo_latest_ready"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_EXT = 1000361000; + public static final int VK_PRESENT_MODE_FIFO_LATEST_READY_EXT = 1000361000; + + public VKEXTPresentModeFifoLatestReady(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPrimitiveTopologyListRestart.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPrimitiveTopologyListRestart.java new file mode 100644 index 00000000..78db03a6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPrimitiveTopologyListRestart.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTPrimitiveTopologyListRestart { + public static final int VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_SPEC_VERSION = 1; + public static final String VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME = "VK_EXT_primitive_topology_list_restart"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT = 1000356000; + + public VKEXTPrimitiveTopologyListRestart(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPrimitivesGeneratedQuery.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPrimitivesGeneratedQuery.java new file mode 100644 index 00000000..5bbf33c9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPrimitivesGeneratedQuery.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTPrimitivesGeneratedQuery { + public static final int VK_EXT_PRIMITIVES_GENERATED_QUERY_SPEC_VERSION = 1; + public static final String VK_EXT_PRIMITIVES_GENERATED_QUERY_EXTENSION_NAME = "VK_EXT_primitives_generated_query"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT = 1000382000; + public static final int VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT = 1000382000; + + public VKEXTPrimitivesGeneratedQuery(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPrivateData.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPrivateData.java new file mode 100644 index 00000000..6a85defa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTPrivateData.java @@ -0,0 +1,73 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTPrivateData { + public static final int VK_EXT_PRIVATE_DATA_SPEC_VERSION = 1; + public static final String VK_EXT_PRIVATE_DATA_EXTENSION_NAME = "VK_EXT_private_data"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES; + public static final int VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO; + public static final int VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT = VK_OBJECT_TYPE_PRIVATE_DATA_SLOT; + public static final MethodHandle MH_vkCreatePrivateDataSlotEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyPrivateDataSlotEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkSetPrivateDataEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkGetPrivateDataEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreatePrivateDataSlotEXT; + public final MemorySegment PFN_vkDestroyPrivateDataSlotEXT; + public final MemorySegment PFN_vkSetPrivateDataEXT; + public final MemorySegment PFN_vkGetPrivateDataEXT; + + public VKEXTPrivateData(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreatePrivateDataSlotEXT = func.invoke(device, "vkCreatePrivateDataSlotEXT", "vkCreatePrivateDataSlot"); + PFN_vkDestroyPrivateDataSlotEXT = func.invoke(device, "vkDestroyPrivateDataSlotEXT", "vkDestroyPrivateDataSlot"); + PFN_vkSetPrivateDataEXT = func.invoke(device, "vkSetPrivateDataEXT", "vkSetPrivateData"); + PFN_vkGetPrivateDataEXT = func.invoke(device, "vkGetPrivateDataEXT", "vkGetPrivateData"); + } + + public @CType("VkResult") int CreatePrivateDataSlotEXT(@CType("VkDevice") MemorySegment device, @CType("const VkPrivateDataSlotCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkPrivateDataSlot *") MemorySegment pPrivateDataSlot) { + if (Unmarshal.isNullPointer(PFN_vkCreatePrivateDataSlotEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreatePrivateDataSlotEXT"); + try { return (int) MH_vkCreatePrivateDataSlotEXT.invokeExact(PFN_vkCreatePrivateDataSlotEXT, device, pCreateInfo, pAllocator, pPrivateDataSlot); } + catch (Throwable e) { throw new RuntimeException("error in vkCreatePrivateDataSlotEXT", e); } + } + + public void DestroyPrivateDataSlotEXT(@CType("VkDevice") MemorySegment device, @CType("VkPrivateDataSlot") MemorySegment privateDataSlot, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyPrivateDataSlotEXT)) throw new SymbolNotFoundError("Symbol not found: vkDestroyPrivateDataSlotEXT"); + try { MH_vkDestroyPrivateDataSlotEXT.invokeExact(PFN_vkDestroyPrivateDataSlotEXT, device, privateDataSlot, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyPrivateDataSlotEXT", e); } + } + + public @CType("VkResult") int SetPrivateDataEXT(@CType("VkDevice") MemorySegment device, @CType("VkObjectType") int objectType, @CType("uint64_t") long objectHandle, @CType("VkPrivateDataSlot") MemorySegment privateDataSlot, @CType("uint64_t") long data) { + if (Unmarshal.isNullPointer(PFN_vkSetPrivateDataEXT)) throw new SymbolNotFoundError("Symbol not found: vkSetPrivateDataEXT"); + try { return (int) MH_vkSetPrivateDataEXT.invokeExact(PFN_vkSetPrivateDataEXT, device, objectType, objectHandle, privateDataSlot, data); } + catch (Throwable e) { throw new RuntimeException("error in vkSetPrivateDataEXT", e); } + } + + public void GetPrivateDataEXT(@CType("VkDevice") MemorySegment device, @CType("VkObjectType") int objectType, @CType("uint64_t") long objectHandle, @CType("VkPrivateDataSlot") MemorySegment privateDataSlot, @CType("uint64_t *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetPrivateDataEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetPrivateDataEXT"); + try { MH_vkGetPrivateDataEXT.invokeExact(PFN_vkGetPrivateDataEXT, device, objectType, objectHandle, privateDataSlot, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPrivateDataEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTProvokingVertex.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTProvokingVertex.java new file mode 100644 index 00000000..8aeef5ee --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTProvokingVertex.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTProvokingVertex { + public static final int VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT = 0; + public static final int VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT = 1; + public static final int VK_EXT_PROVOKING_VERTEX_SPEC_VERSION = 1; + public static final String VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME = "VK_EXT_provoking_vertex"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT = 1000254000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT = 1000254001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT = 1000254002; + + public VKEXTProvokingVertex(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTQueueFamilyForeign.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTQueueFamilyForeign.java new file mode 100644 index 00000000..4c78f651 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTQueueFamilyForeign.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTQueueFamilyForeign { + public static final int VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION = 1; + public static final String VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME = "VK_EXT_queue_family_foreign"; + public static final int VK_QUEUE_FAMILY_FOREIGN_EXT = (~2); + + public VKEXTQueueFamilyForeign(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTRasterizationOrderAttachmentAccess.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTRasterizationOrderAttachmentAccess.java new file mode 100644 index 00000000..c1915c71 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTRasterizationOrderAttachmentAccess.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTRasterizationOrderAttachmentAccess { + public static final int VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION = 1; + public static final String VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = "VK_EXT_rasterization_order_attachment_access"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT = 1000463000; + public static final int VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT = 0x00000001; + public static final int VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 0x00000001; + public static final int VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 0x00000002; + public static final int VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT = 0x00000010; + public static final int VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 0x00000020; + public static final int VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 0x00000040; + + public VKEXTRasterizationOrderAttachmentAccess(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTRgba10x6Formats.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTRgba10x6Formats.java new file mode 100644 index 00000000..3615822b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTRgba10x6Formats.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTRgba10x6Formats { + public static final int VK_EXT_RGBA10X6_FORMATS_SPEC_VERSION = 1; + public static final String VK_EXT_RGBA10X6_FORMATS_EXTENSION_NAME = "VK_EXT_rgba10x6_formats"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT = 1000344000; + + public VKEXTRgba10x6Formats(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTRobustness2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTRobustness2.java new file mode 100644 index 00000000..af01bab3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTRobustness2.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTRobustness2 { + public static final int VK_EXT_ROBUSTNESS_2_SPEC_VERSION = 1; + public static final String VK_EXT_ROBUSTNESS_2_EXTENSION_NAME = "VK_EXT_robustness2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT = 1000286000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT = 1000286001; + + public VKEXTRobustness2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSampleLocations.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSampleLocations.java new file mode 100644 index 00000000..523862a6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSampleLocations.java @@ -0,0 +1,57 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTSampleLocations { + public static final int VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION = 1; + public static final String VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME = "VK_EXT_sample_locations"; + public static final int VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000; + public static final int VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001; + public static final int VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003; + public static final int VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004; + public static final int VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000; + public static final MethodHandle MH_vkCmdSetSampleLocationsEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceMultisamplePropertiesEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetSampleLocationsEXT; + public final MemorySegment PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT; + + public VKEXTSampleLocations(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetSampleLocationsEXT = func.invoke(device, "vkCmdSetSampleLocationsEXT"); + PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT = func.invoke(device, "vkGetPhysicalDeviceMultisamplePropertiesEXT"); + } + + public void CmdSetSampleLocationsEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkSampleLocationsInfoEXT *") MemorySegment pSampleLocationsInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetSampleLocationsEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetSampleLocationsEXT"); + try { MH_vkCmdSetSampleLocationsEXT.invokeExact(PFN_vkCmdSetSampleLocationsEXT, commandBuffer, pSampleLocationsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetSampleLocationsEXT", e); } + } + + public void GetPhysicalDeviceMultisamplePropertiesEXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkSampleCountFlagBits") int samples, @CType("VkMultisamplePropertiesEXT *") MemorySegment pMultisampleProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceMultisamplePropertiesEXT"); + try { MH_vkGetPhysicalDeviceMultisamplePropertiesEXT.invokeExact(PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT, physicalDevice, samples, pMultisampleProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceMultisamplePropertiesEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSamplerFilterMinmax.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSamplerFilterMinmax.java new file mode 100644 index 00000000..34de68ae --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSamplerFilterMinmax.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKEXTSamplerFilterMinmax { + public static final int VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION = 2; + public static final String VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME = "VK_EXT_sampler_filter_minmax"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT; + public static final int VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE; + public static final int VK_SAMPLER_REDUCTION_MODE_MIN_EXT = VK_SAMPLER_REDUCTION_MODE_MIN; + public static final int VK_SAMPLER_REDUCTION_MODE_MAX_EXT = VK_SAMPLER_REDUCTION_MODE_MAX; + + public VKEXTSamplerFilterMinmax(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTScalarBlockLayout.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTScalarBlockLayout.java new file mode 100644 index 00000000..30b9e788 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTScalarBlockLayout.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKEXTScalarBlockLayout { + public static final int VK_EXT_SCALAR_BLOCK_LAYOUT_SPEC_VERSION = 1; + public static final String VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME = "VK_EXT_scalar_block_layout"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES; + + public VKEXTScalarBlockLayout(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSeparateStencilUsage.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSeparateStencilUsage.java new file mode 100644 index 00000000..848de80d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSeparateStencilUsage.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKEXTSeparateStencilUsage { + public static final int VK_EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION = 1; + public static final String VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME = "VK_EXT_separate_stencil_usage"; + public static final int VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO; + + public VKEXTSeparateStencilUsage(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderAtomicFloat.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderAtomicFloat.java new file mode 100644 index 00000000..3fe61db4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderAtomicFloat.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTShaderAtomicFloat { + public static final int VK_EXT_SHADER_ATOMIC_FLOAT_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME = "VK_EXT_shader_atomic_float"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT = 1000260000; + + public VKEXTShaderAtomicFloat(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderAtomicFloat2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderAtomicFloat2.java new file mode 100644 index 00000000..e8293c04 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderAtomicFloat2.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTShaderAtomicFloat2 { + public static final int VK_EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME = "VK_EXT_shader_atomic_float2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT = 1000273000; + + public VKEXTShaderAtomicFloat2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderDemoteToHelperInvocation.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderDemoteToHelperInvocation.java new file mode 100644 index 00000000..07028c7a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderDemoteToHelperInvocation.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTShaderDemoteToHelperInvocation { + public static final int VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME = "VK_EXT_shader_demote_to_helper_invocation"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES; + + public VKEXTShaderDemoteToHelperInvocation(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderImageAtomicInt64.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderImageAtomicInt64.java new file mode 100644 index 00000000..07271b83 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderImageAtomicInt64.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTShaderImageAtomicInt64 { + public static final int VK_EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME = "VK_EXT_shader_image_atomic_int64"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000; + + public VKEXTShaderImageAtomicInt64(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderModuleIdentifier.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderModuleIdentifier.java new file mode 100644 index 00000000..37791a64 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderModuleIdentifier.java @@ -0,0 +1,55 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTShaderModuleIdentifier { + public static final int VK_EXT_SHADER_MODULE_IDENTIFIER_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME = "VK_EXT_shader_module_identifier"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT = 1000462000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT = 1000462001; + public static final int VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT = 1000462002; + public static final int VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT = 1000462003; + public static final int VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT = 32; + public static final MethodHandle MH_vkGetShaderModuleIdentifierEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetShaderModuleCreateInfoIdentifierEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetShaderModuleIdentifierEXT; + public final MemorySegment PFN_vkGetShaderModuleCreateInfoIdentifierEXT; + + public VKEXTShaderModuleIdentifier(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetShaderModuleIdentifierEXT = func.invoke(device, "vkGetShaderModuleIdentifierEXT"); + PFN_vkGetShaderModuleCreateInfoIdentifierEXT = func.invoke(device, "vkGetShaderModuleCreateInfoIdentifierEXT"); + } + + public void GetShaderModuleIdentifierEXT(@CType("VkDevice") MemorySegment device, @CType("VkShaderModule") MemorySegment shaderModule, @CType("VkShaderModuleIdentifierEXT *") MemorySegment pIdentifier) { + if (Unmarshal.isNullPointer(PFN_vkGetShaderModuleIdentifierEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetShaderModuleIdentifierEXT"); + try { MH_vkGetShaderModuleIdentifierEXT.invokeExact(PFN_vkGetShaderModuleIdentifierEXT, device, shaderModule, pIdentifier); } + catch (Throwable e) { throw new RuntimeException("error in vkGetShaderModuleIdentifierEXT", e); } + } + + public void GetShaderModuleCreateInfoIdentifierEXT(@CType("VkDevice") MemorySegment device, @CType("const VkShaderModuleCreateInfo *") MemorySegment pCreateInfo, @CType("VkShaderModuleIdentifierEXT *") MemorySegment pIdentifier) { + if (Unmarshal.isNullPointer(PFN_vkGetShaderModuleCreateInfoIdentifierEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetShaderModuleCreateInfoIdentifierEXT"); + try { MH_vkGetShaderModuleCreateInfoIdentifierEXT.invokeExact(PFN_vkGetShaderModuleCreateInfoIdentifierEXT, device, pCreateInfo, pIdentifier); } + catch (Throwable e) { throw new RuntimeException("error in vkGetShaderModuleCreateInfoIdentifierEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderObject.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderObject.java new file mode 100644 index 00000000..4f606a57 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderObject.java @@ -0,0 +1,538 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +import static overrungl.vulkan.ext.VKEXTShaderObject.*; +public class VKEXTShaderObject { + public static final int VK_SHADER_CREATE_LINK_STAGE_BIT_EXT = 0x00000001; + public static final int VK_SHADER_CODE_TYPE_BINARY_EXT = 0; + public static final int VK_SHADER_CODE_TYPE_SPIRV_EXT = 1; + public static final int VK_EXT_SHADER_OBJECT_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_OBJECT_EXTENSION_NAME = "VK_EXT_shader_object"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT = 1000482000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT = 1000482001; + public static final int VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT = 1000482002; + public static final int VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT = 1000482001; + public static final int VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000482002; + public static final int VK_OBJECT_TYPE_SHADER_EXT = 1000482000; + public static final int VK_INCOMPATIBLE_SHADER_BINARY_EXT = 1000482000; + public static final int VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = 0x00000002; + public static final int VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT = 0x00000004; + public static final int VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT = 0x00000008; + public static final int VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT = 0x00000010; + public static final int VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT = 0x00000020; + public static final int VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00000040; + public static final int VK_STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO; + public static final int VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT = VK_INCOMPATIBLE_SHADER_BINARY_EXT; + public static final MethodHandle MH_vkCreateShadersEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyShaderEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetShaderBinaryDataEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindShadersEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetCullModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetFrontFaceEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetPrimitiveTopologyEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetViewportWithCountEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetScissorWithCountEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindVertexBuffers2EXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetDepthTestEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthWriteEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthCompareOpEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthBoundsTestEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetStencilTestEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetStencilOpEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetVertexInputEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetPatchControlPointsEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetRasterizerDiscardEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthBiasEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetLogicOpEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetPrimitiveRestartEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetTessellationDomainOriginEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthClampEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetPolygonModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetRasterizationSamplesEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetSampleMaskEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetAlphaToCoverageEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetAlphaToOneEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetLogicOpEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetColorBlendEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetColorBlendEquationEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetColorWriteMaskEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetRasterizationStreamEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetConservativeRasterizationModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetExtraPrimitiveOverestimationSizeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_FLOAT)); + public static final MethodHandle MH_vkCmdSetDepthClipEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetSampleLocationsEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetColorBlendAdvancedEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetProvokingVertexModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetLineRasterizationModeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetLineStippleEnableEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthClipNegativeOneToOneEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetViewportWScalingEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetViewportSwizzleNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetCoverageToColorEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetCoverageToColorLocationNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetCoverageModulationModeNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetCoverageModulationTableEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetCoverageModulationTableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetShadingRateImageEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetRepresentativeFragmentTestEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetCoverageReductionModeNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetDepthClampRangeEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateShadersEXT; + public final MemorySegment PFN_vkDestroyShaderEXT; + public final MemorySegment PFN_vkGetShaderBinaryDataEXT; + public final MemorySegment PFN_vkCmdBindShadersEXT; + public final MemorySegment PFN_vkCmdSetCullModeEXT; + public final MemorySegment PFN_vkCmdSetFrontFaceEXT; + public final MemorySegment PFN_vkCmdSetPrimitiveTopologyEXT; + public final MemorySegment PFN_vkCmdSetViewportWithCountEXT; + public final MemorySegment PFN_vkCmdSetScissorWithCountEXT; + public final MemorySegment PFN_vkCmdBindVertexBuffers2EXT; + public final MemorySegment PFN_vkCmdSetDepthTestEnableEXT; + public final MemorySegment PFN_vkCmdSetDepthWriteEnableEXT; + public final MemorySegment PFN_vkCmdSetDepthCompareOpEXT; + public final MemorySegment PFN_vkCmdSetDepthBoundsTestEnableEXT; + public final MemorySegment PFN_vkCmdSetStencilTestEnableEXT; + public final MemorySegment PFN_vkCmdSetStencilOpEXT; + public final MemorySegment PFN_vkCmdSetVertexInputEXT; + public final MemorySegment PFN_vkCmdSetPatchControlPointsEXT; + public final MemorySegment PFN_vkCmdSetRasterizerDiscardEnableEXT; + public final MemorySegment PFN_vkCmdSetDepthBiasEnableEXT; + public final MemorySegment PFN_vkCmdSetLogicOpEXT; + public final MemorySegment PFN_vkCmdSetPrimitiveRestartEnableEXT; + public final MemorySegment PFN_vkCmdSetTessellationDomainOriginEXT; + public final MemorySegment PFN_vkCmdSetDepthClampEnableEXT; + public final MemorySegment PFN_vkCmdSetPolygonModeEXT; + public final MemorySegment PFN_vkCmdSetRasterizationSamplesEXT; + public final MemorySegment PFN_vkCmdSetSampleMaskEXT; + public final MemorySegment PFN_vkCmdSetAlphaToCoverageEnableEXT; + public final MemorySegment PFN_vkCmdSetAlphaToOneEnableEXT; + public final MemorySegment PFN_vkCmdSetLogicOpEnableEXT; + public final MemorySegment PFN_vkCmdSetColorBlendEnableEXT; + public final MemorySegment PFN_vkCmdSetColorBlendEquationEXT; + public final MemorySegment PFN_vkCmdSetColorWriteMaskEXT; + public final MemorySegment PFN_vkCmdSetRasterizationStreamEXT; + public final MemorySegment PFN_vkCmdSetConservativeRasterizationModeEXT; + public final MemorySegment PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT; + public final MemorySegment PFN_vkCmdSetDepthClipEnableEXT; + public final MemorySegment PFN_vkCmdSetSampleLocationsEnableEXT; + public final MemorySegment PFN_vkCmdSetColorBlendAdvancedEXT; + public final MemorySegment PFN_vkCmdSetProvokingVertexModeEXT; + public final MemorySegment PFN_vkCmdSetLineRasterizationModeEXT; + public final MemorySegment PFN_vkCmdSetLineStippleEnableEXT; + public final MemorySegment PFN_vkCmdSetDepthClipNegativeOneToOneEXT; + public final MemorySegment PFN_vkCmdSetViewportWScalingEnableNV; + public final MemorySegment PFN_vkCmdSetViewportSwizzleNV; + public final MemorySegment PFN_vkCmdSetCoverageToColorEnableNV; + public final MemorySegment PFN_vkCmdSetCoverageToColorLocationNV; + public final MemorySegment PFN_vkCmdSetCoverageModulationModeNV; + public final MemorySegment PFN_vkCmdSetCoverageModulationTableEnableNV; + public final MemorySegment PFN_vkCmdSetCoverageModulationTableNV; + public final MemorySegment PFN_vkCmdSetShadingRateImageEnableNV; + public final MemorySegment PFN_vkCmdSetRepresentativeFragmentTestEnableNV; + public final MemorySegment PFN_vkCmdSetCoverageReductionModeNV; + public final MemorySegment PFN_vkCmdSetDepthClampRangeEXT; + + public VKEXTShaderObject(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateShadersEXT = func.invoke(device, "vkCreateShadersEXT"); + PFN_vkDestroyShaderEXT = func.invoke(device, "vkDestroyShaderEXT"); + PFN_vkGetShaderBinaryDataEXT = func.invoke(device, "vkGetShaderBinaryDataEXT"); + PFN_vkCmdBindShadersEXT = func.invoke(device, "vkCmdBindShadersEXT"); + PFN_vkCmdSetCullModeEXT = func.invoke(device, "vkCmdSetCullModeEXT", "vkCmdSetCullMode"); + PFN_vkCmdSetFrontFaceEXT = func.invoke(device, "vkCmdSetFrontFaceEXT", "vkCmdSetFrontFace"); + PFN_vkCmdSetPrimitiveTopologyEXT = func.invoke(device, "vkCmdSetPrimitiveTopologyEXT", "vkCmdSetPrimitiveTopology"); + PFN_vkCmdSetViewportWithCountEXT = func.invoke(device, "vkCmdSetViewportWithCountEXT", "vkCmdSetViewportWithCount"); + PFN_vkCmdSetScissorWithCountEXT = func.invoke(device, "vkCmdSetScissorWithCountEXT", "vkCmdSetScissorWithCount"); + PFN_vkCmdBindVertexBuffers2EXT = func.invoke(device, "vkCmdBindVertexBuffers2EXT", "vkCmdBindVertexBuffers2"); + PFN_vkCmdSetDepthTestEnableEXT = func.invoke(device, "vkCmdSetDepthTestEnableEXT", "vkCmdSetDepthTestEnable"); + PFN_vkCmdSetDepthWriteEnableEXT = func.invoke(device, "vkCmdSetDepthWriteEnableEXT", "vkCmdSetDepthWriteEnable"); + PFN_vkCmdSetDepthCompareOpEXT = func.invoke(device, "vkCmdSetDepthCompareOpEXT", "vkCmdSetDepthCompareOp"); + PFN_vkCmdSetDepthBoundsTestEnableEXT = func.invoke(device, "vkCmdSetDepthBoundsTestEnableEXT", "vkCmdSetDepthBoundsTestEnable"); + PFN_vkCmdSetStencilTestEnableEXT = func.invoke(device, "vkCmdSetStencilTestEnableEXT", "vkCmdSetStencilTestEnable"); + PFN_vkCmdSetStencilOpEXT = func.invoke(device, "vkCmdSetStencilOpEXT", "vkCmdSetStencilOp"); + PFN_vkCmdSetVertexInputEXT = func.invoke(device, "vkCmdSetVertexInputEXT"); + PFN_vkCmdSetPatchControlPointsEXT = func.invoke(device, "vkCmdSetPatchControlPointsEXT"); + PFN_vkCmdSetRasterizerDiscardEnableEXT = func.invoke(device, "vkCmdSetRasterizerDiscardEnableEXT", "vkCmdSetRasterizerDiscardEnable"); + PFN_vkCmdSetDepthBiasEnableEXT = func.invoke(device, "vkCmdSetDepthBiasEnableEXT", "vkCmdSetDepthBiasEnable"); + PFN_vkCmdSetLogicOpEXT = func.invoke(device, "vkCmdSetLogicOpEXT"); + PFN_vkCmdSetPrimitiveRestartEnableEXT = func.invoke(device, "vkCmdSetPrimitiveRestartEnableEXT", "vkCmdSetPrimitiveRestartEnable"); + PFN_vkCmdSetTessellationDomainOriginEXT = func.invoke(device, "vkCmdSetTessellationDomainOriginEXT"); + PFN_vkCmdSetDepthClampEnableEXT = func.invoke(device, "vkCmdSetDepthClampEnableEXT"); + PFN_vkCmdSetPolygonModeEXT = func.invoke(device, "vkCmdSetPolygonModeEXT"); + PFN_vkCmdSetRasterizationSamplesEXT = func.invoke(device, "vkCmdSetRasterizationSamplesEXT"); + PFN_vkCmdSetSampleMaskEXT = func.invoke(device, "vkCmdSetSampleMaskEXT"); + PFN_vkCmdSetAlphaToCoverageEnableEXT = func.invoke(device, "vkCmdSetAlphaToCoverageEnableEXT"); + PFN_vkCmdSetAlphaToOneEnableEXT = func.invoke(device, "vkCmdSetAlphaToOneEnableEXT"); + PFN_vkCmdSetLogicOpEnableEXT = func.invoke(device, "vkCmdSetLogicOpEnableEXT"); + PFN_vkCmdSetColorBlendEnableEXT = func.invoke(device, "vkCmdSetColorBlendEnableEXT"); + PFN_vkCmdSetColorBlendEquationEXT = func.invoke(device, "vkCmdSetColorBlendEquationEXT"); + PFN_vkCmdSetColorWriteMaskEXT = func.invoke(device, "vkCmdSetColorWriteMaskEXT"); + PFN_vkCmdSetRasterizationStreamEXT = func.invoke(device, "vkCmdSetRasterizationStreamEXT"); + PFN_vkCmdSetConservativeRasterizationModeEXT = func.invoke(device, "vkCmdSetConservativeRasterizationModeEXT"); + PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT = func.invoke(device, "vkCmdSetExtraPrimitiveOverestimationSizeEXT"); + PFN_vkCmdSetDepthClipEnableEXT = func.invoke(device, "vkCmdSetDepthClipEnableEXT"); + PFN_vkCmdSetSampleLocationsEnableEXT = func.invoke(device, "vkCmdSetSampleLocationsEnableEXT"); + PFN_vkCmdSetColorBlendAdvancedEXT = func.invoke(device, "vkCmdSetColorBlendAdvancedEXT"); + PFN_vkCmdSetProvokingVertexModeEXT = func.invoke(device, "vkCmdSetProvokingVertexModeEXT"); + PFN_vkCmdSetLineRasterizationModeEXT = func.invoke(device, "vkCmdSetLineRasterizationModeEXT"); + PFN_vkCmdSetLineStippleEnableEXT = func.invoke(device, "vkCmdSetLineStippleEnableEXT"); + PFN_vkCmdSetDepthClipNegativeOneToOneEXT = func.invoke(device, "vkCmdSetDepthClipNegativeOneToOneEXT"); + PFN_vkCmdSetViewportWScalingEnableNV = func.invoke(device, "vkCmdSetViewportWScalingEnableNV"); + PFN_vkCmdSetViewportSwizzleNV = func.invoke(device, "vkCmdSetViewportSwizzleNV"); + PFN_vkCmdSetCoverageToColorEnableNV = func.invoke(device, "vkCmdSetCoverageToColorEnableNV"); + PFN_vkCmdSetCoverageToColorLocationNV = func.invoke(device, "vkCmdSetCoverageToColorLocationNV"); + PFN_vkCmdSetCoverageModulationModeNV = func.invoke(device, "vkCmdSetCoverageModulationModeNV"); + PFN_vkCmdSetCoverageModulationTableEnableNV = func.invoke(device, "vkCmdSetCoverageModulationTableEnableNV"); + PFN_vkCmdSetCoverageModulationTableNV = func.invoke(device, "vkCmdSetCoverageModulationTableNV"); + PFN_vkCmdSetShadingRateImageEnableNV = func.invoke(device, "vkCmdSetShadingRateImageEnableNV"); + PFN_vkCmdSetRepresentativeFragmentTestEnableNV = func.invoke(device, "vkCmdSetRepresentativeFragmentTestEnableNV"); + PFN_vkCmdSetCoverageReductionModeNV = func.invoke(device, "vkCmdSetCoverageReductionModeNV"); + PFN_vkCmdSetDepthClampRangeEXT = func.invoke(device, "vkCmdSetDepthClampRangeEXT"); + } + + public @CType("VkResult") int CreateShadersEXT(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int createInfoCount, @CType("const VkShaderCreateInfoEXT *") MemorySegment pCreateInfos, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkShaderEXT *") MemorySegment pShaders) { + if (Unmarshal.isNullPointer(PFN_vkCreateShadersEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreateShadersEXT"); + try { return (int) MH_vkCreateShadersEXT.invokeExact(PFN_vkCreateShadersEXT, device, createInfoCount, pCreateInfos, pAllocator, pShaders); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateShadersEXT", e); } + } + + public void DestroyShaderEXT(@CType("VkDevice") MemorySegment device, @CType("VkShaderEXT") MemorySegment shader, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyShaderEXT)) throw new SymbolNotFoundError("Symbol not found: vkDestroyShaderEXT"); + try { MH_vkDestroyShaderEXT.invokeExact(PFN_vkDestroyShaderEXT, device, shader, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyShaderEXT", e); } + } + + public @CType("VkResult") int GetShaderBinaryDataEXT(@CType("VkDevice") MemorySegment device, @CType("VkShaderEXT") MemorySegment shader, @CType("size_t *") MemorySegment pDataSize, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetShaderBinaryDataEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetShaderBinaryDataEXT"); + try { return (int) MH_vkGetShaderBinaryDataEXT.invokeExact(PFN_vkGetShaderBinaryDataEXT, device, shader, pDataSize, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetShaderBinaryDataEXT", e); } + } + + public void CmdBindShadersEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int stageCount, @CType("const VkShaderStageFlagBits *") MemorySegment pStages, @CType("const VkShaderEXT *") MemorySegment pShaders) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindShadersEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindShadersEXT"); + try { MH_vkCmdBindShadersEXT.invokeExact(PFN_vkCmdBindShadersEXT, commandBuffer, stageCount, pStages, pShaders); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindShadersEXT", e); } + } + + public void CmdSetCullModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCullModeFlags") int cullMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCullModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCullModeEXT"); + try { MH_vkCmdSetCullModeEXT.invokeExact(PFN_vkCmdSetCullModeEXT, commandBuffer, cullMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCullModeEXT", e); } + } + + public void CmdSetFrontFaceEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkFrontFace") int frontFace) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetFrontFaceEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetFrontFaceEXT"); + try { MH_vkCmdSetFrontFaceEXT.invokeExact(PFN_vkCmdSetFrontFaceEXT, commandBuffer, frontFace); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetFrontFaceEXT", e); } + } + + public void CmdSetPrimitiveTopologyEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPrimitiveTopology") int primitiveTopology) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPrimitiveTopologyEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPrimitiveTopologyEXT"); + try { MH_vkCmdSetPrimitiveTopologyEXT.invokeExact(PFN_vkCmdSetPrimitiveTopologyEXT, commandBuffer, primitiveTopology); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPrimitiveTopologyEXT", e); } + } + + public void CmdSetViewportWithCountEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int viewportCount, @CType("const VkViewport *") MemorySegment pViewports) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetViewportWithCountEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetViewportWithCountEXT"); + try { MH_vkCmdSetViewportWithCountEXT.invokeExact(PFN_vkCmdSetViewportWithCountEXT, commandBuffer, viewportCount, pViewports); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetViewportWithCountEXT", e); } + } + + public void CmdSetScissorWithCountEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int scissorCount, @CType("const VkRect2D *") MemorySegment pScissors) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetScissorWithCountEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetScissorWithCountEXT"); + try { MH_vkCmdSetScissorWithCountEXT.invokeExact(PFN_vkCmdSetScissorWithCountEXT, commandBuffer, scissorCount, pScissors); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetScissorWithCountEXT", e); } + } + + public void CmdBindVertexBuffers2EXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstBinding, @CType("uint32_t") int bindingCount, @CType("const VkBuffer *") MemorySegment pBuffers, @CType("const VkDeviceSize *") MemorySegment pOffsets, @CType("const VkDeviceSize *") MemorySegment pSizes, @CType("const VkDeviceSize *") MemorySegment pStrides) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindVertexBuffers2EXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindVertexBuffers2EXT"); + try { MH_vkCmdBindVertexBuffers2EXT.invokeExact(PFN_vkCmdBindVertexBuffers2EXT, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindVertexBuffers2EXT", e); } + } + + public void CmdSetDepthTestEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthTestEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthTestEnableEXT"); + try { MH_vkCmdSetDepthTestEnableEXT.invokeExact(PFN_vkCmdSetDepthTestEnableEXT, commandBuffer, depthTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthTestEnableEXT", e); } + } + + public void CmdSetDepthWriteEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthWriteEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthWriteEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthWriteEnableEXT"); + try { MH_vkCmdSetDepthWriteEnableEXT.invokeExact(PFN_vkCmdSetDepthWriteEnableEXT, commandBuffer, depthWriteEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthWriteEnableEXT", e); } + } + + public void CmdSetDepthCompareOpEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCompareOp") int depthCompareOp) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthCompareOpEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthCompareOpEXT"); + try { MH_vkCmdSetDepthCompareOpEXT.invokeExact(PFN_vkCmdSetDepthCompareOpEXT, commandBuffer, depthCompareOp); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthCompareOpEXT", e); } + } + + public void CmdSetDepthBoundsTestEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthBoundsTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthBoundsTestEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthBoundsTestEnableEXT"); + try { MH_vkCmdSetDepthBoundsTestEnableEXT.invokeExact(PFN_vkCmdSetDepthBoundsTestEnableEXT, commandBuffer, depthBoundsTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthBoundsTestEnableEXT", e); } + } + + public void CmdSetStencilTestEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int stencilTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetStencilTestEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetStencilTestEnableEXT"); + try { MH_vkCmdSetStencilTestEnableEXT.invokeExact(PFN_vkCmdSetStencilTestEnableEXT, commandBuffer, stencilTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetStencilTestEnableEXT", e); } + } + + public void CmdSetStencilOpEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkStencilFaceFlags") int faceMask, @CType("VkStencilOp") int failOp, @CType("VkStencilOp") int passOp, @CType("VkStencilOp") int depthFailOp, @CType("VkCompareOp") int compareOp) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetStencilOpEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetStencilOpEXT"); + try { MH_vkCmdSetStencilOpEXT.invokeExact(PFN_vkCmdSetStencilOpEXT, commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetStencilOpEXT", e); } + } + + public void CmdSetVertexInputEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int vertexBindingDescriptionCount, @CType("const VkVertexInputBindingDescription2EXT *") MemorySegment pVertexBindingDescriptions, @CType("uint32_t") int vertexAttributeDescriptionCount, @CType("const VkVertexInputAttributeDescription2EXT *") MemorySegment pVertexAttributeDescriptions) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetVertexInputEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetVertexInputEXT"); + try { MH_vkCmdSetVertexInputEXT.invokeExact(PFN_vkCmdSetVertexInputEXT, commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetVertexInputEXT", e); } + } + + public void CmdSetPatchControlPointsEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int patchControlPoints) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPatchControlPointsEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPatchControlPointsEXT"); + try { MH_vkCmdSetPatchControlPointsEXT.invokeExact(PFN_vkCmdSetPatchControlPointsEXT, commandBuffer, patchControlPoints); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPatchControlPointsEXT", e); } + } + + public void CmdSetRasterizerDiscardEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int rasterizerDiscardEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRasterizerDiscardEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRasterizerDiscardEnableEXT"); + try { MH_vkCmdSetRasterizerDiscardEnableEXT.invokeExact(PFN_vkCmdSetRasterizerDiscardEnableEXT, commandBuffer, rasterizerDiscardEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRasterizerDiscardEnableEXT", e); } + } + + public void CmdSetDepthBiasEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthBiasEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthBiasEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthBiasEnableEXT"); + try { MH_vkCmdSetDepthBiasEnableEXT.invokeExact(PFN_vkCmdSetDepthBiasEnableEXT, commandBuffer, depthBiasEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthBiasEnableEXT", e); } + } + + public void CmdSetLogicOpEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkLogicOp") int logicOp) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLogicOpEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLogicOpEXT"); + try { MH_vkCmdSetLogicOpEXT.invokeExact(PFN_vkCmdSetLogicOpEXT, commandBuffer, logicOp); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLogicOpEXT", e); } + } + + public void CmdSetPrimitiveRestartEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int primitiveRestartEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPrimitiveRestartEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPrimitiveRestartEnableEXT"); + try { MH_vkCmdSetPrimitiveRestartEnableEXT.invokeExact(PFN_vkCmdSetPrimitiveRestartEnableEXT, commandBuffer, primitiveRestartEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPrimitiveRestartEnableEXT", e); } + } + + public void CmdSetTessellationDomainOriginEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkTessellationDomainOrigin") int domainOrigin) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetTessellationDomainOriginEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetTessellationDomainOriginEXT"); + try { MH_vkCmdSetTessellationDomainOriginEXT.invokeExact(PFN_vkCmdSetTessellationDomainOriginEXT, commandBuffer, domainOrigin); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetTessellationDomainOriginEXT", e); } + } + + public void CmdSetDepthClampEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthClampEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthClampEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthClampEnableEXT"); + try { MH_vkCmdSetDepthClampEnableEXT.invokeExact(PFN_vkCmdSetDepthClampEnableEXT, commandBuffer, depthClampEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthClampEnableEXT", e); } + } + + public void CmdSetPolygonModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPolygonMode") int polygonMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPolygonModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPolygonModeEXT"); + try { MH_vkCmdSetPolygonModeEXT.invokeExact(PFN_vkCmdSetPolygonModeEXT, commandBuffer, polygonMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPolygonModeEXT", e); } + } + + public void CmdSetRasterizationSamplesEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkSampleCountFlagBits") int rasterizationSamples) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRasterizationSamplesEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRasterizationSamplesEXT"); + try { MH_vkCmdSetRasterizationSamplesEXT.invokeExact(PFN_vkCmdSetRasterizationSamplesEXT, commandBuffer, rasterizationSamples); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRasterizationSamplesEXT", e); } + } + + public void CmdSetSampleMaskEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkSampleCountFlagBits") int samples, @CType("const VkSampleMask *") MemorySegment pSampleMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetSampleMaskEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetSampleMaskEXT"); + try { MH_vkCmdSetSampleMaskEXT.invokeExact(PFN_vkCmdSetSampleMaskEXT, commandBuffer, samples, pSampleMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetSampleMaskEXT", e); } + } + + public void CmdSetAlphaToCoverageEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int alphaToCoverageEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetAlphaToCoverageEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetAlphaToCoverageEnableEXT"); + try { MH_vkCmdSetAlphaToCoverageEnableEXT.invokeExact(PFN_vkCmdSetAlphaToCoverageEnableEXT, commandBuffer, alphaToCoverageEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetAlphaToCoverageEnableEXT", e); } + } + + public void CmdSetAlphaToOneEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int alphaToOneEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetAlphaToOneEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetAlphaToOneEnableEXT"); + try { MH_vkCmdSetAlphaToOneEnableEXT.invokeExact(PFN_vkCmdSetAlphaToOneEnableEXT, commandBuffer, alphaToOneEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetAlphaToOneEnableEXT", e); } + } + + public void CmdSetLogicOpEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int logicOpEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLogicOpEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLogicOpEnableEXT"); + try { MH_vkCmdSetLogicOpEnableEXT.invokeExact(PFN_vkCmdSetLogicOpEnableEXT, commandBuffer, logicOpEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLogicOpEnableEXT", e); } + } + + public void CmdSetColorBlendEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstAttachment, @CType("uint32_t") int attachmentCount, @CType("const VkBool32 *") MemorySegment pColorBlendEnables) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetColorBlendEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetColorBlendEnableEXT"); + try { MH_vkCmdSetColorBlendEnableEXT.invokeExact(PFN_vkCmdSetColorBlendEnableEXT, commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetColorBlendEnableEXT", e); } + } + + public void CmdSetColorBlendEquationEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstAttachment, @CType("uint32_t") int attachmentCount, @CType("const VkColorBlendEquationEXT *") MemorySegment pColorBlendEquations) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetColorBlendEquationEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetColorBlendEquationEXT"); + try { MH_vkCmdSetColorBlendEquationEXT.invokeExact(PFN_vkCmdSetColorBlendEquationEXT, commandBuffer, firstAttachment, attachmentCount, pColorBlendEquations); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetColorBlendEquationEXT", e); } + } + + public void CmdSetColorWriteMaskEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstAttachment, @CType("uint32_t") int attachmentCount, @CType("const VkColorComponentFlags *") MemorySegment pColorWriteMasks) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetColorWriteMaskEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetColorWriteMaskEXT"); + try { MH_vkCmdSetColorWriteMaskEXT.invokeExact(PFN_vkCmdSetColorWriteMaskEXT, commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetColorWriteMaskEXT", e); } + } + + public void CmdSetRasterizationStreamEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int rasterizationStream) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRasterizationStreamEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRasterizationStreamEXT"); + try { MH_vkCmdSetRasterizationStreamEXT.invokeExact(PFN_vkCmdSetRasterizationStreamEXT, commandBuffer, rasterizationStream); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRasterizationStreamEXT", e); } + } + + public void CmdSetConservativeRasterizationModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkConservativeRasterizationModeEXT") int conservativeRasterizationMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetConservativeRasterizationModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetConservativeRasterizationModeEXT"); + try { MH_vkCmdSetConservativeRasterizationModeEXT.invokeExact(PFN_vkCmdSetConservativeRasterizationModeEXT, commandBuffer, conservativeRasterizationMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetConservativeRasterizationModeEXT", e); } + } + + public void CmdSetExtraPrimitiveOverestimationSizeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, float extraPrimitiveOverestimationSize) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetExtraPrimitiveOverestimationSizeEXT"); + try { MH_vkCmdSetExtraPrimitiveOverestimationSizeEXT.invokeExact(PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT, commandBuffer, extraPrimitiveOverestimationSize); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetExtraPrimitiveOverestimationSizeEXT", e); } + } + + public void CmdSetDepthClipEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int depthClipEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthClipEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthClipEnableEXT"); + try { MH_vkCmdSetDepthClipEnableEXT.invokeExact(PFN_vkCmdSetDepthClipEnableEXT, commandBuffer, depthClipEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthClipEnableEXT", e); } + } + + public void CmdSetSampleLocationsEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int sampleLocationsEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetSampleLocationsEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetSampleLocationsEnableEXT"); + try { MH_vkCmdSetSampleLocationsEnableEXT.invokeExact(PFN_vkCmdSetSampleLocationsEnableEXT, commandBuffer, sampleLocationsEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetSampleLocationsEnableEXT", e); } + } + + public void CmdSetColorBlendAdvancedEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstAttachment, @CType("uint32_t") int attachmentCount, @CType("const VkColorBlendAdvancedEXT *") MemorySegment pColorBlendAdvanced) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetColorBlendAdvancedEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetColorBlendAdvancedEXT"); + try { MH_vkCmdSetColorBlendAdvancedEXT.invokeExact(PFN_vkCmdSetColorBlendAdvancedEXT, commandBuffer, firstAttachment, attachmentCount, pColorBlendAdvanced); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetColorBlendAdvancedEXT", e); } + } + + public void CmdSetProvokingVertexModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkProvokingVertexModeEXT") int provokingVertexMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetProvokingVertexModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetProvokingVertexModeEXT"); + try { MH_vkCmdSetProvokingVertexModeEXT.invokeExact(PFN_vkCmdSetProvokingVertexModeEXT, commandBuffer, provokingVertexMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetProvokingVertexModeEXT", e); } + } + + public void CmdSetLineRasterizationModeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkLineRasterizationModeEXT") int lineRasterizationMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLineRasterizationModeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLineRasterizationModeEXT"); + try { MH_vkCmdSetLineRasterizationModeEXT.invokeExact(PFN_vkCmdSetLineRasterizationModeEXT, commandBuffer, lineRasterizationMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLineRasterizationModeEXT", e); } + } + + public void CmdSetLineStippleEnableEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int stippledLineEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLineStippleEnableEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLineStippleEnableEXT"); + try { MH_vkCmdSetLineStippleEnableEXT.invokeExact(PFN_vkCmdSetLineStippleEnableEXT, commandBuffer, stippledLineEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLineStippleEnableEXT", e); } + } + + public void CmdSetDepthClipNegativeOneToOneEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int negativeOneToOne) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthClipNegativeOneToOneEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthClipNegativeOneToOneEXT"); + try { MH_vkCmdSetDepthClipNegativeOneToOneEXT.invokeExact(PFN_vkCmdSetDepthClipNegativeOneToOneEXT, commandBuffer, negativeOneToOne); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthClipNegativeOneToOneEXT", e); } + } + + public void CmdSetViewportWScalingEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int viewportWScalingEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetViewportWScalingEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetViewportWScalingEnableNV"); + try { MH_vkCmdSetViewportWScalingEnableNV.invokeExact(PFN_vkCmdSetViewportWScalingEnableNV, commandBuffer, viewportWScalingEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetViewportWScalingEnableNV", e); } + } + + public void CmdSetViewportSwizzleNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstViewport, @CType("uint32_t") int viewportCount, @CType("const VkViewportSwizzleNV *") MemorySegment pViewportSwizzles) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetViewportSwizzleNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetViewportSwizzleNV"); + try { MH_vkCmdSetViewportSwizzleNV.invokeExact(PFN_vkCmdSetViewportSwizzleNV, commandBuffer, firstViewport, viewportCount, pViewportSwizzles); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetViewportSwizzleNV", e); } + } + + public void CmdSetCoverageToColorEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int coverageToColorEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageToColorEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageToColorEnableNV"); + try { MH_vkCmdSetCoverageToColorEnableNV.invokeExact(PFN_vkCmdSetCoverageToColorEnableNV, commandBuffer, coverageToColorEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageToColorEnableNV", e); } + } + + public void CmdSetCoverageToColorLocationNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int coverageToColorLocation) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageToColorLocationNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageToColorLocationNV"); + try { MH_vkCmdSetCoverageToColorLocationNV.invokeExact(PFN_vkCmdSetCoverageToColorLocationNV, commandBuffer, coverageToColorLocation); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageToColorLocationNV", e); } + } + + public void CmdSetCoverageModulationModeNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCoverageModulationModeNV") int coverageModulationMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageModulationModeNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageModulationModeNV"); + try { MH_vkCmdSetCoverageModulationModeNV.invokeExact(PFN_vkCmdSetCoverageModulationModeNV, commandBuffer, coverageModulationMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageModulationModeNV", e); } + } + + public void CmdSetCoverageModulationTableEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int coverageModulationTableEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageModulationTableEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageModulationTableEnableNV"); + try { MH_vkCmdSetCoverageModulationTableEnableNV.invokeExact(PFN_vkCmdSetCoverageModulationTableEnableNV, commandBuffer, coverageModulationTableEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageModulationTableEnableNV", e); } + } + + public void CmdSetCoverageModulationTableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int coverageModulationTableCount, @CType("const float *") MemorySegment pCoverageModulationTable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageModulationTableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageModulationTableNV"); + try { MH_vkCmdSetCoverageModulationTableNV.invokeExact(PFN_vkCmdSetCoverageModulationTableNV, commandBuffer, coverageModulationTableCount, pCoverageModulationTable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageModulationTableNV", e); } + } + + public void CmdSetShadingRateImageEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int shadingRateImageEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetShadingRateImageEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetShadingRateImageEnableNV"); + try { MH_vkCmdSetShadingRateImageEnableNV.invokeExact(PFN_vkCmdSetShadingRateImageEnableNV, commandBuffer, shadingRateImageEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetShadingRateImageEnableNV", e); } + } + + public void CmdSetRepresentativeFragmentTestEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int representativeFragmentTestEnable) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRepresentativeFragmentTestEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRepresentativeFragmentTestEnableNV"); + try { MH_vkCmdSetRepresentativeFragmentTestEnableNV.invokeExact(PFN_vkCmdSetRepresentativeFragmentTestEnableNV, commandBuffer, representativeFragmentTestEnable); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRepresentativeFragmentTestEnableNV", e); } + } + + public void CmdSetCoverageReductionModeNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCoverageReductionModeNV") int coverageReductionMode) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoverageReductionModeNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoverageReductionModeNV"); + try { MH_vkCmdSetCoverageReductionModeNV.invokeExact(PFN_vkCmdSetCoverageReductionModeNV, commandBuffer, coverageReductionMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoverageReductionModeNV", e); } + } + + public void CmdSetDepthClampRangeEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDepthClampModeEXT") int depthClampMode, @CType("const VkDepthClampRangeEXT *") MemorySegment pDepthClampRange) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDepthClampRangeEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDepthClampRangeEXT"); + try { MH_vkCmdSetDepthClampRangeEXT.invokeExact(PFN_vkCmdSetDepthClampRangeEXT, commandBuffer, depthClampMode, pDepthClampRange); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDepthClampRangeEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderReplicatedComposites.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderReplicatedComposites.java new file mode 100644 index 00000000..09172d75 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderReplicatedComposites.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTShaderReplicatedComposites { + public static final int VK_EXT_SHADER_REPLICATED_COMPOSITES_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_REPLICATED_COMPOSITES_EXTENSION_NAME = "VK_EXT_shader_replicated_composites"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT = 1000564000; + + public VKEXTShaderReplicatedComposites(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderStencilExport.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderStencilExport.java new file mode 100644 index 00000000..cc07ad5c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderStencilExport.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTShaderStencilExport { + public static final int VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME = "VK_EXT_shader_stencil_export"; + + public VKEXTShaderStencilExport(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderSubgroupBallot.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderSubgroupBallot.java new file mode 100644 index 00000000..1fa390f1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderSubgroupBallot.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTShaderSubgroupBallot { + public static final int VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME = "VK_EXT_shader_subgroup_ballot"; + + public VKEXTShaderSubgroupBallot(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderSubgroupVote.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderSubgroupVote.java new file mode 100644 index 00000000..bad08771 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderSubgroupVote.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTShaderSubgroupVote { + public static final int VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME = "VK_EXT_shader_subgroup_vote"; + + public VKEXTShaderSubgroupVote(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderTileImage.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderTileImage.java new file mode 100644 index 00000000..7cae43e1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderTileImage.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTShaderTileImage { + public static final int VK_EXT_SHADER_TILE_IMAGE_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME = "VK_EXT_shader_tile_image"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT = 1000395000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_PROPERTIES_EXT = 1000395001; + + public VKEXTShaderTileImage(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderViewportIndexLayer.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderViewportIndexLayer.java new file mode 100644 index 00000000..132f9e0f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTShaderViewportIndexLayer.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTShaderViewportIndexLayer { + public static final int VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION = 1; + public static final String VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME = "VK_EXT_shader_viewport_index_layer"; + + public VKEXTShaderViewportIndexLayer(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSubgroupSizeControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSubgroupSizeControl.java new file mode 100644 index 00000000..ac596eba --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSubgroupSizeControl.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTSubgroupSizeControl { + public static final int VK_EXT_SUBGROUP_SIZE_CONTROL_SPEC_VERSION = 2; + public static final String VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME = "VK_EXT_subgroup_size_control"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES; + public static final int VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT; + public static final int VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT = VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT; + + public VKEXTSubgroupSizeControl(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSubpassMergeFeedback.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSubpassMergeFeedback.java new file mode 100644 index 00000000..9d87851d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSubpassMergeFeedback.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTSubpassMergeFeedback { + public static final int VK_SUBPASS_MERGE_STATUS_MERGED_EXT = 0; + public static final int VK_SUBPASS_MERGE_STATUS_DISALLOWED_EXT = 1; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT = 2; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT = 3; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT = 4; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT = 5; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT = 6; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT = 7; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT = 8; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT = 9; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT = 10; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT = 11; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT = 12; + public static final int VK_SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT = 13; + public static final int VK_EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION = 2; + public static final String VK_EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME = "VK_EXT_subpass_merge_feedback"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT = 1000458000; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT = 1000458001; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000458002; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT = 1000458003; + + public VKEXTSubpassMergeFeedback(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSurfaceMaintenance1.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSurfaceMaintenance1.java new file mode 100644 index 00000000..fba91859 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSurfaceMaintenance1.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTSurfaceMaintenance1 { + public static final int VK_PRESENT_SCALING_ONE_TO_ONE_BIT_EXT = 0x00000001; + public static final int VK_PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT = 0x00000002; + public static final int VK_PRESENT_SCALING_STRETCH_BIT_EXT = 0x00000004; + public static final int VK_PRESENT_GRAVITY_MIN_BIT_EXT = 0x00000001; + public static final int VK_PRESENT_GRAVITY_MAX_BIT_EXT = 0x00000002; + public static final int VK_PRESENT_GRAVITY_CENTERED_BIT_EXT = 0x00000004; + public static final int VK_EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION = 1; + public static final String VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME = "VK_EXT_surface_maintenance1"; + public static final int VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT = 1000274000; + public static final int VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT = 1000274001; + public static final int VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT = 1000274002; + + public VKEXTSurfaceMaintenance1(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSwapchainColorspace.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSwapchainColorspace.java new file mode 100644 index 00000000..a95ab07c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSwapchainColorspace.java @@ -0,0 +1,48 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.ext.VKEXTSwapchainColorspace.*; +public class VKEXTSwapchainColorspace { + public static final int VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION = 5; + public static final String VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME = "VK_EXT_swapchain_colorspace"; + public static final int VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001; + public static final int VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002; + public static final int VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104003; + public static final int VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004; + public static final int VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005; + public static final int VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006; + public static final int VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007; + public static final int VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008; + public static final int VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009; + public static final int VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010; + public static final int VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011; + public static final int VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012; + public static final int VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013; + public static final int VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014; + public static final int VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT; + + public VKEXTSwapchainColorspace(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSwapchainMaintenance1.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSwapchainMaintenance1.java new file mode 100644 index 00000000..3484dbe2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTSwapchainMaintenance1.java @@ -0,0 +1,48 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTSwapchainMaintenance1 { + public static final int VK_EXT_SWAPCHAIN_MAINTENANCE_1_SPEC_VERSION = 1; + public static final String VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME = "VK_EXT_swapchain_maintenance1"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT = 1000275000; + public static final int VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT = 1000275001; + public static final int VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT = 1000275002; + public static final int VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT = 1000275003; + public static final int VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT = 1000275004; + public static final int VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_EXT = 1000275005; + public static final int VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT = 0x00000008; + public static final MethodHandle MH_vkReleaseSwapchainImagesEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkReleaseSwapchainImagesEXT; + + public VKEXTSwapchainMaintenance1(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkReleaseSwapchainImagesEXT = func.invoke(device, "vkReleaseSwapchainImagesEXT"); + } + + public @CType("VkResult") int ReleaseSwapchainImagesEXT(@CType("VkDevice") MemorySegment device, @CType("const VkReleaseSwapchainImagesInfoEXT *") MemorySegment pReleaseInfo) { + if (Unmarshal.isNullPointer(PFN_vkReleaseSwapchainImagesEXT)) throw new SymbolNotFoundError("Symbol not found: vkReleaseSwapchainImagesEXT"); + try { return (int) MH_vkReleaseSwapchainImagesEXT.invokeExact(PFN_vkReleaseSwapchainImagesEXT, device, pReleaseInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkReleaseSwapchainImagesEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTTexelBufferAlignment.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTTexelBufferAlignment.java new file mode 100644 index 00000000..a446a12b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTTexelBufferAlignment.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTTexelBufferAlignment { + public static final int VK_EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION = 1; + public static final String VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME = "VK_EXT_texel_buffer_alignment"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT = 1000281000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES; + + public VKEXTTexelBufferAlignment(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTTextureCompressionAstcHdr.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTTextureCompressionAstcHdr.java new file mode 100644 index 00000000..ce56b042 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTTextureCompressionAstcHdr.java @@ -0,0 +1,48 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTTextureCompressionAstcHdr { + public static final int VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_SPEC_VERSION = 1; + public static final String VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME = "VK_EXT_texture_compression_astc_hdr"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES; + public static final int VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK; + public static final int VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK; + + public VKEXTTextureCompressionAstcHdr(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTToolingInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTToolingInfo.java new file mode 100644 index 00000000..aed0ac3b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTToolingInfo.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTToolingInfo { + public static final int VK_EXT_TOOLING_INFO_SPEC_VERSION = 1; + public static final String VK_EXT_TOOLING_INFO_EXTENSION_NAME = "VK_EXT_tooling_info"; + public static final int VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT = 0x00000020; + public static final int VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT = 0x00000040; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES; + public static final int VK_TOOL_PURPOSE_VALIDATION_BIT_EXT = VK_TOOL_PURPOSE_VALIDATION_BIT; + public static final int VK_TOOL_PURPOSE_PROFILING_BIT_EXT = VK_TOOL_PURPOSE_PROFILING_BIT; + public static final int VK_TOOL_PURPOSE_TRACING_BIT_EXT = VK_TOOL_PURPOSE_TRACING_BIT; + public static final int VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT = VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT; + public static final int VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT = VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT; + public static final MethodHandle MH_vkGetPhysicalDeviceToolPropertiesEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceToolPropertiesEXT; + + public VKEXTToolingInfo(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceToolPropertiesEXT = func.invoke(device, "vkGetPhysicalDeviceToolPropertiesEXT", "vkGetPhysicalDeviceToolProperties"); + } + + public @CType("VkResult") int GetPhysicalDeviceToolPropertiesEXT(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pToolCount, @CType("VkPhysicalDeviceToolProperties *") MemorySegment pToolProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceToolPropertiesEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceToolPropertiesEXT"); + try { return (int) MH_vkGetPhysicalDeviceToolPropertiesEXT.invokeExact(PFN_vkGetPhysicalDeviceToolPropertiesEXT, physicalDevice, pToolCount, pToolProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceToolPropertiesEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTTransformFeedback.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTTransformFeedback.java new file mode 100644 index 00000000..53718f79 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTTransformFeedback.java @@ -0,0 +1,96 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTTransformFeedback { + public static final int VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION = 1; + public static final String VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME = "VK_EXT_transform_feedback"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT = 1000028000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002; + public static final int VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT = 1000028004; + public static final int VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800; + public static final int VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000; + public static final int VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000; + public static final int VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000; + public static final int VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000; + public static final int VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000; + public static final MethodHandle MH_vkCmdBindTransformFeedbackBuffersEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBeginTransformFeedbackEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdEndTransformFeedbackEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBeginQueryIndexedEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdEndQueryIndexedEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawIndirectByteCountEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdBindTransformFeedbackBuffersEXT; + public final MemorySegment PFN_vkCmdBeginTransformFeedbackEXT; + public final MemorySegment PFN_vkCmdEndTransformFeedbackEXT; + public final MemorySegment PFN_vkCmdBeginQueryIndexedEXT; + public final MemorySegment PFN_vkCmdEndQueryIndexedEXT; + public final MemorySegment PFN_vkCmdDrawIndirectByteCountEXT; + + public VKEXTTransformFeedback(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdBindTransformFeedbackBuffersEXT = func.invoke(device, "vkCmdBindTransformFeedbackBuffersEXT"); + PFN_vkCmdBeginTransformFeedbackEXT = func.invoke(device, "vkCmdBeginTransformFeedbackEXT"); + PFN_vkCmdEndTransformFeedbackEXT = func.invoke(device, "vkCmdEndTransformFeedbackEXT"); + PFN_vkCmdBeginQueryIndexedEXT = func.invoke(device, "vkCmdBeginQueryIndexedEXT"); + PFN_vkCmdEndQueryIndexedEXT = func.invoke(device, "vkCmdEndQueryIndexedEXT"); + PFN_vkCmdDrawIndirectByteCountEXT = func.invoke(device, "vkCmdDrawIndirectByteCountEXT"); + } + + public void CmdBindTransformFeedbackBuffersEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstBinding, @CType("uint32_t") int bindingCount, @CType("const VkBuffer *") MemorySegment pBuffers, @CType("const VkDeviceSize *") MemorySegment pOffsets, @CType("const VkDeviceSize *") MemorySegment pSizes) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindTransformFeedbackBuffersEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindTransformFeedbackBuffersEXT"); + try { MH_vkCmdBindTransformFeedbackBuffersEXT.invokeExact(PFN_vkCmdBindTransformFeedbackBuffersEXT, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindTransformFeedbackBuffersEXT", e); } + } + + public void CmdBeginTransformFeedbackEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstCounterBuffer, @CType("uint32_t") int counterBufferCount, @CType("const VkBuffer *") MemorySegment pCounterBuffers, @CType("const VkDeviceSize *") MemorySegment pCounterBufferOffsets) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginTransformFeedbackEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginTransformFeedbackEXT"); + try { MH_vkCmdBeginTransformFeedbackEXT.invokeExact(PFN_vkCmdBeginTransformFeedbackEXT, commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginTransformFeedbackEXT", e); } + } + + public void CmdEndTransformFeedbackEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstCounterBuffer, @CType("uint32_t") int counterBufferCount, @CType("const VkBuffer *") MemorySegment pCounterBuffers, @CType("const VkDeviceSize *") MemorySegment pCounterBufferOffsets) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndTransformFeedbackEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndTransformFeedbackEXT"); + try { MH_vkCmdEndTransformFeedbackEXT.invokeExact(PFN_vkCmdEndTransformFeedbackEXT, commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndTransformFeedbackEXT", e); } + } + + public void CmdBeginQueryIndexedEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int query, @CType("VkQueryControlFlags") int flags, @CType("uint32_t") int index) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginQueryIndexedEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginQueryIndexedEXT"); + try { MH_vkCmdBeginQueryIndexedEXT.invokeExact(PFN_vkCmdBeginQueryIndexedEXT, commandBuffer, queryPool, query, flags, index); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginQueryIndexedEXT", e); } + } + + public void CmdEndQueryIndexedEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int query, @CType("uint32_t") int index) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndQueryIndexedEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndQueryIndexedEXT"); + try { MH_vkCmdEndQueryIndexedEXT.invokeExact(PFN_vkCmdEndQueryIndexedEXT, commandBuffer, queryPool, query, index); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndQueryIndexedEXT", e); } + } + + public void CmdDrawIndirectByteCountEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int instanceCount, @CType("uint32_t") int firstInstance, @CType("VkBuffer") MemorySegment counterBuffer, @CType("VkDeviceSize") long counterBufferOffset, @CType("uint32_t") int counterOffset, @CType("uint32_t") int vertexStride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawIndirectByteCountEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawIndirectByteCountEXT"); + try { MH_vkCmdDrawIndirectByteCountEXT.invokeExact(PFN_vkCmdDrawIndirectByteCountEXT, commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawIndirectByteCountEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTValidationCache.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTValidationCache.java new file mode 100644 index 00000000..39e31f95 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTValidationCache.java @@ -0,0 +1,72 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTValidationCache { + public static final int VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1; + public static final int VK_EXT_VALIDATION_CACHE_SPEC_VERSION = 1; + public static final String VK_EXT_VALIDATION_CACHE_EXTENSION_NAME = "VK_EXT_validation_cache"; + public static final int VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000; + public static final int VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001; + public static final int VK_OBJECT_TYPE_VALIDATION_CACHE_EXT = 1000160000; + public static final MethodHandle MH_vkCreateValidationCacheEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyValidationCacheEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkMergeValidationCachesEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetValidationCacheDataEXT = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateValidationCacheEXT; + public final MemorySegment PFN_vkDestroyValidationCacheEXT; + public final MemorySegment PFN_vkMergeValidationCachesEXT; + public final MemorySegment PFN_vkGetValidationCacheDataEXT; + + public VKEXTValidationCache(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateValidationCacheEXT = func.invoke(device, "vkCreateValidationCacheEXT"); + PFN_vkDestroyValidationCacheEXT = func.invoke(device, "vkDestroyValidationCacheEXT"); + PFN_vkMergeValidationCachesEXT = func.invoke(device, "vkMergeValidationCachesEXT"); + PFN_vkGetValidationCacheDataEXT = func.invoke(device, "vkGetValidationCacheDataEXT"); + } + + public @CType("VkResult") int CreateValidationCacheEXT(@CType("VkDevice") MemorySegment device, @CType("const VkValidationCacheCreateInfoEXT *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkValidationCacheEXT *") MemorySegment pValidationCache) { + if (Unmarshal.isNullPointer(PFN_vkCreateValidationCacheEXT)) throw new SymbolNotFoundError("Symbol not found: vkCreateValidationCacheEXT"); + try { return (int) MH_vkCreateValidationCacheEXT.invokeExact(PFN_vkCreateValidationCacheEXT, device, pCreateInfo, pAllocator, pValidationCache); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateValidationCacheEXT", e); } + } + + public void DestroyValidationCacheEXT(@CType("VkDevice") MemorySegment device, @CType("VkValidationCacheEXT") MemorySegment validationCache, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyValidationCacheEXT)) throw new SymbolNotFoundError("Symbol not found: vkDestroyValidationCacheEXT"); + try { MH_vkDestroyValidationCacheEXT.invokeExact(PFN_vkDestroyValidationCacheEXT, device, validationCache, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyValidationCacheEXT", e); } + } + + public @CType("VkResult") int MergeValidationCachesEXT(@CType("VkDevice") MemorySegment device, @CType("VkValidationCacheEXT") MemorySegment dstCache, @CType("uint32_t") int srcCacheCount, @CType("const VkValidationCacheEXT *") MemorySegment pSrcCaches) { + if (Unmarshal.isNullPointer(PFN_vkMergeValidationCachesEXT)) throw new SymbolNotFoundError("Symbol not found: vkMergeValidationCachesEXT"); + try { return (int) MH_vkMergeValidationCachesEXT.invokeExact(PFN_vkMergeValidationCachesEXT, device, dstCache, srcCacheCount, pSrcCaches); } + catch (Throwable e) { throw new RuntimeException("error in vkMergeValidationCachesEXT", e); } + } + + public @CType("VkResult") int GetValidationCacheDataEXT(@CType("VkDevice") MemorySegment device, @CType("VkValidationCacheEXT") MemorySegment validationCache, @CType("size_t *") MemorySegment pDataSize, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetValidationCacheDataEXT)) throw new SymbolNotFoundError("Symbol not found: vkGetValidationCacheDataEXT"); + try { return (int) MH_vkGetValidationCacheDataEXT.invokeExact(PFN_vkGetValidationCacheDataEXT, device, validationCache, pDataSize, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetValidationCacheDataEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTValidationFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTValidationFeatures.java new file mode 100644 index 00000000..d76f4786 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTValidationFeatures.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTValidationFeatures { + public static final int VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT = 0; + public static final int VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT = 1; + public static final int VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT = 2; + public static final int VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT = 3; + public static final int VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT = 4; + public static final int VK_VALIDATION_FEATURE_DISABLE_ALL_EXT = 0; + public static final int VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT = 1; + public static final int VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT = 2; + public static final int VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT = 3; + public static final int VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT = 4; + public static final int VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT = 5; + public static final int VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT = 6; + public static final int VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT = 7; + public static final int VK_EXT_VALIDATION_FEATURES_SPEC_VERSION = 6; + public static final String VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME = "VK_EXT_validation_features"; + public static final int VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT = 1000247000; + + public VKEXTValidationFeatures(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTValidationFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTValidationFlags.java new file mode 100644 index 00000000..4123d948 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTValidationFlags.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTValidationFlags { + public static final int VK_VALIDATION_CHECK_ALL_EXT = 0; + public static final int VK_VALIDATION_CHECK_SHADERS_EXT = 1; + public static final int VK_EXT_VALIDATION_FLAGS_SPEC_VERSION = 3; + public static final String VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME = "VK_EXT_validation_flags"; + public static final int VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000; + + public VKEXTValidationFlags(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTVertexAttributeDivisor.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTVertexAttributeDivisor.java new file mode 100644 index 00000000..c918ba2c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTVertexAttributeDivisor.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKEXTVertexAttributeDivisor { + public static final int VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION = 3; + public static final String VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME = "VK_EXT_vertex_attribute_divisor"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES; + + public VKEXTVertexAttributeDivisor(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTVertexAttributeRobustness.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTVertexAttributeRobustness.java new file mode 100644 index 00000000..445a346f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTVertexAttributeRobustness.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTVertexAttributeRobustness { + public static final int VK_EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_SPEC_VERSION = 1; + public static final String VK_EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_vertex_attribute_robustness"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT = 1000608000; + + public VKEXTVertexAttributeRobustness(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTVertexInputDynamicState.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTVertexInputDynamicState.java new file mode 100644 index 00000000..88133484 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTVertexInputDynamicState.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTVertexInputDynamicState { + public static final int VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSION = 2; + public static final String VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_vertex_input_dynamic_state"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT = 1000352000; + public static final int VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT = 1000352001; + public static final int VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000352002; + public static final int VK_DYNAMIC_STATE_VERTEX_INPUT_EXT = 1000352000; + public static final MethodHandle MH_vkCmdSetVertexInputEXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetVertexInputEXT; + + public VKEXTVertexInputDynamicState(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetVertexInputEXT = func.invoke(device, "vkCmdSetVertexInputEXT"); + } + + public void CmdSetVertexInputEXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int vertexBindingDescriptionCount, @CType("const VkVertexInputBindingDescription2EXT *") MemorySegment pVertexBindingDescriptions, @CType("uint32_t") int vertexAttributeDescriptionCount, @CType("const VkVertexInputAttributeDescription2EXT *") MemorySegment pVertexAttributeDescriptions) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetVertexInputEXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetVertexInputEXT"); + try { MH_vkCmdSetVertexInputEXT.invokeExact(PFN_vkCmdSetVertexInputEXT, commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetVertexInputEXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTYcbcr2plane444Formats.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTYcbcr2plane444Formats.java new file mode 100644 index 00000000..5e07466c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTYcbcr2plane444Formats.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKEXTYcbcr2plane444Formats { + public static final int VK_EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION = 1; + public static final String VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME = "VK_EXT_ycbcr_2plane_444_formats"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT = 1000330000; + public static final int VK_FORMAT_G8_B8R8_2PLANE_444_UNORM_EXT = VK_FORMAT_G8_B8R8_2PLANE_444_UNORM; + public static final int VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16; + public static final int VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16; + public static final int VK_FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT = VK_FORMAT_G16_B16R16_2PLANE_444_UNORM; + + public VKEXTYcbcr2plane444Formats(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTYcbcrImageArrays.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTYcbcrImageArrays.java new file mode 100644 index 00000000..db1afbba --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/VKEXTYcbcrImageArrays.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKEXTYcbcrImageArrays { + public static final int VK_EXT_YCBCR_IMAGE_ARRAYS_SPEC_VERSION = 1; + public static final String VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME = "VK_EXT_ycbcr_image_arrays"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT = 1000252000; + + public VKEXTYcbcrImageArrays(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkAccelerationStructureCaptureDescriptorDataInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkAccelerationStructureCaptureDescriptorDataInfoEXT.java new file mode 100644 index 00000000..8b452a1f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkAccelerationStructureCaptureDescriptorDataInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### accelerationStructure +/// [VarHandle][#VH_accelerationStructure] - [Getter][#accelerationStructure()] - [Setter][#accelerationStructure(java.lang.foreign.MemorySegment)] +/// ### accelerationStructureNV +/// [VarHandle][#VH_accelerationStructureNV] - [Getter][#accelerationStructureNV()] - [Setter][#accelerationStructureNV(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureCaptureDescriptorDataInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccelerationStructureKHR accelerationStructure; +/// VkAccelerationStructureNV accelerationStructureNV; +/// } VkAccelerationStructureCaptureDescriptorDataInfoEXT; +/// ``` +public final class VkAccelerationStructureCaptureDescriptorDataInfoEXT extends Struct { + /// The struct layout of `VkAccelerationStructureCaptureDescriptorDataInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("accelerationStructure"), + ValueLayout.ADDRESS.withName("accelerationStructureNV") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `accelerationStructure` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_accelerationStructure = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructure")); + /// The [VarHandle] of `accelerationStructureNV` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_accelerationStructureNV = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureNV")); + + /// Creates `VkAccelerationStructureCaptureDescriptorDataInfoEXT` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureCaptureDescriptorDataInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureCaptureDescriptorDataInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureCaptureDescriptorDataInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureCaptureDescriptorDataInfoEXT(segment); } + + /// Creates `VkAccelerationStructureCaptureDescriptorDataInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureCaptureDescriptorDataInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureCaptureDescriptorDataInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureCaptureDescriptorDataInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureCaptureDescriptorDataInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureCaptureDescriptorDataInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureCaptureDescriptorDataInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureCaptureDescriptorDataInfoEXT` + public static VkAccelerationStructureCaptureDescriptorDataInfoEXT alloc(SegmentAllocator allocator) { return new VkAccelerationStructureCaptureDescriptorDataInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureCaptureDescriptorDataInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureCaptureDescriptorDataInfoEXT` + public static VkAccelerationStructureCaptureDescriptorDataInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureCaptureDescriptorDataInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCaptureDescriptorDataInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCaptureDescriptorDataInfoEXT sType(@CType("VkStructureType") int value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCaptureDescriptorDataInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCaptureDescriptorDataInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `accelerationStructure` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_accelerationStructure(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_accelerationStructure.get(segment, 0L, index); } + /// {@return `accelerationStructure`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_accelerationStructure(MemorySegment segment) { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_accelerationStructure(segment, 0L); } + /// {@return `accelerationStructure` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment accelerationStructureAt(long index) { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_accelerationStructure(this.segment(), index); } + /// {@return `accelerationStructure`} + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment accelerationStructure() { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_accelerationStructure(this.segment()); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VH_accelerationStructure.set(segment, 0L, index, value); } + /// Sets `accelerationStructure` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_accelerationStructure(segment, 0L, value); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCaptureDescriptorDataInfoEXT accelerationStructureAt(long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_accelerationStructure(this.segment(), index, value); return this; } + /// Sets `accelerationStructure` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCaptureDescriptorDataInfoEXT accelerationStructure(@CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_accelerationStructure(this.segment(), value); return this; } + + /// {@return `accelerationStructureNV` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment get_accelerationStructureNV(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_accelerationStructureNV.get(segment, 0L, index); } + /// {@return `accelerationStructureNV`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment get_accelerationStructureNV(MemorySegment segment) { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_accelerationStructureNV(segment, 0L); } + /// {@return `accelerationStructureNV` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment accelerationStructureNVAt(long index) { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_accelerationStructureNV(this.segment(), index); } + /// {@return `accelerationStructureNV`} + public @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment accelerationStructureNV() { return VkAccelerationStructureCaptureDescriptorDataInfoEXT.get_accelerationStructureNV(this.segment()); } + /// Sets `accelerationStructureNV` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureNV(MemorySegment segment, long index, @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VH_accelerationStructureNV.set(segment, 0L, index, value); } + /// Sets `accelerationStructureNV` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureNV(MemorySegment segment, @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_accelerationStructureNV(segment, 0L, value); } + /// Sets `accelerationStructureNV` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCaptureDescriptorDataInfoEXT accelerationStructureNVAt(long index, @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_accelerationStructureNV(this.segment(), index, value); return this; } + /// Sets `accelerationStructureNV` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCaptureDescriptorDataInfoEXT accelerationStructureNV(@CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCaptureDescriptorDataInfoEXT.set_accelerationStructureNV(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkAccelerationStructureTrianglesOpacityMicromapEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkAccelerationStructureTrianglesOpacityMicromapEXT.java new file mode 100644 index 00000000..f352610e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkAccelerationStructureTrianglesOpacityMicromapEXT.java @@ -0,0 +1,446 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### indexType +/// [VarHandle][#VH_indexType] - [Getter][#indexType()] - [Setter][#indexType(int)] +/// ### indexBuffer +/// [Byte offset][#OFFSET_indexBuffer] - [Memory layout][#ML_indexBuffer] - [Getter][#indexBuffer()] - [Setter][#indexBuffer(java.lang.foreign.MemorySegment)] +/// ### indexStride +/// [VarHandle][#VH_indexStride] - [Getter][#indexStride()] - [Setter][#indexStride(long)] +/// ### baseTriangle +/// [VarHandle][#VH_baseTriangle] - [Getter][#baseTriangle()] - [Setter][#baseTriangle(int)] +/// ### usageCountsCount +/// [VarHandle][#VH_usageCountsCount] - [Getter][#usageCountsCount()] - [Setter][#usageCountsCount(int)] +/// ### pUsageCounts +/// [VarHandle][#VH_pUsageCounts] - [Getter][#pUsageCounts()] - [Setter][#pUsageCounts(java.lang.foreign.MemorySegment)] +/// ### ppUsageCounts +/// [VarHandle][#VH_ppUsageCounts] - [Getter][#ppUsageCounts()] - [Setter][#ppUsageCounts(java.lang.foreign.MemorySegment)] +/// ### micromap +/// [VarHandle][#VH_micromap] - [Getter][#micromap()] - [Setter][#micromap(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureTrianglesOpacityMicromapEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkIndexType indexType; +/// VkDeviceOrHostAddressConstKHR indexBuffer; +/// VkDeviceSize indexStride; +/// uint32_t baseTriangle; +/// uint32_t usageCountsCount; +/// const VkMicromapUsageEXT * pUsageCounts; +/// const VkMicromapUsageEXT * const* ppUsageCounts; +/// VkMicromapEXT micromap; +/// } VkAccelerationStructureTrianglesOpacityMicromapEXT; +/// ``` +public final class VkAccelerationStructureTrianglesOpacityMicromapEXT extends Struct { + /// The struct layout of `VkAccelerationStructureTrianglesOpacityMicromapEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("indexType"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("indexBuffer"), + ValueLayout.JAVA_LONG.withName("indexStride"), + ValueLayout.JAVA_INT.withName("baseTriangle"), + ValueLayout.JAVA_INT.withName("usageCountsCount"), + ValueLayout.ADDRESS.withName("pUsageCounts"), + ValueLayout.ADDRESS.withName("ppUsageCounts"), + ValueLayout.ADDRESS.withName("micromap") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `indexType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexType")); + /// The byte offset of `indexBuffer`. + public static final long OFFSET_indexBuffer = LAYOUT.byteOffset(PathElement.groupElement("indexBuffer")); + /// The memory layout of `indexBuffer`. + public static final MemoryLayout ML_indexBuffer = LAYOUT.select(PathElement.groupElement("indexBuffer")); + /// The [VarHandle] of `indexStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_indexStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexStride")); + /// The [VarHandle] of `baseTriangle` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_baseTriangle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("baseTriangle")); + /// The [VarHandle] of `usageCountsCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usageCountsCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usageCountsCount")); + /// The [VarHandle] of `pUsageCounts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pUsageCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pUsageCounts")); + /// The [VarHandle] of `ppUsageCounts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_ppUsageCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ppUsageCounts")); + /// The [VarHandle] of `micromap` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_micromap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("micromap")); + + /// Creates `VkAccelerationStructureTrianglesOpacityMicromapEXT` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureTrianglesOpacityMicromapEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureTrianglesOpacityMicromapEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureTrianglesOpacityMicromapEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureTrianglesOpacityMicromapEXT(segment); } + + /// Creates `VkAccelerationStructureTrianglesOpacityMicromapEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureTrianglesOpacityMicromapEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureTrianglesOpacityMicromapEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureTrianglesOpacityMicromapEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureTrianglesOpacityMicromapEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureTrianglesOpacityMicromapEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureTrianglesOpacityMicromapEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureTrianglesOpacityMicromapEXT` + public static VkAccelerationStructureTrianglesOpacityMicromapEXT alloc(SegmentAllocator allocator) { return new VkAccelerationStructureTrianglesOpacityMicromapEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureTrianglesOpacityMicromapEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureTrianglesOpacityMicromapEXT` + public static VkAccelerationStructureTrianglesOpacityMicromapEXT alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureTrianglesOpacityMicromapEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT sType(@CType("VkStructureType") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `indexType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndexType") int get_indexType(MemorySegment segment, long index) { return (int) VH_indexType.get(segment, 0L, index); } + /// {@return `indexType`} + /// @param segment the segment of the struct + public static @CType("VkIndexType") int get_indexType(MemorySegment segment) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_indexType(segment, 0L); } + /// {@return `indexType` at the given index} + /// @param index the index + public @CType("VkIndexType") int indexTypeAt(long index) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_indexType(this.segment(), index); } + /// {@return `indexType`} + public @CType("VkIndexType") int indexType() { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_indexType(this.segment()); } + /// Sets `indexType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexType(MemorySegment segment, long index, @CType("VkIndexType") int value) { VH_indexType.set(segment, 0L, index, value); } + /// Sets `indexType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexType(MemorySegment segment, @CType("VkIndexType") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_indexType(segment, 0L, value); } + /// Sets `indexType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT indexTypeAt(long index, @CType("VkIndexType") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_indexType(this.segment(), index, value); return this; } + /// Sets `indexType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT indexType(@CType("VkIndexType") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_indexType(this.segment(), value); return this; } + + /// {@return `indexBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_indexBuffer(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_indexBuffer, index), ML_indexBuffer); } + /// {@return `indexBuffer`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_indexBuffer(MemorySegment segment) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_indexBuffer(segment, 0L); } + /// {@return `indexBuffer` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment indexBufferAt(long index) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_indexBuffer(this.segment(), index); } + /// {@return `indexBuffer`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment indexBuffer() { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_indexBuffer(this.segment()); } + /// Sets `indexBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexBuffer(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_indexBuffer, index), ML_indexBuffer.byteSize()); } + /// Sets `indexBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexBuffer(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_indexBuffer(segment, 0L, value); } + /// Sets `indexBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT indexBufferAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_indexBuffer(this.segment(), index, value); return this; } + /// Sets `indexBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT indexBuffer(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_indexBuffer(this.segment(), value); return this; } + + /// {@return `indexStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_indexStride(MemorySegment segment, long index) { return (long) VH_indexStride.get(segment, 0L, index); } + /// {@return `indexStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_indexStride(MemorySegment segment) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_indexStride(segment, 0L); } + /// {@return `indexStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long indexStrideAt(long index) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_indexStride(this.segment(), index); } + /// {@return `indexStride`} + public @CType("VkDeviceSize") long indexStride() { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_indexStride(this.segment()); } + /// Sets `indexStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_indexStride.set(segment, 0L, index, value); } + /// Sets `indexStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_indexStride(segment, 0L, value); } + /// Sets `indexStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT indexStrideAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_indexStride(this.segment(), index, value); return this; } + /// Sets `indexStride` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT indexStride(@CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_indexStride(this.segment(), value); return this; } + + /// {@return `baseTriangle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_baseTriangle(MemorySegment segment, long index) { return (int) VH_baseTriangle.get(segment, 0L, index); } + /// {@return `baseTriangle`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_baseTriangle(MemorySegment segment) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_baseTriangle(segment, 0L); } + /// {@return `baseTriangle` at the given index} + /// @param index the index + public @CType("uint32_t") int baseTriangleAt(long index) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_baseTriangle(this.segment(), index); } + /// {@return `baseTriangle`} + public @CType("uint32_t") int baseTriangle() { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_baseTriangle(this.segment()); } + /// Sets `baseTriangle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_baseTriangle(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_baseTriangle.set(segment, 0L, index, value); } + /// Sets `baseTriangle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_baseTriangle(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_baseTriangle(segment, 0L, value); } + /// Sets `baseTriangle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT baseTriangleAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_baseTriangle(this.segment(), index, value); return this; } + /// Sets `baseTriangle` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT baseTriangle(@CType("uint32_t") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_baseTriangle(this.segment(), value); return this; } + + /// {@return `usageCountsCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_usageCountsCount(MemorySegment segment, long index) { return (int) VH_usageCountsCount.get(segment, 0L, index); } + /// {@return `usageCountsCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_usageCountsCount(MemorySegment segment) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_usageCountsCount(segment, 0L); } + /// {@return `usageCountsCount` at the given index} + /// @param index the index + public @CType("uint32_t") int usageCountsCountAt(long index) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_usageCountsCount(this.segment(), index); } + /// {@return `usageCountsCount`} + public @CType("uint32_t") int usageCountsCount() { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_usageCountsCount(this.segment()); } + /// Sets `usageCountsCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usageCountsCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_usageCountsCount.set(segment, 0L, index, value); } + /// Sets `usageCountsCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usageCountsCount(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_usageCountsCount(segment, 0L, value); } + /// Sets `usageCountsCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT usageCountsCountAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_usageCountsCount(this.segment(), index, value); return this; } + /// Sets `usageCountsCount` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT usageCountsCount(@CType("uint32_t") int value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_usageCountsCount(this.segment(), value); return this; } + + /// {@return `pUsageCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment get_pUsageCounts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pUsageCounts.get(segment, 0L, index); } + /// {@return `pUsageCounts`} + /// @param segment the segment of the struct + public static @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment get_pUsageCounts(MemorySegment segment) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_pUsageCounts(segment, 0L); } + /// {@return `pUsageCounts` at the given index} + /// @param index the index + public @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment pUsageCountsAt(long index) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_pUsageCounts(this.segment(), index); } + /// {@return `pUsageCounts`} + public @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment pUsageCounts() { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_pUsageCounts(this.segment()); } + /// Sets `pUsageCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pUsageCounts(MemorySegment segment, long index, @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VH_pUsageCounts.set(segment, 0L, index, value); } + /// Sets `pUsageCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pUsageCounts(MemorySegment segment, @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_pUsageCounts(segment, 0L, value); } + /// Sets `pUsageCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT pUsageCountsAt(long index, @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_pUsageCounts(this.segment(), index, value); return this; } + /// Sets `pUsageCounts` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT pUsageCounts(@CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_pUsageCounts(this.segment(), value); return this; } + + /// {@return `ppUsageCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment get_ppUsageCounts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_ppUsageCounts.get(segment, 0L, index); } + /// {@return `ppUsageCounts`} + /// @param segment the segment of the struct + public static @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment get_ppUsageCounts(MemorySegment segment) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_ppUsageCounts(segment, 0L); } + /// {@return `ppUsageCounts` at the given index} + /// @param index the index + public @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment ppUsageCountsAt(long index) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_ppUsageCounts(this.segment(), index); } + /// {@return `ppUsageCounts`} + public @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment ppUsageCounts() { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_ppUsageCounts(this.segment()); } + /// Sets `ppUsageCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ppUsageCounts(MemorySegment segment, long index, @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VH_ppUsageCounts.set(segment, 0L, index, value); } + /// Sets `ppUsageCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ppUsageCounts(MemorySegment segment, @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_ppUsageCounts(segment, 0L, value); } + /// Sets `ppUsageCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT ppUsageCountsAt(long index, @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_ppUsageCounts(this.segment(), index, value); return this; } + /// Sets `ppUsageCounts` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT ppUsageCounts(@CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_ppUsageCounts(this.segment(), value); return this; } + + /// {@return `micromap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_micromap(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_micromap.get(segment, 0L, index); } + /// {@return `micromap`} + /// @param segment the segment of the struct + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_micromap(MemorySegment segment) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_micromap(segment, 0L); } + /// {@return `micromap` at the given index} + /// @param index the index + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment micromapAt(long index) { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_micromap(this.segment(), index); } + /// {@return `micromap`} + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment micromap() { return VkAccelerationStructureTrianglesOpacityMicromapEXT.get_micromap(this.segment()); } + /// Sets `micromap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_micromap(MemorySegment segment, long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VH_micromap.set(segment, 0L, index, value); } + /// Sets `micromap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_micromap(MemorySegment segment, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_micromap(segment, 0L, value); } + /// Sets `micromap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT micromapAt(long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_micromap(this.segment(), index, value); return this; } + /// Sets `micromap` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesOpacityMicromapEXT micromap(@CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesOpacityMicromapEXT.set_micromap(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkApplicationParametersEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkApplicationParametersEXT.java new file mode 100644 index 00000000..83179d00 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkApplicationParametersEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### vendorID +/// [VarHandle][#VH_vendorID] - [Getter][#vendorID()] - [Setter][#vendorID(int)] +/// ### deviceID +/// [VarHandle][#VH_deviceID] - [Getter][#deviceID()] - [Setter][#deviceID(int)] +/// ### key +/// [VarHandle][#VH_key] - [Getter][#key()] - [Setter][#key(int)] +/// ### value +/// [VarHandle][#VH_value] - [Getter][#value()] - [Setter][#value(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkApplicationParametersEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t vendorID; +/// uint32_t deviceID; +/// uint32_t key; +/// uint64_t value; +/// } VkApplicationParametersEXT; +/// ``` +public final class VkApplicationParametersEXT extends Struct { + /// The struct layout of `VkApplicationParametersEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("vendorID"), + ValueLayout.JAVA_INT.withName("deviceID"), + ValueLayout.JAVA_INT.withName("key"), + ValueLayout.JAVA_LONG.withName("value") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `vendorID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vendorID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vendorID")); + /// The [VarHandle] of `deviceID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceID")); + /// The [VarHandle] of `key` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_key = LAYOUT.arrayElementVarHandle(PathElement.groupElement("key")); + /// The [VarHandle] of `value` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_value = LAYOUT.arrayElementVarHandle(PathElement.groupElement("value")); + + /// Creates `VkApplicationParametersEXT` with the given segment. + /// @param segment the memory segment + public VkApplicationParametersEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkApplicationParametersEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkApplicationParametersEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkApplicationParametersEXT(segment); } + + /// Creates `VkApplicationParametersEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkApplicationParametersEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkApplicationParametersEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkApplicationParametersEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkApplicationParametersEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkApplicationParametersEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkApplicationParametersEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkApplicationParametersEXT` + public static VkApplicationParametersEXT alloc(SegmentAllocator allocator) { return new VkApplicationParametersEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkApplicationParametersEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkApplicationParametersEXT` + public static VkApplicationParametersEXT alloc(SegmentAllocator allocator, long count) { return new VkApplicationParametersEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkApplicationParametersEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkApplicationParametersEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkApplicationParametersEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkApplicationParametersEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkApplicationParametersEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT sType(@CType("VkStructureType") int value) { VkApplicationParametersEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkApplicationParametersEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkApplicationParametersEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkApplicationParametersEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkApplicationParametersEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkApplicationParametersEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkApplicationParametersEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `vendorID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vendorID(MemorySegment segment, long index) { return (int) VH_vendorID.get(segment, 0L, index); } + /// {@return `vendorID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vendorID(MemorySegment segment) { return VkApplicationParametersEXT.get_vendorID(segment, 0L); } + /// {@return `vendorID` at the given index} + /// @param index the index + public @CType("uint32_t") int vendorIDAt(long index) { return VkApplicationParametersEXT.get_vendorID(this.segment(), index); } + /// {@return `vendorID`} + public @CType("uint32_t") int vendorID() { return VkApplicationParametersEXT.get_vendorID(this.segment()); } + /// Sets `vendorID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vendorID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vendorID.set(segment, 0L, index, value); } + /// Sets `vendorID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vendorID(MemorySegment segment, @CType("uint32_t") int value) { VkApplicationParametersEXT.set_vendorID(segment, 0L, value); } + /// Sets `vendorID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT vendorIDAt(long index, @CType("uint32_t") int value) { VkApplicationParametersEXT.set_vendorID(this.segment(), index, value); return this; } + /// Sets `vendorID` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT vendorID(@CType("uint32_t") int value) { VkApplicationParametersEXT.set_vendorID(this.segment(), value); return this; } + + /// {@return `deviceID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceID(MemorySegment segment, long index) { return (int) VH_deviceID.get(segment, 0L, index); } + /// {@return `deviceID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceID(MemorySegment segment) { return VkApplicationParametersEXT.get_deviceID(segment, 0L); } + /// {@return `deviceID` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceIDAt(long index) { return VkApplicationParametersEXT.get_deviceID(this.segment(), index); } + /// {@return `deviceID`} + public @CType("uint32_t") int deviceID() { return VkApplicationParametersEXT.get_deviceID(this.segment()); } + /// Sets `deviceID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceID.set(segment, 0L, index, value); } + /// Sets `deviceID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceID(MemorySegment segment, @CType("uint32_t") int value) { VkApplicationParametersEXT.set_deviceID(segment, 0L, value); } + /// Sets `deviceID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT deviceIDAt(long index, @CType("uint32_t") int value) { VkApplicationParametersEXT.set_deviceID(this.segment(), index, value); return this; } + /// Sets `deviceID` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT deviceID(@CType("uint32_t") int value) { VkApplicationParametersEXT.set_deviceID(this.segment(), value); return this; } + + /// {@return `key` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_key(MemorySegment segment, long index) { return (int) VH_key.get(segment, 0L, index); } + /// {@return `key`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_key(MemorySegment segment) { return VkApplicationParametersEXT.get_key(segment, 0L); } + /// {@return `key` at the given index} + /// @param index the index + public @CType("uint32_t") int keyAt(long index) { return VkApplicationParametersEXT.get_key(this.segment(), index); } + /// {@return `key`} + public @CType("uint32_t") int key() { return VkApplicationParametersEXT.get_key(this.segment()); } + /// Sets `key` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_key(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_key.set(segment, 0L, index, value); } + /// Sets `key` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_key(MemorySegment segment, @CType("uint32_t") int value) { VkApplicationParametersEXT.set_key(segment, 0L, value); } + /// Sets `key` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT keyAt(long index, @CType("uint32_t") int value) { VkApplicationParametersEXT.set_key(this.segment(), index, value); return this; } + /// Sets `key` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT key(@CType("uint32_t") int value) { VkApplicationParametersEXT.set_key(this.segment(), value); return this; } + + /// {@return `value` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_value(MemorySegment segment, long index) { return (long) VH_value.get(segment, 0L, index); } + /// {@return `value`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_value(MemorySegment segment) { return VkApplicationParametersEXT.get_value(segment, 0L); } + /// {@return `value` at the given index} + /// @param index the index + public @CType("uint64_t") long valueAt(long index) { return VkApplicationParametersEXT.get_value(this.segment(), index); } + /// {@return `value`} + public @CType("uint64_t") long value() { return VkApplicationParametersEXT.get_value(this.segment()); } + /// Sets `value` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_value(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_value.set(segment, 0L, index, value); } + /// Sets `value` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_value(MemorySegment segment, @CType("uint64_t") long value) { VkApplicationParametersEXT.set_value(segment, 0L, value); } + /// Sets `value` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT valueAt(long index, @CType("uint64_t") long value) { VkApplicationParametersEXT.set_value(this.segment(), index, value); return this; } + /// Sets `value` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationParametersEXT value(@CType("uint64_t") long value) { VkApplicationParametersEXT.set_value(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkAttachmentSampleLocationsEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkAttachmentSampleLocationsEXT.java new file mode 100644 index 00000000..d5f4b066 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkAttachmentSampleLocationsEXT.java @@ -0,0 +1,150 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### attachmentIndex +/// [VarHandle][#VH_attachmentIndex] - [Getter][#attachmentIndex()] - [Setter][#attachmentIndex(int)] +/// ### sampleLocationsInfo +/// [Byte offset][#OFFSET_sampleLocationsInfo] - [Memory layout][#ML_sampleLocationsInfo] - [Getter][#sampleLocationsInfo()] - [Setter][#sampleLocationsInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAttachmentSampleLocationsEXT { +/// uint32_t attachmentIndex; +/// VkSampleLocationsInfoEXT sampleLocationsInfo; +/// } VkAttachmentSampleLocationsEXT; +/// ``` +public final class VkAttachmentSampleLocationsEXT extends Struct { + /// The struct layout of `VkAttachmentSampleLocationsEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("attachmentIndex"), + overrungl.vulkan.ext.struct.VkSampleLocationsInfoEXT.LAYOUT.withName("sampleLocationsInfo") + ); + /// The [VarHandle] of `attachmentIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentIndex")); + /// The byte offset of `sampleLocationsInfo`. + public static final long OFFSET_sampleLocationsInfo = LAYOUT.byteOffset(PathElement.groupElement("sampleLocationsInfo")); + /// The memory layout of `sampleLocationsInfo`. + public static final MemoryLayout ML_sampleLocationsInfo = LAYOUT.select(PathElement.groupElement("sampleLocationsInfo")); + + /// Creates `VkAttachmentSampleLocationsEXT` with the given segment. + /// @param segment the memory segment + public VkAttachmentSampleLocationsEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAttachmentSampleLocationsEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentSampleLocationsEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentSampleLocationsEXT(segment); } + + /// Creates `VkAttachmentSampleLocationsEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentSampleLocationsEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentSampleLocationsEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAttachmentSampleLocationsEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentSampleLocationsEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentSampleLocationsEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAttachmentSampleLocationsEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAttachmentSampleLocationsEXT` + public static VkAttachmentSampleLocationsEXT alloc(SegmentAllocator allocator) { return new VkAttachmentSampleLocationsEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAttachmentSampleLocationsEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAttachmentSampleLocationsEXT` + public static VkAttachmentSampleLocationsEXT alloc(SegmentAllocator allocator, long count) { return new VkAttachmentSampleLocationsEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `attachmentIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachmentIndex(MemorySegment segment, long index) { return (int) VH_attachmentIndex.get(segment, 0L, index); } + /// {@return `attachmentIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachmentIndex(MemorySegment segment) { return VkAttachmentSampleLocationsEXT.get_attachmentIndex(segment, 0L); } + /// {@return `attachmentIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentIndexAt(long index) { return VkAttachmentSampleLocationsEXT.get_attachmentIndex(this.segment(), index); } + /// {@return `attachmentIndex`} + public @CType("uint32_t") int attachmentIndex() { return VkAttachmentSampleLocationsEXT.get_attachmentIndex(this.segment()); } + /// Sets `attachmentIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachmentIndex.set(segment, 0L, index, value); } + /// Sets `attachmentIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentIndex(MemorySegment segment, @CType("uint32_t") int value) { VkAttachmentSampleLocationsEXT.set_attachmentIndex(segment, 0L, value); } + /// Sets `attachmentIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentSampleLocationsEXT attachmentIndexAt(long index, @CType("uint32_t") int value) { VkAttachmentSampleLocationsEXT.set_attachmentIndex(this.segment(), index, value); return this; } + /// Sets `attachmentIndex` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentSampleLocationsEXT attachmentIndex(@CType("uint32_t") int value) { VkAttachmentSampleLocationsEXT.set_attachmentIndex(this.segment(), value); return this; } + + /// {@return `sampleLocationsInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment get_sampleLocationsInfo(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_sampleLocationsInfo, index), ML_sampleLocationsInfo); } + /// {@return `sampleLocationsInfo`} + /// @param segment the segment of the struct + public static @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment get_sampleLocationsInfo(MemorySegment segment) { return VkAttachmentSampleLocationsEXT.get_sampleLocationsInfo(segment, 0L); } + /// {@return `sampleLocationsInfo` at the given index} + /// @param index the index + public @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment sampleLocationsInfoAt(long index) { return VkAttachmentSampleLocationsEXT.get_sampleLocationsInfo(this.segment(), index); } + /// {@return `sampleLocationsInfo`} + public @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment sampleLocationsInfo() { return VkAttachmentSampleLocationsEXT.get_sampleLocationsInfo(this.segment()); } + /// Sets `sampleLocationsInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationsInfo(MemorySegment segment, long index, @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_sampleLocationsInfo, index), ML_sampleLocationsInfo.byteSize()); } + /// Sets `sampleLocationsInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationsInfo(MemorySegment segment, @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { VkAttachmentSampleLocationsEXT.set_sampleLocationsInfo(segment, 0L, value); } + /// Sets `sampleLocationsInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentSampleLocationsEXT sampleLocationsInfoAt(long index, @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { VkAttachmentSampleLocationsEXT.set_sampleLocationsInfo(this.segment(), index, value); return this; } + /// Sets `sampleLocationsInfo` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentSampleLocationsEXT sampleLocationsInfo(@CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { VkAttachmentSampleLocationsEXT.set_sampleLocationsInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBindDescriptorBufferEmbeddedSamplersInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBindDescriptorBufferEmbeddedSamplersInfoEXT.java new file mode 100644 index 00000000..ae509b71 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBindDescriptorBufferEmbeddedSamplersInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stageFlags +/// [VarHandle][#VH_stageFlags] - [Getter][#stageFlags()] - [Setter][#stageFlags(int)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### set +/// [VarHandle][#VH_set] - [Getter][#set()] - [Setter][#set(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindDescriptorBufferEmbeddedSamplersInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkShaderStageFlags stageFlags; +/// VkPipelineLayout layout; +/// uint32_t set; +/// } VkBindDescriptorBufferEmbeddedSamplersInfoEXT; +/// ``` +public final class VkBindDescriptorBufferEmbeddedSamplersInfoEXT extends Struct { + /// The struct layout of `VkBindDescriptorBufferEmbeddedSamplersInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stageFlags"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.JAVA_INT.withName("set") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageFlags")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `set` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_set = LAYOUT.arrayElementVarHandle(PathElement.groupElement("set")); + + /// Creates `VkBindDescriptorBufferEmbeddedSamplersInfoEXT` with the given segment. + /// @param segment the memory segment + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindDescriptorBufferEmbeddedSamplersInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindDescriptorBufferEmbeddedSamplersInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindDescriptorBufferEmbeddedSamplersInfoEXT(segment); } + + /// Creates `VkBindDescriptorBufferEmbeddedSamplersInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindDescriptorBufferEmbeddedSamplersInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindDescriptorBufferEmbeddedSamplersInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindDescriptorBufferEmbeddedSamplersInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindDescriptorBufferEmbeddedSamplersInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindDescriptorBufferEmbeddedSamplersInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindDescriptorBufferEmbeddedSamplersInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindDescriptorBufferEmbeddedSamplersInfoEXT` + public static VkBindDescriptorBufferEmbeddedSamplersInfoEXT alloc(SegmentAllocator allocator) { return new VkBindDescriptorBufferEmbeddedSamplersInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindDescriptorBufferEmbeddedSamplersInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindDescriptorBufferEmbeddedSamplersInfoEXT` + public static VkBindDescriptorBufferEmbeddedSamplersInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkBindDescriptorBufferEmbeddedSamplersInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT sType(@CType("VkStructureType") int value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `stageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment, long index) { return (int) VH_stageFlags.get(segment, 0L, index); } + /// {@return `stageFlags`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment) { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_stageFlags(segment, 0L); } + /// {@return `stageFlags` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int stageFlagsAt(long index) { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_stageFlags(this.segment(), index); } + /// {@return `stageFlags`} + public @CType("VkShaderStageFlags") int stageFlags() { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_stageFlags(this.segment()); } + /// Sets `stageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageFlags(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_stageFlags.set(segment, 0L, index, value); } + /// Sets `stageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageFlags(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_stageFlags(segment, 0L, value); } + /// Sets `stageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT stageFlagsAt(long index, @CType("VkShaderStageFlags") int value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_stageFlags(this.segment(), index, value); return this; } + /// Sets `stageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT stageFlags(@CType("VkShaderStageFlags") int value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_stageFlags(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_layout(this.segment(), value); return this; } + + /// {@return `set` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_set(MemorySegment segment, long index) { return (int) VH_set.get(segment, 0L, index); } + /// {@return `set`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_set(MemorySegment segment) { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_set(segment, 0L); } + /// {@return `set` at the given index} + /// @param index the index + public @CType("uint32_t") int setAt(long index) { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_set(this.segment(), index); } + /// {@return `set`} + public @CType("uint32_t") int set() { return VkBindDescriptorBufferEmbeddedSamplersInfoEXT.get_set(this.segment()); } + /// Sets `set` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_set(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_set.set(segment, 0L, index, value); } + /// Sets `set` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_set(MemorySegment segment, @CType("uint32_t") int value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_set(segment, 0L, value); } + /// Sets `set` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT setAt(long index, @CType("uint32_t") int value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_set(this.segment(), index, value); return this; } + /// Sets `set` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorBufferEmbeddedSamplersInfoEXT set(@CType("uint32_t") int value) { VkBindDescriptorBufferEmbeddedSamplersInfoEXT.set_set(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBindIndexBufferIndirectCommandEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBindIndexBufferIndirectCommandEXT.java new file mode 100644 index 00000000..dbefb545 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBindIndexBufferIndirectCommandEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### bufferAddress +/// [VarHandle][#VH_bufferAddress] - [Getter][#bufferAddress()] - [Setter][#bufferAddress(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(int)] +/// ### indexType +/// [VarHandle][#VH_indexType] - [Getter][#indexType()] - [Setter][#indexType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindIndexBufferIndirectCommandEXT { +/// VkDeviceAddress bufferAddress; +/// uint32_t size; +/// VkIndexType indexType; +/// } VkBindIndexBufferIndirectCommandEXT; +/// ``` +public final class VkBindIndexBufferIndirectCommandEXT extends Struct { + /// The struct layout of `VkBindIndexBufferIndirectCommandEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("bufferAddress"), + ValueLayout.JAVA_INT.withName("size"), + ValueLayout.JAVA_INT.withName("indexType") + ); + /// The [VarHandle] of `bufferAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_bufferAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferAddress")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `indexType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexType")); + + /// Creates `VkBindIndexBufferIndirectCommandEXT` with the given segment. + /// @param segment the memory segment + public VkBindIndexBufferIndirectCommandEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindIndexBufferIndirectCommandEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindIndexBufferIndirectCommandEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindIndexBufferIndirectCommandEXT(segment); } + + /// Creates `VkBindIndexBufferIndirectCommandEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindIndexBufferIndirectCommandEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindIndexBufferIndirectCommandEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindIndexBufferIndirectCommandEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindIndexBufferIndirectCommandEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindIndexBufferIndirectCommandEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindIndexBufferIndirectCommandEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindIndexBufferIndirectCommandEXT` + public static VkBindIndexBufferIndirectCommandEXT alloc(SegmentAllocator allocator) { return new VkBindIndexBufferIndirectCommandEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindIndexBufferIndirectCommandEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindIndexBufferIndirectCommandEXT` + public static VkBindIndexBufferIndirectCommandEXT alloc(SegmentAllocator allocator, long count) { return new VkBindIndexBufferIndirectCommandEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `bufferAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_bufferAddress(MemorySegment segment, long index) { return (long) VH_bufferAddress.get(segment, 0L, index); } + /// {@return `bufferAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_bufferAddress(MemorySegment segment) { return VkBindIndexBufferIndirectCommandEXT.get_bufferAddress(segment, 0L); } + /// {@return `bufferAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long bufferAddressAt(long index) { return VkBindIndexBufferIndirectCommandEXT.get_bufferAddress(this.segment(), index); } + /// {@return `bufferAddress`} + public @CType("VkDeviceAddress") long bufferAddress() { return VkBindIndexBufferIndirectCommandEXT.get_bufferAddress(this.segment()); } + /// Sets `bufferAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_bufferAddress.set(segment, 0L, index, value); } + /// Sets `bufferAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkBindIndexBufferIndirectCommandEXT.set_bufferAddress(segment, 0L, value); } + /// Sets `bufferAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandEXT bufferAddressAt(long index, @CType("VkDeviceAddress") long value) { VkBindIndexBufferIndirectCommandEXT.set_bufferAddress(this.segment(), index, value); return this; } + /// Sets `bufferAddress` with the given value. + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandEXT bufferAddress(@CType("VkDeviceAddress") long value) { VkBindIndexBufferIndirectCommandEXT.set_bufferAddress(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_size(MemorySegment segment, long index) { return (int) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_size(MemorySegment segment) { return VkBindIndexBufferIndirectCommandEXT.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("uint32_t") int sizeAt(long index) { return VkBindIndexBufferIndirectCommandEXT.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("uint32_t") int size() { return VkBindIndexBufferIndirectCommandEXT.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("uint32_t") int value) { VkBindIndexBufferIndirectCommandEXT.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandEXT sizeAt(long index, @CType("uint32_t") int value) { VkBindIndexBufferIndirectCommandEXT.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandEXT size(@CType("uint32_t") int value) { VkBindIndexBufferIndirectCommandEXT.set_size(this.segment(), value); return this; } + + /// {@return `indexType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndexType") int get_indexType(MemorySegment segment, long index) { return (int) VH_indexType.get(segment, 0L, index); } + /// {@return `indexType`} + /// @param segment the segment of the struct + public static @CType("VkIndexType") int get_indexType(MemorySegment segment) { return VkBindIndexBufferIndirectCommandEXT.get_indexType(segment, 0L); } + /// {@return `indexType` at the given index} + /// @param index the index + public @CType("VkIndexType") int indexTypeAt(long index) { return VkBindIndexBufferIndirectCommandEXT.get_indexType(this.segment(), index); } + /// {@return `indexType`} + public @CType("VkIndexType") int indexType() { return VkBindIndexBufferIndirectCommandEXT.get_indexType(this.segment()); } + /// Sets `indexType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexType(MemorySegment segment, long index, @CType("VkIndexType") int value) { VH_indexType.set(segment, 0L, index, value); } + /// Sets `indexType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexType(MemorySegment segment, @CType("VkIndexType") int value) { VkBindIndexBufferIndirectCommandEXT.set_indexType(segment, 0L, value); } + /// Sets `indexType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandEXT indexTypeAt(long index, @CType("VkIndexType") int value) { VkBindIndexBufferIndirectCommandEXT.set_indexType(this.segment(), index, value); return this; } + /// Sets `indexType` with the given value. + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandEXT indexType(@CType("VkIndexType") int value) { VkBindIndexBufferIndirectCommandEXT.set_indexType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBindVertexBufferIndirectCommandEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBindVertexBufferIndirectCommandEXT.java new file mode 100644 index 00000000..8ecdb37b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBindVertexBufferIndirectCommandEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### bufferAddress +/// [VarHandle][#VH_bufferAddress] - [Getter][#bufferAddress()] - [Setter][#bufferAddress(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(int)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindVertexBufferIndirectCommandEXT { +/// VkDeviceAddress bufferAddress; +/// uint32_t size; +/// uint32_t stride; +/// } VkBindVertexBufferIndirectCommandEXT; +/// ``` +public final class VkBindVertexBufferIndirectCommandEXT extends Struct { + /// The struct layout of `VkBindVertexBufferIndirectCommandEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("bufferAddress"), + ValueLayout.JAVA_INT.withName("size"), + ValueLayout.JAVA_INT.withName("stride") + ); + /// The [VarHandle] of `bufferAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_bufferAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferAddress")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + + /// Creates `VkBindVertexBufferIndirectCommandEXT` with the given segment. + /// @param segment the memory segment + public VkBindVertexBufferIndirectCommandEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindVertexBufferIndirectCommandEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindVertexBufferIndirectCommandEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindVertexBufferIndirectCommandEXT(segment); } + + /// Creates `VkBindVertexBufferIndirectCommandEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindVertexBufferIndirectCommandEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindVertexBufferIndirectCommandEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindVertexBufferIndirectCommandEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindVertexBufferIndirectCommandEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindVertexBufferIndirectCommandEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindVertexBufferIndirectCommandEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindVertexBufferIndirectCommandEXT` + public static VkBindVertexBufferIndirectCommandEXT alloc(SegmentAllocator allocator) { return new VkBindVertexBufferIndirectCommandEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindVertexBufferIndirectCommandEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindVertexBufferIndirectCommandEXT` + public static VkBindVertexBufferIndirectCommandEXT alloc(SegmentAllocator allocator, long count) { return new VkBindVertexBufferIndirectCommandEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `bufferAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_bufferAddress(MemorySegment segment, long index) { return (long) VH_bufferAddress.get(segment, 0L, index); } + /// {@return `bufferAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_bufferAddress(MemorySegment segment) { return VkBindVertexBufferIndirectCommandEXT.get_bufferAddress(segment, 0L); } + /// {@return `bufferAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long bufferAddressAt(long index) { return VkBindVertexBufferIndirectCommandEXT.get_bufferAddress(this.segment(), index); } + /// {@return `bufferAddress`} + public @CType("VkDeviceAddress") long bufferAddress() { return VkBindVertexBufferIndirectCommandEXT.get_bufferAddress(this.segment()); } + /// Sets `bufferAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_bufferAddress.set(segment, 0L, index, value); } + /// Sets `bufferAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkBindVertexBufferIndirectCommandEXT.set_bufferAddress(segment, 0L, value); } + /// Sets `bufferAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandEXT bufferAddressAt(long index, @CType("VkDeviceAddress") long value) { VkBindVertexBufferIndirectCommandEXT.set_bufferAddress(this.segment(), index, value); return this; } + /// Sets `bufferAddress` with the given value. + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandEXT bufferAddress(@CType("VkDeviceAddress") long value) { VkBindVertexBufferIndirectCommandEXT.set_bufferAddress(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_size(MemorySegment segment, long index) { return (int) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_size(MemorySegment segment) { return VkBindVertexBufferIndirectCommandEXT.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("uint32_t") int sizeAt(long index) { return VkBindVertexBufferIndirectCommandEXT.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("uint32_t") int size() { return VkBindVertexBufferIndirectCommandEXT.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandEXT.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandEXT sizeAt(long index, @CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandEXT.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandEXT size(@CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandEXT.set_size(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stride(MemorySegment segment, long index) { return (int) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stride(MemorySegment segment) { return VkBindVertexBufferIndirectCommandEXT.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("uint32_t") int strideAt(long index) { return VkBindVertexBufferIndirectCommandEXT.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("uint32_t") int stride() { return VkBindVertexBufferIndirectCommandEXT.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandEXT.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandEXT strideAt(long index, @CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandEXT.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandEXT stride(@CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandEXT.set_stride(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBufferCaptureDescriptorDataInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBufferCaptureDescriptorDataInfoEXT.java new file mode 100644 index 00000000..5db6606f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBufferCaptureDescriptorDataInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferCaptureDescriptorDataInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkBuffer buffer; +/// } VkBufferCaptureDescriptorDataInfoEXT; +/// ``` +public final class VkBufferCaptureDescriptorDataInfoEXT extends Struct { + /// The struct layout of `VkBufferCaptureDescriptorDataInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("buffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + + /// Creates `VkBufferCaptureDescriptorDataInfoEXT` with the given segment. + /// @param segment the memory segment + public VkBufferCaptureDescriptorDataInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferCaptureDescriptorDataInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCaptureDescriptorDataInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCaptureDescriptorDataInfoEXT(segment); } + + /// Creates `VkBufferCaptureDescriptorDataInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCaptureDescriptorDataInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCaptureDescriptorDataInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferCaptureDescriptorDataInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCaptureDescriptorDataInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCaptureDescriptorDataInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferCaptureDescriptorDataInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferCaptureDescriptorDataInfoEXT` + public static VkBufferCaptureDescriptorDataInfoEXT alloc(SegmentAllocator allocator) { return new VkBufferCaptureDescriptorDataInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferCaptureDescriptorDataInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferCaptureDescriptorDataInfoEXT` + public static VkBufferCaptureDescriptorDataInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkBufferCaptureDescriptorDataInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferCaptureDescriptorDataInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferCaptureDescriptorDataInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferCaptureDescriptorDataInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferCaptureDescriptorDataInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCaptureDescriptorDataInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferCaptureDescriptorDataInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCaptureDescriptorDataInfoEXT sType(@CType("VkStructureType") int value) { VkBufferCaptureDescriptorDataInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferCaptureDescriptorDataInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferCaptureDescriptorDataInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferCaptureDescriptorDataInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCaptureDescriptorDataInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCaptureDescriptorDataInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCaptureDescriptorDataInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCaptureDescriptorDataInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCaptureDescriptorDataInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkBufferCaptureDescriptorDataInfoEXT.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkBufferCaptureDescriptorDataInfoEXT.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkBufferCaptureDescriptorDataInfoEXT.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferCaptureDescriptorDataInfoEXT.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCaptureDescriptorDataInfoEXT bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferCaptureDescriptorDataInfoEXT.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCaptureDescriptorDataInfoEXT buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferCaptureDescriptorDataInfoEXT.set_buffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBufferDeviceAddressCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBufferDeviceAddressCreateInfoEXT.java new file mode 100644 index 00000000..79fccef4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkBufferDeviceAddressCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceAddress +/// [VarHandle][#VH_deviceAddress] - [Getter][#deviceAddress()] - [Setter][#deviceAddress(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferDeviceAddressCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceAddress deviceAddress; +/// } VkBufferDeviceAddressCreateInfoEXT; +/// ``` +public final class VkBufferDeviceAddressCreateInfoEXT extends Struct { + /// The struct layout of `VkBufferDeviceAddressCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("deviceAddress") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_deviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceAddress")); + + /// Creates `VkBufferDeviceAddressCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkBufferDeviceAddressCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferDeviceAddressCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferDeviceAddressCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferDeviceAddressCreateInfoEXT(segment); } + + /// Creates `VkBufferDeviceAddressCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferDeviceAddressCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferDeviceAddressCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferDeviceAddressCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferDeviceAddressCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferDeviceAddressCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferDeviceAddressCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferDeviceAddressCreateInfoEXT` + public static VkBufferDeviceAddressCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkBufferDeviceAddressCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferDeviceAddressCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferDeviceAddressCreateInfoEXT` + public static VkBufferDeviceAddressCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkBufferDeviceAddressCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferDeviceAddressCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferDeviceAddressCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferDeviceAddressCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferDeviceAddressCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferDeviceAddressCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressCreateInfoEXT sType(@CType("VkStructureType") int value) { VkBufferDeviceAddressCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferDeviceAddressCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferDeviceAddressCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferDeviceAddressCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferDeviceAddressCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferDeviceAddressCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferDeviceAddressCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment, long index) { return (long) VH_deviceAddress.get(segment, 0L, index); } + /// {@return `deviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment) { return VkBufferDeviceAddressCreateInfoEXT.get_deviceAddress(segment, 0L); } + /// {@return `deviceAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long deviceAddressAt(long index) { return VkBufferDeviceAddressCreateInfoEXT.get_deviceAddress(this.segment(), index); } + /// {@return `deviceAddress`} + public @CType("VkDeviceAddress") long deviceAddress() { return VkBufferDeviceAddressCreateInfoEXT.get_deviceAddress(this.segment()); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_deviceAddress.set(segment, 0L, index, value); } + /// Sets `deviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkBufferDeviceAddressCreateInfoEXT.set_deviceAddress(segment, 0L, value); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressCreateInfoEXT deviceAddressAt(long index, @CType("VkDeviceAddress") long value) { VkBufferDeviceAddressCreateInfoEXT.set_deviceAddress(this.segment(), index, value); return this; } + /// Sets `deviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressCreateInfoEXT deviceAddress(@CType("VkDeviceAddress") long value) { VkBufferDeviceAddressCreateInfoEXT.set_deviceAddress(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkColorBlendAdvancedEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkColorBlendAdvancedEXT.java new file mode 100644 index 00000000..9bc23eb7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkColorBlendAdvancedEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### advancedBlendOp +/// [VarHandle][#VH_advancedBlendOp] - [Getter][#advancedBlendOp()] - [Setter][#advancedBlendOp(int)] +/// ### srcPremultiplied +/// [VarHandle][#VH_srcPremultiplied] - [Getter][#srcPremultiplied()] - [Setter][#srcPremultiplied(int)] +/// ### dstPremultiplied +/// [VarHandle][#VH_dstPremultiplied] - [Getter][#dstPremultiplied()] - [Setter][#dstPremultiplied(int)] +/// ### blendOverlap +/// [VarHandle][#VH_blendOverlap] - [Getter][#blendOverlap()] - [Setter][#blendOverlap(int)] +/// ### clampResults +/// [VarHandle][#VH_clampResults] - [Getter][#clampResults()] - [Setter][#clampResults(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkColorBlendAdvancedEXT { +/// VkBlendOp advancedBlendOp; +/// VkBool32 srcPremultiplied; +/// VkBool32 dstPremultiplied; +/// VkBlendOverlapEXT blendOverlap; +/// VkBool32 clampResults; +/// } VkColorBlendAdvancedEXT; +/// ``` +public final class VkColorBlendAdvancedEXT extends Struct { + /// The struct layout of `VkColorBlendAdvancedEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("advancedBlendOp"), + ValueLayout.JAVA_INT.withName("srcPremultiplied"), + ValueLayout.JAVA_INT.withName("dstPremultiplied"), + ValueLayout.JAVA_INT.withName("blendOverlap"), + ValueLayout.JAVA_INT.withName("clampResults") + ); + /// The [VarHandle] of `advancedBlendOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_advancedBlendOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("advancedBlendOp")); + /// The [VarHandle] of `srcPremultiplied` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcPremultiplied = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcPremultiplied")); + /// The [VarHandle] of `dstPremultiplied` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstPremultiplied = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstPremultiplied")); + /// The [VarHandle] of `blendOverlap` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blendOverlap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blendOverlap")); + /// The [VarHandle] of `clampResults` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_clampResults = LAYOUT.arrayElementVarHandle(PathElement.groupElement("clampResults")); + + /// Creates `VkColorBlendAdvancedEXT` with the given segment. + /// @param segment the memory segment + public VkColorBlendAdvancedEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkColorBlendAdvancedEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkColorBlendAdvancedEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkColorBlendAdvancedEXT(segment); } + + /// Creates `VkColorBlendAdvancedEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkColorBlendAdvancedEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkColorBlendAdvancedEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkColorBlendAdvancedEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkColorBlendAdvancedEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkColorBlendAdvancedEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkColorBlendAdvancedEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkColorBlendAdvancedEXT` + public static VkColorBlendAdvancedEXT alloc(SegmentAllocator allocator) { return new VkColorBlendAdvancedEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkColorBlendAdvancedEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkColorBlendAdvancedEXT` + public static VkColorBlendAdvancedEXT alloc(SegmentAllocator allocator, long count) { return new VkColorBlendAdvancedEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `advancedBlendOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendOp") int get_advancedBlendOp(MemorySegment segment, long index) { return (int) VH_advancedBlendOp.get(segment, 0L, index); } + /// {@return `advancedBlendOp`} + /// @param segment the segment of the struct + public static @CType("VkBlendOp") int get_advancedBlendOp(MemorySegment segment) { return VkColorBlendAdvancedEXT.get_advancedBlendOp(segment, 0L); } + /// {@return `advancedBlendOp` at the given index} + /// @param index the index + public @CType("VkBlendOp") int advancedBlendOpAt(long index) { return VkColorBlendAdvancedEXT.get_advancedBlendOp(this.segment(), index); } + /// {@return `advancedBlendOp`} + public @CType("VkBlendOp") int advancedBlendOp() { return VkColorBlendAdvancedEXT.get_advancedBlendOp(this.segment()); } + /// Sets `advancedBlendOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_advancedBlendOp(MemorySegment segment, long index, @CType("VkBlendOp") int value) { VH_advancedBlendOp.set(segment, 0L, index, value); } + /// Sets `advancedBlendOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_advancedBlendOp(MemorySegment segment, @CType("VkBlendOp") int value) { VkColorBlendAdvancedEXT.set_advancedBlendOp(segment, 0L, value); } + /// Sets `advancedBlendOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendAdvancedEXT advancedBlendOpAt(long index, @CType("VkBlendOp") int value) { VkColorBlendAdvancedEXT.set_advancedBlendOp(this.segment(), index, value); return this; } + /// Sets `advancedBlendOp` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendAdvancedEXT advancedBlendOp(@CType("VkBlendOp") int value) { VkColorBlendAdvancedEXT.set_advancedBlendOp(this.segment(), value); return this; } + + /// {@return `srcPremultiplied` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_srcPremultiplied(MemorySegment segment, long index) { return (int) VH_srcPremultiplied.get(segment, 0L, index); } + /// {@return `srcPremultiplied`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_srcPremultiplied(MemorySegment segment) { return VkColorBlendAdvancedEXT.get_srcPremultiplied(segment, 0L); } + /// {@return `srcPremultiplied` at the given index} + /// @param index the index + public @CType("VkBool32") int srcPremultipliedAt(long index) { return VkColorBlendAdvancedEXT.get_srcPremultiplied(this.segment(), index); } + /// {@return `srcPremultiplied`} + public @CType("VkBool32") int srcPremultiplied() { return VkColorBlendAdvancedEXT.get_srcPremultiplied(this.segment()); } + /// Sets `srcPremultiplied` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcPremultiplied(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_srcPremultiplied.set(segment, 0L, index, value); } + /// Sets `srcPremultiplied` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcPremultiplied(MemorySegment segment, @CType("VkBool32") int value) { VkColorBlendAdvancedEXT.set_srcPremultiplied(segment, 0L, value); } + /// Sets `srcPremultiplied` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendAdvancedEXT srcPremultipliedAt(long index, @CType("VkBool32") int value) { VkColorBlendAdvancedEXT.set_srcPremultiplied(this.segment(), index, value); return this; } + /// Sets `srcPremultiplied` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendAdvancedEXT srcPremultiplied(@CType("VkBool32") int value) { VkColorBlendAdvancedEXT.set_srcPremultiplied(this.segment(), value); return this; } + + /// {@return `dstPremultiplied` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dstPremultiplied(MemorySegment segment, long index) { return (int) VH_dstPremultiplied.get(segment, 0L, index); } + /// {@return `dstPremultiplied`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dstPremultiplied(MemorySegment segment) { return VkColorBlendAdvancedEXT.get_dstPremultiplied(segment, 0L); } + /// {@return `dstPremultiplied` at the given index} + /// @param index the index + public @CType("VkBool32") int dstPremultipliedAt(long index) { return VkColorBlendAdvancedEXT.get_dstPremultiplied(this.segment(), index); } + /// {@return `dstPremultiplied`} + public @CType("VkBool32") int dstPremultiplied() { return VkColorBlendAdvancedEXT.get_dstPremultiplied(this.segment()); } + /// Sets `dstPremultiplied` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstPremultiplied(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dstPremultiplied.set(segment, 0L, index, value); } + /// Sets `dstPremultiplied` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstPremultiplied(MemorySegment segment, @CType("VkBool32") int value) { VkColorBlendAdvancedEXT.set_dstPremultiplied(segment, 0L, value); } + /// Sets `dstPremultiplied` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendAdvancedEXT dstPremultipliedAt(long index, @CType("VkBool32") int value) { VkColorBlendAdvancedEXT.set_dstPremultiplied(this.segment(), index, value); return this; } + /// Sets `dstPremultiplied` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendAdvancedEXT dstPremultiplied(@CType("VkBool32") int value) { VkColorBlendAdvancedEXT.set_dstPremultiplied(this.segment(), value); return this; } + + /// {@return `blendOverlap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendOverlapEXT") int get_blendOverlap(MemorySegment segment, long index) { return (int) VH_blendOverlap.get(segment, 0L, index); } + /// {@return `blendOverlap`} + /// @param segment the segment of the struct + public static @CType("VkBlendOverlapEXT") int get_blendOverlap(MemorySegment segment) { return VkColorBlendAdvancedEXT.get_blendOverlap(segment, 0L); } + /// {@return `blendOverlap` at the given index} + /// @param index the index + public @CType("VkBlendOverlapEXT") int blendOverlapAt(long index) { return VkColorBlendAdvancedEXT.get_blendOverlap(this.segment(), index); } + /// {@return `blendOverlap`} + public @CType("VkBlendOverlapEXT") int blendOverlap() { return VkColorBlendAdvancedEXT.get_blendOverlap(this.segment()); } + /// Sets `blendOverlap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blendOverlap(MemorySegment segment, long index, @CType("VkBlendOverlapEXT") int value) { VH_blendOverlap.set(segment, 0L, index, value); } + /// Sets `blendOverlap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blendOverlap(MemorySegment segment, @CType("VkBlendOverlapEXT") int value) { VkColorBlendAdvancedEXT.set_blendOverlap(segment, 0L, value); } + /// Sets `blendOverlap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendAdvancedEXT blendOverlapAt(long index, @CType("VkBlendOverlapEXT") int value) { VkColorBlendAdvancedEXT.set_blendOverlap(this.segment(), index, value); return this; } + /// Sets `blendOverlap` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendAdvancedEXT blendOverlap(@CType("VkBlendOverlapEXT") int value) { VkColorBlendAdvancedEXT.set_blendOverlap(this.segment(), value); return this; } + + /// {@return `clampResults` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_clampResults(MemorySegment segment, long index) { return (int) VH_clampResults.get(segment, 0L, index); } + /// {@return `clampResults`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_clampResults(MemorySegment segment) { return VkColorBlendAdvancedEXT.get_clampResults(segment, 0L); } + /// {@return `clampResults` at the given index} + /// @param index the index + public @CType("VkBool32") int clampResultsAt(long index) { return VkColorBlendAdvancedEXT.get_clampResults(this.segment(), index); } + /// {@return `clampResults`} + public @CType("VkBool32") int clampResults() { return VkColorBlendAdvancedEXT.get_clampResults(this.segment()); } + /// Sets `clampResults` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_clampResults(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_clampResults.set(segment, 0L, index, value); } + /// Sets `clampResults` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_clampResults(MemorySegment segment, @CType("VkBool32") int value) { VkColorBlendAdvancedEXT.set_clampResults(segment, 0L, value); } + /// Sets `clampResults` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendAdvancedEXT clampResultsAt(long index, @CType("VkBool32") int value) { VkColorBlendAdvancedEXT.set_clampResults(this.segment(), index, value); return this; } + /// Sets `clampResults` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendAdvancedEXT clampResults(@CType("VkBool32") int value) { VkColorBlendAdvancedEXT.set_clampResults(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkColorBlendEquationEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkColorBlendEquationEXT.java new file mode 100644 index 00000000..19289cbf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkColorBlendEquationEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### srcColorBlendFactor +/// [VarHandle][#VH_srcColorBlendFactor] - [Getter][#srcColorBlendFactor()] - [Setter][#srcColorBlendFactor(int)] +/// ### dstColorBlendFactor +/// [VarHandle][#VH_dstColorBlendFactor] - [Getter][#dstColorBlendFactor()] - [Setter][#dstColorBlendFactor(int)] +/// ### colorBlendOp +/// [VarHandle][#VH_colorBlendOp] - [Getter][#colorBlendOp()] - [Setter][#colorBlendOp(int)] +/// ### srcAlphaBlendFactor +/// [VarHandle][#VH_srcAlphaBlendFactor] - [Getter][#srcAlphaBlendFactor()] - [Setter][#srcAlphaBlendFactor(int)] +/// ### dstAlphaBlendFactor +/// [VarHandle][#VH_dstAlphaBlendFactor] - [Getter][#dstAlphaBlendFactor()] - [Setter][#dstAlphaBlendFactor(int)] +/// ### alphaBlendOp +/// [VarHandle][#VH_alphaBlendOp] - [Getter][#alphaBlendOp()] - [Setter][#alphaBlendOp(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkColorBlendEquationEXT { +/// VkBlendFactor srcColorBlendFactor; +/// VkBlendFactor dstColorBlendFactor; +/// VkBlendOp colorBlendOp; +/// VkBlendFactor srcAlphaBlendFactor; +/// VkBlendFactor dstAlphaBlendFactor; +/// VkBlendOp alphaBlendOp; +/// } VkColorBlendEquationEXT; +/// ``` +public final class VkColorBlendEquationEXT extends Struct { + /// The struct layout of `VkColorBlendEquationEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("srcColorBlendFactor"), + ValueLayout.JAVA_INT.withName("dstColorBlendFactor"), + ValueLayout.JAVA_INT.withName("colorBlendOp"), + ValueLayout.JAVA_INT.withName("srcAlphaBlendFactor"), + ValueLayout.JAVA_INT.withName("dstAlphaBlendFactor"), + ValueLayout.JAVA_INT.withName("alphaBlendOp") + ); + /// The [VarHandle] of `srcColorBlendFactor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcColorBlendFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcColorBlendFactor")); + /// The [VarHandle] of `dstColorBlendFactor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstColorBlendFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstColorBlendFactor")); + /// The [VarHandle] of `colorBlendOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorBlendOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorBlendOp")); + /// The [VarHandle] of `srcAlphaBlendFactor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcAlphaBlendFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAlphaBlendFactor")); + /// The [VarHandle] of `dstAlphaBlendFactor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstAlphaBlendFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAlphaBlendFactor")); + /// The [VarHandle] of `alphaBlendOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_alphaBlendOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("alphaBlendOp")); + + /// Creates `VkColorBlendEquationEXT` with the given segment. + /// @param segment the memory segment + public VkColorBlendEquationEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkColorBlendEquationEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkColorBlendEquationEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkColorBlendEquationEXT(segment); } + + /// Creates `VkColorBlendEquationEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkColorBlendEquationEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkColorBlendEquationEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkColorBlendEquationEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkColorBlendEquationEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkColorBlendEquationEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkColorBlendEquationEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkColorBlendEquationEXT` + public static VkColorBlendEquationEXT alloc(SegmentAllocator allocator) { return new VkColorBlendEquationEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkColorBlendEquationEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkColorBlendEquationEXT` + public static VkColorBlendEquationEXT alloc(SegmentAllocator allocator, long count) { return new VkColorBlendEquationEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `srcColorBlendFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendFactor") int get_srcColorBlendFactor(MemorySegment segment, long index) { return (int) VH_srcColorBlendFactor.get(segment, 0L, index); } + /// {@return `srcColorBlendFactor`} + /// @param segment the segment of the struct + public static @CType("VkBlendFactor") int get_srcColorBlendFactor(MemorySegment segment) { return VkColorBlendEquationEXT.get_srcColorBlendFactor(segment, 0L); } + /// {@return `srcColorBlendFactor` at the given index} + /// @param index the index + public @CType("VkBlendFactor") int srcColorBlendFactorAt(long index) { return VkColorBlendEquationEXT.get_srcColorBlendFactor(this.segment(), index); } + /// {@return `srcColorBlendFactor`} + public @CType("VkBlendFactor") int srcColorBlendFactor() { return VkColorBlendEquationEXT.get_srcColorBlendFactor(this.segment()); } + /// Sets `srcColorBlendFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcColorBlendFactor(MemorySegment segment, long index, @CType("VkBlendFactor") int value) { VH_srcColorBlendFactor.set(segment, 0L, index, value); } + /// Sets `srcColorBlendFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcColorBlendFactor(MemorySegment segment, @CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_srcColorBlendFactor(segment, 0L, value); } + /// Sets `srcColorBlendFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT srcColorBlendFactorAt(long index, @CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_srcColorBlendFactor(this.segment(), index, value); return this; } + /// Sets `srcColorBlendFactor` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT srcColorBlendFactor(@CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_srcColorBlendFactor(this.segment(), value); return this; } + + /// {@return `dstColorBlendFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendFactor") int get_dstColorBlendFactor(MemorySegment segment, long index) { return (int) VH_dstColorBlendFactor.get(segment, 0L, index); } + /// {@return `dstColorBlendFactor`} + /// @param segment the segment of the struct + public static @CType("VkBlendFactor") int get_dstColorBlendFactor(MemorySegment segment) { return VkColorBlendEquationEXT.get_dstColorBlendFactor(segment, 0L); } + /// {@return `dstColorBlendFactor` at the given index} + /// @param index the index + public @CType("VkBlendFactor") int dstColorBlendFactorAt(long index) { return VkColorBlendEquationEXT.get_dstColorBlendFactor(this.segment(), index); } + /// {@return `dstColorBlendFactor`} + public @CType("VkBlendFactor") int dstColorBlendFactor() { return VkColorBlendEquationEXT.get_dstColorBlendFactor(this.segment()); } + /// Sets `dstColorBlendFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstColorBlendFactor(MemorySegment segment, long index, @CType("VkBlendFactor") int value) { VH_dstColorBlendFactor.set(segment, 0L, index, value); } + /// Sets `dstColorBlendFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstColorBlendFactor(MemorySegment segment, @CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_dstColorBlendFactor(segment, 0L, value); } + /// Sets `dstColorBlendFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT dstColorBlendFactorAt(long index, @CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_dstColorBlendFactor(this.segment(), index, value); return this; } + /// Sets `dstColorBlendFactor` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT dstColorBlendFactor(@CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_dstColorBlendFactor(this.segment(), value); return this; } + + /// {@return `colorBlendOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendOp") int get_colorBlendOp(MemorySegment segment, long index) { return (int) VH_colorBlendOp.get(segment, 0L, index); } + /// {@return `colorBlendOp`} + /// @param segment the segment of the struct + public static @CType("VkBlendOp") int get_colorBlendOp(MemorySegment segment) { return VkColorBlendEquationEXT.get_colorBlendOp(segment, 0L); } + /// {@return `colorBlendOp` at the given index} + /// @param index the index + public @CType("VkBlendOp") int colorBlendOpAt(long index) { return VkColorBlendEquationEXT.get_colorBlendOp(this.segment(), index); } + /// {@return `colorBlendOp`} + public @CType("VkBlendOp") int colorBlendOp() { return VkColorBlendEquationEXT.get_colorBlendOp(this.segment()); } + /// Sets `colorBlendOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorBlendOp(MemorySegment segment, long index, @CType("VkBlendOp") int value) { VH_colorBlendOp.set(segment, 0L, index, value); } + /// Sets `colorBlendOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorBlendOp(MemorySegment segment, @CType("VkBlendOp") int value) { VkColorBlendEquationEXT.set_colorBlendOp(segment, 0L, value); } + /// Sets `colorBlendOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT colorBlendOpAt(long index, @CType("VkBlendOp") int value) { VkColorBlendEquationEXT.set_colorBlendOp(this.segment(), index, value); return this; } + /// Sets `colorBlendOp` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT colorBlendOp(@CType("VkBlendOp") int value) { VkColorBlendEquationEXT.set_colorBlendOp(this.segment(), value); return this; } + + /// {@return `srcAlphaBlendFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendFactor") int get_srcAlphaBlendFactor(MemorySegment segment, long index) { return (int) VH_srcAlphaBlendFactor.get(segment, 0L, index); } + /// {@return `srcAlphaBlendFactor`} + /// @param segment the segment of the struct + public static @CType("VkBlendFactor") int get_srcAlphaBlendFactor(MemorySegment segment) { return VkColorBlendEquationEXT.get_srcAlphaBlendFactor(segment, 0L); } + /// {@return `srcAlphaBlendFactor` at the given index} + /// @param index the index + public @CType("VkBlendFactor") int srcAlphaBlendFactorAt(long index) { return VkColorBlendEquationEXT.get_srcAlphaBlendFactor(this.segment(), index); } + /// {@return `srcAlphaBlendFactor`} + public @CType("VkBlendFactor") int srcAlphaBlendFactor() { return VkColorBlendEquationEXT.get_srcAlphaBlendFactor(this.segment()); } + /// Sets `srcAlphaBlendFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAlphaBlendFactor(MemorySegment segment, long index, @CType("VkBlendFactor") int value) { VH_srcAlphaBlendFactor.set(segment, 0L, index, value); } + /// Sets `srcAlphaBlendFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAlphaBlendFactor(MemorySegment segment, @CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_srcAlphaBlendFactor(segment, 0L, value); } + /// Sets `srcAlphaBlendFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT srcAlphaBlendFactorAt(long index, @CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_srcAlphaBlendFactor(this.segment(), index, value); return this; } + /// Sets `srcAlphaBlendFactor` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT srcAlphaBlendFactor(@CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_srcAlphaBlendFactor(this.segment(), value); return this; } + + /// {@return `dstAlphaBlendFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendFactor") int get_dstAlphaBlendFactor(MemorySegment segment, long index) { return (int) VH_dstAlphaBlendFactor.get(segment, 0L, index); } + /// {@return `dstAlphaBlendFactor`} + /// @param segment the segment of the struct + public static @CType("VkBlendFactor") int get_dstAlphaBlendFactor(MemorySegment segment) { return VkColorBlendEquationEXT.get_dstAlphaBlendFactor(segment, 0L); } + /// {@return `dstAlphaBlendFactor` at the given index} + /// @param index the index + public @CType("VkBlendFactor") int dstAlphaBlendFactorAt(long index) { return VkColorBlendEquationEXT.get_dstAlphaBlendFactor(this.segment(), index); } + /// {@return `dstAlphaBlendFactor`} + public @CType("VkBlendFactor") int dstAlphaBlendFactor() { return VkColorBlendEquationEXT.get_dstAlphaBlendFactor(this.segment()); } + /// Sets `dstAlphaBlendFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAlphaBlendFactor(MemorySegment segment, long index, @CType("VkBlendFactor") int value) { VH_dstAlphaBlendFactor.set(segment, 0L, index, value); } + /// Sets `dstAlphaBlendFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAlphaBlendFactor(MemorySegment segment, @CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_dstAlphaBlendFactor(segment, 0L, value); } + /// Sets `dstAlphaBlendFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT dstAlphaBlendFactorAt(long index, @CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_dstAlphaBlendFactor(this.segment(), index, value); return this; } + /// Sets `dstAlphaBlendFactor` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT dstAlphaBlendFactor(@CType("VkBlendFactor") int value) { VkColorBlendEquationEXT.set_dstAlphaBlendFactor(this.segment(), value); return this; } + + /// {@return `alphaBlendOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendOp") int get_alphaBlendOp(MemorySegment segment, long index) { return (int) VH_alphaBlendOp.get(segment, 0L, index); } + /// {@return `alphaBlendOp`} + /// @param segment the segment of the struct + public static @CType("VkBlendOp") int get_alphaBlendOp(MemorySegment segment) { return VkColorBlendEquationEXT.get_alphaBlendOp(segment, 0L); } + /// {@return `alphaBlendOp` at the given index} + /// @param index the index + public @CType("VkBlendOp") int alphaBlendOpAt(long index) { return VkColorBlendEquationEXT.get_alphaBlendOp(this.segment(), index); } + /// {@return `alphaBlendOp`} + public @CType("VkBlendOp") int alphaBlendOp() { return VkColorBlendEquationEXT.get_alphaBlendOp(this.segment()); } + /// Sets `alphaBlendOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_alphaBlendOp(MemorySegment segment, long index, @CType("VkBlendOp") int value) { VH_alphaBlendOp.set(segment, 0L, index, value); } + /// Sets `alphaBlendOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_alphaBlendOp(MemorySegment segment, @CType("VkBlendOp") int value) { VkColorBlendEquationEXT.set_alphaBlendOp(segment, 0L, value); } + /// Sets `alphaBlendOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT alphaBlendOpAt(long index, @CType("VkBlendOp") int value) { VkColorBlendEquationEXT.set_alphaBlendOp(this.segment(), index, value); return this; } + /// Sets `alphaBlendOp` with the given value. + /// @param value the value + /// @return `this` + public VkColorBlendEquationEXT alphaBlendOp(@CType("VkBlendOp") int value) { VkColorBlendEquationEXT.set_alphaBlendOp(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCommandBufferInheritanceConditionalRenderingInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCommandBufferInheritanceConditionalRenderingInfoEXT.java new file mode 100644 index 00000000..4b462b1b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCommandBufferInheritanceConditionalRenderingInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### conditionalRenderingEnable +/// [VarHandle][#VH_conditionalRenderingEnable] - [Getter][#conditionalRenderingEnable()] - [Setter][#conditionalRenderingEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandBufferInheritanceConditionalRenderingInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 conditionalRenderingEnable; +/// } VkCommandBufferInheritanceConditionalRenderingInfoEXT; +/// ``` +public final class VkCommandBufferInheritanceConditionalRenderingInfoEXT extends Struct { + /// The struct layout of `VkCommandBufferInheritanceConditionalRenderingInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("conditionalRenderingEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `conditionalRenderingEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_conditionalRenderingEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conditionalRenderingEnable")); + + /// Creates `VkCommandBufferInheritanceConditionalRenderingInfoEXT` with the given segment. + /// @param segment the memory segment + public VkCommandBufferInheritanceConditionalRenderingInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandBufferInheritanceConditionalRenderingInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceConditionalRenderingInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceConditionalRenderingInfoEXT(segment); } + + /// Creates `VkCommandBufferInheritanceConditionalRenderingInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceConditionalRenderingInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceConditionalRenderingInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandBufferInheritanceConditionalRenderingInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceConditionalRenderingInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceConditionalRenderingInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandBufferInheritanceConditionalRenderingInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandBufferInheritanceConditionalRenderingInfoEXT` + public static VkCommandBufferInheritanceConditionalRenderingInfoEXT alloc(SegmentAllocator allocator) { return new VkCommandBufferInheritanceConditionalRenderingInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandBufferInheritanceConditionalRenderingInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandBufferInheritanceConditionalRenderingInfoEXT` + public static VkCommandBufferInheritanceConditionalRenderingInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkCommandBufferInheritanceConditionalRenderingInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandBufferInheritanceConditionalRenderingInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandBufferInheritanceConditionalRenderingInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandBufferInheritanceConditionalRenderingInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandBufferInheritanceConditionalRenderingInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceConditionalRenderingInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandBufferInheritanceConditionalRenderingInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceConditionalRenderingInfoEXT sType(@CType("VkStructureType") int value) { VkCommandBufferInheritanceConditionalRenderingInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandBufferInheritanceConditionalRenderingInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandBufferInheritanceConditionalRenderingInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCommandBufferInheritanceConditionalRenderingInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceConditionalRenderingInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceConditionalRenderingInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceConditionalRenderingInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceConditionalRenderingInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceConditionalRenderingInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `conditionalRenderingEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_conditionalRenderingEnable(MemorySegment segment, long index) { return (int) VH_conditionalRenderingEnable.get(segment, 0L, index); } + /// {@return `conditionalRenderingEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_conditionalRenderingEnable(MemorySegment segment) { return VkCommandBufferInheritanceConditionalRenderingInfoEXT.get_conditionalRenderingEnable(segment, 0L); } + /// {@return `conditionalRenderingEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int conditionalRenderingEnableAt(long index) { return VkCommandBufferInheritanceConditionalRenderingInfoEXT.get_conditionalRenderingEnable(this.segment(), index); } + /// {@return `conditionalRenderingEnable`} + public @CType("VkBool32") int conditionalRenderingEnable() { return VkCommandBufferInheritanceConditionalRenderingInfoEXT.get_conditionalRenderingEnable(this.segment()); } + /// Sets `conditionalRenderingEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conditionalRenderingEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_conditionalRenderingEnable.set(segment, 0L, index, value); } + /// Sets `conditionalRenderingEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conditionalRenderingEnable(MemorySegment segment, @CType("VkBool32") int value) { VkCommandBufferInheritanceConditionalRenderingInfoEXT.set_conditionalRenderingEnable(segment, 0L, value); } + /// Sets `conditionalRenderingEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceConditionalRenderingInfoEXT conditionalRenderingEnableAt(long index, @CType("VkBool32") int value) { VkCommandBufferInheritanceConditionalRenderingInfoEXT.set_conditionalRenderingEnable(this.segment(), index, value); return this; } + /// Sets `conditionalRenderingEnable` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceConditionalRenderingInfoEXT conditionalRenderingEnable(@CType("VkBool32") int value) { VkCommandBufferInheritanceConditionalRenderingInfoEXT.set_conditionalRenderingEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkConditionalRenderingBeginInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkConditionalRenderingBeginInfoEXT.java new file mode 100644 index 00000000..b8e185d3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkConditionalRenderingBeginInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkConditionalRenderingBeginInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkBuffer buffer; +/// VkDeviceSize offset; +/// VkConditionalRenderingFlagsEXT flags; +/// } VkConditionalRenderingBeginInfoEXT; +/// ``` +public final class VkConditionalRenderingBeginInfoEXT extends Struct { + /// The struct layout of `VkConditionalRenderingBeginInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("buffer"), + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkConditionalRenderingBeginInfoEXT` with the given segment. + /// @param segment the memory segment + public VkConditionalRenderingBeginInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkConditionalRenderingBeginInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkConditionalRenderingBeginInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkConditionalRenderingBeginInfoEXT(segment); } + + /// Creates `VkConditionalRenderingBeginInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkConditionalRenderingBeginInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkConditionalRenderingBeginInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkConditionalRenderingBeginInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkConditionalRenderingBeginInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkConditionalRenderingBeginInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkConditionalRenderingBeginInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkConditionalRenderingBeginInfoEXT` + public static VkConditionalRenderingBeginInfoEXT alloc(SegmentAllocator allocator) { return new VkConditionalRenderingBeginInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkConditionalRenderingBeginInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkConditionalRenderingBeginInfoEXT` + public static VkConditionalRenderingBeginInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkConditionalRenderingBeginInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkConditionalRenderingBeginInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkConditionalRenderingBeginInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkConditionalRenderingBeginInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkConditionalRenderingBeginInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkConditionalRenderingBeginInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkConditionalRenderingBeginInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkConditionalRenderingBeginInfoEXT sType(@CType("VkStructureType") int value) { VkConditionalRenderingBeginInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkConditionalRenderingBeginInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkConditionalRenderingBeginInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkConditionalRenderingBeginInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkConditionalRenderingBeginInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkConditionalRenderingBeginInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkConditionalRenderingBeginInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkConditionalRenderingBeginInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkConditionalRenderingBeginInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkConditionalRenderingBeginInfoEXT.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkConditionalRenderingBeginInfoEXT.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkConditionalRenderingBeginInfoEXT.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkConditionalRenderingBeginInfoEXT.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkConditionalRenderingBeginInfoEXT bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkConditionalRenderingBeginInfoEXT.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkConditionalRenderingBeginInfoEXT buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkConditionalRenderingBeginInfoEXT.set_buffer(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkConditionalRenderingBeginInfoEXT.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkConditionalRenderingBeginInfoEXT.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkConditionalRenderingBeginInfoEXT.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkConditionalRenderingBeginInfoEXT.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkConditionalRenderingBeginInfoEXT offsetAt(long index, @CType("VkDeviceSize") long value) { VkConditionalRenderingBeginInfoEXT.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkConditionalRenderingBeginInfoEXT offset(@CType("VkDeviceSize") long value) { VkConditionalRenderingBeginInfoEXT.set_offset(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkConditionalRenderingFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkConditionalRenderingFlagsEXT") int get_flags(MemorySegment segment) { return VkConditionalRenderingBeginInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkConditionalRenderingFlagsEXT") int flagsAt(long index) { return VkConditionalRenderingBeginInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkConditionalRenderingFlagsEXT") int flags() { return VkConditionalRenderingBeginInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkConditionalRenderingFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkConditionalRenderingFlagsEXT") int value) { VkConditionalRenderingBeginInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkConditionalRenderingBeginInfoEXT flagsAt(long index, @CType("VkConditionalRenderingFlagsEXT") int value) { VkConditionalRenderingBeginInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkConditionalRenderingBeginInfoEXT flags(@CType("VkConditionalRenderingFlagsEXT") int value) { VkConditionalRenderingBeginInfoEXT.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCopyMemoryToMicromapInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCopyMemoryToMicromapInfoEXT.java new file mode 100644 index 00000000..94ad2fd2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCopyMemoryToMicromapInfoEXT.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### src +/// [Byte offset][#OFFSET_src] - [Memory layout][#ML_src] - [Getter][#src()] - [Setter][#src(java.lang.foreign.MemorySegment)] +/// ### dst +/// [VarHandle][#VH_dst] - [Getter][#dst()] - [Setter][#dst(java.lang.foreign.MemorySegment)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyMemoryToMicromapInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceOrHostAddressConstKHR src; +/// VkMicromapEXT dst; +/// VkCopyMicromapModeEXT mode; +/// } VkCopyMemoryToMicromapInfoEXT; +/// ``` +public final class VkCopyMemoryToMicromapInfoEXT extends Struct { + /// The struct layout of `VkCopyMemoryToMicromapInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("src"), + ValueLayout.ADDRESS.withName("dst"), + ValueLayout.JAVA_INT.withName("mode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `src`. + public static final long OFFSET_src = LAYOUT.byteOffset(PathElement.groupElement("src")); + /// The memory layout of `src`. + public static final MemoryLayout ML_src = LAYOUT.select(PathElement.groupElement("src")); + /// The [VarHandle] of `dst` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dst = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dst")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + + /// Creates `VkCopyMemoryToMicromapInfoEXT` with the given segment. + /// @param segment the memory segment + public VkCopyMemoryToMicromapInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyMemoryToMicromapInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToMicromapInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToMicromapInfoEXT(segment); } + + /// Creates `VkCopyMemoryToMicromapInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToMicromapInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToMicromapInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyMemoryToMicromapInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToMicromapInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToMicromapInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyMemoryToMicromapInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyMemoryToMicromapInfoEXT` + public static VkCopyMemoryToMicromapInfoEXT alloc(SegmentAllocator allocator) { return new VkCopyMemoryToMicromapInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyMemoryToMicromapInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyMemoryToMicromapInfoEXT` + public static VkCopyMemoryToMicromapInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkCopyMemoryToMicromapInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyMemoryToMicromapInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyMemoryToMicromapInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyMemoryToMicromapInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyMemoryToMicromapInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToMicromapInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyMemoryToMicromapInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToMicromapInfoEXT sType(@CType("VkStructureType") int value) { VkCopyMemoryToMicromapInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyMemoryToMicromapInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyMemoryToMicromapInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyMemoryToMicromapInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToMicromapInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToMicromapInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToMicromapInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToMicromapInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToMicromapInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `src` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_src(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_src, index), ML_src); } + /// {@return `src`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_src(MemorySegment segment) { return VkCopyMemoryToMicromapInfoEXT.get_src(segment, 0L); } + /// {@return `src` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment srcAt(long index) { return VkCopyMemoryToMicromapInfoEXT.get_src(this.segment(), index); } + /// {@return `src`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment src() { return VkCopyMemoryToMicromapInfoEXT.get_src(this.segment()); } + /// Sets `src` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_src(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_src, index), ML_src.byteSize()); } + /// Sets `src` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_src(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkCopyMemoryToMicromapInfoEXT.set_src(segment, 0L, value); } + /// Sets `src` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToMicromapInfoEXT srcAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkCopyMemoryToMicromapInfoEXT.set_src(this.segment(), index, value); return this; } + /// Sets `src` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToMicromapInfoEXT src(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkCopyMemoryToMicromapInfoEXT.set_src(this.segment(), value); return this; } + + /// {@return `dst` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_dst(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dst.get(segment, 0L, index); } + /// {@return `dst`} + /// @param segment the segment of the struct + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_dst(MemorySegment segment) { return VkCopyMemoryToMicromapInfoEXT.get_dst(segment, 0L); } + /// {@return `dst` at the given index} + /// @param index the index + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment dstAt(long index) { return VkCopyMemoryToMicromapInfoEXT.get_dst(this.segment(), index); } + /// {@return `dst`} + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment dst() { return VkCopyMemoryToMicromapInfoEXT.get_dst(this.segment()); } + /// Sets `dst` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dst(MemorySegment segment, long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VH_dst.set(segment, 0L, index, value); } + /// Sets `dst` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dst(MemorySegment segment, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMemoryToMicromapInfoEXT.set_dst(segment, 0L, value); } + /// Sets `dst` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToMicromapInfoEXT dstAt(long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMemoryToMicromapInfoEXT.set_dst(this.segment(), index, value); return this; } + /// Sets `dst` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToMicromapInfoEXT dst(@CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMemoryToMicromapInfoEXT.set_dst(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCopyMicromapModeEXT") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkCopyMicromapModeEXT") int get_mode(MemorySegment segment) { return VkCopyMemoryToMicromapInfoEXT.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkCopyMicromapModeEXT") int modeAt(long index) { return VkCopyMemoryToMicromapInfoEXT.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkCopyMicromapModeEXT") int mode() { return VkCopyMemoryToMicromapInfoEXT.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkCopyMicromapModeEXT") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkCopyMicromapModeEXT") int value) { VkCopyMemoryToMicromapInfoEXT.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToMicromapInfoEXT modeAt(long index, @CType("VkCopyMicromapModeEXT") int value) { VkCopyMemoryToMicromapInfoEXT.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToMicromapInfoEXT mode(@CType("VkCopyMicromapModeEXT") int value) { VkCopyMemoryToMicromapInfoEXT.set_mode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCopyMicromapInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCopyMicromapInfoEXT.java new file mode 100644 index 00000000..994b565c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCopyMicromapInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### src +/// [VarHandle][#VH_src] - [Getter][#src()] - [Setter][#src(java.lang.foreign.MemorySegment)] +/// ### dst +/// [VarHandle][#VH_dst] - [Getter][#dst()] - [Setter][#dst(java.lang.foreign.MemorySegment)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyMicromapInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkMicromapEXT src; +/// VkMicromapEXT dst; +/// VkCopyMicromapModeEXT mode; +/// } VkCopyMicromapInfoEXT; +/// ``` +public final class VkCopyMicromapInfoEXT extends Struct { + /// The struct layout of `VkCopyMicromapInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("src"), + ValueLayout.ADDRESS.withName("dst"), + ValueLayout.JAVA_INT.withName("mode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `src` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_src = LAYOUT.arrayElementVarHandle(PathElement.groupElement("src")); + /// The [VarHandle] of `dst` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dst = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dst")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + + /// Creates `VkCopyMicromapInfoEXT` with the given segment. + /// @param segment the memory segment + public VkCopyMicromapInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyMicromapInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMicromapInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMicromapInfoEXT(segment); } + + /// Creates `VkCopyMicromapInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMicromapInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMicromapInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyMicromapInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMicromapInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMicromapInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyMicromapInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyMicromapInfoEXT` + public static VkCopyMicromapInfoEXT alloc(SegmentAllocator allocator) { return new VkCopyMicromapInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyMicromapInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyMicromapInfoEXT` + public static VkCopyMicromapInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkCopyMicromapInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyMicromapInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyMicromapInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyMicromapInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyMicromapInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMicromapInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyMicromapInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMicromapInfoEXT sType(@CType("VkStructureType") int value) { VkCopyMicromapInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyMicromapInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyMicromapInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyMicromapInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMicromapInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMicromapInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMicromapInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMicromapInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMicromapInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `src` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_src(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_src.get(segment, 0L, index); } + /// {@return `src`} + /// @param segment the segment of the struct + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_src(MemorySegment segment) { return VkCopyMicromapInfoEXT.get_src(segment, 0L); } + /// {@return `src` at the given index} + /// @param index the index + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment srcAt(long index) { return VkCopyMicromapInfoEXT.get_src(this.segment(), index); } + /// {@return `src`} + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment src() { return VkCopyMicromapInfoEXT.get_src(this.segment()); } + /// Sets `src` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_src(MemorySegment segment, long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VH_src.set(segment, 0L, index, value); } + /// Sets `src` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_src(MemorySegment segment, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMicromapInfoEXT.set_src(segment, 0L, value); } + /// Sets `src` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMicromapInfoEXT srcAt(long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMicromapInfoEXT.set_src(this.segment(), index, value); return this; } + /// Sets `src` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMicromapInfoEXT src(@CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMicromapInfoEXT.set_src(this.segment(), value); return this; } + + /// {@return `dst` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_dst(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dst.get(segment, 0L, index); } + /// {@return `dst`} + /// @param segment the segment of the struct + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_dst(MemorySegment segment) { return VkCopyMicromapInfoEXT.get_dst(segment, 0L); } + /// {@return `dst` at the given index} + /// @param index the index + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment dstAt(long index) { return VkCopyMicromapInfoEXT.get_dst(this.segment(), index); } + /// {@return `dst`} + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment dst() { return VkCopyMicromapInfoEXT.get_dst(this.segment()); } + /// Sets `dst` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dst(MemorySegment segment, long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VH_dst.set(segment, 0L, index, value); } + /// Sets `dst` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dst(MemorySegment segment, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMicromapInfoEXT.set_dst(segment, 0L, value); } + /// Sets `dst` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMicromapInfoEXT dstAt(long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMicromapInfoEXT.set_dst(this.segment(), index, value); return this; } + /// Sets `dst` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMicromapInfoEXT dst(@CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMicromapInfoEXT.set_dst(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCopyMicromapModeEXT") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkCopyMicromapModeEXT") int get_mode(MemorySegment segment) { return VkCopyMicromapInfoEXT.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkCopyMicromapModeEXT") int modeAt(long index) { return VkCopyMicromapInfoEXT.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkCopyMicromapModeEXT") int mode() { return VkCopyMicromapInfoEXT.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkCopyMicromapModeEXT") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkCopyMicromapModeEXT") int value) { VkCopyMicromapInfoEXT.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMicromapInfoEXT modeAt(long index, @CType("VkCopyMicromapModeEXT") int value) { VkCopyMicromapInfoEXT.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMicromapInfoEXT mode(@CType("VkCopyMicromapModeEXT") int value) { VkCopyMicromapInfoEXT.set_mode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCopyMicromapToMemoryInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCopyMicromapToMemoryInfoEXT.java new file mode 100644 index 00000000..f89661cb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkCopyMicromapToMemoryInfoEXT.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### src +/// [VarHandle][#VH_src] - [Getter][#src()] - [Setter][#src(java.lang.foreign.MemorySegment)] +/// ### dst +/// [Byte offset][#OFFSET_dst] - [Memory layout][#ML_dst] - [Getter][#dst()] - [Setter][#dst(java.lang.foreign.MemorySegment)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyMicromapToMemoryInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkMicromapEXT src; +/// VkDeviceOrHostAddressKHR dst; +/// VkCopyMicromapModeEXT mode; +/// } VkCopyMicromapToMemoryInfoEXT; +/// ``` +public final class VkCopyMicromapToMemoryInfoEXT extends Struct { + /// The struct layout of `VkCopyMicromapToMemoryInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("src"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressKHR.LAYOUT.withName("dst"), + ValueLayout.JAVA_INT.withName("mode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `src` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_src = LAYOUT.arrayElementVarHandle(PathElement.groupElement("src")); + /// The byte offset of `dst`. + public static final long OFFSET_dst = LAYOUT.byteOffset(PathElement.groupElement("dst")); + /// The memory layout of `dst`. + public static final MemoryLayout ML_dst = LAYOUT.select(PathElement.groupElement("dst")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + + /// Creates `VkCopyMicromapToMemoryInfoEXT` with the given segment. + /// @param segment the memory segment + public VkCopyMicromapToMemoryInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyMicromapToMemoryInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMicromapToMemoryInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMicromapToMemoryInfoEXT(segment); } + + /// Creates `VkCopyMicromapToMemoryInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMicromapToMemoryInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMicromapToMemoryInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyMicromapToMemoryInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMicromapToMemoryInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMicromapToMemoryInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyMicromapToMemoryInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyMicromapToMemoryInfoEXT` + public static VkCopyMicromapToMemoryInfoEXT alloc(SegmentAllocator allocator) { return new VkCopyMicromapToMemoryInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyMicromapToMemoryInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyMicromapToMemoryInfoEXT` + public static VkCopyMicromapToMemoryInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkCopyMicromapToMemoryInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyMicromapToMemoryInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyMicromapToMemoryInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyMicromapToMemoryInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyMicromapToMemoryInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMicromapToMemoryInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyMicromapToMemoryInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMicromapToMemoryInfoEXT sType(@CType("VkStructureType") int value) { VkCopyMicromapToMemoryInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyMicromapToMemoryInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyMicromapToMemoryInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyMicromapToMemoryInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMicromapToMemoryInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMicromapToMemoryInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMicromapToMemoryInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMicromapToMemoryInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMicromapToMemoryInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `src` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_src(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_src.get(segment, 0L, index); } + /// {@return `src`} + /// @param segment the segment of the struct + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_src(MemorySegment segment) { return VkCopyMicromapToMemoryInfoEXT.get_src(segment, 0L); } + /// {@return `src` at the given index} + /// @param index the index + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment srcAt(long index) { return VkCopyMicromapToMemoryInfoEXT.get_src(this.segment(), index); } + /// {@return `src`} + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment src() { return VkCopyMicromapToMemoryInfoEXT.get_src(this.segment()); } + /// Sets `src` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_src(MemorySegment segment, long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VH_src.set(segment, 0L, index, value); } + /// Sets `src` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_src(MemorySegment segment, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMicromapToMemoryInfoEXT.set_src(segment, 0L, value); } + /// Sets `src` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMicromapToMemoryInfoEXT srcAt(long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMicromapToMemoryInfoEXT.set_src(this.segment(), index, value); return this; } + /// Sets `src` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMicromapToMemoryInfoEXT src(@CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkCopyMicromapToMemoryInfoEXT.set_src(this.segment(), value); return this; } + + /// {@return `dst` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment get_dst(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dst, index), ML_dst); } + /// {@return `dst`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment get_dst(MemorySegment segment) { return VkCopyMicromapToMemoryInfoEXT.get_dst(segment, 0L); } + /// {@return `dst` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment dstAt(long index) { return VkCopyMicromapToMemoryInfoEXT.get_dst(this.segment(), index); } + /// {@return `dst`} + public @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment dst() { return VkCopyMicromapToMemoryInfoEXT.get_dst(this.segment()); } + /// Sets `dst` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dst(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dst, index), ML_dst.byteSize()); } + /// Sets `dst` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dst(MemorySegment segment, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkCopyMicromapToMemoryInfoEXT.set_dst(segment, 0L, value); } + /// Sets `dst` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMicromapToMemoryInfoEXT dstAt(long index, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkCopyMicromapToMemoryInfoEXT.set_dst(this.segment(), index, value); return this; } + /// Sets `dst` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMicromapToMemoryInfoEXT dst(@CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkCopyMicromapToMemoryInfoEXT.set_dst(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCopyMicromapModeEXT") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkCopyMicromapModeEXT") int get_mode(MemorySegment segment) { return VkCopyMicromapToMemoryInfoEXT.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkCopyMicromapModeEXT") int modeAt(long index) { return VkCopyMicromapToMemoryInfoEXT.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkCopyMicromapModeEXT") int mode() { return VkCopyMicromapToMemoryInfoEXT.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkCopyMicromapModeEXT") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkCopyMicromapModeEXT") int value) { VkCopyMicromapToMemoryInfoEXT.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMicromapToMemoryInfoEXT modeAt(long index, @CType("VkCopyMicromapModeEXT") int value) { VkCopyMicromapToMemoryInfoEXT.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMicromapToMemoryInfoEXT mode(@CType("VkCopyMicromapModeEXT") int value) { VkCopyMicromapToMemoryInfoEXT.set_mode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugMarkerMarkerInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugMarkerMarkerInfoEXT.java new file mode 100644 index 00000000..1a3828e0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugMarkerMarkerInfoEXT.java @@ -0,0 +1,238 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pMarkerName +/// [VarHandle][#VH_pMarkerName] - [Getter][#pMarkerName()] - [Setter][#pMarkerName(java.lang.foreign.MemorySegment)] +/// ### color +/// [Byte offset handle][#MH_color] - [Memory layout][#ML_color] - [Getter][#color(long)] - [Setter][#color(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDebugMarkerMarkerInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// const char * pMarkerName; +/// float[4] color; +/// } VkDebugMarkerMarkerInfoEXT; +/// ``` +public final class VkDebugMarkerMarkerInfoEXT extends Struct { + /// The struct layout of `VkDebugMarkerMarkerInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pMarkerName"), + MemoryLayout.sequenceLayout(4, ValueLayout.JAVA_FLOAT).withName("color") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pMarkerName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pMarkerName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pMarkerName")); + /// The byte offset handle of `color` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_color = LAYOUT.byteOffsetHandle(PathElement.groupElement("color"), PathElement.sequenceElement()); + /// The memory layout of `color`. + public static final MemoryLayout ML_color = LAYOUT.select(PathElement.groupElement("color")); + + /// Creates `VkDebugMarkerMarkerInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDebugMarkerMarkerInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDebugMarkerMarkerInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugMarkerMarkerInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugMarkerMarkerInfoEXT(segment); } + + /// Creates `VkDebugMarkerMarkerInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugMarkerMarkerInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugMarkerMarkerInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDebugMarkerMarkerInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugMarkerMarkerInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugMarkerMarkerInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDebugMarkerMarkerInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDebugMarkerMarkerInfoEXT` + public static VkDebugMarkerMarkerInfoEXT alloc(SegmentAllocator allocator) { return new VkDebugMarkerMarkerInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDebugMarkerMarkerInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDebugMarkerMarkerInfoEXT` + public static VkDebugMarkerMarkerInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDebugMarkerMarkerInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDebugMarkerMarkerInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDebugMarkerMarkerInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDebugMarkerMarkerInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDebugMarkerMarkerInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerMarkerInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDebugMarkerMarkerInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerMarkerInfoEXT sType(@CType("VkStructureType") int value) { VkDebugMarkerMarkerInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDebugMarkerMarkerInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDebugMarkerMarkerInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDebugMarkerMarkerInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerMarkerInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerMarkerInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerMarkerInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerMarkerInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerMarkerInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pMarkerName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pMarkerName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pMarkerName.get(segment, 0L, index); } + /// {@return `pMarkerName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pMarkerName(MemorySegment segment) { return VkDebugMarkerMarkerInfoEXT.get_pMarkerName(segment, 0L); } + /// {@return `pMarkerName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pMarkerNameAt(long index) { return VkDebugMarkerMarkerInfoEXT.get_pMarkerName(this.segment(), index); } + /// {@return `pMarkerName`} + public @CType("const char *") java.lang.foreign.MemorySegment pMarkerName() { return VkDebugMarkerMarkerInfoEXT.get_pMarkerName(this.segment()); } + /// Sets `pMarkerName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pMarkerName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pMarkerName.set(segment, 0L, index, value); } + /// Sets `pMarkerName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pMarkerName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugMarkerMarkerInfoEXT.set_pMarkerName(segment, 0L, value); } + /// Sets `pMarkerName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerMarkerInfoEXT pMarkerNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugMarkerMarkerInfoEXT.set_pMarkerName(this.segment(), index, value); return this; } + /// Sets `pMarkerName` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerMarkerInfoEXT pMarkerName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugMarkerMarkerInfoEXT.set_pMarkerName(this.segment(), value); return this; } + + /// {@return `color` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("float[4]") java.lang.foreign.MemorySegment get_color(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_color.invokeExact(0L, elementIndex), index), ML_color); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `color`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("float[4]") java.lang.foreign.MemorySegment get_color(MemorySegment segment, long elementIndex) { return VkDebugMarkerMarkerInfoEXT.get_color(segment, 0L, elementIndex); } + /// {@return `color` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("float[4]") java.lang.foreign.MemorySegment colorAt(long index, long elementIndex) { return VkDebugMarkerMarkerInfoEXT.get_color(this.segment(), index, elementIndex); } + /// {@return `color`} + /// @param elementIndex the index of the element + public @CType("float[4]") java.lang.foreign.MemorySegment color(long elementIndex) { return VkDebugMarkerMarkerInfoEXT.get_color(this.segment(), elementIndex); } + /// Sets `color` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_color(MemorySegment segment, long index, long elementIndex, @CType("float[4]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_color.invokeExact(0L, elementIndex), index), ML_color.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `color` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_color(MemorySegment segment, long elementIndex, @CType("float[4]") java.lang.foreign.MemorySegment value) { VkDebugMarkerMarkerInfoEXT.set_color(segment, 0L, elementIndex, value); } + /// Sets `color` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkDebugMarkerMarkerInfoEXT colorAt(long index, long elementIndex, @CType("float[4]") java.lang.foreign.MemorySegment value) { VkDebugMarkerMarkerInfoEXT.set_color(this.segment(), index, elementIndex, value); return this; } + /// Sets `color` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkDebugMarkerMarkerInfoEXT color(long elementIndex, @CType("float[4]") java.lang.foreign.MemorySegment value) { VkDebugMarkerMarkerInfoEXT.set_color(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugMarkerObjectNameInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugMarkerObjectNameInfoEXT.java new file mode 100644 index 00000000..cda37b24 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugMarkerObjectNameInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### objectType +/// [VarHandle][#VH_objectType] - [Getter][#objectType()] - [Setter][#objectType(int)] +/// ### object +/// [VarHandle][#VH_object] - [Getter][#object()] - [Setter][#object(long)] +/// ### pObjectName +/// [VarHandle][#VH_pObjectName] - [Getter][#pObjectName()] - [Setter][#pObjectName(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDebugMarkerObjectNameInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDebugReportObjectTypeEXT objectType; +/// uint64_t object; +/// const char * pObjectName; +/// } VkDebugMarkerObjectNameInfoEXT; +/// ``` +public final class VkDebugMarkerObjectNameInfoEXT extends Struct { + /// The struct layout of `VkDebugMarkerObjectNameInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("objectType"), + ValueLayout.JAVA_LONG.withName("object"), + ValueLayout.ADDRESS.withName("pObjectName") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `objectType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_objectType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectType")); + /// The [VarHandle] of `object` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_object = LAYOUT.arrayElementVarHandle(PathElement.groupElement("object")); + /// The [VarHandle] of `pObjectName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pObjectName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pObjectName")); + + /// Creates `VkDebugMarkerObjectNameInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDebugMarkerObjectNameInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDebugMarkerObjectNameInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugMarkerObjectNameInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugMarkerObjectNameInfoEXT(segment); } + + /// Creates `VkDebugMarkerObjectNameInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugMarkerObjectNameInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugMarkerObjectNameInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDebugMarkerObjectNameInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugMarkerObjectNameInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugMarkerObjectNameInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDebugMarkerObjectNameInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDebugMarkerObjectNameInfoEXT` + public static VkDebugMarkerObjectNameInfoEXT alloc(SegmentAllocator allocator) { return new VkDebugMarkerObjectNameInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDebugMarkerObjectNameInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDebugMarkerObjectNameInfoEXT` + public static VkDebugMarkerObjectNameInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDebugMarkerObjectNameInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDebugMarkerObjectNameInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDebugMarkerObjectNameInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDebugMarkerObjectNameInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDebugMarkerObjectNameInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectNameInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDebugMarkerObjectNameInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectNameInfoEXT sType(@CType("VkStructureType") int value) { VkDebugMarkerObjectNameInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDebugMarkerObjectNameInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDebugMarkerObjectNameInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDebugMarkerObjectNameInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectNameInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectNameInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectNameInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectNameInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectNameInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `objectType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDebugReportObjectTypeEXT") int get_objectType(MemorySegment segment, long index) { return (int) VH_objectType.get(segment, 0L, index); } + /// {@return `objectType`} + /// @param segment the segment of the struct + public static @CType("VkDebugReportObjectTypeEXT") int get_objectType(MemorySegment segment) { return VkDebugMarkerObjectNameInfoEXT.get_objectType(segment, 0L); } + /// {@return `objectType` at the given index} + /// @param index the index + public @CType("VkDebugReportObjectTypeEXT") int objectTypeAt(long index) { return VkDebugMarkerObjectNameInfoEXT.get_objectType(this.segment(), index); } + /// {@return `objectType`} + public @CType("VkDebugReportObjectTypeEXT") int objectType() { return VkDebugMarkerObjectNameInfoEXT.get_objectType(this.segment()); } + /// Sets `objectType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectType(MemorySegment segment, long index, @CType("VkDebugReportObjectTypeEXT") int value) { VH_objectType.set(segment, 0L, index, value); } + /// Sets `objectType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectType(MemorySegment segment, @CType("VkDebugReportObjectTypeEXT") int value) { VkDebugMarkerObjectNameInfoEXT.set_objectType(segment, 0L, value); } + /// Sets `objectType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectNameInfoEXT objectTypeAt(long index, @CType("VkDebugReportObjectTypeEXT") int value) { VkDebugMarkerObjectNameInfoEXT.set_objectType(this.segment(), index, value); return this; } + /// Sets `objectType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectNameInfoEXT objectType(@CType("VkDebugReportObjectTypeEXT") int value) { VkDebugMarkerObjectNameInfoEXT.set_objectType(this.segment(), value); return this; } + + /// {@return `object` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_object(MemorySegment segment, long index) { return (long) VH_object.get(segment, 0L, index); } + /// {@return `object`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_object(MemorySegment segment) { return VkDebugMarkerObjectNameInfoEXT.get_object(segment, 0L); } + /// {@return `object` at the given index} + /// @param index the index + public @CType("uint64_t") long objectAt(long index) { return VkDebugMarkerObjectNameInfoEXT.get_object(this.segment(), index); } + /// {@return `object`} + public @CType("uint64_t") long object() { return VkDebugMarkerObjectNameInfoEXT.get_object(this.segment()); } + /// Sets `object` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_object(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_object.set(segment, 0L, index, value); } + /// Sets `object` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_object(MemorySegment segment, @CType("uint64_t") long value) { VkDebugMarkerObjectNameInfoEXT.set_object(segment, 0L, value); } + /// Sets `object` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectNameInfoEXT objectAt(long index, @CType("uint64_t") long value) { VkDebugMarkerObjectNameInfoEXT.set_object(this.segment(), index, value); return this; } + /// Sets `object` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectNameInfoEXT object(@CType("uint64_t") long value) { VkDebugMarkerObjectNameInfoEXT.set_object(this.segment(), value); return this; } + + /// {@return `pObjectName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pObjectName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pObjectName.get(segment, 0L, index); } + /// {@return `pObjectName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pObjectName(MemorySegment segment) { return VkDebugMarkerObjectNameInfoEXT.get_pObjectName(segment, 0L); } + /// {@return `pObjectName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pObjectNameAt(long index) { return VkDebugMarkerObjectNameInfoEXT.get_pObjectName(this.segment(), index); } + /// {@return `pObjectName`} + public @CType("const char *") java.lang.foreign.MemorySegment pObjectName() { return VkDebugMarkerObjectNameInfoEXT.get_pObjectName(this.segment()); } + /// Sets `pObjectName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pObjectName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pObjectName.set(segment, 0L, index, value); } + /// Sets `pObjectName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pObjectName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectNameInfoEXT.set_pObjectName(segment, 0L, value); } + /// Sets `pObjectName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectNameInfoEXT pObjectNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectNameInfoEXT.set_pObjectName(this.segment(), index, value); return this; } + /// Sets `pObjectName` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectNameInfoEXT pObjectName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectNameInfoEXT.set_pObjectName(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugMarkerObjectTagInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugMarkerObjectTagInfoEXT.java new file mode 100644 index 00000000..99957823 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugMarkerObjectTagInfoEXT.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### objectType +/// [VarHandle][#VH_objectType] - [Getter][#objectType()] - [Setter][#objectType(int)] +/// ### object +/// [VarHandle][#VH_object] - [Getter][#object()] - [Setter][#object(long)] +/// ### tagName +/// [VarHandle][#VH_tagName] - [Getter][#tagName()] - [Setter][#tagName(long)] +/// ### tagSize +/// [VarHandle][#VH_tagSize] - [Getter][#tagSize()] - [Setter][#tagSize(long)] +/// ### pTag +/// [VarHandle][#VH_pTag] - [Getter][#pTag()] - [Setter][#pTag(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDebugMarkerObjectTagInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDebugReportObjectTypeEXT objectType; +/// uint64_t object; +/// uint64_t tagName; +/// size_t tagSize; +/// const void * pTag; +/// } VkDebugMarkerObjectTagInfoEXT; +/// ``` +public final class VkDebugMarkerObjectTagInfoEXT extends Struct { + /// The struct layout of `VkDebugMarkerObjectTagInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("objectType"), + ValueLayout.JAVA_LONG.withName("object"), + ValueLayout.JAVA_LONG.withName("tagName"), + ValueLayout.JAVA_LONG.withName("tagSize"), + ValueLayout.ADDRESS.withName("pTag") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `objectType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_objectType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectType")); + /// The [VarHandle] of `object` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_object = LAYOUT.arrayElementVarHandle(PathElement.groupElement("object")); + /// The [VarHandle] of `tagName` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_tagName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tagName")); + /// The [VarHandle] of `tagSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_tagSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tagSize")); + /// The [VarHandle] of `pTag` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTag")); + + /// Creates `VkDebugMarkerObjectTagInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDebugMarkerObjectTagInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDebugMarkerObjectTagInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugMarkerObjectTagInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugMarkerObjectTagInfoEXT(segment); } + + /// Creates `VkDebugMarkerObjectTagInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugMarkerObjectTagInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugMarkerObjectTagInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDebugMarkerObjectTagInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugMarkerObjectTagInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugMarkerObjectTagInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDebugMarkerObjectTagInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDebugMarkerObjectTagInfoEXT` + public static VkDebugMarkerObjectTagInfoEXT alloc(SegmentAllocator allocator) { return new VkDebugMarkerObjectTagInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDebugMarkerObjectTagInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDebugMarkerObjectTagInfoEXT` + public static VkDebugMarkerObjectTagInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDebugMarkerObjectTagInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDebugMarkerObjectTagInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDebugMarkerObjectTagInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDebugMarkerObjectTagInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDebugMarkerObjectTagInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDebugMarkerObjectTagInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT sType(@CType("VkStructureType") int value) { VkDebugMarkerObjectTagInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDebugMarkerObjectTagInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDebugMarkerObjectTagInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDebugMarkerObjectTagInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectTagInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectTagInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectTagInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `objectType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDebugReportObjectTypeEXT") int get_objectType(MemorySegment segment, long index) { return (int) VH_objectType.get(segment, 0L, index); } + /// {@return `objectType`} + /// @param segment the segment of the struct + public static @CType("VkDebugReportObjectTypeEXT") int get_objectType(MemorySegment segment) { return VkDebugMarkerObjectTagInfoEXT.get_objectType(segment, 0L); } + /// {@return `objectType` at the given index} + /// @param index the index + public @CType("VkDebugReportObjectTypeEXT") int objectTypeAt(long index) { return VkDebugMarkerObjectTagInfoEXT.get_objectType(this.segment(), index); } + /// {@return `objectType`} + public @CType("VkDebugReportObjectTypeEXT") int objectType() { return VkDebugMarkerObjectTagInfoEXT.get_objectType(this.segment()); } + /// Sets `objectType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectType(MemorySegment segment, long index, @CType("VkDebugReportObjectTypeEXT") int value) { VH_objectType.set(segment, 0L, index, value); } + /// Sets `objectType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectType(MemorySegment segment, @CType("VkDebugReportObjectTypeEXT") int value) { VkDebugMarkerObjectTagInfoEXT.set_objectType(segment, 0L, value); } + /// Sets `objectType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT objectTypeAt(long index, @CType("VkDebugReportObjectTypeEXT") int value) { VkDebugMarkerObjectTagInfoEXT.set_objectType(this.segment(), index, value); return this; } + /// Sets `objectType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT objectType(@CType("VkDebugReportObjectTypeEXT") int value) { VkDebugMarkerObjectTagInfoEXT.set_objectType(this.segment(), value); return this; } + + /// {@return `object` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_object(MemorySegment segment, long index) { return (long) VH_object.get(segment, 0L, index); } + /// {@return `object`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_object(MemorySegment segment) { return VkDebugMarkerObjectTagInfoEXT.get_object(segment, 0L); } + /// {@return `object` at the given index} + /// @param index the index + public @CType("uint64_t") long objectAt(long index) { return VkDebugMarkerObjectTagInfoEXT.get_object(this.segment(), index); } + /// {@return `object`} + public @CType("uint64_t") long object() { return VkDebugMarkerObjectTagInfoEXT.get_object(this.segment()); } + /// Sets `object` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_object(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_object.set(segment, 0L, index, value); } + /// Sets `object` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_object(MemorySegment segment, @CType("uint64_t") long value) { VkDebugMarkerObjectTagInfoEXT.set_object(segment, 0L, value); } + /// Sets `object` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT objectAt(long index, @CType("uint64_t") long value) { VkDebugMarkerObjectTagInfoEXT.set_object(this.segment(), index, value); return this; } + /// Sets `object` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT object(@CType("uint64_t") long value) { VkDebugMarkerObjectTagInfoEXT.set_object(this.segment(), value); return this; } + + /// {@return `tagName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_tagName(MemorySegment segment, long index) { return (long) VH_tagName.get(segment, 0L, index); } + /// {@return `tagName`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_tagName(MemorySegment segment) { return VkDebugMarkerObjectTagInfoEXT.get_tagName(segment, 0L); } + /// {@return `tagName` at the given index} + /// @param index the index + public @CType("uint64_t") long tagNameAt(long index) { return VkDebugMarkerObjectTagInfoEXT.get_tagName(this.segment(), index); } + /// {@return `tagName`} + public @CType("uint64_t") long tagName() { return VkDebugMarkerObjectTagInfoEXT.get_tagName(this.segment()); } + /// Sets `tagName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tagName(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_tagName.set(segment, 0L, index, value); } + /// Sets `tagName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tagName(MemorySegment segment, @CType("uint64_t") long value) { VkDebugMarkerObjectTagInfoEXT.set_tagName(segment, 0L, value); } + /// Sets `tagName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT tagNameAt(long index, @CType("uint64_t") long value) { VkDebugMarkerObjectTagInfoEXT.set_tagName(this.segment(), index, value); return this; } + /// Sets `tagName` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT tagName(@CType("uint64_t") long value) { VkDebugMarkerObjectTagInfoEXT.set_tagName(this.segment(), value); return this; } + + /// {@return `tagSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_tagSize(MemorySegment segment, long index) { return (long) VH_tagSize.get(segment, 0L, index); } + /// {@return `tagSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_tagSize(MemorySegment segment) { return VkDebugMarkerObjectTagInfoEXT.get_tagSize(segment, 0L); } + /// {@return `tagSize` at the given index} + /// @param index the index + public @CType("size_t") long tagSizeAt(long index) { return VkDebugMarkerObjectTagInfoEXT.get_tagSize(this.segment(), index); } + /// {@return `tagSize`} + public @CType("size_t") long tagSize() { return VkDebugMarkerObjectTagInfoEXT.get_tagSize(this.segment()); } + /// Sets `tagSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tagSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_tagSize.set(segment, 0L, index, value); } + /// Sets `tagSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tagSize(MemorySegment segment, @CType("size_t") long value) { VkDebugMarkerObjectTagInfoEXT.set_tagSize(segment, 0L, value); } + /// Sets `tagSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT tagSizeAt(long index, @CType("size_t") long value) { VkDebugMarkerObjectTagInfoEXT.set_tagSize(this.segment(), index, value); return this; } + /// Sets `tagSize` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT tagSize(@CType("size_t") long value) { VkDebugMarkerObjectTagInfoEXT.set_tagSize(this.segment(), value); return this; } + + /// {@return `pTag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pTag(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTag.get(segment, 0L, index); } + /// {@return `pTag`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pTag(MemorySegment segment) { return VkDebugMarkerObjectTagInfoEXT.get_pTag(segment, 0L); } + /// {@return `pTag` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pTagAt(long index) { return VkDebugMarkerObjectTagInfoEXT.get_pTag(this.segment(), index); } + /// {@return `pTag`} + public @CType("const void *") java.lang.foreign.MemorySegment pTag() { return VkDebugMarkerObjectTagInfoEXT.get_pTag(this.segment()); } + /// Sets `pTag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTag(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pTag.set(segment, 0L, index, value); } + /// Sets `pTag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTag(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectTagInfoEXT.set_pTag(segment, 0L, value); } + /// Sets `pTag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT pTagAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectTagInfoEXT.set_pTag(this.segment(), index, value); return this; } + /// Sets `pTag` with the given value. + /// @param value the value + /// @return `this` + public VkDebugMarkerObjectTagInfoEXT pTag(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugMarkerObjectTagInfoEXT.set_pTag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugReportCallbackCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugReportCallbackCreateInfoEXT.java new file mode 100644 index 00000000..2a30d617 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugReportCallbackCreateInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pfnCallback +/// [VarHandle][#VH_pfnCallback] - [Getter][#pfnCallback()] - [Setter][#pfnCallback(java.lang.foreign.MemorySegment)] +/// ### pUserData +/// [VarHandle][#VH_pUserData] - [Getter][#pUserData()] - [Setter][#pUserData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDebugReportCallbackCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDebugReportFlagsEXT flags; +/// PFN_vkDebugReportCallbackEXT pfnCallback; +/// void * pUserData; +/// } VkDebugReportCallbackCreateInfoEXT; +/// ``` +public final class VkDebugReportCallbackCreateInfoEXT extends Struct { + /// The struct layout of `VkDebugReportCallbackCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("pfnCallback"), + ValueLayout.ADDRESS.withName("pUserData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pfnCallback` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pfnCallback = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pfnCallback")); + /// The [VarHandle] of `pUserData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pUserData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pUserData")); + + /// Creates `VkDebugReportCallbackCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDebugReportCallbackCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDebugReportCallbackCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugReportCallbackCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugReportCallbackCreateInfoEXT(segment); } + + /// Creates `VkDebugReportCallbackCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugReportCallbackCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugReportCallbackCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDebugReportCallbackCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugReportCallbackCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugReportCallbackCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDebugReportCallbackCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDebugReportCallbackCreateInfoEXT` + public static VkDebugReportCallbackCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkDebugReportCallbackCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDebugReportCallbackCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDebugReportCallbackCreateInfoEXT` + public static VkDebugReportCallbackCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDebugReportCallbackCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDebugReportCallbackCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDebugReportCallbackCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDebugReportCallbackCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDebugReportCallbackCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugReportCallbackCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDebugReportCallbackCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugReportCallbackCreateInfoEXT sType(@CType("VkStructureType") int value) { VkDebugReportCallbackCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDebugReportCallbackCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDebugReportCallbackCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDebugReportCallbackCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugReportCallbackCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugReportCallbackCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugReportCallbackCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDebugReportCallbackCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugReportCallbackCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDebugReportFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDebugReportFlagsEXT") int get_flags(MemorySegment segment) { return VkDebugReportCallbackCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDebugReportFlagsEXT") int flagsAt(long index) { return VkDebugReportCallbackCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDebugReportFlagsEXT") int flags() { return VkDebugReportCallbackCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDebugReportFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDebugReportFlagsEXT") int value) { VkDebugReportCallbackCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugReportCallbackCreateInfoEXT flagsAt(long index, @CType("VkDebugReportFlagsEXT") int value) { VkDebugReportCallbackCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDebugReportCallbackCreateInfoEXT flags(@CType("VkDebugReportFlagsEXT") int value) { VkDebugReportCallbackCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `pfnCallback` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("PFN_vkDebugReportCallbackEXT") java.lang.foreign.MemorySegment get_pfnCallback(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pfnCallback.get(segment, 0L, index); } + /// {@return `pfnCallback`} + /// @param segment the segment of the struct + public static @CType("PFN_vkDebugReportCallbackEXT") java.lang.foreign.MemorySegment get_pfnCallback(MemorySegment segment) { return VkDebugReportCallbackCreateInfoEXT.get_pfnCallback(segment, 0L); } + /// {@return `pfnCallback` at the given index} + /// @param index the index + public @CType("PFN_vkDebugReportCallbackEXT") java.lang.foreign.MemorySegment pfnCallbackAt(long index) { return VkDebugReportCallbackCreateInfoEXT.get_pfnCallback(this.segment(), index); } + /// {@return `pfnCallback`} + public @CType("PFN_vkDebugReportCallbackEXT") java.lang.foreign.MemorySegment pfnCallback() { return VkDebugReportCallbackCreateInfoEXT.get_pfnCallback(this.segment()); } + /// Sets `pfnCallback` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pfnCallback(MemorySegment segment, long index, @CType("PFN_vkDebugReportCallbackEXT") java.lang.foreign.MemorySegment value) { VH_pfnCallback.set(segment, 0L, index, value); } + /// Sets `pfnCallback` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pfnCallback(MemorySegment segment, @CType("PFN_vkDebugReportCallbackEXT") java.lang.foreign.MemorySegment value) { VkDebugReportCallbackCreateInfoEXT.set_pfnCallback(segment, 0L, value); } + /// Sets `pfnCallback` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugReportCallbackCreateInfoEXT pfnCallbackAt(long index, @CType("PFN_vkDebugReportCallbackEXT") java.lang.foreign.MemorySegment value) { VkDebugReportCallbackCreateInfoEXT.set_pfnCallback(this.segment(), index, value); return this; } + /// Sets `pfnCallback` with the given value. + /// @param value the value + /// @return `this` + public VkDebugReportCallbackCreateInfoEXT pfnCallback(@CType("PFN_vkDebugReportCallbackEXT") java.lang.foreign.MemorySegment value) { VkDebugReportCallbackCreateInfoEXT.set_pfnCallback(this.segment(), value); return this; } + + /// {@return `pUserData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pUserData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pUserData.get(segment, 0L, index); } + /// {@return `pUserData`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pUserData(MemorySegment segment) { return VkDebugReportCallbackCreateInfoEXT.get_pUserData(segment, 0L); } + /// {@return `pUserData` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pUserDataAt(long index) { return VkDebugReportCallbackCreateInfoEXT.get_pUserData(this.segment(), index); } + /// {@return `pUserData`} + public @CType("void *") java.lang.foreign.MemorySegment pUserData() { return VkDebugReportCallbackCreateInfoEXT.get_pUserData(this.segment()); } + /// Sets `pUserData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pUserData(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pUserData.set(segment, 0L, index, value); } + /// Sets `pUserData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pUserData(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDebugReportCallbackCreateInfoEXT.set_pUserData(segment, 0L, value); } + /// Sets `pUserData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugReportCallbackCreateInfoEXT pUserDataAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDebugReportCallbackCreateInfoEXT.set_pUserData(this.segment(), index, value); return this; } + /// Sets `pUserData` with the given value. + /// @param value the value + /// @return `this` + public VkDebugReportCallbackCreateInfoEXT pUserData(@CType("void *") java.lang.foreign.MemorySegment value) { VkDebugReportCallbackCreateInfoEXT.set_pUserData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsLabelEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsLabelEXT.java new file mode 100644 index 00000000..8c4f4ee1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsLabelEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pLabelName +/// [VarHandle][#VH_pLabelName] - [Getter][#pLabelName()] - [Setter][#pLabelName(java.lang.foreign.MemorySegment)] +/// ### color +/// [VarHandle][#VH_color] - [Getter][#color()] - [Setter][#color(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDebugUtilsLabelEXT { +/// VkStructureType sType; +/// const void * pNext; +/// const char * pLabelName; +/// float color; +/// } VkDebugUtilsLabelEXT; +/// ``` +public final class VkDebugUtilsLabelEXT extends Struct { + /// The struct layout of `VkDebugUtilsLabelEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pLabelName"), + ValueLayout.JAVA_FLOAT.withName("color") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pLabelName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLabelName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLabelName")); + /// The [VarHandle] of `color` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_color = LAYOUT.arrayElementVarHandle(PathElement.groupElement("color")); + + /// Creates `VkDebugUtilsLabelEXT` with the given segment. + /// @param segment the memory segment + public VkDebugUtilsLabelEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDebugUtilsLabelEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsLabelEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsLabelEXT(segment); } + + /// Creates `VkDebugUtilsLabelEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsLabelEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsLabelEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDebugUtilsLabelEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsLabelEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsLabelEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDebugUtilsLabelEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDebugUtilsLabelEXT` + public static VkDebugUtilsLabelEXT alloc(SegmentAllocator allocator) { return new VkDebugUtilsLabelEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDebugUtilsLabelEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDebugUtilsLabelEXT` + public static VkDebugUtilsLabelEXT alloc(SegmentAllocator allocator, long count) { return new VkDebugUtilsLabelEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDebugUtilsLabelEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDebugUtilsLabelEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDebugUtilsLabelEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDebugUtilsLabelEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsLabelEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDebugUtilsLabelEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsLabelEXT sType(@CType("VkStructureType") int value) { VkDebugUtilsLabelEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDebugUtilsLabelEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDebugUtilsLabelEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDebugUtilsLabelEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsLabelEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsLabelEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsLabelEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsLabelEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsLabelEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pLabelName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pLabelName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLabelName.get(segment, 0L, index); } + /// {@return `pLabelName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pLabelName(MemorySegment segment) { return VkDebugUtilsLabelEXT.get_pLabelName(segment, 0L); } + /// {@return `pLabelName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pLabelNameAt(long index) { return VkDebugUtilsLabelEXT.get_pLabelName(this.segment(), index); } + /// {@return `pLabelName`} + public @CType("const char *") java.lang.foreign.MemorySegment pLabelName() { return VkDebugUtilsLabelEXT.get_pLabelName(this.segment()); } + /// Sets `pLabelName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLabelName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pLabelName.set(segment, 0L, index, value); } + /// Sets `pLabelName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLabelName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsLabelEXT.set_pLabelName(segment, 0L, value); } + /// Sets `pLabelName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsLabelEXT pLabelNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsLabelEXT.set_pLabelName(this.segment(), index, value); return this; } + /// Sets `pLabelName` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsLabelEXT pLabelName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsLabelEXT.set_pLabelName(this.segment(), value); return this; } + + /// {@return `color` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_color(MemorySegment segment, long index) { return (float) VH_color.get(segment, 0L, index); } + /// {@return `color`} + /// @param segment the segment of the struct + public static @CType("float") float get_color(MemorySegment segment) { return VkDebugUtilsLabelEXT.get_color(segment, 0L); } + /// {@return `color` at the given index} + /// @param index the index + public @CType("float") float colorAt(long index) { return VkDebugUtilsLabelEXT.get_color(this.segment(), index); } + /// {@return `color`} + public @CType("float") float color() { return VkDebugUtilsLabelEXT.get_color(this.segment()); } + /// Sets `color` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_color(MemorySegment segment, long index, @CType("float") float value) { VH_color.set(segment, 0L, index, value); } + /// Sets `color` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_color(MemorySegment segment, @CType("float") float value) { VkDebugUtilsLabelEXT.set_color(segment, 0L, value); } + /// Sets `color` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsLabelEXT colorAt(long index, @CType("float") float value) { VkDebugUtilsLabelEXT.set_color(this.segment(), index, value); return this; } + /// Sets `color` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsLabelEXT color(@CType("float") float value) { VkDebugUtilsLabelEXT.set_color(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsMessengerCallbackDataEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsMessengerCallbackDataEXT.java new file mode 100644 index 00000000..d04d5ccf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsMessengerCallbackDataEXT.java @@ -0,0 +1,518 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pMessageIdName +/// [VarHandle][#VH_pMessageIdName] - [Getter][#pMessageIdName()] - [Setter][#pMessageIdName(java.lang.foreign.MemorySegment)] +/// ### messageIdNumber +/// [VarHandle][#VH_messageIdNumber] - [Getter][#messageIdNumber()] - [Setter][#messageIdNumber(int)] +/// ### pMessage +/// [VarHandle][#VH_pMessage] - [Getter][#pMessage()] - [Setter][#pMessage(java.lang.foreign.MemorySegment)] +/// ### queueLabelCount +/// [VarHandle][#VH_queueLabelCount] - [Getter][#queueLabelCount()] - [Setter][#queueLabelCount(int)] +/// ### pQueueLabels +/// [VarHandle][#VH_pQueueLabels] - [Getter][#pQueueLabels()] - [Setter][#pQueueLabels(java.lang.foreign.MemorySegment)] +/// ### cmdBufLabelCount +/// [VarHandle][#VH_cmdBufLabelCount] - [Getter][#cmdBufLabelCount()] - [Setter][#cmdBufLabelCount(int)] +/// ### pCmdBufLabels +/// [VarHandle][#VH_pCmdBufLabels] - [Getter][#pCmdBufLabels()] - [Setter][#pCmdBufLabels(java.lang.foreign.MemorySegment)] +/// ### objectCount +/// [VarHandle][#VH_objectCount] - [Getter][#objectCount()] - [Setter][#objectCount(int)] +/// ### pObjects +/// [VarHandle][#VH_pObjects] - [Getter][#pObjects()] - [Setter][#pObjects(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDebugUtilsMessengerCallbackDataEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDebugUtilsMessengerCallbackDataFlagsEXT flags; +/// const char * pMessageIdName; +/// int32_t messageIdNumber; +/// const char * pMessage; +/// uint32_t queueLabelCount; +/// const VkDebugUtilsLabelEXT * pQueueLabels; +/// uint32_t cmdBufLabelCount; +/// const VkDebugUtilsLabelEXT * pCmdBufLabels; +/// uint32_t objectCount; +/// const VkDebugUtilsObjectNameInfoEXT * pObjects; +/// } VkDebugUtilsMessengerCallbackDataEXT; +/// ``` +public final class VkDebugUtilsMessengerCallbackDataEXT extends Struct { + /// The struct layout of `VkDebugUtilsMessengerCallbackDataEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("pMessageIdName"), + ValueLayout.JAVA_INT.withName("messageIdNumber"), + ValueLayout.ADDRESS.withName("pMessage"), + ValueLayout.JAVA_INT.withName("queueLabelCount"), + ValueLayout.ADDRESS.withName("pQueueLabels"), + ValueLayout.JAVA_INT.withName("cmdBufLabelCount"), + ValueLayout.ADDRESS.withName("pCmdBufLabels"), + ValueLayout.JAVA_INT.withName("objectCount"), + ValueLayout.ADDRESS.withName("pObjects") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pMessageIdName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pMessageIdName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pMessageIdName")); + /// The [VarHandle] of `messageIdNumber` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_messageIdNumber = LAYOUT.arrayElementVarHandle(PathElement.groupElement("messageIdNumber")); + /// The [VarHandle] of `pMessage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pMessage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pMessage")); + /// The [VarHandle] of `queueLabelCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueLabelCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueLabelCount")); + /// The [VarHandle] of `pQueueLabels` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pQueueLabels = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pQueueLabels")); + /// The [VarHandle] of `cmdBufLabelCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cmdBufLabelCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cmdBufLabelCount")); + /// The [VarHandle] of `pCmdBufLabels` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCmdBufLabels = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCmdBufLabels")); + /// The [VarHandle] of `objectCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_objectCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectCount")); + /// The [VarHandle] of `pObjects` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pObjects = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pObjects")); + + /// Creates `VkDebugUtilsMessengerCallbackDataEXT` with the given segment. + /// @param segment the memory segment + public VkDebugUtilsMessengerCallbackDataEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDebugUtilsMessengerCallbackDataEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsMessengerCallbackDataEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsMessengerCallbackDataEXT(segment); } + + /// Creates `VkDebugUtilsMessengerCallbackDataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsMessengerCallbackDataEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsMessengerCallbackDataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDebugUtilsMessengerCallbackDataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsMessengerCallbackDataEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsMessengerCallbackDataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDebugUtilsMessengerCallbackDataEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDebugUtilsMessengerCallbackDataEXT` + public static VkDebugUtilsMessengerCallbackDataEXT alloc(SegmentAllocator allocator) { return new VkDebugUtilsMessengerCallbackDataEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDebugUtilsMessengerCallbackDataEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDebugUtilsMessengerCallbackDataEXT` + public static VkDebugUtilsMessengerCallbackDataEXT alloc(SegmentAllocator allocator, long count) { return new VkDebugUtilsMessengerCallbackDataEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDebugUtilsMessengerCallbackDataEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT sType(@CType("VkStructureType") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDebugUtilsMessengerCallbackDataEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDebugUtilsMessengerCallbackDataFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDebugUtilsMessengerCallbackDataFlagsEXT") int get_flags(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDebugUtilsMessengerCallbackDataFlagsEXT") int flagsAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDebugUtilsMessengerCallbackDataFlagsEXT") int flags() { return VkDebugUtilsMessengerCallbackDataEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDebugUtilsMessengerCallbackDataFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDebugUtilsMessengerCallbackDataFlagsEXT") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT flagsAt(long index, @CType("VkDebugUtilsMessengerCallbackDataFlagsEXT") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT flags(@CType("VkDebugUtilsMessengerCallbackDataFlagsEXT") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_flags(this.segment(), value); return this; } + + /// {@return `pMessageIdName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pMessageIdName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pMessageIdName.get(segment, 0L, index); } + /// {@return `pMessageIdName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pMessageIdName(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_pMessageIdName(segment, 0L); } + /// {@return `pMessageIdName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pMessageIdNameAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_pMessageIdName(this.segment(), index); } + /// {@return `pMessageIdName`} + public @CType("const char *") java.lang.foreign.MemorySegment pMessageIdName() { return VkDebugUtilsMessengerCallbackDataEXT.get_pMessageIdName(this.segment()); } + /// Sets `pMessageIdName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pMessageIdName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pMessageIdName.set(segment, 0L, index, value); } + /// Sets `pMessageIdName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pMessageIdName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pMessageIdName(segment, 0L, value); } + /// Sets `pMessageIdName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pMessageIdNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pMessageIdName(this.segment(), index, value); return this; } + /// Sets `pMessageIdName` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pMessageIdName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pMessageIdName(this.segment(), value); return this; } + + /// {@return `messageIdNumber` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_messageIdNumber(MemorySegment segment, long index) { return (int) VH_messageIdNumber.get(segment, 0L, index); } + /// {@return `messageIdNumber`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_messageIdNumber(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_messageIdNumber(segment, 0L); } + /// {@return `messageIdNumber` at the given index} + /// @param index the index + public @CType("int32_t") int messageIdNumberAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_messageIdNumber(this.segment(), index); } + /// {@return `messageIdNumber`} + public @CType("int32_t") int messageIdNumber() { return VkDebugUtilsMessengerCallbackDataEXT.get_messageIdNumber(this.segment()); } + /// Sets `messageIdNumber` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_messageIdNumber(MemorySegment segment, long index, @CType("int32_t") int value) { VH_messageIdNumber.set(segment, 0L, index, value); } + /// Sets `messageIdNumber` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_messageIdNumber(MemorySegment segment, @CType("int32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_messageIdNumber(segment, 0L, value); } + /// Sets `messageIdNumber` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT messageIdNumberAt(long index, @CType("int32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_messageIdNumber(this.segment(), index, value); return this; } + /// Sets `messageIdNumber` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT messageIdNumber(@CType("int32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_messageIdNumber(this.segment(), value); return this; } + + /// {@return `pMessage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pMessage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pMessage.get(segment, 0L, index); } + /// {@return `pMessage`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pMessage(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_pMessage(segment, 0L); } + /// {@return `pMessage` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pMessageAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_pMessage(this.segment(), index); } + /// {@return `pMessage`} + public @CType("const char *") java.lang.foreign.MemorySegment pMessage() { return VkDebugUtilsMessengerCallbackDataEXT.get_pMessage(this.segment()); } + /// Sets `pMessage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pMessage(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pMessage.set(segment, 0L, index, value); } + /// Sets `pMessage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pMessage(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pMessage(segment, 0L, value); } + /// Sets `pMessage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pMessageAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pMessage(this.segment(), index, value); return this; } + /// Sets `pMessage` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pMessage(@CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pMessage(this.segment(), value); return this; } + + /// {@return `queueLabelCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueLabelCount(MemorySegment segment, long index) { return (int) VH_queueLabelCount.get(segment, 0L, index); } + /// {@return `queueLabelCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueLabelCount(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_queueLabelCount(segment, 0L); } + /// {@return `queueLabelCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queueLabelCountAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_queueLabelCount(this.segment(), index); } + /// {@return `queueLabelCount`} + public @CType("uint32_t") int queueLabelCount() { return VkDebugUtilsMessengerCallbackDataEXT.get_queueLabelCount(this.segment()); } + /// Sets `queueLabelCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueLabelCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueLabelCount.set(segment, 0L, index, value); } + /// Sets `queueLabelCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueLabelCount(MemorySegment segment, @CType("uint32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_queueLabelCount(segment, 0L, value); } + /// Sets `queueLabelCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT queueLabelCountAt(long index, @CType("uint32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_queueLabelCount(this.segment(), index, value); return this; } + /// Sets `queueLabelCount` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT queueLabelCount(@CType("uint32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_queueLabelCount(this.segment(), value); return this; } + + /// {@return `pQueueLabels` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment get_pQueueLabels(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pQueueLabels.get(segment, 0L, index); } + /// {@return `pQueueLabels`} + /// @param segment the segment of the struct + public static @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment get_pQueueLabels(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_pQueueLabels(segment, 0L); } + /// {@return `pQueueLabels` at the given index} + /// @param index the index + public @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment pQueueLabelsAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_pQueueLabels(this.segment(), index); } + /// {@return `pQueueLabels`} + public @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment pQueueLabels() { return VkDebugUtilsMessengerCallbackDataEXT.get_pQueueLabels(this.segment()); } + /// Sets `pQueueLabels` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pQueueLabels(MemorySegment segment, long index, @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment value) { VH_pQueueLabels.set(segment, 0L, index, value); } + /// Sets `pQueueLabels` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pQueueLabels(MemorySegment segment, @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pQueueLabels(segment, 0L, value); } + /// Sets `pQueueLabels` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pQueueLabelsAt(long index, @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pQueueLabels(this.segment(), index, value); return this; } + /// Sets `pQueueLabels` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pQueueLabels(@CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pQueueLabels(this.segment(), value); return this; } + + /// {@return `cmdBufLabelCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_cmdBufLabelCount(MemorySegment segment, long index) { return (int) VH_cmdBufLabelCount.get(segment, 0L, index); } + /// {@return `cmdBufLabelCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_cmdBufLabelCount(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_cmdBufLabelCount(segment, 0L); } + /// {@return `cmdBufLabelCount` at the given index} + /// @param index the index + public @CType("uint32_t") int cmdBufLabelCountAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_cmdBufLabelCount(this.segment(), index); } + /// {@return `cmdBufLabelCount`} + public @CType("uint32_t") int cmdBufLabelCount() { return VkDebugUtilsMessengerCallbackDataEXT.get_cmdBufLabelCount(this.segment()); } + /// Sets `cmdBufLabelCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cmdBufLabelCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_cmdBufLabelCount.set(segment, 0L, index, value); } + /// Sets `cmdBufLabelCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cmdBufLabelCount(MemorySegment segment, @CType("uint32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_cmdBufLabelCount(segment, 0L, value); } + /// Sets `cmdBufLabelCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT cmdBufLabelCountAt(long index, @CType("uint32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_cmdBufLabelCount(this.segment(), index, value); return this; } + /// Sets `cmdBufLabelCount` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT cmdBufLabelCount(@CType("uint32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_cmdBufLabelCount(this.segment(), value); return this; } + + /// {@return `pCmdBufLabels` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment get_pCmdBufLabels(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCmdBufLabels.get(segment, 0L, index); } + /// {@return `pCmdBufLabels`} + /// @param segment the segment of the struct + public static @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment get_pCmdBufLabels(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_pCmdBufLabels(segment, 0L); } + /// {@return `pCmdBufLabels` at the given index} + /// @param index the index + public @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment pCmdBufLabelsAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_pCmdBufLabels(this.segment(), index); } + /// {@return `pCmdBufLabels`} + public @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment pCmdBufLabels() { return VkDebugUtilsMessengerCallbackDataEXT.get_pCmdBufLabels(this.segment()); } + /// Sets `pCmdBufLabels` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCmdBufLabels(MemorySegment segment, long index, @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment value) { VH_pCmdBufLabels.set(segment, 0L, index, value); } + /// Sets `pCmdBufLabels` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCmdBufLabels(MemorySegment segment, @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pCmdBufLabels(segment, 0L, value); } + /// Sets `pCmdBufLabels` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pCmdBufLabelsAt(long index, @CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pCmdBufLabels(this.segment(), index, value); return this; } + /// Sets `pCmdBufLabels` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pCmdBufLabels(@CType("const VkDebugUtilsLabelEXT *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pCmdBufLabels(this.segment(), value); return this; } + + /// {@return `objectCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_objectCount(MemorySegment segment, long index) { return (int) VH_objectCount.get(segment, 0L, index); } + /// {@return `objectCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_objectCount(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_objectCount(segment, 0L); } + /// {@return `objectCount` at the given index} + /// @param index the index + public @CType("uint32_t") int objectCountAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_objectCount(this.segment(), index); } + /// {@return `objectCount`} + public @CType("uint32_t") int objectCount() { return VkDebugUtilsMessengerCallbackDataEXT.get_objectCount(this.segment()); } + /// Sets `objectCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_objectCount.set(segment, 0L, index, value); } + /// Sets `objectCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectCount(MemorySegment segment, @CType("uint32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_objectCount(segment, 0L, value); } + /// Sets `objectCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT objectCountAt(long index, @CType("uint32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_objectCount(this.segment(), index, value); return this; } + /// Sets `objectCount` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT objectCount(@CType("uint32_t") int value) { VkDebugUtilsMessengerCallbackDataEXT.set_objectCount(this.segment(), value); return this; } + + /// {@return `pObjects` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDebugUtilsObjectNameInfoEXT *") java.lang.foreign.MemorySegment get_pObjects(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pObjects.get(segment, 0L, index); } + /// {@return `pObjects`} + /// @param segment the segment of the struct + public static @CType("const VkDebugUtilsObjectNameInfoEXT *") java.lang.foreign.MemorySegment get_pObjects(MemorySegment segment) { return VkDebugUtilsMessengerCallbackDataEXT.get_pObjects(segment, 0L); } + /// {@return `pObjects` at the given index} + /// @param index the index + public @CType("const VkDebugUtilsObjectNameInfoEXT *") java.lang.foreign.MemorySegment pObjectsAt(long index) { return VkDebugUtilsMessengerCallbackDataEXT.get_pObjects(this.segment(), index); } + /// {@return `pObjects`} + public @CType("const VkDebugUtilsObjectNameInfoEXT *") java.lang.foreign.MemorySegment pObjects() { return VkDebugUtilsMessengerCallbackDataEXT.get_pObjects(this.segment()); } + /// Sets `pObjects` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pObjects(MemorySegment segment, long index, @CType("const VkDebugUtilsObjectNameInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pObjects.set(segment, 0L, index, value); } + /// Sets `pObjects` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pObjects(MemorySegment segment, @CType("const VkDebugUtilsObjectNameInfoEXT *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pObjects(segment, 0L, value); } + /// Sets `pObjects` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pObjectsAt(long index, @CType("const VkDebugUtilsObjectNameInfoEXT *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pObjects(this.segment(), index, value); return this; } + /// Sets `pObjects` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCallbackDataEXT pObjects(@CType("const VkDebugUtilsObjectNameInfoEXT *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCallbackDataEXT.set_pObjects(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsMessengerCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsMessengerCreateInfoEXT.java new file mode 100644 index 00000000..7b0c1c8e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsMessengerCreateInfoEXT.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### messageSeverity +/// [VarHandle][#VH_messageSeverity] - [Getter][#messageSeverity()] - [Setter][#messageSeverity(int)] +/// ### messageType +/// [VarHandle][#VH_messageType] - [Getter][#messageType()] - [Setter][#messageType(int)] +/// ### pfnUserCallback +/// [VarHandle][#VH_pfnUserCallback] - [Getter][#pfnUserCallback()] - [Setter][#pfnUserCallback(java.lang.foreign.MemorySegment)] +/// ### pUserData +/// [VarHandle][#VH_pUserData] - [Getter][#pUserData()] - [Setter][#pUserData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDebugUtilsMessengerCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDebugUtilsMessengerCreateFlagsEXT flags; +/// VkDebugUtilsMessageSeverityFlagsEXT messageSeverity; +/// VkDebugUtilsMessageTypeFlagsEXT messageType; +/// PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback; +/// void * pUserData; +/// } VkDebugUtilsMessengerCreateInfoEXT; +/// ``` +public final class VkDebugUtilsMessengerCreateInfoEXT extends Struct { + /// The struct layout of `VkDebugUtilsMessengerCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("messageSeverity"), + ValueLayout.JAVA_INT.withName("messageType"), + ValueLayout.ADDRESS.withName("pfnUserCallback"), + ValueLayout.ADDRESS.withName("pUserData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `messageSeverity` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_messageSeverity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("messageSeverity")); + /// The [VarHandle] of `messageType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_messageType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("messageType")); + /// The [VarHandle] of `pfnUserCallback` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pfnUserCallback = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pfnUserCallback")); + /// The [VarHandle] of `pUserData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pUserData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pUserData")); + + /// Creates `VkDebugUtilsMessengerCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDebugUtilsMessengerCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDebugUtilsMessengerCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsMessengerCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsMessengerCreateInfoEXT(segment); } + + /// Creates `VkDebugUtilsMessengerCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsMessengerCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsMessengerCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDebugUtilsMessengerCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsMessengerCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsMessengerCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDebugUtilsMessengerCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDebugUtilsMessengerCreateInfoEXT` + public static VkDebugUtilsMessengerCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkDebugUtilsMessengerCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDebugUtilsMessengerCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDebugUtilsMessengerCreateInfoEXT` + public static VkDebugUtilsMessengerCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDebugUtilsMessengerCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDebugUtilsMessengerCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDebugUtilsMessengerCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDebugUtilsMessengerCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT sType(@CType("VkStructureType") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDebugUtilsMessengerCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDebugUtilsMessengerCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDebugUtilsMessengerCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDebugUtilsMessengerCreateFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDebugUtilsMessengerCreateFlagsEXT") int get_flags(MemorySegment segment) { return VkDebugUtilsMessengerCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDebugUtilsMessengerCreateFlagsEXT") int flagsAt(long index) { return VkDebugUtilsMessengerCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDebugUtilsMessengerCreateFlagsEXT") int flags() { return VkDebugUtilsMessengerCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDebugUtilsMessengerCreateFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDebugUtilsMessengerCreateFlagsEXT") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT flagsAt(long index, @CType("VkDebugUtilsMessengerCreateFlagsEXT") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT flags(@CType("VkDebugUtilsMessengerCreateFlagsEXT") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `messageSeverity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDebugUtilsMessageSeverityFlagsEXT") int get_messageSeverity(MemorySegment segment, long index) { return (int) VH_messageSeverity.get(segment, 0L, index); } + /// {@return `messageSeverity`} + /// @param segment the segment of the struct + public static @CType("VkDebugUtilsMessageSeverityFlagsEXT") int get_messageSeverity(MemorySegment segment) { return VkDebugUtilsMessengerCreateInfoEXT.get_messageSeverity(segment, 0L); } + /// {@return `messageSeverity` at the given index} + /// @param index the index + public @CType("VkDebugUtilsMessageSeverityFlagsEXT") int messageSeverityAt(long index) { return VkDebugUtilsMessengerCreateInfoEXT.get_messageSeverity(this.segment(), index); } + /// {@return `messageSeverity`} + public @CType("VkDebugUtilsMessageSeverityFlagsEXT") int messageSeverity() { return VkDebugUtilsMessengerCreateInfoEXT.get_messageSeverity(this.segment()); } + /// Sets `messageSeverity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_messageSeverity(MemorySegment segment, long index, @CType("VkDebugUtilsMessageSeverityFlagsEXT") int value) { VH_messageSeverity.set(segment, 0L, index, value); } + /// Sets `messageSeverity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_messageSeverity(MemorySegment segment, @CType("VkDebugUtilsMessageSeverityFlagsEXT") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_messageSeverity(segment, 0L, value); } + /// Sets `messageSeverity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT messageSeverityAt(long index, @CType("VkDebugUtilsMessageSeverityFlagsEXT") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_messageSeverity(this.segment(), index, value); return this; } + /// Sets `messageSeverity` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT messageSeverity(@CType("VkDebugUtilsMessageSeverityFlagsEXT") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_messageSeverity(this.segment(), value); return this; } + + /// {@return `messageType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDebugUtilsMessageTypeFlagsEXT") int get_messageType(MemorySegment segment, long index) { return (int) VH_messageType.get(segment, 0L, index); } + /// {@return `messageType`} + /// @param segment the segment of the struct + public static @CType("VkDebugUtilsMessageTypeFlagsEXT") int get_messageType(MemorySegment segment) { return VkDebugUtilsMessengerCreateInfoEXT.get_messageType(segment, 0L); } + /// {@return `messageType` at the given index} + /// @param index the index + public @CType("VkDebugUtilsMessageTypeFlagsEXT") int messageTypeAt(long index) { return VkDebugUtilsMessengerCreateInfoEXT.get_messageType(this.segment(), index); } + /// {@return `messageType`} + public @CType("VkDebugUtilsMessageTypeFlagsEXT") int messageType() { return VkDebugUtilsMessengerCreateInfoEXT.get_messageType(this.segment()); } + /// Sets `messageType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_messageType(MemorySegment segment, long index, @CType("VkDebugUtilsMessageTypeFlagsEXT") int value) { VH_messageType.set(segment, 0L, index, value); } + /// Sets `messageType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_messageType(MemorySegment segment, @CType("VkDebugUtilsMessageTypeFlagsEXT") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_messageType(segment, 0L, value); } + /// Sets `messageType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT messageTypeAt(long index, @CType("VkDebugUtilsMessageTypeFlagsEXT") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_messageType(this.segment(), index, value); return this; } + /// Sets `messageType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT messageType(@CType("VkDebugUtilsMessageTypeFlagsEXT") int value) { VkDebugUtilsMessengerCreateInfoEXT.set_messageType(this.segment(), value); return this; } + + /// {@return `pfnUserCallback` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("PFN_vkDebugUtilsMessengerCallbackEXT") java.lang.foreign.MemorySegment get_pfnUserCallback(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pfnUserCallback.get(segment, 0L, index); } + /// {@return `pfnUserCallback`} + /// @param segment the segment of the struct + public static @CType("PFN_vkDebugUtilsMessengerCallbackEXT") java.lang.foreign.MemorySegment get_pfnUserCallback(MemorySegment segment) { return VkDebugUtilsMessengerCreateInfoEXT.get_pfnUserCallback(segment, 0L); } + /// {@return `pfnUserCallback` at the given index} + /// @param index the index + public @CType("PFN_vkDebugUtilsMessengerCallbackEXT") java.lang.foreign.MemorySegment pfnUserCallbackAt(long index) { return VkDebugUtilsMessengerCreateInfoEXT.get_pfnUserCallback(this.segment(), index); } + /// {@return `pfnUserCallback`} + public @CType("PFN_vkDebugUtilsMessengerCallbackEXT") java.lang.foreign.MemorySegment pfnUserCallback() { return VkDebugUtilsMessengerCreateInfoEXT.get_pfnUserCallback(this.segment()); } + /// Sets `pfnUserCallback` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pfnUserCallback(MemorySegment segment, long index, @CType("PFN_vkDebugUtilsMessengerCallbackEXT") java.lang.foreign.MemorySegment value) { VH_pfnUserCallback.set(segment, 0L, index, value); } + /// Sets `pfnUserCallback` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pfnUserCallback(MemorySegment segment, @CType("PFN_vkDebugUtilsMessengerCallbackEXT") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCreateInfoEXT.set_pfnUserCallback(segment, 0L, value); } + /// Sets `pfnUserCallback` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT pfnUserCallbackAt(long index, @CType("PFN_vkDebugUtilsMessengerCallbackEXT") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCreateInfoEXT.set_pfnUserCallback(this.segment(), index, value); return this; } + /// Sets `pfnUserCallback` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT pfnUserCallback(@CType("PFN_vkDebugUtilsMessengerCallbackEXT") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCreateInfoEXT.set_pfnUserCallback(this.segment(), value); return this; } + + /// {@return `pUserData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pUserData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pUserData.get(segment, 0L, index); } + /// {@return `pUserData`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pUserData(MemorySegment segment) { return VkDebugUtilsMessengerCreateInfoEXT.get_pUserData(segment, 0L); } + /// {@return `pUserData` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pUserDataAt(long index) { return VkDebugUtilsMessengerCreateInfoEXT.get_pUserData(this.segment(), index); } + /// {@return `pUserData`} + public @CType("void *") java.lang.foreign.MemorySegment pUserData() { return VkDebugUtilsMessengerCreateInfoEXT.get_pUserData(this.segment()); } + /// Sets `pUserData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pUserData(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pUserData.set(segment, 0L, index, value); } + /// Sets `pUserData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pUserData(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCreateInfoEXT.set_pUserData(segment, 0L, value); } + /// Sets `pUserData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT pUserDataAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCreateInfoEXT.set_pUserData(this.segment(), index, value); return this; } + /// Sets `pUserData` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsMessengerCreateInfoEXT pUserData(@CType("void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsMessengerCreateInfoEXT.set_pUserData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsObjectNameInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsObjectNameInfoEXT.java new file mode 100644 index 00000000..9ab3e792 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsObjectNameInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### objectType +/// [VarHandle][#VH_objectType] - [Getter][#objectType()] - [Setter][#objectType(int)] +/// ### objectHandle +/// [VarHandle][#VH_objectHandle] - [Getter][#objectHandle()] - [Setter][#objectHandle(long)] +/// ### pObjectName +/// [VarHandle][#VH_pObjectName] - [Getter][#pObjectName()] - [Setter][#pObjectName(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDebugUtilsObjectNameInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkObjectType objectType; +/// uint64_t objectHandle; +/// const char * pObjectName; +/// } VkDebugUtilsObjectNameInfoEXT; +/// ``` +public final class VkDebugUtilsObjectNameInfoEXT extends Struct { + /// The struct layout of `VkDebugUtilsObjectNameInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("objectType"), + ValueLayout.JAVA_LONG.withName("objectHandle"), + ValueLayout.ADDRESS.withName("pObjectName") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `objectType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_objectType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectType")); + /// The [VarHandle] of `objectHandle` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_objectHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectHandle")); + /// The [VarHandle] of `pObjectName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pObjectName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pObjectName")); + + /// Creates `VkDebugUtilsObjectNameInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDebugUtilsObjectNameInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDebugUtilsObjectNameInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsObjectNameInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsObjectNameInfoEXT(segment); } + + /// Creates `VkDebugUtilsObjectNameInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsObjectNameInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsObjectNameInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDebugUtilsObjectNameInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsObjectNameInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsObjectNameInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDebugUtilsObjectNameInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDebugUtilsObjectNameInfoEXT` + public static VkDebugUtilsObjectNameInfoEXT alloc(SegmentAllocator allocator) { return new VkDebugUtilsObjectNameInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDebugUtilsObjectNameInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDebugUtilsObjectNameInfoEXT` + public static VkDebugUtilsObjectNameInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDebugUtilsObjectNameInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDebugUtilsObjectNameInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDebugUtilsObjectNameInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDebugUtilsObjectNameInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDebugUtilsObjectNameInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectNameInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDebugUtilsObjectNameInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectNameInfoEXT sType(@CType("VkStructureType") int value) { VkDebugUtilsObjectNameInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDebugUtilsObjectNameInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDebugUtilsObjectNameInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDebugUtilsObjectNameInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectNameInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectNameInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectNameInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectNameInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectNameInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `objectType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkObjectType") int get_objectType(MemorySegment segment, long index) { return (int) VH_objectType.get(segment, 0L, index); } + /// {@return `objectType`} + /// @param segment the segment of the struct + public static @CType("VkObjectType") int get_objectType(MemorySegment segment) { return VkDebugUtilsObjectNameInfoEXT.get_objectType(segment, 0L); } + /// {@return `objectType` at the given index} + /// @param index the index + public @CType("VkObjectType") int objectTypeAt(long index) { return VkDebugUtilsObjectNameInfoEXT.get_objectType(this.segment(), index); } + /// {@return `objectType`} + public @CType("VkObjectType") int objectType() { return VkDebugUtilsObjectNameInfoEXT.get_objectType(this.segment()); } + /// Sets `objectType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectType(MemorySegment segment, long index, @CType("VkObjectType") int value) { VH_objectType.set(segment, 0L, index, value); } + /// Sets `objectType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectType(MemorySegment segment, @CType("VkObjectType") int value) { VkDebugUtilsObjectNameInfoEXT.set_objectType(segment, 0L, value); } + /// Sets `objectType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectNameInfoEXT objectTypeAt(long index, @CType("VkObjectType") int value) { VkDebugUtilsObjectNameInfoEXT.set_objectType(this.segment(), index, value); return this; } + /// Sets `objectType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectNameInfoEXT objectType(@CType("VkObjectType") int value) { VkDebugUtilsObjectNameInfoEXT.set_objectType(this.segment(), value); return this; } + + /// {@return `objectHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_objectHandle(MemorySegment segment, long index) { return (long) VH_objectHandle.get(segment, 0L, index); } + /// {@return `objectHandle`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_objectHandle(MemorySegment segment) { return VkDebugUtilsObjectNameInfoEXT.get_objectHandle(segment, 0L); } + /// {@return `objectHandle` at the given index} + /// @param index the index + public @CType("uint64_t") long objectHandleAt(long index) { return VkDebugUtilsObjectNameInfoEXT.get_objectHandle(this.segment(), index); } + /// {@return `objectHandle`} + public @CType("uint64_t") long objectHandle() { return VkDebugUtilsObjectNameInfoEXT.get_objectHandle(this.segment()); } + /// Sets `objectHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectHandle(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_objectHandle.set(segment, 0L, index, value); } + /// Sets `objectHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectHandle(MemorySegment segment, @CType("uint64_t") long value) { VkDebugUtilsObjectNameInfoEXT.set_objectHandle(segment, 0L, value); } + /// Sets `objectHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectNameInfoEXT objectHandleAt(long index, @CType("uint64_t") long value) { VkDebugUtilsObjectNameInfoEXT.set_objectHandle(this.segment(), index, value); return this; } + /// Sets `objectHandle` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectNameInfoEXT objectHandle(@CType("uint64_t") long value) { VkDebugUtilsObjectNameInfoEXT.set_objectHandle(this.segment(), value); return this; } + + /// {@return `pObjectName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pObjectName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pObjectName.get(segment, 0L, index); } + /// {@return `pObjectName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pObjectName(MemorySegment segment) { return VkDebugUtilsObjectNameInfoEXT.get_pObjectName(segment, 0L); } + /// {@return `pObjectName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pObjectNameAt(long index) { return VkDebugUtilsObjectNameInfoEXT.get_pObjectName(this.segment(), index); } + /// {@return `pObjectName`} + public @CType("const char *") java.lang.foreign.MemorySegment pObjectName() { return VkDebugUtilsObjectNameInfoEXT.get_pObjectName(this.segment()); } + /// Sets `pObjectName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pObjectName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pObjectName.set(segment, 0L, index, value); } + /// Sets `pObjectName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pObjectName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectNameInfoEXT.set_pObjectName(segment, 0L, value); } + /// Sets `pObjectName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectNameInfoEXT pObjectNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectNameInfoEXT.set_pObjectName(this.segment(), index, value); return this; } + /// Sets `pObjectName` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectNameInfoEXT pObjectName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectNameInfoEXT.set_pObjectName(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsObjectTagInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsObjectTagInfoEXT.java new file mode 100644 index 00000000..4187a33f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDebugUtilsObjectTagInfoEXT.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### objectType +/// [VarHandle][#VH_objectType] - [Getter][#objectType()] - [Setter][#objectType(int)] +/// ### objectHandle +/// [VarHandle][#VH_objectHandle] - [Getter][#objectHandle()] - [Setter][#objectHandle(long)] +/// ### tagName +/// [VarHandle][#VH_tagName] - [Getter][#tagName()] - [Setter][#tagName(long)] +/// ### tagSize +/// [VarHandle][#VH_tagSize] - [Getter][#tagSize()] - [Setter][#tagSize(long)] +/// ### pTag +/// [VarHandle][#VH_pTag] - [Getter][#pTag()] - [Setter][#pTag(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDebugUtilsObjectTagInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkObjectType objectType; +/// uint64_t objectHandle; +/// uint64_t tagName; +/// size_t tagSize; +/// const void * pTag; +/// } VkDebugUtilsObjectTagInfoEXT; +/// ``` +public final class VkDebugUtilsObjectTagInfoEXT extends Struct { + /// The struct layout of `VkDebugUtilsObjectTagInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("objectType"), + ValueLayout.JAVA_LONG.withName("objectHandle"), + ValueLayout.JAVA_LONG.withName("tagName"), + ValueLayout.JAVA_LONG.withName("tagSize"), + ValueLayout.ADDRESS.withName("pTag") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `objectType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_objectType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectType")); + /// The [VarHandle] of `objectHandle` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_objectHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectHandle")); + /// The [VarHandle] of `tagName` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_tagName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tagName")); + /// The [VarHandle] of `tagSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_tagSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tagSize")); + /// The [VarHandle] of `pTag` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTag")); + + /// Creates `VkDebugUtilsObjectTagInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDebugUtilsObjectTagInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDebugUtilsObjectTagInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsObjectTagInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsObjectTagInfoEXT(segment); } + + /// Creates `VkDebugUtilsObjectTagInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsObjectTagInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsObjectTagInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDebugUtilsObjectTagInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDebugUtilsObjectTagInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDebugUtilsObjectTagInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDebugUtilsObjectTagInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDebugUtilsObjectTagInfoEXT` + public static VkDebugUtilsObjectTagInfoEXT alloc(SegmentAllocator allocator) { return new VkDebugUtilsObjectTagInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDebugUtilsObjectTagInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDebugUtilsObjectTagInfoEXT` + public static VkDebugUtilsObjectTagInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDebugUtilsObjectTagInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDebugUtilsObjectTagInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDebugUtilsObjectTagInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDebugUtilsObjectTagInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDebugUtilsObjectTagInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDebugUtilsObjectTagInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT sType(@CType("VkStructureType") int value) { VkDebugUtilsObjectTagInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDebugUtilsObjectTagInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDebugUtilsObjectTagInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDebugUtilsObjectTagInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectTagInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectTagInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectTagInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `objectType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkObjectType") int get_objectType(MemorySegment segment, long index) { return (int) VH_objectType.get(segment, 0L, index); } + /// {@return `objectType`} + /// @param segment the segment of the struct + public static @CType("VkObjectType") int get_objectType(MemorySegment segment) { return VkDebugUtilsObjectTagInfoEXT.get_objectType(segment, 0L); } + /// {@return `objectType` at the given index} + /// @param index the index + public @CType("VkObjectType") int objectTypeAt(long index) { return VkDebugUtilsObjectTagInfoEXT.get_objectType(this.segment(), index); } + /// {@return `objectType`} + public @CType("VkObjectType") int objectType() { return VkDebugUtilsObjectTagInfoEXT.get_objectType(this.segment()); } + /// Sets `objectType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectType(MemorySegment segment, long index, @CType("VkObjectType") int value) { VH_objectType.set(segment, 0L, index, value); } + /// Sets `objectType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectType(MemorySegment segment, @CType("VkObjectType") int value) { VkDebugUtilsObjectTagInfoEXT.set_objectType(segment, 0L, value); } + /// Sets `objectType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT objectTypeAt(long index, @CType("VkObjectType") int value) { VkDebugUtilsObjectTagInfoEXT.set_objectType(this.segment(), index, value); return this; } + /// Sets `objectType` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT objectType(@CType("VkObjectType") int value) { VkDebugUtilsObjectTagInfoEXT.set_objectType(this.segment(), value); return this; } + + /// {@return `objectHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_objectHandle(MemorySegment segment, long index) { return (long) VH_objectHandle.get(segment, 0L, index); } + /// {@return `objectHandle`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_objectHandle(MemorySegment segment) { return VkDebugUtilsObjectTagInfoEXT.get_objectHandle(segment, 0L); } + /// {@return `objectHandle` at the given index} + /// @param index the index + public @CType("uint64_t") long objectHandleAt(long index) { return VkDebugUtilsObjectTagInfoEXT.get_objectHandle(this.segment(), index); } + /// {@return `objectHandle`} + public @CType("uint64_t") long objectHandle() { return VkDebugUtilsObjectTagInfoEXT.get_objectHandle(this.segment()); } + /// Sets `objectHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectHandle(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_objectHandle.set(segment, 0L, index, value); } + /// Sets `objectHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectHandle(MemorySegment segment, @CType("uint64_t") long value) { VkDebugUtilsObjectTagInfoEXT.set_objectHandle(segment, 0L, value); } + /// Sets `objectHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT objectHandleAt(long index, @CType("uint64_t") long value) { VkDebugUtilsObjectTagInfoEXT.set_objectHandle(this.segment(), index, value); return this; } + /// Sets `objectHandle` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT objectHandle(@CType("uint64_t") long value) { VkDebugUtilsObjectTagInfoEXT.set_objectHandle(this.segment(), value); return this; } + + /// {@return `tagName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_tagName(MemorySegment segment, long index) { return (long) VH_tagName.get(segment, 0L, index); } + /// {@return `tagName`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_tagName(MemorySegment segment) { return VkDebugUtilsObjectTagInfoEXT.get_tagName(segment, 0L); } + /// {@return `tagName` at the given index} + /// @param index the index + public @CType("uint64_t") long tagNameAt(long index) { return VkDebugUtilsObjectTagInfoEXT.get_tagName(this.segment(), index); } + /// {@return `tagName`} + public @CType("uint64_t") long tagName() { return VkDebugUtilsObjectTagInfoEXT.get_tagName(this.segment()); } + /// Sets `tagName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tagName(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_tagName.set(segment, 0L, index, value); } + /// Sets `tagName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tagName(MemorySegment segment, @CType("uint64_t") long value) { VkDebugUtilsObjectTagInfoEXT.set_tagName(segment, 0L, value); } + /// Sets `tagName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT tagNameAt(long index, @CType("uint64_t") long value) { VkDebugUtilsObjectTagInfoEXT.set_tagName(this.segment(), index, value); return this; } + /// Sets `tagName` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT tagName(@CType("uint64_t") long value) { VkDebugUtilsObjectTagInfoEXT.set_tagName(this.segment(), value); return this; } + + /// {@return `tagSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_tagSize(MemorySegment segment, long index) { return (long) VH_tagSize.get(segment, 0L, index); } + /// {@return `tagSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_tagSize(MemorySegment segment) { return VkDebugUtilsObjectTagInfoEXT.get_tagSize(segment, 0L); } + /// {@return `tagSize` at the given index} + /// @param index the index + public @CType("size_t") long tagSizeAt(long index) { return VkDebugUtilsObjectTagInfoEXT.get_tagSize(this.segment(), index); } + /// {@return `tagSize`} + public @CType("size_t") long tagSize() { return VkDebugUtilsObjectTagInfoEXT.get_tagSize(this.segment()); } + /// Sets `tagSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tagSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_tagSize.set(segment, 0L, index, value); } + /// Sets `tagSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tagSize(MemorySegment segment, @CType("size_t") long value) { VkDebugUtilsObjectTagInfoEXT.set_tagSize(segment, 0L, value); } + /// Sets `tagSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT tagSizeAt(long index, @CType("size_t") long value) { VkDebugUtilsObjectTagInfoEXT.set_tagSize(this.segment(), index, value); return this; } + /// Sets `tagSize` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT tagSize(@CType("size_t") long value) { VkDebugUtilsObjectTagInfoEXT.set_tagSize(this.segment(), value); return this; } + + /// {@return `pTag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pTag(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTag.get(segment, 0L, index); } + /// {@return `pTag`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pTag(MemorySegment segment) { return VkDebugUtilsObjectTagInfoEXT.get_pTag(segment, 0L); } + /// {@return `pTag` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pTagAt(long index) { return VkDebugUtilsObjectTagInfoEXT.get_pTag(this.segment(), index); } + /// {@return `pTag`} + public @CType("const void *") java.lang.foreign.MemorySegment pTag() { return VkDebugUtilsObjectTagInfoEXT.get_pTag(this.segment()); } + /// Sets `pTag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTag(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pTag.set(segment, 0L, index, value); } + /// Sets `pTag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTag(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectTagInfoEXT.set_pTag(segment, 0L, value); } + /// Sets `pTag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT pTagAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectTagInfoEXT.set_pTag(this.segment(), index, value); return this; } + /// Sets `pTag` with the given value. + /// @param value the value + /// @return `this` + public VkDebugUtilsObjectTagInfoEXT pTag(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDebugUtilsObjectTagInfoEXT.set_pTag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDepthBiasInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDepthBiasInfoEXT.java new file mode 100644 index 00000000..06957e91 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDepthBiasInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### depthBiasConstantFactor +/// [VarHandle][#VH_depthBiasConstantFactor] - [Getter][#depthBiasConstantFactor()] - [Setter][#depthBiasConstantFactor(float)] +/// ### depthBiasClamp +/// [VarHandle][#VH_depthBiasClamp] - [Getter][#depthBiasClamp()] - [Setter][#depthBiasClamp(float)] +/// ### depthBiasSlopeFactor +/// [VarHandle][#VH_depthBiasSlopeFactor] - [Getter][#depthBiasSlopeFactor()] - [Setter][#depthBiasSlopeFactor(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDepthBiasInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// float depthBiasConstantFactor; +/// float depthBiasClamp; +/// float depthBiasSlopeFactor; +/// } VkDepthBiasInfoEXT; +/// ``` +public final class VkDepthBiasInfoEXT extends Struct { + /// The struct layout of `VkDepthBiasInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_FLOAT.withName("depthBiasConstantFactor"), + ValueLayout.JAVA_FLOAT.withName("depthBiasClamp"), + ValueLayout.JAVA_FLOAT.withName("depthBiasSlopeFactor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `depthBiasConstantFactor` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_depthBiasConstantFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasConstantFactor")); + /// The [VarHandle] of `depthBiasClamp` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_depthBiasClamp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasClamp")); + /// The [VarHandle] of `depthBiasSlopeFactor` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_depthBiasSlopeFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasSlopeFactor")); + + /// Creates `VkDepthBiasInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDepthBiasInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDepthBiasInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDepthBiasInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDepthBiasInfoEXT(segment); } + + /// Creates `VkDepthBiasInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDepthBiasInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDepthBiasInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDepthBiasInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDepthBiasInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDepthBiasInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDepthBiasInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDepthBiasInfoEXT` + public static VkDepthBiasInfoEXT alloc(SegmentAllocator allocator) { return new VkDepthBiasInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDepthBiasInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDepthBiasInfoEXT` + public static VkDepthBiasInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDepthBiasInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDepthBiasInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDepthBiasInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDepthBiasInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDepthBiasInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthBiasInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDepthBiasInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDepthBiasInfoEXT sType(@CType("VkStructureType") int value) { VkDepthBiasInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDepthBiasInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDepthBiasInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDepthBiasInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDepthBiasInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthBiasInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDepthBiasInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDepthBiasInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDepthBiasInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `depthBiasConstantFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_depthBiasConstantFactor(MemorySegment segment, long index) { return (float) VH_depthBiasConstantFactor.get(segment, 0L, index); } + /// {@return `depthBiasConstantFactor`} + /// @param segment the segment of the struct + public static @CType("float") float get_depthBiasConstantFactor(MemorySegment segment) { return VkDepthBiasInfoEXT.get_depthBiasConstantFactor(segment, 0L); } + /// {@return `depthBiasConstantFactor` at the given index} + /// @param index the index + public @CType("float") float depthBiasConstantFactorAt(long index) { return VkDepthBiasInfoEXT.get_depthBiasConstantFactor(this.segment(), index); } + /// {@return `depthBiasConstantFactor`} + public @CType("float") float depthBiasConstantFactor() { return VkDepthBiasInfoEXT.get_depthBiasConstantFactor(this.segment()); } + /// Sets `depthBiasConstantFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasConstantFactor(MemorySegment segment, long index, @CType("float") float value) { VH_depthBiasConstantFactor.set(segment, 0L, index, value); } + /// Sets `depthBiasConstantFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasConstantFactor(MemorySegment segment, @CType("float") float value) { VkDepthBiasInfoEXT.set_depthBiasConstantFactor(segment, 0L, value); } + /// Sets `depthBiasConstantFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthBiasInfoEXT depthBiasConstantFactorAt(long index, @CType("float") float value) { VkDepthBiasInfoEXT.set_depthBiasConstantFactor(this.segment(), index, value); return this; } + /// Sets `depthBiasConstantFactor` with the given value. + /// @param value the value + /// @return `this` + public VkDepthBiasInfoEXT depthBiasConstantFactor(@CType("float") float value) { VkDepthBiasInfoEXT.set_depthBiasConstantFactor(this.segment(), value); return this; } + + /// {@return `depthBiasClamp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_depthBiasClamp(MemorySegment segment, long index) { return (float) VH_depthBiasClamp.get(segment, 0L, index); } + /// {@return `depthBiasClamp`} + /// @param segment the segment of the struct + public static @CType("float") float get_depthBiasClamp(MemorySegment segment) { return VkDepthBiasInfoEXT.get_depthBiasClamp(segment, 0L); } + /// {@return `depthBiasClamp` at the given index} + /// @param index the index + public @CType("float") float depthBiasClampAt(long index) { return VkDepthBiasInfoEXT.get_depthBiasClamp(this.segment(), index); } + /// {@return `depthBiasClamp`} + public @CType("float") float depthBiasClamp() { return VkDepthBiasInfoEXT.get_depthBiasClamp(this.segment()); } + /// Sets `depthBiasClamp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasClamp(MemorySegment segment, long index, @CType("float") float value) { VH_depthBiasClamp.set(segment, 0L, index, value); } + /// Sets `depthBiasClamp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasClamp(MemorySegment segment, @CType("float") float value) { VkDepthBiasInfoEXT.set_depthBiasClamp(segment, 0L, value); } + /// Sets `depthBiasClamp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthBiasInfoEXT depthBiasClampAt(long index, @CType("float") float value) { VkDepthBiasInfoEXT.set_depthBiasClamp(this.segment(), index, value); return this; } + /// Sets `depthBiasClamp` with the given value. + /// @param value the value + /// @return `this` + public VkDepthBiasInfoEXT depthBiasClamp(@CType("float") float value) { VkDepthBiasInfoEXT.set_depthBiasClamp(this.segment(), value); return this; } + + /// {@return `depthBiasSlopeFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_depthBiasSlopeFactor(MemorySegment segment, long index) { return (float) VH_depthBiasSlopeFactor.get(segment, 0L, index); } + /// {@return `depthBiasSlopeFactor`} + /// @param segment the segment of the struct + public static @CType("float") float get_depthBiasSlopeFactor(MemorySegment segment) { return VkDepthBiasInfoEXT.get_depthBiasSlopeFactor(segment, 0L); } + /// {@return `depthBiasSlopeFactor` at the given index} + /// @param index the index + public @CType("float") float depthBiasSlopeFactorAt(long index) { return VkDepthBiasInfoEXT.get_depthBiasSlopeFactor(this.segment(), index); } + /// {@return `depthBiasSlopeFactor`} + public @CType("float") float depthBiasSlopeFactor() { return VkDepthBiasInfoEXT.get_depthBiasSlopeFactor(this.segment()); } + /// Sets `depthBiasSlopeFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasSlopeFactor(MemorySegment segment, long index, @CType("float") float value) { VH_depthBiasSlopeFactor.set(segment, 0L, index, value); } + /// Sets `depthBiasSlopeFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasSlopeFactor(MemorySegment segment, @CType("float") float value) { VkDepthBiasInfoEXT.set_depthBiasSlopeFactor(segment, 0L, value); } + /// Sets `depthBiasSlopeFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthBiasInfoEXT depthBiasSlopeFactorAt(long index, @CType("float") float value) { VkDepthBiasInfoEXT.set_depthBiasSlopeFactor(this.segment(), index, value); return this; } + /// Sets `depthBiasSlopeFactor` with the given value. + /// @param value the value + /// @return `this` + public VkDepthBiasInfoEXT depthBiasSlopeFactor(@CType("float") float value) { VkDepthBiasInfoEXT.set_depthBiasSlopeFactor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDepthBiasRepresentationInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDepthBiasRepresentationInfoEXT.java new file mode 100644 index 00000000..44239bc5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDepthBiasRepresentationInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### depthBiasRepresentation +/// [VarHandle][#VH_depthBiasRepresentation] - [Getter][#depthBiasRepresentation()] - [Setter][#depthBiasRepresentation(int)] +/// ### depthBiasExact +/// [VarHandle][#VH_depthBiasExact] - [Getter][#depthBiasExact()] - [Setter][#depthBiasExact(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDepthBiasRepresentationInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDepthBiasRepresentationEXT depthBiasRepresentation; +/// VkBool32 depthBiasExact; +/// } VkDepthBiasRepresentationInfoEXT; +/// ``` +public final class VkDepthBiasRepresentationInfoEXT extends Struct { + /// The struct layout of `VkDepthBiasRepresentationInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("depthBiasRepresentation"), + ValueLayout.JAVA_INT.withName("depthBiasExact") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `depthBiasRepresentation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthBiasRepresentation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasRepresentation")); + /// The [VarHandle] of `depthBiasExact` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthBiasExact = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasExact")); + + /// Creates `VkDepthBiasRepresentationInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDepthBiasRepresentationInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDepthBiasRepresentationInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDepthBiasRepresentationInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDepthBiasRepresentationInfoEXT(segment); } + + /// Creates `VkDepthBiasRepresentationInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDepthBiasRepresentationInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDepthBiasRepresentationInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDepthBiasRepresentationInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDepthBiasRepresentationInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDepthBiasRepresentationInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDepthBiasRepresentationInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDepthBiasRepresentationInfoEXT` + public static VkDepthBiasRepresentationInfoEXT alloc(SegmentAllocator allocator) { return new VkDepthBiasRepresentationInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDepthBiasRepresentationInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDepthBiasRepresentationInfoEXT` + public static VkDepthBiasRepresentationInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDepthBiasRepresentationInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDepthBiasRepresentationInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDepthBiasRepresentationInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDepthBiasRepresentationInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDepthBiasRepresentationInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthBiasRepresentationInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDepthBiasRepresentationInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDepthBiasRepresentationInfoEXT sType(@CType("VkStructureType") int value) { VkDepthBiasRepresentationInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDepthBiasRepresentationInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDepthBiasRepresentationInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDepthBiasRepresentationInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDepthBiasRepresentationInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthBiasRepresentationInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDepthBiasRepresentationInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDepthBiasRepresentationInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDepthBiasRepresentationInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `depthBiasRepresentation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDepthBiasRepresentationEXT") int get_depthBiasRepresentation(MemorySegment segment, long index) { return (int) VH_depthBiasRepresentation.get(segment, 0L, index); } + /// {@return `depthBiasRepresentation`} + /// @param segment the segment of the struct + public static @CType("VkDepthBiasRepresentationEXT") int get_depthBiasRepresentation(MemorySegment segment) { return VkDepthBiasRepresentationInfoEXT.get_depthBiasRepresentation(segment, 0L); } + /// {@return `depthBiasRepresentation` at the given index} + /// @param index the index + public @CType("VkDepthBiasRepresentationEXT") int depthBiasRepresentationAt(long index) { return VkDepthBiasRepresentationInfoEXT.get_depthBiasRepresentation(this.segment(), index); } + /// {@return `depthBiasRepresentation`} + public @CType("VkDepthBiasRepresentationEXT") int depthBiasRepresentation() { return VkDepthBiasRepresentationInfoEXT.get_depthBiasRepresentation(this.segment()); } + /// Sets `depthBiasRepresentation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasRepresentation(MemorySegment segment, long index, @CType("VkDepthBiasRepresentationEXT") int value) { VH_depthBiasRepresentation.set(segment, 0L, index, value); } + /// Sets `depthBiasRepresentation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasRepresentation(MemorySegment segment, @CType("VkDepthBiasRepresentationEXT") int value) { VkDepthBiasRepresentationInfoEXT.set_depthBiasRepresentation(segment, 0L, value); } + /// Sets `depthBiasRepresentation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthBiasRepresentationInfoEXT depthBiasRepresentationAt(long index, @CType("VkDepthBiasRepresentationEXT") int value) { VkDepthBiasRepresentationInfoEXT.set_depthBiasRepresentation(this.segment(), index, value); return this; } + /// Sets `depthBiasRepresentation` with the given value. + /// @param value the value + /// @return `this` + public VkDepthBiasRepresentationInfoEXT depthBiasRepresentation(@CType("VkDepthBiasRepresentationEXT") int value) { VkDepthBiasRepresentationInfoEXT.set_depthBiasRepresentation(this.segment(), value); return this; } + + /// {@return `depthBiasExact` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthBiasExact(MemorySegment segment, long index) { return (int) VH_depthBiasExact.get(segment, 0L, index); } + /// {@return `depthBiasExact`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthBiasExact(MemorySegment segment) { return VkDepthBiasRepresentationInfoEXT.get_depthBiasExact(segment, 0L); } + /// {@return `depthBiasExact` at the given index} + /// @param index the index + public @CType("VkBool32") int depthBiasExactAt(long index) { return VkDepthBiasRepresentationInfoEXT.get_depthBiasExact(this.segment(), index); } + /// {@return `depthBiasExact`} + public @CType("VkBool32") int depthBiasExact() { return VkDepthBiasRepresentationInfoEXT.get_depthBiasExact(this.segment()); } + /// Sets `depthBiasExact` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasExact(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthBiasExact.set(segment, 0L, index, value); } + /// Sets `depthBiasExact` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasExact(MemorySegment segment, @CType("VkBool32") int value) { VkDepthBiasRepresentationInfoEXT.set_depthBiasExact(segment, 0L, value); } + /// Sets `depthBiasExact` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthBiasRepresentationInfoEXT depthBiasExactAt(long index, @CType("VkBool32") int value) { VkDepthBiasRepresentationInfoEXT.set_depthBiasExact(this.segment(), index, value); return this; } + /// Sets `depthBiasExact` with the given value. + /// @param value the value + /// @return `this` + public VkDepthBiasRepresentationInfoEXT depthBiasExact(@CType("VkBool32") int value) { VkDepthBiasRepresentationInfoEXT.set_depthBiasExact(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDepthClampRangeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDepthClampRangeEXT.java new file mode 100644 index 00000000..3756c7ca --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDepthClampRangeEXT.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### minDepthClamp +/// [VarHandle][#VH_minDepthClamp] - [Getter][#minDepthClamp()] - [Setter][#minDepthClamp(float)] +/// ### maxDepthClamp +/// [VarHandle][#VH_maxDepthClamp] - [Getter][#maxDepthClamp()] - [Setter][#maxDepthClamp(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDepthClampRangeEXT { +/// float minDepthClamp; +/// float maxDepthClamp; +/// } VkDepthClampRangeEXT; +/// ``` +public final class VkDepthClampRangeEXT extends Struct { + /// The struct layout of `VkDepthClampRangeEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_FLOAT.withName("minDepthClamp"), + ValueLayout.JAVA_FLOAT.withName("maxDepthClamp") + ); + /// The [VarHandle] of `minDepthClamp` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minDepthClamp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minDepthClamp")); + /// The [VarHandle] of `maxDepthClamp` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxDepthClamp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDepthClamp")); + + /// Creates `VkDepthClampRangeEXT` with the given segment. + /// @param segment the memory segment + public VkDepthClampRangeEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDepthClampRangeEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDepthClampRangeEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDepthClampRangeEXT(segment); } + + /// Creates `VkDepthClampRangeEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDepthClampRangeEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDepthClampRangeEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDepthClampRangeEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDepthClampRangeEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDepthClampRangeEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDepthClampRangeEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDepthClampRangeEXT` + public static VkDepthClampRangeEXT alloc(SegmentAllocator allocator) { return new VkDepthClampRangeEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDepthClampRangeEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDepthClampRangeEXT` + public static VkDepthClampRangeEXT alloc(SegmentAllocator allocator, long count) { return new VkDepthClampRangeEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `minDepthClamp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minDepthClamp(MemorySegment segment, long index) { return (float) VH_minDepthClamp.get(segment, 0L, index); } + /// {@return `minDepthClamp`} + /// @param segment the segment of the struct + public static @CType("float") float get_minDepthClamp(MemorySegment segment) { return VkDepthClampRangeEXT.get_minDepthClamp(segment, 0L); } + /// {@return `minDepthClamp` at the given index} + /// @param index the index + public @CType("float") float minDepthClampAt(long index) { return VkDepthClampRangeEXT.get_minDepthClamp(this.segment(), index); } + /// {@return `minDepthClamp`} + public @CType("float") float minDepthClamp() { return VkDepthClampRangeEXT.get_minDepthClamp(this.segment()); } + /// Sets `minDepthClamp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minDepthClamp(MemorySegment segment, long index, @CType("float") float value) { VH_minDepthClamp.set(segment, 0L, index, value); } + /// Sets `minDepthClamp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minDepthClamp(MemorySegment segment, @CType("float") float value) { VkDepthClampRangeEXT.set_minDepthClamp(segment, 0L, value); } + /// Sets `minDepthClamp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthClampRangeEXT minDepthClampAt(long index, @CType("float") float value) { VkDepthClampRangeEXT.set_minDepthClamp(this.segment(), index, value); return this; } + /// Sets `minDepthClamp` with the given value. + /// @param value the value + /// @return `this` + public VkDepthClampRangeEXT minDepthClamp(@CType("float") float value) { VkDepthClampRangeEXT.set_minDepthClamp(this.segment(), value); return this; } + + /// {@return `maxDepthClamp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxDepthClamp(MemorySegment segment, long index) { return (float) VH_maxDepthClamp.get(segment, 0L, index); } + /// {@return `maxDepthClamp`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxDepthClamp(MemorySegment segment) { return VkDepthClampRangeEXT.get_maxDepthClamp(segment, 0L); } + /// {@return `maxDepthClamp` at the given index} + /// @param index the index + public @CType("float") float maxDepthClampAt(long index) { return VkDepthClampRangeEXT.get_maxDepthClamp(this.segment(), index); } + /// {@return `maxDepthClamp`} + public @CType("float") float maxDepthClamp() { return VkDepthClampRangeEXT.get_maxDepthClamp(this.segment()); } + /// Sets `maxDepthClamp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDepthClamp(MemorySegment segment, long index, @CType("float") float value) { VH_maxDepthClamp.set(segment, 0L, index, value); } + /// Sets `maxDepthClamp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDepthClamp(MemorySegment segment, @CType("float") float value) { VkDepthClampRangeEXT.set_maxDepthClamp(segment, 0L, value); } + /// Sets `maxDepthClamp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDepthClampRangeEXT maxDepthClampAt(long index, @CType("float") float value) { VkDepthClampRangeEXT.set_maxDepthClamp(this.segment(), index, value); return this; } + /// Sets `maxDepthClamp` with the given value. + /// @param value the value + /// @return `this` + public VkDepthClampRangeEXT maxDepthClamp(@CType("float") float value) { VkDepthClampRangeEXT.set_maxDepthClamp(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorAddressInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorAddressInfoEXT.java new file mode 100644 index 00000000..9a16bcfd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorAddressInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### address +/// [VarHandle][#VH_address] - [Getter][#address()] - [Setter][#address(long)] +/// ### range +/// [VarHandle][#VH_range] - [Getter][#range()] - [Setter][#range(long)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorAddressInfoEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceAddress address; +/// VkDeviceSize range; +/// VkFormat format; +/// } VkDescriptorAddressInfoEXT; +/// ``` +public final class VkDescriptorAddressInfoEXT extends Struct { + /// The struct layout of `VkDescriptorAddressInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("address"), + ValueLayout.JAVA_LONG.withName("range"), + ValueLayout.JAVA_INT.withName("format") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `address` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_address = LAYOUT.arrayElementVarHandle(PathElement.groupElement("address")); + /// The [VarHandle] of `range` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_range = LAYOUT.arrayElementVarHandle(PathElement.groupElement("range")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + + /// Creates `VkDescriptorAddressInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDescriptorAddressInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorAddressInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorAddressInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorAddressInfoEXT(segment); } + + /// Creates `VkDescriptorAddressInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorAddressInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorAddressInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorAddressInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorAddressInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorAddressInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorAddressInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorAddressInfoEXT` + public static VkDescriptorAddressInfoEXT alloc(SegmentAllocator allocator) { return new VkDescriptorAddressInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorAddressInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorAddressInfoEXT` + public static VkDescriptorAddressInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDescriptorAddressInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorAddressInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorAddressInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorAddressInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorAddressInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorAddressInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorAddressInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorAddressInfoEXT sType(@CType("VkStructureType") int value) { VkDescriptorAddressInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorAddressInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorAddressInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorAddressInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorAddressInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorAddressInfoEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorAddressInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorAddressInfoEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorAddressInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `address` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_address(MemorySegment segment, long index) { return (long) VH_address.get(segment, 0L, index); } + /// {@return `address`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_address(MemorySegment segment) { return VkDescriptorAddressInfoEXT.get_address(segment, 0L); } + /// {@return `address` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long addressAt(long index) { return VkDescriptorAddressInfoEXT.get_address(this.segment(), index); } + /// {@return `address`} + public @CType("VkDeviceAddress") long address() { return VkDescriptorAddressInfoEXT.get_address(this.segment()); } + /// Sets `address` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_address(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_address.set(segment, 0L, index, value); } + /// Sets `address` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_address(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDescriptorAddressInfoEXT.set_address(segment, 0L, value); } + /// Sets `address` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorAddressInfoEXT addressAt(long index, @CType("VkDeviceAddress") long value) { VkDescriptorAddressInfoEXT.set_address(this.segment(), index, value); return this; } + /// Sets `address` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorAddressInfoEXT address(@CType("VkDeviceAddress") long value) { VkDescriptorAddressInfoEXT.set_address(this.segment(), value); return this; } + + /// {@return `range` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_range(MemorySegment segment, long index) { return (long) VH_range.get(segment, 0L, index); } + /// {@return `range`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_range(MemorySegment segment) { return VkDescriptorAddressInfoEXT.get_range(segment, 0L); } + /// {@return `range` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long rangeAt(long index) { return VkDescriptorAddressInfoEXT.get_range(this.segment(), index); } + /// {@return `range`} + public @CType("VkDeviceSize") long range() { return VkDescriptorAddressInfoEXT.get_range(this.segment()); } + /// Sets `range` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_range(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_range.set(segment, 0L, index, value); } + /// Sets `range` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_range(MemorySegment segment, @CType("VkDeviceSize") long value) { VkDescriptorAddressInfoEXT.set_range(segment, 0L, value); } + /// Sets `range` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorAddressInfoEXT rangeAt(long index, @CType("VkDeviceSize") long value) { VkDescriptorAddressInfoEXT.set_range(this.segment(), index, value); return this; } + /// Sets `range` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorAddressInfoEXT range(@CType("VkDeviceSize") long value) { VkDescriptorAddressInfoEXT.set_range(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkDescriptorAddressInfoEXT.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkDescriptorAddressInfoEXT.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkDescriptorAddressInfoEXT.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkDescriptorAddressInfoEXT.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorAddressInfoEXT formatAt(long index, @CType("VkFormat") int value) { VkDescriptorAddressInfoEXT.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorAddressInfoEXT format(@CType("VkFormat") int value) { VkDescriptorAddressInfoEXT.set_format(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorBufferBindingInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorBufferBindingInfoEXT.java new file mode 100644 index 00000000..75021f5b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorBufferBindingInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### address +/// [VarHandle][#VH_address] - [Getter][#address()] - [Setter][#address(long)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorBufferBindingInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceAddress address; +/// VkBufferUsageFlags usage; +/// } VkDescriptorBufferBindingInfoEXT; +/// ``` +public final class VkDescriptorBufferBindingInfoEXT extends Struct { + /// The struct layout of `VkDescriptorBufferBindingInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("address"), + ValueLayout.JAVA_INT.withName("usage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `address` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_address = LAYOUT.arrayElementVarHandle(PathElement.groupElement("address")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + + /// Creates `VkDescriptorBufferBindingInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDescriptorBufferBindingInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorBufferBindingInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorBufferBindingInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorBufferBindingInfoEXT(segment); } + + /// Creates `VkDescriptorBufferBindingInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorBufferBindingInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorBufferBindingInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorBufferBindingInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorBufferBindingInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorBufferBindingInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorBufferBindingInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorBufferBindingInfoEXT` + public static VkDescriptorBufferBindingInfoEXT alloc(SegmentAllocator allocator) { return new VkDescriptorBufferBindingInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorBufferBindingInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorBufferBindingInfoEXT` + public static VkDescriptorBufferBindingInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDescriptorBufferBindingInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorBufferBindingInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorBufferBindingInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorBufferBindingInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorBufferBindingInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorBufferBindingInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingInfoEXT sType(@CType("VkStructureType") int value) { VkDescriptorBufferBindingInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorBufferBindingInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorBufferBindingInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorBufferBindingInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorBufferBindingInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorBufferBindingInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorBufferBindingInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `address` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_address(MemorySegment segment, long index) { return (long) VH_address.get(segment, 0L, index); } + /// {@return `address`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_address(MemorySegment segment) { return VkDescriptorBufferBindingInfoEXT.get_address(segment, 0L); } + /// {@return `address` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long addressAt(long index) { return VkDescriptorBufferBindingInfoEXT.get_address(this.segment(), index); } + /// {@return `address`} + public @CType("VkDeviceAddress") long address() { return VkDescriptorBufferBindingInfoEXT.get_address(this.segment()); } + /// Sets `address` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_address(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_address.set(segment, 0L, index, value); } + /// Sets `address` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_address(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDescriptorBufferBindingInfoEXT.set_address(segment, 0L, value); } + /// Sets `address` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingInfoEXT addressAt(long index, @CType("VkDeviceAddress") long value) { VkDescriptorBufferBindingInfoEXT.set_address(this.segment(), index, value); return this; } + /// Sets `address` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingInfoEXT address(@CType("VkDeviceAddress") long value) { VkDescriptorBufferBindingInfoEXT.set_address(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferUsageFlags") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkBufferUsageFlags") int get_usage(MemorySegment segment) { return VkDescriptorBufferBindingInfoEXT.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkBufferUsageFlags") int usageAt(long index) { return VkDescriptorBufferBindingInfoEXT.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkBufferUsageFlags") int usage() { return VkDescriptorBufferBindingInfoEXT.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkBufferUsageFlags") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkBufferUsageFlags") int value) { VkDescriptorBufferBindingInfoEXT.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingInfoEXT usageAt(long index, @CType("VkBufferUsageFlags") int value) { VkDescriptorBufferBindingInfoEXT.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingInfoEXT usage(@CType("VkBufferUsageFlags") int value) { VkDescriptorBufferBindingInfoEXT.set_usage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.java new file mode 100644 index 00000000..6ed4e0fb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorBufferBindingPushDescriptorBufferHandleEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkBuffer buffer; +/// } VkDescriptorBufferBindingPushDescriptorBufferHandleEXT; +/// ``` +public final class VkDescriptorBufferBindingPushDescriptorBufferHandleEXT extends Struct { + /// The struct layout of `VkDescriptorBufferBindingPushDescriptorBufferHandleEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("buffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + + /// Creates `VkDescriptorBufferBindingPushDescriptorBufferHandleEXT` with the given segment. + /// @param segment the memory segment + public VkDescriptorBufferBindingPushDescriptorBufferHandleEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorBufferBindingPushDescriptorBufferHandleEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorBufferBindingPushDescriptorBufferHandleEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorBufferBindingPushDescriptorBufferHandleEXT(segment); } + + /// Creates `VkDescriptorBufferBindingPushDescriptorBufferHandleEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorBufferBindingPushDescriptorBufferHandleEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorBufferBindingPushDescriptorBufferHandleEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorBufferBindingPushDescriptorBufferHandleEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorBufferBindingPushDescriptorBufferHandleEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorBufferBindingPushDescriptorBufferHandleEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorBufferBindingPushDescriptorBufferHandleEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorBufferBindingPushDescriptorBufferHandleEXT` + public static VkDescriptorBufferBindingPushDescriptorBufferHandleEXT alloc(SegmentAllocator allocator) { return new VkDescriptorBufferBindingPushDescriptorBufferHandleEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorBufferBindingPushDescriptorBufferHandleEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorBufferBindingPushDescriptorBufferHandleEXT` + public static VkDescriptorBufferBindingPushDescriptorBufferHandleEXT alloc(SegmentAllocator allocator, long count) { return new VkDescriptorBufferBindingPushDescriptorBufferHandleEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingPushDescriptorBufferHandleEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingPushDescriptorBufferHandleEXT sType(@CType("VkStructureType") int value) { VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingPushDescriptorBufferHandleEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingPushDescriptorBufferHandleEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingPushDescriptorBufferHandleEXT bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorBufferBindingPushDescriptorBufferHandleEXT buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.set_buffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorGetInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorGetInfoEXT.java new file mode 100644 index 00000000..bb652781 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDescriptorGetInfoEXT.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### data +/// [Byte offset][#OFFSET_data] - [Memory layout][#ML_data] - [Getter][#data()] - [Setter][#data(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorGetInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDescriptorType type; +/// VkDescriptorDataEXT data; +/// } VkDescriptorGetInfoEXT; +/// ``` +public final class VkDescriptorGetInfoEXT extends Struct { + /// The struct layout of `VkDescriptorGetInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type"), + overrungl.vulkan.ext.union.VkDescriptorDataEXT.LAYOUT.withName("data") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The byte offset of `data`. + public static final long OFFSET_data = LAYOUT.byteOffset(PathElement.groupElement("data")); + /// The memory layout of `data`. + public static final MemoryLayout ML_data = LAYOUT.select(PathElement.groupElement("data")); + + /// Creates `VkDescriptorGetInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDescriptorGetInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorGetInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorGetInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorGetInfoEXT(segment); } + + /// Creates `VkDescriptorGetInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorGetInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorGetInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorGetInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorGetInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorGetInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorGetInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorGetInfoEXT` + public static VkDescriptorGetInfoEXT alloc(SegmentAllocator allocator) { return new VkDescriptorGetInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorGetInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorGetInfoEXT` + public static VkDescriptorGetInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDescriptorGetInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorGetInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorGetInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorGetInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorGetInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorGetInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorGetInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorGetInfoEXT sType(@CType("VkStructureType") int value) { VkDescriptorGetInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorGetInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorGetInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorGetInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorGetInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorGetInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorGetInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorGetInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorGetInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorType") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorType") int get_type(MemorySegment segment) { return VkDescriptorGetInfoEXT.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkDescriptorType") int typeAt(long index) { return VkDescriptorGetInfoEXT.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkDescriptorType") int type() { return VkDescriptorGetInfoEXT.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkDescriptorType") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkDescriptorType") int value) { VkDescriptorGetInfoEXT.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorGetInfoEXT typeAt(long index, @CType("VkDescriptorType") int value) { VkDescriptorGetInfoEXT.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorGetInfoEXT type(@CType("VkDescriptorType") int value) { VkDescriptorGetInfoEXT.set_type(this.segment(), value); return this; } + + /// {@return `data` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorDataEXT") java.lang.foreign.MemorySegment get_data(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_data, index), ML_data); } + /// {@return `data`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorDataEXT") java.lang.foreign.MemorySegment get_data(MemorySegment segment) { return VkDescriptorGetInfoEXT.get_data(segment, 0L); } + /// {@return `data` at the given index} + /// @param index the index + public @CType("VkDescriptorDataEXT") java.lang.foreign.MemorySegment dataAt(long index) { return VkDescriptorGetInfoEXT.get_data(this.segment(), index); } + /// {@return `data`} + public @CType("VkDescriptorDataEXT") java.lang.foreign.MemorySegment data() { return VkDescriptorGetInfoEXT.get_data(this.segment()); } + /// Sets `data` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_data(MemorySegment segment, long index, @CType("VkDescriptorDataEXT") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_data, index), ML_data.byteSize()); } + /// Sets `data` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_data(MemorySegment segment, @CType("VkDescriptorDataEXT") java.lang.foreign.MemorySegment value) { VkDescriptorGetInfoEXT.set_data(segment, 0L, value); } + /// Sets `data` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorGetInfoEXT dataAt(long index, @CType("VkDescriptorDataEXT") java.lang.foreign.MemorySegment value) { VkDescriptorGetInfoEXT.set_data(this.segment(), index, value); return this; } + /// Sets `data` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorGetInfoEXT data(@CType("VkDescriptorDataEXT") java.lang.foreign.MemorySegment value) { VkDescriptorGetInfoEXT.set_data(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceAddressBindingCallbackDataEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceAddressBindingCallbackDataEXT.java new file mode 100644 index 00000000..fc5a0ae6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceAddressBindingCallbackDataEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### baseAddress +/// [VarHandle][#VH_baseAddress] - [Getter][#baseAddress()] - [Setter][#baseAddress(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ### bindingType +/// [VarHandle][#VH_bindingType] - [Getter][#bindingType()] - [Setter][#bindingType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceAddressBindingCallbackDataEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceAddressBindingFlagsEXT flags; +/// VkDeviceAddress baseAddress; +/// VkDeviceSize size; +/// VkDeviceAddressBindingTypeEXT bindingType; +/// } VkDeviceAddressBindingCallbackDataEXT; +/// ``` +public final class VkDeviceAddressBindingCallbackDataEXT extends Struct { + /// The struct layout of `VkDeviceAddressBindingCallbackDataEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("baseAddress"), + ValueLayout.JAVA_LONG.withName("size"), + ValueLayout.JAVA_INT.withName("bindingType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `baseAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_baseAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("baseAddress")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `bindingType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bindingType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bindingType")); + + /// Creates `VkDeviceAddressBindingCallbackDataEXT` with the given segment. + /// @param segment the memory segment + public VkDeviceAddressBindingCallbackDataEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceAddressBindingCallbackDataEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceAddressBindingCallbackDataEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceAddressBindingCallbackDataEXT(segment); } + + /// Creates `VkDeviceAddressBindingCallbackDataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceAddressBindingCallbackDataEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceAddressBindingCallbackDataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceAddressBindingCallbackDataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceAddressBindingCallbackDataEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceAddressBindingCallbackDataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceAddressBindingCallbackDataEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceAddressBindingCallbackDataEXT` + public static VkDeviceAddressBindingCallbackDataEXT alloc(SegmentAllocator allocator) { return new VkDeviceAddressBindingCallbackDataEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceAddressBindingCallbackDataEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceAddressBindingCallbackDataEXT` + public static VkDeviceAddressBindingCallbackDataEXT alloc(SegmentAllocator allocator, long count) { return new VkDeviceAddressBindingCallbackDataEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceAddressBindingCallbackDataEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceAddressBindingCallbackDataEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceAddressBindingCallbackDataEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceAddressBindingCallbackDataEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceAddressBindingCallbackDataEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT sType(@CType("VkStructureType") int value) { VkDeviceAddressBindingCallbackDataEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceAddressBindingCallbackDataEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceAddressBindingCallbackDataEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceAddressBindingCallbackDataEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceAddressBindingCallbackDataEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceAddressBindingCallbackDataEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceAddressBindingCallbackDataEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddressBindingFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddressBindingFlagsEXT") int get_flags(MemorySegment segment) { return VkDeviceAddressBindingCallbackDataEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDeviceAddressBindingFlagsEXT") int flagsAt(long index) { return VkDeviceAddressBindingCallbackDataEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDeviceAddressBindingFlagsEXT") int flags() { return VkDeviceAddressBindingCallbackDataEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDeviceAddressBindingFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDeviceAddressBindingFlagsEXT") int value) { VkDeviceAddressBindingCallbackDataEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT flagsAt(long index, @CType("VkDeviceAddressBindingFlagsEXT") int value) { VkDeviceAddressBindingCallbackDataEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT flags(@CType("VkDeviceAddressBindingFlagsEXT") int value) { VkDeviceAddressBindingCallbackDataEXT.set_flags(this.segment(), value); return this; } + + /// {@return `baseAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_baseAddress(MemorySegment segment, long index) { return (long) VH_baseAddress.get(segment, 0L, index); } + /// {@return `baseAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_baseAddress(MemorySegment segment) { return VkDeviceAddressBindingCallbackDataEXT.get_baseAddress(segment, 0L); } + /// {@return `baseAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long baseAddressAt(long index) { return VkDeviceAddressBindingCallbackDataEXT.get_baseAddress(this.segment(), index); } + /// {@return `baseAddress`} + public @CType("VkDeviceAddress") long baseAddress() { return VkDeviceAddressBindingCallbackDataEXT.get_baseAddress(this.segment()); } + /// Sets `baseAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_baseAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_baseAddress.set(segment, 0L, index, value); } + /// Sets `baseAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_baseAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDeviceAddressBindingCallbackDataEXT.set_baseAddress(segment, 0L, value); } + /// Sets `baseAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT baseAddressAt(long index, @CType("VkDeviceAddress") long value) { VkDeviceAddressBindingCallbackDataEXT.set_baseAddress(this.segment(), index, value); return this; } + /// Sets `baseAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT baseAddress(@CType("VkDeviceAddress") long value) { VkDeviceAddressBindingCallbackDataEXT.set_baseAddress(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkDeviceAddressBindingCallbackDataEXT.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkDeviceAddressBindingCallbackDataEXT.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkDeviceAddressBindingCallbackDataEXT.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkDeviceAddressBindingCallbackDataEXT.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT sizeAt(long index, @CType("VkDeviceSize") long value) { VkDeviceAddressBindingCallbackDataEXT.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT size(@CType("VkDeviceSize") long value) { VkDeviceAddressBindingCallbackDataEXT.set_size(this.segment(), value); return this; } + + /// {@return `bindingType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddressBindingTypeEXT") int get_bindingType(MemorySegment segment, long index) { return (int) VH_bindingType.get(segment, 0L, index); } + /// {@return `bindingType`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddressBindingTypeEXT") int get_bindingType(MemorySegment segment) { return VkDeviceAddressBindingCallbackDataEXT.get_bindingType(segment, 0L); } + /// {@return `bindingType` at the given index} + /// @param index the index + public @CType("VkDeviceAddressBindingTypeEXT") int bindingTypeAt(long index) { return VkDeviceAddressBindingCallbackDataEXT.get_bindingType(this.segment(), index); } + /// {@return `bindingType`} + public @CType("VkDeviceAddressBindingTypeEXT") int bindingType() { return VkDeviceAddressBindingCallbackDataEXT.get_bindingType(this.segment()); } + /// Sets `bindingType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bindingType(MemorySegment segment, long index, @CType("VkDeviceAddressBindingTypeEXT") int value) { VH_bindingType.set(segment, 0L, index, value); } + /// Sets `bindingType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bindingType(MemorySegment segment, @CType("VkDeviceAddressBindingTypeEXT") int value) { VkDeviceAddressBindingCallbackDataEXT.set_bindingType(segment, 0L, value); } + /// Sets `bindingType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT bindingTypeAt(long index, @CType("VkDeviceAddressBindingTypeEXT") int value) { VkDeviceAddressBindingCallbackDataEXT.set_bindingType(this.segment(), index, value); return this; } + /// Sets `bindingType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceAddressBindingCallbackDataEXT bindingType(@CType("VkDeviceAddressBindingTypeEXT") int value) { VkDeviceAddressBindingCallbackDataEXT.set_bindingType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceDeviceMemoryReportCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceDeviceMemoryReportCreateInfoEXT.java new file mode 100644 index 00000000..5b1de599 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceDeviceMemoryReportCreateInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pfnUserCallback +/// [VarHandle][#VH_pfnUserCallback] - [Getter][#pfnUserCallback()] - [Setter][#pfnUserCallback(java.lang.foreign.MemorySegment)] +/// ### pUserData +/// [VarHandle][#VH_pUserData] - [Getter][#pUserData()] - [Setter][#pUserData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceDeviceMemoryReportCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceMemoryReportFlagsEXT flags; +/// PFN_vkDeviceMemoryReportCallbackEXT pfnUserCallback; +/// void * pUserData; +/// } VkDeviceDeviceMemoryReportCreateInfoEXT; +/// ``` +public final class VkDeviceDeviceMemoryReportCreateInfoEXT extends Struct { + /// The struct layout of `VkDeviceDeviceMemoryReportCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("pfnUserCallback"), + ValueLayout.ADDRESS.withName("pUserData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pfnUserCallback` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pfnUserCallback = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pfnUserCallback")); + /// The [VarHandle] of `pUserData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pUserData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pUserData")); + + /// Creates `VkDeviceDeviceMemoryReportCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDeviceDeviceMemoryReportCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceDeviceMemoryReportCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceDeviceMemoryReportCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceDeviceMemoryReportCreateInfoEXT(segment); } + + /// Creates `VkDeviceDeviceMemoryReportCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceDeviceMemoryReportCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceDeviceMemoryReportCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceDeviceMemoryReportCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceDeviceMemoryReportCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceDeviceMemoryReportCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceDeviceMemoryReportCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceDeviceMemoryReportCreateInfoEXT` + public static VkDeviceDeviceMemoryReportCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkDeviceDeviceMemoryReportCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceDeviceMemoryReportCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceDeviceMemoryReportCreateInfoEXT` + public static VkDeviceDeviceMemoryReportCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDeviceDeviceMemoryReportCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceDeviceMemoryReportCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceDeviceMemoryReportCreateInfoEXT sType(@CType("VkStructureType") int value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceDeviceMemoryReportCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceDeviceMemoryReportCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemoryReportFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemoryReportFlagsEXT") int get_flags(MemorySegment segment) { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDeviceMemoryReportFlagsEXT") int flagsAt(long index) { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDeviceMemoryReportFlagsEXT") int flags() { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDeviceMemoryReportFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDeviceMemoryReportFlagsEXT") int value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceDeviceMemoryReportCreateInfoEXT flagsAt(long index, @CType("VkDeviceMemoryReportFlagsEXT") int value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceDeviceMemoryReportCreateInfoEXT flags(@CType("VkDeviceMemoryReportFlagsEXT") int value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `pfnUserCallback` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("PFN_vkDeviceMemoryReportCallbackEXT") java.lang.foreign.MemorySegment get_pfnUserCallback(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pfnUserCallback.get(segment, 0L, index); } + /// {@return `pfnUserCallback`} + /// @param segment the segment of the struct + public static @CType("PFN_vkDeviceMemoryReportCallbackEXT") java.lang.foreign.MemorySegment get_pfnUserCallback(MemorySegment segment) { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_pfnUserCallback(segment, 0L); } + /// {@return `pfnUserCallback` at the given index} + /// @param index the index + public @CType("PFN_vkDeviceMemoryReportCallbackEXT") java.lang.foreign.MemorySegment pfnUserCallbackAt(long index) { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_pfnUserCallback(this.segment(), index); } + /// {@return `pfnUserCallback`} + public @CType("PFN_vkDeviceMemoryReportCallbackEXT") java.lang.foreign.MemorySegment pfnUserCallback() { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_pfnUserCallback(this.segment()); } + /// Sets `pfnUserCallback` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pfnUserCallback(MemorySegment segment, long index, @CType("PFN_vkDeviceMemoryReportCallbackEXT") java.lang.foreign.MemorySegment value) { VH_pfnUserCallback.set(segment, 0L, index, value); } + /// Sets `pfnUserCallback` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pfnUserCallback(MemorySegment segment, @CType("PFN_vkDeviceMemoryReportCallbackEXT") java.lang.foreign.MemorySegment value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_pfnUserCallback(segment, 0L, value); } + /// Sets `pfnUserCallback` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceDeviceMemoryReportCreateInfoEXT pfnUserCallbackAt(long index, @CType("PFN_vkDeviceMemoryReportCallbackEXT") java.lang.foreign.MemorySegment value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_pfnUserCallback(this.segment(), index, value); return this; } + /// Sets `pfnUserCallback` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceDeviceMemoryReportCreateInfoEXT pfnUserCallback(@CType("PFN_vkDeviceMemoryReportCallbackEXT") java.lang.foreign.MemorySegment value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_pfnUserCallback(this.segment(), value); return this; } + + /// {@return `pUserData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pUserData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pUserData.get(segment, 0L, index); } + /// {@return `pUserData`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pUserData(MemorySegment segment) { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_pUserData(segment, 0L); } + /// {@return `pUserData` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pUserDataAt(long index) { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_pUserData(this.segment(), index); } + /// {@return `pUserData`} + public @CType("void *") java.lang.foreign.MemorySegment pUserData() { return VkDeviceDeviceMemoryReportCreateInfoEXT.get_pUserData(this.segment()); } + /// Sets `pUserData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pUserData(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pUserData.set(segment, 0L, index, value); } + /// Sets `pUserData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pUserData(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_pUserData(segment, 0L, value); } + /// Sets `pUserData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceDeviceMemoryReportCreateInfoEXT pUserDataAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_pUserData(this.segment(), index, value); return this; } + /// Sets `pUserData` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceDeviceMemoryReportCreateInfoEXT pUserData(@CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceDeviceMemoryReportCreateInfoEXT.set_pUserData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceEventInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceEventInfoEXT.java new file mode 100644 index 00000000..6b1ae38f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceEventInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceEvent +/// [VarHandle][#VH_deviceEvent] - [Getter][#deviceEvent()] - [Setter][#deviceEvent(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceEventInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceEventTypeEXT deviceEvent; +/// } VkDeviceEventInfoEXT; +/// ``` +public final class VkDeviceEventInfoEXT extends Struct { + /// The struct layout of `VkDeviceEventInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceEvent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceEvent` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceEvent = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceEvent")); + + /// Creates `VkDeviceEventInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDeviceEventInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceEventInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceEventInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceEventInfoEXT(segment); } + + /// Creates `VkDeviceEventInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceEventInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceEventInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceEventInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceEventInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceEventInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceEventInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceEventInfoEXT` + public static VkDeviceEventInfoEXT alloc(SegmentAllocator allocator) { return new VkDeviceEventInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceEventInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceEventInfoEXT` + public static VkDeviceEventInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDeviceEventInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceEventInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceEventInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceEventInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceEventInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceEventInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceEventInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceEventInfoEXT sType(@CType("VkStructureType") int value) { VkDeviceEventInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceEventInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceEventInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceEventInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceEventInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceEventInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceEventInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceEventInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceEventInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceEvent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceEventTypeEXT") int get_deviceEvent(MemorySegment segment, long index) { return (int) VH_deviceEvent.get(segment, 0L, index); } + /// {@return `deviceEvent`} + /// @param segment the segment of the struct + public static @CType("VkDeviceEventTypeEXT") int get_deviceEvent(MemorySegment segment) { return VkDeviceEventInfoEXT.get_deviceEvent(segment, 0L); } + /// {@return `deviceEvent` at the given index} + /// @param index the index + public @CType("VkDeviceEventTypeEXT") int deviceEventAt(long index) { return VkDeviceEventInfoEXT.get_deviceEvent(this.segment(), index); } + /// {@return `deviceEvent`} + public @CType("VkDeviceEventTypeEXT") int deviceEvent() { return VkDeviceEventInfoEXT.get_deviceEvent(this.segment()); } + /// Sets `deviceEvent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceEvent(MemorySegment segment, long index, @CType("VkDeviceEventTypeEXT") int value) { VH_deviceEvent.set(segment, 0L, index, value); } + /// Sets `deviceEvent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceEvent(MemorySegment segment, @CType("VkDeviceEventTypeEXT") int value) { VkDeviceEventInfoEXT.set_deviceEvent(segment, 0L, value); } + /// Sets `deviceEvent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceEventInfoEXT deviceEventAt(long index, @CType("VkDeviceEventTypeEXT") int value) { VkDeviceEventInfoEXT.set_deviceEvent(this.segment(), index, value); return this; } + /// Sets `deviceEvent` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceEventInfoEXT deviceEvent(@CType("VkDeviceEventTypeEXT") int value) { VkDeviceEventInfoEXT.set_deviceEvent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultAddressInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultAddressInfoEXT.java new file mode 100644 index 00000000..a1fad7bc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultAddressInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### addressType +/// [VarHandle][#VH_addressType] - [Getter][#addressType()] - [Setter][#addressType(int)] +/// ### reportedAddress +/// [VarHandle][#VH_reportedAddress] - [Getter][#reportedAddress()] - [Setter][#reportedAddress(long)] +/// ### addressPrecision +/// [VarHandle][#VH_addressPrecision] - [Getter][#addressPrecision()] - [Setter][#addressPrecision(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceFaultAddressInfoEXT { +/// VkDeviceFaultAddressTypeEXT addressType; +/// VkDeviceAddress reportedAddress; +/// VkDeviceSize addressPrecision; +/// } VkDeviceFaultAddressInfoEXT; +/// ``` +public final class VkDeviceFaultAddressInfoEXT extends Struct { + /// The struct layout of `VkDeviceFaultAddressInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("addressType"), + ValueLayout.JAVA_LONG.withName("reportedAddress"), + ValueLayout.JAVA_LONG.withName("addressPrecision") + ); + /// The [VarHandle] of `addressType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_addressType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("addressType")); + /// The [VarHandle] of `reportedAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_reportedAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reportedAddress")); + /// The [VarHandle] of `addressPrecision` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_addressPrecision = LAYOUT.arrayElementVarHandle(PathElement.groupElement("addressPrecision")); + + /// Creates `VkDeviceFaultAddressInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDeviceFaultAddressInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceFaultAddressInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultAddressInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultAddressInfoEXT(segment); } + + /// Creates `VkDeviceFaultAddressInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultAddressInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultAddressInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceFaultAddressInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultAddressInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultAddressInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceFaultAddressInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceFaultAddressInfoEXT` + public static VkDeviceFaultAddressInfoEXT alloc(SegmentAllocator allocator) { return new VkDeviceFaultAddressInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceFaultAddressInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceFaultAddressInfoEXT` + public static VkDeviceFaultAddressInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDeviceFaultAddressInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `addressType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceFaultAddressTypeEXT") int get_addressType(MemorySegment segment, long index) { return (int) VH_addressType.get(segment, 0L, index); } + /// {@return `addressType`} + /// @param segment the segment of the struct + public static @CType("VkDeviceFaultAddressTypeEXT") int get_addressType(MemorySegment segment) { return VkDeviceFaultAddressInfoEXT.get_addressType(segment, 0L); } + /// {@return `addressType` at the given index} + /// @param index the index + public @CType("VkDeviceFaultAddressTypeEXT") int addressTypeAt(long index) { return VkDeviceFaultAddressInfoEXT.get_addressType(this.segment(), index); } + /// {@return `addressType`} + public @CType("VkDeviceFaultAddressTypeEXT") int addressType() { return VkDeviceFaultAddressInfoEXT.get_addressType(this.segment()); } + /// Sets `addressType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_addressType(MemorySegment segment, long index, @CType("VkDeviceFaultAddressTypeEXT") int value) { VH_addressType.set(segment, 0L, index, value); } + /// Sets `addressType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_addressType(MemorySegment segment, @CType("VkDeviceFaultAddressTypeEXT") int value) { VkDeviceFaultAddressInfoEXT.set_addressType(segment, 0L, value); } + /// Sets `addressType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultAddressInfoEXT addressTypeAt(long index, @CType("VkDeviceFaultAddressTypeEXT") int value) { VkDeviceFaultAddressInfoEXT.set_addressType(this.segment(), index, value); return this; } + /// Sets `addressType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultAddressInfoEXT addressType(@CType("VkDeviceFaultAddressTypeEXT") int value) { VkDeviceFaultAddressInfoEXT.set_addressType(this.segment(), value); return this; } + + /// {@return `reportedAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_reportedAddress(MemorySegment segment, long index) { return (long) VH_reportedAddress.get(segment, 0L, index); } + /// {@return `reportedAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_reportedAddress(MemorySegment segment) { return VkDeviceFaultAddressInfoEXT.get_reportedAddress(segment, 0L); } + /// {@return `reportedAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long reportedAddressAt(long index) { return VkDeviceFaultAddressInfoEXT.get_reportedAddress(this.segment(), index); } + /// {@return `reportedAddress`} + public @CType("VkDeviceAddress") long reportedAddress() { return VkDeviceFaultAddressInfoEXT.get_reportedAddress(this.segment()); } + /// Sets `reportedAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reportedAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_reportedAddress.set(segment, 0L, index, value); } + /// Sets `reportedAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reportedAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDeviceFaultAddressInfoEXT.set_reportedAddress(segment, 0L, value); } + /// Sets `reportedAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultAddressInfoEXT reportedAddressAt(long index, @CType("VkDeviceAddress") long value) { VkDeviceFaultAddressInfoEXT.set_reportedAddress(this.segment(), index, value); return this; } + /// Sets `reportedAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultAddressInfoEXT reportedAddress(@CType("VkDeviceAddress") long value) { VkDeviceFaultAddressInfoEXT.set_reportedAddress(this.segment(), value); return this; } + + /// {@return `addressPrecision` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_addressPrecision(MemorySegment segment, long index) { return (long) VH_addressPrecision.get(segment, 0L, index); } + /// {@return `addressPrecision`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_addressPrecision(MemorySegment segment) { return VkDeviceFaultAddressInfoEXT.get_addressPrecision(segment, 0L); } + /// {@return `addressPrecision` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long addressPrecisionAt(long index) { return VkDeviceFaultAddressInfoEXT.get_addressPrecision(this.segment(), index); } + /// {@return `addressPrecision`} + public @CType("VkDeviceSize") long addressPrecision() { return VkDeviceFaultAddressInfoEXT.get_addressPrecision(this.segment()); } + /// Sets `addressPrecision` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_addressPrecision(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_addressPrecision.set(segment, 0L, index, value); } + /// Sets `addressPrecision` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_addressPrecision(MemorySegment segment, @CType("VkDeviceSize") long value) { VkDeviceFaultAddressInfoEXT.set_addressPrecision(segment, 0L, value); } + /// Sets `addressPrecision` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultAddressInfoEXT addressPrecisionAt(long index, @CType("VkDeviceSize") long value) { VkDeviceFaultAddressInfoEXT.set_addressPrecision(this.segment(), index, value); return this; } + /// Sets `addressPrecision` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultAddressInfoEXT addressPrecision(@CType("VkDeviceSize") long value) { VkDeviceFaultAddressInfoEXT.set_addressPrecision(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultCountsEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultCountsEXT.java new file mode 100644 index 00000000..780bf548 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultCountsEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### addressInfoCount +/// [VarHandle][#VH_addressInfoCount] - [Getter][#addressInfoCount()] - [Setter][#addressInfoCount(int)] +/// ### vendorInfoCount +/// [VarHandle][#VH_vendorInfoCount] - [Getter][#vendorInfoCount()] - [Setter][#vendorInfoCount(int)] +/// ### vendorBinarySize +/// [VarHandle][#VH_vendorBinarySize] - [Getter][#vendorBinarySize()] - [Setter][#vendorBinarySize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceFaultCountsEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t addressInfoCount; +/// uint32_t vendorInfoCount; +/// VkDeviceSize vendorBinarySize; +/// } VkDeviceFaultCountsEXT; +/// ``` +public final class VkDeviceFaultCountsEXT extends Struct { + /// The struct layout of `VkDeviceFaultCountsEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("addressInfoCount"), + ValueLayout.JAVA_INT.withName("vendorInfoCount"), + ValueLayout.JAVA_LONG.withName("vendorBinarySize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `addressInfoCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_addressInfoCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("addressInfoCount")); + /// The [VarHandle] of `vendorInfoCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vendorInfoCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vendorInfoCount")); + /// The [VarHandle] of `vendorBinarySize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_vendorBinarySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vendorBinarySize")); + + /// Creates `VkDeviceFaultCountsEXT` with the given segment. + /// @param segment the memory segment + public VkDeviceFaultCountsEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceFaultCountsEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultCountsEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultCountsEXT(segment); } + + /// Creates `VkDeviceFaultCountsEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultCountsEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultCountsEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceFaultCountsEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultCountsEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultCountsEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceFaultCountsEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceFaultCountsEXT` + public static VkDeviceFaultCountsEXT alloc(SegmentAllocator allocator) { return new VkDeviceFaultCountsEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceFaultCountsEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceFaultCountsEXT` + public static VkDeviceFaultCountsEXT alloc(SegmentAllocator allocator, long count) { return new VkDeviceFaultCountsEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceFaultCountsEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceFaultCountsEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceFaultCountsEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceFaultCountsEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultCountsEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceFaultCountsEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultCountsEXT sType(@CType("VkStructureType") int value) { VkDeviceFaultCountsEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceFaultCountsEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceFaultCountsEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceFaultCountsEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceFaultCountsEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultCountsEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceFaultCountsEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultCountsEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceFaultCountsEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `addressInfoCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_addressInfoCount(MemorySegment segment, long index) { return (int) VH_addressInfoCount.get(segment, 0L, index); } + /// {@return `addressInfoCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_addressInfoCount(MemorySegment segment) { return VkDeviceFaultCountsEXT.get_addressInfoCount(segment, 0L); } + /// {@return `addressInfoCount` at the given index} + /// @param index the index + public @CType("uint32_t") int addressInfoCountAt(long index) { return VkDeviceFaultCountsEXT.get_addressInfoCount(this.segment(), index); } + /// {@return `addressInfoCount`} + public @CType("uint32_t") int addressInfoCount() { return VkDeviceFaultCountsEXT.get_addressInfoCount(this.segment()); } + /// Sets `addressInfoCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_addressInfoCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_addressInfoCount.set(segment, 0L, index, value); } + /// Sets `addressInfoCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_addressInfoCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultCountsEXT.set_addressInfoCount(segment, 0L, value); } + /// Sets `addressInfoCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultCountsEXT addressInfoCountAt(long index, @CType("uint32_t") int value) { VkDeviceFaultCountsEXT.set_addressInfoCount(this.segment(), index, value); return this; } + /// Sets `addressInfoCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultCountsEXT addressInfoCount(@CType("uint32_t") int value) { VkDeviceFaultCountsEXT.set_addressInfoCount(this.segment(), value); return this; } + + /// {@return `vendorInfoCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vendorInfoCount(MemorySegment segment, long index) { return (int) VH_vendorInfoCount.get(segment, 0L, index); } + /// {@return `vendorInfoCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vendorInfoCount(MemorySegment segment) { return VkDeviceFaultCountsEXT.get_vendorInfoCount(segment, 0L); } + /// {@return `vendorInfoCount` at the given index} + /// @param index the index + public @CType("uint32_t") int vendorInfoCountAt(long index) { return VkDeviceFaultCountsEXT.get_vendorInfoCount(this.segment(), index); } + /// {@return `vendorInfoCount`} + public @CType("uint32_t") int vendorInfoCount() { return VkDeviceFaultCountsEXT.get_vendorInfoCount(this.segment()); } + /// Sets `vendorInfoCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vendorInfoCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vendorInfoCount.set(segment, 0L, index, value); } + /// Sets `vendorInfoCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vendorInfoCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultCountsEXT.set_vendorInfoCount(segment, 0L, value); } + /// Sets `vendorInfoCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultCountsEXT vendorInfoCountAt(long index, @CType("uint32_t") int value) { VkDeviceFaultCountsEXT.set_vendorInfoCount(this.segment(), index, value); return this; } + /// Sets `vendorInfoCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultCountsEXT vendorInfoCount(@CType("uint32_t") int value) { VkDeviceFaultCountsEXT.set_vendorInfoCount(this.segment(), value); return this; } + + /// {@return `vendorBinarySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_vendorBinarySize(MemorySegment segment, long index) { return (long) VH_vendorBinarySize.get(segment, 0L, index); } + /// {@return `vendorBinarySize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_vendorBinarySize(MemorySegment segment) { return VkDeviceFaultCountsEXT.get_vendorBinarySize(segment, 0L); } + /// {@return `vendorBinarySize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long vendorBinarySizeAt(long index) { return VkDeviceFaultCountsEXT.get_vendorBinarySize(this.segment(), index); } + /// {@return `vendorBinarySize`} + public @CType("VkDeviceSize") long vendorBinarySize() { return VkDeviceFaultCountsEXT.get_vendorBinarySize(this.segment()); } + /// Sets `vendorBinarySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vendorBinarySize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_vendorBinarySize.set(segment, 0L, index, value); } + /// Sets `vendorBinarySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vendorBinarySize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkDeviceFaultCountsEXT.set_vendorBinarySize(segment, 0L, value); } + /// Sets `vendorBinarySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultCountsEXT vendorBinarySizeAt(long index, @CType("VkDeviceSize") long value) { VkDeviceFaultCountsEXT.set_vendorBinarySize(this.segment(), index, value); return this; } + /// Sets `vendorBinarySize` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultCountsEXT vendorBinarySize(@CType("VkDeviceSize") long value) { VkDeviceFaultCountsEXT.set_vendorBinarySize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultInfoEXT.java new file mode 100644 index 00000000..ab4ff1f8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultInfoEXT.java @@ -0,0 +1,313 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### description +/// [Byte offset handle][#MH_description] - [Memory layout][#ML_description] - [Getter][#description(long)] - [Setter][#description(long, java.lang.foreign.MemorySegment)] +/// ### pAddressInfos +/// [VarHandle][#VH_pAddressInfos] - [Getter][#pAddressInfos()] - [Setter][#pAddressInfos(java.lang.foreign.MemorySegment)] +/// ### pVendorInfos +/// [VarHandle][#VH_pVendorInfos] - [Getter][#pVendorInfos()] - [Setter][#pVendorInfos(java.lang.foreign.MemorySegment)] +/// ### pVendorBinaryData +/// [VarHandle][#VH_pVendorBinaryData] - [Getter][#pVendorBinaryData()] - [Setter][#pVendorBinaryData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceFaultInfoEXT { +/// VkStructureType sType; +/// void * pNext; +/// char[VK_MAX_DESCRIPTION_SIZE] description; +/// VkDeviceFaultAddressInfoEXT * pAddressInfos; +/// VkDeviceFaultVendorInfoEXT * pVendorInfos; +/// void * pVendorBinaryData; +/// } VkDeviceFaultInfoEXT; +/// ``` +public final class VkDeviceFaultInfoEXT extends Struct { + /// The struct layout of `VkDeviceFaultInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("description"), + ValueLayout.ADDRESS.withName("pAddressInfos"), + ValueLayout.ADDRESS.withName("pVendorInfos"), + ValueLayout.ADDRESS.withName("pVendorBinaryData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `description` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_description = LAYOUT.byteOffsetHandle(PathElement.groupElement("description"), PathElement.sequenceElement()); + /// The memory layout of `description`. + public static final MemoryLayout ML_description = LAYOUT.select(PathElement.groupElement("description")); + /// The [VarHandle] of `pAddressInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAddressInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAddressInfos")); + /// The [VarHandle] of `pVendorInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVendorInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVendorInfos")); + /// The [VarHandle] of `pVendorBinaryData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVendorBinaryData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVendorBinaryData")); + + /// Creates `VkDeviceFaultInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDeviceFaultInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceFaultInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultInfoEXT(segment); } + + /// Creates `VkDeviceFaultInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceFaultInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceFaultInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceFaultInfoEXT` + public static VkDeviceFaultInfoEXT alloc(SegmentAllocator allocator) { return new VkDeviceFaultInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceFaultInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceFaultInfoEXT` + public static VkDeviceFaultInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDeviceFaultInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceFaultInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceFaultInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceFaultInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceFaultInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceFaultInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT sType(@CType("VkStructureType") int value) { VkDeviceFaultInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceFaultInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceFaultInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceFaultInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `description` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `description`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long elementIndex) { return VkDeviceFaultInfoEXT.get_description(segment, 0L, elementIndex); } + /// {@return `description` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment descriptionAt(long index, long elementIndex) { return VkDeviceFaultInfoEXT.get_description(this.segment(), index, elementIndex); } + /// {@return `description`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment description(long elementIndex) { return VkDeviceFaultInfoEXT.get_description(this.segment(), elementIndex); } + /// Sets `description` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `description` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_description(segment, 0L, elementIndex, value); } + /// Sets `description` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT descriptionAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_description(this.segment(), index, elementIndex, value); return this; } + /// Sets `description` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT description(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_description(this.segment(), elementIndex, value); return this; } + + /// {@return `pAddressInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceFaultAddressInfoEXT *") java.lang.foreign.MemorySegment get_pAddressInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAddressInfos.get(segment, 0L, index); } + /// {@return `pAddressInfos`} + /// @param segment the segment of the struct + public static @CType("VkDeviceFaultAddressInfoEXT *") java.lang.foreign.MemorySegment get_pAddressInfos(MemorySegment segment) { return VkDeviceFaultInfoEXT.get_pAddressInfos(segment, 0L); } + /// {@return `pAddressInfos` at the given index} + /// @param index the index + public @CType("VkDeviceFaultAddressInfoEXT *") java.lang.foreign.MemorySegment pAddressInfosAt(long index) { return VkDeviceFaultInfoEXT.get_pAddressInfos(this.segment(), index); } + /// {@return `pAddressInfos`} + public @CType("VkDeviceFaultAddressInfoEXT *") java.lang.foreign.MemorySegment pAddressInfos() { return VkDeviceFaultInfoEXT.get_pAddressInfos(this.segment()); } + /// Sets `pAddressInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAddressInfos(MemorySegment segment, long index, @CType("VkDeviceFaultAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pAddressInfos.set(segment, 0L, index, value); } + /// Sets `pAddressInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAddressInfos(MemorySegment segment, @CType("VkDeviceFaultAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pAddressInfos(segment, 0L, value); } + /// Sets `pAddressInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT pAddressInfosAt(long index, @CType("VkDeviceFaultAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pAddressInfos(this.segment(), index, value); return this; } + /// Sets `pAddressInfos` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT pAddressInfos(@CType("VkDeviceFaultAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pAddressInfos(this.segment(), value); return this; } + + /// {@return `pVendorInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceFaultVendorInfoEXT *") java.lang.foreign.MemorySegment get_pVendorInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVendorInfos.get(segment, 0L, index); } + /// {@return `pVendorInfos`} + /// @param segment the segment of the struct + public static @CType("VkDeviceFaultVendorInfoEXT *") java.lang.foreign.MemorySegment get_pVendorInfos(MemorySegment segment) { return VkDeviceFaultInfoEXT.get_pVendorInfos(segment, 0L); } + /// {@return `pVendorInfos` at the given index} + /// @param index the index + public @CType("VkDeviceFaultVendorInfoEXT *") java.lang.foreign.MemorySegment pVendorInfosAt(long index) { return VkDeviceFaultInfoEXT.get_pVendorInfos(this.segment(), index); } + /// {@return `pVendorInfos`} + public @CType("VkDeviceFaultVendorInfoEXT *") java.lang.foreign.MemorySegment pVendorInfos() { return VkDeviceFaultInfoEXT.get_pVendorInfos(this.segment()); } + /// Sets `pVendorInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVendorInfos(MemorySegment segment, long index, @CType("VkDeviceFaultVendorInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pVendorInfos.set(segment, 0L, index, value); } + /// Sets `pVendorInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVendorInfos(MemorySegment segment, @CType("VkDeviceFaultVendorInfoEXT *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pVendorInfos(segment, 0L, value); } + /// Sets `pVendorInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT pVendorInfosAt(long index, @CType("VkDeviceFaultVendorInfoEXT *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pVendorInfos(this.segment(), index, value); return this; } + /// Sets `pVendorInfos` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT pVendorInfos(@CType("VkDeviceFaultVendorInfoEXT *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pVendorInfos(this.segment(), value); return this; } + + /// {@return `pVendorBinaryData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pVendorBinaryData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVendorBinaryData.get(segment, 0L, index); } + /// {@return `pVendorBinaryData`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pVendorBinaryData(MemorySegment segment) { return VkDeviceFaultInfoEXT.get_pVendorBinaryData(segment, 0L); } + /// {@return `pVendorBinaryData` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pVendorBinaryDataAt(long index) { return VkDeviceFaultInfoEXT.get_pVendorBinaryData(this.segment(), index); } + /// {@return `pVendorBinaryData`} + public @CType("void *") java.lang.foreign.MemorySegment pVendorBinaryData() { return VkDeviceFaultInfoEXT.get_pVendorBinaryData(this.segment()); } + /// Sets `pVendorBinaryData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVendorBinaryData(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pVendorBinaryData.set(segment, 0L, index, value); } + /// Sets `pVendorBinaryData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVendorBinaryData(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pVendorBinaryData(segment, 0L, value); } + /// Sets `pVendorBinaryData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT pVendorBinaryDataAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pVendorBinaryData(this.segment(), index, value); return this; } + /// Sets `pVendorBinaryData` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultInfoEXT pVendorBinaryData(@CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceFaultInfoEXT.set_pVendorBinaryData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultVendorBinaryHeaderVersionOneEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultVendorBinaryHeaderVersionOneEXT.java new file mode 100644 index 00000000..acba065f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultVendorBinaryHeaderVersionOneEXT.java @@ -0,0 +1,498 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### headerSize +/// [VarHandle][#VH_headerSize] - [Getter][#headerSize()] - [Setter][#headerSize(int)] +/// ### headerVersion +/// [VarHandle][#VH_headerVersion] - [Getter][#headerVersion()] - [Setter][#headerVersion(int)] +/// ### vendorID +/// [VarHandle][#VH_vendorID] - [Getter][#vendorID()] - [Setter][#vendorID(int)] +/// ### deviceID +/// [VarHandle][#VH_deviceID] - [Getter][#deviceID()] - [Setter][#deviceID(int)] +/// ### driverVersion +/// [VarHandle][#VH_driverVersion] - [Getter][#driverVersion()] - [Setter][#driverVersion(int)] +/// ### pipelineCacheUUID +/// [Byte offset handle][#MH_pipelineCacheUUID] - [Memory layout][#ML_pipelineCacheUUID] - [Getter][#pipelineCacheUUID(long)] - [Setter][#pipelineCacheUUID(long, java.lang.foreign.MemorySegment)] +/// ### applicationNameOffset +/// [VarHandle][#VH_applicationNameOffset] - [Getter][#applicationNameOffset()] - [Setter][#applicationNameOffset(int)] +/// ### applicationVersion +/// [VarHandle][#VH_applicationVersion] - [Getter][#applicationVersion()] - [Setter][#applicationVersion(int)] +/// ### engineNameOffset +/// [VarHandle][#VH_engineNameOffset] - [Getter][#engineNameOffset()] - [Setter][#engineNameOffset(int)] +/// ### engineVersion +/// [VarHandle][#VH_engineVersion] - [Getter][#engineVersion()] - [Setter][#engineVersion(int)] +/// ### apiVersion +/// [VarHandle][#VH_apiVersion] - [Getter][#apiVersion()] - [Setter][#apiVersion(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceFaultVendorBinaryHeaderVersionOneEXT { +/// uint32_t headerSize; +/// VkDeviceFaultVendorBinaryHeaderVersionEXT headerVersion; +/// uint32_t vendorID; +/// uint32_t deviceID; +/// uint32_t driverVersion; +/// uint8_t[VK_UUID_SIZE] pipelineCacheUUID; +/// uint32_t applicationNameOffset; +/// uint32_t applicationVersion; +/// uint32_t engineNameOffset; +/// uint32_t engineVersion; +/// uint32_t apiVersion; +/// } VkDeviceFaultVendorBinaryHeaderVersionOneEXT; +/// ``` +public final class VkDeviceFaultVendorBinaryHeaderVersionOneEXT extends Struct { + /// The struct layout of `VkDeviceFaultVendorBinaryHeaderVersionOneEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("headerSize"), + ValueLayout.JAVA_INT.withName("headerVersion"), + ValueLayout.JAVA_INT.withName("vendorID"), + ValueLayout.JAVA_INT.withName("deviceID"), + ValueLayout.JAVA_INT.withName("driverVersion"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("pipelineCacheUUID"), + ValueLayout.JAVA_INT.withName("applicationNameOffset"), + ValueLayout.JAVA_INT.withName("applicationVersion"), + ValueLayout.JAVA_INT.withName("engineNameOffset"), + ValueLayout.JAVA_INT.withName("engineVersion"), + ValueLayout.JAVA_INT.withName("apiVersion") + ); + /// The [VarHandle] of `headerSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_headerSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("headerSize")); + /// The [VarHandle] of `headerVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_headerVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("headerVersion")); + /// The [VarHandle] of `vendorID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vendorID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vendorID")); + /// The [VarHandle] of `deviceID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceID")); + /// The [VarHandle] of `driverVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_driverVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("driverVersion")); + /// The byte offset handle of `pipelineCacheUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_pipelineCacheUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("pipelineCacheUUID"), PathElement.sequenceElement()); + /// The memory layout of `pipelineCacheUUID`. + public static final MemoryLayout ML_pipelineCacheUUID = LAYOUT.select(PathElement.groupElement("pipelineCacheUUID")); + /// The [VarHandle] of `applicationNameOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_applicationNameOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("applicationNameOffset")); + /// The [VarHandle] of `applicationVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_applicationVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("applicationVersion")); + /// The [VarHandle] of `engineNameOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_engineNameOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("engineNameOffset")); + /// The [VarHandle] of `engineVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_engineVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("engineVersion")); + /// The [VarHandle] of `apiVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_apiVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("apiVersion")); + + /// Creates `VkDeviceFaultVendorBinaryHeaderVersionOneEXT` with the given segment. + /// @param segment the memory segment + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceFaultVendorBinaryHeaderVersionOneEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultVendorBinaryHeaderVersionOneEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultVendorBinaryHeaderVersionOneEXT(segment); } + + /// Creates `VkDeviceFaultVendorBinaryHeaderVersionOneEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultVendorBinaryHeaderVersionOneEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultVendorBinaryHeaderVersionOneEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceFaultVendorBinaryHeaderVersionOneEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultVendorBinaryHeaderVersionOneEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultVendorBinaryHeaderVersionOneEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceFaultVendorBinaryHeaderVersionOneEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceFaultVendorBinaryHeaderVersionOneEXT` + public static VkDeviceFaultVendorBinaryHeaderVersionOneEXT alloc(SegmentAllocator allocator) { return new VkDeviceFaultVendorBinaryHeaderVersionOneEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceFaultVendorBinaryHeaderVersionOneEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceFaultVendorBinaryHeaderVersionOneEXT` + public static VkDeviceFaultVendorBinaryHeaderVersionOneEXT alloc(SegmentAllocator allocator, long count) { return new VkDeviceFaultVendorBinaryHeaderVersionOneEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `headerSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_headerSize(MemorySegment segment, long index) { return (int) VH_headerSize.get(segment, 0L, index); } + /// {@return `headerSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_headerSize(MemorySegment segment) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_headerSize(segment, 0L); } + /// {@return `headerSize` at the given index} + /// @param index the index + public @CType("uint32_t") int headerSizeAt(long index) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_headerSize(this.segment(), index); } + /// {@return `headerSize`} + public @CType("uint32_t") int headerSize() { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_headerSize(this.segment()); } + /// Sets `headerSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_headerSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_headerSize.set(segment, 0L, index, value); } + /// Sets `headerSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_headerSize(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_headerSize(segment, 0L, value); } + /// Sets `headerSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT headerSizeAt(long index, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_headerSize(this.segment(), index, value); return this; } + /// Sets `headerSize` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT headerSize(@CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_headerSize(this.segment(), value); return this; } + + /// {@return `headerVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceFaultVendorBinaryHeaderVersionEXT") int get_headerVersion(MemorySegment segment, long index) { return (int) VH_headerVersion.get(segment, 0L, index); } + /// {@return `headerVersion`} + /// @param segment the segment of the struct + public static @CType("VkDeviceFaultVendorBinaryHeaderVersionEXT") int get_headerVersion(MemorySegment segment) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_headerVersion(segment, 0L); } + /// {@return `headerVersion` at the given index} + /// @param index the index + public @CType("VkDeviceFaultVendorBinaryHeaderVersionEXT") int headerVersionAt(long index) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_headerVersion(this.segment(), index); } + /// {@return `headerVersion`} + public @CType("VkDeviceFaultVendorBinaryHeaderVersionEXT") int headerVersion() { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_headerVersion(this.segment()); } + /// Sets `headerVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_headerVersion(MemorySegment segment, long index, @CType("VkDeviceFaultVendorBinaryHeaderVersionEXT") int value) { VH_headerVersion.set(segment, 0L, index, value); } + /// Sets `headerVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_headerVersion(MemorySegment segment, @CType("VkDeviceFaultVendorBinaryHeaderVersionEXT") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_headerVersion(segment, 0L, value); } + /// Sets `headerVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT headerVersionAt(long index, @CType("VkDeviceFaultVendorBinaryHeaderVersionEXT") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_headerVersion(this.segment(), index, value); return this; } + /// Sets `headerVersion` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT headerVersion(@CType("VkDeviceFaultVendorBinaryHeaderVersionEXT") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_headerVersion(this.segment(), value); return this; } + + /// {@return `vendorID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vendorID(MemorySegment segment, long index) { return (int) VH_vendorID.get(segment, 0L, index); } + /// {@return `vendorID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vendorID(MemorySegment segment) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_vendorID(segment, 0L); } + /// {@return `vendorID` at the given index} + /// @param index the index + public @CType("uint32_t") int vendorIDAt(long index) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_vendorID(this.segment(), index); } + /// {@return `vendorID`} + public @CType("uint32_t") int vendorID() { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_vendorID(this.segment()); } + /// Sets `vendorID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vendorID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vendorID.set(segment, 0L, index, value); } + /// Sets `vendorID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vendorID(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_vendorID(segment, 0L, value); } + /// Sets `vendorID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT vendorIDAt(long index, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_vendorID(this.segment(), index, value); return this; } + /// Sets `vendorID` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT vendorID(@CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_vendorID(this.segment(), value); return this; } + + /// {@return `deviceID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceID(MemorySegment segment, long index) { return (int) VH_deviceID.get(segment, 0L, index); } + /// {@return `deviceID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceID(MemorySegment segment) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_deviceID(segment, 0L); } + /// {@return `deviceID` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceIDAt(long index) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_deviceID(this.segment(), index); } + /// {@return `deviceID`} + public @CType("uint32_t") int deviceID() { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_deviceID(this.segment()); } + /// Sets `deviceID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceID.set(segment, 0L, index, value); } + /// Sets `deviceID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceID(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_deviceID(segment, 0L, value); } + /// Sets `deviceID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT deviceIDAt(long index, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_deviceID(this.segment(), index, value); return this; } + /// Sets `deviceID` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT deviceID(@CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_deviceID(this.segment(), value); return this; } + + /// {@return `driverVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_driverVersion(MemorySegment segment, long index) { return (int) VH_driverVersion.get(segment, 0L, index); } + /// {@return `driverVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_driverVersion(MemorySegment segment) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_driverVersion(segment, 0L); } + /// {@return `driverVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int driverVersionAt(long index) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_driverVersion(this.segment(), index); } + /// {@return `driverVersion`} + public @CType("uint32_t") int driverVersion() { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_driverVersion(this.segment()); } + /// Sets `driverVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_driverVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_driverVersion.set(segment, 0L, index, value); } + /// Sets `driverVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_driverVersion(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_driverVersion(segment, 0L, value); } + /// Sets `driverVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT driverVersionAt(long index, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_driverVersion(this.segment(), index, value); return this; } + /// Sets `driverVersion` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT driverVersion(@CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_driverVersion(this.segment(), value); return this; } + + /// {@return `pipelineCacheUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineCacheUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_pipelineCacheUUID.invokeExact(0L, elementIndex), index), ML_pipelineCacheUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `pipelineCacheUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineCacheUUID(MemorySegment segment, long elementIndex) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_pipelineCacheUUID(segment, 0L, elementIndex); } + /// {@return `pipelineCacheUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineCacheUUIDAt(long index, long elementIndex) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_pipelineCacheUUID(this.segment(), index, elementIndex); } + /// {@return `pipelineCacheUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineCacheUUID(long elementIndex) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_pipelineCacheUUID(this.segment(), elementIndex); } + /// Sets `pipelineCacheUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineCacheUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_pipelineCacheUUID.invokeExact(0L, elementIndex), index), ML_pipelineCacheUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `pipelineCacheUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineCacheUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_pipelineCacheUUID(segment, 0L, elementIndex, value); } + /// Sets `pipelineCacheUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT pipelineCacheUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_pipelineCacheUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `pipelineCacheUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT pipelineCacheUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_pipelineCacheUUID(this.segment(), elementIndex, value); return this; } + + /// {@return `applicationNameOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_applicationNameOffset(MemorySegment segment, long index) { return (int) VH_applicationNameOffset.get(segment, 0L, index); } + /// {@return `applicationNameOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_applicationNameOffset(MemorySegment segment) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_applicationNameOffset(segment, 0L); } + /// {@return `applicationNameOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int applicationNameOffsetAt(long index) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_applicationNameOffset(this.segment(), index); } + /// {@return `applicationNameOffset`} + public @CType("uint32_t") int applicationNameOffset() { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_applicationNameOffset(this.segment()); } + /// Sets `applicationNameOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_applicationNameOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_applicationNameOffset.set(segment, 0L, index, value); } + /// Sets `applicationNameOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_applicationNameOffset(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_applicationNameOffset(segment, 0L, value); } + /// Sets `applicationNameOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT applicationNameOffsetAt(long index, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_applicationNameOffset(this.segment(), index, value); return this; } + /// Sets `applicationNameOffset` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT applicationNameOffset(@CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_applicationNameOffset(this.segment(), value); return this; } + + /// {@return `applicationVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_applicationVersion(MemorySegment segment, long index) { return (int) VH_applicationVersion.get(segment, 0L, index); } + /// {@return `applicationVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_applicationVersion(MemorySegment segment) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_applicationVersion(segment, 0L); } + /// {@return `applicationVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int applicationVersionAt(long index) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_applicationVersion(this.segment(), index); } + /// {@return `applicationVersion`} + public @CType("uint32_t") int applicationVersion() { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_applicationVersion(this.segment()); } + /// Sets `applicationVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_applicationVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_applicationVersion.set(segment, 0L, index, value); } + /// Sets `applicationVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_applicationVersion(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_applicationVersion(segment, 0L, value); } + /// Sets `applicationVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT applicationVersionAt(long index, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_applicationVersion(this.segment(), index, value); return this; } + /// Sets `applicationVersion` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT applicationVersion(@CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_applicationVersion(this.segment(), value); return this; } + + /// {@return `engineNameOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_engineNameOffset(MemorySegment segment, long index) { return (int) VH_engineNameOffset.get(segment, 0L, index); } + /// {@return `engineNameOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_engineNameOffset(MemorySegment segment) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_engineNameOffset(segment, 0L); } + /// {@return `engineNameOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int engineNameOffsetAt(long index) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_engineNameOffset(this.segment(), index); } + /// {@return `engineNameOffset`} + public @CType("uint32_t") int engineNameOffset() { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_engineNameOffset(this.segment()); } + /// Sets `engineNameOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_engineNameOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_engineNameOffset.set(segment, 0L, index, value); } + /// Sets `engineNameOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_engineNameOffset(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_engineNameOffset(segment, 0L, value); } + /// Sets `engineNameOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT engineNameOffsetAt(long index, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_engineNameOffset(this.segment(), index, value); return this; } + /// Sets `engineNameOffset` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT engineNameOffset(@CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_engineNameOffset(this.segment(), value); return this; } + + /// {@return `engineVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_engineVersion(MemorySegment segment, long index) { return (int) VH_engineVersion.get(segment, 0L, index); } + /// {@return `engineVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_engineVersion(MemorySegment segment) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_engineVersion(segment, 0L); } + /// {@return `engineVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int engineVersionAt(long index) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_engineVersion(this.segment(), index); } + /// {@return `engineVersion`} + public @CType("uint32_t") int engineVersion() { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_engineVersion(this.segment()); } + /// Sets `engineVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_engineVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_engineVersion.set(segment, 0L, index, value); } + /// Sets `engineVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_engineVersion(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_engineVersion(segment, 0L, value); } + /// Sets `engineVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT engineVersionAt(long index, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_engineVersion(this.segment(), index, value); return this; } + /// Sets `engineVersion` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT engineVersion(@CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_engineVersion(this.segment(), value); return this; } + + /// {@return `apiVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_apiVersion(MemorySegment segment, long index) { return (int) VH_apiVersion.get(segment, 0L, index); } + /// {@return `apiVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_apiVersion(MemorySegment segment) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_apiVersion(segment, 0L); } + /// {@return `apiVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int apiVersionAt(long index) { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_apiVersion(this.segment(), index); } + /// {@return `apiVersion`} + public @CType("uint32_t") int apiVersion() { return VkDeviceFaultVendorBinaryHeaderVersionOneEXT.get_apiVersion(this.segment()); } + /// Sets `apiVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_apiVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_apiVersion.set(segment, 0L, index, value); } + /// Sets `apiVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_apiVersion(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_apiVersion(segment, 0L, value); } + /// Sets `apiVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT apiVersionAt(long index, @CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_apiVersion(this.segment(), index, value); return this; } + /// Sets `apiVersion` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorBinaryHeaderVersionOneEXT apiVersion(@CType("uint32_t") int value) { VkDeviceFaultVendorBinaryHeaderVersionOneEXT.set_apiVersion(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultVendorInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultVendorInfoEXT.java new file mode 100644 index 00000000..aa9acc22 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceFaultVendorInfoEXT.java @@ -0,0 +1,202 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### description +/// [Byte offset handle][#MH_description] - [Memory layout][#ML_description] - [Getter][#description(long)] - [Setter][#description(long, java.lang.foreign.MemorySegment)] +/// ### vendorFaultCode +/// [VarHandle][#VH_vendorFaultCode] - [Getter][#vendorFaultCode()] - [Setter][#vendorFaultCode(long)] +/// ### vendorFaultData +/// [VarHandle][#VH_vendorFaultData] - [Getter][#vendorFaultData()] - [Setter][#vendorFaultData(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceFaultVendorInfoEXT { +/// char[VK_MAX_DESCRIPTION_SIZE] description; +/// uint64_t vendorFaultCode; +/// uint64_t vendorFaultData; +/// } VkDeviceFaultVendorInfoEXT; +/// ``` +public final class VkDeviceFaultVendorInfoEXT extends Struct { + /// The struct layout of `VkDeviceFaultVendorInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("description"), + ValueLayout.JAVA_LONG.withName("vendorFaultCode"), + ValueLayout.JAVA_LONG.withName("vendorFaultData") + ); + /// The byte offset handle of `description` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_description = LAYOUT.byteOffsetHandle(PathElement.groupElement("description"), PathElement.sequenceElement()); + /// The memory layout of `description`. + public static final MemoryLayout ML_description = LAYOUT.select(PathElement.groupElement("description")); + /// The [VarHandle] of `vendorFaultCode` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_vendorFaultCode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vendorFaultCode")); + /// The [VarHandle] of `vendorFaultData` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_vendorFaultData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vendorFaultData")); + + /// Creates `VkDeviceFaultVendorInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDeviceFaultVendorInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceFaultVendorInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultVendorInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultVendorInfoEXT(segment); } + + /// Creates `VkDeviceFaultVendorInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultVendorInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultVendorInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceFaultVendorInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceFaultVendorInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceFaultVendorInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceFaultVendorInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceFaultVendorInfoEXT` + public static VkDeviceFaultVendorInfoEXT alloc(SegmentAllocator allocator) { return new VkDeviceFaultVendorInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceFaultVendorInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceFaultVendorInfoEXT` + public static VkDeviceFaultVendorInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDeviceFaultVendorInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `description` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `description`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long elementIndex) { return VkDeviceFaultVendorInfoEXT.get_description(segment, 0L, elementIndex); } + /// {@return `description` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment descriptionAt(long index, long elementIndex) { return VkDeviceFaultVendorInfoEXT.get_description(this.segment(), index, elementIndex); } + /// {@return `description`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment description(long elementIndex) { return VkDeviceFaultVendorInfoEXT.get_description(this.segment(), elementIndex); } + /// Sets `description` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `description` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceFaultVendorInfoEXT.set_description(segment, 0L, elementIndex, value); } + /// Sets `description` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorInfoEXT descriptionAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceFaultVendorInfoEXT.set_description(this.segment(), index, elementIndex, value); return this; } + /// Sets `description` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorInfoEXT description(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceFaultVendorInfoEXT.set_description(this.segment(), elementIndex, value); return this; } + + /// {@return `vendorFaultCode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_vendorFaultCode(MemorySegment segment, long index) { return (long) VH_vendorFaultCode.get(segment, 0L, index); } + /// {@return `vendorFaultCode`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_vendorFaultCode(MemorySegment segment) { return VkDeviceFaultVendorInfoEXT.get_vendorFaultCode(segment, 0L); } + /// {@return `vendorFaultCode` at the given index} + /// @param index the index + public @CType("uint64_t") long vendorFaultCodeAt(long index) { return VkDeviceFaultVendorInfoEXT.get_vendorFaultCode(this.segment(), index); } + /// {@return `vendorFaultCode`} + public @CType("uint64_t") long vendorFaultCode() { return VkDeviceFaultVendorInfoEXT.get_vendorFaultCode(this.segment()); } + /// Sets `vendorFaultCode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vendorFaultCode(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_vendorFaultCode.set(segment, 0L, index, value); } + /// Sets `vendorFaultCode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vendorFaultCode(MemorySegment segment, @CType("uint64_t") long value) { VkDeviceFaultVendorInfoEXT.set_vendorFaultCode(segment, 0L, value); } + /// Sets `vendorFaultCode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorInfoEXT vendorFaultCodeAt(long index, @CType("uint64_t") long value) { VkDeviceFaultVendorInfoEXT.set_vendorFaultCode(this.segment(), index, value); return this; } + /// Sets `vendorFaultCode` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorInfoEXT vendorFaultCode(@CType("uint64_t") long value) { VkDeviceFaultVendorInfoEXT.set_vendorFaultCode(this.segment(), value); return this; } + + /// {@return `vendorFaultData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_vendorFaultData(MemorySegment segment, long index) { return (long) VH_vendorFaultData.get(segment, 0L, index); } + /// {@return `vendorFaultData`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_vendorFaultData(MemorySegment segment) { return VkDeviceFaultVendorInfoEXT.get_vendorFaultData(segment, 0L); } + /// {@return `vendorFaultData` at the given index} + /// @param index the index + public @CType("uint64_t") long vendorFaultDataAt(long index) { return VkDeviceFaultVendorInfoEXT.get_vendorFaultData(this.segment(), index); } + /// {@return `vendorFaultData`} + public @CType("uint64_t") long vendorFaultData() { return VkDeviceFaultVendorInfoEXT.get_vendorFaultData(this.segment()); } + /// Sets `vendorFaultData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vendorFaultData(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_vendorFaultData.set(segment, 0L, index, value); } + /// Sets `vendorFaultData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vendorFaultData(MemorySegment segment, @CType("uint64_t") long value) { VkDeviceFaultVendorInfoEXT.set_vendorFaultData(segment, 0L, value); } + /// Sets `vendorFaultData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorInfoEXT vendorFaultDataAt(long index, @CType("uint64_t") long value) { VkDeviceFaultVendorInfoEXT.set_vendorFaultData(this.segment(), index, value); return this; } + /// Sets `vendorFaultData` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceFaultVendorInfoEXT vendorFaultData(@CType("uint64_t") long value) { VkDeviceFaultVendorInfoEXT.set_vendorFaultData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceMemoryReportCallbackDataEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceMemoryReportCallbackDataEXT.java new file mode 100644 index 00000000..708d092a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDeviceMemoryReportCallbackDataEXT.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### memoryObjectId +/// [VarHandle][#VH_memoryObjectId] - [Getter][#memoryObjectId()] - [Setter][#memoryObjectId(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ### objectType +/// [VarHandle][#VH_objectType] - [Getter][#objectType()] - [Setter][#objectType(int)] +/// ### objectHandle +/// [VarHandle][#VH_objectHandle] - [Getter][#objectHandle()] - [Setter][#objectHandle(long)] +/// ### heapIndex +/// [VarHandle][#VH_heapIndex] - [Getter][#heapIndex()] - [Setter][#heapIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceMemoryReportCallbackDataEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceMemoryReportFlagsEXT flags; +/// VkDeviceMemoryReportEventTypeEXT type; +/// uint64_t memoryObjectId; +/// VkDeviceSize size; +/// VkObjectType objectType; +/// uint64_t objectHandle; +/// uint32_t heapIndex; +/// } VkDeviceMemoryReportCallbackDataEXT; +/// ``` +public final class VkDeviceMemoryReportCallbackDataEXT extends Struct { + /// The struct layout of `VkDeviceMemoryReportCallbackDataEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_LONG.withName("memoryObjectId"), + ValueLayout.JAVA_LONG.withName("size"), + ValueLayout.JAVA_INT.withName("objectType"), + ValueLayout.JAVA_LONG.withName("objectHandle"), + ValueLayout.JAVA_INT.withName("heapIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `memoryObjectId` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_memoryObjectId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryObjectId")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `objectType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_objectType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectType")); + /// The [VarHandle] of `objectHandle` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_objectHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectHandle")); + /// The [VarHandle] of `heapIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_heapIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("heapIndex")); + + /// Creates `VkDeviceMemoryReportCallbackDataEXT` with the given segment. + /// @param segment the memory segment + public VkDeviceMemoryReportCallbackDataEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceMemoryReportCallbackDataEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceMemoryReportCallbackDataEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceMemoryReportCallbackDataEXT(segment); } + + /// Creates `VkDeviceMemoryReportCallbackDataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceMemoryReportCallbackDataEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceMemoryReportCallbackDataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceMemoryReportCallbackDataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceMemoryReportCallbackDataEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceMemoryReportCallbackDataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceMemoryReportCallbackDataEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceMemoryReportCallbackDataEXT` + public static VkDeviceMemoryReportCallbackDataEXT alloc(SegmentAllocator allocator) { return new VkDeviceMemoryReportCallbackDataEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceMemoryReportCallbackDataEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceMemoryReportCallbackDataEXT` + public static VkDeviceMemoryReportCallbackDataEXT alloc(SegmentAllocator allocator, long count) { return new VkDeviceMemoryReportCallbackDataEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceMemoryReportCallbackDataEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceMemoryReportCallbackDataEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceMemoryReportCallbackDataEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceMemoryReportCallbackDataEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceMemoryReportCallbackDataEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT sType(@CType("VkStructureType") int value) { VkDeviceMemoryReportCallbackDataEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceMemoryReportCallbackDataEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceMemoryReportCallbackDataEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceMemoryReportCallbackDataEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceMemoryReportCallbackDataEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceMemoryReportCallbackDataEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceMemoryReportCallbackDataEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemoryReportFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemoryReportFlagsEXT") int get_flags(MemorySegment segment) { return VkDeviceMemoryReportCallbackDataEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDeviceMemoryReportFlagsEXT") int flagsAt(long index) { return VkDeviceMemoryReportCallbackDataEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDeviceMemoryReportFlagsEXT") int flags() { return VkDeviceMemoryReportCallbackDataEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDeviceMemoryReportFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDeviceMemoryReportFlagsEXT") int value) { VkDeviceMemoryReportCallbackDataEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT flagsAt(long index, @CType("VkDeviceMemoryReportFlagsEXT") int value) { VkDeviceMemoryReportCallbackDataEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT flags(@CType("VkDeviceMemoryReportFlagsEXT") int value) { VkDeviceMemoryReportCallbackDataEXT.set_flags(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemoryReportEventTypeEXT") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemoryReportEventTypeEXT") int get_type(MemorySegment segment) { return VkDeviceMemoryReportCallbackDataEXT.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkDeviceMemoryReportEventTypeEXT") int typeAt(long index) { return VkDeviceMemoryReportCallbackDataEXT.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkDeviceMemoryReportEventTypeEXT") int type() { return VkDeviceMemoryReportCallbackDataEXT.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkDeviceMemoryReportEventTypeEXT") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkDeviceMemoryReportEventTypeEXT") int value) { VkDeviceMemoryReportCallbackDataEXT.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT typeAt(long index, @CType("VkDeviceMemoryReportEventTypeEXT") int value) { VkDeviceMemoryReportCallbackDataEXT.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT type(@CType("VkDeviceMemoryReportEventTypeEXT") int value) { VkDeviceMemoryReportCallbackDataEXT.set_type(this.segment(), value); return this; } + + /// {@return `memoryObjectId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_memoryObjectId(MemorySegment segment, long index) { return (long) VH_memoryObjectId.get(segment, 0L, index); } + /// {@return `memoryObjectId`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_memoryObjectId(MemorySegment segment) { return VkDeviceMemoryReportCallbackDataEXT.get_memoryObjectId(segment, 0L); } + /// {@return `memoryObjectId` at the given index} + /// @param index the index + public @CType("uint64_t") long memoryObjectIdAt(long index) { return VkDeviceMemoryReportCallbackDataEXT.get_memoryObjectId(this.segment(), index); } + /// {@return `memoryObjectId`} + public @CType("uint64_t") long memoryObjectId() { return VkDeviceMemoryReportCallbackDataEXT.get_memoryObjectId(this.segment()); } + /// Sets `memoryObjectId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryObjectId(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_memoryObjectId.set(segment, 0L, index, value); } + /// Sets `memoryObjectId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryObjectId(MemorySegment segment, @CType("uint64_t") long value) { VkDeviceMemoryReportCallbackDataEXT.set_memoryObjectId(segment, 0L, value); } + /// Sets `memoryObjectId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT memoryObjectIdAt(long index, @CType("uint64_t") long value) { VkDeviceMemoryReportCallbackDataEXT.set_memoryObjectId(this.segment(), index, value); return this; } + /// Sets `memoryObjectId` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT memoryObjectId(@CType("uint64_t") long value) { VkDeviceMemoryReportCallbackDataEXT.set_memoryObjectId(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkDeviceMemoryReportCallbackDataEXT.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkDeviceMemoryReportCallbackDataEXT.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkDeviceMemoryReportCallbackDataEXT.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkDeviceMemoryReportCallbackDataEXT.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT sizeAt(long index, @CType("VkDeviceSize") long value) { VkDeviceMemoryReportCallbackDataEXT.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT size(@CType("VkDeviceSize") long value) { VkDeviceMemoryReportCallbackDataEXT.set_size(this.segment(), value); return this; } + + /// {@return `objectType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkObjectType") int get_objectType(MemorySegment segment, long index) { return (int) VH_objectType.get(segment, 0L, index); } + /// {@return `objectType`} + /// @param segment the segment of the struct + public static @CType("VkObjectType") int get_objectType(MemorySegment segment) { return VkDeviceMemoryReportCallbackDataEXT.get_objectType(segment, 0L); } + /// {@return `objectType` at the given index} + /// @param index the index + public @CType("VkObjectType") int objectTypeAt(long index) { return VkDeviceMemoryReportCallbackDataEXT.get_objectType(this.segment(), index); } + /// {@return `objectType`} + public @CType("VkObjectType") int objectType() { return VkDeviceMemoryReportCallbackDataEXT.get_objectType(this.segment()); } + /// Sets `objectType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectType(MemorySegment segment, long index, @CType("VkObjectType") int value) { VH_objectType.set(segment, 0L, index, value); } + /// Sets `objectType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectType(MemorySegment segment, @CType("VkObjectType") int value) { VkDeviceMemoryReportCallbackDataEXT.set_objectType(segment, 0L, value); } + /// Sets `objectType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT objectTypeAt(long index, @CType("VkObjectType") int value) { VkDeviceMemoryReportCallbackDataEXT.set_objectType(this.segment(), index, value); return this; } + /// Sets `objectType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT objectType(@CType("VkObjectType") int value) { VkDeviceMemoryReportCallbackDataEXT.set_objectType(this.segment(), value); return this; } + + /// {@return `objectHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_objectHandle(MemorySegment segment, long index) { return (long) VH_objectHandle.get(segment, 0L, index); } + /// {@return `objectHandle`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_objectHandle(MemorySegment segment) { return VkDeviceMemoryReportCallbackDataEXT.get_objectHandle(segment, 0L); } + /// {@return `objectHandle` at the given index} + /// @param index the index + public @CType("uint64_t") long objectHandleAt(long index) { return VkDeviceMemoryReportCallbackDataEXT.get_objectHandle(this.segment(), index); } + /// {@return `objectHandle`} + public @CType("uint64_t") long objectHandle() { return VkDeviceMemoryReportCallbackDataEXT.get_objectHandle(this.segment()); } + /// Sets `objectHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectHandle(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_objectHandle.set(segment, 0L, index, value); } + /// Sets `objectHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectHandle(MemorySegment segment, @CType("uint64_t") long value) { VkDeviceMemoryReportCallbackDataEXT.set_objectHandle(segment, 0L, value); } + /// Sets `objectHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT objectHandleAt(long index, @CType("uint64_t") long value) { VkDeviceMemoryReportCallbackDataEXT.set_objectHandle(this.segment(), index, value); return this; } + /// Sets `objectHandle` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT objectHandle(@CType("uint64_t") long value) { VkDeviceMemoryReportCallbackDataEXT.set_objectHandle(this.segment(), value); return this; } + + /// {@return `heapIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_heapIndex(MemorySegment segment, long index) { return (int) VH_heapIndex.get(segment, 0L, index); } + /// {@return `heapIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_heapIndex(MemorySegment segment) { return VkDeviceMemoryReportCallbackDataEXT.get_heapIndex(segment, 0L); } + /// {@return `heapIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int heapIndexAt(long index) { return VkDeviceMemoryReportCallbackDataEXT.get_heapIndex(this.segment(), index); } + /// {@return `heapIndex`} + public @CType("uint32_t") int heapIndex() { return VkDeviceMemoryReportCallbackDataEXT.get_heapIndex(this.segment()); } + /// Sets `heapIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_heapIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_heapIndex.set(segment, 0L, index, value); } + /// Sets `heapIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_heapIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceMemoryReportCallbackDataEXT.set_heapIndex(segment, 0L, value); } + /// Sets `heapIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT heapIndexAt(long index, @CType("uint32_t") int value) { VkDeviceMemoryReportCallbackDataEXT.set_heapIndex(this.segment(), index, value); return this; } + /// Sets `heapIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryReportCallbackDataEXT heapIndex(@CType("uint32_t") int value) { VkDeviceMemoryReportCallbackDataEXT.set_heapIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDirectFBSurfaceCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDirectFBSurfaceCreateInfoEXT.java new file mode 100644 index 00000000..b6cd9e86 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDirectFBSurfaceCreateInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### dfb +/// [VarHandle][#VH_dfb] - [Getter][#dfb()] - [Setter][#dfb(java.lang.foreign.MemorySegment)] +/// ### surface +/// [VarHandle][#VH_surface] - [Getter][#surface()] - [Setter][#surface(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDirectFBSurfaceCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDirectFBSurfaceCreateFlagsEXT flags; +/// IDirectFB * dfb; +/// IDirectFBSurface * surface; +/// } VkDirectFBSurfaceCreateInfoEXT; +/// ``` +public final class VkDirectFBSurfaceCreateInfoEXT extends Struct { + /// The struct layout of `VkDirectFBSurfaceCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("dfb"), + ValueLayout.ADDRESS.withName("surface") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `dfb` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dfb = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dfb")); + /// The [VarHandle] of `surface` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_surface = LAYOUT.arrayElementVarHandle(PathElement.groupElement("surface")); + + /// Creates `VkDirectFBSurfaceCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDirectFBSurfaceCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDirectFBSurfaceCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDirectFBSurfaceCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDirectFBSurfaceCreateInfoEXT(segment); } + + /// Creates `VkDirectFBSurfaceCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDirectFBSurfaceCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDirectFBSurfaceCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDirectFBSurfaceCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDirectFBSurfaceCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDirectFBSurfaceCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDirectFBSurfaceCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDirectFBSurfaceCreateInfoEXT` + public static VkDirectFBSurfaceCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkDirectFBSurfaceCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDirectFBSurfaceCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDirectFBSurfaceCreateInfoEXT` + public static VkDirectFBSurfaceCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDirectFBSurfaceCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDirectFBSurfaceCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDirectFBSurfaceCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDirectFBSurfaceCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDirectFBSurfaceCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectFBSurfaceCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDirectFBSurfaceCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDirectFBSurfaceCreateInfoEXT sType(@CType("VkStructureType") int value) { VkDirectFBSurfaceCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDirectFBSurfaceCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDirectFBSurfaceCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDirectFBSurfaceCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDirectFBSurfaceCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectFBSurfaceCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDirectFBSurfaceCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDirectFBSurfaceCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDirectFBSurfaceCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDirectFBSurfaceCreateFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDirectFBSurfaceCreateFlagsEXT") int get_flags(MemorySegment segment) { return VkDirectFBSurfaceCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDirectFBSurfaceCreateFlagsEXT") int flagsAt(long index) { return VkDirectFBSurfaceCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDirectFBSurfaceCreateFlagsEXT") int flags() { return VkDirectFBSurfaceCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDirectFBSurfaceCreateFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDirectFBSurfaceCreateFlagsEXT") int value) { VkDirectFBSurfaceCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectFBSurfaceCreateInfoEXT flagsAt(long index, @CType("VkDirectFBSurfaceCreateFlagsEXT") int value) { VkDirectFBSurfaceCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDirectFBSurfaceCreateInfoEXT flags(@CType("VkDirectFBSurfaceCreateFlagsEXT") int value) { VkDirectFBSurfaceCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `dfb` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("IDirectFB *") java.lang.foreign.MemorySegment get_dfb(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dfb.get(segment, 0L, index); } + /// {@return `dfb`} + /// @param segment the segment of the struct + public static @CType("IDirectFB *") java.lang.foreign.MemorySegment get_dfb(MemorySegment segment) { return VkDirectFBSurfaceCreateInfoEXT.get_dfb(segment, 0L); } + /// {@return `dfb` at the given index} + /// @param index the index + public @CType("IDirectFB *") java.lang.foreign.MemorySegment dfbAt(long index) { return VkDirectFBSurfaceCreateInfoEXT.get_dfb(this.segment(), index); } + /// {@return `dfb`} + public @CType("IDirectFB *") java.lang.foreign.MemorySegment dfb() { return VkDirectFBSurfaceCreateInfoEXT.get_dfb(this.segment()); } + /// Sets `dfb` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dfb(MemorySegment segment, long index, @CType("IDirectFB *") java.lang.foreign.MemorySegment value) { VH_dfb.set(segment, 0L, index, value); } + /// Sets `dfb` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dfb(MemorySegment segment, @CType("IDirectFB *") java.lang.foreign.MemorySegment value) { VkDirectFBSurfaceCreateInfoEXT.set_dfb(segment, 0L, value); } + /// Sets `dfb` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectFBSurfaceCreateInfoEXT dfbAt(long index, @CType("IDirectFB *") java.lang.foreign.MemorySegment value) { VkDirectFBSurfaceCreateInfoEXT.set_dfb(this.segment(), index, value); return this; } + /// Sets `dfb` with the given value. + /// @param value the value + /// @return `this` + public VkDirectFBSurfaceCreateInfoEXT dfb(@CType("IDirectFB *") java.lang.foreign.MemorySegment value) { VkDirectFBSurfaceCreateInfoEXT.set_dfb(this.segment(), value); return this; } + + /// {@return `surface` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("IDirectFBSurface *") java.lang.foreign.MemorySegment get_surface(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_surface.get(segment, 0L, index); } + /// {@return `surface`} + /// @param segment the segment of the struct + public static @CType("IDirectFBSurface *") java.lang.foreign.MemorySegment get_surface(MemorySegment segment) { return VkDirectFBSurfaceCreateInfoEXT.get_surface(segment, 0L); } + /// {@return `surface` at the given index} + /// @param index the index + public @CType("IDirectFBSurface *") java.lang.foreign.MemorySegment surfaceAt(long index) { return VkDirectFBSurfaceCreateInfoEXT.get_surface(this.segment(), index); } + /// {@return `surface`} + public @CType("IDirectFBSurface *") java.lang.foreign.MemorySegment surface() { return VkDirectFBSurfaceCreateInfoEXT.get_surface(this.segment()); } + /// Sets `surface` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_surface(MemorySegment segment, long index, @CType("IDirectFBSurface *") java.lang.foreign.MemorySegment value) { VH_surface.set(segment, 0L, index, value); } + /// Sets `surface` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_surface(MemorySegment segment, @CType("IDirectFBSurface *") java.lang.foreign.MemorySegment value) { VkDirectFBSurfaceCreateInfoEXT.set_surface(segment, 0L, value); } + /// Sets `surface` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectFBSurfaceCreateInfoEXT surfaceAt(long index, @CType("IDirectFBSurface *") java.lang.foreign.MemorySegment value) { VkDirectFBSurfaceCreateInfoEXT.set_surface(this.segment(), index, value); return this; } + /// Sets `surface` with the given value. + /// @param value the value + /// @return `this` + public VkDirectFBSurfaceCreateInfoEXT surface(@CType("IDirectFBSurface *") java.lang.foreign.MemorySegment value) { VkDirectFBSurfaceCreateInfoEXT.set_surface(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDisplayEventInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDisplayEventInfoEXT.java new file mode 100644 index 00000000..c5a4e069 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDisplayEventInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### displayEvent +/// [VarHandle][#VH_displayEvent] - [Getter][#displayEvent()] - [Setter][#displayEvent(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayEventInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDisplayEventTypeEXT displayEvent; +/// } VkDisplayEventInfoEXT; +/// ``` +public final class VkDisplayEventInfoEXT extends Struct { + /// The struct layout of `VkDisplayEventInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("displayEvent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `displayEvent` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_displayEvent = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displayEvent")); + + /// Creates `VkDisplayEventInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDisplayEventInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayEventInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayEventInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayEventInfoEXT(segment); } + + /// Creates `VkDisplayEventInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayEventInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayEventInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayEventInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayEventInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayEventInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayEventInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayEventInfoEXT` + public static VkDisplayEventInfoEXT alloc(SegmentAllocator allocator) { return new VkDisplayEventInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayEventInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayEventInfoEXT` + public static VkDisplayEventInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDisplayEventInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayEventInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayEventInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayEventInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayEventInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayEventInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayEventInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayEventInfoEXT sType(@CType("VkStructureType") int value) { VkDisplayEventInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayEventInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayEventInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayEventInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayEventInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayEventInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayEventInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayEventInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayEventInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `displayEvent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayEventTypeEXT") int get_displayEvent(MemorySegment segment, long index) { return (int) VH_displayEvent.get(segment, 0L, index); } + /// {@return `displayEvent`} + /// @param segment the segment of the struct + public static @CType("VkDisplayEventTypeEXT") int get_displayEvent(MemorySegment segment) { return VkDisplayEventInfoEXT.get_displayEvent(segment, 0L); } + /// {@return `displayEvent` at the given index} + /// @param index the index + public @CType("VkDisplayEventTypeEXT") int displayEventAt(long index) { return VkDisplayEventInfoEXT.get_displayEvent(this.segment(), index); } + /// {@return `displayEvent`} + public @CType("VkDisplayEventTypeEXT") int displayEvent() { return VkDisplayEventInfoEXT.get_displayEvent(this.segment()); } + /// Sets `displayEvent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayEvent(MemorySegment segment, long index, @CType("VkDisplayEventTypeEXT") int value) { VH_displayEvent.set(segment, 0L, index, value); } + /// Sets `displayEvent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayEvent(MemorySegment segment, @CType("VkDisplayEventTypeEXT") int value) { VkDisplayEventInfoEXT.set_displayEvent(segment, 0L, value); } + /// Sets `displayEvent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayEventInfoEXT displayEventAt(long index, @CType("VkDisplayEventTypeEXT") int value) { VkDisplayEventInfoEXT.set_displayEvent(this.segment(), index, value); return this; } + /// Sets `displayEvent` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayEventInfoEXT displayEvent(@CType("VkDisplayEventTypeEXT") int value) { VkDisplayEventInfoEXT.set_displayEvent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDisplayPowerInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDisplayPowerInfoEXT.java new file mode 100644 index 00000000..d3f1ac1a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDisplayPowerInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### powerState +/// [VarHandle][#VH_powerState] - [Getter][#powerState()] - [Setter][#powerState(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayPowerInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDisplayPowerStateEXT powerState; +/// } VkDisplayPowerInfoEXT; +/// ``` +public final class VkDisplayPowerInfoEXT extends Struct { + /// The struct layout of `VkDisplayPowerInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("powerState") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `powerState` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_powerState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("powerState")); + + /// Creates `VkDisplayPowerInfoEXT` with the given segment. + /// @param segment the memory segment + public VkDisplayPowerInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayPowerInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPowerInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPowerInfoEXT(segment); } + + /// Creates `VkDisplayPowerInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPowerInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPowerInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayPowerInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPowerInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPowerInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayPowerInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayPowerInfoEXT` + public static VkDisplayPowerInfoEXT alloc(SegmentAllocator allocator) { return new VkDisplayPowerInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayPowerInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayPowerInfoEXT` + public static VkDisplayPowerInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkDisplayPowerInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayPowerInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayPowerInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayPowerInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayPowerInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPowerInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayPowerInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPowerInfoEXT sType(@CType("VkStructureType") int value) { VkDisplayPowerInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayPowerInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayPowerInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayPowerInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayPowerInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPowerInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayPowerInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPowerInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayPowerInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `powerState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayPowerStateEXT") int get_powerState(MemorySegment segment, long index) { return (int) VH_powerState.get(segment, 0L, index); } + /// {@return `powerState`} + /// @param segment the segment of the struct + public static @CType("VkDisplayPowerStateEXT") int get_powerState(MemorySegment segment) { return VkDisplayPowerInfoEXT.get_powerState(segment, 0L); } + /// {@return `powerState` at the given index} + /// @param index the index + public @CType("VkDisplayPowerStateEXT") int powerStateAt(long index) { return VkDisplayPowerInfoEXT.get_powerState(this.segment(), index); } + /// {@return `powerState`} + public @CType("VkDisplayPowerStateEXT") int powerState() { return VkDisplayPowerInfoEXT.get_powerState(this.segment()); } + /// Sets `powerState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_powerState(MemorySegment segment, long index, @CType("VkDisplayPowerStateEXT") int value) { VH_powerState.set(segment, 0L, index, value); } + /// Sets `powerState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_powerState(MemorySegment segment, @CType("VkDisplayPowerStateEXT") int value) { VkDisplayPowerInfoEXT.set_powerState(segment, 0L, value); } + /// Sets `powerState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPowerInfoEXT powerStateAt(long index, @CType("VkDisplayPowerStateEXT") int value) { VkDisplayPowerInfoEXT.set_powerState(this.segment(), index, value); return this; } + /// Sets `powerState` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPowerInfoEXT powerState(@CType("VkDisplayPowerStateEXT") int value) { VkDisplayPowerInfoEXT.set_powerState(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrawIndirectCountIndirectCommandEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrawIndirectCountIndirectCommandEXT.java new file mode 100644 index 00000000..a96bbbc3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrawIndirectCountIndirectCommandEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### bufferAddress +/// [VarHandle][#VH_bufferAddress] - [Getter][#bufferAddress()] - [Setter][#bufferAddress(long)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(int)] +/// ### commandCount +/// [VarHandle][#VH_commandCount] - [Getter][#commandCount()] - [Setter][#commandCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDrawIndirectCountIndirectCommandEXT { +/// VkDeviceAddress bufferAddress; +/// uint32_t stride; +/// uint32_t commandCount; +/// } VkDrawIndirectCountIndirectCommandEXT; +/// ``` +public final class VkDrawIndirectCountIndirectCommandEXT extends Struct { + /// The struct layout of `VkDrawIndirectCountIndirectCommandEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("bufferAddress"), + ValueLayout.JAVA_INT.withName("stride"), + ValueLayout.JAVA_INT.withName("commandCount") + ); + /// The [VarHandle] of `bufferAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_bufferAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferAddress")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + /// The [VarHandle] of `commandCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandCount")); + + /// Creates `VkDrawIndirectCountIndirectCommandEXT` with the given segment. + /// @param segment the memory segment + public VkDrawIndirectCountIndirectCommandEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDrawIndirectCountIndirectCommandEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawIndirectCountIndirectCommandEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawIndirectCountIndirectCommandEXT(segment); } + + /// Creates `VkDrawIndirectCountIndirectCommandEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawIndirectCountIndirectCommandEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawIndirectCountIndirectCommandEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDrawIndirectCountIndirectCommandEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawIndirectCountIndirectCommandEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawIndirectCountIndirectCommandEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDrawIndirectCountIndirectCommandEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDrawIndirectCountIndirectCommandEXT` + public static VkDrawIndirectCountIndirectCommandEXT alloc(SegmentAllocator allocator) { return new VkDrawIndirectCountIndirectCommandEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDrawIndirectCountIndirectCommandEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDrawIndirectCountIndirectCommandEXT` + public static VkDrawIndirectCountIndirectCommandEXT alloc(SegmentAllocator allocator, long count) { return new VkDrawIndirectCountIndirectCommandEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `bufferAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_bufferAddress(MemorySegment segment, long index) { return (long) VH_bufferAddress.get(segment, 0L, index); } + /// {@return `bufferAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_bufferAddress(MemorySegment segment) { return VkDrawIndirectCountIndirectCommandEXT.get_bufferAddress(segment, 0L); } + /// {@return `bufferAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long bufferAddressAt(long index) { return VkDrawIndirectCountIndirectCommandEXT.get_bufferAddress(this.segment(), index); } + /// {@return `bufferAddress`} + public @CType("VkDeviceAddress") long bufferAddress() { return VkDrawIndirectCountIndirectCommandEXT.get_bufferAddress(this.segment()); } + /// Sets `bufferAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_bufferAddress.set(segment, 0L, index, value); } + /// Sets `bufferAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDrawIndirectCountIndirectCommandEXT.set_bufferAddress(segment, 0L, value); } + /// Sets `bufferAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndirectCountIndirectCommandEXT bufferAddressAt(long index, @CType("VkDeviceAddress") long value) { VkDrawIndirectCountIndirectCommandEXT.set_bufferAddress(this.segment(), index, value); return this; } + /// Sets `bufferAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndirectCountIndirectCommandEXT bufferAddress(@CType("VkDeviceAddress") long value) { VkDrawIndirectCountIndirectCommandEXT.set_bufferAddress(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stride(MemorySegment segment, long index) { return (int) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stride(MemorySegment segment) { return VkDrawIndirectCountIndirectCommandEXT.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("uint32_t") int strideAt(long index) { return VkDrawIndirectCountIndirectCommandEXT.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("uint32_t") int stride() { return VkDrawIndirectCountIndirectCommandEXT.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("uint32_t") int value) { VkDrawIndirectCountIndirectCommandEXT.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndirectCountIndirectCommandEXT strideAt(long index, @CType("uint32_t") int value) { VkDrawIndirectCountIndirectCommandEXT.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndirectCountIndirectCommandEXT stride(@CType("uint32_t") int value) { VkDrawIndirectCountIndirectCommandEXT.set_stride(this.segment(), value); return this; } + + /// {@return `commandCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_commandCount(MemorySegment segment, long index) { return (int) VH_commandCount.get(segment, 0L, index); } + /// {@return `commandCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_commandCount(MemorySegment segment) { return VkDrawIndirectCountIndirectCommandEXT.get_commandCount(segment, 0L); } + /// {@return `commandCount` at the given index} + /// @param index the index + public @CType("uint32_t") int commandCountAt(long index) { return VkDrawIndirectCountIndirectCommandEXT.get_commandCount(this.segment(), index); } + /// {@return `commandCount`} + public @CType("uint32_t") int commandCount() { return VkDrawIndirectCountIndirectCommandEXT.get_commandCount(this.segment()); } + /// Sets `commandCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_commandCount.set(segment, 0L, index, value); } + /// Sets `commandCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandCount(MemorySegment segment, @CType("uint32_t") int value) { VkDrawIndirectCountIndirectCommandEXT.set_commandCount(segment, 0L, value); } + /// Sets `commandCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndirectCountIndirectCommandEXT commandCountAt(long index, @CType("uint32_t") int value) { VkDrawIndirectCountIndirectCommandEXT.set_commandCount(this.segment(), index, value); return this; } + /// Sets `commandCount` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndirectCountIndirectCommandEXT commandCount(@CType("uint32_t") int value) { VkDrawIndirectCountIndirectCommandEXT.set_commandCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrawMeshTasksIndirectCommandEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrawMeshTasksIndirectCommandEXT.java new file mode 100644 index 00000000..d2b7d38b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrawMeshTasksIndirectCommandEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### groupCountX +/// [VarHandle][#VH_groupCountX] - [Getter][#groupCountX()] - [Setter][#groupCountX(int)] +/// ### groupCountY +/// [VarHandle][#VH_groupCountY] - [Getter][#groupCountY()] - [Setter][#groupCountY(int)] +/// ### groupCountZ +/// [VarHandle][#VH_groupCountZ] - [Getter][#groupCountZ()] - [Setter][#groupCountZ(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDrawMeshTasksIndirectCommandEXT { +/// uint32_t groupCountX; +/// uint32_t groupCountY; +/// uint32_t groupCountZ; +/// } VkDrawMeshTasksIndirectCommandEXT; +/// ``` +public final class VkDrawMeshTasksIndirectCommandEXT extends Struct { + /// The struct layout of `VkDrawMeshTasksIndirectCommandEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("groupCountX"), + ValueLayout.JAVA_INT.withName("groupCountY"), + ValueLayout.JAVA_INT.withName("groupCountZ") + ); + /// The [VarHandle] of `groupCountX` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_groupCountX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("groupCountX")); + /// The [VarHandle] of `groupCountY` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_groupCountY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("groupCountY")); + /// The [VarHandle] of `groupCountZ` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_groupCountZ = LAYOUT.arrayElementVarHandle(PathElement.groupElement("groupCountZ")); + + /// Creates `VkDrawMeshTasksIndirectCommandEXT` with the given segment. + /// @param segment the memory segment + public VkDrawMeshTasksIndirectCommandEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDrawMeshTasksIndirectCommandEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawMeshTasksIndirectCommandEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawMeshTasksIndirectCommandEXT(segment); } + + /// Creates `VkDrawMeshTasksIndirectCommandEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawMeshTasksIndirectCommandEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawMeshTasksIndirectCommandEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDrawMeshTasksIndirectCommandEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawMeshTasksIndirectCommandEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawMeshTasksIndirectCommandEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDrawMeshTasksIndirectCommandEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDrawMeshTasksIndirectCommandEXT` + public static VkDrawMeshTasksIndirectCommandEXT alloc(SegmentAllocator allocator) { return new VkDrawMeshTasksIndirectCommandEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDrawMeshTasksIndirectCommandEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDrawMeshTasksIndirectCommandEXT` + public static VkDrawMeshTasksIndirectCommandEXT alloc(SegmentAllocator allocator, long count) { return new VkDrawMeshTasksIndirectCommandEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `groupCountX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_groupCountX(MemorySegment segment, long index) { return (int) VH_groupCountX.get(segment, 0L, index); } + /// {@return `groupCountX`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_groupCountX(MemorySegment segment) { return VkDrawMeshTasksIndirectCommandEXT.get_groupCountX(segment, 0L); } + /// {@return `groupCountX` at the given index} + /// @param index the index + public @CType("uint32_t") int groupCountXAt(long index) { return VkDrawMeshTasksIndirectCommandEXT.get_groupCountX(this.segment(), index); } + /// {@return `groupCountX`} + public @CType("uint32_t") int groupCountX() { return VkDrawMeshTasksIndirectCommandEXT.get_groupCountX(this.segment()); } + /// Sets `groupCountX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_groupCountX(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_groupCountX.set(segment, 0L, index, value); } + /// Sets `groupCountX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_groupCountX(MemorySegment segment, @CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandEXT.set_groupCountX(segment, 0L, value); } + /// Sets `groupCountX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawMeshTasksIndirectCommandEXT groupCountXAt(long index, @CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandEXT.set_groupCountX(this.segment(), index, value); return this; } + /// Sets `groupCountX` with the given value. + /// @param value the value + /// @return `this` + public VkDrawMeshTasksIndirectCommandEXT groupCountX(@CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandEXT.set_groupCountX(this.segment(), value); return this; } + + /// {@return `groupCountY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_groupCountY(MemorySegment segment, long index) { return (int) VH_groupCountY.get(segment, 0L, index); } + /// {@return `groupCountY`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_groupCountY(MemorySegment segment) { return VkDrawMeshTasksIndirectCommandEXT.get_groupCountY(segment, 0L); } + /// {@return `groupCountY` at the given index} + /// @param index the index + public @CType("uint32_t") int groupCountYAt(long index) { return VkDrawMeshTasksIndirectCommandEXT.get_groupCountY(this.segment(), index); } + /// {@return `groupCountY`} + public @CType("uint32_t") int groupCountY() { return VkDrawMeshTasksIndirectCommandEXT.get_groupCountY(this.segment()); } + /// Sets `groupCountY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_groupCountY(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_groupCountY.set(segment, 0L, index, value); } + /// Sets `groupCountY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_groupCountY(MemorySegment segment, @CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandEXT.set_groupCountY(segment, 0L, value); } + /// Sets `groupCountY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawMeshTasksIndirectCommandEXT groupCountYAt(long index, @CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandEXT.set_groupCountY(this.segment(), index, value); return this; } + /// Sets `groupCountY` with the given value. + /// @param value the value + /// @return `this` + public VkDrawMeshTasksIndirectCommandEXT groupCountY(@CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandEXT.set_groupCountY(this.segment(), value); return this; } + + /// {@return `groupCountZ` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_groupCountZ(MemorySegment segment, long index) { return (int) VH_groupCountZ.get(segment, 0L, index); } + /// {@return `groupCountZ`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_groupCountZ(MemorySegment segment) { return VkDrawMeshTasksIndirectCommandEXT.get_groupCountZ(segment, 0L); } + /// {@return `groupCountZ` at the given index} + /// @param index the index + public @CType("uint32_t") int groupCountZAt(long index) { return VkDrawMeshTasksIndirectCommandEXT.get_groupCountZ(this.segment(), index); } + /// {@return `groupCountZ`} + public @CType("uint32_t") int groupCountZ() { return VkDrawMeshTasksIndirectCommandEXT.get_groupCountZ(this.segment()); } + /// Sets `groupCountZ` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_groupCountZ(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_groupCountZ.set(segment, 0L, index, value); } + /// Sets `groupCountZ` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_groupCountZ(MemorySegment segment, @CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandEXT.set_groupCountZ(segment, 0L, value); } + /// Sets `groupCountZ` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawMeshTasksIndirectCommandEXT groupCountZAt(long index, @CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandEXT.set_groupCountZ(this.segment(), index, value); return this; } + /// Sets `groupCountZ` with the given value. + /// @param value the value + /// @return `this` + public VkDrawMeshTasksIndirectCommandEXT groupCountZ(@CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandEXT.set_groupCountZ(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierProperties2EXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierProperties2EXT.java new file mode 100644 index 00000000..d0f2e130 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierProperties2EXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### drmFormatModifier +/// [VarHandle][#VH_drmFormatModifier] - [Getter][#drmFormatModifier()] - [Setter][#drmFormatModifier(long)] +/// ### drmFormatModifierPlaneCount +/// [VarHandle][#VH_drmFormatModifierPlaneCount] - [Getter][#drmFormatModifierPlaneCount()] - [Setter][#drmFormatModifierPlaneCount(int)] +/// ### drmFormatModifierTilingFeatures +/// [VarHandle][#VH_drmFormatModifierTilingFeatures] - [Getter][#drmFormatModifierTilingFeatures()] - [Setter][#drmFormatModifierTilingFeatures(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDrmFormatModifierProperties2EXT { +/// uint64_t drmFormatModifier; +/// uint32_t drmFormatModifierPlaneCount; +/// VkFormatFeatureFlags2 drmFormatModifierTilingFeatures; +/// } VkDrmFormatModifierProperties2EXT; +/// ``` +public final class VkDrmFormatModifierProperties2EXT extends Struct { + /// The struct layout of `VkDrmFormatModifierProperties2EXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("drmFormatModifier"), + ValueLayout.JAVA_INT.withName("drmFormatModifierPlaneCount"), + ValueLayout.JAVA_LONG.withName("drmFormatModifierTilingFeatures") + ); + /// The [VarHandle] of `drmFormatModifier` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_drmFormatModifier = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifier")); + /// The [VarHandle] of `drmFormatModifierPlaneCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_drmFormatModifierPlaneCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifierPlaneCount")); + /// The [VarHandle] of `drmFormatModifierTilingFeatures` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_drmFormatModifierTilingFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifierTilingFeatures")); + + /// Creates `VkDrmFormatModifierProperties2EXT` with the given segment. + /// @param segment the memory segment + public VkDrmFormatModifierProperties2EXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDrmFormatModifierProperties2EXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierProperties2EXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierProperties2EXT(segment); } + + /// Creates `VkDrmFormatModifierProperties2EXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierProperties2EXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierProperties2EXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDrmFormatModifierProperties2EXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierProperties2EXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierProperties2EXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDrmFormatModifierProperties2EXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDrmFormatModifierProperties2EXT` + public static VkDrmFormatModifierProperties2EXT alloc(SegmentAllocator allocator) { return new VkDrmFormatModifierProperties2EXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDrmFormatModifierProperties2EXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDrmFormatModifierProperties2EXT` + public static VkDrmFormatModifierProperties2EXT alloc(SegmentAllocator allocator, long count) { return new VkDrmFormatModifierProperties2EXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `drmFormatModifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_drmFormatModifier(MemorySegment segment, long index) { return (long) VH_drmFormatModifier.get(segment, 0L, index); } + /// {@return `drmFormatModifier`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_drmFormatModifier(MemorySegment segment) { return VkDrmFormatModifierProperties2EXT.get_drmFormatModifier(segment, 0L); } + /// {@return `drmFormatModifier` at the given index} + /// @param index the index + public @CType("uint64_t") long drmFormatModifierAt(long index) { return VkDrmFormatModifierProperties2EXT.get_drmFormatModifier(this.segment(), index); } + /// {@return `drmFormatModifier`} + public @CType("uint64_t") long drmFormatModifier() { return VkDrmFormatModifierProperties2EXT.get_drmFormatModifier(this.segment()); } + /// Sets `drmFormatModifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifier(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_drmFormatModifier.set(segment, 0L, index, value); } + /// Sets `drmFormatModifier` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifier(MemorySegment segment, @CType("uint64_t") long value) { VkDrmFormatModifierProperties2EXT.set_drmFormatModifier(segment, 0L, value); } + /// Sets `drmFormatModifier` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierProperties2EXT drmFormatModifierAt(long index, @CType("uint64_t") long value) { VkDrmFormatModifierProperties2EXT.set_drmFormatModifier(this.segment(), index, value); return this; } + /// Sets `drmFormatModifier` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierProperties2EXT drmFormatModifier(@CType("uint64_t") long value) { VkDrmFormatModifierProperties2EXT.set_drmFormatModifier(this.segment(), value); return this; } + + /// {@return `drmFormatModifierPlaneCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_drmFormatModifierPlaneCount(MemorySegment segment, long index) { return (int) VH_drmFormatModifierPlaneCount.get(segment, 0L, index); } + /// {@return `drmFormatModifierPlaneCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_drmFormatModifierPlaneCount(MemorySegment segment) { return VkDrmFormatModifierProperties2EXT.get_drmFormatModifierPlaneCount(segment, 0L); } + /// {@return `drmFormatModifierPlaneCount` at the given index} + /// @param index the index + public @CType("uint32_t") int drmFormatModifierPlaneCountAt(long index) { return VkDrmFormatModifierProperties2EXT.get_drmFormatModifierPlaneCount(this.segment(), index); } + /// {@return `drmFormatModifierPlaneCount`} + public @CType("uint32_t") int drmFormatModifierPlaneCount() { return VkDrmFormatModifierProperties2EXT.get_drmFormatModifierPlaneCount(this.segment()); } + /// Sets `drmFormatModifierPlaneCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifierPlaneCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_drmFormatModifierPlaneCount.set(segment, 0L, index, value); } + /// Sets `drmFormatModifierPlaneCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifierPlaneCount(MemorySegment segment, @CType("uint32_t") int value) { VkDrmFormatModifierProperties2EXT.set_drmFormatModifierPlaneCount(segment, 0L, value); } + /// Sets `drmFormatModifierPlaneCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierProperties2EXT drmFormatModifierPlaneCountAt(long index, @CType("uint32_t") int value) { VkDrmFormatModifierProperties2EXT.set_drmFormatModifierPlaneCount(this.segment(), index, value); return this; } + /// Sets `drmFormatModifierPlaneCount` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierProperties2EXT drmFormatModifierPlaneCount(@CType("uint32_t") int value) { VkDrmFormatModifierProperties2EXT.set_drmFormatModifierPlaneCount(this.segment(), value); return this; } + + /// {@return `drmFormatModifierTilingFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags2") long get_drmFormatModifierTilingFeatures(MemorySegment segment, long index) { return (long) VH_drmFormatModifierTilingFeatures.get(segment, 0L, index); } + /// {@return `drmFormatModifierTilingFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags2") long get_drmFormatModifierTilingFeatures(MemorySegment segment) { return VkDrmFormatModifierProperties2EXT.get_drmFormatModifierTilingFeatures(segment, 0L); } + /// {@return `drmFormatModifierTilingFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags2") long drmFormatModifierTilingFeaturesAt(long index) { return VkDrmFormatModifierProperties2EXT.get_drmFormatModifierTilingFeatures(this.segment(), index); } + /// {@return `drmFormatModifierTilingFeatures`} + public @CType("VkFormatFeatureFlags2") long drmFormatModifierTilingFeatures() { return VkDrmFormatModifierProperties2EXT.get_drmFormatModifierTilingFeatures(this.segment()); } + /// Sets `drmFormatModifierTilingFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifierTilingFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags2") long value) { VH_drmFormatModifierTilingFeatures.set(segment, 0L, index, value); } + /// Sets `drmFormatModifierTilingFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifierTilingFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags2") long value) { VkDrmFormatModifierProperties2EXT.set_drmFormatModifierTilingFeatures(segment, 0L, value); } + /// Sets `drmFormatModifierTilingFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierProperties2EXT drmFormatModifierTilingFeaturesAt(long index, @CType("VkFormatFeatureFlags2") long value) { VkDrmFormatModifierProperties2EXT.set_drmFormatModifierTilingFeatures(this.segment(), index, value); return this; } + /// Sets `drmFormatModifierTilingFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierProperties2EXT drmFormatModifierTilingFeatures(@CType("VkFormatFeatureFlags2") long value) { VkDrmFormatModifierProperties2EXT.set_drmFormatModifierTilingFeatures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierPropertiesEXT.java new file mode 100644 index 00000000..bc06886d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### drmFormatModifier +/// [VarHandle][#VH_drmFormatModifier] - [Getter][#drmFormatModifier()] - [Setter][#drmFormatModifier(long)] +/// ### drmFormatModifierPlaneCount +/// [VarHandle][#VH_drmFormatModifierPlaneCount] - [Getter][#drmFormatModifierPlaneCount()] - [Setter][#drmFormatModifierPlaneCount(int)] +/// ### drmFormatModifierTilingFeatures +/// [VarHandle][#VH_drmFormatModifierTilingFeatures] - [Getter][#drmFormatModifierTilingFeatures()] - [Setter][#drmFormatModifierTilingFeatures(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDrmFormatModifierPropertiesEXT { +/// uint64_t drmFormatModifier; +/// uint32_t drmFormatModifierPlaneCount; +/// VkFormatFeatureFlags drmFormatModifierTilingFeatures; +/// } VkDrmFormatModifierPropertiesEXT; +/// ``` +public final class VkDrmFormatModifierPropertiesEXT extends Struct { + /// The struct layout of `VkDrmFormatModifierPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("drmFormatModifier"), + ValueLayout.JAVA_INT.withName("drmFormatModifierPlaneCount"), + ValueLayout.JAVA_INT.withName("drmFormatModifierTilingFeatures") + ); + /// The [VarHandle] of `drmFormatModifier` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_drmFormatModifier = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifier")); + /// The [VarHandle] of `drmFormatModifierPlaneCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_drmFormatModifierPlaneCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifierPlaneCount")); + /// The [VarHandle] of `drmFormatModifierTilingFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_drmFormatModifierTilingFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifierTilingFeatures")); + + /// Creates `VkDrmFormatModifierPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkDrmFormatModifierPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDrmFormatModifierPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierPropertiesEXT(segment); } + + /// Creates `VkDrmFormatModifierPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDrmFormatModifierPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDrmFormatModifierPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDrmFormatModifierPropertiesEXT` + public static VkDrmFormatModifierPropertiesEXT alloc(SegmentAllocator allocator) { return new VkDrmFormatModifierPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDrmFormatModifierPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDrmFormatModifierPropertiesEXT` + public static VkDrmFormatModifierPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkDrmFormatModifierPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `drmFormatModifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_drmFormatModifier(MemorySegment segment, long index) { return (long) VH_drmFormatModifier.get(segment, 0L, index); } + /// {@return `drmFormatModifier`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_drmFormatModifier(MemorySegment segment) { return VkDrmFormatModifierPropertiesEXT.get_drmFormatModifier(segment, 0L); } + /// {@return `drmFormatModifier` at the given index} + /// @param index the index + public @CType("uint64_t") long drmFormatModifierAt(long index) { return VkDrmFormatModifierPropertiesEXT.get_drmFormatModifier(this.segment(), index); } + /// {@return `drmFormatModifier`} + public @CType("uint64_t") long drmFormatModifier() { return VkDrmFormatModifierPropertiesEXT.get_drmFormatModifier(this.segment()); } + /// Sets `drmFormatModifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifier(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_drmFormatModifier.set(segment, 0L, index, value); } + /// Sets `drmFormatModifier` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifier(MemorySegment segment, @CType("uint64_t") long value) { VkDrmFormatModifierPropertiesEXT.set_drmFormatModifier(segment, 0L, value); } + /// Sets `drmFormatModifier` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesEXT drmFormatModifierAt(long index, @CType("uint64_t") long value) { VkDrmFormatModifierPropertiesEXT.set_drmFormatModifier(this.segment(), index, value); return this; } + /// Sets `drmFormatModifier` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesEXT drmFormatModifier(@CType("uint64_t") long value) { VkDrmFormatModifierPropertiesEXT.set_drmFormatModifier(this.segment(), value); return this; } + + /// {@return `drmFormatModifierPlaneCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_drmFormatModifierPlaneCount(MemorySegment segment, long index) { return (int) VH_drmFormatModifierPlaneCount.get(segment, 0L, index); } + /// {@return `drmFormatModifierPlaneCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_drmFormatModifierPlaneCount(MemorySegment segment) { return VkDrmFormatModifierPropertiesEXT.get_drmFormatModifierPlaneCount(segment, 0L); } + /// {@return `drmFormatModifierPlaneCount` at the given index} + /// @param index the index + public @CType("uint32_t") int drmFormatModifierPlaneCountAt(long index) { return VkDrmFormatModifierPropertiesEXT.get_drmFormatModifierPlaneCount(this.segment(), index); } + /// {@return `drmFormatModifierPlaneCount`} + public @CType("uint32_t") int drmFormatModifierPlaneCount() { return VkDrmFormatModifierPropertiesEXT.get_drmFormatModifierPlaneCount(this.segment()); } + /// Sets `drmFormatModifierPlaneCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifierPlaneCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_drmFormatModifierPlaneCount.set(segment, 0L, index, value); } + /// Sets `drmFormatModifierPlaneCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifierPlaneCount(MemorySegment segment, @CType("uint32_t") int value) { VkDrmFormatModifierPropertiesEXT.set_drmFormatModifierPlaneCount(segment, 0L, value); } + /// Sets `drmFormatModifierPlaneCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesEXT drmFormatModifierPlaneCountAt(long index, @CType("uint32_t") int value) { VkDrmFormatModifierPropertiesEXT.set_drmFormatModifierPlaneCount(this.segment(), index, value); return this; } + /// Sets `drmFormatModifierPlaneCount` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesEXT drmFormatModifierPlaneCount(@CType("uint32_t") int value) { VkDrmFormatModifierPropertiesEXT.set_drmFormatModifierPlaneCount(this.segment(), value); return this; } + + /// {@return `drmFormatModifierTilingFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags") int get_drmFormatModifierTilingFeatures(MemorySegment segment, long index) { return (int) VH_drmFormatModifierTilingFeatures.get(segment, 0L, index); } + /// {@return `drmFormatModifierTilingFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags") int get_drmFormatModifierTilingFeatures(MemorySegment segment) { return VkDrmFormatModifierPropertiesEXT.get_drmFormatModifierTilingFeatures(segment, 0L); } + /// {@return `drmFormatModifierTilingFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags") int drmFormatModifierTilingFeaturesAt(long index) { return VkDrmFormatModifierPropertiesEXT.get_drmFormatModifierTilingFeatures(this.segment(), index); } + /// {@return `drmFormatModifierTilingFeatures`} + public @CType("VkFormatFeatureFlags") int drmFormatModifierTilingFeatures() { return VkDrmFormatModifierPropertiesEXT.get_drmFormatModifierTilingFeatures(this.segment()); } + /// Sets `drmFormatModifierTilingFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifierTilingFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags") int value) { VH_drmFormatModifierTilingFeatures.set(segment, 0L, index, value); } + /// Sets `drmFormatModifierTilingFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifierTilingFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags") int value) { VkDrmFormatModifierPropertiesEXT.set_drmFormatModifierTilingFeatures(segment, 0L, value); } + /// Sets `drmFormatModifierTilingFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesEXT drmFormatModifierTilingFeaturesAt(long index, @CType("VkFormatFeatureFlags") int value) { VkDrmFormatModifierPropertiesEXT.set_drmFormatModifierTilingFeatures(this.segment(), index, value); return this; } + /// Sets `drmFormatModifierTilingFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesEXT drmFormatModifierTilingFeatures(@CType("VkFormatFeatureFlags") int value) { VkDrmFormatModifierPropertiesEXT.set_drmFormatModifierTilingFeatures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierPropertiesList2EXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierPropertiesList2EXT.java new file mode 100644 index 00000000..9d469bfd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierPropertiesList2EXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### drmFormatModifierCount +/// [VarHandle][#VH_drmFormatModifierCount] - [Getter][#drmFormatModifierCount()] - [Setter][#drmFormatModifierCount(int)] +/// ### pDrmFormatModifierProperties +/// [VarHandle][#VH_pDrmFormatModifierProperties] - [Getter][#pDrmFormatModifierProperties()] - [Setter][#pDrmFormatModifierProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDrmFormatModifierPropertiesList2EXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t drmFormatModifierCount; +/// VkDrmFormatModifierProperties2EXT * pDrmFormatModifierProperties; +/// } VkDrmFormatModifierPropertiesList2EXT; +/// ``` +public final class VkDrmFormatModifierPropertiesList2EXT extends Struct { + /// The struct layout of `VkDrmFormatModifierPropertiesList2EXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("drmFormatModifierCount"), + ValueLayout.ADDRESS.withName("pDrmFormatModifierProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `drmFormatModifierCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_drmFormatModifierCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifierCount")); + /// The [VarHandle] of `pDrmFormatModifierProperties` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDrmFormatModifierProperties = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDrmFormatModifierProperties")); + + /// Creates `VkDrmFormatModifierPropertiesList2EXT` with the given segment. + /// @param segment the memory segment + public VkDrmFormatModifierPropertiesList2EXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDrmFormatModifierPropertiesList2EXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierPropertiesList2EXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierPropertiesList2EXT(segment); } + + /// Creates `VkDrmFormatModifierPropertiesList2EXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierPropertiesList2EXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierPropertiesList2EXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDrmFormatModifierPropertiesList2EXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierPropertiesList2EXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierPropertiesList2EXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDrmFormatModifierPropertiesList2EXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDrmFormatModifierPropertiesList2EXT` + public static VkDrmFormatModifierPropertiesList2EXT alloc(SegmentAllocator allocator) { return new VkDrmFormatModifierPropertiesList2EXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDrmFormatModifierPropertiesList2EXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDrmFormatModifierPropertiesList2EXT` + public static VkDrmFormatModifierPropertiesList2EXT alloc(SegmentAllocator allocator, long count) { return new VkDrmFormatModifierPropertiesList2EXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDrmFormatModifierPropertiesList2EXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDrmFormatModifierPropertiesList2EXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDrmFormatModifierPropertiesList2EXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDrmFormatModifierPropertiesList2EXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesList2EXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDrmFormatModifierPropertiesList2EXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesList2EXT sType(@CType("VkStructureType") int value) { VkDrmFormatModifierPropertiesList2EXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDrmFormatModifierPropertiesList2EXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDrmFormatModifierPropertiesList2EXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDrmFormatModifierPropertiesList2EXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesList2EXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesList2EXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesList2EXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesList2EXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesList2EXT.set_pNext(this.segment(), value); return this; } + + /// {@return `drmFormatModifierCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_drmFormatModifierCount(MemorySegment segment, long index) { return (int) VH_drmFormatModifierCount.get(segment, 0L, index); } + /// {@return `drmFormatModifierCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_drmFormatModifierCount(MemorySegment segment) { return VkDrmFormatModifierPropertiesList2EXT.get_drmFormatModifierCount(segment, 0L); } + /// {@return `drmFormatModifierCount` at the given index} + /// @param index the index + public @CType("uint32_t") int drmFormatModifierCountAt(long index) { return VkDrmFormatModifierPropertiesList2EXT.get_drmFormatModifierCount(this.segment(), index); } + /// {@return `drmFormatModifierCount`} + public @CType("uint32_t") int drmFormatModifierCount() { return VkDrmFormatModifierPropertiesList2EXT.get_drmFormatModifierCount(this.segment()); } + /// Sets `drmFormatModifierCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifierCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_drmFormatModifierCount.set(segment, 0L, index, value); } + /// Sets `drmFormatModifierCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifierCount(MemorySegment segment, @CType("uint32_t") int value) { VkDrmFormatModifierPropertiesList2EXT.set_drmFormatModifierCount(segment, 0L, value); } + /// Sets `drmFormatModifierCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesList2EXT drmFormatModifierCountAt(long index, @CType("uint32_t") int value) { VkDrmFormatModifierPropertiesList2EXT.set_drmFormatModifierCount(this.segment(), index, value); return this; } + /// Sets `drmFormatModifierCount` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesList2EXT drmFormatModifierCount(@CType("uint32_t") int value) { VkDrmFormatModifierPropertiesList2EXT.set_drmFormatModifierCount(this.segment(), value); return this; } + + /// {@return `pDrmFormatModifierProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDrmFormatModifierProperties2EXT *") java.lang.foreign.MemorySegment get_pDrmFormatModifierProperties(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDrmFormatModifierProperties.get(segment, 0L, index); } + /// {@return `pDrmFormatModifierProperties`} + /// @param segment the segment of the struct + public static @CType("VkDrmFormatModifierProperties2EXT *") java.lang.foreign.MemorySegment get_pDrmFormatModifierProperties(MemorySegment segment) { return VkDrmFormatModifierPropertiesList2EXT.get_pDrmFormatModifierProperties(segment, 0L); } + /// {@return `pDrmFormatModifierProperties` at the given index} + /// @param index the index + public @CType("VkDrmFormatModifierProperties2EXT *") java.lang.foreign.MemorySegment pDrmFormatModifierPropertiesAt(long index) { return VkDrmFormatModifierPropertiesList2EXT.get_pDrmFormatModifierProperties(this.segment(), index); } + /// {@return `pDrmFormatModifierProperties`} + public @CType("VkDrmFormatModifierProperties2EXT *") java.lang.foreign.MemorySegment pDrmFormatModifierProperties() { return VkDrmFormatModifierPropertiesList2EXT.get_pDrmFormatModifierProperties(this.segment()); } + /// Sets `pDrmFormatModifierProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDrmFormatModifierProperties(MemorySegment segment, long index, @CType("VkDrmFormatModifierProperties2EXT *") java.lang.foreign.MemorySegment value) { VH_pDrmFormatModifierProperties.set(segment, 0L, index, value); } + /// Sets `pDrmFormatModifierProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDrmFormatModifierProperties(MemorySegment segment, @CType("VkDrmFormatModifierProperties2EXT *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesList2EXT.set_pDrmFormatModifierProperties(segment, 0L, value); } + /// Sets `pDrmFormatModifierProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesList2EXT pDrmFormatModifierPropertiesAt(long index, @CType("VkDrmFormatModifierProperties2EXT *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesList2EXT.set_pDrmFormatModifierProperties(this.segment(), index, value); return this; } + /// Sets `pDrmFormatModifierProperties` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesList2EXT pDrmFormatModifierProperties(@CType("VkDrmFormatModifierProperties2EXT *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesList2EXT.set_pDrmFormatModifierProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierPropertiesListEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierPropertiesListEXT.java new file mode 100644 index 00000000..da34ff76 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkDrmFormatModifierPropertiesListEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### drmFormatModifierCount +/// [VarHandle][#VH_drmFormatModifierCount] - [Getter][#drmFormatModifierCount()] - [Setter][#drmFormatModifierCount(int)] +/// ### pDrmFormatModifierProperties +/// [VarHandle][#VH_pDrmFormatModifierProperties] - [Getter][#pDrmFormatModifierProperties()] - [Setter][#pDrmFormatModifierProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDrmFormatModifierPropertiesListEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t drmFormatModifierCount; +/// VkDrmFormatModifierPropertiesEXT * pDrmFormatModifierProperties; +/// } VkDrmFormatModifierPropertiesListEXT; +/// ``` +public final class VkDrmFormatModifierPropertiesListEXT extends Struct { + /// The struct layout of `VkDrmFormatModifierPropertiesListEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("drmFormatModifierCount"), + ValueLayout.ADDRESS.withName("pDrmFormatModifierProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `drmFormatModifierCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_drmFormatModifierCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifierCount")); + /// The [VarHandle] of `pDrmFormatModifierProperties` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDrmFormatModifierProperties = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDrmFormatModifierProperties")); + + /// Creates `VkDrmFormatModifierPropertiesListEXT` with the given segment. + /// @param segment the memory segment + public VkDrmFormatModifierPropertiesListEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDrmFormatModifierPropertiesListEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierPropertiesListEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierPropertiesListEXT(segment); } + + /// Creates `VkDrmFormatModifierPropertiesListEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierPropertiesListEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierPropertiesListEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDrmFormatModifierPropertiesListEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrmFormatModifierPropertiesListEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDrmFormatModifierPropertiesListEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDrmFormatModifierPropertiesListEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDrmFormatModifierPropertiesListEXT` + public static VkDrmFormatModifierPropertiesListEXT alloc(SegmentAllocator allocator) { return new VkDrmFormatModifierPropertiesListEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDrmFormatModifierPropertiesListEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDrmFormatModifierPropertiesListEXT` + public static VkDrmFormatModifierPropertiesListEXT alloc(SegmentAllocator allocator, long count) { return new VkDrmFormatModifierPropertiesListEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDrmFormatModifierPropertiesListEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDrmFormatModifierPropertiesListEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDrmFormatModifierPropertiesListEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDrmFormatModifierPropertiesListEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesListEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkDrmFormatModifierPropertiesListEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesListEXT sType(@CType("VkStructureType") int value) { VkDrmFormatModifierPropertiesListEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDrmFormatModifierPropertiesListEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDrmFormatModifierPropertiesListEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDrmFormatModifierPropertiesListEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesListEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesListEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesListEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesListEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesListEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `drmFormatModifierCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_drmFormatModifierCount(MemorySegment segment, long index) { return (int) VH_drmFormatModifierCount.get(segment, 0L, index); } + /// {@return `drmFormatModifierCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_drmFormatModifierCount(MemorySegment segment) { return VkDrmFormatModifierPropertiesListEXT.get_drmFormatModifierCount(segment, 0L); } + /// {@return `drmFormatModifierCount` at the given index} + /// @param index the index + public @CType("uint32_t") int drmFormatModifierCountAt(long index) { return VkDrmFormatModifierPropertiesListEXT.get_drmFormatModifierCount(this.segment(), index); } + /// {@return `drmFormatModifierCount`} + public @CType("uint32_t") int drmFormatModifierCount() { return VkDrmFormatModifierPropertiesListEXT.get_drmFormatModifierCount(this.segment()); } + /// Sets `drmFormatModifierCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifierCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_drmFormatModifierCount.set(segment, 0L, index, value); } + /// Sets `drmFormatModifierCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifierCount(MemorySegment segment, @CType("uint32_t") int value) { VkDrmFormatModifierPropertiesListEXT.set_drmFormatModifierCount(segment, 0L, value); } + /// Sets `drmFormatModifierCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesListEXT drmFormatModifierCountAt(long index, @CType("uint32_t") int value) { VkDrmFormatModifierPropertiesListEXT.set_drmFormatModifierCount(this.segment(), index, value); return this; } + /// Sets `drmFormatModifierCount` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesListEXT drmFormatModifierCount(@CType("uint32_t") int value) { VkDrmFormatModifierPropertiesListEXT.set_drmFormatModifierCount(this.segment(), value); return this; } + + /// {@return `pDrmFormatModifierProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDrmFormatModifierPropertiesEXT *") java.lang.foreign.MemorySegment get_pDrmFormatModifierProperties(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDrmFormatModifierProperties.get(segment, 0L, index); } + /// {@return `pDrmFormatModifierProperties`} + /// @param segment the segment of the struct + public static @CType("VkDrmFormatModifierPropertiesEXT *") java.lang.foreign.MemorySegment get_pDrmFormatModifierProperties(MemorySegment segment) { return VkDrmFormatModifierPropertiesListEXT.get_pDrmFormatModifierProperties(segment, 0L); } + /// {@return `pDrmFormatModifierProperties` at the given index} + /// @param index the index + public @CType("VkDrmFormatModifierPropertiesEXT *") java.lang.foreign.MemorySegment pDrmFormatModifierPropertiesAt(long index) { return VkDrmFormatModifierPropertiesListEXT.get_pDrmFormatModifierProperties(this.segment(), index); } + /// {@return `pDrmFormatModifierProperties`} + public @CType("VkDrmFormatModifierPropertiesEXT *") java.lang.foreign.MemorySegment pDrmFormatModifierProperties() { return VkDrmFormatModifierPropertiesListEXT.get_pDrmFormatModifierProperties(this.segment()); } + /// Sets `pDrmFormatModifierProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDrmFormatModifierProperties(MemorySegment segment, long index, @CType("VkDrmFormatModifierPropertiesEXT *") java.lang.foreign.MemorySegment value) { VH_pDrmFormatModifierProperties.set(segment, 0L, index, value); } + /// Sets `pDrmFormatModifierProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDrmFormatModifierProperties(MemorySegment segment, @CType("VkDrmFormatModifierPropertiesEXT *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesListEXT.set_pDrmFormatModifierProperties(segment, 0L, value); } + /// Sets `pDrmFormatModifierProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesListEXT pDrmFormatModifierPropertiesAt(long index, @CType("VkDrmFormatModifierPropertiesEXT *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesListEXT.set_pDrmFormatModifierProperties(this.segment(), index, value); return this; } + /// Sets `pDrmFormatModifierProperties` with the given value. + /// @param value the value + /// @return `this` + public VkDrmFormatModifierPropertiesListEXT pDrmFormatModifierProperties(@CType("VkDrmFormatModifierPropertiesEXT *") java.lang.foreign.MemorySegment value) { VkDrmFormatModifierPropertiesListEXT.set_pDrmFormatModifierProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalBufferInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalBufferInfoEXT.java new file mode 100644 index 00000000..974d31ac --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalBufferInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### mtlBuffer +/// [VarHandle][#VH_mtlBuffer] - [Getter][#mtlBuffer()] - [Setter][#mtlBuffer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMetalBufferInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceMemory memory; +/// MTLBuffer_id mtlBuffer; +/// } VkExportMetalBufferInfoEXT; +/// ``` +public final class VkExportMetalBufferInfoEXT extends Struct { + /// The struct layout of `VkExportMetalBufferInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.ADDRESS.withName("mtlBuffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `mtlBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_mtlBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mtlBuffer")); + + /// Creates `VkExportMetalBufferInfoEXT` with the given segment. + /// @param segment the memory segment + public VkExportMetalBufferInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMetalBufferInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalBufferInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalBufferInfoEXT(segment); } + + /// Creates `VkExportMetalBufferInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalBufferInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalBufferInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMetalBufferInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalBufferInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalBufferInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMetalBufferInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMetalBufferInfoEXT` + public static VkExportMetalBufferInfoEXT alloc(SegmentAllocator allocator) { return new VkExportMetalBufferInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMetalBufferInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMetalBufferInfoEXT` + public static VkExportMetalBufferInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkExportMetalBufferInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMetalBufferInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMetalBufferInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMetalBufferInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMetalBufferInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalBufferInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMetalBufferInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalBufferInfoEXT sType(@CType("VkStructureType") int value) { VkExportMetalBufferInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMetalBufferInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMetalBufferInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMetalBufferInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalBufferInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalBufferInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalBufferInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalBufferInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalBufferInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkExportMetalBufferInfoEXT.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkExportMetalBufferInfoEXT.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkExportMetalBufferInfoEXT.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkExportMetalBufferInfoEXT.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalBufferInfoEXT memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkExportMetalBufferInfoEXT.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalBufferInfoEXT memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkExportMetalBufferInfoEXT.set_memory(this.segment(), value); return this; } + + /// {@return `mtlBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("MTLBuffer_id") java.lang.foreign.MemorySegment get_mtlBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_mtlBuffer.get(segment, 0L, index); } + /// {@return `mtlBuffer`} + /// @param segment the segment of the struct + public static @CType("MTLBuffer_id") java.lang.foreign.MemorySegment get_mtlBuffer(MemorySegment segment) { return VkExportMetalBufferInfoEXT.get_mtlBuffer(segment, 0L); } + /// {@return `mtlBuffer` at the given index} + /// @param index the index + public @CType("MTLBuffer_id") java.lang.foreign.MemorySegment mtlBufferAt(long index) { return VkExportMetalBufferInfoEXT.get_mtlBuffer(this.segment(), index); } + /// {@return `mtlBuffer`} + public @CType("MTLBuffer_id") java.lang.foreign.MemorySegment mtlBuffer() { return VkExportMetalBufferInfoEXT.get_mtlBuffer(this.segment()); } + /// Sets `mtlBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mtlBuffer(MemorySegment segment, long index, @CType("MTLBuffer_id") java.lang.foreign.MemorySegment value) { VH_mtlBuffer.set(segment, 0L, index, value); } + /// Sets `mtlBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mtlBuffer(MemorySegment segment, @CType("MTLBuffer_id") java.lang.foreign.MemorySegment value) { VkExportMetalBufferInfoEXT.set_mtlBuffer(segment, 0L, value); } + /// Sets `mtlBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalBufferInfoEXT mtlBufferAt(long index, @CType("MTLBuffer_id") java.lang.foreign.MemorySegment value) { VkExportMetalBufferInfoEXT.set_mtlBuffer(this.segment(), index, value); return this; } + /// Sets `mtlBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalBufferInfoEXT mtlBuffer(@CType("MTLBuffer_id") java.lang.foreign.MemorySegment value) { VkExportMetalBufferInfoEXT.set_mtlBuffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalCommandQueueInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalCommandQueueInfoEXT.java new file mode 100644 index 00000000..c03e743b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalCommandQueueInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### queue +/// [VarHandle][#VH_queue] - [Getter][#queue()] - [Setter][#queue(java.lang.foreign.MemorySegment)] +/// ### mtlCommandQueue +/// [VarHandle][#VH_mtlCommandQueue] - [Getter][#mtlCommandQueue()] - [Setter][#mtlCommandQueue(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMetalCommandQueueInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkQueue queue; +/// MTLCommandQueue_id mtlCommandQueue; +/// } VkExportMetalCommandQueueInfoEXT; +/// ``` +public final class VkExportMetalCommandQueueInfoEXT extends Struct { + /// The struct layout of `VkExportMetalCommandQueueInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("queue"), + ValueLayout.ADDRESS.withName("mtlCommandQueue") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `queue` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_queue = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queue")); + /// The [VarHandle] of `mtlCommandQueue` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_mtlCommandQueue = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mtlCommandQueue")); + + /// Creates `VkExportMetalCommandQueueInfoEXT` with the given segment. + /// @param segment the memory segment + public VkExportMetalCommandQueueInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMetalCommandQueueInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalCommandQueueInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalCommandQueueInfoEXT(segment); } + + /// Creates `VkExportMetalCommandQueueInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalCommandQueueInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalCommandQueueInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMetalCommandQueueInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalCommandQueueInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalCommandQueueInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMetalCommandQueueInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMetalCommandQueueInfoEXT` + public static VkExportMetalCommandQueueInfoEXT alloc(SegmentAllocator allocator) { return new VkExportMetalCommandQueueInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMetalCommandQueueInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMetalCommandQueueInfoEXT` + public static VkExportMetalCommandQueueInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkExportMetalCommandQueueInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMetalCommandQueueInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMetalCommandQueueInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMetalCommandQueueInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMetalCommandQueueInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalCommandQueueInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMetalCommandQueueInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalCommandQueueInfoEXT sType(@CType("VkStructureType") int value) { VkExportMetalCommandQueueInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMetalCommandQueueInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMetalCommandQueueInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMetalCommandQueueInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalCommandQueueInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalCommandQueueInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalCommandQueueInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalCommandQueueInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalCommandQueueInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `queue` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueue") java.lang.foreign.MemorySegment get_queue(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_queue.get(segment, 0L, index); } + /// {@return `queue`} + /// @param segment the segment of the struct + public static @CType("VkQueue") java.lang.foreign.MemorySegment get_queue(MemorySegment segment) { return VkExportMetalCommandQueueInfoEXT.get_queue(segment, 0L); } + /// {@return `queue` at the given index} + /// @param index the index + public @CType("VkQueue") java.lang.foreign.MemorySegment queueAt(long index) { return VkExportMetalCommandQueueInfoEXT.get_queue(this.segment(), index); } + /// {@return `queue`} + public @CType("VkQueue") java.lang.foreign.MemorySegment queue() { return VkExportMetalCommandQueueInfoEXT.get_queue(this.segment()); } + /// Sets `queue` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queue(MemorySegment segment, long index, @CType("VkQueue") java.lang.foreign.MemorySegment value) { VH_queue.set(segment, 0L, index, value); } + /// Sets `queue` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queue(MemorySegment segment, @CType("VkQueue") java.lang.foreign.MemorySegment value) { VkExportMetalCommandQueueInfoEXT.set_queue(segment, 0L, value); } + /// Sets `queue` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalCommandQueueInfoEXT queueAt(long index, @CType("VkQueue") java.lang.foreign.MemorySegment value) { VkExportMetalCommandQueueInfoEXT.set_queue(this.segment(), index, value); return this; } + /// Sets `queue` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalCommandQueueInfoEXT queue(@CType("VkQueue") java.lang.foreign.MemorySegment value) { VkExportMetalCommandQueueInfoEXT.set_queue(this.segment(), value); return this; } + + /// {@return `mtlCommandQueue` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("MTLCommandQueue_id") java.lang.foreign.MemorySegment get_mtlCommandQueue(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_mtlCommandQueue.get(segment, 0L, index); } + /// {@return `mtlCommandQueue`} + /// @param segment the segment of the struct + public static @CType("MTLCommandQueue_id") java.lang.foreign.MemorySegment get_mtlCommandQueue(MemorySegment segment) { return VkExportMetalCommandQueueInfoEXT.get_mtlCommandQueue(segment, 0L); } + /// {@return `mtlCommandQueue` at the given index} + /// @param index the index + public @CType("MTLCommandQueue_id") java.lang.foreign.MemorySegment mtlCommandQueueAt(long index) { return VkExportMetalCommandQueueInfoEXT.get_mtlCommandQueue(this.segment(), index); } + /// {@return `mtlCommandQueue`} + public @CType("MTLCommandQueue_id") java.lang.foreign.MemorySegment mtlCommandQueue() { return VkExportMetalCommandQueueInfoEXT.get_mtlCommandQueue(this.segment()); } + /// Sets `mtlCommandQueue` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mtlCommandQueue(MemorySegment segment, long index, @CType("MTLCommandQueue_id") java.lang.foreign.MemorySegment value) { VH_mtlCommandQueue.set(segment, 0L, index, value); } + /// Sets `mtlCommandQueue` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mtlCommandQueue(MemorySegment segment, @CType("MTLCommandQueue_id") java.lang.foreign.MemorySegment value) { VkExportMetalCommandQueueInfoEXT.set_mtlCommandQueue(segment, 0L, value); } + /// Sets `mtlCommandQueue` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalCommandQueueInfoEXT mtlCommandQueueAt(long index, @CType("MTLCommandQueue_id") java.lang.foreign.MemorySegment value) { VkExportMetalCommandQueueInfoEXT.set_mtlCommandQueue(this.segment(), index, value); return this; } + /// Sets `mtlCommandQueue` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalCommandQueueInfoEXT mtlCommandQueue(@CType("MTLCommandQueue_id") java.lang.foreign.MemorySegment value) { VkExportMetalCommandQueueInfoEXT.set_mtlCommandQueue(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalDeviceInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalDeviceInfoEXT.java new file mode 100644 index 00000000..d0db5055 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalDeviceInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### mtlDevice +/// [VarHandle][#VH_mtlDevice] - [Getter][#mtlDevice()] - [Setter][#mtlDevice(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMetalDeviceInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// MTLDevice_id mtlDevice; +/// } VkExportMetalDeviceInfoEXT; +/// ``` +public final class VkExportMetalDeviceInfoEXT extends Struct { + /// The struct layout of `VkExportMetalDeviceInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("mtlDevice") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `mtlDevice` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_mtlDevice = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mtlDevice")); + + /// Creates `VkExportMetalDeviceInfoEXT` with the given segment. + /// @param segment the memory segment + public VkExportMetalDeviceInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMetalDeviceInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalDeviceInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalDeviceInfoEXT(segment); } + + /// Creates `VkExportMetalDeviceInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalDeviceInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalDeviceInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMetalDeviceInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalDeviceInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalDeviceInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMetalDeviceInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMetalDeviceInfoEXT` + public static VkExportMetalDeviceInfoEXT alloc(SegmentAllocator allocator) { return new VkExportMetalDeviceInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMetalDeviceInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMetalDeviceInfoEXT` + public static VkExportMetalDeviceInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkExportMetalDeviceInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMetalDeviceInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMetalDeviceInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMetalDeviceInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMetalDeviceInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalDeviceInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMetalDeviceInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalDeviceInfoEXT sType(@CType("VkStructureType") int value) { VkExportMetalDeviceInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMetalDeviceInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMetalDeviceInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMetalDeviceInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalDeviceInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalDeviceInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalDeviceInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalDeviceInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalDeviceInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `mtlDevice` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("MTLDevice_id") java.lang.foreign.MemorySegment get_mtlDevice(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_mtlDevice.get(segment, 0L, index); } + /// {@return `mtlDevice`} + /// @param segment the segment of the struct + public static @CType("MTLDevice_id") java.lang.foreign.MemorySegment get_mtlDevice(MemorySegment segment) { return VkExportMetalDeviceInfoEXT.get_mtlDevice(segment, 0L); } + /// {@return `mtlDevice` at the given index} + /// @param index the index + public @CType("MTLDevice_id") java.lang.foreign.MemorySegment mtlDeviceAt(long index) { return VkExportMetalDeviceInfoEXT.get_mtlDevice(this.segment(), index); } + /// {@return `mtlDevice`} + public @CType("MTLDevice_id") java.lang.foreign.MemorySegment mtlDevice() { return VkExportMetalDeviceInfoEXT.get_mtlDevice(this.segment()); } + /// Sets `mtlDevice` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mtlDevice(MemorySegment segment, long index, @CType("MTLDevice_id") java.lang.foreign.MemorySegment value) { VH_mtlDevice.set(segment, 0L, index, value); } + /// Sets `mtlDevice` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mtlDevice(MemorySegment segment, @CType("MTLDevice_id") java.lang.foreign.MemorySegment value) { VkExportMetalDeviceInfoEXT.set_mtlDevice(segment, 0L, value); } + /// Sets `mtlDevice` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalDeviceInfoEXT mtlDeviceAt(long index, @CType("MTLDevice_id") java.lang.foreign.MemorySegment value) { VkExportMetalDeviceInfoEXT.set_mtlDevice(this.segment(), index, value); return this; } + /// Sets `mtlDevice` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalDeviceInfoEXT mtlDevice(@CType("MTLDevice_id") java.lang.foreign.MemorySegment value) { VkExportMetalDeviceInfoEXT.set_mtlDevice(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalIOSurfaceInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalIOSurfaceInfoEXT.java new file mode 100644 index 00000000..d7df42ed --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalIOSurfaceInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### ioSurface +/// [VarHandle][#VH_ioSurface] - [Getter][#ioSurface()] - [Setter][#ioSurface(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMetalIOSurfaceInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage image; +/// IOSurfaceRef ioSurface; +/// } VkExportMetalIOSurfaceInfoEXT; +/// ``` +public final class VkExportMetalIOSurfaceInfoEXT extends Struct { + /// The struct layout of `VkExportMetalIOSurfaceInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("image"), + ValueLayout.ADDRESS.withName("ioSurface") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The [VarHandle] of `ioSurface` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_ioSurface = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ioSurface")); + + /// Creates `VkExportMetalIOSurfaceInfoEXT` with the given segment. + /// @param segment the memory segment + public VkExportMetalIOSurfaceInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMetalIOSurfaceInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalIOSurfaceInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalIOSurfaceInfoEXT(segment); } + + /// Creates `VkExportMetalIOSurfaceInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalIOSurfaceInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalIOSurfaceInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMetalIOSurfaceInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalIOSurfaceInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalIOSurfaceInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMetalIOSurfaceInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMetalIOSurfaceInfoEXT` + public static VkExportMetalIOSurfaceInfoEXT alloc(SegmentAllocator allocator) { return new VkExportMetalIOSurfaceInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMetalIOSurfaceInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMetalIOSurfaceInfoEXT` + public static VkExportMetalIOSurfaceInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkExportMetalIOSurfaceInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMetalIOSurfaceInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMetalIOSurfaceInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMetalIOSurfaceInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMetalIOSurfaceInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalIOSurfaceInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMetalIOSurfaceInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalIOSurfaceInfoEXT sType(@CType("VkStructureType") int value) { VkExportMetalIOSurfaceInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMetalIOSurfaceInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMetalIOSurfaceInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMetalIOSurfaceInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalIOSurfaceInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalIOSurfaceInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalIOSurfaceInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalIOSurfaceInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalIOSurfaceInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkExportMetalIOSurfaceInfoEXT.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkExportMetalIOSurfaceInfoEXT.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkExportMetalIOSurfaceInfoEXT.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkExportMetalIOSurfaceInfoEXT.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalIOSurfaceInfoEXT imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkExportMetalIOSurfaceInfoEXT.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalIOSurfaceInfoEXT image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkExportMetalIOSurfaceInfoEXT.set_image(this.segment(), value); return this; } + + /// {@return `ioSurface` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("IOSurfaceRef") java.lang.foreign.MemorySegment get_ioSurface(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_ioSurface.get(segment, 0L, index); } + /// {@return `ioSurface`} + /// @param segment the segment of the struct + public static @CType("IOSurfaceRef") java.lang.foreign.MemorySegment get_ioSurface(MemorySegment segment) { return VkExportMetalIOSurfaceInfoEXT.get_ioSurface(segment, 0L); } + /// {@return `ioSurface` at the given index} + /// @param index the index + public @CType("IOSurfaceRef") java.lang.foreign.MemorySegment ioSurfaceAt(long index) { return VkExportMetalIOSurfaceInfoEXT.get_ioSurface(this.segment(), index); } + /// {@return `ioSurface`} + public @CType("IOSurfaceRef") java.lang.foreign.MemorySegment ioSurface() { return VkExportMetalIOSurfaceInfoEXT.get_ioSurface(this.segment()); } + /// Sets `ioSurface` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ioSurface(MemorySegment segment, long index, @CType("IOSurfaceRef") java.lang.foreign.MemorySegment value) { VH_ioSurface.set(segment, 0L, index, value); } + /// Sets `ioSurface` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ioSurface(MemorySegment segment, @CType("IOSurfaceRef") java.lang.foreign.MemorySegment value) { VkExportMetalIOSurfaceInfoEXT.set_ioSurface(segment, 0L, value); } + /// Sets `ioSurface` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalIOSurfaceInfoEXT ioSurfaceAt(long index, @CType("IOSurfaceRef") java.lang.foreign.MemorySegment value) { VkExportMetalIOSurfaceInfoEXT.set_ioSurface(this.segment(), index, value); return this; } + /// Sets `ioSurface` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalIOSurfaceInfoEXT ioSurface(@CType("IOSurfaceRef") java.lang.foreign.MemorySegment value) { VkExportMetalIOSurfaceInfoEXT.set_ioSurface(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalObjectCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalObjectCreateInfoEXT.java new file mode 100644 index 00000000..3ea46e88 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalObjectCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### exportObjectType +/// [VarHandle][#VH_exportObjectType] - [Getter][#exportObjectType()] - [Setter][#exportObjectType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMetalObjectCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkExportMetalObjectTypeFlagBitsEXT exportObjectType; +/// } VkExportMetalObjectCreateInfoEXT; +/// ``` +public final class VkExportMetalObjectCreateInfoEXT extends Struct { + /// The struct layout of `VkExportMetalObjectCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("exportObjectType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `exportObjectType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_exportObjectType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("exportObjectType")); + + /// Creates `VkExportMetalObjectCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkExportMetalObjectCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMetalObjectCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalObjectCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalObjectCreateInfoEXT(segment); } + + /// Creates `VkExportMetalObjectCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalObjectCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalObjectCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMetalObjectCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalObjectCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalObjectCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMetalObjectCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMetalObjectCreateInfoEXT` + public static VkExportMetalObjectCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkExportMetalObjectCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMetalObjectCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMetalObjectCreateInfoEXT` + public static VkExportMetalObjectCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkExportMetalObjectCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMetalObjectCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMetalObjectCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMetalObjectCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMetalObjectCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalObjectCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMetalObjectCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalObjectCreateInfoEXT sType(@CType("VkStructureType") int value) { VkExportMetalObjectCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMetalObjectCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMetalObjectCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMetalObjectCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalObjectCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalObjectCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalObjectCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalObjectCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalObjectCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `exportObjectType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExportMetalObjectTypeFlagBitsEXT") int get_exportObjectType(MemorySegment segment, long index) { return (int) VH_exportObjectType.get(segment, 0L, index); } + /// {@return `exportObjectType`} + /// @param segment the segment of the struct + public static @CType("VkExportMetalObjectTypeFlagBitsEXT") int get_exportObjectType(MemorySegment segment) { return VkExportMetalObjectCreateInfoEXT.get_exportObjectType(segment, 0L); } + /// {@return `exportObjectType` at the given index} + /// @param index the index + public @CType("VkExportMetalObjectTypeFlagBitsEXT") int exportObjectTypeAt(long index) { return VkExportMetalObjectCreateInfoEXT.get_exportObjectType(this.segment(), index); } + /// {@return `exportObjectType`} + public @CType("VkExportMetalObjectTypeFlagBitsEXT") int exportObjectType() { return VkExportMetalObjectCreateInfoEXT.get_exportObjectType(this.segment()); } + /// Sets `exportObjectType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_exportObjectType(MemorySegment segment, long index, @CType("VkExportMetalObjectTypeFlagBitsEXT") int value) { VH_exportObjectType.set(segment, 0L, index, value); } + /// Sets `exportObjectType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_exportObjectType(MemorySegment segment, @CType("VkExportMetalObjectTypeFlagBitsEXT") int value) { VkExportMetalObjectCreateInfoEXT.set_exportObjectType(segment, 0L, value); } + /// Sets `exportObjectType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalObjectCreateInfoEXT exportObjectTypeAt(long index, @CType("VkExportMetalObjectTypeFlagBitsEXT") int value) { VkExportMetalObjectCreateInfoEXT.set_exportObjectType(this.segment(), index, value); return this; } + /// Sets `exportObjectType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalObjectCreateInfoEXT exportObjectType(@CType("VkExportMetalObjectTypeFlagBitsEXT") int value) { VkExportMetalObjectCreateInfoEXT.set_exportObjectType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalObjectsInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalObjectsInfoEXT.java new file mode 100644 index 00000000..f873173e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalObjectsInfoEXT.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMetalObjectsInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// } VkExportMetalObjectsInfoEXT; +/// ``` +public final class VkExportMetalObjectsInfoEXT extends Struct { + /// The struct layout of `VkExportMetalObjectsInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + + /// Creates `VkExportMetalObjectsInfoEXT` with the given segment. + /// @param segment the memory segment + public VkExportMetalObjectsInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMetalObjectsInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalObjectsInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalObjectsInfoEXT(segment); } + + /// Creates `VkExportMetalObjectsInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalObjectsInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalObjectsInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMetalObjectsInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalObjectsInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalObjectsInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMetalObjectsInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMetalObjectsInfoEXT` + public static VkExportMetalObjectsInfoEXT alloc(SegmentAllocator allocator) { return new VkExportMetalObjectsInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMetalObjectsInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMetalObjectsInfoEXT` + public static VkExportMetalObjectsInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkExportMetalObjectsInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMetalObjectsInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMetalObjectsInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMetalObjectsInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMetalObjectsInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalObjectsInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMetalObjectsInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalObjectsInfoEXT sType(@CType("VkStructureType") int value) { VkExportMetalObjectsInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMetalObjectsInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMetalObjectsInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMetalObjectsInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalObjectsInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalObjectsInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalObjectsInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalObjectsInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalObjectsInfoEXT.set_pNext(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalSharedEventInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalSharedEventInfoEXT.java new file mode 100644 index 00000000..1f83e8ad --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalSharedEventInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### event +/// [VarHandle][#VH_event] - [Getter][#event()] - [Setter][#event(java.lang.foreign.MemorySegment)] +/// ### mtlSharedEvent +/// [VarHandle][#VH_mtlSharedEvent] - [Getter][#mtlSharedEvent()] - [Setter][#mtlSharedEvent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMetalSharedEventInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// VkEvent event; +/// MTLSharedEvent_id mtlSharedEvent; +/// } VkExportMetalSharedEventInfoEXT; +/// ``` +public final class VkExportMetalSharedEventInfoEXT extends Struct { + /// The struct layout of `VkExportMetalSharedEventInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.ADDRESS.withName("event"), + ValueLayout.ADDRESS.withName("mtlSharedEvent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `event` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_event = LAYOUT.arrayElementVarHandle(PathElement.groupElement("event")); + /// The [VarHandle] of `mtlSharedEvent` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_mtlSharedEvent = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mtlSharedEvent")); + + /// Creates `VkExportMetalSharedEventInfoEXT` with the given segment. + /// @param segment the memory segment + public VkExportMetalSharedEventInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMetalSharedEventInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalSharedEventInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalSharedEventInfoEXT(segment); } + + /// Creates `VkExportMetalSharedEventInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalSharedEventInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalSharedEventInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMetalSharedEventInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalSharedEventInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalSharedEventInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMetalSharedEventInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMetalSharedEventInfoEXT` + public static VkExportMetalSharedEventInfoEXT alloc(SegmentAllocator allocator) { return new VkExportMetalSharedEventInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMetalSharedEventInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMetalSharedEventInfoEXT` + public static VkExportMetalSharedEventInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkExportMetalSharedEventInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMetalSharedEventInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMetalSharedEventInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMetalSharedEventInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMetalSharedEventInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalSharedEventInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMetalSharedEventInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalSharedEventInfoEXT sType(@CType("VkStructureType") int value) { VkExportMetalSharedEventInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMetalSharedEventInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMetalSharedEventInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMetalSharedEventInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalSharedEventInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalSharedEventInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkExportMetalSharedEventInfoEXT.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkExportMetalSharedEventInfoEXT.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkExportMetalSharedEventInfoEXT.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalSharedEventInfoEXT semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalSharedEventInfoEXT semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_semaphore(this.segment(), value); return this; } + + /// {@return `event` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkEvent") java.lang.foreign.MemorySegment get_event(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_event.get(segment, 0L, index); } + /// {@return `event`} + /// @param segment the segment of the struct + public static @CType("VkEvent") java.lang.foreign.MemorySegment get_event(MemorySegment segment) { return VkExportMetalSharedEventInfoEXT.get_event(segment, 0L); } + /// {@return `event` at the given index} + /// @param index the index + public @CType("VkEvent") java.lang.foreign.MemorySegment eventAt(long index) { return VkExportMetalSharedEventInfoEXT.get_event(this.segment(), index); } + /// {@return `event`} + public @CType("VkEvent") java.lang.foreign.MemorySegment event() { return VkExportMetalSharedEventInfoEXT.get_event(this.segment()); } + /// Sets `event` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_event(MemorySegment segment, long index, @CType("VkEvent") java.lang.foreign.MemorySegment value) { VH_event.set(segment, 0L, index, value); } + /// Sets `event` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_event(MemorySegment segment, @CType("VkEvent") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_event(segment, 0L, value); } + /// Sets `event` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalSharedEventInfoEXT eventAt(long index, @CType("VkEvent") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_event(this.segment(), index, value); return this; } + /// Sets `event` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalSharedEventInfoEXT event(@CType("VkEvent") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_event(this.segment(), value); return this; } + + /// {@return `mtlSharedEvent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment get_mtlSharedEvent(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_mtlSharedEvent.get(segment, 0L, index); } + /// {@return `mtlSharedEvent`} + /// @param segment the segment of the struct + public static @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment get_mtlSharedEvent(MemorySegment segment) { return VkExportMetalSharedEventInfoEXT.get_mtlSharedEvent(segment, 0L); } + /// {@return `mtlSharedEvent` at the given index} + /// @param index the index + public @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment mtlSharedEventAt(long index) { return VkExportMetalSharedEventInfoEXT.get_mtlSharedEvent(this.segment(), index); } + /// {@return `mtlSharedEvent`} + public @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment mtlSharedEvent() { return VkExportMetalSharedEventInfoEXT.get_mtlSharedEvent(this.segment()); } + /// Sets `mtlSharedEvent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mtlSharedEvent(MemorySegment segment, long index, @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment value) { VH_mtlSharedEvent.set(segment, 0L, index, value); } + /// Sets `mtlSharedEvent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mtlSharedEvent(MemorySegment segment, @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_mtlSharedEvent(segment, 0L, value); } + /// Sets `mtlSharedEvent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalSharedEventInfoEXT mtlSharedEventAt(long index, @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_mtlSharedEvent(this.segment(), index, value); return this; } + /// Sets `mtlSharedEvent` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalSharedEventInfoEXT mtlSharedEvent(@CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment value) { VkExportMetalSharedEventInfoEXT.set_mtlSharedEvent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalTextureInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalTextureInfoEXT.java new file mode 100644 index 00000000..a660b1bd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExportMetalTextureInfoEXT.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### imageView +/// [VarHandle][#VH_imageView] - [Getter][#imageView()] - [Setter][#imageView(java.lang.foreign.MemorySegment)] +/// ### bufferView +/// [VarHandle][#VH_bufferView] - [Getter][#bufferView()] - [Setter][#bufferView(java.lang.foreign.MemorySegment)] +/// ### plane +/// [VarHandle][#VH_plane] - [Getter][#plane()] - [Setter][#plane(int)] +/// ### mtlTexture +/// [VarHandle][#VH_mtlTexture] - [Getter][#mtlTexture()] - [Setter][#mtlTexture(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMetalTextureInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage image; +/// VkImageView imageView; +/// VkBufferView bufferView; +/// VkImageAspectFlagBits plane; +/// MTLTexture_id mtlTexture; +/// } VkExportMetalTextureInfoEXT; +/// ``` +public final class VkExportMetalTextureInfoEXT extends Struct { + /// The struct layout of `VkExportMetalTextureInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("image"), + ValueLayout.ADDRESS.withName("imageView"), + ValueLayout.ADDRESS.withName("bufferView"), + ValueLayout.JAVA_INT.withName("plane"), + ValueLayout.ADDRESS.withName("mtlTexture") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The [VarHandle] of `imageView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_imageView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageView")); + /// The [VarHandle] of `bufferView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_bufferView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferView")); + /// The [VarHandle] of `plane` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_plane = LAYOUT.arrayElementVarHandle(PathElement.groupElement("plane")); + /// The [VarHandle] of `mtlTexture` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_mtlTexture = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mtlTexture")); + + /// Creates `VkExportMetalTextureInfoEXT` with the given segment. + /// @param segment the memory segment + public VkExportMetalTextureInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMetalTextureInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalTextureInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalTextureInfoEXT(segment); } + + /// Creates `VkExportMetalTextureInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalTextureInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalTextureInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMetalTextureInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMetalTextureInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMetalTextureInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMetalTextureInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMetalTextureInfoEXT` + public static VkExportMetalTextureInfoEXT alloc(SegmentAllocator allocator) { return new VkExportMetalTextureInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMetalTextureInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMetalTextureInfoEXT` + public static VkExportMetalTextureInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkExportMetalTextureInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMetalTextureInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMetalTextureInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMetalTextureInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMetalTextureInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMetalTextureInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT sType(@CType("VkStructureType") int value) { VkExportMetalTextureInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMetalTextureInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMetalTextureInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMetalTextureInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkExportMetalTextureInfoEXT.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkExportMetalTextureInfoEXT.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkExportMetalTextureInfoEXT.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_image(this.segment(), value); return this; } + + /// {@return `imageView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_imageView.get(segment, 0L, index); } + /// {@return `imageView`} + /// @param segment the segment of the struct + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment) { return VkExportMetalTextureInfoEXT.get_imageView(segment, 0L); } + /// {@return `imageView` at the given index} + /// @param index the index + public @CType("VkImageView") java.lang.foreign.MemorySegment imageViewAt(long index) { return VkExportMetalTextureInfoEXT.get_imageView(this.segment(), index); } + /// {@return `imageView`} + public @CType("VkImageView") java.lang.foreign.MemorySegment imageView() { return VkExportMetalTextureInfoEXT.get_imageView(this.segment()); } + /// Sets `imageView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageView(MemorySegment segment, long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VH_imageView.set(segment, 0L, index, value); } + /// Sets `imageView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageView(MemorySegment segment, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_imageView(segment, 0L, value); } + /// Sets `imageView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT imageViewAt(long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_imageView(this.segment(), index, value); return this; } + /// Sets `imageView` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT imageView(@CType("VkImageView") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_imageView(this.segment(), value); return this; } + + /// {@return `bufferView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferView") java.lang.foreign.MemorySegment get_bufferView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_bufferView.get(segment, 0L, index); } + /// {@return `bufferView`} + /// @param segment the segment of the struct + public static @CType("VkBufferView") java.lang.foreign.MemorySegment get_bufferView(MemorySegment segment) { return VkExportMetalTextureInfoEXT.get_bufferView(segment, 0L); } + /// {@return `bufferView` at the given index} + /// @param index the index + public @CType("VkBufferView") java.lang.foreign.MemorySegment bufferViewAt(long index) { return VkExportMetalTextureInfoEXT.get_bufferView(this.segment(), index); } + /// {@return `bufferView`} + public @CType("VkBufferView") java.lang.foreign.MemorySegment bufferView() { return VkExportMetalTextureInfoEXT.get_bufferView(this.segment()); } + /// Sets `bufferView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferView(MemorySegment segment, long index, @CType("VkBufferView") java.lang.foreign.MemorySegment value) { VH_bufferView.set(segment, 0L, index, value); } + /// Sets `bufferView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferView(MemorySegment segment, @CType("VkBufferView") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_bufferView(segment, 0L, value); } + /// Sets `bufferView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT bufferViewAt(long index, @CType("VkBufferView") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_bufferView(this.segment(), index, value); return this; } + /// Sets `bufferView` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT bufferView(@CType("VkBufferView") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_bufferView(this.segment(), value); return this; } + + /// {@return `plane` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlagBits") int get_plane(MemorySegment segment, long index) { return (int) VH_plane.get(segment, 0L, index); } + /// {@return `plane`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlagBits") int get_plane(MemorySegment segment) { return VkExportMetalTextureInfoEXT.get_plane(segment, 0L); } + /// {@return `plane` at the given index} + /// @param index the index + public @CType("VkImageAspectFlagBits") int planeAt(long index) { return VkExportMetalTextureInfoEXT.get_plane(this.segment(), index); } + /// {@return `plane`} + public @CType("VkImageAspectFlagBits") int plane() { return VkExportMetalTextureInfoEXT.get_plane(this.segment()); } + /// Sets `plane` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_plane(MemorySegment segment, long index, @CType("VkImageAspectFlagBits") int value) { VH_plane.set(segment, 0L, index, value); } + /// Sets `plane` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_plane(MemorySegment segment, @CType("VkImageAspectFlagBits") int value) { VkExportMetalTextureInfoEXT.set_plane(segment, 0L, value); } + /// Sets `plane` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT planeAt(long index, @CType("VkImageAspectFlagBits") int value) { VkExportMetalTextureInfoEXT.set_plane(this.segment(), index, value); return this; } + /// Sets `plane` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT plane(@CType("VkImageAspectFlagBits") int value) { VkExportMetalTextureInfoEXT.set_plane(this.segment(), value); return this; } + + /// {@return `mtlTexture` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("MTLTexture_id") java.lang.foreign.MemorySegment get_mtlTexture(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_mtlTexture.get(segment, 0L, index); } + /// {@return `mtlTexture`} + /// @param segment the segment of the struct + public static @CType("MTLTexture_id") java.lang.foreign.MemorySegment get_mtlTexture(MemorySegment segment) { return VkExportMetalTextureInfoEXT.get_mtlTexture(segment, 0L); } + /// {@return `mtlTexture` at the given index} + /// @param index the index + public @CType("MTLTexture_id") java.lang.foreign.MemorySegment mtlTextureAt(long index) { return VkExportMetalTextureInfoEXT.get_mtlTexture(this.segment(), index); } + /// {@return `mtlTexture`} + public @CType("MTLTexture_id") java.lang.foreign.MemorySegment mtlTexture() { return VkExportMetalTextureInfoEXT.get_mtlTexture(this.segment()); } + /// Sets `mtlTexture` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mtlTexture(MemorySegment segment, long index, @CType("MTLTexture_id") java.lang.foreign.MemorySegment value) { VH_mtlTexture.set(segment, 0L, index, value); } + /// Sets `mtlTexture` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mtlTexture(MemorySegment segment, @CType("MTLTexture_id") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_mtlTexture(segment, 0L, value); } + /// Sets `mtlTexture` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT mtlTextureAt(long index, @CType("MTLTexture_id") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_mtlTexture(this.segment(), index, value); return this; } + /// Sets `mtlTexture` with the given value. + /// @param value the value + /// @return `this` + public VkExportMetalTextureInfoEXT mtlTexture(@CType("MTLTexture_id") java.lang.foreign.MemorySegment value) { VkExportMetalTextureInfoEXT.set_mtlTexture(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExternalMemoryAcquireUnmodifiedEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExternalMemoryAcquireUnmodifiedEXT.java new file mode 100644 index 00000000..9c9eba52 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkExternalMemoryAcquireUnmodifiedEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### acquireUnmodifiedMemory +/// [VarHandle][#VH_acquireUnmodifiedMemory] - [Getter][#acquireUnmodifiedMemory()] - [Setter][#acquireUnmodifiedMemory(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalMemoryAcquireUnmodifiedEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 acquireUnmodifiedMemory; +/// } VkExternalMemoryAcquireUnmodifiedEXT; +/// ``` +public final class VkExternalMemoryAcquireUnmodifiedEXT extends Struct { + /// The struct layout of `VkExternalMemoryAcquireUnmodifiedEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("acquireUnmodifiedMemory") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `acquireUnmodifiedMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_acquireUnmodifiedMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("acquireUnmodifiedMemory")); + + /// Creates `VkExternalMemoryAcquireUnmodifiedEXT` with the given segment. + /// @param segment the memory segment + public VkExternalMemoryAcquireUnmodifiedEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalMemoryAcquireUnmodifiedEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryAcquireUnmodifiedEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryAcquireUnmodifiedEXT(segment); } + + /// Creates `VkExternalMemoryAcquireUnmodifiedEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryAcquireUnmodifiedEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryAcquireUnmodifiedEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalMemoryAcquireUnmodifiedEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryAcquireUnmodifiedEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryAcquireUnmodifiedEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalMemoryAcquireUnmodifiedEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalMemoryAcquireUnmodifiedEXT` + public static VkExternalMemoryAcquireUnmodifiedEXT alloc(SegmentAllocator allocator) { return new VkExternalMemoryAcquireUnmodifiedEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalMemoryAcquireUnmodifiedEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalMemoryAcquireUnmodifiedEXT` + public static VkExternalMemoryAcquireUnmodifiedEXT alloc(SegmentAllocator allocator, long count) { return new VkExternalMemoryAcquireUnmodifiedEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExternalMemoryAcquireUnmodifiedEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExternalMemoryAcquireUnmodifiedEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExternalMemoryAcquireUnmodifiedEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExternalMemoryAcquireUnmodifiedEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryAcquireUnmodifiedEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkExternalMemoryAcquireUnmodifiedEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryAcquireUnmodifiedEXT sType(@CType("VkStructureType") int value) { VkExternalMemoryAcquireUnmodifiedEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExternalMemoryAcquireUnmodifiedEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExternalMemoryAcquireUnmodifiedEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExternalMemoryAcquireUnmodifiedEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryAcquireUnmodifiedEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryAcquireUnmodifiedEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryAcquireUnmodifiedEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryAcquireUnmodifiedEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryAcquireUnmodifiedEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `acquireUnmodifiedMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_acquireUnmodifiedMemory(MemorySegment segment, long index) { return (int) VH_acquireUnmodifiedMemory.get(segment, 0L, index); } + /// {@return `acquireUnmodifiedMemory`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_acquireUnmodifiedMemory(MemorySegment segment) { return VkExternalMemoryAcquireUnmodifiedEXT.get_acquireUnmodifiedMemory(segment, 0L); } + /// {@return `acquireUnmodifiedMemory` at the given index} + /// @param index the index + public @CType("VkBool32") int acquireUnmodifiedMemoryAt(long index) { return VkExternalMemoryAcquireUnmodifiedEXT.get_acquireUnmodifiedMemory(this.segment(), index); } + /// {@return `acquireUnmodifiedMemory`} + public @CType("VkBool32") int acquireUnmodifiedMemory() { return VkExternalMemoryAcquireUnmodifiedEXT.get_acquireUnmodifiedMemory(this.segment()); } + /// Sets `acquireUnmodifiedMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_acquireUnmodifiedMemory(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_acquireUnmodifiedMemory.set(segment, 0L, index, value); } + /// Sets `acquireUnmodifiedMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_acquireUnmodifiedMemory(MemorySegment segment, @CType("VkBool32") int value) { VkExternalMemoryAcquireUnmodifiedEXT.set_acquireUnmodifiedMemory(segment, 0L, value); } + /// Sets `acquireUnmodifiedMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryAcquireUnmodifiedEXT acquireUnmodifiedMemoryAt(long index, @CType("VkBool32") int value) { VkExternalMemoryAcquireUnmodifiedEXT.set_acquireUnmodifiedMemory(this.segment(), index, value); return this; } + /// Sets `acquireUnmodifiedMemory` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryAcquireUnmodifiedEXT acquireUnmodifiedMemory(@CType("VkBool32") int value) { VkExternalMemoryAcquireUnmodifiedEXT.set_acquireUnmodifiedMemory(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkFilterCubicImageViewImageFormatPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkFilterCubicImageViewImageFormatPropertiesEXT.java new file mode 100644 index 00000000..6ac4096e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkFilterCubicImageViewImageFormatPropertiesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### filterCubic +/// [VarHandle][#VH_filterCubic] - [Getter][#filterCubic()] - [Setter][#filterCubic(int)] +/// ### filterCubicMinmax +/// [VarHandle][#VH_filterCubicMinmax] - [Getter][#filterCubicMinmax()] - [Setter][#filterCubicMinmax(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFilterCubicImageViewImageFormatPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 filterCubic; +/// VkBool32 filterCubicMinmax; +/// } VkFilterCubicImageViewImageFormatPropertiesEXT; +/// ``` +public final class VkFilterCubicImageViewImageFormatPropertiesEXT extends Struct { + /// The struct layout of `VkFilterCubicImageViewImageFormatPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("filterCubic"), + ValueLayout.JAVA_INT.withName("filterCubicMinmax") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `filterCubic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_filterCubic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("filterCubic")); + /// The [VarHandle] of `filterCubicMinmax` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_filterCubicMinmax = LAYOUT.arrayElementVarHandle(PathElement.groupElement("filterCubicMinmax")); + + /// Creates `VkFilterCubicImageViewImageFormatPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkFilterCubicImageViewImageFormatPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFilterCubicImageViewImageFormatPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFilterCubicImageViewImageFormatPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFilterCubicImageViewImageFormatPropertiesEXT(segment); } + + /// Creates `VkFilterCubicImageViewImageFormatPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFilterCubicImageViewImageFormatPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFilterCubicImageViewImageFormatPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFilterCubicImageViewImageFormatPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFilterCubicImageViewImageFormatPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFilterCubicImageViewImageFormatPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFilterCubicImageViewImageFormatPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFilterCubicImageViewImageFormatPropertiesEXT` + public static VkFilterCubicImageViewImageFormatPropertiesEXT alloc(SegmentAllocator allocator) { return new VkFilterCubicImageViewImageFormatPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFilterCubicImageViewImageFormatPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFilterCubicImageViewImageFormatPropertiesEXT` + public static VkFilterCubicImageViewImageFormatPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkFilterCubicImageViewImageFormatPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFilterCubicImageViewImageFormatPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFilterCubicImageViewImageFormatPropertiesEXT sType(@CType("VkStructureType") int value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFilterCubicImageViewImageFormatPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFilterCubicImageViewImageFormatPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `filterCubic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_filterCubic(MemorySegment segment, long index) { return (int) VH_filterCubic.get(segment, 0L, index); } + /// {@return `filterCubic`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_filterCubic(MemorySegment segment) { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_filterCubic(segment, 0L); } + /// {@return `filterCubic` at the given index} + /// @param index the index + public @CType("VkBool32") int filterCubicAt(long index) { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_filterCubic(this.segment(), index); } + /// {@return `filterCubic`} + public @CType("VkBool32") int filterCubic() { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_filterCubic(this.segment()); } + /// Sets `filterCubic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_filterCubic(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_filterCubic.set(segment, 0L, index, value); } + /// Sets `filterCubic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_filterCubic(MemorySegment segment, @CType("VkBool32") int value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_filterCubic(segment, 0L, value); } + /// Sets `filterCubic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFilterCubicImageViewImageFormatPropertiesEXT filterCubicAt(long index, @CType("VkBool32") int value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_filterCubic(this.segment(), index, value); return this; } + /// Sets `filterCubic` with the given value. + /// @param value the value + /// @return `this` + public VkFilterCubicImageViewImageFormatPropertiesEXT filterCubic(@CType("VkBool32") int value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_filterCubic(this.segment(), value); return this; } + + /// {@return `filterCubicMinmax` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_filterCubicMinmax(MemorySegment segment, long index) { return (int) VH_filterCubicMinmax.get(segment, 0L, index); } + /// {@return `filterCubicMinmax`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_filterCubicMinmax(MemorySegment segment) { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_filterCubicMinmax(segment, 0L); } + /// {@return `filterCubicMinmax` at the given index} + /// @param index the index + public @CType("VkBool32") int filterCubicMinmaxAt(long index) { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_filterCubicMinmax(this.segment(), index); } + /// {@return `filterCubicMinmax`} + public @CType("VkBool32") int filterCubicMinmax() { return VkFilterCubicImageViewImageFormatPropertiesEXT.get_filterCubicMinmax(this.segment()); } + /// Sets `filterCubicMinmax` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_filterCubicMinmax(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_filterCubicMinmax.set(segment, 0L, index, value); } + /// Sets `filterCubicMinmax` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_filterCubicMinmax(MemorySegment segment, @CType("VkBool32") int value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_filterCubicMinmax(segment, 0L, value); } + /// Sets `filterCubicMinmax` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFilterCubicImageViewImageFormatPropertiesEXT filterCubicMinmaxAt(long index, @CType("VkBool32") int value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_filterCubicMinmax(this.segment(), index, value); return this; } + /// Sets `filterCubicMinmax` with the given value. + /// @param value the value + /// @return `this` + public VkFilterCubicImageViewImageFormatPropertiesEXT filterCubicMinmax(@CType("VkBool32") int value) { VkFilterCubicImageViewImageFormatPropertiesEXT.set_filterCubicMinmax(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkFrameBoundaryEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkFrameBoundaryEXT.java new file mode 100644 index 00000000..343d2282 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkFrameBoundaryEXT.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### frameID +/// [VarHandle][#VH_frameID] - [Getter][#frameID()] - [Setter][#frameID(long)] +/// ### imageCount +/// [VarHandle][#VH_imageCount] - [Getter][#imageCount()] - [Setter][#imageCount(int)] +/// ### pImages +/// [VarHandle][#VH_pImages] - [Getter][#pImages()] - [Setter][#pImages(java.lang.foreign.MemorySegment)] +/// ### bufferCount +/// [VarHandle][#VH_bufferCount] - [Getter][#bufferCount()] - [Setter][#bufferCount(int)] +/// ### pBuffers +/// [VarHandle][#VH_pBuffers] - [Getter][#pBuffers()] - [Setter][#pBuffers(java.lang.foreign.MemorySegment)] +/// ### tagName +/// [VarHandle][#VH_tagName] - [Getter][#tagName()] - [Setter][#tagName(long)] +/// ### tagSize +/// [VarHandle][#VH_tagSize] - [Getter][#tagSize()] - [Setter][#tagSize(long)] +/// ### pTag +/// [VarHandle][#VH_pTag] - [Getter][#pTag()] - [Setter][#pTag(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFrameBoundaryEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkFrameBoundaryFlagsEXT flags; +/// uint64_t frameID; +/// uint32_t imageCount; +/// const VkImage * pImages; +/// uint32_t bufferCount; +/// const VkBuffer * pBuffers; +/// uint64_t tagName; +/// size_t tagSize; +/// const void * pTag; +/// } VkFrameBoundaryEXT; +/// ``` +public final class VkFrameBoundaryEXT extends Struct { + /// The struct layout of `VkFrameBoundaryEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("frameID"), + ValueLayout.JAVA_INT.withName("imageCount"), + ValueLayout.ADDRESS.withName("pImages"), + ValueLayout.JAVA_INT.withName("bufferCount"), + ValueLayout.ADDRESS.withName("pBuffers"), + ValueLayout.JAVA_LONG.withName("tagName"), + ValueLayout.JAVA_LONG.withName("tagSize"), + ValueLayout.ADDRESS.withName("pTag") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `frameID` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_frameID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameID")); + /// The [VarHandle] of `imageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageCount")); + /// The [VarHandle] of `pImages` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pImages")); + /// The [VarHandle] of `bufferCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferCount")); + /// The [VarHandle] of `pBuffers` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBuffers")); + /// The [VarHandle] of `tagName` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_tagName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tagName")); + /// The [VarHandle] of `tagSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_tagSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tagSize")); + /// The [VarHandle] of `pTag` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTag")); + + /// Creates `VkFrameBoundaryEXT` with the given segment. + /// @param segment the memory segment + public VkFrameBoundaryEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFrameBoundaryEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFrameBoundaryEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFrameBoundaryEXT(segment); } + + /// Creates `VkFrameBoundaryEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFrameBoundaryEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFrameBoundaryEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFrameBoundaryEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFrameBoundaryEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFrameBoundaryEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFrameBoundaryEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFrameBoundaryEXT` + public static VkFrameBoundaryEXT alloc(SegmentAllocator allocator) { return new VkFrameBoundaryEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFrameBoundaryEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFrameBoundaryEXT` + public static VkFrameBoundaryEXT alloc(SegmentAllocator allocator, long count) { return new VkFrameBoundaryEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFrameBoundaryEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFrameBoundaryEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFrameBoundaryEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFrameBoundaryEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkFrameBoundaryEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT sType(@CType("VkStructureType") int value) { VkFrameBoundaryEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFrameBoundaryEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFrameBoundaryEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkFrameBoundaryEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFrameBoundaryFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkFrameBoundaryFlagsEXT") int get_flags(MemorySegment segment) { return VkFrameBoundaryEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkFrameBoundaryFlagsEXT") int flagsAt(long index) { return VkFrameBoundaryEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkFrameBoundaryFlagsEXT") int flags() { return VkFrameBoundaryEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkFrameBoundaryFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkFrameBoundaryFlagsEXT") int value) { VkFrameBoundaryEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT flagsAt(long index, @CType("VkFrameBoundaryFlagsEXT") int value) { VkFrameBoundaryEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT flags(@CType("VkFrameBoundaryFlagsEXT") int value) { VkFrameBoundaryEXT.set_flags(this.segment(), value); return this; } + + /// {@return `frameID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_frameID(MemorySegment segment, long index) { return (long) VH_frameID.get(segment, 0L, index); } + /// {@return `frameID`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_frameID(MemorySegment segment) { return VkFrameBoundaryEXT.get_frameID(segment, 0L); } + /// {@return `frameID` at the given index} + /// @param index the index + public @CType("uint64_t") long frameIDAt(long index) { return VkFrameBoundaryEXT.get_frameID(this.segment(), index); } + /// {@return `frameID`} + public @CType("uint64_t") long frameID() { return VkFrameBoundaryEXT.get_frameID(this.segment()); } + /// Sets `frameID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameID(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_frameID.set(segment, 0L, index, value); } + /// Sets `frameID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameID(MemorySegment segment, @CType("uint64_t") long value) { VkFrameBoundaryEXT.set_frameID(segment, 0L, value); } + /// Sets `frameID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT frameIDAt(long index, @CType("uint64_t") long value) { VkFrameBoundaryEXT.set_frameID(this.segment(), index, value); return this; } + /// Sets `frameID` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT frameID(@CType("uint64_t") long value) { VkFrameBoundaryEXT.set_frameID(this.segment(), value); return this; } + + /// {@return `imageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_imageCount(MemorySegment segment, long index) { return (int) VH_imageCount.get(segment, 0L, index); } + /// {@return `imageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_imageCount(MemorySegment segment) { return VkFrameBoundaryEXT.get_imageCount(segment, 0L); } + /// {@return `imageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int imageCountAt(long index) { return VkFrameBoundaryEXT.get_imageCount(this.segment(), index); } + /// {@return `imageCount`} + public @CType("uint32_t") int imageCount() { return VkFrameBoundaryEXT.get_imageCount(this.segment()); } + /// Sets `imageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_imageCount.set(segment, 0L, index, value); } + /// Sets `imageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageCount(MemorySegment segment, @CType("uint32_t") int value) { VkFrameBoundaryEXT.set_imageCount(segment, 0L, value); } + /// Sets `imageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT imageCountAt(long index, @CType("uint32_t") int value) { VkFrameBoundaryEXT.set_imageCount(this.segment(), index, value); return this; } + /// Sets `imageCount` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT imageCount(@CType("uint32_t") int value) { VkFrameBoundaryEXT.set_imageCount(this.segment(), value); return this; } + + /// {@return `pImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImage *") java.lang.foreign.MemorySegment get_pImages(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pImages.get(segment, 0L, index); } + /// {@return `pImages`} + /// @param segment the segment of the struct + public static @CType("const VkImage *") java.lang.foreign.MemorySegment get_pImages(MemorySegment segment) { return VkFrameBoundaryEXT.get_pImages(segment, 0L); } + /// {@return `pImages` at the given index} + /// @param index the index + public @CType("const VkImage *") java.lang.foreign.MemorySegment pImagesAt(long index) { return VkFrameBoundaryEXT.get_pImages(this.segment(), index); } + /// {@return `pImages`} + public @CType("const VkImage *") java.lang.foreign.MemorySegment pImages() { return VkFrameBoundaryEXT.get_pImages(this.segment()); } + /// Sets `pImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pImages(MemorySegment segment, long index, @CType("const VkImage *") java.lang.foreign.MemorySegment value) { VH_pImages.set(segment, 0L, index, value); } + /// Sets `pImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pImages(MemorySegment segment, @CType("const VkImage *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pImages(segment, 0L, value); } + /// Sets `pImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT pImagesAt(long index, @CType("const VkImage *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pImages(this.segment(), index, value); return this; } + /// Sets `pImages` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT pImages(@CType("const VkImage *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pImages(this.segment(), value); return this; } + + /// {@return `bufferCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferCount(MemorySegment segment, long index) { return (int) VH_bufferCount.get(segment, 0L, index); } + /// {@return `bufferCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferCount(MemorySegment segment) { return VkFrameBoundaryEXT.get_bufferCount(segment, 0L); } + /// {@return `bufferCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferCountAt(long index) { return VkFrameBoundaryEXT.get_bufferCount(this.segment(), index); } + /// {@return `bufferCount`} + public @CType("uint32_t") int bufferCount() { return VkFrameBoundaryEXT.get_bufferCount(this.segment()); } + /// Sets `bufferCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferCount.set(segment, 0L, index, value); } + /// Sets `bufferCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferCount(MemorySegment segment, @CType("uint32_t") int value) { VkFrameBoundaryEXT.set_bufferCount(segment, 0L, value); } + /// Sets `bufferCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT bufferCountAt(long index, @CType("uint32_t") int value) { VkFrameBoundaryEXT.set_bufferCount(this.segment(), index, value); return this; } + /// Sets `bufferCount` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT bufferCount(@CType("uint32_t") int value) { VkFrameBoundaryEXT.set_bufferCount(this.segment(), value); return this; } + + /// {@return `pBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkBuffer *") java.lang.foreign.MemorySegment get_pBuffers(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBuffers.get(segment, 0L, index); } + /// {@return `pBuffers`} + /// @param segment the segment of the struct + public static @CType("const VkBuffer *") java.lang.foreign.MemorySegment get_pBuffers(MemorySegment segment) { return VkFrameBoundaryEXT.get_pBuffers(segment, 0L); } + /// {@return `pBuffers` at the given index} + /// @param index the index + public @CType("const VkBuffer *") java.lang.foreign.MemorySegment pBuffersAt(long index) { return VkFrameBoundaryEXT.get_pBuffers(this.segment(), index); } + /// {@return `pBuffers`} + public @CType("const VkBuffer *") java.lang.foreign.MemorySegment pBuffers() { return VkFrameBoundaryEXT.get_pBuffers(this.segment()); } + /// Sets `pBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBuffers(MemorySegment segment, long index, @CType("const VkBuffer *") java.lang.foreign.MemorySegment value) { VH_pBuffers.set(segment, 0L, index, value); } + /// Sets `pBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBuffers(MemorySegment segment, @CType("const VkBuffer *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pBuffers(segment, 0L, value); } + /// Sets `pBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT pBuffersAt(long index, @CType("const VkBuffer *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pBuffers(this.segment(), index, value); return this; } + /// Sets `pBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT pBuffers(@CType("const VkBuffer *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pBuffers(this.segment(), value); return this; } + + /// {@return `tagName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_tagName(MemorySegment segment, long index) { return (long) VH_tagName.get(segment, 0L, index); } + /// {@return `tagName`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_tagName(MemorySegment segment) { return VkFrameBoundaryEXT.get_tagName(segment, 0L); } + /// {@return `tagName` at the given index} + /// @param index the index + public @CType("uint64_t") long tagNameAt(long index) { return VkFrameBoundaryEXT.get_tagName(this.segment(), index); } + /// {@return `tagName`} + public @CType("uint64_t") long tagName() { return VkFrameBoundaryEXT.get_tagName(this.segment()); } + /// Sets `tagName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tagName(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_tagName.set(segment, 0L, index, value); } + /// Sets `tagName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tagName(MemorySegment segment, @CType("uint64_t") long value) { VkFrameBoundaryEXT.set_tagName(segment, 0L, value); } + /// Sets `tagName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT tagNameAt(long index, @CType("uint64_t") long value) { VkFrameBoundaryEXT.set_tagName(this.segment(), index, value); return this; } + /// Sets `tagName` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT tagName(@CType("uint64_t") long value) { VkFrameBoundaryEXT.set_tagName(this.segment(), value); return this; } + + /// {@return `tagSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_tagSize(MemorySegment segment, long index) { return (long) VH_tagSize.get(segment, 0L, index); } + /// {@return `tagSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_tagSize(MemorySegment segment) { return VkFrameBoundaryEXT.get_tagSize(segment, 0L); } + /// {@return `tagSize` at the given index} + /// @param index the index + public @CType("size_t") long tagSizeAt(long index) { return VkFrameBoundaryEXT.get_tagSize(this.segment(), index); } + /// {@return `tagSize`} + public @CType("size_t") long tagSize() { return VkFrameBoundaryEXT.get_tagSize(this.segment()); } + /// Sets `tagSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tagSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_tagSize.set(segment, 0L, index, value); } + /// Sets `tagSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tagSize(MemorySegment segment, @CType("size_t") long value) { VkFrameBoundaryEXT.set_tagSize(segment, 0L, value); } + /// Sets `tagSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT tagSizeAt(long index, @CType("size_t") long value) { VkFrameBoundaryEXT.set_tagSize(this.segment(), index, value); return this; } + /// Sets `tagSize` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT tagSize(@CType("size_t") long value) { VkFrameBoundaryEXT.set_tagSize(this.segment(), value); return this; } + + /// {@return `pTag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pTag(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTag.get(segment, 0L, index); } + /// {@return `pTag`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pTag(MemorySegment segment) { return VkFrameBoundaryEXT.get_pTag(segment, 0L); } + /// {@return `pTag` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pTagAt(long index) { return VkFrameBoundaryEXT.get_pTag(this.segment(), index); } + /// {@return `pTag`} + public @CType("const void *") java.lang.foreign.MemorySegment pTag() { return VkFrameBoundaryEXT.get_pTag(this.segment()); } + /// Sets `pTag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTag(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pTag.set(segment, 0L, index, value); } + /// Sets `pTag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTag(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pTag(segment, 0L, value); } + /// Sets `pTag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT pTagAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pTag(this.segment(), index, value); return this; } + /// Sets `pTag` with the given value. + /// @param value the value + /// @return `this` + public VkFrameBoundaryEXT pTag(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFrameBoundaryEXT.set_pTag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsInfoEXT.java new file mode 100644 index 00000000..8f580f9f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsInfoEXT.java @@ -0,0 +1,518 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderStages +/// [VarHandle][#VH_shaderStages] - [Getter][#shaderStages()] - [Setter][#shaderStages(int)] +/// ### indirectExecutionSet +/// [VarHandle][#VH_indirectExecutionSet] - [Getter][#indirectExecutionSet()] - [Setter][#indirectExecutionSet(java.lang.foreign.MemorySegment)] +/// ### indirectCommandsLayout +/// [VarHandle][#VH_indirectCommandsLayout] - [Getter][#indirectCommandsLayout()] - [Setter][#indirectCommandsLayout(java.lang.foreign.MemorySegment)] +/// ### indirectAddress +/// [VarHandle][#VH_indirectAddress] - [Getter][#indirectAddress()] - [Setter][#indirectAddress(long)] +/// ### indirectAddressSize +/// [VarHandle][#VH_indirectAddressSize] - [Getter][#indirectAddressSize()] - [Setter][#indirectAddressSize(long)] +/// ### preprocessAddress +/// [VarHandle][#VH_preprocessAddress] - [Getter][#preprocessAddress()] - [Setter][#preprocessAddress(long)] +/// ### preprocessSize +/// [VarHandle][#VH_preprocessSize] - [Getter][#preprocessSize()] - [Setter][#preprocessSize(long)] +/// ### maxSequenceCount +/// [VarHandle][#VH_maxSequenceCount] - [Getter][#maxSequenceCount()] - [Setter][#maxSequenceCount(int)] +/// ### sequenceCountAddress +/// [VarHandle][#VH_sequenceCountAddress] - [Getter][#sequenceCountAddress()] - [Setter][#sequenceCountAddress(long)] +/// ### maxDrawCount +/// [VarHandle][#VH_maxDrawCount] - [Getter][#maxDrawCount()] - [Setter][#maxDrawCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGeneratedCommandsInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkShaderStageFlags shaderStages; +/// VkIndirectExecutionSetEXT indirectExecutionSet; +/// VkIndirectCommandsLayoutEXT indirectCommandsLayout; +/// VkDeviceAddress indirectAddress; +/// VkDeviceSize indirectAddressSize; +/// VkDeviceAddress preprocessAddress; +/// VkDeviceSize preprocessSize; +/// uint32_t maxSequenceCount; +/// VkDeviceAddress sequenceCountAddress; +/// uint32_t maxDrawCount; +/// } VkGeneratedCommandsInfoEXT; +/// ``` +public final class VkGeneratedCommandsInfoEXT extends Struct { + /// The struct layout of `VkGeneratedCommandsInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderStages"), + ValueLayout.ADDRESS.withName("indirectExecutionSet"), + ValueLayout.ADDRESS.withName("indirectCommandsLayout"), + ValueLayout.JAVA_LONG.withName("indirectAddress"), + ValueLayout.JAVA_LONG.withName("indirectAddressSize"), + ValueLayout.JAVA_LONG.withName("preprocessAddress"), + ValueLayout.JAVA_LONG.withName("preprocessSize"), + ValueLayout.JAVA_INT.withName("maxSequenceCount"), + ValueLayout.JAVA_LONG.withName("sequenceCountAddress"), + ValueLayout.JAVA_INT.withName("maxDrawCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStages")); + /// The [VarHandle] of `indirectExecutionSet` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_indirectExecutionSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectExecutionSet")); + /// The [VarHandle] of `indirectCommandsLayout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_indirectCommandsLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectCommandsLayout")); + /// The [VarHandle] of `indirectAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_indirectAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectAddress")); + /// The [VarHandle] of `indirectAddressSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_indirectAddressSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectAddressSize")); + /// The [VarHandle] of `preprocessAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_preprocessAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preprocessAddress")); + /// The [VarHandle] of `preprocessSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_preprocessSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preprocessSize")); + /// The [VarHandle] of `maxSequenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSequenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSequenceCount")); + /// The [VarHandle] of `sequenceCountAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_sequenceCountAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sequenceCountAddress")); + /// The [VarHandle] of `maxDrawCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDrawCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDrawCount")); + + /// Creates `VkGeneratedCommandsInfoEXT` with the given segment. + /// @param segment the memory segment + public VkGeneratedCommandsInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGeneratedCommandsInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsInfoEXT(segment); } + + /// Creates `VkGeneratedCommandsInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGeneratedCommandsInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGeneratedCommandsInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGeneratedCommandsInfoEXT` + public static VkGeneratedCommandsInfoEXT alloc(SegmentAllocator allocator) { return new VkGeneratedCommandsInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGeneratedCommandsInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGeneratedCommandsInfoEXT` + public static VkGeneratedCommandsInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkGeneratedCommandsInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGeneratedCommandsInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGeneratedCommandsInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGeneratedCommandsInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkGeneratedCommandsInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT sType(@CType("VkStructureType") int value) { VkGeneratedCommandsInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGeneratedCommandsInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGeneratedCommandsInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_shaderStages(MemorySegment segment, long index) { return (int) VH_shaderStages.get(segment, 0L, index); } + /// {@return `shaderStages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_shaderStages(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_shaderStages(segment, 0L); } + /// {@return `shaderStages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int shaderStagesAt(long index) { return VkGeneratedCommandsInfoEXT.get_shaderStages(this.segment(), index); } + /// {@return `shaderStages`} + public @CType("VkShaderStageFlags") int shaderStages() { return VkGeneratedCommandsInfoEXT.get_shaderStages(this.segment()); } + /// Sets `shaderStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_shaderStages.set(segment, 0L, index, value); } + /// Sets `shaderStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkGeneratedCommandsInfoEXT.set_shaderStages(segment, 0L, value); } + /// Sets `shaderStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT shaderStagesAt(long index, @CType("VkShaderStageFlags") int value) { VkGeneratedCommandsInfoEXT.set_shaderStages(this.segment(), index, value); return this; } + /// Sets `shaderStages` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT shaderStages(@CType("VkShaderStageFlags") int value) { VkGeneratedCommandsInfoEXT.set_shaderStages(this.segment(), value); return this; } + + /// {@return `indirectExecutionSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment get_indirectExecutionSet(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_indirectExecutionSet.get(segment, 0L, index); } + /// {@return `indirectExecutionSet`} + /// @param segment the segment of the struct + public static @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment get_indirectExecutionSet(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_indirectExecutionSet(segment, 0L); } + /// {@return `indirectExecutionSet` at the given index} + /// @param index the index + public @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment indirectExecutionSetAt(long index) { return VkGeneratedCommandsInfoEXT.get_indirectExecutionSet(this.segment(), index); } + /// {@return `indirectExecutionSet`} + public @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment indirectExecutionSet() { return VkGeneratedCommandsInfoEXT.get_indirectExecutionSet(this.segment()); } + /// Sets `indirectExecutionSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectExecutionSet(MemorySegment segment, long index, @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment value) { VH_indirectExecutionSet.set(segment, 0L, index, value); } + /// Sets `indirectExecutionSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectExecutionSet(MemorySegment segment, @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoEXT.set_indirectExecutionSet(segment, 0L, value); } + /// Sets `indirectExecutionSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT indirectExecutionSetAt(long index, @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoEXT.set_indirectExecutionSet(this.segment(), index, value); return this; } + /// Sets `indirectExecutionSet` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT indirectExecutionSet(@CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoEXT.set_indirectExecutionSet(this.segment(), value); return this; } + + /// {@return `indirectCommandsLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment get_indirectCommandsLayout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_indirectCommandsLayout.get(segment, 0L, index); } + /// {@return `indirectCommandsLayout`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment get_indirectCommandsLayout(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_indirectCommandsLayout(segment, 0L); } + /// {@return `indirectCommandsLayout` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment indirectCommandsLayoutAt(long index) { return VkGeneratedCommandsInfoEXT.get_indirectCommandsLayout(this.segment(), index); } + /// {@return `indirectCommandsLayout`} + public @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment indirectCommandsLayout() { return VkGeneratedCommandsInfoEXT.get_indirectCommandsLayout(this.segment()); } + /// Sets `indirectCommandsLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectCommandsLayout(MemorySegment segment, long index, @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment value) { VH_indirectCommandsLayout.set(segment, 0L, index, value); } + /// Sets `indirectCommandsLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectCommandsLayout(MemorySegment segment, @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoEXT.set_indirectCommandsLayout(segment, 0L, value); } + /// Sets `indirectCommandsLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT indirectCommandsLayoutAt(long index, @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoEXT.set_indirectCommandsLayout(this.segment(), index, value); return this; } + /// Sets `indirectCommandsLayout` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT indirectCommandsLayout(@CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoEXT.set_indirectCommandsLayout(this.segment(), value); return this; } + + /// {@return `indirectAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_indirectAddress(MemorySegment segment, long index) { return (long) VH_indirectAddress.get(segment, 0L, index); } + /// {@return `indirectAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_indirectAddress(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_indirectAddress(segment, 0L); } + /// {@return `indirectAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long indirectAddressAt(long index) { return VkGeneratedCommandsInfoEXT.get_indirectAddress(this.segment(), index); } + /// {@return `indirectAddress`} + public @CType("VkDeviceAddress") long indirectAddress() { return VkGeneratedCommandsInfoEXT.get_indirectAddress(this.segment()); } + /// Sets `indirectAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_indirectAddress.set(segment, 0L, index, value); } + /// Sets `indirectAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkGeneratedCommandsInfoEXT.set_indirectAddress(segment, 0L, value); } + /// Sets `indirectAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT indirectAddressAt(long index, @CType("VkDeviceAddress") long value) { VkGeneratedCommandsInfoEXT.set_indirectAddress(this.segment(), index, value); return this; } + /// Sets `indirectAddress` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT indirectAddress(@CType("VkDeviceAddress") long value) { VkGeneratedCommandsInfoEXT.set_indirectAddress(this.segment(), value); return this; } + + /// {@return `indirectAddressSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_indirectAddressSize(MemorySegment segment, long index) { return (long) VH_indirectAddressSize.get(segment, 0L, index); } + /// {@return `indirectAddressSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_indirectAddressSize(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_indirectAddressSize(segment, 0L); } + /// {@return `indirectAddressSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long indirectAddressSizeAt(long index) { return VkGeneratedCommandsInfoEXT.get_indirectAddressSize(this.segment(), index); } + /// {@return `indirectAddressSize`} + public @CType("VkDeviceSize") long indirectAddressSize() { return VkGeneratedCommandsInfoEXT.get_indirectAddressSize(this.segment()); } + /// Sets `indirectAddressSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectAddressSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_indirectAddressSize.set(segment, 0L, index, value); } + /// Sets `indirectAddressSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectAddressSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoEXT.set_indirectAddressSize(segment, 0L, value); } + /// Sets `indirectAddressSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT indirectAddressSizeAt(long index, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoEXT.set_indirectAddressSize(this.segment(), index, value); return this; } + /// Sets `indirectAddressSize` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT indirectAddressSize(@CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoEXT.set_indirectAddressSize(this.segment(), value); return this; } + + /// {@return `preprocessAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_preprocessAddress(MemorySegment segment, long index) { return (long) VH_preprocessAddress.get(segment, 0L, index); } + /// {@return `preprocessAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_preprocessAddress(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_preprocessAddress(segment, 0L); } + /// {@return `preprocessAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long preprocessAddressAt(long index) { return VkGeneratedCommandsInfoEXT.get_preprocessAddress(this.segment(), index); } + /// {@return `preprocessAddress`} + public @CType("VkDeviceAddress") long preprocessAddress() { return VkGeneratedCommandsInfoEXT.get_preprocessAddress(this.segment()); } + /// Sets `preprocessAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preprocessAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_preprocessAddress.set(segment, 0L, index, value); } + /// Sets `preprocessAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preprocessAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkGeneratedCommandsInfoEXT.set_preprocessAddress(segment, 0L, value); } + /// Sets `preprocessAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT preprocessAddressAt(long index, @CType("VkDeviceAddress") long value) { VkGeneratedCommandsInfoEXT.set_preprocessAddress(this.segment(), index, value); return this; } + /// Sets `preprocessAddress` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT preprocessAddress(@CType("VkDeviceAddress") long value) { VkGeneratedCommandsInfoEXT.set_preprocessAddress(this.segment(), value); return this; } + + /// {@return `preprocessSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_preprocessSize(MemorySegment segment, long index) { return (long) VH_preprocessSize.get(segment, 0L, index); } + /// {@return `preprocessSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_preprocessSize(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_preprocessSize(segment, 0L); } + /// {@return `preprocessSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long preprocessSizeAt(long index) { return VkGeneratedCommandsInfoEXT.get_preprocessSize(this.segment(), index); } + /// {@return `preprocessSize`} + public @CType("VkDeviceSize") long preprocessSize() { return VkGeneratedCommandsInfoEXT.get_preprocessSize(this.segment()); } + /// Sets `preprocessSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preprocessSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_preprocessSize.set(segment, 0L, index, value); } + /// Sets `preprocessSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preprocessSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoEXT.set_preprocessSize(segment, 0L, value); } + /// Sets `preprocessSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT preprocessSizeAt(long index, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoEXT.set_preprocessSize(this.segment(), index, value); return this; } + /// Sets `preprocessSize` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT preprocessSize(@CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoEXT.set_preprocessSize(this.segment(), value); return this; } + + /// {@return `maxSequenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSequenceCount(MemorySegment segment, long index) { return (int) VH_maxSequenceCount.get(segment, 0L, index); } + /// {@return `maxSequenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSequenceCount(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_maxSequenceCount(segment, 0L); } + /// {@return `maxSequenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSequenceCountAt(long index) { return VkGeneratedCommandsInfoEXT.get_maxSequenceCount(this.segment(), index); } + /// {@return `maxSequenceCount`} + public @CType("uint32_t") int maxSequenceCount() { return VkGeneratedCommandsInfoEXT.get_maxSequenceCount(this.segment()); } + /// Sets `maxSequenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSequenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSequenceCount.set(segment, 0L, index, value); } + /// Sets `maxSequenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSequenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkGeneratedCommandsInfoEXT.set_maxSequenceCount(segment, 0L, value); } + /// Sets `maxSequenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT maxSequenceCountAt(long index, @CType("uint32_t") int value) { VkGeneratedCommandsInfoEXT.set_maxSequenceCount(this.segment(), index, value); return this; } + /// Sets `maxSequenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT maxSequenceCount(@CType("uint32_t") int value) { VkGeneratedCommandsInfoEXT.set_maxSequenceCount(this.segment(), value); return this; } + + /// {@return `sequenceCountAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_sequenceCountAddress(MemorySegment segment, long index) { return (long) VH_sequenceCountAddress.get(segment, 0L, index); } + /// {@return `sequenceCountAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_sequenceCountAddress(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_sequenceCountAddress(segment, 0L); } + /// {@return `sequenceCountAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long sequenceCountAddressAt(long index) { return VkGeneratedCommandsInfoEXT.get_sequenceCountAddress(this.segment(), index); } + /// {@return `sequenceCountAddress`} + public @CType("VkDeviceAddress") long sequenceCountAddress() { return VkGeneratedCommandsInfoEXT.get_sequenceCountAddress(this.segment()); } + /// Sets `sequenceCountAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sequenceCountAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_sequenceCountAddress.set(segment, 0L, index, value); } + /// Sets `sequenceCountAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sequenceCountAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkGeneratedCommandsInfoEXT.set_sequenceCountAddress(segment, 0L, value); } + /// Sets `sequenceCountAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT sequenceCountAddressAt(long index, @CType("VkDeviceAddress") long value) { VkGeneratedCommandsInfoEXT.set_sequenceCountAddress(this.segment(), index, value); return this; } + /// Sets `sequenceCountAddress` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT sequenceCountAddress(@CType("VkDeviceAddress") long value) { VkGeneratedCommandsInfoEXT.set_sequenceCountAddress(this.segment(), value); return this; } + + /// {@return `maxDrawCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDrawCount(MemorySegment segment, long index) { return (int) VH_maxDrawCount.get(segment, 0L, index); } + /// {@return `maxDrawCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDrawCount(MemorySegment segment) { return VkGeneratedCommandsInfoEXT.get_maxDrawCount(segment, 0L); } + /// {@return `maxDrawCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDrawCountAt(long index) { return VkGeneratedCommandsInfoEXT.get_maxDrawCount(this.segment(), index); } + /// {@return `maxDrawCount`} + public @CType("uint32_t") int maxDrawCount() { return VkGeneratedCommandsInfoEXT.get_maxDrawCount(this.segment()); } + /// Sets `maxDrawCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDrawCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDrawCount.set(segment, 0L, index, value); } + /// Sets `maxDrawCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDrawCount(MemorySegment segment, @CType("uint32_t") int value) { VkGeneratedCommandsInfoEXT.set_maxDrawCount(segment, 0L, value); } + /// Sets `maxDrawCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT maxDrawCountAt(long index, @CType("uint32_t") int value) { VkGeneratedCommandsInfoEXT.set_maxDrawCount(this.segment(), index, value); return this; } + /// Sets `maxDrawCount` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoEXT maxDrawCount(@CType("uint32_t") int value) { VkGeneratedCommandsInfoEXT.set_maxDrawCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsMemoryRequirementsInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsMemoryRequirementsInfoEXT.java new file mode 100644 index 00000000..858230dd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsMemoryRequirementsInfoEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### indirectExecutionSet +/// [VarHandle][#VH_indirectExecutionSet] - [Getter][#indirectExecutionSet()] - [Setter][#indirectExecutionSet(java.lang.foreign.MemorySegment)] +/// ### indirectCommandsLayout +/// [VarHandle][#VH_indirectCommandsLayout] - [Getter][#indirectCommandsLayout()] - [Setter][#indirectCommandsLayout(java.lang.foreign.MemorySegment)] +/// ### maxSequenceCount +/// [VarHandle][#VH_maxSequenceCount] - [Getter][#maxSequenceCount()] - [Setter][#maxSequenceCount(int)] +/// ### maxDrawCount +/// [VarHandle][#VH_maxDrawCount] - [Getter][#maxDrawCount()] - [Setter][#maxDrawCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGeneratedCommandsMemoryRequirementsInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkIndirectExecutionSetEXT indirectExecutionSet; +/// VkIndirectCommandsLayoutEXT indirectCommandsLayout; +/// uint32_t maxSequenceCount; +/// uint32_t maxDrawCount; +/// } VkGeneratedCommandsMemoryRequirementsInfoEXT; +/// ``` +public final class VkGeneratedCommandsMemoryRequirementsInfoEXT extends Struct { + /// The struct layout of `VkGeneratedCommandsMemoryRequirementsInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("indirectExecutionSet"), + ValueLayout.ADDRESS.withName("indirectCommandsLayout"), + ValueLayout.JAVA_INT.withName("maxSequenceCount"), + ValueLayout.JAVA_INT.withName("maxDrawCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `indirectExecutionSet` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_indirectExecutionSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectExecutionSet")); + /// The [VarHandle] of `indirectCommandsLayout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_indirectCommandsLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectCommandsLayout")); + /// The [VarHandle] of `maxSequenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSequenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSequenceCount")); + /// The [VarHandle] of `maxDrawCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDrawCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDrawCount")); + + /// Creates `VkGeneratedCommandsMemoryRequirementsInfoEXT` with the given segment. + /// @param segment the memory segment + public VkGeneratedCommandsMemoryRequirementsInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGeneratedCommandsMemoryRequirementsInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsMemoryRequirementsInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsMemoryRequirementsInfoEXT(segment); } + + /// Creates `VkGeneratedCommandsMemoryRequirementsInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsMemoryRequirementsInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsMemoryRequirementsInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGeneratedCommandsMemoryRequirementsInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsMemoryRequirementsInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsMemoryRequirementsInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGeneratedCommandsMemoryRequirementsInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGeneratedCommandsMemoryRequirementsInfoEXT` + public static VkGeneratedCommandsMemoryRequirementsInfoEXT alloc(SegmentAllocator allocator) { return new VkGeneratedCommandsMemoryRequirementsInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGeneratedCommandsMemoryRequirementsInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGeneratedCommandsMemoryRequirementsInfoEXT` + public static VkGeneratedCommandsMemoryRequirementsInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkGeneratedCommandsMemoryRequirementsInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT sType(@CType("VkStructureType") int value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `indirectExecutionSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment get_indirectExecutionSet(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_indirectExecutionSet.get(segment, 0L, index); } + /// {@return `indirectExecutionSet`} + /// @param segment the segment of the struct + public static @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment get_indirectExecutionSet(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_indirectExecutionSet(segment, 0L); } + /// {@return `indirectExecutionSet` at the given index} + /// @param index the index + public @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment indirectExecutionSetAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_indirectExecutionSet(this.segment(), index); } + /// {@return `indirectExecutionSet`} + public @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment indirectExecutionSet() { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_indirectExecutionSet(this.segment()); } + /// Sets `indirectExecutionSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectExecutionSet(MemorySegment segment, long index, @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment value) { VH_indirectExecutionSet.set(segment, 0L, index, value); } + /// Sets `indirectExecutionSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectExecutionSet(MemorySegment segment, @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_indirectExecutionSet(segment, 0L, value); } + /// Sets `indirectExecutionSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT indirectExecutionSetAt(long index, @CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_indirectExecutionSet(this.segment(), index, value); return this; } + /// Sets `indirectExecutionSet` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT indirectExecutionSet(@CType("VkIndirectExecutionSetEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_indirectExecutionSet(this.segment(), value); return this; } + + /// {@return `indirectCommandsLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment get_indirectCommandsLayout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_indirectCommandsLayout.get(segment, 0L, index); } + /// {@return `indirectCommandsLayout`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment get_indirectCommandsLayout(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_indirectCommandsLayout(segment, 0L); } + /// {@return `indirectCommandsLayout` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment indirectCommandsLayoutAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_indirectCommandsLayout(this.segment(), index); } + /// {@return `indirectCommandsLayout`} + public @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment indirectCommandsLayout() { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_indirectCommandsLayout(this.segment()); } + /// Sets `indirectCommandsLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectCommandsLayout(MemorySegment segment, long index, @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment value) { VH_indirectCommandsLayout.set(segment, 0L, index, value); } + /// Sets `indirectCommandsLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectCommandsLayout(MemorySegment segment, @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_indirectCommandsLayout(segment, 0L, value); } + /// Sets `indirectCommandsLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT indirectCommandsLayoutAt(long index, @CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_indirectCommandsLayout(this.segment(), index, value); return this; } + /// Sets `indirectCommandsLayout` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT indirectCommandsLayout(@CType("VkIndirectCommandsLayoutEXT") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_indirectCommandsLayout(this.segment(), value); return this; } + + /// {@return `maxSequenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSequenceCount(MemorySegment segment, long index) { return (int) VH_maxSequenceCount.get(segment, 0L, index); } + /// {@return `maxSequenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSequenceCount(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_maxSequenceCount(segment, 0L); } + /// {@return `maxSequenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSequenceCountAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_maxSequenceCount(this.segment(), index); } + /// {@return `maxSequenceCount`} + public @CType("uint32_t") int maxSequenceCount() { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_maxSequenceCount(this.segment()); } + /// Sets `maxSequenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSequenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSequenceCount.set(segment, 0L, index, value); } + /// Sets `maxSequenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSequenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_maxSequenceCount(segment, 0L, value); } + /// Sets `maxSequenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT maxSequenceCountAt(long index, @CType("uint32_t") int value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_maxSequenceCount(this.segment(), index, value); return this; } + /// Sets `maxSequenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT maxSequenceCount(@CType("uint32_t") int value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_maxSequenceCount(this.segment(), value); return this; } + + /// {@return `maxDrawCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDrawCount(MemorySegment segment, long index) { return (int) VH_maxDrawCount.get(segment, 0L, index); } + /// {@return `maxDrawCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDrawCount(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_maxDrawCount(segment, 0L); } + /// {@return `maxDrawCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDrawCountAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_maxDrawCount(this.segment(), index); } + /// {@return `maxDrawCount`} + public @CType("uint32_t") int maxDrawCount() { return VkGeneratedCommandsMemoryRequirementsInfoEXT.get_maxDrawCount(this.segment()); } + /// Sets `maxDrawCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDrawCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDrawCount.set(segment, 0L, index, value); } + /// Sets `maxDrawCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDrawCount(MemorySegment segment, @CType("uint32_t") int value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_maxDrawCount(segment, 0L, value); } + /// Sets `maxDrawCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT maxDrawCountAt(long index, @CType("uint32_t") int value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_maxDrawCount(this.segment(), index, value); return this; } + /// Sets `maxDrawCount` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoEXT maxDrawCount(@CType("uint32_t") int value) { VkGeneratedCommandsMemoryRequirementsInfoEXT.set_maxDrawCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsPipelineInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsPipelineInfoEXT.java new file mode 100644 index 00000000..267e7004 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsPipelineInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipeline +/// [VarHandle][#VH_pipeline] - [Getter][#pipeline()] - [Setter][#pipeline(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGeneratedCommandsPipelineInfoEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkPipeline pipeline; +/// } VkGeneratedCommandsPipelineInfoEXT; +/// ``` +public final class VkGeneratedCommandsPipelineInfoEXT extends Struct { + /// The struct layout of `VkGeneratedCommandsPipelineInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pipeline") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipeline` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipeline")); + + /// Creates `VkGeneratedCommandsPipelineInfoEXT` with the given segment. + /// @param segment the memory segment + public VkGeneratedCommandsPipelineInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGeneratedCommandsPipelineInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsPipelineInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsPipelineInfoEXT(segment); } + + /// Creates `VkGeneratedCommandsPipelineInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsPipelineInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsPipelineInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGeneratedCommandsPipelineInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsPipelineInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsPipelineInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGeneratedCommandsPipelineInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGeneratedCommandsPipelineInfoEXT` + public static VkGeneratedCommandsPipelineInfoEXT alloc(SegmentAllocator allocator) { return new VkGeneratedCommandsPipelineInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGeneratedCommandsPipelineInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGeneratedCommandsPipelineInfoEXT` + public static VkGeneratedCommandsPipelineInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkGeneratedCommandsPipelineInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGeneratedCommandsPipelineInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGeneratedCommandsPipelineInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGeneratedCommandsPipelineInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGeneratedCommandsPipelineInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsPipelineInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkGeneratedCommandsPipelineInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsPipelineInfoEXT sType(@CType("VkStructureType") int value) { VkGeneratedCommandsPipelineInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGeneratedCommandsPipelineInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGeneratedCommandsPipelineInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkGeneratedCommandsPipelineInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsPipelineInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsPipelineInfoEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsPipelineInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsPipelineInfoEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsPipelineInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipeline.get(segment, 0L, index); } + /// {@return `pipeline`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment) { return VkGeneratedCommandsPipelineInfoEXT.get_pipeline(segment, 0L); } + /// {@return `pipeline` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipelineAt(long index) { return VkGeneratedCommandsPipelineInfoEXT.get_pipeline(this.segment(), index); } + /// {@return `pipeline`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipeline() { return VkGeneratedCommandsPipelineInfoEXT.get_pipeline(this.segment()); } + /// Sets `pipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipeline(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_pipeline.set(segment, 0L, index, value); } + /// Sets `pipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipeline(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsPipelineInfoEXT.set_pipeline(segment, 0L, value); } + /// Sets `pipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsPipelineInfoEXT pipelineAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsPipelineInfoEXT.set_pipeline(this.segment(), index, value); return this; } + /// Sets `pipeline` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsPipelineInfoEXT pipeline(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsPipelineInfoEXT.set_pipeline(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsShaderInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsShaderInfoEXT.java new file mode 100644 index 00000000..3d9ab4f6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGeneratedCommandsShaderInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderCount +/// [VarHandle][#VH_shaderCount] - [Getter][#shaderCount()] - [Setter][#shaderCount(int)] +/// ### pShaders +/// [VarHandle][#VH_pShaders] - [Getter][#pShaders()] - [Setter][#pShaders(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGeneratedCommandsShaderInfoEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t shaderCount; +/// const VkShaderEXT * pShaders; +/// } VkGeneratedCommandsShaderInfoEXT; +/// ``` +public final class VkGeneratedCommandsShaderInfoEXT extends Struct { + /// The struct layout of `VkGeneratedCommandsShaderInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderCount"), + ValueLayout.ADDRESS.withName("pShaders") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderCount")); + /// The [VarHandle] of `pShaders` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pShaders = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pShaders")); + + /// Creates `VkGeneratedCommandsShaderInfoEXT` with the given segment. + /// @param segment the memory segment + public VkGeneratedCommandsShaderInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGeneratedCommandsShaderInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsShaderInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsShaderInfoEXT(segment); } + + /// Creates `VkGeneratedCommandsShaderInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsShaderInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsShaderInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGeneratedCommandsShaderInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsShaderInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsShaderInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGeneratedCommandsShaderInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGeneratedCommandsShaderInfoEXT` + public static VkGeneratedCommandsShaderInfoEXT alloc(SegmentAllocator allocator) { return new VkGeneratedCommandsShaderInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGeneratedCommandsShaderInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGeneratedCommandsShaderInfoEXT` + public static VkGeneratedCommandsShaderInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkGeneratedCommandsShaderInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGeneratedCommandsShaderInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGeneratedCommandsShaderInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGeneratedCommandsShaderInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGeneratedCommandsShaderInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsShaderInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkGeneratedCommandsShaderInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsShaderInfoEXT sType(@CType("VkStructureType") int value) { VkGeneratedCommandsShaderInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGeneratedCommandsShaderInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGeneratedCommandsShaderInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkGeneratedCommandsShaderInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsShaderInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsShaderInfoEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsShaderInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsShaderInfoEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsShaderInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderCount(MemorySegment segment, long index) { return (int) VH_shaderCount.get(segment, 0L, index); } + /// {@return `shaderCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderCount(MemorySegment segment) { return VkGeneratedCommandsShaderInfoEXT.get_shaderCount(segment, 0L); } + /// {@return `shaderCount` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderCountAt(long index) { return VkGeneratedCommandsShaderInfoEXT.get_shaderCount(this.segment(), index); } + /// {@return `shaderCount`} + public @CType("uint32_t") int shaderCount() { return VkGeneratedCommandsShaderInfoEXT.get_shaderCount(this.segment()); } + /// Sets `shaderCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderCount.set(segment, 0L, index, value); } + /// Sets `shaderCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderCount(MemorySegment segment, @CType("uint32_t") int value) { VkGeneratedCommandsShaderInfoEXT.set_shaderCount(segment, 0L, value); } + /// Sets `shaderCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsShaderInfoEXT shaderCountAt(long index, @CType("uint32_t") int value) { VkGeneratedCommandsShaderInfoEXT.set_shaderCount(this.segment(), index, value); return this; } + /// Sets `shaderCount` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsShaderInfoEXT shaderCount(@CType("uint32_t") int value) { VkGeneratedCommandsShaderInfoEXT.set_shaderCount(this.segment(), value); return this; } + + /// {@return `pShaders` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment get_pShaders(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pShaders.get(segment, 0L, index); } + /// {@return `pShaders`} + /// @param segment the segment of the struct + public static @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment get_pShaders(MemorySegment segment) { return VkGeneratedCommandsShaderInfoEXT.get_pShaders(segment, 0L); } + /// {@return `pShaders` at the given index} + /// @param index the index + public @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment pShadersAt(long index) { return VkGeneratedCommandsShaderInfoEXT.get_pShaders(this.segment(), index); } + /// {@return `pShaders`} + public @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment pShaders() { return VkGeneratedCommandsShaderInfoEXT.get_pShaders(this.segment()); } + /// Sets `pShaders` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pShaders(MemorySegment segment, long index, @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment value) { VH_pShaders.set(segment, 0L, index, value); } + /// Sets `pShaders` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pShaders(MemorySegment segment, @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsShaderInfoEXT.set_pShaders(segment, 0L, value); } + /// Sets `pShaders` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsShaderInfoEXT pShadersAt(long index, @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsShaderInfoEXT.set_pShaders(this.segment(), index, value); return this; } + /// Sets `pShaders` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsShaderInfoEXT pShaders(@CType("const VkShaderEXT *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsShaderInfoEXT.set_pShaders(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGraphicsPipelineLibraryCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGraphicsPipelineLibraryCreateInfoEXT.java new file mode 100644 index 00000000..636b3179 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkGraphicsPipelineLibraryCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGraphicsPipelineLibraryCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkGraphicsPipelineLibraryFlagsEXT flags; +/// } VkGraphicsPipelineLibraryCreateInfoEXT; +/// ``` +public final class VkGraphicsPipelineLibraryCreateInfoEXT extends Struct { + /// The struct layout of `VkGraphicsPipelineLibraryCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkGraphicsPipelineLibraryCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkGraphicsPipelineLibraryCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGraphicsPipelineLibraryCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsPipelineLibraryCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsPipelineLibraryCreateInfoEXT(segment); } + + /// Creates `VkGraphicsPipelineLibraryCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsPipelineLibraryCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsPipelineLibraryCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGraphicsPipelineLibraryCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsPipelineLibraryCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsPipelineLibraryCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGraphicsPipelineLibraryCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGraphicsPipelineLibraryCreateInfoEXT` + public static VkGraphicsPipelineLibraryCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkGraphicsPipelineLibraryCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGraphicsPipelineLibraryCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGraphicsPipelineLibraryCreateInfoEXT` + public static VkGraphicsPipelineLibraryCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkGraphicsPipelineLibraryCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGraphicsPipelineLibraryCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGraphicsPipelineLibraryCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGraphicsPipelineLibraryCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGraphicsPipelineLibraryCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineLibraryCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkGraphicsPipelineLibraryCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineLibraryCreateInfoEXT sType(@CType("VkStructureType") int value) { VkGraphicsPipelineLibraryCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGraphicsPipelineLibraryCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGraphicsPipelineLibraryCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGraphicsPipelineLibraryCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineLibraryCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineLibraryCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineLibraryCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineLibraryCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineLibraryCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGraphicsPipelineLibraryFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkGraphicsPipelineLibraryFlagsEXT") int get_flags(MemorySegment segment) { return VkGraphicsPipelineLibraryCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkGraphicsPipelineLibraryFlagsEXT") int flagsAt(long index) { return VkGraphicsPipelineLibraryCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkGraphicsPipelineLibraryFlagsEXT") int flags() { return VkGraphicsPipelineLibraryCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkGraphicsPipelineLibraryFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkGraphicsPipelineLibraryFlagsEXT") int value) { VkGraphicsPipelineLibraryCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineLibraryCreateInfoEXT flagsAt(long index, @CType("VkGraphicsPipelineLibraryFlagsEXT") int value) { VkGraphicsPipelineLibraryCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineLibraryCreateInfoEXT flags(@CType("VkGraphicsPipelineLibraryFlagsEXT") int value) { VkGraphicsPipelineLibraryCreateInfoEXT.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkHdrMetadataEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkHdrMetadataEXT.java new file mode 100644 index 00000000..035b4fba --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkHdrMetadataEXT.java @@ -0,0 +1,452 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### displayPrimaryRed +/// [Byte offset][#OFFSET_displayPrimaryRed] - [Memory layout][#ML_displayPrimaryRed] - [Getter][#displayPrimaryRed()] - [Setter][#displayPrimaryRed(java.lang.foreign.MemorySegment)] +/// ### displayPrimaryGreen +/// [Byte offset][#OFFSET_displayPrimaryGreen] - [Memory layout][#ML_displayPrimaryGreen] - [Getter][#displayPrimaryGreen()] - [Setter][#displayPrimaryGreen(java.lang.foreign.MemorySegment)] +/// ### displayPrimaryBlue +/// [Byte offset][#OFFSET_displayPrimaryBlue] - [Memory layout][#ML_displayPrimaryBlue] - [Getter][#displayPrimaryBlue()] - [Setter][#displayPrimaryBlue(java.lang.foreign.MemorySegment)] +/// ### whitePoint +/// [Byte offset][#OFFSET_whitePoint] - [Memory layout][#ML_whitePoint] - [Getter][#whitePoint()] - [Setter][#whitePoint(java.lang.foreign.MemorySegment)] +/// ### maxLuminance +/// [VarHandle][#VH_maxLuminance] - [Getter][#maxLuminance()] - [Setter][#maxLuminance(float)] +/// ### minLuminance +/// [VarHandle][#VH_minLuminance] - [Getter][#minLuminance()] - [Setter][#minLuminance(float)] +/// ### maxContentLightLevel +/// [VarHandle][#VH_maxContentLightLevel] - [Getter][#maxContentLightLevel()] - [Setter][#maxContentLightLevel(float)] +/// ### maxFrameAverageLightLevel +/// [VarHandle][#VH_maxFrameAverageLightLevel] - [Getter][#maxFrameAverageLightLevel()] - [Setter][#maxFrameAverageLightLevel(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkHdrMetadataEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkXYColorEXT displayPrimaryRed; +/// VkXYColorEXT displayPrimaryGreen; +/// VkXYColorEXT displayPrimaryBlue; +/// VkXYColorEXT whitePoint; +/// float maxLuminance; +/// float minLuminance; +/// float maxContentLightLevel; +/// float maxFrameAverageLightLevel; +/// } VkHdrMetadataEXT; +/// ``` +public final class VkHdrMetadataEXT extends Struct { + /// The struct layout of `VkHdrMetadataEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.ext.struct.VkXYColorEXT.LAYOUT.withName("displayPrimaryRed"), + overrungl.vulkan.ext.struct.VkXYColorEXT.LAYOUT.withName("displayPrimaryGreen"), + overrungl.vulkan.ext.struct.VkXYColorEXT.LAYOUT.withName("displayPrimaryBlue"), + overrungl.vulkan.ext.struct.VkXYColorEXT.LAYOUT.withName("whitePoint"), + ValueLayout.JAVA_FLOAT.withName("maxLuminance"), + ValueLayout.JAVA_FLOAT.withName("minLuminance"), + ValueLayout.JAVA_FLOAT.withName("maxContentLightLevel"), + ValueLayout.JAVA_FLOAT.withName("maxFrameAverageLightLevel") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `displayPrimaryRed`. + public static final long OFFSET_displayPrimaryRed = LAYOUT.byteOffset(PathElement.groupElement("displayPrimaryRed")); + /// The memory layout of `displayPrimaryRed`. + public static final MemoryLayout ML_displayPrimaryRed = LAYOUT.select(PathElement.groupElement("displayPrimaryRed")); + /// The byte offset of `displayPrimaryGreen`. + public static final long OFFSET_displayPrimaryGreen = LAYOUT.byteOffset(PathElement.groupElement("displayPrimaryGreen")); + /// The memory layout of `displayPrimaryGreen`. + public static final MemoryLayout ML_displayPrimaryGreen = LAYOUT.select(PathElement.groupElement("displayPrimaryGreen")); + /// The byte offset of `displayPrimaryBlue`. + public static final long OFFSET_displayPrimaryBlue = LAYOUT.byteOffset(PathElement.groupElement("displayPrimaryBlue")); + /// The memory layout of `displayPrimaryBlue`. + public static final MemoryLayout ML_displayPrimaryBlue = LAYOUT.select(PathElement.groupElement("displayPrimaryBlue")); + /// The byte offset of `whitePoint`. + public static final long OFFSET_whitePoint = LAYOUT.byteOffset(PathElement.groupElement("whitePoint")); + /// The memory layout of `whitePoint`. + public static final MemoryLayout ML_whitePoint = LAYOUT.select(PathElement.groupElement("whitePoint")); + /// The [VarHandle] of `maxLuminance` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxLuminance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLuminance")); + /// The [VarHandle] of `minLuminance` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minLuminance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minLuminance")); + /// The [VarHandle] of `maxContentLightLevel` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxContentLightLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxContentLightLevel")); + /// The [VarHandle] of `maxFrameAverageLightLevel` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxFrameAverageLightLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFrameAverageLightLevel")); + + /// Creates `VkHdrMetadataEXT` with the given segment. + /// @param segment the memory segment + public VkHdrMetadataEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkHdrMetadataEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkHdrMetadataEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkHdrMetadataEXT(segment); } + + /// Creates `VkHdrMetadataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkHdrMetadataEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkHdrMetadataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkHdrMetadataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkHdrMetadataEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkHdrMetadataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkHdrMetadataEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkHdrMetadataEXT` + public static VkHdrMetadataEXT alloc(SegmentAllocator allocator) { return new VkHdrMetadataEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkHdrMetadataEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkHdrMetadataEXT` + public static VkHdrMetadataEXT alloc(SegmentAllocator allocator, long count) { return new VkHdrMetadataEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkHdrMetadataEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkHdrMetadataEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkHdrMetadataEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkHdrMetadataEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkHdrMetadataEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT sType(@CType("VkStructureType") int value) { VkHdrMetadataEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkHdrMetadataEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkHdrMetadataEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkHdrMetadataEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `displayPrimaryRed` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkXYColorEXT") java.lang.foreign.MemorySegment get_displayPrimaryRed(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_displayPrimaryRed, index), ML_displayPrimaryRed); } + /// {@return `displayPrimaryRed`} + /// @param segment the segment of the struct + public static @CType("VkXYColorEXT") java.lang.foreign.MemorySegment get_displayPrimaryRed(MemorySegment segment) { return VkHdrMetadataEXT.get_displayPrimaryRed(segment, 0L); } + /// {@return `displayPrimaryRed` at the given index} + /// @param index the index + public @CType("VkXYColorEXT") java.lang.foreign.MemorySegment displayPrimaryRedAt(long index) { return VkHdrMetadataEXT.get_displayPrimaryRed(this.segment(), index); } + /// {@return `displayPrimaryRed`} + public @CType("VkXYColorEXT") java.lang.foreign.MemorySegment displayPrimaryRed() { return VkHdrMetadataEXT.get_displayPrimaryRed(this.segment()); } + /// Sets `displayPrimaryRed` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayPrimaryRed(MemorySegment segment, long index, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_displayPrimaryRed, index), ML_displayPrimaryRed.byteSize()); } + /// Sets `displayPrimaryRed` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayPrimaryRed(MemorySegment segment, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_displayPrimaryRed(segment, 0L, value); } + /// Sets `displayPrimaryRed` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT displayPrimaryRedAt(long index, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_displayPrimaryRed(this.segment(), index, value); return this; } + /// Sets `displayPrimaryRed` with the given value. + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT displayPrimaryRed(@CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_displayPrimaryRed(this.segment(), value); return this; } + + /// {@return `displayPrimaryGreen` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkXYColorEXT") java.lang.foreign.MemorySegment get_displayPrimaryGreen(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_displayPrimaryGreen, index), ML_displayPrimaryGreen); } + /// {@return `displayPrimaryGreen`} + /// @param segment the segment of the struct + public static @CType("VkXYColorEXT") java.lang.foreign.MemorySegment get_displayPrimaryGreen(MemorySegment segment) { return VkHdrMetadataEXT.get_displayPrimaryGreen(segment, 0L); } + /// {@return `displayPrimaryGreen` at the given index} + /// @param index the index + public @CType("VkXYColorEXT") java.lang.foreign.MemorySegment displayPrimaryGreenAt(long index) { return VkHdrMetadataEXT.get_displayPrimaryGreen(this.segment(), index); } + /// {@return `displayPrimaryGreen`} + public @CType("VkXYColorEXT") java.lang.foreign.MemorySegment displayPrimaryGreen() { return VkHdrMetadataEXT.get_displayPrimaryGreen(this.segment()); } + /// Sets `displayPrimaryGreen` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayPrimaryGreen(MemorySegment segment, long index, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_displayPrimaryGreen, index), ML_displayPrimaryGreen.byteSize()); } + /// Sets `displayPrimaryGreen` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayPrimaryGreen(MemorySegment segment, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_displayPrimaryGreen(segment, 0L, value); } + /// Sets `displayPrimaryGreen` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT displayPrimaryGreenAt(long index, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_displayPrimaryGreen(this.segment(), index, value); return this; } + /// Sets `displayPrimaryGreen` with the given value. + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT displayPrimaryGreen(@CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_displayPrimaryGreen(this.segment(), value); return this; } + + /// {@return `displayPrimaryBlue` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkXYColorEXT") java.lang.foreign.MemorySegment get_displayPrimaryBlue(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_displayPrimaryBlue, index), ML_displayPrimaryBlue); } + /// {@return `displayPrimaryBlue`} + /// @param segment the segment of the struct + public static @CType("VkXYColorEXT") java.lang.foreign.MemorySegment get_displayPrimaryBlue(MemorySegment segment) { return VkHdrMetadataEXT.get_displayPrimaryBlue(segment, 0L); } + /// {@return `displayPrimaryBlue` at the given index} + /// @param index the index + public @CType("VkXYColorEXT") java.lang.foreign.MemorySegment displayPrimaryBlueAt(long index) { return VkHdrMetadataEXT.get_displayPrimaryBlue(this.segment(), index); } + /// {@return `displayPrimaryBlue`} + public @CType("VkXYColorEXT") java.lang.foreign.MemorySegment displayPrimaryBlue() { return VkHdrMetadataEXT.get_displayPrimaryBlue(this.segment()); } + /// Sets `displayPrimaryBlue` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayPrimaryBlue(MemorySegment segment, long index, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_displayPrimaryBlue, index), ML_displayPrimaryBlue.byteSize()); } + /// Sets `displayPrimaryBlue` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayPrimaryBlue(MemorySegment segment, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_displayPrimaryBlue(segment, 0L, value); } + /// Sets `displayPrimaryBlue` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT displayPrimaryBlueAt(long index, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_displayPrimaryBlue(this.segment(), index, value); return this; } + /// Sets `displayPrimaryBlue` with the given value. + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT displayPrimaryBlue(@CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_displayPrimaryBlue(this.segment(), value); return this; } + + /// {@return `whitePoint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkXYColorEXT") java.lang.foreign.MemorySegment get_whitePoint(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_whitePoint, index), ML_whitePoint); } + /// {@return `whitePoint`} + /// @param segment the segment of the struct + public static @CType("VkXYColorEXT") java.lang.foreign.MemorySegment get_whitePoint(MemorySegment segment) { return VkHdrMetadataEXT.get_whitePoint(segment, 0L); } + /// {@return `whitePoint` at the given index} + /// @param index the index + public @CType("VkXYColorEXT") java.lang.foreign.MemorySegment whitePointAt(long index) { return VkHdrMetadataEXT.get_whitePoint(this.segment(), index); } + /// {@return `whitePoint`} + public @CType("VkXYColorEXT") java.lang.foreign.MemorySegment whitePoint() { return VkHdrMetadataEXT.get_whitePoint(this.segment()); } + /// Sets `whitePoint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_whitePoint(MemorySegment segment, long index, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_whitePoint, index), ML_whitePoint.byteSize()); } + /// Sets `whitePoint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_whitePoint(MemorySegment segment, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_whitePoint(segment, 0L, value); } + /// Sets `whitePoint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT whitePointAt(long index, @CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_whitePoint(this.segment(), index, value); return this; } + /// Sets `whitePoint` with the given value. + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT whitePoint(@CType("VkXYColorEXT") java.lang.foreign.MemorySegment value) { VkHdrMetadataEXT.set_whitePoint(this.segment(), value); return this; } + + /// {@return `maxLuminance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxLuminance(MemorySegment segment, long index) { return (float) VH_maxLuminance.get(segment, 0L, index); } + /// {@return `maxLuminance`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxLuminance(MemorySegment segment) { return VkHdrMetadataEXT.get_maxLuminance(segment, 0L); } + /// {@return `maxLuminance` at the given index} + /// @param index the index + public @CType("float") float maxLuminanceAt(long index) { return VkHdrMetadataEXT.get_maxLuminance(this.segment(), index); } + /// {@return `maxLuminance`} + public @CType("float") float maxLuminance() { return VkHdrMetadataEXT.get_maxLuminance(this.segment()); } + /// Sets `maxLuminance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLuminance(MemorySegment segment, long index, @CType("float") float value) { VH_maxLuminance.set(segment, 0L, index, value); } + /// Sets `maxLuminance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLuminance(MemorySegment segment, @CType("float") float value) { VkHdrMetadataEXT.set_maxLuminance(segment, 0L, value); } + /// Sets `maxLuminance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT maxLuminanceAt(long index, @CType("float") float value) { VkHdrMetadataEXT.set_maxLuminance(this.segment(), index, value); return this; } + /// Sets `maxLuminance` with the given value. + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT maxLuminance(@CType("float") float value) { VkHdrMetadataEXT.set_maxLuminance(this.segment(), value); return this; } + + /// {@return `minLuminance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minLuminance(MemorySegment segment, long index) { return (float) VH_minLuminance.get(segment, 0L, index); } + /// {@return `minLuminance`} + /// @param segment the segment of the struct + public static @CType("float") float get_minLuminance(MemorySegment segment) { return VkHdrMetadataEXT.get_minLuminance(segment, 0L); } + /// {@return `minLuminance` at the given index} + /// @param index the index + public @CType("float") float minLuminanceAt(long index) { return VkHdrMetadataEXT.get_minLuminance(this.segment(), index); } + /// {@return `minLuminance`} + public @CType("float") float minLuminance() { return VkHdrMetadataEXT.get_minLuminance(this.segment()); } + /// Sets `minLuminance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minLuminance(MemorySegment segment, long index, @CType("float") float value) { VH_minLuminance.set(segment, 0L, index, value); } + /// Sets `minLuminance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minLuminance(MemorySegment segment, @CType("float") float value) { VkHdrMetadataEXT.set_minLuminance(segment, 0L, value); } + /// Sets `minLuminance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT minLuminanceAt(long index, @CType("float") float value) { VkHdrMetadataEXT.set_minLuminance(this.segment(), index, value); return this; } + /// Sets `minLuminance` with the given value. + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT minLuminance(@CType("float") float value) { VkHdrMetadataEXT.set_minLuminance(this.segment(), value); return this; } + + /// {@return `maxContentLightLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxContentLightLevel(MemorySegment segment, long index) { return (float) VH_maxContentLightLevel.get(segment, 0L, index); } + /// {@return `maxContentLightLevel`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxContentLightLevel(MemorySegment segment) { return VkHdrMetadataEXT.get_maxContentLightLevel(segment, 0L); } + /// {@return `maxContentLightLevel` at the given index} + /// @param index the index + public @CType("float") float maxContentLightLevelAt(long index) { return VkHdrMetadataEXT.get_maxContentLightLevel(this.segment(), index); } + /// {@return `maxContentLightLevel`} + public @CType("float") float maxContentLightLevel() { return VkHdrMetadataEXT.get_maxContentLightLevel(this.segment()); } + /// Sets `maxContentLightLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxContentLightLevel(MemorySegment segment, long index, @CType("float") float value) { VH_maxContentLightLevel.set(segment, 0L, index, value); } + /// Sets `maxContentLightLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxContentLightLevel(MemorySegment segment, @CType("float") float value) { VkHdrMetadataEXT.set_maxContentLightLevel(segment, 0L, value); } + /// Sets `maxContentLightLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT maxContentLightLevelAt(long index, @CType("float") float value) { VkHdrMetadataEXT.set_maxContentLightLevel(this.segment(), index, value); return this; } + /// Sets `maxContentLightLevel` with the given value. + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT maxContentLightLevel(@CType("float") float value) { VkHdrMetadataEXT.set_maxContentLightLevel(this.segment(), value); return this; } + + /// {@return `maxFrameAverageLightLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxFrameAverageLightLevel(MemorySegment segment, long index) { return (float) VH_maxFrameAverageLightLevel.get(segment, 0L, index); } + /// {@return `maxFrameAverageLightLevel`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxFrameAverageLightLevel(MemorySegment segment) { return VkHdrMetadataEXT.get_maxFrameAverageLightLevel(segment, 0L); } + /// {@return `maxFrameAverageLightLevel` at the given index} + /// @param index the index + public @CType("float") float maxFrameAverageLightLevelAt(long index) { return VkHdrMetadataEXT.get_maxFrameAverageLightLevel(this.segment(), index); } + /// {@return `maxFrameAverageLightLevel`} + public @CType("float") float maxFrameAverageLightLevel() { return VkHdrMetadataEXT.get_maxFrameAverageLightLevel(this.segment()); } + /// Sets `maxFrameAverageLightLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFrameAverageLightLevel(MemorySegment segment, long index, @CType("float") float value) { VH_maxFrameAverageLightLevel.set(segment, 0L, index, value); } + /// Sets `maxFrameAverageLightLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFrameAverageLightLevel(MemorySegment segment, @CType("float") float value) { VkHdrMetadataEXT.set_maxFrameAverageLightLevel(segment, 0L, value); } + /// Sets `maxFrameAverageLightLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT maxFrameAverageLightLevelAt(long index, @CType("float") float value) { VkHdrMetadataEXT.set_maxFrameAverageLightLevel(this.segment(), index, value); return this; } + /// Sets `maxFrameAverageLightLevel` with the given value. + /// @param value the value + /// @return `this` + public VkHdrMetadataEXT maxFrameAverageLightLevel(@CType("float") float value) { VkHdrMetadataEXT.set_maxFrameAverageLightLevel(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkHeadlessSurfaceCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkHeadlessSurfaceCreateInfoEXT.java new file mode 100644 index 00000000..2fa74dcd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkHeadlessSurfaceCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkHeadlessSurfaceCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkHeadlessSurfaceCreateFlagsEXT flags; +/// } VkHeadlessSurfaceCreateInfoEXT; +/// ``` +public final class VkHeadlessSurfaceCreateInfoEXT extends Struct { + /// The struct layout of `VkHeadlessSurfaceCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkHeadlessSurfaceCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkHeadlessSurfaceCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkHeadlessSurfaceCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkHeadlessSurfaceCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkHeadlessSurfaceCreateInfoEXT(segment); } + + /// Creates `VkHeadlessSurfaceCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkHeadlessSurfaceCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkHeadlessSurfaceCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkHeadlessSurfaceCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkHeadlessSurfaceCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkHeadlessSurfaceCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkHeadlessSurfaceCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkHeadlessSurfaceCreateInfoEXT` + public static VkHeadlessSurfaceCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkHeadlessSurfaceCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkHeadlessSurfaceCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkHeadlessSurfaceCreateInfoEXT` + public static VkHeadlessSurfaceCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkHeadlessSurfaceCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkHeadlessSurfaceCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkHeadlessSurfaceCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkHeadlessSurfaceCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkHeadlessSurfaceCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHeadlessSurfaceCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkHeadlessSurfaceCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkHeadlessSurfaceCreateInfoEXT sType(@CType("VkStructureType") int value) { VkHeadlessSurfaceCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkHeadlessSurfaceCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkHeadlessSurfaceCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkHeadlessSurfaceCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkHeadlessSurfaceCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHeadlessSurfaceCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkHeadlessSurfaceCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkHeadlessSurfaceCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkHeadlessSurfaceCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkHeadlessSurfaceCreateFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkHeadlessSurfaceCreateFlagsEXT") int get_flags(MemorySegment segment) { return VkHeadlessSurfaceCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkHeadlessSurfaceCreateFlagsEXT") int flagsAt(long index) { return VkHeadlessSurfaceCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkHeadlessSurfaceCreateFlagsEXT") int flags() { return VkHeadlessSurfaceCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkHeadlessSurfaceCreateFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkHeadlessSurfaceCreateFlagsEXT") int value) { VkHeadlessSurfaceCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHeadlessSurfaceCreateInfoEXT flagsAt(long index, @CType("VkHeadlessSurfaceCreateFlagsEXT") int value) { VkHeadlessSurfaceCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkHeadlessSurfaceCreateInfoEXT flags(@CType("VkHeadlessSurfaceCreateFlagsEXT") int value) { VkHeadlessSurfaceCreateInfoEXT.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageCaptureDescriptorDataInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageCaptureDescriptorDataInfoEXT.java new file mode 100644 index 00000000..76700e87 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageCaptureDescriptorDataInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageCaptureDescriptorDataInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage image; +/// } VkImageCaptureDescriptorDataInfoEXT; +/// ``` +public final class VkImageCaptureDescriptorDataInfoEXT extends Struct { + /// The struct layout of `VkImageCaptureDescriptorDataInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("image") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + + /// Creates `VkImageCaptureDescriptorDataInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImageCaptureDescriptorDataInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageCaptureDescriptorDataInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCaptureDescriptorDataInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCaptureDescriptorDataInfoEXT(segment); } + + /// Creates `VkImageCaptureDescriptorDataInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCaptureDescriptorDataInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCaptureDescriptorDataInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageCaptureDescriptorDataInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCaptureDescriptorDataInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCaptureDescriptorDataInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageCaptureDescriptorDataInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageCaptureDescriptorDataInfoEXT` + public static VkImageCaptureDescriptorDataInfoEXT alloc(SegmentAllocator allocator) { return new VkImageCaptureDescriptorDataInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageCaptureDescriptorDataInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageCaptureDescriptorDataInfoEXT` + public static VkImageCaptureDescriptorDataInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImageCaptureDescriptorDataInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageCaptureDescriptorDataInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageCaptureDescriptorDataInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageCaptureDescriptorDataInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageCaptureDescriptorDataInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCaptureDescriptorDataInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImageCaptureDescriptorDataInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageCaptureDescriptorDataInfoEXT sType(@CType("VkStructureType") int value) { VkImageCaptureDescriptorDataInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageCaptureDescriptorDataInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageCaptureDescriptorDataInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageCaptureDescriptorDataInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCaptureDescriptorDataInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCaptureDescriptorDataInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCaptureDescriptorDataInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageCaptureDescriptorDataInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCaptureDescriptorDataInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkImageCaptureDescriptorDataInfoEXT.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkImageCaptureDescriptorDataInfoEXT.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkImageCaptureDescriptorDataInfoEXT.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageCaptureDescriptorDataInfoEXT.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCaptureDescriptorDataInfoEXT imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageCaptureDescriptorDataInfoEXT.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkImageCaptureDescriptorDataInfoEXT image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageCaptureDescriptorDataInfoEXT.set_image(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageCompressionControlEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageCompressionControlEXT.java new file mode 100644 index 00000000..e5d3c0bf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageCompressionControlEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### compressionControlPlaneCount +/// [VarHandle][#VH_compressionControlPlaneCount] - [Getter][#compressionControlPlaneCount()] - [Setter][#compressionControlPlaneCount(int)] +/// ### pFixedRateFlags +/// [VarHandle][#VH_pFixedRateFlags] - [Getter][#pFixedRateFlags()] - [Setter][#pFixedRateFlags(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageCompressionControlEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageCompressionFlagsEXT flags; +/// uint32_t compressionControlPlaneCount; +/// VkImageCompressionFixedRateFlagsEXT * pFixedRateFlags; +/// } VkImageCompressionControlEXT; +/// ``` +public final class VkImageCompressionControlEXT extends Struct { + /// The struct layout of `VkImageCompressionControlEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("compressionControlPlaneCount"), + ValueLayout.ADDRESS.withName("pFixedRateFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `compressionControlPlaneCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compressionControlPlaneCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compressionControlPlaneCount")); + /// The [VarHandle] of `pFixedRateFlags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pFixedRateFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pFixedRateFlags")); + + /// Creates `VkImageCompressionControlEXT` with the given segment. + /// @param segment the memory segment + public VkImageCompressionControlEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageCompressionControlEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCompressionControlEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCompressionControlEXT(segment); } + + /// Creates `VkImageCompressionControlEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCompressionControlEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCompressionControlEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageCompressionControlEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCompressionControlEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCompressionControlEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageCompressionControlEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageCompressionControlEXT` + public static VkImageCompressionControlEXT alloc(SegmentAllocator allocator) { return new VkImageCompressionControlEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageCompressionControlEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageCompressionControlEXT` + public static VkImageCompressionControlEXT alloc(SegmentAllocator allocator, long count) { return new VkImageCompressionControlEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageCompressionControlEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageCompressionControlEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageCompressionControlEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageCompressionControlEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCompressionControlEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImageCompressionControlEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageCompressionControlEXT sType(@CType("VkStructureType") int value) { VkImageCompressionControlEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageCompressionControlEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageCompressionControlEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageCompressionControlEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCompressionControlEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCompressionControlEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCompressionControlEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageCompressionControlEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCompressionControlEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageCompressionFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkImageCompressionFlagsEXT") int get_flags(MemorySegment segment) { return VkImageCompressionControlEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkImageCompressionFlagsEXT") int flagsAt(long index) { return VkImageCompressionControlEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkImageCompressionFlagsEXT") int flags() { return VkImageCompressionControlEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkImageCompressionFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkImageCompressionFlagsEXT") int value) { VkImageCompressionControlEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCompressionControlEXT flagsAt(long index, @CType("VkImageCompressionFlagsEXT") int value) { VkImageCompressionControlEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImageCompressionControlEXT flags(@CType("VkImageCompressionFlagsEXT") int value) { VkImageCompressionControlEXT.set_flags(this.segment(), value); return this; } + + /// {@return `compressionControlPlaneCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_compressionControlPlaneCount(MemorySegment segment, long index) { return (int) VH_compressionControlPlaneCount.get(segment, 0L, index); } + /// {@return `compressionControlPlaneCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_compressionControlPlaneCount(MemorySegment segment) { return VkImageCompressionControlEXT.get_compressionControlPlaneCount(segment, 0L); } + /// {@return `compressionControlPlaneCount` at the given index} + /// @param index the index + public @CType("uint32_t") int compressionControlPlaneCountAt(long index) { return VkImageCompressionControlEXT.get_compressionControlPlaneCount(this.segment(), index); } + /// {@return `compressionControlPlaneCount`} + public @CType("uint32_t") int compressionControlPlaneCount() { return VkImageCompressionControlEXT.get_compressionControlPlaneCount(this.segment()); } + /// Sets `compressionControlPlaneCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compressionControlPlaneCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_compressionControlPlaneCount.set(segment, 0L, index, value); } + /// Sets `compressionControlPlaneCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compressionControlPlaneCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageCompressionControlEXT.set_compressionControlPlaneCount(segment, 0L, value); } + /// Sets `compressionControlPlaneCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCompressionControlEXT compressionControlPlaneCountAt(long index, @CType("uint32_t") int value) { VkImageCompressionControlEXT.set_compressionControlPlaneCount(this.segment(), index, value); return this; } + /// Sets `compressionControlPlaneCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageCompressionControlEXT compressionControlPlaneCount(@CType("uint32_t") int value) { VkImageCompressionControlEXT.set_compressionControlPlaneCount(this.segment(), value); return this; } + + /// {@return `pFixedRateFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageCompressionFixedRateFlagsEXT *") java.lang.foreign.MemorySegment get_pFixedRateFlags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pFixedRateFlags.get(segment, 0L, index); } + /// {@return `pFixedRateFlags`} + /// @param segment the segment of the struct + public static @CType("VkImageCompressionFixedRateFlagsEXT *") java.lang.foreign.MemorySegment get_pFixedRateFlags(MemorySegment segment) { return VkImageCompressionControlEXT.get_pFixedRateFlags(segment, 0L); } + /// {@return `pFixedRateFlags` at the given index} + /// @param index the index + public @CType("VkImageCompressionFixedRateFlagsEXT *") java.lang.foreign.MemorySegment pFixedRateFlagsAt(long index) { return VkImageCompressionControlEXT.get_pFixedRateFlags(this.segment(), index); } + /// {@return `pFixedRateFlags`} + public @CType("VkImageCompressionFixedRateFlagsEXT *") java.lang.foreign.MemorySegment pFixedRateFlags() { return VkImageCompressionControlEXT.get_pFixedRateFlags(this.segment()); } + /// Sets `pFixedRateFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pFixedRateFlags(MemorySegment segment, long index, @CType("VkImageCompressionFixedRateFlagsEXT *") java.lang.foreign.MemorySegment value) { VH_pFixedRateFlags.set(segment, 0L, index, value); } + /// Sets `pFixedRateFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pFixedRateFlags(MemorySegment segment, @CType("VkImageCompressionFixedRateFlagsEXT *") java.lang.foreign.MemorySegment value) { VkImageCompressionControlEXT.set_pFixedRateFlags(segment, 0L, value); } + /// Sets `pFixedRateFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCompressionControlEXT pFixedRateFlagsAt(long index, @CType("VkImageCompressionFixedRateFlagsEXT *") java.lang.foreign.MemorySegment value) { VkImageCompressionControlEXT.set_pFixedRateFlags(this.segment(), index, value); return this; } + /// Sets `pFixedRateFlags` with the given value. + /// @param value the value + /// @return `this` + public VkImageCompressionControlEXT pFixedRateFlags(@CType("VkImageCompressionFixedRateFlagsEXT *") java.lang.foreign.MemorySegment value) { VkImageCompressionControlEXT.set_pFixedRateFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageCompressionPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageCompressionPropertiesEXT.java new file mode 100644 index 00000000..97999afa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageCompressionPropertiesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageCompressionFlags +/// [VarHandle][#VH_imageCompressionFlags] - [Getter][#imageCompressionFlags()] - [Setter][#imageCompressionFlags(int)] +/// ### imageCompressionFixedRateFlags +/// [VarHandle][#VH_imageCompressionFixedRateFlags] - [Getter][#imageCompressionFixedRateFlags()] - [Setter][#imageCompressionFixedRateFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageCompressionPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkImageCompressionFlagsEXT imageCompressionFlags; +/// VkImageCompressionFixedRateFlagsEXT imageCompressionFixedRateFlags; +/// } VkImageCompressionPropertiesEXT; +/// ``` +public final class VkImageCompressionPropertiesEXT extends Struct { + /// The struct layout of `VkImageCompressionPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("imageCompressionFlags"), + ValueLayout.JAVA_INT.withName("imageCompressionFixedRateFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageCompressionFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageCompressionFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageCompressionFlags")); + /// The [VarHandle] of `imageCompressionFixedRateFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageCompressionFixedRateFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageCompressionFixedRateFlags")); + + /// Creates `VkImageCompressionPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkImageCompressionPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageCompressionPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCompressionPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCompressionPropertiesEXT(segment); } + + /// Creates `VkImageCompressionPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCompressionPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCompressionPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageCompressionPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCompressionPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCompressionPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageCompressionPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageCompressionPropertiesEXT` + public static VkImageCompressionPropertiesEXT alloc(SegmentAllocator allocator) { return new VkImageCompressionPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageCompressionPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageCompressionPropertiesEXT` + public static VkImageCompressionPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkImageCompressionPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageCompressionPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageCompressionPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageCompressionPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageCompressionPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCompressionPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImageCompressionPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageCompressionPropertiesEXT sType(@CType("VkStructureType") int value) { VkImageCompressionPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageCompressionPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageCompressionPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkImageCompressionPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageCompressionPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCompressionPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageCompressionPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageCompressionPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkImageCompressionPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `imageCompressionFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageCompressionFlagsEXT") int get_imageCompressionFlags(MemorySegment segment, long index) { return (int) VH_imageCompressionFlags.get(segment, 0L, index); } + /// {@return `imageCompressionFlags`} + /// @param segment the segment of the struct + public static @CType("VkImageCompressionFlagsEXT") int get_imageCompressionFlags(MemorySegment segment) { return VkImageCompressionPropertiesEXT.get_imageCompressionFlags(segment, 0L); } + /// {@return `imageCompressionFlags` at the given index} + /// @param index the index + public @CType("VkImageCompressionFlagsEXT") int imageCompressionFlagsAt(long index) { return VkImageCompressionPropertiesEXT.get_imageCompressionFlags(this.segment(), index); } + /// {@return `imageCompressionFlags`} + public @CType("VkImageCompressionFlagsEXT") int imageCompressionFlags() { return VkImageCompressionPropertiesEXT.get_imageCompressionFlags(this.segment()); } + /// Sets `imageCompressionFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageCompressionFlags(MemorySegment segment, long index, @CType("VkImageCompressionFlagsEXT") int value) { VH_imageCompressionFlags.set(segment, 0L, index, value); } + /// Sets `imageCompressionFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageCompressionFlags(MemorySegment segment, @CType("VkImageCompressionFlagsEXT") int value) { VkImageCompressionPropertiesEXT.set_imageCompressionFlags(segment, 0L, value); } + /// Sets `imageCompressionFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCompressionPropertiesEXT imageCompressionFlagsAt(long index, @CType("VkImageCompressionFlagsEXT") int value) { VkImageCompressionPropertiesEXT.set_imageCompressionFlags(this.segment(), index, value); return this; } + /// Sets `imageCompressionFlags` with the given value. + /// @param value the value + /// @return `this` + public VkImageCompressionPropertiesEXT imageCompressionFlags(@CType("VkImageCompressionFlagsEXT") int value) { VkImageCompressionPropertiesEXT.set_imageCompressionFlags(this.segment(), value); return this; } + + /// {@return `imageCompressionFixedRateFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageCompressionFixedRateFlagsEXT") int get_imageCompressionFixedRateFlags(MemorySegment segment, long index) { return (int) VH_imageCompressionFixedRateFlags.get(segment, 0L, index); } + /// {@return `imageCompressionFixedRateFlags`} + /// @param segment the segment of the struct + public static @CType("VkImageCompressionFixedRateFlagsEXT") int get_imageCompressionFixedRateFlags(MemorySegment segment) { return VkImageCompressionPropertiesEXT.get_imageCompressionFixedRateFlags(segment, 0L); } + /// {@return `imageCompressionFixedRateFlags` at the given index} + /// @param index the index + public @CType("VkImageCompressionFixedRateFlagsEXT") int imageCompressionFixedRateFlagsAt(long index) { return VkImageCompressionPropertiesEXT.get_imageCompressionFixedRateFlags(this.segment(), index); } + /// {@return `imageCompressionFixedRateFlags`} + public @CType("VkImageCompressionFixedRateFlagsEXT") int imageCompressionFixedRateFlags() { return VkImageCompressionPropertiesEXT.get_imageCompressionFixedRateFlags(this.segment()); } + /// Sets `imageCompressionFixedRateFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageCompressionFixedRateFlags(MemorySegment segment, long index, @CType("VkImageCompressionFixedRateFlagsEXT") int value) { VH_imageCompressionFixedRateFlags.set(segment, 0L, index, value); } + /// Sets `imageCompressionFixedRateFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageCompressionFixedRateFlags(MemorySegment segment, @CType("VkImageCompressionFixedRateFlagsEXT") int value) { VkImageCompressionPropertiesEXT.set_imageCompressionFixedRateFlags(segment, 0L, value); } + /// Sets `imageCompressionFixedRateFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCompressionPropertiesEXT imageCompressionFixedRateFlagsAt(long index, @CType("VkImageCompressionFixedRateFlagsEXT") int value) { VkImageCompressionPropertiesEXT.set_imageCompressionFixedRateFlags(this.segment(), index, value); return this; } + /// Sets `imageCompressionFixedRateFlags` with the given value. + /// @param value the value + /// @return `this` + public VkImageCompressionPropertiesEXT imageCompressionFixedRateFlags(@CType("VkImageCompressionFixedRateFlagsEXT") int value) { VkImageCompressionPropertiesEXT.set_imageCompressionFixedRateFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageDrmFormatModifierExplicitCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageDrmFormatModifierExplicitCreateInfoEXT.java new file mode 100644 index 00000000..5f3ae09c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageDrmFormatModifierExplicitCreateInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### drmFormatModifier +/// [VarHandle][#VH_drmFormatModifier] - [Getter][#drmFormatModifier()] - [Setter][#drmFormatModifier(long)] +/// ### drmFormatModifierPlaneCount +/// [VarHandle][#VH_drmFormatModifierPlaneCount] - [Getter][#drmFormatModifierPlaneCount()] - [Setter][#drmFormatModifierPlaneCount(int)] +/// ### pPlaneLayouts +/// [VarHandle][#VH_pPlaneLayouts] - [Getter][#pPlaneLayouts()] - [Setter][#pPlaneLayouts(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageDrmFormatModifierExplicitCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint64_t drmFormatModifier; +/// uint32_t drmFormatModifierPlaneCount; +/// const VkSubresourceLayout * pPlaneLayouts; +/// } VkImageDrmFormatModifierExplicitCreateInfoEXT; +/// ``` +public final class VkImageDrmFormatModifierExplicitCreateInfoEXT extends Struct { + /// The struct layout of `VkImageDrmFormatModifierExplicitCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("drmFormatModifier"), + ValueLayout.JAVA_INT.withName("drmFormatModifierPlaneCount"), + ValueLayout.ADDRESS.withName("pPlaneLayouts") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `drmFormatModifier` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_drmFormatModifier = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifier")); + /// The [VarHandle] of `drmFormatModifierPlaneCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_drmFormatModifierPlaneCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifierPlaneCount")); + /// The [VarHandle] of `pPlaneLayouts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPlaneLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPlaneLayouts")); + + /// Creates `VkImageDrmFormatModifierExplicitCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImageDrmFormatModifierExplicitCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageDrmFormatModifierExplicitCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageDrmFormatModifierExplicitCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageDrmFormatModifierExplicitCreateInfoEXT(segment); } + + /// Creates `VkImageDrmFormatModifierExplicitCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageDrmFormatModifierExplicitCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageDrmFormatModifierExplicitCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageDrmFormatModifierExplicitCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageDrmFormatModifierExplicitCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageDrmFormatModifierExplicitCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageDrmFormatModifierExplicitCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageDrmFormatModifierExplicitCreateInfoEXT` + public static VkImageDrmFormatModifierExplicitCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkImageDrmFormatModifierExplicitCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageDrmFormatModifierExplicitCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageDrmFormatModifierExplicitCreateInfoEXT` + public static VkImageDrmFormatModifierExplicitCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImageDrmFormatModifierExplicitCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierExplicitCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierExplicitCreateInfoEXT sType(@CType("VkStructureType") int value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierExplicitCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierExplicitCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `drmFormatModifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_drmFormatModifier(MemorySegment segment, long index) { return (long) VH_drmFormatModifier.get(segment, 0L, index); } + /// {@return `drmFormatModifier`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_drmFormatModifier(MemorySegment segment) { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_drmFormatModifier(segment, 0L); } + /// {@return `drmFormatModifier` at the given index} + /// @param index the index + public @CType("uint64_t") long drmFormatModifierAt(long index) { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_drmFormatModifier(this.segment(), index); } + /// {@return `drmFormatModifier`} + public @CType("uint64_t") long drmFormatModifier() { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_drmFormatModifier(this.segment()); } + /// Sets `drmFormatModifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifier(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_drmFormatModifier.set(segment, 0L, index, value); } + /// Sets `drmFormatModifier` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifier(MemorySegment segment, @CType("uint64_t") long value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_drmFormatModifier(segment, 0L, value); } + /// Sets `drmFormatModifier` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierExplicitCreateInfoEXT drmFormatModifierAt(long index, @CType("uint64_t") long value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_drmFormatModifier(this.segment(), index, value); return this; } + /// Sets `drmFormatModifier` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierExplicitCreateInfoEXT drmFormatModifier(@CType("uint64_t") long value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_drmFormatModifier(this.segment(), value); return this; } + + /// {@return `drmFormatModifierPlaneCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_drmFormatModifierPlaneCount(MemorySegment segment, long index) { return (int) VH_drmFormatModifierPlaneCount.get(segment, 0L, index); } + /// {@return `drmFormatModifierPlaneCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_drmFormatModifierPlaneCount(MemorySegment segment) { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_drmFormatModifierPlaneCount(segment, 0L); } + /// {@return `drmFormatModifierPlaneCount` at the given index} + /// @param index the index + public @CType("uint32_t") int drmFormatModifierPlaneCountAt(long index) { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_drmFormatModifierPlaneCount(this.segment(), index); } + /// {@return `drmFormatModifierPlaneCount`} + public @CType("uint32_t") int drmFormatModifierPlaneCount() { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_drmFormatModifierPlaneCount(this.segment()); } + /// Sets `drmFormatModifierPlaneCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifierPlaneCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_drmFormatModifierPlaneCount.set(segment, 0L, index, value); } + /// Sets `drmFormatModifierPlaneCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifierPlaneCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_drmFormatModifierPlaneCount(segment, 0L, value); } + /// Sets `drmFormatModifierPlaneCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierExplicitCreateInfoEXT drmFormatModifierPlaneCountAt(long index, @CType("uint32_t") int value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_drmFormatModifierPlaneCount(this.segment(), index, value); return this; } + /// Sets `drmFormatModifierPlaneCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierExplicitCreateInfoEXT drmFormatModifierPlaneCount(@CType("uint32_t") int value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_drmFormatModifierPlaneCount(this.segment(), value); return this; } + + /// {@return `pPlaneLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSubresourceLayout *") java.lang.foreign.MemorySegment get_pPlaneLayouts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPlaneLayouts.get(segment, 0L, index); } + /// {@return `pPlaneLayouts`} + /// @param segment the segment of the struct + public static @CType("const VkSubresourceLayout *") java.lang.foreign.MemorySegment get_pPlaneLayouts(MemorySegment segment) { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_pPlaneLayouts(segment, 0L); } + /// {@return `pPlaneLayouts` at the given index} + /// @param index the index + public @CType("const VkSubresourceLayout *") java.lang.foreign.MemorySegment pPlaneLayoutsAt(long index) { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_pPlaneLayouts(this.segment(), index); } + /// {@return `pPlaneLayouts`} + public @CType("const VkSubresourceLayout *") java.lang.foreign.MemorySegment pPlaneLayouts() { return VkImageDrmFormatModifierExplicitCreateInfoEXT.get_pPlaneLayouts(this.segment()); } + /// Sets `pPlaneLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPlaneLayouts(MemorySegment segment, long index, @CType("const VkSubresourceLayout *") java.lang.foreign.MemorySegment value) { VH_pPlaneLayouts.set(segment, 0L, index, value); } + /// Sets `pPlaneLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPlaneLayouts(MemorySegment segment, @CType("const VkSubresourceLayout *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_pPlaneLayouts(segment, 0L, value); } + /// Sets `pPlaneLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierExplicitCreateInfoEXT pPlaneLayoutsAt(long index, @CType("const VkSubresourceLayout *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_pPlaneLayouts(this.segment(), index, value); return this; } + /// Sets `pPlaneLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierExplicitCreateInfoEXT pPlaneLayouts(@CType("const VkSubresourceLayout *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierExplicitCreateInfoEXT.set_pPlaneLayouts(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageDrmFormatModifierListCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageDrmFormatModifierListCreateInfoEXT.java new file mode 100644 index 00000000..ef0fbc63 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageDrmFormatModifierListCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### drmFormatModifierCount +/// [VarHandle][#VH_drmFormatModifierCount] - [Getter][#drmFormatModifierCount()] - [Setter][#drmFormatModifierCount(int)] +/// ### pDrmFormatModifiers +/// [VarHandle][#VH_pDrmFormatModifiers] - [Getter][#pDrmFormatModifiers()] - [Setter][#pDrmFormatModifiers(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageDrmFormatModifierListCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t drmFormatModifierCount; +/// const uint64_t * pDrmFormatModifiers; +/// } VkImageDrmFormatModifierListCreateInfoEXT; +/// ``` +public final class VkImageDrmFormatModifierListCreateInfoEXT extends Struct { + /// The struct layout of `VkImageDrmFormatModifierListCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("drmFormatModifierCount"), + ValueLayout.ADDRESS.withName("pDrmFormatModifiers") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `drmFormatModifierCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_drmFormatModifierCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifierCount")); + /// The [VarHandle] of `pDrmFormatModifiers` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDrmFormatModifiers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDrmFormatModifiers")); + + /// Creates `VkImageDrmFormatModifierListCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImageDrmFormatModifierListCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageDrmFormatModifierListCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageDrmFormatModifierListCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageDrmFormatModifierListCreateInfoEXT(segment); } + + /// Creates `VkImageDrmFormatModifierListCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageDrmFormatModifierListCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageDrmFormatModifierListCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageDrmFormatModifierListCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageDrmFormatModifierListCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageDrmFormatModifierListCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageDrmFormatModifierListCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageDrmFormatModifierListCreateInfoEXT` + public static VkImageDrmFormatModifierListCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkImageDrmFormatModifierListCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageDrmFormatModifierListCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageDrmFormatModifierListCreateInfoEXT` + public static VkImageDrmFormatModifierListCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImageDrmFormatModifierListCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageDrmFormatModifierListCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageDrmFormatModifierListCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageDrmFormatModifierListCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageDrmFormatModifierListCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierListCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImageDrmFormatModifierListCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierListCreateInfoEXT sType(@CType("VkStructureType") int value) { VkImageDrmFormatModifierListCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageDrmFormatModifierListCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageDrmFormatModifierListCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageDrmFormatModifierListCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierListCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierListCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierListCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierListCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierListCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `drmFormatModifierCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_drmFormatModifierCount(MemorySegment segment, long index) { return (int) VH_drmFormatModifierCount.get(segment, 0L, index); } + /// {@return `drmFormatModifierCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_drmFormatModifierCount(MemorySegment segment) { return VkImageDrmFormatModifierListCreateInfoEXT.get_drmFormatModifierCount(segment, 0L); } + /// {@return `drmFormatModifierCount` at the given index} + /// @param index the index + public @CType("uint32_t") int drmFormatModifierCountAt(long index) { return VkImageDrmFormatModifierListCreateInfoEXT.get_drmFormatModifierCount(this.segment(), index); } + /// {@return `drmFormatModifierCount`} + public @CType("uint32_t") int drmFormatModifierCount() { return VkImageDrmFormatModifierListCreateInfoEXT.get_drmFormatModifierCount(this.segment()); } + /// Sets `drmFormatModifierCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifierCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_drmFormatModifierCount.set(segment, 0L, index, value); } + /// Sets `drmFormatModifierCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifierCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageDrmFormatModifierListCreateInfoEXT.set_drmFormatModifierCount(segment, 0L, value); } + /// Sets `drmFormatModifierCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierListCreateInfoEXT drmFormatModifierCountAt(long index, @CType("uint32_t") int value) { VkImageDrmFormatModifierListCreateInfoEXT.set_drmFormatModifierCount(this.segment(), index, value); return this; } + /// Sets `drmFormatModifierCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierListCreateInfoEXT drmFormatModifierCount(@CType("uint32_t") int value) { VkImageDrmFormatModifierListCreateInfoEXT.set_drmFormatModifierCount(this.segment(), value); return this; } + + /// {@return `pDrmFormatModifiers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pDrmFormatModifiers(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDrmFormatModifiers.get(segment, 0L, index); } + /// {@return `pDrmFormatModifiers`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pDrmFormatModifiers(MemorySegment segment) { return VkImageDrmFormatModifierListCreateInfoEXT.get_pDrmFormatModifiers(segment, 0L); } + /// {@return `pDrmFormatModifiers` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pDrmFormatModifiersAt(long index) { return VkImageDrmFormatModifierListCreateInfoEXT.get_pDrmFormatModifiers(this.segment(), index); } + /// {@return `pDrmFormatModifiers`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pDrmFormatModifiers() { return VkImageDrmFormatModifierListCreateInfoEXT.get_pDrmFormatModifiers(this.segment()); } + /// Sets `pDrmFormatModifiers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDrmFormatModifiers(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pDrmFormatModifiers.set(segment, 0L, index, value); } + /// Sets `pDrmFormatModifiers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDrmFormatModifiers(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierListCreateInfoEXT.set_pDrmFormatModifiers(segment, 0L, value); } + /// Sets `pDrmFormatModifiers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierListCreateInfoEXT pDrmFormatModifiersAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierListCreateInfoEXT.set_pDrmFormatModifiers(this.segment(), index, value); return this; } + /// Sets `pDrmFormatModifiers` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierListCreateInfoEXT pDrmFormatModifiers(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierListCreateInfoEXT.set_pDrmFormatModifiers(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageDrmFormatModifierPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageDrmFormatModifierPropertiesEXT.java new file mode 100644 index 00000000..b8b5b64a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageDrmFormatModifierPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### drmFormatModifier +/// [VarHandle][#VH_drmFormatModifier] - [Getter][#drmFormatModifier()] - [Setter][#drmFormatModifier(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageDrmFormatModifierPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint64_t drmFormatModifier; +/// } VkImageDrmFormatModifierPropertiesEXT; +/// ``` +public final class VkImageDrmFormatModifierPropertiesEXT extends Struct { + /// The struct layout of `VkImageDrmFormatModifierPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("drmFormatModifier") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `drmFormatModifier` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_drmFormatModifier = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifier")); + + /// Creates `VkImageDrmFormatModifierPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkImageDrmFormatModifierPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageDrmFormatModifierPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageDrmFormatModifierPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageDrmFormatModifierPropertiesEXT(segment); } + + /// Creates `VkImageDrmFormatModifierPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageDrmFormatModifierPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageDrmFormatModifierPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageDrmFormatModifierPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageDrmFormatModifierPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageDrmFormatModifierPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageDrmFormatModifierPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageDrmFormatModifierPropertiesEXT` + public static VkImageDrmFormatModifierPropertiesEXT alloc(SegmentAllocator allocator) { return new VkImageDrmFormatModifierPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageDrmFormatModifierPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageDrmFormatModifierPropertiesEXT` + public static VkImageDrmFormatModifierPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkImageDrmFormatModifierPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageDrmFormatModifierPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageDrmFormatModifierPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageDrmFormatModifierPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageDrmFormatModifierPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImageDrmFormatModifierPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierPropertiesEXT sType(@CType("VkStructureType") int value) { VkImageDrmFormatModifierPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageDrmFormatModifierPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageDrmFormatModifierPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkImageDrmFormatModifierPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkImageDrmFormatModifierPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `drmFormatModifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_drmFormatModifier(MemorySegment segment, long index) { return (long) VH_drmFormatModifier.get(segment, 0L, index); } + /// {@return `drmFormatModifier`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_drmFormatModifier(MemorySegment segment) { return VkImageDrmFormatModifierPropertiesEXT.get_drmFormatModifier(segment, 0L); } + /// {@return `drmFormatModifier` at the given index} + /// @param index the index + public @CType("uint64_t") long drmFormatModifierAt(long index) { return VkImageDrmFormatModifierPropertiesEXT.get_drmFormatModifier(this.segment(), index); } + /// {@return `drmFormatModifier`} + public @CType("uint64_t") long drmFormatModifier() { return VkImageDrmFormatModifierPropertiesEXT.get_drmFormatModifier(this.segment()); } + /// Sets `drmFormatModifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifier(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_drmFormatModifier.set(segment, 0L, index, value); } + /// Sets `drmFormatModifier` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifier(MemorySegment segment, @CType("uint64_t") long value) { VkImageDrmFormatModifierPropertiesEXT.set_drmFormatModifier(segment, 0L, value); } + /// Sets `drmFormatModifier` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierPropertiesEXT drmFormatModifierAt(long index, @CType("uint64_t") long value) { VkImageDrmFormatModifierPropertiesEXT.set_drmFormatModifier(this.segment(), index, value); return this; } + /// Sets `drmFormatModifier` with the given value. + /// @param value the value + /// @return `this` + public VkImageDrmFormatModifierPropertiesEXT drmFormatModifier(@CType("uint64_t") long value) { VkImageDrmFormatModifierPropertiesEXT.set_drmFormatModifier(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewASTCDecodeModeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewASTCDecodeModeEXT.java new file mode 100644 index 00000000..eb2c24cf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewASTCDecodeModeEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### decodeMode +/// [VarHandle][#VH_decodeMode] - [Getter][#decodeMode()] - [Setter][#decodeMode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageViewASTCDecodeModeEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkFormat decodeMode; +/// } VkImageViewASTCDecodeModeEXT; +/// ``` +public final class VkImageViewASTCDecodeModeEXT extends Struct { + /// The struct layout of `VkImageViewASTCDecodeModeEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("decodeMode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `decodeMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_decodeMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("decodeMode")); + + /// Creates `VkImageViewASTCDecodeModeEXT` with the given segment. + /// @param segment the memory segment + public VkImageViewASTCDecodeModeEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageViewASTCDecodeModeEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewASTCDecodeModeEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewASTCDecodeModeEXT(segment); } + + /// Creates `VkImageViewASTCDecodeModeEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewASTCDecodeModeEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewASTCDecodeModeEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageViewASTCDecodeModeEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewASTCDecodeModeEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewASTCDecodeModeEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageViewASTCDecodeModeEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageViewASTCDecodeModeEXT` + public static VkImageViewASTCDecodeModeEXT alloc(SegmentAllocator allocator) { return new VkImageViewASTCDecodeModeEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageViewASTCDecodeModeEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageViewASTCDecodeModeEXT` + public static VkImageViewASTCDecodeModeEXT alloc(SegmentAllocator allocator, long count) { return new VkImageViewASTCDecodeModeEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageViewASTCDecodeModeEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageViewASTCDecodeModeEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageViewASTCDecodeModeEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageViewASTCDecodeModeEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewASTCDecodeModeEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImageViewASTCDecodeModeEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewASTCDecodeModeEXT sType(@CType("VkStructureType") int value) { VkImageViewASTCDecodeModeEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageViewASTCDecodeModeEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageViewASTCDecodeModeEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageViewASTCDecodeModeEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewASTCDecodeModeEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewASTCDecodeModeEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewASTCDecodeModeEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewASTCDecodeModeEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewASTCDecodeModeEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `decodeMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_decodeMode(MemorySegment segment, long index) { return (int) VH_decodeMode.get(segment, 0L, index); } + /// {@return `decodeMode`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_decodeMode(MemorySegment segment) { return VkImageViewASTCDecodeModeEXT.get_decodeMode(segment, 0L); } + /// {@return `decodeMode` at the given index} + /// @param index the index + public @CType("VkFormat") int decodeModeAt(long index) { return VkImageViewASTCDecodeModeEXT.get_decodeMode(this.segment(), index); } + /// {@return `decodeMode`} + public @CType("VkFormat") int decodeMode() { return VkImageViewASTCDecodeModeEXT.get_decodeMode(this.segment()); } + /// Sets `decodeMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_decodeMode(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_decodeMode.set(segment, 0L, index, value); } + /// Sets `decodeMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_decodeMode(MemorySegment segment, @CType("VkFormat") int value) { VkImageViewASTCDecodeModeEXT.set_decodeMode(segment, 0L, value); } + /// Sets `decodeMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewASTCDecodeModeEXT decodeModeAt(long index, @CType("VkFormat") int value) { VkImageViewASTCDecodeModeEXT.set_decodeMode(this.segment(), index, value); return this; } + /// Sets `decodeMode` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewASTCDecodeModeEXT decodeMode(@CType("VkFormat") int value) { VkImageViewASTCDecodeModeEXT.set_decodeMode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewCaptureDescriptorDataInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewCaptureDescriptorDataInfoEXT.java new file mode 100644 index 00000000..4ebcb700 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewCaptureDescriptorDataInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageView +/// [VarHandle][#VH_imageView] - [Getter][#imageView()] - [Setter][#imageView(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageViewCaptureDescriptorDataInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageView imageView; +/// } VkImageViewCaptureDescriptorDataInfoEXT; +/// ``` +public final class VkImageViewCaptureDescriptorDataInfoEXT extends Struct { + /// The struct layout of `VkImageViewCaptureDescriptorDataInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("imageView") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_imageView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageView")); + + /// Creates `VkImageViewCaptureDescriptorDataInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImageViewCaptureDescriptorDataInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageViewCaptureDescriptorDataInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewCaptureDescriptorDataInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewCaptureDescriptorDataInfoEXT(segment); } + + /// Creates `VkImageViewCaptureDescriptorDataInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewCaptureDescriptorDataInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewCaptureDescriptorDataInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageViewCaptureDescriptorDataInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewCaptureDescriptorDataInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewCaptureDescriptorDataInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageViewCaptureDescriptorDataInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageViewCaptureDescriptorDataInfoEXT` + public static VkImageViewCaptureDescriptorDataInfoEXT alloc(SegmentAllocator allocator) { return new VkImageViewCaptureDescriptorDataInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageViewCaptureDescriptorDataInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageViewCaptureDescriptorDataInfoEXT` + public static VkImageViewCaptureDescriptorDataInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImageViewCaptureDescriptorDataInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageViewCaptureDescriptorDataInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageViewCaptureDescriptorDataInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageViewCaptureDescriptorDataInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageViewCaptureDescriptorDataInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCaptureDescriptorDataInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImageViewCaptureDescriptorDataInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCaptureDescriptorDataInfoEXT sType(@CType("VkStructureType") int value) { VkImageViewCaptureDescriptorDataInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageViewCaptureDescriptorDataInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageViewCaptureDescriptorDataInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageViewCaptureDescriptorDataInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewCaptureDescriptorDataInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCaptureDescriptorDataInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewCaptureDescriptorDataInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCaptureDescriptorDataInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewCaptureDescriptorDataInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `imageView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_imageView.get(segment, 0L, index); } + /// {@return `imageView`} + /// @param segment the segment of the struct + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment) { return VkImageViewCaptureDescriptorDataInfoEXT.get_imageView(segment, 0L); } + /// {@return `imageView` at the given index} + /// @param index the index + public @CType("VkImageView") java.lang.foreign.MemorySegment imageViewAt(long index) { return VkImageViewCaptureDescriptorDataInfoEXT.get_imageView(this.segment(), index); } + /// {@return `imageView`} + public @CType("VkImageView") java.lang.foreign.MemorySegment imageView() { return VkImageViewCaptureDescriptorDataInfoEXT.get_imageView(this.segment()); } + /// Sets `imageView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageView(MemorySegment segment, long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VH_imageView.set(segment, 0L, index, value); } + /// Sets `imageView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageView(MemorySegment segment, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkImageViewCaptureDescriptorDataInfoEXT.set_imageView(segment, 0L, value); } + /// Sets `imageView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCaptureDescriptorDataInfoEXT imageViewAt(long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkImageViewCaptureDescriptorDataInfoEXT.set_imageView(this.segment(), index, value); return this; } + /// Sets `imageView` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCaptureDescriptorDataInfoEXT imageView(@CType("VkImageView") java.lang.foreign.MemorySegment value) { VkImageViewCaptureDescriptorDataInfoEXT.set_imageView(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewMinLodCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewMinLodCreateInfoEXT.java new file mode 100644 index 00000000..eee1d6f8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewMinLodCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minLod +/// [VarHandle][#VH_minLod] - [Getter][#minLod()] - [Setter][#minLod(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageViewMinLodCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// float minLod; +/// } VkImageViewMinLodCreateInfoEXT; +/// ``` +public final class VkImageViewMinLodCreateInfoEXT extends Struct { + /// The struct layout of `VkImageViewMinLodCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_FLOAT.withName("minLod") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minLod` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minLod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minLod")); + + /// Creates `VkImageViewMinLodCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImageViewMinLodCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageViewMinLodCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewMinLodCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewMinLodCreateInfoEXT(segment); } + + /// Creates `VkImageViewMinLodCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewMinLodCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewMinLodCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageViewMinLodCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewMinLodCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewMinLodCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageViewMinLodCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageViewMinLodCreateInfoEXT` + public static VkImageViewMinLodCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkImageViewMinLodCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageViewMinLodCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageViewMinLodCreateInfoEXT` + public static VkImageViewMinLodCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImageViewMinLodCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageViewMinLodCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageViewMinLodCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageViewMinLodCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageViewMinLodCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewMinLodCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImageViewMinLodCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewMinLodCreateInfoEXT sType(@CType("VkStructureType") int value) { VkImageViewMinLodCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageViewMinLodCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageViewMinLodCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageViewMinLodCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewMinLodCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewMinLodCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewMinLodCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewMinLodCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewMinLodCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `minLod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minLod(MemorySegment segment, long index) { return (float) VH_minLod.get(segment, 0L, index); } + /// {@return `minLod`} + /// @param segment the segment of the struct + public static @CType("float") float get_minLod(MemorySegment segment) { return VkImageViewMinLodCreateInfoEXT.get_minLod(segment, 0L); } + /// {@return `minLod` at the given index} + /// @param index the index + public @CType("float") float minLodAt(long index) { return VkImageViewMinLodCreateInfoEXT.get_minLod(this.segment(), index); } + /// {@return `minLod`} + public @CType("float") float minLod() { return VkImageViewMinLodCreateInfoEXT.get_minLod(this.segment()); } + /// Sets `minLod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minLod(MemorySegment segment, long index, @CType("float") float value) { VH_minLod.set(segment, 0L, index, value); } + /// Sets `minLod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minLod(MemorySegment segment, @CType("float") float value) { VkImageViewMinLodCreateInfoEXT.set_minLod(segment, 0L, value); } + /// Sets `minLod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewMinLodCreateInfoEXT minLodAt(long index, @CType("float") float value) { VkImageViewMinLodCreateInfoEXT.set_minLod(this.segment(), index, value); return this; } + /// Sets `minLod` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewMinLodCreateInfoEXT minLod(@CType("float") float value) { VkImageViewMinLodCreateInfoEXT.set_minLod(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewSlicedCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewSlicedCreateInfoEXT.java new file mode 100644 index 00000000..db28eb59 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImageViewSlicedCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sliceOffset +/// [VarHandle][#VH_sliceOffset] - [Getter][#sliceOffset()] - [Setter][#sliceOffset(int)] +/// ### sliceCount +/// [VarHandle][#VH_sliceCount] - [Getter][#sliceCount()] - [Setter][#sliceCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageViewSlicedCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t sliceOffset; +/// uint32_t sliceCount; +/// } VkImageViewSlicedCreateInfoEXT; +/// ``` +public final class VkImageViewSlicedCreateInfoEXT extends Struct { + /// The struct layout of `VkImageViewSlicedCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sliceOffset"), + ValueLayout.JAVA_INT.withName("sliceCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sliceOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sliceOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sliceOffset")); + /// The [VarHandle] of `sliceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sliceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sliceCount")); + + /// Creates `VkImageViewSlicedCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImageViewSlicedCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageViewSlicedCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewSlicedCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewSlicedCreateInfoEXT(segment); } + + /// Creates `VkImageViewSlicedCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewSlicedCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewSlicedCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageViewSlicedCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewSlicedCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewSlicedCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageViewSlicedCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageViewSlicedCreateInfoEXT` + public static VkImageViewSlicedCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkImageViewSlicedCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageViewSlicedCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageViewSlicedCreateInfoEXT` + public static VkImageViewSlicedCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImageViewSlicedCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageViewSlicedCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageViewSlicedCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageViewSlicedCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageViewSlicedCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewSlicedCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImageViewSlicedCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewSlicedCreateInfoEXT sType(@CType("VkStructureType") int value) { VkImageViewSlicedCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageViewSlicedCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageViewSlicedCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageViewSlicedCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewSlicedCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewSlicedCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewSlicedCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewSlicedCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewSlicedCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `sliceOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sliceOffset(MemorySegment segment, long index) { return (int) VH_sliceOffset.get(segment, 0L, index); } + /// {@return `sliceOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sliceOffset(MemorySegment segment) { return VkImageViewSlicedCreateInfoEXT.get_sliceOffset(segment, 0L); } + /// {@return `sliceOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int sliceOffsetAt(long index) { return VkImageViewSlicedCreateInfoEXT.get_sliceOffset(this.segment(), index); } + /// {@return `sliceOffset`} + public @CType("uint32_t") int sliceOffset() { return VkImageViewSlicedCreateInfoEXT.get_sliceOffset(this.segment()); } + /// Sets `sliceOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sliceOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sliceOffset.set(segment, 0L, index, value); } + /// Sets `sliceOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sliceOffset(MemorySegment segment, @CType("uint32_t") int value) { VkImageViewSlicedCreateInfoEXT.set_sliceOffset(segment, 0L, value); } + /// Sets `sliceOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewSlicedCreateInfoEXT sliceOffsetAt(long index, @CType("uint32_t") int value) { VkImageViewSlicedCreateInfoEXT.set_sliceOffset(this.segment(), index, value); return this; } + /// Sets `sliceOffset` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewSlicedCreateInfoEXT sliceOffset(@CType("uint32_t") int value) { VkImageViewSlicedCreateInfoEXT.set_sliceOffset(this.segment(), value); return this; } + + /// {@return `sliceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sliceCount(MemorySegment segment, long index) { return (int) VH_sliceCount.get(segment, 0L, index); } + /// {@return `sliceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sliceCount(MemorySegment segment) { return VkImageViewSlicedCreateInfoEXT.get_sliceCount(segment, 0L); } + /// {@return `sliceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int sliceCountAt(long index) { return VkImageViewSlicedCreateInfoEXT.get_sliceCount(this.segment(), index); } + /// {@return `sliceCount`} + public @CType("uint32_t") int sliceCount() { return VkImageViewSlicedCreateInfoEXT.get_sliceCount(this.segment()); } + /// Sets `sliceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sliceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sliceCount.set(segment, 0L, index, value); } + /// Sets `sliceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sliceCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageViewSlicedCreateInfoEXT.set_sliceCount(segment, 0L, value); } + /// Sets `sliceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewSlicedCreateInfoEXT sliceCountAt(long index, @CType("uint32_t") int value) { VkImageViewSlicedCreateInfoEXT.set_sliceCount(this.segment(), index, value); return this; } + /// Sets `sliceCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewSlicedCreateInfoEXT sliceCount(@CType("uint32_t") int value) { VkImageViewSlicedCreateInfoEXT.set_sliceCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMemoryHostPointerInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMemoryHostPointerInfoEXT.java new file mode 100644 index 00000000..6c118542 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMemoryHostPointerInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### pHostPointer +/// [VarHandle][#VH_pHostPointer] - [Getter][#pHostPointer()] - [Setter][#pHostPointer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMemoryHostPointerInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// void * pHostPointer; +/// } VkImportMemoryHostPointerInfoEXT; +/// ``` +public final class VkImportMemoryHostPointerInfoEXT extends Struct { + /// The struct layout of `VkImportMemoryHostPointerInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.ADDRESS.withName("pHostPointer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `pHostPointer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pHostPointer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pHostPointer")); + + /// Creates `VkImportMemoryHostPointerInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImportMemoryHostPointerInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMemoryHostPointerInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryHostPointerInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryHostPointerInfoEXT(segment); } + + /// Creates `VkImportMemoryHostPointerInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryHostPointerInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryHostPointerInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMemoryHostPointerInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryHostPointerInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryHostPointerInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMemoryHostPointerInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMemoryHostPointerInfoEXT` + public static VkImportMemoryHostPointerInfoEXT alloc(SegmentAllocator allocator) { return new VkImportMemoryHostPointerInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMemoryHostPointerInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMemoryHostPointerInfoEXT` + public static VkImportMemoryHostPointerInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImportMemoryHostPointerInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMemoryHostPointerInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMemoryHostPointerInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMemoryHostPointerInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMemoryHostPointerInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryHostPointerInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMemoryHostPointerInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryHostPointerInfoEXT sType(@CType("VkStructureType") int value) { VkImportMemoryHostPointerInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMemoryHostPointerInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMemoryHostPointerInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMemoryHostPointerInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryHostPointerInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryHostPointerInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryHostPointerInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryHostPointerInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryHostPointerInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportMemoryHostPointerInfoEXT.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportMemoryHostPointerInfoEXT.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkImportMemoryHostPointerInfoEXT.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryHostPointerInfoEXT.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryHostPointerInfoEXT handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryHostPointerInfoEXT.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryHostPointerInfoEXT handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryHostPointerInfoEXT.set_handleType(this.segment(), value); return this; } + + /// {@return `pHostPointer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pHostPointer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pHostPointer.get(segment, 0L, index); } + /// {@return `pHostPointer`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pHostPointer(MemorySegment segment) { return VkImportMemoryHostPointerInfoEXT.get_pHostPointer(segment, 0L); } + /// {@return `pHostPointer` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pHostPointerAt(long index) { return VkImportMemoryHostPointerInfoEXT.get_pHostPointer(this.segment(), index); } + /// {@return `pHostPointer`} + public @CType("void *") java.lang.foreign.MemorySegment pHostPointer() { return VkImportMemoryHostPointerInfoEXT.get_pHostPointer(this.segment()); } + /// Sets `pHostPointer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pHostPointer(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pHostPointer.set(segment, 0L, index, value); } + /// Sets `pHostPointer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pHostPointer(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkImportMemoryHostPointerInfoEXT.set_pHostPointer(segment, 0L, value); } + /// Sets `pHostPointer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryHostPointerInfoEXT pHostPointerAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkImportMemoryHostPointerInfoEXT.set_pHostPointer(this.segment(), index, value); return this; } + /// Sets `pHostPointer` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryHostPointerInfoEXT pHostPointer(@CType("void *") java.lang.foreign.MemorySegment value) { VkImportMemoryHostPointerInfoEXT.set_pHostPointer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalBufferInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalBufferInfoEXT.java new file mode 100644 index 00000000..496b1239 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalBufferInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### mtlBuffer +/// [VarHandle][#VH_mtlBuffer] - [Getter][#mtlBuffer()] - [Setter][#mtlBuffer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMetalBufferInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// MTLBuffer_id mtlBuffer; +/// } VkImportMetalBufferInfoEXT; +/// ``` +public final class VkImportMetalBufferInfoEXT extends Struct { + /// The struct layout of `VkImportMetalBufferInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("mtlBuffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `mtlBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_mtlBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mtlBuffer")); + + /// Creates `VkImportMetalBufferInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImportMetalBufferInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMetalBufferInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalBufferInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalBufferInfoEXT(segment); } + + /// Creates `VkImportMetalBufferInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalBufferInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalBufferInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMetalBufferInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalBufferInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalBufferInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMetalBufferInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMetalBufferInfoEXT` + public static VkImportMetalBufferInfoEXT alloc(SegmentAllocator allocator) { return new VkImportMetalBufferInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMetalBufferInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMetalBufferInfoEXT` + public static VkImportMetalBufferInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImportMetalBufferInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMetalBufferInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMetalBufferInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMetalBufferInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMetalBufferInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalBufferInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMetalBufferInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalBufferInfoEXT sType(@CType("VkStructureType") int value) { VkImportMetalBufferInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMetalBufferInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMetalBufferInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMetalBufferInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalBufferInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalBufferInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalBufferInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalBufferInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalBufferInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `mtlBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("MTLBuffer_id") java.lang.foreign.MemorySegment get_mtlBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_mtlBuffer.get(segment, 0L, index); } + /// {@return `mtlBuffer`} + /// @param segment the segment of the struct + public static @CType("MTLBuffer_id") java.lang.foreign.MemorySegment get_mtlBuffer(MemorySegment segment) { return VkImportMetalBufferInfoEXT.get_mtlBuffer(segment, 0L); } + /// {@return `mtlBuffer` at the given index} + /// @param index the index + public @CType("MTLBuffer_id") java.lang.foreign.MemorySegment mtlBufferAt(long index) { return VkImportMetalBufferInfoEXT.get_mtlBuffer(this.segment(), index); } + /// {@return `mtlBuffer`} + public @CType("MTLBuffer_id") java.lang.foreign.MemorySegment mtlBuffer() { return VkImportMetalBufferInfoEXT.get_mtlBuffer(this.segment()); } + /// Sets `mtlBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mtlBuffer(MemorySegment segment, long index, @CType("MTLBuffer_id") java.lang.foreign.MemorySegment value) { VH_mtlBuffer.set(segment, 0L, index, value); } + /// Sets `mtlBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mtlBuffer(MemorySegment segment, @CType("MTLBuffer_id") java.lang.foreign.MemorySegment value) { VkImportMetalBufferInfoEXT.set_mtlBuffer(segment, 0L, value); } + /// Sets `mtlBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalBufferInfoEXT mtlBufferAt(long index, @CType("MTLBuffer_id") java.lang.foreign.MemorySegment value) { VkImportMetalBufferInfoEXT.set_mtlBuffer(this.segment(), index, value); return this; } + /// Sets `mtlBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalBufferInfoEXT mtlBuffer(@CType("MTLBuffer_id") java.lang.foreign.MemorySegment value) { VkImportMetalBufferInfoEXT.set_mtlBuffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalIOSurfaceInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalIOSurfaceInfoEXT.java new file mode 100644 index 00000000..4bf56a5c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalIOSurfaceInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### ioSurface +/// [VarHandle][#VH_ioSurface] - [Getter][#ioSurface()] - [Setter][#ioSurface(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMetalIOSurfaceInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// IOSurfaceRef ioSurface; +/// } VkImportMetalIOSurfaceInfoEXT; +/// ``` +public final class VkImportMetalIOSurfaceInfoEXT extends Struct { + /// The struct layout of `VkImportMetalIOSurfaceInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("ioSurface") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `ioSurface` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_ioSurface = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ioSurface")); + + /// Creates `VkImportMetalIOSurfaceInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImportMetalIOSurfaceInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMetalIOSurfaceInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalIOSurfaceInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalIOSurfaceInfoEXT(segment); } + + /// Creates `VkImportMetalIOSurfaceInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalIOSurfaceInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalIOSurfaceInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMetalIOSurfaceInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalIOSurfaceInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalIOSurfaceInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMetalIOSurfaceInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMetalIOSurfaceInfoEXT` + public static VkImportMetalIOSurfaceInfoEXT alloc(SegmentAllocator allocator) { return new VkImportMetalIOSurfaceInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMetalIOSurfaceInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMetalIOSurfaceInfoEXT` + public static VkImportMetalIOSurfaceInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImportMetalIOSurfaceInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMetalIOSurfaceInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMetalIOSurfaceInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMetalIOSurfaceInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMetalIOSurfaceInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalIOSurfaceInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMetalIOSurfaceInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalIOSurfaceInfoEXT sType(@CType("VkStructureType") int value) { VkImportMetalIOSurfaceInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMetalIOSurfaceInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMetalIOSurfaceInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMetalIOSurfaceInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalIOSurfaceInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalIOSurfaceInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalIOSurfaceInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalIOSurfaceInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalIOSurfaceInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `ioSurface` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("IOSurfaceRef") java.lang.foreign.MemorySegment get_ioSurface(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_ioSurface.get(segment, 0L, index); } + /// {@return `ioSurface`} + /// @param segment the segment of the struct + public static @CType("IOSurfaceRef") java.lang.foreign.MemorySegment get_ioSurface(MemorySegment segment) { return VkImportMetalIOSurfaceInfoEXT.get_ioSurface(segment, 0L); } + /// {@return `ioSurface` at the given index} + /// @param index the index + public @CType("IOSurfaceRef") java.lang.foreign.MemorySegment ioSurfaceAt(long index) { return VkImportMetalIOSurfaceInfoEXT.get_ioSurface(this.segment(), index); } + /// {@return `ioSurface`} + public @CType("IOSurfaceRef") java.lang.foreign.MemorySegment ioSurface() { return VkImportMetalIOSurfaceInfoEXT.get_ioSurface(this.segment()); } + /// Sets `ioSurface` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ioSurface(MemorySegment segment, long index, @CType("IOSurfaceRef") java.lang.foreign.MemorySegment value) { VH_ioSurface.set(segment, 0L, index, value); } + /// Sets `ioSurface` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ioSurface(MemorySegment segment, @CType("IOSurfaceRef") java.lang.foreign.MemorySegment value) { VkImportMetalIOSurfaceInfoEXT.set_ioSurface(segment, 0L, value); } + /// Sets `ioSurface` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalIOSurfaceInfoEXT ioSurfaceAt(long index, @CType("IOSurfaceRef") java.lang.foreign.MemorySegment value) { VkImportMetalIOSurfaceInfoEXT.set_ioSurface(this.segment(), index, value); return this; } + /// Sets `ioSurface` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalIOSurfaceInfoEXT ioSurface(@CType("IOSurfaceRef") java.lang.foreign.MemorySegment value) { VkImportMetalIOSurfaceInfoEXT.set_ioSurface(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalSharedEventInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalSharedEventInfoEXT.java new file mode 100644 index 00000000..866eab21 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalSharedEventInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### mtlSharedEvent +/// [VarHandle][#VH_mtlSharedEvent] - [Getter][#mtlSharedEvent()] - [Setter][#mtlSharedEvent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMetalSharedEventInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// MTLSharedEvent_id mtlSharedEvent; +/// } VkImportMetalSharedEventInfoEXT; +/// ``` +public final class VkImportMetalSharedEventInfoEXT extends Struct { + /// The struct layout of `VkImportMetalSharedEventInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("mtlSharedEvent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `mtlSharedEvent` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_mtlSharedEvent = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mtlSharedEvent")); + + /// Creates `VkImportMetalSharedEventInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImportMetalSharedEventInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMetalSharedEventInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalSharedEventInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalSharedEventInfoEXT(segment); } + + /// Creates `VkImportMetalSharedEventInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalSharedEventInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalSharedEventInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMetalSharedEventInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalSharedEventInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalSharedEventInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMetalSharedEventInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMetalSharedEventInfoEXT` + public static VkImportMetalSharedEventInfoEXT alloc(SegmentAllocator allocator) { return new VkImportMetalSharedEventInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMetalSharedEventInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMetalSharedEventInfoEXT` + public static VkImportMetalSharedEventInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImportMetalSharedEventInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMetalSharedEventInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMetalSharedEventInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMetalSharedEventInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMetalSharedEventInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalSharedEventInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMetalSharedEventInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalSharedEventInfoEXT sType(@CType("VkStructureType") int value) { VkImportMetalSharedEventInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMetalSharedEventInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMetalSharedEventInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMetalSharedEventInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalSharedEventInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalSharedEventInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalSharedEventInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalSharedEventInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalSharedEventInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `mtlSharedEvent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment get_mtlSharedEvent(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_mtlSharedEvent.get(segment, 0L, index); } + /// {@return `mtlSharedEvent`} + /// @param segment the segment of the struct + public static @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment get_mtlSharedEvent(MemorySegment segment) { return VkImportMetalSharedEventInfoEXT.get_mtlSharedEvent(segment, 0L); } + /// {@return `mtlSharedEvent` at the given index} + /// @param index the index + public @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment mtlSharedEventAt(long index) { return VkImportMetalSharedEventInfoEXT.get_mtlSharedEvent(this.segment(), index); } + /// {@return `mtlSharedEvent`} + public @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment mtlSharedEvent() { return VkImportMetalSharedEventInfoEXT.get_mtlSharedEvent(this.segment()); } + /// Sets `mtlSharedEvent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mtlSharedEvent(MemorySegment segment, long index, @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment value) { VH_mtlSharedEvent.set(segment, 0L, index, value); } + /// Sets `mtlSharedEvent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mtlSharedEvent(MemorySegment segment, @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment value) { VkImportMetalSharedEventInfoEXT.set_mtlSharedEvent(segment, 0L, value); } + /// Sets `mtlSharedEvent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalSharedEventInfoEXT mtlSharedEventAt(long index, @CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment value) { VkImportMetalSharedEventInfoEXT.set_mtlSharedEvent(this.segment(), index, value); return this; } + /// Sets `mtlSharedEvent` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalSharedEventInfoEXT mtlSharedEvent(@CType("MTLSharedEvent_id") java.lang.foreign.MemorySegment value) { VkImportMetalSharedEventInfoEXT.set_mtlSharedEvent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalTextureInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalTextureInfoEXT.java new file mode 100644 index 00000000..b66b1b38 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkImportMetalTextureInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### plane +/// [VarHandle][#VH_plane] - [Getter][#plane()] - [Setter][#plane(int)] +/// ### mtlTexture +/// [VarHandle][#VH_mtlTexture] - [Getter][#mtlTexture()] - [Setter][#mtlTexture(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMetalTextureInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageAspectFlagBits plane; +/// MTLTexture_id mtlTexture; +/// } VkImportMetalTextureInfoEXT; +/// ``` +public final class VkImportMetalTextureInfoEXT extends Struct { + /// The struct layout of `VkImportMetalTextureInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("plane"), + ValueLayout.ADDRESS.withName("mtlTexture") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `plane` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_plane = LAYOUT.arrayElementVarHandle(PathElement.groupElement("plane")); + /// The [VarHandle] of `mtlTexture` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_mtlTexture = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mtlTexture")); + + /// Creates `VkImportMetalTextureInfoEXT` with the given segment. + /// @param segment the memory segment + public VkImportMetalTextureInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMetalTextureInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalTextureInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalTextureInfoEXT(segment); } + + /// Creates `VkImportMetalTextureInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalTextureInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalTextureInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMetalTextureInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMetalTextureInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMetalTextureInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMetalTextureInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMetalTextureInfoEXT` + public static VkImportMetalTextureInfoEXT alloc(SegmentAllocator allocator) { return new VkImportMetalTextureInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMetalTextureInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMetalTextureInfoEXT` + public static VkImportMetalTextureInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkImportMetalTextureInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMetalTextureInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMetalTextureInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMetalTextureInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMetalTextureInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalTextureInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMetalTextureInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalTextureInfoEXT sType(@CType("VkStructureType") int value) { VkImportMetalTextureInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMetalTextureInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMetalTextureInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMetalTextureInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalTextureInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalTextureInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalTextureInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalTextureInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMetalTextureInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `plane` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlagBits") int get_plane(MemorySegment segment, long index) { return (int) VH_plane.get(segment, 0L, index); } + /// {@return `plane`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlagBits") int get_plane(MemorySegment segment) { return VkImportMetalTextureInfoEXT.get_plane(segment, 0L); } + /// {@return `plane` at the given index} + /// @param index the index + public @CType("VkImageAspectFlagBits") int planeAt(long index) { return VkImportMetalTextureInfoEXT.get_plane(this.segment(), index); } + /// {@return `plane`} + public @CType("VkImageAspectFlagBits") int plane() { return VkImportMetalTextureInfoEXT.get_plane(this.segment()); } + /// Sets `plane` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_plane(MemorySegment segment, long index, @CType("VkImageAspectFlagBits") int value) { VH_plane.set(segment, 0L, index, value); } + /// Sets `plane` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_plane(MemorySegment segment, @CType("VkImageAspectFlagBits") int value) { VkImportMetalTextureInfoEXT.set_plane(segment, 0L, value); } + /// Sets `plane` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalTextureInfoEXT planeAt(long index, @CType("VkImageAspectFlagBits") int value) { VkImportMetalTextureInfoEXT.set_plane(this.segment(), index, value); return this; } + /// Sets `plane` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalTextureInfoEXT plane(@CType("VkImageAspectFlagBits") int value) { VkImportMetalTextureInfoEXT.set_plane(this.segment(), value); return this; } + + /// {@return `mtlTexture` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("MTLTexture_id") java.lang.foreign.MemorySegment get_mtlTexture(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_mtlTexture.get(segment, 0L, index); } + /// {@return `mtlTexture`} + /// @param segment the segment of the struct + public static @CType("MTLTexture_id") java.lang.foreign.MemorySegment get_mtlTexture(MemorySegment segment) { return VkImportMetalTextureInfoEXT.get_mtlTexture(segment, 0L); } + /// {@return `mtlTexture` at the given index} + /// @param index the index + public @CType("MTLTexture_id") java.lang.foreign.MemorySegment mtlTextureAt(long index) { return VkImportMetalTextureInfoEXT.get_mtlTexture(this.segment(), index); } + /// {@return `mtlTexture`} + public @CType("MTLTexture_id") java.lang.foreign.MemorySegment mtlTexture() { return VkImportMetalTextureInfoEXT.get_mtlTexture(this.segment()); } + /// Sets `mtlTexture` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mtlTexture(MemorySegment segment, long index, @CType("MTLTexture_id") java.lang.foreign.MemorySegment value) { VH_mtlTexture.set(segment, 0L, index, value); } + /// Sets `mtlTexture` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mtlTexture(MemorySegment segment, @CType("MTLTexture_id") java.lang.foreign.MemorySegment value) { VkImportMetalTextureInfoEXT.set_mtlTexture(segment, 0L, value); } + /// Sets `mtlTexture` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMetalTextureInfoEXT mtlTextureAt(long index, @CType("MTLTexture_id") java.lang.foreign.MemorySegment value) { VkImportMetalTextureInfoEXT.set_mtlTexture(this.segment(), index, value); return this; } + /// Sets `mtlTexture` with the given value. + /// @param value the value + /// @return `this` + public VkImportMetalTextureInfoEXT mtlTexture(@CType("MTLTexture_id") java.lang.foreign.MemorySegment value) { VkImportMetalTextureInfoEXT.set_mtlTexture(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsExecutionSetTokenEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsExecutionSetTokenEXT.java new file mode 100644 index 00000000..0ac7d226 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsExecutionSetTokenEXT.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### shaderStages +/// [VarHandle][#VH_shaderStages] - [Getter][#shaderStages()] - [Setter][#shaderStages(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectCommandsExecutionSetTokenEXT { +/// VkIndirectExecutionSetInfoTypeEXT type; +/// VkShaderStageFlags shaderStages; +/// } VkIndirectCommandsExecutionSetTokenEXT; +/// ``` +public final class VkIndirectCommandsExecutionSetTokenEXT extends Struct { + /// The struct layout of `VkIndirectCommandsExecutionSetTokenEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("shaderStages") + ); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `shaderStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStages")); + + /// Creates `VkIndirectCommandsExecutionSetTokenEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectCommandsExecutionSetTokenEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectCommandsExecutionSetTokenEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsExecutionSetTokenEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsExecutionSetTokenEXT(segment); } + + /// Creates `VkIndirectCommandsExecutionSetTokenEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsExecutionSetTokenEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsExecutionSetTokenEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectCommandsExecutionSetTokenEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsExecutionSetTokenEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsExecutionSetTokenEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectCommandsExecutionSetTokenEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectCommandsExecutionSetTokenEXT` + public static VkIndirectCommandsExecutionSetTokenEXT alloc(SegmentAllocator allocator) { return new VkIndirectCommandsExecutionSetTokenEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectCommandsExecutionSetTokenEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectCommandsExecutionSetTokenEXT` + public static VkIndirectCommandsExecutionSetTokenEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectCommandsExecutionSetTokenEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectExecutionSetInfoTypeEXT") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkIndirectExecutionSetInfoTypeEXT") int get_type(MemorySegment segment) { return VkIndirectCommandsExecutionSetTokenEXT.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkIndirectExecutionSetInfoTypeEXT") int typeAt(long index) { return VkIndirectCommandsExecutionSetTokenEXT.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkIndirectExecutionSetInfoTypeEXT") int type() { return VkIndirectCommandsExecutionSetTokenEXT.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkIndirectExecutionSetInfoTypeEXT") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkIndirectExecutionSetInfoTypeEXT") int value) { VkIndirectCommandsExecutionSetTokenEXT.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsExecutionSetTokenEXT typeAt(long index, @CType("VkIndirectExecutionSetInfoTypeEXT") int value) { VkIndirectCommandsExecutionSetTokenEXT.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsExecutionSetTokenEXT type(@CType("VkIndirectExecutionSetInfoTypeEXT") int value) { VkIndirectCommandsExecutionSetTokenEXT.set_type(this.segment(), value); return this; } + + /// {@return `shaderStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_shaderStages(MemorySegment segment, long index) { return (int) VH_shaderStages.get(segment, 0L, index); } + /// {@return `shaderStages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_shaderStages(MemorySegment segment) { return VkIndirectCommandsExecutionSetTokenEXT.get_shaderStages(segment, 0L); } + /// {@return `shaderStages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int shaderStagesAt(long index) { return VkIndirectCommandsExecutionSetTokenEXT.get_shaderStages(this.segment(), index); } + /// {@return `shaderStages`} + public @CType("VkShaderStageFlags") int shaderStages() { return VkIndirectCommandsExecutionSetTokenEXT.get_shaderStages(this.segment()); } + /// Sets `shaderStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_shaderStages.set(segment, 0L, index, value); } + /// Sets `shaderStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkIndirectCommandsExecutionSetTokenEXT.set_shaderStages(segment, 0L, value); } + /// Sets `shaderStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsExecutionSetTokenEXT shaderStagesAt(long index, @CType("VkShaderStageFlags") int value) { VkIndirectCommandsExecutionSetTokenEXT.set_shaderStages(this.segment(), index, value); return this; } + /// Sets `shaderStages` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsExecutionSetTokenEXT shaderStages(@CType("VkShaderStageFlags") int value) { VkIndirectCommandsExecutionSetTokenEXT.set_shaderStages(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsIndexBufferTokenEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsIndexBufferTokenEXT.java new file mode 100644 index 00000000..2b3f8011 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsIndexBufferTokenEXT.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectCommandsIndexBufferTokenEXT { +/// VkIndirectCommandsInputModeFlagBitsEXT mode; +/// } VkIndirectCommandsIndexBufferTokenEXT; +/// ``` +public final class VkIndirectCommandsIndexBufferTokenEXT extends Struct { + /// The struct layout of `VkIndirectCommandsIndexBufferTokenEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("mode") + ); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + + /// Creates `VkIndirectCommandsIndexBufferTokenEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectCommandsIndexBufferTokenEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectCommandsIndexBufferTokenEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsIndexBufferTokenEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsIndexBufferTokenEXT(segment); } + + /// Creates `VkIndirectCommandsIndexBufferTokenEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsIndexBufferTokenEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsIndexBufferTokenEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectCommandsIndexBufferTokenEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsIndexBufferTokenEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsIndexBufferTokenEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectCommandsIndexBufferTokenEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectCommandsIndexBufferTokenEXT` + public static VkIndirectCommandsIndexBufferTokenEXT alloc(SegmentAllocator allocator) { return new VkIndirectCommandsIndexBufferTokenEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectCommandsIndexBufferTokenEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectCommandsIndexBufferTokenEXT` + public static VkIndirectCommandsIndexBufferTokenEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectCommandsIndexBufferTokenEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsInputModeFlagBitsEXT") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsInputModeFlagBitsEXT") int get_mode(MemorySegment segment) { return VkIndirectCommandsIndexBufferTokenEXT.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsInputModeFlagBitsEXT") int modeAt(long index) { return VkIndirectCommandsIndexBufferTokenEXT.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkIndirectCommandsInputModeFlagBitsEXT") int mode() { return VkIndirectCommandsIndexBufferTokenEXT.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkIndirectCommandsInputModeFlagBitsEXT") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkIndirectCommandsInputModeFlagBitsEXT") int value) { VkIndirectCommandsIndexBufferTokenEXT.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsIndexBufferTokenEXT modeAt(long index, @CType("VkIndirectCommandsInputModeFlagBitsEXT") int value) { VkIndirectCommandsIndexBufferTokenEXT.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsIndexBufferTokenEXT mode(@CType("VkIndirectCommandsInputModeFlagBitsEXT") int value) { VkIndirectCommandsIndexBufferTokenEXT.set_mode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsLayoutCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsLayoutCreateInfoEXT.java new file mode 100644 index 00000000..b4330266 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsLayoutCreateInfoEXT.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### shaderStages +/// [VarHandle][#VH_shaderStages] - [Getter][#shaderStages()] - [Setter][#shaderStages(int)] +/// ### indirectStride +/// [VarHandle][#VH_indirectStride] - [Getter][#indirectStride()] - [Setter][#indirectStride(int)] +/// ### pipelineLayout +/// [VarHandle][#VH_pipelineLayout] - [Getter][#pipelineLayout()] - [Setter][#pipelineLayout(java.lang.foreign.MemorySegment)] +/// ### tokenCount +/// [VarHandle][#VH_tokenCount] - [Getter][#tokenCount()] - [Setter][#tokenCount(int)] +/// ### pTokens +/// [VarHandle][#VH_pTokens] - [Getter][#pTokens()] - [Setter][#pTokens(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectCommandsLayoutCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkIndirectCommandsLayoutUsageFlagsEXT flags; +/// VkShaderStageFlags shaderStages; +/// uint32_t indirectStride; +/// VkPipelineLayout pipelineLayout; +/// uint32_t tokenCount; +/// const VkIndirectCommandsLayoutTokenEXT * pTokens; +/// } VkIndirectCommandsLayoutCreateInfoEXT; +/// ``` +public final class VkIndirectCommandsLayoutCreateInfoEXT extends Struct { + /// The struct layout of `VkIndirectCommandsLayoutCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("shaderStages"), + ValueLayout.JAVA_INT.withName("indirectStride"), + ValueLayout.ADDRESS.withName("pipelineLayout"), + ValueLayout.JAVA_INT.withName("tokenCount"), + ValueLayout.ADDRESS.withName("pTokens") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `shaderStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStages")); + /// The [VarHandle] of `indirectStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indirectStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectStride")); + /// The [VarHandle] of `pipelineLayout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipelineLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineLayout")); + /// The [VarHandle] of `tokenCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tokenCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tokenCount")); + /// The [VarHandle] of `pTokens` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTokens = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTokens")); + + /// Creates `VkIndirectCommandsLayoutCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectCommandsLayoutCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectCommandsLayoutCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutCreateInfoEXT(segment); } + + /// Creates `VkIndirectCommandsLayoutCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectCommandsLayoutCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectCommandsLayoutCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectCommandsLayoutCreateInfoEXT` + public static VkIndirectCommandsLayoutCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkIndirectCommandsLayoutCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectCommandsLayoutCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectCommandsLayoutCreateInfoEXT` + public static VkIndirectCommandsLayoutCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectCommandsLayoutCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkIndirectCommandsLayoutCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkIndirectCommandsLayoutCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT sType(@CType("VkStructureType") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkIndirectCommandsLayoutCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkIndirectCommandsLayoutCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsLayoutUsageFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsLayoutUsageFlagsEXT") int get_flags(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsLayoutUsageFlagsEXT") int flagsAt(long index) { return VkIndirectCommandsLayoutCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkIndirectCommandsLayoutUsageFlagsEXT") int flags() { return VkIndirectCommandsLayoutCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkIndirectCommandsLayoutUsageFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkIndirectCommandsLayoutUsageFlagsEXT") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT flagsAt(long index, @CType("VkIndirectCommandsLayoutUsageFlagsEXT") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT flags(@CType("VkIndirectCommandsLayoutUsageFlagsEXT") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `shaderStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_shaderStages(MemorySegment segment, long index) { return (int) VH_shaderStages.get(segment, 0L, index); } + /// {@return `shaderStages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_shaderStages(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoEXT.get_shaderStages(segment, 0L); } + /// {@return `shaderStages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int shaderStagesAt(long index) { return VkIndirectCommandsLayoutCreateInfoEXT.get_shaderStages(this.segment(), index); } + /// {@return `shaderStages`} + public @CType("VkShaderStageFlags") int shaderStages() { return VkIndirectCommandsLayoutCreateInfoEXT.get_shaderStages(this.segment()); } + /// Sets `shaderStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_shaderStages.set(segment, 0L, index, value); } + /// Sets `shaderStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_shaderStages(segment, 0L, value); } + /// Sets `shaderStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT shaderStagesAt(long index, @CType("VkShaderStageFlags") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_shaderStages(this.segment(), index, value); return this; } + /// Sets `shaderStages` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT shaderStages(@CType("VkShaderStageFlags") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_shaderStages(this.segment(), value); return this; } + + /// {@return `indirectStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_indirectStride(MemorySegment segment, long index) { return (int) VH_indirectStride.get(segment, 0L, index); } + /// {@return `indirectStride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_indirectStride(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoEXT.get_indirectStride(segment, 0L); } + /// {@return `indirectStride` at the given index} + /// @param index the index + public @CType("uint32_t") int indirectStrideAt(long index) { return VkIndirectCommandsLayoutCreateInfoEXT.get_indirectStride(this.segment(), index); } + /// {@return `indirectStride`} + public @CType("uint32_t") int indirectStride() { return VkIndirectCommandsLayoutCreateInfoEXT.get_indirectStride(this.segment()); } + /// Sets `indirectStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectStride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_indirectStride.set(segment, 0L, index, value); } + /// Sets `indirectStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectStride(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_indirectStride(segment, 0L, value); } + /// Sets `indirectStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT indirectStrideAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_indirectStride(this.segment(), index, value); return this; } + /// Sets `indirectStride` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT indirectStride(@CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_indirectStride(this.segment(), value); return this; } + + /// {@return `pipelineLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_pipelineLayout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipelineLayout.get(segment, 0L, index); } + /// {@return `pipelineLayout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_pipelineLayout(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoEXT.get_pipelineLayout(segment, 0L); } + /// {@return `pipelineLayout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment pipelineLayoutAt(long index) { return VkIndirectCommandsLayoutCreateInfoEXT.get_pipelineLayout(this.segment(), index); } + /// {@return `pipelineLayout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment pipelineLayout() { return VkIndirectCommandsLayoutCreateInfoEXT.get_pipelineLayout(this.segment()); } + /// Sets `pipelineLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineLayout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_pipelineLayout.set(segment, 0L, index, value); } + /// Sets `pipelineLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineLayout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoEXT.set_pipelineLayout(segment, 0L, value); } + /// Sets `pipelineLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT pipelineLayoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoEXT.set_pipelineLayout(this.segment(), index, value); return this; } + /// Sets `pipelineLayout` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT pipelineLayout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoEXT.set_pipelineLayout(this.segment(), value); return this; } + + /// {@return `tokenCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_tokenCount(MemorySegment segment, long index) { return (int) VH_tokenCount.get(segment, 0L, index); } + /// {@return `tokenCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_tokenCount(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoEXT.get_tokenCount(segment, 0L); } + /// {@return `tokenCount` at the given index} + /// @param index the index + public @CType("uint32_t") int tokenCountAt(long index) { return VkIndirectCommandsLayoutCreateInfoEXT.get_tokenCount(this.segment(), index); } + /// {@return `tokenCount`} + public @CType("uint32_t") int tokenCount() { return VkIndirectCommandsLayoutCreateInfoEXT.get_tokenCount(this.segment()); } + /// Sets `tokenCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tokenCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_tokenCount.set(segment, 0L, index, value); } + /// Sets `tokenCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tokenCount(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_tokenCount(segment, 0L, value); } + /// Sets `tokenCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT tokenCountAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_tokenCount(this.segment(), index, value); return this; } + /// Sets `tokenCount` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT tokenCount(@CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoEXT.set_tokenCount(this.segment(), value); return this; } + + /// {@return `pTokens` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndirectCommandsLayoutTokenEXT *") java.lang.foreign.MemorySegment get_pTokens(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTokens.get(segment, 0L, index); } + /// {@return `pTokens`} + /// @param segment the segment of the struct + public static @CType("const VkIndirectCommandsLayoutTokenEXT *") java.lang.foreign.MemorySegment get_pTokens(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoEXT.get_pTokens(segment, 0L); } + /// {@return `pTokens` at the given index} + /// @param index the index + public @CType("const VkIndirectCommandsLayoutTokenEXT *") java.lang.foreign.MemorySegment pTokensAt(long index) { return VkIndirectCommandsLayoutCreateInfoEXT.get_pTokens(this.segment(), index); } + /// {@return `pTokens`} + public @CType("const VkIndirectCommandsLayoutTokenEXT *") java.lang.foreign.MemorySegment pTokens() { return VkIndirectCommandsLayoutCreateInfoEXT.get_pTokens(this.segment()); } + /// Sets `pTokens` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTokens(MemorySegment segment, long index, @CType("const VkIndirectCommandsLayoutTokenEXT *") java.lang.foreign.MemorySegment value) { VH_pTokens.set(segment, 0L, index, value); } + /// Sets `pTokens` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTokens(MemorySegment segment, @CType("const VkIndirectCommandsLayoutTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoEXT.set_pTokens(segment, 0L, value); } + /// Sets `pTokens` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT pTokensAt(long index, @CType("const VkIndirectCommandsLayoutTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoEXT.set_pTokens(this.segment(), index, value); return this; } + /// Sets `pTokens` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoEXT pTokens(@CType("const VkIndirectCommandsLayoutTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoEXT.set_pTokens(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsLayoutTokenEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsLayoutTokenEXT.java new file mode 100644 index 00000000..c4345308 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsLayoutTokenEXT.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### data +/// [Byte offset][#OFFSET_data] - [Memory layout][#ML_data] - [Getter][#data()] - [Setter][#data(java.lang.foreign.MemorySegment)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectCommandsLayoutTokenEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkIndirectCommandsTokenTypeEXT type; +/// VkIndirectCommandsTokenDataEXT data; +/// uint32_t offset; +/// } VkIndirectCommandsLayoutTokenEXT; +/// ``` +public final class VkIndirectCommandsLayoutTokenEXT extends Struct { + /// The struct layout of `VkIndirectCommandsLayoutTokenEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type"), + overrungl.vulkan.ext.union.VkIndirectCommandsTokenDataEXT.LAYOUT.withName("data"), + ValueLayout.JAVA_INT.withName("offset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The byte offset of `data`. + public static final long OFFSET_data = LAYOUT.byteOffset(PathElement.groupElement("data")); + /// The memory layout of `data`. + public static final MemoryLayout ML_data = LAYOUT.select(PathElement.groupElement("data")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + + /// Creates `VkIndirectCommandsLayoutTokenEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectCommandsLayoutTokenEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectCommandsLayoutTokenEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutTokenEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutTokenEXT(segment); } + + /// Creates `VkIndirectCommandsLayoutTokenEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutTokenEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutTokenEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectCommandsLayoutTokenEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutTokenEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutTokenEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectCommandsLayoutTokenEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectCommandsLayoutTokenEXT` + public static VkIndirectCommandsLayoutTokenEXT alloc(SegmentAllocator allocator) { return new VkIndirectCommandsLayoutTokenEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectCommandsLayoutTokenEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectCommandsLayoutTokenEXT` + public static VkIndirectCommandsLayoutTokenEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectCommandsLayoutTokenEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkIndirectCommandsLayoutTokenEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkIndirectCommandsLayoutTokenEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkIndirectCommandsLayoutTokenEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkIndirectCommandsLayoutTokenEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkIndirectCommandsLayoutTokenEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenEXT sType(@CType("VkStructureType") int value) { VkIndirectCommandsLayoutTokenEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkIndirectCommandsLayoutTokenEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkIndirectCommandsLayoutTokenEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkIndirectCommandsLayoutTokenEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsTokenTypeEXT") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsTokenTypeEXT") int get_type(MemorySegment segment) { return VkIndirectCommandsLayoutTokenEXT.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsTokenTypeEXT") int typeAt(long index) { return VkIndirectCommandsLayoutTokenEXT.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkIndirectCommandsTokenTypeEXT") int type() { return VkIndirectCommandsLayoutTokenEXT.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkIndirectCommandsTokenTypeEXT") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkIndirectCommandsTokenTypeEXT") int value) { VkIndirectCommandsLayoutTokenEXT.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenEXT typeAt(long index, @CType("VkIndirectCommandsTokenTypeEXT") int value) { VkIndirectCommandsLayoutTokenEXT.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenEXT type(@CType("VkIndirectCommandsTokenTypeEXT") int value) { VkIndirectCommandsLayoutTokenEXT.set_type(this.segment(), value); return this; } + + /// {@return `data` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsTokenDataEXT") java.lang.foreign.MemorySegment get_data(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_data, index), ML_data); } + /// {@return `data`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsTokenDataEXT") java.lang.foreign.MemorySegment get_data(MemorySegment segment) { return VkIndirectCommandsLayoutTokenEXT.get_data(segment, 0L); } + /// {@return `data` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsTokenDataEXT") java.lang.foreign.MemorySegment dataAt(long index) { return VkIndirectCommandsLayoutTokenEXT.get_data(this.segment(), index); } + /// {@return `data`} + public @CType("VkIndirectCommandsTokenDataEXT") java.lang.foreign.MemorySegment data() { return VkIndirectCommandsLayoutTokenEXT.get_data(this.segment()); } + /// Sets `data` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_data(MemorySegment segment, long index, @CType("VkIndirectCommandsTokenDataEXT") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_data, index), ML_data.byteSize()); } + /// Sets `data` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_data(MemorySegment segment, @CType("VkIndirectCommandsTokenDataEXT") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenEXT.set_data(segment, 0L, value); } + /// Sets `data` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenEXT dataAt(long index, @CType("VkIndirectCommandsTokenDataEXT") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenEXT.set_data(this.segment(), index, value); return this; } + /// Sets `data` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenEXT data(@CType("VkIndirectCommandsTokenDataEXT") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenEXT.set_data(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_offset(MemorySegment segment, long index) { return (int) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_offset(MemorySegment segment) { return VkIndirectCommandsLayoutTokenEXT.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("uint32_t") int offsetAt(long index) { return VkIndirectCommandsLayoutTokenEXT.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("uint32_t") int offset() { return VkIndirectCommandsLayoutTokenEXT.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenEXT.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenEXT offsetAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenEXT.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenEXT offset(@CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenEXT.set_offset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsPushConstantTokenEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsPushConstantTokenEXT.java new file mode 100644 index 00000000..a424cf54 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsPushConstantTokenEXT.java @@ -0,0 +1,113 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### updateRange +/// [Byte offset][#OFFSET_updateRange] - [Memory layout][#ML_updateRange] - [Getter][#updateRange()] - [Setter][#updateRange(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectCommandsPushConstantTokenEXT { +/// VkPushConstantRange updateRange; +/// } VkIndirectCommandsPushConstantTokenEXT; +/// ``` +public final class VkIndirectCommandsPushConstantTokenEXT extends Struct { + /// The struct layout of `VkIndirectCommandsPushConstantTokenEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkPushConstantRange.LAYOUT.withName("updateRange") + ); + /// The byte offset of `updateRange`. + public static final long OFFSET_updateRange = LAYOUT.byteOffset(PathElement.groupElement("updateRange")); + /// The memory layout of `updateRange`. + public static final MemoryLayout ML_updateRange = LAYOUT.select(PathElement.groupElement("updateRange")); + + /// Creates `VkIndirectCommandsPushConstantTokenEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectCommandsPushConstantTokenEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectCommandsPushConstantTokenEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsPushConstantTokenEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsPushConstantTokenEXT(segment); } + + /// Creates `VkIndirectCommandsPushConstantTokenEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsPushConstantTokenEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsPushConstantTokenEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectCommandsPushConstantTokenEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsPushConstantTokenEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsPushConstantTokenEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectCommandsPushConstantTokenEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectCommandsPushConstantTokenEXT` + public static VkIndirectCommandsPushConstantTokenEXT alloc(SegmentAllocator allocator) { return new VkIndirectCommandsPushConstantTokenEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectCommandsPushConstantTokenEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectCommandsPushConstantTokenEXT` + public static VkIndirectCommandsPushConstantTokenEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectCommandsPushConstantTokenEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `updateRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPushConstantRange") java.lang.foreign.MemorySegment get_updateRange(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_updateRange, index), ML_updateRange); } + /// {@return `updateRange`} + /// @param segment the segment of the struct + public static @CType("VkPushConstantRange") java.lang.foreign.MemorySegment get_updateRange(MemorySegment segment) { return VkIndirectCommandsPushConstantTokenEXT.get_updateRange(segment, 0L); } + /// {@return `updateRange` at the given index} + /// @param index the index + public @CType("VkPushConstantRange") java.lang.foreign.MemorySegment updateRangeAt(long index) { return VkIndirectCommandsPushConstantTokenEXT.get_updateRange(this.segment(), index); } + /// {@return `updateRange`} + public @CType("VkPushConstantRange") java.lang.foreign.MemorySegment updateRange() { return VkIndirectCommandsPushConstantTokenEXT.get_updateRange(this.segment()); } + /// Sets `updateRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_updateRange(MemorySegment segment, long index, @CType("VkPushConstantRange") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_updateRange, index), ML_updateRange.byteSize()); } + /// Sets `updateRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_updateRange(MemorySegment segment, @CType("VkPushConstantRange") java.lang.foreign.MemorySegment value) { VkIndirectCommandsPushConstantTokenEXT.set_updateRange(segment, 0L, value); } + /// Sets `updateRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsPushConstantTokenEXT updateRangeAt(long index, @CType("VkPushConstantRange") java.lang.foreign.MemorySegment value) { VkIndirectCommandsPushConstantTokenEXT.set_updateRange(this.segment(), index, value); return this; } + /// Sets `updateRange` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsPushConstantTokenEXT updateRange(@CType("VkPushConstantRange") java.lang.foreign.MemorySegment value) { VkIndirectCommandsPushConstantTokenEXT.set_updateRange(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsVertexBufferTokenEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsVertexBufferTokenEXT.java new file mode 100644 index 00000000..03d1916d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectCommandsVertexBufferTokenEXT.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### vertexBindingUnit +/// [VarHandle][#VH_vertexBindingUnit] - [Getter][#vertexBindingUnit()] - [Setter][#vertexBindingUnit(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectCommandsVertexBufferTokenEXT { +/// uint32_t vertexBindingUnit; +/// } VkIndirectCommandsVertexBufferTokenEXT; +/// ``` +public final class VkIndirectCommandsVertexBufferTokenEXT extends Struct { + /// The struct layout of `VkIndirectCommandsVertexBufferTokenEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("vertexBindingUnit") + ); + /// The [VarHandle] of `vertexBindingUnit` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexBindingUnit = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexBindingUnit")); + + /// Creates `VkIndirectCommandsVertexBufferTokenEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectCommandsVertexBufferTokenEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectCommandsVertexBufferTokenEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsVertexBufferTokenEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsVertexBufferTokenEXT(segment); } + + /// Creates `VkIndirectCommandsVertexBufferTokenEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsVertexBufferTokenEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsVertexBufferTokenEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectCommandsVertexBufferTokenEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsVertexBufferTokenEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsVertexBufferTokenEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectCommandsVertexBufferTokenEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectCommandsVertexBufferTokenEXT` + public static VkIndirectCommandsVertexBufferTokenEXT alloc(SegmentAllocator allocator) { return new VkIndirectCommandsVertexBufferTokenEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectCommandsVertexBufferTokenEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectCommandsVertexBufferTokenEXT` + public static VkIndirectCommandsVertexBufferTokenEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectCommandsVertexBufferTokenEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `vertexBindingUnit` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vertexBindingUnit(MemorySegment segment, long index) { return (int) VH_vertexBindingUnit.get(segment, 0L, index); } + /// {@return `vertexBindingUnit`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vertexBindingUnit(MemorySegment segment) { return VkIndirectCommandsVertexBufferTokenEXT.get_vertexBindingUnit(segment, 0L); } + /// {@return `vertexBindingUnit` at the given index} + /// @param index the index + public @CType("uint32_t") int vertexBindingUnitAt(long index) { return VkIndirectCommandsVertexBufferTokenEXT.get_vertexBindingUnit(this.segment(), index); } + /// {@return `vertexBindingUnit`} + public @CType("uint32_t") int vertexBindingUnit() { return VkIndirectCommandsVertexBufferTokenEXT.get_vertexBindingUnit(this.segment()); } + /// Sets `vertexBindingUnit` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexBindingUnit(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vertexBindingUnit.set(segment, 0L, index, value); } + /// Sets `vertexBindingUnit` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexBindingUnit(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsVertexBufferTokenEXT.set_vertexBindingUnit(segment, 0L, value); } + /// Sets `vertexBindingUnit` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsVertexBufferTokenEXT vertexBindingUnitAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsVertexBufferTokenEXT.set_vertexBindingUnit(this.segment(), index, value); return this; } + /// Sets `vertexBindingUnit` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsVertexBufferTokenEXT vertexBindingUnit(@CType("uint32_t") int value) { VkIndirectCommandsVertexBufferTokenEXT.set_vertexBindingUnit(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetCreateInfoEXT.java new file mode 100644 index 00000000..958f8053 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetCreateInfoEXT.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### info +/// [Byte offset][#OFFSET_info] - [Memory layout][#ML_info] - [Getter][#info()] - [Setter][#info(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectExecutionSetCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkIndirectExecutionSetInfoTypeEXT type; +/// VkIndirectExecutionSetInfoEXT info; +/// } VkIndirectExecutionSetCreateInfoEXT; +/// ``` +public final class VkIndirectExecutionSetCreateInfoEXT extends Struct { + /// The struct layout of `VkIndirectExecutionSetCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type"), + overrungl.vulkan.ext.union.VkIndirectExecutionSetInfoEXT.LAYOUT.withName("info") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The byte offset of `info`. + public static final long OFFSET_info = LAYOUT.byteOffset(PathElement.groupElement("info")); + /// The memory layout of `info`. + public static final MemoryLayout ML_info = LAYOUT.select(PathElement.groupElement("info")); + + /// Creates `VkIndirectExecutionSetCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectExecutionSetCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectExecutionSetCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetCreateInfoEXT(segment); } + + /// Creates `VkIndirectExecutionSetCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectExecutionSetCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectExecutionSetCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectExecutionSetCreateInfoEXT` + public static VkIndirectExecutionSetCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkIndirectExecutionSetCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectExecutionSetCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectExecutionSetCreateInfoEXT` + public static VkIndirectExecutionSetCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectExecutionSetCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkIndirectExecutionSetCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkIndirectExecutionSetCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkIndirectExecutionSetCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkIndirectExecutionSetCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkIndirectExecutionSetCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetCreateInfoEXT sType(@CType("VkStructureType") int value) { VkIndirectExecutionSetCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkIndirectExecutionSetCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkIndirectExecutionSetCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkIndirectExecutionSetCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectExecutionSetInfoTypeEXT") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkIndirectExecutionSetInfoTypeEXT") int get_type(MemorySegment segment) { return VkIndirectExecutionSetCreateInfoEXT.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkIndirectExecutionSetInfoTypeEXT") int typeAt(long index) { return VkIndirectExecutionSetCreateInfoEXT.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkIndirectExecutionSetInfoTypeEXT") int type() { return VkIndirectExecutionSetCreateInfoEXT.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkIndirectExecutionSetInfoTypeEXT") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkIndirectExecutionSetInfoTypeEXT") int value) { VkIndirectExecutionSetCreateInfoEXT.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetCreateInfoEXT typeAt(long index, @CType("VkIndirectExecutionSetInfoTypeEXT") int value) { VkIndirectExecutionSetCreateInfoEXT.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetCreateInfoEXT type(@CType("VkIndirectExecutionSetInfoTypeEXT") int value) { VkIndirectExecutionSetCreateInfoEXT.set_type(this.segment(), value); return this; } + + /// {@return `info` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectExecutionSetInfoEXT") java.lang.foreign.MemorySegment get_info(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_info, index), ML_info); } + /// {@return `info`} + /// @param segment the segment of the struct + public static @CType("VkIndirectExecutionSetInfoEXT") java.lang.foreign.MemorySegment get_info(MemorySegment segment) { return VkIndirectExecutionSetCreateInfoEXT.get_info(segment, 0L); } + /// {@return `info` at the given index} + /// @param index the index + public @CType("VkIndirectExecutionSetInfoEXT") java.lang.foreign.MemorySegment infoAt(long index) { return VkIndirectExecutionSetCreateInfoEXT.get_info(this.segment(), index); } + /// {@return `info`} + public @CType("VkIndirectExecutionSetInfoEXT") java.lang.foreign.MemorySegment info() { return VkIndirectExecutionSetCreateInfoEXT.get_info(this.segment()); } + /// Sets `info` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_info(MemorySegment segment, long index, @CType("VkIndirectExecutionSetInfoEXT") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_info, index), ML_info.byteSize()); } + /// Sets `info` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_info(MemorySegment segment, @CType("VkIndirectExecutionSetInfoEXT") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetCreateInfoEXT.set_info(segment, 0L, value); } + /// Sets `info` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetCreateInfoEXT infoAt(long index, @CType("VkIndirectExecutionSetInfoEXT") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetCreateInfoEXT.set_info(this.segment(), index, value); return this; } + /// Sets `info` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetCreateInfoEXT info(@CType("VkIndirectExecutionSetInfoEXT") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetCreateInfoEXT.set_info(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetPipelineInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetPipelineInfoEXT.java new file mode 100644 index 00000000..4099505f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetPipelineInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### initialPipeline +/// [VarHandle][#VH_initialPipeline] - [Getter][#initialPipeline()] - [Setter][#initialPipeline(java.lang.foreign.MemorySegment)] +/// ### maxPipelineCount +/// [VarHandle][#VH_maxPipelineCount] - [Getter][#maxPipelineCount()] - [Setter][#maxPipelineCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectExecutionSetPipelineInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipeline initialPipeline; +/// uint32_t maxPipelineCount; +/// } VkIndirectExecutionSetPipelineInfoEXT; +/// ``` +public final class VkIndirectExecutionSetPipelineInfoEXT extends Struct { + /// The struct layout of `VkIndirectExecutionSetPipelineInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("initialPipeline"), + ValueLayout.JAVA_INT.withName("maxPipelineCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `initialPipeline` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_initialPipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initialPipeline")); + /// The [VarHandle] of `maxPipelineCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPipelineCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPipelineCount")); + + /// Creates `VkIndirectExecutionSetPipelineInfoEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectExecutionSetPipelineInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectExecutionSetPipelineInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetPipelineInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetPipelineInfoEXT(segment); } + + /// Creates `VkIndirectExecutionSetPipelineInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetPipelineInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetPipelineInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectExecutionSetPipelineInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetPipelineInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetPipelineInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectExecutionSetPipelineInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectExecutionSetPipelineInfoEXT` + public static VkIndirectExecutionSetPipelineInfoEXT alloc(SegmentAllocator allocator) { return new VkIndirectExecutionSetPipelineInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectExecutionSetPipelineInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectExecutionSetPipelineInfoEXT` + public static VkIndirectExecutionSetPipelineInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectExecutionSetPipelineInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkIndirectExecutionSetPipelineInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkIndirectExecutionSetPipelineInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkIndirectExecutionSetPipelineInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkIndirectExecutionSetPipelineInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetPipelineInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkIndirectExecutionSetPipelineInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetPipelineInfoEXT sType(@CType("VkStructureType") int value) { VkIndirectExecutionSetPipelineInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkIndirectExecutionSetPipelineInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkIndirectExecutionSetPipelineInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkIndirectExecutionSetPipelineInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetPipelineInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetPipelineInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetPipelineInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetPipelineInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetPipelineInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `initialPipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_initialPipeline(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_initialPipeline.get(segment, 0L, index); } + /// {@return `initialPipeline`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_initialPipeline(MemorySegment segment) { return VkIndirectExecutionSetPipelineInfoEXT.get_initialPipeline(segment, 0L); } + /// {@return `initialPipeline` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment initialPipelineAt(long index) { return VkIndirectExecutionSetPipelineInfoEXT.get_initialPipeline(this.segment(), index); } + /// {@return `initialPipeline`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment initialPipeline() { return VkIndirectExecutionSetPipelineInfoEXT.get_initialPipeline(this.segment()); } + /// Sets `initialPipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initialPipeline(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_initialPipeline.set(segment, 0L, index, value); } + /// Sets `initialPipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initialPipeline(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetPipelineInfoEXT.set_initialPipeline(segment, 0L, value); } + /// Sets `initialPipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetPipelineInfoEXT initialPipelineAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetPipelineInfoEXT.set_initialPipeline(this.segment(), index, value); return this; } + /// Sets `initialPipeline` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetPipelineInfoEXT initialPipeline(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetPipelineInfoEXT.set_initialPipeline(this.segment(), value); return this; } + + /// {@return `maxPipelineCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPipelineCount(MemorySegment segment, long index) { return (int) VH_maxPipelineCount.get(segment, 0L, index); } + /// {@return `maxPipelineCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPipelineCount(MemorySegment segment) { return VkIndirectExecutionSetPipelineInfoEXT.get_maxPipelineCount(segment, 0L); } + /// {@return `maxPipelineCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPipelineCountAt(long index) { return VkIndirectExecutionSetPipelineInfoEXT.get_maxPipelineCount(this.segment(), index); } + /// {@return `maxPipelineCount`} + public @CType("uint32_t") int maxPipelineCount() { return VkIndirectExecutionSetPipelineInfoEXT.get_maxPipelineCount(this.segment()); } + /// Sets `maxPipelineCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPipelineCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPipelineCount.set(segment, 0L, index, value); } + /// Sets `maxPipelineCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPipelineCount(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectExecutionSetPipelineInfoEXT.set_maxPipelineCount(segment, 0L, value); } + /// Sets `maxPipelineCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetPipelineInfoEXT maxPipelineCountAt(long index, @CType("uint32_t") int value) { VkIndirectExecutionSetPipelineInfoEXT.set_maxPipelineCount(this.segment(), index, value); return this; } + /// Sets `maxPipelineCount` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetPipelineInfoEXT maxPipelineCount(@CType("uint32_t") int value) { VkIndirectExecutionSetPipelineInfoEXT.set_maxPipelineCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetShaderInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetShaderInfoEXT.java new file mode 100644 index 00000000..124bd508 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetShaderInfoEXT.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderCount +/// [VarHandle][#VH_shaderCount] - [Getter][#shaderCount()] - [Setter][#shaderCount(int)] +/// ### pInitialShaders +/// [VarHandle][#VH_pInitialShaders] - [Getter][#pInitialShaders()] - [Setter][#pInitialShaders(java.lang.foreign.MemorySegment)] +/// ### pSetLayoutInfos +/// [VarHandle][#VH_pSetLayoutInfos] - [Getter][#pSetLayoutInfos()] - [Setter][#pSetLayoutInfos(java.lang.foreign.MemorySegment)] +/// ### maxShaderCount +/// [VarHandle][#VH_maxShaderCount] - [Getter][#maxShaderCount()] - [Setter][#maxShaderCount(int)] +/// ### pushConstantRangeCount +/// [VarHandle][#VH_pushConstantRangeCount] - [Getter][#pushConstantRangeCount()] - [Setter][#pushConstantRangeCount(int)] +/// ### pPushConstantRanges +/// [VarHandle][#VH_pPushConstantRanges] - [Getter][#pPushConstantRanges()] - [Setter][#pPushConstantRanges(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectExecutionSetShaderInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t shaderCount; +/// const VkShaderEXT * pInitialShaders; +/// const VkIndirectExecutionSetShaderLayoutInfoEXT * pSetLayoutInfos; +/// uint32_t maxShaderCount; +/// uint32_t pushConstantRangeCount; +/// const VkPushConstantRange * pPushConstantRanges; +/// } VkIndirectExecutionSetShaderInfoEXT; +/// ``` +public final class VkIndirectExecutionSetShaderInfoEXT extends Struct { + /// The struct layout of `VkIndirectExecutionSetShaderInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderCount"), + ValueLayout.ADDRESS.withName("pInitialShaders"), + ValueLayout.ADDRESS.withName("pSetLayoutInfos"), + ValueLayout.JAVA_INT.withName("maxShaderCount"), + ValueLayout.JAVA_INT.withName("pushConstantRangeCount"), + ValueLayout.ADDRESS.withName("pPushConstantRanges") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderCount")); + /// The [VarHandle] of `pInitialShaders` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pInitialShaders = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pInitialShaders")); + /// The [VarHandle] of `pSetLayoutInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSetLayoutInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSetLayoutInfos")); + /// The [VarHandle] of `maxShaderCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxShaderCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxShaderCount")); + /// The [VarHandle] of `pushConstantRangeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pushConstantRangeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pushConstantRangeCount")); + /// The [VarHandle] of `pPushConstantRanges` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPushConstantRanges = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPushConstantRanges")); + + /// Creates `VkIndirectExecutionSetShaderInfoEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectExecutionSetShaderInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectExecutionSetShaderInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetShaderInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetShaderInfoEXT(segment); } + + /// Creates `VkIndirectExecutionSetShaderInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetShaderInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetShaderInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectExecutionSetShaderInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetShaderInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetShaderInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectExecutionSetShaderInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectExecutionSetShaderInfoEXT` + public static VkIndirectExecutionSetShaderInfoEXT alloc(SegmentAllocator allocator) { return new VkIndirectExecutionSetShaderInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectExecutionSetShaderInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectExecutionSetShaderInfoEXT` + public static VkIndirectExecutionSetShaderInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectExecutionSetShaderInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkIndirectExecutionSetShaderInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkIndirectExecutionSetShaderInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkIndirectExecutionSetShaderInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkIndirectExecutionSetShaderInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkIndirectExecutionSetShaderInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT sType(@CType("VkStructureType") int value) { VkIndirectExecutionSetShaderInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkIndirectExecutionSetShaderInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkIndirectExecutionSetShaderInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkIndirectExecutionSetShaderInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderCount(MemorySegment segment, long index) { return (int) VH_shaderCount.get(segment, 0L, index); } + /// {@return `shaderCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderCount(MemorySegment segment) { return VkIndirectExecutionSetShaderInfoEXT.get_shaderCount(segment, 0L); } + /// {@return `shaderCount` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderCountAt(long index) { return VkIndirectExecutionSetShaderInfoEXT.get_shaderCount(this.segment(), index); } + /// {@return `shaderCount`} + public @CType("uint32_t") int shaderCount() { return VkIndirectExecutionSetShaderInfoEXT.get_shaderCount(this.segment()); } + /// Sets `shaderCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderCount.set(segment, 0L, index, value); } + /// Sets `shaderCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderCount(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectExecutionSetShaderInfoEXT.set_shaderCount(segment, 0L, value); } + /// Sets `shaderCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT shaderCountAt(long index, @CType("uint32_t") int value) { VkIndirectExecutionSetShaderInfoEXT.set_shaderCount(this.segment(), index, value); return this; } + /// Sets `shaderCount` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT shaderCount(@CType("uint32_t") int value) { VkIndirectExecutionSetShaderInfoEXT.set_shaderCount(this.segment(), value); return this; } + + /// {@return `pInitialShaders` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment get_pInitialShaders(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pInitialShaders.get(segment, 0L, index); } + /// {@return `pInitialShaders`} + /// @param segment the segment of the struct + public static @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment get_pInitialShaders(MemorySegment segment) { return VkIndirectExecutionSetShaderInfoEXT.get_pInitialShaders(segment, 0L); } + /// {@return `pInitialShaders` at the given index} + /// @param index the index + public @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment pInitialShadersAt(long index) { return VkIndirectExecutionSetShaderInfoEXT.get_pInitialShaders(this.segment(), index); } + /// {@return `pInitialShaders`} + public @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment pInitialShaders() { return VkIndirectExecutionSetShaderInfoEXT.get_pInitialShaders(this.segment()); } + /// Sets `pInitialShaders` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pInitialShaders(MemorySegment segment, long index, @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment value) { VH_pInitialShaders.set(segment, 0L, index, value); } + /// Sets `pInitialShaders` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pInitialShaders(MemorySegment segment, @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pInitialShaders(segment, 0L, value); } + /// Sets `pInitialShaders` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT pInitialShadersAt(long index, @CType("const VkShaderEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pInitialShaders(this.segment(), index, value); return this; } + /// Sets `pInitialShaders` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT pInitialShaders(@CType("const VkShaderEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pInitialShaders(this.segment(), value); return this; } + + /// {@return `pSetLayoutInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndirectExecutionSetShaderLayoutInfoEXT *") java.lang.foreign.MemorySegment get_pSetLayoutInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSetLayoutInfos.get(segment, 0L, index); } + /// {@return `pSetLayoutInfos`} + /// @param segment the segment of the struct + public static @CType("const VkIndirectExecutionSetShaderLayoutInfoEXT *") java.lang.foreign.MemorySegment get_pSetLayoutInfos(MemorySegment segment) { return VkIndirectExecutionSetShaderInfoEXT.get_pSetLayoutInfos(segment, 0L); } + /// {@return `pSetLayoutInfos` at the given index} + /// @param index the index + public @CType("const VkIndirectExecutionSetShaderLayoutInfoEXT *") java.lang.foreign.MemorySegment pSetLayoutInfosAt(long index) { return VkIndirectExecutionSetShaderInfoEXT.get_pSetLayoutInfos(this.segment(), index); } + /// {@return `pSetLayoutInfos`} + public @CType("const VkIndirectExecutionSetShaderLayoutInfoEXT *") java.lang.foreign.MemorySegment pSetLayoutInfos() { return VkIndirectExecutionSetShaderInfoEXT.get_pSetLayoutInfos(this.segment()); } + /// Sets `pSetLayoutInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSetLayoutInfos(MemorySegment segment, long index, @CType("const VkIndirectExecutionSetShaderLayoutInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pSetLayoutInfos.set(segment, 0L, index, value); } + /// Sets `pSetLayoutInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSetLayoutInfos(MemorySegment segment, @CType("const VkIndirectExecutionSetShaderLayoutInfoEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pSetLayoutInfos(segment, 0L, value); } + /// Sets `pSetLayoutInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT pSetLayoutInfosAt(long index, @CType("const VkIndirectExecutionSetShaderLayoutInfoEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pSetLayoutInfos(this.segment(), index, value); return this; } + /// Sets `pSetLayoutInfos` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT pSetLayoutInfos(@CType("const VkIndirectExecutionSetShaderLayoutInfoEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pSetLayoutInfos(this.segment(), value); return this; } + + /// {@return `maxShaderCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxShaderCount(MemorySegment segment, long index) { return (int) VH_maxShaderCount.get(segment, 0L, index); } + /// {@return `maxShaderCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxShaderCount(MemorySegment segment) { return VkIndirectExecutionSetShaderInfoEXT.get_maxShaderCount(segment, 0L); } + /// {@return `maxShaderCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxShaderCountAt(long index) { return VkIndirectExecutionSetShaderInfoEXT.get_maxShaderCount(this.segment(), index); } + /// {@return `maxShaderCount`} + public @CType("uint32_t") int maxShaderCount() { return VkIndirectExecutionSetShaderInfoEXT.get_maxShaderCount(this.segment()); } + /// Sets `maxShaderCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxShaderCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxShaderCount.set(segment, 0L, index, value); } + /// Sets `maxShaderCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxShaderCount(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectExecutionSetShaderInfoEXT.set_maxShaderCount(segment, 0L, value); } + /// Sets `maxShaderCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT maxShaderCountAt(long index, @CType("uint32_t") int value) { VkIndirectExecutionSetShaderInfoEXT.set_maxShaderCount(this.segment(), index, value); return this; } + /// Sets `maxShaderCount` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT maxShaderCount(@CType("uint32_t") int value) { VkIndirectExecutionSetShaderInfoEXT.set_maxShaderCount(this.segment(), value); return this; } + + /// {@return `pushConstantRangeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pushConstantRangeCount(MemorySegment segment, long index) { return (int) VH_pushConstantRangeCount.get(segment, 0L, index); } + /// {@return `pushConstantRangeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pushConstantRangeCount(MemorySegment segment) { return VkIndirectExecutionSetShaderInfoEXT.get_pushConstantRangeCount(segment, 0L); } + /// {@return `pushConstantRangeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pushConstantRangeCountAt(long index) { return VkIndirectExecutionSetShaderInfoEXT.get_pushConstantRangeCount(this.segment(), index); } + /// {@return `pushConstantRangeCount`} + public @CType("uint32_t") int pushConstantRangeCount() { return VkIndirectExecutionSetShaderInfoEXT.get_pushConstantRangeCount(this.segment()); } + /// Sets `pushConstantRangeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pushConstantRangeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pushConstantRangeCount.set(segment, 0L, index, value); } + /// Sets `pushConstantRangeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pushConstantRangeCount(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectExecutionSetShaderInfoEXT.set_pushConstantRangeCount(segment, 0L, value); } + /// Sets `pushConstantRangeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT pushConstantRangeCountAt(long index, @CType("uint32_t") int value) { VkIndirectExecutionSetShaderInfoEXT.set_pushConstantRangeCount(this.segment(), index, value); return this; } + /// Sets `pushConstantRangeCount` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT pushConstantRangeCount(@CType("uint32_t") int value) { VkIndirectExecutionSetShaderInfoEXT.set_pushConstantRangeCount(this.segment(), value); return this; } + + /// {@return `pPushConstantRanges` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment get_pPushConstantRanges(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPushConstantRanges.get(segment, 0L, index); } + /// {@return `pPushConstantRanges`} + /// @param segment the segment of the struct + public static @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment get_pPushConstantRanges(MemorySegment segment) { return VkIndirectExecutionSetShaderInfoEXT.get_pPushConstantRanges(segment, 0L); } + /// {@return `pPushConstantRanges` at the given index} + /// @param index the index + public @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment pPushConstantRangesAt(long index) { return VkIndirectExecutionSetShaderInfoEXT.get_pPushConstantRanges(this.segment(), index); } + /// {@return `pPushConstantRanges`} + public @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment pPushConstantRanges() { return VkIndirectExecutionSetShaderInfoEXT.get_pPushConstantRanges(this.segment()); } + /// Sets `pPushConstantRanges` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPushConstantRanges(MemorySegment segment, long index, @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VH_pPushConstantRanges.set(segment, 0L, index, value); } + /// Sets `pPushConstantRanges` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPushConstantRanges(MemorySegment segment, @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pPushConstantRanges(segment, 0L, value); } + /// Sets `pPushConstantRanges` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT pPushConstantRangesAt(long index, @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pPushConstantRanges(this.segment(), index, value); return this; } + /// Sets `pPushConstantRanges` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderInfoEXT pPushConstantRanges(@CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderInfoEXT.set_pPushConstantRanges(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetShaderLayoutInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetShaderLayoutInfoEXT.java new file mode 100644 index 00000000..91c47b15 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkIndirectExecutionSetShaderLayoutInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### setLayoutCount +/// [VarHandle][#VH_setLayoutCount] - [Getter][#setLayoutCount()] - [Setter][#setLayoutCount(int)] +/// ### pSetLayouts +/// [VarHandle][#VH_pSetLayouts] - [Getter][#pSetLayouts()] - [Setter][#pSetLayouts(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectExecutionSetShaderLayoutInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t setLayoutCount; +/// const VkDescriptorSetLayout * pSetLayouts; +/// } VkIndirectExecutionSetShaderLayoutInfoEXT; +/// ``` +public final class VkIndirectExecutionSetShaderLayoutInfoEXT extends Struct { + /// The struct layout of `VkIndirectExecutionSetShaderLayoutInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("setLayoutCount"), + ValueLayout.ADDRESS.withName("pSetLayouts") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `setLayoutCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_setLayoutCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("setLayoutCount")); + /// The [VarHandle] of `pSetLayouts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSetLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSetLayouts")); + + /// Creates `VkIndirectExecutionSetShaderLayoutInfoEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectExecutionSetShaderLayoutInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectExecutionSetShaderLayoutInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetShaderLayoutInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetShaderLayoutInfoEXT(segment); } + + /// Creates `VkIndirectExecutionSetShaderLayoutInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetShaderLayoutInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetShaderLayoutInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectExecutionSetShaderLayoutInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetShaderLayoutInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetShaderLayoutInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectExecutionSetShaderLayoutInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectExecutionSetShaderLayoutInfoEXT` + public static VkIndirectExecutionSetShaderLayoutInfoEXT alloc(SegmentAllocator allocator) { return new VkIndirectExecutionSetShaderLayoutInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectExecutionSetShaderLayoutInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectExecutionSetShaderLayoutInfoEXT` + public static VkIndirectExecutionSetShaderLayoutInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectExecutionSetShaderLayoutInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderLayoutInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderLayoutInfoEXT sType(@CType("VkStructureType") int value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderLayoutInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderLayoutInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `setLayoutCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_setLayoutCount(MemorySegment segment, long index) { return (int) VH_setLayoutCount.get(segment, 0L, index); } + /// {@return `setLayoutCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_setLayoutCount(MemorySegment segment) { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_setLayoutCount(segment, 0L); } + /// {@return `setLayoutCount` at the given index} + /// @param index the index + public @CType("uint32_t") int setLayoutCountAt(long index) { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_setLayoutCount(this.segment(), index); } + /// {@return `setLayoutCount`} + public @CType("uint32_t") int setLayoutCount() { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_setLayoutCount(this.segment()); } + /// Sets `setLayoutCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_setLayoutCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_setLayoutCount.set(segment, 0L, index, value); } + /// Sets `setLayoutCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_setLayoutCount(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_setLayoutCount(segment, 0L, value); } + /// Sets `setLayoutCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderLayoutInfoEXT setLayoutCountAt(long index, @CType("uint32_t") int value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_setLayoutCount(this.segment(), index, value); return this; } + /// Sets `setLayoutCount` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderLayoutInfoEXT setLayoutCount(@CType("uint32_t") int value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_setLayoutCount(this.segment(), value); return this; } + + /// {@return `pSetLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment get_pSetLayouts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSetLayouts.get(segment, 0L, index); } + /// {@return `pSetLayouts`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment get_pSetLayouts(MemorySegment segment) { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_pSetLayouts(segment, 0L); } + /// {@return `pSetLayouts` at the given index} + /// @param index the index + public @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment pSetLayoutsAt(long index) { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_pSetLayouts(this.segment(), index); } + /// {@return `pSetLayouts`} + public @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment pSetLayouts() { return VkIndirectExecutionSetShaderLayoutInfoEXT.get_pSetLayouts(this.segment()); } + /// Sets `pSetLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSetLayouts(MemorySegment segment, long index, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VH_pSetLayouts.set(segment, 0L, index, value); } + /// Sets `pSetLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSetLayouts(MemorySegment segment, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_pSetLayouts(segment, 0L, value); } + /// Sets `pSetLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderLayoutInfoEXT pSetLayoutsAt(long index, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_pSetLayouts(this.segment(), index, value); return this; } + /// Sets `pSetLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetShaderLayoutInfoEXT pSetLayouts(@CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetShaderLayoutInfoEXT.set_pSetLayouts(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkLayerSettingEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkLayerSettingEXT.java new file mode 100644 index 00000000..022c45a1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkLayerSettingEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### pLayerName +/// [VarHandle][#VH_pLayerName] - [Getter][#pLayerName()] - [Setter][#pLayerName(java.lang.foreign.MemorySegment)] +/// ### pSettingName +/// [VarHandle][#VH_pSettingName] - [Getter][#pSettingName()] - [Setter][#pSettingName(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### valueCount +/// [VarHandle][#VH_valueCount] - [Getter][#valueCount()] - [Setter][#valueCount(int)] +/// ### pValues +/// [VarHandle][#VH_pValues] - [Getter][#pValues()] - [Setter][#pValues(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkLayerSettingEXT { +/// const char * pLayerName; +/// const char * pSettingName; +/// VkLayerSettingTypeEXT type; +/// uint32_t valueCount; +/// const void * pValues; +/// } VkLayerSettingEXT; +/// ``` +public final class VkLayerSettingEXT extends Struct { + /// The struct layout of `VkLayerSettingEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("pLayerName"), + ValueLayout.ADDRESS.withName("pSettingName"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("valueCount"), + ValueLayout.ADDRESS.withName("pValues") + ); + /// The [VarHandle] of `pLayerName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLayerName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLayerName")); + /// The [VarHandle] of `pSettingName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSettingName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSettingName")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `valueCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_valueCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("valueCount")); + /// The [VarHandle] of `pValues` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pValues = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pValues")); + + /// Creates `VkLayerSettingEXT` with the given segment. + /// @param segment the memory segment + public VkLayerSettingEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkLayerSettingEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLayerSettingEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLayerSettingEXT(segment); } + + /// Creates `VkLayerSettingEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLayerSettingEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLayerSettingEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkLayerSettingEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkLayerSettingEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkLayerSettingEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkLayerSettingEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkLayerSettingEXT` + public static VkLayerSettingEXT alloc(SegmentAllocator allocator) { return new VkLayerSettingEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkLayerSettingEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkLayerSettingEXT` + public static VkLayerSettingEXT alloc(SegmentAllocator allocator, long count) { return new VkLayerSettingEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `pLayerName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pLayerName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLayerName.get(segment, 0L, index); } + /// {@return `pLayerName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pLayerName(MemorySegment segment) { return VkLayerSettingEXT.get_pLayerName(segment, 0L); } + /// {@return `pLayerName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pLayerNameAt(long index) { return VkLayerSettingEXT.get_pLayerName(this.segment(), index); } + /// {@return `pLayerName`} + public @CType("const char *") java.lang.foreign.MemorySegment pLayerName() { return VkLayerSettingEXT.get_pLayerName(this.segment()); } + /// Sets `pLayerName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLayerName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pLayerName.set(segment, 0L, index, value); } + /// Sets `pLayerName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLayerName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkLayerSettingEXT.set_pLayerName(segment, 0L, value); } + /// Sets `pLayerName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerSettingEXT pLayerNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkLayerSettingEXT.set_pLayerName(this.segment(), index, value); return this; } + /// Sets `pLayerName` with the given value. + /// @param value the value + /// @return `this` + public VkLayerSettingEXT pLayerName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkLayerSettingEXT.set_pLayerName(this.segment(), value); return this; } + + /// {@return `pSettingName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pSettingName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSettingName.get(segment, 0L, index); } + /// {@return `pSettingName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pSettingName(MemorySegment segment) { return VkLayerSettingEXT.get_pSettingName(segment, 0L); } + /// {@return `pSettingName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pSettingNameAt(long index) { return VkLayerSettingEXT.get_pSettingName(this.segment(), index); } + /// {@return `pSettingName`} + public @CType("const char *") java.lang.foreign.MemorySegment pSettingName() { return VkLayerSettingEXT.get_pSettingName(this.segment()); } + /// Sets `pSettingName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSettingName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pSettingName.set(segment, 0L, index, value); } + /// Sets `pSettingName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSettingName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkLayerSettingEXT.set_pSettingName(segment, 0L, value); } + /// Sets `pSettingName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerSettingEXT pSettingNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkLayerSettingEXT.set_pSettingName(this.segment(), index, value); return this; } + /// Sets `pSettingName` with the given value. + /// @param value the value + /// @return `this` + public VkLayerSettingEXT pSettingName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkLayerSettingEXT.set_pSettingName(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkLayerSettingTypeEXT") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkLayerSettingTypeEXT") int get_type(MemorySegment segment) { return VkLayerSettingEXT.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkLayerSettingTypeEXT") int typeAt(long index) { return VkLayerSettingEXT.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkLayerSettingTypeEXT") int type() { return VkLayerSettingEXT.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkLayerSettingTypeEXT") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkLayerSettingTypeEXT") int value) { VkLayerSettingEXT.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerSettingEXT typeAt(long index, @CType("VkLayerSettingTypeEXT") int value) { VkLayerSettingEXT.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkLayerSettingEXT type(@CType("VkLayerSettingTypeEXT") int value) { VkLayerSettingEXT.set_type(this.segment(), value); return this; } + + /// {@return `valueCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_valueCount(MemorySegment segment, long index) { return (int) VH_valueCount.get(segment, 0L, index); } + /// {@return `valueCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_valueCount(MemorySegment segment) { return VkLayerSettingEXT.get_valueCount(segment, 0L); } + /// {@return `valueCount` at the given index} + /// @param index the index + public @CType("uint32_t") int valueCountAt(long index) { return VkLayerSettingEXT.get_valueCount(this.segment(), index); } + /// {@return `valueCount`} + public @CType("uint32_t") int valueCount() { return VkLayerSettingEXT.get_valueCount(this.segment()); } + /// Sets `valueCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_valueCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_valueCount.set(segment, 0L, index, value); } + /// Sets `valueCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_valueCount(MemorySegment segment, @CType("uint32_t") int value) { VkLayerSettingEXT.set_valueCount(segment, 0L, value); } + /// Sets `valueCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerSettingEXT valueCountAt(long index, @CType("uint32_t") int value) { VkLayerSettingEXT.set_valueCount(this.segment(), index, value); return this; } + /// Sets `valueCount` with the given value. + /// @param value the value + /// @return `this` + public VkLayerSettingEXT valueCount(@CType("uint32_t") int value) { VkLayerSettingEXT.set_valueCount(this.segment(), value); return this; } + + /// {@return `pValues` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pValues(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pValues.get(segment, 0L, index); } + /// {@return `pValues`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pValues(MemorySegment segment) { return VkLayerSettingEXT.get_pValues(segment, 0L); } + /// {@return `pValues` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pValuesAt(long index) { return VkLayerSettingEXT.get_pValues(this.segment(), index); } + /// {@return `pValues`} + public @CType("const void *") java.lang.foreign.MemorySegment pValues() { return VkLayerSettingEXT.get_pValues(this.segment()); } + /// Sets `pValues` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pValues(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pValues.set(segment, 0L, index, value); } + /// Sets `pValues` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pValues(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLayerSettingEXT.set_pValues(segment, 0L, value); } + /// Sets `pValues` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerSettingEXT pValuesAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLayerSettingEXT.set_pValues(this.segment(), index, value); return this; } + /// Sets `pValues` with the given value. + /// @param value the value + /// @return `this` + public VkLayerSettingEXT pValues(@CType("const void *") java.lang.foreign.MemorySegment value) { VkLayerSettingEXT.set_pValues(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkLayerSettingsCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkLayerSettingsCreateInfoEXT.java new file mode 100644 index 00000000..83696163 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkLayerSettingsCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### settingCount +/// [VarHandle][#VH_settingCount] - [Getter][#settingCount()] - [Setter][#settingCount(int)] +/// ### pSettings +/// [VarHandle][#VH_pSettings] - [Getter][#pSettings()] - [Setter][#pSettings(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkLayerSettingsCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t settingCount; +/// const VkLayerSettingEXT * pSettings; +/// } VkLayerSettingsCreateInfoEXT; +/// ``` +public final class VkLayerSettingsCreateInfoEXT extends Struct { + /// The struct layout of `VkLayerSettingsCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("settingCount"), + ValueLayout.ADDRESS.withName("pSettings") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `settingCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_settingCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("settingCount")); + /// The [VarHandle] of `pSettings` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSettings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSettings")); + + /// Creates `VkLayerSettingsCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkLayerSettingsCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkLayerSettingsCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLayerSettingsCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLayerSettingsCreateInfoEXT(segment); } + + /// Creates `VkLayerSettingsCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLayerSettingsCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLayerSettingsCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkLayerSettingsCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkLayerSettingsCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkLayerSettingsCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkLayerSettingsCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkLayerSettingsCreateInfoEXT` + public static VkLayerSettingsCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkLayerSettingsCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkLayerSettingsCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkLayerSettingsCreateInfoEXT` + public static VkLayerSettingsCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkLayerSettingsCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkLayerSettingsCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkLayerSettingsCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkLayerSettingsCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkLayerSettingsCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerSettingsCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkLayerSettingsCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkLayerSettingsCreateInfoEXT sType(@CType("VkStructureType") int value) { VkLayerSettingsCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkLayerSettingsCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkLayerSettingsCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkLayerSettingsCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLayerSettingsCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerSettingsCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLayerSettingsCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkLayerSettingsCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkLayerSettingsCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `settingCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_settingCount(MemorySegment segment, long index) { return (int) VH_settingCount.get(segment, 0L, index); } + /// {@return `settingCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_settingCount(MemorySegment segment) { return VkLayerSettingsCreateInfoEXT.get_settingCount(segment, 0L); } + /// {@return `settingCount` at the given index} + /// @param index the index + public @CType("uint32_t") int settingCountAt(long index) { return VkLayerSettingsCreateInfoEXT.get_settingCount(this.segment(), index); } + /// {@return `settingCount`} + public @CType("uint32_t") int settingCount() { return VkLayerSettingsCreateInfoEXT.get_settingCount(this.segment()); } + /// Sets `settingCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_settingCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_settingCount.set(segment, 0L, index, value); } + /// Sets `settingCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_settingCount(MemorySegment segment, @CType("uint32_t") int value) { VkLayerSettingsCreateInfoEXT.set_settingCount(segment, 0L, value); } + /// Sets `settingCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerSettingsCreateInfoEXT settingCountAt(long index, @CType("uint32_t") int value) { VkLayerSettingsCreateInfoEXT.set_settingCount(this.segment(), index, value); return this; } + /// Sets `settingCount` with the given value. + /// @param value the value + /// @return `this` + public VkLayerSettingsCreateInfoEXT settingCount(@CType("uint32_t") int value) { VkLayerSettingsCreateInfoEXT.set_settingCount(this.segment(), value); return this; } + + /// {@return `pSettings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkLayerSettingEXT *") java.lang.foreign.MemorySegment get_pSettings(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSettings.get(segment, 0L, index); } + /// {@return `pSettings`} + /// @param segment the segment of the struct + public static @CType("const VkLayerSettingEXT *") java.lang.foreign.MemorySegment get_pSettings(MemorySegment segment) { return VkLayerSettingsCreateInfoEXT.get_pSettings(segment, 0L); } + /// {@return `pSettings` at the given index} + /// @param index the index + public @CType("const VkLayerSettingEXT *") java.lang.foreign.MemorySegment pSettingsAt(long index) { return VkLayerSettingsCreateInfoEXT.get_pSettings(this.segment(), index); } + /// {@return `pSettings`} + public @CType("const VkLayerSettingEXT *") java.lang.foreign.MemorySegment pSettings() { return VkLayerSettingsCreateInfoEXT.get_pSettings(this.segment()); } + /// Sets `pSettings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSettings(MemorySegment segment, long index, @CType("const VkLayerSettingEXT *") java.lang.foreign.MemorySegment value) { VH_pSettings.set(segment, 0L, index, value); } + /// Sets `pSettings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSettings(MemorySegment segment, @CType("const VkLayerSettingEXT *") java.lang.foreign.MemorySegment value) { VkLayerSettingsCreateInfoEXT.set_pSettings(segment, 0L, value); } + /// Sets `pSettings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerSettingsCreateInfoEXT pSettingsAt(long index, @CType("const VkLayerSettingEXT *") java.lang.foreign.MemorySegment value) { VkLayerSettingsCreateInfoEXT.set_pSettings(this.segment(), index, value); return this; } + /// Sets `pSettings` with the given value. + /// @param value the value + /// @return `this` + public VkLayerSettingsCreateInfoEXT pSettings(@CType("const VkLayerSettingEXT *") java.lang.foreign.MemorySegment value) { VkLayerSettingsCreateInfoEXT.set_pSettings(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMemoryHostPointerPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMemoryHostPointerPropertiesEXT.java new file mode 100644 index 00000000..886c41d6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMemoryHostPointerPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryTypeBits +/// [VarHandle][#VH_memoryTypeBits] - [Getter][#memoryTypeBits()] - [Setter][#memoryTypeBits(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryHostPointerPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t memoryTypeBits; +/// } VkMemoryHostPointerPropertiesEXT; +/// ``` +public final class VkMemoryHostPointerPropertiesEXT extends Struct { + /// The struct layout of `VkMemoryHostPointerPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryTypeBits") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryTypeBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeBits")); + + /// Creates `VkMemoryHostPointerPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkMemoryHostPointerPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryHostPointerPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryHostPointerPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryHostPointerPropertiesEXT(segment); } + + /// Creates `VkMemoryHostPointerPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryHostPointerPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryHostPointerPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryHostPointerPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryHostPointerPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryHostPointerPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryHostPointerPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryHostPointerPropertiesEXT` + public static VkMemoryHostPointerPropertiesEXT alloc(SegmentAllocator allocator) { return new VkMemoryHostPointerPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryHostPointerPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryHostPointerPropertiesEXT` + public static VkMemoryHostPointerPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkMemoryHostPointerPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryHostPointerPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryHostPointerPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryHostPointerPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryHostPointerPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryHostPointerPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryHostPointerPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryHostPointerPropertiesEXT sType(@CType("VkStructureType") int value) { VkMemoryHostPointerPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryHostPointerPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryHostPointerPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryHostPointerPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryHostPointerPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryHostPointerPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryHostPointerPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryHostPointerPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryHostPointerPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryTypeBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment, long index) { return (int) VH_memoryTypeBits.get(segment, 0L, index); } + /// {@return `memoryTypeBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment) { return VkMemoryHostPointerPropertiesEXT.get_memoryTypeBits(segment, 0L); } + /// {@return `memoryTypeBits` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeBitsAt(long index) { return VkMemoryHostPointerPropertiesEXT.get_memoryTypeBits(this.segment(), index); } + /// {@return `memoryTypeBits`} + public @CType("uint32_t") int memoryTypeBits() { return VkMemoryHostPointerPropertiesEXT.get_memoryTypeBits(this.segment()); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeBits.set(segment, 0L, index, value); } + /// Sets `memoryTypeBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, @CType("uint32_t") int value) { VkMemoryHostPointerPropertiesEXT.set_memoryTypeBits(segment, 0L, value); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryHostPointerPropertiesEXT memoryTypeBitsAt(long index, @CType("uint32_t") int value) { VkMemoryHostPointerPropertiesEXT.set_memoryTypeBits(this.segment(), index, value); return this; } + /// Sets `memoryTypeBits` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryHostPointerPropertiesEXT memoryTypeBits(@CType("uint32_t") int value) { VkMemoryHostPointerPropertiesEXT.set_memoryTypeBits(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMemoryMapPlacedInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMemoryMapPlacedInfoEXT.java new file mode 100644 index 00000000..5e3725c9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMemoryMapPlacedInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pPlacedAddress +/// [VarHandle][#VH_pPlacedAddress] - [Getter][#pPlacedAddress()] - [Setter][#pPlacedAddress(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryMapPlacedInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// void * pPlacedAddress; +/// } VkMemoryMapPlacedInfoEXT; +/// ``` +public final class VkMemoryMapPlacedInfoEXT extends Struct { + /// The struct layout of `VkMemoryMapPlacedInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pPlacedAddress") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pPlacedAddress` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPlacedAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPlacedAddress")); + + /// Creates `VkMemoryMapPlacedInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMemoryMapPlacedInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryMapPlacedInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryMapPlacedInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryMapPlacedInfoEXT(segment); } + + /// Creates `VkMemoryMapPlacedInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryMapPlacedInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryMapPlacedInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryMapPlacedInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryMapPlacedInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryMapPlacedInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryMapPlacedInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryMapPlacedInfoEXT` + public static VkMemoryMapPlacedInfoEXT alloc(SegmentAllocator allocator) { return new VkMemoryMapPlacedInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryMapPlacedInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryMapPlacedInfoEXT` + public static VkMemoryMapPlacedInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMemoryMapPlacedInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryMapPlacedInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryMapPlacedInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryMapPlacedInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryMapPlacedInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryMapPlacedInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryMapPlacedInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryMapPlacedInfoEXT sType(@CType("VkStructureType") int value) { VkMemoryMapPlacedInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryMapPlacedInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryMapPlacedInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryMapPlacedInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryMapPlacedInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryMapPlacedInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryMapPlacedInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryMapPlacedInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryMapPlacedInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pPlacedAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pPlacedAddress(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPlacedAddress.get(segment, 0L, index); } + /// {@return `pPlacedAddress`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pPlacedAddress(MemorySegment segment) { return VkMemoryMapPlacedInfoEXT.get_pPlacedAddress(segment, 0L); } + /// {@return `pPlacedAddress` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pPlacedAddressAt(long index) { return VkMemoryMapPlacedInfoEXT.get_pPlacedAddress(this.segment(), index); } + /// {@return `pPlacedAddress`} + public @CType("void *") java.lang.foreign.MemorySegment pPlacedAddress() { return VkMemoryMapPlacedInfoEXT.get_pPlacedAddress(this.segment()); } + /// Sets `pPlacedAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPlacedAddress(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pPlacedAddress.set(segment, 0L, index, value); } + /// Sets `pPlacedAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPlacedAddress(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryMapPlacedInfoEXT.set_pPlacedAddress(segment, 0L, value); } + /// Sets `pPlacedAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryMapPlacedInfoEXT pPlacedAddressAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryMapPlacedInfoEXT.set_pPlacedAddress(this.segment(), index, value); return this; } + /// Sets `pPlacedAddress` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryMapPlacedInfoEXT pPlacedAddress(@CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryMapPlacedInfoEXT.set_pPlacedAddress(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMemoryPriorityAllocateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMemoryPriorityAllocateInfoEXT.java new file mode 100644 index 00000000..a4740617 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMemoryPriorityAllocateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### priority +/// [VarHandle][#VH_priority] - [Getter][#priority()] - [Setter][#priority(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryPriorityAllocateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// float priority; +/// } VkMemoryPriorityAllocateInfoEXT; +/// ``` +public final class VkMemoryPriorityAllocateInfoEXT extends Struct { + /// The struct layout of `VkMemoryPriorityAllocateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_FLOAT.withName("priority") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `priority` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_priority = LAYOUT.arrayElementVarHandle(PathElement.groupElement("priority")); + + /// Creates `VkMemoryPriorityAllocateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMemoryPriorityAllocateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryPriorityAllocateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryPriorityAllocateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryPriorityAllocateInfoEXT(segment); } + + /// Creates `VkMemoryPriorityAllocateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryPriorityAllocateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryPriorityAllocateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryPriorityAllocateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryPriorityAllocateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryPriorityAllocateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryPriorityAllocateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryPriorityAllocateInfoEXT` + public static VkMemoryPriorityAllocateInfoEXT alloc(SegmentAllocator allocator) { return new VkMemoryPriorityAllocateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryPriorityAllocateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryPriorityAllocateInfoEXT` + public static VkMemoryPriorityAllocateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMemoryPriorityAllocateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryPriorityAllocateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryPriorityAllocateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryPriorityAllocateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryPriorityAllocateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryPriorityAllocateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryPriorityAllocateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryPriorityAllocateInfoEXT sType(@CType("VkStructureType") int value) { VkMemoryPriorityAllocateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryPriorityAllocateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryPriorityAllocateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryPriorityAllocateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryPriorityAllocateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryPriorityAllocateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryPriorityAllocateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryPriorityAllocateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryPriorityAllocateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `priority` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_priority(MemorySegment segment, long index) { return (float) VH_priority.get(segment, 0L, index); } + /// {@return `priority`} + /// @param segment the segment of the struct + public static @CType("float") float get_priority(MemorySegment segment) { return VkMemoryPriorityAllocateInfoEXT.get_priority(segment, 0L); } + /// {@return `priority` at the given index} + /// @param index the index + public @CType("float") float priorityAt(long index) { return VkMemoryPriorityAllocateInfoEXT.get_priority(this.segment(), index); } + /// {@return `priority`} + public @CType("float") float priority() { return VkMemoryPriorityAllocateInfoEXT.get_priority(this.segment()); } + /// Sets `priority` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_priority(MemorySegment segment, long index, @CType("float") float value) { VH_priority.set(segment, 0L, index, value); } + /// Sets `priority` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_priority(MemorySegment segment, @CType("float") float value) { VkMemoryPriorityAllocateInfoEXT.set_priority(segment, 0L, value); } + /// Sets `priority` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryPriorityAllocateInfoEXT priorityAt(long index, @CType("float") float value) { VkMemoryPriorityAllocateInfoEXT.set_priority(this.segment(), index, value); return this; } + /// Sets `priority` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryPriorityAllocateInfoEXT priority(@CType("float") float value) { VkMemoryPriorityAllocateInfoEXT.set_priority(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMetalSurfaceCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMetalSurfaceCreateInfoEXT.java new file mode 100644 index 00000000..7f5e10be --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMetalSurfaceCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pLayer +/// [VarHandle][#VH_pLayer] - [Getter][#pLayer()] - [Setter][#pLayer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMetalSurfaceCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkMetalSurfaceCreateFlagsEXT flags; +/// const CAMetalLayer * pLayer; +/// } VkMetalSurfaceCreateInfoEXT; +/// ``` +public final class VkMetalSurfaceCreateInfoEXT extends Struct { + /// The struct layout of `VkMetalSurfaceCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("pLayer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pLayer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLayer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLayer")); + + /// Creates `VkMetalSurfaceCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMetalSurfaceCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMetalSurfaceCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMetalSurfaceCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMetalSurfaceCreateInfoEXT(segment); } + + /// Creates `VkMetalSurfaceCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMetalSurfaceCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMetalSurfaceCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMetalSurfaceCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMetalSurfaceCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMetalSurfaceCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMetalSurfaceCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMetalSurfaceCreateInfoEXT` + public static VkMetalSurfaceCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkMetalSurfaceCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMetalSurfaceCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMetalSurfaceCreateInfoEXT` + public static VkMetalSurfaceCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMetalSurfaceCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMetalSurfaceCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMetalSurfaceCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMetalSurfaceCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMetalSurfaceCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMetalSurfaceCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMetalSurfaceCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMetalSurfaceCreateInfoEXT sType(@CType("VkStructureType") int value) { VkMetalSurfaceCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMetalSurfaceCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMetalSurfaceCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMetalSurfaceCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMetalSurfaceCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMetalSurfaceCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMetalSurfaceCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMetalSurfaceCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMetalSurfaceCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMetalSurfaceCreateFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkMetalSurfaceCreateFlagsEXT") int get_flags(MemorySegment segment) { return VkMetalSurfaceCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkMetalSurfaceCreateFlagsEXT") int flagsAt(long index) { return VkMetalSurfaceCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkMetalSurfaceCreateFlagsEXT") int flags() { return VkMetalSurfaceCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkMetalSurfaceCreateFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkMetalSurfaceCreateFlagsEXT") int value) { VkMetalSurfaceCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMetalSurfaceCreateInfoEXT flagsAt(long index, @CType("VkMetalSurfaceCreateFlagsEXT") int value) { VkMetalSurfaceCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkMetalSurfaceCreateInfoEXT flags(@CType("VkMetalSurfaceCreateFlagsEXT") int value) { VkMetalSurfaceCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `pLayer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const CAMetalLayer *") java.lang.foreign.MemorySegment get_pLayer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLayer.get(segment, 0L, index); } + /// {@return `pLayer`} + /// @param segment the segment of the struct + public static @CType("const CAMetalLayer *") java.lang.foreign.MemorySegment get_pLayer(MemorySegment segment) { return VkMetalSurfaceCreateInfoEXT.get_pLayer(segment, 0L); } + /// {@return `pLayer` at the given index} + /// @param index the index + public @CType("const CAMetalLayer *") java.lang.foreign.MemorySegment pLayerAt(long index) { return VkMetalSurfaceCreateInfoEXT.get_pLayer(this.segment(), index); } + /// {@return `pLayer`} + public @CType("const CAMetalLayer *") java.lang.foreign.MemorySegment pLayer() { return VkMetalSurfaceCreateInfoEXT.get_pLayer(this.segment()); } + /// Sets `pLayer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLayer(MemorySegment segment, long index, @CType("const CAMetalLayer *") java.lang.foreign.MemorySegment value) { VH_pLayer.set(segment, 0L, index, value); } + /// Sets `pLayer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLayer(MemorySegment segment, @CType("const CAMetalLayer *") java.lang.foreign.MemorySegment value) { VkMetalSurfaceCreateInfoEXT.set_pLayer(segment, 0L, value); } + /// Sets `pLayer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMetalSurfaceCreateInfoEXT pLayerAt(long index, @CType("const CAMetalLayer *") java.lang.foreign.MemorySegment value) { VkMetalSurfaceCreateInfoEXT.set_pLayer(this.segment(), index, value); return this; } + /// Sets `pLayer` with the given value. + /// @param value the value + /// @return `this` + public VkMetalSurfaceCreateInfoEXT pLayer(@CType("const CAMetalLayer *") java.lang.foreign.MemorySegment value) { VkMetalSurfaceCreateInfoEXT.set_pLayer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapBuildInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapBuildInfoEXT.java new file mode 100644 index 00000000..a1bb1aae --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapBuildInfoEXT.java @@ -0,0 +1,561 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ### dstMicromap +/// [VarHandle][#VH_dstMicromap] - [Getter][#dstMicromap()] - [Setter][#dstMicromap(java.lang.foreign.MemorySegment)] +/// ### usageCountsCount +/// [VarHandle][#VH_usageCountsCount] - [Getter][#usageCountsCount()] - [Setter][#usageCountsCount(int)] +/// ### pUsageCounts +/// [VarHandle][#VH_pUsageCounts] - [Getter][#pUsageCounts()] - [Setter][#pUsageCounts(java.lang.foreign.MemorySegment)] +/// ### ppUsageCounts +/// [VarHandle][#VH_ppUsageCounts] - [Getter][#ppUsageCounts()] - [Setter][#ppUsageCounts(java.lang.foreign.MemorySegment)] +/// ### data +/// [Byte offset][#OFFSET_data] - [Memory layout][#ML_data] - [Getter][#data()] - [Setter][#data(java.lang.foreign.MemorySegment)] +/// ### scratchData +/// [Byte offset][#OFFSET_scratchData] - [Memory layout][#ML_scratchData] - [Getter][#scratchData()] - [Setter][#scratchData(java.lang.foreign.MemorySegment)] +/// ### triangleArray +/// [Byte offset][#OFFSET_triangleArray] - [Memory layout][#ML_triangleArray] - [Getter][#triangleArray()] - [Setter][#triangleArray(java.lang.foreign.MemorySegment)] +/// ### triangleArrayStride +/// [VarHandle][#VH_triangleArrayStride] - [Getter][#triangleArrayStride()] - [Setter][#triangleArrayStride(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMicromapBuildInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkMicromapTypeEXT type; +/// VkBuildMicromapFlagsEXT flags; +/// VkBuildMicromapModeEXT mode; +/// VkMicromapEXT dstMicromap; +/// uint32_t usageCountsCount; +/// const VkMicromapUsageEXT * pUsageCounts; +/// const VkMicromapUsageEXT * const* ppUsageCounts; +/// VkDeviceOrHostAddressConstKHR data; +/// VkDeviceOrHostAddressKHR scratchData; +/// VkDeviceOrHostAddressConstKHR triangleArray; +/// VkDeviceSize triangleArrayStride; +/// } VkMicromapBuildInfoEXT; +/// ``` +public final class VkMicromapBuildInfoEXT extends Struct { + /// The struct layout of `VkMicromapBuildInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("mode"), + ValueLayout.ADDRESS.withName("dstMicromap"), + ValueLayout.JAVA_INT.withName("usageCountsCount"), + ValueLayout.ADDRESS.withName("pUsageCounts"), + ValueLayout.ADDRESS.withName("ppUsageCounts"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("data"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressKHR.LAYOUT.withName("scratchData"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("triangleArray"), + ValueLayout.JAVA_LONG.withName("triangleArrayStride") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + /// The [VarHandle] of `dstMicromap` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstMicromap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstMicromap")); + /// The [VarHandle] of `usageCountsCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usageCountsCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usageCountsCount")); + /// The [VarHandle] of `pUsageCounts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pUsageCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pUsageCounts")); + /// The [VarHandle] of `ppUsageCounts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_ppUsageCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ppUsageCounts")); + /// The byte offset of `data`. + public static final long OFFSET_data = LAYOUT.byteOffset(PathElement.groupElement("data")); + /// The memory layout of `data`. + public static final MemoryLayout ML_data = LAYOUT.select(PathElement.groupElement("data")); + /// The byte offset of `scratchData`. + public static final long OFFSET_scratchData = LAYOUT.byteOffset(PathElement.groupElement("scratchData")); + /// The memory layout of `scratchData`. + public static final MemoryLayout ML_scratchData = LAYOUT.select(PathElement.groupElement("scratchData")); + /// The byte offset of `triangleArray`. + public static final long OFFSET_triangleArray = LAYOUT.byteOffset(PathElement.groupElement("triangleArray")); + /// The memory layout of `triangleArray`. + public static final MemoryLayout ML_triangleArray = LAYOUT.select(PathElement.groupElement("triangleArray")); + /// The [VarHandle] of `triangleArrayStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_triangleArrayStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("triangleArrayStride")); + + /// Creates `VkMicromapBuildInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMicromapBuildInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMicromapBuildInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapBuildInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapBuildInfoEXT(segment); } + + /// Creates `VkMicromapBuildInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapBuildInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapBuildInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMicromapBuildInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapBuildInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapBuildInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMicromapBuildInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMicromapBuildInfoEXT` + public static VkMicromapBuildInfoEXT alloc(SegmentAllocator allocator) { return new VkMicromapBuildInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMicromapBuildInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMicromapBuildInfoEXT` + public static VkMicromapBuildInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMicromapBuildInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMicromapBuildInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMicromapBuildInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMicromapBuildInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMicromapBuildInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT sType(@CType("VkStructureType") int value) { VkMicromapBuildInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMicromapBuildInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMicromapBuildInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMicromapTypeEXT") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkMicromapTypeEXT") int get_type(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkMicromapTypeEXT") int typeAt(long index) { return VkMicromapBuildInfoEXT.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkMicromapTypeEXT") int type() { return VkMicromapBuildInfoEXT.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkMicromapTypeEXT") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkMicromapTypeEXT") int value) { VkMicromapBuildInfoEXT.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT typeAt(long index, @CType("VkMicromapTypeEXT") int value) { VkMicromapBuildInfoEXT.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT type(@CType("VkMicromapTypeEXT") int value) { VkMicromapBuildInfoEXT.set_type(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuildMicromapFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkBuildMicromapFlagsEXT") int get_flags(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkBuildMicromapFlagsEXT") int flagsAt(long index) { return VkMicromapBuildInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkBuildMicromapFlagsEXT") int flags() { return VkMicromapBuildInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkBuildMicromapFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkBuildMicromapFlagsEXT") int value) { VkMicromapBuildInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT flagsAt(long index, @CType("VkBuildMicromapFlagsEXT") int value) { VkMicromapBuildInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT flags(@CType("VkBuildMicromapFlagsEXT") int value) { VkMicromapBuildInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuildMicromapModeEXT") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkBuildMicromapModeEXT") int get_mode(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkBuildMicromapModeEXT") int modeAt(long index) { return VkMicromapBuildInfoEXT.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkBuildMicromapModeEXT") int mode() { return VkMicromapBuildInfoEXT.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkBuildMicromapModeEXT") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkBuildMicromapModeEXT") int value) { VkMicromapBuildInfoEXT.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT modeAt(long index, @CType("VkBuildMicromapModeEXT") int value) { VkMicromapBuildInfoEXT.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT mode(@CType("VkBuildMicromapModeEXT") int value) { VkMicromapBuildInfoEXT.set_mode(this.segment(), value); return this; } + + /// {@return `dstMicromap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_dstMicromap(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstMicromap.get(segment, 0L, index); } + /// {@return `dstMicromap`} + /// @param segment the segment of the struct + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_dstMicromap(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_dstMicromap(segment, 0L); } + /// {@return `dstMicromap` at the given index} + /// @param index the index + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment dstMicromapAt(long index) { return VkMicromapBuildInfoEXT.get_dstMicromap(this.segment(), index); } + /// {@return `dstMicromap`} + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment dstMicromap() { return VkMicromapBuildInfoEXT.get_dstMicromap(this.segment()); } + /// Sets `dstMicromap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstMicromap(MemorySegment segment, long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VH_dstMicromap.set(segment, 0L, index, value); } + /// Sets `dstMicromap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstMicromap(MemorySegment segment, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_dstMicromap(segment, 0L, value); } + /// Sets `dstMicromap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT dstMicromapAt(long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_dstMicromap(this.segment(), index, value); return this; } + /// Sets `dstMicromap` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT dstMicromap(@CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_dstMicromap(this.segment(), value); return this; } + + /// {@return `usageCountsCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_usageCountsCount(MemorySegment segment, long index) { return (int) VH_usageCountsCount.get(segment, 0L, index); } + /// {@return `usageCountsCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_usageCountsCount(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_usageCountsCount(segment, 0L); } + /// {@return `usageCountsCount` at the given index} + /// @param index the index + public @CType("uint32_t") int usageCountsCountAt(long index) { return VkMicromapBuildInfoEXT.get_usageCountsCount(this.segment(), index); } + /// {@return `usageCountsCount`} + public @CType("uint32_t") int usageCountsCount() { return VkMicromapBuildInfoEXT.get_usageCountsCount(this.segment()); } + /// Sets `usageCountsCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usageCountsCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_usageCountsCount.set(segment, 0L, index, value); } + /// Sets `usageCountsCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usageCountsCount(MemorySegment segment, @CType("uint32_t") int value) { VkMicromapBuildInfoEXT.set_usageCountsCount(segment, 0L, value); } + /// Sets `usageCountsCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT usageCountsCountAt(long index, @CType("uint32_t") int value) { VkMicromapBuildInfoEXT.set_usageCountsCount(this.segment(), index, value); return this; } + /// Sets `usageCountsCount` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT usageCountsCount(@CType("uint32_t") int value) { VkMicromapBuildInfoEXT.set_usageCountsCount(this.segment(), value); return this; } + + /// {@return `pUsageCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment get_pUsageCounts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pUsageCounts.get(segment, 0L, index); } + /// {@return `pUsageCounts`} + /// @param segment the segment of the struct + public static @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment get_pUsageCounts(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_pUsageCounts(segment, 0L); } + /// {@return `pUsageCounts` at the given index} + /// @param index the index + public @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment pUsageCountsAt(long index) { return VkMicromapBuildInfoEXT.get_pUsageCounts(this.segment(), index); } + /// {@return `pUsageCounts`} + public @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment pUsageCounts() { return VkMicromapBuildInfoEXT.get_pUsageCounts(this.segment()); } + /// Sets `pUsageCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pUsageCounts(MemorySegment segment, long index, @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VH_pUsageCounts.set(segment, 0L, index, value); } + /// Sets `pUsageCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pUsageCounts(MemorySegment segment, @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_pUsageCounts(segment, 0L, value); } + /// Sets `pUsageCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT pUsageCountsAt(long index, @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_pUsageCounts(this.segment(), index, value); return this; } + /// Sets `pUsageCounts` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT pUsageCounts(@CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_pUsageCounts(this.segment(), value); return this; } + + /// {@return `ppUsageCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment get_ppUsageCounts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_ppUsageCounts.get(segment, 0L, index); } + /// {@return `ppUsageCounts`} + /// @param segment the segment of the struct + public static @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment get_ppUsageCounts(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_ppUsageCounts(segment, 0L); } + /// {@return `ppUsageCounts` at the given index} + /// @param index the index + public @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment ppUsageCountsAt(long index) { return VkMicromapBuildInfoEXT.get_ppUsageCounts(this.segment(), index); } + /// {@return `ppUsageCounts`} + public @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment ppUsageCounts() { return VkMicromapBuildInfoEXT.get_ppUsageCounts(this.segment()); } + /// Sets `ppUsageCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ppUsageCounts(MemorySegment segment, long index, @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VH_ppUsageCounts.set(segment, 0L, index, value); } + /// Sets `ppUsageCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ppUsageCounts(MemorySegment segment, @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_ppUsageCounts(segment, 0L, value); } + /// Sets `ppUsageCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT ppUsageCountsAt(long index, @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_ppUsageCounts(this.segment(), index, value); return this; } + /// Sets `ppUsageCounts` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT ppUsageCounts(@CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_ppUsageCounts(this.segment(), value); return this; } + + /// {@return `data` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_data(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_data, index), ML_data); } + /// {@return `data`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_data(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_data(segment, 0L); } + /// {@return `data` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment dataAt(long index) { return VkMicromapBuildInfoEXT.get_data(this.segment(), index); } + /// {@return `data`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment data() { return VkMicromapBuildInfoEXT.get_data(this.segment()); } + /// Sets `data` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_data(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_data, index), ML_data.byteSize()); } + /// Sets `data` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_data(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_data(segment, 0L, value); } + /// Sets `data` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT dataAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_data(this.segment(), index, value); return this; } + /// Sets `data` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT data(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_data(this.segment(), value); return this; } + + /// {@return `scratchData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment get_scratchData(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_scratchData, index), ML_scratchData); } + /// {@return `scratchData`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment get_scratchData(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_scratchData(segment, 0L); } + /// {@return `scratchData` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment scratchDataAt(long index) { return VkMicromapBuildInfoEXT.get_scratchData(this.segment(), index); } + /// {@return `scratchData`} + public @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment scratchData() { return VkMicromapBuildInfoEXT.get_scratchData(this.segment()); } + /// Sets `scratchData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scratchData(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_scratchData, index), ML_scratchData.byteSize()); } + /// Sets `scratchData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scratchData(MemorySegment segment, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_scratchData(segment, 0L, value); } + /// Sets `scratchData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT scratchDataAt(long index, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_scratchData(this.segment(), index, value); return this; } + /// Sets `scratchData` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT scratchData(@CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_scratchData(this.segment(), value); return this; } + + /// {@return `triangleArray` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_triangleArray(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_triangleArray, index), ML_triangleArray); } + /// {@return `triangleArray`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_triangleArray(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_triangleArray(segment, 0L); } + /// {@return `triangleArray` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment triangleArrayAt(long index) { return VkMicromapBuildInfoEXT.get_triangleArray(this.segment(), index); } + /// {@return `triangleArray`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment triangleArray() { return VkMicromapBuildInfoEXT.get_triangleArray(this.segment()); } + /// Sets `triangleArray` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_triangleArray(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_triangleArray, index), ML_triangleArray.byteSize()); } + /// Sets `triangleArray` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_triangleArray(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_triangleArray(segment, 0L, value); } + /// Sets `triangleArray` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT triangleArrayAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_triangleArray(this.segment(), index, value); return this; } + /// Sets `triangleArray` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT triangleArray(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkMicromapBuildInfoEXT.set_triangleArray(this.segment(), value); return this; } + + /// {@return `triangleArrayStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_triangleArrayStride(MemorySegment segment, long index) { return (long) VH_triangleArrayStride.get(segment, 0L, index); } + /// {@return `triangleArrayStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_triangleArrayStride(MemorySegment segment) { return VkMicromapBuildInfoEXT.get_triangleArrayStride(segment, 0L); } + /// {@return `triangleArrayStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long triangleArrayStrideAt(long index) { return VkMicromapBuildInfoEXT.get_triangleArrayStride(this.segment(), index); } + /// {@return `triangleArrayStride`} + public @CType("VkDeviceSize") long triangleArrayStride() { return VkMicromapBuildInfoEXT.get_triangleArrayStride(this.segment()); } + /// Sets `triangleArrayStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_triangleArrayStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_triangleArrayStride.set(segment, 0L, index, value); } + /// Sets `triangleArrayStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_triangleArrayStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMicromapBuildInfoEXT.set_triangleArrayStride(segment, 0L, value); } + /// Sets `triangleArrayStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT triangleArrayStrideAt(long index, @CType("VkDeviceSize") long value) { VkMicromapBuildInfoEXT.set_triangleArrayStride(this.segment(), index, value); return this; } + /// Sets `triangleArrayStride` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildInfoEXT triangleArrayStride(@CType("VkDeviceSize") long value) { VkMicromapBuildInfoEXT.set_triangleArrayStride(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapBuildSizesInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapBuildSizesInfoEXT.java new file mode 100644 index 00000000..ceaa1960 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapBuildSizesInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### micromapSize +/// [VarHandle][#VH_micromapSize] - [Getter][#micromapSize()] - [Setter][#micromapSize(long)] +/// ### buildScratchSize +/// [VarHandle][#VH_buildScratchSize] - [Getter][#buildScratchSize()] - [Setter][#buildScratchSize(long)] +/// ### discardable +/// [VarHandle][#VH_discardable] - [Getter][#discardable()] - [Setter][#discardable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMicromapBuildSizesInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceSize micromapSize; +/// VkDeviceSize buildScratchSize; +/// VkBool32 discardable; +/// } VkMicromapBuildSizesInfoEXT; +/// ``` +public final class VkMicromapBuildSizesInfoEXT extends Struct { + /// The struct layout of `VkMicromapBuildSizesInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("micromapSize"), + ValueLayout.JAVA_LONG.withName("buildScratchSize"), + ValueLayout.JAVA_INT.withName("discardable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `micromapSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_micromapSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("micromapSize")); + /// The [VarHandle] of `buildScratchSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_buildScratchSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buildScratchSize")); + /// The [VarHandle] of `discardable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_discardable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("discardable")); + + /// Creates `VkMicromapBuildSizesInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMicromapBuildSizesInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMicromapBuildSizesInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapBuildSizesInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapBuildSizesInfoEXT(segment); } + + /// Creates `VkMicromapBuildSizesInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapBuildSizesInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapBuildSizesInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMicromapBuildSizesInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapBuildSizesInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapBuildSizesInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMicromapBuildSizesInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMicromapBuildSizesInfoEXT` + public static VkMicromapBuildSizesInfoEXT alloc(SegmentAllocator allocator) { return new VkMicromapBuildSizesInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMicromapBuildSizesInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMicromapBuildSizesInfoEXT` + public static VkMicromapBuildSizesInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMicromapBuildSizesInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMicromapBuildSizesInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMicromapBuildSizesInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMicromapBuildSizesInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMicromapBuildSizesInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildSizesInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMicromapBuildSizesInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildSizesInfoEXT sType(@CType("VkStructureType") int value) { VkMicromapBuildSizesInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMicromapBuildSizesInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMicromapBuildSizesInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMicromapBuildSizesInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapBuildSizesInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildSizesInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapBuildSizesInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildSizesInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapBuildSizesInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `micromapSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_micromapSize(MemorySegment segment, long index) { return (long) VH_micromapSize.get(segment, 0L, index); } + /// {@return `micromapSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_micromapSize(MemorySegment segment) { return VkMicromapBuildSizesInfoEXT.get_micromapSize(segment, 0L); } + /// {@return `micromapSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long micromapSizeAt(long index) { return VkMicromapBuildSizesInfoEXT.get_micromapSize(this.segment(), index); } + /// {@return `micromapSize`} + public @CType("VkDeviceSize") long micromapSize() { return VkMicromapBuildSizesInfoEXT.get_micromapSize(this.segment()); } + /// Sets `micromapSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_micromapSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_micromapSize.set(segment, 0L, index, value); } + /// Sets `micromapSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_micromapSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMicromapBuildSizesInfoEXT.set_micromapSize(segment, 0L, value); } + /// Sets `micromapSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildSizesInfoEXT micromapSizeAt(long index, @CType("VkDeviceSize") long value) { VkMicromapBuildSizesInfoEXT.set_micromapSize(this.segment(), index, value); return this; } + /// Sets `micromapSize` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildSizesInfoEXT micromapSize(@CType("VkDeviceSize") long value) { VkMicromapBuildSizesInfoEXT.set_micromapSize(this.segment(), value); return this; } + + /// {@return `buildScratchSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_buildScratchSize(MemorySegment segment, long index) { return (long) VH_buildScratchSize.get(segment, 0L, index); } + /// {@return `buildScratchSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_buildScratchSize(MemorySegment segment) { return VkMicromapBuildSizesInfoEXT.get_buildScratchSize(segment, 0L); } + /// {@return `buildScratchSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long buildScratchSizeAt(long index) { return VkMicromapBuildSizesInfoEXT.get_buildScratchSize(this.segment(), index); } + /// {@return `buildScratchSize`} + public @CType("VkDeviceSize") long buildScratchSize() { return VkMicromapBuildSizesInfoEXT.get_buildScratchSize(this.segment()); } + /// Sets `buildScratchSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buildScratchSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_buildScratchSize.set(segment, 0L, index, value); } + /// Sets `buildScratchSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buildScratchSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMicromapBuildSizesInfoEXT.set_buildScratchSize(segment, 0L, value); } + /// Sets `buildScratchSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildSizesInfoEXT buildScratchSizeAt(long index, @CType("VkDeviceSize") long value) { VkMicromapBuildSizesInfoEXT.set_buildScratchSize(this.segment(), index, value); return this; } + /// Sets `buildScratchSize` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildSizesInfoEXT buildScratchSize(@CType("VkDeviceSize") long value) { VkMicromapBuildSizesInfoEXT.set_buildScratchSize(this.segment(), value); return this; } + + /// {@return `discardable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_discardable(MemorySegment segment, long index) { return (int) VH_discardable.get(segment, 0L, index); } + /// {@return `discardable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_discardable(MemorySegment segment) { return VkMicromapBuildSizesInfoEXT.get_discardable(segment, 0L); } + /// {@return `discardable` at the given index} + /// @param index the index + public @CType("VkBool32") int discardableAt(long index) { return VkMicromapBuildSizesInfoEXT.get_discardable(this.segment(), index); } + /// {@return `discardable`} + public @CType("VkBool32") int discardable() { return VkMicromapBuildSizesInfoEXT.get_discardable(this.segment()); } + /// Sets `discardable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_discardable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_discardable.set(segment, 0L, index, value); } + /// Sets `discardable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_discardable(MemorySegment segment, @CType("VkBool32") int value) { VkMicromapBuildSizesInfoEXT.set_discardable(segment, 0L, value); } + /// Sets `discardable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapBuildSizesInfoEXT discardableAt(long index, @CType("VkBool32") int value) { VkMicromapBuildSizesInfoEXT.set_discardable(this.segment(), index, value); return this; } + /// Sets `discardable` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapBuildSizesInfoEXT discardable(@CType("VkBool32") int value) { VkMicromapBuildSizesInfoEXT.set_discardable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapCreateInfoEXT.java new file mode 100644 index 00000000..9a31c632 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapCreateInfoEXT.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### createFlags +/// [VarHandle][#VH_createFlags] - [Getter][#createFlags()] - [Setter][#createFlags(int)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### deviceAddress +/// [VarHandle][#VH_deviceAddress] - [Getter][#deviceAddress()] - [Setter][#deviceAddress(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMicromapCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkMicromapCreateFlagsEXT createFlags; +/// VkBuffer buffer; +/// VkDeviceSize offset; +/// VkDeviceSize size; +/// VkMicromapTypeEXT type; +/// VkDeviceAddress deviceAddress; +/// } VkMicromapCreateInfoEXT; +/// ``` +public final class VkMicromapCreateInfoEXT extends Struct { + /// The struct layout of `VkMicromapCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("createFlags"), + ValueLayout.ADDRESS.withName("buffer"), + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_LONG.withName("size"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_LONG.withName("deviceAddress") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `createFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_createFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("createFlags")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `deviceAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_deviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceAddress")); + + /// Creates `VkMicromapCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMicromapCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMicromapCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapCreateInfoEXT(segment); } + + /// Creates `VkMicromapCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMicromapCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMicromapCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMicromapCreateInfoEXT` + public static VkMicromapCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkMicromapCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMicromapCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMicromapCreateInfoEXT` + public static VkMicromapCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMicromapCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMicromapCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMicromapCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMicromapCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMicromapCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMicromapCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT sType(@CType("VkStructureType") int value) { VkMicromapCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMicromapCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMicromapCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMicromapCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `createFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMicromapCreateFlagsEXT") int get_createFlags(MemorySegment segment, long index) { return (int) VH_createFlags.get(segment, 0L, index); } + /// {@return `createFlags`} + /// @param segment the segment of the struct + public static @CType("VkMicromapCreateFlagsEXT") int get_createFlags(MemorySegment segment) { return VkMicromapCreateInfoEXT.get_createFlags(segment, 0L); } + /// {@return `createFlags` at the given index} + /// @param index the index + public @CType("VkMicromapCreateFlagsEXT") int createFlagsAt(long index) { return VkMicromapCreateInfoEXT.get_createFlags(this.segment(), index); } + /// {@return `createFlags`} + public @CType("VkMicromapCreateFlagsEXT") int createFlags() { return VkMicromapCreateInfoEXT.get_createFlags(this.segment()); } + /// Sets `createFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_createFlags(MemorySegment segment, long index, @CType("VkMicromapCreateFlagsEXT") int value) { VH_createFlags.set(segment, 0L, index, value); } + /// Sets `createFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_createFlags(MemorySegment segment, @CType("VkMicromapCreateFlagsEXT") int value) { VkMicromapCreateInfoEXT.set_createFlags(segment, 0L, value); } + /// Sets `createFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT createFlagsAt(long index, @CType("VkMicromapCreateFlagsEXT") int value) { VkMicromapCreateInfoEXT.set_createFlags(this.segment(), index, value); return this; } + /// Sets `createFlags` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT createFlags(@CType("VkMicromapCreateFlagsEXT") int value) { VkMicromapCreateInfoEXT.set_createFlags(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkMicromapCreateInfoEXT.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkMicromapCreateInfoEXT.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkMicromapCreateInfoEXT.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkMicromapCreateInfoEXT.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkMicromapCreateInfoEXT.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkMicromapCreateInfoEXT.set_buffer(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkMicromapCreateInfoEXT.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkMicromapCreateInfoEXT.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkMicromapCreateInfoEXT.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMicromapCreateInfoEXT.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT offsetAt(long index, @CType("VkDeviceSize") long value) { VkMicromapCreateInfoEXT.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT offset(@CType("VkDeviceSize") long value) { VkMicromapCreateInfoEXT.set_offset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkMicromapCreateInfoEXT.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkMicromapCreateInfoEXT.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkMicromapCreateInfoEXT.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMicromapCreateInfoEXT.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT sizeAt(long index, @CType("VkDeviceSize") long value) { VkMicromapCreateInfoEXT.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT size(@CType("VkDeviceSize") long value) { VkMicromapCreateInfoEXT.set_size(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMicromapTypeEXT") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkMicromapTypeEXT") int get_type(MemorySegment segment) { return VkMicromapCreateInfoEXT.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkMicromapTypeEXT") int typeAt(long index) { return VkMicromapCreateInfoEXT.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkMicromapTypeEXT") int type() { return VkMicromapCreateInfoEXT.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkMicromapTypeEXT") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkMicromapTypeEXT") int value) { VkMicromapCreateInfoEXT.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT typeAt(long index, @CType("VkMicromapTypeEXT") int value) { VkMicromapCreateInfoEXT.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT type(@CType("VkMicromapTypeEXT") int value) { VkMicromapCreateInfoEXT.set_type(this.segment(), value); return this; } + + /// {@return `deviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment, long index) { return (long) VH_deviceAddress.get(segment, 0L, index); } + /// {@return `deviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment) { return VkMicromapCreateInfoEXT.get_deviceAddress(segment, 0L); } + /// {@return `deviceAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long deviceAddressAt(long index) { return VkMicromapCreateInfoEXT.get_deviceAddress(this.segment(), index); } + /// {@return `deviceAddress`} + public @CType("VkDeviceAddress") long deviceAddress() { return VkMicromapCreateInfoEXT.get_deviceAddress(this.segment()); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_deviceAddress.set(segment, 0L, index, value); } + /// Sets `deviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkMicromapCreateInfoEXT.set_deviceAddress(segment, 0L, value); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT deviceAddressAt(long index, @CType("VkDeviceAddress") long value) { VkMicromapCreateInfoEXT.set_deviceAddress(this.segment(), index, value); return this; } + /// Sets `deviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapCreateInfoEXT deviceAddress(@CType("VkDeviceAddress") long value) { VkMicromapCreateInfoEXT.set_deviceAddress(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapTriangleEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapTriangleEXT.java new file mode 100644 index 00000000..c4dfd11a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapTriangleEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### dataOffset +/// [VarHandle][#VH_dataOffset] - [Getter][#dataOffset()] - [Setter][#dataOffset(int)] +/// ### subdivisionLevel +/// [VarHandle][#VH_subdivisionLevel] - [Getter][#subdivisionLevel()] - [Setter][#subdivisionLevel(short)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(short)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMicromapTriangleEXT { +/// uint32_t dataOffset; +/// uint16_t subdivisionLevel; +/// uint16_t format; +/// } VkMicromapTriangleEXT; +/// ``` +public final class VkMicromapTriangleEXT extends Struct { + /// The struct layout of `VkMicromapTriangleEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("dataOffset"), + ValueLayout.JAVA_SHORT.withName("subdivisionLevel"), + ValueLayout.JAVA_SHORT.withName("format") + ); + /// The [VarHandle] of `dataOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dataOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dataOffset")); + /// The [VarHandle] of `subdivisionLevel` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_subdivisionLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subdivisionLevel")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + + /// Creates `VkMicromapTriangleEXT` with the given segment. + /// @param segment the memory segment + public VkMicromapTriangleEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMicromapTriangleEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapTriangleEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapTriangleEXT(segment); } + + /// Creates `VkMicromapTriangleEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapTriangleEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapTriangleEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMicromapTriangleEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapTriangleEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapTriangleEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMicromapTriangleEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMicromapTriangleEXT` + public static VkMicromapTriangleEXT alloc(SegmentAllocator allocator) { return new VkMicromapTriangleEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMicromapTriangleEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMicromapTriangleEXT` + public static VkMicromapTriangleEXT alloc(SegmentAllocator allocator, long count) { return new VkMicromapTriangleEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `dataOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dataOffset(MemorySegment segment, long index) { return (int) VH_dataOffset.get(segment, 0L, index); } + /// {@return `dataOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dataOffset(MemorySegment segment) { return VkMicromapTriangleEXT.get_dataOffset(segment, 0L); } + /// {@return `dataOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int dataOffsetAt(long index) { return VkMicromapTriangleEXT.get_dataOffset(this.segment(), index); } + /// {@return `dataOffset`} + public @CType("uint32_t") int dataOffset() { return VkMicromapTriangleEXT.get_dataOffset(this.segment()); } + /// Sets `dataOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dataOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dataOffset.set(segment, 0L, index, value); } + /// Sets `dataOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dataOffset(MemorySegment segment, @CType("uint32_t") int value) { VkMicromapTriangleEXT.set_dataOffset(segment, 0L, value); } + /// Sets `dataOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapTriangleEXT dataOffsetAt(long index, @CType("uint32_t") int value) { VkMicromapTriangleEXT.set_dataOffset(this.segment(), index, value); return this; } + /// Sets `dataOffset` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapTriangleEXT dataOffset(@CType("uint32_t") int value) { VkMicromapTriangleEXT.set_dataOffset(this.segment(), value); return this; } + + /// {@return `subdivisionLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_subdivisionLevel(MemorySegment segment, long index) { return (short) VH_subdivisionLevel.get(segment, 0L, index); } + /// {@return `subdivisionLevel`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_subdivisionLevel(MemorySegment segment) { return VkMicromapTriangleEXT.get_subdivisionLevel(segment, 0L); } + /// {@return `subdivisionLevel` at the given index} + /// @param index the index + public @CType("uint16_t") short subdivisionLevelAt(long index) { return VkMicromapTriangleEXT.get_subdivisionLevel(this.segment(), index); } + /// {@return `subdivisionLevel`} + public @CType("uint16_t") short subdivisionLevel() { return VkMicromapTriangleEXT.get_subdivisionLevel(this.segment()); } + /// Sets `subdivisionLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subdivisionLevel(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_subdivisionLevel.set(segment, 0L, index, value); } + /// Sets `subdivisionLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subdivisionLevel(MemorySegment segment, @CType("uint16_t") short value) { VkMicromapTriangleEXT.set_subdivisionLevel(segment, 0L, value); } + /// Sets `subdivisionLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapTriangleEXT subdivisionLevelAt(long index, @CType("uint16_t") short value) { VkMicromapTriangleEXT.set_subdivisionLevel(this.segment(), index, value); return this; } + /// Sets `subdivisionLevel` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapTriangleEXT subdivisionLevel(@CType("uint16_t") short value) { VkMicromapTriangleEXT.set_subdivisionLevel(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_format(MemorySegment segment, long index) { return (short) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_format(MemorySegment segment) { return VkMicromapTriangleEXT.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("uint16_t") short formatAt(long index) { return VkMicromapTriangleEXT.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("uint16_t") short format() { return VkMicromapTriangleEXT.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("uint16_t") short value) { VkMicromapTriangleEXT.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapTriangleEXT formatAt(long index, @CType("uint16_t") short value) { VkMicromapTriangleEXT.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapTriangleEXT format(@CType("uint16_t") short value) { VkMicromapTriangleEXT.set_format(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapUsageEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapUsageEXT.java new file mode 100644 index 00000000..e141ece3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapUsageEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### count +/// [VarHandle][#VH_count] - [Getter][#count()] - [Setter][#count(int)] +/// ### subdivisionLevel +/// [VarHandle][#VH_subdivisionLevel] - [Getter][#subdivisionLevel()] - [Setter][#subdivisionLevel(int)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMicromapUsageEXT { +/// uint32_t count; +/// uint32_t subdivisionLevel; +/// uint32_t format; +/// } VkMicromapUsageEXT; +/// ``` +public final class VkMicromapUsageEXT extends Struct { + /// The struct layout of `VkMicromapUsageEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("count"), + ValueLayout.JAVA_INT.withName("subdivisionLevel"), + ValueLayout.JAVA_INT.withName("format") + ); + /// The [VarHandle] of `count` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_count = LAYOUT.arrayElementVarHandle(PathElement.groupElement("count")); + /// The [VarHandle] of `subdivisionLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subdivisionLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subdivisionLevel")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + + /// Creates `VkMicromapUsageEXT` with the given segment. + /// @param segment the memory segment + public VkMicromapUsageEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMicromapUsageEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapUsageEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapUsageEXT(segment); } + + /// Creates `VkMicromapUsageEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapUsageEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapUsageEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMicromapUsageEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapUsageEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapUsageEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMicromapUsageEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMicromapUsageEXT` + public static VkMicromapUsageEXT alloc(SegmentAllocator allocator) { return new VkMicromapUsageEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMicromapUsageEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMicromapUsageEXT` + public static VkMicromapUsageEXT alloc(SegmentAllocator allocator, long count) { return new VkMicromapUsageEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `count` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_count(MemorySegment segment, long index) { return (int) VH_count.get(segment, 0L, index); } + /// {@return `count`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_count(MemorySegment segment) { return VkMicromapUsageEXT.get_count(segment, 0L); } + /// {@return `count` at the given index} + /// @param index the index + public @CType("uint32_t") int countAt(long index) { return VkMicromapUsageEXT.get_count(this.segment(), index); } + /// {@return `count`} + public @CType("uint32_t") int count() { return VkMicromapUsageEXT.get_count(this.segment()); } + /// Sets `count` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_count(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_count.set(segment, 0L, index, value); } + /// Sets `count` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_count(MemorySegment segment, @CType("uint32_t") int value) { VkMicromapUsageEXT.set_count(segment, 0L, value); } + /// Sets `count` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapUsageEXT countAt(long index, @CType("uint32_t") int value) { VkMicromapUsageEXT.set_count(this.segment(), index, value); return this; } + /// Sets `count` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapUsageEXT count(@CType("uint32_t") int value) { VkMicromapUsageEXT.set_count(this.segment(), value); return this; } + + /// {@return `subdivisionLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subdivisionLevel(MemorySegment segment, long index) { return (int) VH_subdivisionLevel.get(segment, 0L, index); } + /// {@return `subdivisionLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subdivisionLevel(MemorySegment segment) { return VkMicromapUsageEXT.get_subdivisionLevel(segment, 0L); } + /// {@return `subdivisionLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int subdivisionLevelAt(long index) { return VkMicromapUsageEXT.get_subdivisionLevel(this.segment(), index); } + /// {@return `subdivisionLevel`} + public @CType("uint32_t") int subdivisionLevel() { return VkMicromapUsageEXT.get_subdivisionLevel(this.segment()); } + /// Sets `subdivisionLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subdivisionLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subdivisionLevel.set(segment, 0L, index, value); } + /// Sets `subdivisionLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subdivisionLevel(MemorySegment segment, @CType("uint32_t") int value) { VkMicromapUsageEXT.set_subdivisionLevel(segment, 0L, value); } + /// Sets `subdivisionLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapUsageEXT subdivisionLevelAt(long index, @CType("uint32_t") int value) { VkMicromapUsageEXT.set_subdivisionLevel(this.segment(), index, value); return this; } + /// Sets `subdivisionLevel` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapUsageEXT subdivisionLevel(@CType("uint32_t") int value) { VkMicromapUsageEXT.set_subdivisionLevel(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_format(MemorySegment segment) { return VkMicromapUsageEXT.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("uint32_t") int formatAt(long index) { return VkMicromapUsageEXT.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("uint32_t") int format() { return VkMicromapUsageEXT.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("uint32_t") int value) { VkMicromapUsageEXT.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapUsageEXT formatAt(long index, @CType("uint32_t") int value) { VkMicromapUsageEXT.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapUsageEXT format(@CType("uint32_t") int value) { VkMicromapUsageEXT.set_format(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapVersionInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapVersionInfoEXT.java new file mode 100644 index 00000000..46ce37c6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMicromapVersionInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pVersionData +/// [VarHandle][#VH_pVersionData] - [Getter][#pVersionData()] - [Setter][#pVersionData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMicromapVersionInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// const uint8_t * pVersionData; +/// } VkMicromapVersionInfoEXT; +/// ``` +public final class VkMicromapVersionInfoEXT extends Struct { + /// The struct layout of `VkMicromapVersionInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pVersionData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pVersionData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVersionData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVersionData")); + + /// Creates `VkMicromapVersionInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMicromapVersionInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMicromapVersionInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapVersionInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapVersionInfoEXT(segment); } + + /// Creates `VkMicromapVersionInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapVersionInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapVersionInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMicromapVersionInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMicromapVersionInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMicromapVersionInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMicromapVersionInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMicromapVersionInfoEXT` + public static VkMicromapVersionInfoEXT alloc(SegmentAllocator allocator) { return new VkMicromapVersionInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMicromapVersionInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMicromapVersionInfoEXT` + public static VkMicromapVersionInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMicromapVersionInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMicromapVersionInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMicromapVersionInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMicromapVersionInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMicromapVersionInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapVersionInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMicromapVersionInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapVersionInfoEXT sType(@CType("VkStructureType") int value) { VkMicromapVersionInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMicromapVersionInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMicromapVersionInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMicromapVersionInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapVersionInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapVersionInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapVersionInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapVersionInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMicromapVersionInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pVersionData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint8_t *") java.lang.foreign.MemorySegment get_pVersionData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVersionData.get(segment, 0L, index); } + /// {@return `pVersionData`} + /// @param segment the segment of the struct + public static @CType("const uint8_t *") java.lang.foreign.MemorySegment get_pVersionData(MemorySegment segment) { return VkMicromapVersionInfoEXT.get_pVersionData(segment, 0L); } + /// {@return `pVersionData` at the given index} + /// @param index the index + public @CType("const uint8_t *") java.lang.foreign.MemorySegment pVersionDataAt(long index) { return VkMicromapVersionInfoEXT.get_pVersionData(this.segment(), index); } + /// {@return `pVersionData`} + public @CType("const uint8_t *") java.lang.foreign.MemorySegment pVersionData() { return VkMicromapVersionInfoEXT.get_pVersionData(this.segment()); } + /// Sets `pVersionData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVersionData(MemorySegment segment, long index, @CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VH_pVersionData.set(segment, 0L, index, value); } + /// Sets `pVersionData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVersionData(MemorySegment segment, @CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VkMicromapVersionInfoEXT.set_pVersionData(segment, 0L, value); } + /// Sets `pVersionData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMicromapVersionInfoEXT pVersionDataAt(long index, @CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VkMicromapVersionInfoEXT.set_pVersionData(this.segment(), index, value); return this; } + /// Sets `pVersionData` with the given value. + /// @param value the value + /// @return `this` + public VkMicromapVersionInfoEXT pVersionData(@CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VkMicromapVersionInfoEXT.set_pVersionData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultiDrawIndexedInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultiDrawIndexedInfoEXT.java new file mode 100644 index 00000000..9521887e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultiDrawIndexedInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### firstIndex +/// [VarHandle][#VH_firstIndex] - [Getter][#firstIndex()] - [Setter][#firstIndex(int)] +/// ### indexCount +/// [VarHandle][#VH_indexCount] - [Getter][#indexCount()] - [Setter][#indexCount(int)] +/// ### vertexOffset +/// [VarHandle][#VH_vertexOffset] - [Getter][#vertexOffset()] - [Setter][#vertexOffset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMultiDrawIndexedInfoEXT { +/// uint32_t firstIndex; +/// uint32_t indexCount; +/// int32_t vertexOffset; +/// } VkMultiDrawIndexedInfoEXT; +/// ``` +public final class VkMultiDrawIndexedInfoEXT extends Struct { + /// The struct layout of `VkMultiDrawIndexedInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("firstIndex"), + ValueLayout.JAVA_INT.withName("indexCount"), + ValueLayout.JAVA_INT.withName("vertexOffset") + ); + /// The [VarHandle] of `firstIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstIndex")); + /// The [VarHandle] of `indexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexCount")); + /// The [VarHandle] of `vertexOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexOffset")); + + /// Creates `VkMultiDrawIndexedInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMultiDrawIndexedInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMultiDrawIndexedInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiDrawIndexedInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiDrawIndexedInfoEXT(segment); } + + /// Creates `VkMultiDrawIndexedInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiDrawIndexedInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiDrawIndexedInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMultiDrawIndexedInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiDrawIndexedInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiDrawIndexedInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMultiDrawIndexedInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMultiDrawIndexedInfoEXT` + public static VkMultiDrawIndexedInfoEXT alloc(SegmentAllocator allocator) { return new VkMultiDrawIndexedInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMultiDrawIndexedInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMultiDrawIndexedInfoEXT` + public static VkMultiDrawIndexedInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMultiDrawIndexedInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `firstIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstIndex(MemorySegment segment, long index) { return (int) VH_firstIndex.get(segment, 0L, index); } + /// {@return `firstIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstIndex(MemorySegment segment) { return VkMultiDrawIndexedInfoEXT.get_firstIndex(segment, 0L); } + /// {@return `firstIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int firstIndexAt(long index) { return VkMultiDrawIndexedInfoEXT.get_firstIndex(this.segment(), index); } + /// {@return `firstIndex`} + public @CType("uint32_t") int firstIndex() { return VkMultiDrawIndexedInfoEXT.get_firstIndex(this.segment()); } + /// Sets `firstIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstIndex.set(segment, 0L, index, value); } + /// Sets `firstIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstIndex(MemorySegment segment, @CType("uint32_t") int value) { VkMultiDrawIndexedInfoEXT.set_firstIndex(segment, 0L, value); } + /// Sets `firstIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiDrawIndexedInfoEXT firstIndexAt(long index, @CType("uint32_t") int value) { VkMultiDrawIndexedInfoEXT.set_firstIndex(this.segment(), index, value); return this; } + /// Sets `firstIndex` with the given value. + /// @param value the value + /// @return `this` + public VkMultiDrawIndexedInfoEXT firstIndex(@CType("uint32_t") int value) { VkMultiDrawIndexedInfoEXT.set_firstIndex(this.segment(), value); return this; } + + /// {@return `indexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_indexCount(MemorySegment segment, long index) { return (int) VH_indexCount.get(segment, 0L, index); } + /// {@return `indexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_indexCount(MemorySegment segment) { return VkMultiDrawIndexedInfoEXT.get_indexCount(segment, 0L); } + /// {@return `indexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int indexCountAt(long index) { return VkMultiDrawIndexedInfoEXT.get_indexCount(this.segment(), index); } + /// {@return `indexCount`} + public @CType("uint32_t") int indexCount() { return VkMultiDrawIndexedInfoEXT.get_indexCount(this.segment()); } + /// Sets `indexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_indexCount.set(segment, 0L, index, value); } + /// Sets `indexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexCount(MemorySegment segment, @CType("uint32_t") int value) { VkMultiDrawIndexedInfoEXT.set_indexCount(segment, 0L, value); } + /// Sets `indexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiDrawIndexedInfoEXT indexCountAt(long index, @CType("uint32_t") int value) { VkMultiDrawIndexedInfoEXT.set_indexCount(this.segment(), index, value); return this; } + /// Sets `indexCount` with the given value. + /// @param value the value + /// @return `this` + public VkMultiDrawIndexedInfoEXT indexCount(@CType("uint32_t") int value) { VkMultiDrawIndexedInfoEXT.set_indexCount(this.segment(), value); return this; } + + /// {@return `vertexOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_vertexOffset(MemorySegment segment, long index) { return (int) VH_vertexOffset.get(segment, 0L, index); } + /// {@return `vertexOffset`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_vertexOffset(MemorySegment segment) { return VkMultiDrawIndexedInfoEXT.get_vertexOffset(segment, 0L); } + /// {@return `vertexOffset` at the given index} + /// @param index the index + public @CType("int32_t") int vertexOffsetAt(long index) { return VkMultiDrawIndexedInfoEXT.get_vertexOffset(this.segment(), index); } + /// {@return `vertexOffset`} + public @CType("int32_t") int vertexOffset() { return VkMultiDrawIndexedInfoEXT.get_vertexOffset(this.segment()); } + /// Sets `vertexOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexOffset(MemorySegment segment, long index, @CType("int32_t") int value) { VH_vertexOffset.set(segment, 0L, index, value); } + /// Sets `vertexOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexOffset(MemorySegment segment, @CType("int32_t") int value) { VkMultiDrawIndexedInfoEXT.set_vertexOffset(segment, 0L, value); } + /// Sets `vertexOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiDrawIndexedInfoEXT vertexOffsetAt(long index, @CType("int32_t") int value) { VkMultiDrawIndexedInfoEXT.set_vertexOffset(this.segment(), index, value); return this; } + /// Sets `vertexOffset` with the given value. + /// @param value the value + /// @return `this` + public VkMultiDrawIndexedInfoEXT vertexOffset(@CType("int32_t") int value) { VkMultiDrawIndexedInfoEXT.set_vertexOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultiDrawInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultiDrawInfoEXT.java new file mode 100644 index 00000000..0a5222a9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultiDrawInfoEXT.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### firstVertex +/// [VarHandle][#VH_firstVertex] - [Getter][#firstVertex()] - [Setter][#firstVertex(int)] +/// ### vertexCount +/// [VarHandle][#VH_vertexCount] - [Getter][#vertexCount()] - [Setter][#vertexCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMultiDrawInfoEXT { +/// uint32_t firstVertex; +/// uint32_t vertexCount; +/// } VkMultiDrawInfoEXT; +/// ``` +public final class VkMultiDrawInfoEXT extends Struct { + /// The struct layout of `VkMultiDrawInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("firstVertex"), + ValueLayout.JAVA_INT.withName("vertexCount") + ); + /// The [VarHandle] of `firstVertex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstVertex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstVertex")); + /// The [VarHandle] of `vertexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexCount")); + + /// Creates `VkMultiDrawInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMultiDrawInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMultiDrawInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiDrawInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiDrawInfoEXT(segment); } + + /// Creates `VkMultiDrawInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiDrawInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiDrawInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMultiDrawInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiDrawInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiDrawInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMultiDrawInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMultiDrawInfoEXT` + public static VkMultiDrawInfoEXT alloc(SegmentAllocator allocator) { return new VkMultiDrawInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMultiDrawInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMultiDrawInfoEXT` + public static VkMultiDrawInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMultiDrawInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `firstVertex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstVertex(MemorySegment segment, long index) { return (int) VH_firstVertex.get(segment, 0L, index); } + /// {@return `firstVertex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstVertex(MemorySegment segment) { return VkMultiDrawInfoEXT.get_firstVertex(segment, 0L); } + /// {@return `firstVertex` at the given index} + /// @param index the index + public @CType("uint32_t") int firstVertexAt(long index) { return VkMultiDrawInfoEXT.get_firstVertex(this.segment(), index); } + /// {@return `firstVertex`} + public @CType("uint32_t") int firstVertex() { return VkMultiDrawInfoEXT.get_firstVertex(this.segment()); } + /// Sets `firstVertex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstVertex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstVertex.set(segment, 0L, index, value); } + /// Sets `firstVertex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstVertex(MemorySegment segment, @CType("uint32_t") int value) { VkMultiDrawInfoEXT.set_firstVertex(segment, 0L, value); } + /// Sets `firstVertex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiDrawInfoEXT firstVertexAt(long index, @CType("uint32_t") int value) { VkMultiDrawInfoEXT.set_firstVertex(this.segment(), index, value); return this; } + /// Sets `firstVertex` with the given value. + /// @param value the value + /// @return `this` + public VkMultiDrawInfoEXT firstVertex(@CType("uint32_t") int value) { VkMultiDrawInfoEXT.set_firstVertex(this.segment(), value); return this; } + + /// {@return `vertexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vertexCount(MemorySegment segment, long index) { return (int) VH_vertexCount.get(segment, 0L, index); } + /// {@return `vertexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vertexCount(MemorySegment segment) { return VkMultiDrawInfoEXT.get_vertexCount(segment, 0L); } + /// {@return `vertexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int vertexCountAt(long index) { return VkMultiDrawInfoEXT.get_vertexCount(this.segment(), index); } + /// {@return `vertexCount`} + public @CType("uint32_t") int vertexCount() { return VkMultiDrawInfoEXT.get_vertexCount(this.segment()); } + /// Sets `vertexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vertexCount.set(segment, 0L, index, value); } + /// Sets `vertexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexCount(MemorySegment segment, @CType("uint32_t") int value) { VkMultiDrawInfoEXT.set_vertexCount(segment, 0L, value); } + /// Sets `vertexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiDrawInfoEXT vertexCountAt(long index, @CType("uint32_t") int value) { VkMultiDrawInfoEXT.set_vertexCount(this.segment(), index, value); return this; } + /// Sets `vertexCount` with the given value. + /// @param value the value + /// @return `this` + public VkMultiDrawInfoEXT vertexCount(@CType("uint32_t") int value) { VkMultiDrawInfoEXT.set_vertexCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultisamplePropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultisamplePropertiesEXT.java new file mode 100644 index 00000000..02a7648b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultisamplePropertiesEXT.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxSampleLocationGridSize +/// [Byte offset][#OFFSET_maxSampleLocationGridSize] - [Memory layout][#ML_maxSampleLocationGridSize] - [Getter][#maxSampleLocationGridSize()] - [Setter][#maxSampleLocationGridSize(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMultisamplePropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkExtent2D maxSampleLocationGridSize; +/// } VkMultisamplePropertiesEXT; +/// ``` +public final class VkMultisamplePropertiesEXT extends Struct { + /// The struct layout of `VkMultisamplePropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxSampleLocationGridSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `maxSampleLocationGridSize`. + public static final long OFFSET_maxSampleLocationGridSize = LAYOUT.byteOffset(PathElement.groupElement("maxSampleLocationGridSize")); + /// The memory layout of `maxSampleLocationGridSize`. + public static final MemoryLayout ML_maxSampleLocationGridSize = LAYOUT.select(PathElement.groupElement("maxSampleLocationGridSize")); + + /// Creates `VkMultisamplePropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkMultisamplePropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMultisamplePropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultisamplePropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultisamplePropertiesEXT(segment); } + + /// Creates `VkMultisamplePropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultisamplePropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultisamplePropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMultisamplePropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultisamplePropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMultisamplePropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMultisamplePropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMultisamplePropertiesEXT` + public static VkMultisamplePropertiesEXT alloc(SegmentAllocator allocator) { return new VkMultisamplePropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMultisamplePropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMultisamplePropertiesEXT` + public static VkMultisamplePropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkMultisamplePropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMultisamplePropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMultisamplePropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMultisamplePropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMultisamplePropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultisamplePropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMultisamplePropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMultisamplePropertiesEXT sType(@CType("VkStructureType") int value) { VkMultisamplePropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMultisamplePropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMultisamplePropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkMultisamplePropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkMultisamplePropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultisamplePropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkMultisamplePropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMultisamplePropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkMultisamplePropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `maxSampleLocationGridSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxSampleLocationGridSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxSampleLocationGridSize, index), ML_maxSampleLocationGridSize); } + /// {@return `maxSampleLocationGridSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxSampleLocationGridSize(MemorySegment segment) { return VkMultisamplePropertiesEXT.get_maxSampleLocationGridSize(segment, 0L); } + /// {@return `maxSampleLocationGridSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxSampleLocationGridSizeAt(long index) { return VkMultisamplePropertiesEXT.get_maxSampleLocationGridSize(this.segment(), index); } + /// {@return `maxSampleLocationGridSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxSampleLocationGridSize() { return VkMultisamplePropertiesEXT.get_maxSampleLocationGridSize(this.segment()); } + /// Sets `maxSampleLocationGridSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSampleLocationGridSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxSampleLocationGridSize, index), ML_maxSampleLocationGridSize.byteSize()); } + /// Sets `maxSampleLocationGridSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSampleLocationGridSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkMultisamplePropertiesEXT.set_maxSampleLocationGridSize(segment, 0L, value); } + /// Sets `maxSampleLocationGridSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultisamplePropertiesEXT maxSampleLocationGridSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkMultisamplePropertiesEXT.set_maxSampleLocationGridSize(this.segment(), index, value); return this; } + /// Sets `maxSampleLocationGridSize` with the given value. + /// @param value the value + /// @return `this` + public VkMultisamplePropertiesEXT maxSampleLocationGridSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkMultisamplePropertiesEXT.set_maxSampleLocationGridSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultisampledRenderToSingleSampledInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultisampledRenderToSingleSampledInfoEXT.java new file mode 100644 index 00000000..58cf34fd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMultisampledRenderToSingleSampledInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### multisampledRenderToSingleSampledEnable +/// [VarHandle][#VH_multisampledRenderToSingleSampledEnable] - [Getter][#multisampledRenderToSingleSampledEnable()] - [Setter][#multisampledRenderToSingleSampledEnable(int)] +/// ### rasterizationSamples +/// [VarHandle][#VH_rasterizationSamples] - [Getter][#rasterizationSamples()] - [Setter][#rasterizationSamples(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMultisampledRenderToSingleSampledInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 multisampledRenderToSingleSampledEnable; +/// VkSampleCountFlagBits rasterizationSamples; +/// } VkMultisampledRenderToSingleSampledInfoEXT; +/// ``` +public final class VkMultisampledRenderToSingleSampledInfoEXT extends Struct { + /// The struct layout of `VkMultisampledRenderToSingleSampledInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("multisampledRenderToSingleSampledEnable"), + ValueLayout.JAVA_INT.withName("rasterizationSamples") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `multisampledRenderToSingleSampledEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multisampledRenderToSingleSampledEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multisampledRenderToSingleSampledEnable")); + /// The [VarHandle] of `rasterizationSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rasterizationSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rasterizationSamples")); + + /// Creates `VkMultisampledRenderToSingleSampledInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMultisampledRenderToSingleSampledInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMultisampledRenderToSingleSampledInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultisampledRenderToSingleSampledInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultisampledRenderToSingleSampledInfoEXT(segment); } + + /// Creates `VkMultisampledRenderToSingleSampledInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultisampledRenderToSingleSampledInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultisampledRenderToSingleSampledInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMultisampledRenderToSingleSampledInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultisampledRenderToSingleSampledInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMultisampledRenderToSingleSampledInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMultisampledRenderToSingleSampledInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMultisampledRenderToSingleSampledInfoEXT` + public static VkMultisampledRenderToSingleSampledInfoEXT alloc(SegmentAllocator allocator) { return new VkMultisampledRenderToSingleSampledInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMultisampledRenderToSingleSampledInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMultisampledRenderToSingleSampledInfoEXT` + public static VkMultisampledRenderToSingleSampledInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMultisampledRenderToSingleSampledInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMultisampledRenderToSingleSampledInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMultisampledRenderToSingleSampledInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMultisampledRenderToSingleSampledInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMultisampledRenderToSingleSampledInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultisampledRenderToSingleSampledInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMultisampledRenderToSingleSampledInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMultisampledRenderToSingleSampledInfoEXT sType(@CType("VkStructureType") int value) { VkMultisampledRenderToSingleSampledInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMultisampledRenderToSingleSampledInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMultisampledRenderToSingleSampledInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMultisampledRenderToSingleSampledInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMultisampledRenderToSingleSampledInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultisampledRenderToSingleSampledInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMultisampledRenderToSingleSampledInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMultisampledRenderToSingleSampledInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMultisampledRenderToSingleSampledInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `multisampledRenderToSingleSampledEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multisampledRenderToSingleSampledEnable(MemorySegment segment, long index) { return (int) VH_multisampledRenderToSingleSampledEnable.get(segment, 0L, index); } + /// {@return `multisampledRenderToSingleSampledEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multisampledRenderToSingleSampledEnable(MemorySegment segment) { return VkMultisampledRenderToSingleSampledInfoEXT.get_multisampledRenderToSingleSampledEnable(segment, 0L); } + /// {@return `multisampledRenderToSingleSampledEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int multisampledRenderToSingleSampledEnableAt(long index) { return VkMultisampledRenderToSingleSampledInfoEXT.get_multisampledRenderToSingleSampledEnable(this.segment(), index); } + /// {@return `multisampledRenderToSingleSampledEnable`} + public @CType("VkBool32") int multisampledRenderToSingleSampledEnable() { return VkMultisampledRenderToSingleSampledInfoEXT.get_multisampledRenderToSingleSampledEnable(this.segment()); } + /// Sets `multisampledRenderToSingleSampledEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multisampledRenderToSingleSampledEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multisampledRenderToSingleSampledEnable.set(segment, 0L, index, value); } + /// Sets `multisampledRenderToSingleSampledEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multisampledRenderToSingleSampledEnable(MemorySegment segment, @CType("VkBool32") int value) { VkMultisampledRenderToSingleSampledInfoEXT.set_multisampledRenderToSingleSampledEnable(segment, 0L, value); } + /// Sets `multisampledRenderToSingleSampledEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultisampledRenderToSingleSampledInfoEXT multisampledRenderToSingleSampledEnableAt(long index, @CType("VkBool32") int value) { VkMultisampledRenderToSingleSampledInfoEXT.set_multisampledRenderToSingleSampledEnable(this.segment(), index, value); return this; } + /// Sets `multisampledRenderToSingleSampledEnable` with the given value. + /// @param value the value + /// @return `this` + public VkMultisampledRenderToSingleSampledInfoEXT multisampledRenderToSingleSampledEnable(@CType("VkBool32") int value) { VkMultisampledRenderToSingleSampledInfoEXT.set_multisampledRenderToSingleSampledEnable(this.segment(), value); return this; } + + /// {@return `rasterizationSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_rasterizationSamples(MemorySegment segment, long index) { return (int) VH_rasterizationSamples.get(segment, 0L, index); } + /// {@return `rasterizationSamples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_rasterizationSamples(MemorySegment segment) { return VkMultisampledRenderToSingleSampledInfoEXT.get_rasterizationSamples(segment, 0L); } + /// {@return `rasterizationSamples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int rasterizationSamplesAt(long index) { return VkMultisampledRenderToSingleSampledInfoEXT.get_rasterizationSamples(this.segment(), index); } + /// {@return `rasterizationSamples`} + public @CType("VkSampleCountFlagBits") int rasterizationSamples() { return VkMultisampledRenderToSingleSampledInfoEXT.get_rasterizationSamples(this.segment()); } + /// Sets `rasterizationSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rasterizationSamples(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_rasterizationSamples.set(segment, 0L, index, value); } + /// Sets `rasterizationSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rasterizationSamples(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkMultisampledRenderToSingleSampledInfoEXT.set_rasterizationSamples(segment, 0L, value); } + /// Sets `rasterizationSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultisampledRenderToSingleSampledInfoEXT rasterizationSamplesAt(long index, @CType("VkSampleCountFlagBits") int value) { VkMultisampledRenderToSingleSampledInfoEXT.set_rasterizationSamples(this.segment(), index, value); return this; } + /// Sets `rasterizationSamples` with the given value. + /// @param value the value + /// @return `this` + public VkMultisampledRenderToSingleSampledInfoEXT rasterizationSamples(@CType("VkSampleCountFlagBits") int value) { VkMultisampledRenderToSingleSampledInfoEXT.set_rasterizationSamples(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMutableDescriptorTypeCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMutableDescriptorTypeCreateInfoEXT.java new file mode 100644 index 00000000..ce3a01e3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMutableDescriptorTypeCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### mutableDescriptorTypeListCount +/// [VarHandle][#VH_mutableDescriptorTypeListCount] - [Getter][#mutableDescriptorTypeListCount()] - [Setter][#mutableDescriptorTypeListCount(int)] +/// ### pMutableDescriptorTypeLists +/// [VarHandle][#VH_pMutableDescriptorTypeLists] - [Getter][#pMutableDescriptorTypeLists()] - [Setter][#pMutableDescriptorTypeLists(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMutableDescriptorTypeCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t mutableDescriptorTypeListCount; +/// const VkMutableDescriptorTypeListEXT * pMutableDescriptorTypeLists; +/// } VkMutableDescriptorTypeCreateInfoEXT; +/// ``` +public final class VkMutableDescriptorTypeCreateInfoEXT extends Struct { + /// The struct layout of `VkMutableDescriptorTypeCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("mutableDescriptorTypeListCount"), + ValueLayout.ADDRESS.withName("pMutableDescriptorTypeLists") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `mutableDescriptorTypeListCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mutableDescriptorTypeListCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mutableDescriptorTypeListCount")); + /// The [VarHandle] of `pMutableDescriptorTypeLists` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pMutableDescriptorTypeLists = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pMutableDescriptorTypeLists")); + + /// Creates `VkMutableDescriptorTypeCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkMutableDescriptorTypeCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMutableDescriptorTypeCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMutableDescriptorTypeCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMutableDescriptorTypeCreateInfoEXT(segment); } + + /// Creates `VkMutableDescriptorTypeCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMutableDescriptorTypeCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMutableDescriptorTypeCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMutableDescriptorTypeCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMutableDescriptorTypeCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMutableDescriptorTypeCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMutableDescriptorTypeCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMutableDescriptorTypeCreateInfoEXT` + public static VkMutableDescriptorTypeCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkMutableDescriptorTypeCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMutableDescriptorTypeCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMutableDescriptorTypeCreateInfoEXT` + public static VkMutableDescriptorTypeCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkMutableDescriptorTypeCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMutableDescriptorTypeCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMutableDescriptorTypeCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMutableDescriptorTypeCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMutableDescriptorTypeCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkMutableDescriptorTypeCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeCreateInfoEXT sType(@CType("VkStructureType") int value) { VkMutableDescriptorTypeCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMutableDescriptorTypeCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMutableDescriptorTypeCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMutableDescriptorTypeCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMutableDescriptorTypeCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMutableDescriptorTypeCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMutableDescriptorTypeCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `mutableDescriptorTypeListCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_mutableDescriptorTypeListCount(MemorySegment segment, long index) { return (int) VH_mutableDescriptorTypeListCount.get(segment, 0L, index); } + /// {@return `mutableDescriptorTypeListCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_mutableDescriptorTypeListCount(MemorySegment segment) { return VkMutableDescriptorTypeCreateInfoEXT.get_mutableDescriptorTypeListCount(segment, 0L); } + /// {@return `mutableDescriptorTypeListCount` at the given index} + /// @param index the index + public @CType("uint32_t") int mutableDescriptorTypeListCountAt(long index) { return VkMutableDescriptorTypeCreateInfoEXT.get_mutableDescriptorTypeListCount(this.segment(), index); } + /// {@return `mutableDescriptorTypeListCount`} + public @CType("uint32_t") int mutableDescriptorTypeListCount() { return VkMutableDescriptorTypeCreateInfoEXT.get_mutableDescriptorTypeListCount(this.segment()); } + /// Sets `mutableDescriptorTypeListCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mutableDescriptorTypeListCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_mutableDescriptorTypeListCount.set(segment, 0L, index, value); } + /// Sets `mutableDescriptorTypeListCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mutableDescriptorTypeListCount(MemorySegment segment, @CType("uint32_t") int value) { VkMutableDescriptorTypeCreateInfoEXT.set_mutableDescriptorTypeListCount(segment, 0L, value); } + /// Sets `mutableDescriptorTypeListCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeCreateInfoEXT mutableDescriptorTypeListCountAt(long index, @CType("uint32_t") int value) { VkMutableDescriptorTypeCreateInfoEXT.set_mutableDescriptorTypeListCount(this.segment(), index, value); return this; } + /// Sets `mutableDescriptorTypeListCount` with the given value. + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeCreateInfoEXT mutableDescriptorTypeListCount(@CType("uint32_t") int value) { VkMutableDescriptorTypeCreateInfoEXT.set_mutableDescriptorTypeListCount(this.segment(), value); return this; } + + /// {@return `pMutableDescriptorTypeLists` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkMutableDescriptorTypeListEXT *") java.lang.foreign.MemorySegment get_pMutableDescriptorTypeLists(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pMutableDescriptorTypeLists.get(segment, 0L, index); } + /// {@return `pMutableDescriptorTypeLists`} + /// @param segment the segment of the struct + public static @CType("const VkMutableDescriptorTypeListEXT *") java.lang.foreign.MemorySegment get_pMutableDescriptorTypeLists(MemorySegment segment) { return VkMutableDescriptorTypeCreateInfoEXT.get_pMutableDescriptorTypeLists(segment, 0L); } + /// {@return `pMutableDescriptorTypeLists` at the given index} + /// @param index the index + public @CType("const VkMutableDescriptorTypeListEXT *") java.lang.foreign.MemorySegment pMutableDescriptorTypeListsAt(long index) { return VkMutableDescriptorTypeCreateInfoEXT.get_pMutableDescriptorTypeLists(this.segment(), index); } + /// {@return `pMutableDescriptorTypeLists`} + public @CType("const VkMutableDescriptorTypeListEXT *") java.lang.foreign.MemorySegment pMutableDescriptorTypeLists() { return VkMutableDescriptorTypeCreateInfoEXT.get_pMutableDescriptorTypeLists(this.segment()); } + /// Sets `pMutableDescriptorTypeLists` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pMutableDescriptorTypeLists(MemorySegment segment, long index, @CType("const VkMutableDescriptorTypeListEXT *") java.lang.foreign.MemorySegment value) { VH_pMutableDescriptorTypeLists.set(segment, 0L, index, value); } + /// Sets `pMutableDescriptorTypeLists` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pMutableDescriptorTypeLists(MemorySegment segment, @CType("const VkMutableDescriptorTypeListEXT *") java.lang.foreign.MemorySegment value) { VkMutableDescriptorTypeCreateInfoEXT.set_pMutableDescriptorTypeLists(segment, 0L, value); } + /// Sets `pMutableDescriptorTypeLists` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeCreateInfoEXT pMutableDescriptorTypeListsAt(long index, @CType("const VkMutableDescriptorTypeListEXT *") java.lang.foreign.MemorySegment value) { VkMutableDescriptorTypeCreateInfoEXT.set_pMutableDescriptorTypeLists(this.segment(), index, value); return this; } + /// Sets `pMutableDescriptorTypeLists` with the given value. + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeCreateInfoEXT pMutableDescriptorTypeLists(@CType("const VkMutableDescriptorTypeListEXT *") java.lang.foreign.MemorySegment value) { VkMutableDescriptorTypeCreateInfoEXT.set_pMutableDescriptorTypeLists(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMutableDescriptorTypeListEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMutableDescriptorTypeListEXT.java new file mode 100644 index 00000000..7a191d82 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkMutableDescriptorTypeListEXT.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### descriptorTypeCount +/// [VarHandle][#VH_descriptorTypeCount] - [Getter][#descriptorTypeCount()] - [Setter][#descriptorTypeCount(int)] +/// ### pDescriptorTypes +/// [VarHandle][#VH_pDescriptorTypes] - [Getter][#pDescriptorTypes()] - [Setter][#pDescriptorTypes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMutableDescriptorTypeListEXT { +/// uint32_t descriptorTypeCount; +/// const VkDescriptorType * pDescriptorTypes; +/// } VkMutableDescriptorTypeListEXT; +/// ``` +public final class VkMutableDescriptorTypeListEXT extends Struct { + /// The struct layout of `VkMutableDescriptorTypeListEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("descriptorTypeCount"), + ValueLayout.ADDRESS.withName("pDescriptorTypes") + ); + /// The [VarHandle] of `descriptorTypeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorTypeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorTypeCount")); + /// The [VarHandle] of `pDescriptorTypes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDescriptorTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDescriptorTypes")); + + /// Creates `VkMutableDescriptorTypeListEXT` with the given segment. + /// @param segment the memory segment + public VkMutableDescriptorTypeListEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMutableDescriptorTypeListEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMutableDescriptorTypeListEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMutableDescriptorTypeListEXT(segment); } + + /// Creates `VkMutableDescriptorTypeListEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMutableDescriptorTypeListEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMutableDescriptorTypeListEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMutableDescriptorTypeListEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMutableDescriptorTypeListEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMutableDescriptorTypeListEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMutableDescriptorTypeListEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMutableDescriptorTypeListEXT` + public static VkMutableDescriptorTypeListEXT alloc(SegmentAllocator allocator) { return new VkMutableDescriptorTypeListEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMutableDescriptorTypeListEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMutableDescriptorTypeListEXT` + public static VkMutableDescriptorTypeListEXT alloc(SegmentAllocator allocator, long count) { return new VkMutableDescriptorTypeListEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `descriptorTypeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorTypeCount(MemorySegment segment, long index) { return (int) VH_descriptorTypeCount.get(segment, 0L, index); } + /// {@return `descriptorTypeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorTypeCount(MemorySegment segment) { return VkMutableDescriptorTypeListEXT.get_descriptorTypeCount(segment, 0L); } + /// {@return `descriptorTypeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorTypeCountAt(long index) { return VkMutableDescriptorTypeListEXT.get_descriptorTypeCount(this.segment(), index); } + /// {@return `descriptorTypeCount`} + public @CType("uint32_t") int descriptorTypeCount() { return VkMutableDescriptorTypeListEXT.get_descriptorTypeCount(this.segment()); } + /// Sets `descriptorTypeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorTypeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorTypeCount.set(segment, 0L, index, value); } + /// Sets `descriptorTypeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorTypeCount(MemorySegment segment, @CType("uint32_t") int value) { VkMutableDescriptorTypeListEXT.set_descriptorTypeCount(segment, 0L, value); } + /// Sets `descriptorTypeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeListEXT descriptorTypeCountAt(long index, @CType("uint32_t") int value) { VkMutableDescriptorTypeListEXT.set_descriptorTypeCount(this.segment(), index, value); return this; } + /// Sets `descriptorTypeCount` with the given value. + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeListEXT descriptorTypeCount(@CType("uint32_t") int value) { VkMutableDescriptorTypeListEXT.set_descriptorTypeCount(this.segment(), value); return this; } + + /// {@return `pDescriptorTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorType *") java.lang.foreign.MemorySegment get_pDescriptorTypes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDescriptorTypes.get(segment, 0L, index); } + /// {@return `pDescriptorTypes`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorType *") java.lang.foreign.MemorySegment get_pDescriptorTypes(MemorySegment segment) { return VkMutableDescriptorTypeListEXT.get_pDescriptorTypes(segment, 0L); } + /// {@return `pDescriptorTypes` at the given index} + /// @param index the index + public @CType("const VkDescriptorType *") java.lang.foreign.MemorySegment pDescriptorTypesAt(long index) { return VkMutableDescriptorTypeListEXT.get_pDescriptorTypes(this.segment(), index); } + /// {@return `pDescriptorTypes`} + public @CType("const VkDescriptorType *") java.lang.foreign.MemorySegment pDescriptorTypes() { return VkMutableDescriptorTypeListEXT.get_pDescriptorTypes(this.segment()); } + /// Sets `pDescriptorTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDescriptorTypes(MemorySegment segment, long index, @CType("const VkDescriptorType *") java.lang.foreign.MemorySegment value) { VH_pDescriptorTypes.set(segment, 0L, index, value); } + /// Sets `pDescriptorTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDescriptorTypes(MemorySegment segment, @CType("const VkDescriptorType *") java.lang.foreign.MemorySegment value) { VkMutableDescriptorTypeListEXT.set_pDescriptorTypes(segment, 0L, value); } + /// Sets `pDescriptorTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeListEXT pDescriptorTypesAt(long index, @CType("const VkDescriptorType *") java.lang.foreign.MemorySegment value) { VkMutableDescriptorTypeListEXT.set_pDescriptorTypes(this.segment(), index, value); return this; } + /// Sets `pDescriptorTypes` with the given value. + /// @param value the value + /// @return `this` + public VkMutableDescriptorTypeListEXT pDescriptorTypes(@CType("const VkDescriptorType *") java.lang.foreign.MemorySegment value) { VkMutableDescriptorTypeListEXT.set_pDescriptorTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkOpaqueCaptureDescriptorDataCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkOpaqueCaptureDescriptorDataCreateInfoEXT.java new file mode 100644 index 00000000..7d3cc41c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkOpaqueCaptureDescriptorDataCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### opaqueCaptureDescriptorData +/// [VarHandle][#VH_opaqueCaptureDescriptorData] - [Getter][#opaqueCaptureDescriptorData()] - [Setter][#opaqueCaptureDescriptorData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkOpaqueCaptureDescriptorDataCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// const void * opaqueCaptureDescriptorData; +/// } VkOpaqueCaptureDescriptorDataCreateInfoEXT; +/// ``` +public final class VkOpaqueCaptureDescriptorDataCreateInfoEXT extends Struct { + /// The struct layout of `VkOpaqueCaptureDescriptorDataCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("opaqueCaptureDescriptorData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `opaqueCaptureDescriptorData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_opaqueCaptureDescriptorData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("opaqueCaptureDescriptorData")); + + /// Creates `VkOpaqueCaptureDescriptorDataCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkOpaqueCaptureDescriptorDataCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkOpaqueCaptureDescriptorDataCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpaqueCaptureDescriptorDataCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpaqueCaptureDescriptorDataCreateInfoEXT(segment); } + + /// Creates `VkOpaqueCaptureDescriptorDataCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpaqueCaptureDescriptorDataCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpaqueCaptureDescriptorDataCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkOpaqueCaptureDescriptorDataCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpaqueCaptureDescriptorDataCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkOpaqueCaptureDescriptorDataCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkOpaqueCaptureDescriptorDataCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkOpaqueCaptureDescriptorDataCreateInfoEXT` + public static VkOpaqueCaptureDescriptorDataCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkOpaqueCaptureDescriptorDataCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkOpaqueCaptureDescriptorDataCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkOpaqueCaptureDescriptorDataCreateInfoEXT` + public static VkOpaqueCaptureDescriptorDataCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkOpaqueCaptureDescriptorDataCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkOpaqueCaptureDescriptorDataCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkOpaqueCaptureDescriptorDataCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkOpaqueCaptureDescriptorDataCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkOpaqueCaptureDescriptorDataCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpaqueCaptureDescriptorDataCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkOpaqueCaptureDescriptorDataCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkOpaqueCaptureDescriptorDataCreateInfoEXT sType(@CType("VkStructureType") int value) { VkOpaqueCaptureDescriptorDataCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkOpaqueCaptureDescriptorDataCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkOpaqueCaptureDescriptorDataCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkOpaqueCaptureDescriptorDataCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOpaqueCaptureDescriptorDataCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpaqueCaptureDescriptorDataCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOpaqueCaptureDescriptorDataCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkOpaqueCaptureDescriptorDataCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkOpaqueCaptureDescriptorDataCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `opaqueCaptureDescriptorData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_opaqueCaptureDescriptorData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_opaqueCaptureDescriptorData.get(segment, 0L, index); } + /// {@return `opaqueCaptureDescriptorData`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_opaqueCaptureDescriptorData(MemorySegment segment) { return VkOpaqueCaptureDescriptorDataCreateInfoEXT.get_opaqueCaptureDescriptorData(segment, 0L); } + /// {@return `opaqueCaptureDescriptorData` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment opaqueCaptureDescriptorDataAt(long index) { return VkOpaqueCaptureDescriptorDataCreateInfoEXT.get_opaqueCaptureDescriptorData(this.segment(), index); } + /// {@return `opaqueCaptureDescriptorData`} + public @CType("const void *") java.lang.foreign.MemorySegment opaqueCaptureDescriptorData() { return VkOpaqueCaptureDescriptorDataCreateInfoEXT.get_opaqueCaptureDescriptorData(this.segment()); } + /// Sets `opaqueCaptureDescriptorData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_opaqueCaptureDescriptorData(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_opaqueCaptureDescriptorData.set(segment, 0L, index, value); } + /// Sets `opaqueCaptureDescriptorData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_opaqueCaptureDescriptorData(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOpaqueCaptureDescriptorDataCreateInfoEXT.set_opaqueCaptureDescriptorData(segment, 0L, value); } + /// Sets `opaqueCaptureDescriptorData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpaqueCaptureDescriptorDataCreateInfoEXT opaqueCaptureDescriptorDataAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOpaqueCaptureDescriptorDataCreateInfoEXT.set_opaqueCaptureDescriptorData(this.segment(), index, value); return this; } + /// Sets `opaqueCaptureDescriptorData` with the given value. + /// @param value the value + /// @return `this` + public VkOpaqueCaptureDescriptorDataCreateInfoEXT opaqueCaptureDescriptorData(@CType("const void *") java.lang.foreign.MemorySegment value) { VkOpaqueCaptureDescriptorDataCreateInfoEXT.set_opaqueCaptureDescriptorData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevice4444FormatsFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevice4444FormatsFeaturesEXT.java new file mode 100644 index 00000000..413bf23d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevice4444FormatsFeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### formatA4R4G4B4 +/// [VarHandle][#VH_formatA4R4G4B4] - [Getter][#formatA4R4G4B4()] - [Setter][#formatA4R4G4B4(int)] +/// ### formatA4B4G4R4 +/// [VarHandle][#VH_formatA4B4G4R4] - [Getter][#formatA4B4G4R4()] - [Setter][#formatA4B4G4R4(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevice4444FormatsFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 formatA4R4G4B4; +/// VkBool32 formatA4B4G4R4; +/// } VkPhysicalDevice4444FormatsFeaturesEXT; +/// ``` +public final class VkPhysicalDevice4444FormatsFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDevice4444FormatsFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("formatA4R4G4B4"), + ValueLayout.JAVA_INT.withName("formatA4B4G4R4") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `formatA4R4G4B4` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_formatA4R4G4B4 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("formatA4R4G4B4")); + /// The [VarHandle] of `formatA4B4G4R4` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_formatA4B4G4R4 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("formatA4B4G4R4")); + + /// Creates `VkPhysicalDevice4444FormatsFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevice4444FormatsFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevice4444FormatsFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevice4444FormatsFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevice4444FormatsFeaturesEXT(segment); } + + /// Creates `VkPhysicalDevice4444FormatsFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevice4444FormatsFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevice4444FormatsFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevice4444FormatsFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevice4444FormatsFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevice4444FormatsFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevice4444FormatsFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevice4444FormatsFeaturesEXT` + public static VkPhysicalDevice4444FormatsFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDevice4444FormatsFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevice4444FormatsFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevice4444FormatsFeaturesEXT` + public static VkPhysicalDevice4444FormatsFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevice4444FormatsFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevice4444FormatsFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevice4444FormatsFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevice4444FormatsFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice4444FormatsFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice4444FormatsFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevice4444FormatsFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevice4444FormatsFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevice4444FormatsFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice4444FormatsFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice4444FormatsFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `formatA4R4G4B4` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_formatA4R4G4B4(MemorySegment segment, long index) { return (int) VH_formatA4R4G4B4.get(segment, 0L, index); } + /// {@return `formatA4R4G4B4`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_formatA4R4G4B4(MemorySegment segment) { return VkPhysicalDevice4444FormatsFeaturesEXT.get_formatA4R4G4B4(segment, 0L); } + /// {@return `formatA4R4G4B4` at the given index} + /// @param index the index + public @CType("VkBool32") int formatA4R4G4B4At(long index) { return VkPhysicalDevice4444FormatsFeaturesEXT.get_formatA4R4G4B4(this.segment(), index); } + /// {@return `formatA4R4G4B4`} + public @CType("VkBool32") int formatA4R4G4B4() { return VkPhysicalDevice4444FormatsFeaturesEXT.get_formatA4R4G4B4(this.segment()); } + /// Sets `formatA4R4G4B4` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_formatA4R4G4B4(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_formatA4R4G4B4.set(segment, 0L, index, value); } + /// Sets `formatA4R4G4B4` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_formatA4R4G4B4(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_formatA4R4G4B4(segment, 0L, value); } + /// Sets `formatA4R4G4B4` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice4444FormatsFeaturesEXT formatA4R4G4B4At(long index, @CType("VkBool32") int value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_formatA4R4G4B4(this.segment(), index, value); return this; } + /// Sets `formatA4R4G4B4` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice4444FormatsFeaturesEXT formatA4R4G4B4(@CType("VkBool32") int value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_formatA4R4G4B4(this.segment(), value); return this; } + + /// {@return `formatA4B4G4R4` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_formatA4B4G4R4(MemorySegment segment, long index) { return (int) VH_formatA4B4G4R4.get(segment, 0L, index); } + /// {@return `formatA4B4G4R4`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_formatA4B4G4R4(MemorySegment segment) { return VkPhysicalDevice4444FormatsFeaturesEXT.get_formatA4B4G4R4(segment, 0L); } + /// {@return `formatA4B4G4R4` at the given index} + /// @param index the index + public @CType("VkBool32") int formatA4B4G4R4At(long index) { return VkPhysicalDevice4444FormatsFeaturesEXT.get_formatA4B4G4R4(this.segment(), index); } + /// {@return `formatA4B4G4R4`} + public @CType("VkBool32") int formatA4B4G4R4() { return VkPhysicalDevice4444FormatsFeaturesEXT.get_formatA4B4G4R4(this.segment()); } + /// Sets `formatA4B4G4R4` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_formatA4B4G4R4(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_formatA4B4G4R4.set(segment, 0L, index, value); } + /// Sets `formatA4B4G4R4` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_formatA4B4G4R4(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_formatA4B4G4R4(segment, 0L, value); } + /// Sets `formatA4B4G4R4` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice4444FormatsFeaturesEXT formatA4B4G4R4At(long index, @CType("VkBool32") int value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_formatA4B4G4R4(this.segment(), index, value); return this; } + /// Sets `formatA4B4G4R4` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice4444FormatsFeaturesEXT formatA4B4G4R4(@CType("VkBool32") int value) { VkPhysicalDevice4444FormatsFeaturesEXT.set_formatA4B4G4R4(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceASTCDecodeFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceASTCDecodeFeaturesEXT.java new file mode 100644 index 00000000..e3985c29 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceASTCDecodeFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### decodeModeSharedExponent +/// [VarHandle][#VH_decodeModeSharedExponent] - [Getter][#decodeModeSharedExponent()] - [Setter][#decodeModeSharedExponent(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceASTCDecodeFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 decodeModeSharedExponent; +/// } VkPhysicalDeviceASTCDecodeFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceASTCDecodeFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceASTCDecodeFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("decodeModeSharedExponent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `decodeModeSharedExponent` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_decodeModeSharedExponent = LAYOUT.arrayElementVarHandle(PathElement.groupElement("decodeModeSharedExponent")); + + /// Creates `VkPhysicalDeviceASTCDecodeFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceASTCDecodeFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceASTCDecodeFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceASTCDecodeFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceASTCDecodeFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceASTCDecodeFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceASTCDecodeFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceASTCDecodeFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceASTCDecodeFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceASTCDecodeFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceASTCDecodeFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceASTCDecodeFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceASTCDecodeFeaturesEXT` + public static VkPhysicalDeviceASTCDecodeFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceASTCDecodeFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceASTCDecodeFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceASTCDecodeFeaturesEXT` + public static VkPhysicalDeviceASTCDecodeFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceASTCDecodeFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceASTCDecodeFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceASTCDecodeFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceASTCDecodeFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceASTCDecodeFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceASTCDecodeFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceASTCDecodeFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceASTCDecodeFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceASTCDecodeFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceASTCDecodeFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceASTCDecodeFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceASTCDecodeFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceASTCDecodeFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceASTCDecodeFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceASTCDecodeFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceASTCDecodeFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceASTCDecodeFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `decodeModeSharedExponent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_decodeModeSharedExponent(MemorySegment segment, long index) { return (int) VH_decodeModeSharedExponent.get(segment, 0L, index); } + /// {@return `decodeModeSharedExponent`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_decodeModeSharedExponent(MemorySegment segment) { return VkPhysicalDeviceASTCDecodeFeaturesEXT.get_decodeModeSharedExponent(segment, 0L); } + /// {@return `decodeModeSharedExponent` at the given index} + /// @param index the index + public @CType("VkBool32") int decodeModeSharedExponentAt(long index) { return VkPhysicalDeviceASTCDecodeFeaturesEXT.get_decodeModeSharedExponent(this.segment(), index); } + /// {@return `decodeModeSharedExponent`} + public @CType("VkBool32") int decodeModeSharedExponent() { return VkPhysicalDeviceASTCDecodeFeaturesEXT.get_decodeModeSharedExponent(this.segment()); } + /// Sets `decodeModeSharedExponent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_decodeModeSharedExponent(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_decodeModeSharedExponent.set(segment, 0L, index, value); } + /// Sets `decodeModeSharedExponent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_decodeModeSharedExponent(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceASTCDecodeFeaturesEXT.set_decodeModeSharedExponent(segment, 0L, value); } + /// Sets `decodeModeSharedExponent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceASTCDecodeFeaturesEXT decodeModeSharedExponentAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceASTCDecodeFeaturesEXT.set_decodeModeSharedExponent(this.segment(), index, value); return this; } + /// Sets `decodeModeSharedExponent` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceASTCDecodeFeaturesEXT decodeModeSharedExponent(@CType("VkBool32") int value) { VkPhysicalDeviceASTCDecodeFeaturesEXT.set_decodeModeSharedExponent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceAddressBindingReportFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceAddressBindingReportFeaturesEXT.java new file mode 100644 index 00000000..c80c80d8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceAddressBindingReportFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### reportAddressBinding +/// [VarHandle][#VH_reportAddressBinding] - [Getter][#reportAddressBinding()] - [Setter][#reportAddressBinding(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceAddressBindingReportFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 reportAddressBinding; +/// } VkPhysicalDeviceAddressBindingReportFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceAddressBindingReportFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceAddressBindingReportFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("reportAddressBinding") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `reportAddressBinding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reportAddressBinding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reportAddressBinding")); + + /// Creates `VkPhysicalDeviceAddressBindingReportFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceAddressBindingReportFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceAddressBindingReportFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAddressBindingReportFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAddressBindingReportFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceAddressBindingReportFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAddressBindingReportFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAddressBindingReportFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceAddressBindingReportFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAddressBindingReportFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAddressBindingReportFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceAddressBindingReportFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceAddressBindingReportFeaturesEXT` + public static VkPhysicalDeviceAddressBindingReportFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceAddressBindingReportFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceAddressBindingReportFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceAddressBindingReportFeaturesEXT` + public static VkPhysicalDeviceAddressBindingReportFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceAddressBindingReportFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceAddressBindingReportFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceAddressBindingReportFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceAddressBindingReportFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceAddressBindingReportFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAddressBindingReportFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceAddressBindingReportFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAddressBindingReportFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceAddressBindingReportFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceAddressBindingReportFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceAddressBindingReportFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceAddressBindingReportFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAddressBindingReportFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAddressBindingReportFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAddressBindingReportFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAddressBindingReportFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAddressBindingReportFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `reportAddressBinding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_reportAddressBinding(MemorySegment segment, long index) { return (int) VH_reportAddressBinding.get(segment, 0L, index); } + /// {@return `reportAddressBinding`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_reportAddressBinding(MemorySegment segment) { return VkPhysicalDeviceAddressBindingReportFeaturesEXT.get_reportAddressBinding(segment, 0L); } + /// {@return `reportAddressBinding` at the given index} + /// @param index the index + public @CType("VkBool32") int reportAddressBindingAt(long index) { return VkPhysicalDeviceAddressBindingReportFeaturesEXT.get_reportAddressBinding(this.segment(), index); } + /// {@return `reportAddressBinding`} + public @CType("VkBool32") int reportAddressBinding() { return VkPhysicalDeviceAddressBindingReportFeaturesEXT.get_reportAddressBinding(this.segment()); } + /// Sets `reportAddressBinding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reportAddressBinding(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_reportAddressBinding.set(segment, 0L, index, value); } + /// Sets `reportAddressBinding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reportAddressBinding(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceAddressBindingReportFeaturesEXT.set_reportAddressBinding(segment, 0L, value); } + /// Sets `reportAddressBinding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAddressBindingReportFeaturesEXT reportAddressBindingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceAddressBindingReportFeaturesEXT.set_reportAddressBinding(this.segment(), index, value); return this; } + /// Sets `reportAddressBinding` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAddressBindingReportFeaturesEXT reportAddressBinding(@CType("VkBool32") int value) { VkPhysicalDeviceAddressBindingReportFeaturesEXT.set_reportAddressBinding(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.java new file mode 100644 index 00000000..098b1dd4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### attachmentFeedbackLoopDynamicState +/// [VarHandle][#VH_attachmentFeedbackLoopDynamicState] - [Getter][#attachmentFeedbackLoopDynamicState()] - [Setter][#attachmentFeedbackLoopDynamicState(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 attachmentFeedbackLoopDynamicState; +/// } VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("attachmentFeedbackLoopDynamicState") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `attachmentFeedbackLoopDynamicState` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentFeedbackLoopDynamicState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentFeedbackLoopDynamicState")); + + /// Creates `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT` + public static VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT` + public static VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `attachmentFeedbackLoopDynamicState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_attachmentFeedbackLoopDynamicState(MemorySegment segment, long index) { return (int) VH_attachmentFeedbackLoopDynamicState.get(segment, 0L, index); } + /// {@return `attachmentFeedbackLoopDynamicState`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_attachmentFeedbackLoopDynamicState(MemorySegment segment) { return VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.get_attachmentFeedbackLoopDynamicState(segment, 0L); } + /// {@return `attachmentFeedbackLoopDynamicState` at the given index} + /// @param index the index + public @CType("VkBool32") int attachmentFeedbackLoopDynamicStateAt(long index) { return VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.get_attachmentFeedbackLoopDynamicState(this.segment(), index); } + /// {@return `attachmentFeedbackLoopDynamicState`} + public @CType("VkBool32") int attachmentFeedbackLoopDynamicState() { return VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.get_attachmentFeedbackLoopDynamicState(this.segment()); } + /// Sets `attachmentFeedbackLoopDynamicState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentFeedbackLoopDynamicState(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_attachmentFeedbackLoopDynamicState.set(segment, 0L, index, value); } + /// Sets `attachmentFeedbackLoopDynamicState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentFeedbackLoopDynamicState(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.set_attachmentFeedbackLoopDynamicState(segment, 0L, value); } + /// Sets `attachmentFeedbackLoopDynamicState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT attachmentFeedbackLoopDynamicStateAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.set_attachmentFeedbackLoopDynamicState(this.segment(), index, value); return this; } + /// Sets `attachmentFeedbackLoopDynamicState` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT attachmentFeedbackLoopDynamicState(@CType("VkBool32") int value) { VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.set_attachmentFeedbackLoopDynamicState(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.java new file mode 100644 index 00000000..26a16334 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### attachmentFeedbackLoopLayout +/// [VarHandle][#VH_attachmentFeedbackLoopLayout] - [Getter][#attachmentFeedbackLoopLayout()] - [Setter][#attachmentFeedbackLoopLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 attachmentFeedbackLoopLayout; +/// } VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("attachmentFeedbackLoopLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `attachmentFeedbackLoopLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentFeedbackLoopLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentFeedbackLoopLayout")); + + /// Creates `VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT` + public static VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT` + public static VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `attachmentFeedbackLoopLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_attachmentFeedbackLoopLayout(MemorySegment segment, long index) { return (int) VH_attachmentFeedbackLoopLayout.get(segment, 0L, index); } + /// {@return `attachmentFeedbackLoopLayout`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_attachmentFeedbackLoopLayout(MemorySegment segment) { return VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.get_attachmentFeedbackLoopLayout(segment, 0L); } + /// {@return `attachmentFeedbackLoopLayout` at the given index} + /// @param index the index + public @CType("VkBool32") int attachmentFeedbackLoopLayoutAt(long index) { return VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.get_attachmentFeedbackLoopLayout(this.segment(), index); } + /// {@return `attachmentFeedbackLoopLayout`} + public @CType("VkBool32") int attachmentFeedbackLoopLayout() { return VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.get_attachmentFeedbackLoopLayout(this.segment()); } + /// Sets `attachmentFeedbackLoopLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentFeedbackLoopLayout(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_attachmentFeedbackLoopLayout.set(segment, 0L, index, value); } + /// Sets `attachmentFeedbackLoopLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentFeedbackLoopLayout(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.set_attachmentFeedbackLoopLayout(segment, 0L, value); } + /// Sets `attachmentFeedbackLoopLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT attachmentFeedbackLoopLayoutAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.set_attachmentFeedbackLoopLayout(this.segment(), index, value); return this; } + /// Sets `attachmentFeedbackLoopLayout` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT attachmentFeedbackLoopLayout(@CType("VkBool32") int value) { VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.set_attachmentFeedbackLoopLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.java new file mode 100644 index 00000000..042550d4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### advancedBlendCoherentOperations +/// [VarHandle][#VH_advancedBlendCoherentOperations] - [Getter][#advancedBlendCoherentOperations()] - [Setter][#advancedBlendCoherentOperations(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 advancedBlendCoherentOperations; +/// } VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("advancedBlendCoherentOperations") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `advancedBlendCoherentOperations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_advancedBlendCoherentOperations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("advancedBlendCoherentOperations")); + + /// Creates `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT` + public static VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT` + public static VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `advancedBlendCoherentOperations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_advancedBlendCoherentOperations(MemorySegment segment, long index) { return (int) VH_advancedBlendCoherentOperations.get(segment, 0L, index); } + /// {@return `advancedBlendCoherentOperations`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_advancedBlendCoherentOperations(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.get_advancedBlendCoherentOperations(segment, 0L); } + /// {@return `advancedBlendCoherentOperations` at the given index} + /// @param index the index + public @CType("VkBool32") int advancedBlendCoherentOperationsAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.get_advancedBlendCoherentOperations(this.segment(), index); } + /// {@return `advancedBlendCoherentOperations`} + public @CType("VkBool32") int advancedBlendCoherentOperations() { return VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.get_advancedBlendCoherentOperations(this.segment()); } + /// Sets `advancedBlendCoherentOperations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_advancedBlendCoherentOperations(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_advancedBlendCoherentOperations.set(segment, 0L, index, value); } + /// Sets `advancedBlendCoherentOperations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_advancedBlendCoherentOperations(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.set_advancedBlendCoherentOperations(segment, 0L, value); } + /// Sets `advancedBlendCoherentOperations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT advancedBlendCoherentOperationsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.set_advancedBlendCoherentOperations(this.segment(), index, value); return this; } + /// Sets `advancedBlendCoherentOperations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT advancedBlendCoherentOperations(@CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.set_advancedBlendCoherentOperations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.java new file mode 100644 index 00000000..ce665b32 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### advancedBlendMaxColorAttachments +/// [VarHandle][#VH_advancedBlendMaxColorAttachments] - [Getter][#advancedBlendMaxColorAttachments()] - [Setter][#advancedBlendMaxColorAttachments(int)] +/// ### advancedBlendIndependentBlend +/// [VarHandle][#VH_advancedBlendIndependentBlend] - [Getter][#advancedBlendIndependentBlend()] - [Setter][#advancedBlendIndependentBlend(int)] +/// ### advancedBlendNonPremultipliedSrcColor +/// [VarHandle][#VH_advancedBlendNonPremultipliedSrcColor] - [Getter][#advancedBlendNonPremultipliedSrcColor()] - [Setter][#advancedBlendNonPremultipliedSrcColor(int)] +/// ### advancedBlendNonPremultipliedDstColor +/// [VarHandle][#VH_advancedBlendNonPremultipliedDstColor] - [Getter][#advancedBlendNonPremultipliedDstColor()] - [Setter][#advancedBlendNonPremultipliedDstColor(int)] +/// ### advancedBlendCorrelatedOverlap +/// [VarHandle][#VH_advancedBlendCorrelatedOverlap] - [Getter][#advancedBlendCorrelatedOverlap()] - [Setter][#advancedBlendCorrelatedOverlap(int)] +/// ### advancedBlendAllOperations +/// [VarHandle][#VH_advancedBlendAllOperations] - [Getter][#advancedBlendAllOperations()] - [Setter][#advancedBlendAllOperations(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t advancedBlendMaxColorAttachments; +/// VkBool32 advancedBlendIndependentBlend; +/// VkBool32 advancedBlendNonPremultipliedSrcColor; +/// VkBool32 advancedBlendNonPremultipliedDstColor; +/// VkBool32 advancedBlendCorrelatedOverlap; +/// VkBool32 advancedBlendAllOperations; +/// } VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("advancedBlendMaxColorAttachments"), + ValueLayout.JAVA_INT.withName("advancedBlendIndependentBlend"), + ValueLayout.JAVA_INT.withName("advancedBlendNonPremultipliedSrcColor"), + ValueLayout.JAVA_INT.withName("advancedBlendNonPremultipliedDstColor"), + ValueLayout.JAVA_INT.withName("advancedBlendCorrelatedOverlap"), + ValueLayout.JAVA_INT.withName("advancedBlendAllOperations") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `advancedBlendMaxColorAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_advancedBlendMaxColorAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("advancedBlendMaxColorAttachments")); + /// The [VarHandle] of `advancedBlendIndependentBlend` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_advancedBlendIndependentBlend = LAYOUT.arrayElementVarHandle(PathElement.groupElement("advancedBlendIndependentBlend")); + /// The [VarHandle] of `advancedBlendNonPremultipliedSrcColor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_advancedBlendNonPremultipliedSrcColor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("advancedBlendNonPremultipliedSrcColor")); + /// The [VarHandle] of `advancedBlendNonPremultipliedDstColor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_advancedBlendNonPremultipliedDstColor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("advancedBlendNonPremultipliedDstColor")); + /// The [VarHandle] of `advancedBlendCorrelatedOverlap` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_advancedBlendCorrelatedOverlap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("advancedBlendCorrelatedOverlap")); + /// The [VarHandle] of `advancedBlendAllOperations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_advancedBlendAllOperations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("advancedBlendAllOperations")); + + /// Creates `VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT` + public static VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT` + public static VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `advancedBlendMaxColorAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_advancedBlendMaxColorAttachments(MemorySegment segment, long index) { return (int) VH_advancedBlendMaxColorAttachments.get(segment, 0L, index); } + /// {@return `advancedBlendMaxColorAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_advancedBlendMaxColorAttachments(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendMaxColorAttachments(segment, 0L); } + /// {@return `advancedBlendMaxColorAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int advancedBlendMaxColorAttachmentsAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendMaxColorAttachments(this.segment(), index); } + /// {@return `advancedBlendMaxColorAttachments`} + public @CType("uint32_t") int advancedBlendMaxColorAttachments() { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendMaxColorAttachments(this.segment()); } + /// Sets `advancedBlendMaxColorAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_advancedBlendMaxColorAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_advancedBlendMaxColorAttachments.set(segment, 0L, index, value); } + /// Sets `advancedBlendMaxColorAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_advancedBlendMaxColorAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendMaxColorAttachments(segment, 0L, value); } + /// Sets `advancedBlendMaxColorAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendMaxColorAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendMaxColorAttachments(this.segment(), index, value); return this; } + /// Sets `advancedBlendMaxColorAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendMaxColorAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendMaxColorAttachments(this.segment(), value); return this; } + + /// {@return `advancedBlendIndependentBlend` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_advancedBlendIndependentBlend(MemorySegment segment, long index) { return (int) VH_advancedBlendIndependentBlend.get(segment, 0L, index); } + /// {@return `advancedBlendIndependentBlend`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_advancedBlendIndependentBlend(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendIndependentBlend(segment, 0L); } + /// {@return `advancedBlendIndependentBlend` at the given index} + /// @param index the index + public @CType("VkBool32") int advancedBlendIndependentBlendAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendIndependentBlend(this.segment(), index); } + /// {@return `advancedBlendIndependentBlend`} + public @CType("VkBool32") int advancedBlendIndependentBlend() { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendIndependentBlend(this.segment()); } + /// Sets `advancedBlendIndependentBlend` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_advancedBlendIndependentBlend(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_advancedBlendIndependentBlend.set(segment, 0L, index, value); } + /// Sets `advancedBlendIndependentBlend` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_advancedBlendIndependentBlend(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendIndependentBlend(segment, 0L, value); } + /// Sets `advancedBlendIndependentBlend` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendIndependentBlendAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendIndependentBlend(this.segment(), index, value); return this; } + /// Sets `advancedBlendIndependentBlend` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendIndependentBlend(@CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendIndependentBlend(this.segment(), value); return this; } + + /// {@return `advancedBlendNonPremultipliedSrcColor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_advancedBlendNonPremultipliedSrcColor(MemorySegment segment, long index) { return (int) VH_advancedBlendNonPremultipliedSrcColor.get(segment, 0L, index); } + /// {@return `advancedBlendNonPremultipliedSrcColor`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_advancedBlendNonPremultipliedSrcColor(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendNonPremultipliedSrcColor(segment, 0L); } + /// {@return `advancedBlendNonPremultipliedSrcColor` at the given index} + /// @param index the index + public @CType("VkBool32") int advancedBlendNonPremultipliedSrcColorAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendNonPremultipliedSrcColor(this.segment(), index); } + /// {@return `advancedBlendNonPremultipliedSrcColor`} + public @CType("VkBool32") int advancedBlendNonPremultipliedSrcColor() { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendNonPremultipliedSrcColor(this.segment()); } + /// Sets `advancedBlendNonPremultipliedSrcColor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_advancedBlendNonPremultipliedSrcColor(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_advancedBlendNonPremultipliedSrcColor.set(segment, 0L, index, value); } + /// Sets `advancedBlendNonPremultipliedSrcColor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_advancedBlendNonPremultipliedSrcColor(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendNonPremultipliedSrcColor(segment, 0L, value); } + /// Sets `advancedBlendNonPremultipliedSrcColor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendNonPremultipliedSrcColorAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendNonPremultipliedSrcColor(this.segment(), index, value); return this; } + /// Sets `advancedBlendNonPremultipliedSrcColor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendNonPremultipliedSrcColor(@CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendNonPremultipliedSrcColor(this.segment(), value); return this; } + + /// {@return `advancedBlendNonPremultipliedDstColor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_advancedBlendNonPremultipliedDstColor(MemorySegment segment, long index) { return (int) VH_advancedBlendNonPremultipliedDstColor.get(segment, 0L, index); } + /// {@return `advancedBlendNonPremultipliedDstColor`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_advancedBlendNonPremultipliedDstColor(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendNonPremultipliedDstColor(segment, 0L); } + /// {@return `advancedBlendNonPremultipliedDstColor` at the given index} + /// @param index the index + public @CType("VkBool32") int advancedBlendNonPremultipliedDstColorAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendNonPremultipliedDstColor(this.segment(), index); } + /// {@return `advancedBlendNonPremultipliedDstColor`} + public @CType("VkBool32") int advancedBlendNonPremultipliedDstColor() { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendNonPremultipliedDstColor(this.segment()); } + /// Sets `advancedBlendNonPremultipliedDstColor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_advancedBlendNonPremultipliedDstColor(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_advancedBlendNonPremultipliedDstColor.set(segment, 0L, index, value); } + /// Sets `advancedBlendNonPremultipliedDstColor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_advancedBlendNonPremultipliedDstColor(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendNonPremultipliedDstColor(segment, 0L, value); } + /// Sets `advancedBlendNonPremultipliedDstColor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendNonPremultipliedDstColorAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendNonPremultipliedDstColor(this.segment(), index, value); return this; } + /// Sets `advancedBlendNonPremultipliedDstColor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendNonPremultipliedDstColor(@CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendNonPremultipliedDstColor(this.segment(), value); return this; } + + /// {@return `advancedBlendCorrelatedOverlap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_advancedBlendCorrelatedOverlap(MemorySegment segment, long index) { return (int) VH_advancedBlendCorrelatedOverlap.get(segment, 0L, index); } + /// {@return `advancedBlendCorrelatedOverlap`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_advancedBlendCorrelatedOverlap(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendCorrelatedOverlap(segment, 0L); } + /// {@return `advancedBlendCorrelatedOverlap` at the given index} + /// @param index the index + public @CType("VkBool32") int advancedBlendCorrelatedOverlapAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendCorrelatedOverlap(this.segment(), index); } + /// {@return `advancedBlendCorrelatedOverlap`} + public @CType("VkBool32") int advancedBlendCorrelatedOverlap() { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendCorrelatedOverlap(this.segment()); } + /// Sets `advancedBlendCorrelatedOverlap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_advancedBlendCorrelatedOverlap(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_advancedBlendCorrelatedOverlap.set(segment, 0L, index, value); } + /// Sets `advancedBlendCorrelatedOverlap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_advancedBlendCorrelatedOverlap(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendCorrelatedOverlap(segment, 0L, value); } + /// Sets `advancedBlendCorrelatedOverlap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendCorrelatedOverlapAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendCorrelatedOverlap(this.segment(), index, value); return this; } + /// Sets `advancedBlendCorrelatedOverlap` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendCorrelatedOverlap(@CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendCorrelatedOverlap(this.segment(), value); return this; } + + /// {@return `advancedBlendAllOperations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_advancedBlendAllOperations(MemorySegment segment, long index) { return (int) VH_advancedBlendAllOperations.get(segment, 0L, index); } + /// {@return `advancedBlendAllOperations`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_advancedBlendAllOperations(MemorySegment segment) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendAllOperations(segment, 0L); } + /// {@return `advancedBlendAllOperations` at the given index} + /// @param index the index + public @CType("VkBool32") int advancedBlendAllOperationsAt(long index) { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendAllOperations(this.segment(), index); } + /// {@return `advancedBlendAllOperations`} + public @CType("VkBool32") int advancedBlendAllOperations() { return VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.get_advancedBlendAllOperations(this.segment()); } + /// Sets `advancedBlendAllOperations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_advancedBlendAllOperations(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_advancedBlendAllOperations.set(segment, 0L, index, value); } + /// Sets `advancedBlendAllOperations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_advancedBlendAllOperations(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendAllOperations(segment, 0L, value); } + /// Sets `advancedBlendAllOperations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendAllOperationsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendAllOperations(this.segment(), index, value); return this; } + /// Sets `advancedBlendAllOperations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT advancedBlendAllOperations(@CType("VkBool32") int value) { VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.set_advancedBlendAllOperations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.java new file mode 100644 index 00000000..da8777e7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### borderColorSwizzle +/// [VarHandle][#VH_borderColorSwizzle] - [Getter][#borderColorSwizzle()] - [Setter][#borderColorSwizzle(int)] +/// ### borderColorSwizzleFromImage +/// [VarHandle][#VH_borderColorSwizzleFromImage] - [Getter][#borderColorSwizzleFromImage()] - [Setter][#borderColorSwizzleFromImage(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceBorderColorSwizzleFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 borderColorSwizzle; +/// VkBool32 borderColorSwizzleFromImage; +/// } VkPhysicalDeviceBorderColorSwizzleFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceBorderColorSwizzleFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("borderColorSwizzle"), + ValueLayout.JAVA_INT.withName("borderColorSwizzleFromImage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `borderColorSwizzle` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_borderColorSwizzle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("borderColorSwizzle")); + /// The [VarHandle] of `borderColorSwizzleFromImage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_borderColorSwizzleFromImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("borderColorSwizzleFromImage")); + + /// Creates `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceBorderColorSwizzleFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBorderColorSwizzleFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBorderColorSwizzleFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBorderColorSwizzleFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBorderColorSwizzleFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBorderColorSwizzleFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBorderColorSwizzleFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT` + public static VkPhysicalDeviceBorderColorSwizzleFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceBorderColorSwizzleFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceBorderColorSwizzleFeaturesEXT` + public static VkPhysicalDeviceBorderColorSwizzleFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceBorderColorSwizzleFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBorderColorSwizzleFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBorderColorSwizzleFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBorderColorSwizzleFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBorderColorSwizzleFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `borderColorSwizzle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_borderColorSwizzle(MemorySegment segment, long index) { return (int) VH_borderColorSwizzle.get(segment, 0L, index); } + /// {@return `borderColorSwizzle`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_borderColorSwizzle(MemorySegment segment) { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_borderColorSwizzle(segment, 0L); } + /// {@return `borderColorSwizzle` at the given index} + /// @param index the index + public @CType("VkBool32") int borderColorSwizzleAt(long index) { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_borderColorSwizzle(this.segment(), index); } + /// {@return `borderColorSwizzle`} + public @CType("VkBool32") int borderColorSwizzle() { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_borderColorSwizzle(this.segment()); } + /// Sets `borderColorSwizzle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_borderColorSwizzle(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_borderColorSwizzle.set(segment, 0L, index, value); } + /// Sets `borderColorSwizzle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_borderColorSwizzle(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_borderColorSwizzle(segment, 0L, value); } + /// Sets `borderColorSwizzle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBorderColorSwizzleFeaturesEXT borderColorSwizzleAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_borderColorSwizzle(this.segment(), index, value); return this; } + /// Sets `borderColorSwizzle` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBorderColorSwizzleFeaturesEXT borderColorSwizzle(@CType("VkBool32") int value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_borderColorSwizzle(this.segment(), value); return this; } + + /// {@return `borderColorSwizzleFromImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_borderColorSwizzleFromImage(MemorySegment segment, long index) { return (int) VH_borderColorSwizzleFromImage.get(segment, 0L, index); } + /// {@return `borderColorSwizzleFromImage`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_borderColorSwizzleFromImage(MemorySegment segment) { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_borderColorSwizzleFromImage(segment, 0L); } + /// {@return `borderColorSwizzleFromImage` at the given index} + /// @param index the index + public @CType("VkBool32") int borderColorSwizzleFromImageAt(long index) { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_borderColorSwizzleFromImage(this.segment(), index); } + /// {@return `borderColorSwizzleFromImage`} + public @CType("VkBool32") int borderColorSwizzleFromImage() { return VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.get_borderColorSwizzleFromImage(this.segment()); } + /// Sets `borderColorSwizzleFromImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_borderColorSwizzleFromImage(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_borderColorSwizzleFromImage.set(segment, 0L, index, value); } + /// Sets `borderColorSwizzleFromImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_borderColorSwizzleFromImage(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_borderColorSwizzleFromImage(segment, 0L, value); } + /// Sets `borderColorSwizzleFromImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBorderColorSwizzleFeaturesEXT borderColorSwizzleFromImageAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_borderColorSwizzleFromImage(this.segment(), index, value); return this; } + /// Sets `borderColorSwizzleFromImage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBorderColorSwizzleFeaturesEXT borderColorSwizzleFromImage(@CType("VkBool32") int value) { VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.set_borderColorSwizzleFromImage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.java new file mode 100644 index 00000000..a48002dd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### bufferDeviceAddress +/// [VarHandle][#VH_bufferDeviceAddress] - [Getter][#bufferDeviceAddress()] - [Setter][#bufferDeviceAddress(int)] +/// ### bufferDeviceAddressCaptureReplay +/// [VarHandle][#VH_bufferDeviceAddressCaptureReplay] - [Getter][#bufferDeviceAddressCaptureReplay()] - [Setter][#bufferDeviceAddressCaptureReplay(int)] +/// ### bufferDeviceAddressMultiDevice +/// [VarHandle][#VH_bufferDeviceAddressMultiDevice] - [Getter][#bufferDeviceAddressMultiDevice()] - [Setter][#bufferDeviceAddressMultiDevice(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceBufferDeviceAddressFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 bufferDeviceAddress; +/// VkBool32 bufferDeviceAddressCaptureReplay; +/// VkBool32 bufferDeviceAddressMultiDevice; +/// } VkPhysicalDeviceBufferDeviceAddressFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceBufferDeviceAddressFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("bufferDeviceAddress"), + ValueLayout.JAVA_INT.withName("bufferDeviceAddressCaptureReplay"), + ValueLayout.JAVA_INT.withName("bufferDeviceAddressMultiDevice") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `bufferDeviceAddress` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferDeviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferDeviceAddress")); + /// The [VarHandle] of `bufferDeviceAddressCaptureReplay` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferDeviceAddressCaptureReplay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferDeviceAddressCaptureReplay")); + /// The [VarHandle] of `bufferDeviceAddressMultiDevice` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferDeviceAddressMultiDevice = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferDeviceAddressMultiDevice")); + + /// Creates `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBufferDeviceAddressFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBufferDeviceAddressFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBufferDeviceAddressFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBufferDeviceAddressFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBufferDeviceAddressFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBufferDeviceAddressFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` + public static VkPhysicalDeviceBufferDeviceAddressFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceBufferDeviceAddressFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceBufferDeviceAddressFeaturesEXT` + public static VkPhysicalDeviceBufferDeviceAddressFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceBufferDeviceAddressFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `bufferDeviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bufferDeviceAddress(MemorySegment segment, long index) { return (int) VH_bufferDeviceAddress.get(segment, 0L, index); } + /// {@return `bufferDeviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bufferDeviceAddress(MemorySegment segment) { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_bufferDeviceAddress(segment, 0L); } + /// {@return `bufferDeviceAddress` at the given index} + /// @param index the index + public @CType("VkBool32") int bufferDeviceAddressAt(long index) { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_bufferDeviceAddress(this.segment(), index); } + /// {@return `bufferDeviceAddress`} + public @CType("VkBool32") int bufferDeviceAddress() { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_bufferDeviceAddress(this.segment()); } + /// Sets `bufferDeviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferDeviceAddress(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bufferDeviceAddress.set(segment, 0L, index, value); } + /// Sets `bufferDeviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferDeviceAddress(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_bufferDeviceAddress(segment, 0L, value); } + /// Sets `bufferDeviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT bufferDeviceAddressAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_bufferDeviceAddress(this.segment(), index, value); return this; } + /// Sets `bufferDeviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT bufferDeviceAddress(@CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_bufferDeviceAddress(this.segment(), value); return this; } + + /// {@return `bufferDeviceAddressCaptureReplay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bufferDeviceAddressCaptureReplay(MemorySegment segment, long index) { return (int) VH_bufferDeviceAddressCaptureReplay.get(segment, 0L, index); } + /// {@return `bufferDeviceAddressCaptureReplay`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bufferDeviceAddressCaptureReplay(MemorySegment segment) { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_bufferDeviceAddressCaptureReplay(segment, 0L); } + /// {@return `bufferDeviceAddressCaptureReplay` at the given index} + /// @param index the index + public @CType("VkBool32") int bufferDeviceAddressCaptureReplayAt(long index) { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_bufferDeviceAddressCaptureReplay(this.segment(), index); } + /// {@return `bufferDeviceAddressCaptureReplay`} + public @CType("VkBool32") int bufferDeviceAddressCaptureReplay() { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_bufferDeviceAddressCaptureReplay(this.segment()); } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferDeviceAddressCaptureReplay(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bufferDeviceAddressCaptureReplay.set(segment, 0L, index, value); } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferDeviceAddressCaptureReplay(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_bufferDeviceAddressCaptureReplay(segment, 0L, value); } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT bufferDeviceAddressCaptureReplayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_bufferDeviceAddressCaptureReplay(this.segment(), index, value); return this; } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT bufferDeviceAddressCaptureReplay(@CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_bufferDeviceAddressCaptureReplay(this.segment(), value); return this; } + + /// {@return `bufferDeviceAddressMultiDevice` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bufferDeviceAddressMultiDevice(MemorySegment segment, long index) { return (int) VH_bufferDeviceAddressMultiDevice.get(segment, 0L, index); } + /// {@return `bufferDeviceAddressMultiDevice`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bufferDeviceAddressMultiDevice(MemorySegment segment) { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_bufferDeviceAddressMultiDevice(segment, 0L); } + /// {@return `bufferDeviceAddressMultiDevice` at the given index} + /// @param index the index + public @CType("VkBool32") int bufferDeviceAddressMultiDeviceAt(long index) { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_bufferDeviceAddressMultiDevice(this.segment(), index); } + /// {@return `bufferDeviceAddressMultiDevice`} + public @CType("VkBool32") int bufferDeviceAddressMultiDevice() { return VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.get_bufferDeviceAddressMultiDevice(this.segment()); } + /// Sets `bufferDeviceAddressMultiDevice` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferDeviceAddressMultiDevice(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bufferDeviceAddressMultiDevice.set(segment, 0L, index, value); } + /// Sets `bufferDeviceAddressMultiDevice` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferDeviceAddressMultiDevice(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_bufferDeviceAddressMultiDevice(segment, 0L, value); } + /// Sets `bufferDeviceAddressMultiDevice` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT bufferDeviceAddressMultiDeviceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_bufferDeviceAddressMultiDevice(this.segment(), index, value); return this; } + /// Sets `bufferDeviceAddressMultiDevice` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeaturesEXT bufferDeviceAddressMultiDevice(@CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.set_bufferDeviceAddressMultiDevice(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceColorWriteEnableFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceColorWriteEnableFeaturesEXT.java new file mode 100644 index 00000000..16a97568 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceColorWriteEnableFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### colorWriteEnable +/// [VarHandle][#VH_colorWriteEnable] - [Getter][#colorWriteEnable()] - [Setter][#colorWriteEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceColorWriteEnableFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 colorWriteEnable; +/// } VkPhysicalDeviceColorWriteEnableFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceColorWriteEnableFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceColorWriteEnableFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("colorWriteEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `colorWriteEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorWriteEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorWriteEnable")); + + /// Creates `VkPhysicalDeviceColorWriteEnableFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceColorWriteEnableFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceColorWriteEnableFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceColorWriteEnableFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceColorWriteEnableFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceColorWriteEnableFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceColorWriteEnableFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceColorWriteEnableFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceColorWriteEnableFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceColorWriteEnableFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceColorWriteEnableFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceColorWriteEnableFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceColorWriteEnableFeaturesEXT` + public static VkPhysicalDeviceColorWriteEnableFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceColorWriteEnableFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceColorWriteEnableFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceColorWriteEnableFeaturesEXT` + public static VkPhysicalDeviceColorWriteEnableFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceColorWriteEnableFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceColorWriteEnableFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceColorWriteEnableFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceColorWriteEnableFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceColorWriteEnableFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceColorWriteEnableFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceColorWriteEnableFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceColorWriteEnableFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceColorWriteEnableFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceColorWriteEnableFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceColorWriteEnableFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceColorWriteEnableFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceColorWriteEnableFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceColorWriteEnableFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceColorWriteEnableFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceColorWriteEnableFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceColorWriteEnableFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `colorWriteEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_colorWriteEnable(MemorySegment segment, long index) { return (int) VH_colorWriteEnable.get(segment, 0L, index); } + /// {@return `colorWriteEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_colorWriteEnable(MemorySegment segment) { return VkPhysicalDeviceColorWriteEnableFeaturesEXT.get_colorWriteEnable(segment, 0L); } + /// {@return `colorWriteEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int colorWriteEnableAt(long index) { return VkPhysicalDeviceColorWriteEnableFeaturesEXT.get_colorWriteEnable(this.segment(), index); } + /// {@return `colorWriteEnable`} + public @CType("VkBool32") int colorWriteEnable() { return VkPhysicalDeviceColorWriteEnableFeaturesEXT.get_colorWriteEnable(this.segment()); } + /// Sets `colorWriteEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorWriteEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_colorWriteEnable.set(segment, 0L, index, value); } + /// Sets `colorWriteEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorWriteEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceColorWriteEnableFeaturesEXT.set_colorWriteEnable(segment, 0L, value); } + /// Sets `colorWriteEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceColorWriteEnableFeaturesEXT colorWriteEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceColorWriteEnableFeaturesEXT.set_colorWriteEnable(this.segment(), index, value); return this; } + /// Sets `colorWriteEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceColorWriteEnableFeaturesEXT colorWriteEnable(@CType("VkBool32") int value) { VkPhysicalDeviceColorWriteEnableFeaturesEXT.set_colorWriteEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceConditionalRenderingFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceConditionalRenderingFeaturesEXT.java new file mode 100644 index 00000000..989494b6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceConditionalRenderingFeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### conditionalRendering +/// [VarHandle][#VH_conditionalRendering] - [Getter][#conditionalRendering()] - [Setter][#conditionalRendering(int)] +/// ### inheritedConditionalRendering +/// [VarHandle][#VH_inheritedConditionalRendering] - [Getter][#inheritedConditionalRendering()] - [Setter][#inheritedConditionalRendering(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceConditionalRenderingFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 conditionalRendering; +/// VkBool32 inheritedConditionalRendering; +/// } VkPhysicalDeviceConditionalRenderingFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceConditionalRenderingFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceConditionalRenderingFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("conditionalRendering"), + ValueLayout.JAVA_INT.withName("inheritedConditionalRendering") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `conditionalRendering` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_conditionalRendering = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conditionalRendering")); + /// The [VarHandle] of `inheritedConditionalRendering` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inheritedConditionalRendering = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inheritedConditionalRendering")); + + /// Creates `VkPhysicalDeviceConditionalRenderingFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceConditionalRenderingFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceConditionalRenderingFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceConditionalRenderingFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceConditionalRenderingFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceConditionalRenderingFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceConditionalRenderingFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceConditionalRenderingFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceConditionalRenderingFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceConditionalRenderingFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceConditionalRenderingFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceConditionalRenderingFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceConditionalRenderingFeaturesEXT` + public static VkPhysicalDeviceConditionalRenderingFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceConditionalRenderingFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceConditionalRenderingFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceConditionalRenderingFeaturesEXT` + public static VkPhysicalDeviceConditionalRenderingFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceConditionalRenderingFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConditionalRenderingFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConditionalRenderingFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConditionalRenderingFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConditionalRenderingFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `conditionalRendering` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_conditionalRendering(MemorySegment segment, long index) { return (int) VH_conditionalRendering.get(segment, 0L, index); } + /// {@return `conditionalRendering`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_conditionalRendering(MemorySegment segment) { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_conditionalRendering(segment, 0L); } + /// {@return `conditionalRendering` at the given index} + /// @param index the index + public @CType("VkBool32") int conditionalRenderingAt(long index) { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_conditionalRendering(this.segment(), index); } + /// {@return `conditionalRendering`} + public @CType("VkBool32") int conditionalRendering() { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_conditionalRendering(this.segment()); } + /// Sets `conditionalRendering` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conditionalRendering(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_conditionalRendering.set(segment, 0L, index, value); } + /// Sets `conditionalRendering` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conditionalRendering(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_conditionalRendering(segment, 0L, value); } + /// Sets `conditionalRendering` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConditionalRenderingFeaturesEXT conditionalRenderingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_conditionalRendering(this.segment(), index, value); return this; } + /// Sets `conditionalRendering` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConditionalRenderingFeaturesEXT conditionalRendering(@CType("VkBool32") int value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_conditionalRendering(this.segment(), value); return this; } + + /// {@return `inheritedConditionalRendering` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_inheritedConditionalRendering(MemorySegment segment, long index) { return (int) VH_inheritedConditionalRendering.get(segment, 0L, index); } + /// {@return `inheritedConditionalRendering`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_inheritedConditionalRendering(MemorySegment segment) { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_inheritedConditionalRendering(segment, 0L); } + /// {@return `inheritedConditionalRendering` at the given index} + /// @param index the index + public @CType("VkBool32") int inheritedConditionalRenderingAt(long index) { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_inheritedConditionalRendering(this.segment(), index); } + /// {@return `inheritedConditionalRendering`} + public @CType("VkBool32") int inheritedConditionalRendering() { return VkPhysicalDeviceConditionalRenderingFeaturesEXT.get_inheritedConditionalRendering(this.segment()); } + /// Sets `inheritedConditionalRendering` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inheritedConditionalRendering(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_inheritedConditionalRendering.set(segment, 0L, index, value); } + /// Sets `inheritedConditionalRendering` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inheritedConditionalRendering(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_inheritedConditionalRendering(segment, 0L, value); } + /// Sets `inheritedConditionalRendering` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConditionalRenderingFeaturesEXT inheritedConditionalRenderingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_inheritedConditionalRendering(this.segment(), index, value); return this; } + /// Sets `inheritedConditionalRendering` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConditionalRenderingFeaturesEXT inheritedConditionalRendering(@CType("VkBool32") int value) { VkPhysicalDeviceConditionalRenderingFeaturesEXT.set_inheritedConditionalRendering(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceConservativeRasterizationPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceConservativeRasterizationPropertiesEXT.java new file mode 100644 index 00000000..e712e8eb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceConservativeRasterizationPropertiesEXT.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### primitiveOverestimationSize +/// [VarHandle][#VH_primitiveOverestimationSize] - [Getter][#primitiveOverestimationSize()] - [Setter][#primitiveOverestimationSize(float)] +/// ### maxExtraPrimitiveOverestimationSize +/// [VarHandle][#VH_maxExtraPrimitiveOverestimationSize] - [Getter][#maxExtraPrimitiveOverestimationSize()] - [Setter][#maxExtraPrimitiveOverestimationSize(float)] +/// ### extraPrimitiveOverestimationSizeGranularity +/// [VarHandle][#VH_extraPrimitiveOverestimationSizeGranularity] - [Getter][#extraPrimitiveOverestimationSizeGranularity()] - [Setter][#extraPrimitiveOverestimationSizeGranularity(float)] +/// ### primitiveUnderestimation +/// [VarHandle][#VH_primitiveUnderestimation] - [Getter][#primitiveUnderestimation()] - [Setter][#primitiveUnderestimation(int)] +/// ### conservativePointAndLineRasterization +/// [VarHandle][#VH_conservativePointAndLineRasterization] - [Getter][#conservativePointAndLineRasterization()] - [Setter][#conservativePointAndLineRasterization(int)] +/// ### degenerateTrianglesRasterized +/// [VarHandle][#VH_degenerateTrianglesRasterized] - [Getter][#degenerateTrianglesRasterized()] - [Setter][#degenerateTrianglesRasterized(int)] +/// ### degenerateLinesRasterized +/// [VarHandle][#VH_degenerateLinesRasterized] - [Getter][#degenerateLinesRasterized()] - [Setter][#degenerateLinesRasterized(int)] +/// ### fullyCoveredFragmentShaderInputVariable +/// [VarHandle][#VH_fullyCoveredFragmentShaderInputVariable] - [Getter][#fullyCoveredFragmentShaderInputVariable()] - [Setter][#fullyCoveredFragmentShaderInputVariable(int)] +/// ### conservativeRasterizationPostDepthCoverage +/// [VarHandle][#VH_conservativeRasterizationPostDepthCoverage] - [Getter][#conservativeRasterizationPostDepthCoverage()] - [Setter][#conservativeRasterizationPostDepthCoverage(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceConservativeRasterizationPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// float primitiveOverestimationSize; +/// float maxExtraPrimitiveOverestimationSize; +/// float extraPrimitiveOverestimationSizeGranularity; +/// VkBool32 primitiveUnderestimation; +/// VkBool32 conservativePointAndLineRasterization; +/// VkBool32 degenerateTrianglesRasterized; +/// VkBool32 degenerateLinesRasterized; +/// VkBool32 fullyCoveredFragmentShaderInputVariable; +/// VkBool32 conservativeRasterizationPostDepthCoverage; +/// } VkPhysicalDeviceConservativeRasterizationPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceConservativeRasterizationPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceConservativeRasterizationPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_FLOAT.withName("primitiveOverestimationSize"), + ValueLayout.JAVA_FLOAT.withName("maxExtraPrimitiveOverestimationSize"), + ValueLayout.JAVA_FLOAT.withName("extraPrimitiveOverestimationSizeGranularity"), + ValueLayout.JAVA_INT.withName("primitiveUnderestimation"), + ValueLayout.JAVA_INT.withName("conservativePointAndLineRasterization"), + ValueLayout.JAVA_INT.withName("degenerateTrianglesRasterized"), + ValueLayout.JAVA_INT.withName("degenerateLinesRasterized"), + ValueLayout.JAVA_INT.withName("fullyCoveredFragmentShaderInputVariable"), + ValueLayout.JAVA_INT.withName("conservativeRasterizationPostDepthCoverage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `primitiveOverestimationSize` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_primitiveOverestimationSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveOverestimationSize")); + /// The [VarHandle] of `maxExtraPrimitiveOverestimationSize` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxExtraPrimitiveOverestimationSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxExtraPrimitiveOverestimationSize")); + /// The [VarHandle] of `extraPrimitiveOverestimationSizeGranularity` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_extraPrimitiveOverestimationSizeGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extraPrimitiveOverestimationSizeGranularity")); + /// The [VarHandle] of `primitiveUnderestimation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitiveUnderestimation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveUnderestimation")); + /// The [VarHandle] of `conservativePointAndLineRasterization` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_conservativePointAndLineRasterization = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conservativePointAndLineRasterization")); + /// The [VarHandle] of `degenerateTrianglesRasterized` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_degenerateTrianglesRasterized = LAYOUT.arrayElementVarHandle(PathElement.groupElement("degenerateTrianglesRasterized")); + /// The [VarHandle] of `degenerateLinesRasterized` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_degenerateLinesRasterized = LAYOUT.arrayElementVarHandle(PathElement.groupElement("degenerateLinesRasterized")); + /// The [VarHandle] of `fullyCoveredFragmentShaderInputVariable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fullyCoveredFragmentShaderInputVariable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fullyCoveredFragmentShaderInputVariable")); + /// The [VarHandle] of `conservativeRasterizationPostDepthCoverage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_conservativeRasterizationPostDepthCoverage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conservativeRasterizationPostDepthCoverage")); + + /// Creates `VkPhysicalDeviceConservativeRasterizationPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceConservativeRasterizationPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceConservativeRasterizationPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceConservativeRasterizationPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceConservativeRasterizationPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceConservativeRasterizationPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceConservativeRasterizationPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceConservativeRasterizationPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceConservativeRasterizationPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceConservativeRasterizationPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceConservativeRasterizationPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceConservativeRasterizationPropertiesEXT` + public static VkPhysicalDeviceConservativeRasterizationPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceConservativeRasterizationPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceConservativeRasterizationPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceConservativeRasterizationPropertiesEXT` + public static VkPhysicalDeviceConservativeRasterizationPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceConservativeRasterizationPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `primitiveOverestimationSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_primitiveOverestimationSize(MemorySegment segment, long index) { return (float) VH_primitiveOverestimationSize.get(segment, 0L, index); } + /// {@return `primitiveOverestimationSize`} + /// @param segment the segment of the struct + public static @CType("float") float get_primitiveOverestimationSize(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_primitiveOverestimationSize(segment, 0L); } + /// {@return `primitiveOverestimationSize` at the given index} + /// @param index the index + public @CType("float") float primitiveOverestimationSizeAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_primitiveOverestimationSize(this.segment(), index); } + /// {@return `primitiveOverestimationSize`} + public @CType("float") float primitiveOverestimationSize() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_primitiveOverestimationSize(this.segment()); } + /// Sets `primitiveOverestimationSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveOverestimationSize(MemorySegment segment, long index, @CType("float") float value) { VH_primitiveOverestimationSize.set(segment, 0L, index, value); } + /// Sets `primitiveOverestimationSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveOverestimationSize(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_primitiveOverestimationSize(segment, 0L, value); } + /// Sets `primitiveOverestimationSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT primitiveOverestimationSizeAt(long index, @CType("float") float value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_primitiveOverestimationSize(this.segment(), index, value); return this; } + /// Sets `primitiveOverestimationSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT primitiveOverestimationSize(@CType("float") float value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_primitiveOverestimationSize(this.segment(), value); return this; } + + /// {@return `maxExtraPrimitiveOverestimationSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxExtraPrimitiveOverestimationSize(MemorySegment segment, long index) { return (float) VH_maxExtraPrimitiveOverestimationSize.get(segment, 0L, index); } + /// {@return `maxExtraPrimitiveOverestimationSize`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxExtraPrimitiveOverestimationSize(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_maxExtraPrimitiveOverestimationSize(segment, 0L); } + /// {@return `maxExtraPrimitiveOverestimationSize` at the given index} + /// @param index the index + public @CType("float") float maxExtraPrimitiveOverestimationSizeAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_maxExtraPrimitiveOverestimationSize(this.segment(), index); } + /// {@return `maxExtraPrimitiveOverestimationSize`} + public @CType("float") float maxExtraPrimitiveOverestimationSize() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_maxExtraPrimitiveOverestimationSize(this.segment()); } + /// Sets `maxExtraPrimitiveOverestimationSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxExtraPrimitiveOverestimationSize(MemorySegment segment, long index, @CType("float") float value) { VH_maxExtraPrimitiveOverestimationSize.set(segment, 0L, index, value); } + /// Sets `maxExtraPrimitiveOverestimationSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxExtraPrimitiveOverestimationSize(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_maxExtraPrimitiveOverestimationSize(segment, 0L, value); } + /// Sets `maxExtraPrimitiveOverestimationSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT maxExtraPrimitiveOverestimationSizeAt(long index, @CType("float") float value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_maxExtraPrimitiveOverestimationSize(this.segment(), index, value); return this; } + /// Sets `maxExtraPrimitiveOverestimationSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT maxExtraPrimitiveOverestimationSize(@CType("float") float value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_maxExtraPrimitiveOverestimationSize(this.segment(), value); return this; } + + /// {@return `extraPrimitiveOverestimationSizeGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_extraPrimitiveOverestimationSizeGranularity(MemorySegment segment, long index) { return (float) VH_extraPrimitiveOverestimationSizeGranularity.get(segment, 0L, index); } + /// {@return `extraPrimitiveOverestimationSizeGranularity`} + /// @param segment the segment of the struct + public static @CType("float") float get_extraPrimitiveOverestimationSizeGranularity(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_extraPrimitiveOverestimationSizeGranularity(segment, 0L); } + /// {@return `extraPrimitiveOverestimationSizeGranularity` at the given index} + /// @param index the index + public @CType("float") float extraPrimitiveOverestimationSizeGranularityAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_extraPrimitiveOverestimationSizeGranularity(this.segment(), index); } + /// {@return `extraPrimitiveOverestimationSizeGranularity`} + public @CType("float") float extraPrimitiveOverestimationSizeGranularity() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_extraPrimitiveOverestimationSizeGranularity(this.segment()); } + /// Sets `extraPrimitiveOverestimationSizeGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extraPrimitiveOverestimationSizeGranularity(MemorySegment segment, long index, @CType("float") float value) { VH_extraPrimitiveOverestimationSizeGranularity.set(segment, 0L, index, value); } + /// Sets `extraPrimitiveOverestimationSizeGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extraPrimitiveOverestimationSizeGranularity(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_extraPrimitiveOverestimationSizeGranularity(segment, 0L, value); } + /// Sets `extraPrimitiveOverestimationSizeGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT extraPrimitiveOverestimationSizeGranularityAt(long index, @CType("float") float value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_extraPrimitiveOverestimationSizeGranularity(this.segment(), index, value); return this; } + /// Sets `extraPrimitiveOverestimationSizeGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT extraPrimitiveOverestimationSizeGranularity(@CType("float") float value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_extraPrimitiveOverestimationSizeGranularity(this.segment(), value); return this; } + + /// {@return `primitiveUnderestimation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primitiveUnderestimation(MemorySegment segment, long index) { return (int) VH_primitiveUnderestimation.get(segment, 0L, index); } + /// {@return `primitiveUnderestimation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primitiveUnderestimation(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_primitiveUnderestimation(segment, 0L); } + /// {@return `primitiveUnderestimation` at the given index} + /// @param index the index + public @CType("VkBool32") int primitiveUnderestimationAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_primitiveUnderestimation(this.segment(), index); } + /// {@return `primitiveUnderestimation`} + public @CType("VkBool32") int primitiveUnderestimation() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_primitiveUnderestimation(this.segment()); } + /// Sets `primitiveUnderestimation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveUnderestimation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primitiveUnderestimation.set(segment, 0L, index, value); } + /// Sets `primitiveUnderestimation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveUnderestimation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_primitiveUnderestimation(segment, 0L, value); } + /// Sets `primitiveUnderestimation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT primitiveUnderestimationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_primitiveUnderestimation(this.segment(), index, value); return this; } + /// Sets `primitiveUnderestimation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT primitiveUnderestimation(@CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_primitiveUnderestimation(this.segment(), value); return this; } + + /// {@return `conservativePointAndLineRasterization` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_conservativePointAndLineRasterization(MemorySegment segment, long index) { return (int) VH_conservativePointAndLineRasterization.get(segment, 0L, index); } + /// {@return `conservativePointAndLineRasterization`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_conservativePointAndLineRasterization(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_conservativePointAndLineRasterization(segment, 0L); } + /// {@return `conservativePointAndLineRasterization` at the given index} + /// @param index the index + public @CType("VkBool32") int conservativePointAndLineRasterizationAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_conservativePointAndLineRasterization(this.segment(), index); } + /// {@return `conservativePointAndLineRasterization`} + public @CType("VkBool32") int conservativePointAndLineRasterization() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_conservativePointAndLineRasterization(this.segment()); } + /// Sets `conservativePointAndLineRasterization` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conservativePointAndLineRasterization(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_conservativePointAndLineRasterization.set(segment, 0L, index, value); } + /// Sets `conservativePointAndLineRasterization` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conservativePointAndLineRasterization(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_conservativePointAndLineRasterization(segment, 0L, value); } + /// Sets `conservativePointAndLineRasterization` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT conservativePointAndLineRasterizationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_conservativePointAndLineRasterization(this.segment(), index, value); return this; } + /// Sets `conservativePointAndLineRasterization` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT conservativePointAndLineRasterization(@CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_conservativePointAndLineRasterization(this.segment(), value); return this; } + + /// {@return `degenerateTrianglesRasterized` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_degenerateTrianglesRasterized(MemorySegment segment, long index) { return (int) VH_degenerateTrianglesRasterized.get(segment, 0L, index); } + /// {@return `degenerateTrianglesRasterized`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_degenerateTrianglesRasterized(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_degenerateTrianglesRasterized(segment, 0L); } + /// {@return `degenerateTrianglesRasterized` at the given index} + /// @param index the index + public @CType("VkBool32") int degenerateTrianglesRasterizedAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_degenerateTrianglesRasterized(this.segment(), index); } + /// {@return `degenerateTrianglesRasterized`} + public @CType("VkBool32") int degenerateTrianglesRasterized() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_degenerateTrianglesRasterized(this.segment()); } + /// Sets `degenerateTrianglesRasterized` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_degenerateTrianglesRasterized(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_degenerateTrianglesRasterized.set(segment, 0L, index, value); } + /// Sets `degenerateTrianglesRasterized` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_degenerateTrianglesRasterized(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_degenerateTrianglesRasterized(segment, 0L, value); } + /// Sets `degenerateTrianglesRasterized` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT degenerateTrianglesRasterizedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_degenerateTrianglesRasterized(this.segment(), index, value); return this; } + /// Sets `degenerateTrianglesRasterized` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT degenerateTrianglesRasterized(@CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_degenerateTrianglesRasterized(this.segment(), value); return this; } + + /// {@return `degenerateLinesRasterized` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_degenerateLinesRasterized(MemorySegment segment, long index) { return (int) VH_degenerateLinesRasterized.get(segment, 0L, index); } + /// {@return `degenerateLinesRasterized`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_degenerateLinesRasterized(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_degenerateLinesRasterized(segment, 0L); } + /// {@return `degenerateLinesRasterized` at the given index} + /// @param index the index + public @CType("VkBool32") int degenerateLinesRasterizedAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_degenerateLinesRasterized(this.segment(), index); } + /// {@return `degenerateLinesRasterized`} + public @CType("VkBool32") int degenerateLinesRasterized() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_degenerateLinesRasterized(this.segment()); } + /// Sets `degenerateLinesRasterized` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_degenerateLinesRasterized(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_degenerateLinesRasterized.set(segment, 0L, index, value); } + /// Sets `degenerateLinesRasterized` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_degenerateLinesRasterized(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_degenerateLinesRasterized(segment, 0L, value); } + /// Sets `degenerateLinesRasterized` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT degenerateLinesRasterizedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_degenerateLinesRasterized(this.segment(), index, value); return this; } + /// Sets `degenerateLinesRasterized` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT degenerateLinesRasterized(@CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_degenerateLinesRasterized(this.segment(), value); return this; } + + /// {@return `fullyCoveredFragmentShaderInputVariable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fullyCoveredFragmentShaderInputVariable(MemorySegment segment, long index) { return (int) VH_fullyCoveredFragmentShaderInputVariable.get(segment, 0L, index); } + /// {@return `fullyCoveredFragmentShaderInputVariable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fullyCoveredFragmentShaderInputVariable(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_fullyCoveredFragmentShaderInputVariable(segment, 0L); } + /// {@return `fullyCoveredFragmentShaderInputVariable` at the given index} + /// @param index the index + public @CType("VkBool32") int fullyCoveredFragmentShaderInputVariableAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_fullyCoveredFragmentShaderInputVariable(this.segment(), index); } + /// {@return `fullyCoveredFragmentShaderInputVariable`} + public @CType("VkBool32") int fullyCoveredFragmentShaderInputVariable() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_fullyCoveredFragmentShaderInputVariable(this.segment()); } + /// Sets `fullyCoveredFragmentShaderInputVariable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fullyCoveredFragmentShaderInputVariable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fullyCoveredFragmentShaderInputVariable.set(segment, 0L, index, value); } + /// Sets `fullyCoveredFragmentShaderInputVariable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fullyCoveredFragmentShaderInputVariable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_fullyCoveredFragmentShaderInputVariable(segment, 0L, value); } + /// Sets `fullyCoveredFragmentShaderInputVariable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT fullyCoveredFragmentShaderInputVariableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_fullyCoveredFragmentShaderInputVariable(this.segment(), index, value); return this; } + /// Sets `fullyCoveredFragmentShaderInputVariable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT fullyCoveredFragmentShaderInputVariable(@CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_fullyCoveredFragmentShaderInputVariable(this.segment(), value); return this; } + + /// {@return `conservativeRasterizationPostDepthCoverage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_conservativeRasterizationPostDepthCoverage(MemorySegment segment, long index) { return (int) VH_conservativeRasterizationPostDepthCoverage.get(segment, 0L, index); } + /// {@return `conservativeRasterizationPostDepthCoverage`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_conservativeRasterizationPostDepthCoverage(MemorySegment segment) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_conservativeRasterizationPostDepthCoverage(segment, 0L); } + /// {@return `conservativeRasterizationPostDepthCoverage` at the given index} + /// @param index the index + public @CType("VkBool32") int conservativeRasterizationPostDepthCoverageAt(long index) { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_conservativeRasterizationPostDepthCoverage(this.segment(), index); } + /// {@return `conservativeRasterizationPostDepthCoverage`} + public @CType("VkBool32") int conservativeRasterizationPostDepthCoverage() { return VkPhysicalDeviceConservativeRasterizationPropertiesEXT.get_conservativeRasterizationPostDepthCoverage(this.segment()); } + /// Sets `conservativeRasterizationPostDepthCoverage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conservativeRasterizationPostDepthCoverage(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_conservativeRasterizationPostDepthCoverage.set(segment, 0L, index, value); } + /// Sets `conservativeRasterizationPostDepthCoverage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conservativeRasterizationPostDepthCoverage(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_conservativeRasterizationPostDepthCoverage(segment, 0L, value); } + /// Sets `conservativeRasterizationPostDepthCoverage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT conservativeRasterizationPostDepthCoverageAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_conservativeRasterizationPostDepthCoverage(this.segment(), index, value); return this; } + /// Sets `conservativeRasterizationPostDepthCoverage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceConservativeRasterizationPropertiesEXT conservativeRasterizationPostDepthCoverage(@CType("VkBool32") int value) { VkPhysicalDeviceConservativeRasterizationPropertiesEXT.set_conservativeRasterizationPostDepthCoverage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceCustomBorderColorFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceCustomBorderColorFeaturesEXT.java new file mode 100644 index 00000000..9fbbb95f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceCustomBorderColorFeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### customBorderColors +/// [VarHandle][#VH_customBorderColors] - [Getter][#customBorderColors()] - [Setter][#customBorderColors(int)] +/// ### customBorderColorWithoutFormat +/// [VarHandle][#VH_customBorderColorWithoutFormat] - [Getter][#customBorderColorWithoutFormat()] - [Setter][#customBorderColorWithoutFormat(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCustomBorderColorFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 customBorderColors; +/// VkBool32 customBorderColorWithoutFormat; +/// } VkPhysicalDeviceCustomBorderColorFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceCustomBorderColorFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceCustomBorderColorFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("customBorderColors"), + ValueLayout.JAVA_INT.withName("customBorderColorWithoutFormat") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `customBorderColors` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_customBorderColors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("customBorderColors")); + /// The [VarHandle] of `customBorderColorWithoutFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_customBorderColorWithoutFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("customBorderColorWithoutFormat")); + + /// Creates `VkPhysicalDeviceCustomBorderColorFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCustomBorderColorFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCustomBorderColorFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCustomBorderColorFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCustomBorderColorFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceCustomBorderColorFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCustomBorderColorFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCustomBorderColorFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCustomBorderColorFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCustomBorderColorFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCustomBorderColorFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCustomBorderColorFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCustomBorderColorFeaturesEXT` + public static VkPhysicalDeviceCustomBorderColorFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCustomBorderColorFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCustomBorderColorFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCustomBorderColorFeaturesEXT` + public static VkPhysicalDeviceCustomBorderColorFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCustomBorderColorFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `customBorderColors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_customBorderColors(MemorySegment segment, long index) { return (int) VH_customBorderColors.get(segment, 0L, index); } + /// {@return `customBorderColors`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_customBorderColors(MemorySegment segment) { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_customBorderColors(segment, 0L); } + /// {@return `customBorderColors` at the given index} + /// @param index the index + public @CType("VkBool32") int customBorderColorsAt(long index) { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_customBorderColors(this.segment(), index); } + /// {@return `customBorderColors`} + public @CType("VkBool32") int customBorderColors() { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_customBorderColors(this.segment()); } + /// Sets `customBorderColors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_customBorderColors(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_customBorderColors.set(segment, 0L, index, value); } + /// Sets `customBorderColors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_customBorderColors(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_customBorderColors(segment, 0L, value); } + /// Sets `customBorderColors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorFeaturesEXT customBorderColorsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_customBorderColors(this.segment(), index, value); return this; } + /// Sets `customBorderColors` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorFeaturesEXT customBorderColors(@CType("VkBool32") int value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_customBorderColors(this.segment(), value); return this; } + + /// {@return `customBorderColorWithoutFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_customBorderColorWithoutFormat(MemorySegment segment, long index) { return (int) VH_customBorderColorWithoutFormat.get(segment, 0L, index); } + /// {@return `customBorderColorWithoutFormat`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_customBorderColorWithoutFormat(MemorySegment segment) { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_customBorderColorWithoutFormat(segment, 0L); } + /// {@return `customBorderColorWithoutFormat` at the given index} + /// @param index the index + public @CType("VkBool32") int customBorderColorWithoutFormatAt(long index) { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_customBorderColorWithoutFormat(this.segment(), index); } + /// {@return `customBorderColorWithoutFormat`} + public @CType("VkBool32") int customBorderColorWithoutFormat() { return VkPhysicalDeviceCustomBorderColorFeaturesEXT.get_customBorderColorWithoutFormat(this.segment()); } + /// Sets `customBorderColorWithoutFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_customBorderColorWithoutFormat(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_customBorderColorWithoutFormat.set(segment, 0L, index, value); } + /// Sets `customBorderColorWithoutFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_customBorderColorWithoutFormat(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_customBorderColorWithoutFormat(segment, 0L, value); } + /// Sets `customBorderColorWithoutFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorFeaturesEXT customBorderColorWithoutFormatAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_customBorderColorWithoutFormat(this.segment(), index, value); return this; } + /// Sets `customBorderColorWithoutFormat` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorFeaturesEXT customBorderColorWithoutFormat(@CType("VkBool32") int value) { VkPhysicalDeviceCustomBorderColorFeaturesEXT.set_customBorderColorWithoutFormat(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceCustomBorderColorPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceCustomBorderColorPropertiesEXT.java new file mode 100644 index 00000000..cdd82e1d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceCustomBorderColorPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxCustomBorderColorSamplers +/// [VarHandle][#VH_maxCustomBorderColorSamplers] - [Getter][#maxCustomBorderColorSamplers()] - [Setter][#maxCustomBorderColorSamplers(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCustomBorderColorPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxCustomBorderColorSamplers; +/// } VkPhysicalDeviceCustomBorderColorPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceCustomBorderColorPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceCustomBorderColorPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxCustomBorderColorSamplers") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxCustomBorderColorSamplers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxCustomBorderColorSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxCustomBorderColorSamplers")); + + /// Creates `VkPhysicalDeviceCustomBorderColorPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCustomBorderColorPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCustomBorderColorPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCustomBorderColorPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCustomBorderColorPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceCustomBorderColorPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCustomBorderColorPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCustomBorderColorPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCustomBorderColorPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCustomBorderColorPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCustomBorderColorPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCustomBorderColorPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCustomBorderColorPropertiesEXT` + public static VkPhysicalDeviceCustomBorderColorPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCustomBorderColorPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCustomBorderColorPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCustomBorderColorPropertiesEXT` + public static VkPhysicalDeviceCustomBorderColorPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCustomBorderColorPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCustomBorderColorPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCustomBorderColorPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCustomBorderColorPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCustomBorderColorPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCustomBorderColorPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCustomBorderColorPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCustomBorderColorPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCustomBorderColorPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCustomBorderColorPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCustomBorderColorPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCustomBorderColorPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCustomBorderColorPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `maxCustomBorderColorSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxCustomBorderColorSamplers(MemorySegment segment, long index) { return (int) VH_maxCustomBorderColorSamplers.get(segment, 0L, index); } + /// {@return `maxCustomBorderColorSamplers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxCustomBorderColorSamplers(MemorySegment segment) { return VkPhysicalDeviceCustomBorderColorPropertiesEXT.get_maxCustomBorderColorSamplers(segment, 0L); } + /// {@return `maxCustomBorderColorSamplers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxCustomBorderColorSamplersAt(long index) { return VkPhysicalDeviceCustomBorderColorPropertiesEXT.get_maxCustomBorderColorSamplers(this.segment(), index); } + /// {@return `maxCustomBorderColorSamplers`} + public @CType("uint32_t") int maxCustomBorderColorSamplers() { return VkPhysicalDeviceCustomBorderColorPropertiesEXT.get_maxCustomBorderColorSamplers(this.segment()); } + /// Sets `maxCustomBorderColorSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCustomBorderColorSamplers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxCustomBorderColorSamplers.set(segment, 0L, index, value); } + /// Sets `maxCustomBorderColorSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCustomBorderColorSamplers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceCustomBorderColorPropertiesEXT.set_maxCustomBorderColorSamplers(segment, 0L, value); } + /// Sets `maxCustomBorderColorSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorPropertiesEXT maxCustomBorderColorSamplersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceCustomBorderColorPropertiesEXT.set_maxCustomBorderColorSamplers(this.segment(), index, value); return this; } + /// Sets `maxCustomBorderColorSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCustomBorderColorPropertiesEXT maxCustomBorderColorSamplers(@CType("uint32_t") int value) { VkPhysicalDeviceCustomBorderColorPropertiesEXT.set_maxCustomBorderColorSamplers(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthBiasControlFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthBiasControlFeaturesEXT.java new file mode 100644 index 00000000..9ef35fe9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthBiasControlFeaturesEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### depthBiasControl +/// [VarHandle][#VH_depthBiasControl] - [Getter][#depthBiasControl()] - [Setter][#depthBiasControl(int)] +/// ### leastRepresentableValueForceUnormRepresentation +/// [VarHandle][#VH_leastRepresentableValueForceUnormRepresentation] - [Getter][#leastRepresentableValueForceUnormRepresentation()] - [Setter][#leastRepresentableValueForceUnormRepresentation(int)] +/// ### floatRepresentation +/// [VarHandle][#VH_floatRepresentation] - [Getter][#floatRepresentation()] - [Setter][#floatRepresentation(int)] +/// ### depthBiasExact +/// [VarHandle][#VH_depthBiasExact] - [Getter][#depthBiasExact()] - [Setter][#depthBiasExact(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDepthBiasControlFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 depthBiasControl; +/// VkBool32 leastRepresentableValueForceUnormRepresentation; +/// VkBool32 floatRepresentation; +/// VkBool32 depthBiasExact; +/// } VkPhysicalDeviceDepthBiasControlFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceDepthBiasControlFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDepthBiasControlFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("depthBiasControl"), + ValueLayout.JAVA_INT.withName("leastRepresentableValueForceUnormRepresentation"), + ValueLayout.JAVA_INT.withName("floatRepresentation"), + ValueLayout.JAVA_INT.withName("depthBiasExact") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `depthBiasControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthBiasControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasControl")); + /// The [VarHandle] of `leastRepresentableValueForceUnormRepresentation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_leastRepresentableValueForceUnormRepresentation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("leastRepresentableValueForceUnormRepresentation")); + /// The [VarHandle] of `floatRepresentation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_floatRepresentation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("floatRepresentation")); + /// The [VarHandle] of `depthBiasExact` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthBiasExact = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasExact")); + + /// Creates `VkPhysicalDeviceDepthBiasControlFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDepthBiasControlFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDepthBiasControlFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthBiasControlFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthBiasControlFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceDepthBiasControlFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthBiasControlFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthBiasControlFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDepthBiasControlFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthBiasControlFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthBiasControlFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDepthBiasControlFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDepthBiasControlFeaturesEXT` + public static VkPhysicalDeviceDepthBiasControlFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDepthBiasControlFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDepthBiasControlFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDepthBiasControlFeaturesEXT` + public static VkPhysicalDeviceDepthBiasControlFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDepthBiasControlFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `depthBiasControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthBiasControl(MemorySegment segment, long index) { return (int) VH_depthBiasControl.get(segment, 0L, index); } + /// {@return `depthBiasControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthBiasControl(MemorySegment segment) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_depthBiasControl(segment, 0L); } + /// {@return `depthBiasControl` at the given index} + /// @param index the index + public @CType("VkBool32") int depthBiasControlAt(long index) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_depthBiasControl(this.segment(), index); } + /// {@return `depthBiasControl`} + public @CType("VkBool32") int depthBiasControl() { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_depthBiasControl(this.segment()); } + /// Sets `depthBiasControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthBiasControl.set(segment, 0L, index, value); } + /// Sets `depthBiasControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_depthBiasControl(segment, 0L, value); } + /// Sets `depthBiasControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT depthBiasControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_depthBiasControl(this.segment(), index, value); return this; } + /// Sets `depthBiasControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT depthBiasControl(@CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_depthBiasControl(this.segment(), value); return this; } + + /// {@return `leastRepresentableValueForceUnormRepresentation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_leastRepresentableValueForceUnormRepresentation(MemorySegment segment, long index) { return (int) VH_leastRepresentableValueForceUnormRepresentation.get(segment, 0L, index); } + /// {@return `leastRepresentableValueForceUnormRepresentation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_leastRepresentableValueForceUnormRepresentation(MemorySegment segment) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_leastRepresentableValueForceUnormRepresentation(segment, 0L); } + /// {@return `leastRepresentableValueForceUnormRepresentation` at the given index} + /// @param index the index + public @CType("VkBool32") int leastRepresentableValueForceUnormRepresentationAt(long index) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_leastRepresentableValueForceUnormRepresentation(this.segment(), index); } + /// {@return `leastRepresentableValueForceUnormRepresentation`} + public @CType("VkBool32") int leastRepresentableValueForceUnormRepresentation() { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_leastRepresentableValueForceUnormRepresentation(this.segment()); } + /// Sets `leastRepresentableValueForceUnormRepresentation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_leastRepresentableValueForceUnormRepresentation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_leastRepresentableValueForceUnormRepresentation.set(segment, 0L, index, value); } + /// Sets `leastRepresentableValueForceUnormRepresentation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_leastRepresentableValueForceUnormRepresentation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_leastRepresentableValueForceUnormRepresentation(segment, 0L, value); } + /// Sets `leastRepresentableValueForceUnormRepresentation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT leastRepresentableValueForceUnormRepresentationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_leastRepresentableValueForceUnormRepresentation(this.segment(), index, value); return this; } + /// Sets `leastRepresentableValueForceUnormRepresentation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT leastRepresentableValueForceUnormRepresentation(@CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_leastRepresentableValueForceUnormRepresentation(this.segment(), value); return this; } + + /// {@return `floatRepresentation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_floatRepresentation(MemorySegment segment, long index) { return (int) VH_floatRepresentation.get(segment, 0L, index); } + /// {@return `floatRepresentation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_floatRepresentation(MemorySegment segment) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_floatRepresentation(segment, 0L); } + /// {@return `floatRepresentation` at the given index} + /// @param index the index + public @CType("VkBool32") int floatRepresentationAt(long index) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_floatRepresentation(this.segment(), index); } + /// {@return `floatRepresentation`} + public @CType("VkBool32") int floatRepresentation() { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_floatRepresentation(this.segment()); } + /// Sets `floatRepresentation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_floatRepresentation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_floatRepresentation.set(segment, 0L, index, value); } + /// Sets `floatRepresentation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_floatRepresentation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_floatRepresentation(segment, 0L, value); } + /// Sets `floatRepresentation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT floatRepresentationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_floatRepresentation(this.segment(), index, value); return this; } + /// Sets `floatRepresentation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT floatRepresentation(@CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_floatRepresentation(this.segment(), value); return this; } + + /// {@return `depthBiasExact` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthBiasExact(MemorySegment segment, long index) { return (int) VH_depthBiasExact.get(segment, 0L, index); } + /// {@return `depthBiasExact`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthBiasExact(MemorySegment segment) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_depthBiasExact(segment, 0L); } + /// {@return `depthBiasExact` at the given index} + /// @param index the index + public @CType("VkBool32") int depthBiasExactAt(long index) { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_depthBiasExact(this.segment(), index); } + /// {@return `depthBiasExact`} + public @CType("VkBool32") int depthBiasExact() { return VkPhysicalDeviceDepthBiasControlFeaturesEXT.get_depthBiasExact(this.segment()); } + /// Sets `depthBiasExact` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasExact(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthBiasExact.set(segment, 0L, index, value); } + /// Sets `depthBiasExact` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasExact(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_depthBiasExact(segment, 0L, value); } + /// Sets `depthBiasExact` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT depthBiasExactAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_depthBiasExact(this.segment(), index, value); return this; } + /// Sets `depthBiasExact` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthBiasControlFeaturesEXT depthBiasExact(@CType("VkBool32") int value) { VkPhysicalDeviceDepthBiasControlFeaturesEXT.set_depthBiasExact(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClampControlFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClampControlFeaturesEXT.java new file mode 100644 index 00000000..ecfcebfd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClampControlFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### depthClampControl +/// [VarHandle][#VH_depthClampControl] - [Getter][#depthClampControl()] - [Setter][#depthClampControl(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDepthClampControlFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 depthClampControl; +/// } VkPhysicalDeviceDepthClampControlFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceDepthClampControlFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDepthClampControlFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("depthClampControl") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `depthClampControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthClampControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthClampControl")); + + /// Creates `VkPhysicalDeviceDepthClampControlFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDepthClampControlFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDepthClampControlFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClampControlFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClampControlFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceDepthClampControlFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClampControlFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClampControlFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDepthClampControlFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClampControlFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClampControlFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDepthClampControlFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDepthClampControlFeaturesEXT` + public static VkPhysicalDeviceDepthClampControlFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDepthClampControlFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDepthClampControlFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDepthClampControlFeaturesEXT` + public static VkPhysicalDeviceDepthClampControlFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDepthClampControlFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDepthClampControlFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDepthClampControlFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDepthClampControlFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthClampControlFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampControlFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthClampControlFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampControlFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDepthClampControlFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDepthClampControlFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDepthClampControlFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDepthClampControlFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClampControlFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampControlFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClampControlFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampControlFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClampControlFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `depthClampControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthClampControl(MemorySegment segment, long index) { return (int) VH_depthClampControl.get(segment, 0L, index); } + /// {@return `depthClampControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthClampControl(MemorySegment segment) { return VkPhysicalDeviceDepthClampControlFeaturesEXT.get_depthClampControl(segment, 0L); } + /// {@return `depthClampControl` at the given index} + /// @param index the index + public @CType("VkBool32") int depthClampControlAt(long index) { return VkPhysicalDeviceDepthClampControlFeaturesEXT.get_depthClampControl(this.segment(), index); } + /// {@return `depthClampControl`} + public @CType("VkBool32") int depthClampControl() { return VkPhysicalDeviceDepthClampControlFeaturesEXT.get_depthClampControl(this.segment()); } + /// Sets `depthClampControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthClampControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthClampControl.set(segment, 0L, index, value); } + /// Sets `depthClampControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthClampControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDepthClampControlFeaturesEXT.set_depthClampControl(segment, 0L, value); } + /// Sets `depthClampControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampControlFeaturesEXT depthClampControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDepthClampControlFeaturesEXT.set_depthClampControl(this.segment(), index, value); return this; } + /// Sets `depthClampControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampControlFeaturesEXT depthClampControl(@CType("VkBool32") int value) { VkPhysicalDeviceDepthClampControlFeaturesEXT.set_depthClampControl(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.java new file mode 100644 index 00000000..afdd56b0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### depthClampZeroOne +/// [VarHandle][#VH_depthClampZeroOne] - [Getter][#depthClampZeroOne()] - [Setter][#depthClampZeroOne(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDepthClampZeroOneFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 depthClampZeroOne; +/// } VkPhysicalDeviceDepthClampZeroOneFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceDepthClampZeroOneFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDepthClampZeroOneFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("depthClampZeroOne") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `depthClampZeroOne` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthClampZeroOne = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthClampZeroOne")); + + /// Creates `VkPhysicalDeviceDepthClampZeroOneFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDepthClampZeroOneFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDepthClampZeroOneFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClampZeroOneFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClampZeroOneFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceDepthClampZeroOneFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClampZeroOneFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClampZeroOneFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDepthClampZeroOneFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClampZeroOneFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClampZeroOneFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDepthClampZeroOneFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDepthClampZeroOneFeaturesEXT` + public static VkPhysicalDeviceDepthClampZeroOneFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDepthClampZeroOneFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDepthClampZeroOneFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDepthClampZeroOneFeaturesEXT` + public static VkPhysicalDeviceDepthClampZeroOneFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDepthClampZeroOneFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampZeroOneFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampZeroOneFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampZeroOneFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampZeroOneFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `depthClampZeroOne` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthClampZeroOne(MemorySegment segment, long index) { return (int) VH_depthClampZeroOne.get(segment, 0L, index); } + /// {@return `depthClampZeroOne`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthClampZeroOne(MemorySegment segment) { return VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.get_depthClampZeroOne(segment, 0L); } + /// {@return `depthClampZeroOne` at the given index} + /// @param index the index + public @CType("VkBool32") int depthClampZeroOneAt(long index) { return VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.get_depthClampZeroOne(this.segment(), index); } + /// {@return `depthClampZeroOne`} + public @CType("VkBool32") int depthClampZeroOne() { return VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.get_depthClampZeroOne(this.segment()); } + /// Sets `depthClampZeroOne` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthClampZeroOne(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthClampZeroOne.set(segment, 0L, index, value); } + /// Sets `depthClampZeroOne` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthClampZeroOne(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.set_depthClampZeroOne(segment, 0L, value); } + /// Sets `depthClampZeroOne` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampZeroOneFeaturesEXT depthClampZeroOneAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.set_depthClampZeroOne(this.segment(), index, value); return this; } + /// Sets `depthClampZeroOne` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClampZeroOneFeaturesEXT depthClampZeroOne(@CType("VkBool32") int value) { VkPhysicalDeviceDepthClampZeroOneFeaturesEXT.set_depthClampZeroOne(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClipControlFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClipControlFeaturesEXT.java new file mode 100644 index 00000000..baf13750 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClipControlFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### depthClipControl +/// [VarHandle][#VH_depthClipControl] - [Getter][#depthClipControl()] - [Setter][#depthClipControl(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDepthClipControlFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 depthClipControl; +/// } VkPhysicalDeviceDepthClipControlFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceDepthClipControlFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDepthClipControlFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("depthClipControl") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `depthClipControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthClipControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthClipControl")); + + /// Creates `VkPhysicalDeviceDepthClipControlFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDepthClipControlFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDepthClipControlFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClipControlFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClipControlFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceDepthClipControlFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClipControlFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClipControlFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDepthClipControlFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClipControlFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClipControlFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDepthClipControlFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDepthClipControlFeaturesEXT` + public static VkPhysicalDeviceDepthClipControlFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDepthClipControlFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDepthClipControlFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDepthClipControlFeaturesEXT` + public static VkPhysicalDeviceDepthClipControlFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDepthClipControlFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDepthClipControlFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDepthClipControlFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDepthClipControlFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthClipControlFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipControlFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthClipControlFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipControlFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDepthClipControlFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDepthClipControlFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDepthClipControlFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDepthClipControlFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClipControlFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipControlFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClipControlFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipControlFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClipControlFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `depthClipControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthClipControl(MemorySegment segment, long index) { return (int) VH_depthClipControl.get(segment, 0L, index); } + /// {@return `depthClipControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthClipControl(MemorySegment segment) { return VkPhysicalDeviceDepthClipControlFeaturesEXT.get_depthClipControl(segment, 0L); } + /// {@return `depthClipControl` at the given index} + /// @param index the index + public @CType("VkBool32") int depthClipControlAt(long index) { return VkPhysicalDeviceDepthClipControlFeaturesEXT.get_depthClipControl(this.segment(), index); } + /// {@return `depthClipControl`} + public @CType("VkBool32") int depthClipControl() { return VkPhysicalDeviceDepthClipControlFeaturesEXT.get_depthClipControl(this.segment()); } + /// Sets `depthClipControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthClipControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthClipControl.set(segment, 0L, index, value); } + /// Sets `depthClipControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthClipControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDepthClipControlFeaturesEXT.set_depthClipControl(segment, 0L, value); } + /// Sets `depthClipControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipControlFeaturesEXT depthClipControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDepthClipControlFeaturesEXT.set_depthClipControl(this.segment(), index, value); return this; } + /// Sets `depthClipControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipControlFeaturesEXT depthClipControl(@CType("VkBool32") int value) { VkPhysicalDeviceDepthClipControlFeaturesEXT.set_depthClipControl(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClipEnableFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClipEnableFeaturesEXT.java new file mode 100644 index 00000000..ed65f7b2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDepthClipEnableFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### depthClipEnable +/// [VarHandle][#VH_depthClipEnable] - [Getter][#depthClipEnable()] - [Setter][#depthClipEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDepthClipEnableFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 depthClipEnable; +/// } VkPhysicalDeviceDepthClipEnableFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceDepthClipEnableFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDepthClipEnableFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("depthClipEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `depthClipEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthClipEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthClipEnable")); + + /// Creates `VkPhysicalDeviceDepthClipEnableFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDepthClipEnableFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDepthClipEnableFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClipEnableFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClipEnableFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceDepthClipEnableFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClipEnableFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClipEnableFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDepthClipEnableFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthClipEnableFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthClipEnableFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDepthClipEnableFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDepthClipEnableFeaturesEXT` + public static VkPhysicalDeviceDepthClipEnableFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDepthClipEnableFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDepthClipEnableFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDepthClipEnableFeaturesEXT` + public static VkPhysicalDeviceDepthClipEnableFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDepthClipEnableFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDepthClipEnableFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDepthClipEnableFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDepthClipEnableFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthClipEnableFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipEnableFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthClipEnableFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipEnableFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDepthClipEnableFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDepthClipEnableFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDepthClipEnableFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDepthClipEnableFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClipEnableFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipEnableFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClipEnableFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipEnableFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthClipEnableFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `depthClipEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthClipEnable(MemorySegment segment, long index) { return (int) VH_depthClipEnable.get(segment, 0L, index); } + /// {@return `depthClipEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthClipEnable(MemorySegment segment) { return VkPhysicalDeviceDepthClipEnableFeaturesEXT.get_depthClipEnable(segment, 0L); } + /// {@return `depthClipEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int depthClipEnableAt(long index) { return VkPhysicalDeviceDepthClipEnableFeaturesEXT.get_depthClipEnable(this.segment(), index); } + /// {@return `depthClipEnable`} + public @CType("VkBool32") int depthClipEnable() { return VkPhysicalDeviceDepthClipEnableFeaturesEXT.get_depthClipEnable(this.segment()); } + /// Sets `depthClipEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthClipEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthClipEnable.set(segment, 0L, index, value); } + /// Sets `depthClipEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthClipEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDepthClipEnableFeaturesEXT.set_depthClipEnable(segment, 0L, value); } + /// Sets `depthClipEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipEnableFeaturesEXT depthClipEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDepthClipEnableFeaturesEXT.set_depthClipEnable(this.segment(), index, value); return this; } + /// Sets `depthClipEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthClipEnableFeaturesEXT depthClipEnable(@CType("VkBool32") int value) { VkPhysicalDeviceDepthClipEnableFeaturesEXT.set_depthClipEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.java new file mode 100644 index 00000000..ffbaf951 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### combinedImageSamplerDensityMapDescriptorSize +/// [VarHandle][#VH_combinedImageSamplerDensityMapDescriptorSize] - [Getter][#combinedImageSamplerDensityMapDescriptorSize()] - [Setter][#combinedImageSamplerDensityMapDescriptorSize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// size_t combinedImageSamplerDensityMapDescriptorSize; +/// } VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("combinedImageSamplerDensityMapDescriptorSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `combinedImageSamplerDensityMapDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_combinedImageSamplerDensityMapDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("combinedImageSamplerDensityMapDescriptorSize")); + + /// Creates `VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT` + public static VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT` + public static VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `combinedImageSamplerDensityMapDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_combinedImageSamplerDensityMapDescriptorSize(MemorySegment segment, long index) { return (long) VH_combinedImageSamplerDensityMapDescriptorSize.get(segment, 0L, index); } + /// {@return `combinedImageSamplerDensityMapDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_combinedImageSamplerDensityMapDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.get_combinedImageSamplerDensityMapDescriptorSize(segment, 0L); } + /// {@return `combinedImageSamplerDensityMapDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long combinedImageSamplerDensityMapDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.get_combinedImageSamplerDensityMapDescriptorSize(this.segment(), index); } + /// {@return `combinedImageSamplerDensityMapDescriptorSize`} + public @CType("size_t") long combinedImageSamplerDensityMapDescriptorSize() { return VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.get_combinedImageSamplerDensityMapDescriptorSize(this.segment()); } + /// Sets `combinedImageSamplerDensityMapDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_combinedImageSamplerDensityMapDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_combinedImageSamplerDensityMapDescriptorSize.set(segment, 0L, index, value); } + /// Sets `combinedImageSamplerDensityMapDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_combinedImageSamplerDensityMapDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.set_combinedImageSamplerDensityMapDescriptorSize(segment, 0L, value); } + /// Sets `combinedImageSamplerDensityMapDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT combinedImageSamplerDensityMapDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.set_combinedImageSamplerDensityMapDescriptorSize(this.segment(), index, value); return this; } + /// Sets `combinedImageSamplerDensityMapDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT combinedImageSamplerDensityMapDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.set_combinedImageSamplerDensityMapDescriptorSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDescriptorBufferFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDescriptorBufferFeaturesEXT.java new file mode 100644 index 00000000..96db542f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDescriptorBufferFeaturesEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### descriptorBuffer +/// [VarHandle][#VH_descriptorBuffer] - [Getter][#descriptorBuffer()] - [Setter][#descriptorBuffer(int)] +/// ### descriptorBufferCaptureReplay +/// [VarHandle][#VH_descriptorBufferCaptureReplay] - [Getter][#descriptorBufferCaptureReplay()] - [Setter][#descriptorBufferCaptureReplay(int)] +/// ### descriptorBufferImageLayoutIgnored +/// [VarHandle][#VH_descriptorBufferImageLayoutIgnored] - [Getter][#descriptorBufferImageLayoutIgnored()] - [Setter][#descriptorBufferImageLayoutIgnored(int)] +/// ### descriptorBufferPushDescriptors +/// [VarHandle][#VH_descriptorBufferPushDescriptors] - [Getter][#descriptorBufferPushDescriptors()] - [Setter][#descriptorBufferPushDescriptors(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDescriptorBufferFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 descriptorBuffer; +/// VkBool32 descriptorBufferCaptureReplay; +/// VkBool32 descriptorBufferImageLayoutIgnored; +/// VkBool32 descriptorBufferPushDescriptors; +/// } VkPhysicalDeviceDescriptorBufferFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceDescriptorBufferFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDescriptorBufferFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("descriptorBuffer"), + ValueLayout.JAVA_INT.withName("descriptorBufferCaptureReplay"), + ValueLayout.JAVA_INT.withName("descriptorBufferImageLayoutIgnored"), + ValueLayout.JAVA_INT.withName("descriptorBufferPushDescriptors") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `descriptorBuffer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBuffer")); + /// The [VarHandle] of `descriptorBufferCaptureReplay` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBufferCaptureReplay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBufferCaptureReplay")); + /// The [VarHandle] of `descriptorBufferImageLayoutIgnored` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBufferImageLayoutIgnored = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBufferImageLayoutIgnored")); + /// The [VarHandle] of `descriptorBufferPushDescriptors` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBufferPushDescriptors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBufferPushDescriptors")); + + /// Creates `VkPhysicalDeviceDescriptorBufferFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDescriptorBufferFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDescriptorBufferFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorBufferFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorBufferFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceDescriptorBufferFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorBufferFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorBufferFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDescriptorBufferFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorBufferFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorBufferFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDescriptorBufferFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDescriptorBufferFeaturesEXT` + public static VkPhysicalDeviceDescriptorBufferFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDescriptorBufferFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDescriptorBufferFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDescriptorBufferFeaturesEXT` + public static VkPhysicalDeviceDescriptorBufferFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDescriptorBufferFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `descriptorBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBuffer(MemorySegment segment, long index) { return (int) VH_descriptorBuffer.get(segment, 0L, index); } + /// {@return `descriptorBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBuffer(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBuffer(segment, 0L); } + /// {@return `descriptorBuffer` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBufferAt(long index) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBuffer(this.segment(), index); } + /// {@return `descriptorBuffer`} + public @CType("VkBool32") int descriptorBuffer() { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBuffer(this.segment()); } + /// Sets `descriptorBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBuffer(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBuffer.set(segment, 0L, index, value); } + /// Sets `descriptorBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBuffer(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBuffer(segment, 0L, value); } + /// Sets `descriptorBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT descriptorBufferAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBuffer(this.segment(), index, value); return this; } + /// Sets `descriptorBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT descriptorBuffer(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBuffer(this.segment(), value); return this; } + + /// {@return `descriptorBufferCaptureReplay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBufferCaptureReplay(MemorySegment segment, long index) { return (int) VH_descriptorBufferCaptureReplay.get(segment, 0L, index); } + /// {@return `descriptorBufferCaptureReplay`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBufferCaptureReplay(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBufferCaptureReplay(segment, 0L); } + /// {@return `descriptorBufferCaptureReplay` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBufferCaptureReplayAt(long index) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBufferCaptureReplay(this.segment(), index); } + /// {@return `descriptorBufferCaptureReplay`} + public @CType("VkBool32") int descriptorBufferCaptureReplay() { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBufferCaptureReplay(this.segment()); } + /// Sets `descriptorBufferCaptureReplay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBufferCaptureReplay(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBufferCaptureReplay.set(segment, 0L, index, value); } + /// Sets `descriptorBufferCaptureReplay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBufferCaptureReplay(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBufferCaptureReplay(segment, 0L, value); } + /// Sets `descriptorBufferCaptureReplay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT descriptorBufferCaptureReplayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBufferCaptureReplay(this.segment(), index, value); return this; } + /// Sets `descriptorBufferCaptureReplay` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT descriptorBufferCaptureReplay(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBufferCaptureReplay(this.segment(), value); return this; } + + /// {@return `descriptorBufferImageLayoutIgnored` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBufferImageLayoutIgnored(MemorySegment segment, long index) { return (int) VH_descriptorBufferImageLayoutIgnored.get(segment, 0L, index); } + /// {@return `descriptorBufferImageLayoutIgnored`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBufferImageLayoutIgnored(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBufferImageLayoutIgnored(segment, 0L); } + /// {@return `descriptorBufferImageLayoutIgnored` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBufferImageLayoutIgnoredAt(long index) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBufferImageLayoutIgnored(this.segment(), index); } + /// {@return `descriptorBufferImageLayoutIgnored`} + public @CType("VkBool32") int descriptorBufferImageLayoutIgnored() { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBufferImageLayoutIgnored(this.segment()); } + /// Sets `descriptorBufferImageLayoutIgnored` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBufferImageLayoutIgnored(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBufferImageLayoutIgnored.set(segment, 0L, index, value); } + /// Sets `descriptorBufferImageLayoutIgnored` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBufferImageLayoutIgnored(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBufferImageLayoutIgnored(segment, 0L, value); } + /// Sets `descriptorBufferImageLayoutIgnored` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT descriptorBufferImageLayoutIgnoredAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBufferImageLayoutIgnored(this.segment(), index, value); return this; } + /// Sets `descriptorBufferImageLayoutIgnored` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT descriptorBufferImageLayoutIgnored(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBufferImageLayoutIgnored(this.segment(), value); return this; } + + /// {@return `descriptorBufferPushDescriptors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBufferPushDescriptors(MemorySegment segment, long index) { return (int) VH_descriptorBufferPushDescriptors.get(segment, 0L, index); } + /// {@return `descriptorBufferPushDescriptors`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBufferPushDescriptors(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBufferPushDescriptors(segment, 0L); } + /// {@return `descriptorBufferPushDescriptors` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBufferPushDescriptorsAt(long index) { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBufferPushDescriptors(this.segment(), index); } + /// {@return `descriptorBufferPushDescriptors`} + public @CType("VkBool32") int descriptorBufferPushDescriptors() { return VkPhysicalDeviceDescriptorBufferFeaturesEXT.get_descriptorBufferPushDescriptors(this.segment()); } + /// Sets `descriptorBufferPushDescriptors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBufferPushDescriptors(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBufferPushDescriptors.set(segment, 0L, index, value); } + /// Sets `descriptorBufferPushDescriptors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBufferPushDescriptors(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBufferPushDescriptors(segment, 0L, value); } + /// Sets `descriptorBufferPushDescriptors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT descriptorBufferPushDescriptorsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBufferPushDescriptors(this.segment(), index, value); return this; } + /// Sets `descriptorBufferPushDescriptors` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferFeaturesEXT descriptorBufferPushDescriptors(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferFeaturesEXT.set_descriptorBufferPushDescriptors(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDescriptorBufferPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDescriptorBufferPropertiesEXT.java new file mode 100644 index 00000000..e7abf69c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDescriptorBufferPropertiesEXT.java @@ -0,0 +1,1369 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### combinedImageSamplerDescriptorSingleArray +/// [VarHandle][#VH_combinedImageSamplerDescriptorSingleArray] - [Getter][#combinedImageSamplerDescriptorSingleArray()] - [Setter][#combinedImageSamplerDescriptorSingleArray(int)] +/// ### bufferlessPushDescriptors +/// [VarHandle][#VH_bufferlessPushDescriptors] - [Getter][#bufferlessPushDescriptors()] - [Setter][#bufferlessPushDescriptors(int)] +/// ### allowSamplerImageViewPostSubmitCreation +/// [VarHandle][#VH_allowSamplerImageViewPostSubmitCreation] - [Getter][#allowSamplerImageViewPostSubmitCreation()] - [Setter][#allowSamplerImageViewPostSubmitCreation(int)] +/// ### descriptorBufferOffsetAlignment +/// [VarHandle][#VH_descriptorBufferOffsetAlignment] - [Getter][#descriptorBufferOffsetAlignment()] - [Setter][#descriptorBufferOffsetAlignment(long)] +/// ### maxDescriptorBufferBindings +/// [VarHandle][#VH_maxDescriptorBufferBindings] - [Getter][#maxDescriptorBufferBindings()] - [Setter][#maxDescriptorBufferBindings(int)] +/// ### maxResourceDescriptorBufferBindings +/// [VarHandle][#VH_maxResourceDescriptorBufferBindings] - [Getter][#maxResourceDescriptorBufferBindings()] - [Setter][#maxResourceDescriptorBufferBindings(int)] +/// ### maxSamplerDescriptorBufferBindings +/// [VarHandle][#VH_maxSamplerDescriptorBufferBindings] - [Getter][#maxSamplerDescriptorBufferBindings()] - [Setter][#maxSamplerDescriptorBufferBindings(int)] +/// ### maxEmbeddedImmutableSamplerBindings +/// [VarHandle][#VH_maxEmbeddedImmutableSamplerBindings] - [Getter][#maxEmbeddedImmutableSamplerBindings()] - [Setter][#maxEmbeddedImmutableSamplerBindings(int)] +/// ### maxEmbeddedImmutableSamplers +/// [VarHandle][#VH_maxEmbeddedImmutableSamplers] - [Getter][#maxEmbeddedImmutableSamplers()] - [Setter][#maxEmbeddedImmutableSamplers(int)] +/// ### bufferCaptureReplayDescriptorDataSize +/// [VarHandle][#VH_bufferCaptureReplayDescriptorDataSize] - [Getter][#bufferCaptureReplayDescriptorDataSize()] - [Setter][#bufferCaptureReplayDescriptorDataSize(long)] +/// ### imageCaptureReplayDescriptorDataSize +/// [VarHandle][#VH_imageCaptureReplayDescriptorDataSize] - [Getter][#imageCaptureReplayDescriptorDataSize()] - [Setter][#imageCaptureReplayDescriptorDataSize(long)] +/// ### imageViewCaptureReplayDescriptorDataSize +/// [VarHandle][#VH_imageViewCaptureReplayDescriptorDataSize] - [Getter][#imageViewCaptureReplayDescriptorDataSize()] - [Setter][#imageViewCaptureReplayDescriptorDataSize(long)] +/// ### samplerCaptureReplayDescriptorDataSize +/// [VarHandle][#VH_samplerCaptureReplayDescriptorDataSize] - [Getter][#samplerCaptureReplayDescriptorDataSize()] - [Setter][#samplerCaptureReplayDescriptorDataSize(long)] +/// ### accelerationStructureCaptureReplayDescriptorDataSize +/// [VarHandle][#VH_accelerationStructureCaptureReplayDescriptorDataSize] - [Getter][#accelerationStructureCaptureReplayDescriptorDataSize()] - [Setter][#accelerationStructureCaptureReplayDescriptorDataSize(long)] +/// ### samplerDescriptorSize +/// [VarHandle][#VH_samplerDescriptorSize] - [Getter][#samplerDescriptorSize()] - [Setter][#samplerDescriptorSize(long)] +/// ### combinedImageSamplerDescriptorSize +/// [VarHandle][#VH_combinedImageSamplerDescriptorSize] - [Getter][#combinedImageSamplerDescriptorSize()] - [Setter][#combinedImageSamplerDescriptorSize(long)] +/// ### sampledImageDescriptorSize +/// [VarHandle][#VH_sampledImageDescriptorSize] - [Getter][#sampledImageDescriptorSize()] - [Setter][#sampledImageDescriptorSize(long)] +/// ### storageImageDescriptorSize +/// [VarHandle][#VH_storageImageDescriptorSize] - [Getter][#storageImageDescriptorSize()] - [Setter][#storageImageDescriptorSize(long)] +/// ### uniformTexelBufferDescriptorSize +/// [VarHandle][#VH_uniformTexelBufferDescriptorSize] - [Getter][#uniformTexelBufferDescriptorSize()] - [Setter][#uniformTexelBufferDescriptorSize(long)] +/// ### robustUniformTexelBufferDescriptorSize +/// [VarHandle][#VH_robustUniformTexelBufferDescriptorSize] - [Getter][#robustUniformTexelBufferDescriptorSize()] - [Setter][#robustUniformTexelBufferDescriptorSize(long)] +/// ### storageTexelBufferDescriptorSize +/// [VarHandle][#VH_storageTexelBufferDescriptorSize] - [Getter][#storageTexelBufferDescriptorSize()] - [Setter][#storageTexelBufferDescriptorSize(long)] +/// ### robustStorageTexelBufferDescriptorSize +/// [VarHandle][#VH_robustStorageTexelBufferDescriptorSize] - [Getter][#robustStorageTexelBufferDescriptorSize()] - [Setter][#robustStorageTexelBufferDescriptorSize(long)] +/// ### uniformBufferDescriptorSize +/// [VarHandle][#VH_uniformBufferDescriptorSize] - [Getter][#uniformBufferDescriptorSize()] - [Setter][#uniformBufferDescriptorSize(long)] +/// ### robustUniformBufferDescriptorSize +/// [VarHandle][#VH_robustUniformBufferDescriptorSize] - [Getter][#robustUniformBufferDescriptorSize()] - [Setter][#robustUniformBufferDescriptorSize(long)] +/// ### storageBufferDescriptorSize +/// [VarHandle][#VH_storageBufferDescriptorSize] - [Getter][#storageBufferDescriptorSize()] - [Setter][#storageBufferDescriptorSize(long)] +/// ### robustStorageBufferDescriptorSize +/// [VarHandle][#VH_robustStorageBufferDescriptorSize] - [Getter][#robustStorageBufferDescriptorSize()] - [Setter][#robustStorageBufferDescriptorSize(long)] +/// ### inputAttachmentDescriptorSize +/// [VarHandle][#VH_inputAttachmentDescriptorSize] - [Getter][#inputAttachmentDescriptorSize()] - [Setter][#inputAttachmentDescriptorSize(long)] +/// ### accelerationStructureDescriptorSize +/// [VarHandle][#VH_accelerationStructureDescriptorSize] - [Getter][#accelerationStructureDescriptorSize()] - [Setter][#accelerationStructureDescriptorSize(long)] +/// ### maxSamplerDescriptorBufferRange +/// [VarHandle][#VH_maxSamplerDescriptorBufferRange] - [Getter][#maxSamplerDescriptorBufferRange()] - [Setter][#maxSamplerDescriptorBufferRange(long)] +/// ### maxResourceDescriptorBufferRange +/// [VarHandle][#VH_maxResourceDescriptorBufferRange] - [Getter][#maxResourceDescriptorBufferRange()] - [Setter][#maxResourceDescriptorBufferRange(long)] +/// ### samplerDescriptorBufferAddressSpaceSize +/// [VarHandle][#VH_samplerDescriptorBufferAddressSpaceSize] - [Getter][#samplerDescriptorBufferAddressSpaceSize()] - [Setter][#samplerDescriptorBufferAddressSpaceSize(long)] +/// ### resourceDescriptorBufferAddressSpaceSize +/// [VarHandle][#VH_resourceDescriptorBufferAddressSpaceSize] - [Getter][#resourceDescriptorBufferAddressSpaceSize()] - [Setter][#resourceDescriptorBufferAddressSpaceSize(long)] +/// ### descriptorBufferAddressSpaceSize +/// [VarHandle][#VH_descriptorBufferAddressSpaceSize] - [Getter][#descriptorBufferAddressSpaceSize()] - [Setter][#descriptorBufferAddressSpaceSize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDescriptorBufferPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 combinedImageSamplerDescriptorSingleArray; +/// VkBool32 bufferlessPushDescriptors; +/// VkBool32 allowSamplerImageViewPostSubmitCreation; +/// VkDeviceSize descriptorBufferOffsetAlignment; +/// uint32_t maxDescriptorBufferBindings; +/// uint32_t maxResourceDescriptorBufferBindings; +/// uint32_t maxSamplerDescriptorBufferBindings; +/// uint32_t maxEmbeddedImmutableSamplerBindings; +/// uint32_t maxEmbeddedImmutableSamplers; +/// size_t bufferCaptureReplayDescriptorDataSize; +/// size_t imageCaptureReplayDescriptorDataSize; +/// size_t imageViewCaptureReplayDescriptorDataSize; +/// size_t samplerCaptureReplayDescriptorDataSize; +/// size_t accelerationStructureCaptureReplayDescriptorDataSize; +/// size_t samplerDescriptorSize; +/// size_t combinedImageSamplerDescriptorSize; +/// size_t sampledImageDescriptorSize; +/// size_t storageImageDescriptorSize; +/// size_t uniformTexelBufferDescriptorSize; +/// size_t robustUniformTexelBufferDescriptorSize; +/// size_t storageTexelBufferDescriptorSize; +/// size_t robustStorageTexelBufferDescriptorSize; +/// size_t uniformBufferDescriptorSize; +/// size_t robustUniformBufferDescriptorSize; +/// size_t storageBufferDescriptorSize; +/// size_t robustStorageBufferDescriptorSize; +/// size_t inputAttachmentDescriptorSize; +/// size_t accelerationStructureDescriptorSize; +/// VkDeviceSize maxSamplerDescriptorBufferRange; +/// VkDeviceSize maxResourceDescriptorBufferRange; +/// VkDeviceSize samplerDescriptorBufferAddressSpaceSize; +/// VkDeviceSize resourceDescriptorBufferAddressSpaceSize; +/// VkDeviceSize descriptorBufferAddressSpaceSize; +/// } VkPhysicalDeviceDescriptorBufferPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceDescriptorBufferPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDescriptorBufferPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("combinedImageSamplerDescriptorSingleArray"), + ValueLayout.JAVA_INT.withName("bufferlessPushDescriptors"), + ValueLayout.JAVA_INT.withName("allowSamplerImageViewPostSubmitCreation"), + ValueLayout.JAVA_LONG.withName("descriptorBufferOffsetAlignment"), + ValueLayout.JAVA_INT.withName("maxDescriptorBufferBindings"), + ValueLayout.JAVA_INT.withName("maxResourceDescriptorBufferBindings"), + ValueLayout.JAVA_INT.withName("maxSamplerDescriptorBufferBindings"), + ValueLayout.JAVA_INT.withName("maxEmbeddedImmutableSamplerBindings"), + ValueLayout.JAVA_INT.withName("maxEmbeddedImmutableSamplers"), + ValueLayout.JAVA_LONG.withName("bufferCaptureReplayDescriptorDataSize"), + ValueLayout.JAVA_LONG.withName("imageCaptureReplayDescriptorDataSize"), + ValueLayout.JAVA_LONG.withName("imageViewCaptureReplayDescriptorDataSize"), + ValueLayout.JAVA_LONG.withName("samplerCaptureReplayDescriptorDataSize"), + ValueLayout.JAVA_LONG.withName("accelerationStructureCaptureReplayDescriptorDataSize"), + ValueLayout.JAVA_LONG.withName("samplerDescriptorSize"), + ValueLayout.JAVA_LONG.withName("combinedImageSamplerDescriptorSize"), + ValueLayout.JAVA_LONG.withName("sampledImageDescriptorSize"), + ValueLayout.JAVA_LONG.withName("storageImageDescriptorSize"), + ValueLayout.JAVA_LONG.withName("uniformTexelBufferDescriptorSize"), + ValueLayout.JAVA_LONG.withName("robustUniformTexelBufferDescriptorSize"), + ValueLayout.JAVA_LONG.withName("storageTexelBufferDescriptorSize"), + ValueLayout.JAVA_LONG.withName("robustStorageTexelBufferDescriptorSize"), + ValueLayout.JAVA_LONG.withName("uniformBufferDescriptorSize"), + ValueLayout.JAVA_LONG.withName("robustUniformBufferDescriptorSize"), + ValueLayout.JAVA_LONG.withName("storageBufferDescriptorSize"), + ValueLayout.JAVA_LONG.withName("robustStorageBufferDescriptorSize"), + ValueLayout.JAVA_LONG.withName("inputAttachmentDescriptorSize"), + ValueLayout.JAVA_LONG.withName("accelerationStructureDescriptorSize"), + ValueLayout.JAVA_LONG.withName("maxSamplerDescriptorBufferRange"), + ValueLayout.JAVA_LONG.withName("maxResourceDescriptorBufferRange"), + ValueLayout.JAVA_LONG.withName("samplerDescriptorBufferAddressSpaceSize"), + ValueLayout.JAVA_LONG.withName("resourceDescriptorBufferAddressSpaceSize"), + ValueLayout.JAVA_LONG.withName("descriptorBufferAddressSpaceSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `combinedImageSamplerDescriptorSingleArray` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_combinedImageSamplerDescriptorSingleArray = LAYOUT.arrayElementVarHandle(PathElement.groupElement("combinedImageSamplerDescriptorSingleArray")); + /// The [VarHandle] of `bufferlessPushDescriptors` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferlessPushDescriptors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferlessPushDescriptors")); + /// The [VarHandle] of `allowSamplerImageViewPostSubmitCreation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_allowSamplerImageViewPostSubmitCreation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allowSamplerImageViewPostSubmitCreation")); + /// The [VarHandle] of `descriptorBufferOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_descriptorBufferOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBufferOffsetAlignment")); + /// The [VarHandle] of `maxDescriptorBufferBindings` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorBufferBindings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorBufferBindings")); + /// The [VarHandle] of `maxResourceDescriptorBufferBindings` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxResourceDescriptorBufferBindings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxResourceDescriptorBufferBindings")); + /// The [VarHandle] of `maxSamplerDescriptorBufferBindings` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSamplerDescriptorBufferBindings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSamplerDescriptorBufferBindings")); + /// The [VarHandle] of `maxEmbeddedImmutableSamplerBindings` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxEmbeddedImmutableSamplerBindings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxEmbeddedImmutableSamplerBindings")); + /// The [VarHandle] of `maxEmbeddedImmutableSamplers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxEmbeddedImmutableSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxEmbeddedImmutableSamplers")); + /// The [VarHandle] of `bufferCaptureReplayDescriptorDataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_bufferCaptureReplayDescriptorDataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferCaptureReplayDescriptorDataSize")); + /// The [VarHandle] of `imageCaptureReplayDescriptorDataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_imageCaptureReplayDescriptorDataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageCaptureReplayDescriptorDataSize")); + /// The [VarHandle] of `imageViewCaptureReplayDescriptorDataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_imageViewCaptureReplayDescriptorDataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageViewCaptureReplayDescriptorDataSize")); + /// The [VarHandle] of `samplerCaptureReplayDescriptorDataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_samplerCaptureReplayDescriptorDataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerCaptureReplayDescriptorDataSize")); + /// The [VarHandle] of `accelerationStructureCaptureReplayDescriptorDataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_accelerationStructureCaptureReplayDescriptorDataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureCaptureReplayDescriptorDataSize")); + /// The [VarHandle] of `samplerDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_samplerDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerDescriptorSize")); + /// The [VarHandle] of `combinedImageSamplerDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_combinedImageSamplerDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("combinedImageSamplerDescriptorSize")); + /// The [VarHandle] of `sampledImageDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_sampledImageDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampledImageDescriptorSize")); + /// The [VarHandle] of `storageImageDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_storageImageDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageImageDescriptorSize")); + /// The [VarHandle] of `uniformTexelBufferDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_uniformTexelBufferDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformTexelBufferDescriptorSize")); + /// The [VarHandle] of `robustUniformTexelBufferDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_robustUniformTexelBufferDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustUniformTexelBufferDescriptorSize")); + /// The [VarHandle] of `storageTexelBufferDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_storageTexelBufferDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageTexelBufferDescriptorSize")); + /// The [VarHandle] of `robustStorageTexelBufferDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_robustStorageTexelBufferDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustStorageTexelBufferDescriptorSize")); + /// The [VarHandle] of `uniformBufferDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_uniformBufferDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformBufferDescriptorSize")); + /// The [VarHandle] of `robustUniformBufferDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_robustUniformBufferDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustUniformBufferDescriptorSize")); + /// The [VarHandle] of `storageBufferDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_storageBufferDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageBufferDescriptorSize")); + /// The [VarHandle] of `robustStorageBufferDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_robustStorageBufferDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustStorageBufferDescriptorSize")); + /// The [VarHandle] of `inputAttachmentDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_inputAttachmentDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inputAttachmentDescriptorSize")); + /// The [VarHandle] of `accelerationStructureDescriptorSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_accelerationStructureDescriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureDescriptorSize")); + /// The [VarHandle] of `maxSamplerDescriptorBufferRange` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxSamplerDescriptorBufferRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSamplerDescriptorBufferRange")); + /// The [VarHandle] of `maxResourceDescriptorBufferRange` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxResourceDescriptorBufferRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxResourceDescriptorBufferRange")); + /// The [VarHandle] of `samplerDescriptorBufferAddressSpaceSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_samplerDescriptorBufferAddressSpaceSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerDescriptorBufferAddressSpaceSize")); + /// The [VarHandle] of `resourceDescriptorBufferAddressSpaceSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_resourceDescriptorBufferAddressSpaceSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("resourceDescriptorBufferAddressSpaceSize")); + /// The [VarHandle] of `descriptorBufferAddressSpaceSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_descriptorBufferAddressSpaceSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBufferAddressSpaceSize")); + + /// Creates `VkPhysicalDeviceDescriptorBufferPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDescriptorBufferPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDescriptorBufferPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorBufferPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorBufferPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceDescriptorBufferPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorBufferPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorBufferPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDescriptorBufferPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorBufferPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorBufferPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDescriptorBufferPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDescriptorBufferPropertiesEXT` + public static VkPhysicalDeviceDescriptorBufferPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDescriptorBufferPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDescriptorBufferPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDescriptorBufferPropertiesEXT` + public static VkPhysicalDeviceDescriptorBufferPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDescriptorBufferPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `combinedImageSamplerDescriptorSingleArray` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_combinedImageSamplerDescriptorSingleArray(MemorySegment segment, long index) { return (int) VH_combinedImageSamplerDescriptorSingleArray.get(segment, 0L, index); } + /// {@return `combinedImageSamplerDescriptorSingleArray`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_combinedImageSamplerDescriptorSingleArray(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_combinedImageSamplerDescriptorSingleArray(segment, 0L); } + /// {@return `combinedImageSamplerDescriptorSingleArray` at the given index} + /// @param index the index + public @CType("VkBool32") int combinedImageSamplerDescriptorSingleArrayAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_combinedImageSamplerDescriptorSingleArray(this.segment(), index); } + /// {@return `combinedImageSamplerDescriptorSingleArray`} + public @CType("VkBool32") int combinedImageSamplerDescriptorSingleArray() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_combinedImageSamplerDescriptorSingleArray(this.segment()); } + /// Sets `combinedImageSamplerDescriptorSingleArray` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_combinedImageSamplerDescriptorSingleArray(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_combinedImageSamplerDescriptorSingleArray.set(segment, 0L, index, value); } + /// Sets `combinedImageSamplerDescriptorSingleArray` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_combinedImageSamplerDescriptorSingleArray(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_combinedImageSamplerDescriptorSingleArray(segment, 0L, value); } + /// Sets `combinedImageSamplerDescriptorSingleArray` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT combinedImageSamplerDescriptorSingleArrayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_combinedImageSamplerDescriptorSingleArray(this.segment(), index, value); return this; } + /// Sets `combinedImageSamplerDescriptorSingleArray` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT combinedImageSamplerDescriptorSingleArray(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_combinedImageSamplerDescriptorSingleArray(this.segment(), value); return this; } + + /// {@return `bufferlessPushDescriptors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bufferlessPushDescriptors(MemorySegment segment, long index) { return (int) VH_bufferlessPushDescriptors.get(segment, 0L, index); } + /// {@return `bufferlessPushDescriptors`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bufferlessPushDescriptors(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_bufferlessPushDescriptors(segment, 0L); } + /// {@return `bufferlessPushDescriptors` at the given index} + /// @param index the index + public @CType("VkBool32") int bufferlessPushDescriptorsAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_bufferlessPushDescriptors(this.segment(), index); } + /// {@return `bufferlessPushDescriptors`} + public @CType("VkBool32") int bufferlessPushDescriptors() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_bufferlessPushDescriptors(this.segment()); } + /// Sets `bufferlessPushDescriptors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferlessPushDescriptors(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bufferlessPushDescriptors.set(segment, 0L, index, value); } + /// Sets `bufferlessPushDescriptors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferlessPushDescriptors(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_bufferlessPushDescriptors(segment, 0L, value); } + /// Sets `bufferlessPushDescriptors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT bufferlessPushDescriptorsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_bufferlessPushDescriptors(this.segment(), index, value); return this; } + /// Sets `bufferlessPushDescriptors` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT bufferlessPushDescriptors(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_bufferlessPushDescriptors(this.segment(), value); return this; } + + /// {@return `allowSamplerImageViewPostSubmitCreation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_allowSamplerImageViewPostSubmitCreation(MemorySegment segment, long index) { return (int) VH_allowSamplerImageViewPostSubmitCreation.get(segment, 0L, index); } + /// {@return `allowSamplerImageViewPostSubmitCreation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_allowSamplerImageViewPostSubmitCreation(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_allowSamplerImageViewPostSubmitCreation(segment, 0L); } + /// {@return `allowSamplerImageViewPostSubmitCreation` at the given index} + /// @param index the index + public @CType("VkBool32") int allowSamplerImageViewPostSubmitCreationAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_allowSamplerImageViewPostSubmitCreation(this.segment(), index); } + /// {@return `allowSamplerImageViewPostSubmitCreation`} + public @CType("VkBool32") int allowSamplerImageViewPostSubmitCreation() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_allowSamplerImageViewPostSubmitCreation(this.segment()); } + /// Sets `allowSamplerImageViewPostSubmitCreation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allowSamplerImageViewPostSubmitCreation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_allowSamplerImageViewPostSubmitCreation.set(segment, 0L, index, value); } + /// Sets `allowSamplerImageViewPostSubmitCreation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allowSamplerImageViewPostSubmitCreation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_allowSamplerImageViewPostSubmitCreation(segment, 0L, value); } + /// Sets `allowSamplerImageViewPostSubmitCreation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT allowSamplerImageViewPostSubmitCreationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_allowSamplerImageViewPostSubmitCreation(this.segment(), index, value); return this; } + /// Sets `allowSamplerImageViewPostSubmitCreation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT allowSamplerImageViewPostSubmitCreation(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_allowSamplerImageViewPostSubmitCreation(this.segment(), value); return this; } + + /// {@return `descriptorBufferOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_descriptorBufferOffsetAlignment(MemorySegment segment, long index) { return (long) VH_descriptorBufferOffsetAlignment.get(segment, 0L, index); } + /// {@return `descriptorBufferOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_descriptorBufferOffsetAlignment(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_descriptorBufferOffsetAlignment(segment, 0L); } + /// {@return `descriptorBufferOffsetAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long descriptorBufferOffsetAlignmentAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_descriptorBufferOffsetAlignment(this.segment(), index); } + /// {@return `descriptorBufferOffsetAlignment`} + public @CType("VkDeviceSize") long descriptorBufferOffsetAlignment() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_descriptorBufferOffsetAlignment(this.segment()); } + /// Sets `descriptorBufferOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBufferOffsetAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_descriptorBufferOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `descriptorBufferOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBufferOffsetAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_descriptorBufferOffsetAlignment(segment, 0L, value); } + /// Sets `descriptorBufferOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT descriptorBufferOffsetAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_descriptorBufferOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `descriptorBufferOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT descriptorBufferOffsetAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_descriptorBufferOffsetAlignment(this.segment(), value); return this; } + + /// {@return `maxDescriptorBufferBindings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorBufferBindings(MemorySegment segment, long index) { return (int) VH_maxDescriptorBufferBindings.get(segment, 0L, index); } + /// {@return `maxDescriptorBufferBindings`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorBufferBindings(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxDescriptorBufferBindings(segment, 0L); } + /// {@return `maxDescriptorBufferBindings` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorBufferBindingsAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxDescriptorBufferBindings(this.segment(), index); } + /// {@return `maxDescriptorBufferBindings`} + public @CType("uint32_t") int maxDescriptorBufferBindings() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxDescriptorBufferBindings(this.segment()); } + /// Sets `maxDescriptorBufferBindings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorBufferBindings(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorBufferBindings.set(segment, 0L, index, value); } + /// Sets `maxDescriptorBufferBindings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorBufferBindings(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxDescriptorBufferBindings(segment, 0L, value); } + /// Sets `maxDescriptorBufferBindings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxDescriptorBufferBindingsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxDescriptorBufferBindings(this.segment(), index, value); return this; } + /// Sets `maxDescriptorBufferBindings` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxDescriptorBufferBindings(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxDescriptorBufferBindings(this.segment(), value); return this; } + + /// {@return `maxResourceDescriptorBufferBindings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxResourceDescriptorBufferBindings(MemorySegment segment, long index) { return (int) VH_maxResourceDescriptorBufferBindings.get(segment, 0L, index); } + /// {@return `maxResourceDescriptorBufferBindings`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxResourceDescriptorBufferBindings(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxResourceDescriptorBufferBindings(segment, 0L); } + /// {@return `maxResourceDescriptorBufferBindings` at the given index} + /// @param index the index + public @CType("uint32_t") int maxResourceDescriptorBufferBindingsAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxResourceDescriptorBufferBindings(this.segment(), index); } + /// {@return `maxResourceDescriptorBufferBindings`} + public @CType("uint32_t") int maxResourceDescriptorBufferBindings() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxResourceDescriptorBufferBindings(this.segment()); } + /// Sets `maxResourceDescriptorBufferBindings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxResourceDescriptorBufferBindings(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxResourceDescriptorBufferBindings.set(segment, 0L, index, value); } + /// Sets `maxResourceDescriptorBufferBindings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxResourceDescriptorBufferBindings(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxResourceDescriptorBufferBindings(segment, 0L, value); } + /// Sets `maxResourceDescriptorBufferBindings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxResourceDescriptorBufferBindingsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxResourceDescriptorBufferBindings(this.segment(), index, value); return this; } + /// Sets `maxResourceDescriptorBufferBindings` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxResourceDescriptorBufferBindings(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxResourceDescriptorBufferBindings(this.segment(), value); return this; } + + /// {@return `maxSamplerDescriptorBufferBindings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSamplerDescriptorBufferBindings(MemorySegment segment, long index) { return (int) VH_maxSamplerDescriptorBufferBindings.get(segment, 0L, index); } + /// {@return `maxSamplerDescriptorBufferBindings`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSamplerDescriptorBufferBindings(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxSamplerDescriptorBufferBindings(segment, 0L); } + /// {@return `maxSamplerDescriptorBufferBindings` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSamplerDescriptorBufferBindingsAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxSamplerDescriptorBufferBindings(this.segment(), index); } + /// {@return `maxSamplerDescriptorBufferBindings`} + public @CType("uint32_t") int maxSamplerDescriptorBufferBindings() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxSamplerDescriptorBufferBindings(this.segment()); } + /// Sets `maxSamplerDescriptorBufferBindings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSamplerDescriptorBufferBindings(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSamplerDescriptorBufferBindings.set(segment, 0L, index, value); } + /// Sets `maxSamplerDescriptorBufferBindings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSamplerDescriptorBufferBindings(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxSamplerDescriptorBufferBindings(segment, 0L, value); } + /// Sets `maxSamplerDescriptorBufferBindings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxSamplerDescriptorBufferBindingsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxSamplerDescriptorBufferBindings(this.segment(), index, value); return this; } + /// Sets `maxSamplerDescriptorBufferBindings` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxSamplerDescriptorBufferBindings(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxSamplerDescriptorBufferBindings(this.segment(), value); return this; } + + /// {@return `maxEmbeddedImmutableSamplerBindings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxEmbeddedImmutableSamplerBindings(MemorySegment segment, long index) { return (int) VH_maxEmbeddedImmutableSamplerBindings.get(segment, 0L, index); } + /// {@return `maxEmbeddedImmutableSamplerBindings`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxEmbeddedImmutableSamplerBindings(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxEmbeddedImmutableSamplerBindings(segment, 0L); } + /// {@return `maxEmbeddedImmutableSamplerBindings` at the given index} + /// @param index the index + public @CType("uint32_t") int maxEmbeddedImmutableSamplerBindingsAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxEmbeddedImmutableSamplerBindings(this.segment(), index); } + /// {@return `maxEmbeddedImmutableSamplerBindings`} + public @CType("uint32_t") int maxEmbeddedImmutableSamplerBindings() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxEmbeddedImmutableSamplerBindings(this.segment()); } + /// Sets `maxEmbeddedImmutableSamplerBindings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxEmbeddedImmutableSamplerBindings(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxEmbeddedImmutableSamplerBindings.set(segment, 0L, index, value); } + /// Sets `maxEmbeddedImmutableSamplerBindings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxEmbeddedImmutableSamplerBindings(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxEmbeddedImmutableSamplerBindings(segment, 0L, value); } + /// Sets `maxEmbeddedImmutableSamplerBindings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxEmbeddedImmutableSamplerBindingsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxEmbeddedImmutableSamplerBindings(this.segment(), index, value); return this; } + /// Sets `maxEmbeddedImmutableSamplerBindings` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxEmbeddedImmutableSamplerBindings(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxEmbeddedImmutableSamplerBindings(this.segment(), value); return this; } + + /// {@return `maxEmbeddedImmutableSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxEmbeddedImmutableSamplers(MemorySegment segment, long index) { return (int) VH_maxEmbeddedImmutableSamplers.get(segment, 0L, index); } + /// {@return `maxEmbeddedImmutableSamplers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxEmbeddedImmutableSamplers(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxEmbeddedImmutableSamplers(segment, 0L); } + /// {@return `maxEmbeddedImmutableSamplers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxEmbeddedImmutableSamplersAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxEmbeddedImmutableSamplers(this.segment(), index); } + /// {@return `maxEmbeddedImmutableSamplers`} + public @CType("uint32_t") int maxEmbeddedImmutableSamplers() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxEmbeddedImmutableSamplers(this.segment()); } + /// Sets `maxEmbeddedImmutableSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxEmbeddedImmutableSamplers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxEmbeddedImmutableSamplers.set(segment, 0L, index, value); } + /// Sets `maxEmbeddedImmutableSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxEmbeddedImmutableSamplers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxEmbeddedImmutableSamplers(segment, 0L, value); } + /// Sets `maxEmbeddedImmutableSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxEmbeddedImmutableSamplersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxEmbeddedImmutableSamplers(this.segment(), index, value); return this; } + /// Sets `maxEmbeddedImmutableSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxEmbeddedImmutableSamplers(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxEmbeddedImmutableSamplers(this.segment(), value); return this; } + + /// {@return `bufferCaptureReplayDescriptorDataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_bufferCaptureReplayDescriptorDataSize(MemorySegment segment, long index) { return (long) VH_bufferCaptureReplayDescriptorDataSize.get(segment, 0L, index); } + /// {@return `bufferCaptureReplayDescriptorDataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_bufferCaptureReplayDescriptorDataSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_bufferCaptureReplayDescriptorDataSize(segment, 0L); } + /// {@return `bufferCaptureReplayDescriptorDataSize` at the given index} + /// @param index the index + public @CType("size_t") long bufferCaptureReplayDescriptorDataSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_bufferCaptureReplayDescriptorDataSize(this.segment(), index); } + /// {@return `bufferCaptureReplayDescriptorDataSize`} + public @CType("size_t") long bufferCaptureReplayDescriptorDataSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_bufferCaptureReplayDescriptorDataSize(this.segment()); } + /// Sets `bufferCaptureReplayDescriptorDataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferCaptureReplayDescriptorDataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_bufferCaptureReplayDescriptorDataSize.set(segment, 0L, index, value); } + /// Sets `bufferCaptureReplayDescriptorDataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferCaptureReplayDescriptorDataSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_bufferCaptureReplayDescriptorDataSize(segment, 0L, value); } + /// Sets `bufferCaptureReplayDescriptorDataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT bufferCaptureReplayDescriptorDataSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_bufferCaptureReplayDescriptorDataSize(this.segment(), index, value); return this; } + /// Sets `bufferCaptureReplayDescriptorDataSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT bufferCaptureReplayDescriptorDataSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_bufferCaptureReplayDescriptorDataSize(this.segment(), value); return this; } + + /// {@return `imageCaptureReplayDescriptorDataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_imageCaptureReplayDescriptorDataSize(MemorySegment segment, long index) { return (long) VH_imageCaptureReplayDescriptorDataSize.get(segment, 0L, index); } + /// {@return `imageCaptureReplayDescriptorDataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_imageCaptureReplayDescriptorDataSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_imageCaptureReplayDescriptorDataSize(segment, 0L); } + /// {@return `imageCaptureReplayDescriptorDataSize` at the given index} + /// @param index the index + public @CType("size_t") long imageCaptureReplayDescriptorDataSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_imageCaptureReplayDescriptorDataSize(this.segment(), index); } + /// {@return `imageCaptureReplayDescriptorDataSize`} + public @CType("size_t") long imageCaptureReplayDescriptorDataSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_imageCaptureReplayDescriptorDataSize(this.segment()); } + /// Sets `imageCaptureReplayDescriptorDataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageCaptureReplayDescriptorDataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_imageCaptureReplayDescriptorDataSize.set(segment, 0L, index, value); } + /// Sets `imageCaptureReplayDescriptorDataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageCaptureReplayDescriptorDataSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_imageCaptureReplayDescriptorDataSize(segment, 0L, value); } + /// Sets `imageCaptureReplayDescriptorDataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT imageCaptureReplayDescriptorDataSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_imageCaptureReplayDescriptorDataSize(this.segment(), index, value); return this; } + /// Sets `imageCaptureReplayDescriptorDataSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT imageCaptureReplayDescriptorDataSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_imageCaptureReplayDescriptorDataSize(this.segment(), value); return this; } + + /// {@return `imageViewCaptureReplayDescriptorDataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_imageViewCaptureReplayDescriptorDataSize(MemorySegment segment, long index) { return (long) VH_imageViewCaptureReplayDescriptorDataSize.get(segment, 0L, index); } + /// {@return `imageViewCaptureReplayDescriptorDataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_imageViewCaptureReplayDescriptorDataSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_imageViewCaptureReplayDescriptorDataSize(segment, 0L); } + /// {@return `imageViewCaptureReplayDescriptorDataSize` at the given index} + /// @param index the index + public @CType("size_t") long imageViewCaptureReplayDescriptorDataSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_imageViewCaptureReplayDescriptorDataSize(this.segment(), index); } + /// {@return `imageViewCaptureReplayDescriptorDataSize`} + public @CType("size_t") long imageViewCaptureReplayDescriptorDataSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_imageViewCaptureReplayDescriptorDataSize(this.segment()); } + /// Sets `imageViewCaptureReplayDescriptorDataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageViewCaptureReplayDescriptorDataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_imageViewCaptureReplayDescriptorDataSize.set(segment, 0L, index, value); } + /// Sets `imageViewCaptureReplayDescriptorDataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageViewCaptureReplayDescriptorDataSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_imageViewCaptureReplayDescriptorDataSize(segment, 0L, value); } + /// Sets `imageViewCaptureReplayDescriptorDataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT imageViewCaptureReplayDescriptorDataSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_imageViewCaptureReplayDescriptorDataSize(this.segment(), index, value); return this; } + /// Sets `imageViewCaptureReplayDescriptorDataSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT imageViewCaptureReplayDescriptorDataSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_imageViewCaptureReplayDescriptorDataSize(this.segment(), value); return this; } + + /// {@return `samplerCaptureReplayDescriptorDataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_samplerCaptureReplayDescriptorDataSize(MemorySegment segment, long index) { return (long) VH_samplerCaptureReplayDescriptorDataSize.get(segment, 0L, index); } + /// {@return `samplerCaptureReplayDescriptorDataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_samplerCaptureReplayDescriptorDataSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_samplerCaptureReplayDescriptorDataSize(segment, 0L); } + /// {@return `samplerCaptureReplayDescriptorDataSize` at the given index} + /// @param index the index + public @CType("size_t") long samplerCaptureReplayDescriptorDataSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_samplerCaptureReplayDescriptorDataSize(this.segment(), index); } + /// {@return `samplerCaptureReplayDescriptorDataSize`} + public @CType("size_t") long samplerCaptureReplayDescriptorDataSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_samplerCaptureReplayDescriptorDataSize(this.segment()); } + /// Sets `samplerCaptureReplayDescriptorDataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerCaptureReplayDescriptorDataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_samplerCaptureReplayDescriptorDataSize.set(segment, 0L, index, value); } + /// Sets `samplerCaptureReplayDescriptorDataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerCaptureReplayDescriptorDataSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_samplerCaptureReplayDescriptorDataSize(segment, 0L, value); } + /// Sets `samplerCaptureReplayDescriptorDataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT samplerCaptureReplayDescriptorDataSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_samplerCaptureReplayDescriptorDataSize(this.segment(), index, value); return this; } + /// Sets `samplerCaptureReplayDescriptorDataSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT samplerCaptureReplayDescriptorDataSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_samplerCaptureReplayDescriptorDataSize(this.segment(), value); return this; } + + /// {@return `accelerationStructureCaptureReplayDescriptorDataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_accelerationStructureCaptureReplayDescriptorDataSize(MemorySegment segment, long index) { return (long) VH_accelerationStructureCaptureReplayDescriptorDataSize.get(segment, 0L, index); } + /// {@return `accelerationStructureCaptureReplayDescriptorDataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_accelerationStructureCaptureReplayDescriptorDataSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_accelerationStructureCaptureReplayDescriptorDataSize(segment, 0L); } + /// {@return `accelerationStructureCaptureReplayDescriptorDataSize` at the given index} + /// @param index the index + public @CType("size_t") long accelerationStructureCaptureReplayDescriptorDataSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_accelerationStructureCaptureReplayDescriptorDataSize(this.segment(), index); } + /// {@return `accelerationStructureCaptureReplayDescriptorDataSize`} + public @CType("size_t") long accelerationStructureCaptureReplayDescriptorDataSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_accelerationStructureCaptureReplayDescriptorDataSize(this.segment()); } + /// Sets `accelerationStructureCaptureReplayDescriptorDataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureCaptureReplayDescriptorDataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_accelerationStructureCaptureReplayDescriptorDataSize.set(segment, 0L, index, value); } + /// Sets `accelerationStructureCaptureReplayDescriptorDataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureCaptureReplayDescriptorDataSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_accelerationStructureCaptureReplayDescriptorDataSize(segment, 0L, value); } + /// Sets `accelerationStructureCaptureReplayDescriptorDataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT accelerationStructureCaptureReplayDescriptorDataSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_accelerationStructureCaptureReplayDescriptorDataSize(this.segment(), index, value); return this; } + /// Sets `accelerationStructureCaptureReplayDescriptorDataSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT accelerationStructureCaptureReplayDescriptorDataSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_accelerationStructureCaptureReplayDescriptorDataSize(this.segment(), value); return this; } + + /// {@return `samplerDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_samplerDescriptorSize(MemorySegment segment, long index) { return (long) VH_samplerDescriptorSize.get(segment, 0L, index); } + /// {@return `samplerDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_samplerDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_samplerDescriptorSize(segment, 0L); } + /// {@return `samplerDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long samplerDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_samplerDescriptorSize(this.segment(), index); } + /// {@return `samplerDescriptorSize`} + public @CType("size_t") long samplerDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_samplerDescriptorSize(this.segment()); } + /// Sets `samplerDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_samplerDescriptorSize.set(segment, 0L, index, value); } + /// Sets `samplerDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_samplerDescriptorSize(segment, 0L, value); } + /// Sets `samplerDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT samplerDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_samplerDescriptorSize(this.segment(), index, value); return this; } + /// Sets `samplerDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT samplerDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_samplerDescriptorSize(this.segment(), value); return this; } + + /// {@return `combinedImageSamplerDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_combinedImageSamplerDescriptorSize(MemorySegment segment, long index) { return (long) VH_combinedImageSamplerDescriptorSize.get(segment, 0L, index); } + /// {@return `combinedImageSamplerDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_combinedImageSamplerDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_combinedImageSamplerDescriptorSize(segment, 0L); } + /// {@return `combinedImageSamplerDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long combinedImageSamplerDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_combinedImageSamplerDescriptorSize(this.segment(), index); } + /// {@return `combinedImageSamplerDescriptorSize`} + public @CType("size_t") long combinedImageSamplerDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_combinedImageSamplerDescriptorSize(this.segment()); } + /// Sets `combinedImageSamplerDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_combinedImageSamplerDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_combinedImageSamplerDescriptorSize.set(segment, 0L, index, value); } + /// Sets `combinedImageSamplerDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_combinedImageSamplerDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_combinedImageSamplerDescriptorSize(segment, 0L, value); } + /// Sets `combinedImageSamplerDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT combinedImageSamplerDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_combinedImageSamplerDescriptorSize(this.segment(), index, value); return this; } + /// Sets `combinedImageSamplerDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT combinedImageSamplerDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_combinedImageSamplerDescriptorSize(this.segment(), value); return this; } + + /// {@return `sampledImageDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_sampledImageDescriptorSize(MemorySegment segment, long index) { return (long) VH_sampledImageDescriptorSize.get(segment, 0L, index); } + /// {@return `sampledImageDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_sampledImageDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_sampledImageDescriptorSize(segment, 0L); } + /// {@return `sampledImageDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long sampledImageDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_sampledImageDescriptorSize(this.segment(), index); } + /// {@return `sampledImageDescriptorSize`} + public @CType("size_t") long sampledImageDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_sampledImageDescriptorSize(this.segment()); } + /// Sets `sampledImageDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampledImageDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_sampledImageDescriptorSize.set(segment, 0L, index, value); } + /// Sets `sampledImageDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampledImageDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_sampledImageDescriptorSize(segment, 0L, value); } + /// Sets `sampledImageDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT sampledImageDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_sampledImageDescriptorSize(this.segment(), index, value); return this; } + /// Sets `sampledImageDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT sampledImageDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_sampledImageDescriptorSize(this.segment(), value); return this; } + + /// {@return `storageImageDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_storageImageDescriptorSize(MemorySegment segment, long index) { return (long) VH_storageImageDescriptorSize.get(segment, 0L, index); } + /// {@return `storageImageDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_storageImageDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_storageImageDescriptorSize(segment, 0L); } + /// {@return `storageImageDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long storageImageDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_storageImageDescriptorSize(this.segment(), index); } + /// {@return `storageImageDescriptorSize`} + public @CType("size_t") long storageImageDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_storageImageDescriptorSize(this.segment()); } + /// Sets `storageImageDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageImageDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_storageImageDescriptorSize.set(segment, 0L, index, value); } + /// Sets `storageImageDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageImageDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_storageImageDescriptorSize(segment, 0L, value); } + /// Sets `storageImageDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT storageImageDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_storageImageDescriptorSize(this.segment(), index, value); return this; } + /// Sets `storageImageDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT storageImageDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_storageImageDescriptorSize(this.segment(), value); return this; } + + /// {@return `uniformTexelBufferDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_uniformTexelBufferDescriptorSize(MemorySegment segment, long index) { return (long) VH_uniformTexelBufferDescriptorSize.get(segment, 0L, index); } + /// {@return `uniformTexelBufferDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_uniformTexelBufferDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_uniformTexelBufferDescriptorSize(segment, 0L); } + /// {@return `uniformTexelBufferDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long uniformTexelBufferDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_uniformTexelBufferDescriptorSize(this.segment(), index); } + /// {@return `uniformTexelBufferDescriptorSize`} + public @CType("size_t") long uniformTexelBufferDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_uniformTexelBufferDescriptorSize(this.segment()); } + /// Sets `uniformTexelBufferDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformTexelBufferDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_uniformTexelBufferDescriptorSize.set(segment, 0L, index, value); } + /// Sets `uniformTexelBufferDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformTexelBufferDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_uniformTexelBufferDescriptorSize(segment, 0L, value); } + /// Sets `uniformTexelBufferDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT uniformTexelBufferDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_uniformTexelBufferDescriptorSize(this.segment(), index, value); return this; } + /// Sets `uniformTexelBufferDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT uniformTexelBufferDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_uniformTexelBufferDescriptorSize(this.segment(), value); return this; } + + /// {@return `robustUniformTexelBufferDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_robustUniformTexelBufferDescriptorSize(MemorySegment segment, long index) { return (long) VH_robustUniformTexelBufferDescriptorSize.get(segment, 0L, index); } + /// {@return `robustUniformTexelBufferDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_robustUniformTexelBufferDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustUniformTexelBufferDescriptorSize(segment, 0L); } + /// {@return `robustUniformTexelBufferDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long robustUniformTexelBufferDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustUniformTexelBufferDescriptorSize(this.segment(), index); } + /// {@return `robustUniformTexelBufferDescriptorSize`} + public @CType("size_t") long robustUniformTexelBufferDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustUniformTexelBufferDescriptorSize(this.segment()); } + /// Sets `robustUniformTexelBufferDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustUniformTexelBufferDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_robustUniformTexelBufferDescriptorSize.set(segment, 0L, index, value); } + /// Sets `robustUniformTexelBufferDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustUniformTexelBufferDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustUniformTexelBufferDescriptorSize(segment, 0L, value); } + /// Sets `robustUniformTexelBufferDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT robustUniformTexelBufferDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustUniformTexelBufferDescriptorSize(this.segment(), index, value); return this; } + /// Sets `robustUniformTexelBufferDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT robustUniformTexelBufferDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustUniformTexelBufferDescriptorSize(this.segment(), value); return this; } + + /// {@return `storageTexelBufferDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_storageTexelBufferDescriptorSize(MemorySegment segment, long index) { return (long) VH_storageTexelBufferDescriptorSize.get(segment, 0L, index); } + /// {@return `storageTexelBufferDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_storageTexelBufferDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_storageTexelBufferDescriptorSize(segment, 0L); } + /// {@return `storageTexelBufferDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long storageTexelBufferDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_storageTexelBufferDescriptorSize(this.segment(), index); } + /// {@return `storageTexelBufferDescriptorSize`} + public @CType("size_t") long storageTexelBufferDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_storageTexelBufferDescriptorSize(this.segment()); } + /// Sets `storageTexelBufferDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageTexelBufferDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_storageTexelBufferDescriptorSize.set(segment, 0L, index, value); } + /// Sets `storageTexelBufferDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageTexelBufferDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_storageTexelBufferDescriptorSize(segment, 0L, value); } + /// Sets `storageTexelBufferDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT storageTexelBufferDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_storageTexelBufferDescriptorSize(this.segment(), index, value); return this; } + /// Sets `storageTexelBufferDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT storageTexelBufferDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_storageTexelBufferDescriptorSize(this.segment(), value); return this; } + + /// {@return `robustStorageTexelBufferDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_robustStorageTexelBufferDescriptorSize(MemorySegment segment, long index) { return (long) VH_robustStorageTexelBufferDescriptorSize.get(segment, 0L, index); } + /// {@return `robustStorageTexelBufferDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_robustStorageTexelBufferDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustStorageTexelBufferDescriptorSize(segment, 0L); } + /// {@return `robustStorageTexelBufferDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long robustStorageTexelBufferDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustStorageTexelBufferDescriptorSize(this.segment(), index); } + /// {@return `robustStorageTexelBufferDescriptorSize`} + public @CType("size_t") long robustStorageTexelBufferDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustStorageTexelBufferDescriptorSize(this.segment()); } + /// Sets `robustStorageTexelBufferDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustStorageTexelBufferDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_robustStorageTexelBufferDescriptorSize.set(segment, 0L, index, value); } + /// Sets `robustStorageTexelBufferDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustStorageTexelBufferDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustStorageTexelBufferDescriptorSize(segment, 0L, value); } + /// Sets `robustStorageTexelBufferDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT robustStorageTexelBufferDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustStorageTexelBufferDescriptorSize(this.segment(), index, value); return this; } + /// Sets `robustStorageTexelBufferDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT robustStorageTexelBufferDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustStorageTexelBufferDescriptorSize(this.segment(), value); return this; } + + /// {@return `uniformBufferDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_uniformBufferDescriptorSize(MemorySegment segment, long index) { return (long) VH_uniformBufferDescriptorSize.get(segment, 0L, index); } + /// {@return `uniformBufferDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_uniformBufferDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_uniformBufferDescriptorSize(segment, 0L); } + /// {@return `uniformBufferDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long uniformBufferDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_uniformBufferDescriptorSize(this.segment(), index); } + /// {@return `uniformBufferDescriptorSize`} + public @CType("size_t") long uniformBufferDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_uniformBufferDescriptorSize(this.segment()); } + /// Sets `uniformBufferDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformBufferDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_uniformBufferDescriptorSize.set(segment, 0L, index, value); } + /// Sets `uniformBufferDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformBufferDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_uniformBufferDescriptorSize(segment, 0L, value); } + /// Sets `uniformBufferDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT uniformBufferDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_uniformBufferDescriptorSize(this.segment(), index, value); return this; } + /// Sets `uniformBufferDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT uniformBufferDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_uniformBufferDescriptorSize(this.segment(), value); return this; } + + /// {@return `robustUniformBufferDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_robustUniformBufferDescriptorSize(MemorySegment segment, long index) { return (long) VH_robustUniformBufferDescriptorSize.get(segment, 0L, index); } + /// {@return `robustUniformBufferDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_robustUniformBufferDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustUniformBufferDescriptorSize(segment, 0L); } + /// {@return `robustUniformBufferDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long robustUniformBufferDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustUniformBufferDescriptorSize(this.segment(), index); } + /// {@return `robustUniformBufferDescriptorSize`} + public @CType("size_t") long robustUniformBufferDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustUniformBufferDescriptorSize(this.segment()); } + /// Sets `robustUniformBufferDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustUniformBufferDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_robustUniformBufferDescriptorSize.set(segment, 0L, index, value); } + /// Sets `robustUniformBufferDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustUniformBufferDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustUniformBufferDescriptorSize(segment, 0L, value); } + /// Sets `robustUniformBufferDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT robustUniformBufferDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustUniformBufferDescriptorSize(this.segment(), index, value); return this; } + /// Sets `robustUniformBufferDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT robustUniformBufferDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustUniformBufferDescriptorSize(this.segment(), value); return this; } + + /// {@return `storageBufferDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_storageBufferDescriptorSize(MemorySegment segment, long index) { return (long) VH_storageBufferDescriptorSize.get(segment, 0L, index); } + /// {@return `storageBufferDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_storageBufferDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_storageBufferDescriptorSize(segment, 0L); } + /// {@return `storageBufferDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long storageBufferDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_storageBufferDescriptorSize(this.segment(), index); } + /// {@return `storageBufferDescriptorSize`} + public @CType("size_t") long storageBufferDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_storageBufferDescriptorSize(this.segment()); } + /// Sets `storageBufferDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageBufferDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_storageBufferDescriptorSize.set(segment, 0L, index, value); } + /// Sets `storageBufferDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageBufferDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_storageBufferDescriptorSize(segment, 0L, value); } + /// Sets `storageBufferDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT storageBufferDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_storageBufferDescriptorSize(this.segment(), index, value); return this; } + /// Sets `storageBufferDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT storageBufferDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_storageBufferDescriptorSize(this.segment(), value); return this; } + + /// {@return `robustStorageBufferDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_robustStorageBufferDescriptorSize(MemorySegment segment, long index) { return (long) VH_robustStorageBufferDescriptorSize.get(segment, 0L, index); } + /// {@return `robustStorageBufferDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_robustStorageBufferDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustStorageBufferDescriptorSize(segment, 0L); } + /// {@return `robustStorageBufferDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long robustStorageBufferDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustStorageBufferDescriptorSize(this.segment(), index); } + /// {@return `robustStorageBufferDescriptorSize`} + public @CType("size_t") long robustStorageBufferDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_robustStorageBufferDescriptorSize(this.segment()); } + /// Sets `robustStorageBufferDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustStorageBufferDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_robustStorageBufferDescriptorSize.set(segment, 0L, index, value); } + /// Sets `robustStorageBufferDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustStorageBufferDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustStorageBufferDescriptorSize(segment, 0L, value); } + /// Sets `robustStorageBufferDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT robustStorageBufferDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustStorageBufferDescriptorSize(this.segment(), index, value); return this; } + /// Sets `robustStorageBufferDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT robustStorageBufferDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_robustStorageBufferDescriptorSize(this.segment(), value); return this; } + + /// {@return `inputAttachmentDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_inputAttachmentDescriptorSize(MemorySegment segment, long index) { return (long) VH_inputAttachmentDescriptorSize.get(segment, 0L, index); } + /// {@return `inputAttachmentDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_inputAttachmentDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_inputAttachmentDescriptorSize(segment, 0L); } + /// {@return `inputAttachmentDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long inputAttachmentDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_inputAttachmentDescriptorSize(this.segment(), index); } + /// {@return `inputAttachmentDescriptorSize`} + public @CType("size_t") long inputAttachmentDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_inputAttachmentDescriptorSize(this.segment()); } + /// Sets `inputAttachmentDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inputAttachmentDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_inputAttachmentDescriptorSize.set(segment, 0L, index, value); } + /// Sets `inputAttachmentDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inputAttachmentDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_inputAttachmentDescriptorSize(segment, 0L, value); } + /// Sets `inputAttachmentDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT inputAttachmentDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_inputAttachmentDescriptorSize(this.segment(), index, value); return this; } + /// Sets `inputAttachmentDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT inputAttachmentDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_inputAttachmentDescriptorSize(this.segment(), value); return this; } + + /// {@return `accelerationStructureDescriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_accelerationStructureDescriptorSize(MemorySegment segment, long index) { return (long) VH_accelerationStructureDescriptorSize.get(segment, 0L, index); } + /// {@return `accelerationStructureDescriptorSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_accelerationStructureDescriptorSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_accelerationStructureDescriptorSize(segment, 0L); } + /// {@return `accelerationStructureDescriptorSize` at the given index} + /// @param index the index + public @CType("size_t") long accelerationStructureDescriptorSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_accelerationStructureDescriptorSize(this.segment(), index); } + /// {@return `accelerationStructureDescriptorSize`} + public @CType("size_t") long accelerationStructureDescriptorSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_accelerationStructureDescriptorSize(this.segment()); } + /// Sets `accelerationStructureDescriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureDescriptorSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_accelerationStructureDescriptorSize.set(segment, 0L, index, value); } + /// Sets `accelerationStructureDescriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureDescriptorSize(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_accelerationStructureDescriptorSize(segment, 0L, value); } + /// Sets `accelerationStructureDescriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT accelerationStructureDescriptorSizeAt(long index, @CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_accelerationStructureDescriptorSize(this.segment(), index, value); return this; } + /// Sets `accelerationStructureDescriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT accelerationStructureDescriptorSize(@CType("size_t") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_accelerationStructureDescriptorSize(this.segment(), value); return this; } + + /// {@return `maxSamplerDescriptorBufferRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_maxSamplerDescriptorBufferRange(MemorySegment segment, long index) { return (long) VH_maxSamplerDescriptorBufferRange.get(segment, 0L, index); } + /// {@return `maxSamplerDescriptorBufferRange`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_maxSamplerDescriptorBufferRange(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxSamplerDescriptorBufferRange(segment, 0L); } + /// {@return `maxSamplerDescriptorBufferRange` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long maxSamplerDescriptorBufferRangeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxSamplerDescriptorBufferRange(this.segment(), index); } + /// {@return `maxSamplerDescriptorBufferRange`} + public @CType("VkDeviceSize") long maxSamplerDescriptorBufferRange() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxSamplerDescriptorBufferRange(this.segment()); } + /// Sets `maxSamplerDescriptorBufferRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSamplerDescriptorBufferRange(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_maxSamplerDescriptorBufferRange.set(segment, 0L, index, value); } + /// Sets `maxSamplerDescriptorBufferRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSamplerDescriptorBufferRange(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxSamplerDescriptorBufferRange(segment, 0L, value); } + /// Sets `maxSamplerDescriptorBufferRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxSamplerDescriptorBufferRangeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxSamplerDescriptorBufferRange(this.segment(), index, value); return this; } + /// Sets `maxSamplerDescriptorBufferRange` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxSamplerDescriptorBufferRange(@CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxSamplerDescriptorBufferRange(this.segment(), value); return this; } + + /// {@return `maxResourceDescriptorBufferRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_maxResourceDescriptorBufferRange(MemorySegment segment, long index) { return (long) VH_maxResourceDescriptorBufferRange.get(segment, 0L, index); } + /// {@return `maxResourceDescriptorBufferRange`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_maxResourceDescriptorBufferRange(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxResourceDescriptorBufferRange(segment, 0L); } + /// {@return `maxResourceDescriptorBufferRange` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long maxResourceDescriptorBufferRangeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxResourceDescriptorBufferRange(this.segment(), index); } + /// {@return `maxResourceDescriptorBufferRange`} + public @CType("VkDeviceSize") long maxResourceDescriptorBufferRange() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_maxResourceDescriptorBufferRange(this.segment()); } + /// Sets `maxResourceDescriptorBufferRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxResourceDescriptorBufferRange(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_maxResourceDescriptorBufferRange.set(segment, 0L, index, value); } + /// Sets `maxResourceDescriptorBufferRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxResourceDescriptorBufferRange(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxResourceDescriptorBufferRange(segment, 0L, value); } + /// Sets `maxResourceDescriptorBufferRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxResourceDescriptorBufferRangeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxResourceDescriptorBufferRange(this.segment(), index, value); return this; } + /// Sets `maxResourceDescriptorBufferRange` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT maxResourceDescriptorBufferRange(@CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_maxResourceDescriptorBufferRange(this.segment(), value); return this; } + + /// {@return `samplerDescriptorBufferAddressSpaceSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_samplerDescriptorBufferAddressSpaceSize(MemorySegment segment, long index) { return (long) VH_samplerDescriptorBufferAddressSpaceSize.get(segment, 0L, index); } + /// {@return `samplerDescriptorBufferAddressSpaceSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_samplerDescriptorBufferAddressSpaceSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_samplerDescriptorBufferAddressSpaceSize(segment, 0L); } + /// {@return `samplerDescriptorBufferAddressSpaceSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long samplerDescriptorBufferAddressSpaceSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_samplerDescriptorBufferAddressSpaceSize(this.segment(), index); } + /// {@return `samplerDescriptorBufferAddressSpaceSize`} + public @CType("VkDeviceSize") long samplerDescriptorBufferAddressSpaceSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_samplerDescriptorBufferAddressSpaceSize(this.segment()); } + /// Sets `samplerDescriptorBufferAddressSpaceSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerDescriptorBufferAddressSpaceSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_samplerDescriptorBufferAddressSpaceSize.set(segment, 0L, index, value); } + /// Sets `samplerDescriptorBufferAddressSpaceSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerDescriptorBufferAddressSpaceSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_samplerDescriptorBufferAddressSpaceSize(segment, 0L, value); } + /// Sets `samplerDescriptorBufferAddressSpaceSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT samplerDescriptorBufferAddressSpaceSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_samplerDescriptorBufferAddressSpaceSize(this.segment(), index, value); return this; } + /// Sets `samplerDescriptorBufferAddressSpaceSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT samplerDescriptorBufferAddressSpaceSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_samplerDescriptorBufferAddressSpaceSize(this.segment(), value); return this; } + + /// {@return `resourceDescriptorBufferAddressSpaceSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_resourceDescriptorBufferAddressSpaceSize(MemorySegment segment, long index) { return (long) VH_resourceDescriptorBufferAddressSpaceSize.get(segment, 0L, index); } + /// {@return `resourceDescriptorBufferAddressSpaceSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_resourceDescriptorBufferAddressSpaceSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_resourceDescriptorBufferAddressSpaceSize(segment, 0L); } + /// {@return `resourceDescriptorBufferAddressSpaceSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long resourceDescriptorBufferAddressSpaceSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_resourceDescriptorBufferAddressSpaceSize(this.segment(), index); } + /// {@return `resourceDescriptorBufferAddressSpaceSize`} + public @CType("VkDeviceSize") long resourceDescriptorBufferAddressSpaceSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_resourceDescriptorBufferAddressSpaceSize(this.segment()); } + /// Sets `resourceDescriptorBufferAddressSpaceSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_resourceDescriptorBufferAddressSpaceSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_resourceDescriptorBufferAddressSpaceSize.set(segment, 0L, index, value); } + /// Sets `resourceDescriptorBufferAddressSpaceSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_resourceDescriptorBufferAddressSpaceSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_resourceDescriptorBufferAddressSpaceSize(segment, 0L, value); } + /// Sets `resourceDescriptorBufferAddressSpaceSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT resourceDescriptorBufferAddressSpaceSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_resourceDescriptorBufferAddressSpaceSize(this.segment(), index, value); return this; } + /// Sets `resourceDescriptorBufferAddressSpaceSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT resourceDescriptorBufferAddressSpaceSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_resourceDescriptorBufferAddressSpaceSize(this.segment(), value); return this; } + + /// {@return `descriptorBufferAddressSpaceSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_descriptorBufferAddressSpaceSize(MemorySegment segment, long index) { return (long) VH_descriptorBufferAddressSpaceSize.get(segment, 0L, index); } + /// {@return `descriptorBufferAddressSpaceSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_descriptorBufferAddressSpaceSize(MemorySegment segment) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_descriptorBufferAddressSpaceSize(segment, 0L); } + /// {@return `descriptorBufferAddressSpaceSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long descriptorBufferAddressSpaceSizeAt(long index) { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_descriptorBufferAddressSpaceSize(this.segment(), index); } + /// {@return `descriptorBufferAddressSpaceSize`} + public @CType("VkDeviceSize") long descriptorBufferAddressSpaceSize() { return VkPhysicalDeviceDescriptorBufferPropertiesEXT.get_descriptorBufferAddressSpaceSize(this.segment()); } + /// Sets `descriptorBufferAddressSpaceSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBufferAddressSpaceSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_descriptorBufferAddressSpaceSize.set(segment, 0L, index, value); } + /// Sets `descriptorBufferAddressSpaceSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBufferAddressSpaceSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_descriptorBufferAddressSpaceSize(segment, 0L, value); } + /// Sets `descriptorBufferAddressSpaceSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT descriptorBufferAddressSpaceSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_descriptorBufferAddressSpaceSize(this.segment(), index, value); return this; } + /// Sets `descriptorBufferAddressSpaceSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorBufferPropertiesEXT descriptorBufferAddressSpaceSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceDescriptorBufferPropertiesEXT.set_descriptorBufferAddressSpaceSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.java new file mode 100644 index 00000000..9f8263c4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceGeneratedCommands +/// [VarHandle][#VH_deviceGeneratedCommands] - [Getter][#deviceGeneratedCommands()] - [Setter][#deviceGeneratedCommands(int)] +/// ### dynamicGeneratedPipelineLayout +/// [VarHandle][#VH_dynamicGeneratedPipelineLayout] - [Getter][#dynamicGeneratedPipelineLayout()] - [Setter][#dynamicGeneratedPipelineLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 deviceGeneratedCommands; +/// VkBool32 dynamicGeneratedPipelineLayout; +/// } VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceGeneratedCommands"), + ValueLayout.JAVA_INT.withName("dynamicGeneratedPipelineLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceGeneratedCommands` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceGeneratedCommands = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceGeneratedCommands")); + /// The [VarHandle] of `dynamicGeneratedPipelineLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicGeneratedPipelineLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicGeneratedPipelineLayout")); + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT` + public static VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT` + public static VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceGeneratedCommands` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceGeneratedCommands(MemorySegment segment, long index) { return (int) VH_deviceGeneratedCommands.get(segment, 0L, index); } + /// {@return `deviceGeneratedCommands`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceGeneratedCommands(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_deviceGeneratedCommands(segment, 0L); } + /// {@return `deviceGeneratedCommands` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceGeneratedCommandsAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_deviceGeneratedCommands(this.segment(), index); } + /// {@return `deviceGeneratedCommands`} + public @CType("VkBool32") int deviceGeneratedCommands() { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_deviceGeneratedCommands(this.segment()); } + /// Sets `deviceGeneratedCommands` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceGeneratedCommands(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceGeneratedCommands.set(segment, 0L, index, value); } + /// Sets `deviceGeneratedCommands` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceGeneratedCommands(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_deviceGeneratedCommands(segment, 0L, value); } + /// Sets `deviceGeneratedCommands` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT deviceGeneratedCommandsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_deviceGeneratedCommands(this.segment(), index, value); return this; } + /// Sets `deviceGeneratedCommands` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT deviceGeneratedCommands(@CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_deviceGeneratedCommands(this.segment(), value); return this; } + + /// {@return `dynamicGeneratedPipelineLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dynamicGeneratedPipelineLayout(MemorySegment segment, long index) { return (int) VH_dynamicGeneratedPipelineLayout.get(segment, 0L, index); } + /// {@return `dynamicGeneratedPipelineLayout`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dynamicGeneratedPipelineLayout(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_dynamicGeneratedPipelineLayout(segment, 0L); } + /// {@return `dynamicGeneratedPipelineLayout` at the given index} + /// @param index the index + public @CType("VkBool32") int dynamicGeneratedPipelineLayoutAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_dynamicGeneratedPipelineLayout(this.segment(), index); } + /// {@return `dynamicGeneratedPipelineLayout`} + public @CType("VkBool32") int dynamicGeneratedPipelineLayout() { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.get_dynamicGeneratedPipelineLayout(this.segment()); } + /// Sets `dynamicGeneratedPipelineLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicGeneratedPipelineLayout(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dynamicGeneratedPipelineLayout.set(segment, 0L, index, value); } + /// Sets `dynamicGeneratedPipelineLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicGeneratedPipelineLayout(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_dynamicGeneratedPipelineLayout(segment, 0L, value); } + /// Sets `dynamicGeneratedPipelineLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT dynamicGeneratedPipelineLayoutAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_dynamicGeneratedPipelineLayout(this.segment(), index, value); return this; } + /// Sets `dynamicGeneratedPipelineLayout` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT dynamicGeneratedPipelineLayout(@CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.set_dynamicGeneratedPipelineLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.java new file mode 100644 index 00000000..2608e15e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxIndirectPipelineCount +/// [VarHandle][#VH_maxIndirectPipelineCount] - [Getter][#maxIndirectPipelineCount()] - [Setter][#maxIndirectPipelineCount(int)] +/// ### maxIndirectShaderObjectCount +/// [VarHandle][#VH_maxIndirectShaderObjectCount] - [Getter][#maxIndirectShaderObjectCount()] - [Setter][#maxIndirectShaderObjectCount(int)] +/// ### maxIndirectSequenceCount +/// [VarHandle][#VH_maxIndirectSequenceCount] - [Getter][#maxIndirectSequenceCount()] - [Setter][#maxIndirectSequenceCount(int)] +/// ### maxIndirectCommandsTokenCount +/// [VarHandle][#VH_maxIndirectCommandsTokenCount] - [Getter][#maxIndirectCommandsTokenCount()] - [Setter][#maxIndirectCommandsTokenCount(int)] +/// ### maxIndirectCommandsTokenOffset +/// [VarHandle][#VH_maxIndirectCommandsTokenOffset] - [Getter][#maxIndirectCommandsTokenOffset()] - [Setter][#maxIndirectCommandsTokenOffset(int)] +/// ### maxIndirectCommandsIndirectStride +/// [VarHandle][#VH_maxIndirectCommandsIndirectStride] - [Getter][#maxIndirectCommandsIndirectStride()] - [Setter][#maxIndirectCommandsIndirectStride(int)] +/// ### supportedIndirectCommandsInputModes +/// [VarHandle][#VH_supportedIndirectCommandsInputModes] - [Getter][#supportedIndirectCommandsInputModes()] - [Setter][#supportedIndirectCommandsInputModes(int)] +/// ### supportedIndirectCommandsShaderStages +/// [VarHandle][#VH_supportedIndirectCommandsShaderStages] - [Getter][#supportedIndirectCommandsShaderStages()] - [Setter][#supportedIndirectCommandsShaderStages(int)] +/// ### supportedIndirectCommandsShaderStagesPipelineBinding +/// [VarHandle][#VH_supportedIndirectCommandsShaderStagesPipelineBinding] - [Getter][#supportedIndirectCommandsShaderStagesPipelineBinding()] - [Setter][#supportedIndirectCommandsShaderStagesPipelineBinding(int)] +/// ### supportedIndirectCommandsShaderStagesShaderBinding +/// [VarHandle][#VH_supportedIndirectCommandsShaderStagesShaderBinding] - [Getter][#supportedIndirectCommandsShaderStagesShaderBinding()] - [Setter][#supportedIndirectCommandsShaderStagesShaderBinding(int)] +/// ### deviceGeneratedCommandsTransformFeedback +/// [VarHandle][#VH_deviceGeneratedCommandsTransformFeedback] - [Getter][#deviceGeneratedCommandsTransformFeedback()] - [Setter][#deviceGeneratedCommandsTransformFeedback(int)] +/// ### deviceGeneratedCommandsMultiDrawIndirectCount +/// [VarHandle][#VH_deviceGeneratedCommandsMultiDrawIndirectCount] - [Getter][#deviceGeneratedCommandsMultiDrawIndirectCount()] - [Setter][#deviceGeneratedCommandsMultiDrawIndirectCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxIndirectPipelineCount; +/// uint32_t maxIndirectShaderObjectCount; +/// uint32_t maxIndirectSequenceCount; +/// uint32_t maxIndirectCommandsTokenCount; +/// uint32_t maxIndirectCommandsTokenOffset; +/// uint32_t maxIndirectCommandsIndirectStride; +/// VkIndirectCommandsInputModeFlagsEXT supportedIndirectCommandsInputModes; +/// VkShaderStageFlags supportedIndirectCommandsShaderStages; +/// VkShaderStageFlags supportedIndirectCommandsShaderStagesPipelineBinding; +/// VkShaderStageFlags supportedIndirectCommandsShaderStagesShaderBinding; +/// VkBool32 deviceGeneratedCommandsTransformFeedback; +/// VkBool32 deviceGeneratedCommandsMultiDrawIndirectCount; +/// } VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxIndirectPipelineCount"), + ValueLayout.JAVA_INT.withName("maxIndirectShaderObjectCount"), + ValueLayout.JAVA_INT.withName("maxIndirectSequenceCount"), + ValueLayout.JAVA_INT.withName("maxIndirectCommandsTokenCount"), + ValueLayout.JAVA_INT.withName("maxIndirectCommandsTokenOffset"), + ValueLayout.JAVA_INT.withName("maxIndirectCommandsIndirectStride"), + ValueLayout.JAVA_INT.withName("supportedIndirectCommandsInputModes"), + ValueLayout.JAVA_INT.withName("supportedIndirectCommandsShaderStages"), + ValueLayout.JAVA_INT.withName("supportedIndirectCommandsShaderStagesPipelineBinding"), + ValueLayout.JAVA_INT.withName("supportedIndirectCommandsShaderStagesShaderBinding"), + ValueLayout.JAVA_INT.withName("deviceGeneratedCommandsTransformFeedback"), + ValueLayout.JAVA_INT.withName("deviceGeneratedCommandsMultiDrawIndirectCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxIndirectPipelineCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectPipelineCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectPipelineCount")); + /// The [VarHandle] of `maxIndirectShaderObjectCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectShaderObjectCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectShaderObjectCount")); + /// The [VarHandle] of `maxIndirectSequenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectSequenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectSequenceCount")); + /// The [VarHandle] of `maxIndirectCommandsTokenCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectCommandsTokenCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectCommandsTokenCount")); + /// The [VarHandle] of `maxIndirectCommandsTokenOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectCommandsTokenOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectCommandsTokenOffset")); + /// The [VarHandle] of `maxIndirectCommandsIndirectStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectCommandsIndirectStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectCommandsIndirectStride")); + /// The [VarHandle] of `supportedIndirectCommandsInputModes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedIndirectCommandsInputModes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedIndirectCommandsInputModes")); + /// The [VarHandle] of `supportedIndirectCommandsShaderStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedIndirectCommandsShaderStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedIndirectCommandsShaderStages")); + /// The [VarHandle] of `supportedIndirectCommandsShaderStagesPipelineBinding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedIndirectCommandsShaderStagesPipelineBinding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedIndirectCommandsShaderStagesPipelineBinding")); + /// The [VarHandle] of `supportedIndirectCommandsShaderStagesShaderBinding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedIndirectCommandsShaderStagesShaderBinding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedIndirectCommandsShaderStagesShaderBinding")); + /// The [VarHandle] of `deviceGeneratedCommandsTransformFeedback` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceGeneratedCommandsTransformFeedback = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceGeneratedCommandsTransformFeedback")); + /// The [VarHandle] of `deviceGeneratedCommandsMultiDrawIndirectCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceGeneratedCommandsMultiDrawIndirectCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceGeneratedCommandsMultiDrawIndirectCount")); + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT` + public static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT` + public static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `maxIndirectPipelineCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectPipelineCount(MemorySegment segment, long index) { return (int) VH_maxIndirectPipelineCount.get(segment, 0L, index); } + /// {@return `maxIndirectPipelineCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectPipelineCount(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectPipelineCount(segment, 0L); } + /// {@return `maxIndirectPipelineCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectPipelineCountAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectPipelineCount(this.segment(), index); } + /// {@return `maxIndirectPipelineCount`} + public @CType("uint32_t") int maxIndirectPipelineCount() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectPipelineCount(this.segment()); } + /// Sets `maxIndirectPipelineCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectPipelineCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectPipelineCount.set(segment, 0L, index, value); } + /// Sets `maxIndirectPipelineCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectPipelineCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectPipelineCount(segment, 0L, value); } + /// Sets `maxIndirectPipelineCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectPipelineCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectPipelineCount(this.segment(), index, value); return this; } + /// Sets `maxIndirectPipelineCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectPipelineCount(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectPipelineCount(this.segment(), value); return this; } + + /// {@return `maxIndirectShaderObjectCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectShaderObjectCount(MemorySegment segment, long index) { return (int) VH_maxIndirectShaderObjectCount.get(segment, 0L, index); } + /// {@return `maxIndirectShaderObjectCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectShaderObjectCount(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectShaderObjectCount(segment, 0L); } + /// {@return `maxIndirectShaderObjectCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectShaderObjectCountAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectShaderObjectCount(this.segment(), index); } + /// {@return `maxIndirectShaderObjectCount`} + public @CType("uint32_t") int maxIndirectShaderObjectCount() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectShaderObjectCount(this.segment()); } + /// Sets `maxIndirectShaderObjectCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectShaderObjectCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectShaderObjectCount.set(segment, 0L, index, value); } + /// Sets `maxIndirectShaderObjectCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectShaderObjectCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectShaderObjectCount(segment, 0L, value); } + /// Sets `maxIndirectShaderObjectCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectShaderObjectCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectShaderObjectCount(this.segment(), index, value); return this; } + /// Sets `maxIndirectShaderObjectCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectShaderObjectCount(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectShaderObjectCount(this.segment(), value); return this; } + + /// {@return `maxIndirectSequenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectSequenceCount(MemorySegment segment, long index) { return (int) VH_maxIndirectSequenceCount.get(segment, 0L, index); } + /// {@return `maxIndirectSequenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectSequenceCount(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectSequenceCount(segment, 0L); } + /// {@return `maxIndirectSequenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectSequenceCountAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectSequenceCount(this.segment(), index); } + /// {@return `maxIndirectSequenceCount`} + public @CType("uint32_t") int maxIndirectSequenceCount() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectSequenceCount(this.segment()); } + /// Sets `maxIndirectSequenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectSequenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectSequenceCount.set(segment, 0L, index, value); } + /// Sets `maxIndirectSequenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectSequenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectSequenceCount(segment, 0L, value); } + /// Sets `maxIndirectSequenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectSequenceCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectSequenceCount(this.segment(), index, value); return this; } + /// Sets `maxIndirectSequenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectSequenceCount(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectSequenceCount(this.segment(), value); return this; } + + /// {@return `maxIndirectCommandsTokenCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectCommandsTokenCount(MemorySegment segment, long index) { return (int) VH_maxIndirectCommandsTokenCount.get(segment, 0L, index); } + /// {@return `maxIndirectCommandsTokenCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectCommandsTokenCount(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectCommandsTokenCount(segment, 0L); } + /// {@return `maxIndirectCommandsTokenCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectCommandsTokenCountAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectCommandsTokenCount(this.segment(), index); } + /// {@return `maxIndirectCommandsTokenCount`} + public @CType("uint32_t") int maxIndirectCommandsTokenCount() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectCommandsTokenCount(this.segment()); } + /// Sets `maxIndirectCommandsTokenCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectCommandsTokenCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectCommandsTokenCount.set(segment, 0L, index, value); } + /// Sets `maxIndirectCommandsTokenCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectCommandsTokenCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectCommandsTokenCount(segment, 0L, value); } + /// Sets `maxIndirectCommandsTokenCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectCommandsTokenCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectCommandsTokenCount(this.segment(), index, value); return this; } + /// Sets `maxIndirectCommandsTokenCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectCommandsTokenCount(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectCommandsTokenCount(this.segment(), value); return this; } + + /// {@return `maxIndirectCommandsTokenOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectCommandsTokenOffset(MemorySegment segment, long index) { return (int) VH_maxIndirectCommandsTokenOffset.get(segment, 0L, index); } + /// {@return `maxIndirectCommandsTokenOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectCommandsTokenOffset(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectCommandsTokenOffset(segment, 0L); } + /// {@return `maxIndirectCommandsTokenOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectCommandsTokenOffsetAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectCommandsTokenOffset(this.segment(), index); } + /// {@return `maxIndirectCommandsTokenOffset`} + public @CType("uint32_t") int maxIndirectCommandsTokenOffset() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectCommandsTokenOffset(this.segment()); } + /// Sets `maxIndirectCommandsTokenOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectCommandsTokenOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectCommandsTokenOffset.set(segment, 0L, index, value); } + /// Sets `maxIndirectCommandsTokenOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectCommandsTokenOffset(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectCommandsTokenOffset(segment, 0L, value); } + /// Sets `maxIndirectCommandsTokenOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectCommandsTokenOffsetAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectCommandsTokenOffset(this.segment(), index, value); return this; } + /// Sets `maxIndirectCommandsTokenOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectCommandsTokenOffset(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectCommandsTokenOffset(this.segment(), value); return this; } + + /// {@return `maxIndirectCommandsIndirectStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectCommandsIndirectStride(MemorySegment segment, long index) { return (int) VH_maxIndirectCommandsIndirectStride.get(segment, 0L, index); } + /// {@return `maxIndirectCommandsIndirectStride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectCommandsIndirectStride(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectCommandsIndirectStride(segment, 0L); } + /// {@return `maxIndirectCommandsIndirectStride` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectCommandsIndirectStrideAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectCommandsIndirectStride(this.segment(), index); } + /// {@return `maxIndirectCommandsIndirectStride`} + public @CType("uint32_t") int maxIndirectCommandsIndirectStride() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_maxIndirectCommandsIndirectStride(this.segment()); } + /// Sets `maxIndirectCommandsIndirectStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectCommandsIndirectStride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectCommandsIndirectStride.set(segment, 0L, index, value); } + /// Sets `maxIndirectCommandsIndirectStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectCommandsIndirectStride(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectCommandsIndirectStride(segment, 0L, value); } + /// Sets `maxIndirectCommandsIndirectStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectCommandsIndirectStrideAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectCommandsIndirectStride(this.segment(), index, value); return this; } + /// Sets `maxIndirectCommandsIndirectStride` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT maxIndirectCommandsIndirectStride(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_maxIndirectCommandsIndirectStride(this.segment(), value); return this; } + + /// {@return `supportedIndirectCommandsInputModes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsInputModeFlagsEXT") int get_supportedIndirectCommandsInputModes(MemorySegment segment, long index) { return (int) VH_supportedIndirectCommandsInputModes.get(segment, 0L, index); } + /// {@return `supportedIndirectCommandsInputModes`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsInputModeFlagsEXT") int get_supportedIndirectCommandsInputModes(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsInputModes(segment, 0L); } + /// {@return `supportedIndirectCommandsInputModes` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsInputModeFlagsEXT") int supportedIndirectCommandsInputModesAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsInputModes(this.segment(), index); } + /// {@return `supportedIndirectCommandsInputModes`} + public @CType("VkIndirectCommandsInputModeFlagsEXT") int supportedIndirectCommandsInputModes() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsInputModes(this.segment()); } + /// Sets `supportedIndirectCommandsInputModes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedIndirectCommandsInputModes(MemorySegment segment, long index, @CType("VkIndirectCommandsInputModeFlagsEXT") int value) { VH_supportedIndirectCommandsInputModes.set(segment, 0L, index, value); } + /// Sets `supportedIndirectCommandsInputModes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedIndirectCommandsInputModes(MemorySegment segment, @CType("VkIndirectCommandsInputModeFlagsEXT") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsInputModes(segment, 0L, value); } + /// Sets `supportedIndirectCommandsInputModes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT supportedIndirectCommandsInputModesAt(long index, @CType("VkIndirectCommandsInputModeFlagsEXT") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsInputModes(this.segment(), index, value); return this; } + /// Sets `supportedIndirectCommandsInputModes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT supportedIndirectCommandsInputModes(@CType("VkIndirectCommandsInputModeFlagsEXT") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsInputModes(this.segment(), value); return this; } + + /// {@return `supportedIndirectCommandsShaderStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_supportedIndirectCommandsShaderStages(MemorySegment segment, long index) { return (int) VH_supportedIndirectCommandsShaderStages.get(segment, 0L, index); } + /// {@return `supportedIndirectCommandsShaderStages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_supportedIndirectCommandsShaderStages(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsShaderStages(segment, 0L); } + /// {@return `supportedIndirectCommandsShaderStages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int supportedIndirectCommandsShaderStagesAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsShaderStages(this.segment(), index); } + /// {@return `supportedIndirectCommandsShaderStages`} + public @CType("VkShaderStageFlags") int supportedIndirectCommandsShaderStages() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsShaderStages(this.segment()); } + /// Sets `supportedIndirectCommandsShaderStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedIndirectCommandsShaderStages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_supportedIndirectCommandsShaderStages.set(segment, 0L, index, value); } + /// Sets `supportedIndirectCommandsShaderStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedIndirectCommandsShaderStages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsShaderStages(segment, 0L, value); } + /// Sets `supportedIndirectCommandsShaderStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT supportedIndirectCommandsShaderStagesAt(long index, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsShaderStages(this.segment(), index, value); return this; } + /// Sets `supportedIndirectCommandsShaderStages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT supportedIndirectCommandsShaderStages(@CType("VkShaderStageFlags") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsShaderStages(this.segment(), value); return this; } + + /// {@return `supportedIndirectCommandsShaderStagesPipelineBinding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_supportedIndirectCommandsShaderStagesPipelineBinding(MemorySegment segment, long index) { return (int) VH_supportedIndirectCommandsShaderStagesPipelineBinding.get(segment, 0L, index); } + /// {@return `supportedIndirectCommandsShaderStagesPipelineBinding`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_supportedIndirectCommandsShaderStagesPipelineBinding(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsShaderStagesPipelineBinding(segment, 0L); } + /// {@return `supportedIndirectCommandsShaderStagesPipelineBinding` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int supportedIndirectCommandsShaderStagesPipelineBindingAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsShaderStagesPipelineBinding(this.segment(), index); } + /// {@return `supportedIndirectCommandsShaderStagesPipelineBinding`} + public @CType("VkShaderStageFlags") int supportedIndirectCommandsShaderStagesPipelineBinding() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsShaderStagesPipelineBinding(this.segment()); } + /// Sets `supportedIndirectCommandsShaderStagesPipelineBinding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedIndirectCommandsShaderStagesPipelineBinding(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_supportedIndirectCommandsShaderStagesPipelineBinding.set(segment, 0L, index, value); } + /// Sets `supportedIndirectCommandsShaderStagesPipelineBinding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedIndirectCommandsShaderStagesPipelineBinding(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsShaderStagesPipelineBinding(segment, 0L, value); } + /// Sets `supportedIndirectCommandsShaderStagesPipelineBinding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT supportedIndirectCommandsShaderStagesPipelineBindingAt(long index, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsShaderStagesPipelineBinding(this.segment(), index, value); return this; } + /// Sets `supportedIndirectCommandsShaderStagesPipelineBinding` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT supportedIndirectCommandsShaderStagesPipelineBinding(@CType("VkShaderStageFlags") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsShaderStagesPipelineBinding(this.segment(), value); return this; } + + /// {@return `supportedIndirectCommandsShaderStagesShaderBinding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_supportedIndirectCommandsShaderStagesShaderBinding(MemorySegment segment, long index) { return (int) VH_supportedIndirectCommandsShaderStagesShaderBinding.get(segment, 0L, index); } + /// {@return `supportedIndirectCommandsShaderStagesShaderBinding`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_supportedIndirectCommandsShaderStagesShaderBinding(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsShaderStagesShaderBinding(segment, 0L); } + /// {@return `supportedIndirectCommandsShaderStagesShaderBinding` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int supportedIndirectCommandsShaderStagesShaderBindingAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsShaderStagesShaderBinding(this.segment(), index); } + /// {@return `supportedIndirectCommandsShaderStagesShaderBinding`} + public @CType("VkShaderStageFlags") int supportedIndirectCommandsShaderStagesShaderBinding() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_supportedIndirectCommandsShaderStagesShaderBinding(this.segment()); } + /// Sets `supportedIndirectCommandsShaderStagesShaderBinding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedIndirectCommandsShaderStagesShaderBinding(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_supportedIndirectCommandsShaderStagesShaderBinding.set(segment, 0L, index, value); } + /// Sets `supportedIndirectCommandsShaderStagesShaderBinding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedIndirectCommandsShaderStagesShaderBinding(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsShaderStagesShaderBinding(segment, 0L, value); } + /// Sets `supportedIndirectCommandsShaderStagesShaderBinding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT supportedIndirectCommandsShaderStagesShaderBindingAt(long index, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsShaderStagesShaderBinding(this.segment(), index, value); return this; } + /// Sets `supportedIndirectCommandsShaderStagesShaderBinding` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT supportedIndirectCommandsShaderStagesShaderBinding(@CType("VkShaderStageFlags") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_supportedIndirectCommandsShaderStagesShaderBinding(this.segment(), value); return this; } + + /// {@return `deviceGeneratedCommandsTransformFeedback` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceGeneratedCommandsTransformFeedback(MemorySegment segment, long index) { return (int) VH_deviceGeneratedCommandsTransformFeedback.get(segment, 0L, index); } + /// {@return `deviceGeneratedCommandsTransformFeedback`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceGeneratedCommandsTransformFeedback(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_deviceGeneratedCommandsTransformFeedback(segment, 0L); } + /// {@return `deviceGeneratedCommandsTransformFeedback` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceGeneratedCommandsTransformFeedbackAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_deviceGeneratedCommandsTransformFeedback(this.segment(), index); } + /// {@return `deviceGeneratedCommandsTransformFeedback`} + public @CType("VkBool32") int deviceGeneratedCommandsTransformFeedback() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_deviceGeneratedCommandsTransformFeedback(this.segment()); } + /// Sets `deviceGeneratedCommandsTransformFeedback` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceGeneratedCommandsTransformFeedback(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceGeneratedCommandsTransformFeedback.set(segment, 0L, index, value); } + /// Sets `deviceGeneratedCommandsTransformFeedback` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceGeneratedCommandsTransformFeedback(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_deviceGeneratedCommandsTransformFeedback(segment, 0L, value); } + /// Sets `deviceGeneratedCommandsTransformFeedback` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT deviceGeneratedCommandsTransformFeedbackAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_deviceGeneratedCommandsTransformFeedback(this.segment(), index, value); return this; } + /// Sets `deviceGeneratedCommandsTransformFeedback` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT deviceGeneratedCommandsTransformFeedback(@CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_deviceGeneratedCommandsTransformFeedback(this.segment(), value); return this; } + + /// {@return `deviceGeneratedCommandsMultiDrawIndirectCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceGeneratedCommandsMultiDrawIndirectCount(MemorySegment segment, long index) { return (int) VH_deviceGeneratedCommandsMultiDrawIndirectCount.get(segment, 0L, index); } + /// {@return `deviceGeneratedCommandsMultiDrawIndirectCount`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceGeneratedCommandsMultiDrawIndirectCount(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_deviceGeneratedCommandsMultiDrawIndirectCount(segment, 0L); } + /// {@return `deviceGeneratedCommandsMultiDrawIndirectCount` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceGeneratedCommandsMultiDrawIndirectCountAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_deviceGeneratedCommandsMultiDrawIndirectCount(this.segment(), index); } + /// {@return `deviceGeneratedCommandsMultiDrawIndirectCount`} + public @CType("VkBool32") int deviceGeneratedCommandsMultiDrawIndirectCount() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.get_deviceGeneratedCommandsMultiDrawIndirectCount(this.segment()); } + /// Sets `deviceGeneratedCommandsMultiDrawIndirectCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceGeneratedCommandsMultiDrawIndirectCount(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceGeneratedCommandsMultiDrawIndirectCount.set(segment, 0L, index, value); } + /// Sets `deviceGeneratedCommandsMultiDrawIndirectCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceGeneratedCommandsMultiDrawIndirectCount(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_deviceGeneratedCommandsMultiDrawIndirectCount(segment, 0L, value); } + /// Sets `deviceGeneratedCommandsMultiDrawIndirectCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT deviceGeneratedCommandsMultiDrawIndirectCountAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_deviceGeneratedCommandsMultiDrawIndirectCount(this.segment(), index, value); return this; } + /// Sets `deviceGeneratedCommandsMultiDrawIndirectCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT deviceGeneratedCommandsMultiDrawIndirectCount(@CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.set_deviceGeneratedCommandsMultiDrawIndirectCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.java new file mode 100644 index 00000000..ae1fb89e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceMemoryReport +/// [VarHandle][#VH_deviceMemoryReport] - [Getter][#deviceMemoryReport()] - [Setter][#deviceMemoryReport(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDeviceMemoryReportFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 deviceMemoryReport; +/// } VkPhysicalDeviceDeviceMemoryReportFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceDeviceMemoryReportFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceMemoryReport") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceMemoryReport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceMemoryReport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceMemoryReport")); + + /// Creates `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDeviceMemoryReportFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceMemoryReportFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceMemoryReportFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceMemoryReportFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceMemoryReportFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceMemoryReportFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceMemoryReportFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT` + public static VkPhysicalDeviceDeviceMemoryReportFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDeviceMemoryReportFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDeviceMemoryReportFeaturesEXT` + public static VkPhysicalDeviceDeviceMemoryReportFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDeviceMemoryReportFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceMemoryReportFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceMemoryReportFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceMemoryReportFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceMemoryReportFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceMemoryReport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceMemoryReport(MemorySegment segment, long index) { return (int) VH_deviceMemoryReport.get(segment, 0L, index); } + /// {@return `deviceMemoryReport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceMemoryReport(MemorySegment segment) { return VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.get_deviceMemoryReport(segment, 0L); } + /// {@return `deviceMemoryReport` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceMemoryReportAt(long index) { return VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.get_deviceMemoryReport(this.segment(), index); } + /// {@return `deviceMemoryReport`} + public @CType("VkBool32") int deviceMemoryReport() { return VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.get_deviceMemoryReport(this.segment()); } + /// Sets `deviceMemoryReport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceMemoryReport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceMemoryReport.set(segment, 0L, index, value); } + /// Sets `deviceMemoryReport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceMemoryReport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.set_deviceMemoryReport(segment, 0L, value); } + /// Sets `deviceMemoryReport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceMemoryReportFeaturesEXT deviceMemoryReportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.set_deviceMemoryReport(this.segment(), index, value); return this; } + /// Sets `deviceMemoryReport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceMemoryReportFeaturesEXT deviceMemoryReport(@CType("VkBool32") int value) { VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.set_deviceMemoryReport(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDiscardRectanglePropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDiscardRectanglePropertiesEXT.java new file mode 100644 index 00000000..a9318c15 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDiscardRectanglePropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxDiscardRectangles +/// [VarHandle][#VH_maxDiscardRectangles] - [Getter][#maxDiscardRectangles()] - [Setter][#maxDiscardRectangles(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDiscardRectanglePropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxDiscardRectangles; +/// } VkPhysicalDeviceDiscardRectanglePropertiesEXT; +/// ``` +public final class VkPhysicalDeviceDiscardRectanglePropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDiscardRectanglePropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxDiscardRectangles") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxDiscardRectangles` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDiscardRectangles = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDiscardRectangles")); + + /// Creates `VkPhysicalDeviceDiscardRectanglePropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDiscardRectanglePropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDiscardRectanglePropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDiscardRectanglePropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDiscardRectanglePropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceDiscardRectanglePropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDiscardRectanglePropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDiscardRectanglePropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDiscardRectanglePropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDiscardRectanglePropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDiscardRectanglePropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDiscardRectanglePropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDiscardRectanglePropertiesEXT` + public static VkPhysicalDeviceDiscardRectanglePropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDiscardRectanglePropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDiscardRectanglePropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDiscardRectanglePropertiesEXT` + public static VkPhysicalDeviceDiscardRectanglePropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDiscardRectanglePropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDiscardRectanglePropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDiscardRectanglePropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDiscardRectanglePropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDiscardRectanglePropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiscardRectanglePropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDiscardRectanglePropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiscardRectanglePropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDiscardRectanglePropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDiscardRectanglePropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDiscardRectanglePropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDiscardRectanglePropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDiscardRectanglePropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiscardRectanglePropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDiscardRectanglePropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiscardRectanglePropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDiscardRectanglePropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `maxDiscardRectangles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDiscardRectangles(MemorySegment segment, long index) { return (int) VH_maxDiscardRectangles.get(segment, 0L, index); } + /// {@return `maxDiscardRectangles`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDiscardRectangles(MemorySegment segment) { return VkPhysicalDeviceDiscardRectanglePropertiesEXT.get_maxDiscardRectangles(segment, 0L); } + /// {@return `maxDiscardRectangles` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDiscardRectanglesAt(long index) { return VkPhysicalDeviceDiscardRectanglePropertiesEXT.get_maxDiscardRectangles(this.segment(), index); } + /// {@return `maxDiscardRectangles`} + public @CType("uint32_t") int maxDiscardRectangles() { return VkPhysicalDeviceDiscardRectanglePropertiesEXT.get_maxDiscardRectangles(this.segment()); } + /// Sets `maxDiscardRectangles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDiscardRectangles(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDiscardRectangles.set(segment, 0L, index, value); } + /// Sets `maxDiscardRectangles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDiscardRectangles(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDiscardRectanglePropertiesEXT.set_maxDiscardRectangles(segment, 0L, value); } + /// Sets `maxDiscardRectangles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiscardRectanglePropertiesEXT maxDiscardRectanglesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDiscardRectanglePropertiesEXT.set_maxDiscardRectangles(this.segment(), index, value); return this; } + /// Sets `maxDiscardRectangles` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiscardRectanglePropertiesEXT maxDiscardRectangles(@CType("uint32_t") int value) { VkPhysicalDeviceDiscardRectanglePropertiesEXT.set_maxDiscardRectangles(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDrmPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDrmPropertiesEXT.java new file mode 100644 index 00000000..d684b7d9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDrmPropertiesEXT.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### hasPrimary +/// [VarHandle][#VH_hasPrimary] - [Getter][#hasPrimary()] - [Setter][#hasPrimary(int)] +/// ### hasRender +/// [VarHandle][#VH_hasRender] - [Getter][#hasRender()] - [Setter][#hasRender(int)] +/// ### primaryMajor +/// [VarHandle][#VH_primaryMajor] - [Getter][#primaryMajor()] - [Setter][#primaryMajor(long)] +/// ### primaryMinor +/// [VarHandle][#VH_primaryMinor] - [Getter][#primaryMinor()] - [Setter][#primaryMinor(long)] +/// ### renderMajor +/// [VarHandle][#VH_renderMajor] - [Getter][#renderMajor()] - [Setter][#renderMajor(long)] +/// ### renderMinor +/// [VarHandle][#VH_renderMinor] - [Getter][#renderMinor()] - [Setter][#renderMinor(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDrmPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 hasPrimary; +/// VkBool32 hasRender; +/// int64_t primaryMajor; +/// int64_t primaryMinor; +/// int64_t renderMajor; +/// int64_t renderMinor; +/// } VkPhysicalDeviceDrmPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceDrmPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDrmPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("hasPrimary"), + ValueLayout.JAVA_INT.withName("hasRender"), + ValueLayout.JAVA_LONG.withName("primaryMajor"), + ValueLayout.JAVA_LONG.withName("primaryMinor"), + ValueLayout.JAVA_LONG.withName("renderMajor"), + ValueLayout.JAVA_LONG.withName("renderMinor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `hasPrimary` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hasPrimary = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hasPrimary")); + /// The [VarHandle] of `hasRender` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hasRender = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hasRender")); + /// The [VarHandle] of `primaryMajor` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_primaryMajor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primaryMajor")); + /// The [VarHandle] of `primaryMinor` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_primaryMinor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primaryMinor")); + /// The [VarHandle] of `renderMajor` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_renderMajor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderMajor")); + /// The [VarHandle] of `renderMinor` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_renderMinor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderMinor")); + + /// Creates `VkPhysicalDeviceDrmPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDrmPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDrmPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDrmPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDrmPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceDrmPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDrmPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDrmPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDrmPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDrmPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDrmPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDrmPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDrmPropertiesEXT` + public static VkPhysicalDeviceDrmPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDrmPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDrmPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDrmPropertiesEXT` + public static VkPhysicalDeviceDrmPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDrmPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDrmPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDrmPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDrmPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDrmPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDrmPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDrmPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDrmPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDrmPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDrmPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDrmPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDrmPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDrmPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `hasPrimary` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hasPrimary(MemorySegment segment, long index) { return (int) VH_hasPrimary.get(segment, 0L, index); } + /// {@return `hasPrimary`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hasPrimary(MemorySegment segment) { return VkPhysicalDeviceDrmPropertiesEXT.get_hasPrimary(segment, 0L); } + /// {@return `hasPrimary` at the given index} + /// @param index the index + public @CType("VkBool32") int hasPrimaryAt(long index) { return VkPhysicalDeviceDrmPropertiesEXT.get_hasPrimary(this.segment(), index); } + /// {@return `hasPrimary`} + public @CType("VkBool32") int hasPrimary() { return VkPhysicalDeviceDrmPropertiesEXT.get_hasPrimary(this.segment()); } + /// Sets `hasPrimary` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hasPrimary(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hasPrimary.set(segment, 0L, index, value); } + /// Sets `hasPrimary` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hasPrimary(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDrmPropertiesEXT.set_hasPrimary(segment, 0L, value); } + /// Sets `hasPrimary` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT hasPrimaryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDrmPropertiesEXT.set_hasPrimary(this.segment(), index, value); return this; } + /// Sets `hasPrimary` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT hasPrimary(@CType("VkBool32") int value) { VkPhysicalDeviceDrmPropertiesEXT.set_hasPrimary(this.segment(), value); return this; } + + /// {@return `hasRender` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hasRender(MemorySegment segment, long index) { return (int) VH_hasRender.get(segment, 0L, index); } + /// {@return `hasRender`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hasRender(MemorySegment segment) { return VkPhysicalDeviceDrmPropertiesEXT.get_hasRender(segment, 0L); } + /// {@return `hasRender` at the given index} + /// @param index the index + public @CType("VkBool32") int hasRenderAt(long index) { return VkPhysicalDeviceDrmPropertiesEXT.get_hasRender(this.segment(), index); } + /// {@return `hasRender`} + public @CType("VkBool32") int hasRender() { return VkPhysicalDeviceDrmPropertiesEXT.get_hasRender(this.segment()); } + /// Sets `hasRender` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hasRender(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hasRender.set(segment, 0L, index, value); } + /// Sets `hasRender` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hasRender(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDrmPropertiesEXT.set_hasRender(segment, 0L, value); } + /// Sets `hasRender` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT hasRenderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDrmPropertiesEXT.set_hasRender(this.segment(), index, value); return this; } + /// Sets `hasRender` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT hasRender(@CType("VkBool32") int value) { VkPhysicalDeviceDrmPropertiesEXT.set_hasRender(this.segment(), value); return this; } + + /// {@return `primaryMajor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int64_t") long get_primaryMajor(MemorySegment segment, long index) { return (long) VH_primaryMajor.get(segment, 0L, index); } + /// {@return `primaryMajor`} + /// @param segment the segment of the struct + public static @CType("int64_t") long get_primaryMajor(MemorySegment segment) { return VkPhysicalDeviceDrmPropertiesEXT.get_primaryMajor(segment, 0L); } + /// {@return `primaryMajor` at the given index} + /// @param index the index + public @CType("int64_t") long primaryMajorAt(long index) { return VkPhysicalDeviceDrmPropertiesEXT.get_primaryMajor(this.segment(), index); } + /// {@return `primaryMajor`} + public @CType("int64_t") long primaryMajor() { return VkPhysicalDeviceDrmPropertiesEXT.get_primaryMajor(this.segment()); } + /// Sets `primaryMajor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primaryMajor(MemorySegment segment, long index, @CType("int64_t") long value) { VH_primaryMajor.set(segment, 0L, index, value); } + /// Sets `primaryMajor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primaryMajor(MemorySegment segment, @CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_primaryMajor(segment, 0L, value); } + /// Sets `primaryMajor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT primaryMajorAt(long index, @CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_primaryMajor(this.segment(), index, value); return this; } + /// Sets `primaryMajor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT primaryMajor(@CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_primaryMajor(this.segment(), value); return this; } + + /// {@return `primaryMinor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int64_t") long get_primaryMinor(MemorySegment segment, long index) { return (long) VH_primaryMinor.get(segment, 0L, index); } + /// {@return `primaryMinor`} + /// @param segment the segment of the struct + public static @CType("int64_t") long get_primaryMinor(MemorySegment segment) { return VkPhysicalDeviceDrmPropertiesEXT.get_primaryMinor(segment, 0L); } + /// {@return `primaryMinor` at the given index} + /// @param index the index + public @CType("int64_t") long primaryMinorAt(long index) { return VkPhysicalDeviceDrmPropertiesEXT.get_primaryMinor(this.segment(), index); } + /// {@return `primaryMinor`} + public @CType("int64_t") long primaryMinor() { return VkPhysicalDeviceDrmPropertiesEXT.get_primaryMinor(this.segment()); } + /// Sets `primaryMinor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primaryMinor(MemorySegment segment, long index, @CType("int64_t") long value) { VH_primaryMinor.set(segment, 0L, index, value); } + /// Sets `primaryMinor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primaryMinor(MemorySegment segment, @CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_primaryMinor(segment, 0L, value); } + /// Sets `primaryMinor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT primaryMinorAt(long index, @CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_primaryMinor(this.segment(), index, value); return this; } + /// Sets `primaryMinor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT primaryMinor(@CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_primaryMinor(this.segment(), value); return this; } + + /// {@return `renderMajor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int64_t") long get_renderMajor(MemorySegment segment, long index) { return (long) VH_renderMajor.get(segment, 0L, index); } + /// {@return `renderMajor`} + /// @param segment the segment of the struct + public static @CType("int64_t") long get_renderMajor(MemorySegment segment) { return VkPhysicalDeviceDrmPropertiesEXT.get_renderMajor(segment, 0L); } + /// {@return `renderMajor` at the given index} + /// @param index the index + public @CType("int64_t") long renderMajorAt(long index) { return VkPhysicalDeviceDrmPropertiesEXT.get_renderMajor(this.segment(), index); } + /// {@return `renderMajor`} + public @CType("int64_t") long renderMajor() { return VkPhysicalDeviceDrmPropertiesEXT.get_renderMajor(this.segment()); } + /// Sets `renderMajor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderMajor(MemorySegment segment, long index, @CType("int64_t") long value) { VH_renderMajor.set(segment, 0L, index, value); } + /// Sets `renderMajor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderMajor(MemorySegment segment, @CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_renderMajor(segment, 0L, value); } + /// Sets `renderMajor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT renderMajorAt(long index, @CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_renderMajor(this.segment(), index, value); return this; } + /// Sets `renderMajor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT renderMajor(@CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_renderMajor(this.segment(), value); return this; } + + /// {@return `renderMinor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int64_t") long get_renderMinor(MemorySegment segment, long index) { return (long) VH_renderMinor.get(segment, 0L, index); } + /// {@return `renderMinor`} + /// @param segment the segment of the struct + public static @CType("int64_t") long get_renderMinor(MemorySegment segment) { return VkPhysicalDeviceDrmPropertiesEXT.get_renderMinor(segment, 0L); } + /// {@return `renderMinor` at the given index} + /// @param index the index + public @CType("int64_t") long renderMinorAt(long index) { return VkPhysicalDeviceDrmPropertiesEXT.get_renderMinor(this.segment(), index); } + /// {@return `renderMinor`} + public @CType("int64_t") long renderMinor() { return VkPhysicalDeviceDrmPropertiesEXT.get_renderMinor(this.segment()); } + /// Sets `renderMinor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderMinor(MemorySegment segment, long index, @CType("int64_t") long value) { VH_renderMinor.set(segment, 0L, index, value); } + /// Sets `renderMinor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderMinor(MemorySegment segment, @CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_renderMinor(segment, 0L, value); } + /// Sets `renderMinor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT renderMinorAt(long index, @CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_renderMinor(this.segment(), index, value); return this; } + /// Sets `renderMinor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDrmPropertiesEXT renderMinor(@CType("int64_t") long value) { VkPhysicalDeviceDrmPropertiesEXT.set_renderMinor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.java new file mode 100644 index 00000000..1b268c32 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dynamicRenderingUnusedAttachments +/// [VarHandle][#VH_dynamicRenderingUnusedAttachments] - [Getter][#dynamicRenderingUnusedAttachments()] - [Setter][#dynamicRenderingUnusedAttachments(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 dynamicRenderingUnusedAttachments; +/// } VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("dynamicRenderingUnusedAttachments") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dynamicRenderingUnusedAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicRenderingUnusedAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicRenderingUnusedAttachments")); + + /// Creates `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT` + public static VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT` + public static VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `dynamicRenderingUnusedAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dynamicRenderingUnusedAttachments(MemorySegment segment, long index) { return (int) VH_dynamicRenderingUnusedAttachments.get(segment, 0L, index); } + /// {@return `dynamicRenderingUnusedAttachments`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dynamicRenderingUnusedAttachments(MemorySegment segment) { return VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.get_dynamicRenderingUnusedAttachments(segment, 0L); } + /// {@return `dynamicRenderingUnusedAttachments` at the given index} + /// @param index the index + public @CType("VkBool32") int dynamicRenderingUnusedAttachmentsAt(long index) { return VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.get_dynamicRenderingUnusedAttachments(this.segment(), index); } + /// {@return `dynamicRenderingUnusedAttachments`} + public @CType("VkBool32") int dynamicRenderingUnusedAttachments() { return VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.get_dynamicRenderingUnusedAttachments(this.segment()); } + /// Sets `dynamicRenderingUnusedAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicRenderingUnusedAttachments(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dynamicRenderingUnusedAttachments.set(segment, 0L, index, value); } + /// Sets `dynamicRenderingUnusedAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicRenderingUnusedAttachments(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.set_dynamicRenderingUnusedAttachments(segment, 0L, value); } + /// Sets `dynamicRenderingUnusedAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT dynamicRenderingUnusedAttachmentsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.set_dynamicRenderingUnusedAttachments(this.segment(), index, value); return this; } + /// Sets `dynamicRenderingUnusedAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT dynamicRenderingUnusedAttachments(@CType("VkBool32") int value) { VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.set_dynamicRenderingUnusedAttachments(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.java new file mode 100644 index 00000000..a7641cb3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### extendedDynamicState2 +/// [VarHandle][#VH_extendedDynamicState2] - [Getter][#extendedDynamicState2()] - [Setter][#extendedDynamicState2(int)] +/// ### extendedDynamicState2LogicOp +/// [VarHandle][#VH_extendedDynamicState2LogicOp] - [Getter][#extendedDynamicState2LogicOp()] - [Setter][#extendedDynamicState2LogicOp(int)] +/// ### extendedDynamicState2PatchControlPoints +/// [VarHandle][#VH_extendedDynamicState2PatchControlPoints] - [Getter][#extendedDynamicState2PatchControlPoints()] - [Setter][#extendedDynamicState2PatchControlPoints(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExtendedDynamicState2FeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 extendedDynamicState2; +/// VkBool32 extendedDynamicState2LogicOp; +/// VkBool32 extendedDynamicState2PatchControlPoints; +/// } VkPhysicalDeviceExtendedDynamicState2FeaturesEXT; +/// ``` +public final class VkPhysicalDeviceExtendedDynamicState2FeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("extendedDynamicState2"), + ValueLayout.JAVA_INT.withName("extendedDynamicState2LogicOp"), + ValueLayout.JAVA_INT.withName("extendedDynamicState2PatchControlPoints") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `extendedDynamicState2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState2")); + /// The [VarHandle] of `extendedDynamicState2LogicOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState2LogicOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState2LogicOp")); + /// The [VarHandle] of `extendedDynamicState2PatchControlPoints` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState2PatchControlPoints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState2PatchControlPoints")); + + /// Creates `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicState2FeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicState2FeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicState2FeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT` + public static VkPhysicalDeviceExtendedDynamicState2FeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExtendedDynamicState2FeaturesEXT` + public static VkPhysicalDeviceExtendedDynamicState2FeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `extendedDynamicState2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState2(MemorySegment segment, long index) { return (int) VH_extendedDynamicState2.get(segment, 0L, index); } + /// {@return `extendedDynamicState2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState2(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_extendedDynamicState2(segment, 0L); } + /// {@return `extendedDynamicState2` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState2At(long index) { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_extendedDynamicState2(this.segment(), index); } + /// {@return `extendedDynamicState2`} + public @CType("VkBool32") int extendedDynamicState2() { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_extendedDynamicState2(this.segment()); } + /// Sets `extendedDynamicState2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState2.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_extendedDynamicState2(segment, 0L, value); } + /// Sets `extendedDynamicState2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT extendedDynamicState2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_extendedDynamicState2(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT extendedDynamicState2(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_extendedDynamicState2(this.segment(), value); return this; } + + /// {@return `extendedDynamicState2LogicOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState2LogicOp(MemorySegment segment, long index) { return (int) VH_extendedDynamicState2LogicOp.get(segment, 0L, index); } + /// {@return `extendedDynamicState2LogicOp`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState2LogicOp(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_extendedDynamicState2LogicOp(segment, 0L); } + /// {@return `extendedDynamicState2LogicOp` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState2LogicOpAt(long index) { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_extendedDynamicState2LogicOp(this.segment(), index); } + /// {@return `extendedDynamicState2LogicOp`} + public @CType("VkBool32") int extendedDynamicState2LogicOp() { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_extendedDynamicState2LogicOp(this.segment()); } + /// Sets `extendedDynamicState2LogicOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState2LogicOp(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState2LogicOp.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState2LogicOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState2LogicOp(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_extendedDynamicState2LogicOp(segment, 0L, value); } + /// Sets `extendedDynamicState2LogicOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT extendedDynamicState2LogicOpAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_extendedDynamicState2LogicOp(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState2LogicOp` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT extendedDynamicState2LogicOp(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_extendedDynamicState2LogicOp(this.segment(), value); return this; } + + /// {@return `extendedDynamicState2PatchControlPoints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState2PatchControlPoints(MemorySegment segment, long index) { return (int) VH_extendedDynamicState2PatchControlPoints.get(segment, 0L, index); } + /// {@return `extendedDynamicState2PatchControlPoints`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState2PatchControlPoints(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_extendedDynamicState2PatchControlPoints(segment, 0L); } + /// {@return `extendedDynamicState2PatchControlPoints` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState2PatchControlPointsAt(long index) { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_extendedDynamicState2PatchControlPoints(this.segment(), index); } + /// {@return `extendedDynamicState2PatchControlPoints`} + public @CType("VkBool32") int extendedDynamicState2PatchControlPoints() { return VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.get_extendedDynamicState2PatchControlPoints(this.segment()); } + /// Sets `extendedDynamicState2PatchControlPoints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState2PatchControlPoints(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState2PatchControlPoints.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState2PatchControlPoints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState2PatchControlPoints(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_extendedDynamicState2PatchControlPoints(segment, 0L, value); } + /// Sets `extendedDynamicState2PatchControlPoints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT extendedDynamicState2PatchControlPointsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_extendedDynamicState2PatchControlPoints(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState2PatchControlPoints` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState2FeaturesEXT extendedDynamicState2PatchControlPoints(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.set_extendedDynamicState2PatchControlPoints(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.java new file mode 100644 index 00000000..b134f6d5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.java @@ -0,0 +1,1295 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### extendedDynamicState3TessellationDomainOrigin +/// [VarHandle][#VH_extendedDynamicState3TessellationDomainOrigin] - [Getter][#extendedDynamicState3TessellationDomainOrigin()] - [Setter][#extendedDynamicState3TessellationDomainOrigin(int)] +/// ### extendedDynamicState3DepthClampEnable +/// [VarHandle][#VH_extendedDynamicState3DepthClampEnable] - [Getter][#extendedDynamicState3DepthClampEnable()] - [Setter][#extendedDynamicState3DepthClampEnable(int)] +/// ### extendedDynamicState3PolygonMode +/// [VarHandle][#VH_extendedDynamicState3PolygonMode] - [Getter][#extendedDynamicState3PolygonMode()] - [Setter][#extendedDynamicState3PolygonMode(int)] +/// ### extendedDynamicState3RasterizationSamples +/// [VarHandle][#VH_extendedDynamicState3RasterizationSamples] - [Getter][#extendedDynamicState3RasterizationSamples()] - [Setter][#extendedDynamicState3RasterizationSamples(int)] +/// ### extendedDynamicState3SampleMask +/// [VarHandle][#VH_extendedDynamicState3SampleMask] - [Getter][#extendedDynamicState3SampleMask()] - [Setter][#extendedDynamicState3SampleMask(int)] +/// ### extendedDynamicState3AlphaToCoverageEnable +/// [VarHandle][#VH_extendedDynamicState3AlphaToCoverageEnable] - [Getter][#extendedDynamicState3AlphaToCoverageEnable()] - [Setter][#extendedDynamicState3AlphaToCoverageEnable(int)] +/// ### extendedDynamicState3AlphaToOneEnable +/// [VarHandle][#VH_extendedDynamicState3AlphaToOneEnable] - [Getter][#extendedDynamicState3AlphaToOneEnable()] - [Setter][#extendedDynamicState3AlphaToOneEnable(int)] +/// ### extendedDynamicState3LogicOpEnable +/// [VarHandle][#VH_extendedDynamicState3LogicOpEnable] - [Getter][#extendedDynamicState3LogicOpEnable()] - [Setter][#extendedDynamicState3LogicOpEnable(int)] +/// ### extendedDynamicState3ColorBlendEnable +/// [VarHandle][#VH_extendedDynamicState3ColorBlendEnable] - [Getter][#extendedDynamicState3ColorBlendEnable()] - [Setter][#extendedDynamicState3ColorBlendEnable(int)] +/// ### extendedDynamicState3ColorBlendEquation +/// [VarHandle][#VH_extendedDynamicState3ColorBlendEquation] - [Getter][#extendedDynamicState3ColorBlendEquation()] - [Setter][#extendedDynamicState3ColorBlendEquation(int)] +/// ### extendedDynamicState3ColorWriteMask +/// [VarHandle][#VH_extendedDynamicState3ColorWriteMask] - [Getter][#extendedDynamicState3ColorWriteMask()] - [Setter][#extendedDynamicState3ColorWriteMask(int)] +/// ### extendedDynamicState3RasterizationStream +/// [VarHandle][#VH_extendedDynamicState3RasterizationStream] - [Getter][#extendedDynamicState3RasterizationStream()] - [Setter][#extendedDynamicState3RasterizationStream(int)] +/// ### extendedDynamicState3ConservativeRasterizationMode +/// [VarHandle][#VH_extendedDynamicState3ConservativeRasterizationMode] - [Getter][#extendedDynamicState3ConservativeRasterizationMode()] - [Setter][#extendedDynamicState3ConservativeRasterizationMode(int)] +/// ### extendedDynamicState3ExtraPrimitiveOverestimationSize +/// [VarHandle][#VH_extendedDynamicState3ExtraPrimitiveOverestimationSize] - [Getter][#extendedDynamicState3ExtraPrimitiveOverestimationSize()] - [Setter][#extendedDynamicState3ExtraPrimitiveOverestimationSize(int)] +/// ### extendedDynamicState3DepthClipEnable +/// [VarHandle][#VH_extendedDynamicState3DepthClipEnable] - [Getter][#extendedDynamicState3DepthClipEnable()] - [Setter][#extendedDynamicState3DepthClipEnable(int)] +/// ### extendedDynamicState3SampleLocationsEnable +/// [VarHandle][#VH_extendedDynamicState3SampleLocationsEnable] - [Getter][#extendedDynamicState3SampleLocationsEnable()] - [Setter][#extendedDynamicState3SampleLocationsEnable(int)] +/// ### extendedDynamicState3ColorBlendAdvanced +/// [VarHandle][#VH_extendedDynamicState3ColorBlendAdvanced] - [Getter][#extendedDynamicState3ColorBlendAdvanced()] - [Setter][#extendedDynamicState3ColorBlendAdvanced(int)] +/// ### extendedDynamicState3ProvokingVertexMode +/// [VarHandle][#VH_extendedDynamicState3ProvokingVertexMode] - [Getter][#extendedDynamicState3ProvokingVertexMode()] - [Setter][#extendedDynamicState3ProvokingVertexMode(int)] +/// ### extendedDynamicState3LineRasterizationMode +/// [VarHandle][#VH_extendedDynamicState3LineRasterizationMode] - [Getter][#extendedDynamicState3LineRasterizationMode()] - [Setter][#extendedDynamicState3LineRasterizationMode(int)] +/// ### extendedDynamicState3LineStippleEnable +/// [VarHandle][#VH_extendedDynamicState3LineStippleEnable] - [Getter][#extendedDynamicState3LineStippleEnable()] - [Setter][#extendedDynamicState3LineStippleEnable(int)] +/// ### extendedDynamicState3DepthClipNegativeOneToOne +/// [VarHandle][#VH_extendedDynamicState3DepthClipNegativeOneToOne] - [Getter][#extendedDynamicState3DepthClipNegativeOneToOne()] - [Setter][#extendedDynamicState3DepthClipNegativeOneToOne(int)] +/// ### extendedDynamicState3ViewportWScalingEnable +/// [VarHandle][#VH_extendedDynamicState3ViewportWScalingEnable] - [Getter][#extendedDynamicState3ViewportWScalingEnable()] - [Setter][#extendedDynamicState3ViewportWScalingEnable(int)] +/// ### extendedDynamicState3ViewportSwizzle +/// [VarHandle][#VH_extendedDynamicState3ViewportSwizzle] - [Getter][#extendedDynamicState3ViewportSwizzle()] - [Setter][#extendedDynamicState3ViewportSwizzle(int)] +/// ### extendedDynamicState3CoverageToColorEnable +/// [VarHandle][#VH_extendedDynamicState3CoverageToColorEnable] - [Getter][#extendedDynamicState3CoverageToColorEnable()] - [Setter][#extendedDynamicState3CoverageToColorEnable(int)] +/// ### extendedDynamicState3CoverageToColorLocation +/// [VarHandle][#VH_extendedDynamicState3CoverageToColorLocation] - [Getter][#extendedDynamicState3CoverageToColorLocation()] - [Setter][#extendedDynamicState3CoverageToColorLocation(int)] +/// ### extendedDynamicState3CoverageModulationMode +/// [VarHandle][#VH_extendedDynamicState3CoverageModulationMode] - [Getter][#extendedDynamicState3CoverageModulationMode()] - [Setter][#extendedDynamicState3CoverageModulationMode(int)] +/// ### extendedDynamicState3CoverageModulationTableEnable +/// [VarHandle][#VH_extendedDynamicState3CoverageModulationTableEnable] - [Getter][#extendedDynamicState3CoverageModulationTableEnable()] - [Setter][#extendedDynamicState3CoverageModulationTableEnable(int)] +/// ### extendedDynamicState3CoverageModulationTable +/// [VarHandle][#VH_extendedDynamicState3CoverageModulationTable] - [Getter][#extendedDynamicState3CoverageModulationTable()] - [Setter][#extendedDynamicState3CoverageModulationTable(int)] +/// ### extendedDynamicState3CoverageReductionMode +/// [VarHandle][#VH_extendedDynamicState3CoverageReductionMode] - [Getter][#extendedDynamicState3CoverageReductionMode()] - [Setter][#extendedDynamicState3CoverageReductionMode(int)] +/// ### extendedDynamicState3RepresentativeFragmentTestEnable +/// [VarHandle][#VH_extendedDynamicState3RepresentativeFragmentTestEnable] - [Getter][#extendedDynamicState3RepresentativeFragmentTestEnable()] - [Setter][#extendedDynamicState3RepresentativeFragmentTestEnable(int)] +/// ### extendedDynamicState3ShadingRateImageEnable +/// [VarHandle][#VH_extendedDynamicState3ShadingRateImageEnable] - [Getter][#extendedDynamicState3ShadingRateImageEnable()] - [Setter][#extendedDynamicState3ShadingRateImageEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExtendedDynamicState3FeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 extendedDynamicState3TessellationDomainOrigin; +/// VkBool32 extendedDynamicState3DepthClampEnable; +/// VkBool32 extendedDynamicState3PolygonMode; +/// VkBool32 extendedDynamicState3RasterizationSamples; +/// VkBool32 extendedDynamicState3SampleMask; +/// VkBool32 extendedDynamicState3AlphaToCoverageEnable; +/// VkBool32 extendedDynamicState3AlphaToOneEnable; +/// VkBool32 extendedDynamicState3LogicOpEnable; +/// VkBool32 extendedDynamicState3ColorBlendEnable; +/// VkBool32 extendedDynamicState3ColorBlendEquation; +/// VkBool32 extendedDynamicState3ColorWriteMask; +/// VkBool32 extendedDynamicState3RasterizationStream; +/// VkBool32 extendedDynamicState3ConservativeRasterizationMode; +/// VkBool32 extendedDynamicState3ExtraPrimitiveOverestimationSize; +/// VkBool32 extendedDynamicState3DepthClipEnable; +/// VkBool32 extendedDynamicState3SampleLocationsEnable; +/// VkBool32 extendedDynamicState3ColorBlendAdvanced; +/// VkBool32 extendedDynamicState3ProvokingVertexMode; +/// VkBool32 extendedDynamicState3LineRasterizationMode; +/// VkBool32 extendedDynamicState3LineStippleEnable; +/// VkBool32 extendedDynamicState3DepthClipNegativeOneToOne; +/// VkBool32 extendedDynamicState3ViewportWScalingEnable; +/// VkBool32 extendedDynamicState3ViewportSwizzle; +/// VkBool32 extendedDynamicState3CoverageToColorEnable; +/// VkBool32 extendedDynamicState3CoverageToColorLocation; +/// VkBool32 extendedDynamicState3CoverageModulationMode; +/// VkBool32 extendedDynamicState3CoverageModulationTableEnable; +/// VkBool32 extendedDynamicState3CoverageModulationTable; +/// VkBool32 extendedDynamicState3CoverageReductionMode; +/// VkBool32 extendedDynamicState3RepresentativeFragmentTestEnable; +/// VkBool32 extendedDynamicState3ShadingRateImageEnable; +/// } VkPhysicalDeviceExtendedDynamicState3FeaturesEXT; +/// ``` +public final class VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3TessellationDomainOrigin"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3DepthClampEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3PolygonMode"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3RasterizationSamples"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3SampleMask"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3AlphaToCoverageEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3AlphaToOneEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3LogicOpEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3ColorBlendEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3ColorBlendEquation"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3ColorWriteMask"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3RasterizationStream"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3ConservativeRasterizationMode"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3ExtraPrimitiveOverestimationSize"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3DepthClipEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3SampleLocationsEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3ColorBlendAdvanced"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3ProvokingVertexMode"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3LineRasterizationMode"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3LineStippleEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3DepthClipNegativeOneToOne"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3ViewportWScalingEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3ViewportSwizzle"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3CoverageToColorEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3CoverageToColorLocation"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3CoverageModulationMode"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3CoverageModulationTableEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3CoverageModulationTable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3CoverageReductionMode"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3RepresentativeFragmentTestEnable"), + ValueLayout.JAVA_INT.withName("extendedDynamicState3ShadingRateImageEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `extendedDynamicState3TessellationDomainOrigin` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3TessellationDomainOrigin = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3TessellationDomainOrigin")); + /// The [VarHandle] of `extendedDynamicState3DepthClampEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3DepthClampEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3DepthClampEnable")); + /// The [VarHandle] of `extendedDynamicState3PolygonMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3PolygonMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3PolygonMode")); + /// The [VarHandle] of `extendedDynamicState3RasterizationSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3RasterizationSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3RasterizationSamples")); + /// The [VarHandle] of `extendedDynamicState3SampleMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3SampleMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3SampleMask")); + /// The [VarHandle] of `extendedDynamicState3AlphaToCoverageEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3AlphaToCoverageEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3AlphaToCoverageEnable")); + /// The [VarHandle] of `extendedDynamicState3AlphaToOneEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3AlphaToOneEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3AlphaToOneEnable")); + /// The [VarHandle] of `extendedDynamicState3LogicOpEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3LogicOpEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3LogicOpEnable")); + /// The [VarHandle] of `extendedDynamicState3ColorBlendEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3ColorBlendEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3ColorBlendEnable")); + /// The [VarHandle] of `extendedDynamicState3ColorBlendEquation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3ColorBlendEquation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3ColorBlendEquation")); + /// The [VarHandle] of `extendedDynamicState3ColorWriteMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3ColorWriteMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3ColorWriteMask")); + /// The [VarHandle] of `extendedDynamicState3RasterizationStream` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3RasterizationStream = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3RasterizationStream")); + /// The [VarHandle] of `extendedDynamicState3ConservativeRasterizationMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3ConservativeRasterizationMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3ConservativeRasterizationMode")); + /// The [VarHandle] of `extendedDynamicState3ExtraPrimitiveOverestimationSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3ExtraPrimitiveOverestimationSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3ExtraPrimitiveOverestimationSize")); + /// The [VarHandle] of `extendedDynamicState3DepthClipEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3DepthClipEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3DepthClipEnable")); + /// The [VarHandle] of `extendedDynamicState3SampleLocationsEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3SampleLocationsEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3SampleLocationsEnable")); + /// The [VarHandle] of `extendedDynamicState3ColorBlendAdvanced` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3ColorBlendAdvanced = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3ColorBlendAdvanced")); + /// The [VarHandle] of `extendedDynamicState3ProvokingVertexMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3ProvokingVertexMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3ProvokingVertexMode")); + /// The [VarHandle] of `extendedDynamicState3LineRasterizationMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3LineRasterizationMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3LineRasterizationMode")); + /// The [VarHandle] of `extendedDynamicState3LineStippleEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3LineStippleEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3LineStippleEnable")); + /// The [VarHandle] of `extendedDynamicState3DepthClipNegativeOneToOne` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3DepthClipNegativeOneToOne = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3DepthClipNegativeOneToOne")); + /// The [VarHandle] of `extendedDynamicState3ViewportWScalingEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3ViewportWScalingEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3ViewportWScalingEnable")); + /// The [VarHandle] of `extendedDynamicState3ViewportSwizzle` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3ViewportSwizzle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3ViewportSwizzle")); + /// The [VarHandle] of `extendedDynamicState3CoverageToColorEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3CoverageToColorEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3CoverageToColorEnable")); + /// The [VarHandle] of `extendedDynamicState3CoverageToColorLocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3CoverageToColorLocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3CoverageToColorLocation")); + /// The [VarHandle] of `extendedDynamicState3CoverageModulationMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3CoverageModulationMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3CoverageModulationMode")); + /// The [VarHandle] of `extendedDynamicState3CoverageModulationTableEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3CoverageModulationTableEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3CoverageModulationTableEnable")); + /// The [VarHandle] of `extendedDynamicState3CoverageModulationTable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3CoverageModulationTable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3CoverageModulationTable")); + /// The [VarHandle] of `extendedDynamicState3CoverageReductionMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3CoverageReductionMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3CoverageReductionMode")); + /// The [VarHandle] of `extendedDynamicState3RepresentativeFragmentTestEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3RepresentativeFragmentTestEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3RepresentativeFragmentTestEnable")); + /// The [VarHandle] of `extendedDynamicState3ShadingRateImageEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState3ShadingRateImageEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState3ShadingRateImageEnable")); + + /// Creates `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicState3FeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicState3FeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicState3FeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicState3FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicState3FeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicState3FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT` + public static VkPhysicalDeviceExtendedDynamicState3FeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExtendedDynamicState3FeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExtendedDynamicState3FeaturesEXT` + public static VkPhysicalDeviceExtendedDynamicState3FeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExtendedDynamicState3FeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3TessellationDomainOrigin` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3TessellationDomainOrigin(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3TessellationDomainOrigin.get(segment, 0L, index); } + /// {@return `extendedDynamicState3TessellationDomainOrigin`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3TessellationDomainOrigin(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3TessellationDomainOrigin(segment, 0L); } + /// {@return `extendedDynamicState3TessellationDomainOrigin` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3TessellationDomainOriginAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3TessellationDomainOrigin(this.segment(), index); } + /// {@return `extendedDynamicState3TessellationDomainOrigin`} + public @CType("VkBool32") int extendedDynamicState3TessellationDomainOrigin() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3TessellationDomainOrigin(this.segment()); } + /// Sets `extendedDynamicState3TessellationDomainOrigin` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3TessellationDomainOrigin(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3TessellationDomainOrigin.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3TessellationDomainOrigin` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3TessellationDomainOrigin(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3TessellationDomainOrigin(segment, 0L, value); } + /// Sets `extendedDynamicState3TessellationDomainOrigin` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3TessellationDomainOriginAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3TessellationDomainOrigin(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3TessellationDomainOrigin` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3TessellationDomainOrigin(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3TessellationDomainOrigin(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3DepthClampEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3DepthClampEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3DepthClampEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3DepthClampEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3DepthClampEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3DepthClampEnable(segment, 0L); } + /// {@return `extendedDynamicState3DepthClampEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3DepthClampEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3DepthClampEnable(this.segment(), index); } + /// {@return `extendedDynamicState3DepthClampEnable`} + public @CType("VkBool32") int extendedDynamicState3DepthClampEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3DepthClampEnable(this.segment()); } + /// Sets `extendedDynamicState3DepthClampEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3DepthClampEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3DepthClampEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3DepthClampEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3DepthClampEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3DepthClampEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3DepthClampEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3DepthClampEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3DepthClampEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3DepthClampEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3DepthClampEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3DepthClampEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3PolygonMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3PolygonMode(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3PolygonMode.get(segment, 0L, index); } + /// {@return `extendedDynamicState3PolygonMode`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3PolygonMode(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3PolygonMode(segment, 0L); } + /// {@return `extendedDynamicState3PolygonMode` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3PolygonModeAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3PolygonMode(this.segment(), index); } + /// {@return `extendedDynamicState3PolygonMode`} + public @CType("VkBool32") int extendedDynamicState3PolygonMode() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3PolygonMode(this.segment()); } + /// Sets `extendedDynamicState3PolygonMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3PolygonMode(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3PolygonMode.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3PolygonMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3PolygonMode(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3PolygonMode(segment, 0L, value); } + /// Sets `extendedDynamicState3PolygonMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3PolygonModeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3PolygonMode(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3PolygonMode` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3PolygonMode(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3PolygonMode(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3RasterizationSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3RasterizationSamples(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3RasterizationSamples.get(segment, 0L, index); } + /// {@return `extendedDynamicState3RasterizationSamples`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3RasterizationSamples(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3RasterizationSamples(segment, 0L); } + /// {@return `extendedDynamicState3RasterizationSamples` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3RasterizationSamplesAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3RasterizationSamples(this.segment(), index); } + /// {@return `extendedDynamicState3RasterizationSamples`} + public @CType("VkBool32") int extendedDynamicState3RasterizationSamples() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3RasterizationSamples(this.segment()); } + /// Sets `extendedDynamicState3RasterizationSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3RasterizationSamples(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3RasterizationSamples.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3RasterizationSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3RasterizationSamples(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3RasterizationSamples(segment, 0L, value); } + /// Sets `extendedDynamicState3RasterizationSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3RasterizationSamplesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3RasterizationSamples(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3RasterizationSamples` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3RasterizationSamples(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3RasterizationSamples(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3SampleMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3SampleMask(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3SampleMask.get(segment, 0L, index); } + /// {@return `extendedDynamicState3SampleMask`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3SampleMask(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3SampleMask(segment, 0L); } + /// {@return `extendedDynamicState3SampleMask` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3SampleMaskAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3SampleMask(this.segment(), index); } + /// {@return `extendedDynamicState3SampleMask`} + public @CType("VkBool32") int extendedDynamicState3SampleMask() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3SampleMask(this.segment()); } + /// Sets `extendedDynamicState3SampleMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3SampleMask(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3SampleMask.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3SampleMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3SampleMask(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3SampleMask(segment, 0L, value); } + /// Sets `extendedDynamicState3SampleMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3SampleMaskAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3SampleMask(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3SampleMask` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3SampleMask(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3SampleMask(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3AlphaToCoverageEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3AlphaToCoverageEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3AlphaToCoverageEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3AlphaToCoverageEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3AlphaToCoverageEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3AlphaToCoverageEnable(segment, 0L); } + /// {@return `extendedDynamicState3AlphaToCoverageEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3AlphaToCoverageEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3AlphaToCoverageEnable(this.segment(), index); } + /// {@return `extendedDynamicState3AlphaToCoverageEnable`} + public @CType("VkBool32") int extendedDynamicState3AlphaToCoverageEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3AlphaToCoverageEnable(this.segment()); } + /// Sets `extendedDynamicState3AlphaToCoverageEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3AlphaToCoverageEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3AlphaToCoverageEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3AlphaToCoverageEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3AlphaToCoverageEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3AlphaToCoverageEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3AlphaToCoverageEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3AlphaToCoverageEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3AlphaToCoverageEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3AlphaToCoverageEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3AlphaToCoverageEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3AlphaToCoverageEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3AlphaToOneEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3AlphaToOneEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3AlphaToOneEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3AlphaToOneEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3AlphaToOneEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3AlphaToOneEnable(segment, 0L); } + /// {@return `extendedDynamicState3AlphaToOneEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3AlphaToOneEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3AlphaToOneEnable(this.segment(), index); } + /// {@return `extendedDynamicState3AlphaToOneEnable`} + public @CType("VkBool32") int extendedDynamicState3AlphaToOneEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3AlphaToOneEnable(this.segment()); } + /// Sets `extendedDynamicState3AlphaToOneEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3AlphaToOneEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3AlphaToOneEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3AlphaToOneEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3AlphaToOneEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3AlphaToOneEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3AlphaToOneEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3AlphaToOneEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3AlphaToOneEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3AlphaToOneEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3AlphaToOneEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3AlphaToOneEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3LogicOpEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3LogicOpEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3LogicOpEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3LogicOpEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3LogicOpEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3LogicOpEnable(segment, 0L); } + /// {@return `extendedDynamicState3LogicOpEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3LogicOpEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3LogicOpEnable(this.segment(), index); } + /// {@return `extendedDynamicState3LogicOpEnable`} + public @CType("VkBool32") int extendedDynamicState3LogicOpEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3LogicOpEnable(this.segment()); } + /// Sets `extendedDynamicState3LogicOpEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3LogicOpEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3LogicOpEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3LogicOpEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3LogicOpEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3LogicOpEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3LogicOpEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3LogicOpEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3LogicOpEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3LogicOpEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3LogicOpEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3LogicOpEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3ColorBlendEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3ColorBlendEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3ColorBlendEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3ColorBlendEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3ColorBlendEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorBlendEnable(segment, 0L); } + /// {@return `extendedDynamicState3ColorBlendEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3ColorBlendEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorBlendEnable(this.segment(), index); } + /// {@return `extendedDynamicState3ColorBlendEnable`} + public @CType("VkBool32") int extendedDynamicState3ColorBlendEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorBlendEnable(this.segment()); } + /// Sets `extendedDynamicState3ColorBlendEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3ColorBlendEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3ColorBlendEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3ColorBlendEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3ColorBlendEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorBlendEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3ColorBlendEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ColorBlendEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorBlendEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3ColorBlendEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ColorBlendEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorBlendEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3ColorBlendEquation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3ColorBlendEquation(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3ColorBlendEquation.get(segment, 0L, index); } + /// {@return `extendedDynamicState3ColorBlendEquation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3ColorBlendEquation(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorBlendEquation(segment, 0L); } + /// {@return `extendedDynamicState3ColorBlendEquation` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3ColorBlendEquationAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorBlendEquation(this.segment(), index); } + /// {@return `extendedDynamicState3ColorBlendEquation`} + public @CType("VkBool32") int extendedDynamicState3ColorBlendEquation() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorBlendEquation(this.segment()); } + /// Sets `extendedDynamicState3ColorBlendEquation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3ColorBlendEquation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3ColorBlendEquation.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3ColorBlendEquation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3ColorBlendEquation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorBlendEquation(segment, 0L, value); } + /// Sets `extendedDynamicState3ColorBlendEquation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ColorBlendEquationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorBlendEquation(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3ColorBlendEquation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ColorBlendEquation(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorBlendEquation(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3ColorWriteMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3ColorWriteMask(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3ColorWriteMask.get(segment, 0L, index); } + /// {@return `extendedDynamicState3ColorWriteMask`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3ColorWriteMask(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorWriteMask(segment, 0L); } + /// {@return `extendedDynamicState3ColorWriteMask` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3ColorWriteMaskAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorWriteMask(this.segment(), index); } + /// {@return `extendedDynamicState3ColorWriteMask`} + public @CType("VkBool32") int extendedDynamicState3ColorWriteMask() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorWriteMask(this.segment()); } + /// Sets `extendedDynamicState3ColorWriteMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3ColorWriteMask(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3ColorWriteMask.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3ColorWriteMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3ColorWriteMask(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorWriteMask(segment, 0L, value); } + /// Sets `extendedDynamicState3ColorWriteMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ColorWriteMaskAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorWriteMask(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3ColorWriteMask` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ColorWriteMask(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorWriteMask(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3RasterizationStream` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3RasterizationStream(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3RasterizationStream.get(segment, 0L, index); } + /// {@return `extendedDynamicState3RasterizationStream`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3RasterizationStream(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3RasterizationStream(segment, 0L); } + /// {@return `extendedDynamicState3RasterizationStream` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3RasterizationStreamAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3RasterizationStream(this.segment(), index); } + /// {@return `extendedDynamicState3RasterizationStream`} + public @CType("VkBool32") int extendedDynamicState3RasterizationStream() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3RasterizationStream(this.segment()); } + /// Sets `extendedDynamicState3RasterizationStream` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3RasterizationStream(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3RasterizationStream.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3RasterizationStream` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3RasterizationStream(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3RasterizationStream(segment, 0L, value); } + /// Sets `extendedDynamicState3RasterizationStream` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3RasterizationStreamAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3RasterizationStream(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3RasterizationStream` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3RasterizationStream(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3RasterizationStream(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3ConservativeRasterizationMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3ConservativeRasterizationMode(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3ConservativeRasterizationMode.get(segment, 0L, index); } + /// {@return `extendedDynamicState3ConservativeRasterizationMode`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3ConservativeRasterizationMode(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ConservativeRasterizationMode(segment, 0L); } + /// {@return `extendedDynamicState3ConservativeRasterizationMode` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3ConservativeRasterizationModeAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ConservativeRasterizationMode(this.segment(), index); } + /// {@return `extendedDynamicState3ConservativeRasterizationMode`} + public @CType("VkBool32") int extendedDynamicState3ConservativeRasterizationMode() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ConservativeRasterizationMode(this.segment()); } + /// Sets `extendedDynamicState3ConservativeRasterizationMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3ConservativeRasterizationMode(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3ConservativeRasterizationMode.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3ConservativeRasterizationMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3ConservativeRasterizationMode(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ConservativeRasterizationMode(segment, 0L, value); } + /// Sets `extendedDynamicState3ConservativeRasterizationMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ConservativeRasterizationModeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ConservativeRasterizationMode(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3ConservativeRasterizationMode` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ConservativeRasterizationMode(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ConservativeRasterizationMode(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3ExtraPrimitiveOverestimationSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3ExtraPrimitiveOverestimationSize(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3ExtraPrimitiveOverestimationSize.get(segment, 0L, index); } + /// {@return `extendedDynamicState3ExtraPrimitiveOverestimationSize`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3ExtraPrimitiveOverestimationSize(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ExtraPrimitiveOverestimationSize(segment, 0L); } + /// {@return `extendedDynamicState3ExtraPrimitiveOverestimationSize` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3ExtraPrimitiveOverestimationSizeAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ExtraPrimitiveOverestimationSize(this.segment(), index); } + /// {@return `extendedDynamicState3ExtraPrimitiveOverestimationSize`} + public @CType("VkBool32") int extendedDynamicState3ExtraPrimitiveOverestimationSize() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ExtraPrimitiveOverestimationSize(this.segment()); } + /// Sets `extendedDynamicState3ExtraPrimitiveOverestimationSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3ExtraPrimitiveOverestimationSize(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3ExtraPrimitiveOverestimationSize.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3ExtraPrimitiveOverestimationSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3ExtraPrimitiveOverestimationSize(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ExtraPrimitiveOverestimationSize(segment, 0L, value); } + /// Sets `extendedDynamicState3ExtraPrimitiveOverestimationSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ExtraPrimitiveOverestimationSizeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ExtraPrimitiveOverestimationSize(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3ExtraPrimitiveOverestimationSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ExtraPrimitiveOverestimationSize(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ExtraPrimitiveOverestimationSize(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3DepthClipEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3DepthClipEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3DepthClipEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3DepthClipEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3DepthClipEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3DepthClipEnable(segment, 0L); } + /// {@return `extendedDynamicState3DepthClipEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3DepthClipEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3DepthClipEnable(this.segment(), index); } + /// {@return `extendedDynamicState3DepthClipEnable`} + public @CType("VkBool32") int extendedDynamicState3DepthClipEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3DepthClipEnable(this.segment()); } + /// Sets `extendedDynamicState3DepthClipEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3DepthClipEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3DepthClipEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3DepthClipEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3DepthClipEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3DepthClipEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3DepthClipEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3DepthClipEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3DepthClipEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3DepthClipEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3DepthClipEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3DepthClipEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3SampleLocationsEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3SampleLocationsEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3SampleLocationsEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3SampleLocationsEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3SampleLocationsEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3SampleLocationsEnable(segment, 0L); } + /// {@return `extendedDynamicState3SampleLocationsEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3SampleLocationsEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3SampleLocationsEnable(this.segment(), index); } + /// {@return `extendedDynamicState3SampleLocationsEnable`} + public @CType("VkBool32") int extendedDynamicState3SampleLocationsEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3SampleLocationsEnable(this.segment()); } + /// Sets `extendedDynamicState3SampleLocationsEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3SampleLocationsEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3SampleLocationsEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3SampleLocationsEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3SampleLocationsEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3SampleLocationsEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3SampleLocationsEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3SampleLocationsEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3SampleLocationsEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3SampleLocationsEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3SampleLocationsEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3SampleLocationsEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3ColorBlendAdvanced` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3ColorBlendAdvanced(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3ColorBlendAdvanced.get(segment, 0L, index); } + /// {@return `extendedDynamicState3ColorBlendAdvanced`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3ColorBlendAdvanced(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorBlendAdvanced(segment, 0L); } + /// {@return `extendedDynamicState3ColorBlendAdvanced` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3ColorBlendAdvancedAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorBlendAdvanced(this.segment(), index); } + /// {@return `extendedDynamicState3ColorBlendAdvanced`} + public @CType("VkBool32") int extendedDynamicState3ColorBlendAdvanced() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ColorBlendAdvanced(this.segment()); } + /// Sets `extendedDynamicState3ColorBlendAdvanced` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3ColorBlendAdvanced(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3ColorBlendAdvanced.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3ColorBlendAdvanced` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3ColorBlendAdvanced(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorBlendAdvanced(segment, 0L, value); } + /// Sets `extendedDynamicState3ColorBlendAdvanced` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ColorBlendAdvancedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorBlendAdvanced(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3ColorBlendAdvanced` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ColorBlendAdvanced(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ColorBlendAdvanced(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3ProvokingVertexMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3ProvokingVertexMode(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3ProvokingVertexMode.get(segment, 0L, index); } + /// {@return `extendedDynamicState3ProvokingVertexMode`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3ProvokingVertexMode(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ProvokingVertexMode(segment, 0L); } + /// {@return `extendedDynamicState3ProvokingVertexMode` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3ProvokingVertexModeAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ProvokingVertexMode(this.segment(), index); } + /// {@return `extendedDynamicState3ProvokingVertexMode`} + public @CType("VkBool32") int extendedDynamicState3ProvokingVertexMode() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ProvokingVertexMode(this.segment()); } + /// Sets `extendedDynamicState3ProvokingVertexMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3ProvokingVertexMode(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3ProvokingVertexMode.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3ProvokingVertexMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3ProvokingVertexMode(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ProvokingVertexMode(segment, 0L, value); } + /// Sets `extendedDynamicState3ProvokingVertexMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ProvokingVertexModeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ProvokingVertexMode(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3ProvokingVertexMode` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ProvokingVertexMode(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ProvokingVertexMode(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3LineRasterizationMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3LineRasterizationMode(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3LineRasterizationMode.get(segment, 0L, index); } + /// {@return `extendedDynamicState3LineRasterizationMode`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3LineRasterizationMode(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3LineRasterizationMode(segment, 0L); } + /// {@return `extendedDynamicState3LineRasterizationMode` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3LineRasterizationModeAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3LineRasterizationMode(this.segment(), index); } + /// {@return `extendedDynamicState3LineRasterizationMode`} + public @CType("VkBool32") int extendedDynamicState3LineRasterizationMode() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3LineRasterizationMode(this.segment()); } + /// Sets `extendedDynamicState3LineRasterizationMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3LineRasterizationMode(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3LineRasterizationMode.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3LineRasterizationMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3LineRasterizationMode(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3LineRasterizationMode(segment, 0L, value); } + /// Sets `extendedDynamicState3LineRasterizationMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3LineRasterizationModeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3LineRasterizationMode(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3LineRasterizationMode` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3LineRasterizationMode(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3LineRasterizationMode(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3LineStippleEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3LineStippleEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3LineStippleEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3LineStippleEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3LineStippleEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3LineStippleEnable(segment, 0L); } + /// {@return `extendedDynamicState3LineStippleEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3LineStippleEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3LineStippleEnable(this.segment(), index); } + /// {@return `extendedDynamicState3LineStippleEnable`} + public @CType("VkBool32") int extendedDynamicState3LineStippleEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3LineStippleEnable(this.segment()); } + /// Sets `extendedDynamicState3LineStippleEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3LineStippleEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3LineStippleEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3LineStippleEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3LineStippleEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3LineStippleEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3LineStippleEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3LineStippleEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3LineStippleEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3LineStippleEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3LineStippleEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3LineStippleEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3DepthClipNegativeOneToOne` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3DepthClipNegativeOneToOne(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3DepthClipNegativeOneToOne.get(segment, 0L, index); } + /// {@return `extendedDynamicState3DepthClipNegativeOneToOne`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3DepthClipNegativeOneToOne(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3DepthClipNegativeOneToOne(segment, 0L); } + /// {@return `extendedDynamicState3DepthClipNegativeOneToOne` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3DepthClipNegativeOneToOneAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3DepthClipNegativeOneToOne(this.segment(), index); } + /// {@return `extendedDynamicState3DepthClipNegativeOneToOne`} + public @CType("VkBool32") int extendedDynamicState3DepthClipNegativeOneToOne() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3DepthClipNegativeOneToOne(this.segment()); } + /// Sets `extendedDynamicState3DepthClipNegativeOneToOne` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3DepthClipNegativeOneToOne(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3DepthClipNegativeOneToOne.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3DepthClipNegativeOneToOne` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3DepthClipNegativeOneToOne(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3DepthClipNegativeOneToOne(segment, 0L, value); } + /// Sets `extendedDynamicState3DepthClipNegativeOneToOne` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3DepthClipNegativeOneToOneAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3DepthClipNegativeOneToOne(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3DepthClipNegativeOneToOne` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3DepthClipNegativeOneToOne(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3DepthClipNegativeOneToOne(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3ViewportWScalingEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3ViewportWScalingEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3ViewportWScalingEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3ViewportWScalingEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3ViewportWScalingEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ViewportWScalingEnable(segment, 0L); } + /// {@return `extendedDynamicState3ViewportWScalingEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3ViewportWScalingEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ViewportWScalingEnable(this.segment(), index); } + /// {@return `extendedDynamicState3ViewportWScalingEnable`} + public @CType("VkBool32") int extendedDynamicState3ViewportWScalingEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ViewportWScalingEnable(this.segment()); } + /// Sets `extendedDynamicState3ViewportWScalingEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3ViewportWScalingEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3ViewportWScalingEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3ViewportWScalingEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3ViewportWScalingEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ViewportWScalingEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3ViewportWScalingEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ViewportWScalingEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ViewportWScalingEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3ViewportWScalingEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ViewportWScalingEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ViewportWScalingEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3ViewportSwizzle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3ViewportSwizzle(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3ViewportSwizzle.get(segment, 0L, index); } + /// {@return `extendedDynamicState3ViewportSwizzle`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3ViewportSwizzle(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ViewportSwizzle(segment, 0L); } + /// {@return `extendedDynamicState3ViewportSwizzle` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3ViewportSwizzleAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ViewportSwizzle(this.segment(), index); } + /// {@return `extendedDynamicState3ViewportSwizzle`} + public @CType("VkBool32") int extendedDynamicState3ViewportSwizzle() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ViewportSwizzle(this.segment()); } + /// Sets `extendedDynamicState3ViewportSwizzle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3ViewportSwizzle(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3ViewportSwizzle.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3ViewportSwizzle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3ViewportSwizzle(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ViewportSwizzle(segment, 0L, value); } + /// Sets `extendedDynamicState3ViewportSwizzle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ViewportSwizzleAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ViewportSwizzle(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3ViewportSwizzle` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ViewportSwizzle(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ViewportSwizzle(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3CoverageToColorEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3CoverageToColorEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3CoverageToColorEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3CoverageToColorEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3CoverageToColorEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageToColorEnable(segment, 0L); } + /// {@return `extendedDynamicState3CoverageToColorEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3CoverageToColorEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageToColorEnable(this.segment(), index); } + /// {@return `extendedDynamicState3CoverageToColorEnable`} + public @CType("VkBool32") int extendedDynamicState3CoverageToColorEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageToColorEnable(this.segment()); } + /// Sets `extendedDynamicState3CoverageToColorEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3CoverageToColorEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3CoverageToColorEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3CoverageToColorEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3CoverageToColorEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageToColorEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3CoverageToColorEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageToColorEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageToColorEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3CoverageToColorEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageToColorEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageToColorEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3CoverageToColorLocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3CoverageToColorLocation(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3CoverageToColorLocation.get(segment, 0L, index); } + /// {@return `extendedDynamicState3CoverageToColorLocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3CoverageToColorLocation(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageToColorLocation(segment, 0L); } + /// {@return `extendedDynamicState3CoverageToColorLocation` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3CoverageToColorLocationAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageToColorLocation(this.segment(), index); } + /// {@return `extendedDynamicState3CoverageToColorLocation`} + public @CType("VkBool32") int extendedDynamicState3CoverageToColorLocation() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageToColorLocation(this.segment()); } + /// Sets `extendedDynamicState3CoverageToColorLocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3CoverageToColorLocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3CoverageToColorLocation.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3CoverageToColorLocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3CoverageToColorLocation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageToColorLocation(segment, 0L, value); } + /// Sets `extendedDynamicState3CoverageToColorLocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageToColorLocationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageToColorLocation(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3CoverageToColorLocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageToColorLocation(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageToColorLocation(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3CoverageModulationMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3CoverageModulationMode(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3CoverageModulationMode.get(segment, 0L, index); } + /// {@return `extendedDynamicState3CoverageModulationMode`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3CoverageModulationMode(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageModulationMode(segment, 0L); } + /// {@return `extendedDynamicState3CoverageModulationMode` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3CoverageModulationModeAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageModulationMode(this.segment(), index); } + /// {@return `extendedDynamicState3CoverageModulationMode`} + public @CType("VkBool32") int extendedDynamicState3CoverageModulationMode() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageModulationMode(this.segment()); } + /// Sets `extendedDynamicState3CoverageModulationMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3CoverageModulationMode(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3CoverageModulationMode.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3CoverageModulationMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3CoverageModulationMode(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageModulationMode(segment, 0L, value); } + /// Sets `extendedDynamicState3CoverageModulationMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageModulationModeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageModulationMode(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3CoverageModulationMode` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageModulationMode(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageModulationMode(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3CoverageModulationTableEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3CoverageModulationTableEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3CoverageModulationTableEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3CoverageModulationTableEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3CoverageModulationTableEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageModulationTableEnable(segment, 0L); } + /// {@return `extendedDynamicState3CoverageModulationTableEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3CoverageModulationTableEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageModulationTableEnable(this.segment(), index); } + /// {@return `extendedDynamicState3CoverageModulationTableEnable`} + public @CType("VkBool32") int extendedDynamicState3CoverageModulationTableEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageModulationTableEnable(this.segment()); } + /// Sets `extendedDynamicState3CoverageModulationTableEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3CoverageModulationTableEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3CoverageModulationTableEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3CoverageModulationTableEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3CoverageModulationTableEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageModulationTableEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3CoverageModulationTableEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageModulationTableEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageModulationTableEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3CoverageModulationTableEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageModulationTableEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageModulationTableEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3CoverageModulationTable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3CoverageModulationTable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3CoverageModulationTable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3CoverageModulationTable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3CoverageModulationTable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageModulationTable(segment, 0L); } + /// {@return `extendedDynamicState3CoverageModulationTable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3CoverageModulationTableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageModulationTable(this.segment(), index); } + /// {@return `extendedDynamicState3CoverageModulationTable`} + public @CType("VkBool32") int extendedDynamicState3CoverageModulationTable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageModulationTable(this.segment()); } + /// Sets `extendedDynamicState3CoverageModulationTable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3CoverageModulationTable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3CoverageModulationTable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3CoverageModulationTable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3CoverageModulationTable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageModulationTable(segment, 0L, value); } + /// Sets `extendedDynamicState3CoverageModulationTable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageModulationTableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageModulationTable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3CoverageModulationTable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageModulationTable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageModulationTable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3CoverageReductionMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3CoverageReductionMode(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3CoverageReductionMode.get(segment, 0L, index); } + /// {@return `extendedDynamicState3CoverageReductionMode`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3CoverageReductionMode(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageReductionMode(segment, 0L); } + /// {@return `extendedDynamicState3CoverageReductionMode` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3CoverageReductionModeAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageReductionMode(this.segment(), index); } + /// {@return `extendedDynamicState3CoverageReductionMode`} + public @CType("VkBool32") int extendedDynamicState3CoverageReductionMode() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3CoverageReductionMode(this.segment()); } + /// Sets `extendedDynamicState3CoverageReductionMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3CoverageReductionMode(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3CoverageReductionMode.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3CoverageReductionMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3CoverageReductionMode(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageReductionMode(segment, 0L, value); } + /// Sets `extendedDynamicState3CoverageReductionMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageReductionModeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageReductionMode(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3CoverageReductionMode` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3CoverageReductionMode(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3CoverageReductionMode(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3RepresentativeFragmentTestEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3RepresentativeFragmentTestEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3RepresentativeFragmentTestEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3RepresentativeFragmentTestEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3RepresentativeFragmentTestEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3RepresentativeFragmentTestEnable(segment, 0L); } + /// {@return `extendedDynamicState3RepresentativeFragmentTestEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3RepresentativeFragmentTestEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3RepresentativeFragmentTestEnable(this.segment(), index); } + /// {@return `extendedDynamicState3RepresentativeFragmentTestEnable`} + public @CType("VkBool32") int extendedDynamicState3RepresentativeFragmentTestEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3RepresentativeFragmentTestEnable(this.segment()); } + /// Sets `extendedDynamicState3RepresentativeFragmentTestEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3RepresentativeFragmentTestEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3RepresentativeFragmentTestEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3RepresentativeFragmentTestEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3RepresentativeFragmentTestEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3RepresentativeFragmentTestEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3RepresentativeFragmentTestEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3RepresentativeFragmentTestEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3RepresentativeFragmentTestEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3RepresentativeFragmentTestEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3RepresentativeFragmentTestEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3RepresentativeFragmentTestEnable(this.segment(), value); return this; } + + /// {@return `extendedDynamicState3ShadingRateImageEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState3ShadingRateImageEnable(MemorySegment segment, long index) { return (int) VH_extendedDynamicState3ShadingRateImageEnable.get(segment, 0L, index); } + /// {@return `extendedDynamicState3ShadingRateImageEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState3ShadingRateImageEnable(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ShadingRateImageEnable(segment, 0L); } + /// {@return `extendedDynamicState3ShadingRateImageEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicState3ShadingRateImageEnableAt(long index) { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ShadingRateImageEnable(this.segment(), index); } + /// {@return `extendedDynamicState3ShadingRateImageEnable`} + public @CType("VkBool32") int extendedDynamicState3ShadingRateImageEnable() { return VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.get_extendedDynamicState3ShadingRateImageEnable(this.segment()); } + /// Sets `extendedDynamicState3ShadingRateImageEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState3ShadingRateImageEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState3ShadingRateImageEnable.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState3ShadingRateImageEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState3ShadingRateImageEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ShadingRateImageEnable(segment, 0L, value); } + /// Sets `extendedDynamicState3ShadingRateImageEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ShadingRateImageEnableAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ShadingRateImageEnable(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState3ShadingRateImageEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3FeaturesEXT extendedDynamicState3ShadingRateImageEnable(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.set_extendedDynamicState3ShadingRateImageEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.java new file mode 100644 index 00000000..2fd382cb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dynamicPrimitiveTopologyUnrestricted +/// [VarHandle][#VH_dynamicPrimitiveTopologyUnrestricted] - [Getter][#dynamicPrimitiveTopologyUnrestricted()] - [Setter][#dynamicPrimitiveTopologyUnrestricted(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExtendedDynamicState3PropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 dynamicPrimitiveTopologyUnrestricted; +/// } VkPhysicalDeviceExtendedDynamicState3PropertiesEXT; +/// ``` +public final class VkPhysicalDeviceExtendedDynamicState3PropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceExtendedDynamicState3PropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("dynamicPrimitiveTopologyUnrestricted") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dynamicPrimitiveTopologyUnrestricted` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicPrimitiveTopologyUnrestricted = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicPrimitiveTopologyUnrestricted")); + + /// Creates `VkPhysicalDeviceExtendedDynamicState3PropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExtendedDynamicState3PropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExtendedDynamicState3PropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicState3PropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicState3PropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceExtendedDynamicState3PropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicState3PropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicState3PropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExtendedDynamicState3PropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicState3PropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicState3PropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExtendedDynamicState3PropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExtendedDynamicState3PropertiesEXT` + public static VkPhysicalDeviceExtendedDynamicState3PropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExtendedDynamicState3PropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExtendedDynamicState3PropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExtendedDynamicState3PropertiesEXT` + public static VkPhysicalDeviceExtendedDynamicState3PropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExtendedDynamicState3PropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3PropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3PropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3PropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3PropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `dynamicPrimitiveTopologyUnrestricted` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dynamicPrimitiveTopologyUnrestricted(MemorySegment segment, long index) { return (int) VH_dynamicPrimitiveTopologyUnrestricted.get(segment, 0L, index); } + /// {@return `dynamicPrimitiveTopologyUnrestricted`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dynamicPrimitiveTopologyUnrestricted(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.get_dynamicPrimitiveTopologyUnrestricted(segment, 0L); } + /// {@return `dynamicPrimitiveTopologyUnrestricted` at the given index} + /// @param index the index + public @CType("VkBool32") int dynamicPrimitiveTopologyUnrestrictedAt(long index) { return VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.get_dynamicPrimitiveTopologyUnrestricted(this.segment(), index); } + /// {@return `dynamicPrimitiveTopologyUnrestricted`} + public @CType("VkBool32") int dynamicPrimitiveTopologyUnrestricted() { return VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.get_dynamicPrimitiveTopologyUnrestricted(this.segment()); } + /// Sets `dynamicPrimitiveTopologyUnrestricted` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicPrimitiveTopologyUnrestricted(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dynamicPrimitiveTopologyUnrestricted.set(segment, 0L, index, value); } + /// Sets `dynamicPrimitiveTopologyUnrestricted` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicPrimitiveTopologyUnrestricted(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.set_dynamicPrimitiveTopologyUnrestricted(segment, 0L, value); } + /// Sets `dynamicPrimitiveTopologyUnrestricted` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3PropertiesEXT dynamicPrimitiveTopologyUnrestrictedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.set_dynamicPrimitiveTopologyUnrestricted(this.segment(), index, value); return this; } + /// Sets `dynamicPrimitiveTopologyUnrestricted` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicState3PropertiesEXT dynamicPrimitiveTopologyUnrestricted(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.set_dynamicPrimitiveTopologyUnrestricted(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.java new file mode 100644 index 00000000..195910bb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### extendedDynamicState +/// [VarHandle][#VH_extendedDynamicState] - [Getter][#extendedDynamicState()] - [Setter][#extendedDynamicState(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExtendedDynamicStateFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 extendedDynamicState; +/// } VkPhysicalDeviceExtendedDynamicStateFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceExtendedDynamicStateFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("extendedDynamicState") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `extendedDynamicState` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedDynamicState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedDynamicState")); + + /// Creates `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicStateFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicStateFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedDynamicStateFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT` + public static VkPhysicalDeviceExtendedDynamicStateFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExtendedDynamicStateFeaturesEXT` + public static VkPhysicalDeviceExtendedDynamicStateFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicStateFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicStateFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicStateFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicStateFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `extendedDynamicState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedDynamicState(MemorySegment segment, long index) { return (int) VH_extendedDynamicState.get(segment, 0L, index); } + /// {@return `extendedDynamicState`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedDynamicState(MemorySegment segment) { return VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.get_extendedDynamicState(segment, 0L); } + /// {@return `extendedDynamicState` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedDynamicStateAt(long index) { return VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.get_extendedDynamicState(this.segment(), index); } + /// {@return `extendedDynamicState`} + public @CType("VkBool32") int extendedDynamicState() { return VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.get_extendedDynamicState(this.segment()); } + /// Sets `extendedDynamicState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedDynamicState(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedDynamicState.set(segment, 0L, index, value); } + /// Sets `extendedDynamicState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedDynamicState(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.set_extendedDynamicState(segment, 0L, value); } + /// Sets `extendedDynamicState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicStateFeaturesEXT extendedDynamicStateAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.set_extendedDynamicState(this.segment(), index, value); return this; } + /// Sets `extendedDynamicState` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedDynamicStateFeaturesEXT extendedDynamicState(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.set_extendedDynamicState(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExternalMemoryHostPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExternalMemoryHostPropertiesEXT.java new file mode 100644 index 00000000..87b0a425 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceExternalMemoryHostPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minImportedHostPointerAlignment +/// [VarHandle][#VH_minImportedHostPointerAlignment] - [Getter][#minImportedHostPointerAlignment()] - [Setter][#minImportedHostPointerAlignment(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize minImportedHostPointerAlignment; +/// } VkPhysicalDeviceExternalMemoryHostPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceExternalMemoryHostPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalMemoryHostPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("minImportedHostPointerAlignment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minImportedHostPointerAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_minImportedHostPointerAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minImportedHostPointerAlignment")); + + /// Creates `VkPhysicalDeviceExternalMemoryHostPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalMemoryHostPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalMemoryHostPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemoryHostPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemoryHostPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceExternalMemoryHostPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemoryHostPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemoryHostPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalMemoryHostPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemoryHostPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemoryHostPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalMemoryHostPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalMemoryHostPropertiesEXT` + public static VkPhysicalDeviceExternalMemoryHostPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalMemoryHostPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalMemoryHostPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalMemoryHostPropertiesEXT` + public static VkPhysicalDeviceExternalMemoryHostPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalMemoryHostPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalMemoryHostPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalMemoryHostPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalMemoryHostPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemoryHostPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryHostPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemoryHostPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryHostPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemoryHostPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalMemoryHostPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalMemoryHostPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalMemoryHostPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemoryHostPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryHostPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemoryHostPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryHostPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemoryHostPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `minImportedHostPointerAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_minImportedHostPointerAlignment(MemorySegment segment, long index) { return (long) VH_minImportedHostPointerAlignment.get(segment, 0L, index); } + /// {@return `minImportedHostPointerAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_minImportedHostPointerAlignment(MemorySegment segment) { return VkPhysicalDeviceExternalMemoryHostPropertiesEXT.get_minImportedHostPointerAlignment(segment, 0L); } + /// {@return `minImportedHostPointerAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long minImportedHostPointerAlignmentAt(long index) { return VkPhysicalDeviceExternalMemoryHostPropertiesEXT.get_minImportedHostPointerAlignment(this.segment(), index); } + /// {@return `minImportedHostPointerAlignment`} + public @CType("VkDeviceSize") long minImportedHostPointerAlignment() { return VkPhysicalDeviceExternalMemoryHostPropertiesEXT.get_minImportedHostPointerAlignment(this.segment()); } + /// Sets `minImportedHostPointerAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minImportedHostPointerAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_minImportedHostPointerAlignment.set(segment, 0L, index, value); } + /// Sets `minImportedHostPointerAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minImportedHostPointerAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceExternalMemoryHostPropertiesEXT.set_minImportedHostPointerAlignment(segment, 0L, value); } + /// Sets `minImportedHostPointerAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryHostPropertiesEXT minImportedHostPointerAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceExternalMemoryHostPropertiesEXT.set_minImportedHostPointerAlignment(this.segment(), index, value); return this; } + /// Sets `minImportedHostPointerAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryHostPropertiesEXT minImportedHostPointerAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceExternalMemoryHostPropertiesEXT.set_minImportedHostPointerAlignment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFaultFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFaultFeaturesEXT.java new file mode 100644 index 00000000..a747d57a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFaultFeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceFault +/// [VarHandle][#VH_deviceFault] - [Getter][#deviceFault()] - [Setter][#deviceFault(int)] +/// ### deviceFaultVendorBinary +/// [VarHandle][#VH_deviceFaultVendorBinary] - [Getter][#deviceFaultVendorBinary()] - [Setter][#deviceFaultVendorBinary(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFaultFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 deviceFault; +/// VkBool32 deviceFaultVendorBinary; +/// } VkPhysicalDeviceFaultFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceFaultFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceFaultFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceFault"), + ValueLayout.JAVA_INT.withName("deviceFaultVendorBinary") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceFault` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceFault = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceFault")); + /// The [VarHandle] of `deviceFaultVendorBinary` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceFaultVendorBinary = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceFaultVendorBinary")); + + /// Creates `VkPhysicalDeviceFaultFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFaultFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFaultFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFaultFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFaultFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceFaultFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFaultFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFaultFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFaultFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFaultFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFaultFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFaultFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFaultFeaturesEXT` + public static VkPhysicalDeviceFaultFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFaultFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFaultFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFaultFeaturesEXT` + public static VkPhysicalDeviceFaultFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFaultFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFaultFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFaultFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFaultFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFaultFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFaultFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFaultFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFaultFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFaultFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFaultFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFaultFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFaultFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFaultFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFaultFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFaultFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFaultFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFaultFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceFault` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceFault(MemorySegment segment, long index) { return (int) VH_deviceFault.get(segment, 0L, index); } + /// {@return `deviceFault`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceFault(MemorySegment segment) { return VkPhysicalDeviceFaultFeaturesEXT.get_deviceFault(segment, 0L); } + /// {@return `deviceFault` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceFaultAt(long index) { return VkPhysicalDeviceFaultFeaturesEXT.get_deviceFault(this.segment(), index); } + /// {@return `deviceFault`} + public @CType("VkBool32") int deviceFault() { return VkPhysicalDeviceFaultFeaturesEXT.get_deviceFault(this.segment()); } + /// Sets `deviceFault` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceFault(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceFault.set(segment, 0L, index, value); } + /// Sets `deviceFault` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceFault(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFaultFeaturesEXT.set_deviceFault(segment, 0L, value); } + /// Sets `deviceFault` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFaultFeaturesEXT deviceFaultAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFaultFeaturesEXT.set_deviceFault(this.segment(), index, value); return this; } + /// Sets `deviceFault` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFaultFeaturesEXT deviceFault(@CType("VkBool32") int value) { VkPhysicalDeviceFaultFeaturesEXT.set_deviceFault(this.segment(), value); return this; } + + /// {@return `deviceFaultVendorBinary` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceFaultVendorBinary(MemorySegment segment, long index) { return (int) VH_deviceFaultVendorBinary.get(segment, 0L, index); } + /// {@return `deviceFaultVendorBinary`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceFaultVendorBinary(MemorySegment segment) { return VkPhysicalDeviceFaultFeaturesEXT.get_deviceFaultVendorBinary(segment, 0L); } + /// {@return `deviceFaultVendorBinary` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceFaultVendorBinaryAt(long index) { return VkPhysicalDeviceFaultFeaturesEXT.get_deviceFaultVendorBinary(this.segment(), index); } + /// {@return `deviceFaultVendorBinary`} + public @CType("VkBool32") int deviceFaultVendorBinary() { return VkPhysicalDeviceFaultFeaturesEXT.get_deviceFaultVendorBinary(this.segment()); } + /// Sets `deviceFaultVendorBinary` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceFaultVendorBinary(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceFaultVendorBinary.set(segment, 0L, index, value); } + /// Sets `deviceFaultVendorBinary` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceFaultVendorBinary(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFaultFeaturesEXT.set_deviceFaultVendorBinary(segment, 0L, value); } + /// Sets `deviceFaultVendorBinary` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFaultFeaturesEXT deviceFaultVendorBinaryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFaultFeaturesEXT.set_deviceFaultVendorBinary(this.segment(), index, value); return this; } + /// Sets `deviceFaultVendorBinary` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFaultFeaturesEXT deviceFaultVendorBinary(@CType("VkBool32") int value) { VkPhysicalDeviceFaultFeaturesEXT.set_deviceFaultVendorBinary(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.java new file mode 100644 index 00000000..533da89d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fragmentDensityMapDeferred +/// [VarHandle][#VH_fragmentDensityMapDeferred] - [Getter][#fragmentDensityMapDeferred()] - [Setter][#fragmentDensityMapDeferred(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentDensityMap2FeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 fragmentDensityMapDeferred; +/// } VkPhysicalDeviceFragmentDensityMap2FeaturesEXT; +/// ``` +public final class VkPhysicalDeviceFragmentDensityMap2FeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("fragmentDensityMapDeferred") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fragmentDensityMapDeferred` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentDensityMapDeferred = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentDensityMapDeferred")); + + /// Creates `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentDensityMap2FeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMap2FeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMap2FeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMap2FeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMap2FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMap2FeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMap2FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT` + public static VkPhysicalDeviceFragmentDensityMap2FeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentDensityMap2FeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentDensityMap2FeaturesEXT` + public static VkPhysicalDeviceFragmentDensityMap2FeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentDensityMap2FeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2FeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2FeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2FeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2FeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `fragmentDensityMapDeferred` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentDensityMapDeferred(MemorySegment segment, long index) { return (int) VH_fragmentDensityMapDeferred.get(segment, 0L, index); } + /// {@return `fragmentDensityMapDeferred`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentDensityMapDeferred(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.get_fragmentDensityMapDeferred(segment, 0L); } + /// {@return `fragmentDensityMapDeferred` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentDensityMapDeferredAt(long index) { return VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.get_fragmentDensityMapDeferred(this.segment(), index); } + /// {@return `fragmentDensityMapDeferred`} + public @CType("VkBool32") int fragmentDensityMapDeferred() { return VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.get_fragmentDensityMapDeferred(this.segment()); } + /// Sets `fragmentDensityMapDeferred` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentDensityMapDeferred(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentDensityMapDeferred.set(segment, 0L, index, value); } + /// Sets `fragmentDensityMapDeferred` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentDensityMapDeferred(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.set_fragmentDensityMapDeferred(segment, 0L, value); } + /// Sets `fragmentDensityMapDeferred` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2FeaturesEXT fragmentDensityMapDeferredAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.set_fragmentDensityMapDeferred(this.segment(), index, value); return this; } + /// Sets `fragmentDensityMapDeferred` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2FeaturesEXT fragmentDensityMapDeferred(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.set_fragmentDensityMapDeferred(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.java new file mode 100644 index 00000000..9e2d7cc5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### subsampledLoads +/// [VarHandle][#VH_subsampledLoads] - [Getter][#subsampledLoads()] - [Setter][#subsampledLoads(int)] +/// ### subsampledCoarseReconstructionEarlyAccess +/// [VarHandle][#VH_subsampledCoarseReconstructionEarlyAccess] - [Getter][#subsampledCoarseReconstructionEarlyAccess()] - [Setter][#subsampledCoarseReconstructionEarlyAccess(int)] +/// ### maxSubsampledArrayLayers +/// [VarHandle][#VH_maxSubsampledArrayLayers] - [Getter][#maxSubsampledArrayLayers()] - [Setter][#maxSubsampledArrayLayers(int)] +/// ### maxDescriptorSetSubsampledSamplers +/// [VarHandle][#VH_maxDescriptorSetSubsampledSamplers] - [Getter][#maxDescriptorSetSubsampledSamplers()] - [Setter][#maxDescriptorSetSubsampledSamplers(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentDensityMap2PropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 subsampledLoads; +/// VkBool32 subsampledCoarseReconstructionEarlyAccess; +/// uint32_t maxSubsampledArrayLayers; +/// uint32_t maxDescriptorSetSubsampledSamplers; +/// } VkPhysicalDeviceFragmentDensityMap2PropertiesEXT; +/// ``` +public final class VkPhysicalDeviceFragmentDensityMap2PropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("subsampledLoads"), + ValueLayout.JAVA_INT.withName("subsampledCoarseReconstructionEarlyAccess"), + ValueLayout.JAVA_INT.withName("maxSubsampledArrayLayers"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetSubsampledSamplers") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `subsampledLoads` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subsampledLoads = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subsampledLoads")); + /// The [VarHandle] of `subsampledCoarseReconstructionEarlyAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subsampledCoarseReconstructionEarlyAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subsampledCoarseReconstructionEarlyAccess")); + /// The [VarHandle] of `maxSubsampledArrayLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSubsampledArrayLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSubsampledArrayLayers")); + /// The [VarHandle] of `maxDescriptorSetSubsampledSamplers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetSubsampledSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetSubsampledSamplers")); + + /// Creates `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMap2PropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMap2PropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMap2PropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMap2PropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMap2PropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMap2PropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT` + public static VkPhysicalDeviceFragmentDensityMap2PropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentDensityMap2PropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentDensityMap2PropertiesEXT` + public static VkPhysicalDeviceFragmentDensityMap2PropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentDensityMap2PropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `subsampledLoads` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_subsampledLoads(MemorySegment segment, long index) { return (int) VH_subsampledLoads.get(segment, 0L, index); } + /// {@return `subsampledLoads`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_subsampledLoads(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_subsampledLoads(segment, 0L); } + /// {@return `subsampledLoads` at the given index} + /// @param index the index + public @CType("VkBool32") int subsampledLoadsAt(long index) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_subsampledLoads(this.segment(), index); } + /// {@return `subsampledLoads`} + public @CType("VkBool32") int subsampledLoads() { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_subsampledLoads(this.segment()); } + /// Sets `subsampledLoads` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subsampledLoads(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_subsampledLoads.set(segment, 0L, index, value); } + /// Sets `subsampledLoads` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subsampledLoads(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_subsampledLoads(segment, 0L, value); } + /// Sets `subsampledLoads` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT subsampledLoadsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_subsampledLoads(this.segment(), index, value); return this; } + /// Sets `subsampledLoads` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT subsampledLoads(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_subsampledLoads(this.segment(), value); return this; } + + /// {@return `subsampledCoarseReconstructionEarlyAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_subsampledCoarseReconstructionEarlyAccess(MemorySegment segment, long index) { return (int) VH_subsampledCoarseReconstructionEarlyAccess.get(segment, 0L, index); } + /// {@return `subsampledCoarseReconstructionEarlyAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_subsampledCoarseReconstructionEarlyAccess(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_subsampledCoarseReconstructionEarlyAccess(segment, 0L); } + /// {@return `subsampledCoarseReconstructionEarlyAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int subsampledCoarseReconstructionEarlyAccessAt(long index) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_subsampledCoarseReconstructionEarlyAccess(this.segment(), index); } + /// {@return `subsampledCoarseReconstructionEarlyAccess`} + public @CType("VkBool32") int subsampledCoarseReconstructionEarlyAccess() { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_subsampledCoarseReconstructionEarlyAccess(this.segment()); } + /// Sets `subsampledCoarseReconstructionEarlyAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subsampledCoarseReconstructionEarlyAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_subsampledCoarseReconstructionEarlyAccess.set(segment, 0L, index, value); } + /// Sets `subsampledCoarseReconstructionEarlyAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subsampledCoarseReconstructionEarlyAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_subsampledCoarseReconstructionEarlyAccess(segment, 0L, value); } + /// Sets `subsampledCoarseReconstructionEarlyAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT subsampledCoarseReconstructionEarlyAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_subsampledCoarseReconstructionEarlyAccess(this.segment(), index, value); return this; } + /// Sets `subsampledCoarseReconstructionEarlyAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT subsampledCoarseReconstructionEarlyAccess(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_subsampledCoarseReconstructionEarlyAccess(this.segment(), value); return this; } + + /// {@return `maxSubsampledArrayLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSubsampledArrayLayers(MemorySegment segment, long index) { return (int) VH_maxSubsampledArrayLayers.get(segment, 0L, index); } + /// {@return `maxSubsampledArrayLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSubsampledArrayLayers(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_maxSubsampledArrayLayers(segment, 0L); } + /// {@return `maxSubsampledArrayLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSubsampledArrayLayersAt(long index) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_maxSubsampledArrayLayers(this.segment(), index); } + /// {@return `maxSubsampledArrayLayers`} + public @CType("uint32_t") int maxSubsampledArrayLayers() { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_maxSubsampledArrayLayers(this.segment()); } + /// Sets `maxSubsampledArrayLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSubsampledArrayLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSubsampledArrayLayers.set(segment, 0L, index, value); } + /// Sets `maxSubsampledArrayLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSubsampledArrayLayers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_maxSubsampledArrayLayers(segment, 0L, value); } + /// Sets `maxSubsampledArrayLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT maxSubsampledArrayLayersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_maxSubsampledArrayLayers(this.segment(), index, value); return this; } + /// Sets `maxSubsampledArrayLayers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT maxSubsampledArrayLayers(@CType("uint32_t") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_maxSubsampledArrayLayers(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetSubsampledSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetSubsampledSamplers(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetSubsampledSamplers.get(segment, 0L, index); } + /// {@return `maxDescriptorSetSubsampledSamplers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetSubsampledSamplers(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_maxDescriptorSetSubsampledSamplers(segment, 0L); } + /// {@return `maxDescriptorSetSubsampledSamplers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetSubsampledSamplersAt(long index) { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_maxDescriptorSetSubsampledSamplers(this.segment(), index); } + /// {@return `maxDescriptorSetSubsampledSamplers`} + public @CType("uint32_t") int maxDescriptorSetSubsampledSamplers() { return VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.get_maxDescriptorSetSubsampledSamplers(this.segment()); } + /// Sets `maxDescriptorSetSubsampledSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetSubsampledSamplers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetSubsampledSamplers.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetSubsampledSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetSubsampledSamplers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_maxDescriptorSetSubsampledSamplers(segment, 0L, value); } + /// Sets `maxDescriptorSetSubsampledSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT maxDescriptorSetSubsampledSamplersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_maxDescriptorSetSubsampledSamplers(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetSubsampledSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMap2PropertiesEXT maxDescriptorSetSubsampledSamplers(@CType("uint32_t") int value) { VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.set_maxDescriptorSetSubsampledSamplers(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMapFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMapFeaturesEXT.java new file mode 100644 index 00000000..3c79c8f7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMapFeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fragmentDensityMap +/// [VarHandle][#VH_fragmentDensityMap] - [Getter][#fragmentDensityMap()] - [Setter][#fragmentDensityMap(int)] +/// ### fragmentDensityMapDynamic +/// [VarHandle][#VH_fragmentDensityMapDynamic] - [Getter][#fragmentDensityMapDynamic()] - [Setter][#fragmentDensityMapDynamic(int)] +/// ### fragmentDensityMapNonSubsampledImages +/// [VarHandle][#VH_fragmentDensityMapNonSubsampledImages] - [Getter][#fragmentDensityMapNonSubsampledImages()] - [Setter][#fragmentDensityMapNonSubsampledImages(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentDensityMapFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 fragmentDensityMap; +/// VkBool32 fragmentDensityMapDynamic; +/// VkBool32 fragmentDensityMapNonSubsampledImages; +/// } VkPhysicalDeviceFragmentDensityMapFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceFragmentDensityMapFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentDensityMapFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("fragmentDensityMap"), + ValueLayout.JAVA_INT.withName("fragmentDensityMapDynamic"), + ValueLayout.JAVA_INT.withName("fragmentDensityMapNonSubsampledImages") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fragmentDensityMap` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentDensityMap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentDensityMap")); + /// The [VarHandle] of `fragmentDensityMapDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentDensityMapDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentDensityMapDynamic")); + /// The [VarHandle] of `fragmentDensityMapNonSubsampledImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentDensityMapNonSubsampledImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentDensityMapNonSubsampledImages")); + + /// Creates `VkPhysicalDeviceFragmentDensityMapFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMapFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentDensityMapFeaturesEXT` + public static VkPhysicalDeviceFragmentDensityMapFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentDensityMapFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMapFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentDensityMapFeaturesEXT` + public static VkPhysicalDeviceFragmentDensityMapFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentDensityMapFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `fragmentDensityMap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentDensityMap(MemorySegment segment, long index) { return (int) VH_fragmentDensityMap.get(segment, 0L, index); } + /// {@return `fragmentDensityMap`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentDensityMap(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_fragmentDensityMap(segment, 0L); } + /// {@return `fragmentDensityMap` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentDensityMapAt(long index) { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_fragmentDensityMap(this.segment(), index); } + /// {@return `fragmentDensityMap`} + public @CType("VkBool32") int fragmentDensityMap() { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_fragmentDensityMap(this.segment()); } + /// Sets `fragmentDensityMap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentDensityMap(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentDensityMap.set(segment, 0L, index, value); } + /// Sets `fragmentDensityMap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentDensityMap(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_fragmentDensityMap(segment, 0L, value); } + /// Sets `fragmentDensityMap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT fragmentDensityMapAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_fragmentDensityMap(this.segment(), index, value); return this; } + /// Sets `fragmentDensityMap` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT fragmentDensityMap(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_fragmentDensityMap(this.segment(), value); return this; } + + /// {@return `fragmentDensityMapDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentDensityMapDynamic(MemorySegment segment, long index) { return (int) VH_fragmentDensityMapDynamic.get(segment, 0L, index); } + /// {@return `fragmentDensityMapDynamic`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentDensityMapDynamic(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_fragmentDensityMapDynamic(segment, 0L); } + /// {@return `fragmentDensityMapDynamic` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentDensityMapDynamicAt(long index) { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_fragmentDensityMapDynamic(this.segment(), index); } + /// {@return `fragmentDensityMapDynamic`} + public @CType("VkBool32") int fragmentDensityMapDynamic() { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_fragmentDensityMapDynamic(this.segment()); } + /// Sets `fragmentDensityMapDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentDensityMapDynamic(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentDensityMapDynamic.set(segment, 0L, index, value); } + /// Sets `fragmentDensityMapDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentDensityMapDynamic(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_fragmentDensityMapDynamic(segment, 0L, value); } + /// Sets `fragmentDensityMapDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT fragmentDensityMapDynamicAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_fragmentDensityMapDynamic(this.segment(), index, value); return this; } + /// Sets `fragmentDensityMapDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT fragmentDensityMapDynamic(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_fragmentDensityMapDynamic(this.segment(), value); return this; } + + /// {@return `fragmentDensityMapNonSubsampledImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentDensityMapNonSubsampledImages(MemorySegment segment, long index) { return (int) VH_fragmentDensityMapNonSubsampledImages.get(segment, 0L, index); } + /// {@return `fragmentDensityMapNonSubsampledImages`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentDensityMapNonSubsampledImages(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_fragmentDensityMapNonSubsampledImages(segment, 0L); } + /// {@return `fragmentDensityMapNonSubsampledImages` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentDensityMapNonSubsampledImagesAt(long index) { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_fragmentDensityMapNonSubsampledImages(this.segment(), index); } + /// {@return `fragmentDensityMapNonSubsampledImages`} + public @CType("VkBool32") int fragmentDensityMapNonSubsampledImages() { return VkPhysicalDeviceFragmentDensityMapFeaturesEXT.get_fragmentDensityMapNonSubsampledImages(this.segment()); } + /// Sets `fragmentDensityMapNonSubsampledImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentDensityMapNonSubsampledImages(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentDensityMapNonSubsampledImages.set(segment, 0L, index, value); } + /// Sets `fragmentDensityMapNonSubsampledImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentDensityMapNonSubsampledImages(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_fragmentDensityMapNonSubsampledImages(segment, 0L, value); } + /// Sets `fragmentDensityMapNonSubsampledImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT fragmentDensityMapNonSubsampledImagesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_fragmentDensityMapNonSubsampledImages(this.segment(), index, value); return this; } + /// Sets `fragmentDensityMapNonSubsampledImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapFeaturesEXT fragmentDensityMapNonSubsampledImages(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapFeaturesEXT.set_fragmentDensityMapNonSubsampledImages(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMapPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMapPropertiesEXT.java new file mode 100644 index 00000000..e9cc4360 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentDensityMapPropertiesEXT.java @@ -0,0 +1,263 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minFragmentDensityTexelSize +/// [Byte offset][#OFFSET_minFragmentDensityTexelSize] - [Memory layout][#ML_minFragmentDensityTexelSize] - [Getter][#minFragmentDensityTexelSize()] - [Setter][#minFragmentDensityTexelSize(java.lang.foreign.MemorySegment)] +/// ### maxFragmentDensityTexelSize +/// [Byte offset][#OFFSET_maxFragmentDensityTexelSize] - [Memory layout][#ML_maxFragmentDensityTexelSize] - [Getter][#maxFragmentDensityTexelSize()] - [Setter][#maxFragmentDensityTexelSize(java.lang.foreign.MemorySegment)] +/// ### fragmentDensityInvocations +/// [VarHandle][#VH_fragmentDensityInvocations] - [Getter][#fragmentDensityInvocations()] - [Setter][#fragmentDensityInvocations(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentDensityMapPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkExtent2D minFragmentDensityTexelSize; +/// VkExtent2D maxFragmentDensityTexelSize; +/// VkBool32 fragmentDensityInvocations; +/// } VkPhysicalDeviceFragmentDensityMapPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceFragmentDensityMapPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentDensityMapPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("minFragmentDensityTexelSize"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxFragmentDensityTexelSize"), + ValueLayout.JAVA_INT.withName("fragmentDensityInvocations") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `minFragmentDensityTexelSize`. + public static final long OFFSET_minFragmentDensityTexelSize = LAYOUT.byteOffset(PathElement.groupElement("minFragmentDensityTexelSize")); + /// The memory layout of `minFragmentDensityTexelSize`. + public static final MemoryLayout ML_minFragmentDensityTexelSize = LAYOUT.select(PathElement.groupElement("minFragmentDensityTexelSize")); + /// The byte offset of `maxFragmentDensityTexelSize`. + public static final long OFFSET_maxFragmentDensityTexelSize = LAYOUT.byteOffset(PathElement.groupElement("maxFragmentDensityTexelSize")); + /// The memory layout of `maxFragmentDensityTexelSize`. + public static final MemoryLayout ML_maxFragmentDensityTexelSize = LAYOUT.select(PathElement.groupElement("maxFragmentDensityTexelSize")); + /// The [VarHandle] of `fragmentDensityInvocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentDensityInvocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentDensityInvocations")); + + /// Creates `VkPhysicalDeviceFragmentDensityMapPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMapPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentDensityMapPropertiesEXT` + public static VkPhysicalDeviceFragmentDensityMapPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentDensityMapPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMapPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentDensityMapPropertiesEXT` + public static VkPhysicalDeviceFragmentDensityMapPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentDensityMapPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `minFragmentDensityTexelSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minFragmentDensityTexelSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minFragmentDensityTexelSize, index), ML_minFragmentDensityTexelSize); } + /// {@return `minFragmentDensityTexelSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minFragmentDensityTexelSize(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_minFragmentDensityTexelSize(segment, 0L); } + /// {@return `minFragmentDensityTexelSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minFragmentDensityTexelSizeAt(long index) { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_minFragmentDensityTexelSize(this.segment(), index); } + /// {@return `minFragmentDensityTexelSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minFragmentDensityTexelSize() { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_minFragmentDensityTexelSize(this.segment()); } + /// Sets `minFragmentDensityTexelSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minFragmentDensityTexelSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minFragmentDensityTexelSize, index), ML_minFragmentDensityTexelSize.byteSize()); } + /// Sets `minFragmentDensityTexelSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minFragmentDensityTexelSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_minFragmentDensityTexelSize(segment, 0L, value); } + /// Sets `minFragmentDensityTexelSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT minFragmentDensityTexelSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_minFragmentDensityTexelSize(this.segment(), index, value); return this; } + /// Sets `minFragmentDensityTexelSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT minFragmentDensityTexelSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_minFragmentDensityTexelSize(this.segment(), value); return this; } + + /// {@return `maxFragmentDensityTexelSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxFragmentDensityTexelSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxFragmentDensityTexelSize, index), ML_maxFragmentDensityTexelSize); } + /// {@return `maxFragmentDensityTexelSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxFragmentDensityTexelSize(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_maxFragmentDensityTexelSize(segment, 0L); } + /// {@return `maxFragmentDensityTexelSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxFragmentDensityTexelSizeAt(long index) { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_maxFragmentDensityTexelSize(this.segment(), index); } + /// {@return `maxFragmentDensityTexelSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxFragmentDensityTexelSize() { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_maxFragmentDensityTexelSize(this.segment()); } + /// Sets `maxFragmentDensityTexelSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentDensityTexelSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxFragmentDensityTexelSize, index), ML_maxFragmentDensityTexelSize.byteSize()); } + /// Sets `maxFragmentDensityTexelSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentDensityTexelSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_maxFragmentDensityTexelSize(segment, 0L, value); } + /// Sets `maxFragmentDensityTexelSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT maxFragmentDensityTexelSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_maxFragmentDensityTexelSize(this.segment(), index, value); return this; } + /// Sets `maxFragmentDensityTexelSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT maxFragmentDensityTexelSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_maxFragmentDensityTexelSize(this.segment(), value); return this; } + + /// {@return `fragmentDensityInvocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentDensityInvocations(MemorySegment segment, long index) { return (int) VH_fragmentDensityInvocations.get(segment, 0L, index); } + /// {@return `fragmentDensityInvocations`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentDensityInvocations(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_fragmentDensityInvocations(segment, 0L); } + /// {@return `fragmentDensityInvocations` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentDensityInvocationsAt(long index) { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_fragmentDensityInvocations(this.segment(), index); } + /// {@return `fragmentDensityInvocations`} + public @CType("VkBool32") int fragmentDensityInvocations() { return VkPhysicalDeviceFragmentDensityMapPropertiesEXT.get_fragmentDensityInvocations(this.segment()); } + /// Sets `fragmentDensityInvocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentDensityInvocations(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentDensityInvocations.set(segment, 0L, index, value); } + /// Sets `fragmentDensityInvocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentDensityInvocations(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_fragmentDensityInvocations(segment, 0L, value); } + /// Sets `fragmentDensityInvocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT fragmentDensityInvocationsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_fragmentDensityInvocations(this.segment(), index, value); return this; } + /// Sets `fragmentDensityInvocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapPropertiesEXT fragmentDensityInvocations(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapPropertiesEXT.set_fragmentDensityInvocations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.java new file mode 100644 index 00000000..de2d4096 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fragmentShaderSampleInterlock +/// [VarHandle][#VH_fragmentShaderSampleInterlock] - [Getter][#fragmentShaderSampleInterlock()] - [Setter][#fragmentShaderSampleInterlock(int)] +/// ### fragmentShaderPixelInterlock +/// [VarHandle][#VH_fragmentShaderPixelInterlock] - [Getter][#fragmentShaderPixelInterlock()] - [Setter][#fragmentShaderPixelInterlock(int)] +/// ### fragmentShaderShadingRateInterlock +/// [VarHandle][#VH_fragmentShaderShadingRateInterlock] - [Getter][#fragmentShaderShadingRateInterlock()] - [Setter][#fragmentShaderShadingRateInterlock(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 fragmentShaderSampleInterlock; +/// VkBool32 fragmentShaderPixelInterlock; +/// VkBool32 fragmentShaderShadingRateInterlock; +/// } VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("fragmentShaderSampleInterlock"), + ValueLayout.JAVA_INT.withName("fragmentShaderPixelInterlock"), + ValueLayout.JAVA_INT.withName("fragmentShaderShadingRateInterlock") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fragmentShaderSampleInterlock` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShaderSampleInterlock = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShaderSampleInterlock")); + /// The [VarHandle] of `fragmentShaderPixelInterlock` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShaderPixelInterlock = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShaderPixelInterlock")); + /// The [VarHandle] of `fragmentShaderShadingRateInterlock` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShaderShadingRateInterlock = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShaderShadingRateInterlock")); + + /// Creates `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT` + public static VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT` + public static VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `fragmentShaderSampleInterlock` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShaderSampleInterlock(MemorySegment segment, long index) { return (int) VH_fragmentShaderSampleInterlock.get(segment, 0L, index); } + /// {@return `fragmentShaderSampleInterlock`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShaderSampleInterlock(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_fragmentShaderSampleInterlock(segment, 0L); } + /// {@return `fragmentShaderSampleInterlock` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShaderSampleInterlockAt(long index) { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_fragmentShaderSampleInterlock(this.segment(), index); } + /// {@return `fragmentShaderSampleInterlock`} + public @CType("VkBool32") int fragmentShaderSampleInterlock() { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_fragmentShaderSampleInterlock(this.segment()); } + /// Sets `fragmentShaderSampleInterlock` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShaderSampleInterlock(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShaderSampleInterlock.set(segment, 0L, index, value); } + /// Sets `fragmentShaderSampleInterlock` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShaderSampleInterlock(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_fragmentShaderSampleInterlock(segment, 0L, value); } + /// Sets `fragmentShaderSampleInterlock` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT fragmentShaderSampleInterlockAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_fragmentShaderSampleInterlock(this.segment(), index, value); return this; } + /// Sets `fragmentShaderSampleInterlock` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT fragmentShaderSampleInterlock(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_fragmentShaderSampleInterlock(this.segment(), value); return this; } + + /// {@return `fragmentShaderPixelInterlock` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShaderPixelInterlock(MemorySegment segment, long index) { return (int) VH_fragmentShaderPixelInterlock.get(segment, 0L, index); } + /// {@return `fragmentShaderPixelInterlock`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShaderPixelInterlock(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_fragmentShaderPixelInterlock(segment, 0L); } + /// {@return `fragmentShaderPixelInterlock` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShaderPixelInterlockAt(long index) { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_fragmentShaderPixelInterlock(this.segment(), index); } + /// {@return `fragmentShaderPixelInterlock`} + public @CType("VkBool32") int fragmentShaderPixelInterlock() { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_fragmentShaderPixelInterlock(this.segment()); } + /// Sets `fragmentShaderPixelInterlock` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShaderPixelInterlock(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShaderPixelInterlock.set(segment, 0L, index, value); } + /// Sets `fragmentShaderPixelInterlock` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShaderPixelInterlock(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_fragmentShaderPixelInterlock(segment, 0L, value); } + /// Sets `fragmentShaderPixelInterlock` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT fragmentShaderPixelInterlockAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_fragmentShaderPixelInterlock(this.segment(), index, value); return this; } + /// Sets `fragmentShaderPixelInterlock` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT fragmentShaderPixelInterlock(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_fragmentShaderPixelInterlock(this.segment(), value); return this; } + + /// {@return `fragmentShaderShadingRateInterlock` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShaderShadingRateInterlock(MemorySegment segment, long index) { return (int) VH_fragmentShaderShadingRateInterlock.get(segment, 0L, index); } + /// {@return `fragmentShaderShadingRateInterlock`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShaderShadingRateInterlock(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_fragmentShaderShadingRateInterlock(segment, 0L); } + /// {@return `fragmentShaderShadingRateInterlock` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShaderShadingRateInterlockAt(long index) { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_fragmentShaderShadingRateInterlock(this.segment(), index); } + /// {@return `fragmentShaderShadingRateInterlock`} + public @CType("VkBool32") int fragmentShaderShadingRateInterlock() { return VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.get_fragmentShaderShadingRateInterlock(this.segment()); } + /// Sets `fragmentShaderShadingRateInterlock` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShaderShadingRateInterlock(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShaderShadingRateInterlock.set(segment, 0L, index, value); } + /// Sets `fragmentShaderShadingRateInterlock` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShaderShadingRateInterlock(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_fragmentShaderShadingRateInterlock(segment, 0L, value); } + /// Sets `fragmentShaderShadingRateInterlock` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT fragmentShaderShadingRateInterlockAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_fragmentShaderShadingRateInterlock(this.segment(), index, value); return this; } + /// Sets `fragmentShaderShadingRateInterlock` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT fragmentShaderShadingRateInterlock(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.set_fragmentShaderShadingRateInterlock(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFrameBoundaryFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFrameBoundaryFeaturesEXT.java new file mode 100644 index 00000000..94d7cd91 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceFrameBoundaryFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### frameBoundary +/// [VarHandle][#VH_frameBoundary] - [Getter][#frameBoundary()] - [Setter][#frameBoundary(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFrameBoundaryFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 frameBoundary; +/// } VkPhysicalDeviceFrameBoundaryFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceFrameBoundaryFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceFrameBoundaryFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("frameBoundary") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `frameBoundary` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frameBoundary = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameBoundary")); + + /// Creates `VkPhysicalDeviceFrameBoundaryFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFrameBoundaryFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFrameBoundaryFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFrameBoundaryFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFrameBoundaryFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceFrameBoundaryFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFrameBoundaryFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFrameBoundaryFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFrameBoundaryFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFrameBoundaryFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFrameBoundaryFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFrameBoundaryFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFrameBoundaryFeaturesEXT` + public static VkPhysicalDeviceFrameBoundaryFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFrameBoundaryFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFrameBoundaryFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFrameBoundaryFeaturesEXT` + public static VkPhysicalDeviceFrameBoundaryFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFrameBoundaryFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFrameBoundaryFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFrameBoundaryFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFrameBoundaryFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFrameBoundaryFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFrameBoundaryFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFrameBoundaryFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFrameBoundaryFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFrameBoundaryFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFrameBoundaryFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFrameBoundaryFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFrameBoundaryFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFrameBoundaryFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFrameBoundaryFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFrameBoundaryFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFrameBoundaryFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFrameBoundaryFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `frameBoundary` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_frameBoundary(MemorySegment segment, long index) { return (int) VH_frameBoundary.get(segment, 0L, index); } + /// {@return `frameBoundary`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_frameBoundary(MemorySegment segment) { return VkPhysicalDeviceFrameBoundaryFeaturesEXT.get_frameBoundary(segment, 0L); } + /// {@return `frameBoundary` at the given index} + /// @param index the index + public @CType("VkBool32") int frameBoundaryAt(long index) { return VkPhysicalDeviceFrameBoundaryFeaturesEXT.get_frameBoundary(this.segment(), index); } + /// {@return `frameBoundary`} + public @CType("VkBool32") int frameBoundary() { return VkPhysicalDeviceFrameBoundaryFeaturesEXT.get_frameBoundary(this.segment()); } + /// Sets `frameBoundary` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameBoundary(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_frameBoundary.set(segment, 0L, index, value); } + /// Sets `frameBoundary` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameBoundary(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFrameBoundaryFeaturesEXT.set_frameBoundary(segment, 0L, value); } + /// Sets `frameBoundary` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFrameBoundaryFeaturesEXT frameBoundaryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFrameBoundaryFeaturesEXT.set_frameBoundary(this.segment(), index, value); return this; } + /// Sets `frameBoundary` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFrameBoundaryFeaturesEXT frameBoundary(@CType("VkBool32") int value) { VkPhysicalDeviceFrameBoundaryFeaturesEXT.set_frameBoundary(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.java new file mode 100644 index 00000000..10772a3e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### graphicsPipelineLibrary +/// [VarHandle][#VH_graphicsPipelineLibrary] - [Getter][#graphicsPipelineLibrary()] - [Setter][#graphicsPipelineLibrary(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 graphicsPipelineLibrary; +/// } VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("graphicsPipelineLibrary") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `graphicsPipelineLibrary` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_graphicsPipelineLibrary = LAYOUT.arrayElementVarHandle(PathElement.groupElement("graphicsPipelineLibrary")); + + /// Creates `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT` + public static VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT` + public static VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `graphicsPipelineLibrary` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_graphicsPipelineLibrary(MemorySegment segment, long index) { return (int) VH_graphicsPipelineLibrary.get(segment, 0L, index); } + /// {@return `graphicsPipelineLibrary`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_graphicsPipelineLibrary(MemorySegment segment) { return VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.get_graphicsPipelineLibrary(segment, 0L); } + /// {@return `graphicsPipelineLibrary` at the given index} + /// @param index the index + public @CType("VkBool32") int graphicsPipelineLibraryAt(long index) { return VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.get_graphicsPipelineLibrary(this.segment(), index); } + /// {@return `graphicsPipelineLibrary`} + public @CType("VkBool32") int graphicsPipelineLibrary() { return VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.get_graphicsPipelineLibrary(this.segment()); } + /// Sets `graphicsPipelineLibrary` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_graphicsPipelineLibrary(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_graphicsPipelineLibrary.set(segment, 0L, index, value); } + /// Sets `graphicsPipelineLibrary` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_graphicsPipelineLibrary(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.set_graphicsPipelineLibrary(segment, 0L, value); } + /// Sets `graphicsPipelineLibrary` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT graphicsPipelineLibraryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.set_graphicsPipelineLibrary(this.segment(), index, value); return this; } + /// Sets `graphicsPipelineLibrary` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT graphicsPipelineLibrary(@CType("VkBool32") int value) { VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.set_graphicsPipelineLibrary(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.java new file mode 100644 index 00000000..3c041b77 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### graphicsPipelineLibraryFastLinking +/// [VarHandle][#VH_graphicsPipelineLibraryFastLinking] - [Getter][#graphicsPipelineLibraryFastLinking()] - [Setter][#graphicsPipelineLibraryFastLinking(int)] +/// ### graphicsPipelineLibraryIndependentInterpolationDecoration +/// [VarHandle][#VH_graphicsPipelineLibraryIndependentInterpolationDecoration] - [Getter][#graphicsPipelineLibraryIndependentInterpolationDecoration()] - [Setter][#graphicsPipelineLibraryIndependentInterpolationDecoration(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 graphicsPipelineLibraryFastLinking; +/// VkBool32 graphicsPipelineLibraryIndependentInterpolationDecoration; +/// } VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("graphicsPipelineLibraryFastLinking"), + ValueLayout.JAVA_INT.withName("graphicsPipelineLibraryIndependentInterpolationDecoration") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `graphicsPipelineLibraryFastLinking` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_graphicsPipelineLibraryFastLinking = LAYOUT.arrayElementVarHandle(PathElement.groupElement("graphicsPipelineLibraryFastLinking")); + /// The [VarHandle] of `graphicsPipelineLibraryIndependentInterpolationDecoration` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_graphicsPipelineLibraryIndependentInterpolationDecoration = LAYOUT.arrayElementVarHandle(PathElement.groupElement("graphicsPipelineLibraryIndependentInterpolationDecoration")); + + /// Creates `VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT` + public static VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT` + public static VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `graphicsPipelineLibraryFastLinking` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_graphicsPipelineLibraryFastLinking(MemorySegment segment, long index) { return (int) VH_graphicsPipelineLibraryFastLinking.get(segment, 0L, index); } + /// {@return `graphicsPipelineLibraryFastLinking`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_graphicsPipelineLibraryFastLinking(MemorySegment segment) { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_graphicsPipelineLibraryFastLinking(segment, 0L); } + /// {@return `graphicsPipelineLibraryFastLinking` at the given index} + /// @param index the index + public @CType("VkBool32") int graphicsPipelineLibraryFastLinkingAt(long index) { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_graphicsPipelineLibraryFastLinking(this.segment(), index); } + /// {@return `graphicsPipelineLibraryFastLinking`} + public @CType("VkBool32") int graphicsPipelineLibraryFastLinking() { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_graphicsPipelineLibraryFastLinking(this.segment()); } + /// Sets `graphicsPipelineLibraryFastLinking` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_graphicsPipelineLibraryFastLinking(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_graphicsPipelineLibraryFastLinking.set(segment, 0L, index, value); } + /// Sets `graphicsPipelineLibraryFastLinking` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_graphicsPipelineLibraryFastLinking(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_graphicsPipelineLibraryFastLinking(segment, 0L, value); } + /// Sets `graphicsPipelineLibraryFastLinking` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT graphicsPipelineLibraryFastLinkingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_graphicsPipelineLibraryFastLinking(this.segment(), index, value); return this; } + /// Sets `graphicsPipelineLibraryFastLinking` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT graphicsPipelineLibraryFastLinking(@CType("VkBool32") int value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_graphicsPipelineLibraryFastLinking(this.segment(), value); return this; } + + /// {@return `graphicsPipelineLibraryIndependentInterpolationDecoration` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_graphicsPipelineLibraryIndependentInterpolationDecoration(MemorySegment segment, long index) { return (int) VH_graphicsPipelineLibraryIndependentInterpolationDecoration.get(segment, 0L, index); } + /// {@return `graphicsPipelineLibraryIndependentInterpolationDecoration`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_graphicsPipelineLibraryIndependentInterpolationDecoration(MemorySegment segment) { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_graphicsPipelineLibraryIndependentInterpolationDecoration(segment, 0L); } + /// {@return `graphicsPipelineLibraryIndependentInterpolationDecoration` at the given index} + /// @param index the index + public @CType("VkBool32") int graphicsPipelineLibraryIndependentInterpolationDecorationAt(long index) { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_graphicsPipelineLibraryIndependentInterpolationDecoration(this.segment(), index); } + /// {@return `graphicsPipelineLibraryIndependentInterpolationDecoration`} + public @CType("VkBool32") int graphicsPipelineLibraryIndependentInterpolationDecoration() { return VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.get_graphicsPipelineLibraryIndependentInterpolationDecoration(this.segment()); } + /// Sets `graphicsPipelineLibraryIndependentInterpolationDecoration` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_graphicsPipelineLibraryIndependentInterpolationDecoration(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_graphicsPipelineLibraryIndependentInterpolationDecoration.set(segment, 0L, index, value); } + /// Sets `graphicsPipelineLibraryIndependentInterpolationDecoration` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_graphicsPipelineLibraryIndependentInterpolationDecoration(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_graphicsPipelineLibraryIndependentInterpolationDecoration(segment, 0L, value); } + /// Sets `graphicsPipelineLibraryIndependentInterpolationDecoration` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT graphicsPipelineLibraryIndependentInterpolationDecorationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_graphicsPipelineLibraryIndependentInterpolationDecoration(this.segment(), index, value); return this; } + /// Sets `graphicsPipelineLibraryIndependentInterpolationDecoration` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT graphicsPipelineLibraryIndependentInterpolationDecoration(@CType("VkBool32") int value) { VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.set_graphicsPipelineLibraryIndependentInterpolationDecoration(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.java new file mode 100644 index 00000000..236005b0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### image2DViewOf3D +/// [VarHandle][#VH_image2DViewOf3D] - [Getter][#image2DViewOf3D()] - [Setter][#image2DViewOf3D(int)] +/// ### sampler2DViewOf3D +/// [VarHandle][#VH_sampler2DViewOf3D] - [Getter][#sampler2DViewOf3D()] - [Setter][#sampler2DViewOf3D(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImage2DViewOf3DFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 image2DViewOf3D; +/// VkBool32 sampler2DViewOf3D; +/// } VkPhysicalDeviceImage2DViewOf3DFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceImage2DViewOf3DFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("image2DViewOf3D"), + ValueLayout.JAVA_INT.withName("sampler2DViewOf3D") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `image2DViewOf3D` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_image2DViewOf3D = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image2DViewOf3D")); + /// The [VarHandle] of `sampler2DViewOf3D` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampler2DViewOf3D = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampler2DViewOf3D")); + + /// Creates `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImage2DViewOf3DFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImage2DViewOf3DFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImage2DViewOf3DFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImage2DViewOf3DFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImage2DViewOf3DFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImage2DViewOf3DFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImage2DViewOf3DFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT` + public static VkPhysicalDeviceImage2DViewOf3DFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImage2DViewOf3DFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImage2DViewOf3DFeaturesEXT` + public static VkPhysicalDeviceImage2DViewOf3DFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImage2DViewOf3DFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImage2DViewOf3DFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImage2DViewOf3DFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImage2DViewOf3DFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImage2DViewOf3DFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `image2DViewOf3D` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_image2DViewOf3D(MemorySegment segment, long index) { return (int) VH_image2DViewOf3D.get(segment, 0L, index); } + /// {@return `image2DViewOf3D`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_image2DViewOf3D(MemorySegment segment) { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_image2DViewOf3D(segment, 0L); } + /// {@return `image2DViewOf3D` at the given index} + /// @param index the index + public @CType("VkBool32") int image2DViewOf3DAt(long index) { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_image2DViewOf3D(this.segment(), index); } + /// {@return `image2DViewOf3D`} + public @CType("VkBool32") int image2DViewOf3D() { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_image2DViewOf3D(this.segment()); } + /// Sets `image2DViewOf3D` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image2DViewOf3D(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_image2DViewOf3D.set(segment, 0L, index, value); } + /// Sets `image2DViewOf3D` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image2DViewOf3D(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_image2DViewOf3D(segment, 0L, value); } + /// Sets `image2DViewOf3D` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImage2DViewOf3DFeaturesEXT image2DViewOf3DAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_image2DViewOf3D(this.segment(), index, value); return this; } + /// Sets `image2DViewOf3D` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImage2DViewOf3DFeaturesEXT image2DViewOf3D(@CType("VkBool32") int value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_image2DViewOf3D(this.segment(), value); return this; } + + /// {@return `sampler2DViewOf3D` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sampler2DViewOf3D(MemorySegment segment, long index) { return (int) VH_sampler2DViewOf3D.get(segment, 0L, index); } + /// {@return `sampler2DViewOf3D`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sampler2DViewOf3D(MemorySegment segment) { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_sampler2DViewOf3D(segment, 0L); } + /// {@return `sampler2DViewOf3D` at the given index} + /// @param index the index + public @CType("VkBool32") int sampler2DViewOf3DAt(long index) { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_sampler2DViewOf3D(this.segment(), index); } + /// {@return `sampler2DViewOf3D`} + public @CType("VkBool32") int sampler2DViewOf3D() { return VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.get_sampler2DViewOf3D(this.segment()); } + /// Sets `sampler2DViewOf3D` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampler2DViewOf3D(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sampler2DViewOf3D.set(segment, 0L, index, value); } + /// Sets `sampler2DViewOf3D` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampler2DViewOf3D(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_sampler2DViewOf3D(segment, 0L, value); } + /// Sets `sampler2DViewOf3D` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImage2DViewOf3DFeaturesEXT sampler2DViewOf3DAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_sampler2DViewOf3D(this.segment(), index, value); return this; } + /// Sets `sampler2DViewOf3D` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImage2DViewOf3DFeaturesEXT sampler2DViewOf3D(@CType("VkBool32") int value) { VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.set_sampler2DViewOf3D(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageCompressionControlFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageCompressionControlFeaturesEXT.java new file mode 100644 index 00000000..8a078aa5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageCompressionControlFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageCompressionControl +/// [VarHandle][#VH_imageCompressionControl] - [Getter][#imageCompressionControl()] - [Setter][#imageCompressionControl(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageCompressionControlFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 imageCompressionControl; +/// } VkPhysicalDeviceImageCompressionControlFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceImageCompressionControlFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceImageCompressionControlFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("imageCompressionControl") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageCompressionControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageCompressionControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageCompressionControl")); + + /// Creates `VkPhysicalDeviceImageCompressionControlFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageCompressionControlFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageCompressionControlFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageCompressionControlFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageCompressionControlFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceImageCompressionControlFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageCompressionControlFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageCompressionControlFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageCompressionControlFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageCompressionControlFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageCompressionControlFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageCompressionControlFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageCompressionControlFeaturesEXT` + public static VkPhysicalDeviceImageCompressionControlFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageCompressionControlFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageCompressionControlFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageCompressionControlFeaturesEXT` + public static VkPhysicalDeviceImageCompressionControlFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageCompressionControlFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageCompressionControlFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageCompressionControlFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageCompressionControlFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageCompressionControlFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageCompressionControlFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageCompressionControlFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageCompressionControlFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageCompressionControlFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageCompressionControlFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageCompressionControlFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageCompressionControlFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageCompressionControlFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `imageCompressionControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imageCompressionControl(MemorySegment segment, long index) { return (int) VH_imageCompressionControl.get(segment, 0L, index); } + /// {@return `imageCompressionControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imageCompressionControl(MemorySegment segment) { return VkPhysicalDeviceImageCompressionControlFeaturesEXT.get_imageCompressionControl(segment, 0L); } + /// {@return `imageCompressionControl` at the given index} + /// @param index the index + public @CType("VkBool32") int imageCompressionControlAt(long index) { return VkPhysicalDeviceImageCompressionControlFeaturesEXT.get_imageCompressionControl(this.segment(), index); } + /// {@return `imageCompressionControl`} + public @CType("VkBool32") int imageCompressionControl() { return VkPhysicalDeviceImageCompressionControlFeaturesEXT.get_imageCompressionControl(this.segment()); } + /// Sets `imageCompressionControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageCompressionControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imageCompressionControl.set(segment, 0L, index, value); } + /// Sets `imageCompressionControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageCompressionControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImageCompressionControlFeaturesEXT.set_imageCompressionControl(segment, 0L, value); } + /// Sets `imageCompressionControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlFeaturesEXT imageCompressionControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImageCompressionControlFeaturesEXT.set_imageCompressionControl(this.segment(), index, value); return this; } + /// Sets `imageCompressionControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlFeaturesEXT imageCompressionControl(@CType("VkBool32") int value) { VkPhysicalDeviceImageCompressionControlFeaturesEXT.set_imageCompressionControl(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.java new file mode 100644 index 00000000..0f281666 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageCompressionControlSwapchain +/// [VarHandle][#VH_imageCompressionControlSwapchain] - [Getter][#imageCompressionControlSwapchain()] - [Setter][#imageCompressionControlSwapchain(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 imageCompressionControlSwapchain; +/// } VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("imageCompressionControlSwapchain") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageCompressionControlSwapchain` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageCompressionControlSwapchain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageCompressionControlSwapchain")); + + /// Creates `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT` + public static VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT` + public static VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `imageCompressionControlSwapchain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imageCompressionControlSwapchain(MemorySegment segment, long index) { return (int) VH_imageCompressionControlSwapchain.get(segment, 0L, index); } + /// {@return `imageCompressionControlSwapchain`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imageCompressionControlSwapchain(MemorySegment segment) { return VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.get_imageCompressionControlSwapchain(segment, 0L); } + /// {@return `imageCompressionControlSwapchain` at the given index} + /// @param index the index + public @CType("VkBool32") int imageCompressionControlSwapchainAt(long index) { return VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.get_imageCompressionControlSwapchain(this.segment(), index); } + /// {@return `imageCompressionControlSwapchain`} + public @CType("VkBool32") int imageCompressionControlSwapchain() { return VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.get_imageCompressionControlSwapchain(this.segment()); } + /// Sets `imageCompressionControlSwapchain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageCompressionControlSwapchain(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imageCompressionControlSwapchain.set(segment, 0L, index, value); } + /// Sets `imageCompressionControlSwapchain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageCompressionControlSwapchain(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.set_imageCompressionControlSwapchain(segment, 0L, value); } + /// Sets `imageCompressionControlSwapchain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT imageCompressionControlSwapchainAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.set_imageCompressionControlSwapchain(this.segment(), index, value); return this; } + /// Sets `imageCompressionControlSwapchain` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT imageCompressionControlSwapchain(@CType("VkBool32") int value) { VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.set_imageCompressionControlSwapchain(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.java new file mode 100644 index 00000000..42498d58 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### drmFormatModifier +/// [VarHandle][#VH_drmFormatModifier] - [Getter][#drmFormatModifier()] - [Setter][#drmFormatModifier(long)] +/// ### sharingMode +/// [VarHandle][#VH_sharingMode] - [Getter][#sharingMode()] - [Setter][#sharingMode(int)] +/// ### queueFamilyIndexCount +/// [VarHandle][#VH_queueFamilyIndexCount] - [Getter][#queueFamilyIndexCount()] - [Setter][#queueFamilyIndexCount(int)] +/// ### pQueueFamilyIndices +/// [VarHandle][#VH_pQueueFamilyIndices] - [Getter][#pQueueFamilyIndices()] - [Setter][#pQueueFamilyIndices(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageDrmFormatModifierInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint64_t drmFormatModifier; +/// VkSharingMode sharingMode; +/// uint32_t queueFamilyIndexCount; +/// const uint32_t * pQueueFamilyIndices; +/// } VkPhysicalDeviceImageDrmFormatModifierInfoEXT; +/// ``` +public final class VkPhysicalDeviceImageDrmFormatModifierInfoEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceImageDrmFormatModifierInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("drmFormatModifier"), + ValueLayout.JAVA_INT.withName("sharingMode"), + ValueLayout.JAVA_INT.withName("queueFamilyIndexCount"), + ValueLayout.ADDRESS.withName("pQueueFamilyIndices") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `drmFormatModifier` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_drmFormatModifier = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drmFormatModifier")); + /// The [VarHandle] of `sharingMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sharingMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sharingMode")); + /// The [VarHandle] of `queueFamilyIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueFamilyIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueFamilyIndexCount")); + /// The [VarHandle] of `pQueueFamilyIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pQueueFamilyIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pQueueFamilyIndices")); + + /// Creates `VkPhysicalDeviceImageDrmFormatModifierInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageDrmFormatModifierInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageDrmFormatModifierInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageDrmFormatModifierInfoEXT(segment); } + + /// Creates `VkPhysicalDeviceImageDrmFormatModifierInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageDrmFormatModifierInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageDrmFormatModifierInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageDrmFormatModifierInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageDrmFormatModifierInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageDrmFormatModifierInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageDrmFormatModifierInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageDrmFormatModifierInfoEXT` + public static VkPhysicalDeviceImageDrmFormatModifierInfoEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageDrmFormatModifierInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageDrmFormatModifierInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageDrmFormatModifierInfoEXT` + public static VkPhysicalDeviceImageDrmFormatModifierInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageDrmFormatModifierInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `drmFormatModifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_drmFormatModifier(MemorySegment segment, long index) { return (long) VH_drmFormatModifier.get(segment, 0L, index); } + /// {@return `drmFormatModifier`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_drmFormatModifier(MemorySegment segment) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_drmFormatModifier(segment, 0L); } + /// {@return `drmFormatModifier` at the given index} + /// @param index the index + public @CType("uint64_t") long drmFormatModifierAt(long index) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_drmFormatModifier(this.segment(), index); } + /// {@return `drmFormatModifier`} + public @CType("uint64_t") long drmFormatModifier() { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_drmFormatModifier(this.segment()); } + /// Sets `drmFormatModifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drmFormatModifier(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_drmFormatModifier.set(segment, 0L, index, value); } + /// Sets `drmFormatModifier` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drmFormatModifier(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_drmFormatModifier(segment, 0L, value); } + /// Sets `drmFormatModifier` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT drmFormatModifierAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_drmFormatModifier(this.segment(), index, value); return this; } + /// Sets `drmFormatModifier` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT drmFormatModifier(@CType("uint64_t") long value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_drmFormatModifier(this.segment(), value); return this; } + + /// {@return `sharingMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSharingMode") int get_sharingMode(MemorySegment segment, long index) { return (int) VH_sharingMode.get(segment, 0L, index); } + /// {@return `sharingMode`} + /// @param segment the segment of the struct + public static @CType("VkSharingMode") int get_sharingMode(MemorySegment segment) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_sharingMode(segment, 0L); } + /// {@return `sharingMode` at the given index} + /// @param index the index + public @CType("VkSharingMode") int sharingModeAt(long index) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_sharingMode(this.segment(), index); } + /// {@return `sharingMode`} + public @CType("VkSharingMode") int sharingMode() { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_sharingMode(this.segment()); } + /// Sets `sharingMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sharingMode(MemorySegment segment, long index, @CType("VkSharingMode") int value) { VH_sharingMode.set(segment, 0L, index, value); } + /// Sets `sharingMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sharingMode(MemorySegment segment, @CType("VkSharingMode") int value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_sharingMode(segment, 0L, value); } + /// Sets `sharingMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT sharingModeAt(long index, @CType("VkSharingMode") int value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_sharingMode(this.segment(), index, value); return this; } + /// Sets `sharingMode` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT sharingMode(@CType("VkSharingMode") int value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_sharingMode(this.segment(), value); return this; } + + /// {@return `queueFamilyIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueFamilyIndexCount(MemorySegment segment, long index) { return (int) VH_queueFamilyIndexCount.get(segment, 0L, index); } + /// {@return `queueFamilyIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueFamilyIndexCount(MemorySegment segment) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_queueFamilyIndexCount(segment, 0L); } + /// {@return `queueFamilyIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queueFamilyIndexCountAt(long index) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_queueFamilyIndexCount(this.segment(), index); } + /// {@return `queueFamilyIndexCount`} + public @CType("uint32_t") int queueFamilyIndexCount() { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_queueFamilyIndexCount(this.segment()); } + /// Sets `queueFamilyIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFamilyIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueFamilyIndexCount.set(segment, 0L, index, value); } + /// Sets `queueFamilyIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFamilyIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_queueFamilyIndexCount(segment, 0L, value); } + /// Sets `queueFamilyIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT queueFamilyIndexCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_queueFamilyIndexCount(this.segment(), index, value); return this; } + /// Sets `queueFamilyIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT queueFamilyIndexCount(@CType("uint32_t") int value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_queueFamilyIndexCount(this.segment(), value); return this; } + + /// {@return `pQueueFamilyIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pQueueFamilyIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pQueueFamilyIndices.get(segment, 0L, index); } + /// {@return `pQueueFamilyIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pQueueFamilyIndices(MemorySegment segment) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_pQueueFamilyIndices(segment, 0L); } + /// {@return `pQueueFamilyIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pQueueFamilyIndicesAt(long index) { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_pQueueFamilyIndices(this.segment(), index); } + /// {@return `pQueueFamilyIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pQueueFamilyIndices() { return VkPhysicalDeviceImageDrmFormatModifierInfoEXT.get_pQueueFamilyIndices(this.segment()); } + /// Sets `pQueueFamilyIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pQueueFamilyIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pQueueFamilyIndices.set(segment, 0L, index, value); } + /// Sets `pQueueFamilyIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pQueueFamilyIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_pQueueFamilyIndices(segment, 0L, value); } + /// Sets `pQueueFamilyIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT pQueueFamilyIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_pQueueFamilyIndices(this.segment(), index, value); return this; } + /// Sets `pQueueFamilyIndices` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageDrmFormatModifierInfoEXT pQueueFamilyIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageDrmFormatModifierInfoEXT.set_pQueueFamilyIndices(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.java new file mode 100644 index 00000000..2b730d9e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageSlicedViewOf3D +/// [VarHandle][#VH_imageSlicedViewOf3D] - [Getter][#imageSlicedViewOf3D()] - [Setter][#imageSlicedViewOf3D(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 imageSlicedViewOf3D; +/// } VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("imageSlicedViewOf3D") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageSlicedViewOf3D` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageSlicedViewOf3D = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageSlicedViewOf3D")); + + /// Creates `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` + public static VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT` + public static VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `imageSlicedViewOf3D` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imageSlicedViewOf3D(MemorySegment segment, long index) { return (int) VH_imageSlicedViewOf3D.get(segment, 0L, index); } + /// {@return `imageSlicedViewOf3D`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imageSlicedViewOf3D(MemorySegment segment) { return VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.get_imageSlicedViewOf3D(segment, 0L); } + /// {@return `imageSlicedViewOf3D` at the given index} + /// @param index the index + public @CType("VkBool32") int imageSlicedViewOf3DAt(long index) { return VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.get_imageSlicedViewOf3D(this.segment(), index); } + /// {@return `imageSlicedViewOf3D`} + public @CType("VkBool32") int imageSlicedViewOf3D() { return VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.get_imageSlicedViewOf3D(this.segment()); } + /// Sets `imageSlicedViewOf3D` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageSlicedViewOf3D(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imageSlicedViewOf3D.set(segment, 0L, index, value); } + /// Sets `imageSlicedViewOf3D` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageSlicedViewOf3D(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.set_imageSlicedViewOf3D(segment, 0L, value); } + /// Sets `imageSlicedViewOf3D` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT imageSlicedViewOf3DAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.set_imageSlicedViewOf3D(this.segment(), index, value); return this; } + /// Sets `imageSlicedViewOf3D` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT imageSlicedViewOf3D(@CType("VkBool32") int value) { VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.set_imageSlicedViewOf3D(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageViewImageFormatInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageViewImageFormatInfoEXT.java new file mode 100644 index 00000000..0d2c25be --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageViewImageFormatInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageViewType +/// [VarHandle][#VH_imageViewType] - [Getter][#imageViewType()] - [Setter][#imageViewType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageViewImageFormatInfoEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkImageViewType imageViewType; +/// } VkPhysicalDeviceImageViewImageFormatInfoEXT; +/// ``` +public final class VkPhysicalDeviceImageViewImageFormatInfoEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceImageViewImageFormatInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("imageViewType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageViewType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageViewType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageViewType")); + + /// Creates `VkPhysicalDeviceImageViewImageFormatInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageViewImageFormatInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageViewImageFormatInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageViewImageFormatInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageViewImageFormatInfoEXT(segment); } + + /// Creates `VkPhysicalDeviceImageViewImageFormatInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageViewImageFormatInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageViewImageFormatInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageViewImageFormatInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageViewImageFormatInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageViewImageFormatInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageViewImageFormatInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageViewImageFormatInfoEXT` + public static VkPhysicalDeviceImageViewImageFormatInfoEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageViewImageFormatInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageViewImageFormatInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageViewImageFormatInfoEXT` + public static VkPhysicalDeviceImageViewImageFormatInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageViewImageFormatInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageViewImageFormatInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageViewImageFormatInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageViewImageFormatInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageViewImageFormatInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewImageFormatInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageViewImageFormatInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewImageFormatInfoEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageViewImageFormatInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageViewImageFormatInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageViewImageFormatInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageViewImageFormatInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageViewImageFormatInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewImageFormatInfoEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageViewImageFormatInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewImageFormatInfoEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageViewImageFormatInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `imageViewType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageViewType") int get_imageViewType(MemorySegment segment, long index) { return (int) VH_imageViewType.get(segment, 0L, index); } + /// {@return `imageViewType`} + /// @param segment the segment of the struct + public static @CType("VkImageViewType") int get_imageViewType(MemorySegment segment) { return VkPhysicalDeviceImageViewImageFormatInfoEXT.get_imageViewType(segment, 0L); } + /// {@return `imageViewType` at the given index} + /// @param index the index + public @CType("VkImageViewType") int imageViewTypeAt(long index) { return VkPhysicalDeviceImageViewImageFormatInfoEXT.get_imageViewType(this.segment(), index); } + /// {@return `imageViewType`} + public @CType("VkImageViewType") int imageViewType() { return VkPhysicalDeviceImageViewImageFormatInfoEXT.get_imageViewType(this.segment()); } + /// Sets `imageViewType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageViewType(MemorySegment segment, long index, @CType("VkImageViewType") int value) { VH_imageViewType.set(segment, 0L, index, value); } + /// Sets `imageViewType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageViewType(MemorySegment segment, @CType("VkImageViewType") int value) { VkPhysicalDeviceImageViewImageFormatInfoEXT.set_imageViewType(segment, 0L, value); } + /// Sets `imageViewType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewImageFormatInfoEXT imageViewTypeAt(long index, @CType("VkImageViewType") int value) { VkPhysicalDeviceImageViewImageFormatInfoEXT.set_imageViewType(this.segment(), index, value); return this; } + /// Sets `imageViewType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewImageFormatInfoEXT imageViewType(@CType("VkImageViewType") int value) { VkPhysicalDeviceImageViewImageFormatInfoEXT.set_imageViewType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageViewMinLodFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageViewMinLodFeaturesEXT.java new file mode 100644 index 00000000..7ae3c545 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceImageViewMinLodFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minLod +/// [VarHandle][#VH_minLod] - [Getter][#minLod()] - [Setter][#minLod(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageViewMinLodFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 minLod; +/// } VkPhysicalDeviceImageViewMinLodFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceImageViewMinLodFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceImageViewMinLodFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("minLod") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minLod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minLod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minLod")); + + /// Creates `VkPhysicalDeviceImageViewMinLodFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageViewMinLodFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageViewMinLodFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageViewMinLodFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageViewMinLodFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceImageViewMinLodFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageViewMinLodFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageViewMinLodFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageViewMinLodFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageViewMinLodFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageViewMinLodFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageViewMinLodFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageViewMinLodFeaturesEXT` + public static VkPhysicalDeviceImageViewMinLodFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageViewMinLodFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageViewMinLodFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageViewMinLodFeaturesEXT` + public static VkPhysicalDeviceImageViewMinLodFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageViewMinLodFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageViewMinLodFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageViewMinLodFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageViewMinLodFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageViewMinLodFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewMinLodFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageViewMinLodFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewMinLodFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageViewMinLodFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageViewMinLodFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageViewMinLodFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageViewMinLodFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageViewMinLodFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewMinLodFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageViewMinLodFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewMinLodFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageViewMinLodFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `minLod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_minLod(MemorySegment segment, long index) { return (int) VH_minLod.get(segment, 0L, index); } + /// {@return `minLod`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_minLod(MemorySegment segment) { return VkPhysicalDeviceImageViewMinLodFeaturesEXT.get_minLod(segment, 0L); } + /// {@return `minLod` at the given index} + /// @param index the index + public @CType("VkBool32") int minLodAt(long index) { return VkPhysicalDeviceImageViewMinLodFeaturesEXT.get_minLod(this.segment(), index); } + /// {@return `minLod`} + public @CType("VkBool32") int minLod() { return VkPhysicalDeviceImageViewMinLodFeaturesEXT.get_minLod(this.segment()); } + /// Sets `minLod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minLod(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_minLod.set(segment, 0L, index, value); } + /// Sets `minLod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minLod(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImageViewMinLodFeaturesEXT.set_minLod(segment, 0L, value); } + /// Sets `minLod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewMinLodFeaturesEXT minLodAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImageViewMinLodFeaturesEXT.set_minLod(this.segment(), index, value); return this; } + /// Sets `minLod` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageViewMinLodFeaturesEXT minLod(@CType("VkBool32") int value) { VkPhysicalDeviceImageViewMinLodFeaturesEXT.set_minLod(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceLegacyDitheringFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceLegacyDitheringFeaturesEXT.java new file mode 100644 index 00000000..96435387 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceLegacyDitheringFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### legacyDithering +/// [VarHandle][#VH_legacyDithering] - [Getter][#legacyDithering()] - [Setter][#legacyDithering(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLegacyDitheringFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 legacyDithering; +/// } VkPhysicalDeviceLegacyDitheringFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceLegacyDitheringFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceLegacyDitheringFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("legacyDithering") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `legacyDithering` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_legacyDithering = LAYOUT.arrayElementVarHandle(PathElement.groupElement("legacyDithering")); + + /// Creates `VkPhysicalDeviceLegacyDitheringFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLegacyDitheringFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLegacyDitheringFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLegacyDitheringFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLegacyDitheringFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceLegacyDitheringFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLegacyDitheringFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLegacyDitheringFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLegacyDitheringFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLegacyDitheringFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLegacyDitheringFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLegacyDitheringFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLegacyDitheringFeaturesEXT` + public static VkPhysicalDeviceLegacyDitheringFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLegacyDitheringFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLegacyDitheringFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLegacyDitheringFeaturesEXT` + public static VkPhysicalDeviceLegacyDitheringFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLegacyDitheringFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceLegacyDitheringFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceLegacyDitheringFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceLegacyDitheringFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceLegacyDitheringFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyDitheringFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceLegacyDitheringFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyDitheringFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceLegacyDitheringFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceLegacyDitheringFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceLegacyDitheringFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceLegacyDitheringFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLegacyDitheringFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyDitheringFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLegacyDitheringFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyDitheringFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLegacyDitheringFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `legacyDithering` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_legacyDithering(MemorySegment segment, long index) { return (int) VH_legacyDithering.get(segment, 0L, index); } + /// {@return `legacyDithering`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_legacyDithering(MemorySegment segment) { return VkPhysicalDeviceLegacyDitheringFeaturesEXT.get_legacyDithering(segment, 0L); } + /// {@return `legacyDithering` at the given index} + /// @param index the index + public @CType("VkBool32") int legacyDitheringAt(long index) { return VkPhysicalDeviceLegacyDitheringFeaturesEXT.get_legacyDithering(this.segment(), index); } + /// {@return `legacyDithering`} + public @CType("VkBool32") int legacyDithering() { return VkPhysicalDeviceLegacyDitheringFeaturesEXT.get_legacyDithering(this.segment()); } + /// Sets `legacyDithering` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_legacyDithering(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_legacyDithering.set(segment, 0L, index, value); } + /// Sets `legacyDithering` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_legacyDithering(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLegacyDitheringFeaturesEXT.set_legacyDithering(segment, 0L, value); } + /// Sets `legacyDithering` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyDitheringFeaturesEXT legacyDitheringAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLegacyDitheringFeaturesEXT.set_legacyDithering(this.segment(), index, value); return this; } + /// Sets `legacyDithering` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyDitheringFeaturesEXT legacyDithering(@CType("VkBool32") int value) { VkPhysicalDeviceLegacyDitheringFeaturesEXT.set_legacyDithering(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.java new file mode 100644 index 00000000..69f9137f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### legacyVertexAttributes +/// [VarHandle][#VH_legacyVertexAttributes] - [Getter][#legacyVertexAttributes()] - [Setter][#legacyVertexAttributes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 legacyVertexAttributes; +/// } VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("legacyVertexAttributes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `legacyVertexAttributes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_legacyVertexAttributes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("legacyVertexAttributes")); + + /// Creates `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT` + public static VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT` + public static VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `legacyVertexAttributes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_legacyVertexAttributes(MemorySegment segment, long index) { return (int) VH_legacyVertexAttributes.get(segment, 0L, index); } + /// {@return `legacyVertexAttributes`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_legacyVertexAttributes(MemorySegment segment) { return VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.get_legacyVertexAttributes(segment, 0L); } + /// {@return `legacyVertexAttributes` at the given index} + /// @param index the index + public @CType("VkBool32") int legacyVertexAttributesAt(long index) { return VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.get_legacyVertexAttributes(this.segment(), index); } + /// {@return `legacyVertexAttributes`} + public @CType("VkBool32") int legacyVertexAttributes() { return VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.get_legacyVertexAttributes(this.segment()); } + /// Sets `legacyVertexAttributes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_legacyVertexAttributes(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_legacyVertexAttributes.set(segment, 0L, index, value); } + /// Sets `legacyVertexAttributes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_legacyVertexAttributes(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.set_legacyVertexAttributes(segment, 0L, value); } + /// Sets `legacyVertexAttributes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT legacyVertexAttributesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.set_legacyVertexAttributes(this.segment(), index, value); return this; } + /// Sets `legacyVertexAttributes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT legacyVertexAttributes(@CType("VkBool32") int value) { VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.set_legacyVertexAttributes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.java new file mode 100644 index 00000000..4b285096 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### nativeUnalignedPerformance +/// [VarHandle][#VH_nativeUnalignedPerformance] - [Getter][#nativeUnalignedPerformance()] - [Setter][#nativeUnalignedPerformance(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 nativeUnalignedPerformance; +/// } VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("nativeUnalignedPerformance") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `nativeUnalignedPerformance` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nativeUnalignedPerformance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nativeUnalignedPerformance")); + + /// Creates `VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT` + public static VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT` + public static VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `nativeUnalignedPerformance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nativeUnalignedPerformance(MemorySegment segment, long index) { return (int) VH_nativeUnalignedPerformance.get(segment, 0L, index); } + /// {@return `nativeUnalignedPerformance`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nativeUnalignedPerformance(MemorySegment segment) { return VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.get_nativeUnalignedPerformance(segment, 0L); } + /// {@return `nativeUnalignedPerformance` at the given index} + /// @param index the index + public @CType("VkBool32") int nativeUnalignedPerformanceAt(long index) { return VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.get_nativeUnalignedPerformance(this.segment(), index); } + /// {@return `nativeUnalignedPerformance`} + public @CType("VkBool32") int nativeUnalignedPerformance() { return VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.get_nativeUnalignedPerformance(this.segment()); } + /// Sets `nativeUnalignedPerformance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nativeUnalignedPerformance(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nativeUnalignedPerformance.set(segment, 0L, index, value); } + /// Sets `nativeUnalignedPerformance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nativeUnalignedPerformance(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.set_nativeUnalignedPerformance(segment, 0L, value); } + /// Sets `nativeUnalignedPerformance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT nativeUnalignedPerformanceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.set_nativeUnalignedPerformance(this.segment(), index, value); return this; } + /// Sets `nativeUnalignedPerformance` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT nativeUnalignedPerformance(@CType("VkBool32") int value) { VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.set_nativeUnalignedPerformance(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.java new file mode 100644 index 00000000..03df1c6e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryMapPlaced +/// [VarHandle][#VH_memoryMapPlaced] - [Getter][#memoryMapPlaced()] - [Setter][#memoryMapPlaced(int)] +/// ### memoryMapRangePlaced +/// [VarHandle][#VH_memoryMapRangePlaced] - [Getter][#memoryMapRangePlaced()] - [Setter][#memoryMapRangePlaced(int)] +/// ### memoryUnmapReserve +/// [VarHandle][#VH_memoryUnmapReserve] - [Getter][#memoryUnmapReserve()] - [Setter][#memoryUnmapReserve(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMapMemoryPlacedFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 memoryMapPlaced; +/// VkBool32 memoryMapRangePlaced; +/// VkBool32 memoryUnmapReserve; +/// } VkPhysicalDeviceMapMemoryPlacedFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceMapMemoryPlacedFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceMapMemoryPlacedFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryMapPlaced"), + ValueLayout.JAVA_INT.withName("memoryMapRangePlaced"), + ValueLayout.JAVA_INT.withName("memoryUnmapReserve") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryMapPlaced` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryMapPlaced = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryMapPlaced")); + /// The [VarHandle] of `memoryMapRangePlaced` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryMapRangePlaced = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryMapRangePlaced")); + /// The [VarHandle] of `memoryUnmapReserve` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryUnmapReserve = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryUnmapReserve")); + + /// Creates `VkPhysicalDeviceMapMemoryPlacedFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMapMemoryPlacedFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMapMemoryPlacedFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMapMemoryPlacedFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceMapMemoryPlacedFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMapMemoryPlacedFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMapMemoryPlacedFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMapMemoryPlacedFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMapMemoryPlacedFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMapMemoryPlacedFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMapMemoryPlacedFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMapMemoryPlacedFeaturesEXT` + public static VkPhysicalDeviceMapMemoryPlacedFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMapMemoryPlacedFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMapMemoryPlacedFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMapMemoryPlacedFeaturesEXT` + public static VkPhysicalDeviceMapMemoryPlacedFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMapMemoryPlacedFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryMapPlaced` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_memoryMapPlaced(MemorySegment segment, long index) { return (int) VH_memoryMapPlaced.get(segment, 0L, index); } + /// {@return `memoryMapPlaced`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_memoryMapPlaced(MemorySegment segment) { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_memoryMapPlaced(segment, 0L); } + /// {@return `memoryMapPlaced` at the given index} + /// @param index the index + public @CType("VkBool32") int memoryMapPlacedAt(long index) { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_memoryMapPlaced(this.segment(), index); } + /// {@return `memoryMapPlaced`} + public @CType("VkBool32") int memoryMapPlaced() { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_memoryMapPlaced(this.segment()); } + /// Sets `memoryMapPlaced` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryMapPlaced(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_memoryMapPlaced.set(segment, 0L, index, value); } + /// Sets `memoryMapPlaced` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryMapPlaced(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_memoryMapPlaced(segment, 0L, value); } + /// Sets `memoryMapPlaced` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT memoryMapPlacedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_memoryMapPlaced(this.segment(), index, value); return this; } + /// Sets `memoryMapPlaced` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT memoryMapPlaced(@CType("VkBool32") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_memoryMapPlaced(this.segment(), value); return this; } + + /// {@return `memoryMapRangePlaced` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_memoryMapRangePlaced(MemorySegment segment, long index) { return (int) VH_memoryMapRangePlaced.get(segment, 0L, index); } + /// {@return `memoryMapRangePlaced`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_memoryMapRangePlaced(MemorySegment segment) { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_memoryMapRangePlaced(segment, 0L); } + /// {@return `memoryMapRangePlaced` at the given index} + /// @param index the index + public @CType("VkBool32") int memoryMapRangePlacedAt(long index) { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_memoryMapRangePlaced(this.segment(), index); } + /// {@return `memoryMapRangePlaced`} + public @CType("VkBool32") int memoryMapRangePlaced() { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_memoryMapRangePlaced(this.segment()); } + /// Sets `memoryMapRangePlaced` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryMapRangePlaced(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_memoryMapRangePlaced.set(segment, 0L, index, value); } + /// Sets `memoryMapRangePlaced` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryMapRangePlaced(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_memoryMapRangePlaced(segment, 0L, value); } + /// Sets `memoryMapRangePlaced` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT memoryMapRangePlacedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_memoryMapRangePlaced(this.segment(), index, value); return this; } + /// Sets `memoryMapRangePlaced` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT memoryMapRangePlaced(@CType("VkBool32") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_memoryMapRangePlaced(this.segment(), value); return this; } + + /// {@return `memoryUnmapReserve` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_memoryUnmapReserve(MemorySegment segment, long index) { return (int) VH_memoryUnmapReserve.get(segment, 0L, index); } + /// {@return `memoryUnmapReserve`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_memoryUnmapReserve(MemorySegment segment) { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_memoryUnmapReserve(segment, 0L); } + /// {@return `memoryUnmapReserve` at the given index} + /// @param index the index + public @CType("VkBool32") int memoryUnmapReserveAt(long index) { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_memoryUnmapReserve(this.segment(), index); } + /// {@return `memoryUnmapReserve`} + public @CType("VkBool32") int memoryUnmapReserve() { return VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.get_memoryUnmapReserve(this.segment()); } + /// Sets `memoryUnmapReserve` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryUnmapReserve(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_memoryUnmapReserve.set(segment, 0L, index, value); } + /// Sets `memoryUnmapReserve` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryUnmapReserve(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_memoryUnmapReserve(segment, 0L, value); } + /// Sets `memoryUnmapReserve` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT memoryUnmapReserveAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_memoryUnmapReserve(this.segment(), index, value); return this; } + /// Sets `memoryUnmapReserve` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedFeaturesEXT memoryUnmapReserve(@CType("VkBool32") int value) { VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.set_memoryUnmapReserve(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.java new file mode 100644 index 00000000..8e13e255 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minPlacedMemoryMapAlignment +/// [VarHandle][#VH_minPlacedMemoryMapAlignment] - [Getter][#minPlacedMemoryMapAlignment()] - [Setter][#minPlacedMemoryMapAlignment(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMapMemoryPlacedPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize minPlacedMemoryMapAlignment; +/// } VkPhysicalDeviceMapMemoryPlacedPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceMapMemoryPlacedPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("minPlacedMemoryMapAlignment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minPlacedMemoryMapAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_minPlacedMemoryMapAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minPlacedMemoryMapAlignment")); + + /// Creates `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMapMemoryPlacedPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMapMemoryPlacedPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMapMemoryPlacedPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMapMemoryPlacedPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMapMemoryPlacedPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMapMemoryPlacedPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMapMemoryPlacedPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT` + public static VkPhysicalDeviceMapMemoryPlacedPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMapMemoryPlacedPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMapMemoryPlacedPropertiesEXT` + public static VkPhysicalDeviceMapMemoryPlacedPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMapMemoryPlacedPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `minPlacedMemoryMapAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_minPlacedMemoryMapAlignment(MemorySegment segment, long index) { return (long) VH_minPlacedMemoryMapAlignment.get(segment, 0L, index); } + /// {@return `minPlacedMemoryMapAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_minPlacedMemoryMapAlignment(MemorySegment segment) { return VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.get_minPlacedMemoryMapAlignment(segment, 0L); } + /// {@return `minPlacedMemoryMapAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long minPlacedMemoryMapAlignmentAt(long index) { return VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.get_minPlacedMemoryMapAlignment(this.segment(), index); } + /// {@return `minPlacedMemoryMapAlignment`} + public @CType("VkDeviceSize") long minPlacedMemoryMapAlignment() { return VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.get_minPlacedMemoryMapAlignment(this.segment()); } + /// Sets `minPlacedMemoryMapAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minPlacedMemoryMapAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_minPlacedMemoryMapAlignment.set(segment, 0L, index, value); } + /// Sets `minPlacedMemoryMapAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minPlacedMemoryMapAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.set_minPlacedMemoryMapAlignment(segment, 0L, value); } + /// Sets `minPlacedMemoryMapAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedPropertiesEXT minPlacedMemoryMapAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.set_minPlacedMemoryMapAlignment(this.segment(), index, value); return this; } + /// Sets `minPlacedMemoryMapAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMapMemoryPlacedPropertiesEXT minPlacedMemoryMapAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.set_minPlacedMemoryMapAlignment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMemoryBudgetPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMemoryBudgetPropertiesEXT.java new file mode 100644 index 00000000..135a05a3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMemoryBudgetPropertiesEXT.java @@ -0,0 +1,256 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### heapBudget +/// [Byte offset handle][#MH_heapBudget] - [Memory layout][#ML_heapBudget] - [Getter][#heapBudget(long)] - [Setter][#heapBudget(long, java.lang.foreign.MemorySegment)] +/// ### heapUsage +/// [Byte offset handle][#MH_heapUsage] - [Memory layout][#ML_heapUsage] - [Getter][#heapUsage(long)] - [Setter][#heapUsage(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMemoryBudgetPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize[VK_MAX_MEMORY_HEAPS] heapBudget; +/// VkDeviceSize[VK_MAX_MEMORY_HEAPS] heapUsage; +/// } VkPhysicalDeviceMemoryBudgetPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceMemoryBudgetPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceMemoryBudgetPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_MAX_MEMORY_HEAPS, ValueLayout.JAVA_LONG).withName("heapBudget"), + MemoryLayout.sequenceLayout(VK_MAX_MEMORY_HEAPS, ValueLayout.JAVA_LONG).withName("heapUsage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `heapBudget` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_heapBudget = LAYOUT.byteOffsetHandle(PathElement.groupElement("heapBudget"), PathElement.sequenceElement()); + /// The memory layout of `heapBudget`. + public static final MemoryLayout ML_heapBudget = LAYOUT.select(PathElement.groupElement("heapBudget")); + /// The byte offset handle of `heapUsage` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_heapUsage = LAYOUT.byteOffsetHandle(PathElement.groupElement("heapUsage"), PathElement.sequenceElement()); + /// The memory layout of `heapUsage`. + public static final MemoryLayout ML_heapUsage = LAYOUT.select(PathElement.groupElement("heapUsage")); + + /// Creates `VkPhysicalDeviceMemoryBudgetPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMemoryBudgetPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMemoryBudgetPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryBudgetPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryBudgetPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceMemoryBudgetPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryBudgetPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryBudgetPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMemoryBudgetPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryBudgetPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryBudgetPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMemoryBudgetPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMemoryBudgetPropertiesEXT` + public static VkPhysicalDeviceMemoryBudgetPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMemoryBudgetPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMemoryBudgetPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMemoryBudgetPropertiesEXT` + public static VkPhysicalDeviceMemoryBudgetPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMemoryBudgetPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryBudgetPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryBudgetPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryBudgetPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryBudgetPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `heapBudget` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment get_heapBudget(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_heapBudget.invokeExact(0L, elementIndex), index), ML_heapBudget); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `heapBudget`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment get_heapBudget(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_heapBudget(segment, 0L, elementIndex); } + /// {@return `heapBudget` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment heapBudgetAt(long index, long elementIndex) { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_heapBudget(this.segment(), index, elementIndex); } + /// {@return `heapBudget`} + /// @param elementIndex the index of the element + public @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment heapBudget(long elementIndex) { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_heapBudget(this.segment(), elementIndex); } + /// Sets `heapBudget` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_heapBudget(MemorySegment segment, long index, long elementIndex, @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_heapBudget.invokeExact(0L, elementIndex), index), ML_heapBudget.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `heapBudget` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_heapBudget(MemorySegment segment, long elementIndex, @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_heapBudget(segment, 0L, elementIndex, value); } + /// Sets `heapBudget` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryBudgetPropertiesEXT heapBudgetAt(long index, long elementIndex, @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_heapBudget(this.segment(), index, elementIndex, value); return this; } + /// Sets `heapBudget` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryBudgetPropertiesEXT heapBudget(long elementIndex, @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_heapBudget(this.segment(), elementIndex, value); return this; } + + /// {@return `heapUsage` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment get_heapUsage(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_heapUsage.invokeExact(0L, elementIndex), index), ML_heapUsage); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `heapUsage`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment get_heapUsage(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_heapUsage(segment, 0L, elementIndex); } + /// {@return `heapUsage` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment heapUsageAt(long index, long elementIndex) { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_heapUsage(this.segment(), index, elementIndex); } + /// {@return `heapUsage`} + /// @param elementIndex the index of the element + public @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment heapUsage(long elementIndex) { return VkPhysicalDeviceMemoryBudgetPropertiesEXT.get_heapUsage(this.segment(), elementIndex); } + /// Sets `heapUsage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_heapUsage(MemorySegment segment, long index, long elementIndex, @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_heapUsage.invokeExact(0L, elementIndex), index), ML_heapUsage.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `heapUsage` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_heapUsage(MemorySegment segment, long elementIndex, @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_heapUsage(segment, 0L, elementIndex, value); } + /// Sets `heapUsage` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryBudgetPropertiesEXT heapUsageAt(long index, long elementIndex, @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_heapUsage(this.segment(), index, elementIndex, value); return this; } + /// Sets `heapUsage` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryBudgetPropertiesEXT heapUsage(long elementIndex, @CType("VkDeviceSize[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryBudgetPropertiesEXT.set_heapUsage(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMemoryPriorityFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMemoryPriorityFeaturesEXT.java new file mode 100644 index 00000000..e8ef7670 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMemoryPriorityFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryPriority +/// [VarHandle][#VH_memoryPriority] - [Getter][#memoryPriority()] - [Setter][#memoryPriority(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMemoryPriorityFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 memoryPriority; +/// } VkPhysicalDeviceMemoryPriorityFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceMemoryPriorityFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceMemoryPriorityFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryPriority") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryPriority` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryPriority = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryPriority")); + + /// Creates `VkPhysicalDeviceMemoryPriorityFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMemoryPriorityFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMemoryPriorityFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryPriorityFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryPriorityFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceMemoryPriorityFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryPriorityFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryPriorityFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMemoryPriorityFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryPriorityFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryPriorityFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMemoryPriorityFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMemoryPriorityFeaturesEXT` + public static VkPhysicalDeviceMemoryPriorityFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMemoryPriorityFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMemoryPriorityFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMemoryPriorityFeaturesEXT` + public static VkPhysicalDeviceMemoryPriorityFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMemoryPriorityFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMemoryPriorityFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMemoryPriorityFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMemoryPriorityFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMemoryPriorityFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryPriorityFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMemoryPriorityFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryPriorityFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMemoryPriorityFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMemoryPriorityFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMemoryPriorityFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMemoryPriorityFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryPriorityFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryPriorityFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryPriorityFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryPriorityFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryPriorityFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryPriority` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_memoryPriority(MemorySegment segment, long index) { return (int) VH_memoryPriority.get(segment, 0L, index); } + /// {@return `memoryPriority`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_memoryPriority(MemorySegment segment) { return VkPhysicalDeviceMemoryPriorityFeaturesEXT.get_memoryPriority(segment, 0L); } + /// {@return `memoryPriority` at the given index} + /// @param index the index + public @CType("VkBool32") int memoryPriorityAt(long index) { return VkPhysicalDeviceMemoryPriorityFeaturesEXT.get_memoryPriority(this.segment(), index); } + /// {@return `memoryPriority`} + public @CType("VkBool32") int memoryPriority() { return VkPhysicalDeviceMemoryPriorityFeaturesEXT.get_memoryPriority(this.segment()); } + /// Sets `memoryPriority` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryPriority(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_memoryPriority.set(segment, 0L, index, value); } + /// Sets `memoryPriority` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryPriority(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMemoryPriorityFeaturesEXT.set_memoryPriority(segment, 0L, value); } + /// Sets `memoryPriority` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryPriorityFeaturesEXT memoryPriorityAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMemoryPriorityFeaturesEXT.set_memoryPriority(this.segment(), index, value); return this; } + /// Sets `memoryPriority` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryPriorityFeaturesEXT memoryPriority(@CType("VkBool32") int value) { VkPhysicalDeviceMemoryPriorityFeaturesEXT.set_memoryPriority(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMeshShaderFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMeshShaderFeaturesEXT.java new file mode 100644 index 00000000..6faa308f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMeshShaderFeaturesEXT.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### taskShader +/// [VarHandle][#VH_taskShader] - [Getter][#taskShader()] - [Setter][#taskShader(int)] +/// ### meshShader +/// [VarHandle][#VH_meshShader] - [Getter][#meshShader()] - [Setter][#meshShader(int)] +/// ### multiviewMeshShader +/// [VarHandle][#VH_multiviewMeshShader] - [Getter][#multiviewMeshShader()] - [Setter][#multiviewMeshShader(int)] +/// ### primitiveFragmentShadingRateMeshShader +/// [VarHandle][#VH_primitiveFragmentShadingRateMeshShader] - [Getter][#primitiveFragmentShadingRateMeshShader()] - [Setter][#primitiveFragmentShadingRateMeshShader(int)] +/// ### meshShaderQueries +/// [VarHandle][#VH_meshShaderQueries] - [Getter][#meshShaderQueries()] - [Setter][#meshShaderQueries(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMeshShaderFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 taskShader; +/// VkBool32 meshShader; +/// VkBool32 multiviewMeshShader; +/// VkBool32 primitiveFragmentShadingRateMeshShader; +/// VkBool32 meshShaderQueries; +/// } VkPhysicalDeviceMeshShaderFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceMeshShaderFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceMeshShaderFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("taskShader"), + ValueLayout.JAVA_INT.withName("meshShader"), + ValueLayout.JAVA_INT.withName("multiviewMeshShader"), + ValueLayout.JAVA_INT.withName("primitiveFragmentShadingRateMeshShader"), + ValueLayout.JAVA_INT.withName("meshShaderQueries") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `taskShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_taskShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("taskShader")); + /// The [VarHandle] of `meshShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_meshShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("meshShader")); + /// The [VarHandle] of `multiviewMeshShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiviewMeshShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiviewMeshShader")); + /// The [VarHandle] of `primitiveFragmentShadingRateMeshShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitiveFragmentShadingRateMeshShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveFragmentShadingRateMeshShader")); + /// The [VarHandle] of `meshShaderQueries` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_meshShaderQueries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("meshShaderQueries")); + + /// Creates `VkPhysicalDeviceMeshShaderFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMeshShaderFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMeshShaderFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceMeshShaderFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMeshShaderFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMeshShaderFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMeshShaderFeaturesEXT` + public static VkPhysicalDeviceMeshShaderFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMeshShaderFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMeshShaderFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMeshShaderFeaturesEXT` + public static VkPhysicalDeviceMeshShaderFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMeshShaderFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `taskShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_taskShader(MemorySegment segment, long index) { return (int) VH_taskShader.get(segment, 0L, index); } + /// {@return `taskShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_taskShader(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_taskShader(segment, 0L); } + /// {@return `taskShader` at the given index} + /// @param index the index + public @CType("VkBool32") int taskShaderAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_taskShader(this.segment(), index); } + /// {@return `taskShader`} + public @CType("VkBool32") int taskShader() { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_taskShader(this.segment()); } + /// Sets `taskShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_taskShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_taskShader.set(segment, 0L, index, value); } + /// Sets `taskShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_taskShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_taskShader(segment, 0L, value); } + /// Sets `taskShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT taskShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_taskShader(this.segment(), index, value); return this; } + /// Sets `taskShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT taskShader(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_taskShader(this.segment(), value); return this; } + + /// {@return `meshShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_meshShader(MemorySegment segment, long index) { return (int) VH_meshShader.get(segment, 0L, index); } + /// {@return `meshShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_meshShader(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_meshShader(segment, 0L); } + /// {@return `meshShader` at the given index} + /// @param index the index + public @CType("VkBool32") int meshShaderAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_meshShader(this.segment(), index); } + /// {@return `meshShader`} + public @CType("VkBool32") int meshShader() { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_meshShader(this.segment()); } + /// Sets `meshShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_meshShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_meshShader.set(segment, 0L, index, value); } + /// Sets `meshShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_meshShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_meshShader(segment, 0L, value); } + /// Sets `meshShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT meshShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_meshShader(this.segment(), index, value); return this; } + /// Sets `meshShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT meshShader(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_meshShader(this.segment(), value); return this; } + + /// {@return `multiviewMeshShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiviewMeshShader(MemorySegment segment, long index) { return (int) VH_multiviewMeshShader.get(segment, 0L, index); } + /// {@return `multiviewMeshShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiviewMeshShader(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_multiviewMeshShader(segment, 0L); } + /// {@return `multiviewMeshShader` at the given index} + /// @param index the index + public @CType("VkBool32") int multiviewMeshShaderAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_multiviewMeshShader(this.segment(), index); } + /// {@return `multiviewMeshShader`} + public @CType("VkBool32") int multiviewMeshShader() { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_multiviewMeshShader(this.segment()); } + /// Sets `multiviewMeshShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiviewMeshShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiviewMeshShader.set(segment, 0L, index, value); } + /// Sets `multiviewMeshShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiviewMeshShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_multiviewMeshShader(segment, 0L, value); } + /// Sets `multiviewMeshShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT multiviewMeshShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_multiviewMeshShader(this.segment(), index, value); return this; } + /// Sets `multiviewMeshShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT multiviewMeshShader(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_multiviewMeshShader(this.segment(), value); return this; } + + /// {@return `primitiveFragmentShadingRateMeshShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primitiveFragmentShadingRateMeshShader(MemorySegment segment, long index) { return (int) VH_primitiveFragmentShadingRateMeshShader.get(segment, 0L, index); } + /// {@return `primitiveFragmentShadingRateMeshShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primitiveFragmentShadingRateMeshShader(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_primitiveFragmentShadingRateMeshShader(segment, 0L); } + /// {@return `primitiveFragmentShadingRateMeshShader` at the given index} + /// @param index the index + public @CType("VkBool32") int primitiveFragmentShadingRateMeshShaderAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_primitiveFragmentShadingRateMeshShader(this.segment(), index); } + /// {@return `primitiveFragmentShadingRateMeshShader`} + public @CType("VkBool32") int primitiveFragmentShadingRateMeshShader() { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_primitiveFragmentShadingRateMeshShader(this.segment()); } + /// Sets `primitiveFragmentShadingRateMeshShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveFragmentShadingRateMeshShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primitiveFragmentShadingRateMeshShader.set(segment, 0L, index, value); } + /// Sets `primitiveFragmentShadingRateMeshShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveFragmentShadingRateMeshShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_primitiveFragmentShadingRateMeshShader(segment, 0L, value); } + /// Sets `primitiveFragmentShadingRateMeshShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT primitiveFragmentShadingRateMeshShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_primitiveFragmentShadingRateMeshShader(this.segment(), index, value); return this; } + /// Sets `primitiveFragmentShadingRateMeshShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT primitiveFragmentShadingRateMeshShader(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_primitiveFragmentShadingRateMeshShader(this.segment(), value); return this; } + + /// {@return `meshShaderQueries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_meshShaderQueries(MemorySegment segment, long index) { return (int) VH_meshShaderQueries.get(segment, 0L, index); } + /// {@return `meshShaderQueries`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_meshShaderQueries(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_meshShaderQueries(segment, 0L); } + /// {@return `meshShaderQueries` at the given index} + /// @param index the index + public @CType("VkBool32") int meshShaderQueriesAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_meshShaderQueries(this.segment(), index); } + /// {@return `meshShaderQueries`} + public @CType("VkBool32") int meshShaderQueries() { return VkPhysicalDeviceMeshShaderFeaturesEXT.get_meshShaderQueries(this.segment()); } + /// Sets `meshShaderQueries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_meshShaderQueries(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_meshShaderQueries.set(segment, 0L, index, value); } + /// Sets `meshShaderQueries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_meshShaderQueries(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_meshShaderQueries(segment, 0L, value); } + /// Sets `meshShaderQueries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT meshShaderQueriesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_meshShaderQueries(this.segment(), index, value); return this; } + /// Sets `meshShaderQueries` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesEXT meshShaderQueries(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesEXT.set_meshShaderQueries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMeshShaderPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMeshShaderPropertiesEXT.java new file mode 100644 index 00000000..54e83af8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMeshShaderPropertiesEXT.java @@ -0,0 +1,1184 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxTaskWorkGroupTotalCount +/// [VarHandle][#VH_maxTaskWorkGroupTotalCount] - [Getter][#maxTaskWorkGroupTotalCount()] - [Setter][#maxTaskWorkGroupTotalCount(int)] +/// ### maxTaskWorkGroupCount +/// [VarHandle][#VH_maxTaskWorkGroupCount] - [Getter][#maxTaskWorkGroupCount()] - [Setter][#maxTaskWorkGroupCount(int)] +/// ### maxTaskWorkGroupInvocations +/// [VarHandle][#VH_maxTaskWorkGroupInvocations] - [Getter][#maxTaskWorkGroupInvocations()] - [Setter][#maxTaskWorkGroupInvocations(int)] +/// ### maxTaskWorkGroupSize +/// [VarHandle][#VH_maxTaskWorkGroupSize] - [Getter][#maxTaskWorkGroupSize()] - [Setter][#maxTaskWorkGroupSize(int)] +/// ### maxTaskPayloadSize +/// [VarHandle][#VH_maxTaskPayloadSize] - [Getter][#maxTaskPayloadSize()] - [Setter][#maxTaskPayloadSize(int)] +/// ### maxTaskSharedMemorySize +/// [VarHandle][#VH_maxTaskSharedMemorySize] - [Getter][#maxTaskSharedMemorySize()] - [Setter][#maxTaskSharedMemorySize(int)] +/// ### maxTaskPayloadAndSharedMemorySize +/// [VarHandle][#VH_maxTaskPayloadAndSharedMemorySize] - [Getter][#maxTaskPayloadAndSharedMemorySize()] - [Setter][#maxTaskPayloadAndSharedMemorySize(int)] +/// ### maxMeshWorkGroupTotalCount +/// [VarHandle][#VH_maxMeshWorkGroupTotalCount] - [Getter][#maxMeshWorkGroupTotalCount()] - [Setter][#maxMeshWorkGroupTotalCount(int)] +/// ### maxMeshWorkGroupCount +/// [VarHandle][#VH_maxMeshWorkGroupCount] - [Getter][#maxMeshWorkGroupCount()] - [Setter][#maxMeshWorkGroupCount(int)] +/// ### maxMeshWorkGroupInvocations +/// [VarHandle][#VH_maxMeshWorkGroupInvocations] - [Getter][#maxMeshWorkGroupInvocations()] - [Setter][#maxMeshWorkGroupInvocations(int)] +/// ### maxMeshWorkGroupSize +/// [VarHandle][#VH_maxMeshWorkGroupSize] - [Getter][#maxMeshWorkGroupSize()] - [Setter][#maxMeshWorkGroupSize(int)] +/// ### maxMeshSharedMemorySize +/// [VarHandle][#VH_maxMeshSharedMemorySize] - [Getter][#maxMeshSharedMemorySize()] - [Setter][#maxMeshSharedMemorySize(int)] +/// ### maxMeshPayloadAndSharedMemorySize +/// [VarHandle][#VH_maxMeshPayloadAndSharedMemorySize] - [Getter][#maxMeshPayloadAndSharedMemorySize()] - [Setter][#maxMeshPayloadAndSharedMemorySize(int)] +/// ### maxMeshOutputMemorySize +/// [VarHandle][#VH_maxMeshOutputMemorySize] - [Getter][#maxMeshOutputMemorySize()] - [Setter][#maxMeshOutputMemorySize(int)] +/// ### maxMeshPayloadAndOutputMemorySize +/// [VarHandle][#VH_maxMeshPayloadAndOutputMemorySize] - [Getter][#maxMeshPayloadAndOutputMemorySize()] - [Setter][#maxMeshPayloadAndOutputMemorySize(int)] +/// ### maxMeshOutputComponents +/// [VarHandle][#VH_maxMeshOutputComponents] - [Getter][#maxMeshOutputComponents()] - [Setter][#maxMeshOutputComponents(int)] +/// ### maxMeshOutputVertices +/// [VarHandle][#VH_maxMeshOutputVertices] - [Getter][#maxMeshOutputVertices()] - [Setter][#maxMeshOutputVertices(int)] +/// ### maxMeshOutputPrimitives +/// [VarHandle][#VH_maxMeshOutputPrimitives] - [Getter][#maxMeshOutputPrimitives()] - [Setter][#maxMeshOutputPrimitives(int)] +/// ### maxMeshOutputLayers +/// [VarHandle][#VH_maxMeshOutputLayers] - [Getter][#maxMeshOutputLayers()] - [Setter][#maxMeshOutputLayers(int)] +/// ### maxMeshMultiviewViewCount +/// [VarHandle][#VH_maxMeshMultiviewViewCount] - [Getter][#maxMeshMultiviewViewCount()] - [Setter][#maxMeshMultiviewViewCount(int)] +/// ### meshOutputPerVertexGranularity +/// [VarHandle][#VH_meshOutputPerVertexGranularity] - [Getter][#meshOutputPerVertexGranularity()] - [Setter][#meshOutputPerVertexGranularity(int)] +/// ### meshOutputPerPrimitiveGranularity +/// [VarHandle][#VH_meshOutputPerPrimitiveGranularity] - [Getter][#meshOutputPerPrimitiveGranularity()] - [Setter][#meshOutputPerPrimitiveGranularity(int)] +/// ### maxPreferredTaskWorkGroupInvocations +/// [VarHandle][#VH_maxPreferredTaskWorkGroupInvocations] - [Getter][#maxPreferredTaskWorkGroupInvocations()] - [Setter][#maxPreferredTaskWorkGroupInvocations(int)] +/// ### maxPreferredMeshWorkGroupInvocations +/// [VarHandle][#VH_maxPreferredMeshWorkGroupInvocations] - [Getter][#maxPreferredMeshWorkGroupInvocations()] - [Setter][#maxPreferredMeshWorkGroupInvocations(int)] +/// ### prefersLocalInvocationVertexOutput +/// [VarHandle][#VH_prefersLocalInvocationVertexOutput] - [Getter][#prefersLocalInvocationVertexOutput()] - [Setter][#prefersLocalInvocationVertexOutput(int)] +/// ### prefersLocalInvocationPrimitiveOutput +/// [VarHandle][#VH_prefersLocalInvocationPrimitiveOutput] - [Getter][#prefersLocalInvocationPrimitiveOutput()] - [Setter][#prefersLocalInvocationPrimitiveOutput(int)] +/// ### prefersCompactVertexOutput +/// [VarHandle][#VH_prefersCompactVertexOutput] - [Getter][#prefersCompactVertexOutput()] - [Setter][#prefersCompactVertexOutput(int)] +/// ### prefersCompactPrimitiveOutput +/// [VarHandle][#VH_prefersCompactPrimitiveOutput] - [Getter][#prefersCompactPrimitiveOutput()] - [Setter][#prefersCompactPrimitiveOutput(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMeshShaderPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxTaskWorkGroupTotalCount; +/// uint32_t maxTaskWorkGroupCount; +/// uint32_t maxTaskWorkGroupInvocations; +/// uint32_t maxTaskWorkGroupSize; +/// uint32_t maxTaskPayloadSize; +/// uint32_t maxTaskSharedMemorySize; +/// uint32_t maxTaskPayloadAndSharedMemorySize; +/// uint32_t maxMeshWorkGroupTotalCount; +/// uint32_t maxMeshWorkGroupCount; +/// uint32_t maxMeshWorkGroupInvocations; +/// uint32_t maxMeshWorkGroupSize; +/// uint32_t maxMeshSharedMemorySize; +/// uint32_t maxMeshPayloadAndSharedMemorySize; +/// uint32_t maxMeshOutputMemorySize; +/// uint32_t maxMeshPayloadAndOutputMemorySize; +/// uint32_t maxMeshOutputComponents; +/// uint32_t maxMeshOutputVertices; +/// uint32_t maxMeshOutputPrimitives; +/// uint32_t maxMeshOutputLayers; +/// uint32_t maxMeshMultiviewViewCount; +/// uint32_t meshOutputPerVertexGranularity; +/// uint32_t meshOutputPerPrimitiveGranularity; +/// uint32_t maxPreferredTaskWorkGroupInvocations; +/// uint32_t maxPreferredMeshWorkGroupInvocations; +/// VkBool32 prefersLocalInvocationVertexOutput; +/// VkBool32 prefersLocalInvocationPrimitiveOutput; +/// VkBool32 prefersCompactVertexOutput; +/// VkBool32 prefersCompactPrimitiveOutput; +/// } VkPhysicalDeviceMeshShaderPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceMeshShaderPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceMeshShaderPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxTaskWorkGroupTotalCount"), + ValueLayout.JAVA_INT.withName("maxTaskWorkGroupCount"), + ValueLayout.JAVA_INT.withName("maxTaskWorkGroupInvocations"), + ValueLayout.JAVA_INT.withName("maxTaskWorkGroupSize"), + ValueLayout.JAVA_INT.withName("maxTaskPayloadSize"), + ValueLayout.JAVA_INT.withName("maxTaskSharedMemorySize"), + ValueLayout.JAVA_INT.withName("maxTaskPayloadAndSharedMemorySize"), + ValueLayout.JAVA_INT.withName("maxMeshWorkGroupTotalCount"), + ValueLayout.JAVA_INT.withName("maxMeshWorkGroupCount"), + ValueLayout.JAVA_INT.withName("maxMeshWorkGroupInvocations"), + ValueLayout.JAVA_INT.withName("maxMeshWorkGroupSize"), + ValueLayout.JAVA_INT.withName("maxMeshSharedMemorySize"), + ValueLayout.JAVA_INT.withName("maxMeshPayloadAndSharedMemorySize"), + ValueLayout.JAVA_INT.withName("maxMeshOutputMemorySize"), + ValueLayout.JAVA_INT.withName("maxMeshPayloadAndOutputMemorySize"), + ValueLayout.JAVA_INT.withName("maxMeshOutputComponents"), + ValueLayout.JAVA_INT.withName("maxMeshOutputVertices"), + ValueLayout.JAVA_INT.withName("maxMeshOutputPrimitives"), + ValueLayout.JAVA_INT.withName("maxMeshOutputLayers"), + ValueLayout.JAVA_INT.withName("maxMeshMultiviewViewCount"), + ValueLayout.JAVA_INT.withName("meshOutputPerVertexGranularity"), + ValueLayout.JAVA_INT.withName("meshOutputPerPrimitiveGranularity"), + ValueLayout.JAVA_INT.withName("maxPreferredTaskWorkGroupInvocations"), + ValueLayout.JAVA_INT.withName("maxPreferredMeshWorkGroupInvocations"), + ValueLayout.JAVA_INT.withName("prefersLocalInvocationVertexOutput"), + ValueLayout.JAVA_INT.withName("prefersLocalInvocationPrimitiveOutput"), + ValueLayout.JAVA_INT.withName("prefersCompactVertexOutput"), + ValueLayout.JAVA_INT.withName("prefersCompactPrimitiveOutput") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxTaskWorkGroupTotalCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskWorkGroupTotalCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskWorkGroupTotalCount")); + /// The [VarHandle] of `maxTaskWorkGroupCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskWorkGroupCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskWorkGroupCount")); + /// The [VarHandle] of `maxTaskWorkGroupInvocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskWorkGroupInvocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskWorkGroupInvocations")); + /// The [VarHandle] of `maxTaskWorkGroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskWorkGroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskWorkGroupSize")); + /// The [VarHandle] of `maxTaskPayloadSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskPayloadSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskPayloadSize")); + /// The [VarHandle] of `maxTaskSharedMemorySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskSharedMemorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskSharedMemorySize")); + /// The [VarHandle] of `maxTaskPayloadAndSharedMemorySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskPayloadAndSharedMemorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskPayloadAndSharedMemorySize")); + /// The [VarHandle] of `maxMeshWorkGroupTotalCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshWorkGroupTotalCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshWorkGroupTotalCount")); + /// The [VarHandle] of `maxMeshWorkGroupCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshWorkGroupCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshWorkGroupCount")); + /// The [VarHandle] of `maxMeshWorkGroupInvocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshWorkGroupInvocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshWorkGroupInvocations")); + /// The [VarHandle] of `maxMeshWorkGroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshWorkGroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshWorkGroupSize")); + /// The [VarHandle] of `maxMeshSharedMemorySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshSharedMemorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshSharedMemorySize")); + /// The [VarHandle] of `maxMeshPayloadAndSharedMemorySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshPayloadAndSharedMemorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshPayloadAndSharedMemorySize")); + /// The [VarHandle] of `maxMeshOutputMemorySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshOutputMemorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshOutputMemorySize")); + /// The [VarHandle] of `maxMeshPayloadAndOutputMemorySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshPayloadAndOutputMemorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshPayloadAndOutputMemorySize")); + /// The [VarHandle] of `maxMeshOutputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshOutputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshOutputComponents")); + /// The [VarHandle] of `maxMeshOutputVertices` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshOutputVertices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshOutputVertices")); + /// The [VarHandle] of `maxMeshOutputPrimitives` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshOutputPrimitives = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshOutputPrimitives")); + /// The [VarHandle] of `maxMeshOutputLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshOutputLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshOutputLayers")); + /// The [VarHandle] of `maxMeshMultiviewViewCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshMultiviewViewCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshMultiviewViewCount")); + /// The [VarHandle] of `meshOutputPerVertexGranularity` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_meshOutputPerVertexGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("meshOutputPerVertexGranularity")); + /// The [VarHandle] of `meshOutputPerPrimitiveGranularity` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_meshOutputPerPrimitiveGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("meshOutputPerPrimitiveGranularity")); + /// The [VarHandle] of `maxPreferredTaskWorkGroupInvocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPreferredTaskWorkGroupInvocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPreferredTaskWorkGroupInvocations")); + /// The [VarHandle] of `maxPreferredMeshWorkGroupInvocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPreferredMeshWorkGroupInvocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPreferredMeshWorkGroupInvocations")); + /// The [VarHandle] of `prefersLocalInvocationVertexOutput` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_prefersLocalInvocationVertexOutput = LAYOUT.arrayElementVarHandle(PathElement.groupElement("prefersLocalInvocationVertexOutput")); + /// The [VarHandle] of `prefersLocalInvocationPrimitiveOutput` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_prefersLocalInvocationPrimitiveOutput = LAYOUT.arrayElementVarHandle(PathElement.groupElement("prefersLocalInvocationPrimitiveOutput")); + /// The [VarHandle] of `prefersCompactVertexOutput` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_prefersCompactVertexOutput = LAYOUT.arrayElementVarHandle(PathElement.groupElement("prefersCompactVertexOutput")); + /// The [VarHandle] of `prefersCompactPrimitiveOutput` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_prefersCompactPrimitiveOutput = LAYOUT.arrayElementVarHandle(PathElement.groupElement("prefersCompactPrimitiveOutput")); + + /// Creates `VkPhysicalDeviceMeshShaderPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMeshShaderPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMeshShaderPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceMeshShaderPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMeshShaderPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMeshShaderPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMeshShaderPropertiesEXT` + public static VkPhysicalDeviceMeshShaderPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMeshShaderPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMeshShaderPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMeshShaderPropertiesEXT` + public static VkPhysicalDeviceMeshShaderPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMeshShaderPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `maxTaskWorkGroupTotalCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskWorkGroupTotalCount(MemorySegment segment, long index) { return (int) VH_maxTaskWorkGroupTotalCount.get(segment, 0L, index); } + /// {@return `maxTaskWorkGroupTotalCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskWorkGroupTotalCount(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupTotalCount(segment, 0L); } + /// {@return `maxTaskWorkGroupTotalCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskWorkGroupTotalCountAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupTotalCount(this.segment(), index); } + /// {@return `maxTaskWorkGroupTotalCount`} + public @CType("uint32_t") int maxTaskWorkGroupTotalCount() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupTotalCount(this.segment()); } + /// Sets `maxTaskWorkGroupTotalCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskWorkGroupTotalCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskWorkGroupTotalCount.set(segment, 0L, index, value); } + /// Sets `maxTaskWorkGroupTotalCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskWorkGroupTotalCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupTotalCount(segment, 0L, value); } + /// Sets `maxTaskWorkGroupTotalCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskWorkGroupTotalCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupTotalCount(this.segment(), index, value); return this; } + /// Sets `maxTaskWorkGroupTotalCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskWorkGroupTotalCount(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupTotalCount(this.segment(), value); return this; } + + /// {@return `maxTaskWorkGroupCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskWorkGroupCount(MemorySegment segment, long index) { return (int) VH_maxTaskWorkGroupCount.get(segment, 0L, index); } + /// {@return `maxTaskWorkGroupCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskWorkGroupCount(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupCount(segment, 0L); } + /// {@return `maxTaskWorkGroupCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskWorkGroupCountAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupCount(this.segment(), index); } + /// {@return `maxTaskWorkGroupCount`} + public @CType("uint32_t") int maxTaskWorkGroupCount() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupCount(this.segment()); } + /// Sets `maxTaskWorkGroupCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskWorkGroupCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskWorkGroupCount.set(segment, 0L, index, value); } + /// Sets `maxTaskWorkGroupCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskWorkGroupCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupCount(segment, 0L, value); } + /// Sets `maxTaskWorkGroupCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskWorkGroupCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupCount(this.segment(), index, value); return this; } + /// Sets `maxTaskWorkGroupCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskWorkGroupCount(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupCount(this.segment(), value); return this; } + + /// {@return `maxTaskWorkGroupInvocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskWorkGroupInvocations(MemorySegment segment, long index) { return (int) VH_maxTaskWorkGroupInvocations.get(segment, 0L, index); } + /// {@return `maxTaskWorkGroupInvocations`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskWorkGroupInvocations(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupInvocations(segment, 0L); } + /// {@return `maxTaskWorkGroupInvocations` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskWorkGroupInvocationsAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupInvocations(this.segment(), index); } + /// {@return `maxTaskWorkGroupInvocations`} + public @CType("uint32_t") int maxTaskWorkGroupInvocations() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupInvocations(this.segment()); } + /// Sets `maxTaskWorkGroupInvocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskWorkGroupInvocations(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskWorkGroupInvocations.set(segment, 0L, index, value); } + /// Sets `maxTaskWorkGroupInvocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskWorkGroupInvocations(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupInvocations(segment, 0L, value); } + /// Sets `maxTaskWorkGroupInvocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskWorkGroupInvocationsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupInvocations(this.segment(), index, value); return this; } + /// Sets `maxTaskWorkGroupInvocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskWorkGroupInvocations(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupInvocations(this.segment(), value); return this; } + + /// {@return `maxTaskWorkGroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskWorkGroupSize(MemorySegment segment, long index) { return (int) VH_maxTaskWorkGroupSize.get(segment, 0L, index); } + /// {@return `maxTaskWorkGroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskWorkGroupSize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupSize(segment, 0L); } + /// {@return `maxTaskWorkGroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskWorkGroupSizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupSize(this.segment(), index); } + /// {@return `maxTaskWorkGroupSize`} + public @CType("uint32_t") int maxTaskWorkGroupSize() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskWorkGroupSize(this.segment()); } + /// Sets `maxTaskWorkGroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskWorkGroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskWorkGroupSize.set(segment, 0L, index, value); } + /// Sets `maxTaskWorkGroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskWorkGroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupSize(segment, 0L, value); } + /// Sets `maxTaskWorkGroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskWorkGroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupSize(this.segment(), index, value); return this; } + /// Sets `maxTaskWorkGroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskWorkGroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskWorkGroupSize(this.segment(), value); return this; } + + /// {@return `maxTaskPayloadSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskPayloadSize(MemorySegment segment, long index) { return (int) VH_maxTaskPayloadSize.get(segment, 0L, index); } + /// {@return `maxTaskPayloadSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskPayloadSize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskPayloadSize(segment, 0L); } + /// {@return `maxTaskPayloadSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskPayloadSizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskPayloadSize(this.segment(), index); } + /// {@return `maxTaskPayloadSize`} + public @CType("uint32_t") int maxTaskPayloadSize() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskPayloadSize(this.segment()); } + /// Sets `maxTaskPayloadSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskPayloadSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskPayloadSize.set(segment, 0L, index, value); } + /// Sets `maxTaskPayloadSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskPayloadSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskPayloadSize(segment, 0L, value); } + /// Sets `maxTaskPayloadSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskPayloadSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskPayloadSize(this.segment(), index, value); return this; } + /// Sets `maxTaskPayloadSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskPayloadSize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskPayloadSize(this.segment(), value); return this; } + + /// {@return `maxTaskSharedMemorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskSharedMemorySize(MemorySegment segment, long index) { return (int) VH_maxTaskSharedMemorySize.get(segment, 0L, index); } + /// {@return `maxTaskSharedMemorySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskSharedMemorySize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskSharedMemorySize(segment, 0L); } + /// {@return `maxTaskSharedMemorySize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskSharedMemorySizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskSharedMemorySize(this.segment(), index); } + /// {@return `maxTaskSharedMemorySize`} + public @CType("uint32_t") int maxTaskSharedMemorySize() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskSharedMemorySize(this.segment()); } + /// Sets `maxTaskSharedMemorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskSharedMemorySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskSharedMemorySize.set(segment, 0L, index, value); } + /// Sets `maxTaskSharedMemorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskSharedMemorySize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskSharedMemorySize(segment, 0L, value); } + /// Sets `maxTaskSharedMemorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskSharedMemorySizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskSharedMemorySize(this.segment(), index, value); return this; } + /// Sets `maxTaskSharedMemorySize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskSharedMemorySize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskSharedMemorySize(this.segment(), value); return this; } + + /// {@return `maxTaskPayloadAndSharedMemorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskPayloadAndSharedMemorySize(MemorySegment segment, long index) { return (int) VH_maxTaskPayloadAndSharedMemorySize.get(segment, 0L, index); } + /// {@return `maxTaskPayloadAndSharedMemorySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskPayloadAndSharedMemorySize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskPayloadAndSharedMemorySize(segment, 0L); } + /// {@return `maxTaskPayloadAndSharedMemorySize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskPayloadAndSharedMemorySizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskPayloadAndSharedMemorySize(this.segment(), index); } + /// {@return `maxTaskPayloadAndSharedMemorySize`} + public @CType("uint32_t") int maxTaskPayloadAndSharedMemorySize() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxTaskPayloadAndSharedMemorySize(this.segment()); } + /// Sets `maxTaskPayloadAndSharedMemorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskPayloadAndSharedMemorySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskPayloadAndSharedMemorySize.set(segment, 0L, index, value); } + /// Sets `maxTaskPayloadAndSharedMemorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskPayloadAndSharedMemorySize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskPayloadAndSharedMemorySize(segment, 0L, value); } + /// Sets `maxTaskPayloadAndSharedMemorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskPayloadAndSharedMemorySizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskPayloadAndSharedMemorySize(this.segment(), index, value); return this; } + /// Sets `maxTaskPayloadAndSharedMemorySize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxTaskPayloadAndSharedMemorySize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxTaskPayloadAndSharedMemorySize(this.segment(), value); return this; } + + /// {@return `maxMeshWorkGroupTotalCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshWorkGroupTotalCount(MemorySegment segment, long index) { return (int) VH_maxMeshWorkGroupTotalCount.get(segment, 0L, index); } + /// {@return `maxMeshWorkGroupTotalCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshWorkGroupTotalCount(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupTotalCount(segment, 0L); } + /// {@return `maxMeshWorkGroupTotalCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshWorkGroupTotalCountAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupTotalCount(this.segment(), index); } + /// {@return `maxMeshWorkGroupTotalCount`} + public @CType("uint32_t") int maxMeshWorkGroupTotalCount() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupTotalCount(this.segment()); } + /// Sets `maxMeshWorkGroupTotalCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshWorkGroupTotalCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshWorkGroupTotalCount.set(segment, 0L, index, value); } + /// Sets `maxMeshWorkGroupTotalCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshWorkGroupTotalCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupTotalCount(segment, 0L, value); } + /// Sets `maxMeshWorkGroupTotalCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshWorkGroupTotalCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupTotalCount(this.segment(), index, value); return this; } + /// Sets `maxMeshWorkGroupTotalCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshWorkGroupTotalCount(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupTotalCount(this.segment(), value); return this; } + + /// {@return `maxMeshWorkGroupCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshWorkGroupCount(MemorySegment segment, long index) { return (int) VH_maxMeshWorkGroupCount.get(segment, 0L, index); } + /// {@return `maxMeshWorkGroupCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshWorkGroupCount(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupCount(segment, 0L); } + /// {@return `maxMeshWorkGroupCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshWorkGroupCountAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupCount(this.segment(), index); } + /// {@return `maxMeshWorkGroupCount`} + public @CType("uint32_t") int maxMeshWorkGroupCount() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupCount(this.segment()); } + /// Sets `maxMeshWorkGroupCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshWorkGroupCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshWorkGroupCount.set(segment, 0L, index, value); } + /// Sets `maxMeshWorkGroupCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshWorkGroupCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupCount(segment, 0L, value); } + /// Sets `maxMeshWorkGroupCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshWorkGroupCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupCount(this.segment(), index, value); return this; } + /// Sets `maxMeshWorkGroupCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshWorkGroupCount(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupCount(this.segment(), value); return this; } + + /// {@return `maxMeshWorkGroupInvocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshWorkGroupInvocations(MemorySegment segment, long index) { return (int) VH_maxMeshWorkGroupInvocations.get(segment, 0L, index); } + /// {@return `maxMeshWorkGroupInvocations`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshWorkGroupInvocations(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupInvocations(segment, 0L); } + /// {@return `maxMeshWorkGroupInvocations` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshWorkGroupInvocationsAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupInvocations(this.segment(), index); } + /// {@return `maxMeshWorkGroupInvocations`} + public @CType("uint32_t") int maxMeshWorkGroupInvocations() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupInvocations(this.segment()); } + /// Sets `maxMeshWorkGroupInvocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshWorkGroupInvocations(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshWorkGroupInvocations.set(segment, 0L, index, value); } + /// Sets `maxMeshWorkGroupInvocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshWorkGroupInvocations(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupInvocations(segment, 0L, value); } + /// Sets `maxMeshWorkGroupInvocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshWorkGroupInvocationsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupInvocations(this.segment(), index, value); return this; } + /// Sets `maxMeshWorkGroupInvocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshWorkGroupInvocations(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupInvocations(this.segment(), value); return this; } + + /// {@return `maxMeshWorkGroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshWorkGroupSize(MemorySegment segment, long index) { return (int) VH_maxMeshWorkGroupSize.get(segment, 0L, index); } + /// {@return `maxMeshWorkGroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshWorkGroupSize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupSize(segment, 0L); } + /// {@return `maxMeshWorkGroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshWorkGroupSizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupSize(this.segment(), index); } + /// {@return `maxMeshWorkGroupSize`} + public @CType("uint32_t") int maxMeshWorkGroupSize() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshWorkGroupSize(this.segment()); } + /// Sets `maxMeshWorkGroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshWorkGroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshWorkGroupSize.set(segment, 0L, index, value); } + /// Sets `maxMeshWorkGroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshWorkGroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupSize(segment, 0L, value); } + /// Sets `maxMeshWorkGroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshWorkGroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupSize(this.segment(), index, value); return this; } + /// Sets `maxMeshWorkGroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshWorkGroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshWorkGroupSize(this.segment(), value); return this; } + + /// {@return `maxMeshSharedMemorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshSharedMemorySize(MemorySegment segment, long index) { return (int) VH_maxMeshSharedMemorySize.get(segment, 0L, index); } + /// {@return `maxMeshSharedMemorySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshSharedMemorySize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshSharedMemorySize(segment, 0L); } + /// {@return `maxMeshSharedMemorySize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshSharedMemorySizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshSharedMemorySize(this.segment(), index); } + /// {@return `maxMeshSharedMemorySize`} + public @CType("uint32_t") int maxMeshSharedMemorySize() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshSharedMemorySize(this.segment()); } + /// Sets `maxMeshSharedMemorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshSharedMemorySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshSharedMemorySize.set(segment, 0L, index, value); } + /// Sets `maxMeshSharedMemorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshSharedMemorySize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshSharedMemorySize(segment, 0L, value); } + /// Sets `maxMeshSharedMemorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshSharedMemorySizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshSharedMemorySize(this.segment(), index, value); return this; } + /// Sets `maxMeshSharedMemorySize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshSharedMemorySize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshSharedMemorySize(this.segment(), value); return this; } + + /// {@return `maxMeshPayloadAndSharedMemorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshPayloadAndSharedMemorySize(MemorySegment segment, long index) { return (int) VH_maxMeshPayloadAndSharedMemorySize.get(segment, 0L, index); } + /// {@return `maxMeshPayloadAndSharedMemorySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshPayloadAndSharedMemorySize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshPayloadAndSharedMemorySize(segment, 0L); } + /// {@return `maxMeshPayloadAndSharedMemorySize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshPayloadAndSharedMemorySizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshPayloadAndSharedMemorySize(this.segment(), index); } + /// {@return `maxMeshPayloadAndSharedMemorySize`} + public @CType("uint32_t") int maxMeshPayloadAndSharedMemorySize() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshPayloadAndSharedMemorySize(this.segment()); } + /// Sets `maxMeshPayloadAndSharedMemorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshPayloadAndSharedMemorySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshPayloadAndSharedMemorySize.set(segment, 0L, index, value); } + /// Sets `maxMeshPayloadAndSharedMemorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshPayloadAndSharedMemorySize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshPayloadAndSharedMemorySize(segment, 0L, value); } + /// Sets `maxMeshPayloadAndSharedMemorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshPayloadAndSharedMemorySizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshPayloadAndSharedMemorySize(this.segment(), index, value); return this; } + /// Sets `maxMeshPayloadAndSharedMemorySize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshPayloadAndSharedMemorySize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshPayloadAndSharedMemorySize(this.segment(), value); return this; } + + /// {@return `maxMeshOutputMemorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshOutputMemorySize(MemorySegment segment, long index) { return (int) VH_maxMeshOutputMemorySize.get(segment, 0L, index); } + /// {@return `maxMeshOutputMemorySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshOutputMemorySize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputMemorySize(segment, 0L); } + /// {@return `maxMeshOutputMemorySize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshOutputMemorySizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputMemorySize(this.segment(), index); } + /// {@return `maxMeshOutputMemorySize`} + public @CType("uint32_t") int maxMeshOutputMemorySize() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputMemorySize(this.segment()); } + /// Sets `maxMeshOutputMemorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshOutputMemorySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshOutputMemorySize.set(segment, 0L, index, value); } + /// Sets `maxMeshOutputMemorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshOutputMemorySize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputMemorySize(segment, 0L, value); } + /// Sets `maxMeshOutputMemorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshOutputMemorySizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputMemorySize(this.segment(), index, value); return this; } + /// Sets `maxMeshOutputMemorySize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshOutputMemorySize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputMemorySize(this.segment(), value); return this; } + + /// {@return `maxMeshPayloadAndOutputMemorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshPayloadAndOutputMemorySize(MemorySegment segment, long index) { return (int) VH_maxMeshPayloadAndOutputMemorySize.get(segment, 0L, index); } + /// {@return `maxMeshPayloadAndOutputMemorySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshPayloadAndOutputMemorySize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshPayloadAndOutputMemorySize(segment, 0L); } + /// {@return `maxMeshPayloadAndOutputMemorySize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshPayloadAndOutputMemorySizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshPayloadAndOutputMemorySize(this.segment(), index); } + /// {@return `maxMeshPayloadAndOutputMemorySize`} + public @CType("uint32_t") int maxMeshPayloadAndOutputMemorySize() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshPayloadAndOutputMemorySize(this.segment()); } + /// Sets `maxMeshPayloadAndOutputMemorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshPayloadAndOutputMemorySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshPayloadAndOutputMemorySize.set(segment, 0L, index, value); } + /// Sets `maxMeshPayloadAndOutputMemorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshPayloadAndOutputMemorySize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshPayloadAndOutputMemorySize(segment, 0L, value); } + /// Sets `maxMeshPayloadAndOutputMemorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshPayloadAndOutputMemorySizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshPayloadAndOutputMemorySize(this.segment(), index, value); return this; } + /// Sets `maxMeshPayloadAndOutputMemorySize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshPayloadAndOutputMemorySize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshPayloadAndOutputMemorySize(this.segment(), value); return this; } + + /// {@return `maxMeshOutputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshOutputComponents(MemorySegment segment, long index) { return (int) VH_maxMeshOutputComponents.get(segment, 0L, index); } + /// {@return `maxMeshOutputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshOutputComponents(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputComponents(segment, 0L); } + /// {@return `maxMeshOutputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshOutputComponentsAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputComponents(this.segment(), index); } + /// {@return `maxMeshOutputComponents`} + public @CType("uint32_t") int maxMeshOutputComponents() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputComponents(this.segment()); } + /// Sets `maxMeshOutputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshOutputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshOutputComponents.set(segment, 0L, index, value); } + /// Sets `maxMeshOutputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshOutputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputComponents(segment, 0L, value); } + /// Sets `maxMeshOutputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshOutputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputComponents(this.segment(), index, value); return this; } + /// Sets `maxMeshOutputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshOutputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputComponents(this.segment(), value); return this; } + + /// {@return `maxMeshOutputVertices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshOutputVertices(MemorySegment segment, long index) { return (int) VH_maxMeshOutputVertices.get(segment, 0L, index); } + /// {@return `maxMeshOutputVertices`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshOutputVertices(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputVertices(segment, 0L); } + /// {@return `maxMeshOutputVertices` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshOutputVerticesAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputVertices(this.segment(), index); } + /// {@return `maxMeshOutputVertices`} + public @CType("uint32_t") int maxMeshOutputVertices() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputVertices(this.segment()); } + /// Sets `maxMeshOutputVertices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshOutputVertices(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshOutputVertices.set(segment, 0L, index, value); } + /// Sets `maxMeshOutputVertices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshOutputVertices(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputVertices(segment, 0L, value); } + /// Sets `maxMeshOutputVertices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshOutputVerticesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputVertices(this.segment(), index, value); return this; } + /// Sets `maxMeshOutputVertices` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshOutputVertices(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputVertices(this.segment(), value); return this; } + + /// {@return `maxMeshOutputPrimitives` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshOutputPrimitives(MemorySegment segment, long index) { return (int) VH_maxMeshOutputPrimitives.get(segment, 0L, index); } + /// {@return `maxMeshOutputPrimitives`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshOutputPrimitives(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputPrimitives(segment, 0L); } + /// {@return `maxMeshOutputPrimitives` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshOutputPrimitivesAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputPrimitives(this.segment(), index); } + /// {@return `maxMeshOutputPrimitives`} + public @CType("uint32_t") int maxMeshOutputPrimitives() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputPrimitives(this.segment()); } + /// Sets `maxMeshOutputPrimitives` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshOutputPrimitives(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshOutputPrimitives.set(segment, 0L, index, value); } + /// Sets `maxMeshOutputPrimitives` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshOutputPrimitives(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputPrimitives(segment, 0L, value); } + /// Sets `maxMeshOutputPrimitives` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshOutputPrimitivesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputPrimitives(this.segment(), index, value); return this; } + /// Sets `maxMeshOutputPrimitives` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshOutputPrimitives(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputPrimitives(this.segment(), value); return this; } + + /// {@return `maxMeshOutputLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshOutputLayers(MemorySegment segment, long index) { return (int) VH_maxMeshOutputLayers.get(segment, 0L, index); } + /// {@return `maxMeshOutputLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshOutputLayers(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputLayers(segment, 0L); } + /// {@return `maxMeshOutputLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshOutputLayersAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputLayers(this.segment(), index); } + /// {@return `maxMeshOutputLayers`} + public @CType("uint32_t") int maxMeshOutputLayers() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshOutputLayers(this.segment()); } + /// Sets `maxMeshOutputLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshOutputLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshOutputLayers.set(segment, 0L, index, value); } + /// Sets `maxMeshOutputLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshOutputLayers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputLayers(segment, 0L, value); } + /// Sets `maxMeshOutputLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshOutputLayersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputLayers(this.segment(), index, value); return this; } + /// Sets `maxMeshOutputLayers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshOutputLayers(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshOutputLayers(this.segment(), value); return this; } + + /// {@return `maxMeshMultiviewViewCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshMultiviewViewCount(MemorySegment segment, long index) { return (int) VH_maxMeshMultiviewViewCount.get(segment, 0L, index); } + /// {@return `maxMeshMultiviewViewCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshMultiviewViewCount(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshMultiviewViewCount(segment, 0L); } + /// {@return `maxMeshMultiviewViewCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshMultiviewViewCountAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshMultiviewViewCount(this.segment(), index); } + /// {@return `maxMeshMultiviewViewCount`} + public @CType("uint32_t") int maxMeshMultiviewViewCount() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxMeshMultiviewViewCount(this.segment()); } + /// Sets `maxMeshMultiviewViewCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshMultiviewViewCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshMultiviewViewCount.set(segment, 0L, index, value); } + /// Sets `maxMeshMultiviewViewCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshMultiviewViewCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshMultiviewViewCount(segment, 0L, value); } + /// Sets `maxMeshMultiviewViewCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshMultiviewViewCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshMultiviewViewCount(this.segment(), index, value); return this; } + /// Sets `maxMeshMultiviewViewCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxMeshMultiviewViewCount(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxMeshMultiviewViewCount(this.segment(), value); return this; } + + /// {@return `meshOutputPerVertexGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_meshOutputPerVertexGranularity(MemorySegment segment, long index) { return (int) VH_meshOutputPerVertexGranularity.get(segment, 0L, index); } + /// {@return `meshOutputPerVertexGranularity`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_meshOutputPerVertexGranularity(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_meshOutputPerVertexGranularity(segment, 0L); } + /// {@return `meshOutputPerVertexGranularity` at the given index} + /// @param index the index + public @CType("uint32_t") int meshOutputPerVertexGranularityAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_meshOutputPerVertexGranularity(this.segment(), index); } + /// {@return `meshOutputPerVertexGranularity`} + public @CType("uint32_t") int meshOutputPerVertexGranularity() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_meshOutputPerVertexGranularity(this.segment()); } + /// Sets `meshOutputPerVertexGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_meshOutputPerVertexGranularity(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_meshOutputPerVertexGranularity.set(segment, 0L, index, value); } + /// Sets `meshOutputPerVertexGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_meshOutputPerVertexGranularity(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_meshOutputPerVertexGranularity(segment, 0L, value); } + /// Sets `meshOutputPerVertexGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT meshOutputPerVertexGranularityAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_meshOutputPerVertexGranularity(this.segment(), index, value); return this; } + /// Sets `meshOutputPerVertexGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT meshOutputPerVertexGranularity(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_meshOutputPerVertexGranularity(this.segment(), value); return this; } + + /// {@return `meshOutputPerPrimitiveGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_meshOutputPerPrimitiveGranularity(MemorySegment segment, long index) { return (int) VH_meshOutputPerPrimitiveGranularity.get(segment, 0L, index); } + /// {@return `meshOutputPerPrimitiveGranularity`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_meshOutputPerPrimitiveGranularity(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_meshOutputPerPrimitiveGranularity(segment, 0L); } + /// {@return `meshOutputPerPrimitiveGranularity` at the given index} + /// @param index the index + public @CType("uint32_t") int meshOutputPerPrimitiveGranularityAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_meshOutputPerPrimitiveGranularity(this.segment(), index); } + /// {@return `meshOutputPerPrimitiveGranularity`} + public @CType("uint32_t") int meshOutputPerPrimitiveGranularity() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_meshOutputPerPrimitiveGranularity(this.segment()); } + /// Sets `meshOutputPerPrimitiveGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_meshOutputPerPrimitiveGranularity(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_meshOutputPerPrimitiveGranularity.set(segment, 0L, index, value); } + /// Sets `meshOutputPerPrimitiveGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_meshOutputPerPrimitiveGranularity(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_meshOutputPerPrimitiveGranularity(segment, 0L, value); } + /// Sets `meshOutputPerPrimitiveGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT meshOutputPerPrimitiveGranularityAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_meshOutputPerPrimitiveGranularity(this.segment(), index, value); return this; } + /// Sets `meshOutputPerPrimitiveGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT meshOutputPerPrimitiveGranularity(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_meshOutputPerPrimitiveGranularity(this.segment(), value); return this; } + + /// {@return `maxPreferredTaskWorkGroupInvocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPreferredTaskWorkGroupInvocations(MemorySegment segment, long index) { return (int) VH_maxPreferredTaskWorkGroupInvocations.get(segment, 0L, index); } + /// {@return `maxPreferredTaskWorkGroupInvocations`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPreferredTaskWorkGroupInvocations(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxPreferredTaskWorkGroupInvocations(segment, 0L); } + /// {@return `maxPreferredTaskWorkGroupInvocations` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPreferredTaskWorkGroupInvocationsAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxPreferredTaskWorkGroupInvocations(this.segment(), index); } + /// {@return `maxPreferredTaskWorkGroupInvocations`} + public @CType("uint32_t") int maxPreferredTaskWorkGroupInvocations() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxPreferredTaskWorkGroupInvocations(this.segment()); } + /// Sets `maxPreferredTaskWorkGroupInvocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPreferredTaskWorkGroupInvocations(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPreferredTaskWorkGroupInvocations.set(segment, 0L, index, value); } + /// Sets `maxPreferredTaskWorkGroupInvocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPreferredTaskWorkGroupInvocations(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxPreferredTaskWorkGroupInvocations(segment, 0L, value); } + /// Sets `maxPreferredTaskWorkGroupInvocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxPreferredTaskWorkGroupInvocationsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxPreferredTaskWorkGroupInvocations(this.segment(), index, value); return this; } + /// Sets `maxPreferredTaskWorkGroupInvocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxPreferredTaskWorkGroupInvocations(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxPreferredTaskWorkGroupInvocations(this.segment(), value); return this; } + + /// {@return `maxPreferredMeshWorkGroupInvocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPreferredMeshWorkGroupInvocations(MemorySegment segment, long index) { return (int) VH_maxPreferredMeshWorkGroupInvocations.get(segment, 0L, index); } + /// {@return `maxPreferredMeshWorkGroupInvocations`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPreferredMeshWorkGroupInvocations(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxPreferredMeshWorkGroupInvocations(segment, 0L); } + /// {@return `maxPreferredMeshWorkGroupInvocations` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPreferredMeshWorkGroupInvocationsAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxPreferredMeshWorkGroupInvocations(this.segment(), index); } + /// {@return `maxPreferredMeshWorkGroupInvocations`} + public @CType("uint32_t") int maxPreferredMeshWorkGroupInvocations() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_maxPreferredMeshWorkGroupInvocations(this.segment()); } + /// Sets `maxPreferredMeshWorkGroupInvocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPreferredMeshWorkGroupInvocations(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPreferredMeshWorkGroupInvocations.set(segment, 0L, index, value); } + /// Sets `maxPreferredMeshWorkGroupInvocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPreferredMeshWorkGroupInvocations(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxPreferredMeshWorkGroupInvocations(segment, 0L, value); } + /// Sets `maxPreferredMeshWorkGroupInvocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxPreferredMeshWorkGroupInvocationsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxPreferredMeshWorkGroupInvocations(this.segment(), index, value); return this; } + /// Sets `maxPreferredMeshWorkGroupInvocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT maxPreferredMeshWorkGroupInvocations(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_maxPreferredMeshWorkGroupInvocations(this.segment(), value); return this; } + + /// {@return `prefersLocalInvocationVertexOutput` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_prefersLocalInvocationVertexOutput(MemorySegment segment, long index) { return (int) VH_prefersLocalInvocationVertexOutput.get(segment, 0L, index); } + /// {@return `prefersLocalInvocationVertexOutput`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_prefersLocalInvocationVertexOutput(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersLocalInvocationVertexOutput(segment, 0L); } + /// {@return `prefersLocalInvocationVertexOutput` at the given index} + /// @param index the index + public @CType("VkBool32") int prefersLocalInvocationVertexOutputAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersLocalInvocationVertexOutput(this.segment(), index); } + /// {@return `prefersLocalInvocationVertexOutput`} + public @CType("VkBool32") int prefersLocalInvocationVertexOutput() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersLocalInvocationVertexOutput(this.segment()); } + /// Sets `prefersLocalInvocationVertexOutput` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_prefersLocalInvocationVertexOutput(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_prefersLocalInvocationVertexOutput.set(segment, 0L, index, value); } + /// Sets `prefersLocalInvocationVertexOutput` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_prefersLocalInvocationVertexOutput(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersLocalInvocationVertexOutput(segment, 0L, value); } + /// Sets `prefersLocalInvocationVertexOutput` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT prefersLocalInvocationVertexOutputAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersLocalInvocationVertexOutput(this.segment(), index, value); return this; } + /// Sets `prefersLocalInvocationVertexOutput` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT prefersLocalInvocationVertexOutput(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersLocalInvocationVertexOutput(this.segment(), value); return this; } + + /// {@return `prefersLocalInvocationPrimitiveOutput` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_prefersLocalInvocationPrimitiveOutput(MemorySegment segment, long index) { return (int) VH_prefersLocalInvocationPrimitiveOutput.get(segment, 0L, index); } + /// {@return `prefersLocalInvocationPrimitiveOutput`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_prefersLocalInvocationPrimitiveOutput(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersLocalInvocationPrimitiveOutput(segment, 0L); } + /// {@return `prefersLocalInvocationPrimitiveOutput` at the given index} + /// @param index the index + public @CType("VkBool32") int prefersLocalInvocationPrimitiveOutputAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersLocalInvocationPrimitiveOutput(this.segment(), index); } + /// {@return `prefersLocalInvocationPrimitiveOutput`} + public @CType("VkBool32") int prefersLocalInvocationPrimitiveOutput() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersLocalInvocationPrimitiveOutput(this.segment()); } + /// Sets `prefersLocalInvocationPrimitiveOutput` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_prefersLocalInvocationPrimitiveOutput(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_prefersLocalInvocationPrimitiveOutput.set(segment, 0L, index, value); } + /// Sets `prefersLocalInvocationPrimitiveOutput` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_prefersLocalInvocationPrimitiveOutput(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersLocalInvocationPrimitiveOutput(segment, 0L, value); } + /// Sets `prefersLocalInvocationPrimitiveOutput` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT prefersLocalInvocationPrimitiveOutputAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersLocalInvocationPrimitiveOutput(this.segment(), index, value); return this; } + /// Sets `prefersLocalInvocationPrimitiveOutput` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT prefersLocalInvocationPrimitiveOutput(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersLocalInvocationPrimitiveOutput(this.segment(), value); return this; } + + /// {@return `prefersCompactVertexOutput` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_prefersCompactVertexOutput(MemorySegment segment, long index) { return (int) VH_prefersCompactVertexOutput.get(segment, 0L, index); } + /// {@return `prefersCompactVertexOutput`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_prefersCompactVertexOutput(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersCompactVertexOutput(segment, 0L); } + /// {@return `prefersCompactVertexOutput` at the given index} + /// @param index the index + public @CType("VkBool32") int prefersCompactVertexOutputAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersCompactVertexOutput(this.segment(), index); } + /// {@return `prefersCompactVertexOutput`} + public @CType("VkBool32") int prefersCompactVertexOutput() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersCompactVertexOutput(this.segment()); } + /// Sets `prefersCompactVertexOutput` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_prefersCompactVertexOutput(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_prefersCompactVertexOutput.set(segment, 0L, index, value); } + /// Sets `prefersCompactVertexOutput` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_prefersCompactVertexOutput(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersCompactVertexOutput(segment, 0L, value); } + /// Sets `prefersCompactVertexOutput` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT prefersCompactVertexOutputAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersCompactVertexOutput(this.segment(), index, value); return this; } + /// Sets `prefersCompactVertexOutput` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT prefersCompactVertexOutput(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersCompactVertexOutput(this.segment(), value); return this; } + + /// {@return `prefersCompactPrimitiveOutput` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_prefersCompactPrimitiveOutput(MemorySegment segment, long index) { return (int) VH_prefersCompactPrimitiveOutput.get(segment, 0L, index); } + /// {@return `prefersCompactPrimitiveOutput`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_prefersCompactPrimitiveOutput(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersCompactPrimitiveOutput(segment, 0L); } + /// {@return `prefersCompactPrimitiveOutput` at the given index} + /// @param index the index + public @CType("VkBool32") int prefersCompactPrimitiveOutputAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersCompactPrimitiveOutput(this.segment(), index); } + /// {@return `prefersCompactPrimitiveOutput`} + public @CType("VkBool32") int prefersCompactPrimitiveOutput() { return VkPhysicalDeviceMeshShaderPropertiesEXT.get_prefersCompactPrimitiveOutput(this.segment()); } + /// Sets `prefersCompactPrimitiveOutput` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_prefersCompactPrimitiveOutput(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_prefersCompactPrimitiveOutput.set(segment, 0L, index, value); } + /// Sets `prefersCompactPrimitiveOutput` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_prefersCompactPrimitiveOutput(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersCompactPrimitiveOutput(segment, 0L, value); } + /// Sets `prefersCompactPrimitiveOutput` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT prefersCompactPrimitiveOutputAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersCompactPrimitiveOutput(this.segment(), index, value); return this; } + /// Sets `prefersCompactPrimitiveOutput` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesEXT prefersCompactPrimitiveOutput(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderPropertiesEXT.set_prefersCompactPrimitiveOutput(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMultiDrawFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMultiDrawFeaturesEXT.java new file mode 100644 index 00000000..37803e05 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMultiDrawFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### multiDraw +/// [VarHandle][#VH_multiDraw] - [Getter][#multiDraw()] - [Setter][#multiDraw(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMultiDrawFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 multiDraw; +/// } VkPhysicalDeviceMultiDrawFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceMultiDrawFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceMultiDrawFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("multiDraw") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `multiDraw` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiDraw = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiDraw")); + + /// Creates `VkPhysicalDeviceMultiDrawFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMultiDrawFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMultiDrawFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiDrawFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiDrawFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceMultiDrawFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiDrawFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiDrawFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMultiDrawFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiDrawFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiDrawFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMultiDrawFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMultiDrawFeaturesEXT` + public static VkPhysicalDeviceMultiDrawFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMultiDrawFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMultiDrawFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMultiDrawFeaturesEXT` + public static VkPhysicalDeviceMultiDrawFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMultiDrawFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMultiDrawFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMultiDrawFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMultiDrawFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiDrawFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiDrawFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMultiDrawFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMultiDrawFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMultiDrawFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMultiDrawFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiDrawFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiDrawFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiDrawFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `multiDraw` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiDraw(MemorySegment segment, long index) { return (int) VH_multiDraw.get(segment, 0L, index); } + /// {@return `multiDraw`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiDraw(MemorySegment segment) { return VkPhysicalDeviceMultiDrawFeaturesEXT.get_multiDraw(segment, 0L); } + /// {@return `multiDraw` at the given index} + /// @param index the index + public @CType("VkBool32") int multiDrawAt(long index) { return VkPhysicalDeviceMultiDrawFeaturesEXT.get_multiDraw(this.segment(), index); } + /// {@return `multiDraw`} + public @CType("VkBool32") int multiDraw() { return VkPhysicalDeviceMultiDrawFeaturesEXT.get_multiDraw(this.segment()); } + /// Sets `multiDraw` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiDraw(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiDraw.set(segment, 0L, index, value); } + /// Sets `multiDraw` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiDraw(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMultiDrawFeaturesEXT.set_multiDraw(segment, 0L, value); } + /// Sets `multiDraw` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawFeaturesEXT multiDrawAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMultiDrawFeaturesEXT.set_multiDraw(this.segment(), index, value); return this; } + /// Sets `multiDraw` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawFeaturesEXT multiDraw(@CType("VkBool32") int value) { VkPhysicalDeviceMultiDrawFeaturesEXT.set_multiDraw(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMultiDrawPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMultiDrawPropertiesEXT.java new file mode 100644 index 00000000..bd43097e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMultiDrawPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxMultiDrawCount +/// [VarHandle][#VH_maxMultiDrawCount] - [Getter][#maxMultiDrawCount()] - [Setter][#maxMultiDrawCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMultiDrawPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxMultiDrawCount; +/// } VkPhysicalDeviceMultiDrawPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceMultiDrawPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceMultiDrawPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxMultiDrawCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxMultiDrawCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMultiDrawCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMultiDrawCount")); + + /// Creates `VkPhysicalDeviceMultiDrawPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMultiDrawPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMultiDrawPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiDrawPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiDrawPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceMultiDrawPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiDrawPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiDrawPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMultiDrawPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiDrawPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiDrawPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMultiDrawPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMultiDrawPropertiesEXT` + public static VkPhysicalDeviceMultiDrawPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMultiDrawPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMultiDrawPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMultiDrawPropertiesEXT` + public static VkPhysicalDeviceMultiDrawPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMultiDrawPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMultiDrawPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMultiDrawPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMultiDrawPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiDrawPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiDrawPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMultiDrawPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMultiDrawPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMultiDrawPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMultiDrawPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiDrawPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiDrawPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiDrawPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `maxMultiDrawCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMultiDrawCount(MemorySegment segment, long index) { return (int) VH_maxMultiDrawCount.get(segment, 0L, index); } + /// {@return `maxMultiDrawCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMultiDrawCount(MemorySegment segment) { return VkPhysicalDeviceMultiDrawPropertiesEXT.get_maxMultiDrawCount(segment, 0L); } + /// {@return `maxMultiDrawCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMultiDrawCountAt(long index) { return VkPhysicalDeviceMultiDrawPropertiesEXT.get_maxMultiDrawCount(this.segment(), index); } + /// {@return `maxMultiDrawCount`} + public @CType("uint32_t") int maxMultiDrawCount() { return VkPhysicalDeviceMultiDrawPropertiesEXT.get_maxMultiDrawCount(this.segment()); } + /// Sets `maxMultiDrawCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMultiDrawCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMultiDrawCount.set(segment, 0L, index, value); } + /// Sets `maxMultiDrawCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMultiDrawCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMultiDrawPropertiesEXT.set_maxMultiDrawCount(segment, 0L, value); } + /// Sets `maxMultiDrawCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawPropertiesEXT maxMultiDrawCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMultiDrawPropertiesEXT.set_maxMultiDrawCount(this.segment(), index, value); return this; } + /// Sets `maxMultiDrawCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiDrawPropertiesEXT maxMultiDrawCount(@CType("uint32_t") int value) { VkPhysicalDeviceMultiDrawPropertiesEXT.set_maxMultiDrawCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.java new file mode 100644 index 00000000..5614ec1f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### multisampledRenderToSingleSampled +/// [VarHandle][#VH_multisampledRenderToSingleSampled] - [Getter][#multisampledRenderToSingleSampled()] - [Setter][#multisampledRenderToSingleSampled(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 multisampledRenderToSingleSampled; +/// } VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("multisampledRenderToSingleSampled") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `multisampledRenderToSingleSampled` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multisampledRenderToSingleSampled = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multisampledRenderToSingleSampled")); + + /// Creates `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT` + public static VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT` + public static VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `multisampledRenderToSingleSampled` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multisampledRenderToSingleSampled(MemorySegment segment, long index) { return (int) VH_multisampledRenderToSingleSampled.get(segment, 0L, index); } + /// {@return `multisampledRenderToSingleSampled`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multisampledRenderToSingleSampled(MemorySegment segment) { return VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.get_multisampledRenderToSingleSampled(segment, 0L); } + /// {@return `multisampledRenderToSingleSampled` at the given index} + /// @param index the index + public @CType("VkBool32") int multisampledRenderToSingleSampledAt(long index) { return VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.get_multisampledRenderToSingleSampled(this.segment(), index); } + /// {@return `multisampledRenderToSingleSampled`} + public @CType("VkBool32") int multisampledRenderToSingleSampled() { return VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.get_multisampledRenderToSingleSampled(this.segment()); } + /// Sets `multisampledRenderToSingleSampled` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multisampledRenderToSingleSampled(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multisampledRenderToSingleSampled.set(segment, 0L, index, value); } + /// Sets `multisampledRenderToSingleSampled` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multisampledRenderToSingleSampled(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.set_multisampledRenderToSingleSampled(segment, 0L, value); } + /// Sets `multisampledRenderToSingleSampled` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT multisampledRenderToSingleSampledAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.set_multisampledRenderToSingleSampled(this.segment(), index, value); return this; } + /// Sets `multisampledRenderToSingleSampled` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT multisampledRenderToSingleSampled(@CType("VkBool32") int value) { VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.set_multisampledRenderToSingleSampled(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.java new file mode 100644 index 00000000..31edcfa2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### mutableDescriptorType +/// [VarHandle][#VH_mutableDescriptorType] - [Getter][#mutableDescriptorType()] - [Setter][#mutableDescriptorType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 mutableDescriptorType; +/// } VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("mutableDescriptorType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `mutableDescriptorType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mutableDescriptorType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mutableDescriptorType")); + + /// Creates `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT` + public static VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT` + public static VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `mutableDescriptorType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_mutableDescriptorType(MemorySegment segment, long index) { return (int) VH_mutableDescriptorType.get(segment, 0L, index); } + /// {@return `mutableDescriptorType`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_mutableDescriptorType(MemorySegment segment) { return VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.get_mutableDescriptorType(segment, 0L); } + /// {@return `mutableDescriptorType` at the given index} + /// @param index the index + public @CType("VkBool32") int mutableDescriptorTypeAt(long index) { return VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.get_mutableDescriptorType(this.segment(), index); } + /// {@return `mutableDescriptorType`} + public @CType("VkBool32") int mutableDescriptorType() { return VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.get_mutableDescriptorType(this.segment()); } + /// Sets `mutableDescriptorType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mutableDescriptorType(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_mutableDescriptorType.set(segment, 0L, index, value); } + /// Sets `mutableDescriptorType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mutableDescriptorType(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.set_mutableDescriptorType(segment, 0L, value); } + /// Sets `mutableDescriptorType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT mutableDescriptorTypeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.set_mutableDescriptorType(this.segment(), index, value); return this; } + /// Sets `mutableDescriptorType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT mutableDescriptorType(@CType("VkBool32") int value) { VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.set_mutableDescriptorType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceNestedCommandBufferFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceNestedCommandBufferFeaturesEXT.java new file mode 100644 index 00000000..330eb837 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceNestedCommandBufferFeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### nestedCommandBuffer +/// [VarHandle][#VH_nestedCommandBuffer] - [Getter][#nestedCommandBuffer()] - [Setter][#nestedCommandBuffer(int)] +/// ### nestedCommandBufferRendering +/// [VarHandle][#VH_nestedCommandBufferRendering] - [Getter][#nestedCommandBufferRendering()] - [Setter][#nestedCommandBufferRendering(int)] +/// ### nestedCommandBufferSimultaneousUse +/// [VarHandle][#VH_nestedCommandBufferSimultaneousUse] - [Getter][#nestedCommandBufferSimultaneousUse()] - [Setter][#nestedCommandBufferSimultaneousUse(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceNestedCommandBufferFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 nestedCommandBuffer; +/// VkBool32 nestedCommandBufferRendering; +/// VkBool32 nestedCommandBufferSimultaneousUse; +/// } VkPhysicalDeviceNestedCommandBufferFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceNestedCommandBufferFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceNestedCommandBufferFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("nestedCommandBuffer"), + ValueLayout.JAVA_INT.withName("nestedCommandBufferRendering"), + ValueLayout.JAVA_INT.withName("nestedCommandBufferSimultaneousUse") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `nestedCommandBuffer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nestedCommandBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nestedCommandBuffer")); + /// The [VarHandle] of `nestedCommandBufferRendering` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nestedCommandBufferRendering = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nestedCommandBufferRendering")); + /// The [VarHandle] of `nestedCommandBufferSimultaneousUse` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nestedCommandBufferSimultaneousUse = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nestedCommandBufferSimultaneousUse")); + + /// Creates `VkPhysicalDeviceNestedCommandBufferFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceNestedCommandBufferFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceNestedCommandBufferFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceNestedCommandBufferFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceNestedCommandBufferFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceNestedCommandBufferFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceNestedCommandBufferFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceNestedCommandBufferFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceNestedCommandBufferFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceNestedCommandBufferFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceNestedCommandBufferFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceNestedCommandBufferFeaturesEXT` + public static VkPhysicalDeviceNestedCommandBufferFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceNestedCommandBufferFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceNestedCommandBufferFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceNestedCommandBufferFeaturesEXT` + public static VkPhysicalDeviceNestedCommandBufferFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceNestedCommandBufferFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `nestedCommandBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nestedCommandBuffer(MemorySegment segment, long index) { return (int) VH_nestedCommandBuffer.get(segment, 0L, index); } + /// {@return `nestedCommandBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nestedCommandBuffer(MemorySegment segment) { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_nestedCommandBuffer(segment, 0L); } + /// {@return `nestedCommandBuffer` at the given index} + /// @param index the index + public @CType("VkBool32") int nestedCommandBufferAt(long index) { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_nestedCommandBuffer(this.segment(), index); } + /// {@return `nestedCommandBuffer`} + public @CType("VkBool32") int nestedCommandBuffer() { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_nestedCommandBuffer(this.segment()); } + /// Sets `nestedCommandBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nestedCommandBuffer(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nestedCommandBuffer.set(segment, 0L, index, value); } + /// Sets `nestedCommandBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nestedCommandBuffer(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_nestedCommandBuffer(segment, 0L, value); } + /// Sets `nestedCommandBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT nestedCommandBufferAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_nestedCommandBuffer(this.segment(), index, value); return this; } + /// Sets `nestedCommandBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT nestedCommandBuffer(@CType("VkBool32") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_nestedCommandBuffer(this.segment(), value); return this; } + + /// {@return `nestedCommandBufferRendering` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nestedCommandBufferRendering(MemorySegment segment, long index) { return (int) VH_nestedCommandBufferRendering.get(segment, 0L, index); } + /// {@return `nestedCommandBufferRendering`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nestedCommandBufferRendering(MemorySegment segment) { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_nestedCommandBufferRendering(segment, 0L); } + /// {@return `nestedCommandBufferRendering` at the given index} + /// @param index the index + public @CType("VkBool32") int nestedCommandBufferRenderingAt(long index) { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_nestedCommandBufferRendering(this.segment(), index); } + /// {@return `nestedCommandBufferRendering`} + public @CType("VkBool32") int nestedCommandBufferRendering() { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_nestedCommandBufferRendering(this.segment()); } + /// Sets `nestedCommandBufferRendering` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nestedCommandBufferRendering(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nestedCommandBufferRendering.set(segment, 0L, index, value); } + /// Sets `nestedCommandBufferRendering` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nestedCommandBufferRendering(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_nestedCommandBufferRendering(segment, 0L, value); } + /// Sets `nestedCommandBufferRendering` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT nestedCommandBufferRenderingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_nestedCommandBufferRendering(this.segment(), index, value); return this; } + /// Sets `nestedCommandBufferRendering` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT nestedCommandBufferRendering(@CType("VkBool32") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_nestedCommandBufferRendering(this.segment(), value); return this; } + + /// {@return `nestedCommandBufferSimultaneousUse` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nestedCommandBufferSimultaneousUse(MemorySegment segment, long index) { return (int) VH_nestedCommandBufferSimultaneousUse.get(segment, 0L, index); } + /// {@return `nestedCommandBufferSimultaneousUse`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nestedCommandBufferSimultaneousUse(MemorySegment segment) { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_nestedCommandBufferSimultaneousUse(segment, 0L); } + /// {@return `nestedCommandBufferSimultaneousUse` at the given index} + /// @param index the index + public @CType("VkBool32") int nestedCommandBufferSimultaneousUseAt(long index) { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_nestedCommandBufferSimultaneousUse(this.segment(), index); } + /// {@return `nestedCommandBufferSimultaneousUse`} + public @CType("VkBool32") int nestedCommandBufferSimultaneousUse() { return VkPhysicalDeviceNestedCommandBufferFeaturesEXT.get_nestedCommandBufferSimultaneousUse(this.segment()); } + /// Sets `nestedCommandBufferSimultaneousUse` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nestedCommandBufferSimultaneousUse(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nestedCommandBufferSimultaneousUse.set(segment, 0L, index, value); } + /// Sets `nestedCommandBufferSimultaneousUse` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nestedCommandBufferSimultaneousUse(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_nestedCommandBufferSimultaneousUse(segment, 0L, value); } + /// Sets `nestedCommandBufferSimultaneousUse` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT nestedCommandBufferSimultaneousUseAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_nestedCommandBufferSimultaneousUse(this.segment(), index, value); return this; } + /// Sets `nestedCommandBufferSimultaneousUse` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferFeaturesEXT nestedCommandBufferSimultaneousUse(@CType("VkBool32") int value) { VkPhysicalDeviceNestedCommandBufferFeaturesEXT.set_nestedCommandBufferSimultaneousUse(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceNestedCommandBufferPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceNestedCommandBufferPropertiesEXT.java new file mode 100644 index 00000000..4c508a7f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceNestedCommandBufferPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxCommandBufferNestingLevel +/// [VarHandle][#VH_maxCommandBufferNestingLevel] - [Getter][#maxCommandBufferNestingLevel()] - [Setter][#maxCommandBufferNestingLevel(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceNestedCommandBufferPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxCommandBufferNestingLevel; +/// } VkPhysicalDeviceNestedCommandBufferPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceNestedCommandBufferPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceNestedCommandBufferPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxCommandBufferNestingLevel") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxCommandBufferNestingLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxCommandBufferNestingLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxCommandBufferNestingLevel")); + + /// Creates `VkPhysicalDeviceNestedCommandBufferPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceNestedCommandBufferPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceNestedCommandBufferPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceNestedCommandBufferPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceNestedCommandBufferPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceNestedCommandBufferPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceNestedCommandBufferPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceNestedCommandBufferPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceNestedCommandBufferPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceNestedCommandBufferPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceNestedCommandBufferPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceNestedCommandBufferPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceNestedCommandBufferPropertiesEXT` + public static VkPhysicalDeviceNestedCommandBufferPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceNestedCommandBufferPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceNestedCommandBufferPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceNestedCommandBufferPropertiesEXT` + public static VkPhysicalDeviceNestedCommandBufferPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceNestedCommandBufferPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceNestedCommandBufferPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceNestedCommandBufferPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceNestedCommandBufferPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceNestedCommandBufferPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceNestedCommandBufferPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceNestedCommandBufferPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceNestedCommandBufferPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceNestedCommandBufferPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceNestedCommandBufferPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceNestedCommandBufferPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceNestedCommandBufferPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceNestedCommandBufferPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `maxCommandBufferNestingLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxCommandBufferNestingLevel(MemorySegment segment, long index) { return (int) VH_maxCommandBufferNestingLevel.get(segment, 0L, index); } + /// {@return `maxCommandBufferNestingLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxCommandBufferNestingLevel(MemorySegment segment) { return VkPhysicalDeviceNestedCommandBufferPropertiesEXT.get_maxCommandBufferNestingLevel(segment, 0L); } + /// {@return `maxCommandBufferNestingLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int maxCommandBufferNestingLevelAt(long index) { return VkPhysicalDeviceNestedCommandBufferPropertiesEXT.get_maxCommandBufferNestingLevel(this.segment(), index); } + /// {@return `maxCommandBufferNestingLevel`} + public @CType("uint32_t") int maxCommandBufferNestingLevel() { return VkPhysicalDeviceNestedCommandBufferPropertiesEXT.get_maxCommandBufferNestingLevel(this.segment()); } + /// Sets `maxCommandBufferNestingLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCommandBufferNestingLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxCommandBufferNestingLevel.set(segment, 0L, index, value); } + /// Sets `maxCommandBufferNestingLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCommandBufferNestingLevel(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceNestedCommandBufferPropertiesEXT.set_maxCommandBufferNestingLevel(segment, 0L, value); } + /// Sets `maxCommandBufferNestingLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferPropertiesEXT maxCommandBufferNestingLevelAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceNestedCommandBufferPropertiesEXT.set_maxCommandBufferNestingLevel(this.segment(), index, value); return this; } + /// Sets `maxCommandBufferNestingLevel` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNestedCommandBufferPropertiesEXT maxCommandBufferNestingLevel(@CType("uint32_t") int value) { VkPhysicalDeviceNestedCommandBufferPropertiesEXT.set_maxCommandBufferNestingLevel(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.java new file mode 100644 index 00000000..3181b8c4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### nonSeamlessCubeMap +/// [VarHandle][#VH_nonSeamlessCubeMap] - [Getter][#nonSeamlessCubeMap()] - [Setter][#nonSeamlessCubeMap(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 nonSeamlessCubeMap; +/// } VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("nonSeamlessCubeMap") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `nonSeamlessCubeMap` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nonSeamlessCubeMap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nonSeamlessCubeMap")); + + /// Creates `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT` + public static VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT` + public static VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `nonSeamlessCubeMap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nonSeamlessCubeMap(MemorySegment segment, long index) { return (int) VH_nonSeamlessCubeMap.get(segment, 0L, index); } + /// {@return `nonSeamlessCubeMap`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nonSeamlessCubeMap(MemorySegment segment) { return VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.get_nonSeamlessCubeMap(segment, 0L); } + /// {@return `nonSeamlessCubeMap` at the given index} + /// @param index the index + public @CType("VkBool32") int nonSeamlessCubeMapAt(long index) { return VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.get_nonSeamlessCubeMap(this.segment(), index); } + /// {@return `nonSeamlessCubeMap`} + public @CType("VkBool32") int nonSeamlessCubeMap() { return VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.get_nonSeamlessCubeMap(this.segment()); } + /// Sets `nonSeamlessCubeMap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nonSeamlessCubeMap(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nonSeamlessCubeMap.set(segment, 0L, index, value); } + /// Sets `nonSeamlessCubeMap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nonSeamlessCubeMap(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.set_nonSeamlessCubeMap(segment, 0L, value); } + /// Sets `nonSeamlessCubeMap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT nonSeamlessCubeMapAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.set_nonSeamlessCubeMap(this.segment(), index, value); return this; } + /// Sets `nonSeamlessCubeMap` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT nonSeamlessCubeMap(@CType("VkBool32") int value) { VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.set_nonSeamlessCubeMap(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceOpacityMicromapFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceOpacityMicromapFeaturesEXT.java new file mode 100644 index 00000000..4214c616 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceOpacityMicromapFeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### micromap +/// [VarHandle][#VH_micromap] - [Getter][#micromap()] - [Setter][#micromap(int)] +/// ### micromapCaptureReplay +/// [VarHandle][#VH_micromapCaptureReplay] - [Getter][#micromapCaptureReplay()] - [Setter][#micromapCaptureReplay(int)] +/// ### micromapHostCommands +/// [VarHandle][#VH_micromapHostCommands] - [Getter][#micromapHostCommands()] - [Setter][#micromapHostCommands(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceOpacityMicromapFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 micromap; +/// VkBool32 micromapCaptureReplay; +/// VkBool32 micromapHostCommands; +/// } VkPhysicalDeviceOpacityMicromapFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceOpacityMicromapFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceOpacityMicromapFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("micromap"), + ValueLayout.JAVA_INT.withName("micromapCaptureReplay"), + ValueLayout.JAVA_INT.withName("micromapHostCommands") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `micromap` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_micromap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("micromap")); + /// The [VarHandle] of `micromapCaptureReplay` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_micromapCaptureReplay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("micromapCaptureReplay")); + /// The [VarHandle] of `micromapHostCommands` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_micromapHostCommands = LAYOUT.arrayElementVarHandle(PathElement.groupElement("micromapHostCommands")); + + /// Creates `VkPhysicalDeviceOpacityMicromapFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceOpacityMicromapFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceOpacityMicromapFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpacityMicromapFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpacityMicromapFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceOpacityMicromapFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpacityMicromapFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpacityMicromapFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceOpacityMicromapFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpacityMicromapFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpacityMicromapFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceOpacityMicromapFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceOpacityMicromapFeaturesEXT` + public static VkPhysicalDeviceOpacityMicromapFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceOpacityMicromapFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceOpacityMicromapFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceOpacityMicromapFeaturesEXT` + public static VkPhysicalDeviceOpacityMicromapFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceOpacityMicromapFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `micromap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_micromap(MemorySegment segment, long index) { return (int) VH_micromap.get(segment, 0L, index); } + /// {@return `micromap`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_micromap(MemorySegment segment) { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_micromap(segment, 0L); } + /// {@return `micromap` at the given index} + /// @param index the index + public @CType("VkBool32") int micromapAt(long index) { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_micromap(this.segment(), index); } + /// {@return `micromap`} + public @CType("VkBool32") int micromap() { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_micromap(this.segment()); } + /// Sets `micromap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_micromap(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_micromap.set(segment, 0L, index, value); } + /// Sets `micromap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_micromap(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_micromap(segment, 0L, value); } + /// Sets `micromap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapFeaturesEXT micromapAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_micromap(this.segment(), index, value); return this; } + /// Sets `micromap` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapFeaturesEXT micromap(@CType("VkBool32") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_micromap(this.segment(), value); return this; } + + /// {@return `micromapCaptureReplay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_micromapCaptureReplay(MemorySegment segment, long index) { return (int) VH_micromapCaptureReplay.get(segment, 0L, index); } + /// {@return `micromapCaptureReplay`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_micromapCaptureReplay(MemorySegment segment) { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_micromapCaptureReplay(segment, 0L); } + /// {@return `micromapCaptureReplay` at the given index} + /// @param index the index + public @CType("VkBool32") int micromapCaptureReplayAt(long index) { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_micromapCaptureReplay(this.segment(), index); } + /// {@return `micromapCaptureReplay`} + public @CType("VkBool32") int micromapCaptureReplay() { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_micromapCaptureReplay(this.segment()); } + /// Sets `micromapCaptureReplay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_micromapCaptureReplay(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_micromapCaptureReplay.set(segment, 0L, index, value); } + /// Sets `micromapCaptureReplay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_micromapCaptureReplay(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_micromapCaptureReplay(segment, 0L, value); } + /// Sets `micromapCaptureReplay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapFeaturesEXT micromapCaptureReplayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_micromapCaptureReplay(this.segment(), index, value); return this; } + /// Sets `micromapCaptureReplay` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapFeaturesEXT micromapCaptureReplay(@CType("VkBool32") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_micromapCaptureReplay(this.segment(), value); return this; } + + /// {@return `micromapHostCommands` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_micromapHostCommands(MemorySegment segment, long index) { return (int) VH_micromapHostCommands.get(segment, 0L, index); } + /// {@return `micromapHostCommands`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_micromapHostCommands(MemorySegment segment) { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_micromapHostCommands(segment, 0L); } + /// {@return `micromapHostCommands` at the given index} + /// @param index the index + public @CType("VkBool32") int micromapHostCommandsAt(long index) { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_micromapHostCommands(this.segment(), index); } + /// {@return `micromapHostCommands`} + public @CType("VkBool32") int micromapHostCommands() { return VkPhysicalDeviceOpacityMicromapFeaturesEXT.get_micromapHostCommands(this.segment()); } + /// Sets `micromapHostCommands` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_micromapHostCommands(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_micromapHostCommands.set(segment, 0L, index, value); } + /// Sets `micromapHostCommands` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_micromapHostCommands(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_micromapHostCommands(segment, 0L, value); } + /// Sets `micromapHostCommands` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapFeaturesEXT micromapHostCommandsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_micromapHostCommands(this.segment(), index, value); return this; } + /// Sets `micromapHostCommands` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapFeaturesEXT micromapHostCommands(@CType("VkBool32") int value) { VkPhysicalDeviceOpacityMicromapFeaturesEXT.set_micromapHostCommands(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceOpacityMicromapPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceOpacityMicromapPropertiesEXT.java new file mode 100644 index 00000000..1c6f22d4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceOpacityMicromapPropertiesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxOpacity2StateSubdivisionLevel +/// [VarHandle][#VH_maxOpacity2StateSubdivisionLevel] - [Getter][#maxOpacity2StateSubdivisionLevel()] - [Setter][#maxOpacity2StateSubdivisionLevel(int)] +/// ### maxOpacity4StateSubdivisionLevel +/// [VarHandle][#VH_maxOpacity4StateSubdivisionLevel] - [Getter][#maxOpacity4StateSubdivisionLevel()] - [Setter][#maxOpacity4StateSubdivisionLevel(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceOpacityMicromapPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxOpacity2StateSubdivisionLevel; +/// uint32_t maxOpacity4StateSubdivisionLevel; +/// } VkPhysicalDeviceOpacityMicromapPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceOpacityMicromapPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceOpacityMicromapPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxOpacity2StateSubdivisionLevel"), + ValueLayout.JAVA_INT.withName("maxOpacity4StateSubdivisionLevel") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxOpacity2StateSubdivisionLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxOpacity2StateSubdivisionLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxOpacity2StateSubdivisionLevel")); + /// The [VarHandle] of `maxOpacity4StateSubdivisionLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxOpacity4StateSubdivisionLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxOpacity4StateSubdivisionLevel")); + + /// Creates `VkPhysicalDeviceOpacityMicromapPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceOpacityMicromapPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceOpacityMicromapPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpacityMicromapPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpacityMicromapPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceOpacityMicromapPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpacityMicromapPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpacityMicromapPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceOpacityMicromapPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpacityMicromapPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpacityMicromapPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceOpacityMicromapPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceOpacityMicromapPropertiesEXT` + public static VkPhysicalDeviceOpacityMicromapPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceOpacityMicromapPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceOpacityMicromapPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceOpacityMicromapPropertiesEXT` + public static VkPhysicalDeviceOpacityMicromapPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceOpacityMicromapPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `maxOpacity2StateSubdivisionLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxOpacity2StateSubdivisionLevel(MemorySegment segment, long index) { return (int) VH_maxOpacity2StateSubdivisionLevel.get(segment, 0L, index); } + /// {@return `maxOpacity2StateSubdivisionLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxOpacity2StateSubdivisionLevel(MemorySegment segment) { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_maxOpacity2StateSubdivisionLevel(segment, 0L); } + /// {@return `maxOpacity2StateSubdivisionLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int maxOpacity2StateSubdivisionLevelAt(long index) { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_maxOpacity2StateSubdivisionLevel(this.segment(), index); } + /// {@return `maxOpacity2StateSubdivisionLevel`} + public @CType("uint32_t") int maxOpacity2StateSubdivisionLevel() { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_maxOpacity2StateSubdivisionLevel(this.segment()); } + /// Sets `maxOpacity2StateSubdivisionLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxOpacity2StateSubdivisionLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxOpacity2StateSubdivisionLevel.set(segment, 0L, index, value); } + /// Sets `maxOpacity2StateSubdivisionLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxOpacity2StateSubdivisionLevel(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_maxOpacity2StateSubdivisionLevel(segment, 0L, value); } + /// Sets `maxOpacity2StateSubdivisionLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapPropertiesEXT maxOpacity2StateSubdivisionLevelAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_maxOpacity2StateSubdivisionLevel(this.segment(), index, value); return this; } + /// Sets `maxOpacity2StateSubdivisionLevel` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapPropertiesEXT maxOpacity2StateSubdivisionLevel(@CType("uint32_t") int value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_maxOpacity2StateSubdivisionLevel(this.segment(), value); return this; } + + /// {@return `maxOpacity4StateSubdivisionLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxOpacity4StateSubdivisionLevel(MemorySegment segment, long index) { return (int) VH_maxOpacity4StateSubdivisionLevel.get(segment, 0L, index); } + /// {@return `maxOpacity4StateSubdivisionLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxOpacity4StateSubdivisionLevel(MemorySegment segment) { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_maxOpacity4StateSubdivisionLevel(segment, 0L); } + /// {@return `maxOpacity4StateSubdivisionLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int maxOpacity4StateSubdivisionLevelAt(long index) { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_maxOpacity4StateSubdivisionLevel(this.segment(), index); } + /// {@return `maxOpacity4StateSubdivisionLevel`} + public @CType("uint32_t") int maxOpacity4StateSubdivisionLevel() { return VkPhysicalDeviceOpacityMicromapPropertiesEXT.get_maxOpacity4StateSubdivisionLevel(this.segment()); } + /// Sets `maxOpacity4StateSubdivisionLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxOpacity4StateSubdivisionLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxOpacity4StateSubdivisionLevel.set(segment, 0L, index, value); } + /// Sets `maxOpacity4StateSubdivisionLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxOpacity4StateSubdivisionLevel(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_maxOpacity4StateSubdivisionLevel(segment, 0L, value); } + /// Sets `maxOpacity4StateSubdivisionLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapPropertiesEXT maxOpacity4StateSubdivisionLevelAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_maxOpacity4StateSubdivisionLevel(this.segment(), index, value); return this; } + /// Sets `maxOpacity4StateSubdivisionLevel` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpacityMicromapPropertiesEXT maxOpacity4StateSubdivisionLevel(@CType("uint32_t") int value) { VkPhysicalDeviceOpacityMicromapPropertiesEXT.set_maxOpacity4StateSubdivisionLevel(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePCIBusInfoPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePCIBusInfoPropertiesEXT.java new file mode 100644 index 00000000..7c3410be --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePCIBusInfoPropertiesEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pciDomain +/// [VarHandle][#VH_pciDomain] - [Getter][#pciDomain()] - [Setter][#pciDomain(int)] +/// ### pciBus +/// [VarHandle][#VH_pciBus] - [Getter][#pciBus()] - [Setter][#pciBus(int)] +/// ### pciDevice +/// [VarHandle][#VH_pciDevice] - [Getter][#pciDevice()] - [Setter][#pciDevice(int)] +/// ### pciFunction +/// [VarHandle][#VH_pciFunction] - [Getter][#pciFunction()] - [Setter][#pciFunction(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t pciDomain; +/// uint32_t pciBus; +/// uint32_t pciDevice; +/// uint32_t pciFunction; +/// } VkPhysicalDevicePCIBusInfoPropertiesEXT; +/// ``` +public final class VkPhysicalDevicePCIBusInfoPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDevicePCIBusInfoPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pciDomain"), + ValueLayout.JAVA_INT.withName("pciBus"), + ValueLayout.JAVA_INT.withName("pciDevice"), + ValueLayout.JAVA_INT.withName("pciFunction") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pciDomain` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pciDomain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pciDomain")); + /// The [VarHandle] of `pciBus` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pciBus = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pciBus")); + /// The [VarHandle] of `pciDevice` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pciDevice = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pciDevice")); + /// The [VarHandle] of `pciFunction` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pciFunction = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pciFunction")); + + /// Creates `VkPhysicalDevicePCIBusInfoPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePCIBusInfoPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePCIBusInfoPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePCIBusInfoPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePCIBusInfoPropertiesEXT(segment); } + + /// Creates `VkPhysicalDevicePCIBusInfoPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePCIBusInfoPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePCIBusInfoPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePCIBusInfoPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePCIBusInfoPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePCIBusInfoPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePCIBusInfoPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePCIBusInfoPropertiesEXT` + public static VkPhysicalDevicePCIBusInfoPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePCIBusInfoPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePCIBusInfoPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePCIBusInfoPropertiesEXT` + public static VkPhysicalDevicePCIBusInfoPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePCIBusInfoPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pciDomain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pciDomain(MemorySegment segment, long index) { return (int) VH_pciDomain.get(segment, 0L, index); } + /// {@return `pciDomain`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pciDomain(MemorySegment segment) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciDomain(segment, 0L); } + /// {@return `pciDomain` at the given index} + /// @param index the index + public @CType("uint32_t") int pciDomainAt(long index) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciDomain(this.segment(), index); } + /// {@return `pciDomain`} + public @CType("uint32_t") int pciDomain() { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciDomain(this.segment()); } + /// Sets `pciDomain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pciDomain(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pciDomain.set(segment, 0L, index, value); } + /// Sets `pciDomain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pciDomain(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciDomain(segment, 0L, value); } + /// Sets `pciDomain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT pciDomainAt(long index, @CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciDomain(this.segment(), index, value); return this; } + /// Sets `pciDomain` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT pciDomain(@CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciDomain(this.segment(), value); return this; } + + /// {@return `pciBus` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pciBus(MemorySegment segment, long index) { return (int) VH_pciBus.get(segment, 0L, index); } + /// {@return `pciBus`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pciBus(MemorySegment segment) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciBus(segment, 0L); } + /// {@return `pciBus` at the given index} + /// @param index the index + public @CType("uint32_t") int pciBusAt(long index) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciBus(this.segment(), index); } + /// {@return `pciBus`} + public @CType("uint32_t") int pciBus() { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciBus(this.segment()); } + /// Sets `pciBus` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pciBus(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pciBus.set(segment, 0L, index, value); } + /// Sets `pciBus` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pciBus(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciBus(segment, 0L, value); } + /// Sets `pciBus` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT pciBusAt(long index, @CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciBus(this.segment(), index, value); return this; } + /// Sets `pciBus` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT pciBus(@CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciBus(this.segment(), value); return this; } + + /// {@return `pciDevice` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pciDevice(MemorySegment segment, long index) { return (int) VH_pciDevice.get(segment, 0L, index); } + /// {@return `pciDevice`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pciDevice(MemorySegment segment) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciDevice(segment, 0L); } + /// {@return `pciDevice` at the given index} + /// @param index the index + public @CType("uint32_t") int pciDeviceAt(long index) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciDevice(this.segment(), index); } + /// {@return `pciDevice`} + public @CType("uint32_t") int pciDevice() { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciDevice(this.segment()); } + /// Sets `pciDevice` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pciDevice(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pciDevice.set(segment, 0L, index, value); } + /// Sets `pciDevice` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pciDevice(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciDevice(segment, 0L, value); } + /// Sets `pciDevice` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT pciDeviceAt(long index, @CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciDevice(this.segment(), index, value); return this; } + /// Sets `pciDevice` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT pciDevice(@CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciDevice(this.segment(), value); return this; } + + /// {@return `pciFunction` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pciFunction(MemorySegment segment, long index) { return (int) VH_pciFunction.get(segment, 0L, index); } + /// {@return `pciFunction`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pciFunction(MemorySegment segment) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciFunction(segment, 0L); } + /// {@return `pciFunction` at the given index} + /// @param index the index + public @CType("uint32_t") int pciFunctionAt(long index) { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciFunction(this.segment(), index); } + /// {@return `pciFunction`} + public @CType("uint32_t") int pciFunction() { return VkPhysicalDevicePCIBusInfoPropertiesEXT.get_pciFunction(this.segment()); } + /// Sets `pciFunction` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pciFunction(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pciFunction.set(segment, 0L, index, value); } + /// Sets `pciFunction` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pciFunction(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciFunction(segment, 0L, value); } + /// Sets `pciFunction` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT pciFunctionAt(long index, @CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciFunction(this.segment(), index, value); return this; } + /// Sets `pciFunction` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePCIBusInfoPropertiesEXT pciFunction(@CType("uint32_t") int value) { VkPhysicalDevicePCIBusInfoPropertiesEXT.set_pciFunction(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.java new file mode 100644 index 00000000..90dbb283 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pageableDeviceLocalMemory +/// [VarHandle][#VH_pageableDeviceLocalMemory] - [Getter][#pageableDeviceLocalMemory()] - [Setter][#pageableDeviceLocalMemory(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 pageableDeviceLocalMemory; +/// } VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; +/// ``` +public final class VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pageableDeviceLocalMemory") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pageableDeviceLocalMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pageableDeviceLocalMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pageableDeviceLocalMemory")); + + /// Creates `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT(segment); } + + /// Creates `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT` + public static VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT` + public static VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pageableDeviceLocalMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pageableDeviceLocalMemory(MemorySegment segment, long index) { return (int) VH_pageableDeviceLocalMemory.get(segment, 0L, index); } + /// {@return `pageableDeviceLocalMemory`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pageableDeviceLocalMemory(MemorySegment segment) { return VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.get_pageableDeviceLocalMemory(segment, 0L); } + /// {@return `pageableDeviceLocalMemory` at the given index} + /// @param index the index + public @CType("VkBool32") int pageableDeviceLocalMemoryAt(long index) { return VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.get_pageableDeviceLocalMemory(this.segment(), index); } + /// {@return `pageableDeviceLocalMemory`} + public @CType("VkBool32") int pageableDeviceLocalMemory() { return VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.get_pageableDeviceLocalMemory(this.segment()); } + /// Sets `pageableDeviceLocalMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pageableDeviceLocalMemory(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pageableDeviceLocalMemory.set(segment, 0L, index, value); } + /// Sets `pageableDeviceLocalMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pageableDeviceLocalMemory(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.set_pageableDeviceLocalMemory(segment, 0L, value); } + /// Sets `pageableDeviceLocalMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT pageableDeviceLocalMemoryAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.set_pageableDeviceLocalMemory(this.segment(), index, value); return this; } + /// Sets `pageableDeviceLocalMemory` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT pageableDeviceLocalMemory(@CType("VkBool32") int value) { VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.set_pageableDeviceLocalMemory(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.java new file mode 100644 index 00000000..f8e68c54 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineLibraryGroupHandles +/// [VarHandle][#VH_pipelineLibraryGroupHandles] - [Getter][#pipelineLibraryGroupHandles()] - [Setter][#pipelineLibraryGroupHandles(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 pipelineLibraryGroupHandles; +/// } VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT; +/// ``` +public final class VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineLibraryGroupHandles") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineLibraryGroupHandles` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineLibraryGroupHandles = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineLibraryGroupHandles")); + + /// Creates `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT(segment); } + + /// Creates `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT` + public static VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT` + public static VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineLibraryGroupHandles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineLibraryGroupHandles(MemorySegment segment, long index) { return (int) VH_pipelineLibraryGroupHandles.get(segment, 0L, index); } + /// {@return `pipelineLibraryGroupHandles`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineLibraryGroupHandles(MemorySegment segment) { return VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.get_pipelineLibraryGroupHandles(segment, 0L); } + /// {@return `pipelineLibraryGroupHandles` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineLibraryGroupHandlesAt(long index) { return VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.get_pipelineLibraryGroupHandles(this.segment(), index); } + /// {@return `pipelineLibraryGroupHandles`} + public @CType("VkBool32") int pipelineLibraryGroupHandles() { return VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.get_pipelineLibraryGroupHandles(this.segment()); } + /// Sets `pipelineLibraryGroupHandles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineLibraryGroupHandles(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineLibraryGroupHandles.set(segment, 0L, index, value); } + /// Sets `pipelineLibraryGroupHandles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineLibraryGroupHandles(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.set_pipelineLibraryGroupHandles(segment, 0L, value); } + /// Sets `pipelineLibraryGroupHandles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT pipelineLibraryGroupHandlesAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.set_pipelineLibraryGroupHandles(this.segment(), index, value); return this; } + /// Sets `pipelineLibraryGroupHandles` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT pipelineLibraryGroupHandles(@CType("VkBool32") int value) { VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.set_pipelineLibraryGroupHandles(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePipelinePropertiesFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePipelinePropertiesFeaturesEXT.java new file mode 100644 index 00000000..aeb9605f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePipelinePropertiesFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelinePropertiesIdentifier +/// [VarHandle][#VH_pipelinePropertiesIdentifier] - [Getter][#pipelinePropertiesIdentifier()] - [Setter][#pipelinePropertiesIdentifier(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePipelinePropertiesFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 pipelinePropertiesIdentifier; +/// } VkPhysicalDevicePipelinePropertiesFeaturesEXT; +/// ``` +public final class VkPhysicalDevicePipelinePropertiesFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDevicePipelinePropertiesFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelinePropertiesIdentifier") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelinePropertiesIdentifier` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelinePropertiesIdentifier = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelinePropertiesIdentifier")); + + /// Creates `VkPhysicalDevicePipelinePropertiesFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePipelinePropertiesFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePipelinePropertiesFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelinePropertiesFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelinePropertiesFeaturesEXT(segment); } + + /// Creates `VkPhysicalDevicePipelinePropertiesFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelinePropertiesFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelinePropertiesFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePipelinePropertiesFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelinePropertiesFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelinePropertiesFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePipelinePropertiesFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePipelinePropertiesFeaturesEXT` + public static VkPhysicalDevicePipelinePropertiesFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePipelinePropertiesFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePipelinePropertiesFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePipelinePropertiesFeaturesEXT` + public static VkPhysicalDevicePipelinePropertiesFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePipelinePropertiesFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePipelinePropertiesFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePipelinePropertiesFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePipelinePropertiesFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePipelinePropertiesFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelinePropertiesFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePipelinePropertiesFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelinePropertiesFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDevicePipelinePropertiesFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePipelinePropertiesFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePipelinePropertiesFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePipelinePropertiesFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelinePropertiesFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelinePropertiesFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelinePropertiesFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelinePropertiesFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelinePropertiesFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelinePropertiesIdentifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelinePropertiesIdentifier(MemorySegment segment, long index) { return (int) VH_pipelinePropertiesIdentifier.get(segment, 0L, index); } + /// {@return `pipelinePropertiesIdentifier`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelinePropertiesIdentifier(MemorySegment segment) { return VkPhysicalDevicePipelinePropertiesFeaturesEXT.get_pipelinePropertiesIdentifier(segment, 0L); } + /// {@return `pipelinePropertiesIdentifier` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelinePropertiesIdentifierAt(long index) { return VkPhysicalDevicePipelinePropertiesFeaturesEXT.get_pipelinePropertiesIdentifier(this.segment(), index); } + /// {@return `pipelinePropertiesIdentifier`} + public @CType("VkBool32") int pipelinePropertiesIdentifier() { return VkPhysicalDevicePipelinePropertiesFeaturesEXT.get_pipelinePropertiesIdentifier(this.segment()); } + /// Sets `pipelinePropertiesIdentifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelinePropertiesIdentifier(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelinePropertiesIdentifier.set(segment, 0L, index, value); } + /// Sets `pipelinePropertiesIdentifier` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelinePropertiesIdentifier(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelinePropertiesFeaturesEXT.set_pipelinePropertiesIdentifier(segment, 0L, value); } + /// Sets `pipelinePropertiesIdentifier` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelinePropertiesFeaturesEXT pipelinePropertiesIdentifierAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelinePropertiesFeaturesEXT.set_pipelinePropertiesIdentifier(this.segment(), index, value); return this; } + /// Sets `pipelinePropertiesIdentifier` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelinePropertiesFeaturesEXT pipelinePropertiesIdentifier(@CType("VkBool32") int value) { VkPhysicalDevicePipelinePropertiesFeaturesEXT.set_pipelinePropertiesIdentifier(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.java new file mode 100644 index 00000000..aa76ed7d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentModeFifoLatestReady +/// [VarHandle][#VH_presentModeFifoLatestReady] - [Getter][#presentModeFifoLatestReady()] - [Setter][#presentModeFifoLatestReady(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 presentModeFifoLatestReady; +/// } VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT; +/// ``` +public final class VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("presentModeFifoLatestReady") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentModeFifoLatestReady` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentModeFifoLatestReady = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentModeFifoLatestReady")); + + /// Creates `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT(segment); } + + /// Creates `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT` + public static VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT` + public static VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `presentModeFifoLatestReady` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_presentModeFifoLatestReady(MemorySegment segment, long index) { return (int) VH_presentModeFifoLatestReady.get(segment, 0L, index); } + /// {@return `presentModeFifoLatestReady`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_presentModeFifoLatestReady(MemorySegment segment) { return VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.get_presentModeFifoLatestReady(segment, 0L); } + /// {@return `presentModeFifoLatestReady` at the given index} + /// @param index the index + public @CType("VkBool32") int presentModeFifoLatestReadyAt(long index) { return VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.get_presentModeFifoLatestReady(this.segment(), index); } + /// {@return `presentModeFifoLatestReady`} + public @CType("VkBool32") int presentModeFifoLatestReady() { return VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.get_presentModeFifoLatestReady(this.segment()); } + /// Sets `presentModeFifoLatestReady` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentModeFifoLatestReady(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_presentModeFifoLatestReady.set(segment, 0L, index, value); } + /// Sets `presentModeFifoLatestReady` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentModeFifoLatestReady(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.set_presentModeFifoLatestReady(segment, 0L, value); } + /// Sets `presentModeFifoLatestReady` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT presentModeFifoLatestReadyAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.set_presentModeFifoLatestReady(this.segment(), index, value); return this; } + /// Sets `presentModeFifoLatestReady` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT presentModeFifoLatestReady(@CType("VkBool32") int value) { VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.set_presentModeFifoLatestReady(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.java new file mode 100644 index 00000000..42fc0b50 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### primitiveTopologyListRestart +/// [VarHandle][#VH_primitiveTopologyListRestart] - [Getter][#primitiveTopologyListRestart()] - [Setter][#primitiveTopologyListRestart(int)] +/// ### primitiveTopologyPatchListRestart +/// [VarHandle][#VH_primitiveTopologyPatchListRestart] - [Getter][#primitiveTopologyPatchListRestart()] - [Setter][#primitiveTopologyPatchListRestart(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 primitiveTopologyListRestart; +/// VkBool32 primitiveTopologyPatchListRestart; +/// } VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; +/// ``` +public final class VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("primitiveTopologyListRestart"), + ValueLayout.JAVA_INT.withName("primitiveTopologyPatchListRestart") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `primitiveTopologyListRestart` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitiveTopologyListRestart = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveTopologyListRestart")); + /// The [VarHandle] of `primitiveTopologyPatchListRestart` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitiveTopologyPatchListRestart = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveTopologyPatchListRestart")); + + /// Creates `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(segment); } + + /// Creates `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT` + public static VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT` + public static VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `primitiveTopologyListRestart` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primitiveTopologyListRestart(MemorySegment segment, long index) { return (int) VH_primitiveTopologyListRestart.get(segment, 0L, index); } + /// {@return `primitiveTopologyListRestart`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primitiveTopologyListRestart(MemorySegment segment) { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_primitiveTopologyListRestart(segment, 0L); } + /// {@return `primitiveTopologyListRestart` at the given index} + /// @param index the index + public @CType("VkBool32") int primitiveTopologyListRestartAt(long index) { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_primitiveTopologyListRestart(this.segment(), index); } + /// {@return `primitiveTopologyListRestart`} + public @CType("VkBool32") int primitiveTopologyListRestart() { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_primitiveTopologyListRestart(this.segment()); } + /// Sets `primitiveTopologyListRestart` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveTopologyListRestart(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primitiveTopologyListRestart.set(segment, 0L, index, value); } + /// Sets `primitiveTopologyListRestart` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveTopologyListRestart(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_primitiveTopologyListRestart(segment, 0L, value); } + /// Sets `primitiveTopologyListRestart` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT primitiveTopologyListRestartAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_primitiveTopologyListRestart(this.segment(), index, value); return this; } + /// Sets `primitiveTopologyListRestart` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT primitiveTopologyListRestart(@CType("VkBool32") int value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_primitiveTopologyListRestart(this.segment(), value); return this; } + + /// {@return `primitiveTopologyPatchListRestart` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primitiveTopologyPatchListRestart(MemorySegment segment, long index) { return (int) VH_primitiveTopologyPatchListRestart.get(segment, 0L, index); } + /// {@return `primitiveTopologyPatchListRestart`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primitiveTopologyPatchListRestart(MemorySegment segment) { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_primitiveTopologyPatchListRestart(segment, 0L); } + /// {@return `primitiveTopologyPatchListRestart` at the given index} + /// @param index the index + public @CType("VkBool32") int primitiveTopologyPatchListRestartAt(long index) { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_primitiveTopologyPatchListRestart(this.segment(), index); } + /// {@return `primitiveTopologyPatchListRestart`} + public @CType("VkBool32") int primitiveTopologyPatchListRestart() { return VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.get_primitiveTopologyPatchListRestart(this.segment()); } + /// Sets `primitiveTopologyPatchListRestart` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveTopologyPatchListRestart(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primitiveTopologyPatchListRestart.set(segment, 0L, index, value); } + /// Sets `primitiveTopologyPatchListRestart` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveTopologyPatchListRestart(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_primitiveTopologyPatchListRestart(segment, 0L, value); } + /// Sets `primitiveTopologyPatchListRestart` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT primitiveTopologyPatchListRestartAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_primitiveTopologyPatchListRestart(this.segment(), index, value); return this; } + /// Sets `primitiveTopologyPatchListRestart` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT primitiveTopologyPatchListRestart(@CType("VkBool32") int value) { VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.set_primitiveTopologyPatchListRestart(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.java new file mode 100644 index 00000000..03485628 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### primitivesGeneratedQuery +/// [VarHandle][#VH_primitivesGeneratedQuery] - [Getter][#primitivesGeneratedQuery()] - [Setter][#primitivesGeneratedQuery(int)] +/// ### primitivesGeneratedQueryWithRasterizerDiscard +/// [VarHandle][#VH_primitivesGeneratedQueryWithRasterizerDiscard] - [Getter][#primitivesGeneratedQueryWithRasterizerDiscard()] - [Setter][#primitivesGeneratedQueryWithRasterizerDiscard(int)] +/// ### primitivesGeneratedQueryWithNonZeroStreams +/// [VarHandle][#VH_primitivesGeneratedQueryWithNonZeroStreams] - [Getter][#primitivesGeneratedQueryWithNonZeroStreams()] - [Setter][#primitivesGeneratedQueryWithNonZeroStreams(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 primitivesGeneratedQuery; +/// VkBool32 primitivesGeneratedQueryWithRasterizerDiscard; +/// VkBool32 primitivesGeneratedQueryWithNonZeroStreams; +/// } VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; +/// ``` +public final class VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("primitivesGeneratedQuery"), + ValueLayout.JAVA_INT.withName("primitivesGeneratedQueryWithRasterizerDiscard"), + ValueLayout.JAVA_INT.withName("primitivesGeneratedQueryWithNonZeroStreams") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `primitivesGeneratedQuery` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitivesGeneratedQuery = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitivesGeneratedQuery")); + /// The [VarHandle] of `primitivesGeneratedQueryWithRasterizerDiscard` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitivesGeneratedQueryWithRasterizerDiscard = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitivesGeneratedQueryWithRasterizerDiscard")); + /// The [VarHandle] of `primitivesGeneratedQueryWithNonZeroStreams` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitivesGeneratedQueryWithNonZeroStreams = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitivesGeneratedQueryWithNonZeroStreams")); + + /// Creates `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT(segment); } + + /// Creates `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT` + public static VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT` + public static VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `primitivesGeneratedQuery` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primitivesGeneratedQuery(MemorySegment segment, long index) { return (int) VH_primitivesGeneratedQuery.get(segment, 0L, index); } + /// {@return `primitivesGeneratedQuery`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primitivesGeneratedQuery(MemorySegment segment) { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_primitivesGeneratedQuery(segment, 0L); } + /// {@return `primitivesGeneratedQuery` at the given index} + /// @param index the index + public @CType("VkBool32") int primitivesGeneratedQueryAt(long index) { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_primitivesGeneratedQuery(this.segment(), index); } + /// {@return `primitivesGeneratedQuery`} + public @CType("VkBool32") int primitivesGeneratedQuery() { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_primitivesGeneratedQuery(this.segment()); } + /// Sets `primitivesGeneratedQuery` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitivesGeneratedQuery(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primitivesGeneratedQuery.set(segment, 0L, index, value); } + /// Sets `primitivesGeneratedQuery` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitivesGeneratedQuery(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_primitivesGeneratedQuery(segment, 0L, value); } + /// Sets `primitivesGeneratedQuery` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT primitivesGeneratedQueryAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_primitivesGeneratedQuery(this.segment(), index, value); return this; } + /// Sets `primitivesGeneratedQuery` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT primitivesGeneratedQuery(@CType("VkBool32") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_primitivesGeneratedQuery(this.segment(), value); return this; } + + /// {@return `primitivesGeneratedQueryWithRasterizerDiscard` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primitivesGeneratedQueryWithRasterizerDiscard(MemorySegment segment, long index) { return (int) VH_primitivesGeneratedQueryWithRasterizerDiscard.get(segment, 0L, index); } + /// {@return `primitivesGeneratedQueryWithRasterizerDiscard`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primitivesGeneratedQueryWithRasterizerDiscard(MemorySegment segment) { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_primitivesGeneratedQueryWithRasterizerDiscard(segment, 0L); } + /// {@return `primitivesGeneratedQueryWithRasterizerDiscard` at the given index} + /// @param index the index + public @CType("VkBool32") int primitivesGeneratedQueryWithRasterizerDiscardAt(long index) { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_primitivesGeneratedQueryWithRasterizerDiscard(this.segment(), index); } + /// {@return `primitivesGeneratedQueryWithRasterizerDiscard`} + public @CType("VkBool32") int primitivesGeneratedQueryWithRasterizerDiscard() { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_primitivesGeneratedQueryWithRasterizerDiscard(this.segment()); } + /// Sets `primitivesGeneratedQueryWithRasterizerDiscard` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitivesGeneratedQueryWithRasterizerDiscard(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primitivesGeneratedQueryWithRasterizerDiscard.set(segment, 0L, index, value); } + /// Sets `primitivesGeneratedQueryWithRasterizerDiscard` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitivesGeneratedQueryWithRasterizerDiscard(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_primitivesGeneratedQueryWithRasterizerDiscard(segment, 0L, value); } + /// Sets `primitivesGeneratedQueryWithRasterizerDiscard` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT primitivesGeneratedQueryWithRasterizerDiscardAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_primitivesGeneratedQueryWithRasterizerDiscard(this.segment(), index, value); return this; } + /// Sets `primitivesGeneratedQueryWithRasterizerDiscard` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT primitivesGeneratedQueryWithRasterizerDiscard(@CType("VkBool32") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_primitivesGeneratedQueryWithRasterizerDiscard(this.segment(), value); return this; } + + /// {@return `primitivesGeneratedQueryWithNonZeroStreams` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primitivesGeneratedQueryWithNonZeroStreams(MemorySegment segment, long index) { return (int) VH_primitivesGeneratedQueryWithNonZeroStreams.get(segment, 0L, index); } + /// {@return `primitivesGeneratedQueryWithNonZeroStreams`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primitivesGeneratedQueryWithNonZeroStreams(MemorySegment segment) { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_primitivesGeneratedQueryWithNonZeroStreams(segment, 0L); } + /// {@return `primitivesGeneratedQueryWithNonZeroStreams` at the given index} + /// @param index the index + public @CType("VkBool32") int primitivesGeneratedQueryWithNonZeroStreamsAt(long index) { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_primitivesGeneratedQueryWithNonZeroStreams(this.segment(), index); } + /// {@return `primitivesGeneratedQueryWithNonZeroStreams`} + public @CType("VkBool32") int primitivesGeneratedQueryWithNonZeroStreams() { return VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.get_primitivesGeneratedQueryWithNonZeroStreams(this.segment()); } + /// Sets `primitivesGeneratedQueryWithNonZeroStreams` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitivesGeneratedQueryWithNonZeroStreams(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primitivesGeneratedQueryWithNonZeroStreams.set(segment, 0L, index, value); } + /// Sets `primitivesGeneratedQueryWithNonZeroStreams` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitivesGeneratedQueryWithNonZeroStreams(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_primitivesGeneratedQueryWithNonZeroStreams(segment, 0L, value); } + /// Sets `primitivesGeneratedQueryWithNonZeroStreams` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT primitivesGeneratedQueryWithNonZeroStreamsAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_primitivesGeneratedQueryWithNonZeroStreams(this.segment(), index, value); return this; } + /// Sets `primitivesGeneratedQueryWithNonZeroStreams` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT primitivesGeneratedQueryWithNonZeroStreams(@CType("VkBool32") int value) { VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.set_primitivesGeneratedQueryWithNonZeroStreams(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceProvokingVertexFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceProvokingVertexFeaturesEXT.java new file mode 100644 index 00000000..4e57e0d5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceProvokingVertexFeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### provokingVertexLast +/// [VarHandle][#VH_provokingVertexLast] - [Getter][#provokingVertexLast()] - [Setter][#provokingVertexLast(int)] +/// ### transformFeedbackPreservesProvokingVertex +/// [VarHandle][#VH_transformFeedbackPreservesProvokingVertex] - [Getter][#transformFeedbackPreservesProvokingVertex()] - [Setter][#transformFeedbackPreservesProvokingVertex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceProvokingVertexFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 provokingVertexLast; +/// VkBool32 transformFeedbackPreservesProvokingVertex; +/// } VkPhysicalDeviceProvokingVertexFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceProvokingVertexFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceProvokingVertexFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("provokingVertexLast"), + ValueLayout.JAVA_INT.withName("transformFeedbackPreservesProvokingVertex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `provokingVertexLast` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_provokingVertexLast = LAYOUT.arrayElementVarHandle(PathElement.groupElement("provokingVertexLast")); + /// The [VarHandle] of `transformFeedbackPreservesProvokingVertex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transformFeedbackPreservesProvokingVertex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformFeedbackPreservesProvokingVertex")); + + /// Creates `VkPhysicalDeviceProvokingVertexFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceProvokingVertexFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceProvokingVertexFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProvokingVertexFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProvokingVertexFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceProvokingVertexFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProvokingVertexFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProvokingVertexFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceProvokingVertexFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProvokingVertexFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProvokingVertexFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceProvokingVertexFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceProvokingVertexFeaturesEXT` + public static VkPhysicalDeviceProvokingVertexFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceProvokingVertexFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceProvokingVertexFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceProvokingVertexFeaturesEXT` + public static VkPhysicalDeviceProvokingVertexFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceProvokingVertexFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `provokingVertexLast` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_provokingVertexLast(MemorySegment segment, long index) { return (int) VH_provokingVertexLast.get(segment, 0L, index); } + /// {@return `provokingVertexLast`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_provokingVertexLast(MemorySegment segment) { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_provokingVertexLast(segment, 0L); } + /// {@return `provokingVertexLast` at the given index} + /// @param index the index + public @CType("VkBool32") int provokingVertexLastAt(long index) { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_provokingVertexLast(this.segment(), index); } + /// {@return `provokingVertexLast`} + public @CType("VkBool32") int provokingVertexLast() { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_provokingVertexLast(this.segment()); } + /// Sets `provokingVertexLast` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_provokingVertexLast(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_provokingVertexLast.set(segment, 0L, index, value); } + /// Sets `provokingVertexLast` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_provokingVertexLast(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_provokingVertexLast(segment, 0L, value); } + /// Sets `provokingVertexLast` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexFeaturesEXT provokingVertexLastAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_provokingVertexLast(this.segment(), index, value); return this; } + /// Sets `provokingVertexLast` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexFeaturesEXT provokingVertexLast(@CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_provokingVertexLast(this.segment(), value); return this; } + + /// {@return `transformFeedbackPreservesProvokingVertex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_transformFeedbackPreservesProvokingVertex(MemorySegment segment, long index) { return (int) VH_transformFeedbackPreservesProvokingVertex.get(segment, 0L, index); } + /// {@return `transformFeedbackPreservesProvokingVertex`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_transformFeedbackPreservesProvokingVertex(MemorySegment segment) { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_transformFeedbackPreservesProvokingVertex(segment, 0L); } + /// {@return `transformFeedbackPreservesProvokingVertex` at the given index} + /// @param index the index + public @CType("VkBool32") int transformFeedbackPreservesProvokingVertexAt(long index) { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_transformFeedbackPreservesProvokingVertex(this.segment(), index); } + /// {@return `transformFeedbackPreservesProvokingVertex`} + public @CType("VkBool32") int transformFeedbackPreservesProvokingVertex() { return VkPhysicalDeviceProvokingVertexFeaturesEXT.get_transformFeedbackPreservesProvokingVertex(this.segment()); } + /// Sets `transformFeedbackPreservesProvokingVertex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformFeedbackPreservesProvokingVertex(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_transformFeedbackPreservesProvokingVertex.set(segment, 0L, index, value); } + /// Sets `transformFeedbackPreservesProvokingVertex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformFeedbackPreservesProvokingVertex(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_transformFeedbackPreservesProvokingVertex(segment, 0L, value); } + /// Sets `transformFeedbackPreservesProvokingVertex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexFeaturesEXT transformFeedbackPreservesProvokingVertexAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_transformFeedbackPreservesProvokingVertex(this.segment(), index, value); return this; } + /// Sets `transformFeedbackPreservesProvokingVertex` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexFeaturesEXT transformFeedbackPreservesProvokingVertex(@CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexFeaturesEXT.set_transformFeedbackPreservesProvokingVertex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceProvokingVertexPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceProvokingVertexPropertiesEXT.java new file mode 100644 index 00000000..709371f7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceProvokingVertexPropertiesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### provokingVertexModePerPipeline +/// [VarHandle][#VH_provokingVertexModePerPipeline] - [Getter][#provokingVertexModePerPipeline()] - [Setter][#provokingVertexModePerPipeline(int)] +/// ### transformFeedbackPreservesTriangleFanProvokingVertex +/// [VarHandle][#VH_transformFeedbackPreservesTriangleFanProvokingVertex] - [Getter][#transformFeedbackPreservesTriangleFanProvokingVertex()] - [Setter][#transformFeedbackPreservesTriangleFanProvokingVertex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceProvokingVertexPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 provokingVertexModePerPipeline; +/// VkBool32 transformFeedbackPreservesTriangleFanProvokingVertex; +/// } VkPhysicalDeviceProvokingVertexPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceProvokingVertexPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceProvokingVertexPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("provokingVertexModePerPipeline"), + ValueLayout.JAVA_INT.withName("transformFeedbackPreservesTriangleFanProvokingVertex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `provokingVertexModePerPipeline` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_provokingVertexModePerPipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("provokingVertexModePerPipeline")); + /// The [VarHandle] of `transformFeedbackPreservesTriangleFanProvokingVertex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transformFeedbackPreservesTriangleFanProvokingVertex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformFeedbackPreservesTriangleFanProvokingVertex")); + + /// Creates `VkPhysicalDeviceProvokingVertexPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceProvokingVertexPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceProvokingVertexPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProvokingVertexPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProvokingVertexPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceProvokingVertexPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProvokingVertexPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProvokingVertexPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceProvokingVertexPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProvokingVertexPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProvokingVertexPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceProvokingVertexPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceProvokingVertexPropertiesEXT` + public static VkPhysicalDeviceProvokingVertexPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceProvokingVertexPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceProvokingVertexPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceProvokingVertexPropertiesEXT` + public static VkPhysicalDeviceProvokingVertexPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceProvokingVertexPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `provokingVertexModePerPipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_provokingVertexModePerPipeline(MemorySegment segment, long index) { return (int) VH_provokingVertexModePerPipeline.get(segment, 0L, index); } + /// {@return `provokingVertexModePerPipeline`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_provokingVertexModePerPipeline(MemorySegment segment) { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_provokingVertexModePerPipeline(segment, 0L); } + /// {@return `provokingVertexModePerPipeline` at the given index} + /// @param index the index + public @CType("VkBool32") int provokingVertexModePerPipelineAt(long index) { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_provokingVertexModePerPipeline(this.segment(), index); } + /// {@return `provokingVertexModePerPipeline`} + public @CType("VkBool32") int provokingVertexModePerPipeline() { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_provokingVertexModePerPipeline(this.segment()); } + /// Sets `provokingVertexModePerPipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_provokingVertexModePerPipeline(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_provokingVertexModePerPipeline.set(segment, 0L, index, value); } + /// Sets `provokingVertexModePerPipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_provokingVertexModePerPipeline(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_provokingVertexModePerPipeline(segment, 0L, value); } + /// Sets `provokingVertexModePerPipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexPropertiesEXT provokingVertexModePerPipelineAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_provokingVertexModePerPipeline(this.segment(), index, value); return this; } + /// Sets `provokingVertexModePerPipeline` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexPropertiesEXT provokingVertexModePerPipeline(@CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_provokingVertexModePerPipeline(this.segment(), value); return this; } + + /// {@return `transformFeedbackPreservesTriangleFanProvokingVertex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_transformFeedbackPreservesTriangleFanProvokingVertex(MemorySegment segment, long index) { return (int) VH_transformFeedbackPreservesTriangleFanProvokingVertex.get(segment, 0L, index); } + /// {@return `transformFeedbackPreservesTriangleFanProvokingVertex`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_transformFeedbackPreservesTriangleFanProvokingVertex(MemorySegment segment) { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_transformFeedbackPreservesTriangleFanProvokingVertex(segment, 0L); } + /// {@return `transformFeedbackPreservesTriangleFanProvokingVertex` at the given index} + /// @param index the index + public @CType("VkBool32") int transformFeedbackPreservesTriangleFanProvokingVertexAt(long index) { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_transformFeedbackPreservesTriangleFanProvokingVertex(this.segment(), index); } + /// {@return `transformFeedbackPreservesTriangleFanProvokingVertex`} + public @CType("VkBool32") int transformFeedbackPreservesTriangleFanProvokingVertex() { return VkPhysicalDeviceProvokingVertexPropertiesEXT.get_transformFeedbackPreservesTriangleFanProvokingVertex(this.segment()); } + /// Sets `transformFeedbackPreservesTriangleFanProvokingVertex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformFeedbackPreservesTriangleFanProvokingVertex(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_transformFeedbackPreservesTriangleFanProvokingVertex.set(segment, 0L, index, value); } + /// Sets `transformFeedbackPreservesTriangleFanProvokingVertex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformFeedbackPreservesTriangleFanProvokingVertex(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_transformFeedbackPreservesTriangleFanProvokingVertex(segment, 0L, value); } + /// Sets `transformFeedbackPreservesTriangleFanProvokingVertex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexPropertiesEXT transformFeedbackPreservesTriangleFanProvokingVertexAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_transformFeedbackPreservesTriangleFanProvokingVertex(this.segment(), index, value); return this; } + /// Sets `transformFeedbackPreservesTriangleFanProvokingVertex` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProvokingVertexPropertiesEXT transformFeedbackPreservesTriangleFanProvokingVertex(@CType("VkBool32") int value) { VkPhysicalDeviceProvokingVertexPropertiesEXT.set_transformFeedbackPreservesTriangleFanProvokingVertex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.java new file mode 100644 index 00000000..26c8d7a9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### formatRgba10x6WithoutYCbCrSampler +/// [VarHandle][#VH_formatRgba10x6WithoutYCbCrSampler] - [Getter][#formatRgba10x6WithoutYCbCrSampler()] - [Setter][#formatRgba10x6WithoutYCbCrSampler(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 formatRgba10x6WithoutYCbCrSampler; +/// } VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("formatRgba10x6WithoutYCbCrSampler") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `formatRgba10x6WithoutYCbCrSampler` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_formatRgba10x6WithoutYCbCrSampler = LAYOUT.arrayElementVarHandle(PathElement.groupElement("formatRgba10x6WithoutYCbCrSampler")); + + /// Creates `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT` + public static VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT` + public static VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `formatRgba10x6WithoutYCbCrSampler` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_formatRgba10x6WithoutYCbCrSampler(MemorySegment segment, long index) { return (int) VH_formatRgba10x6WithoutYCbCrSampler.get(segment, 0L, index); } + /// {@return `formatRgba10x6WithoutYCbCrSampler`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_formatRgba10x6WithoutYCbCrSampler(MemorySegment segment) { return VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.get_formatRgba10x6WithoutYCbCrSampler(segment, 0L); } + /// {@return `formatRgba10x6WithoutYCbCrSampler` at the given index} + /// @param index the index + public @CType("VkBool32") int formatRgba10x6WithoutYCbCrSamplerAt(long index) { return VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.get_formatRgba10x6WithoutYCbCrSampler(this.segment(), index); } + /// {@return `formatRgba10x6WithoutYCbCrSampler`} + public @CType("VkBool32") int formatRgba10x6WithoutYCbCrSampler() { return VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.get_formatRgba10x6WithoutYCbCrSampler(this.segment()); } + /// Sets `formatRgba10x6WithoutYCbCrSampler` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_formatRgba10x6WithoutYCbCrSampler(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_formatRgba10x6WithoutYCbCrSampler.set(segment, 0L, index, value); } + /// Sets `formatRgba10x6WithoutYCbCrSampler` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_formatRgba10x6WithoutYCbCrSampler(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.set_formatRgba10x6WithoutYCbCrSampler(segment, 0L, value); } + /// Sets `formatRgba10x6WithoutYCbCrSampler` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT formatRgba10x6WithoutYCbCrSamplerAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.set_formatRgba10x6WithoutYCbCrSampler(this.segment(), index, value); return this; } + /// Sets `formatRgba10x6WithoutYCbCrSampler` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT formatRgba10x6WithoutYCbCrSampler(@CType("VkBool32") int value) { VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.set_formatRgba10x6WithoutYCbCrSampler(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.java new file mode 100644 index 00000000..c471c599 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rasterizationOrderColorAttachmentAccess +/// [VarHandle][#VH_rasterizationOrderColorAttachmentAccess] - [Getter][#rasterizationOrderColorAttachmentAccess()] - [Setter][#rasterizationOrderColorAttachmentAccess(int)] +/// ### rasterizationOrderDepthAttachmentAccess +/// [VarHandle][#VH_rasterizationOrderDepthAttachmentAccess] - [Getter][#rasterizationOrderDepthAttachmentAccess()] - [Setter][#rasterizationOrderDepthAttachmentAccess(int)] +/// ### rasterizationOrderStencilAttachmentAccess +/// [VarHandle][#VH_rasterizationOrderStencilAttachmentAccess] - [Getter][#rasterizationOrderStencilAttachmentAccess()] - [Setter][#rasterizationOrderStencilAttachmentAccess(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 rasterizationOrderColorAttachmentAccess; +/// VkBool32 rasterizationOrderDepthAttachmentAccess; +/// VkBool32 rasterizationOrderStencilAttachmentAccess; +/// } VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rasterizationOrderColorAttachmentAccess"), + ValueLayout.JAVA_INT.withName("rasterizationOrderDepthAttachmentAccess"), + ValueLayout.JAVA_INT.withName("rasterizationOrderStencilAttachmentAccess") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rasterizationOrderColorAttachmentAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rasterizationOrderColorAttachmentAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rasterizationOrderColorAttachmentAccess")); + /// The [VarHandle] of `rasterizationOrderDepthAttachmentAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rasterizationOrderDepthAttachmentAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rasterizationOrderDepthAttachmentAccess")); + /// The [VarHandle] of `rasterizationOrderStencilAttachmentAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rasterizationOrderStencilAttachmentAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rasterizationOrderStencilAttachmentAccess")); + + /// Creates `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT` + public static VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT` + public static VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `rasterizationOrderColorAttachmentAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rasterizationOrderColorAttachmentAccess(MemorySegment segment, long index) { return (int) VH_rasterizationOrderColorAttachmentAccess.get(segment, 0L, index); } + /// {@return `rasterizationOrderColorAttachmentAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rasterizationOrderColorAttachmentAccess(MemorySegment segment) { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_rasterizationOrderColorAttachmentAccess(segment, 0L); } + /// {@return `rasterizationOrderColorAttachmentAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int rasterizationOrderColorAttachmentAccessAt(long index) { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_rasterizationOrderColorAttachmentAccess(this.segment(), index); } + /// {@return `rasterizationOrderColorAttachmentAccess`} + public @CType("VkBool32") int rasterizationOrderColorAttachmentAccess() { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_rasterizationOrderColorAttachmentAccess(this.segment()); } + /// Sets `rasterizationOrderColorAttachmentAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rasterizationOrderColorAttachmentAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rasterizationOrderColorAttachmentAccess.set(segment, 0L, index, value); } + /// Sets `rasterizationOrderColorAttachmentAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rasterizationOrderColorAttachmentAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_rasterizationOrderColorAttachmentAccess(segment, 0L, value); } + /// Sets `rasterizationOrderColorAttachmentAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT rasterizationOrderColorAttachmentAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_rasterizationOrderColorAttachmentAccess(this.segment(), index, value); return this; } + /// Sets `rasterizationOrderColorAttachmentAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT rasterizationOrderColorAttachmentAccess(@CType("VkBool32") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_rasterizationOrderColorAttachmentAccess(this.segment(), value); return this; } + + /// {@return `rasterizationOrderDepthAttachmentAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rasterizationOrderDepthAttachmentAccess(MemorySegment segment, long index) { return (int) VH_rasterizationOrderDepthAttachmentAccess.get(segment, 0L, index); } + /// {@return `rasterizationOrderDepthAttachmentAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rasterizationOrderDepthAttachmentAccess(MemorySegment segment) { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_rasterizationOrderDepthAttachmentAccess(segment, 0L); } + /// {@return `rasterizationOrderDepthAttachmentAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int rasterizationOrderDepthAttachmentAccessAt(long index) { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_rasterizationOrderDepthAttachmentAccess(this.segment(), index); } + /// {@return `rasterizationOrderDepthAttachmentAccess`} + public @CType("VkBool32") int rasterizationOrderDepthAttachmentAccess() { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_rasterizationOrderDepthAttachmentAccess(this.segment()); } + /// Sets `rasterizationOrderDepthAttachmentAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rasterizationOrderDepthAttachmentAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rasterizationOrderDepthAttachmentAccess.set(segment, 0L, index, value); } + /// Sets `rasterizationOrderDepthAttachmentAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rasterizationOrderDepthAttachmentAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_rasterizationOrderDepthAttachmentAccess(segment, 0L, value); } + /// Sets `rasterizationOrderDepthAttachmentAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT rasterizationOrderDepthAttachmentAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_rasterizationOrderDepthAttachmentAccess(this.segment(), index, value); return this; } + /// Sets `rasterizationOrderDepthAttachmentAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT rasterizationOrderDepthAttachmentAccess(@CType("VkBool32") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_rasterizationOrderDepthAttachmentAccess(this.segment(), value); return this; } + + /// {@return `rasterizationOrderStencilAttachmentAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rasterizationOrderStencilAttachmentAccess(MemorySegment segment, long index) { return (int) VH_rasterizationOrderStencilAttachmentAccess.get(segment, 0L, index); } + /// {@return `rasterizationOrderStencilAttachmentAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rasterizationOrderStencilAttachmentAccess(MemorySegment segment) { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_rasterizationOrderStencilAttachmentAccess(segment, 0L); } + /// {@return `rasterizationOrderStencilAttachmentAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int rasterizationOrderStencilAttachmentAccessAt(long index) { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_rasterizationOrderStencilAttachmentAccess(this.segment(), index); } + /// {@return `rasterizationOrderStencilAttachmentAccess`} + public @CType("VkBool32") int rasterizationOrderStencilAttachmentAccess() { return VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.get_rasterizationOrderStencilAttachmentAccess(this.segment()); } + /// Sets `rasterizationOrderStencilAttachmentAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rasterizationOrderStencilAttachmentAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rasterizationOrderStencilAttachmentAccess.set(segment, 0L, index, value); } + /// Sets `rasterizationOrderStencilAttachmentAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rasterizationOrderStencilAttachmentAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_rasterizationOrderStencilAttachmentAccess(segment, 0L, value); } + /// Sets `rasterizationOrderStencilAttachmentAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT rasterizationOrderStencilAttachmentAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_rasterizationOrderStencilAttachmentAccess(this.segment(), index, value); return this; } + /// Sets `rasterizationOrderStencilAttachmentAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT rasterizationOrderStencilAttachmentAccess(@CType("VkBool32") int value) { VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.set_rasterizationOrderStencilAttachmentAccess(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRobustness2FeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRobustness2FeaturesEXT.java new file mode 100644 index 00000000..aa30663d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRobustness2FeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### robustBufferAccess2 +/// [VarHandle][#VH_robustBufferAccess2] - [Getter][#robustBufferAccess2()] - [Setter][#robustBufferAccess2(int)] +/// ### robustImageAccess2 +/// [VarHandle][#VH_robustImageAccess2] - [Getter][#robustImageAccess2()] - [Setter][#robustImageAccess2(int)] +/// ### nullDescriptor +/// [VarHandle][#VH_nullDescriptor] - [Getter][#nullDescriptor()] - [Setter][#nullDescriptor(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRobustness2FeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 robustBufferAccess2; +/// VkBool32 robustImageAccess2; +/// VkBool32 nullDescriptor; +/// } VkPhysicalDeviceRobustness2FeaturesEXT; +/// ``` +public final class VkPhysicalDeviceRobustness2FeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceRobustness2FeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("robustBufferAccess2"), + ValueLayout.JAVA_INT.withName("robustImageAccess2"), + ValueLayout.JAVA_INT.withName("nullDescriptor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `robustBufferAccess2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_robustBufferAccess2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustBufferAccess2")); + /// The [VarHandle] of `robustImageAccess2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_robustImageAccess2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustImageAccess2")); + /// The [VarHandle] of `nullDescriptor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nullDescriptor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nullDescriptor")); + + /// Creates `VkPhysicalDeviceRobustness2FeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRobustness2FeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRobustness2FeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRobustness2FeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRobustness2FeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceRobustness2FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRobustness2FeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRobustness2FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRobustness2FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRobustness2FeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRobustness2FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRobustness2FeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRobustness2FeaturesEXT` + public static VkPhysicalDeviceRobustness2FeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRobustness2FeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRobustness2FeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRobustness2FeaturesEXT` + public static VkPhysicalDeviceRobustness2FeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRobustness2FeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRobustness2FeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRobustness2FeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRobustness2FeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2FeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2FeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRobustness2FeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRobustness2FeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRobustness2FeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2FeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2FeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `robustBufferAccess2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_robustBufferAccess2(MemorySegment segment, long index) { return (int) VH_robustBufferAccess2.get(segment, 0L, index); } + /// {@return `robustBufferAccess2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_robustBufferAccess2(MemorySegment segment) { return VkPhysicalDeviceRobustness2FeaturesEXT.get_robustBufferAccess2(segment, 0L); } + /// {@return `robustBufferAccess2` at the given index} + /// @param index the index + public @CType("VkBool32") int robustBufferAccess2At(long index) { return VkPhysicalDeviceRobustness2FeaturesEXT.get_robustBufferAccess2(this.segment(), index); } + /// {@return `robustBufferAccess2`} + public @CType("VkBool32") int robustBufferAccess2() { return VkPhysicalDeviceRobustness2FeaturesEXT.get_robustBufferAccess2(this.segment()); } + /// Sets `robustBufferAccess2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustBufferAccess2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_robustBufferAccess2.set(segment, 0L, index, value); } + /// Sets `robustBufferAccess2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustBufferAccess2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_robustBufferAccess2(segment, 0L, value); } + /// Sets `robustBufferAccess2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2FeaturesEXT robustBufferAccess2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_robustBufferAccess2(this.segment(), index, value); return this; } + /// Sets `robustBufferAccess2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2FeaturesEXT robustBufferAccess2(@CType("VkBool32") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_robustBufferAccess2(this.segment(), value); return this; } + + /// {@return `robustImageAccess2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_robustImageAccess2(MemorySegment segment, long index) { return (int) VH_robustImageAccess2.get(segment, 0L, index); } + /// {@return `robustImageAccess2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_robustImageAccess2(MemorySegment segment) { return VkPhysicalDeviceRobustness2FeaturesEXT.get_robustImageAccess2(segment, 0L); } + /// {@return `robustImageAccess2` at the given index} + /// @param index the index + public @CType("VkBool32") int robustImageAccess2At(long index) { return VkPhysicalDeviceRobustness2FeaturesEXT.get_robustImageAccess2(this.segment(), index); } + /// {@return `robustImageAccess2`} + public @CType("VkBool32") int robustImageAccess2() { return VkPhysicalDeviceRobustness2FeaturesEXT.get_robustImageAccess2(this.segment()); } + /// Sets `robustImageAccess2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustImageAccess2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_robustImageAccess2.set(segment, 0L, index, value); } + /// Sets `robustImageAccess2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustImageAccess2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_robustImageAccess2(segment, 0L, value); } + /// Sets `robustImageAccess2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2FeaturesEXT robustImageAccess2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_robustImageAccess2(this.segment(), index, value); return this; } + /// Sets `robustImageAccess2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2FeaturesEXT robustImageAccess2(@CType("VkBool32") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_robustImageAccess2(this.segment(), value); return this; } + + /// {@return `nullDescriptor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nullDescriptor(MemorySegment segment, long index) { return (int) VH_nullDescriptor.get(segment, 0L, index); } + /// {@return `nullDescriptor`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nullDescriptor(MemorySegment segment) { return VkPhysicalDeviceRobustness2FeaturesEXT.get_nullDescriptor(segment, 0L); } + /// {@return `nullDescriptor` at the given index} + /// @param index the index + public @CType("VkBool32") int nullDescriptorAt(long index) { return VkPhysicalDeviceRobustness2FeaturesEXT.get_nullDescriptor(this.segment(), index); } + /// {@return `nullDescriptor`} + public @CType("VkBool32") int nullDescriptor() { return VkPhysicalDeviceRobustness2FeaturesEXT.get_nullDescriptor(this.segment()); } + /// Sets `nullDescriptor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nullDescriptor(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nullDescriptor.set(segment, 0L, index, value); } + /// Sets `nullDescriptor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nullDescriptor(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_nullDescriptor(segment, 0L, value); } + /// Sets `nullDescriptor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2FeaturesEXT nullDescriptorAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_nullDescriptor(this.segment(), index, value); return this; } + /// Sets `nullDescriptor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2FeaturesEXT nullDescriptor(@CType("VkBool32") int value) { VkPhysicalDeviceRobustness2FeaturesEXT.set_nullDescriptor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRobustness2PropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRobustness2PropertiesEXT.java new file mode 100644 index 00000000..846998d8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceRobustness2PropertiesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### robustStorageBufferAccessSizeAlignment +/// [VarHandle][#VH_robustStorageBufferAccessSizeAlignment] - [Getter][#robustStorageBufferAccessSizeAlignment()] - [Setter][#robustStorageBufferAccessSizeAlignment(long)] +/// ### robustUniformBufferAccessSizeAlignment +/// [VarHandle][#VH_robustUniformBufferAccessSizeAlignment] - [Getter][#robustUniformBufferAccessSizeAlignment()] - [Setter][#robustUniformBufferAccessSizeAlignment(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRobustness2PropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize robustStorageBufferAccessSizeAlignment; +/// VkDeviceSize robustUniformBufferAccessSizeAlignment; +/// } VkPhysicalDeviceRobustness2PropertiesEXT; +/// ``` +public final class VkPhysicalDeviceRobustness2PropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceRobustness2PropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("robustStorageBufferAccessSizeAlignment"), + ValueLayout.JAVA_LONG.withName("robustUniformBufferAccessSizeAlignment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `robustStorageBufferAccessSizeAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_robustStorageBufferAccessSizeAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustStorageBufferAccessSizeAlignment")); + /// The [VarHandle] of `robustUniformBufferAccessSizeAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_robustUniformBufferAccessSizeAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustUniformBufferAccessSizeAlignment")); + + /// Creates `VkPhysicalDeviceRobustness2PropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRobustness2PropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRobustness2PropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRobustness2PropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRobustness2PropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceRobustness2PropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRobustness2PropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRobustness2PropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRobustness2PropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRobustness2PropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRobustness2PropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRobustness2PropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRobustness2PropertiesEXT` + public static VkPhysicalDeviceRobustness2PropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRobustness2PropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRobustness2PropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRobustness2PropertiesEXT` + public static VkPhysicalDeviceRobustness2PropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRobustness2PropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRobustness2PropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRobustness2PropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRobustness2PropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2PropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2PropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRobustness2PropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRobustness2PropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRobustness2PropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2PropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2PropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `robustStorageBufferAccessSizeAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_robustStorageBufferAccessSizeAlignment(MemorySegment segment, long index) { return (long) VH_robustStorageBufferAccessSizeAlignment.get(segment, 0L, index); } + /// {@return `robustStorageBufferAccessSizeAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_robustStorageBufferAccessSizeAlignment(MemorySegment segment) { return VkPhysicalDeviceRobustness2PropertiesEXT.get_robustStorageBufferAccessSizeAlignment(segment, 0L); } + /// {@return `robustStorageBufferAccessSizeAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long robustStorageBufferAccessSizeAlignmentAt(long index) { return VkPhysicalDeviceRobustness2PropertiesEXT.get_robustStorageBufferAccessSizeAlignment(this.segment(), index); } + /// {@return `robustStorageBufferAccessSizeAlignment`} + public @CType("VkDeviceSize") long robustStorageBufferAccessSizeAlignment() { return VkPhysicalDeviceRobustness2PropertiesEXT.get_robustStorageBufferAccessSizeAlignment(this.segment()); } + /// Sets `robustStorageBufferAccessSizeAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustStorageBufferAccessSizeAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_robustStorageBufferAccessSizeAlignment.set(segment, 0L, index, value); } + /// Sets `robustStorageBufferAccessSizeAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustStorageBufferAccessSizeAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_robustStorageBufferAccessSizeAlignment(segment, 0L, value); } + /// Sets `robustStorageBufferAccessSizeAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2PropertiesEXT robustStorageBufferAccessSizeAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_robustStorageBufferAccessSizeAlignment(this.segment(), index, value); return this; } + /// Sets `robustStorageBufferAccessSizeAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2PropertiesEXT robustStorageBufferAccessSizeAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_robustStorageBufferAccessSizeAlignment(this.segment(), value); return this; } + + /// {@return `robustUniformBufferAccessSizeAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_robustUniformBufferAccessSizeAlignment(MemorySegment segment, long index) { return (long) VH_robustUniformBufferAccessSizeAlignment.get(segment, 0L, index); } + /// {@return `robustUniformBufferAccessSizeAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_robustUniformBufferAccessSizeAlignment(MemorySegment segment) { return VkPhysicalDeviceRobustness2PropertiesEXT.get_robustUniformBufferAccessSizeAlignment(segment, 0L); } + /// {@return `robustUniformBufferAccessSizeAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long robustUniformBufferAccessSizeAlignmentAt(long index) { return VkPhysicalDeviceRobustness2PropertiesEXT.get_robustUniformBufferAccessSizeAlignment(this.segment(), index); } + /// {@return `robustUniformBufferAccessSizeAlignment`} + public @CType("VkDeviceSize") long robustUniformBufferAccessSizeAlignment() { return VkPhysicalDeviceRobustness2PropertiesEXT.get_robustUniformBufferAccessSizeAlignment(this.segment()); } + /// Sets `robustUniformBufferAccessSizeAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustUniformBufferAccessSizeAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_robustUniformBufferAccessSizeAlignment.set(segment, 0L, index, value); } + /// Sets `robustUniformBufferAccessSizeAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustUniformBufferAccessSizeAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_robustUniformBufferAccessSizeAlignment(segment, 0L, value); } + /// Sets `robustUniformBufferAccessSizeAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2PropertiesEXT robustUniformBufferAccessSizeAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_robustUniformBufferAccessSizeAlignment(this.segment(), index, value); return this; } + /// Sets `robustUniformBufferAccessSizeAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRobustness2PropertiesEXT robustUniformBufferAccessSizeAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceRobustness2PropertiesEXT.set_robustUniformBufferAccessSizeAlignment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceSampleLocationsPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceSampleLocationsPropertiesEXT.java new file mode 100644 index 00000000..ed5a457b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceSampleLocationsPropertiesEXT.java @@ -0,0 +1,335 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sampleLocationSampleCounts +/// [VarHandle][#VH_sampleLocationSampleCounts] - [Getter][#sampleLocationSampleCounts()] - [Setter][#sampleLocationSampleCounts(int)] +/// ### maxSampleLocationGridSize +/// [Byte offset][#OFFSET_maxSampleLocationGridSize] - [Memory layout][#ML_maxSampleLocationGridSize] - [Getter][#maxSampleLocationGridSize()] - [Setter][#maxSampleLocationGridSize(java.lang.foreign.MemorySegment)] +/// ### sampleLocationCoordinateRange +/// [VarHandle][#VH_sampleLocationCoordinateRange] - [Getter][#sampleLocationCoordinateRange()] - [Setter][#sampleLocationCoordinateRange(float)] +/// ### sampleLocationSubPixelBits +/// [VarHandle][#VH_sampleLocationSubPixelBits] - [Getter][#sampleLocationSubPixelBits()] - [Setter][#sampleLocationSubPixelBits(int)] +/// ### variableSampleLocations +/// [VarHandle][#VH_variableSampleLocations] - [Getter][#variableSampleLocations()] - [Setter][#variableSampleLocations(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSampleLocationsPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkSampleCountFlags sampleLocationSampleCounts; +/// VkExtent2D maxSampleLocationGridSize; +/// float sampleLocationCoordinateRange; +/// uint32_t sampleLocationSubPixelBits; +/// VkBool32 variableSampleLocations; +/// } VkPhysicalDeviceSampleLocationsPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceSampleLocationsPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceSampleLocationsPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sampleLocationSampleCounts"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxSampleLocationGridSize"), + ValueLayout.JAVA_FLOAT.withName("sampleLocationCoordinateRange"), + ValueLayout.JAVA_INT.withName("sampleLocationSubPixelBits"), + ValueLayout.JAVA_INT.withName("variableSampleLocations") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sampleLocationSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleLocationSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleLocationSampleCounts")); + /// The byte offset of `maxSampleLocationGridSize`. + public static final long OFFSET_maxSampleLocationGridSize = LAYOUT.byteOffset(PathElement.groupElement("maxSampleLocationGridSize")); + /// The memory layout of `maxSampleLocationGridSize`. + public static final MemoryLayout ML_maxSampleLocationGridSize = LAYOUT.select(PathElement.groupElement("maxSampleLocationGridSize")); + /// The [VarHandle] of `sampleLocationCoordinateRange` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_sampleLocationCoordinateRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleLocationCoordinateRange")); + /// The [VarHandle] of `sampleLocationSubPixelBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleLocationSubPixelBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleLocationSubPixelBits")); + /// The [VarHandle] of `variableSampleLocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_variableSampleLocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("variableSampleLocations")); + + /// Creates `VkPhysicalDeviceSampleLocationsPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSampleLocationsPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSampleLocationsPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSampleLocationsPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSampleLocationsPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceSampleLocationsPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSampleLocationsPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSampleLocationsPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSampleLocationsPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSampleLocationsPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSampleLocationsPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSampleLocationsPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSampleLocationsPropertiesEXT` + public static VkPhysicalDeviceSampleLocationsPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSampleLocationsPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSampleLocationsPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSampleLocationsPropertiesEXT` + public static VkPhysicalDeviceSampleLocationsPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSampleLocationsPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `sampleLocationSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_sampleLocationSampleCounts(MemorySegment segment, long index) { return (int) VH_sampleLocationSampleCounts.get(segment, 0L, index); } + /// {@return `sampleLocationSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_sampleLocationSampleCounts(MemorySegment segment) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sampleLocationSampleCounts(segment, 0L); } + /// {@return `sampleLocationSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int sampleLocationSampleCountsAt(long index) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sampleLocationSampleCounts(this.segment(), index); } + /// {@return `sampleLocationSampleCounts`} + public @CType("VkSampleCountFlags") int sampleLocationSampleCounts() { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sampleLocationSampleCounts(this.segment()); } + /// Sets `sampleLocationSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_sampleLocationSampleCounts.set(segment, 0L, index, value); } + /// Sets `sampleLocationSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sampleLocationSampleCounts(segment, 0L, value); } + /// Sets `sampleLocationSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT sampleLocationSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sampleLocationSampleCounts(this.segment(), index, value); return this; } + /// Sets `sampleLocationSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT sampleLocationSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sampleLocationSampleCounts(this.segment(), value); return this; } + + /// {@return `maxSampleLocationGridSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxSampleLocationGridSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxSampleLocationGridSize, index), ML_maxSampleLocationGridSize); } + /// {@return `maxSampleLocationGridSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxSampleLocationGridSize(MemorySegment segment) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_maxSampleLocationGridSize(segment, 0L); } + /// {@return `maxSampleLocationGridSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxSampleLocationGridSizeAt(long index) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_maxSampleLocationGridSize(this.segment(), index); } + /// {@return `maxSampleLocationGridSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxSampleLocationGridSize() { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_maxSampleLocationGridSize(this.segment()); } + /// Sets `maxSampleLocationGridSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSampleLocationGridSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxSampleLocationGridSize, index), ML_maxSampleLocationGridSize.byteSize()); } + /// Sets `maxSampleLocationGridSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSampleLocationGridSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_maxSampleLocationGridSize(segment, 0L, value); } + /// Sets `maxSampleLocationGridSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT maxSampleLocationGridSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_maxSampleLocationGridSize(this.segment(), index, value); return this; } + /// Sets `maxSampleLocationGridSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT maxSampleLocationGridSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_maxSampleLocationGridSize(this.segment(), value); return this; } + + /// {@return `sampleLocationCoordinateRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_sampleLocationCoordinateRange(MemorySegment segment, long index) { return (float) VH_sampleLocationCoordinateRange.get(segment, 0L, index); } + /// {@return `sampleLocationCoordinateRange`} + /// @param segment the segment of the struct + public static @CType("float") float get_sampleLocationCoordinateRange(MemorySegment segment) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sampleLocationCoordinateRange(segment, 0L); } + /// {@return `sampleLocationCoordinateRange` at the given index} + /// @param index the index + public @CType("float") float sampleLocationCoordinateRangeAt(long index) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sampleLocationCoordinateRange(this.segment(), index); } + /// {@return `sampleLocationCoordinateRange`} + public @CType("float") float sampleLocationCoordinateRange() { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sampleLocationCoordinateRange(this.segment()); } + /// Sets `sampleLocationCoordinateRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationCoordinateRange(MemorySegment segment, long index, @CType("float") float value) { VH_sampleLocationCoordinateRange.set(segment, 0L, index, value); } + /// Sets `sampleLocationCoordinateRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationCoordinateRange(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sampleLocationCoordinateRange(segment, 0L, value); } + /// Sets `sampleLocationCoordinateRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT sampleLocationCoordinateRangeAt(long index, @CType("float") float value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sampleLocationCoordinateRange(this.segment(), index, value); return this; } + /// Sets `sampleLocationCoordinateRange` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT sampleLocationCoordinateRange(@CType("float") float value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sampleLocationCoordinateRange(this.segment(), value); return this; } + + /// {@return `sampleLocationSubPixelBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sampleLocationSubPixelBits(MemorySegment segment, long index) { return (int) VH_sampleLocationSubPixelBits.get(segment, 0L, index); } + /// {@return `sampleLocationSubPixelBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sampleLocationSubPixelBits(MemorySegment segment) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sampleLocationSubPixelBits(segment, 0L); } + /// {@return `sampleLocationSubPixelBits` at the given index} + /// @param index the index + public @CType("uint32_t") int sampleLocationSubPixelBitsAt(long index) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sampleLocationSubPixelBits(this.segment(), index); } + /// {@return `sampleLocationSubPixelBits`} + public @CType("uint32_t") int sampleLocationSubPixelBits() { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_sampleLocationSubPixelBits(this.segment()); } + /// Sets `sampleLocationSubPixelBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationSubPixelBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sampleLocationSubPixelBits.set(segment, 0L, index, value); } + /// Sets `sampleLocationSubPixelBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationSubPixelBits(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sampleLocationSubPixelBits(segment, 0L, value); } + /// Sets `sampleLocationSubPixelBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT sampleLocationSubPixelBitsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sampleLocationSubPixelBits(this.segment(), index, value); return this; } + /// Sets `sampleLocationSubPixelBits` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT sampleLocationSubPixelBits(@CType("uint32_t") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_sampleLocationSubPixelBits(this.segment(), value); return this; } + + /// {@return `variableSampleLocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_variableSampleLocations(MemorySegment segment, long index) { return (int) VH_variableSampleLocations.get(segment, 0L, index); } + /// {@return `variableSampleLocations`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_variableSampleLocations(MemorySegment segment) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_variableSampleLocations(segment, 0L); } + /// {@return `variableSampleLocations` at the given index} + /// @param index the index + public @CType("VkBool32") int variableSampleLocationsAt(long index) { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_variableSampleLocations(this.segment(), index); } + /// {@return `variableSampleLocations`} + public @CType("VkBool32") int variableSampleLocations() { return VkPhysicalDeviceSampleLocationsPropertiesEXT.get_variableSampleLocations(this.segment()); } + /// Sets `variableSampleLocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_variableSampleLocations(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_variableSampleLocations.set(segment, 0L, index, value); } + /// Sets `variableSampleLocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_variableSampleLocations(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_variableSampleLocations(segment, 0L, value); } + /// Sets `variableSampleLocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT variableSampleLocationsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_variableSampleLocations(this.segment(), index, value); return this; } + /// Sets `variableSampleLocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSampleLocationsPropertiesEXT variableSampleLocations(@CType("VkBool32") int value) { VkPhysicalDeviceSampleLocationsPropertiesEXT.set_variableSampleLocations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.java new file mode 100644 index 00000000..04ded3fb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderBufferFloat16Atomics +/// [VarHandle][#VH_shaderBufferFloat16Atomics] - [Getter][#shaderBufferFloat16Atomics()] - [Setter][#shaderBufferFloat16Atomics(int)] +/// ### shaderBufferFloat16AtomicAdd +/// [VarHandle][#VH_shaderBufferFloat16AtomicAdd] - [Getter][#shaderBufferFloat16AtomicAdd()] - [Setter][#shaderBufferFloat16AtomicAdd(int)] +/// ### shaderBufferFloat16AtomicMinMax +/// [VarHandle][#VH_shaderBufferFloat16AtomicMinMax] - [Getter][#shaderBufferFloat16AtomicMinMax()] - [Setter][#shaderBufferFloat16AtomicMinMax(int)] +/// ### shaderBufferFloat32AtomicMinMax +/// [VarHandle][#VH_shaderBufferFloat32AtomicMinMax] - [Getter][#shaderBufferFloat32AtomicMinMax()] - [Setter][#shaderBufferFloat32AtomicMinMax(int)] +/// ### shaderBufferFloat64AtomicMinMax +/// [VarHandle][#VH_shaderBufferFloat64AtomicMinMax] - [Getter][#shaderBufferFloat64AtomicMinMax()] - [Setter][#shaderBufferFloat64AtomicMinMax(int)] +/// ### shaderSharedFloat16Atomics +/// [VarHandle][#VH_shaderSharedFloat16Atomics] - [Getter][#shaderSharedFloat16Atomics()] - [Setter][#shaderSharedFloat16Atomics(int)] +/// ### shaderSharedFloat16AtomicAdd +/// [VarHandle][#VH_shaderSharedFloat16AtomicAdd] - [Getter][#shaderSharedFloat16AtomicAdd()] - [Setter][#shaderSharedFloat16AtomicAdd(int)] +/// ### shaderSharedFloat16AtomicMinMax +/// [VarHandle][#VH_shaderSharedFloat16AtomicMinMax] - [Getter][#shaderSharedFloat16AtomicMinMax()] - [Setter][#shaderSharedFloat16AtomicMinMax(int)] +/// ### shaderSharedFloat32AtomicMinMax +/// [VarHandle][#VH_shaderSharedFloat32AtomicMinMax] - [Getter][#shaderSharedFloat32AtomicMinMax()] - [Setter][#shaderSharedFloat32AtomicMinMax(int)] +/// ### shaderSharedFloat64AtomicMinMax +/// [VarHandle][#VH_shaderSharedFloat64AtomicMinMax] - [Getter][#shaderSharedFloat64AtomicMinMax()] - [Setter][#shaderSharedFloat64AtomicMinMax(int)] +/// ### shaderImageFloat32AtomicMinMax +/// [VarHandle][#VH_shaderImageFloat32AtomicMinMax] - [Getter][#shaderImageFloat32AtomicMinMax()] - [Setter][#shaderImageFloat32AtomicMinMax(int)] +/// ### sparseImageFloat32AtomicMinMax +/// [VarHandle][#VH_sparseImageFloat32AtomicMinMax] - [Getter][#sparseImageFloat32AtomicMinMax()] - [Setter][#sparseImageFloat32AtomicMinMax(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderBufferFloat16Atomics; +/// VkBool32 shaderBufferFloat16AtomicAdd; +/// VkBool32 shaderBufferFloat16AtomicMinMax; +/// VkBool32 shaderBufferFloat32AtomicMinMax; +/// VkBool32 shaderBufferFloat64AtomicMinMax; +/// VkBool32 shaderSharedFloat16Atomics; +/// VkBool32 shaderSharedFloat16AtomicAdd; +/// VkBool32 shaderSharedFloat16AtomicMinMax; +/// VkBool32 shaderSharedFloat32AtomicMinMax; +/// VkBool32 shaderSharedFloat64AtomicMinMax; +/// VkBool32 shaderImageFloat32AtomicMinMax; +/// VkBool32 sparseImageFloat32AtomicMinMax; +/// } VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT; +/// ``` +public final class VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderBufferFloat16Atomics"), + ValueLayout.JAVA_INT.withName("shaderBufferFloat16AtomicAdd"), + ValueLayout.JAVA_INT.withName("shaderBufferFloat16AtomicMinMax"), + ValueLayout.JAVA_INT.withName("shaderBufferFloat32AtomicMinMax"), + ValueLayout.JAVA_INT.withName("shaderBufferFloat64AtomicMinMax"), + ValueLayout.JAVA_INT.withName("shaderSharedFloat16Atomics"), + ValueLayout.JAVA_INT.withName("shaderSharedFloat16AtomicAdd"), + ValueLayout.JAVA_INT.withName("shaderSharedFloat16AtomicMinMax"), + ValueLayout.JAVA_INT.withName("shaderSharedFloat32AtomicMinMax"), + ValueLayout.JAVA_INT.withName("shaderSharedFloat64AtomicMinMax"), + ValueLayout.JAVA_INT.withName("shaderImageFloat32AtomicMinMax"), + ValueLayout.JAVA_INT.withName("sparseImageFloat32AtomicMinMax") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderBufferFloat16Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferFloat16Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferFloat16Atomics")); + /// The [VarHandle] of `shaderBufferFloat16AtomicAdd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferFloat16AtomicAdd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferFloat16AtomicAdd")); + /// The [VarHandle] of `shaderBufferFloat16AtomicMinMax` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferFloat16AtomicMinMax = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferFloat16AtomicMinMax")); + /// The [VarHandle] of `shaderBufferFloat32AtomicMinMax` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferFloat32AtomicMinMax = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferFloat32AtomicMinMax")); + /// The [VarHandle] of `shaderBufferFloat64AtomicMinMax` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferFloat64AtomicMinMax = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferFloat64AtomicMinMax")); + /// The [VarHandle] of `shaderSharedFloat16Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedFloat16Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedFloat16Atomics")); + /// The [VarHandle] of `shaderSharedFloat16AtomicAdd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedFloat16AtomicAdd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedFloat16AtomicAdd")); + /// The [VarHandle] of `shaderSharedFloat16AtomicMinMax` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedFloat16AtomicMinMax = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedFloat16AtomicMinMax")); + /// The [VarHandle] of `shaderSharedFloat32AtomicMinMax` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedFloat32AtomicMinMax = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedFloat32AtomicMinMax")); + /// The [VarHandle] of `shaderSharedFloat64AtomicMinMax` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedFloat64AtomicMinMax = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedFloat64AtomicMinMax")); + /// The [VarHandle] of `shaderImageFloat32AtomicMinMax` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderImageFloat32AtomicMinMax = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderImageFloat32AtomicMinMax")); + /// The [VarHandle] of `sparseImageFloat32AtomicMinMax` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseImageFloat32AtomicMinMax = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseImageFloat32AtomicMinMax")); + + /// Creates `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT` + public static VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT` + public static VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderBufferFloat16Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferFloat16Atomics(MemorySegment segment, long index) { return (int) VH_shaderBufferFloat16Atomics.get(segment, 0L, index); } + /// {@return `shaderBufferFloat16Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferFloat16Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat16Atomics(segment, 0L); } + /// {@return `shaderBufferFloat16Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferFloat16AtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat16Atomics(this.segment(), index); } + /// {@return `shaderBufferFloat16Atomics`} + public @CType("VkBool32") int shaderBufferFloat16Atomics() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat16Atomics(this.segment()); } + /// Sets `shaderBufferFloat16Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferFloat16Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferFloat16Atomics.set(segment, 0L, index, value); } + /// Sets `shaderBufferFloat16Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferFloat16Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat16Atomics(segment, 0L, value); } + /// Sets `shaderBufferFloat16Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderBufferFloat16AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat16Atomics(this.segment(), index, value); return this; } + /// Sets `shaderBufferFloat16Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderBufferFloat16Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat16Atomics(this.segment(), value); return this; } + + /// {@return `shaderBufferFloat16AtomicAdd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferFloat16AtomicAdd(MemorySegment segment, long index) { return (int) VH_shaderBufferFloat16AtomicAdd.get(segment, 0L, index); } + /// {@return `shaderBufferFloat16AtomicAdd`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferFloat16AtomicAdd(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat16AtomicAdd(segment, 0L); } + /// {@return `shaderBufferFloat16AtomicAdd` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferFloat16AtomicAddAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat16AtomicAdd(this.segment(), index); } + /// {@return `shaderBufferFloat16AtomicAdd`} + public @CType("VkBool32") int shaderBufferFloat16AtomicAdd() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat16AtomicAdd(this.segment()); } + /// Sets `shaderBufferFloat16AtomicAdd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferFloat16AtomicAdd(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferFloat16AtomicAdd.set(segment, 0L, index, value); } + /// Sets `shaderBufferFloat16AtomicAdd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferFloat16AtomicAdd(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat16AtomicAdd(segment, 0L, value); } + /// Sets `shaderBufferFloat16AtomicAdd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderBufferFloat16AtomicAddAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat16AtomicAdd(this.segment(), index, value); return this; } + /// Sets `shaderBufferFloat16AtomicAdd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderBufferFloat16AtomicAdd(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat16AtomicAdd(this.segment(), value); return this; } + + /// {@return `shaderBufferFloat16AtomicMinMax` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferFloat16AtomicMinMax(MemorySegment segment, long index) { return (int) VH_shaderBufferFloat16AtomicMinMax.get(segment, 0L, index); } + /// {@return `shaderBufferFloat16AtomicMinMax`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferFloat16AtomicMinMax(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat16AtomicMinMax(segment, 0L); } + /// {@return `shaderBufferFloat16AtomicMinMax` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferFloat16AtomicMinMaxAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat16AtomicMinMax(this.segment(), index); } + /// {@return `shaderBufferFloat16AtomicMinMax`} + public @CType("VkBool32") int shaderBufferFloat16AtomicMinMax() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat16AtomicMinMax(this.segment()); } + /// Sets `shaderBufferFloat16AtomicMinMax` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferFloat16AtomicMinMax(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferFloat16AtomicMinMax.set(segment, 0L, index, value); } + /// Sets `shaderBufferFloat16AtomicMinMax` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferFloat16AtomicMinMax(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat16AtomicMinMax(segment, 0L, value); } + /// Sets `shaderBufferFloat16AtomicMinMax` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderBufferFloat16AtomicMinMaxAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat16AtomicMinMax(this.segment(), index, value); return this; } + /// Sets `shaderBufferFloat16AtomicMinMax` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderBufferFloat16AtomicMinMax(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat16AtomicMinMax(this.segment(), value); return this; } + + /// {@return `shaderBufferFloat32AtomicMinMax` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferFloat32AtomicMinMax(MemorySegment segment, long index) { return (int) VH_shaderBufferFloat32AtomicMinMax.get(segment, 0L, index); } + /// {@return `shaderBufferFloat32AtomicMinMax`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferFloat32AtomicMinMax(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat32AtomicMinMax(segment, 0L); } + /// {@return `shaderBufferFloat32AtomicMinMax` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferFloat32AtomicMinMaxAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat32AtomicMinMax(this.segment(), index); } + /// {@return `shaderBufferFloat32AtomicMinMax`} + public @CType("VkBool32") int shaderBufferFloat32AtomicMinMax() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat32AtomicMinMax(this.segment()); } + /// Sets `shaderBufferFloat32AtomicMinMax` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferFloat32AtomicMinMax(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferFloat32AtomicMinMax.set(segment, 0L, index, value); } + /// Sets `shaderBufferFloat32AtomicMinMax` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferFloat32AtomicMinMax(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat32AtomicMinMax(segment, 0L, value); } + /// Sets `shaderBufferFloat32AtomicMinMax` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderBufferFloat32AtomicMinMaxAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat32AtomicMinMax(this.segment(), index, value); return this; } + /// Sets `shaderBufferFloat32AtomicMinMax` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderBufferFloat32AtomicMinMax(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat32AtomicMinMax(this.segment(), value); return this; } + + /// {@return `shaderBufferFloat64AtomicMinMax` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferFloat64AtomicMinMax(MemorySegment segment, long index) { return (int) VH_shaderBufferFloat64AtomicMinMax.get(segment, 0L, index); } + /// {@return `shaderBufferFloat64AtomicMinMax`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferFloat64AtomicMinMax(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat64AtomicMinMax(segment, 0L); } + /// {@return `shaderBufferFloat64AtomicMinMax` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferFloat64AtomicMinMaxAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat64AtomicMinMax(this.segment(), index); } + /// {@return `shaderBufferFloat64AtomicMinMax`} + public @CType("VkBool32") int shaderBufferFloat64AtomicMinMax() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderBufferFloat64AtomicMinMax(this.segment()); } + /// Sets `shaderBufferFloat64AtomicMinMax` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferFloat64AtomicMinMax(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferFloat64AtomicMinMax.set(segment, 0L, index, value); } + /// Sets `shaderBufferFloat64AtomicMinMax` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferFloat64AtomicMinMax(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat64AtomicMinMax(segment, 0L, value); } + /// Sets `shaderBufferFloat64AtomicMinMax` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderBufferFloat64AtomicMinMaxAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat64AtomicMinMax(this.segment(), index, value); return this; } + /// Sets `shaderBufferFloat64AtomicMinMax` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderBufferFloat64AtomicMinMax(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderBufferFloat64AtomicMinMax(this.segment(), value); return this; } + + /// {@return `shaderSharedFloat16Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedFloat16Atomics(MemorySegment segment, long index) { return (int) VH_shaderSharedFloat16Atomics.get(segment, 0L, index); } + /// {@return `shaderSharedFloat16Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedFloat16Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat16Atomics(segment, 0L); } + /// {@return `shaderSharedFloat16Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedFloat16AtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat16Atomics(this.segment(), index); } + /// {@return `shaderSharedFloat16Atomics`} + public @CType("VkBool32") int shaderSharedFloat16Atomics() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat16Atomics(this.segment()); } + /// Sets `shaderSharedFloat16Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedFloat16Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedFloat16Atomics.set(segment, 0L, index, value); } + /// Sets `shaderSharedFloat16Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedFloat16Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat16Atomics(segment, 0L, value); } + /// Sets `shaderSharedFloat16Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderSharedFloat16AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat16Atomics(this.segment(), index, value); return this; } + /// Sets `shaderSharedFloat16Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderSharedFloat16Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat16Atomics(this.segment(), value); return this; } + + /// {@return `shaderSharedFloat16AtomicAdd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedFloat16AtomicAdd(MemorySegment segment, long index) { return (int) VH_shaderSharedFloat16AtomicAdd.get(segment, 0L, index); } + /// {@return `shaderSharedFloat16AtomicAdd`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedFloat16AtomicAdd(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat16AtomicAdd(segment, 0L); } + /// {@return `shaderSharedFloat16AtomicAdd` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedFloat16AtomicAddAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat16AtomicAdd(this.segment(), index); } + /// {@return `shaderSharedFloat16AtomicAdd`} + public @CType("VkBool32") int shaderSharedFloat16AtomicAdd() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat16AtomicAdd(this.segment()); } + /// Sets `shaderSharedFloat16AtomicAdd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedFloat16AtomicAdd(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedFloat16AtomicAdd.set(segment, 0L, index, value); } + /// Sets `shaderSharedFloat16AtomicAdd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedFloat16AtomicAdd(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat16AtomicAdd(segment, 0L, value); } + /// Sets `shaderSharedFloat16AtomicAdd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderSharedFloat16AtomicAddAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat16AtomicAdd(this.segment(), index, value); return this; } + /// Sets `shaderSharedFloat16AtomicAdd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderSharedFloat16AtomicAdd(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat16AtomicAdd(this.segment(), value); return this; } + + /// {@return `shaderSharedFloat16AtomicMinMax` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedFloat16AtomicMinMax(MemorySegment segment, long index) { return (int) VH_shaderSharedFloat16AtomicMinMax.get(segment, 0L, index); } + /// {@return `shaderSharedFloat16AtomicMinMax`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedFloat16AtomicMinMax(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat16AtomicMinMax(segment, 0L); } + /// {@return `shaderSharedFloat16AtomicMinMax` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedFloat16AtomicMinMaxAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat16AtomicMinMax(this.segment(), index); } + /// {@return `shaderSharedFloat16AtomicMinMax`} + public @CType("VkBool32") int shaderSharedFloat16AtomicMinMax() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat16AtomicMinMax(this.segment()); } + /// Sets `shaderSharedFloat16AtomicMinMax` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedFloat16AtomicMinMax(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedFloat16AtomicMinMax.set(segment, 0L, index, value); } + /// Sets `shaderSharedFloat16AtomicMinMax` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedFloat16AtomicMinMax(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat16AtomicMinMax(segment, 0L, value); } + /// Sets `shaderSharedFloat16AtomicMinMax` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderSharedFloat16AtomicMinMaxAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat16AtomicMinMax(this.segment(), index, value); return this; } + /// Sets `shaderSharedFloat16AtomicMinMax` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderSharedFloat16AtomicMinMax(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat16AtomicMinMax(this.segment(), value); return this; } + + /// {@return `shaderSharedFloat32AtomicMinMax` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedFloat32AtomicMinMax(MemorySegment segment, long index) { return (int) VH_shaderSharedFloat32AtomicMinMax.get(segment, 0L, index); } + /// {@return `shaderSharedFloat32AtomicMinMax`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedFloat32AtomicMinMax(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat32AtomicMinMax(segment, 0L); } + /// {@return `shaderSharedFloat32AtomicMinMax` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedFloat32AtomicMinMaxAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat32AtomicMinMax(this.segment(), index); } + /// {@return `shaderSharedFloat32AtomicMinMax`} + public @CType("VkBool32") int shaderSharedFloat32AtomicMinMax() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat32AtomicMinMax(this.segment()); } + /// Sets `shaderSharedFloat32AtomicMinMax` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedFloat32AtomicMinMax(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedFloat32AtomicMinMax.set(segment, 0L, index, value); } + /// Sets `shaderSharedFloat32AtomicMinMax` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedFloat32AtomicMinMax(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat32AtomicMinMax(segment, 0L, value); } + /// Sets `shaderSharedFloat32AtomicMinMax` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderSharedFloat32AtomicMinMaxAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat32AtomicMinMax(this.segment(), index, value); return this; } + /// Sets `shaderSharedFloat32AtomicMinMax` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderSharedFloat32AtomicMinMax(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat32AtomicMinMax(this.segment(), value); return this; } + + /// {@return `shaderSharedFloat64AtomicMinMax` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedFloat64AtomicMinMax(MemorySegment segment, long index) { return (int) VH_shaderSharedFloat64AtomicMinMax.get(segment, 0L, index); } + /// {@return `shaderSharedFloat64AtomicMinMax`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedFloat64AtomicMinMax(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat64AtomicMinMax(segment, 0L); } + /// {@return `shaderSharedFloat64AtomicMinMax` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedFloat64AtomicMinMaxAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat64AtomicMinMax(this.segment(), index); } + /// {@return `shaderSharedFloat64AtomicMinMax`} + public @CType("VkBool32") int shaderSharedFloat64AtomicMinMax() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderSharedFloat64AtomicMinMax(this.segment()); } + /// Sets `shaderSharedFloat64AtomicMinMax` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedFloat64AtomicMinMax(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedFloat64AtomicMinMax.set(segment, 0L, index, value); } + /// Sets `shaderSharedFloat64AtomicMinMax` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedFloat64AtomicMinMax(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat64AtomicMinMax(segment, 0L, value); } + /// Sets `shaderSharedFloat64AtomicMinMax` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderSharedFloat64AtomicMinMaxAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat64AtomicMinMax(this.segment(), index, value); return this; } + /// Sets `shaderSharedFloat64AtomicMinMax` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderSharedFloat64AtomicMinMax(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderSharedFloat64AtomicMinMax(this.segment(), value); return this; } + + /// {@return `shaderImageFloat32AtomicMinMax` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderImageFloat32AtomicMinMax(MemorySegment segment, long index) { return (int) VH_shaderImageFloat32AtomicMinMax.get(segment, 0L, index); } + /// {@return `shaderImageFloat32AtomicMinMax`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderImageFloat32AtomicMinMax(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderImageFloat32AtomicMinMax(segment, 0L); } + /// {@return `shaderImageFloat32AtomicMinMax` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderImageFloat32AtomicMinMaxAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderImageFloat32AtomicMinMax(this.segment(), index); } + /// {@return `shaderImageFloat32AtomicMinMax`} + public @CType("VkBool32") int shaderImageFloat32AtomicMinMax() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_shaderImageFloat32AtomicMinMax(this.segment()); } + /// Sets `shaderImageFloat32AtomicMinMax` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderImageFloat32AtomicMinMax(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderImageFloat32AtomicMinMax.set(segment, 0L, index, value); } + /// Sets `shaderImageFloat32AtomicMinMax` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderImageFloat32AtomicMinMax(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderImageFloat32AtomicMinMax(segment, 0L, value); } + /// Sets `shaderImageFloat32AtomicMinMax` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderImageFloat32AtomicMinMaxAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderImageFloat32AtomicMinMax(this.segment(), index, value); return this; } + /// Sets `shaderImageFloat32AtomicMinMax` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT shaderImageFloat32AtomicMinMax(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_shaderImageFloat32AtomicMinMax(this.segment(), value); return this; } + + /// {@return `sparseImageFloat32AtomicMinMax` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseImageFloat32AtomicMinMax(MemorySegment segment, long index) { return (int) VH_sparseImageFloat32AtomicMinMax.get(segment, 0L, index); } + /// {@return `sparseImageFloat32AtomicMinMax`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseImageFloat32AtomicMinMax(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_sparseImageFloat32AtomicMinMax(segment, 0L); } + /// {@return `sparseImageFloat32AtomicMinMax` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseImageFloat32AtomicMinMaxAt(long index) { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_sparseImageFloat32AtomicMinMax(this.segment(), index); } + /// {@return `sparseImageFloat32AtomicMinMax`} + public @CType("VkBool32") int sparseImageFloat32AtomicMinMax() { return VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.get_sparseImageFloat32AtomicMinMax(this.segment()); } + /// Sets `sparseImageFloat32AtomicMinMax` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseImageFloat32AtomicMinMax(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseImageFloat32AtomicMinMax.set(segment, 0L, index, value); } + /// Sets `sparseImageFloat32AtomicMinMax` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseImageFloat32AtomicMinMax(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_sparseImageFloat32AtomicMinMax(segment, 0L, value); } + /// Sets `sparseImageFloat32AtomicMinMax` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT sparseImageFloat32AtomicMinMaxAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_sparseImageFloat32AtomicMinMax(this.segment(), index, value); return this; } + /// Sets `sparseImageFloat32AtomicMinMax` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT sparseImageFloat32AtomicMinMax(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.set_sparseImageFloat32AtomicMinMax(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.java new file mode 100644 index 00000000..cdce999b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderBufferFloat32Atomics +/// [VarHandle][#VH_shaderBufferFloat32Atomics] - [Getter][#shaderBufferFloat32Atomics()] - [Setter][#shaderBufferFloat32Atomics(int)] +/// ### shaderBufferFloat32AtomicAdd +/// [VarHandle][#VH_shaderBufferFloat32AtomicAdd] - [Getter][#shaderBufferFloat32AtomicAdd()] - [Setter][#shaderBufferFloat32AtomicAdd(int)] +/// ### shaderBufferFloat64Atomics +/// [VarHandle][#VH_shaderBufferFloat64Atomics] - [Getter][#shaderBufferFloat64Atomics()] - [Setter][#shaderBufferFloat64Atomics(int)] +/// ### shaderBufferFloat64AtomicAdd +/// [VarHandle][#VH_shaderBufferFloat64AtomicAdd] - [Getter][#shaderBufferFloat64AtomicAdd()] - [Setter][#shaderBufferFloat64AtomicAdd(int)] +/// ### shaderSharedFloat32Atomics +/// [VarHandle][#VH_shaderSharedFloat32Atomics] - [Getter][#shaderSharedFloat32Atomics()] - [Setter][#shaderSharedFloat32Atomics(int)] +/// ### shaderSharedFloat32AtomicAdd +/// [VarHandle][#VH_shaderSharedFloat32AtomicAdd] - [Getter][#shaderSharedFloat32AtomicAdd()] - [Setter][#shaderSharedFloat32AtomicAdd(int)] +/// ### shaderSharedFloat64Atomics +/// [VarHandle][#VH_shaderSharedFloat64Atomics] - [Getter][#shaderSharedFloat64Atomics()] - [Setter][#shaderSharedFloat64Atomics(int)] +/// ### shaderSharedFloat64AtomicAdd +/// [VarHandle][#VH_shaderSharedFloat64AtomicAdd] - [Getter][#shaderSharedFloat64AtomicAdd()] - [Setter][#shaderSharedFloat64AtomicAdd(int)] +/// ### shaderImageFloat32Atomics +/// [VarHandle][#VH_shaderImageFloat32Atomics] - [Getter][#shaderImageFloat32Atomics()] - [Setter][#shaderImageFloat32Atomics(int)] +/// ### shaderImageFloat32AtomicAdd +/// [VarHandle][#VH_shaderImageFloat32AtomicAdd] - [Getter][#shaderImageFloat32AtomicAdd()] - [Setter][#shaderImageFloat32AtomicAdd(int)] +/// ### sparseImageFloat32Atomics +/// [VarHandle][#VH_sparseImageFloat32Atomics] - [Getter][#sparseImageFloat32Atomics()] - [Setter][#sparseImageFloat32Atomics(int)] +/// ### sparseImageFloat32AtomicAdd +/// [VarHandle][#VH_sparseImageFloat32AtomicAdd] - [Getter][#sparseImageFloat32AtomicAdd()] - [Setter][#sparseImageFloat32AtomicAdd(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderAtomicFloatFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderBufferFloat32Atomics; +/// VkBool32 shaderBufferFloat32AtomicAdd; +/// VkBool32 shaderBufferFloat64Atomics; +/// VkBool32 shaderBufferFloat64AtomicAdd; +/// VkBool32 shaderSharedFloat32Atomics; +/// VkBool32 shaderSharedFloat32AtomicAdd; +/// VkBool32 shaderSharedFloat64Atomics; +/// VkBool32 shaderSharedFloat64AtomicAdd; +/// VkBool32 shaderImageFloat32Atomics; +/// VkBool32 shaderImageFloat32AtomicAdd; +/// VkBool32 sparseImageFloat32Atomics; +/// VkBool32 sparseImageFloat32AtomicAdd; +/// } VkPhysicalDeviceShaderAtomicFloatFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceShaderAtomicFloatFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderBufferFloat32Atomics"), + ValueLayout.JAVA_INT.withName("shaderBufferFloat32AtomicAdd"), + ValueLayout.JAVA_INT.withName("shaderBufferFloat64Atomics"), + ValueLayout.JAVA_INT.withName("shaderBufferFloat64AtomicAdd"), + ValueLayout.JAVA_INT.withName("shaderSharedFloat32Atomics"), + ValueLayout.JAVA_INT.withName("shaderSharedFloat32AtomicAdd"), + ValueLayout.JAVA_INT.withName("shaderSharedFloat64Atomics"), + ValueLayout.JAVA_INT.withName("shaderSharedFloat64AtomicAdd"), + ValueLayout.JAVA_INT.withName("shaderImageFloat32Atomics"), + ValueLayout.JAVA_INT.withName("shaderImageFloat32AtomicAdd"), + ValueLayout.JAVA_INT.withName("sparseImageFloat32Atomics"), + ValueLayout.JAVA_INT.withName("sparseImageFloat32AtomicAdd") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderBufferFloat32Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferFloat32Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferFloat32Atomics")); + /// The [VarHandle] of `shaderBufferFloat32AtomicAdd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferFloat32AtomicAdd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferFloat32AtomicAdd")); + /// The [VarHandle] of `shaderBufferFloat64Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferFloat64Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferFloat64Atomics")); + /// The [VarHandle] of `shaderBufferFloat64AtomicAdd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferFloat64AtomicAdd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferFloat64AtomicAdd")); + /// The [VarHandle] of `shaderSharedFloat32Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedFloat32Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedFloat32Atomics")); + /// The [VarHandle] of `shaderSharedFloat32AtomicAdd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedFloat32AtomicAdd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedFloat32AtomicAdd")); + /// The [VarHandle] of `shaderSharedFloat64Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedFloat64Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedFloat64Atomics")); + /// The [VarHandle] of `shaderSharedFloat64AtomicAdd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedFloat64AtomicAdd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedFloat64AtomicAdd")); + /// The [VarHandle] of `shaderImageFloat32Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderImageFloat32Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderImageFloat32Atomics")); + /// The [VarHandle] of `shaderImageFloat32AtomicAdd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderImageFloat32AtomicAdd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderImageFloat32AtomicAdd")); + /// The [VarHandle] of `sparseImageFloat32Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseImageFloat32Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseImageFloat32Atomics")); + /// The [VarHandle] of `sparseImageFloat32AtomicAdd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseImageFloat32AtomicAdd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseImageFloat32AtomicAdd")); + + /// Creates `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicFloatFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicFloatFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicFloatFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicFloatFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicFloatFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicFloatFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT` + public static VkPhysicalDeviceShaderAtomicFloatFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderAtomicFloatFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderAtomicFloatFeaturesEXT` + public static VkPhysicalDeviceShaderAtomicFloatFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderAtomicFloatFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderBufferFloat32Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferFloat32Atomics(MemorySegment segment, long index) { return (int) VH_shaderBufferFloat32Atomics.get(segment, 0L, index); } + /// {@return `shaderBufferFloat32Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferFloat32Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat32Atomics(segment, 0L); } + /// {@return `shaderBufferFloat32Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferFloat32AtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat32Atomics(this.segment(), index); } + /// {@return `shaderBufferFloat32Atomics`} + public @CType("VkBool32") int shaderBufferFloat32Atomics() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat32Atomics(this.segment()); } + /// Sets `shaderBufferFloat32Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferFloat32Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferFloat32Atomics.set(segment, 0L, index, value); } + /// Sets `shaderBufferFloat32Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferFloat32Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat32Atomics(segment, 0L, value); } + /// Sets `shaderBufferFloat32Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderBufferFloat32AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat32Atomics(this.segment(), index, value); return this; } + /// Sets `shaderBufferFloat32Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderBufferFloat32Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat32Atomics(this.segment(), value); return this; } + + /// {@return `shaderBufferFloat32AtomicAdd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferFloat32AtomicAdd(MemorySegment segment, long index) { return (int) VH_shaderBufferFloat32AtomicAdd.get(segment, 0L, index); } + /// {@return `shaderBufferFloat32AtomicAdd`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferFloat32AtomicAdd(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat32AtomicAdd(segment, 0L); } + /// {@return `shaderBufferFloat32AtomicAdd` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferFloat32AtomicAddAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat32AtomicAdd(this.segment(), index); } + /// {@return `shaderBufferFloat32AtomicAdd`} + public @CType("VkBool32") int shaderBufferFloat32AtomicAdd() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat32AtomicAdd(this.segment()); } + /// Sets `shaderBufferFloat32AtomicAdd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferFloat32AtomicAdd(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferFloat32AtomicAdd.set(segment, 0L, index, value); } + /// Sets `shaderBufferFloat32AtomicAdd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferFloat32AtomicAdd(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat32AtomicAdd(segment, 0L, value); } + /// Sets `shaderBufferFloat32AtomicAdd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderBufferFloat32AtomicAddAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat32AtomicAdd(this.segment(), index, value); return this; } + /// Sets `shaderBufferFloat32AtomicAdd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderBufferFloat32AtomicAdd(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat32AtomicAdd(this.segment(), value); return this; } + + /// {@return `shaderBufferFloat64Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferFloat64Atomics(MemorySegment segment, long index) { return (int) VH_shaderBufferFloat64Atomics.get(segment, 0L, index); } + /// {@return `shaderBufferFloat64Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferFloat64Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat64Atomics(segment, 0L); } + /// {@return `shaderBufferFloat64Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferFloat64AtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat64Atomics(this.segment(), index); } + /// {@return `shaderBufferFloat64Atomics`} + public @CType("VkBool32") int shaderBufferFloat64Atomics() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat64Atomics(this.segment()); } + /// Sets `shaderBufferFloat64Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferFloat64Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferFloat64Atomics.set(segment, 0L, index, value); } + /// Sets `shaderBufferFloat64Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferFloat64Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat64Atomics(segment, 0L, value); } + /// Sets `shaderBufferFloat64Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderBufferFloat64AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat64Atomics(this.segment(), index, value); return this; } + /// Sets `shaderBufferFloat64Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderBufferFloat64Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat64Atomics(this.segment(), value); return this; } + + /// {@return `shaderBufferFloat64AtomicAdd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferFloat64AtomicAdd(MemorySegment segment, long index) { return (int) VH_shaderBufferFloat64AtomicAdd.get(segment, 0L, index); } + /// {@return `shaderBufferFloat64AtomicAdd`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferFloat64AtomicAdd(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat64AtomicAdd(segment, 0L); } + /// {@return `shaderBufferFloat64AtomicAdd` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferFloat64AtomicAddAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat64AtomicAdd(this.segment(), index); } + /// {@return `shaderBufferFloat64AtomicAdd`} + public @CType("VkBool32") int shaderBufferFloat64AtomicAdd() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderBufferFloat64AtomicAdd(this.segment()); } + /// Sets `shaderBufferFloat64AtomicAdd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferFloat64AtomicAdd(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferFloat64AtomicAdd.set(segment, 0L, index, value); } + /// Sets `shaderBufferFloat64AtomicAdd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferFloat64AtomicAdd(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat64AtomicAdd(segment, 0L, value); } + /// Sets `shaderBufferFloat64AtomicAdd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderBufferFloat64AtomicAddAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat64AtomicAdd(this.segment(), index, value); return this; } + /// Sets `shaderBufferFloat64AtomicAdd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderBufferFloat64AtomicAdd(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderBufferFloat64AtomicAdd(this.segment(), value); return this; } + + /// {@return `shaderSharedFloat32Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedFloat32Atomics(MemorySegment segment, long index) { return (int) VH_shaderSharedFloat32Atomics.get(segment, 0L, index); } + /// {@return `shaderSharedFloat32Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedFloat32Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat32Atomics(segment, 0L); } + /// {@return `shaderSharedFloat32Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedFloat32AtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat32Atomics(this.segment(), index); } + /// {@return `shaderSharedFloat32Atomics`} + public @CType("VkBool32") int shaderSharedFloat32Atomics() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat32Atomics(this.segment()); } + /// Sets `shaderSharedFloat32Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedFloat32Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedFloat32Atomics.set(segment, 0L, index, value); } + /// Sets `shaderSharedFloat32Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedFloat32Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat32Atomics(segment, 0L, value); } + /// Sets `shaderSharedFloat32Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderSharedFloat32AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat32Atomics(this.segment(), index, value); return this; } + /// Sets `shaderSharedFloat32Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderSharedFloat32Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat32Atomics(this.segment(), value); return this; } + + /// {@return `shaderSharedFloat32AtomicAdd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedFloat32AtomicAdd(MemorySegment segment, long index) { return (int) VH_shaderSharedFloat32AtomicAdd.get(segment, 0L, index); } + /// {@return `shaderSharedFloat32AtomicAdd`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedFloat32AtomicAdd(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat32AtomicAdd(segment, 0L); } + /// {@return `shaderSharedFloat32AtomicAdd` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedFloat32AtomicAddAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat32AtomicAdd(this.segment(), index); } + /// {@return `shaderSharedFloat32AtomicAdd`} + public @CType("VkBool32") int shaderSharedFloat32AtomicAdd() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat32AtomicAdd(this.segment()); } + /// Sets `shaderSharedFloat32AtomicAdd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedFloat32AtomicAdd(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedFloat32AtomicAdd.set(segment, 0L, index, value); } + /// Sets `shaderSharedFloat32AtomicAdd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedFloat32AtomicAdd(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat32AtomicAdd(segment, 0L, value); } + /// Sets `shaderSharedFloat32AtomicAdd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderSharedFloat32AtomicAddAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat32AtomicAdd(this.segment(), index, value); return this; } + /// Sets `shaderSharedFloat32AtomicAdd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderSharedFloat32AtomicAdd(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat32AtomicAdd(this.segment(), value); return this; } + + /// {@return `shaderSharedFloat64Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedFloat64Atomics(MemorySegment segment, long index) { return (int) VH_shaderSharedFloat64Atomics.get(segment, 0L, index); } + /// {@return `shaderSharedFloat64Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedFloat64Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat64Atomics(segment, 0L); } + /// {@return `shaderSharedFloat64Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedFloat64AtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat64Atomics(this.segment(), index); } + /// {@return `shaderSharedFloat64Atomics`} + public @CType("VkBool32") int shaderSharedFloat64Atomics() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat64Atomics(this.segment()); } + /// Sets `shaderSharedFloat64Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedFloat64Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedFloat64Atomics.set(segment, 0L, index, value); } + /// Sets `shaderSharedFloat64Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedFloat64Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat64Atomics(segment, 0L, value); } + /// Sets `shaderSharedFloat64Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderSharedFloat64AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat64Atomics(this.segment(), index, value); return this; } + /// Sets `shaderSharedFloat64Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderSharedFloat64Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat64Atomics(this.segment(), value); return this; } + + /// {@return `shaderSharedFloat64AtomicAdd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedFloat64AtomicAdd(MemorySegment segment, long index) { return (int) VH_shaderSharedFloat64AtomicAdd.get(segment, 0L, index); } + /// {@return `shaderSharedFloat64AtomicAdd`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedFloat64AtomicAdd(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat64AtomicAdd(segment, 0L); } + /// {@return `shaderSharedFloat64AtomicAdd` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedFloat64AtomicAddAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat64AtomicAdd(this.segment(), index); } + /// {@return `shaderSharedFloat64AtomicAdd`} + public @CType("VkBool32") int shaderSharedFloat64AtomicAdd() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderSharedFloat64AtomicAdd(this.segment()); } + /// Sets `shaderSharedFloat64AtomicAdd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedFloat64AtomicAdd(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedFloat64AtomicAdd.set(segment, 0L, index, value); } + /// Sets `shaderSharedFloat64AtomicAdd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedFloat64AtomicAdd(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat64AtomicAdd(segment, 0L, value); } + /// Sets `shaderSharedFloat64AtomicAdd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderSharedFloat64AtomicAddAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat64AtomicAdd(this.segment(), index, value); return this; } + /// Sets `shaderSharedFloat64AtomicAdd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderSharedFloat64AtomicAdd(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderSharedFloat64AtomicAdd(this.segment(), value); return this; } + + /// {@return `shaderImageFloat32Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderImageFloat32Atomics(MemorySegment segment, long index) { return (int) VH_shaderImageFloat32Atomics.get(segment, 0L, index); } + /// {@return `shaderImageFloat32Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderImageFloat32Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderImageFloat32Atomics(segment, 0L); } + /// {@return `shaderImageFloat32Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderImageFloat32AtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderImageFloat32Atomics(this.segment(), index); } + /// {@return `shaderImageFloat32Atomics`} + public @CType("VkBool32") int shaderImageFloat32Atomics() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderImageFloat32Atomics(this.segment()); } + /// Sets `shaderImageFloat32Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderImageFloat32Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderImageFloat32Atomics.set(segment, 0L, index, value); } + /// Sets `shaderImageFloat32Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderImageFloat32Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderImageFloat32Atomics(segment, 0L, value); } + /// Sets `shaderImageFloat32Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderImageFloat32AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderImageFloat32Atomics(this.segment(), index, value); return this; } + /// Sets `shaderImageFloat32Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderImageFloat32Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderImageFloat32Atomics(this.segment(), value); return this; } + + /// {@return `shaderImageFloat32AtomicAdd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderImageFloat32AtomicAdd(MemorySegment segment, long index) { return (int) VH_shaderImageFloat32AtomicAdd.get(segment, 0L, index); } + /// {@return `shaderImageFloat32AtomicAdd`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderImageFloat32AtomicAdd(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderImageFloat32AtomicAdd(segment, 0L); } + /// {@return `shaderImageFloat32AtomicAdd` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderImageFloat32AtomicAddAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderImageFloat32AtomicAdd(this.segment(), index); } + /// {@return `shaderImageFloat32AtomicAdd`} + public @CType("VkBool32") int shaderImageFloat32AtomicAdd() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_shaderImageFloat32AtomicAdd(this.segment()); } + /// Sets `shaderImageFloat32AtomicAdd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderImageFloat32AtomicAdd(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderImageFloat32AtomicAdd.set(segment, 0L, index, value); } + /// Sets `shaderImageFloat32AtomicAdd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderImageFloat32AtomicAdd(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderImageFloat32AtomicAdd(segment, 0L, value); } + /// Sets `shaderImageFloat32AtomicAdd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderImageFloat32AtomicAddAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderImageFloat32AtomicAdd(this.segment(), index, value); return this; } + /// Sets `shaderImageFloat32AtomicAdd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT shaderImageFloat32AtomicAdd(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_shaderImageFloat32AtomicAdd(this.segment(), value); return this; } + + /// {@return `sparseImageFloat32Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseImageFloat32Atomics(MemorySegment segment, long index) { return (int) VH_sparseImageFloat32Atomics.get(segment, 0L, index); } + /// {@return `sparseImageFloat32Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseImageFloat32Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_sparseImageFloat32Atomics(segment, 0L); } + /// {@return `sparseImageFloat32Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseImageFloat32AtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_sparseImageFloat32Atomics(this.segment(), index); } + /// {@return `sparseImageFloat32Atomics`} + public @CType("VkBool32") int sparseImageFloat32Atomics() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_sparseImageFloat32Atomics(this.segment()); } + /// Sets `sparseImageFloat32Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseImageFloat32Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseImageFloat32Atomics.set(segment, 0L, index, value); } + /// Sets `sparseImageFloat32Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseImageFloat32Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_sparseImageFloat32Atomics(segment, 0L, value); } + /// Sets `sparseImageFloat32Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT sparseImageFloat32AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_sparseImageFloat32Atomics(this.segment(), index, value); return this; } + /// Sets `sparseImageFloat32Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT sparseImageFloat32Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_sparseImageFloat32Atomics(this.segment(), value); return this; } + + /// {@return `sparseImageFloat32AtomicAdd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseImageFloat32AtomicAdd(MemorySegment segment, long index) { return (int) VH_sparseImageFloat32AtomicAdd.get(segment, 0L, index); } + /// {@return `sparseImageFloat32AtomicAdd`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseImageFloat32AtomicAdd(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_sparseImageFloat32AtomicAdd(segment, 0L); } + /// {@return `sparseImageFloat32AtomicAdd` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseImageFloat32AtomicAddAt(long index) { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_sparseImageFloat32AtomicAdd(this.segment(), index); } + /// {@return `sparseImageFloat32AtomicAdd`} + public @CType("VkBool32") int sparseImageFloat32AtomicAdd() { return VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.get_sparseImageFloat32AtomicAdd(this.segment()); } + /// Sets `sparseImageFloat32AtomicAdd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseImageFloat32AtomicAdd(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseImageFloat32AtomicAdd.set(segment, 0L, index, value); } + /// Sets `sparseImageFloat32AtomicAdd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseImageFloat32AtomicAdd(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_sparseImageFloat32AtomicAdd(segment, 0L, value); } + /// Sets `sparseImageFloat32AtomicAdd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT sparseImageFloat32AtomicAddAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_sparseImageFloat32AtomicAdd(this.segment(), index, value); return this; } + /// Sets `sparseImageFloat32AtomicAdd` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloatFeaturesEXT sparseImageFloat32AtomicAdd(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.set_sparseImageFloat32AtomicAdd(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.java new file mode 100644 index 00000000..b340221a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderImageInt64Atomics +/// [VarHandle][#VH_shaderImageInt64Atomics] - [Getter][#shaderImageInt64Atomics()] - [Setter][#shaderImageInt64Atomics(int)] +/// ### sparseImageInt64Atomics +/// [VarHandle][#VH_sparseImageInt64Atomics] - [Getter][#sparseImageInt64Atomics()] - [Setter][#sparseImageInt64Atomics(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderImageInt64Atomics; +/// VkBool32 sparseImageInt64Atomics; +/// } VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT; +/// ``` +public final class VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderImageInt64Atomics"), + ValueLayout.JAVA_INT.withName("sparseImageInt64Atomics") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderImageInt64Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderImageInt64Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderImageInt64Atomics")); + /// The [VarHandle] of `sparseImageInt64Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseImageInt64Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseImageInt64Atomics")); + + /// Creates `VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT` + public static VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT` + public static VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderImageInt64Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderImageInt64Atomics(MemorySegment segment, long index) { return (int) VH_shaderImageInt64Atomics.get(segment, 0L, index); } + /// {@return `shaderImageInt64Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderImageInt64Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_shaderImageInt64Atomics(segment, 0L); } + /// {@return `shaderImageInt64Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderImageInt64AtomicsAt(long index) { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_shaderImageInt64Atomics(this.segment(), index); } + /// {@return `shaderImageInt64Atomics`} + public @CType("VkBool32") int shaderImageInt64Atomics() { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_shaderImageInt64Atomics(this.segment()); } + /// Sets `shaderImageInt64Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderImageInt64Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderImageInt64Atomics.set(segment, 0L, index, value); } + /// Sets `shaderImageInt64Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderImageInt64Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_shaderImageInt64Atomics(segment, 0L, value); } + /// Sets `shaderImageInt64Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT shaderImageInt64AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_shaderImageInt64Atomics(this.segment(), index, value); return this; } + /// Sets `shaderImageInt64Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT shaderImageInt64Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_shaderImageInt64Atomics(this.segment(), value); return this; } + + /// {@return `sparseImageInt64Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseImageInt64Atomics(MemorySegment segment, long index) { return (int) VH_sparseImageInt64Atomics.get(segment, 0L, index); } + /// {@return `sparseImageInt64Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseImageInt64Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_sparseImageInt64Atomics(segment, 0L); } + /// {@return `sparseImageInt64Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseImageInt64AtomicsAt(long index) { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_sparseImageInt64Atomics(this.segment(), index); } + /// {@return `sparseImageInt64Atomics`} + public @CType("VkBool32") int sparseImageInt64Atomics() { return VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.get_sparseImageInt64Atomics(this.segment()); } + /// Sets `sparseImageInt64Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseImageInt64Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseImageInt64Atomics.set(segment, 0L, index, value); } + /// Sets `sparseImageInt64Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseImageInt64Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_sparseImageInt64Atomics(segment, 0L, value); } + /// Sets `sparseImageInt64Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT sparseImageInt64AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_sparseImageInt64Atomics(this.segment(), index, value); return this; } + /// Sets `sparseImageInt64Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT sparseImageInt64Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.set_sparseImageInt64Atomics(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.java new file mode 100644 index 00000000..0f97a646 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderModuleIdentifier +/// [VarHandle][#VH_shaderModuleIdentifier] - [Getter][#shaderModuleIdentifier()] - [Setter][#shaderModuleIdentifier(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderModuleIdentifier; +/// } VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderModuleIdentifier") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderModuleIdentifier` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderModuleIdentifier = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderModuleIdentifier")); + + /// Creates `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT` + public static VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT` + public static VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderModuleIdentifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderModuleIdentifier(MemorySegment segment, long index) { return (int) VH_shaderModuleIdentifier.get(segment, 0L, index); } + /// {@return `shaderModuleIdentifier`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderModuleIdentifier(MemorySegment segment) { return VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.get_shaderModuleIdentifier(segment, 0L); } + /// {@return `shaderModuleIdentifier` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderModuleIdentifierAt(long index) { return VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.get_shaderModuleIdentifier(this.segment(), index); } + /// {@return `shaderModuleIdentifier`} + public @CType("VkBool32") int shaderModuleIdentifier() { return VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.get_shaderModuleIdentifier(this.segment()); } + /// Sets `shaderModuleIdentifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderModuleIdentifier(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderModuleIdentifier.set(segment, 0L, index, value); } + /// Sets `shaderModuleIdentifier` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderModuleIdentifier(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.set_shaderModuleIdentifier(segment, 0L, value); } + /// Sets `shaderModuleIdentifier` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT shaderModuleIdentifierAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.set_shaderModuleIdentifier(this.segment(), index, value); return this; } + /// Sets `shaderModuleIdentifier` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT shaderModuleIdentifier(@CType("VkBool32") int value) { VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.set_shaderModuleIdentifier(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.java new file mode 100644 index 00000000..ea25eade --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.java @@ -0,0 +1,202 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderModuleIdentifierAlgorithmUUID +/// [Byte offset handle][#MH_shaderModuleIdentifierAlgorithmUUID] - [Memory layout][#ML_shaderModuleIdentifierAlgorithmUUID] - [Getter][#shaderModuleIdentifierAlgorithmUUID(long)] - [Setter][#shaderModuleIdentifierAlgorithmUUID(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint8_t[VK_UUID_SIZE] shaderModuleIdentifierAlgorithmUUID; +/// } VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("shaderModuleIdentifierAlgorithmUUID") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `shaderModuleIdentifierAlgorithmUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_shaderModuleIdentifierAlgorithmUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("shaderModuleIdentifierAlgorithmUUID"), PathElement.sequenceElement()); + /// The memory layout of `shaderModuleIdentifierAlgorithmUUID`. + public static final MemoryLayout ML_shaderModuleIdentifierAlgorithmUUID = LAYOUT.select(PathElement.groupElement("shaderModuleIdentifierAlgorithmUUID")); + + /// Creates `VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT` + public static VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT` + public static VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderModuleIdentifierAlgorithmUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_shaderModuleIdentifierAlgorithmUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_shaderModuleIdentifierAlgorithmUUID.invokeExact(0L, elementIndex), index), ML_shaderModuleIdentifierAlgorithmUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `shaderModuleIdentifierAlgorithmUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_shaderModuleIdentifierAlgorithmUUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.get_shaderModuleIdentifierAlgorithmUUID(segment, 0L, elementIndex); } + /// {@return `shaderModuleIdentifierAlgorithmUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment shaderModuleIdentifierAlgorithmUUIDAt(long index, long elementIndex) { return VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.get_shaderModuleIdentifierAlgorithmUUID(this.segment(), index, elementIndex); } + /// {@return `shaderModuleIdentifierAlgorithmUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment shaderModuleIdentifierAlgorithmUUID(long elementIndex) { return VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.get_shaderModuleIdentifierAlgorithmUUID(this.segment(), elementIndex); } + /// Sets `shaderModuleIdentifierAlgorithmUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_shaderModuleIdentifierAlgorithmUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_shaderModuleIdentifierAlgorithmUUID.invokeExact(0L, elementIndex), index), ML_shaderModuleIdentifierAlgorithmUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `shaderModuleIdentifierAlgorithmUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_shaderModuleIdentifierAlgorithmUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.set_shaderModuleIdentifierAlgorithmUUID(segment, 0L, elementIndex, value); } + /// Sets `shaderModuleIdentifierAlgorithmUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT shaderModuleIdentifierAlgorithmUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.set_shaderModuleIdentifierAlgorithmUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `shaderModuleIdentifierAlgorithmUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT shaderModuleIdentifierAlgorithmUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.set_shaderModuleIdentifierAlgorithmUUID(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderObjectFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderObjectFeaturesEXT.java new file mode 100644 index 00000000..f59df117 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderObjectFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderObject +/// [VarHandle][#VH_shaderObject] - [Getter][#shaderObject()] - [Setter][#shaderObject(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderObjectFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderObject; +/// } VkPhysicalDeviceShaderObjectFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceShaderObjectFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderObjectFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderObject") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderObject` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderObject = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderObject")); + + /// Creates `VkPhysicalDeviceShaderObjectFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderObjectFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderObjectFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderObjectFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderObjectFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceShaderObjectFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderObjectFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderObjectFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderObjectFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderObjectFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderObjectFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderObjectFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderObjectFeaturesEXT` + public static VkPhysicalDeviceShaderObjectFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderObjectFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderObjectFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderObjectFeaturesEXT` + public static VkPhysicalDeviceShaderObjectFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderObjectFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderObjectFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderObjectFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderObjectFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderObjectFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderObjectFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderObjectFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderObjectFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderObjectFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderObjectFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderObjectFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderObjectFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderObjectFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderObject` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderObject(MemorySegment segment, long index) { return (int) VH_shaderObject.get(segment, 0L, index); } + /// {@return `shaderObject`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderObject(MemorySegment segment) { return VkPhysicalDeviceShaderObjectFeaturesEXT.get_shaderObject(segment, 0L); } + /// {@return `shaderObject` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderObjectAt(long index) { return VkPhysicalDeviceShaderObjectFeaturesEXT.get_shaderObject(this.segment(), index); } + /// {@return `shaderObject`} + public @CType("VkBool32") int shaderObject() { return VkPhysicalDeviceShaderObjectFeaturesEXT.get_shaderObject(this.segment()); } + /// Sets `shaderObject` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderObject(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderObject.set(segment, 0L, index, value); } + /// Sets `shaderObject` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderObject(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderObjectFeaturesEXT.set_shaderObject(segment, 0L, value); } + /// Sets `shaderObject` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectFeaturesEXT shaderObjectAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderObjectFeaturesEXT.set_shaderObject(this.segment(), index, value); return this; } + /// Sets `shaderObject` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectFeaturesEXT shaderObject(@CType("VkBool32") int value) { VkPhysicalDeviceShaderObjectFeaturesEXT.set_shaderObject(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderObjectPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderObjectPropertiesEXT.java new file mode 100644 index 00000000..949322b9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderObjectPropertiesEXT.java @@ -0,0 +1,239 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderBinaryUUID +/// [Byte offset handle][#MH_shaderBinaryUUID] - [Memory layout][#ML_shaderBinaryUUID] - [Getter][#shaderBinaryUUID(long)] - [Setter][#shaderBinaryUUID(long, java.lang.foreign.MemorySegment)] +/// ### shaderBinaryVersion +/// [VarHandle][#VH_shaderBinaryVersion] - [Getter][#shaderBinaryVersion()] - [Setter][#shaderBinaryVersion(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderObjectPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint8_t[VK_UUID_SIZE] shaderBinaryUUID; +/// uint32_t shaderBinaryVersion; +/// } VkPhysicalDeviceShaderObjectPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceShaderObjectPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderObjectPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("shaderBinaryUUID"), + ValueLayout.JAVA_INT.withName("shaderBinaryVersion") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `shaderBinaryUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_shaderBinaryUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("shaderBinaryUUID"), PathElement.sequenceElement()); + /// The memory layout of `shaderBinaryUUID`. + public static final MemoryLayout ML_shaderBinaryUUID = LAYOUT.select(PathElement.groupElement("shaderBinaryUUID")); + /// The [VarHandle] of `shaderBinaryVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBinaryVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBinaryVersion")); + + /// Creates `VkPhysicalDeviceShaderObjectPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderObjectPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderObjectPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderObjectPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderObjectPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceShaderObjectPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderObjectPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderObjectPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderObjectPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderObjectPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderObjectPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderObjectPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderObjectPropertiesEXT` + public static VkPhysicalDeviceShaderObjectPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderObjectPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderObjectPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderObjectPropertiesEXT` + public static VkPhysicalDeviceShaderObjectPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderObjectPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderBinaryUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_shaderBinaryUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_shaderBinaryUUID.invokeExact(0L, elementIndex), index), ML_shaderBinaryUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `shaderBinaryUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_shaderBinaryUUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_shaderBinaryUUID(segment, 0L, elementIndex); } + /// {@return `shaderBinaryUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment shaderBinaryUUIDAt(long index, long elementIndex) { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_shaderBinaryUUID(this.segment(), index, elementIndex); } + /// {@return `shaderBinaryUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment shaderBinaryUUID(long elementIndex) { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_shaderBinaryUUID(this.segment(), elementIndex); } + /// Sets `shaderBinaryUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_shaderBinaryUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_shaderBinaryUUID.invokeExact(0L, elementIndex), index), ML_shaderBinaryUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `shaderBinaryUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_shaderBinaryUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_shaderBinaryUUID(segment, 0L, elementIndex, value); } + /// Sets `shaderBinaryUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectPropertiesEXT shaderBinaryUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_shaderBinaryUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `shaderBinaryUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectPropertiesEXT shaderBinaryUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_shaderBinaryUUID(this.segment(), elementIndex, value); return this; } + + /// {@return `shaderBinaryVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderBinaryVersion(MemorySegment segment, long index) { return (int) VH_shaderBinaryVersion.get(segment, 0L, index); } + /// {@return `shaderBinaryVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderBinaryVersion(MemorySegment segment) { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_shaderBinaryVersion(segment, 0L); } + /// {@return `shaderBinaryVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderBinaryVersionAt(long index) { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_shaderBinaryVersion(this.segment(), index); } + /// {@return `shaderBinaryVersion`} + public @CType("uint32_t") int shaderBinaryVersion() { return VkPhysicalDeviceShaderObjectPropertiesEXT.get_shaderBinaryVersion(this.segment()); } + /// Sets `shaderBinaryVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBinaryVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderBinaryVersion.set(segment, 0L, index, value); } + /// Sets `shaderBinaryVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBinaryVersion(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_shaderBinaryVersion(segment, 0L, value); } + /// Sets `shaderBinaryVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectPropertiesEXT shaderBinaryVersionAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_shaderBinaryVersion(this.segment(), index, value); return this; } + /// Sets `shaderBinaryVersion` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderObjectPropertiesEXT shaderBinaryVersion(@CType("uint32_t") int value) { VkPhysicalDeviceShaderObjectPropertiesEXT.set_shaderBinaryVersion(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.java new file mode 100644 index 00000000..eaca86d7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderReplicatedComposites +/// [VarHandle][#VH_shaderReplicatedComposites] - [Getter][#shaderReplicatedComposites()] - [Setter][#shaderReplicatedComposites(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderReplicatedComposites; +/// } VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderReplicatedComposites") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderReplicatedComposites` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderReplicatedComposites = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderReplicatedComposites")); + + /// Creates `VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT` + public static VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT` + public static VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderReplicatedComposites` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderReplicatedComposites(MemorySegment segment, long index) { return (int) VH_shaderReplicatedComposites.get(segment, 0L, index); } + /// {@return `shaderReplicatedComposites`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderReplicatedComposites(MemorySegment segment) { return VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.get_shaderReplicatedComposites(segment, 0L); } + /// {@return `shaderReplicatedComposites` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderReplicatedCompositesAt(long index) { return VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.get_shaderReplicatedComposites(this.segment(), index); } + /// {@return `shaderReplicatedComposites`} + public @CType("VkBool32") int shaderReplicatedComposites() { return VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.get_shaderReplicatedComposites(this.segment()); } + /// Sets `shaderReplicatedComposites` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderReplicatedComposites(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderReplicatedComposites.set(segment, 0L, index, value); } + /// Sets `shaderReplicatedComposites` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderReplicatedComposites(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.set_shaderReplicatedComposites(segment, 0L, value); } + /// Sets `shaderReplicatedComposites` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT shaderReplicatedCompositesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.set_shaderReplicatedComposites(this.segment(), index, value); return this; } + /// Sets `shaderReplicatedComposites` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT shaderReplicatedComposites(@CType("VkBool32") int value) { VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.set_shaderReplicatedComposites(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderTileImageFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderTileImageFeaturesEXT.java new file mode 100644 index 00000000..3112cbec --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderTileImageFeaturesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderTileImageColorReadAccess +/// [VarHandle][#VH_shaderTileImageColorReadAccess] - [Getter][#shaderTileImageColorReadAccess()] - [Setter][#shaderTileImageColorReadAccess(int)] +/// ### shaderTileImageDepthReadAccess +/// [VarHandle][#VH_shaderTileImageDepthReadAccess] - [Getter][#shaderTileImageDepthReadAccess()] - [Setter][#shaderTileImageDepthReadAccess(int)] +/// ### shaderTileImageStencilReadAccess +/// [VarHandle][#VH_shaderTileImageStencilReadAccess] - [Getter][#shaderTileImageStencilReadAccess()] - [Setter][#shaderTileImageStencilReadAccess(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderTileImageFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderTileImageColorReadAccess; +/// VkBool32 shaderTileImageDepthReadAccess; +/// VkBool32 shaderTileImageStencilReadAccess; +/// } VkPhysicalDeviceShaderTileImageFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceShaderTileImageFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderTileImageFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderTileImageColorReadAccess"), + ValueLayout.JAVA_INT.withName("shaderTileImageDepthReadAccess"), + ValueLayout.JAVA_INT.withName("shaderTileImageStencilReadAccess") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderTileImageColorReadAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderTileImageColorReadAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderTileImageColorReadAccess")); + /// The [VarHandle] of `shaderTileImageDepthReadAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderTileImageDepthReadAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderTileImageDepthReadAccess")); + /// The [VarHandle] of `shaderTileImageStencilReadAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderTileImageStencilReadAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderTileImageStencilReadAccess")); + + /// Creates `VkPhysicalDeviceShaderTileImageFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderTileImageFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderTileImageFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderTileImageFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderTileImageFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceShaderTileImageFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderTileImageFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderTileImageFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderTileImageFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderTileImageFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderTileImageFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderTileImageFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderTileImageFeaturesEXT` + public static VkPhysicalDeviceShaderTileImageFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderTileImageFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderTileImageFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderTileImageFeaturesEXT` + public static VkPhysicalDeviceShaderTileImageFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderTileImageFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImageFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImageFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImageFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImageFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderTileImageColorReadAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderTileImageColorReadAccess(MemorySegment segment, long index) { return (int) VH_shaderTileImageColorReadAccess.get(segment, 0L, index); } + /// {@return `shaderTileImageColorReadAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderTileImageColorReadAccess(MemorySegment segment) { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_shaderTileImageColorReadAccess(segment, 0L); } + /// {@return `shaderTileImageColorReadAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderTileImageColorReadAccessAt(long index) { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_shaderTileImageColorReadAccess(this.segment(), index); } + /// {@return `shaderTileImageColorReadAccess`} + public @CType("VkBool32") int shaderTileImageColorReadAccess() { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_shaderTileImageColorReadAccess(this.segment()); } + /// Sets `shaderTileImageColorReadAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderTileImageColorReadAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderTileImageColorReadAccess.set(segment, 0L, index, value); } + /// Sets `shaderTileImageColorReadAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderTileImageColorReadAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_shaderTileImageColorReadAccess(segment, 0L, value); } + /// Sets `shaderTileImageColorReadAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImageFeaturesEXT shaderTileImageColorReadAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_shaderTileImageColorReadAccess(this.segment(), index, value); return this; } + /// Sets `shaderTileImageColorReadAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImageFeaturesEXT shaderTileImageColorReadAccess(@CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_shaderTileImageColorReadAccess(this.segment(), value); return this; } + + /// {@return `shaderTileImageDepthReadAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderTileImageDepthReadAccess(MemorySegment segment, long index) { return (int) VH_shaderTileImageDepthReadAccess.get(segment, 0L, index); } + /// {@return `shaderTileImageDepthReadAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderTileImageDepthReadAccess(MemorySegment segment) { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_shaderTileImageDepthReadAccess(segment, 0L); } + /// {@return `shaderTileImageDepthReadAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderTileImageDepthReadAccessAt(long index) { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_shaderTileImageDepthReadAccess(this.segment(), index); } + /// {@return `shaderTileImageDepthReadAccess`} + public @CType("VkBool32") int shaderTileImageDepthReadAccess() { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_shaderTileImageDepthReadAccess(this.segment()); } + /// Sets `shaderTileImageDepthReadAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderTileImageDepthReadAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderTileImageDepthReadAccess.set(segment, 0L, index, value); } + /// Sets `shaderTileImageDepthReadAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderTileImageDepthReadAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_shaderTileImageDepthReadAccess(segment, 0L, value); } + /// Sets `shaderTileImageDepthReadAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImageFeaturesEXT shaderTileImageDepthReadAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_shaderTileImageDepthReadAccess(this.segment(), index, value); return this; } + /// Sets `shaderTileImageDepthReadAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImageFeaturesEXT shaderTileImageDepthReadAccess(@CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_shaderTileImageDepthReadAccess(this.segment(), value); return this; } + + /// {@return `shaderTileImageStencilReadAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderTileImageStencilReadAccess(MemorySegment segment, long index) { return (int) VH_shaderTileImageStencilReadAccess.get(segment, 0L, index); } + /// {@return `shaderTileImageStencilReadAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderTileImageStencilReadAccess(MemorySegment segment) { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_shaderTileImageStencilReadAccess(segment, 0L); } + /// {@return `shaderTileImageStencilReadAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderTileImageStencilReadAccessAt(long index) { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_shaderTileImageStencilReadAccess(this.segment(), index); } + /// {@return `shaderTileImageStencilReadAccess`} + public @CType("VkBool32") int shaderTileImageStencilReadAccess() { return VkPhysicalDeviceShaderTileImageFeaturesEXT.get_shaderTileImageStencilReadAccess(this.segment()); } + /// Sets `shaderTileImageStencilReadAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderTileImageStencilReadAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderTileImageStencilReadAccess.set(segment, 0L, index, value); } + /// Sets `shaderTileImageStencilReadAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderTileImageStencilReadAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_shaderTileImageStencilReadAccess(segment, 0L, value); } + /// Sets `shaderTileImageStencilReadAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImageFeaturesEXT shaderTileImageStencilReadAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_shaderTileImageStencilReadAccess(this.segment(), index, value); return this; } + /// Sets `shaderTileImageStencilReadAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImageFeaturesEXT shaderTileImageStencilReadAccess(@CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImageFeaturesEXT.set_shaderTileImageStencilReadAccess(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderTileImagePropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderTileImagePropertiesEXT.java new file mode 100644 index 00000000..a7d843aa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceShaderTileImagePropertiesEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderTileImageCoherentReadAccelerated +/// [VarHandle][#VH_shaderTileImageCoherentReadAccelerated] - [Getter][#shaderTileImageCoherentReadAccelerated()] - [Setter][#shaderTileImageCoherentReadAccelerated(int)] +/// ### shaderTileImageReadSampleFromPixelRateInvocation +/// [VarHandle][#VH_shaderTileImageReadSampleFromPixelRateInvocation] - [Getter][#shaderTileImageReadSampleFromPixelRateInvocation()] - [Setter][#shaderTileImageReadSampleFromPixelRateInvocation(int)] +/// ### shaderTileImageReadFromHelperInvocation +/// [VarHandle][#VH_shaderTileImageReadFromHelperInvocation] - [Getter][#shaderTileImageReadFromHelperInvocation()] - [Setter][#shaderTileImageReadFromHelperInvocation(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderTileImagePropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderTileImageCoherentReadAccelerated; +/// VkBool32 shaderTileImageReadSampleFromPixelRateInvocation; +/// VkBool32 shaderTileImageReadFromHelperInvocation; +/// } VkPhysicalDeviceShaderTileImagePropertiesEXT; +/// ``` +public final class VkPhysicalDeviceShaderTileImagePropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderTileImagePropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderTileImageCoherentReadAccelerated"), + ValueLayout.JAVA_INT.withName("shaderTileImageReadSampleFromPixelRateInvocation"), + ValueLayout.JAVA_INT.withName("shaderTileImageReadFromHelperInvocation") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderTileImageCoherentReadAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderTileImageCoherentReadAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderTileImageCoherentReadAccelerated")); + /// The [VarHandle] of `shaderTileImageReadSampleFromPixelRateInvocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderTileImageReadSampleFromPixelRateInvocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderTileImageReadSampleFromPixelRateInvocation")); + /// The [VarHandle] of `shaderTileImageReadFromHelperInvocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderTileImageReadFromHelperInvocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderTileImageReadFromHelperInvocation")); + + /// Creates `VkPhysicalDeviceShaderTileImagePropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderTileImagePropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderTileImagePropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderTileImagePropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderTileImagePropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceShaderTileImagePropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderTileImagePropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderTileImagePropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderTileImagePropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderTileImagePropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderTileImagePropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderTileImagePropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderTileImagePropertiesEXT` + public static VkPhysicalDeviceShaderTileImagePropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderTileImagePropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderTileImagePropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderTileImagePropertiesEXT` + public static VkPhysicalDeviceShaderTileImagePropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderTileImagePropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImagePropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImagePropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImagePropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImagePropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderTileImageCoherentReadAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderTileImageCoherentReadAccelerated(MemorySegment segment, long index) { return (int) VH_shaderTileImageCoherentReadAccelerated.get(segment, 0L, index); } + /// {@return `shaderTileImageCoherentReadAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderTileImageCoherentReadAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_shaderTileImageCoherentReadAccelerated(segment, 0L); } + /// {@return `shaderTileImageCoherentReadAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderTileImageCoherentReadAcceleratedAt(long index) { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_shaderTileImageCoherentReadAccelerated(this.segment(), index); } + /// {@return `shaderTileImageCoherentReadAccelerated`} + public @CType("VkBool32") int shaderTileImageCoherentReadAccelerated() { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_shaderTileImageCoherentReadAccelerated(this.segment()); } + /// Sets `shaderTileImageCoherentReadAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderTileImageCoherentReadAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderTileImageCoherentReadAccelerated.set(segment, 0L, index, value); } + /// Sets `shaderTileImageCoherentReadAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderTileImageCoherentReadAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_shaderTileImageCoherentReadAccelerated(segment, 0L, value); } + /// Sets `shaderTileImageCoherentReadAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImagePropertiesEXT shaderTileImageCoherentReadAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_shaderTileImageCoherentReadAccelerated(this.segment(), index, value); return this; } + /// Sets `shaderTileImageCoherentReadAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImagePropertiesEXT shaderTileImageCoherentReadAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_shaderTileImageCoherentReadAccelerated(this.segment(), value); return this; } + + /// {@return `shaderTileImageReadSampleFromPixelRateInvocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderTileImageReadSampleFromPixelRateInvocation(MemorySegment segment, long index) { return (int) VH_shaderTileImageReadSampleFromPixelRateInvocation.get(segment, 0L, index); } + /// {@return `shaderTileImageReadSampleFromPixelRateInvocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderTileImageReadSampleFromPixelRateInvocation(MemorySegment segment) { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_shaderTileImageReadSampleFromPixelRateInvocation(segment, 0L); } + /// {@return `shaderTileImageReadSampleFromPixelRateInvocation` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderTileImageReadSampleFromPixelRateInvocationAt(long index) { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_shaderTileImageReadSampleFromPixelRateInvocation(this.segment(), index); } + /// {@return `shaderTileImageReadSampleFromPixelRateInvocation`} + public @CType("VkBool32") int shaderTileImageReadSampleFromPixelRateInvocation() { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_shaderTileImageReadSampleFromPixelRateInvocation(this.segment()); } + /// Sets `shaderTileImageReadSampleFromPixelRateInvocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderTileImageReadSampleFromPixelRateInvocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderTileImageReadSampleFromPixelRateInvocation.set(segment, 0L, index, value); } + /// Sets `shaderTileImageReadSampleFromPixelRateInvocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderTileImageReadSampleFromPixelRateInvocation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_shaderTileImageReadSampleFromPixelRateInvocation(segment, 0L, value); } + /// Sets `shaderTileImageReadSampleFromPixelRateInvocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImagePropertiesEXT shaderTileImageReadSampleFromPixelRateInvocationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_shaderTileImageReadSampleFromPixelRateInvocation(this.segment(), index, value); return this; } + /// Sets `shaderTileImageReadSampleFromPixelRateInvocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImagePropertiesEXT shaderTileImageReadSampleFromPixelRateInvocation(@CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_shaderTileImageReadSampleFromPixelRateInvocation(this.segment(), value); return this; } + + /// {@return `shaderTileImageReadFromHelperInvocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderTileImageReadFromHelperInvocation(MemorySegment segment, long index) { return (int) VH_shaderTileImageReadFromHelperInvocation.get(segment, 0L, index); } + /// {@return `shaderTileImageReadFromHelperInvocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderTileImageReadFromHelperInvocation(MemorySegment segment) { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_shaderTileImageReadFromHelperInvocation(segment, 0L); } + /// {@return `shaderTileImageReadFromHelperInvocation` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderTileImageReadFromHelperInvocationAt(long index) { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_shaderTileImageReadFromHelperInvocation(this.segment(), index); } + /// {@return `shaderTileImageReadFromHelperInvocation`} + public @CType("VkBool32") int shaderTileImageReadFromHelperInvocation() { return VkPhysicalDeviceShaderTileImagePropertiesEXT.get_shaderTileImageReadFromHelperInvocation(this.segment()); } + /// Sets `shaderTileImageReadFromHelperInvocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderTileImageReadFromHelperInvocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderTileImageReadFromHelperInvocation.set(segment, 0L, index, value); } + /// Sets `shaderTileImageReadFromHelperInvocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderTileImageReadFromHelperInvocation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_shaderTileImageReadFromHelperInvocation(segment, 0L, value); } + /// Sets `shaderTileImageReadFromHelperInvocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImagePropertiesEXT shaderTileImageReadFromHelperInvocationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_shaderTileImageReadFromHelperInvocation(this.segment(), index, value); return this; } + /// Sets `shaderTileImageReadFromHelperInvocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTileImagePropertiesEXT shaderTileImageReadFromHelperInvocation(@CType("VkBool32") int value) { VkPhysicalDeviceShaderTileImagePropertiesEXT.set_shaderTileImageReadFromHelperInvocation(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.java new file mode 100644 index 00000000..1f890166 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### subpassMergeFeedback +/// [VarHandle][#VH_subpassMergeFeedback] - [Getter][#subpassMergeFeedback()] - [Setter][#subpassMergeFeedback(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 subpassMergeFeedback; +/// } VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("subpassMergeFeedback") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `subpassMergeFeedback` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpassMergeFeedback = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpassMergeFeedback")); + + /// Creates `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT` + public static VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT` + public static VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `subpassMergeFeedback` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_subpassMergeFeedback(MemorySegment segment, long index) { return (int) VH_subpassMergeFeedback.get(segment, 0L, index); } + /// {@return `subpassMergeFeedback`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_subpassMergeFeedback(MemorySegment segment) { return VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.get_subpassMergeFeedback(segment, 0L); } + /// {@return `subpassMergeFeedback` at the given index} + /// @param index the index + public @CType("VkBool32") int subpassMergeFeedbackAt(long index) { return VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.get_subpassMergeFeedback(this.segment(), index); } + /// {@return `subpassMergeFeedback`} + public @CType("VkBool32") int subpassMergeFeedback() { return VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.get_subpassMergeFeedback(this.segment()); } + /// Sets `subpassMergeFeedback` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpassMergeFeedback(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_subpassMergeFeedback.set(segment, 0L, index, value); } + /// Sets `subpassMergeFeedback` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpassMergeFeedback(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.set_subpassMergeFeedback(segment, 0L, value); } + /// Sets `subpassMergeFeedback` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT subpassMergeFeedbackAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.set_subpassMergeFeedback(this.segment(), index, value); return this; } + /// Sets `subpassMergeFeedback` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT subpassMergeFeedback(@CType("VkBool32") int value) { VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.set_subpassMergeFeedback(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.java new file mode 100644 index 00000000..1d4f0599 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchainMaintenance1 +/// [VarHandle][#VH_swapchainMaintenance1] - [Getter][#swapchainMaintenance1()] - [Setter][#swapchainMaintenance1(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 swapchainMaintenance1; +/// } VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT; +/// ``` +public final class VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("swapchainMaintenance1") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchainMaintenance1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_swapchainMaintenance1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchainMaintenance1")); + + /// Creates `VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT` + public static VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT` + public static VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchainMaintenance1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_swapchainMaintenance1(MemorySegment segment, long index) { return (int) VH_swapchainMaintenance1.get(segment, 0L, index); } + /// {@return `swapchainMaintenance1`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_swapchainMaintenance1(MemorySegment segment) { return VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.get_swapchainMaintenance1(segment, 0L); } + /// {@return `swapchainMaintenance1` at the given index} + /// @param index the index + public @CType("VkBool32") int swapchainMaintenance1At(long index) { return VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.get_swapchainMaintenance1(this.segment(), index); } + /// {@return `swapchainMaintenance1`} + public @CType("VkBool32") int swapchainMaintenance1() { return VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.get_swapchainMaintenance1(this.segment()); } + /// Sets `swapchainMaintenance1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchainMaintenance1(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_swapchainMaintenance1.set(segment, 0L, index, value); } + /// Sets `swapchainMaintenance1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchainMaintenance1(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.set_swapchainMaintenance1(segment, 0L, value); } + /// Sets `swapchainMaintenance1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT swapchainMaintenance1At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.set_swapchainMaintenance1(this.segment(), index, value); return this; } + /// Sets `swapchainMaintenance1` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT swapchainMaintenance1(@CType("VkBool32") int value) { VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT.set_swapchainMaintenance1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.java new file mode 100644 index 00000000..628bc2c1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### texelBufferAlignment +/// [VarHandle][#VH_texelBufferAlignment] - [Getter][#texelBufferAlignment()] - [Setter][#texelBufferAlignment(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 texelBufferAlignment; +/// } VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("texelBufferAlignment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `texelBufferAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_texelBufferAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("texelBufferAlignment")); + + /// Creates `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT` + public static VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT` + public static VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `texelBufferAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_texelBufferAlignment(MemorySegment segment, long index) { return (int) VH_texelBufferAlignment.get(segment, 0L, index); } + /// {@return `texelBufferAlignment`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_texelBufferAlignment(MemorySegment segment) { return VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.get_texelBufferAlignment(segment, 0L); } + /// {@return `texelBufferAlignment` at the given index} + /// @param index the index + public @CType("VkBool32") int texelBufferAlignmentAt(long index) { return VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.get_texelBufferAlignment(this.segment(), index); } + /// {@return `texelBufferAlignment`} + public @CType("VkBool32") int texelBufferAlignment() { return VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.get_texelBufferAlignment(this.segment()); } + /// Sets `texelBufferAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_texelBufferAlignment(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_texelBufferAlignment.set(segment, 0L, index, value); } + /// Sets `texelBufferAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_texelBufferAlignment(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.set_texelBufferAlignment(segment, 0L, value); } + /// Sets `texelBufferAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT texelBufferAlignmentAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.set_texelBufferAlignment(this.segment(), index, value); return this; } + /// Sets `texelBufferAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT texelBufferAlignment(@CType("VkBool32") int value) { VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.set_texelBufferAlignment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceTransformFeedbackFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceTransformFeedbackFeaturesEXT.java new file mode 100644 index 00000000..6d7be16e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceTransformFeedbackFeaturesEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### transformFeedback +/// [VarHandle][#VH_transformFeedback] - [Getter][#transformFeedback()] - [Setter][#transformFeedback(int)] +/// ### geometryStreams +/// [VarHandle][#VH_geometryStreams] - [Getter][#geometryStreams()] - [Setter][#geometryStreams(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceTransformFeedbackFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 transformFeedback; +/// VkBool32 geometryStreams; +/// } VkPhysicalDeviceTransformFeedbackFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceTransformFeedbackFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceTransformFeedbackFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("transformFeedback"), + ValueLayout.JAVA_INT.withName("geometryStreams") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `transformFeedback` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transformFeedback = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformFeedback")); + /// The [VarHandle] of `geometryStreams` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_geometryStreams = LAYOUT.arrayElementVarHandle(PathElement.groupElement("geometryStreams")); + + /// Creates `VkPhysicalDeviceTransformFeedbackFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceTransformFeedbackFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceTransformFeedbackFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTransformFeedbackFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTransformFeedbackFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceTransformFeedbackFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTransformFeedbackFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTransformFeedbackFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceTransformFeedbackFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTransformFeedbackFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTransformFeedbackFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceTransformFeedbackFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceTransformFeedbackFeaturesEXT` + public static VkPhysicalDeviceTransformFeedbackFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceTransformFeedbackFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceTransformFeedbackFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceTransformFeedbackFeaturesEXT` + public static VkPhysicalDeviceTransformFeedbackFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceTransformFeedbackFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `transformFeedback` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_transformFeedback(MemorySegment segment, long index) { return (int) VH_transformFeedback.get(segment, 0L, index); } + /// {@return `transformFeedback`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_transformFeedback(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_transformFeedback(segment, 0L); } + /// {@return `transformFeedback` at the given index} + /// @param index the index + public @CType("VkBool32") int transformFeedbackAt(long index) { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_transformFeedback(this.segment(), index); } + /// {@return `transformFeedback`} + public @CType("VkBool32") int transformFeedback() { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_transformFeedback(this.segment()); } + /// Sets `transformFeedback` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformFeedback(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_transformFeedback.set(segment, 0L, index, value); } + /// Sets `transformFeedback` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformFeedback(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_transformFeedback(segment, 0L, value); } + /// Sets `transformFeedback` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackFeaturesEXT transformFeedbackAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_transformFeedback(this.segment(), index, value); return this; } + /// Sets `transformFeedback` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackFeaturesEXT transformFeedback(@CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_transformFeedback(this.segment(), value); return this; } + + /// {@return `geometryStreams` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_geometryStreams(MemorySegment segment, long index) { return (int) VH_geometryStreams.get(segment, 0L, index); } + /// {@return `geometryStreams`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_geometryStreams(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_geometryStreams(segment, 0L); } + /// {@return `geometryStreams` at the given index} + /// @param index the index + public @CType("VkBool32") int geometryStreamsAt(long index) { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_geometryStreams(this.segment(), index); } + /// {@return `geometryStreams`} + public @CType("VkBool32") int geometryStreams() { return VkPhysicalDeviceTransformFeedbackFeaturesEXT.get_geometryStreams(this.segment()); } + /// Sets `geometryStreams` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_geometryStreams(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_geometryStreams.set(segment, 0L, index, value); } + /// Sets `geometryStreams` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_geometryStreams(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_geometryStreams(segment, 0L, value); } + /// Sets `geometryStreams` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackFeaturesEXT geometryStreamsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_geometryStreams(this.segment(), index, value); return this; } + /// Sets `geometryStreams` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackFeaturesEXT geometryStreams(@CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackFeaturesEXT.set_geometryStreams(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceTransformFeedbackPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceTransformFeedbackPropertiesEXT.java new file mode 100644 index 00000000..1eff88f7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceTransformFeedbackPropertiesEXT.java @@ -0,0 +1,518 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxTransformFeedbackStreams +/// [VarHandle][#VH_maxTransformFeedbackStreams] - [Getter][#maxTransformFeedbackStreams()] - [Setter][#maxTransformFeedbackStreams(int)] +/// ### maxTransformFeedbackBuffers +/// [VarHandle][#VH_maxTransformFeedbackBuffers] - [Getter][#maxTransformFeedbackBuffers()] - [Setter][#maxTransformFeedbackBuffers(int)] +/// ### maxTransformFeedbackBufferSize +/// [VarHandle][#VH_maxTransformFeedbackBufferSize] - [Getter][#maxTransformFeedbackBufferSize()] - [Setter][#maxTransformFeedbackBufferSize(long)] +/// ### maxTransformFeedbackStreamDataSize +/// [VarHandle][#VH_maxTransformFeedbackStreamDataSize] - [Getter][#maxTransformFeedbackStreamDataSize()] - [Setter][#maxTransformFeedbackStreamDataSize(int)] +/// ### maxTransformFeedbackBufferDataSize +/// [VarHandle][#VH_maxTransformFeedbackBufferDataSize] - [Getter][#maxTransformFeedbackBufferDataSize()] - [Setter][#maxTransformFeedbackBufferDataSize(int)] +/// ### maxTransformFeedbackBufferDataStride +/// [VarHandle][#VH_maxTransformFeedbackBufferDataStride] - [Getter][#maxTransformFeedbackBufferDataStride()] - [Setter][#maxTransformFeedbackBufferDataStride(int)] +/// ### transformFeedbackQueries +/// [VarHandle][#VH_transformFeedbackQueries] - [Getter][#transformFeedbackQueries()] - [Setter][#transformFeedbackQueries(int)] +/// ### transformFeedbackStreamsLinesTriangles +/// [VarHandle][#VH_transformFeedbackStreamsLinesTriangles] - [Getter][#transformFeedbackStreamsLinesTriangles()] - [Setter][#transformFeedbackStreamsLinesTriangles(int)] +/// ### transformFeedbackRasterizationStreamSelect +/// [VarHandle][#VH_transformFeedbackRasterizationStreamSelect] - [Getter][#transformFeedbackRasterizationStreamSelect()] - [Setter][#transformFeedbackRasterizationStreamSelect(int)] +/// ### transformFeedbackDraw +/// [VarHandle][#VH_transformFeedbackDraw] - [Getter][#transformFeedbackDraw()] - [Setter][#transformFeedbackDraw(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceTransformFeedbackPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxTransformFeedbackStreams; +/// uint32_t maxTransformFeedbackBuffers; +/// VkDeviceSize maxTransformFeedbackBufferSize; +/// uint32_t maxTransformFeedbackStreamDataSize; +/// uint32_t maxTransformFeedbackBufferDataSize; +/// uint32_t maxTransformFeedbackBufferDataStride; +/// VkBool32 transformFeedbackQueries; +/// VkBool32 transformFeedbackStreamsLinesTriangles; +/// VkBool32 transformFeedbackRasterizationStreamSelect; +/// VkBool32 transformFeedbackDraw; +/// } VkPhysicalDeviceTransformFeedbackPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceTransformFeedbackPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceTransformFeedbackPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxTransformFeedbackStreams"), + ValueLayout.JAVA_INT.withName("maxTransformFeedbackBuffers"), + ValueLayout.JAVA_LONG.withName("maxTransformFeedbackBufferSize"), + ValueLayout.JAVA_INT.withName("maxTransformFeedbackStreamDataSize"), + ValueLayout.JAVA_INT.withName("maxTransformFeedbackBufferDataSize"), + ValueLayout.JAVA_INT.withName("maxTransformFeedbackBufferDataStride"), + ValueLayout.JAVA_INT.withName("transformFeedbackQueries"), + ValueLayout.JAVA_INT.withName("transformFeedbackStreamsLinesTriangles"), + ValueLayout.JAVA_INT.withName("transformFeedbackRasterizationStreamSelect"), + ValueLayout.JAVA_INT.withName("transformFeedbackDraw") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxTransformFeedbackStreams` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTransformFeedbackStreams = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTransformFeedbackStreams")); + /// The [VarHandle] of `maxTransformFeedbackBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTransformFeedbackBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTransformFeedbackBuffers")); + /// The [VarHandle] of `maxTransformFeedbackBufferSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxTransformFeedbackBufferSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTransformFeedbackBufferSize")); + /// The [VarHandle] of `maxTransformFeedbackStreamDataSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTransformFeedbackStreamDataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTransformFeedbackStreamDataSize")); + /// The [VarHandle] of `maxTransformFeedbackBufferDataSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTransformFeedbackBufferDataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTransformFeedbackBufferDataSize")); + /// The [VarHandle] of `maxTransformFeedbackBufferDataStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTransformFeedbackBufferDataStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTransformFeedbackBufferDataStride")); + /// The [VarHandle] of `transformFeedbackQueries` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transformFeedbackQueries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformFeedbackQueries")); + /// The [VarHandle] of `transformFeedbackStreamsLinesTriangles` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transformFeedbackStreamsLinesTriangles = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformFeedbackStreamsLinesTriangles")); + /// The [VarHandle] of `transformFeedbackRasterizationStreamSelect` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transformFeedbackRasterizationStreamSelect = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformFeedbackRasterizationStreamSelect")); + /// The [VarHandle] of `transformFeedbackDraw` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transformFeedbackDraw = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformFeedbackDraw")); + + /// Creates `VkPhysicalDeviceTransformFeedbackPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceTransformFeedbackPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceTransformFeedbackPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTransformFeedbackPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTransformFeedbackPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceTransformFeedbackPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTransformFeedbackPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTransformFeedbackPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceTransformFeedbackPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTransformFeedbackPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTransformFeedbackPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceTransformFeedbackPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceTransformFeedbackPropertiesEXT` + public static VkPhysicalDeviceTransformFeedbackPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceTransformFeedbackPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceTransformFeedbackPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceTransformFeedbackPropertiesEXT` + public static VkPhysicalDeviceTransformFeedbackPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceTransformFeedbackPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `maxTransformFeedbackStreams` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTransformFeedbackStreams(MemorySegment segment, long index) { return (int) VH_maxTransformFeedbackStreams.get(segment, 0L, index); } + /// {@return `maxTransformFeedbackStreams`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTransformFeedbackStreams(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackStreams(segment, 0L); } + /// {@return `maxTransformFeedbackStreams` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTransformFeedbackStreamsAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackStreams(this.segment(), index); } + /// {@return `maxTransformFeedbackStreams`} + public @CType("uint32_t") int maxTransformFeedbackStreams() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackStreams(this.segment()); } + /// Sets `maxTransformFeedbackStreams` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTransformFeedbackStreams(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTransformFeedbackStreams.set(segment, 0L, index, value); } + /// Sets `maxTransformFeedbackStreams` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTransformFeedbackStreams(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackStreams(segment, 0L, value); } + /// Sets `maxTransformFeedbackStreams` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackStreamsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackStreams(this.segment(), index, value); return this; } + /// Sets `maxTransformFeedbackStreams` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackStreams(@CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackStreams(this.segment(), value); return this; } + + /// {@return `maxTransformFeedbackBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTransformFeedbackBuffers(MemorySegment segment, long index) { return (int) VH_maxTransformFeedbackBuffers.get(segment, 0L, index); } + /// {@return `maxTransformFeedbackBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTransformFeedbackBuffers(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBuffers(segment, 0L); } + /// {@return `maxTransformFeedbackBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTransformFeedbackBuffersAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBuffers(this.segment(), index); } + /// {@return `maxTransformFeedbackBuffers`} + public @CType("uint32_t") int maxTransformFeedbackBuffers() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBuffers(this.segment()); } + /// Sets `maxTransformFeedbackBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTransformFeedbackBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTransformFeedbackBuffers.set(segment, 0L, index, value); } + /// Sets `maxTransformFeedbackBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTransformFeedbackBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBuffers(segment, 0L, value); } + /// Sets `maxTransformFeedbackBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBuffers(this.segment(), index, value); return this; } + /// Sets `maxTransformFeedbackBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBuffers(this.segment(), value); return this; } + + /// {@return `maxTransformFeedbackBufferSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_maxTransformFeedbackBufferSize(MemorySegment segment, long index) { return (long) VH_maxTransformFeedbackBufferSize.get(segment, 0L, index); } + /// {@return `maxTransformFeedbackBufferSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_maxTransformFeedbackBufferSize(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBufferSize(segment, 0L); } + /// {@return `maxTransformFeedbackBufferSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long maxTransformFeedbackBufferSizeAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBufferSize(this.segment(), index); } + /// {@return `maxTransformFeedbackBufferSize`} + public @CType("VkDeviceSize") long maxTransformFeedbackBufferSize() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBufferSize(this.segment()); } + /// Sets `maxTransformFeedbackBufferSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTransformFeedbackBufferSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_maxTransformFeedbackBufferSize.set(segment, 0L, index, value); } + /// Sets `maxTransformFeedbackBufferSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTransformFeedbackBufferSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBufferSize(segment, 0L, value); } + /// Sets `maxTransformFeedbackBufferSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackBufferSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBufferSize(this.segment(), index, value); return this; } + /// Sets `maxTransformFeedbackBufferSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackBufferSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBufferSize(this.segment(), value); return this; } + + /// {@return `maxTransformFeedbackStreamDataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTransformFeedbackStreamDataSize(MemorySegment segment, long index) { return (int) VH_maxTransformFeedbackStreamDataSize.get(segment, 0L, index); } + /// {@return `maxTransformFeedbackStreamDataSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTransformFeedbackStreamDataSize(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackStreamDataSize(segment, 0L); } + /// {@return `maxTransformFeedbackStreamDataSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTransformFeedbackStreamDataSizeAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackStreamDataSize(this.segment(), index); } + /// {@return `maxTransformFeedbackStreamDataSize`} + public @CType("uint32_t") int maxTransformFeedbackStreamDataSize() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackStreamDataSize(this.segment()); } + /// Sets `maxTransformFeedbackStreamDataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTransformFeedbackStreamDataSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTransformFeedbackStreamDataSize.set(segment, 0L, index, value); } + /// Sets `maxTransformFeedbackStreamDataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTransformFeedbackStreamDataSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackStreamDataSize(segment, 0L, value); } + /// Sets `maxTransformFeedbackStreamDataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackStreamDataSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackStreamDataSize(this.segment(), index, value); return this; } + /// Sets `maxTransformFeedbackStreamDataSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackStreamDataSize(@CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackStreamDataSize(this.segment(), value); return this; } + + /// {@return `maxTransformFeedbackBufferDataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTransformFeedbackBufferDataSize(MemorySegment segment, long index) { return (int) VH_maxTransformFeedbackBufferDataSize.get(segment, 0L, index); } + /// {@return `maxTransformFeedbackBufferDataSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTransformFeedbackBufferDataSize(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBufferDataSize(segment, 0L); } + /// {@return `maxTransformFeedbackBufferDataSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTransformFeedbackBufferDataSizeAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBufferDataSize(this.segment(), index); } + /// {@return `maxTransformFeedbackBufferDataSize`} + public @CType("uint32_t") int maxTransformFeedbackBufferDataSize() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBufferDataSize(this.segment()); } + /// Sets `maxTransformFeedbackBufferDataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTransformFeedbackBufferDataSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTransformFeedbackBufferDataSize.set(segment, 0L, index, value); } + /// Sets `maxTransformFeedbackBufferDataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTransformFeedbackBufferDataSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBufferDataSize(segment, 0L, value); } + /// Sets `maxTransformFeedbackBufferDataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackBufferDataSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBufferDataSize(this.segment(), index, value); return this; } + /// Sets `maxTransformFeedbackBufferDataSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackBufferDataSize(@CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBufferDataSize(this.segment(), value); return this; } + + /// {@return `maxTransformFeedbackBufferDataStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTransformFeedbackBufferDataStride(MemorySegment segment, long index) { return (int) VH_maxTransformFeedbackBufferDataStride.get(segment, 0L, index); } + /// {@return `maxTransformFeedbackBufferDataStride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTransformFeedbackBufferDataStride(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBufferDataStride(segment, 0L); } + /// {@return `maxTransformFeedbackBufferDataStride` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTransformFeedbackBufferDataStrideAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBufferDataStride(this.segment(), index); } + /// {@return `maxTransformFeedbackBufferDataStride`} + public @CType("uint32_t") int maxTransformFeedbackBufferDataStride() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_maxTransformFeedbackBufferDataStride(this.segment()); } + /// Sets `maxTransformFeedbackBufferDataStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTransformFeedbackBufferDataStride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTransformFeedbackBufferDataStride.set(segment, 0L, index, value); } + /// Sets `maxTransformFeedbackBufferDataStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTransformFeedbackBufferDataStride(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBufferDataStride(segment, 0L, value); } + /// Sets `maxTransformFeedbackBufferDataStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackBufferDataStrideAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBufferDataStride(this.segment(), index, value); return this; } + /// Sets `maxTransformFeedbackBufferDataStride` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT maxTransformFeedbackBufferDataStride(@CType("uint32_t") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_maxTransformFeedbackBufferDataStride(this.segment(), value); return this; } + + /// {@return `transformFeedbackQueries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_transformFeedbackQueries(MemorySegment segment, long index) { return (int) VH_transformFeedbackQueries.get(segment, 0L, index); } + /// {@return `transformFeedbackQueries`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_transformFeedbackQueries(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackQueries(segment, 0L); } + /// {@return `transformFeedbackQueries` at the given index} + /// @param index the index + public @CType("VkBool32") int transformFeedbackQueriesAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackQueries(this.segment(), index); } + /// {@return `transformFeedbackQueries`} + public @CType("VkBool32") int transformFeedbackQueries() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackQueries(this.segment()); } + /// Sets `transformFeedbackQueries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformFeedbackQueries(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_transformFeedbackQueries.set(segment, 0L, index, value); } + /// Sets `transformFeedbackQueries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformFeedbackQueries(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackQueries(segment, 0L, value); } + /// Sets `transformFeedbackQueries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT transformFeedbackQueriesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackQueries(this.segment(), index, value); return this; } + /// Sets `transformFeedbackQueries` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT transformFeedbackQueries(@CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackQueries(this.segment(), value); return this; } + + /// {@return `transformFeedbackStreamsLinesTriangles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_transformFeedbackStreamsLinesTriangles(MemorySegment segment, long index) { return (int) VH_transformFeedbackStreamsLinesTriangles.get(segment, 0L, index); } + /// {@return `transformFeedbackStreamsLinesTriangles`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_transformFeedbackStreamsLinesTriangles(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackStreamsLinesTriangles(segment, 0L); } + /// {@return `transformFeedbackStreamsLinesTriangles` at the given index} + /// @param index the index + public @CType("VkBool32") int transformFeedbackStreamsLinesTrianglesAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackStreamsLinesTriangles(this.segment(), index); } + /// {@return `transformFeedbackStreamsLinesTriangles`} + public @CType("VkBool32") int transformFeedbackStreamsLinesTriangles() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackStreamsLinesTriangles(this.segment()); } + /// Sets `transformFeedbackStreamsLinesTriangles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformFeedbackStreamsLinesTriangles(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_transformFeedbackStreamsLinesTriangles.set(segment, 0L, index, value); } + /// Sets `transformFeedbackStreamsLinesTriangles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformFeedbackStreamsLinesTriangles(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackStreamsLinesTriangles(segment, 0L, value); } + /// Sets `transformFeedbackStreamsLinesTriangles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT transformFeedbackStreamsLinesTrianglesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackStreamsLinesTriangles(this.segment(), index, value); return this; } + /// Sets `transformFeedbackStreamsLinesTriangles` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT transformFeedbackStreamsLinesTriangles(@CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackStreamsLinesTriangles(this.segment(), value); return this; } + + /// {@return `transformFeedbackRasterizationStreamSelect` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_transformFeedbackRasterizationStreamSelect(MemorySegment segment, long index) { return (int) VH_transformFeedbackRasterizationStreamSelect.get(segment, 0L, index); } + /// {@return `transformFeedbackRasterizationStreamSelect`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_transformFeedbackRasterizationStreamSelect(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackRasterizationStreamSelect(segment, 0L); } + /// {@return `transformFeedbackRasterizationStreamSelect` at the given index} + /// @param index the index + public @CType("VkBool32") int transformFeedbackRasterizationStreamSelectAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackRasterizationStreamSelect(this.segment(), index); } + /// {@return `transformFeedbackRasterizationStreamSelect`} + public @CType("VkBool32") int transformFeedbackRasterizationStreamSelect() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackRasterizationStreamSelect(this.segment()); } + /// Sets `transformFeedbackRasterizationStreamSelect` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformFeedbackRasterizationStreamSelect(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_transformFeedbackRasterizationStreamSelect.set(segment, 0L, index, value); } + /// Sets `transformFeedbackRasterizationStreamSelect` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformFeedbackRasterizationStreamSelect(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackRasterizationStreamSelect(segment, 0L, value); } + /// Sets `transformFeedbackRasterizationStreamSelect` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT transformFeedbackRasterizationStreamSelectAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackRasterizationStreamSelect(this.segment(), index, value); return this; } + /// Sets `transformFeedbackRasterizationStreamSelect` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT transformFeedbackRasterizationStreamSelect(@CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackRasterizationStreamSelect(this.segment(), value); return this; } + + /// {@return `transformFeedbackDraw` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_transformFeedbackDraw(MemorySegment segment, long index) { return (int) VH_transformFeedbackDraw.get(segment, 0L, index); } + /// {@return `transformFeedbackDraw`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_transformFeedbackDraw(MemorySegment segment) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackDraw(segment, 0L); } + /// {@return `transformFeedbackDraw` at the given index} + /// @param index the index + public @CType("VkBool32") int transformFeedbackDrawAt(long index) { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackDraw(this.segment(), index); } + /// {@return `transformFeedbackDraw`} + public @CType("VkBool32") int transformFeedbackDraw() { return VkPhysicalDeviceTransformFeedbackPropertiesEXT.get_transformFeedbackDraw(this.segment()); } + /// Sets `transformFeedbackDraw` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformFeedbackDraw(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_transformFeedbackDraw.set(segment, 0L, index, value); } + /// Sets `transformFeedbackDraw` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformFeedbackDraw(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackDraw(segment, 0L, value); } + /// Sets `transformFeedbackDraw` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT transformFeedbackDrawAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackDraw(this.segment(), index, value); return this; } + /// Sets `transformFeedbackDraw` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTransformFeedbackPropertiesEXT transformFeedbackDraw(@CType("VkBool32") int value) { VkPhysicalDeviceTransformFeedbackPropertiesEXT.set_transformFeedbackDraw(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.java new file mode 100644 index 00000000..dcb38203 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxVertexAttribDivisor +/// [VarHandle][#VH_maxVertexAttribDivisor] - [Getter][#maxVertexAttribDivisor()] - [Setter][#maxVertexAttribDivisor(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxVertexAttribDivisor; +/// } VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT; +/// ``` +public final class VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxVertexAttribDivisor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxVertexAttribDivisor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVertexAttribDivisor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVertexAttribDivisor")); + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(segment); } + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT` + public static VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT` + public static VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `maxVertexAttribDivisor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVertexAttribDivisor(MemorySegment segment, long index) { return (int) VH_maxVertexAttribDivisor.get(segment, 0L, index); } + /// {@return `maxVertexAttribDivisor`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVertexAttribDivisor(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.get_maxVertexAttribDivisor(segment, 0L); } + /// {@return `maxVertexAttribDivisor` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVertexAttribDivisorAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.get_maxVertexAttribDivisor(this.segment(), index); } + /// {@return `maxVertexAttribDivisor`} + public @CType("uint32_t") int maxVertexAttribDivisor() { return VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.get_maxVertexAttribDivisor(this.segment()); } + /// Sets `maxVertexAttribDivisor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVertexAttribDivisor(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVertexAttribDivisor.set(segment, 0L, index, value); } + /// Sets `maxVertexAttribDivisor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVertexAttribDivisor(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.set_maxVertexAttribDivisor(segment, 0L, value); } + /// Sets `maxVertexAttribDivisor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT maxVertexAttribDivisorAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.set_maxVertexAttribDivisor(this.segment(), index, value); return this; } + /// Sets `maxVertexAttribDivisor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT maxVertexAttribDivisor(@CType("uint32_t") int value) { VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.set_maxVertexAttribDivisor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.java new file mode 100644 index 00000000..cddd706c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### vertexAttributeRobustness +/// [VarHandle][#VH_vertexAttributeRobustness] - [Getter][#vertexAttributeRobustness()] - [Setter][#vertexAttributeRobustness(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 vertexAttributeRobustness; +/// } VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("vertexAttributeRobustness") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `vertexAttributeRobustness` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexAttributeRobustness = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexAttributeRobustness")); + + /// Creates `VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT` + public static VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT` + public static VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `vertexAttributeRobustness` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vertexAttributeRobustness(MemorySegment segment, long index) { return (int) VH_vertexAttributeRobustness.get(segment, 0L, index); } + /// {@return `vertexAttributeRobustness`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vertexAttributeRobustness(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.get_vertexAttributeRobustness(segment, 0L); } + /// {@return `vertexAttributeRobustness` at the given index} + /// @param index the index + public @CType("VkBool32") int vertexAttributeRobustnessAt(long index) { return VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.get_vertexAttributeRobustness(this.segment(), index); } + /// {@return `vertexAttributeRobustness`} + public @CType("VkBool32") int vertexAttributeRobustness() { return VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.get_vertexAttributeRobustness(this.segment()); } + /// Sets `vertexAttributeRobustness` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexAttributeRobustness(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vertexAttributeRobustness.set(segment, 0L, index, value); } + /// Sets `vertexAttributeRobustness` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexAttributeRobustness(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.set_vertexAttributeRobustness(segment, 0L, value); } + /// Sets `vertexAttributeRobustness` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT vertexAttributeRobustnessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.set_vertexAttributeRobustness(this.segment(), index, value); return this; } + /// Sets `vertexAttributeRobustness` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT vertexAttributeRobustness(@CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.set_vertexAttributeRobustness(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.java new file mode 100644 index 00000000..2db0e68d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### vertexInputDynamicState +/// [VarHandle][#VH_vertexInputDynamicState] - [Getter][#vertexInputDynamicState()] - [Setter][#vertexInputDynamicState(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 vertexInputDynamicState; +/// } VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("vertexInputDynamicState") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `vertexInputDynamicState` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexInputDynamicState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexInputDynamicState")); + + /// Creates `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT` + public static VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT` + public static VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `vertexInputDynamicState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vertexInputDynamicState(MemorySegment segment, long index) { return (int) VH_vertexInputDynamicState.get(segment, 0L, index); } + /// {@return `vertexInputDynamicState`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vertexInputDynamicState(MemorySegment segment) { return VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.get_vertexInputDynamicState(segment, 0L); } + /// {@return `vertexInputDynamicState` at the given index} + /// @param index the index + public @CType("VkBool32") int vertexInputDynamicStateAt(long index) { return VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.get_vertexInputDynamicState(this.segment(), index); } + /// {@return `vertexInputDynamicState`} + public @CType("VkBool32") int vertexInputDynamicState() { return VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.get_vertexInputDynamicState(this.segment()); } + /// Sets `vertexInputDynamicState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexInputDynamicState(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vertexInputDynamicState.set(segment, 0L, index, value); } + /// Sets `vertexInputDynamicState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexInputDynamicState(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.set_vertexInputDynamicState(segment, 0L, value); } + /// Sets `vertexInputDynamicState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT vertexInputDynamicStateAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.set_vertexInputDynamicState(this.segment(), index, value); return this; } + /// Sets `vertexInputDynamicState` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT vertexInputDynamicState(@CType("VkBool32") int value) { VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.set_vertexInputDynamicState(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.java new file mode 100644 index 00000000..e53c3b7f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### ycbcr2plane444Formats +/// [VarHandle][#VH_ycbcr2plane444Formats] - [Getter][#ycbcr2plane444Formats()] - [Setter][#ycbcr2plane444Formats(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 ycbcr2plane444Formats; +/// } VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("ycbcr2plane444Formats") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `ycbcr2plane444Formats` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ycbcr2plane444Formats = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ycbcr2plane444Formats")); + + /// Creates `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT` + public static VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT` + public static VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `ycbcr2plane444Formats` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_ycbcr2plane444Formats(MemorySegment segment, long index) { return (int) VH_ycbcr2plane444Formats.get(segment, 0L, index); } + /// {@return `ycbcr2plane444Formats`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_ycbcr2plane444Formats(MemorySegment segment) { return VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.get_ycbcr2plane444Formats(segment, 0L); } + /// {@return `ycbcr2plane444Formats` at the given index} + /// @param index the index + public @CType("VkBool32") int ycbcr2plane444FormatsAt(long index) { return VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.get_ycbcr2plane444Formats(this.segment(), index); } + /// {@return `ycbcr2plane444Formats`} + public @CType("VkBool32") int ycbcr2plane444Formats() { return VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.get_ycbcr2plane444Formats(this.segment()); } + /// Sets `ycbcr2plane444Formats` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ycbcr2plane444Formats(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_ycbcr2plane444Formats.set(segment, 0L, index, value); } + /// Sets `ycbcr2plane444Formats` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ycbcr2plane444Formats(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.set_ycbcr2plane444Formats(segment, 0L, value); } + /// Sets `ycbcr2plane444Formats` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT ycbcr2plane444FormatsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.set_ycbcr2plane444Formats(this.segment(), index, value); return this; } + /// Sets `ycbcr2plane444Formats` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT ycbcr2plane444Formats(@CType("VkBool32") int value) { VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.set_ycbcr2plane444Formats(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.java new file mode 100644 index 00000000..ebd6004d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### ycbcrImageArrays +/// [VarHandle][#VH_ycbcrImageArrays] - [Getter][#ycbcrImageArrays()] - [Setter][#ycbcrImageArrays(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceYcbcrImageArraysFeaturesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 ycbcrImageArrays; +/// } VkPhysicalDeviceYcbcrImageArraysFeaturesEXT; +/// ``` +public final class VkPhysicalDeviceYcbcrImageArraysFeaturesEXT extends Struct { + /// The struct layout of `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("ycbcrImageArrays") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `ycbcrImageArrays` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ycbcrImageArrays = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ycbcrImageArrays")); + + /// Creates `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceYcbcrImageArraysFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceYcbcrImageArraysFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceYcbcrImageArraysFeaturesEXT(segment); } + + /// Creates `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceYcbcrImageArraysFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceYcbcrImageArraysFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceYcbcrImageArraysFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceYcbcrImageArraysFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT` + public static VkPhysicalDeviceYcbcrImageArraysFeaturesEXT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceYcbcrImageArraysFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceYcbcrImageArraysFeaturesEXT` + public static VkPhysicalDeviceYcbcrImageArraysFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceYcbcrImageArraysFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrImageArraysFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrImageArraysFeaturesEXT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrImageArraysFeaturesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrImageArraysFeaturesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `ycbcrImageArrays` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_ycbcrImageArrays(MemorySegment segment, long index) { return (int) VH_ycbcrImageArrays.get(segment, 0L, index); } + /// {@return `ycbcrImageArrays`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_ycbcrImageArrays(MemorySegment segment) { return VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.get_ycbcrImageArrays(segment, 0L); } + /// {@return `ycbcrImageArrays` at the given index} + /// @param index the index + public @CType("VkBool32") int ycbcrImageArraysAt(long index) { return VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.get_ycbcrImageArrays(this.segment(), index); } + /// {@return `ycbcrImageArrays`} + public @CType("VkBool32") int ycbcrImageArrays() { return VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.get_ycbcrImageArrays(this.segment()); } + /// Sets `ycbcrImageArrays` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ycbcrImageArrays(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_ycbcrImageArrays.set(segment, 0L, index, value); } + /// Sets `ycbcrImageArrays` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ycbcrImageArrays(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.set_ycbcrImageArrays(segment, 0L, value); } + /// Sets `ycbcrImageArrays` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrImageArraysFeaturesEXT ycbcrImageArraysAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.set_ycbcrImageArrays(this.segment(), index, value); return this; } + /// Sets `ycbcrImageArrays` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrImageArraysFeaturesEXT ycbcrImageArrays(@CType("VkBool32") int value) { VkPhysicalDeviceYcbcrImageArraysFeaturesEXT.set_ycbcrImageArrays(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineColorBlendAdvancedStateCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineColorBlendAdvancedStateCreateInfoEXT.java new file mode 100644 index 00000000..0e54ad35 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineColorBlendAdvancedStateCreateInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcPremultiplied +/// [VarHandle][#VH_srcPremultiplied] - [Getter][#srcPremultiplied()] - [Setter][#srcPremultiplied(int)] +/// ### dstPremultiplied +/// [VarHandle][#VH_dstPremultiplied] - [Getter][#dstPremultiplied()] - [Setter][#dstPremultiplied(int)] +/// ### blendOverlap +/// [VarHandle][#VH_blendOverlap] - [Getter][#blendOverlap()] - [Setter][#blendOverlap(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineColorBlendAdvancedStateCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 srcPremultiplied; +/// VkBool32 dstPremultiplied; +/// VkBlendOverlapEXT blendOverlap; +/// } VkPipelineColorBlendAdvancedStateCreateInfoEXT; +/// ``` +public final class VkPipelineColorBlendAdvancedStateCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineColorBlendAdvancedStateCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("srcPremultiplied"), + ValueLayout.JAVA_INT.withName("dstPremultiplied"), + ValueLayout.JAVA_INT.withName("blendOverlap") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcPremultiplied` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcPremultiplied = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcPremultiplied")); + /// The [VarHandle] of `dstPremultiplied` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstPremultiplied = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstPremultiplied")); + /// The [VarHandle] of `blendOverlap` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blendOverlap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blendOverlap")); + + /// Creates `VkPipelineColorBlendAdvancedStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineColorBlendAdvancedStateCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineColorBlendAdvancedStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorBlendAdvancedStateCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorBlendAdvancedStateCreateInfoEXT(segment); } + + /// Creates `VkPipelineColorBlendAdvancedStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorBlendAdvancedStateCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorBlendAdvancedStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineColorBlendAdvancedStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorBlendAdvancedStateCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorBlendAdvancedStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineColorBlendAdvancedStateCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineColorBlendAdvancedStateCreateInfoEXT` + public static VkPipelineColorBlendAdvancedStateCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineColorBlendAdvancedStateCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineColorBlendAdvancedStateCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineColorBlendAdvancedStateCreateInfoEXT` + public static VkPipelineColorBlendAdvancedStateCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineColorBlendAdvancedStateCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAdvancedStateCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAdvancedStateCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAdvancedStateCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAdvancedStateCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `srcPremultiplied` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_srcPremultiplied(MemorySegment segment, long index) { return (int) VH_srcPremultiplied.get(segment, 0L, index); } + /// {@return `srcPremultiplied`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_srcPremultiplied(MemorySegment segment) { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_srcPremultiplied(segment, 0L); } + /// {@return `srcPremultiplied` at the given index} + /// @param index the index + public @CType("VkBool32") int srcPremultipliedAt(long index) { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_srcPremultiplied(this.segment(), index); } + /// {@return `srcPremultiplied`} + public @CType("VkBool32") int srcPremultiplied() { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_srcPremultiplied(this.segment()); } + /// Sets `srcPremultiplied` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcPremultiplied(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_srcPremultiplied.set(segment, 0L, index, value); } + /// Sets `srcPremultiplied` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcPremultiplied(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_srcPremultiplied(segment, 0L, value); } + /// Sets `srcPremultiplied` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAdvancedStateCreateInfoEXT srcPremultipliedAt(long index, @CType("VkBool32") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_srcPremultiplied(this.segment(), index, value); return this; } + /// Sets `srcPremultiplied` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAdvancedStateCreateInfoEXT srcPremultiplied(@CType("VkBool32") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_srcPremultiplied(this.segment(), value); return this; } + + /// {@return `dstPremultiplied` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dstPremultiplied(MemorySegment segment, long index) { return (int) VH_dstPremultiplied.get(segment, 0L, index); } + /// {@return `dstPremultiplied`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dstPremultiplied(MemorySegment segment) { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_dstPremultiplied(segment, 0L); } + /// {@return `dstPremultiplied` at the given index} + /// @param index the index + public @CType("VkBool32") int dstPremultipliedAt(long index) { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_dstPremultiplied(this.segment(), index); } + /// {@return `dstPremultiplied`} + public @CType("VkBool32") int dstPremultiplied() { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_dstPremultiplied(this.segment()); } + /// Sets `dstPremultiplied` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstPremultiplied(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dstPremultiplied.set(segment, 0L, index, value); } + /// Sets `dstPremultiplied` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstPremultiplied(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_dstPremultiplied(segment, 0L, value); } + /// Sets `dstPremultiplied` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAdvancedStateCreateInfoEXT dstPremultipliedAt(long index, @CType("VkBool32") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_dstPremultiplied(this.segment(), index, value); return this; } + /// Sets `dstPremultiplied` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAdvancedStateCreateInfoEXT dstPremultiplied(@CType("VkBool32") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_dstPremultiplied(this.segment(), value); return this; } + + /// {@return `blendOverlap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendOverlapEXT") int get_blendOverlap(MemorySegment segment, long index) { return (int) VH_blendOverlap.get(segment, 0L, index); } + /// {@return `blendOverlap`} + /// @param segment the segment of the struct + public static @CType("VkBlendOverlapEXT") int get_blendOverlap(MemorySegment segment) { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_blendOverlap(segment, 0L); } + /// {@return `blendOverlap` at the given index} + /// @param index the index + public @CType("VkBlendOverlapEXT") int blendOverlapAt(long index) { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_blendOverlap(this.segment(), index); } + /// {@return `blendOverlap`} + public @CType("VkBlendOverlapEXT") int blendOverlap() { return VkPipelineColorBlendAdvancedStateCreateInfoEXT.get_blendOverlap(this.segment()); } + /// Sets `blendOverlap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blendOverlap(MemorySegment segment, long index, @CType("VkBlendOverlapEXT") int value) { VH_blendOverlap.set(segment, 0L, index, value); } + /// Sets `blendOverlap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blendOverlap(MemorySegment segment, @CType("VkBlendOverlapEXT") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_blendOverlap(segment, 0L, value); } + /// Sets `blendOverlap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAdvancedStateCreateInfoEXT blendOverlapAt(long index, @CType("VkBlendOverlapEXT") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_blendOverlap(this.segment(), index, value); return this; } + /// Sets `blendOverlap` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAdvancedStateCreateInfoEXT blendOverlap(@CType("VkBlendOverlapEXT") int value) { VkPipelineColorBlendAdvancedStateCreateInfoEXT.set_blendOverlap(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineColorWriteCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineColorWriteCreateInfoEXT.java new file mode 100644 index 00000000..ee010d7a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineColorWriteCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### attachmentCount +/// [VarHandle][#VH_attachmentCount] - [Getter][#attachmentCount()] - [Setter][#attachmentCount(int)] +/// ### pColorWriteEnables +/// [VarHandle][#VH_pColorWriteEnables] - [Getter][#pColorWriteEnables()] - [Setter][#pColorWriteEnables(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineColorWriteCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t attachmentCount; +/// const VkBool32 * pColorWriteEnables; +/// } VkPipelineColorWriteCreateInfoEXT; +/// ``` +public final class VkPipelineColorWriteCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineColorWriteCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("attachmentCount"), + ValueLayout.ADDRESS.withName("pColorWriteEnables") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `attachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentCount")); + /// The [VarHandle] of `pColorWriteEnables` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorWriteEnables = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorWriteEnables")); + + /// Creates `VkPipelineColorWriteCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineColorWriteCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineColorWriteCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorWriteCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorWriteCreateInfoEXT(segment); } + + /// Creates `VkPipelineColorWriteCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorWriteCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorWriteCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineColorWriteCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorWriteCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorWriteCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineColorWriteCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineColorWriteCreateInfoEXT` + public static VkPipelineColorWriteCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineColorWriteCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineColorWriteCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineColorWriteCreateInfoEXT` + public static VkPipelineColorWriteCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineColorWriteCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineColorWriteCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineColorWriteCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineColorWriteCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineColorWriteCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorWriteCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineColorWriteCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorWriteCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineColorWriteCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineColorWriteCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineColorWriteCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineColorWriteCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineColorWriteCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorWriteCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineColorWriteCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorWriteCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineColorWriteCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `attachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment, long index) { return (int) VH_attachmentCount.get(segment, 0L, index); } + /// {@return `attachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment) { return VkPipelineColorWriteCreateInfoEXT.get_attachmentCount(segment, 0L); } + /// {@return `attachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentCountAt(long index) { return VkPipelineColorWriteCreateInfoEXT.get_attachmentCount(this.segment(), index); } + /// {@return `attachmentCount`} + public @CType("uint32_t") int attachmentCount() { return VkPipelineColorWriteCreateInfoEXT.get_attachmentCount(this.segment()); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachmentCount.set(segment, 0L, index, value); } + /// Sets `attachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineColorWriteCreateInfoEXT.set_attachmentCount(segment, 0L, value); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorWriteCreateInfoEXT attachmentCountAt(long index, @CType("uint32_t") int value) { VkPipelineColorWriteCreateInfoEXT.set_attachmentCount(this.segment(), index, value); return this; } + /// Sets `attachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorWriteCreateInfoEXT attachmentCount(@CType("uint32_t") int value) { VkPipelineColorWriteCreateInfoEXT.set_attachmentCount(this.segment(), value); return this; } + + /// {@return `pColorWriteEnables` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkBool32 *") java.lang.foreign.MemorySegment get_pColorWriteEnables(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorWriteEnables.get(segment, 0L, index); } + /// {@return `pColorWriteEnables`} + /// @param segment the segment of the struct + public static @CType("const VkBool32 *") java.lang.foreign.MemorySegment get_pColorWriteEnables(MemorySegment segment) { return VkPipelineColorWriteCreateInfoEXT.get_pColorWriteEnables(segment, 0L); } + /// {@return `pColorWriteEnables` at the given index} + /// @param index the index + public @CType("const VkBool32 *") java.lang.foreign.MemorySegment pColorWriteEnablesAt(long index) { return VkPipelineColorWriteCreateInfoEXT.get_pColorWriteEnables(this.segment(), index); } + /// {@return `pColorWriteEnables`} + public @CType("const VkBool32 *") java.lang.foreign.MemorySegment pColorWriteEnables() { return VkPipelineColorWriteCreateInfoEXT.get_pColorWriteEnables(this.segment()); } + /// Sets `pColorWriteEnables` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorWriteEnables(MemorySegment segment, long index, @CType("const VkBool32 *") java.lang.foreign.MemorySegment value) { VH_pColorWriteEnables.set(segment, 0L, index, value); } + /// Sets `pColorWriteEnables` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorWriteEnables(MemorySegment segment, @CType("const VkBool32 *") java.lang.foreign.MemorySegment value) { VkPipelineColorWriteCreateInfoEXT.set_pColorWriteEnables(segment, 0L, value); } + /// Sets `pColorWriteEnables` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorWriteCreateInfoEXT pColorWriteEnablesAt(long index, @CType("const VkBool32 *") java.lang.foreign.MemorySegment value) { VkPipelineColorWriteCreateInfoEXT.set_pColorWriteEnables(this.segment(), index, value); return this; } + /// Sets `pColorWriteEnables` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorWriteCreateInfoEXT pColorWriteEnables(@CType("const VkBool32 *") java.lang.foreign.MemorySegment value) { VkPipelineColorWriteCreateInfoEXT.set_pColorWriteEnables(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineDiscardRectangleStateCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineDiscardRectangleStateCreateInfoEXT.java new file mode 100644 index 00000000..8f2c1f8a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineDiscardRectangleStateCreateInfoEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### discardRectangleMode +/// [VarHandle][#VH_discardRectangleMode] - [Getter][#discardRectangleMode()] - [Setter][#discardRectangleMode(int)] +/// ### discardRectangleCount +/// [VarHandle][#VH_discardRectangleCount] - [Getter][#discardRectangleCount()] - [Setter][#discardRectangleCount(int)] +/// ### pDiscardRectangles +/// [VarHandle][#VH_pDiscardRectangles] - [Getter][#pDiscardRectangles()] - [Setter][#pDiscardRectangles(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineDiscardRectangleStateCreateFlagsEXT flags; +/// VkDiscardRectangleModeEXT discardRectangleMode; +/// uint32_t discardRectangleCount; +/// const VkRect2D * pDiscardRectangles; +/// } VkPipelineDiscardRectangleStateCreateInfoEXT; +/// ``` +public final class VkPipelineDiscardRectangleStateCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineDiscardRectangleStateCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("discardRectangleMode"), + ValueLayout.JAVA_INT.withName("discardRectangleCount"), + ValueLayout.ADDRESS.withName("pDiscardRectangles") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `discardRectangleMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_discardRectangleMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("discardRectangleMode")); + /// The [VarHandle] of `discardRectangleCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_discardRectangleCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("discardRectangleCount")); + /// The [VarHandle] of `pDiscardRectangles` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDiscardRectangles = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDiscardRectangles")); + + /// Creates `VkPipelineDiscardRectangleStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineDiscardRectangleStateCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineDiscardRectangleStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineDiscardRectangleStateCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineDiscardRectangleStateCreateInfoEXT(segment); } + + /// Creates `VkPipelineDiscardRectangleStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineDiscardRectangleStateCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineDiscardRectangleStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineDiscardRectangleStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineDiscardRectangleStateCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineDiscardRectangleStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineDiscardRectangleStateCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineDiscardRectangleStateCreateInfoEXT` + public static VkPipelineDiscardRectangleStateCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineDiscardRectangleStateCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineDiscardRectangleStateCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineDiscardRectangleStateCreateInfoEXT` + public static VkPipelineDiscardRectangleStateCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineDiscardRectangleStateCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineDiscardRectangleStateCreateFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineDiscardRectangleStateCreateFlagsEXT") int get_flags(MemorySegment segment) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineDiscardRectangleStateCreateFlagsEXT") int flagsAt(long index) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineDiscardRectangleStateCreateFlagsEXT") int flags() { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineDiscardRectangleStateCreateFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineDiscardRectangleStateCreateFlagsEXT") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT flagsAt(long index, @CType("VkPipelineDiscardRectangleStateCreateFlagsEXT") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT flags(@CType("VkPipelineDiscardRectangleStateCreateFlagsEXT") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `discardRectangleMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDiscardRectangleModeEXT") int get_discardRectangleMode(MemorySegment segment, long index) { return (int) VH_discardRectangleMode.get(segment, 0L, index); } + /// {@return `discardRectangleMode`} + /// @param segment the segment of the struct + public static @CType("VkDiscardRectangleModeEXT") int get_discardRectangleMode(MemorySegment segment) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_discardRectangleMode(segment, 0L); } + /// {@return `discardRectangleMode` at the given index} + /// @param index the index + public @CType("VkDiscardRectangleModeEXT") int discardRectangleModeAt(long index) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_discardRectangleMode(this.segment(), index); } + /// {@return `discardRectangleMode`} + public @CType("VkDiscardRectangleModeEXT") int discardRectangleMode() { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_discardRectangleMode(this.segment()); } + /// Sets `discardRectangleMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_discardRectangleMode(MemorySegment segment, long index, @CType("VkDiscardRectangleModeEXT") int value) { VH_discardRectangleMode.set(segment, 0L, index, value); } + /// Sets `discardRectangleMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_discardRectangleMode(MemorySegment segment, @CType("VkDiscardRectangleModeEXT") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_discardRectangleMode(segment, 0L, value); } + /// Sets `discardRectangleMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT discardRectangleModeAt(long index, @CType("VkDiscardRectangleModeEXT") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_discardRectangleMode(this.segment(), index, value); return this; } + /// Sets `discardRectangleMode` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT discardRectangleMode(@CType("VkDiscardRectangleModeEXT") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_discardRectangleMode(this.segment(), value); return this; } + + /// {@return `discardRectangleCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_discardRectangleCount(MemorySegment segment, long index) { return (int) VH_discardRectangleCount.get(segment, 0L, index); } + /// {@return `discardRectangleCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_discardRectangleCount(MemorySegment segment) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_discardRectangleCount(segment, 0L); } + /// {@return `discardRectangleCount` at the given index} + /// @param index the index + public @CType("uint32_t") int discardRectangleCountAt(long index) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_discardRectangleCount(this.segment(), index); } + /// {@return `discardRectangleCount`} + public @CType("uint32_t") int discardRectangleCount() { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_discardRectangleCount(this.segment()); } + /// Sets `discardRectangleCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_discardRectangleCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_discardRectangleCount.set(segment, 0L, index, value); } + /// Sets `discardRectangleCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_discardRectangleCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_discardRectangleCount(segment, 0L, value); } + /// Sets `discardRectangleCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT discardRectangleCountAt(long index, @CType("uint32_t") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_discardRectangleCount(this.segment(), index, value); return this; } + /// Sets `discardRectangleCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT discardRectangleCount(@CType("uint32_t") int value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_discardRectangleCount(this.segment(), value); return this; } + + /// {@return `pDiscardRectangles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pDiscardRectangles(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDiscardRectangles.get(segment, 0L, index); } + /// {@return `pDiscardRectangles`} + /// @param segment the segment of the struct + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pDiscardRectangles(MemorySegment segment) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_pDiscardRectangles(segment, 0L); } + /// {@return `pDiscardRectangles` at the given index} + /// @param index the index + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pDiscardRectanglesAt(long index) { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_pDiscardRectangles(this.segment(), index); } + /// {@return `pDiscardRectangles`} + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pDiscardRectangles() { return VkPipelineDiscardRectangleStateCreateInfoEXT.get_pDiscardRectangles(this.segment()); } + /// Sets `pDiscardRectangles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDiscardRectangles(MemorySegment segment, long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VH_pDiscardRectangles.set(segment, 0L, index, value); } + /// Sets `pDiscardRectangles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDiscardRectangles(MemorySegment segment, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_pDiscardRectangles(segment, 0L, value); } + /// Sets `pDiscardRectangles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT pDiscardRectanglesAt(long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_pDiscardRectangles(this.segment(), index, value); return this; } + /// Sets `pDiscardRectangles` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDiscardRectangleStateCreateInfoEXT pDiscardRectangles(@CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkPipelineDiscardRectangleStateCreateInfoEXT.set_pDiscardRectangles(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelinePropertiesIdentifierEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelinePropertiesIdentifierEXT.java new file mode 100644 index 00000000..342c55f0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelinePropertiesIdentifierEXT.java @@ -0,0 +1,202 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineIdentifier +/// [Byte offset handle][#MH_pipelineIdentifier] - [Memory layout][#ML_pipelineIdentifier] - [Getter][#pipelineIdentifier(long)] - [Setter][#pipelineIdentifier(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelinePropertiesIdentifierEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint8_t[VK_UUID_SIZE] pipelineIdentifier; +/// } VkPipelinePropertiesIdentifierEXT; +/// ``` +public final class VkPipelinePropertiesIdentifierEXT extends Struct { + /// The struct layout of `VkPipelinePropertiesIdentifierEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("pipelineIdentifier") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `pipelineIdentifier` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_pipelineIdentifier = LAYOUT.byteOffsetHandle(PathElement.groupElement("pipelineIdentifier"), PathElement.sequenceElement()); + /// The memory layout of `pipelineIdentifier`. + public static final MemoryLayout ML_pipelineIdentifier = LAYOUT.select(PathElement.groupElement("pipelineIdentifier")); + + /// Creates `VkPipelinePropertiesIdentifierEXT` with the given segment. + /// @param segment the memory segment + public VkPipelinePropertiesIdentifierEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelinePropertiesIdentifierEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelinePropertiesIdentifierEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelinePropertiesIdentifierEXT(segment); } + + /// Creates `VkPipelinePropertiesIdentifierEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelinePropertiesIdentifierEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelinePropertiesIdentifierEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelinePropertiesIdentifierEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelinePropertiesIdentifierEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelinePropertiesIdentifierEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelinePropertiesIdentifierEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelinePropertiesIdentifierEXT` + public static VkPipelinePropertiesIdentifierEXT alloc(SegmentAllocator allocator) { return new VkPipelinePropertiesIdentifierEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelinePropertiesIdentifierEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelinePropertiesIdentifierEXT` + public static VkPipelinePropertiesIdentifierEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelinePropertiesIdentifierEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelinePropertiesIdentifierEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelinePropertiesIdentifierEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelinePropertiesIdentifierEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelinePropertiesIdentifierEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelinePropertiesIdentifierEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelinePropertiesIdentifierEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelinePropertiesIdentifierEXT sType(@CType("VkStructureType") int value) { VkPipelinePropertiesIdentifierEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelinePropertiesIdentifierEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelinePropertiesIdentifierEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPipelinePropertiesIdentifierEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelinePropertiesIdentifierEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelinePropertiesIdentifierEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelinePropertiesIdentifierEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelinePropertiesIdentifierEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPipelinePropertiesIdentifierEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineIdentifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineIdentifier(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_pipelineIdentifier.invokeExact(0L, elementIndex), index), ML_pipelineIdentifier); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `pipelineIdentifier`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineIdentifier(MemorySegment segment, long elementIndex) { return VkPipelinePropertiesIdentifierEXT.get_pipelineIdentifier(segment, 0L, elementIndex); } + /// {@return `pipelineIdentifier` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineIdentifierAt(long index, long elementIndex) { return VkPipelinePropertiesIdentifierEXT.get_pipelineIdentifier(this.segment(), index, elementIndex); } + /// {@return `pipelineIdentifier`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineIdentifier(long elementIndex) { return VkPipelinePropertiesIdentifierEXT.get_pipelineIdentifier(this.segment(), elementIndex); } + /// Sets `pipelineIdentifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineIdentifier(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_pipelineIdentifier.invokeExact(0L, elementIndex), index), ML_pipelineIdentifier.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `pipelineIdentifier` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineIdentifier(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelinePropertiesIdentifierEXT.set_pipelineIdentifier(segment, 0L, elementIndex, value); } + /// Sets `pipelineIdentifier` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelinePropertiesIdentifierEXT pipelineIdentifierAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelinePropertiesIdentifierEXT.set_pipelineIdentifier(this.segment(), index, elementIndex, value); return this; } + /// Sets `pipelineIdentifier` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelinePropertiesIdentifierEXT pipelineIdentifier(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelinePropertiesIdentifierEXT.set_pipelineIdentifier(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationConservativeStateCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationConservativeStateCreateInfoEXT.java new file mode 100644 index 00000000..c1887b47 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationConservativeStateCreateInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### conservativeRasterizationMode +/// [VarHandle][#VH_conservativeRasterizationMode] - [Getter][#conservativeRasterizationMode()] - [Setter][#conservativeRasterizationMode(int)] +/// ### extraPrimitiveOverestimationSize +/// [VarHandle][#VH_extraPrimitiveOverestimationSize] - [Getter][#extraPrimitiveOverestimationSize()] - [Setter][#extraPrimitiveOverestimationSize(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineRasterizationConservativeStateCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineRasterizationConservativeStateCreateFlagsEXT flags; +/// VkConservativeRasterizationModeEXT conservativeRasterizationMode; +/// float extraPrimitiveOverestimationSize; +/// } VkPipelineRasterizationConservativeStateCreateInfoEXT; +/// ``` +public final class VkPipelineRasterizationConservativeStateCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineRasterizationConservativeStateCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("conservativeRasterizationMode"), + ValueLayout.JAVA_FLOAT.withName("extraPrimitiveOverestimationSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `conservativeRasterizationMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_conservativeRasterizationMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conservativeRasterizationMode")); + /// The [VarHandle] of `extraPrimitiveOverestimationSize` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_extraPrimitiveOverestimationSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extraPrimitiveOverestimationSize")); + + /// Creates `VkPipelineRasterizationConservativeStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineRasterizationConservativeStateCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineRasterizationConservativeStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationConservativeStateCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationConservativeStateCreateInfoEXT(segment); } + + /// Creates `VkPipelineRasterizationConservativeStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationConservativeStateCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationConservativeStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineRasterizationConservativeStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationConservativeStateCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationConservativeStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineRasterizationConservativeStateCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineRasterizationConservativeStateCreateInfoEXT` + public static VkPipelineRasterizationConservativeStateCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineRasterizationConservativeStateCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineRasterizationConservativeStateCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineRasterizationConservativeStateCreateInfoEXT` + public static VkPipelineRasterizationConservativeStateCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineRasterizationConservativeStateCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationConservativeStateCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationConservativeStateCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationConservativeStateCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationConservativeStateCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRasterizationConservativeStateCreateFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRasterizationConservativeStateCreateFlagsEXT") int get_flags(MemorySegment segment) { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineRasterizationConservativeStateCreateFlagsEXT") int flagsAt(long index) { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineRasterizationConservativeStateCreateFlagsEXT") int flags() { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineRasterizationConservativeStateCreateFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineRasterizationConservativeStateCreateFlagsEXT") int value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationConservativeStateCreateInfoEXT flagsAt(long index, @CType("VkPipelineRasterizationConservativeStateCreateFlagsEXT") int value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationConservativeStateCreateInfoEXT flags(@CType("VkPipelineRasterizationConservativeStateCreateFlagsEXT") int value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `conservativeRasterizationMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkConservativeRasterizationModeEXT") int get_conservativeRasterizationMode(MemorySegment segment, long index) { return (int) VH_conservativeRasterizationMode.get(segment, 0L, index); } + /// {@return `conservativeRasterizationMode`} + /// @param segment the segment of the struct + public static @CType("VkConservativeRasterizationModeEXT") int get_conservativeRasterizationMode(MemorySegment segment) { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_conservativeRasterizationMode(segment, 0L); } + /// {@return `conservativeRasterizationMode` at the given index} + /// @param index the index + public @CType("VkConservativeRasterizationModeEXT") int conservativeRasterizationModeAt(long index) { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_conservativeRasterizationMode(this.segment(), index); } + /// {@return `conservativeRasterizationMode`} + public @CType("VkConservativeRasterizationModeEXT") int conservativeRasterizationMode() { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_conservativeRasterizationMode(this.segment()); } + /// Sets `conservativeRasterizationMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conservativeRasterizationMode(MemorySegment segment, long index, @CType("VkConservativeRasterizationModeEXT") int value) { VH_conservativeRasterizationMode.set(segment, 0L, index, value); } + /// Sets `conservativeRasterizationMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conservativeRasterizationMode(MemorySegment segment, @CType("VkConservativeRasterizationModeEXT") int value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_conservativeRasterizationMode(segment, 0L, value); } + /// Sets `conservativeRasterizationMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationConservativeStateCreateInfoEXT conservativeRasterizationModeAt(long index, @CType("VkConservativeRasterizationModeEXT") int value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_conservativeRasterizationMode(this.segment(), index, value); return this; } + /// Sets `conservativeRasterizationMode` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationConservativeStateCreateInfoEXT conservativeRasterizationMode(@CType("VkConservativeRasterizationModeEXT") int value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_conservativeRasterizationMode(this.segment(), value); return this; } + + /// {@return `extraPrimitiveOverestimationSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_extraPrimitiveOverestimationSize(MemorySegment segment, long index) { return (float) VH_extraPrimitiveOverestimationSize.get(segment, 0L, index); } + /// {@return `extraPrimitiveOverestimationSize`} + /// @param segment the segment of the struct + public static @CType("float") float get_extraPrimitiveOverestimationSize(MemorySegment segment) { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_extraPrimitiveOverestimationSize(segment, 0L); } + /// {@return `extraPrimitiveOverestimationSize` at the given index} + /// @param index the index + public @CType("float") float extraPrimitiveOverestimationSizeAt(long index) { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_extraPrimitiveOverestimationSize(this.segment(), index); } + /// {@return `extraPrimitiveOverestimationSize`} + public @CType("float") float extraPrimitiveOverestimationSize() { return VkPipelineRasterizationConservativeStateCreateInfoEXT.get_extraPrimitiveOverestimationSize(this.segment()); } + /// Sets `extraPrimitiveOverestimationSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extraPrimitiveOverestimationSize(MemorySegment segment, long index, @CType("float") float value) { VH_extraPrimitiveOverestimationSize.set(segment, 0L, index, value); } + /// Sets `extraPrimitiveOverestimationSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extraPrimitiveOverestimationSize(MemorySegment segment, @CType("float") float value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_extraPrimitiveOverestimationSize(segment, 0L, value); } + /// Sets `extraPrimitiveOverestimationSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationConservativeStateCreateInfoEXT extraPrimitiveOverestimationSizeAt(long index, @CType("float") float value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_extraPrimitiveOverestimationSize(this.segment(), index, value); return this; } + /// Sets `extraPrimitiveOverestimationSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationConservativeStateCreateInfoEXT extraPrimitiveOverestimationSize(@CType("float") float value) { VkPipelineRasterizationConservativeStateCreateInfoEXT.set_extraPrimitiveOverestimationSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationDepthClipStateCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationDepthClipStateCreateInfoEXT.java new file mode 100644 index 00000000..b4de00e8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationDepthClipStateCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### depthClipEnable +/// [VarHandle][#VH_depthClipEnable] - [Getter][#depthClipEnable()] - [Setter][#depthClipEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineRasterizationDepthClipStateCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineRasterizationDepthClipStateCreateFlagsEXT flags; +/// VkBool32 depthClipEnable; +/// } VkPipelineRasterizationDepthClipStateCreateInfoEXT; +/// ``` +public final class VkPipelineRasterizationDepthClipStateCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineRasterizationDepthClipStateCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("depthClipEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `depthClipEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthClipEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthClipEnable")); + + /// Creates `VkPipelineRasterizationDepthClipStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineRasterizationDepthClipStateCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineRasterizationDepthClipStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationDepthClipStateCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationDepthClipStateCreateInfoEXT(segment); } + + /// Creates `VkPipelineRasterizationDepthClipStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationDepthClipStateCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationDepthClipStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineRasterizationDepthClipStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationDepthClipStateCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationDepthClipStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineRasterizationDepthClipStateCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineRasterizationDepthClipStateCreateInfoEXT` + public static VkPipelineRasterizationDepthClipStateCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineRasterizationDepthClipStateCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineRasterizationDepthClipStateCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineRasterizationDepthClipStateCreateInfoEXT` + public static VkPipelineRasterizationDepthClipStateCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineRasterizationDepthClipStateCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationDepthClipStateCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationDepthClipStateCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationDepthClipStateCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationDepthClipStateCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRasterizationDepthClipStateCreateFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRasterizationDepthClipStateCreateFlagsEXT") int get_flags(MemorySegment segment) { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineRasterizationDepthClipStateCreateFlagsEXT") int flagsAt(long index) { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineRasterizationDepthClipStateCreateFlagsEXT") int flags() { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineRasterizationDepthClipStateCreateFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineRasterizationDepthClipStateCreateFlagsEXT") int value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationDepthClipStateCreateInfoEXT flagsAt(long index, @CType("VkPipelineRasterizationDepthClipStateCreateFlagsEXT") int value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationDepthClipStateCreateInfoEXT flags(@CType("VkPipelineRasterizationDepthClipStateCreateFlagsEXT") int value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `depthClipEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthClipEnable(MemorySegment segment, long index) { return (int) VH_depthClipEnable.get(segment, 0L, index); } + /// {@return `depthClipEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthClipEnable(MemorySegment segment) { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_depthClipEnable(segment, 0L); } + /// {@return `depthClipEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int depthClipEnableAt(long index) { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_depthClipEnable(this.segment(), index); } + /// {@return `depthClipEnable`} + public @CType("VkBool32") int depthClipEnable() { return VkPipelineRasterizationDepthClipStateCreateInfoEXT.get_depthClipEnable(this.segment()); } + /// Sets `depthClipEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthClipEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthClipEnable.set(segment, 0L, index, value); } + /// Sets `depthClipEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthClipEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_depthClipEnable(segment, 0L, value); } + /// Sets `depthClipEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationDepthClipStateCreateInfoEXT depthClipEnableAt(long index, @CType("VkBool32") int value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_depthClipEnable(this.segment(), index, value); return this; } + /// Sets `depthClipEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationDepthClipStateCreateInfoEXT depthClipEnable(@CType("VkBool32") int value) { VkPipelineRasterizationDepthClipStateCreateInfoEXT.set_depthClipEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.java new file mode 100644 index 00000000..9b3015e2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### provokingVertexMode +/// [VarHandle][#VH_provokingVertexMode] - [Getter][#provokingVertexMode()] - [Setter][#provokingVertexMode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineRasterizationProvokingVertexStateCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkProvokingVertexModeEXT provokingVertexMode; +/// } VkPipelineRasterizationProvokingVertexStateCreateInfoEXT; +/// ``` +public final class VkPipelineRasterizationProvokingVertexStateCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("provokingVertexMode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `provokingVertexMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_provokingVertexMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("provokingVertexMode")); + + /// Creates `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineRasterizationProvokingVertexStateCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationProvokingVertexStateCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationProvokingVertexStateCreateInfoEXT(segment); } + + /// Creates `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationProvokingVertexStateCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationProvokingVertexStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationProvokingVertexStateCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationProvokingVertexStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT` + public static VkPipelineRasterizationProvokingVertexStateCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineRasterizationProvokingVertexStateCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineRasterizationProvokingVertexStateCreateInfoEXT` + public static VkPipelineRasterizationProvokingVertexStateCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineRasterizationProvokingVertexStateCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationProvokingVertexStateCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationProvokingVertexStateCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationProvokingVertexStateCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationProvokingVertexStateCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `provokingVertexMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkProvokingVertexModeEXT") int get_provokingVertexMode(MemorySegment segment, long index) { return (int) VH_provokingVertexMode.get(segment, 0L, index); } + /// {@return `provokingVertexMode`} + /// @param segment the segment of the struct + public static @CType("VkProvokingVertexModeEXT") int get_provokingVertexMode(MemorySegment segment) { return VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.get_provokingVertexMode(segment, 0L); } + /// {@return `provokingVertexMode` at the given index} + /// @param index the index + public @CType("VkProvokingVertexModeEXT") int provokingVertexModeAt(long index) { return VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.get_provokingVertexMode(this.segment(), index); } + /// {@return `provokingVertexMode`} + public @CType("VkProvokingVertexModeEXT") int provokingVertexMode() { return VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.get_provokingVertexMode(this.segment()); } + /// Sets `provokingVertexMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_provokingVertexMode(MemorySegment segment, long index, @CType("VkProvokingVertexModeEXT") int value) { VH_provokingVertexMode.set(segment, 0L, index, value); } + /// Sets `provokingVertexMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_provokingVertexMode(MemorySegment segment, @CType("VkProvokingVertexModeEXT") int value) { VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.set_provokingVertexMode(segment, 0L, value); } + /// Sets `provokingVertexMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationProvokingVertexStateCreateInfoEXT provokingVertexModeAt(long index, @CType("VkProvokingVertexModeEXT") int value) { VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.set_provokingVertexMode(this.segment(), index, value); return this; } + /// Sets `provokingVertexMode` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationProvokingVertexStateCreateInfoEXT provokingVertexMode(@CType("VkProvokingVertexModeEXT") int value) { VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.set_provokingVertexMode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationStateStreamCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationStateStreamCreateInfoEXT.java new file mode 100644 index 00000000..e42cb60d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineRasterizationStateStreamCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### rasterizationStream +/// [VarHandle][#VH_rasterizationStream] - [Getter][#rasterizationStream()] - [Setter][#rasterizationStream(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineRasterizationStateStreamCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineRasterizationStateStreamCreateFlagsEXT flags; +/// uint32_t rasterizationStream; +/// } VkPipelineRasterizationStateStreamCreateInfoEXT; +/// ``` +public final class VkPipelineRasterizationStateStreamCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineRasterizationStateStreamCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("rasterizationStream") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `rasterizationStream` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rasterizationStream = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rasterizationStream")); + + /// Creates `VkPipelineRasterizationStateStreamCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineRasterizationStateStreamCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineRasterizationStateStreamCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationStateStreamCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationStateStreamCreateInfoEXT(segment); } + + /// Creates `VkPipelineRasterizationStateStreamCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationStateStreamCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationStateStreamCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineRasterizationStateStreamCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationStateStreamCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationStateStreamCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineRasterizationStateStreamCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineRasterizationStateStreamCreateInfoEXT` + public static VkPipelineRasterizationStateStreamCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineRasterizationStateStreamCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineRasterizationStateStreamCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineRasterizationStateStreamCreateInfoEXT` + public static VkPipelineRasterizationStateStreamCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineRasterizationStateStreamCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateStreamCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateStreamCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateStreamCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateStreamCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRasterizationStateStreamCreateFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRasterizationStateStreamCreateFlagsEXT") int get_flags(MemorySegment segment) { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineRasterizationStateStreamCreateFlagsEXT") int flagsAt(long index) { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineRasterizationStateStreamCreateFlagsEXT") int flags() { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineRasterizationStateStreamCreateFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineRasterizationStateStreamCreateFlagsEXT") int value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateStreamCreateInfoEXT flagsAt(long index, @CType("VkPipelineRasterizationStateStreamCreateFlagsEXT") int value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateStreamCreateInfoEXT flags(@CType("VkPipelineRasterizationStateStreamCreateFlagsEXT") int value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `rasterizationStream` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_rasterizationStream(MemorySegment segment, long index) { return (int) VH_rasterizationStream.get(segment, 0L, index); } + /// {@return `rasterizationStream`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_rasterizationStream(MemorySegment segment) { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_rasterizationStream(segment, 0L); } + /// {@return `rasterizationStream` at the given index} + /// @param index the index + public @CType("uint32_t") int rasterizationStreamAt(long index) { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_rasterizationStream(this.segment(), index); } + /// {@return `rasterizationStream`} + public @CType("uint32_t") int rasterizationStream() { return VkPipelineRasterizationStateStreamCreateInfoEXT.get_rasterizationStream(this.segment()); } + /// Sets `rasterizationStream` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rasterizationStream(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_rasterizationStream.set(segment, 0L, index, value); } + /// Sets `rasterizationStream` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rasterizationStream(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_rasterizationStream(segment, 0L, value); } + /// Sets `rasterizationStream` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateStreamCreateInfoEXT rasterizationStreamAt(long index, @CType("uint32_t") int value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_rasterizationStream(this.segment(), index, value); return this; } + /// Sets `rasterizationStream` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateStreamCreateInfoEXT rasterizationStream(@CType("uint32_t") int value) { VkPipelineRasterizationStateStreamCreateInfoEXT.set_rasterizationStream(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineSampleLocationsStateCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineSampleLocationsStateCreateInfoEXT.java new file mode 100644 index 00000000..fe07b103 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineSampleLocationsStateCreateInfoEXT.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sampleLocationsEnable +/// [VarHandle][#VH_sampleLocationsEnable] - [Getter][#sampleLocationsEnable()] - [Setter][#sampleLocationsEnable(int)] +/// ### sampleLocationsInfo +/// [Byte offset][#OFFSET_sampleLocationsInfo] - [Memory layout][#ML_sampleLocationsInfo] - [Getter][#sampleLocationsInfo()] - [Setter][#sampleLocationsInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineSampleLocationsStateCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 sampleLocationsEnable; +/// VkSampleLocationsInfoEXT sampleLocationsInfo; +/// } VkPipelineSampleLocationsStateCreateInfoEXT; +/// ``` +public final class VkPipelineSampleLocationsStateCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineSampleLocationsStateCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sampleLocationsEnable"), + overrungl.vulkan.ext.struct.VkSampleLocationsInfoEXT.LAYOUT.withName("sampleLocationsInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sampleLocationsEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleLocationsEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleLocationsEnable")); + /// The byte offset of `sampleLocationsInfo`. + public static final long OFFSET_sampleLocationsInfo = LAYOUT.byteOffset(PathElement.groupElement("sampleLocationsInfo")); + /// The memory layout of `sampleLocationsInfo`. + public static final MemoryLayout ML_sampleLocationsInfo = LAYOUT.select(PathElement.groupElement("sampleLocationsInfo")); + + /// Creates `VkPipelineSampleLocationsStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineSampleLocationsStateCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineSampleLocationsStateCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineSampleLocationsStateCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineSampleLocationsStateCreateInfoEXT(segment); } + + /// Creates `VkPipelineSampleLocationsStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineSampleLocationsStateCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineSampleLocationsStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineSampleLocationsStateCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineSampleLocationsStateCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineSampleLocationsStateCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineSampleLocationsStateCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineSampleLocationsStateCreateInfoEXT` + public static VkPipelineSampleLocationsStateCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineSampleLocationsStateCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineSampleLocationsStateCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineSampleLocationsStateCreateInfoEXT` + public static VkPipelineSampleLocationsStateCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineSampleLocationsStateCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineSampleLocationsStateCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineSampleLocationsStateCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineSampleLocationsStateCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineSampleLocationsStateCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineSampleLocationsStateCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineSampleLocationsStateCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineSampleLocationsStateCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineSampleLocationsStateCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineSampleLocationsStateCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineSampleLocationsStateCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `sampleLocationsEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sampleLocationsEnable(MemorySegment segment, long index) { return (int) VH_sampleLocationsEnable.get(segment, 0L, index); } + /// {@return `sampleLocationsEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sampleLocationsEnable(MemorySegment segment) { return VkPipelineSampleLocationsStateCreateInfoEXT.get_sampleLocationsEnable(segment, 0L); } + /// {@return `sampleLocationsEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int sampleLocationsEnableAt(long index) { return VkPipelineSampleLocationsStateCreateInfoEXT.get_sampleLocationsEnable(this.segment(), index); } + /// {@return `sampleLocationsEnable`} + public @CType("VkBool32") int sampleLocationsEnable() { return VkPipelineSampleLocationsStateCreateInfoEXT.get_sampleLocationsEnable(this.segment()); } + /// Sets `sampleLocationsEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationsEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sampleLocationsEnable.set(segment, 0L, index, value); } + /// Sets `sampleLocationsEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationsEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_sampleLocationsEnable(segment, 0L, value); } + /// Sets `sampleLocationsEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineSampleLocationsStateCreateInfoEXT sampleLocationsEnableAt(long index, @CType("VkBool32") int value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_sampleLocationsEnable(this.segment(), index, value); return this; } + /// Sets `sampleLocationsEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineSampleLocationsStateCreateInfoEXT sampleLocationsEnable(@CType("VkBool32") int value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_sampleLocationsEnable(this.segment(), value); return this; } + + /// {@return `sampleLocationsInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment get_sampleLocationsInfo(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_sampleLocationsInfo, index), ML_sampleLocationsInfo); } + /// {@return `sampleLocationsInfo`} + /// @param segment the segment of the struct + public static @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment get_sampleLocationsInfo(MemorySegment segment) { return VkPipelineSampleLocationsStateCreateInfoEXT.get_sampleLocationsInfo(segment, 0L); } + /// {@return `sampleLocationsInfo` at the given index} + /// @param index the index + public @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment sampleLocationsInfoAt(long index) { return VkPipelineSampleLocationsStateCreateInfoEXT.get_sampleLocationsInfo(this.segment(), index); } + /// {@return `sampleLocationsInfo`} + public @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment sampleLocationsInfo() { return VkPipelineSampleLocationsStateCreateInfoEXT.get_sampleLocationsInfo(this.segment()); } + /// Sets `sampleLocationsInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationsInfo(MemorySegment segment, long index, @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_sampleLocationsInfo, index), ML_sampleLocationsInfo.byteSize()); } + /// Sets `sampleLocationsInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationsInfo(MemorySegment segment, @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_sampleLocationsInfo(segment, 0L, value); } + /// Sets `sampleLocationsInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineSampleLocationsStateCreateInfoEXT sampleLocationsInfoAt(long index, @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_sampleLocationsInfo(this.segment(), index, value); return this; } + /// Sets `sampleLocationsInfo` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineSampleLocationsStateCreateInfoEXT sampleLocationsInfo(@CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { VkPipelineSampleLocationsStateCreateInfoEXT.set_sampleLocationsInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.java new file mode 100644 index 00000000..3178df96 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### identifierSize +/// [VarHandle][#VH_identifierSize] - [Getter][#identifierSize()] - [Setter][#identifierSize(int)] +/// ### pIdentifier +/// [VarHandle][#VH_pIdentifier] - [Getter][#pIdentifier()] - [Setter][#pIdentifier(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineShaderStageModuleIdentifierCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t identifierSize; +/// const uint8_t * pIdentifier; +/// } VkPipelineShaderStageModuleIdentifierCreateInfoEXT; +/// ``` +public final class VkPipelineShaderStageModuleIdentifierCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineShaderStageModuleIdentifierCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("identifierSize"), + ValueLayout.ADDRESS.withName("pIdentifier") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `identifierSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_identifierSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("identifierSize")); + /// The [VarHandle] of `pIdentifier` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pIdentifier = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pIdentifier")); + + /// Creates `VkPipelineShaderStageModuleIdentifierCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineShaderStageModuleIdentifierCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineShaderStageModuleIdentifierCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageModuleIdentifierCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageModuleIdentifierCreateInfoEXT(segment); } + + /// Creates `VkPipelineShaderStageModuleIdentifierCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageModuleIdentifierCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageModuleIdentifierCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineShaderStageModuleIdentifierCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageModuleIdentifierCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageModuleIdentifierCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineShaderStageModuleIdentifierCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineShaderStageModuleIdentifierCreateInfoEXT` + public static VkPipelineShaderStageModuleIdentifierCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineShaderStageModuleIdentifierCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineShaderStageModuleIdentifierCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineShaderStageModuleIdentifierCreateInfoEXT` + public static VkPipelineShaderStageModuleIdentifierCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineShaderStageModuleIdentifierCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageModuleIdentifierCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageModuleIdentifierCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageModuleIdentifierCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageModuleIdentifierCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `identifierSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_identifierSize(MemorySegment segment, long index) { return (int) VH_identifierSize.get(segment, 0L, index); } + /// {@return `identifierSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_identifierSize(MemorySegment segment) { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_identifierSize(segment, 0L); } + /// {@return `identifierSize` at the given index} + /// @param index the index + public @CType("uint32_t") int identifierSizeAt(long index) { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_identifierSize(this.segment(), index); } + /// {@return `identifierSize`} + public @CType("uint32_t") int identifierSize() { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_identifierSize(this.segment()); } + /// Sets `identifierSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_identifierSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_identifierSize.set(segment, 0L, index, value); } + /// Sets `identifierSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_identifierSize(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_identifierSize(segment, 0L, value); } + /// Sets `identifierSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageModuleIdentifierCreateInfoEXT identifierSizeAt(long index, @CType("uint32_t") int value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_identifierSize(this.segment(), index, value); return this; } + /// Sets `identifierSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageModuleIdentifierCreateInfoEXT identifierSize(@CType("uint32_t") int value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_identifierSize(this.segment(), value); return this; } + + /// {@return `pIdentifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint8_t *") java.lang.foreign.MemorySegment get_pIdentifier(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pIdentifier.get(segment, 0L, index); } + /// {@return `pIdentifier`} + /// @param segment the segment of the struct + public static @CType("const uint8_t *") java.lang.foreign.MemorySegment get_pIdentifier(MemorySegment segment) { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_pIdentifier(segment, 0L); } + /// {@return `pIdentifier` at the given index} + /// @param index the index + public @CType("const uint8_t *") java.lang.foreign.MemorySegment pIdentifierAt(long index) { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_pIdentifier(this.segment(), index); } + /// {@return `pIdentifier`} + public @CType("const uint8_t *") java.lang.foreign.MemorySegment pIdentifier() { return VkPipelineShaderStageModuleIdentifierCreateInfoEXT.get_pIdentifier(this.segment()); } + /// Sets `pIdentifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pIdentifier(MemorySegment segment, long index, @CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VH_pIdentifier.set(segment, 0L, index, value); } + /// Sets `pIdentifier` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pIdentifier(MemorySegment segment, @CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_pIdentifier(segment, 0L, value); } + /// Sets `pIdentifier` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageModuleIdentifierCreateInfoEXT pIdentifierAt(long index, @CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_pIdentifier(this.segment(), index, value); return this; } + /// Sets `pIdentifier` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageModuleIdentifierCreateInfoEXT pIdentifier(@CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageModuleIdentifierCreateInfoEXT.set_pIdentifier(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineViewportDepthClampControlCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineViewportDepthClampControlCreateInfoEXT.java new file mode 100644 index 00000000..ffd112f3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineViewportDepthClampControlCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### depthClampMode +/// [VarHandle][#VH_depthClampMode] - [Getter][#depthClampMode()] - [Setter][#depthClampMode(int)] +/// ### pDepthClampRange +/// [VarHandle][#VH_pDepthClampRange] - [Getter][#pDepthClampRange()] - [Setter][#pDepthClampRange(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineViewportDepthClampControlCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkDepthClampModeEXT depthClampMode; +/// const VkDepthClampRangeEXT * pDepthClampRange; +/// } VkPipelineViewportDepthClampControlCreateInfoEXT; +/// ``` +public final class VkPipelineViewportDepthClampControlCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineViewportDepthClampControlCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("depthClampMode"), + ValueLayout.ADDRESS.withName("pDepthClampRange") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `depthClampMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthClampMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthClampMode")); + /// The [VarHandle] of `pDepthClampRange` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDepthClampRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDepthClampRange")); + + /// Creates `VkPipelineViewportDepthClampControlCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineViewportDepthClampControlCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineViewportDepthClampControlCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportDepthClampControlCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportDepthClampControlCreateInfoEXT(segment); } + + /// Creates `VkPipelineViewportDepthClampControlCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportDepthClampControlCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportDepthClampControlCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineViewportDepthClampControlCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportDepthClampControlCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportDepthClampControlCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineViewportDepthClampControlCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineViewportDepthClampControlCreateInfoEXT` + public static VkPipelineViewportDepthClampControlCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineViewportDepthClampControlCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineViewportDepthClampControlCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineViewportDepthClampControlCreateInfoEXT` + public static VkPipelineViewportDepthClampControlCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineViewportDepthClampControlCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClampControlCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClampControlCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClampControlCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClampControlCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `depthClampMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDepthClampModeEXT") int get_depthClampMode(MemorySegment segment, long index) { return (int) VH_depthClampMode.get(segment, 0L, index); } + /// {@return `depthClampMode`} + /// @param segment the segment of the struct + public static @CType("VkDepthClampModeEXT") int get_depthClampMode(MemorySegment segment) { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_depthClampMode(segment, 0L); } + /// {@return `depthClampMode` at the given index} + /// @param index the index + public @CType("VkDepthClampModeEXT") int depthClampModeAt(long index) { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_depthClampMode(this.segment(), index); } + /// {@return `depthClampMode`} + public @CType("VkDepthClampModeEXT") int depthClampMode() { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_depthClampMode(this.segment()); } + /// Sets `depthClampMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthClampMode(MemorySegment segment, long index, @CType("VkDepthClampModeEXT") int value) { VH_depthClampMode.set(segment, 0L, index, value); } + /// Sets `depthClampMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthClampMode(MemorySegment segment, @CType("VkDepthClampModeEXT") int value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_depthClampMode(segment, 0L, value); } + /// Sets `depthClampMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClampControlCreateInfoEXT depthClampModeAt(long index, @CType("VkDepthClampModeEXT") int value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_depthClampMode(this.segment(), index, value); return this; } + /// Sets `depthClampMode` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClampControlCreateInfoEXT depthClampMode(@CType("VkDepthClampModeEXT") int value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_depthClampMode(this.segment(), value); return this; } + + /// {@return `pDepthClampRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDepthClampRangeEXT *") java.lang.foreign.MemorySegment get_pDepthClampRange(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDepthClampRange.get(segment, 0L, index); } + /// {@return `pDepthClampRange`} + /// @param segment the segment of the struct + public static @CType("const VkDepthClampRangeEXT *") java.lang.foreign.MemorySegment get_pDepthClampRange(MemorySegment segment) { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_pDepthClampRange(segment, 0L); } + /// {@return `pDepthClampRange` at the given index} + /// @param index the index + public @CType("const VkDepthClampRangeEXT *") java.lang.foreign.MemorySegment pDepthClampRangeAt(long index) { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_pDepthClampRange(this.segment(), index); } + /// {@return `pDepthClampRange`} + public @CType("const VkDepthClampRangeEXT *") java.lang.foreign.MemorySegment pDepthClampRange() { return VkPipelineViewportDepthClampControlCreateInfoEXT.get_pDepthClampRange(this.segment()); } + /// Sets `pDepthClampRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDepthClampRange(MemorySegment segment, long index, @CType("const VkDepthClampRangeEXT *") java.lang.foreign.MemorySegment value) { VH_pDepthClampRange.set(segment, 0L, index, value); } + /// Sets `pDepthClampRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDepthClampRange(MemorySegment segment, @CType("const VkDepthClampRangeEXT *") java.lang.foreign.MemorySegment value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_pDepthClampRange(segment, 0L, value); } + /// Sets `pDepthClampRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClampControlCreateInfoEXT pDepthClampRangeAt(long index, @CType("const VkDepthClampRangeEXT *") java.lang.foreign.MemorySegment value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_pDepthClampRange(this.segment(), index, value); return this; } + /// Sets `pDepthClampRange` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClampControlCreateInfoEXT pDepthClampRange(@CType("const VkDepthClampRangeEXT *") java.lang.foreign.MemorySegment value) { VkPipelineViewportDepthClampControlCreateInfoEXT.set_pDepthClampRange(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineViewportDepthClipControlCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineViewportDepthClipControlCreateInfoEXT.java new file mode 100644 index 00000000..f30067f2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkPipelineViewportDepthClipControlCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### negativeOneToOne +/// [VarHandle][#VH_negativeOneToOne] - [Getter][#negativeOneToOne()] - [Setter][#negativeOneToOne(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineViewportDepthClipControlCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 negativeOneToOne; +/// } VkPipelineViewportDepthClipControlCreateInfoEXT; +/// ``` +public final class VkPipelineViewportDepthClipControlCreateInfoEXT extends Struct { + /// The struct layout of `VkPipelineViewportDepthClipControlCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("negativeOneToOne") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `negativeOneToOne` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_negativeOneToOne = LAYOUT.arrayElementVarHandle(PathElement.groupElement("negativeOneToOne")); + + /// Creates `VkPipelineViewportDepthClipControlCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkPipelineViewportDepthClipControlCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineViewportDepthClipControlCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportDepthClipControlCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportDepthClipControlCreateInfoEXT(segment); } + + /// Creates `VkPipelineViewportDepthClipControlCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportDepthClipControlCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportDepthClipControlCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineViewportDepthClipControlCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportDepthClipControlCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportDepthClipControlCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineViewportDepthClipControlCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineViewportDepthClipControlCreateInfoEXT` + public static VkPipelineViewportDepthClipControlCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkPipelineViewportDepthClipControlCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineViewportDepthClipControlCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineViewportDepthClipControlCreateInfoEXT` + public static VkPipelineViewportDepthClipControlCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkPipelineViewportDepthClipControlCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineViewportDepthClipControlCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineViewportDepthClipControlCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineViewportDepthClipControlCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineViewportDepthClipControlCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClipControlCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineViewportDepthClipControlCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClipControlCreateInfoEXT sType(@CType("VkStructureType") int value) { VkPipelineViewportDepthClipControlCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineViewportDepthClipControlCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineViewportDepthClipControlCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineViewportDepthClipControlCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportDepthClipControlCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClipControlCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportDepthClipControlCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClipControlCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportDepthClipControlCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `negativeOneToOne` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_negativeOneToOne(MemorySegment segment, long index) { return (int) VH_negativeOneToOne.get(segment, 0L, index); } + /// {@return `negativeOneToOne`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_negativeOneToOne(MemorySegment segment) { return VkPipelineViewportDepthClipControlCreateInfoEXT.get_negativeOneToOne(segment, 0L); } + /// {@return `negativeOneToOne` at the given index} + /// @param index the index + public @CType("VkBool32") int negativeOneToOneAt(long index) { return VkPipelineViewportDepthClipControlCreateInfoEXT.get_negativeOneToOne(this.segment(), index); } + /// {@return `negativeOneToOne`} + public @CType("VkBool32") int negativeOneToOne() { return VkPipelineViewportDepthClipControlCreateInfoEXT.get_negativeOneToOne(this.segment()); } + /// Sets `negativeOneToOne` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_negativeOneToOne(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_negativeOneToOne.set(segment, 0L, index, value); } + /// Sets `negativeOneToOne` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_negativeOneToOne(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineViewportDepthClipControlCreateInfoEXT.set_negativeOneToOne(segment, 0L, value); } + /// Sets `negativeOneToOne` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClipControlCreateInfoEXT negativeOneToOneAt(long index, @CType("VkBool32") int value) { VkPipelineViewportDepthClipControlCreateInfoEXT.set_negativeOneToOne(this.segment(), index, value); return this; } + /// Sets `negativeOneToOne` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportDepthClipControlCreateInfoEXT negativeOneToOne(@CType("VkBool32") int value) { VkPipelineViewportDepthClipControlCreateInfoEXT.set_negativeOneToOne(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkReleaseSwapchainImagesInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkReleaseSwapchainImagesInfoEXT.java new file mode 100644 index 00000000..6e757050 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkReleaseSwapchainImagesInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchain +/// [VarHandle][#VH_swapchain] - [Getter][#swapchain()] - [Setter][#swapchain(java.lang.foreign.MemorySegment)] +/// ### imageIndexCount +/// [VarHandle][#VH_imageIndexCount] - [Getter][#imageIndexCount()] - [Setter][#imageIndexCount(int)] +/// ### pImageIndices +/// [VarHandle][#VH_pImageIndices] - [Getter][#pImageIndices()] - [Setter][#pImageIndices(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkReleaseSwapchainImagesInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkSwapchainKHR swapchain; +/// uint32_t imageIndexCount; +/// const uint32_t * pImageIndices; +/// } VkReleaseSwapchainImagesInfoEXT; +/// ``` +public final class VkReleaseSwapchainImagesInfoEXT extends Struct { + /// The struct layout of `VkReleaseSwapchainImagesInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("swapchain"), + ValueLayout.JAVA_INT.withName("imageIndexCount"), + ValueLayout.ADDRESS.withName("pImageIndices") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchain` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_swapchain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchain")); + /// The [VarHandle] of `imageIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageIndexCount")); + /// The [VarHandle] of `pImageIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pImageIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pImageIndices")); + + /// Creates `VkReleaseSwapchainImagesInfoEXT` with the given segment. + /// @param segment the memory segment + public VkReleaseSwapchainImagesInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkReleaseSwapchainImagesInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkReleaseSwapchainImagesInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkReleaseSwapchainImagesInfoEXT(segment); } + + /// Creates `VkReleaseSwapchainImagesInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkReleaseSwapchainImagesInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkReleaseSwapchainImagesInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkReleaseSwapchainImagesInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkReleaseSwapchainImagesInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkReleaseSwapchainImagesInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkReleaseSwapchainImagesInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkReleaseSwapchainImagesInfoEXT` + public static VkReleaseSwapchainImagesInfoEXT alloc(SegmentAllocator allocator) { return new VkReleaseSwapchainImagesInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkReleaseSwapchainImagesInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkReleaseSwapchainImagesInfoEXT` + public static VkReleaseSwapchainImagesInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkReleaseSwapchainImagesInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkReleaseSwapchainImagesInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkReleaseSwapchainImagesInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkReleaseSwapchainImagesInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkReleaseSwapchainImagesInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkReleaseSwapchainImagesInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkReleaseSwapchainImagesInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkReleaseSwapchainImagesInfoEXT sType(@CType("VkStructureType") int value) { VkReleaseSwapchainImagesInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkReleaseSwapchainImagesInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkReleaseSwapchainImagesInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkReleaseSwapchainImagesInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkReleaseSwapchainImagesInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkReleaseSwapchainImagesInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkReleaseSwapchainImagesInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkReleaseSwapchainImagesInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkReleaseSwapchainImagesInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment get_swapchain(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_swapchain.get(segment, 0L, index); } + /// {@return `swapchain`} + /// @param segment the segment of the struct + public static @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment get_swapchain(MemorySegment segment) { return VkReleaseSwapchainImagesInfoEXT.get_swapchain(segment, 0L); } + /// {@return `swapchain` at the given index} + /// @param index the index + public @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment swapchainAt(long index) { return VkReleaseSwapchainImagesInfoEXT.get_swapchain(this.segment(), index); } + /// {@return `swapchain`} + public @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment swapchain() { return VkReleaseSwapchainImagesInfoEXT.get_swapchain(this.segment()); } + /// Sets `swapchain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchain(MemorySegment segment, long index, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VH_swapchain.set(segment, 0L, index, value); } + /// Sets `swapchain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchain(MemorySegment segment, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkReleaseSwapchainImagesInfoEXT.set_swapchain(segment, 0L, value); } + /// Sets `swapchain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkReleaseSwapchainImagesInfoEXT swapchainAt(long index, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkReleaseSwapchainImagesInfoEXT.set_swapchain(this.segment(), index, value); return this; } + /// Sets `swapchain` with the given value. + /// @param value the value + /// @return `this` + public VkReleaseSwapchainImagesInfoEXT swapchain(@CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkReleaseSwapchainImagesInfoEXT.set_swapchain(this.segment(), value); return this; } + + /// {@return `imageIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_imageIndexCount(MemorySegment segment, long index) { return (int) VH_imageIndexCount.get(segment, 0L, index); } + /// {@return `imageIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_imageIndexCount(MemorySegment segment) { return VkReleaseSwapchainImagesInfoEXT.get_imageIndexCount(segment, 0L); } + /// {@return `imageIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int imageIndexCountAt(long index) { return VkReleaseSwapchainImagesInfoEXT.get_imageIndexCount(this.segment(), index); } + /// {@return `imageIndexCount`} + public @CType("uint32_t") int imageIndexCount() { return VkReleaseSwapchainImagesInfoEXT.get_imageIndexCount(this.segment()); } + /// Sets `imageIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_imageIndexCount.set(segment, 0L, index, value); } + /// Sets `imageIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkReleaseSwapchainImagesInfoEXT.set_imageIndexCount(segment, 0L, value); } + /// Sets `imageIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkReleaseSwapchainImagesInfoEXT imageIndexCountAt(long index, @CType("uint32_t") int value) { VkReleaseSwapchainImagesInfoEXT.set_imageIndexCount(this.segment(), index, value); return this; } + /// Sets `imageIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkReleaseSwapchainImagesInfoEXT imageIndexCount(@CType("uint32_t") int value) { VkReleaseSwapchainImagesInfoEXT.set_imageIndexCount(this.segment(), value); return this; } + + /// {@return `pImageIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pImageIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pImageIndices.get(segment, 0L, index); } + /// {@return `pImageIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pImageIndices(MemorySegment segment) { return VkReleaseSwapchainImagesInfoEXT.get_pImageIndices(segment, 0L); } + /// {@return `pImageIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pImageIndicesAt(long index) { return VkReleaseSwapchainImagesInfoEXT.get_pImageIndices(this.segment(), index); } + /// {@return `pImageIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pImageIndices() { return VkReleaseSwapchainImagesInfoEXT.get_pImageIndices(this.segment()); } + /// Sets `pImageIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pImageIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pImageIndices.set(segment, 0L, index, value); } + /// Sets `pImageIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pImageIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkReleaseSwapchainImagesInfoEXT.set_pImageIndices(segment, 0L, value); } + /// Sets `pImageIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkReleaseSwapchainImagesInfoEXT pImageIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkReleaseSwapchainImagesInfoEXT.set_pImageIndices(this.segment(), index, value); return this; } + /// Sets `pImageIndices` with the given value. + /// @param value the value + /// @return `this` + public VkReleaseSwapchainImagesInfoEXT pImageIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkReleaseSwapchainImagesInfoEXT.set_pImageIndices(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassCreationControlEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassCreationControlEXT.java new file mode 100644 index 00000000..158bca23 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassCreationControlEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### disallowMerging +/// [VarHandle][#VH_disallowMerging] - [Getter][#disallowMerging()] - [Setter][#disallowMerging(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassCreationControlEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 disallowMerging; +/// } VkRenderPassCreationControlEXT; +/// ``` +public final class VkRenderPassCreationControlEXT extends Struct { + /// The struct layout of `VkRenderPassCreationControlEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("disallowMerging") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `disallowMerging` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disallowMerging = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disallowMerging")); + + /// Creates `VkRenderPassCreationControlEXT` with the given segment. + /// @param segment the memory segment + public VkRenderPassCreationControlEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassCreationControlEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreationControlEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreationControlEXT(segment); } + + /// Creates `VkRenderPassCreationControlEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreationControlEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreationControlEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassCreationControlEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreationControlEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreationControlEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassCreationControlEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassCreationControlEXT` + public static VkRenderPassCreationControlEXT alloc(SegmentAllocator allocator) { return new VkRenderPassCreationControlEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassCreationControlEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassCreationControlEXT` + public static VkRenderPassCreationControlEXT alloc(SegmentAllocator allocator, long count) { return new VkRenderPassCreationControlEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassCreationControlEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassCreationControlEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassCreationControlEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassCreationControlEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreationControlEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassCreationControlEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreationControlEXT sType(@CType("VkStructureType") int value) { VkRenderPassCreationControlEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassCreationControlEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassCreationControlEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassCreationControlEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreationControlEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreationControlEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreationControlEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreationControlEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreationControlEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `disallowMerging` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_disallowMerging(MemorySegment segment, long index) { return (int) VH_disallowMerging.get(segment, 0L, index); } + /// {@return `disallowMerging`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_disallowMerging(MemorySegment segment) { return VkRenderPassCreationControlEXT.get_disallowMerging(segment, 0L); } + /// {@return `disallowMerging` at the given index} + /// @param index the index + public @CType("VkBool32") int disallowMergingAt(long index) { return VkRenderPassCreationControlEXT.get_disallowMerging(this.segment(), index); } + /// {@return `disallowMerging`} + public @CType("VkBool32") int disallowMerging() { return VkRenderPassCreationControlEXT.get_disallowMerging(this.segment()); } + /// Sets `disallowMerging` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disallowMerging(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_disallowMerging.set(segment, 0L, index, value); } + /// Sets `disallowMerging` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disallowMerging(MemorySegment segment, @CType("VkBool32") int value) { VkRenderPassCreationControlEXT.set_disallowMerging(segment, 0L, value); } + /// Sets `disallowMerging` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreationControlEXT disallowMergingAt(long index, @CType("VkBool32") int value) { VkRenderPassCreationControlEXT.set_disallowMerging(this.segment(), index, value); return this; } + /// Sets `disallowMerging` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreationControlEXT disallowMerging(@CType("VkBool32") int value) { VkRenderPassCreationControlEXT.set_disallowMerging(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassCreationFeedbackCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassCreationFeedbackCreateInfoEXT.java new file mode 100644 index 00000000..6416e63e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassCreationFeedbackCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pRenderPassFeedback +/// [VarHandle][#VH_pRenderPassFeedback] - [Getter][#pRenderPassFeedback()] - [Setter][#pRenderPassFeedback(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassCreationFeedbackCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkRenderPassCreationFeedbackInfoEXT * pRenderPassFeedback; +/// } VkRenderPassCreationFeedbackCreateInfoEXT; +/// ``` +public final class VkRenderPassCreationFeedbackCreateInfoEXT extends Struct { + /// The struct layout of `VkRenderPassCreationFeedbackCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pRenderPassFeedback") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pRenderPassFeedback` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRenderPassFeedback = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRenderPassFeedback")); + + /// Creates `VkRenderPassCreationFeedbackCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkRenderPassCreationFeedbackCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassCreationFeedbackCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreationFeedbackCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreationFeedbackCreateInfoEXT(segment); } + + /// Creates `VkRenderPassCreationFeedbackCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreationFeedbackCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreationFeedbackCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassCreationFeedbackCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreationFeedbackCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreationFeedbackCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassCreationFeedbackCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassCreationFeedbackCreateInfoEXT` + public static VkRenderPassCreationFeedbackCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkRenderPassCreationFeedbackCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassCreationFeedbackCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassCreationFeedbackCreateInfoEXT` + public static VkRenderPassCreationFeedbackCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkRenderPassCreationFeedbackCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassCreationFeedbackCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassCreationFeedbackCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassCreationFeedbackCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassCreationFeedbackCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreationFeedbackCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassCreationFeedbackCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreationFeedbackCreateInfoEXT sType(@CType("VkStructureType") int value) { VkRenderPassCreationFeedbackCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassCreationFeedbackCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassCreationFeedbackCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassCreationFeedbackCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreationFeedbackCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreationFeedbackCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreationFeedbackCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreationFeedbackCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreationFeedbackCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pRenderPassFeedback` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderPassCreationFeedbackInfoEXT *") java.lang.foreign.MemorySegment get_pRenderPassFeedback(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRenderPassFeedback.get(segment, 0L, index); } + /// {@return `pRenderPassFeedback`} + /// @param segment the segment of the struct + public static @CType("VkRenderPassCreationFeedbackInfoEXT *") java.lang.foreign.MemorySegment get_pRenderPassFeedback(MemorySegment segment) { return VkRenderPassCreationFeedbackCreateInfoEXT.get_pRenderPassFeedback(segment, 0L); } + /// {@return `pRenderPassFeedback` at the given index} + /// @param index the index + public @CType("VkRenderPassCreationFeedbackInfoEXT *") java.lang.foreign.MemorySegment pRenderPassFeedbackAt(long index) { return VkRenderPassCreationFeedbackCreateInfoEXT.get_pRenderPassFeedback(this.segment(), index); } + /// {@return `pRenderPassFeedback`} + public @CType("VkRenderPassCreationFeedbackInfoEXT *") java.lang.foreign.MemorySegment pRenderPassFeedback() { return VkRenderPassCreationFeedbackCreateInfoEXT.get_pRenderPassFeedback(this.segment()); } + /// Sets `pRenderPassFeedback` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRenderPassFeedback(MemorySegment segment, long index, @CType("VkRenderPassCreationFeedbackInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pRenderPassFeedback.set(segment, 0L, index, value); } + /// Sets `pRenderPassFeedback` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRenderPassFeedback(MemorySegment segment, @CType("VkRenderPassCreationFeedbackInfoEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassCreationFeedbackCreateInfoEXT.set_pRenderPassFeedback(segment, 0L, value); } + /// Sets `pRenderPassFeedback` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreationFeedbackCreateInfoEXT pRenderPassFeedbackAt(long index, @CType("VkRenderPassCreationFeedbackInfoEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassCreationFeedbackCreateInfoEXT.set_pRenderPassFeedback(this.segment(), index, value); return this; } + /// Sets `pRenderPassFeedback` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreationFeedbackCreateInfoEXT pRenderPassFeedback(@CType("VkRenderPassCreationFeedbackInfoEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassCreationFeedbackCreateInfoEXT.set_pRenderPassFeedback(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassCreationFeedbackInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassCreationFeedbackInfoEXT.java new file mode 100644 index 00000000..d0132ac3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassCreationFeedbackInfoEXT.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### postMergeSubpassCount +/// [VarHandle][#VH_postMergeSubpassCount] - [Getter][#postMergeSubpassCount()] - [Setter][#postMergeSubpassCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassCreationFeedbackInfoEXT { +/// uint32_t postMergeSubpassCount; +/// } VkRenderPassCreationFeedbackInfoEXT; +/// ``` +public final class VkRenderPassCreationFeedbackInfoEXT extends Struct { + /// The struct layout of `VkRenderPassCreationFeedbackInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("postMergeSubpassCount") + ); + /// The [VarHandle] of `postMergeSubpassCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_postMergeSubpassCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("postMergeSubpassCount")); + + /// Creates `VkRenderPassCreationFeedbackInfoEXT` with the given segment. + /// @param segment the memory segment + public VkRenderPassCreationFeedbackInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassCreationFeedbackInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreationFeedbackInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreationFeedbackInfoEXT(segment); } + + /// Creates `VkRenderPassCreationFeedbackInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreationFeedbackInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreationFeedbackInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassCreationFeedbackInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreationFeedbackInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreationFeedbackInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassCreationFeedbackInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassCreationFeedbackInfoEXT` + public static VkRenderPassCreationFeedbackInfoEXT alloc(SegmentAllocator allocator) { return new VkRenderPassCreationFeedbackInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassCreationFeedbackInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassCreationFeedbackInfoEXT` + public static VkRenderPassCreationFeedbackInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkRenderPassCreationFeedbackInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `postMergeSubpassCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_postMergeSubpassCount(MemorySegment segment, long index) { return (int) VH_postMergeSubpassCount.get(segment, 0L, index); } + /// {@return `postMergeSubpassCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_postMergeSubpassCount(MemorySegment segment) { return VkRenderPassCreationFeedbackInfoEXT.get_postMergeSubpassCount(segment, 0L); } + /// {@return `postMergeSubpassCount` at the given index} + /// @param index the index + public @CType("uint32_t") int postMergeSubpassCountAt(long index) { return VkRenderPassCreationFeedbackInfoEXT.get_postMergeSubpassCount(this.segment(), index); } + /// {@return `postMergeSubpassCount`} + public @CType("uint32_t") int postMergeSubpassCount() { return VkRenderPassCreationFeedbackInfoEXT.get_postMergeSubpassCount(this.segment()); } + /// Sets `postMergeSubpassCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_postMergeSubpassCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_postMergeSubpassCount.set(segment, 0L, index, value); } + /// Sets `postMergeSubpassCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_postMergeSubpassCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassCreationFeedbackInfoEXT.set_postMergeSubpassCount(segment, 0L, value); } + /// Sets `postMergeSubpassCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreationFeedbackInfoEXT postMergeSubpassCountAt(long index, @CType("uint32_t") int value) { VkRenderPassCreationFeedbackInfoEXT.set_postMergeSubpassCount(this.segment(), index, value); return this; } + /// Sets `postMergeSubpassCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreationFeedbackInfoEXT postMergeSubpassCount(@CType("uint32_t") int value) { VkRenderPassCreationFeedbackInfoEXT.set_postMergeSubpassCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassFragmentDensityMapCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassFragmentDensityMapCreateInfoEXT.java new file mode 100644 index 00000000..ed1a1362 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassFragmentDensityMapCreateInfoEXT.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fragmentDensityMapAttachment +/// [Byte offset][#OFFSET_fragmentDensityMapAttachment] - [Memory layout][#ML_fragmentDensityMapAttachment] - [Getter][#fragmentDensityMapAttachment()] - [Setter][#fragmentDensityMapAttachment(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassFragmentDensityMapCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkAttachmentReference fragmentDensityMapAttachment; +/// } VkRenderPassFragmentDensityMapCreateInfoEXT; +/// ``` +public final class VkRenderPassFragmentDensityMapCreateInfoEXT extends Struct { + /// The struct layout of `VkRenderPassFragmentDensityMapCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkAttachmentReference.LAYOUT.withName("fragmentDensityMapAttachment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `fragmentDensityMapAttachment`. + public static final long OFFSET_fragmentDensityMapAttachment = LAYOUT.byteOffset(PathElement.groupElement("fragmentDensityMapAttachment")); + /// The memory layout of `fragmentDensityMapAttachment`. + public static final MemoryLayout ML_fragmentDensityMapAttachment = LAYOUT.select(PathElement.groupElement("fragmentDensityMapAttachment")); + + /// Creates `VkRenderPassFragmentDensityMapCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkRenderPassFragmentDensityMapCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassFragmentDensityMapCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassFragmentDensityMapCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassFragmentDensityMapCreateInfoEXT(segment); } + + /// Creates `VkRenderPassFragmentDensityMapCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassFragmentDensityMapCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassFragmentDensityMapCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassFragmentDensityMapCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassFragmentDensityMapCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassFragmentDensityMapCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassFragmentDensityMapCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassFragmentDensityMapCreateInfoEXT` + public static VkRenderPassFragmentDensityMapCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkRenderPassFragmentDensityMapCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassFragmentDensityMapCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassFragmentDensityMapCreateInfoEXT` + public static VkRenderPassFragmentDensityMapCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkRenderPassFragmentDensityMapCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassFragmentDensityMapCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassFragmentDensityMapCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassFragmentDensityMapCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassFragmentDensityMapCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassFragmentDensityMapCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassFragmentDensityMapCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassFragmentDensityMapCreateInfoEXT sType(@CType("VkStructureType") int value) { VkRenderPassFragmentDensityMapCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassFragmentDensityMapCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassFragmentDensityMapCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassFragmentDensityMapCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassFragmentDensityMapCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassFragmentDensityMapCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassFragmentDensityMapCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassFragmentDensityMapCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassFragmentDensityMapCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `fragmentDensityMapAttachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentReference") java.lang.foreign.MemorySegment get_fragmentDensityMapAttachment(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_fragmentDensityMapAttachment, index), ML_fragmentDensityMapAttachment); } + /// {@return `fragmentDensityMapAttachment`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentReference") java.lang.foreign.MemorySegment get_fragmentDensityMapAttachment(MemorySegment segment) { return VkRenderPassFragmentDensityMapCreateInfoEXT.get_fragmentDensityMapAttachment(segment, 0L); } + /// {@return `fragmentDensityMapAttachment` at the given index} + /// @param index the index + public @CType("VkAttachmentReference") java.lang.foreign.MemorySegment fragmentDensityMapAttachmentAt(long index) { return VkRenderPassFragmentDensityMapCreateInfoEXT.get_fragmentDensityMapAttachment(this.segment(), index); } + /// {@return `fragmentDensityMapAttachment`} + public @CType("VkAttachmentReference") java.lang.foreign.MemorySegment fragmentDensityMapAttachment() { return VkRenderPassFragmentDensityMapCreateInfoEXT.get_fragmentDensityMapAttachment(this.segment()); } + /// Sets `fragmentDensityMapAttachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentDensityMapAttachment(MemorySegment segment, long index, @CType("VkAttachmentReference") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_fragmentDensityMapAttachment, index), ML_fragmentDensityMapAttachment.byteSize()); } + /// Sets `fragmentDensityMapAttachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentDensityMapAttachment(MemorySegment segment, @CType("VkAttachmentReference") java.lang.foreign.MemorySegment value) { VkRenderPassFragmentDensityMapCreateInfoEXT.set_fragmentDensityMapAttachment(segment, 0L, value); } + /// Sets `fragmentDensityMapAttachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassFragmentDensityMapCreateInfoEXT fragmentDensityMapAttachmentAt(long index, @CType("VkAttachmentReference") java.lang.foreign.MemorySegment value) { VkRenderPassFragmentDensityMapCreateInfoEXT.set_fragmentDensityMapAttachment(this.segment(), index, value); return this; } + /// Sets `fragmentDensityMapAttachment` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassFragmentDensityMapCreateInfoEXT fragmentDensityMapAttachment(@CType("VkAttachmentReference") java.lang.foreign.MemorySegment value) { VkRenderPassFragmentDensityMapCreateInfoEXT.set_fragmentDensityMapAttachment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassSampleLocationsBeginInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassSampleLocationsBeginInfoEXT.java new file mode 100644 index 00000000..82ca7aa3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassSampleLocationsBeginInfoEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### attachmentInitialSampleLocationsCount +/// [VarHandle][#VH_attachmentInitialSampleLocationsCount] - [Getter][#attachmentInitialSampleLocationsCount()] - [Setter][#attachmentInitialSampleLocationsCount(int)] +/// ### pAttachmentInitialSampleLocations +/// [VarHandle][#VH_pAttachmentInitialSampleLocations] - [Getter][#pAttachmentInitialSampleLocations()] - [Setter][#pAttachmentInitialSampleLocations(java.lang.foreign.MemorySegment)] +/// ### postSubpassSampleLocationsCount +/// [VarHandle][#VH_postSubpassSampleLocationsCount] - [Getter][#postSubpassSampleLocationsCount()] - [Setter][#postSubpassSampleLocationsCount(int)] +/// ### pPostSubpassSampleLocations +/// [VarHandle][#VH_pPostSubpassSampleLocations] - [Getter][#pPostSubpassSampleLocations()] - [Setter][#pPostSubpassSampleLocations(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassSampleLocationsBeginInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t attachmentInitialSampleLocationsCount; +/// const VkAttachmentSampleLocationsEXT * pAttachmentInitialSampleLocations; +/// uint32_t postSubpassSampleLocationsCount; +/// const VkSubpassSampleLocationsEXT * pPostSubpassSampleLocations; +/// } VkRenderPassSampleLocationsBeginInfoEXT; +/// ``` +public final class VkRenderPassSampleLocationsBeginInfoEXT extends Struct { + /// The struct layout of `VkRenderPassSampleLocationsBeginInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("attachmentInitialSampleLocationsCount"), + ValueLayout.ADDRESS.withName("pAttachmentInitialSampleLocations"), + ValueLayout.JAVA_INT.withName("postSubpassSampleLocationsCount"), + ValueLayout.ADDRESS.withName("pPostSubpassSampleLocations") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `attachmentInitialSampleLocationsCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentInitialSampleLocationsCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentInitialSampleLocationsCount")); + /// The [VarHandle] of `pAttachmentInitialSampleLocations` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttachmentInitialSampleLocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttachmentInitialSampleLocations")); + /// The [VarHandle] of `postSubpassSampleLocationsCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_postSubpassSampleLocationsCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("postSubpassSampleLocationsCount")); + /// The [VarHandle] of `pPostSubpassSampleLocations` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPostSubpassSampleLocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPostSubpassSampleLocations")); + + /// Creates `VkRenderPassSampleLocationsBeginInfoEXT` with the given segment. + /// @param segment the memory segment + public VkRenderPassSampleLocationsBeginInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassSampleLocationsBeginInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassSampleLocationsBeginInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassSampleLocationsBeginInfoEXT(segment); } + + /// Creates `VkRenderPassSampleLocationsBeginInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassSampleLocationsBeginInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassSampleLocationsBeginInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassSampleLocationsBeginInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassSampleLocationsBeginInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassSampleLocationsBeginInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassSampleLocationsBeginInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassSampleLocationsBeginInfoEXT` + public static VkRenderPassSampleLocationsBeginInfoEXT alloc(SegmentAllocator allocator) { return new VkRenderPassSampleLocationsBeginInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassSampleLocationsBeginInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassSampleLocationsBeginInfoEXT` + public static VkRenderPassSampleLocationsBeginInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkRenderPassSampleLocationsBeginInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassSampleLocationsBeginInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassSampleLocationsBeginInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassSampleLocationsBeginInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassSampleLocationsBeginInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassSampleLocationsBeginInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT sType(@CType("VkStructureType") int value) { VkRenderPassSampleLocationsBeginInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassSampleLocationsBeginInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassSampleLocationsBeginInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassSampleLocationsBeginInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassSampleLocationsBeginInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassSampleLocationsBeginInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassSampleLocationsBeginInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `attachmentInitialSampleLocationsCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachmentInitialSampleLocationsCount(MemorySegment segment, long index) { return (int) VH_attachmentInitialSampleLocationsCount.get(segment, 0L, index); } + /// {@return `attachmentInitialSampleLocationsCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachmentInitialSampleLocationsCount(MemorySegment segment) { return VkRenderPassSampleLocationsBeginInfoEXT.get_attachmentInitialSampleLocationsCount(segment, 0L); } + /// {@return `attachmentInitialSampleLocationsCount` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentInitialSampleLocationsCountAt(long index) { return VkRenderPassSampleLocationsBeginInfoEXT.get_attachmentInitialSampleLocationsCount(this.segment(), index); } + /// {@return `attachmentInitialSampleLocationsCount`} + public @CType("uint32_t") int attachmentInitialSampleLocationsCount() { return VkRenderPassSampleLocationsBeginInfoEXT.get_attachmentInitialSampleLocationsCount(this.segment()); } + /// Sets `attachmentInitialSampleLocationsCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentInitialSampleLocationsCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachmentInitialSampleLocationsCount.set(segment, 0L, index, value); } + /// Sets `attachmentInitialSampleLocationsCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentInitialSampleLocationsCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassSampleLocationsBeginInfoEXT.set_attachmentInitialSampleLocationsCount(segment, 0L, value); } + /// Sets `attachmentInitialSampleLocationsCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT attachmentInitialSampleLocationsCountAt(long index, @CType("uint32_t") int value) { VkRenderPassSampleLocationsBeginInfoEXT.set_attachmentInitialSampleLocationsCount(this.segment(), index, value); return this; } + /// Sets `attachmentInitialSampleLocationsCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT attachmentInitialSampleLocationsCount(@CType("uint32_t") int value) { VkRenderPassSampleLocationsBeginInfoEXT.set_attachmentInitialSampleLocationsCount(this.segment(), value); return this; } + + /// {@return `pAttachmentInitialSampleLocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentSampleLocationsEXT *") java.lang.foreign.MemorySegment get_pAttachmentInitialSampleLocations(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttachmentInitialSampleLocations.get(segment, 0L, index); } + /// {@return `pAttachmentInitialSampleLocations`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentSampleLocationsEXT *") java.lang.foreign.MemorySegment get_pAttachmentInitialSampleLocations(MemorySegment segment) { return VkRenderPassSampleLocationsBeginInfoEXT.get_pAttachmentInitialSampleLocations(segment, 0L); } + /// {@return `pAttachmentInitialSampleLocations` at the given index} + /// @param index the index + public @CType("const VkAttachmentSampleLocationsEXT *") java.lang.foreign.MemorySegment pAttachmentInitialSampleLocationsAt(long index) { return VkRenderPassSampleLocationsBeginInfoEXT.get_pAttachmentInitialSampleLocations(this.segment(), index); } + /// {@return `pAttachmentInitialSampleLocations`} + public @CType("const VkAttachmentSampleLocationsEXT *") java.lang.foreign.MemorySegment pAttachmentInitialSampleLocations() { return VkRenderPassSampleLocationsBeginInfoEXT.get_pAttachmentInitialSampleLocations(this.segment()); } + /// Sets `pAttachmentInitialSampleLocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttachmentInitialSampleLocations(MemorySegment segment, long index, @CType("const VkAttachmentSampleLocationsEXT *") java.lang.foreign.MemorySegment value) { VH_pAttachmentInitialSampleLocations.set(segment, 0L, index, value); } + /// Sets `pAttachmentInitialSampleLocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttachmentInitialSampleLocations(MemorySegment segment, @CType("const VkAttachmentSampleLocationsEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassSampleLocationsBeginInfoEXT.set_pAttachmentInitialSampleLocations(segment, 0L, value); } + /// Sets `pAttachmentInitialSampleLocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT pAttachmentInitialSampleLocationsAt(long index, @CType("const VkAttachmentSampleLocationsEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassSampleLocationsBeginInfoEXT.set_pAttachmentInitialSampleLocations(this.segment(), index, value); return this; } + /// Sets `pAttachmentInitialSampleLocations` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT pAttachmentInitialSampleLocations(@CType("const VkAttachmentSampleLocationsEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassSampleLocationsBeginInfoEXT.set_pAttachmentInitialSampleLocations(this.segment(), value); return this; } + + /// {@return `postSubpassSampleLocationsCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_postSubpassSampleLocationsCount(MemorySegment segment, long index) { return (int) VH_postSubpassSampleLocationsCount.get(segment, 0L, index); } + /// {@return `postSubpassSampleLocationsCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_postSubpassSampleLocationsCount(MemorySegment segment) { return VkRenderPassSampleLocationsBeginInfoEXT.get_postSubpassSampleLocationsCount(segment, 0L); } + /// {@return `postSubpassSampleLocationsCount` at the given index} + /// @param index the index + public @CType("uint32_t") int postSubpassSampleLocationsCountAt(long index) { return VkRenderPassSampleLocationsBeginInfoEXT.get_postSubpassSampleLocationsCount(this.segment(), index); } + /// {@return `postSubpassSampleLocationsCount`} + public @CType("uint32_t") int postSubpassSampleLocationsCount() { return VkRenderPassSampleLocationsBeginInfoEXT.get_postSubpassSampleLocationsCount(this.segment()); } + /// Sets `postSubpassSampleLocationsCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_postSubpassSampleLocationsCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_postSubpassSampleLocationsCount.set(segment, 0L, index, value); } + /// Sets `postSubpassSampleLocationsCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_postSubpassSampleLocationsCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassSampleLocationsBeginInfoEXT.set_postSubpassSampleLocationsCount(segment, 0L, value); } + /// Sets `postSubpassSampleLocationsCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT postSubpassSampleLocationsCountAt(long index, @CType("uint32_t") int value) { VkRenderPassSampleLocationsBeginInfoEXT.set_postSubpassSampleLocationsCount(this.segment(), index, value); return this; } + /// Sets `postSubpassSampleLocationsCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT postSubpassSampleLocationsCount(@CType("uint32_t") int value) { VkRenderPassSampleLocationsBeginInfoEXT.set_postSubpassSampleLocationsCount(this.segment(), value); return this; } + + /// {@return `pPostSubpassSampleLocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSubpassSampleLocationsEXT *") java.lang.foreign.MemorySegment get_pPostSubpassSampleLocations(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPostSubpassSampleLocations.get(segment, 0L, index); } + /// {@return `pPostSubpassSampleLocations`} + /// @param segment the segment of the struct + public static @CType("const VkSubpassSampleLocationsEXT *") java.lang.foreign.MemorySegment get_pPostSubpassSampleLocations(MemorySegment segment) { return VkRenderPassSampleLocationsBeginInfoEXT.get_pPostSubpassSampleLocations(segment, 0L); } + /// {@return `pPostSubpassSampleLocations` at the given index} + /// @param index the index + public @CType("const VkSubpassSampleLocationsEXT *") java.lang.foreign.MemorySegment pPostSubpassSampleLocationsAt(long index) { return VkRenderPassSampleLocationsBeginInfoEXT.get_pPostSubpassSampleLocations(this.segment(), index); } + /// {@return `pPostSubpassSampleLocations`} + public @CType("const VkSubpassSampleLocationsEXT *") java.lang.foreign.MemorySegment pPostSubpassSampleLocations() { return VkRenderPassSampleLocationsBeginInfoEXT.get_pPostSubpassSampleLocations(this.segment()); } + /// Sets `pPostSubpassSampleLocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPostSubpassSampleLocations(MemorySegment segment, long index, @CType("const VkSubpassSampleLocationsEXT *") java.lang.foreign.MemorySegment value) { VH_pPostSubpassSampleLocations.set(segment, 0L, index, value); } + /// Sets `pPostSubpassSampleLocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPostSubpassSampleLocations(MemorySegment segment, @CType("const VkSubpassSampleLocationsEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassSampleLocationsBeginInfoEXT.set_pPostSubpassSampleLocations(segment, 0L, value); } + /// Sets `pPostSubpassSampleLocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT pPostSubpassSampleLocationsAt(long index, @CType("const VkSubpassSampleLocationsEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassSampleLocationsBeginInfoEXT.set_pPostSubpassSampleLocations(this.segment(), index, value); return this; } + /// Sets `pPostSubpassSampleLocations` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSampleLocationsBeginInfoEXT pPostSubpassSampleLocations(@CType("const VkSubpassSampleLocationsEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassSampleLocationsBeginInfoEXT.set_pPostSubpassSampleLocations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassSubpassFeedbackCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassSubpassFeedbackCreateInfoEXT.java new file mode 100644 index 00000000..ed027611 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassSubpassFeedbackCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pSubpassFeedback +/// [VarHandle][#VH_pSubpassFeedback] - [Getter][#pSubpassFeedback()] - [Setter][#pSubpassFeedback(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassSubpassFeedbackCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkRenderPassSubpassFeedbackInfoEXT * pSubpassFeedback; +/// } VkRenderPassSubpassFeedbackCreateInfoEXT; +/// ``` +public final class VkRenderPassSubpassFeedbackCreateInfoEXT extends Struct { + /// The struct layout of `VkRenderPassSubpassFeedbackCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pSubpassFeedback") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pSubpassFeedback` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSubpassFeedback = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSubpassFeedback")); + + /// Creates `VkRenderPassSubpassFeedbackCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkRenderPassSubpassFeedbackCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassSubpassFeedbackCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassSubpassFeedbackCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassSubpassFeedbackCreateInfoEXT(segment); } + + /// Creates `VkRenderPassSubpassFeedbackCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassSubpassFeedbackCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassSubpassFeedbackCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassSubpassFeedbackCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassSubpassFeedbackCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassSubpassFeedbackCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassSubpassFeedbackCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassSubpassFeedbackCreateInfoEXT` + public static VkRenderPassSubpassFeedbackCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkRenderPassSubpassFeedbackCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassSubpassFeedbackCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassSubpassFeedbackCreateInfoEXT` + public static VkRenderPassSubpassFeedbackCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkRenderPassSubpassFeedbackCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassSubpassFeedbackCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassSubpassFeedbackCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassSubpassFeedbackCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassSubpassFeedbackCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassSubpassFeedbackCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackCreateInfoEXT sType(@CType("VkStructureType") int value) { VkRenderPassSubpassFeedbackCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassSubpassFeedbackCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassSubpassFeedbackCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassSubpassFeedbackCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassSubpassFeedbackCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassSubpassFeedbackCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassSubpassFeedbackCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `pSubpassFeedback` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderPassSubpassFeedbackInfoEXT *") java.lang.foreign.MemorySegment get_pSubpassFeedback(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSubpassFeedback.get(segment, 0L, index); } + /// {@return `pSubpassFeedback`} + /// @param segment the segment of the struct + public static @CType("VkRenderPassSubpassFeedbackInfoEXT *") java.lang.foreign.MemorySegment get_pSubpassFeedback(MemorySegment segment) { return VkRenderPassSubpassFeedbackCreateInfoEXT.get_pSubpassFeedback(segment, 0L); } + /// {@return `pSubpassFeedback` at the given index} + /// @param index the index + public @CType("VkRenderPassSubpassFeedbackInfoEXT *") java.lang.foreign.MemorySegment pSubpassFeedbackAt(long index) { return VkRenderPassSubpassFeedbackCreateInfoEXT.get_pSubpassFeedback(this.segment(), index); } + /// {@return `pSubpassFeedback`} + public @CType("VkRenderPassSubpassFeedbackInfoEXT *") java.lang.foreign.MemorySegment pSubpassFeedback() { return VkRenderPassSubpassFeedbackCreateInfoEXT.get_pSubpassFeedback(this.segment()); } + /// Sets `pSubpassFeedback` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSubpassFeedback(MemorySegment segment, long index, @CType("VkRenderPassSubpassFeedbackInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pSubpassFeedback.set(segment, 0L, index, value); } + /// Sets `pSubpassFeedback` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSubpassFeedback(MemorySegment segment, @CType("VkRenderPassSubpassFeedbackInfoEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassSubpassFeedbackCreateInfoEXT.set_pSubpassFeedback(segment, 0L, value); } + /// Sets `pSubpassFeedback` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackCreateInfoEXT pSubpassFeedbackAt(long index, @CType("VkRenderPassSubpassFeedbackInfoEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassSubpassFeedbackCreateInfoEXT.set_pSubpassFeedback(this.segment(), index, value); return this; } + /// Sets `pSubpassFeedback` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackCreateInfoEXT pSubpassFeedback(@CType("VkRenderPassSubpassFeedbackInfoEXT *") java.lang.foreign.MemorySegment value) { VkRenderPassSubpassFeedbackCreateInfoEXT.set_pSubpassFeedback(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassSubpassFeedbackInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassSubpassFeedbackInfoEXT.java new file mode 100644 index 00000000..3b9182b8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderPassSubpassFeedbackInfoEXT.java @@ -0,0 +1,202 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### subpassMergeStatus +/// [VarHandle][#VH_subpassMergeStatus] - [Getter][#subpassMergeStatus()] - [Setter][#subpassMergeStatus(int)] +/// ### description +/// [Byte offset handle][#MH_description] - [Memory layout][#ML_description] - [Getter][#description(long)] - [Setter][#description(long, java.lang.foreign.MemorySegment)] +/// ### postMergeIndex +/// [VarHandle][#VH_postMergeIndex] - [Getter][#postMergeIndex()] - [Setter][#postMergeIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassSubpassFeedbackInfoEXT { +/// VkSubpassMergeStatusEXT subpassMergeStatus; +/// char[VK_MAX_DESCRIPTION_SIZE] description; +/// uint32_t postMergeIndex; +/// } VkRenderPassSubpassFeedbackInfoEXT; +/// ``` +public final class VkRenderPassSubpassFeedbackInfoEXT extends Struct { + /// The struct layout of `VkRenderPassSubpassFeedbackInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("subpassMergeStatus"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("description"), + ValueLayout.JAVA_INT.withName("postMergeIndex") + ); + /// The [VarHandle] of `subpassMergeStatus` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpassMergeStatus = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpassMergeStatus")); + /// The byte offset handle of `description` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_description = LAYOUT.byteOffsetHandle(PathElement.groupElement("description"), PathElement.sequenceElement()); + /// The memory layout of `description`. + public static final MemoryLayout ML_description = LAYOUT.select(PathElement.groupElement("description")); + /// The [VarHandle] of `postMergeIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_postMergeIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("postMergeIndex")); + + /// Creates `VkRenderPassSubpassFeedbackInfoEXT` with the given segment. + /// @param segment the memory segment + public VkRenderPassSubpassFeedbackInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassSubpassFeedbackInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassSubpassFeedbackInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassSubpassFeedbackInfoEXT(segment); } + + /// Creates `VkRenderPassSubpassFeedbackInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassSubpassFeedbackInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassSubpassFeedbackInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassSubpassFeedbackInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassSubpassFeedbackInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassSubpassFeedbackInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassSubpassFeedbackInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassSubpassFeedbackInfoEXT` + public static VkRenderPassSubpassFeedbackInfoEXT alloc(SegmentAllocator allocator) { return new VkRenderPassSubpassFeedbackInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassSubpassFeedbackInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassSubpassFeedbackInfoEXT` + public static VkRenderPassSubpassFeedbackInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkRenderPassSubpassFeedbackInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `subpassMergeStatus` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSubpassMergeStatusEXT") int get_subpassMergeStatus(MemorySegment segment, long index) { return (int) VH_subpassMergeStatus.get(segment, 0L, index); } + /// {@return `subpassMergeStatus`} + /// @param segment the segment of the struct + public static @CType("VkSubpassMergeStatusEXT") int get_subpassMergeStatus(MemorySegment segment) { return VkRenderPassSubpassFeedbackInfoEXT.get_subpassMergeStatus(segment, 0L); } + /// {@return `subpassMergeStatus` at the given index} + /// @param index the index + public @CType("VkSubpassMergeStatusEXT") int subpassMergeStatusAt(long index) { return VkRenderPassSubpassFeedbackInfoEXT.get_subpassMergeStatus(this.segment(), index); } + /// {@return `subpassMergeStatus`} + public @CType("VkSubpassMergeStatusEXT") int subpassMergeStatus() { return VkRenderPassSubpassFeedbackInfoEXT.get_subpassMergeStatus(this.segment()); } + /// Sets `subpassMergeStatus` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpassMergeStatus(MemorySegment segment, long index, @CType("VkSubpassMergeStatusEXT") int value) { VH_subpassMergeStatus.set(segment, 0L, index, value); } + /// Sets `subpassMergeStatus` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpassMergeStatus(MemorySegment segment, @CType("VkSubpassMergeStatusEXT") int value) { VkRenderPassSubpassFeedbackInfoEXT.set_subpassMergeStatus(segment, 0L, value); } + /// Sets `subpassMergeStatus` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackInfoEXT subpassMergeStatusAt(long index, @CType("VkSubpassMergeStatusEXT") int value) { VkRenderPassSubpassFeedbackInfoEXT.set_subpassMergeStatus(this.segment(), index, value); return this; } + /// Sets `subpassMergeStatus` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackInfoEXT subpassMergeStatus(@CType("VkSubpassMergeStatusEXT") int value) { VkRenderPassSubpassFeedbackInfoEXT.set_subpassMergeStatus(this.segment(), value); return this; } + + /// {@return `description` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `description`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long elementIndex) { return VkRenderPassSubpassFeedbackInfoEXT.get_description(segment, 0L, elementIndex); } + /// {@return `description` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment descriptionAt(long index, long elementIndex) { return VkRenderPassSubpassFeedbackInfoEXT.get_description(this.segment(), index, elementIndex); } + /// {@return `description`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment description(long elementIndex) { return VkRenderPassSubpassFeedbackInfoEXT.get_description(this.segment(), elementIndex); } + /// Sets `description` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `description` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkRenderPassSubpassFeedbackInfoEXT.set_description(segment, 0L, elementIndex, value); } + /// Sets `description` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackInfoEXT descriptionAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkRenderPassSubpassFeedbackInfoEXT.set_description(this.segment(), index, elementIndex, value); return this; } + /// Sets `description` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackInfoEXT description(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkRenderPassSubpassFeedbackInfoEXT.set_description(this.segment(), elementIndex, value); return this; } + + /// {@return `postMergeIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_postMergeIndex(MemorySegment segment, long index) { return (int) VH_postMergeIndex.get(segment, 0L, index); } + /// {@return `postMergeIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_postMergeIndex(MemorySegment segment) { return VkRenderPassSubpassFeedbackInfoEXT.get_postMergeIndex(segment, 0L); } + /// {@return `postMergeIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int postMergeIndexAt(long index) { return VkRenderPassSubpassFeedbackInfoEXT.get_postMergeIndex(this.segment(), index); } + /// {@return `postMergeIndex`} + public @CType("uint32_t") int postMergeIndex() { return VkRenderPassSubpassFeedbackInfoEXT.get_postMergeIndex(this.segment()); } + /// Sets `postMergeIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_postMergeIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_postMergeIndex.set(segment, 0L, index, value); } + /// Sets `postMergeIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_postMergeIndex(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassSubpassFeedbackInfoEXT.set_postMergeIndex(segment, 0L, value); } + /// Sets `postMergeIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackInfoEXT postMergeIndexAt(long index, @CType("uint32_t") int value) { VkRenderPassSubpassFeedbackInfoEXT.set_postMergeIndex(this.segment(), index, value); return this; } + /// Sets `postMergeIndex` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassSubpassFeedbackInfoEXT postMergeIndex(@CType("uint32_t") int value) { VkRenderPassSubpassFeedbackInfoEXT.set_postMergeIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderingFragmentDensityMapAttachmentInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderingFragmentDensityMapAttachmentInfoEXT.java new file mode 100644 index 00000000..f77b0bc4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkRenderingFragmentDensityMapAttachmentInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageView +/// [VarHandle][#VH_imageView] - [Getter][#imageView()] - [Setter][#imageView(java.lang.foreign.MemorySegment)] +/// ### imageLayout +/// [VarHandle][#VH_imageLayout] - [Getter][#imageLayout()] - [Setter][#imageLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderingFragmentDensityMapAttachmentInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageView imageView; +/// VkImageLayout imageLayout; +/// } VkRenderingFragmentDensityMapAttachmentInfoEXT; +/// ``` +public final class VkRenderingFragmentDensityMapAttachmentInfoEXT extends Struct { + /// The struct layout of `VkRenderingFragmentDensityMapAttachmentInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("imageView"), + ValueLayout.JAVA_INT.withName("imageLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_imageView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageView")); + /// The [VarHandle] of `imageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageLayout")); + + /// Creates `VkRenderingFragmentDensityMapAttachmentInfoEXT` with the given segment. + /// @param segment the memory segment + public VkRenderingFragmentDensityMapAttachmentInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderingFragmentDensityMapAttachmentInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingFragmentDensityMapAttachmentInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingFragmentDensityMapAttachmentInfoEXT(segment); } + + /// Creates `VkRenderingFragmentDensityMapAttachmentInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingFragmentDensityMapAttachmentInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingFragmentDensityMapAttachmentInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderingFragmentDensityMapAttachmentInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingFragmentDensityMapAttachmentInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingFragmentDensityMapAttachmentInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderingFragmentDensityMapAttachmentInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderingFragmentDensityMapAttachmentInfoEXT` + public static VkRenderingFragmentDensityMapAttachmentInfoEXT alloc(SegmentAllocator allocator) { return new VkRenderingFragmentDensityMapAttachmentInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderingFragmentDensityMapAttachmentInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderingFragmentDensityMapAttachmentInfoEXT` + public static VkRenderingFragmentDensityMapAttachmentInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkRenderingFragmentDensityMapAttachmentInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingFragmentDensityMapAttachmentInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingFragmentDensityMapAttachmentInfoEXT sType(@CType("VkStructureType") int value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingFragmentDensityMapAttachmentInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingFragmentDensityMapAttachmentInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `imageView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_imageView.get(segment, 0L, index); } + /// {@return `imageView`} + /// @param segment the segment of the struct + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment) { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_imageView(segment, 0L); } + /// {@return `imageView` at the given index} + /// @param index the index + public @CType("VkImageView") java.lang.foreign.MemorySegment imageViewAt(long index) { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_imageView(this.segment(), index); } + /// {@return `imageView`} + public @CType("VkImageView") java.lang.foreign.MemorySegment imageView() { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_imageView(this.segment()); } + /// Sets `imageView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageView(MemorySegment segment, long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VH_imageView.set(segment, 0L, index, value); } + /// Sets `imageView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageView(MemorySegment segment, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_imageView(segment, 0L, value); } + /// Sets `imageView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingFragmentDensityMapAttachmentInfoEXT imageViewAt(long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_imageView(this.segment(), index, value); return this; } + /// Sets `imageView` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingFragmentDensityMapAttachmentInfoEXT imageView(@CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_imageView(this.segment(), value); return this; } + + /// {@return `imageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_imageLayout(MemorySegment segment, long index) { return (int) VH_imageLayout.get(segment, 0L, index); } + /// {@return `imageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_imageLayout(MemorySegment segment) { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_imageLayout(segment, 0L); } + /// {@return `imageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int imageLayoutAt(long index) { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_imageLayout(this.segment(), index); } + /// {@return `imageLayout`} + public @CType("VkImageLayout") int imageLayout() { return VkRenderingFragmentDensityMapAttachmentInfoEXT.get_imageLayout(this.segment()); } + /// Sets `imageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_imageLayout.set(segment, 0L, index, value); } + /// Sets `imageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_imageLayout(segment, 0L, value); } + /// Sets `imageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingFragmentDensityMapAttachmentInfoEXT imageLayoutAt(long index, @CType("VkImageLayout") int value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_imageLayout(this.segment(), index, value); return this; } + /// Sets `imageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingFragmentDensityMapAttachmentInfoEXT imageLayout(@CType("VkImageLayout") int value) { VkRenderingFragmentDensityMapAttachmentInfoEXT.set_imageLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSampleLocationEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSampleLocationEXT.java new file mode 100644 index 00000000..77a2845b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSampleLocationEXT.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### x +/// [VarHandle][#VH_x] - [Getter][#x()] - [Setter][#x(float)] +/// ### y +/// [VarHandle][#VH_y] - [Getter][#y()] - [Setter][#y(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSampleLocationEXT { +/// float x; +/// float y; +/// } VkSampleLocationEXT; +/// ``` +public final class VkSampleLocationEXT extends Struct { + /// The struct layout of `VkSampleLocationEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_FLOAT.withName("x"), + ValueLayout.JAVA_FLOAT.withName("y") + ); + /// The [VarHandle] of `x` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_x = LAYOUT.arrayElementVarHandle(PathElement.groupElement("x")); + /// The [VarHandle] of `y` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_y = LAYOUT.arrayElementVarHandle(PathElement.groupElement("y")); + + /// Creates `VkSampleLocationEXT` with the given segment. + /// @param segment the memory segment + public VkSampleLocationEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSampleLocationEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSampleLocationEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSampleLocationEXT(segment); } + + /// Creates `VkSampleLocationEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSampleLocationEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSampleLocationEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSampleLocationEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSampleLocationEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSampleLocationEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSampleLocationEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSampleLocationEXT` + public static VkSampleLocationEXT alloc(SegmentAllocator allocator) { return new VkSampleLocationEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSampleLocationEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSampleLocationEXT` + public static VkSampleLocationEXT alloc(SegmentAllocator allocator, long count) { return new VkSampleLocationEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `x` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_x(MemorySegment segment, long index) { return (float) VH_x.get(segment, 0L, index); } + /// {@return `x`} + /// @param segment the segment of the struct + public static @CType("float") float get_x(MemorySegment segment) { return VkSampleLocationEXT.get_x(segment, 0L); } + /// {@return `x` at the given index} + /// @param index the index + public @CType("float") float xAt(long index) { return VkSampleLocationEXT.get_x(this.segment(), index); } + /// {@return `x`} + public @CType("float") float x() { return VkSampleLocationEXT.get_x(this.segment()); } + /// Sets `x` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_x(MemorySegment segment, long index, @CType("float") float value) { VH_x.set(segment, 0L, index, value); } + /// Sets `x` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_x(MemorySegment segment, @CType("float") float value) { VkSampleLocationEXT.set_x(segment, 0L, value); } + /// Sets `x` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSampleLocationEXT xAt(long index, @CType("float") float value) { VkSampleLocationEXT.set_x(this.segment(), index, value); return this; } + /// Sets `x` with the given value. + /// @param value the value + /// @return `this` + public VkSampleLocationEXT x(@CType("float") float value) { VkSampleLocationEXT.set_x(this.segment(), value); return this; } + + /// {@return `y` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_y(MemorySegment segment, long index) { return (float) VH_y.get(segment, 0L, index); } + /// {@return `y`} + /// @param segment the segment of the struct + public static @CType("float") float get_y(MemorySegment segment) { return VkSampleLocationEXT.get_y(segment, 0L); } + /// {@return `y` at the given index} + /// @param index the index + public @CType("float") float yAt(long index) { return VkSampleLocationEXT.get_y(this.segment(), index); } + /// {@return `y`} + public @CType("float") float y() { return VkSampleLocationEXT.get_y(this.segment()); } + /// Sets `y` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_y(MemorySegment segment, long index, @CType("float") float value) { VH_y.set(segment, 0L, index, value); } + /// Sets `y` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_y(MemorySegment segment, @CType("float") float value) { VkSampleLocationEXT.set_y(segment, 0L, value); } + /// Sets `y` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSampleLocationEXT yAt(long index, @CType("float") float value) { VkSampleLocationEXT.set_y(this.segment(), index, value); return this; } + /// Sets `y` with the given value. + /// @param value the value + /// @return `this` + public VkSampleLocationEXT y(@CType("float") float value) { VkSampleLocationEXT.set_y(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSampleLocationsInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSampleLocationsInfoEXT.java new file mode 100644 index 00000000..458e11af --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSampleLocationsInfoEXT.java @@ -0,0 +1,298 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sampleLocationsPerPixel +/// [VarHandle][#VH_sampleLocationsPerPixel] - [Getter][#sampleLocationsPerPixel()] - [Setter][#sampleLocationsPerPixel(int)] +/// ### sampleLocationGridSize +/// [Byte offset][#OFFSET_sampleLocationGridSize] - [Memory layout][#ML_sampleLocationGridSize] - [Getter][#sampleLocationGridSize()] - [Setter][#sampleLocationGridSize(java.lang.foreign.MemorySegment)] +/// ### sampleLocationsCount +/// [VarHandle][#VH_sampleLocationsCount] - [Getter][#sampleLocationsCount()] - [Setter][#sampleLocationsCount(int)] +/// ### pSampleLocations +/// [VarHandle][#VH_pSampleLocations] - [Getter][#pSampleLocations()] - [Setter][#pSampleLocations(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSampleLocationsInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkSampleCountFlagBits sampleLocationsPerPixel; +/// VkExtent2D sampleLocationGridSize; +/// uint32_t sampleLocationsCount; +/// const VkSampleLocationEXT * pSampleLocations; +/// } VkSampleLocationsInfoEXT; +/// ``` +public final class VkSampleLocationsInfoEXT extends Struct { + /// The struct layout of `VkSampleLocationsInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sampleLocationsPerPixel"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("sampleLocationGridSize"), + ValueLayout.JAVA_INT.withName("sampleLocationsCount"), + ValueLayout.ADDRESS.withName("pSampleLocations") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sampleLocationsPerPixel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleLocationsPerPixel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleLocationsPerPixel")); + /// The byte offset of `sampleLocationGridSize`. + public static final long OFFSET_sampleLocationGridSize = LAYOUT.byteOffset(PathElement.groupElement("sampleLocationGridSize")); + /// The memory layout of `sampleLocationGridSize`. + public static final MemoryLayout ML_sampleLocationGridSize = LAYOUT.select(PathElement.groupElement("sampleLocationGridSize")); + /// The [VarHandle] of `sampleLocationsCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleLocationsCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleLocationsCount")); + /// The [VarHandle] of `pSampleLocations` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSampleLocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSampleLocations")); + + /// Creates `VkSampleLocationsInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSampleLocationsInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSampleLocationsInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSampleLocationsInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSampleLocationsInfoEXT(segment); } + + /// Creates `VkSampleLocationsInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSampleLocationsInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSampleLocationsInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSampleLocationsInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSampleLocationsInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSampleLocationsInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSampleLocationsInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSampleLocationsInfoEXT` + public static VkSampleLocationsInfoEXT alloc(SegmentAllocator allocator) { return new VkSampleLocationsInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSampleLocationsInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSampleLocationsInfoEXT` + public static VkSampleLocationsInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSampleLocationsInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSampleLocationsInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSampleLocationsInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSampleLocationsInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSampleLocationsInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSampleLocationsInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT sType(@CType("VkStructureType") int value) { VkSampleLocationsInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSampleLocationsInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSampleLocationsInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSampleLocationsInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSampleLocationsInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSampleLocationsInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSampleLocationsInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `sampleLocationsPerPixel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_sampleLocationsPerPixel(MemorySegment segment, long index) { return (int) VH_sampleLocationsPerPixel.get(segment, 0L, index); } + /// {@return `sampleLocationsPerPixel`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_sampleLocationsPerPixel(MemorySegment segment) { return VkSampleLocationsInfoEXT.get_sampleLocationsPerPixel(segment, 0L); } + /// {@return `sampleLocationsPerPixel` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int sampleLocationsPerPixelAt(long index) { return VkSampleLocationsInfoEXT.get_sampleLocationsPerPixel(this.segment(), index); } + /// {@return `sampleLocationsPerPixel`} + public @CType("VkSampleCountFlagBits") int sampleLocationsPerPixel() { return VkSampleLocationsInfoEXT.get_sampleLocationsPerPixel(this.segment()); } + /// Sets `sampleLocationsPerPixel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationsPerPixel(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_sampleLocationsPerPixel.set(segment, 0L, index, value); } + /// Sets `sampleLocationsPerPixel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationsPerPixel(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkSampleLocationsInfoEXT.set_sampleLocationsPerPixel(segment, 0L, value); } + /// Sets `sampleLocationsPerPixel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT sampleLocationsPerPixelAt(long index, @CType("VkSampleCountFlagBits") int value) { VkSampleLocationsInfoEXT.set_sampleLocationsPerPixel(this.segment(), index, value); return this; } + /// Sets `sampleLocationsPerPixel` with the given value. + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT sampleLocationsPerPixel(@CType("VkSampleCountFlagBits") int value) { VkSampleLocationsInfoEXT.set_sampleLocationsPerPixel(this.segment(), value); return this; } + + /// {@return `sampleLocationGridSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_sampleLocationGridSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_sampleLocationGridSize, index), ML_sampleLocationGridSize); } + /// {@return `sampleLocationGridSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_sampleLocationGridSize(MemorySegment segment) { return VkSampleLocationsInfoEXT.get_sampleLocationGridSize(segment, 0L); } + /// {@return `sampleLocationGridSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment sampleLocationGridSizeAt(long index) { return VkSampleLocationsInfoEXT.get_sampleLocationGridSize(this.segment(), index); } + /// {@return `sampleLocationGridSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment sampleLocationGridSize() { return VkSampleLocationsInfoEXT.get_sampleLocationGridSize(this.segment()); } + /// Sets `sampleLocationGridSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationGridSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_sampleLocationGridSize, index), ML_sampleLocationGridSize.byteSize()); } + /// Sets `sampleLocationGridSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationGridSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSampleLocationsInfoEXT.set_sampleLocationGridSize(segment, 0L, value); } + /// Sets `sampleLocationGridSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT sampleLocationGridSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSampleLocationsInfoEXT.set_sampleLocationGridSize(this.segment(), index, value); return this; } + /// Sets `sampleLocationGridSize` with the given value. + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT sampleLocationGridSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSampleLocationsInfoEXT.set_sampleLocationGridSize(this.segment(), value); return this; } + + /// {@return `sampleLocationsCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sampleLocationsCount(MemorySegment segment, long index) { return (int) VH_sampleLocationsCount.get(segment, 0L, index); } + /// {@return `sampleLocationsCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sampleLocationsCount(MemorySegment segment) { return VkSampleLocationsInfoEXT.get_sampleLocationsCount(segment, 0L); } + /// {@return `sampleLocationsCount` at the given index} + /// @param index the index + public @CType("uint32_t") int sampleLocationsCountAt(long index) { return VkSampleLocationsInfoEXT.get_sampleLocationsCount(this.segment(), index); } + /// {@return `sampleLocationsCount`} + public @CType("uint32_t") int sampleLocationsCount() { return VkSampleLocationsInfoEXT.get_sampleLocationsCount(this.segment()); } + /// Sets `sampleLocationsCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationsCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sampleLocationsCount.set(segment, 0L, index, value); } + /// Sets `sampleLocationsCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationsCount(MemorySegment segment, @CType("uint32_t") int value) { VkSampleLocationsInfoEXT.set_sampleLocationsCount(segment, 0L, value); } + /// Sets `sampleLocationsCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT sampleLocationsCountAt(long index, @CType("uint32_t") int value) { VkSampleLocationsInfoEXT.set_sampleLocationsCount(this.segment(), index, value); return this; } + /// Sets `sampleLocationsCount` with the given value. + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT sampleLocationsCount(@CType("uint32_t") int value) { VkSampleLocationsInfoEXT.set_sampleLocationsCount(this.segment(), value); return this; } + + /// {@return `pSampleLocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSampleLocationEXT *") java.lang.foreign.MemorySegment get_pSampleLocations(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSampleLocations.get(segment, 0L, index); } + /// {@return `pSampleLocations`} + /// @param segment the segment of the struct + public static @CType("const VkSampleLocationEXT *") java.lang.foreign.MemorySegment get_pSampleLocations(MemorySegment segment) { return VkSampleLocationsInfoEXT.get_pSampleLocations(segment, 0L); } + /// {@return `pSampleLocations` at the given index} + /// @param index the index + public @CType("const VkSampleLocationEXT *") java.lang.foreign.MemorySegment pSampleLocationsAt(long index) { return VkSampleLocationsInfoEXT.get_pSampleLocations(this.segment(), index); } + /// {@return `pSampleLocations`} + public @CType("const VkSampleLocationEXT *") java.lang.foreign.MemorySegment pSampleLocations() { return VkSampleLocationsInfoEXT.get_pSampleLocations(this.segment()); } + /// Sets `pSampleLocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSampleLocations(MemorySegment segment, long index, @CType("const VkSampleLocationEXT *") java.lang.foreign.MemorySegment value) { VH_pSampleLocations.set(segment, 0L, index, value); } + /// Sets `pSampleLocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSampleLocations(MemorySegment segment, @CType("const VkSampleLocationEXT *") java.lang.foreign.MemorySegment value) { VkSampleLocationsInfoEXT.set_pSampleLocations(segment, 0L, value); } + /// Sets `pSampleLocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT pSampleLocationsAt(long index, @CType("const VkSampleLocationEXT *") java.lang.foreign.MemorySegment value) { VkSampleLocationsInfoEXT.set_pSampleLocations(this.segment(), index, value); return this; } + /// Sets `pSampleLocations` with the given value. + /// @param value the value + /// @return `this` + public VkSampleLocationsInfoEXT pSampleLocations(@CType("const VkSampleLocationEXT *") java.lang.foreign.MemorySegment value) { VkSampleLocationsInfoEXT.set_pSampleLocations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSamplerBorderColorComponentMappingCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSamplerBorderColorComponentMappingCreateInfoEXT.java new file mode 100644 index 00000000..ffb54ca2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSamplerBorderColorComponentMappingCreateInfoEXT.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### components +/// [Byte offset][#OFFSET_components] - [Memory layout][#ML_components] - [Getter][#components()] - [Setter][#components(java.lang.foreign.MemorySegment)] +/// ### srgb +/// [VarHandle][#VH_srgb] - [Getter][#srgb()] - [Setter][#srgb(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerBorderColorComponentMappingCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkComponentMapping components; +/// VkBool32 srgb; +/// } VkSamplerBorderColorComponentMappingCreateInfoEXT; +/// ``` +public final class VkSamplerBorderColorComponentMappingCreateInfoEXT extends Struct { + /// The struct layout of `VkSamplerBorderColorComponentMappingCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkComponentMapping.LAYOUT.withName("components"), + ValueLayout.JAVA_INT.withName("srgb") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `components`. + public static final long OFFSET_components = LAYOUT.byteOffset(PathElement.groupElement("components")); + /// The memory layout of `components`. + public static final MemoryLayout ML_components = LAYOUT.select(PathElement.groupElement("components")); + /// The [VarHandle] of `srgb` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srgb = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srgb")); + + /// Creates `VkSamplerBorderColorComponentMappingCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSamplerBorderColorComponentMappingCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerBorderColorComponentMappingCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerBorderColorComponentMappingCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerBorderColorComponentMappingCreateInfoEXT(segment); } + + /// Creates `VkSamplerBorderColorComponentMappingCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerBorderColorComponentMappingCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerBorderColorComponentMappingCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerBorderColorComponentMappingCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerBorderColorComponentMappingCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerBorderColorComponentMappingCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerBorderColorComponentMappingCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerBorderColorComponentMappingCreateInfoEXT` + public static VkSamplerBorderColorComponentMappingCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkSamplerBorderColorComponentMappingCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerBorderColorComponentMappingCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerBorderColorComponentMappingCreateInfoEXT` + public static VkSamplerBorderColorComponentMappingCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSamplerBorderColorComponentMappingCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerBorderColorComponentMappingCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerBorderColorComponentMappingCreateInfoEXT sType(@CType("VkStructureType") int value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerBorderColorComponentMappingCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerBorderColorComponentMappingCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `components` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_components(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_components, index), ML_components); } + /// {@return `components`} + /// @param segment the segment of the struct + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_components(MemorySegment segment) { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_components(segment, 0L); } + /// {@return `components` at the given index} + /// @param index the index + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment componentsAt(long index) { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_components(this.segment(), index); } + /// {@return `components`} + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment components() { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_components(this.segment()); } + /// Sets `components` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_components(MemorySegment segment, long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_components, index), ML_components.byteSize()); } + /// Sets `components` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_components(MemorySegment segment, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_components(segment, 0L, value); } + /// Sets `components` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerBorderColorComponentMappingCreateInfoEXT componentsAt(long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_components(this.segment(), index, value); return this; } + /// Sets `components` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerBorderColorComponentMappingCreateInfoEXT components(@CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_components(this.segment(), value); return this; } + + /// {@return `srgb` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_srgb(MemorySegment segment, long index) { return (int) VH_srgb.get(segment, 0L, index); } + /// {@return `srgb`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_srgb(MemorySegment segment) { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_srgb(segment, 0L); } + /// {@return `srgb` at the given index} + /// @param index the index + public @CType("VkBool32") int srgbAt(long index) { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_srgb(this.segment(), index); } + /// {@return `srgb`} + public @CType("VkBool32") int srgb() { return VkSamplerBorderColorComponentMappingCreateInfoEXT.get_srgb(this.segment()); } + /// Sets `srgb` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srgb(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_srgb.set(segment, 0L, index, value); } + /// Sets `srgb` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srgb(MemorySegment segment, @CType("VkBool32") int value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_srgb(segment, 0L, value); } + /// Sets `srgb` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerBorderColorComponentMappingCreateInfoEXT srgbAt(long index, @CType("VkBool32") int value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_srgb(this.segment(), index, value); return this; } + /// Sets `srgb` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerBorderColorComponentMappingCreateInfoEXT srgb(@CType("VkBool32") int value) { VkSamplerBorderColorComponentMappingCreateInfoEXT.set_srgb(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSamplerCaptureDescriptorDataInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSamplerCaptureDescriptorDataInfoEXT.java new file mode 100644 index 00000000..be53446b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSamplerCaptureDescriptorDataInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sampler +/// [VarHandle][#VH_sampler] - [Getter][#sampler()] - [Setter][#sampler(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerCaptureDescriptorDataInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkSampler sampler; +/// } VkSamplerCaptureDescriptorDataInfoEXT; +/// ``` +public final class VkSamplerCaptureDescriptorDataInfoEXT extends Struct { + /// The struct layout of `VkSamplerCaptureDescriptorDataInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("sampler") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sampler` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_sampler = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampler")); + + /// Creates `VkSamplerCaptureDescriptorDataInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSamplerCaptureDescriptorDataInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerCaptureDescriptorDataInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCaptureDescriptorDataInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCaptureDescriptorDataInfoEXT(segment); } + + /// Creates `VkSamplerCaptureDescriptorDataInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCaptureDescriptorDataInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCaptureDescriptorDataInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerCaptureDescriptorDataInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCaptureDescriptorDataInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCaptureDescriptorDataInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerCaptureDescriptorDataInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerCaptureDescriptorDataInfoEXT` + public static VkSamplerCaptureDescriptorDataInfoEXT alloc(SegmentAllocator allocator) { return new VkSamplerCaptureDescriptorDataInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerCaptureDescriptorDataInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerCaptureDescriptorDataInfoEXT` + public static VkSamplerCaptureDescriptorDataInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSamplerCaptureDescriptorDataInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerCaptureDescriptorDataInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerCaptureDescriptorDataInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerCaptureDescriptorDataInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerCaptureDescriptorDataInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCaptureDescriptorDataInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerCaptureDescriptorDataInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCaptureDescriptorDataInfoEXT sType(@CType("VkStructureType") int value) { VkSamplerCaptureDescriptorDataInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerCaptureDescriptorDataInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerCaptureDescriptorDataInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerCaptureDescriptorDataInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCaptureDescriptorDataInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCaptureDescriptorDataInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCaptureDescriptorDataInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCaptureDescriptorDataInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCaptureDescriptorDataInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `sampler` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampler") java.lang.foreign.MemorySegment get_sampler(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_sampler.get(segment, 0L, index); } + /// {@return `sampler`} + /// @param segment the segment of the struct + public static @CType("VkSampler") java.lang.foreign.MemorySegment get_sampler(MemorySegment segment) { return VkSamplerCaptureDescriptorDataInfoEXT.get_sampler(segment, 0L); } + /// {@return `sampler` at the given index} + /// @param index the index + public @CType("VkSampler") java.lang.foreign.MemorySegment samplerAt(long index) { return VkSamplerCaptureDescriptorDataInfoEXT.get_sampler(this.segment(), index); } + /// {@return `sampler`} + public @CType("VkSampler") java.lang.foreign.MemorySegment sampler() { return VkSamplerCaptureDescriptorDataInfoEXT.get_sampler(this.segment()); } + /// Sets `sampler` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampler(MemorySegment segment, long index, @CType("VkSampler") java.lang.foreign.MemorySegment value) { VH_sampler.set(segment, 0L, index, value); } + /// Sets `sampler` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampler(MemorySegment segment, @CType("VkSampler") java.lang.foreign.MemorySegment value) { VkSamplerCaptureDescriptorDataInfoEXT.set_sampler(segment, 0L, value); } + /// Sets `sampler` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCaptureDescriptorDataInfoEXT samplerAt(long index, @CType("VkSampler") java.lang.foreign.MemorySegment value) { VkSamplerCaptureDescriptorDataInfoEXT.set_sampler(this.segment(), index, value); return this; } + /// Sets `sampler` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCaptureDescriptorDataInfoEXT sampler(@CType("VkSampler") java.lang.foreign.MemorySegment value) { VkSamplerCaptureDescriptorDataInfoEXT.set_sampler(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSamplerCustomBorderColorCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSamplerCustomBorderColorCreateInfoEXT.java new file mode 100644 index 00000000..2d6fadc6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSamplerCustomBorderColorCreateInfoEXT.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### customBorderColor +/// [Byte offset][#OFFSET_customBorderColor] - [Memory layout][#ML_customBorderColor] - [Getter][#customBorderColor()] - [Setter][#customBorderColor(java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerCustomBorderColorCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkClearColorValue customBorderColor; +/// VkFormat format; +/// } VkSamplerCustomBorderColorCreateInfoEXT; +/// ``` +public final class VkSamplerCustomBorderColorCreateInfoEXT extends Struct { + /// The struct layout of `VkSamplerCustomBorderColorCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.union.VkClearColorValue.LAYOUT.withName("customBorderColor"), + ValueLayout.JAVA_INT.withName("format") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `customBorderColor`. + public static final long OFFSET_customBorderColor = LAYOUT.byteOffset(PathElement.groupElement("customBorderColor")); + /// The memory layout of `customBorderColor`. + public static final MemoryLayout ML_customBorderColor = LAYOUT.select(PathElement.groupElement("customBorderColor")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + + /// Creates `VkSamplerCustomBorderColorCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSamplerCustomBorderColorCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerCustomBorderColorCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCustomBorderColorCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCustomBorderColorCreateInfoEXT(segment); } + + /// Creates `VkSamplerCustomBorderColorCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCustomBorderColorCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCustomBorderColorCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerCustomBorderColorCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCustomBorderColorCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCustomBorderColorCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerCustomBorderColorCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerCustomBorderColorCreateInfoEXT` + public static VkSamplerCustomBorderColorCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkSamplerCustomBorderColorCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerCustomBorderColorCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerCustomBorderColorCreateInfoEXT` + public static VkSamplerCustomBorderColorCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSamplerCustomBorderColorCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerCustomBorderColorCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerCustomBorderColorCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerCustomBorderColorCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerCustomBorderColorCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCustomBorderColorCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerCustomBorderColorCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCustomBorderColorCreateInfoEXT sType(@CType("VkStructureType") int value) { VkSamplerCustomBorderColorCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerCustomBorderColorCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerCustomBorderColorCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerCustomBorderColorCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCustomBorderColorCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCustomBorderColorCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCustomBorderColorCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCustomBorderColorCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCustomBorderColorCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `customBorderColor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkClearColorValue") java.lang.foreign.MemorySegment get_customBorderColor(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_customBorderColor, index), ML_customBorderColor); } + /// {@return `customBorderColor`} + /// @param segment the segment of the struct + public static @CType("VkClearColorValue") java.lang.foreign.MemorySegment get_customBorderColor(MemorySegment segment) { return VkSamplerCustomBorderColorCreateInfoEXT.get_customBorderColor(segment, 0L); } + /// {@return `customBorderColor` at the given index} + /// @param index the index + public @CType("VkClearColorValue") java.lang.foreign.MemorySegment customBorderColorAt(long index) { return VkSamplerCustomBorderColorCreateInfoEXT.get_customBorderColor(this.segment(), index); } + /// {@return `customBorderColor`} + public @CType("VkClearColorValue") java.lang.foreign.MemorySegment customBorderColor() { return VkSamplerCustomBorderColorCreateInfoEXT.get_customBorderColor(this.segment()); } + /// Sets `customBorderColor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_customBorderColor(MemorySegment segment, long index, @CType("VkClearColorValue") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_customBorderColor, index), ML_customBorderColor.byteSize()); } + /// Sets `customBorderColor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_customBorderColor(MemorySegment segment, @CType("VkClearColorValue") java.lang.foreign.MemorySegment value) { VkSamplerCustomBorderColorCreateInfoEXT.set_customBorderColor(segment, 0L, value); } + /// Sets `customBorderColor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCustomBorderColorCreateInfoEXT customBorderColorAt(long index, @CType("VkClearColorValue") java.lang.foreign.MemorySegment value) { VkSamplerCustomBorderColorCreateInfoEXT.set_customBorderColor(this.segment(), index, value); return this; } + /// Sets `customBorderColor` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCustomBorderColorCreateInfoEXT customBorderColor(@CType("VkClearColorValue") java.lang.foreign.MemorySegment value) { VkSamplerCustomBorderColorCreateInfoEXT.set_customBorderColor(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkSamplerCustomBorderColorCreateInfoEXT.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkSamplerCustomBorderColorCreateInfoEXT.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkSamplerCustomBorderColorCreateInfoEXT.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkSamplerCustomBorderColorCreateInfoEXT.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCustomBorderColorCreateInfoEXT formatAt(long index, @CType("VkFormat") int value) { VkSamplerCustomBorderColorCreateInfoEXT.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCustomBorderColorCreateInfoEXT format(@CType("VkFormat") int value) { VkSamplerCustomBorderColorCreateInfoEXT.set_format(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSetDescriptorBufferOffsetsInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSetDescriptorBufferOffsetsInfoEXT.java new file mode 100644 index 00000000..a0b44f4e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSetDescriptorBufferOffsetsInfoEXT.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stageFlags +/// [VarHandle][#VH_stageFlags] - [Getter][#stageFlags()] - [Setter][#stageFlags(int)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### firstSet +/// [VarHandle][#VH_firstSet] - [Getter][#firstSet()] - [Setter][#firstSet(int)] +/// ### setCount +/// [VarHandle][#VH_setCount] - [Getter][#setCount()] - [Setter][#setCount(int)] +/// ### pBufferIndices +/// [VarHandle][#VH_pBufferIndices] - [Getter][#pBufferIndices()] - [Setter][#pBufferIndices(java.lang.foreign.MemorySegment)] +/// ### pOffsets +/// [VarHandle][#VH_pOffsets] - [Getter][#pOffsets()] - [Setter][#pOffsets(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSetDescriptorBufferOffsetsInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkShaderStageFlags stageFlags; +/// VkPipelineLayout layout; +/// uint32_t firstSet; +/// uint32_t setCount; +/// const uint32_t * pBufferIndices; +/// const VkDeviceSize * pOffsets; +/// } VkSetDescriptorBufferOffsetsInfoEXT; +/// ``` +public final class VkSetDescriptorBufferOffsetsInfoEXT extends Struct { + /// The struct layout of `VkSetDescriptorBufferOffsetsInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stageFlags"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.JAVA_INT.withName("firstSet"), + ValueLayout.JAVA_INT.withName("setCount"), + ValueLayout.ADDRESS.withName("pBufferIndices"), + ValueLayout.ADDRESS.withName("pOffsets") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageFlags")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `firstSet` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstSet")); + /// The [VarHandle] of `setCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_setCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("setCount")); + /// The [VarHandle] of `pBufferIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBufferIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBufferIndices")); + /// The [VarHandle] of `pOffsets` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pOffsets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pOffsets")); + + /// Creates `VkSetDescriptorBufferOffsetsInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSetDescriptorBufferOffsetsInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSetDescriptorBufferOffsetsInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSetDescriptorBufferOffsetsInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSetDescriptorBufferOffsetsInfoEXT(segment); } + + /// Creates `VkSetDescriptorBufferOffsetsInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSetDescriptorBufferOffsetsInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSetDescriptorBufferOffsetsInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSetDescriptorBufferOffsetsInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSetDescriptorBufferOffsetsInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSetDescriptorBufferOffsetsInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSetDescriptorBufferOffsetsInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSetDescriptorBufferOffsetsInfoEXT` + public static VkSetDescriptorBufferOffsetsInfoEXT alloc(SegmentAllocator allocator) { return new VkSetDescriptorBufferOffsetsInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSetDescriptorBufferOffsetsInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSetDescriptorBufferOffsetsInfoEXT` + public static VkSetDescriptorBufferOffsetsInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSetDescriptorBufferOffsetsInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSetDescriptorBufferOffsetsInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSetDescriptorBufferOffsetsInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSetDescriptorBufferOffsetsInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT sType(@CType("VkStructureType") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSetDescriptorBufferOffsetsInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSetDescriptorBufferOffsetsInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSetDescriptorBufferOffsetsInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `stageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment, long index) { return (int) VH_stageFlags.get(segment, 0L, index); } + /// {@return `stageFlags`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment) { return VkSetDescriptorBufferOffsetsInfoEXT.get_stageFlags(segment, 0L); } + /// {@return `stageFlags` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int stageFlagsAt(long index) { return VkSetDescriptorBufferOffsetsInfoEXT.get_stageFlags(this.segment(), index); } + /// {@return `stageFlags`} + public @CType("VkShaderStageFlags") int stageFlags() { return VkSetDescriptorBufferOffsetsInfoEXT.get_stageFlags(this.segment()); } + /// Sets `stageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageFlags(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_stageFlags.set(segment, 0L, index, value); } + /// Sets `stageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageFlags(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_stageFlags(segment, 0L, value); } + /// Sets `stageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT stageFlagsAt(long index, @CType("VkShaderStageFlags") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_stageFlags(this.segment(), index, value); return this; } + /// Sets `stageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT stageFlags(@CType("VkShaderStageFlags") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_stageFlags(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkSetDescriptorBufferOffsetsInfoEXT.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkSetDescriptorBufferOffsetsInfoEXT.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkSetDescriptorBufferOffsetsInfoEXT.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_layout(this.segment(), value); return this; } + + /// {@return `firstSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstSet(MemorySegment segment, long index) { return (int) VH_firstSet.get(segment, 0L, index); } + /// {@return `firstSet`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstSet(MemorySegment segment) { return VkSetDescriptorBufferOffsetsInfoEXT.get_firstSet(segment, 0L); } + /// {@return `firstSet` at the given index} + /// @param index the index + public @CType("uint32_t") int firstSetAt(long index) { return VkSetDescriptorBufferOffsetsInfoEXT.get_firstSet(this.segment(), index); } + /// {@return `firstSet`} + public @CType("uint32_t") int firstSet() { return VkSetDescriptorBufferOffsetsInfoEXT.get_firstSet(this.segment()); } + /// Sets `firstSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstSet(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstSet.set(segment, 0L, index, value); } + /// Sets `firstSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstSet(MemorySegment segment, @CType("uint32_t") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_firstSet(segment, 0L, value); } + /// Sets `firstSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT firstSetAt(long index, @CType("uint32_t") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_firstSet(this.segment(), index, value); return this; } + /// Sets `firstSet` with the given value. + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT firstSet(@CType("uint32_t") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_firstSet(this.segment(), value); return this; } + + /// {@return `setCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_setCount(MemorySegment segment, long index) { return (int) VH_setCount.get(segment, 0L, index); } + /// {@return `setCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_setCount(MemorySegment segment) { return VkSetDescriptorBufferOffsetsInfoEXT.get_setCount(segment, 0L); } + /// {@return `setCount` at the given index} + /// @param index the index + public @CType("uint32_t") int setCountAt(long index) { return VkSetDescriptorBufferOffsetsInfoEXT.get_setCount(this.segment(), index); } + /// {@return `setCount`} + public @CType("uint32_t") int setCount() { return VkSetDescriptorBufferOffsetsInfoEXT.get_setCount(this.segment()); } + /// Sets `setCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_setCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_setCount.set(segment, 0L, index, value); } + /// Sets `setCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_setCount(MemorySegment segment, @CType("uint32_t") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_setCount(segment, 0L, value); } + /// Sets `setCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT setCountAt(long index, @CType("uint32_t") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_setCount(this.segment(), index, value); return this; } + /// Sets `setCount` with the given value. + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT setCount(@CType("uint32_t") int value) { VkSetDescriptorBufferOffsetsInfoEXT.set_setCount(this.segment(), value); return this; } + + /// {@return `pBufferIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pBufferIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBufferIndices.get(segment, 0L, index); } + /// {@return `pBufferIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pBufferIndices(MemorySegment segment) { return VkSetDescriptorBufferOffsetsInfoEXT.get_pBufferIndices(segment, 0L); } + /// {@return `pBufferIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pBufferIndicesAt(long index) { return VkSetDescriptorBufferOffsetsInfoEXT.get_pBufferIndices(this.segment(), index); } + /// {@return `pBufferIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pBufferIndices() { return VkSetDescriptorBufferOffsetsInfoEXT.get_pBufferIndices(this.segment()); } + /// Sets `pBufferIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBufferIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pBufferIndices.set(segment, 0L, index, value); } + /// Sets `pBufferIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBufferIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_pBufferIndices(segment, 0L, value); } + /// Sets `pBufferIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT pBufferIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_pBufferIndices(this.segment(), index, value); return this; } + /// Sets `pBufferIndices` with the given value. + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT pBufferIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_pBufferIndices(this.segment(), value); return this; } + + /// {@return `pOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDeviceSize *") java.lang.foreign.MemorySegment get_pOffsets(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pOffsets.get(segment, 0L, index); } + /// {@return `pOffsets`} + /// @param segment the segment of the struct + public static @CType("const VkDeviceSize *") java.lang.foreign.MemorySegment get_pOffsets(MemorySegment segment) { return VkSetDescriptorBufferOffsetsInfoEXT.get_pOffsets(segment, 0L); } + /// {@return `pOffsets` at the given index} + /// @param index the index + public @CType("const VkDeviceSize *") java.lang.foreign.MemorySegment pOffsetsAt(long index) { return VkSetDescriptorBufferOffsetsInfoEXT.get_pOffsets(this.segment(), index); } + /// {@return `pOffsets`} + public @CType("const VkDeviceSize *") java.lang.foreign.MemorySegment pOffsets() { return VkSetDescriptorBufferOffsetsInfoEXT.get_pOffsets(this.segment()); } + /// Sets `pOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pOffsets(MemorySegment segment, long index, @CType("const VkDeviceSize *") java.lang.foreign.MemorySegment value) { VH_pOffsets.set(segment, 0L, index, value); } + /// Sets `pOffsets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pOffsets(MemorySegment segment, @CType("const VkDeviceSize *") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_pOffsets(segment, 0L, value); } + /// Sets `pOffsets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT pOffsetsAt(long index, @CType("const VkDeviceSize *") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_pOffsets(this.segment(), index, value); return this; } + /// Sets `pOffsets` with the given value. + /// @param value the value + /// @return `this` + public VkSetDescriptorBufferOffsetsInfoEXT pOffsets(@CType("const VkDeviceSize *") java.lang.foreign.MemorySegment value) { VkSetDescriptorBufferOffsetsInfoEXT.set_pOffsets(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkShaderCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkShaderCreateInfoEXT.java new file mode 100644 index 00000000..597f01f8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkShaderCreateInfoEXT.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### stage +/// [VarHandle][#VH_stage] - [Getter][#stage()] - [Setter][#stage(int)] +/// ### nextStage +/// [VarHandle][#VH_nextStage] - [Getter][#nextStage()] - [Setter][#nextStage(int)] +/// ### codeType +/// [VarHandle][#VH_codeType] - [Getter][#codeType()] - [Setter][#codeType(int)] +/// ### codeSize +/// [VarHandle][#VH_codeSize] - [Getter][#codeSize()] - [Setter][#codeSize(long)] +/// ### pCode +/// [VarHandle][#VH_pCode] - [Getter][#pCode()] - [Setter][#pCode(java.lang.foreign.MemorySegment)] +/// ### pName +/// [VarHandle][#VH_pName] - [Getter][#pName()] - [Setter][#pName(java.lang.foreign.MemorySegment)] +/// ### setLayoutCount +/// [VarHandle][#VH_setLayoutCount] - [Getter][#setLayoutCount()] - [Setter][#setLayoutCount(int)] +/// ### pSetLayouts +/// [VarHandle][#VH_pSetLayouts] - [Getter][#pSetLayouts()] - [Setter][#pSetLayouts(java.lang.foreign.MemorySegment)] +/// ### pushConstantRangeCount +/// [VarHandle][#VH_pushConstantRangeCount] - [Getter][#pushConstantRangeCount()] - [Setter][#pushConstantRangeCount(int)] +/// ### pPushConstantRanges +/// [VarHandle][#VH_pPushConstantRanges] - [Getter][#pPushConstantRanges()] - [Setter][#pPushConstantRanges(java.lang.foreign.MemorySegment)] +/// ### pSpecializationInfo +/// [VarHandle][#VH_pSpecializationInfo] - [Getter][#pSpecializationInfo()] - [Setter][#pSpecializationInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkShaderCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkShaderCreateFlagsEXT flags; +/// VkShaderStageFlagBits stage; +/// VkShaderStageFlags nextStage; +/// VkShaderCodeTypeEXT codeType; +/// size_t codeSize; +/// const void * pCode; +/// const char * pName; +/// uint32_t setLayoutCount; +/// const VkDescriptorSetLayout * pSetLayouts; +/// uint32_t pushConstantRangeCount; +/// const VkPushConstantRange * pPushConstantRanges; +/// const VkSpecializationInfo * pSpecializationInfo; +/// } VkShaderCreateInfoEXT; +/// ``` +public final class VkShaderCreateInfoEXT extends Struct { + /// The struct layout of `VkShaderCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("stage"), + ValueLayout.JAVA_INT.withName("nextStage"), + ValueLayout.JAVA_INT.withName("codeType"), + ValueLayout.JAVA_LONG.withName("codeSize"), + ValueLayout.ADDRESS.withName("pCode"), + ValueLayout.ADDRESS.withName("pName"), + ValueLayout.JAVA_INT.withName("setLayoutCount"), + ValueLayout.ADDRESS.withName("pSetLayouts"), + ValueLayout.JAVA_INT.withName("pushConstantRangeCount"), + ValueLayout.ADDRESS.withName("pPushConstantRanges"), + ValueLayout.ADDRESS.withName("pSpecializationInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `stage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stage")); + /// The [VarHandle] of `nextStage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nextStage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nextStage")); + /// The [VarHandle] of `codeType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_codeType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("codeType")); + /// The [VarHandle] of `codeSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_codeSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("codeSize")); + /// The [VarHandle] of `pCode` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCode")); + /// The [VarHandle] of `pName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pName")); + /// The [VarHandle] of `setLayoutCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_setLayoutCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("setLayoutCount")); + /// The [VarHandle] of `pSetLayouts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSetLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSetLayouts")); + /// The [VarHandle] of `pushConstantRangeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pushConstantRangeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pushConstantRangeCount")); + /// The [VarHandle] of `pPushConstantRanges` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPushConstantRanges = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPushConstantRanges")); + /// The [VarHandle] of `pSpecializationInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSpecializationInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSpecializationInfo")); + + /// Creates `VkShaderCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkShaderCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkShaderCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderCreateInfoEXT(segment); } + + /// Creates `VkShaderCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkShaderCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkShaderCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkShaderCreateInfoEXT` + public static VkShaderCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkShaderCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkShaderCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkShaderCreateInfoEXT` + public static VkShaderCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkShaderCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkShaderCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkShaderCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkShaderCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkShaderCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkShaderCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT sType(@CType("VkStructureType") int value) { VkShaderCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkShaderCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkShaderCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkShaderCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderCreateFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkShaderCreateFlagsEXT") int get_flags(MemorySegment segment) { return VkShaderCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkShaderCreateFlagsEXT") int flagsAt(long index) { return VkShaderCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkShaderCreateFlagsEXT") int flags() { return VkShaderCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkShaderCreateFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkShaderCreateFlagsEXT") int value) { VkShaderCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT flagsAt(long index, @CType("VkShaderCreateFlagsEXT") int value) { VkShaderCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT flags(@CType("VkShaderCreateFlagsEXT") int value) { VkShaderCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `stage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlagBits") int get_stage(MemorySegment segment, long index) { return (int) VH_stage.get(segment, 0L, index); } + /// {@return `stage`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlagBits") int get_stage(MemorySegment segment) { return VkShaderCreateInfoEXT.get_stage(segment, 0L); } + /// {@return `stage` at the given index} + /// @param index the index + public @CType("VkShaderStageFlagBits") int stageAt(long index) { return VkShaderCreateInfoEXT.get_stage(this.segment(), index); } + /// {@return `stage`} + public @CType("VkShaderStageFlagBits") int stage() { return VkShaderCreateInfoEXT.get_stage(this.segment()); } + /// Sets `stage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stage(MemorySegment segment, long index, @CType("VkShaderStageFlagBits") int value) { VH_stage.set(segment, 0L, index, value); } + /// Sets `stage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stage(MemorySegment segment, @CType("VkShaderStageFlagBits") int value) { VkShaderCreateInfoEXT.set_stage(segment, 0L, value); } + /// Sets `stage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT stageAt(long index, @CType("VkShaderStageFlagBits") int value) { VkShaderCreateInfoEXT.set_stage(this.segment(), index, value); return this; } + /// Sets `stage` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT stage(@CType("VkShaderStageFlagBits") int value) { VkShaderCreateInfoEXT.set_stage(this.segment(), value); return this; } + + /// {@return `nextStage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_nextStage(MemorySegment segment, long index) { return (int) VH_nextStage.get(segment, 0L, index); } + /// {@return `nextStage`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_nextStage(MemorySegment segment) { return VkShaderCreateInfoEXT.get_nextStage(segment, 0L); } + /// {@return `nextStage` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int nextStageAt(long index) { return VkShaderCreateInfoEXT.get_nextStage(this.segment(), index); } + /// {@return `nextStage`} + public @CType("VkShaderStageFlags") int nextStage() { return VkShaderCreateInfoEXT.get_nextStage(this.segment()); } + /// Sets `nextStage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nextStage(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_nextStage.set(segment, 0L, index, value); } + /// Sets `nextStage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nextStage(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkShaderCreateInfoEXT.set_nextStage(segment, 0L, value); } + /// Sets `nextStage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT nextStageAt(long index, @CType("VkShaderStageFlags") int value) { VkShaderCreateInfoEXT.set_nextStage(this.segment(), index, value); return this; } + /// Sets `nextStage` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT nextStage(@CType("VkShaderStageFlags") int value) { VkShaderCreateInfoEXT.set_nextStage(this.segment(), value); return this; } + + /// {@return `codeType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderCodeTypeEXT") int get_codeType(MemorySegment segment, long index) { return (int) VH_codeType.get(segment, 0L, index); } + /// {@return `codeType`} + /// @param segment the segment of the struct + public static @CType("VkShaderCodeTypeEXT") int get_codeType(MemorySegment segment) { return VkShaderCreateInfoEXT.get_codeType(segment, 0L); } + /// {@return `codeType` at the given index} + /// @param index the index + public @CType("VkShaderCodeTypeEXT") int codeTypeAt(long index) { return VkShaderCreateInfoEXT.get_codeType(this.segment(), index); } + /// {@return `codeType`} + public @CType("VkShaderCodeTypeEXT") int codeType() { return VkShaderCreateInfoEXT.get_codeType(this.segment()); } + /// Sets `codeType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_codeType(MemorySegment segment, long index, @CType("VkShaderCodeTypeEXT") int value) { VH_codeType.set(segment, 0L, index, value); } + /// Sets `codeType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_codeType(MemorySegment segment, @CType("VkShaderCodeTypeEXT") int value) { VkShaderCreateInfoEXT.set_codeType(segment, 0L, value); } + /// Sets `codeType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT codeTypeAt(long index, @CType("VkShaderCodeTypeEXT") int value) { VkShaderCreateInfoEXT.set_codeType(this.segment(), index, value); return this; } + /// Sets `codeType` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT codeType(@CType("VkShaderCodeTypeEXT") int value) { VkShaderCreateInfoEXT.set_codeType(this.segment(), value); return this; } + + /// {@return `codeSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_codeSize(MemorySegment segment, long index) { return (long) VH_codeSize.get(segment, 0L, index); } + /// {@return `codeSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_codeSize(MemorySegment segment) { return VkShaderCreateInfoEXT.get_codeSize(segment, 0L); } + /// {@return `codeSize` at the given index} + /// @param index the index + public @CType("size_t") long codeSizeAt(long index) { return VkShaderCreateInfoEXT.get_codeSize(this.segment(), index); } + /// {@return `codeSize`} + public @CType("size_t") long codeSize() { return VkShaderCreateInfoEXT.get_codeSize(this.segment()); } + /// Sets `codeSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_codeSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_codeSize.set(segment, 0L, index, value); } + /// Sets `codeSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_codeSize(MemorySegment segment, @CType("size_t") long value) { VkShaderCreateInfoEXT.set_codeSize(segment, 0L, value); } + /// Sets `codeSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT codeSizeAt(long index, @CType("size_t") long value) { VkShaderCreateInfoEXT.set_codeSize(this.segment(), index, value); return this; } + /// Sets `codeSize` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT codeSize(@CType("size_t") long value) { VkShaderCreateInfoEXT.set_codeSize(this.segment(), value); return this; } + + /// {@return `pCode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pCode(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCode.get(segment, 0L, index); } + /// {@return `pCode`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pCode(MemorySegment segment) { return VkShaderCreateInfoEXT.get_pCode(segment, 0L); } + /// {@return `pCode` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pCodeAt(long index) { return VkShaderCreateInfoEXT.get_pCode(this.segment(), index); } + /// {@return `pCode`} + public @CType("const void *") java.lang.foreign.MemorySegment pCode() { return VkShaderCreateInfoEXT.get_pCode(this.segment()); } + /// Sets `pCode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCode(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pCode.set(segment, 0L, index, value); } + /// Sets `pCode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCode(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pCode(segment, 0L, value); } + /// Sets `pCode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pCodeAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pCode(this.segment(), index, value); return this; } + /// Sets `pCode` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pCode(@CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pCode(this.segment(), value); return this; } + + /// {@return `pName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pName.get(segment, 0L, index); } + /// {@return `pName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pName(MemorySegment segment) { return VkShaderCreateInfoEXT.get_pName(segment, 0L); } + /// {@return `pName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pNameAt(long index) { return VkShaderCreateInfoEXT.get_pName(this.segment(), index); } + /// {@return `pName`} + public @CType("const char *") java.lang.foreign.MemorySegment pName() { return VkShaderCreateInfoEXT.get_pName(this.segment()); } + /// Sets `pName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pName.set(segment, 0L, index, value); } + /// Sets `pName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pName(segment, 0L, value); } + /// Sets `pName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pName(this.segment(), index, value); return this; } + /// Sets `pName` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pName(this.segment(), value); return this; } + + /// {@return `setLayoutCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_setLayoutCount(MemorySegment segment, long index) { return (int) VH_setLayoutCount.get(segment, 0L, index); } + /// {@return `setLayoutCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_setLayoutCount(MemorySegment segment) { return VkShaderCreateInfoEXT.get_setLayoutCount(segment, 0L); } + /// {@return `setLayoutCount` at the given index} + /// @param index the index + public @CType("uint32_t") int setLayoutCountAt(long index) { return VkShaderCreateInfoEXT.get_setLayoutCount(this.segment(), index); } + /// {@return `setLayoutCount`} + public @CType("uint32_t") int setLayoutCount() { return VkShaderCreateInfoEXT.get_setLayoutCount(this.segment()); } + /// Sets `setLayoutCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_setLayoutCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_setLayoutCount.set(segment, 0L, index, value); } + /// Sets `setLayoutCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_setLayoutCount(MemorySegment segment, @CType("uint32_t") int value) { VkShaderCreateInfoEXT.set_setLayoutCount(segment, 0L, value); } + /// Sets `setLayoutCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT setLayoutCountAt(long index, @CType("uint32_t") int value) { VkShaderCreateInfoEXT.set_setLayoutCount(this.segment(), index, value); return this; } + /// Sets `setLayoutCount` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT setLayoutCount(@CType("uint32_t") int value) { VkShaderCreateInfoEXT.set_setLayoutCount(this.segment(), value); return this; } + + /// {@return `pSetLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment get_pSetLayouts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSetLayouts.get(segment, 0L, index); } + /// {@return `pSetLayouts`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment get_pSetLayouts(MemorySegment segment) { return VkShaderCreateInfoEXT.get_pSetLayouts(segment, 0L); } + /// {@return `pSetLayouts` at the given index} + /// @param index the index + public @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment pSetLayoutsAt(long index) { return VkShaderCreateInfoEXT.get_pSetLayouts(this.segment(), index); } + /// {@return `pSetLayouts`} + public @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment pSetLayouts() { return VkShaderCreateInfoEXT.get_pSetLayouts(this.segment()); } + /// Sets `pSetLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSetLayouts(MemorySegment segment, long index, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VH_pSetLayouts.set(segment, 0L, index, value); } + /// Sets `pSetLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSetLayouts(MemorySegment segment, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pSetLayouts(segment, 0L, value); } + /// Sets `pSetLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pSetLayoutsAt(long index, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pSetLayouts(this.segment(), index, value); return this; } + /// Sets `pSetLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pSetLayouts(@CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pSetLayouts(this.segment(), value); return this; } + + /// {@return `pushConstantRangeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pushConstantRangeCount(MemorySegment segment, long index) { return (int) VH_pushConstantRangeCount.get(segment, 0L, index); } + /// {@return `pushConstantRangeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pushConstantRangeCount(MemorySegment segment) { return VkShaderCreateInfoEXT.get_pushConstantRangeCount(segment, 0L); } + /// {@return `pushConstantRangeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pushConstantRangeCountAt(long index) { return VkShaderCreateInfoEXT.get_pushConstantRangeCount(this.segment(), index); } + /// {@return `pushConstantRangeCount`} + public @CType("uint32_t") int pushConstantRangeCount() { return VkShaderCreateInfoEXT.get_pushConstantRangeCount(this.segment()); } + /// Sets `pushConstantRangeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pushConstantRangeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pushConstantRangeCount.set(segment, 0L, index, value); } + /// Sets `pushConstantRangeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pushConstantRangeCount(MemorySegment segment, @CType("uint32_t") int value) { VkShaderCreateInfoEXT.set_pushConstantRangeCount(segment, 0L, value); } + /// Sets `pushConstantRangeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pushConstantRangeCountAt(long index, @CType("uint32_t") int value) { VkShaderCreateInfoEXT.set_pushConstantRangeCount(this.segment(), index, value); return this; } + /// Sets `pushConstantRangeCount` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pushConstantRangeCount(@CType("uint32_t") int value) { VkShaderCreateInfoEXT.set_pushConstantRangeCount(this.segment(), value); return this; } + + /// {@return `pPushConstantRanges` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment get_pPushConstantRanges(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPushConstantRanges.get(segment, 0L, index); } + /// {@return `pPushConstantRanges`} + /// @param segment the segment of the struct + public static @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment get_pPushConstantRanges(MemorySegment segment) { return VkShaderCreateInfoEXT.get_pPushConstantRanges(segment, 0L); } + /// {@return `pPushConstantRanges` at the given index} + /// @param index the index + public @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment pPushConstantRangesAt(long index) { return VkShaderCreateInfoEXT.get_pPushConstantRanges(this.segment(), index); } + /// {@return `pPushConstantRanges`} + public @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment pPushConstantRanges() { return VkShaderCreateInfoEXT.get_pPushConstantRanges(this.segment()); } + /// Sets `pPushConstantRanges` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPushConstantRanges(MemorySegment segment, long index, @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VH_pPushConstantRanges.set(segment, 0L, index, value); } + /// Sets `pPushConstantRanges` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPushConstantRanges(MemorySegment segment, @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pPushConstantRanges(segment, 0L, value); } + /// Sets `pPushConstantRanges` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pPushConstantRangesAt(long index, @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pPushConstantRanges(this.segment(), index, value); return this; } + /// Sets `pPushConstantRanges` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pPushConstantRanges(@CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pPushConstantRanges(this.segment(), value); return this; } + + /// {@return `pSpecializationInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment get_pSpecializationInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSpecializationInfo.get(segment, 0L, index); } + /// {@return `pSpecializationInfo`} + /// @param segment the segment of the struct + public static @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment get_pSpecializationInfo(MemorySegment segment) { return VkShaderCreateInfoEXT.get_pSpecializationInfo(segment, 0L); } + /// {@return `pSpecializationInfo` at the given index} + /// @param index the index + public @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment pSpecializationInfoAt(long index) { return VkShaderCreateInfoEXT.get_pSpecializationInfo(this.segment(), index); } + /// {@return `pSpecializationInfo`} + public @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment pSpecializationInfo() { return VkShaderCreateInfoEXT.get_pSpecializationInfo(this.segment()); } + /// Sets `pSpecializationInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSpecializationInfo(MemorySegment segment, long index, @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment value) { VH_pSpecializationInfo.set(segment, 0L, index, value); } + /// Sets `pSpecializationInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSpecializationInfo(MemorySegment segment, @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pSpecializationInfo(segment, 0L, value); } + /// Sets `pSpecializationInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pSpecializationInfoAt(long index, @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pSpecializationInfo(this.segment(), index, value); return this; } + /// Sets `pSpecializationInfo` with the given value. + /// @param value the value + /// @return `this` + public VkShaderCreateInfoEXT pSpecializationInfo(@CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment value) { VkShaderCreateInfoEXT.set_pSpecializationInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkShaderModuleIdentifierEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkShaderModuleIdentifierEXT.java new file mode 100644 index 00000000..23f2373f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkShaderModuleIdentifierEXT.java @@ -0,0 +1,239 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.ext.VKEXTShaderModuleIdentifier.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### identifierSize +/// [VarHandle][#VH_identifierSize] - [Getter][#identifierSize()] - [Setter][#identifierSize(int)] +/// ### identifier +/// [Byte offset handle][#MH_identifier] - [Memory layout][#ML_identifier] - [Getter][#identifier(long)] - [Setter][#identifier(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkShaderModuleIdentifierEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t identifierSize; +/// uint8_t[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT] identifier; +/// } VkShaderModuleIdentifierEXT; +/// ``` +public final class VkShaderModuleIdentifierEXT extends Struct { + /// The struct layout of `VkShaderModuleIdentifierEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("identifierSize"), + MemoryLayout.sequenceLayout(VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT, ValueLayout.JAVA_BYTE).withName("identifier") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `identifierSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_identifierSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("identifierSize")); + /// The byte offset handle of `identifier` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_identifier = LAYOUT.byteOffsetHandle(PathElement.groupElement("identifier"), PathElement.sequenceElement()); + /// The memory layout of `identifier`. + public static final MemoryLayout ML_identifier = LAYOUT.select(PathElement.groupElement("identifier")); + + /// Creates `VkShaderModuleIdentifierEXT` with the given segment. + /// @param segment the memory segment + public VkShaderModuleIdentifierEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkShaderModuleIdentifierEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderModuleIdentifierEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderModuleIdentifierEXT(segment); } + + /// Creates `VkShaderModuleIdentifierEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderModuleIdentifierEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderModuleIdentifierEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkShaderModuleIdentifierEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderModuleIdentifierEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderModuleIdentifierEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkShaderModuleIdentifierEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkShaderModuleIdentifierEXT` + public static VkShaderModuleIdentifierEXT alloc(SegmentAllocator allocator) { return new VkShaderModuleIdentifierEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkShaderModuleIdentifierEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkShaderModuleIdentifierEXT` + public static VkShaderModuleIdentifierEXT alloc(SegmentAllocator allocator, long count) { return new VkShaderModuleIdentifierEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkShaderModuleIdentifierEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkShaderModuleIdentifierEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkShaderModuleIdentifierEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkShaderModuleIdentifierEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleIdentifierEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkShaderModuleIdentifierEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleIdentifierEXT sType(@CType("VkStructureType") int value) { VkShaderModuleIdentifierEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkShaderModuleIdentifierEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkShaderModuleIdentifierEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkShaderModuleIdentifierEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkShaderModuleIdentifierEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleIdentifierEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkShaderModuleIdentifierEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleIdentifierEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkShaderModuleIdentifierEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `identifierSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_identifierSize(MemorySegment segment, long index) { return (int) VH_identifierSize.get(segment, 0L, index); } + /// {@return `identifierSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_identifierSize(MemorySegment segment) { return VkShaderModuleIdentifierEXT.get_identifierSize(segment, 0L); } + /// {@return `identifierSize` at the given index} + /// @param index the index + public @CType("uint32_t") int identifierSizeAt(long index) { return VkShaderModuleIdentifierEXT.get_identifierSize(this.segment(), index); } + /// {@return `identifierSize`} + public @CType("uint32_t") int identifierSize() { return VkShaderModuleIdentifierEXT.get_identifierSize(this.segment()); } + /// Sets `identifierSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_identifierSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_identifierSize.set(segment, 0L, index, value); } + /// Sets `identifierSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_identifierSize(MemorySegment segment, @CType("uint32_t") int value) { VkShaderModuleIdentifierEXT.set_identifierSize(segment, 0L, value); } + /// Sets `identifierSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleIdentifierEXT identifierSizeAt(long index, @CType("uint32_t") int value) { VkShaderModuleIdentifierEXT.set_identifierSize(this.segment(), index, value); return this; } + /// Sets `identifierSize` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleIdentifierEXT identifierSize(@CType("uint32_t") int value) { VkShaderModuleIdentifierEXT.set_identifierSize(this.segment(), value); return this; } + + /// {@return `identifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT]") java.lang.foreign.MemorySegment get_identifier(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_identifier.invokeExact(0L, elementIndex), index), ML_identifier); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `identifier`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT]") java.lang.foreign.MemorySegment get_identifier(MemorySegment segment, long elementIndex) { return VkShaderModuleIdentifierEXT.get_identifier(segment, 0L, elementIndex); } + /// {@return `identifier` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT]") java.lang.foreign.MemorySegment identifierAt(long index, long elementIndex) { return VkShaderModuleIdentifierEXT.get_identifier(this.segment(), index, elementIndex); } + /// {@return `identifier`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT]") java.lang.foreign.MemorySegment identifier(long elementIndex) { return VkShaderModuleIdentifierEXT.get_identifier(this.segment(), elementIndex); } + /// Sets `identifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_identifier(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_identifier.invokeExact(0L, elementIndex), index), ML_identifier.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `identifier` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_identifier(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT]") java.lang.foreign.MemorySegment value) { VkShaderModuleIdentifierEXT.set_identifier(segment, 0L, elementIndex, value); } + /// Sets `identifier` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkShaderModuleIdentifierEXT identifierAt(long index, long elementIndex, @CType("uint8_t[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT]") java.lang.foreign.MemorySegment value) { VkShaderModuleIdentifierEXT.set_identifier(this.segment(), index, elementIndex, value); return this; } + /// Sets `identifier` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkShaderModuleIdentifierEXT identifier(long elementIndex, @CType("uint8_t[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT]") java.lang.foreign.MemorySegment value) { VkShaderModuleIdentifierEXT.set_identifier(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkShaderModuleValidationCacheCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkShaderModuleValidationCacheCreateInfoEXT.java new file mode 100644 index 00000000..8bcb4ca0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkShaderModuleValidationCacheCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### validationCache +/// [VarHandle][#VH_validationCache] - [Getter][#validationCache()] - [Setter][#validationCache(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkShaderModuleValidationCacheCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkValidationCacheEXT validationCache; +/// } VkShaderModuleValidationCacheCreateInfoEXT; +/// ``` +public final class VkShaderModuleValidationCacheCreateInfoEXT extends Struct { + /// The struct layout of `VkShaderModuleValidationCacheCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("validationCache") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `validationCache` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_validationCache = LAYOUT.arrayElementVarHandle(PathElement.groupElement("validationCache")); + + /// Creates `VkShaderModuleValidationCacheCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkShaderModuleValidationCacheCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkShaderModuleValidationCacheCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderModuleValidationCacheCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderModuleValidationCacheCreateInfoEXT(segment); } + + /// Creates `VkShaderModuleValidationCacheCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderModuleValidationCacheCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderModuleValidationCacheCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkShaderModuleValidationCacheCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderModuleValidationCacheCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderModuleValidationCacheCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkShaderModuleValidationCacheCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkShaderModuleValidationCacheCreateInfoEXT` + public static VkShaderModuleValidationCacheCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkShaderModuleValidationCacheCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkShaderModuleValidationCacheCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkShaderModuleValidationCacheCreateInfoEXT` + public static VkShaderModuleValidationCacheCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkShaderModuleValidationCacheCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkShaderModuleValidationCacheCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkShaderModuleValidationCacheCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkShaderModuleValidationCacheCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkShaderModuleValidationCacheCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleValidationCacheCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkShaderModuleValidationCacheCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleValidationCacheCreateInfoEXT sType(@CType("VkStructureType") int value) { VkShaderModuleValidationCacheCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkShaderModuleValidationCacheCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkShaderModuleValidationCacheCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkShaderModuleValidationCacheCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderModuleValidationCacheCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleValidationCacheCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderModuleValidationCacheCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleValidationCacheCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderModuleValidationCacheCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `validationCache` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkValidationCacheEXT") java.lang.foreign.MemorySegment get_validationCache(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_validationCache.get(segment, 0L, index); } + /// {@return `validationCache`} + /// @param segment the segment of the struct + public static @CType("VkValidationCacheEXT") java.lang.foreign.MemorySegment get_validationCache(MemorySegment segment) { return VkShaderModuleValidationCacheCreateInfoEXT.get_validationCache(segment, 0L); } + /// {@return `validationCache` at the given index} + /// @param index the index + public @CType("VkValidationCacheEXT") java.lang.foreign.MemorySegment validationCacheAt(long index) { return VkShaderModuleValidationCacheCreateInfoEXT.get_validationCache(this.segment(), index); } + /// {@return `validationCache`} + public @CType("VkValidationCacheEXT") java.lang.foreign.MemorySegment validationCache() { return VkShaderModuleValidationCacheCreateInfoEXT.get_validationCache(this.segment()); } + /// Sets `validationCache` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_validationCache(MemorySegment segment, long index, @CType("VkValidationCacheEXT") java.lang.foreign.MemorySegment value) { VH_validationCache.set(segment, 0L, index, value); } + /// Sets `validationCache` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_validationCache(MemorySegment segment, @CType("VkValidationCacheEXT") java.lang.foreign.MemorySegment value) { VkShaderModuleValidationCacheCreateInfoEXT.set_validationCache(segment, 0L, value); } + /// Sets `validationCache` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleValidationCacheCreateInfoEXT validationCacheAt(long index, @CType("VkValidationCacheEXT") java.lang.foreign.MemorySegment value) { VkShaderModuleValidationCacheCreateInfoEXT.set_validationCache(this.segment(), index, value); return this; } + /// Sets `validationCache` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleValidationCacheCreateInfoEXT validationCache(@CType("VkValidationCacheEXT") java.lang.foreign.MemorySegment value) { VkShaderModuleValidationCacheCreateInfoEXT.set_validationCache(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSubpassResolvePerformanceQueryEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSubpassResolvePerformanceQueryEXT.java new file mode 100644 index 00000000..56a58e50 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSubpassResolvePerformanceQueryEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### optimal +/// [VarHandle][#VH_optimal] - [Getter][#optimal()] - [Setter][#optimal(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassResolvePerformanceQueryEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 optimal; +/// } VkSubpassResolvePerformanceQueryEXT; +/// ``` +public final class VkSubpassResolvePerformanceQueryEXT extends Struct { + /// The struct layout of `VkSubpassResolvePerformanceQueryEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("optimal") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `optimal` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_optimal = LAYOUT.arrayElementVarHandle(PathElement.groupElement("optimal")); + + /// Creates `VkSubpassResolvePerformanceQueryEXT` with the given segment. + /// @param segment the memory segment + public VkSubpassResolvePerformanceQueryEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassResolvePerformanceQueryEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassResolvePerformanceQueryEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassResolvePerformanceQueryEXT(segment); } + + /// Creates `VkSubpassResolvePerformanceQueryEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassResolvePerformanceQueryEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassResolvePerformanceQueryEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassResolvePerformanceQueryEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassResolvePerformanceQueryEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassResolvePerformanceQueryEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassResolvePerformanceQueryEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassResolvePerformanceQueryEXT` + public static VkSubpassResolvePerformanceQueryEXT alloc(SegmentAllocator allocator) { return new VkSubpassResolvePerformanceQueryEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassResolvePerformanceQueryEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassResolvePerformanceQueryEXT` + public static VkSubpassResolvePerformanceQueryEXT alloc(SegmentAllocator allocator, long count) { return new VkSubpassResolvePerformanceQueryEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubpassResolvePerformanceQueryEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubpassResolvePerformanceQueryEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubpassResolvePerformanceQueryEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubpassResolvePerformanceQueryEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassResolvePerformanceQueryEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSubpassResolvePerformanceQueryEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassResolvePerformanceQueryEXT sType(@CType("VkStructureType") int value) { VkSubpassResolvePerformanceQueryEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubpassResolvePerformanceQueryEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubpassResolvePerformanceQueryEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSubpassResolvePerformanceQueryEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSubpassResolvePerformanceQueryEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassResolvePerformanceQueryEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSubpassResolvePerformanceQueryEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassResolvePerformanceQueryEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSubpassResolvePerformanceQueryEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `optimal` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_optimal(MemorySegment segment, long index) { return (int) VH_optimal.get(segment, 0L, index); } + /// {@return `optimal`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_optimal(MemorySegment segment) { return VkSubpassResolvePerformanceQueryEXT.get_optimal(segment, 0L); } + /// {@return `optimal` at the given index} + /// @param index the index + public @CType("VkBool32") int optimalAt(long index) { return VkSubpassResolvePerformanceQueryEXT.get_optimal(this.segment(), index); } + /// {@return `optimal`} + public @CType("VkBool32") int optimal() { return VkSubpassResolvePerformanceQueryEXT.get_optimal(this.segment()); } + /// Sets `optimal` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_optimal(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_optimal.set(segment, 0L, index, value); } + /// Sets `optimal` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_optimal(MemorySegment segment, @CType("VkBool32") int value) { VkSubpassResolvePerformanceQueryEXT.set_optimal(segment, 0L, value); } + /// Sets `optimal` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassResolvePerformanceQueryEXT optimalAt(long index, @CType("VkBool32") int value) { VkSubpassResolvePerformanceQueryEXT.set_optimal(this.segment(), index, value); return this; } + /// Sets `optimal` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassResolvePerformanceQueryEXT optimal(@CType("VkBool32") int value) { VkSubpassResolvePerformanceQueryEXT.set_optimal(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSubpassSampleLocationsEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSubpassSampleLocationsEXT.java new file mode 100644 index 00000000..adb83444 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSubpassSampleLocationsEXT.java @@ -0,0 +1,150 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### subpassIndex +/// [VarHandle][#VH_subpassIndex] - [Getter][#subpassIndex()] - [Setter][#subpassIndex(int)] +/// ### sampleLocationsInfo +/// [Byte offset][#OFFSET_sampleLocationsInfo] - [Memory layout][#ML_sampleLocationsInfo] - [Getter][#sampleLocationsInfo()] - [Setter][#sampleLocationsInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassSampleLocationsEXT { +/// uint32_t subpassIndex; +/// VkSampleLocationsInfoEXT sampleLocationsInfo; +/// } VkSubpassSampleLocationsEXT; +/// ``` +public final class VkSubpassSampleLocationsEXT extends Struct { + /// The struct layout of `VkSubpassSampleLocationsEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("subpassIndex"), + overrungl.vulkan.ext.struct.VkSampleLocationsInfoEXT.LAYOUT.withName("sampleLocationsInfo") + ); + /// The [VarHandle] of `subpassIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpassIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpassIndex")); + /// The byte offset of `sampleLocationsInfo`. + public static final long OFFSET_sampleLocationsInfo = LAYOUT.byteOffset(PathElement.groupElement("sampleLocationsInfo")); + /// The memory layout of `sampleLocationsInfo`. + public static final MemoryLayout ML_sampleLocationsInfo = LAYOUT.select(PathElement.groupElement("sampleLocationsInfo")); + + /// Creates `VkSubpassSampleLocationsEXT` with the given segment. + /// @param segment the memory segment + public VkSubpassSampleLocationsEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassSampleLocationsEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassSampleLocationsEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassSampleLocationsEXT(segment); } + + /// Creates `VkSubpassSampleLocationsEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassSampleLocationsEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassSampleLocationsEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassSampleLocationsEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassSampleLocationsEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassSampleLocationsEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassSampleLocationsEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassSampleLocationsEXT` + public static VkSubpassSampleLocationsEXT alloc(SegmentAllocator allocator) { return new VkSubpassSampleLocationsEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassSampleLocationsEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassSampleLocationsEXT` + public static VkSubpassSampleLocationsEXT alloc(SegmentAllocator allocator, long count) { return new VkSubpassSampleLocationsEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `subpassIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subpassIndex(MemorySegment segment, long index) { return (int) VH_subpassIndex.get(segment, 0L, index); } + /// {@return `subpassIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subpassIndex(MemorySegment segment) { return VkSubpassSampleLocationsEXT.get_subpassIndex(segment, 0L); } + /// {@return `subpassIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int subpassIndexAt(long index) { return VkSubpassSampleLocationsEXT.get_subpassIndex(this.segment(), index); } + /// {@return `subpassIndex`} + public @CType("uint32_t") int subpassIndex() { return VkSubpassSampleLocationsEXT.get_subpassIndex(this.segment()); } + /// Sets `subpassIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpassIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subpassIndex.set(segment, 0L, index, value); } + /// Sets `subpassIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpassIndex(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassSampleLocationsEXT.set_subpassIndex(segment, 0L, value); } + /// Sets `subpassIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassSampleLocationsEXT subpassIndexAt(long index, @CType("uint32_t") int value) { VkSubpassSampleLocationsEXT.set_subpassIndex(this.segment(), index, value); return this; } + /// Sets `subpassIndex` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassSampleLocationsEXT subpassIndex(@CType("uint32_t") int value) { VkSubpassSampleLocationsEXT.set_subpassIndex(this.segment(), value); return this; } + + /// {@return `sampleLocationsInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment get_sampleLocationsInfo(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_sampleLocationsInfo, index), ML_sampleLocationsInfo); } + /// {@return `sampleLocationsInfo`} + /// @param segment the segment of the struct + public static @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment get_sampleLocationsInfo(MemorySegment segment) { return VkSubpassSampleLocationsEXT.get_sampleLocationsInfo(segment, 0L); } + /// {@return `sampleLocationsInfo` at the given index} + /// @param index the index + public @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment sampleLocationsInfoAt(long index) { return VkSubpassSampleLocationsEXT.get_sampleLocationsInfo(this.segment(), index); } + /// {@return `sampleLocationsInfo`} + public @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment sampleLocationsInfo() { return VkSubpassSampleLocationsEXT.get_sampleLocationsInfo(this.segment()); } + /// Sets `sampleLocationsInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationsInfo(MemorySegment segment, long index, @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_sampleLocationsInfo, index), ML_sampleLocationsInfo.byteSize()); } + /// Sets `sampleLocationsInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationsInfo(MemorySegment segment, @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { VkSubpassSampleLocationsEXT.set_sampleLocationsInfo(segment, 0L, value); } + /// Sets `sampleLocationsInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassSampleLocationsEXT sampleLocationsInfoAt(long index, @CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { VkSubpassSampleLocationsEXT.set_sampleLocationsInfo(this.segment(), index, value); return this; } + /// Sets `sampleLocationsInfo` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassSampleLocationsEXT sampleLocationsInfo(@CType("VkSampleLocationsInfoEXT") java.lang.foreign.MemorySegment value) { VkSubpassSampleLocationsEXT.set_sampleLocationsInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceCapabilities2EXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceCapabilities2EXT.java new file mode 100644 index 00000000..d3e62e88 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceCapabilities2EXT.java @@ -0,0 +1,561 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minImageCount +/// [VarHandle][#VH_minImageCount] - [Getter][#minImageCount()] - [Setter][#minImageCount(int)] +/// ### maxImageCount +/// [VarHandle][#VH_maxImageCount] - [Getter][#maxImageCount()] - [Setter][#maxImageCount(int)] +/// ### currentExtent +/// [Byte offset][#OFFSET_currentExtent] - [Memory layout][#ML_currentExtent] - [Getter][#currentExtent()] - [Setter][#currentExtent(java.lang.foreign.MemorySegment)] +/// ### minImageExtent +/// [Byte offset][#OFFSET_minImageExtent] - [Memory layout][#ML_minImageExtent] - [Getter][#minImageExtent()] - [Setter][#minImageExtent(java.lang.foreign.MemorySegment)] +/// ### maxImageExtent +/// [Byte offset][#OFFSET_maxImageExtent] - [Memory layout][#ML_maxImageExtent] - [Getter][#maxImageExtent()] - [Setter][#maxImageExtent(java.lang.foreign.MemorySegment)] +/// ### maxImageArrayLayers +/// [VarHandle][#VH_maxImageArrayLayers] - [Getter][#maxImageArrayLayers()] - [Setter][#maxImageArrayLayers(int)] +/// ### supportedTransforms +/// [VarHandle][#VH_supportedTransforms] - [Getter][#supportedTransforms()] - [Setter][#supportedTransforms(int)] +/// ### currentTransform +/// [VarHandle][#VH_currentTransform] - [Getter][#currentTransform()] - [Setter][#currentTransform(int)] +/// ### supportedCompositeAlpha +/// [VarHandle][#VH_supportedCompositeAlpha] - [Getter][#supportedCompositeAlpha()] - [Setter][#supportedCompositeAlpha(int)] +/// ### supportedUsageFlags +/// [VarHandle][#VH_supportedUsageFlags] - [Getter][#supportedUsageFlags()] - [Setter][#supportedUsageFlags(int)] +/// ### supportedSurfaceCounters +/// [VarHandle][#VH_supportedSurfaceCounters] - [Getter][#supportedSurfaceCounters()] - [Setter][#supportedSurfaceCounters(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfaceCapabilities2EXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t minImageCount; +/// uint32_t maxImageCount; +/// VkExtent2D currentExtent; +/// VkExtent2D minImageExtent; +/// VkExtent2D maxImageExtent; +/// uint32_t maxImageArrayLayers; +/// VkSurfaceTransformFlagsKHR supportedTransforms; +/// VkSurfaceTransformFlagBitsKHR currentTransform; +/// VkCompositeAlphaFlagsKHR supportedCompositeAlpha; +/// VkImageUsageFlags supportedUsageFlags; +/// VkSurfaceCounterFlagsEXT supportedSurfaceCounters; +/// } VkSurfaceCapabilities2EXT; +/// ``` +public final class VkSurfaceCapabilities2EXT extends Struct { + /// The struct layout of `VkSurfaceCapabilities2EXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("minImageCount"), + ValueLayout.JAVA_INT.withName("maxImageCount"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("currentExtent"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("minImageExtent"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxImageExtent"), + ValueLayout.JAVA_INT.withName("maxImageArrayLayers"), + ValueLayout.JAVA_INT.withName("supportedTransforms"), + ValueLayout.JAVA_INT.withName("currentTransform"), + ValueLayout.JAVA_INT.withName("supportedCompositeAlpha"), + ValueLayout.JAVA_INT.withName("supportedUsageFlags"), + ValueLayout.JAVA_INT.withName("supportedSurfaceCounters") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minImageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minImageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minImageCount")); + /// The [VarHandle] of `maxImageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageCount")); + /// The byte offset of `currentExtent`. + public static final long OFFSET_currentExtent = LAYOUT.byteOffset(PathElement.groupElement("currentExtent")); + /// The memory layout of `currentExtent`. + public static final MemoryLayout ML_currentExtent = LAYOUT.select(PathElement.groupElement("currentExtent")); + /// The byte offset of `minImageExtent`. + public static final long OFFSET_minImageExtent = LAYOUT.byteOffset(PathElement.groupElement("minImageExtent")); + /// The memory layout of `minImageExtent`. + public static final MemoryLayout ML_minImageExtent = LAYOUT.select(PathElement.groupElement("minImageExtent")); + /// The byte offset of `maxImageExtent`. + public static final long OFFSET_maxImageExtent = LAYOUT.byteOffset(PathElement.groupElement("maxImageExtent")); + /// The memory layout of `maxImageExtent`. + public static final MemoryLayout ML_maxImageExtent = LAYOUT.select(PathElement.groupElement("maxImageExtent")); + /// The [VarHandle] of `maxImageArrayLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageArrayLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageArrayLayers")); + /// The [VarHandle] of `supportedTransforms` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedTransforms = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedTransforms")); + /// The [VarHandle] of `currentTransform` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_currentTransform = LAYOUT.arrayElementVarHandle(PathElement.groupElement("currentTransform")); + /// The [VarHandle] of `supportedCompositeAlpha` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedCompositeAlpha = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedCompositeAlpha")); + /// The [VarHandle] of `supportedUsageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedUsageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedUsageFlags")); + /// The [VarHandle] of `supportedSurfaceCounters` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedSurfaceCounters = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedSurfaceCounters")); + + /// Creates `VkSurfaceCapabilities2EXT` with the given segment. + /// @param segment the memory segment + public VkSurfaceCapabilities2EXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfaceCapabilities2EXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilities2EXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilities2EXT(segment); } + + /// Creates `VkSurfaceCapabilities2EXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilities2EXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilities2EXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfaceCapabilities2EXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilities2EXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilities2EXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfaceCapabilities2EXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfaceCapabilities2EXT` + public static VkSurfaceCapabilities2EXT alloc(SegmentAllocator allocator) { return new VkSurfaceCapabilities2EXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfaceCapabilities2EXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfaceCapabilities2EXT` + public static VkSurfaceCapabilities2EXT alloc(SegmentAllocator allocator, long count) { return new VkSurfaceCapabilities2EXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfaceCapabilities2EXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfaceCapabilities2EXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfaceCapabilities2EXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfaceCapabilities2EXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT sType(@CType("VkStructureType") int value) { VkSurfaceCapabilities2EXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfaceCapabilities2EXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSurfaceCapabilities2EXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_pNext(this.segment(), value); return this; } + + /// {@return `minImageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minImageCount(MemorySegment segment, long index) { return (int) VH_minImageCount.get(segment, 0L, index); } + /// {@return `minImageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minImageCount(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_minImageCount(segment, 0L); } + /// {@return `minImageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int minImageCountAt(long index) { return VkSurfaceCapabilities2EXT.get_minImageCount(this.segment(), index); } + /// {@return `minImageCount`} + public @CType("uint32_t") int minImageCount() { return VkSurfaceCapabilities2EXT.get_minImageCount(this.segment()); } + /// Sets `minImageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minImageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minImageCount.set(segment, 0L, index, value); } + /// Sets `minImageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minImageCount(MemorySegment segment, @CType("uint32_t") int value) { VkSurfaceCapabilities2EXT.set_minImageCount(segment, 0L, value); } + /// Sets `minImageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT minImageCountAt(long index, @CType("uint32_t") int value) { VkSurfaceCapabilities2EXT.set_minImageCount(this.segment(), index, value); return this; } + /// Sets `minImageCount` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT minImageCount(@CType("uint32_t") int value) { VkSurfaceCapabilities2EXT.set_minImageCount(this.segment(), value); return this; } + + /// {@return `maxImageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageCount(MemorySegment segment, long index) { return (int) VH_maxImageCount.get(segment, 0L, index); } + /// {@return `maxImageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageCount(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_maxImageCount(segment, 0L); } + /// {@return `maxImageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageCountAt(long index) { return VkSurfaceCapabilities2EXT.get_maxImageCount(this.segment(), index); } + /// {@return `maxImageCount`} + public @CType("uint32_t") int maxImageCount() { return VkSurfaceCapabilities2EXT.get_maxImageCount(this.segment()); } + /// Sets `maxImageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageCount.set(segment, 0L, index, value); } + /// Sets `maxImageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageCount(MemorySegment segment, @CType("uint32_t") int value) { VkSurfaceCapabilities2EXT.set_maxImageCount(segment, 0L, value); } + /// Sets `maxImageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT maxImageCountAt(long index, @CType("uint32_t") int value) { VkSurfaceCapabilities2EXT.set_maxImageCount(this.segment(), index, value); return this; } + /// Sets `maxImageCount` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT maxImageCount(@CType("uint32_t") int value) { VkSurfaceCapabilities2EXT.set_maxImageCount(this.segment(), value); return this; } + + /// {@return `currentExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_currentExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_currentExtent, index), ML_currentExtent); } + /// {@return `currentExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_currentExtent(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_currentExtent(segment, 0L); } + /// {@return `currentExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment currentExtentAt(long index) { return VkSurfaceCapabilities2EXT.get_currentExtent(this.segment(), index); } + /// {@return `currentExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment currentExtent() { return VkSurfaceCapabilities2EXT.get_currentExtent(this.segment()); } + /// Sets `currentExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_currentExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_currentExtent, index), ML_currentExtent.byteSize()); } + /// Sets `currentExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_currentExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_currentExtent(segment, 0L, value); } + /// Sets `currentExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT currentExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_currentExtent(this.segment(), index, value); return this; } + /// Sets `currentExtent` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT currentExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_currentExtent(this.segment(), value); return this; } + + /// {@return `minImageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minImageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minImageExtent, index), ML_minImageExtent); } + /// {@return `minImageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minImageExtent(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_minImageExtent(segment, 0L); } + /// {@return `minImageExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minImageExtentAt(long index) { return VkSurfaceCapabilities2EXT.get_minImageExtent(this.segment(), index); } + /// {@return `minImageExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minImageExtent() { return VkSurfaceCapabilities2EXT.get_minImageExtent(this.segment()); } + /// Sets `minImageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minImageExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minImageExtent, index), ML_minImageExtent.byteSize()); } + /// Sets `minImageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minImageExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_minImageExtent(segment, 0L, value); } + /// Sets `minImageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT minImageExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_minImageExtent(this.segment(), index, value); return this; } + /// Sets `minImageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT minImageExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_minImageExtent(this.segment(), value); return this; } + + /// {@return `maxImageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxImageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxImageExtent, index), ML_maxImageExtent); } + /// {@return `maxImageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxImageExtent(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_maxImageExtent(segment, 0L); } + /// {@return `maxImageExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxImageExtentAt(long index) { return VkSurfaceCapabilities2EXT.get_maxImageExtent(this.segment(), index); } + /// {@return `maxImageExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxImageExtent() { return VkSurfaceCapabilities2EXT.get_maxImageExtent(this.segment()); } + /// Sets `maxImageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxImageExtent, index), ML_maxImageExtent.byteSize()); } + /// Sets `maxImageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_maxImageExtent(segment, 0L, value); } + /// Sets `maxImageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT maxImageExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_maxImageExtent(this.segment(), index, value); return this; } + /// Sets `maxImageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT maxImageExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2EXT.set_maxImageExtent(this.segment(), value); return this; } + + /// {@return `maxImageArrayLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageArrayLayers(MemorySegment segment, long index) { return (int) VH_maxImageArrayLayers.get(segment, 0L, index); } + /// {@return `maxImageArrayLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageArrayLayers(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_maxImageArrayLayers(segment, 0L); } + /// {@return `maxImageArrayLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageArrayLayersAt(long index) { return VkSurfaceCapabilities2EXT.get_maxImageArrayLayers(this.segment(), index); } + /// {@return `maxImageArrayLayers`} + public @CType("uint32_t") int maxImageArrayLayers() { return VkSurfaceCapabilities2EXT.get_maxImageArrayLayers(this.segment()); } + /// Sets `maxImageArrayLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageArrayLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageArrayLayers.set(segment, 0L, index, value); } + /// Sets `maxImageArrayLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageArrayLayers(MemorySegment segment, @CType("uint32_t") int value) { VkSurfaceCapabilities2EXT.set_maxImageArrayLayers(segment, 0L, value); } + /// Sets `maxImageArrayLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT maxImageArrayLayersAt(long index, @CType("uint32_t") int value) { VkSurfaceCapabilities2EXT.set_maxImageArrayLayers(this.segment(), index, value); return this; } + /// Sets `maxImageArrayLayers` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT maxImageArrayLayers(@CType("uint32_t") int value) { VkSurfaceCapabilities2EXT.set_maxImageArrayLayers(this.segment(), value); return this; } + + /// {@return `supportedTransforms` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceTransformFlagsKHR") int get_supportedTransforms(MemorySegment segment, long index) { return (int) VH_supportedTransforms.get(segment, 0L, index); } + /// {@return `supportedTransforms`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceTransformFlagsKHR") int get_supportedTransforms(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_supportedTransforms(segment, 0L); } + /// {@return `supportedTransforms` at the given index} + /// @param index the index + public @CType("VkSurfaceTransformFlagsKHR") int supportedTransformsAt(long index) { return VkSurfaceCapabilities2EXT.get_supportedTransforms(this.segment(), index); } + /// {@return `supportedTransforms`} + public @CType("VkSurfaceTransformFlagsKHR") int supportedTransforms() { return VkSurfaceCapabilities2EXT.get_supportedTransforms(this.segment()); } + /// Sets `supportedTransforms` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedTransforms(MemorySegment segment, long index, @CType("VkSurfaceTransformFlagsKHR") int value) { VH_supportedTransforms.set(segment, 0L, index, value); } + /// Sets `supportedTransforms` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedTransforms(MemorySegment segment, @CType("VkSurfaceTransformFlagsKHR") int value) { VkSurfaceCapabilities2EXT.set_supportedTransforms(segment, 0L, value); } + /// Sets `supportedTransforms` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT supportedTransformsAt(long index, @CType("VkSurfaceTransformFlagsKHR") int value) { VkSurfaceCapabilities2EXT.set_supportedTransforms(this.segment(), index, value); return this; } + /// Sets `supportedTransforms` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT supportedTransforms(@CType("VkSurfaceTransformFlagsKHR") int value) { VkSurfaceCapabilities2EXT.set_supportedTransforms(this.segment(), value); return this; } + + /// {@return `currentTransform` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_currentTransform(MemorySegment segment, long index) { return (int) VH_currentTransform.get(segment, 0L, index); } + /// {@return `currentTransform`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_currentTransform(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_currentTransform(segment, 0L); } + /// {@return `currentTransform` at the given index} + /// @param index the index + public @CType("VkSurfaceTransformFlagBitsKHR") int currentTransformAt(long index) { return VkSurfaceCapabilities2EXT.get_currentTransform(this.segment(), index); } + /// {@return `currentTransform`} + public @CType("VkSurfaceTransformFlagBitsKHR") int currentTransform() { return VkSurfaceCapabilities2EXT.get_currentTransform(this.segment()); } + /// Sets `currentTransform` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_currentTransform(MemorySegment segment, long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VH_currentTransform.set(segment, 0L, index, value); } + /// Sets `currentTransform` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_currentTransform(MemorySegment segment, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkSurfaceCapabilities2EXT.set_currentTransform(segment, 0L, value); } + /// Sets `currentTransform` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT currentTransformAt(long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkSurfaceCapabilities2EXT.set_currentTransform(this.segment(), index, value); return this; } + /// Sets `currentTransform` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT currentTransform(@CType("VkSurfaceTransformFlagBitsKHR") int value) { VkSurfaceCapabilities2EXT.set_currentTransform(this.segment(), value); return this; } + + /// {@return `supportedCompositeAlpha` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCompositeAlphaFlagsKHR") int get_supportedCompositeAlpha(MemorySegment segment, long index) { return (int) VH_supportedCompositeAlpha.get(segment, 0L, index); } + /// {@return `supportedCompositeAlpha`} + /// @param segment the segment of the struct + public static @CType("VkCompositeAlphaFlagsKHR") int get_supportedCompositeAlpha(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_supportedCompositeAlpha(segment, 0L); } + /// {@return `supportedCompositeAlpha` at the given index} + /// @param index the index + public @CType("VkCompositeAlphaFlagsKHR") int supportedCompositeAlphaAt(long index) { return VkSurfaceCapabilities2EXT.get_supportedCompositeAlpha(this.segment(), index); } + /// {@return `supportedCompositeAlpha`} + public @CType("VkCompositeAlphaFlagsKHR") int supportedCompositeAlpha() { return VkSurfaceCapabilities2EXT.get_supportedCompositeAlpha(this.segment()); } + /// Sets `supportedCompositeAlpha` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedCompositeAlpha(MemorySegment segment, long index, @CType("VkCompositeAlphaFlagsKHR") int value) { VH_supportedCompositeAlpha.set(segment, 0L, index, value); } + /// Sets `supportedCompositeAlpha` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedCompositeAlpha(MemorySegment segment, @CType("VkCompositeAlphaFlagsKHR") int value) { VkSurfaceCapabilities2EXT.set_supportedCompositeAlpha(segment, 0L, value); } + /// Sets `supportedCompositeAlpha` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT supportedCompositeAlphaAt(long index, @CType("VkCompositeAlphaFlagsKHR") int value) { VkSurfaceCapabilities2EXT.set_supportedCompositeAlpha(this.segment(), index, value); return this; } + /// Sets `supportedCompositeAlpha` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT supportedCompositeAlpha(@CType("VkCompositeAlphaFlagsKHR") int value) { VkSurfaceCapabilities2EXT.set_supportedCompositeAlpha(this.segment(), value); return this; } + + /// {@return `supportedUsageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_supportedUsageFlags(MemorySegment segment, long index) { return (int) VH_supportedUsageFlags.get(segment, 0L, index); } + /// {@return `supportedUsageFlags`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_supportedUsageFlags(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_supportedUsageFlags(segment, 0L); } + /// {@return `supportedUsageFlags` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int supportedUsageFlagsAt(long index) { return VkSurfaceCapabilities2EXT.get_supportedUsageFlags(this.segment(), index); } + /// {@return `supportedUsageFlags`} + public @CType("VkImageUsageFlags") int supportedUsageFlags() { return VkSurfaceCapabilities2EXT.get_supportedUsageFlags(this.segment()); } + /// Sets `supportedUsageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedUsageFlags(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_supportedUsageFlags.set(segment, 0L, index, value); } + /// Sets `supportedUsageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedUsageFlags(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkSurfaceCapabilities2EXT.set_supportedUsageFlags(segment, 0L, value); } + /// Sets `supportedUsageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT supportedUsageFlagsAt(long index, @CType("VkImageUsageFlags") int value) { VkSurfaceCapabilities2EXT.set_supportedUsageFlags(this.segment(), index, value); return this; } + /// Sets `supportedUsageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT supportedUsageFlags(@CType("VkImageUsageFlags") int value) { VkSurfaceCapabilities2EXT.set_supportedUsageFlags(this.segment(), value); return this; } + + /// {@return `supportedSurfaceCounters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceCounterFlagsEXT") int get_supportedSurfaceCounters(MemorySegment segment, long index) { return (int) VH_supportedSurfaceCounters.get(segment, 0L, index); } + /// {@return `supportedSurfaceCounters`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceCounterFlagsEXT") int get_supportedSurfaceCounters(MemorySegment segment) { return VkSurfaceCapabilities2EXT.get_supportedSurfaceCounters(segment, 0L); } + /// {@return `supportedSurfaceCounters` at the given index} + /// @param index the index + public @CType("VkSurfaceCounterFlagsEXT") int supportedSurfaceCountersAt(long index) { return VkSurfaceCapabilities2EXT.get_supportedSurfaceCounters(this.segment(), index); } + /// {@return `supportedSurfaceCounters`} + public @CType("VkSurfaceCounterFlagsEXT") int supportedSurfaceCounters() { return VkSurfaceCapabilities2EXT.get_supportedSurfaceCounters(this.segment()); } + /// Sets `supportedSurfaceCounters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedSurfaceCounters(MemorySegment segment, long index, @CType("VkSurfaceCounterFlagsEXT") int value) { VH_supportedSurfaceCounters.set(segment, 0L, index, value); } + /// Sets `supportedSurfaceCounters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedSurfaceCounters(MemorySegment segment, @CType("VkSurfaceCounterFlagsEXT") int value) { VkSurfaceCapabilities2EXT.set_supportedSurfaceCounters(segment, 0L, value); } + /// Sets `supportedSurfaceCounters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT supportedSurfaceCountersAt(long index, @CType("VkSurfaceCounterFlagsEXT") int value) { VkSurfaceCapabilities2EXT.set_supportedSurfaceCounters(this.segment(), index, value); return this; } + /// Sets `supportedSurfaceCounters` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2EXT supportedSurfaceCounters(@CType("VkSurfaceCounterFlagsEXT") int value) { VkSurfaceCapabilities2EXT.set_supportedSurfaceCounters(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceCapabilitiesFullScreenExclusiveEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceCapabilitiesFullScreenExclusiveEXT.java new file mode 100644 index 00000000..f85ccfc3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceCapabilitiesFullScreenExclusiveEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fullScreenExclusiveSupported +/// [VarHandle][#VH_fullScreenExclusiveSupported] - [Getter][#fullScreenExclusiveSupported()] - [Setter][#fullScreenExclusiveSupported(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 fullScreenExclusiveSupported; +/// } VkSurfaceCapabilitiesFullScreenExclusiveEXT; +/// ``` +public final class VkSurfaceCapabilitiesFullScreenExclusiveEXT extends Struct { + /// The struct layout of `VkSurfaceCapabilitiesFullScreenExclusiveEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("fullScreenExclusiveSupported") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fullScreenExclusiveSupported` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fullScreenExclusiveSupported = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fullScreenExclusiveSupported")); + + /// Creates `VkSurfaceCapabilitiesFullScreenExclusiveEXT` with the given segment. + /// @param segment the memory segment + public VkSurfaceCapabilitiesFullScreenExclusiveEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfaceCapabilitiesFullScreenExclusiveEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilitiesFullScreenExclusiveEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilitiesFullScreenExclusiveEXT(segment); } + + /// Creates `VkSurfaceCapabilitiesFullScreenExclusiveEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilitiesFullScreenExclusiveEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilitiesFullScreenExclusiveEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfaceCapabilitiesFullScreenExclusiveEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilitiesFullScreenExclusiveEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilitiesFullScreenExclusiveEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfaceCapabilitiesFullScreenExclusiveEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfaceCapabilitiesFullScreenExclusiveEXT` + public static VkSurfaceCapabilitiesFullScreenExclusiveEXT alloc(SegmentAllocator allocator) { return new VkSurfaceCapabilitiesFullScreenExclusiveEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfaceCapabilitiesFullScreenExclusiveEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfaceCapabilitiesFullScreenExclusiveEXT` + public static VkSurfaceCapabilitiesFullScreenExclusiveEXT alloc(SegmentAllocator allocator, long count) { return new VkSurfaceCapabilitiesFullScreenExclusiveEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfaceCapabilitiesFullScreenExclusiveEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfaceCapabilitiesFullScreenExclusiveEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfaceCapabilitiesFullScreenExclusiveEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfaceCapabilitiesFullScreenExclusiveEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesFullScreenExclusiveEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfaceCapabilitiesFullScreenExclusiveEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesFullScreenExclusiveEXT sType(@CType("VkStructureType") int value) { VkSurfaceCapabilitiesFullScreenExclusiveEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfaceCapabilitiesFullScreenExclusiveEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfaceCapabilitiesFullScreenExclusiveEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSurfaceCapabilitiesFullScreenExclusiveEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesFullScreenExclusiveEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesFullScreenExclusiveEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesFullScreenExclusiveEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesFullScreenExclusiveEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesFullScreenExclusiveEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `fullScreenExclusiveSupported` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fullScreenExclusiveSupported(MemorySegment segment, long index) { return (int) VH_fullScreenExclusiveSupported.get(segment, 0L, index); } + /// {@return `fullScreenExclusiveSupported`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fullScreenExclusiveSupported(MemorySegment segment) { return VkSurfaceCapabilitiesFullScreenExclusiveEXT.get_fullScreenExclusiveSupported(segment, 0L); } + /// {@return `fullScreenExclusiveSupported` at the given index} + /// @param index the index + public @CType("VkBool32") int fullScreenExclusiveSupportedAt(long index) { return VkSurfaceCapabilitiesFullScreenExclusiveEXT.get_fullScreenExclusiveSupported(this.segment(), index); } + /// {@return `fullScreenExclusiveSupported`} + public @CType("VkBool32") int fullScreenExclusiveSupported() { return VkSurfaceCapabilitiesFullScreenExclusiveEXT.get_fullScreenExclusiveSupported(this.segment()); } + /// Sets `fullScreenExclusiveSupported` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fullScreenExclusiveSupported(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fullScreenExclusiveSupported.set(segment, 0L, index, value); } + /// Sets `fullScreenExclusiveSupported` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fullScreenExclusiveSupported(MemorySegment segment, @CType("VkBool32") int value) { VkSurfaceCapabilitiesFullScreenExclusiveEXT.set_fullScreenExclusiveSupported(segment, 0L, value); } + /// Sets `fullScreenExclusiveSupported` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesFullScreenExclusiveEXT fullScreenExclusiveSupportedAt(long index, @CType("VkBool32") int value) { VkSurfaceCapabilitiesFullScreenExclusiveEXT.set_fullScreenExclusiveSupported(this.segment(), index, value); return this; } + /// Sets `fullScreenExclusiveSupported` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesFullScreenExclusiveEXT fullScreenExclusiveSupported(@CType("VkBool32") int value) { VkSurfaceCapabilitiesFullScreenExclusiveEXT.set_fullScreenExclusiveSupported(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceFullScreenExclusiveInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceFullScreenExclusiveInfoEXT.java new file mode 100644 index 00000000..d8de8ca2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceFullScreenExclusiveInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fullScreenExclusive +/// [VarHandle][#VH_fullScreenExclusive] - [Getter][#fullScreenExclusive()] - [Setter][#fullScreenExclusive(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfaceFullScreenExclusiveInfoEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkFullScreenExclusiveEXT fullScreenExclusive; +/// } VkSurfaceFullScreenExclusiveInfoEXT; +/// ``` +public final class VkSurfaceFullScreenExclusiveInfoEXT extends Struct { + /// The struct layout of `VkSurfaceFullScreenExclusiveInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("fullScreenExclusive") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fullScreenExclusive` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fullScreenExclusive = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fullScreenExclusive")); + + /// Creates `VkSurfaceFullScreenExclusiveInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSurfaceFullScreenExclusiveInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfaceFullScreenExclusiveInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFullScreenExclusiveInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFullScreenExclusiveInfoEXT(segment); } + + /// Creates `VkSurfaceFullScreenExclusiveInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFullScreenExclusiveInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFullScreenExclusiveInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfaceFullScreenExclusiveInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFullScreenExclusiveInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFullScreenExclusiveInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfaceFullScreenExclusiveInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfaceFullScreenExclusiveInfoEXT` + public static VkSurfaceFullScreenExclusiveInfoEXT alloc(SegmentAllocator allocator) { return new VkSurfaceFullScreenExclusiveInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfaceFullScreenExclusiveInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfaceFullScreenExclusiveInfoEXT` + public static VkSurfaceFullScreenExclusiveInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSurfaceFullScreenExclusiveInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfaceFullScreenExclusiveInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfaceFullScreenExclusiveInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfaceFullScreenExclusiveInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfaceFullScreenExclusiveInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfaceFullScreenExclusiveInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveInfoEXT sType(@CType("VkStructureType") int value) { VkSurfaceFullScreenExclusiveInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfaceFullScreenExclusiveInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfaceFullScreenExclusiveInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSurfaceFullScreenExclusiveInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceFullScreenExclusiveInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveInfoEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceFullScreenExclusiveInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveInfoEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceFullScreenExclusiveInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `fullScreenExclusive` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFullScreenExclusiveEXT") int get_fullScreenExclusive(MemorySegment segment, long index) { return (int) VH_fullScreenExclusive.get(segment, 0L, index); } + /// {@return `fullScreenExclusive`} + /// @param segment the segment of the struct + public static @CType("VkFullScreenExclusiveEXT") int get_fullScreenExclusive(MemorySegment segment) { return VkSurfaceFullScreenExclusiveInfoEXT.get_fullScreenExclusive(segment, 0L); } + /// {@return `fullScreenExclusive` at the given index} + /// @param index the index + public @CType("VkFullScreenExclusiveEXT") int fullScreenExclusiveAt(long index) { return VkSurfaceFullScreenExclusiveInfoEXT.get_fullScreenExclusive(this.segment(), index); } + /// {@return `fullScreenExclusive`} + public @CType("VkFullScreenExclusiveEXT") int fullScreenExclusive() { return VkSurfaceFullScreenExclusiveInfoEXT.get_fullScreenExclusive(this.segment()); } + /// Sets `fullScreenExclusive` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fullScreenExclusive(MemorySegment segment, long index, @CType("VkFullScreenExclusiveEXT") int value) { VH_fullScreenExclusive.set(segment, 0L, index, value); } + /// Sets `fullScreenExclusive` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fullScreenExclusive(MemorySegment segment, @CType("VkFullScreenExclusiveEXT") int value) { VkSurfaceFullScreenExclusiveInfoEXT.set_fullScreenExclusive(segment, 0L, value); } + /// Sets `fullScreenExclusive` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveInfoEXT fullScreenExclusiveAt(long index, @CType("VkFullScreenExclusiveEXT") int value) { VkSurfaceFullScreenExclusiveInfoEXT.set_fullScreenExclusive(this.segment(), index, value); return this; } + /// Sets `fullScreenExclusive` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveInfoEXT fullScreenExclusive(@CType("VkFullScreenExclusiveEXT") int value) { VkSurfaceFullScreenExclusiveInfoEXT.set_fullScreenExclusive(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceFullScreenExclusiveWin32InfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceFullScreenExclusiveWin32InfoEXT.java new file mode 100644 index 00000000..7b711354 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfaceFullScreenExclusiveWin32InfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### hmonitor +/// [VarHandle][#VH_hmonitor] - [Getter][#hmonitor()] - [Setter][#hmonitor(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// HMONITOR hmonitor; +/// } VkSurfaceFullScreenExclusiveWin32InfoEXT; +/// ``` +public final class VkSurfaceFullScreenExclusiveWin32InfoEXT extends Struct { + /// The struct layout of `VkSurfaceFullScreenExclusiveWin32InfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("hmonitor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `hmonitor` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_hmonitor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hmonitor")); + + /// Creates `VkSurfaceFullScreenExclusiveWin32InfoEXT` with the given segment. + /// @param segment the memory segment + public VkSurfaceFullScreenExclusiveWin32InfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfaceFullScreenExclusiveWin32InfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFullScreenExclusiveWin32InfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFullScreenExclusiveWin32InfoEXT(segment); } + + /// Creates `VkSurfaceFullScreenExclusiveWin32InfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFullScreenExclusiveWin32InfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFullScreenExclusiveWin32InfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfaceFullScreenExclusiveWin32InfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFullScreenExclusiveWin32InfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFullScreenExclusiveWin32InfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfaceFullScreenExclusiveWin32InfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfaceFullScreenExclusiveWin32InfoEXT` + public static VkSurfaceFullScreenExclusiveWin32InfoEXT alloc(SegmentAllocator allocator) { return new VkSurfaceFullScreenExclusiveWin32InfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfaceFullScreenExclusiveWin32InfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfaceFullScreenExclusiveWin32InfoEXT` + public static VkSurfaceFullScreenExclusiveWin32InfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSurfaceFullScreenExclusiveWin32InfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfaceFullScreenExclusiveWin32InfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfaceFullScreenExclusiveWin32InfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfaceFullScreenExclusiveWin32InfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfaceFullScreenExclusiveWin32InfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveWin32InfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfaceFullScreenExclusiveWin32InfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveWin32InfoEXT sType(@CType("VkStructureType") int value) { VkSurfaceFullScreenExclusiveWin32InfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfaceFullScreenExclusiveWin32InfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfaceFullScreenExclusiveWin32InfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSurfaceFullScreenExclusiveWin32InfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSurfaceFullScreenExclusiveWin32InfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveWin32InfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSurfaceFullScreenExclusiveWin32InfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveWin32InfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSurfaceFullScreenExclusiveWin32InfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `hmonitor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("HMONITOR") java.lang.foreign.MemorySegment get_hmonitor(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_hmonitor.get(segment, 0L, index); } + /// {@return `hmonitor`} + /// @param segment the segment of the struct + public static @CType("HMONITOR") java.lang.foreign.MemorySegment get_hmonitor(MemorySegment segment) { return VkSurfaceFullScreenExclusiveWin32InfoEXT.get_hmonitor(segment, 0L); } + /// {@return `hmonitor` at the given index} + /// @param index the index + public @CType("HMONITOR") java.lang.foreign.MemorySegment hmonitorAt(long index) { return VkSurfaceFullScreenExclusiveWin32InfoEXT.get_hmonitor(this.segment(), index); } + /// {@return `hmonitor`} + public @CType("HMONITOR") java.lang.foreign.MemorySegment hmonitor() { return VkSurfaceFullScreenExclusiveWin32InfoEXT.get_hmonitor(this.segment()); } + /// Sets `hmonitor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hmonitor(MemorySegment segment, long index, @CType("HMONITOR") java.lang.foreign.MemorySegment value) { VH_hmonitor.set(segment, 0L, index, value); } + /// Sets `hmonitor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hmonitor(MemorySegment segment, @CType("HMONITOR") java.lang.foreign.MemorySegment value) { VkSurfaceFullScreenExclusiveWin32InfoEXT.set_hmonitor(segment, 0L, value); } + /// Sets `hmonitor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveWin32InfoEXT hmonitorAt(long index, @CType("HMONITOR") java.lang.foreign.MemorySegment value) { VkSurfaceFullScreenExclusiveWin32InfoEXT.set_hmonitor(this.segment(), index, value); return this; } + /// Sets `hmonitor` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFullScreenExclusiveWin32InfoEXT hmonitor(@CType("HMONITOR") java.lang.foreign.MemorySegment value) { VkSurfaceFullScreenExclusiveWin32InfoEXT.set_hmonitor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfacePresentModeCompatibilityEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfacePresentModeCompatibilityEXT.java new file mode 100644 index 00000000..f9fe73f1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfacePresentModeCompatibilityEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentModeCount +/// [VarHandle][#VH_presentModeCount] - [Getter][#presentModeCount()] - [Setter][#presentModeCount(int)] +/// ### pPresentModes +/// [VarHandle][#VH_pPresentModes] - [Getter][#pPresentModes()] - [Setter][#pPresentModes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfacePresentModeCompatibilityEXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t presentModeCount; +/// VkPresentModeKHR * pPresentModes; +/// } VkSurfacePresentModeCompatibilityEXT; +/// ``` +public final class VkSurfacePresentModeCompatibilityEXT extends Struct { + /// The struct layout of `VkSurfacePresentModeCompatibilityEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("presentModeCount"), + ValueLayout.ADDRESS.withName("pPresentModes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentModeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentModeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentModeCount")); + /// The [VarHandle] of `pPresentModes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPresentModes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPresentModes")); + + /// Creates `VkSurfacePresentModeCompatibilityEXT` with the given segment. + /// @param segment the memory segment + public VkSurfacePresentModeCompatibilityEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfacePresentModeCompatibilityEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfacePresentModeCompatibilityEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfacePresentModeCompatibilityEXT(segment); } + + /// Creates `VkSurfacePresentModeCompatibilityEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfacePresentModeCompatibilityEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfacePresentModeCompatibilityEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfacePresentModeCompatibilityEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfacePresentModeCompatibilityEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfacePresentModeCompatibilityEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfacePresentModeCompatibilityEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfacePresentModeCompatibilityEXT` + public static VkSurfacePresentModeCompatibilityEXT alloc(SegmentAllocator allocator) { return new VkSurfacePresentModeCompatibilityEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfacePresentModeCompatibilityEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfacePresentModeCompatibilityEXT` + public static VkSurfacePresentModeCompatibilityEXT alloc(SegmentAllocator allocator, long count) { return new VkSurfacePresentModeCompatibilityEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfacePresentModeCompatibilityEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfacePresentModeCompatibilityEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfacePresentModeCompatibilityEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfacePresentModeCompatibilityEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentModeCompatibilityEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfacePresentModeCompatibilityEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentModeCompatibilityEXT sType(@CType("VkStructureType") int value) { VkSurfacePresentModeCompatibilityEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfacePresentModeCompatibilityEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfacePresentModeCompatibilityEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSurfacePresentModeCompatibilityEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfacePresentModeCompatibilityEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentModeCompatibilityEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfacePresentModeCompatibilityEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentModeCompatibilityEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSurfacePresentModeCompatibilityEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `presentModeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_presentModeCount(MemorySegment segment, long index) { return (int) VH_presentModeCount.get(segment, 0L, index); } + /// {@return `presentModeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_presentModeCount(MemorySegment segment) { return VkSurfacePresentModeCompatibilityEXT.get_presentModeCount(segment, 0L); } + /// {@return `presentModeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int presentModeCountAt(long index) { return VkSurfacePresentModeCompatibilityEXT.get_presentModeCount(this.segment(), index); } + /// {@return `presentModeCount`} + public @CType("uint32_t") int presentModeCount() { return VkSurfacePresentModeCompatibilityEXT.get_presentModeCount(this.segment()); } + /// Sets `presentModeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentModeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_presentModeCount.set(segment, 0L, index, value); } + /// Sets `presentModeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentModeCount(MemorySegment segment, @CType("uint32_t") int value) { VkSurfacePresentModeCompatibilityEXT.set_presentModeCount(segment, 0L, value); } + /// Sets `presentModeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentModeCompatibilityEXT presentModeCountAt(long index, @CType("uint32_t") int value) { VkSurfacePresentModeCompatibilityEXT.set_presentModeCount(this.segment(), index, value); return this; } + /// Sets `presentModeCount` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentModeCompatibilityEXT presentModeCount(@CType("uint32_t") int value) { VkSurfacePresentModeCompatibilityEXT.set_presentModeCount(this.segment(), value); return this; } + + /// {@return `pPresentModes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment get_pPresentModes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPresentModes.get(segment, 0L, index); } + /// {@return `pPresentModes`} + /// @param segment the segment of the struct + public static @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment get_pPresentModes(MemorySegment segment) { return VkSurfacePresentModeCompatibilityEXT.get_pPresentModes(segment, 0L); } + /// {@return `pPresentModes` at the given index} + /// @param index the index + public @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment pPresentModesAt(long index) { return VkSurfacePresentModeCompatibilityEXT.get_pPresentModes(this.segment(), index); } + /// {@return `pPresentModes`} + public @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment pPresentModes() { return VkSurfacePresentModeCompatibilityEXT.get_pPresentModes(this.segment()); } + /// Sets `pPresentModes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPresentModes(MemorySegment segment, long index, @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VH_pPresentModes.set(segment, 0L, index, value); } + /// Sets `pPresentModes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPresentModes(MemorySegment segment, @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkSurfacePresentModeCompatibilityEXT.set_pPresentModes(segment, 0L, value); } + /// Sets `pPresentModes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentModeCompatibilityEXT pPresentModesAt(long index, @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkSurfacePresentModeCompatibilityEXT.set_pPresentModes(this.segment(), index, value); return this; } + /// Sets `pPresentModes` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentModeCompatibilityEXT pPresentModes(@CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkSurfacePresentModeCompatibilityEXT.set_pPresentModes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfacePresentModeEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfacePresentModeEXT.java new file mode 100644 index 00000000..3d7d376f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfacePresentModeEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentMode +/// [VarHandle][#VH_presentMode] - [Getter][#presentMode()] - [Setter][#presentMode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfacePresentModeEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkPresentModeKHR presentMode; +/// } VkSurfacePresentModeEXT; +/// ``` +public final class VkSurfacePresentModeEXT extends Struct { + /// The struct layout of `VkSurfacePresentModeEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("presentMode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentMode")); + + /// Creates `VkSurfacePresentModeEXT` with the given segment. + /// @param segment the memory segment + public VkSurfacePresentModeEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfacePresentModeEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfacePresentModeEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfacePresentModeEXT(segment); } + + /// Creates `VkSurfacePresentModeEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfacePresentModeEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfacePresentModeEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfacePresentModeEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfacePresentModeEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfacePresentModeEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfacePresentModeEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfacePresentModeEXT` + public static VkSurfacePresentModeEXT alloc(SegmentAllocator allocator) { return new VkSurfacePresentModeEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfacePresentModeEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfacePresentModeEXT` + public static VkSurfacePresentModeEXT alloc(SegmentAllocator allocator, long count) { return new VkSurfacePresentModeEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfacePresentModeEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfacePresentModeEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfacePresentModeEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfacePresentModeEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentModeEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfacePresentModeEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentModeEXT sType(@CType("VkStructureType") int value) { VkSurfacePresentModeEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfacePresentModeEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfacePresentModeEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSurfacePresentModeEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfacePresentModeEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentModeEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfacePresentModeEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentModeEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSurfacePresentModeEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `presentMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPresentModeKHR") int get_presentMode(MemorySegment segment, long index) { return (int) VH_presentMode.get(segment, 0L, index); } + /// {@return `presentMode`} + /// @param segment the segment of the struct + public static @CType("VkPresentModeKHR") int get_presentMode(MemorySegment segment) { return VkSurfacePresentModeEXT.get_presentMode(segment, 0L); } + /// {@return `presentMode` at the given index} + /// @param index the index + public @CType("VkPresentModeKHR") int presentModeAt(long index) { return VkSurfacePresentModeEXT.get_presentMode(this.segment(), index); } + /// {@return `presentMode`} + public @CType("VkPresentModeKHR") int presentMode() { return VkSurfacePresentModeEXT.get_presentMode(this.segment()); } + /// Sets `presentMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentMode(MemorySegment segment, long index, @CType("VkPresentModeKHR") int value) { VH_presentMode.set(segment, 0L, index, value); } + /// Sets `presentMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentMode(MemorySegment segment, @CType("VkPresentModeKHR") int value) { VkSurfacePresentModeEXT.set_presentMode(segment, 0L, value); } + /// Sets `presentMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentModeEXT presentModeAt(long index, @CType("VkPresentModeKHR") int value) { VkSurfacePresentModeEXT.set_presentMode(this.segment(), index, value); return this; } + /// Sets `presentMode` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentModeEXT presentMode(@CType("VkPresentModeKHR") int value) { VkSurfacePresentModeEXT.set_presentMode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfacePresentScalingCapabilitiesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfacePresentScalingCapabilitiesEXT.java new file mode 100644 index 00000000..26124f4c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSurfacePresentScalingCapabilitiesEXT.java @@ -0,0 +1,337 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### supportedPresentScaling +/// [VarHandle][#VH_supportedPresentScaling] - [Getter][#supportedPresentScaling()] - [Setter][#supportedPresentScaling(int)] +/// ### supportedPresentGravityX +/// [VarHandle][#VH_supportedPresentGravityX] - [Getter][#supportedPresentGravityX()] - [Setter][#supportedPresentGravityX(int)] +/// ### supportedPresentGravityY +/// [VarHandle][#VH_supportedPresentGravityY] - [Getter][#supportedPresentGravityY()] - [Setter][#supportedPresentGravityY(int)] +/// ### minScaledImageExtent +/// [Byte offset][#OFFSET_minScaledImageExtent] - [Memory layout][#ML_minScaledImageExtent] - [Getter][#minScaledImageExtent()] - [Setter][#minScaledImageExtent(java.lang.foreign.MemorySegment)] +/// ### maxScaledImageExtent +/// [Byte offset][#OFFSET_maxScaledImageExtent] - [Memory layout][#ML_maxScaledImageExtent] - [Getter][#maxScaledImageExtent()] - [Setter][#maxScaledImageExtent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfacePresentScalingCapabilitiesEXT { +/// VkStructureType sType; +/// void * pNext; +/// VkPresentScalingFlagsEXT supportedPresentScaling; +/// VkPresentGravityFlagsEXT supportedPresentGravityX; +/// VkPresentGravityFlagsEXT supportedPresentGravityY; +/// VkExtent2D minScaledImageExtent; +/// VkExtent2D maxScaledImageExtent; +/// } VkSurfacePresentScalingCapabilitiesEXT; +/// ``` +public final class VkSurfacePresentScalingCapabilitiesEXT extends Struct { + /// The struct layout of `VkSurfacePresentScalingCapabilitiesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("supportedPresentScaling"), + ValueLayout.JAVA_INT.withName("supportedPresentGravityX"), + ValueLayout.JAVA_INT.withName("supportedPresentGravityY"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("minScaledImageExtent"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxScaledImageExtent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `supportedPresentScaling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedPresentScaling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedPresentScaling")); + /// The [VarHandle] of `supportedPresentGravityX` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedPresentGravityX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedPresentGravityX")); + /// The [VarHandle] of `supportedPresentGravityY` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedPresentGravityY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedPresentGravityY")); + /// The byte offset of `minScaledImageExtent`. + public static final long OFFSET_minScaledImageExtent = LAYOUT.byteOffset(PathElement.groupElement("minScaledImageExtent")); + /// The memory layout of `minScaledImageExtent`. + public static final MemoryLayout ML_minScaledImageExtent = LAYOUT.select(PathElement.groupElement("minScaledImageExtent")); + /// The byte offset of `maxScaledImageExtent`. + public static final long OFFSET_maxScaledImageExtent = LAYOUT.byteOffset(PathElement.groupElement("maxScaledImageExtent")); + /// The memory layout of `maxScaledImageExtent`. + public static final MemoryLayout ML_maxScaledImageExtent = LAYOUT.select(PathElement.groupElement("maxScaledImageExtent")); + + /// Creates `VkSurfacePresentScalingCapabilitiesEXT` with the given segment. + /// @param segment the memory segment + public VkSurfacePresentScalingCapabilitiesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfacePresentScalingCapabilitiesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfacePresentScalingCapabilitiesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfacePresentScalingCapabilitiesEXT(segment); } + + /// Creates `VkSurfacePresentScalingCapabilitiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfacePresentScalingCapabilitiesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfacePresentScalingCapabilitiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfacePresentScalingCapabilitiesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfacePresentScalingCapabilitiesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfacePresentScalingCapabilitiesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfacePresentScalingCapabilitiesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfacePresentScalingCapabilitiesEXT` + public static VkSurfacePresentScalingCapabilitiesEXT alloc(SegmentAllocator allocator) { return new VkSurfacePresentScalingCapabilitiesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfacePresentScalingCapabilitiesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfacePresentScalingCapabilitiesEXT` + public static VkSurfacePresentScalingCapabilitiesEXT alloc(SegmentAllocator allocator, long count) { return new VkSurfacePresentScalingCapabilitiesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfacePresentScalingCapabilitiesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfacePresentScalingCapabilitiesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfacePresentScalingCapabilitiesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT sType(@CType("VkStructureType") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfacePresentScalingCapabilitiesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfacePresentScalingCapabilitiesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSurfacePresentScalingCapabilitiesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfacePresentScalingCapabilitiesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfacePresentScalingCapabilitiesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSurfacePresentScalingCapabilitiesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `supportedPresentScaling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPresentScalingFlagsEXT") int get_supportedPresentScaling(MemorySegment segment, long index) { return (int) VH_supportedPresentScaling.get(segment, 0L, index); } + /// {@return `supportedPresentScaling`} + /// @param segment the segment of the struct + public static @CType("VkPresentScalingFlagsEXT") int get_supportedPresentScaling(MemorySegment segment) { return VkSurfacePresentScalingCapabilitiesEXT.get_supportedPresentScaling(segment, 0L); } + /// {@return `supportedPresentScaling` at the given index} + /// @param index the index + public @CType("VkPresentScalingFlagsEXT") int supportedPresentScalingAt(long index) { return VkSurfacePresentScalingCapabilitiesEXT.get_supportedPresentScaling(this.segment(), index); } + /// {@return `supportedPresentScaling`} + public @CType("VkPresentScalingFlagsEXT") int supportedPresentScaling() { return VkSurfacePresentScalingCapabilitiesEXT.get_supportedPresentScaling(this.segment()); } + /// Sets `supportedPresentScaling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedPresentScaling(MemorySegment segment, long index, @CType("VkPresentScalingFlagsEXT") int value) { VH_supportedPresentScaling.set(segment, 0L, index, value); } + /// Sets `supportedPresentScaling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedPresentScaling(MemorySegment segment, @CType("VkPresentScalingFlagsEXT") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_supportedPresentScaling(segment, 0L, value); } + /// Sets `supportedPresentScaling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT supportedPresentScalingAt(long index, @CType("VkPresentScalingFlagsEXT") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_supportedPresentScaling(this.segment(), index, value); return this; } + /// Sets `supportedPresentScaling` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT supportedPresentScaling(@CType("VkPresentScalingFlagsEXT") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_supportedPresentScaling(this.segment(), value); return this; } + + /// {@return `supportedPresentGravityX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPresentGravityFlagsEXT") int get_supportedPresentGravityX(MemorySegment segment, long index) { return (int) VH_supportedPresentGravityX.get(segment, 0L, index); } + /// {@return `supportedPresentGravityX`} + /// @param segment the segment of the struct + public static @CType("VkPresentGravityFlagsEXT") int get_supportedPresentGravityX(MemorySegment segment) { return VkSurfacePresentScalingCapabilitiesEXT.get_supportedPresentGravityX(segment, 0L); } + /// {@return `supportedPresentGravityX` at the given index} + /// @param index the index + public @CType("VkPresentGravityFlagsEXT") int supportedPresentGravityXAt(long index) { return VkSurfacePresentScalingCapabilitiesEXT.get_supportedPresentGravityX(this.segment(), index); } + /// {@return `supportedPresentGravityX`} + public @CType("VkPresentGravityFlagsEXT") int supportedPresentGravityX() { return VkSurfacePresentScalingCapabilitiesEXT.get_supportedPresentGravityX(this.segment()); } + /// Sets `supportedPresentGravityX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedPresentGravityX(MemorySegment segment, long index, @CType("VkPresentGravityFlagsEXT") int value) { VH_supportedPresentGravityX.set(segment, 0L, index, value); } + /// Sets `supportedPresentGravityX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedPresentGravityX(MemorySegment segment, @CType("VkPresentGravityFlagsEXT") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_supportedPresentGravityX(segment, 0L, value); } + /// Sets `supportedPresentGravityX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT supportedPresentGravityXAt(long index, @CType("VkPresentGravityFlagsEXT") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_supportedPresentGravityX(this.segment(), index, value); return this; } + /// Sets `supportedPresentGravityX` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT supportedPresentGravityX(@CType("VkPresentGravityFlagsEXT") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_supportedPresentGravityX(this.segment(), value); return this; } + + /// {@return `supportedPresentGravityY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPresentGravityFlagsEXT") int get_supportedPresentGravityY(MemorySegment segment, long index) { return (int) VH_supportedPresentGravityY.get(segment, 0L, index); } + /// {@return `supportedPresentGravityY`} + /// @param segment the segment of the struct + public static @CType("VkPresentGravityFlagsEXT") int get_supportedPresentGravityY(MemorySegment segment) { return VkSurfacePresentScalingCapabilitiesEXT.get_supportedPresentGravityY(segment, 0L); } + /// {@return `supportedPresentGravityY` at the given index} + /// @param index the index + public @CType("VkPresentGravityFlagsEXT") int supportedPresentGravityYAt(long index) { return VkSurfacePresentScalingCapabilitiesEXT.get_supportedPresentGravityY(this.segment(), index); } + /// {@return `supportedPresentGravityY`} + public @CType("VkPresentGravityFlagsEXT") int supportedPresentGravityY() { return VkSurfacePresentScalingCapabilitiesEXT.get_supportedPresentGravityY(this.segment()); } + /// Sets `supportedPresentGravityY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedPresentGravityY(MemorySegment segment, long index, @CType("VkPresentGravityFlagsEXT") int value) { VH_supportedPresentGravityY.set(segment, 0L, index, value); } + /// Sets `supportedPresentGravityY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedPresentGravityY(MemorySegment segment, @CType("VkPresentGravityFlagsEXT") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_supportedPresentGravityY(segment, 0L, value); } + /// Sets `supportedPresentGravityY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT supportedPresentGravityYAt(long index, @CType("VkPresentGravityFlagsEXT") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_supportedPresentGravityY(this.segment(), index, value); return this; } + /// Sets `supportedPresentGravityY` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT supportedPresentGravityY(@CType("VkPresentGravityFlagsEXT") int value) { VkSurfacePresentScalingCapabilitiesEXT.set_supportedPresentGravityY(this.segment(), value); return this; } + + /// {@return `minScaledImageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minScaledImageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minScaledImageExtent, index), ML_minScaledImageExtent); } + /// {@return `minScaledImageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minScaledImageExtent(MemorySegment segment) { return VkSurfacePresentScalingCapabilitiesEXT.get_minScaledImageExtent(segment, 0L); } + /// {@return `minScaledImageExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minScaledImageExtentAt(long index) { return VkSurfacePresentScalingCapabilitiesEXT.get_minScaledImageExtent(this.segment(), index); } + /// {@return `minScaledImageExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minScaledImageExtent() { return VkSurfacePresentScalingCapabilitiesEXT.get_minScaledImageExtent(this.segment()); } + /// Sets `minScaledImageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minScaledImageExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minScaledImageExtent, index), ML_minScaledImageExtent.byteSize()); } + /// Sets `minScaledImageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minScaledImageExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfacePresentScalingCapabilitiesEXT.set_minScaledImageExtent(segment, 0L, value); } + /// Sets `minScaledImageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT minScaledImageExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfacePresentScalingCapabilitiesEXT.set_minScaledImageExtent(this.segment(), index, value); return this; } + /// Sets `minScaledImageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT minScaledImageExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfacePresentScalingCapabilitiesEXT.set_minScaledImageExtent(this.segment(), value); return this; } + + /// {@return `maxScaledImageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxScaledImageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxScaledImageExtent, index), ML_maxScaledImageExtent); } + /// {@return `maxScaledImageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxScaledImageExtent(MemorySegment segment) { return VkSurfacePresentScalingCapabilitiesEXT.get_maxScaledImageExtent(segment, 0L); } + /// {@return `maxScaledImageExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxScaledImageExtentAt(long index) { return VkSurfacePresentScalingCapabilitiesEXT.get_maxScaledImageExtent(this.segment(), index); } + /// {@return `maxScaledImageExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxScaledImageExtent() { return VkSurfacePresentScalingCapabilitiesEXT.get_maxScaledImageExtent(this.segment()); } + /// Sets `maxScaledImageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxScaledImageExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxScaledImageExtent, index), ML_maxScaledImageExtent.byteSize()); } + /// Sets `maxScaledImageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxScaledImageExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfacePresentScalingCapabilitiesEXT.set_maxScaledImageExtent(segment, 0L, value); } + /// Sets `maxScaledImageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT maxScaledImageExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfacePresentScalingCapabilitiesEXT.set_maxScaledImageExtent(this.segment(), index, value); return this; } + /// Sets `maxScaledImageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkSurfacePresentScalingCapabilitiesEXT maxScaledImageExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfacePresentScalingCapabilitiesEXT.set_maxScaledImageExtent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainCounterCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainCounterCreateInfoEXT.java new file mode 100644 index 00000000..9d008b58 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainCounterCreateInfoEXT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### surfaceCounters +/// [VarHandle][#VH_surfaceCounters] - [Getter][#surfaceCounters()] - [Setter][#surfaceCounters(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSwapchainCounterCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkSurfaceCounterFlagsEXT surfaceCounters; +/// } VkSwapchainCounterCreateInfoEXT; +/// ``` +public final class VkSwapchainCounterCreateInfoEXT extends Struct { + /// The struct layout of `VkSwapchainCounterCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("surfaceCounters") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `surfaceCounters` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_surfaceCounters = LAYOUT.arrayElementVarHandle(PathElement.groupElement("surfaceCounters")); + + /// Creates `VkSwapchainCounterCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSwapchainCounterCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSwapchainCounterCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainCounterCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainCounterCreateInfoEXT(segment); } + + /// Creates `VkSwapchainCounterCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainCounterCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainCounterCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSwapchainCounterCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainCounterCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainCounterCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSwapchainCounterCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSwapchainCounterCreateInfoEXT` + public static VkSwapchainCounterCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkSwapchainCounterCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSwapchainCounterCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSwapchainCounterCreateInfoEXT` + public static VkSwapchainCounterCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSwapchainCounterCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSwapchainCounterCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSwapchainCounterCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSwapchainCounterCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSwapchainCounterCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCounterCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSwapchainCounterCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCounterCreateInfoEXT sType(@CType("VkStructureType") int value) { VkSwapchainCounterCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSwapchainCounterCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSwapchainCounterCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSwapchainCounterCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainCounterCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCounterCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainCounterCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCounterCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainCounterCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `surfaceCounters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceCounterFlagsEXT") int get_surfaceCounters(MemorySegment segment, long index) { return (int) VH_surfaceCounters.get(segment, 0L, index); } + /// {@return `surfaceCounters`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceCounterFlagsEXT") int get_surfaceCounters(MemorySegment segment) { return VkSwapchainCounterCreateInfoEXT.get_surfaceCounters(segment, 0L); } + /// {@return `surfaceCounters` at the given index} + /// @param index the index + public @CType("VkSurfaceCounterFlagsEXT") int surfaceCountersAt(long index) { return VkSwapchainCounterCreateInfoEXT.get_surfaceCounters(this.segment(), index); } + /// {@return `surfaceCounters`} + public @CType("VkSurfaceCounterFlagsEXT") int surfaceCounters() { return VkSwapchainCounterCreateInfoEXT.get_surfaceCounters(this.segment()); } + /// Sets `surfaceCounters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_surfaceCounters(MemorySegment segment, long index, @CType("VkSurfaceCounterFlagsEXT") int value) { VH_surfaceCounters.set(segment, 0L, index, value); } + /// Sets `surfaceCounters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_surfaceCounters(MemorySegment segment, @CType("VkSurfaceCounterFlagsEXT") int value) { VkSwapchainCounterCreateInfoEXT.set_surfaceCounters(segment, 0L, value); } + /// Sets `surfaceCounters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCounterCreateInfoEXT surfaceCountersAt(long index, @CType("VkSurfaceCounterFlagsEXT") int value) { VkSwapchainCounterCreateInfoEXT.set_surfaceCounters(this.segment(), index, value); return this; } + /// Sets `surfaceCounters` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCounterCreateInfoEXT surfaceCounters(@CType("VkSurfaceCounterFlagsEXT") int value) { VkSwapchainCounterCreateInfoEXT.set_surfaceCounters(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentFenceInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentFenceInfoEXT.java new file mode 100644 index 00000000..3e8d3e4b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentFenceInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchainCount +/// [VarHandle][#VH_swapchainCount] - [Getter][#swapchainCount()] - [Setter][#swapchainCount(int)] +/// ### pFences +/// [VarHandle][#VH_pFences] - [Getter][#pFences()] - [Setter][#pFences(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSwapchainPresentFenceInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t swapchainCount; +/// const VkFence * pFences; +/// } VkSwapchainPresentFenceInfoEXT; +/// ``` +public final class VkSwapchainPresentFenceInfoEXT extends Struct { + /// The struct layout of `VkSwapchainPresentFenceInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("swapchainCount"), + ValueLayout.ADDRESS.withName("pFences") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchainCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_swapchainCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchainCount")); + /// The [VarHandle] of `pFences` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pFences = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pFences")); + + /// Creates `VkSwapchainPresentFenceInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSwapchainPresentFenceInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSwapchainPresentFenceInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentFenceInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentFenceInfoEXT(segment); } + + /// Creates `VkSwapchainPresentFenceInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentFenceInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentFenceInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSwapchainPresentFenceInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentFenceInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentFenceInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSwapchainPresentFenceInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSwapchainPresentFenceInfoEXT` + public static VkSwapchainPresentFenceInfoEXT alloc(SegmentAllocator allocator) { return new VkSwapchainPresentFenceInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSwapchainPresentFenceInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSwapchainPresentFenceInfoEXT` + public static VkSwapchainPresentFenceInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSwapchainPresentFenceInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSwapchainPresentFenceInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSwapchainPresentFenceInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSwapchainPresentFenceInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSwapchainPresentFenceInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentFenceInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSwapchainPresentFenceInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentFenceInfoEXT sType(@CType("VkStructureType") int value) { VkSwapchainPresentFenceInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSwapchainPresentFenceInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSwapchainPresentFenceInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSwapchainPresentFenceInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentFenceInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentFenceInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentFenceInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentFenceInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentFenceInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchainCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment, long index) { return (int) VH_swapchainCount.get(segment, 0L, index); } + /// {@return `swapchainCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment) { return VkSwapchainPresentFenceInfoEXT.get_swapchainCount(segment, 0L); } + /// {@return `swapchainCount` at the given index} + /// @param index the index + public @CType("uint32_t") int swapchainCountAt(long index) { return VkSwapchainPresentFenceInfoEXT.get_swapchainCount(this.segment(), index); } + /// {@return `swapchainCount`} + public @CType("uint32_t") int swapchainCount() { return VkSwapchainPresentFenceInfoEXT.get_swapchainCount(this.segment()); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_swapchainCount.set(segment, 0L, index, value); } + /// Sets `swapchainCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, @CType("uint32_t") int value) { VkSwapchainPresentFenceInfoEXT.set_swapchainCount(segment, 0L, value); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentFenceInfoEXT swapchainCountAt(long index, @CType("uint32_t") int value) { VkSwapchainPresentFenceInfoEXT.set_swapchainCount(this.segment(), index, value); return this; } + /// Sets `swapchainCount` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentFenceInfoEXT swapchainCount(@CType("uint32_t") int value) { VkSwapchainPresentFenceInfoEXT.set_swapchainCount(this.segment(), value); return this; } + + /// {@return `pFences` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkFence *") java.lang.foreign.MemorySegment get_pFences(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pFences.get(segment, 0L, index); } + /// {@return `pFences`} + /// @param segment the segment of the struct + public static @CType("const VkFence *") java.lang.foreign.MemorySegment get_pFences(MemorySegment segment) { return VkSwapchainPresentFenceInfoEXT.get_pFences(segment, 0L); } + /// {@return `pFences` at the given index} + /// @param index the index + public @CType("const VkFence *") java.lang.foreign.MemorySegment pFencesAt(long index) { return VkSwapchainPresentFenceInfoEXT.get_pFences(this.segment(), index); } + /// {@return `pFences`} + public @CType("const VkFence *") java.lang.foreign.MemorySegment pFences() { return VkSwapchainPresentFenceInfoEXT.get_pFences(this.segment()); } + /// Sets `pFences` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pFences(MemorySegment segment, long index, @CType("const VkFence *") java.lang.foreign.MemorySegment value) { VH_pFences.set(segment, 0L, index, value); } + /// Sets `pFences` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pFences(MemorySegment segment, @CType("const VkFence *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentFenceInfoEXT.set_pFences(segment, 0L, value); } + /// Sets `pFences` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentFenceInfoEXT pFencesAt(long index, @CType("const VkFence *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentFenceInfoEXT.set_pFences(this.segment(), index, value); return this; } + /// Sets `pFences` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentFenceInfoEXT pFences(@CType("const VkFence *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentFenceInfoEXT.set_pFences(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentModeInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentModeInfoEXT.java new file mode 100644 index 00000000..e9f78604 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentModeInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchainCount +/// [VarHandle][#VH_swapchainCount] - [Getter][#swapchainCount()] - [Setter][#swapchainCount(int)] +/// ### pPresentModes +/// [VarHandle][#VH_pPresentModes] - [Getter][#pPresentModes()] - [Setter][#pPresentModes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSwapchainPresentModeInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t swapchainCount; +/// const VkPresentModeKHR * pPresentModes; +/// } VkSwapchainPresentModeInfoEXT; +/// ``` +public final class VkSwapchainPresentModeInfoEXT extends Struct { + /// The struct layout of `VkSwapchainPresentModeInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("swapchainCount"), + ValueLayout.ADDRESS.withName("pPresentModes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchainCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_swapchainCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchainCount")); + /// The [VarHandle] of `pPresentModes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPresentModes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPresentModes")); + + /// Creates `VkSwapchainPresentModeInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSwapchainPresentModeInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSwapchainPresentModeInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentModeInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentModeInfoEXT(segment); } + + /// Creates `VkSwapchainPresentModeInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentModeInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentModeInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSwapchainPresentModeInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentModeInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentModeInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSwapchainPresentModeInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSwapchainPresentModeInfoEXT` + public static VkSwapchainPresentModeInfoEXT alloc(SegmentAllocator allocator) { return new VkSwapchainPresentModeInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSwapchainPresentModeInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSwapchainPresentModeInfoEXT` + public static VkSwapchainPresentModeInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSwapchainPresentModeInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSwapchainPresentModeInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSwapchainPresentModeInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSwapchainPresentModeInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSwapchainPresentModeInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentModeInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSwapchainPresentModeInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentModeInfoEXT sType(@CType("VkStructureType") int value) { VkSwapchainPresentModeInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSwapchainPresentModeInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSwapchainPresentModeInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSwapchainPresentModeInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModeInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentModeInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModeInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentModeInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModeInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchainCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment, long index) { return (int) VH_swapchainCount.get(segment, 0L, index); } + /// {@return `swapchainCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment) { return VkSwapchainPresentModeInfoEXT.get_swapchainCount(segment, 0L); } + /// {@return `swapchainCount` at the given index} + /// @param index the index + public @CType("uint32_t") int swapchainCountAt(long index) { return VkSwapchainPresentModeInfoEXT.get_swapchainCount(this.segment(), index); } + /// {@return `swapchainCount`} + public @CType("uint32_t") int swapchainCount() { return VkSwapchainPresentModeInfoEXT.get_swapchainCount(this.segment()); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_swapchainCount.set(segment, 0L, index, value); } + /// Sets `swapchainCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, @CType("uint32_t") int value) { VkSwapchainPresentModeInfoEXT.set_swapchainCount(segment, 0L, value); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentModeInfoEXT swapchainCountAt(long index, @CType("uint32_t") int value) { VkSwapchainPresentModeInfoEXT.set_swapchainCount(this.segment(), index, value); return this; } + /// Sets `swapchainCount` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentModeInfoEXT swapchainCount(@CType("uint32_t") int value) { VkSwapchainPresentModeInfoEXT.set_swapchainCount(this.segment(), value); return this; } + + /// {@return `pPresentModes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment get_pPresentModes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPresentModes.get(segment, 0L, index); } + /// {@return `pPresentModes`} + /// @param segment the segment of the struct + public static @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment get_pPresentModes(MemorySegment segment) { return VkSwapchainPresentModeInfoEXT.get_pPresentModes(segment, 0L); } + /// {@return `pPresentModes` at the given index} + /// @param index the index + public @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment pPresentModesAt(long index) { return VkSwapchainPresentModeInfoEXT.get_pPresentModes(this.segment(), index); } + /// {@return `pPresentModes`} + public @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment pPresentModes() { return VkSwapchainPresentModeInfoEXT.get_pPresentModes(this.segment()); } + /// Sets `pPresentModes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPresentModes(MemorySegment segment, long index, @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VH_pPresentModes.set(segment, 0L, index, value); } + /// Sets `pPresentModes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPresentModes(MemorySegment segment, @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModeInfoEXT.set_pPresentModes(segment, 0L, value); } + /// Sets `pPresentModes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentModeInfoEXT pPresentModesAt(long index, @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModeInfoEXT.set_pPresentModes(this.segment(), index, value); return this; } + /// Sets `pPresentModes` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentModeInfoEXT pPresentModes(@CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModeInfoEXT.set_pPresentModes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentModesCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentModesCreateInfoEXT.java new file mode 100644 index 00000000..9319ebc8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentModesCreateInfoEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentModeCount +/// [VarHandle][#VH_presentModeCount] - [Getter][#presentModeCount()] - [Setter][#presentModeCount(int)] +/// ### pPresentModes +/// [VarHandle][#VH_pPresentModes] - [Getter][#pPresentModes()] - [Setter][#pPresentModes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSwapchainPresentModesCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t presentModeCount; +/// const VkPresentModeKHR * pPresentModes; +/// } VkSwapchainPresentModesCreateInfoEXT; +/// ``` +public final class VkSwapchainPresentModesCreateInfoEXT extends Struct { + /// The struct layout of `VkSwapchainPresentModesCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("presentModeCount"), + ValueLayout.ADDRESS.withName("pPresentModes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentModeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentModeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentModeCount")); + /// The [VarHandle] of `pPresentModes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPresentModes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPresentModes")); + + /// Creates `VkSwapchainPresentModesCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSwapchainPresentModesCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSwapchainPresentModesCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentModesCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentModesCreateInfoEXT(segment); } + + /// Creates `VkSwapchainPresentModesCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentModesCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentModesCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSwapchainPresentModesCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentModesCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentModesCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSwapchainPresentModesCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSwapchainPresentModesCreateInfoEXT` + public static VkSwapchainPresentModesCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkSwapchainPresentModesCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSwapchainPresentModesCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSwapchainPresentModesCreateInfoEXT` + public static VkSwapchainPresentModesCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSwapchainPresentModesCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSwapchainPresentModesCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSwapchainPresentModesCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSwapchainPresentModesCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSwapchainPresentModesCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentModesCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSwapchainPresentModesCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentModesCreateInfoEXT sType(@CType("VkStructureType") int value) { VkSwapchainPresentModesCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSwapchainPresentModesCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSwapchainPresentModesCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSwapchainPresentModesCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModesCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentModesCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModesCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentModesCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModesCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `presentModeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_presentModeCount(MemorySegment segment, long index) { return (int) VH_presentModeCount.get(segment, 0L, index); } + /// {@return `presentModeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_presentModeCount(MemorySegment segment) { return VkSwapchainPresentModesCreateInfoEXT.get_presentModeCount(segment, 0L); } + /// {@return `presentModeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int presentModeCountAt(long index) { return VkSwapchainPresentModesCreateInfoEXT.get_presentModeCount(this.segment(), index); } + /// {@return `presentModeCount`} + public @CType("uint32_t") int presentModeCount() { return VkSwapchainPresentModesCreateInfoEXT.get_presentModeCount(this.segment()); } + /// Sets `presentModeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentModeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_presentModeCount.set(segment, 0L, index, value); } + /// Sets `presentModeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentModeCount(MemorySegment segment, @CType("uint32_t") int value) { VkSwapchainPresentModesCreateInfoEXT.set_presentModeCount(segment, 0L, value); } + /// Sets `presentModeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentModesCreateInfoEXT presentModeCountAt(long index, @CType("uint32_t") int value) { VkSwapchainPresentModesCreateInfoEXT.set_presentModeCount(this.segment(), index, value); return this; } + /// Sets `presentModeCount` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentModesCreateInfoEXT presentModeCount(@CType("uint32_t") int value) { VkSwapchainPresentModesCreateInfoEXT.set_presentModeCount(this.segment(), value); return this; } + + /// {@return `pPresentModes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment get_pPresentModes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPresentModes.get(segment, 0L, index); } + /// {@return `pPresentModes`} + /// @param segment the segment of the struct + public static @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment get_pPresentModes(MemorySegment segment) { return VkSwapchainPresentModesCreateInfoEXT.get_pPresentModes(segment, 0L); } + /// {@return `pPresentModes` at the given index} + /// @param index the index + public @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment pPresentModesAt(long index) { return VkSwapchainPresentModesCreateInfoEXT.get_pPresentModes(this.segment(), index); } + /// {@return `pPresentModes`} + public @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment pPresentModes() { return VkSwapchainPresentModesCreateInfoEXT.get_pPresentModes(this.segment()); } + /// Sets `pPresentModes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPresentModes(MemorySegment segment, long index, @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VH_pPresentModes.set(segment, 0L, index, value); } + /// Sets `pPresentModes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPresentModes(MemorySegment segment, @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModesCreateInfoEXT.set_pPresentModes(segment, 0L, value); } + /// Sets `pPresentModes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentModesCreateInfoEXT pPresentModesAt(long index, @CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModesCreateInfoEXT.set_pPresentModes(this.segment(), index, value); return this; } + /// Sets `pPresentModes` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentModesCreateInfoEXT pPresentModes(@CType("const VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentModesCreateInfoEXT.set_pPresentModes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentScalingCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentScalingCreateInfoEXT.java new file mode 100644 index 00000000..83125650 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkSwapchainPresentScalingCreateInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### scalingBehavior +/// [VarHandle][#VH_scalingBehavior] - [Getter][#scalingBehavior()] - [Setter][#scalingBehavior(int)] +/// ### presentGravityX +/// [VarHandle][#VH_presentGravityX] - [Getter][#presentGravityX()] - [Setter][#presentGravityX(int)] +/// ### presentGravityY +/// [VarHandle][#VH_presentGravityY] - [Getter][#presentGravityY()] - [Setter][#presentGravityY(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSwapchainPresentScalingCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkPresentScalingFlagsEXT scalingBehavior; +/// VkPresentGravityFlagsEXT presentGravityX; +/// VkPresentGravityFlagsEXT presentGravityY; +/// } VkSwapchainPresentScalingCreateInfoEXT; +/// ``` +public final class VkSwapchainPresentScalingCreateInfoEXT extends Struct { + /// The struct layout of `VkSwapchainPresentScalingCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("scalingBehavior"), + ValueLayout.JAVA_INT.withName("presentGravityX"), + ValueLayout.JAVA_INT.withName("presentGravityY") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `scalingBehavior` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_scalingBehavior = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scalingBehavior")); + /// The [VarHandle] of `presentGravityX` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentGravityX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentGravityX")); + /// The [VarHandle] of `presentGravityY` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentGravityY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentGravityY")); + + /// Creates `VkSwapchainPresentScalingCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkSwapchainPresentScalingCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSwapchainPresentScalingCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentScalingCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentScalingCreateInfoEXT(segment); } + + /// Creates `VkSwapchainPresentScalingCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentScalingCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentScalingCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSwapchainPresentScalingCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentScalingCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentScalingCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSwapchainPresentScalingCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSwapchainPresentScalingCreateInfoEXT` + public static VkSwapchainPresentScalingCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkSwapchainPresentScalingCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSwapchainPresentScalingCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSwapchainPresentScalingCreateInfoEXT` + public static VkSwapchainPresentScalingCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkSwapchainPresentScalingCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSwapchainPresentScalingCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSwapchainPresentScalingCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSwapchainPresentScalingCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentScalingCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentScalingCreateInfoEXT sType(@CType("VkStructureType") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSwapchainPresentScalingCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSwapchainPresentScalingCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSwapchainPresentScalingCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentScalingCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentScalingCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentScalingCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentScalingCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentScalingCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `scalingBehavior` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPresentScalingFlagsEXT") int get_scalingBehavior(MemorySegment segment, long index) { return (int) VH_scalingBehavior.get(segment, 0L, index); } + /// {@return `scalingBehavior`} + /// @param segment the segment of the struct + public static @CType("VkPresentScalingFlagsEXT") int get_scalingBehavior(MemorySegment segment) { return VkSwapchainPresentScalingCreateInfoEXT.get_scalingBehavior(segment, 0L); } + /// {@return `scalingBehavior` at the given index} + /// @param index the index + public @CType("VkPresentScalingFlagsEXT") int scalingBehaviorAt(long index) { return VkSwapchainPresentScalingCreateInfoEXT.get_scalingBehavior(this.segment(), index); } + /// {@return `scalingBehavior`} + public @CType("VkPresentScalingFlagsEXT") int scalingBehavior() { return VkSwapchainPresentScalingCreateInfoEXT.get_scalingBehavior(this.segment()); } + /// Sets `scalingBehavior` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scalingBehavior(MemorySegment segment, long index, @CType("VkPresentScalingFlagsEXT") int value) { VH_scalingBehavior.set(segment, 0L, index, value); } + /// Sets `scalingBehavior` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scalingBehavior(MemorySegment segment, @CType("VkPresentScalingFlagsEXT") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_scalingBehavior(segment, 0L, value); } + /// Sets `scalingBehavior` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentScalingCreateInfoEXT scalingBehaviorAt(long index, @CType("VkPresentScalingFlagsEXT") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_scalingBehavior(this.segment(), index, value); return this; } + /// Sets `scalingBehavior` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentScalingCreateInfoEXT scalingBehavior(@CType("VkPresentScalingFlagsEXT") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_scalingBehavior(this.segment(), value); return this; } + + /// {@return `presentGravityX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPresentGravityFlagsEXT") int get_presentGravityX(MemorySegment segment, long index) { return (int) VH_presentGravityX.get(segment, 0L, index); } + /// {@return `presentGravityX`} + /// @param segment the segment of the struct + public static @CType("VkPresentGravityFlagsEXT") int get_presentGravityX(MemorySegment segment) { return VkSwapchainPresentScalingCreateInfoEXT.get_presentGravityX(segment, 0L); } + /// {@return `presentGravityX` at the given index} + /// @param index the index + public @CType("VkPresentGravityFlagsEXT") int presentGravityXAt(long index) { return VkSwapchainPresentScalingCreateInfoEXT.get_presentGravityX(this.segment(), index); } + /// {@return `presentGravityX`} + public @CType("VkPresentGravityFlagsEXT") int presentGravityX() { return VkSwapchainPresentScalingCreateInfoEXT.get_presentGravityX(this.segment()); } + /// Sets `presentGravityX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentGravityX(MemorySegment segment, long index, @CType("VkPresentGravityFlagsEXT") int value) { VH_presentGravityX.set(segment, 0L, index, value); } + /// Sets `presentGravityX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentGravityX(MemorySegment segment, @CType("VkPresentGravityFlagsEXT") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_presentGravityX(segment, 0L, value); } + /// Sets `presentGravityX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentScalingCreateInfoEXT presentGravityXAt(long index, @CType("VkPresentGravityFlagsEXT") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_presentGravityX(this.segment(), index, value); return this; } + /// Sets `presentGravityX` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentScalingCreateInfoEXT presentGravityX(@CType("VkPresentGravityFlagsEXT") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_presentGravityX(this.segment(), value); return this; } + + /// {@return `presentGravityY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPresentGravityFlagsEXT") int get_presentGravityY(MemorySegment segment, long index) { return (int) VH_presentGravityY.get(segment, 0L, index); } + /// {@return `presentGravityY`} + /// @param segment the segment of the struct + public static @CType("VkPresentGravityFlagsEXT") int get_presentGravityY(MemorySegment segment) { return VkSwapchainPresentScalingCreateInfoEXT.get_presentGravityY(segment, 0L); } + /// {@return `presentGravityY` at the given index} + /// @param index the index + public @CType("VkPresentGravityFlagsEXT") int presentGravityYAt(long index) { return VkSwapchainPresentScalingCreateInfoEXT.get_presentGravityY(this.segment(), index); } + /// {@return `presentGravityY`} + public @CType("VkPresentGravityFlagsEXT") int presentGravityY() { return VkSwapchainPresentScalingCreateInfoEXT.get_presentGravityY(this.segment()); } + /// Sets `presentGravityY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentGravityY(MemorySegment segment, long index, @CType("VkPresentGravityFlagsEXT") int value) { VH_presentGravityY.set(segment, 0L, index, value); } + /// Sets `presentGravityY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentGravityY(MemorySegment segment, @CType("VkPresentGravityFlagsEXT") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_presentGravityY(segment, 0L, value); } + /// Sets `presentGravityY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentScalingCreateInfoEXT presentGravityYAt(long index, @CType("VkPresentGravityFlagsEXT") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_presentGravityY(this.segment(), index, value); return this; } + /// Sets `presentGravityY` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentScalingCreateInfoEXT presentGravityY(@CType("VkPresentGravityFlagsEXT") int value) { VkSwapchainPresentScalingCreateInfoEXT.set_presentGravityY(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkValidationCacheCreateInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkValidationCacheCreateInfoEXT.java new file mode 100644 index 00000000..bd3bc45d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkValidationCacheCreateInfoEXT.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### initialDataSize +/// [VarHandle][#VH_initialDataSize] - [Getter][#initialDataSize()] - [Setter][#initialDataSize(long)] +/// ### pInitialData +/// [VarHandle][#VH_pInitialData] - [Getter][#pInitialData()] - [Setter][#pInitialData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkValidationCacheCreateInfoEXT { +/// VkStructureType sType; +/// const void * pNext; +/// VkValidationCacheCreateFlagsEXT flags; +/// size_t initialDataSize; +/// const void * pInitialData; +/// } VkValidationCacheCreateInfoEXT; +/// ``` +public final class VkValidationCacheCreateInfoEXT extends Struct { + /// The struct layout of `VkValidationCacheCreateInfoEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("initialDataSize"), + ValueLayout.ADDRESS.withName("pInitialData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `initialDataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_initialDataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initialDataSize")); + /// The [VarHandle] of `pInitialData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pInitialData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pInitialData")); + + /// Creates `VkValidationCacheCreateInfoEXT` with the given segment. + /// @param segment the memory segment + public VkValidationCacheCreateInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkValidationCacheCreateInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkValidationCacheCreateInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkValidationCacheCreateInfoEXT(segment); } + + /// Creates `VkValidationCacheCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkValidationCacheCreateInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkValidationCacheCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkValidationCacheCreateInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkValidationCacheCreateInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkValidationCacheCreateInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkValidationCacheCreateInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkValidationCacheCreateInfoEXT` + public static VkValidationCacheCreateInfoEXT alloc(SegmentAllocator allocator) { return new VkValidationCacheCreateInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkValidationCacheCreateInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkValidationCacheCreateInfoEXT` + public static VkValidationCacheCreateInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkValidationCacheCreateInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkValidationCacheCreateInfoEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkValidationCacheCreateInfoEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkValidationCacheCreateInfoEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkValidationCacheCreateInfoEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationCacheCreateInfoEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkValidationCacheCreateInfoEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkValidationCacheCreateInfoEXT sType(@CType("VkStructureType") int value) { VkValidationCacheCreateInfoEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkValidationCacheCreateInfoEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkValidationCacheCreateInfoEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkValidationCacheCreateInfoEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationCacheCreateInfoEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationCacheCreateInfoEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationCacheCreateInfoEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkValidationCacheCreateInfoEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationCacheCreateInfoEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkValidationCacheCreateFlagsEXT") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkValidationCacheCreateFlagsEXT") int get_flags(MemorySegment segment) { return VkValidationCacheCreateInfoEXT.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkValidationCacheCreateFlagsEXT") int flagsAt(long index) { return VkValidationCacheCreateInfoEXT.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkValidationCacheCreateFlagsEXT") int flags() { return VkValidationCacheCreateInfoEXT.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkValidationCacheCreateFlagsEXT") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkValidationCacheCreateFlagsEXT") int value) { VkValidationCacheCreateInfoEXT.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationCacheCreateInfoEXT flagsAt(long index, @CType("VkValidationCacheCreateFlagsEXT") int value) { VkValidationCacheCreateInfoEXT.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkValidationCacheCreateInfoEXT flags(@CType("VkValidationCacheCreateFlagsEXT") int value) { VkValidationCacheCreateInfoEXT.set_flags(this.segment(), value); return this; } + + /// {@return `initialDataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_initialDataSize(MemorySegment segment, long index) { return (long) VH_initialDataSize.get(segment, 0L, index); } + /// {@return `initialDataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_initialDataSize(MemorySegment segment) { return VkValidationCacheCreateInfoEXT.get_initialDataSize(segment, 0L); } + /// {@return `initialDataSize` at the given index} + /// @param index the index + public @CType("size_t") long initialDataSizeAt(long index) { return VkValidationCacheCreateInfoEXT.get_initialDataSize(this.segment(), index); } + /// {@return `initialDataSize`} + public @CType("size_t") long initialDataSize() { return VkValidationCacheCreateInfoEXT.get_initialDataSize(this.segment()); } + /// Sets `initialDataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initialDataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_initialDataSize.set(segment, 0L, index, value); } + /// Sets `initialDataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initialDataSize(MemorySegment segment, @CType("size_t") long value) { VkValidationCacheCreateInfoEXT.set_initialDataSize(segment, 0L, value); } + /// Sets `initialDataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationCacheCreateInfoEXT initialDataSizeAt(long index, @CType("size_t") long value) { VkValidationCacheCreateInfoEXT.set_initialDataSize(this.segment(), index, value); return this; } + /// Sets `initialDataSize` with the given value. + /// @param value the value + /// @return `this` + public VkValidationCacheCreateInfoEXT initialDataSize(@CType("size_t") long value) { VkValidationCacheCreateInfoEXT.set_initialDataSize(this.segment(), value); return this; } + + /// {@return `pInitialData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pInitialData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pInitialData.get(segment, 0L, index); } + /// {@return `pInitialData`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pInitialData(MemorySegment segment) { return VkValidationCacheCreateInfoEXT.get_pInitialData(segment, 0L); } + /// {@return `pInitialData` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pInitialDataAt(long index) { return VkValidationCacheCreateInfoEXT.get_pInitialData(this.segment(), index); } + /// {@return `pInitialData`} + public @CType("const void *") java.lang.foreign.MemorySegment pInitialData() { return VkValidationCacheCreateInfoEXT.get_pInitialData(this.segment()); } + /// Sets `pInitialData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pInitialData(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pInitialData.set(segment, 0L, index, value); } + /// Sets `pInitialData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pInitialData(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationCacheCreateInfoEXT.set_pInitialData(segment, 0L, value); } + /// Sets `pInitialData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationCacheCreateInfoEXT pInitialDataAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationCacheCreateInfoEXT.set_pInitialData(this.segment(), index, value); return this; } + /// Sets `pInitialData` with the given value. + /// @param value the value + /// @return `this` + public VkValidationCacheCreateInfoEXT pInitialData(@CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationCacheCreateInfoEXT.set_pInitialData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkValidationFeaturesEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkValidationFeaturesEXT.java new file mode 100644 index 00000000..fd6a90bd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkValidationFeaturesEXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### enabledValidationFeatureCount +/// [VarHandle][#VH_enabledValidationFeatureCount] - [Getter][#enabledValidationFeatureCount()] - [Setter][#enabledValidationFeatureCount(int)] +/// ### pEnabledValidationFeatures +/// [VarHandle][#VH_pEnabledValidationFeatures] - [Getter][#pEnabledValidationFeatures()] - [Setter][#pEnabledValidationFeatures(java.lang.foreign.MemorySegment)] +/// ### disabledValidationFeatureCount +/// [VarHandle][#VH_disabledValidationFeatureCount] - [Getter][#disabledValidationFeatureCount()] - [Setter][#disabledValidationFeatureCount(int)] +/// ### pDisabledValidationFeatures +/// [VarHandle][#VH_pDisabledValidationFeatures] - [Getter][#pDisabledValidationFeatures()] - [Setter][#pDisabledValidationFeatures(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkValidationFeaturesEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t enabledValidationFeatureCount; +/// const VkValidationFeatureEnableEXT * pEnabledValidationFeatures; +/// uint32_t disabledValidationFeatureCount; +/// const VkValidationFeatureDisableEXT * pDisabledValidationFeatures; +/// } VkValidationFeaturesEXT; +/// ``` +public final class VkValidationFeaturesEXT extends Struct { + /// The struct layout of `VkValidationFeaturesEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("enabledValidationFeatureCount"), + ValueLayout.ADDRESS.withName("pEnabledValidationFeatures"), + ValueLayout.JAVA_INT.withName("disabledValidationFeatureCount"), + ValueLayout.ADDRESS.withName("pDisabledValidationFeatures") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `enabledValidationFeatureCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enabledValidationFeatureCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enabledValidationFeatureCount")); + /// The [VarHandle] of `pEnabledValidationFeatures` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pEnabledValidationFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pEnabledValidationFeatures")); + /// The [VarHandle] of `disabledValidationFeatureCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disabledValidationFeatureCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disabledValidationFeatureCount")); + /// The [VarHandle] of `pDisabledValidationFeatures` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDisabledValidationFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDisabledValidationFeatures")); + + /// Creates `VkValidationFeaturesEXT` with the given segment. + /// @param segment the memory segment + public VkValidationFeaturesEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkValidationFeaturesEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkValidationFeaturesEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkValidationFeaturesEXT(segment); } + + /// Creates `VkValidationFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkValidationFeaturesEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkValidationFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkValidationFeaturesEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkValidationFeaturesEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkValidationFeaturesEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkValidationFeaturesEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkValidationFeaturesEXT` + public static VkValidationFeaturesEXT alloc(SegmentAllocator allocator) { return new VkValidationFeaturesEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkValidationFeaturesEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkValidationFeaturesEXT` + public static VkValidationFeaturesEXT alloc(SegmentAllocator allocator, long count) { return new VkValidationFeaturesEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkValidationFeaturesEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkValidationFeaturesEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkValidationFeaturesEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkValidationFeaturesEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkValidationFeaturesEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT sType(@CType("VkStructureType") int value) { VkValidationFeaturesEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkValidationFeaturesEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkValidationFeaturesEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkValidationFeaturesEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationFeaturesEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationFeaturesEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationFeaturesEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `enabledValidationFeatureCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_enabledValidationFeatureCount(MemorySegment segment, long index) { return (int) VH_enabledValidationFeatureCount.get(segment, 0L, index); } + /// {@return `enabledValidationFeatureCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_enabledValidationFeatureCount(MemorySegment segment) { return VkValidationFeaturesEXT.get_enabledValidationFeatureCount(segment, 0L); } + /// {@return `enabledValidationFeatureCount` at the given index} + /// @param index the index + public @CType("uint32_t") int enabledValidationFeatureCountAt(long index) { return VkValidationFeaturesEXT.get_enabledValidationFeatureCount(this.segment(), index); } + /// {@return `enabledValidationFeatureCount`} + public @CType("uint32_t") int enabledValidationFeatureCount() { return VkValidationFeaturesEXT.get_enabledValidationFeatureCount(this.segment()); } + /// Sets `enabledValidationFeatureCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enabledValidationFeatureCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_enabledValidationFeatureCount.set(segment, 0L, index, value); } + /// Sets `enabledValidationFeatureCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enabledValidationFeatureCount(MemorySegment segment, @CType("uint32_t") int value) { VkValidationFeaturesEXT.set_enabledValidationFeatureCount(segment, 0L, value); } + /// Sets `enabledValidationFeatureCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT enabledValidationFeatureCountAt(long index, @CType("uint32_t") int value) { VkValidationFeaturesEXT.set_enabledValidationFeatureCount(this.segment(), index, value); return this; } + /// Sets `enabledValidationFeatureCount` with the given value. + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT enabledValidationFeatureCount(@CType("uint32_t") int value) { VkValidationFeaturesEXT.set_enabledValidationFeatureCount(this.segment(), value); return this; } + + /// {@return `pEnabledValidationFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkValidationFeatureEnableEXT *") java.lang.foreign.MemorySegment get_pEnabledValidationFeatures(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pEnabledValidationFeatures.get(segment, 0L, index); } + /// {@return `pEnabledValidationFeatures`} + /// @param segment the segment of the struct + public static @CType("const VkValidationFeatureEnableEXT *") java.lang.foreign.MemorySegment get_pEnabledValidationFeatures(MemorySegment segment) { return VkValidationFeaturesEXT.get_pEnabledValidationFeatures(segment, 0L); } + /// {@return `pEnabledValidationFeatures` at the given index} + /// @param index the index + public @CType("const VkValidationFeatureEnableEXT *") java.lang.foreign.MemorySegment pEnabledValidationFeaturesAt(long index) { return VkValidationFeaturesEXT.get_pEnabledValidationFeatures(this.segment(), index); } + /// {@return `pEnabledValidationFeatures`} + public @CType("const VkValidationFeatureEnableEXT *") java.lang.foreign.MemorySegment pEnabledValidationFeatures() { return VkValidationFeaturesEXT.get_pEnabledValidationFeatures(this.segment()); } + /// Sets `pEnabledValidationFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pEnabledValidationFeatures(MemorySegment segment, long index, @CType("const VkValidationFeatureEnableEXT *") java.lang.foreign.MemorySegment value) { VH_pEnabledValidationFeatures.set(segment, 0L, index, value); } + /// Sets `pEnabledValidationFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pEnabledValidationFeatures(MemorySegment segment, @CType("const VkValidationFeatureEnableEXT *") java.lang.foreign.MemorySegment value) { VkValidationFeaturesEXT.set_pEnabledValidationFeatures(segment, 0L, value); } + /// Sets `pEnabledValidationFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT pEnabledValidationFeaturesAt(long index, @CType("const VkValidationFeatureEnableEXT *") java.lang.foreign.MemorySegment value) { VkValidationFeaturesEXT.set_pEnabledValidationFeatures(this.segment(), index, value); return this; } + /// Sets `pEnabledValidationFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT pEnabledValidationFeatures(@CType("const VkValidationFeatureEnableEXT *") java.lang.foreign.MemorySegment value) { VkValidationFeaturesEXT.set_pEnabledValidationFeatures(this.segment(), value); return this; } + + /// {@return `disabledValidationFeatureCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_disabledValidationFeatureCount(MemorySegment segment, long index) { return (int) VH_disabledValidationFeatureCount.get(segment, 0L, index); } + /// {@return `disabledValidationFeatureCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_disabledValidationFeatureCount(MemorySegment segment) { return VkValidationFeaturesEXT.get_disabledValidationFeatureCount(segment, 0L); } + /// {@return `disabledValidationFeatureCount` at the given index} + /// @param index the index + public @CType("uint32_t") int disabledValidationFeatureCountAt(long index) { return VkValidationFeaturesEXT.get_disabledValidationFeatureCount(this.segment(), index); } + /// {@return `disabledValidationFeatureCount`} + public @CType("uint32_t") int disabledValidationFeatureCount() { return VkValidationFeaturesEXT.get_disabledValidationFeatureCount(this.segment()); } + /// Sets `disabledValidationFeatureCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disabledValidationFeatureCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_disabledValidationFeatureCount.set(segment, 0L, index, value); } + /// Sets `disabledValidationFeatureCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disabledValidationFeatureCount(MemorySegment segment, @CType("uint32_t") int value) { VkValidationFeaturesEXT.set_disabledValidationFeatureCount(segment, 0L, value); } + /// Sets `disabledValidationFeatureCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT disabledValidationFeatureCountAt(long index, @CType("uint32_t") int value) { VkValidationFeaturesEXT.set_disabledValidationFeatureCount(this.segment(), index, value); return this; } + /// Sets `disabledValidationFeatureCount` with the given value. + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT disabledValidationFeatureCount(@CType("uint32_t") int value) { VkValidationFeaturesEXT.set_disabledValidationFeatureCount(this.segment(), value); return this; } + + /// {@return `pDisabledValidationFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkValidationFeatureDisableEXT *") java.lang.foreign.MemorySegment get_pDisabledValidationFeatures(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDisabledValidationFeatures.get(segment, 0L, index); } + /// {@return `pDisabledValidationFeatures`} + /// @param segment the segment of the struct + public static @CType("const VkValidationFeatureDisableEXT *") java.lang.foreign.MemorySegment get_pDisabledValidationFeatures(MemorySegment segment) { return VkValidationFeaturesEXT.get_pDisabledValidationFeatures(segment, 0L); } + /// {@return `pDisabledValidationFeatures` at the given index} + /// @param index the index + public @CType("const VkValidationFeatureDisableEXT *") java.lang.foreign.MemorySegment pDisabledValidationFeaturesAt(long index) { return VkValidationFeaturesEXT.get_pDisabledValidationFeatures(this.segment(), index); } + /// {@return `pDisabledValidationFeatures`} + public @CType("const VkValidationFeatureDisableEXT *") java.lang.foreign.MemorySegment pDisabledValidationFeatures() { return VkValidationFeaturesEXT.get_pDisabledValidationFeatures(this.segment()); } + /// Sets `pDisabledValidationFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDisabledValidationFeatures(MemorySegment segment, long index, @CType("const VkValidationFeatureDisableEXT *") java.lang.foreign.MemorySegment value) { VH_pDisabledValidationFeatures.set(segment, 0L, index, value); } + /// Sets `pDisabledValidationFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDisabledValidationFeatures(MemorySegment segment, @CType("const VkValidationFeatureDisableEXT *") java.lang.foreign.MemorySegment value) { VkValidationFeaturesEXT.set_pDisabledValidationFeatures(segment, 0L, value); } + /// Sets `pDisabledValidationFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT pDisabledValidationFeaturesAt(long index, @CType("const VkValidationFeatureDisableEXT *") java.lang.foreign.MemorySegment value) { VkValidationFeaturesEXT.set_pDisabledValidationFeatures(this.segment(), index, value); return this; } + /// Sets `pDisabledValidationFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkValidationFeaturesEXT pDisabledValidationFeatures(@CType("const VkValidationFeatureDisableEXT *") java.lang.foreign.MemorySegment value) { VkValidationFeaturesEXT.set_pDisabledValidationFeatures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkValidationFlagsEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkValidationFlagsEXT.java new file mode 100644 index 00000000..a09b4edb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkValidationFlagsEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### disabledValidationCheckCount +/// [VarHandle][#VH_disabledValidationCheckCount] - [Getter][#disabledValidationCheckCount()] - [Setter][#disabledValidationCheckCount(int)] +/// ### pDisabledValidationChecks +/// [VarHandle][#VH_pDisabledValidationChecks] - [Getter][#pDisabledValidationChecks()] - [Setter][#pDisabledValidationChecks(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkValidationFlagsEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t disabledValidationCheckCount; +/// const VkValidationCheckEXT * pDisabledValidationChecks; +/// } VkValidationFlagsEXT; +/// ``` +public final class VkValidationFlagsEXT extends Struct { + /// The struct layout of `VkValidationFlagsEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("disabledValidationCheckCount"), + ValueLayout.ADDRESS.withName("pDisabledValidationChecks") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `disabledValidationCheckCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disabledValidationCheckCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disabledValidationCheckCount")); + /// The [VarHandle] of `pDisabledValidationChecks` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDisabledValidationChecks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDisabledValidationChecks")); + + /// Creates `VkValidationFlagsEXT` with the given segment. + /// @param segment the memory segment + public VkValidationFlagsEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkValidationFlagsEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkValidationFlagsEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkValidationFlagsEXT(segment); } + + /// Creates `VkValidationFlagsEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkValidationFlagsEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkValidationFlagsEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkValidationFlagsEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkValidationFlagsEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkValidationFlagsEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkValidationFlagsEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkValidationFlagsEXT` + public static VkValidationFlagsEXT alloc(SegmentAllocator allocator) { return new VkValidationFlagsEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkValidationFlagsEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkValidationFlagsEXT` + public static VkValidationFlagsEXT alloc(SegmentAllocator allocator, long count) { return new VkValidationFlagsEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkValidationFlagsEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkValidationFlagsEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkValidationFlagsEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkValidationFlagsEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationFlagsEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkValidationFlagsEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkValidationFlagsEXT sType(@CType("VkStructureType") int value) { VkValidationFlagsEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkValidationFlagsEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkValidationFlagsEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkValidationFlagsEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationFlagsEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationFlagsEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationFlagsEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkValidationFlagsEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkValidationFlagsEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `disabledValidationCheckCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_disabledValidationCheckCount(MemorySegment segment, long index) { return (int) VH_disabledValidationCheckCount.get(segment, 0L, index); } + /// {@return `disabledValidationCheckCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_disabledValidationCheckCount(MemorySegment segment) { return VkValidationFlagsEXT.get_disabledValidationCheckCount(segment, 0L); } + /// {@return `disabledValidationCheckCount` at the given index} + /// @param index the index + public @CType("uint32_t") int disabledValidationCheckCountAt(long index) { return VkValidationFlagsEXT.get_disabledValidationCheckCount(this.segment(), index); } + /// {@return `disabledValidationCheckCount`} + public @CType("uint32_t") int disabledValidationCheckCount() { return VkValidationFlagsEXT.get_disabledValidationCheckCount(this.segment()); } + /// Sets `disabledValidationCheckCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disabledValidationCheckCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_disabledValidationCheckCount.set(segment, 0L, index, value); } + /// Sets `disabledValidationCheckCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disabledValidationCheckCount(MemorySegment segment, @CType("uint32_t") int value) { VkValidationFlagsEXT.set_disabledValidationCheckCount(segment, 0L, value); } + /// Sets `disabledValidationCheckCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationFlagsEXT disabledValidationCheckCountAt(long index, @CType("uint32_t") int value) { VkValidationFlagsEXT.set_disabledValidationCheckCount(this.segment(), index, value); return this; } + /// Sets `disabledValidationCheckCount` with the given value. + /// @param value the value + /// @return `this` + public VkValidationFlagsEXT disabledValidationCheckCount(@CType("uint32_t") int value) { VkValidationFlagsEXT.set_disabledValidationCheckCount(this.segment(), value); return this; } + + /// {@return `pDisabledValidationChecks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkValidationCheckEXT *") java.lang.foreign.MemorySegment get_pDisabledValidationChecks(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDisabledValidationChecks.get(segment, 0L, index); } + /// {@return `pDisabledValidationChecks`} + /// @param segment the segment of the struct + public static @CType("const VkValidationCheckEXT *") java.lang.foreign.MemorySegment get_pDisabledValidationChecks(MemorySegment segment) { return VkValidationFlagsEXT.get_pDisabledValidationChecks(segment, 0L); } + /// {@return `pDisabledValidationChecks` at the given index} + /// @param index the index + public @CType("const VkValidationCheckEXT *") java.lang.foreign.MemorySegment pDisabledValidationChecksAt(long index) { return VkValidationFlagsEXT.get_pDisabledValidationChecks(this.segment(), index); } + /// {@return `pDisabledValidationChecks`} + public @CType("const VkValidationCheckEXT *") java.lang.foreign.MemorySegment pDisabledValidationChecks() { return VkValidationFlagsEXT.get_pDisabledValidationChecks(this.segment()); } + /// Sets `pDisabledValidationChecks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDisabledValidationChecks(MemorySegment segment, long index, @CType("const VkValidationCheckEXT *") java.lang.foreign.MemorySegment value) { VH_pDisabledValidationChecks.set(segment, 0L, index, value); } + /// Sets `pDisabledValidationChecks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDisabledValidationChecks(MemorySegment segment, @CType("const VkValidationCheckEXT *") java.lang.foreign.MemorySegment value) { VkValidationFlagsEXT.set_pDisabledValidationChecks(segment, 0L, value); } + /// Sets `pDisabledValidationChecks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkValidationFlagsEXT pDisabledValidationChecksAt(long index, @CType("const VkValidationCheckEXT *") java.lang.foreign.MemorySegment value) { VkValidationFlagsEXT.set_pDisabledValidationChecks(this.segment(), index, value); return this; } + /// Sets `pDisabledValidationChecks` with the given value. + /// @param value the value + /// @return `this` + public VkValidationFlagsEXT pDisabledValidationChecks(@CType("const VkValidationCheckEXT *") java.lang.foreign.MemorySegment value) { VkValidationFlagsEXT.set_pDisabledValidationChecks(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkVertexInputAttributeDescription2EXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkVertexInputAttributeDescription2EXT.java new file mode 100644 index 00000000..10f13cf2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkVertexInputAttributeDescription2EXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### location +/// [VarHandle][#VH_location] - [Getter][#location()] - [Setter][#location(int)] +/// ### binding +/// [VarHandle][#VH_binding] - [Getter][#binding()] - [Setter][#binding(int)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVertexInputAttributeDescription2EXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t location; +/// uint32_t binding; +/// VkFormat format; +/// uint32_t offset; +/// } VkVertexInputAttributeDescription2EXT; +/// ``` +public final class VkVertexInputAttributeDescription2EXT extends Struct { + /// The struct layout of `VkVertexInputAttributeDescription2EXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("location"), + ValueLayout.JAVA_INT.withName("binding"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_INT.withName("offset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `location` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_location = LAYOUT.arrayElementVarHandle(PathElement.groupElement("location")); + /// The [VarHandle] of `binding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_binding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("binding")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + + /// Creates `VkVertexInputAttributeDescription2EXT` with the given segment. + /// @param segment the memory segment + public VkVertexInputAttributeDescription2EXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVertexInputAttributeDescription2EXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputAttributeDescription2EXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputAttributeDescription2EXT(segment); } + + /// Creates `VkVertexInputAttributeDescription2EXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputAttributeDescription2EXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputAttributeDescription2EXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVertexInputAttributeDescription2EXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputAttributeDescription2EXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputAttributeDescription2EXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVertexInputAttributeDescription2EXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVertexInputAttributeDescription2EXT` + public static VkVertexInputAttributeDescription2EXT alloc(SegmentAllocator allocator) { return new VkVertexInputAttributeDescription2EXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVertexInputAttributeDescription2EXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVertexInputAttributeDescription2EXT` + public static VkVertexInputAttributeDescription2EXT alloc(SegmentAllocator allocator, long count) { return new VkVertexInputAttributeDescription2EXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVertexInputAttributeDescription2EXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVertexInputAttributeDescription2EXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVertexInputAttributeDescription2EXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVertexInputAttributeDescription2EXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT sTypeAt(long index, @CType("VkStructureType") int value) { VkVertexInputAttributeDescription2EXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT sType(@CType("VkStructureType") int value) { VkVertexInputAttributeDescription2EXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVertexInputAttributeDescription2EXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVertexInputAttributeDescription2EXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVertexInputAttributeDescription2EXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVertexInputAttributeDescription2EXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVertexInputAttributeDescription2EXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVertexInputAttributeDescription2EXT.set_pNext(this.segment(), value); return this; } + + /// {@return `location` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_location(MemorySegment segment, long index) { return (int) VH_location.get(segment, 0L, index); } + /// {@return `location`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_location(MemorySegment segment) { return VkVertexInputAttributeDescription2EXT.get_location(segment, 0L); } + /// {@return `location` at the given index} + /// @param index the index + public @CType("uint32_t") int locationAt(long index) { return VkVertexInputAttributeDescription2EXT.get_location(this.segment(), index); } + /// {@return `location`} + public @CType("uint32_t") int location() { return VkVertexInputAttributeDescription2EXT.get_location(this.segment()); } + /// Sets `location` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_location(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_location.set(segment, 0L, index, value); } + /// Sets `location` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_location(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputAttributeDescription2EXT.set_location(segment, 0L, value); } + /// Sets `location` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT locationAt(long index, @CType("uint32_t") int value) { VkVertexInputAttributeDescription2EXT.set_location(this.segment(), index, value); return this; } + /// Sets `location` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT location(@CType("uint32_t") int value) { VkVertexInputAttributeDescription2EXT.set_location(this.segment(), value); return this; } + + /// {@return `binding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_binding(MemorySegment segment, long index) { return (int) VH_binding.get(segment, 0L, index); } + /// {@return `binding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_binding(MemorySegment segment) { return VkVertexInputAttributeDescription2EXT.get_binding(segment, 0L); } + /// {@return `binding` at the given index} + /// @param index the index + public @CType("uint32_t") int bindingAt(long index) { return VkVertexInputAttributeDescription2EXT.get_binding(this.segment(), index); } + /// {@return `binding`} + public @CType("uint32_t") int binding() { return VkVertexInputAttributeDescription2EXT.get_binding(this.segment()); } + /// Sets `binding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_binding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_binding.set(segment, 0L, index, value); } + /// Sets `binding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_binding(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputAttributeDescription2EXT.set_binding(segment, 0L, value); } + /// Sets `binding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT bindingAt(long index, @CType("uint32_t") int value) { VkVertexInputAttributeDescription2EXT.set_binding(this.segment(), index, value); return this; } + /// Sets `binding` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT binding(@CType("uint32_t") int value) { VkVertexInputAttributeDescription2EXT.set_binding(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkVertexInputAttributeDescription2EXT.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkVertexInputAttributeDescription2EXT.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkVertexInputAttributeDescription2EXT.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkVertexInputAttributeDescription2EXT.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT formatAt(long index, @CType("VkFormat") int value) { VkVertexInputAttributeDescription2EXT.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT format(@CType("VkFormat") int value) { VkVertexInputAttributeDescription2EXT.set_format(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_offset(MemorySegment segment, long index) { return (int) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_offset(MemorySegment segment) { return VkVertexInputAttributeDescription2EXT.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("uint32_t") int offsetAt(long index) { return VkVertexInputAttributeDescription2EXT.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("uint32_t") int offset() { return VkVertexInputAttributeDescription2EXT.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputAttributeDescription2EXT.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT offsetAt(long index, @CType("uint32_t") int value) { VkVertexInputAttributeDescription2EXT.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription2EXT offset(@CType("uint32_t") int value) { VkVertexInputAttributeDescription2EXT.set_offset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkVertexInputBindingDescription2EXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkVertexInputBindingDescription2EXT.java new file mode 100644 index 00000000..a3cbe60c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkVertexInputBindingDescription2EXT.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### binding +/// [VarHandle][#VH_binding] - [Getter][#binding()] - [Setter][#binding(int)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(int)] +/// ### inputRate +/// [VarHandle][#VH_inputRate] - [Getter][#inputRate()] - [Setter][#inputRate(int)] +/// ### divisor +/// [VarHandle][#VH_divisor] - [Getter][#divisor()] - [Setter][#divisor(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVertexInputBindingDescription2EXT { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t binding; +/// uint32_t stride; +/// VkVertexInputRate inputRate; +/// uint32_t divisor; +/// } VkVertexInputBindingDescription2EXT; +/// ``` +public final class VkVertexInputBindingDescription2EXT extends Struct { + /// The struct layout of `VkVertexInputBindingDescription2EXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("binding"), + ValueLayout.JAVA_INT.withName("stride"), + ValueLayout.JAVA_INT.withName("inputRate"), + ValueLayout.JAVA_INT.withName("divisor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `binding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_binding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("binding")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + /// The [VarHandle] of `inputRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inputRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inputRate")); + /// The [VarHandle] of `divisor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_divisor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("divisor")); + + /// Creates `VkVertexInputBindingDescription2EXT` with the given segment. + /// @param segment the memory segment + public VkVertexInputBindingDescription2EXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVertexInputBindingDescription2EXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputBindingDescription2EXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputBindingDescription2EXT(segment); } + + /// Creates `VkVertexInputBindingDescription2EXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputBindingDescription2EXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputBindingDescription2EXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVertexInputBindingDescription2EXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputBindingDescription2EXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputBindingDescription2EXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVertexInputBindingDescription2EXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVertexInputBindingDescription2EXT` + public static VkVertexInputBindingDescription2EXT alloc(SegmentAllocator allocator) { return new VkVertexInputBindingDescription2EXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVertexInputBindingDescription2EXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVertexInputBindingDescription2EXT` + public static VkVertexInputBindingDescription2EXT alloc(SegmentAllocator allocator, long count) { return new VkVertexInputBindingDescription2EXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVertexInputBindingDescription2EXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVertexInputBindingDescription2EXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVertexInputBindingDescription2EXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVertexInputBindingDescription2EXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT sTypeAt(long index, @CType("VkStructureType") int value) { VkVertexInputBindingDescription2EXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT sType(@CType("VkStructureType") int value) { VkVertexInputBindingDescription2EXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVertexInputBindingDescription2EXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVertexInputBindingDescription2EXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVertexInputBindingDescription2EXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVertexInputBindingDescription2EXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVertexInputBindingDescription2EXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVertexInputBindingDescription2EXT.set_pNext(this.segment(), value); return this; } + + /// {@return `binding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_binding(MemorySegment segment, long index) { return (int) VH_binding.get(segment, 0L, index); } + /// {@return `binding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_binding(MemorySegment segment) { return VkVertexInputBindingDescription2EXT.get_binding(segment, 0L); } + /// {@return `binding` at the given index} + /// @param index the index + public @CType("uint32_t") int bindingAt(long index) { return VkVertexInputBindingDescription2EXT.get_binding(this.segment(), index); } + /// {@return `binding`} + public @CType("uint32_t") int binding() { return VkVertexInputBindingDescription2EXT.get_binding(this.segment()); } + /// Sets `binding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_binding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_binding.set(segment, 0L, index, value); } + /// Sets `binding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_binding(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputBindingDescription2EXT.set_binding(segment, 0L, value); } + /// Sets `binding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT bindingAt(long index, @CType("uint32_t") int value) { VkVertexInputBindingDescription2EXT.set_binding(this.segment(), index, value); return this; } + /// Sets `binding` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT binding(@CType("uint32_t") int value) { VkVertexInputBindingDescription2EXT.set_binding(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stride(MemorySegment segment, long index) { return (int) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stride(MemorySegment segment) { return VkVertexInputBindingDescription2EXT.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("uint32_t") int strideAt(long index) { return VkVertexInputBindingDescription2EXT.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("uint32_t") int stride() { return VkVertexInputBindingDescription2EXT.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputBindingDescription2EXT.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT strideAt(long index, @CType("uint32_t") int value) { VkVertexInputBindingDescription2EXT.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT stride(@CType("uint32_t") int value) { VkVertexInputBindingDescription2EXT.set_stride(this.segment(), value); return this; } + + /// {@return `inputRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVertexInputRate") int get_inputRate(MemorySegment segment, long index) { return (int) VH_inputRate.get(segment, 0L, index); } + /// {@return `inputRate`} + /// @param segment the segment of the struct + public static @CType("VkVertexInputRate") int get_inputRate(MemorySegment segment) { return VkVertexInputBindingDescription2EXT.get_inputRate(segment, 0L); } + /// {@return `inputRate` at the given index} + /// @param index the index + public @CType("VkVertexInputRate") int inputRateAt(long index) { return VkVertexInputBindingDescription2EXT.get_inputRate(this.segment(), index); } + /// {@return `inputRate`} + public @CType("VkVertexInputRate") int inputRate() { return VkVertexInputBindingDescription2EXT.get_inputRate(this.segment()); } + /// Sets `inputRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inputRate(MemorySegment segment, long index, @CType("VkVertexInputRate") int value) { VH_inputRate.set(segment, 0L, index, value); } + /// Sets `inputRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inputRate(MemorySegment segment, @CType("VkVertexInputRate") int value) { VkVertexInputBindingDescription2EXT.set_inputRate(segment, 0L, value); } + /// Sets `inputRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT inputRateAt(long index, @CType("VkVertexInputRate") int value) { VkVertexInputBindingDescription2EXT.set_inputRate(this.segment(), index, value); return this; } + /// Sets `inputRate` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT inputRate(@CType("VkVertexInputRate") int value) { VkVertexInputBindingDescription2EXT.set_inputRate(this.segment(), value); return this; } + + /// {@return `divisor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_divisor(MemorySegment segment, long index) { return (int) VH_divisor.get(segment, 0L, index); } + /// {@return `divisor`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_divisor(MemorySegment segment) { return VkVertexInputBindingDescription2EXT.get_divisor(segment, 0L); } + /// {@return `divisor` at the given index} + /// @param index the index + public @CType("uint32_t") int divisorAt(long index) { return VkVertexInputBindingDescription2EXT.get_divisor(this.segment(), index); } + /// {@return `divisor`} + public @CType("uint32_t") int divisor() { return VkVertexInputBindingDescription2EXT.get_divisor(this.segment()); } + /// Sets `divisor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_divisor(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_divisor.set(segment, 0L, index, value); } + /// Sets `divisor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_divisor(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputBindingDescription2EXT.set_divisor(segment, 0L, value); } + /// Sets `divisor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT divisorAt(long index, @CType("uint32_t") int value) { VkVertexInputBindingDescription2EXT.set_divisor(this.segment(), index, value); return this; } + /// Sets `divisor` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription2EXT divisor(@CType("uint32_t") int value) { VkVertexInputBindingDescription2EXT.set_divisor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkWriteIndirectExecutionSetPipelineEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkWriteIndirectExecutionSetPipelineEXT.java new file mode 100644 index 00000000..b00ae21b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkWriteIndirectExecutionSetPipelineEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### index +/// [VarHandle][#VH_index] - [Getter][#index()] - [Setter][#index(int)] +/// ### pipeline +/// [VarHandle][#VH_pipeline] - [Getter][#pipeline()] - [Setter][#pipeline(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkWriteIndirectExecutionSetPipelineEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t index; +/// VkPipeline pipeline; +/// } VkWriteIndirectExecutionSetPipelineEXT; +/// ``` +public final class VkWriteIndirectExecutionSetPipelineEXT extends Struct { + /// The struct layout of `VkWriteIndirectExecutionSetPipelineEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("index"), + ValueLayout.ADDRESS.withName("pipeline") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `index` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_index = LAYOUT.arrayElementVarHandle(PathElement.groupElement("index")); + /// The [VarHandle] of `pipeline` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipeline")); + + /// Creates `VkWriteIndirectExecutionSetPipelineEXT` with the given segment. + /// @param segment the memory segment + public VkWriteIndirectExecutionSetPipelineEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkWriteIndirectExecutionSetPipelineEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteIndirectExecutionSetPipelineEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteIndirectExecutionSetPipelineEXT(segment); } + + /// Creates `VkWriteIndirectExecutionSetPipelineEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteIndirectExecutionSetPipelineEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteIndirectExecutionSetPipelineEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkWriteIndirectExecutionSetPipelineEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteIndirectExecutionSetPipelineEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteIndirectExecutionSetPipelineEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkWriteIndirectExecutionSetPipelineEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkWriteIndirectExecutionSetPipelineEXT` + public static VkWriteIndirectExecutionSetPipelineEXT alloc(SegmentAllocator allocator) { return new VkWriteIndirectExecutionSetPipelineEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkWriteIndirectExecutionSetPipelineEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkWriteIndirectExecutionSetPipelineEXT` + public static VkWriteIndirectExecutionSetPipelineEXT alloc(SegmentAllocator allocator, long count) { return new VkWriteIndirectExecutionSetPipelineEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkWriteIndirectExecutionSetPipelineEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkWriteIndirectExecutionSetPipelineEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkWriteIndirectExecutionSetPipelineEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkWriteIndirectExecutionSetPipelineEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetPipelineEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkWriteIndirectExecutionSetPipelineEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetPipelineEXT sType(@CType("VkStructureType") int value) { VkWriteIndirectExecutionSetPipelineEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkWriteIndirectExecutionSetPipelineEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkWriteIndirectExecutionSetPipelineEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkWriteIndirectExecutionSetPipelineEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetPipelineEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetPipelineEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetPipelineEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetPipelineEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetPipelineEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `index` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_index(MemorySegment segment, long index) { return (int) VH_index.get(segment, 0L, index); } + /// {@return `index`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_index(MemorySegment segment) { return VkWriteIndirectExecutionSetPipelineEXT.get_index(segment, 0L); } + /// {@return `index` at the given index} + /// @param index the index + public @CType("uint32_t") int indexAt(long index) { return VkWriteIndirectExecutionSetPipelineEXT.get_index(this.segment(), index); } + /// {@return `index`} + public @CType("uint32_t") int index() { return VkWriteIndirectExecutionSetPipelineEXT.get_index(this.segment()); } + /// Sets `index` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_index(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_index.set(segment, 0L, index, value); } + /// Sets `index` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_index(MemorySegment segment, @CType("uint32_t") int value) { VkWriteIndirectExecutionSetPipelineEXT.set_index(segment, 0L, value); } + /// Sets `index` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetPipelineEXT indexAt(long index, @CType("uint32_t") int value) { VkWriteIndirectExecutionSetPipelineEXT.set_index(this.segment(), index, value); return this; } + /// Sets `index` with the given value. + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetPipelineEXT index(@CType("uint32_t") int value) { VkWriteIndirectExecutionSetPipelineEXT.set_index(this.segment(), value); return this; } + + /// {@return `pipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipeline.get(segment, 0L, index); } + /// {@return `pipeline`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment) { return VkWriteIndirectExecutionSetPipelineEXT.get_pipeline(segment, 0L); } + /// {@return `pipeline` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipelineAt(long index) { return VkWriteIndirectExecutionSetPipelineEXT.get_pipeline(this.segment(), index); } + /// {@return `pipeline`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipeline() { return VkWriteIndirectExecutionSetPipelineEXT.get_pipeline(this.segment()); } + /// Sets `pipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipeline(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_pipeline.set(segment, 0L, index, value); } + /// Sets `pipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipeline(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetPipelineEXT.set_pipeline(segment, 0L, value); } + /// Sets `pipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetPipelineEXT pipelineAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetPipelineEXT.set_pipeline(this.segment(), index, value); return this; } + /// Sets `pipeline` with the given value. + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetPipelineEXT pipeline(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetPipelineEXT.set_pipeline(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkWriteIndirectExecutionSetShaderEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkWriteIndirectExecutionSetShaderEXT.java new file mode 100644 index 00000000..23dd462b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkWriteIndirectExecutionSetShaderEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### index +/// [VarHandle][#VH_index] - [Getter][#index()] - [Setter][#index(int)] +/// ### shader +/// [VarHandle][#VH_shader] - [Getter][#shader()] - [Setter][#shader(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkWriteIndirectExecutionSetShaderEXT { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t index; +/// VkShaderEXT shader; +/// } VkWriteIndirectExecutionSetShaderEXT; +/// ``` +public final class VkWriteIndirectExecutionSetShaderEXT extends Struct { + /// The struct layout of `VkWriteIndirectExecutionSetShaderEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("index"), + ValueLayout.ADDRESS.withName("shader") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `index` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_index = LAYOUT.arrayElementVarHandle(PathElement.groupElement("index")); + /// The [VarHandle] of `shader` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_shader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shader")); + + /// Creates `VkWriteIndirectExecutionSetShaderEXT` with the given segment. + /// @param segment the memory segment + public VkWriteIndirectExecutionSetShaderEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkWriteIndirectExecutionSetShaderEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteIndirectExecutionSetShaderEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteIndirectExecutionSetShaderEXT(segment); } + + /// Creates `VkWriteIndirectExecutionSetShaderEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteIndirectExecutionSetShaderEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteIndirectExecutionSetShaderEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkWriteIndirectExecutionSetShaderEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteIndirectExecutionSetShaderEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteIndirectExecutionSetShaderEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkWriteIndirectExecutionSetShaderEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkWriteIndirectExecutionSetShaderEXT` + public static VkWriteIndirectExecutionSetShaderEXT alloc(SegmentAllocator allocator) { return new VkWriteIndirectExecutionSetShaderEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkWriteIndirectExecutionSetShaderEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkWriteIndirectExecutionSetShaderEXT` + public static VkWriteIndirectExecutionSetShaderEXT alloc(SegmentAllocator allocator, long count) { return new VkWriteIndirectExecutionSetShaderEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkWriteIndirectExecutionSetShaderEXT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkWriteIndirectExecutionSetShaderEXT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkWriteIndirectExecutionSetShaderEXT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkWriteIndirectExecutionSetShaderEXT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetShaderEXT sTypeAt(long index, @CType("VkStructureType") int value) { VkWriteIndirectExecutionSetShaderEXT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetShaderEXT sType(@CType("VkStructureType") int value) { VkWriteIndirectExecutionSetShaderEXT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkWriteIndirectExecutionSetShaderEXT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkWriteIndirectExecutionSetShaderEXT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkWriteIndirectExecutionSetShaderEXT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetShaderEXT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetShaderEXT pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetShaderEXT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetShaderEXT pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetShaderEXT.set_pNext(this.segment(), value); return this; } + + /// {@return `index` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_index(MemorySegment segment, long index) { return (int) VH_index.get(segment, 0L, index); } + /// {@return `index`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_index(MemorySegment segment) { return VkWriteIndirectExecutionSetShaderEXT.get_index(segment, 0L); } + /// {@return `index` at the given index} + /// @param index the index + public @CType("uint32_t") int indexAt(long index) { return VkWriteIndirectExecutionSetShaderEXT.get_index(this.segment(), index); } + /// {@return `index`} + public @CType("uint32_t") int index() { return VkWriteIndirectExecutionSetShaderEXT.get_index(this.segment()); } + /// Sets `index` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_index(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_index.set(segment, 0L, index, value); } + /// Sets `index` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_index(MemorySegment segment, @CType("uint32_t") int value) { VkWriteIndirectExecutionSetShaderEXT.set_index(segment, 0L, value); } + /// Sets `index` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetShaderEXT indexAt(long index, @CType("uint32_t") int value) { VkWriteIndirectExecutionSetShaderEXT.set_index(this.segment(), index, value); return this; } + /// Sets `index` with the given value. + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetShaderEXT index(@CType("uint32_t") int value) { VkWriteIndirectExecutionSetShaderEXT.set_index(this.segment(), value); return this; } + + /// {@return `shader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderEXT") java.lang.foreign.MemorySegment get_shader(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_shader.get(segment, 0L, index); } + /// {@return `shader`} + /// @param segment the segment of the struct + public static @CType("VkShaderEXT") java.lang.foreign.MemorySegment get_shader(MemorySegment segment) { return VkWriteIndirectExecutionSetShaderEXT.get_shader(segment, 0L); } + /// {@return `shader` at the given index} + /// @param index the index + public @CType("VkShaderEXT") java.lang.foreign.MemorySegment shaderAt(long index) { return VkWriteIndirectExecutionSetShaderEXT.get_shader(this.segment(), index); } + /// {@return `shader`} + public @CType("VkShaderEXT") java.lang.foreign.MemorySegment shader() { return VkWriteIndirectExecutionSetShaderEXT.get_shader(this.segment()); } + /// Sets `shader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shader(MemorySegment segment, long index, @CType("VkShaderEXT") java.lang.foreign.MemorySegment value) { VH_shader.set(segment, 0L, index, value); } + /// Sets `shader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shader(MemorySegment segment, @CType("VkShaderEXT") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetShaderEXT.set_shader(segment, 0L, value); } + /// Sets `shader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetShaderEXT shaderAt(long index, @CType("VkShaderEXT") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetShaderEXT.set_shader(this.segment(), index, value); return this; } + /// Sets `shader` with the given value. + /// @param value the value + /// @return `this` + public VkWriteIndirectExecutionSetShaderEXT shader(@CType("VkShaderEXT") java.lang.foreign.MemorySegment value) { VkWriteIndirectExecutionSetShaderEXT.set_shader(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkXYColorEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkXYColorEXT.java new file mode 100644 index 00000000..1293e9d4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/struct/VkXYColorEXT.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### x +/// [VarHandle][#VH_x] - [Getter][#x()] - [Setter][#x(float)] +/// ### y +/// [VarHandle][#VH_y] - [Getter][#y()] - [Setter][#y(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkXYColorEXT { +/// float x; +/// float y; +/// } VkXYColorEXT; +/// ``` +public final class VkXYColorEXT extends Struct { + /// The struct layout of `VkXYColorEXT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_FLOAT.withName("x"), + ValueLayout.JAVA_FLOAT.withName("y") + ); + /// The [VarHandle] of `x` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_x = LAYOUT.arrayElementVarHandle(PathElement.groupElement("x")); + /// The [VarHandle] of `y` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_y = LAYOUT.arrayElementVarHandle(PathElement.groupElement("y")); + + /// Creates `VkXYColorEXT` with the given segment. + /// @param segment the memory segment + public VkXYColorEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkXYColorEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkXYColorEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkXYColorEXT(segment); } + + /// Creates `VkXYColorEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkXYColorEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkXYColorEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkXYColorEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkXYColorEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkXYColorEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkXYColorEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkXYColorEXT` + public static VkXYColorEXT alloc(SegmentAllocator allocator) { return new VkXYColorEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkXYColorEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkXYColorEXT` + public static VkXYColorEXT alloc(SegmentAllocator allocator, long count) { return new VkXYColorEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `x` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_x(MemorySegment segment, long index) { return (float) VH_x.get(segment, 0L, index); } + /// {@return `x`} + /// @param segment the segment of the struct + public static @CType("float") float get_x(MemorySegment segment) { return VkXYColorEXT.get_x(segment, 0L); } + /// {@return `x` at the given index} + /// @param index the index + public @CType("float") float xAt(long index) { return VkXYColorEXT.get_x(this.segment(), index); } + /// {@return `x`} + public @CType("float") float x() { return VkXYColorEXT.get_x(this.segment()); } + /// Sets `x` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_x(MemorySegment segment, long index, @CType("float") float value) { VH_x.set(segment, 0L, index, value); } + /// Sets `x` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_x(MemorySegment segment, @CType("float") float value) { VkXYColorEXT.set_x(segment, 0L, value); } + /// Sets `x` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXYColorEXT xAt(long index, @CType("float") float value) { VkXYColorEXT.set_x(this.segment(), index, value); return this; } + /// Sets `x` with the given value. + /// @param value the value + /// @return `this` + public VkXYColorEXT x(@CType("float") float value) { VkXYColorEXT.set_x(this.segment(), value); return this; } + + /// {@return `y` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_y(MemorySegment segment, long index) { return (float) VH_y.get(segment, 0L, index); } + /// {@return `y`} + /// @param segment the segment of the struct + public static @CType("float") float get_y(MemorySegment segment) { return VkXYColorEXT.get_y(segment, 0L); } + /// {@return `y` at the given index} + /// @param index the index + public @CType("float") float yAt(long index) { return VkXYColorEXT.get_y(this.segment(), index); } + /// {@return `y`} + public @CType("float") float y() { return VkXYColorEXT.get_y(this.segment()); } + /// Sets `y` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_y(MemorySegment segment, long index, @CType("float") float value) { VH_y.set(segment, 0L, index, value); } + /// Sets `y` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_y(MemorySegment segment, @CType("float") float value) { VkXYColorEXT.set_y(segment, 0L, value); } + /// Sets `y` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXYColorEXT yAt(long index, @CType("float") float value) { VkXYColorEXT.set_y(this.segment(), index, value); return this; } + /// Sets `y` with the given value. + /// @param value the value + /// @return `this` + public VkXYColorEXT y(@CType("float") float value) { VkXYColorEXT.set_y(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/union/VkDescriptorDataEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/union/VkDescriptorDataEXT.java new file mode 100644 index 00000000..f660e0db --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/union/VkDescriptorDataEXT.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### pSampler +/// [VarHandle][#VH_pSampler] - [Getter][#pSampler()] - [Setter][#pSampler(java.lang.foreign.MemorySegment)] +/// ### pCombinedImageSampler +/// [VarHandle][#VH_pCombinedImageSampler] - [Getter][#pCombinedImageSampler()] - [Setter][#pCombinedImageSampler(java.lang.foreign.MemorySegment)] +/// ### pInputAttachmentImage +/// [VarHandle][#VH_pInputAttachmentImage] - [Getter][#pInputAttachmentImage()] - [Setter][#pInputAttachmentImage(java.lang.foreign.MemorySegment)] +/// ### pSampledImage +/// [VarHandle][#VH_pSampledImage] - [Getter][#pSampledImage()] - [Setter][#pSampledImage(java.lang.foreign.MemorySegment)] +/// ### pStorageImage +/// [VarHandle][#VH_pStorageImage] - [Getter][#pStorageImage()] - [Setter][#pStorageImage(java.lang.foreign.MemorySegment)] +/// ### pUniformTexelBuffer +/// [VarHandle][#VH_pUniformTexelBuffer] - [Getter][#pUniformTexelBuffer()] - [Setter][#pUniformTexelBuffer(java.lang.foreign.MemorySegment)] +/// ### pStorageTexelBuffer +/// [VarHandle][#VH_pStorageTexelBuffer] - [Getter][#pStorageTexelBuffer()] - [Setter][#pStorageTexelBuffer(java.lang.foreign.MemorySegment)] +/// ### pUniformBuffer +/// [VarHandle][#VH_pUniformBuffer] - [Getter][#pUniformBuffer()] - [Setter][#pUniformBuffer(java.lang.foreign.MemorySegment)] +/// ### pStorageBuffer +/// [VarHandle][#VH_pStorageBuffer] - [Getter][#pStorageBuffer()] - [Setter][#pStorageBuffer(java.lang.foreign.MemorySegment)] +/// ### accelerationStructure +/// [VarHandle][#VH_accelerationStructure] - [Getter][#accelerationStructure()] - [Setter][#accelerationStructure(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkDescriptorDataEXT { +/// const VkSampler * pSampler; +/// const VkDescriptorImageInfo * pCombinedImageSampler; +/// const VkDescriptorImageInfo * pInputAttachmentImage; +/// const VkDescriptorImageInfo * pSampledImage; +/// const VkDescriptorImageInfo * pStorageImage; +/// const VkDescriptorAddressInfoEXT * pUniformTexelBuffer; +/// const VkDescriptorAddressInfoEXT * pStorageTexelBuffer; +/// const VkDescriptorAddressInfoEXT * pUniformBuffer; +/// const VkDescriptorAddressInfoEXT * pStorageBuffer; +/// VkDeviceAddress accelerationStructure; +/// } VkDescriptorDataEXT; +/// ``` +public final class VkDescriptorDataEXT extends Union { + /// The union layout of `VkDescriptorDataEXT`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + ValueLayout.ADDRESS.withName("pSampler"), + ValueLayout.ADDRESS.withName("pCombinedImageSampler"), + ValueLayout.ADDRESS.withName("pInputAttachmentImage"), + ValueLayout.ADDRESS.withName("pSampledImage"), + ValueLayout.ADDRESS.withName("pStorageImage"), + ValueLayout.ADDRESS.withName("pUniformTexelBuffer"), + ValueLayout.ADDRESS.withName("pStorageTexelBuffer"), + ValueLayout.ADDRESS.withName("pUniformBuffer"), + ValueLayout.ADDRESS.withName("pStorageBuffer"), + ValueLayout.JAVA_LONG.withName("accelerationStructure") + ); + /// The [VarHandle] of `pSampler` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSampler = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSampler")); + /// The [VarHandle] of `pCombinedImageSampler` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCombinedImageSampler = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCombinedImageSampler")); + /// The [VarHandle] of `pInputAttachmentImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pInputAttachmentImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pInputAttachmentImage")); + /// The [VarHandle] of `pSampledImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSampledImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSampledImage")); + /// The [VarHandle] of `pStorageImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStorageImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStorageImage")); + /// The [VarHandle] of `pUniformTexelBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pUniformTexelBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pUniformTexelBuffer")); + /// The [VarHandle] of `pStorageTexelBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStorageTexelBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStorageTexelBuffer")); + /// The [VarHandle] of `pUniformBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pUniformBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pUniformBuffer")); + /// The [VarHandle] of `pStorageBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStorageBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStorageBuffer")); + /// The [VarHandle] of `accelerationStructure` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_accelerationStructure = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructure")); + + /// Creates `VkDescriptorDataEXT` with the given segment. + /// @param segment the memory segment + public VkDescriptorDataEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorDataEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorDataEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorDataEXT(segment); } + + /// Creates `VkDescriptorDataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorDataEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorDataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorDataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorDataEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorDataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorDataEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorDataEXT` + public static VkDescriptorDataEXT alloc(SegmentAllocator allocator) { return new VkDescriptorDataEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorDataEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorDataEXT` + public static VkDescriptorDataEXT alloc(SegmentAllocator allocator, long count) { return new VkDescriptorDataEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `pSampler` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSampler *") java.lang.foreign.MemorySegment get_pSampler(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSampler.get(segment, 0L, index); } + /// {@return `pSampler`} + /// @param segment the segment of the struct + public static @CType("const VkSampler *") java.lang.foreign.MemorySegment get_pSampler(MemorySegment segment) { return VkDescriptorDataEXT.get_pSampler(segment, 0L); } + /// {@return `pSampler` at the given index} + /// @param index the index + public @CType("const VkSampler *") java.lang.foreign.MemorySegment pSamplerAt(long index) { return VkDescriptorDataEXT.get_pSampler(this.segment(), index); } + /// {@return `pSampler`} + public @CType("const VkSampler *") java.lang.foreign.MemorySegment pSampler() { return VkDescriptorDataEXT.get_pSampler(this.segment()); } + /// Sets `pSampler` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSampler(MemorySegment segment, long index, @CType("const VkSampler *") java.lang.foreign.MemorySegment value) { VH_pSampler.set(segment, 0L, index, value); } + /// Sets `pSampler` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSampler(MemorySegment segment, @CType("const VkSampler *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pSampler(segment, 0L, value); } + /// Sets `pSampler` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pSamplerAt(long index, @CType("const VkSampler *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pSampler(this.segment(), index, value); return this; } + /// Sets `pSampler` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pSampler(@CType("const VkSampler *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pSampler(this.segment(), value); return this; } + + /// {@return `pCombinedImageSampler` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment get_pCombinedImageSampler(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCombinedImageSampler.get(segment, 0L, index); } + /// {@return `pCombinedImageSampler`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment get_pCombinedImageSampler(MemorySegment segment) { return VkDescriptorDataEXT.get_pCombinedImageSampler(segment, 0L); } + /// {@return `pCombinedImageSampler` at the given index} + /// @param index the index + public @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment pCombinedImageSamplerAt(long index) { return VkDescriptorDataEXT.get_pCombinedImageSampler(this.segment(), index); } + /// {@return `pCombinedImageSampler`} + public @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment pCombinedImageSampler() { return VkDescriptorDataEXT.get_pCombinedImageSampler(this.segment()); } + /// Sets `pCombinedImageSampler` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCombinedImageSampler(MemorySegment segment, long index, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VH_pCombinedImageSampler.set(segment, 0L, index, value); } + /// Sets `pCombinedImageSampler` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCombinedImageSampler(MemorySegment segment, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pCombinedImageSampler(segment, 0L, value); } + /// Sets `pCombinedImageSampler` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pCombinedImageSamplerAt(long index, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pCombinedImageSampler(this.segment(), index, value); return this; } + /// Sets `pCombinedImageSampler` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pCombinedImageSampler(@CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pCombinedImageSampler(this.segment(), value); return this; } + + /// {@return `pInputAttachmentImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment get_pInputAttachmentImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pInputAttachmentImage.get(segment, 0L, index); } + /// {@return `pInputAttachmentImage`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment get_pInputAttachmentImage(MemorySegment segment) { return VkDescriptorDataEXT.get_pInputAttachmentImage(segment, 0L); } + /// {@return `pInputAttachmentImage` at the given index} + /// @param index the index + public @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment pInputAttachmentImageAt(long index) { return VkDescriptorDataEXT.get_pInputAttachmentImage(this.segment(), index); } + /// {@return `pInputAttachmentImage`} + public @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment pInputAttachmentImage() { return VkDescriptorDataEXT.get_pInputAttachmentImage(this.segment()); } + /// Sets `pInputAttachmentImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pInputAttachmentImage(MemorySegment segment, long index, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VH_pInputAttachmentImage.set(segment, 0L, index, value); } + /// Sets `pInputAttachmentImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pInputAttachmentImage(MemorySegment segment, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pInputAttachmentImage(segment, 0L, value); } + /// Sets `pInputAttachmentImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pInputAttachmentImageAt(long index, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pInputAttachmentImage(this.segment(), index, value); return this; } + /// Sets `pInputAttachmentImage` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pInputAttachmentImage(@CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pInputAttachmentImage(this.segment(), value); return this; } + + /// {@return `pSampledImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment get_pSampledImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSampledImage.get(segment, 0L, index); } + /// {@return `pSampledImage`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment get_pSampledImage(MemorySegment segment) { return VkDescriptorDataEXT.get_pSampledImage(segment, 0L); } + /// {@return `pSampledImage` at the given index} + /// @param index the index + public @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment pSampledImageAt(long index) { return VkDescriptorDataEXT.get_pSampledImage(this.segment(), index); } + /// {@return `pSampledImage`} + public @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment pSampledImage() { return VkDescriptorDataEXT.get_pSampledImage(this.segment()); } + /// Sets `pSampledImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSampledImage(MemorySegment segment, long index, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VH_pSampledImage.set(segment, 0L, index, value); } + /// Sets `pSampledImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSampledImage(MemorySegment segment, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pSampledImage(segment, 0L, value); } + /// Sets `pSampledImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pSampledImageAt(long index, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pSampledImage(this.segment(), index, value); return this; } + /// Sets `pSampledImage` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pSampledImage(@CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pSampledImage(this.segment(), value); return this; } + + /// {@return `pStorageImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment get_pStorageImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStorageImage.get(segment, 0L, index); } + /// {@return `pStorageImage`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment get_pStorageImage(MemorySegment segment) { return VkDescriptorDataEXT.get_pStorageImage(segment, 0L); } + /// {@return `pStorageImage` at the given index} + /// @param index the index + public @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment pStorageImageAt(long index) { return VkDescriptorDataEXT.get_pStorageImage(this.segment(), index); } + /// {@return `pStorageImage`} + public @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment pStorageImage() { return VkDescriptorDataEXT.get_pStorageImage(this.segment()); } + /// Sets `pStorageImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStorageImage(MemorySegment segment, long index, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VH_pStorageImage.set(segment, 0L, index, value); } + /// Sets `pStorageImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStorageImage(MemorySegment segment, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pStorageImage(segment, 0L, value); } + /// Sets `pStorageImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pStorageImageAt(long index, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pStorageImage(this.segment(), index, value); return this; } + /// Sets `pStorageImage` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pStorageImage(@CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pStorageImage(this.segment(), value); return this; } + + /// {@return `pUniformTexelBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment get_pUniformTexelBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pUniformTexelBuffer.get(segment, 0L, index); } + /// {@return `pUniformTexelBuffer`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment get_pUniformTexelBuffer(MemorySegment segment) { return VkDescriptorDataEXT.get_pUniformTexelBuffer(segment, 0L); } + /// {@return `pUniformTexelBuffer` at the given index} + /// @param index the index + public @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment pUniformTexelBufferAt(long index) { return VkDescriptorDataEXT.get_pUniformTexelBuffer(this.segment(), index); } + /// {@return `pUniformTexelBuffer`} + public @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment pUniformTexelBuffer() { return VkDescriptorDataEXT.get_pUniformTexelBuffer(this.segment()); } + /// Sets `pUniformTexelBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pUniformTexelBuffer(MemorySegment segment, long index, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pUniformTexelBuffer.set(segment, 0L, index, value); } + /// Sets `pUniformTexelBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pUniformTexelBuffer(MemorySegment segment, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pUniformTexelBuffer(segment, 0L, value); } + /// Sets `pUniformTexelBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pUniformTexelBufferAt(long index, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pUniformTexelBuffer(this.segment(), index, value); return this; } + /// Sets `pUniformTexelBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pUniformTexelBuffer(@CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pUniformTexelBuffer(this.segment(), value); return this; } + + /// {@return `pStorageTexelBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment get_pStorageTexelBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStorageTexelBuffer.get(segment, 0L, index); } + /// {@return `pStorageTexelBuffer`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment get_pStorageTexelBuffer(MemorySegment segment) { return VkDescriptorDataEXT.get_pStorageTexelBuffer(segment, 0L); } + /// {@return `pStorageTexelBuffer` at the given index} + /// @param index the index + public @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment pStorageTexelBufferAt(long index) { return VkDescriptorDataEXT.get_pStorageTexelBuffer(this.segment(), index); } + /// {@return `pStorageTexelBuffer`} + public @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment pStorageTexelBuffer() { return VkDescriptorDataEXT.get_pStorageTexelBuffer(this.segment()); } + /// Sets `pStorageTexelBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStorageTexelBuffer(MemorySegment segment, long index, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pStorageTexelBuffer.set(segment, 0L, index, value); } + /// Sets `pStorageTexelBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStorageTexelBuffer(MemorySegment segment, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pStorageTexelBuffer(segment, 0L, value); } + /// Sets `pStorageTexelBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pStorageTexelBufferAt(long index, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pStorageTexelBuffer(this.segment(), index, value); return this; } + /// Sets `pStorageTexelBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pStorageTexelBuffer(@CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pStorageTexelBuffer(this.segment(), value); return this; } + + /// {@return `pUniformBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment get_pUniformBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pUniformBuffer.get(segment, 0L, index); } + /// {@return `pUniformBuffer`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment get_pUniformBuffer(MemorySegment segment) { return VkDescriptorDataEXT.get_pUniformBuffer(segment, 0L); } + /// {@return `pUniformBuffer` at the given index} + /// @param index the index + public @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment pUniformBufferAt(long index) { return VkDescriptorDataEXT.get_pUniformBuffer(this.segment(), index); } + /// {@return `pUniformBuffer`} + public @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment pUniformBuffer() { return VkDescriptorDataEXT.get_pUniformBuffer(this.segment()); } + /// Sets `pUniformBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pUniformBuffer(MemorySegment segment, long index, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pUniformBuffer.set(segment, 0L, index, value); } + /// Sets `pUniformBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pUniformBuffer(MemorySegment segment, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pUniformBuffer(segment, 0L, value); } + /// Sets `pUniformBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pUniformBufferAt(long index, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pUniformBuffer(this.segment(), index, value); return this; } + /// Sets `pUniformBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pUniformBuffer(@CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pUniformBuffer(this.segment(), value); return this; } + + /// {@return `pStorageBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment get_pStorageBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStorageBuffer.get(segment, 0L, index); } + /// {@return `pStorageBuffer`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment get_pStorageBuffer(MemorySegment segment) { return VkDescriptorDataEXT.get_pStorageBuffer(segment, 0L); } + /// {@return `pStorageBuffer` at the given index} + /// @param index the index + public @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment pStorageBufferAt(long index) { return VkDescriptorDataEXT.get_pStorageBuffer(this.segment(), index); } + /// {@return `pStorageBuffer`} + public @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment pStorageBuffer() { return VkDescriptorDataEXT.get_pStorageBuffer(this.segment()); } + /// Sets `pStorageBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStorageBuffer(MemorySegment segment, long index, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pStorageBuffer.set(segment, 0L, index, value); } + /// Sets `pStorageBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStorageBuffer(MemorySegment segment, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pStorageBuffer(segment, 0L, value); } + /// Sets `pStorageBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pStorageBufferAt(long index, @CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pStorageBuffer(this.segment(), index, value); return this; } + /// Sets `pStorageBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT pStorageBuffer(@CType("const VkDescriptorAddressInfoEXT *") java.lang.foreign.MemorySegment value) { VkDescriptorDataEXT.set_pStorageBuffer(this.segment(), value); return this; } + + /// {@return `accelerationStructure` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_accelerationStructure(MemorySegment segment, long index) { return (long) VH_accelerationStructure.get(segment, 0L, index); } + /// {@return `accelerationStructure`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_accelerationStructure(MemorySegment segment) { return VkDescriptorDataEXT.get_accelerationStructure(segment, 0L); } + /// {@return `accelerationStructure` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long accelerationStructureAt(long index) { return VkDescriptorDataEXT.get_accelerationStructure(this.segment(), index); } + /// {@return `accelerationStructure`} + public @CType("VkDeviceAddress") long accelerationStructure() { return VkDescriptorDataEXT.get_accelerationStructure(this.segment()); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_accelerationStructure.set(segment, 0L, index, value); } + /// Sets `accelerationStructure` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDescriptorDataEXT.set_accelerationStructure(segment, 0L, value); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT accelerationStructureAt(long index, @CType("VkDeviceAddress") long value) { VkDescriptorDataEXT.set_accelerationStructure(this.segment(), index, value); return this; } + /// Sets `accelerationStructure` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorDataEXT accelerationStructure(@CType("VkDeviceAddress") long value) { VkDescriptorDataEXT.set_accelerationStructure(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/union/VkIndirectCommandsTokenDataEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/union/VkIndirectCommandsTokenDataEXT.java new file mode 100644 index 00000000..07721159 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/union/VkIndirectCommandsTokenDataEXT.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### pPushConstant +/// [VarHandle][#VH_pPushConstant] - [Getter][#pPushConstant()] - [Setter][#pPushConstant(java.lang.foreign.MemorySegment)] +/// ### pVertexBuffer +/// [VarHandle][#VH_pVertexBuffer] - [Getter][#pVertexBuffer()] - [Setter][#pVertexBuffer(java.lang.foreign.MemorySegment)] +/// ### pIndexBuffer +/// [VarHandle][#VH_pIndexBuffer] - [Getter][#pIndexBuffer()] - [Setter][#pIndexBuffer(java.lang.foreign.MemorySegment)] +/// ### pExecutionSet +/// [VarHandle][#VH_pExecutionSet] - [Getter][#pExecutionSet()] - [Setter][#pExecutionSet(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkIndirectCommandsTokenDataEXT { +/// const VkIndirectCommandsPushConstantTokenEXT * pPushConstant; +/// const VkIndirectCommandsVertexBufferTokenEXT * pVertexBuffer; +/// const VkIndirectCommandsIndexBufferTokenEXT * pIndexBuffer; +/// const VkIndirectCommandsExecutionSetTokenEXT * pExecutionSet; +/// } VkIndirectCommandsTokenDataEXT; +/// ``` +public final class VkIndirectCommandsTokenDataEXT extends Union { + /// The union layout of `VkIndirectCommandsTokenDataEXT`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + ValueLayout.ADDRESS.withName("pPushConstant"), + ValueLayout.ADDRESS.withName("pVertexBuffer"), + ValueLayout.ADDRESS.withName("pIndexBuffer"), + ValueLayout.ADDRESS.withName("pExecutionSet") + ); + /// The [VarHandle] of `pPushConstant` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPushConstant = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPushConstant")); + /// The [VarHandle] of `pVertexBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVertexBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVertexBuffer")); + /// The [VarHandle] of `pIndexBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pIndexBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pIndexBuffer")); + /// The [VarHandle] of `pExecutionSet` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pExecutionSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pExecutionSet")); + + /// Creates `VkIndirectCommandsTokenDataEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectCommandsTokenDataEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectCommandsTokenDataEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsTokenDataEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsTokenDataEXT(segment); } + + /// Creates `VkIndirectCommandsTokenDataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsTokenDataEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsTokenDataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectCommandsTokenDataEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsTokenDataEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsTokenDataEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectCommandsTokenDataEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectCommandsTokenDataEXT` + public static VkIndirectCommandsTokenDataEXT alloc(SegmentAllocator allocator) { return new VkIndirectCommandsTokenDataEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectCommandsTokenDataEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectCommandsTokenDataEXT` + public static VkIndirectCommandsTokenDataEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectCommandsTokenDataEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `pPushConstant` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndirectCommandsPushConstantTokenEXT *") java.lang.foreign.MemorySegment get_pPushConstant(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPushConstant.get(segment, 0L, index); } + /// {@return `pPushConstant`} + /// @param segment the segment of the struct + public static @CType("const VkIndirectCommandsPushConstantTokenEXT *") java.lang.foreign.MemorySegment get_pPushConstant(MemorySegment segment) { return VkIndirectCommandsTokenDataEXT.get_pPushConstant(segment, 0L); } + /// {@return `pPushConstant` at the given index} + /// @param index the index + public @CType("const VkIndirectCommandsPushConstantTokenEXT *") java.lang.foreign.MemorySegment pPushConstantAt(long index) { return VkIndirectCommandsTokenDataEXT.get_pPushConstant(this.segment(), index); } + /// {@return `pPushConstant`} + public @CType("const VkIndirectCommandsPushConstantTokenEXT *") java.lang.foreign.MemorySegment pPushConstant() { return VkIndirectCommandsTokenDataEXT.get_pPushConstant(this.segment()); } + /// Sets `pPushConstant` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPushConstant(MemorySegment segment, long index, @CType("const VkIndirectCommandsPushConstantTokenEXT *") java.lang.foreign.MemorySegment value) { VH_pPushConstant.set(segment, 0L, index, value); } + /// Sets `pPushConstant` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPushConstant(MemorySegment segment, @CType("const VkIndirectCommandsPushConstantTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pPushConstant(segment, 0L, value); } + /// Sets `pPushConstant` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsTokenDataEXT pPushConstantAt(long index, @CType("const VkIndirectCommandsPushConstantTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pPushConstant(this.segment(), index, value); return this; } + /// Sets `pPushConstant` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsTokenDataEXT pPushConstant(@CType("const VkIndirectCommandsPushConstantTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pPushConstant(this.segment(), value); return this; } + + /// {@return `pVertexBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndirectCommandsVertexBufferTokenEXT *") java.lang.foreign.MemorySegment get_pVertexBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVertexBuffer.get(segment, 0L, index); } + /// {@return `pVertexBuffer`} + /// @param segment the segment of the struct + public static @CType("const VkIndirectCommandsVertexBufferTokenEXT *") java.lang.foreign.MemorySegment get_pVertexBuffer(MemorySegment segment) { return VkIndirectCommandsTokenDataEXT.get_pVertexBuffer(segment, 0L); } + /// {@return `pVertexBuffer` at the given index} + /// @param index the index + public @CType("const VkIndirectCommandsVertexBufferTokenEXT *") java.lang.foreign.MemorySegment pVertexBufferAt(long index) { return VkIndirectCommandsTokenDataEXT.get_pVertexBuffer(this.segment(), index); } + /// {@return `pVertexBuffer`} + public @CType("const VkIndirectCommandsVertexBufferTokenEXT *") java.lang.foreign.MemorySegment pVertexBuffer() { return VkIndirectCommandsTokenDataEXT.get_pVertexBuffer(this.segment()); } + /// Sets `pVertexBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVertexBuffer(MemorySegment segment, long index, @CType("const VkIndirectCommandsVertexBufferTokenEXT *") java.lang.foreign.MemorySegment value) { VH_pVertexBuffer.set(segment, 0L, index, value); } + /// Sets `pVertexBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVertexBuffer(MemorySegment segment, @CType("const VkIndirectCommandsVertexBufferTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pVertexBuffer(segment, 0L, value); } + /// Sets `pVertexBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsTokenDataEXT pVertexBufferAt(long index, @CType("const VkIndirectCommandsVertexBufferTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pVertexBuffer(this.segment(), index, value); return this; } + /// Sets `pVertexBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsTokenDataEXT pVertexBuffer(@CType("const VkIndirectCommandsVertexBufferTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pVertexBuffer(this.segment(), value); return this; } + + /// {@return `pIndexBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndirectCommandsIndexBufferTokenEXT *") java.lang.foreign.MemorySegment get_pIndexBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pIndexBuffer.get(segment, 0L, index); } + /// {@return `pIndexBuffer`} + /// @param segment the segment of the struct + public static @CType("const VkIndirectCommandsIndexBufferTokenEXT *") java.lang.foreign.MemorySegment get_pIndexBuffer(MemorySegment segment) { return VkIndirectCommandsTokenDataEXT.get_pIndexBuffer(segment, 0L); } + /// {@return `pIndexBuffer` at the given index} + /// @param index the index + public @CType("const VkIndirectCommandsIndexBufferTokenEXT *") java.lang.foreign.MemorySegment pIndexBufferAt(long index) { return VkIndirectCommandsTokenDataEXT.get_pIndexBuffer(this.segment(), index); } + /// {@return `pIndexBuffer`} + public @CType("const VkIndirectCommandsIndexBufferTokenEXT *") java.lang.foreign.MemorySegment pIndexBuffer() { return VkIndirectCommandsTokenDataEXT.get_pIndexBuffer(this.segment()); } + /// Sets `pIndexBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pIndexBuffer(MemorySegment segment, long index, @CType("const VkIndirectCommandsIndexBufferTokenEXT *") java.lang.foreign.MemorySegment value) { VH_pIndexBuffer.set(segment, 0L, index, value); } + /// Sets `pIndexBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pIndexBuffer(MemorySegment segment, @CType("const VkIndirectCommandsIndexBufferTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pIndexBuffer(segment, 0L, value); } + /// Sets `pIndexBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsTokenDataEXT pIndexBufferAt(long index, @CType("const VkIndirectCommandsIndexBufferTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pIndexBuffer(this.segment(), index, value); return this; } + /// Sets `pIndexBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsTokenDataEXT pIndexBuffer(@CType("const VkIndirectCommandsIndexBufferTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pIndexBuffer(this.segment(), value); return this; } + + /// {@return `pExecutionSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndirectCommandsExecutionSetTokenEXT *") java.lang.foreign.MemorySegment get_pExecutionSet(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pExecutionSet.get(segment, 0L, index); } + /// {@return `pExecutionSet`} + /// @param segment the segment of the struct + public static @CType("const VkIndirectCommandsExecutionSetTokenEXT *") java.lang.foreign.MemorySegment get_pExecutionSet(MemorySegment segment) { return VkIndirectCommandsTokenDataEXT.get_pExecutionSet(segment, 0L); } + /// {@return `pExecutionSet` at the given index} + /// @param index the index + public @CType("const VkIndirectCommandsExecutionSetTokenEXT *") java.lang.foreign.MemorySegment pExecutionSetAt(long index) { return VkIndirectCommandsTokenDataEXT.get_pExecutionSet(this.segment(), index); } + /// {@return `pExecutionSet`} + public @CType("const VkIndirectCommandsExecutionSetTokenEXT *") java.lang.foreign.MemorySegment pExecutionSet() { return VkIndirectCommandsTokenDataEXT.get_pExecutionSet(this.segment()); } + /// Sets `pExecutionSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pExecutionSet(MemorySegment segment, long index, @CType("const VkIndirectCommandsExecutionSetTokenEXT *") java.lang.foreign.MemorySegment value) { VH_pExecutionSet.set(segment, 0L, index, value); } + /// Sets `pExecutionSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pExecutionSet(MemorySegment segment, @CType("const VkIndirectCommandsExecutionSetTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pExecutionSet(segment, 0L, value); } + /// Sets `pExecutionSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsTokenDataEXT pExecutionSetAt(long index, @CType("const VkIndirectCommandsExecutionSetTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pExecutionSet(this.segment(), index, value); return this; } + /// Sets `pExecutionSet` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsTokenDataEXT pExecutionSet(@CType("const VkIndirectCommandsExecutionSetTokenEXT *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsTokenDataEXT.set_pExecutionSet(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/union/VkIndirectExecutionSetInfoEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/union/VkIndirectExecutionSetInfoEXT.java new file mode 100644 index 00000000..3726b480 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ext/union/VkIndirectExecutionSetInfoEXT.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ext.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### pPipelineInfo +/// [VarHandle][#VH_pPipelineInfo] - [Getter][#pPipelineInfo()] - [Setter][#pPipelineInfo(java.lang.foreign.MemorySegment)] +/// ### pShaderInfo +/// [VarHandle][#VH_pShaderInfo] - [Getter][#pShaderInfo()] - [Setter][#pShaderInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkIndirectExecutionSetInfoEXT { +/// const VkIndirectExecutionSetPipelineInfoEXT * pPipelineInfo; +/// const VkIndirectExecutionSetShaderInfoEXT * pShaderInfo; +/// } VkIndirectExecutionSetInfoEXT; +/// ``` +public final class VkIndirectExecutionSetInfoEXT extends Union { + /// The union layout of `VkIndirectExecutionSetInfoEXT`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + ValueLayout.ADDRESS.withName("pPipelineInfo"), + ValueLayout.ADDRESS.withName("pShaderInfo") + ); + /// The [VarHandle] of `pPipelineInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelineInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelineInfo")); + /// The [VarHandle] of `pShaderInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pShaderInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pShaderInfo")); + + /// Creates `VkIndirectExecutionSetInfoEXT` with the given segment. + /// @param segment the memory segment + public VkIndirectExecutionSetInfoEXT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectExecutionSetInfoEXT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetInfoEXT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetInfoEXT(segment); } + + /// Creates `VkIndirectExecutionSetInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetInfoEXT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectExecutionSetInfoEXT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectExecutionSetInfoEXT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectExecutionSetInfoEXT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectExecutionSetInfoEXT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectExecutionSetInfoEXT` + public static VkIndirectExecutionSetInfoEXT alloc(SegmentAllocator allocator) { return new VkIndirectExecutionSetInfoEXT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectExecutionSetInfoEXT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectExecutionSetInfoEXT` + public static VkIndirectExecutionSetInfoEXT alloc(SegmentAllocator allocator, long count) { return new VkIndirectExecutionSetInfoEXT(allocator.allocate(LAYOUT, count)); } + + /// {@return `pPipelineInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndirectExecutionSetPipelineInfoEXT *") java.lang.foreign.MemorySegment get_pPipelineInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelineInfo.get(segment, 0L, index); } + /// {@return `pPipelineInfo`} + /// @param segment the segment of the struct + public static @CType("const VkIndirectExecutionSetPipelineInfoEXT *") java.lang.foreign.MemorySegment get_pPipelineInfo(MemorySegment segment) { return VkIndirectExecutionSetInfoEXT.get_pPipelineInfo(segment, 0L); } + /// {@return `pPipelineInfo` at the given index} + /// @param index the index + public @CType("const VkIndirectExecutionSetPipelineInfoEXT *") java.lang.foreign.MemorySegment pPipelineInfoAt(long index) { return VkIndirectExecutionSetInfoEXT.get_pPipelineInfo(this.segment(), index); } + /// {@return `pPipelineInfo`} + public @CType("const VkIndirectExecutionSetPipelineInfoEXT *") java.lang.foreign.MemorySegment pPipelineInfo() { return VkIndirectExecutionSetInfoEXT.get_pPipelineInfo(this.segment()); } + /// Sets `pPipelineInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelineInfo(MemorySegment segment, long index, @CType("const VkIndirectExecutionSetPipelineInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pPipelineInfo.set(segment, 0L, index, value); } + /// Sets `pPipelineInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelineInfo(MemorySegment segment, @CType("const VkIndirectExecutionSetPipelineInfoEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetInfoEXT.set_pPipelineInfo(segment, 0L, value); } + /// Sets `pPipelineInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetInfoEXT pPipelineInfoAt(long index, @CType("const VkIndirectExecutionSetPipelineInfoEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetInfoEXT.set_pPipelineInfo(this.segment(), index, value); return this; } + /// Sets `pPipelineInfo` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetInfoEXT pPipelineInfo(@CType("const VkIndirectExecutionSetPipelineInfoEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetInfoEXT.set_pPipelineInfo(this.segment(), value); return this; } + + /// {@return `pShaderInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndirectExecutionSetShaderInfoEXT *") java.lang.foreign.MemorySegment get_pShaderInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pShaderInfo.get(segment, 0L, index); } + /// {@return `pShaderInfo`} + /// @param segment the segment of the struct + public static @CType("const VkIndirectExecutionSetShaderInfoEXT *") java.lang.foreign.MemorySegment get_pShaderInfo(MemorySegment segment) { return VkIndirectExecutionSetInfoEXT.get_pShaderInfo(segment, 0L); } + /// {@return `pShaderInfo` at the given index} + /// @param index the index + public @CType("const VkIndirectExecutionSetShaderInfoEXT *") java.lang.foreign.MemorySegment pShaderInfoAt(long index) { return VkIndirectExecutionSetInfoEXT.get_pShaderInfo(this.segment(), index); } + /// {@return `pShaderInfo`} + public @CType("const VkIndirectExecutionSetShaderInfoEXT *") java.lang.foreign.MemorySegment pShaderInfo() { return VkIndirectExecutionSetInfoEXT.get_pShaderInfo(this.segment()); } + /// Sets `pShaderInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pShaderInfo(MemorySegment segment, long index, @CType("const VkIndirectExecutionSetShaderInfoEXT *") java.lang.foreign.MemorySegment value) { VH_pShaderInfo.set(segment, 0L, index, value); } + /// Sets `pShaderInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pShaderInfo(MemorySegment segment, @CType("const VkIndirectExecutionSetShaderInfoEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetInfoEXT.set_pShaderInfo(segment, 0L, value); } + /// Sets `pShaderInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetInfoEXT pShaderInfoAt(long index, @CType("const VkIndirectExecutionSetShaderInfoEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetInfoEXT.set_pShaderInfo(this.segment(), index, value); return this; } + /// Sets `pShaderInfo` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectExecutionSetInfoEXT pShaderInfo(@CType("const VkIndirectExecutionSetShaderInfoEXT *") java.lang.foreign.MemorySegment value) { VkIndirectExecutionSetInfoEXT.set_pShaderInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIABufferCollection.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIABufferCollection.java new file mode 100644 index 00000000..5f6d3477 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIABufferCollection.java @@ -0,0 +1,94 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKFUCHSIABufferCollection { + public static final int VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001; + public static final int VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002; + public static final int VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004; + public static final int VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008; + public static final int VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010; + public static final int VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION = 2; + public static final String VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME = "VK_FUCHSIA_buffer_collection"; + public static final int VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CREATE_INFO_FUCHSIA = 1000366000; + public static final int VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA = 1000366000; + public static final int VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA = 1000366001; + public static final int VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA = 1000366002; + public static final int VK_STRUCTURE_TYPE_BUFFER_COLLECTION_PROPERTIES_FUCHSIA = 1000366003; + public static final int VK_STRUCTURE_TYPE_BUFFER_CONSTRAINTS_INFO_FUCHSIA = 1000366004; + public static final int VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA = 1000366005; + public static final int VK_STRUCTURE_TYPE_IMAGE_CONSTRAINTS_INFO_FUCHSIA = 1000366006; + public static final int VK_STRUCTURE_TYPE_IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA = 1000366007; + public static final int VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA = 1000366008; + public static final int VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA = 1000366009; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT = 1000366000; + public static final MethodHandle MH_vkCreateBufferCollectionFUCHSIA = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkSetBufferCollectionImageConstraintsFUCHSIA = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkSetBufferCollectionBufferConstraintsFUCHSIA = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyBufferCollectionFUCHSIA = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetBufferCollectionPropertiesFUCHSIA = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateBufferCollectionFUCHSIA; + public final MemorySegment PFN_vkSetBufferCollectionImageConstraintsFUCHSIA; + public final MemorySegment PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA; + public final MemorySegment PFN_vkDestroyBufferCollectionFUCHSIA; + public final MemorySegment PFN_vkGetBufferCollectionPropertiesFUCHSIA; + + public VKFUCHSIABufferCollection(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateBufferCollectionFUCHSIA = func.invoke(device, "vkCreateBufferCollectionFUCHSIA"); + PFN_vkSetBufferCollectionImageConstraintsFUCHSIA = func.invoke(device, "vkSetBufferCollectionImageConstraintsFUCHSIA"); + PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA = func.invoke(device, "vkSetBufferCollectionBufferConstraintsFUCHSIA"); + PFN_vkDestroyBufferCollectionFUCHSIA = func.invoke(device, "vkDestroyBufferCollectionFUCHSIA"); + PFN_vkGetBufferCollectionPropertiesFUCHSIA = func.invoke(device, "vkGetBufferCollectionPropertiesFUCHSIA"); + } + + public @CType("VkResult") int CreateBufferCollectionFUCHSIA(@CType("VkDevice") MemorySegment device, @CType("const VkBufferCollectionCreateInfoFUCHSIA *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkBufferCollectionFUCHSIA *") MemorySegment pCollection) { + if (Unmarshal.isNullPointer(PFN_vkCreateBufferCollectionFUCHSIA)) throw new SymbolNotFoundError("Symbol not found: vkCreateBufferCollectionFUCHSIA"); + try { return (int) MH_vkCreateBufferCollectionFUCHSIA.invokeExact(PFN_vkCreateBufferCollectionFUCHSIA, device, pCreateInfo, pAllocator, pCollection); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateBufferCollectionFUCHSIA", e); } + } + + public @CType("VkResult") int SetBufferCollectionImageConstraintsFUCHSIA(@CType("VkDevice") MemorySegment device, @CType("VkBufferCollectionFUCHSIA") MemorySegment collection, @CType("const VkImageConstraintsInfoFUCHSIA *") MemorySegment pImageConstraintsInfo) { + if (Unmarshal.isNullPointer(PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)) throw new SymbolNotFoundError("Symbol not found: vkSetBufferCollectionImageConstraintsFUCHSIA"); + try { return (int) MH_vkSetBufferCollectionImageConstraintsFUCHSIA.invokeExact(PFN_vkSetBufferCollectionImageConstraintsFUCHSIA, device, collection, pImageConstraintsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkSetBufferCollectionImageConstraintsFUCHSIA", e); } + } + + public @CType("VkResult") int SetBufferCollectionBufferConstraintsFUCHSIA(@CType("VkDevice") MemorySegment device, @CType("VkBufferCollectionFUCHSIA") MemorySegment collection, @CType("const VkBufferConstraintsInfoFUCHSIA *") MemorySegment pBufferConstraintsInfo) { + if (Unmarshal.isNullPointer(PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)) throw new SymbolNotFoundError("Symbol not found: vkSetBufferCollectionBufferConstraintsFUCHSIA"); + try { return (int) MH_vkSetBufferCollectionBufferConstraintsFUCHSIA.invokeExact(PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA, device, collection, pBufferConstraintsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkSetBufferCollectionBufferConstraintsFUCHSIA", e); } + } + + public void DestroyBufferCollectionFUCHSIA(@CType("VkDevice") MemorySegment device, @CType("VkBufferCollectionFUCHSIA") MemorySegment collection, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyBufferCollectionFUCHSIA)) throw new SymbolNotFoundError("Symbol not found: vkDestroyBufferCollectionFUCHSIA"); + try { MH_vkDestroyBufferCollectionFUCHSIA.invokeExact(PFN_vkDestroyBufferCollectionFUCHSIA, device, collection, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyBufferCollectionFUCHSIA", e); } + } + + public @CType("VkResult") int GetBufferCollectionPropertiesFUCHSIA(@CType("VkDevice") MemorySegment device, @CType("VkBufferCollectionFUCHSIA") MemorySegment collection, @CType("VkBufferCollectionPropertiesFUCHSIA *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetBufferCollectionPropertiesFUCHSIA)) throw new SymbolNotFoundError("Symbol not found: vkGetBufferCollectionPropertiesFUCHSIA"); + try { return (int) MH_vkGetBufferCollectionPropertiesFUCHSIA.invokeExact(PFN_vkGetBufferCollectionPropertiesFUCHSIA, device, collection, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetBufferCollectionPropertiesFUCHSIA", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIAExternalMemory.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIAExternalMemory.java new file mode 100644 index 00000000..5bbceb88 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIAExternalMemory.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKFUCHSIAExternalMemory { + public static final int VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION = 1; + public static final String VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_FUCHSIA_external_memory"; + public static final int VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364000; + public static final int VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA = 1000364001; + public static final int VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364002; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA = 0x00000800; + public static final MethodHandle MH_vkGetMemoryZirconHandleFUCHSIA = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetMemoryZirconHandlePropertiesFUCHSIA = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetMemoryZirconHandleFUCHSIA; + public final MemorySegment PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA; + + public VKFUCHSIAExternalMemory(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetMemoryZirconHandleFUCHSIA = func.invoke(device, "vkGetMemoryZirconHandleFUCHSIA"); + PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA = func.invoke(device, "vkGetMemoryZirconHandlePropertiesFUCHSIA"); + } + + public @CType("VkResult") int GetMemoryZirconHandleFUCHSIA(@CType("VkDevice") MemorySegment device, @CType("const VkMemoryGetZirconHandleInfoFUCHSIA *") MemorySegment pGetZirconHandleInfo, @CType("zx_handle_t *") MemorySegment pZirconHandle) { + if (Unmarshal.isNullPointer(PFN_vkGetMemoryZirconHandleFUCHSIA)) throw new SymbolNotFoundError("Symbol not found: vkGetMemoryZirconHandleFUCHSIA"); + try { return (int) MH_vkGetMemoryZirconHandleFUCHSIA.invokeExact(PFN_vkGetMemoryZirconHandleFUCHSIA, device, pGetZirconHandleInfo, pZirconHandle); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMemoryZirconHandleFUCHSIA", e); } + } + + public @CType("VkResult") int GetMemoryZirconHandlePropertiesFUCHSIA(@CType("VkDevice") MemorySegment device, @CType("VkExternalMemoryHandleTypeFlagBits") int handleType, @CType("zx_handle_t") int zirconHandle, @CType("VkMemoryZirconHandlePropertiesFUCHSIA *") MemorySegment pMemoryZirconHandleProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)) throw new SymbolNotFoundError("Symbol not found: vkGetMemoryZirconHandlePropertiesFUCHSIA"); + try { return (int) MH_vkGetMemoryZirconHandlePropertiesFUCHSIA.invokeExact(PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA, device, handleType, zirconHandle, pMemoryZirconHandleProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMemoryZirconHandlePropertiesFUCHSIA", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIAExternalSemaphore.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIAExternalSemaphore.java new file mode 100644 index 00000000..490540c0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIAExternalSemaphore.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKFUCHSIAExternalSemaphore { + public static final int VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION = 1; + public static final String VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_FUCHSIA_external_semaphore"; + public static final int VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365000; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365001; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA = 0x00000080; + public static final MethodHandle MH_vkImportSemaphoreZirconHandleFUCHSIA = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetSemaphoreZirconHandleFUCHSIA = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkImportSemaphoreZirconHandleFUCHSIA; + public final MemorySegment PFN_vkGetSemaphoreZirconHandleFUCHSIA; + + public VKFUCHSIAExternalSemaphore(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkImportSemaphoreZirconHandleFUCHSIA = func.invoke(device, "vkImportSemaphoreZirconHandleFUCHSIA"); + PFN_vkGetSemaphoreZirconHandleFUCHSIA = func.invoke(device, "vkGetSemaphoreZirconHandleFUCHSIA"); + } + + public @CType("VkResult") int ImportSemaphoreZirconHandleFUCHSIA(@CType("VkDevice") MemorySegment device, @CType("const VkImportSemaphoreZirconHandleInfoFUCHSIA *") MemorySegment pImportSemaphoreZirconHandleInfo) { + if (Unmarshal.isNullPointer(PFN_vkImportSemaphoreZirconHandleFUCHSIA)) throw new SymbolNotFoundError("Symbol not found: vkImportSemaphoreZirconHandleFUCHSIA"); + try { return (int) MH_vkImportSemaphoreZirconHandleFUCHSIA.invokeExact(PFN_vkImportSemaphoreZirconHandleFUCHSIA, device, pImportSemaphoreZirconHandleInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkImportSemaphoreZirconHandleFUCHSIA", e); } + } + + public @CType("VkResult") int GetSemaphoreZirconHandleFUCHSIA(@CType("VkDevice") MemorySegment device, @CType("const VkSemaphoreGetZirconHandleInfoFUCHSIA *") MemorySegment pGetZirconHandleInfo, @CType("zx_handle_t *") MemorySegment pZirconHandle) { + if (Unmarshal.isNullPointer(PFN_vkGetSemaphoreZirconHandleFUCHSIA)) throw new SymbolNotFoundError("Symbol not found: vkGetSemaphoreZirconHandleFUCHSIA"); + try { return (int) MH_vkGetSemaphoreZirconHandleFUCHSIA.invokeExact(PFN_vkGetSemaphoreZirconHandleFUCHSIA, device, pGetZirconHandleInfo, pZirconHandle); } + catch (Throwable e) { throw new RuntimeException("error in vkGetSemaphoreZirconHandleFUCHSIA", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIAImagepipeSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIAImagepipeSurface.java new file mode 100644 index 00000000..661ae301 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/VKFUCHSIAImagepipeSurface.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKFUCHSIAImagepipeSurface { + public static final int VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION = 1; + public static final String VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME = "VK_FUCHSIA_imagepipe_surface"; + public static final int VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000; + public static final MethodHandle MH_vkCreateImagePipeSurfaceFUCHSIA = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateImagePipeSurfaceFUCHSIA; + + public VKFUCHSIAImagepipeSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateImagePipeSurfaceFUCHSIA = func.invoke(instance, "vkCreateImagePipeSurfaceFUCHSIA"); + } + + public @CType("VkResult") int CreateImagePipeSurfaceFUCHSIA(@CType("VkInstance") MemorySegment instance, @CType("const VkImagePipeSurfaceCreateInfoFUCHSIA *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateImagePipeSurfaceFUCHSIA)) throw new SymbolNotFoundError("Symbol not found: vkCreateImagePipeSurfaceFUCHSIA"); + try { return (int) MH_vkCreateImagePipeSurfaceFUCHSIA.invokeExact(PFN_vkCreateImagePipeSurfaceFUCHSIA, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateImagePipeSurfaceFUCHSIA", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionBufferCreateInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionBufferCreateInfoFUCHSIA.java new file mode 100644 index 00000000..4101d8ab --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionBufferCreateInfoFUCHSIA.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### collection +/// [VarHandle][#VH_collection] - [Getter][#collection()] - [Setter][#collection(java.lang.foreign.MemorySegment)] +/// ### index +/// [VarHandle][#VH_index] - [Getter][#index()] - [Setter][#index(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferCollectionBufferCreateInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// VkBufferCollectionFUCHSIA collection; +/// uint32_t index; +/// } VkBufferCollectionBufferCreateInfoFUCHSIA; +/// ``` +public final class VkBufferCollectionBufferCreateInfoFUCHSIA extends Struct { + /// The struct layout of `VkBufferCollectionBufferCreateInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("collection"), + ValueLayout.JAVA_INT.withName("index") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `collection` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_collection = LAYOUT.arrayElementVarHandle(PathElement.groupElement("collection")); + /// The [VarHandle] of `index` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_index = LAYOUT.arrayElementVarHandle(PathElement.groupElement("index")); + + /// Creates `VkBufferCollectionBufferCreateInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkBufferCollectionBufferCreateInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferCollectionBufferCreateInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionBufferCreateInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionBufferCreateInfoFUCHSIA(segment); } + + /// Creates `VkBufferCollectionBufferCreateInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionBufferCreateInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionBufferCreateInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferCollectionBufferCreateInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionBufferCreateInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionBufferCreateInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferCollectionBufferCreateInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferCollectionBufferCreateInfoFUCHSIA` + public static VkBufferCollectionBufferCreateInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkBufferCollectionBufferCreateInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferCollectionBufferCreateInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferCollectionBufferCreateInfoFUCHSIA` + public static VkBufferCollectionBufferCreateInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkBufferCollectionBufferCreateInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionBufferCreateInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionBufferCreateInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionBufferCreateInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionBufferCreateInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `collection` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment get_collection(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_collection.get(segment, 0L, index); } + /// {@return `collection`} + /// @param segment the segment of the struct + public static @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment get_collection(MemorySegment segment) { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_collection(segment, 0L); } + /// {@return `collection` at the given index} + /// @param index the index + public @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment collectionAt(long index) { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_collection(this.segment(), index); } + /// {@return `collection`} + public @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment collection() { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_collection(this.segment()); } + /// Sets `collection` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_collection(MemorySegment segment, long index, @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VH_collection.set(segment, 0L, index, value); } + /// Sets `collection` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_collection(MemorySegment segment, @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_collection(segment, 0L, value); } + /// Sets `collection` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionBufferCreateInfoFUCHSIA collectionAt(long index, @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_collection(this.segment(), index, value); return this; } + /// Sets `collection` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionBufferCreateInfoFUCHSIA collection(@CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_collection(this.segment(), value); return this; } + + /// {@return `index` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_index(MemorySegment segment, long index) { return (int) VH_index.get(segment, 0L, index); } + /// {@return `index`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_index(MemorySegment segment) { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_index(segment, 0L); } + /// {@return `index` at the given index} + /// @param index the index + public @CType("uint32_t") int indexAt(long index) { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_index(this.segment(), index); } + /// {@return `index`} + public @CType("uint32_t") int index() { return VkBufferCollectionBufferCreateInfoFUCHSIA.get_index(this.segment()); } + /// Sets `index` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_index(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_index.set(segment, 0L, index, value); } + /// Sets `index` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_index(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_index(segment, 0L, value); } + /// Sets `index` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionBufferCreateInfoFUCHSIA indexAt(long index, @CType("uint32_t") int value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_index(this.segment(), index, value); return this; } + /// Sets `index` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionBufferCreateInfoFUCHSIA index(@CType("uint32_t") int value) { VkBufferCollectionBufferCreateInfoFUCHSIA.set_index(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionConstraintsInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionConstraintsInfoFUCHSIA.java new file mode 100644 index 00000000..0a703385 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionConstraintsInfoFUCHSIA.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minBufferCount +/// [VarHandle][#VH_minBufferCount] - [Getter][#minBufferCount()] - [Setter][#minBufferCount(int)] +/// ### maxBufferCount +/// [VarHandle][#VH_maxBufferCount] - [Getter][#maxBufferCount()] - [Setter][#maxBufferCount(int)] +/// ### minBufferCountForCamping +/// [VarHandle][#VH_minBufferCountForCamping] - [Getter][#minBufferCountForCamping()] - [Setter][#minBufferCountForCamping(int)] +/// ### minBufferCountForDedicatedSlack +/// [VarHandle][#VH_minBufferCountForDedicatedSlack] - [Getter][#minBufferCountForDedicatedSlack()] - [Setter][#minBufferCountForDedicatedSlack(int)] +/// ### minBufferCountForSharedSlack +/// [VarHandle][#VH_minBufferCountForSharedSlack] - [Getter][#minBufferCountForSharedSlack()] - [Setter][#minBufferCountForSharedSlack(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferCollectionConstraintsInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t minBufferCount; +/// uint32_t maxBufferCount; +/// uint32_t minBufferCountForCamping; +/// uint32_t minBufferCountForDedicatedSlack; +/// uint32_t minBufferCountForSharedSlack; +/// } VkBufferCollectionConstraintsInfoFUCHSIA; +/// ``` +public final class VkBufferCollectionConstraintsInfoFUCHSIA extends Struct { + /// The struct layout of `VkBufferCollectionConstraintsInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("minBufferCount"), + ValueLayout.JAVA_INT.withName("maxBufferCount"), + ValueLayout.JAVA_INT.withName("minBufferCountForCamping"), + ValueLayout.JAVA_INT.withName("minBufferCountForDedicatedSlack"), + ValueLayout.JAVA_INT.withName("minBufferCountForSharedSlack") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minBufferCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minBufferCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minBufferCount")); + /// The [VarHandle] of `maxBufferCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxBufferCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBufferCount")); + /// The [VarHandle] of `minBufferCountForCamping` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minBufferCountForCamping = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minBufferCountForCamping")); + /// The [VarHandle] of `minBufferCountForDedicatedSlack` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minBufferCountForDedicatedSlack = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minBufferCountForDedicatedSlack")); + /// The [VarHandle] of `minBufferCountForSharedSlack` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minBufferCountForSharedSlack = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minBufferCountForSharedSlack")); + + /// Creates `VkBufferCollectionConstraintsInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkBufferCollectionConstraintsInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferCollectionConstraintsInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionConstraintsInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionConstraintsInfoFUCHSIA(segment); } + + /// Creates `VkBufferCollectionConstraintsInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionConstraintsInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionConstraintsInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferCollectionConstraintsInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionConstraintsInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionConstraintsInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferCollectionConstraintsInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferCollectionConstraintsInfoFUCHSIA` + public static VkBufferCollectionConstraintsInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkBufferCollectionConstraintsInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferCollectionConstraintsInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferCollectionConstraintsInfoFUCHSIA` + public static VkBufferCollectionConstraintsInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkBufferCollectionConstraintsInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferCollectionConstraintsInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferCollectionConstraintsInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `minBufferCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minBufferCount(MemorySegment segment, long index) { return (int) VH_minBufferCount.get(segment, 0L, index); } + /// {@return `minBufferCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minBufferCount(MemorySegment segment) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCount(segment, 0L); } + /// {@return `minBufferCount` at the given index} + /// @param index the index + public @CType("uint32_t") int minBufferCountAt(long index) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCount(this.segment(), index); } + /// {@return `minBufferCount`} + public @CType("uint32_t") int minBufferCount() { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCount(this.segment()); } + /// Sets `minBufferCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minBufferCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minBufferCount.set(segment, 0L, index, value); } + /// Sets `minBufferCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minBufferCount(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCount(segment, 0L, value); } + /// Sets `minBufferCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA minBufferCountAt(long index, @CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCount(this.segment(), index, value); return this; } + /// Sets `minBufferCount` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA minBufferCount(@CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCount(this.segment(), value); return this; } + + /// {@return `maxBufferCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxBufferCount(MemorySegment segment, long index) { return (int) VH_maxBufferCount.get(segment, 0L, index); } + /// {@return `maxBufferCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxBufferCount(MemorySegment segment) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_maxBufferCount(segment, 0L); } + /// {@return `maxBufferCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxBufferCountAt(long index) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_maxBufferCount(this.segment(), index); } + /// {@return `maxBufferCount`} + public @CType("uint32_t") int maxBufferCount() { return VkBufferCollectionConstraintsInfoFUCHSIA.get_maxBufferCount(this.segment()); } + /// Sets `maxBufferCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBufferCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxBufferCount.set(segment, 0L, index, value); } + /// Sets `maxBufferCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBufferCount(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_maxBufferCount(segment, 0L, value); } + /// Sets `maxBufferCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA maxBufferCountAt(long index, @CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_maxBufferCount(this.segment(), index, value); return this; } + /// Sets `maxBufferCount` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA maxBufferCount(@CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_maxBufferCount(this.segment(), value); return this; } + + /// {@return `minBufferCountForCamping` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minBufferCountForCamping(MemorySegment segment, long index) { return (int) VH_minBufferCountForCamping.get(segment, 0L, index); } + /// {@return `minBufferCountForCamping`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minBufferCountForCamping(MemorySegment segment) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCountForCamping(segment, 0L); } + /// {@return `minBufferCountForCamping` at the given index} + /// @param index the index + public @CType("uint32_t") int minBufferCountForCampingAt(long index) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCountForCamping(this.segment(), index); } + /// {@return `minBufferCountForCamping`} + public @CType("uint32_t") int minBufferCountForCamping() { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCountForCamping(this.segment()); } + /// Sets `minBufferCountForCamping` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minBufferCountForCamping(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minBufferCountForCamping.set(segment, 0L, index, value); } + /// Sets `minBufferCountForCamping` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minBufferCountForCamping(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCountForCamping(segment, 0L, value); } + /// Sets `minBufferCountForCamping` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA minBufferCountForCampingAt(long index, @CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCountForCamping(this.segment(), index, value); return this; } + /// Sets `minBufferCountForCamping` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA minBufferCountForCamping(@CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCountForCamping(this.segment(), value); return this; } + + /// {@return `minBufferCountForDedicatedSlack` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minBufferCountForDedicatedSlack(MemorySegment segment, long index) { return (int) VH_minBufferCountForDedicatedSlack.get(segment, 0L, index); } + /// {@return `minBufferCountForDedicatedSlack`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minBufferCountForDedicatedSlack(MemorySegment segment) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCountForDedicatedSlack(segment, 0L); } + /// {@return `minBufferCountForDedicatedSlack` at the given index} + /// @param index the index + public @CType("uint32_t") int minBufferCountForDedicatedSlackAt(long index) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCountForDedicatedSlack(this.segment(), index); } + /// {@return `minBufferCountForDedicatedSlack`} + public @CType("uint32_t") int minBufferCountForDedicatedSlack() { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCountForDedicatedSlack(this.segment()); } + /// Sets `minBufferCountForDedicatedSlack` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minBufferCountForDedicatedSlack(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minBufferCountForDedicatedSlack.set(segment, 0L, index, value); } + /// Sets `minBufferCountForDedicatedSlack` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minBufferCountForDedicatedSlack(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCountForDedicatedSlack(segment, 0L, value); } + /// Sets `minBufferCountForDedicatedSlack` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA minBufferCountForDedicatedSlackAt(long index, @CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCountForDedicatedSlack(this.segment(), index, value); return this; } + /// Sets `minBufferCountForDedicatedSlack` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA minBufferCountForDedicatedSlack(@CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCountForDedicatedSlack(this.segment(), value); return this; } + + /// {@return `minBufferCountForSharedSlack` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minBufferCountForSharedSlack(MemorySegment segment, long index) { return (int) VH_minBufferCountForSharedSlack.get(segment, 0L, index); } + /// {@return `minBufferCountForSharedSlack`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minBufferCountForSharedSlack(MemorySegment segment) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCountForSharedSlack(segment, 0L); } + /// {@return `minBufferCountForSharedSlack` at the given index} + /// @param index the index + public @CType("uint32_t") int minBufferCountForSharedSlackAt(long index) { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCountForSharedSlack(this.segment(), index); } + /// {@return `minBufferCountForSharedSlack`} + public @CType("uint32_t") int minBufferCountForSharedSlack() { return VkBufferCollectionConstraintsInfoFUCHSIA.get_minBufferCountForSharedSlack(this.segment()); } + /// Sets `minBufferCountForSharedSlack` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minBufferCountForSharedSlack(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minBufferCountForSharedSlack.set(segment, 0L, index, value); } + /// Sets `minBufferCountForSharedSlack` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minBufferCountForSharedSlack(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCountForSharedSlack(segment, 0L, value); } + /// Sets `minBufferCountForSharedSlack` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA minBufferCountForSharedSlackAt(long index, @CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCountForSharedSlack(this.segment(), index, value); return this; } + /// Sets `minBufferCountForSharedSlack` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionConstraintsInfoFUCHSIA minBufferCountForSharedSlack(@CType("uint32_t") int value) { VkBufferCollectionConstraintsInfoFUCHSIA.set_minBufferCountForSharedSlack(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionCreateInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionCreateInfoFUCHSIA.java new file mode 100644 index 00000000..0b5d7a3d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionCreateInfoFUCHSIA.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### collectionToken +/// [VarHandle][#VH_collectionToken] - [Getter][#collectionToken()] - [Setter][#collectionToken(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferCollectionCreateInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// zx_handle_t collectionToken; +/// } VkBufferCollectionCreateInfoFUCHSIA; +/// ``` +public final class VkBufferCollectionCreateInfoFUCHSIA extends Struct { + /// The struct layout of `VkBufferCollectionCreateInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("collectionToken") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `collectionToken` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_collectionToken = LAYOUT.arrayElementVarHandle(PathElement.groupElement("collectionToken")); + + /// Creates `VkBufferCollectionCreateInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkBufferCollectionCreateInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferCollectionCreateInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionCreateInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionCreateInfoFUCHSIA(segment); } + + /// Creates `VkBufferCollectionCreateInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionCreateInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionCreateInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferCollectionCreateInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionCreateInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionCreateInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferCollectionCreateInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferCollectionCreateInfoFUCHSIA` + public static VkBufferCollectionCreateInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkBufferCollectionCreateInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferCollectionCreateInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferCollectionCreateInfoFUCHSIA` + public static VkBufferCollectionCreateInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkBufferCollectionCreateInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferCollectionCreateInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferCollectionCreateInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferCollectionCreateInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferCollectionCreateInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionCreateInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferCollectionCreateInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionCreateInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkBufferCollectionCreateInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferCollectionCreateInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferCollectionCreateInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferCollectionCreateInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionCreateInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionCreateInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionCreateInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionCreateInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionCreateInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `collectionToken` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("zx_handle_t") int get_collectionToken(MemorySegment segment, long index) { return (int) VH_collectionToken.get(segment, 0L, index); } + /// {@return `collectionToken`} + /// @param segment the segment of the struct + public static @CType("zx_handle_t") int get_collectionToken(MemorySegment segment) { return VkBufferCollectionCreateInfoFUCHSIA.get_collectionToken(segment, 0L); } + /// {@return `collectionToken` at the given index} + /// @param index the index + public @CType("zx_handle_t") int collectionTokenAt(long index) { return VkBufferCollectionCreateInfoFUCHSIA.get_collectionToken(this.segment(), index); } + /// {@return `collectionToken`} + public @CType("zx_handle_t") int collectionToken() { return VkBufferCollectionCreateInfoFUCHSIA.get_collectionToken(this.segment()); } + /// Sets `collectionToken` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_collectionToken(MemorySegment segment, long index, @CType("zx_handle_t") int value) { VH_collectionToken.set(segment, 0L, index, value); } + /// Sets `collectionToken` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_collectionToken(MemorySegment segment, @CType("zx_handle_t") int value) { VkBufferCollectionCreateInfoFUCHSIA.set_collectionToken(segment, 0L, value); } + /// Sets `collectionToken` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionCreateInfoFUCHSIA collectionTokenAt(long index, @CType("zx_handle_t") int value) { VkBufferCollectionCreateInfoFUCHSIA.set_collectionToken(this.segment(), index, value); return this; } + /// Sets `collectionToken` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionCreateInfoFUCHSIA collectionToken(@CType("zx_handle_t") int value) { VkBufferCollectionCreateInfoFUCHSIA.set_collectionToken(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionImageCreateInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionImageCreateInfoFUCHSIA.java new file mode 100644 index 00000000..22e3b1c4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionImageCreateInfoFUCHSIA.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### collection +/// [VarHandle][#VH_collection] - [Getter][#collection()] - [Setter][#collection(java.lang.foreign.MemorySegment)] +/// ### index +/// [VarHandle][#VH_index] - [Getter][#index()] - [Setter][#index(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferCollectionImageCreateInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// VkBufferCollectionFUCHSIA collection; +/// uint32_t index; +/// } VkBufferCollectionImageCreateInfoFUCHSIA; +/// ``` +public final class VkBufferCollectionImageCreateInfoFUCHSIA extends Struct { + /// The struct layout of `VkBufferCollectionImageCreateInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("collection"), + ValueLayout.JAVA_INT.withName("index") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `collection` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_collection = LAYOUT.arrayElementVarHandle(PathElement.groupElement("collection")); + /// The [VarHandle] of `index` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_index = LAYOUT.arrayElementVarHandle(PathElement.groupElement("index")); + + /// Creates `VkBufferCollectionImageCreateInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkBufferCollectionImageCreateInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferCollectionImageCreateInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionImageCreateInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionImageCreateInfoFUCHSIA(segment); } + + /// Creates `VkBufferCollectionImageCreateInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionImageCreateInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionImageCreateInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferCollectionImageCreateInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionImageCreateInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionImageCreateInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferCollectionImageCreateInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferCollectionImageCreateInfoFUCHSIA` + public static VkBufferCollectionImageCreateInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkBufferCollectionImageCreateInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferCollectionImageCreateInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferCollectionImageCreateInfoFUCHSIA` + public static VkBufferCollectionImageCreateInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkBufferCollectionImageCreateInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferCollectionImageCreateInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferCollectionImageCreateInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferCollectionImageCreateInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionImageCreateInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionImageCreateInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferCollectionImageCreateInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferCollectionImageCreateInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferCollectionImageCreateInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionImageCreateInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionImageCreateInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `collection` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment get_collection(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_collection.get(segment, 0L, index); } + /// {@return `collection`} + /// @param segment the segment of the struct + public static @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment get_collection(MemorySegment segment) { return VkBufferCollectionImageCreateInfoFUCHSIA.get_collection(segment, 0L); } + /// {@return `collection` at the given index} + /// @param index the index + public @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment collectionAt(long index) { return VkBufferCollectionImageCreateInfoFUCHSIA.get_collection(this.segment(), index); } + /// {@return `collection`} + public @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment collection() { return VkBufferCollectionImageCreateInfoFUCHSIA.get_collection(this.segment()); } + /// Sets `collection` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_collection(MemorySegment segment, long index, @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VH_collection.set(segment, 0L, index, value); } + /// Sets `collection` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_collection(MemorySegment segment, @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_collection(segment, 0L, value); } + /// Sets `collection` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionImageCreateInfoFUCHSIA collectionAt(long index, @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_collection(this.segment(), index, value); return this; } + /// Sets `collection` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionImageCreateInfoFUCHSIA collection(@CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_collection(this.segment(), value); return this; } + + /// {@return `index` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_index(MemorySegment segment, long index) { return (int) VH_index.get(segment, 0L, index); } + /// {@return `index`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_index(MemorySegment segment) { return VkBufferCollectionImageCreateInfoFUCHSIA.get_index(segment, 0L); } + /// {@return `index` at the given index} + /// @param index the index + public @CType("uint32_t") int indexAt(long index) { return VkBufferCollectionImageCreateInfoFUCHSIA.get_index(this.segment(), index); } + /// {@return `index`} + public @CType("uint32_t") int index() { return VkBufferCollectionImageCreateInfoFUCHSIA.get_index(this.segment()); } + /// Sets `index` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_index(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_index.set(segment, 0L, index, value); } + /// Sets `index` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_index(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_index(segment, 0L, value); } + /// Sets `index` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionImageCreateInfoFUCHSIA indexAt(long index, @CType("uint32_t") int value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_index(this.segment(), index, value); return this; } + /// Sets `index` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionImageCreateInfoFUCHSIA index(@CType("uint32_t") int value) { VkBufferCollectionImageCreateInfoFUCHSIA.set_index(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionPropertiesFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionPropertiesFUCHSIA.java new file mode 100644 index 00000000..9799fbac --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferCollectionPropertiesFUCHSIA.java @@ -0,0 +1,559 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryTypeBits +/// [VarHandle][#VH_memoryTypeBits] - [Getter][#memoryTypeBits()] - [Setter][#memoryTypeBits(int)] +/// ### bufferCount +/// [VarHandle][#VH_bufferCount] - [Getter][#bufferCount()] - [Setter][#bufferCount(int)] +/// ### createInfoIndex +/// [VarHandle][#VH_createInfoIndex] - [Getter][#createInfoIndex()] - [Setter][#createInfoIndex(int)] +/// ### sysmemPixelFormat +/// [VarHandle][#VH_sysmemPixelFormat] - [Getter][#sysmemPixelFormat()] - [Setter][#sysmemPixelFormat(long)] +/// ### formatFeatures +/// [VarHandle][#VH_formatFeatures] - [Getter][#formatFeatures()] - [Setter][#formatFeatures(int)] +/// ### sysmemColorSpaceIndex +/// [Byte offset][#OFFSET_sysmemColorSpaceIndex] - [Memory layout][#ML_sysmemColorSpaceIndex] - [Getter][#sysmemColorSpaceIndex()] - [Setter][#sysmemColorSpaceIndex(java.lang.foreign.MemorySegment)] +/// ### samplerYcbcrConversionComponents +/// [Byte offset][#OFFSET_samplerYcbcrConversionComponents] - [Memory layout][#ML_samplerYcbcrConversionComponents] - [Getter][#samplerYcbcrConversionComponents()] - [Setter][#samplerYcbcrConversionComponents(java.lang.foreign.MemorySegment)] +/// ### suggestedYcbcrModel +/// [VarHandle][#VH_suggestedYcbcrModel] - [Getter][#suggestedYcbcrModel()] - [Setter][#suggestedYcbcrModel(int)] +/// ### suggestedYcbcrRange +/// [VarHandle][#VH_suggestedYcbcrRange] - [Getter][#suggestedYcbcrRange()] - [Setter][#suggestedYcbcrRange(int)] +/// ### suggestedXChromaOffset +/// [VarHandle][#VH_suggestedXChromaOffset] - [Getter][#suggestedXChromaOffset()] - [Setter][#suggestedXChromaOffset(int)] +/// ### suggestedYChromaOffset +/// [VarHandle][#VH_suggestedYChromaOffset] - [Getter][#suggestedYChromaOffset()] - [Setter][#suggestedYChromaOffset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferCollectionPropertiesFUCHSIA { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t memoryTypeBits; +/// uint32_t bufferCount; +/// uint32_t createInfoIndex; +/// uint64_t sysmemPixelFormat; +/// VkFormatFeatureFlags formatFeatures; +/// VkSysmemColorSpaceFUCHSIA sysmemColorSpaceIndex; +/// VkComponentMapping samplerYcbcrConversionComponents; +/// VkSamplerYcbcrModelConversion suggestedYcbcrModel; +/// VkSamplerYcbcrRange suggestedYcbcrRange; +/// VkChromaLocation suggestedXChromaOffset; +/// VkChromaLocation suggestedYChromaOffset; +/// } VkBufferCollectionPropertiesFUCHSIA; +/// ``` +public final class VkBufferCollectionPropertiesFUCHSIA extends Struct { + /// The struct layout of `VkBufferCollectionPropertiesFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryTypeBits"), + ValueLayout.JAVA_INT.withName("bufferCount"), + ValueLayout.JAVA_INT.withName("createInfoIndex"), + ValueLayout.JAVA_LONG.withName("sysmemPixelFormat"), + ValueLayout.JAVA_INT.withName("formatFeatures"), + overrungl.vulkan.fuchsia.struct.VkSysmemColorSpaceFUCHSIA.LAYOUT.withName("sysmemColorSpaceIndex"), + overrungl.vulkan.struct.VkComponentMapping.LAYOUT.withName("samplerYcbcrConversionComponents"), + ValueLayout.JAVA_INT.withName("suggestedYcbcrModel"), + ValueLayout.JAVA_INT.withName("suggestedYcbcrRange"), + ValueLayout.JAVA_INT.withName("suggestedXChromaOffset"), + ValueLayout.JAVA_INT.withName("suggestedYChromaOffset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryTypeBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeBits")); + /// The [VarHandle] of `bufferCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferCount")); + /// The [VarHandle] of `createInfoIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_createInfoIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("createInfoIndex")); + /// The [VarHandle] of `sysmemPixelFormat` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_sysmemPixelFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sysmemPixelFormat")); + /// The [VarHandle] of `formatFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_formatFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("formatFeatures")); + /// The byte offset of `sysmemColorSpaceIndex`. + public static final long OFFSET_sysmemColorSpaceIndex = LAYOUT.byteOffset(PathElement.groupElement("sysmemColorSpaceIndex")); + /// The memory layout of `sysmemColorSpaceIndex`. + public static final MemoryLayout ML_sysmemColorSpaceIndex = LAYOUT.select(PathElement.groupElement("sysmemColorSpaceIndex")); + /// The byte offset of `samplerYcbcrConversionComponents`. + public static final long OFFSET_samplerYcbcrConversionComponents = LAYOUT.byteOffset(PathElement.groupElement("samplerYcbcrConversionComponents")); + /// The memory layout of `samplerYcbcrConversionComponents`. + public static final MemoryLayout ML_samplerYcbcrConversionComponents = LAYOUT.select(PathElement.groupElement("samplerYcbcrConversionComponents")); + /// The [VarHandle] of `suggestedYcbcrModel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYcbcrModel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYcbcrModel")); + /// The [VarHandle] of `suggestedYcbcrRange` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYcbcrRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYcbcrRange")); + /// The [VarHandle] of `suggestedXChromaOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedXChromaOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedXChromaOffset")); + /// The [VarHandle] of `suggestedYChromaOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYChromaOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYChromaOffset")); + + /// Creates `VkBufferCollectionPropertiesFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkBufferCollectionPropertiesFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferCollectionPropertiesFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionPropertiesFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionPropertiesFUCHSIA(segment); } + + /// Creates `VkBufferCollectionPropertiesFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionPropertiesFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionPropertiesFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferCollectionPropertiesFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCollectionPropertiesFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCollectionPropertiesFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferCollectionPropertiesFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferCollectionPropertiesFUCHSIA` + public static VkBufferCollectionPropertiesFUCHSIA alloc(SegmentAllocator allocator) { return new VkBufferCollectionPropertiesFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferCollectionPropertiesFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferCollectionPropertiesFUCHSIA` + public static VkBufferCollectionPropertiesFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkBufferCollectionPropertiesFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferCollectionPropertiesFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferCollectionPropertiesFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferCollectionPropertiesFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA sType(@CType("VkStructureType") int value) { VkBufferCollectionPropertiesFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkBufferCollectionPropertiesFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionPropertiesFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionPropertiesFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkBufferCollectionPropertiesFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryTypeBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment, long index) { return (int) VH_memoryTypeBits.get(segment, 0L, index); } + /// {@return `memoryTypeBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_memoryTypeBits(segment, 0L); } + /// {@return `memoryTypeBits` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeBitsAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_memoryTypeBits(this.segment(), index); } + /// {@return `memoryTypeBits`} + public @CType("uint32_t") int memoryTypeBits() { return VkBufferCollectionPropertiesFUCHSIA.get_memoryTypeBits(this.segment()); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeBits.set(segment, 0L, index, value); } + /// Sets `memoryTypeBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCollectionPropertiesFUCHSIA.set_memoryTypeBits(segment, 0L, value); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA memoryTypeBitsAt(long index, @CType("uint32_t") int value) { VkBufferCollectionPropertiesFUCHSIA.set_memoryTypeBits(this.segment(), index, value); return this; } + /// Sets `memoryTypeBits` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA memoryTypeBits(@CType("uint32_t") int value) { VkBufferCollectionPropertiesFUCHSIA.set_memoryTypeBits(this.segment(), value); return this; } + + /// {@return `bufferCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferCount(MemorySegment segment, long index) { return (int) VH_bufferCount.get(segment, 0L, index); } + /// {@return `bufferCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferCount(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_bufferCount(segment, 0L); } + /// {@return `bufferCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferCountAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_bufferCount(this.segment(), index); } + /// {@return `bufferCount`} + public @CType("uint32_t") int bufferCount() { return VkBufferCollectionPropertiesFUCHSIA.get_bufferCount(this.segment()); } + /// Sets `bufferCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferCount.set(segment, 0L, index, value); } + /// Sets `bufferCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferCount(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCollectionPropertiesFUCHSIA.set_bufferCount(segment, 0L, value); } + /// Sets `bufferCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA bufferCountAt(long index, @CType("uint32_t") int value) { VkBufferCollectionPropertiesFUCHSIA.set_bufferCount(this.segment(), index, value); return this; } + /// Sets `bufferCount` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA bufferCount(@CType("uint32_t") int value) { VkBufferCollectionPropertiesFUCHSIA.set_bufferCount(this.segment(), value); return this; } + + /// {@return `createInfoIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_createInfoIndex(MemorySegment segment, long index) { return (int) VH_createInfoIndex.get(segment, 0L, index); } + /// {@return `createInfoIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_createInfoIndex(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_createInfoIndex(segment, 0L); } + /// {@return `createInfoIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int createInfoIndexAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_createInfoIndex(this.segment(), index); } + /// {@return `createInfoIndex`} + public @CType("uint32_t") int createInfoIndex() { return VkBufferCollectionPropertiesFUCHSIA.get_createInfoIndex(this.segment()); } + /// Sets `createInfoIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_createInfoIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_createInfoIndex.set(segment, 0L, index, value); } + /// Sets `createInfoIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_createInfoIndex(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCollectionPropertiesFUCHSIA.set_createInfoIndex(segment, 0L, value); } + /// Sets `createInfoIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA createInfoIndexAt(long index, @CType("uint32_t") int value) { VkBufferCollectionPropertiesFUCHSIA.set_createInfoIndex(this.segment(), index, value); return this; } + /// Sets `createInfoIndex` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA createInfoIndex(@CType("uint32_t") int value) { VkBufferCollectionPropertiesFUCHSIA.set_createInfoIndex(this.segment(), value); return this; } + + /// {@return `sysmemPixelFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_sysmemPixelFormat(MemorySegment segment, long index) { return (long) VH_sysmemPixelFormat.get(segment, 0L, index); } + /// {@return `sysmemPixelFormat`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_sysmemPixelFormat(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_sysmemPixelFormat(segment, 0L); } + /// {@return `sysmemPixelFormat` at the given index} + /// @param index the index + public @CType("uint64_t") long sysmemPixelFormatAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_sysmemPixelFormat(this.segment(), index); } + /// {@return `sysmemPixelFormat`} + public @CType("uint64_t") long sysmemPixelFormat() { return VkBufferCollectionPropertiesFUCHSIA.get_sysmemPixelFormat(this.segment()); } + /// Sets `sysmemPixelFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sysmemPixelFormat(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_sysmemPixelFormat.set(segment, 0L, index, value); } + /// Sets `sysmemPixelFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sysmemPixelFormat(MemorySegment segment, @CType("uint64_t") long value) { VkBufferCollectionPropertiesFUCHSIA.set_sysmemPixelFormat(segment, 0L, value); } + /// Sets `sysmemPixelFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA sysmemPixelFormatAt(long index, @CType("uint64_t") long value) { VkBufferCollectionPropertiesFUCHSIA.set_sysmemPixelFormat(this.segment(), index, value); return this; } + /// Sets `sysmemPixelFormat` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA sysmemPixelFormat(@CType("uint64_t") long value) { VkBufferCollectionPropertiesFUCHSIA.set_sysmemPixelFormat(this.segment(), value); return this; } + + /// {@return `formatFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags") int get_formatFeatures(MemorySegment segment, long index) { return (int) VH_formatFeatures.get(segment, 0L, index); } + /// {@return `formatFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags") int get_formatFeatures(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_formatFeatures(segment, 0L); } + /// {@return `formatFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags") int formatFeaturesAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_formatFeatures(this.segment(), index); } + /// {@return `formatFeatures`} + public @CType("VkFormatFeatureFlags") int formatFeatures() { return VkBufferCollectionPropertiesFUCHSIA.get_formatFeatures(this.segment()); } + /// Sets `formatFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_formatFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags") int value) { VH_formatFeatures.set(segment, 0L, index, value); } + /// Sets `formatFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_formatFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags") int value) { VkBufferCollectionPropertiesFUCHSIA.set_formatFeatures(segment, 0L, value); } + /// Sets `formatFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA formatFeaturesAt(long index, @CType("VkFormatFeatureFlags") int value) { VkBufferCollectionPropertiesFUCHSIA.set_formatFeatures(this.segment(), index, value); return this; } + /// Sets `formatFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA formatFeatures(@CType("VkFormatFeatureFlags") int value) { VkBufferCollectionPropertiesFUCHSIA.set_formatFeatures(this.segment(), value); return this; } + + /// {@return `sysmemColorSpaceIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSysmemColorSpaceFUCHSIA") java.lang.foreign.MemorySegment get_sysmemColorSpaceIndex(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_sysmemColorSpaceIndex, index), ML_sysmemColorSpaceIndex); } + /// {@return `sysmemColorSpaceIndex`} + /// @param segment the segment of the struct + public static @CType("VkSysmemColorSpaceFUCHSIA") java.lang.foreign.MemorySegment get_sysmemColorSpaceIndex(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_sysmemColorSpaceIndex(segment, 0L); } + /// {@return `sysmemColorSpaceIndex` at the given index} + /// @param index the index + public @CType("VkSysmemColorSpaceFUCHSIA") java.lang.foreign.MemorySegment sysmemColorSpaceIndexAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_sysmemColorSpaceIndex(this.segment(), index); } + /// {@return `sysmemColorSpaceIndex`} + public @CType("VkSysmemColorSpaceFUCHSIA") java.lang.foreign.MemorySegment sysmemColorSpaceIndex() { return VkBufferCollectionPropertiesFUCHSIA.get_sysmemColorSpaceIndex(this.segment()); } + /// Sets `sysmemColorSpaceIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sysmemColorSpaceIndex(MemorySegment segment, long index, @CType("VkSysmemColorSpaceFUCHSIA") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_sysmemColorSpaceIndex, index), ML_sysmemColorSpaceIndex.byteSize()); } + /// Sets `sysmemColorSpaceIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sysmemColorSpaceIndex(MemorySegment segment, @CType("VkSysmemColorSpaceFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferCollectionPropertiesFUCHSIA.set_sysmemColorSpaceIndex(segment, 0L, value); } + /// Sets `sysmemColorSpaceIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA sysmemColorSpaceIndexAt(long index, @CType("VkSysmemColorSpaceFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferCollectionPropertiesFUCHSIA.set_sysmemColorSpaceIndex(this.segment(), index, value); return this; } + /// Sets `sysmemColorSpaceIndex` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA sysmemColorSpaceIndex(@CType("VkSysmemColorSpaceFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferCollectionPropertiesFUCHSIA.set_sysmemColorSpaceIndex(this.segment(), value); return this; } + + /// {@return `samplerYcbcrConversionComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_samplerYcbcrConversionComponents(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_samplerYcbcrConversionComponents, index), ML_samplerYcbcrConversionComponents); } + /// {@return `samplerYcbcrConversionComponents`} + /// @param segment the segment of the struct + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_samplerYcbcrConversionComponents(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_samplerYcbcrConversionComponents(segment, 0L); } + /// {@return `samplerYcbcrConversionComponents` at the given index} + /// @param index the index + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment samplerYcbcrConversionComponentsAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_samplerYcbcrConversionComponents(this.segment(), index); } + /// {@return `samplerYcbcrConversionComponents`} + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment samplerYcbcrConversionComponents() { return VkBufferCollectionPropertiesFUCHSIA.get_samplerYcbcrConversionComponents(this.segment()); } + /// Sets `samplerYcbcrConversionComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerYcbcrConversionComponents(MemorySegment segment, long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_samplerYcbcrConversionComponents, index), ML_samplerYcbcrConversionComponents.byteSize()); } + /// Sets `samplerYcbcrConversionComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerYcbcrConversionComponents(MemorySegment segment, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkBufferCollectionPropertiesFUCHSIA.set_samplerYcbcrConversionComponents(segment, 0L, value); } + /// Sets `samplerYcbcrConversionComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA samplerYcbcrConversionComponentsAt(long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkBufferCollectionPropertiesFUCHSIA.set_samplerYcbcrConversionComponents(this.segment(), index, value); return this; } + /// Sets `samplerYcbcrConversionComponents` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA samplerYcbcrConversionComponents(@CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkBufferCollectionPropertiesFUCHSIA.set_samplerYcbcrConversionComponents(this.segment(), value); return this; } + + /// {@return `suggestedYcbcrModel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrModelConversion") int get_suggestedYcbcrModel(MemorySegment segment, long index) { return (int) VH_suggestedYcbcrModel.get(segment, 0L, index); } + /// {@return `suggestedYcbcrModel`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrModelConversion") int get_suggestedYcbcrModel(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedYcbcrModel(segment, 0L); } + /// {@return `suggestedYcbcrModel` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrModelConversion") int suggestedYcbcrModelAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedYcbcrModel(this.segment(), index); } + /// {@return `suggestedYcbcrModel`} + public @CType("VkSamplerYcbcrModelConversion") int suggestedYcbcrModel() { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedYcbcrModel(this.segment()); } + /// Sets `suggestedYcbcrModel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYcbcrModel(MemorySegment segment, long index, @CType("VkSamplerYcbcrModelConversion") int value) { VH_suggestedYcbcrModel.set(segment, 0L, index, value); } + /// Sets `suggestedYcbcrModel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYcbcrModel(MemorySegment segment, @CType("VkSamplerYcbcrModelConversion") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedYcbcrModel(segment, 0L, value); } + /// Sets `suggestedYcbcrModel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA suggestedYcbcrModelAt(long index, @CType("VkSamplerYcbcrModelConversion") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedYcbcrModel(this.segment(), index, value); return this; } + /// Sets `suggestedYcbcrModel` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA suggestedYcbcrModel(@CType("VkSamplerYcbcrModelConversion") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedYcbcrModel(this.segment(), value); return this; } + + /// {@return `suggestedYcbcrRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrRange") int get_suggestedYcbcrRange(MemorySegment segment, long index) { return (int) VH_suggestedYcbcrRange.get(segment, 0L, index); } + /// {@return `suggestedYcbcrRange`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrRange") int get_suggestedYcbcrRange(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedYcbcrRange(segment, 0L); } + /// {@return `suggestedYcbcrRange` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrRange") int suggestedYcbcrRangeAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedYcbcrRange(this.segment(), index); } + /// {@return `suggestedYcbcrRange`} + public @CType("VkSamplerYcbcrRange") int suggestedYcbcrRange() { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedYcbcrRange(this.segment()); } + /// Sets `suggestedYcbcrRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYcbcrRange(MemorySegment segment, long index, @CType("VkSamplerYcbcrRange") int value) { VH_suggestedYcbcrRange.set(segment, 0L, index, value); } + /// Sets `suggestedYcbcrRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYcbcrRange(MemorySegment segment, @CType("VkSamplerYcbcrRange") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedYcbcrRange(segment, 0L, value); } + /// Sets `suggestedYcbcrRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA suggestedYcbcrRangeAt(long index, @CType("VkSamplerYcbcrRange") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedYcbcrRange(this.segment(), index, value); return this; } + /// Sets `suggestedYcbcrRange` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA suggestedYcbcrRange(@CType("VkSamplerYcbcrRange") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedYcbcrRange(this.segment(), value); return this; } + + /// {@return `suggestedXChromaOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_suggestedXChromaOffset(MemorySegment segment, long index) { return (int) VH_suggestedXChromaOffset.get(segment, 0L, index); } + /// {@return `suggestedXChromaOffset`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_suggestedXChromaOffset(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedXChromaOffset(segment, 0L); } + /// {@return `suggestedXChromaOffset` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int suggestedXChromaOffsetAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedXChromaOffset(this.segment(), index); } + /// {@return `suggestedXChromaOffset`} + public @CType("VkChromaLocation") int suggestedXChromaOffset() { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedXChromaOffset(this.segment()); } + /// Sets `suggestedXChromaOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedXChromaOffset(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_suggestedXChromaOffset.set(segment, 0L, index, value); } + /// Sets `suggestedXChromaOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedXChromaOffset(MemorySegment segment, @CType("VkChromaLocation") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedXChromaOffset(segment, 0L, value); } + /// Sets `suggestedXChromaOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA suggestedXChromaOffsetAt(long index, @CType("VkChromaLocation") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedXChromaOffset(this.segment(), index, value); return this; } + /// Sets `suggestedXChromaOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA suggestedXChromaOffset(@CType("VkChromaLocation") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedXChromaOffset(this.segment(), value); return this; } + + /// {@return `suggestedYChromaOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_suggestedYChromaOffset(MemorySegment segment, long index) { return (int) VH_suggestedYChromaOffset.get(segment, 0L, index); } + /// {@return `suggestedYChromaOffset`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_suggestedYChromaOffset(MemorySegment segment) { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedYChromaOffset(segment, 0L); } + /// {@return `suggestedYChromaOffset` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int suggestedYChromaOffsetAt(long index) { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedYChromaOffset(this.segment(), index); } + /// {@return `suggestedYChromaOffset`} + public @CType("VkChromaLocation") int suggestedYChromaOffset() { return VkBufferCollectionPropertiesFUCHSIA.get_suggestedYChromaOffset(this.segment()); } + /// Sets `suggestedYChromaOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYChromaOffset(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_suggestedYChromaOffset.set(segment, 0L, index, value); } + /// Sets `suggestedYChromaOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYChromaOffset(MemorySegment segment, @CType("VkChromaLocation") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedYChromaOffset(segment, 0L, value); } + /// Sets `suggestedYChromaOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA suggestedYChromaOffsetAt(long index, @CType("VkChromaLocation") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedYChromaOffset(this.segment(), index, value); return this; } + /// Sets `suggestedYChromaOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCollectionPropertiesFUCHSIA suggestedYChromaOffset(@CType("VkChromaLocation") int value) { VkBufferCollectionPropertiesFUCHSIA.set_suggestedYChromaOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferConstraintsInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferConstraintsInfoFUCHSIA.java new file mode 100644 index 00000000..5b718248 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkBufferConstraintsInfoFUCHSIA.java @@ -0,0 +1,263 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### createInfo +/// [Byte offset][#OFFSET_createInfo] - [Memory layout][#ML_createInfo] - [Getter][#createInfo()] - [Setter][#createInfo(java.lang.foreign.MemorySegment)] +/// ### requiredFormatFeatures +/// [VarHandle][#VH_requiredFormatFeatures] - [Getter][#requiredFormatFeatures()] - [Setter][#requiredFormatFeatures(int)] +/// ### bufferCollectionConstraints +/// [Byte offset][#OFFSET_bufferCollectionConstraints] - [Memory layout][#ML_bufferCollectionConstraints] - [Getter][#bufferCollectionConstraints()] - [Setter][#bufferCollectionConstraints(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferConstraintsInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// VkBufferCreateInfo createInfo; +/// VkFormatFeatureFlags requiredFormatFeatures; +/// VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints; +/// } VkBufferConstraintsInfoFUCHSIA; +/// ``` +public final class VkBufferConstraintsInfoFUCHSIA extends Struct { + /// The struct layout of `VkBufferConstraintsInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkBufferCreateInfo.LAYOUT.withName("createInfo"), + ValueLayout.JAVA_INT.withName("requiredFormatFeatures"), + overrungl.vulkan.fuchsia.struct.VkBufferCollectionConstraintsInfoFUCHSIA.LAYOUT.withName("bufferCollectionConstraints") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `createInfo`. + public static final long OFFSET_createInfo = LAYOUT.byteOffset(PathElement.groupElement("createInfo")); + /// The memory layout of `createInfo`. + public static final MemoryLayout ML_createInfo = LAYOUT.select(PathElement.groupElement("createInfo")); + /// The [VarHandle] of `requiredFormatFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_requiredFormatFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("requiredFormatFeatures")); + /// The byte offset of `bufferCollectionConstraints`. + public static final long OFFSET_bufferCollectionConstraints = LAYOUT.byteOffset(PathElement.groupElement("bufferCollectionConstraints")); + /// The memory layout of `bufferCollectionConstraints`. + public static final MemoryLayout ML_bufferCollectionConstraints = LAYOUT.select(PathElement.groupElement("bufferCollectionConstraints")); + + /// Creates `VkBufferConstraintsInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkBufferConstraintsInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferConstraintsInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferConstraintsInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferConstraintsInfoFUCHSIA(segment); } + + /// Creates `VkBufferConstraintsInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferConstraintsInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferConstraintsInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferConstraintsInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferConstraintsInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferConstraintsInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferConstraintsInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferConstraintsInfoFUCHSIA` + public static VkBufferConstraintsInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkBufferConstraintsInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferConstraintsInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferConstraintsInfoFUCHSIA` + public static VkBufferConstraintsInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkBufferConstraintsInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferConstraintsInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferConstraintsInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferConstraintsInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferConstraintsInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferConstraintsInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferConstraintsInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferConstraintsInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkBufferConstraintsInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferConstraintsInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferConstraintsInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferConstraintsInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferConstraintsInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferConstraintsInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferConstraintsInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferConstraintsInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferConstraintsInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `createInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferCreateInfo") java.lang.foreign.MemorySegment get_createInfo(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_createInfo, index), ML_createInfo); } + /// {@return `createInfo`} + /// @param segment the segment of the struct + public static @CType("VkBufferCreateInfo") java.lang.foreign.MemorySegment get_createInfo(MemorySegment segment) { return VkBufferConstraintsInfoFUCHSIA.get_createInfo(segment, 0L); } + /// {@return `createInfo` at the given index} + /// @param index the index + public @CType("VkBufferCreateInfo") java.lang.foreign.MemorySegment createInfoAt(long index) { return VkBufferConstraintsInfoFUCHSIA.get_createInfo(this.segment(), index); } + /// {@return `createInfo`} + public @CType("VkBufferCreateInfo") java.lang.foreign.MemorySegment createInfo() { return VkBufferConstraintsInfoFUCHSIA.get_createInfo(this.segment()); } + /// Sets `createInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_createInfo(MemorySegment segment, long index, @CType("VkBufferCreateInfo") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_createInfo, index), ML_createInfo.byteSize()); } + /// Sets `createInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_createInfo(MemorySegment segment, @CType("VkBufferCreateInfo") java.lang.foreign.MemorySegment value) { VkBufferConstraintsInfoFUCHSIA.set_createInfo(segment, 0L, value); } + /// Sets `createInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferConstraintsInfoFUCHSIA createInfoAt(long index, @CType("VkBufferCreateInfo") java.lang.foreign.MemorySegment value) { VkBufferConstraintsInfoFUCHSIA.set_createInfo(this.segment(), index, value); return this; } + /// Sets `createInfo` with the given value. + /// @param value the value + /// @return `this` + public VkBufferConstraintsInfoFUCHSIA createInfo(@CType("VkBufferCreateInfo") java.lang.foreign.MemorySegment value) { VkBufferConstraintsInfoFUCHSIA.set_createInfo(this.segment(), value); return this; } + + /// {@return `requiredFormatFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags") int get_requiredFormatFeatures(MemorySegment segment, long index) { return (int) VH_requiredFormatFeatures.get(segment, 0L, index); } + /// {@return `requiredFormatFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags") int get_requiredFormatFeatures(MemorySegment segment) { return VkBufferConstraintsInfoFUCHSIA.get_requiredFormatFeatures(segment, 0L); } + /// {@return `requiredFormatFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags") int requiredFormatFeaturesAt(long index) { return VkBufferConstraintsInfoFUCHSIA.get_requiredFormatFeatures(this.segment(), index); } + /// {@return `requiredFormatFeatures`} + public @CType("VkFormatFeatureFlags") int requiredFormatFeatures() { return VkBufferConstraintsInfoFUCHSIA.get_requiredFormatFeatures(this.segment()); } + /// Sets `requiredFormatFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_requiredFormatFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags") int value) { VH_requiredFormatFeatures.set(segment, 0L, index, value); } + /// Sets `requiredFormatFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_requiredFormatFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags") int value) { VkBufferConstraintsInfoFUCHSIA.set_requiredFormatFeatures(segment, 0L, value); } + /// Sets `requiredFormatFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferConstraintsInfoFUCHSIA requiredFormatFeaturesAt(long index, @CType("VkFormatFeatureFlags") int value) { VkBufferConstraintsInfoFUCHSIA.set_requiredFormatFeatures(this.segment(), index, value); return this; } + /// Sets `requiredFormatFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkBufferConstraintsInfoFUCHSIA requiredFormatFeatures(@CType("VkFormatFeatureFlags") int value) { VkBufferConstraintsInfoFUCHSIA.set_requiredFormatFeatures(this.segment(), value); return this; } + + /// {@return `bufferCollectionConstraints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment get_bufferCollectionConstraints(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_bufferCollectionConstraints, index), ML_bufferCollectionConstraints); } + /// {@return `bufferCollectionConstraints`} + /// @param segment the segment of the struct + public static @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment get_bufferCollectionConstraints(MemorySegment segment) { return VkBufferConstraintsInfoFUCHSIA.get_bufferCollectionConstraints(segment, 0L); } + /// {@return `bufferCollectionConstraints` at the given index} + /// @param index the index + public @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment bufferCollectionConstraintsAt(long index) { return VkBufferConstraintsInfoFUCHSIA.get_bufferCollectionConstraints(this.segment(), index); } + /// {@return `bufferCollectionConstraints`} + public @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment bufferCollectionConstraints() { return VkBufferConstraintsInfoFUCHSIA.get_bufferCollectionConstraints(this.segment()); } + /// Sets `bufferCollectionConstraints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferCollectionConstraints(MemorySegment segment, long index, @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_bufferCollectionConstraints, index), ML_bufferCollectionConstraints.byteSize()); } + /// Sets `bufferCollectionConstraints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferCollectionConstraints(MemorySegment segment, @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferConstraintsInfoFUCHSIA.set_bufferCollectionConstraints(segment, 0L, value); } + /// Sets `bufferCollectionConstraints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferConstraintsInfoFUCHSIA bufferCollectionConstraintsAt(long index, @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferConstraintsInfoFUCHSIA.set_bufferCollectionConstraints(this.segment(), index, value); return this; } + /// Sets `bufferCollectionConstraints` with the given value. + /// @param value the value + /// @return `this` + public VkBufferConstraintsInfoFUCHSIA bufferCollectionConstraints(@CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment value) { VkBufferConstraintsInfoFUCHSIA.set_bufferCollectionConstraints(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImageConstraintsInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImageConstraintsInfoFUCHSIA.java new file mode 100644 index 00000000..94dac47d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImageConstraintsInfoFUCHSIA.java @@ -0,0 +1,298 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### formatConstraintsCount +/// [VarHandle][#VH_formatConstraintsCount] - [Getter][#formatConstraintsCount()] - [Setter][#formatConstraintsCount(int)] +/// ### pFormatConstraints +/// [VarHandle][#VH_pFormatConstraints] - [Getter][#pFormatConstraints()] - [Setter][#pFormatConstraints(java.lang.foreign.MemorySegment)] +/// ### bufferCollectionConstraints +/// [Byte offset][#OFFSET_bufferCollectionConstraints] - [Memory layout][#ML_bufferCollectionConstraints] - [Getter][#bufferCollectionConstraints()] - [Setter][#bufferCollectionConstraints(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageConstraintsInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t formatConstraintsCount; +/// const VkImageFormatConstraintsInfoFUCHSIA * pFormatConstraints; +/// VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints; +/// VkImageConstraintsInfoFlagsFUCHSIA flags; +/// } VkImageConstraintsInfoFUCHSIA; +/// ``` +public final class VkImageConstraintsInfoFUCHSIA extends Struct { + /// The struct layout of `VkImageConstraintsInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("formatConstraintsCount"), + ValueLayout.ADDRESS.withName("pFormatConstraints"), + overrungl.vulkan.fuchsia.struct.VkBufferCollectionConstraintsInfoFUCHSIA.LAYOUT.withName("bufferCollectionConstraints"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `formatConstraintsCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_formatConstraintsCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("formatConstraintsCount")); + /// The [VarHandle] of `pFormatConstraints` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pFormatConstraints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pFormatConstraints")); + /// The byte offset of `bufferCollectionConstraints`. + public static final long OFFSET_bufferCollectionConstraints = LAYOUT.byteOffset(PathElement.groupElement("bufferCollectionConstraints")); + /// The memory layout of `bufferCollectionConstraints`. + public static final MemoryLayout ML_bufferCollectionConstraints = LAYOUT.select(PathElement.groupElement("bufferCollectionConstraints")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkImageConstraintsInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkImageConstraintsInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageConstraintsInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageConstraintsInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageConstraintsInfoFUCHSIA(segment); } + + /// Creates `VkImageConstraintsInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageConstraintsInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageConstraintsInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageConstraintsInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageConstraintsInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageConstraintsInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageConstraintsInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageConstraintsInfoFUCHSIA` + public static VkImageConstraintsInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkImageConstraintsInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageConstraintsInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageConstraintsInfoFUCHSIA` + public static VkImageConstraintsInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkImageConstraintsInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageConstraintsInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageConstraintsInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageConstraintsInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageConstraintsInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkImageConstraintsInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkImageConstraintsInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageConstraintsInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageConstraintsInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageConstraintsInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageConstraintsInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageConstraintsInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageConstraintsInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `formatConstraintsCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_formatConstraintsCount(MemorySegment segment, long index) { return (int) VH_formatConstraintsCount.get(segment, 0L, index); } + /// {@return `formatConstraintsCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_formatConstraintsCount(MemorySegment segment) { return VkImageConstraintsInfoFUCHSIA.get_formatConstraintsCount(segment, 0L); } + /// {@return `formatConstraintsCount` at the given index} + /// @param index the index + public @CType("uint32_t") int formatConstraintsCountAt(long index) { return VkImageConstraintsInfoFUCHSIA.get_formatConstraintsCount(this.segment(), index); } + /// {@return `formatConstraintsCount`} + public @CType("uint32_t") int formatConstraintsCount() { return VkImageConstraintsInfoFUCHSIA.get_formatConstraintsCount(this.segment()); } + /// Sets `formatConstraintsCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_formatConstraintsCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_formatConstraintsCount.set(segment, 0L, index, value); } + /// Sets `formatConstraintsCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_formatConstraintsCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageConstraintsInfoFUCHSIA.set_formatConstraintsCount(segment, 0L, value); } + /// Sets `formatConstraintsCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA formatConstraintsCountAt(long index, @CType("uint32_t") int value) { VkImageConstraintsInfoFUCHSIA.set_formatConstraintsCount(this.segment(), index, value); return this; } + /// Sets `formatConstraintsCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA formatConstraintsCount(@CType("uint32_t") int value) { VkImageConstraintsInfoFUCHSIA.set_formatConstraintsCount(this.segment(), value); return this; } + + /// {@return `pFormatConstraints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageFormatConstraintsInfoFUCHSIA *") java.lang.foreign.MemorySegment get_pFormatConstraints(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pFormatConstraints.get(segment, 0L, index); } + /// {@return `pFormatConstraints`} + /// @param segment the segment of the struct + public static @CType("const VkImageFormatConstraintsInfoFUCHSIA *") java.lang.foreign.MemorySegment get_pFormatConstraints(MemorySegment segment) { return VkImageConstraintsInfoFUCHSIA.get_pFormatConstraints(segment, 0L); } + /// {@return `pFormatConstraints` at the given index} + /// @param index the index + public @CType("const VkImageFormatConstraintsInfoFUCHSIA *") java.lang.foreign.MemorySegment pFormatConstraintsAt(long index) { return VkImageConstraintsInfoFUCHSIA.get_pFormatConstraints(this.segment(), index); } + /// {@return `pFormatConstraints`} + public @CType("const VkImageFormatConstraintsInfoFUCHSIA *") java.lang.foreign.MemorySegment pFormatConstraints() { return VkImageConstraintsInfoFUCHSIA.get_pFormatConstraints(this.segment()); } + /// Sets `pFormatConstraints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pFormatConstraints(MemorySegment segment, long index, @CType("const VkImageFormatConstraintsInfoFUCHSIA *") java.lang.foreign.MemorySegment value) { VH_pFormatConstraints.set(segment, 0L, index, value); } + /// Sets `pFormatConstraints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pFormatConstraints(MemorySegment segment, @CType("const VkImageFormatConstraintsInfoFUCHSIA *") java.lang.foreign.MemorySegment value) { VkImageConstraintsInfoFUCHSIA.set_pFormatConstraints(segment, 0L, value); } + /// Sets `pFormatConstraints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA pFormatConstraintsAt(long index, @CType("const VkImageFormatConstraintsInfoFUCHSIA *") java.lang.foreign.MemorySegment value) { VkImageConstraintsInfoFUCHSIA.set_pFormatConstraints(this.segment(), index, value); return this; } + /// Sets `pFormatConstraints` with the given value. + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA pFormatConstraints(@CType("const VkImageFormatConstraintsInfoFUCHSIA *") java.lang.foreign.MemorySegment value) { VkImageConstraintsInfoFUCHSIA.set_pFormatConstraints(this.segment(), value); return this; } + + /// {@return `bufferCollectionConstraints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment get_bufferCollectionConstraints(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_bufferCollectionConstraints, index), ML_bufferCollectionConstraints); } + /// {@return `bufferCollectionConstraints`} + /// @param segment the segment of the struct + public static @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment get_bufferCollectionConstraints(MemorySegment segment) { return VkImageConstraintsInfoFUCHSIA.get_bufferCollectionConstraints(segment, 0L); } + /// {@return `bufferCollectionConstraints` at the given index} + /// @param index the index + public @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment bufferCollectionConstraintsAt(long index) { return VkImageConstraintsInfoFUCHSIA.get_bufferCollectionConstraints(this.segment(), index); } + /// {@return `bufferCollectionConstraints`} + public @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment bufferCollectionConstraints() { return VkImageConstraintsInfoFUCHSIA.get_bufferCollectionConstraints(this.segment()); } + /// Sets `bufferCollectionConstraints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferCollectionConstraints(MemorySegment segment, long index, @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_bufferCollectionConstraints, index), ML_bufferCollectionConstraints.byteSize()); } + /// Sets `bufferCollectionConstraints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferCollectionConstraints(MemorySegment segment, @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment value) { VkImageConstraintsInfoFUCHSIA.set_bufferCollectionConstraints(segment, 0L, value); } + /// Sets `bufferCollectionConstraints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA bufferCollectionConstraintsAt(long index, @CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment value) { VkImageConstraintsInfoFUCHSIA.set_bufferCollectionConstraints(this.segment(), index, value); return this; } + /// Sets `bufferCollectionConstraints` with the given value. + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA bufferCollectionConstraints(@CType("VkBufferCollectionConstraintsInfoFUCHSIA") java.lang.foreign.MemorySegment value) { VkImageConstraintsInfoFUCHSIA.set_bufferCollectionConstraints(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageConstraintsInfoFlagsFUCHSIA") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkImageConstraintsInfoFlagsFUCHSIA") int get_flags(MemorySegment segment) { return VkImageConstraintsInfoFUCHSIA.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkImageConstraintsInfoFlagsFUCHSIA") int flagsAt(long index) { return VkImageConstraintsInfoFUCHSIA.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkImageConstraintsInfoFlagsFUCHSIA") int flags() { return VkImageConstraintsInfoFUCHSIA.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkImageConstraintsInfoFlagsFUCHSIA") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkImageConstraintsInfoFlagsFUCHSIA") int value) { VkImageConstraintsInfoFUCHSIA.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA flagsAt(long index, @CType("VkImageConstraintsInfoFlagsFUCHSIA") int value) { VkImageConstraintsInfoFUCHSIA.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImageConstraintsInfoFUCHSIA flags(@CType("VkImageConstraintsInfoFlagsFUCHSIA") int value) { VkImageConstraintsInfoFUCHSIA.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImageFormatConstraintsInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImageFormatConstraintsInfoFUCHSIA.java new file mode 100644 index 00000000..1253daee --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImageFormatConstraintsInfoFUCHSIA.java @@ -0,0 +1,372 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageCreateInfo +/// [Byte offset][#OFFSET_imageCreateInfo] - [Memory layout][#ML_imageCreateInfo] - [Getter][#imageCreateInfo()] - [Setter][#imageCreateInfo(java.lang.foreign.MemorySegment)] +/// ### requiredFormatFeatures +/// [VarHandle][#VH_requiredFormatFeatures] - [Getter][#requiredFormatFeatures()] - [Setter][#requiredFormatFeatures(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### sysmemPixelFormat +/// [VarHandle][#VH_sysmemPixelFormat] - [Getter][#sysmemPixelFormat()] - [Setter][#sysmemPixelFormat(long)] +/// ### colorSpaceCount +/// [VarHandle][#VH_colorSpaceCount] - [Getter][#colorSpaceCount()] - [Setter][#colorSpaceCount(int)] +/// ### pColorSpaces +/// [VarHandle][#VH_pColorSpaces] - [Getter][#pColorSpaces()] - [Setter][#pColorSpaces(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageFormatConstraintsInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageCreateInfo imageCreateInfo; +/// VkFormatFeatureFlags requiredFormatFeatures; +/// VkImageFormatConstraintsFlagsFUCHSIA flags; +/// uint64_t sysmemPixelFormat; +/// uint32_t colorSpaceCount; +/// const VkSysmemColorSpaceFUCHSIA * pColorSpaces; +/// } VkImageFormatConstraintsInfoFUCHSIA; +/// ``` +public final class VkImageFormatConstraintsInfoFUCHSIA extends Struct { + /// The struct layout of `VkImageFormatConstraintsInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkImageCreateInfo.LAYOUT.withName("imageCreateInfo"), + ValueLayout.JAVA_INT.withName("requiredFormatFeatures"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("sysmemPixelFormat"), + ValueLayout.JAVA_INT.withName("colorSpaceCount"), + ValueLayout.ADDRESS.withName("pColorSpaces") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `imageCreateInfo`. + public static final long OFFSET_imageCreateInfo = LAYOUT.byteOffset(PathElement.groupElement("imageCreateInfo")); + /// The memory layout of `imageCreateInfo`. + public static final MemoryLayout ML_imageCreateInfo = LAYOUT.select(PathElement.groupElement("imageCreateInfo")); + /// The [VarHandle] of `requiredFormatFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_requiredFormatFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("requiredFormatFeatures")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `sysmemPixelFormat` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_sysmemPixelFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sysmemPixelFormat")); + /// The [VarHandle] of `colorSpaceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorSpaceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorSpaceCount")); + /// The [VarHandle] of `pColorSpaces` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorSpaces = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorSpaces")); + + /// Creates `VkImageFormatConstraintsInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkImageFormatConstraintsInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageFormatConstraintsInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatConstraintsInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatConstraintsInfoFUCHSIA(segment); } + + /// Creates `VkImageFormatConstraintsInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatConstraintsInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatConstraintsInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageFormatConstraintsInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatConstraintsInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatConstraintsInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageFormatConstraintsInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageFormatConstraintsInfoFUCHSIA` + public static VkImageFormatConstraintsInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkImageFormatConstraintsInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageFormatConstraintsInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageFormatConstraintsInfoFUCHSIA` + public static VkImageFormatConstraintsInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkImageFormatConstraintsInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageFormatConstraintsInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageFormatConstraintsInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageFormatConstraintsInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageFormatConstraintsInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageFormatConstraintsInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageFormatConstraintsInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageFormatConstraintsInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageFormatConstraintsInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageFormatConstraintsInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `imageCreateInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageCreateInfo") java.lang.foreign.MemorySegment get_imageCreateInfo(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageCreateInfo, index), ML_imageCreateInfo); } + /// {@return `imageCreateInfo`} + /// @param segment the segment of the struct + public static @CType("VkImageCreateInfo") java.lang.foreign.MemorySegment get_imageCreateInfo(MemorySegment segment) { return VkImageFormatConstraintsInfoFUCHSIA.get_imageCreateInfo(segment, 0L); } + /// {@return `imageCreateInfo` at the given index} + /// @param index the index + public @CType("VkImageCreateInfo") java.lang.foreign.MemorySegment imageCreateInfoAt(long index) { return VkImageFormatConstraintsInfoFUCHSIA.get_imageCreateInfo(this.segment(), index); } + /// {@return `imageCreateInfo`} + public @CType("VkImageCreateInfo") java.lang.foreign.MemorySegment imageCreateInfo() { return VkImageFormatConstraintsInfoFUCHSIA.get_imageCreateInfo(this.segment()); } + /// Sets `imageCreateInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageCreateInfo(MemorySegment segment, long index, @CType("VkImageCreateInfo") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageCreateInfo, index), ML_imageCreateInfo.byteSize()); } + /// Sets `imageCreateInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageCreateInfo(MemorySegment segment, @CType("VkImageCreateInfo") java.lang.foreign.MemorySegment value) { VkImageFormatConstraintsInfoFUCHSIA.set_imageCreateInfo(segment, 0L, value); } + /// Sets `imageCreateInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA imageCreateInfoAt(long index, @CType("VkImageCreateInfo") java.lang.foreign.MemorySegment value) { VkImageFormatConstraintsInfoFUCHSIA.set_imageCreateInfo(this.segment(), index, value); return this; } + /// Sets `imageCreateInfo` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA imageCreateInfo(@CType("VkImageCreateInfo") java.lang.foreign.MemorySegment value) { VkImageFormatConstraintsInfoFUCHSIA.set_imageCreateInfo(this.segment(), value); return this; } + + /// {@return `requiredFormatFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags") int get_requiredFormatFeatures(MemorySegment segment, long index) { return (int) VH_requiredFormatFeatures.get(segment, 0L, index); } + /// {@return `requiredFormatFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags") int get_requiredFormatFeatures(MemorySegment segment) { return VkImageFormatConstraintsInfoFUCHSIA.get_requiredFormatFeatures(segment, 0L); } + /// {@return `requiredFormatFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags") int requiredFormatFeaturesAt(long index) { return VkImageFormatConstraintsInfoFUCHSIA.get_requiredFormatFeatures(this.segment(), index); } + /// {@return `requiredFormatFeatures`} + public @CType("VkFormatFeatureFlags") int requiredFormatFeatures() { return VkImageFormatConstraintsInfoFUCHSIA.get_requiredFormatFeatures(this.segment()); } + /// Sets `requiredFormatFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_requiredFormatFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags") int value) { VH_requiredFormatFeatures.set(segment, 0L, index, value); } + /// Sets `requiredFormatFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_requiredFormatFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_requiredFormatFeatures(segment, 0L, value); } + /// Sets `requiredFormatFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA requiredFormatFeaturesAt(long index, @CType("VkFormatFeatureFlags") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_requiredFormatFeatures(this.segment(), index, value); return this; } + /// Sets `requiredFormatFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA requiredFormatFeatures(@CType("VkFormatFeatureFlags") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_requiredFormatFeatures(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageFormatConstraintsFlagsFUCHSIA") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkImageFormatConstraintsFlagsFUCHSIA") int get_flags(MemorySegment segment) { return VkImageFormatConstraintsInfoFUCHSIA.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkImageFormatConstraintsFlagsFUCHSIA") int flagsAt(long index) { return VkImageFormatConstraintsInfoFUCHSIA.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkImageFormatConstraintsFlagsFUCHSIA") int flags() { return VkImageFormatConstraintsInfoFUCHSIA.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkImageFormatConstraintsFlagsFUCHSIA") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkImageFormatConstraintsFlagsFUCHSIA") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA flagsAt(long index, @CType("VkImageFormatConstraintsFlagsFUCHSIA") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA flags(@CType("VkImageFormatConstraintsFlagsFUCHSIA") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_flags(this.segment(), value); return this; } + + /// {@return `sysmemPixelFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_sysmemPixelFormat(MemorySegment segment, long index) { return (long) VH_sysmemPixelFormat.get(segment, 0L, index); } + /// {@return `sysmemPixelFormat`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_sysmemPixelFormat(MemorySegment segment) { return VkImageFormatConstraintsInfoFUCHSIA.get_sysmemPixelFormat(segment, 0L); } + /// {@return `sysmemPixelFormat` at the given index} + /// @param index the index + public @CType("uint64_t") long sysmemPixelFormatAt(long index) { return VkImageFormatConstraintsInfoFUCHSIA.get_sysmemPixelFormat(this.segment(), index); } + /// {@return `sysmemPixelFormat`} + public @CType("uint64_t") long sysmemPixelFormat() { return VkImageFormatConstraintsInfoFUCHSIA.get_sysmemPixelFormat(this.segment()); } + /// Sets `sysmemPixelFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sysmemPixelFormat(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_sysmemPixelFormat.set(segment, 0L, index, value); } + /// Sets `sysmemPixelFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sysmemPixelFormat(MemorySegment segment, @CType("uint64_t") long value) { VkImageFormatConstraintsInfoFUCHSIA.set_sysmemPixelFormat(segment, 0L, value); } + /// Sets `sysmemPixelFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA sysmemPixelFormatAt(long index, @CType("uint64_t") long value) { VkImageFormatConstraintsInfoFUCHSIA.set_sysmemPixelFormat(this.segment(), index, value); return this; } + /// Sets `sysmemPixelFormat` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA sysmemPixelFormat(@CType("uint64_t") long value) { VkImageFormatConstraintsInfoFUCHSIA.set_sysmemPixelFormat(this.segment(), value); return this; } + + /// {@return `colorSpaceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorSpaceCount(MemorySegment segment, long index) { return (int) VH_colorSpaceCount.get(segment, 0L, index); } + /// {@return `colorSpaceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorSpaceCount(MemorySegment segment) { return VkImageFormatConstraintsInfoFUCHSIA.get_colorSpaceCount(segment, 0L); } + /// {@return `colorSpaceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int colorSpaceCountAt(long index) { return VkImageFormatConstraintsInfoFUCHSIA.get_colorSpaceCount(this.segment(), index); } + /// {@return `colorSpaceCount`} + public @CType("uint32_t") int colorSpaceCount() { return VkImageFormatConstraintsInfoFUCHSIA.get_colorSpaceCount(this.segment()); } + /// Sets `colorSpaceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorSpaceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorSpaceCount.set(segment, 0L, index, value); } + /// Sets `colorSpaceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorSpaceCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_colorSpaceCount(segment, 0L, value); } + /// Sets `colorSpaceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA colorSpaceCountAt(long index, @CType("uint32_t") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_colorSpaceCount(this.segment(), index, value); return this; } + /// Sets `colorSpaceCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA colorSpaceCount(@CType("uint32_t") int value) { VkImageFormatConstraintsInfoFUCHSIA.set_colorSpaceCount(this.segment(), value); return this; } + + /// {@return `pColorSpaces` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSysmemColorSpaceFUCHSIA *") java.lang.foreign.MemorySegment get_pColorSpaces(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorSpaces.get(segment, 0L, index); } + /// {@return `pColorSpaces`} + /// @param segment the segment of the struct + public static @CType("const VkSysmemColorSpaceFUCHSIA *") java.lang.foreign.MemorySegment get_pColorSpaces(MemorySegment segment) { return VkImageFormatConstraintsInfoFUCHSIA.get_pColorSpaces(segment, 0L); } + /// {@return `pColorSpaces` at the given index} + /// @param index the index + public @CType("const VkSysmemColorSpaceFUCHSIA *") java.lang.foreign.MemorySegment pColorSpacesAt(long index) { return VkImageFormatConstraintsInfoFUCHSIA.get_pColorSpaces(this.segment(), index); } + /// {@return `pColorSpaces`} + public @CType("const VkSysmemColorSpaceFUCHSIA *") java.lang.foreign.MemorySegment pColorSpaces() { return VkImageFormatConstraintsInfoFUCHSIA.get_pColorSpaces(this.segment()); } + /// Sets `pColorSpaces` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorSpaces(MemorySegment segment, long index, @CType("const VkSysmemColorSpaceFUCHSIA *") java.lang.foreign.MemorySegment value) { VH_pColorSpaces.set(segment, 0L, index, value); } + /// Sets `pColorSpaces` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorSpaces(MemorySegment segment, @CType("const VkSysmemColorSpaceFUCHSIA *") java.lang.foreign.MemorySegment value) { VkImageFormatConstraintsInfoFUCHSIA.set_pColorSpaces(segment, 0L, value); } + /// Sets `pColorSpaces` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA pColorSpacesAt(long index, @CType("const VkSysmemColorSpaceFUCHSIA *") java.lang.foreign.MemorySegment value) { VkImageFormatConstraintsInfoFUCHSIA.set_pColorSpaces(this.segment(), index, value); return this; } + /// Sets `pColorSpaces` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatConstraintsInfoFUCHSIA pColorSpaces(@CType("const VkSysmemColorSpaceFUCHSIA *") java.lang.foreign.MemorySegment value) { VkImageFormatConstraintsInfoFUCHSIA.set_pColorSpaces(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImagePipeSurfaceCreateInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImagePipeSurfaceCreateInfoFUCHSIA.java new file mode 100644 index 00000000..4bd6d42d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImagePipeSurfaceCreateInfoFUCHSIA.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### imagePipeHandle +/// [VarHandle][#VH_imagePipeHandle] - [Getter][#imagePipeHandle()] - [Setter][#imagePipeHandle(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// VkImagePipeSurfaceCreateFlagsFUCHSIA flags; +/// zx_handle_t imagePipeHandle; +/// } VkImagePipeSurfaceCreateInfoFUCHSIA; +/// ``` +public final class VkImagePipeSurfaceCreateInfoFUCHSIA extends Struct { + /// The struct layout of `VkImagePipeSurfaceCreateInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("imagePipeHandle") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `imagePipeHandle` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imagePipeHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imagePipeHandle")); + + /// Creates `VkImagePipeSurfaceCreateInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkImagePipeSurfaceCreateInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImagePipeSurfaceCreateInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImagePipeSurfaceCreateInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImagePipeSurfaceCreateInfoFUCHSIA(segment); } + + /// Creates `VkImagePipeSurfaceCreateInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImagePipeSurfaceCreateInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImagePipeSurfaceCreateInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImagePipeSurfaceCreateInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImagePipeSurfaceCreateInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImagePipeSurfaceCreateInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImagePipeSurfaceCreateInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImagePipeSurfaceCreateInfoFUCHSIA` + public static VkImagePipeSurfaceCreateInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkImagePipeSurfaceCreateInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImagePipeSurfaceCreateInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImagePipeSurfaceCreateInfoFUCHSIA` + public static VkImagePipeSurfaceCreateInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkImagePipeSurfaceCreateInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImagePipeSurfaceCreateInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImagePipeSurfaceCreateInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImagePipeSurfaceCreateInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImagePipeSurfaceCreateInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImagePipeSurfaceCreateFlagsFUCHSIA") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkImagePipeSurfaceCreateFlagsFUCHSIA") int get_flags(MemorySegment segment) { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkImagePipeSurfaceCreateFlagsFUCHSIA") int flagsAt(long index) { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkImagePipeSurfaceCreateFlagsFUCHSIA") int flags() { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkImagePipeSurfaceCreateFlagsFUCHSIA") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkImagePipeSurfaceCreateFlagsFUCHSIA") int value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImagePipeSurfaceCreateInfoFUCHSIA flagsAt(long index, @CType("VkImagePipeSurfaceCreateFlagsFUCHSIA") int value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImagePipeSurfaceCreateInfoFUCHSIA flags(@CType("VkImagePipeSurfaceCreateFlagsFUCHSIA") int value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_flags(this.segment(), value); return this; } + + /// {@return `imagePipeHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("zx_handle_t") int get_imagePipeHandle(MemorySegment segment, long index) { return (int) VH_imagePipeHandle.get(segment, 0L, index); } + /// {@return `imagePipeHandle`} + /// @param segment the segment of the struct + public static @CType("zx_handle_t") int get_imagePipeHandle(MemorySegment segment) { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_imagePipeHandle(segment, 0L); } + /// {@return `imagePipeHandle` at the given index} + /// @param index the index + public @CType("zx_handle_t") int imagePipeHandleAt(long index) { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_imagePipeHandle(this.segment(), index); } + /// {@return `imagePipeHandle`} + public @CType("zx_handle_t") int imagePipeHandle() { return VkImagePipeSurfaceCreateInfoFUCHSIA.get_imagePipeHandle(this.segment()); } + /// Sets `imagePipeHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imagePipeHandle(MemorySegment segment, long index, @CType("zx_handle_t") int value) { VH_imagePipeHandle.set(segment, 0L, index, value); } + /// Sets `imagePipeHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imagePipeHandle(MemorySegment segment, @CType("zx_handle_t") int value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_imagePipeHandle(segment, 0L, value); } + /// Sets `imagePipeHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImagePipeSurfaceCreateInfoFUCHSIA imagePipeHandleAt(long index, @CType("zx_handle_t") int value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_imagePipeHandle(this.segment(), index, value); return this; } + /// Sets `imagePipeHandle` with the given value. + /// @param value the value + /// @return `this` + public VkImagePipeSurfaceCreateInfoFUCHSIA imagePipeHandle(@CType("zx_handle_t") int value) { VkImagePipeSurfaceCreateInfoFUCHSIA.set_imagePipeHandle(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImportMemoryBufferCollectionFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImportMemoryBufferCollectionFUCHSIA.java new file mode 100644 index 00000000..c1a87aa2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImportMemoryBufferCollectionFUCHSIA.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### collection +/// [VarHandle][#VH_collection] - [Getter][#collection()] - [Setter][#collection(java.lang.foreign.MemorySegment)] +/// ### index +/// [VarHandle][#VH_index] - [Getter][#index()] - [Setter][#index(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMemoryBufferCollectionFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// VkBufferCollectionFUCHSIA collection; +/// uint32_t index; +/// } VkImportMemoryBufferCollectionFUCHSIA; +/// ``` +public final class VkImportMemoryBufferCollectionFUCHSIA extends Struct { + /// The struct layout of `VkImportMemoryBufferCollectionFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("collection"), + ValueLayout.JAVA_INT.withName("index") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `collection` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_collection = LAYOUT.arrayElementVarHandle(PathElement.groupElement("collection")); + /// The [VarHandle] of `index` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_index = LAYOUT.arrayElementVarHandle(PathElement.groupElement("index")); + + /// Creates `VkImportMemoryBufferCollectionFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkImportMemoryBufferCollectionFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMemoryBufferCollectionFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryBufferCollectionFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryBufferCollectionFUCHSIA(segment); } + + /// Creates `VkImportMemoryBufferCollectionFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryBufferCollectionFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryBufferCollectionFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMemoryBufferCollectionFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryBufferCollectionFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryBufferCollectionFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMemoryBufferCollectionFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMemoryBufferCollectionFUCHSIA` + public static VkImportMemoryBufferCollectionFUCHSIA alloc(SegmentAllocator allocator) { return new VkImportMemoryBufferCollectionFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMemoryBufferCollectionFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMemoryBufferCollectionFUCHSIA` + public static VkImportMemoryBufferCollectionFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkImportMemoryBufferCollectionFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMemoryBufferCollectionFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMemoryBufferCollectionFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMemoryBufferCollectionFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMemoryBufferCollectionFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryBufferCollectionFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMemoryBufferCollectionFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryBufferCollectionFUCHSIA sType(@CType("VkStructureType") int value) { VkImportMemoryBufferCollectionFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMemoryBufferCollectionFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMemoryBufferCollectionFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMemoryBufferCollectionFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryBufferCollectionFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryBufferCollectionFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryBufferCollectionFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryBufferCollectionFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryBufferCollectionFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `collection` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment get_collection(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_collection.get(segment, 0L, index); } + /// {@return `collection`} + /// @param segment the segment of the struct + public static @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment get_collection(MemorySegment segment) { return VkImportMemoryBufferCollectionFUCHSIA.get_collection(segment, 0L); } + /// {@return `collection` at the given index} + /// @param index the index + public @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment collectionAt(long index) { return VkImportMemoryBufferCollectionFUCHSIA.get_collection(this.segment(), index); } + /// {@return `collection`} + public @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment collection() { return VkImportMemoryBufferCollectionFUCHSIA.get_collection(this.segment()); } + /// Sets `collection` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_collection(MemorySegment segment, long index, @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VH_collection.set(segment, 0L, index, value); } + /// Sets `collection` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_collection(MemorySegment segment, @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VkImportMemoryBufferCollectionFUCHSIA.set_collection(segment, 0L, value); } + /// Sets `collection` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryBufferCollectionFUCHSIA collectionAt(long index, @CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VkImportMemoryBufferCollectionFUCHSIA.set_collection(this.segment(), index, value); return this; } + /// Sets `collection` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryBufferCollectionFUCHSIA collection(@CType("VkBufferCollectionFUCHSIA") java.lang.foreign.MemorySegment value) { VkImportMemoryBufferCollectionFUCHSIA.set_collection(this.segment(), value); return this; } + + /// {@return `index` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_index(MemorySegment segment, long index) { return (int) VH_index.get(segment, 0L, index); } + /// {@return `index`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_index(MemorySegment segment) { return VkImportMemoryBufferCollectionFUCHSIA.get_index(segment, 0L); } + /// {@return `index` at the given index} + /// @param index the index + public @CType("uint32_t") int indexAt(long index) { return VkImportMemoryBufferCollectionFUCHSIA.get_index(this.segment(), index); } + /// {@return `index`} + public @CType("uint32_t") int index() { return VkImportMemoryBufferCollectionFUCHSIA.get_index(this.segment()); } + /// Sets `index` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_index(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_index.set(segment, 0L, index, value); } + /// Sets `index` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_index(MemorySegment segment, @CType("uint32_t") int value) { VkImportMemoryBufferCollectionFUCHSIA.set_index(segment, 0L, value); } + /// Sets `index` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryBufferCollectionFUCHSIA indexAt(long index, @CType("uint32_t") int value) { VkImportMemoryBufferCollectionFUCHSIA.set_index(this.segment(), index, value); return this; } + /// Sets `index` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryBufferCollectionFUCHSIA index(@CType("uint32_t") int value) { VkImportMemoryBufferCollectionFUCHSIA.set_index(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImportMemoryZirconHandleInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImportMemoryZirconHandleInfoFUCHSIA.java new file mode 100644 index 00000000..cf8b56ea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImportMemoryZirconHandleInfoFUCHSIA.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### handle +/// [VarHandle][#VH_handle] - [Getter][#handle()] - [Setter][#handle(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMemoryZirconHandleInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// zx_handle_t handle; +/// } VkImportMemoryZirconHandleInfoFUCHSIA; +/// ``` +public final class VkImportMemoryZirconHandleInfoFUCHSIA extends Struct { + /// The struct layout of `VkImportMemoryZirconHandleInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.JAVA_INT.withName("handle") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `handle` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handle")); + + /// Creates `VkImportMemoryZirconHandleInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkImportMemoryZirconHandleInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMemoryZirconHandleInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryZirconHandleInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryZirconHandleInfoFUCHSIA(segment); } + + /// Creates `VkImportMemoryZirconHandleInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryZirconHandleInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryZirconHandleInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMemoryZirconHandleInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryZirconHandleInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryZirconHandleInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMemoryZirconHandleInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMemoryZirconHandleInfoFUCHSIA` + public static VkImportMemoryZirconHandleInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkImportMemoryZirconHandleInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMemoryZirconHandleInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMemoryZirconHandleInfoFUCHSIA` + public static VkImportMemoryZirconHandleInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkImportMemoryZirconHandleInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMemoryZirconHandleInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMemoryZirconHandleInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMemoryZirconHandleInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryZirconHandleInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryZirconHandleInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMemoryZirconHandleInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMemoryZirconHandleInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMemoryZirconHandleInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryZirconHandleInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryZirconHandleInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportMemoryZirconHandleInfoFUCHSIA.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportMemoryZirconHandleInfoFUCHSIA.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkImportMemoryZirconHandleInfoFUCHSIA.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryZirconHandleInfoFUCHSIA handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryZirconHandleInfoFUCHSIA handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_handleType(this.segment(), value); return this; } + + /// {@return `handle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("zx_handle_t") int get_handle(MemorySegment segment, long index) { return (int) VH_handle.get(segment, 0L, index); } + /// {@return `handle`} + /// @param segment the segment of the struct + public static @CType("zx_handle_t") int get_handle(MemorySegment segment) { return VkImportMemoryZirconHandleInfoFUCHSIA.get_handle(segment, 0L); } + /// {@return `handle` at the given index} + /// @param index the index + public @CType("zx_handle_t") int handleAt(long index) { return VkImportMemoryZirconHandleInfoFUCHSIA.get_handle(this.segment(), index); } + /// {@return `handle`} + public @CType("zx_handle_t") int handle() { return VkImportMemoryZirconHandleInfoFUCHSIA.get_handle(this.segment()); } + /// Sets `handle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handle(MemorySegment segment, long index, @CType("zx_handle_t") int value) { VH_handle.set(segment, 0L, index, value); } + /// Sets `handle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handle(MemorySegment segment, @CType("zx_handle_t") int value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_handle(segment, 0L, value); } + /// Sets `handle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryZirconHandleInfoFUCHSIA handleAt(long index, @CType("zx_handle_t") int value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_handle(this.segment(), index, value); return this; } + /// Sets `handle` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryZirconHandleInfoFUCHSIA handle(@CType("zx_handle_t") int value) { VkImportMemoryZirconHandleInfoFUCHSIA.set_handle(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImportSemaphoreZirconHandleInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImportSemaphoreZirconHandleInfoFUCHSIA.java new file mode 100644 index 00000000..a05532ed --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkImportSemaphoreZirconHandleInfoFUCHSIA.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### zirconHandle +/// [VarHandle][#VH_zirconHandle] - [Getter][#zirconHandle()] - [Setter][#zirconHandle(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// VkSemaphoreImportFlags flags; +/// VkExternalSemaphoreHandleTypeFlagBits handleType; +/// zx_handle_t zirconHandle; +/// } VkImportSemaphoreZirconHandleInfoFUCHSIA; +/// ``` +public final class VkImportSemaphoreZirconHandleInfoFUCHSIA extends Struct { + /// The struct layout of `VkImportSemaphoreZirconHandleInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.JAVA_INT.withName("zirconHandle") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `zirconHandle` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_zirconHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("zirconHandle")); + + /// Creates `VkImportSemaphoreZirconHandleInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkImportSemaphoreZirconHandleInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportSemaphoreZirconHandleInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreZirconHandleInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreZirconHandleInfoFUCHSIA(segment); } + + /// Creates `VkImportSemaphoreZirconHandleInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreZirconHandleInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreZirconHandleInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportSemaphoreZirconHandleInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreZirconHandleInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreZirconHandleInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportSemaphoreZirconHandleInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportSemaphoreZirconHandleInfoFUCHSIA` + public static VkImportSemaphoreZirconHandleInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkImportSemaphoreZirconHandleInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportSemaphoreZirconHandleInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportSemaphoreZirconHandleInfoFUCHSIA` + public static VkImportSemaphoreZirconHandleInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkImportSemaphoreZirconHandleInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_semaphore(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphoreImportFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSemaphoreImportFlags") int get_flags(MemorySegment segment) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSemaphoreImportFlags") int flagsAt(long index) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSemaphoreImportFlags") int flags() { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSemaphoreImportFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSemaphoreImportFlags") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA flagsAt(long index, @CType("VkSemaphoreImportFlags") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA flags(@CType("VkSemaphoreImportFlags") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_flags(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleType() { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA handleTypeAt(long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA handleType(@CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_handleType(this.segment(), value); return this; } + + /// {@return `zirconHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("zx_handle_t") int get_zirconHandle(MemorySegment segment, long index) { return (int) VH_zirconHandle.get(segment, 0L, index); } + /// {@return `zirconHandle`} + /// @param segment the segment of the struct + public static @CType("zx_handle_t") int get_zirconHandle(MemorySegment segment) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_zirconHandle(segment, 0L); } + /// {@return `zirconHandle` at the given index} + /// @param index the index + public @CType("zx_handle_t") int zirconHandleAt(long index) { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_zirconHandle(this.segment(), index); } + /// {@return `zirconHandle`} + public @CType("zx_handle_t") int zirconHandle() { return VkImportSemaphoreZirconHandleInfoFUCHSIA.get_zirconHandle(this.segment()); } + /// Sets `zirconHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_zirconHandle(MemorySegment segment, long index, @CType("zx_handle_t") int value) { VH_zirconHandle.set(segment, 0L, index, value); } + /// Sets `zirconHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_zirconHandle(MemorySegment segment, @CType("zx_handle_t") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_zirconHandle(segment, 0L, value); } + /// Sets `zirconHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA zirconHandleAt(long index, @CType("zx_handle_t") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_zirconHandle(this.segment(), index, value); return this; } + /// Sets `zirconHandle` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreZirconHandleInfoFUCHSIA zirconHandle(@CType("zx_handle_t") int value) { VkImportSemaphoreZirconHandleInfoFUCHSIA.set_zirconHandle(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkMemoryGetZirconHandleInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkMemoryGetZirconHandleInfoFUCHSIA.java new file mode 100644 index 00000000..9571dcc4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkMemoryGetZirconHandleInfoFUCHSIA.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryGetZirconHandleInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceMemory memory; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// } VkMemoryGetZirconHandleInfoFUCHSIA; +/// ``` +public final class VkMemoryGetZirconHandleInfoFUCHSIA extends Struct { + /// The struct layout of `VkMemoryGetZirconHandleInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkMemoryGetZirconHandleInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkMemoryGetZirconHandleInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryGetZirconHandleInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetZirconHandleInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetZirconHandleInfoFUCHSIA(segment); } + + /// Creates `VkMemoryGetZirconHandleInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetZirconHandleInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetZirconHandleInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryGetZirconHandleInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetZirconHandleInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetZirconHandleInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryGetZirconHandleInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryGetZirconHandleInfoFUCHSIA` + public static VkMemoryGetZirconHandleInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkMemoryGetZirconHandleInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryGetZirconHandleInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryGetZirconHandleInfoFUCHSIA` + public static VkMemoryGetZirconHandleInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkMemoryGetZirconHandleInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryGetZirconHandleInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryGetZirconHandleInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryGetZirconHandleInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetZirconHandleInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetZirconHandleInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryGetZirconHandleInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryGetZirconHandleInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryGetZirconHandleInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetZirconHandleInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetZirconHandleInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkMemoryGetZirconHandleInfoFUCHSIA.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkMemoryGetZirconHandleInfoFUCHSIA.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkMemoryGetZirconHandleInfoFUCHSIA.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetZirconHandleInfoFUCHSIA memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetZirconHandleInfoFUCHSIA memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_memory(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkMemoryGetZirconHandleInfoFUCHSIA.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkMemoryGetZirconHandleInfoFUCHSIA.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkMemoryGetZirconHandleInfoFUCHSIA.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetZirconHandleInfoFUCHSIA handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetZirconHandleInfoFUCHSIA handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetZirconHandleInfoFUCHSIA.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkMemoryZirconHandlePropertiesFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkMemoryZirconHandlePropertiesFUCHSIA.java new file mode 100644 index 00000000..378e6be2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkMemoryZirconHandlePropertiesFUCHSIA.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryTypeBits +/// [VarHandle][#VH_memoryTypeBits] - [Getter][#memoryTypeBits()] - [Setter][#memoryTypeBits(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryZirconHandlePropertiesFUCHSIA { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t memoryTypeBits; +/// } VkMemoryZirconHandlePropertiesFUCHSIA; +/// ``` +public final class VkMemoryZirconHandlePropertiesFUCHSIA extends Struct { + /// The struct layout of `VkMemoryZirconHandlePropertiesFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryTypeBits") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryTypeBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeBits")); + + /// Creates `VkMemoryZirconHandlePropertiesFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkMemoryZirconHandlePropertiesFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryZirconHandlePropertiesFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryZirconHandlePropertiesFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryZirconHandlePropertiesFUCHSIA(segment); } + + /// Creates `VkMemoryZirconHandlePropertiesFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryZirconHandlePropertiesFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryZirconHandlePropertiesFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryZirconHandlePropertiesFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryZirconHandlePropertiesFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryZirconHandlePropertiesFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryZirconHandlePropertiesFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryZirconHandlePropertiesFUCHSIA` + public static VkMemoryZirconHandlePropertiesFUCHSIA alloc(SegmentAllocator allocator) { return new VkMemoryZirconHandlePropertiesFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryZirconHandlePropertiesFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryZirconHandlePropertiesFUCHSIA` + public static VkMemoryZirconHandlePropertiesFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkMemoryZirconHandlePropertiesFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryZirconHandlePropertiesFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryZirconHandlePropertiesFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryZirconHandlePropertiesFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryZirconHandlePropertiesFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryZirconHandlePropertiesFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryZirconHandlePropertiesFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryZirconHandlePropertiesFUCHSIA sType(@CType("VkStructureType") int value) { VkMemoryZirconHandlePropertiesFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryZirconHandlePropertiesFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryZirconHandlePropertiesFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryZirconHandlePropertiesFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryZirconHandlePropertiesFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryZirconHandlePropertiesFUCHSIA pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryZirconHandlePropertiesFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryZirconHandlePropertiesFUCHSIA pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryZirconHandlePropertiesFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryTypeBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment, long index) { return (int) VH_memoryTypeBits.get(segment, 0L, index); } + /// {@return `memoryTypeBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment) { return VkMemoryZirconHandlePropertiesFUCHSIA.get_memoryTypeBits(segment, 0L); } + /// {@return `memoryTypeBits` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeBitsAt(long index) { return VkMemoryZirconHandlePropertiesFUCHSIA.get_memoryTypeBits(this.segment(), index); } + /// {@return `memoryTypeBits`} + public @CType("uint32_t") int memoryTypeBits() { return VkMemoryZirconHandlePropertiesFUCHSIA.get_memoryTypeBits(this.segment()); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeBits.set(segment, 0L, index, value); } + /// Sets `memoryTypeBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, @CType("uint32_t") int value) { VkMemoryZirconHandlePropertiesFUCHSIA.set_memoryTypeBits(segment, 0L, value); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryZirconHandlePropertiesFUCHSIA memoryTypeBitsAt(long index, @CType("uint32_t") int value) { VkMemoryZirconHandlePropertiesFUCHSIA.set_memoryTypeBits(this.segment(), index, value); return this; } + /// Sets `memoryTypeBits` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryZirconHandlePropertiesFUCHSIA memoryTypeBits(@CType("uint32_t") int value) { VkMemoryZirconHandlePropertiesFUCHSIA.set_memoryTypeBits(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkSemaphoreGetZirconHandleInfoFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkSemaphoreGetZirconHandleInfoFUCHSIA.java new file mode 100644 index 00000000..aae3cbf7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkSemaphoreGetZirconHandleInfoFUCHSIA.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreGetZirconHandleInfoFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// VkExternalSemaphoreHandleTypeFlagBits handleType; +/// } VkSemaphoreGetZirconHandleInfoFUCHSIA; +/// ``` +public final class VkSemaphoreGetZirconHandleInfoFUCHSIA extends Struct { + /// The struct layout of `VkSemaphoreGetZirconHandleInfoFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkSemaphoreGetZirconHandleInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkSemaphoreGetZirconHandleInfoFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreGetZirconHandleInfoFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetZirconHandleInfoFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetZirconHandleInfoFUCHSIA(segment); } + + /// Creates `VkSemaphoreGetZirconHandleInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetZirconHandleInfoFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetZirconHandleInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreGetZirconHandleInfoFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetZirconHandleInfoFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetZirconHandleInfoFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreGetZirconHandleInfoFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreGetZirconHandleInfoFUCHSIA` + public static VkSemaphoreGetZirconHandleInfoFUCHSIA alloc(SegmentAllocator allocator) { return new VkSemaphoreGetZirconHandleInfoFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreGetZirconHandleInfoFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreGetZirconHandleInfoFUCHSIA` + public static VkSemaphoreGetZirconHandleInfoFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreGetZirconHandleInfoFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetZirconHandleInfoFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetZirconHandleInfoFUCHSIA sType(@CType("VkStructureType") int value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetZirconHandleInfoFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetZirconHandleInfoFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetZirconHandleInfoFUCHSIA semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetZirconHandleInfoFUCHSIA semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_semaphore(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleTypeAt(long index) { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleType() { return VkSemaphoreGetZirconHandleInfoFUCHSIA.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetZirconHandleInfoFUCHSIA handleTypeAt(long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetZirconHandleInfoFUCHSIA handleType(@CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetZirconHandleInfoFUCHSIA.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkSysmemColorSpaceFUCHSIA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkSysmemColorSpaceFUCHSIA.java new file mode 100644 index 00000000..ebea46ba --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/fuchsia/struct/VkSysmemColorSpaceFUCHSIA.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.fuchsia.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### colorSpace +/// [VarHandle][#VH_colorSpace] - [Getter][#colorSpace()] - [Setter][#colorSpace(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSysmemColorSpaceFUCHSIA { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t colorSpace; +/// } VkSysmemColorSpaceFUCHSIA; +/// ``` +public final class VkSysmemColorSpaceFUCHSIA extends Struct { + /// The struct layout of `VkSysmemColorSpaceFUCHSIA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("colorSpace") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `colorSpace` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorSpace = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorSpace")); + + /// Creates `VkSysmemColorSpaceFUCHSIA` with the given segment. + /// @param segment the memory segment + public VkSysmemColorSpaceFUCHSIA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSysmemColorSpaceFUCHSIA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSysmemColorSpaceFUCHSIA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSysmemColorSpaceFUCHSIA(segment); } + + /// Creates `VkSysmemColorSpaceFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSysmemColorSpaceFUCHSIA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSysmemColorSpaceFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSysmemColorSpaceFUCHSIA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSysmemColorSpaceFUCHSIA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSysmemColorSpaceFUCHSIA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSysmemColorSpaceFUCHSIA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSysmemColorSpaceFUCHSIA` + public static VkSysmemColorSpaceFUCHSIA alloc(SegmentAllocator allocator) { return new VkSysmemColorSpaceFUCHSIA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSysmemColorSpaceFUCHSIA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSysmemColorSpaceFUCHSIA` + public static VkSysmemColorSpaceFUCHSIA alloc(SegmentAllocator allocator, long count) { return new VkSysmemColorSpaceFUCHSIA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSysmemColorSpaceFUCHSIA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSysmemColorSpaceFUCHSIA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSysmemColorSpaceFUCHSIA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSysmemColorSpaceFUCHSIA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSysmemColorSpaceFUCHSIA sTypeAt(long index, @CType("VkStructureType") int value) { VkSysmemColorSpaceFUCHSIA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSysmemColorSpaceFUCHSIA sType(@CType("VkStructureType") int value) { VkSysmemColorSpaceFUCHSIA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSysmemColorSpaceFUCHSIA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSysmemColorSpaceFUCHSIA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSysmemColorSpaceFUCHSIA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSysmemColorSpaceFUCHSIA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSysmemColorSpaceFUCHSIA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSysmemColorSpaceFUCHSIA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSysmemColorSpaceFUCHSIA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSysmemColorSpaceFUCHSIA.set_pNext(this.segment(), value); return this; } + + /// {@return `colorSpace` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorSpace(MemorySegment segment, long index) { return (int) VH_colorSpace.get(segment, 0L, index); } + /// {@return `colorSpace`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorSpace(MemorySegment segment) { return VkSysmemColorSpaceFUCHSIA.get_colorSpace(segment, 0L); } + /// {@return `colorSpace` at the given index} + /// @param index the index + public @CType("uint32_t") int colorSpaceAt(long index) { return VkSysmemColorSpaceFUCHSIA.get_colorSpace(this.segment(), index); } + /// {@return `colorSpace`} + public @CType("uint32_t") int colorSpace() { return VkSysmemColorSpaceFUCHSIA.get_colorSpace(this.segment()); } + /// Sets `colorSpace` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorSpace(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorSpace.set(segment, 0L, index, value); } + /// Sets `colorSpace` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorSpace(MemorySegment segment, @CType("uint32_t") int value) { VkSysmemColorSpaceFUCHSIA.set_colorSpace(segment, 0L, value); } + /// Sets `colorSpace` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSysmemColorSpaceFUCHSIA colorSpaceAt(long index, @CType("uint32_t") int value) { VkSysmemColorSpaceFUCHSIA.set_colorSpace(this.segment(), index, value); return this; } + /// Sets `colorSpace` with the given value. + /// @param value the value + /// @return `this` + public VkSysmemColorSpaceFUCHSIA colorSpace(@CType("uint32_t") int value) { VkSysmemColorSpaceFUCHSIA.set_colorSpace(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/VKGGPFrameToken.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/VKGGPFrameToken.java new file mode 100644 index 00000000..cbbdfd60 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/VKGGPFrameToken.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ggp; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKGGPFrameToken { + public static final int VK_GGP_FRAME_TOKEN_SPEC_VERSION = 1; + public static final String VK_GGP_FRAME_TOKEN_EXTENSION_NAME = "VK_GGP_frame_token"; + public static final int VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP = 1000191000; + + public VKGGPFrameToken(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/VKGGPStreamDescriptorSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/VKGGPStreamDescriptorSurface.java new file mode 100644 index 00000000..e2d446e5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/VKGGPStreamDescriptorSurface.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ggp; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKGGPStreamDescriptorSurface { + public static final int VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION = 1; + public static final String VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME = "VK_GGP_stream_descriptor_surface"; + public static final int VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP = 1000049000; + public static final MethodHandle MH_vkCreateStreamDescriptorSurfaceGGP = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateStreamDescriptorSurfaceGGP; + + public VKGGPStreamDescriptorSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateStreamDescriptorSurfaceGGP = func.invoke(instance, "vkCreateStreamDescriptorSurfaceGGP"); + } + + public @CType("VkResult") int CreateStreamDescriptorSurfaceGGP(@CType("VkInstance") MemorySegment instance, @CType("const VkStreamDescriptorSurfaceCreateInfoGGP *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateStreamDescriptorSurfaceGGP)) throw new SymbolNotFoundError("Symbol not found: vkCreateStreamDescriptorSurfaceGGP"); + try { return (int) MH_vkCreateStreamDescriptorSurfaceGGP.invokeExact(PFN_vkCreateStreamDescriptorSurfaceGGP, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateStreamDescriptorSurfaceGGP", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/struct/VkPresentFrameTokenGGP.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/struct/VkPresentFrameTokenGGP.java new file mode 100644 index 00000000..8ab334ef --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/struct/VkPresentFrameTokenGGP.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ggp.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### frameToken +/// [VarHandle][#VH_frameToken] - [Getter][#frameToken()] - [Setter][#frameToken(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPresentFrameTokenGGP { +/// VkStructureType sType; +/// const void * pNext; +/// GgpFrameToken frameToken; +/// } VkPresentFrameTokenGGP; +/// ``` +public final class VkPresentFrameTokenGGP extends Struct { + /// The struct layout of `VkPresentFrameTokenGGP`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("frameToken") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `frameToken` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_frameToken = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameToken")); + + /// Creates `VkPresentFrameTokenGGP` with the given segment. + /// @param segment the memory segment + public VkPresentFrameTokenGGP(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPresentFrameTokenGGP` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentFrameTokenGGP of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentFrameTokenGGP(segment); } + + /// Creates `VkPresentFrameTokenGGP` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentFrameTokenGGP ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentFrameTokenGGP(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPresentFrameTokenGGP` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentFrameTokenGGP ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentFrameTokenGGP(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPresentFrameTokenGGP` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPresentFrameTokenGGP` + public static VkPresentFrameTokenGGP alloc(SegmentAllocator allocator) { return new VkPresentFrameTokenGGP(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPresentFrameTokenGGP` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPresentFrameTokenGGP` + public static VkPresentFrameTokenGGP alloc(SegmentAllocator allocator, long count) { return new VkPresentFrameTokenGGP(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPresentFrameTokenGGP.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPresentFrameTokenGGP.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPresentFrameTokenGGP.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPresentFrameTokenGGP.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentFrameTokenGGP sTypeAt(long index, @CType("VkStructureType") int value) { VkPresentFrameTokenGGP.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPresentFrameTokenGGP sType(@CType("VkStructureType") int value) { VkPresentFrameTokenGGP.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPresentFrameTokenGGP.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPresentFrameTokenGGP.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPresentFrameTokenGGP.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentFrameTokenGGP.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentFrameTokenGGP pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentFrameTokenGGP.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPresentFrameTokenGGP pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentFrameTokenGGP.set_pNext(this.segment(), value); return this; } + + /// {@return `frameToken` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("GgpFrameToken") java.lang.foreign.MemorySegment get_frameToken(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_frameToken.get(segment, 0L, index); } + /// {@return `frameToken`} + /// @param segment the segment of the struct + public static @CType("GgpFrameToken") java.lang.foreign.MemorySegment get_frameToken(MemorySegment segment) { return VkPresentFrameTokenGGP.get_frameToken(segment, 0L); } + /// {@return `frameToken` at the given index} + /// @param index the index + public @CType("GgpFrameToken") java.lang.foreign.MemorySegment frameTokenAt(long index) { return VkPresentFrameTokenGGP.get_frameToken(this.segment(), index); } + /// {@return `frameToken`} + public @CType("GgpFrameToken") java.lang.foreign.MemorySegment frameToken() { return VkPresentFrameTokenGGP.get_frameToken(this.segment()); } + /// Sets `frameToken` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameToken(MemorySegment segment, long index, @CType("GgpFrameToken") java.lang.foreign.MemorySegment value) { VH_frameToken.set(segment, 0L, index, value); } + /// Sets `frameToken` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameToken(MemorySegment segment, @CType("GgpFrameToken") java.lang.foreign.MemorySegment value) { VkPresentFrameTokenGGP.set_frameToken(segment, 0L, value); } + /// Sets `frameToken` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentFrameTokenGGP frameTokenAt(long index, @CType("GgpFrameToken") java.lang.foreign.MemorySegment value) { VkPresentFrameTokenGGP.set_frameToken(this.segment(), index, value); return this; } + /// Sets `frameToken` with the given value. + /// @param value the value + /// @return `this` + public VkPresentFrameTokenGGP frameToken(@CType("GgpFrameToken") java.lang.foreign.MemorySegment value) { VkPresentFrameTokenGGP.set_frameToken(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/struct/VkStreamDescriptorSurfaceCreateInfoGGP.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/struct/VkStreamDescriptorSurfaceCreateInfoGGP.java new file mode 100644 index 00000000..c8d25303 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/ggp/struct/VkStreamDescriptorSurfaceCreateInfoGGP.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.ggp.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### streamDescriptor +/// [VarHandle][#VH_streamDescriptor] - [Getter][#streamDescriptor()] - [Setter][#streamDescriptor(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkStreamDescriptorSurfaceCreateInfoGGP { +/// VkStructureType sType; +/// const void * pNext; +/// VkStreamDescriptorSurfaceCreateFlagsGGP flags; +/// GgpStreamDescriptor streamDescriptor; +/// } VkStreamDescriptorSurfaceCreateInfoGGP; +/// ``` +public final class VkStreamDescriptorSurfaceCreateInfoGGP extends Struct { + /// The struct layout of `VkStreamDescriptorSurfaceCreateInfoGGP`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("streamDescriptor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `streamDescriptor` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_streamDescriptor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("streamDescriptor")); + + /// Creates `VkStreamDescriptorSurfaceCreateInfoGGP` with the given segment. + /// @param segment the memory segment + public VkStreamDescriptorSurfaceCreateInfoGGP(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkStreamDescriptorSurfaceCreateInfoGGP` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkStreamDescriptorSurfaceCreateInfoGGP of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkStreamDescriptorSurfaceCreateInfoGGP(segment); } + + /// Creates `VkStreamDescriptorSurfaceCreateInfoGGP` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkStreamDescriptorSurfaceCreateInfoGGP ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkStreamDescriptorSurfaceCreateInfoGGP(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkStreamDescriptorSurfaceCreateInfoGGP` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkStreamDescriptorSurfaceCreateInfoGGP ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkStreamDescriptorSurfaceCreateInfoGGP(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkStreamDescriptorSurfaceCreateInfoGGP` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkStreamDescriptorSurfaceCreateInfoGGP` + public static VkStreamDescriptorSurfaceCreateInfoGGP alloc(SegmentAllocator allocator) { return new VkStreamDescriptorSurfaceCreateInfoGGP(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkStreamDescriptorSurfaceCreateInfoGGP` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkStreamDescriptorSurfaceCreateInfoGGP` + public static VkStreamDescriptorSurfaceCreateInfoGGP alloc(SegmentAllocator allocator, long count) { return new VkStreamDescriptorSurfaceCreateInfoGGP(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkStreamDescriptorSurfaceCreateInfoGGP.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkStreamDescriptorSurfaceCreateInfoGGP.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkStreamDescriptorSurfaceCreateInfoGGP.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStreamDescriptorSurfaceCreateInfoGGP sTypeAt(long index, @CType("VkStructureType") int value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkStreamDescriptorSurfaceCreateInfoGGP sType(@CType("VkStructureType") int value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkStreamDescriptorSurfaceCreateInfoGGP.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkStreamDescriptorSurfaceCreateInfoGGP.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkStreamDescriptorSurfaceCreateInfoGGP.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStreamDescriptorSurfaceCreateInfoGGP pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkStreamDescriptorSurfaceCreateInfoGGP pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStreamDescriptorSurfaceCreateFlagsGGP") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkStreamDescriptorSurfaceCreateFlagsGGP") int get_flags(MemorySegment segment) { return VkStreamDescriptorSurfaceCreateInfoGGP.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkStreamDescriptorSurfaceCreateFlagsGGP") int flagsAt(long index) { return VkStreamDescriptorSurfaceCreateInfoGGP.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkStreamDescriptorSurfaceCreateFlagsGGP") int flags() { return VkStreamDescriptorSurfaceCreateInfoGGP.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkStreamDescriptorSurfaceCreateFlagsGGP") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkStreamDescriptorSurfaceCreateFlagsGGP") int value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStreamDescriptorSurfaceCreateInfoGGP flagsAt(long index, @CType("VkStreamDescriptorSurfaceCreateFlagsGGP") int value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkStreamDescriptorSurfaceCreateInfoGGP flags(@CType("VkStreamDescriptorSurfaceCreateFlagsGGP") int value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_flags(this.segment(), value); return this; } + + /// {@return `streamDescriptor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("GgpStreamDescriptor") java.lang.foreign.MemorySegment get_streamDescriptor(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_streamDescriptor.get(segment, 0L, index); } + /// {@return `streamDescriptor`} + /// @param segment the segment of the struct + public static @CType("GgpStreamDescriptor") java.lang.foreign.MemorySegment get_streamDescriptor(MemorySegment segment) { return VkStreamDescriptorSurfaceCreateInfoGGP.get_streamDescriptor(segment, 0L); } + /// {@return `streamDescriptor` at the given index} + /// @param index the index + public @CType("GgpStreamDescriptor") java.lang.foreign.MemorySegment streamDescriptorAt(long index) { return VkStreamDescriptorSurfaceCreateInfoGGP.get_streamDescriptor(this.segment(), index); } + /// {@return `streamDescriptor`} + public @CType("GgpStreamDescriptor") java.lang.foreign.MemorySegment streamDescriptor() { return VkStreamDescriptorSurfaceCreateInfoGGP.get_streamDescriptor(this.segment()); } + /// Sets `streamDescriptor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_streamDescriptor(MemorySegment segment, long index, @CType("GgpStreamDescriptor") java.lang.foreign.MemorySegment value) { VH_streamDescriptor.set(segment, 0L, index, value); } + /// Sets `streamDescriptor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_streamDescriptor(MemorySegment segment, @CType("GgpStreamDescriptor") java.lang.foreign.MemorySegment value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_streamDescriptor(segment, 0L, value); } + /// Sets `streamDescriptor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStreamDescriptorSurfaceCreateInfoGGP streamDescriptorAt(long index, @CType("GgpStreamDescriptor") java.lang.foreign.MemorySegment value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_streamDescriptor(this.segment(), index, value); return this; } + /// Sets `streamDescriptor` with the given value. + /// @param value the value + /// @return `this` + public VkStreamDescriptorSurfaceCreateInfoGGP streamDescriptor(@CType("GgpStreamDescriptor") java.lang.foreign.MemorySegment value) { VkStreamDescriptorSurfaceCreateInfoGGP.set_streamDescriptor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEDecorateString.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEDecorateString.java new file mode 100644 index 00000000..cdcb69d2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEDecorateString.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.google; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKGOOGLEDecorateString { + public static final int VK_GOOGLE_DECORATE_STRING_SPEC_VERSION = 1; + public static final String VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME = "VK_GOOGLE_decorate_string"; + + public VKGOOGLEDecorateString(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEDisplayTiming.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEDisplayTiming.java new file mode 100644 index 00000000..361c2e60 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEDisplayTiming.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.google; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKGOOGLEDisplayTiming { + public static final int VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION = 1; + public static final String VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME = "VK_GOOGLE_display_timing"; + public static final int VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000; + public static final MethodHandle MH_vkGetRefreshCycleDurationGOOGLE = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPastPresentationTimingGOOGLE = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetRefreshCycleDurationGOOGLE; + public final MemorySegment PFN_vkGetPastPresentationTimingGOOGLE; + + public VKGOOGLEDisplayTiming(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetRefreshCycleDurationGOOGLE = func.invoke(device, "vkGetRefreshCycleDurationGOOGLE"); + PFN_vkGetPastPresentationTimingGOOGLE = func.invoke(device, "vkGetPastPresentationTimingGOOGLE"); + } + + public @CType("VkResult") int GetRefreshCycleDurationGOOGLE(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("VkRefreshCycleDurationGOOGLE *") MemorySegment pDisplayTimingProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetRefreshCycleDurationGOOGLE)) throw new SymbolNotFoundError("Symbol not found: vkGetRefreshCycleDurationGOOGLE"); + try { return (int) MH_vkGetRefreshCycleDurationGOOGLE.invokeExact(PFN_vkGetRefreshCycleDurationGOOGLE, device, swapchain, pDisplayTimingProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetRefreshCycleDurationGOOGLE", e); } + } + + public @CType("VkResult") int GetPastPresentationTimingGOOGLE(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("uint32_t *") MemorySegment pPresentationTimingCount, @CType("VkPastPresentationTimingGOOGLE *") MemorySegment pPresentationTimings) { + if (Unmarshal.isNullPointer(PFN_vkGetPastPresentationTimingGOOGLE)) throw new SymbolNotFoundError("Symbol not found: vkGetPastPresentationTimingGOOGLE"); + try { return (int) MH_vkGetPastPresentationTimingGOOGLE.invokeExact(PFN_vkGetPastPresentationTimingGOOGLE, device, swapchain, pPresentationTimingCount, pPresentationTimings); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPastPresentationTimingGOOGLE", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEHlslFunctionality1.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEHlslFunctionality1.java new file mode 100644 index 00000000..87fafb4a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEHlslFunctionality1.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.google; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.google.VKGOOGLEHlslFunctionality1.*; +public class VKGOOGLEHlslFunctionality1 { + public static final int VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION = 1; + public static final String VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME = "VK_GOOGLE_hlsl_functionality1"; + public static final int VK_GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION = VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION; + public static final String VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME = VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME; + + public VKGOOGLEHlslFunctionality1(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLESurfacelessQuery.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLESurfacelessQuery.java new file mode 100644 index 00000000..6a299837 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLESurfacelessQuery.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.google; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKGOOGLESurfacelessQuery { + public static final int VK_GOOGLE_SURFACELESS_QUERY_SPEC_VERSION = 2; + public static final String VK_GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME = "VK_GOOGLE_surfaceless_query"; + + public VKGOOGLESurfacelessQuery(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEUserType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEUserType.java new file mode 100644 index 00000000..92133e82 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/VKGOOGLEUserType.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.google; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKGOOGLEUserType { + public static final int VK_GOOGLE_USER_TYPE_SPEC_VERSION = 1; + public static final String VK_GOOGLE_USER_TYPE_EXTENSION_NAME = "VK_GOOGLE_user_type"; + + public VKGOOGLEUserType(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkPastPresentationTimingGOOGLE.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkPastPresentationTimingGOOGLE.java new file mode 100644 index 00000000..e7c1df95 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkPastPresentationTimingGOOGLE.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.google.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### presentID +/// [VarHandle][#VH_presentID] - [Getter][#presentID()] - [Setter][#presentID(int)] +/// ### desiredPresentTime +/// [VarHandle][#VH_desiredPresentTime] - [Getter][#desiredPresentTime()] - [Setter][#desiredPresentTime(long)] +/// ### actualPresentTime +/// [VarHandle][#VH_actualPresentTime] - [Getter][#actualPresentTime()] - [Setter][#actualPresentTime(long)] +/// ### earliestPresentTime +/// [VarHandle][#VH_earliestPresentTime] - [Getter][#earliestPresentTime()] - [Setter][#earliestPresentTime(long)] +/// ### presentMargin +/// [VarHandle][#VH_presentMargin] - [Getter][#presentMargin()] - [Setter][#presentMargin(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPastPresentationTimingGOOGLE { +/// uint32_t presentID; +/// uint64_t desiredPresentTime; +/// uint64_t actualPresentTime; +/// uint64_t earliestPresentTime; +/// uint64_t presentMargin; +/// } VkPastPresentationTimingGOOGLE; +/// ``` +public final class VkPastPresentationTimingGOOGLE extends Struct { + /// The struct layout of `VkPastPresentationTimingGOOGLE`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("presentID"), + ValueLayout.JAVA_LONG.withName("desiredPresentTime"), + ValueLayout.JAVA_LONG.withName("actualPresentTime"), + ValueLayout.JAVA_LONG.withName("earliestPresentTime"), + ValueLayout.JAVA_LONG.withName("presentMargin") + ); + /// The [VarHandle] of `presentID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentID")); + /// The [VarHandle] of `desiredPresentTime` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_desiredPresentTime = LAYOUT.arrayElementVarHandle(PathElement.groupElement("desiredPresentTime")); + /// The [VarHandle] of `actualPresentTime` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_actualPresentTime = LAYOUT.arrayElementVarHandle(PathElement.groupElement("actualPresentTime")); + /// The [VarHandle] of `earliestPresentTime` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_earliestPresentTime = LAYOUT.arrayElementVarHandle(PathElement.groupElement("earliestPresentTime")); + /// The [VarHandle] of `presentMargin` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_presentMargin = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentMargin")); + + /// Creates `VkPastPresentationTimingGOOGLE` with the given segment. + /// @param segment the memory segment + public VkPastPresentationTimingGOOGLE(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPastPresentationTimingGOOGLE` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPastPresentationTimingGOOGLE of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPastPresentationTimingGOOGLE(segment); } + + /// Creates `VkPastPresentationTimingGOOGLE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPastPresentationTimingGOOGLE ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPastPresentationTimingGOOGLE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPastPresentationTimingGOOGLE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPastPresentationTimingGOOGLE ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPastPresentationTimingGOOGLE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPastPresentationTimingGOOGLE` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPastPresentationTimingGOOGLE` + public static VkPastPresentationTimingGOOGLE alloc(SegmentAllocator allocator) { return new VkPastPresentationTimingGOOGLE(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPastPresentationTimingGOOGLE` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPastPresentationTimingGOOGLE` + public static VkPastPresentationTimingGOOGLE alloc(SegmentAllocator allocator, long count) { return new VkPastPresentationTimingGOOGLE(allocator.allocate(LAYOUT, count)); } + + /// {@return `presentID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_presentID(MemorySegment segment, long index) { return (int) VH_presentID.get(segment, 0L, index); } + /// {@return `presentID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_presentID(MemorySegment segment) { return VkPastPresentationTimingGOOGLE.get_presentID(segment, 0L); } + /// {@return `presentID` at the given index} + /// @param index the index + public @CType("uint32_t") int presentIDAt(long index) { return VkPastPresentationTimingGOOGLE.get_presentID(this.segment(), index); } + /// {@return `presentID`} + public @CType("uint32_t") int presentID() { return VkPastPresentationTimingGOOGLE.get_presentID(this.segment()); } + /// Sets `presentID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_presentID.set(segment, 0L, index, value); } + /// Sets `presentID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentID(MemorySegment segment, @CType("uint32_t") int value) { VkPastPresentationTimingGOOGLE.set_presentID(segment, 0L, value); } + /// Sets `presentID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPastPresentationTimingGOOGLE presentIDAt(long index, @CType("uint32_t") int value) { VkPastPresentationTimingGOOGLE.set_presentID(this.segment(), index, value); return this; } + /// Sets `presentID` with the given value. + /// @param value the value + /// @return `this` + public VkPastPresentationTimingGOOGLE presentID(@CType("uint32_t") int value) { VkPastPresentationTimingGOOGLE.set_presentID(this.segment(), value); return this; } + + /// {@return `desiredPresentTime` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_desiredPresentTime(MemorySegment segment, long index) { return (long) VH_desiredPresentTime.get(segment, 0L, index); } + /// {@return `desiredPresentTime`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_desiredPresentTime(MemorySegment segment) { return VkPastPresentationTimingGOOGLE.get_desiredPresentTime(segment, 0L); } + /// {@return `desiredPresentTime` at the given index} + /// @param index the index + public @CType("uint64_t") long desiredPresentTimeAt(long index) { return VkPastPresentationTimingGOOGLE.get_desiredPresentTime(this.segment(), index); } + /// {@return `desiredPresentTime`} + public @CType("uint64_t") long desiredPresentTime() { return VkPastPresentationTimingGOOGLE.get_desiredPresentTime(this.segment()); } + /// Sets `desiredPresentTime` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_desiredPresentTime(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_desiredPresentTime.set(segment, 0L, index, value); } + /// Sets `desiredPresentTime` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_desiredPresentTime(MemorySegment segment, @CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_desiredPresentTime(segment, 0L, value); } + /// Sets `desiredPresentTime` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPastPresentationTimingGOOGLE desiredPresentTimeAt(long index, @CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_desiredPresentTime(this.segment(), index, value); return this; } + /// Sets `desiredPresentTime` with the given value. + /// @param value the value + /// @return `this` + public VkPastPresentationTimingGOOGLE desiredPresentTime(@CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_desiredPresentTime(this.segment(), value); return this; } + + /// {@return `actualPresentTime` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_actualPresentTime(MemorySegment segment, long index) { return (long) VH_actualPresentTime.get(segment, 0L, index); } + /// {@return `actualPresentTime`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_actualPresentTime(MemorySegment segment) { return VkPastPresentationTimingGOOGLE.get_actualPresentTime(segment, 0L); } + /// {@return `actualPresentTime` at the given index} + /// @param index the index + public @CType("uint64_t") long actualPresentTimeAt(long index) { return VkPastPresentationTimingGOOGLE.get_actualPresentTime(this.segment(), index); } + /// {@return `actualPresentTime`} + public @CType("uint64_t") long actualPresentTime() { return VkPastPresentationTimingGOOGLE.get_actualPresentTime(this.segment()); } + /// Sets `actualPresentTime` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_actualPresentTime(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_actualPresentTime.set(segment, 0L, index, value); } + /// Sets `actualPresentTime` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_actualPresentTime(MemorySegment segment, @CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_actualPresentTime(segment, 0L, value); } + /// Sets `actualPresentTime` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPastPresentationTimingGOOGLE actualPresentTimeAt(long index, @CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_actualPresentTime(this.segment(), index, value); return this; } + /// Sets `actualPresentTime` with the given value. + /// @param value the value + /// @return `this` + public VkPastPresentationTimingGOOGLE actualPresentTime(@CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_actualPresentTime(this.segment(), value); return this; } + + /// {@return `earliestPresentTime` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_earliestPresentTime(MemorySegment segment, long index) { return (long) VH_earliestPresentTime.get(segment, 0L, index); } + /// {@return `earliestPresentTime`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_earliestPresentTime(MemorySegment segment) { return VkPastPresentationTimingGOOGLE.get_earliestPresentTime(segment, 0L); } + /// {@return `earliestPresentTime` at the given index} + /// @param index the index + public @CType("uint64_t") long earliestPresentTimeAt(long index) { return VkPastPresentationTimingGOOGLE.get_earliestPresentTime(this.segment(), index); } + /// {@return `earliestPresentTime`} + public @CType("uint64_t") long earliestPresentTime() { return VkPastPresentationTimingGOOGLE.get_earliestPresentTime(this.segment()); } + /// Sets `earliestPresentTime` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_earliestPresentTime(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_earliestPresentTime.set(segment, 0L, index, value); } + /// Sets `earliestPresentTime` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_earliestPresentTime(MemorySegment segment, @CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_earliestPresentTime(segment, 0L, value); } + /// Sets `earliestPresentTime` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPastPresentationTimingGOOGLE earliestPresentTimeAt(long index, @CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_earliestPresentTime(this.segment(), index, value); return this; } + /// Sets `earliestPresentTime` with the given value. + /// @param value the value + /// @return `this` + public VkPastPresentationTimingGOOGLE earliestPresentTime(@CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_earliestPresentTime(this.segment(), value); return this; } + + /// {@return `presentMargin` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_presentMargin(MemorySegment segment, long index) { return (long) VH_presentMargin.get(segment, 0L, index); } + /// {@return `presentMargin`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_presentMargin(MemorySegment segment) { return VkPastPresentationTimingGOOGLE.get_presentMargin(segment, 0L); } + /// {@return `presentMargin` at the given index} + /// @param index the index + public @CType("uint64_t") long presentMarginAt(long index) { return VkPastPresentationTimingGOOGLE.get_presentMargin(this.segment(), index); } + /// {@return `presentMargin`} + public @CType("uint64_t") long presentMargin() { return VkPastPresentationTimingGOOGLE.get_presentMargin(this.segment()); } + /// Sets `presentMargin` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentMargin(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_presentMargin.set(segment, 0L, index, value); } + /// Sets `presentMargin` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentMargin(MemorySegment segment, @CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_presentMargin(segment, 0L, value); } + /// Sets `presentMargin` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPastPresentationTimingGOOGLE presentMarginAt(long index, @CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_presentMargin(this.segment(), index, value); return this; } + /// Sets `presentMargin` with the given value. + /// @param value the value + /// @return `this` + public VkPastPresentationTimingGOOGLE presentMargin(@CType("uint64_t") long value) { VkPastPresentationTimingGOOGLE.set_presentMargin(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkPresentTimeGOOGLE.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkPresentTimeGOOGLE.java new file mode 100644 index 00000000..162b5ea9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkPresentTimeGOOGLE.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.google.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### presentID +/// [VarHandle][#VH_presentID] - [Getter][#presentID()] - [Setter][#presentID(int)] +/// ### desiredPresentTime +/// [VarHandle][#VH_desiredPresentTime] - [Getter][#desiredPresentTime()] - [Setter][#desiredPresentTime(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPresentTimeGOOGLE { +/// uint32_t presentID; +/// uint64_t desiredPresentTime; +/// } VkPresentTimeGOOGLE; +/// ``` +public final class VkPresentTimeGOOGLE extends Struct { + /// The struct layout of `VkPresentTimeGOOGLE`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("presentID"), + ValueLayout.JAVA_LONG.withName("desiredPresentTime") + ); + /// The [VarHandle] of `presentID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentID")); + /// The [VarHandle] of `desiredPresentTime` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_desiredPresentTime = LAYOUT.arrayElementVarHandle(PathElement.groupElement("desiredPresentTime")); + + /// Creates `VkPresentTimeGOOGLE` with the given segment. + /// @param segment the memory segment + public VkPresentTimeGOOGLE(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPresentTimeGOOGLE` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentTimeGOOGLE of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentTimeGOOGLE(segment); } + + /// Creates `VkPresentTimeGOOGLE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentTimeGOOGLE ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentTimeGOOGLE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPresentTimeGOOGLE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentTimeGOOGLE ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentTimeGOOGLE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPresentTimeGOOGLE` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPresentTimeGOOGLE` + public static VkPresentTimeGOOGLE alloc(SegmentAllocator allocator) { return new VkPresentTimeGOOGLE(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPresentTimeGOOGLE` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPresentTimeGOOGLE` + public static VkPresentTimeGOOGLE alloc(SegmentAllocator allocator, long count) { return new VkPresentTimeGOOGLE(allocator.allocate(LAYOUT, count)); } + + /// {@return `presentID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_presentID(MemorySegment segment, long index) { return (int) VH_presentID.get(segment, 0L, index); } + /// {@return `presentID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_presentID(MemorySegment segment) { return VkPresentTimeGOOGLE.get_presentID(segment, 0L); } + /// {@return `presentID` at the given index} + /// @param index the index + public @CType("uint32_t") int presentIDAt(long index) { return VkPresentTimeGOOGLE.get_presentID(this.segment(), index); } + /// {@return `presentID`} + public @CType("uint32_t") int presentID() { return VkPresentTimeGOOGLE.get_presentID(this.segment()); } + /// Sets `presentID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_presentID.set(segment, 0L, index, value); } + /// Sets `presentID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentID(MemorySegment segment, @CType("uint32_t") int value) { VkPresentTimeGOOGLE.set_presentID(segment, 0L, value); } + /// Sets `presentID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentTimeGOOGLE presentIDAt(long index, @CType("uint32_t") int value) { VkPresentTimeGOOGLE.set_presentID(this.segment(), index, value); return this; } + /// Sets `presentID` with the given value. + /// @param value the value + /// @return `this` + public VkPresentTimeGOOGLE presentID(@CType("uint32_t") int value) { VkPresentTimeGOOGLE.set_presentID(this.segment(), value); return this; } + + /// {@return `desiredPresentTime` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_desiredPresentTime(MemorySegment segment, long index) { return (long) VH_desiredPresentTime.get(segment, 0L, index); } + /// {@return `desiredPresentTime`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_desiredPresentTime(MemorySegment segment) { return VkPresentTimeGOOGLE.get_desiredPresentTime(segment, 0L); } + /// {@return `desiredPresentTime` at the given index} + /// @param index the index + public @CType("uint64_t") long desiredPresentTimeAt(long index) { return VkPresentTimeGOOGLE.get_desiredPresentTime(this.segment(), index); } + /// {@return `desiredPresentTime`} + public @CType("uint64_t") long desiredPresentTime() { return VkPresentTimeGOOGLE.get_desiredPresentTime(this.segment()); } + /// Sets `desiredPresentTime` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_desiredPresentTime(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_desiredPresentTime.set(segment, 0L, index, value); } + /// Sets `desiredPresentTime` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_desiredPresentTime(MemorySegment segment, @CType("uint64_t") long value) { VkPresentTimeGOOGLE.set_desiredPresentTime(segment, 0L, value); } + /// Sets `desiredPresentTime` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentTimeGOOGLE desiredPresentTimeAt(long index, @CType("uint64_t") long value) { VkPresentTimeGOOGLE.set_desiredPresentTime(this.segment(), index, value); return this; } + /// Sets `desiredPresentTime` with the given value. + /// @param value the value + /// @return `this` + public VkPresentTimeGOOGLE desiredPresentTime(@CType("uint64_t") long value) { VkPresentTimeGOOGLE.set_desiredPresentTime(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkPresentTimesInfoGOOGLE.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkPresentTimesInfoGOOGLE.java new file mode 100644 index 00000000..3fc061e3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkPresentTimesInfoGOOGLE.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.google.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchainCount +/// [VarHandle][#VH_swapchainCount] - [Getter][#swapchainCount()] - [Setter][#swapchainCount(int)] +/// ### pTimes +/// [VarHandle][#VH_pTimes] - [Getter][#pTimes()] - [Setter][#pTimes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPresentTimesInfoGOOGLE { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t swapchainCount; +/// const VkPresentTimeGOOGLE * pTimes; +/// } VkPresentTimesInfoGOOGLE; +/// ``` +public final class VkPresentTimesInfoGOOGLE extends Struct { + /// The struct layout of `VkPresentTimesInfoGOOGLE`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("swapchainCount"), + ValueLayout.ADDRESS.withName("pTimes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchainCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_swapchainCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchainCount")); + /// The [VarHandle] of `pTimes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTimes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTimes")); + + /// Creates `VkPresentTimesInfoGOOGLE` with the given segment. + /// @param segment the memory segment + public VkPresentTimesInfoGOOGLE(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPresentTimesInfoGOOGLE` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentTimesInfoGOOGLE of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentTimesInfoGOOGLE(segment); } + + /// Creates `VkPresentTimesInfoGOOGLE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentTimesInfoGOOGLE ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentTimesInfoGOOGLE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPresentTimesInfoGOOGLE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentTimesInfoGOOGLE ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentTimesInfoGOOGLE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPresentTimesInfoGOOGLE` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPresentTimesInfoGOOGLE` + public static VkPresentTimesInfoGOOGLE alloc(SegmentAllocator allocator) { return new VkPresentTimesInfoGOOGLE(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPresentTimesInfoGOOGLE` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPresentTimesInfoGOOGLE` + public static VkPresentTimesInfoGOOGLE alloc(SegmentAllocator allocator, long count) { return new VkPresentTimesInfoGOOGLE(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPresentTimesInfoGOOGLE.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPresentTimesInfoGOOGLE.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPresentTimesInfoGOOGLE.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPresentTimesInfoGOOGLE.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentTimesInfoGOOGLE sTypeAt(long index, @CType("VkStructureType") int value) { VkPresentTimesInfoGOOGLE.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPresentTimesInfoGOOGLE sType(@CType("VkStructureType") int value) { VkPresentTimesInfoGOOGLE.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPresentTimesInfoGOOGLE.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPresentTimesInfoGOOGLE.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPresentTimesInfoGOOGLE.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentTimesInfoGOOGLE.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentTimesInfoGOOGLE pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentTimesInfoGOOGLE.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPresentTimesInfoGOOGLE pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentTimesInfoGOOGLE.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchainCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment, long index) { return (int) VH_swapchainCount.get(segment, 0L, index); } + /// {@return `swapchainCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment) { return VkPresentTimesInfoGOOGLE.get_swapchainCount(segment, 0L); } + /// {@return `swapchainCount` at the given index} + /// @param index the index + public @CType("uint32_t") int swapchainCountAt(long index) { return VkPresentTimesInfoGOOGLE.get_swapchainCount(this.segment(), index); } + /// {@return `swapchainCount`} + public @CType("uint32_t") int swapchainCount() { return VkPresentTimesInfoGOOGLE.get_swapchainCount(this.segment()); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_swapchainCount.set(segment, 0L, index, value); } + /// Sets `swapchainCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, @CType("uint32_t") int value) { VkPresentTimesInfoGOOGLE.set_swapchainCount(segment, 0L, value); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentTimesInfoGOOGLE swapchainCountAt(long index, @CType("uint32_t") int value) { VkPresentTimesInfoGOOGLE.set_swapchainCount(this.segment(), index, value); return this; } + /// Sets `swapchainCount` with the given value. + /// @param value the value + /// @return `this` + public VkPresentTimesInfoGOOGLE swapchainCount(@CType("uint32_t") int value) { VkPresentTimesInfoGOOGLE.set_swapchainCount(this.segment(), value); return this; } + + /// {@return `pTimes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPresentTimeGOOGLE *") java.lang.foreign.MemorySegment get_pTimes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTimes.get(segment, 0L, index); } + /// {@return `pTimes`} + /// @param segment the segment of the struct + public static @CType("const VkPresentTimeGOOGLE *") java.lang.foreign.MemorySegment get_pTimes(MemorySegment segment) { return VkPresentTimesInfoGOOGLE.get_pTimes(segment, 0L); } + /// {@return `pTimes` at the given index} + /// @param index the index + public @CType("const VkPresentTimeGOOGLE *") java.lang.foreign.MemorySegment pTimesAt(long index) { return VkPresentTimesInfoGOOGLE.get_pTimes(this.segment(), index); } + /// {@return `pTimes`} + public @CType("const VkPresentTimeGOOGLE *") java.lang.foreign.MemorySegment pTimes() { return VkPresentTimesInfoGOOGLE.get_pTimes(this.segment()); } + /// Sets `pTimes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTimes(MemorySegment segment, long index, @CType("const VkPresentTimeGOOGLE *") java.lang.foreign.MemorySegment value) { VH_pTimes.set(segment, 0L, index, value); } + /// Sets `pTimes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTimes(MemorySegment segment, @CType("const VkPresentTimeGOOGLE *") java.lang.foreign.MemorySegment value) { VkPresentTimesInfoGOOGLE.set_pTimes(segment, 0L, value); } + /// Sets `pTimes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentTimesInfoGOOGLE pTimesAt(long index, @CType("const VkPresentTimeGOOGLE *") java.lang.foreign.MemorySegment value) { VkPresentTimesInfoGOOGLE.set_pTimes(this.segment(), index, value); return this; } + /// Sets `pTimes` with the given value. + /// @param value the value + /// @return `this` + public VkPresentTimesInfoGOOGLE pTimes(@CType("const VkPresentTimeGOOGLE *") java.lang.foreign.MemorySegment value) { VkPresentTimesInfoGOOGLE.set_pTimes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkRefreshCycleDurationGOOGLE.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkRefreshCycleDurationGOOGLE.java new file mode 100644 index 00000000..3205c78d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/google/struct/VkRefreshCycleDurationGOOGLE.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.google.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### refreshDuration +/// [VarHandle][#VH_refreshDuration] - [Getter][#refreshDuration()] - [Setter][#refreshDuration(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRefreshCycleDurationGOOGLE { +/// uint64_t refreshDuration; +/// } VkRefreshCycleDurationGOOGLE; +/// ``` +public final class VkRefreshCycleDurationGOOGLE extends Struct { + /// The struct layout of `VkRefreshCycleDurationGOOGLE`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("refreshDuration") + ); + /// The [VarHandle] of `refreshDuration` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_refreshDuration = LAYOUT.arrayElementVarHandle(PathElement.groupElement("refreshDuration")); + + /// Creates `VkRefreshCycleDurationGOOGLE` with the given segment. + /// @param segment the memory segment + public VkRefreshCycleDurationGOOGLE(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRefreshCycleDurationGOOGLE` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRefreshCycleDurationGOOGLE of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRefreshCycleDurationGOOGLE(segment); } + + /// Creates `VkRefreshCycleDurationGOOGLE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRefreshCycleDurationGOOGLE ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRefreshCycleDurationGOOGLE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRefreshCycleDurationGOOGLE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRefreshCycleDurationGOOGLE ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRefreshCycleDurationGOOGLE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRefreshCycleDurationGOOGLE` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRefreshCycleDurationGOOGLE` + public static VkRefreshCycleDurationGOOGLE alloc(SegmentAllocator allocator) { return new VkRefreshCycleDurationGOOGLE(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRefreshCycleDurationGOOGLE` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRefreshCycleDurationGOOGLE` + public static VkRefreshCycleDurationGOOGLE alloc(SegmentAllocator allocator, long count) { return new VkRefreshCycleDurationGOOGLE(allocator.allocate(LAYOUT, count)); } + + /// {@return `refreshDuration` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_refreshDuration(MemorySegment segment, long index) { return (long) VH_refreshDuration.get(segment, 0L, index); } + /// {@return `refreshDuration`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_refreshDuration(MemorySegment segment) { return VkRefreshCycleDurationGOOGLE.get_refreshDuration(segment, 0L); } + /// {@return `refreshDuration` at the given index} + /// @param index the index + public @CType("uint64_t") long refreshDurationAt(long index) { return VkRefreshCycleDurationGOOGLE.get_refreshDuration(this.segment(), index); } + /// {@return `refreshDuration`} + public @CType("uint64_t") long refreshDuration() { return VkRefreshCycleDurationGOOGLE.get_refreshDuration(this.segment()); } + /// Sets `refreshDuration` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_refreshDuration(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_refreshDuration.set(segment, 0L, index, value); } + /// Sets `refreshDuration` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_refreshDuration(MemorySegment segment, @CType("uint64_t") long value) { VkRefreshCycleDurationGOOGLE.set_refreshDuration(segment, 0L, value); } + /// Sets `refreshDuration` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRefreshCycleDurationGOOGLE refreshDurationAt(long index, @CType("uint64_t") long value) { VkRefreshCycleDurationGOOGLE.set_refreshDuration(this.segment(), index, value); return this; } + /// Sets `refreshDuration` with the given value. + /// @param value the value + /// @return `this` + public VkRefreshCycleDurationGOOGLE refreshDuration(@CType("uint64_t") long value) { VkRefreshCycleDurationGOOGLE.set_refreshDuration(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEIClusterCullingShader.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEIClusterCullingShader.java new file mode 100644 index 00000000..86438901 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEIClusterCullingShader.java @@ -0,0 +1,56 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKHUAWEIClusterCullingShader { + public static final int VK_HUAWEI_CLUSTER_CULLING_SHADER_SPEC_VERSION = 3; + public static final String VK_HUAWEI_CLUSTER_CULLING_SHADER_EXTENSION_NAME = "VK_HUAWEI_cluster_culling_shader"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI = 1000404000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI = 1000404001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_VRS_FEATURES_HUAWEI = 1000404002; + public static final long VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI = 0x20000000000L; + public static final int VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI = 0x00080000; + public static final int VK_QUERY_PIPELINE_STATISTIC_CLUSTER_CULLING_SHADER_INVOCATIONS_BIT_HUAWEI = 0x00002000; + public static final MethodHandle MH_vkCmdDrawClusterHUAWEI = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawClusterIndirectHUAWEI = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public final MemorySegment PFN_vkCmdDrawClusterHUAWEI; + public final MemorySegment PFN_vkCmdDrawClusterIndirectHUAWEI; + + public VKHUAWEIClusterCullingShader(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdDrawClusterHUAWEI = func.invoke(device, "vkCmdDrawClusterHUAWEI"); + PFN_vkCmdDrawClusterIndirectHUAWEI = func.invoke(device, "vkCmdDrawClusterIndirectHUAWEI"); + } + + public void CmdDrawClusterHUAWEI(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int groupCountX, @CType("uint32_t") int groupCountY, @CType("uint32_t") int groupCountZ) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawClusterHUAWEI)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawClusterHUAWEI"); + try { MH_vkCmdDrawClusterHUAWEI.invokeExact(PFN_vkCmdDrawClusterHUAWEI, commandBuffer, groupCountX, groupCountY, groupCountZ); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawClusterHUAWEI", e); } + } + + public void CmdDrawClusterIndirectHUAWEI(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawClusterIndirectHUAWEI)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawClusterIndirectHUAWEI"); + try { MH_vkCmdDrawClusterIndirectHUAWEI.invokeExact(PFN_vkCmdDrawClusterIndirectHUAWEI, commandBuffer, buffer, offset); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawClusterIndirectHUAWEI", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEIHdrVivid.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEIHdrVivid.java new file mode 100644 index 00000000..2adfcaf5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEIHdrVivid.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKHUAWEIHdrVivid { + public static final int VK_HUAWEI_HDR_VIVID_SPEC_VERSION = 1; + public static final String VK_HUAWEI_HDR_VIVID_EXTENSION_NAME = "VK_HUAWEI_hdr_vivid"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HDR_VIVID_FEATURES_HUAWEI = 1000590000; + public static final int VK_STRUCTURE_TYPE_HDR_VIVID_DYNAMIC_METADATA_HUAWEI = 1000590001; + + public VKHUAWEIHdrVivid(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEIInvocationMask.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEIInvocationMask.java new file mode 100644 index 00000000..d30f44bb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEIInvocationMask.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKHUAWEIInvocationMask { + public static final int VK_HUAWEI_INVOCATION_MASK_SPEC_VERSION = 1; + public static final String VK_HUAWEI_INVOCATION_MASK_EXTENSION_NAME = "VK_HUAWEI_invocation_mask"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI = 1000370000; + public static final long VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI = 0x8000000000L; + public static final int VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI = 0x00040000; + public static final long VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI = 0x10000000000L; + public static final MethodHandle MH_vkCmdBindInvocationMaskHUAWEI = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdBindInvocationMaskHUAWEI; + + public VKHUAWEIInvocationMask(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdBindInvocationMaskHUAWEI = func.invoke(device, "vkCmdBindInvocationMaskHUAWEI"); + } + + public void CmdBindInvocationMaskHUAWEI(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkImageView") MemorySegment imageView, @CType("VkImageLayout") int imageLayout) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindInvocationMaskHUAWEI)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindInvocationMaskHUAWEI"); + try { MH_vkCmdBindInvocationMaskHUAWEI.invokeExact(PFN_vkCmdBindInvocationMaskHUAWEI, commandBuffer, imageView, imageLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindInvocationMaskHUAWEI", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEISubpassShading.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEISubpassShading.java new file mode 100644 index 00000000..79232f43 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/VKHUAWEISubpassShading.java @@ -0,0 +1,58 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.huawei.VKHUAWEISubpassShading.*; +public class VKHUAWEISubpassShading { + public static final int VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION = 3; + public static final String VK_HUAWEI_SUBPASS_SHADING_EXTENSION_NAME = "VK_HUAWEI_subpass_shading"; + public static final int VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI = 1000369000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI = 1000369001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI = 1000369002; + public static final int VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI = 1000369003; + public static final long VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI = 0x8000000000L; + public static final int VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI = 0x00004000; + public static final long VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI = VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI; + public static final MethodHandle MH_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSubpassShadingHUAWEI = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI; + public final MemorySegment PFN_vkCmdSubpassShadingHUAWEI; + + public VKHUAWEISubpassShading(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = func.invoke(device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI"); + PFN_vkCmdSubpassShadingHUAWEI = func.invoke(device, "vkCmdSubpassShadingHUAWEI"); + } + + public @CType("VkResult") int GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(@CType("VkDevice") MemorySegment device, @CType("VkRenderPass") MemorySegment renderpass, @CType("VkExtent2D *") MemorySegment pMaxWorkgroupSize) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI"); + try { return (int) MH_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI.invokeExact(PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, device, renderpass, pMaxWorkgroupSize); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI", e); } + } + + public void CmdSubpassShadingHUAWEI(@CType("VkCommandBuffer") MemorySegment commandBuffer) { + if (Unmarshal.isNullPointer(PFN_vkCmdSubpassShadingHUAWEI)) throw new SymbolNotFoundError("Symbol not found: vkCmdSubpassShadingHUAWEI"); + try { MH_vkCmdSubpassShadingHUAWEI.invokeExact(PFN_vkCmdSubpassShadingHUAWEI, commandBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSubpassShadingHUAWEI", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkHdrVividDynamicMetadataHUAWEI.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkHdrVividDynamicMetadataHUAWEI.java new file mode 100644 index 00000000..1636a70c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkHdrVividDynamicMetadataHUAWEI.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dynamicMetadataSize +/// [VarHandle][#VH_dynamicMetadataSize] - [Getter][#dynamicMetadataSize()] - [Setter][#dynamicMetadataSize(long)] +/// ### pDynamicMetadata +/// [VarHandle][#VH_pDynamicMetadata] - [Getter][#pDynamicMetadata()] - [Setter][#pDynamicMetadata(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkHdrVividDynamicMetadataHUAWEI { +/// VkStructureType sType; +/// const void * pNext; +/// size_t dynamicMetadataSize; +/// const void * pDynamicMetadata; +/// } VkHdrVividDynamicMetadataHUAWEI; +/// ``` +public final class VkHdrVividDynamicMetadataHUAWEI extends Struct { + /// The struct layout of `VkHdrVividDynamicMetadataHUAWEI`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("dynamicMetadataSize"), + ValueLayout.ADDRESS.withName("pDynamicMetadata") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dynamicMetadataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dynamicMetadataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicMetadataSize")); + /// The [VarHandle] of `pDynamicMetadata` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDynamicMetadata = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDynamicMetadata")); + + /// Creates `VkHdrVividDynamicMetadataHUAWEI` with the given segment. + /// @param segment the memory segment + public VkHdrVividDynamicMetadataHUAWEI(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkHdrVividDynamicMetadataHUAWEI` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkHdrVividDynamicMetadataHUAWEI of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkHdrVividDynamicMetadataHUAWEI(segment); } + + /// Creates `VkHdrVividDynamicMetadataHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkHdrVividDynamicMetadataHUAWEI ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkHdrVividDynamicMetadataHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkHdrVividDynamicMetadataHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkHdrVividDynamicMetadataHUAWEI ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkHdrVividDynamicMetadataHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkHdrVividDynamicMetadataHUAWEI` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkHdrVividDynamicMetadataHUAWEI` + public static VkHdrVividDynamicMetadataHUAWEI alloc(SegmentAllocator allocator) { return new VkHdrVividDynamicMetadataHUAWEI(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkHdrVividDynamicMetadataHUAWEI` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkHdrVividDynamicMetadataHUAWEI` + public static VkHdrVividDynamicMetadataHUAWEI alloc(SegmentAllocator allocator, long count) { return new VkHdrVividDynamicMetadataHUAWEI(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkHdrVividDynamicMetadataHUAWEI.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkHdrVividDynamicMetadataHUAWEI.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkHdrVividDynamicMetadataHUAWEI.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkHdrVividDynamicMetadataHUAWEI.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrVividDynamicMetadataHUAWEI sTypeAt(long index, @CType("VkStructureType") int value) { VkHdrVividDynamicMetadataHUAWEI.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkHdrVividDynamicMetadataHUAWEI sType(@CType("VkStructureType") int value) { VkHdrVividDynamicMetadataHUAWEI.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkHdrVividDynamicMetadataHUAWEI.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkHdrVividDynamicMetadataHUAWEI.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkHdrVividDynamicMetadataHUAWEI.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkHdrVividDynamicMetadataHUAWEI.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrVividDynamicMetadataHUAWEI pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkHdrVividDynamicMetadataHUAWEI.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkHdrVividDynamicMetadataHUAWEI pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkHdrVividDynamicMetadataHUAWEI.set_pNext(this.segment(), value); return this; } + + /// {@return `dynamicMetadataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_dynamicMetadataSize(MemorySegment segment, long index) { return (long) VH_dynamicMetadataSize.get(segment, 0L, index); } + /// {@return `dynamicMetadataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_dynamicMetadataSize(MemorySegment segment) { return VkHdrVividDynamicMetadataHUAWEI.get_dynamicMetadataSize(segment, 0L); } + /// {@return `dynamicMetadataSize` at the given index} + /// @param index the index + public @CType("size_t") long dynamicMetadataSizeAt(long index) { return VkHdrVividDynamicMetadataHUAWEI.get_dynamicMetadataSize(this.segment(), index); } + /// {@return `dynamicMetadataSize`} + public @CType("size_t") long dynamicMetadataSize() { return VkHdrVividDynamicMetadataHUAWEI.get_dynamicMetadataSize(this.segment()); } + /// Sets `dynamicMetadataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicMetadataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_dynamicMetadataSize.set(segment, 0L, index, value); } + /// Sets `dynamicMetadataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicMetadataSize(MemorySegment segment, @CType("size_t") long value) { VkHdrVividDynamicMetadataHUAWEI.set_dynamicMetadataSize(segment, 0L, value); } + /// Sets `dynamicMetadataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrVividDynamicMetadataHUAWEI dynamicMetadataSizeAt(long index, @CType("size_t") long value) { VkHdrVividDynamicMetadataHUAWEI.set_dynamicMetadataSize(this.segment(), index, value); return this; } + /// Sets `dynamicMetadataSize` with the given value. + /// @param value the value + /// @return `this` + public VkHdrVividDynamicMetadataHUAWEI dynamicMetadataSize(@CType("size_t") long value) { VkHdrVividDynamicMetadataHUAWEI.set_dynamicMetadataSize(this.segment(), value); return this; } + + /// {@return `pDynamicMetadata` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pDynamicMetadata(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDynamicMetadata.get(segment, 0L, index); } + /// {@return `pDynamicMetadata`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pDynamicMetadata(MemorySegment segment) { return VkHdrVividDynamicMetadataHUAWEI.get_pDynamicMetadata(segment, 0L); } + /// {@return `pDynamicMetadata` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pDynamicMetadataAt(long index) { return VkHdrVividDynamicMetadataHUAWEI.get_pDynamicMetadata(this.segment(), index); } + /// {@return `pDynamicMetadata`} + public @CType("const void *") java.lang.foreign.MemorySegment pDynamicMetadata() { return VkHdrVividDynamicMetadataHUAWEI.get_pDynamicMetadata(this.segment()); } + /// Sets `pDynamicMetadata` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDynamicMetadata(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pDynamicMetadata.set(segment, 0L, index, value); } + /// Sets `pDynamicMetadata` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDynamicMetadata(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkHdrVividDynamicMetadataHUAWEI.set_pDynamicMetadata(segment, 0L, value); } + /// Sets `pDynamicMetadata` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHdrVividDynamicMetadataHUAWEI pDynamicMetadataAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkHdrVividDynamicMetadataHUAWEI.set_pDynamicMetadata(this.segment(), index, value); return this; } + /// Sets `pDynamicMetadata` with the given value. + /// @param value the value + /// @return `this` + public VkHdrVividDynamicMetadataHUAWEI pDynamicMetadata(@CType("const void *") java.lang.foreign.MemorySegment value) { VkHdrVividDynamicMetadataHUAWEI.set_pDynamicMetadata(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.java new file mode 100644 index 00000000..5c7cad7d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### clustercullingShader +/// [VarHandle][#VH_clustercullingShader] - [Getter][#clustercullingShader()] - [Setter][#clustercullingShader(int)] +/// ### multiviewClusterCullingShader +/// [VarHandle][#VH_multiviewClusterCullingShader] - [Getter][#multiviewClusterCullingShader()] - [Setter][#multiviewClusterCullingShader(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 clustercullingShader; +/// VkBool32 multiviewClusterCullingShader; +/// } VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI; +/// ``` +public final class VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI extends Struct { + /// The struct layout of `VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("clustercullingShader"), + ValueLayout.JAVA_INT.withName("multiviewClusterCullingShader") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `clustercullingShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_clustercullingShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("clustercullingShader")); + /// The [VarHandle] of `multiviewClusterCullingShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiviewClusterCullingShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiviewClusterCullingShader")); + + /// Creates `VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI(segment); } + + /// Creates `VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI` + public static VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI` + public static VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI sType(@CType("VkStructureType") int value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_pNext(this.segment(), value); return this; } + + /// {@return `clustercullingShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_clustercullingShader(MemorySegment segment, long index) { return (int) VH_clustercullingShader.get(segment, 0L, index); } + /// {@return `clustercullingShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_clustercullingShader(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_clustercullingShader(segment, 0L); } + /// {@return `clustercullingShader` at the given index} + /// @param index the index + public @CType("VkBool32") int clustercullingShaderAt(long index) { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_clustercullingShader(this.segment(), index); } + /// {@return `clustercullingShader`} + public @CType("VkBool32") int clustercullingShader() { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_clustercullingShader(this.segment()); } + /// Sets `clustercullingShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_clustercullingShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_clustercullingShader.set(segment, 0L, index, value); } + /// Sets `clustercullingShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_clustercullingShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_clustercullingShader(segment, 0L, value); } + /// Sets `clustercullingShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI clustercullingShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_clustercullingShader(this.segment(), index, value); return this; } + /// Sets `clustercullingShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI clustercullingShader(@CType("VkBool32") int value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_clustercullingShader(this.segment(), value); return this; } + + /// {@return `multiviewClusterCullingShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiviewClusterCullingShader(MemorySegment segment, long index) { return (int) VH_multiviewClusterCullingShader.get(segment, 0L, index); } + /// {@return `multiviewClusterCullingShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiviewClusterCullingShader(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_multiviewClusterCullingShader(segment, 0L); } + /// {@return `multiviewClusterCullingShader` at the given index} + /// @param index the index + public @CType("VkBool32") int multiviewClusterCullingShaderAt(long index) { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_multiviewClusterCullingShader(this.segment(), index); } + /// {@return `multiviewClusterCullingShader`} + public @CType("VkBool32") int multiviewClusterCullingShader() { return VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.get_multiviewClusterCullingShader(this.segment()); } + /// Sets `multiviewClusterCullingShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiviewClusterCullingShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiviewClusterCullingShader.set(segment, 0L, index, value); } + /// Sets `multiviewClusterCullingShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiviewClusterCullingShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_multiviewClusterCullingShader(segment, 0L, value); } + /// Sets `multiviewClusterCullingShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI multiviewClusterCullingShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_multiviewClusterCullingShader(this.segment(), index, value); return this; } + /// Sets `multiviewClusterCullingShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI multiviewClusterCullingShader(@CType("VkBool32") int value) { VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.set_multiviewClusterCullingShader(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.java new file mode 100644 index 00000000..374cb136 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxWorkGroupCount +/// [VarHandle][#VH_maxWorkGroupCount] - [Getter][#maxWorkGroupCount()] - [Setter][#maxWorkGroupCount(int)] +/// ### maxWorkGroupSize +/// [VarHandle][#VH_maxWorkGroupSize] - [Getter][#maxWorkGroupSize()] - [Setter][#maxWorkGroupSize(int)] +/// ### maxOutputClusterCount +/// [VarHandle][#VH_maxOutputClusterCount] - [Getter][#maxOutputClusterCount()] - [Setter][#maxOutputClusterCount(int)] +/// ### indirectBufferOffsetAlignment +/// [VarHandle][#VH_indirectBufferOffsetAlignment] - [Getter][#indirectBufferOffsetAlignment()] - [Setter][#indirectBufferOffsetAlignment(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxWorkGroupCount; +/// uint32_t maxWorkGroupSize; +/// uint32_t maxOutputClusterCount; +/// VkDeviceSize indirectBufferOffsetAlignment; +/// } VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI; +/// ``` +public final class VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI extends Struct { + /// The struct layout of `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxWorkGroupCount"), + ValueLayout.JAVA_INT.withName("maxWorkGroupSize"), + ValueLayout.JAVA_INT.withName("maxOutputClusterCount"), + ValueLayout.JAVA_LONG.withName("indirectBufferOffsetAlignment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxWorkGroupCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxWorkGroupCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxWorkGroupCount")); + /// The [VarHandle] of `maxWorkGroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxWorkGroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxWorkGroupSize")); + /// The [VarHandle] of `maxOutputClusterCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxOutputClusterCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxOutputClusterCount")); + /// The [VarHandle] of `indirectBufferOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_indirectBufferOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectBufferOffsetAlignment")); + + /// Creates `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI(segment); } + + /// Creates `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI` + public static VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI` + public static VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI sType(@CType("VkStructureType") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_pNext(this.segment(), value); return this; } + + /// {@return `maxWorkGroupCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxWorkGroupCount(MemorySegment segment, long index) { return (int) VH_maxWorkGroupCount.get(segment, 0L, index); } + /// {@return `maxWorkGroupCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxWorkGroupCount(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_maxWorkGroupCount(segment, 0L); } + /// {@return `maxWorkGroupCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxWorkGroupCountAt(long index) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_maxWorkGroupCount(this.segment(), index); } + /// {@return `maxWorkGroupCount`} + public @CType("uint32_t") int maxWorkGroupCount() { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_maxWorkGroupCount(this.segment()); } + /// Sets `maxWorkGroupCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxWorkGroupCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxWorkGroupCount.set(segment, 0L, index, value); } + /// Sets `maxWorkGroupCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxWorkGroupCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_maxWorkGroupCount(segment, 0L, value); } + /// Sets `maxWorkGroupCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI maxWorkGroupCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_maxWorkGroupCount(this.segment(), index, value); return this; } + /// Sets `maxWorkGroupCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI maxWorkGroupCount(@CType("uint32_t") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_maxWorkGroupCount(this.segment(), value); return this; } + + /// {@return `maxWorkGroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxWorkGroupSize(MemorySegment segment, long index) { return (int) VH_maxWorkGroupSize.get(segment, 0L, index); } + /// {@return `maxWorkGroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxWorkGroupSize(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_maxWorkGroupSize(segment, 0L); } + /// {@return `maxWorkGroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxWorkGroupSizeAt(long index) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_maxWorkGroupSize(this.segment(), index); } + /// {@return `maxWorkGroupSize`} + public @CType("uint32_t") int maxWorkGroupSize() { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_maxWorkGroupSize(this.segment()); } + /// Sets `maxWorkGroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxWorkGroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxWorkGroupSize.set(segment, 0L, index, value); } + /// Sets `maxWorkGroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxWorkGroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_maxWorkGroupSize(segment, 0L, value); } + /// Sets `maxWorkGroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI maxWorkGroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_maxWorkGroupSize(this.segment(), index, value); return this; } + /// Sets `maxWorkGroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI maxWorkGroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_maxWorkGroupSize(this.segment(), value); return this; } + + /// {@return `maxOutputClusterCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxOutputClusterCount(MemorySegment segment, long index) { return (int) VH_maxOutputClusterCount.get(segment, 0L, index); } + /// {@return `maxOutputClusterCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxOutputClusterCount(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_maxOutputClusterCount(segment, 0L); } + /// {@return `maxOutputClusterCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxOutputClusterCountAt(long index) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_maxOutputClusterCount(this.segment(), index); } + /// {@return `maxOutputClusterCount`} + public @CType("uint32_t") int maxOutputClusterCount() { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_maxOutputClusterCount(this.segment()); } + /// Sets `maxOutputClusterCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxOutputClusterCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxOutputClusterCount.set(segment, 0L, index, value); } + /// Sets `maxOutputClusterCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxOutputClusterCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_maxOutputClusterCount(segment, 0L, value); } + /// Sets `maxOutputClusterCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI maxOutputClusterCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_maxOutputClusterCount(this.segment(), index, value); return this; } + /// Sets `maxOutputClusterCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI maxOutputClusterCount(@CType("uint32_t") int value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_maxOutputClusterCount(this.segment(), value); return this; } + + /// {@return `indirectBufferOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_indirectBufferOffsetAlignment(MemorySegment segment, long index) { return (long) VH_indirectBufferOffsetAlignment.get(segment, 0L, index); } + /// {@return `indirectBufferOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_indirectBufferOffsetAlignment(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_indirectBufferOffsetAlignment(segment, 0L); } + /// {@return `indirectBufferOffsetAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long indirectBufferOffsetAlignmentAt(long index) { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_indirectBufferOffsetAlignment(this.segment(), index); } + /// {@return `indirectBufferOffsetAlignment`} + public @CType("VkDeviceSize") long indirectBufferOffsetAlignment() { return VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.get_indirectBufferOffsetAlignment(this.segment()); } + /// Sets `indirectBufferOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectBufferOffsetAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_indirectBufferOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `indirectBufferOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectBufferOffsetAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_indirectBufferOffsetAlignment(segment, 0L, value); } + /// Sets `indirectBufferOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI indirectBufferOffsetAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_indirectBufferOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `indirectBufferOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI indirectBufferOffsetAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.set_indirectBufferOffsetAlignment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.java new file mode 100644 index 00000000..fbdbc5a4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### clusterShadingRate +/// [VarHandle][#VH_clusterShadingRate] - [Getter][#clusterShadingRate()] - [Setter][#clusterShadingRate(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 clusterShadingRate; +/// } VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI; +/// ``` +public final class VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI extends Struct { + /// The struct layout of `VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("clusterShadingRate") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `clusterShadingRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_clusterShadingRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("clusterShadingRate")); + + /// Creates `VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI(segment); } + + /// Creates `VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI` + public static VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI` + public static VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI sType(@CType("VkStructureType") int value) { VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.set_pNext(this.segment(), value); return this; } + + /// {@return `clusterShadingRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_clusterShadingRate(MemorySegment segment, long index) { return (int) VH_clusterShadingRate.get(segment, 0L, index); } + /// {@return `clusterShadingRate`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_clusterShadingRate(MemorySegment segment) { return VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.get_clusterShadingRate(segment, 0L); } + /// {@return `clusterShadingRate` at the given index} + /// @param index the index + public @CType("VkBool32") int clusterShadingRateAt(long index) { return VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.get_clusterShadingRate(this.segment(), index); } + /// {@return `clusterShadingRate`} + public @CType("VkBool32") int clusterShadingRate() { return VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.get_clusterShadingRate(this.segment()); } + /// Sets `clusterShadingRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_clusterShadingRate(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_clusterShadingRate.set(segment, 0L, index, value); } + /// Sets `clusterShadingRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_clusterShadingRate(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.set_clusterShadingRate(segment, 0L, value); } + /// Sets `clusterShadingRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI clusterShadingRateAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.set_clusterShadingRate(this.segment(), index, value); return this; } + /// Sets `clusterShadingRate` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI clusterShadingRate(@CType("VkBool32") int value) { VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.set_clusterShadingRate(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceHdrVividFeaturesHUAWEI.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceHdrVividFeaturesHUAWEI.java new file mode 100644 index 00000000..370d8786 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceHdrVividFeaturesHUAWEI.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### hdrVivid +/// [VarHandle][#VH_hdrVivid] - [Getter][#hdrVivid()] - [Setter][#hdrVivid(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceHdrVividFeaturesHUAWEI { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 hdrVivid; +/// } VkPhysicalDeviceHdrVividFeaturesHUAWEI; +/// ``` +public final class VkPhysicalDeviceHdrVividFeaturesHUAWEI extends Struct { + /// The struct layout of `VkPhysicalDeviceHdrVividFeaturesHUAWEI`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("hdrVivid") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `hdrVivid` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hdrVivid = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hdrVivid")); + + /// Creates `VkPhysicalDeviceHdrVividFeaturesHUAWEI` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceHdrVividFeaturesHUAWEI(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceHdrVividFeaturesHUAWEI` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHdrVividFeaturesHUAWEI of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHdrVividFeaturesHUAWEI(segment); } + + /// Creates `VkPhysicalDeviceHdrVividFeaturesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHdrVividFeaturesHUAWEI ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHdrVividFeaturesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceHdrVividFeaturesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHdrVividFeaturesHUAWEI ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHdrVividFeaturesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceHdrVividFeaturesHUAWEI` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceHdrVividFeaturesHUAWEI` + public static VkPhysicalDeviceHdrVividFeaturesHUAWEI alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceHdrVividFeaturesHUAWEI(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceHdrVividFeaturesHUAWEI` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceHdrVividFeaturesHUAWEI` + public static VkPhysicalDeviceHdrVividFeaturesHUAWEI alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceHdrVividFeaturesHUAWEI(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceHdrVividFeaturesHUAWEI.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceHdrVividFeaturesHUAWEI.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceHdrVividFeaturesHUAWEI.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceHdrVividFeaturesHUAWEI.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHdrVividFeaturesHUAWEI sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceHdrVividFeaturesHUAWEI.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHdrVividFeaturesHUAWEI sType(@CType("VkStructureType") int value) { VkPhysicalDeviceHdrVividFeaturesHUAWEI.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceHdrVividFeaturesHUAWEI.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceHdrVividFeaturesHUAWEI.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceHdrVividFeaturesHUAWEI.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHdrVividFeaturesHUAWEI.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHdrVividFeaturesHUAWEI pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHdrVividFeaturesHUAWEI.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHdrVividFeaturesHUAWEI pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHdrVividFeaturesHUAWEI.set_pNext(this.segment(), value); return this; } + + /// {@return `hdrVivid` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hdrVivid(MemorySegment segment, long index) { return (int) VH_hdrVivid.get(segment, 0L, index); } + /// {@return `hdrVivid`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hdrVivid(MemorySegment segment) { return VkPhysicalDeviceHdrVividFeaturesHUAWEI.get_hdrVivid(segment, 0L); } + /// {@return `hdrVivid` at the given index} + /// @param index the index + public @CType("VkBool32") int hdrVividAt(long index) { return VkPhysicalDeviceHdrVividFeaturesHUAWEI.get_hdrVivid(this.segment(), index); } + /// {@return `hdrVivid`} + public @CType("VkBool32") int hdrVivid() { return VkPhysicalDeviceHdrVividFeaturesHUAWEI.get_hdrVivid(this.segment()); } + /// Sets `hdrVivid` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hdrVivid(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hdrVivid.set(segment, 0L, index, value); } + /// Sets `hdrVivid` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hdrVivid(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceHdrVividFeaturesHUAWEI.set_hdrVivid(segment, 0L, value); } + /// Sets `hdrVivid` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHdrVividFeaturesHUAWEI hdrVividAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceHdrVividFeaturesHUAWEI.set_hdrVivid(this.segment(), index, value); return this; } + /// Sets `hdrVivid` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHdrVividFeaturesHUAWEI hdrVivid(@CType("VkBool32") int value) { VkPhysicalDeviceHdrVividFeaturesHUAWEI.set_hdrVivid(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.java new file mode 100644 index 00000000..f3fd5f74 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### invocationMask +/// [VarHandle][#VH_invocationMask] - [Getter][#invocationMask()] - [Setter][#invocationMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceInvocationMaskFeaturesHUAWEI { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 invocationMask; +/// } VkPhysicalDeviceInvocationMaskFeaturesHUAWEI; +/// ``` +public final class VkPhysicalDeviceInvocationMaskFeaturesHUAWEI extends Struct { + /// The struct layout of `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("invocationMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `invocationMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_invocationMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("invocationMask")); + + /// Creates `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceInvocationMaskFeaturesHUAWEI(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInvocationMaskFeaturesHUAWEI of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInvocationMaskFeaturesHUAWEI(segment); } + + /// Creates `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInvocationMaskFeaturesHUAWEI ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInvocationMaskFeaturesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInvocationMaskFeaturesHUAWEI ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInvocationMaskFeaturesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI` + public static VkPhysicalDeviceInvocationMaskFeaturesHUAWEI alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceInvocationMaskFeaturesHUAWEI(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceInvocationMaskFeaturesHUAWEI` + public static VkPhysicalDeviceInvocationMaskFeaturesHUAWEI alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceInvocationMaskFeaturesHUAWEI(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInvocationMaskFeaturesHUAWEI sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInvocationMaskFeaturesHUAWEI sType(@CType("VkStructureType") int value) { VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInvocationMaskFeaturesHUAWEI pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInvocationMaskFeaturesHUAWEI pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.set_pNext(this.segment(), value); return this; } + + /// {@return `invocationMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_invocationMask(MemorySegment segment, long index) { return (int) VH_invocationMask.get(segment, 0L, index); } + /// {@return `invocationMask`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_invocationMask(MemorySegment segment) { return VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.get_invocationMask(segment, 0L); } + /// {@return `invocationMask` at the given index} + /// @param index the index + public @CType("VkBool32") int invocationMaskAt(long index) { return VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.get_invocationMask(this.segment(), index); } + /// {@return `invocationMask`} + public @CType("VkBool32") int invocationMask() { return VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.get_invocationMask(this.segment()); } + /// Sets `invocationMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_invocationMask(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_invocationMask.set(segment, 0L, index, value); } + /// Sets `invocationMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_invocationMask(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.set_invocationMask(segment, 0L, value); } + /// Sets `invocationMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInvocationMaskFeaturesHUAWEI invocationMaskAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.set_invocationMask(this.segment(), index, value); return this; } + /// Sets `invocationMask` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInvocationMaskFeaturesHUAWEI invocationMask(@CType("VkBool32") int value) { VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.set_invocationMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.java new file mode 100644 index 00000000..811f40f4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### subpassShading +/// [VarHandle][#VH_subpassShading] - [Getter][#subpassShading()] - [Setter][#subpassShading(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSubpassShadingFeaturesHUAWEI { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 subpassShading; +/// } VkPhysicalDeviceSubpassShadingFeaturesHUAWEI; +/// ``` +public final class VkPhysicalDeviceSubpassShadingFeaturesHUAWEI extends Struct { + /// The struct layout of `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("subpassShading") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `subpassShading` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpassShading = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpassShading")); + + /// Creates `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSubpassShadingFeaturesHUAWEI(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubpassShadingFeaturesHUAWEI of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubpassShadingFeaturesHUAWEI(segment); } + + /// Creates `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubpassShadingFeaturesHUAWEI ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubpassShadingFeaturesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubpassShadingFeaturesHUAWEI ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubpassShadingFeaturesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI` + public static VkPhysicalDeviceSubpassShadingFeaturesHUAWEI alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSubpassShadingFeaturesHUAWEI(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSubpassShadingFeaturesHUAWEI` + public static VkPhysicalDeviceSubpassShadingFeaturesHUAWEI alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSubpassShadingFeaturesHUAWEI(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingFeaturesHUAWEI sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingFeaturesHUAWEI sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingFeaturesHUAWEI pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingFeaturesHUAWEI pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.set_pNext(this.segment(), value); return this; } + + /// {@return `subpassShading` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_subpassShading(MemorySegment segment, long index) { return (int) VH_subpassShading.get(segment, 0L, index); } + /// {@return `subpassShading`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_subpassShading(MemorySegment segment) { return VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.get_subpassShading(segment, 0L); } + /// {@return `subpassShading` at the given index} + /// @param index the index + public @CType("VkBool32") int subpassShadingAt(long index) { return VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.get_subpassShading(this.segment(), index); } + /// {@return `subpassShading`} + public @CType("VkBool32") int subpassShading() { return VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.get_subpassShading(this.segment()); } + /// Sets `subpassShading` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpassShading(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_subpassShading.set(segment, 0L, index, value); } + /// Sets `subpassShading` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpassShading(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.set_subpassShading(segment, 0L, value); } + /// Sets `subpassShading` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingFeaturesHUAWEI subpassShadingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.set_subpassShading(this.segment(), index, value); return this; } + /// Sets `subpassShading` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingFeaturesHUAWEI subpassShading(@CType("VkBool32") int value) { VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.set_subpassShading(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.java new file mode 100644 index 00000000..c74841c1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxSubpassShadingWorkgroupSizeAspectRatio +/// [VarHandle][#VH_maxSubpassShadingWorkgroupSizeAspectRatio] - [Getter][#maxSubpassShadingWorkgroupSizeAspectRatio()] - [Setter][#maxSubpassShadingWorkgroupSizeAspectRatio(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSubpassShadingPropertiesHUAWEI { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxSubpassShadingWorkgroupSizeAspectRatio; +/// } VkPhysicalDeviceSubpassShadingPropertiesHUAWEI; +/// ``` +public final class VkPhysicalDeviceSubpassShadingPropertiesHUAWEI extends Struct { + /// The struct layout of `VkPhysicalDeviceSubpassShadingPropertiesHUAWEI`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxSubpassShadingWorkgroupSizeAspectRatio") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxSubpassShadingWorkgroupSizeAspectRatio` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSubpassShadingWorkgroupSizeAspectRatio = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSubpassShadingWorkgroupSizeAspectRatio")); + + /// Creates `VkPhysicalDeviceSubpassShadingPropertiesHUAWEI` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSubpassShadingPropertiesHUAWEI(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSubpassShadingPropertiesHUAWEI` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubpassShadingPropertiesHUAWEI of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubpassShadingPropertiesHUAWEI(segment); } + + /// Creates `VkPhysicalDeviceSubpassShadingPropertiesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubpassShadingPropertiesHUAWEI ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubpassShadingPropertiesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSubpassShadingPropertiesHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubpassShadingPropertiesHUAWEI ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubpassShadingPropertiesHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSubpassShadingPropertiesHUAWEI` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSubpassShadingPropertiesHUAWEI` + public static VkPhysicalDeviceSubpassShadingPropertiesHUAWEI alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSubpassShadingPropertiesHUAWEI(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSubpassShadingPropertiesHUAWEI` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSubpassShadingPropertiesHUAWEI` + public static VkPhysicalDeviceSubpassShadingPropertiesHUAWEI alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSubpassShadingPropertiesHUAWEI(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingPropertiesHUAWEI sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingPropertiesHUAWEI sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingPropertiesHUAWEI pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingPropertiesHUAWEI pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.set_pNext(this.segment(), value); return this; } + + /// {@return `maxSubpassShadingWorkgroupSizeAspectRatio` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSubpassShadingWorkgroupSizeAspectRatio(MemorySegment segment, long index) { return (int) VH_maxSubpassShadingWorkgroupSizeAspectRatio.get(segment, 0L, index); } + /// {@return `maxSubpassShadingWorkgroupSizeAspectRatio`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSubpassShadingWorkgroupSizeAspectRatio(MemorySegment segment) { return VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.get_maxSubpassShadingWorkgroupSizeAspectRatio(segment, 0L); } + /// {@return `maxSubpassShadingWorkgroupSizeAspectRatio` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSubpassShadingWorkgroupSizeAspectRatioAt(long index) { return VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.get_maxSubpassShadingWorkgroupSizeAspectRatio(this.segment(), index); } + /// {@return `maxSubpassShadingWorkgroupSizeAspectRatio`} + public @CType("uint32_t") int maxSubpassShadingWorkgroupSizeAspectRatio() { return VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.get_maxSubpassShadingWorkgroupSizeAspectRatio(this.segment()); } + /// Sets `maxSubpassShadingWorkgroupSizeAspectRatio` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSubpassShadingWorkgroupSizeAspectRatio(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSubpassShadingWorkgroupSizeAspectRatio.set(segment, 0L, index, value); } + /// Sets `maxSubpassShadingWorkgroupSizeAspectRatio` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSubpassShadingWorkgroupSizeAspectRatio(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.set_maxSubpassShadingWorkgroupSizeAspectRatio(segment, 0L, value); } + /// Sets `maxSubpassShadingWorkgroupSizeAspectRatio` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingPropertiesHUAWEI maxSubpassShadingWorkgroupSizeAspectRatioAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.set_maxSubpassShadingWorkgroupSizeAspectRatio(this.segment(), index, value); return this; } + /// Sets `maxSubpassShadingWorkgroupSizeAspectRatio` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubpassShadingPropertiesHUAWEI maxSubpassShadingWorkgroupSizeAspectRatio(@CType("uint32_t") int value) { VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.set_maxSubpassShadingWorkgroupSizeAspectRatio(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkSubpassShadingPipelineCreateInfoHUAWEI.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkSubpassShadingPipelineCreateInfoHUAWEI.java new file mode 100644 index 00000000..ee621808 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/huawei/struct/VkSubpassShadingPipelineCreateInfoHUAWEI.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.huawei.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### renderPass +/// [VarHandle][#VH_renderPass] - [Getter][#renderPass()] - [Setter][#renderPass(java.lang.foreign.MemorySegment)] +/// ### subpass +/// [VarHandle][#VH_subpass] - [Getter][#subpass()] - [Setter][#subpass(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassShadingPipelineCreateInfoHUAWEI { +/// VkStructureType sType; +/// void * pNext; +/// VkRenderPass renderPass; +/// uint32_t subpass; +/// } VkSubpassShadingPipelineCreateInfoHUAWEI; +/// ``` +public final class VkSubpassShadingPipelineCreateInfoHUAWEI extends Struct { + /// The struct layout of `VkSubpassShadingPipelineCreateInfoHUAWEI`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("renderPass"), + ValueLayout.JAVA_INT.withName("subpass") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `renderPass` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_renderPass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderPass")); + /// The [VarHandle] of `subpass` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpass")); + + /// Creates `VkSubpassShadingPipelineCreateInfoHUAWEI` with the given segment. + /// @param segment the memory segment + public VkSubpassShadingPipelineCreateInfoHUAWEI(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassShadingPipelineCreateInfoHUAWEI` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassShadingPipelineCreateInfoHUAWEI of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassShadingPipelineCreateInfoHUAWEI(segment); } + + /// Creates `VkSubpassShadingPipelineCreateInfoHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassShadingPipelineCreateInfoHUAWEI ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassShadingPipelineCreateInfoHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassShadingPipelineCreateInfoHUAWEI` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassShadingPipelineCreateInfoHUAWEI ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassShadingPipelineCreateInfoHUAWEI(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassShadingPipelineCreateInfoHUAWEI` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassShadingPipelineCreateInfoHUAWEI` + public static VkSubpassShadingPipelineCreateInfoHUAWEI alloc(SegmentAllocator allocator) { return new VkSubpassShadingPipelineCreateInfoHUAWEI(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassShadingPipelineCreateInfoHUAWEI` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassShadingPipelineCreateInfoHUAWEI` + public static VkSubpassShadingPipelineCreateInfoHUAWEI alloc(SegmentAllocator allocator, long count) { return new VkSubpassShadingPipelineCreateInfoHUAWEI(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassShadingPipelineCreateInfoHUAWEI sTypeAt(long index, @CType("VkStructureType") int value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassShadingPipelineCreateInfoHUAWEI sType(@CType("VkStructureType") int value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassShadingPipelineCreateInfoHUAWEI pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassShadingPipelineCreateInfoHUAWEI pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_pNext(this.segment(), value); return this; } + + /// {@return `renderPass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderPass") java.lang.foreign.MemorySegment get_renderPass(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_renderPass.get(segment, 0L, index); } + /// {@return `renderPass`} + /// @param segment the segment of the struct + public static @CType("VkRenderPass") java.lang.foreign.MemorySegment get_renderPass(MemorySegment segment) { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_renderPass(segment, 0L); } + /// {@return `renderPass` at the given index} + /// @param index the index + public @CType("VkRenderPass") java.lang.foreign.MemorySegment renderPassAt(long index) { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_renderPass(this.segment(), index); } + /// {@return `renderPass`} + public @CType("VkRenderPass") java.lang.foreign.MemorySegment renderPass() { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_renderPass(this.segment()); } + /// Sets `renderPass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderPass(MemorySegment segment, long index, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VH_renderPass.set(segment, 0L, index, value); } + /// Sets `renderPass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderPass(MemorySegment segment, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_renderPass(segment, 0L, value); } + /// Sets `renderPass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassShadingPipelineCreateInfoHUAWEI renderPassAt(long index, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_renderPass(this.segment(), index, value); return this; } + /// Sets `renderPass` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassShadingPipelineCreateInfoHUAWEI renderPass(@CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_renderPass(this.segment(), value); return this; } + + /// {@return `subpass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subpass(MemorySegment segment, long index) { return (int) VH_subpass.get(segment, 0L, index); } + /// {@return `subpass`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subpass(MemorySegment segment) { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_subpass(segment, 0L); } + /// {@return `subpass` at the given index} + /// @param index the index + public @CType("uint32_t") int subpassAt(long index) { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_subpass(this.segment(), index); } + /// {@return `subpass`} + public @CType("uint32_t") int subpass() { return VkSubpassShadingPipelineCreateInfoHUAWEI.get_subpass(this.segment()); } + /// Sets `subpass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpass(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subpass.set(segment, 0L, index, value); } + /// Sets `subpass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpass(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_subpass(segment, 0L, value); } + /// Sets `subpass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassShadingPipelineCreateInfoHUAWEI subpassAt(long index, @CType("uint32_t") int value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_subpass(this.segment(), index, value); return this; } + /// Sets `subpass` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassShadingPipelineCreateInfoHUAWEI subpass(@CType("uint32_t") int value) { VkSubpassShadingPipelineCreateInfoHUAWEI.set_subpass(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/VKIMGFilterCubic.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/VKIMGFilterCubic.java new file mode 100644 index 00000000..b33995a7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/VKIMGFilterCubic.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.img; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.ext.VKEXTFilterCubic.*; +public class VKIMGFilterCubic { + public static final int VK_IMG_FILTER_CUBIC_SPEC_VERSION = 1; + public static final String VK_IMG_FILTER_CUBIC_EXTENSION_NAME = "VK_IMG_filter_cubic"; + public static final int VK_FILTER_CUBIC_IMG = VK_FILTER_CUBIC_EXT; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT; + + public VKIMGFilterCubic(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/VKIMGFormatPvrtc.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/VKIMGFormatPvrtc.java new file mode 100644 index 00000000..87d88d10 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/VKIMGFormatPvrtc.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.img; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKIMGFormatPvrtc { + public static final int VK_IMG_FORMAT_PVRTC_SPEC_VERSION = 1; + public static final String VK_IMG_FORMAT_PVRTC_EXTENSION_NAME = "VK_IMG_format_pvrtc"; + public static final int VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000; + public static final int VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001; + public static final int VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002; + public static final int VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003; + public static final int VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004; + public static final int VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005; + public static final int VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006; + public static final int VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007; + + public VKIMGFormatPvrtc(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/VKIMGRelaxedLineRasterization.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/VKIMGRelaxedLineRasterization.java new file mode 100644 index 00000000..883430a5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/VKIMGRelaxedLineRasterization.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.img; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKIMGRelaxedLineRasterization { + public static final int VK_IMG_RELAXED_LINE_RASTERIZATION_SPEC_VERSION = 1; + public static final String VK_IMG_RELAXED_LINE_RASTERIZATION_EXTENSION_NAME = "VK_IMG_relaxed_line_rasterization"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG = 1000110000; + + public VKIMGRelaxedLineRasterization(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/struct/VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/struct/VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.java new file mode 100644 index 00000000..c15cd16c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/img/struct/VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.img.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### relaxedLineRasterization +/// [VarHandle][#VH_relaxedLineRasterization] - [Getter][#relaxedLineRasterization()] - [Setter][#relaxedLineRasterization(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 relaxedLineRasterization; +/// } VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG; +/// ``` +public final class VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG extends Struct { + /// The struct layout of `VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("relaxedLineRasterization") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `relaxedLineRasterization` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_relaxedLineRasterization = LAYOUT.arrayElementVarHandle(PathElement.groupElement("relaxedLineRasterization")); + + /// Creates `VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG(segment); } + + /// Creates `VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG` + public static VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG` + public static VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.set_pNext(this.segment(), value); return this; } + + /// {@return `relaxedLineRasterization` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_relaxedLineRasterization(MemorySegment segment, long index) { return (int) VH_relaxedLineRasterization.get(segment, 0L, index); } + /// {@return `relaxedLineRasterization`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_relaxedLineRasterization(MemorySegment segment) { return VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.get_relaxedLineRasterization(segment, 0L); } + /// {@return `relaxedLineRasterization` at the given index} + /// @param index the index + public @CType("VkBool32") int relaxedLineRasterizationAt(long index) { return VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.get_relaxedLineRasterization(this.segment(), index); } + /// {@return `relaxedLineRasterization`} + public @CType("VkBool32") int relaxedLineRasterization() { return VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.get_relaxedLineRasterization(this.segment()); } + /// Sets `relaxedLineRasterization` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_relaxedLineRasterization(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_relaxedLineRasterization.set(segment, 0L, index, value); } + /// Sets `relaxedLineRasterization` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_relaxedLineRasterization(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.set_relaxedLineRasterization(segment, 0L, value); } + /// Sets `relaxedLineRasterization` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG relaxedLineRasterizationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.set_relaxedLineRasterization(this.segment(), index, value); return this; } + /// Sets `relaxedLineRasterization` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG relaxedLineRasterization(@CType("VkBool32") int value) { VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.set_relaxedLineRasterization(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/VKINTELPerformanceQuery.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/VKINTELPerformanceQuery.java new file mode 100644 index 00000000..29467ad9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/VKINTELPerformanceQuery.java @@ -0,0 +1,134 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.intel.VKINTELPerformanceQuery.*; +public class VKINTELPerformanceQuery { + public static final int VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL = 0; + public static final int VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL = 0; + public static final int VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL = 0; + public static final int VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL = 1; + public static final int VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL = 0; + public static final int VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL = 1; + public static final int VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL = 0; + public static final int VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL = 1; + public static final int VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL = 2; + public static final int VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL = 3; + public static final int VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL = 4; + public static final int VK_INTEL_PERFORMANCE_QUERY_SPEC_VERSION = 2; + public static final String VK_INTEL_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_INTEL_performance_query"; + public static final int VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL = 1000210000; + public static final int VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL = 1000210001; + public static final int VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL = 1000210002; + public static final int VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL = 1000210003; + public static final int VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL = 1000210004; + public static final int VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL = 1000210005; + public static final int VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL = 1000210000; + public static final int VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL = 1000210000; + public static final int VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL = VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL; + public static final MethodHandle MH_vkInitializePerformanceApiINTEL = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkUninitializePerformanceApiINTEL = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetPerformanceMarkerINTEL = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetPerformanceStreamMarkerINTEL = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetPerformanceOverrideINTEL = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkAcquirePerformanceConfigurationINTEL = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkReleasePerformanceConfigurationINTEL = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkQueueSetPerformanceConfigurationINTEL = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPerformanceParameterINTEL = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkInitializePerformanceApiINTEL; + public final MemorySegment PFN_vkUninitializePerformanceApiINTEL; + public final MemorySegment PFN_vkCmdSetPerformanceMarkerINTEL; + public final MemorySegment PFN_vkCmdSetPerformanceStreamMarkerINTEL; + public final MemorySegment PFN_vkCmdSetPerformanceOverrideINTEL; + public final MemorySegment PFN_vkAcquirePerformanceConfigurationINTEL; + public final MemorySegment PFN_vkReleasePerformanceConfigurationINTEL; + public final MemorySegment PFN_vkQueueSetPerformanceConfigurationINTEL; + public final MemorySegment PFN_vkGetPerformanceParameterINTEL; + + public VKINTELPerformanceQuery(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkInitializePerformanceApiINTEL = func.invoke(device, "vkInitializePerformanceApiINTEL"); + PFN_vkUninitializePerformanceApiINTEL = func.invoke(device, "vkUninitializePerformanceApiINTEL"); + PFN_vkCmdSetPerformanceMarkerINTEL = func.invoke(device, "vkCmdSetPerformanceMarkerINTEL"); + PFN_vkCmdSetPerformanceStreamMarkerINTEL = func.invoke(device, "vkCmdSetPerformanceStreamMarkerINTEL"); + PFN_vkCmdSetPerformanceOverrideINTEL = func.invoke(device, "vkCmdSetPerformanceOverrideINTEL"); + PFN_vkAcquirePerformanceConfigurationINTEL = func.invoke(device, "vkAcquirePerformanceConfigurationINTEL"); + PFN_vkReleasePerformanceConfigurationINTEL = func.invoke(device, "vkReleasePerformanceConfigurationINTEL"); + PFN_vkQueueSetPerformanceConfigurationINTEL = func.invoke(device, "vkQueueSetPerformanceConfigurationINTEL"); + PFN_vkGetPerformanceParameterINTEL = func.invoke(device, "vkGetPerformanceParameterINTEL"); + } + + public @CType("VkResult") int InitializePerformanceApiINTEL(@CType("VkDevice") MemorySegment device, @CType("const VkInitializePerformanceApiInfoINTEL *") MemorySegment pInitializeInfo) { + if (Unmarshal.isNullPointer(PFN_vkInitializePerformanceApiINTEL)) throw new SymbolNotFoundError("Symbol not found: vkInitializePerformanceApiINTEL"); + try { return (int) MH_vkInitializePerformanceApiINTEL.invokeExact(PFN_vkInitializePerformanceApiINTEL, device, pInitializeInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkInitializePerformanceApiINTEL", e); } + } + + public void UninitializePerformanceApiINTEL(@CType("VkDevice") MemorySegment device) { + if (Unmarshal.isNullPointer(PFN_vkUninitializePerformanceApiINTEL)) throw new SymbolNotFoundError("Symbol not found: vkUninitializePerformanceApiINTEL"); + try { MH_vkUninitializePerformanceApiINTEL.invokeExact(PFN_vkUninitializePerformanceApiINTEL, device); } + catch (Throwable e) { throw new RuntimeException("error in vkUninitializePerformanceApiINTEL", e); } + } + + public @CType("VkResult") int CmdSetPerformanceMarkerINTEL(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkPerformanceMarkerInfoINTEL *") MemorySegment pMarkerInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPerformanceMarkerINTEL)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPerformanceMarkerINTEL"); + try { return (int) MH_vkCmdSetPerformanceMarkerINTEL.invokeExact(PFN_vkCmdSetPerformanceMarkerINTEL, commandBuffer, pMarkerInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPerformanceMarkerINTEL", e); } + } + + public @CType("VkResult") int CmdSetPerformanceStreamMarkerINTEL(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkPerformanceStreamMarkerInfoINTEL *") MemorySegment pMarkerInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPerformanceStreamMarkerINTEL)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPerformanceStreamMarkerINTEL"); + try { return (int) MH_vkCmdSetPerformanceStreamMarkerINTEL.invokeExact(PFN_vkCmdSetPerformanceStreamMarkerINTEL, commandBuffer, pMarkerInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPerformanceStreamMarkerINTEL", e); } + } + + public @CType("VkResult") int CmdSetPerformanceOverrideINTEL(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkPerformanceOverrideInfoINTEL *") MemorySegment pOverrideInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetPerformanceOverrideINTEL)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetPerformanceOverrideINTEL"); + try { return (int) MH_vkCmdSetPerformanceOverrideINTEL.invokeExact(PFN_vkCmdSetPerformanceOverrideINTEL, commandBuffer, pOverrideInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetPerformanceOverrideINTEL", e); } + } + + public @CType("VkResult") int AcquirePerformanceConfigurationINTEL(@CType("VkDevice") MemorySegment device, @CType("const VkPerformanceConfigurationAcquireInfoINTEL *") MemorySegment pAcquireInfo, @CType("VkPerformanceConfigurationINTEL *") MemorySegment pConfiguration) { + if (Unmarshal.isNullPointer(PFN_vkAcquirePerformanceConfigurationINTEL)) throw new SymbolNotFoundError("Symbol not found: vkAcquirePerformanceConfigurationINTEL"); + try { return (int) MH_vkAcquirePerformanceConfigurationINTEL.invokeExact(PFN_vkAcquirePerformanceConfigurationINTEL, device, pAcquireInfo, pConfiguration); } + catch (Throwable e) { throw new RuntimeException("error in vkAcquirePerformanceConfigurationINTEL", e); } + } + + public @CType("VkResult") int ReleasePerformanceConfigurationINTEL(@CType("VkDevice") MemorySegment device, @CType("VkPerformanceConfigurationINTEL") MemorySegment configuration) { + if (Unmarshal.isNullPointer(PFN_vkReleasePerformanceConfigurationINTEL)) throw new SymbolNotFoundError("Symbol not found: vkReleasePerformanceConfigurationINTEL"); + try { return (int) MH_vkReleasePerformanceConfigurationINTEL.invokeExact(PFN_vkReleasePerformanceConfigurationINTEL, device, configuration); } + catch (Throwable e) { throw new RuntimeException("error in vkReleasePerformanceConfigurationINTEL", e); } + } + + public @CType("VkResult") int QueueSetPerformanceConfigurationINTEL(@CType("VkQueue") MemorySegment queue, @CType("VkPerformanceConfigurationINTEL") MemorySegment configuration) { + if (Unmarshal.isNullPointer(PFN_vkQueueSetPerformanceConfigurationINTEL)) throw new SymbolNotFoundError("Symbol not found: vkQueueSetPerformanceConfigurationINTEL"); + try { return (int) MH_vkQueueSetPerformanceConfigurationINTEL.invokeExact(PFN_vkQueueSetPerformanceConfigurationINTEL, queue, configuration); } + catch (Throwable e) { throw new RuntimeException("error in vkQueueSetPerformanceConfigurationINTEL", e); } + } + + public @CType("VkResult") int GetPerformanceParameterINTEL(@CType("VkDevice") MemorySegment device, @CType("VkPerformanceParameterTypeINTEL") int parameter, @CType("VkPerformanceValueINTEL *") MemorySegment pValue) { + if (Unmarshal.isNullPointer(PFN_vkGetPerformanceParameterINTEL)) throw new SymbolNotFoundError("Symbol not found: vkGetPerformanceParameterINTEL"); + try { return (int) MH_vkGetPerformanceParameterINTEL.invokeExact(PFN_vkGetPerformanceParameterINTEL, device, parameter, pValue); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPerformanceParameterINTEL", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/VKINTELShaderIntegerFunctions2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/VKINTELShaderIntegerFunctions2.java new file mode 100644 index 00000000..e67ee861 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/VKINTELShaderIntegerFunctions2.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKINTELShaderIntegerFunctions2 { + public static final int VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_SPEC_VERSION = 1; + public static final String VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME = "VK_INTEL_shader_integer_functions2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL = 1000209000; + + public VKINTELShaderIntegerFunctions2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkInitializePerformanceApiInfoINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkInitializePerformanceApiInfoINTEL.java new file mode 100644 index 00000000..b8ed1ebd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkInitializePerformanceApiInfoINTEL.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pUserData +/// [VarHandle][#VH_pUserData] - [Getter][#pUserData()] - [Setter][#pUserData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkInitializePerformanceApiInfoINTEL { +/// VkStructureType sType; +/// const void * pNext; +/// void * pUserData; +/// } VkInitializePerformanceApiInfoINTEL; +/// ``` +public final class VkInitializePerformanceApiInfoINTEL extends Struct { + /// The struct layout of `VkInitializePerformanceApiInfoINTEL`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pUserData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pUserData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pUserData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pUserData")); + + /// Creates `VkInitializePerformanceApiInfoINTEL` with the given segment. + /// @param segment the memory segment + public VkInitializePerformanceApiInfoINTEL(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkInitializePerformanceApiInfoINTEL` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkInitializePerformanceApiInfoINTEL of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkInitializePerformanceApiInfoINTEL(segment); } + + /// Creates `VkInitializePerformanceApiInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkInitializePerformanceApiInfoINTEL ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkInitializePerformanceApiInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkInitializePerformanceApiInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkInitializePerformanceApiInfoINTEL ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkInitializePerformanceApiInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkInitializePerformanceApiInfoINTEL` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkInitializePerformanceApiInfoINTEL` + public static VkInitializePerformanceApiInfoINTEL alloc(SegmentAllocator allocator) { return new VkInitializePerformanceApiInfoINTEL(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkInitializePerformanceApiInfoINTEL` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkInitializePerformanceApiInfoINTEL` + public static VkInitializePerformanceApiInfoINTEL alloc(SegmentAllocator allocator, long count) { return new VkInitializePerformanceApiInfoINTEL(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkInitializePerformanceApiInfoINTEL.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkInitializePerformanceApiInfoINTEL.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkInitializePerformanceApiInfoINTEL.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkInitializePerformanceApiInfoINTEL.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInitializePerformanceApiInfoINTEL sTypeAt(long index, @CType("VkStructureType") int value) { VkInitializePerformanceApiInfoINTEL.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkInitializePerformanceApiInfoINTEL sType(@CType("VkStructureType") int value) { VkInitializePerformanceApiInfoINTEL.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkInitializePerformanceApiInfoINTEL.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkInitializePerformanceApiInfoINTEL.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkInitializePerformanceApiInfoINTEL.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkInitializePerformanceApiInfoINTEL.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInitializePerformanceApiInfoINTEL pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkInitializePerformanceApiInfoINTEL.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkInitializePerformanceApiInfoINTEL pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkInitializePerformanceApiInfoINTEL.set_pNext(this.segment(), value); return this; } + + /// {@return `pUserData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pUserData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pUserData.get(segment, 0L, index); } + /// {@return `pUserData`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pUserData(MemorySegment segment) { return VkInitializePerformanceApiInfoINTEL.get_pUserData(segment, 0L); } + /// {@return `pUserData` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pUserDataAt(long index) { return VkInitializePerformanceApiInfoINTEL.get_pUserData(this.segment(), index); } + /// {@return `pUserData`} + public @CType("void *") java.lang.foreign.MemorySegment pUserData() { return VkInitializePerformanceApiInfoINTEL.get_pUserData(this.segment()); } + /// Sets `pUserData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pUserData(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pUserData.set(segment, 0L, index, value); } + /// Sets `pUserData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pUserData(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkInitializePerformanceApiInfoINTEL.set_pUserData(segment, 0L, value); } + /// Sets `pUserData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInitializePerformanceApiInfoINTEL pUserDataAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkInitializePerformanceApiInfoINTEL.set_pUserData(this.segment(), index, value); return this; } + /// Sets `pUserData` with the given value. + /// @param value the value + /// @return `this` + public VkInitializePerformanceApiInfoINTEL pUserData(@CType("void *") java.lang.foreign.MemorySegment value) { VkInitializePerformanceApiInfoINTEL.set_pUserData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceConfigurationAcquireInfoINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceConfigurationAcquireInfoINTEL.java new file mode 100644 index 00000000..296ae06a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceConfigurationAcquireInfoINTEL.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPerformanceConfigurationAcquireInfoINTEL { +/// VkStructureType sType; +/// const void * pNext; +/// VkPerformanceConfigurationTypeINTEL type; +/// } VkPerformanceConfigurationAcquireInfoINTEL; +/// ``` +public final class VkPerformanceConfigurationAcquireInfoINTEL extends Struct { + /// The struct layout of `VkPerformanceConfigurationAcquireInfoINTEL`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + + /// Creates `VkPerformanceConfigurationAcquireInfoINTEL` with the given segment. + /// @param segment the memory segment + public VkPerformanceConfigurationAcquireInfoINTEL(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceConfigurationAcquireInfoINTEL` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceConfigurationAcquireInfoINTEL of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceConfigurationAcquireInfoINTEL(segment); } + + /// Creates `VkPerformanceConfigurationAcquireInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceConfigurationAcquireInfoINTEL ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceConfigurationAcquireInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceConfigurationAcquireInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceConfigurationAcquireInfoINTEL ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceConfigurationAcquireInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceConfigurationAcquireInfoINTEL` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceConfigurationAcquireInfoINTEL` + public static VkPerformanceConfigurationAcquireInfoINTEL alloc(SegmentAllocator allocator) { return new VkPerformanceConfigurationAcquireInfoINTEL(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceConfigurationAcquireInfoINTEL` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceConfigurationAcquireInfoINTEL` + public static VkPerformanceConfigurationAcquireInfoINTEL alloc(SegmentAllocator allocator, long count) { return new VkPerformanceConfigurationAcquireInfoINTEL(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPerformanceConfigurationAcquireInfoINTEL.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPerformanceConfigurationAcquireInfoINTEL.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPerformanceConfigurationAcquireInfoINTEL.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPerformanceConfigurationAcquireInfoINTEL.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceConfigurationAcquireInfoINTEL sTypeAt(long index, @CType("VkStructureType") int value) { VkPerformanceConfigurationAcquireInfoINTEL.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceConfigurationAcquireInfoINTEL sType(@CType("VkStructureType") int value) { VkPerformanceConfigurationAcquireInfoINTEL.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPerformanceConfigurationAcquireInfoINTEL.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPerformanceConfigurationAcquireInfoINTEL.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPerformanceConfigurationAcquireInfoINTEL.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceConfigurationAcquireInfoINTEL.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceConfigurationAcquireInfoINTEL pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceConfigurationAcquireInfoINTEL.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceConfigurationAcquireInfoINTEL pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceConfigurationAcquireInfoINTEL.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPerformanceConfigurationTypeINTEL") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkPerformanceConfigurationTypeINTEL") int get_type(MemorySegment segment) { return VkPerformanceConfigurationAcquireInfoINTEL.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkPerformanceConfigurationTypeINTEL") int typeAt(long index) { return VkPerformanceConfigurationAcquireInfoINTEL.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkPerformanceConfigurationTypeINTEL") int type() { return VkPerformanceConfigurationAcquireInfoINTEL.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkPerformanceConfigurationTypeINTEL") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkPerformanceConfigurationTypeINTEL") int value) { VkPerformanceConfigurationAcquireInfoINTEL.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceConfigurationAcquireInfoINTEL typeAt(long index, @CType("VkPerformanceConfigurationTypeINTEL") int value) { VkPerformanceConfigurationAcquireInfoINTEL.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceConfigurationAcquireInfoINTEL type(@CType("VkPerformanceConfigurationTypeINTEL") int value) { VkPerformanceConfigurationAcquireInfoINTEL.set_type(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceMarkerInfoINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceMarkerInfoINTEL.java new file mode 100644 index 00000000..377f7426 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceMarkerInfoINTEL.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### marker +/// [VarHandle][#VH_marker] - [Getter][#marker()] - [Setter][#marker(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPerformanceMarkerInfoINTEL { +/// VkStructureType sType; +/// const void * pNext; +/// uint64_t marker; +/// } VkPerformanceMarkerInfoINTEL; +/// ``` +public final class VkPerformanceMarkerInfoINTEL extends Struct { + /// The struct layout of `VkPerformanceMarkerInfoINTEL`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("marker") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `marker` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_marker = LAYOUT.arrayElementVarHandle(PathElement.groupElement("marker")); + + /// Creates `VkPerformanceMarkerInfoINTEL` with the given segment. + /// @param segment the memory segment + public VkPerformanceMarkerInfoINTEL(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceMarkerInfoINTEL` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceMarkerInfoINTEL of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceMarkerInfoINTEL(segment); } + + /// Creates `VkPerformanceMarkerInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceMarkerInfoINTEL ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceMarkerInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceMarkerInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceMarkerInfoINTEL ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceMarkerInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceMarkerInfoINTEL` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceMarkerInfoINTEL` + public static VkPerformanceMarkerInfoINTEL alloc(SegmentAllocator allocator) { return new VkPerformanceMarkerInfoINTEL(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceMarkerInfoINTEL` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceMarkerInfoINTEL` + public static VkPerformanceMarkerInfoINTEL alloc(SegmentAllocator allocator, long count) { return new VkPerformanceMarkerInfoINTEL(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPerformanceMarkerInfoINTEL.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPerformanceMarkerInfoINTEL.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPerformanceMarkerInfoINTEL.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPerformanceMarkerInfoINTEL.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceMarkerInfoINTEL sTypeAt(long index, @CType("VkStructureType") int value) { VkPerformanceMarkerInfoINTEL.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceMarkerInfoINTEL sType(@CType("VkStructureType") int value) { VkPerformanceMarkerInfoINTEL.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPerformanceMarkerInfoINTEL.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPerformanceMarkerInfoINTEL.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPerformanceMarkerInfoINTEL.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceMarkerInfoINTEL.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceMarkerInfoINTEL pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceMarkerInfoINTEL.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceMarkerInfoINTEL pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceMarkerInfoINTEL.set_pNext(this.segment(), value); return this; } + + /// {@return `marker` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_marker(MemorySegment segment, long index) { return (long) VH_marker.get(segment, 0L, index); } + /// {@return `marker`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_marker(MemorySegment segment) { return VkPerformanceMarkerInfoINTEL.get_marker(segment, 0L); } + /// {@return `marker` at the given index} + /// @param index the index + public @CType("uint64_t") long markerAt(long index) { return VkPerformanceMarkerInfoINTEL.get_marker(this.segment(), index); } + /// {@return `marker`} + public @CType("uint64_t") long marker() { return VkPerformanceMarkerInfoINTEL.get_marker(this.segment()); } + /// Sets `marker` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_marker(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_marker.set(segment, 0L, index, value); } + /// Sets `marker` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_marker(MemorySegment segment, @CType("uint64_t") long value) { VkPerformanceMarkerInfoINTEL.set_marker(segment, 0L, value); } + /// Sets `marker` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceMarkerInfoINTEL markerAt(long index, @CType("uint64_t") long value) { VkPerformanceMarkerInfoINTEL.set_marker(this.segment(), index, value); return this; } + /// Sets `marker` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceMarkerInfoINTEL marker(@CType("uint64_t") long value) { VkPerformanceMarkerInfoINTEL.set_marker(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceOverrideInfoINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceOverrideInfoINTEL.java new file mode 100644 index 00000000..91cbd4ac --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceOverrideInfoINTEL.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### enable +/// [VarHandle][#VH_enable] - [Getter][#enable()] - [Setter][#enable(int)] +/// ### parameter +/// [VarHandle][#VH_parameter] - [Getter][#parameter()] - [Setter][#parameter(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPerformanceOverrideInfoINTEL { +/// VkStructureType sType; +/// const void * pNext; +/// VkPerformanceOverrideTypeINTEL type; +/// VkBool32 enable; +/// uint64_t parameter; +/// } VkPerformanceOverrideInfoINTEL; +/// ``` +public final class VkPerformanceOverrideInfoINTEL extends Struct { + /// The struct layout of `VkPerformanceOverrideInfoINTEL`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("enable"), + ValueLayout.JAVA_LONG.withName("parameter") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `enable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable")); + /// The [VarHandle] of `parameter` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_parameter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("parameter")); + + /// Creates `VkPerformanceOverrideInfoINTEL` with the given segment. + /// @param segment the memory segment + public VkPerformanceOverrideInfoINTEL(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceOverrideInfoINTEL` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceOverrideInfoINTEL of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceOverrideInfoINTEL(segment); } + + /// Creates `VkPerformanceOverrideInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceOverrideInfoINTEL ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceOverrideInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceOverrideInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceOverrideInfoINTEL ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceOverrideInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceOverrideInfoINTEL` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceOverrideInfoINTEL` + public static VkPerformanceOverrideInfoINTEL alloc(SegmentAllocator allocator) { return new VkPerformanceOverrideInfoINTEL(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceOverrideInfoINTEL` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceOverrideInfoINTEL` + public static VkPerformanceOverrideInfoINTEL alloc(SegmentAllocator allocator, long count) { return new VkPerformanceOverrideInfoINTEL(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPerformanceOverrideInfoINTEL.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPerformanceOverrideInfoINTEL.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPerformanceOverrideInfoINTEL.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPerformanceOverrideInfoINTEL.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceOverrideInfoINTEL sTypeAt(long index, @CType("VkStructureType") int value) { VkPerformanceOverrideInfoINTEL.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceOverrideInfoINTEL sType(@CType("VkStructureType") int value) { VkPerformanceOverrideInfoINTEL.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPerformanceOverrideInfoINTEL.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPerformanceOverrideInfoINTEL.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPerformanceOverrideInfoINTEL.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceOverrideInfoINTEL.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceOverrideInfoINTEL pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceOverrideInfoINTEL.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceOverrideInfoINTEL pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceOverrideInfoINTEL.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPerformanceOverrideTypeINTEL") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkPerformanceOverrideTypeINTEL") int get_type(MemorySegment segment) { return VkPerformanceOverrideInfoINTEL.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkPerformanceOverrideTypeINTEL") int typeAt(long index) { return VkPerformanceOverrideInfoINTEL.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkPerformanceOverrideTypeINTEL") int type() { return VkPerformanceOverrideInfoINTEL.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkPerformanceOverrideTypeINTEL") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkPerformanceOverrideTypeINTEL") int value) { VkPerformanceOverrideInfoINTEL.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceOverrideInfoINTEL typeAt(long index, @CType("VkPerformanceOverrideTypeINTEL") int value) { VkPerformanceOverrideInfoINTEL.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceOverrideInfoINTEL type(@CType("VkPerformanceOverrideTypeINTEL") int value) { VkPerformanceOverrideInfoINTEL.set_type(this.segment(), value); return this; } + + /// {@return `enable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_enable(MemorySegment segment, long index) { return (int) VH_enable.get(segment, 0L, index); } + /// {@return `enable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_enable(MemorySegment segment) { return VkPerformanceOverrideInfoINTEL.get_enable(segment, 0L); } + /// {@return `enable` at the given index} + /// @param index the index + public @CType("VkBool32") int enableAt(long index) { return VkPerformanceOverrideInfoINTEL.get_enable(this.segment(), index); } + /// {@return `enable`} + public @CType("VkBool32") int enable() { return VkPerformanceOverrideInfoINTEL.get_enable(this.segment()); } + /// Sets `enable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_enable.set(segment, 0L, index, value); } + /// Sets `enable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable(MemorySegment segment, @CType("VkBool32") int value) { VkPerformanceOverrideInfoINTEL.set_enable(segment, 0L, value); } + /// Sets `enable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceOverrideInfoINTEL enableAt(long index, @CType("VkBool32") int value) { VkPerformanceOverrideInfoINTEL.set_enable(this.segment(), index, value); return this; } + /// Sets `enable` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceOverrideInfoINTEL enable(@CType("VkBool32") int value) { VkPerformanceOverrideInfoINTEL.set_enable(this.segment(), value); return this; } + + /// {@return `parameter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_parameter(MemorySegment segment, long index) { return (long) VH_parameter.get(segment, 0L, index); } + /// {@return `parameter`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_parameter(MemorySegment segment) { return VkPerformanceOverrideInfoINTEL.get_parameter(segment, 0L); } + /// {@return `parameter` at the given index} + /// @param index the index + public @CType("uint64_t") long parameterAt(long index) { return VkPerformanceOverrideInfoINTEL.get_parameter(this.segment(), index); } + /// {@return `parameter`} + public @CType("uint64_t") long parameter() { return VkPerformanceOverrideInfoINTEL.get_parameter(this.segment()); } + /// Sets `parameter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_parameter(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_parameter.set(segment, 0L, index, value); } + /// Sets `parameter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_parameter(MemorySegment segment, @CType("uint64_t") long value) { VkPerformanceOverrideInfoINTEL.set_parameter(segment, 0L, value); } + /// Sets `parameter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceOverrideInfoINTEL parameterAt(long index, @CType("uint64_t") long value) { VkPerformanceOverrideInfoINTEL.set_parameter(this.segment(), index, value); return this; } + /// Sets `parameter` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceOverrideInfoINTEL parameter(@CType("uint64_t") long value) { VkPerformanceOverrideInfoINTEL.set_parameter(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceStreamMarkerInfoINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceStreamMarkerInfoINTEL.java new file mode 100644 index 00000000..aa5821c9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceStreamMarkerInfoINTEL.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### marker +/// [VarHandle][#VH_marker] - [Getter][#marker()] - [Setter][#marker(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPerformanceStreamMarkerInfoINTEL { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t marker; +/// } VkPerformanceStreamMarkerInfoINTEL; +/// ``` +public final class VkPerformanceStreamMarkerInfoINTEL extends Struct { + /// The struct layout of `VkPerformanceStreamMarkerInfoINTEL`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("marker") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `marker` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_marker = LAYOUT.arrayElementVarHandle(PathElement.groupElement("marker")); + + /// Creates `VkPerformanceStreamMarkerInfoINTEL` with the given segment. + /// @param segment the memory segment + public VkPerformanceStreamMarkerInfoINTEL(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceStreamMarkerInfoINTEL` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceStreamMarkerInfoINTEL of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceStreamMarkerInfoINTEL(segment); } + + /// Creates `VkPerformanceStreamMarkerInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceStreamMarkerInfoINTEL ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceStreamMarkerInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceStreamMarkerInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceStreamMarkerInfoINTEL ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceStreamMarkerInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceStreamMarkerInfoINTEL` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceStreamMarkerInfoINTEL` + public static VkPerformanceStreamMarkerInfoINTEL alloc(SegmentAllocator allocator) { return new VkPerformanceStreamMarkerInfoINTEL(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceStreamMarkerInfoINTEL` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceStreamMarkerInfoINTEL` + public static VkPerformanceStreamMarkerInfoINTEL alloc(SegmentAllocator allocator, long count) { return new VkPerformanceStreamMarkerInfoINTEL(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPerformanceStreamMarkerInfoINTEL.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPerformanceStreamMarkerInfoINTEL.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPerformanceStreamMarkerInfoINTEL.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPerformanceStreamMarkerInfoINTEL.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceStreamMarkerInfoINTEL sTypeAt(long index, @CType("VkStructureType") int value) { VkPerformanceStreamMarkerInfoINTEL.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceStreamMarkerInfoINTEL sType(@CType("VkStructureType") int value) { VkPerformanceStreamMarkerInfoINTEL.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPerformanceStreamMarkerInfoINTEL.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPerformanceStreamMarkerInfoINTEL.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPerformanceStreamMarkerInfoINTEL.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceStreamMarkerInfoINTEL.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceStreamMarkerInfoINTEL pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceStreamMarkerInfoINTEL.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceStreamMarkerInfoINTEL pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceStreamMarkerInfoINTEL.set_pNext(this.segment(), value); return this; } + + /// {@return `marker` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_marker(MemorySegment segment, long index) { return (int) VH_marker.get(segment, 0L, index); } + /// {@return `marker`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_marker(MemorySegment segment) { return VkPerformanceStreamMarkerInfoINTEL.get_marker(segment, 0L); } + /// {@return `marker` at the given index} + /// @param index the index + public @CType("uint32_t") int markerAt(long index) { return VkPerformanceStreamMarkerInfoINTEL.get_marker(this.segment(), index); } + /// {@return `marker`} + public @CType("uint32_t") int marker() { return VkPerformanceStreamMarkerInfoINTEL.get_marker(this.segment()); } + /// Sets `marker` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_marker(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_marker.set(segment, 0L, index, value); } + /// Sets `marker` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_marker(MemorySegment segment, @CType("uint32_t") int value) { VkPerformanceStreamMarkerInfoINTEL.set_marker(segment, 0L, value); } + /// Sets `marker` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceStreamMarkerInfoINTEL markerAt(long index, @CType("uint32_t") int value) { VkPerformanceStreamMarkerInfoINTEL.set_marker(this.segment(), index, value); return this; } + /// Sets `marker` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceStreamMarkerInfoINTEL marker(@CType("uint32_t") int value) { VkPerformanceStreamMarkerInfoINTEL.set_marker(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceValueINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceValueINTEL.java new file mode 100644 index 00000000..16cf1e96 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPerformanceValueINTEL.java @@ -0,0 +1,150 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### data +/// [Byte offset][#OFFSET_data] - [Memory layout][#ML_data] - [Getter][#data()] - [Setter][#data(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPerformanceValueINTEL { +/// VkPerformanceValueTypeINTEL type; +/// VkPerformanceValueDataINTEL data; +/// } VkPerformanceValueINTEL; +/// ``` +public final class VkPerformanceValueINTEL extends Struct { + /// The struct layout of `VkPerformanceValueINTEL`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("type"), + overrungl.vulkan.intel.union.VkPerformanceValueDataINTEL.LAYOUT.withName("data") + ); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The byte offset of `data`. + public static final long OFFSET_data = LAYOUT.byteOffset(PathElement.groupElement("data")); + /// The memory layout of `data`. + public static final MemoryLayout ML_data = LAYOUT.select(PathElement.groupElement("data")); + + /// Creates `VkPerformanceValueINTEL` with the given segment. + /// @param segment the memory segment + public VkPerformanceValueINTEL(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceValueINTEL` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceValueINTEL of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceValueINTEL(segment); } + + /// Creates `VkPerformanceValueINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceValueINTEL ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceValueINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceValueINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceValueINTEL ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceValueINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceValueINTEL` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceValueINTEL` + public static VkPerformanceValueINTEL alloc(SegmentAllocator allocator) { return new VkPerformanceValueINTEL(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceValueINTEL` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceValueINTEL` + public static VkPerformanceValueINTEL alloc(SegmentAllocator allocator, long count) { return new VkPerformanceValueINTEL(allocator.allocate(LAYOUT, count)); } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPerformanceValueTypeINTEL") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkPerformanceValueTypeINTEL") int get_type(MemorySegment segment) { return VkPerformanceValueINTEL.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkPerformanceValueTypeINTEL") int typeAt(long index) { return VkPerformanceValueINTEL.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkPerformanceValueTypeINTEL") int type() { return VkPerformanceValueINTEL.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkPerformanceValueTypeINTEL") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkPerformanceValueTypeINTEL") int value) { VkPerformanceValueINTEL.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceValueINTEL typeAt(long index, @CType("VkPerformanceValueTypeINTEL") int value) { VkPerformanceValueINTEL.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceValueINTEL type(@CType("VkPerformanceValueTypeINTEL") int value) { VkPerformanceValueINTEL.set_type(this.segment(), value); return this; } + + /// {@return `data` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPerformanceValueDataINTEL") java.lang.foreign.MemorySegment get_data(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_data, index), ML_data); } + /// {@return `data`} + /// @param segment the segment of the struct + public static @CType("VkPerformanceValueDataINTEL") java.lang.foreign.MemorySegment get_data(MemorySegment segment) { return VkPerformanceValueINTEL.get_data(segment, 0L); } + /// {@return `data` at the given index} + /// @param index the index + public @CType("VkPerformanceValueDataINTEL") java.lang.foreign.MemorySegment dataAt(long index) { return VkPerformanceValueINTEL.get_data(this.segment(), index); } + /// {@return `data`} + public @CType("VkPerformanceValueDataINTEL") java.lang.foreign.MemorySegment data() { return VkPerformanceValueINTEL.get_data(this.segment()); } + /// Sets `data` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_data(MemorySegment segment, long index, @CType("VkPerformanceValueDataINTEL") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_data, index), ML_data.byteSize()); } + /// Sets `data` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_data(MemorySegment segment, @CType("VkPerformanceValueDataINTEL") java.lang.foreign.MemorySegment value) { VkPerformanceValueINTEL.set_data(segment, 0L, value); } + /// Sets `data` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceValueINTEL dataAt(long index, @CType("VkPerformanceValueDataINTEL") java.lang.foreign.MemorySegment value) { VkPerformanceValueINTEL.set_data(this.segment(), index, value); return this; } + /// Sets `data` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceValueINTEL data(@CType("VkPerformanceValueDataINTEL") java.lang.foreign.MemorySegment value) { VkPerformanceValueINTEL.set_data(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.java new file mode 100644 index 00000000..bae6773e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderIntegerFunctions2 +/// [VarHandle][#VH_shaderIntegerFunctions2] - [Getter][#shaderIntegerFunctions2()] - [Setter][#shaderIntegerFunctions2(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderIntegerFunctions2; +/// } VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; +/// ``` +public final class VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderIntegerFunctions2") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderIntegerFunctions2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderIntegerFunctions2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderIntegerFunctions2")); + + /// Creates `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL(segment); } + + /// Creates `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL` + public static VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL` + public static VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderIntegerFunctions2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderIntegerFunctions2(MemorySegment segment, long index) { return (int) VH_shaderIntegerFunctions2.get(segment, 0L, index); } + /// {@return `shaderIntegerFunctions2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderIntegerFunctions2(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.get_shaderIntegerFunctions2(segment, 0L); } + /// {@return `shaderIntegerFunctions2` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderIntegerFunctions2At(long index) { return VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.get_shaderIntegerFunctions2(this.segment(), index); } + /// {@return `shaderIntegerFunctions2`} + public @CType("VkBool32") int shaderIntegerFunctions2() { return VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.get_shaderIntegerFunctions2(this.segment()); } + /// Sets `shaderIntegerFunctions2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderIntegerFunctions2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderIntegerFunctions2.set(segment, 0L, index, value); } + /// Sets `shaderIntegerFunctions2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderIntegerFunctions2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.set_shaderIntegerFunctions2(segment, 0L, value); } + /// Sets `shaderIntegerFunctions2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL shaderIntegerFunctions2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.set_shaderIntegerFunctions2(this.segment(), index, value); return this; } + /// Sets `shaderIntegerFunctions2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL shaderIntegerFunctions2(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.set_shaderIntegerFunctions2(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkQueryPoolPerformanceQueryCreateInfoINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkQueryPoolPerformanceQueryCreateInfoINTEL.java new file mode 100644 index 00000000..2fb3cb4d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/struct/VkQueryPoolPerformanceQueryCreateInfoINTEL.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### performanceCountersSampling +/// [VarHandle][#VH_performanceCountersSampling] - [Getter][#performanceCountersSampling()] - [Setter][#performanceCountersSampling(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueryPoolPerformanceQueryCreateInfoINTEL { +/// VkStructureType sType; +/// const void * pNext; +/// VkQueryPoolSamplingModeINTEL performanceCountersSampling; +/// } VkQueryPoolPerformanceQueryCreateInfoINTEL; +/// ``` +public final class VkQueryPoolPerformanceQueryCreateInfoINTEL extends Struct { + /// The struct layout of `VkQueryPoolPerformanceQueryCreateInfoINTEL`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("performanceCountersSampling") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `performanceCountersSampling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_performanceCountersSampling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("performanceCountersSampling")); + + /// Creates `VkQueryPoolPerformanceQueryCreateInfoINTEL` with the given segment. + /// @param segment the memory segment + public VkQueryPoolPerformanceQueryCreateInfoINTEL(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueryPoolPerformanceQueryCreateInfoINTEL` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolPerformanceQueryCreateInfoINTEL of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolPerformanceQueryCreateInfoINTEL(segment); } + + /// Creates `VkQueryPoolPerformanceQueryCreateInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolPerformanceQueryCreateInfoINTEL ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolPerformanceQueryCreateInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueryPoolPerformanceQueryCreateInfoINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolPerformanceQueryCreateInfoINTEL ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolPerformanceQueryCreateInfoINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueryPoolPerformanceQueryCreateInfoINTEL` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueryPoolPerformanceQueryCreateInfoINTEL` + public static VkQueryPoolPerformanceQueryCreateInfoINTEL alloc(SegmentAllocator allocator) { return new VkQueryPoolPerformanceQueryCreateInfoINTEL(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueryPoolPerformanceQueryCreateInfoINTEL` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueryPoolPerformanceQueryCreateInfoINTEL` + public static VkQueryPoolPerformanceQueryCreateInfoINTEL alloc(SegmentAllocator allocator, long count) { return new VkQueryPoolPerformanceQueryCreateInfoINTEL(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueryPoolPerformanceQueryCreateInfoINTEL.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueryPoolPerformanceQueryCreateInfoINTEL.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueryPoolPerformanceQueryCreateInfoINTEL.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueryPoolPerformanceQueryCreateInfoINTEL.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceQueryCreateInfoINTEL sTypeAt(long index, @CType("VkStructureType") int value) { VkQueryPoolPerformanceQueryCreateInfoINTEL.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceQueryCreateInfoINTEL sType(@CType("VkStructureType") int value) { VkQueryPoolPerformanceQueryCreateInfoINTEL.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueryPoolPerformanceQueryCreateInfoINTEL.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueryPoolPerformanceQueryCreateInfoINTEL.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkQueryPoolPerformanceQueryCreateInfoINTEL.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolPerformanceQueryCreateInfoINTEL.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceQueryCreateInfoINTEL pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolPerformanceQueryCreateInfoINTEL.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceQueryCreateInfoINTEL pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolPerformanceQueryCreateInfoINTEL.set_pNext(this.segment(), value); return this; } + + /// {@return `performanceCountersSampling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueryPoolSamplingModeINTEL") int get_performanceCountersSampling(MemorySegment segment, long index) { return (int) VH_performanceCountersSampling.get(segment, 0L, index); } + /// {@return `performanceCountersSampling`} + /// @param segment the segment of the struct + public static @CType("VkQueryPoolSamplingModeINTEL") int get_performanceCountersSampling(MemorySegment segment) { return VkQueryPoolPerformanceQueryCreateInfoINTEL.get_performanceCountersSampling(segment, 0L); } + /// {@return `performanceCountersSampling` at the given index} + /// @param index the index + public @CType("VkQueryPoolSamplingModeINTEL") int performanceCountersSamplingAt(long index) { return VkQueryPoolPerformanceQueryCreateInfoINTEL.get_performanceCountersSampling(this.segment(), index); } + /// {@return `performanceCountersSampling`} + public @CType("VkQueryPoolSamplingModeINTEL") int performanceCountersSampling() { return VkQueryPoolPerformanceQueryCreateInfoINTEL.get_performanceCountersSampling(this.segment()); } + /// Sets `performanceCountersSampling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_performanceCountersSampling(MemorySegment segment, long index, @CType("VkQueryPoolSamplingModeINTEL") int value) { VH_performanceCountersSampling.set(segment, 0L, index, value); } + /// Sets `performanceCountersSampling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_performanceCountersSampling(MemorySegment segment, @CType("VkQueryPoolSamplingModeINTEL") int value) { VkQueryPoolPerformanceQueryCreateInfoINTEL.set_performanceCountersSampling(segment, 0L, value); } + /// Sets `performanceCountersSampling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceQueryCreateInfoINTEL performanceCountersSamplingAt(long index, @CType("VkQueryPoolSamplingModeINTEL") int value) { VkQueryPoolPerformanceQueryCreateInfoINTEL.set_performanceCountersSampling(this.segment(), index, value); return this; } + /// Sets `performanceCountersSampling` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceQueryCreateInfoINTEL performanceCountersSampling(@CType("VkQueryPoolSamplingModeINTEL") int value) { VkQueryPoolPerformanceQueryCreateInfoINTEL.set_performanceCountersSampling(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/union/VkPerformanceValueDataINTEL.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/union/VkPerformanceValueDataINTEL.java new file mode 100644 index 00000000..5ffc0952 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/intel/union/VkPerformanceValueDataINTEL.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.intel.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### value32 +/// [VarHandle][#VH_value32] - [Getter][#value32()] - [Setter][#value32(int)] +/// ### value64 +/// [VarHandle][#VH_value64] - [Getter][#value64()] - [Setter][#value64(long)] +/// ### valueFloat +/// [VarHandle][#VH_valueFloat] - [Getter][#valueFloat()] - [Setter][#valueFloat(float)] +/// ### valueBool +/// [VarHandle][#VH_valueBool] - [Getter][#valueBool()] - [Setter][#valueBool(int)] +/// ### valueString +/// [VarHandle][#VH_valueString] - [Getter][#valueString()] - [Setter][#valueString(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkPerformanceValueDataINTEL { +/// uint32_t value32; +/// uint64_t value64; +/// float valueFloat; +/// VkBool32 valueBool; +/// const char * valueString; +/// } VkPerformanceValueDataINTEL; +/// ``` +public final class VkPerformanceValueDataINTEL extends Union { + /// The union layout of `VkPerformanceValueDataINTEL`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + ValueLayout.JAVA_INT.withName("value32"), + ValueLayout.JAVA_LONG.withName("value64"), + ValueLayout.JAVA_FLOAT.withName("valueFloat"), + ValueLayout.JAVA_INT.withName("valueBool"), + ValueLayout.ADDRESS.withName("valueString") + ); + /// The [VarHandle] of `value32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_value32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("value32")); + /// The [VarHandle] of `value64` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_value64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("value64")); + /// The [VarHandle] of `valueFloat` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_valueFloat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("valueFloat")); + /// The [VarHandle] of `valueBool` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_valueBool = LAYOUT.arrayElementVarHandle(PathElement.groupElement("valueBool")); + /// The [VarHandle] of `valueString` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_valueString = LAYOUT.arrayElementVarHandle(PathElement.groupElement("valueString")); + + /// Creates `VkPerformanceValueDataINTEL` with the given segment. + /// @param segment the memory segment + public VkPerformanceValueDataINTEL(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceValueDataINTEL` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceValueDataINTEL of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceValueDataINTEL(segment); } + + /// Creates `VkPerformanceValueDataINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceValueDataINTEL ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceValueDataINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceValueDataINTEL` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceValueDataINTEL ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceValueDataINTEL(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceValueDataINTEL` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceValueDataINTEL` + public static VkPerformanceValueDataINTEL alloc(SegmentAllocator allocator) { return new VkPerformanceValueDataINTEL(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceValueDataINTEL` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceValueDataINTEL` + public static VkPerformanceValueDataINTEL alloc(SegmentAllocator allocator, long count) { return new VkPerformanceValueDataINTEL(allocator.allocate(LAYOUT, count)); } + + /// {@return `value32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_value32(MemorySegment segment, long index) { return (int) VH_value32.get(segment, 0L, index); } + /// {@return `value32`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_value32(MemorySegment segment) { return VkPerformanceValueDataINTEL.get_value32(segment, 0L); } + /// {@return `value32` at the given index} + /// @param index the index + public @CType("uint32_t") int value32At(long index) { return VkPerformanceValueDataINTEL.get_value32(this.segment(), index); } + /// {@return `value32`} + public @CType("uint32_t") int value32() { return VkPerformanceValueDataINTEL.get_value32(this.segment()); } + /// Sets `value32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_value32(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_value32.set(segment, 0L, index, value); } + /// Sets `value32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_value32(MemorySegment segment, @CType("uint32_t") int value) { VkPerformanceValueDataINTEL.set_value32(segment, 0L, value); } + /// Sets `value32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceValueDataINTEL value32At(long index, @CType("uint32_t") int value) { VkPerformanceValueDataINTEL.set_value32(this.segment(), index, value); return this; } + /// Sets `value32` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceValueDataINTEL value32(@CType("uint32_t") int value) { VkPerformanceValueDataINTEL.set_value32(this.segment(), value); return this; } + + /// {@return `value64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_value64(MemorySegment segment, long index) { return (long) VH_value64.get(segment, 0L, index); } + /// {@return `value64`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_value64(MemorySegment segment) { return VkPerformanceValueDataINTEL.get_value64(segment, 0L); } + /// {@return `value64` at the given index} + /// @param index the index + public @CType("uint64_t") long value64At(long index) { return VkPerformanceValueDataINTEL.get_value64(this.segment(), index); } + /// {@return `value64`} + public @CType("uint64_t") long value64() { return VkPerformanceValueDataINTEL.get_value64(this.segment()); } + /// Sets `value64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_value64(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_value64.set(segment, 0L, index, value); } + /// Sets `value64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_value64(MemorySegment segment, @CType("uint64_t") long value) { VkPerformanceValueDataINTEL.set_value64(segment, 0L, value); } + /// Sets `value64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceValueDataINTEL value64At(long index, @CType("uint64_t") long value) { VkPerformanceValueDataINTEL.set_value64(this.segment(), index, value); return this; } + /// Sets `value64` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceValueDataINTEL value64(@CType("uint64_t") long value) { VkPerformanceValueDataINTEL.set_value64(this.segment(), value); return this; } + + /// {@return `valueFloat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_valueFloat(MemorySegment segment, long index) { return (float) VH_valueFloat.get(segment, 0L, index); } + /// {@return `valueFloat`} + /// @param segment the segment of the struct + public static @CType("float") float get_valueFloat(MemorySegment segment) { return VkPerformanceValueDataINTEL.get_valueFloat(segment, 0L); } + /// {@return `valueFloat` at the given index} + /// @param index the index + public @CType("float") float valueFloatAt(long index) { return VkPerformanceValueDataINTEL.get_valueFloat(this.segment(), index); } + /// {@return `valueFloat`} + public @CType("float") float valueFloat() { return VkPerformanceValueDataINTEL.get_valueFloat(this.segment()); } + /// Sets `valueFloat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_valueFloat(MemorySegment segment, long index, @CType("float") float value) { VH_valueFloat.set(segment, 0L, index, value); } + /// Sets `valueFloat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_valueFloat(MemorySegment segment, @CType("float") float value) { VkPerformanceValueDataINTEL.set_valueFloat(segment, 0L, value); } + /// Sets `valueFloat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceValueDataINTEL valueFloatAt(long index, @CType("float") float value) { VkPerformanceValueDataINTEL.set_valueFloat(this.segment(), index, value); return this; } + /// Sets `valueFloat` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceValueDataINTEL valueFloat(@CType("float") float value) { VkPerformanceValueDataINTEL.set_valueFloat(this.segment(), value); return this; } + + /// {@return `valueBool` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_valueBool(MemorySegment segment, long index) { return (int) VH_valueBool.get(segment, 0L, index); } + /// {@return `valueBool`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_valueBool(MemorySegment segment) { return VkPerformanceValueDataINTEL.get_valueBool(segment, 0L); } + /// {@return `valueBool` at the given index} + /// @param index the index + public @CType("VkBool32") int valueBoolAt(long index) { return VkPerformanceValueDataINTEL.get_valueBool(this.segment(), index); } + /// {@return `valueBool`} + public @CType("VkBool32") int valueBool() { return VkPerformanceValueDataINTEL.get_valueBool(this.segment()); } + /// Sets `valueBool` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_valueBool(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_valueBool.set(segment, 0L, index, value); } + /// Sets `valueBool` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_valueBool(MemorySegment segment, @CType("VkBool32") int value) { VkPerformanceValueDataINTEL.set_valueBool(segment, 0L, value); } + /// Sets `valueBool` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceValueDataINTEL valueBoolAt(long index, @CType("VkBool32") int value) { VkPerformanceValueDataINTEL.set_valueBool(this.segment(), index, value); return this; } + /// Sets `valueBool` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceValueDataINTEL valueBool(@CType("VkBool32") int value) { VkPerformanceValueDataINTEL.set_valueBool(this.segment(), value); return this; } + + /// {@return `valueString` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_valueString(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_valueString.get(segment, 0L, index); } + /// {@return `valueString`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_valueString(MemorySegment segment) { return VkPerformanceValueDataINTEL.get_valueString(segment, 0L); } + /// {@return `valueString` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment valueStringAt(long index) { return VkPerformanceValueDataINTEL.get_valueString(this.segment(), index); } + /// {@return `valueString`} + public @CType("const char *") java.lang.foreign.MemorySegment valueString() { return VkPerformanceValueDataINTEL.get_valueString(this.segment()); } + /// Sets `valueString` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_valueString(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_valueString.set(segment, 0L, index, value); } + /// Sets `valueString` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_valueString(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkPerformanceValueDataINTEL.set_valueString(segment, 0L, value); } + /// Sets `valueString` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceValueDataINTEL valueStringAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkPerformanceValueDataINTEL.set_valueString(this.segment(), index, value); return this; } + /// Sets `valueString` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceValueDataINTEL valueString(@CType("const char *") java.lang.foreign.MemorySegment value) { VkPerformanceValueDataINTEL.set_valueString(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHR16bitStorage.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHR16bitStorage.java new file mode 100644 index 00000000..3e507b68 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHR16bitStorage.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHR16bitStorage { + public static final int VK_KHR_16BIT_STORAGE_SPEC_VERSION = 1; + public static final String VK_KHR_16BIT_STORAGE_EXTENSION_NAME = "VK_KHR_16bit_storage"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES; + + public VKKHR16bitStorage(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHR8bitStorage.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHR8bitStorage.java new file mode 100644 index 00000000..4baa5290 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHR8bitStorage.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHR8bitStorage { + public static final int VK_KHR_8BIT_STORAGE_SPEC_VERSION = 1; + public static final String VK_KHR_8BIT_STORAGE_EXTENSION_NAME = "VK_KHR_8bit_storage"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES; + + public VKKHR8bitStorage(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRAccelerationStructure.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRAccelerationStructure.java new file mode 100644 index 00000000..d9ec2df2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRAccelerationStructure.java @@ -0,0 +1,234 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRAccelerationStructure { + public static final int VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0; + public static final int VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1; + public static final int VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2; + public static final int VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0; + public static final int VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1; + public static final int VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2; + public static final int VK_GEOMETRY_OPAQUE_BIT_KHR = 0x00000001; + public static final int VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = 0x00000002; + public static final int VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = 0x00000001; + public static final int VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR = 0x00000002; + public static final int VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 0x00000004; + public static final int VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 0x00000008; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = 0x00000001; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = 0x00000002; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = 0x00000004; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 0x00000008; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 0x00000010; + public static final int VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR = 0; + public static final int VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR = 1; + public static final int VK_GEOMETRY_TYPE_TRIANGLES_KHR = 0; + public static final int VK_GEOMETRY_TYPE_AABBS_KHR = 1; + public static final int VK_GEOMETRY_TYPE_INSTANCES_KHR = 2; + public static final int VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR = 0; + public static final int VK_ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR = 1; + public static final int VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 0x00000001; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR = 0; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = 1; + public static final int VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION = 13; + public static final String VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME = "VK_KHR_acceleration_structure"; + public static final int VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR = 1000150007; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR = 1000150000; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR = 1000150002; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR = 1000150003; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR = 1000150004; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR = 1000150005; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR = 1000150006; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR = 1000150009; + public static final int VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR = 1000150010; + public static final int VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR = 1000150011; + public static final int VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR = 1000150012; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR = 1000150013; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR = 1000150014; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR = 1000150017; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR = 1000150020; + public static final int VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000; + public static final int VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR = 1000150000; + public static final int VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000; + public static final int VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000; + public static final int VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR = 1000150000; + public static final int VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR = 1000150001; + public static final int VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR = 1000150000; + public static final int VK_INDEX_TYPE_NONE_KHR = 1000150000; + public static final int VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 0x20000000; + public static final int VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000; + public static final int VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000; + public static final int VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR = 2; + public static final int VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR = 3; + public static final long VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 0x20000000L; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT = 1000150000; + public static final int VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR; + public static final MethodHandle MH_vkCreateAccelerationStructureKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyAccelerationStructureKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBuildAccelerationStructuresKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBuildAccelerationStructuresIndirectKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkBuildAccelerationStructuresKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyAccelerationStructureKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyAccelerationStructureToMemoryKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCopyMemoryToAccelerationStructureKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkWriteAccelerationStructuresPropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkCmdCopyAccelerationStructureKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyAccelerationStructureToMemoryKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyMemoryToAccelerationStructureKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetAccelerationStructureDeviceAddressKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdWriteAccelerationStructuresPropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkGetDeviceAccelerationStructureCompatibilityKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetAccelerationStructureBuildSizesKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateAccelerationStructureKHR; + public final MemorySegment PFN_vkDestroyAccelerationStructureKHR; + public final MemorySegment PFN_vkCmdBuildAccelerationStructuresKHR; + public final MemorySegment PFN_vkCmdBuildAccelerationStructuresIndirectKHR; + public final MemorySegment PFN_vkBuildAccelerationStructuresKHR; + public final MemorySegment PFN_vkCopyAccelerationStructureKHR; + public final MemorySegment PFN_vkCopyAccelerationStructureToMemoryKHR; + public final MemorySegment PFN_vkCopyMemoryToAccelerationStructureKHR; + public final MemorySegment PFN_vkWriteAccelerationStructuresPropertiesKHR; + public final MemorySegment PFN_vkCmdCopyAccelerationStructureKHR; + public final MemorySegment PFN_vkCmdCopyAccelerationStructureToMemoryKHR; + public final MemorySegment PFN_vkCmdCopyMemoryToAccelerationStructureKHR; + public final MemorySegment PFN_vkGetAccelerationStructureDeviceAddressKHR; + public final MemorySegment PFN_vkCmdWriteAccelerationStructuresPropertiesKHR; + public final MemorySegment PFN_vkGetDeviceAccelerationStructureCompatibilityKHR; + public final MemorySegment PFN_vkGetAccelerationStructureBuildSizesKHR; + + public VKKHRAccelerationStructure(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateAccelerationStructureKHR = func.invoke(device, "vkCreateAccelerationStructureKHR"); + PFN_vkDestroyAccelerationStructureKHR = func.invoke(device, "vkDestroyAccelerationStructureKHR"); + PFN_vkCmdBuildAccelerationStructuresKHR = func.invoke(device, "vkCmdBuildAccelerationStructuresKHR"); + PFN_vkCmdBuildAccelerationStructuresIndirectKHR = func.invoke(device, "vkCmdBuildAccelerationStructuresIndirectKHR"); + PFN_vkBuildAccelerationStructuresKHR = func.invoke(device, "vkBuildAccelerationStructuresKHR"); + PFN_vkCopyAccelerationStructureKHR = func.invoke(device, "vkCopyAccelerationStructureKHR"); + PFN_vkCopyAccelerationStructureToMemoryKHR = func.invoke(device, "vkCopyAccelerationStructureToMemoryKHR"); + PFN_vkCopyMemoryToAccelerationStructureKHR = func.invoke(device, "vkCopyMemoryToAccelerationStructureKHR"); + PFN_vkWriteAccelerationStructuresPropertiesKHR = func.invoke(device, "vkWriteAccelerationStructuresPropertiesKHR"); + PFN_vkCmdCopyAccelerationStructureKHR = func.invoke(device, "vkCmdCopyAccelerationStructureKHR"); + PFN_vkCmdCopyAccelerationStructureToMemoryKHR = func.invoke(device, "vkCmdCopyAccelerationStructureToMemoryKHR"); + PFN_vkCmdCopyMemoryToAccelerationStructureKHR = func.invoke(device, "vkCmdCopyMemoryToAccelerationStructureKHR"); + PFN_vkGetAccelerationStructureDeviceAddressKHR = func.invoke(device, "vkGetAccelerationStructureDeviceAddressKHR"); + PFN_vkCmdWriteAccelerationStructuresPropertiesKHR = func.invoke(device, "vkCmdWriteAccelerationStructuresPropertiesKHR"); + PFN_vkGetDeviceAccelerationStructureCompatibilityKHR = func.invoke(device, "vkGetDeviceAccelerationStructureCompatibilityKHR"); + PFN_vkGetAccelerationStructureBuildSizesKHR = func.invoke(device, "vkGetAccelerationStructureBuildSizesKHR"); + } + + public @CType("VkResult") int CreateAccelerationStructureKHR(@CType("VkDevice") MemorySegment device, @CType("const VkAccelerationStructureCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkAccelerationStructureKHR *") MemorySegment pAccelerationStructure) { + if (Unmarshal.isNullPointer(PFN_vkCreateAccelerationStructureKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateAccelerationStructureKHR"); + try { return (int) MH_vkCreateAccelerationStructureKHR.invokeExact(PFN_vkCreateAccelerationStructureKHR, device, pCreateInfo, pAllocator, pAccelerationStructure); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateAccelerationStructureKHR", e); } + } + + public void DestroyAccelerationStructureKHR(@CType("VkDevice") MemorySegment device, @CType("VkAccelerationStructureKHR") MemorySegment accelerationStructure, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyAccelerationStructureKHR)) throw new SymbolNotFoundError("Symbol not found: vkDestroyAccelerationStructureKHR"); + try { MH_vkDestroyAccelerationStructureKHR.invokeExact(PFN_vkDestroyAccelerationStructureKHR, device, accelerationStructure, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyAccelerationStructureKHR", e); } + } + + public void CmdBuildAccelerationStructuresKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int infoCount, @CType("const VkAccelerationStructureBuildGeometryInfoKHR *") MemorySegment pInfos, @CType("const VkAccelerationStructureBuildRangeInfoKHR * const*") MemorySegment ppBuildRangeInfos) { + if (Unmarshal.isNullPointer(PFN_vkCmdBuildAccelerationStructuresKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdBuildAccelerationStructuresKHR"); + try { MH_vkCmdBuildAccelerationStructuresKHR.invokeExact(PFN_vkCmdBuildAccelerationStructuresKHR, commandBuffer, infoCount, pInfos, ppBuildRangeInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBuildAccelerationStructuresKHR", e); } + } + + public void CmdBuildAccelerationStructuresIndirectKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int infoCount, @CType("const VkAccelerationStructureBuildGeometryInfoKHR *") MemorySegment pInfos, @CType("const VkDeviceAddress *") MemorySegment pIndirectDeviceAddresses, @CType("const uint32_t *") MemorySegment pIndirectStrides, @CType("const uint32_t * const*") MemorySegment ppMaxPrimitiveCounts) { + if (Unmarshal.isNullPointer(PFN_vkCmdBuildAccelerationStructuresIndirectKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdBuildAccelerationStructuresIndirectKHR"); + try { MH_vkCmdBuildAccelerationStructuresIndirectKHR.invokeExact(PFN_vkCmdBuildAccelerationStructuresIndirectKHR, commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, pIndirectStrides, ppMaxPrimitiveCounts); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBuildAccelerationStructuresIndirectKHR", e); } + } + + public @CType("VkResult") int BuildAccelerationStructuresKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment deferredOperation, @CType("uint32_t") int infoCount, @CType("const VkAccelerationStructureBuildGeometryInfoKHR *") MemorySegment pInfos, @CType("const VkAccelerationStructureBuildRangeInfoKHR * const*") MemorySegment ppBuildRangeInfos) { + if (Unmarshal.isNullPointer(PFN_vkBuildAccelerationStructuresKHR)) throw new SymbolNotFoundError("Symbol not found: vkBuildAccelerationStructuresKHR"); + try { return (int) MH_vkBuildAccelerationStructuresKHR.invokeExact(PFN_vkBuildAccelerationStructuresKHR, device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkBuildAccelerationStructuresKHR", e); } + } + + public @CType("VkResult") int CopyAccelerationStructureKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment deferredOperation, @CType("const VkCopyAccelerationStructureInfoKHR *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyAccelerationStructureKHR)) throw new SymbolNotFoundError("Symbol not found: vkCopyAccelerationStructureKHR"); + try { return (int) MH_vkCopyAccelerationStructureKHR.invokeExact(PFN_vkCopyAccelerationStructureKHR, device, deferredOperation, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyAccelerationStructureKHR", e); } + } + + public @CType("VkResult") int CopyAccelerationStructureToMemoryKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment deferredOperation, @CType("const VkCopyAccelerationStructureToMemoryInfoKHR *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyAccelerationStructureToMemoryKHR)) throw new SymbolNotFoundError("Symbol not found: vkCopyAccelerationStructureToMemoryKHR"); + try { return (int) MH_vkCopyAccelerationStructureToMemoryKHR.invokeExact(PFN_vkCopyAccelerationStructureToMemoryKHR, device, deferredOperation, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyAccelerationStructureToMemoryKHR", e); } + } + + public @CType("VkResult") int CopyMemoryToAccelerationStructureKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment deferredOperation, @CType("const VkCopyMemoryToAccelerationStructureInfoKHR *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCopyMemoryToAccelerationStructureKHR)) throw new SymbolNotFoundError("Symbol not found: vkCopyMemoryToAccelerationStructureKHR"); + try { return (int) MH_vkCopyMemoryToAccelerationStructureKHR.invokeExact(PFN_vkCopyMemoryToAccelerationStructureKHR, device, deferredOperation, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCopyMemoryToAccelerationStructureKHR", e); } + } + + public @CType("VkResult") int WriteAccelerationStructuresPropertiesKHR(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int accelerationStructureCount, @CType("const VkAccelerationStructureKHR *") MemorySegment pAccelerationStructures, @CType("VkQueryType") int queryType, @CType("size_t") long dataSize, @CType("void *") MemorySegment pData, @CType("size_t") long stride) { + if (Unmarshal.isNullPointer(PFN_vkWriteAccelerationStructuresPropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkWriteAccelerationStructuresPropertiesKHR"); + try { return (int) MH_vkWriteAccelerationStructuresPropertiesKHR.invokeExact(PFN_vkWriteAccelerationStructuresPropertiesKHR, device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkWriteAccelerationStructuresPropertiesKHR", e); } + } + + public void CmdCopyAccelerationStructureKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyAccelerationStructureInfoKHR *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyAccelerationStructureKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyAccelerationStructureKHR"); + try { MH_vkCmdCopyAccelerationStructureKHR.invokeExact(PFN_vkCmdCopyAccelerationStructureKHR, commandBuffer, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyAccelerationStructureKHR", e); } + } + + public void CmdCopyAccelerationStructureToMemoryKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyAccelerationStructureToMemoryInfoKHR *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyAccelerationStructureToMemoryKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyAccelerationStructureToMemoryKHR"); + try { MH_vkCmdCopyAccelerationStructureToMemoryKHR.invokeExact(PFN_vkCmdCopyAccelerationStructureToMemoryKHR, commandBuffer, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyAccelerationStructureToMemoryKHR", e); } + } + + public void CmdCopyMemoryToAccelerationStructureKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyMemoryToAccelerationStructureInfoKHR *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyMemoryToAccelerationStructureKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyMemoryToAccelerationStructureKHR"); + try { MH_vkCmdCopyMemoryToAccelerationStructureKHR.invokeExact(PFN_vkCmdCopyMemoryToAccelerationStructureKHR, commandBuffer, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyMemoryToAccelerationStructureKHR", e); } + } + + public @CType("VkDeviceAddress") long GetAccelerationStructureDeviceAddressKHR(@CType("VkDevice") MemorySegment device, @CType("const VkAccelerationStructureDeviceAddressInfoKHR *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetAccelerationStructureDeviceAddressKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetAccelerationStructureDeviceAddressKHR"); + try { return (long) MH_vkGetAccelerationStructureDeviceAddressKHR.invokeExact(PFN_vkGetAccelerationStructureDeviceAddressKHR, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetAccelerationStructureDeviceAddressKHR", e); } + } + + public void CmdWriteAccelerationStructuresPropertiesKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int accelerationStructureCount, @CType("const VkAccelerationStructureKHR *") MemorySegment pAccelerationStructures, @CType("VkQueryType") int queryType, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int firstQuery) { + if (Unmarshal.isNullPointer(PFN_vkCmdWriteAccelerationStructuresPropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdWriteAccelerationStructuresPropertiesKHR"); + try { MH_vkCmdWriteAccelerationStructuresPropertiesKHR.invokeExact(PFN_vkCmdWriteAccelerationStructuresPropertiesKHR, commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWriteAccelerationStructuresPropertiesKHR", e); } + } + + public void GetDeviceAccelerationStructureCompatibilityKHR(@CType("VkDevice") MemorySegment device, @CType("const VkAccelerationStructureVersionInfoKHR *") MemorySegment pVersionInfo, @CType("VkAccelerationStructureCompatibilityKHR *") MemorySegment pCompatibility) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceAccelerationStructureCompatibilityKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceAccelerationStructureCompatibilityKHR"); + try { MH_vkGetDeviceAccelerationStructureCompatibilityKHR.invokeExact(PFN_vkGetDeviceAccelerationStructureCompatibilityKHR, device, pVersionInfo, pCompatibility); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceAccelerationStructureCompatibilityKHR", e); } + } + + public void GetAccelerationStructureBuildSizesKHR(@CType("VkDevice") MemorySegment device, @CType("VkAccelerationStructureBuildTypeKHR") int buildType, @CType("const VkAccelerationStructureBuildGeometryInfoKHR *") MemorySegment pBuildInfo, @CType("const uint32_t *") MemorySegment pMaxPrimitiveCounts, @CType("VkAccelerationStructureBuildSizesInfoKHR *") MemorySegment pSizeInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetAccelerationStructureBuildSizesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetAccelerationStructureBuildSizesKHR"); + try { MH_vkGetAccelerationStructureBuildSizesKHR.invokeExact(PFN_vkGetAccelerationStructureBuildSizesKHR, device, buildType, pBuildInfo, pMaxPrimitiveCounts, pSizeInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetAccelerationStructureBuildSizesKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRAndroidSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRAndroidSurface.java new file mode 100644 index 00000000..76d3cdfb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRAndroidSurface.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRAndroidSurface { + public static final int VK_KHR_ANDROID_SURFACE_SPEC_VERSION = 6; + public static final String VK_KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface"; + public static final int VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000; + public static final MethodHandle MH_vkCreateAndroidSurfaceKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateAndroidSurfaceKHR; + + public VKKHRAndroidSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateAndroidSurfaceKHR = func.invoke(instance, "vkCreateAndroidSurfaceKHR"); + } + + public @CType("VkResult") int CreateAndroidSurfaceKHR(@CType("VkInstance") MemorySegment instance, @CType("const VkAndroidSurfaceCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateAndroidSurfaceKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateAndroidSurfaceKHR"); + try { return (int) MH_vkCreateAndroidSurfaceKHR.invokeExact(PFN_vkCreateAndroidSurfaceKHR, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateAndroidSurfaceKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRBindMemory2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRBindMemory2.java new file mode 100644 index 00000000..92982651 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRBindMemory2.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRBindMemory2 { + public static final int VK_KHR_BIND_MEMORY_2_SPEC_VERSION = 1; + public static final String VK_KHR_BIND_MEMORY_2_EXTENSION_NAME = "VK_KHR_bind_memory2"; + public static final int VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO; + public static final int VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO; + public static final int VK_IMAGE_CREATE_ALIAS_BIT_KHR = VK_IMAGE_CREATE_ALIAS_BIT; + public static final MethodHandle MH_vkBindBufferMemory2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkBindImageMemory2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkBindBufferMemory2KHR; + public final MemorySegment PFN_vkBindImageMemory2KHR; + + public VKKHRBindMemory2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkBindBufferMemory2KHR = func.invoke(device, "vkBindBufferMemory2KHR", "vkBindBufferMemory2"); + PFN_vkBindImageMemory2KHR = func.invoke(device, "vkBindImageMemory2KHR", "vkBindImageMemory2"); + } + + public @CType("VkResult") int BindBufferMemory2KHR(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int bindInfoCount, @CType("const VkBindBufferMemoryInfo *") MemorySegment pBindInfos) { + if (Unmarshal.isNullPointer(PFN_vkBindBufferMemory2KHR)) throw new SymbolNotFoundError("Symbol not found: vkBindBufferMemory2KHR"); + try { return (int) MH_vkBindBufferMemory2KHR.invokeExact(PFN_vkBindBufferMemory2KHR, device, bindInfoCount, pBindInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkBindBufferMemory2KHR", e); } + } + + public @CType("VkResult") int BindImageMemory2KHR(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int bindInfoCount, @CType("const VkBindImageMemoryInfo *") MemorySegment pBindInfos) { + if (Unmarshal.isNullPointer(PFN_vkBindImageMemory2KHR)) throw new SymbolNotFoundError("Symbol not found: vkBindImageMemory2KHR"); + try { return (int) MH_vkBindImageMemory2KHR.invokeExact(PFN_vkBindImageMemory2KHR, device, bindInfoCount, pBindInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkBindImageMemory2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRBufferDeviceAddress.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRBufferDeviceAddress.java new file mode 100644 index 00000000..95298a23 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRBufferDeviceAddress.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRBufferDeviceAddress { + public static final int VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION = 1; + public static final String VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_KHR_buffer_device_address"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES; + public static final int VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO; + public static final int VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO; + public static final int VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO; + public static final int VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT; + public static final int VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT; + public static final int VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT; + public static final int VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT; + public static final int VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS; + public static final MethodHandle MH_vkGetBufferDeviceAddressKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetBufferOpaqueCaptureAddressKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceMemoryOpaqueCaptureAddressKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetBufferDeviceAddressKHR; + public final MemorySegment PFN_vkGetBufferOpaqueCaptureAddressKHR; + public final MemorySegment PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR; + + public VKKHRBufferDeviceAddress(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetBufferDeviceAddressKHR = func.invoke(device, "vkGetBufferDeviceAddressKHR", "vkGetBufferDeviceAddress"); + PFN_vkGetBufferOpaqueCaptureAddressKHR = func.invoke(device, "vkGetBufferOpaqueCaptureAddressKHR", "vkGetBufferOpaqueCaptureAddress"); + PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR = func.invoke(device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR", "vkGetDeviceMemoryOpaqueCaptureAddress"); + } + + public @CType("VkDeviceAddress") long GetBufferDeviceAddressKHR(@CType("VkDevice") MemorySegment device, @CType("const VkBufferDeviceAddressInfo *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetBufferDeviceAddressKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetBufferDeviceAddressKHR"); + try { return (long) MH_vkGetBufferDeviceAddressKHR.invokeExact(PFN_vkGetBufferDeviceAddressKHR, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetBufferDeviceAddressKHR", e); } + } + + public @CType("uint64_t") long GetBufferOpaqueCaptureAddressKHR(@CType("VkDevice") MemorySegment device, @CType("const VkBufferDeviceAddressInfo *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetBufferOpaqueCaptureAddressKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetBufferOpaqueCaptureAddressKHR"); + try { return (long) MH_vkGetBufferOpaqueCaptureAddressKHR.invokeExact(PFN_vkGetBufferOpaqueCaptureAddressKHR, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetBufferOpaqueCaptureAddressKHR", e); } + } + + public @CType("uint64_t") long GetDeviceMemoryOpaqueCaptureAddressKHR(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceMemoryOpaqueCaptureAddressInfo *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceMemoryOpaqueCaptureAddressKHR"); + try { return (long) MH_vkGetDeviceMemoryOpaqueCaptureAddressKHR.invokeExact(PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceMemoryOpaqueCaptureAddressKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCalibratedTimestamps.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCalibratedTimestamps.java new file mode 100644 index 00000000..b2a8fe3b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCalibratedTimestamps.java @@ -0,0 +1,55 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRCalibratedTimestamps { + public static final int VK_TIME_DOMAIN_DEVICE_KHR = 0; + public static final int VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR = 1; + public static final int VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR = 2; + public static final int VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR = 3; + public static final int VK_KHR_CALIBRATED_TIMESTAMPS_SPEC_VERSION = 1; + public static final String VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME = "VK_KHR_calibrated_timestamps"; + public static final int VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR = 1000543000; + public static final MethodHandle MH_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetCalibratedTimestampsKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR; + public final MemorySegment PFN_vkGetCalibratedTimestampsKHR; + + public VKKHRCalibratedTimestamps(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR = func.invoke(device, "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR", "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT"); + PFN_vkGetCalibratedTimestampsKHR = func.invoke(device, "vkGetCalibratedTimestampsKHR", "vkGetCalibratedTimestampsEXT"); + } + + public @CType("VkResult") int GetPhysicalDeviceCalibrateableTimeDomainsKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pTimeDomainCount, @CType("VkTimeDomainKHR *") MemorySegment pTimeDomains) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceCalibrateableTimeDomainsKHR"); + try { return (int) MH_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR.invokeExact(PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR, physicalDevice, pTimeDomainCount, pTimeDomains); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceCalibrateableTimeDomainsKHR", e); } + } + + public @CType("VkResult") int GetCalibratedTimestampsKHR(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int timestampCount, @CType("const VkCalibratedTimestampInfoKHR *") MemorySegment pTimestampInfos, @CType("uint64_t *") MemorySegment pTimestamps, @CType("uint64_t *") MemorySegment pMaxDeviation) { + if (Unmarshal.isNullPointer(PFN_vkGetCalibratedTimestampsKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetCalibratedTimestampsKHR"); + try { return (int) MH_vkGetCalibratedTimestampsKHR.invokeExact(PFN_vkGetCalibratedTimestampsKHR, device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); } + catch (Throwable e) { throw new RuntimeException("error in vkGetCalibratedTimestampsKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRComputeShaderDerivatives.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRComputeShaderDerivatives.java new file mode 100644 index 00000000..b8c92a4d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRComputeShaderDerivatives.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRComputeShaderDerivatives { + public static final int VK_KHR_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION = 1; + public static final String VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME = "VK_KHR_compute_shader_derivatives"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR = 1000511000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR = 1000511000; + + public VKKHRComputeShaderDerivatives(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCooperativeMatrix.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCooperativeMatrix.java new file mode 100644 index 00000000..8e227170 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCooperativeMatrix.java @@ -0,0 +1,59 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRCooperativeMatrix { + public static final int VK_SCOPE_DEVICE_KHR = 1; + public static final int VK_SCOPE_WORKGROUP_KHR = 2; + public static final int VK_SCOPE_SUBGROUP_KHR = 3; + public static final int VK_SCOPE_QUEUE_FAMILY_KHR = 5; + public static final int VK_COMPONENT_TYPE_FLOAT16_KHR = 0; + public static final int VK_COMPONENT_TYPE_FLOAT32_KHR = 1; + public static final int VK_COMPONENT_TYPE_FLOAT64_KHR = 2; + public static final int VK_COMPONENT_TYPE_SINT8_KHR = 3; + public static final int VK_COMPONENT_TYPE_SINT16_KHR = 4; + public static final int VK_COMPONENT_TYPE_SINT32_KHR = 5; + public static final int VK_COMPONENT_TYPE_SINT64_KHR = 6; + public static final int VK_COMPONENT_TYPE_UINT8_KHR = 7; + public static final int VK_COMPONENT_TYPE_UINT16_KHR = 8; + public static final int VK_COMPONENT_TYPE_UINT32_KHR = 9; + public static final int VK_COMPONENT_TYPE_UINT64_KHR = 10; + public static final int VK_KHR_COOPERATIVE_MATRIX_SPEC_VERSION = 2; + public static final String VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME = "VK_KHR_cooperative_matrix"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR = 1000506000; + public static final int VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506002; + public static final MethodHandle MH_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR; + + public VKKHRCooperativeMatrix(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR = func.invoke(device, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR"); + } + + public @CType("VkResult") int GetPhysicalDeviceCooperativeMatrixPropertiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkCooperativeMatrixPropertiesKHR *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR"); + try { return (int) MH_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR.invokeExact(PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR, physicalDevice, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCopyCommands2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCopyCommands2.java new file mode 100644 index 00000000..934ccda4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCopyCommands2.java @@ -0,0 +1,98 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKKHRCopyCommands2 { + public static final int VK_KHR_COPY_COMMANDS_2_SPEC_VERSION = 1; + public static final String VK_KHR_COPY_COMMANDS_2_EXTENSION_NAME = "VK_KHR_copy_commands2"; + public static final int VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2; + public static final int VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2; + public static final int VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2; + public static final int VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2; + public static final int VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2; + public static final int VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2; + public static final int VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR = VK_STRUCTURE_TYPE_BUFFER_COPY_2; + public static final int VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR = VK_STRUCTURE_TYPE_IMAGE_COPY_2; + public static final int VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR = VK_STRUCTURE_TYPE_IMAGE_BLIT_2; + public static final int VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR = VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2; + public static final int VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2; + public static final MethodHandle MH_vkCmdCopyBuffer2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyImage2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyBufferToImage2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCopyImageToBuffer2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBlitImage2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdResolveImage2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdCopyBuffer2KHR; + public final MemorySegment PFN_vkCmdCopyImage2KHR; + public final MemorySegment PFN_vkCmdCopyBufferToImage2KHR; + public final MemorySegment PFN_vkCmdCopyImageToBuffer2KHR; + public final MemorySegment PFN_vkCmdBlitImage2KHR; + public final MemorySegment PFN_vkCmdResolveImage2KHR; + + public VKKHRCopyCommands2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdCopyBuffer2KHR = func.invoke(device, "vkCmdCopyBuffer2KHR", "vkCmdCopyBuffer2"); + PFN_vkCmdCopyImage2KHR = func.invoke(device, "vkCmdCopyImage2KHR", "vkCmdCopyImage2"); + PFN_vkCmdCopyBufferToImage2KHR = func.invoke(device, "vkCmdCopyBufferToImage2KHR", "vkCmdCopyBufferToImage2"); + PFN_vkCmdCopyImageToBuffer2KHR = func.invoke(device, "vkCmdCopyImageToBuffer2KHR", "vkCmdCopyImageToBuffer2"); + PFN_vkCmdBlitImage2KHR = func.invoke(device, "vkCmdBlitImage2KHR", "vkCmdBlitImage2"); + PFN_vkCmdResolveImage2KHR = func.invoke(device, "vkCmdResolveImage2KHR", "vkCmdResolveImage2"); + } + + public void CmdCopyBuffer2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyBufferInfo2 *") MemorySegment pCopyBufferInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyBuffer2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyBuffer2KHR"); + try { MH_vkCmdCopyBuffer2KHR.invokeExact(PFN_vkCmdCopyBuffer2KHR, commandBuffer, pCopyBufferInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyBuffer2KHR", e); } + } + + public void CmdCopyImage2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyImageInfo2 *") MemorySegment pCopyImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyImage2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyImage2KHR"); + try { MH_vkCmdCopyImage2KHR.invokeExact(PFN_vkCmdCopyImage2KHR, commandBuffer, pCopyImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyImage2KHR", e); } + } + + public void CmdCopyBufferToImage2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyBufferToImageInfo2 *") MemorySegment pCopyBufferToImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyBufferToImage2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyBufferToImage2KHR"); + try { MH_vkCmdCopyBufferToImage2KHR.invokeExact(PFN_vkCmdCopyBufferToImage2KHR, commandBuffer, pCopyBufferToImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyBufferToImage2KHR", e); } + } + + public void CmdCopyImageToBuffer2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCopyImageToBufferInfo2 *") MemorySegment pCopyImageToBufferInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyImageToBuffer2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyImageToBuffer2KHR"); + try { MH_vkCmdCopyImageToBuffer2KHR.invokeExact(PFN_vkCmdCopyImageToBuffer2KHR, commandBuffer, pCopyImageToBufferInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyImageToBuffer2KHR", e); } + } + + public void CmdBlitImage2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkBlitImageInfo2 *") MemorySegment pBlitImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBlitImage2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdBlitImage2KHR"); + try { MH_vkCmdBlitImage2KHR.invokeExact(PFN_vkCmdBlitImage2KHR, commandBuffer, pBlitImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBlitImage2KHR", e); } + } + + public void CmdResolveImage2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkResolveImageInfo2 *") MemorySegment pResolveImageInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdResolveImage2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdResolveImage2KHR"); + try { MH_vkCmdResolveImage2KHR.invokeExact(PFN_vkCmdResolveImage2KHR, commandBuffer, pResolveImageInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdResolveImage2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCreateRenderpass2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCreateRenderpass2.java new file mode 100644 index 00000000..282d5b38 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRCreateRenderpass2.java @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRCreateRenderpass2 { + public static final int VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION = 1; + public static final String VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME = "VK_KHR_create_renderpass2"; + public static final int VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2; + public static final int VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2; + public static final int VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2; + public static final int VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2; + public static final int VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO; + public static final int VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR = VK_STRUCTURE_TYPE_SUBPASS_END_INFO; + public static final MethodHandle MH_vkCreateRenderPass2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBeginRenderPass2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdNextSubpass2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdEndRenderPass2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateRenderPass2KHR; + public final MemorySegment PFN_vkCmdBeginRenderPass2KHR; + public final MemorySegment PFN_vkCmdNextSubpass2KHR; + public final MemorySegment PFN_vkCmdEndRenderPass2KHR; + + public VKKHRCreateRenderpass2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateRenderPass2KHR = func.invoke(device, "vkCreateRenderPass2KHR", "vkCreateRenderPass2"); + PFN_vkCmdBeginRenderPass2KHR = func.invoke(device, "vkCmdBeginRenderPass2KHR", "vkCmdBeginRenderPass2"); + PFN_vkCmdNextSubpass2KHR = func.invoke(device, "vkCmdNextSubpass2KHR", "vkCmdNextSubpass2"); + PFN_vkCmdEndRenderPass2KHR = func.invoke(device, "vkCmdEndRenderPass2KHR", "vkCmdEndRenderPass2"); + } + + public @CType("VkResult") int CreateRenderPass2KHR(@CType("VkDevice") MemorySegment device, @CType("const VkRenderPassCreateInfo2 *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkRenderPass *") MemorySegment pRenderPass) { + if (Unmarshal.isNullPointer(PFN_vkCreateRenderPass2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateRenderPass2KHR"); + try { return (int) MH_vkCreateRenderPass2KHR.invokeExact(PFN_vkCreateRenderPass2KHR, device, pCreateInfo, pAllocator, pRenderPass); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateRenderPass2KHR", e); } + } + + public void CmdBeginRenderPass2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkRenderPassBeginInfo *") MemorySegment pRenderPassBegin, @CType("const VkSubpassBeginInfo *") MemorySegment pSubpassBeginInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginRenderPass2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginRenderPass2KHR"); + try { MH_vkCmdBeginRenderPass2KHR.invokeExact(PFN_vkCmdBeginRenderPass2KHR, commandBuffer, pRenderPassBegin, pSubpassBeginInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginRenderPass2KHR", e); } + } + + public void CmdNextSubpass2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkSubpassBeginInfo *") MemorySegment pSubpassBeginInfo, @CType("const VkSubpassEndInfo *") MemorySegment pSubpassEndInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdNextSubpass2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdNextSubpass2KHR"); + try { MH_vkCmdNextSubpass2KHR.invokeExact(PFN_vkCmdNextSubpass2KHR, commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdNextSubpass2KHR", e); } + } + + public void CmdEndRenderPass2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkSubpassEndInfo *") MemorySegment pSubpassEndInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndRenderPass2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndRenderPass2KHR"); + try { MH_vkCmdEndRenderPass2KHR.invokeExact(PFN_vkCmdEndRenderPass2KHR, commandBuffer, pSubpassEndInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndRenderPass2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDedicatedAllocation.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDedicatedAllocation.java new file mode 100644 index 00000000..c1a2c971 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDedicatedAllocation.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRDedicatedAllocation { + public static final int VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION = 3; + public static final String VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME = "VK_KHR_dedicated_allocation"; + public static final int VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS; + public static final int VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO; + + public VKKHRDedicatedAllocation(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDeferredHostOperations.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDeferredHostOperations.java new file mode 100644 index 00000000..fa4d4963 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDeferredHostOperations.java @@ -0,0 +1,82 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRDeferredHostOperations { + public static final int VK_KHR_DEFERRED_HOST_OPERATIONS_SPEC_VERSION = 4; + public static final String VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME = "VK_KHR_deferred_host_operations"; + public static final int VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR = 1000268000; + public static final int VK_THREAD_IDLE_KHR = 1000268000; + public static final int VK_THREAD_DONE_KHR = 1000268001; + public static final int VK_OPERATION_DEFERRED_KHR = 1000268002; + public static final int VK_OPERATION_NOT_DEFERRED_KHR = 1000268003; + public static final MethodHandle MH_vkCreateDeferredOperationKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyDeferredOperationKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeferredOperationMaxConcurrencyKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeferredOperationResultKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDeferredOperationJoinKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateDeferredOperationKHR; + public final MemorySegment PFN_vkDestroyDeferredOperationKHR; + public final MemorySegment PFN_vkGetDeferredOperationMaxConcurrencyKHR; + public final MemorySegment PFN_vkGetDeferredOperationResultKHR; + public final MemorySegment PFN_vkDeferredOperationJoinKHR; + + public VKKHRDeferredHostOperations(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateDeferredOperationKHR = func.invoke(device, "vkCreateDeferredOperationKHR"); + PFN_vkDestroyDeferredOperationKHR = func.invoke(device, "vkDestroyDeferredOperationKHR"); + PFN_vkGetDeferredOperationMaxConcurrencyKHR = func.invoke(device, "vkGetDeferredOperationMaxConcurrencyKHR"); + PFN_vkGetDeferredOperationResultKHR = func.invoke(device, "vkGetDeferredOperationResultKHR"); + PFN_vkDeferredOperationJoinKHR = func.invoke(device, "vkDeferredOperationJoinKHR"); + } + + public @CType("VkResult") int CreateDeferredOperationKHR(@CType("VkDevice") MemorySegment device, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkDeferredOperationKHR *") MemorySegment pDeferredOperation) { + if (Unmarshal.isNullPointer(PFN_vkCreateDeferredOperationKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateDeferredOperationKHR"); + try { return (int) MH_vkCreateDeferredOperationKHR.invokeExact(PFN_vkCreateDeferredOperationKHR, device, pAllocator, pDeferredOperation); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDeferredOperationKHR", e); } + } + + public void DestroyDeferredOperationKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment operation, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyDeferredOperationKHR)) throw new SymbolNotFoundError("Symbol not found: vkDestroyDeferredOperationKHR"); + try { MH_vkDestroyDeferredOperationKHR.invokeExact(PFN_vkDestroyDeferredOperationKHR, device, operation, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyDeferredOperationKHR", e); } + } + + public @CType("uint32_t") int GetDeferredOperationMaxConcurrencyKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment operation) { + if (Unmarshal.isNullPointer(PFN_vkGetDeferredOperationMaxConcurrencyKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeferredOperationMaxConcurrencyKHR"); + try { return (int) MH_vkGetDeferredOperationMaxConcurrencyKHR.invokeExact(PFN_vkGetDeferredOperationMaxConcurrencyKHR, device, operation); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeferredOperationMaxConcurrencyKHR", e); } + } + + public @CType("VkResult") int GetDeferredOperationResultKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment operation) { + if (Unmarshal.isNullPointer(PFN_vkGetDeferredOperationResultKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeferredOperationResultKHR"); + try { return (int) MH_vkGetDeferredOperationResultKHR.invokeExact(PFN_vkGetDeferredOperationResultKHR, device, operation); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeferredOperationResultKHR", e); } + } + + public @CType("VkResult") int DeferredOperationJoinKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment operation) { + if (Unmarshal.isNullPointer(PFN_vkDeferredOperationJoinKHR)) throw new SymbolNotFoundError("Symbol not found: vkDeferredOperationJoinKHR"); + try { return (int) MH_vkDeferredOperationJoinKHR.invokeExact(PFN_vkDeferredOperationJoinKHR, device, operation); } + catch (Throwable e) { throw new RuntimeException("error in vkDeferredOperationJoinKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDepthStencilResolve.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDepthStencilResolve.java new file mode 100644 index 00000000..080c57f2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDepthStencilResolve.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRDepthStencilResolve { + public static final int VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION = 1; + public static final String VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME = "VK_KHR_depth_stencil_resolve"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE; + public static final int VK_RESOLVE_MODE_NONE_KHR = VK_RESOLVE_MODE_NONE; + public static final int VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT; + public static final int VK_RESOLVE_MODE_AVERAGE_BIT_KHR = VK_RESOLVE_MODE_AVERAGE_BIT; + public static final int VK_RESOLVE_MODE_MIN_BIT_KHR = VK_RESOLVE_MODE_MIN_BIT; + public static final int VK_RESOLVE_MODE_MAX_BIT_KHR = VK_RESOLVE_MODE_MAX_BIT; + + public VKKHRDepthStencilResolve(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDescriptorUpdateTemplate.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDescriptorUpdateTemplate.java new file mode 100644 index 00000000..8f862e2e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDescriptorUpdateTemplate.java @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +import static overrungl.vulkan.VK14.*; +import static overrungl.vulkan.ext.VKEXTDebugReport.*; +public class VKKHRDescriptorUpdateTemplate { + public static final int VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION = 1; + public static final String VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME = "VK_KHR_descriptor_update_template"; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO; + public static final int VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE; + public static final int VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET; + public static final int VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT; + public static final MethodHandle MH_vkCreateDescriptorUpdateTemplateKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyDescriptorUpdateTemplateKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkUpdateDescriptorSetWithTemplateKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPushDescriptorSetWithTemplateKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateDescriptorUpdateTemplateKHR; + public final MemorySegment PFN_vkDestroyDescriptorUpdateTemplateKHR; + public final MemorySegment PFN_vkUpdateDescriptorSetWithTemplateKHR; + public final MemorySegment PFN_vkCmdPushDescriptorSetWithTemplateKHR; + + public VKKHRDescriptorUpdateTemplate(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateDescriptorUpdateTemplateKHR = func.invoke(device, "vkCreateDescriptorUpdateTemplateKHR", "vkCreateDescriptorUpdateTemplate"); + PFN_vkDestroyDescriptorUpdateTemplateKHR = func.invoke(device, "vkDestroyDescriptorUpdateTemplateKHR", "vkDestroyDescriptorUpdateTemplate"); + PFN_vkUpdateDescriptorSetWithTemplateKHR = func.invoke(device, "vkUpdateDescriptorSetWithTemplateKHR", "vkUpdateDescriptorSetWithTemplate"); + PFN_vkCmdPushDescriptorSetWithTemplateKHR = func.invoke(device, "vkCmdPushDescriptorSetWithTemplateKHR", "vkCmdPushDescriptorSetWithTemplate"); + } + + public @CType("VkResult") int CreateDescriptorUpdateTemplateKHR(@CType("VkDevice") MemorySegment device, @CType("const VkDescriptorUpdateTemplateCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkDescriptorUpdateTemplate *") MemorySegment pDescriptorUpdateTemplate) { + if (Unmarshal.isNullPointer(PFN_vkCreateDescriptorUpdateTemplateKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateDescriptorUpdateTemplateKHR"); + try { return (int) MH_vkCreateDescriptorUpdateTemplateKHR.invokeExact(PFN_vkCreateDescriptorUpdateTemplateKHR, device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDescriptorUpdateTemplateKHR", e); } + } + + public void DestroyDescriptorUpdateTemplateKHR(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorUpdateTemplate") MemorySegment descriptorUpdateTemplate, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyDescriptorUpdateTemplateKHR)) throw new SymbolNotFoundError("Symbol not found: vkDestroyDescriptorUpdateTemplateKHR"); + try { MH_vkDestroyDescriptorUpdateTemplateKHR.invokeExact(PFN_vkDestroyDescriptorUpdateTemplateKHR, device, descriptorUpdateTemplate, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyDescriptorUpdateTemplateKHR", e); } + } + + public void UpdateDescriptorSetWithTemplateKHR(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorSet") MemorySegment descriptorSet, @CType("VkDescriptorUpdateTemplate") MemorySegment descriptorUpdateTemplate, @CType("const void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkUpdateDescriptorSetWithTemplateKHR)) throw new SymbolNotFoundError("Symbol not found: vkUpdateDescriptorSetWithTemplateKHR"); + try { MH_vkUpdateDescriptorSetWithTemplateKHR.invokeExact(PFN_vkUpdateDescriptorSetWithTemplateKHR, device, descriptorSet, descriptorUpdateTemplate, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkUpdateDescriptorSetWithTemplateKHR", e); } + } + + public void CmdPushDescriptorSetWithTemplateKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDescriptorUpdateTemplate") MemorySegment descriptorUpdateTemplate, @CType("VkPipelineLayout") MemorySegment layout, @CType("uint32_t") int set, @CType("const void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushDescriptorSetWithTemplateKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushDescriptorSetWithTemplateKHR"); + try { MH_vkCmdPushDescriptorSetWithTemplateKHR.invokeExact(PFN_vkCmdPushDescriptorSetWithTemplateKHR, commandBuffer, descriptorUpdateTemplate, layout, set, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushDescriptorSetWithTemplateKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDeviceGroup.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDeviceGroup.java new file mode 100644 index 00000000..3094eb80 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDeviceGroup.java @@ -0,0 +1,123 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRDeviceGroup { + public static final int VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 0x00000001; + public static final int VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 0x00000002; + public static final int VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 0x00000004; + public static final int VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 0x00000008; + public static final int VK_KHR_DEVICE_GROUP_SPEC_VERSION = 4; + public static final String VK_KHR_DEVICE_GROUP_EXTENSION_NAME = "VK_KHR_device_group"; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007; + public static final int VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008; + public static final int VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009; + public static final int VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012; + public static final int VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000001; + public static final int VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO; + public static final int VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT; + public static final int VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT; + public static final int VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT; + public static final int VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT; + public static final int VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT; + public static final int VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT; + public static final int VK_PIPELINE_CREATE_DISPATCH_BASE_KHR = VK_PIPELINE_CREATE_DISPATCH_BASE; + public static final int VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR = VK_DEPENDENCY_DEVICE_GROUP_BIT; + public static final int VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO; + public static final int VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO; + public static final int VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT; + public static final MethodHandle MH_vkGetDeviceGroupPeerMemoryFeaturesKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetDeviceMaskKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDispatchBaseKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkGetDeviceGroupPresentCapabilitiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceGroupSurfacePresentModesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDevicePresentRectanglesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkAcquireNextImage2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR; + public final MemorySegment PFN_vkCmdSetDeviceMaskKHR; + public final MemorySegment PFN_vkCmdDispatchBaseKHR; + public final MemorySegment PFN_vkGetDeviceGroupPresentCapabilitiesKHR; + public final MemorySegment PFN_vkGetDeviceGroupSurfacePresentModesKHR; + public final MemorySegment PFN_vkGetPhysicalDevicePresentRectanglesKHR; + public final MemorySegment PFN_vkAcquireNextImage2KHR; + + public VKKHRDeviceGroup(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR = func.invoke(device, "vkGetDeviceGroupPeerMemoryFeaturesKHR", "vkGetDeviceGroupPeerMemoryFeatures"); + PFN_vkCmdSetDeviceMaskKHR = func.invoke(device, "vkCmdSetDeviceMaskKHR", "vkCmdSetDeviceMask"); + PFN_vkCmdDispatchBaseKHR = func.invoke(device, "vkCmdDispatchBaseKHR", "vkCmdDispatchBase"); + PFN_vkGetDeviceGroupPresentCapabilitiesKHR = func.invoke(device, "vkGetDeviceGroupPresentCapabilitiesKHR"); + PFN_vkGetDeviceGroupSurfacePresentModesKHR = func.invoke(device, "vkGetDeviceGroupSurfacePresentModesKHR"); + PFN_vkGetPhysicalDevicePresentRectanglesKHR = func.invoke(device, "vkGetPhysicalDevicePresentRectanglesKHR"); + PFN_vkAcquireNextImage2KHR = func.invoke(device, "vkAcquireNextImage2KHR"); + } + + public void GetDeviceGroupPeerMemoryFeaturesKHR(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int heapIndex, @CType("uint32_t") int localDeviceIndex, @CType("uint32_t") int remoteDeviceIndex, @CType("VkPeerMemoryFeatureFlags *") MemorySegment pPeerMemoryFeatures) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceGroupPeerMemoryFeaturesKHR"); + try { MH_vkGetDeviceGroupPeerMemoryFeaturesKHR.invokeExact(PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR, device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceGroupPeerMemoryFeaturesKHR", e); } + } + + public void CmdSetDeviceMaskKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int deviceMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDeviceMaskKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDeviceMaskKHR"); + try { MH_vkCmdSetDeviceMaskKHR.invokeExact(PFN_vkCmdSetDeviceMaskKHR, commandBuffer, deviceMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDeviceMaskKHR", e); } + } + + public void CmdDispatchBaseKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int baseGroupX, @CType("uint32_t") int baseGroupY, @CType("uint32_t") int baseGroupZ, @CType("uint32_t") int groupCountX, @CType("uint32_t") int groupCountY, @CType("uint32_t") int groupCountZ) { + if (Unmarshal.isNullPointer(PFN_vkCmdDispatchBaseKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdDispatchBaseKHR"); + try { MH_vkCmdDispatchBaseKHR.invokeExact(PFN_vkCmdDispatchBaseKHR, commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDispatchBaseKHR", e); } + } + + public @CType("VkResult") int GetDeviceGroupPresentCapabilitiesKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeviceGroupPresentCapabilitiesKHR *") MemorySegment pDeviceGroupPresentCapabilities) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceGroupPresentCapabilitiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceGroupPresentCapabilitiesKHR"); + try { return (int) MH_vkGetDeviceGroupPresentCapabilitiesKHR.invokeExact(PFN_vkGetDeviceGroupPresentCapabilitiesKHR, device, pDeviceGroupPresentCapabilities); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceGroupPresentCapabilitiesKHR", e); } + } + + public @CType("VkResult") int GetDeviceGroupSurfacePresentModesKHR(@CType("VkDevice") MemorySegment device, @CType("VkSurfaceKHR") MemorySegment surface, @CType("VkDeviceGroupPresentModeFlagsKHR *") MemorySegment pModes) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceGroupSurfacePresentModesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceGroupSurfacePresentModesKHR"); + try { return (int) MH_vkGetDeviceGroupSurfacePresentModesKHR.invokeExact(PFN_vkGetDeviceGroupSurfacePresentModesKHR, device, surface, pModes); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceGroupSurfacePresentModesKHR", e); } + } + + public @CType("VkResult") int GetPhysicalDevicePresentRectanglesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkSurfaceKHR") MemorySegment surface, @CType("uint32_t *") MemorySegment pRectCount, @CType("VkRect2D *") MemorySegment pRects) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDevicePresentRectanglesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDevicePresentRectanglesKHR"); + try { return (int) MH_vkGetPhysicalDevicePresentRectanglesKHR.invokeExact(PFN_vkGetPhysicalDevicePresentRectanglesKHR, physicalDevice, surface, pRectCount, pRects); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDevicePresentRectanglesKHR", e); } + } + + public @CType("VkResult") int AcquireNextImage2KHR(@CType("VkDevice") MemorySegment device, @CType("const VkAcquireNextImageInfoKHR *") MemorySegment pAcquireInfo, @CType("uint32_t *") MemorySegment pImageIndex) { + if (Unmarshal.isNullPointer(PFN_vkAcquireNextImage2KHR)) throw new SymbolNotFoundError("Symbol not found: vkAcquireNextImage2KHR"); + try { return (int) MH_vkAcquireNextImage2KHR.invokeExact(PFN_vkAcquireNextImage2KHR, device, pAcquireInfo, pImageIndex); } + catch (Throwable e) { throw new RuntimeException("error in vkAcquireNextImage2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDeviceGroupCreation.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDeviceGroupCreation.java new file mode 100644 index 00000000..9af246d5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDeviceGroupCreation.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRDeviceGroupCreation { + public static final int VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION = 1; + public static final String VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME = "VK_KHR_device_group_creation"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO; + public static final int VK_MAX_DEVICE_GROUP_SIZE_KHR = VK_MAX_DEVICE_GROUP_SIZE; + public static final int VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT; + public static final MethodHandle MH_vkEnumeratePhysicalDeviceGroupsKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkEnumeratePhysicalDeviceGroupsKHR; + + public VKKHRDeviceGroupCreation(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkEnumeratePhysicalDeviceGroupsKHR = func.invoke(instance, "vkEnumeratePhysicalDeviceGroupsKHR", "vkEnumeratePhysicalDeviceGroups"); + } + + public @CType("VkResult") int EnumeratePhysicalDeviceGroupsKHR(@CType("VkInstance") MemorySegment instance, @CType("uint32_t *") MemorySegment pPhysicalDeviceGroupCount, @CType("VkPhysicalDeviceGroupProperties *") MemorySegment pPhysicalDeviceGroupProperties) { + if (Unmarshal.isNullPointer(PFN_vkEnumeratePhysicalDeviceGroupsKHR)) throw new SymbolNotFoundError("Symbol not found: vkEnumeratePhysicalDeviceGroupsKHR"); + try { return (int) MH_vkEnumeratePhysicalDeviceGroupsKHR.invokeExact(PFN_vkEnumeratePhysicalDeviceGroupsKHR, instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumeratePhysicalDeviceGroupsKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDisplay.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDisplay.java new file mode 100644 index 00000000..d06c05ab --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDisplay.java @@ -0,0 +1,103 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRDisplay { + public static final int VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001; + public static final int VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002; + public static final int VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004; + public static final int VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008; + public static final int VK_KHR_DISPLAY_SPEC_VERSION = 23; + public static final String VK_KHR_DISPLAY_EXTENSION_NAME = "VK_KHR_display"; + public static final int VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000; + public static final int VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001; + public static final int VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000; + public static final int VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001; + public static final MethodHandle MH_vkGetPhysicalDeviceDisplayPropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDisplayPlaneSupportedDisplaysKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDisplayModePropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateDisplayModeKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDisplayPlaneCapabilitiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateDisplayPlaneSurfaceKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceDisplayPropertiesKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR; + public final MemorySegment PFN_vkGetDisplayPlaneSupportedDisplaysKHR; + public final MemorySegment PFN_vkGetDisplayModePropertiesKHR; + public final MemorySegment PFN_vkCreateDisplayModeKHR; + public final MemorySegment PFN_vkGetDisplayPlaneCapabilitiesKHR; + public final MemorySegment PFN_vkCreateDisplayPlaneSurfaceKHR; + + public VKKHRDisplay(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceDisplayPropertiesKHR = func.invoke(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR"); + PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = func.invoke(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"); + PFN_vkGetDisplayPlaneSupportedDisplaysKHR = func.invoke(instance, "vkGetDisplayPlaneSupportedDisplaysKHR"); + PFN_vkGetDisplayModePropertiesKHR = func.invoke(instance, "vkGetDisplayModePropertiesKHR"); + PFN_vkCreateDisplayModeKHR = func.invoke(instance, "vkCreateDisplayModeKHR"); + PFN_vkGetDisplayPlaneCapabilitiesKHR = func.invoke(instance, "vkGetDisplayPlaneCapabilitiesKHR"); + PFN_vkCreateDisplayPlaneSurfaceKHR = func.invoke(instance, "vkCreateDisplayPlaneSurfaceKHR"); + } + + public @CType("VkResult") int GetPhysicalDeviceDisplayPropertiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkDisplayPropertiesKHR *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceDisplayPropertiesKHR"); + try { return (int) MH_vkGetPhysicalDeviceDisplayPropertiesKHR.invokeExact(PFN_vkGetPhysicalDeviceDisplayPropertiesKHR, physicalDevice, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceDisplayPropertiesKHR", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceDisplayPlanePropertiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkDisplayPlanePropertiesKHR *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceDisplayPlanePropertiesKHR"); + try { return (int) MH_vkGetPhysicalDeviceDisplayPlanePropertiesKHR.invokeExact(PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR, physicalDevice, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceDisplayPlanePropertiesKHR", e); } + } + + public @CType("VkResult") int GetDisplayPlaneSupportedDisplaysKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t") int planeIndex, @CType("uint32_t *") MemorySegment pDisplayCount, @CType("VkDisplayKHR *") MemorySegment pDisplays) { + if (Unmarshal.isNullPointer(PFN_vkGetDisplayPlaneSupportedDisplaysKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDisplayPlaneSupportedDisplaysKHR"); + try { return (int) MH_vkGetDisplayPlaneSupportedDisplaysKHR.invokeExact(PFN_vkGetDisplayPlaneSupportedDisplaysKHR, physicalDevice, planeIndex, pDisplayCount, pDisplays); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDisplayPlaneSupportedDisplaysKHR", e); } + } + + public @CType("VkResult") int GetDisplayModePropertiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkDisplayKHR") MemorySegment display, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkDisplayModePropertiesKHR *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetDisplayModePropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDisplayModePropertiesKHR"); + try { return (int) MH_vkGetDisplayModePropertiesKHR.invokeExact(PFN_vkGetDisplayModePropertiesKHR, physicalDevice, display, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDisplayModePropertiesKHR", e); } + } + + public @CType("VkResult") int CreateDisplayModeKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkDisplayKHR") MemorySegment display, @CType("const VkDisplayModeCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkDisplayModeKHR *") MemorySegment pMode) { + if (Unmarshal.isNullPointer(PFN_vkCreateDisplayModeKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateDisplayModeKHR"); + try { return (int) MH_vkCreateDisplayModeKHR.invokeExact(PFN_vkCreateDisplayModeKHR, physicalDevice, display, pCreateInfo, pAllocator, pMode); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDisplayModeKHR", e); } + } + + public @CType("VkResult") int GetDisplayPlaneCapabilitiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkDisplayModeKHR") MemorySegment mode, @CType("uint32_t") int planeIndex, @CType("VkDisplayPlaneCapabilitiesKHR *") MemorySegment pCapabilities) { + if (Unmarshal.isNullPointer(PFN_vkGetDisplayPlaneCapabilitiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDisplayPlaneCapabilitiesKHR"); + try { return (int) MH_vkGetDisplayPlaneCapabilitiesKHR.invokeExact(PFN_vkGetDisplayPlaneCapabilitiesKHR, physicalDevice, mode, planeIndex, pCapabilities); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDisplayPlaneCapabilitiesKHR", e); } + } + + public @CType("VkResult") int CreateDisplayPlaneSurfaceKHR(@CType("VkInstance") MemorySegment instance, @CType("const VkDisplaySurfaceCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateDisplayPlaneSurfaceKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateDisplayPlaneSurfaceKHR"); + try { return (int) MH_vkCreateDisplayPlaneSurfaceKHR.invokeExact(PFN_vkCreateDisplayPlaneSurfaceKHR, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateDisplayPlaneSurfaceKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDisplaySwapchain.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDisplaySwapchain.java new file mode 100644 index 00000000..1c8a56c0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDisplaySwapchain.java @@ -0,0 +1,43 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRDisplaySwapchain { + public static final int VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION = 10; + public static final String VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_display_swapchain"; + public static final int VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000; + public static final int VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001; + public static final MethodHandle MH_vkCreateSharedSwapchainsKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateSharedSwapchainsKHR; + + public VKKHRDisplaySwapchain(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateSharedSwapchainsKHR = func.invoke(device, "vkCreateSharedSwapchainsKHR"); + } + + public @CType("VkResult") int CreateSharedSwapchainsKHR(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int swapchainCount, @CType("const VkSwapchainCreateInfoKHR *") MemorySegment pCreateInfos, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSwapchainKHR *") MemorySegment pSwapchains) { + if (Unmarshal.isNullPointer(PFN_vkCreateSharedSwapchainsKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateSharedSwapchainsKHR"); + try { return (int) MH_vkCreateSharedSwapchainsKHR.invokeExact(PFN_vkCreateSharedSwapchainsKHR, device, swapchainCount, pCreateInfos, pAllocator, pSwapchains); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateSharedSwapchainsKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDrawIndirectCount.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDrawIndirectCount.java new file mode 100644 index 00000000..9aaca039 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDrawIndirectCount.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRDrawIndirectCount { + public static final int VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION = 1; + public static final String VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME = "VK_KHR_draw_indirect_count"; + public static final MethodHandle MH_vkCmdDrawIndirectCountKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawIndexedIndirectCountKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdDrawIndirectCountKHR; + public final MemorySegment PFN_vkCmdDrawIndexedIndirectCountKHR; + + public VKKHRDrawIndirectCount(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdDrawIndirectCountKHR = func.invoke(device, "vkCmdDrawIndirectCountKHR", "vkCmdDrawIndirectCount"); + PFN_vkCmdDrawIndexedIndirectCountKHR = func.invoke(device, "vkCmdDrawIndexedIndirectCountKHR", "vkCmdDrawIndexedIndirectCount"); + } + + public void CmdDrawIndirectCountKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkBuffer") MemorySegment countBuffer, @CType("VkDeviceSize") long countBufferOffset, @CType("uint32_t") int maxDrawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawIndirectCountKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawIndirectCountKHR"); + try { MH_vkCmdDrawIndirectCountKHR.invokeExact(PFN_vkCmdDrawIndirectCountKHR, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawIndirectCountKHR", e); } + } + + public void CmdDrawIndexedIndirectCountKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkBuffer") MemorySegment countBuffer, @CType("VkDeviceSize") long countBufferOffset, @CType("uint32_t") int maxDrawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawIndexedIndirectCountKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawIndexedIndirectCountKHR"); + try { MH_vkCmdDrawIndexedIndirectCountKHR.invokeExact(PFN_vkCmdDrawIndexedIndirectCountKHR, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawIndexedIndirectCountKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDriverProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDriverProperties.java new file mode 100644 index 00000000..07e5d84a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDriverProperties.java @@ -0,0 +1,48 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRDriverProperties { + public static final int VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION = 1; + public static final String VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME = "VK_KHR_driver_properties"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES; + public static final int VK_MAX_DRIVER_NAME_SIZE_KHR = VK_MAX_DRIVER_NAME_SIZE; + public static final int VK_MAX_DRIVER_INFO_SIZE_KHR = VK_MAX_DRIVER_INFO_SIZE; + public static final int VK_DRIVER_ID_AMD_PROPRIETARY_KHR = VK_DRIVER_ID_AMD_PROPRIETARY; + public static final int VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = VK_DRIVER_ID_AMD_OPEN_SOURCE; + public static final int VK_DRIVER_ID_MESA_RADV_KHR = VK_DRIVER_ID_MESA_RADV; + public static final int VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR = VK_DRIVER_ID_NVIDIA_PROPRIETARY; + public static final int VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR = VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS; + public static final int VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA; + public static final int VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR = VK_DRIVER_ID_IMAGINATION_PROPRIETARY; + public static final int VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR = VK_DRIVER_ID_QUALCOMM_PROPRIETARY; + public static final int VK_DRIVER_ID_ARM_PROPRIETARY_KHR = VK_DRIVER_ID_ARM_PROPRIETARY; + public static final int VK_DRIVER_ID_GOOGLE_SWIFTSHADER_KHR = VK_DRIVER_ID_GOOGLE_SWIFTSHADER; + public static final int VK_DRIVER_ID_GGP_PROPRIETARY_KHR = VK_DRIVER_ID_GGP_PROPRIETARY; + public static final int VK_DRIVER_ID_BROADCOM_PROPRIETARY_KHR = VK_DRIVER_ID_BROADCOM_PROPRIETARY; + + public VKKHRDriverProperties(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDynamicRendering.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDynamicRendering.java new file mode 100644 index 00000000..170faf1b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDynamicRendering.java @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKKHRDynamicRendering { + public static final int VK_KHR_DYNAMIC_RENDERING_SPEC_VERSION = 1; + public static final String VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME = "VK_KHR_dynamic_rendering"; + public static final int VK_STRUCTURE_TYPE_RENDERING_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_INFO; + public static final int VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES; + public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO; + public static final int VK_ATTACHMENT_STORE_OP_NONE_KHR = VK_ATTACHMENT_STORE_OP_NONE; + public static final int VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR = VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT; + public static final int VK_RENDERING_SUSPENDING_BIT_KHR = VK_RENDERING_SUSPENDING_BIT; + public static final int VK_RENDERING_RESUMING_BIT_KHR = VK_RENDERING_RESUMING_BIT; + public static final MethodHandle MH_vkCmdBeginRenderingKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdEndRenderingKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdBeginRenderingKHR; + public final MemorySegment PFN_vkCmdEndRenderingKHR; + + public VKKHRDynamicRendering(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdBeginRenderingKHR = func.invoke(device, "vkCmdBeginRenderingKHR", "vkCmdBeginRendering"); + PFN_vkCmdEndRenderingKHR = func.invoke(device, "vkCmdEndRenderingKHR", "vkCmdEndRendering"); + } + + public void CmdBeginRenderingKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkRenderingInfo *") MemorySegment pRenderingInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginRenderingKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginRenderingKHR"); + try { MH_vkCmdBeginRenderingKHR.invokeExact(PFN_vkCmdBeginRenderingKHR, commandBuffer, pRenderingInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginRenderingKHR", e); } + } + + public void CmdEndRenderingKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndRenderingKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndRenderingKHR"); + try { MH_vkCmdEndRenderingKHR.invokeExact(PFN_vkCmdEndRenderingKHR, commandBuffer); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndRenderingKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDynamicRenderingLocalRead.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDynamicRenderingLocalRead.java new file mode 100644 index 00000000..d5866dca --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRDynamicRenderingLocalRead.java @@ -0,0 +1,55 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRDynamicRenderingLocalRead { + public static final int VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION = 1; + public static final String VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME = "VK_KHR_dynamic_rendering_local_read"; + public static final int VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR = VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES; + public static final int VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO; + public static final int VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO; + public static final MethodHandle MH_vkCmdSetRenderingAttachmentLocationsKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetRenderingInputAttachmentIndicesKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetRenderingAttachmentLocationsKHR; + public final MemorySegment PFN_vkCmdSetRenderingInputAttachmentIndicesKHR; + + public VKKHRDynamicRenderingLocalRead(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetRenderingAttachmentLocationsKHR = func.invoke(device, "vkCmdSetRenderingAttachmentLocationsKHR", "vkCmdSetRenderingAttachmentLocations"); + PFN_vkCmdSetRenderingInputAttachmentIndicesKHR = func.invoke(device, "vkCmdSetRenderingInputAttachmentIndicesKHR", "vkCmdSetRenderingInputAttachmentIndices"); + } + + public void CmdSetRenderingAttachmentLocationsKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkRenderingAttachmentLocationInfo *") MemorySegment pLocationInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRenderingAttachmentLocationsKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRenderingAttachmentLocationsKHR"); + try { MH_vkCmdSetRenderingAttachmentLocationsKHR.invokeExact(PFN_vkCmdSetRenderingAttachmentLocationsKHR, commandBuffer, pLocationInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRenderingAttachmentLocationsKHR", e); } + } + + public void CmdSetRenderingInputAttachmentIndicesKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkRenderingInputAttachmentIndexInfo *") MemorySegment pInputAttachmentIndexInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRenderingInputAttachmentIndicesKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRenderingInputAttachmentIndicesKHR"); + try { MH_vkCmdSetRenderingInputAttachmentIndicesKHR.invokeExact(PFN_vkCmdSetRenderingInputAttachmentIndicesKHR, commandBuffer, pInputAttachmentIndexInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRenderingInputAttachmentIndicesKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFence.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFence.java new file mode 100644 index 00000000..333fe52a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFence.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRExternalFence { + public static final int VK_KHR_EXTERNAL_FENCE_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME = "VK_KHR_external_fence"; + public static final int VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO; + public static final int VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = VK_FENCE_IMPORT_TEMPORARY_BIT; + + public VKKHRExternalFence(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFenceCapabilities.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFenceCapabilities.java new file mode 100644 index 00000000..1f832dd0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFenceCapabilities.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRExternalFenceCapabilities { + public static final int VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_fence_capabilities"; + public static final int VK_LUID_SIZE_KHR = VK_LUID_SIZE; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES; + public static final int VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT; + public static final int VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT; + public static final int VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT; + public static final int VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT; + public static final int VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT; + public static final int VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT; + public static final MethodHandle MH_vkGetPhysicalDeviceExternalFencePropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR; + + public VKKHRExternalFenceCapabilities(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR = func.invoke(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR", "vkGetPhysicalDeviceExternalFenceProperties"); + } + + public void GetPhysicalDeviceExternalFencePropertiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceExternalFenceInfo *") MemorySegment pExternalFenceInfo, @CType("VkExternalFenceProperties *") MemorySegment pExternalFenceProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceExternalFencePropertiesKHR"); + try { MH_vkGetPhysicalDeviceExternalFencePropertiesKHR.invokeExact(PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR, physicalDevice, pExternalFenceInfo, pExternalFenceProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceExternalFencePropertiesKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFenceFd.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFenceFd.java new file mode 100644 index 00000000..db0f1356 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFenceFd.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRExternalFenceFd { + public static final int VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME = "VK_KHR_external_fence_fd"; + public static final int VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000; + public static final int VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001; + public static final MethodHandle MH_vkImportFenceFdKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetFenceFdKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkImportFenceFdKHR; + public final MemorySegment PFN_vkGetFenceFdKHR; + + public VKKHRExternalFenceFd(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkImportFenceFdKHR = func.invoke(device, "vkImportFenceFdKHR"); + PFN_vkGetFenceFdKHR = func.invoke(device, "vkGetFenceFdKHR"); + } + + public @CType("VkResult") int ImportFenceFdKHR(@CType("VkDevice") MemorySegment device, @CType("const VkImportFenceFdInfoKHR *") MemorySegment pImportFenceFdInfo) { + if (Unmarshal.isNullPointer(PFN_vkImportFenceFdKHR)) throw new SymbolNotFoundError("Symbol not found: vkImportFenceFdKHR"); + try { return (int) MH_vkImportFenceFdKHR.invokeExact(PFN_vkImportFenceFdKHR, device, pImportFenceFdInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkImportFenceFdKHR", e); } + } + + public @CType("VkResult") int GetFenceFdKHR(@CType("VkDevice") MemorySegment device, @CType("const VkFenceGetFdInfoKHR *") MemorySegment pGetFdInfo, @CType("int *") MemorySegment pFd) { + if (Unmarshal.isNullPointer(PFN_vkGetFenceFdKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetFenceFdKHR"); + try { return (int) MH_vkGetFenceFdKHR.invokeExact(PFN_vkGetFenceFdKHR, device, pGetFdInfo, pFd); } + catch (Throwable e) { throw new RuntimeException("error in vkGetFenceFdKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFenceWin32.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFenceWin32.java new file mode 100644 index 00000000..8ad216e3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalFenceWin32.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRExternalFenceWin32 { + public static final int VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME = "VK_KHR_external_fence_win32"; + public static final int VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000; + public static final int VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001; + public static final int VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002; + public static final MethodHandle MH_vkImportFenceWin32HandleKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetFenceWin32HandleKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkImportFenceWin32HandleKHR; + public final MemorySegment PFN_vkGetFenceWin32HandleKHR; + + public VKKHRExternalFenceWin32(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkImportFenceWin32HandleKHR = func.invoke(device, "vkImportFenceWin32HandleKHR"); + PFN_vkGetFenceWin32HandleKHR = func.invoke(device, "vkGetFenceWin32HandleKHR"); + } + + public @CType("VkResult") int ImportFenceWin32HandleKHR(@CType("VkDevice") MemorySegment device, @CType("const VkImportFenceWin32HandleInfoKHR *") MemorySegment pImportFenceWin32HandleInfo) { + if (Unmarshal.isNullPointer(PFN_vkImportFenceWin32HandleKHR)) throw new SymbolNotFoundError("Symbol not found: vkImportFenceWin32HandleKHR"); + try { return (int) MH_vkImportFenceWin32HandleKHR.invokeExact(PFN_vkImportFenceWin32HandleKHR, device, pImportFenceWin32HandleInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkImportFenceWin32HandleKHR", e); } + } + + public @CType("VkResult") int GetFenceWin32HandleKHR(@CType("VkDevice") MemorySegment device, @CType("const VkFenceGetWin32HandleInfoKHR *") MemorySegment pGetWin32HandleInfo, @CType("HANDLE *") MemorySegment pHandle) { + if (Unmarshal.isNullPointer(PFN_vkGetFenceWin32HandleKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetFenceWin32HandleKHR"); + try { return (int) MH_vkGetFenceWin32HandleKHR.invokeExact(PFN_vkGetFenceWin32HandleKHR, device, pGetWin32HandleInfo, pHandle); } + catch (Throwable e) { throw new RuntimeException("error in vkGetFenceWin32HandleKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemory.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemory.java new file mode 100644 index 00000000..51dc8982 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemory.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRExternalMemory { + public static final int VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_KHR_external_memory"; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO; + public static final int VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = VK_ERROR_INVALID_EXTERNAL_HANDLE; + public static final int VK_QUEUE_FAMILY_EXTERNAL_KHR = VK_QUEUE_FAMILY_EXTERNAL; + + public VKKHRExternalMemory(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemoryCapabilities.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemoryCapabilities.java new file mode 100644 index 00000000..0747b134 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemoryCapabilities.java @@ -0,0 +1,58 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRExternalMemoryCapabilities { + public static final int VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_memory_capabilities"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES; + public static final int VK_LUID_SIZE_KHR = VK_LUID_SIZE; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT; + public static final int VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT; + public static final int VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT; + public static final int VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT; + public static final MethodHandle MH_vkGetPhysicalDeviceExternalBufferPropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR; + + public VKKHRExternalMemoryCapabilities(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR = func.invoke(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR", "vkGetPhysicalDeviceExternalBufferProperties"); + } + + public void GetPhysicalDeviceExternalBufferPropertiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceExternalBufferInfo *") MemorySegment pExternalBufferInfo, @CType("VkExternalBufferProperties *") MemorySegment pExternalBufferProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceExternalBufferPropertiesKHR"); + try { MH_vkGetPhysicalDeviceExternalBufferPropertiesKHR.invokeExact(PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR, physicalDevice, pExternalBufferInfo, pExternalBufferProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceExternalBufferPropertiesKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemoryFd.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemoryFd.java new file mode 100644 index 00000000..7b159241 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemoryFd.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRExternalMemoryFd { + public static final int VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME = "VK_KHR_external_memory_fd"; + public static final int VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000; + public static final int VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001; + public static final int VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR = 1000074002; + public static final MethodHandle MH_vkGetMemoryFdKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetMemoryFdPropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetMemoryFdKHR; + public final MemorySegment PFN_vkGetMemoryFdPropertiesKHR; + + public VKKHRExternalMemoryFd(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetMemoryFdKHR = func.invoke(device, "vkGetMemoryFdKHR"); + PFN_vkGetMemoryFdPropertiesKHR = func.invoke(device, "vkGetMemoryFdPropertiesKHR"); + } + + public @CType("VkResult") int GetMemoryFdKHR(@CType("VkDevice") MemorySegment device, @CType("const VkMemoryGetFdInfoKHR *") MemorySegment pGetFdInfo, @CType("int *") MemorySegment pFd) { + if (Unmarshal.isNullPointer(PFN_vkGetMemoryFdKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetMemoryFdKHR"); + try { return (int) MH_vkGetMemoryFdKHR.invokeExact(PFN_vkGetMemoryFdKHR, device, pGetFdInfo, pFd); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMemoryFdKHR", e); } + } + + public @CType("VkResult") int GetMemoryFdPropertiesKHR(@CType("VkDevice") MemorySegment device, @CType("VkExternalMemoryHandleTypeFlagBits") int handleType, int fd, @CType("VkMemoryFdPropertiesKHR *") MemorySegment pMemoryFdProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetMemoryFdPropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetMemoryFdPropertiesKHR"); + try { return (int) MH_vkGetMemoryFdPropertiesKHR.invokeExact(PFN_vkGetMemoryFdPropertiesKHR, device, handleType, fd, pMemoryFdProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMemoryFdPropertiesKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemoryWin32.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemoryWin32.java new file mode 100644 index 00000000..0661048d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalMemoryWin32.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRExternalMemoryWin32 { + public static final int VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_KHR_external_memory_win32"; + public static final int VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000; + public static final int VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001; + public static final int VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002; + public static final int VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003; + public static final MethodHandle MH_vkGetMemoryWin32HandleKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetMemoryWin32HandlePropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetMemoryWin32HandleKHR; + public final MemorySegment PFN_vkGetMemoryWin32HandlePropertiesKHR; + + public VKKHRExternalMemoryWin32(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetMemoryWin32HandleKHR = func.invoke(device, "vkGetMemoryWin32HandleKHR"); + PFN_vkGetMemoryWin32HandlePropertiesKHR = func.invoke(device, "vkGetMemoryWin32HandlePropertiesKHR"); + } + + public @CType("VkResult") int GetMemoryWin32HandleKHR(@CType("VkDevice") MemorySegment device, @CType("const VkMemoryGetWin32HandleInfoKHR *") MemorySegment pGetWin32HandleInfo, @CType("HANDLE *") MemorySegment pHandle) { + if (Unmarshal.isNullPointer(PFN_vkGetMemoryWin32HandleKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetMemoryWin32HandleKHR"); + try { return (int) MH_vkGetMemoryWin32HandleKHR.invokeExact(PFN_vkGetMemoryWin32HandleKHR, device, pGetWin32HandleInfo, pHandle); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMemoryWin32HandleKHR", e); } + } + + public @CType("VkResult") int GetMemoryWin32HandlePropertiesKHR(@CType("VkDevice") MemorySegment device, @CType("VkExternalMemoryHandleTypeFlagBits") int handleType, @CType("HANDLE") MemorySegment handle, @CType("VkMemoryWin32HandlePropertiesKHR *") MemorySegment pMemoryWin32HandleProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetMemoryWin32HandlePropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetMemoryWin32HandlePropertiesKHR"); + try { return (int) MH_vkGetMemoryWin32HandlePropertiesKHR.invokeExact(PFN_vkGetMemoryWin32HandlePropertiesKHR, device, handleType, handle, pMemoryWin32HandleProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMemoryWin32HandlePropertiesKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphore.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphore.java new file mode 100644 index 00000000..37b8591a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphore.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRExternalSemaphore { + public static final int VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_KHR_external_semaphore"; + public static final int VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO; + public static final int VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT; + + public VKKHRExternalSemaphore(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphoreCapabilities.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphoreCapabilities.java new file mode 100644 index 00000000..6526e541 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphoreCapabilities.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRExternalSemaphoreCapabilities { + public static final int VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_semaphore_capabilities"; + public static final int VK_LUID_SIZE_KHR = VK_LUID_SIZE; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT; + public static final int VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT; + public static final int VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT; + public static final int VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT; + public static final MethodHandle MH_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; + + public VKKHRExternalSemaphoreCapabilities(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = func.invoke(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR", "vkGetPhysicalDeviceExternalSemaphoreProperties"); + } + + public void GetPhysicalDeviceExternalSemaphorePropertiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceExternalSemaphoreInfo *") MemorySegment pExternalSemaphoreInfo, @CType("VkExternalSemaphoreProperties *") MemorySegment pExternalSemaphoreProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"); + try { MH_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR.invokeExact(PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceExternalSemaphorePropertiesKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphoreFd.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphoreFd.java new file mode 100644 index 00000000..498fe116 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphoreFd.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRExternalSemaphoreFd { + public static final int VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME = "VK_KHR_external_semaphore_fd"; + public static final int VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001; + public static final MethodHandle MH_vkImportSemaphoreFdKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetSemaphoreFdKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkImportSemaphoreFdKHR; + public final MemorySegment PFN_vkGetSemaphoreFdKHR; + + public VKKHRExternalSemaphoreFd(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkImportSemaphoreFdKHR = func.invoke(device, "vkImportSemaphoreFdKHR"); + PFN_vkGetSemaphoreFdKHR = func.invoke(device, "vkGetSemaphoreFdKHR"); + } + + public @CType("VkResult") int ImportSemaphoreFdKHR(@CType("VkDevice") MemorySegment device, @CType("const VkImportSemaphoreFdInfoKHR *") MemorySegment pImportSemaphoreFdInfo) { + if (Unmarshal.isNullPointer(PFN_vkImportSemaphoreFdKHR)) throw new SymbolNotFoundError("Symbol not found: vkImportSemaphoreFdKHR"); + try { return (int) MH_vkImportSemaphoreFdKHR.invokeExact(PFN_vkImportSemaphoreFdKHR, device, pImportSemaphoreFdInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkImportSemaphoreFdKHR", e); } + } + + public @CType("VkResult") int GetSemaphoreFdKHR(@CType("VkDevice") MemorySegment device, @CType("const VkSemaphoreGetFdInfoKHR *") MemorySegment pGetFdInfo, @CType("int *") MemorySegment pFd) { + if (Unmarshal.isNullPointer(PFN_vkGetSemaphoreFdKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetSemaphoreFdKHR"); + try { return (int) MH_vkGetSemaphoreFdKHR.invokeExact(PFN_vkGetSemaphoreFdKHR, device, pGetFdInfo, pFd); } + catch (Throwable e) { throw new RuntimeException("error in vkGetSemaphoreFdKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphoreWin32.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphoreWin32.java new file mode 100644 index 00000000..0b6312ee --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRExternalSemaphoreWin32.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRExternalSemaphoreWin32 { + public static final int VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION = 1; + public static final String VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME = "VK_KHR_external_semaphore_win32"; + public static final int VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000; + public static final int VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001; + public static final int VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003; + public static final MethodHandle MH_vkImportSemaphoreWin32HandleKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetSemaphoreWin32HandleKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkImportSemaphoreWin32HandleKHR; + public final MemorySegment PFN_vkGetSemaphoreWin32HandleKHR; + + public VKKHRExternalSemaphoreWin32(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkImportSemaphoreWin32HandleKHR = func.invoke(device, "vkImportSemaphoreWin32HandleKHR"); + PFN_vkGetSemaphoreWin32HandleKHR = func.invoke(device, "vkGetSemaphoreWin32HandleKHR"); + } + + public @CType("VkResult") int ImportSemaphoreWin32HandleKHR(@CType("VkDevice") MemorySegment device, @CType("const VkImportSemaphoreWin32HandleInfoKHR *") MemorySegment pImportSemaphoreWin32HandleInfo) { + if (Unmarshal.isNullPointer(PFN_vkImportSemaphoreWin32HandleKHR)) throw new SymbolNotFoundError("Symbol not found: vkImportSemaphoreWin32HandleKHR"); + try { return (int) MH_vkImportSemaphoreWin32HandleKHR.invokeExact(PFN_vkImportSemaphoreWin32HandleKHR, device, pImportSemaphoreWin32HandleInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkImportSemaphoreWin32HandleKHR", e); } + } + + public @CType("VkResult") int GetSemaphoreWin32HandleKHR(@CType("VkDevice") MemorySegment device, @CType("const VkSemaphoreGetWin32HandleInfoKHR *") MemorySegment pGetWin32HandleInfo, @CType("HANDLE *") MemorySegment pHandle) { + if (Unmarshal.isNullPointer(PFN_vkGetSemaphoreWin32HandleKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetSemaphoreWin32HandleKHR"); + try { return (int) MH_vkGetSemaphoreWin32HandleKHR.invokeExact(PFN_vkGetSemaphoreWin32HandleKHR, device, pGetWin32HandleInfo, pHandle); } + catch (Throwable e) { throw new RuntimeException("error in vkGetSemaphoreWin32HandleKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRFormatFeatureFlags2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRFormatFeatureFlags2.java new file mode 100644 index 00000000..ac517b8e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRFormatFeatureFlags2.java @@ -0,0 +1,61 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKKHRFormatFeatureFlags2 { + public static final int VK_KHR_FORMAT_FEATURE_FLAGS_2_SPEC_VERSION = 2; + public static final String VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME = "VK_KHR_format_feature_flags2"; + public static final int VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT; + public static final long VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR = VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT; + public static final long VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR = VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT; + public static final long VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT; + public static final long VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT; + public static final long VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT_KHR = VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT; + public static final long VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR = VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT; + public static final long VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR = VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT; + public static final long VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT_KHR = VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT; + public static final long VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT; + public static final long VK_FORMAT_FEATURE_2_BLIT_SRC_BIT_KHR = VK_FORMAT_FEATURE_2_BLIT_SRC_BIT; + public static final long VK_FORMAT_FEATURE_2_BLIT_DST_BIT_KHR = VK_FORMAT_FEATURE_2_BLIT_DST_BIT; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT_KHR = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT; + public static final long VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT_KHR = VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT; + public static final long VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT_KHR = VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT; + public static final long VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT; + public static final long VK_FORMAT_FEATURE_2_DISJOINT_BIT_KHR = VK_FORMAT_FEATURE_2_DISJOINT_BIT; + public static final long VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT; + public static final long VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR = VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT; + public static final long VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR = VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT_KHR = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT; + public static final long VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT; + + public VKKHRFormatFeatureFlags2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRFragmentShaderBarycentric.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRFragmentShaderBarycentric.java new file mode 100644 index 00000000..26c62ca7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRFragmentShaderBarycentric.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRFragmentShaderBarycentric { + public static final int VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION = 1; + public static final String VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_KHR_fragment_shader_barycentric"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR = 1000322000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR = 1000322000; + + public VKKHRFragmentShaderBarycentric(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRFragmentShadingRate.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRFragmentShadingRate.java new file mode 100644 index 00000000..0e46080a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRFragmentShadingRate.java @@ -0,0 +1,71 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.khr.VKKHRFragmentShadingRate.*; +public class VKKHRFragmentShadingRate { + public static final int VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR = 0; + public static final int VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR = 1; + public static final int VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR = 2; + public static final int VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR = 3; + public static final int VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR = 4; + public static final int VK_KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION = 2; + public static final String VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"; + public static final int VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000226003; + public static final int VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR = 1000226000; + public static final int VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000226000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR = 1000226001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR = 1000226002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR = 1000226003; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR = 1000226004; + public static final int VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000; + public static final int VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00000100; + public static final int VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000; + public static final int VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000; + public static final long VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000L; + public static final int VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000226006; + public static final int VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000; + public static final int VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR; + public static final MethodHandle MH_vkGetPhysicalDeviceFragmentShadingRatesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetFragmentShadingRateKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR; + public final MemorySegment PFN_vkCmdSetFragmentShadingRateKHR; + + public VKKHRFragmentShadingRate(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR = func.invoke(device, "vkGetPhysicalDeviceFragmentShadingRatesKHR"); + PFN_vkCmdSetFragmentShadingRateKHR = func.invoke(device, "vkCmdSetFragmentShadingRateKHR"); + } + + public @CType("VkResult") int GetPhysicalDeviceFragmentShadingRatesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pFragmentShadingRateCount, @CType("VkPhysicalDeviceFragmentShadingRateKHR *") MemorySegment pFragmentShadingRates) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceFragmentShadingRatesKHR"); + try { return (int) MH_vkGetPhysicalDeviceFragmentShadingRatesKHR.invokeExact(PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR, physicalDevice, pFragmentShadingRateCount, pFragmentShadingRates); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceFragmentShadingRatesKHR", e); } + } + + public void CmdSetFragmentShadingRateKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkExtent2D *") MemorySegment pFragmentSize, @CType("const VkFragmentShadingRateCombinerOpKHR [2]") int combinerOps) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetFragmentShadingRateKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetFragmentShadingRateKHR"); + try { MH_vkCmdSetFragmentShadingRateKHR.invokeExact(PFN_vkCmdSetFragmentShadingRateKHR, commandBuffer, pFragmentSize, combinerOps); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetFragmentShadingRateKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetDisplayProperties2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetDisplayProperties2.java new file mode 100644 index 00000000..9318480d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetDisplayProperties2.java @@ -0,0 +1,73 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRGetDisplayProperties2 { + public static final int VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION = 1; + public static final String VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_display_properties2"; + public static final int VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR = 1000121000; + public static final int VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001; + public static final int VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002; + public static final int VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR = 1000121003; + public static final int VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004; + public static final MethodHandle MH_vkGetPhysicalDeviceDisplayProperties2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDisplayModeProperties2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDisplayPlaneCapabilities2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceDisplayProperties2KHR; + public final MemorySegment PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR; + public final MemorySegment PFN_vkGetDisplayModeProperties2KHR; + public final MemorySegment PFN_vkGetDisplayPlaneCapabilities2KHR; + + public VKKHRGetDisplayProperties2(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceDisplayProperties2KHR = func.invoke(instance, "vkGetPhysicalDeviceDisplayProperties2KHR"); + PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = func.invoke(instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR"); + PFN_vkGetDisplayModeProperties2KHR = func.invoke(instance, "vkGetDisplayModeProperties2KHR"); + PFN_vkGetDisplayPlaneCapabilities2KHR = func.invoke(instance, "vkGetDisplayPlaneCapabilities2KHR"); + } + + public @CType("VkResult") int GetPhysicalDeviceDisplayProperties2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkDisplayProperties2KHR *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceDisplayProperties2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceDisplayProperties2KHR"); + try { return (int) MH_vkGetPhysicalDeviceDisplayProperties2KHR.invokeExact(PFN_vkGetPhysicalDeviceDisplayProperties2KHR, physicalDevice, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceDisplayProperties2KHR", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceDisplayPlaneProperties2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkDisplayPlaneProperties2KHR *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceDisplayPlaneProperties2KHR"); + try { return (int) MH_vkGetPhysicalDeviceDisplayPlaneProperties2KHR.invokeExact(PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR, physicalDevice, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceDisplayPlaneProperties2KHR", e); } + } + + public @CType("VkResult") int GetDisplayModeProperties2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkDisplayKHR") MemorySegment display, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkDisplayModeProperties2KHR *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetDisplayModeProperties2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDisplayModeProperties2KHR"); + try { return (int) MH_vkGetDisplayModeProperties2KHR.invokeExact(PFN_vkGetDisplayModeProperties2KHR, physicalDevice, display, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDisplayModeProperties2KHR", e); } + } + + public @CType("VkResult") int GetDisplayPlaneCapabilities2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkDisplayPlaneInfo2KHR *") MemorySegment pDisplayPlaneInfo, @CType("VkDisplayPlaneCapabilities2KHR *") MemorySegment pCapabilities) { + if (Unmarshal.isNullPointer(PFN_vkGetDisplayPlaneCapabilities2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDisplayPlaneCapabilities2KHR"); + try { return (int) MH_vkGetDisplayPlaneCapabilities2KHR.invokeExact(PFN_vkGetDisplayPlaneCapabilities2KHR, physicalDevice, pDisplayPlaneInfo, pCapabilities); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDisplayPlaneCapabilities2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetMemoryRequirements2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetMemoryRequirements2.java new file mode 100644 index 00000000..7e8c4fe2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetMemoryRequirements2.java @@ -0,0 +1,65 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRGetMemoryRequirements2 { + public static final int VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION = 1; + public static final String VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME = "VK_KHR_get_memory_requirements2"; + public static final int VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2; + public static final int VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2; + public static final int VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2; + public static final int VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2; + public static final int VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2; + public static final MethodHandle MH_vkGetImageMemoryRequirements2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetBufferMemoryRequirements2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageSparseMemoryRequirements2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetImageMemoryRequirements2KHR; + public final MemorySegment PFN_vkGetBufferMemoryRequirements2KHR; + public final MemorySegment PFN_vkGetImageSparseMemoryRequirements2KHR; + + public VKKHRGetMemoryRequirements2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetImageMemoryRequirements2KHR = func.invoke(device, "vkGetImageMemoryRequirements2KHR", "vkGetImageMemoryRequirements2"); + PFN_vkGetBufferMemoryRequirements2KHR = func.invoke(device, "vkGetBufferMemoryRequirements2KHR", "vkGetBufferMemoryRequirements2"); + PFN_vkGetImageSparseMemoryRequirements2KHR = func.invoke(device, "vkGetImageSparseMemoryRequirements2KHR", "vkGetImageSparseMemoryRequirements2"); + } + + public void GetImageMemoryRequirements2KHR(@CType("VkDevice") MemorySegment device, @CType("const VkImageMemoryRequirementsInfo2 *") MemorySegment pInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetImageMemoryRequirements2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetImageMemoryRequirements2KHR"); + try { MH_vkGetImageMemoryRequirements2KHR.invokeExact(PFN_vkGetImageMemoryRequirements2KHR, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageMemoryRequirements2KHR", e); } + } + + public void GetBufferMemoryRequirements2KHR(@CType("VkDevice") MemorySegment device, @CType("const VkBufferMemoryRequirementsInfo2 *") MemorySegment pInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetBufferMemoryRequirements2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetBufferMemoryRequirements2KHR"); + try { MH_vkGetBufferMemoryRequirements2KHR.invokeExact(PFN_vkGetBufferMemoryRequirements2KHR, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetBufferMemoryRequirements2KHR", e); } + } + + public void GetImageSparseMemoryRequirements2KHR(@CType("VkDevice") MemorySegment device, @CType("const VkImageSparseMemoryRequirementsInfo2 *") MemorySegment pInfo, @CType("uint32_t *") MemorySegment pSparseMemoryRequirementCount, @CType("VkSparseImageMemoryRequirements2 *") MemorySegment pSparseMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetImageSparseMemoryRequirements2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetImageSparseMemoryRequirements2KHR"); + try { MH_vkGetImageSparseMemoryRequirements2KHR.invokeExact(PFN_vkGetImageSparseMemoryRequirements2KHR, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageSparseMemoryRequirements2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetPhysicalDeviceProperties2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetPhysicalDeviceProperties2.java new file mode 100644 index 00000000..2658a632 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetPhysicalDeviceProperties2.java @@ -0,0 +1,105 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRGetPhysicalDeviceProperties2 { + public static final int VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION = 2; + public static final String VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_physical_device_properties2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2; + public static final int VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; + public static final int VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2; + public static final int VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2; + public static final int VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2; + public static final MethodHandle MH_vkGetPhysicalDeviceFeatures2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceProperties2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceFormatProperties2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceImageFormatProperties2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceQueueFamilyProperties2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceMemoryProperties2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceFeatures2KHR; + public final MemorySegment PFN_vkGetPhysicalDeviceProperties2KHR; + public final MemorySegment PFN_vkGetPhysicalDeviceFormatProperties2KHR; + public final MemorySegment PFN_vkGetPhysicalDeviceImageFormatProperties2KHR; + public final MemorySegment PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR; + public final MemorySegment PFN_vkGetPhysicalDeviceMemoryProperties2KHR; + public final MemorySegment PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR; + + public VKKHRGetPhysicalDeviceProperties2(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceFeatures2KHR = func.invoke(instance, "vkGetPhysicalDeviceFeatures2KHR", "vkGetPhysicalDeviceFeatures2"); + PFN_vkGetPhysicalDeviceProperties2KHR = func.invoke(instance, "vkGetPhysicalDeviceProperties2KHR", "vkGetPhysicalDeviceProperties2"); + PFN_vkGetPhysicalDeviceFormatProperties2KHR = func.invoke(instance, "vkGetPhysicalDeviceFormatProperties2KHR", "vkGetPhysicalDeviceFormatProperties2"); + PFN_vkGetPhysicalDeviceImageFormatProperties2KHR = func.invoke(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR", "vkGetPhysicalDeviceImageFormatProperties2"); + PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR = func.invoke(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR", "vkGetPhysicalDeviceQueueFamilyProperties2"); + PFN_vkGetPhysicalDeviceMemoryProperties2KHR = func.invoke(instance, "vkGetPhysicalDeviceMemoryProperties2KHR", "vkGetPhysicalDeviceMemoryProperties2"); + PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = func.invoke(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR", "vkGetPhysicalDeviceSparseImageFormatProperties2"); + } + + public void GetPhysicalDeviceFeatures2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkPhysicalDeviceFeatures2 *") MemorySegment pFeatures) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceFeatures2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceFeatures2KHR"); + try { MH_vkGetPhysicalDeviceFeatures2KHR.invokeExact(PFN_vkGetPhysicalDeviceFeatures2KHR, physicalDevice, pFeatures); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceFeatures2KHR", e); } + } + + public void GetPhysicalDeviceProperties2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkPhysicalDeviceProperties2 *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceProperties2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceProperties2KHR"); + try { MH_vkGetPhysicalDeviceProperties2KHR.invokeExact(PFN_vkGetPhysicalDeviceProperties2KHR, physicalDevice, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceProperties2KHR", e); } + } + + public void GetPhysicalDeviceFormatProperties2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkFormat") int format, @CType("VkFormatProperties2 *") MemorySegment pFormatProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceFormatProperties2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceFormatProperties2KHR"); + try { MH_vkGetPhysicalDeviceFormatProperties2KHR.invokeExact(PFN_vkGetPhysicalDeviceFormatProperties2KHR, physicalDevice, format, pFormatProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceFormatProperties2KHR", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceImageFormatProperties2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceImageFormatInfo2 *") MemorySegment pImageFormatInfo, @CType("VkImageFormatProperties2 *") MemorySegment pImageFormatProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceImageFormatProperties2KHR"); + try { return (int) MH_vkGetPhysicalDeviceImageFormatProperties2KHR.invokeExact(PFN_vkGetPhysicalDeviceImageFormatProperties2KHR, physicalDevice, pImageFormatInfo, pImageFormatProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceImageFormatProperties2KHR", e); } + } + + public void GetPhysicalDeviceQueueFamilyProperties2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pQueueFamilyPropertyCount, @CType("VkQueueFamilyProperties2 *") MemorySegment pQueueFamilyProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceQueueFamilyProperties2KHR"); + try { MH_vkGetPhysicalDeviceQueueFamilyProperties2KHR.invokeExact(PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR, physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceQueueFamilyProperties2KHR", e); } + } + + public void GetPhysicalDeviceMemoryProperties2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkPhysicalDeviceMemoryProperties2 *") MemorySegment pMemoryProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceMemoryProperties2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceMemoryProperties2KHR"); + try { MH_vkGetPhysicalDeviceMemoryProperties2KHR.invokeExact(PFN_vkGetPhysicalDeviceMemoryProperties2KHR, physicalDevice, pMemoryProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceMemoryProperties2KHR", e); } + } + + public void GetPhysicalDeviceSparseImageFormatProperties2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceSparseImageFormatInfo2 *") MemorySegment pFormatInfo, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkSparseImageFormatProperties2 *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSparseImageFormatProperties2KHR"); + try { MH_vkGetPhysicalDeviceSparseImageFormatProperties2KHR.invokeExact(PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR, physicalDevice, pFormatInfo, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSparseImageFormatProperties2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetSurfaceCapabilities2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetSurfaceCapabilities2.java new file mode 100644 index 00000000..f5a53c98 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGetSurfaceCapabilities2.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRGetSurfaceCapabilities2 { + public static final int VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION = 1; + public static final String VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME = "VK_KHR_get_surface_capabilities2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000; + public static final int VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001; + public static final int VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002; + public static final MethodHandle MH_vkGetPhysicalDeviceSurfaceCapabilities2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceSurfaceFormats2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR; + public final MemorySegment PFN_vkGetPhysicalDeviceSurfaceFormats2KHR; + + public VKKHRGetSurfaceCapabilities2(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR = func.invoke(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"); + PFN_vkGetPhysicalDeviceSurfaceFormats2KHR = func.invoke(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR"); + } + + public @CType("VkResult") int GetPhysicalDeviceSurfaceCapabilities2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceSurfaceInfo2KHR *") MemorySegment pSurfaceInfo, @CType("VkSurfaceCapabilities2KHR *") MemorySegment pSurfaceCapabilities) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSurfaceCapabilities2KHR"); + try { return (int) MH_vkGetPhysicalDeviceSurfaceCapabilities2KHR.invokeExact(PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR, physicalDevice, pSurfaceInfo, pSurfaceCapabilities); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSurfaceCapabilities2KHR", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceSurfaceFormats2KHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceSurfaceInfo2KHR *") MemorySegment pSurfaceInfo, @CType("uint32_t *") MemorySegment pSurfaceFormatCount, @CType("VkSurfaceFormat2KHR *") MemorySegment pSurfaceFormats) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSurfaceFormats2KHR"); + try { return (int) MH_vkGetPhysicalDeviceSurfaceFormats2KHR.invokeExact(PFN_vkGetPhysicalDeviceSurfaceFormats2KHR, physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSurfaceFormats2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGlobalPriority.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGlobalPriority.java new file mode 100644 index 00000000..cae6d714 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRGlobalPriority.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRGlobalPriority { + public static final int VK_KHR_GLOBAL_PRIORITY_SPEC_VERSION = 1; + public static final String VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_KHR_global_priority"; + public static final int VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES; + public static final int VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES; + public static final int VK_ERROR_NOT_PERMITTED_KHR = VK_ERROR_NOT_PERMITTED; + public static final int VK_MAX_GLOBAL_PRIORITY_SIZE_KHR = VK_MAX_GLOBAL_PRIORITY_SIZE; + public static final int VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR = VK_QUEUE_GLOBAL_PRIORITY_LOW; + public static final int VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM; + public static final int VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR = VK_QUEUE_GLOBAL_PRIORITY_HIGH; + public static final int VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR = VK_QUEUE_GLOBAL_PRIORITY_REALTIME; + + public VKKHRGlobalPriority(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRImageFormatList.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRImageFormatList.java new file mode 100644 index 00000000..dc36b131 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRImageFormatList.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRImageFormatList { + public static final int VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION = 1; + public static final String VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME = "VK_KHR_image_format_list"; + public static final int VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO; + + public VKKHRImageFormatList(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRImagelessFramebuffer.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRImagelessFramebuffer.java new file mode 100644 index 00000000..03cf2031 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRImagelessFramebuffer.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRImagelessFramebuffer { + public static final int VK_KHR_IMAGELESS_FRAMEBUFFER_SPEC_VERSION = 1; + public static final String VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME = "VK_KHR_imageless_framebuffer"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES; + public static final int VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO; + public static final int VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT; + + public VKKHRImagelessFramebuffer(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRIncrementalPresent.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRIncrementalPresent.java new file mode 100644 index 00000000..44bf1203 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRIncrementalPresent.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRIncrementalPresent { + public static final int VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION = 2; + public static final String VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME = "VK_KHR_incremental_present"; + public static final int VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000; + + public VKKHRIncrementalPresent(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRIndexTypeUint8.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRIndexTypeUint8.java new file mode 100644 index 00000000..7a775cf6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRIndexTypeUint8.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRIndexTypeUint8 { + public static final int VK_KHR_INDEX_TYPE_UINT8_SPEC_VERSION = 1; + public static final String VK_KHR_INDEX_TYPE_UINT8_EXTENSION_NAME = "VK_KHR_index_type_uint8"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES; + public static final int VK_INDEX_TYPE_UINT8_KHR = VK_INDEX_TYPE_UINT8; + + public VKKHRIndexTypeUint8(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRLineRasterization.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRLineRasterization.java new file mode 100644 index 00000000..3bd9da1b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRLineRasterization.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRLineRasterization { + public static final int VK_KHR_LINE_RASTERIZATION_SPEC_VERSION = 1; + public static final String VK_KHR_LINE_RASTERIZATION_EXTENSION_NAME = "VK_KHR_line_rasterization"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES; + public static final int VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES; + public static final int VK_DYNAMIC_STATE_LINE_STIPPLE_KHR = VK_DYNAMIC_STATE_LINE_STIPPLE; + public static final int VK_LINE_RASTERIZATION_MODE_DEFAULT_KHR = VK_LINE_RASTERIZATION_MODE_DEFAULT; + public static final int VK_LINE_RASTERIZATION_MODE_RECTANGULAR_KHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR; + public static final int VK_LINE_RASTERIZATION_MODE_BRESENHAM_KHR = VK_LINE_RASTERIZATION_MODE_BRESENHAM; + public static final int VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH; + public static final MethodHandle MH_vkCmdSetLineStippleKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_SHORT)); + public final MemorySegment PFN_vkCmdSetLineStippleKHR; + + public VKKHRLineRasterization(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetLineStippleKHR = func.invoke(device, "vkCmdSetLineStippleKHR", "vkCmdSetLineStipple"); + } + + public void CmdSetLineStippleKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int lineStippleFactor, @CType("uint16_t") short lineStipplePattern) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetLineStippleKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetLineStippleKHR"); + try { MH_vkCmdSetLineStippleKHR.invokeExact(PFN_vkCmdSetLineStippleKHR, commandBuffer, lineStippleFactor, lineStipplePattern); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetLineStippleKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRLoadStoreOpNone.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRLoadStoreOpNone.java new file mode 100644 index 00000000..3ab1cf34 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRLoadStoreOpNone.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRLoadStoreOpNone { + public static final int VK_KHR_LOAD_STORE_OP_NONE_SPEC_VERSION = 1; + public static final String VK_KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME = "VK_KHR_load_store_op_none"; + public static final int VK_ATTACHMENT_LOAD_OP_NONE_KHR = VK_ATTACHMENT_LOAD_OP_NONE; + public static final int VK_ATTACHMENT_STORE_OP_NONE_KHR = VK_ATTACHMENT_STORE_OP_NONE; + + public VKKHRLoadStoreOpNone(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance1.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance1.java new file mode 100644 index 00000000..b0988e77 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance1.java @@ -0,0 +1,49 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +import static overrungl.vulkan.khr.VKKHRMaintenance1.*; +public class VKKHRMaintenance1 { + public static final int VK_KHR_MAINTENANCE_1_SPEC_VERSION = 2; + public static final String VK_KHR_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_maintenance1"; + public static final int VK_KHR_MAINTENANCE1_SPEC_VERSION = VK_KHR_MAINTENANCE_1_SPEC_VERSION; + public static final String VK_KHR_MAINTENANCE1_EXTENSION_NAME = VK_KHR_MAINTENANCE_1_EXTENSION_NAME; + public static final int VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY; + public static final int VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT; + public static final int VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT; + public static final int VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT; + public static final MethodHandle MH_vkTrimCommandPoolKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkTrimCommandPoolKHR; + + public VKKHRMaintenance1(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkTrimCommandPoolKHR = func.invoke(device, "vkTrimCommandPoolKHR", "vkTrimCommandPool"); + } + + public void TrimCommandPoolKHR(@CType("VkDevice") MemorySegment device, @CType("VkCommandPool") MemorySegment commandPool, @CType("VkCommandPoolTrimFlags") int flags) { + if (Unmarshal.isNullPointer(PFN_vkTrimCommandPoolKHR)) throw new SymbolNotFoundError("Symbol not found: vkTrimCommandPoolKHR"); + try { MH_vkTrimCommandPoolKHR.invokeExact(PFN_vkTrimCommandPoolKHR, device, commandPool, flags); } + catch (Throwable e) { throw new RuntimeException("error in vkTrimCommandPoolKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance2.java new file mode 100644 index 00000000..76983f3a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance2.java @@ -0,0 +1,48 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +import static overrungl.vulkan.khr.VKKHRMaintenance2.*; +public class VKKHRMaintenance2 { + public static final int VK_KHR_MAINTENANCE_2_SPEC_VERSION = 1; + public static final String VK_KHR_MAINTENANCE_2_EXTENSION_NAME = "VK_KHR_maintenance2"; + public static final int VK_KHR_MAINTENANCE2_SPEC_VERSION = VK_KHR_MAINTENANCE_2_SPEC_VERSION; + public static final String VK_KHR_MAINTENANCE2_EXTENSION_NAME = VK_KHR_MAINTENANCE_2_EXTENSION_NAME; + public static final int VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT; + public static final int VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO; + public static final int VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL; + public static final int VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL; + public static final int VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES; + public static final int VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY; + public static final int VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT; + public static final int VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT; + + public VKKHRMaintenance2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance3.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance3.java new file mode 100644 index 00000000..a5dfea36 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance3.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +import static overrungl.vulkan.khr.VKKHRMaintenance3.*; +public class VKKHRMaintenance3 { + public static final int VK_KHR_MAINTENANCE_3_SPEC_VERSION = 1; + public static final String VK_KHR_MAINTENANCE_3_EXTENSION_NAME = "VK_KHR_maintenance3"; + public static final int VK_KHR_MAINTENANCE3_SPEC_VERSION = VK_KHR_MAINTENANCE_3_SPEC_VERSION; + public static final String VK_KHR_MAINTENANCE3_EXTENSION_NAME = VK_KHR_MAINTENANCE_3_EXTENSION_NAME; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT; + public static final MethodHandle MH_vkGetDescriptorSetLayoutSupportKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetDescriptorSetLayoutSupportKHR; + + public VKKHRMaintenance3(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetDescriptorSetLayoutSupportKHR = func.invoke(device, "vkGetDescriptorSetLayoutSupportKHR", "vkGetDescriptorSetLayoutSupport"); + } + + public void GetDescriptorSetLayoutSupportKHR(@CType("VkDevice") MemorySegment device, @CType("const VkDescriptorSetLayoutCreateInfo *") MemorySegment pCreateInfo, @CType("VkDescriptorSetLayoutSupport *") MemorySegment pSupport) { + if (Unmarshal.isNullPointer(PFN_vkGetDescriptorSetLayoutSupportKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDescriptorSetLayoutSupportKHR"); + try { MH_vkGetDescriptorSetLayoutSupportKHR.invokeExact(PFN_vkGetDescriptorSetLayoutSupportKHR, device, pCreateInfo, pSupport); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDescriptorSetLayoutSupportKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance4.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance4.java new file mode 100644 index 00000000..83b4b32a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance4.java @@ -0,0 +1,65 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKKHRMaintenance4 { + public static final int VK_KHR_MAINTENANCE_4_SPEC_VERSION = 2; + public static final String VK_KHR_MAINTENANCE_4_EXTENSION_NAME = "VK_KHR_maintenance4"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS; + public static final int VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS; + public static final int VK_IMAGE_ASPECT_NONE_KHR = VK_IMAGE_ASPECT_NONE; + public static final MethodHandle MH_vkGetDeviceBufferMemoryRequirementsKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceImageMemoryRequirementsKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceImageSparseMemoryRequirementsKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetDeviceBufferMemoryRequirementsKHR; + public final MemorySegment PFN_vkGetDeviceImageMemoryRequirementsKHR; + public final MemorySegment PFN_vkGetDeviceImageSparseMemoryRequirementsKHR; + + public VKKHRMaintenance4(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetDeviceBufferMemoryRequirementsKHR = func.invoke(device, "vkGetDeviceBufferMemoryRequirementsKHR", "vkGetDeviceBufferMemoryRequirements"); + PFN_vkGetDeviceImageMemoryRequirementsKHR = func.invoke(device, "vkGetDeviceImageMemoryRequirementsKHR", "vkGetDeviceImageMemoryRequirements"); + PFN_vkGetDeviceImageSparseMemoryRequirementsKHR = func.invoke(device, "vkGetDeviceImageSparseMemoryRequirementsKHR", "vkGetDeviceImageSparseMemoryRequirements"); + } + + public void GetDeviceBufferMemoryRequirementsKHR(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceBufferMemoryRequirements *") MemorySegment pInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceBufferMemoryRequirementsKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceBufferMemoryRequirementsKHR"); + try { MH_vkGetDeviceBufferMemoryRequirementsKHR.invokeExact(PFN_vkGetDeviceBufferMemoryRequirementsKHR, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceBufferMemoryRequirementsKHR", e); } + } + + public void GetDeviceImageMemoryRequirementsKHR(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceImageMemoryRequirements *") MemorySegment pInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceImageMemoryRequirementsKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceImageMemoryRequirementsKHR"); + try { MH_vkGetDeviceImageMemoryRequirementsKHR.invokeExact(PFN_vkGetDeviceImageMemoryRequirementsKHR, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceImageMemoryRequirementsKHR", e); } + } + + public void GetDeviceImageSparseMemoryRequirementsKHR(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceImageMemoryRequirements *") MemorySegment pInfo, @CType("uint32_t *") MemorySegment pSparseMemoryRequirementCount, @CType("VkSparseImageMemoryRequirements2 *") MemorySegment pSparseMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceImageSparseMemoryRequirementsKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceImageSparseMemoryRequirementsKHR"); + try { MH_vkGetDeviceImageSparseMemoryRequirementsKHR.invokeExact(PFN_vkGetDeviceImageSparseMemoryRequirementsKHR, device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceImageSparseMemoryRequirementsKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance5.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance5.java new file mode 100644 index 00000000..fca13156 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance5.java @@ -0,0 +1,137 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +import static overrungl.vulkan.khr.VKKHRMaintenance5.*; +public class VKKHRMaintenance5 { + public static final int VK_KHR_MAINTENANCE_5_SPEC_VERSION = 1; + public static final String VK_KHR_MAINTENANCE_5_EXTENSION_NAME = "VK_KHR_maintenance5"; + public static final long VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV = 0x00000020L; + public static final long VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR = 0x00000040L; + public static final long VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080L; + public static final long VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400L; + public static final long VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000L; + public static final long VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR = 0x00000800L; + public static final long VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000L; + public static final long VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000L; + public static final long VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000L; + public static final long VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000L; + public static final long VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000L; + public static final long VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000L; + public static final long VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000L; + public static final long VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV = 0x00040000L; + public static final long VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000L; + public static final long VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000L; + public static final long VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000L; + public static final long VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000L; + public static final long VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000L; + public static final long VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000L; + public static final long VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000L; + public static final long VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000L; + public static final long VK_BUFFER_USAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200L; + public static final long VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400L; + public static final long VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800L; + public static final long VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000L; + public static final long VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000L; + public static final long VK_BUFFER_USAGE_2_VIDEO_DECODE_DST_BIT_KHR = 0x00004000L; + public static final long VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000L; + public static final long VK_BUFFER_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000L; + public static final long VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000L; + public static final long VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000L; + public static final long VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000L; + public static final long VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000L; + public static final long VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000L; + public static final long VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000L; + public static final long VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT = 0x01000000L; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_RENDERING_AREA_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_AREA_INFO; + public static final int VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO; + public static final int VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR = VK_FORMAT_A1B5G5R5_UNORM_PACK16; + public static final int VK_FORMAT_A8_UNORM_KHR = VK_FORMAT_A8_UNORM; + public static final int VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2; + public static final int VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2; + public static final long VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR = VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT; + public static final long VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR = VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT; + public static final long VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR = VK_PIPELINE_CREATE_2_DERIVATIVE_BIT; + public static final long VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT; + public static final long VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT_KHR = VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT; + public static final long VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR = VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT; + public static final long VK_BUFFER_USAGE_2_TRANSFER_DST_BIT_KHR = VK_BUFFER_USAGE_2_TRANSFER_DST_BIT; + public static final long VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT; + public static final long VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT; + public static final long VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR = VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT; + public static final long VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR = VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT; + public static final long VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT_KHR = VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT; + public static final long VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT_KHR = VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT; + public static final long VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR = VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT; + public static final int VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO; + public static final long VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR = VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT; + public static final long VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR = VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT; + public static final long VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT = VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT; + public static final long VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT = VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT; + public static final long VK_BUFFER_USAGE_2_RAY_TRACING_BIT_NV = VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR; + public static final long VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT_KHR = VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT; + public static final MethodHandle MH_vkCmdBindIndexBuffer2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkGetRenderingAreaGranularityKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceImageSubresourceLayoutKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageSubresourceLayout2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdBindIndexBuffer2KHR; + public final MemorySegment PFN_vkGetRenderingAreaGranularityKHR; + public final MemorySegment PFN_vkGetDeviceImageSubresourceLayoutKHR; + public final MemorySegment PFN_vkGetImageSubresourceLayout2KHR; + + public VKKHRMaintenance5(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdBindIndexBuffer2KHR = func.invoke(device, "vkCmdBindIndexBuffer2KHR", "vkCmdBindIndexBuffer2"); + PFN_vkGetRenderingAreaGranularityKHR = func.invoke(device, "vkGetRenderingAreaGranularityKHR", "vkGetRenderingAreaGranularity"); + PFN_vkGetDeviceImageSubresourceLayoutKHR = func.invoke(device, "vkGetDeviceImageSubresourceLayoutKHR", "vkGetDeviceImageSubresourceLayout"); + PFN_vkGetImageSubresourceLayout2KHR = func.invoke(device, "vkGetImageSubresourceLayout2KHR", "vkGetImageSubresourceLayout2"); + } + + public void CmdBindIndexBuffer2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkDeviceSize") long size, @CType("VkIndexType") int indexType) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindIndexBuffer2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindIndexBuffer2KHR"); + try { MH_vkCmdBindIndexBuffer2KHR.invokeExact(PFN_vkCmdBindIndexBuffer2KHR, commandBuffer, buffer, offset, size, indexType); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindIndexBuffer2KHR", e); } + } + + public void GetRenderingAreaGranularityKHR(@CType("VkDevice") MemorySegment device, @CType("const VkRenderingAreaInfo *") MemorySegment pRenderingAreaInfo, @CType("VkExtent2D *") MemorySegment pGranularity) { + if (Unmarshal.isNullPointer(PFN_vkGetRenderingAreaGranularityKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetRenderingAreaGranularityKHR"); + try { MH_vkGetRenderingAreaGranularityKHR.invokeExact(PFN_vkGetRenderingAreaGranularityKHR, device, pRenderingAreaInfo, pGranularity); } + catch (Throwable e) { throw new RuntimeException("error in vkGetRenderingAreaGranularityKHR", e); } + } + + public void GetDeviceImageSubresourceLayoutKHR(@CType("VkDevice") MemorySegment device, @CType("const VkDeviceImageSubresourceInfo *") MemorySegment pInfo, @CType("VkSubresourceLayout2 *") MemorySegment pLayout) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceImageSubresourceLayoutKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceImageSubresourceLayoutKHR"); + try { MH_vkGetDeviceImageSubresourceLayoutKHR.invokeExact(PFN_vkGetDeviceImageSubresourceLayoutKHR, device, pInfo, pLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceImageSubresourceLayoutKHR", e); } + } + + public void GetImageSubresourceLayout2KHR(@CType("VkDevice") MemorySegment device, @CType("VkImage") MemorySegment image, @CType("const VkImageSubresource2 *") MemorySegment pSubresource, @CType("VkSubresourceLayout2 *") MemorySegment pLayout) { + if (Unmarshal.isNullPointer(PFN_vkGetImageSubresourceLayout2KHR)) throw new SymbolNotFoundError("Symbol not found: vkGetImageSubresourceLayout2KHR"); + try { MH_vkGetImageSubresourceLayout2KHR.invokeExact(PFN_vkGetImageSubresourceLayout2KHR, device, image, pSubresource, pLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageSubresourceLayout2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance6.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance6.java new file mode 100644 index 00000000..7c2e3a4d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance6.java @@ -0,0 +1,96 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRMaintenance6 { + public static final int VK_KHR_MAINTENANCE_6_SPEC_VERSION = 1; + public static final String VK_KHR_MAINTENANCE_6_EXTENSION_NAME = "VK_KHR_maintenance6"; + public static final int VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT = 1000545007; + public static final int VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT = 1000545008; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR = VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS; + public static final int VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR = VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO; + public static final int VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO; + public static final int VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO; + public static final int VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO; + public static final MethodHandle MH_vkCmdBindDescriptorSets2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPushConstants2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPushDescriptorSet2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPushDescriptorSetWithTemplate2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetDescriptorBufferOffsets2EXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdBindDescriptorSets2KHR; + public final MemorySegment PFN_vkCmdPushConstants2KHR; + public final MemorySegment PFN_vkCmdPushDescriptorSet2KHR; + public final MemorySegment PFN_vkCmdPushDescriptorSetWithTemplate2KHR; + public final MemorySegment PFN_vkCmdSetDescriptorBufferOffsets2EXT; + public final MemorySegment PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT; + + public VKKHRMaintenance6(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdBindDescriptorSets2KHR = func.invoke(device, "vkCmdBindDescriptorSets2KHR", "vkCmdBindDescriptorSets2"); + PFN_vkCmdPushConstants2KHR = func.invoke(device, "vkCmdPushConstants2KHR", "vkCmdPushConstants2"); + PFN_vkCmdPushDescriptorSet2KHR = func.invoke(device, "vkCmdPushDescriptorSet2KHR", "vkCmdPushDescriptorSet2"); + PFN_vkCmdPushDescriptorSetWithTemplate2KHR = func.invoke(device, "vkCmdPushDescriptorSetWithTemplate2KHR", "vkCmdPushDescriptorSetWithTemplate2"); + PFN_vkCmdSetDescriptorBufferOffsets2EXT = func.invoke(device, "vkCmdSetDescriptorBufferOffsets2EXT"); + PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = func.invoke(device, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT"); + } + + public void CmdBindDescriptorSets2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkBindDescriptorSetsInfo *") MemorySegment pBindDescriptorSetsInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindDescriptorSets2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindDescriptorSets2KHR"); + try { MH_vkCmdBindDescriptorSets2KHR.invokeExact(PFN_vkCmdBindDescriptorSets2KHR, commandBuffer, pBindDescriptorSetsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindDescriptorSets2KHR", e); } + } + + public void CmdPushConstants2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkPushConstantsInfo *") MemorySegment pPushConstantsInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushConstants2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushConstants2KHR"); + try { MH_vkCmdPushConstants2KHR.invokeExact(PFN_vkCmdPushConstants2KHR, commandBuffer, pPushConstantsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushConstants2KHR", e); } + } + + public void CmdPushDescriptorSet2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkPushDescriptorSetInfo *") MemorySegment pPushDescriptorSetInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushDescriptorSet2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushDescriptorSet2KHR"); + try { MH_vkCmdPushDescriptorSet2KHR.invokeExact(PFN_vkCmdPushDescriptorSet2KHR, commandBuffer, pPushDescriptorSetInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushDescriptorSet2KHR", e); } + } + + public void CmdPushDescriptorSetWithTemplate2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkPushDescriptorSetWithTemplateInfo *") MemorySegment pPushDescriptorSetWithTemplateInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushDescriptorSetWithTemplate2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushDescriptorSetWithTemplate2KHR"); + try { MH_vkCmdPushDescriptorSetWithTemplate2KHR.invokeExact(PFN_vkCmdPushDescriptorSetWithTemplate2KHR, commandBuffer, pPushDescriptorSetWithTemplateInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushDescriptorSetWithTemplate2KHR", e); } + } + + public void CmdSetDescriptorBufferOffsets2EXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkSetDescriptorBufferOffsetsInfoEXT *") MemorySegment pSetDescriptorBufferOffsetsInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetDescriptorBufferOffsets2EXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetDescriptorBufferOffsets2EXT"); + try { MH_vkCmdSetDescriptorBufferOffsets2EXT.invokeExact(PFN_vkCmdSetDescriptorBufferOffsets2EXT, commandBuffer, pSetDescriptorBufferOffsetsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetDescriptorBufferOffsets2EXT", e); } + } + + public void CmdBindDescriptorBufferEmbeddedSamplers2EXT(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkBindDescriptorBufferEmbeddedSamplersInfoEXT *") MemorySegment pBindDescriptorBufferEmbeddedSamplersInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindDescriptorBufferEmbeddedSamplers2EXT"); + try { MH_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT.invokeExact(PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT, commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindDescriptorBufferEmbeddedSamplers2EXT", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance7.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance7.java new file mode 100644 index 00000000..6a503efe --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMaintenance7.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRMaintenance7 { + public static final int VK_PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR = 0; + public static final int VK_PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR = 1; + public static final int VK_PHYSICAL_DEVICE_LAYERED_API_METAL_KHR = 2; + public static final int VK_PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR = 3; + public static final int VK_PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR = 4; + public static final int VK_KHR_MAINTENANCE_7_SPEC_VERSION = 1; + public static final String VK_KHR_MAINTENANCE_7_EXTENSION_NAME = "VK_KHR_maintenance7"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR = 1000562000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR = 1000562001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR = 1000562002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR = 1000562003; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR = 1000562004; + public static final int VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR = 1000562000; + public static final int VK_RENDERING_CONTENTS_INLINE_BIT_KHR = 0x00000010; + + public VKKHRMaintenance7(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMapMemory2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMapMemory2.java new file mode 100644 index 00000000..fe43a3fa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMapMemory2.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRMapMemory2 { + public static final int VK_KHR_MAP_MEMORY_2_SPEC_VERSION = 1; + public static final String VK_KHR_MAP_MEMORY_2_EXTENSION_NAME = "VK_KHR_map_memory2"; + public static final int VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_MAP_INFO; + public static final int VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO; + public static final MethodHandle MH_vkMapMemory2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkUnmapMemory2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkMapMemory2KHR; + public final MemorySegment PFN_vkUnmapMemory2KHR; + + public VKKHRMapMemory2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkMapMemory2KHR = func.invoke(device, "vkMapMemory2KHR", "vkMapMemory2"); + PFN_vkUnmapMemory2KHR = func.invoke(device, "vkUnmapMemory2KHR", "vkUnmapMemory2"); + } + + public @CType("VkResult") int MapMemory2KHR(@CType("VkDevice") MemorySegment device, @CType("const VkMemoryMapInfo *") MemorySegment pMemoryMapInfo, @CType("void **") MemorySegment ppData) { + if (Unmarshal.isNullPointer(PFN_vkMapMemory2KHR)) throw new SymbolNotFoundError("Symbol not found: vkMapMemory2KHR"); + try { return (int) MH_vkMapMemory2KHR.invokeExact(PFN_vkMapMemory2KHR, device, pMemoryMapInfo, ppData); } + catch (Throwable e) { throw new RuntimeException("error in vkMapMemory2KHR", e); } + } + + public @CType("VkResult") int UnmapMemory2KHR(@CType("VkDevice") MemorySegment device, @CType("const VkMemoryUnmapInfo *") MemorySegment pMemoryUnmapInfo) { + if (Unmarshal.isNullPointer(PFN_vkUnmapMemory2KHR)) throw new SymbolNotFoundError("Symbol not found: vkUnmapMemory2KHR"); + try { return (int) MH_vkUnmapMemory2KHR.invokeExact(PFN_vkUnmapMemory2KHR, device, pMemoryUnmapInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkUnmapMemory2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMultiview.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMultiview.java new file mode 100644 index 00000000..6dccbc42 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRMultiview.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +public class VKKHRMultiview { + public static final int VK_KHR_MULTIVIEW_SPEC_VERSION = 1; + public static final String VK_KHR_MULTIVIEW_EXTENSION_NAME = "VK_KHR_multiview"; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES; + public static final int VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR = VK_DEPENDENCY_VIEW_LOCAL_BIT; + + public VKKHRMultiview(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPerformanceQuery.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPerformanceQuery.java new file mode 100644 index 00000000..166ced33 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPerformanceQuery.java @@ -0,0 +1,104 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRPerformanceQuery { + public static final int VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR = 0x00000001; + public static final int VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR = 0x00000002; + public static final int VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = 0; + public static final int VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = 1; + public static final int VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = 2; + public static final int VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR = 0; + public static final int VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR = 1; + public static final int VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR = 2; + public static final int VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR = 3; + public static final int VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR = 4; + public static final int VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR = 5; + public static final int VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR = 0; + public static final int VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR = 1; + public static final int VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR = 2; + public static final int VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR = 3; + public static final int VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR = 4; + public static final int VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR = 5; + public static final int VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR = 6; + public static final int VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR = 7; + public static final int VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR = 8; + public static final int VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR = 9; + public static final int VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR = 10; + public static final int VK_KHR_PERFORMANCE_QUERY_SPEC_VERSION = 1; + public static final String VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_KHR_performance_query"; + public static final int VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR = 1000116000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR = 1000116000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR = 1000116001; + public static final int VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR = 1000116002; + public static final int VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR = 1000116003; + public static final int VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR = 1000116004; + public static final int VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR = 1000116005; + public static final int VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR = 1000116006; + public static final int VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_RESERVATION_INFO_KHR = 1000116007; + public static final int VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR; + public static final int VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR; + public static final int VK_QUERY_SCOPE_COMMAND_BUFFER_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR; + public static final int VK_QUERY_SCOPE_RENDER_PASS_KHR = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR; + public static final int VK_QUERY_SCOPE_COMMAND_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR; + public static final MethodHandle MH_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkAcquireProfilingLockKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkReleaseProfilingLockKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR; + public final MemorySegment PFN_vkAcquireProfilingLockKHR; + public final MemorySegment PFN_vkReleaseProfilingLockKHR; + + public VKKHRPerformanceQuery(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = func.invoke(device, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR"); + PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = func.invoke(device, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR"); + PFN_vkAcquireProfilingLockKHR = func.invoke(device, "vkAcquireProfilingLockKHR"); + PFN_vkReleaseProfilingLockKHR = func.invoke(device, "vkReleaseProfilingLockKHR"); + } + + public @CType("VkResult") int EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t") int queueFamilyIndex, @CType("uint32_t *") MemorySegment pCounterCount, @CType("VkPerformanceCounterKHR *") MemorySegment pCounters, @CType("VkPerformanceCounterDescriptionKHR *") MemorySegment pCounterDescriptions) { + if (Unmarshal.isNullPointer(PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR)) throw new SymbolNotFoundError("Symbol not found: vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR"); + try { return (int) MH_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR.invokeExact(PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR, physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions); } + catch (Throwable e) { throw new RuntimeException("error in vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR", e); } + } + + public void GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkQueryPoolPerformanceCreateInfoKHR *") MemorySegment pPerformanceQueryCreateInfo, @CType("uint32_t *") MemorySegment pNumPasses) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR"); + try { MH_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR.invokeExact(PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR, physicalDevice, pPerformanceQueryCreateInfo, pNumPasses); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR", e); } + } + + public @CType("VkResult") int AcquireProfilingLockKHR(@CType("VkDevice") MemorySegment device, @CType("const VkAcquireProfilingLockInfoKHR *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkAcquireProfilingLockKHR)) throw new SymbolNotFoundError("Symbol not found: vkAcquireProfilingLockKHR"); + try { return (int) MH_vkAcquireProfilingLockKHR.invokeExact(PFN_vkAcquireProfilingLockKHR, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkAcquireProfilingLockKHR", e); } + } + + public void ReleaseProfilingLockKHR(@CType("VkDevice") MemorySegment device) { + if (Unmarshal.isNullPointer(PFN_vkReleaseProfilingLockKHR)) throw new SymbolNotFoundError("Symbol not found: vkReleaseProfilingLockKHR"); + try { MH_vkReleaseProfilingLockKHR.invokeExact(PFN_vkReleaseProfilingLockKHR, device); } + catch (Throwable e) { throw new RuntimeException("error in vkReleaseProfilingLockKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPipelineBinary.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPipelineBinary.java new file mode 100644 index 00000000..3aa17aa8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPipelineBinary.java @@ -0,0 +1,92 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRPipelineBinary { + public static final int VK_KHR_PIPELINE_BINARY_SPEC_VERSION = 1; + public static final String VK_KHR_PIPELINE_BINARY_EXTENSION_NAME = "VK_KHR_pipeline_binary"; + public static final int VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR = 32; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR = 1000483000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_BINARY_CREATE_INFO_KHR = 1000483001; + public static final int VK_STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR = 1000483002; + public static final int VK_STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR = 1000483003; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR = 1000483004; + public static final int VK_STRUCTURE_TYPE_RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR = 1000483005; + public static final int VK_STRUCTURE_TYPE_PIPELINE_BINARY_DATA_INFO_KHR = 1000483006; + public static final int VK_STRUCTURE_TYPE_PIPELINE_CREATE_INFO_KHR = 1000483007; + public static final int VK_STRUCTURE_TYPE_DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR = 1000483008; + public static final int VK_STRUCTURE_TYPE_PIPELINE_BINARY_HANDLES_INFO_KHR = 1000483009; + public static final int VK_OBJECT_TYPE_PIPELINE_BINARY_KHR = 1000483000; + public static final int VK_PIPELINE_BINARY_MISSING_KHR = 1000483000; + public static final int VK_ERROR_NOT_ENOUGH_SPACE_KHR = -1000483000; + public static final long VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR = 0x80000000L; + public static final MethodHandle MH_vkCreatePipelineBinariesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyPipelineBinaryKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPipelineKeyKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPipelineBinaryDataKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkReleaseCapturedPipelineDataKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreatePipelineBinariesKHR; + public final MemorySegment PFN_vkDestroyPipelineBinaryKHR; + public final MemorySegment PFN_vkGetPipelineKeyKHR; + public final MemorySegment PFN_vkGetPipelineBinaryDataKHR; + public final MemorySegment PFN_vkReleaseCapturedPipelineDataKHR; + + public VKKHRPipelineBinary(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreatePipelineBinariesKHR = func.invoke(device, "vkCreatePipelineBinariesKHR"); + PFN_vkDestroyPipelineBinaryKHR = func.invoke(device, "vkDestroyPipelineBinaryKHR"); + PFN_vkGetPipelineKeyKHR = func.invoke(device, "vkGetPipelineKeyKHR"); + PFN_vkGetPipelineBinaryDataKHR = func.invoke(device, "vkGetPipelineBinaryDataKHR"); + PFN_vkReleaseCapturedPipelineDataKHR = func.invoke(device, "vkReleaseCapturedPipelineDataKHR"); + } + + public @CType("VkResult") int CreatePipelineBinariesKHR(@CType("VkDevice") MemorySegment device, @CType("const VkPipelineBinaryCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkPipelineBinaryHandlesInfoKHR *") MemorySegment pBinaries) { + if (Unmarshal.isNullPointer(PFN_vkCreatePipelineBinariesKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreatePipelineBinariesKHR"); + try { return (int) MH_vkCreatePipelineBinariesKHR.invokeExact(PFN_vkCreatePipelineBinariesKHR, device, pCreateInfo, pAllocator, pBinaries); } + catch (Throwable e) { throw new RuntimeException("error in vkCreatePipelineBinariesKHR", e); } + } + + public void DestroyPipelineBinaryKHR(@CType("VkDevice") MemorySegment device, @CType("VkPipelineBinaryKHR") MemorySegment pipelineBinary, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyPipelineBinaryKHR)) throw new SymbolNotFoundError("Symbol not found: vkDestroyPipelineBinaryKHR"); + try { MH_vkDestroyPipelineBinaryKHR.invokeExact(PFN_vkDestroyPipelineBinaryKHR, device, pipelineBinary, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyPipelineBinaryKHR", e); } + } + + public @CType("VkResult") int GetPipelineKeyKHR(@CType("VkDevice") MemorySegment device, @CType("const VkPipelineCreateInfoKHR *") MemorySegment pPipelineCreateInfo, @CType("VkPipelineBinaryKeyKHR *") MemorySegment pPipelineKey) { + if (Unmarshal.isNullPointer(PFN_vkGetPipelineKeyKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPipelineKeyKHR"); + try { return (int) MH_vkGetPipelineKeyKHR.invokeExact(PFN_vkGetPipelineKeyKHR, device, pPipelineCreateInfo, pPipelineKey); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPipelineKeyKHR", e); } + } + + public @CType("VkResult") int GetPipelineBinaryDataKHR(@CType("VkDevice") MemorySegment device, @CType("const VkPipelineBinaryDataInfoKHR *") MemorySegment pInfo, @CType("VkPipelineBinaryKeyKHR *") MemorySegment pPipelineBinaryKey, @CType("size_t *") MemorySegment pPipelineBinaryDataSize, @CType("void *") MemorySegment pPipelineBinaryData) { + if (Unmarshal.isNullPointer(PFN_vkGetPipelineBinaryDataKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPipelineBinaryDataKHR"); + try { return (int) MH_vkGetPipelineBinaryDataKHR.invokeExact(PFN_vkGetPipelineBinaryDataKHR, device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, pPipelineBinaryData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPipelineBinaryDataKHR", e); } + } + + public @CType("VkResult") int ReleaseCapturedPipelineDataKHR(@CType("VkDevice") MemorySegment device, @CType("const VkReleaseCapturedPipelineDataInfoKHR *") MemorySegment pInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkReleaseCapturedPipelineDataKHR)) throw new SymbolNotFoundError("Symbol not found: vkReleaseCapturedPipelineDataKHR"); + try { return (int) MH_vkReleaseCapturedPipelineDataKHR.invokeExact(PFN_vkReleaseCapturedPipelineDataKHR, device, pInfo, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkReleaseCapturedPipelineDataKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPipelineExecutableProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPipelineExecutableProperties.java new file mode 100644 index 00000000..26b544e5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPipelineExecutableProperties.java @@ -0,0 +1,71 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRPipelineExecutableProperties { + public static final int VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR = 0; + public static final int VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR = 1; + public static final int VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR = 2; + public static final int VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR = 3; + public static final int VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_SPEC_VERSION = 1; + public static final String VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME = "VK_KHR_pipeline_executable_properties"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR = 1000269001; + public static final int VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR = 1000269002; + public static final int VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR = 1000269003; + public static final int VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004; + public static final int VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005; + public static final int VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR = 0x00000040; + public static final int VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080; + public static final MethodHandle MH_vkGetPipelineExecutablePropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPipelineExecutableStatisticsKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPipelineExecutableInternalRepresentationsKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPipelineExecutablePropertiesKHR; + public final MemorySegment PFN_vkGetPipelineExecutableStatisticsKHR; + public final MemorySegment PFN_vkGetPipelineExecutableInternalRepresentationsKHR; + + public VKKHRPipelineExecutableProperties(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPipelineExecutablePropertiesKHR = func.invoke(device, "vkGetPipelineExecutablePropertiesKHR"); + PFN_vkGetPipelineExecutableStatisticsKHR = func.invoke(device, "vkGetPipelineExecutableStatisticsKHR"); + PFN_vkGetPipelineExecutableInternalRepresentationsKHR = func.invoke(device, "vkGetPipelineExecutableInternalRepresentationsKHR"); + } + + public @CType("VkResult") int GetPipelineExecutablePropertiesKHR(@CType("VkDevice") MemorySegment device, @CType("const VkPipelineInfoKHR *") MemorySegment pPipelineInfo, @CType("uint32_t *") MemorySegment pExecutableCount, @CType("VkPipelineExecutablePropertiesKHR *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPipelineExecutablePropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPipelineExecutablePropertiesKHR"); + try { return (int) MH_vkGetPipelineExecutablePropertiesKHR.invokeExact(PFN_vkGetPipelineExecutablePropertiesKHR, device, pPipelineInfo, pExecutableCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPipelineExecutablePropertiesKHR", e); } + } + + public @CType("VkResult") int GetPipelineExecutableStatisticsKHR(@CType("VkDevice") MemorySegment device, @CType("const VkPipelineExecutableInfoKHR *") MemorySegment pExecutableInfo, @CType("uint32_t *") MemorySegment pStatisticCount, @CType("VkPipelineExecutableStatisticKHR *") MemorySegment pStatistics) { + if (Unmarshal.isNullPointer(PFN_vkGetPipelineExecutableStatisticsKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPipelineExecutableStatisticsKHR"); + try { return (int) MH_vkGetPipelineExecutableStatisticsKHR.invokeExact(PFN_vkGetPipelineExecutableStatisticsKHR, device, pExecutableInfo, pStatisticCount, pStatistics); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPipelineExecutableStatisticsKHR", e); } + } + + public @CType("VkResult") int GetPipelineExecutableInternalRepresentationsKHR(@CType("VkDevice") MemorySegment device, @CType("const VkPipelineExecutableInfoKHR *") MemorySegment pExecutableInfo, @CType("uint32_t *") MemorySegment pInternalRepresentationCount, @CType("VkPipelineExecutableInternalRepresentationKHR *") MemorySegment pInternalRepresentations) { + if (Unmarshal.isNullPointer(PFN_vkGetPipelineExecutableInternalRepresentationsKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPipelineExecutableInternalRepresentationsKHR"); + try { return (int) MH_vkGetPipelineExecutableInternalRepresentationsKHR.invokeExact(PFN_vkGetPipelineExecutableInternalRepresentationsKHR, device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPipelineExecutableInternalRepresentationsKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPipelineLibrary.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPipelineLibrary.java new file mode 100644 index 00000000..ca94b8e0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPipelineLibrary.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRPipelineLibrary { + public static final int VK_KHR_PIPELINE_LIBRARY_SPEC_VERSION = 1; + public static final String VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME = "VK_KHR_pipeline_library"; + public static final int VK_PIPELINE_CREATE_LIBRARY_BIT_KHR = 0x00000800; + public static final int VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR = 1000290000; + + public VKKHRPipelineLibrary(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPortabilityEnumeration.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPortabilityEnumeration.java new file mode 100644 index 00000000..ee07aadd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPortabilityEnumeration.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRPortabilityEnumeration { + public static final int VK_KHR_PORTABILITY_ENUMERATION_SPEC_VERSION = 1; + public static final String VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME = "VK_KHR_portability_enumeration"; + public static final int VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR = 0x00000001; + + public VKKHRPortabilityEnumeration(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPortabilitySubset.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPortabilitySubset.java new file mode 100644 index 00000000..e313db8b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPortabilitySubset.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRPortabilitySubset { + public static final int VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION = 1; + public static final String VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME = "VK_KHR_portability_subset"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR = 1000163000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR = 1000163001; + + public VKKHRPortabilitySubset(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPresentId.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPresentId.java new file mode 100644 index 00000000..ccf45bed --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPresentId.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRPresentId { + public static final int VK_KHR_PRESENT_ID_SPEC_VERSION = 1; + public static final String VK_KHR_PRESENT_ID_EXTENSION_NAME = "VK_KHR_present_id"; + public static final int VK_STRUCTURE_TYPE_PRESENT_ID_KHR = 1000294000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR = 1000294001; + + public VKKHRPresentId(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPresentWait.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPresentWait.java new file mode 100644 index 00000000..84c05a83 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPresentWait.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRPresentWait { + public static final int VK_KHR_PRESENT_WAIT_SPEC_VERSION = 1; + public static final String VK_KHR_PRESENT_WAIT_EXTENSION_NAME = "VK_KHR_present_wait"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR = 1000248000; + public static final MethodHandle MH_vkWaitForPresentKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG)); + public final MemorySegment PFN_vkWaitForPresentKHR; + + public VKKHRPresentWait(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkWaitForPresentKHR = func.invoke(device, "vkWaitForPresentKHR"); + } + + public @CType("VkResult") int WaitForPresentKHR(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("uint64_t") long presentId, @CType("uint64_t") long timeout) { + if (Unmarshal.isNullPointer(PFN_vkWaitForPresentKHR)) throw new SymbolNotFoundError("Symbol not found: vkWaitForPresentKHR"); + try { return (int) MH_vkWaitForPresentKHR.invokeExact(PFN_vkWaitForPresentKHR, device, swapchain, presentId, timeout); } + catch (Throwable e) { throw new RuntimeException("error in vkWaitForPresentKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPushDescriptor.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPushDescriptor.java new file mode 100644 index 00000000..0bc209ec --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRPushDescriptor.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRPushDescriptor { + public static final int VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION = 2; + public static final String VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME = "VK_KHR_push_descriptor"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES; + public static final int VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT; + public static final int VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS; + public static final MethodHandle MH_vkCmdPushDescriptorSetKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPushDescriptorSetWithTemplateKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdPushDescriptorSetKHR; + public final MemorySegment PFN_vkCmdPushDescriptorSetWithTemplateKHR; + + public VKKHRPushDescriptor(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdPushDescriptorSetKHR = func.invoke(device, "vkCmdPushDescriptorSetKHR", "vkCmdPushDescriptorSet"); + PFN_vkCmdPushDescriptorSetWithTemplateKHR = func.invoke(device, "vkCmdPushDescriptorSetWithTemplateKHR", "vkCmdPushDescriptorSetWithTemplate"); + } + + public void CmdPushDescriptorSetKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineBindPoint") int pipelineBindPoint, @CType("VkPipelineLayout") MemorySegment layout, @CType("uint32_t") int set, @CType("uint32_t") int descriptorWriteCount, @CType("const VkWriteDescriptorSet *") MemorySegment pDescriptorWrites) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushDescriptorSetKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushDescriptorSetKHR"); + try { MH_vkCmdPushDescriptorSetKHR.invokeExact(PFN_vkCmdPushDescriptorSetKHR, commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushDescriptorSetKHR", e); } + } + + public void CmdPushDescriptorSetWithTemplateKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDescriptorUpdateTemplate") MemorySegment descriptorUpdateTemplate, @CType("VkPipelineLayout") MemorySegment layout, @CType("uint32_t") int set, @CType("const void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkCmdPushDescriptorSetWithTemplateKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdPushDescriptorSetWithTemplateKHR"); + try { MH_vkCmdPushDescriptorSetWithTemplateKHR.invokeExact(PFN_vkCmdPushDescriptorSetWithTemplateKHR, commandBuffer, descriptorUpdateTemplate, layout, set, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPushDescriptorSetWithTemplateKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayQuery.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayQuery.java new file mode 100644 index 00000000..949f264e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayQuery.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRRayQuery { + public static final int VK_KHR_RAY_QUERY_SPEC_VERSION = 1; + public static final String VK_KHR_RAY_QUERY_EXTENSION_NAME = "VK_KHR_ray_query"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR = 1000348013; + + public VKKHRRayQuery(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayTracingMaintenance1.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayTracingMaintenance1.java new file mode 100644 index 00000000..db0b0eb8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayTracingMaintenance1.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRRayTracingMaintenance1 { + public static final int VK_KHR_RAY_TRACING_MAINTENANCE_1_SPEC_VERSION = 1; + public static final String VK_KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_ray_tracing_maintenance1"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR = 1000386000; + public static final int VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR = 1000386000; + public static final int VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR = 1000386001; + public static final long VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR = 0x10000000L; + public static final long VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR = 0x10000000000L; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT = 1000386004; + public static final MethodHandle MH_vkCmdTraceRaysIndirect2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public final MemorySegment PFN_vkCmdTraceRaysIndirect2KHR; + + public VKKHRRayTracingMaintenance1(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdTraceRaysIndirect2KHR = func.invoke(device, "vkCmdTraceRaysIndirect2KHR"); + } + + public void CmdTraceRaysIndirect2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDeviceAddress") long indirectDeviceAddress) { + if (Unmarshal.isNullPointer(PFN_vkCmdTraceRaysIndirect2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdTraceRaysIndirect2KHR"); + try { MH_vkCmdTraceRaysIndirect2KHR.invokeExact(PFN_vkCmdTraceRaysIndirect2KHR, commandBuffer, indirectDeviceAddress); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdTraceRaysIndirect2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayTracingPipeline.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayTracingPipeline.java new file mode 100644 index 00000000..6a36d2af --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayTracingPipeline.java @@ -0,0 +1,125 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRRayTracingPipeline { + public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR = 0; + public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR = 1; + public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR = 2; + public static final int VK_SHADER_GROUP_SHADER_GENERAL_KHR = 0; + public static final int VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR = 1; + public static final int VK_SHADER_GROUP_SHADER_ANY_HIT_KHR = 2; + public static final int VK_SHADER_GROUP_SHADER_INTERSECTION_KHR = 3; + public static final int VK_KHR_RAY_TRACING_PIPELINE_SPEC_VERSION = 1; + public static final String VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline"; + public static final int VK_SHADER_UNUSED_KHR = (~0); + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR = 1000347000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR = 1000347001; + public static final int VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR = 1000347015; + public static final int VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR = 1000347016; + public static final int VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR = 1000347018; + public static final int VK_SHADER_STAGE_RAYGEN_BIT_KHR = 0x00000100; + public static final int VK_SHADER_STAGE_ANY_HIT_BIT_KHR = 0x00000200; + public static final int VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR = 0x00000400; + public static final int VK_SHADER_STAGE_MISS_BIT_KHR = 0x00000800; + public static final int VK_SHADER_STAGE_INTERSECTION_BIT_KHR = 0x00001000; + public static final int VK_SHADER_STAGE_CALLABLE_BIT_KHR = 0x00002000; + public static final int VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR = 0x00200000; + public static final int VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400; + public static final int VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR = 1000347000; + public static final int VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000; + public static final int VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000; + public static final int VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000; + public static final int VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000; + public static final int VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000; + public static final int VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000; + public static final int VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000; + public static final int VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR = 1000347000; + public static final MethodHandle MH_vkCmdTraceRaysKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCreateRayTracingPipelinesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetRayTracingShaderGroupHandlesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdTraceRaysIndirectKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkGetRayTracingShaderGroupStackSizeKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetRayTracingPipelineStackSizeKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdTraceRaysKHR; + public final MemorySegment PFN_vkCreateRayTracingPipelinesKHR; + public final MemorySegment PFN_vkGetRayTracingShaderGroupHandlesKHR; + public final MemorySegment PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR; + public final MemorySegment PFN_vkCmdTraceRaysIndirectKHR; + public final MemorySegment PFN_vkGetRayTracingShaderGroupStackSizeKHR; + public final MemorySegment PFN_vkCmdSetRayTracingPipelineStackSizeKHR; + + public VKKHRRayTracingPipeline(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdTraceRaysKHR = func.invoke(device, "vkCmdTraceRaysKHR"); + PFN_vkCreateRayTracingPipelinesKHR = func.invoke(device, "vkCreateRayTracingPipelinesKHR"); + PFN_vkGetRayTracingShaderGroupHandlesKHR = func.invoke(device, "vkGetRayTracingShaderGroupHandlesKHR", "vkGetRayTracingShaderGroupHandlesNV"); + PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = func.invoke(device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR"); + PFN_vkCmdTraceRaysIndirectKHR = func.invoke(device, "vkCmdTraceRaysIndirectKHR"); + PFN_vkGetRayTracingShaderGroupStackSizeKHR = func.invoke(device, "vkGetRayTracingShaderGroupStackSizeKHR"); + PFN_vkCmdSetRayTracingPipelineStackSizeKHR = func.invoke(device, "vkCmdSetRayTracingPipelineStackSizeKHR"); + } + + public void CmdTraceRaysKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkStridedDeviceAddressRegionKHR *") MemorySegment pRaygenShaderBindingTable, @CType("const VkStridedDeviceAddressRegionKHR *") MemorySegment pMissShaderBindingTable, @CType("const VkStridedDeviceAddressRegionKHR *") MemorySegment pHitShaderBindingTable, @CType("const VkStridedDeviceAddressRegionKHR *") MemorySegment pCallableShaderBindingTable, @CType("uint32_t") int width, @CType("uint32_t") int height, @CType("uint32_t") int depth) { + if (Unmarshal.isNullPointer(PFN_vkCmdTraceRaysKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdTraceRaysKHR"); + try { MH_vkCmdTraceRaysKHR.invokeExact(PFN_vkCmdTraceRaysKHR, commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdTraceRaysKHR", e); } + } + + public @CType("VkResult") int CreateRayTracingPipelinesKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeferredOperationKHR") MemorySegment deferredOperation, @CType("VkPipelineCache") MemorySegment pipelineCache, @CType("uint32_t") int createInfoCount, @CType("const VkRayTracingPipelineCreateInfoKHR *") MemorySegment pCreateInfos, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkPipeline *") MemorySegment pPipelines) { + if (Unmarshal.isNullPointer(PFN_vkCreateRayTracingPipelinesKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateRayTracingPipelinesKHR"); + try { return (int) MH_vkCreateRayTracingPipelinesKHR.invokeExact(PFN_vkCreateRayTracingPipelinesKHR, device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateRayTracingPipelinesKHR", e); } + } + + public @CType("VkResult") int GetRayTracingShaderGroupHandlesKHR(@CType("VkDevice") MemorySegment device, @CType("VkPipeline") MemorySegment pipeline, @CType("uint32_t") int firstGroup, @CType("uint32_t") int groupCount, @CType("size_t") long dataSize, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetRayTracingShaderGroupHandlesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetRayTracingShaderGroupHandlesKHR"); + try { return (int) MH_vkGetRayTracingShaderGroupHandlesKHR.invokeExact(PFN_vkGetRayTracingShaderGroupHandlesKHR, device, pipeline, firstGroup, groupCount, dataSize, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetRayTracingShaderGroupHandlesKHR", e); } + } + + public @CType("VkResult") int GetRayTracingCaptureReplayShaderGroupHandlesKHR(@CType("VkDevice") MemorySegment device, @CType("VkPipeline") MemorySegment pipeline, @CType("uint32_t") int firstGroup, @CType("uint32_t") int groupCount, @CType("size_t") long dataSize, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetRayTracingCaptureReplayShaderGroupHandlesKHR"); + try { return (int) MH_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.invokeExact(PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR, device, pipeline, firstGroup, groupCount, dataSize, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetRayTracingCaptureReplayShaderGroupHandlesKHR", e); } + } + + public void CmdTraceRaysIndirectKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkStridedDeviceAddressRegionKHR *") MemorySegment pRaygenShaderBindingTable, @CType("const VkStridedDeviceAddressRegionKHR *") MemorySegment pMissShaderBindingTable, @CType("const VkStridedDeviceAddressRegionKHR *") MemorySegment pHitShaderBindingTable, @CType("const VkStridedDeviceAddressRegionKHR *") MemorySegment pCallableShaderBindingTable, @CType("VkDeviceAddress") long indirectDeviceAddress) { + if (Unmarshal.isNullPointer(PFN_vkCmdTraceRaysIndirectKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdTraceRaysIndirectKHR"); + try { MH_vkCmdTraceRaysIndirectKHR.invokeExact(PFN_vkCmdTraceRaysIndirectKHR, commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdTraceRaysIndirectKHR", e); } + } + + public @CType("VkDeviceSize") long GetRayTracingShaderGroupStackSizeKHR(@CType("VkDevice") MemorySegment device, @CType("VkPipeline") MemorySegment pipeline, @CType("uint32_t") int group, @CType("VkShaderGroupShaderKHR") int groupShader) { + if (Unmarshal.isNullPointer(PFN_vkGetRayTracingShaderGroupStackSizeKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetRayTracingShaderGroupStackSizeKHR"); + try { return (long) MH_vkGetRayTracingShaderGroupStackSizeKHR.invokeExact(PFN_vkGetRayTracingShaderGroupStackSizeKHR, device, pipeline, group, groupShader); } + catch (Throwable e) { throw new RuntimeException("error in vkGetRayTracingShaderGroupStackSizeKHR", e); } + } + + public void CmdSetRayTracingPipelineStackSizeKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int pipelineStackSize) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetRayTracingPipelineStackSizeKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetRayTracingPipelineStackSizeKHR"); + try { MH_vkCmdSetRayTracingPipelineStackSizeKHR.invokeExact(PFN_vkCmdSetRayTracingPipelineStackSizeKHR, commandBuffer, pipelineStackSize); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetRayTracingPipelineStackSizeKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayTracingPositionFetch.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayTracingPositionFetch.java new file mode 100644 index 00000000..52f4f0ca --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRayTracingPositionFetch.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRRayTracingPositionFetch { + public static final int VK_KHR_RAY_TRACING_POSITION_FETCH_SPEC_VERSION = 1; + public static final String VK_KHR_RAY_TRACING_POSITION_FETCH_EXTENSION_NAME = "VK_KHR_ray_tracing_position_fetch"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR = 1000481000; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR = 0x00000800; + + public VKKHRRayTracingPositionFetch(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRelaxedBlockLayout.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRelaxedBlockLayout.java new file mode 100644 index 00000000..a502f218 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRRelaxedBlockLayout.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRRelaxedBlockLayout { + public static final int VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION = 1; + public static final String VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME = "VK_KHR_relaxed_block_layout"; + + public VKKHRRelaxedBlockLayout(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSamplerMirrorClampToEdge.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSamplerMirrorClampToEdge.java new file mode 100644 index 00000000..000281f6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSamplerMirrorClampToEdge.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRSamplerMirrorClampToEdge { + public static final int VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION = 3; + public static final String VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME = "VK_KHR_sampler_mirror_clamp_to_edge"; + public static final int VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4; + public static final int VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; + + public VKKHRSamplerMirrorClampToEdge(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSamplerYcbcrConversion.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSamplerYcbcrConversion.java new file mode 100644 index 00000000..27a72c66 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSamplerYcbcrConversion.java @@ -0,0 +1,115 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +import static overrungl.vulkan.ext.VKEXTDebugReport.*; +public class VKKHRSamplerYcbcrConversion { + public static final int VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION = 14; + public static final String VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME = "VK_KHR_sampler_ycbcr_conversion"; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000; + public static final int VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO; + public static final int VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO; + public static final int VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES; + public static final int VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES; + public static final int VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION; + public static final int VK_FORMAT_G8B8G8R8_422_UNORM_KHR = VK_FORMAT_G8B8G8R8_422_UNORM; + public static final int VK_FORMAT_B8G8R8G8_422_UNORM_KHR = VK_FORMAT_B8G8R8G8_422_UNORM; + public static final int VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM; + public static final int VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM; + public static final int VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM; + public static final int VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM; + public static final int VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM; + public static final int VK_FORMAT_R10X6_UNORM_PACK16_KHR = VK_FORMAT_R10X6_UNORM_PACK16; + public static final int VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR = VK_FORMAT_R10X6G10X6_UNORM_2PACK16; + public static final int VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16; + public static final int VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16; + public static final int VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16; + public static final int VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16; + public static final int VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16; + public static final int VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16; + public static final int VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16; + public static final int VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16; + public static final int VK_FORMAT_R12X4_UNORM_PACK16_KHR = VK_FORMAT_R12X4_UNORM_PACK16; + public static final int VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR = VK_FORMAT_R12X4G12X4_UNORM_2PACK16; + public static final int VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16; + public static final int VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16; + public static final int VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16; + public static final int VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16; + public static final int VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16; + public static final int VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16; + public static final int VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16; + public static final int VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16; + public static final int VK_FORMAT_G16B16G16R16_422_UNORM_KHR = VK_FORMAT_G16B16G16R16_422_UNORM; + public static final int VK_FORMAT_B16G16R16G16_422_UNORM_KHR = VK_FORMAT_B16G16R16G16_422_UNORM; + public static final int VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM; + public static final int VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM; + public static final int VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM; + public static final int VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM; + public static final int VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM; + public static final int VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = VK_IMAGE_ASPECT_PLANE_0_BIT; + public static final int VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = VK_IMAGE_ASPECT_PLANE_1_BIT; + public static final int VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = VK_IMAGE_ASPECT_PLANE_2_BIT; + public static final int VK_IMAGE_CREATE_DISJOINT_BIT_KHR = VK_IMAGE_CREATE_DISJOINT_BIT; + public static final int VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT; + public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT; + public static final int VK_FORMAT_FEATURE_DISJOINT_BIT_KHR = VK_FORMAT_FEATURE_DISJOINT_BIT; + public static final int VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT; + public static final int VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY; + public static final int VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY; + public static final int VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709; + public static final int VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601; + public static final int VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020; + public static final int VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_FULL; + public static final int VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW; + public static final int VK_CHROMA_LOCATION_COSITED_EVEN_KHR = VK_CHROMA_LOCATION_COSITED_EVEN; + public static final int VK_CHROMA_LOCATION_MIDPOINT_KHR = VK_CHROMA_LOCATION_MIDPOINT; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT; + public static final MethodHandle MH_vkCreateSamplerYcbcrConversionKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroySamplerYcbcrConversionKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateSamplerYcbcrConversionKHR; + public final MemorySegment PFN_vkDestroySamplerYcbcrConversionKHR; + + public VKKHRSamplerYcbcrConversion(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateSamplerYcbcrConversionKHR = func.invoke(device, "vkCreateSamplerYcbcrConversionKHR", "vkCreateSamplerYcbcrConversion"); + PFN_vkDestroySamplerYcbcrConversionKHR = func.invoke(device, "vkDestroySamplerYcbcrConversionKHR", "vkDestroySamplerYcbcrConversion"); + } + + public @CType("VkResult") int CreateSamplerYcbcrConversionKHR(@CType("VkDevice") MemorySegment device, @CType("const VkSamplerYcbcrConversionCreateInfo *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSamplerYcbcrConversion *") MemorySegment pYcbcrConversion) { + if (Unmarshal.isNullPointer(PFN_vkCreateSamplerYcbcrConversionKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateSamplerYcbcrConversionKHR"); + try { return (int) MH_vkCreateSamplerYcbcrConversionKHR.invokeExact(PFN_vkCreateSamplerYcbcrConversionKHR, device, pCreateInfo, pAllocator, pYcbcrConversion); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateSamplerYcbcrConversionKHR", e); } + } + + public void DestroySamplerYcbcrConversionKHR(@CType("VkDevice") MemorySegment device, @CType("VkSamplerYcbcrConversion") MemorySegment ycbcrConversion, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroySamplerYcbcrConversionKHR)) throw new SymbolNotFoundError("Symbol not found: vkDestroySamplerYcbcrConversionKHR"); + try { MH_vkDestroySamplerYcbcrConversionKHR.invokeExact(PFN_vkDestroySamplerYcbcrConversionKHR, device, ycbcrConversion, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroySamplerYcbcrConversionKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSeparateDepthStencilLayouts.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSeparateDepthStencilLayouts.java new file mode 100644 index 00000000..ab1c8737 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSeparateDepthStencilLayouts.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRSeparateDepthStencilLayouts { + public static final int VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_SPEC_VERSION = 1; + public static final String VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME = "VK_KHR_separate_depth_stencil_layouts"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES; + public static final int VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT; + public static final int VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT; + public static final int VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL; + public static final int VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL; + public static final int VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL; + public static final int VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL; + + public VKKHRSeparateDepthStencilLayouts(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderAtomicInt64.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderAtomicInt64.java new file mode 100644 index 00000000..eb374b99 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderAtomicInt64.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRShaderAtomicInt64 { + public static final int VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME = "VK_KHR_shader_atomic_int64"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES; + + public VKKHRShaderAtomicInt64(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderClock.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderClock.java new file mode 100644 index 00000000..8d587b23 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderClock.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRShaderClock { + public static final int VK_KHR_SHADER_CLOCK_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_CLOCK_EXTENSION_NAME = "VK_KHR_shader_clock"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000; + + public VKKHRShaderClock(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderDrawParameters.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderDrawParameters.java new file mode 100644 index 00000000..1b1d62ad --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderDrawParameters.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRShaderDrawParameters { + public static final int VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME = "VK_KHR_shader_draw_parameters"; + + public VKKHRShaderDrawParameters(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderExpectAssume.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderExpectAssume.java new file mode 100644 index 00000000..04689ed3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderExpectAssume.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRShaderExpectAssume { + public static final int VK_KHR_SHADER_EXPECT_ASSUME_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_EXPECT_ASSUME_EXTENSION_NAME = "VK_KHR_shader_expect_assume"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES; + + public VKKHRShaderExpectAssume(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderFloat16Int8.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderFloat16Int8.java new file mode 100644 index 00000000..a9db5e0f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderFloat16Int8.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRShaderFloat16Int8 { + public static final int VK_KHR_SHADER_FLOAT16_INT8_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME = "VK_KHR_shader_float16_int8"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES; + + public VKKHRShaderFloat16Int8(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderFloatControls.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderFloatControls.java new file mode 100644 index 00000000..4813f25c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderFloatControls.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRShaderFloatControls { + public static final int VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION = 4; + public static final String VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME = "VK_KHR_shader_float_controls"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES; + public static final int VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY; + public static final int VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL; + public static final int VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE; + + public VKKHRShaderFloatControls(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderFloatControls2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderFloatControls2.java new file mode 100644 index 00000000..1c43698b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderFloatControls2.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRShaderFloatControls2 { + public static final int VK_KHR_SHADER_FLOAT_CONTROLS_2_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_FLOAT_CONTROLS_2_EXTENSION_NAME = "VK_KHR_shader_float_controls2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES; + + public VKKHRShaderFloatControls2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderIntegerDotProduct.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderIntegerDotProduct.java new file mode 100644 index 00000000..a51cf310 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderIntegerDotProduct.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKKHRShaderIntegerDotProduct { + public static final int VK_KHR_SHADER_INTEGER_DOT_PRODUCT_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME = "VK_KHR_shader_integer_dot_product"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES; + + public VKKHRShaderIntegerDotProduct(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderMaximalReconvergence.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderMaximalReconvergence.java new file mode 100644 index 00000000..f90ba6eb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderMaximalReconvergence.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRShaderMaximalReconvergence { + public static final int VK_KHR_SHADER_MAXIMAL_RECONVERGENCE_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_MAXIMAL_RECONVERGENCE_EXTENSION_NAME = "VK_KHR_shader_maximal_reconvergence"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR = 1000434000; + + public VKKHRShaderMaximalReconvergence(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderNonSemanticInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderNonSemanticInfo.java new file mode 100644 index 00000000..570f69d0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderNonSemanticInfo.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRShaderNonSemanticInfo { + public static final int VK_KHR_SHADER_NON_SEMANTIC_INFO_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME = "VK_KHR_shader_non_semantic_info"; + + public VKKHRShaderNonSemanticInfo(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderQuadControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderQuadControl.java new file mode 100644 index 00000000..9df3ac7c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderQuadControl.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRShaderQuadControl { + public static final int VK_KHR_SHADER_QUAD_CONTROL_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_QUAD_CONTROL_EXTENSION_NAME = "VK_KHR_shader_quad_control"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR = 1000235000; + + public VKKHRShaderQuadControl(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderRelaxedExtendedInstruction.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderRelaxedExtendedInstruction.java new file mode 100644 index 00000000..ffc46662 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderRelaxedExtendedInstruction.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRShaderRelaxedExtendedInstruction { + public static final int VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_EXTENSION_NAME = "VK_KHR_shader_relaxed_extended_instruction"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR = 1000558000; + + public VKKHRShaderRelaxedExtendedInstruction(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderSubgroupExtendedTypes.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderSubgroupExtendedTypes.java new file mode 100644 index 00000000..ad1b7bc6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderSubgroupExtendedTypes.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRShaderSubgroupExtendedTypes { + public static final int VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME = "VK_KHR_shader_subgroup_extended_types"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES; + + public VKKHRShaderSubgroupExtendedTypes(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderSubgroupRotate.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderSubgroupRotate.java new file mode 100644 index 00000000..954a2be0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderSubgroupRotate.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRShaderSubgroupRotate { + public static final int VK_KHR_SHADER_SUBGROUP_ROTATE_SPEC_VERSION = 2; + public static final String VK_KHR_SHADER_SUBGROUP_ROTATE_EXTENSION_NAME = "VK_KHR_shader_subgroup_rotate"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES; + public static final int VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_BIT; + public static final int VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT; + + public VKKHRShaderSubgroupRotate(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderSubgroupUniformControlFlow.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderSubgroupUniformControlFlow.java new file mode 100644 index 00000000..7c3d55de --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderSubgroupUniformControlFlow.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRShaderSubgroupUniformControlFlow { + public static final int VK_KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_EXTENSION_NAME = "VK_KHR_shader_subgroup_uniform_control_flow"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR = 1000323000; + + public VKKHRShaderSubgroupUniformControlFlow(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderTerminateInvocation.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderTerminateInvocation.java new file mode 100644 index 00000000..73e7e662 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRShaderTerminateInvocation.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKKHRShaderTerminateInvocation { + public static final int VK_KHR_SHADER_TERMINATE_INVOCATION_SPEC_VERSION = 1; + public static final String VK_KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME = "VK_KHR_shader_terminate_invocation"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES; + + public VKKHRShaderTerminateInvocation(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSharedPresentableImage.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSharedPresentableImage.java new file mode 100644 index 00000000..c75b3709 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSharedPresentableImage.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRSharedPresentableImage { + public static final int VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION = 1; + public static final String VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME = "VK_KHR_shared_presentable_image"; + public static final int VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000; + public static final int VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000; + public static final int VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001; + public static final int VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000; + public static final MethodHandle MH_vkGetSwapchainStatusKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetSwapchainStatusKHR; + + public VKKHRSharedPresentableImage(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetSwapchainStatusKHR = func.invoke(device, "vkGetSwapchainStatusKHR"); + } + + public @CType("VkResult") int GetSwapchainStatusKHR(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain) { + if (Unmarshal.isNullPointer(PFN_vkGetSwapchainStatusKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetSwapchainStatusKHR"); + try { return (int) MH_vkGetSwapchainStatusKHR.invokeExact(PFN_vkGetSwapchainStatusKHR, device, swapchain); } + catch (Throwable e) { throw new RuntimeException("error in vkGetSwapchainStatusKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSpirv14.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSpirv14.java new file mode 100644 index 00000000..2904d84e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSpirv14.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRSpirv14 { + public static final int VK_KHR_SPIRV_1_4_SPEC_VERSION = 1; + public static final String VK_KHR_SPIRV_1_4_EXTENSION_NAME = "VK_KHR_spirv_1_4"; + + public VKKHRSpirv14(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRStorageBufferStorageClass.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRStorageBufferStorageClass.java new file mode 100644 index 00000000..9fdb2f04 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRStorageBufferStorageClass.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRStorageBufferStorageClass { + public static final int VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION = 1; + public static final String VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME = "VK_KHR_storage_buffer_storage_class"; + + public VKKHRStorageBufferStorageClass(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSurface.java new file mode 100644 index 00000000..bdcde1e2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSurface.java @@ -0,0 +1,99 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRSurface { + public static final int VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001; + public static final int VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002; + public static final int VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004; + public static final int VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008; + public static final int VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010; + public static final int VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020; + public static final int VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040; + public static final int VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080; + public static final int VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100; + public static final int VK_PRESENT_MODE_IMMEDIATE_KHR = 0; + public static final int VK_PRESENT_MODE_MAILBOX_KHR = 1; + public static final int VK_PRESENT_MODE_FIFO_KHR = 2; + public static final int VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3; + public static final int VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0; + public static final int VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001; + public static final int VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002; + public static final int VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004; + public static final int VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008; + public static final int VK_KHR_SURFACE_SPEC_VERSION = 25; + public static final String VK_KHR_SURFACE_EXTENSION_NAME = "VK_KHR_surface"; + public static final int VK_ERROR_SURFACE_LOST_KHR = -1000000000; + public static final int VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001; + public static final int VK_OBJECT_TYPE_SURFACE_KHR = 1000000000; + public static final int VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; + public static final MethodHandle MH_vkDestroySurfaceKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceSurfaceSupportKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceSurfaceFormatsKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceSurfacePresentModesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkDestroySurfaceKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceSurfaceSupportKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceSurfaceFormatsKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceSurfacePresentModesKHR; + + public VKKHRSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkDestroySurfaceKHR = func.invoke(instance, "vkDestroySurfaceKHR"); + PFN_vkGetPhysicalDeviceSurfaceSupportKHR = func.invoke(instance, "vkGetPhysicalDeviceSurfaceSupportKHR"); + PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = func.invoke(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); + PFN_vkGetPhysicalDeviceSurfaceFormatsKHR = func.invoke(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR"); + PFN_vkGetPhysicalDeviceSurfacePresentModesKHR = func.invoke(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR"); + } + + public void DestroySurfaceKHR(@CType("VkInstance") MemorySegment instance, @CType("VkSurfaceKHR") MemorySegment surface, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroySurfaceKHR)) throw new SymbolNotFoundError("Symbol not found: vkDestroySurfaceKHR"); + try { MH_vkDestroySurfaceKHR.invokeExact(PFN_vkDestroySurfaceKHR, instance, surface, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroySurfaceKHR", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceSurfaceSupportKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t") int queueFamilyIndex, @CType("VkSurfaceKHR") MemorySegment surface, @CType("VkBool32 *") MemorySegment pSupported) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSurfaceSupportKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSurfaceSupportKHR"); + try { return (int) MH_vkGetPhysicalDeviceSurfaceSupportKHR.invokeExact(PFN_vkGetPhysicalDeviceSurfaceSupportKHR, physicalDevice, queueFamilyIndex, surface, pSupported); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSurfaceSupportKHR", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceSurfaceCapabilitiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkSurfaceKHR") MemorySegment surface, @CType("VkSurfaceCapabilitiesKHR *") MemorySegment pSurfaceCapabilities) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); + try { return (int) MH_vkGetPhysicalDeviceSurfaceCapabilitiesKHR.invokeExact(PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR, physicalDevice, surface, pSurfaceCapabilities); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSurfaceCapabilitiesKHR", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceSurfaceFormatsKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkSurfaceKHR") MemorySegment surface, @CType("uint32_t *") MemorySegment pSurfaceFormatCount, @CType("VkSurfaceFormatKHR *") MemorySegment pSurfaceFormats) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSurfaceFormatsKHR"); + try { return (int) MH_vkGetPhysicalDeviceSurfaceFormatsKHR.invokeExact(PFN_vkGetPhysicalDeviceSurfaceFormatsKHR, physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSurfaceFormatsKHR", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceSurfacePresentModesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkSurfaceKHR") MemorySegment surface, @CType("uint32_t *") MemorySegment pPresentModeCount, @CType("VkPresentModeKHR *") MemorySegment pPresentModes) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSurfacePresentModesKHR"); + try { return (int) MH_vkGetPhysicalDeviceSurfacePresentModesKHR.invokeExact(PFN_vkGetPhysicalDeviceSurfacePresentModesKHR, physicalDevice, surface, pPresentModeCount, pPresentModes); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSurfacePresentModesKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSurfaceProtectedCapabilities.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSurfaceProtectedCapabilities.java new file mode 100644 index 00000000..b4b7967e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSurfaceProtectedCapabilities.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRSurfaceProtectedCapabilities { + public static final int VK_KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION = 1; + public static final String VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME = "VK_KHR_surface_protected_capabilities"; + public static final int VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000; + + public VKKHRSurfaceProtectedCapabilities(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSwapchain.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSwapchain.java new file mode 100644 index 00000000..a6aa7dc7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSwapchain.java @@ -0,0 +1,131 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRSwapchain { + public static final int VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 0x00000001; + public static final int VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 0x00000002; + public static final int VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 0x00000004; + public static final int VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 0x00000008; + public static final int VK_KHR_SWAPCHAIN_SPEC_VERSION = 70; + public static final String VK_KHR_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_swapchain"; + public static final int VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000; + public static final int VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001; + public static final int VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002; + public static final int VK_SUBOPTIMAL_KHR = 1000001003; + public static final int VK_ERROR_OUT_OF_DATE_KHR = -1000001004; + public static final int VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000001007; + public static final int VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000001008; + public static final int VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000001009; + public static final int VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000001010; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000001011; + public static final int VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000001012; + public static final int VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000001; + public static final int VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x00000002; + public static final MethodHandle MH_vkCreateSwapchainKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroySwapchainKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetSwapchainImagesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkAcquireNextImageKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkQueuePresentKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceGroupPresentCapabilitiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDeviceGroupSurfacePresentModesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDevicePresentRectanglesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkAcquireNextImage2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateSwapchainKHR; + public final MemorySegment PFN_vkDestroySwapchainKHR; + public final MemorySegment PFN_vkGetSwapchainImagesKHR; + public final MemorySegment PFN_vkAcquireNextImageKHR; + public final MemorySegment PFN_vkQueuePresentKHR; + public final MemorySegment PFN_vkGetDeviceGroupPresentCapabilitiesKHR; + public final MemorySegment PFN_vkGetDeviceGroupSurfacePresentModesKHR; + public final MemorySegment PFN_vkGetPhysicalDevicePresentRectanglesKHR; + public final MemorySegment PFN_vkAcquireNextImage2KHR; + + public VKKHRSwapchain(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateSwapchainKHR = func.invoke(device, "vkCreateSwapchainKHR"); + PFN_vkDestroySwapchainKHR = func.invoke(device, "vkDestroySwapchainKHR"); + PFN_vkGetSwapchainImagesKHR = func.invoke(device, "vkGetSwapchainImagesKHR"); + PFN_vkAcquireNextImageKHR = func.invoke(device, "vkAcquireNextImageKHR"); + PFN_vkQueuePresentKHR = func.invoke(device, "vkQueuePresentKHR"); + PFN_vkGetDeviceGroupPresentCapabilitiesKHR = func.invoke(device, "vkGetDeviceGroupPresentCapabilitiesKHR"); + PFN_vkGetDeviceGroupSurfacePresentModesKHR = func.invoke(device, "vkGetDeviceGroupSurfacePresentModesKHR"); + PFN_vkGetPhysicalDevicePresentRectanglesKHR = func.invoke(device, "vkGetPhysicalDevicePresentRectanglesKHR"); + PFN_vkAcquireNextImage2KHR = func.invoke(device, "vkAcquireNextImage2KHR"); + } + + public @CType("VkResult") int CreateSwapchainKHR(@CType("VkDevice") MemorySegment device, @CType("const VkSwapchainCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSwapchainKHR *") MemorySegment pSwapchain) { + if (Unmarshal.isNullPointer(PFN_vkCreateSwapchainKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateSwapchainKHR"); + try { return (int) MH_vkCreateSwapchainKHR.invokeExact(PFN_vkCreateSwapchainKHR, device, pCreateInfo, pAllocator, pSwapchain); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateSwapchainKHR", e); } + } + + public void DestroySwapchainKHR(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroySwapchainKHR)) throw new SymbolNotFoundError("Symbol not found: vkDestroySwapchainKHR"); + try { MH_vkDestroySwapchainKHR.invokeExact(PFN_vkDestroySwapchainKHR, device, swapchain, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroySwapchainKHR", e); } + } + + public @CType("VkResult") int GetSwapchainImagesKHR(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("uint32_t *") MemorySegment pSwapchainImageCount, @CType("VkImage *") MemorySegment pSwapchainImages) { + if (Unmarshal.isNullPointer(PFN_vkGetSwapchainImagesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetSwapchainImagesKHR"); + try { return (int) MH_vkGetSwapchainImagesKHR.invokeExact(PFN_vkGetSwapchainImagesKHR, device, swapchain, pSwapchainImageCount, pSwapchainImages); } + catch (Throwable e) { throw new RuntimeException("error in vkGetSwapchainImagesKHR", e); } + } + + public @CType("VkResult") int AcquireNextImageKHR(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("uint64_t") long timeout, @CType("VkSemaphore") MemorySegment semaphore, @CType("VkFence") MemorySegment fence, @CType("uint32_t *") MemorySegment pImageIndex) { + if (Unmarshal.isNullPointer(PFN_vkAcquireNextImageKHR)) throw new SymbolNotFoundError("Symbol not found: vkAcquireNextImageKHR"); + try { return (int) MH_vkAcquireNextImageKHR.invokeExact(PFN_vkAcquireNextImageKHR, device, swapchain, timeout, semaphore, fence, pImageIndex); } + catch (Throwable e) { throw new RuntimeException("error in vkAcquireNextImageKHR", e); } + } + + public @CType("VkResult") int QueuePresentKHR(@CType("VkQueue") MemorySegment queue, @CType("const VkPresentInfoKHR *") MemorySegment pPresentInfo) { + if (Unmarshal.isNullPointer(PFN_vkQueuePresentKHR)) throw new SymbolNotFoundError("Symbol not found: vkQueuePresentKHR"); + try { return (int) MH_vkQueuePresentKHR.invokeExact(PFN_vkQueuePresentKHR, queue, pPresentInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkQueuePresentKHR", e); } + } + + public @CType("VkResult") int GetDeviceGroupPresentCapabilitiesKHR(@CType("VkDevice") MemorySegment device, @CType("VkDeviceGroupPresentCapabilitiesKHR *") MemorySegment pDeviceGroupPresentCapabilities) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceGroupPresentCapabilitiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceGroupPresentCapabilitiesKHR"); + try { return (int) MH_vkGetDeviceGroupPresentCapabilitiesKHR.invokeExact(PFN_vkGetDeviceGroupPresentCapabilitiesKHR, device, pDeviceGroupPresentCapabilities); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceGroupPresentCapabilitiesKHR", e); } + } + + public @CType("VkResult") int GetDeviceGroupSurfacePresentModesKHR(@CType("VkDevice") MemorySegment device, @CType("VkSurfaceKHR") MemorySegment surface, @CType("VkDeviceGroupPresentModeFlagsKHR *") MemorySegment pModes) { + if (Unmarshal.isNullPointer(PFN_vkGetDeviceGroupSurfacePresentModesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetDeviceGroupSurfacePresentModesKHR"); + try { return (int) MH_vkGetDeviceGroupSurfacePresentModesKHR.invokeExact(PFN_vkGetDeviceGroupSurfacePresentModesKHR, device, surface, pModes); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDeviceGroupSurfacePresentModesKHR", e); } + } + + public @CType("VkResult") int GetPhysicalDevicePresentRectanglesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkSurfaceKHR") MemorySegment surface, @CType("uint32_t *") MemorySegment pRectCount, @CType("VkRect2D *") MemorySegment pRects) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDevicePresentRectanglesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDevicePresentRectanglesKHR"); + try { return (int) MH_vkGetPhysicalDevicePresentRectanglesKHR.invokeExact(PFN_vkGetPhysicalDevicePresentRectanglesKHR, physicalDevice, surface, pRectCount, pRects); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDevicePresentRectanglesKHR", e); } + } + + public @CType("VkResult") int AcquireNextImage2KHR(@CType("VkDevice") MemorySegment device, @CType("const VkAcquireNextImageInfoKHR *") MemorySegment pAcquireInfo, @CType("uint32_t *") MemorySegment pImageIndex) { + if (Unmarshal.isNullPointer(PFN_vkAcquireNextImage2KHR)) throw new SymbolNotFoundError("Symbol not found: vkAcquireNextImage2KHR"); + try { return (int) MH_vkAcquireNextImage2KHR.invokeExact(PFN_vkAcquireNextImage2KHR, device, pAcquireInfo, pImageIndex); } + catch (Throwable e) { throw new RuntimeException("error in vkAcquireNextImage2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSwapchainMutableFormat.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSwapchainMutableFormat.java new file mode 100644 index 00000000..135d1fb9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSwapchainMutableFormat.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRSwapchainMutableFormat { + public static final int VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_SPEC_VERSION = 1; + public static final String VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME = "VK_KHR_swapchain_mutable_format"; + public static final int VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR = 0x00000004; + + public VKKHRSwapchainMutableFormat(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSynchronization2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSynchronization2.java new file mode 100644 index 00000000..7236d00b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRSynchronization2.java @@ -0,0 +1,180 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +import static overrungl.vulkan.khr.VKKHRSynchronization2.*; +public class VKKHRSynchronization2 { + public static final int VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION = 1; + public static final String VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME = "VK_KHR_synchronization2"; + public static final long VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000L; + public static final long VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000L; + public static final long VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000L; + public static final long VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000L; + public static final long VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000L; + public static final long VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000L; + public static final long VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 0x00020000L; + public static final long VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000L; + public static final long VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000L; + public static final long VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000L; + public static final long VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000L; + public static final long VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000L; + public static final long VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000L; + public static final long VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000L; + public static final long VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = 0x00200000L; + public static final long VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000L; + public static final long VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000L; + public static final long VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000L; + public static final long VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT = 0x00080000L; + public static final long VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT = 0x00100000L; + public static final int VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2; + public static final int VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2; + public static final int VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2; + public static final int VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR = VK_STRUCTURE_TYPE_DEPENDENCY_INFO; + public static final int VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR = VK_STRUCTURE_TYPE_SUBMIT_INFO_2; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO; + public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES; + public static final int VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR = VK_EVENT_CREATE_DEVICE_ONLY_BIT; + public static final int VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL; + public static final int VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL; + public static final int VK_PIPELINE_STAGE_NONE_KHR = VK_PIPELINE_STAGE_NONE; + public static final int VK_ACCESS_NONE_KHR = VK_ACCESS_NONE; + public static final long VK_ACCESS_2_NONE_KHR = VK_ACCESS_2_NONE; + public static final long VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT; + public static final long VK_ACCESS_2_INDEX_READ_BIT_KHR = VK_ACCESS_2_INDEX_READ_BIT; + public static final long VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT; + public static final long VK_ACCESS_2_UNIFORM_READ_BIT_KHR = VK_ACCESS_2_UNIFORM_READ_BIT; + public static final long VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT; + public static final long VK_ACCESS_2_SHADER_READ_BIT_KHR = VK_ACCESS_2_SHADER_READ_BIT; + public static final long VK_ACCESS_2_SHADER_WRITE_BIT_KHR = VK_ACCESS_2_SHADER_WRITE_BIT; + public static final long VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT; + public static final long VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT; + public static final long VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT; + public static final long VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT; + public static final long VK_ACCESS_2_TRANSFER_READ_BIT_KHR = VK_ACCESS_2_TRANSFER_READ_BIT; + public static final long VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR = VK_ACCESS_2_TRANSFER_WRITE_BIT; + public static final long VK_ACCESS_2_HOST_READ_BIT_KHR = VK_ACCESS_2_HOST_READ_BIT; + public static final long VK_ACCESS_2_HOST_WRITE_BIT_KHR = VK_ACCESS_2_HOST_WRITE_BIT; + public static final long VK_ACCESS_2_MEMORY_READ_BIT_KHR = VK_ACCESS_2_MEMORY_READ_BIT; + public static final long VK_ACCESS_2_MEMORY_WRITE_BIT_KHR = VK_ACCESS_2_MEMORY_WRITE_BIT; + public static final long VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = VK_ACCESS_2_SHADER_SAMPLED_READ_BIT; + public static final long VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = VK_ACCESS_2_SHADER_STORAGE_READ_BIT; + public static final long VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT; + public static final long VK_PIPELINE_STAGE_2_NONE_KHR = VK_PIPELINE_STAGE_2_NONE; + public static final long VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT; + public static final long VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT; + public static final long VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT; + public static final long VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT; + public static final long VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT; + public static final long VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT; + public static final long VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT; + public static final long VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT; + public static final long VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT; + public static final long VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT; + public static final long VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT; + public static final long VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT; + public static final long VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT; + public static final long VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR = VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT; + public static final long VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT; + public static final long VK_PIPELINE_STAGE_2_HOST_BIT_KHR = VK_PIPELINE_STAGE_2_HOST_BIT; + public static final long VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT; + public static final long VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT; + public static final long VK_PIPELINE_STAGE_2_COPY_BIT_KHR = VK_PIPELINE_STAGE_2_COPY_BIT; + public static final long VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR = VK_PIPELINE_STAGE_2_RESOLVE_BIT; + public static final long VK_PIPELINE_STAGE_2_BLIT_BIT_KHR = VK_PIPELINE_STAGE_2_BLIT_BIT; + public static final long VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR = VK_PIPELINE_STAGE_2_CLEAR_BIT; + public static final long VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT; + public static final long VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT; + public static final long VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT; + public static final int VK_SUBMIT_PROTECTED_BIT_KHR = VK_SUBMIT_PROTECTED_BIT; + public static final long VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT = VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV; + public static final long VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_EXT = VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV; + public static final long VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_EXT = VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV; + public static final long VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR; + public static final long VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR; + public static final long VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR; + public static final long VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR; + public static final long VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR; + public static final long VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR; + public static final long VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT; + public static final long VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT; + public static final MethodHandle MH_vkCmdSetEvent2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdResetEvent2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkCmdWaitEvents2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPipelineBarrier2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdWriteTimestamp2KHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkQueueSubmit2KHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetEvent2KHR; + public final MemorySegment PFN_vkCmdResetEvent2KHR; + public final MemorySegment PFN_vkCmdWaitEvents2KHR; + public final MemorySegment PFN_vkCmdPipelineBarrier2KHR; + public final MemorySegment PFN_vkCmdWriteTimestamp2KHR; + public final MemorySegment PFN_vkQueueSubmit2KHR; + + public VKKHRSynchronization2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetEvent2KHR = func.invoke(device, "vkCmdSetEvent2KHR", "vkCmdSetEvent2"); + PFN_vkCmdResetEvent2KHR = func.invoke(device, "vkCmdResetEvent2KHR", "vkCmdResetEvent2"); + PFN_vkCmdWaitEvents2KHR = func.invoke(device, "vkCmdWaitEvents2KHR", "vkCmdWaitEvents2"); + PFN_vkCmdPipelineBarrier2KHR = func.invoke(device, "vkCmdPipelineBarrier2KHR", "vkCmdPipelineBarrier2"); + PFN_vkCmdWriteTimestamp2KHR = func.invoke(device, "vkCmdWriteTimestamp2KHR", "vkCmdWriteTimestamp2"); + PFN_vkQueueSubmit2KHR = func.invoke(device, "vkQueueSubmit2KHR", "vkQueueSubmit2"); + } + + public void CmdSetEvent2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkEvent") MemorySegment event, @CType("const VkDependencyInfo *") MemorySegment pDependencyInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetEvent2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetEvent2KHR"); + try { MH_vkCmdSetEvent2KHR.invokeExact(PFN_vkCmdSetEvent2KHR, commandBuffer, event, pDependencyInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetEvent2KHR", e); } + } + + public void CmdResetEvent2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkEvent") MemorySegment event, @CType("VkPipelineStageFlags2") long stageMask) { + if (Unmarshal.isNullPointer(PFN_vkCmdResetEvent2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdResetEvent2KHR"); + try { MH_vkCmdResetEvent2KHR.invokeExact(PFN_vkCmdResetEvent2KHR, commandBuffer, event, stageMask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdResetEvent2KHR", e); } + } + + public void CmdWaitEvents2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int eventCount, @CType("const VkEvent *") MemorySegment pEvents, @CType("const VkDependencyInfo *") MemorySegment pDependencyInfos) { + if (Unmarshal.isNullPointer(PFN_vkCmdWaitEvents2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdWaitEvents2KHR"); + try { MH_vkCmdWaitEvents2KHR.invokeExact(PFN_vkCmdWaitEvents2KHR, commandBuffer, eventCount, pEvents, pDependencyInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWaitEvents2KHR", e); } + } + + public void CmdPipelineBarrier2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkDependencyInfo *") MemorySegment pDependencyInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdPipelineBarrier2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdPipelineBarrier2KHR"); + try { MH_vkCmdPipelineBarrier2KHR.invokeExact(PFN_vkCmdPipelineBarrier2KHR, commandBuffer, pDependencyInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPipelineBarrier2KHR", e); } + } + + public void CmdWriteTimestamp2KHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineStageFlags2") long stage, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int query) { + if (Unmarshal.isNullPointer(PFN_vkCmdWriteTimestamp2KHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdWriteTimestamp2KHR"); + try { MH_vkCmdWriteTimestamp2KHR.invokeExact(PFN_vkCmdWriteTimestamp2KHR, commandBuffer, stage, queryPool, query); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWriteTimestamp2KHR", e); } + } + + public @CType("VkResult") int QueueSubmit2KHR(@CType("VkQueue") MemorySegment queue, @CType("uint32_t") int submitCount, @CType("const VkSubmitInfo2 *") MemorySegment pSubmits, @CType("VkFence") MemorySegment fence) { + if (Unmarshal.isNullPointer(PFN_vkQueueSubmit2KHR)) throw new SymbolNotFoundError("Symbol not found: vkQueueSubmit2KHR"); + try { return (int) MH_vkQueueSubmit2KHR.invokeExact(PFN_vkQueueSubmit2KHR, queue, submitCount, pSubmits, fence); } + catch (Throwable e) { throw new RuntimeException("error in vkQueueSubmit2KHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRTimelineSemaphore.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRTimelineSemaphore.java new file mode 100644 index 00000000..b471f7ab --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRTimelineSemaphore.java @@ -0,0 +1,69 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRTimelineSemaphore { + public static final int VK_KHR_TIMELINE_SEMAPHORE_SPEC_VERSION = 2; + public static final String VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME = "VK_KHR_timeline_semaphore"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO; + public static final int VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO; + public static final int VK_SEMAPHORE_TYPE_BINARY_KHR = VK_SEMAPHORE_TYPE_BINARY; + public static final int VK_SEMAPHORE_TYPE_TIMELINE_KHR = VK_SEMAPHORE_TYPE_TIMELINE; + public static final int VK_SEMAPHORE_WAIT_ANY_BIT_KHR = VK_SEMAPHORE_WAIT_ANY_BIT; + public static final MethodHandle MH_vkGetSemaphoreCounterValueKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkWaitSemaphoresKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkSignalSemaphoreKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetSemaphoreCounterValueKHR; + public final MemorySegment PFN_vkWaitSemaphoresKHR; + public final MemorySegment PFN_vkSignalSemaphoreKHR; + + public VKKHRTimelineSemaphore(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetSemaphoreCounterValueKHR = func.invoke(device, "vkGetSemaphoreCounterValueKHR", "vkGetSemaphoreCounterValue"); + PFN_vkWaitSemaphoresKHR = func.invoke(device, "vkWaitSemaphoresKHR", "vkWaitSemaphores"); + PFN_vkSignalSemaphoreKHR = func.invoke(device, "vkSignalSemaphoreKHR", "vkSignalSemaphore"); + } + + public @CType("VkResult") int GetSemaphoreCounterValueKHR(@CType("VkDevice") MemorySegment device, @CType("VkSemaphore") MemorySegment semaphore, @CType("uint64_t *") MemorySegment pValue) { + if (Unmarshal.isNullPointer(PFN_vkGetSemaphoreCounterValueKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetSemaphoreCounterValueKHR"); + try { return (int) MH_vkGetSemaphoreCounterValueKHR.invokeExact(PFN_vkGetSemaphoreCounterValueKHR, device, semaphore, pValue); } + catch (Throwable e) { throw new RuntimeException("error in vkGetSemaphoreCounterValueKHR", e); } + } + + public @CType("VkResult") int WaitSemaphoresKHR(@CType("VkDevice") MemorySegment device, @CType("const VkSemaphoreWaitInfo *") MemorySegment pWaitInfo, @CType("uint64_t") long timeout) { + if (Unmarshal.isNullPointer(PFN_vkWaitSemaphoresKHR)) throw new SymbolNotFoundError("Symbol not found: vkWaitSemaphoresKHR"); + try { return (int) MH_vkWaitSemaphoresKHR.invokeExact(PFN_vkWaitSemaphoresKHR, device, pWaitInfo, timeout); } + catch (Throwable e) { throw new RuntimeException("error in vkWaitSemaphoresKHR", e); } + } + + public @CType("VkResult") int SignalSemaphoreKHR(@CType("VkDevice") MemorySegment device, @CType("const VkSemaphoreSignalInfo *") MemorySegment pSignalInfo) { + if (Unmarshal.isNullPointer(PFN_vkSignalSemaphoreKHR)) throw new SymbolNotFoundError("Symbol not found: vkSignalSemaphoreKHR"); + try { return (int) MH_vkSignalSemaphoreKHR.invokeExact(PFN_vkSignalSemaphoreKHR, device, pSignalInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkSignalSemaphoreKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRUniformBufferStandardLayout.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRUniformBufferStandardLayout.java new file mode 100644 index 00000000..d3868614 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRUniformBufferStandardLayout.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRUniformBufferStandardLayout { + public static final int VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_SPEC_VERSION = 1; + public static final String VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME = "VK_KHR_uniform_buffer_standard_layout"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES; + + public VKKHRUniformBufferStandardLayout(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVariablePointers.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVariablePointers.java new file mode 100644 index 00000000..fb91d6b6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVariablePointers.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK11.*; +import static overrungl.vulkan.khr.VKKHRVariablePointers.*; +public class VKKHRVariablePointers { + public static final int VK_KHR_VARIABLE_POINTERS_SPEC_VERSION = 1; + public static final String VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME = "VK_KHR_variable_pointers"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR; + + public VKKHRVariablePointers(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVertexAttributeDivisor.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVertexAttributeDivisor.java new file mode 100644 index 00000000..0d9bf214 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVertexAttributeDivisor.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK14.*; +public class VKKHRVertexAttributeDivisor { + public static final int VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION = 1; + public static final String VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME = "VK_KHR_vertex_attribute_divisor"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES; + + public VKKHRVertexAttributeDivisor(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeAv1.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeAv1.java new file mode 100644 index 00000000..c7938c03 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeAv1.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoDecodeAv1 { + public static final int VK_KHR_VIDEO_DECODE_AV1_SPEC_VERSION = 1; + public static final String VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME = "VK_KHR_video_decode_av1"; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR = 1000512000; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR = 1000512001; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR = 1000512003; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000512004; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR = 1000512005; + public static final int VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR = 0x00000004; + public static final int VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR = 7; + + public VKKHRVideoDecodeAv1(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeH264.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeH264.java new file mode 100644 index 00000000..f4b84ac7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeH264.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoDecodeH264 { + public static final int VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR = 0; + public static final int VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR = 0x00000002; + public static final int VK_KHR_VIDEO_DECODE_H264_SPEC_VERSION = 9; + public static final String VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME = "VK_KHR_video_decode_h264"; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_KHR = 1000040000; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR = 1000040001; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR = 1000040003; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000040004; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000040005; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR = 1000040006; + public static final int VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR = 0x00000001; + + public VKKHRVideoDecodeH264(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeH265.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeH265.java new file mode 100644 index 00000000..8f57b643 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeH265.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoDecodeH265 { + public static final int VK_KHR_VIDEO_DECODE_H265_SPEC_VERSION = 8; + public static final String VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME = "VK_KHR_video_decode_h265"; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR = 1000187000; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000187001; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000187002; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR = 1000187003; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_KHR = 1000187004; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR = 1000187005; + public static final int VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR = 0x00000002; + + public VKKHRVideoDecodeH265(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeQueue.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeQueue.java new file mode 100644 index 00000000..658a4513 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoDecodeQueue.java @@ -0,0 +1,66 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoDecodeQueue { + public static final int VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_DECODE_USAGE_DEFAULT_KHR = 0; + public static final int VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR = 0x00000004; + public static final int VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION = 8; + public static final String VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_decode_queue"; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR = 1000024000; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHR = 1000024001; + public static final int VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR = 1000024002; + public static final int VK_QUEUE_VIDEO_DECODE_BIT_KHR = 0x00000020; + public static final long VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR = 0x04000000L; + public static final long VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR = 0x800000000L; + public static final long VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR = 0x1000000000L; + public static final int VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000; + public static final int VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR = 0x00004000; + public static final int VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR = 0x00000400; + public static final int VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR = 0x00000800; + public static final int VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR = 0x00001000; + public static final int VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR = 0x02000000; + public static final int VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR = 0x04000000; + public static final int VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR = 1000024000; + public static final int VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR = 1000024001; + public static final int VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR = 1000024002; + public static final long VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR = 0x02000000L; + public static final long VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR = 0x04000000L; + public static final MethodHandle MH_vkCmdDecodeVideoKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdDecodeVideoKHR; + + public VKKHRVideoDecodeQueue(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdDecodeVideoKHR = func.invoke(device, "vkCmdDecodeVideoKHR"); + } + + public void CmdDecodeVideoKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkVideoDecodeInfoKHR *") MemorySegment pDecodeInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdDecodeVideoKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdDecodeVideoKHR"); + try { MH_vkCmdDecodeVideoKHR.invokeExact(PFN_vkCmdDecodeVideoKHR, commandBuffer, pDecodeInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDecodeVideoKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeAv1.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeAv1.java new file mode 100644 index 00000000..6c289742 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeAv1.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoEncodeAv1 { + public static final int VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_INTRA_ONLY_KHR = 0; + public static final int VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_SINGLE_REFERENCE_KHR = 1; + public static final int VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_UNIDIRECTIONAL_COMPOUND_KHR = 2; + public static final int VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_BIDIRECTIONAL_COMPOUND_KHR = 3; + public static final int VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR = 0; + public static final int VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR = 1; + public static final int VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR = 2; + public static final int VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_AV1_CAPABILITY_GENERATE_OBU_EXTENSION_HEADER_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_AV1_CAPABILITY_PRIMARY_REFERENCE_CDF_ONLY_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_ENCODE_AV1_CAPABILITY_MOTION_VECTOR_SCALING_BIT_KHR = 0x00000010; + public static final int VK_VIDEO_ENCODE_AV1_STD_UNIFORM_TILE_SPACING_FLAG_SET_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_AV1_STD_SKIP_MODE_PRESENT_UNSET_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_AV1_STD_PRIMARY_REF_FRAME_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_AV1_STD_DELTA_Q_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_64_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_128_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_AV1_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008; + public static final int VK_KHR_VIDEO_ENCODE_AV1_SPEC_VERSION = 1; + public static final String VK_KHR_VIDEO_ENCODE_AV1_EXTENSION_NAME = "VK_KHR_video_encode_av1"; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_CAPABILITIES_KHR = 1000513000; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000513001; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PICTURE_INFO_KHR = 1000513002; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_DPB_SLOT_INFO_KHR = 1000513003; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_AV1_FEATURES_KHR = 1000513004; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PROFILE_INFO_KHR = 1000513005; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_INFO_KHR = 1000513006; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_LAYER_INFO_KHR = 1000513007; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUALITY_LEVEL_PROPERTIES_KHR = 1000513008; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_CREATE_INFO_KHR = 1000513009; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_GOP_REMAINING_FRAME_INFO_KHR = 1000513010; + public static final int VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR = 0x00040000; + public static final int VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR = 7; + + public VKKHRVideoEncodeAv1(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeH264.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeH264.java new file mode 100644 index 00000000..6e8b8245 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeH264.java @@ -0,0 +1,81 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoEncodeH264 { + public static final int VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010; + public static final int VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020; + public static final int VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040; + public static final int VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_KHR = 0x00000080; + public static final int VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR = 0x00000100; + public static final int VK_VIDEO_ENCODE_H264_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_H264_STD_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_H264_STD_SCALING_MATRIX_PRESENT_FLAG_SET_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_H264_STD_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_ENCODE_H264_STD_SECOND_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000010; + public static final int VK_VIDEO_ENCODE_H264_STD_PIC_INIT_QP_MINUS26_BIT_KHR = 0x00000020; + public static final int VK_VIDEO_ENCODE_H264_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040; + public static final int VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_KHR = 0x00000080; + public static final int VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_IMPLICIT_BIT_KHR = 0x00000100; + public static final int VK_VIDEO_ENCODE_H264_STD_TRANSFORM_8X8_MODE_FLAG_SET_BIT_KHR = 0x00000200; + public static final int VK_VIDEO_ENCODE_H264_STD_DIRECT_SPATIAL_MV_PRED_FLAG_UNSET_BIT_KHR = 0x00000400; + public static final int VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_UNSET_BIT_KHR = 0x00000800; + public static final int VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_SET_BIT_KHR = 0x00001000; + public static final int VK_VIDEO_ENCODE_H264_STD_DIRECT_8X8_INFERENCE_FLAG_UNSET_BIT_KHR = 0x00002000; + public static final int VK_VIDEO_ENCODE_H264_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000; + public static final int VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_DISABLED_BIT_KHR = 0x00008000; + public static final int VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_ENABLED_BIT_KHR = 0x00010000; + public static final int VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_PARTIAL_BIT_KHR = 0x00020000; + public static final int VK_VIDEO_ENCODE_H264_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000; + public static final int VK_VIDEO_ENCODE_H264_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000; + public static final int VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_ENCODE_H264_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010; + public static final int VK_KHR_VIDEO_ENCODE_H264_SPEC_VERSION = 14; + public static final String VK_KHR_VIDEO_ENCODE_H264_EXTENSION_NAME = "VK_KHR_video_encode_h264"; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_KHR = 1000038000; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000038001; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000038002; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR = 1000038003; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR = 1000038004; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR = 1000038005; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR = 1000038006; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_KHR = 1000038007; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR = 1000038008; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR = 1000038009; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR = 1000038010; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_KHR = 1000038011; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR = 1000038012; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000038013; + public static final int VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR = 0x00010000; + + public VKKHRVideoEncodeH264(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeH265.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeH265.java new file mode 100644 index 00000000..fba4784f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeH265.java @@ -0,0 +1,90 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoEncodeH265 { + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010; + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020; + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040; + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_PER_SLICE_SEGMENT_CONSTANT_QP_BIT_KHR = 0x00000080; + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILES_PER_SLICE_SEGMENT_BIT_KHR = 0x00000100; + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT_KHR = 0x00000200; + public static final int VK_VIDEO_ENCODE_H265_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_H265_STD_SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_H265_STD_SCALING_LIST_DATA_PRESENT_FLAG_SET_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_H265_STD_PCM_ENABLED_FLAG_SET_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_ENCODE_H265_STD_SPS_TEMPORAL_MVP_ENABLED_FLAG_SET_BIT_KHR = 0x00000010; + public static final int VK_VIDEO_ENCODE_H265_STD_INIT_QP_MINUS26_BIT_KHR = 0x00000020; + public static final int VK_VIDEO_ENCODE_H265_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040; + public static final int VK_VIDEO_ENCODE_H265_STD_WEIGHTED_BIPRED_FLAG_SET_BIT_KHR = 0x00000080; + public static final int VK_VIDEO_ENCODE_H265_STD_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_KHR = 0x00000100; + public static final int VK_VIDEO_ENCODE_H265_STD_SIGN_DATA_HIDING_ENABLED_FLAG_SET_BIT_KHR = 0x00000200; + public static final int VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_SET_BIT_KHR = 0x00000400; + public static final int VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_UNSET_BIT_KHR = 0x00000800; + public static final int VK_VIDEO_ENCODE_H265_STD_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET_BIT_KHR = 0x00001000; + public static final int VK_VIDEO_ENCODE_H265_STD_TRANSQUANT_BYPASS_ENABLED_FLAG_SET_BIT_KHR = 0x00002000; + public static final int VK_VIDEO_ENCODE_H265_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000; + public static final int VK_VIDEO_ENCODE_H265_STD_ENTROPY_CODING_SYNC_ENABLED_FLAG_SET_BIT_KHR = 0x00008000; + public static final int VK_VIDEO_ENCODE_H265_STD_DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET_BIT_KHR = 0x00010000; + public static final int VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET_BIT_KHR = 0x00020000; + public static final int VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENT_FLAG_SET_BIT_KHR = 0x00040000; + public static final int VK_VIDEO_ENCODE_H265_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000; + public static final int VK_VIDEO_ENCODE_H265_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000; + public static final int VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_ENCODE_H265_RATE_CONTROL_TEMPORAL_SUB_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010; + public static final int VK_KHR_VIDEO_ENCODE_H265_SPEC_VERSION = 14; + public static final String VK_KHR_VIDEO_ENCODE_H265_EXTENSION_NAME = "VK_KHR_video_encode_h265"; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_KHR = 1000039000; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000039001; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000039002; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR = 1000039003; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR = 1000039004; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR = 1000039005; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR = 1000039006; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR = 1000039007; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR = 1000039009; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR = 1000039010; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR = 1000039011; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_KHR = 1000039012; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR = 1000039013; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000039014; + public static final int VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR = 0x00020000; + + public VKKHRVideoEncodeH265(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeQuantizationMap.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeQuantizationMap.java new file mode 100644 index 00000000..6f689bb3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeQuantizationMap.java @@ -0,0 +1,56 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoEncodeQuantizationMap { + public static final int VK_KHR_VIDEO_ENCODE_QUANTIZATION_MAP_SPEC_VERSION = 2; + public static final String VK_KHR_VIDEO_ENCODE_QUANTIZATION_MAP_EXTENSION_NAME = "VK_KHR_video_encode_quantization_map"; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553000; + public static final int VK_STRUCTURE_TYPE_VIDEO_FORMAT_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553001; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_INFO_KHR = 1000553002; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000553005; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUANTIZATION_MAP_FEATURES_KHR = 1000553009; + public static final int VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x00000010; + public static final int VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR = 0x00000002; + public static final int VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x02000000; + public static final int VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x04000000; + public static final long VK_FORMAT_FEATURE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x2000000000000L; + public static final long VK_FORMAT_FEATURE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x4000000000000L; + public static final int VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR = 1000553000; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553003; + public static final int VK_VIDEO_ENCODE_H264_CAPABILITY_MB_QP_DIFF_WRAPAROUND_BIT_KHR = 0x00000200; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553004; + public static final int VK_STRUCTURE_TYPE_VIDEO_FORMAT_H265_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553006; + public static final int VK_VIDEO_ENCODE_H265_CAPABILITY_CU_QP_DIFF_WRAPAROUND_BIT_KHR = 0x00000400; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553007; + public static final int VK_STRUCTURE_TYPE_VIDEO_FORMAT_AV1_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553008; + + public VKKHRVideoEncodeQuantizationMap(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeQueue.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeQueue.java new file mode 100644 index 00000000..073bd154 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoEncodeQueue.java @@ -0,0 +1,115 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoEncodeQueue { + public static final int VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0; + public static final int VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0; + public static final int VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0; + public static final int VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1; + public static final int VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2; + public static final int VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3; + public static final int VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4; + public static final int VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = 0; + public static final int VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 0x00000004; + public static final int VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION = 12; + public static final String VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_encode_queue"; + public static final long VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR = 0x08000000L; + public static final long VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR = 0x2000000000L; + public static final long VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR = 0x4000000000L; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR = 1000299000; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR = 1000299001; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR = 1000299002; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR = 1000299003; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR = 1000299004; + public static final int VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR = 1000299005; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299006; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR = 1000299007; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299008; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR = 1000299009; + public static final int VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000299010; + public static final int VK_QUEUE_VIDEO_ENCODE_BIT_KHR = 0x00000040; + public static final int VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR = 0x00000004; + public static final int VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000; + public static final int VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000; + public static final int VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000; + public static final int VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000; + public static final int VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000; + public static final int VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000; + public static final int VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000; + public static final int VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR = 0x00000002; + public static final int VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR = 1000299000; + public static final int VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR = 1000299001; + public static final int VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR = 1000299002; + public static final int VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR = 1000299000; + public static final int VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR = -1000299000; + public static final int VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR = -1000299000; + public static final long VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000L; + public static final long VK_FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000L; + public static final MethodHandle MH_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetEncodedVideoSessionParametersKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdEncodeVideoKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR; + public final MemorySegment PFN_vkGetEncodedVideoSessionParametersKHR; + public final MemorySegment PFN_vkCmdEncodeVideoKHR; + + public VKKHRVideoEncodeQueue(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = func.invoke(device, "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR"); + PFN_vkGetEncodedVideoSessionParametersKHR = func.invoke(device, "vkGetEncodedVideoSessionParametersKHR"); + PFN_vkCmdEncodeVideoKHR = func.invoke(device, "vkCmdEncodeVideoKHR"); + } + + public @CType("VkResult") int GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR *") MemorySegment pQualityLevelInfo, @CType("VkVideoEncodeQualityLevelPropertiesKHR *") MemorySegment pQualityLevelProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR"); + try { return (int) MH_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR.invokeExact(PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR, physicalDevice, pQualityLevelInfo, pQualityLevelProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR", e); } + } + + public @CType("VkResult") int GetEncodedVideoSessionParametersKHR(@CType("VkDevice") MemorySegment device, @CType("const VkVideoEncodeSessionParametersGetInfoKHR *") MemorySegment pVideoSessionParametersInfo, @CType("VkVideoEncodeSessionParametersFeedbackInfoKHR *") MemorySegment pFeedbackInfo, @CType("size_t *") MemorySegment pDataSize, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetEncodedVideoSessionParametersKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetEncodedVideoSessionParametersKHR"); + try { return (int) MH_vkGetEncodedVideoSessionParametersKHR.invokeExact(PFN_vkGetEncodedVideoSessionParametersKHR, device, pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetEncodedVideoSessionParametersKHR", e); } + } + + public void CmdEncodeVideoKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkVideoEncodeInfoKHR *") MemorySegment pEncodeInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdEncodeVideoKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdEncodeVideoKHR"); + try { MH_vkCmdEncodeVideoKHR.invokeExact(PFN_vkCmdEncodeVideoKHR, commandBuffer, pEncodeInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEncodeVideoKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoMaintenance1.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoMaintenance1.java new file mode 100644 index 00000000..3f70b429 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoMaintenance1.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoMaintenance1 { + public static final int VK_KHR_VIDEO_MAINTENANCE_1_SPEC_VERSION = 1; + public static final String VK_KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_video_maintenance1"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR = 1000515000; + public static final int VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR = 1000515001; + public static final int VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00100000; + public static final int VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00000040; + public static final int VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR = 0x00000004; + + public VKKHRVideoMaintenance1(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoQueue.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoQueue.java new file mode 100644 index 00000000..006bd579 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVideoQueue.java @@ -0,0 +1,184 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRVideoQueue { + public static final int VK_VIDEO_CODEC_OPERATION_NONE_KHR = 0; + public static final int VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR = 0; + public static final int VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR = 0x00000008; + public static final int VK_VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR = 0; + public static final int VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR = 0x00000004; + public static final int VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR = 0x00000010; + public static final int VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR = 0x00000002; + public static final int VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 0x00000001; + public static final int VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR = 0x00000001; + public static final int VK_QUERY_RESULT_STATUS_ERROR_KHR = -1; + public static final int VK_QUERY_RESULT_STATUS_NOT_READY_KHR = 0; + public static final int VK_QUERY_RESULT_STATUS_COMPLETE_KHR = 1; + public static final int VK_KHR_VIDEO_QUEUE_SPEC_VERSION = 8; + public static final String VK_KHR_VIDEO_QUEUE_EXTENSION_NAME = "VK_KHR_video_queue"; + public static final int VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR = 1000023000; + public static final int VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR = 1000023001; + public static final int VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR = 1000023002; + public static final int VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR = 1000023003; + public static final int VK_STRUCTURE_TYPE_BIND_VIDEO_SESSION_MEMORY_INFO_KHR = 1000023004; + public static final int VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR = 1000023005; + public static final int VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000023006; + public static final int VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR = 1000023007; + public static final int VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR = 1000023008; + public static final int VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR = 1000023009; + public static final int VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR = 1000023010; + public static final int VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR = 1000023011; + public static final int VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR = 1000023012; + public static final int VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR = 1000023013; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR = 1000023014; + public static final int VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR = 1000023015; + public static final int VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR = 1000023016; + public static final int VK_OBJECT_TYPE_VIDEO_SESSION_KHR = 1000023000; + public static final int VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR = 1000023001; + public static final int VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR = 1000023000; + public static final int VK_QUERY_RESULT_WITH_STATUS_BIT_KHR = 0x00000010; + public static final int VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR = -1000023000; + public static final int VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR = -1000023001; + public static final int VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR = -1000023002; + public static final int VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR = -1000023003; + public static final int VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR = -1000023004; + public static final int VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR = -1000023005; + public static final MethodHandle MH_vkGetPhysicalDeviceVideoCapabilitiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceVideoFormatPropertiesKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateVideoSessionKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyVideoSessionKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetVideoSessionMemoryRequirementsKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkBindVideoSessionMemoryKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateVideoSessionParametersKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkUpdateVideoSessionParametersKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyVideoSessionParametersKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBeginVideoCodingKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdEndVideoCodingKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdControlVideoCodingKHR = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR; + public final MemorySegment PFN_vkCreateVideoSessionKHR; + public final MemorySegment PFN_vkDestroyVideoSessionKHR; + public final MemorySegment PFN_vkGetVideoSessionMemoryRequirementsKHR; + public final MemorySegment PFN_vkBindVideoSessionMemoryKHR; + public final MemorySegment PFN_vkCreateVideoSessionParametersKHR; + public final MemorySegment PFN_vkUpdateVideoSessionParametersKHR; + public final MemorySegment PFN_vkDestroyVideoSessionParametersKHR; + public final MemorySegment PFN_vkCmdBeginVideoCodingKHR; + public final MemorySegment PFN_vkCmdEndVideoCodingKHR; + public final MemorySegment PFN_vkCmdControlVideoCodingKHR; + + public VKKHRVideoQueue(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR = func.invoke(device, "vkGetPhysicalDeviceVideoCapabilitiesKHR"); + PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR = func.invoke(device, "vkGetPhysicalDeviceVideoFormatPropertiesKHR"); + PFN_vkCreateVideoSessionKHR = func.invoke(device, "vkCreateVideoSessionKHR"); + PFN_vkDestroyVideoSessionKHR = func.invoke(device, "vkDestroyVideoSessionKHR"); + PFN_vkGetVideoSessionMemoryRequirementsKHR = func.invoke(device, "vkGetVideoSessionMemoryRequirementsKHR"); + PFN_vkBindVideoSessionMemoryKHR = func.invoke(device, "vkBindVideoSessionMemoryKHR"); + PFN_vkCreateVideoSessionParametersKHR = func.invoke(device, "vkCreateVideoSessionParametersKHR"); + PFN_vkUpdateVideoSessionParametersKHR = func.invoke(device, "vkUpdateVideoSessionParametersKHR"); + PFN_vkDestroyVideoSessionParametersKHR = func.invoke(device, "vkDestroyVideoSessionParametersKHR"); + PFN_vkCmdBeginVideoCodingKHR = func.invoke(device, "vkCmdBeginVideoCodingKHR"); + PFN_vkCmdEndVideoCodingKHR = func.invoke(device, "vkCmdEndVideoCodingKHR"); + PFN_vkCmdControlVideoCodingKHR = func.invoke(device, "vkCmdControlVideoCodingKHR"); + } + + public @CType("VkResult") int GetPhysicalDeviceVideoCapabilitiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkVideoProfileInfoKHR *") MemorySegment pVideoProfile, @CType("VkVideoCapabilitiesKHR *") MemorySegment pCapabilities) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceVideoCapabilitiesKHR"); + try { return (int) MH_vkGetPhysicalDeviceVideoCapabilitiesKHR.invokeExact(PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR, physicalDevice, pVideoProfile, pCapabilities); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceVideoCapabilitiesKHR", e); } + } + + public @CType("VkResult") int GetPhysicalDeviceVideoFormatPropertiesKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkPhysicalDeviceVideoFormatInfoKHR *") MemorySegment pVideoFormatInfo, @CType("uint32_t *") MemorySegment pVideoFormatPropertyCount, @CType("VkVideoFormatPropertiesKHR *") MemorySegment pVideoFormatProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceVideoFormatPropertiesKHR"); + try { return (int) MH_vkGetPhysicalDeviceVideoFormatPropertiesKHR.invokeExact(PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR, physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, pVideoFormatProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceVideoFormatPropertiesKHR", e); } + } + + public @CType("VkResult") int CreateVideoSessionKHR(@CType("VkDevice") MemorySegment device, @CType("const VkVideoSessionCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkVideoSessionKHR *") MemorySegment pVideoSession) { + if (Unmarshal.isNullPointer(PFN_vkCreateVideoSessionKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateVideoSessionKHR"); + try { return (int) MH_vkCreateVideoSessionKHR.invokeExact(PFN_vkCreateVideoSessionKHR, device, pCreateInfo, pAllocator, pVideoSession); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateVideoSessionKHR", e); } + } + + public void DestroyVideoSessionKHR(@CType("VkDevice") MemorySegment device, @CType("VkVideoSessionKHR") MemorySegment videoSession, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyVideoSessionKHR)) throw new SymbolNotFoundError("Symbol not found: vkDestroyVideoSessionKHR"); + try { MH_vkDestroyVideoSessionKHR.invokeExact(PFN_vkDestroyVideoSessionKHR, device, videoSession, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyVideoSessionKHR", e); } + } + + public @CType("VkResult") int GetVideoSessionMemoryRequirementsKHR(@CType("VkDevice") MemorySegment device, @CType("VkVideoSessionKHR") MemorySegment videoSession, @CType("uint32_t *") MemorySegment pMemoryRequirementsCount, @CType("VkVideoSessionMemoryRequirementsKHR *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetVideoSessionMemoryRequirementsKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetVideoSessionMemoryRequirementsKHR"); + try { return (int) MH_vkGetVideoSessionMemoryRequirementsKHR.invokeExact(PFN_vkGetVideoSessionMemoryRequirementsKHR, device, videoSession, pMemoryRequirementsCount, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetVideoSessionMemoryRequirementsKHR", e); } + } + + public @CType("VkResult") int BindVideoSessionMemoryKHR(@CType("VkDevice") MemorySegment device, @CType("VkVideoSessionKHR") MemorySegment videoSession, @CType("uint32_t") int bindSessionMemoryInfoCount, @CType("const VkBindVideoSessionMemoryInfoKHR *") MemorySegment pBindSessionMemoryInfos) { + if (Unmarshal.isNullPointer(PFN_vkBindVideoSessionMemoryKHR)) throw new SymbolNotFoundError("Symbol not found: vkBindVideoSessionMemoryKHR"); + try { return (int) MH_vkBindVideoSessionMemoryKHR.invokeExact(PFN_vkBindVideoSessionMemoryKHR, device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkBindVideoSessionMemoryKHR", e); } + } + + public @CType("VkResult") int CreateVideoSessionParametersKHR(@CType("VkDevice") MemorySegment device, @CType("const VkVideoSessionParametersCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkVideoSessionParametersKHR *") MemorySegment pVideoSessionParameters) { + if (Unmarshal.isNullPointer(PFN_vkCreateVideoSessionParametersKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateVideoSessionParametersKHR"); + try { return (int) MH_vkCreateVideoSessionParametersKHR.invokeExact(PFN_vkCreateVideoSessionParametersKHR, device, pCreateInfo, pAllocator, pVideoSessionParameters); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateVideoSessionParametersKHR", e); } + } + + public @CType("VkResult") int UpdateVideoSessionParametersKHR(@CType("VkDevice") MemorySegment device, @CType("VkVideoSessionParametersKHR") MemorySegment videoSessionParameters, @CType("const VkVideoSessionParametersUpdateInfoKHR *") MemorySegment pUpdateInfo) { + if (Unmarshal.isNullPointer(PFN_vkUpdateVideoSessionParametersKHR)) throw new SymbolNotFoundError("Symbol not found: vkUpdateVideoSessionParametersKHR"); + try { return (int) MH_vkUpdateVideoSessionParametersKHR.invokeExact(PFN_vkUpdateVideoSessionParametersKHR, device, videoSessionParameters, pUpdateInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkUpdateVideoSessionParametersKHR", e); } + } + + public void DestroyVideoSessionParametersKHR(@CType("VkDevice") MemorySegment device, @CType("VkVideoSessionParametersKHR") MemorySegment videoSessionParameters, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyVideoSessionParametersKHR)) throw new SymbolNotFoundError("Symbol not found: vkDestroyVideoSessionParametersKHR"); + try { MH_vkDestroyVideoSessionParametersKHR.invokeExact(PFN_vkDestroyVideoSessionParametersKHR, device, videoSessionParameters, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyVideoSessionParametersKHR", e); } + } + + public void CmdBeginVideoCodingKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkVideoBeginCodingInfoKHR *") MemorySegment pBeginInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdBeginVideoCodingKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdBeginVideoCodingKHR"); + try { MH_vkCmdBeginVideoCodingKHR.invokeExact(PFN_vkCmdBeginVideoCodingKHR, commandBuffer, pBeginInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBeginVideoCodingKHR", e); } + } + + public void CmdEndVideoCodingKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkVideoEndCodingInfoKHR *") MemorySegment pEndCodingInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdEndVideoCodingKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdEndVideoCodingKHR"); + try { MH_vkCmdEndVideoCodingKHR.invokeExact(PFN_vkCmdEndVideoCodingKHR, commandBuffer, pEndCodingInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdEndVideoCodingKHR", e); } + } + + public void CmdControlVideoCodingKHR(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkVideoCodingControlInfoKHR *") MemorySegment pCodingControlInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdControlVideoCodingKHR)) throw new SymbolNotFoundError("Symbol not found: vkCmdControlVideoCodingKHR"); + try { MH_vkCmdControlVideoCodingKHR.invokeExact(PFN_vkCmdControlVideoCodingKHR, commandBuffer, pCodingControlInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdControlVideoCodingKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVulkanMemoryModel.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVulkanMemoryModel.java new file mode 100644 index 00000000..e9968d3d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRVulkanMemoryModel.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK12.*; +public class VKKHRVulkanMemoryModel { + public static final int VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION = 3; + public static final String VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME = "VK_KHR_vulkan_memory_model"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES; + + public VKKHRVulkanMemoryModel(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWaylandSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWaylandSurface.java new file mode 100644 index 00000000..b1d5e31a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWaylandSurface.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRWaylandSurface { + public static final int VK_KHR_WAYLAND_SURFACE_SPEC_VERSION = 6; + public static final String VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME = "VK_KHR_wayland_surface"; + public static final int VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000; + public static final MethodHandle MH_vkCreateWaylandSurfaceKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceWaylandPresentationSupportKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateWaylandSurfaceKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR; + + public VKKHRWaylandSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateWaylandSurfaceKHR = func.invoke(instance, "vkCreateWaylandSurfaceKHR"); + PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR = func.invoke(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR"); + } + + public @CType("VkResult") int CreateWaylandSurfaceKHR(@CType("VkInstance") MemorySegment instance, @CType("const VkWaylandSurfaceCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateWaylandSurfaceKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateWaylandSurfaceKHR"); + try { return (int) MH_vkCreateWaylandSurfaceKHR.invokeExact(PFN_vkCreateWaylandSurfaceKHR, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateWaylandSurfaceKHR", e); } + } + + public @CType("VkBool32") int GetPhysicalDeviceWaylandPresentationSupportKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t") int queueFamilyIndex, @CType("struct wl_display *") MemorySegment display) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceWaylandPresentationSupportKHR"); + try { return (int) MH_vkGetPhysicalDeviceWaylandPresentationSupportKHR.invokeExact(PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR, physicalDevice, queueFamilyIndex, display); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceWaylandPresentationSupportKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWin32KeyedMutex.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWin32KeyedMutex.java new file mode 100644 index 00000000..1fa8ba83 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWin32KeyedMutex.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRWin32KeyedMutex { + public static final int VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION = 1; + public static final String VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_KHR_win32_keyed_mutex"; + public static final int VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000; + + public VKKHRWin32KeyedMutex(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWin32Surface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWin32Surface.java new file mode 100644 index 00000000..51442898 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWin32Surface.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRWin32Surface { + public static final int VK_KHR_WIN32_SURFACE_SPEC_VERSION = 6; + public static final String VK_KHR_WIN32_SURFACE_EXTENSION_NAME = "VK_KHR_win32_surface"; + public static final int VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000; + public static final MethodHandle MH_vkCreateWin32SurfaceKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceWin32PresentationSupportKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCreateWin32SurfaceKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR; + + public VKKHRWin32Surface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateWin32SurfaceKHR = func.invoke(instance, "vkCreateWin32SurfaceKHR"); + PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR = func.invoke(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR"); + } + + public @CType("VkResult") int CreateWin32SurfaceKHR(@CType("VkInstance") MemorySegment instance, @CType("const VkWin32SurfaceCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateWin32SurfaceKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateWin32SurfaceKHR"); + try { return (int) MH_vkCreateWin32SurfaceKHR.invokeExact(PFN_vkCreateWin32SurfaceKHR, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateWin32SurfaceKHR", e); } + } + + public @CType("VkBool32") int GetPhysicalDeviceWin32PresentationSupportKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t") int queueFamilyIndex) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceWin32PresentationSupportKHR"); + try { return (int) MH_vkGetPhysicalDeviceWin32PresentationSupportKHR.invokeExact(PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR, physicalDevice, queueFamilyIndex); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceWin32PresentationSupportKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWorkgroupMemoryExplicitLayout.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWorkgroupMemoryExplicitLayout.java new file mode 100644 index 00000000..0db80cb5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRWorkgroupMemoryExplicitLayout.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRWorkgroupMemoryExplicitLayout { + public static final int VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_SPEC_VERSION = 1; + public static final String VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME = "VK_KHR_workgroup_memory_explicit_layout"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR = 1000336000; + + public VKKHRWorkgroupMemoryExplicitLayout(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRXcbSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRXcbSurface.java new file mode 100644 index 00000000..45c698d5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRXcbSurface.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRXcbSurface { + public static final int VK_KHR_XCB_SURFACE_SPEC_VERSION = 6; + public static final String VK_KHR_XCB_SURFACE_EXTENSION_NAME = "VK_KHR_xcb_surface"; + public static final int VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000; + public static final MethodHandle MH_vkCreateXcbSurfaceKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceXcbPresentationSupportKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCreateXcbSurfaceKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR; + + public VKKHRXcbSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateXcbSurfaceKHR = func.invoke(instance, "vkCreateXcbSurfaceKHR"); + PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR = func.invoke(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR"); + } + + public @CType("VkResult") int CreateXcbSurfaceKHR(@CType("VkInstance") MemorySegment instance, @CType("const VkXcbSurfaceCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateXcbSurfaceKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateXcbSurfaceKHR"); + try { return (int) MH_vkCreateXcbSurfaceKHR.invokeExact(PFN_vkCreateXcbSurfaceKHR, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateXcbSurfaceKHR", e); } + } + + public @CType("VkBool32") int GetPhysicalDeviceXcbPresentationSupportKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t") int queueFamilyIndex, @CType("xcb_connection_t *") MemorySegment connection, @CType("xcb_visualid_t") int visual_id) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceXcbPresentationSupportKHR"); + try { return (int) MH_vkGetPhysicalDeviceXcbPresentationSupportKHR.invokeExact(PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR, physicalDevice, queueFamilyIndex, connection, visual_id); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceXcbPresentationSupportKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRXlibSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRXlibSurface.java new file mode 100644 index 00000000..f5ea4e27 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRXlibSurface.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKKHRXlibSurface { + public static final int VK_KHR_XLIB_SURFACE_SPEC_VERSION = 6; + public static final String VK_KHR_XLIB_SURFACE_EXTENSION_NAME = "VK_KHR_xlib_surface"; + public static final int VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000; + public static final MethodHandle MH_vkCreateXlibSurfaceKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceXlibPresentationSupportKHR = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public final MemorySegment PFN_vkCreateXlibSurfaceKHR; + public final MemorySegment PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR; + + public VKKHRXlibSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateXlibSurfaceKHR = func.invoke(instance, "vkCreateXlibSurfaceKHR"); + PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR = func.invoke(instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR"); + } + + public @CType("VkResult") int CreateXlibSurfaceKHR(@CType("VkInstance") MemorySegment instance, @CType("const VkXlibSurfaceCreateInfoKHR *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateXlibSurfaceKHR)) throw new SymbolNotFoundError("Symbol not found: vkCreateXlibSurfaceKHR"); + try { return (int) MH_vkCreateXlibSurfaceKHR.invokeExact(PFN_vkCreateXlibSurfaceKHR, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateXlibSurfaceKHR", e); } + } + + public @CType("VkBool32") int GetPhysicalDeviceXlibPresentationSupportKHR(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t") int queueFamilyIndex, @CType("Display *") MemorySegment dpy, @CType("VisualID") long visualID) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceXlibPresentationSupportKHR"); + try { return (int) MH_vkGetPhysicalDeviceXlibPresentationSupportKHR.invokeExact(PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR, physicalDevice, queueFamilyIndex, dpy, visualID); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceXlibPresentationSupportKHR", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRZeroInitializeWorkgroupMemory.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRZeroInitializeWorkgroupMemory.java new file mode 100644 index 00000000..817391fc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/VKKHRZeroInitializeWorkgroupMemory.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKKHRZeroInitializeWorkgroupMemory { + public static final int VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_SPEC_VERSION = 1; + public static final String VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME = "VK_KHR_zero_initialize_workgroup_memory"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES; + + public VKKHRZeroInitializeWorkgroupMemory(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAabbPositionsKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAabbPositionsKHR.java new file mode 100644 index 00000000..39f007a2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAabbPositionsKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### minX +/// [VarHandle][#VH_minX] - [Getter][#minX()] - [Setter][#minX(float)] +/// ### minY +/// [VarHandle][#VH_minY] - [Getter][#minY()] - [Setter][#minY(float)] +/// ### minZ +/// [VarHandle][#VH_minZ] - [Getter][#minZ()] - [Setter][#minZ(float)] +/// ### maxX +/// [VarHandle][#VH_maxX] - [Getter][#maxX()] - [Setter][#maxX(float)] +/// ### maxY +/// [VarHandle][#VH_maxY] - [Getter][#maxY()] - [Setter][#maxY(float)] +/// ### maxZ +/// [VarHandle][#VH_maxZ] - [Getter][#maxZ()] - [Setter][#maxZ(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAabbPositionsKHR { +/// float minX; +/// float minY; +/// float minZ; +/// float maxX; +/// float maxY; +/// float maxZ; +/// } VkAabbPositionsKHR; +/// ``` +public final class VkAabbPositionsKHR extends Struct { + /// The struct layout of `VkAabbPositionsKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_FLOAT.withName("minX"), + ValueLayout.JAVA_FLOAT.withName("minY"), + ValueLayout.JAVA_FLOAT.withName("minZ"), + ValueLayout.JAVA_FLOAT.withName("maxX"), + ValueLayout.JAVA_FLOAT.withName("maxY"), + ValueLayout.JAVA_FLOAT.withName("maxZ") + ); + /// The [VarHandle] of `minX` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minX")); + /// The [VarHandle] of `minY` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minY")); + /// The [VarHandle] of `minZ` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minZ = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minZ")); + /// The [VarHandle] of `maxX` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxX")); + /// The [VarHandle] of `maxY` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxY")); + /// The [VarHandle] of `maxZ` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxZ = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxZ")); + + /// Creates `VkAabbPositionsKHR` with the given segment. + /// @param segment the memory segment + public VkAabbPositionsKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAabbPositionsKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAabbPositionsKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAabbPositionsKHR(segment); } + + /// Creates `VkAabbPositionsKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAabbPositionsKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAabbPositionsKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAabbPositionsKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAabbPositionsKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAabbPositionsKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAabbPositionsKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAabbPositionsKHR` + public static VkAabbPositionsKHR alloc(SegmentAllocator allocator) { return new VkAabbPositionsKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAabbPositionsKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAabbPositionsKHR` + public static VkAabbPositionsKHR alloc(SegmentAllocator allocator, long count) { return new VkAabbPositionsKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `minX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minX(MemorySegment segment, long index) { return (float) VH_minX.get(segment, 0L, index); } + /// {@return `minX`} + /// @param segment the segment of the struct + public static @CType("float") float get_minX(MemorySegment segment) { return VkAabbPositionsKHR.get_minX(segment, 0L); } + /// {@return `minX` at the given index} + /// @param index the index + public @CType("float") float minXAt(long index) { return VkAabbPositionsKHR.get_minX(this.segment(), index); } + /// {@return `minX`} + public @CType("float") float minX() { return VkAabbPositionsKHR.get_minX(this.segment()); } + /// Sets `minX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minX(MemorySegment segment, long index, @CType("float") float value) { VH_minX.set(segment, 0L, index, value); } + /// Sets `minX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minX(MemorySegment segment, @CType("float") float value) { VkAabbPositionsKHR.set_minX(segment, 0L, value); } + /// Sets `minX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR minXAt(long index, @CType("float") float value) { VkAabbPositionsKHR.set_minX(this.segment(), index, value); return this; } + /// Sets `minX` with the given value. + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR minX(@CType("float") float value) { VkAabbPositionsKHR.set_minX(this.segment(), value); return this; } + + /// {@return `minY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minY(MemorySegment segment, long index) { return (float) VH_minY.get(segment, 0L, index); } + /// {@return `minY`} + /// @param segment the segment of the struct + public static @CType("float") float get_minY(MemorySegment segment) { return VkAabbPositionsKHR.get_minY(segment, 0L); } + /// {@return `minY` at the given index} + /// @param index the index + public @CType("float") float minYAt(long index) { return VkAabbPositionsKHR.get_minY(this.segment(), index); } + /// {@return `minY`} + public @CType("float") float minY() { return VkAabbPositionsKHR.get_minY(this.segment()); } + /// Sets `minY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minY(MemorySegment segment, long index, @CType("float") float value) { VH_minY.set(segment, 0L, index, value); } + /// Sets `minY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minY(MemorySegment segment, @CType("float") float value) { VkAabbPositionsKHR.set_minY(segment, 0L, value); } + /// Sets `minY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR minYAt(long index, @CType("float") float value) { VkAabbPositionsKHR.set_minY(this.segment(), index, value); return this; } + /// Sets `minY` with the given value. + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR minY(@CType("float") float value) { VkAabbPositionsKHR.set_minY(this.segment(), value); return this; } + + /// {@return `minZ` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minZ(MemorySegment segment, long index) { return (float) VH_minZ.get(segment, 0L, index); } + /// {@return `minZ`} + /// @param segment the segment of the struct + public static @CType("float") float get_minZ(MemorySegment segment) { return VkAabbPositionsKHR.get_minZ(segment, 0L); } + /// {@return `minZ` at the given index} + /// @param index the index + public @CType("float") float minZAt(long index) { return VkAabbPositionsKHR.get_minZ(this.segment(), index); } + /// {@return `minZ`} + public @CType("float") float minZ() { return VkAabbPositionsKHR.get_minZ(this.segment()); } + /// Sets `minZ` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minZ(MemorySegment segment, long index, @CType("float") float value) { VH_minZ.set(segment, 0L, index, value); } + /// Sets `minZ` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minZ(MemorySegment segment, @CType("float") float value) { VkAabbPositionsKHR.set_minZ(segment, 0L, value); } + /// Sets `minZ` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR minZAt(long index, @CType("float") float value) { VkAabbPositionsKHR.set_minZ(this.segment(), index, value); return this; } + /// Sets `minZ` with the given value. + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR minZ(@CType("float") float value) { VkAabbPositionsKHR.set_minZ(this.segment(), value); return this; } + + /// {@return `maxX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxX(MemorySegment segment, long index) { return (float) VH_maxX.get(segment, 0L, index); } + /// {@return `maxX`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxX(MemorySegment segment) { return VkAabbPositionsKHR.get_maxX(segment, 0L); } + /// {@return `maxX` at the given index} + /// @param index the index + public @CType("float") float maxXAt(long index) { return VkAabbPositionsKHR.get_maxX(this.segment(), index); } + /// {@return `maxX`} + public @CType("float") float maxX() { return VkAabbPositionsKHR.get_maxX(this.segment()); } + /// Sets `maxX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxX(MemorySegment segment, long index, @CType("float") float value) { VH_maxX.set(segment, 0L, index, value); } + /// Sets `maxX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxX(MemorySegment segment, @CType("float") float value) { VkAabbPositionsKHR.set_maxX(segment, 0L, value); } + /// Sets `maxX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR maxXAt(long index, @CType("float") float value) { VkAabbPositionsKHR.set_maxX(this.segment(), index, value); return this; } + /// Sets `maxX` with the given value. + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR maxX(@CType("float") float value) { VkAabbPositionsKHR.set_maxX(this.segment(), value); return this; } + + /// {@return `maxY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxY(MemorySegment segment, long index) { return (float) VH_maxY.get(segment, 0L, index); } + /// {@return `maxY`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxY(MemorySegment segment) { return VkAabbPositionsKHR.get_maxY(segment, 0L); } + /// {@return `maxY` at the given index} + /// @param index the index + public @CType("float") float maxYAt(long index) { return VkAabbPositionsKHR.get_maxY(this.segment(), index); } + /// {@return `maxY`} + public @CType("float") float maxY() { return VkAabbPositionsKHR.get_maxY(this.segment()); } + /// Sets `maxY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxY(MemorySegment segment, long index, @CType("float") float value) { VH_maxY.set(segment, 0L, index, value); } + /// Sets `maxY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxY(MemorySegment segment, @CType("float") float value) { VkAabbPositionsKHR.set_maxY(segment, 0L, value); } + /// Sets `maxY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR maxYAt(long index, @CType("float") float value) { VkAabbPositionsKHR.set_maxY(this.segment(), index, value); return this; } + /// Sets `maxY` with the given value. + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR maxY(@CType("float") float value) { VkAabbPositionsKHR.set_maxY(this.segment(), value); return this; } + + /// {@return `maxZ` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxZ(MemorySegment segment, long index) { return (float) VH_maxZ.get(segment, 0L, index); } + /// {@return `maxZ`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxZ(MemorySegment segment) { return VkAabbPositionsKHR.get_maxZ(segment, 0L); } + /// {@return `maxZ` at the given index} + /// @param index the index + public @CType("float") float maxZAt(long index) { return VkAabbPositionsKHR.get_maxZ(this.segment(), index); } + /// {@return `maxZ`} + public @CType("float") float maxZ() { return VkAabbPositionsKHR.get_maxZ(this.segment()); } + /// Sets `maxZ` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxZ(MemorySegment segment, long index, @CType("float") float value) { VH_maxZ.set(segment, 0L, index, value); } + /// Sets `maxZ` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxZ(MemorySegment segment, @CType("float") float value) { VkAabbPositionsKHR.set_maxZ(segment, 0L, value); } + /// Sets `maxZ` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR maxZAt(long index, @CType("float") float value) { VkAabbPositionsKHR.set_maxZ(this.segment(), index, value); return this; } + /// Sets `maxZ` with the given value. + /// @param value the value + /// @return `this` + public VkAabbPositionsKHR maxZ(@CType("float") float value) { VkAabbPositionsKHR.set_maxZ(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureBuildGeometryInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureBuildGeometryInfoKHR.java new file mode 100644 index 00000000..6b99f0a1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureBuildGeometryInfoKHR.java @@ -0,0 +1,483 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ### srcAccelerationStructure +/// [VarHandle][#VH_srcAccelerationStructure] - [Getter][#srcAccelerationStructure()] - [Setter][#srcAccelerationStructure(java.lang.foreign.MemorySegment)] +/// ### dstAccelerationStructure +/// [VarHandle][#VH_dstAccelerationStructure] - [Getter][#dstAccelerationStructure()] - [Setter][#dstAccelerationStructure(java.lang.foreign.MemorySegment)] +/// ### geometryCount +/// [VarHandle][#VH_geometryCount] - [Getter][#geometryCount()] - [Setter][#geometryCount(int)] +/// ### pGeometries +/// [VarHandle][#VH_pGeometries] - [Getter][#pGeometries()] - [Setter][#pGeometries(java.lang.foreign.MemorySegment)] +/// ### ppGeometries +/// [VarHandle][#VH_ppGeometries] - [Getter][#ppGeometries()] - [Setter][#ppGeometries(java.lang.foreign.MemorySegment)] +/// ### scratchData +/// [Byte offset][#OFFSET_scratchData] - [Memory layout][#ML_scratchData] - [Getter][#scratchData()] - [Setter][#scratchData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureBuildGeometryInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccelerationStructureTypeKHR type; +/// VkBuildAccelerationStructureFlagsKHR flags; +/// VkBuildAccelerationStructureModeKHR mode; +/// VkAccelerationStructureKHR srcAccelerationStructure; +/// VkAccelerationStructureKHR dstAccelerationStructure; +/// uint32_t geometryCount; +/// const VkAccelerationStructureGeometryKHR * pGeometries; +/// const VkAccelerationStructureGeometryKHR * const* ppGeometries; +/// VkDeviceOrHostAddressKHR scratchData; +/// } VkAccelerationStructureBuildGeometryInfoKHR; +/// ``` +public final class VkAccelerationStructureBuildGeometryInfoKHR extends Struct { + /// The struct layout of `VkAccelerationStructureBuildGeometryInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("mode"), + ValueLayout.ADDRESS.withName("srcAccelerationStructure"), + ValueLayout.ADDRESS.withName("dstAccelerationStructure"), + ValueLayout.JAVA_INT.withName("geometryCount"), + ValueLayout.ADDRESS.withName("pGeometries"), + ValueLayout.ADDRESS.withName("ppGeometries"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressKHR.LAYOUT.withName("scratchData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + /// The [VarHandle] of `srcAccelerationStructure` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcAccelerationStructure = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAccelerationStructure")); + /// The [VarHandle] of `dstAccelerationStructure` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstAccelerationStructure = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAccelerationStructure")); + /// The [VarHandle] of `geometryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_geometryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("geometryCount")); + /// The [VarHandle] of `pGeometries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pGeometries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pGeometries")); + /// The [VarHandle] of `ppGeometries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_ppGeometries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ppGeometries")); + /// The byte offset of `scratchData`. + public static final long OFFSET_scratchData = LAYOUT.byteOffset(PathElement.groupElement("scratchData")); + /// The memory layout of `scratchData`. + public static final MemoryLayout ML_scratchData = LAYOUT.select(PathElement.groupElement("scratchData")); + + /// Creates `VkAccelerationStructureBuildGeometryInfoKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureBuildGeometryInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureBuildGeometryInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureBuildGeometryInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureBuildGeometryInfoKHR(segment); } + + /// Creates `VkAccelerationStructureBuildGeometryInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureBuildGeometryInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureBuildGeometryInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureBuildGeometryInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureBuildGeometryInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureBuildGeometryInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureBuildGeometryInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureBuildGeometryInfoKHR` + public static VkAccelerationStructureBuildGeometryInfoKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureBuildGeometryInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureBuildGeometryInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureBuildGeometryInfoKHR` + public static VkAccelerationStructureBuildGeometryInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureBuildGeometryInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureBuildGeometryInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR sType(@CType("VkStructureType") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureBuildGeometryInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureTypeKHR") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureTypeKHR") int get_type(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureTypeKHR") int typeAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkAccelerationStructureTypeKHR") int type() { return VkAccelerationStructureBuildGeometryInfoKHR.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkAccelerationStructureTypeKHR") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkAccelerationStructureTypeKHR") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR typeAt(long index, @CType("VkAccelerationStructureTypeKHR") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR type(@CType("VkAccelerationStructureTypeKHR") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_type(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuildAccelerationStructureFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkBuildAccelerationStructureFlagsKHR") int get_flags(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkBuildAccelerationStructureFlagsKHR") int flagsAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkBuildAccelerationStructureFlagsKHR") int flags() { return VkAccelerationStructureBuildGeometryInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkBuildAccelerationStructureFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkBuildAccelerationStructureFlagsKHR") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR flagsAt(long index, @CType("VkBuildAccelerationStructureFlagsKHR") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR flags(@CType("VkBuildAccelerationStructureFlagsKHR") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuildAccelerationStructureModeKHR") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkBuildAccelerationStructureModeKHR") int get_mode(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkBuildAccelerationStructureModeKHR") int modeAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkBuildAccelerationStructureModeKHR") int mode() { return VkAccelerationStructureBuildGeometryInfoKHR.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkBuildAccelerationStructureModeKHR") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkBuildAccelerationStructureModeKHR") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR modeAt(long index, @CType("VkBuildAccelerationStructureModeKHR") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR mode(@CType("VkBuildAccelerationStructureModeKHR") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_mode(this.segment(), value); return this; } + + /// {@return `srcAccelerationStructure` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_srcAccelerationStructure(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcAccelerationStructure.get(segment, 0L, index); } + /// {@return `srcAccelerationStructure`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_srcAccelerationStructure(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_srcAccelerationStructure(segment, 0L); } + /// {@return `srcAccelerationStructure` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment srcAccelerationStructureAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_srcAccelerationStructure(this.segment(), index); } + /// {@return `srcAccelerationStructure`} + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment srcAccelerationStructure() { return VkAccelerationStructureBuildGeometryInfoKHR.get_srcAccelerationStructure(this.segment()); } + /// Sets `srcAccelerationStructure` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAccelerationStructure(MemorySegment segment, long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VH_srcAccelerationStructure.set(segment, 0L, index, value); } + /// Sets `srcAccelerationStructure` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAccelerationStructure(MemorySegment segment, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_srcAccelerationStructure(segment, 0L, value); } + /// Sets `srcAccelerationStructure` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR srcAccelerationStructureAt(long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_srcAccelerationStructure(this.segment(), index, value); return this; } + /// Sets `srcAccelerationStructure` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR srcAccelerationStructure(@CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_srcAccelerationStructure(this.segment(), value); return this; } + + /// {@return `dstAccelerationStructure` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_dstAccelerationStructure(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstAccelerationStructure.get(segment, 0L, index); } + /// {@return `dstAccelerationStructure`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_dstAccelerationStructure(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_dstAccelerationStructure(segment, 0L); } + /// {@return `dstAccelerationStructure` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment dstAccelerationStructureAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_dstAccelerationStructure(this.segment(), index); } + /// {@return `dstAccelerationStructure`} + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment dstAccelerationStructure() { return VkAccelerationStructureBuildGeometryInfoKHR.get_dstAccelerationStructure(this.segment()); } + /// Sets `dstAccelerationStructure` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAccelerationStructure(MemorySegment segment, long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VH_dstAccelerationStructure.set(segment, 0L, index, value); } + /// Sets `dstAccelerationStructure` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAccelerationStructure(MemorySegment segment, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_dstAccelerationStructure(segment, 0L, value); } + /// Sets `dstAccelerationStructure` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR dstAccelerationStructureAt(long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_dstAccelerationStructure(this.segment(), index, value); return this; } + /// Sets `dstAccelerationStructure` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR dstAccelerationStructure(@CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_dstAccelerationStructure(this.segment(), value); return this; } + + /// {@return `geometryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_geometryCount(MemorySegment segment, long index) { return (int) VH_geometryCount.get(segment, 0L, index); } + /// {@return `geometryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_geometryCount(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_geometryCount(segment, 0L); } + /// {@return `geometryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int geometryCountAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_geometryCount(this.segment(), index); } + /// {@return `geometryCount`} + public @CType("uint32_t") int geometryCount() { return VkAccelerationStructureBuildGeometryInfoKHR.get_geometryCount(this.segment()); } + /// Sets `geometryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_geometryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_geometryCount.set(segment, 0L, index, value); } + /// Sets `geometryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_geometryCount(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_geometryCount(segment, 0L, value); } + /// Sets `geometryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR geometryCountAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_geometryCount(this.segment(), index, value); return this; } + /// Sets `geometryCount` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR geometryCount(@CType("uint32_t") int value) { VkAccelerationStructureBuildGeometryInfoKHR.set_geometryCount(this.segment(), value); return this; } + + /// {@return `pGeometries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAccelerationStructureGeometryKHR *") java.lang.foreign.MemorySegment get_pGeometries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pGeometries.get(segment, 0L, index); } + /// {@return `pGeometries`} + /// @param segment the segment of the struct + public static @CType("const VkAccelerationStructureGeometryKHR *") java.lang.foreign.MemorySegment get_pGeometries(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_pGeometries(segment, 0L); } + /// {@return `pGeometries` at the given index} + /// @param index the index + public @CType("const VkAccelerationStructureGeometryKHR *") java.lang.foreign.MemorySegment pGeometriesAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_pGeometries(this.segment(), index); } + /// {@return `pGeometries`} + public @CType("const VkAccelerationStructureGeometryKHR *") java.lang.foreign.MemorySegment pGeometries() { return VkAccelerationStructureBuildGeometryInfoKHR.get_pGeometries(this.segment()); } + /// Sets `pGeometries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pGeometries(MemorySegment segment, long index, @CType("const VkAccelerationStructureGeometryKHR *") java.lang.foreign.MemorySegment value) { VH_pGeometries.set(segment, 0L, index, value); } + /// Sets `pGeometries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pGeometries(MemorySegment segment, @CType("const VkAccelerationStructureGeometryKHR *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_pGeometries(segment, 0L, value); } + /// Sets `pGeometries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR pGeometriesAt(long index, @CType("const VkAccelerationStructureGeometryKHR *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_pGeometries(this.segment(), index, value); return this; } + /// Sets `pGeometries` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR pGeometries(@CType("const VkAccelerationStructureGeometryKHR *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_pGeometries(this.segment(), value); return this; } + + /// {@return `ppGeometries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAccelerationStructureGeometryKHR * const*") java.lang.foreign.MemorySegment get_ppGeometries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_ppGeometries.get(segment, 0L, index); } + /// {@return `ppGeometries`} + /// @param segment the segment of the struct + public static @CType("const VkAccelerationStructureGeometryKHR * const*") java.lang.foreign.MemorySegment get_ppGeometries(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_ppGeometries(segment, 0L); } + /// {@return `ppGeometries` at the given index} + /// @param index the index + public @CType("const VkAccelerationStructureGeometryKHR * const*") java.lang.foreign.MemorySegment ppGeometriesAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_ppGeometries(this.segment(), index); } + /// {@return `ppGeometries`} + public @CType("const VkAccelerationStructureGeometryKHR * const*") java.lang.foreign.MemorySegment ppGeometries() { return VkAccelerationStructureBuildGeometryInfoKHR.get_ppGeometries(this.segment()); } + /// Sets `ppGeometries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ppGeometries(MemorySegment segment, long index, @CType("const VkAccelerationStructureGeometryKHR * const*") java.lang.foreign.MemorySegment value) { VH_ppGeometries.set(segment, 0L, index, value); } + /// Sets `ppGeometries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ppGeometries(MemorySegment segment, @CType("const VkAccelerationStructureGeometryKHR * const*") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_ppGeometries(segment, 0L, value); } + /// Sets `ppGeometries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR ppGeometriesAt(long index, @CType("const VkAccelerationStructureGeometryKHR * const*") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_ppGeometries(this.segment(), index, value); return this; } + /// Sets `ppGeometries` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR ppGeometries(@CType("const VkAccelerationStructureGeometryKHR * const*") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_ppGeometries(this.segment(), value); return this; } + + /// {@return `scratchData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment get_scratchData(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_scratchData, index), ML_scratchData); } + /// {@return `scratchData`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment get_scratchData(MemorySegment segment) { return VkAccelerationStructureBuildGeometryInfoKHR.get_scratchData(segment, 0L); } + /// {@return `scratchData` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment scratchDataAt(long index) { return VkAccelerationStructureBuildGeometryInfoKHR.get_scratchData(this.segment(), index); } + /// {@return `scratchData`} + public @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment scratchData() { return VkAccelerationStructureBuildGeometryInfoKHR.get_scratchData(this.segment()); } + /// Sets `scratchData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scratchData(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_scratchData, index), ML_scratchData.byteSize()); } + /// Sets `scratchData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scratchData(MemorySegment segment, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_scratchData(segment, 0L, value); } + /// Sets `scratchData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR scratchDataAt(long index, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_scratchData(this.segment(), index, value); return this; } + /// Sets `scratchData` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildGeometryInfoKHR scratchData(@CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildGeometryInfoKHR.set_scratchData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureBuildRangeInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureBuildRangeInfoKHR.java new file mode 100644 index 00000000..2297a5bf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureBuildRangeInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### primitiveCount +/// [VarHandle][#VH_primitiveCount] - [Getter][#primitiveCount()] - [Setter][#primitiveCount(int)] +/// ### primitiveOffset +/// [VarHandle][#VH_primitiveOffset] - [Getter][#primitiveOffset()] - [Setter][#primitiveOffset(int)] +/// ### firstVertex +/// [VarHandle][#VH_firstVertex] - [Getter][#firstVertex()] - [Setter][#firstVertex(int)] +/// ### transformOffset +/// [VarHandle][#VH_transformOffset] - [Getter][#transformOffset()] - [Setter][#transformOffset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureBuildRangeInfoKHR { +/// uint32_t primitiveCount; +/// uint32_t primitiveOffset; +/// uint32_t firstVertex; +/// uint32_t transformOffset; +/// } VkAccelerationStructureBuildRangeInfoKHR; +/// ``` +public final class VkAccelerationStructureBuildRangeInfoKHR extends Struct { + /// The struct layout of `VkAccelerationStructureBuildRangeInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("primitiveCount"), + ValueLayout.JAVA_INT.withName("primitiveOffset"), + ValueLayout.JAVA_INT.withName("firstVertex"), + ValueLayout.JAVA_INT.withName("transformOffset") + ); + /// The [VarHandle] of `primitiveCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitiveCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveCount")); + /// The [VarHandle] of `primitiveOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitiveOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveOffset")); + /// The [VarHandle] of `firstVertex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstVertex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstVertex")); + /// The [VarHandle] of `transformOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transformOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformOffset")); + + /// Creates `VkAccelerationStructureBuildRangeInfoKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureBuildRangeInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureBuildRangeInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureBuildRangeInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureBuildRangeInfoKHR(segment); } + + /// Creates `VkAccelerationStructureBuildRangeInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureBuildRangeInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureBuildRangeInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureBuildRangeInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureBuildRangeInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureBuildRangeInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureBuildRangeInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureBuildRangeInfoKHR` + public static VkAccelerationStructureBuildRangeInfoKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureBuildRangeInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureBuildRangeInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureBuildRangeInfoKHR` + public static VkAccelerationStructureBuildRangeInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureBuildRangeInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `primitiveCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_primitiveCount(MemorySegment segment, long index) { return (int) VH_primitiveCount.get(segment, 0L, index); } + /// {@return `primitiveCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_primitiveCount(MemorySegment segment) { return VkAccelerationStructureBuildRangeInfoKHR.get_primitiveCount(segment, 0L); } + /// {@return `primitiveCount` at the given index} + /// @param index the index + public @CType("uint32_t") int primitiveCountAt(long index) { return VkAccelerationStructureBuildRangeInfoKHR.get_primitiveCount(this.segment(), index); } + /// {@return `primitiveCount`} + public @CType("uint32_t") int primitiveCount() { return VkAccelerationStructureBuildRangeInfoKHR.get_primitiveCount(this.segment()); } + /// Sets `primitiveCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_primitiveCount.set(segment, 0L, index, value); } + /// Sets `primitiveCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveCount(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_primitiveCount(segment, 0L, value); } + /// Sets `primitiveCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildRangeInfoKHR primitiveCountAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_primitiveCount(this.segment(), index, value); return this; } + /// Sets `primitiveCount` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildRangeInfoKHR primitiveCount(@CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_primitiveCount(this.segment(), value); return this; } + + /// {@return `primitiveOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_primitiveOffset(MemorySegment segment, long index) { return (int) VH_primitiveOffset.get(segment, 0L, index); } + /// {@return `primitiveOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_primitiveOffset(MemorySegment segment) { return VkAccelerationStructureBuildRangeInfoKHR.get_primitiveOffset(segment, 0L); } + /// {@return `primitiveOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int primitiveOffsetAt(long index) { return VkAccelerationStructureBuildRangeInfoKHR.get_primitiveOffset(this.segment(), index); } + /// {@return `primitiveOffset`} + public @CType("uint32_t") int primitiveOffset() { return VkAccelerationStructureBuildRangeInfoKHR.get_primitiveOffset(this.segment()); } + /// Sets `primitiveOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_primitiveOffset.set(segment, 0L, index, value); } + /// Sets `primitiveOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveOffset(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_primitiveOffset(segment, 0L, value); } + /// Sets `primitiveOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildRangeInfoKHR primitiveOffsetAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_primitiveOffset(this.segment(), index, value); return this; } + /// Sets `primitiveOffset` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildRangeInfoKHR primitiveOffset(@CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_primitiveOffset(this.segment(), value); return this; } + + /// {@return `firstVertex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstVertex(MemorySegment segment, long index) { return (int) VH_firstVertex.get(segment, 0L, index); } + /// {@return `firstVertex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstVertex(MemorySegment segment) { return VkAccelerationStructureBuildRangeInfoKHR.get_firstVertex(segment, 0L); } + /// {@return `firstVertex` at the given index} + /// @param index the index + public @CType("uint32_t") int firstVertexAt(long index) { return VkAccelerationStructureBuildRangeInfoKHR.get_firstVertex(this.segment(), index); } + /// {@return `firstVertex`} + public @CType("uint32_t") int firstVertex() { return VkAccelerationStructureBuildRangeInfoKHR.get_firstVertex(this.segment()); } + /// Sets `firstVertex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstVertex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstVertex.set(segment, 0L, index, value); } + /// Sets `firstVertex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstVertex(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_firstVertex(segment, 0L, value); } + /// Sets `firstVertex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildRangeInfoKHR firstVertexAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_firstVertex(this.segment(), index, value); return this; } + /// Sets `firstVertex` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildRangeInfoKHR firstVertex(@CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_firstVertex(this.segment(), value); return this; } + + /// {@return `transformOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_transformOffset(MemorySegment segment, long index) { return (int) VH_transformOffset.get(segment, 0L, index); } + /// {@return `transformOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_transformOffset(MemorySegment segment) { return VkAccelerationStructureBuildRangeInfoKHR.get_transformOffset(segment, 0L); } + /// {@return `transformOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int transformOffsetAt(long index) { return VkAccelerationStructureBuildRangeInfoKHR.get_transformOffset(this.segment(), index); } + /// {@return `transformOffset`} + public @CType("uint32_t") int transformOffset() { return VkAccelerationStructureBuildRangeInfoKHR.get_transformOffset(this.segment()); } + /// Sets `transformOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_transformOffset.set(segment, 0L, index, value); } + /// Sets `transformOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformOffset(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_transformOffset(segment, 0L, value); } + /// Sets `transformOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildRangeInfoKHR transformOffsetAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_transformOffset(this.segment(), index, value); return this; } + /// Sets `transformOffset` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildRangeInfoKHR transformOffset(@CType("uint32_t") int value) { VkAccelerationStructureBuildRangeInfoKHR.set_transformOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureBuildSizesInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureBuildSizesInfoKHR.java new file mode 100644 index 00000000..f3318b12 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureBuildSizesInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### accelerationStructureSize +/// [VarHandle][#VH_accelerationStructureSize] - [Getter][#accelerationStructureSize()] - [Setter][#accelerationStructureSize(long)] +/// ### updateScratchSize +/// [VarHandle][#VH_updateScratchSize] - [Getter][#updateScratchSize()] - [Setter][#updateScratchSize(long)] +/// ### buildScratchSize +/// [VarHandle][#VH_buildScratchSize] - [Getter][#buildScratchSize()] - [Setter][#buildScratchSize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureBuildSizesInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceSize accelerationStructureSize; +/// VkDeviceSize updateScratchSize; +/// VkDeviceSize buildScratchSize; +/// } VkAccelerationStructureBuildSizesInfoKHR; +/// ``` +public final class VkAccelerationStructureBuildSizesInfoKHR extends Struct { + /// The struct layout of `VkAccelerationStructureBuildSizesInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("accelerationStructureSize"), + ValueLayout.JAVA_LONG.withName("updateScratchSize"), + ValueLayout.JAVA_LONG.withName("buildScratchSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `accelerationStructureSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_accelerationStructureSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureSize")); + /// The [VarHandle] of `updateScratchSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_updateScratchSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("updateScratchSize")); + /// The [VarHandle] of `buildScratchSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_buildScratchSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buildScratchSize")); + + /// Creates `VkAccelerationStructureBuildSizesInfoKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureBuildSizesInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureBuildSizesInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureBuildSizesInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureBuildSizesInfoKHR(segment); } + + /// Creates `VkAccelerationStructureBuildSizesInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureBuildSizesInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureBuildSizesInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureBuildSizesInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureBuildSizesInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureBuildSizesInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureBuildSizesInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureBuildSizesInfoKHR` + public static VkAccelerationStructureBuildSizesInfoKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureBuildSizesInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureBuildSizesInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureBuildSizesInfoKHR` + public static VkAccelerationStructureBuildSizesInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureBuildSizesInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureBuildSizesInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureBuildSizesInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureBuildSizesInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureBuildSizesInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildSizesInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureBuildSizesInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildSizesInfoKHR sType(@CType("VkStructureType") int value) { VkAccelerationStructureBuildSizesInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureBuildSizesInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureBuildSizesInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureBuildSizesInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildSizesInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildSizesInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildSizesInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildSizesInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureBuildSizesInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `accelerationStructureSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_accelerationStructureSize(MemorySegment segment, long index) { return (long) VH_accelerationStructureSize.get(segment, 0L, index); } + /// {@return `accelerationStructureSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_accelerationStructureSize(MemorySegment segment) { return VkAccelerationStructureBuildSizesInfoKHR.get_accelerationStructureSize(segment, 0L); } + /// {@return `accelerationStructureSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long accelerationStructureSizeAt(long index) { return VkAccelerationStructureBuildSizesInfoKHR.get_accelerationStructureSize(this.segment(), index); } + /// {@return `accelerationStructureSize`} + public @CType("VkDeviceSize") long accelerationStructureSize() { return VkAccelerationStructureBuildSizesInfoKHR.get_accelerationStructureSize(this.segment()); } + /// Sets `accelerationStructureSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_accelerationStructureSize.set(segment, 0L, index, value); } + /// Sets `accelerationStructureSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureBuildSizesInfoKHR.set_accelerationStructureSize(segment, 0L, value); } + /// Sets `accelerationStructureSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildSizesInfoKHR accelerationStructureSizeAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureBuildSizesInfoKHR.set_accelerationStructureSize(this.segment(), index, value); return this; } + /// Sets `accelerationStructureSize` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildSizesInfoKHR accelerationStructureSize(@CType("VkDeviceSize") long value) { VkAccelerationStructureBuildSizesInfoKHR.set_accelerationStructureSize(this.segment(), value); return this; } + + /// {@return `updateScratchSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_updateScratchSize(MemorySegment segment, long index) { return (long) VH_updateScratchSize.get(segment, 0L, index); } + /// {@return `updateScratchSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_updateScratchSize(MemorySegment segment) { return VkAccelerationStructureBuildSizesInfoKHR.get_updateScratchSize(segment, 0L); } + /// {@return `updateScratchSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long updateScratchSizeAt(long index) { return VkAccelerationStructureBuildSizesInfoKHR.get_updateScratchSize(this.segment(), index); } + /// {@return `updateScratchSize`} + public @CType("VkDeviceSize") long updateScratchSize() { return VkAccelerationStructureBuildSizesInfoKHR.get_updateScratchSize(this.segment()); } + /// Sets `updateScratchSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_updateScratchSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_updateScratchSize.set(segment, 0L, index, value); } + /// Sets `updateScratchSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_updateScratchSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureBuildSizesInfoKHR.set_updateScratchSize(segment, 0L, value); } + /// Sets `updateScratchSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildSizesInfoKHR updateScratchSizeAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureBuildSizesInfoKHR.set_updateScratchSize(this.segment(), index, value); return this; } + /// Sets `updateScratchSize` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildSizesInfoKHR updateScratchSize(@CType("VkDeviceSize") long value) { VkAccelerationStructureBuildSizesInfoKHR.set_updateScratchSize(this.segment(), value); return this; } + + /// {@return `buildScratchSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_buildScratchSize(MemorySegment segment, long index) { return (long) VH_buildScratchSize.get(segment, 0L, index); } + /// {@return `buildScratchSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_buildScratchSize(MemorySegment segment) { return VkAccelerationStructureBuildSizesInfoKHR.get_buildScratchSize(segment, 0L); } + /// {@return `buildScratchSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long buildScratchSizeAt(long index) { return VkAccelerationStructureBuildSizesInfoKHR.get_buildScratchSize(this.segment(), index); } + /// {@return `buildScratchSize`} + public @CType("VkDeviceSize") long buildScratchSize() { return VkAccelerationStructureBuildSizesInfoKHR.get_buildScratchSize(this.segment()); } + /// Sets `buildScratchSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buildScratchSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_buildScratchSize.set(segment, 0L, index, value); } + /// Sets `buildScratchSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buildScratchSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureBuildSizesInfoKHR.set_buildScratchSize(segment, 0L, value); } + /// Sets `buildScratchSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildSizesInfoKHR buildScratchSizeAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureBuildSizesInfoKHR.set_buildScratchSize(this.segment(), index, value); return this; } + /// Sets `buildScratchSize` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureBuildSizesInfoKHR buildScratchSize(@CType("VkDeviceSize") long value) { VkAccelerationStructureBuildSizesInfoKHR.set_buildScratchSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureCreateInfoKHR.java new file mode 100644 index 00000000..2ecb3fd0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureCreateInfoKHR.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### createFlags +/// [VarHandle][#VH_createFlags] - [Getter][#createFlags()] - [Setter][#createFlags(int)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### deviceAddress +/// [VarHandle][#VH_deviceAddress] - [Getter][#deviceAddress()] - [Setter][#deviceAddress(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccelerationStructureCreateFlagsKHR createFlags; +/// VkBuffer buffer; +/// VkDeviceSize offset; +/// VkDeviceSize size; +/// VkAccelerationStructureTypeKHR type; +/// VkDeviceAddress deviceAddress; +/// } VkAccelerationStructureCreateInfoKHR; +/// ``` +public final class VkAccelerationStructureCreateInfoKHR extends Struct { + /// The struct layout of `VkAccelerationStructureCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("createFlags"), + ValueLayout.ADDRESS.withName("buffer"), + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_LONG.withName("size"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_LONG.withName("deviceAddress") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `createFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_createFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("createFlags")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `deviceAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_deviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceAddress")); + + /// Creates `VkAccelerationStructureCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureCreateInfoKHR(segment); } + + /// Creates `VkAccelerationStructureCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureCreateInfoKHR` + public static VkAccelerationStructureCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureCreateInfoKHR` + public static VkAccelerationStructureCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR sType(@CType("VkStructureType") int value) { VkAccelerationStructureCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `createFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureCreateFlagsKHR") int get_createFlags(MemorySegment segment, long index) { return (int) VH_createFlags.get(segment, 0L, index); } + /// {@return `createFlags`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureCreateFlagsKHR") int get_createFlags(MemorySegment segment) { return VkAccelerationStructureCreateInfoKHR.get_createFlags(segment, 0L); } + /// {@return `createFlags` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureCreateFlagsKHR") int createFlagsAt(long index) { return VkAccelerationStructureCreateInfoKHR.get_createFlags(this.segment(), index); } + /// {@return `createFlags`} + public @CType("VkAccelerationStructureCreateFlagsKHR") int createFlags() { return VkAccelerationStructureCreateInfoKHR.get_createFlags(this.segment()); } + /// Sets `createFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_createFlags(MemorySegment segment, long index, @CType("VkAccelerationStructureCreateFlagsKHR") int value) { VH_createFlags.set(segment, 0L, index, value); } + /// Sets `createFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_createFlags(MemorySegment segment, @CType("VkAccelerationStructureCreateFlagsKHR") int value) { VkAccelerationStructureCreateInfoKHR.set_createFlags(segment, 0L, value); } + /// Sets `createFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR createFlagsAt(long index, @CType("VkAccelerationStructureCreateFlagsKHR") int value) { VkAccelerationStructureCreateInfoKHR.set_createFlags(this.segment(), index, value); return this; } + /// Sets `createFlags` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR createFlags(@CType("VkAccelerationStructureCreateFlagsKHR") int value) { VkAccelerationStructureCreateInfoKHR.set_createFlags(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkAccelerationStructureCreateInfoKHR.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkAccelerationStructureCreateInfoKHR.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkAccelerationStructureCreateInfoKHR.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoKHR.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoKHR.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoKHR.set_buffer(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkAccelerationStructureCreateInfoKHR.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkAccelerationStructureCreateInfoKHR.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkAccelerationStructureCreateInfoKHR.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureCreateInfoKHR.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR offsetAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureCreateInfoKHR.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR offset(@CType("VkDeviceSize") long value) { VkAccelerationStructureCreateInfoKHR.set_offset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkAccelerationStructureCreateInfoKHR.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkAccelerationStructureCreateInfoKHR.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkAccelerationStructureCreateInfoKHR.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureCreateInfoKHR.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR sizeAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureCreateInfoKHR.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR size(@CType("VkDeviceSize") long value) { VkAccelerationStructureCreateInfoKHR.set_size(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureTypeKHR") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureTypeKHR") int get_type(MemorySegment segment) { return VkAccelerationStructureCreateInfoKHR.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureTypeKHR") int typeAt(long index) { return VkAccelerationStructureCreateInfoKHR.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkAccelerationStructureTypeKHR") int type() { return VkAccelerationStructureCreateInfoKHR.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkAccelerationStructureTypeKHR") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkAccelerationStructureTypeKHR") int value) { VkAccelerationStructureCreateInfoKHR.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR typeAt(long index, @CType("VkAccelerationStructureTypeKHR") int value) { VkAccelerationStructureCreateInfoKHR.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR type(@CType("VkAccelerationStructureTypeKHR") int value) { VkAccelerationStructureCreateInfoKHR.set_type(this.segment(), value); return this; } + + /// {@return `deviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment, long index) { return (long) VH_deviceAddress.get(segment, 0L, index); } + /// {@return `deviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment) { return VkAccelerationStructureCreateInfoKHR.get_deviceAddress(segment, 0L); } + /// {@return `deviceAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long deviceAddressAt(long index) { return VkAccelerationStructureCreateInfoKHR.get_deviceAddress(this.segment(), index); } + /// {@return `deviceAddress`} + public @CType("VkDeviceAddress") long deviceAddress() { return VkAccelerationStructureCreateInfoKHR.get_deviceAddress(this.segment()); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_deviceAddress.set(segment, 0L, index, value); } + /// Sets `deviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkAccelerationStructureCreateInfoKHR.set_deviceAddress(segment, 0L, value); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR deviceAddressAt(long index, @CType("VkDeviceAddress") long value) { VkAccelerationStructureCreateInfoKHR.set_deviceAddress(this.segment(), index, value); return this; } + /// Sets `deviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoKHR deviceAddress(@CType("VkDeviceAddress") long value) { VkAccelerationStructureCreateInfoKHR.set_deviceAddress(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureDeviceAddressInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureDeviceAddressInfoKHR.java new file mode 100644 index 00000000..8b54a236 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureDeviceAddressInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### accelerationStructure +/// [VarHandle][#VH_accelerationStructure] - [Getter][#accelerationStructure()] - [Setter][#accelerationStructure(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureDeviceAddressInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccelerationStructureKHR accelerationStructure; +/// } VkAccelerationStructureDeviceAddressInfoKHR; +/// ``` +public final class VkAccelerationStructureDeviceAddressInfoKHR extends Struct { + /// The struct layout of `VkAccelerationStructureDeviceAddressInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("accelerationStructure") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `accelerationStructure` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_accelerationStructure = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructure")); + + /// Creates `VkAccelerationStructureDeviceAddressInfoKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureDeviceAddressInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureDeviceAddressInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureDeviceAddressInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureDeviceAddressInfoKHR(segment); } + + /// Creates `VkAccelerationStructureDeviceAddressInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureDeviceAddressInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureDeviceAddressInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureDeviceAddressInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureDeviceAddressInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureDeviceAddressInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureDeviceAddressInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureDeviceAddressInfoKHR` + public static VkAccelerationStructureDeviceAddressInfoKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureDeviceAddressInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureDeviceAddressInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureDeviceAddressInfoKHR` + public static VkAccelerationStructureDeviceAddressInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureDeviceAddressInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureDeviceAddressInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureDeviceAddressInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureDeviceAddressInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureDeviceAddressInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureDeviceAddressInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureDeviceAddressInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureDeviceAddressInfoKHR sType(@CType("VkStructureType") int value) { VkAccelerationStructureDeviceAddressInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureDeviceAddressInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureDeviceAddressInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureDeviceAddressInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureDeviceAddressInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureDeviceAddressInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureDeviceAddressInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureDeviceAddressInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureDeviceAddressInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `accelerationStructure` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_accelerationStructure(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_accelerationStructure.get(segment, 0L, index); } + /// {@return `accelerationStructure`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_accelerationStructure(MemorySegment segment) { return VkAccelerationStructureDeviceAddressInfoKHR.get_accelerationStructure(segment, 0L); } + /// {@return `accelerationStructure` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment accelerationStructureAt(long index) { return VkAccelerationStructureDeviceAddressInfoKHR.get_accelerationStructure(this.segment(), index); } + /// {@return `accelerationStructure`} + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment accelerationStructure() { return VkAccelerationStructureDeviceAddressInfoKHR.get_accelerationStructure(this.segment()); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VH_accelerationStructure.set(segment, 0L, index, value); } + /// Sets `accelerationStructure` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureDeviceAddressInfoKHR.set_accelerationStructure(segment, 0L, value); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureDeviceAddressInfoKHR accelerationStructureAt(long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureDeviceAddressInfoKHR.set_accelerationStructure(this.segment(), index, value); return this; } + /// Sets `accelerationStructure` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureDeviceAddressInfoKHR accelerationStructure(@CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureDeviceAddressInfoKHR.set_accelerationStructure(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryAabbsDataKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryAabbsDataKHR.java new file mode 100644 index 00000000..47fefcd7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryAabbsDataKHR.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### data +/// [Byte offset][#OFFSET_data] - [Memory layout][#ML_data] - [Getter][#data()] - [Setter][#data(java.lang.foreign.MemorySegment)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureGeometryAabbsDataKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceOrHostAddressConstKHR data; +/// VkDeviceSize stride; +/// } VkAccelerationStructureGeometryAabbsDataKHR; +/// ``` +public final class VkAccelerationStructureGeometryAabbsDataKHR extends Struct { + /// The struct layout of `VkAccelerationStructureGeometryAabbsDataKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("data"), + ValueLayout.JAVA_LONG.withName("stride") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `data`. + public static final long OFFSET_data = LAYOUT.byteOffset(PathElement.groupElement("data")); + /// The memory layout of `data`. + public static final MemoryLayout ML_data = LAYOUT.select(PathElement.groupElement("data")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + + /// Creates `VkAccelerationStructureGeometryAabbsDataKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureGeometryAabbsDataKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureGeometryAabbsDataKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryAabbsDataKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryAabbsDataKHR(segment); } + + /// Creates `VkAccelerationStructureGeometryAabbsDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryAabbsDataKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryAabbsDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureGeometryAabbsDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryAabbsDataKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryAabbsDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureGeometryAabbsDataKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureGeometryAabbsDataKHR` + public static VkAccelerationStructureGeometryAabbsDataKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureGeometryAabbsDataKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureGeometryAabbsDataKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureGeometryAabbsDataKHR` + public static VkAccelerationStructureGeometryAabbsDataKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureGeometryAabbsDataKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureGeometryAabbsDataKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureGeometryAabbsDataKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureGeometryAabbsDataKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureGeometryAabbsDataKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryAabbsDataKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureGeometryAabbsDataKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryAabbsDataKHR sType(@CType("VkStructureType") int value) { VkAccelerationStructureGeometryAabbsDataKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureGeometryAabbsDataKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureGeometryAabbsDataKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureGeometryAabbsDataKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryAabbsDataKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryAabbsDataKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryAabbsDataKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryAabbsDataKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryAabbsDataKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `data` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_data(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_data, index), ML_data); } + /// {@return `data`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_data(MemorySegment segment) { return VkAccelerationStructureGeometryAabbsDataKHR.get_data(segment, 0L); } + /// {@return `data` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment dataAt(long index) { return VkAccelerationStructureGeometryAabbsDataKHR.get_data(this.segment(), index); } + /// {@return `data`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment data() { return VkAccelerationStructureGeometryAabbsDataKHR.get_data(this.segment()); } + /// Sets `data` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_data(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_data, index), ML_data.byteSize()); } + /// Sets `data` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_data(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryAabbsDataKHR.set_data(segment, 0L, value); } + /// Sets `data` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryAabbsDataKHR dataAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryAabbsDataKHR.set_data(this.segment(), index, value); return this; } + /// Sets `data` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryAabbsDataKHR data(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryAabbsDataKHR.set_data(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_stride(MemorySegment segment, long index) { return (long) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_stride(MemorySegment segment) { return VkAccelerationStructureGeometryAabbsDataKHR.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long strideAt(long index) { return VkAccelerationStructureGeometryAabbsDataKHR.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("VkDeviceSize") long stride() { return VkAccelerationStructureGeometryAabbsDataKHR.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureGeometryAabbsDataKHR.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryAabbsDataKHR strideAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureGeometryAabbsDataKHR.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryAabbsDataKHR stride(@CType("VkDeviceSize") long value) { VkAccelerationStructureGeometryAabbsDataKHR.set_stride(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryInstancesDataKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryInstancesDataKHR.java new file mode 100644 index 00000000..c0e5002a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryInstancesDataKHR.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### arrayOfPointers +/// [VarHandle][#VH_arrayOfPointers] - [Getter][#arrayOfPointers()] - [Setter][#arrayOfPointers(int)] +/// ### data +/// [Byte offset][#OFFSET_data] - [Memory layout][#ML_data] - [Getter][#data()] - [Setter][#data(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureGeometryInstancesDataKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 arrayOfPointers; +/// VkDeviceOrHostAddressConstKHR data; +/// } VkAccelerationStructureGeometryInstancesDataKHR; +/// ``` +public final class VkAccelerationStructureGeometryInstancesDataKHR extends Struct { + /// The struct layout of `VkAccelerationStructureGeometryInstancesDataKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("arrayOfPointers"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("data") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `arrayOfPointers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_arrayOfPointers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("arrayOfPointers")); + /// The byte offset of `data`. + public static final long OFFSET_data = LAYOUT.byteOffset(PathElement.groupElement("data")); + /// The memory layout of `data`. + public static final MemoryLayout ML_data = LAYOUT.select(PathElement.groupElement("data")); + + /// Creates `VkAccelerationStructureGeometryInstancesDataKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureGeometryInstancesDataKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureGeometryInstancesDataKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryInstancesDataKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryInstancesDataKHR(segment); } + + /// Creates `VkAccelerationStructureGeometryInstancesDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryInstancesDataKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryInstancesDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureGeometryInstancesDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryInstancesDataKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryInstancesDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureGeometryInstancesDataKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureGeometryInstancesDataKHR` + public static VkAccelerationStructureGeometryInstancesDataKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureGeometryInstancesDataKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureGeometryInstancesDataKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureGeometryInstancesDataKHR` + public static VkAccelerationStructureGeometryInstancesDataKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureGeometryInstancesDataKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureGeometryInstancesDataKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureGeometryInstancesDataKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureGeometryInstancesDataKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureGeometryInstancesDataKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryInstancesDataKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureGeometryInstancesDataKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryInstancesDataKHR sType(@CType("VkStructureType") int value) { VkAccelerationStructureGeometryInstancesDataKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureGeometryInstancesDataKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureGeometryInstancesDataKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureGeometryInstancesDataKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryInstancesDataKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryInstancesDataKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryInstancesDataKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryInstancesDataKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryInstancesDataKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `arrayOfPointers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_arrayOfPointers(MemorySegment segment, long index) { return (int) VH_arrayOfPointers.get(segment, 0L, index); } + /// {@return `arrayOfPointers`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_arrayOfPointers(MemorySegment segment) { return VkAccelerationStructureGeometryInstancesDataKHR.get_arrayOfPointers(segment, 0L); } + /// {@return `arrayOfPointers` at the given index} + /// @param index the index + public @CType("VkBool32") int arrayOfPointersAt(long index) { return VkAccelerationStructureGeometryInstancesDataKHR.get_arrayOfPointers(this.segment(), index); } + /// {@return `arrayOfPointers`} + public @CType("VkBool32") int arrayOfPointers() { return VkAccelerationStructureGeometryInstancesDataKHR.get_arrayOfPointers(this.segment()); } + /// Sets `arrayOfPointers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_arrayOfPointers(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_arrayOfPointers.set(segment, 0L, index, value); } + /// Sets `arrayOfPointers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_arrayOfPointers(MemorySegment segment, @CType("VkBool32") int value) { VkAccelerationStructureGeometryInstancesDataKHR.set_arrayOfPointers(segment, 0L, value); } + /// Sets `arrayOfPointers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryInstancesDataKHR arrayOfPointersAt(long index, @CType("VkBool32") int value) { VkAccelerationStructureGeometryInstancesDataKHR.set_arrayOfPointers(this.segment(), index, value); return this; } + /// Sets `arrayOfPointers` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryInstancesDataKHR arrayOfPointers(@CType("VkBool32") int value) { VkAccelerationStructureGeometryInstancesDataKHR.set_arrayOfPointers(this.segment(), value); return this; } + + /// {@return `data` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_data(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_data, index), ML_data); } + /// {@return `data`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_data(MemorySegment segment) { return VkAccelerationStructureGeometryInstancesDataKHR.get_data(segment, 0L); } + /// {@return `data` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment dataAt(long index) { return VkAccelerationStructureGeometryInstancesDataKHR.get_data(this.segment(), index); } + /// {@return `data`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment data() { return VkAccelerationStructureGeometryInstancesDataKHR.get_data(this.segment()); } + /// Sets `data` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_data(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_data, index), ML_data.byteSize()); } + /// Sets `data` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_data(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryInstancesDataKHR.set_data(segment, 0L, value); } + /// Sets `data` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryInstancesDataKHR dataAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryInstancesDataKHR.set_data(this.segment(), index, value); return this; } + /// Sets `data` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryInstancesDataKHR data(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryInstancesDataKHR.set_data(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryKHR.java new file mode 100644 index 00000000..2887de0f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryKHR.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### geometryType +/// [VarHandle][#VH_geometryType] - [Getter][#geometryType()] - [Setter][#geometryType(int)] +/// ### geometry +/// [Byte offset][#OFFSET_geometry] - [Memory layout][#ML_geometry] - [Getter][#geometry()] - [Setter][#geometry(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureGeometryKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkGeometryTypeKHR geometryType; +/// VkAccelerationStructureGeometryDataKHR geometry; +/// VkGeometryFlagsKHR flags; +/// } VkAccelerationStructureGeometryKHR; +/// ``` +public final class VkAccelerationStructureGeometryKHR extends Struct { + /// The struct layout of `VkAccelerationStructureGeometryKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("geometryType"), + overrungl.vulkan.khr.union.VkAccelerationStructureGeometryDataKHR.LAYOUT.withName("geometry"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `geometryType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_geometryType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("geometryType")); + /// The byte offset of `geometry`. + public static final long OFFSET_geometry = LAYOUT.byteOffset(PathElement.groupElement("geometry")); + /// The memory layout of `geometry`. + public static final MemoryLayout ML_geometry = LAYOUT.select(PathElement.groupElement("geometry")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkAccelerationStructureGeometryKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureGeometryKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureGeometryKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryKHR(segment); } + + /// Creates `VkAccelerationStructureGeometryKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureGeometryKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureGeometryKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureGeometryKHR` + public static VkAccelerationStructureGeometryKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureGeometryKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureGeometryKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureGeometryKHR` + public static VkAccelerationStructureGeometryKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureGeometryKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureGeometryKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureGeometryKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureGeometryKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureGeometryKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureGeometryKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryKHR sType(@CType("VkStructureType") int value) { VkAccelerationStructureGeometryKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureGeometryKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureGeometryKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureGeometryKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `geometryType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGeometryTypeKHR") int get_geometryType(MemorySegment segment, long index) { return (int) VH_geometryType.get(segment, 0L, index); } + /// {@return `geometryType`} + /// @param segment the segment of the struct + public static @CType("VkGeometryTypeKHR") int get_geometryType(MemorySegment segment) { return VkAccelerationStructureGeometryKHR.get_geometryType(segment, 0L); } + /// {@return `geometryType` at the given index} + /// @param index the index + public @CType("VkGeometryTypeKHR") int geometryTypeAt(long index) { return VkAccelerationStructureGeometryKHR.get_geometryType(this.segment(), index); } + /// {@return `geometryType`} + public @CType("VkGeometryTypeKHR") int geometryType() { return VkAccelerationStructureGeometryKHR.get_geometryType(this.segment()); } + /// Sets `geometryType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_geometryType(MemorySegment segment, long index, @CType("VkGeometryTypeKHR") int value) { VH_geometryType.set(segment, 0L, index, value); } + /// Sets `geometryType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_geometryType(MemorySegment segment, @CType("VkGeometryTypeKHR") int value) { VkAccelerationStructureGeometryKHR.set_geometryType(segment, 0L, value); } + /// Sets `geometryType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryKHR geometryTypeAt(long index, @CType("VkGeometryTypeKHR") int value) { VkAccelerationStructureGeometryKHR.set_geometryType(this.segment(), index, value); return this; } + /// Sets `geometryType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryKHR geometryType(@CType("VkGeometryTypeKHR") int value) { VkAccelerationStructureGeometryKHR.set_geometryType(this.segment(), value); return this; } + + /// {@return `geometry` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureGeometryDataKHR") java.lang.foreign.MemorySegment get_geometry(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_geometry, index), ML_geometry); } + /// {@return `geometry`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureGeometryDataKHR") java.lang.foreign.MemorySegment get_geometry(MemorySegment segment) { return VkAccelerationStructureGeometryKHR.get_geometry(segment, 0L); } + /// {@return `geometry` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureGeometryDataKHR") java.lang.foreign.MemorySegment geometryAt(long index) { return VkAccelerationStructureGeometryKHR.get_geometry(this.segment(), index); } + /// {@return `geometry`} + public @CType("VkAccelerationStructureGeometryDataKHR") java.lang.foreign.MemorySegment geometry() { return VkAccelerationStructureGeometryKHR.get_geometry(this.segment()); } + /// Sets `geometry` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_geometry(MemorySegment segment, long index, @CType("VkAccelerationStructureGeometryDataKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_geometry, index), ML_geometry.byteSize()); } + /// Sets `geometry` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_geometry(MemorySegment segment, @CType("VkAccelerationStructureGeometryDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryKHR.set_geometry(segment, 0L, value); } + /// Sets `geometry` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryKHR geometryAt(long index, @CType("VkAccelerationStructureGeometryDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryKHR.set_geometry(this.segment(), index, value); return this; } + /// Sets `geometry` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryKHR geometry(@CType("VkAccelerationStructureGeometryDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryKHR.set_geometry(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGeometryFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkGeometryFlagsKHR") int get_flags(MemorySegment segment) { return VkAccelerationStructureGeometryKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkGeometryFlagsKHR") int flagsAt(long index) { return VkAccelerationStructureGeometryKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkGeometryFlagsKHR") int flags() { return VkAccelerationStructureGeometryKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkGeometryFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkGeometryFlagsKHR") int value) { VkAccelerationStructureGeometryKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryKHR flagsAt(long index, @CType("VkGeometryFlagsKHR") int value) { VkAccelerationStructureGeometryKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryKHR flags(@CType("VkGeometryFlagsKHR") int value) { VkAccelerationStructureGeometryKHR.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryTrianglesDataKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryTrianglesDataKHR.java new file mode 100644 index 00000000..fe8f713c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureGeometryTrianglesDataKHR.java @@ -0,0 +1,413 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### vertexFormat +/// [VarHandle][#VH_vertexFormat] - [Getter][#vertexFormat()] - [Setter][#vertexFormat(int)] +/// ### vertexData +/// [Byte offset][#OFFSET_vertexData] - [Memory layout][#ML_vertexData] - [Getter][#vertexData()] - [Setter][#vertexData(java.lang.foreign.MemorySegment)] +/// ### vertexStride +/// [VarHandle][#VH_vertexStride] - [Getter][#vertexStride()] - [Setter][#vertexStride(long)] +/// ### maxVertex +/// [VarHandle][#VH_maxVertex] - [Getter][#maxVertex()] - [Setter][#maxVertex(int)] +/// ### indexType +/// [VarHandle][#VH_indexType] - [Getter][#indexType()] - [Setter][#indexType(int)] +/// ### indexData +/// [Byte offset][#OFFSET_indexData] - [Memory layout][#ML_indexData] - [Getter][#indexData()] - [Setter][#indexData(java.lang.foreign.MemorySegment)] +/// ### transformData +/// [Byte offset][#OFFSET_transformData] - [Memory layout][#ML_transformData] - [Getter][#transformData()] - [Setter][#transformData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureGeometryTrianglesDataKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkFormat vertexFormat; +/// VkDeviceOrHostAddressConstKHR vertexData; +/// VkDeviceSize vertexStride; +/// uint32_t maxVertex; +/// VkIndexType indexType; +/// VkDeviceOrHostAddressConstKHR indexData; +/// VkDeviceOrHostAddressConstKHR transformData; +/// } VkAccelerationStructureGeometryTrianglesDataKHR; +/// ``` +public final class VkAccelerationStructureGeometryTrianglesDataKHR extends Struct { + /// The struct layout of `VkAccelerationStructureGeometryTrianglesDataKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("vertexFormat"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("vertexData"), + ValueLayout.JAVA_LONG.withName("vertexStride"), + ValueLayout.JAVA_INT.withName("maxVertex"), + ValueLayout.JAVA_INT.withName("indexType"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("indexData"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("transformData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `vertexFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexFormat")); + /// The byte offset of `vertexData`. + public static final long OFFSET_vertexData = LAYOUT.byteOffset(PathElement.groupElement("vertexData")); + /// The memory layout of `vertexData`. + public static final MemoryLayout ML_vertexData = LAYOUT.select(PathElement.groupElement("vertexData")); + /// The [VarHandle] of `vertexStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_vertexStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexStride")); + /// The [VarHandle] of `maxVertex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVertex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVertex")); + /// The [VarHandle] of `indexType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexType")); + /// The byte offset of `indexData`. + public static final long OFFSET_indexData = LAYOUT.byteOffset(PathElement.groupElement("indexData")); + /// The memory layout of `indexData`. + public static final MemoryLayout ML_indexData = LAYOUT.select(PathElement.groupElement("indexData")); + /// The byte offset of `transformData`. + public static final long OFFSET_transformData = LAYOUT.byteOffset(PathElement.groupElement("transformData")); + /// The memory layout of `transformData`. + public static final MemoryLayout ML_transformData = LAYOUT.select(PathElement.groupElement("transformData")); + + /// Creates `VkAccelerationStructureGeometryTrianglesDataKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureGeometryTrianglesDataKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureGeometryTrianglesDataKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryTrianglesDataKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryTrianglesDataKHR(segment); } + + /// Creates `VkAccelerationStructureGeometryTrianglesDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryTrianglesDataKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryTrianglesDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureGeometryTrianglesDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryTrianglesDataKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryTrianglesDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureGeometryTrianglesDataKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureGeometryTrianglesDataKHR` + public static VkAccelerationStructureGeometryTrianglesDataKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureGeometryTrianglesDataKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureGeometryTrianglesDataKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureGeometryTrianglesDataKHR` + public static VkAccelerationStructureGeometryTrianglesDataKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureGeometryTrianglesDataKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureGeometryTrianglesDataKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR sType(@CType("VkStructureType") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureGeometryTrianglesDataKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `vertexFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_vertexFormat(MemorySegment segment, long index) { return (int) VH_vertexFormat.get(segment, 0L, index); } + /// {@return `vertexFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_vertexFormat(MemorySegment segment) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_vertexFormat(segment, 0L); } + /// {@return `vertexFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int vertexFormatAt(long index) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_vertexFormat(this.segment(), index); } + /// {@return `vertexFormat`} + public @CType("VkFormat") int vertexFormat() { return VkAccelerationStructureGeometryTrianglesDataKHR.get_vertexFormat(this.segment()); } + /// Sets `vertexFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_vertexFormat.set(segment, 0L, index, value); } + /// Sets `vertexFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexFormat(MemorySegment segment, @CType("VkFormat") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_vertexFormat(segment, 0L, value); } + /// Sets `vertexFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR vertexFormatAt(long index, @CType("VkFormat") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_vertexFormat(this.segment(), index, value); return this; } + /// Sets `vertexFormat` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR vertexFormat(@CType("VkFormat") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_vertexFormat(this.segment(), value); return this; } + + /// {@return `vertexData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_vertexData(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_vertexData, index), ML_vertexData); } + /// {@return `vertexData`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_vertexData(MemorySegment segment) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_vertexData(segment, 0L); } + /// {@return `vertexData` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment vertexDataAt(long index) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_vertexData(this.segment(), index); } + /// {@return `vertexData`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment vertexData() { return VkAccelerationStructureGeometryTrianglesDataKHR.get_vertexData(this.segment()); } + /// Sets `vertexData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexData(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_vertexData, index), ML_vertexData.byteSize()); } + /// Sets `vertexData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexData(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_vertexData(segment, 0L, value); } + /// Sets `vertexData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR vertexDataAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_vertexData(this.segment(), index, value); return this; } + /// Sets `vertexData` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR vertexData(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_vertexData(this.segment(), value); return this; } + + /// {@return `vertexStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_vertexStride(MemorySegment segment, long index) { return (long) VH_vertexStride.get(segment, 0L, index); } + /// {@return `vertexStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_vertexStride(MemorySegment segment) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_vertexStride(segment, 0L); } + /// {@return `vertexStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long vertexStrideAt(long index) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_vertexStride(this.segment(), index); } + /// {@return `vertexStride`} + public @CType("VkDeviceSize") long vertexStride() { return VkAccelerationStructureGeometryTrianglesDataKHR.get_vertexStride(this.segment()); } + /// Sets `vertexStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_vertexStride.set(segment, 0L, index, value); } + /// Sets `vertexStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_vertexStride(segment, 0L, value); } + /// Sets `vertexStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR vertexStrideAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_vertexStride(this.segment(), index, value); return this; } + /// Sets `vertexStride` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR vertexStride(@CType("VkDeviceSize") long value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_vertexStride(this.segment(), value); return this; } + + /// {@return `maxVertex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVertex(MemorySegment segment, long index) { return (int) VH_maxVertex.get(segment, 0L, index); } + /// {@return `maxVertex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVertex(MemorySegment segment) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_maxVertex(segment, 0L); } + /// {@return `maxVertex` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVertexAt(long index) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_maxVertex(this.segment(), index); } + /// {@return `maxVertex`} + public @CType("uint32_t") int maxVertex() { return VkAccelerationStructureGeometryTrianglesDataKHR.get_maxVertex(this.segment()); } + /// Sets `maxVertex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVertex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVertex.set(segment, 0L, index, value); } + /// Sets `maxVertex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVertex(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_maxVertex(segment, 0L, value); } + /// Sets `maxVertex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR maxVertexAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_maxVertex(this.segment(), index, value); return this; } + /// Sets `maxVertex` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR maxVertex(@CType("uint32_t") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_maxVertex(this.segment(), value); return this; } + + /// {@return `indexType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndexType") int get_indexType(MemorySegment segment, long index) { return (int) VH_indexType.get(segment, 0L, index); } + /// {@return `indexType`} + /// @param segment the segment of the struct + public static @CType("VkIndexType") int get_indexType(MemorySegment segment) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_indexType(segment, 0L); } + /// {@return `indexType` at the given index} + /// @param index the index + public @CType("VkIndexType") int indexTypeAt(long index) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_indexType(this.segment(), index); } + /// {@return `indexType`} + public @CType("VkIndexType") int indexType() { return VkAccelerationStructureGeometryTrianglesDataKHR.get_indexType(this.segment()); } + /// Sets `indexType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexType(MemorySegment segment, long index, @CType("VkIndexType") int value) { VH_indexType.set(segment, 0L, index, value); } + /// Sets `indexType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexType(MemorySegment segment, @CType("VkIndexType") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_indexType(segment, 0L, value); } + /// Sets `indexType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR indexTypeAt(long index, @CType("VkIndexType") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_indexType(this.segment(), index, value); return this; } + /// Sets `indexType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR indexType(@CType("VkIndexType") int value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_indexType(this.segment(), value); return this; } + + /// {@return `indexData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_indexData(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_indexData, index), ML_indexData); } + /// {@return `indexData`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_indexData(MemorySegment segment) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_indexData(segment, 0L); } + /// {@return `indexData` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment indexDataAt(long index) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_indexData(this.segment(), index); } + /// {@return `indexData`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment indexData() { return VkAccelerationStructureGeometryTrianglesDataKHR.get_indexData(this.segment()); } + /// Sets `indexData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexData(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_indexData, index), ML_indexData.byteSize()); } + /// Sets `indexData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexData(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_indexData(segment, 0L, value); } + /// Sets `indexData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR indexDataAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_indexData(this.segment(), index, value); return this; } + /// Sets `indexData` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR indexData(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_indexData(this.segment(), value); return this; } + + /// {@return `transformData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_transformData(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_transformData, index), ML_transformData); } + /// {@return `transformData`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_transformData(MemorySegment segment) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_transformData(segment, 0L); } + /// {@return `transformData` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment transformDataAt(long index) { return VkAccelerationStructureGeometryTrianglesDataKHR.get_transformData(this.segment(), index); } + /// {@return `transformData`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment transformData() { return VkAccelerationStructureGeometryTrianglesDataKHR.get_transformData(this.segment()); } + /// Sets `transformData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformData(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_transformData, index), ML_transformData.byteSize()); } + /// Sets `transformData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformData(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_transformData(segment, 0L, value); } + /// Sets `transformData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR transformDataAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_transformData(this.segment(), index, value); return this; } + /// Sets `transformData` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryTrianglesDataKHR transformData(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryTrianglesDataKHR.set_transformData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureInstanceKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureInstanceKHR.java new file mode 100644 index 00000000..cb1bc08f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureInstanceKHR.java @@ -0,0 +1,298 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### transform +/// [Byte offset][#OFFSET_transform] - [Memory layout][#ML_transform] - [Getter][#transform()] - [Setter][#transform(java.lang.foreign.MemorySegment)] +/// ### instanceCustomIndex +/// [VarHandle][#VH_instanceCustomIndex] - [Getter][#instanceCustomIndex()] - [Setter][#instanceCustomIndex(int)] +/// ### mask +/// [VarHandle][#VH_mask] - [Getter][#mask()] - [Setter][#mask(int)] +/// ### instanceShaderBindingTableRecordOffset +/// [VarHandle][#VH_instanceShaderBindingTableRecordOffset] - [Getter][#instanceShaderBindingTableRecordOffset()] - [Setter][#instanceShaderBindingTableRecordOffset(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### accelerationStructureReference +/// [VarHandle][#VH_accelerationStructureReference] - [Getter][#accelerationStructureReference()] - [Setter][#accelerationStructureReference(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureInstanceKHR { +/// VkTransformMatrixKHR transform; +/// uint32_t instanceCustomIndex; +/// uint32_t mask; +/// uint32_t instanceShaderBindingTableRecordOffset; +/// VkGeometryInstanceFlagsKHR flags; +/// uint64_t accelerationStructureReference; +/// } VkAccelerationStructureInstanceKHR; +/// ``` +public final class VkAccelerationStructureInstanceKHR extends Struct { + /// The struct layout of `VkAccelerationStructureInstanceKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.khr.struct.VkTransformMatrixKHR.LAYOUT.withName("transform"), + ValueLayout.JAVA_INT.withName("instanceCustomIndex"), + ValueLayout.JAVA_INT.withName("mask"), + ValueLayout.JAVA_INT.withName("instanceShaderBindingTableRecordOffset"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("accelerationStructureReference") + ); + /// The byte offset of `transform`. + public static final long OFFSET_transform = LAYOUT.byteOffset(PathElement.groupElement("transform")); + /// The memory layout of `transform`. + public static final MemoryLayout ML_transform = LAYOUT.select(PathElement.groupElement("transform")); + /// The [VarHandle] of `instanceCustomIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_instanceCustomIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("instanceCustomIndex")); + /// The [VarHandle] of `mask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mask")); + /// The [VarHandle] of `instanceShaderBindingTableRecordOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_instanceShaderBindingTableRecordOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("instanceShaderBindingTableRecordOffset")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `accelerationStructureReference` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_accelerationStructureReference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureReference")); + + /// Creates `VkAccelerationStructureInstanceKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureInstanceKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureInstanceKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureInstanceKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureInstanceKHR(segment); } + + /// Creates `VkAccelerationStructureInstanceKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureInstanceKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureInstanceKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureInstanceKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureInstanceKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureInstanceKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureInstanceKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureInstanceKHR` + public static VkAccelerationStructureInstanceKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureInstanceKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureInstanceKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureInstanceKHR` + public static VkAccelerationStructureInstanceKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureInstanceKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `transform` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment get_transform(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_transform, index), ML_transform); } + /// {@return `transform`} + /// @param segment the segment of the struct + public static @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment get_transform(MemorySegment segment) { return VkAccelerationStructureInstanceKHR.get_transform(segment, 0L); } + /// {@return `transform` at the given index} + /// @param index the index + public @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment transformAt(long index) { return VkAccelerationStructureInstanceKHR.get_transform(this.segment(), index); } + /// {@return `transform`} + public @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment transform() { return VkAccelerationStructureInstanceKHR.get_transform(this.segment()); } + /// Sets `transform` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transform(MemorySegment segment, long index, @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_transform, index), ML_transform.byteSize()); } + /// Sets `transform` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transform(MemorySegment segment, @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureInstanceKHR.set_transform(segment, 0L, value); } + /// Sets `transform` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR transformAt(long index, @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureInstanceKHR.set_transform(this.segment(), index, value); return this; } + /// Sets `transform` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR transform(@CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureInstanceKHR.set_transform(this.segment(), value); return this; } + + /// {@return `instanceCustomIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_instanceCustomIndex(MemorySegment segment, long index) { return (int) VH_instanceCustomIndex.get(segment, 0L, index); } + /// {@return `instanceCustomIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_instanceCustomIndex(MemorySegment segment) { return VkAccelerationStructureInstanceKHR.get_instanceCustomIndex(segment, 0L); } + /// {@return `instanceCustomIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int instanceCustomIndexAt(long index) { return VkAccelerationStructureInstanceKHR.get_instanceCustomIndex(this.segment(), index); } + /// {@return `instanceCustomIndex`} + public @CType("uint32_t") int instanceCustomIndex() { return VkAccelerationStructureInstanceKHR.get_instanceCustomIndex(this.segment()); } + /// Sets `instanceCustomIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_instanceCustomIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_instanceCustomIndex.set(segment, 0L, index, value); } + /// Sets `instanceCustomIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_instanceCustomIndex(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureInstanceKHR.set_instanceCustomIndex(segment, 0L, value); } + /// Sets `instanceCustomIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR instanceCustomIndexAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureInstanceKHR.set_instanceCustomIndex(this.segment(), index, value); return this; } + /// Sets `instanceCustomIndex` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR instanceCustomIndex(@CType("uint32_t") int value) { VkAccelerationStructureInstanceKHR.set_instanceCustomIndex(this.segment(), value); return this; } + + /// {@return `mask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_mask(MemorySegment segment, long index) { return (int) VH_mask.get(segment, 0L, index); } + /// {@return `mask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_mask(MemorySegment segment) { return VkAccelerationStructureInstanceKHR.get_mask(segment, 0L); } + /// {@return `mask` at the given index} + /// @param index the index + public @CType("uint32_t") int maskAt(long index) { return VkAccelerationStructureInstanceKHR.get_mask(this.segment(), index); } + /// {@return `mask`} + public @CType("uint32_t") int mask() { return VkAccelerationStructureInstanceKHR.get_mask(this.segment()); } + /// Sets `mask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_mask.set(segment, 0L, index, value); } + /// Sets `mask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mask(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureInstanceKHR.set_mask(segment, 0L, value); } + /// Sets `mask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR maskAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureInstanceKHR.set_mask(this.segment(), index, value); return this; } + /// Sets `mask` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR mask(@CType("uint32_t") int value) { VkAccelerationStructureInstanceKHR.set_mask(this.segment(), value); return this; } + + /// {@return `instanceShaderBindingTableRecordOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_instanceShaderBindingTableRecordOffset(MemorySegment segment, long index) { return (int) VH_instanceShaderBindingTableRecordOffset.get(segment, 0L, index); } + /// {@return `instanceShaderBindingTableRecordOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_instanceShaderBindingTableRecordOffset(MemorySegment segment) { return VkAccelerationStructureInstanceKHR.get_instanceShaderBindingTableRecordOffset(segment, 0L); } + /// {@return `instanceShaderBindingTableRecordOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int instanceShaderBindingTableRecordOffsetAt(long index) { return VkAccelerationStructureInstanceKHR.get_instanceShaderBindingTableRecordOffset(this.segment(), index); } + /// {@return `instanceShaderBindingTableRecordOffset`} + public @CType("uint32_t") int instanceShaderBindingTableRecordOffset() { return VkAccelerationStructureInstanceKHR.get_instanceShaderBindingTableRecordOffset(this.segment()); } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_instanceShaderBindingTableRecordOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_instanceShaderBindingTableRecordOffset.set(segment, 0L, index, value); } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_instanceShaderBindingTableRecordOffset(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureInstanceKHR.set_instanceShaderBindingTableRecordOffset(segment, 0L, value); } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR instanceShaderBindingTableRecordOffsetAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureInstanceKHR.set_instanceShaderBindingTableRecordOffset(this.segment(), index, value); return this; } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR instanceShaderBindingTableRecordOffset(@CType("uint32_t") int value) { VkAccelerationStructureInstanceKHR.set_instanceShaderBindingTableRecordOffset(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGeometryInstanceFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkGeometryInstanceFlagsKHR") int get_flags(MemorySegment segment) { return VkAccelerationStructureInstanceKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkGeometryInstanceFlagsKHR") int flagsAt(long index) { return VkAccelerationStructureInstanceKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkGeometryInstanceFlagsKHR") int flags() { return VkAccelerationStructureInstanceKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkGeometryInstanceFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkGeometryInstanceFlagsKHR") int value) { VkAccelerationStructureInstanceKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR flagsAt(long index, @CType("VkGeometryInstanceFlagsKHR") int value) { VkAccelerationStructureInstanceKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR flags(@CType("VkGeometryInstanceFlagsKHR") int value) { VkAccelerationStructureInstanceKHR.set_flags(this.segment(), value); return this; } + + /// {@return `accelerationStructureReference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_accelerationStructureReference(MemorySegment segment, long index) { return (long) VH_accelerationStructureReference.get(segment, 0L, index); } + /// {@return `accelerationStructureReference`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_accelerationStructureReference(MemorySegment segment) { return VkAccelerationStructureInstanceKHR.get_accelerationStructureReference(segment, 0L); } + /// {@return `accelerationStructureReference` at the given index} + /// @param index the index + public @CType("uint64_t") long accelerationStructureReferenceAt(long index) { return VkAccelerationStructureInstanceKHR.get_accelerationStructureReference(this.segment(), index); } + /// {@return `accelerationStructureReference`} + public @CType("uint64_t") long accelerationStructureReference() { return VkAccelerationStructureInstanceKHR.get_accelerationStructureReference(this.segment()); } + /// Sets `accelerationStructureReference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureReference(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_accelerationStructureReference.set(segment, 0L, index, value); } + /// Sets `accelerationStructureReference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureReference(MemorySegment segment, @CType("uint64_t") long value) { VkAccelerationStructureInstanceKHR.set_accelerationStructureReference(segment, 0L, value); } + /// Sets `accelerationStructureReference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR accelerationStructureReferenceAt(long index, @CType("uint64_t") long value) { VkAccelerationStructureInstanceKHR.set_accelerationStructureReference(this.segment(), index, value); return this; } + /// Sets `accelerationStructureReference` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInstanceKHR accelerationStructureReference(@CType("uint64_t") long value) { VkAccelerationStructureInstanceKHR.set_accelerationStructureReference(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureVersionInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureVersionInfoKHR.java new file mode 100644 index 00000000..9ee5f40b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAccelerationStructureVersionInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pVersionData +/// [VarHandle][#VH_pVersionData] - [Getter][#pVersionData()] - [Setter][#pVersionData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureVersionInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const uint8_t * pVersionData; +/// } VkAccelerationStructureVersionInfoKHR; +/// ``` +public final class VkAccelerationStructureVersionInfoKHR extends Struct { + /// The struct layout of `VkAccelerationStructureVersionInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pVersionData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pVersionData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVersionData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVersionData")); + + /// Creates `VkAccelerationStructureVersionInfoKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureVersionInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureVersionInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureVersionInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureVersionInfoKHR(segment); } + + /// Creates `VkAccelerationStructureVersionInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureVersionInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureVersionInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureVersionInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureVersionInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureVersionInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureVersionInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureVersionInfoKHR` + public static VkAccelerationStructureVersionInfoKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureVersionInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureVersionInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureVersionInfoKHR` + public static VkAccelerationStructureVersionInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureVersionInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureVersionInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureVersionInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureVersionInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureVersionInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureVersionInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureVersionInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureVersionInfoKHR sType(@CType("VkStructureType") int value) { VkAccelerationStructureVersionInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureVersionInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureVersionInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureVersionInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureVersionInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureVersionInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureVersionInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureVersionInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureVersionInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pVersionData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint8_t *") java.lang.foreign.MemorySegment get_pVersionData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVersionData.get(segment, 0L, index); } + /// {@return `pVersionData`} + /// @param segment the segment of the struct + public static @CType("const uint8_t *") java.lang.foreign.MemorySegment get_pVersionData(MemorySegment segment) { return VkAccelerationStructureVersionInfoKHR.get_pVersionData(segment, 0L); } + /// {@return `pVersionData` at the given index} + /// @param index the index + public @CType("const uint8_t *") java.lang.foreign.MemorySegment pVersionDataAt(long index) { return VkAccelerationStructureVersionInfoKHR.get_pVersionData(this.segment(), index); } + /// {@return `pVersionData`} + public @CType("const uint8_t *") java.lang.foreign.MemorySegment pVersionData() { return VkAccelerationStructureVersionInfoKHR.get_pVersionData(this.segment()); } + /// Sets `pVersionData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVersionData(MemorySegment segment, long index, @CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VH_pVersionData.set(segment, 0L, index, value); } + /// Sets `pVersionData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVersionData(MemorySegment segment, @CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureVersionInfoKHR.set_pVersionData(segment, 0L, value); } + /// Sets `pVersionData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureVersionInfoKHR pVersionDataAt(long index, @CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureVersionInfoKHR.set_pVersionData(this.segment(), index, value); return this; } + /// Sets `pVersionData` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureVersionInfoKHR pVersionData(@CType("const uint8_t *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureVersionInfoKHR.set_pVersionData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAcquireNextImageInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAcquireNextImageInfoKHR.java new file mode 100644 index 00000000..8c68504e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAcquireNextImageInfoKHR.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchain +/// [VarHandle][#VH_swapchain] - [Getter][#swapchain()] - [Setter][#swapchain(java.lang.foreign.MemorySegment)] +/// ### timeout +/// [VarHandle][#VH_timeout] - [Getter][#timeout()] - [Setter][#timeout(long)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### fence +/// [VarHandle][#VH_fence] - [Getter][#fence()] - [Setter][#fence(java.lang.foreign.MemorySegment)] +/// ### deviceMask +/// [VarHandle][#VH_deviceMask] - [Getter][#deviceMask()] - [Setter][#deviceMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAcquireNextImageInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkSwapchainKHR swapchain; +/// uint64_t timeout; +/// VkSemaphore semaphore; +/// VkFence fence; +/// uint32_t deviceMask; +/// } VkAcquireNextImageInfoKHR; +/// ``` +public final class VkAcquireNextImageInfoKHR extends Struct { + /// The struct layout of `VkAcquireNextImageInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("swapchain"), + ValueLayout.JAVA_LONG.withName("timeout"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.ADDRESS.withName("fence"), + ValueLayout.JAVA_INT.withName("deviceMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchain` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_swapchain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchain")); + /// The [VarHandle] of `timeout` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_timeout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timeout")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `fence` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_fence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fence")); + /// The [VarHandle] of `deviceMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceMask")); + + /// Creates `VkAcquireNextImageInfoKHR` with the given segment. + /// @param segment the memory segment + public VkAcquireNextImageInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAcquireNextImageInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAcquireNextImageInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAcquireNextImageInfoKHR(segment); } + + /// Creates `VkAcquireNextImageInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAcquireNextImageInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAcquireNextImageInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAcquireNextImageInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAcquireNextImageInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAcquireNextImageInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAcquireNextImageInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAcquireNextImageInfoKHR` + public static VkAcquireNextImageInfoKHR alloc(SegmentAllocator allocator) { return new VkAcquireNextImageInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAcquireNextImageInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAcquireNextImageInfoKHR` + public static VkAcquireNextImageInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkAcquireNextImageInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAcquireNextImageInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAcquireNextImageInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAcquireNextImageInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAcquireNextImageInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAcquireNextImageInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR sType(@CType("VkStructureType") int value) { VkAcquireNextImageInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAcquireNextImageInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAcquireNextImageInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAcquireNextImageInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment get_swapchain(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_swapchain.get(segment, 0L, index); } + /// {@return `swapchain`} + /// @param segment the segment of the struct + public static @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment get_swapchain(MemorySegment segment) { return VkAcquireNextImageInfoKHR.get_swapchain(segment, 0L); } + /// {@return `swapchain` at the given index} + /// @param index the index + public @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment swapchainAt(long index) { return VkAcquireNextImageInfoKHR.get_swapchain(this.segment(), index); } + /// {@return `swapchain`} + public @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment swapchain() { return VkAcquireNextImageInfoKHR.get_swapchain(this.segment()); } + /// Sets `swapchain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchain(MemorySegment segment, long index, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VH_swapchain.set(segment, 0L, index, value); } + /// Sets `swapchain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchain(MemorySegment segment, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_swapchain(segment, 0L, value); } + /// Sets `swapchain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR swapchainAt(long index, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_swapchain(this.segment(), index, value); return this; } + /// Sets `swapchain` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR swapchain(@CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_swapchain(this.segment(), value); return this; } + + /// {@return `timeout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_timeout(MemorySegment segment, long index) { return (long) VH_timeout.get(segment, 0L, index); } + /// {@return `timeout`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_timeout(MemorySegment segment) { return VkAcquireNextImageInfoKHR.get_timeout(segment, 0L); } + /// {@return `timeout` at the given index} + /// @param index the index + public @CType("uint64_t") long timeoutAt(long index) { return VkAcquireNextImageInfoKHR.get_timeout(this.segment(), index); } + /// {@return `timeout`} + public @CType("uint64_t") long timeout() { return VkAcquireNextImageInfoKHR.get_timeout(this.segment()); } + /// Sets `timeout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timeout(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_timeout.set(segment, 0L, index, value); } + /// Sets `timeout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timeout(MemorySegment segment, @CType("uint64_t") long value) { VkAcquireNextImageInfoKHR.set_timeout(segment, 0L, value); } + /// Sets `timeout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR timeoutAt(long index, @CType("uint64_t") long value) { VkAcquireNextImageInfoKHR.set_timeout(this.segment(), index, value); return this; } + /// Sets `timeout` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR timeout(@CType("uint64_t") long value) { VkAcquireNextImageInfoKHR.set_timeout(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkAcquireNextImageInfoKHR.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkAcquireNextImageInfoKHR.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkAcquireNextImageInfoKHR.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_semaphore(this.segment(), value); return this; } + + /// {@return `fence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_fence.get(segment, 0L, index); } + /// {@return `fence`} + /// @param segment the segment of the struct + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment) { return VkAcquireNextImageInfoKHR.get_fence(segment, 0L); } + /// {@return `fence` at the given index} + /// @param index the index + public @CType("VkFence") java.lang.foreign.MemorySegment fenceAt(long index) { return VkAcquireNextImageInfoKHR.get_fence(this.segment(), index); } + /// {@return `fence`} + public @CType("VkFence") java.lang.foreign.MemorySegment fence() { return VkAcquireNextImageInfoKHR.get_fence(this.segment()); } + /// Sets `fence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fence(MemorySegment segment, long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VH_fence.set(segment, 0L, index, value); } + /// Sets `fence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fence(MemorySegment segment, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_fence(segment, 0L, value); } + /// Sets `fence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR fenceAt(long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_fence(this.segment(), index, value); return this; } + /// Sets `fence` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR fence(@CType("VkFence") java.lang.foreign.MemorySegment value) { VkAcquireNextImageInfoKHR.set_fence(this.segment(), value); return this; } + + /// {@return `deviceMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceMask(MemorySegment segment, long index) { return (int) VH_deviceMask.get(segment, 0L, index); } + /// {@return `deviceMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceMask(MemorySegment segment) { return VkAcquireNextImageInfoKHR.get_deviceMask(segment, 0L); } + /// {@return `deviceMask` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceMaskAt(long index) { return VkAcquireNextImageInfoKHR.get_deviceMask(this.segment(), index); } + /// {@return `deviceMask`} + public @CType("uint32_t") int deviceMask() { return VkAcquireNextImageInfoKHR.get_deviceMask(this.segment()); } + /// Sets `deviceMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceMask.set(segment, 0L, index, value); } + /// Sets `deviceMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceMask(MemorySegment segment, @CType("uint32_t") int value) { VkAcquireNextImageInfoKHR.set_deviceMask(segment, 0L, value); } + /// Sets `deviceMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR deviceMaskAt(long index, @CType("uint32_t") int value) { VkAcquireNextImageInfoKHR.set_deviceMask(this.segment(), index, value); return this; } + /// Sets `deviceMask` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireNextImageInfoKHR deviceMask(@CType("uint32_t") int value) { VkAcquireNextImageInfoKHR.set_deviceMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAcquireProfilingLockInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAcquireProfilingLockInfoKHR.java new file mode 100644 index 00000000..67394aa5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAcquireProfilingLockInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### timeout +/// [VarHandle][#VH_timeout] - [Getter][#timeout()] - [Setter][#timeout(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAcquireProfilingLockInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkAcquireProfilingLockFlagsKHR flags; +/// uint64_t timeout; +/// } VkAcquireProfilingLockInfoKHR; +/// ``` +public final class VkAcquireProfilingLockInfoKHR extends Struct { + /// The struct layout of `VkAcquireProfilingLockInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("timeout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `timeout` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_timeout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timeout")); + + /// Creates `VkAcquireProfilingLockInfoKHR` with the given segment. + /// @param segment the memory segment + public VkAcquireProfilingLockInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAcquireProfilingLockInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAcquireProfilingLockInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAcquireProfilingLockInfoKHR(segment); } + + /// Creates `VkAcquireProfilingLockInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAcquireProfilingLockInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAcquireProfilingLockInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAcquireProfilingLockInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAcquireProfilingLockInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAcquireProfilingLockInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAcquireProfilingLockInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAcquireProfilingLockInfoKHR` + public static VkAcquireProfilingLockInfoKHR alloc(SegmentAllocator allocator) { return new VkAcquireProfilingLockInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAcquireProfilingLockInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAcquireProfilingLockInfoKHR` + public static VkAcquireProfilingLockInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkAcquireProfilingLockInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAcquireProfilingLockInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAcquireProfilingLockInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAcquireProfilingLockInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAcquireProfilingLockInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireProfilingLockInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAcquireProfilingLockInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireProfilingLockInfoKHR sType(@CType("VkStructureType") int value) { VkAcquireProfilingLockInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAcquireProfilingLockInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAcquireProfilingLockInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAcquireProfilingLockInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAcquireProfilingLockInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireProfilingLockInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAcquireProfilingLockInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireProfilingLockInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAcquireProfilingLockInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAcquireProfilingLockFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkAcquireProfilingLockFlagsKHR") int get_flags(MemorySegment segment) { return VkAcquireProfilingLockInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkAcquireProfilingLockFlagsKHR") int flagsAt(long index) { return VkAcquireProfilingLockInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkAcquireProfilingLockFlagsKHR") int flags() { return VkAcquireProfilingLockInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkAcquireProfilingLockFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkAcquireProfilingLockFlagsKHR") int value) { VkAcquireProfilingLockInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireProfilingLockInfoKHR flagsAt(long index, @CType("VkAcquireProfilingLockFlagsKHR") int value) { VkAcquireProfilingLockInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireProfilingLockInfoKHR flags(@CType("VkAcquireProfilingLockFlagsKHR") int value) { VkAcquireProfilingLockInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `timeout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_timeout(MemorySegment segment, long index) { return (long) VH_timeout.get(segment, 0L, index); } + /// {@return `timeout`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_timeout(MemorySegment segment) { return VkAcquireProfilingLockInfoKHR.get_timeout(segment, 0L); } + /// {@return `timeout` at the given index} + /// @param index the index + public @CType("uint64_t") long timeoutAt(long index) { return VkAcquireProfilingLockInfoKHR.get_timeout(this.segment(), index); } + /// {@return `timeout`} + public @CType("uint64_t") long timeout() { return VkAcquireProfilingLockInfoKHR.get_timeout(this.segment()); } + /// Sets `timeout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timeout(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_timeout.set(segment, 0L, index, value); } + /// Sets `timeout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timeout(MemorySegment segment, @CType("uint64_t") long value) { VkAcquireProfilingLockInfoKHR.set_timeout(segment, 0L, value); } + /// Sets `timeout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAcquireProfilingLockInfoKHR timeoutAt(long index, @CType("uint64_t") long value) { VkAcquireProfilingLockInfoKHR.set_timeout(this.segment(), index, value); return this; } + /// Sets `timeout` with the given value. + /// @param value the value + /// @return `this` + public VkAcquireProfilingLockInfoKHR timeout(@CType("uint64_t") long value) { VkAcquireProfilingLockInfoKHR.set_timeout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAndroidSurfaceCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAndroidSurfaceCreateInfoKHR.java new file mode 100644 index 00000000..86fb2dea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkAndroidSurfaceCreateInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### window +/// [VarHandle][#VH_window] - [Getter][#window()] - [Setter][#window(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAndroidSurfaceCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkAndroidSurfaceCreateFlagsKHR flags; +/// struct ANativeWindow * window; +/// } VkAndroidSurfaceCreateInfoKHR; +/// ``` +public final class VkAndroidSurfaceCreateInfoKHR extends Struct { + /// The struct layout of `VkAndroidSurfaceCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("window") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `window` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_window = LAYOUT.arrayElementVarHandle(PathElement.groupElement("window")); + + /// Creates `VkAndroidSurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkAndroidSurfaceCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAndroidSurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidSurfaceCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidSurfaceCreateInfoKHR(segment); } + + /// Creates `VkAndroidSurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidSurfaceCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidSurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAndroidSurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAndroidSurfaceCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAndroidSurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAndroidSurfaceCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAndroidSurfaceCreateInfoKHR` + public static VkAndroidSurfaceCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkAndroidSurfaceCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAndroidSurfaceCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAndroidSurfaceCreateInfoKHR` + public static VkAndroidSurfaceCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkAndroidSurfaceCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAndroidSurfaceCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAndroidSurfaceCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAndroidSurfaceCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAndroidSurfaceCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidSurfaceCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkAndroidSurfaceCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidSurfaceCreateInfoKHR sType(@CType("VkStructureType") int value) { VkAndroidSurfaceCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAndroidSurfaceCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAndroidSurfaceCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAndroidSurfaceCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAndroidSurfaceCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidSurfaceCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAndroidSurfaceCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidSurfaceCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAndroidSurfaceCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAndroidSurfaceCreateFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkAndroidSurfaceCreateFlagsKHR") int get_flags(MemorySegment segment) { return VkAndroidSurfaceCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkAndroidSurfaceCreateFlagsKHR") int flagsAt(long index) { return VkAndroidSurfaceCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkAndroidSurfaceCreateFlagsKHR") int flags() { return VkAndroidSurfaceCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkAndroidSurfaceCreateFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkAndroidSurfaceCreateFlagsKHR") int value) { VkAndroidSurfaceCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidSurfaceCreateInfoKHR flagsAt(long index, @CType("VkAndroidSurfaceCreateFlagsKHR") int value) { VkAndroidSurfaceCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidSurfaceCreateInfoKHR flags(@CType("VkAndroidSurfaceCreateFlagsKHR") int value) { VkAndroidSurfaceCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `window` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("struct ANativeWindow *") java.lang.foreign.MemorySegment get_window(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_window.get(segment, 0L, index); } + /// {@return `window`} + /// @param segment the segment of the struct + public static @CType("struct ANativeWindow *") java.lang.foreign.MemorySegment get_window(MemorySegment segment) { return VkAndroidSurfaceCreateInfoKHR.get_window(segment, 0L); } + /// {@return `window` at the given index} + /// @param index the index + public @CType("struct ANativeWindow *") java.lang.foreign.MemorySegment windowAt(long index) { return VkAndroidSurfaceCreateInfoKHR.get_window(this.segment(), index); } + /// {@return `window`} + public @CType("struct ANativeWindow *") java.lang.foreign.MemorySegment window() { return VkAndroidSurfaceCreateInfoKHR.get_window(this.segment()); } + /// Sets `window` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_window(MemorySegment segment, long index, @CType("struct ANativeWindow *") java.lang.foreign.MemorySegment value) { VH_window.set(segment, 0L, index, value); } + /// Sets `window` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_window(MemorySegment segment, @CType("struct ANativeWindow *") java.lang.foreign.MemorySegment value) { VkAndroidSurfaceCreateInfoKHR.set_window(segment, 0L, value); } + /// Sets `window` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAndroidSurfaceCreateInfoKHR windowAt(long index, @CType("struct ANativeWindow *") java.lang.foreign.MemorySegment value) { VkAndroidSurfaceCreateInfoKHR.set_window(this.segment(), index, value); return this; } + /// Sets `window` with the given value. + /// @param value the value + /// @return `this` + public VkAndroidSurfaceCreateInfoKHR window(@CType("struct ANativeWindow *") java.lang.foreign.MemorySegment value) { VkAndroidSurfaceCreateInfoKHR.set_window(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkBindImageMemorySwapchainInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkBindImageMemorySwapchainInfoKHR.java new file mode 100644 index 00000000..9297f3a3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkBindImageMemorySwapchainInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchain +/// [VarHandle][#VH_swapchain] - [Getter][#swapchain()] - [Setter][#swapchain(java.lang.foreign.MemorySegment)] +/// ### imageIndex +/// [VarHandle][#VH_imageIndex] - [Getter][#imageIndex()] - [Setter][#imageIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindImageMemorySwapchainInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkSwapchainKHR swapchain; +/// uint32_t imageIndex; +/// } VkBindImageMemorySwapchainInfoKHR; +/// ``` +public final class VkBindImageMemorySwapchainInfoKHR extends Struct { + /// The struct layout of `VkBindImageMemorySwapchainInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("swapchain"), + ValueLayout.JAVA_INT.withName("imageIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchain` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_swapchain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchain")); + /// The [VarHandle] of `imageIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageIndex")); + + /// Creates `VkBindImageMemorySwapchainInfoKHR` with the given segment. + /// @param segment the memory segment + public VkBindImageMemorySwapchainInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindImageMemorySwapchainInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImageMemorySwapchainInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImageMemorySwapchainInfoKHR(segment); } + + /// Creates `VkBindImageMemorySwapchainInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImageMemorySwapchainInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImageMemorySwapchainInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindImageMemorySwapchainInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImageMemorySwapchainInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImageMemorySwapchainInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindImageMemorySwapchainInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindImageMemorySwapchainInfoKHR` + public static VkBindImageMemorySwapchainInfoKHR alloc(SegmentAllocator allocator) { return new VkBindImageMemorySwapchainInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindImageMemorySwapchainInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindImageMemorySwapchainInfoKHR` + public static VkBindImageMemorySwapchainInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkBindImageMemorySwapchainInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindImageMemorySwapchainInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindImageMemorySwapchainInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindImageMemorySwapchainInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindImageMemorySwapchainInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemorySwapchainInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkBindImageMemorySwapchainInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemorySwapchainInfoKHR sType(@CType("VkStructureType") int value) { VkBindImageMemorySwapchainInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindImageMemorySwapchainInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindImageMemorySwapchainInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindImageMemorySwapchainInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImageMemorySwapchainInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemorySwapchainInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImageMemorySwapchainInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemorySwapchainInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImageMemorySwapchainInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment get_swapchain(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_swapchain.get(segment, 0L, index); } + /// {@return `swapchain`} + /// @param segment the segment of the struct + public static @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment get_swapchain(MemorySegment segment) { return VkBindImageMemorySwapchainInfoKHR.get_swapchain(segment, 0L); } + /// {@return `swapchain` at the given index} + /// @param index the index + public @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment swapchainAt(long index) { return VkBindImageMemorySwapchainInfoKHR.get_swapchain(this.segment(), index); } + /// {@return `swapchain`} + public @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment swapchain() { return VkBindImageMemorySwapchainInfoKHR.get_swapchain(this.segment()); } + /// Sets `swapchain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchain(MemorySegment segment, long index, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VH_swapchain.set(segment, 0L, index, value); } + /// Sets `swapchain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchain(MemorySegment segment, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkBindImageMemorySwapchainInfoKHR.set_swapchain(segment, 0L, value); } + /// Sets `swapchain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemorySwapchainInfoKHR swapchainAt(long index, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkBindImageMemorySwapchainInfoKHR.set_swapchain(this.segment(), index, value); return this; } + /// Sets `swapchain` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemorySwapchainInfoKHR swapchain(@CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkBindImageMemorySwapchainInfoKHR.set_swapchain(this.segment(), value); return this; } + + /// {@return `imageIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_imageIndex(MemorySegment segment, long index) { return (int) VH_imageIndex.get(segment, 0L, index); } + /// {@return `imageIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_imageIndex(MemorySegment segment) { return VkBindImageMemorySwapchainInfoKHR.get_imageIndex(segment, 0L); } + /// {@return `imageIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int imageIndexAt(long index) { return VkBindImageMemorySwapchainInfoKHR.get_imageIndex(this.segment(), index); } + /// {@return `imageIndex`} + public @CType("uint32_t") int imageIndex() { return VkBindImageMemorySwapchainInfoKHR.get_imageIndex(this.segment()); } + /// Sets `imageIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_imageIndex.set(segment, 0L, index, value); } + /// Sets `imageIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageIndex(MemorySegment segment, @CType("uint32_t") int value) { VkBindImageMemorySwapchainInfoKHR.set_imageIndex(segment, 0L, value); } + /// Sets `imageIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemorySwapchainInfoKHR imageIndexAt(long index, @CType("uint32_t") int value) { VkBindImageMemorySwapchainInfoKHR.set_imageIndex(this.segment(), index, value); return this; } + /// Sets `imageIndex` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemorySwapchainInfoKHR imageIndex(@CType("uint32_t") int value) { VkBindImageMemorySwapchainInfoKHR.set_imageIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkBindVideoSessionMemoryInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkBindVideoSessionMemoryInfoKHR.java new file mode 100644 index 00000000..b3a6ac9d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkBindVideoSessionMemoryInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryBindIndex +/// [VarHandle][#VH_memoryBindIndex] - [Getter][#memoryBindIndex()] - [Setter][#memoryBindIndex(int)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### memoryOffset +/// [VarHandle][#VH_memoryOffset] - [Getter][#memoryOffset()] - [Setter][#memoryOffset(long)] +/// ### memorySize +/// [VarHandle][#VH_memorySize] - [Getter][#memorySize()] - [Setter][#memorySize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindVideoSessionMemoryInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t memoryBindIndex; +/// VkDeviceMemory memory; +/// VkDeviceSize memoryOffset; +/// VkDeviceSize memorySize; +/// } VkBindVideoSessionMemoryInfoKHR; +/// ``` +public final class VkBindVideoSessionMemoryInfoKHR extends Struct { + /// The struct layout of `VkBindVideoSessionMemoryInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryBindIndex"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_LONG.withName("memoryOffset"), + ValueLayout.JAVA_LONG.withName("memorySize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryBindIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryBindIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryBindIndex")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `memoryOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_memoryOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryOffset")); + /// The [VarHandle] of `memorySize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_memorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memorySize")); + + /// Creates `VkBindVideoSessionMemoryInfoKHR` with the given segment. + /// @param segment the memory segment + public VkBindVideoSessionMemoryInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindVideoSessionMemoryInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindVideoSessionMemoryInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindVideoSessionMemoryInfoKHR(segment); } + + /// Creates `VkBindVideoSessionMemoryInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindVideoSessionMemoryInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindVideoSessionMemoryInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindVideoSessionMemoryInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindVideoSessionMemoryInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindVideoSessionMemoryInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindVideoSessionMemoryInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindVideoSessionMemoryInfoKHR` + public static VkBindVideoSessionMemoryInfoKHR alloc(SegmentAllocator allocator) { return new VkBindVideoSessionMemoryInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindVideoSessionMemoryInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindVideoSessionMemoryInfoKHR` + public static VkBindVideoSessionMemoryInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkBindVideoSessionMemoryInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindVideoSessionMemoryInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindVideoSessionMemoryInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindVideoSessionMemoryInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindVideoSessionMemoryInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkBindVideoSessionMemoryInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR sType(@CType("VkStructureType") int value) { VkBindVideoSessionMemoryInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindVideoSessionMemoryInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindVideoSessionMemoryInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindVideoSessionMemoryInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindVideoSessionMemoryInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindVideoSessionMemoryInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindVideoSessionMemoryInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryBindIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryBindIndex(MemorySegment segment, long index) { return (int) VH_memoryBindIndex.get(segment, 0L, index); } + /// {@return `memoryBindIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryBindIndex(MemorySegment segment) { return VkBindVideoSessionMemoryInfoKHR.get_memoryBindIndex(segment, 0L); } + /// {@return `memoryBindIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryBindIndexAt(long index) { return VkBindVideoSessionMemoryInfoKHR.get_memoryBindIndex(this.segment(), index); } + /// {@return `memoryBindIndex`} + public @CType("uint32_t") int memoryBindIndex() { return VkBindVideoSessionMemoryInfoKHR.get_memoryBindIndex(this.segment()); } + /// Sets `memoryBindIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryBindIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryBindIndex.set(segment, 0L, index, value); } + /// Sets `memoryBindIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryBindIndex(MemorySegment segment, @CType("uint32_t") int value) { VkBindVideoSessionMemoryInfoKHR.set_memoryBindIndex(segment, 0L, value); } + /// Sets `memoryBindIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR memoryBindIndexAt(long index, @CType("uint32_t") int value) { VkBindVideoSessionMemoryInfoKHR.set_memoryBindIndex(this.segment(), index, value); return this; } + /// Sets `memoryBindIndex` with the given value. + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR memoryBindIndex(@CType("uint32_t") int value) { VkBindVideoSessionMemoryInfoKHR.set_memoryBindIndex(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkBindVideoSessionMemoryInfoKHR.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkBindVideoSessionMemoryInfoKHR.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkBindVideoSessionMemoryInfoKHR.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindVideoSessionMemoryInfoKHR.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindVideoSessionMemoryInfoKHR.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindVideoSessionMemoryInfoKHR.set_memory(this.segment(), value); return this; } + + /// {@return `memoryOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment, long index) { return (long) VH_memoryOffset.get(segment, 0L, index); } + /// {@return `memoryOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment) { return VkBindVideoSessionMemoryInfoKHR.get_memoryOffset(segment, 0L); } + /// {@return `memoryOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long memoryOffsetAt(long index) { return VkBindVideoSessionMemoryInfoKHR.get_memoryOffset(this.segment(), index); } + /// {@return `memoryOffset`} + public @CType("VkDeviceSize") long memoryOffset() { return VkBindVideoSessionMemoryInfoKHR.get_memoryOffset(this.segment()); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_memoryOffset.set(segment, 0L, index, value); } + /// Sets `memoryOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBindVideoSessionMemoryInfoKHR.set_memoryOffset(segment, 0L, value); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR memoryOffsetAt(long index, @CType("VkDeviceSize") long value) { VkBindVideoSessionMemoryInfoKHR.set_memoryOffset(this.segment(), index, value); return this; } + /// Sets `memoryOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR memoryOffset(@CType("VkDeviceSize") long value) { VkBindVideoSessionMemoryInfoKHR.set_memoryOffset(this.segment(), value); return this; } + + /// {@return `memorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_memorySize(MemorySegment segment, long index) { return (long) VH_memorySize.get(segment, 0L, index); } + /// {@return `memorySize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_memorySize(MemorySegment segment) { return VkBindVideoSessionMemoryInfoKHR.get_memorySize(segment, 0L); } + /// {@return `memorySize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long memorySizeAt(long index) { return VkBindVideoSessionMemoryInfoKHR.get_memorySize(this.segment(), index); } + /// {@return `memorySize`} + public @CType("VkDeviceSize") long memorySize() { return VkBindVideoSessionMemoryInfoKHR.get_memorySize(this.segment()); } + /// Sets `memorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memorySize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_memorySize.set(segment, 0L, index, value); } + /// Sets `memorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memorySize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBindVideoSessionMemoryInfoKHR.set_memorySize(segment, 0L, value); } + /// Sets `memorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR memorySizeAt(long index, @CType("VkDeviceSize") long value) { VkBindVideoSessionMemoryInfoKHR.set_memorySize(this.segment(), index, value); return this; } + /// Sets `memorySize` with the given value. + /// @param value the value + /// @return `this` + public VkBindVideoSessionMemoryInfoKHR memorySize(@CType("VkDeviceSize") long value) { VkBindVideoSessionMemoryInfoKHR.set_memorySize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCalibratedTimestampInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCalibratedTimestampInfoKHR.java new file mode 100644 index 00000000..2eb4808e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCalibratedTimestampInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### timeDomain +/// [VarHandle][#VH_timeDomain] - [Getter][#timeDomain()] - [Setter][#timeDomain(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCalibratedTimestampInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkTimeDomainKHR timeDomain; +/// } VkCalibratedTimestampInfoKHR; +/// ``` +public final class VkCalibratedTimestampInfoKHR extends Struct { + /// The struct layout of `VkCalibratedTimestampInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("timeDomain") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `timeDomain` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_timeDomain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timeDomain")); + + /// Creates `VkCalibratedTimestampInfoKHR` with the given segment. + /// @param segment the memory segment + public VkCalibratedTimestampInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCalibratedTimestampInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCalibratedTimestampInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCalibratedTimestampInfoKHR(segment); } + + /// Creates `VkCalibratedTimestampInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCalibratedTimestampInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCalibratedTimestampInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCalibratedTimestampInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCalibratedTimestampInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCalibratedTimestampInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCalibratedTimestampInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCalibratedTimestampInfoKHR` + public static VkCalibratedTimestampInfoKHR alloc(SegmentAllocator allocator) { return new VkCalibratedTimestampInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCalibratedTimestampInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCalibratedTimestampInfoKHR` + public static VkCalibratedTimestampInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkCalibratedTimestampInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCalibratedTimestampInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCalibratedTimestampInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCalibratedTimestampInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCalibratedTimestampInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCalibratedTimestampInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkCalibratedTimestampInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCalibratedTimestampInfoKHR sType(@CType("VkStructureType") int value) { VkCalibratedTimestampInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCalibratedTimestampInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCalibratedTimestampInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCalibratedTimestampInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCalibratedTimestampInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCalibratedTimestampInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCalibratedTimestampInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCalibratedTimestampInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCalibratedTimestampInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `timeDomain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkTimeDomainKHR") int get_timeDomain(MemorySegment segment, long index) { return (int) VH_timeDomain.get(segment, 0L, index); } + /// {@return `timeDomain`} + /// @param segment the segment of the struct + public static @CType("VkTimeDomainKHR") int get_timeDomain(MemorySegment segment) { return VkCalibratedTimestampInfoKHR.get_timeDomain(segment, 0L); } + /// {@return `timeDomain` at the given index} + /// @param index the index + public @CType("VkTimeDomainKHR") int timeDomainAt(long index) { return VkCalibratedTimestampInfoKHR.get_timeDomain(this.segment(), index); } + /// {@return `timeDomain`} + public @CType("VkTimeDomainKHR") int timeDomain() { return VkCalibratedTimestampInfoKHR.get_timeDomain(this.segment()); } + /// Sets `timeDomain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timeDomain(MemorySegment segment, long index, @CType("VkTimeDomainKHR") int value) { VH_timeDomain.set(segment, 0L, index, value); } + /// Sets `timeDomain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timeDomain(MemorySegment segment, @CType("VkTimeDomainKHR") int value) { VkCalibratedTimestampInfoKHR.set_timeDomain(segment, 0L, value); } + /// Sets `timeDomain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCalibratedTimestampInfoKHR timeDomainAt(long index, @CType("VkTimeDomainKHR") int value) { VkCalibratedTimestampInfoKHR.set_timeDomain(this.segment(), index, value); return this; } + /// Sets `timeDomain` with the given value. + /// @param value the value + /// @return `this` + public VkCalibratedTimestampInfoKHR timeDomain(@CType("VkTimeDomainKHR") int value) { VkCalibratedTimestampInfoKHR.set_timeDomain(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCooperativeMatrixPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCooperativeMatrixPropertiesKHR.java new file mode 100644 index 00000000..f4122b4e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCooperativeMatrixPropertiesKHR.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### MSize +/// [VarHandle][#VH_MSize] - [Getter][#MSize()] - [Setter][#MSize(int)] +/// ### NSize +/// [VarHandle][#VH_NSize] - [Getter][#NSize()] - [Setter][#NSize(int)] +/// ### KSize +/// [VarHandle][#VH_KSize] - [Getter][#KSize()] - [Setter][#KSize(int)] +/// ### AType +/// [VarHandle][#VH_AType] - [Getter][#AType()] - [Setter][#AType(int)] +/// ### BType +/// [VarHandle][#VH_BType] - [Getter][#BType()] - [Setter][#BType(int)] +/// ### CType +/// [VarHandle][#VH_CType] - [Getter][#CType()] - [Setter][#CType(int)] +/// ### ResultType +/// [VarHandle][#VH_ResultType] - [Getter][#ResultType()] - [Setter][#ResultType(int)] +/// ### saturatingAccumulation +/// [VarHandle][#VH_saturatingAccumulation] - [Getter][#saturatingAccumulation()] - [Setter][#saturatingAccumulation(int)] +/// ### scope +/// [VarHandle][#VH_scope] - [Getter][#scope()] - [Setter][#scope(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCooperativeMatrixPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t MSize; +/// uint32_t NSize; +/// uint32_t KSize; +/// VkComponentTypeKHR AType; +/// VkComponentTypeKHR BType; +/// VkComponentTypeKHR CType; +/// VkComponentTypeKHR ResultType; +/// VkBool32 saturatingAccumulation; +/// VkScopeKHR scope; +/// } VkCooperativeMatrixPropertiesKHR; +/// ``` +public final class VkCooperativeMatrixPropertiesKHR extends Struct { + /// The struct layout of `VkCooperativeMatrixPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("MSize"), + ValueLayout.JAVA_INT.withName("NSize"), + ValueLayout.JAVA_INT.withName("KSize"), + ValueLayout.JAVA_INT.withName("AType"), + ValueLayout.JAVA_INT.withName("BType"), + ValueLayout.JAVA_INT.withName("CType"), + ValueLayout.JAVA_INT.withName("ResultType"), + ValueLayout.JAVA_INT.withName("saturatingAccumulation"), + ValueLayout.JAVA_INT.withName("scope") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `MSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_MSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("MSize")); + /// The [VarHandle] of `NSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_NSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("NSize")); + /// The [VarHandle] of `KSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_KSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("KSize")); + /// The [VarHandle] of `AType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_AType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("AType")); + /// The [VarHandle] of `BType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_BType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("BType")); + /// The [VarHandle] of `CType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_CType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("CType")); + /// The [VarHandle] of `ResultType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ResultType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ResultType")); + /// The [VarHandle] of `saturatingAccumulation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_saturatingAccumulation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("saturatingAccumulation")); + /// The [VarHandle] of `scope` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_scope = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scope")); + + /// Creates `VkCooperativeMatrixPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkCooperativeMatrixPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCooperativeMatrixPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCooperativeMatrixPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCooperativeMatrixPropertiesKHR(segment); } + + /// Creates `VkCooperativeMatrixPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCooperativeMatrixPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCooperativeMatrixPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCooperativeMatrixPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCooperativeMatrixPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCooperativeMatrixPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCooperativeMatrixPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCooperativeMatrixPropertiesKHR` + public static VkCooperativeMatrixPropertiesKHR alloc(SegmentAllocator allocator) { return new VkCooperativeMatrixPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCooperativeMatrixPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCooperativeMatrixPropertiesKHR` + public static VkCooperativeMatrixPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkCooperativeMatrixPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCooperativeMatrixPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCooperativeMatrixPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkCooperativeMatrixPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR sType(@CType("VkStructureType") int value) { VkCooperativeMatrixPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkCooperativeMatrixPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkCooperativeMatrixPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkCooperativeMatrixPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkCooperativeMatrixPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `MSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_MSize(MemorySegment segment, long index) { return (int) VH_MSize.get(segment, 0L, index); } + /// {@return `MSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_MSize(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_MSize(segment, 0L); } + /// {@return `MSize` at the given index} + /// @param index the index + public @CType("uint32_t") int MSizeAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_MSize(this.segment(), index); } + /// {@return `MSize`} + public @CType("uint32_t") int MSize() { return VkCooperativeMatrixPropertiesKHR.get_MSize(this.segment()); } + /// Sets `MSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_MSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_MSize.set(segment, 0L, index, value); } + /// Sets `MSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_MSize(MemorySegment segment, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesKHR.set_MSize(segment, 0L, value); } + /// Sets `MSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR MSizeAt(long index, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesKHR.set_MSize(this.segment(), index, value); return this; } + /// Sets `MSize` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR MSize(@CType("uint32_t") int value) { VkCooperativeMatrixPropertiesKHR.set_MSize(this.segment(), value); return this; } + + /// {@return `NSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_NSize(MemorySegment segment, long index) { return (int) VH_NSize.get(segment, 0L, index); } + /// {@return `NSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_NSize(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_NSize(segment, 0L); } + /// {@return `NSize` at the given index} + /// @param index the index + public @CType("uint32_t") int NSizeAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_NSize(this.segment(), index); } + /// {@return `NSize`} + public @CType("uint32_t") int NSize() { return VkCooperativeMatrixPropertiesKHR.get_NSize(this.segment()); } + /// Sets `NSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_NSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_NSize.set(segment, 0L, index, value); } + /// Sets `NSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_NSize(MemorySegment segment, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesKHR.set_NSize(segment, 0L, value); } + /// Sets `NSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR NSizeAt(long index, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesKHR.set_NSize(this.segment(), index, value); return this; } + /// Sets `NSize` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR NSize(@CType("uint32_t") int value) { VkCooperativeMatrixPropertiesKHR.set_NSize(this.segment(), value); return this; } + + /// {@return `KSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_KSize(MemorySegment segment, long index) { return (int) VH_KSize.get(segment, 0L, index); } + /// {@return `KSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_KSize(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_KSize(segment, 0L); } + /// {@return `KSize` at the given index} + /// @param index the index + public @CType("uint32_t") int KSizeAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_KSize(this.segment(), index); } + /// {@return `KSize`} + public @CType("uint32_t") int KSize() { return VkCooperativeMatrixPropertiesKHR.get_KSize(this.segment()); } + /// Sets `KSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_KSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_KSize.set(segment, 0L, index, value); } + /// Sets `KSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_KSize(MemorySegment segment, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesKHR.set_KSize(segment, 0L, value); } + /// Sets `KSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR KSizeAt(long index, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesKHR.set_KSize(this.segment(), index, value); return this; } + /// Sets `KSize` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR KSize(@CType("uint32_t") int value) { VkCooperativeMatrixPropertiesKHR.set_KSize(this.segment(), value); return this; } + + /// {@return `AType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeKHR") int get_AType(MemorySegment segment, long index) { return (int) VH_AType.get(segment, 0L, index); } + /// {@return `AType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeKHR") int get_AType(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_AType(segment, 0L); } + /// {@return `AType` at the given index} + /// @param index the index + public @CType("VkComponentTypeKHR") int ATypeAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_AType(this.segment(), index); } + /// {@return `AType`} + public @CType("VkComponentTypeKHR") int AType() { return VkCooperativeMatrixPropertiesKHR.get_AType(this.segment()); } + /// Sets `AType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_AType(MemorySegment segment, long index, @CType("VkComponentTypeKHR") int value) { VH_AType.set(segment, 0L, index, value); } + /// Sets `AType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_AType(MemorySegment segment, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_AType(segment, 0L, value); } + /// Sets `AType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR ATypeAt(long index, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_AType(this.segment(), index, value); return this; } + /// Sets `AType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR AType(@CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_AType(this.segment(), value); return this; } + + /// {@return `BType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeKHR") int get_BType(MemorySegment segment, long index) { return (int) VH_BType.get(segment, 0L, index); } + /// {@return `BType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeKHR") int get_BType(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_BType(segment, 0L); } + /// {@return `BType` at the given index} + /// @param index the index + public @CType("VkComponentTypeKHR") int BTypeAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_BType(this.segment(), index); } + /// {@return `BType`} + public @CType("VkComponentTypeKHR") int BType() { return VkCooperativeMatrixPropertiesKHR.get_BType(this.segment()); } + /// Sets `BType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_BType(MemorySegment segment, long index, @CType("VkComponentTypeKHR") int value) { VH_BType.set(segment, 0L, index, value); } + /// Sets `BType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_BType(MemorySegment segment, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_BType(segment, 0L, value); } + /// Sets `BType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR BTypeAt(long index, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_BType(this.segment(), index, value); return this; } + /// Sets `BType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR BType(@CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_BType(this.segment(), value); return this; } + + /// {@return `CType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeKHR") int get_CType(MemorySegment segment, long index) { return (int) VH_CType.get(segment, 0L, index); } + /// {@return `CType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeKHR") int get_CType(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_CType(segment, 0L); } + /// {@return `CType` at the given index} + /// @param index the index + public @CType("VkComponentTypeKHR") int CTypeAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_CType(this.segment(), index); } + /// {@return `CType`} + public @CType("VkComponentTypeKHR") int CType() { return VkCooperativeMatrixPropertiesKHR.get_CType(this.segment()); } + /// Sets `CType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_CType(MemorySegment segment, long index, @CType("VkComponentTypeKHR") int value) { VH_CType.set(segment, 0L, index, value); } + /// Sets `CType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_CType(MemorySegment segment, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_CType(segment, 0L, value); } + /// Sets `CType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR CTypeAt(long index, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_CType(this.segment(), index, value); return this; } + /// Sets `CType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR CType(@CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_CType(this.segment(), value); return this; } + + /// {@return `ResultType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeKHR") int get_ResultType(MemorySegment segment, long index) { return (int) VH_ResultType.get(segment, 0L, index); } + /// {@return `ResultType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeKHR") int get_ResultType(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_ResultType(segment, 0L); } + /// {@return `ResultType` at the given index} + /// @param index the index + public @CType("VkComponentTypeKHR") int ResultTypeAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_ResultType(this.segment(), index); } + /// {@return `ResultType`} + public @CType("VkComponentTypeKHR") int ResultType() { return VkCooperativeMatrixPropertiesKHR.get_ResultType(this.segment()); } + /// Sets `ResultType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ResultType(MemorySegment segment, long index, @CType("VkComponentTypeKHR") int value) { VH_ResultType.set(segment, 0L, index, value); } + /// Sets `ResultType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ResultType(MemorySegment segment, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_ResultType(segment, 0L, value); } + /// Sets `ResultType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR ResultTypeAt(long index, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_ResultType(this.segment(), index, value); return this; } + /// Sets `ResultType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR ResultType(@CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_ResultType(this.segment(), value); return this; } + + /// {@return `saturatingAccumulation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_saturatingAccumulation(MemorySegment segment, long index) { return (int) VH_saturatingAccumulation.get(segment, 0L, index); } + /// {@return `saturatingAccumulation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_saturatingAccumulation(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_saturatingAccumulation(segment, 0L); } + /// {@return `saturatingAccumulation` at the given index} + /// @param index the index + public @CType("VkBool32") int saturatingAccumulationAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_saturatingAccumulation(this.segment(), index); } + /// {@return `saturatingAccumulation`} + public @CType("VkBool32") int saturatingAccumulation() { return VkCooperativeMatrixPropertiesKHR.get_saturatingAccumulation(this.segment()); } + /// Sets `saturatingAccumulation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_saturatingAccumulation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_saturatingAccumulation.set(segment, 0L, index, value); } + /// Sets `saturatingAccumulation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_saturatingAccumulation(MemorySegment segment, @CType("VkBool32") int value) { VkCooperativeMatrixPropertiesKHR.set_saturatingAccumulation(segment, 0L, value); } + /// Sets `saturatingAccumulation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR saturatingAccumulationAt(long index, @CType("VkBool32") int value) { VkCooperativeMatrixPropertiesKHR.set_saturatingAccumulation(this.segment(), index, value); return this; } + /// Sets `saturatingAccumulation` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR saturatingAccumulation(@CType("VkBool32") int value) { VkCooperativeMatrixPropertiesKHR.set_saturatingAccumulation(this.segment(), value); return this; } + + /// {@return `scope` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkScopeKHR") int get_scope(MemorySegment segment, long index) { return (int) VH_scope.get(segment, 0L, index); } + /// {@return `scope`} + /// @param segment the segment of the struct + public static @CType("VkScopeKHR") int get_scope(MemorySegment segment) { return VkCooperativeMatrixPropertiesKHR.get_scope(segment, 0L); } + /// {@return `scope` at the given index} + /// @param index the index + public @CType("VkScopeKHR") int scopeAt(long index) { return VkCooperativeMatrixPropertiesKHR.get_scope(this.segment(), index); } + /// {@return `scope`} + public @CType("VkScopeKHR") int scope() { return VkCooperativeMatrixPropertiesKHR.get_scope(this.segment()); } + /// Sets `scope` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scope(MemorySegment segment, long index, @CType("VkScopeKHR") int value) { VH_scope.set(segment, 0L, index, value); } + /// Sets `scope` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scope(MemorySegment segment, @CType("VkScopeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_scope(segment, 0L, value); } + /// Sets `scope` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR scopeAt(long index, @CType("VkScopeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_scope(this.segment(), index, value); return this; } + /// Sets `scope` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesKHR scope(@CType("VkScopeKHR") int value) { VkCooperativeMatrixPropertiesKHR.set_scope(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCopyAccelerationStructureInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCopyAccelerationStructureInfoKHR.java new file mode 100644 index 00000000..74eeb951 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCopyAccelerationStructureInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### src +/// [VarHandle][#VH_src] - [Getter][#src()] - [Setter][#src(java.lang.foreign.MemorySegment)] +/// ### dst +/// [VarHandle][#VH_dst] - [Getter][#dst()] - [Setter][#dst(java.lang.foreign.MemorySegment)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyAccelerationStructureInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccelerationStructureKHR src; +/// VkAccelerationStructureKHR dst; +/// VkCopyAccelerationStructureModeKHR mode; +/// } VkCopyAccelerationStructureInfoKHR; +/// ``` +public final class VkCopyAccelerationStructureInfoKHR extends Struct { + /// The struct layout of `VkCopyAccelerationStructureInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("src"), + ValueLayout.ADDRESS.withName("dst"), + ValueLayout.JAVA_INT.withName("mode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `src` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_src = LAYOUT.arrayElementVarHandle(PathElement.groupElement("src")); + /// The [VarHandle] of `dst` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dst = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dst")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + + /// Creates `VkCopyAccelerationStructureInfoKHR` with the given segment. + /// @param segment the memory segment + public VkCopyAccelerationStructureInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyAccelerationStructureInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyAccelerationStructureInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyAccelerationStructureInfoKHR(segment); } + + /// Creates `VkCopyAccelerationStructureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyAccelerationStructureInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyAccelerationStructureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyAccelerationStructureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyAccelerationStructureInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyAccelerationStructureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyAccelerationStructureInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyAccelerationStructureInfoKHR` + public static VkCopyAccelerationStructureInfoKHR alloc(SegmentAllocator allocator) { return new VkCopyAccelerationStructureInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyAccelerationStructureInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyAccelerationStructureInfoKHR` + public static VkCopyAccelerationStructureInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkCopyAccelerationStructureInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyAccelerationStructureInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyAccelerationStructureInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyAccelerationStructureInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyAccelerationStructureInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyAccelerationStructureInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureInfoKHR sType(@CType("VkStructureType") int value) { VkCopyAccelerationStructureInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyAccelerationStructureInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyAccelerationStructureInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyAccelerationStructureInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `src` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_src(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_src.get(segment, 0L, index); } + /// {@return `src`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_src(MemorySegment segment) { return VkCopyAccelerationStructureInfoKHR.get_src(segment, 0L); } + /// {@return `src` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment srcAt(long index) { return VkCopyAccelerationStructureInfoKHR.get_src(this.segment(), index); } + /// {@return `src`} + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment src() { return VkCopyAccelerationStructureInfoKHR.get_src(this.segment()); } + /// Sets `src` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_src(MemorySegment segment, long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VH_src.set(segment, 0L, index, value); } + /// Sets `src` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_src(MemorySegment segment, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureInfoKHR.set_src(segment, 0L, value); } + /// Sets `src` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureInfoKHR srcAt(long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureInfoKHR.set_src(this.segment(), index, value); return this; } + /// Sets `src` with the given value. + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureInfoKHR src(@CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureInfoKHR.set_src(this.segment(), value); return this; } + + /// {@return `dst` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_dst(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dst.get(segment, 0L, index); } + /// {@return `dst`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_dst(MemorySegment segment) { return VkCopyAccelerationStructureInfoKHR.get_dst(segment, 0L); } + /// {@return `dst` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment dstAt(long index) { return VkCopyAccelerationStructureInfoKHR.get_dst(this.segment(), index); } + /// {@return `dst`} + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment dst() { return VkCopyAccelerationStructureInfoKHR.get_dst(this.segment()); } + /// Sets `dst` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dst(MemorySegment segment, long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VH_dst.set(segment, 0L, index, value); } + /// Sets `dst` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dst(MemorySegment segment, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureInfoKHR.set_dst(segment, 0L, value); } + /// Sets `dst` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureInfoKHR dstAt(long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureInfoKHR.set_dst(this.segment(), index, value); return this; } + /// Sets `dst` with the given value. + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureInfoKHR dst(@CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureInfoKHR.set_dst(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCopyAccelerationStructureModeKHR") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkCopyAccelerationStructureModeKHR") int get_mode(MemorySegment segment) { return VkCopyAccelerationStructureInfoKHR.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkCopyAccelerationStructureModeKHR") int modeAt(long index) { return VkCopyAccelerationStructureInfoKHR.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkCopyAccelerationStructureModeKHR") int mode() { return VkCopyAccelerationStructureInfoKHR.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkCopyAccelerationStructureModeKHR") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkCopyAccelerationStructureModeKHR") int value) { VkCopyAccelerationStructureInfoKHR.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureInfoKHR modeAt(long index, @CType("VkCopyAccelerationStructureModeKHR") int value) { VkCopyAccelerationStructureInfoKHR.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureInfoKHR mode(@CType("VkCopyAccelerationStructureModeKHR") int value) { VkCopyAccelerationStructureInfoKHR.set_mode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCopyAccelerationStructureToMemoryInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCopyAccelerationStructureToMemoryInfoKHR.java new file mode 100644 index 00000000..f412e902 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCopyAccelerationStructureToMemoryInfoKHR.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### src +/// [VarHandle][#VH_src] - [Getter][#src()] - [Setter][#src(java.lang.foreign.MemorySegment)] +/// ### dst +/// [Byte offset][#OFFSET_dst] - [Memory layout][#ML_dst] - [Getter][#dst()] - [Setter][#dst(java.lang.foreign.MemorySegment)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyAccelerationStructureToMemoryInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccelerationStructureKHR src; +/// VkDeviceOrHostAddressKHR dst; +/// VkCopyAccelerationStructureModeKHR mode; +/// } VkCopyAccelerationStructureToMemoryInfoKHR; +/// ``` +public final class VkCopyAccelerationStructureToMemoryInfoKHR extends Struct { + /// The struct layout of `VkCopyAccelerationStructureToMemoryInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("src"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressKHR.LAYOUT.withName("dst"), + ValueLayout.JAVA_INT.withName("mode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `src` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_src = LAYOUT.arrayElementVarHandle(PathElement.groupElement("src")); + /// The byte offset of `dst`. + public static final long OFFSET_dst = LAYOUT.byteOffset(PathElement.groupElement("dst")); + /// The memory layout of `dst`. + public static final MemoryLayout ML_dst = LAYOUT.select(PathElement.groupElement("dst")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + + /// Creates `VkCopyAccelerationStructureToMemoryInfoKHR` with the given segment. + /// @param segment the memory segment + public VkCopyAccelerationStructureToMemoryInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyAccelerationStructureToMemoryInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyAccelerationStructureToMemoryInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyAccelerationStructureToMemoryInfoKHR(segment); } + + /// Creates `VkCopyAccelerationStructureToMemoryInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyAccelerationStructureToMemoryInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyAccelerationStructureToMemoryInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyAccelerationStructureToMemoryInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyAccelerationStructureToMemoryInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyAccelerationStructureToMemoryInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyAccelerationStructureToMemoryInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyAccelerationStructureToMemoryInfoKHR` + public static VkCopyAccelerationStructureToMemoryInfoKHR alloc(SegmentAllocator allocator) { return new VkCopyAccelerationStructureToMemoryInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyAccelerationStructureToMemoryInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyAccelerationStructureToMemoryInfoKHR` + public static VkCopyAccelerationStructureToMemoryInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkCopyAccelerationStructureToMemoryInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyAccelerationStructureToMemoryInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyAccelerationStructureToMemoryInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyAccelerationStructureToMemoryInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureToMemoryInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureToMemoryInfoKHR sType(@CType("VkStructureType") int value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyAccelerationStructureToMemoryInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyAccelerationStructureToMemoryInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyAccelerationStructureToMemoryInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureToMemoryInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureToMemoryInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `src` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_src(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_src.get(segment, 0L, index); } + /// {@return `src`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_src(MemorySegment segment) { return VkCopyAccelerationStructureToMemoryInfoKHR.get_src(segment, 0L); } + /// {@return `src` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment srcAt(long index) { return VkCopyAccelerationStructureToMemoryInfoKHR.get_src(this.segment(), index); } + /// {@return `src`} + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment src() { return VkCopyAccelerationStructureToMemoryInfoKHR.get_src(this.segment()); } + /// Sets `src` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_src(MemorySegment segment, long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VH_src.set(segment, 0L, index, value); } + /// Sets `src` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_src(MemorySegment segment, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_src(segment, 0L, value); } + /// Sets `src` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureToMemoryInfoKHR srcAt(long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_src(this.segment(), index, value); return this; } + /// Sets `src` with the given value. + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureToMemoryInfoKHR src(@CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_src(this.segment(), value); return this; } + + /// {@return `dst` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment get_dst(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dst, index), ML_dst); } + /// {@return `dst`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment get_dst(MemorySegment segment) { return VkCopyAccelerationStructureToMemoryInfoKHR.get_dst(segment, 0L); } + /// {@return `dst` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment dstAt(long index) { return VkCopyAccelerationStructureToMemoryInfoKHR.get_dst(this.segment(), index); } + /// {@return `dst`} + public @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment dst() { return VkCopyAccelerationStructureToMemoryInfoKHR.get_dst(this.segment()); } + /// Sets `dst` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dst(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dst, index), ML_dst.byteSize()); } + /// Sets `dst` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dst(MemorySegment segment, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_dst(segment, 0L, value); } + /// Sets `dst` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureToMemoryInfoKHR dstAt(long index, @CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_dst(this.segment(), index, value); return this; } + /// Sets `dst` with the given value. + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureToMemoryInfoKHR dst(@CType("VkDeviceOrHostAddressKHR") java.lang.foreign.MemorySegment value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_dst(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCopyAccelerationStructureModeKHR") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkCopyAccelerationStructureModeKHR") int get_mode(MemorySegment segment) { return VkCopyAccelerationStructureToMemoryInfoKHR.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkCopyAccelerationStructureModeKHR") int modeAt(long index) { return VkCopyAccelerationStructureToMemoryInfoKHR.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkCopyAccelerationStructureModeKHR") int mode() { return VkCopyAccelerationStructureToMemoryInfoKHR.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkCopyAccelerationStructureModeKHR") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkCopyAccelerationStructureModeKHR") int value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureToMemoryInfoKHR modeAt(long index, @CType("VkCopyAccelerationStructureModeKHR") int value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkCopyAccelerationStructureToMemoryInfoKHR mode(@CType("VkCopyAccelerationStructureModeKHR") int value) { VkCopyAccelerationStructureToMemoryInfoKHR.set_mode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCopyMemoryToAccelerationStructureInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCopyMemoryToAccelerationStructureInfoKHR.java new file mode 100644 index 00000000..c3f45d10 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkCopyMemoryToAccelerationStructureInfoKHR.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### src +/// [Byte offset][#OFFSET_src] - [Memory layout][#ML_src] - [Getter][#src()] - [Setter][#src(java.lang.foreign.MemorySegment)] +/// ### dst +/// [VarHandle][#VH_dst] - [Getter][#dst()] - [Setter][#dst(java.lang.foreign.MemorySegment)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyMemoryToAccelerationStructureInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceOrHostAddressConstKHR src; +/// VkAccelerationStructureKHR dst; +/// VkCopyAccelerationStructureModeKHR mode; +/// } VkCopyMemoryToAccelerationStructureInfoKHR; +/// ``` +public final class VkCopyMemoryToAccelerationStructureInfoKHR extends Struct { + /// The struct layout of `VkCopyMemoryToAccelerationStructureInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("src"), + ValueLayout.ADDRESS.withName("dst"), + ValueLayout.JAVA_INT.withName("mode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `src`. + public static final long OFFSET_src = LAYOUT.byteOffset(PathElement.groupElement("src")); + /// The memory layout of `src`. + public static final MemoryLayout ML_src = LAYOUT.select(PathElement.groupElement("src")); + /// The [VarHandle] of `dst` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dst = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dst")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + + /// Creates `VkCopyMemoryToAccelerationStructureInfoKHR` with the given segment. + /// @param segment the memory segment + public VkCopyMemoryToAccelerationStructureInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyMemoryToAccelerationStructureInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToAccelerationStructureInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToAccelerationStructureInfoKHR(segment); } + + /// Creates `VkCopyMemoryToAccelerationStructureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToAccelerationStructureInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToAccelerationStructureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyMemoryToAccelerationStructureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToAccelerationStructureInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToAccelerationStructureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyMemoryToAccelerationStructureInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyMemoryToAccelerationStructureInfoKHR` + public static VkCopyMemoryToAccelerationStructureInfoKHR alloc(SegmentAllocator allocator) { return new VkCopyMemoryToAccelerationStructureInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyMemoryToAccelerationStructureInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyMemoryToAccelerationStructureInfoKHR` + public static VkCopyMemoryToAccelerationStructureInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkCopyMemoryToAccelerationStructureInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyMemoryToAccelerationStructureInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyMemoryToAccelerationStructureInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyMemoryToAccelerationStructureInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToAccelerationStructureInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToAccelerationStructureInfoKHR sType(@CType("VkStructureType") int value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyMemoryToAccelerationStructureInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyMemoryToAccelerationStructureInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyMemoryToAccelerationStructureInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToAccelerationStructureInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToAccelerationStructureInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `src` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_src(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_src, index), ML_src); } + /// {@return `src`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_src(MemorySegment segment) { return VkCopyMemoryToAccelerationStructureInfoKHR.get_src(segment, 0L); } + /// {@return `src` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment srcAt(long index) { return VkCopyMemoryToAccelerationStructureInfoKHR.get_src(this.segment(), index); } + /// {@return `src`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment src() { return VkCopyMemoryToAccelerationStructureInfoKHR.get_src(this.segment()); } + /// Sets `src` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_src(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_src, index), ML_src.byteSize()); } + /// Sets `src` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_src(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_src(segment, 0L, value); } + /// Sets `src` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToAccelerationStructureInfoKHR srcAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_src(this.segment(), index, value); return this; } + /// Sets `src` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToAccelerationStructureInfoKHR src(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_src(this.segment(), value); return this; } + + /// {@return `dst` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_dst(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dst.get(segment, 0L, index); } + /// {@return `dst`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment get_dst(MemorySegment segment) { return VkCopyMemoryToAccelerationStructureInfoKHR.get_dst(segment, 0L); } + /// {@return `dst` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment dstAt(long index) { return VkCopyMemoryToAccelerationStructureInfoKHR.get_dst(this.segment(), index); } + /// {@return `dst`} + public @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment dst() { return VkCopyMemoryToAccelerationStructureInfoKHR.get_dst(this.segment()); } + /// Sets `dst` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dst(MemorySegment segment, long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VH_dst.set(segment, 0L, index, value); } + /// Sets `dst` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dst(MemorySegment segment, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_dst(segment, 0L, value); } + /// Sets `dst` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToAccelerationStructureInfoKHR dstAt(long index, @CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_dst(this.segment(), index, value); return this; } + /// Sets `dst` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToAccelerationStructureInfoKHR dst(@CType("VkAccelerationStructureKHR") java.lang.foreign.MemorySegment value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_dst(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCopyAccelerationStructureModeKHR") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkCopyAccelerationStructureModeKHR") int get_mode(MemorySegment segment) { return VkCopyMemoryToAccelerationStructureInfoKHR.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkCopyAccelerationStructureModeKHR") int modeAt(long index) { return VkCopyMemoryToAccelerationStructureInfoKHR.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkCopyAccelerationStructureModeKHR") int mode() { return VkCopyMemoryToAccelerationStructureInfoKHR.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkCopyAccelerationStructureModeKHR") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkCopyAccelerationStructureModeKHR") int value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToAccelerationStructureInfoKHR modeAt(long index, @CType("VkCopyAccelerationStructureModeKHR") int value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToAccelerationStructureInfoKHR mode(@CType("VkCopyAccelerationStructureModeKHR") int value) { VkCopyMemoryToAccelerationStructureInfoKHR.set_mode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkD3D12FenceSubmitInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkD3D12FenceSubmitInfoKHR.java new file mode 100644 index 00000000..87590ec7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkD3D12FenceSubmitInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### waitSemaphoreValuesCount +/// [VarHandle][#VH_waitSemaphoreValuesCount] - [Getter][#waitSemaphoreValuesCount()] - [Setter][#waitSemaphoreValuesCount(int)] +/// ### pWaitSemaphoreValues +/// [VarHandle][#VH_pWaitSemaphoreValues] - [Getter][#pWaitSemaphoreValues()] - [Setter][#pWaitSemaphoreValues(java.lang.foreign.MemorySegment)] +/// ### signalSemaphoreValuesCount +/// [VarHandle][#VH_signalSemaphoreValuesCount] - [Getter][#signalSemaphoreValuesCount()] - [Setter][#signalSemaphoreValuesCount(int)] +/// ### pSignalSemaphoreValues +/// [VarHandle][#VH_pSignalSemaphoreValues] - [Getter][#pSignalSemaphoreValues()] - [Setter][#pSignalSemaphoreValues(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkD3D12FenceSubmitInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t waitSemaphoreValuesCount; +/// const uint64_t * pWaitSemaphoreValues; +/// uint32_t signalSemaphoreValuesCount; +/// const uint64_t * pSignalSemaphoreValues; +/// } VkD3D12FenceSubmitInfoKHR; +/// ``` +public final class VkD3D12FenceSubmitInfoKHR extends Struct { + /// The struct layout of `VkD3D12FenceSubmitInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("waitSemaphoreValuesCount"), + ValueLayout.ADDRESS.withName("pWaitSemaphoreValues"), + ValueLayout.JAVA_INT.withName("signalSemaphoreValuesCount"), + ValueLayout.ADDRESS.withName("pSignalSemaphoreValues") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `waitSemaphoreValuesCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_waitSemaphoreValuesCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("waitSemaphoreValuesCount")); + /// The [VarHandle] of `pWaitSemaphoreValues` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWaitSemaphoreValues = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWaitSemaphoreValues")); + /// The [VarHandle] of `signalSemaphoreValuesCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_signalSemaphoreValuesCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("signalSemaphoreValuesCount")); + /// The [VarHandle] of `pSignalSemaphoreValues` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSignalSemaphoreValues = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSignalSemaphoreValues")); + + /// Creates `VkD3D12FenceSubmitInfoKHR` with the given segment. + /// @param segment the memory segment + public VkD3D12FenceSubmitInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkD3D12FenceSubmitInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkD3D12FenceSubmitInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkD3D12FenceSubmitInfoKHR(segment); } + + /// Creates `VkD3D12FenceSubmitInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkD3D12FenceSubmitInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkD3D12FenceSubmitInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkD3D12FenceSubmitInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkD3D12FenceSubmitInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkD3D12FenceSubmitInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkD3D12FenceSubmitInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkD3D12FenceSubmitInfoKHR` + public static VkD3D12FenceSubmitInfoKHR alloc(SegmentAllocator allocator) { return new VkD3D12FenceSubmitInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkD3D12FenceSubmitInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkD3D12FenceSubmitInfoKHR` + public static VkD3D12FenceSubmitInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkD3D12FenceSubmitInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkD3D12FenceSubmitInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkD3D12FenceSubmitInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkD3D12FenceSubmitInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkD3D12FenceSubmitInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkD3D12FenceSubmitInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR sType(@CType("VkStructureType") int value) { VkD3D12FenceSubmitInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkD3D12FenceSubmitInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkD3D12FenceSubmitInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkD3D12FenceSubmitInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkD3D12FenceSubmitInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkD3D12FenceSubmitInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkD3D12FenceSubmitInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `waitSemaphoreValuesCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_waitSemaphoreValuesCount(MemorySegment segment, long index) { return (int) VH_waitSemaphoreValuesCount.get(segment, 0L, index); } + /// {@return `waitSemaphoreValuesCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_waitSemaphoreValuesCount(MemorySegment segment) { return VkD3D12FenceSubmitInfoKHR.get_waitSemaphoreValuesCount(segment, 0L); } + /// {@return `waitSemaphoreValuesCount` at the given index} + /// @param index the index + public @CType("uint32_t") int waitSemaphoreValuesCountAt(long index) { return VkD3D12FenceSubmitInfoKHR.get_waitSemaphoreValuesCount(this.segment(), index); } + /// {@return `waitSemaphoreValuesCount`} + public @CType("uint32_t") int waitSemaphoreValuesCount() { return VkD3D12FenceSubmitInfoKHR.get_waitSemaphoreValuesCount(this.segment()); } + /// Sets `waitSemaphoreValuesCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_waitSemaphoreValuesCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_waitSemaphoreValuesCount.set(segment, 0L, index, value); } + /// Sets `waitSemaphoreValuesCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_waitSemaphoreValuesCount(MemorySegment segment, @CType("uint32_t") int value) { VkD3D12FenceSubmitInfoKHR.set_waitSemaphoreValuesCount(segment, 0L, value); } + /// Sets `waitSemaphoreValuesCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR waitSemaphoreValuesCountAt(long index, @CType("uint32_t") int value) { VkD3D12FenceSubmitInfoKHR.set_waitSemaphoreValuesCount(this.segment(), index, value); return this; } + /// Sets `waitSemaphoreValuesCount` with the given value. + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR waitSemaphoreValuesCount(@CType("uint32_t") int value) { VkD3D12FenceSubmitInfoKHR.set_waitSemaphoreValuesCount(this.segment(), value); return this; } + + /// {@return `pWaitSemaphoreValues` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pWaitSemaphoreValues(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWaitSemaphoreValues.get(segment, 0L, index); } + /// {@return `pWaitSemaphoreValues`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pWaitSemaphoreValues(MemorySegment segment) { return VkD3D12FenceSubmitInfoKHR.get_pWaitSemaphoreValues(segment, 0L); } + /// {@return `pWaitSemaphoreValues` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pWaitSemaphoreValuesAt(long index) { return VkD3D12FenceSubmitInfoKHR.get_pWaitSemaphoreValues(this.segment(), index); } + /// {@return `pWaitSemaphoreValues`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pWaitSemaphoreValues() { return VkD3D12FenceSubmitInfoKHR.get_pWaitSemaphoreValues(this.segment()); } + /// Sets `pWaitSemaphoreValues` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWaitSemaphoreValues(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pWaitSemaphoreValues.set(segment, 0L, index, value); } + /// Sets `pWaitSemaphoreValues` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWaitSemaphoreValues(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkD3D12FenceSubmitInfoKHR.set_pWaitSemaphoreValues(segment, 0L, value); } + /// Sets `pWaitSemaphoreValues` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR pWaitSemaphoreValuesAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkD3D12FenceSubmitInfoKHR.set_pWaitSemaphoreValues(this.segment(), index, value); return this; } + /// Sets `pWaitSemaphoreValues` with the given value. + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR pWaitSemaphoreValues(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkD3D12FenceSubmitInfoKHR.set_pWaitSemaphoreValues(this.segment(), value); return this; } + + /// {@return `signalSemaphoreValuesCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_signalSemaphoreValuesCount(MemorySegment segment, long index) { return (int) VH_signalSemaphoreValuesCount.get(segment, 0L, index); } + /// {@return `signalSemaphoreValuesCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_signalSemaphoreValuesCount(MemorySegment segment) { return VkD3D12FenceSubmitInfoKHR.get_signalSemaphoreValuesCount(segment, 0L); } + /// {@return `signalSemaphoreValuesCount` at the given index} + /// @param index the index + public @CType("uint32_t") int signalSemaphoreValuesCountAt(long index) { return VkD3D12FenceSubmitInfoKHR.get_signalSemaphoreValuesCount(this.segment(), index); } + /// {@return `signalSemaphoreValuesCount`} + public @CType("uint32_t") int signalSemaphoreValuesCount() { return VkD3D12FenceSubmitInfoKHR.get_signalSemaphoreValuesCount(this.segment()); } + /// Sets `signalSemaphoreValuesCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_signalSemaphoreValuesCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_signalSemaphoreValuesCount.set(segment, 0L, index, value); } + /// Sets `signalSemaphoreValuesCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_signalSemaphoreValuesCount(MemorySegment segment, @CType("uint32_t") int value) { VkD3D12FenceSubmitInfoKHR.set_signalSemaphoreValuesCount(segment, 0L, value); } + /// Sets `signalSemaphoreValuesCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR signalSemaphoreValuesCountAt(long index, @CType("uint32_t") int value) { VkD3D12FenceSubmitInfoKHR.set_signalSemaphoreValuesCount(this.segment(), index, value); return this; } + /// Sets `signalSemaphoreValuesCount` with the given value. + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR signalSemaphoreValuesCount(@CType("uint32_t") int value) { VkD3D12FenceSubmitInfoKHR.set_signalSemaphoreValuesCount(this.segment(), value); return this; } + + /// {@return `pSignalSemaphoreValues` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pSignalSemaphoreValues(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSignalSemaphoreValues.get(segment, 0L, index); } + /// {@return `pSignalSemaphoreValues`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pSignalSemaphoreValues(MemorySegment segment) { return VkD3D12FenceSubmitInfoKHR.get_pSignalSemaphoreValues(segment, 0L); } + /// {@return `pSignalSemaphoreValues` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pSignalSemaphoreValuesAt(long index) { return VkD3D12FenceSubmitInfoKHR.get_pSignalSemaphoreValues(this.segment(), index); } + /// {@return `pSignalSemaphoreValues`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pSignalSemaphoreValues() { return VkD3D12FenceSubmitInfoKHR.get_pSignalSemaphoreValues(this.segment()); } + /// Sets `pSignalSemaphoreValues` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSignalSemaphoreValues(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pSignalSemaphoreValues.set(segment, 0L, index, value); } + /// Sets `pSignalSemaphoreValues` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSignalSemaphoreValues(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkD3D12FenceSubmitInfoKHR.set_pSignalSemaphoreValues(segment, 0L, value); } + /// Sets `pSignalSemaphoreValues` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR pSignalSemaphoreValuesAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkD3D12FenceSubmitInfoKHR.set_pSignalSemaphoreValues(this.segment(), index, value); return this; } + /// Sets `pSignalSemaphoreValues` with the given value. + /// @param value the value + /// @return `this` + public VkD3D12FenceSubmitInfoKHR pSignalSemaphoreValues(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkD3D12FenceSubmitInfoKHR.set_pSignalSemaphoreValues(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDeviceGroupPresentCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDeviceGroupPresentCapabilitiesKHR.java new file mode 100644 index 00000000..2a657ad7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDeviceGroupPresentCapabilitiesKHR.java @@ -0,0 +1,239 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK11.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentMask +/// [Byte offset handle][#MH_presentMask] - [Memory layout][#ML_presentMask] - [Getter][#presentMask(long)] - [Setter][#presentMask(long, java.lang.foreign.MemorySegment)] +/// ### modes +/// [VarHandle][#VH_modes] - [Getter][#modes()] - [Setter][#modes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceGroupPresentCapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t[VK_MAX_DEVICE_GROUP_SIZE] presentMask; +/// VkDeviceGroupPresentModeFlagsKHR modes; +/// } VkDeviceGroupPresentCapabilitiesKHR; +/// ``` +public final class VkDeviceGroupPresentCapabilitiesKHR extends Struct { + /// The struct layout of `VkDeviceGroupPresentCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_MAX_DEVICE_GROUP_SIZE, ValueLayout.JAVA_INT).withName("presentMask"), + ValueLayout.JAVA_INT.withName("modes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `presentMask` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_presentMask = LAYOUT.byteOffsetHandle(PathElement.groupElement("presentMask"), PathElement.sequenceElement()); + /// The memory layout of `presentMask`. + public static final MemoryLayout ML_presentMask = LAYOUT.select(PathElement.groupElement("presentMask")); + /// The [VarHandle] of `modes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_modes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("modes")); + + /// Creates `VkDeviceGroupPresentCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkDeviceGroupPresentCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceGroupPresentCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupPresentCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupPresentCapabilitiesKHR(segment); } + + /// Creates `VkDeviceGroupPresentCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupPresentCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupPresentCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceGroupPresentCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupPresentCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupPresentCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceGroupPresentCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceGroupPresentCapabilitiesKHR` + public static VkDeviceGroupPresentCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkDeviceGroupPresentCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceGroupPresentCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceGroupPresentCapabilitiesKHR` + public static VkDeviceGroupPresentCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkDeviceGroupPresentCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceGroupPresentCapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceGroupPresentCapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceGroupPresentCapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceGroupPresentCapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentCapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceGroupPresentCapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentCapabilitiesKHR sType(@CType("VkStructureType") int value) { VkDeviceGroupPresentCapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceGroupPresentCapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceGroupPresentCapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceGroupPresentCapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentCapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentCapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentCapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentCapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentCapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `presentMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint32_t[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment get_presentMask(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_presentMask.invokeExact(0L, elementIndex), index), ML_presentMask); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `presentMask`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint32_t[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment get_presentMask(MemorySegment segment, long elementIndex) { return VkDeviceGroupPresentCapabilitiesKHR.get_presentMask(segment, 0L, elementIndex); } + /// {@return `presentMask` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint32_t[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment presentMaskAt(long index, long elementIndex) { return VkDeviceGroupPresentCapabilitiesKHR.get_presentMask(this.segment(), index, elementIndex); } + /// {@return `presentMask`} + /// @param elementIndex the index of the element + public @CType("uint32_t[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment presentMask(long elementIndex) { return VkDeviceGroupPresentCapabilitiesKHR.get_presentMask(this.segment(), elementIndex); } + /// Sets `presentMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_presentMask(MemorySegment segment, long index, long elementIndex, @CType("uint32_t[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_presentMask.invokeExact(0L, elementIndex), index), ML_presentMask.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `presentMask` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_presentMask(MemorySegment segment, long elementIndex, @CType("uint32_t[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentCapabilitiesKHR.set_presentMask(segment, 0L, elementIndex, value); } + /// Sets `presentMask` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentCapabilitiesKHR presentMaskAt(long index, long elementIndex, @CType("uint32_t[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentCapabilitiesKHR.set_presentMask(this.segment(), index, elementIndex, value); return this; } + /// Sets `presentMask` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentCapabilitiesKHR presentMask(long elementIndex, @CType("uint32_t[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentCapabilitiesKHR.set_presentMask(this.segment(), elementIndex, value); return this; } + + /// {@return `modes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceGroupPresentModeFlagsKHR") int get_modes(MemorySegment segment, long index) { return (int) VH_modes.get(segment, 0L, index); } + /// {@return `modes`} + /// @param segment the segment of the struct + public static @CType("VkDeviceGroupPresentModeFlagsKHR") int get_modes(MemorySegment segment) { return VkDeviceGroupPresentCapabilitiesKHR.get_modes(segment, 0L); } + /// {@return `modes` at the given index} + /// @param index the index + public @CType("VkDeviceGroupPresentModeFlagsKHR") int modesAt(long index) { return VkDeviceGroupPresentCapabilitiesKHR.get_modes(this.segment(), index); } + /// {@return `modes`} + public @CType("VkDeviceGroupPresentModeFlagsKHR") int modes() { return VkDeviceGroupPresentCapabilitiesKHR.get_modes(this.segment()); } + /// Sets `modes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_modes(MemorySegment segment, long index, @CType("VkDeviceGroupPresentModeFlagsKHR") int value) { VH_modes.set(segment, 0L, index, value); } + /// Sets `modes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_modes(MemorySegment segment, @CType("VkDeviceGroupPresentModeFlagsKHR") int value) { VkDeviceGroupPresentCapabilitiesKHR.set_modes(segment, 0L, value); } + /// Sets `modes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentCapabilitiesKHR modesAt(long index, @CType("VkDeviceGroupPresentModeFlagsKHR") int value) { VkDeviceGroupPresentCapabilitiesKHR.set_modes(this.segment(), index, value); return this; } + /// Sets `modes` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentCapabilitiesKHR modes(@CType("VkDeviceGroupPresentModeFlagsKHR") int value) { VkDeviceGroupPresentCapabilitiesKHR.set_modes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDeviceGroupPresentInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDeviceGroupPresentInfoKHR.java new file mode 100644 index 00000000..fef21a70 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDeviceGroupPresentInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchainCount +/// [VarHandle][#VH_swapchainCount] - [Getter][#swapchainCount()] - [Setter][#swapchainCount(int)] +/// ### pDeviceMasks +/// [VarHandle][#VH_pDeviceMasks] - [Getter][#pDeviceMasks()] - [Setter][#pDeviceMasks(java.lang.foreign.MemorySegment)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceGroupPresentInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t swapchainCount; +/// const uint32_t * pDeviceMasks; +/// VkDeviceGroupPresentModeFlagBitsKHR mode; +/// } VkDeviceGroupPresentInfoKHR; +/// ``` +public final class VkDeviceGroupPresentInfoKHR extends Struct { + /// The struct layout of `VkDeviceGroupPresentInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("swapchainCount"), + ValueLayout.ADDRESS.withName("pDeviceMasks"), + ValueLayout.JAVA_INT.withName("mode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchainCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_swapchainCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchainCount")); + /// The [VarHandle] of `pDeviceMasks` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDeviceMasks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDeviceMasks")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + + /// Creates `VkDeviceGroupPresentInfoKHR` with the given segment. + /// @param segment the memory segment + public VkDeviceGroupPresentInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceGroupPresentInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupPresentInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupPresentInfoKHR(segment); } + + /// Creates `VkDeviceGroupPresentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupPresentInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupPresentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceGroupPresentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupPresentInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupPresentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceGroupPresentInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceGroupPresentInfoKHR` + public static VkDeviceGroupPresentInfoKHR alloc(SegmentAllocator allocator) { return new VkDeviceGroupPresentInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceGroupPresentInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceGroupPresentInfoKHR` + public static VkDeviceGroupPresentInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkDeviceGroupPresentInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceGroupPresentInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceGroupPresentInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceGroupPresentInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceGroupPresentInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceGroupPresentInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentInfoKHR sType(@CType("VkStructureType") int value) { VkDeviceGroupPresentInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceGroupPresentInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceGroupPresentInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceGroupPresentInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchainCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment, long index) { return (int) VH_swapchainCount.get(segment, 0L, index); } + /// {@return `swapchainCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment) { return VkDeviceGroupPresentInfoKHR.get_swapchainCount(segment, 0L); } + /// {@return `swapchainCount` at the given index} + /// @param index the index + public @CType("uint32_t") int swapchainCountAt(long index) { return VkDeviceGroupPresentInfoKHR.get_swapchainCount(this.segment(), index); } + /// {@return `swapchainCount`} + public @CType("uint32_t") int swapchainCount() { return VkDeviceGroupPresentInfoKHR.get_swapchainCount(this.segment()); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_swapchainCount.set(segment, 0L, index, value); } + /// Sets `swapchainCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceGroupPresentInfoKHR.set_swapchainCount(segment, 0L, value); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentInfoKHR swapchainCountAt(long index, @CType("uint32_t") int value) { VkDeviceGroupPresentInfoKHR.set_swapchainCount(this.segment(), index, value); return this; } + /// Sets `swapchainCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentInfoKHR swapchainCount(@CType("uint32_t") int value) { VkDeviceGroupPresentInfoKHR.set_swapchainCount(this.segment(), value); return this; } + + /// {@return `pDeviceMasks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDeviceMasks(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDeviceMasks.get(segment, 0L, index); } + /// {@return `pDeviceMasks`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDeviceMasks(MemorySegment segment) { return VkDeviceGroupPresentInfoKHR.get_pDeviceMasks(segment, 0L); } + /// {@return `pDeviceMasks` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDeviceMasksAt(long index) { return VkDeviceGroupPresentInfoKHR.get_pDeviceMasks(this.segment(), index); } + /// {@return `pDeviceMasks`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDeviceMasks() { return VkDeviceGroupPresentInfoKHR.get_pDeviceMasks(this.segment()); } + /// Sets `pDeviceMasks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDeviceMasks(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pDeviceMasks.set(segment, 0L, index, value); } + /// Sets `pDeviceMasks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDeviceMasks(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentInfoKHR.set_pDeviceMasks(segment, 0L, value); } + /// Sets `pDeviceMasks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentInfoKHR pDeviceMasksAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentInfoKHR.set_pDeviceMasks(this.segment(), index, value); return this; } + /// Sets `pDeviceMasks` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentInfoKHR pDeviceMasks(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupPresentInfoKHR.set_pDeviceMasks(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceGroupPresentModeFlagBitsKHR") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkDeviceGroupPresentModeFlagBitsKHR") int get_mode(MemorySegment segment) { return VkDeviceGroupPresentInfoKHR.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkDeviceGroupPresentModeFlagBitsKHR") int modeAt(long index) { return VkDeviceGroupPresentInfoKHR.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkDeviceGroupPresentModeFlagBitsKHR") int mode() { return VkDeviceGroupPresentInfoKHR.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkDeviceGroupPresentModeFlagBitsKHR") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkDeviceGroupPresentModeFlagBitsKHR") int value) { VkDeviceGroupPresentInfoKHR.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentInfoKHR modeAt(long index, @CType("VkDeviceGroupPresentModeFlagBitsKHR") int value) { VkDeviceGroupPresentInfoKHR.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupPresentInfoKHR mode(@CType("VkDeviceGroupPresentModeFlagBitsKHR") int value) { VkDeviceGroupPresentInfoKHR.set_mode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDeviceGroupSwapchainCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDeviceGroupSwapchainCreateInfoKHR.java new file mode 100644 index 00000000..902e3808 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDeviceGroupSwapchainCreateInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### modes +/// [VarHandle][#VH_modes] - [Getter][#modes()] - [Setter][#modes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceGroupSwapchainCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceGroupPresentModeFlagsKHR modes; +/// } VkDeviceGroupSwapchainCreateInfoKHR; +/// ``` +public final class VkDeviceGroupSwapchainCreateInfoKHR extends Struct { + /// The struct layout of `VkDeviceGroupSwapchainCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("modes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `modes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_modes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("modes")); + + /// Creates `VkDeviceGroupSwapchainCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkDeviceGroupSwapchainCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceGroupSwapchainCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupSwapchainCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupSwapchainCreateInfoKHR(segment); } + + /// Creates `VkDeviceGroupSwapchainCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupSwapchainCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupSwapchainCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceGroupSwapchainCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupSwapchainCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupSwapchainCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceGroupSwapchainCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceGroupSwapchainCreateInfoKHR` + public static VkDeviceGroupSwapchainCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkDeviceGroupSwapchainCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceGroupSwapchainCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceGroupSwapchainCreateInfoKHR` + public static VkDeviceGroupSwapchainCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkDeviceGroupSwapchainCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceGroupSwapchainCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceGroupSwapchainCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceGroupSwapchainCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceGroupSwapchainCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSwapchainCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceGroupSwapchainCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSwapchainCreateInfoKHR sType(@CType("VkStructureType") int value) { VkDeviceGroupSwapchainCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceGroupSwapchainCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceGroupSwapchainCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceGroupSwapchainCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSwapchainCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSwapchainCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSwapchainCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSwapchainCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSwapchainCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `modes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceGroupPresentModeFlagsKHR") int get_modes(MemorySegment segment, long index) { return (int) VH_modes.get(segment, 0L, index); } + /// {@return `modes`} + /// @param segment the segment of the struct + public static @CType("VkDeviceGroupPresentModeFlagsKHR") int get_modes(MemorySegment segment) { return VkDeviceGroupSwapchainCreateInfoKHR.get_modes(segment, 0L); } + /// {@return `modes` at the given index} + /// @param index the index + public @CType("VkDeviceGroupPresentModeFlagsKHR") int modesAt(long index) { return VkDeviceGroupSwapchainCreateInfoKHR.get_modes(this.segment(), index); } + /// {@return `modes`} + public @CType("VkDeviceGroupPresentModeFlagsKHR") int modes() { return VkDeviceGroupSwapchainCreateInfoKHR.get_modes(this.segment()); } + /// Sets `modes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_modes(MemorySegment segment, long index, @CType("VkDeviceGroupPresentModeFlagsKHR") int value) { VH_modes.set(segment, 0L, index, value); } + /// Sets `modes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_modes(MemorySegment segment, @CType("VkDeviceGroupPresentModeFlagsKHR") int value) { VkDeviceGroupSwapchainCreateInfoKHR.set_modes(segment, 0L, value); } + /// Sets `modes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSwapchainCreateInfoKHR modesAt(long index, @CType("VkDeviceGroupPresentModeFlagsKHR") int value) { VkDeviceGroupSwapchainCreateInfoKHR.set_modes(this.segment(), index, value); return this; } + /// Sets `modes` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSwapchainCreateInfoKHR modes(@CType("VkDeviceGroupPresentModeFlagsKHR") int value) { VkDeviceGroupSwapchainCreateInfoKHR.set_modes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDevicePipelineBinaryInternalCacheControlKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDevicePipelineBinaryInternalCacheControlKHR.java new file mode 100644 index 00000000..ba71b6a9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDevicePipelineBinaryInternalCacheControlKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### disableInternalCache +/// [VarHandle][#VH_disableInternalCache] - [Getter][#disableInternalCache()] - [Setter][#disableInternalCache(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDevicePipelineBinaryInternalCacheControlKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 disableInternalCache; +/// } VkDevicePipelineBinaryInternalCacheControlKHR; +/// ``` +public final class VkDevicePipelineBinaryInternalCacheControlKHR extends Struct { + /// The struct layout of `VkDevicePipelineBinaryInternalCacheControlKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("disableInternalCache") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `disableInternalCache` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disableInternalCache = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disableInternalCache")); + + /// Creates `VkDevicePipelineBinaryInternalCacheControlKHR` with the given segment. + /// @param segment the memory segment + public VkDevicePipelineBinaryInternalCacheControlKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDevicePipelineBinaryInternalCacheControlKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDevicePipelineBinaryInternalCacheControlKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDevicePipelineBinaryInternalCacheControlKHR(segment); } + + /// Creates `VkDevicePipelineBinaryInternalCacheControlKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDevicePipelineBinaryInternalCacheControlKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDevicePipelineBinaryInternalCacheControlKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDevicePipelineBinaryInternalCacheControlKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDevicePipelineBinaryInternalCacheControlKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDevicePipelineBinaryInternalCacheControlKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDevicePipelineBinaryInternalCacheControlKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDevicePipelineBinaryInternalCacheControlKHR` + public static VkDevicePipelineBinaryInternalCacheControlKHR alloc(SegmentAllocator allocator) { return new VkDevicePipelineBinaryInternalCacheControlKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDevicePipelineBinaryInternalCacheControlKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDevicePipelineBinaryInternalCacheControlKHR` + public static VkDevicePipelineBinaryInternalCacheControlKHR alloc(SegmentAllocator allocator, long count) { return new VkDevicePipelineBinaryInternalCacheControlKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDevicePipelineBinaryInternalCacheControlKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDevicePipelineBinaryInternalCacheControlKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDevicePipelineBinaryInternalCacheControlKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDevicePipelineBinaryInternalCacheControlKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDevicePipelineBinaryInternalCacheControlKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDevicePipelineBinaryInternalCacheControlKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDevicePipelineBinaryInternalCacheControlKHR sType(@CType("VkStructureType") int value) { VkDevicePipelineBinaryInternalCacheControlKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDevicePipelineBinaryInternalCacheControlKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDevicePipelineBinaryInternalCacheControlKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDevicePipelineBinaryInternalCacheControlKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDevicePipelineBinaryInternalCacheControlKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDevicePipelineBinaryInternalCacheControlKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDevicePipelineBinaryInternalCacheControlKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDevicePipelineBinaryInternalCacheControlKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDevicePipelineBinaryInternalCacheControlKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `disableInternalCache` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_disableInternalCache(MemorySegment segment, long index) { return (int) VH_disableInternalCache.get(segment, 0L, index); } + /// {@return `disableInternalCache`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_disableInternalCache(MemorySegment segment) { return VkDevicePipelineBinaryInternalCacheControlKHR.get_disableInternalCache(segment, 0L); } + /// {@return `disableInternalCache` at the given index} + /// @param index the index + public @CType("VkBool32") int disableInternalCacheAt(long index) { return VkDevicePipelineBinaryInternalCacheControlKHR.get_disableInternalCache(this.segment(), index); } + /// {@return `disableInternalCache`} + public @CType("VkBool32") int disableInternalCache() { return VkDevicePipelineBinaryInternalCacheControlKHR.get_disableInternalCache(this.segment()); } + /// Sets `disableInternalCache` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disableInternalCache(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_disableInternalCache.set(segment, 0L, index, value); } + /// Sets `disableInternalCache` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disableInternalCache(MemorySegment segment, @CType("VkBool32") int value) { VkDevicePipelineBinaryInternalCacheControlKHR.set_disableInternalCache(segment, 0L, value); } + /// Sets `disableInternalCache` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDevicePipelineBinaryInternalCacheControlKHR disableInternalCacheAt(long index, @CType("VkBool32") int value) { VkDevicePipelineBinaryInternalCacheControlKHR.set_disableInternalCache(this.segment(), index, value); return this; } + /// Sets `disableInternalCache` with the given value. + /// @param value the value + /// @return `this` + public VkDevicePipelineBinaryInternalCacheControlKHR disableInternalCache(@CType("VkBool32") int value) { VkDevicePipelineBinaryInternalCacheControlKHR.set_disableInternalCache(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModeCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModeCreateInfoKHR.java new file mode 100644 index 00000000..55a4abea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModeCreateInfoKHR.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### parameters +/// [Byte offset][#OFFSET_parameters] - [Memory layout][#ML_parameters] - [Getter][#parameters()] - [Setter][#parameters(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayModeCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkDisplayModeCreateFlagsKHR flags; +/// VkDisplayModeParametersKHR parameters; +/// } VkDisplayModeCreateInfoKHR; +/// ``` +public final class VkDisplayModeCreateInfoKHR extends Struct { + /// The struct layout of `VkDisplayModeCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + overrungl.vulkan.khr.struct.VkDisplayModeParametersKHR.LAYOUT.withName("parameters") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The byte offset of `parameters`. + public static final long OFFSET_parameters = LAYOUT.byteOffset(PathElement.groupElement("parameters")); + /// The memory layout of `parameters`. + public static final MemoryLayout ML_parameters = LAYOUT.select(PathElement.groupElement("parameters")); + + /// Creates `VkDisplayModeCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkDisplayModeCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayModeCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeCreateInfoKHR(segment); } + + /// Creates `VkDisplayModeCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayModeCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayModeCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayModeCreateInfoKHR` + public static VkDisplayModeCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkDisplayModeCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayModeCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayModeCreateInfoKHR` + public static VkDisplayModeCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayModeCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayModeCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayModeCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayModeCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayModeCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayModeCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeCreateInfoKHR sType(@CType("VkStructureType") int value) { VkDisplayModeCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayModeCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayModeCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayModeCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayModeCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayModeCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayModeCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayModeCreateFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDisplayModeCreateFlagsKHR") int get_flags(MemorySegment segment) { return VkDisplayModeCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDisplayModeCreateFlagsKHR") int flagsAt(long index) { return VkDisplayModeCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDisplayModeCreateFlagsKHR") int flags() { return VkDisplayModeCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDisplayModeCreateFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDisplayModeCreateFlagsKHR") int value) { VkDisplayModeCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeCreateInfoKHR flagsAt(long index, @CType("VkDisplayModeCreateFlagsKHR") int value) { VkDisplayModeCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeCreateInfoKHR flags(@CType("VkDisplayModeCreateFlagsKHR") int value) { VkDisplayModeCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `parameters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment get_parameters(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_parameters, index), ML_parameters); } + /// {@return `parameters`} + /// @param segment the segment of the struct + public static @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment get_parameters(MemorySegment segment) { return VkDisplayModeCreateInfoKHR.get_parameters(segment, 0L); } + /// {@return `parameters` at the given index} + /// @param index the index + public @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment parametersAt(long index) { return VkDisplayModeCreateInfoKHR.get_parameters(this.segment(), index); } + /// {@return `parameters`} + public @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment parameters() { return VkDisplayModeCreateInfoKHR.get_parameters(this.segment()); } + /// Sets `parameters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_parameters(MemorySegment segment, long index, @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_parameters, index), ML_parameters.byteSize()); } + /// Sets `parameters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_parameters(MemorySegment segment, @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment value) { VkDisplayModeCreateInfoKHR.set_parameters(segment, 0L, value); } + /// Sets `parameters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeCreateInfoKHR parametersAt(long index, @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment value) { VkDisplayModeCreateInfoKHR.set_parameters(this.segment(), index, value); return this; } + /// Sets `parameters` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeCreateInfoKHR parameters(@CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment value) { VkDisplayModeCreateInfoKHR.set_parameters(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModeParametersKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModeParametersKHR.java new file mode 100644 index 00000000..122a7bb4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModeParametersKHR.java @@ -0,0 +1,150 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### visibleRegion +/// [Byte offset][#OFFSET_visibleRegion] - [Memory layout][#ML_visibleRegion] - [Getter][#visibleRegion()] - [Setter][#visibleRegion(java.lang.foreign.MemorySegment)] +/// ### refreshRate +/// [VarHandle][#VH_refreshRate] - [Getter][#refreshRate()] - [Setter][#refreshRate(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayModeParametersKHR { +/// VkExtent2D visibleRegion; +/// uint32_t refreshRate; +/// } VkDisplayModeParametersKHR; +/// ``` +public final class VkDisplayModeParametersKHR extends Struct { + /// The struct layout of `VkDisplayModeParametersKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("visibleRegion"), + ValueLayout.JAVA_INT.withName("refreshRate") + ); + /// The byte offset of `visibleRegion`. + public static final long OFFSET_visibleRegion = LAYOUT.byteOffset(PathElement.groupElement("visibleRegion")); + /// The memory layout of `visibleRegion`. + public static final MemoryLayout ML_visibleRegion = LAYOUT.select(PathElement.groupElement("visibleRegion")); + /// The [VarHandle] of `refreshRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_refreshRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("refreshRate")); + + /// Creates `VkDisplayModeParametersKHR` with the given segment. + /// @param segment the memory segment + public VkDisplayModeParametersKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayModeParametersKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeParametersKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeParametersKHR(segment); } + + /// Creates `VkDisplayModeParametersKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeParametersKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeParametersKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayModeParametersKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeParametersKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeParametersKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayModeParametersKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayModeParametersKHR` + public static VkDisplayModeParametersKHR alloc(SegmentAllocator allocator) { return new VkDisplayModeParametersKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayModeParametersKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayModeParametersKHR` + public static VkDisplayModeParametersKHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayModeParametersKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `visibleRegion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_visibleRegion(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_visibleRegion, index), ML_visibleRegion); } + /// {@return `visibleRegion`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_visibleRegion(MemorySegment segment) { return VkDisplayModeParametersKHR.get_visibleRegion(segment, 0L); } + /// {@return `visibleRegion` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment visibleRegionAt(long index) { return VkDisplayModeParametersKHR.get_visibleRegion(this.segment(), index); } + /// {@return `visibleRegion`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment visibleRegion() { return VkDisplayModeParametersKHR.get_visibleRegion(this.segment()); } + /// Sets `visibleRegion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_visibleRegion(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_visibleRegion, index), ML_visibleRegion.byteSize()); } + /// Sets `visibleRegion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_visibleRegion(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayModeParametersKHR.set_visibleRegion(segment, 0L, value); } + /// Sets `visibleRegion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeParametersKHR visibleRegionAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayModeParametersKHR.set_visibleRegion(this.segment(), index, value); return this; } + /// Sets `visibleRegion` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeParametersKHR visibleRegion(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayModeParametersKHR.set_visibleRegion(this.segment(), value); return this; } + + /// {@return `refreshRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_refreshRate(MemorySegment segment, long index) { return (int) VH_refreshRate.get(segment, 0L, index); } + /// {@return `refreshRate`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_refreshRate(MemorySegment segment) { return VkDisplayModeParametersKHR.get_refreshRate(segment, 0L); } + /// {@return `refreshRate` at the given index} + /// @param index the index + public @CType("uint32_t") int refreshRateAt(long index) { return VkDisplayModeParametersKHR.get_refreshRate(this.segment(), index); } + /// {@return `refreshRate`} + public @CType("uint32_t") int refreshRate() { return VkDisplayModeParametersKHR.get_refreshRate(this.segment()); } + /// Sets `refreshRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_refreshRate(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_refreshRate.set(segment, 0L, index, value); } + /// Sets `refreshRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_refreshRate(MemorySegment segment, @CType("uint32_t") int value) { VkDisplayModeParametersKHR.set_refreshRate(segment, 0L, value); } + /// Sets `refreshRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeParametersKHR refreshRateAt(long index, @CType("uint32_t") int value) { VkDisplayModeParametersKHR.set_refreshRate(this.segment(), index, value); return this; } + /// Sets `refreshRate` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeParametersKHR refreshRate(@CType("uint32_t") int value) { VkDisplayModeParametersKHR.set_refreshRate(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModeProperties2KHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModeProperties2KHR.java new file mode 100644 index 00000000..591054f0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModeProperties2KHR.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### displayModeProperties +/// [Byte offset][#OFFSET_displayModeProperties] - [Memory layout][#ML_displayModeProperties] - [Getter][#displayModeProperties()] - [Setter][#displayModeProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayModeProperties2KHR { +/// VkStructureType sType; +/// void * pNext; +/// VkDisplayModePropertiesKHR displayModeProperties; +/// } VkDisplayModeProperties2KHR; +/// ``` +public final class VkDisplayModeProperties2KHR extends Struct { + /// The struct layout of `VkDisplayModeProperties2KHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.khr.struct.VkDisplayModePropertiesKHR.LAYOUT.withName("displayModeProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `displayModeProperties`. + public static final long OFFSET_displayModeProperties = LAYOUT.byteOffset(PathElement.groupElement("displayModeProperties")); + /// The memory layout of `displayModeProperties`. + public static final MemoryLayout ML_displayModeProperties = LAYOUT.select(PathElement.groupElement("displayModeProperties")); + + /// Creates `VkDisplayModeProperties2KHR` with the given segment. + /// @param segment the memory segment + public VkDisplayModeProperties2KHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayModeProperties2KHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeProperties2KHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeProperties2KHR(segment); } + + /// Creates `VkDisplayModeProperties2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeProperties2KHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeProperties2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayModeProperties2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeProperties2KHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeProperties2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayModeProperties2KHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayModeProperties2KHR` + public static VkDisplayModeProperties2KHR alloc(SegmentAllocator allocator) { return new VkDisplayModeProperties2KHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayModeProperties2KHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayModeProperties2KHR` + public static VkDisplayModeProperties2KHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayModeProperties2KHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayModeProperties2KHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayModeProperties2KHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayModeProperties2KHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayModeProperties2KHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeProperties2KHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayModeProperties2KHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeProperties2KHR sType(@CType("VkStructureType") int value) { VkDisplayModeProperties2KHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayModeProperties2KHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayModeProperties2KHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayModeProperties2KHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayModeProperties2KHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeProperties2KHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayModeProperties2KHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeProperties2KHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayModeProperties2KHR.set_pNext(this.segment(), value); return this; } + + /// {@return `displayModeProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayModePropertiesKHR") java.lang.foreign.MemorySegment get_displayModeProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_displayModeProperties, index), ML_displayModeProperties); } + /// {@return `displayModeProperties`} + /// @param segment the segment of the struct + public static @CType("VkDisplayModePropertiesKHR") java.lang.foreign.MemorySegment get_displayModeProperties(MemorySegment segment) { return VkDisplayModeProperties2KHR.get_displayModeProperties(segment, 0L); } + /// {@return `displayModeProperties` at the given index} + /// @param index the index + public @CType("VkDisplayModePropertiesKHR") java.lang.foreign.MemorySegment displayModePropertiesAt(long index) { return VkDisplayModeProperties2KHR.get_displayModeProperties(this.segment(), index); } + /// {@return `displayModeProperties`} + public @CType("VkDisplayModePropertiesKHR") java.lang.foreign.MemorySegment displayModeProperties() { return VkDisplayModeProperties2KHR.get_displayModeProperties(this.segment()); } + /// Sets `displayModeProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayModeProperties(MemorySegment segment, long index, @CType("VkDisplayModePropertiesKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_displayModeProperties, index), ML_displayModeProperties.byteSize()); } + /// Sets `displayModeProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayModeProperties(MemorySegment segment, @CType("VkDisplayModePropertiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayModeProperties2KHR.set_displayModeProperties(segment, 0L, value); } + /// Sets `displayModeProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeProperties2KHR displayModePropertiesAt(long index, @CType("VkDisplayModePropertiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayModeProperties2KHR.set_displayModeProperties(this.segment(), index, value); return this; } + /// Sets `displayModeProperties` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeProperties2KHR displayModeProperties(@CType("VkDisplayModePropertiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayModeProperties2KHR.set_displayModeProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModePropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModePropertiesKHR.java new file mode 100644 index 00000000..13bf84e0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayModePropertiesKHR.java @@ -0,0 +1,150 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### displayMode +/// [VarHandle][#VH_displayMode] - [Getter][#displayMode()] - [Setter][#displayMode(java.lang.foreign.MemorySegment)] +/// ### parameters +/// [Byte offset][#OFFSET_parameters] - [Memory layout][#ML_parameters] - [Getter][#parameters()] - [Setter][#parameters(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayModePropertiesKHR { +/// VkDisplayModeKHR displayMode; +/// VkDisplayModeParametersKHR parameters; +/// } VkDisplayModePropertiesKHR; +/// ``` +public final class VkDisplayModePropertiesKHR extends Struct { + /// The struct layout of `VkDisplayModePropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("displayMode"), + overrungl.vulkan.khr.struct.VkDisplayModeParametersKHR.LAYOUT.withName("parameters") + ); + /// The [VarHandle] of `displayMode` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_displayMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displayMode")); + /// The byte offset of `parameters`. + public static final long OFFSET_parameters = LAYOUT.byteOffset(PathElement.groupElement("parameters")); + /// The memory layout of `parameters`. + public static final MemoryLayout ML_parameters = LAYOUT.select(PathElement.groupElement("parameters")); + + /// Creates `VkDisplayModePropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkDisplayModePropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayModePropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModePropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModePropertiesKHR(segment); } + + /// Creates `VkDisplayModePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModePropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayModePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModePropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayModePropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayModePropertiesKHR` + public static VkDisplayModePropertiesKHR alloc(SegmentAllocator allocator) { return new VkDisplayModePropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayModePropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayModePropertiesKHR` + public static VkDisplayModePropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayModePropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `displayMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment get_displayMode(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_displayMode.get(segment, 0L, index); } + /// {@return `displayMode`} + /// @param segment the segment of the struct + public static @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment get_displayMode(MemorySegment segment) { return VkDisplayModePropertiesKHR.get_displayMode(segment, 0L); } + /// {@return `displayMode` at the given index} + /// @param index the index + public @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment displayModeAt(long index) { return VkDisplayModePropertiesKHR.get_displayMode(this.segment(), index); } + /// {@return `displayMode`} + public @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment displayMode() { return VkDisplayModePropertiesKHR.get_displayMode(this.segment()); } + /// Sets `displayMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayMode(MemorySegment segment, long index, @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VH_displayMode.set(segment, 0L, index, value); } + /// Sets `displayMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayMode(MemorySegment segment, @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VkDisplayModePropertiesKHR.set_displayMode(segment, 0L, value); } + /// Sets `displayMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModePropertiesKHR displayModeAt(long index, @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VkDisplayModePropertiesKHR.set_displayMode(this.segment(), index, value); return this; } + /// Sets `displayMode` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModePropertiesKHR displayMode(@CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VkDisplayModePropertiesKHR.set_displayMode(this.segment(), value); return this; } + + /// {@return `parameters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment get_parameters(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_parameters, index), ML_parameters); } + /// {@return `parameters`} + /// @param segment the segment of the struct + public static @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment get_parameters(MemorySegment segment) { return VkDisplayModePropertiesKHR.get_parameters(segment, 0L); } + /// {@return `parameters` at the given index} + /// @param index the index + public @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment parametersAt(long index) { return VkDisplayModePropertiesKHR.get_parameters(this.segment(), index); } + /// {@return `parameters`} + public @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment parameters() { return VkDisplayModePropertiesKHR.get_parameters(this.segment()); } + /// Sets `parameters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_parameters(MemorySegment segment, long index, @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_parameters, index), ML_parameters.byteSize()); } + /// Sets `parameters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_parameters(MemorySegment segment, @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment value) { VkDisplayModePropertiesKHR.set_parameters(segment, 0L, value); } + /// Sets `parameters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModePropertiesKHR parametersAt(long index, @CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment value) { VkDisplayModePropertiesKHR.set_parameters(this.segment(), index, value); return this; } + /// Sets `parameters` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModePropertiesKHR parameters(@CType("VkDisplayModeParametersKHR") java.lang.foreign.MemorySegment value) { VkDisplayModePropertiesKHR.set_parameters(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneCapabilities2KHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneCapabilities2KHR.java new file mode 100644 index 00000000..ee56358a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneCapabilities2KHR.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### capabilities +/// [Byte offset][#OFFSET_capabilities] - [Memory layout][#ML_capabilities] - [Getter][#capabilities()] - [Setter][#capabilities(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayPlaneCapabilities2KHR { +/// VkStructureType sType; +/// void * pNext; +/// VkDisplayPlaneCapabilitiesKHR capabilities; +/// } VkDisplayPlaneCapabilities2KHR; +/// ``` +public final class VkDisplayPlaneCapabilities2KHR extends Struct { + /// The struct layout of `VkDisplayPlaneCapabilities2KHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.khr.struct.VkDisplayPlaneCapabilitiesKHR.LAYOUT.withName("capabilities") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `capabilities`. + public static final long OFFSET_capabilities = LAYOUT.byteOffset(PathElement.groupElement("capabilities")); + /// The memory layout of `capabilities`. + public static final MemoryLayout ML_capabilities = LAYOUT.select(PathElement.groupElement("capabilities")); + + /// Creates `VkDisplayPlaneCapabilities2KHR` with the given segment. + /// @param segment the memory segment + public VkDisplayPlaneCapabilities2KHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayPlaneCapabilities2KHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneCapabilities2KHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneCapabilities2KHR(segment); } + + /// Creates `VkDisplayPlaneCapabilities2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneCapabilities2KHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneCapabilities2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayPlaneCapabilities2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneCapabilities2KHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneCapabilities2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayPlaneCapabilities2KHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayPlaneCapabilities2KHR` + public static VkDisplayPlaneCapabilities2KHR alloc(SegmentAllocator allocator) { return new VkDisplayPlaneCapabilities2KHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayPlaneCapabilities2KHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayPlaneCapabilities2KHR` + public static VkDisplayPlaneCapabilities2KHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayPlaneCapabilities2KHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayPlaneCapabilities2KHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayPlaneCapabilities2KHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayPlaneCapabilities2KHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayPlaneCapabilities2KHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilities2KHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayPlaneCapabilities2KHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilities2KHR sType(@CType("VkStructureType") int value) { VkDisplayPlaneCapabilities2KHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayPlaneCapabilities2KHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayPlaneCapabilities2KHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayPlaneCapabilities2KHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilities2KHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilities2KHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilities2KHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilities2KHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilities2KHR.set_pNext(this.segment(), value); return this; } + + /// {@return `capabilities` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayPlaneCapabilitiesKHR") java.lang.foreign.MemorySegment get_capabilities(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_capabilities, index), ML_capabilities); } + /// {@return `capabilities`} + /// @param segment the segment of the struct + public static @CType("VkDisplayPlaneCapabilitiesKHR") java.lang.foreign.MemorySegment get_capabilities(MemorySegment segment) { return VkDisplayPlaneCapabilities2KHR.get_capabilities(segment, 0L); } + /// {@return `capabilities` at the given index} + /// @param index the index + public @CType("VkDisplayPlaneCapabilitiesKHR") java.lang.foreign.MemorySegment capabilitiesAt(long index) { return VkDisplayPlaneCapabilities2KHR.get_capabilities(this.segment(), index); } + /// {@return `capabilities`} + public @CType("VkDisplayPlaneCapabilitiesKHR") java.lang.foreign.MemorySegment capabilities() { return VkDisplayPlaneCapabilities2KHR.get_capabilities(this.segment()); } + /// Sets `capabilities` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_capabilities(MemorySegment segment, long index, @CType("VkDisplayPlaneCapabilitiesKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_capabilities, index), ML_capabilities.byteSize()); } + /// Sets `capabilities` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_capabilities(MemorySegment segment, @CType("VkDisplayPlaneCapabilitiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilities2KHR.set_capabilities(segment, 0L, value); } + /// Sets `capabilities` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilities2KHR capabilitiesAt(long index, @CType("VkDisplayPlaneCapabilitiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilities2KHR.set_capabilities(this.segment(), index, value); return this; } + /// Sets `capabilities` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilities2KHR capabilities(@CType("VkDisplayPlaneCapabilitiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilities2KHR.set_capabilities(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneCapabilitiesKHR.java new file mode 100644 index 00000000..2543db39 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneCapabilitiesKHR.java @@ -0,0 +1,423 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### supportedAlpha +/// [VarHandle][#VH_supportedAlpha] - [Getter][#supportedAlpha()] - [Setter][#supportedAlpha(int)] +/// ### minSrcPosition +/// [Byte offset][#OFFSET_minSrcPosition] - [Memory layout][#ML_minSrcPosition] - [Getter][#minSrcPosition()] - [Setter][#minSrcPosition(java.lang.foreign.MemorySegment)] +/// ### maxSrcPosition +/// [Byte offset][#OFFSET_maxSrcPosition] - [Memory layout][#ML_maxSrcPosition] - [Getter][#maxSrcPosition()] - [Setter][#maxSrcPosition(java.lang.foreign.MemorySegment)] +/// ### minSrcExtent +/// [Byte offset][#OFFSET_minSrcExtent] - [Memory layout][#ML_minSrcExtent] - [Getter][#minSrcExtent()] - [Setter][#minSrcExtent(java.lang.foreign.MemorySegment)] +/// ### maxSrcExtent +/// [Byte offset][#OFFSET_maxSrcExtent] - [Memory layout][#ML_maxSrcExtent] - [Getter][#maxSrcExtent()] - [Setter][#maxSrcExtent(java.lang.foreign.MemorySegment)] +/// ### minDstPosition +/// [Byte offset][#OFFSET_minDstPosition] - [Memory layout][#ML_minDstPosition] - [Getter][#minDstPosition()] - [Setter][#minDstPosition(java.lang.foreign.MemorySegment)] +/// ### maxDstPosition +/// [Byte offset][#OFFSET_maxDstPosition] - [Memory layout][#ML_maxDstPosition] - [Getter][#maxDstPosition()] - [Setter][#maxDstPosition(java.lang.foreign.MemorySegment)] +/// ### minDstExtent +/// [Byte offset][#OFFSET_minDstExtent] - [Memory layout][#ML_minDstExtent] - [Getter][#minDstExtent()] - [Setter][#minDstExtent(java.lang.foreign.MemorySegment)] +/// ### maxDstExtent +/// [Byte offset][#OFFSET_maxDstExtent] - [Memory layout][#ML_maxDstExtent] - [Getter][#maxDstExtent()] - [Setter][#maxDstExtent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayPlaneCapabilitiesKHR { +/// VkDisplayPlaneAlphaFlagsKHR supportedAlpha; +/// VkOffset2D minSrcPosition; +/// VkOffset2D maxSrcPosition; +/// VkExtent2D minSrcExtent; +/// VkExtent2D maxSrcExtent; +/// VkOffset2D minDstPosition; +/// VkOffset2D maxDstPosition; +/// VkExtent2D minDstExtent; +/// VkExtent2D maxDstExtent; +/// } VkDisplayPlaneCapabilitiesKHR; +/// ``` +public final class VkDisplayPlaneCapabilitiesKHR extends Struct { + /// The struct layout of `VkDisplayPlaneCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("supportedAlpha"), + overrungl.vulkan.struct.VkOffset2D.LAYOUT.withName("minSrcPosition"), + overrungl.vulkan.struct.VkOffset2D.LAYOUT.withName("maxSrcPosition"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("minSrcExtent"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxSrcExtent"), + overrungl.vulkan.struct.VkOffset2D.LAYOUT.withName("minDstPosition"), + overrungl.vulkan.struct.VkOffset2D.LAYOUT.withName("maxDstPosition"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("minDstExtent"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxDstExtent") + ); + /// The [VarHandle] of `supportedAlpha` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedAlpha = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedAlpha")); + /// The byte offset of `minSrcPosition`. + public static final long OFFSET_minSrcPosition = LAYOUT.byteOffset(PathElement.groupElement("minSrcPosition")); + /// The memory layout of `minSrcPosition`. + public static final MemoryLayout ML_minSrcPosition = LAYOUT.select(PathElement.groupElement("minSrcPosition")); + /// The byte offset of `maxSrcPosition`. + public static final long OFFSET_maxSrcPosition = LAYOUT.byteOffset(PathElement.groupElement("maxSrcPosition")); + /// The memory layout of `maxSrcPosition`. + public static final MemoryLayout ML_maxSrcPosition = LAYOUT.select(PathElement.groupElement("maxSrcPosition")); + /// The byte offset of `minSrcExtent`. + public static final long OFFSET_minSrcExtent = LAYOUT.byteOffset(PathElement.groupElement("minSrcExtent")); + /// The memory layout of `minSrcExtent`. + public static final MemoryLayout ML_minSrcExtent = LAYOUT.select(PathElement.groupElement("minSrcExtent")); + /// The byte offset of `maxSrcExtent`. + public static final long OFFSET_maxSrcExtent = LAYOUT.byteOffset(PathElement.groupElement("maxSrcExtent")); + /// The memory layout of `maxSrcExtent`. + public static final MemoryLayout ML_maxSrcExtent = LAYOUT.select(PathElement.groupElement("maxSrcExtent")); + /// The byte offset of `minDstPosition`. + public static final long OFFSET_minDstPosition = LAYOUT.byteOffset(PathElement.groupElement("minDstPosition")); + /// The memory layout of `minDstPosition`. + public static final MemoryLayout ML_minDstPosition = LAYOUT.select(PathElement.groupElement("minDstPosition")); + /// The byte offset of `maxDstPosition`. + public static final long OFFSET_maxDstPosition = LAYOUT.byteOffset(PathElement.groupElement("maxDstPosition")); + /// The memory layout of `maxDstPosition`. + public static final MemoryLayout ML_maxDstPosition = LAYOUT.select(PathElement.groupElement("maxDstPosition")); + /// The byte offset of `minDstExtent`. + public static final long OFFSET_minDstExtent = LAYOUT.byteOffset(PathElement.groupElement("minDstExtent")); + /// The memory layout of `minDstExtent`. + public static final MemoryLayout ML_minDstExtent = LAYOUT.select(PathElement.groupElement("minDstExtent")); + /// The byte offset of `maxDstExtent`. + public static final long OFFSET_maxDstExtent = LAYOUT.byteOffset(PathElement.groupElement("maxDstExtent")); + /// The memory layout of `maxDstExtent`. + public static final MemoryLayout ML_maxDstExtent = LAYOUT.select(PathElement.groupElement("maxDstExtent")); + + /// Creates `VkDisplayPlaneCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkDisplayPlaneCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayPlaneCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneCapabilitiesKHR(segment); } + + /// Creates `VkDisplayPlaneCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayPlaneCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayPlaneCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayPlaneCapabilitiesKHR` + public static VkDisplayPlaneCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkDisplayPlaneCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayPlaneCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayPlaneCapabilitiesKHR` + public static VkDisplayPlaneCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayPlaneCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `supportedAlpha` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayPlaneAlphaFlagsKHR") int get_supportedAlpha(MemorySegment segment, long index) { return (int) VH_supportedAlpha.get(segment, 0L, index); } + /// {@return `supportedAlpha`} + /// @param segment the segment of the struct + public static @CType("VkDisplayPlaneAlphaFlagsKHR") int get_supportedAlpha(MemorySegment segment) { return VkDisplayPlaneCapabilitiesKHR.get_supportedAlpha(segment, 0L); } + /// {@return `supportedAlpha` at the given index} + /// @param index the index + public @CType("VkDisplayPlaneAlphaFlagsKHR") int supportedAlphaAt(long index) { return VkDisplayPlaneCapabilitiesKHR.get_supportedAlpha(this.segment(), index); } + /// {@return `supportedAlpha`} + public @CType("VkDisplayPlaneAlphaFlagsKHR") int supportedAlpha() { return VkDisplayPlaneCapabilitiesKHR.get_supportedAlpha(this.segment()); } + /// Sets `supportedAlpha` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedAlpha(MemorySegment segment, long index, @CType("VkDisplayPlaneAlphaFlagsKHR") int value) { VH_supportedAlpha.set(segment, 0L, index, value); } + /// Sets `supportedAlpha` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedAlpha(MemorySegment segment, @CType("VkDisplayPlaneAlphaFlagsKHR") int value) { VkDisplayPlaneCapabilitiesKHR.set_supportedAlpha(segment, 0L, value); } + /// Sets `supportedAlpha` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR supportedAlphaAt(long index, @CType("VkDisplayPlaneAlphaFlagsKHR") int value) { VkDisplayPlaneCapabilitiesKHR.set_supportedAlpha(this.segment(), index, value); return this; } + /// Sets `supportedAlpha` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR supportedAlpha(@CType("VkDisplayPlaneAlphaFlagsKHR") int value) { VkDisplayPlaneCapabilitiesKHR.set_supportedAlpha(this.segment(), value); return this; } + + /// {@return `minSrcPosition` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_minSrcPosition(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minSrcPosition, index), ML_minSrcPosition); } + /// {@return `minSrcPosition`} + /// @param segment the segment of the struct + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_minSrcPosition(MemorySegment segment) { return VkDisplayPlaneCapabilitiesKHR.get_minSrcPosition(segment, 0L); } + /// {@return `minSrcPosition` at the given index} + /// @param index the index + public @CType("VkOffset2D") java.lang.foreign.MemorySegment minSrcPositionAt(long index) { return VkDisplayPlaneCapabilitiesKHR.get_minSrcPosition(this.segment(), index); } + /// {@return `minSrcPosition`} + public @CType("VkOffset2D") java.lang.foreign.MemorySegment minSrcPosition() { return VkDisplayPlaneCapabilitiesKHR.get_minSrcPosition(this.segment()); } + /// Sets `minSrcPosition` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minSrcPosition(MemorySegment segment, long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minSrcPosition, index), ML_minSrcPosition.byteSize()); } + /// Sets `minSrcPosition` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minSrcPosition(MemorySegment segment, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minSrcPosition(segment, 0L, value); } + /// Sets `minSrcPosition` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR minSrcPositionAt(long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minSrcPosition(this.segment(), index, value); return this; } + /// Sets `minSrcPosition` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR minSrcPosition(@CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minSrcPosition(this.segment(), value); return this; } + + /// {@return `maxSrcPosition` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_maxSrcPosition(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxSrcPosition, index), ML_maxSrcPosition); } + /// {@return `maxSrcPosition`} + /// @param segment the segment of the struct + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_maxSrcPosition(MemorySegment segment) { return VkDisplayPlaneCapabilitiesKHR.get_maxSrcPosition(segment, 0L); } + /// {@return `maxSrcPosition` at the given index} + /// @param index the index + public @CType("VkOffset2D") java.lang.foreign.MemorySegment maxSrcPositionAt(long index) { return VkDisplayPlaneCapabilitiesKHR.get_maxSrcPosition(this.segment(), index); } + /// {@return `maxSrcPosition`} + public @CType("VkOffset2D") java.lang.foreign.MemorySegment maxSrcPosition() { return VkDisplayPlaneCapabilitiesKHR.get_maxSrcPosition(this.segment()); } + /// Sets `maxSrcPosition` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSrcPosition(MemorySegment segment, long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxSrcPosition, index), ML_maxSrcPosition.byteSize()); } + /// Sets `maxSrcPosition` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSrcPosition(MemorySegment segment, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxSrcPosition(segment, 0L, value); } + /// Sets `maxSrcPosition` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR maxSrcPositionAt(long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxSrcPosition(this.segment(), index, value); return this; } + /// Sets `maxSrcPosition` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR maxSrcPosition(@CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxSrcPosition(this.segment(), value); return this; } + + /// {@return `minSrcExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minSrcExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minSrcExtent, index), ML_minSrcExtent); } + /// {@return `minSrcExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minSrcExtent(MemorySegment segment) { return VkDisplayPlaneCapabilitiesKHR.get_minSrcExtent(segment, 0L); } + /// {@return `minSrcExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minSrcExtentAt(long index) { return VkDisplayPlaneCapabilitiesKHR.get_minSrcExtent(this.segment(), index); } + /// {@return `minSrcExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minSrcExtent() { return VkDisplayPlaneCapabilitiesKHR.get_minSrcExtent(this.segment()); } + /// Sets `minSrcExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minSrcExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minSrcExtent, index), ML_minSrcExtent.byteSize()); } + /// Sets `minSrcExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minSrcExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minSrcExtent(segment, 0L, value); } + /// Sets `minSrcExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR minSrcExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minSrcExtent(this.segment(), index, value); return this; } + /// Sets `minSrcExtent` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR minSrcExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minSrcExtent(this.segment(), value); return this; } + + /// {@return `maxSrcExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxSrcExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxSrcExtent, index), ML_maxSrcExtent); } + /// {@return `maxSrcExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxSrcExtent(MemorySegment segment) { return VkDisplayPlaneCapabilitiesKHR.get_maxSrcExtent(segment, 0L); } + /// {@return `maxSrcExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxSrcExtentAt(long index) { return VkDisplayPlaneCapabilitiesKHR.get_maxSrcExtent(this.segment(), index); } + /// {@return `maxSrcExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxSrcExtent() { return VkDisplayPlaneCapabilitiesKHR.get_maxSrcExtent(this.segment()); } + /// Sets `maxSrcExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSrcExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxSrcExtent, index), ML_maxSrcExtent.byteSize()); } + /// Sets `maxSrcExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSrcExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxSrcExtent(segment, 0L, value); } + /// Sets `maxSrcExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR maxSrcExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxSrcExtent(this.segment(), index, value); return this; } + /// Sets `maxSrcExtent` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR maxSrcExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxSrcExtent(this.segment(), value); return this; } + + /// {@return `minDstPosition` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_minDstPosition(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minDstPosition, index), ML_minDstPosition); } + /// {@return `minDstPosition`} + /// @param segment the segment of the struct + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_minDstPosition(MemorySegment segment) { return VkDisplayPlaneCapabilitiesKHR.get_minDstPosition(segment, 0L); } + /// {@return `minDstPosition` at the given index} + /// @param index the index + public @CType("VkOffset2D") java.lang.foreign.MemorySegment minDstPositionAt(long index) { return VkDisplayPlaneCapabilitiesKHR.get_minDstPosition(this.segment(), index); } + /// {@return `minDstPosition`} + public @CType("VkOffset2D") java.lang.foreign.MemorySegment minDstPosition() { return VkDisplayPlaneCapabilitiesKHR.get_minDstPosition(this.segment()); } + /// Sets `minDstPosition` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minDstPosition(MemorySegment segment, long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minDstPosition, index), ML_minDstPosition.byteSize()); } + /// Sets `minDstPosition` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minDstPosition(MemorySegment segment, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minDstPosition(segment, 0L, value); } + /// Sets `minDstPosition` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR minDstPositionAt(long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minDstPosition(this.segment(), index, value); return this; } + /// Sets `minDstPosition` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR minDstPosition(@CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minDstPosition(this.segment(), value); return this; } + + /// {@return `maxDstPosition` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_maxDstPosition(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxDstPosition, index), ML_maxDstPosition); } + /// {@return `maxDstPosition`} + /// @param segment the segment of the struct + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_maxDstPosition(MemorySegment segment) { return VkDisplayPlaneCapabilitiesKHR.get_maxDstPosition(segment, 0L); } + /// {@return `maxDstPosition` at the given index} + /// @param index the index + public @CType("VkOffset2D") java.lang.foreign.MemorySegment maxDstPositionAt(long index) { return VkDisplayPlaneCapabilitiesKHR.get_maxDstPosition(this.segment(), index); } + /// {@return `maxDstPosition`} + public @CType("VkOffset2D") java.lang.foreign.MemorySegment maxDstPosition() { return VkDisplayPlaneCapabilitiesKHR.get_maxDstPosition(this.segment()); } + /// Sets `maxDstPosition` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDstPosition(MemorySegment segment, long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxDstPosition, index), ML_maxDstPosition.byteSize()); } + /// Sets `maxDstPosition` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDstPosition(MemorySegment segment, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxDstPosition(segment, 0L, value); } + /// Sets `maxDstPosition` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR maxDstPositionAt(long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxDstPosition(this.segment(), index, value); return this; } + /// Sets `maxDstPosition` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR maxDstPosition(@CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxDstPosition(this.segment(), value); return this; } + + /// {@return `minDstExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minDstExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minDstExtent, index), ML_minDstExtent); } + /// {@return `minDstExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minDstExtent(MemorySegment segment) { return VkDisplayPlaneCapabilitiesKHR.get_minDstExtent(segment, 0L); } + /// {@return `minDstExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minDstExtentAt(long index) { return VkDisplayPlaneCapabilitiesKHR.get_minDstExtent(this.segment(), index); } + /// {@return `minDstExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minDstExtent() { return VkDisplayPlaneCapabilitiesKHR.get_minDstExtent(this.segment()); } + /// Sets `minDstExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minDstExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minDstExtent, index), ML_minDstExtent.byteSize()); } + /// Sets `minDstExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minDstExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minDstExtent(segment, 0L, value); } + /// Sets `minDstExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR minDstExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minDstExtent(this.segment(), index, value); return this; } + /// Sets `minDstExtent` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR minDstExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_minDstExtent(this.segment(), value); return this; } + + /// {@return `maxDstExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxDstExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxDstExtent, index), ML_maxDstExtent); } + /// {@return `maxDstExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxDstExtent(MemorySegment segment) { return VkDisplayPlaneCapabilitiesKHR.get_maxDstExtent(segment, 0L); } + /// {@return `maxDstExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxDstExtentAt(long index) { return VkDisplayPlaneCapabilitiesKHR.get_maxDstExtent(this.segment(), index); } + /// {@return `maxDstExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxDstExtent() { return VkDisplayPlaneCapabilitiesKHR.get_maxDstExtent(this.segment()); } + /// Sets `maxDstExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDstExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxDstExtent, index), ML_maxDstExtent.byteSize()); } + /// Sets `maxDstExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDstExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxDstExtent(segment, 0L, value); } + /// Sets `maxDstExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR maxDstExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxDstExtent(this.segment(), index, value); return this; } + /// Sets `maxDstExtent` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneCapabilitiesKHR maxDstExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPlaneCapabilitiesKHR.set_maxDstExtent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneInfo2KHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneInfo2KHR.java new file mode 100644 index 00000000..8a5cc27c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneInfo2KHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(java.lang.foreign.MemorySegment)] +/// ### planeIndex +/// [VarHandle][#VH_planeIndex] - [Getter][#planeIndex()] - [Setter][#planeIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayPlaneInfo2KHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkDisplayModeKHR mode; +/// uint32_t planeIndex; +/// } VkDisplayPlaneInfo2KHR; +/// ``` +public final class VkDisplayPlaneInfo2KHR extends Struct { + /// The struct layout of `VkDisplayPlaneInfo2KHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("mode"), + ValueLayout.JAVA_INT.withName("planeIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + /// The [VarHandle] of `planeIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_planeIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("planeIndex")); + + /// Creates `VkDisplayPlaneInfo2KHR` with the given segment. + /// @param segment the memory segment + public VkDisplayPlaneInfo2KHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayPlaneInfo2KHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneInfo2KHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneInfo2KHR(segment); } + + /// Creates `VkDisplayPlaneInfo2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneInfo2KHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneInfo2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayPlaneInfo2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneInfo2KHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneInfo2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayPlaneInfo2KHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayPlaneInfo2KHR` + public static VkDisplayPlaneInfo2KHR alloc(SegmentAllocator allocator) { return new VkDisplayPlaneInfo2KHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayPlaneInfo2KHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayPlaneInfo2KHR` + public static VkDisplayPlaneInfo2KHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayPlaneInfo2KHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayPlaneInfo2KHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayPlaneInfo2KHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayPlaneInfo2KHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayPlaneInfo2KHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneInfo2KHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayPlaneInfo2KHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneInfo2KHR sType(@CType("VkStructureType") int value) { VkDisplayPlaneInfo2KHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayPlaneInfo2KHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayPlaneInfo2KHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayPlaneInfo2KHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayPlaneInfo2KHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneInfo2KHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayPlaneInfo2KHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneInfo2KHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayPlaneInfo2KHR.set_pNext(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment get_mode(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment get_mode(MemorySegment segment) { return VkDisplayPlaneInfo2KHR.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment modeAt(long index) { return VkDisplayPlaneInfo2KHR.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment mode() { return VkDisplayPlaneInfo2KHR.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlaneInfo2KHR.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneInfo2KHR modeAt(long index, @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlaneInfo2KHR.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneInfo2KHR mode(@CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlaneInfo2KHR.set_mode(this.segment(), value); return this; } + + /// {@return `planeIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_planeIndex(MemorySegment segment, long index) { return (int) VH_planeIndex.get(segment, 0L, index); } + /// {@return `planeIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_planeIndex(MemorySegment segment) { return VkDisplayPlaneInfo2KHR.get_planeIndex(segment, 0L); } + /// {@return `planeIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int planeIndexAt(long index) { return VkDisplayPlaneInfo2KHR.get_planeIndex(this.segment(), index); } + /// {@return `planeIndex`} + public @CType("uint32_t") int planeIndex() { return VkDisplayPlaneInfo2KHR.get_planeIndex(this.segment()); } + /// Sets `planeIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_planeIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_planeIndex.set(segment, 0L, index, value); } + /// Sets `planeIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_planeIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDisplayPlaneInfo2KHR.set_planeIndex(segment, 0L, value); } + /// Sets `planeIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneInfo2KHR planeIndexAt(long index, @CType("uint32_t") int value) { VkDisplayPlaneInfo2KHR.set_planeIndex(this.segment(), index, value); return this; } + /// Sets `planeIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneInfo2KHR planeIndex(@CType("uint32_t") int value) { VkDisplayPlaneInfo2KHR.set_planeIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneProperties2KHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneProperties2KHR.java new file mode 100644 index 00000000..6c6464da --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlaneProperties2KHR.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### displayPlaneProperties +/// [Byte offset][#OFFSET_displayPlaneProperties] - [Memory layout][#ML_displayPlaneProperties] - [Getter][#displayPlaneProperties()] - [Setter][#displayPlaneProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayPlaneProperties2KHR { +/// VkStructureType sType; +/// void * pNext; +/// VkDisplayPlanePropertiesKHR displayPlaneProperties; +/// } VkDisplayPlaneProperties2KHR; +/// ``` +public final class VkDisplayPlaneProperties2KHR extends Struct { + /// The struct layout of `VkDisplayPlaneProperties2KHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.khr.struct.VkDisplayPlanePropertiesKHR.LAYOUT.withName("displayPlaneProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `displayPlaneProperties`. + public static final long OFFSET_displayPlaneProperties = LAYOUT.byteOffset(PathElement.groupElement("displayPlaneProperties")); + /// The memory layout of `displayPlaneProperties`. + public static final MemoryLayout ML_displayPlaneProperties = LAYOUT.select(PathElement.groupElement("displayPlaneProperties")); + + /// Creates `VkDisplayPlaneProperties2KHR` with the given segment. + /// @param segment the memory segment + public VkDisplayPlaneProperties2KHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayPlaneProperties2KHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneProperties2KHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneProperties2KHR(segment); } + + /// Creates `VkDisplayPlaneProperties2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneProperties2KHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneProperties2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayPlaneProperties2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlaneProperties2KHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlaneProperties2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayPlaneProperties2KHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayPlaneProperties2KHR` + public static VkDisplayPlaneProperties2KHR alloc(SegmentAllocator allocator) { return new VkDisplayPlaneProperties2KHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayPlaneProperties2KHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayPlaneProperties2KHR` + public static VkDisplayPlaneProperties2KHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayPlaneProperties2KHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayPlaneProperties2KHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayPlaneProperties2KHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayPlaneProperties2KHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayPlaneProperties2KHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneProperties2KHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayPlaneProperties2KHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneProperties2KHR sType(@CType("VkStructureType") int value) { VkDisplayPlaneProperties2KHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayPlaneProperties2KHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayPlaneProperties2KHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayPlaneProperties2KHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayPlaneProperties2KHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneProperties2KHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayPlaneProperties2KHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneProperties2KHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayPlaneProperties2KHR.set_pNext(this.segment(), value); return this; } + + /// {@return `displayPlaneProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayPlanePropertiesKHR") java.lang.foreign.MemorySegment get_displayPlaneProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_displayPlaneProperties, index), ML_displayPlaneProperties); } + /// {@return `displayPlaneProperties`} + /// @param segment the segment of the struct + public static @CType("VkDisplayPlanePropertiesKHR") java.lang.foreign.MemorySegment get_displayPlaneProperties(MemorySegment segment) { return VkDisplayPlaneProperties2KHR.get_displayPlaneProperties(segment, 0L); } + /// {@return `displayPlaneProperties` at the given index} + /// @param index the index + public @CType("VkDisplayPlanePropertiesKHR") java.lang.foreign.MemorySegment displayPlanePropertiesAt(long index) { return VkDisplayPlaneProperties2KHR.get_displayPlaneProperties(this.segment(), index); } + /// {@return `displayPlaneProperties`} + public @CType("VkDisplayPlanePropertiesKHR") java.lang.foreign.MemorySegment displayPlaneProperties() { return VkDisplayPlaneProperties2KHR.get_displayPlaneProperties(this.segment()); } + /// Sets `displayPlaneProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayPlaneProperties(MemorySegment segment, long index, @CType("VkDisplayPlanePropertiesKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_displayPlaneProperties, index), ML_displayPlaneProperties.byteSize()); } + /// Sets `displayPlaneProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayPlaneProperties(MemorySegment segment, @CType("VkDisplayPlanePropertiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlaneProperties2KHR.set_displayPlaneProperties(segment, 0L, value); } + /// Sets `displayPlaneProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlaneProperties2KHR displayPlanePropertiesAt(long index, @CType("VkDisplayPlanePropertiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlaneProperties2KHR.set_displayPlaneProperties(this.segment(), index, value); return this; } + /// Sets `displayPlaneProperties` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlaneProperties2KHR displayPlaneProperties(@CType("VkDisplayPlanePropertiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlaneProperties2KHR.set_displayPlaneProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlanePropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlanePropertiesKHR.java new file mode 100644 index 00000000..c4bd0076 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPlanePropertiesKHR.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### currentDisplay +/// [VarHandle][#VH_currentDisplay] - [Getter][#currentDisplay()] - [Setter][#currentDisplay(java.lang.foreign.MemorySegment)] +/// ### currentStackIndex +/// [VarHandle][#VH_currentStackIndex] - [Getter][#currentStackIndex()] - [Setter][#currentStackIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayPlanePropertiesKHR { +/// VkDisplayKHR currentDisplay; +/// uint32_t currentStackIndex; +/// } VkDisplayPlanePropertiesKHR; +/// ``` +public final class VkDisplayPlanePropertiesKHR extends Struct { + /// The struct layout of `VkDisplayPlanePropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("currentDisplay"), + ValueLayout.JAVA_INT.withName("currentStackIndex") + ); + /// The [VarHandle] of `currentDisplay` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_currentDisplay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("currentDisplay")); + /// The [VarHandle] of `currentStackIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_currentStackIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("currentStackIndex")); + + /// Creates `VkDisplayPlanePropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkDisplayPlanePropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayPlanePropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlanePropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlanePropertiesKHR(segment); } + + /// Creates `VkDisplayPlanePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlanePropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlanePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayPlanePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPlanePropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPlanePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayPlanePropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayPlanePropertiesKHR` + public static VkDisplayPlanePropertiesKHR alloc(SegmentAllocator allocator) { return new VkDisplayPlanePropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayPlanePropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayPlanePropertiesKHR` + public static VkDisplayPlanePropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayPlanePropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `currentDisplay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayKHR") java.lang.foreign.MemorySegment get_currentDisplay(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_currentDisplay.get(segment, 0L, index); } + /// {@return `currentDisplay`} + /// @param segment the segment of the struct + public static @CType("VkDisplayKHR") java.lang.foreign.MemorySegment get_currentDisplay(MemorySegment segment) { return VkDisplayPlanePropertiesKHR.get_currentDisplay(segment, 0L); } + /// {@return `currentDisplay` at the given index} + /// @param index the index + public @CType("VkDisplayKHR") java.lang.foreign.MemorySegment currentDisplayAt(long index) { return VkDisplayPlanePropertiesKHR.get_currentDisplay(this.segment(), index); } + /// {@return `currentDisplay`} + public @CType("VkDisplayKHR") java.lang.foreign.MemorySegment currentDisplay() { return VkDisplayPlanePropertiesKHR.get_currentDisplay(this.segment()); } + /// Sets `currentDisplay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_currentDisplay(MemorySegment segment, long index, @CType("VkDisplayKHR") java.lang.foreign.MemorySegment value) { VH_currentDisplay.set(segment, 0L, index, value); } + /// Sets `currentDisplay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_currentDisplay(MemorySegment segment, @CType("VkDisplayKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlanePropertiesKHR.set_currentDisplay(segment, 0L, value); } + /// Sets `currentDisplay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlanePropertiesKHR currentDisplayAt(long index, @CType("VkDisplayKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlanePropertiesKHR.set_currentDisplay(this.segment(), index, value); return this; } + /// Sets `currentDisplay` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlanePropertiesKHR currentDisplay(@CType("VkDisplayKHR") java.lang.foreign.MemorySegment value) { VkDisplayPlanePropertiesKHR.set_currentDisplay(this.segment(), value); return this; } + + /// {@return `currentStackIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_currentStackIndex(MemorySegment segment, long index) { return (int) VH_currentStackIndex.get(segment, 0L, index); } + /// {@return `currentStackIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_currentStackIndex(MemorySegment segment) { return VkDisplayPlanePropertiesKHR.get_currentStackIndex(segment, 0L); } + /// {@return `currentStackIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int currentStackIndexAt(long index) { return VkDisplayPlanePropertiesKHR.get_currentStackIndex(this.segment(), index); } + /// {@return `currentStackIndex`} + public @CType("uint32_t") int currentStackIndex() { return VkDisplayPlanePropertiesKHR.get_currentStackIndex(this.segment()); } + /// Sets `currentStackIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_currentStackIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_currentStackIndex.set(segment, 0L, index, value); } + /// Sets `currentStackIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_currentStackIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDisplayPlanePropertiesKHR.set_currentStackIndex(segment, 0L, value); } + /// Sets `currentStackIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPlanePropertiesKHR currentStackIndexAt(long index, @CType("uint32_t") int value) { VkDisplayPlanePropertiesKHR.set_currentStackIndex(this.segment(), index, value); return this; } + /// Sets `currentStackIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPlanePropertiesKHR currentStackIndex(@CType("uint32_t") int value) { VkDisplayPlanePropertiesKHR.set_currentStackIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPresentInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPresentInfoKHR.java new file mode 100644 index 00000000..c39246b3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPresentInfoKHR.java @@ -0,0 +1,263 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcRect +/// [Byte offset][#OFFSET_srcRect] - [Memory layout][#ML_srcRect] - [Getter][#srcRect()] - [Setter][#srcRect(java.lang.foreign.MemorySegment)] +/// ### dstRect +/// [Byte offset][#OFFSET_dstRect] - [Memory layout][#ML_dstRect] - [Getter][#dstRect()] - [Setter][#dstRect(java.lang.foreign.MemorySegment)] +/// ### persistent +/// [VarHandle][#VH_persistent] - [Getter][#persistent()] - [Setter][#persistent(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayPresentInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkRect2D srcRect; +/// VkRect2D dstRect; +/// VkBool32 persistent; +/// } VkDisplayPresentInfoKHR; +/// ``` +public final class VkDisplayPresentInfoKHR extends Struct { + /// The struct layout of `VkDisplayPresentInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkRect2D.LAYOUT.withName("srcRect"), + overrungl.vulkan.struct.VkRect2D.LAYOUT.withName("dstRect"), + ValueLayout.JAVA_INT.withName("persistent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `srcRect`. + public static final long OFFSET_srcRect = LAYOUT.byteOffset(PathElement.groupElement("srcRect")); + /// The memory layout of `srcRect`. + public static final MemoryLayout ML_srcRect = LAYOUT.select(PathElement.groupElement("srcRect")); + /// The byte offset of `dstRect`. + public static final long OFFSET_dstRect = LAYOUT.byteOffset(PathElement.groupElement("dstRect")); + /// The memory layout of `dstRect`. + public static final MemoryLayout ML_dstRect = LAYOUT.select(PathElement.groupElement("dstRect")); + /// The [VarHandle] of `persistent` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_persistent = LAYOUT.arrayElementVarHandle(PathElement.groupElement("persistent")); + + /// Creates `VkDisplayPresentInfoKHR` with the given segment. + /// @param segment the memory segment + public VkDisplayPresentInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayPresentInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPresentInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPresentInfoKHR(segment); } + + /// Creates `VkDisplayPresentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPresentInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPresentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayPresentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPresentInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPresentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayPresentInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayPresentInfoKHR` + public static VkDisplayPresentInfoKHR alloc(SegmentAllocator allocator) { return new VkDisplayPresentInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayPresentInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayPresentInfoKHR` + public static VkDisplayPresentInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayPresentInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayPresentInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayPresentInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayPresentInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayPresentInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPresentInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayPresentInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPresentInfoKHR sType(@CType("VkStructureType") int value) { VkDisplayPresentInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayPresentInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayPresentInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayPresentInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayPresentInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPresentInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayPresentInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPresentInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayPresentInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `srcRect` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_srcRect(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcRect, index), ML_srcRect); } + /// {@return `srcRect`} + /// @param segment the segment of the struct + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_srcRect(MemorySegment segment) { return VkDisplayPresentInfoKHR.get_srcRect(segment, 0L); } + /// {@return `srcRect` at the given index} + /// @param index the index + public @CType("VkRect2D") java.lang.foreign.MemorySegment srcRectAt(long index) { return VkDisplayPresentInfoKHR.get_srcRect(this.segment(), index); } + /// {@return `srcRect`} + public @CType("VkRect2D") java.lang.foreign.MemorySegment srcRect() { return VkDisplayPresentInfoKHR.get_srcRect(this.segment()); } + /// Sets `srcRect` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcRect(MemorySegment segment, long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcRect, index), ML_srcRect.byteSize()); } + /// Sets `srcRect` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcRect(MemorySegment segment, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkDisplayPresentInfoKHR.set_srcRect(segment, 0L, value); } + /// Sets `srcRect` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPresentInfoKHR srcRectAt(long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkDisplayPresentInfoKHR.set_srcRect(this.segment(), index, value); return this; } + /// Sets `srcRect` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPresentInfoKHR srcRect(@CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkDisplayPresentInfoKHR.set_srcRect(this.segment(), value); return this; } + + /// {@return `dstRect` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_dstRect(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstRect, index), ML_dstRect); } + /// {@return `dstRect`} + /// @param segment the segment of the struct + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_dstRect(MemorySegment segment) { return VkDisplayPresentInfoKHR.get_dstRect(segment, 0L); } + /// {@return `dstRect` at the given index} + /// @param index the index + public @CType("VkRect2D") java.lang.foreign.MemorySegment dstRectAt(long index) { return VkDisplayPresentInfoKHR.get_dstRect(this.segment(), index); } + /// {@return `dstRect`} + public @CType("VkRect2D") java.lang.foreign.MemorySegment dstRect() { return VkDisplayPresentInfoKHR.get_dstRect(this.segment()); } + /// Sets `dstRect` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstRect(MemorySegment segment, long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstRect, index), ML_dstRect.byteSize()); } + /// Sets `dstRect` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstRect(MemorySegment segment, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkDisplayPresentInfoKHR.set_dstRect(segment, 0L, value); } + /// Sets `dstRect` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPresentInfoKHR dstRectAt(long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkDisplayPresentInfoKHR.set_dstRect(this.segment(), index, value); return this; } + /// Sets `dstRect` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPresentInfoKHR dstRect(@CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkDisplayPresentInfoKHR.set_dstRect(this.segment(), value); return this; } + + /// {@return `persistent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_persistent(MemorySegment segment, long index) { return (int) VH_persistent.get(segment, 0L, index); } + /// {@return `persistent`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_persistent(MemorySegment segment) { return VkDisplayPresentInfoKHR.get_persistent(segment, 0L); } + /// {@return `persistent` at the given index} + /// @param index the index + public @CType("VkBool32") int persistentAt(long index) { return VkDisplayPresentInfoKHR.get_persistent(this.segment(), index); } + /// {@return `persistent`} + public @CType("VkBool32") int persistent() { return VkDisplayPresentInfoKHR.get_persistent(this.segment()); } + /// Sets `persistent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_persistent(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_persistent.set(segment, 0L, index, value); } + /// Sets `persistent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_persistent(MemorySegment segment, @CType("VkBool32") int value) { VkDisplayPresentInfoKHR.set_persistent(segment, 0L, value); } + /// Sets `persistent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPresentInfoKHR persistentAt(long index, @CType("VkBool32") int value) { VkDisplayPresentInfoKHR.set_persistent(this.segment(), index, value); return this; } + /// Sets `persistent` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPresentInfoKHR persistent(@CType("VkBool32") int value) { VkDisplayPresentInfoKHR.set_persistent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayProperties2KHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayProperties2KHR.java new file mode 100644 index 00000000..e9745967 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayProperties2KHR.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### displayProperties +/// [Byte offset][#OFFSET_displayProperties] - [Memory layout][#ML_displayProperties] - [Getter][#displayProperties()] - [Setter][#displayProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayProperties2KHR { +/// VkStructureType sType; +/// void * pNext; +/// VkDisplayPropertiesKHR displayProperties; +/// } VkDisplayProperties2KHR; +/// ``` +public final class VkDisplayProperties2KHR extends Struct { + /// The struct layout of `VkDisplayProperties2KHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.khr.struct.VkDisplayPropertiesKHR.LAYOUT.withName("displayProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `displayProperties`. + public static final long OFFSET_displayProperties = LAYOUT.byteOffset(PathElement.groupElement("displayProperties")); + /// The memory layout of `displayProperties`. + public static final MemoryLayout ML_displayProperties = LAYOUT.select(PathElement.groupElement("displayProperties")); + + /// Creates `VkDisplayProperties2KHR` with the given segment. + /// @param segment the memory segment + public VkDisplayProperties2KHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayProperties2KHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayProperties2KHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayProperties2KHR(segment); } + + /// Creates `VkDisplayProperties2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayProperties2KHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayProperties2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayProperties2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayProperties2KHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayProperties2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayProperties2KHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayProperties2KHR` + public static VkDisplayProperties2KHR alloc(SegmentAllocator allocator) { return new VkDisplayProperties2KHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayProperties2KHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayProperties2KHR` + public static VkDisplayProperties2KHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayProperties2KHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayProperties2KHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayProperties2KHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayProperties2KHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayProperties2KHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayProperties2KHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayProperties2KHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayProperties2KHR sType(@CType("VkStructureType") int value) { VkDisplayProperties2KHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayProperties2KHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayProperties2KHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayProperties2KHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayProperties2KHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayProperties2KHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayProperties2KHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayProperties2KHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDisplayProperties2KHR.set_pNext(this.segment(), value); return this; } + + /// {@return `displayProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayPropertiesKHR") java.lang.foreign.MemorySegment get_displayProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_displayProperties, index), ML_displayProperties); } + /// {@return `displayProperties`} + /// @param segment the segment of the struct + public static @CType("VkDisplayPropertiesKHR") java.lang.foreign.MemorySegment get_displayProperties(MemorySegment segment) { return VkDisplayProperties2KHR.get_displayProperties(segment, 0L); } + /// {@return `displayProperties` at the given index} + /// @param index the index + public @CType("VkDisplayPropertiesKHR") java.lang.foreign.MemorySegment displayPropertiesAt(long index) { return VkDisplayProperties2KHR.get_displayProperties(this.segment(), index); } + /// {@return `displayProperties`} + public @CType("VkDisplayPropertiesKHR") java.lang.foreign.MemorySegment displayProperties() { return VkDisplayProperties2KHR.get_displayProperties(this.segment()); } + /// Sets `displayProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayProperties(MemorySegment segment, long index, @CType("VkDisplayPropertiesKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_displayProperties, index), ML_displayProperties.byteSize()); } + /// Sets `displayProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayProperties(MemorySegment segment, @CType("VkDisplayPropertiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayProperties2KHR.set_displayProperties(segment, 0L, value); } + /// Sets `displayProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayProperties2KHR displayPropertiesAt(long index, @CType("VkDisplayPropertiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayProperties2KHR.set_displayProperties(this.segment(), index, value); return this; } + /// Sets `displayProperties` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayProperties2KHR displayProperties(@CType("VkDisplayPropertiesKHR") java.lang.foreign.MemorySegment value) { VkDisplayProperties2KHR.set_displayProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPropertiesKHR.java new file mode 100644 index 00000000..89fa7a2a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplayPropertiesKHR.java @@ -0,0 +1,337 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### display +/// [VarHandle][#VH_display] - [Getter][#display()] - [Setter][#display(java.lang.foreign.MemorySegment)] +/// ### displayName +/// [VarHandle][#VH_displayName] - [Getter][#displayName()] - [Setter][#displayName(java.lang.foreign.MemorySegment)] +/// ### physicalDimensions +/// [Byte offset][#OFFSET_physicalDimensions] - [Memory layout][#ML_physicalDimensions] - [Getter][#physicalDimensions()] - [Setter][#physicalDimensions(java.lang.foreign.MemorySegment)] +/// ### physicalResolution +/// [Byte offset][#OFFSET_physicalResolution] - [Memory layout][#ML_physicalResolution] - [Getter][#physicalResolution()] - [Setter][#physicalResolution(java.lang.foreign.MemorySegment)] +/// ### supportedTransforms +/// [VarHandle][#VH_supportedTransforms] - [Getter][#supportedTransforms()] - [Setter][#supportedTransforms(int)] +/// ### planeReorderPossible +/// [VarHandle][#VH_planeReorderPossible] - [Getter][#planeReorderPossible()] - [Setter][#planeReorderPossible(int)] +/// ### persistentContent +/// [VarHandle][#VH_persistentContent] - [Getter][#persistentContent()] - [Setter][#persistentContent(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayPropertiesKHR { +/// VkDisplayKHR display; +/// const char * displayName; +/// VkExtent2D physicalDimensions; +/// VkExtent2D physicalResolution; +/// VkSurfaceTransformFlagsKHR supportedTransforms; +/// VkBool32 planeReorderPossible; +/// VkBool32 persistentContent; +/// } VkDisplayPropertiesKHR; +/// ``` +public final class VkDisplayPropertiesKHR extends Struct { + /// The struct layout of `VkDisplayPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("display"), + ValueLayout.ADDRESS.withName("displayName"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("physicalDimensions"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("physicalResolution"), + ValueLayout.JAVA_INT.withName("supportedTransforms"), + ValueLayout.JAVA_INT.withName("planeReorderPossible"), + ValueLayout.JAVA_INT.withName("persistentContent") + ); + /// The [VarHandle] of `display` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_display = LAYOUT.arrayElementVarHandle(PathElement.groupElement("display")); + /// The [VarHandle] of `displayName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_displayName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displayName")); + /// The byte offset of `physicalDimensions`. + public static final long OFFSET_physicalDimensions = LAYOUT.byteOffset(PathElement.groupElement("physicalDimensions")); + /// The memory layout of `physicalDimensions`. + public static final MemoryLayout ML_physicalDimensions = LAYOUT.select(PathElement.groupElement("physicalDimensions")); + /// The byte offset of `physicalResolution`. + public static final long OFFSET_physicalResolution = LAYOUT.byteOffset(PathElement.groupElement("physicalResolution")); + /// The memory layout of `physicalResolution`. + public static final MemoryLayout ML_physicalResolution = LAYOUT.select(PathElement.groupElement("physicalResolution")); + /// The [VarHandle] of `supportedTransforms` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedTransforms = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedTransforms")); + /// The [VarHandle] of `planeReorderPossible` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_planeReorderPossible = LAYOUT.arrayElementVarHandle(PathElement.groupElement("planeReorderPossible")); + /// The [VarHandle] of `persistentContent` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_persistentContent = LAYOUT.arrayElementVarHandle(PathElement.groupElement("persistentContent")); + + /// Creates `VkDisplayPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkDisplayPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPropertiesKHR(segment); } + + /// Creates `VkDisplayPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayPropertiesKHR` + public static VkDisplayPropertiesKHR alloc(SegmentAllocator allocator) { return new VkDisplayPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayPropertiesKHR` + public static VkDisplayPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkDisplayPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `display` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayKHR") java.lang.foreign.MemorySegment get_display(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_display.get(segment, 0L, index); } + /// {@return `display`} + /// @param segment the segment of the struct + public static @CType("VkDisplayKHR") java.lang.foreign.MemorySegment get_display(MemorySegment segment) { return VkDisplayPropertiesKHR.get_display(segment, 0L); } + /// {@return `display` at the given index} + /// @param index the index + public @CType("VkDisplayKHR") java.lang.foreign.MemorySegment displayAt(long index) { return VkDisplayPropertiesKHR.get_display(this.segment(), index); } + /// {@return `display`} + public @CType("VkDisplayKHR") java.lang.foreign.MemorySegment display() { return VkDisplayPropertiesKHR.get_display(this.segment()); } + /// Sets `display` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_display(MemorySegment segment, long index, @CType("VkDisplayKHR") java.lang.foreign.MemorySegment value) { VH_display.set(segment, 0L, index, value); } + /// Sets `display` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_display(MemorySegment segment, @CType("VkDisplayKHR") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_display(segment, 0L, value); } + /// Sets `display` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR displayAt(long index, @CType("VkDisplayKHR") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_display(this.segment(), index, value); return this; } + /// Sets `display` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR display(@CType("VkDisplayKHR") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_display(this.segment(), value); return this; } + + /// {@return `displayName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_displayName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_displayName.get(segment, 0L, index); } + /// {@return `displayName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_displayName(MemorySegment segment) { return VkDisplayPropertiesKHR.get_displayName(segment, 0L); } + /// {@return `displayName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment displayNameAt(long index) { return VkDisplayPropertiesKHR.get_displayName(this.segment(), index); } + /// {@return `displayName`} + public @CType("const char *") java.lang.foreign.MemorySegment displayName() { return VkDisplayPropertiesKHR.get_displayName(this.segment()); } + /// Sets `displayName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_displayName.set(segment, 0L, index, value); } + /// Sets `displayName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_displayName(segment, 0L, value); } + /// Sets `displayName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR displayNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_displayName(this.segment(), index, value); return this; } + /// Sets `displayName` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR displayName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_displayName(this.segment(), value); return this; } + + /// {@return `physicalDimensions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_physicalDimensions(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_physicalDimensions, index), ML_physicalDimensions); } + /// {@return `physicalDimensions`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_physicalDimensions(MemorySegment segment) { return VkDisplayPropertiesKHR.get_physicalDimensions(segment, 0L); } + /// {@return `physicalDimensions` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment physicalDimensionsAt(long index) { return VkDisplayPropertiesKHR.get_physicalDimensions(this.segment(), index); } + /// {@return `physicalDimensions`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment physicalDimensions() { return VkDisplayPropertiesKHR.get_physicalDimensions(this.segment()); } + /// Sets `physicalDimensions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_physicalDimensions(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_physicalDimensions, index), ML_physicalDimensions.byteSize()); } + /// Sets `physicalDimensions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_physicalDimensions(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_physicalDimensions(segment, 0L, value); } + /// Sets `physicalDimensions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR physicalDimensionsAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_physicalDimensions(this.segment(), index, value); return this; } + /// Sets `physicalDimensions` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR physicalDimensions(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_physicalDimensions(this.segment(), value); return this; } + + /// {@return `physicalResolution` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_physicalResolution(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_physicalResolution, index), ML_physicalResolution); } + /// {@return `physicalResolution`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_physicalResolution(MemorySegment segment) { return VkDisplayPropertiesKHR.get_physicalResolution(segment, 0L); } + /// {@return `physicalResolution` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment physicalResolutionAt(long index) { return VkDisplayPropertiesKHR.get_physicalResolution(this.segment(), index); } + /// {@return `physicalResolution`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment physicalResolution() { return VkDisplayPropertiesKHR.get_physicalResolution(this.segment()); } + /// Sets `physicalResolution` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_physicalResolution(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_physicalResolution, index), ML_physicalResolution.byteSize()); } + /// Sets `physicalResolution` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_physicalResolution(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_physicalResolution(segment, 0L, value); } + /// Sets `physicalResolution` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR physicalResolutionAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_physicalResolution(this.segment(), index, value); return this; } + /// Sets `physicalResolution` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR physicalResolution(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplayPropertiesKHR.set_physicalResolution(this.segment(), value); return this; } + + /// {@return `supportedTransforms` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceTransformFlagsKHR") int get_supportedTransforms(MemorySegment segment, long index) { return (int) VH_supportedTransforms.get(segment, 0L, index); } + /// {@return `supportedTransforms`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceTransformFlagsKHR") int get_supportedTransforms(MemorySegment segment) { return VkDisplayPropertiesKHR.get_supportedTransforms(segment, 0L); } + /// {@return `supportedTransforms` at the given index} + /// @param index the index + public @CType("VkSurfaceTransformFlagsKHR") int supportedTransformsAt(long index) { return VkDisplayPropertiesKHR.get_supportedTransforms(this.segment(), index); } + /// {@return `supportedTransforms`} + public @CType("VkSurfaceTransformFlagsKHR") int supportedTransforms() { return VkDisplayPropertiesKHR.get_supportedTransforms(this.segment()); } + /// Sets `supportedTransforms` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedTransforms(MemorySegment segment, long index, @CType("VkSurfaceTransformFlagsKHR") int value) { VH_supportedTransforms.set(segment, 0L, index, value); } + /// Sets `supportedTransforms` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedTransforms(MemorySegment segment, @CType("VkSurfaceTransformFlagsKHR") int value) { VkDisplayPropertiesKHR.set_supportedTransforms(segment, 0L, value); } + /// Sets `supportedTransforms` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR supportedTransformsAt(long index, @CType("VkSurfaceTransformFlagsKHR") int value) { VkDisplayPropertiesKHR.set_supportedTransforms(this.segment(), index, value); return this; } + /// Sets `supportedTransforms` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR supportedTransforms(@CType("VkSurfaceTransformFlagsKHR") int value) { VkDisplayPropertiesKHR.set_supportedTransforms(this.segment(), value); return this; } + + /// {@return `planeReorderPossible` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_planeReorderPossible(MemorySegment segment, long index) { return (int) VH_planeReorderPossible.get(segment, 0L, index); } + /// {@return `planeReorderPossible`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_planeReorderPossible(MemorySegment segment) { return VkDisplayPropertiesKHR.get_planeReorderPossible(segment, 0L); } + /// {@return `planeReorderPossible` at the given index} + /// @param index the index + public @CType("VkBool32") int planeReorderPossibleAt(long index) { return VkDisplayPropertiesKHR.get_planeReorderPossible(this.segment(), index); } + /// {@return `planeReorderPossible`} + public @CType("VkBool32") int planeReorderPossible() { return VkDisplayPropertiesKHR.get_planeReorderPossible(this.segment()); } + /// Sets `planeReorderPossible` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_planeReorderPossible(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_planeReorderPossible.set(segment, 0L, index, value); } + /// Sets `planeReorderPossible` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_planeReorderPossible(MemorySegment segment, @CType("VkBool32") int value) { VkDisplayPropertiesKHR.set_planeReorderPossible(segment, 0L, value); } + /// Sets `planeReorderPossible` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR planeReorderPossibleAt(long index, @CType("VkBool32") int value) { VkDisplayPropertiesKHR.set_planeReorderPossible(this.segment(), index, value); return this; } + /// Sets `planeReorderPossible` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR planeReorderPossible(@CType("VkBool32") int value) { VkDisplayPropertiesKHR.set_planeReorderPossible(this.segment(), value); return this; } + + /// {@return `persistentContent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_persistentContent(MemorySegment segment, long index) { return (int) VH_persistentContent.get(segment, 0L, index); } + /// {@return `persistentContent`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_persistentContent(MemorySegment segment) { return VkDisplayPropertiesKHR.get_persistentContent(segment, 0L); } + /// {@return `persistentContent` at the given index} + /// @param index the index + public @CType("VkBool32") int persistentContentAt(long index) { return VkDisplayPropertiesKHR.get_persistentContent(this.segment(), index); } + /// {@return `persistentContent`} + public @CType("VkBool32") int persistentContent() { return VkDisplayPropertiesKHR.get_persistentContent(this.segment()); } + /// Sets `persistentContent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_persistentContent(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_persistentContent.set(segment, 0L, index, value); } + /// Sets `persistentContent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_persistentContent(MemorySegment segment, @CType("VkBool32") int value) { VkDisplayPropertiesKHR.set_persistentContent(segment, 0L, value); } + /// Sets `persistentContent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR persistentContentAt(long index, @CType("VkBool32") int value) { VkDisplayPropertiesKHR.set_persistentContent(this.segment(), index, value); return this; } + /// Sets `persistentContent` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayPropertiesKHR persistentContent(@CType("VkBool32") int value) { VkDisplayPropertiesKHR.set_persistentContent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplaySurfaceCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplaySurfaceCreateInfoKHR.java new file mode 100644 index 00000000..61714d1a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkDisplaySurfaceCreateInfoKHR.java @@ -0,0 +1,446 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### displayMode +/// [VarHandle][#VH_displayMode] - [Getter][#displayMode()] - [Setter][#displayMode(java.lang.foreign.MemorySegment)] +/// ### planeIndex +/// [VarHandle][#VH_planeIndex] - [Getter][#planeIndex()] - [Setter][#planeIndex(int)] +/// ### planeStackIndex +/// [VarHandle][#VH_planeStackIndex] - [Getter][#planeStackIndex()] - [Setter][#planeStackIndex(int)] +/// ### transform +/// [VarHandle][#VH_transform] - [Getter][#transform()] - [Setter][#transform(int)] +/// ### globalAlpha +/// [VarHandle][#VH_globalAlpha] - [Getter][#globalAlpha()] - [Setter][#globalAlpha(float)] +/// ### alphaMode +/// [VarHandle][#VH_alphaMode] - [Getter][#alphaMode()] - [Setter][#alphaMode(int)] +/// ### imageExtent +/// [Byte offset][#OFFSET_imageExtent] - [Memory layout][#ML_imageExtent] - [Getter][#imageExtent()] - [Setter][#imageExtent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplaySurfaceCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkDisplaySurfaceCreateFlagsKHR flags; +/// VkDisplayModeKHR displayMode; +/// uint32_t planeIndex; +/// uint32_t planeStackIndex; +/// VkSurfaceTransformFlagBitsKHR transform; +/// float globalAlpha; +/// VkDisplayPlaneAlphaFlagBitsKHR alphaMode; +/// VkExtent2D imageExtent; +/// } VkDisplaySurfaceCreateInfoKHR; +/// ``` +public final class VkDisplaySurfaceCreateInfoKHR extends Struct { + /// The struct layout of `VkDisplaySurfaceCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("displayMode"), + ValueLayout.JAVA_INT.withName("planeIndex"), + ValueLayout.JAVA_INT.withName("planeStackIndex"), + ValueLayout.JAVA_INT.withName("transform"), + ValueLayout.JAVA_FLOAT.withName("globalAlpha"), + ValueLayout.JAVA_INT.withName("alphaMode"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("imageExtent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `displayMode` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_displayMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displayMode")); + /// The [VarHandle] of `planeIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_planeIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("planeIndex")); + /// The [VarHandle] of `planeStackIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_planeStackIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("planeStackIndex")); + /// The [VarHandle] of `transform` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transform = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transform")); + /// The [VarHandle] of `globalAlpha` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_globalAlpha = LAYOUT.arrayElementVarHandle(PathElement.groupElement("globalAlpha")); + /// The [VarHandle] of `alphaMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_alphaMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("alphaMode")); + /// The byte offset of `imageExtent`. + public static final long OFFSET_imageExtent = LAYOUT.byteOffset(PathElement.groupElement("imageExtent")); + /// The memory layout of `imageExtent`. + public static final MemoryLayout ML_imageExtent = LAYOUT.select(PathElement.groupElement("imageExtent")); + + /// Creates `VkDisplaySurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkDisplaySurfaceCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplaySurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplaySurfaceCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplaySurfaceCreateInfoKHR(segment); } + + /// Creates `VkDisplaySurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplaySurfaceCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplaySurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplaySurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplaySurfaceCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplaySurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplaySurfaceCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplaySurfaceCreateInfoKHR` + public static VkDisplaySurfaceCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkDisplaySurfaceCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplaySurfaceCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplaySurfaceCreateInfoKHR` + public static VkDisplaySurfaceCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkDisplaySurfaceCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplaySurfaceCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplaySurfaceCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplaySurfaceCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplaySurfaceCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplaySurfaceCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR sType(@CType("VkStructureType") int value) { VkDisplaySurfaceCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplaySurfaceCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplaySurfaceCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDisplaySurfaceCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplaySurfaceCreateFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDisplaySurfaceCreateFlagsKHR") int get_flags(MemorySegment segment) { return VkDisplaySurfaceCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDisplaySurfaceCreateFlagsKHR") int flagsAt(long index) { return VkDisplaySurfaceCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDisplaySurfaceCreateFlagsKHR") int flags() { return VkDisplaySurfaceCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDisplaySurfaceCreateFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDisplaySurfaceCreateFlagsKHR") int value) { VkDisplaySurfaceCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR flagsAt(long index, @CType("VkDisplaySurfaceCreateFlagsKHR") int value) { VkDisplaySurfaceCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR flags(@CType("VkDisplaySurfaceCreateFlagsKHR") int value) { VkDisplaySurfaceCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `displayMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment get_displayMode(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_displayMode.get(segment, 0L, index); } + /// {@return `displayMode`} + /// @param segment the segment of the struct + public static @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment get_displayMode(MemorySegment segment) { return VkDisplaySurfaceCreateInfoKHR.get_displayMode(segment, 0L); } + /// {@return `displayMode` at the given index} + /// @param index the index + public @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment displayModeAt(long index) { return VkDisplaySurfaceCreateInfoKHR.get_displayMode(this.segment(), index); } + /// {@return `displayMode`} + public @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment displayMode() { return VkDisplaySurfaceCreateInfoKHR.get_displayMode(this.segment()); } + /// Sets `displayMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayMode(MemorySegment segment, long index, @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VH_displayMode.set(segment, 0L, index, value); } + /// Sets `displayMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayMode(MemorySegment segment, @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceCreateInfoKHR.set_displayMode(segment, 0L, value); } + /// Sets `displayMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR displayModeAt(long index, @CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceCreateInfoKHR.set_displayMode(this.segment(), index, value); return this; } + /// Sets `displayMode` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR displayMode(@CType("VkDisplayModeKHR") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceCreateInfoKHR.set_displayMode(this.segment(), value); return this; } + + /// {@return `planeIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_planeIndex(MemorySegment segment, long index) { return (int) VH_planeIndex.get(segment, 0L, index); } + /// {@return `planeIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_planeIndex(MemorySegment segment) { return VkDisplaySurfaceCreateInfoKHR.get_planeIndex(segment, 0L); } + /// {@return `planeIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int planeIndexAt(long index) { return VkDisplaySurfaceCreateInfoKHR.get_planeIndex(this.segment(), index); } + /// {@return `planeIndex`} + public @CType("uint32_t") int planeIndex() { return VkDisplaySurfaceCreateInfoKHR.get_planeIndex(this.segment()); } + /// Sets `planeIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_planeIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_planeIndex.set(segment, 0L, index, value); } + /// Sets `planeIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_planeIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDisplaySurfaceCreateInfoKHR.set_planeIndex(segment, 0L, value); } + /// Sets `planeIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR planeIndexAt(long index, @CType("uint32_t") int value) { VkDisplaySurfaceCreateInfoKHR.set_planeIndex(this.segment(), index, value); return this; } + /// Sets `planeIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR planeIndex(@CType("uint32_t") int value) { VkDisplaySurfaceCreateInfoKHR.set_planeIndex(this.segment(), value); return this; } + + /// {@return `planeStackIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_planeStackIndex(MemorySegment segment, long index) { return (int) VH_planeStackIndex.get(segment, 0L, index); } + /// {@return `planeStackIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_planeStackIndex(MemorySegment segment) { return VkDisplaySurfaceCreateInfoKHR.get_planeStackIndex(segment, 0L); } + /// {@return `planeStackIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int planeStackIndexAt(long index) { return VkDisplaySurfaceCreateInfoKHR.get_planeStackIndex(this.segment(), index); } + /// {@return `planeStackIndex`} + public @CType("uint32_t") int planeStackIndex() { return VkDisplaySurfaceCreateInfoKHR.get_planeStackIndex(this.segment()); } + /// Sets `planeStackIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_planeStackIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_planeStackIndex.set(segment, 0L, index, value); } + /// Sets `planeStackIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_planeStackIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDisplaySurfaceCreateInfoKHR.set_planeStackIndex(segment, 0L, value); } + /// Sets `planeStackIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR planeStackIndexAt(long index, @CType("uint32_t") int value) { VkDisplaySurfaceCreateInfoKHR.set_planeStackIndex(this.segment(), index, value); return this; } + /// Sets `planeStackIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR planeStackIndex(@CType("uint32_t") int value) { VkDisplaySurfaceCreateInfoKHR.set_planeStackIndex(this.segment(), value); return this; } + + /// {@return `transform` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_transform(MemorySegment segment, long index) { return (int) VH_transform.get(segment, 0L, index); } + /// {@return `transform`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_transform(MemorySegment segment) { return VkDisplaySurfaceCreateInfoKHR.get_transform(segment, 0L); } + /// {@return `transform` at the given index} + /// @param index the index + public @CType("VkSurfaceTransformFlagBitsKHR") int transformAt(long index) { return VkDisplaySurfaceCreateInfoKHR.get_transform(this.segment(), index); } + /// {@return `transform`} + public @CType("VkSurfaceTransformFlagBitsKHR") int transform() { return VkDisplaySurfaceCreateInfoKHR.get_transform(this.segment()); } + /// Sets `transform` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transform(MemorySegment segment, long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VH_transform.set(segment, 0L, index, value); } + /// Sets `transform` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transform(MemorySegment segment, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkDisplaySurfaceCreateInfoKHR.set_transform(segment, 0L, value); } + /// Sets `transform` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR transformAt(long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkDisplaySurfaceCreateInfoKHR.set_transform(this.segment(), index, value); return this; } + /// Sets `transform` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR transform(@CType("VkSurfaceTransformFlagBitsKHR") int value) { VkDisplaySurfaceCreateInfoKHR.set_transform(this.segment(), value); return this; } + + /// {@return `globalAlpha` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_globalAlpha(MemorySegment segment, long index) { return (float) VH_globalAlpha.get(segment, 0L, index); } + /// {@return `globalAlpha`} + /// @param segment the segment of the struct + public static @CType("float") float get_globalAlpha(MemorySegment segment) { return VkDisplaySurfaceCreateInfoKHR.get_globalAlpha(segment, 0L); } + /// {@return `globalAlpha` at the given index} + /// @param index the index + public @CType("float") float globalAlphaAt(long index) { return VkDisplaySurfaceCreateInfoKHR.get_globalAlpha(this.segment(), index); } + /// {@return `globalAlpha`} + public @CType("float") float globalAlpha() { return VkDisplaySurfaceCreateInfoKHR.get_globalAlpha(this.segment()); } + /// Sets `globalAlpha` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_globalAlpha(MemorySegment segment, long index, @CType("float") float value) { VH_globalAlpha.set(segment, 0L, index, value); } + /// Sets `globalAlpha` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_globalAlpha(MemorySegment segment, @CType("float") float value) { VkDisplaySurfaceCreateInfoKHR.set_globalAlpha(segment, 0L, value); } + /// Sets `globalAlpha` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR globalAlphaAt(long index, @CType("float") float value) { VkDisplaySurfaceCreateInfoKHR.set_globalAlpha(this.segment(), index, value); return this; } + /// Sets `globalAlpha` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR globalAlpha(@CType("float") float value) { VkDisplaySurfaceCreateInfoKHR.set_globalAlpha(this.segment(), value); return this; } + + /// {@return `alphaMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplayPlaneAlphaFlagBitsKHR") int get_alphaMode(MemorySegment segment, long index) { return (int) VH_alphaMode.get(segment, 0L, index); } + /// {@return `alphaMode`} + /// @param segment the segment of the struct + public static @CType("VkDisplayPlaneAlphaFlagBitsKHR") int get_alphaMode(MemorySegment segment) { return VkDisplaySurfaceCreateInfoKHR.get_alphaMode(segment, 0L); } + /// {@return `alphaMode` at the given index} + /// @param index the index + public @CType("VkDisplayPlaneAlphaFlagBitsKHR") int alphaModeAt(long index) { return VkDisplaySurfaceCreateInfoKHR.get_alphaMode(this.segment(), index); } + /// {@return `alphaMode`} + public @CType("VkDisplayPlaneAlphaFlagBitsKHR") int alphaMode() { return VkDisplaySurfaceCreateInfoKHR.get_alphaMode(this.segment()); } + /// Sets `alphaMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_alphaMode(MemorySegment segment, long index, @CType("VkDisplayPlaneAlphaFlagBitsKHR") int value) { VH_alphaMode.set(segment, 0L, index, value); } + /// Sets `alphaMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_alphaMode(MemorySegment segment, @CType("VkDisplayPlaneAlphaFlagBitsKHR") int value) { VkDisplaySurfaceCreateInfoKHR.set_alphaMode(segment, 0L, value); } + /// Sets `alphaMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR alphaModeAt(long index, @CType("VkDisplayPlaneAlphaFlagBitsKHR") int value) { VkDisplaySurfaceCreateInfoKHR.set_alphaMode(this.segment(), index, value); return this; } + /// Sets `alphaMode` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR alphaMode(@CType("VkDisplayPlaneAlphaFlagBitsKHR") int value) { VkDisplaySurfaceCreateInfoKHR.set_alphaMode(this.segment(), value); return this; } + + /// {@return `imageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent); } + /// {@return `imageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment) { return VkDisplaySurfaceCreateInfoKHR.get_imageExtent(segment, 0L); } + /// {@return `imageExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment imageExtentAt(long index) { return VkDisplaySurfaceCreateInfoKHR.get_imageExtent(this.segment(), index); } + /// {@return `imageExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment imageExtent() { return VkDisplaySurfaceCreateInfoKHR.get_imageExtent(this.segment()); } + /// Sets `imageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent.byteSize()); } + /// Sets `imageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceCreateInfoKHR.set_imageExtent(segment, 0L, value); } + /// Sets `imageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR imageExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceCreateInfoKHR.set_imageExtent(this.segment(), index, value); return this; } + /// Sets `imageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceCreateInfoKHR imageExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceCreateInfoKHR.set_imageExtent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkExportFenceWin32HandleInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkExportFenceWin32HandleInfoKHR.java new file mode 100644 index 00000000..10730c63 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkExportFenceWin32HandleInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pAttributes +/// [VarHandle][#VH_pAttributes] - [Getter][#pAttributes()] - [Setter][#pAttributes(java.lang.foreign.MemorySegment)] +/// ### dwAccess +/// [VarHandle][#VH_dwAccess] - [Getter][#dwAccess()] - [Setter][#dwAccess(int)] +/// ### name +/// [VarHandle][#VH_name] - [Getter][#name()] - [Setter][#name(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportFenceWin32HandleInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const SECURITY_ATTRIBUTES * pAttributes; +/// DWORD dwAccess; +/// LPCWSTR name; +/// } VkExportFenceWin32HandleInfoKHR; +/// ``` +public final class VkExportFenceWin32HandleInfoKHR extends Struct { + /// The struct layout of `VkExportFenceWin32HandleInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pAttributes"), + ValueLayout.JAVA_INT.withName("dwAccess"), + ValueLayout.ADDRESS.withName("name") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pAttributes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttributes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttributes")); + /// The [VarHandle] of `dwAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dwAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dwAccess")); + /// The [VarHandle] of `name` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_name = LAYOUT.arrayElementVarHandle(PathElement.groupElement("name")); + + /// Creates `VkExportFenceWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + public VkExportFenceWin32HandleInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportFenceWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportFenceWin32HandleInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportFenceWin32HandleInfoKHR(segment); } + + /// Creates `VkExportFenceWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportFenceWin32HandleInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportFenceWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportFenceWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportFenceWin32HandleInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportFenceWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportFenceWin32HandleInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportFenceWin32HandleInfoKHR` + public static VkExportFenceWin32HandleInfoKHR alloc(SegmentAllocator allocator) { return new VkExportFenceWin32HandleInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportFenceWin32HandleInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportFenceWin32HandleInfoKHR` + public static VkExportFenceWin32HandleInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkExportFenceWin32HandleInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportFenceWin32HandleInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportFenceWin32HandleInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportFenceWin32HandleInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportFenceWin32HandleInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceWin32HandleInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkExportFenceWin32HandleInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceWin32HandleInfoKHR sType(@CType("VkStructureType") int value) { VkExportFenceWin32HandleInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportFenceWin32HandleInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportFenceWin32HandleInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportFenceWin32HandleInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportFenceWin32HandleInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceWin32HandleInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportFenceWin32HandleInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceWin32HandleInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportFenceWin32HandleInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pAttributes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttributes.get(segment, 0L, index); } + /// {@return `pAttributes`} + /// @param segment the segment of the struct + public static @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment) { return VkExportFenceWin32HandleInfoKHR.get_pAttributes(segment, 0L); } + /// {@return `pAttributes` at the given index} + /// @param index the index + public @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment pAttributesAt(long index) { return VkExportFenceWin32HandleInfoKHR.get_pAttributes(this.segment(), index); } + /// {@return `pAttributes`} + public @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment pAttributes() { return VkExportFenceWin32HandleInfoKHR.get_pAttributes(this.segment()); } + /// Sets `pAttributes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttributes(MemorySegment segment, long index, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VH_pAttributes.set(segment, 0L, index, value); } + /// Sets `pAttributes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttributes(MemorySegment segment, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportFenceWin32HandleInfoKHR.set_pAttributes(segment, 0L, value); } + /// Sets `pAttributes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceWin32HandleInfoKHR pAttributesAt(long index, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportFenceWin32HandleInfoKHR.set_pAttributes(this.segment(), index, value); return this; } + /// Sets `pAttributes` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceWin32HandleInfoKHR pAttributes(@CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportFenceWin32HandleInfoKHR.set_pAttributes(this.segment(), value); return this; } + + /// {@return `dwAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("DWORD") int get_dwAccess(MemorySegment segment, long index) { return (int) VH_dwAccess.get(segment, 0L, index); } + /// {@return `dwAccess`} + /// @param segment the segment of the struct + public static @CType("DWORD") int get_dwAccess(MemorySegment segment) { return VkExportFenceWin32HandleInfoKHR.get_dwAccess(segment, 0L); } + /// {@return `dwAccess` at the given index} + /// @param index the index + public @CType("DWORD") int dwAccessAt(long index) { return VkExportFenceWin32HandleInfoKHR.get_dwAccess(this.segment(), index); } + /// {@return `dwAccess`} + public @CType("DWORD") int dwAccess() { return VkExportFenceWin32HandleInfoKHR.get_dwAccess(this.segment()); } + /// Sets `dwAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dwAccess(MemorySegment segment, long index, @CType("DWORD") int value) { VH_dwAccess.set(segment, 0L, index, value); } + /// Sets `dwAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dwAccess(MemorySegment segment, @CType("DWORD") int value) { VkExportFenceWin32HandleInfoKHR.set_dwAccess(segment, 0L, value); } + /// Sets `dwAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceWin32HandleInfoKHR dwAccessAt(long index, @CType("DWORD") int value) { VkExportFenceWin32HandleInfoKHR.set_dwAccess(this.segment(), index, value); return this; } + /// Sets `dwAccess` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceWin32HandleInfoKHR dwAccess(@CType("DWORD") int value) { VkExportFenceWin32HandleInfoKHR.set_dwAccess(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_name.get(segment, 0L, index); } + /// {@return `name`} + /// @param segment the segment of the struct + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment) { return VkExportFenceWin32HandleInfoKHR.get_name(segment, 0L); } + /// {@return `name` at the given index} + /// @param index the index + public @CType("LPCWSTR") java.lang.foreign.MemorySegment nameAt(long index) { return VkExportFenceWin32HandleInfoKHR.get_name(this.segment(), index); } + /// {@return `name`} + public @CType("LPCWSTR") java.lang.foreign.MemorySegment name() { return VkExportFenceWin32HandleInfoKHR.get_name(this.segment()); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_name(MemorySegment segment, long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VH_name.set(segment, 0L, index, value); } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_name(MemorySegment segment, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkExportFenceWin32HandleInfoKHR.set_name(segment, 0L, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceWin32HandleInfoKHR nameAt(long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkExportFenceWin32HandleInfoKHR.set_name(this.segment(), index, value); return this; } + /// Sets `name` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceWin32HandleInfoKHR name(@CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkExportFenceWin32HandleInfoKHR.set_name(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkExportMemoryWin32HandleInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkExportMemoryWin32HandleInfoKHR.java new file mode 100644 index 00000000..6ae8821e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkExportMemoryWin32HandleInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pAttributes +/// [VarHandle][#VH_pAttributes] - [Getter][#pAttributes()] - [Setter][#pAttributes(java.lang.foreign.MemorySegment)] +/// ### dwAccess +/// [VarHandle][#VH_dwAccess] - [Getter][#dwAccess()] - [Setter][#dwAccess(int)] +/// ### name +/// [VarHandle][#VH_name] - [Getter][#name()] - [Setter][#name(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMemoryWin32HandleInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const SECURITY_ATTRIBUTES * pAttributes; +/// DWORD dwAccess; +/// LPCWSTR name; +/// } VkExportMemoryWin32HandleInfoKHR; +/// ``` +public final class VkExportMemoryWin32HandleInfoKHR extends Struct { + /// The struct layout of `VkExportMemoryWin32HandleInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pAttributes"), + ValueLayout.JAVA_INT.withName("dwAccess"), + ValueLayout.ADDRESS.withName("name") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pAttributes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttributes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttributes")); + /// The [VarHandle] of `dwAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dwAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dwAccess")); + /// The [VarHandle] of `name` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_name = LAYOUT.arrayElementVarHandle(PathElement.groupElement("name")); + + /// Creates `VkExportMemoryWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + public VkExportMemoryWin32HandleInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMemoryWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryWin32HandleInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryWin32HandleInfoKHR(segment); } + + /// Creates `VkExportMemoryWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryWin32HandleInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMemoryWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryWin32HandleInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMemoryWin32HandleInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMemoryWin32HandleInfoKHR` + public static VkExportMemoryWin32HandleInfoKHR alloc(SegmentAllocator allocator) { return new VkExportMemoryWin32HandleInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMemoryWin32HandleInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMemoryWin32HandleInfoKHR` + public static VkExportMemoryWin32HandleInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkExportMemoryWin32HandleInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMemoryWin32HandleInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMemoryWin32HandleInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMemoryWin32HandleInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMemoryWin32HandleInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMemoryWin32HandleInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoKHR sType(@CType("VkStructureType") int value) { VkExportMemoryWin32HandleInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMemoryWin32HandleInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMemoryWin32HandleInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMemoryWin32HandleInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pAttributes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttributes.get(segment, 0L, index); } + /// {@return `pAttributes`} + /// @param segment the segment of the struct + public static @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment) { return VkExportMemoryWin32HandleInfoKHR.get_pAttributes(segment, 0L); } + /// {@return `pAttributes` at the given index} + /// @param index the index + public @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment pAttributesAt(long index) { return VkExportMemoryWin32HandleInfoKHR.get_pAttributes(this.segment(), index); } + /// {@return `pAttributes`} + public @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment pAttributes() { return VkExportMemoryWin32HandleInfoKHR.get_pAttributes(this.segment()); } + /// Sets `pAttributes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttributes(MemorySegment segment, long index, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VH_pAttributes.set(segment, 0L, index, value); } + /// Sets `pAttributes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttributes(MemorySegment segment, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoKHR.set_pAttributes(segment, 0L, value); } + /// Sets `pAttributes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoKHR pAttributesAt(long index, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoKHR.set_pAttributes(this.segment(), index, value); return this; } + /// Sets `pAttributes` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoKHR pAttributes(@CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoKHR.set_pAttributes(this.segment(), value); return this; } + + /// {@return `dwAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("DWORD") int get_dwAccess(MemorySegment segment, long index) { return (int) VH_dwAccess.get(segment, 0L, index); } + /// {@return `dwAccess`} + /// @param segment the segment of the struct + public static @CType("DWORD") int get_dwAccess(MemorySegment segment) { return VkExportMemoryWin32HandleInfoKHR.get_dwAccess(segment, 0L); } + /// {@return `dwAccess` at the given index} + /// @param index the index + public @CType("DWORD") int dwAccessAt(long index) { return VkExportMemoryWin32HandleInfoKHR.get_dwAccess(this.segment(), index); } + /// {@return `dwAccess`} + public @CType("DWORD") int dwAccess() { return VkExportMemoryWin32HandleInfoKHR.get_dwAccess(this.segment()); } + /// Sets `dwAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dwAccess(MemorySegment segment, long index, @CType("DWORD") int value) { VH_dwAccess.set(segment, 0L, index, value); } + /// Sets `dwAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dwAccess(MemorySegment segment, @CType("DWORD") int value) { VkExportMemoryWin32HandleInfoKHR.set_dwAccess(segment, 0L, value); } + /// Sets `dwAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoKHR dwAccessAt(long index, @CType("DWORD") int value) { VkExportMemoryWin32HandleInfoKHR.set_dwAccess(this.segment(), index, value); return this; } + /// Sets `dwAccess` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoKHR dwAccess(@CType("DWORD") int value) { VkExportMemoryWin32HandleInfoKHR.set_dwAccess(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_name.get(segment, 0L, index); } + /// {@return `name`} + /// @param segment the segment of the struct + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment) { return VkExportMemoryWin32HandleInfoKHR.get_name(segment, 0L); } + /// {@return `name` at the given index} + /// @param index the index + public @CType("LPCWSTR") java.lang.foreign.MemorySegment nameAt(long index) { return VkExportMemoryWin32HandleInfoKHR.get_name(this.segment(), index); } + /// {@return `name`} + public @CType("LPCWSTR") java.lang.foreign.MemorySegment name() { return VkExportMemoryWin32HandleInfoKHR.get_name(this.segment()); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_name(MemorySegment segment, long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VH_name.set(segment, 0L, index, value); } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_name(MemorySegment segment, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoKHR.set_name(segment, 0L, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoKHR nameAt(long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoKHR.set_name(this.segment(), index, value); return this; } + /// Sets `name` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoKHR name(@CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoKHR.set_name(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkExportSemaphoreWin32HandleInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkExportSemaphoreWin32HandleInfoKHR.java new file mode 100644 index 00000000..6dfd02ec --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkExportSemaphoreWin32HandleInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pAttributes +/// [VarHandle][#VH_pAttributes] - [Getter][#pAttributes()] - [Setter][#pAttributes(java.lang.foreign.MemorySegment)] +/// ### dwAccess +/// [VarHandle][#VH_dwAccess] - [Getter][#dwAccess()] - [Setter][#dwAccess(int)] +/// ### name +/// [VarHandle][#VH_name] - [Getter][#name()] - [Setter][#name(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportSemaphoreWin32HandleInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const SECURITY_ATTRIBUTES * pAttributes; +/// DWORD dwAccess; +/// LPCWSTR name; +/// } VkExportSemaphoreWin32HandleInfoKHR; +/// ``` +public final class VkExportSemaphoreWin32HandleInfoKHR extends Struct { + /// The struct layout of `VkExportSemaphoreWin32HandleInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pAttributes"), + ValueLayout.JAVA_INT.withName("dwAccess"), + ValueLayout.ADDRESS.withName("name") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pAttributes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttributes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttributes")); + /// The [VarHandle] of `dwAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dwAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dwAccess")); + /// The [VarHandle] of `name` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_name = LAYOUT.arrayElementVarHandle(PathElement.groupElement("name")); + + /// Creates `VkExportSemaphoreWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + public VkExportSemaphoreWin32HandleInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportSemaphoreWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportSemaphoreWin32HandleInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportSemaphoreWin32HandleInfoKHR(segment); } + + /// Creates `VkExportSemaphoreWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportSemaphoreWin32HandleInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportSemaphoreWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportSemaphoreWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportSemaphoreWin32HandleInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportSemaphoreWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportSemaphoreWin32HandleInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportSemaphoreWin32HandleInfoKHR` + public static VkExportSemaphoreWin32HandleInfoKHR alloc(SegmentAllocator allocator) { return new VkExportSemaphoreWin32HandleInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportSemaphoreWin32HandleInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportSemaphoreWin32HandleInfoKHR` + public static VkExportSemaphoreWin32HandleInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkExportSemaphoreWin32HandleInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportSemaphoreWin32HandleInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportSemaphoreWin32HandleInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportSemaphoreWin32HandleInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportSemaphoreWin32HandleInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreWin32HandleInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkExportSemaphoreWin32HandleInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreWin32HandleInfoKHR sType(@CType("VkStructureType") int value) { VkExportSemaphoreWin32HandleInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportSemaphoreWin32HandleInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportSemaphoreWin32HandleInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportSemaphoreWin32HandleInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreWin32HandleInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreWin32HandleInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreWin32HandleInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreWin32HandleInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreWin32HandleInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pAttributes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttributes.get(segment, 0L, index); } + /// {@return `pAttributes`} + /// @param segment the segment of the struct + public static @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment) { return VkExportSemaphoreWin32HandleInfoKHR.get_pAttributes(segment, 0L); } + /// {@return `pAttributes` at the given index} + /// @param index the index + public @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment pAttributesAt(long index) { return VkExportSemaphoreWin32HandleInfoKHR.get_pAttributes(this.segment(), index); } + /// {@return `pAttributes`} + public @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment pAttributes() { return VkExportSemaphoreWin32HandleInfoKHR.get_pAttributes(this.segment()); } + /// Sets `pAttributes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttributes(MemorySegment segment, long index, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VH_pAttributes.set(segment, 0L, index, value); } + /// Sets `pAttributes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttributes(MemorySegment segment, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreWin32HandleInfoKHR.set_pAttributes(segment, 0L, value); } + /// Sets `pAttributes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreWin32HandleInfoKHR pAttributesAt(long index, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreWin32HandleInfoKHR.set_pAttributes(this.segment(), index, value); return this; } + /// Sets `pAttributes` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreWin32HandleInfoKHR pAttributes(@CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreWin32HandleInfoKHR.set_pAttributes(this.segment(), value); return this; } + + /// {@return `dwAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("DWORD") int get_dwAccess(MemorySegment segment, long index) { return (int) VH_dwAccess.get(segment, 0L, index); } + /// {@return `dwAccess`} + /// @param segment the segment of the struct + public static @CType("DWORD") int get_dwAccess(MemorySegment segment) { return VkExportSemaphoreWin32HandleInfoKHR.get_dwAccess(segment, 0L); } + /// {@return `dwAccess` at the given index} + /// @param index the index + public @CType("DWORD") int dwAccessAt(long index) { return VkExportSemaphoreWin32HandleInfoKHR.get_dwAccess(this.segment(), index); } + /// {@return `dwAccess`} + public @CType("DWORD") int dwAccess() { return VkExportSemaphoreWin32HandleInfoKHR.get_dwAccess(this.segment()); } + /// Sets `dwAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dwAccess(MemorySegment segment, long index, @CType("DWORD") int value) { VH_dwAccess.set(segment, 0L, index, value); } + /// Sets `dwAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dwAccess(MemorySegment segment, @CType("DWORD") int value) { VkExportSemaphoreWin32HandleInfoKHR.set_dwAccess(segment, 0L, value); } + /// Sets `dwAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreWin32HandleInfoKHR dwAccessAt(long index, @CType("DWORD") int value) { VkExportSemaphoreWin32HandleInfoKHR.set_dwAccess(this.segment(), index, value); return this; } + /// Sets `dwAccess` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreWin32HandleInfoKHR dwAccess(@CType("DWORD") int value) { VkExportSemaphoreWin32HandleInfoKHR.set_dwAccess(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_name.get(segment, 0L, index); } + /// {@return `name`} + /// @param segment the segment of the struct + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment) { return VkExportSemaphoreWin32HandleInfoKHR.get_name(segment, 0L); } + /// {@return `name` at the given index} + /// @param index the index + public @CType("LPCWSTR") java.lang.foreign.MemorySegment nameAt(long index) { return VkExportSemaphoreWin32HandleInfoKHR.get_name(this.segment(), index); } + /// {@return `name`} + public @CType("LPCWSTR") java.lang.foreign.MemorySegment name() { return VkExportSemaphoreWin32HandleInfoKHR.get_name(this.segment()); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_name(MemorySegment segment, long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VH_name.set(segment, 0L, index, value); } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_name(MemorySegment segment, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkExportSemaphoreWin32HandleInfoKHR.set_name(segment, 0L, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreWin32HandleInfoKHR nameAt(long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkExportSemaphoreWin32HandleInfoKHR.set_name(this.segment(), index, value); return this; } + /// Sets `name` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreWin32HandleInfoKHR name(@CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkExportSemaphoreWin32HandleInfoKHR.set_name(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkFenceGetFdInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkFenceGetFdInfoKHR.java new file mode 100644 index 00000000..1588627e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkFenceGetFdInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fence +/// [VarHandle][#VH_fence] - [Getter][#fence()] - [Setter][#fence(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFenceGetFdInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkFence fence; +/// VkExternalFenceHandleTypeFlagBits handleType; +/// } VkFenceGetFdInfoKHR; +/// ``` +public final class VkFenceGetFdInfoKHR extends Struct { + /// The struct layout of `VkFenceGetFdInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("fence"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fence` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_fence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fence")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkFenceGetFdInfoKHR` with the given segment. + /// @param segment the memory segment + public VkFenceGetFdInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFenceGetFdInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceGetFdInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceGetFdInfoKHR(segment); } + + /// Creates `VkFenceGetFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceGetFdInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceGetFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFenceGetFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceGetFdInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceGetFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFenceGetFdInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFenceGetFdInfoKHR` + public static VkFenceGetFdInfoKHR alloc(SegmentAllocator allocator) { return new VkFenceGetFdInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFenceGetFdInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFenceGetFdInfoKHR` + public static VkFenceGetFdInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkFenceGetFdInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFenceGetFdInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFenceGetFdInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFenceGetFdInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFenceGetFdInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetFdInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkFenceGetFdInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetFdInfoKHR sType(@CType("VkStructureType") int value) { VkFenceGetFdInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFenceGetFdInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFenceGetFdInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkFenceGetFdInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceGetFdInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetFdInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceGetFdInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetFdInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceGetFdInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `fence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_fence.get(segment, 0L, index); } + /// {@return `fence`} + /// @param segment the segment of the struct + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment) { return VkFenceGetFdInfoKHR.get_fence(segment, 0L); } + /// {@return `fence` at the given index} + /// @param index the index + public @CType("VkFence") java.lang.foreign.MemorySegment fenceAt(long index) { return VkFenceGetFdInfoKHR.get_fence(this.segment(), index); } + /// {@return `fence`} + public @CType("VkFence") java.lang.foreign.MemorySegment fence() { return VkFenceGetFdInfoKHR.get_fence(this.segment()); } + /// Sets `fence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fence(MemorySegment segment, long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VH_fence.set(segment, 0L, index, value); } + /// Sets `fence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fence(MemorySegment segment, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkFenceGetFdInfoKHR.set_fence(segment, 0L, value); } + /// Sets `fence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetFdInfoKHR fenceAt(long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkFenceGetFdInfoKHR.set_fence(this.segment(), index, value); return this; } + /// Sets `fence` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetFdInfoKHR fence(@CType("VkFence") java.lang.foreign.MemorySegment value) { VkFenceGetFdInfoKHR.set_fence(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkFenceGetFdInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalFenceHandleTypeFlagBits") int handleTypeAt(long index) { return VkFenceGetFdInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalFenceHandleTypeFlagBits") int handleType() { return VkFenceGetFdInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkFenceGetFdInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetFdInfoKHR handleTypeAt(long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkFenceGetFdInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetFdInfoKHR handleType(@CType("VkExternalFenceHandleTypeFlagBits") int value) { VkFenceGetFdInfoKHR.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkFenceGetWin32HandleInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkFenceGetWin32HandleInfoKHR.java new file mode 100644 index 00000000..117a325d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkFenceGetWin32HandleInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fence +/// [VarHandle][#VH_fence] - [Getter][#fence()] - [Setter][#fence(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFenceGetWin32HandleInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkFence fence; +/// VkExternalFenceHandleTypeFlagBits handleType; +/// } VkFenceGetWin32HandleInfoKHR; +/// ``` +public final class VkFenceGetWin32HandleInfoKHR extends Struct { + /// The struct layout of `VkFenceGetWin32HandleInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("fence"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fence` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_fence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fence")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkFenceGetWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + public VkFenceGetWin32HandleInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFenceGetWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceGetWin32HandleInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceGetWin32HandleInfoKHR(segment); } + + /// Creates `VkFenceGetWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceGetWin32HandleInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceGetWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFenceGetWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceGetWin32HandleInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceGetWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFenceGetWin32HandleInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFenceGetWin32HandleInfoKHR` + public static VkFenceGetWin32HandleInfoKHR alloc(SegmentAllocator allocator) { return new VkFenceGetWin32HandleInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFenceGetWin32HandleInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFenceGetWin32HandleInfoKHR` + public static VkFenceGetWin32HandleInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkFenceGetWin32HandleInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFenceGetWin32HandleInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFenceGetWin32HandleInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFenceGetWin32HandleInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFenceGetWin32HandleInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetWin32HandleInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkFenceGetWin32HandleInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetWin32HandleInfoKHR sType(@CType("VkStructureType") int value) { VkFenceGetWin32HandleInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFenceGetWin32HandleInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFenceGetWin32HandleInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkFenceGetWin32HandleInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceGetWin32HandleInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetWin32HandleInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceGetWin32HandleInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetWin32HandleInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceGetWin32HandleInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `fence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_fence.get(segment, 0L, index); } + /// {@return `fence`} + /// @param segment the segment of the struct + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment) { return VkFenceGetWin32HandleInfoKHR.get_fence(segment, 0L); } + /// {@return `fence` at the given index} + /// @param index the index + public @CType("VkFence") java.lang.foreign.MemorySegment fenceAt(long index) { return VkFenceGetWin32HandleInfoKHR.get_fence(this.segment(), index); } + /// {@return `fence`} + public @CType("VkFence") java.lang.foreign.MemorySegment fence() { return VkFenceGetWin32HandleInfoKHR.get_fence(this.segment()); } + /// Sets `fence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fence(MemorySegment segment, long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VH_fence.set(segment, 0L, index, value); } + /// Sets `fence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fence(MemorySegment segment, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkFenceGetWin32HandleInfoKHR.set_fence(segment, 0L, value); } + /// Sets `fence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetWin32HandleInfoKHR fenceAt(long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkFenceGetWin32HandleInfoKHR.set_fence(this.segment(), index, value); return this; } + /// Sets `fence` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetWin32HandleInfoKHR fence(@CType("VkFence") java.lang.foreign.MemorySegment value) { VkFenceGetWin32HandleInfoKHR.set_fence(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkFenceGetWin32HandleInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalFenceHandleTypeFlagBits") int handleTypeAt(long index) { return VkFenceGetWin32HandleInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalFenceHandleTypeFlagBits") int handleType() { return VkFenceGetWin32HandleInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkFenceGetWin32HandleInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetWin32HandleInfoKHR handleTypeAt(long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkFenceGetWin32HandleInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetWin32HandleInfoKHR handleType(@CType("VkExternalFenceHandleTypeFlagBits") int value) { VkFenceGetWin32HandleInfoKHR.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkFragmentShadingRateAttachmentInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkFragmentShadingRateAttachmentInfoKHR.java new file mode 100644 index 00000000..58c503df --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkFragmentShadingRateAttachmentInfoKHR.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pFragmentShadingRateAttachment +/// [VarHandle][#VH_pFragmentShadingRateAttachment] - [Getter][#pFragmentShadingRateAttachment()] - [Setter][#pFragmentShadingRateAttachment(java.lang.foreign.MemorySegment)] +/// ### shadingRateAttachmentTexelSize +/// [Byte offset][#OFFSET_shadingRateAttachmentTexelSize] - [Memory layout][#ML_shadingRateAttachmentTexelSize] - [Getter][#shadingRateAttachmentTexelSize()] - [Setter][#shadingRateAttachmentTexelSize(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFragmentShadingRateAttachmentInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const VkAttachmentReference2 * pFragmentShadingRateAttachment; +/// VkExtent2D shadingRateAttachmentTexelSize; +/// } VkFragmentShadingRateAttachmentInfoKHR; +/// ``` +public final class VkFragmentShadingRateAttachmentInfoKHR extends Struct { + /// The struct layout of `VkFragmentShadingRateAttachmentInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pFragmentShadingRateAttachment"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("shadingRateAttachmentTexelSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pFragmentShadingRateAttachment` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pFragmentShadingRateAttachment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pFragmentShadingRateAttachment")); + /// The byte offset of `shadingRateAttachmentTexelSize`. + public static final long OFFSET_shadingRateAttachmentTexelSize = LAYOUT.byteOffset(PathElement.groupElement("shadingRateAttachmentTexelSize")); + /// The memory layout of `shadingRateAttachmentTexelSize`. + public static final MemoryLayout ML_shadingRateAttachmentTexelSize = LAYOUT.select(PathElement.groupElement("shadingRateAttachmentTexelSize")); + + /// Creates `VkFragmentShadingRateAttachmentInfoKHR` with the given segment. + /// @param segment the memory segment + public VkFragmentShadingRateAttachmentInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFragmentShadingRateAttachmentInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFragmentShadingRateAttachmentInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFragmentShadingRateAttachmentInfoKHR(segment); } + + /// Creates `VkFragmentShadingRateAttachmentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFragmentShadingRateAttachmentInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFragmentShadingRateAttachmentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFragmentShadingRateAttachmentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFragmentShadingRateAttachmentInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFragmentShadingRateAttachmentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFragmentShadingRateAttachmentInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFragmentShadingRateAttachmentInfoKHR` + public static VkFragmentShadingRateAttachmentInfoKHR alloc(SegmentAllocator allocator) { return new VkFragmentShadingRateAttachmentInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFragmentShadingRateAttachmentInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFragmentShadingRateAttachmentInfoKHR` + public static VkFragmentShadingRateAttachmentInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkFragmentShadingRateAttachmentInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFragmentShadingRateAttachmentInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFragmentShadingRateAttachmentInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFragmentShadingRateAttachmentInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFragmentShadingRateAttachmentInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFragmentShadingRateAttachmentInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkFragmentShadingRateAttachmentInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFragmentShadingRateAttachmentInfoKHR sType(@CType("VkStructureType") int value) { VkFragmentShadingRateAttachmentInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFragmentShadingRateAttachmentInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFragmentShadingRateAttachmentInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkFragmentShadingRateAttachmentInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFragmentShadingRateAttachmentInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFragmentShadingRateAttachmentInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFragmentShadingRateAttachmentInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFragmentShadingRateAttachmentInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFragmentShadingRateAttachmentInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pFragmentShadingRateAttachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pFragmentShadingRateAttachment(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pFragmentShadingRateAttachment.get(segment, 0L, index); } + /// {@return `pFragmentShadingRateAttachment`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pFragmentShadingRateAttachment(MemorySegment segment) { return VkFragmentShadingRateAttachmentInfoKHR.get_pFragmentShadingRateAttachment(segment, 0L); } + /// {@return `pFragmentShadingRateAttachment` at the given index} + /// @param index the index + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pFragmentShadingRateAttachmentAt(long index) { return VkFragmentShadingRateAttachmentInfoKHR.get_pFragmentShadingRateAttachment(this.segment(), index); } + /// {@return `pFragmentShadingRateAttachment`} + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pFragmentShadingRateAttachment() { return VkFragmentShadingRateAttachmentInfoKHR.get_pFragmentShadingRateAttachment(this.segment()); } + /// Sets `pFragmentShadingRateAttachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pFragmentShadingRateAttachment(MemorySegment segment, long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VH_pFragmentShadingRateAttachment.set(segment, 0L, index, value); } + /// Sets `pFragmentShadingRateAttachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pFragmentShadingRateAttachment(MemorySegment segment, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkFragmentShadingRateAttachmentInfoKHR.set_pFragmentShadingRateAttachment(segment, 0L, value); } + /// Sets `pFragmentShadingRateAttachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFragmentShadingRateAttachmentInfoKHR pFragmentShadingRateAttachmentAt(long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkFragmentShadingRateAttachmentInfoKHR.set_pFragmentShadingRateAttachment(this.segment(), index, value); return this; } + /// Sets `pFragmentShadingRateAttachment` with the given value. + /// @param value the value + /// @return `this` + public VkFragmentShadingRateAttachmentInfoKHR pFragmentShadingRateAttachment(@CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkFragmentShadingRateAttachmentInfoKHR.set_pFragmentShadingRateAttachment(this.segment(), value); return this; } + + /// {@return `shadingRateAttachmentTexelSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_shadingRateAttachmentTexelSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_shadingRateAttachmentTexelSize, index), ML_shadingRateAttachmentTexelSize); } + /// {@return `shadingRateAttachmentTexelSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_shadingRateAttachmentTexelSize(MemorySegment segment) { return VkFragmentShadingRateAttachmentInfoKHR.get_shadingRateAttachmentTexelSize(segment, 0L); } + /// {@return `shadingRateAttachmentTexelSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment shadingRateAttachmentTexelSizeAt(long index) { return VkFragmentShadingRateAttachmentInfoKHR.get_shadingRateAttachmentTexelSize(this.segment(), index); } + /// {@return `shadingRateAttachmentTexelSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment shadingRateAttachmentTexelSize() { return VkFragmentShadingRateAttachmentInfoKHR.get_shadingRateAttachmentTexelSize(this.segment()); } + /// Sets `shadingRateAttachmentTexelSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRateAttachmentTexelSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_shadingRateAttachmentTexelSize, index), ML_shadingRateAttachmentTexelSize.byteSize()); } + /// Sets `shadingRateAttachmentTexelSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRateAttachmentTexelSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkFragmentShadingRateAttachmentInfoKHR.set_shadingRateAttachmentTexelSize(segment, 0L, value); } + /// Sets `shadingRateAttachmentTexelSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFragmentShadingRateAttachmentInfoKHR shadingRateAttachmentTexelSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkFragmentShadingRateAttachmentInfoKHR.set_shadingRateAttachmentTexelSize(this.segment(), index, value); return this; } + /// Sets `shadingRateAttachmentTexelSize` with the given value. + /// @param value the value + /// @return `this` + public VkFragmentShadingRateAttachmentInfoKHR shadingRateAttachmentTexelSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkFragmentShadingRateAttachmentInfoKHR.set_shadingRateAttachmentTexelSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImageSwapchainCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImageSwapchainCreateInfoKHR.java new file mode 100644 index 00000000..726d91ab --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImageSwapchainCreateInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchain +/// [VarHandle][#VH_swapchain] - [Getter][#swapchain()] - [Setter][#swapchain(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageSwapchainCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkSwapchainKHR swapchain; +/// } VkImageSwapchainCreateInfoKHR; +/// ``` +public final class VkImageSwapchainCreateInfoKHR extends Struct { + /// The struct layout of `VkImageSwapchainCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("swapchain") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchain` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_swapchain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchain")); + + /// Creates `VkImageSwapchainCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkImageSwapchainCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageSwapchainCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSwapchainCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSwapchainCreateInfoKHR(segment); } + + /// Creates `VkImageSwapchainCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSwapchainCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSwapchainCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageSwapchainCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSwapchainCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSwapchainCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageSwapchainCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageSwapchainCreateInfoKHR` + public static VkImageSwapchainCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkImageSwapchainCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageSwapchainCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageSwapchainCreateInfoKHR` + public static VkImageSwapchainCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkImageSwapchainCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageSwapchainCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageSwapchainCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageSwapchainCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageSwapchainCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSwapchainCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkImageSwapchainCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageSwapchainCreateInfoKHR sType(@CType("VkStructureType") int value) { VkImageSwapchainCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageSwapchainCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageSwapchainCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageSwapchainCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageSwapchainCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSwapchainCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageSwapchainCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageSwapchainCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageSwapchainCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment get_swapchain(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_swapchain.get(segment, 0L, index); } + /// {@return `swapchain`} + /// @param segment the segment of the struct + public static @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment get_swapchain(MemorySegment segment) { return VkImageSwapchainCreateInfoKHR.get_swapchain(segment, 0L); } + /// {@return `swapchain` at the given index} + /// @param index the index + public @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment swapchainAt(long index) { return VkImageSwapchainCreateInfoKHR.get_swapchain(this.segment(), index); } + /// {@return `swapchain`} + public @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment swapchain() { return VkImageSwapchainCreateInfoKHR.get_swapchain(this.segment()); } + /// Sets `swapchain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchain(MemorySegment segment, long index, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VH_swapchain.set(segment, 0L, index, value); } + /// Sets `swapchain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchain(MemorySegment segment, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkImageSwapchainCreateInfoKHR.set_swapchain(segment, 0L, value); } + /// Sets `swapchain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSwapchainCreateInfoKHR swapchainAt(long index, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkImageSwapchainCreateInfoKHR.set_swapchain(this.segment(), index, value); return this; } + /// Sets `swapchain` with the given value. + /// @param value the value + /// @return `this` + public VkImageSwapchainCreateInfoKHR swapchain(@CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkImageSwapchainCreateInfoKHR.set_swapchain(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportFenceFdInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportFenceFdInfoKHR.java new file mode 100644 index 00000000..74247339 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportFenceFdInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fence +/// [VarHandle][#VH_fence] - [Getter][#fence()] - [Setter][#fence(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### fd +/// [VarHandle][#VH_fd] - [Getter][#fd()] - [Setter][#fd(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportFenceFdInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkFence fence; +/// VkFenceImportFlags flags; +/// VkExternalFenceHandleTypeFlagBits handleType; +/// int fd; +/// } VkImportFenceFdInfoKHR; +/// ``` +public final class VkImportFenceFdInfoKHR extends Struct { + /// The struct layout of `VkImportFenceFdInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("fence"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.JAVA_INT.withName("fd") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fence` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_fence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fence")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `fd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fd")); + + /// Creates `VkImportFenceFdInfoKHR` with the given segment. + /// @param segment the memory segment + public VkImportFenceFdInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportFenceFdInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportFenceFdInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportFenceFdInfoKHR(segment); } + + /// Creates `VkImportFenceFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportFenceFdInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportFenceFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportFenceFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportFenceFdInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportFenceFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportFenceFdInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportFenceFdInfoKHR` + public static VkImportFenceFdInfoKHR alloc(SegmentAllocator allocator) { return new VkImportFenceFdInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportFenceFdInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportFenceFdInfoKHR` + public static VkImportFenceFdInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkImportFenceFdInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportFenceFdInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportFenceFdInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportFenceFdInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportFenceFdInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkImportFenceFdInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR sType(@CType("VkStructureType") int value) { VkImportFenceFdInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportFenceFdInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportFenceFdInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportFenceFdInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportFenceFdInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportFenceFdInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportFenceFdInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `fence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_fence.get(segment, 0L, index); } + /// {@return `fence`} + /// @param segment the segment of the struct + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment) { return VkImportFenceFdInfoKHR.get_fence(segment, 0L); } + /// {@return `fence` at the given index} + /// @param index the index + public @CType("VkFence") java.lang.foreign.MemorySegment fenceAt(long index) { return VkImportFenceFdInfoKHR.get_fence(this.segment(), index); } + /// {@return `fence`} + public @CType("VkFence") java.lang.foreign.MemorySegment fence() { return VkImportFenceFdInfoKHR.get_fence(this.segment()); } + /// Sets `fence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fence(MemorySegment segment, long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VH_fence.set(segment, 0L, index, value); } + /// Sets `fence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fence(MemorySegment segment, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkImportFenceFdInfoKHR.set_fence(segment, 0L, value); } + /// Sets `fence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR fenceAt(long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkImportFenceFdInfoKHR.set_fence(this.segment(), index, value); return this; } + /// Sets `fence` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR fence(@CType("VkFence") java.lang.foreign.MemorySegment value) { VkImportFenceFdInfoKHR.set_fence(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFenceImportFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkFenceImportFlags") int get_flags(MemorySegment segment) { return VkImportFenceFdInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkFenceImportFlags") int flagsAt(long index) { return VkImportFenceFdInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkFenceImportFlags") int flags() { return VkImportFenceFdInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkFenceImportFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkFenceImportFlags") int value) { VkImportFenceFdInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR flagsAt(long index, @CType("VkFenceImportFlags") int value) { VkImportFenceFdInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR flags(@CType("VkFenceImportFlags") int value) { VkImportFenceFdInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportFenceFdInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalFenceHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportFenceFdInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalFenceHandleTypeFlagBits") int handleType() { return VkImportFenceFdInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkImportFenceFdInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR handleTypeAt(long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkImportFenceFdInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR handleType(@CType("VkExternalFenceHandleTypeFlagBits") int value) { VkImportFenceFdInfoKHR.set_handleType(this.segment(), value); return this; } + + /// {@return `fd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int") int get_fd(MemorySegment segment, long index) { return (int) VH_fd.get(segment, 0L, index); } + /// {@return `fd`} + /// @param segment the segment of the struct + public static @CType("int") int get_fd(MemorySegment segment) { return VkImportFenceFdInfoKHR.get_fd(segment, 0L); } + /// {@return `fd` at the given index} + /// @param index the index + public @CType("int") int fdAt(long index) { return VkImportFenceFdInfoKHR.get_fd(this.segment(), index); } + /// {@return `fd`} + public @CType("int") int fd() { return VkImportFenceFdInfoKHR.get_fd(this.segment()); } + /// Sets `fd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fd(MemorySegment segment, long index, @CType("int") int value) { VH_fd.set(segment, 0L, index, value); } + /// Sets `fd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fd(MemorySegment segment, @CType("int") int value) { VkImportFenceFdInfoKHR.set_fd(segment, 0L, value); } + /// Sets `fd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR fdAt(long index, @CType("int") int value) { VkImportFenceFdInfoKHR.set_fd(this.segment(), index, value); return this; } + /// Sets `fd` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceFdInfoKHR fd(@CType("int") int value) { VkImportFenceFdInfoKHR.set_fd(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportFenceWin32HandleInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportFenceWin32HandleInfoKHR.java new file mode 100644 index 00000000..ca6e8ee5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportFenceWin32HandleInfoKHR.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fence +/// [VarHandle][#VH_fence] - [Getter][#fence()] - [Setter][#fence(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### handle +/// [VarHandle][#VH_handle] - [Getter][#handle()] - [Setter][#handle(java.lang.foreign.MemorySegment)] +/// ### name +/// [VarHandle][#VH_name] - [Getter][#name()] - [Setter][#name(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportFenceWin32HandleInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkFence fence; +/// VkFenceImportFlags flags; +/// VkExternalFenceHandleTypeFlagBits handleType; +/// HANDLE handle; +/// LPCWSTR name; +/// } VkImportFenceWin32HandleInfoKHR; +/// ``` +public final class VkImportFenceWin32HandleInfoKHR extends Struct { + /// The struct layout of `VkImportFenceWin32HandleInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("fence"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.ADDRESS.withName("handle"), + ValueLayout.ADDRESS.withName("name") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fence` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_fence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fence")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `handle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_handle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handle")); + /// The [VarHandle] of `name` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_name = LAYOUT.arrayElementVarHandle(PathElement.groupElement("name")); + + /// Creates `VkImportFenceWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + public VkImportFenceWin32HandleInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportFenceWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportFenceWin32HandleInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportFenceWin32HandleInfoKHR(segment); } + + /// Creates `VkImportFenceWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportFenceWin32HandleInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportFenceWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportFenceWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportFenceWin32HandleInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportFenceWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportFenceWin32HandleInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportFenceWin32HandleInfoKHR` + public static VkImportFenceWin32HandleInfoKHR alloc(SegmentAllocator allocator) { return new VkImportFenceWin32HandleInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportFenceWin32HandleInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportFenceWin32HandleInfoKHR` + public static VkImportFenceWin32HandleInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkImportFenceWin32HandleInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportFenceWin32HandleInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportFenceWin32HandleInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportFenceWin32HandleInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportFenceWin32HandleInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkImportFenceWin32HandleInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR sType(@CType("VkStructureType") int value) { VkImportFenceWin32HandleInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportFenceWin32HandleInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportFenceWin32HandleInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportFenceWin32HandleInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `fence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_fence.get(segment, 0L, index); } + /// {@return `fence`} + /// @param segment the segment of the struct + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment) { return VkImportFenceWin32HandleInfoKHR.get_fence(segment, 0L); } + /// {@return `fence` at the given index} + /// @param index the index + public @CType("VkFence") java.lang.foreign.MemorySegment fenceAt(long index) { return VkImportFenceWin32HandleInfoKHR.get_fence(this.segment(), index); } + /// {@return `fence`} + public @CType("VkFence") java.lang.foreign.MemorySegment fence() { return VkImportFenceWin32HandleInfoKHR.get_fence(this.segment()); } + /// Sets `fence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fence(MemorySegment segment, long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VH_fence.set(segment, 0L, index, value); } + /// Sets `fence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fence(MemorySegment segment, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_fence(segment, 0L, value); } + /// Sets `fence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR fenceAt(long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_fence(this.segment(), index, value); return this; } + /// Sets `fence` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR fence(@CType("VkFence") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_fence(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFenceImportFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkFenceImportFlags") int get_flags(MemorySegment segment) { return VkImportFenceWin32HandleInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkFenceImportFlags") int flagsAt(long index) { return VkImportFenceWin32HandleInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkFenceImportFlags") int flags() { return VkImportFenceWin32HandleInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkFenceImportFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkFenceImportFlags") int value) { VkImportFenceWin32HandleInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR flagsAt(long index, @CType("VkFenceImportFlags") int value) { VkImportFenceWin32HandleInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR flags(@CType("VkFenceImportFlags") int value) { VkImportFenceWin32HandleInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportFenceWin32HandleInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalFenceHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportFenceWin32HandleInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalFenceHandleTypeFlagBits") int handleType() { return VkImportFenceWin32HandleInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkImportFenceWin32HandleInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR handleTypeAt(long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkImportFenceWin32HandleInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR handleType(@CType("VkExternalFenceHandleTypeFlagBits") int value) { VkImportFenceWin32HandleInfoKHR.set_handleType(this.segment(), value); return this; } + + /// {@return `handle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("HANDLE") java.lang.foreign.MemorySegment get_handle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_handle.get(segment, 0L, index); } + /// {@return `handle`} + /// @param segment the segment of the struct + public static @CType("HANDLE") java.lang.foreign.MemorySegment get_handle(MemorySegment segment) { return VkImportFenceWin32HandleInfoKHR.get_handle(segment, 0L); } + /// {@return `handle` at the given index} + /// @param index the index + public @CType("HANDLE") java.lang.foreign.MemorySegment handleAt(long index) { return VkImportFenceWin32HandleInfoKHR.get_handle(this.segment(), index); } + /// {@return `handle`} + public @CType("HANDLE") java.lang.foreign.MemorySegment handle() { return VkImportFenceWin32HandleInfoKHR.get_handle(this.segment()); } + /// Sets `handle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handle(MemorySegment segment, long index, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VH_handle.set(segment, 0L, index, value); } + /// Sets `handle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handle(MemorySegment segment, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_handle(segment, 0L, value); } + /// Sets `handle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR handleAt(long index, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_handle(this.segment(), index, value); return this; } + /// Sets `handle` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR handle(@CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_handle(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_name.get(segment, 0L, index); } + /// {@return `name`} + /// @param segment the segment of the struct + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment) { return VkImportFenceWin32HandleInfoKHR.get_name(segment, 0L); } + /// {@return `name` at the given index} + /// @param index the index + public @CType("LPCWSTR") java.lang.foreign.MemorySegment nameAt(long index) { return VkImportFenceWin32HandleInfoKHR.get_name(this.segment(), index); } + /// {@return `name`} + public @CType("LPCWSTR") java.lang.foreign.MemorySegment name() { return VkImportFenceWin32HandleInfoKHR.get_name(this.segment()); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_name(MemorySegment segment, long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VH_name.set(segment, 0L, index, value); } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_name(MemorySegment segment, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_name(segment, 0L, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR nameAt(long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_name(this.segment(), index, value); return this; } + /// Sets `name` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceWin32HandleInfoKHR name(@CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkImportFenceWin32HandleInfoKHR.set_name(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportMemoryFdInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportMemoryFdInfoKHR.java new file mode 100644 index 00000000..7ed356e4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportMemoryFdInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### fd +/// [VarHandle][#VH_fd] - [Getter][#fd()] - [Setter][#fd(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMemoryFdInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// int fd; +/// } VkImportMemoryFdInfoKHR; +/// ``` +public final class VkImportMemoryFdInfoKHR extends Struct { + /// The struct layout of `VkImportMemoryFdInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.JAVA_INT.withName("fd") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `fd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fd")); + + /// Creates `VkImportMemoryFdInfoKHR` with the given segment. + /// @param segment the memory segment + public VkImportMemoryFdInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMemoryFdInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryFdInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryFdInfoKHR(segment); } + + /// Creates `VkImportMemoryFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryFdInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMemoryFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryFdInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMemoryFdInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMemoryFdInfoKHR` + public static VkImportMemoryFdInfoKHR alloc(SegmentAllocator allocator) { return new VkImportMemoryFdInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMemoryFdInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMemoryFdInfoKHR` + public static VkImportMemoryFdInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkImportMemoryFdInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMemoryFdInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMemoryFdInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMemoryFdInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMemoryFdInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryFdInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMemoryFdInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryFdInfoKHR sType(@CType("VkStructureType") int value) { VkImportMemoryFdInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMemoryFdInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMemoryFdInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMemoryFdInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryFdInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryFdInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryFdInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryFdInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryFdInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportMemoryFdInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportMemoryFdInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkImportMemoryFdInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryFdInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryFdInfoKHR handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryFdInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryFdInfoKHR handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryFdInfoKHR.set_handleType(this.segment(), value); return this; } + + /// {@return `fd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int") int get_fd(MemorySegment segment, long index) { return (int) VH_fd.get(segment, 0L, index); } + /// {@return `fd`} + /// @param segment the segment of the struct + public static @CType("int") int get_fd(MemorySegment segment) { return VkImportMemoryFdInfoKHR.get_fd(segment, 0L); } + /// {@return `fd` at the given index} + /// @param index the index + public @CType("int") int fdAt(long index) { return VkImportMemoryFdInfoKHR.get_fd(this.segment(), index); } + /// {@return `fd`} + public @CType("int") int fd() { return VkImportMemoryFdInfoKHR.get_fd(this.segment()); } + /// Sets `fd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fd(MemorySegment segment, long index, @CType("int") int value) { VH_fd.set(segment, 0L, index, value); } + /// Sets `fd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fd(MemorySegment segment, @CType("int") int value) { VkImportMemoryFdInfoKHR.set_fd(segment, 0L, value); } + /// Sets `fd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryFdInfoKHR fdAt(long index, @CType("int") int value) { VkImportMemoryFdInfoKHR.set_fd(this.segment(), index, value); return this; } + /// Sets `fd` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryFdInfoKHR fd(@CType("int") int value) { VkImportMemoryFdInfoKHR.set_fd(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportMemoryWin32HandleInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportMemoryWin32HandleInfoKHR.java new file mode 100644 index 00000000..faff2aa8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportMemoryWin32HandleInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### handle +/// [VarHandle][#VH_handle] - [Getter][#handle()] - [Setter][#handle(java.lang.foreign.MemorySegment)] +/// ### name +/// [VarHandle][#VH_name] - [Getter][#name()] - [Setter][#name(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMemoryWin32HandleInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// HANDLE handle; +/// LPCWSTR name; +/// } VkImportMemoryWin32HandleInfoKHR; +/// ``` +public final class VkImportMemoryWin32HandleInfoKHR extends Struct { + /// The struct layout of `VkImportMemoryWin32HandleInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.ADDRESS.withName("handle"), + ValueLayout.ADDRESS.withName("name") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `handle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_handle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handle")); + /// The [VarHandle] of `name` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_name = LAYOUT.arrayElementVarHandle(PathElement.groupElement("name")); + + /// Creates `VkImportMemoryWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + public VkImportMemoryWin32HandleInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMemoryWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryWin32HandleInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryWin32HandleInfoKHR(segment); } + + /// Creates `VkImportMemoryWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryWin32HandleInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMemoryWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryWin32HandleInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMemoryWin32HandleInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMemoryWin32HandleInfoKHR` + public static VkImportMemoryWin32HandleInfoKHR alloc(SegmentAllocator allocator) { return new VkImportMemoryWin32HandleInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMemoryWin32HandleInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMemoryWin32HandleInfoKHR` + public static VkImportMemoryWin32HandleInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkImportMemoryWin32HandleInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMemoryWin32HandleInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMemoryWin32HandleInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMemoryWin32HandleInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMemoryWin32HandleInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMemoryWin32HandleInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoKHR sType(@CType("VkStructureType") int value) { VkImportMemoryWin32HandleInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMemoryWin32HandleInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMemoryWin32HandleInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMemoryWin32HandleInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportMemoryWin32HandleInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportMemoryWin32HandleInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkImportMemoryWin32HandleInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryWin32HandleInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoKHR handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryWin32HandleInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoKHR handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemoryWin32HandleInfoKHR.set_handleType(this.segment(), value); return this; } + + /// {@return `handle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("HANDLE") java.lang.foreign.MemorySegment get_handle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_handle.get(segment, 0L, index); } + /// {@return `handle`} + /// @param segment the segment of the struct + public static @CType("HANDLE") java.lang.foreign.MemorySegment get_handle(MemorySegment segment) { return VkImportMemoryWin32HandleInfoKHR.get_handle(segment, 0L); } + /// {@return `handle` at the given index} + /// @param index the index + public @CType("HANDLE") java.lang.foreign.MemorySegment handleAt(long index) { return VkImportMemoryWin32HandleInfoKHR.get_handle(this.segment(), index); } + /// {@return `handle`} + public @CType("HANDLE") java.lang.foreign.MemorySegment handle() { return VkImportMemoryWin32HandleInfoKHR.get_handle(this.segment()); } + /// Sets `handle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handle(MemorySegment segment, long index, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VH_handle.set(segment, 0L, index, value); } + /// Sets `handle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handle(MemorySegment segment, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoKHR.set_handle(segment, 0L, value); } + /// Sets `handle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoKHR handleAt(long index, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoKHR.set_handle(this.segment(), index, value); return this; } + /// Sets `handle` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoKHR handle(@CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoKHR.set_handle(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_name.get(segment, 0L, index); } + /// {@return `name`} + /// @param segment the segment of the struct + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment) { return VkImportMemoryWin32HandleInfoKHR.get_name(segment, 0L); } + /// {@return `name` at the given index} + /// @param index the index + public @CType("LPCWSTR") java.lang.foreign.MemorySegment nameAt(long index) { return VkImportMemoryWin32HandleInfoKHR.get_name(this.segment(), index); } + /// {@return `name`} + public @CType("LPCWSTR") java.lang.foreign.MemorySegment name() { return VkImportMemoryWin32HandleInfoKHR.get_name(this.segment()); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_name(MemorySegment segment, long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VH_name.set(segment, 0L, index, value); } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_name(MemorySegment segment, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoKHR.set_name(segment, 0L, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoKHR nameAt(long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoKHR.set_name(this.segment(), index, value); return this; } + /// Sets `name` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoKHR name(@CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoKHR.set_name(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportSemaphoreFdInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportSemaphoreFdInfoKHR.java new file mode 100644 index 00000000..fae28968 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportSemaphoreFdInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### fd +/// [VarHandle][#VH_fd] - [Getter][#fd()] - [Setter][#fd(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportSemaphoreFdInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// VkSemaphoreImportFlags flags; +/// VkExternalSemaphoreHandleTypeFlagBits handleType; +/// int fd; +/// } VkImportSemaphoreFdInfoKHR; +/// ``` +public final class VkImportSemaphoreFdInfoKHR extends Struct { + /// The struct layout of `VkImportSemaphoreFdInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.JAVA_INT.withName("fd") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `fd` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fd")); + + /// Creates `VkImportSemaphoreFdInfoKHR` with the given segment. + /// @param segment the memory segment + public VkImportSemaphoreFdInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportSemaphoreFdInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreFdInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreFdInfoKHR(segment); } + + /// Creates `VkImportSemaphoreFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreFdInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportSemaphoreFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreFdInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportSemaphoreFdInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportSemaphoreFdInfoKHR` + public static VkImportSemaphoreFdInfoKHR alloc(SegmentAllocator allocator) { return new VkImportSemaphoreFdInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportSemaphoreFdInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportSemaphoreFdInfoKHR` + public static VkImportSemaphoreFdInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkImportSemaphoreFdInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportSemaphoreFdInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportSemaphoreFdInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportSemaphoreFdInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportSemaphoreFdInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkImportSemaphoreFdInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR sType(@CType("VkStructureType") int value) { VkImportSemaphoreFdInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportSemaphoreFdInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportSemaphoreFdInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportSemaphoreFdInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreFdInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreFdInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreFdInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkImportSemaphoreFdInfoKHR.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkImportSemaphoreFdInfoKHR.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkImportSemaphoreFdInfoKHR.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreFdInfoKHR.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreFdInfoKHR.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreFdInfoKHR.set_semaphore(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphoreImportFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSemaphoreImportFlags") int get_flags(MemorySegment segment) { return VkImportSemaphoreFdInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSemaphoreImportFlags") int flagsAt(long index) { return VkImportSemaphoreFdInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSemaphoreImportFlags") int flags() { return VkImportSemaphoreFdInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSemaphoreImportFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSemaphoreImportFlags") int value) { VkImportSemaphoreFdInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR flagsAt(long index, @CType("VkSemaphoreImportFlags") int value) { VkImportSemaphoreFdInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR flags(@CType("VkSemaphoreImportFlags") int value) { VkImportSemaphoreFdInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportSemaphoreFdInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportSemaphoreFdInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleType() { return VkImportSemaphoreFdInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreFdInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR handleTypeAt(long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreFdInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR handleType(@CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreFdInfoKHR.set_handleType(this.segment(), value); return this; } + + /// {@return `fd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int") int get_fd(MemorySegment segment, long index) { return (int) VH_fd.get(segment, 0L, index); } + /// {@return `fd`} + /// @param segment the segment of the struct + public static @CType("int") int get_fd(MemorySegment segment) { return VkImportSemaphoreFdInfoKHR.get_fd(segment, 0L); } + /// {@return `fd` at the given index} + /// @param index the index + public @CType("int") int fdAt(long index) { return VkImportSemaphoreFdInfoKHR.get_fd(this.segment(), index); } + /// {@return `fd`} + public @CType("int") int fd() { return VkImportSemaphoreFdInfoKHR.get_fd(this.segment()); } + /// Sets `fd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fd(MemorySegment segment, long index, @CType("int") int value) { VH_fd.set(segment, 0L, index, value); } + /// Sets `fd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fd(MemorySegment segment, @CType("int") int value) { VkImportSemaphoreFdInfoKHR.set_fd(segment, 0L, value); } + /// Sets `fd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR fdAt(long index, @CType("int") int value) { VkImportSemaphoreFdInfoKHR.set_fd(this.segment(), index, value); return this; } + /// Sets `fd` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreFdInfoKHR fd(@CType("int") int value) { VkImportSemaphoreFdInfoKHR.set_fd(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportSemaphoreWin32HandleInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportSemaphoreWin32HandleInfoKHR.java new file mode 100644 index 00000000..0d2d4a20 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkImportSemaphoreWin32HandleInfoKHR.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### handle +/// [VarHandle][#VH_handle] - [Getter][#handle()] - [Setter][#handle(java.lang.foreign.MemorySegment)] +/// ### name +/// [VarHandle][#VH_name] - [Getter][#name()] - [Setter][#name(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportSemaphoreWin32HandleInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// VkSemaphoreImportFlags flags; +/// VkExternalSemaphoreHandleTypeFlagBits handleType; +/// HANDLE handle; +/// LPCWSTR name; +/// } VkImportSemaphoreWin32HandleInfoKHR; +/// ``` +public final class VkImportSemaphoreWin32HandleInfoKHR extends Struct { + /// The struct layout of `VkImportSemaphoreWin32HandleInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.ADDRESS.withName("handle"), + ValueLayout.ADDRESS.withName("name") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `handle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_handle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handle")); + /// The [VarHandle] of `name` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_name = LAYOUT.arrayElementVarHandle(PathElement.groupElement("name")); + + /// Creates `VkImportSemaphoreWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + public VkImportSemaphoreWin32HandleInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportSemaphoreWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreWin32HandleInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreWin32HandleInfoKHR(segment); } + + /// Creates `VkImportSemaphoreWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreWin32HandleInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportSemaphoreWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreWin32HandleInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportSemaphoreWin32HandleInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportSemaphoreWin32HandleInfoKHR` + public static VkImportSemaphoreWin32HandleInfoKHR alloc(SegmentAllocator allocator) { return new VkImportSemaphoreWin32HandleInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportSemaphoreWin32HandleInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportSemaphoreWin32HandleInfoKHR` + public static VkImportSemaphoreWin32HandleInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkImportSemaphoreWin32HandleInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportSemaphoreWin32HandleInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportSemaphoreWin32HandleInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportSemaphoreWin32HandleInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportSemaphoreWin32HandleInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkImportSemaphoreWin32HandleInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR sType(@CType("VkStructureType") int value) { VkImportSemaphoreWin32HandleInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportSemaphoreWin32HandleInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportSemaphoreWin32HandleInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportSemaphoreWin32HandleInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkImportSemaphoreWin32HandleInfoKHR.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkImportSemaphoreWin32HandleInfoKHR.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkImportSemaphoreWin32HandleInfoKHR.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_semaphore(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphoreImportFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSemaphoreImportFlags") int get_flags(MemorySegment segment) { return VkImportSemaphoreWin32HandleInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSemaphoreImportFlags") int flagsAt(long index) { return VkImportSemaphoreWin32HandleInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSemaphoreImportFlags") int flags() { return VkImportSemaphoreWin32HandleInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSemaphoreImportFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSemaphoreImportFlags") int value) { VkImportSemaphoreWin32HandleInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR flagsAt(long index, @CType("VkSemaphoreImportFlags") int value) { VkImportSemaphoreWin32HandleInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR flags(@CType("VkSemaphoreImportFlags") int value) { VkImportSemaphoreWin32HandleInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportSemaphoreWin32HandleInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportSemaphoreWin32HandleInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleType() { return VkImportSemaphoreWin32HandleInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreWin32HandleInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR handleTypeAt(long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreWin32HandleInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR handleType(@CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreWin32HandleInfoKHR.set_handleType(this.segment(), value); return this; } + + /// {@return `handle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("HANDLE") java.lang.foreign.MemorySegment get_handle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_handle.get(segment, 0L, index); } + /// {@return `handle`} + /// @param segment the segment of the struct + public static @CType("HANDLE") java.lang.foreign.MemorySegment get_handle(MemorySegment segment) { return VkImportSemaphoreWin32HandleInfoKHR.get_handle(segment, 0L); } + /// {@return `handle` at the given index} + /// @param index the index + public @CType("HANDLE") java.lang.foreign.MemorySegment handleAt(long index) { return VkImportSemaphoreWin32HandleInfoKHR.get_handle(this.segment(), index); } + /// {@return `handle`} + public @CType("HANDLE") java.lang.foreign.MemorySegment handle() { return VkImportSemaphoreWin32HandleInfoKHR.get_handle(this.segment()); } + /// Sets `handle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handle(MemorySegment segment, long index, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VH_handle.set(segment, 0L, index, value); } + /// Sets `handle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handle(MemorySegment segment, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_handle(segment, 0L, value); } + /// Sets `handle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR handleAt(long index, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_handle(this.segment(), index, value); return this; } + /// Sets `handle` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR handle(@CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_handle(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_name.get(segment, 0L, index); } + /// {@return `name`} + /// @param segment the segment of the struct + public static @CType("LPCWSTR") java.lang.foreign.MemorySegment get_name(MemorySegment segment) { return VkImportSemaphoreWin32HandleInfoKHR.get_name(segment, 0L); } + /// {@return `name` at the given index} + /// @param index the index + public @CType("LPCWSTR") java.lang.foreign.MemorySegment nameAt(long index) { return VkImportSemaphoreWin32HandleInfoKHR.get_name(this.segment(), index); } + /// {@return `name`} + public @CType("LPCWSTR") java.lang.foreign.MemorySegment name() { return VkImportSemaphoreWin32HandleInfoKHR.get_name(this.segment()); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_name(MemorySegment segment, long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VH_name.set(segment, 0L, index, value); } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_name(MemorySegment segment, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_name(segment, 0L, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR nameAt(long index, @CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_name(this.segment(), index, value); return this; } + /// Sets `name` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreWin32HandleInfoKHR name(@CType("LPCWSTR") java.lang.foreign.MemorySegment value) { VkImportSemaphoreWin32HandleInfoKHR.set_name(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryFdPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryFdPropertiesKHR.java new file mode 100644 index 00000000..0f55aa5e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryFdPropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryTypeBits +/// [VarHandle][#VH_memoryTypeBits] - [Getter][#memoryTypeBits()] - [Setter][#memoryTypeBits(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryFdPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t memoryTypeBits; +/// } VkMemoryFdPropertiesKHR; +/// ``` +public final class VkMemoryFdPropertiesKHR extends Struct { + /// The struct layout of `VkMemoryFdPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryTypeBits") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryTypeBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeBits")); + + /// Creates `VkMemoryFdPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkMemoryFdPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryFdPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryFdPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryFdPropertiesKHR(segment); } + + /// Creates `VkMemoryFdPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryFdPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryFdPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryFdPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryFdPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryFdPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryFdPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryFdPropertiesKHR` + public static VkMemoryFdPropertiesKHR alloc(SegmentAllocator allocator) { return new VkMemoryFdPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryFdPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryFdPropertiesKHR` + public static VkMemoryFdPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkMemoryFdPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryFdPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryFdPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryFdPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryFdPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryFdPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryFdPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryFdPropertiesKHR sType(@CType("VkStructureType") int value) { VkMemoryFdPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryFdPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryFdPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryFdPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryFdPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryFdPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryFdPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryFdPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryFdPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryTypeBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment, long index) { return (int) VH_memoryTypeBits.get(segment, 0L, index); } + /// {@return `memoryTypeBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment) { return VkMemoryFdPropertiesKHR.get_memoryTypeBits(segment, 0L); } + /// {@return `memoryTypeBits` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeBitsAt(long index) { return VkMemoryFdPropertiesKHR.get_memoryTypeBits(this.segment(), index); } + /// {@return `memoryTypeBits`} + public @CType("uint32_t") int memoryTypeBits() { return VkMemoryFdPropertiesKHR.get_memoryTypeBits(this.segment()); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeBits.set(segment, 0L, index, value); } + /// Sets `memoryTypeBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, @CType("uint32_t") int value) { VkMemoryFdPropertiesKHR.set_memoryTypeBits(segment, 0L, value); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryFdPropertiesKHR memoryTypeBitsAt(long index, @CType("uint32_t") int value) { VkMemoryFdPropertiesKHR.set_memoryTypeBits(this.segment(), index, value); return this; } + /// Sets `memoryTypeBits` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryFdPropertiesKHR memoryTypeBits(@CType("uint32_t") int value) { VkMemoryFdPropertiesKHR.set_memoryTypeBits(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryGetFdInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryGetFdInfoKHR.java new file mode 100644 index 00000000..cb950125 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryGetFdInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryGetFdInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceMemory memory; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// } VkMemoryGetFdInfoKHR; +/// ``` +public final class VkMemoryGetFdInfoKHR extends Struct { + /// The struct layout of `VkMemoryGetFdInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkMemoryGetFdInfoKHR` with the given segment. + /// @param segment the memory segment + public VkMemoryGetFdInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryGetFdInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetFdInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetFdInfoKHR(segment); } + + /// Creates `VkMemoryGetFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetFdInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryGetFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetFdInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryGetFdInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryGetFdInfoKHR` + public static VkMemoryGetFdInfoKHR alloc(SegmentAllocator allocator) { return new VkMemoryGetFdInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryGetFdInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryGetFdInfoKHR` + public static VkMemoryGetFdInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkMemoryGetFdInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryGetFdInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryGetFdInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryGetFdInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryGetFdInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetFdInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryGetFdInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetFdInfoKHR sType(@CType("VkStructureType") int value) { VkMemoryGetFdInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryGetFdInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryGetFdInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryGetFdInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetFdInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetFdInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetFdInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetFdInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetFdInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkMemoryGetFdInfoKHR.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkMemoryGetFdInfoKHR.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkMemoryGetFdInfoKHR.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetFdInfoKHR.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetFdInfoKHR memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetFdInfoKHR.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetFdInfoKHR memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetFdInfoKHR.set_memory(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkMemoryGetFdInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkMemoryGetFdInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkMemoryGetFdInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetFdInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetFdInfoKHR handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetFdInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetFdInfoKHR handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetFdInfoKHR.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryGetWin32HandleInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryGetWin32HandleInfoKHR.java new file mode 100644 index 00000000..1585bc68 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryGetWin32HandleInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryGetWin32HandleInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceMemory memory; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// } VkMemoryGetWin32HandleInfoKHR; +/// ``` +public final class VkMemoryGetWin32HandleInfoKHR extends Struct { + /// The struct layout of `VkMemoryGetWin32HandleInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkMemoryGetWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + public VkMemoryGetWin32HandleInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryGetWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetWin32HandleInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetWin32HandleInfoKHR(segment); } + + /// Creates `VkMemoryGetWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetWin32HandleInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryGetWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetWin32HandleInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryGetWin32HandleInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryGetWin32HandleInfoKHR` + public static VkMemoryGetWin32HandleInfoKHR alloc(SegmentAllocator allocator) { return new VkMemoryGetWin32HandleInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryGetWin32HandleInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryGetWin32HandleInfoKHR` + public static VkMemoryGetWin32HandleInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkMemoryGetWin32HandleInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryGetWin32HandleInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryGetWin32HandleInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryGetWin32HandleInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryGetWin32HandleInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetWin32HandleInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryGetWin32HandleInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetWin32HandleInfoKHR sType(@CType("VkStructureType") int value) { VkMemoryGetWin32HandleInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryGetWin32HandleInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryGetWin32HandleInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryGetWin32HandleInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetWin32HandleInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetWin32HandleInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetWin32HandleInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetWin32HandleInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetWin32HandleInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkMemoryGetWin32HandleInfoKHR.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkMemoryGetWin32HandleInfoKHR.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkMemoryGetWin32HandleInfoKHR.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetWin32HandleInfoKHR.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetWin32HandleInfoKHR memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetWin32HandleInfoKHR.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetWin32HandleInfoKHR memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetWin32HandleInfoKHR.set_memory(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkMemoryGetWin32HandleInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkMemoryGetWin32HandleInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkMemoryGetWin32HandleInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetWin32HandleInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetWin32HandleInfoKHR handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetWin32HandleInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetWin32HandleInfoKHR handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetWin32HandleInfoKHR.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryWin32HandlePropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryWin32HandlePropertiesKHR.java new file mode 100644 index 00000000..70b34561 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkMemoryWin32HandlePropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryTypeBits +/// [VarHandle][#VH_memoryTypeBits] - [Getter][#memoryTypeBits()] - [Setter][#memoryTypeBits(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryWin32HandlePropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t memoryTypeBits; +/// } VkMemoryWin32HandlePropertiesKHR; +/// ``` +public final class VkMemoryWin32HandlePropertiesKHR extends Struct { + /// The struct layout of `VkMemoryWin32HandlePropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryTypeBits") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryTypeBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeBits")); + + /// Creates `VkMemoryWin32HandlePropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkMemoryWin32HandlePropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryWin32HandlePropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryWin32HandlePropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryWin32HandlePropertiesKHR(segment); } + + /// Creates `VkMemoryWin32HandlePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryWin32HandlePropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryWin32HandlePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryWin32HandlePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryWin32HandlePropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryWin32HandlePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryWin32HandlePropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryWin32HandlePropertiesKHR` + public static VkMemoryWin32HandlePropertiesKHR alloc(SegmentAllocator allocator) { return new VkMemoryWin32HandlePropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryWin32HandlePropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryWin32HandlePropertiesKHR` + public static VkMemoryWin32HandlePropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkMemoryWin32HandlePropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryWin32HandlePropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryWin32HandlePropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryWin32HandlePropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryWin32HandlePropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryWin32HandlePropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryWin32HandlePropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryWin32HandlePropertiesKHR sType(@CType("VkStructureType") int value) { VkMemoryWin32HandlePropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryWin32HandlePropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryWin32HandlePropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryWin32HandlePropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryWin32HandlePropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryWin32HandlePropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryWin32HandlePropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryWin32HandlePropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryWin32HandlePropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryTypeBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment, long index) { return (int) VH_memoryTypeBits.get(segment, 0L, index); } + /// {@return `memoryTypeBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment) { return VkMemoryWin32HandlePropertiesKHR.get_memoryTypeBits(segment, 0L); } + /// {@return `memoryTypeBits` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeBitsAt(long index) { return VkMemoryWin32HandlePropertiesKHR.get_memoryTypeBits(this.segment(), index); } + /// {@return `memoryTypeBits`} + public @CType("uint32_t") int memoryTypeBits() { return VkMemoryWin32HandlePropertiesKHR.get_memoryTypeBits(this.segment()); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeBits.set(segment, 0L, index, value); } + /// Sets `memoryTypeBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, @CType("uint32_t") int value) { VkMemoryWin32HandlePropertiesKHR.set_memoryTypeBits(segment, 0L, value); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryWin32HandlePropertiesKHR memoryTypeBitsAt(long index, @CType("uint32_t") int value) { VkMemoryWin32HandlePropertiesKHR.set_memoryTypeBits(this.segment(), index, value); return this; } + /// Sets `memoryTypeBits` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryWin32HandlePropertiesKHR memoryTypeBits(@CType("uint32_t") int value) { VkMemoryWin32HandlePropertiesKHR.set_memoryTypeBits(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceCounterDescriptionKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceCounterDescriptionKHR.java new file mode 100644 index 00000000..b87d2606 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceCounterDescriptionKHR.java @@ -0,0 +1,347 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### name +/// [Byte offset handle][#MH_name] - [Memory layout][#ML_name] - [Getter][#name(long)] - [Setter][#name(long, java.lang.foreign.MemorySegment)] +/// ### category +/// [Byte offset handle][#MH_category] - [Memory layout][#ML_category] - [Getter][#category(long)] - [Setter][#category(long, java.lang.foreign.MemorySegment)] +/// ### description +/// [Byte offset handle][#MH_description] - [Memory layout][#ML_description] - [Getter][#description(long)] - [Setter][#description(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPerformanceCounterDescriptionKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkPerformanceCounterDescriptionFlagsKHR flags; +/// char[VK_MAX_DESCRIPTION_SIZE] name; +/// char[VK_MAX_DESCRIPTION_SIZE] category; +/// char[VK_MAX_DESCRIPTION_SIZE] description; +/// } VkPerformanceCounterDescriptionKHR; +/// ``` +public final class VkPerformanceCounterDescriptionKHR extends Struct { + /// The struct layout of `VkPerformanceCounterDescriptionKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("name"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("category"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("description") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The byte offset handle of `name` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_name = LAYOUT.byteOffsetHandle(PathElement.groupElement("name"), PathElement.sequenceElement()); + /// The memory layout of `name`. + public static final MemoryLayout ML_name = LAYOUT.select(PathElement.groupElement("name")); + /// The byte offset handle of `category` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_category = LAYOUT.byteOffsetHandle(PathElement.groupElement("category"), PathElement.sequenceElement()); + /// The memory layout of `category`. + public static final MemoryLayout ML_category = LAYOUT.select(PathElement.groupElement("category")); + /// The byte offset handle of `description` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_description = LAYOUT.byteOffsetHandle(PathElement.groupElement("description"), PathElement.sequenceElement()); + /// The memory layout of `description`. + public static final MemoryLayout ML_description = LAYOUT.select(PathElement.groupElement("description")); + + /// Creates `VkPerformanceCounterDescriptionKHR` with the given segment. + /// @param segment the memory segment + public VkPerformanceCounterDescriptionKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceCounterDescriptionKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceCounterDescriptionKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceCounterDescriptionKHR(segment); } + + /// Creates `VkPerformanceCounterDescriptionKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceCounterDescriptionKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceCounterDescriptionKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceCounterDescriptionKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceCounterDescriptionKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceCounterDescriptionKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceCounterDescriptionKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceCounterDescriptionKHR` + public static VkPerformanceCounterDescriptionKHR alloc(SegmentAllocator allocator) { return new VkPerformanceCounterDescriptionKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceCounterDescriptionKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceCounterDescriptionKHR` + public static VkPerformanceCounterDescriptionKHR alloc(SegmentAllocator allocator, long count) { return new VkPerformanceCounterDescriptionKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPerformanceCounterDescriptionKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPerformanceCounterDescriptionKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPerformanceCounterDescriptionKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPerformanceCounterDescriptionKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPerformanceCounterDescriptionKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR sType(@CType("VkStructureType") int value) { VkPerformanceCounterDescriptionKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPerformanceCounterDescriptionKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPerformanceCounterDescriptionKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPerformanceCounterDescriptionKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPerformanceCounterDescriptionFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPerformanceCounterDescriptionFlagsKHR") int get_flags(MemorySegment segment) { return VkPerformanceCounterDescriptionKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPerformanceCounterDescriptionFlagsKHR") int flagsAt(long index) { return VkPerformanceCounterDescriptionKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPerformanceCounterDescriptionFlagsKHR") int flags() { return VkPerformanceCounterDescriptionKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPerformanceCounterDescriptionFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPerformanceCounterDescriptionFlagsKHR") int value) { VkPerformanceCounterDescriptionKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR flagsAt(long index, @CType("VkPerformanceCounterDescriptionFlagsKHR") int value) { VkPerformanceCounterDescriptionKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR flags(@CType("VkPerformanceCounterDescriptionFlagsKHR") int value) { VkPerformanceCounterDescriptionKHR.set_flags(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_name.invokeExact(0L, elementIndex), index), ML_name); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `name`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long elementIndex) { return VkPerformanceCounterDescriptionKHR.get_name(segment, 0L, elementIndex); } + /// {@return `name` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment nameAt(long index, long elementIndex) { return VkPerformanceCounterDescriptionKHR.get_name(this.segment(), index, elementIndex); } + /// {@return `name`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment name(long elementIndex) { return VkPerformanceCounterDescriptionKHR.get_name(this.segment(), elementIndex); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_name(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_name.invokeExact(0L, elementIndex), index), ML_name.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_name(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_name(segment, 0L, elementIndex, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR nameAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_name(this.segment(), index, elementIndex, value); return this; } + /// Sets `name` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR name(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_name(this.segment(), elementIndex, value); return this; } + + /// {@return `category` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_category(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_category.invokeExact(0L, elementIndex), index), ML_category); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `category`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_category(MemorySegment segment, long elementIndex) { return VkPerformanceCounterDescriptionKHR.get_category(segment, 0L, elementIndex); } + /// {@return `category` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment categoryAt(long index, long elementIndex) { return VkPerformanceCounterDescriptionKHR.get_category(this.segment(), index, elementIndex); } + /// {@return `category`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment category(long elementIndex) { return VkPerformanceCounterDescriptionKHR.get_category(this.segment(), elementIndex); } + /// Sets `category` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_category(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_category.invokeExact(0L, elementIndex), index), ML_category.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `category` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_category(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_category(segment, 0L, elementIndex, value); } + /// Sets `category` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR categoryAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_category(this.segment(), index, elementIndex, value); return this; } + /// Sets `category` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR category(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_category(this.segment(), elementIndex, value); return this; } + + /// {@return `description` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `description`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long elementIndex) { return VkPerformanceCounterDescriptionKHR.get_description(segment, 0L, elementIndex); } + /// {@return `description` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment descriptionAt(long index, long elementIndex) { return VkPerformanceCounterDescriptionKHR.get_description(this.segment(), index, elementIndex); } + /// {@return `description`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment description(long elementIndex) { return VkPerformanceCounterDescriptionKHR.get_description(this.segment(), elementIndex); } + /// Sets `description` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `description` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_description(segment, 0L, elementIndex, value); } + /// Sets `description` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR descriptionAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_description(this.segment(), index, elementIndex, value); return this; } + /// Sets `description` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPerformanceCounterDescriptionKHR description(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterDescriptionKHR.set_description(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceCounterKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceCounterKHR.java new file mode 100644 index 00000000..8f3f0cdd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceCounterKHR.java @@ -0,0 +1,313 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### unit +/// [VarHandle][#VH_unit] - [Getter][#unit()] - [Setter][#unit(int)] +/// ### scope +/// [VarHandle][#VH_scope] - [Getter][#scope()] - [Setter][#scope(int)] +/// ### storage +/// [VarHandle][#VH_storage] - [Getter][#storage()] - [Setter][#storage(int)] +/// ### uuid +/// [Byte offset handle][#MH_uuid] - [Memory layout][#ML_uuid] - [Getter][#uuid(long)] - [Setter][#uuid(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPerformanceCounterKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkPerformanceCounterUnitKHR unit; +/// VkPerformanceCounterScopeKHR scope; +/// VkPerformanceCounterStorageKHR storage; +/// uint8_t[VK_UUID_SIZE] uuid; +/// } VkPerformanceCounterKHR; +/// ``` +public final class VkPerformanceCounterKHR extends Struct { + /// The struct layout of `VkPerformanceCounterKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("unit"), + ValueLayout.JAVA_INT.withName("scope"), + ValueLayout.JAVA_INT.withName("storage"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("uuid") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `unit` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_unit = LAYOUT.arrayElementVarHandle(PathElement.groupElement("unit")); + /// The [VarHandle] of `scope` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_scope = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scope")); + /// The [VarHandle] of `storage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storage")); + /// The byte offset handle of `uuid` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_uuid = LAYOUT.byteOffsetHandle(PathElement.groupElement("uuid"), PathElement.sequenceElement()); + /// The memory layout of `uuid`. + public static final MemoryLayout ML_uuid = LAYOUT.select(PathElement.groupElement("uuid")); + + /// Creates `VkPerformanceCounterKHR` with the given segment. + /// @param segment the memory segment + public VkPerformanceCounterKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceCounterKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceCounterKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceCounterKHR(segment); } + + /// Creates `VkPerformanceCounterKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceCounterKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceCounterKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceCounterKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceCounterKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceCounterKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceCounterKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceCounterKHR` + public static VkPerformanceCounterKHR alloc(SegmentAllocator allocator) { return new VkPerformanceCounterKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceCounterKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceCounterKHR` + public static VkPerformanceCounterKHR alloc(SegmentAllocator allocator, long count) { return new VkPerformanceCounterKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPerformanceCounterKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPerformanceCounterKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPerformanceCounterKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPerformanceCounterKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPerformanceCounterKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR sType(@CType("VkStructureType") int value) { VkPerformanceCounterKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPerformanceCounterKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPerformanceCounterKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPerformanceCounterKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPerformanceCounterKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPerformanceCounterKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPerformanceCounterKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `unit` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPerformanceCounterUnitKHR") int get_unit(MemorySegment segment, long index) { return (int) VH_unit.get(segment, 0L, index); } + /// {@return `unit`} + /// @param segment the segment of the struct + public static @CType("VkPerformanceCounterUnitKHR") int get_unit(MemorySegment segment) { return VkPerformanceCounterKHR.get_unit(segment, 0L); } + /// {@return `unit` at the given index} + /// @param index the index + public @CType("VkPerformanceCounterUnitKHR") int unitAt(long index) { return VkPerformanceCounterKHR.get_unit(this.segment(), index); } + /// {@return `unit`} + public @CType("VkPerformanceCounterUnitKHR") int unit() { return VkPerformanceCounterKHR.get_unit(this.segment()); } + /// Sets `unit` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_unit(MemorySegment segment, long index, @CType("VkPerformanceCounterUnitKHR") int value) { VH_unit.set(segment, 0L, index, value); } + /// Sets `unit` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_unit(MemorySegment segment, @CType("VkPerformanceCounterUnitKHR") int value) { VkPerformanceCounterKHR.set_unit(segment, 0L, value); } + /// Sets `unit` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR unitAt(long index, @CType("VkPerformanceCounterUnitKHR") int value) { VkPerformanceCounterKHR.set_unit(this.segment(), index, value); return this; } + /// Sets `unit` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR unit(@CType("VkPerformanceCounterUnitKHR") int value) { VkPerformanceCounterKHR.set_unit(this.segment(), value); return this; } + + /// {@return `scope` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPerformanceCounterScopeKHR") int get_scope(MemorySegment segment, long index) { return (int) VH_scope.get(segment, 0L, index); } + /// {@return `scope`} + /// @param segment the segment of the struct + public static @CType("VkPerformanceCounterScopeKHR") int get_scope(MemorySegment segment) { return VkPerformanceCounterKHR.get_scope(segment, 0L); } + /// {@return `scope` at the given index} + /// @param index the index + public @CType("VkPerformanceCounterScopeKHR") int scopeAt(long index) { return VkPerformanceCounterKHR.get_scope(this.segment(), index); } + /// {@return `scope`} + public @CType("VkPerformanceCounterScopeKHR") int scope() { return VkPerformanceCounterKHR.get_scope(this.segment()); } + /// Sets `scope` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scope(MemorySegment segment, long index, @CType("VkPerformanceCounterScopeKHR") int value) { VH_scope.set(segment, 0L, index, value); } + /// Sets `scope` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scope(MemorySegment segment, @CType("VkPerformanceCounterScopeKHR") int value) { VkPerformanceCounterKHR.set_scope(segment, 0L, value); } + /// Sets `scope` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR scopeAt(long index, @CType("VkPerformanceCounterScopeKHR") int value) { VkPerformanceCounterKHR.set_scope(this.segment(), index, value); return this; } + /// Sets `scope` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR scope(@CType("VkPerformanceCounterScopeKHR") int value) { VkPerformanceCounterKHR.set_scope(this.segment(), value); return this; } + + /// {@return `storage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPerformanceCounterStorageKHR") int get_storage(MemorySegment segment, long index) { return (int) VH_storage.get(segment, 0L, index); } + /// {@return `storage`} + /// @param segment the segment of the struct + public static @CType("VkPerformanceCounterStorageKHR") int get_storage(MemorySegment segment) { return VkPerformanceCounterKHR.get_storage(segment, 0L); } + /// {@return `storage` at the given index} + /// @param index the index + public @CType("VkPerformanceCounterStorageKHR") int storageAt(long index) { return VkPerformanceCounterKHR.get_storage(this.segment(), index); } + /// {@return `storage`} + public @CType("VkPerformanceCounterStorageKHR") int storage() { return VkPerformanceCounterKHR.get_storage(this.segment()); } + /// Sets `storage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storage(MemorySegment segment, long index, @CType("VkPerformanceCounterStorageKHR") int value) { VH_storage.set(segment, 0L, index, value); } + /// Sets `storage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storage(MemorySegment segment, @CType("VkPerformanceCounterStorageKHR") int value) { VkPerformanceCounterKHR.set_storage(segment, 0L, value); } + /// Sets `storage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR storageAt(long index, @CType("VkPerformanceCounterStorageKHR") int value) { VkPerformanceCounterKHR.set_storage(this.segment(), index, value); return this; } + /// Sets `storage` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR storage(@CType("VkPerformanceCounterStorageKHR") int value) { VkPerformanceCounterKHR.set_storage(this.segment(), value); return this; } + + /// {@return `uuid` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_uuid(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_uuid.invokeExact(0L, elementIndex), index), ML_uuid); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `uuid`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_uuid(MemorySegment segment, long elementIndex) { return VkPerformanceCounterKHR.get_uuid(segment, 0L, elementIndex); } + /// {@return `uuid` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment uuidAt(long index, long elementIndex) { return VkPerformanceCounterKHR.get_uuid(this.segment(), index, elementIndex); } + /// {@return `uuid`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment uuid(long elementIndex) { return VkPerformanceCounterKHR.get_uuid(this.segment(), elementIndex); } + /// Sets `uuid` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_uuid(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_uuid.invokeExact(0L, elementIndex), index), ML_uuid.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `uuid` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_uuid(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterKHR.set_uuid(segment, 0L, elementIndex, value); } + /// Sets `uuid` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR uuidAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterKHR.set_uuid(this.segment(), index, elementIndex, value); return this; } + /// Sets `uuid` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPerformanceCounterKHR uuid(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPerformanceCounterKHR.set_uuid(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceQueryReservationInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceQueryReservationInfoKHR.java new file mode 100644 index 00000000..1b17cde7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceQueryReservationInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxPerformanceQueriesPerPool +/// [VarHandle][#VH_maxPerformanceQueriesPerPool] - [Getter][#maxPerformanceQueriesPerPool()] - [Setter][#maxPerformanceQueriesPerPool(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPerformanceQueryReservationInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t maxPerformanceQueriesPerPool; +/// } VkPerformanceQueryReservationInfoKHR; +/// ``` +public final class VkPerformanceQueryReservationInfoKHR extends Struct { + /// The struct layout of `VkPerformanceQueryReservationInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxPerformanceQueriesPerPool") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxPerformanceQueriesPerPool` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerformanceQueriesPerPool = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerformanceQueriesPerPool")); + + /// Creates `VkPerformanceQueryReservationInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPerformanceQueryReservationInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceQueryReservationInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceQueryReservationInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceQueryReservationInfoKHR(segment); } + + /// Creates `VkPerformanceQueryReservationInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceQueryReservationInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceQueryReservationInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceQueryReservationInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceQueryReservationInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceQueryReservationInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceQueryReservationInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceQueryReservationInfoKHR` + public static VkPerformanceQueryReservationInfoKHR alloc(SegmentAllocator allocator) { return new VkPerformanceQueryReservationInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceQueryReservationInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceQueryReservationInfoKHR` + public static VkPerformanceQueryReservationInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPerformanceQueryReservationInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPerformanceQueryReservationInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPerformanceQueryReservationInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPerformanceQueryReservationInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPerformanceQueryReservationInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceQueryReservationInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPerformanceQueryReservationInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceQueryReservationInfoKHR sType(@CType("VkStructureType") int value) { VkPerformanceQueryReservationInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPerformanceQueryReservationInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPerformanceQueryReservationInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPerformanceQueryReservationInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceQueryReservationInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceQueryReservationInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceQueryReservationInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceQueryReservationInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceQueryReservationInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxPerformanceQueriesPerPool` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerformanceQueriesPerPool(MemorySegment segment, long index) { return (int) VH_maxPerformanceQueriesPerPool.get(segment, 0L, index); } + /// {@return `maxPerformanceQueriesPerPool`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerformanceQueriesPerPool(MemorySegment segment) { return VkPerformanceQueryReservationInfoKHR.get_maxPerformanceQueriesPerPool(segment, 0L); } + /// {@return `maxPerformanceQueriesPerPool` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerformanceQueriesPerPoolAt(long index) { return VkPerformanceQueryReservationInfoKHR.get_maxPerformanceQueriesPerPool(this.segment(), index); } + /// {@return `maxPerformanceQueriesPerPool`} + public @CType("uint32_t") int maxPerformanceQueriesPerPool() { return VkPerformanceQueryReservationInfoKHR.get_maxPerformanceQueriesPerPool(this.segment()); } + /// Sets `maxPerformanceQueriesPerPool` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerformanceQueriesPerPool(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerformanceQueriesPerPool.set(segment, 0L, index, value); } + /// Sets `maxPerformanceQueriesPerPool` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerformanceQueriesPerPool(MemorySegment segment, @CType("uint32_t") int value) { VkPerformanceQueryReservationInfoKHR.set_maxPerformanceQueriesPerPool(segment, 0L, value); } + /// Sets `maxPerformanceQueriesPerPool` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceQueryReservationInfoKHR maxPerformanceQueriesPerPoolAt(long index, @CType("uint32_t") int value) { VkPerformanceQueryReservationInfoKHR.set_maxPerformanceQueriesPerPool(this.segment(), index, value); return this; } + /// Sets `maxPerformanceQueriesPerPool` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceQueryReservationInfoKHR maxPerformanceQueriesPerPool(@CType("uint32_t") int value) { VkPerformanceQueryReservationInfoKHR.set_maxPerformanceQueriesPerPool(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceQuerySubmitInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceQuerySubmitInfoKHR.java new file mode 100644 index 00000000..67752aae --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPerformanceQuerySubmitInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### counterPassIndex +/// [VarHandle][#VH_counterPassIndex] - [Getter][#counterPassIndex()] - [Setter][#counterPassIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPerformanceQuerySubmitInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t counterPassIndex; +/// } VkPerformanceQuerySubmitInfoKHR; +/// ``` +public final class VkPerformanceQuerySubmitInfoKHR extends Struct { + /// The struct layout of `VkPerformanceQuerySubmitInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("counterPassIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `counterPassIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_counterPassIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("counterPassIndex")); + + /// Creates `VkPerformanceQuerySubmitInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPerformanceQuerySubmitInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceQuerySubmitInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceQuerySubmitInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceQuerySubmitInfoKHR(segment); } + + /// Creates `VkPerformanceQuerySubmitInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceQuerySubmitInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceQuerySubmitInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceQuerySubmitInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceQuerySubmitInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceQuerySubmitInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceQuerySubmitInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceQuerySubmitInfoKHR` + public static VkPerformanceQuerySubmitInfoKHR alloc(SegmentAllocator allocator) { return new VkPerformanceQuerySubmitInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceQuerySubmitInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceQuerySubmitInfoKHR` + public static VkPerformanceQuerySubmitInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPerformanceQuerySubmitInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPerformanceQuerySubmitInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPerformanceQuerySubmitInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPerformanceQuerySubmitInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPerformanceQuerySubmitInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceQuerySubmitInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPerformanceQuerySubmitInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceQuerySubmitInfoKHR sType(@CType("VkStructureType") int value) { VkPerformanceQuerySubmitInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPerformanceQuerySubmitInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPerformanceQuerySubmitInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPerformanceQuerySubmitInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceQuerySubmitInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceQuerySubmitInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceQuerySubmitInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceQuerySubmitInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPerformanceQuerySubmitInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `counterPassIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_counterPassIndex(MemorySegment segment, long index) { return (int) VH_counterPassIndex.get(segment, 0L, index); } + /// {@return `counterPassIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_counterPassIndex(MemorySegment segment) { return VkPerformanceQuerySubmitInfoKHR.get_counterPassIndex(segment, 0L); } + /// {@return `counterPassIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int counterPassIndexAt(long index) { return VkPerformanceQuerySubmitInfoKHR.get_counterPassIndex(this.segment(), index); } + /// {@return `counterPassIndex`} + public @CType("uint32_t") int counterPassIndex() { return VkPerformanceQuerySubmitInfoKHR.get_counterPassIndex(this.segment()); } + /// Sets `counterPassIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_counterPassIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_counterPassIndex.set(segment, 0L, index, value); } + /// Sets `counterPassIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_counterPassIndex(MemorySegment segment, @CType("uint32_t") int value) { VkPerformanceQuerySubmitInfoKHR.set_counterPassIndex(segment, 0L, value); } + /// Sets `counterPassIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceQuerySubmitInfoKHR counterPassIndexAt(long index, @CType("uint32_t") int value) { VkPerformanceQuerySubmitInfoKHR.set_counterPassIndex(this.segment(), index, value); return this; } + /// Sets `counterPassIndex` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceQuerySubmitInfoKHR counterPassIndex(@CType("uint32_t") int value) { VkPerformanceQuerySubmitInfoKHR.set_counterPassIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceAccelerationStructureFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceAccelerationStructureFeaturesKHR.java new file mode 100644 index 00000000..710a03b5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceAccelerationStructureFeaturesKHR.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### accelerationStructure +/// [VarHandle][#VH_accelerationStructure] - [Getter][#accelerationStructure()] - [Setter][#accelerationStructure(int)] +/// ### accelerationStructureCaptureReplay +/// [VarHandle][#VH_accelerationStructureCaptureReplay] - [Getter][#accelerationStructureCaptureReplay()] - [Setter][#accelerationStructureCaptureReplay(int)] +/// ### accelerationStructureIndirectBuild +/// [VarHandle][#VH_accelerationStructureIndirectBuild] - [Getter][#accelerationStructureIndirectBuild()] - [Setter][#accelerationStructureIndirectBuild(int)] +/// ### accelerationStructureHostCommands +/// [VarHandle][#VH_accelerationStructureHostCommands] - [Getter][#accelerationStructureHostCommands()] - [Setter][#accelerationStructureHostCommands(int)] +/// ### descriptorBindingAccelerationStructureUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingAccelerationStructureUpdateAfterBind] - [Getter][#descriptorBindingAccelerationStructureUpdateAfterBind()] - [Setter][#descriptorBindingAccelerationStructureUpdateAfterBind(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceAccelerationStructureFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 accelerationStructure; +/// VkBool32 accelerationStructureCaptureReplay; +/// VkBool32 accelerationStructureIndirectBuild; +/// VkBool32 accelerationStructureHostCommands; +/// VkBool32 descriptorBindingAccelerationStructureUpdateAfterBind; +/// } VkPhysicalDeviceAccelerationStructureFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceAccelerationStructureFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceAccelerationStructureFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("accelerationStructure"), + ValueLayout.JAVA_INT.withName("accelerationStructureCaptureReplay"), + ValueLayout.JAVA_INT.withName("accelerationStructureIndirectBuild"), + ValueLayout.JAVA_INT.withName("accelerationStructureHostCommands"), + ValueLayout.JAVA_INT.withName("descriptorBindingAccelerationStructureUpdateAfterBind") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `accelerationStructure` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_accelerationStructure = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructure")); + /// The [VarHandle] of `accelerationStructureCaptureReplay` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_accelerationStructureCaptureReplay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureCaptureReplay")); + /// The [VarHandle] of `accelerationStructureIndirectBuild` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_accelerationStructureIndirectBuild = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureIndirectBuild")); + /// The [VarHandle] of `accelerationStructureHostCommands` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_accelerationStructureHostCommands = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureHostCommands")); + /// The [VarHandle] of `descriptorBindingAccelerationStructureUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingAccelerationStructureUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingAccelerationStructureUpdateAfterBind")); + + /// Creates `VkPhysicalDeviceAccelerationStructureFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceAccelerationStructureFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceAccelerationStructureFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAccelerationStructureFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAccelerationStructureFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceAccelerationStructureFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAccelerationStructureFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAccelerationStructureFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceAccelerationStructureFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAccelerationStructureFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAccelerationStructureFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceAccelerationStructureFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceAccelerationStructureFeaturesKHR` + public static VkPhysicalDeviceAccelerationStructureFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceAccelerationStructureFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceAccelerationStructureFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceAccelerationStructureFeaturesKHR` + public static VkPhysicalDeviceAccelerationStructureFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceAccelerationStructureFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `accelerationStructure` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_accelerationStructure(MemorySegment segment, long index) { return (int) VH_accelerationStructure.get(segment, 0L, index); } + /// {@return `accelerationStructure`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_accelerationStructure(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructure(segment, 0L); } + /// {@return `accelerationStructure` at the given index} + /// @param index the index + public @CType("VkBool32") int accelerationStructureAt(long index) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructure(this.segment(), index); } + /// {@return `accelerationStructure`} + public @CType("VkBool32") int accelerationStructure() { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructure(this.segment()); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_accelerationStructure.set(segment, 0L, index, value); } + /// Sets `accelerationStructure` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructure(segment, 0L, value); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructureAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructure(this.segment(), index, value); return this; } + /// Sets `accelerationStructure` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructure(@CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructure(this.segment(), value); return this; } + + /// {@return `accelerationStructureCaptureReplay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_accelerationStructureCaptureReplay(MemorySegment segment, long index) { return (int) VH_accelerationStructureCaptureReplay.get(segment, 0L, index); } + /// {@return `accelerationStructureCaptureReplay`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_accelerationStructureCaptureReplay(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructureCaptureReplay(segment, 0L); } + /// {@return `accelerationStructureCaptureReplay` at the given index} + /// @param index the index + public @CType("VkBool32") int accelerationStructureCaptureReplayAt(long index) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructureCaptureReplay(this.segment(), index); } + /// {@return `accelerationStructureCaptureReplay`} + public @CType("VkBool32") int accelerationStructureCaptureReplay() { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructureCaptureReplay(this.segment()); } + /// Sets `accelerationStructureCaptureReplay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureCaptureReplay(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_accelerationStructureCaptureReplay.set(segment, 0L, index, value); } + /// Sets `accelerationStructureCaptureReplay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureCaptureReplay(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructureCaptureReplay(segment, 0L, value); } + /// Sets `accelerationStructureCaptureReplay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructureCaptureReplayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructureCaptureReplay(this.segment(), index, value); return this; } + /// Sets `accelerationStructureCaptureReplay` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructureCaptureReplay(@CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructureCaptureReplay(this.segment(), value); return this; } + + /// {@return `accelerationStructureIndirectBuild` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_accelerationStructureIndirectBuild(MemorySegment segment, long index) { return (int) VH_accelerationStructureIndirectBuild.get(segment, 0L, index); } + /// {@return `accelerationStructureIndirectBuild`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_accelerationStructureIndirectBuild(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructureIndirectBuild(segment, 0L); } + /// {@return `accelerationStructureIndirectBuild` at the given index} + /// @param index the index + public @CType("VkBool32") int accelerationStructureIndirectBuildAt(long index) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructureIndirectBuild(this.segment(), index); } + /// {@return `accelerationStructureIndirectBuild`} + public @CType("VkBool32") int accelerationStructureIndirectBuild() { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructureIndirectBuild(this.segment()); } + /// Sets `accelerationStructureIndirectBuild` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureIndirectBuild(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_accelerationStructureIndirectBuild.set(segment, 0L, index, value); } + /// Sets `accelerationStructureIndirectBuild` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureIndirectBuild(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructureIndirectBuild(segment, 0L, value); } + /// Sets `accelerationStructureIndirectBuild` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructureIndirectBuildAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructureIndirectBuild(this.segment(), index, value); return this; } + /// Sets `accelerationStructureIndirectBuild` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructureIndirectBuild(@CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructureIndirectBuild(this.segment(), value); return this; } + + /// {@return `accelerationStructureHostCommands` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_accelerationStructureHostCommands(MemorySegment segment, long index) { return (int) VH_accelerationStructureHostCommands.get(segment, 0L, index); } + /// {@return `accelerationStructureHostCommands`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_accelerationStructureHostCommands(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructureHostCommands(segment, 0L); } + /// {@return `accelerationStructureHostCommands` at the given index} + /// @param index the index + public @CType("VkBool32") int accelerationStructureHostCommandsAt(long index) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructureHostCommands(this.segment(), index); } + /// {@return `accelerationStructureHostCommands`} + public @CType("VkBool32") int accelerationStructureHostCommands() { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_accelerationStructureHostCommands(this.segment()); } + /// Sets `accelerationStructureHostCommands` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureHostCommands(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_accelerationStructureHostCommands.set(segment, 0L, index, value); } + /// Sets `accelerationStructureHostCommands` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureHostCommands(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructureHostCommands(segment, 0L, value); } + /// Sets `accelerationStructureHostCommands` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructureHostCommandsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructureHostCommands(this.segment(), index, value); return this; } + /// Sets `accelerationStructureHostCommands` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructureHostCommands(@CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_accelerationStructureHostCommands(this.segment(), value); return this; } + + /// {@return `descriptorBindingAccelerationStructureUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingAccelerationStructureUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingAccelerationStructureUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingAccelerationStructureUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingAccelerationStructureUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_descriptorBindingAccelerationStructureUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingAccelerationStructureUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingAccelerationStructureUpdateAfterBindAt(long index) { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_descriptorBindingAccelerationStructureUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingAccelerationStructureUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingAccelerationStructureUpdateAfterBind() { return VkPhysicalDeviceAccelerationStructureFeaturesKHR.get_descriptorBindingAccelerationStructureUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingAccelerationStructureUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingAccelerationStructureUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingAccelerationStructureUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingAccelerationStructureUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingAccelerationStructureUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_descriptorBindingAccelerationStructureUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingAccelerationStructureUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR descriptorBindingAccelerationStructureUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_descriptorBindingAccelerationStructureUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingAccelerationStructureUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructureFeaturesKHR descriptorBindingAccelerationStructureUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceAccelerationStructureFeaturesKHR.set_descriptorBindingAccelerationStructureUpdateAfterBind(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceAccelerationStructurePropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceAccelerationStructurePropertiesKHR.java new file mode 100644 index 00000000..8feea9e6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceAccelerationStructurePropertiesKHR.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxGeometryCount +/// [VarHandle][#VH_maxGeometryCount] - [Getter][#maxGeometryCount()] - [Setter][#maxGeometryCount(long)] +/// ### maxInstanceCount +/// [VarHandle][#VH_maxInstanceCount] - [Getter][#maxInstanceCount()] - [Setter][#maxInstanceCount(long)] +/// ### maxPrimitiveCount +/// [VarHandle][#VH_maxPrimitiveCount] - [Getter][#maxPrimitiveCount()] - [Setter][#maxPrimitiveCount(long)] +/// ### maxPerStageDescriptorAccelerationStructures +/// [VarHandle][#VH_maxPerStageDescriptorAccelerationStructures] - [Getter][#maxPerStageDescriptorAccelerationStructures()] - [Setter][#maxPerStageDescriptorAccelerationStructures(int)] +/// ### maxPerStageDescriptorUpdateAfterBindAccelerationStructures +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindAccelerationStructures] - [Getter][#maxPerStageDescriptorUpdateAfterBindAccelerationStructures()] - [Setter][#maxPerStageDescriptorUpdateAfterBindAccelerationStructures(int)] +/// ### maxDescriptorSetAccelerationStructures +/// [VarHandle][#VH_maxDescriptorSetAccelerationStructures] - [Getter][#maxDescriptorSetAccelerationStructures()] - [Setter][#maxDescriptorSetAccelerationStructures(int)] +/// ### maxDescriptorSetUpdateAfterBindAccelerationStructures +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindAccelerationStructures] - [Getter][#maxDescriptorSetUpdateAfterBindAccelerationStructures()] - [Setter][#maxDescriptorSetUpdateAfterBindAccelerationStructures(int)] +/// ### minAccelerationStructureScratchOffsetAlignment +/// [VarHandle][#VH_minAccelerationStructureScratchOffsetAlignment] - [Getter][#minAccelerationStructureScratchOffsetAlignment()] - [Setter][#minAccelerationStructureScratchOffsetAlignment(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceAccelerationStructurePropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint64_t maxGeometryCount; +/// uint64_t maxInstanceCount; +/// uint64_t maxPrimitiveCount; +/// uint32_t maxPerStageDescriptorAccelerationStructures; +/// uint32_t maxPerStageDescriptorUpdateAfterBindAccelerationStructures; +/// uint32_t maxDescriptorSetAccelerationStructures; +/// uint32_t maxDescriptorSetUpdateAfterBindAccelerationStructures; +/// uint32_t minAccelerationStructureScratchOffsetAlignment; +/// } VkPhysicalDeviceAccelerationStructurePropertiesKHR; +/// ``` +public final class VkPhysicalDeviceAccelerationStructurePropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceAccelerationStructurePropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("maxGeometryCount"), + ValueLayout.JAVA_LONG.withName("maxInstanceCount"), + ValueLayout.JAVA_LONG.withName("maxPrimitiveCount"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorAccelerationStructures"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindAccelerationStructures"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetAccelerationStructures"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindAccelerationStructures"), + ValueLayout.JAVA_INT.withName("minAccelerationStructureScratchOffsetAlignment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxGeometryCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxGeometryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxGeometryCount")); + /// The [VarHandle] of `maxInstanceCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxInstanceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxInstanceCount")); + /// The [VarHandle] of `maxPrimitiveCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxPrimitiveCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPrimitiveCount")); + /// The [VarHandle] of `maxPerStageDescriptorAccelerationStructures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorAccelerationStructures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorAccelerationStructures")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindAccelerationStructures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindAccelerationStructures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindAccelerationStructures")); + /// The [VarHandle] of `maxDescriptorSetAccelerationStructures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetAccelerationStructures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetAccelerationStructures")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindAccelerationStructures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindAccelerationStructures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindAccelerationStructures")); + /// The [VarHandle] of `minAccelerationStructureScratchOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minAccelerationStructureScratchOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minAccelerationStructureScratchOffsetAlignment")); + + /// Creates `VkPhysicalDeviceAccelerationStructurePropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceAccelerationStructurePropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceAccelerationStructurePropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAccelerationStructurePropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAccelerationStructurePropertiesKHR(segment); } + + /// Creates `VkPhysicalDeviceAccelerationStructurePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAccelerationStructurePropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAccelerationStructurePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceAccelerationStructurePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAccelerationStructurePropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAccelerationStructurePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceAccelerationStructurePropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceAccelerationStructurePropertiesKHR` + public static VkPhysicalDeviceAccelerationStructurePropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceAccelerationStructurePropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceAccelerationStructurePropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceAccelerationStructurePropertiesKHR` + public static VkPhysicalDeviceAccelerationStructurePropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceAccelerationStructurePropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxGeometryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxGeometryCount(MemorySegment segment, long index) { return (long) VH_maxGeometryCount.get(segment, 0L, index); } + /// {@return `maxGeometryCount`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxGeometryCount(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxGeometryCount(segment, 0L); } + /// {@return `maxGeometryCount` at the given index} + /// @param index the index + public @CType("uint64_t") long maxGeometryCountAt(long index) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxGeometryCount(this.segment(), index); } + /// {@return `maxGeometryCount`} + public @CType("uint64_t") long maxGeometryCount() { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxGeometryCount(this.segment()); } + /// Sets `maxGeometryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxGeometryCount(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxGeometryCount.set(segment, 0L, index, value); } + /// Sets `maxGeometryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxGeometryCount(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxGeometryCount(segment, 0L, value); } + /// Sets `maxGeometryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxGeometryCountAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxGeometryCount(this.segment(), index, value); return this; } + /// Sets `maxGeometryCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxGeometryCount(@CType("uint64_t") long value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxGeometryCount(this.segment(), value); return this; } + + /// {@return `maxInstanceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxInstanceCount(MemorySegment segment, long index) { return (long) VH_maxInstanceCount.get(segment, 0L, index); } + /// {@return `maxInstanceCount`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxInstanceCount(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxInstanceCount(segment, 0L); } + /// {@return `maxInstanceCount` at the given index} + /// @param index the index + public @CType("uint64_t") long maxInstanceCountAt(long index) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxInstanceCount(this.segment(), index); } + /// {@return `maxInstanceCount`} + public @CType("uint64_t") long maxInstanceCount() { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxInstanceCount(this.segment()); } + /// Sets `maxInstanceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxInstanceCount(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxInstanceCount.set(segment, 0L, index, value); } + /// Sets `maxInstanceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxInstanceCount(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxInstanceCount(segment, 0L, value); } + /// Sets `maxInstanceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxInstanceCountAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxInstanceCount(this.segment(), index, value); return this; } + /// Sets `maxInstanceCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxInstanceCount(@CType("uint64_t") long value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxInstanceCount(this.segment(), value); return this; } + + /// {@return `maxPrimitiveCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxPrimitiveCount(MemorySegment segment, long index) { return (long) VH_maxPrimitiveCount.get(segment, 0L, index); } + /// {@return `maxPrimitiveCount`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxPrimitiveCount(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxPrimitiveCount(segment, 0L); } + /// {@return `maxPrimitiveCount` at the given index} + /// @param index the index + public @CType("uint64_t") long maxPrimitiveCountAt(long index) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxPrimitiveCount(this.segment(), index); } + /// {@return `maxPrimitiveCount`} + public @CType("uint64_t") long maxPrimitiveCount() { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxPrimitiveCount(this.segment()); } + /// Sets `maxPrimitiveCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPrimitiveCount(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxPrimitiveCount.set(segment, 0L, index, value); } + /// Sets `maxPrimitiveCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPrimitiveCount(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxPrimitiveCount(segment, 0L, value); } + /// Sets `maxPrimitiveCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxPrimitiveCountAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxPrimitiveCount(this.segment(), index, value); return this; } + /// Sets `maxPrimitiveCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxPrimitiveCount(@CType("uint64_t") long value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxPrimitiveCount(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorAccelerationStructures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorAccelerationStructures(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorAccelerationStructures.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorAccelerationStructures`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorAccelerationStructures(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxPerStageDescriptorAccelerationStructures(segment, 0L); } + /// {@return `maxPerStageDescriptorAccelerationStructures` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorAccelerationStructuresAt(long index) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxPerStageDescriptorAccelerationStructures(this.segment(), index); } + /// {@return `maxPerStageDescriptorAccelerationStructures`} + public @CType("uint32_t") int maxPerStageDescriptorAccelerationStructures() { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxPerStageDescriptorAccelerationStructures(this.segment()); } + /// Sets `maxPerStageDescriptorAccelerationStructures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorAccelerationStructures(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorAccelerationStructures.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorAccelerationStructures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorAccelerationStructures(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxPerStageDescriptorAccelerationStructures(segment, 0L, value); } + /// Sets `maxPerStageDescriptorAccelerationStructures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxPerStageDescriptorAccelerationStructuresAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxPerStageDescriptorAccelerationStructures(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorAccelerationStructures` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxPerStageDescriptorAccelerationStructures(@CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxPerStageDescriptorAccelerationStructures(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindAccelerationStructures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindAccelerationStructures(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindAccelerationStructures.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindAccelerationStructures`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindAccelerationStructures(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxPerStageDescriptorUpdateAfterBindAccelerationStructures(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindAccelerationStructures` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindAccelerationStructuresAt(long index) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxPerStageDescriptorUpdateAfterBindAccelerationStructures(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindAccelerationStructures`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindAccelerationStructures() { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxPerStageDescriptorUpdateAfterBindAccelerationStructures(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindAccelerationStructures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindAccelerationStructures(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindAccelerationStructures.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindAccelerationStructures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindAccelerationStructures(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxPerStageDescriptorUpdateAfterBindAccelerationStructures(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindAccelerationStructures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxPerStageDescriptorUpdateAfterBindAccelerationStructuresAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxPerStageDescriptorUpdateAfterBindAccelerationStructures(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindAccelerationStructures` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxPerStageDescriptorUpdateAfterBindAccelerationStructures(@CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxPerStageDescriptorUpdateAfterBindAccelerationStructures(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetAccelerationStructures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetAccelerationStructures(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetAccelerationStructures.get(segment, 0L, index); } + /// {@return `maxDescriptorSetAccelerationStructures`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetAccelerationStructures(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxDescriptorSetAccelerationStructures(segment, 0L); } + /// {@return `maxDescriptorSetAccelerationStructures` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetAccelerationStructuresAt(long index) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxDescriptorSetAccelerationStructures(this.segment(), index); } + /// {@return `maxDescriptorSetAccelerationStructures`} + public @CType("uint32_t") int maxDescriptorSetAccelerationStructures() { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxDescriptorSetAccelerationStructures(this.segment()); } + /// Sets `maxDescriptorSetAccelerationStructures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetAccelerationStructures(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetAccelerationStructures.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetAccelerationStructures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetAccelerationStructures(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxDescriptorSetAccelerationStructures(segment, 0L, value); } + /// Sets `maxDescriptorSetAccelerationStructures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxDescriptorSetAccelerationStructuresAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxDescriptorSetAccelerationStructures(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetAccelerationStructures` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxDescriptorSetAccelerationStructures(@CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxDescriptorSetAccelerationStructures(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindAccelerationStructures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindAccelerationStructures(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindAccelerationStructures.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindAccelerationStructures`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindAccelerationStructures(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxDescriptorSetUpdateAfterBindAccelerationStructures(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindAccelerationStructures` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindAccelerationStructuresAt(long index) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxDescriptorSetUpdateAfterBindAccelerationStructures(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindAccelerationStructures`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindAccelerationStructures() { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_maxDescriptorSetUpdateAfterBindAccelerationStructures(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindAccelerationStructures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindAccelerationStructures(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindAccelerationStructures.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindAccelerationStructures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindAccelerationStructures(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxDescriptorSetUpdateAfterBindAccelerationStructures(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindAccelerationStructures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxDescriptorSetUpdateAfterBindAccelerationStructuresAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxDescriptorSetUpdateAfterBindAccelerationStructures(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindAccelerationStructures` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR maxDescriptorSetUpdateAfterBindAccelerationStructures(@CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_maxDescriptorSetUpdateAfterBindAccelerationStructures(this.segment(), value); return this; } + + /// {@return `minAccelerationStructureScratchOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minAccelerationStructureScratchOffsetAlignment(MemorySegment segment, long index) { return (int) VH_minAccelerationStructureScratchOffsetAlignment.get(segment, 0L, index); } + /// {@return `minAccelerationStructureScratchOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minAccelerationStructureScratchOffsetAlignment(MemorySegment segment) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_minAccelerationStructureScratchOffsetAlignment(segment, 0L); } + /// {@return `minAccelerationStructureScratchOffsetAlignment` at the given index} + /// @param index the index + public @CType("uint32_t") int minAccelerationStructureScratchOffsetAlignmentAt(long index) { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_minAccelerationStructureScratchOffsetAlignment(this.segment(), index); } + /// {@return `minAccelerationStructureScratchOffsetAlignment`} + public @CType("uint32_t") int minAccelerationStructureScratchOffsetAlignment() { return VkPhysicalDeviceAccelerationStructurePropertiesKHR.get_minAccelerationStructureScratchOffsetAlignment(this.segment()); } + /// Sets `minAccelerationStructureScratchOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minAccelerationStructureScratchOffsetAlignment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minAccelerationStructureScratchOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `minAccelerationStructureScratchOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minAccelerationStructureScratchOffsetAlignment(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_minAccelerationStructureScratchOffsetAlignment(segment, 0L, value); } + /// Sets `minAccelerationStructureScratchOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR minAccelerationStructureScratchOffsetAlignmentAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_minAccelerationStructureScratchOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `minAccelerationStructureScratchOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAccelerationStructurePropertiesKHR minAccelerationStructureScratchOffsetAlignment(@CType("uint32_t") int value) { VkPhysicalDeviceAccelerationStructurePropertiesKHR.set_minAccelerationStructureScratchOffsetAlignment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.java new file mode 100644 index 00000000..072bb1a3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### computeDerivativeGroupQuads +/// [VarHandle][#VH_computeDerivativeGroupQuads] - [Getter][#computeDerivativeGroupQuads()] - [Setter][#computeDerivativeGroupQuads(int)] +/// ### computeDerivativeGroupLinear +/// [VarHandle][#VH_computeDerivativeGroupLinear] - [Getter][#computeDerivativeGroupLinear()] - [Setter][#computeDerivativeGroupLinear(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 computeDerivativeGroupQuads; +/// VkBool32 computeDerivativeGroupLinear; +/// } VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("computeDerivativeGroupQuads"), + ValueLayout.JAVA_INT.withName("computeDerivativeGroupLinear") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `computeDerivativeGroupQuads` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_computeDerivativeGroupQuads = LAYOUT.arrayElementVarHandle(PathElement.groupElement("computeDerivativeGroupQuads")); + /// The [VarHandle] of `computeDerivativeGroupLinear` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_computeDerivativeGroupLinear = LAYOUT.arrayElementVarHandle(PathElement.groupElement("computeDerivativeGroupLinear")); + + /// Creates `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR` + public static VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR` + public static VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `computeDerivativeGroupQuads` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_computeDerivativeGroupQuads(MemorySegment segment, long index) { return (int) VH_computeDerivativeGroupQuads.get(segment, 0L, index); } + /// {@return `computeDerivativeGroupQuads`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_computeDerivativeGroupQuads(MemorySegment segment) { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_computeDerivativeGroupQuads(segment, 0L); } + /// {@return `computeDerivativeGroupQuads` at the given index} + /// @param index the index + public @CType("VkBool32") int computeDerivativeGroupQuadsAt(long index) { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_computeDerivativeGroupQuads(this.segment(), index); } + /// {@return `computeDerivativeGroupQuads`} + public @CType("VkBool32") int computeDerivativeGroupQuads() { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_computeDerivativeGroupQuads(this.segment()); } + /// Sets `computeDerivativeGroupQuads` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_computeDerivativeGroupQuads(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_computeDerivativeGroupQuads.set(segment, 0L, index, value); } + /// Sets `computeDerivativeGroupQuads` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_computeDerivativeGroupQuads(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_computeDerivativeGroupQuads(segment, 0L, value); } + /// Sets `computeDerivativeGroupQuads` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR computeDerivativeGroupQuadsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_computeDerivativeGroupQuads(this.segment(), index, value); return this; } + /// Sets `computeDerivativeGroupQuads` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR computeDerivativeGroupQuads(@CType("VkBool32") int value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_computeDerivativeGroupQuads(this.segment(), value); return this; } + + /// {@return `computeDerivativeGroupLinear` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_computeDerivativeGroupLinear(MemorySegment segment, long index) { return (int) VH_computeDerivativeGroupLinear.get(segment, 0L, index); } + /// {@return `computeDerivativeGroupLinear`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_computeDerivativeGroupLinear(MemorySegment segment) { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_computeDerivativeGroupLinear(segment, 0L); } + /// {@return `computeDerivativeGroupLinear` at the given index} + /// @param index the index + public @CType("VkBool32") int computeDerivativeGroupLinearAt(long index) { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_computeDerivativeGroupLinear(this.segment(), index); } + /// {@return `computeDerivativeGroupLinear`} + public @CType("VkBool32") int computeDerivativeGroupLinear() { return VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.get_computeDerivativeGroupLinear(this.segment()); } + /// Sets `computeDerivativeGroupLinear` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_computeDerivativeGroupLinear(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_computeDerivativeGroupLinear.set(segment, 0L, index, value); } + /// Sets `computeDerivativeGroupLinear` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_computeDerivativeGroupLinear(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_computeDerivativeGroupLinear(segment, 0L, value); } + /// Sets `computeDerivativeGroupLinear` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR computeDerivativeGroupLinearAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_computeDerivativeGroupLinear(this.segment(), index, value); return this; } + /// Sets `computeDerivativeGroupLinear` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR computeDerivativeGroupLinear(@CType("VkBool32") int value) { VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.set_computeDerivativeGroupLinear(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.java new file mode 100644 index 00000000..5eee0b53 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### meshAndTaskShaderDerivatives +/// [VarHandle][#VH_meshAndTaskShaderDerivatives] - [Getter][#meshAndTaskShaderDerivatives()] - [Setter][#meshAndTaskShaderDerivatives(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 meshAndTaskShaderDerivatives; +/// } VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR; +/// ``` +public final class VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("meshAndTaskShaderDerivatives") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `meshAndTaskShaderDerivatives` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_meshAndTaskShaderDerivatives = LAYOUT.arrayElementVarHandle(PathElement.groupElement("meshAndTaskShaderDerivatives")); + + /// Creates `VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(segment); } + + /// Creates `VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR` + public static VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR` + public static VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `meshAndTaskShaderDerivatives` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_meshAndTaskShaderDerivatives(MemorySegment segment, long index) { return (int) VH_meshAndTaskShaderDerivatives.get(segment, 0L, index); } + /// {@return `meshAndTaskShaderDerivatives`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_meshAndTaskShaderDerivatives(MemorySegment segment) { return VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.get_meshAndTaskShaderDerivatives(segment, 0L); } + /// {@return `meshAndTaskShaderDerivatives` at the given index} + /// @param index the index + public @CType("VkBool32") int meshAndTaskShaderDerivativesAt(long index) { return VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.get_meshAndTaskShaderDerivatives(this.segment(), index); } + /// {@return `meshAndTaskShaderDerivatives`} + public @CType("VkBool32") int meshAndTaskShaderDerivatives() { return VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.get_meshAndTaskShaderDerivatives(this.segment()); } + /// Sets `meshAndTaskShaderDerivatives` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_meshAndTaskShaderDerivatives(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_meshAndTaskShaderDerivatives.set(segment, 0L, index, value); } + /// Sets `meshAndTaskShaderDerivatives` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_meshAndTaskShaderDerivatives(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.set_meshAndTaskShaderDerivatives(segment, 0L, value); } + /// Sets `meshAndTaskShaderDerivatives` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR meshAndTaskShaderDerivativesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.set_meshAndTaskShaderDerivatives(this.segment(), index, value); return this; } + /// Sets `meshAndTaskShaderDerivatives` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR meshAndTaskShaderDerivatives(@CType("VkBool32") int value) { VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.set_meshAndTaskShaderDerivatives(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceCooperativeMatrixFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceCooperativeMatrixFeaturesKHR.java new file mode 100644 index 00000000..b260ebe5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceCooperativeMatrixFeaturesKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cooperativeMatrix +/// [VarHandle][#VH_cooperativeMatrix] - [Getter][#cooperativeMatrix()] - [Setter][#cooperativeMatrix(int)] +/// ### cooperativeMatrixRobustBufferAccess +/// [VarHandle][#VH_cooperativeMatrixRobustBufferAccess] - [Getter][#cooperativeMatrixRobustBufferAccess()] - [Setter][#cooperativeMatrixRobustBufferAccess(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCooperativeMatrixFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 cooperativeMatrix; +/// VkBool32 cooperativeMatrixRobustBufferAccess; +/// } VkPhysicalDeviceCooperativeMatrixFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceCooperativeMatrixFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceCooperativeMatrixFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cooperativeMatrix"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixRobustBufferAccess") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cooperativeMatrix` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrix = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrix")); + /// The [VarHandle] of `cooperativeMatrixRobustBufferAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixRobustBufferAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixRobustBufferAccess")); + + /// Creates `VkPhysicalDeviceCooperativeMatrixFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCooperativeMatrixFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrixFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCooperativeMatrixFeaturesKHR` + public static VkPhysicalDeviceCooperativeMatrixFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCooperativeMatrixFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrixFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCooperativeMatrixFeaturesKHR` + public static VkPhysicalDeviceCooperativeMatrixFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCooperativeMatrixFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `cooperativeMatrix` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrix(MemorySegment segment, long index) { return (int) VH_cooperativeMatrix.get(segment, 0L, index); } + /// {@return `cooperativeMatrix`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrix(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_cooperativeMatrix(segment, 0L); } + /// {@return `cooperativeMatrix` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixAt(long index) { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_cooperativeMatrix(this.segment(), index); } + /// {@return `cooperativeMatrix`} + public @CType("VkBool32") int cooperativeMatrix() { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_cooperativeMatrix(this.segment()); } + /// Sets `cooperativeMatrix` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrix(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrix.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrix` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrix(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_cooperativeMatrix(segment, 0L, value); } + /// Sets `cooperativeMatrix` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrixAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_cooperativeMatrix(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrix` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrix(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_cooperativeMatrix(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixRobustBufferAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrixRobustBufferAccess(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixRobustBufferAccess.get(segment, 0L, index); } + /// {@return `cooperativeMatrixRobustBufferAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrixRobustBufferAccess(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_cooperativeMatrixRobustBufferAccess(segment, 0L); } + /// {@return `cooperativeMatrixRobustBufferAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixRobustBufferAccessAt(long index) { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_cooperativeMatrixRobustBufferAccess(this.segment(), index); } + /// {@return `cooperativeMatrixRobustBufferAccess`} + public @CType("VkBool32") int cooperativeMatrixRobustBufferAccess() { return VkPhysicalDeviceCooperativeMatrixFeaturesKHR.get_cooperativeMatrixRobustBufferAccess(this.segment()); } + /// Sets `cooperativeMatrixRobustBufferAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixRobustBufferAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrixRobustBufferAccess.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixRobustBufferAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixRobustBufferAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_cooperativeMatrixRobustBufferAccess(segment, 0L, value); } + /// Sets `cooperativeMatrixRobustBufferAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrixRobustBufferAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_cooperativeMatrixRobustBufferAccess(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixRobustBufferAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesKHR cooperativeMatrixRobustBufferAccess(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesKHR.set_cooperativeMatrixRobustBufferAccess(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceCooperativeMatrixPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceCooperativeMatrixPropertiesKHR.java new file mode 100644 index 00000000..3cb42839 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceCooperativeMatrixPropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cooperativeMatrixSupportedStages +/// [VarHandle][#VH_cooperativeMatrixSupportedStages] - [Getter][#cooperativeMatrixSupportedStages()] - [Setter][#cooperativeMatrixSupportedStages(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCooperativeMatrixPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkShaderStageFlags cooperativeMatrixSupportedStages; +/// } VkPhysicalDeviceCooperativeMatrixPropertiesKHR; +/// ``` +public final class VkPhysicalDeviceCooperativeMatrixPropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceCooperativeMatrixPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixSupportedStages") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cooperativeMatrixSupportedStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixSupportedStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixSupportedStages")); + + /// Creates `VkPhysicalDeviceCooperativeMatrixPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCooperativeMatrixPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixPropertiesKHR(segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrixPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCooperativeMatrixPropertiesKHR` + public static VkPhysicalDeviceCooperativeMatrixPropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCooperativeMatrixPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrixPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCooperativeMatrixPropertiesKHR` + public static VkPhysicalDeviceCooperativeMatrixPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCooperativeMatrixPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCooperativeMatrixPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCooperativeMatrixPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCooperativeMatrixPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCooperativeMatrixPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixSupportedStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_cooperativeMatrixSupportedStages(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixSupportedStages.get(segment, 0L, index); } + /// {@return `cooperativeMatrixSupportedStages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_cooperativeMatrixSupportedStages(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixPropertiesKHR.get_cooperativeMatrixSupportedStages(segment, 0L); } + /// {@return `cooperativeMatrixSupportedStages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int cooperativeMatrixSupportedStagesAt(long index) { return VkPhysicalDeviceCooperativeMatrixPropertiesKHR.get_cooperativeMatrixSupportedStages(this.segment(), index); } + /// {@return `cooperativeMatrixSupportedStages`} + public @CType("VkShaderStageFlags") int cooperativeMatrixSupportedStages() { return VkPhysicalDeviceCooperativeMatrixPropertiesKHR.get_cooperativeMatrixSupportedStages(this.segment()); } + /// Sets `cooperativeMatrixSupportedStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixSupportedStages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_cooperativeMatrixSupportedStages.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixSupportedStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixSupportedStages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesKHR.set_cooperativeMatrixSupportedStages(segment, 0L, value); } + /// Sets `cooperativeMatrixSupportedStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesKHR cooperativeMatrixSupportedStagesAt(long index, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesKHR.set_cooperativeMatrixSupportedStages(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixSupportedStages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesKHR cooperativeMatrixSupportedStages(@CType("VkShaderStageFlags") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesKHR.set_cooperativeMatrixSupportedStages(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.java new file mode 100644 index 00000000..c6f4afec --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fragmentShaderBarycentric +/// [VarHandle][#VH_fragmentShaderBarycentric] - [Getter][#fragmentShaderBarycentric()] - [Setter][#fragmentShaderBarycentric(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 fragmentShaderBarycentric; +/// } VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("fragmentShaderBarycentric") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fragmentShaderBarycentric` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShaderBarycentric = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShaderBarycentric")); + + /// Creates `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR` + public static VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR` + public static VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `fragmentShaderBarycentric` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShaderBarycentric(MemorySegment segment, long index) { return (int) VH_fragmentShaderBarycentric.get(segment, 0L, index); } + /// {@return `fragmentShaderBarycentric`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShaderBarycentric(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.get_fragmentShaderBarycentric(segment, 0L); } + /// {@return `fragmentShaderBarycentric` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShaderBarycentricAt(long index) { return VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.get_fragmentShaderBarycentric(this.segment(), index); } + /// {@return `fragmentShaderBarycentric`} + public @CType("VkBool32") int fragmentShaderBarycentric() { return VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.get_fragmentShaderBarycentric(this.segment()); } + /// Sets `fragmentShaderBarycentric` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShaderBarycentric(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShaderBarycentric.set(segment, 0L, index, value); } + /// Sets `fragmentShaderBarycentric` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShaderBarycentric(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.set_fragmentShaderBarycentric(segment, 0L, value); } + /// Sets `fragmentShaderBarycentric` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR fragmentShaderBarycentricAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.set_fragmentShaderBarycentric(this.segment(), index, value); return this; } + /// Sets `fragmentShaderBarycentric` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR fragmentShaderBarycentric(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.set_fragmentShaderBarycentric(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.java new file mode 100644 index 00000000..53371292 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### triStripVertexOrderIndependentOfProvokingVertex +/// [VarHandle][#VH_triStripVertexOrderIndependentOfProvokingVertex] - [Getter][#triStripVertexOrderIndependentOfProvokingVertex()] - [Setter][#triStripVertexOrderIndependentOfProvokingVertex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 triStripVertexOrderIndependentOfProvokingVertex; +/// } VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR; +/// ``` +public final class VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("triStripVertexOrderIndependentOfProvokingVertex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `triStripVertexOrderIndependentOfProvokingVertex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_triStripVertexOrderIndependentOfProvokingVertex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("triStripVertexOrderIndependentOfProvokingVertex")); + + /// Creates `VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR(segment); } + + /// Creates `VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR` + public static VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR` + public static VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `triStripVertexOrderIndependentOfProvokingVertex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_triStripVertexOrderIndependentOfProvokingVertex(MemorySegment segment, long index) { return (int) VH_triStripVertexOrderIndependentOfProvokingVertex.get(segment, 0L, index); } + /// {@return `triStripVertexOrderIndependentOfProvokingVertex`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_triStripVertexOrderIndependentOfProvokingVertex(MemorySegment segment) { return VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.get_triStripVertexOrderIndependentOfProvokingVertex(segment, 0L); } + /// {@return `triStripVertexOrderIndependentOfProvokingVertex` at the given index} + /// @param index the index + public @CType("VkBool32") int triStripVertexOrderIndependentOfProvokingVertexAt(long index) { return VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.get_triStripVertexOrderIndependentOfProvokingVertex(this.segment(), index); } + /// {@return `triStripVertexOrderIndependentOfProvokingVertex`} + public @CType("VkBool32") int triStripVertexOrderIndependentOfProvokingVertex() { return VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.get_triStripVertexOrderIndependentOfProvokingVertex(this.segment()); } + /// Sets `triStripVertexOrderIndependentOfProvokingVertex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_triStripVertexOrderIndependentOfProvokingVertex(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_triStripVertexOrderIndependentOfProvokingVertex.set(segment, 0L, index, value); } + /// Sets `triStripVertexOrderIndependentOfProvokingVertex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_triStripVertexOrderIndependentOfProvokingVertex(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.set_triStripVertexOrderIndependentOfProvokingVertex(segment, 0L, value); } + /// Sets `triStripVertexOrderIndependentOfProvokingVertex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR triStripVertexOrderIndependentOfProvokingVertexAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.set_triStripVertexOrderIndependentOfProvokingVertex(this.segment(), index, value); return this; } + /// Sets `triStripVertexOrderIndependentOfProvokingVertex` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR triStripVertexOrderIndependentOfProvokingVertex(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.set_triStripVertexOrderIndependentOfProvokingVertex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShadingRateFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShadingRateFeaturesKHR.java new file mode 100644 index 00000000..d889c174 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShadingRateFeaturesKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineFragmentShadingRate +/// [VarHandle][#VH_pipelineFragmentShadingRate] - [Getter][#pipelineFragmentShadingRate()] - [Setter][#pipelineFragmentShadingRate(int)] +/// ### primitiveFragmentShadingRate +/// [VarHandle][#VH_primitiveFragmentShadingRate] - [Getter][#primitiveFragmentShadingRate()] - [Setter][#primitiveFragmentShadingRate(int)] +/// ### attachmentFragmentShadingRate +/// [VarHandle][#VH_attachmentFragmentShadingRate] - [Getter][#attachmentFragmentShadingRate()] - [Setter][#attachmentFragmentShadingRate(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentShadingRateFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 pipelineFragmentShadingRate; +/// VkBool32 primitiveFragmentShadingRate; +/// VkBool32 attachmentFragmentShadingRate; +/// } VkPhysicalDeviceFragmentShadingRateFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceFragmentShadingRateFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentShadingRateFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineFragmentShadingRate"), + ValueLayout.JAVA_INT.withName("primitiveFragmentShadingRate"), + ValueLayout.JAVA_INT.withName("attachmentFragmentShadingRate") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineFragmentShadingRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineFragmentShadingRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineFragmentShadingRate")); + /// The [VarHandle] of `primitiveFragmentShadingRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitiveFragmentShadingRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveFragmentShadingRate")); + /// The [VarHandle] of `attachmentFragmentShadingRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentFragmentShadingRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentFragmentShadingRate")); + + /// Creates `VkPhysicalDeviceFragmentShadingRateFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentShadingRateFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentShadingRateFeaturesKHR` + public static VkPhysicalDeviceFragmentShadingRateFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentShadingRateFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentShadingRateFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentShadingRateFeaturesKHR` + public static VkPhysicalDeviceFragmentShadingRateFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentShadingRateFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineFragmentShadingRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineFragmentShadingRate(MemorySegment segment, long index) { return (int) VH_pipelineFragmentShadingRate.get(segment, 0L, index); } + /// {@return `pipelineFragmentShadingRate`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineFragmentShadingRate(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_pipelineFragmentShadingRate(segment, 0L); } + /// {@return `pipelineFragmentShadingRate` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineFragmentShadingRateAt(long index) { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_pipelineFragmentShadingRate(this.segment(), index); } + /// {@return `pipelineFragmentShadingRate`} + public @CType("VkBool32") int pipelineFragmentShadingRate() { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_pipelineFragmentShadingRate(this.segment()); } + /// Sets `pipelineFragmentShadingRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineFragmentShadingRate(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineFragmentShadingRate.set(segment, 0L, index, value); } + /// Sets `pipelineFragmentShadingRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineFragmentShadingRate(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_pipelineFragmentShadingRate(segment, 0L, value); } + /// Sets `pipelineFragmentShadingRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR pipelineFragmentShadingRateAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_pipelineFragmentShadingRate(this.segment(), index, value); return this; } + /// Sets `pipelineFragmentShadingRate` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR pipelineFragmentShadingRate(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_pipelineFragmentShadingRate(this.segment(), value); return this; } + + /// {@return `primitiveFragmentShadingRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primitiveFragmentShadingRate(MemorySegment segment, long index) { return (int) VH_primitiveFragmentShadingRate.get(segment, 0L, index); } + /// {@return `primitiveFragmentShadingRate`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primitiveFragmentShadingRate(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_primitiveFragmentShadingRate(segment, 0L); } + /// {@return `primitiveFragmentShadingRate` at the given index} + /// @param index the index + public @CType("VkBool32") int primitiveFragmentShadingRateAt(long index) { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_primitiveFragmentShadingRate(this.segment(), index); } + /// {@return `primitiveFragmentShadingRate`} + public @CType("VkBool32") int primitiveFragmentShadingRate() { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_primitiveFragmentShadingRate(this.segment()); } + /// Sets `primitiveFragmentShadingRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveFragmentShadingRate(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primitiveFragmentShadingRate.set(segment, 0L, index, value); } + /// Sets `primitiveFragmentShadingRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveFragmentShadingRate(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_primitiveFragmentShadingRate(segment, 0L, value); } + /// Sets `primitiveFragmentShadingRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR primitiveFragmentShadingRateAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_primitiveFragmentShadingRate(this.segment(), index, value); return this; } + /// Sets `primitiveFragmentShadingRate` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR primitiveFragmentShadingRate(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_primitiveFragmentShadingRate(this.segment(), value); return this; } + + /// {@return `attachmentFragmentShadingRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_attachmentFragmentShadingRate(MemorySegment segment, long index) { return (int) VH_attachmentFragmentShadingRate.get(segment, 0L, index); } + /// {@return `attachmentFragmentShadingRate`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_attachmentFragmentShadingRate(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_attachmentFragmentShadingRate(segment, 0L); } + /// {@return `attachmentFragmentShadingRate` at the given index} + /// @param index the index + public @CType("VkBool32") int attachmentFragmentShadingRateAt(long index) { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_attachmentFragmentShadingRate(this.segment(), index); } + /// {@return `attachmentFragmentShadingRate`} + public @CType("VkBool32") int attachmentFragmentShadingRate() { return VkPhysicalDeviceFragmentShadingRateFeaturesKHR.get_attachmentFragmentShadingRate(this.segment()); } + /// Sets `attachmentFragmentShadingRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentFragmentShadingRate(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_attachmentFragmentShadingRate.set(segment, 0L, index, value); } + /// Sets `attachmentFragmentShadingRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentFragmentShadingRate(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_attachmentFragmentShadingRate(segment, 0L, value); } + /// Sets `attachmentFragmentShadingRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR attachmentFragmentShadingRateAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_attachmentFragmentShadingRate(this.segment(), index, value); return this; } + /// Sets `attachmentFragmentShadingRate` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateFeaturesKHR attachmentFragmentShadingRate(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateFeaturesKHR.set_attachmentFragmentShadingRate(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShadingRateKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShadingRateKHR.java new file mode 100644 index 00000000..6ba9ce92 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShadingRateKHR.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sampleCounts +/// [VarHandle][#VH_sampleCounts] - [Getter][#sampleCounts()] - [Setter][#sampleCounts(int)] +/// ### fragmentSize +/// [Byte offset][#OFFSET_fragmentSize] - [Memory layout][#ML_fragmentSize] - [Getter][#fragmentSize()] - [Setter][#fragmentSize(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentShadingRateKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkSampleCountFlags sampleCounts; +/// VkExtent2D fragmentSize; +/// } VkPhysicalDeviceFragmentShadingRateKHR; +/// ``` +public final class VkPhysicalDeviceFragmentShadingRateKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentShadingRateKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sampleCounts"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("fragmentSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleCounts")); + /// The byte offset of `fragmentSize`. + public static final long OFFSET_fragmentSize = LAYOUT.byteOffset(PathElement.groupElement("fragmentSize")); + /// The memory layout of `fragmentSize`. + public static final MemoryLayout ML_fragmentSize = LAYOUT.select(PathElement.groupElement("fragmentSize")); + + /// Creates `VkPhysicalDeviceFragmentShadingRateKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentShadingRateKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateKHR(segment); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentShadingRateKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentShadingRateKHR` + public static VkPhysicalDeviceFragmentShadingRateKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentShadingRateKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentShadingRateKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentShadingRateKHR` + public static VkPhysicalDeviceFragmentShadingRateKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentShadingRateKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentShadingRateKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentShadingRateKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentShadingRateKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentShadingRateKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `sampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_sampleCounts(MemorySegment segment, long index) { return (int) VH_sampleCounts.get(segment, 0L, index); } + /// {@return `sampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_sampleCounts(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateKHR.get_sampleCounts(segment, 0L); } + /// {@return `sampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int sampleCountsAt(long index) { return VkPhysicalDeviceFragmentShadingRateKHR.get_sampleCounts(this.segment(), index); } + /// {@return `sampleCounts`} + public @CType("VkSampleCountFlags") int sampleCounts() { return VkPhysicalDeviceFragmentShadingRateKHR.get_sampleCounts(this.segment()); } + /// Sets `sampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_sampleCounts.set(segment, 0L, index, value); } + /// Sets `sampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceFragmentShadingRateKHR.set_sampleCounts(segment, 0L, value); } + /// Sets `sampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateKHR sampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceFragmentShadingRateKHR.set_sampleCounts(this.segment(), index, value); return this; } + /// Sets `sampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateKHR sampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceFragmentShadingRateKHR.set_sampleCounts(this.segment(), value); return this; } + + /// {@return `fragmentSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_fragmentSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_fragmentSize, index), ML_fragmentSize); } + /// {@return `fragmentSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_fragmentSize(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateKHR.get_fragmentSize(segment, 0L); } + /// {@return `fragmentSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment fragmentSizeAt(long index) { return VkPhysicalDeviceFragmentShadingRateKHR.get_fragmentSize(this.segment(), index); } + /// {@return `fragmentSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment fragmentSize() { return VkPhysicalDeviceFragmentShadingRateKHR.get_fragmentSize(this.segment()); } + /// Sets `fragmentSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_fragmentSize, index), ML_fragmentSize.byteSize()); } + /// Sets `fragmentSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateKHR.set_fragmentSize(segment, 0L, value); } + /// Sets `fragmentSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateKHR fragmentSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateKHR.set_fragmentSize(this.segment(), index, value); return this; } + /// Sets `fragmentSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateKHR fragmentSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateKHR.set_fragmentSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShadingRatePropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShadingRatePropertiesKHR.java new file mode 100644 index 00000000..65b9008e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceFragmentShadingRatePropertiesKHR.java @@ -0,0 +1,783 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minFragmentShadingRateAttachmentTexelSize +/// [Byte offset][#OFFSET_minFragmentShadingRateAttachmentTexelSize] - [Memory layout][#ML_minFragmentShadingRateAttachmentTexelSize] - [Getter][#minFragmentShadingRateAttachmentTexelSize()] - [Setter][#minFragmentShadingRateAttachmentTexelSize(java.lang.foreign.MemorySegment)] +/// ### maxFragmentShadingRateAttachmentTexelSize +/// [Byte offset][#OFFSET_maxFragmentShadingRateAttachmentTexelSize] - [Memory layout][#ML_maxFragmentShadingRateAttachmentTexelSize] - [Getter][#maxFragmentShadingRateAttachmentTexelSize()] - [Setter][#maxFragmentShadingRateAttachmentTexelSize(java.lang.foreign.MemorySegment)] +/// ### maxFragmentShadingRateAttachmentTexelSizeAspectRatio +/// [VarHandle][#VH_maxFragmentShadingRateAttachmentTexelSizeAspectRatio] - [Getter][#maxFragmentShadingRateAttachmentTexelSizeAspectRatio()] - [Setter][#maxFragmentShadingRateAttachmentTexelSizeAspectRatio(int)] +/// ### primitiveFragmentShadingRateWithMultipleViewports +/// [VarHandle][#VH_primitiveFragmentShadingRateWithMultipleViewports] - [Getter][#primitiveFragmentShadingRateWithMultipleViewports()] - [Setter][#primitiveFragmentShadingRateWithMultipleViewports(int)] +/// ### layeredShadingRateAttachments +/// [VarHandle][#VH_layeredShadingRateAttachments] - [Getter][#layeredShadingRateAttachments()] - [Setter][#layeredShadingRateAttachments(int)] +/// ### fragmentShadingRateNonTrivialCombinerOps +/// [VarHandle][#VH_fragmentShadingRateNonTrivialCombinerOps] - [Getter][#fragmentShadingRateNonTrivialCombinerOps()] - [Setter][#fragmentShadingRateNonTrivialCombinerOps(int)] +/// ### maxFragmentSize +/// [Byte offset][#OFFSET_maxFragmentSize] - [Memory layout][#ML_maxFragmentSize] - [Getter][#maxFragmentSize()] - [Setter][#maxFragmentSize(java.lang.foreign.MemorySegment)] +/// ### maxFragmentSizeAspectRatio +/// [VarHandle][#VH_maxFragmentSizeAspectRatio] - [Getter][#maxFragmentSizeAspectRatio()] - [Setter][#maxFragmentSizeAspectRatio(int)] +/// ### maxFragmentShadingRateCoverageSamples +/// [VarHandle][#VH_maxFragmentShadingRateCoverageSamples] - [Getter][#maxFragmentShadingRateCoverageSamples()] - [Setter][#maxFragmentShadingRateCoverageSamples(int)] +/// ### maxFragmentShadingRateRasterizationSamples +/// [VarHandle][#VH_maxFragmentShadingRateRasterizationSamples] - [Getter][#maxFragmentShadingRateRasterizationSamples()] - [Setter][#maxFragmentShadingRateRasterizationSamples(int)] +/// ### fragmentShadingRateWithShaderDepthStencilWrites +/// [VarHandle][#VH_fragmentShadingRateWithShaderDepthStencilWrites] - [Getter][#fragmentShadingRateWithShaderDepthStencilWrites()] - [Setter][#fragmentShadingRateWithShaderDepthStencilWrites(int)] +/// ### fragmentShadingRateWithSampleMask +/// [VarHandle][#VH_fragmentShadingRateWithSampleMask] - [Getter][#fragmentShadingRateWithSampleMask()] - [Setter][#fragmentShadingRateWithSampleMask(int)] +/// ### fragmentShadingRateWithShaderSampleMask +/// [VarHandle][#VH_fragmentShadingRateWithShaderSampleMask] - [Getter][#fragmentShadingRateWithShaderSampleMask()] - [Setter][#fragmentShadingRateWithShaderSampleMask(int)] +/// ### fragmentShadingRateWithConservativeRasterization +/// [VarHandle][#VH_fragmentShadingRateWithConservativeRasterization] - [Getter][#fragmentShadingRateWithConservativeRasterization()] - [Setter][#fragmentShadingRateWithConservativeRasterization(int)] +/// ### fragmentShadingRateWithFragmentShaderInterlock +/// [VarHandle][#VH_fragmentShadingRateWithFragmentShaderInterlock] - [Getter][#fragmentShadingRateWithFragmentShaderInterlock()] - [Setter][#fragmentShadingRateWithFragmentShaderInterlock(int)] +/// ### fragmentShadingRateWithCustomSampleLocations +/// [VarHandle][#VH_fragmentShadingRateWithCustomSampleLocations] - [Getter][#fragmentShadingRateWithCustomSampleLocations()] - [Setter][#fragmentShadingRateWithCustomSampleLocations(int)] +/// ### fragmentShadingRateStrictMultiplyCombiner +/// [VarHandle][#VH_fragmentShadingRateStrictMultiplyCombiner] - [Getter][#fragmentShadingRateStrictMultiplyCombiner()] - [Setter][#fragmentShadingRateStrictMultiplyCombiner(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentShadingRatePropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkExtent2D minFragmentShadingRateAttachmentTexelSize; +/// VkExtent2D maxFragmentShadingRateAttachmentTexelSize; +/// uint32_t maxFragmentShadingRateAttachmentTexelSizeAspectRatio; +/// VkBool32 primitiveFragmentShadingRateWithMultipleViewports; +/// VkBool32 layeredShadingRateAttachments; +/// VkBool32 fragmentShadingRateNonTrivialCombinerOps; +/// VkExtent2D maxFragmentSize; +/// uint32_t maxFragmentSizeAspectRatio; +/// uint32_t maxFragmentShadingRateCoverageSamples; +/// VkSampleCountFlagBits maxFragmentShadingRateRasterizationSamples; +/// VkBool32 fragmentShadingRateWithShaderDepthStencilWrites; +/// VkBool32 fragmentShadingRateWithSampleMask; +/// VkBool32 fragmentShadingRateWithShaderSampleMask; +/// VkBool32 fragmentShadingRateWithConservativeRasterization; +/// VkBool32 fragmentShadingRateWithFragmentShaderInterlock; +/// VkBool32 fragmentShadingRateWithCustomSampleLocations; +/// VkBool32 fragmentShadingRateStrictMultiplyCombiner; +/// } VkPhysicalDeviceFragmentShadingRatePropertiesKHR; +/// ``` +public final class VkPhysicalDeviceFragmentShadingRatePropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentShadingRatePropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("minFragmentShadingRateAttachmentTexelSize"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxFragmentShadingRateAttachmentTexelSize"), + ValueLayout.JAVA_INT.withName("maxFragmentShadingRateAttachmentTexelSizeAspectRatio"), + ValueLayout.JAVA_INT.withName("primitiveFragmentShadingRateWithMultipleViewports"), + ValueLayout.JAVA_INT.withName("layeredShadingRateAttachments"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateNonTrivialCombinerOps"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxFragmentSize"), + ValueLayout.JAVA_INT.withName("maxFragmentSizeAspectRatio"), + ValueLayout.JAVA_INT.withName("maxFragmentShadingRateCoverageSamples"), + ValueLayout.JAVA_INT.withName("maxFragmentShadingRateRasterizationSamples"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateWithShaderDepthStencilWrites"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateWithSampleMask"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateWithShaderSampleMask"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateWithConservativeRasterization"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateWithFragmentShaderInterlock"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateWithCustomSampleLocations"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateStrictMultiplyCombiner") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `minFragmentShadingRateAttachmentTexelSize`. + public static final long OFFSET_minFragmentShadingRateAttachmentTexelSize = LAYOUT.byteOffset(PathElement.groupElement("minFragmentShadingRateAttachmentTexelSize")); + /// The memory layout of `minFragmentShadingRateAttachmentTexelSize`. + public static final MemoryLayout ML_minFragmentShadingRateAttachmentTexelSize = LAYOUT.select(PathElement.groupElement("minFragmentShadingRateAttachmentTexelSize")); + /// The byte offset of `maxFragmentShadingRateAttachmentTexelSize`. + public static final long OFFSET_maxFragmentShadingRateAttachmentTexelSize = LAYOUT.byteOffset(PathElement.groupElement("maxFragmentShadingRateAttachmentTexelSize")); + /// The memory layout of `maxFragmentShadingRateAttachmentTexelSize`. + public static final MemoryLayout ML_maxFragmentShadingRateAttachmentTexelSize = LAYOUT.select(PathElement.groupElement("maxFragmentShadingRateAttachmentTexelSize")); + /// The [VarHandle] of `maxFragmentShadingRateAttachmentTexelSizeAspectRatio` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFragmentShadingRateAttachmentTexelSizeAspectRatio = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFragmentShadingRateAttachmentTexelSizeAspectRatio")); + /// The [VarHandle] of `primitiveFragmentShadingRateWithMultipleViewports` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitiveFragmentShadingRateWithMultipleViewports = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveFragmentShadingRateWithMultipleViewports")); + /// The [VarHandle] of `layeredShadingRateAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layeredShadingRateAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layeredShadingRateAttachments")); + /// The [VarHandle] of `fragmentShadingRateNonTrivialCombinerOps` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateNonTrivialCombinerOps = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateNonTrivialCombinerOps")); + /// The byte offset of `maxFragmentSize`. + public static final long OFFSET_maxFragmentSize = LAYOUT.byteOffset(PathElement.groupElement("maxFragmentSize")); + /// The memory layout of `maxFragmentSize`. + public static final MemoryLayout ML_maxFragmentSize = LAYOUT.select(PathElement.groupElement("maxFragmentSize")); + /// The [VarHandle] of `maxFragmentSizeAspectRatio` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFragmentSizeAspectRatio = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFragmentSizeAspectRatio")); + /// The [VarHandle] of `maxFragmentShadingRateCoverageSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFragmentShadingRateCoverageSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFragmentShadingRateCoverageSamples")); + /// The [VarHandle] of `maxFragmentShadingRateRasterizationSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFragmentShadingRateRasterizationSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFragmentShadingRateRasterizationSamples")); + /// The [VarHandle] of `fragmentShadingRateWithShaderDepthStencilWrites` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateWithShaderDepthStencilWrites = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateWithShaderDepthStencilWrites")); + /// The [VarHandle] of `fragmentShadingRateWithSampleMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateWithSampleMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateWithSampleMask")); + /// The [VarHandle] of `fragmentShadingRateWithShaderSampleMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateWithShaderSampleMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateWithShaderSampleMask")); + /// The [VarHandle] of `fragmentShadingRateWithConservativeRasterization` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateWithConservativeRasterization = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateWithConservativeRasterization")); + /// The [VarHandle] of `fragmentShadingRateWithFragmentShaderInterlock` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateWithFragmentShaderInterlock = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateWithFragmentShaderInterlock")); + /// The [VarHandle] of `fragmentShadingRateWithCustomSampleLocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateWithCustomSampleLocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateWithCustomSampleLocations")); + /// The [VarHandle] of `fragmentShadingRateStrictMultiplyCombiner` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateStrictMultiplyCombiner = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateStrictMultiplyCombiner")); + + /// Creates `VkPhysicalDeviceFragmentShadingRatePropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentShadingRatePropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRatePropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRatePropertiesKHR(segment); } + + /// Creates `VkPhysicalDeviceFragmentShadingRatePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRatePropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRatePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentShadingRatePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRatePropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRatePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentShadingRatePropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentShadingRatePropertiesKHR` + public static VkPhysicalDeviceFragmentShadingRatePropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentShadingRatePropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentShadingRatePropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentShadingRatePropertiesKHR` + public static VkPhysicalDeviceFragmentShadingRatePropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentShadingRatePropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `minFragmentShadingRateAttachmentTexelSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minFragmentShadingRateAttachmentTexelSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minFragmentShadingRateAttachmentTexelSize, index), ML_minFragmentShadingRateAttachmentTexelSize); } + /// {@return `minFragmentShadingRateAttachmentTexelSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minFragmentShadingRateAttachmentTexelSize(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_minFragmentShadingRateAttachmentTexelSize(segment, 0L); } + /// {@return `minFragmentShadingRateAttachmentTexelSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minFragmentShadingRateAttachmentTexelSizeAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_minFragmentShadingRateAttachmentTexelSize(this.segment(), index); } + /// {@return `minFragmentShadingRateAttachmentTexelSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minFragmentShadingRateAttachmentTexelSize() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_minFragmentShadingRateAttachmentTexelSize(this.segment()); } + /// Sets `minFragmentShadingRateAttachmentTexelSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minFragmentShadingRateAttachmentTexelSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minFragmentShadingRateAttachmentTexelSize, index), ML_minFragmentShadingRateAttachmentTexelSize.byteSize()); } + /// Sets `minFragmentShadingRateAttachmentTexelSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minFragmentShadingRateAttachmentTexelSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_minFragmentShadingRateAttachmentTexelSize(segment, 0L, value); } + /// Sets `minFragmentShadingRateAttachmentTexelSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR minFragmentShadingRateAttachmentTexelSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_minFragmentShadingRateAttachmentTexelSize(this.segment(), index, value); return this; } + /// Sets `minFragmentShadingRateAttachmentTexelSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR minFragmentShadingRateAttachmentTexelSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_minFragmentShadingRateAttachmentTexelSize(this.segment(), value); return this; } + + /// {@return `maxFragmentShadingRateAttachmentTexelSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxFragmentShadingRateAttachmentTexelSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxFragmentShadingRateAttachmentTexelSize, index), ML_maxFragmentShadingRateAttachmentTexelSize); } + /// {@return `maxFragmentShadingRateAttachmentTexelSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxFragmentShadingRateAttachmentTexelSize(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateAttachmentTexelSize(segment, 0L); } + /// {@return `maxFragmentShadingRateAttachmentTexelSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxFragmentShadingRateAttachmentTexelSizeAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateAttachmentTexelSize(this.segment(), index); } + /// {@return `maxFragmentShadingRateAttachmentTexelSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxFragmentShadingRateAttachmentTexelSize() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateAttachmentTexelSize(this.segment()); } + /// Sets `maxFragmentShadingRateAttachmentTexelSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentShadingRateAttachmentTexelSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxFragmentShadingRateAttachmentTexelSize, index), ML_maxFragmentShadingRateAttachmentTexelSize.byteSize()); } + /// Sets `maxFragmentShadingRateAttachmentTexelSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentShadingRateAttachmentTexelSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateAttachmentTexelSize(segment, 0L, value); } + /// Sets `maxFragmentShadingRateAttachmentTexelSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentShadingRateAttachmentTexelSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateAttachmentTexelSize(this.segment(), index, value); return this; } + /// Sets `maxFragmentShadingRateAttachmentTexelSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentShadingRateAttachmentTexelSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateAttachmentTexelSize(this.segment(), value); return this; } + + /// {@return `maxFragmentShadingRateAttachmentTexelSizeAspectRatio` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFragmentShadingRateAttachmentTexelSizeAspectRatio(MemorySegment segment, long index) { return (int) VH_maxFragmentShadingRateAttachmentTexelSizeAspectRatio.get(segment, 0L, index); } + /// {@return `maxFragmentShadingRateAttachmentTexelSizeAspectRatio`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFragmentShadingRateAttachmentTexelSizeAspectRatio(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateAttachmentTexelSizeAspectRatio(segment, 0L); } + /// {@return `maxFragmentShadingRateAttachmentTexelSizeAspectRatio` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFragmentShadingRateAttachmentTexelSizeAspectRatioAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateAttachmentTexelSizeAspectRatio(this.segment(), index); } + /// {@return `maxFragmentShadingRateAttachmentTexelSizeAspectRatio`} + public @CType("uint32_t") int maxFragmentShadingRateAttachmentTexelSizeAspectRatio() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateAttachmentTexelSizeAspectRatio(this.segment()); } + /// Sets `maxFragmentShadingRateAttachmentTexelSizeAspectRatio` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentShadingRateAttachmentTexelSizeAspectRatio(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFragmentShadingRateAttachmentTexelSizeAspectRatio.set(segment, 0L, index, value); } + /// Sets `maxFragmentShadingRateAttachmentTexelSizeAspectRatio` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentShadingRateAttachmentTexelSizeAspectRatio(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateAttachmentTexelSizeAspectRatio(segment, 0L, value); } + /// Sets `maxFragmentShadingRateAttachmentTexelSizeAspectRatio` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentShadingRateAttachmentTexelSizeAspectRatioAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateAttachmentTexelSizeAspectRatio(this.segment(), index, value); return this; } + /// Sets `maxFragmentShadingRateAttachmentTexelSizeAspectRatio` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentShadingRateAttachmentTexelSizeAspectRatio(@CType("uint32_t") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateAttachmentTexelSizeAspectRatio(this.segment(), value); return this; } + + /// {@return `primitiveFragmentShadingRateWithMultipleViewports` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primitiveFragmentShadingRateWithMultipleViewports(MemorySegment segment, long index) { return (int) VH_primitiveFragmentShadingRateWithMultipleViewports.get(segment, 0L, index); } + /// {@return `primitiveFragmentShadingRateWithMultipleViewports`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primitiveFragmentShadingRateWithMultipleViewports(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_primitiveFragmentShadingRateWithMultipleViewports(segment, 0L); } + /// {@return `primitiveFragmentShadingRateWithMultipleViewports` at the given index} + /// @param index the index + public @CType("VkBool32") int primitiveFragmentShadingRateWithMultipleViewportsAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_primitiveFragmentShadingRateWithMultipleViewports(this.segment(), index); } + /// {@return `primitiveFragmentShadingRateWithMultipleViewports`} + public @CType("VkBool32") int primitiveFragmentShadingRateWithMultipleViewports() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_primitiveFragmentShadingRateWithMultipleViewports(this.segment()); } + /// Sets `primitiveFragmentShadingRateWithMultipleViewports` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveFragmentShadingRateWithMultipleViewports(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primitiveFragmentShadingRateWithMultipleViewports.set(segment, 0L, index, value); } + /// Sets `primitiveFragmentShadingRateWithMultipleViewports` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveFragmentShadingRateWithMultipleViewports(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_primitiveFragmentShadingRateWithMultipleViewports(segment, 0L, value); } + /// Sets `primitiveFragmentShadingRateWithMultipleViewports` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR primitiveFragmentShadingRateWithMultipleViewportsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_primitiveFragmentShadingRateWithMultipleViewports(this.segment(), index, value); return this; } + /// Sets `primitiveFragmentShadingRateWithMultipleViewports` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR primitiveFragmentShadingRateWithMultipleViewports(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_primitiveFragmentShadingRateWithMultipleViewports(this.segment(), value); return this; } + + /// {@return `layeredShadingRateAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_layeredShadingRateAttachments(MemorySegment segment, long index) { return (int) VH_layeredShadingRateAttachments.get(segment, 0L, index); } + /// {@return `layeredShadingRateAttachments`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_layeredShadingRateAttachments(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_layeredShadingRateAttachments(segment, 0L); } + /// {@return `layeredShadingRateAttachments` at the given index} + /// @param index the index + public @CType("VkBool32") int layeredShadingRateAttachmentsAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_layeredShadingRateAttachments(this.segment(), index); } + /// {@return `layeredShadingRateAttachments`} + public @CType("VkBool32") int layeredShadingRateAttachments() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_layeredShadingRateAttachments(this.segment()); } + /// Sets `layeredShadingRateAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layeredShadingRateAttachments(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_layeredShadingRateAttachments.set(segment, 0L, index, value); } + /// Sets `layeredShadingRateAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layeredShadingRateAttachments(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_layeredShadingRateAttachments(segment, 0L, value); } + /// Sets `layeredShadingRateAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR layeredShadingRateAttachmentsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_layeredShadingRateAttachments(this.segment(), index, value); return this; } + /// Sets `layeredShadingRateAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR layeredShadingRateAttachments(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_layeredShadingRateAttachments(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateNonTrivialCombinerOps` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateNonTrivialCombinerOps(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateNonTrivialCombinerOps.get(segment, 0L, index); } + /// {@return `fragmentShadingRateNonTrivialCombinerOps`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateNonTrivialCombinerOps(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateNonTrivialCombinerOps(segment, 0L); } + /// {@return `fragmentShadingRateNonTrivialCombinerOps` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateNonTrivialCombinerOpsAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateNonTrivialCombinerOps(this.segment(), index); } + /// {@return `fragmentShadingRateNonTrivialCombinerOps`} + public @CType("VkBool32") int fragmentShadingRateNonTrivialCombinerOps() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateNonTrivialCombinerOps(this.segment()); } + /// Sets `fragmentShadingRateNonTrivialCombinerOps` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateNonTrivialCombinerOps(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateNonTrivialCombinerOps.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateNonTrivialCombinerOps` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateNonTrivialCombinerOps(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateNonTrivialCombinerOps(segment, 0L, value); } + /// Sets `fragmentShadingRateNonTrivialCombinerOps` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateNonTrivialCombinerOpsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateNonTrivialCombinerOps(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateNonTrivialCombinerOps` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateNonTrivialCombinerOps(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateNonTrivialCombinerOps(this.segment(), value); return this; } + + /// {@return `maxFragmentSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxFragmentSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxFragmentSize, index), ML_maxFragmentSize); } + /// {@return `maxFragmentSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxFragmentSize(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentSize(segment, 0L); } + /// {@return `maxFragmentSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxFragmentSizeAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentSize(this.segment(), index); } + /// {@return `maxFragmentSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxFragmentSize() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentSize(this.segment()); } + /// Sets `maxFragmentSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxFragmentSize, index), ML_maxFragmentSize.byteSize()); } + /// Sets `maxFragmentSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentSize(segment, 0L, value); } + /// Sets `maxFragmentSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentSize(this.segment(), index, value); return this; } + /// Sets `maxFragmentSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentSize(this.segment(), value); return this; } + + /// {@return `maxFragmentSizeAspectRatio` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFragmentSizeAspectRatio(MemorySegment segment, long index) { return (int) VH_maxFragmentSizeAspectRatio.get(segment, 0L, index); } + /// {@return `maxFragmentSizeAspectRatio`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFragmentSizeAspectRatio(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentSizeAspectRatio(segment, 0L); } + /// {@return `maxFragmentSizeAspectRatio` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFragmentSizeAspectRatioAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentSizeAspectRatio(this.segment(), index); } + /// {@return `maxFragmentSizeAspectRatio`} + public @CType("uint32_t") int maxFragmentSizeAspectRatio() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentSizeAspectRatio(this.segment()); } + /// Sets `maxFragmentSizeAspectRatio` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentSizeAspectRatio(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFragmentSizeAspectRatio.set(segment, 0L, index, value); } + /// Sets `maxFragmentSizeAspectRatio` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentSizeAspectRatio(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentSizeAspectRatio(segment, 0L, value); } + /// Sets `maxFragmentSizeAspectRatio` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentSizeAspectRatioAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentSizeAspectRatio(this.segment(), index, value); return this; } + /// Sets `maxFragmentSizeAspectRatio` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentSizeAspectRatio(@CType("uint32_t") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentSizeAspectRatio(this.segment(), value); return this; } + + /// {@return `maxFragmentShadingRateCoverageSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFragmentShadingRateCoverageSamples(MemorySegment segment, long index) { return (int) VH_maxFragmentShadingRateCoverageSamples.get(segment, 0L, index); } + /// {@return `maxFragmentShadingRateCoverageSamples`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFragmentShadingRateCoverageSamples(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateCoverageSamples(segment, 0L); } + /// {@return `maxFragmentShadingRateCoverageSamples` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFragmentShadingRateCoverageSamplesAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateCoverageSamples(this.segment(), index); } + /// {@return `maxFragmentShadingRateCoverageSamples`} + public @CType("uint32_t") int maxFragmentShadingRateCoverageSamples() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateCoverageSamples(this.segment()); } + /// Sets `maxFragmentShadingRateCoverageSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentShadingRateCoverageSamples(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFragmentShadingRateCoverageSamples.set(segment, 0L, index, value); } + /// Sets `maxFragmentShadingRateCoverageSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentShadingRateCoverageSamples(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateCoverageSamples(segment, 0L, value); } + /// Sets `maxFragmentShadingRateCoverageSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentShadingRateCoverageSamplesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateCoverageSamples(this.segment(), index, value); return this; } + /// Sets `maxFragmentShadingRateCoverageSamples` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentShadingRateCoverageSamples(@CType("uint32_t") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateCoverageSamples(this.segment(), value); return this; } + + /// {@return `maxFragmentShadingRateRasterizationSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_maxFragmentShadingRateRasterizationSamples(MemorySegment segment, long index) { return (int) VH_maxFragmentShadingRateRasterizationSamples.get(segment, 0L, index); } + /// {@return `maxFragmentShadingRateRasterizationSamples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_maxFragmentShadingRateRasterizationSamples(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateRasterizationSamples(segment, 0L); } + /// {@return `maxFragmentShadingRateRasterizationSamples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int maxFragmentShadingRateRasterizationSamplesAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateRasterizationSamples(this.segment(), index); } + /// {@return `maxFragmentShadingRateRasterizationSamples`} + public @CType("VkSampleCountFlagBits") int maxFragmentShadingRateRasterizationSamples() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_maxFragmentShadingRateRasterizationSamples(this.segment()); } + /// Sets `maxFragmentShadingRateRasterizationSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentShadingRateRasterizationSamples(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_maxFragmentShadingRateRasterizationSamples.set(segment, 0L, index, value); } + /// Sets `maxFragmentShadingRateRasterizationSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentShadingRateRasterizationSamples(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateRasterizationSamples(segment, 0L, value); } + /// Sets `maxFragmentShadingRateRasterizationSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentShadingRateRasterizationSamplesAt(long index, @CType("VkSampleCountFlagBits") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateRasterizationSamples(this.segment(), index, value); return this; } + /// Sets `maxFragmentShadingRateRasterizationSamples` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR maxFragmentShadingRateRasterizationSamples(@CType("VkSampleCountFlagBits") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_maxFragmentShadingRateRasterizationSamples(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateWithShaderDepthStencilWrites` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateWithShaderDepthStencilWrites(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateWithShaderDepthStencilWrites.get(segment, 0L, index); } + /// {@return `fragmentShadingRateWithShaderDepthStencilWrites`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateWithShaderDepthStencilWrites(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithShaderDepthStencilWrites(segment, 0L); } + /// {@return `fragmentShadingRateWithShaderDepthStencilWrites` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateWithShaderDepthStencilWritesAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithShaderDepthStencilWrites(this.segment(), index); } + /// {@return `fragmentShadingRateWithShaderDepthStencilWrites`} + public @CType("VkBool32") int fragmentShadingRateWithShaderDepthStencilWrites() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithShaderDepthStencilWrites(this.segment()); } + /// Sets `fragmentShadingRateWithShaderDepthStencilWrites` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateWithShaderDepthStencilWrites(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateWithShaderDepthStencilWrites.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateWithShaderDepthStencilWrites` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateWithShaderDepthStencilWrites(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithShaderDepthStencilWrites(segment, 0L, value); } + /// Sets `fragmentShadingRateWithShaderDepthStencilWrites` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithShaderDepthStencilWritesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithShaderDepthStencilWrites(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateWithShaderDepthStencilWrites` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithShaderDepthStencilWrites(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithShaderDepthStencilWrites(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateWithSampleMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateWithSampleMask(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateWithSampleMask.get(segment, 0L, index); } + /// {@return `fragmentShadingRateWithSampleMask`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateWithSampleMask(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithSampleMask(segment, 0L); } + /// {@return `fragmentShadingRateWithSampleMask` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateWithSampleMaskAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithSampleMask(this.segment(), index); } + /// {@return `fragmentShadingRateWithSampleMask`} + public @CType("VkBool32") int fragmentShadingRateWithSampleMask() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithSampleMask(this.segment()); } + /// Sets `fragmentShadingRateWithSampleMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateWithSampleMask(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateWithSampleMask.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateWithSampleMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateWithSampleMask(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithSampleMask(segment, 0L, value); } + /// Sets `fragmentShadingRateWithSampleMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithSampleMaskAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithSampleMask(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateWithSampleMask` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithSampleMask(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithSampleMask(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateWithShaderSampleMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateWithShaderSampleMask(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateWithShaderSampleMask.get(segment, 0L, index); } + /// {@return `fragmentShadingRateWithShaderSampleMask`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateWithShaderSampleMask(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithShaderSampleMask(segment, 0L); } + /// {@return `fragmentShadingRateWithShaderSampleMask` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateWithShaderSampleMaskAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithShaderSampleMask(this.segment(), index); } + /// {@return `fragmentShadingRateWithShaderSampleMask`} + public @CType("VkBool32") int fragmentShadingRateWithShaderSampleMask() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithShaderSampleMask(this.segment()); } + /// Sets `fragmentShadingRateWithShaderSampleMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateWithShaderSampleMask(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateWithShaderSampleMask.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateWithShaderSampleMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateWithShaderSampleMask(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithShaderSampleMask(segment, 0L, value); } + /// Sets `fragmentShadingRateWithShaderSampleMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithShaderSampleMaskAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithShaderSampleMask(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateWithShaderSampleMask` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithShaderSampleMask(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithShaderSampleMask(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateWithConservativeRasterization` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateWithConservativeRasterization(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateWithConservativeRasterization.get(segment, 0L, index); } + /// {@return `fragmentShadingRateWithConservativeRasterization`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateWithConservativeRasterization(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithConservativeRasterization(segment, 0L); } + /// {@return `fragmentShadingRateWithConservativeRasterization` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateWithConservativeRasterizationAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithConservativeRasterization(this.segment(), index); } + /// {@return `fragmentShadingRateWithConservativeRasterization`} + public @CType("VkBool32") int fragmentShadingRateWithConservativeRasterization() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithConservativeRasterization(this.segment()); } + /// Sets `fragmentShadingRateWithConservativeRasterization` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateWithConservativeRasterization(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateWithConservativeRasterization.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateWithConservativeRasterization` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateWithConservativeRasterization(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithConservativeRasterization(segment, 0L, value); } + /// Sets `fragmentShadingRateWithConservativeRasterization` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithConservativeRasterizationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithConservativeRasterization(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateWithConservativeRasterization` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithConservativeRasterization(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithConservativeRasterization(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateWithFragmentShaderInterlock` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateWithFragmentShaderInterlock(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateWithFragmentShaderInterlock.get(segment, 0L, index); } + /// {@return `fragmentShadingRateWithFragmentShaderInterlock`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateWithFragmentShaderInterlock(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithFragmentShaderInterlock(segment, 0L); } + /// {@return `fragmentShadingRateWithFragmentShaderInterlock` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateWithFragmentShaderInterlockAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithFragmentShaderInterlock(this.segment(), index); } + /// {@return `fragmentShadingRateWithFragmentShaderInterlock`} + public @CType("VkBool32") int fragmentShadingRateWithFragmentShaderInterlock() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithFragmentShaderInterlock(this.segment()); } + /// Sets `fragmentShadingRateWithFragmentShaderInterlock` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateWithFragmentShaderInterlock(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateWithFragmentShaderInterlock.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateWithFragmentShaderInterlock` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateWithFragmentShaderInterlock(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithFragmentShaderInterlock(segment, 0L, value); } + /// Sets `fragmentShadingRateWithFragmentShaderInterlock` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithFragmentShaderInterlockAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithFragmentShaderInterlock(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateWithFragmentShaderInterlock` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithFragmentShaderInterlock(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithFragmentShaderInterlock(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateWithCustomSampleLocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateWithCustomSampleLocations(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateWithCustomSampleLocations.get(segment, 0L, index); } + /// {@return `fragmentShadingRateWithCustomSampleLocations`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateWithCustomSampleLocations(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithCustomSampleLocations(segment, 0L); } + /// {@return `fragmentShadingRateWithCustomSampleLocations` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateWithCustomSampleLocationsAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithCustomSampleLocations(this.segment(), index); } + /// {@return `fragmentShadingRateWithCustomSampleLocations`} + public @CType("VkBool32") int fragmentShadingRateWithCustomSampleLocations() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateWithCustomSampleLocations(this.segment()); } + /// Sets `fragmentShadingRateWithCustomSampleLocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateWithCustomSampleLocations(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateWithCustomSampleLocations.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateWithCustomSampleLocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateWithCustomSampleLocations(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithCustomSampleLocations(segment, 0L, value); } + /// Sets `fragmentShadingRateWithCustomSampleLocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithCustomSampleLocationsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithCustomSampleLocations(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateWithCustomSampleLocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateWithCustomSampleLocations(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateWithCustomSampleLocations(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateStrictMultiplyCombiner` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateStrictMultiplyCombiner(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateStrictMultiplyCombiner.get(segment, 0L, index); } + /// {@return `fragmentShadingRateStrictMultiplyCombiner`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateStrictMultiplyCombiner(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateStrictMultiplyCombiner(segment, 0L); } + /// {@return `fragmentShadingRateStrictMultiplyCombiner` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateStrictMultiplyCombinerAt(long index) { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateStrictMultiplyCombiner(this.segment(), index); } + /// {@return `fragmentShadingRateStrictMultiplyCombiner`} + public @CType("VkBool32") int fragmentShadingRateStrictMultiplyCombiner() { return VkPhysicalDeviceFragmentShadingRatePropertiesKHR.get_fragmentShadingRateStrictMultiplyCombiner(this.segment()); } + /// Sets `fragmentShadingRateStrictMultiplyCombiner` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateStrictMultiplyCombiner(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateStrictMultiplyCombiner.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateStrictMultiplyCombiner` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateStrictMultiplyCombiner(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateStrictMultiplyCombiner(segment, 0L, value); } + /// Sets `fragmentShadingRateStrictMultiplyCombiner` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateStrictMultiplyCombinerAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateStrictMultiplyCombiner(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateStrictMultiplyCombiner` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRatePropertiesKHR fragmentShadingRateStrictMultiplyCombiner(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRatePropertiesKHR.set_fragmentShadingRateStrictMultiplyCombiner(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceLayeredApiPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceLayeredApiPropertiesKHR.java new file mode 100644 index 00000000..0e095bd8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceLayeredApiPropertiesKHR.java @@ -0,0 +1,313 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### vendorID +/// [VarHandle][#VH_vendorID] - [Getter][#vendorID()] - [Setter][#vendorID(int)] +/// ### deviceID +/// [VarHandle][#VH_deviceID] - [Getter][#deviceID()] - [Setter][#deviceID(int)] +/// ### layeredAPI +/// [VarHandle][#VH_layeredAPI] - [Getter][#layeredAPI()] - [Setter][#layeredAPI(int)] +/// ### deviceName +/// [Byte offset handle][#MH_deviceName] - [Memory layout][#ML_deviceName] - [Getter][#deviceName(long)] - [Setter][#deviceName(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLayeredApiPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t vendorID; +/// uint32_t deviceID; +/// VkPhysicalDeviceLayeredApiKHR layeredAPI; +/// char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName; +/// } VkPhysicalDeviceLayeredApiPropertiesKHR; +/// ``` +public final class VkPhysicalDeviceLayeredApiPropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceLayeredApiPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("vendorID"), + ValueLayout.JAVA_INT.withName("deviceID"), + ValueLayout.JAVA_INT.withName("layeredAPI"), + MemoryLayout.sequenceLayout(VK_MAX_PHYSICAL_DEVICE_NAME_SIZE, ValueLayout.JAVA_BYTE).withName("deviceName") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `vendorID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vendorID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vendorID")); + /// The [VarHandle] of `deviceID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceID")); + /// The [VarHandle] of `layeredAPI` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layeredAPI = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layeredAPI")); + /// The byte offset handle of `deviceName` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_deviceName = LAYOUT.byteOffsetHandle(PathElement.groupElement("deviceName"), PathElement.sequenceElement()); + /// The memory layout of `deviceName`. + public static final MemoryLayout ML_deviceName = LAYOUT.select(PathElement.groupElement("deviceName")); + + /// Creates `VkPhysicalDeviceLayeredApiPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLayeredApiPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLayeredApiPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredApiPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredApiPropertiesKHR(segment); } + + /// Creates `VkPhysicalDeviceLayeredApiPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredApiPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredApiPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLayeredApiPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredApiPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredApiPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLayeredApiPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLayeredApiPropertiesKHR` + public static VkPhysicalDeviceLayeredApiPropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLayeredApiPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLayeredApiPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLayeredApiPropertiesKHR` + public static VkPhysicalDeviceLayeredApiPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLayeredApiPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `vendorID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vendorID(MemorySegment segment, long index) { return (int) VH_vendorID.get(segment, 0L, index); } + /// {@return `vendorID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vendorID(MemorySegment segment) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_vendorID(segment, 0L); } + /// {@return `vendorID` at the given index} + /// @param index the index + public @CType("uint32_t") int vendorIDAt(long index) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_vendorID(this.segment(), index); } + /// {@return `vendorID`} + public @CType("uint32_t") int vendorID() { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_vendorID(this.segment()); } + /// Sets `vendorID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vendorID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vendorID.set(segment, 0L, index, value); } + /// Sets `vendorID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vendorID(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_vendorID(segment, 0L, value); } + /// Sets `vendorID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR vendorIDAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_vendorID(this.segment(), index, value); return this; } + /// Sets `vendorID` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR vendorID(@CType("uint32_t") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_vendorID(this.segment(), value); return this; } + + /// {@return `deviceID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceID(MemorySegment segment, long index) { return (int) VH_deviceID.get(segment, 0L, index); } + /// {@return `deviceID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceID(MemorySegment segment) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_deviceID(segment, 0L); } + /// {@return `deviceID` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceIDAt(long index) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_deviceID(this.segment(), index); } + /// {@return `deviceID`} + public @CType("uint32_t") int deviceID() { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_deviceID(this.segment()); } + /// Sets `deviceID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceID.set(segment, 0L, index, value); } + /// Sets `deviceID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceID(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_deviceID(segment, 0L, value); } + /// Sets `deviceID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR deviceIDAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_deviceID(this.segment(), index, value); return this; } + /// Sets `deviceID` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR deviceID(@CType("uint32_t") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_deviceID(this.segment(), value); return this; } + + /// {@return `layeredAPI` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPhysicalDeviceLayeredApiKHR") int get_layeredAPI(MemorySegment segment, long index) { return (int) VH_layeredAPI.get(segment, 0L, index); } + /// {@return `layeredAPI`} + /// @param segment the segment of the struct + public static @CType("VkPhysicalDeviceLayeredApiKHR") int get_layeredAPI(MemorySegment segment) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_layeredAPI(segment, 0L); } + /// {@return `layeredAPI` at the given index} + /// @param index the index + public @CType("VkPhysicalDeviceLayeredApiKHR") int layeredAPIAt(long index) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_layeredAPI(this.segment(), index); } + /// {@return `layeredAPI`} + public @CType("VkPhysicalDeviceLayeredApiKHR") int layeredAPI() { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_layeredAPI(this.segment()); } + /// Sets `layeredAPI` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layeredAPI(MemorySegment segment, long index, @CType("VkPhysicalDeviceLayeredApiKHR") int value) { VH_layeredAPI.set(segment, 0L, index, value); } + /// Sets `layeredAPI` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layeredAPI(MemorySegment segment, @CType("VkPhysicalDeviceLayeredApiKHR") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_layeredAPI(segment, 0L, value); } + /// Sets `layeredAPI` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR layeredAPIAt(long index, @CType("VkPhysicalDeviceLayeredApiKHR") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_layeredAPI(this.segment(), index, value); return this; } + /// Sets `layeredAPI` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR layeredAPI(@CType("VkPhysicalDeviceLayeredApiKHR") int value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_layeredAPI(this.segment(), value); return this; } + + /// {@return `deviceName` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment get_deviceName(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_deviceName.invokeExact(0L, elementIndex), index), ML_deviceName); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `deviceName`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment get_deviceName(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_deviceName(segment, 0L, elementIndex); } + /// {@return `deviceName` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment deviceNameAt(long index, long elementIndex) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_deviceName(this.segment(), index, elementIndex); } + /// {@return `deviceName`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment deviceName(long elementIndex) { return VkPhysicalDeviceLayeredApiPropertiesKHR.get_deviceName(this.segment(), elementIndex); } + /// Sets `deviceName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceName(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_deviceName.invokeExact(0L, elementIndex), index), ML_deviceName.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `deviceName` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceName(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_deviceName(segment, 0L, elementIndex, value); } + /// Sets `deviceName` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR deviceNameAt(long index, long elementIndex, @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_deviceName(this.segment(), index, elementIndex, value); return this; } + /// Sets `deviceName` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesKHR deviceName(long elementIndex, @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesKHR.set_deviceName(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceLayeredApiPropertiesListKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceLayeredApiPropertiesListKHR.java new file mode 100644 index 00000000..39263e12 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceLayeredApiPropertiesListKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### layeredApiCount +/// [VarHandle][#VH_layeredApiCount] - [Getter][#layeredApiCount()] - [Setter][#layeredApiCount(int)] +/// ### pLayeredApis +/// [VarHandle][#VH_pLayeredApis] - [Getter][#pLayeredApis()] - [Setter][#pLayeredApis(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLayeredApiPropertiesListKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t layeredApiCount; +/// VkPhysicalDeviceLayeredApiPropertiesKHR * pLayeredApis; +/// } VkPhysicalDeviceLayeredApiPropertiesListKHR; +/// ``` +public final class VkPhysicalDeviceLayeredApiPropertiesListKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceLayeredApiPropertiesListKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("layeredApiCount"), + ValueLayout.ADDRESS.withName("pLayeredApis") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `layeredApiCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layeredApiCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layeredApiCount")); + /// The [VarHandle] of `pLayeredApis` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLayeredApis = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLayeredApis")); + + /// Creates `VkPhysicalDeviceLayeredApiPropertiesListKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLayeredApiPropertiesListKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLayeredApiPropertiesListKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredApiPropertiesListKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredApiPropertiesListKHR(segment); } + + /// Creates `VkPhysicalDeviceLayeredApiPropertiesListKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredApiPropertiesListKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredApiPropertiesListKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLayeredApiPropertiesListKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredApiPropertiesListKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredApiPropertiesListKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLayeredApiPropertiesListKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLayeredApiPropertiesListKHR` + public static VkPhysicalDeviceLayeredApiPropertiesListKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLayeredApiPropertiesListKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLayeredApiPropertiesListKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLayeredApiPropertiesListKHR` + public static VkPhysicalDeviceLayeredApiPropertiesListKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLayeredApiPropertiesListKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesListKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesListKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesListKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesListKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `layeredApiCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_layeredApiCount(MemorySegment segment, long index) { return (int) VH_layeredApiCount.get(segment, 0L, index); } + /// {@return `layeredApiCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_layeredApiCount(MemorySegment segment) { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_layeredApiCount(segment, 0L); } + /// {@return `layeredApiCount` at the given index} + /// @param index the index + public @CType("uint32_t") int layeredApiCountAt(long index) { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_layeredApiCount(this.segment(), index); } + /// {@return `layeredApiCount`} + public @CType("uint32_t") int layeredApiCount() { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_layeredApiCount(this.segment()); } + /// Sets `layeredApiCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layeredApiCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_layeredApiCount.set(segment, 0L, index, value); } + /// Sets `layeredApiCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layeredApiCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_layeredApiCount(segment, 0L, value); } + /// Sets `layeredApiCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesListKHR layeredApiCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_layeredApiCount(this.segment(), index, value); return this; } + /// Sets `layeredApiCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesListKHR layeredApiCount(@CType("uint32_t") int value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_layeredApiCount(this.segment(), value); return this; } + + /// {@return `pLayeredApis` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPhysicalDeviceLayeredApiPropertiesKHR *") java.lang.foreign.MemorySegment get_pLayeredApis(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLayeredApis.get(segment, 0L, index); } + /// {@return `pLayeredApis`} + /// @param segment the segment of the struct + public static @CType("VkPhysicalDeviceLayeredApiPropertiesKHR *") java.lang.foreign.MemorySegment get_pLayeredApis(MemorySegment segment) { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_pLayeredApis(segment, 0L); } + /// {@return `pLayeredApis` at the given index} + /// @param index the index + public @CType("VkPhysicalDeviceLayeredApiPropertiesKHR *") java.lang.foreign.MemorySegment pLayeredApisAt(long index) { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_pLayeredApis(this.segment(), index); } + /// {@return `pLayeredApis`} + public @CType("VkPhysicalDeviceLayeredApiPropertiesKHR *") java.lang.foreign.MemorySegment pLayeredApis() { return VkPhysicalDeviceLayeredApiPropertiesListKHR.get_pLayeredApis(this.segment()); } + /// Sets `pLayeredApis` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLayeredApis(MemorySegment segment, long index, @CType("VkPhysicalDeviceLayeredApiPropertiesKHR *") java.lang.foreign.MemorySegment value) { VH_pLayeredApis.set(segment, 0L, index, value); } + /// Sets `pLayeredApis` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLayeredApis(MemorySegment segment, @CType("VkPhysicalDeviceLayeredApiPropertiesKHR *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_pLayeredApis(segment, 0L, value); } + /// Sets `pLayeredApis` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesListKHR pLayeredApisAt(long index, @CType("VkPhysicalDeviceLayeredApiPropertiesKHR *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_pLayeredApis(this.segment(), index, value); return this; } + /// Sets `pLayeredApis` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiPropertiesListKHR pLayeredApis(@CType("VkPhysicalDeviceLayeredApiPropertiesKHR *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiPropertiesListKHR.set_pLayeredApis(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.java new file mode 100644 index 00000000..01a2f08b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### properties +/// [Byte offset][#OFFSET_properties] - [Memory layout][#ML_properties] - [Getter][#properties()] - [Setter][#properties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLayeredApiVulkanPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkPhysicalDeviceProperties2 properties; +/// } VkPhysicalDeviceLayeredApiVulkanPropertiesKHR; +/// ``` +public final class VkPhysicalDeviceLayeredApiVulkanPropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceLayeredApiVulkanPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkPhysicalDeviceProperties2.LAYOUT.withName("properties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `properties`. + public static final long OFFSET_properties = LAYOUT.byteOffset(PathElement.groupElement("properties")); + /// The memory layout of `properties`. + public static final MemoryLayout ML_properties = LAYOUT.select(PathElement.groupElement("properties")); + + /// Creates `VkPhysicalDeviceLayeredApiVulkanPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLayeredApiVulkanPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLayeredApiVulkanPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredApiVulkanPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredApiVulkanPropertiesKHR(segment); } + + /// Creates `VkPhysicalDeviceLayeredApiVulkanPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredApiVulkanPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredApiVulkanPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLayeredApiVulkanPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredApiVulkanPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredApiVulkanPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLayeredApiVulkanPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLayeredApiVulkanPropertiesKHR` + public static VkPhysicalDeviceLayeredApiVulkanPropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLayeredApiVulkanPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLayeredApiVulkanPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLayeredApiVulkanPropertiesKHR` + public static VkPhysicalDeviceLayeredApiVulkanPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLayeredApiVulkanPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiVulkanPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiVulkanPropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiVulkanPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiVulkanPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `properties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPhysicalDeviceProperties2") java.lang.foreign.MemorySegment get_properties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_properties, index), ML_properties); } + /// {@return `properties`} + /// @param segment the segment of the struct + public static @CType("VkPhysicalDeviceProperties2") java.lang.foreign.MemorySegment get_properties(MemorySegment segment) { return VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.get_properties(segment, 0L); } + /// {@return `properties` at the given index} + /// @param index the index + public @CType("VkPhysicalDeviceProperties2") java.lang.foreign.MemorySegment propertiesAt(long index) { return VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.get_properties(this.segment(), index); } + /// {@return `properties`} + public @CType("VkPhysicalDeviceProperties2") java.lang.foreign.MemorySegment properties() { return VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.get_properties(this.segment()); } + /// Sets `properties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_properties(MemorySegment segment, long index, @CType("VkPhysicalDeviceProperties2") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_properties, index), ML_properties.byteSize()); } + /// Sets `properties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_properties(MemorySegment segment, @CType("VkPhysicalDeviceProperties2") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.set_properties(segment, 0L, value); } + /// Sets `properties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiVulkanPropertiesKHR propertiesAt(long index, @CType("VkPhysicalDeviceProperties2") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.set_properties(this.segment(), index, value); return this; } + /// Sets `properties` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredApiVulkanPropertiesKHR properties(@CType("VkPhysicalDeviceProperties2") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.set_properties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceMaintenance7FeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceMaintenance7FeaturesKHR.java new file mode 100644 index 00000000..0071bf6c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceMaintenance7FeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maintenance7 +/// [VarHandle][#VH_maintenance7] - [Getter][#maintenance7()] - [Setter][#maintenance7(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMaintenance7FeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 maintenance7; +/// } VkPhysicalDeviceMaintenance7FeaturesKHR; +/// ``` +public final class VkPhysicalDeviceMaintenance7FeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceMaintenance7FeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maintenance7") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maintenance7` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maintenance7 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maintenance7")); + + /// Creates `VkPhysicalDeviceMaintenance7FeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMaintenance7FeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMaintenance7FeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance7FeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance7FeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceMaintenance7FeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance7FeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance7FeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMaintenance7FeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance7FeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance7FeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMaintenance7FeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMaintenance7FeaturesKHR` + public static VkPhysicalDeviceMaintenance7FeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMaintenance7FeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMaintenance7FeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMaintenance7FeaturesKHR` + public static VkPhysicalDeviceMaintenance7FeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMaintenance7FeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMaintenance7FeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMaintenance7FeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMaintenance7FeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance7FeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7FeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance7FeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7FeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance7FeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMaintenance7FeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMaintenance7FeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMaintenance7FeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance7FeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7FeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance7FeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7FeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance7FeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maintenance7` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_maintenance7(MemorySegment segment, long index) { return (int) VH_maintenance7.get(segment, 0L, index); } + /// {@return `maintenance7`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_maintenance7(MemorySegment segment) { return VkPhysicalDeviceMaintenance7FeaturesKHR.get_maintenance7(segment, 0L); } + /// {@return `maintenance7` at the given index} + /// @param index the index + public @CType("VkBool32") int maintenance7At(long index) { return VkPhysicalDeviceMaintenance7FeaturesKHR.get_maintenance7(this.segment(), index); } + /// {@return `maintenance7`} + public @CType("VkBool32") int maintenance7() { return VkPhysicalDeviceMaintenance7FeaturesKHR.get_maintenance7(this.segment()); } + /// Sets `maintenance7` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maintenance7(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_maintenance7.set(segment, 0L, index, value); } + /// Sets `maintenance7` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maintenance7(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance7FeaturesKHR.set_maintenance7(segment, 0L, value); } + /// Sets `maintenance7` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7FeaturesKHR maintenance7At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance7FeaturesKHR.set_maintenance7(this.segment(), index, value); return this; } + /// Sets `maintenance7` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7FeaturesKHR maintenance7(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance7FeaturesKHR.set_maintenance7(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceMaintenance7PropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceMaintenance7PropertiesKHR.java new file mode 100644 index 00000000..7da5dc9c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceMaintenance7PropertiesKHR.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### robustFragmentShadingRateAttachmentAccess +/// [VarHandle][#VH_robustFragmentShadingRateAttachmentAccess] - [Getter][#robustFragmentShadingRateAttachmentAccess()] - [Setter][#robustFragmentShadingRateAttachmentAccess(int)] +/// ### separateDepthStencilAttachmentAccess +/// [VarHandle][#VH_separateDepthStencilAttachmentAccess] - [Getter][#separateDepthStencilAttachmentAccess()] - [Setter][#separateDepthStencilAttachmentAccess(int)] +/// ### maxDescriptorSetTotalUniformBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetTotalUniformBuffersDynamic] - [Getter][#maxDescriptorSetTotalUniformBuffersDynamic()] - [Setter][#maxDescriptorSetTotalUniformBuffersDynamic(int)] +/// ### maxDescriptorSetTotalStorageBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetTotalStorageBuffersDynamic] - [Getter][#maxDescriptorSetTotalStorageBuffersDynamic()] - [Setter][#maxDescriptorSetTotalStorageBuffersDynamic(int)] +/// ### maxDescriptorSetTotalBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetTotalBuffersDynamic] - [Getter][#maxDescriptorSetTotalBuffersDynamic()] - [Setter][#maxDescriptorSetTotalBuffersDynamic(int)] +/// ### maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic] - [Getter][#maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic()] - [Setter][#maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(int)] +/// ### maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic] - [Getter][#maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic()] - [Setter][#maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(int)] +/// ### maxDescriptorSetUpdateAfterBindTotalBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic] - [Getter][#maxDescriptorSetUpdateAfterBindTotalBuffersDynamic()] - [Setter][#maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMaintenance7PropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 robustFragmentShadingRateAttachmentAccess; +/// VkBool32 separateDepthStencilAttachmentAccess; +/// uint32_t maxDescriptorSetTotalUniformBuffersDynamic; +/// uint32_t maxDescriptorSetTotalStorageBuffersDynamic; +/// uint32_t maxDescriptorSetTotalBuffersDynamic; +/// uint32_t maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic; +/// uint32_t maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic; +/// uint32_t maxDescriptorSetUpdateAfterBindTotalBuffersDynamic; +/// } VkPhysicalDeviceMaintenance7PropertiesKHR; +/// ``` +public final class VkPhysicalDeviceMaintenance7PropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceMaintenance7PropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("robustFragmentShadingRateAttachmentAccess"), + ValueLayout.JAVA_INT.withName("separateDepthStencilAttachmentAccess"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetTotalUniformBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetTotalStorageBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetTotalBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindTotalBuffersDynamic") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `robustFragmentShadingRateAttachmentAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_robustFragmentShadingRateAttachmentAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustFragmentShadingRateAttachmentAccess")); + /// The [VarHandle] of `separateDepthStencilAttachmentAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_separateDepthStencilAttachmentAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("separateDepthStencilAttachmentAccess")); + /// The [VarHandle] of `maxDescriptorSetTotalUniformBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetTotalUniformBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetTotalUniformBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetTotalStorageBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetTotalStorageBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetTotalStorageBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetTotalBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetTotalBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetTotalBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindTotalBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindTotalBuffersDynamic")); + + /// Creates `VkPhysicalDeviceMaintenance7PropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMaintenance7PropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMaintenance7PropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance7PropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance7PropertiesKHR(segment); } + + /// Creates `VkPhysicalDeviceMaintenance7PropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance7PropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance7PropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMaintenance7PropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance7PropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance7PropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMaintenance7PropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMaintenance7PropertiesKHR` + public static VkPhysicalDeviceMaintenance7PropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMaintenance7PropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMaintenance7PropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMaintenance7PropertiesKHR` + public static VkPhysicalDeviceMaintenance7PropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMaintenance7PropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `robustFragmentShadingRateAttachmentAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_robustFragmentShadingRateAttachmentAccess(MemorySegment segment, long index) { return (int) VH_robustFragmentShadingRateAttachmentAccess.get(segment, 0L, index); } + /// {@return `robustFragmentShadingRateAttachmentAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_robustFragmentShadingRateAttachmentAccess(MemorySegment segment) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_robustFragmentShadingRateAttachmentAccess(segment, 0L); } + /// {@return `robustFragmentShadingRateAttachmentAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int robustFragmentShadingRateAttachmentAccessAt(long index) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_robustFragmentShadingRateAttachmentAccess(this.segment(), index); } + /// {@return `robustFragmentShadingRateAttachmentAccess`} + public @CType("VkBool32") int robustFragmentShadingRateAttachmentAccess() { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_robustFragmentShadingRateAttachmentAccess(this.segment()); } + /// Sets `robustFragmentShadingRateAttachmentAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustFragmentShadingRateAttachmentAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_robustFragmentShadingRateAttachmentAccess.set(segment, 0L, index, value); } + /// Sets `robustFragmentShadingRateAttachmentAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustFragmentShadingRateAttachmentAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_robustFragmentShadingRateAttachmentAccess(segment, 0L, value); } + /// Sets `robustFragmentShadingRateAttachmentAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR robustFragmentShadingRateAttachmentAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_robustFragmentShadingRateAttachmentAccess(this.segment(), index, value); return this; } + /// Sets `robustFragmentShadingRateAttachmentAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR robustFragmentShadingRateAttachmentAccess(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_robustFragmentShadingRateAttachmentAccess(this.segment(), value); return this; } + + /// {@return `separateDepthStencilAttachmentAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_separateDepthStencilAttachmentAccess(MemorySegment segment, long index) { return (int) VH_separateDepthStencilAttachmentAccess.get(segment, 0L, index); } + /// {@return `separateDepthStencilAttachmentAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_separateDepthStencilAttachmentAccess(MemorySegment segment) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_separateDepthStencilAttachmentAccess(segment, 0L); } + /// {@return `separateDepthStencilAttachmentAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int separateDepthStencilAttachmentAccessAt(long index) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_separateDepthStencilAttachmentAccess(this.segment(), index); } + /// {@return `separateDepthStencilAttachmentAccess`} + public @CType("VkBool32") int separateDepthStencilAttachmentAccess() { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_separateDepthStencilAttachmentAccess(this.segment()); } + /// Sets `separateDepthStencilAttachmentAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_separateDepthStencilAttachmentAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_separateDepthStencilAttachmentAccess.set(segment, 0L, index, value); } + /// Sets `separateDepthStencilAttachmentAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_separateDepthStencilAttachmentAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_separateDepthStencilAttachmentAccess(segment, 0L, value); } + /// Sets `separateDepthStencilAttachmentAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR separateDepthStencilAttachmentAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_separateDepthStencilAttachmentAccess(this.segment(), index, value); return this; } + /// Sets `separateDepthStencilAttachmentAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR separateDepthStencilAttachmentAccess(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_separateDepthStencilAttachmentAccess(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetTotalUniformBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetTotalUniformBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetTotalUniformBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetTotalUniformBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetTotalUniformBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetTotalUniformBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetTotalUniformBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetTotalUniformBuffersDynamicAt(long index) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetTotalUniformBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetTotalUniformBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetTotalUniformBuffersDynamic() { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetTotalUniformBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetTotalUniformBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetTotalUniformBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetTotalUniformBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetTotalUniformBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetTotalUniformBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetTotalUniformBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetTotalUniformBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetTotalUniformBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetTotalUniformBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetTotalUniformBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetTotalUniformBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetTotalUniformBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetTotalStorageBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetTotalStorageBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetTotalStorageBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetTotalStorageBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetTotalStorageBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetTotalStorageBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetTotalStorageBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetTotalStorageBuffersDynamicAt(long index) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetTotalStorageBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetTotalStorageBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetTotalStorageBuffersDynamic() { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetTotalStorageBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetTotalStorageBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetTotalStorageBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetTotalStorageBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetTotalStorageBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetTotalStorageBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetTotalStorageBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetTotalStorageBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetTotalStorageBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetTotalStorageBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetTotalStorageBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetTotalStorageBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetTotalStorageBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetTotalBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetTotalBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetTotalBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetTotalBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetTotalBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetTotalBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetTotalBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetTotalBuffersDynamicAt(long index) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetTotalBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetTotalBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetTotalBuffersDynamic() { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetTotalBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetTotalBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetTotalBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetTotalBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetTotalBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetTotalBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetTotalBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetTotalBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetTotalBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetTotalBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetTotalBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetTotalBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetTotalBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamicAt(long index) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic() { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamicAt(long index) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic() { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindTotalBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindTotalBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindTotalBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindTotalBuffersDynamicAt(long index) { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindTotalBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindTotalBuffersDynamic() { return VkPhysicalDeviceMaintenance7PropertiesKHR.get_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindTotalBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindTotalBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindTotalBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetUpdateAfterBindTotalBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindTotalBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance7PropertiesKHR maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceMaintenance7PropertiesKHR.set_maxDescriptorSetUpdateAfterBindTotalBuffersDynamic(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePerformanceQueryFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePerformanceQueryFeaturesKHR.java new file mode 100644 index 00000000..4d4575c9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePerformanceQueryFeaturesKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### performanceCounterQueryPools +/// [VarHandle][#VH_performanceCounterQueryPools] - [Getter][#performanceCounterQueryPools()] - [Setter][#performanceCounterQueryPools(int)] +/// ### performanceCounterMultipleQueryPools +/// [VarHandle][#VH_performanceCounterMultipleQueryPools] - [Getter][#performanceCounterMultipleQueryPools()] - [Setter][#performanceCounterMultipleQueryPools(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePerformanceQueryFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 performanceCounterQueryPools; +/// VkBool32 performanceCounterMultipleQueryPools; +/// } VkPhysicalDevicePerformanceQueryFeaturesKHR; +/// ``` +public final class VkPhysicalDevicePerformanceQueryFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDevicePerformanceQueryFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("performanceCounterQueryPools"), + ValueLayout.JAVA_INT.withName("performanceCounterMultipleQueryPools") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `performanceCounterQueryPools` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_performanceCounterQueryPools = LAYOUT.arrayElementVarHandle(PathElement.groupElement("performanceCounterQueryPools")); + /// The [VarHandle] of `performanceCounterMultipleQueryPools` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_performanceCounterMultipleQueryPools = LAYOUT.arrayElementVarHandle(PathElement.groupElement("performanceCounterMultipleQueryPools")); + + /// Creates `VkPhysicalDevicePerformanceQueryFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePerformanceQueryFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePerformanceQueryFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePerformanceQueryFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePerformanceQueryFeaturesKHR(segment); } + + /// Creates `VkPhysicalDevicePerformanceQueryFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePerformanceQueryFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePerformanceQueryFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePerformanceQueryFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePerformanceQueryFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePerformanceQueryFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePerformanceQueryFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePerformanceQueryFeaturesKHR` + public static VkPhysicalDevicePerformanceQueryFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePerformanceQueryFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePerformanceQueryFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePerformanceQueryFeaturesKHR` + public static VkPhysicalDevicePerformanceQueryFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePerformanceQueryFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `performanceCounterQueryPools` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_performanceCounterQueryPools(MemorySegment segment, long index) { return (int) VH_performanceCounterQueryPools.get(segment, 0L, index); } + /// {@return `performanceCounterQueryPools`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_performanceCounterQueryPools(MemorySegment segment) { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_performanceCounterQueryPools(segment, 0L); } + /// {@return `performanceCounterQueryPools` at the given index} + /// @param index the index + public @CType("VkBool32") int performanceCounterQueryPoolsAt(long index) { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_performanceCounterQueryPools(this.segment(), index); } + /// {@return `performanceCounterQueryPools`} + public @CType("VkBool32") int performanceCounterQueryPools() { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_performanceCounterQueryPools(this.segment()); } + /// Sets `performanceCounterQueryPools` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_performanceCounterQueryPools(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_performanceCounterQueryPools.set(segment, 0L, index, value); } + /// Sets `performanceCounterQueryPools` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_performanceCounterQueryPools(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_performanceCounterQueryPools(segment, 0L, value); } + /// Sets `performanceCounterQueryPools` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryFeaturesKHR performanceCounterQueryPoolsAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_performanceCounterQueryPools(this.segment(), index, value); return this; } + /// Sets `performanceCounterQueryPools` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryFeaturesKHR performanceCounterQueryPools(@CType("VkBool32") int value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_performanceCounterQueryPools(this.segment(), value); return this; } + + /// {@return `performanceCounterMultipleQueryPools` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_performanceCounterMultipleQueryPools(MemorySegment segment, long index) { return (int) VH_performanceCounterMultipleQueryPools.get(segment, 0L, index); } + /// {@return `performanceCounterMultipleQueryPools`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_performanceCounterMultipleQueryPools(MemorySegment segment) { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_performanceCounterMultipleQueryPools(segment, 0L); } + /// {@return `performanceCounterMultipleQueryPools` at the given index} + /// @param index the index + public @CType("VkBool32") int performanceCounterMultipleQueryPoolsAt(long index) { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_performanceCounterMultipleQueryPools(this.segment(), index); } + /// {@return `performanceCounterMultipleQueryPools`} + public @CType("VkBool32") int performanceCounterMultipleQueryPools() { return VkPhysicalDevicePerformanceQueryFeaturesKHR.get_performanceCounterMultipleQueryPools(this.segment()); } + /// Sets `performanceCounterMultipleQueryPools` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_performanceCounterMultipleQueryPools(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_performanceCounterMultipleQueryPools.set(segment, 0L, index, value); } + /// Sets `performanceCounterMultipleQueryPools` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_performanceCounterMultipleQueryPools(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_performanceCounterMultipleQueryPools(segment, 0L, value); } + /// Sets `performanceCounterMultipleQueryPools` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryFeaturesKHR performanceCounterMultipleQueryPoolsAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_performanceCounterMultipleQueryPools(this.segment(), index, value); return this; } + /// Sets `performanceCounterMultipleQueryPools` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryFeaturesKHR performanceCounterMultipleQueryPools(@CType("VkBool32") int value) { VkPhysicalDevicePerformanceQueryFeaturesKHR.set_performanceCounterMultipleQueryPools(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePerformanceQueryPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePerformanceQueryPropertiesKHR.java new file mode 100644 index 00000000..3c5e4b07 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePerformanceQueryPropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### allowCommandBufferQueryCopies +/// [VarHandle][#VH_allowCommandBufferQueryCopies] - [Getter][#allowCommandBufferQueryCopies()] - [Setter][#allowCommandBufferQueryCopies(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePerformanceQueryPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 allowCommandBufferQueryCopies; +/// } VkPhysicalDevicePerformanceQueryPropertiesKHR; +/// ``` +public final class VkPhysicalDevicePerformanceQueryPropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDevicePerformanceQueryPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("allowCommandBufferQueryCopies") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `allowCommandBufferQueryCopies` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_allowCommandBufferQueryCopies = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allowCommandBufferQueryCopies")); + + /// Creates `VkPhysicalDevicePerformanceQueryPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePerformanceQueryPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePerformanceQueryPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePerformanceQueryPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePerformanceQueryPropertiesKHR(segment); } + + /// Creates `VkPhysicalDevicePerformanceQueryPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePerformanceQueryPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePerformanceQueryPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePerformanceQueryPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePerformanceQueryPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePerformanceQueryPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePerformanceQueryPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePerformanceQueryPropertiesKHR` + public static VkPhysicalDevicePerformanceQueryPropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePerformanceQueryPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePerformanceQueryPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePerformanceQueryPropertiesKHR` + public static VkPhysicalDevicePerformanceQueryPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePerformanceQueryPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePerformanceQueryPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePerformanceQueryPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePerformanceQueryPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePerformanceQueryPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePerformanceQueryPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryPropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDevicePerformanceQueryPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePerformanceQueryPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePerformanceQueryPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePerformanceQueryPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePerformanceQueryPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePerformanceQueryPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePerformanceQueryPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `allowCommandBufferQueryCopies` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_allowCommandBufferQueryCopies(MemorySegment segment, long index) { return (int) VH_allowCommandBufferQueryCopies.get(segment, 0L, index); } + /// {@return `allowCommandBufferQueryCopies`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_allowCommandBufferQueryCopies(MemorySegment segment) { return VkPhysicalDevicePerformanceQueryPropertiesKHR.get_allowCommandBufferQueryCopies(segment, 0L); } + /// {@return `allowCommandBufferQueryCopies` at the given index} + /// @param index the index + public @CType("VkBool32") int allowCommandBufferQueryCopiesAt(long index) { return VkPhysicalDevicePerformanceQueryPropertiesKHR.get_allowCommandBufferQueryCopies(this.segment(), index); } + /// {@return `allowCommandBufferQueryCopies`} + public @CType("VkBool32") int allowCommandBufferQueryCopies() { return VkPhysicalDevicePerformanceQueryPropertiesKHR.get_allowCommandBufferQueryCopies(this.segment()); } + /// Sets `allowCommandBufferQueryCopies` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allowCommandBufferQueryCopies(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_allowCommandBufferQueryCopies.set(segment, 0L, index, value); } + /// Sets `allowCommandBufferQueryCopies` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allowCommandBufferQueryCopies(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePerformanceQueryPropertiesKHR.set_allowCommandBufferQueryCopies(segment, 0L, value); } + /// Sets `allowCommandBufferQueryCopies` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryPropertiesKHR allowCommandBufferQueryCopiesAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePerformanceQueryPropertiesKHR.set_allowCommandBufferQueryCopies(this.segment(), index, value); return this; } + /// Sets `allowCommandBufferQueryCopies` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerformanceQueryPropertiesKHR allowCommandBufferQueryCopies(@CType("VkBool32") int value) { VkPhysicalDevicePerformanceQueryPropertiesKHR.set_allowCommandBufferQueryCopies(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePipelineBinaryFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePipelineBinaryFeaturesKHR.java new file mode 100644 index 00000000..49613813 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePipelineBinaryFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineBinaries +/// [VarHandle][#VH_pipelineBinaries] - [Getter][#pipelineBinaries()] - [Setter][#pipelineBinaries(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePipelineBinaryFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 pipelineBinaries; +/// } VkPhysicalDevicePipelineBinaryFeaturesKHR; +/// ``` +public final class VkPhysicalDevicePipelineBinaryFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDevicePipelineBinaryFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineBinaries") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineBinaries` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBinaries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBinaries")); + + /// Creates `VkPhysicalDevicePipelineBinaryFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePipelineBinaryFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePipelineBinaryFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineBinaryFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineBinaryFeaturesKHR(segment); } + + /// Creates `VkPhysicalDevicePipelineBinaryFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineBinaryFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineBinaryFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePipelineBinaryFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineBinaryFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineBinaryFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePipelineBinaryFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePipelineBinaryFeaturesKHR` + public static VkPhysicalDevicePipelineBinaryFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePipelineBinaryFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePipelineBinaryFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePipelineBinaryFeaturesKHR` + public static VkPhysicalDevicePipelineBinaryFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePipelineBinaryFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePipelineBinaryFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePipelineBinaryFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePipelineBinaryFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineBinaryFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineBinaryFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDevicePipelineBinaryFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePipelineBinaryFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePipelineBinaryFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePipelineBinaryFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineBinaryFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineBinaryFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineBinaryFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineBinaries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineBinaries(MemorySegment segment, long index) { return (int) VH_pipelineBinaries.get(segment, 0L, index); } + /// {@return `pipelineBinaries`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineBinaries(MemorySegment segment) { return VkPhysicalDevicePipelineBinaryFeaturesKHR.get_pipelineBinaries(segment, 0L); } + /// {@return `pipelineBinaries` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineBinariesAt(long index) { return VkPhysicalDevicePipelineBinaryFeaturesKHR.get_pipelineBinaries(this.segment(), index); } + /// {@return `pipelineBinaries`} + public @CType("VkBool32") int pipelineBinaries() { return VkPhysicalDevicePipelineBinaryFeaturesKHR.get_pipelineBinaries(this.segment()); } + /// Sets `pipelineBinaries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBinaries(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineBinaries.set(segment, 0L, index, value); } + /// Sets `pipelineBinaries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBinaries(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryFeaturesKHR.set_pipelineBinaries(segment, 0L, value); } + /// Sets `pipelineBinaries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryFeaturesKHR pipelineBinariesAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryFeaturesKHR.set_pipelineBinaries(this.segment(), index, value); return this; } + /// Sets `pipelineBinaries` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryFeaturesKHR pipelineBinaries(@CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryFeaturesKHR.set_pipelineBinaries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePipelineBinaryPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePipelineBinaryPropertiesKHR.java new file mode 100644 index 00000000..31dbcc7c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePipelineBinaryPropertiesKHR.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineBinaryInternalCache +/// [VarHandle][#VH_pipelineBinaryInternalCache] - [Getter][#pipelineBinaryInternalCache()] - [Setter][#pipelineBinaryInternalCache(int)] +/// ### pipelineBinaryInternalCacheControl +/// [VarHandle][#VH_pipelineBinaryInternalCacheControl] - [Getter][#pipelineBinaryInternalCacheControl()] - [Setter][#pipelineBinaryInternalCacheControl(int)] +/// ### pipelineBinaryPrefersInternalCache +/// [VarHandle][#VH_pipelineBinaryPrefersInternalCache] - [Getter][#pipelineBinaryPrefersInternalCache()] - [Setter][#pipelineBinaryPrefersInternalCache(int)] +/// ### pipelineBinaryPrecompiledInternalCache +/// [VarHandle][#VH_pipelineBinaryPrecompiledInternalCache] - [Getter][#pipelineBinaryPrecompiledInternalCache()] - [Setter][#pipelineBinaryPrecompiledInternalCache(int)] +/// ### pipelineBinaryCompressedData +/// [VarHandle][#VH_pipelineBinaryCompressedData] - [Getter][#pipelineBinaryCompressedData()] - [Setter][#pipelineBinaryCompressedData(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePipelineBinaryPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 pipelineBinaryInternalCache; +/// VkBool32 pipelineBinaryInternalCacheControl; +/// VkBool32 pipelineBinaryPrefersInternalCache; +/// VkBool32 pipelineBinaryPrecompiledInternalCache; +/// VkBool32 pipelineBinaryCompressedData; +/// } VkPhysicalDevicePipelineBinaryPropertiesKHR; +/// ``` +public final class VkPhysicalDevicePipelineBinaryPropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDevicePipelineBinaryPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineBinaryInternalCache"), + ValueLayout.JAVA_INT.withName("pipelineBinaryInternalCacheControl"), + ValueLayout.JAVA_INT.withName("pipelineBinaryPrefersInternalCache"), + ValueLayout.JAVA_INT.withName("pipelineBinaryPrecompiledInternalCache"), + ValueLayout.JAVA_INT.withName("pipelineBinaryCompressedData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineBinaryInternalCache` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBinaryInternalCache = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBinaryInternalCache")); + /// The [VarHandle] of `pipelineBinaryInternalCacheControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBinaryInternalCacheControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBinaryInternalCacheControl")); + /// The [VarHandle] of `pipelineBinaryPrefersInternalCache` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBinaryPrefersInternalCache = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBinaryPrefersInternalCache")); + /// The [VarHandle] of `pipelineBinaryPrecompiledInternalCache` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBinaryPrecompiledInternalCache = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBinaryPrecompiledInternalCache")); + /// The [VarHandle] of `pipelineBinaryCompressedData` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBinaryCompressedData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBinaryCompressedData")); + + /// Creates `VkPhysicalDevicePipelineBinaryPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePipelineBinaryPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePipelineBinaryPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineBinaryPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineBinaryPropertiesKHR(segment); } + + /// Creates `VkPhysicalDevicePipelineBinaryPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineBinaryPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineBinaryPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePipelineBinaryPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineBinaryPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineBinaryPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePipelineBinaryPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePipelineBinaryPropertiesKHR` + public static VkPhysicalDevicePipelineBinaryPropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePipelineBinaryPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePipelineBinaryPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePipelineBinaryPropertiesKHR` + public static VkPhysicalDevicePipelineBinaryPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePipelineBinaryPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineBinaryInternalCache` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineBinaryInternalCache(MemorySegment segment, long index) { return (int) VH_pipelineBinaryInternalCache.get(segment, 0L, index); } + /// {@return `pipelineBinaryInternalCache`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineBinaryInternalCache(MemorySegment segment) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryInternalCache(segment, 0L); } + /// {@return `pipelineBinaryInternalCache` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineBinaryInternalCacheAt(long index) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryInternalCache(this.segment(), index); } + /// {@return `pipelineBinaryInternalCache`} + public @CType("VkBool32") int pipelineBinaryInternalCache() { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryInternalCache(this.segment()); } + /// Sets `pipelineBinaryInternalCache` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBinaryInternalCache(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineBinaryInternalCache.set(segment, 0L, index, value); } + /// Sets `pipelineBinaryInternalCache` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBinaryInternalCache(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryInternalCache(segment, 0L, value); } + /// Sets `pipelineBinaryInternalCache` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pipelineBinaryInternalCacheAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryInternalCache(this.segment(), index, value); return this; } + /// Sets `pipelineBinaryInternalCache` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pipelineBinaryInternalCache(@CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryInternalCache(this.segment(), value); return this; } + + /// {@return `pipelineBinaryInternalCacheControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineBinaryInternalCacheControl(MemorySegment segment, long index) { return (int) VH_pipelineBinaryInternalCacheControl.get(segment, 0L, index); } + /// {@return `pipelineBinaryInternalCacheControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineBinaryInternalCacheControl(MemorySegment segment) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryInternalCacheControl(segment, 0L); } + /// {@return `pipelineBinaryInternalCacheControl` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineBinaryInternalCacheControlAt(long index) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryInternalCacheControl(this.segment(), index); } + /// {@return `pipelineBinaryInternalCacheControl`} + public @CType("VkBool32") int pipelineBinaryInternalCacheControl() { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryInternalCacheControl(this.segment()); } + /// Sets `pipelineBinaryInternalCacheControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBinaryInternalCacheControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineBinaryInternalCacheControl.set(segment, 0L, index, value); } + /// Sets `pipelineBinaryInternalCacheControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBinaryInternalCacheControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryInternalCacheControl(segment, 0L, value); } + /// Sets `pipelineBinaryInternalCacheControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pipelineBinaryInternalCacheControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryInternalCacheControl(this.segment(), index, value); return this; } + /// Sets `pipelineBinaryInternalCacheControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pipelineBinaryInternalCacheControl(@CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryInternalCacheControl(this.segment(), value); return this; } + + /// {@return `pipelineBinaryPrefersInternalCache` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineBinaryPrefersInternalCache(MemorySegment segment, long index) { return (int) VH_pipelineBinaryPrefersInternalCache.get(segment, 0L, index); } + /// {@return `pipelineBinaryPrefersInternalCache`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineBinaryPrefersInternalCache(MemorySegment segment) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryPrefersInternalCache(segment, 0L); } + /// {@return `pipelineBinaryPrefersInternalCache` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineBinaryPrefersInternalCacheAt(long index) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryPrefersInternalCache(this.segment(), index); } + /// {@return `pipelineBinaryPrefersInternalCache`} + public @CType("VkBool32") int pipelineBinaryPrefersInternalCache() { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryPrefersInternalCache(this.segment()); } + /// Sets `pipelineBinaryPrefersInternalCache` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBinaryPrefersInternalCache(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineBinaryPrefersInternalCache.set(segment, 0L, index, value); } + /// Sets `pipelineBinaryPrefersInternalCache` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBinaryPrefersInternalCache(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryPrefersInternalCache(segment, 0L, value); } + /// Sets `pipelineBinaryPrefersInternalCache` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pipelineBinaryPrefersInternalCacheAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryPrefersInternalCache(this.segment(), index, value); return this; } + /// Sets `pipelineBinaryPrefersInternalCache` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pipelineBinaryPrefersInternalCache(@CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryPrefersInternalCache(this.segment(), value); return this; } + + /// {@return `pipelineBinaryPrecompiledInternalCache` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineBinaryPrecompiledInternalCache(MemorySegment segment, long index) { return (int) VH_pipelineBinaryPrecompiledInternalCache.get(segment, 0L, index); } + /// {@return `pipelineBinaryPrecompiledInternalCache`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineBinaryPrecompiledInternalCache(MemorySegment segment) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryPrecompiledInternalCache(segment, 0L); } + /// {@return `pipelineBinaryPrecompiledInternalCache` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineBinaryPrecompiledInternalCacheAt(long index) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryPrecompiledInternalCache(this.segment(), index); } + /// {@return `pipelineBinaryPrecompiledInternalCache`} + public @CType("VkBool32") int pipelineBinaryPrecompiledInternalCache() { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryPrecompiledInternalCache(this.segment()); } + /// Sets `pipelineBinaryPrecompiledInternalCache` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBinaryPrecompiledInternalCache(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineBinaryPrecompiledInternalCache.set(segment, 0L, index, value); } + /// Sets `pipelineBinaryPrecompiledInternalCache` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBinaryPrecompiledInternalCache(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryPrecompiledInternalCache(segment, 0L, value); } + /// Sets `pipelineBinaryPrecompiledInternalCache` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pipelineBinaryPrecompiledInternalCacheAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryPrecompiledInternalCache(this.segment(), index, value); return this; } + /// Sets `pipelineBinaryPrecompiledInternalCache` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pipelineBinaryPrecompiledInternalCache(@CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryPrecompiledInternalCache(this.segment(), value); return this; } + + /// {@return `pipelineBinaryCompressedData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineBinaryCompressedData(MemorySegment segment, long index) { return (int) VH_pipelineBinaryCompressedData.get(segment, 0L, index); } + /// {@return `pipelineBinaryCompressedData`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineBinaryCompressedData(MemorySegment segment) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryCompressedData(segment, 0L); } + /// {@return `pipelineBinaryCompressedData` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineBinaryCompressedDataAt(long index) { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryCompressedData(this.segment(), index); } + /// {@return `pipelineBinaryCompressedData`} + public @CType("VkBool32") int pipelineBinaryCompressedData() { return VkPhysicalDevicePipelineBinaryPropertiesKHR.get_pipelineBinaryCompressedData(this.segment()); } + /// Sets `pipelineBinaryCompressedData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBinaryCompressedData(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineBinaryCompressedData.set(segment, 0L, index, value); } + /// Sets `pipelineBinaryCompressedData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBinaryCompressedData(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryCompressedData(segment, 0L, value); } + /// Sets `pipelineBinaryCompressedData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pipelineBinaryCompressedDataAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryCompressedData(this.segment(), index, value); return this; } + /// Sets `pipelineBinaryCompressedData` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineBinaryPropertiesKHR pipelineBinaryCompressedData(@CType("VkBool32") int value) { VkPhysicalDevicePipelineBinaryPropertiesKHR.set_pipelineBinaryCompressedData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.java new file mode 100644 index 00000000..59333109 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineExecutableInfo +/// [VarHandle][#VH_pipelineExecutableInfo] - [Getter][#pipelineExecutableInfo()] - [Setter][#pipelineExecutableInfo(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 pipelineExecutableInfo; +/// } VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR; +/// ``` +public final class VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineExecutableInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineExecutableInfo` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineExecutableInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineExecutableInfo")); + + /// Creates `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(segment); } + + /// Creates `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR` + public static VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR` + public static VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineExecutableInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineExecutableInfo(MemorySegment segment, long index) { return (int) VH_pipelineExecutableInfo.get(segment, 0L, index); } + /// {@return `pipelineExecutableInfo`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineExecutableInfo(MemorySegment segment) { return VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.get_pipelineExecutableInfo(segment, 0L); } + /// {@return `pipelineExecutableInfo` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineExecutableInfoAt(long index) { return VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.get_pipelineExecutableInfo(this.segment(), index); } + /// {@return `pipelineExecutableInfo`} + public @CType("VkBool32") int pipelineExecutableInfo() { return VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.get_pipelineExecutableInfo(this.segment()); } + /// Sets `pipelineExecutableInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineExecutableInfo(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineExecutableInfo.set(segment, 0L, index, value); } + /// Sets `pipelineExecutableInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineExecutableInfo(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.set_pipelineExecutableInfo(segment, 0L, value); } + /// Sets `pipelineExecutableInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR pipelineExecutableInfoAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.set_pipelineExecutableInfo(this.segment(), index, value); return this; } + /// Sets `pipelineExecutableInfo` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR pipelineExecutableInfo(@CType("VkBool32") int value) { VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.set_pipelineExecutableInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePortabilitySubsetFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePortabilitySubsetFeaturesKHR.java new file mode 100644 index 00000000..48d0d001 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePortabilitySubsetFeaturesKHR.java @@ -0,0 +1,703 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### constantAlphaColorBlendFactors +/// [VarHandle][#VH_constantAlphaColorBlendFactors] - [Getter][#constantAlphaColorBlendFactors()] - [Setter][#constantAlphaColorBlendFactors(int)] +/// ### events +/// [VarHandle][#VH_events] - [Getter][#events()] - [Setter][#events(int)] +/// ### imageViewFormatReinterpretation +/// [VarHandle][#VH_imageViewFormatReinterpretation] - [Getter][#imageViewFormatReinterpretation()] - [Setter][#imageViewFormatReinterpretation(int)] +/// ### imageViewFormatSwizzle +/// [VarHandle][#VH_imageViewFormatSwizzle] - [Getter][#imageViewFormatSwizzle()] - [Setter][#imageViewFormatSwizzle(int)] +/// ### imageView2DOn3DImage +/// [VarHandle][#VH_imageView2DOn3DImage] - [Getter][#imageView2DOn3DImage()] - [Setter][#imageView2DOn3DImage(int)] +/// ### multisampleArrayImage +/// [VarHandle][#VH_multisampleArrayImage] - [Getter][#multisampleArrayImage()] - [Setter][#multisampleArrayImage(int)] +/// ### mutableComparisonSamplers +/// [VarHandle][#VH_mutableComparisonSamplers] - [Getter][#mutableComparisonSamplers()] - [Setter][#mutableComparisonSamplers(int)] +/// ### pointPolygons +/// [VarHandle][#VH_pointPolygons] - [Getter][#pointPolygons()] - [Setter][#pointPolygons(int)] +/// ### samplerMipLodBias +/// [VarHandle][#VH_samplerMipLodBias] - [Getter][#samplerMipLodBias()] - [Setter][#samplerMipLodBias(int)] +/// ### separateStencilMaskRef +/// [VarHandle][#VH_separateStencilMaskRef] - [Getter][#separateStencilMaskRef()] - [Setter][#separateStencilMaskRef(int)] +/// ### shaderSampleRateInterpolationFunctions +/// [VarHandle][#VH_shaderSampleRateInterpolationFunctions] - [Getter][#shaderSampleRateInterpolationFunctions()] - [Setter][#shaderSampleRateInterpolationFunctions(int)] +/// ### tessellationIsolines +/// [VarHandle][#VH_tessellationIsolines] - [Getter][#tessellationIsolines()] - [Setter][#tessellationIsolines(int)] +/// ### tessellationPointMode +/// [VarHandle][#VH_tessellationPointMode] - [Getter][#tessellationPointMode()] - [Setter][#tessellationPointMode(int)] +/// ### triangleFans +/// [VarHandle][#VH_triangleFans] - [Getter][#triangleFans()] - [Setter][#triangleFans(int)] +/// ### vertexAttributeAccessBeyondStride +/// [VarHandle][#VH_vertexAttributeAccessBeyondStride] - [Getter][#vertexAttributeAccessBeyondStride()] - [Setter][#vertexAttributeAccessBeyondStride(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePortabilitySubsetFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 constantAlphaColorBlendFactors; +/// VkBool32 events; +/// VkBool32 imageViewFormatReinterpretation; +/// VkBool32 imageViewFormatSwizzle; +/// VkBool32 imageView2DOn3DImage; +/// VkBool32 multisampleArrayImage; +/// VkBool32 mutableComparisonSamplers; +/// VkBool32 pointPolygons; +/// VkBool32 samplerMipLodBias; +/// VkBool32 separateStencilMaskRef; +/// VkBool32 shaderSampleRateInterpolationFunctions; +/// VkBool32 tessellationIsolines; +/// VkBool32 tessellationPointMode; +/// VkBool32 triangleFans; +/// VkBool32 vertexAttributeAccessBeyondStride; +/// } VkPhysicalDevicePortabilitySubsetFeaturesKHR; +/// ``` +public final class VkPhysicalDevicePortabilitySubsetFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDevicePortabilitySubsetFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("constantAlphaColorBlendFactors"), + ValueLayout.JAVA_INT.withName("events"), + ValueLayout.JAVA_INT.withName("imageViewFormatReinterpretation"), + ValueLayout.JAVA_INT.withName("imageViewFormatSwizzle"), + ValueLayout.JAVA_INT.withName("imageView2DOn3DImage"), + ValueLayout.JAVA_INT.withName("multisampleArrayImage"), + ValueLayout.JAVA_INT.withName("mutableComparisonSamplers"), + ValueLayout.JAVA_INT.withName("pointPolygons"), + ValueLayout.JAVA_INT.withName("samplerMipLodBias"), + ValueLayout.JAVA_INT.withName("separateStencilMaskRef"), + ValueLayout.JAVA_INT.withName("shaderSampleRateInterpolationFunctions"), + ValueLayout.JAVA_INT.withName("tessellationIsolines"), + ValueLayout.JAVA_INT.withName("tessellationPointMode"), + ValueLayout.JAVA_INT.withName("triangleFans"), + ValueLayout.JAVA_INT.withName("vertexAttributeAccessBeyondStride") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `constantAlphaColorBlendFactors` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constantAlphaColorBlendFactors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constantAlphaColorBlendFactors")); + /// The [VarHandle] of `events` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_events = LAYOUT.arrayElementVarHandle(PathElement.groupElement("events")); + /// The [VarHandle] of `imageViewFormatReinterpretation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageViewFormatReinterpretation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageViewFormatReinterpretation")); + /// The [VarHandle] of `imageViewFormatSwizzle` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageViewFormatSwizzle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageViewFormatSwizzle")); + /// The [VarHandle] of `imageView2DOn3DImage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageView2DOn3DImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageView2DOn3DImage")); + /// The [VarHandle] of `multisampleArrayImage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multisampleArrayImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multisampleArrayImage")); + /// The [VarHandle] of `mutableComparisonSamplers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mutableComparisonSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mutableComparisonSamplers")); + /// The [VarHandle] of `pointPolygons` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pointPolygons = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pointPolygons")); + /// The [VarHandle] of `samplerMipLodBias` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samplerMipLodBias = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerMipLodBias")); + /// The [VarHandle] of `separateStencilMaskRef` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_separateStencilMaskRef = LAYOUT.arrayElementVarHandle(PathElement.groupElement("separateStencilMaskRef")); + /// The [VarHandle] of `shaderSampleRateInterpolationFunctions` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSampleRateInterpolationFunctions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSampleRateInterpolationFunctions")); + /// The [VarHandle] of `tessellationIsolines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tessellationIsolines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tessellationIsolines")); + /// The [VarHandle] of `tessellationPointMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tessellationPointMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tessellationPointMode")); + /// The [VarHandle] of `triangleFans` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_triangleFans = LAYOUT.arrayElementVarHandle(PathElement.groupElement("triangleFans")); + /// The [VarHandle] of `vertexAttributeAccessBeyondStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexAttributeAccessBeyondStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexAttributeAccessBeyondStride")); + + /// Creates `VkPhysicalDevicePortabilitySubsetFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePortabilitySubsetFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePortabilitySubsetFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePortabilitySubsetFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePortabilitySubsetFeaturesKHR(segment); } + + /// Creates `VkPhysicalDevicePortabilitySubsetFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePortabilitySubsetFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePortabilitySubsetFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePortabilitySubsetFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePortabilitySubsetFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePortabilitySubsetFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePortabilitySubsetFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePortabilitySubsetFeaturesKHR` + public static VkPhysicalDevicePortabilitySubsetFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePortabilitySubsetFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePortabilitySubsetFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePortabilitySubsetFeaturesKHR` + public static VkPhysicalDevicePortabilitySubsetFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePortabilitySubsetFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `constantAlphaColorBlendFactors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_constantAlphaColorBlendFactors(MemorySegment segment, long index) { return (int) VH_constantAlphaColorBlendFactors.get(segment, 0L, index); } + /// {@return `constantAlphaColorBlendFactors`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_constantAlphaColorBlendFactors(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_constantAlphaColorBlendFactors(segment, 0L); } + /// {@return `constantAlphaColorBlendFactors` at the given index} + /// @param index the index + public @CType("VkBool32") int constantAlphaColorBlendFactorsAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_constantAlphaColorBlendFactors(this.segment(), index); } + /// {@return `constantAlphaColorBlendFactors`} + public @CType("VkBool32") int constantAlphaColorBlendFactors() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_constantAlphaColorBlendFactors(this.segment()); } + /// Sets `constantAlphaColorBlendFactors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constantAlphaColorBlendFactors(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_constantAlphaColorBlendFactors.set(segment, 0L, index, value); } + /// Sets `constantAlphaColorBlendFactors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constantAlphaColorBlendFactors(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_constantAlphaColorBlendFactors(segment, 0L, value); } + /// Sets `constantAlphaColorBlendFactors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR constantAlphaColorBlendFactorsAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_constantAlphaColorBlendFactors(this.segment(), index, value); return this; } + /// Sets `constantAlphaColorBlendFactors` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR constantAlphaColorBlendFactors(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_constantAlphaColorBlendFactors(this.segment(), value); return this; } + + /// {@return `events` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_events(MemorySegment segment, long index) { return (int) VH_events.get(segment, 0L, index); } + /// {@return `events`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_events(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_events(segment, 0L); } + /// {@return `events` at the given index} + /// @param index the index + public @CType("VkBool32") int eventsAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_events(this.segment(), index); } + /// {@return `events`} + public @CType("VkBool32") int events() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_events(this.segment()); } + /// Sets `events` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_events(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_events.set(segment, 0L, index, value); } + /// Sets `events` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_events(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_events(segment, 0L, value); } + /// Sets `events` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR eventsAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_events(this.segment(), index, value); return this; } + /// Sets `events` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR events(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_events(this.segment(), value); return this; } + + /// {@return `imageViewFormatReinterpretation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imageViewFormatReinterpretation(MemorySegment segment, long index) { return (int) VH_imageViewFormatReinterpretation.get(segment, 0L, index); } + /// {@return `imageViewFormatReinterpretation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imageViewFormatReinterpretation(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_imageViewFormatReinterpretation(segment, 0L); } + /// {@return `imageViewFormatReinterpretation` at the given index} + /// @param index the index + public @CType("VkBool32") int imageViewFormatReinterpretationAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_imageViewFormatReinterpretation(this.segment(), index); } + /// {@return `imageViewFormatReinterpretation`} + public @CType("VkBool32") int imageViewFormatReinterpretation() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_imageViewFormatReinterpretation(this.segment()); } + /// Sets `imageViewFormatReinterpretation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageViewFormatReinterpretation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imageViewFormatReinterpretation.set(segment, 0L, index, value); } + /// Sets `imageViewFormatReinterpretation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageViewFormatReinterpretation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_imageViewFormatReinterpretation(segment, 0L, value); } + /// Sets `imageViewFormatReinterpretation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR imageViewFormatReinterpretationAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_imageViewFormatReinterpretation(this.segment(), index, value); return this; } + /// Sets `imageViewFormatReinterpretation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR imageViewFormatReinterpretation(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_imageViewFormatReinterpretation(this.segment(), value); return this; } + + /// {@return `imageViewFormatSwizzle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imageViewFormatSwizzle(MemorySegment segment, long index) { return (int) VH_imageViewFormatSwizzle.get(segment, 0L, index); } + /// {@return `imageViewFormatSwizzle`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imageViewFormatSwizzle(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_imageViewFormatSwizzle(segment, 0L); } + /// {@return `imageViewFormatSwizzle` at the given index} + /// @param index the index + public @CType("VkBool32") int imageViewFormatSwizzleAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_imageViewFormatSwizzle(this.segment(), index); } + /// {@return `imageViewFormatSwizzle`} + public @CType("VkBool32") int imageViewFormatSwizzle() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_imageViewFormatSwizzle(this.segment()); } + /// Sets `imageViewFormatSwizzle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageViewFormatSwizzle(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imageViewFormatSwizzle.set(segment, 0L, index, value); } + /// Sets `imageViewFormatSwizzle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageViewFormatSwizzle(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_imageViewFormatSwizzle(segment, 0L, value); } + /// Sets `imageViewFormatSwizzle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR imageViewFormatSwizzleAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_imageViewFormatSwizzle(this.segment(), index, value); return this; } + /// Sets `imageViewFormatSwizzle` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR imageViewFormatSwizzle(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_imageViewFormatSwizzle(this.segment(), value); return this; } + + /// {@return `imageView2DOn3DImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imageView2DOn3DImage(MemorySegment segment, long index) { return (int) VH_imageView2DOn3DImage.get(segment, 0L, index); } + /// {@return `imageView2DOn3DImage`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imageView2DOn3DImage(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_imageView2DOn3DImage(segment, 0L); } + /// {@return `imageView2DOn3DImage` at the given index} + /// @param index the index + public @CType("VkBool32") int imageView2DOn3DImageAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_imageView2DOn3DImage(this.segment(), index); } + /// {@return `imageView2DOn3DImage`} + public @CType("VkBool32") int imageView2DOn3DImage() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_imageView2DOn3DImage(this.segment()); } + /// Sets `imageView2DOn3DImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageView2DOn3DImage(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imageView2DOn3DImage.set(segment, 0L, index, value); } + /// Sets `imageView2DOn3DImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageView2DOn3DImage(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_imageView2DOn3DImage(segment, 0L, value); } + /// Sets `imageView2DOn3DImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR imageView2DOn3DImageAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_imageView2DOn3DImage(this.segment(), index, value); return this; } + /// Sets `imageView2DOn3DImage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR imageView2DOn3DImage(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_imageView2DOn3DImage(this.segment(), value); return this; } + + /// {@return `multisampleArrayImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multisampleArrayImage(MemorySegment segment, long index) { return (int) VH_multisampleArrayImage.get(segment, 0L, index); } + /// {@return `multisampleArrayImage`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multisampleArrayImage(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_multisampleArrayImage(segment, 0L); } + /// {@return `multisampleArrayImage` at the given index} + /// @param index the index + public @CType("VkBool32") int multisampleArrayImageAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_multisampleArrayImage(this.segment(), index); } + /// {@return `multisampleArrayImage`} + public @CType("VkBool32") int multisampleArrayImage() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_multisampleArrayImage(this.segment()); } + /// Sets `multisampleArrayImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multisampleArrayImage(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multisampleArrayImage.set(segment, 0L, index, value); } + /// Sets `multisampleArrayImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multisampleArrayImage(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_multisampleArrayImage(segment, 0L, value); } + /// Sets `multisampleArrayImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR multisampleArrayImageAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_multisampleArrayImage(this.segment(), index, value); return this; } + /// Sets `multisampleArrayImage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR multisampleArrayImage(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_multisampleArrayImage(this.segment(), value); return this; } + + /// {@return `mutableComparisonSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_mutableComparisonSamplers(MemorySegment segment, long index) { return (int) VH_mutableComparisonSamplers.get(segment, 0L, index); } + /// {@return `mutableComparisonSamplers`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_mutableComparisonSamplers(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_mutableComparisonSamplers(segment, 0L); } + /// {@return `mutableComparisonSamplers` at the given index} + /// @param index the index + public @CType("VkBool32") int mutableComparisonSamplersAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_mutableComparisonSamplers(this.segment(), index); } + /// {@return `mutableComparisonSamplers`} + public @CType("VkBool32") int mutableComparisonSamplers() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_mutableComparisonSamplers(this.segment()); } + /// Sets `mutableComparisonSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mutableComparisonSamplers(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_mutableComparisonSamplers.set(segment, 0L, index, value); } + /// Sets `mutableComparisonSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mutableComparisonSamplers(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_mutableComparisonSamplers(segment, 0L, value); } + /// Sets `mutableComparisonSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR mutableComparisonSamplersAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_mutableComparisonSamplers(this.segment(), index, value); return this; } + /// Sets `mutableComparisonSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR mutableComparisonSamplers(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_mutableComparisonSamplers(this.segment(), value); return this; } + + /// {@return `pointPolygons` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pointPolygons(MemorySegment segment, long index) { return (int) VH_pointPolygons.get(segment, 0L, index); } + /// {@return `pointPolygons`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pointPolygons(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_pointPolygons(segment, 0L); } + /// {@return `pointPolygons` at the given index} + /// @param index the index + public @CType("VkBool32") int pointPolygonsAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_pointPolygons(this.segment(), index); } + /// {@return `pointPolygons`} + public @CType("VkBool32") int pointPolygons() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_pointPolygons(this.segment()); } + /// Sets `pointPolygons` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pointPolygons(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pointPolygons.set(segment, 0L, index, value); } + /// Sets `pointPolygons` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pointPolygons(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_pointPolygons(segment, 0L, value); } + /// Sets `pointPolygons` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR pointPolygonsAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_pointPolygons(this.segment(), index, value); return this; } + /// Sets `pointPolygons` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR pointPolygons(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_pointPolygons(this.segment(), value); return this; } + + /// {@return `samplerMipLodBias` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_samplerMipLodBias(MemorySegment segment, long index) { return (int) VH_samplerMipLodBias.get(segment, 0L, index); } + /// {@return `samplerMipLodBias`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_samplerMipLodBias(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_samplerMipLodBias(segment, 0L); } + /// {@return `samplerMipLodBias` at the given index} + /// @param index the index + public @CType("VkBool32") int samplerMipLodBiasAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_samplerMipLodBias(this.segment(), index); } + /// {@return `samplerMipLodBias`} + public @CType("VkBool32") int samplerMipLodBias() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_samplerMipLodBias(this.segment()); } + /// Sets `samplerMipLodBias` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerMipLodBias(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_samplerMipLodBias.set(segment, 0L, index, value); } + /// Sets `samplerMipLodBias` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerMipLodBias(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_samplerMipLodBias(segment, 0L, value); } + /// Sets `samplerMipLodBias` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR samplerMipLodBiasAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_samplerMipLodBias(this.segment(), index, value); return this; } + /// Sets `samplerMipLodBias` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR samplerMipLodBias(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_samplerMipLodBias(this.segment(), value); return this; } + + /// {@return `separateStencilMaskRef` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_separateStencilMaskRef(MemorySegment segment, long index) { return (int) VH_separateStencilMaskRef.get(segment, 0L, index); } + /// {@return `separateStencilMaskRef`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_separateStencilMaskRef(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_separateStencilMaskRef(segment, 0L); } + /// {@return `separateStencilMaskRef` at the given index} + /// @param index the index + public @CType("VkBool32") int separateStencilMaskRefAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_separateStencilMaskRef(this.segment(), index); } + /// {@return `separateStencilMaskRef`} + public @CType("VkBool32") int separateStencilMaskRef() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_separateStencilMaskRef(this.segment()); } + /// Sets `separateStencilMaskRef` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_separateStencilMaskRef(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_separateStencilMaskRef.set(segment, 0L, index, value); } + /// Sets `separateStencilMaskRef` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_separateStencilMaskRef(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_separateStencilMaskRef(segment, 0L, value); } + /// Sets `separateStencilMaskRef` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR separateStencilMaskRefAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_separateStencilMaskRef(this.segment(), index, value); return this; } + /// Sets `separateStencilMaskRef` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR separateStencilMaskRef(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_separateStencilMaskRef(this.segment(), value); return this; } + + /// {@return `shaderSampleRateInterpolationFunctions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSampleRateInterpolationFunctions(MemorySegment segment, long index) { return (int) VH_shaderSampleRateInterpolationFunctions.get(segment, 0L, index); } + /// {@return `shaderSampleRateInterpolationFunctions`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSampleRateInterpolationFunctions(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_shaderSampleRateInterpolationFunctions(segment, 0L); } + /// {@return `shaderSampleRateInterpolationFunctions` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSampleRateInterpolationFunctionsAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_shaderSampleRateInterpolationFunctions(this.segment(), index); } + /// {@return `shaderSampleRateInterpolationFunctions`} + public @CType("VkBool32") int shaderSampleRateInterpolationFunctions() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_shaderSampleRateInterpolationFunctions(this.segment()); } + /// Sets `shaderSampleRateInterpolationFunctions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSampleRateInterpolationFunctions(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSampleRateInterpolationFunctions.set(segment, 0L, index, value); } + /// Sets `shaderSampleRateInterpolationFunctions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSampleRateInterpolationFunctions(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_shaderSampleRateInterpolationFunctions(segment, 0L, value); } + /// Sets `shaderSampleRateInterpolationFunctions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR shaderSampleRateInterpolationFunctionsAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_shaderSampleRateInterpolationFunctions(this.segment(), index, value); return this; } + /// Sets `shaderSampleRateInterpolationFunctions` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR shaderSampleRateInterpolationFunctions(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_shaderSampleRateInterpolationFunctions(this.segment(), value); return this; } + + /// {@return `tessellationIsolines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_tessellationIsolines(MemorySegment segment, long index) { return (int) VH_tessellationIsolines.get(segment, 0L, index); } + /// {@return `tessellationIsolines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_tessellationIsolines(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_tessellationIsolines(segment, 0L); } + /// {@return `tessellationIsolines` at the given index} + /// @param index the index + public @CType("VkBool32") int tessellationIsolinesAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_tessellationIsolines(this.segment(), index); } + /// {@return `tessellationIsolines`} + public @CType("VkBool32") int tessellationIsolines() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_tessellationIsolines(this.segment()); } + /// Sets `tessellationIsolines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tessellationIsolines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_tessellationIsolines.set(segment, 0L, index, value); } + /// Sets `tessellationIsolines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tessellationIsolines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_tessellationIsolines(segment, 0L, value); } + /// Sets `tessellationIsolines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR tessellationIsolinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_tessellationIsolines(this.segment(), index, value); return this; } + /// Sets `tessellationIsolines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR tessellationIsolines(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_tessellationIsolines(this.segment(), value); return this; } + + /// {@return `tessellationPointMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_tessellationPointMode(MemorySegment segment, long index) { return (int) VH_tessellationPointMode.get(segment, 0L, index); } + /// {@return `tessellationPointMode`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_tessellationPointMode(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_tessellationPointMode(segment, 0L); } + /// {@return `tessellationPointMode` at the given index} + /// @param index the index + public @CType("VkBool32") int tessellationPointModeAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_tessellationPointMode(this.segment(), index); } + /// {@return `tessellationPointMode`} + public @CType("VkBool32") int tessellationPointMode() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_tessellationPointMode(this.segment()); } + /// Sets `tessellationPointMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tessellationPointMode(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_tessellationPointMode.set(segment, 0L, index, value); } + /// Sets `tessellationPointMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tessellationPointMode(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_tessellationPointMode(segment, 0L, value); } + /// Sets `tessellationPointMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR tessellationPointModeAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_tessellationPointMode(this.segment(), index, value); return this; } + /// Sets `tessellationPointMode` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR tessellationPointMode(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_tessellationPointMode(this.segment(), value); return this; } + + /// {@return `triangleFans` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_triangleFans(MemorySegment segment, long index) { return (int) VH_triangleFans.get(segment, 0L, index); } + /// {@return `triangleFans`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_triangleFans(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_triangleFans(segment, 0L); } + /// {@return `triangleFans` at the given index} + /// @param index the index + public @CType("VkBool32") int triangleFansAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_triangleFans(this.segment(), index); } + /// {@return `triangleFans`} + public @CType("VkBool32") int triangleFans() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_triangleFans(this.segment()); } + /// Sets `triangleFans` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_triangleFans(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_triangleFans.set(segment, 0L, index, value); } + /// Sets `triangleFans` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_triangleFans(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_triangleFans(segment, 0L, value); } + /// Sets `triangleFans` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR triangleFansAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_triangleFans(this.segment(), index, value); return this; } + /// Sets `triangleFans` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR triangleFans(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_triangleFans(this.segment(), value); return this; } + + /// {@return `vertexAttributeAccessBeyondStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vertexAttributeAccessBeyondStride(MemorySegment segment, long index) { return (int) VH_vertexAttributeAccessBeyondStride.get(segment, 0L, index); } + /// {@return `vertexAttributeAccessBeyondStride`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vertexAttributeAccessBeyondStride(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_vertexAttributeAccessBeyondStride(segment, 0L); } + /// {@return `vertexAttributeAccessBeyondStride` at the given index} + /// @param index the index + public @CType("VkBool32") int vertexAttributeAccessBeyondStrideAt(long index) { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_vertexAttributeAccessBeyondStride(this.segment(), index); } + /// {@return `vertexAttributeAccessBeyondStride`} + public @CType("VkBool32") int vertexAttributeAccessBeyondStride() { return VkPhysicalDevicePortabilitySubsetFeaturesKHR.get_vertexAttributeAccessBeyondStride(this.segment()); } + /// Sets `vertexAttributeAccessBeyondStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexAttributeAccessBeyondStride(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vertexAttributeAccessBeyondStride.set(segment, 0L, index, value); } + /// Sets `vertexAttributeAccessBeyondStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexAttributeAccessBeyondStride(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_vertexAttributeAccessBeyondStride(segment, 0L, value); } + /// Sets `vertexAttributeAccessBeyondStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR vertexAttributeAccessBeyondStrideAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_vertexAttributeAccessBeyondStride(this.segment(), index, value); return this; } + /// Sets `vertexAttributeAccessBeyondStride` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetFeaturesKHR vertexAttributeAccessBeyondStride(@CType("VkBool32") int value) { VkPhysicalDevicePortabilitySubsetFeaturesKHR.set_vertexAttributeAccessBeyondStride(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePortabilitySubsetPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePortabilitySubsetPropertiesKHR.java new file mode 100644 index 00000000..7b45e609 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePortabilitySubsetPropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minVertexInputBindingStrideAlignment +/// [VarHandle][#VH_minVertexInputBindingStrideAlignment] - [Getter][#minVertexInputBindingStrideAlignment()] - [Setter][#minVertexInputBindingStrideAlignment(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t minVertexInputBindingStrideAlignment; +/// } VkPhysicalDevicePortabilitySubsetPropertiesKHR; +/// ``` +public final class VkPhysicalDevicePortabilitySubsetPropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDevicePortabilitySubsetPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("minVertexInputBindingStrideAlignment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minVertexInputBindingStrideAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minVertexInputBindingStrideAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minVertexInputBindingStrideAlignment")); + + /// Creates `VkPhysicalDevicePortabilitySubsetPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePortabilitySubsetPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePortabilitySubsetPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePortabilitySubsetPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePortabilitySubsetPropertiesKHR(segment); } + + /// Creates `VkPhysicalDevicePortabilitySubsetPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePortabilitySubsetPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePortabilitySubsetPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePortabilitySubsetPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePortabilitySubsetPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePortabilitySubsetPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePortabilitySubsetPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePortabilitySubsetPropertiesKHR` + public static VkPhysicalDevicePortabilitySubsetPropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePortabilitySubsetPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePortabilitySubsetPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePortabilitySubsetPropertiesKHR` + public static VkPhysicalDevicePortabilitySubsetPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePortabilitySubsetPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePortabilitySubsetPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePortabilitySubsetPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePortabilitySubsetPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePortabilitySubsetPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetPropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDevicePortabilitySubsetPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePortabilitySubsetPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePortabilitySubsetPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePortabilitySubsetPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePortabilitySubsetPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePortabilitySubsetPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `minVertexInputBindingStrideAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minVertexInputBindingStrideAlignment(MemorySegment segment, long index) { return (int) VH_minVertexInputBindingStrideAlignment.get(segment, 0L, index); } + /// {@return `minVertexInputBindingStrideAlignment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minVertexInputBindingStrideAlignment(MemorySegment segment) { return VkPhysicalDevicePortabilitySubsetPropertiesKHR.get_minVertexInputBindingStrideAlignment(segment, 0L); } + /// {@return `minVertexInputBindingStrideAlignment` at the given index} + /// @param index the index + public @CType("uint32_t") int minVertexInputBindingStrideAlignmentAt(long index) { return VkPhysicalDevicePortabilitySubsetPropertiesKHR.get_minVertexInputBindingStrideAlignment(this.segment(), index); } + /// {@return `minVertexInputBindingStrideAlignment`} + public @CType("uint32_t") int minVertexInputBindingStrideAlignment() { return VkPhysicalDevicePortabilitySubsetPropertiesKHR.get_minVertexInputBindingStrideAlignment(this.segment()); } + /// Sets `minVertexInputBindingStrideAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minVertexInputBindingStrideAlignment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minVertexInputBindingStrideAlignment.set(segment, 0L, index, value); } + /// Sets `minVertexInputBindingStrideAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minVertexInputBindingStrideAlignment(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDevicePortabilitySubsetPropertiesKHR.set_minVertexInputBindingStrideAlignment(segment, 0L, value); } + /// Sets `minVertexInputBindingStrideAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetPropertiesKHR minVertexInputBindingStrideAlignmentAt(long index, @CType("uint32_t") int value) { VkPhysicalDevicePortabilitySubsetPropertiesKHR.set_minVertexInputBindingStrideAlignment(this.segment(), index, value); return this; } + /// Sets `minVertexInputBindingStrideAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePortabilitySubsetPropertiesKHR minVertexInputBindingStrideAlignment(@CType("uint32_t") int value) { VkPhysicalDevicePortabilitySubsetPropertiesKHR.set_minVertexInputBindingStrideAlignment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePresentIdFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePresentIdFeaturesKHR.java new file mode 100644 index 00000000..cc114023 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePresentIdFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentId +/// [VarHandle][#VH_presentId] - [Getter][#presentId()] - [Setter][#presentId(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePresentIdFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 presentId; +/// } VkPhysicalDevicePresentIdFeaturesKHR; +/// ``` +public final class VkPhysicalDevicePresentIdFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDevicePresentIdFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("presentId") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentId` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentId")); + + /// Creates `VkPhysicalDevicePresentIdFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePresentIdFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePresentIdFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentIdFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentIdFeaturesKHR(segment); } + + /// Creates `VkPhysicalDevicePresentIdFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentIdFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentIdFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePresentIdFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentIdFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentIdFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePresentIdFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePresentIdFeaturesKHR` + public static VkPhysicalDevicePresentIdFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePresentIdFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePresentIdFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePresentIdFeaturesKHR` + public static VkPhysicalDevicePresentIdFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePresentIdFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePresentIdFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePresentIdFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePresentIdFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePresentIdFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentIdFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePresentIdFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentIdFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDevicePresentIdFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePresentIdFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePresentIdFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePresentIdFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentIdFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentIdFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentIdFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentIdFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentIdFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `presentId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_presentId(MemorySegment segment, long index) { return (int) VH_presentId.get(segment, 0L, index); } + /// {@return `presentId`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_presentId(MemorySegment segment) { return VkPhysicalDevicePresentIdFeaturesKHR.get_presentId(segment, 0L); } + /// {@return `presentId` at the given index} + /// @param index the index + public @CType("VkBool32") int presentIdAt(long index) { return VkPhysicalDevicePresentIdFeaturesKHR.get_presentId(this.segment(), index); } + /// {@return `presentId`} + public @CType("VkBool32") int presentId() { return VkPhysicalDevicePresentIdFeaturesKHR.get_presentId(this.segment()); } + /// Sets `presentId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentId(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_presentId.set(segment, 0L, index, value); } + /// Sets `presentId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentId(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePresentIdFeaturesKHR.set_presentId(segment, 0L, value); } + /// Sets `presentId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentIdFeaturesKHR presentIdAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePresentIdFeaturesKHR.set_presentId(this.segment(), index, value); return this; } + /// Sets `presentId` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentIdFeaturesKHR presentId(@CType("VkBool32") int value) { VkPhysicalDevicePresentIdFeaturesKHR.set_presentId(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePresentWaitFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePresentWaitFeaturesKHR.java new file mode 100644 index 00000000..03ba1388 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDevicePresentWaitFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentWait +/// [VarHandle][#VH_presentWait] - [Getter][#presentWait()] - [Setter][#presentWait(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePresentWaitFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 presentWait; +/// } VkPhysicalDevicePresentWaitFeaturesKHR; +/// ``` +public final class VkPhysicalDevicePresentWaitFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDevicePresentWaitFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("presentWait") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentWait` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentWait = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentWait")); + + /// Creates `VkPhysicalDevicePresentWaitFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePresentWaitFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePresentWaitFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentWaitFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentWaitFeaturesKHR(segment); } + + /// Creates `VkPhysicalDevicePresentWaitFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentWaitFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentWaitFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePresentWaitFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentWaitFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentWaitFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePresentWaitFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePresentWaitFeaturesKHR` + public static VkPhysicalDevicePresentWaitFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePresentWaitFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePresentWaitFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePresentWaitFeaturesKHR` + public static VkPhysicalDevicePresentWaitFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePresentWaitFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePresentWaitFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePresentWaitFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePresentWaitFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePresentWaitFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentWaitFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePresentWaitFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentWaitFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDevicePresentWaitFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePresentWaitFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePresentWaitFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePresentWaitFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentWaitFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentWaitFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentWaitFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentWaitFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentWaitFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `presentWait` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_presentWait(MemorySegment segment, long index) { return (int) VH_presentWait.get(segment, 0L, index); } + /// {@return `presentWait`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_presentWait(MemorySegment segment) { return VkPhysicalDevicePresentWaitFeaturesKHR.get_presentWait(segment, 0L); } + /// {@return `presentWait` at the given index} + /// @param index the index + public @CType("VkBool32") int presentWaitAt(long index) { return VkPhysicalDevicePresentWaitFeaturesKHR.get_presentWait(this.segment(), index); } + /// {@return `presentWait`} + public @CType("VkBool32") int presentWait() { return VkPhysicalDevicePresentWaitFeaturesKHR.get_presentWait(this.segment()); } + /// Sets `presentWait` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentWait(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_presentWait.set(segment, 0L, index, value); } + /// Sets `presentWait` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentWait(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePresentWaitFeaturesKHR.set_presentWait(segment, 0L, value); } + /// Sets `presentWait` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentWaitFeaturesKHR presentWaitAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePresentWaitFeaturesKHR.set_presentWait(this.segment(), index, value); return this; } + /// Sets `presentWait` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentWaitFeaturesKHR presentWait(@CType("VkBool32") int value) { VkPhysicalDevicePresentWaitFeaturesKHR.set_presentWait(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayQueryFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayQueryFeaturesKHR.java new file mode 100644 index 00000000..1a11c48c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayQueryFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rayQuery +/// [VarHandle][#VH_rayQuery] - [Getter][#rayQuery()] - [Setter][#rayQuery(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRayQueryFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 rayQuery; +/// } VkPhysicalDeviceRayQueryFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceRayQueryFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceRayQueryFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rayQuery") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rayQuery` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayQuery = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayQuery")); + + /// Creates `VkPhysicalDeviceRayQueryFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRayQueryFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRayQueryFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayQueryFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayQueryFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceRayQueryFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayQueryFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayQueryFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRayQueryFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayQueryFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayQueryFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRayQueryFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRayQueryFeaturesKHR` + public static VkPhysicalDeviceRayQueryFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRayQueryFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRayQueryFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRayQueryFeaturesKHR` + public static VkPhysicalDeviceRayQueryFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRayQueryFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRayQueryFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRayQueryFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRayQueryFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRayQueryFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayQueryFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRayQueryFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayQueryFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRayQueryFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRayQueryFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRayQueryFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRayQueryFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayQueryFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayQueryFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayQueryFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayQueryFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayQueryFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `rayQuery` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayQuery(MemorySegment segment, long index) { return (int) VH_rayQuery.get(segment, 0L, index); } + /// {@return `rayQuery`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayQuery(MemorySegment segment) { return VkPhysicalDeviceRayQueryFeaturesKHR.get_rayQuery(segment, 0L); } + /// {@return `rayQuery` at the given index} + /// @param index the index + public @CType("VkBool32") int rayQueryAt(long index) { return VkPhysicalDeviceRayQueryFeaturesKHR.get_rayQuery(this.segment(), index); } + /// {@return `rayQuery`} + public @CType("VkBool32") int rayQuery() { return VkPhysicalDeviceRayQueryFeaturesKHR.get_rayQuery(this.segment()); } + /// Sets `rayQuery` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayQuery(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayQuery.set(segment, 0L, index, value); } + /// Sets `rayQuery` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayQuery(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayQueryFeaturesKHR.set_rayQuery(segment, 0L, value); } + /// Sets `rayQuery` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayQueryFeaturesKHR rayQueryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayQueryFeaturesKHR.set_rayQuery(this.segment(), index, value); return this; } + /// Sets `rayQuery` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayQueryFeaturesKHR rayQuery(@CType("VkBool32") int value) { VkPhysicalDeviceRayQueryFeaturesKHR.set_rayQuery(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.java new file mode 100644 index 00000000..bcfe5ddc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rayTracingMaintenance1 +/// [VarHandle][#VH_rayTracingMaintenance1] - [Getter][#rayTracingMaintenance1()] - [Setter][#rayTracingMaintenance1(int)] +/// ### rayTracingPipelineTraceRaysIndirect2 +/// [VarHandle][#VH_rayTracingPipelineTraceRaysIndirect2] - [Getter][#rayTracingPipelineTraceRaysIndirect2()] - [Setter][#rayTracingPipelineTraceRaysIndirect2(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 rayTracingMaintenance1; +/// VkBool32 rayTracingPipelineTraceRaysIndirect2; +/// } VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR; +/// ``` +public final class VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rayTracingMaintenance1"), + ValueLayout.JAVA_INT.withName("rayTracingPipelineTraceRaysIndirect2") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rayTracingMaintenance1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingMaintenance1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingMaintenance1")); + /// The [VarHandle] of `rayTracingPipelineTraceRaysIndirect2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingPipelineTraceRaysIndirect2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingPipelineTraceRaysIndirect2")); + + /// Creates `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR` + public static VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR` + public static VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `rayTracingMaintenance1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingMaintenance1(MemorySegment segment, long index) { return (int) VH_rayTracingMaintenance1.get(segment, 0L, index); } + /// {@return `rayTracingMaintenance1`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingMaintenance1(MemorySegment segment) { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_rayTracingMaintenance1(segment, 0L); } + /// {@return `rayTracingMaintenance1` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingMaintenance1At(long index) { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_rayTracingMaintenance1(this.segment(), index); } + /// {@return `rayTracingMaintenance1`} + public @CType("VkBool32") int rayTracingMaintenance1() { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_rayTracingMaintenance1(this.segment()); } + /// Sets `rayTracingMaintenance1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingMaintenance1(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingMaintenance1.set(segment, 0L, index, value); } + /// Sets `rayTracingMaintenance1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingMaintenance1(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_rayTracingMaintenance1(segment, 0L, value); } + /// Sets `rayTracingMaintenance1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR rayTracingMaintenance1At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_rayTracingMaintenance1(this.segment(), index, value); return this; } + /// Sets `rayTracingMaintenance1` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR rayTracingMaintenance1(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_rayTracingMaintenance1(this.segment(), value); return this; } + + /// {@return `rayTracingPipelineTraceRaysIndirect2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingPipelineTraceRaysIndirect2(MemorySegment segment, long index) { return (int) VH_rayTracingPipelineTraceRaysIndirect2.get(segment, 0L, index); } + /// {@return `rayTracingPipelineTraceRaysIndirect2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingPipelineTraceRaysIndirect2(MemorySegment segment) { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_rayTracingPipelineTraceRaysIndirect2(segment, 0L); } + /// {@return `rayTracingPipelineTraceRaysIndirect2` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingPipelineTraceRaysIndirect2At(long index) { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_rayTracingPipelineTraceRaysIndirect2(this.segment(), index); } + /// {@return `rayTracingPipelineTraceRaysIndirect2`} + public @CType("VkBool32") int rayTracingPipelineTraceRaysIndirect2() { return VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.get_rayTracingPipelineTraceRaysIndirect2(this.segment()); } + /// Sets `rayTracingPipelineTraceRaysIndirect2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingPipelineTraceRaysIndirect2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingPipelineTraceRaysIndirect2.set(segment, 0L, index, value); } + /// Sets `rayTracingPipelineTraceRaysIndirect2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingPipelineTraceRaysIndirect2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_rayTracingPipelineTraceRaysIndirect2(segment, 0L, value); } + /// Sets `rayTracingPipelineTraceRaysIndirect2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR rayTracingPipelineTraceRaysIndirect2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_rayTracingPipelineTraceRaysIndirect2(this.segment(), index, value); return this; } + /// Sets `rayTracingPipelineTraceRaysIndirect2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR rayTracingPipelineTraceRaysIndirect2(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.set_rayTracingPipelineTraceRaysIndirect2(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingPipelineFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingPipelineFeaturesKHR.java new file mode 100644 index 00000000..2deeb451 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingPipelineFeaturesKHR.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rayTracingPipeline +/// [VarHandle][#VH_rayTracingPipeline] - [Getter][#rayTracingPipeline()] - [Setter][#rayTracingPipeline(int)] +/// ### rayTracingPipelineShaderGroupHandleCaptureReplay +/// [VarHandle][#VH_rayTracingPipelineShaderGroupHandleCaptureReplay] - [Getter][#rayTracingPipelineShaderGroupHandleCaptureReplay()] - [Setter][#rayTracingPipelineShaderGroupHandleCaptureReplay(int)] +/// ### rayTracingPipelineShaderGroupHandleCaptureReplayMixed +/// [VarHandle][#VH_rayTracingPipelineShaderGroupHandleCaptureReplayMixed] - [Getter][#rayTracingPipelineShaderGroupHandleCaptureReplayMixed()] - [Setter][#rayTracingPipelineShaderGroupHandleCaptureReplayMixed(int)] +/// ### rayTracingPipelineTraceRaysIndirect +/// [VarHandle][#VH_rayTracingPipelineTraceRaysIndirect] - [Getter][#rayTracingPipelineTraceRaysIndirect()] - [Setter][#rayTracingPipelineTraceRaysIndirect(int)] +/// ### rayTraversalPrimitiveCulling +/// [VarHandle][#VH_rayTraversalPrimitiveCulling] - [Getter][#rayTraversalPrimitiveCulling()] - [Setter][#rayTraversalPrimitiveCulling(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRayTracingPipelineFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 rayTracingPipeline; +/// VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplay; +/// VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed; +/// VkBool32 rayTracingPipelineTraceRaysIndirect; +/// VkBool32 rayTraversalPrimitiveCulling; +/// } VkPhysicalDeviceRayTracingPipelineFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceRayTracingPipelineFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceRayTracingPipelineFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rayTracingPipeline"), + ValueLayout.JAVA_INT.withName("rayTracingPipelineShaderGroupHandleCaptureReplay"), + ValueLayout.JAVA_INT.withName("rayTracingPipelineShaderGroupHandleCaptureReplayMixed"), + ValueLayout.JAVA_INT.withName("rayTracingPipelineTraceRaysIndirect"), + ValueLayout.JAVA_INT.withName("rayTraversalPrimitiveCulling") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rayTracingPipeline` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingPipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingPipeline")); + /// The [VarHandle] of `rayTracingPipelineShaderGroupHandleCaptureReplay` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingPipelineShaderGroupHandleCaptureReplay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingPipelineShaderGroupHandleCaptureReplay")); + /// The [VarHandle] of `rayTracingPipelineShaderGroupHandleCaptureReplayMixed` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingPipelineShaderGroupHandleCaptureReplayMixed = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingPipelineShaderGroupHandleCaptureReplayMixed")); + /// The [VarHandle] of `rayTracingPipelineTraceRaysIndirect` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingPipelineTraceRaysIndirect = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingPipelineTraceRaysIndirect")); + /// The [VarHandle] of `rayTraversalPrimitiveCulling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTraversalPrimitiveCulling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTraversalPrimitiveCulling")); + + /// Creates `VkPhysicalDeviceRayTracingPipelineFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRayTracingPipelineFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPipelineFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPipelineFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceRayTracingPipelineFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPipelineFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPipelineFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRayTracingPipelineFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPipelineFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPipelineFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRayTracingPipelineFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRayTracingPipelineFeaturesKHR` + public static VkPhysicalDeviceRayTracingPipelineFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRayTracingPipelineFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRayTracingPipelineFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRayTracingPipelineFeaturesKHR` + public static VkPhysicalDeviceRayTracingPipelineFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRayTracingPipelineFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `rayTracingPipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingPipeline(MemorySegment segment, long index) { return (int) VH_rayTracingPipeline.get(segment, 0L, index); } + /// {@return `rayTracingPipeline`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingPipeline(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipeline(segment, 0L); } + /// {@return `rayTracingPipeline` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingPipelineAt(long index) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipeline(this.segment(), index); } + /// {@return `rayTracingPipeline`} + public @CType("VkBool32") int rayTracingPipeline() { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipeline(this.segment()); } + /// Sets `rayTracingPipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingPipeline(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingPipeline.set(segment, 0L, index, value); } + /// Sets `rayTracingPipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingPipeline(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipeline(segment, 0L, value); } + /// Sets `rayTracingPipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipeline(this.segment(), index, value); return this; } + /// Sets `rayTracingPipeline` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipeline(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipeline(this.segment(), value); return this; } + + /// {@return `rayTracingPipelineShaderGroupHandleCaptureReplay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingPipelineShaderGroupHandleCaptureReplay(MemorySegment segment, long index) { return (int) VH_rayTracingPipelineShaderGroupHandleCaptureReplay.get(segment, 0L, index); } + /// {@return `rayTracingPipelineShaderGroupHandleCaptureReplay`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingPipelineShaderGroupHandleCaptureReplay(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipelineShaderGroupHandleCaptureReplay(segment, 0L); } + /// {@return `rayTracingPipelineShaderGroupHandleCaptureReplay` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingPipelineShaderGroupHandleCaptureReplayAt(long index) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipelineShaderGroupHandleCaptureReplay(this.segment(), index); } + /// {@return `rayTracingPipelineShaderGroupHandleCaptureReplay`} + public @CType("VkBool32") int rayTracingPipelineShaderGroupHandleCaptureReplay() { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipelineShaderGroupHandleCaptureReplay(this.segment()); } + /// Sets `rayTracingPipelineShaderGroupHandleCaptureReplay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingPipelineShaderGroupHandleCaptureReplay(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingPipelineShaderGroupHandleCaptureReplay.set(segment, 0L, index, value); } + /// Sets `rayTracingPipelineShaderGroupHandleCaptureReplay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingPipelineShaderGroupHandleCaptureReplay(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipelineShaderGroupHandleCaptureReplay(segment, 0L, value); } + /// Sets `rayTracingPipelineShaderGroupHandleCaptureReplay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineShaderGroupHandleCaptureReplayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipelineShaderGroupHandleCaptureReplay(this.segment(), index, value); return this; } + /// Sets `rayTracingPipelineShaderGroupHandleCaptureReplay` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineShaderGroupHandleCaptureReplay(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipelineShaderGroupHandleCaptureReplay(this.segment(), value); return this; } + + /// {@return `rayTracingPipelineShaderGroupHandleCaptureReplayMixed` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingPipelineShaderGroupHandleCaptureReplayMixed(MemorySegment segment, long index) { return (int) VH_rayTracingPipelineShaderGroupHandleCaptureReplayMixed.get(segment, 0L, index); } + /// {@return `rayTracingPipelineShaderGroupHandleCaptureReplayMixed`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingPipelineShaderGroupHandleCaptureReplayMixed(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipelineShaderGroupHandleCaptureReplayMixed(segment, 0L); } + /// {@return `rayTracingPipelineShaderGroupHandleCaptureReplayMixed` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingPipelineShaderGroupHandleCaptureReplayMixedAt(long index) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipelineShaderGroupHandleCaptureReplayMixed(this.segment(), index); } + /// {@return `rayTracingPipelineShaderGroupHandleCaptureReplayMixed`} + public @CType("VkBool32") int rayTracingPipelineShaderGroupHandleCaptureReplayMixed() { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipelineShaderGroupHandleCaptureReplayMixed(this.segment()); } + /// Sets `rayTracingPipelineShaderGroupHandleCaptureReplayMixed` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingPipelineShaderGroupHandleCaptureReplayMixed(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingPipelineShaderGroupHandleCaptureReplayMixed.set(segment, 0L, index, value); } + /// Sets `rayTracingPipelineShaderGroupHandleCaptureReplayMixed` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingPipelineShaderGroupHandleCaptureReplayMixed(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipelineShaderGroupHandleCaptureReplayMixed(segment, 0L, value); } + /// Sets `rayTracingPipelineShaderGroupHandleCaptureReplayMixed` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineShaderGroupHandleCaptureReplayMixedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipelineShaderGroupHandleCaptureReplayMixed(this.segment(), index, value); return this; } + /// Sets `rayTracingPipelineShaderGroupHandleCaptureReplayMixed` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineShaderGroupHandleCaptureReplayMixed(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipelineShaderGroupHandleCaptureReplayMixed(this.segment(), value); return this; } + + /// {@return `rayTracingPipelineTraceRaysIndirect` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingPipelineTraceRaysIndirect(MemorySegment segment, long index) { return (int) VH_rayTracingPipelineTraceRaysIndirect.get(segment, 0L, index); } + /// {@return `rayTracingPipelineTraceRaysIndirect`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingPipelineTraceRaysIndirect(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipelineTraceRaysIndirect(segment, 0L); } + /// {@return `rayTracingPipelineTraceRaysIndirect` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingPipelineTraceRaysIndirectAt(long index) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipelineTraceRaysIndirect(this.segment(), index); } + /// {@return `rayTracingPipelineTraceRaysIndirect`} + public @CType("VkBool32") int rayTracingPipelineTraceRaysIndirect() { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTracingPipelineTraceRaysIndirect(this.segment()); } + /// Sets `rayTracingPipelineTraceRaysIndirect` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingPipelineTraceRaysIndirect(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingPipelineTraceRaysIndirect.set(segment, 0L, index, value); } + /// Sets `rayTracingPipelineTraceRaysIndirect` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingPipelineTraceRaysIndirect(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipelineTraceRaysIndirect(segment, 0L, value); } + /// Sets `rayTracingPipelineTraceRaysIndirect` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineTraceRaysIndirectAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipelineTraceRaysIndirect(this.segment(), index, value); return this; } + /// Sets `rayTracingPipelineTraceRaysIndirect` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineTraceRaysIndirect(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTracingPipelineTraceRaysIndirect(this.segment(), value); return this; } + + /// {@return `rayTraversalPrimitiveCulling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTraversalPrimitiveCulling(MemorySegment segment, long index) { return (int) VH_rayTraversalPrimitiveCulling.get(segment, 0L, index); } + /// {@return `rayTraversalPrimitiveCulling`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTraversalPrimitiveCulling(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTraversalPrimitiveCulling(segment, 0L); } + /// {@return `rayTraversalPrimitiveCulling` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTraversalPrimitiveCullingAt(long index) { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTraversalPrimitiveCulling(this.segment(), index); } + /// {@return `rayTraversalPrimitiveCulling`} + public @CType("VkBool32") int rayTraversalPrimitiveCulling() { return VkPhysicalDeviceRayTracingPipelineFeaturesKHR.get_rayTraversalPrimitiveCulling(this.segment()); } + /// Sets `rayTraversalPrimitiveCulling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTraversalPrimitiveCulling(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTraversalPrimitiveCulling.set(segment, 0L, index, value); } + /// Sets `rayTraversalPrimitiveCulling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTraversalPrimitiveCulling(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTraversalPrimitiveCulling(segment, 0L, value); } + /// Sets `rayTraversalPrimitiveCulling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTraversalPrimitiveCullingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTraversalPrimitiveCulling(this.segment(), index, value); return this; } + /// Sets `rayTraversalPrimitiveCulling` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTraversalPrimitiveCulling(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPipelineFeaturesKHR.set_rayTraversalPrimitiveCulling(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingPipelinePropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingPipelinePropertiesKHR.java new file mode 100644 index 00000000..494be729 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingPipelinePropertiesKHR.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderGroupHandleSize +/// [VarHandle][#VH_shaderGroupHandleSize] - [Getter][#shaderGroupHandleSize()] - [Setter][#shaderGroupHandleSize(int)] +/// ### maxRayRecursionDepth +/// [VarHandle][#VH_maxRayRecursionDepth] - [Getter][#maxRayRecursionDepth()] - [Setter][#maxRayRecursionDepth(int)] +/// ### maxShaderGroupStride +/// [VarHandle][#VH_maxShaderGroupStride] - [Getter][#maxShaderGroupStride()] - [Setter][#maxShaderGroupStride(int)] +/// ### shaderGroupBaseAlignment +/// [VarHandle][#VH_shaderGroupBaseAlignment] - [Getter][#shaderGroupBaseAlignment()] - [Setter][#shaderGroupBaseAlignment(int)] +/// ### shaderGroupHandleCaptureReplaySize +/// [VarHandle][#VH_shaderGroupHandleCaptureReplaySize] - [Getter][#shaderGroupHandleCaptureReplaySize()] - [Setter][#shaderGroupHandleCaptureReplaySize(int)] +/// ### maxRayDispatchInvocationCount +/// [VarHandle][#VH_maxRayDispatchInvocationCount] - [Getter][#maxRayDispatchInvocationCount()] - [Setter][#maxRayDispatchInvocationCount(int)] +/// ### shaderGroupHandleAlignment +/// [VarHandle][#VH_shaderGroupHandleAlignment] - [Getter][#shaderGroupHandleAlignment()] - [Setter][#shaderGroupHandleAlignment(int)] +/// ### maxRayHitAttributeSize +/// [VarHandle][#VH_maxRayHitAttributeSize] - [Getter][#maxRayHitAttributeSize()] - [Setter][#maxRayHitAttributeSize(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRayTracingPipelinePropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t shaderGroupHandleSize; +/// uint32_t maxRayRecursionDepth; +/// uint32_t maxShaderGroupStride; +/// uint32_t shaderGroupBaseAlignment; +/// uint32_t shaderGroupHandleCaptureReplaySize; +/// uint32_t maxRayDispatchInvocationCount; +/// uint32_t shaderGroupHandleAlignment; +/// uint32_t maxRayHitAttributeSize; +/// } VkPhysicalDeviceRayTracingPipelinePropertiesKHR; +/// ``` +public final class VkPhysicalDeviceRayTracingPipelinePropertiesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceRayTracingPipelinePropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderGroupHandleSize"), + ValueLayout.JAVA_INT.withName("maxRayRecursionDepth"), + ValueLayout.JAVA_INT.withName("maxShaderGroupStride"), + ValueLayout.JAVA_INT.withName("shaderGroupBaseAlignment"), + ValueLayout.JAVA_INT.withName("shaderGroupHandleCaptureReplaySize"), + ValueLayout.JAVA_INT.withName("maxRayDispatchInvocationCount"), + ValueLayout.JAVA_INT.withName("shaderGroupHandleAlignment"), + ValueLayout.JAVA_INT.withName("maxRayHitAttributeSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderGroupHandleSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderGroupHandleSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderGroupHandleSize")); + /// The [VarHandle] of `maxRayRecursionDepth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxRayRecursionDepth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxRayRecursionDepth")); + /// The [VarHandle] of `maxShaderGroupStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxShaderGroupStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxShaderGroupStride")); + /// The [VarHandle] of `shaderGroupBaseAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderGroupBaseAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderGroupBaseAlignment")); + /// The [VarHandle] of `shaderGroupHandleCaptureReplaySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderGroupHandleCaptureReplaySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderGroupHandleCaptureReplaySize")); + /// The [VarHandle] of `maxRayDispatchInvocationCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxRayDispatchInvocationCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxRayDispatchInvocationCount")); + /// The [VarHandle] of `shaderGroupHandleAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderGroupHandleAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderGroupHandleAlignment")); + /// The [VarHandle] of `maxRayHitAttributeSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxRayHitAttributeSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxRayHitAttributeSize")); + + /// Creates `VkPhysicalDeviceRayTracingPipelinePropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRayTracingPipelinePropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPipelinePropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPipelinePropertiesKHR(segment); } + + /// Creates `VkPhysicalDeviceRayTracingPipelinePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPipelinePropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPipelinePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRayTracingPipelinePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPipelinePropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPipelinePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRayTracingPipelinePropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRayTracingPipelinePropertiesKHR` + public static VkPhysicalDeviceRayTracingPipelinePropertiesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRayTracingPipelinePropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRayTracingPipelinePropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRayTracingPipelinePropertiesKHR` + public static VkPhysicalDeviceRayTracingPipelinePropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRayTracingPipelinePropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderGroupHandleSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderGroupHandleSize(MemorySegment segment, long index) { return (int) VH_shaderGroupHandleSize.get(segment, 0L, index); } + /// {@return `shaderGroupHandleSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderGroupHandleSize(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupHandleSize(segment, 0L); } + /// {@return `shaderGroupHandleSize` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderGroupHandleSizeAt(long index) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupHandleSize(this.segment(), index); } + /// {@return `shaderGroupHandleSize`} + public @CType("uint32_t") int shaderGroupHandleSize() { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupHandleSize(this.segment()); } + /// Sets `shaderGroupHandleSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderGroupHandleSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderGroupHandleSize.set(segment, 0L, index, value); } + /// Sets `shaderGroupHandleSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderGroupHandleSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupHandleSize(segment, 0L, value); } + /// Sets `shaderGroupHandleSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR shaderGroupHandleSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupHandleSize(this.segment(), index, value); return this; } + /// Sets `shaderGroupHandleSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR shaderGroupHandleSize(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupHandleSize(this.segment(), value); return this; } + + /// {@return `maxRayRecursionDepth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxRayRecursionDepth(MemorySegment segment, long index) { return (int) VH_maxRayRecursionDepth.get(segment, 0L, index); } + /// {@return `maxRayRecursionDepth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxRayRecursionDepth(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxRayRecursionDepth(segment, 0L); } + /// {@return `maxRayRecursionDepth` at the given index} + /// @param index the index + public @CType("uint32_t") int maxRayRecursionDepthAt(long index) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxRayRecursionDepth(this.segment(), index); } + /// {@return `maxRayRecursionDepth`} + public @CType("uint32_t") int maxRayRecursionDepth() { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxRayRecursionDepth(this.segment()); } + /// Sets `maxRayRecursionDepth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxRayRecursionDepth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxRayRecursionDepth.set(segment, 0L, index, value); } + /// Sets `maxRayRecursionDepth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxRayRecursionDepth(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxRayRecursionDepth(segment, 0L, value); } + /// Sets `maxRayRecursionDepth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR maxRayRecursionDepthAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxRayRecursionDepth(this.segment(), index, value); return this; } + /// Sets `maxRayRecursionDepth` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR maxRayRecursionDepth(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxRayRecursionDepth(this.segment(), value); return this; } + + /// {@return `maxShaderGroupStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxShaderGroupStride(MemorySegment segment, long index) { return (int) VH_maxShaderGroupStride.get(segment, 0L, index); } + /// {@return `maxShaderGroupStride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxShaderGroupStride(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxShaderGroupStride(segment, 0L); } + /// {@return `maxShaderGroupStride` at the given index} + /// @param index the index + public @CType("uint32_t") int maxShaderGroupStrideAt(long index) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxShaderGroupStride(this.segment(), index); } + /// {@return `maxShaderGroupStride`} + public @CType("uint32_t") int maxShaderGroupStride() { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxShaderGroupStride(this.segment()); } + /// Sets `maxShaderGroupStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxShaderGroupStride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxShaderGroupStride.set(segment, 0L, index, value); } + /// Sets `maxShaderGroupStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxShaderGroupStride(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxShaderGroupStride(segment, 0L, value); } + /// Sets `maxShaderGroupStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR maxShaderGroupStrideAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxShaderGroupStride(this.segment(), index, value); return this; } + /// Sets `maxShaderGroupStride` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR maxShaderGroupStride(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxShaderGroupStride(this.segment(), value); return this; } + + /// {@return `shaderGroupBaseAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderGroupBaseAlignment(MemorySegment segment, long index) { return (int) VH_shaderGroupBaseAlignment.get(segment, 0L, index); } + /// {@return `shaderGroupBaseAlignment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderGroupBaseAlignment(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupBaseAlignment(segment, 0L); } + /// {@return `shaderGroupBaseAlignment` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderGroupBaseAlignmentAt(long index) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupBaseAlignment(this.segment(), index); } + /// {@return `shaderGroupBaseAlignment`} + public @CType("uint32_t") int shaderGroupBaseAlignment() { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupBaseAlignment(this.segment()); } + /// Sets `shaderGroupBaseAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderGroupBaseAlignment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderGroupBaseAlignment.set(segment, 0L, index, value); } + /// Sets `shaderGroupBaseAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderGroupBaseAlignment(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupBaseAlignment(segment, 0L, value); } + /// Sets `shaderGroupBaseAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR shaderGroupBaseAlignmentAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupBaseAlignment(this.segment(), index, value); return this; } + /// Sets `shaderGroupBaseAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR shaderGroupBaseAlignment(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupBaseAlignment(this.segment(), value); return this; } + + /// {@return `shaderGroupHandleCaptureReplaySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderGroupHandleCaptureReplaySize(MemorySegment segment, long index) { return (int) VH_shaderGroupHandleCaptureReplaySize.get(segment, 0L, index); } + /// {@return `shaderGroupHandleCaptureReplaySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderGroupHandleCaptureReplaySize(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupHandleCaptureReplaySize(segment, 0L); } + /// {@return `shaderGroupHandleCaptureReplaySize` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderGroupHandleCaptureReplaySizeAt(long index) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupHandleCaptureReplaySize(this.segment(), index); } + /// {@return `shaderGroupHandleCaptureReplaySize`} + public @CType("uint32_t") int shaderGroupHandleCaptureReplaySize() { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupHandleCaptureReplaySize(this.segment()); } + /// Sets `shaderGroupHandleCaptureReplaySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderGroupHandleCaptureReplaySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderGroupHandleCaptureReplaySize.set(segment, 0L, index, value); } + /// Sets `shaderGroupHandleCaptureReplaySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderGroupHandleCaptureReplaySize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupHandleCaptureReplaySize(segment, 0L, value); } + /// Sets `shaderGroupHandleCaptureReplaySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR shaderGroupHandleCaptureReplaySizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupHandleCaptureReplaySize(this.segment(), index, value); return this; } + /// Sets `shaderGroupHandleCaptureReplaySize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR shaderGroupHandleCaptureReplaySize(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupHandleCaptureReplaySize(this.segment(), value); return this; } + + /// {@return `maxRayDispatchInvocationCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxRayDispatchInvocationCount(MemorySegment segment, long index) { return (int) VH_maxRayDispatchInvocationCount.get(segment, 0L, index); } + /// {@return `maxRayDispatchInvocationCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxRayDispatchInvocationCount(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxRayDispatchInvocationCount(segment, 0L); } + /// {@return `maxRayDispatchInvocationCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxRayDispatchInvocationCountAt(long index) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxRayDispatchInvocationCount(this.segment(), index); } + /// {@return `maxRayDispatchInvocationCount`} + public @CType("uint32_t") int maxRayDispatchInvocationCount() { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxRayDispatchInvocationCount(this.segment()); } + /// Sets `maxRayDispatchInvocationCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxRayDispatchInvocationCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxRayDispatchInvocationCount.set(segment, 0L, index, value); } + /// Sets `maxRayDispatchInvocationCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxRayDispatchInvocationCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxRayDispatchInvocationCount(segment, 0L, value); } + /// Sets `maxRayDispatchInvocationCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR maxRayDispatchInvocationCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxRayDispatchInvocationCount(this.segment(), index, value); return this; } + /// Sets `maxRayDispatchInvocationCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR maxRayDispatchInvocationCount(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxRayDispatchInvocationCount(this.segment(), value); return this; } + + /// {@return `shaderGroupHandleAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderGroupHandleAlignment(MemorySegment segment, long index) { return (int) VH_shaderGroupHandleAlignment.get(segment, 0L, index); } + /// {@return `shaderGroupHandleAlignment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderGroupHandleAlignment(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupHandleAlignment(segment, 0L); } + /// {@return `shaderGroupHandleAlignment` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderGroupHandleAlignmentAt(long index) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupHandleAlignment(this.segment(), index); } + /// {@return `shaderGroupHandleAlignment`} + public @CType("uint32_t") int shaderGroupHandleAlignment() { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_shaderGroupHandleAlignment(this.segment()); } + /// Sets `shaderGroupHandleAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderGroupHandleAlignment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderGroupHandleAlignment.set(segment, 0L, index, value); } + /// Sets `shaderGroupHandleAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderGroupHandleAlignment(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupHandleAlignment(segment, 0L, value); } + /// Sets `shaderGroupHandleAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR shaderGroupHandleAlignmentAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupHandleAlignment(this.segment(), index, value); return this; } + /// Sets `shaderGroupHandleAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR shaderGroupHandleAlignment(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_shaderGroupHandleAlignment(this.segment(), value); return this; } + + /// {@return `maxRayHitAttributeSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxRayHitAttributeSize(MemorySegment segment, long index) { return (int) VH_maxRayHitAttributeSize.get(segment, 0L, index); } + /// {@return `maxRayHitAttributeSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxRayHitAttributeSize(MemorySegment segment) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxRayHitAttributeSize(segment, 0L); } + /// {@return `maxRayHitAttributeSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxRayHitAttributeSizeAt(long index) { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxRayHitAttributeSize(this.segment(), index); } + /// {@return `maxRayHitAttributeSize`} + public @CType("uint32_t") int maxRayHitAttributeSize() { return VkPhysicalDeviceRayTracingPipelinePropertiesKHR.get_maxRayHitAttributeSize(this.segment()); } + /// Sets `maxRayHitAttributeSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxRayHitAttributeSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxRayHitAttributeSize.set(segment, 0L, index, value); } + /// Sets `maxRayHitAttributeSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxRayHitAttributeSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxRayHitAttributeSize(segment, 0L, value); } + /// Sets `maxRayHitAttributeSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR maxRayHitAttributeSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxRayHitAttributeSize(this.segment(), index, value); return this; } + /// Sets `maxRayHitAttributeSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPipelinePropertiesKHR maxRayHitAttributeSize(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPipelinePropertiesKHR.set_maxRayHitAttributeSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.java new file mode 100644 index 00000000..64f5ade0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rayTracingPositionFetch +/// [VarHandle][#VH_rayTracingPositionFetch] - [Getter][#rayTracingPositionFetch()] - [Setter][#rayTracingPositionFetch(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 rayTracingPositionFetch; +/// } VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rayTracingPositionFetch") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rayTracingPositionFetch` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingPositionFetch = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingPositionFetch")); + + /// Creates `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR` + public static VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR` + public static VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `rayTracingPositionFetch` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingPositionFetch(MemorySegment segment, long index) { return (int) VH_rayTracingPositionFetch.get(segment, 0L, index); } + /// {@return `rayTracingPositionFetch`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingPositionFetch(MemorySegment segment) { return VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.get_rayTracingPositionFetch(segment, 0L); } + /// {@return `rayTracingPositionFetch` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingPositionFetchAt(long index) { return VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.get_rayTracingPositionFetch(this.segment(), index); } + /// {@return `rayTracingPositionFetch`} + public @CType("VkBool32") int rayTracingPositionFetch() { return VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.get_rayTracingPositionFetch(this.segment()); } + /// Sets `rayTracingPositionFetch` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingPositionFetch(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingPositionFetch.set(segment, 0L, index, value); } + /// Sets `rayTracingPositionFetch` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingPositionFetch(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.set_rayTracingPositionFetch(segment, 0L, value); } + /// Sets `rayTracingPositionFetch` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR rayTracingPositionFetchAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.set_rayTracingPositionFetch(this.segment(), index, value); return this; } + /// Sets `rayTracingPositionFetch` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR rayTracingPositionFetch(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.set_rayTracingPositionFetch(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderClockFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderClockFeaturesKHR.java new file mode 100644 index 00000000..39b65c90 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderClockFeaturesKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderSubgroupClock +/// [VarHandle][#VH_shaderSubgroupClock] - [Getter][#shaderSubgroupClock()] - [Setter][#shaderSubgroupClock(int)] +/// ### shaderDeviceClock +/// [VarHandle][#VH_shaderDeviceClock] - [Getter][#shaderDeviceClock()] - [Setter][#shaderDeviceClock(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderClockFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderSubgroupClock; +/// VkBool32 shaderDeviceClock; +/// } VkPhysicalDeviceShaderClockFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceShaderClockFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderClockFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderSubgroupClock"), + ValueLayout.JAVA_INT.withName("shaderDeviceClock") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderSubgroupClock` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSubgroupClock = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSubgroupClock")); + /// The [VarHandle] of `shaderDeviceClock` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDeviceClock = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDeviceClock")); + + /// Creates `VkPhysicalDeviceShaderClockFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderClockFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderClockFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderClockFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderClockFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceShaderClockFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderClockFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderClockFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderClockFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderClockFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderClockFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderClockFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderClockFeaturesKHR` + public static VkPhysicalDeviceShaderClockFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderClockFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderClockFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderClockFeaturesKHR` + public static VkPhysicalDeviceShaderClockFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderClockFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderClockFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderClockFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderClockFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderClockFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderClockFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderClockFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderClockFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderClockFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderClockFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderClockFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderSubgroupClock` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSubgroupClock(MemorySegment segment, long index) { return (int) VH_shaderSubgroupClock.get(segment, 0L, index); } + /// {@return `shaderSubgroupClock`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSubgroupClock(MemorySegment segment) { return VkPhysicalDeviceShaderClockFeaturesKHR.get_shaderSubgroupClock(segment, 0L); } + /// {@return `shaderSubgroupClock` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSubgroupClockAt(long index) { return VkPhysicalDeviceShaderClockFeaturesKHR.get_shaderSubgroupClock(this.segment(), index); } + /// {@return `shaderSubgroupClock`} + public @CType("VkBool32") int shaderSubgroupClock() { return VkPhysicalDeviceShaderClockFeaturesKHR.get_shaderSubgroupClock(this.segment()); } + /// Sets `shaderSubgroupClock` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSubgroupClock(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSubgroupClock.set(segment, 0L, index, value); } + /// Sets `shaderSubgroupClock` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSubgroupClock(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_shaderSubgroupClock(segment, 0L, value); } + /// Sets `shaderSubgroupClock` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderClockFeaturesKHR shaderSubgroupClockAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_shaderSubgroupClock(this.segment(), index, value); return this; } + /// Sets `shaderSubgroupClock` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderClockFeaturesKHR shaderSubgroupClock(@CType("VkBool32") int value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_shaderSubgroupClock(this.segment(), value); return this; } + + /// {@return `shaderDeviceClock` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDeviceClock(MemorySegment segment, long index) { return (int) VH_shaderDeviceClock.get(segment, 0L, index); } + /// {@return `shaderDeviceClock`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDeviceClock(MemorySegment segment) { return VkPhysicalDeviceShaderClockFeaturesKHR.get_shaderDeviceClock(segment, 0L); } + /// {@return `shaderDeviceClock` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDeviceClockAt(long index) { return VkPhysicalDeviceShaderClockFeaturesKHR.get_shaderDeviceClock(this.segment(), index); } + /// {@return `shaderDeviceClock`} + public @CType("VkBool32") int shaderDeviceClock() { return VkPhysicalDeviceShaderClockFeaturesKHR.get_shaderDeviceClock(this.segment()); } + /// Sets `shaderDeviceClock` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDeviceClock(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDeviceClock.set(segment, 0L, index, value); } + /// Sets `shaderDeviceClock` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDeviceClock(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_shaderDeviceClock(segment, 0L, value); } + /// Sets `shaderDeviceClock` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderClockFeaturesKHR shaderDeviceClockAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_shaderDeviceClock(this.segment(), index, value); return this; } + /// Sets `shaderDeviceClock` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderClockFeaturesKHR shaderDeviceClock(@CType("VkBool32") int value) { VkPhysicalDeviceShaderClockFeaturesKHR.set_shaderDeviceClock(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.java new file mode 100644 index 00000000..6cfce65a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderMaximalReconvergence +/// [VarHandle][#VH_shaderMaximalReconvergence] - [Getter][#shaderMaximalReconvergence()] - [Setter][#shaderMaximalReconvergence(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderMaximalReconvergence; +/// } VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderMaximalReconvergence") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderMaximalReconvergence` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderMaximalReconvergence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderMaximalReconvergence")); + + /// Creates `VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR` + public static VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR` + public static VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderMaximalReconvergence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderMaximalReconvergence(MemorySegment segment, long index) { return (int) VH_shaderMaximalReconvergence.get(segment, 0L, index); } + /// {@return `shaderMaximalReconvergence`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderMaximalReconvergence(MemorySegment segment) { return VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.get_shaderMaximalReconvergence(segment, 0L); } + /// {@return `shaderMaximalReconvergence` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderMaximalReconvergenceAt(long index) { return VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.get_shaderMaximalReconvergence(this.segment(), index); } + /// {@return `shaderMaximalReconvergence`} + public @CType("VkBool32") int shaderMaximalReconvergence() { return VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.get_shaderMaximalReconvergence(this.segment()); } + /// Sets `shaderMaximalReconvergence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderMaximalReconvergence(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderMaximalReconvergence.set(segment, 0L, index, value); } + /// Sets `shaderMaximalReconvergence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderMaximalReconvergence(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.set_shaderMaximalReconvergence(segment, 0L, value); } + /// Sets `shaderMaximalReconvergence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR shaderMaximalReconvergenceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.set_shaderMaximalReconvergence(this.segment(), index, value); return this; } + /// Sets `shaderMaximalReconvergence` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR shaderMaximalReconvergence(@CType("VkBool32") int value) { VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.set_shaderMaximalReconvergence(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderQuadControlFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderQuadControlFeaturesKHR.java new file mode 100644 index 00000000..f1de8387 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderQuadControlFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderQuadControl +/// [VarHandle][#VH_shaderQuadControl] - [Getter][#shaderQuadControl()] - [Setter][#shaderQuadControl(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderQuadControlFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderQuadControl; +/// } VkPhysicalDeviceShaderQuadControlFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceShaderQuadControlFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderQuadControlFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderQuadControl") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderQuadControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderQuadControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderQuadControl")); + + /// Creates `VkPhysicalDeviceShaderQuadControlFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderQuadControlFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderQuadControlFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderQuadControlFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderQuadControlFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceShaderQuadControlFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderQuadControlFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderQuadControlFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderQuadControlFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderQuadControlFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderQuadControlFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderQuadControlFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderQuadControlFeaturesKHR` + public static VkPhysicalDeviceShaderQuadControlFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderQuadControlFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderQuadControlFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderQuadControlFeaturesKHR` + public static VkPhysicalDeviceShaderQuadControlFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderQuadControlFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderQuadControlFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderQuadControlFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderQuadControlFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderQuadControlFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderQuadControlFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderQuadControlFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderQuadControlFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderQuadControlFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderQuadControlFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderQuadControlFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderQuadControlFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderQuadControlFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderQuadControlFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderQuadControlFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderQuadControlFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderQuadControlFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderQuadControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderQuadControl(MemorySegment segment, long index) { return (int) VH_shaderQuadControl.get(segment, 0L, index); } + /// {@return `shaderQuadControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderQuadControl(MemorySegment segment) { return VkPhysicalDeviceShaderQuadControlFeaturesKHR.get_shaderQuadControl(segment, 0L); } + /// {@return `shaderQuadControl` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderQuadControlAt(long index) { return VkPhysicalDeviceShaderQuadControlFeaturesKHR.get_shaderQuadControl(this.segment(), index); } + /// {@return `shaderQuadControl`} + public @CType("VkBool32") int shaderQuadControl() { return VkPhysicalDeviceShaderQuadControlFeaturesKHR.get_shaderQuadControl(this.segment()); } + /// Sets `shaderQuadControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderQuadControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderQuadControl.set(segment, 0L, index, value); } + /// Sets `shaderQuadControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderQuadControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderQuadControlFeaturesKHR.set_shaderQuadControl(segment, 0L, value); } + /// Sets `shaderQuadControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderQuadControlFeaturesKHR shaderQuadControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderQuadControlFeaturesKHR.set_shaderQuadControl(this.segment(), index, value); return this; } + /// Sets `shaderQuadControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderQuadControlFeaturesKHR shaderQuadControl(@CType("VkBool32") int value) { VkPhysicalDeviceShaderQuadControlFeaturesKHR.set_shaderQuadControl(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.java new file mode 100644 index 00000000..4425b6fb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderRelaxedExtendedInstruction +/// [VarHandle][#VH_shaderRelaxedExtendedInstruction] - [Getter][#shaderRelaxedExtendedInstruction()] - [Setter][#shaderRelaxedExtendedInstruction(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderRelaxedExtendedInstruction; +/// } VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderRelaxedExtendedInstruction") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderRelaxedExtendedInstruction` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRelaxedExtendedInstruction = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRelaxedExtendedInstruction")); + + /// Creates `VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR` + public static VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR` + public static VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderRelaxedExtendedInstruction` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRelaxedExtendedInstruction(MemorySegment segment, long index) { return (int) VH_shaderRelaxedExtendedInstruction.get(segment, 0L, index); } + /// {@return `shaderRelaxedExtendedInstruction`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRelaxedExtendedInstruction(MemorySegment segment) { return VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.get_shaderRelaxedExtendedInstruction(segment, 0L); } + /// {@return `shaderRelaxedExtendedInstruction` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRelaxedExtendedInstructionAt(long index) { return VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.get_shaderRelaxedExtendedInstruction(this.segment(), index); } + /// {@return `shaderRelaxedExtendedInstruction`} + public @CType("VkBool32") int shaderRelaxedExtendedInstruction() { return VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.get_shaderRelaxedExtendedInstruction(this.segment()); } + /// Sets `shaderRelaxedExtendedInstruction` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRelaxedExtendedInstruction(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRelaxedExtendedInstruction.set(segment, 0L, index, value); } + /// Sets `shaderRelaxedExtendedInstruction` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRelaxedExtendedInstruction(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.set_shaderRelaxedExtendedInstruction(segment, 0L, value); } + /// Sets `shaderRelaxedExtendedInstruction` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR shaderRelaxedExtendedInstructionAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.set_shaderRelaxedExtendedInstruction(this.segment(), index, value); return this; } + /// Sets `shaderRelaxedExtendedInstruction` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR shaderRelaxedExtendedInstruction(@CType("VkBool32") int value) { VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.set_shaderRelaxedExtendedInstruction(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.java new file mode 100644 index 00000000..738bd0a3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderSubgroupUniformControlFlow +/// [VarHandle][#VH_shaderSubgroupUniformControlFlow] - [Getter][#shaderSubgroupUniformControlFlow()] - [Setter][#shaderSubgroupUniformControlFlow(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderSubgroupUniformControlFlow; +/// } VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderSubgroupUniformControlFlow") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderSubgroupUniformControlFlow` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSubgroupUniformControlFlow = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSubgroupUniformControlFlow")); + + /// Creates `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR` + public static VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR` + public static VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderSubgroupUniformControlFlow` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSubgroupUniformControlFlow(MemorySegment segment, long index) { return (int) VH_shaderSubgroupUniformControlFlow.get(segment, 0L, index); } + /// {@return `shaderSubgroupUniformControlFlow`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSubgroupUniformControlFlow(MemorySegment segment) { return VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.get_shaderSubgroupUniformControlFlow(segment, 0L); } + /// {@return `shaderSubgroupUniformControlFlow` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSubgroupUniformControlFlowAt(long index) { return VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.get_shaderSubgroupUniformControlFlow(this.segment(), index); } + /// {@return `shaderSubgroupUniformControlFlow`} + public @CType("VkBool32") int shaderSubgroupUniformControlFlow() { return VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.get_shaderSubgroupUniformControlFlow(this.segment()); } + /// Sets `shaderSubgroupUniformControlFlow` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSubgroupUniformControlFlow(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSubgroupUniformControlFlow.set(segment, 0L, index, value); } + /// Sets `shaderSubgroupUniformControlFlow` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSubgroupUniformControlFlow(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.set_shaderSubgroupUniformControlFlow(segment, 0L, value); } + /// Sets `shaderSubgroupUniformControlFlow` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR shaderSubgroupUniformControlFlowAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.set_shaderSubgroupUniformControlFlow(this.segment(), index, value); return this; } + /// Sets `shaderSubgroupUniformControlFlow` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR shaderSubgroupUniformControlFlow(@CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.set_shaderSubgroupUniformControlFlow(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceSurfaceInfo2KHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceSurfaceInfo2KHR.java new file mode 100644 index 00000000..469e27d0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceSurfaceInfo2KHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### surface +/// [VarHandle][#VH_surface] - [Getter][#surface()] - [Setter][#surface(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSurfaceInfo2KHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkSurfaceKHR surface; +/// } VkPhysicalDeviceSurfaceInfo2KHR; +/// ``` +public final class VkPhysicalDeviceSurfaceInfo2KHR extends Struct { + /// The struct layout of `VkPhysicalDeviceSurfaceInfo2KHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("surface") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `surface` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_surface = LAYOUT.arrayElementVarHandle(PathElement.groupElement("surface")); + + /// Creates `VkPhysicalDeviceSurfaceInfo2KHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSurfaceInfo2KHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSurfaceInfo2KHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSurfaceInfo2KHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSurfaceInfo2KHR(segment); } + + /// Creates `VkPhysicalDeviceSurfaceInfo2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSurfaceInfo2KHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSurfaceInfo2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSurfaceInfo2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSurfaceInfo2KHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSurfaceInfo2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSurfaceInfo2KHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSurfaceInfo2KHR` + public static VkPhysicalDeviceSurfaceInfo2KHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSurfaceInfo2KHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSurfaceInfo2KHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSurfaceInfo2KHR` + public static VkPhysicalDeviceSurfaceInfo2KHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSurfaceInfo2KHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSurfaceInfo2KHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSurfaceInfo2KHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSurfaceInfo2KHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSurfaceInfo2KHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSurfaceInfo2KHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSurfaceInfo2KHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSurfaceInfo2KHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSurfaceInfo2KHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSurfaceInfo2KHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSurfaceInfo2KHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSurfaceInfo2KHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSurfaceInfo2KHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSurfaceInfo2KHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSurfaceInfo2KHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSurfaceInfo2KHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSurfaceInfo2KHR.set_pNext(this.segment(), value); return this; } + + /// {@return `surface` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment get_surface(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_surface.get(segment, 0L, index); } + /// {@return `surface`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment get_surface(MemorySegment segment) { return VkPhysicalDeviceSurfaceInfo2KHR.get_surface(segment, 0L); } + /// {@return `surface` at the given index} + /// @param index the index + public @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment surfaceAt(long index) { return VkPhysicalDeviceSurfaceInfo2KHR.get_surface(this.segment(), index); } + /// {@return `surface`} + public @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment surface() { return VkPhysicalDeviceSurfaceInfo2KHR.get_surface(this.segment()); } + /// Sets `surface` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_surface(MemorySegment segment, long index, @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment value) { VH_surface.set(segment, 0L, index, value); } + /// Sets `surface` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_surface(MemorySegment segment, @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSurfaceInfo2KHR.set_surface(segment, 0L, value); } + /// Sets `surface` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSurfaceInfo2KHR surfaceAt(long index, @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSurfaceInfo2KHR.set_surface(this.segment(), index, value); return this; } + /// Sets `surface` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSurfaceInfo2KHR surface(@CType("VkSurfaceKHR") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSurfaceInfo2KHR.set_surface(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.java new file mode 100644 index 00000000..bdbc34cb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### videoEncodeAV1 +/// [VarHandle][#VH_videoEncodeAV1] - [Getter][#videoEncodeAV1()] - [Setter][#videoEncodeAV1(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVideoEncodeAV1FeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 videoEncodeAV1; +/// } VkPhysicalDeviceVideoEncodeAV1FeaturesKHR; +/// ``` +public final class VkPhysicalDeviceVideoEncodeAV1FeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("videoEncodeAV1") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `videoEncodeAV1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_videoEncodeAV1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoEncodeAV1")); + + /// Creates `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVideoEncodeAV1FeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoEncodeAV1FeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoEncodeAV1FeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoEncodeAV1FeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoEncodeAV1FeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoEncodeAV1FeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoEncodeAV1FeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR` + public static VkPhysicalDeviceVideoEncodeAV1FeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVideoEncodeAV1FeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVideoEncodeAV1FeaturesKHR` + public static VkPhysicalDeviceVideoEncodeAV1FeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVideoEncodeAV1FeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeAV1FeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeAV1FeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeAV1FeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeAV1FeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `videoEncodeAV1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_videoEncodeAV1(MemorySegment segment, long index) { return (int) VH_videoEncodeAV1.get(segment, 0L, index); } + /// {@return `videoEncodeAV1`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_videoEncodeAV1(MemorySegment segment) { return VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.get_videoEncodeAV1(segment, 0L); } + /// {@return `videoEncodeAV1` at the given index} + /// @param index the index + public @CType("VkBool32") int videoEncodeAV1At(long index) { return VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.get_videoEncodeAV1(this.segment(), index); } + /// {@return `videoEncodeAV1`} + public @CType("VkBool32") int videoEncodeAV1() { return VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.get_videoEncodeAV1(this.segment()); } + /// Sets `videoEncodeAV1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoEncodeAV1(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_videoEncodeAV1.set(segment, 0L, index, value); } + /// Sets `videoEncodeAV1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoEncodeAV1(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.set_videoEncodeAV1(segment, 0L, value); } + /// Sets `videoEncodeAV1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeAV1FeaturesKHR videoEncodeAV1At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.set_videoEncodeAV1(this.segment(), index, value); return this; } + /// Sets `videoEncodeAV1` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeAV1FeaturesKHR videoEncodeAV1(@CType("VkBool32") int value) { VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.set_videoEncodeAV1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.java new file mode 100644 index 00000000..7961159c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pVideoProfile +/// [VarHandle][#VH_pVideoProfile] - [Getter][#pVideoProfile()] - [Setter][#pVideoProfile(java.lang.foreign.MemorySegment)] +/// ### qualityLevel +/// [VarHandle][#VH_qualityLevel] - [Getter][#qualityLevel()] - [Setter][#qualityLevel(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const VkVideoProfileInfoKHR * pVideoProfile; +/// uint32_t qualityLevel; +/// } VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR; +/// ``` +public final class VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pVideoProfile"), + ValueLayout.JAVA_INT.withName("qualityLevel") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pVideoProfile` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVideoProfile = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVideoProfile")); + /// The [VarHandle] of `qualityLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_qualityLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qualityLevel")); + + /// Creates `VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR(segment); } + + /// Creates `VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR` + public static VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR` + public static VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pVideoProfile` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment get_pVideoProfile(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVideoProfile.get(segment, 0L, index); } + /// {@return `pVideoProfile`} + /// @param segment the segment of the struct + public static @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment get_pVideoProfile(MemorySegment segment) { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_pVideoProfile(segment, 0L); } + /// {@return `pVideoProfile` at the given index} + /// @param index the index + public @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment pVideoProfileAt(long index) { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_pVideoProfile(this.segment(), index); } + /// {@return `pVideoProfile`} + public @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment pVideoProfile() { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_pVideoProfile(this.segment()); } + /// Sets `pVideoProfile` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVideoProfile(MemorySegment segment, long index, @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pVideoProfile.set(segment, 0L, index, value); } + /// Sets `pVideoProfile` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVideoProfile(MemorySegment segment, @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_pVideoProfile(segment, 0L, value); } + /// Sets `pVideoProfile` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR pVideoProfileAt(long index, @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_pVideoProfile(this.segment(), index, value); return this; } + /// Sets `pVideoProfile` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR pVideoProfile(@CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_pVideoProfile(this.segment(), value); return this; } + + /// {@return `qualityLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_qualityLevel(MemorySegment segment, long index) { return (int) VH_qualityLevel.get(segment, 0L, index); } + /// {@return `qualityLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_qualityLevel(MemorySegment segment) { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_qualityLevel(segment, 0L); } + /// {@return `qualityLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int qualityLevelAt(long index) { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_qualityLevel(this.segment(), index); } + /// {@return `qualityLevel`} + public @CType("uint32_t") int qualityLevel() { return VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.get_qualityLevel(this.segment()); } + /// Sets `qualityLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qualityLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_qualityLevel.set(segment, 0L, index, value); } + /// Sets `qualityLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qualityLevel(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_qualityLevel(segment, 0L, value); } + /// Sets `qualityLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR qualityLevelAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_qualityLevel(this.segment(), index, value); return this; } + /// Sets `qualityLevel` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR qualityLevel(@CType("uint32_t") int value) { VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.set_qualityLevel(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.java new file mode 100644 index 00000000..8f32cb9a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### videoEncodeQuantizationMap +/// [VarHandle][#VH_videoEncodeQuantizationMap] - [Getter][#videoEncodeQuantizationMap()] - [Setter][#videoEncodeQuantizationMap(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 videoEncodeQuantizationMap; +/// } VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("videoEncodeQuantizationMap") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `videoEncodeQuantizationMap` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_videoEncodeQuantizationMap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoEncodeQuantizationMap")); + + /// Creates `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR` + public static VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR` + public static VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `videoEncodeQuantizationMap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_videoEncodeQuantizationMap(MemorySegment segment, long index) { return (int) VH_videoEncodeQuantizationMap.get(segment, 0L, index); } + /// {@return `videoEncodeQuantizationMap`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_videoEncodeQuantizationMap(MemorySegment segment) { return VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.get_videoEncodeQuantizationMap(segment, 0L); } + /// {@return `videoEncodeQuantizationMap` at the given index} + /// @param index the index + public @CType("VkBool32") int videoEncodeQuantizationMapAt(long index) { return VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.get_videoEncodeQuantizationMap(this.segment(), index); } + /// {@return `videoEncodeQuantizationMap`} + public @CType("VkBool32") int videoEncodeQuantizationMap() { return VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.get_videoEncodeQuantizationMap(this.segment()); } + /// Sets `videoEncodeQuantizationMap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoEncodeQuantizationMap(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_videoEncodeQuantizationMap.set(segment, 0L, index, value); } + /// Sets `videoEncodeQuantizationMap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoEncodeQuantizationMap(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.set_videoEncodeQuantizationMap(segment, 0L, value); } + /// Sets `videoEncodeQuantizationMap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR videoEncodeQuantizationMapAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.set_videoEncodeQuantizationMap(this.segment(), index, value); return this; } + /// Sets `videoEncodeQuantizationMap` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR videoEncodeQuantizationMap(@CType("VkBool32") int value) { VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.set_videoEncodeQuantizationMap(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoFormatInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoFormatInfoKHR.java new file mode 100644 index 00000000..d07bd6bb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoFormatInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageUsage +/// [VarHandle][#VH_imageUsage] - [Getter][#imageUsage()] - [Setter][#imageUsage(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVideoFormatInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageUsageFlags imageUsage; +/// } VkPhysicalDeviceVideoFormatInfoKHR; +/// ``` +public final class VkPhysicalDeviceVideoFormatInfoKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceVideoFormatInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("imageUsage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageUsage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageUsage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageUsage")); + + /// Creates `VkPhysicalDeviceVideoFormatInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVideoFormatInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVideoFormatInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoFormatInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoFormatInfoKHR(segment); } + + /// Creates `VkPhysicalDeviceVideoFormatInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoFormatInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoFormatInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVideoFormatInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoFormatInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoFormatInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVideoFormatInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVideoFormatInfoKHR` + public static VkPhysicalDeviceVideoFormatInfoKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVideoFormatInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVideoFormatInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVideoFormatInfoKHR` + public static VkPhysicalDeviceVideoFormatInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVideoFormatInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVideoFormatInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVideoFormatInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVideoFormatInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVideoFormatInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoFormatInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVideoFormatInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoFormatInfoKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVideoFormatInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVideoFormatInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVideoFormatInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVideoFormatInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoFormatInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoFormatInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoFormatInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoFormatInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoFormatInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `imageUsage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_imageUsage(MemorySegment segment, long index) { return (int) VH_imageUsage.get(segment, 0L, index); } + /// {@return `imageUsage`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_imageUsage(MemorySegment segment) { return VkPhysicalDeviceVideoFormatInfoKHR.get_imageUsage(segment, 0L); } + /// {@return `imageUsage` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int imageUsageAt(long index) { return VkPhysicalDeviceVideoFormatInfoKHR.get_imageUsage(this.segment(), index); } + /// {@return `imageUsage`} + public @CType("VkImageUsageFlags") int imageUsage() { return VkPhysicalDeviceVideoFormatInfoKHR.get_imageUsage(this.segment()); } + /// Sets `imageUsage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageUsage(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_imageUsage.set(segment, 0L, index, value); } + /// Sets `imageUsage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageUsage(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkPhysicalDeviceVideoFormatInfoKHR.set_imageUsage(segment, 0L, value); } + /// Sets `imageUsage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoFormatInfoKHR imageUsageAt(long index, @CType("VkImageUsageFlags") int value) { VkPhysicalDeviceVideoFormatInfoKHR.set_imageUsage(this.segment(), index, value); return this; } + /// Sets `imageUsage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoFormatInfoKHR imageUsage(@CType("VkImageUsageFlags") int value) { VkPhysicalDeviceVideoFormatInfoKHR.set_imageUsage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoMaintenance1FeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoMaintenance1FeaturesKHR.java new file mode 100644 index 00000000..0fc8aaf5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceVideoMaintenance1FeaturesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### videoMaintenance1 +/// [VarHandle][#VH_videoMaintenance1] - [Getter][#videoMaintenance1()] - [Setter][#videoMaintenance1(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVideoMaintenance1FeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 videoMaintenance1; +/// } VkPhysicalDeviceVideoMaintenance1FeaturesKHR; +/// ``` +public final class VkPhysicalDeviceVideoMaintenance1FeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceVideoMaintenance1FeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("videoMaintenance1") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `videoMaintenance1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_videoMaintenance1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoMaintenance1")); + + /// Creates `VkPhysicalDeviceVideoMaintenance1FeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVideoMaintenance1FeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVideoMaintenance1FeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoMaintenance1FeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoMaintenance1FeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceVideoMaintenance1FeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoMaintenance1FeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoMaintenance1FeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVideoMaintenance1FeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVideoMaintenance1FeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVideoMaintenance1FeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVideoMaintenance1FeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVideoMaintenance1FeaturesKHR` + public static VkPhysicalDeviceVideoMaintenance1FeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVideoMaintenance1FeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVideoMaintenance1FeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVideoMaintenance1FeaturesKHR` + public static VkPhysicalDeviceVideoMaintenance1FeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVideoMaintenance1FeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVideoMaintenance1FeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVideoMaintenance1FeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVideoMaintenance1FeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVideoMaintenance1FeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoMaintenance1FeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVideoMaintenance1FeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoMaintenance1FeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVideoMaintenance1FeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVideoMaintenance1FeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVideoMaintenance1FeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVideoMaintenance1FeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoMaintenance1FeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoMaintenance1FeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoMaintenance1FeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoMaintenance1FeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVideoMaintenance1FeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `videoMaintenance1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_videoMaintenance1(MemorySegment segment, long index) { return (int) VH_videoMaintenance1.get(segment, 0L, index); } + /// {@return `videoMaintenance1`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_videoMaintenance1(MemorySegment segment) { return VkPhysicalDeviceVideoMaintenance1FeaturesKHR.get_videoMaintenance1(segment, 0L); } + /// {@return `videoMaintenance1` at the given index} + /// @param index the index + public @CType("VkBool32") int videoMaintenance1At(long index) { return VkPhysicalDeviceVideoMaintenance1FeaturesKHR.get_videoMaintenance1(this.segment(), index); } + /// {@return `videoMaintenance1`} + public @CType("VkBool32") int videoMaintenance1() { return VkPhysicalDeviceVideoMaintenance1FeaturesKHR.get_videoMaintenance1(this.segment()); } + /// Sets `videoMaintenance1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoMaintenance1(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_videoMaintenance1.set(segment, 0L, index, value); } + /// Sets `videoMaintenance1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoMaintenance1(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVideoMaintenance1FeaturesKHR.set_videoMaintenance1(segment, 0L, value); } + /// Sets `videoMaintenance1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoMaintenance1FeaturesKHR videoMaintenance1At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVideoMaintenance1FeaturesKHR.set_videoMaintenance1(this.segment(), index, value); return this; } + /// Sets `videoMaintenance1` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVideoMaintenance1FeaturesKHR videoMaintenance1(@CType("VkBool32") int value) { VkPhysicalDeviceVideoMaintenance1FeaturesKHR.set_videoMaintenance1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.java new file mode 100644 index 00000000..fe5aeaf7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### workgroupMemoryExplicitLayout +/// [VarHandle][#VH_workgroupMemoryExplicitLayout] - [Getter][#workgroupMemoryExplicitLayout()] - [Setter][#workgroupMemoryExplicitLayout(int)] +/// ### workgroupMemoryExplicitLayoutScalarBlockLayout +/// [VarHandle][#VH_workgroupMemoryExplicitLayoutScalarBlockLayout] - [Getter][#workgroupMemoryExplicitLayoutScalarBlockLayout()] - [Setter][#workgroupMemoryExplicitLayoutScalarBlockLayout(int)] +/// ### workgroupMemoryExplicitLayout8BitAccess +/// [VarHandle][#VH_workgroupMemoryExplicitLayout8BitAccess] - [Getter][#workgroupMemoryExplicitLayout8BitAccess()] - [Setter][#workgroupMemoryExplicitLayout8BitAccess(int)] +/// ### workgroupMemoryExplicitLayout16BitAccess +/// [VarHandle][#VH_workgroupMemoryExplicitLayout16BitAccess] - [Getter][#workgroupMemoryExplicitLayout16BitAccess()] - [Setter][#workgroupMemoryExplicitLayout16BitAccess(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 workgroupMemoryExplicitLayout; +/// VkBool32 workgroupMemoryExplicitLayoutScalarBlockLayout; +/// VkBool32 workgroupMemoryExplicitLayout8BitAccess; +/// VkBool32 workgroupMemoryExplicitLayout16BitAccess; +/// } VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; +/// ``` +public final class VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR extends Struct { + /// The struct layout of `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("workgroupMemoryExplicitLayout"), + ValueLayout.JAVA_INT.withName("workgroupMemoryExplicitLayoutScalarBlockLayout"), + ValueLayout.JAVA_INT.withName("workgroupMemoryExplicitLayout8BitAccess"), + ValueLayout.JAVA_INT.withName("workgroupMemoryExplicitLayout16BitAccess") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `workgroupMemoryExplicitLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_workgroupMemoryExplicitLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("workgroupMemoryExplicitLayout")); + /// The [VarHandle] of `workgroupMemoryExplicitLayoutScalarBlockLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_workgroupMemoryExplicitLayoutScalarBlockLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("workgroupMemoryExplicitLayoutScalarBlockLayout")); + /// The [VarHandle] of `workgroupMemoryExplicitLayout8BitAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_workgroupMemoryExplicitLayout8BitAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("workgroupMemoryExplicitLayout8BitAccess")); + /// The [VarHandle] of `workgroupMemoryExplicitLayout16BitAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_workgroupMemoryExplicitLayout16BitAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("workgroupMemoryExplicitLayout16BitAccess")); + + /// Creates `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR(segment); } + + /// Creates `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR` + public static VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR` + public static VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR sType(@CType("VkStructureType") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `workgroupMemoryExplicitLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_workgroupMemoryExplicitLayout(MemorySegment segment, long index) { return (int) VH_workgroupMemoryExplicitLayout.get(segment, 0L, index); } + /// {@return `workgroupMemoryExplicitLayout`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_workgroupMemoryExplicitLayout(MemorySegment segment) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayout(segment, 0L); } + /// {@return `workgroupMemoryExplicitLayout` at the given index} + /// @param index the index + public @CType("VkBool32") int workgroupMemoryExplicitLayoutAt(long index) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayout(this.segment(), index); } + /// {@return `workgroupMemoryExplicitLayout`} + public @CType("VkBool32") int workgroupMemoryExplicitLayout() { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayout(this.segment()); } + /// Sets `workgroupMemoryExplicitLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_workgroupMemoryExplicitLayout(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_workgroupMemoryExplicitLayout.set(segment, 0L, index, value); } + /// Sets `workgroupMemoryExplicitLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_workgroupMemoryExplicitLayout(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayout(segment, 0L, value); } + /// Sets `workgroupMemoryExplicitLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroupMemoryExplicitLayoutAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayout(this.segment(), index, value); return this; } + /// Sets `workgroupMemoryExplicitLayout` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroupMemoryExplicitLayout(@CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayout(this.segment(), value); return this; } + + /// {@return `workgroupMemoryExplicitLayoutScalarBlockLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_workgroupMemoryExplicitLayoutScalarBlockLayout(MemorySegment segment, long index) { return (int) VH_workgroupMemoryExplicitLayoutScalarBlockLayout.get(segment, 0L, index); } + /// {@return `workgroupMemoryExplicitLayoutScalarBlockLayout`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_workgroupMemoryExplicitLayoutScalarBlockLayout(MemorySegment segment) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayoutScalarBlockLayout(segment, 0L); } + /// {@return `workgroupMemoryExplicitLayoutScalarBlockLayout` at the given index} + /// @param index the index + public @CType("VkBool32") int workgroupMemoryExplicitLayoutScalarBlockLayoutAt(long index) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayoutScalarBlockLayout(this.segment(), index); } + /// {@return `workgroupMemoryExplicitLayoutScalarBlockLayout`} + public @CType("VkBool32") int workgroupMemoryExplicitLayoutScalarBlockLayout() { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayoutScalarBlockLayout(this.segment()); } + /// Sets `workgroupMemoryExplicitLayoutScalarBlockLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_workgroupMemoryExplicitLayoutScalarBlockLayout(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_workgroupMemoryExplicitLayoutScalarBlockLayout.set(segment, 0L, index, value); } + /// Sets `workgroupMemoryExplicitLayoutScalarBlockLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_workgroupMemoryExplicitLayoutScalarBlockLayout(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayoutScalarBlockLayout(segment, 0L, value); } + /// Sets `workgroupMemoryExplicitLayoutScalarBlockLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroupMemoryExplicitLayoutScalarBlockLayoutAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayoutScalarBlockLayout(this.segment(), index, value); return this; } + /// Sets `workgroupMemoryExplicitLayoutScalarBlockLayout` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroupMemoryExplicitLayoutScalarBlockLayout(@CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayoutScalarBlockLayout(this.segment(), value); return this; } + + /// {@return `workgroupMemoryExplicitLayout8BitAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_workgroupMemoryExplicitLayout8BitAccess(MemorySegment segment, long index) { return (int) VH_workgroupMemoryExplicitLayout8BitAccess.get(segment, 0L, index); } + /// {@return `workgroupMemoryExplicitLayout8BitAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_workgroupMemoryExplicitLayout8BitAccess(MemorySegment segment) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayout8BitAccess(segment, 0L); } + /// {@return `workgroupMemoryExplicitLayout8BitAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int workgroupMemoryExplicitLayout8BitAccessAt(long index) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayout8BitAccess(this.segment(), index); } + /// {@return `workgroupMemoryExplicitLayout8BitAccess`} + public @CType("VkBool32") int workgroupMemoryExplicitLayout8BitAccess() { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayout8BitAccess(this.segment()); } + /// Sets `workgroupMemoryExplicitLayout8BitAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_workgroupMemoryExplicitLayout8BitAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_workgroupMemoryExplicitLayout8BitAccess.set(segment, 0L, index, value); } + /// Sets `workgroupMemoryExplicitLayout8BitAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_workgroupMemoryExplicitLayout8BitAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayout8BitAccess(segment, 0L, value); } + /// Sets `workgroupMemoryExplicitLayout8BitAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroupMemoryExplicitLayout8BitAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayout8BitAccess(this.segment(), index, value); return this; } + /// Sets `workgroupMemoryExplicitLayout8BitAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroupMemoryExplicitLayout8BitAccess(@CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayout8BitAccess(this.segment(), value); return this; } + + /// {@return `workgroupMemoryExplicitLayout16BitAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_workgroupMemoryExplicitLayout16BitAccess(MemorySegment segment, long index) { return (int) VH_workgroupMemoryExplicitLayout16BitAccess.get(segment, 0L, index); } + /// {@return `workgroupMemoryExplicitLayout16BitAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_workgroupMemoryExplicitLayout16BitAccess(MemorySegment segment) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayout16BitAccess(segment, 0L); } + /// {@return `workgroupMemoryExplicitLayout16BitAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int workgroupMemoryExplicitLayout16BitAccessAt(long index) { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayout16BitAccess(this.segment(), index); } + /// {@return `workgroupMemoryExplicitLayout16BitAccess`} + public @CType("VkBool32") int workgroupMemoryExplicitLayout16BitAccess() { return VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.get_workgroupMemoryExplicitLayout16BitAccess(this.segment()); } + /// Sets `workgroupMemoryExplicitLayout16BitAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_workgroupMemoryExplicitLayout16BitAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_workgroupMemoryExplicitLayout16BitAccess.set(segment, 0L, index, value); } + /// Sets `workgroupMemoryExplicitLayout16BitAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_workgroupMemoryExplicitLayout16BitAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayout16BitAccess(segment, 0L, value); } + /// Sets `workgroupMemoryExplicitLayout16BitAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroupMemoryExplicitLayout16BitAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayout16BitAccess(this.segment(), index, value); return this; } + /// Sets `workgroupMemoryExplicitLayout16BitAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroupMemoryExplicitLayout16BitAccess(@CType("VkBool32") int value) { VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.set_workgroupMemoryExplicitLayout16BitAccess(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryCreateInfoKHR.java new file mode 100644 index 00000000..cfbf71ce --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryCreateInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pKeysAndDataInfo +/// [VarHandle][#VH_pKeysAndDataInfo] - [Getter][#pKeysAndDataInfo()] - [Setter][#pKeysAndDataInfo(java.lang.foreign.MemorySegment)] +/// ### pipeline +/// [VarHandle][#VH_pipeline] - [Getter][#pipeline()] - [Setter][#pipeline(java.lang.foreign.MemorySegment)] +/// ### pPipelineCreateInfo +/// [VarHandle][#VH_pPipelineCreateInfo] - [Getter][#pPipelineCreateInfo()] - [Setter][#pPipelineCreateInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineBinaryCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const VkPipelineBinaryKeysAndDataKHR * pKeysAndDataInfo; +/// VkPipeline pipeline; +/// const VkPipelineCreateInfoKHR * pPipelineCreateInfo; +/// } VkPipelineBinaryCreateInfoKHR; +/// ``` +public final class VkPipelineBinaryCreateInfoKHR extends Struct { + /// The struct layout of `VkPipelineBinaryCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pKeysAndDataInfo"), + ValueLayout.ADDRESS.withName("pipeline"), + ValueLayout.ADDRESS.withName("pPipelineCreateInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pKeysAndDataInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pKeysAndDataInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pKeysAndDataInfo")); + /// The [VarHandle] of `pipeline` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipeline")); + /// The [VarHandle] of `pPipelineCreateInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelineCreateInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelineCreateInfo")); + + /// Creates `VkPipelineBinaryCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineBinaryCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineBinaryCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryCreateInfoKHR(segment); } + + /// Creates `VkPipelineBinaryCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineBinaryCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineBinaryCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineBinaryCreateInfoKHR` + public static VkPipelineBinaryCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkPipelineBinaryCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineBinaryCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineBinaryCreateInfoKHR` + public static VkPipelineBinaryCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineBinaryCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineBinaryCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineBinaryCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineBinaryCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineBinaryCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineBinaryCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryCreateInfoKHR sType(@CType("VkStructureType") int value) { VkPipelineBinaryCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineBinaryCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineBinaryCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineBinaryCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pKeysAndDataInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineBinaryKeysAndDataKHR *") java.lang.foreign.MemorySegment get_pKeysAndDataInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pKeysAndDataInfo.get(segment, 0L, index); } + /// {@return `pKeysAndDataInfo`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineBinaryKeysAndDataKHR *") java.lang.foreign.MemorySegment get_pKeysAndDataInfo(MemorySegment segment) { return VkPipelineBinaryCreateInfoKHR.get_pKeysAndDataInfo(segment, 0L); } + /// {@return `pKeysAndDataInfo` at the given index} + /// @param index the index + public @CType("const VkPipelineBinaryKeysAndDataKHR *") java.lang.foreign.MemorySegment pKeysAndDataInfoAt(long index) { return VkPipelineBinaryCreateInfoKHR.get_pKeysAndDataInfo(this.segment(), index); } + /// {@return `pKeysAndDataInfo`} + public @CType("const VkPipelineBinaryKeysAndDataKHR *") java.lang.foreign.MemorySegment pKeysAndDataInfo() { return VkPipelineBinaryCreateInfoKHR.get_pKeysAndDataInfo(this.segment()); } + /// Sets `pKeysAndDataInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pKeysAndDataInfo(MemorySegment segment, long index, @CType("const VkPipelineBinaryKeysAndDataKHR *") java.lang.foreign.MemorySegment value) { VH_pKeysAndDataInfo.set(segment, 0L, index, value); } + /// Sets `pKeysAndDataInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pKeysAndDataInfo(MemorySegment segment, @CType("const VkPipelineBinaryKeysAndDataKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pKeysAndDataInfo(segment, 0L, value); } + /// Sets `pKeysAndDataInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryCreateInfoKHR pKeysAndDataInfoAt(long index, @CType("const VkPipelineBinaryKeysAndDataKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pKeysAndDataInfo(this.segment(), index, value); return this; } + /// Sets `pKeysAndDataInfo` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryCreateInfoKHR pKeysAndDataInfo(@CType("const VkPipelineBinaryKeysAndDataKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pKeysAndDataInfo(this.segment(), value); return this; } + + /// {@return `pipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipeline.get(segment, 0L, index); } + /// {@return `pipeline`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment) { return VkPipelineBinaryCreateInfoKHR.get_pipeline(segment, 0L); } + /// {@return `pipeline` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipelineAt(long index) { return VkPipelineBinaryCreateInfoKHR.get_pipeline(this.segment(), index); } + /// {@return `pipeline`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipeline() { return VkPipelineBinaryCreateInfoKHR.get_pipeline(this.segment()); } + /// Sets `pipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipeline(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_pipeline.set(segment, 0L, index, value); } + /// Sets `pipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipeline(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pipeline(segment, 0L, value); } + /// Sets `pipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryCreateInfoKHR pipelineAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pipeline(this.segment(), index, value); return this; } + /// Sets `pipeline` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryCreateInfoKHR pipeline(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pipeline(this.segment(), value); return this; } + + /// {@return `pPipelineCreateInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineCreateInfoKHR *") java.lang.foreign.MemorySegment get_pPipelineCreateInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelineCreateInfo.get(segment, 0L, index); } + /// {@return `pPipelineCreateInfo`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineCreateInfoKHR *") java.lang.foreign.MemorySegment get_pPipelineCreateInfo(MemorySegment segment) { return VkPipelineBinaryCreateInfoKHR.get_pPipelineCreateInfo(segment, 0L); } + /// {@return `pPipelineCreateInfo` at the given index} + /// @param index the index + public @CType("const VkPipelineCreateInfoKHR *") java.lang.foreign.MemorySegment pPipelineCreateInfoAt(long index) { return VkPipelineBinaryCreateInfoKHR.get_pPipelineCreateInfo(this.segment(), index); } + /// {@return `pPipelineCreateInfo`} + public @CType("const VkPipelineCreateInfoKHR *") java.lang.foreign.MemorySegment pPipelineCreateInfo() { return VkPipelineBinaryCreateInfoKHR.get_pPipelineCreateInfo(this.segment()); } + /// Sets `pPipelineCreateInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelineCreateInfo(MemorySegment segment, long index, @CType("const VkPipelineCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pPipelineCreateInfo.set(segment, 0L, index, value); } + /// Sets `pPipelineCreateInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelineCreateInfo(MemorySegment segment, @CType("const VkPipelineCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pPipelineCreateInfo(segment, 0L, value); } + /// Sets `pPipelineCreateInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryCreateInfoKHR pPipelineCreateInfoAt(long index, @CType("const VkPipelineCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pPipelineCreateInfo(this.segment(), index, value); return this; } + /// Sets `pPipelineCreateInfo` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryCreateInfoKHR pPipelineCreateInfo(@CType("const VkPipelineCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryCreateInfoKHR.set_pPipelineCreateInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryDataInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryDataInfoKHR.java new file mode 100644 index 00000000..2a3b855c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryDataInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineBinary +/// [VarHandle][#VH_pipelineBinary] - [Getter][#pipelineBinary()] - [Setter][#pipelineBinary(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineBinaryDataInfoKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkPipelineBinaryKHR pipelineBinary; +/// } VkPipelineBinaryDataInfoKHR; +/// ``` +public final class VkPipelineBinaryDataInfoKHR extends Struct { + /// The struct layout of `VkPipelineBinaryDataInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pipelineBinary") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineBinary` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipelineBinary = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBinary")); + + /// Creates `VkPipelineBinaryDataInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineBinaryDataInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineBinaryDataInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryDataInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryDataInfoKHR(segment); } + + /// Creates `VkPipelineBinaryDataInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryDataInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryDataInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineBinaryDataInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryDataInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryDataInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineBinaryDataInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineBinaryDataInfoKHR` + public static VkPipelineBinaryDataInfoKHR alloc(SegmentAllocator allocator) { return new VkPipelineBinaryDataInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineBinaryDataInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineBinaryDataInfoKHR` + public static VkPipelineBinaryDataInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineBinaryDataInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineBinaryDataInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineBinaryDataInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineBinaryDataInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineBinaryDataInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryDataInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineBinaryDataInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryDataInfoKHR sType(@CType("VkStructureType") int value) { VkPipelineBinaryDataInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineBinaryDataInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineBinaryDataInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineBinaryDataInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryDataInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryDataInfoKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryDataInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryDataInfoKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryDataInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineBinary` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineBinaryKHR") java.lang.foreign.MemorySegment get_pipelineBinary(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipelineBinary.get(segment, 0L, index); } + /// {@return `pipelineBinary`} + /// @param segment the segment of the struct + public static @CType("VkPipelineBinaryKHR") java.lang.foreign.MemorySegment get_pipelineBinary(MemorySegment segment) { return VkPipelineBinaryDataInfoKHR.get_pipelineBinary(segment, 0L); } + /// {@return `pipelineBinary` at the given index} + /// @param index the index + public @CType("VkPipelineBinaryKHR") java.lang.foreign.MemorySegment pipelineBinaryAt(long index) { return VkPipelineBinaryDataInfoKHR.get_pipelineBinary(this.segment(), index); } + /// {@return `pipelineBinary`} + public @CType("VkPipelineBinaryKHR") java.lang.foreign.MemorySegment pipelineBinary() { return VkPipelineBinaryDataInfoKHR.get_pipelineBinary(this.segment()); } + /// Sets `pipelineBinary` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBinary(MemorySegment segment, long index, @CType("VkPipelineBinaryKHR") java.lang.foreign.MemorySegment value) { VH_pipelineBinary.set(segment, 0L, index, value); } + /// Sets `pipelineBinary` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBinary(MemorySegment segment, @CType("VkPipelineBinaryKHR") java.lang.foreign.MemorySegment value) { VkPipelineBinaryDataInfoKHR.set_pipelineBinary(segment, 0L, value); } + /// Sets `pipelineBinary` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryDataInfoKHR pipelineBinaryAt(long index, @CType("VkPipelineBinaryKHR") java.lang.foreign.MemorySegment value) { VkPipelineBinaryDataInfoKHR.set_pipelineBinary(this.segment(), index, value); return this; } + /// Sets `pipelineBinary` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryDataInfoKHR pipelineBinary(@CType("VkPipelineBinaryKHR") java.lang.foreign.MemorySegment value) { VkPipelineBinaryDataInfoKHR.set_pipelineBinary(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryDataKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryDataKHR.java new file mode 100644 index 00000000..66d85d31 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryDataKHR.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### dataSize +/// [VarHandle][#VH_dataSize] - [Getter][#dataSize()] - [Setter][#dataSize(long)] +/// ### pData +/// [VarHandle][#VH_pData] - [Getter][#pData()] - [Setter][#pData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineBinaryDataKHR { +/// size_t dataSize; +/// void * pData; +/// } VkPipelineBinaryDataKHR; +/// ``` +public final class VkPipelineBinaryDataKHR extends Struct { + /// The struct layout of `VkPipelineBinaryDataKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("dataSize"), + ValueLayout.ADDRESS.withName("pData") + ); + /// The [VarHandle] of `dataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dataSize")); + /// The [VarHandle] of `pData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pData")); + + /// Creates `VkPipelineBinaryDataKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineBinaryDataKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineBinaryDataKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryDataKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryDataKHR(segment); } + + /// Creates `VkPipelineBinaryDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryDataKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineBinaryDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryDataKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineBinaryDataKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineBinaryDataKHR` + public static VkPipelineBinaryDataKHR alloc(SegmentAllocator allocator) { return new VkPipelineBinaryDataKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineBinaryDataKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineBinaryDataKHR` + public static VkPipelineBinaryDataKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineBinaryDataKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `dataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_dataSize(MemorySegment segment, long index) { return (long) VH_dataSize.get(segment, 0L, index); } + /// {@return `dataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_dataSize(MemorySegment segment) { return VkPipelineBinaryDataKHR.get_dataSize(segment, 0L); } + /// {@return `dataSize` at the given index} + /// @param index the index + public @CType("size_t") long dataSizeAt(long index) { return VkPipelineBinaryDataKHR.get_dataSize(this.segment(), index); } + /// {@return `dataSize`} + public @CType("size_t") long dataSize() { return VkPipelineBinaryDataKHR.get_dataSize(this.segment()); } + /// Sets `dataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_dataSize.set(segment, 0L, index, value); } + /// Sets `dataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dataSize(MemorySegment segment, @CType("size_t") long value) { VkPipelineBinaryDataKHR.set_dataSize(segment, 0L, value); } + /// Sets `dataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryDataKHR dataSizeAt(long index, @CType("size_t") long value) { VkPipelineBinaryDataKHR.set_dataSize(this.segment(), index, value); return this; } + /// Sets `dataSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryDataKHR dataSize(@CType("size_t") long value) { VkPipelineBinaryDataKHR.set_dataSize(this.segment(), value); return this; } + + /// {@return `pData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pData.get(segment, 0L, index); } + /// {@return `pData`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment) { return VkPipelineBinaryDataKHR.get_pData(segment, 0L); } + /// {@return `pData` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pDataAt(long index) { return VkPipelineBinaryDataKHR.get_pData(this.segment(), index); } + /// {@return `pData`} + public @CType("void *") java.lang.foreign.MemorySegment pData() { return VkPipelineBinaryDataKHR.get_pData(this.segment()); } + /// Sets `pData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pData(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pData.set(segment, 0L, index, value); } + /// Sets `pData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pData(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryDataKHR.set_pData(segment, 0L, value); } + /// Sets `pData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryDataKHR pDataAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryDataKHR.set_pData(this.segment(), index, value); return this; } + /// Sets `pData` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryDataKHR pData(@CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryDataKHR.set_pData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryHandlesInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryHandlesInfoKHR.java new file mode 100644 index 00000000..3dae4d5c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryHandlesInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineBinaryCount +/// [VarHandle][#VH_pipelineBinaryCount] - [Getter][#pipelineBinaryCount()] - [Setter][#pipelineBinaryCount(int)] +/// ### pPipelineBinaries +/// [VarHandle][#VH_pPipelineBinaries] - [Getter][#pPipelineBinaries()] - [Setter][#pPipelineBinaries(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineBinaryHandlesInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t pipelineBinaryCount; +/// VkPipelineBinaryKHR * pPipelineBinaries; +/// } VkPipelineBinaryHandlesInfoKHR; +/// ``` +public final class VkPipelineBinaryHandlesInfoKHR extends Struct { + /// The struct layout of `VkPipelineBinaryHandlesInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineBinaryCount"), + ValueLayout.ADDRESS.withName("pPipelineBinaries") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineBinaryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBinaryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBinaryCount")); + /// The [VarHandle] of `pPipelineBinaries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelineBinaries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelineBinaries")); + + /// Creates `VkPipelineBinaryHandlesInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineBinaryHandlesInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineBinaryHandlesInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryHandlesInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryHandlesInfoKHR(segment); } + + /// Creates `VkPipelineBinaryHandlesInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryHandlesInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryHandlesInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineBinaryHandlesInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryHandlesInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryHandlesInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineBinaryHandlesInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineBinaryHandlesInfoKHR` + public static VkPipelineBinaryHandlesInfoKHR alloc(SegmentAllocator allocator) { return new VkPipelineBinaryHandlesInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineBinaryHandlesInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineBinaryHandlesInfoKHR` + public static VkPipelineBinaryHandlesInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineBinaryHandlesInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineBinaryHandlesInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineBinaryHandlesInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineBinaryHandlesInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineBinaryHandlesInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryHandlesInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineBinaryHandlesInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryHandlesInfoKHR sType(@CType("VkStructureType") int value) { VkPipelineBinaryHandlesInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineBinaryHandlesInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineBinaryHandlesInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineBinaryHandlesInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryHandlesInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryHandlesInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryHandlesInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryHandlesInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryHandlesInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineBinaryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pipelineBinaryCount(MemorySegment segment, long index) { return (int) VH_pipelineBinaryCount.get(segment, 0L, index); } + /// {@return `pipelineBinaryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pipelineBinaryCount(MemorySegment segment) { return VkPipelineBinaryHandlesInfoKHR.get_pipelineBinaryCount(segment, 0L); } + /// {@return `pipelineBinaryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pipelineBinaryCountAt(long index) { return VkPipelineBinaryHandlesInfoKHR.get_pipelineBinaryCount(this.segment(), index); } + /// {@return `pipelineBinaryCount`} + public @CType("uint32_t") int pipelineBinaryCount() { return VkPipelineBinaryHandlesInfoKHR.get_pipelineBinaryCount(this.segment()); } + /// Sets `pipelineBinaryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBinaryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pipelineBinaryCount.set(segment, 0L, index, value); } + /// Sets `pipelineBinaryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBinaryCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineBinaryHandlesInfoKHR.set_pipelineBinaryCount(segment, 0L, value); } + /// Sets `pipelineBinaryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryHandlesInfoKHR pipelineBinaryCountAt(long index, @CType("uint32_t") int value) { VkPipelineBinaryHandlesInfoKHR.set_pipelineBinaryCount(this.segment(), index, value); return this; } + /// Sets `pipelineBinaryCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryHandlesInfoKHR pipelineBinaryCount(@CType("uint32_t") int value) { VkPipelineBinaryHandlesInfoKHR.set_pipelineBinaryCount(this.segment(), value); return this; } + + /// {@return `pPipelineBinaries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment get_pPipelineBinaries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelineBinaries.get(segment, 0L, index); } + /// {@return `pPipelineBinaries`} + /// @param segment the segment of the struct + public static @CType("VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment get_pPipelineBinaries(MemorySegment segment) { return VkPipelineBinaryHandlesInfoKHR.get_pPipelineBinaries(segment, 0L); } + /// {@return `pPipelineBinaries` at the given index} + /// @param index the index + public @CType("VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment pPipelineBinariesAt(long index) { return VkPipelineBinaryHandlesInfoKHR.get_pPipelineBinaries(this.segment(), index); } + /// {@return `pPipelineBinaries`} + public @CType("VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment pPipelineBinaries() { return VkPipelineBinaryHandlesInfoKHR.get_pPipelineBinaries(this.segment()); } + /// Sets `pPipelineBinaries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelineBinaries(MemorySegment segment, long index, @CType("VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment value) { VH_pPipelineBinaries.set(segment, 0L, index, value); } + /// Sets `pPipelineBinaries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelineBinaries(MemorySegment segment, @CType("VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryHandlesInfoKHR.set_pPipelineBinaries(segment, 0L, value); } + /// Sets `pPipelineBinaries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryHandlesInfoKHR pPipelineBinariesAt(long index, @CType("VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryHandlesInfoKHR.set_pPipelineBinaries(this.segment(), index, value); return this; } + /// Sets `pPipelineBinaries` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryHandlesInfoKHR pPipelineBinaries(@CType("VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryHandlesInfoKHR.set_pPipelineBinaries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryInfoKHR.java new file mode 100644 index 00000000..3e099d4d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### binaryCount +/// [VarHandle][#VH_binaryCount] - [Getter][#binaryCount()] - [Setter][#binaryCount(int)] +/// ### pPipelineBinaries +/// [VarHandle][#VH_pPipelineBinaries] - [Getter][#pPipelineBinaries()] - [Setter][#pPipelineBinaries(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineBinaryInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t binaryCount; +/// const VkPipelineBinaryKHR * pPipelineBinaries; +/// } VkPipelineBinaryInfoKHR; +/// ``` +public final class VkPipelineBinaryInfoKHR extends Struct { + /// The struct layout of `VkPipelineBinaryInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("binaryCount"), + ValueLayout.ADDRESS.withName("pPipelineBinaries") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `binaryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_binaryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("binaryCount")); + /// The [VarHandle] of `pPipelineBinaries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelineBinaries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelineBinaries")); + + /// Creates `VkPipelineBinaryInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineBinaryInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineBinaryInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryInfoKHR(segment); } + + /// Creates `VkPipelineBinaryInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineBinaryInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineBinaryInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineBinaryInfoKHR` + public static VkPipelineBinaryInfoKHR alloc(SegmentAllocator allocator) { return new VkPipelineBinaryInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineBinaryInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineBinaryInfoKHR` + public static VkPipelineBinaryInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineBinaryInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineBinaryInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineBinaryInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineBinaryInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineBinaryInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineBinaryInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryInfoKHR sType(@CType("VkStructureType") int value) { VkPipelineBinaryInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineBinaryInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineBinaryInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineBinaryInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `binaryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_binaryCount(MemorySegment segment, long index) { return (int) VH_binaryCount.get(segment, 0L, index); } + /// {@return `binaryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_binaryCount(MemorySegment segment) { return VkPipelineBinaryInfoKHR.get_binaryCount(segment, 0L); } + /// {@return `binaryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int binaryCountAt(long index) { return VkPipelineBinaryInfoKHR.get_binaryCount(this.segment(), index); } + /// {@return `binaryCount`} + public @CType("uint32_t") int binaryCount() { return VkPipelineBinaryInfoKHR.get_binaryCount(this.segment()); } + /// Sets `binaryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_binaryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_binaryCount.set(segment, 0L, index, value); } + /// Sets `binaryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_binaryCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineBinaryInfoKHR.set_binaryCount(segment, 0L, value); } + /// Sets `binaryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryInfoKHR binaryCountAt(long index, @CType("uint32_t") int value) { VkPipelineBinaryInfoKHR.set_binaryCount(this.segment(), index, value); return this; } + /// Sets `binaryCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryInfoKHR binaryCount(@CType("uint32_t") int value) { VkPipelineBinaryInfoKHR.set_binaryCount(this.segment(), value); return this; } + + /// {@return `pPipelineBinaries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment get_pPipelineBinaries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelineBinaries.get(segment, 0L, index); } + /// {@return `pPipelineBinaries`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment get_pPipelineBinaries(MemorySegment segment) { return VkPipelineBinaryInfoKHR.get_pPipelineBinaries(segment, 0L); } + /// {@return `pPipelineBinaries` at the given index} + /// @param index the index + public @CType("const VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment pPipelineBinariesAt(long index) { return VkPipelineBinaryInfoKHR.get_pPipelineBinaries(this.segment(), index); } + /// {@return `pPipelineBinaries`} + public @CType("const VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment pPipelineBinaries() { return VkPipelineBinaryInfoKHR.get_pPipelineBinaries(this.segment()); } + /// Sets `pPipelineBinaries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelineBinaries(MemorySegment segment, long index, @CType("const VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment value) { VH_pPipelineBinaries.set(segment, 0L, index, value); } + /// Sets `pPipelineBinaries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelineBinaries(MemorySegment segment, @CType("const VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryInfoKHR.set_pPipelineBinaries(segment, 0L, value); } + /// Sets `pPipelineBinaries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryInfoKHR pPipelineBinariesAt(long index, @CType("const VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryInfoKHR.set_pPipelineBinaries(this.segment(), index, value); return this; } + /// Sets `pPipelineBinaries` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryInfoKHR pPipelineBinaries(@CType("const VkPipelineBinaryKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryInfoKHR.set_pPipelineBinaries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryKeyKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryKeyKHR.java new file mode 100644 index 00000000..c60fe5eb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryKeyKHR.java @@ -0,0 +1,239 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.khr.VKKHRPipelineBinary.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### keySize +/// [VarHandle][#VH_keySize] - [Getter][#keySize()] - [Setter][#keySize(int)] +/// ### key +/// [Byte offset handle][#MH_key] - [Memory layout][#ML_key] - [Getter][#key(long)] - [Setter][#key(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineBinaryKeyKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t keySize; +/// uint8_t[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR] key; +/// } VkPipelineBinaryKeyKHR; +/// ``` +public final class VkPipelineBinaryKeyKHR extends Struct { + /// The struct layout of `VkPipelineBinaryKeyKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("keySize"), + MemoryLayout.sequenceLayout(VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR, ValueLayout.JAVA_BYTE).withName("key") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `keySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_keySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("keySize")); + /// The byte offset handle of `key` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_key = LAYOUT.byteOffsetHandle(PathElement.groupElement("key"), PathElement.sequenceElement()); + /// The memory layout of `key`. + public static final MemoryLayout ML_key = LAYOUT.select(PathElement.groupElement("key")); + + /// Creates `VkPipelineBinaryKeyKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineBinaryKeyKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineBinaryKeyKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryKeyKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryKeyKHR(segment); } + + /// Creates `VkPipelineBinaryKeyKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryKeyKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryKeyKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineBinaryKeyKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryKeyKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryKeyKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineBinaryKeyKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineBinaryKeyKHR` + public static VkPipelineBinaryKeyKHR alloc(SegmentAllocator allocator) { return new VkPipelineBinaryKeyKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineBinaryKeyKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineBinaryKeyKHR` + public static VkPipelineBinaryKeyKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineBinaryKeyKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineBinaryKeyKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineBinaryKeyKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineBinaryKeyKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineBinaryKeyKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeyKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineBinaryKeyKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeyKHR sType(@CType("VkStructureType") int value) { VkPipelineBinaryKeyKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineBinaryKeyKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineBinaryKeyKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineBinaryKeyKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeyKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeyKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeyKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeyKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeyKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `keySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_keySize(MemorySegment segment, long index) { return (int) VH_keySize.get(segment, 0L, index); } + /// {@return `keySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_keySize(MemorySegment segment) { return VkPipelineBinaryKeyKHR.get_keySize(segment, 0L); } + /// {@return `keySize` at the given index} + /// @param index the index + public @CType("uint32_t") int keySizeAt(long index) { return VkPipelineBinaryKeyKHR.get_keySize(this.segment(), index); } + /// {@return `keySize`} + public @CType("uint32_t") int keySize() { return VkPipelineBinaryKeyKHR.get_keySize(this.segment()); } + /// Sets `keySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_keySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_keySize.set(segment, 0L, index, value); } + /// Sets `keySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_keySize(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineBinaryKeyKHR.set_keySize(segment, 0L, value); } + /// Sets `keySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeyKHR keySizeAt(long index, @CType("uint32_t") int value) { VkPipelineBinaryKeyKHR.set_keySize(this.segment(), index, value); return this; } + /// Sets `keySize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeyKHR keySize(@CType("uint32_t") int value) { VkPipelineBinaryKeyKHR.set_keySize(this.segment(), value); return this; } + + /// {@return `key` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR]") java.lang.foreign.MemorySegment get_key(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_key.invokeExact(0L, elementIndex), index), ML_key); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `key`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR]") java.lang.foreign.MemorySegment get_key(MemorySegment segment, long elementIndex) { return VkPipelineBinaryKeyKHR.get_key(segment, 0L, elementIndex); } + /// {@return `key` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR]") java.lang.foreign.MemorySegment keyAt(long index, long elementIndex) { return VkPipelineBinaryKeyKHR.get_key(this.segment(), index, elementIndex); } + /// {@return `key`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR]") java.lang.foreign.MemorySegment key(long elementIndex) { return VkPipelineBinaryKeyKHR.get_key(this.segment(), elementIndex); } + /// Sets `key` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_key(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_key.invokeExact(0L, elementIndex), index), ML_key.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `key` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_key(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR]") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeyKHR.set_key(segment, 0L, elementIndex, value); } + /// Sets `key` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeyKHR keyAt(long index, long elementIndex, @CType("uint8_t[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR]") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeyKHR.set_key(this.segment(), index, elementIndex, value); return this; } + /// Sets `key` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeyKHR key(long elementIndex, @CType("uint8_t[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR]") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeyKHR.set_key(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryKeysAndDataKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryKeysAndDataKHR.java new file mode 100644 index 00000000..35ad8dfb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineBinaryKeysAndDataKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### binaryCount +/// [VarHandle][#VH_binaryCount] - [Getter][#binaryCount()] - [Setter][#binaryCount(int)] +/// ### pPipelineBinaryKeys +/// [VarHandle][#VH_pPipelineBinaryKeys] - [Getter][#pPipelineBinaryKeys()] - [Setter][#pPipelineBinaryKeys(java.lang.foreign.MemorySegment)] +/// ### pPipelineBinaryData +/// [VarHandle][#VH_pPipelineBinaryData] - [Getter][#pPipelineBinaryData()] - [Setter][#pPipelineBinaryData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineBinaryKeysAndDataKHR { +/// uint32_t binaryCount; +/// const VkPipelineBinaryKeyKHR * pPipelineBinaryKeys; +/// const VkPipelineBinaryDataKHR * pPipelineBinaryData; +/// } VkPipelineBinaryKeysAndDataKHR; +/// ``` +public final class VkPipelineBinaryKeysAndDataKHR extends Struct { + /// The struct layout of `VkPipelineBinaryKeysAndDataKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("binaryCount"), + ValueLayout.ADDRESS.withName("pPipelineBinaryKeys"), + ValueLayout.ADDRESS.withName("pPipelineBinaryData") + ); + /// The [VarHandle] of `binaryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_binaryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("binaryCount")); + /// The [VarHandle] of `pPipelineBinaryKeys` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelineBinaryKeys = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelineBinaryKeys")); + /// The [VarHandle] of `pPipelineBinaryData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelineBinaryData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelineBinaryData")); + + /// Creates `VkPipelineBinaryKeysAndDataKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineBinaryKeysAndDataKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineBinaryKeysAndDataKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryKeysAndDataKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryKeysAndDataKHR(segment); } + + /// Creates `VkPipelineBinaryKeysAndDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryKeysAndDataKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryKeysAndDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineBinaryKeysAndDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineBinaryKeysAndDataKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineBinaryKeysAndDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineBinaryKeysAndDataKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineBinaryKeysAndDataKHR` + public static VkPipelineBinaryKeysAndDataKHR alloc(SegmentAllocator allocator) { return new VkPipelineBinaryKeysAndDataKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineBinaryKeysAndDataKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineBinaryKeysAndDataKHR` + public static VkPipelineBinaryKeysAndDataKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineBinaryKeysAndDataKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `binaryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_binaryCount(MemorySegment segment, long index) { return (int) VH_binaryCount.get(segment, 0L, index); } + /// {@return `binaryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_binaryCount(MemorySegment segment) { return VkPipelineBinaryKeysAndDataKHR.get_binaryCount(segment, 0L); } + /// {@return `binaryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int binaryCountAt(long index) { return VkPipelineBinaryKeysAndDataKHR.get_binaryCount(this.segment(), index); } + /// {@return `binaryCount`} + public @CType("uint32_t") int binaryCount() { return VkPipelineBinaryKeysAndDataKHR.get_binaryCount(this.segment()); } + /// Sets `binaryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_binaryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_binaryCount.set(segment, 0L, index, value); } + /// Sets `binaryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_binaryCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineBinaryKeysAndDataKHR.set_binaryCount(segment, 0L, value); } + /// Sets `binaryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeysAndDataKHR binaryCountAt(long index, @CType("uint32_t") int value) { VkPipelineBinaryKeysAndDataKHR.set_binaryCount(this.segment(), index, value); return this; } + /// Sets `binaryCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeysAndDataKHR binaryCount(@CType("uint32_t") int value) { VkPipelineBinaryKeysAndDataKHR.set_binaryCount(this.segment(), value); return this; } + + /// {@return `pPipelineBinaryKeys` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineBinaryKeyKHR *") java.lang.foreign.MemorySegment get_pPipelineBinaryKeys(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelineBinaryKeys.get(segment, 0L, index); } + /// {@return `pPipelineBinaryKeys`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineBinaryKeyKHR *") java.lang.foreign.MemorySegment get_pPipelineBinaryKeys(MemorySegment segment) { return VkPipelineBinaryKeysAndDataKHR.get_pPipelineBinaryKeys(segment, 0L); } + /// {@return `pPipelineBinaryKeys` at the given index} + /// @param index the index + public @CType("const VkPipelineBinaryKeyKHR *") java.lang.foreign.MemorySegment pPipelineBinaryKeysAt(long index) { return VkPipelineBinaryKeysAndDataKHR.get_pPipelineBinaryKeys(this.segment(), index); } + /// {@return `pPipelineBinaryKeys`} + public @CType("const VkPipelineBinaryKeyKHR *") java.lang.foreign.MemorySegment pPipelineBinaryKeys() { return VkPipelineBinaryKeysAndDataKHR.get_pPipelineBinaryKeys(this.segment()); } + /// Sets `pPipelineBinaryKeys` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelineBinaryKeys(MemorySegment segment, long index, @CType("const VkPipelineBinaryKeyKHR *") java.lang.foreign.MemorySegment value) { VH_pPipelineBinaryKeys.set(segment, 0L, index, value); } + /// Sets `pPipelineBinaryKeys` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelineBinaryKeys(MemorySegment segment, @CType("const VkPipelineBinaryKeyKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeysAndDataKHR.set_pPipelineBinaryKeys(segment, 0L, value); } + /// Sets `pPipelineBinaryKeys` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeysAndDataKHR pPipelineBinaryKeysAt(long index, @CType("const VkPipelineBinaryKeyKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeysAndDataKHR.set_pPipelineBinaryKeys(this.segment(), index, value); return this; } + /// Sets `pPipelineBinaryKeys` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeysAndDataKHR pPipelineBinaryKeys(@CType("const VkPipelineBinaryKeyKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeysAndDataKHR.set_pPipelineBinaryKeys(this.segment(), value); return this; } + + /// {@return `pPipelineBinaryData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineBinaryDataKHR *") java.lang.foreign.MemorySegment get_pPipelineBinaryData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelineBinaryData.get(segment, 0L, index); } + /// {@return `pPipelineBinaryData`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineBinaryDataKHR *") java.lang.foreign.MemorySegment get_pPipelineBinaryData(MemorySegment segment) { return VkPipelineBinaryKeysAndDataKHR.get_pPipelineBinaryData(segment, 0L); } + /// {@return `pPipelineBinaryData` at the given index} + /// @param index the index + public @CType("const VkPipelineBinaryDataKHR *") java.lang.foreign.MemorySegment pPipelineBinaryDataAt(long index) { return VkPipelineBinaryKeysAndDataKHR.get_pPipelineBinaryData(this.segment(), index); } + /// {@return `pPipelineBinaryData`} + public @CType("const VkPipelineBinaryDataKHR *") java.lang.foreign.MemorySegment pPipelineBinaryData() { return VkPipelineBinaryKeysAndDataKHR.get_pPipelineBinaryData(this.segment()); } + /// Sets `pPipelineBinaryData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelineBinaryData(MemorySegment segment, long index, @CType("const VkPipelineBinaryDataKHR *") java.lang.foreign.MemorySegment value) { VH_pPipelineBinaryData.set(segment, 0L, index, value); } + /// Sets `pPipelineBinaryData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelineBinaryData(MemorySegment segment, @CType("const VkPipelineBinaryDataKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeysAndDataKHR.set_pPipelineBinaryData(segment, 0L, value); } + /// Sets `pPipelineBinaryData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeysAndDataKHR pPipelineBinaryDataAt(long index, @CType("const VkPipelineBinaryDataKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeysAndDataKHR.set_pPipelineBinaryData(this.segment(), index, value); return this; } + /// Sets `pPipelineBinaryData` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineBinaryKeysAndDataKHR pPipelineBinaryData(@CType("const VkPipelineBinaryDataKHR *") java.lang.foreign.MemorySegment value) { VkPipelineBinaryKeysAndDataKHR.set_pPipelineBinaryData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineCreateInfoKHR.java new file mode 100644 index 00000000..79b747b5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineCreateInfoKHR.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCreateInfoKHR { +/// VkStructureType sType; +/// void * pNext; +/// } VkPipelineCreateInfoKHR; +/// ``` +public final class VkPipelineCreateInfoKHR extends Struct { + /// The struct layout of `VkPipelineCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + + /// Creates `VkPipelineCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreateInfoKHR(segment); } + + /// Creates `VkPipelineCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCreateInfoKHR` + public static VkPipelineCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkPipelineCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCreateInfoKHR` + public static VkPipelineCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreateInfoKHR sType(@CType("VkStructureType") int value) { VkPipelineCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreateInfoKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreateInfoKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineCreateInfoKHR.set_pNext(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutableInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutableInfoKHR.java new file mode 100644 index 00000000..87b7372c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutableInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipeline +/// [VarHandle][#VH_pipeline] - [Getter][#pipeline()] - [Setter][#pipeline(java.lang.foreign.MemorySegment)] +/// ### executableIndex +/// [VarHandle][#VH_executableIndex] - [Getter][#executableIndex()] - [Setter][#executableIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineExecutableInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipeline pipeline; +/// uint32_t executableIndex; +/// } VkPipelineExecutableInfoKHR; +/// ``` +public final class VkPipelineExecutableInfoKHR extends Struct { + /// The struct layout of `VkPipelineExecutableInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pipeline"), + ValueLayout.JAVA_INT.withName("executableIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipeline` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipeline")); + /// The [VarHandle] of `executableIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_executableIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("executableIndex")); + + /// Creates `VkPipelineExecutableInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineExecutableInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineExecutableInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableInfoKHR(segment); } + + /// Creates `VkPipelineExecutableInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineExecutableInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineExecutableInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineExecutableInfoKHR` + public static VkPipelineExecutableInfoKHR alloc(SegmentAllocator allocator) { return new VkPipelineExecutableInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineExecutableInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineExecutableInfoKHR` + public static VkPipelineExecutableInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineExecutableInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineExecutableInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineExecutableInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineExecutableInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineExecutableInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineExecutableInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableInfoKHR sType(@CType("VkStructureType") int value) { VkPipelineExecutableInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineExecutableInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineExecutableInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineExecutableInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipeline.get(segment, 0L, index); } + /// {@return `pipeline`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment) { return VkPipelineExecutableInfoKHR.get_pipeline(segment, 0L); } + /// {@return `pipeline` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipelineAt(long index) { return VkPipelineExecutableInfoKHR.get_pipeline(this.segment(), index); } + /// {@return `pipeline`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipeline() { return VkPipelineExecutableInfoKHR.get_pipeline(this.segment()); } + /// Sets `pipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipeline(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_pipeline.set(segment, 0L, index, value); } + /// Sets `pipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipeline(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInfoKHR.set_pipeline(segment, 0L, value); } + /// Sets `pipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableInfoKHR pipelineAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInfoKHR.set_pipeline(this.segment(), index, value); return this; } + /// Sets `pipeline` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableInfoKHR pipeline(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInfoKHR.set_pipeline(this.segment(), value); return this; } + + /// {@return `executableIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_executableIndex(MemorySegment segment, long index) { return (int) VH_executableIndex.get(segment, 0L, index); } + /// {@return `executableIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_executableIndex(MemorySegment segment) { return VkPipelineExecutableInfoKHR.get_executableIndex(segment, 0L); } + /// {@return `executableIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int executableIndexAt(long index) { return VkPipelineExecutableInfoKHR.get_executableIndex(this.segment(), index); } + /// {@return `executableIndex`} + public @CType("uint32_t") int executableIndex() { return VkPipelineExecutableInfoKHR.get_executableIndex(this.segment()); } + /// Sets `executableIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_executableIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_executableIndex.set(segment, 0L, index, value); } + /// Sets `executableIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_executableIndex(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineExecutableInfoKHR.set_executableIndex(segment, 0L, value); } + /// Sets `executableIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableInfoKHR executableIndexAt(long index, @CType("uint32_t") int value) { VkPipelineExecutableInfoKHR.set_executableIndex(this.segment(), index, value); return this; } + /// Sets `executableIndex` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableInfoKHR executableIndex(@CType("uint32_t") int value) { VkPipelineExecutableInfoKHR.set_executableIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutableInternalRepresentationKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutableInternalRepresentationKHR.java new file mode 100644 index 00000000..78e72349 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutableInternalRepresentationKHR.java @@ -0,0 +1,367 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### name +/// [Byte offset handle][#MH_name] - [Memory layout][#ML_name] - [Getter][#name(long)] - [Setter][#name(long, java.lang.foreign.MemorySegment)] +/// ### description +/// [Byte offset handle][#MH_description] - [Memory layout][#ML_description] - [Getter][#description(long)] - [Setter][#description(long, java.lang.foreign.MemorySegment)] +/// ### isText +/// [VarHandle][#VH_isText] - [Getter][#isText()] - [Setter][#isText(int)] +/// ### dataSize +/// [VarHandle][#VH_dataSize] - [Getter][#dataSize()] - [Setter][#dataSize(long)] +/// ### pData +/// [VarHandle][#VH_pData] - [Getter][#pData()] - [Setter][#pData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineExecutableInternalRepresentationKHR { +/// VkStructureType sType; +/// void * pNext; +/// char[VK_MAX_DESCRIPTION_SIZE] name; +/// char[VK_MAX_DESCRIPTION_SIZE] description; +/// VkBool32 isText; +/// size_t dataSize; +/// void * pData; +/// } VkPipelineExecutableInternalRepresentationKHR; +/// ``` +public final class VkPipelineExecutableInternalRepresentationKHR extends Struct { + /// The struct layout of `VkPipelineExecutableInternalRepresentationKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("name"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("description"), + ValueLayout.JAVA_INT.withName("isText"), + ValueLayout.JAVA_LONG.withName("dataSize"), + ValueLayout.ADDRESS.withName("pData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `name` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_name = LAYOUT.byteOffsetHandle(PathElement.groupElement("name"), PathElement.sequenceElement()); + /// The memory layout of `name`. + public static final MemoryLayout ML_name = LAYOUT.select(PathElement.groupElement("name")); + /// The byte offset handle of `description` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_description = LAYOUT.byteOffsetHandle(PathElement.groupElement("description"), PathElement.sequenceElement()); + /// The memory layout of `description`. + public static final MemoryLayout ML_description = LAYOUT.select(PathElement.groupElement("description")); + /// The [VarHandle] of `isText` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_isText = LAYOUT.arrayElementVarHandle(PathElement.groupElement("isText")); + /// The [VarHandle] of `dataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dataSize")); + /// The [VarHandle] of `pData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pData")); + + /// Creates `VkPipelineExecutableInternalRepresentationKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineExecutableInternalRepresentationKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineExecutableInternalRepresentationKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableInternalRepresentationKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableInternalRepresentationKHR(segment); } + + /// Creates `VkPipelineExecutableInternalRepresentationKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableInternalRepresentationKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableInternalRepresentationKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineExecutableInternalRepresentationKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableInternalRepresentationKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableInternalRepresentationKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineExecutableInternalRepresentationKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineExecutableInternalRepresentationKHR` + public static VkPipelineExecutableInternalRepresentationKHR alloc(SegmentAllocator allocator) { return new VkPipelineExecutableInternalRepresentationKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineExecutableInternalRepresentationKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineExecutableInternalRepresentationKHR` + public static VkPipelineExecutableInternalRepresentationKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineExecutableInternalRepresentationKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineExecutableInternalRepresentationKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineExecutableInternalRepresentationKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineExecutableInternalRepresentationKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineExecutableInternalRepresentationKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineExecutableInternalRepresentationKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR sType(@CType("VkStructureType") int value) { VkPipelineExecutableInternalRepresentationKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineExecutableInternalRepresentationKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineExecutableInternalRepresentationKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineExecutableInternalRepresentationKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_name.invokeExact(0L, elementIndex), index), ML_name); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `name`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long elementIndex) { return VkPipelineExecutableInternalRepresentationKHR.get_name(segment, 0L, elementIndex); } + /// {@return `name` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment nameAt(long index, long elementIndex) { return VkPipelineExecutableInternalRepresentationKHR.get_name(this.segment(), index, elementIndex); } + /// {@return `name`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment name(long elementIndex) { return VkPipelineExecutableInternalRepresentationKHR.get_name(this.segment(), elementIndex); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_name(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_name.invokeExact(0L, elementIndex), index), ML_name.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_name(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_name(segment, 0L, elementIndex, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR nameAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_name(this.segment(), index, elementIndex, value); return this; } + /// Sets `name` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR name(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_name(this.segment(), elementIndex, value); return this; } + + /// {@return `description` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `description`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long elementIndex) { return VkPipelineExecutableInternalRepresentationKHR.get_description(segment, 0L, elementIndex); } + /// {@return `description` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment descriptionAt(long index, long elementIndex) { return VkPipelineExecutableInternalRepresentationKHR.get_description(this.segment(), index, elementIndex); } + /// {@return `description`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment description(long elementIndex) { return VkPipelineExecutableInternalRepresentationKHR.get_description(this.segment(), elementIndex); } + /// Sets `description` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `description` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_description(segment, 0L, elementIndex, value); } + /// Sets `description` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR descriptionAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_description(this.segment(), index, elementIndex, value); return this; } + /// Sets `description` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR description(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_description(this.segment(), elementIndex, value); return this; } + + /// {@return `isText` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_isText(MemorySegment segment, long index) { return (int) VH_isText.get(segment, 0L, index); } + /// {@return `isText`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_isText(MemorySegment segment) { return VkPipelineExecutableInternalRepresentationKHR.get_isText(segment, 0L); } + /// {@return `isText` at the given index} + /// @param index the index + public @CType("VkBool32") int isTextAt(long index) { return VkPipelineExecutableInternalRepresentationKHR.get_isText(this.segment(), index); } + /// {@return `isText`} + public @CType("VkBool32") int isText() { return VkPipelineExecutableInternalRepresentationKHR.get_isText(this.segment()); } + /// Sets `isText` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_isText(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_isText.set(segment, 0L, index, value); } + /// Sets `isText` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_isText(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineExecutableInternalRepresentationKHR.set_isText(segment, 0L, value); } + /// Sets `isText` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR isTextAt(long index, @CType("VkBool32") int value) { VkPipelineExecutableInternalRepresentationKHR.set_isText(this.segment(), index, value); return this; } + /// Sets `isText` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR isText(@CType("VkBool32") int value) { VkPipelineExecutableInternalRepresentationKHR.set_isText(this.segment(), value); return this; } + + /// {@return `dataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_dataSize(MemorySegment segment, long index) { return (long) VH_dataSize.get(segment, 0L, index); } + /// {@return `dataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_dataSize(MemorySegment segment) { return VkPipelineExecutableInternalRepresentationKHR.get_dataSize(segment, 0L); } + /// {@return `dataSize` at the given index} + /// @param index the index + public @CType("size_t") long dataSizeAt(long index) { return VkPipelineExecutableInternalRepresentationKHR.get_dataSize(this.segment(), index); } + /// {@return `dataSize`} + public @CType("size_t") long dataSize() { return VkPipelineExecutableInternalRepresentationKHR.get_dataSize(this.segment()); } + /// Sets `dataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_dataSize.set(segment, 0L, index, value); } + /// Sets `dataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dataSize(MemorySegment segment, @CType("size_t") long value) { VkPipelineExecutableInternalRepresentationKHR.set_dataSize(segment, 0L, value); } + /// Sets `dataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR dataSizeAt(long index, @CType("size_t") long value) { VkPipelineExecutableInternalRepresentationKHR.set_dataSize(this.segment(), index, value); return this; } + /// Sets `dataSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR dataSize(@CType("size_t") long value) { VkPipelineExecutableInternalRepresentationKHR.set_dataSize(this.segment(), value); return this; } + + /// {@return `pData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pData.get(segment, 0L, index); } + /// {@return `pData`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment) { return VkPipelineExecutableInternalRepresentationKHR.get_pData(segment, 0L); } + /// {@return `pData` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pDataAt(long index) { return VkPipelineExecutableInternalRepresentationKHR.get_pData(this.segment(), index); } + /// {@return `pData`} + public @CType("void *") java.lang.foreign.MemorySegment pData() { return VkPipelineExecutableInternalRepresentationKHR.get_pData(this.segment()); } + /// Sets `pData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pData(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pData.set(segment, 0L, index, value); } + /// Sets `pData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pData(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_pData(segment, 0L, value); } + /// Sets `pData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR pDataAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_pData(this.segment(), index, value); return this; } + /// Sets `pData` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableInternalRepresentationKHR pData(@CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableInternalRepresentationKHR.set_pData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutablePropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutablePropertiesKHR.java new file mode 100644 index 00000000..950a1fea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutablePropertiesKHR.java @@ -0,0 +1,330 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stages +/// [VarHandle][#VH_stages] - [Getter][#stages()] - [Setter][#stages(int)] +/// ### name +/// [Byte offset handle][#MH_name] - [Memory layout][#ML_name] - [Getter][#name(long)] - [Setter][#name(long, java.lang.foreign.MemorySegment)] +/// ### description +/// [Byte offset handle][#MH_description] - [Memory layout][#ML_description] - [Getter][#description(long)] - [Setter][#description(long, java.lang.foreign.MemorySegment)] +/// ### subgroupSize +/// [VarHandle][#VH_subgroupSize] - [Getter][#subgroupSize()] - [Setter][#subgroupSize(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineExecutablePropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkShaderStageFlags stages; +/// char[VK_MAX_DESCRIPTION_SIZE] name; +/// char[VK_MAX_DESCRIPTION_SIZE] description; +/// uint32_t subgroupSize; +/// } VkPipelineExecutablePropertiesKHR; +/// ``` +public final class VkPipelineExecutablePropertiesKHR extends Struct { + /// The struct layout of `VkPipelineExecutablePropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stages"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("name"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("description"), + ValueLayout.JAVA_INT.withName("subgroupSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stages")); + /// The byte offset handle of `name` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_name = LAYOUT.byteOffsetHandle(PathElement.groupElement("name"), PathElement.sequenceElement()); + /// The memory layout of `name`. + public static final MemoryLayout ML_name = LAYOUT.select(PathElement.groupElement("name")); + /// The byte offset handle of `description` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_description = LAYOUT.byteOffsetHandle(PathElement.groupElement("description"), PathElement.sequenceElement()); + /// The memory layout of `description`. + public static final MemoryLayout ML_description = LAYOUT.select(PathElement.groupElement("description")); + /// The [VarHandle] of `subgroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subgroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subgroupSize")); + + /// Creates `VkPipelineExecutablePropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineExecutablePropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineExecutablePropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutablePropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutablePropertiesKHR(segment); } + + /// Creates `VkPipelineExecutablePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutablePropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutablePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineExecutablePropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutablePropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutablePropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineExecutablePropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineExecutablePropertiesKHR` + public static VkPipelineExecutablePropertiesKHR alloc(SegmentAllocator allocator) { return new VkPipelineExecutablePropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineExecutablePropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineExecutablePropertiesKHR` + public static VkPipelineExecutablePropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineExecutablePropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineExecutablePropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineExecutablePropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineExecutablePropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineExecutablePropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineExecutablePropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR sType(@CType("VkStructureType") int value) { VkPipelineExecutablePropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineExecutablePropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineExecutablePropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineExecutablePropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutablePropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutablePropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutablePropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_stages(MemorySegment segment, long index) { return (int) VH_stages.get(segment, 0L, index); } + /// {@return `stages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_stages(MemorySegment segment) { return VkPipelineExecutablePropertiesKHR.get_stages(segment, 0L); } + /// {@return `stages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int stagesAt(long index) { return VkPipelineExecutablePropertiesKHR.get_stages(this.segment(), index); } + /// {@return `stages`} + public @CType("VkShaderStageFlags") int stages() { return VkPipelineExecutablePropertiesKHR.get_stages(this.segment()); } + /// Sets `stages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_stages.set(segment, 0L, index, value); } + /// Sets `stages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPipelineExecutablePropertiesKHR.set_stages(segment, 0L, value); } + /// Sets `stages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR stagesAt(long index, @CType("VkShaderStageFlags") int value) { VkPipelineExecutablePropertiesKHR.set_stages(this.segment(), index, value); return this; } + /// Sets `stages` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR stages(@CType("VkShaderStageFlags") int value) { VkPipelineExecutablePropertiesKHR.set_stages(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_name.invokeExact(0L, elementIndex), index), ML_name); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `name`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long elementIndex) { return VkPipelineExecutablePropertiesKHR.get_name(segment, 0L, elementIndex); } + /// {@return `name` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment nameAt(long index, long elementIndex) { return VkPipelineExecutablePropertiesKHR.get_name(this.segment(), index, elementIndex); } + /// {@return `name`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment name(long elementIndex) { return VkPipelineExecutablePropertiesKHR.get_name(this.segment(), elementIndex); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_name(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_name.invokeExact(0L, elementIndex), index), ML_name.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_name(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutablePropertiesKHR.set_name(segment, 0L, elementIndex, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR nameAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutablePropertiesKHR.set_name(this.segment(), index, elementIndex, value); return this; } + /// Sets `name` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR name(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutablePropertiesKHR.set_name(this.segment(), elementIndex, value); return this; } + + /// {@return `description` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `description`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long elementIndex) { return VkPipelineExecutablePropertiesKHR.get_description(segment, 0L, elementIndex); } + /// {@return `description` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment descriptionAt(long index, long elementIndex) { return VkPipelineExecutablePropertiesKHR.get_description(this.segment(), index, elementIndex); } + /// {@return `description`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment description(long elementIndex) { return VkPipelineExecutablePropertiesKHR.get_description(this.segment(), elementIndex); } + /// Sets `description` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `description` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutablePropertiesKHR.set_description(segment, 0L, elementIndex, value); } + /// Sets `description` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR descriptionAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutablePropertiesKHR.set_description(this.segment(), index, elementIndex, value); return this; } + /// Sets `description` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR description(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutablePropertiesKHR.set_description(this.segment(), elementIndex, value); return this; } + + /// {@return `subgroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subgroupSize(MemorySegment segment, long index) { return (int) VH_subgroupSize.get(segment, 0L, index); } + /// {@return `subgroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subgroupSize(MemorySegment segment) { return VkPipelineExecutablePropertiesKHR.get_subgroupSize(segment, 0L); } + /// {@return `subgroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int subgroupSizeAt(long index) { return VkPipelineExecutablePropertiesKHR.get_subgroupSize(this.segment(), index); } + /// {@return `subgroupSize`} + public @CType("uint32_t") int subgroupSize() { return VkPipelineExecutablePropertiesKHR.get_subgroupSize(this.segment()); } + /// Sets `subgroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subgroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subgroupSize.set(segment, 0L, index, value); } + /// Sets `subgroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subgroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineExecutablePropertiesKHR.set_subgroupSize(segment, 0L, value); } + /// Sets `subgroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR subgroupSizeAt(long index, @CType("uint32_t") int value) { VkPipelineExecutablePropertiesKHR.set_subgroupSize(this.segment(), index, value); return this; } + /// Sets `subgroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutablePropertiesKHR subgroupSize(@CType("uint32_t") int value) { VkPipelineExecutablePropertiesKHR.set_subgroupSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutableStatisticKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutableStatisticKHR.java new file mode 100644 index 00000000..ad53a5f1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineExecutableStatisticKHR.java @@ -0,0 +1,332 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### name +/// [Byte offset handle][#MH_name] - [Memory layout][#ML_name] - [Getter][#name(long)] - [Setter][#name(long, java.lang.foreign.MemorySegment)] +/// ### description +/// [Byte offset handle][#MH_description] - [Memory layout][#ML_description] - [Getter][#description(long)] - [Setter][#description(long, java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### value +/// [Byte offset][#OFFSET_value] - [Memory layout][#ML_value] - [Getter][#value()] - [Setter][#value(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineExecutableStatisticKHR { +/// VkStructureType sType; +/// void * pNext; +/// char[VK_MAX_DESCRIPTION_SIZE] name; +/// char[VK_MAX_DESCRIPTION_SIZE] description; +/// VkPipelineExecutableStatisticFormatKHR format; +/// VkPipelineExecutableStatisticValueKHR value; +/// } VkPipelineExecutableStatisticKHR; +/// ``` +public final class VkPipelineExecutableStatisticKHR extends Struct { + /// The struct layout of `VkPipelineExecutableStatisticKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("name"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("description"), + ValueLayout.JAVA_INT.withName("format"), + overrungl.vulkan.khr.union.VkPipelineExecutableStatisticValueKHR.LAYOUT.withName("value") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `name` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_name = LAYOUT.byteOffsetHandle(PathElement.groupElement("name"), PathElement.sequenceElement()); + /// The memory layout of `name`. + public static final MemoryLayout ML_name = LAYOUT.select(PathElement.groupElement("name")); + /// The byte offset handle of `description` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_description = LAYOUT.byteOffsetHandle(PathElement.groupElement("description"), PathElement.sequenceElement()); + /// The memory layout of `description`. + public static final MemoryLayout ML_description = LAYOUT.select(PathElement.groupElement("description")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The byte offset of `value`. + public static final long OFFSET_value = LAYOUT.byteOffset(PathElement.groupElement("value")); + /// The memory layout of `value`. + public static final MemoryLayout ML_value = LAYOUT.select(PathElement.groupElement("value")); + + /// Creates `VkPipelineExecutableStatisticKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineExecutableStatisticKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineExecutableStatisticKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableStatisticKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableStatisticKHR(segment); } + + /// Creates `VkPipelineExecutableStatisticKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableStatisticKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableStatisticKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineExecutableStatisticKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableStatisticKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableStatisticKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineExecutableStatisticKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineExecutableStatisticKHR` + public static VkPipelineExecutableStatisticKHR alloc(SegmentAllocator allocator) { return new VkPipelineExecutableStatisticKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineExecutableStatisticKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineExecutableStatisticKHR` + public static VkPipelineExecutableStatisticKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineExecutableStatisticKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineExecutableStatisticKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineExecutableStatisticKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineExecutableStatisticKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineExecutableStatisticKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineExecutableStatisticKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR sType(@CType("VkStructureType") int value) { VkPipelineExecutableStatisticKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineExecutableStatisticKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineExecutableStatisticKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineExecutableStatisticKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_name.invokeExact(0L, elementIndex), index), ML_name); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `name`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long elementIndex) { return VkPipelineExecutableStatisticKHR.get_name(segment, 0L, elementIndex); } + /// {@return `name` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment nameAt(long index, long elementIndex) { return VkPipelineExecutableStatisticKHR.get_name(this.segment(), index, elementIndex); } + /// {@return `name`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment name(long elementIndex) { return VkPipelineExecutableStatisticKHR.get_name(this.segment(), elementIndex); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_name(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_name.invokeExact(0L, elementIndex), index), ML_name.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_name(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_name(segment, 0L, elementIndex, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR nameAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_name(this.segment(), index, elementIndex, value); return this; } + /// Sets `name` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR name(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_name(this.segment(), elementIndex, value); return this; } + + /// {@return `description` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `description`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long elementIndex) { return VkPipelineExecutableStatisticKHR.get_description(segment, 0L, elementIndex); } + /// {@return `description` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment descriptionAt(long index, long elementIndex) { return VkPipelineExecutableStatisticKHR.get_description(this.segment(), index, elementIndex); } + /// {@return `description`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment description(long elementIndex) { return VkPipelineExecutableStatisticKHR.get_description(this.segment(), elementIndex); } + /// Sets `description` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `description` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_description(segment, 0L, elementIndex, value); } + /// Sets `description` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR descriptionAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_description(this.segment(), index, elementIndex, value); return this; } + /// Sets `description` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR description(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_description(this.segment(), elementIndex, value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineExecutableStatisticFormatKHR") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkPipelineExecutableStatisticFormatKHR") int get_format(MemorySegment segment) { return VkPipelineExecutableStatisticKHR.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkPipelineExecutableStatisticFormatKHR") int formatAt(long index) { return VkPipelineExecutableStatisticKHR.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkPipelineExecutableStatisticFormatKHR") int format() { return VkPipelineExecutableStatisticKHR.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkPipelineExecutableStatisticFormatKHR") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkPipelineExecutableStatisticFormatKHR") int value) { VkPipelineExecutableStatisticKHR.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR formatAt(long index, @CType("VkPipelineExecutableStatisticFormatKHR") int value) { VkPipelineExecutableStatisticKHR.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR format(@CType("VkPipelineExecutableStatisticFormatKHR") int value) { VkPipelineExecutableStatisticKHR.set_format(this.segment(), value); return this; } + + /// {@return `value` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineExecutableStatisticValueKHR") java.lang.foreign.MemorySegment get_value(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_value, index), ML_value); } + /// {@return `value`} + /// @param segment the segment of the struct + public static @CType("VkPipelineExecutableStatisticValueKHR") java.lang.foreign.MemorySegment get_value(MemorySegment segment) { return VkPipelineExecutableStatisticKHR.get_value(segment, 0L); } + /// {@return `value` at the given index} + /// @param index the index + public @CType("VkPipelineExecutableStatisticValueKHR") java.lang.foreign.MemorySegment valueAt(long index) { return VkPipelineExecutableStatisticKHR.get_value(this.segment(), index); } + /// {@return `value`} + public @CType("VkPipelineExecutableStatisticValueKHR") java.lang.foreign.MemorySegment value() { return VkPipelineExecutableStatisticKHR.get_value(this.segment()); } + /// Sets `value` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_value(MemorySegment segment, long index, @CType("VkPipelineExecutableStatisticValueKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_value, index), ML_value.byteSize()); } + /// Sets `value` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_value(MemorySegment segment, @CType("VkPipelineExecutableStatisticValueKHR") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_value(segment, 0L, value); } + /// Sets `value` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR valueAt(long index, @CType("VkPipelineExecutableStatisticValueKHR") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_value(this.segment(), index, value); return this; } + /// Sets `value` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticKHR value(@CType("VkPipelineExecutableStatisticValueKHR") java.lang.foreign.MemorySegment value) { VkPipelineExecutableStatisticKHR.set_value(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineFragmentShadingRateStateCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineFragmentShadingRateStateCreateInfoKHR.java new file mode 100644 index 00000000..c8b7ba0c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineFragmentShadingRateStateCreateInfoKHR.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fragmentSize +/// [Byte offset][#OFFSET_fragmentSize] - [Memory layout][#ML_fragmentSize] - [Getter][#fragmentSize()] - [Setter][#fragmentSize(java.lang.foreign.MemorySegment)] +/// ### combinerOps +/// [VarHandle][#VH_combinerOps] - [Getter][#combinerOps()] - [Setter][#combinerOps(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineFragmentShadingRateStateCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkExtent2D fragmentSize; +/// VkFragmentShadingRateCombinerOpKHR combinerOps; +/// } VkPipelineFragmentShadingRateStateCreateInfoKHR; +/// ``` +public final class VkPipelineFragmentShadingRateStateCreateInfoKHR extends Struct { + /// The struct layout of `VkPipelineFragmentShadingRateStateCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("fragmentSize"), + ValueLayout.JAVA_INT.withName("combinerOps") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `fragmentSize`. + public static final long OFFSET_fragmentSize = LAYOUT.byteOffset(PathElement.groupElement("fragmentSize")); + /// The memory layout of `fragmentSize`. + public static final MemoryLayout ML_fragmentSize = LAYOUT.select(PathElement.groupElement("fragmentSize")); + /// The [VarHandle] of `combinerOps` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_combinerOps = LAYOUT.arrayElementVarHandle(PathElement.groupElement("combinerOps")); + + /// Creates `VkPipelineFragmentShadingRateStateCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineFragmentShadingRateStateCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineFragmentShadingRateStateCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineFragmentShadingRateStateCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineFragmentShadingRateStateCreateInfoKHR(segment); } + + /// Creates `VkPipelineFragmentShadingRateStateCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineFragmentShadingRateStateCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineFragmentShadingRateStateCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineFragmentShadingRateStateCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineFragmentShadingRateStateCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineFragmentShadingRateStateCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineFragmentShadingRateStateCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineFragmentShadingRateStateCreateInfoKHR` + public static VkPipelineFragmentShadingRateStateCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkPipelineFragmentShadingRateStateCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineFragmentShadingRateStateCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineFragmentShadingRateStateCreateInfoKHR` + public static VkPipelineFragmentShadingRateStateCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineFragmentShadingRateStateCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateStateCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateStateCreateInfoKHR sType(@CType("VkStructureType") int value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateStateCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateStateCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `fragmentSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_fragmentSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_fragmentSize, index), ML_fragmentSize); } + /// {@return `fragmentSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_fragmentSize(MemorySegment segment) { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_fragmentSize(segment, 0L); } + /// {@return `fragmentSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment fragmentSizeAt(long index) { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_fragmentSize(this.segment(), index); } + /// {@return `fragmentSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment fragmentSize() { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_fragmentSize(this.segment()); } + /// Sets `fragmentSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_fragmentSize, index), ML_fragmentSize.byteSize()); } + /// Sets `fragmentSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_fragmentSize(segment, 0L, value); } + /// Sets `fragmentSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateStateCreateInfoKHR fragmentSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_fragmentSize(this.segment(), index, value); return this; } + /// Sets `fragmentSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateStateCreateInfoKHR fragmentSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_fragmentSize(this.segment(), value); return this; } + + /// {@return `combinerOps` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFragmentShadingRateCombinerOpKHR") int get_combinerOps(MemorySegment segment, long index) { return (int) VH_combinerOps.get(segment, 0L, index); } + /// {@return `combinerOps`} + /// @param segment the segment of the struct + public static @CType("VkFragmentShadingRateCombinerOpKHR") int get_combinerOps(MemorySegment segment) { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_combinerOps(segment, 0L); } + /// {@return `combinerOps` at the given index} + /// @param index the index + public @CType("VkFragmentShadingRateCombinerOpKHR") int combinerOpsAt(long index) { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_combinerOps(this.segment(), index); } + /// {@return `combinerOps`} + public @CType("VkFragmentShadingRateCombinerOpKHR") int combinerOps() { return VkPipelineFragmentShadingRateStateCreateInfoKHR.get_combinerOps(this.segment()); } + /// Sets `combinerOps` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_combinerOps(MemorySegment segment, long index, @CType("VkFragmentShadingRateCombinerOpKHR") int value) { VH_combinerOps.set(segment, 0L, index, value); } + /// Sets `combinerOps` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_combinerOps(MemorySegment segment, @CType("VkFragmentShadingRateCombinerOpKHR") int value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_combinerOps(segment, 0L, value); } + /// Sets `combinerOps` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateStateCreateInfoKHR combinerOpsAt(long index, @CType("VkFragmentShadingRateCombinerOpKHR") int value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_combinerOps(this.segment(), index, value); return this; } + /// Sets `combinerOps` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateStateCreateInfoKHR combinerOps(@CType("VkFragmentShadingRateCombinerOpKHR") int value) { VkPipelineFragmentShadingRateStateCreateInfoKHR.set_combinerOps(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineInfoKHR.java new file mode 100644 index 00000000..6c0bf701 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipeline +/// [VarHandle][#VH_pipeline] - [Getter][#pipeline()] - [Setter][#pipeline(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipeline pipeline; +/// } VkPipelineInfoKHR; +/// ``` +public final class VkPipelineInfoKHR extends Struct { + /// The struct layout of `VkPipelineInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pipeline") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipeline` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipeline")); + + /// Creates `VkPipelineInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineInfoKHR(segment); } + + /// Creates `VkPipelineInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineInfoKHR` + public static VkPipelineInfoKHR alloc(SegmentAllocator allocator) { return new VkPipelineInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineInfoKHR` + public static VkPipelineInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineInfoKHR sType(@CType("VkStructureType") int value) { VkPipelineInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipeline.get(segment, 0L, index); } + /// {@return `pipeline`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment) { return VkPipelineInfoKHR.get_pipeline(segment, 0L); } + /// {@return `pipeline` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipelineAt(long index) { return VkPipelineInfoKHR.get_pipeline(this.segment(), index); } + /// {@return `pipeline`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipeline() { return VkPipelineInfoKHR.get_pipeline(this.segment()); } + /// Sets `pipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipeline(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_pipeline.set(segment, 0L, index, value); } + /// Sets `pipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipeline(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineInfoKHR.set_pipeline(segment, 0L, value); } + /// Sets `pipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineInfoKHR pipelineAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineInfoKHR.set_pipeline(this.segment(), index, value); return this; } + /// Sets `pipeline` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineInfoKHR pipeline(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineInfoKHR.set_pipeline(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineLibraryCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineLibraryCreateInfoKHR.java new file mode 100644 index 00000000..4c4f0eb3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPipelineLibraryCreateInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### libraryCount +/// [VarHandle][#VH_libraryCount] - [Getter][#libraryCount()] - [Setter][#libraryCount(int)] +/// ### pLibraries +/// [VarHandle][#VH_pLibraries] - [Getter][#pLibraries()] - [Setter][#pLibraries(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineLibraryCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t libraryCount; +/// const VkPipeline * pLibraries; +/// } VkPipelineLibraryCreateInfoKHR; +/// ``` +public final class VkPipelineLibraryCreateInfoKHR extends Struct { + /// The struct layout of `VkPipelineLibraryCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("libraryCount"), + ValueLayout.ADDRESS.withName("pLibraries") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `libraryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_libraryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("libraryCount")); + /// The [VarHandle] of `pLibraries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLibraries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLibraries")); + + /// Creates `VkPipelineLibraryCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineLibraryCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineLibraryCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineLibraryCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineLibraryCreateInfoKHR(segment); } + + /// Creates `VkPipelineLibraryCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineLibraryCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineLibraryCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineLibraryCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineLibraryCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineLibraryCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineLibraryCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineLibraryCreateInfoKHR` + public static VkPipelineLibraryCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkPipelineLibraryCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineLibraryCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineLibraryCreateInfoKHR` + public static VkPipelineLibraryCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineLibraryCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineLibraryCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineLibraryCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineLibraryCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineLibraryCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLibraryCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineLibraryCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLibraryCreateInfoKHR sType(@CType("VkStructureType") int value) { VkPipelineLibraryCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineLibraryCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineLibraryCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineLibraryCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineLibraryCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLibraryCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineLibraryCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLibraryCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineLibraryCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `libraryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_libraryCount(MemorySegment segment, long index) { return (int) VH_libraryCount.get(segment, 0L, index); } + /// {@return `libraryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_libraryCount(MemorySegment segment) { return VkPipelineLibraryCreateInfoKHR.get_libraryCount(segment, 0L); } + /// {@return `libraryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int libraryCountAt(long index) { return VkPipelineLibraryCreateInfoKHR.get_libraryCount(this.segment(), index); } + /// {@return `libraryCount`} + public @CType("uint32_t") int libraryCount() { return VkPipelineLibraryCreateInfoKHR.get_libraryCount(this.segment()); } + /// Sets `libraryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_libraryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_libraryCount.set(segment, 0L, index, value); } + /// Sets `libraryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_libraryCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineLibraryCreateInfoKHR.set_libraryCount(segment, 0L, value); } + /// Sets `libraryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLibraryCreateInfoKHR libraryCountAt(long index, @CType("uint32_t") int value) { VkPipelineLibraryCreateInfoKHR.set_libraryCount(this.segment(), index, value); return this; } + /// Sets `libraryCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLibraryCreateInfoKHR libraryCount(@CType("uint32_t") int value) { VkPipelineLibraryCreateInfoKHR.set_libraryCount(this.segment(), value); return this; } + + /// {@return `pLibraries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipeline *") java.lang.foreign.MemorySegment get_pLibraries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLibraries.get(segment, 0L, index); } + /// {@return `pLibraries`} + /// @param segment the segment of the struct + public static @CType("const VkPipeline *") java.lang.foreign.MemorySegment get_pLibraries(MemorySegment segment) { return VkPipelineLibraryCreateInfoKHR.get_pLibraries(segment, 0L); } + /// {@return `pLibraries` at the given index} + /// @param index the index + public @CType("const VkPipeline *") java.lang.foreign.MemorySegment pLibrariesAt(long index) { return VkPipelineLibraryCreateInfoKHR.get_pLibraries(this.segment(), index); } + /// {@return `pLibraries`} + public @CType("const VkPipeline *") java.lang.foreign.MemorySegment pLibraries() { return VkPipelineLibraryCreateInfoKHR.get_pLibraries(this.segment()); } + /// Sets `pLibraries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLibraries(MemorySegment segment, long index, @CType("const VkPipeline *") java.lang.foreign.MemorySegment value) { VH_pLibraries.set(segment, 0L, index, value); } + /// Sets `pLibraries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLibraries(MemorySegment segment, @CType("const VkPipeline *") java.lang.foreign.MemorySegment value) { VkPipelineLibraryCreateInfoKHR.set_pLibraries(segment, 0L, value); } + /// Sets `pLibraries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLibraryCreateInfoKHR pLibrariesAt(long index, @CType("const VkPipeline *") java.lang.foreign.MemorySegment value) { VkPipelineLibraryCreateInfoKHR.set_pLibraries(this.segment(), index, value); return this; } + /// Sets `pLibraries` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLibraryCreateInfoKHR pLibraries(@CType("const VkPipeline *") java.lang.foreign.MemorySegment value) { VkPipelineLibraryCreateInfoKHR.set_pLibraries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentIdKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentIdKHR.java new file mode 100644 index 00000000..2ab49745 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentIdKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchainCount +/// [VarHandle][#VH_swapchainCount] - [Getter][#swapchainCount()] - [Setter][#swapchainCount(int)] +/// ### pPresentIds +/// [VarHandle][#VH_pPresentIds] - [Getter][#pPresentIds()] - [Setter][#pPresentIds(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPresentIdKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t swapchainCount; +/// const uint64_t * pPresentIds; +/// } VkPresentIdKHR; +/// ``` +public final class VkPresentIdKHR extends Struct { + /// The struct layout of `VkPresentIdKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("swapchainCount"), + ValueLayout.ADDRESS.withName("pPresentIds") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchainCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_swapchainCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchainCount")); + /// The [VarHandle] of `pPresentIds` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPresentIds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPresentIds")); + + /// Creates `VkPresentIdKHR` with the given segment. + /// @param segment the memory segment + public VkPresentIdKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPresentIdKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentIdKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentIdKHR(segment); } + + /// Creates `VkPresentIdKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentIdKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentIdKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPresentIdKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentIdKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentIdKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPresentIdKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPresentIdKHR` + public static VkPresentIdKHR alloc(SegmentAllocator allocator) { return new VkPresentIdKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPresentIdKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPresentIdKHR` + public static VkPresentIdKHR alloc(SegmentAllocator allocator, long count) { return new VkPresentIdKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPresentIdKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPresentIdKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPresentIdKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPresentIdKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentIdKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPresentIdKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPresentIdKHR sType(@CType("VkStructureType") int value) { VkPresentIdKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPresentIdKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPresentIdKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPresentIdKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentIdKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentIdKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentIdKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPresentIdKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentIdKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchainCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment, long index) { return (int) VH_swapchainCount.get(segment, 0L, index); } + /// {@return `swapchainCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment) { return VkPresentIdKHR.get_swapchainCount(segment, 0L); } + /// {@return `swapchainCount` at the given index} + /// @param index the index + public @CType("uint32_t") int swapchainCountAt(long index) { return VkPresentIdKHR.get_swapchainCount(this.segment(), index); } + /// {@return `swapchainCount`} + public @CType("uint32_t") int swapchainCount() { return VkPresentIdKHR.get_swapchainCount(this.segment()); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_swapchainCount.set(segment, 0L, index, value); } + /// Sets `swapchainCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, @CType("uint32_t") int value) { VkPresentIdKHR.set_swapchainCount(segment, 0L, value); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentIdKHR swapchainCountAt(long index, @CType("uint32_t") int value) { VkPresentIdKHR.set_swapchainCount(this.segment(), index, value); return this; } + /// Sets `swapchainCount` with the given value. + /// @param value the value + /// @return `this` + public VkPresentIdKHR swapchainCount(@CType("uint32_t") int value) { VkPresentIdKHR.set_swapchainCount(this.segment(), value); return this; } + + /// {@return `pPresentIds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pPresentIds(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPresentIds.get(segment, 0L, index); } + /// {@return `pPresentIds`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pPresentIds(MemorySegment segment) { return VkPresentIdKHR.get_pPresentIds(segment, 0L); } + /// {@return `pPresentIds` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pPresentIdsAt(long index) { return VkPresentIdKHR.get_pPresentIds(this.segment(), index); } + /// {@return `pPresentIds`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pPresentIds() { return VkPresentIdKHR.get_pPresentIds(this.segment()); } + /// Sets `pPresentIds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPresentIds(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pPresentIds.set(segment, 0L, index, value); } + /// Sets `pPresentIds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPresentIds(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkPresentIdKHR.set_pPresentIds(segment, 0L, value); } + /// Sets `pPresentIds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentIdKHR pPresentIdsAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkPresentIdKHR.set_pPresentIds(this.segment(), index, value); return this; } + /// Sets `pPresentIds` with the given value. + /// @param value the value + /// @return `this` + public VkPresentIdKHR pPresentIds(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkPresentIdKHR.set_pPresentIds(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentInfoKHR.java new file mode 100644 index 00000000..5f6bc231 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentInfoKHR.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### waitSemaphoreCount +/// [VarHandle][#VH_waitSemaphoreCount] - [Getter][#waitSemaphoreCount()] - [Setter][#waitSemaphoreCount(int)] +/// ### pWaitSemaphores +/// [VarHandle][#VH_pWaitSemaphores] - [Getter][#pWaitSemaphores()] - [Setter][#pWaitSemaphores(java.lang.foreign.MemorySegment)] +/// ### swapchainCount +/// [VarHandle][#VH_swapchainCount] - [Getter][#swapchainCount()] - [Setter][#swapchainCount(int)] +/// ### pSwapchains +/// [VarHandle][#VH_pSwapchains] - [Getter][#pSwapchains()] - [Setter][#pSwapchains(java.lang.foreign.MemorySegment)] +/// ### pImageIndices +/// [VarHandle][#VH_pImageIndices] - [Getter][#pImageIndices()] - [Setter][#pImageIndices(java.lang.foreign.MemorySegment)] +/// ### pResults +/// [VarHandle][#VH_pResults] - [Getter][#pResults()] - [Setter][#pResults(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPresentInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t waitSemaphoreCount; +/// const VkSemaphore * pWaitSemaphores; +/// uint32_t swapchainCount; +/// const VkSwapchainKHR * pSwapchains; +/// const uint32_t * pImageIndices; +/// VkResult * pResults; +/// } VkPresentInfoKHR; +/// ``` +public final class VkPresentInfoKHR extends Struct { + /// The struct layout of `VkPresentInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("waitSemaphoreCount"), + ValueLayout.ADDRESS.withName("pWaitSemaphores"), + ValueLayout.JAVA_INT.withName("swapchainCount"), + ValueLayout.ADDRESS.withName("pSwapchains"), + ValueLayout.ADDRESS.withName("pImageIndices"), + ValueLayout.ADDRESS.withName("pResults") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `waitSemaphoreCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_waitSemaphoreCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("waitSemaphoreCount")); + /// The [VarHandle] of `pWaitSemaphores` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWaitSemaphores = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWaitSemaphores")); + /// The [VarHandle] of `swapchainCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_swapchainCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchainCount")); + /// The [VarHandle] of `pSwapchains` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSwapchains = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSwapchains")); + /// The [VarHandle] of `pImageIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pImageIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pImageIndices")); + /// The [VarHandle] of `pResults` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pResults = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pResults")); + + /// Creates `VkPresentInfoKHR` with the given segment. + /// @param segment the memory segment + public VkPresentInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPresentInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentInfoKHR(segment); } + + /// Creates `VkPresentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPresentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPresentInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPresentInfoKHR` + public static VkPresentInfoKHR alloc(SegmentAllocator allocator) { return new VkPresentInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPresentInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPresentInfoKHR` + public static VkPresentInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkPresentInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPresentInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPresentInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPresentInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPresentInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPresentInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPresentInfoKHR sType(@CType("VkStructureType") int value) { VkPresentInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPresentInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPresentInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPresentInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPresentInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `waitSemaphoreCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_waitSemaphoreCount(MemorySegment segment, long index) { return (int) VH_waitSemaphoreCount.get(segment, 0L, index); } + /// {@return `waitSemaphoreCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_waitSemaphoreCount(MemorySegment segment) { return VkPresentInfoKHR.get_waitSemaphoreCount(segment, 0L); } + /// {@return `waitSemaphoreCount` at the given index} + /// @param index the index + public @CType("uint32_t") int waitSemaphoreCountAt(long index) { return VkPresentInfoKHR.get_waitSemaphoreCount(this.segment(), index); } + /// {@return `waitSemaphoreCount`} + public @CType("uint32_t") int waitSemaphoreCount() { return VkPresentInfoKHR.get_waitSemaphoreCount(this.segment()); } + /// Sets `waitSemaphoreCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_waitSemaphoreCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_waitSemaphoreCount.set(segment, 0L, index, value); } + /// Sets `waitSemaphoreCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_waitSemaphoreCount(MemorySegment segment, @CType("uint32_t") int value) { VkPresentInfoKHR.set_waitSemaphoreCount(segment, 0L, value); } + /// Sets `waitSemaphoreCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentInfoKHR waitSemaphoreCountAt(long index, @CType("uint32_t") int value) { VkPresentInfoKHR.set_waitSemaphoreCount(this.segment(), index, value); return this; } + /// Sets `waitSemaphoreCount` with the given value. + /// @param value the value + /// @return `this` + public VkPresentInfoKHR waitSemaphoreCount(@CType("uint32_t") int value) { VkPresentInfoKHR.set_waitSemaphoreCount(this.segment(), value); return this; } + + /// {@return `pWaitSemaphores` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pWaitSemaphores(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWaitSemaphores.get(segment, 0L, index); } + /// {@return `pWaitSemaphores`} + /// @param segment the segment of the struct + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pWaitSemaphores(MemorySegment segment) { return VkPresentInfoKHR.get_pWaitSemaphores(segment, 0L); } + /// {@return `pWaitSemaphores` at the given index} + /// @param index the index + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pWaitSemaphoresAt(long index) { return VkPresentInfoKHR.get_pWaitSemaphores(this.segment(), index); } + /// {@return `pWaitSemaphores`} + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pWaitSemaphores() { return VkPresentInfoKHR.get_pWaitSemaphores(this.segment()); } + /// Sets `pWaitSemaphores` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWaitSemaphores(MemorySegment segment, long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VH_pWaitSemaphores.set(segment, 0L, index, value); } + /// Sets `pWaitSemaphores` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWaitSemaphores(MemorySegment segment, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pWaitSemaphores(segment, 0L, value); } + /// Sets `pWaitSemaphores` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentInfoKHR pWaitSemaphoresAt(long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pWaitSemaphores(this.segment(), index, value); return this; } + /// Sets `pWaitSemaphores` with the given value. + /// @param value the value + /// @return `this` + public VkPresentInfoKHR pWaitSemaphores(@CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pWaitSemaphores(this.segment(), value); return this; } + + /// {@return `swapchainCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment, long index) { return (int) VH_swapchainCount.get(segment, 0L, index); } + /// {@return `swapchainCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment) { return VkPresentInfoKHR.get_swapchainCount(segment, 0L); } + /// {@return `swapchainCount` at the given index} + /// @param index the index + public @CType("uint32_t") int swapchainCountAt(long index) { return VkPresentInfoKHR.get_swapchainCount(this.segment(), index); } + /// {@return `swapchainCount`} + public @CType("uint32_t") int swapchainCount() { return VkPresentInfoKHR.get_swapchainCount(this.segment()); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_swapchainCount.set(segment, 0L, index, value); } + /// Sets `swapchainCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, @CType("uint32_t") int value) { VkPresentInfoKHR.set_swapchainCount(segment, 0L, value); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentInfoKHR swapchainCountAt(long index, @CType("uint32_t") int value) { VkPresentInfoKHR.set_swapchainCount(this.segment(), index, value); return this; } + /// Sets `swapchainCount` with the given value. + /// @param value the value + /// @return `this` + public VkPresentInfoKHR swapchainCount(@CType("uint32_t") int value) { VkPresentInfoKHR.set_swapchainCount(this.segment(), value); return this; } + + /// {@return `pSwapchains` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSwapchainKHR *") java.lang.foreign.MemorySegment get_pSwapchains(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSwapchains.get(segment, 0L, index); } + /// {@return `pSwapchains`} + /// @param segment the segment of the struct + public static @CType("const VkSwapchainKHR *") java.lang.foreign.MemorySegment get_pSwapchains(MemorySegment segment) { return VkPresentInfoKHR.get_pSwapchains(segment, 0L); } + /// {@return `pSwapchains` at the given index} + /// @param index the index + public @CType("const VkSwapchainKHR *") java.lang.foreign.MemorySegment pSwapchainsAt(long index) { return VkPresentInfoKHR.get_pSwapchains(this.segment(), index); } + /// {@return `pSwapchains`} + public @CType("const VkSwapchainKHR *") java.lang.foreign.MemorySegment pSwapchains() { return VkPresentInfoKHR.get_pSwapchains(this.segment()); } + /// Sets `pSwapchains` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSwapchains(MemorySegment segment, long index, @CType("const VkSwapchainKHR *") java.lang.foreign.MemorySegment value) { VH_pSwapchains.set(segment, 0L, index, value); } + /// Sets `pSwapchains` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSwapchains(MemorySegment segment, @CType("const VkSwapchainKHR *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pSwapchains(segment, 0L, value); } + /// Sets `pSwapchains` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentInfoKHR pSwapchainsAt(long index, @CType("const VkSwapchainKHR *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pSwapchains(this.segment(), index, value); return this; } + /// Sets `pSwapchains` with the given value. + /// @param value the value + /// @return `this` + public VkPresentInfoKHR pSwapchains(@CType("const VkSwapchainKHR *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pSwapchains(this.segment(), value); return this; } + + /// {@return `pImageIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pImageIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pImageIndices.get(segment, 0L, index); } + /// {@return `pImageIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pImageIndices(MemorySegment segment) { return VkPresentInfoKHR.get_pImageIndices(segment, 0L); } + /// {@return `pImageIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pImageIndicesAt(long index) { return VkPresentInfoKHR.get_pImageIndices(this.segment(), index); } + /// {@return `pImageIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pImageIndices() { return VkPresentInfoKHR.get_pImageIndices(this.segment()); } + /// Sets `pImageIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pImageIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pImageIndices.set(segment, 0L, index, value); } + /// Sets `pImageIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pImageIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pImageIndices(segment, 0L, value); } + /// Sets `pImageIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentInfoKHR pImageIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pImageIndices(this.segment(), index, value); return this; } + /// Sets `pImageIndices` with the given value. + /// @param value the value + /// @return `this` + public VkPresentInfoKHR pImageIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pImageIndices(this.segment(), value); return this; } + + /// {@return `pResults` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkResult *") java.lang.foreign.MemorySegment get_pResults(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pResults.get(segment, 0L, index); } + /// {@return `pResults`} + /// @param segment the segment of the struct + public static @CType("VkResult *") java.lang.foreign.MemorySegment get_pResults(MemorySegment segment) { return VkPresentInfoKHR.get_pResults(segment, 0L); } + /// {@return `pResults` at the given index} + /// @param index the index + public @CType("VkResult *") java.lang.foreign.MemorySegment pResultsAt(long index) { return VkPresentInfoKHR.get_pResults(this.segment(), index); } + /// {@return `pResults`} + public @CType("VkResult *") java.lang.foreign.MemorySegment pResults() { return VkPresentInfoKHR.get_pResults(this.segment()); } + /// Sets `pResults` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pResults(MemorySegment segment, long index, @CType("VkResult *") java.lang.foreign.MemorySegment value) { VH_pResults.set(segment, 0L, index, value); } + /// Sets `pResults` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pResults(MemorySegment segment, @CType("VkResult *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pResults(segment, 0L, value); } + /// Sets `pResults` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentInfoKHR pResultsAt(long index, @CType("VkResult *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pResults(this.segment(), index, value); return this; } + /// Sets `pResults` with the given value. + /// @param value the value + /// @return `this` + public VkPresentInfoKHR pResults(@CType("VkResult *") java.lang.foreign.MemorySegment value) { VkPresentInfoKHR.set_pResults(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentRegionKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentRegionKHR.java new file mode 100644 index 00000000..e3d1e8dc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentRegionKHR.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### rectangleCount +/// [VarHandle][#VH_rectangleCount] - [Getter][#rectangleCount()] - [Setter][#rectangleCount(int)] +/// ### pRectangles +/// [VarHandle][#VH_pRectangles] - [Getter][#pRectangles()] - [Setter][#pRectangles(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPresentRegionKHR { +/// uint32_t rectangleCount; +/// const VkRectLayerKHR * pRectangles; +/// } VkPresentRegionKHR; +/// ``` +public final class VkPresentRegionKHR extends Struct { + /// The struct layout of `VkPresentRegionKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("rectangleCount"), + ValueLayout.ADDRESS.withName("pRectangles") + ); + /// The [VarHandle] of `rectangleCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rectangleCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rectangleCount")); + /// The [VarHandle] of `pRectangles` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRectangles = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRectangles")); + + /// Creates `VkPresentRegionKHR` with the given segment. + /// @param segment the memory segment + public VkPresentRegionKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPresentRegionKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentRegionKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentRegionKHR(segment); } + + /// Creates `VkPresentRegionKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentRegionKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentRegionKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPresentRegionKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentRegionKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentRegionKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPresentRegionKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPresentRegionKHR` + public static VkPresentRegionKHR alloc(SegmentAllocator allocator) { return new VkPresentRegionKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPresentRegionKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPresentRegionKHR` + public static VkPresentRegionKHR alloc(SegmentAllocator allocator, long count) { return new VkPresentRegionKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `rectangleCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_rectangleCount(MemorySegment segment, long index) { return (int) VH_rectangleCount.get(segment, 0L, index); } + /// {@return `rectangleCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_rectangleCount(MemorySegment segment) { return VkPresentRegionKHR.get_rectangleCount(segment, 0L); } + /// {@return `rectangleCount` at the given index} + /// @param index the index + public @CType("uint32_t") int rectangleCountAt(long index) { return VkPresentRegionKHR.get_rectangleCount(this.segment(), index); } + /// {@return `rectangleCount`} + public @CType("uint32_t") int rectangleCount() { return VkPresentRegionKHR.get_rectangleCount(this.segment()); } + /// Sets `rectangleCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rectangleCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_rectangleCount.set(segment, 0L, index, value); } + /// Sets `rectangleCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rectangleCount(MemorySegment segment, @CType("uint32_t") int value) { VkPresentRegionKHR.set_rectangleCount(segment, 0L, value); } + /// Sets `rectangleCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentRegionKHR rectangleCountAt(long index, @CType("uint32_t") int value) { VkPresentRegionKHR.set_rectangleCount(this.segment(), index, value); return this; } + /// Sets `rectangleCount` with the given value. + /// @param value the value + /// @return `this` + public VkPresentRegionKHR rectangleCount(@CType("uint32_t") int value) { VkPresentRegionKHR.set_rectangleCount(this.segment(), value); return this; } + + /// {@return `pRectangles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRectLayerKHR *") java.lang.foreign.MemorySegment get_pRectangles(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRectangles.get(segment, 0L, index); } + /// {@return `pRectangles`} + /// @param segment the segment of the struct + public static @CType("const VkRectLayerKHR *") java.lang.foreign.MemorySegment get_pRectangles(MemorySegment segment) { return VkPresentRegionKHR.get_pRectangles(segment, 0L); } + /// {@return `pRectangles` at the given index} + /// @param index the index + public @CType("const VkRectLayerKHR *") java.lang.foreign.MemorySegment pRectanglesAt(long index) { return VkPresentRegionKHR.get_pRectangles(this.segment(), index); } + /// {@return `pRectangles`} + public @CType("const VkRectLayerKHR *") java.lang.foreign.MemorySegment pRectangles() { return VkPresentRegionKHR.get_pRectangles(this.segment()); } + /// Sets `pRectangles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRectangles(MemorySegment segment, long index, @CType("const VkRectLayerKHR *") java.lang.foreign.MemorySegment value) { VH_pRectangles.set(segment, 0L, index, value); } + /// Sets `pRectangles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRectangles(MemorySegment segment, @CType("const VkRectLayerKHR *") java.lang.foreign.MemorySegment value) { VkPresentRegionKHR.set_pRectangles(segment, 0L, value); } + /// Sets `pRectangles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentRegionKHR pRectanglesAt(long index, @CType("const VkRectLayerKHR *") java.lang.foreign.MemorySegment value) { VkPresentRegionKHR.set_pRectangles(this.segment(), index, value); return this; } + /// Sets `pRectangles` with the given value. + /// @param value the value + /// @return `this` + public VkPresentRegionKHR pRectangles(@CType("const VkRectLayerKHR *") java.lang.foreign.MemorySegment value) { VkPresentRegionKHR.set_pRectangles(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentRegionsKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentRegionsKHR.java new file mode 100644 index 00000000..fe3d7364 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkPresentRegionsKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### swapchainCount +/// [VarHandle][#VH_swapchainCount] - [Getter][#swapchainCount()] - [Setter][#swapchainCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPresentRegionsKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t swapchainCount; +/// const VkPresentRegionKHR * pRegions; +/// } VkPresentRegionsKHR; +/// ``` +public final class VkPresentRegionsKHR extends Struct { + /// The struct layout of `VkPresentRegionsKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("swapchainCount"), + ValueLayout.ADDRESS.withName("pRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `swapchainCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_swapchainCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchainCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + + /// Creates `VkPresentRegionsKHR` with the given segment. + /// @param segment the memory segment + public VkPresentRegionsKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPresentRegionsKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentRegionsKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentRegionsKHR(segment); } + + /// Creates `VkPresentRegionsKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentRegionsKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentRegionsKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPresentRegionsKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPresentRegionsKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPresentRegionsKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPresentRegionsKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPresentRegionsKHR` + public static VkPresentRegionsKHR alloc(SegmentAllocator allocator) { return new VkPresentRegionsKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPresentRegionsKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPresentRegionsKHR` + public static VkPresentRegionsKHR alloc(SegmentAllocator allocator, long count) { return new VkPresentRegionsKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPresentRegionsKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPresentRegionsKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPresentRegionsKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPresentRegionsKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentRegionsKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkPresentRegionsKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPresentRegionsKHR sType(@CType("VkStructureType") int value) { VkPresentRegionsKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPresentRegionsKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPresentRegionsKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPresentRegionsKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentRegionsKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentRegionsKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentRegionsKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPresentRegionsKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPresentRegionsKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `swapchainCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment, long index) { return (int) VH_swapchainCount.get(segment, 0L, index); } + /// {@return `swapchainCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_swapchainCount(MemorySegment segment) { return VkPresentRegionsKHR.get_swapchainCount(segment, 0L); } + /// {@return `swapchainCount` at the given index} + /// @param index the index + public @CType("uint32_t") int swapchainCountAt(long index) { return VkPresentRegionsKHR.get_swapchainCount(this.segment(), index); } + /// {@return `swapchainCount`} + public @CType("uint32_t") int swapchainCount() { return VkPresentRegionsKHR.get_swapchainCount(this.segment()); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_swapchainCount.set(segment, 0L, index, value); } + /// Sets `swapchainCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchainCount(MemorySegment segment, @CType("uint32_t") int value) { VkPresentRegionsKHR.set_swapchainCount(segment, 0L, value); } + /// Sets `swapchainCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentRegionsKHR swapchainCountAt(long index, @CType("uint32_t") int value) { VkPresentRegionsKHR.set_swapchainCount(this.segment(), index, value); return this; } + /// Sets `swapchainCount` with the given value. + /// @param value the value + /// @return `this` + public VkPresentRegionsKHR swapchainCount(@CType("uint32_t") int value) { VkPresentRegionsKHR.set_swapchainCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPresentRegionKHR *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkPresentRegionKHR *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkPresentRegionsKHR.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkPresentRegionKHR *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkPresentRegionsKHR.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkPresentRegionKHR *") java.lang.foreign.MemorySegment pRegions() { return VkPresentRegionsKHR.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkPresentRegionKHR *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkPresentRegionKHR *") java.lang.foreign.MemorySegment value) { VkPresentRegionsKHR.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPresentRegionsKHR pRegionsAt(long index, @CType("const VkPresentRegionKHR *") java.lang.foreign.MemorySegment value) { VkPresentRegionsKHR.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkPresentRegionsKHR pRegions(@CType("const VkPresentRegionKHR *") java.lang.foreign.MemorySegment value) { VkPresentRegionsKHR.set_pRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueryPoolPerformanceCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueryPoolPerformanceCreateInfoKHR.java new file mode 100644 index 00000000..1eaa45e1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueryPoolPerformanceCreateInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### queueFamilyIndex +/// [VarHandle][#VH_queueFamilyIndex] - [Getter][#queueFamilyIndex()] - [Setter][#queueFamilyIndex(int)] +/// ### counterIndexCount +/// [VarHandle][#VH_counterIndexCount] - [Getter][#counterIndexCount()] - [Setter][#counterIndexCount(int)] +/// ### pCounterIndices +/// [VarHandle][#VH_pCounterIndices] - [Getter][#pCounterIndices()] - [Setter][#pCounterIndices(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueryPoolPerformanceCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t queueFamilyIndex; +/// uint32_t counterIndexCount; +/// const uint32_t * pCounterIndices; +/// } VkQueryPoolPerformanceCreateInfoKHR; +/// ``` +public final class VkQueryPoolPerformanceCreateInfoKHR extends Struct { + /// The struct layout of `VkQueryPoolPerformanceCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("queueFamilyIndex"), + ValueLayout.JAVA_INT.withName("counterIndexCount"), + ValueLayout.ADDRESS.withName("pCounterIndices") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `queueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueFamilyIndex")); + /// The [VarHandle] of `counterIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_counterIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("counterIndexCount")); + /// The [VarHandle] of `pCounterIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCounterIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCounterIndices")); + + /// Creates `VkQueryPoolPerformanceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkQueryPoolPerformanceCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueryPoolPerformanceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolPerformanceCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolPerformanceCreateInfoKHR(segment); } + + /// Creates `VkQueryPoolPerformanceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolPerformanceCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolPerformanceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueryPoolPerformanceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolPerformanceCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolPerformanceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueryPoolPerformanceCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueryPoolPerformanceCreateInfoKHR` + public static VkQueryPoolPerformanceCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkQueryPoolPerformanceCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueryPoolPerformanceCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueryPoolPerformanceCreateInfoKHR` + public static VkQueryPoolPerformanceCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkQueryPoolPerformanceCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueryPoolPerformanceCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueryPoolPerformanceCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueryPoolPerformanceCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueryPoolPerformanceCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkQueryPoolPerformanceCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceCreateInfoKHR sType(@CType("VkStructureType") int value) { VkQueryPoolPerformanceCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueryPoolPerformanceCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueryPoolPerformanceCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkQueryPoolPerformanceCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolPerformanceCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolPerformanceCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolPerformanceCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `queueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueFamilyIndex(MemorySegment segment, long index) { return (int) VH_queueFamilyIndex.get(segment, 0L, index); } + /// {@return `queueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueFamilyIndex(MemorySegment segment) { return VkQueryPoolPerformanceCreateInfoKHR.get_queueFamilyIndex(segment, 0L); } + /// {@return `queueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int queueFamilyIndexAt(long index) { return VkQueryPoolPerformanceCreateInfoKHR.get_queueFamilyIndex(this.segment(), index); } + /// {@return `queueFamilyIndex`} + public @CType("uint32_t") int queueFamilyIndex() { return VkQueryPoolPerformanceCreateInfoKHR.get_queueFamilyIndex(this.segment()); } + /// Sets `queueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `queueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkQueryPoolPerformanceCreateInfoKHR.set_queueFamilyIndex(segment, 0L, value); } + /// Sets `queueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceCreateInfoKHR queueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkQueryPoolPerformanceCreateInfoKHR.set_queueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `queueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceCreateInfoKHR queueFamilyIndex(@CType("uint32_t") int value) { VkQueryPoolPerformanceCreateInfoKHR.set_queueFamilyIndex(this.segment(), value); return this; } + + /// {@return `counterIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_counterIndexCount(MemorySegment segment, long index) { return (int) VH_counterIndexCount.get(segment, 0L, index); } + /// {@return `counterIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_counterIndexCount(MemorySegment segment) { return VkQueryPoolPerformanceCreateInfoKHR.get_counterIndexCount(segment, 0L); } + /// {@return `counterIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int counterIndexCountAt(long index) { return VkQueryPoolPerformanceCreateInfoKHR.get_counterIndexCount(this.segment(), index); } + /// {@return `counterIndexCount`} + public @CType("uint32_t") int counterIndexCount() { return VkQueryPoolPerformanceCreateInfoKHR.get_counterIndexCount(this.segment()); } + /// Sets `counterIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_counterIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_counterIndexCount.set(segment, 0L, index, value); } + /// Sets `counterIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_counterIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkQueryPoolPerformanceCreateInfoKHR.set_counterIndexCount(segment, 0L, value); } + /// Sets `counterIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceCreateInfoKHR counterIndexCountAt(long index, @CType("uint32_t") int value) { VkQueryPoolPerformanceCreateInfoKHR.set_counterIndexCount(this.segment(), index, value); return this; } + /// Sets `counterIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceCreateInfoKHR counterIndexCount(@CType("uint32_t") int value) { VkQueryPoolPerformanceCreateInfoKHR.set_counterIndexCount(this.segment(), value); return this; } + + /// {@return `pCounterIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pCounterIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCounterIndices.get(segment, 0L, index); } + /// {@return `pCounterIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pCounterIndices(MemorySegment segment) { return VkQueryPoolPerformanceCreateInfoKHR.get_pCounterIndices(segment, 0L); } + /// {@return `pCounterIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pCounterIndicesAt(long index) { return VkQueryPoolPerformanceCreateInfoKHR.get_pCounterIndices(this.segment(), index); } + /// {@return `pCounterIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pCounterIndices() { return VkQueryPoolPerformanceCreateInfoKHR.get_pCounterIndices(this.segment()); } + /// Sets `pCounterIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCounterIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pCounterIndices.set(segment, 0L, index, value); } + /// Sets `pCounterIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCounterIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkQueryPoolPerformanceCreateInfoKHR.set_pCounterIndices(segment, 0L, value); } + /// Sets `pCounterIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceCreateInfoKHR pCounterIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkQueryPoolPerformanceCreateInfoKHR.set_pCounterIndices(this.segment(), index, value); return this; } + /// Sets `pCounterIndices` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolPerformanceCreateInfoKHR pCounterIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkQueryPoolPerformanceCreateInfoKHR.set_pCounterIndices(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.java new file mode 100644 index 00000000..b5a2012d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### encodeFeedbackFlags +/// [VarHandle][#VH_encodeFeedbackFlags] - [Getter][#encodeFeedbackFlags()] - [Setter][#encodeFeedbackFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoEncodeFeedbackFlagsKHR encodeFeedbackFlags; +/// } VkQueryPoolVideoEncodeFeedbackCreateInfoKHR; +/// ``` +public final class VkQueryPoolVideoEncodeFeedbackCreateInfoKHR extends Struct { + /// The struct layout of `VkQueryPoolVideoEncodeFeedbackCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("encodeFeedbackFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `encodeFeedbackFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_encodeFeedbackFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("encodeFeedbackFlags")); + + /// Creates `VkQueryPoolVideoEncodeFeedbackCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkQueryPoolVideoEncodeFeedbackCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueryPoolVideoEncodeFeedbackCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolVideoEncodeFeedbackCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolVideoEncodeFeedbackCreateInfoKHR(segment); } + + /// Creates `VkQueryPoolVideoEncodeFeedbackCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolVideoEncodeFeedbackCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolVideoEncodeFeedbackCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueryPoolVideoEncodeFeedbackCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolVideoEncodeFeedbackCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolVideoEncodeFeedbackCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueryPoolVideoEncodeFeedbackCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueryPoolVideoEncodeFeedbackCreateInfoKHR` + public static VkQueryPoolVideoEncodeFeedbackCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkQueryPoolVideoEncodeFeedbackCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueryPoolVideoEncodeFeedbackCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueryPoolVideoEncodeFeedbackCreateInfoKHR` + public static VkQueryPoolVideoEncodeFeedbackCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkQueryPoolVideoEncodeFeedbackCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolVideoEncodeFeedbackCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolVideoEncodeFeedbackCreateInfoKHR sType(@CType("VkStructureType") int value) { VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolVideoEncodeFeedbackCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolVideoEncodeFeedbackCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `encodeFeedbackFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeFeedbackFlagsKHR") int get_encodeFeedbackFlags(MemorySegment segment, long index) { return (int) VH_encodeFeedbackFlags.get(segment, 0L, index); } + /// {@return `encodeFeedbackFlags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeFeedbackFlagsKHR") int get_encodeFeedbackFlags(MemorySegment segment) { return VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.get_encodeFeedbackFlags(segment, 0L); } + /// {@return `encodeFeedbackFlags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeFeedbackFlagsKHR") int encodeFeedbackFlagsAt(long index) { return VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.get_encodeFeedbackFlags(this.segment(), index); } + /// {@return `encodeFeedbackFlags`} + public @CType("VkVideoEncodeFeedbackFlagsKHR") int encodeFeedbackFlags() { return VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.get_encodeFeedbackFlags(this.segment()); } + /// Sets `encodeFeedbackFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_encodeFeedbackFlags(MemorySegment segment, long index, @CType("VkVideoEncodeFeedbackFlagsKHR") int value) { VH_encodeFeedbackFlags.set(segment, 0L, index, value); } + /// Sets `encodeFeedbackFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_encodeFeedbackFlags(MemorySegment segment, @CType("VkVideoEncodeFeedbackFlagsKHR") int value) { VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.set_encodeFeedbackFlags(segment, 0L, value); } + /// Sets `encodeFeedbackFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolVideoEncodeFeedbackCreateInfoKHR encodeFeedbackFlagsAt(long index, @CType("VkVideoEncodeFeedbackFlagsKHR") int value) { VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.set_encodeFeedbackFlags(this.segment(), index, value); return this; } + /// Sets `encodeFeedbackFlags` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolVideoEncodeFeedbackCreateInfoKHR encodeFeedbackFlags(@CType("VkVideoEncodeFeedbackFlagsKHR") int value) { VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.set_encodeFeedbackFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueueFamilyQueryResultStatusPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueueFamilyQueryResultStatusPropertiesKHR.java new file mode 100644 index 00000000..fd37e8a5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueueFamilyQueryResultStatusPropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### queryResultStatusSupport +/// [VarHandle][#VH_queryResultStatusSupport] - [Getter][#queryResultStatusSupport()] - [Setter][#queryResultStatusSupport(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueueFamilyQueryResultStatusPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 queryResultStatusSupport; +/// } VkQueueFamilyQueryResultStatusPropertiesKHR; +/// ``` +public final class VkQueueFamilyQueryResultStatusPropertiesKHR extends Struct { + /// The struct layout of `VkQueueFamilyQueryResultStatusPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("queryResultStatusSupport") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `queryResultStatusSupport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queryResultStatusSupport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queryResultStatusSupport")); + + /// Creates `VkQueueFamilyQueryResultStatusPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkQueueFamilyQueryResultStatusPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueueFamilyQueryResultStatusPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyQueryResultStatusPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyQueryResultStatusPropertiesKHR(segment); } + + /// Creates `VkQueueFamilyQueryResultStatusPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyQueryResultStatusPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyQueryResultStatusPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueueFamilyQueryResultStatusPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyQueryResultStatusPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyQueryResultStatusPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueueFamilyQueryResultStatusPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueueFamilyQueryResultStatusPropertiesKHR` + public static VkQueueFamilyQueryResultStatusPropertiesKHR alloc(SegmentAllocator allocator) { return new VkQueueFamilyQueryResultStatusPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueueFamilyQueryResultStatusPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueueFamilyQueryResultStatusPropertiesKHR` + public static VkQueueFamilyQueryResultStatusPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkQueueFamilyQueryResultStatusPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueueFamilyQueryResultStatusPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueueFamilyQueryResultStatusPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueueFamilyQueryResultStatusPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueueFamilyQueryResultStatusPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyQueryResultStatusPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkQueueFamilyQueryResultStatusPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyQueryResultStatusPropertiesKHR sType(@CType("VkStructureType") int value) { VkQueueFamilyQueryResultStatusPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueueFamilyQueryResultStatusPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueueFamilyQueryResultStatusPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkQueueFamilyQueryResultStatusPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyQueryResultStatusPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyQueryResultStatusPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyQueryResultStatusPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyQueryResultStatusPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyQueryResultStatusPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `queryResultStatusSupport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_queryResultStatusSupport(MemorySegment segment, long index) { return (int) VH_queryResultStatusSupport.get(segment, 0L, index); } + /// {@return `queryResultStatusSupport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_queryResultStatusSupport(MemorySegment segment) { return VkQueueFamilyQueryResultStatusPropertiesKHR.get_queryResultStatusSupport(segment, 0L); } + /// {@return `queryResultStatusSupport` at the given index} + /// @param index the index + public @CType("VkBool32") int queryResultStatusSupportAt(long index) { return VkQueueFamilyQueryResultStatusPropertiesKHR.get_queryResultStatusSupport(this.segment(), index); } + /// {@return `queryResultStatusSupport`} + public @CType("VkBool32") int queryResultStatusSupport() { return VkQueueFamilyQueryResultStatusPropertiesKHR.get_queryResultStatusSupport(this.segment()); } + /// Sets `queryResultStatusSupport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queryResultStatusSupport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_queryResultStatusSupport.set(segment, 0L, index, value); } + /// Sets `queryResultStatusSupport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queryResultStatusSupport(MemorySegment segment, @CType("VkBool32") int value) { VkQueueFamilyQueryResultStatusPropertiesKHR.set_queryResultStatusSupport(segment, 0L, value); } + /// Sets `queryResultStatusSupport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyQueryResultStatusPropertiesKHR queryResultStatusSupportAt(long index, @CType("VkBool32") int value) { VkQueueFamilyQueryResultStatusPropertiesKHR.set_queryResultStatusSupport(this.segment(), index, value); return this; } + /// Sets `queryResultStatusSupport` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyQueryResultStatusPropertiesKHR queryResultStatusSupport(@CType("VkBool32") int value) { VkQueueFamilyQueryResultStatusPropertiesKHR.set_queryResultStatusSupport(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueueFamilyVideoPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueueFamilyVideoPropertiesKHR.java new file mode 100644 index 00000000..fb4cef4e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkQueueFamilyVideoPropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### videoCodecOperations +/// [VarHandle][#VH_videoCodecOperations] - [Getter][#videoCodecOperations()] - [Setter][#videoCodecOperations(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueueFamilyVideoPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoCodecOperationFlagsKHR videoCodecOperations; +/// } VkQueueFamilyVideoPropertiesKHR; +/// ``` +public final class VkQueueFamilyVideoPropertiesKHR extends Struct { + /// The struct layout of `VkQueueFamilyVideoPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("videoCodecOperations") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `videoCodecOperations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_videoCodecOperations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoCodecOperations")); + + /// Creates `VkQueueFamilyVideoPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkQueueFamilyVideoPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueueFamilyVideoPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyVideoPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyVideoPropertiesKHR(segment); } + + /// Creates `VkQueueFamilyVideoPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyVideoPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyVideoPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueueFamilyVideoPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyVideoPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyVideoPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueueFamilyVideoPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueueFamilyVideoPropertiesKHR` + public static VkQueueFamilyVideoPropertiesKHR alloc(SegmentAllocator allocator) { return new VkQueueFamilyVideoPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueueFamilyVideoPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueueFamilyVideoPropertiesKHR` + public static VkQueueFamilyVideoPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkQueueFamilyVideoPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueueFamilyVideoPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueueFamilyVideoPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueueFamilyVideoPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueueFamilyVideoPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyVideoPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkQueueFamilyVideoPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyVideoPropertiesKHR sType(@CType("VkStructureType") int value) { VkQueueFamilyVideoPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueueFamilyVideoPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueueFamilyVideoPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkQueueFamilyVideoPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyVideoPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyVideoPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyVideoPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyVideoPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyVideoPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `videoCodecOperations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoCodecOperationFlagsKHR") int get_videoCodecOperations(MemorySegment segment, long index) { return (int) VH_videoCodecOperations.get(segment, 0L, index); } + /// {@return `videoCodecOperations`} + /// @param segment the segment of the struct + public static @CType("VkVideoCodecOperationFlagsKHR") int get_videoCodecOperations(MemorySegment segment) { return VkQueueFamilyVideoPropertiesKHR.get_videoCodecOperations(segment, 0L); } + /// {@return `videoCodecOperations` at the given index} + /// @param index the index + public @CType("VkVideoCodecOperationFlagsKHR") int videoCodecOperationsAt(long index) { return VkQueueFamilyVideoPropertiesKHR.get_videoCodecOperations(this.segment(), index); } + /// {@return `videoCodecOperations`} + public @CType("VkVideoCodecOperationFlagsKHR") int videoCodecOperations() { return VkQueueFamilyVideoPropertiesKHR.get_videoCodecOperations(this.segment()); } + /// Sets `videoCodecOperations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoCodecOperations(MemorySegment segment, long index, @CType("VkVideoCodecOperationFlagsKHR") int value) { VH_videoCodecOperations.set(segment, 0L, index, value); } + /// Sets `videoCodecOperations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoCodecOperations(MemorySegment segment, @CType("VkVideoCodecOperationFlagsKHR") int value) { VkQueueFamilyVideoPropertiesKHR.set_videoCodecOperations(segment, 0L, value); } + /// Sets `videoCodecOperations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyVideoPropertiesKHR videoCodecOperationsAt(long index, @CType("VkVideoCodecOperationFlagsKHR") int value) { VkQueueFamilyVideoPropertiesKHR.set_videoCodecOperations(this.segment(), index, value); return this; } + /// Sets `videoCodecOperations` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyVideoPropertiesKHR videoCodecOperations(@CType("VkVideoCodecOperationFlagsKHR") int value) { VkQueueFamilyVideoPropertiesKHR.set_videoCodecOperations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRayTracingPipelineCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRayTracingPipelineCreateInfoKHR.java new file mode 100644 index 00000000..f99176f9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRayTracingPipelineCreateInfoKHR.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### stageCount +/// [VarHandle][#VH_stageCount] - [Getter][#stageCount()] - [Setter][#stageCount(int)] +/// ### pStages +/// [VarHandle][#VH_pStages] - [Getter][#pStages()] - [Setter][#pStages(java.lang.foreign.MemorySegment)] +/// ### groupCount +/// [VarHandle][#VH_groupCount] - [Getter][#groupCount()] - [Setter][#groupCount(int)] +/// ### pGroups +/// [VarHandle][#VH_pGroups] - [Getter][#pGroups()] - [Setter][#pGroups(java.lang.foreign.MemorySegment)] +/// ### maxPipelineRayRecursionDepth +/// [VarHandle][#VH_maxPipelineRayRecursionDepth] - [Getter][#maxPipelineRayRecursionDepth()] - [Setter][#maxPipelineRayRecursionDepth(int)] +/// ### pLibraryInfo +/// [VarHandle][#VH_pLibraryInfo] - [Getter][#pLibraryInfo()] - [Setter][#pLibraryInfo(java.lang.foreign.MemorySegment)] +/// ### pLibraryInterface +/// [VarHandle][#VH_pLibraryInterface] - [Getter][#pLibraryInterface()] - [Setter][#pLibraryInterface(java.lang.foreign.MemorySegment)] +/// ### pDynamicState +/// [VarHandle][#VH_pDynamicState] - [Getter][#pDynamicState()] - [Setter][#pDynamicState(java.lang.foreign.MemorySegment)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### basePipelineHandle +/// [VarHandle][#VH_basePipelineHandle] - [Getter][#basePipelineHandle()] - [Setter][#basePipelineHandle(java.lang.foreign.MemorySegment)] +/// ### basePipelineIndex +/// [VarHandle][#VH_basePipelineIndex] - [Getter][#basePipelineIndex()] - [Setter][#basePipelineIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRayTracingPipelineCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCreateFlags flags; +/// uint32_t stageCount; +/// const VkPipelineShaderStageCreateInfo * pStages; +/// uint32_t groupCount; +/// const VkRayTracingShaderGroupCreateInfoKHR * pGroups; +/// uint32_t maxPipelineRayRecursionDepth; +/// const VkPipelineLibraryCreateInfoKHR * pLibraryInfo; +/// const VkRayTracingPipelineInterfaceCreateInfoKHR * pLibraryInterface; +/// const VkPipelineDynamicStateCreateInfo * pDynamicState; +/// VkPipelineLayout layout; +/// VkPipeline basePipelineHandle; +/// int32_t basePipelineIndex; +/// } VkRayTracingPipelineCreateInfoKHR; +/// ``` +public final class VkRayTracingPipelineCreateInfoKHR extends Struct { + /// The struct layout of `VkRayTracingPipelineCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("stageCount"), + ValueLayout.ADDRESS.withName("pStages"), + ValueLayout.JAVA_INT.withName("groupCount"), + ValueLayout.ADDRESS.withName("pGroups"), + ValueLayout.JAVA_INT.withName("maxPipelineRayRecursionDepth"), + ValueLayout.ADDRESS.withName("pLibraryInfo"), + ValueLayout.ADDRESS.withName("pLibraryInterface"), + ValueLayout.ADDRESS.withName("pDynamicState"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.ADDRESS.withName("basePipelineHandle"), + ValueLayout.JAVA_INT.withName("basePipelineIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `stageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageCount")); + /// The [VarHandle] of `pStages` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStages")); + /// The [VarHandle] of `groupCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_groupCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("groupCount")); + /// The [VarHandle] of `pGroups` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pGroups = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pGroups")); + /// The [VarHandle] of `maxPipelineRayRecursionDepth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPipelineRayRecursionDepth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPipelineRayRecursionDepth")); + /// The [VarHandle] of `pLibraryInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLibraryInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLibraryInfo")); + /// The [VarHandle] of `pLibraryInterface` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLibraryInterface = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLibraryInterface")); + /// The [VarHandle] of `pDynamicState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDynamicState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDynamicState")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `basePipelineHandle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_basePipelineHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("basePipelineHandle")); + /// The [VarHandle] of `basePipelineIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_basePipelineIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("basePipelineIndex")); + + /// Creates `VkRayTracingPipelineCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkRayTracingPipelineCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRayTracingPipelineCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingPipelineCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingPipelineCreateInfoKHR(segment); } + + /// Creates `VkRayTracingPipelineCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingPipelineCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingPipelineCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRayTracingPipelineCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingPipelineCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingPipelineCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRayTracingPipelineCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRayTracingPipelineCreateInfoKHR` + public static VkRayTracingPipelineCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkRayTracingPipelineCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRayTracingPipelineCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRayTracingPipelineCreateInfoKHR` + public static VkRayTracingPipelineCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkRayTracingPipelineCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRayTracingPipelineCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRayTracingPipelineCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkRayTracingPipelineCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR sType(@CType("VkStructureType") int value) { VkRayTracingPipelineCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRayTracingPipelineCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCreateFlags") int get_flags(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCreateFlags") int flagsAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCreateFlags") int flags() { return VkRayTracingPipelineCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCreateFlags") int value) { VkRayTracingPipelineCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR flagsAt(long index, @CType("VkPipelineCreateFlags") int value) { VkRayTracingPipelineCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR flags(@CType("VkPipelineCreateFlags") int value) { VkRayTracingPipelineCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `stageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stageCount(MemorySegment segment, long index) { return (int) VH_stageCount.get(segment, 0L, index); } + /// {@return `stageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stageCount(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_stageCount(segment, 0L); } + /// {@return `stageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stageCountAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_stageCount(this.segment(), index); } + /// {@return `stageCount`} + public @CType("uint32_t") int stageCount() { return VkRayTracingPipelineCreateInfoKHR.get_stageCount(this.segment()); } + /// Sets `stageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stageCount.set(segment, 0L, index, value); } + /// Sets `stageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageCount(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_stageCount(segment, 0L, value); } + /// Sets `stageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR stageCountAt(long index, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_stageCount(this.segment(), index, value); return this; } + /// Sets `stageCount` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR stageCount(@CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_stageCount(this.segment(), value); return this; } + + /// {@return `pStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment get_pStages(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStages.get(segment, 0L, index); } + /// {@return `pStages`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment get_pStages(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_pStages(segment, 0L); } + /// {@return `pStages` at the given index} + /// @param index the index + public @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment pStagesAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_pStages(this.segment(), index); } + /// {@return `pStages`} + public @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment pStages() { return VkRayTracingPipelineCreateInfoKHR.get_pStages(this.segment()); } + /// Sets `pStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStages(MemorySegment segment, long index, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pStages.set(segment, 0L, index, value); } + /// Sets `pStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStages(MemorySegment segment, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pStages(segment, 0L, value); } + /// Sets `pStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pStagesAt(long index, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pStages(this.segment(), index, value); return this; } + /// Sets `pStages` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pStages(@CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pStages(this.segment(), value); return this; } + + /// {@return `groupCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_groupCount(MemorySegment segment, long index) { return (int) VH_groupCount.get(segment, 0L, index); } + /// {@return `groupCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_groupCount(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_groupCount(segment, 0L); } + /// {@return `groupCount` at the given index} + /// @param index the index + public @CType("uint32_t") int groupCountAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_groupCount(this.segment(), index); } + /// {@return `groupCount`} + public @CType("uint32_t") int groupCount() { return VkRayTracingPipelineCreateInfoKHR.get_groupCount(this.segment()); } + /// Sets `groupCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_groupCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_groupCount.set(segment, 0L, index, value); } + /// Sets `groupCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_groupCount(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_groupCount(segment, 0L, value); } + /// Sets `groupCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR groupCountAt(long index, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_groupCount(this.segment(), index, value); return this; } + /// Sets `groupCount` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR groupCount(@CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_groupCount(this.segment(), value); return this; } + + /// {@return `pGroups` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRayTracingShaderGroupCreateInfoKHR *") java.lang.foreign.MemorySegment get_pGroups(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pGroups.get(segment, 0L, index); } + /// {@return `pGroups`} + /// @param segment the segment of the struct + public static @CType("const VkRayTracingShaderGroupCreateInfoKHR *") java.lang.foreign.MemorySegment get_pGroups(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_pGroups(segment, 0L); } + /// {@return `pGroups` at the given index} + /// @param index the index + public @CType("const VkRayTracingShaderGroupCreateInfoKHR *") java.lang.foreign.MemorySegment pGroupsAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_pGroups(this.segment(), index); } + /// {@return `pGroups`} + public @CType("const VkRayTracingShaderGroupCreateInfoKHR *") java.lang.foreign.MemorySegment pGroups() { return VkRayTracingPipelineCreateInfoKHR.get_pGroups(this.segment()); } + /// Sets `pGroups` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pGroups(MemorySegment segment, long index, @CType("const VkRayTracingShaderGroupCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pGroups.set(segment, 0L, index, value); } + /// Sets `pGroups` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pGroups(MemorySegment segment, @CType("const VkRayTracingShaderGroupCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pGroups(segment, 0L, value); } + /// Sets `pGroups` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pGroupsAt(long index, @CType("const VkRayTracingShaderGroupCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pGroups(this.segment(), index, value); return this; } + /// Sets `pGroups` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pGroups(@CType("const VkRayTracingShaderGroupCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pGroups(this.segment(), value); return this; } + + /// {@return `maxPipelineRayRecursionDepth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPipelineRayRecursionDepth(MemorySegment segment, long index) { return (int) VH_maxPipelineRayRecursionDepth.get(segment, 0L, index); } + /// {@return `maxPipelineRayRecursionDepth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPipelineRayRecursionDepth(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_maxPipelineRayRecursionDepth(segment, 0L); } + /// {@return `maxPipelineRayRecursionDepth` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPipelineRayRecursionDepthAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_maxPipelineRayRecursionDepth(this.segment(), index); } + /// {@return `maxPipelineRayRecursionDepth`} + public @CType("uint32_t") int maxPipelineRayRecursionDepth() { return VkRayTracingPipelineCreateInfoKHR.get_maxPipelineRayRecursionDepth(this.segment()); } + /// Sets `maxPipelineRayRecursionDepth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPipelineRayRecursionDepth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPipelineRayRecursionDepth.set(segment, 0L, index, value); } + /// Sets `maxPipelineRayRecursionDepth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPipelineRayRecursionDepth(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_maxPipelineRayRecursionDepth(segment, 0L, value); } + /// Sets `maxPipelineRayRecursionDepth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR maxPipelineRayRecursionDepthAt(long index, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_maxPipelineRayRecursionDepth(this.segment(), index, value); return this; } + /// Sets `maxPipelineRayRecursionDepth` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR maxPipelineRayRecursionDepth(@CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_maxPipelineRayRecursionDepth(this.segment(), value); return this; } + + /// {@return `pLibraryInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment get_pLibraryInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLibraryInfo.get(segment, 0L, index); } + /// {@return `pLibraryInfo`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment get_pLibraryInfo(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_pLibraryInfo(segment, 0L); } + /// {@return `pLibraryInfo` at the given index} + /// @param index the index + public @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment pLibraryInfoAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_pLibraryInfo(this.segment(), index); } + /// {@return `pLibraryInfo`} + public @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment pLibraryInfo() { return VkRayTracingPipelineCreateInfoKHR.get_pLibraryInfo(this.segment()); } + /// Sets `pLibraryInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLibraryInfo(MemorySegment segment, long index, @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pLibraryInfo.set(segment, 0L, index, value); } + /// Sets `pLibraryInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLibraryInfo(MemorySegment segment, @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pLibraryInfo(segment, 0L, value); } + /// Sets `pLibraryInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pLibraryInfoAt(long index, @CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pLibraryInfo(this.segment(), index, value); return this; } + /// Sets `pLibraryInfo` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pLibraryInfo(@CType("const VkPipelineLibraryCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pLibraryInfo(this.segment(), value); return this; } + + /// {@return `pLibraryInterface` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRayTracingPipelineInterfaceCreateInfoKHR *") java.lang.foreign.MemorySegment get_pLibraryInterface(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLibraryInterface.get(segment, 0L, index); } + /// {@return `pLibraryInterface`} + /// @param segment the segment of the struct + public static @CType("const VkRayTracingPipelineInterfaceCreateInfoKHR *") java.lang.foreign.MemorySegment get_pLibraryInterface(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_pLibraryInterface(segment, 0L); } + /// {@return `pLibraryInterface` at the given index} + /// @param index the index + public @CType("const VkRayTracingPipelineInterfaceCreateInfoKHR *") java.lang.foreign.MemorySegment pLibraryInterfaceAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_pLibraryInterface(this.segment(), index); } + /// {@return `pLibraryInterface`} + public @CType("const VkRayTracingPipelineInterfaceCreateInfoKHR *") java.lang.foreign.MemorySegment pLibraryInterface() { return VkRayTracingPipelineCreateInfoKHR.get_pLibraryInterface(this.segment()); } + /// Sets `pLibraryInterface` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLibraryInterface(MemorySegment segment, long index, @CType("const VkRayTracingPipelineInterfaceCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pLibraryInterface.set(segment, 0L, index, value); } + /// Sets `pLibraryInterface` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLibraryInterface(MemorySegment segment, @CType("const VkRayTracingPipelineInterfaceCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pLibraryInterface(segment, 0L, value); } + /// Sets `pLibraryInterface` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pLibraryInterfaceAt(long index, @CType("const VkRayTracingPipelineInterfaceCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pLibraryInterface(this.segment(), index, value); return this; } + /// Sets `pLibraryInterface` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pLibraryInterface(@CType("const VkRayTracingPipelineInterfaceCreateInfoKHR *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pLibraryInterface(this.segment(), value); return this; } + + /// {@return `pDynamicState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment get_pDynamicState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDynamicState.get(segment, 0L, index); } + /// {@return `pDynamicState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment get_pDynamicState(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_pDynamicState(segment, 0L); } + /// {@return `pDynamicState` at the given index} + /// @param index the index + public @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment pDynamicStateAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_pDynamicState(this.segment(), index); } + /// {@return `pDynamicState`} + public @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment pDynamicState() { return VkRayTracingPipelineCreateInfoKHR.get_pDynamicState(this.segment()); } + /// Sets `pDynamicState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDynamicState(MemorySegment segment, long index, @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pDynamicState.set(segment, 0L, index, value); } + /// Sets `pDynamicState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDynamicState(MemorySegment segment, @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pDynamicState(segment, 0L, value); } + /// Sets `pDynamicState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pDynamicStateAt(long index, @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pDynamicState(this.segment(), index, value); return this; } + /// Sets `pDynamicState` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR pDynamicState(@CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_pDynamicState(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkRayTracingPipelineCreateInfoKHR.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_layout(this.segment(), value); return this; } + + /// {@return `basePipelineHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_basePipelineHandle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_basePipelineHandle.get(segment, 0L, index); } + /// {@return `basePipelineHandle`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_basePipelineHandle(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_basePipelineHandle(segment, 0L); } + /// {@return `basePipelineHandle` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment basePipelineHandleAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_basePipelineHandle(this.segment(), index); } + /// {@return `basePipelineHandle`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment basePipelineHandle() { return VkRayTracingPipelineCreateInfoKHR.get_basePipelineHandle(this.segment()); } + /// Sets `basePipelineHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_basePipelineHandle(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_basePipelineHandle.set(segment, 0L, index, value); } + /// Sets `basePipelineHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_basePipelineHandle(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_basePipelineHandle(segment, 0L, value); } + /// Sets `basePipelineHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR basePipelineHandleAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_basePipelineHandle(this.segment(), index, value); return this; } + /// Sets `basePipelineHandle` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR basePipelineHandle(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoKHR.set_basePipelineHandle(this.segment(), value); return this; } + + /// {@return `basePipelineIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_basePipelineIndex(MemorySegment segment, long index) { return (int) VH_basePipelineIndex.get(segment, 0L, index); } + /// {@return `basePipelineIndex`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_basePipelineIndex(MemorySegment segment) { return VkRayTracingPipelineCreateInfoKHR.get_basePipelineIndex(segment, 0L); } + /// {@return `basePipelineIndex` at the given index} + /// @param index the index + public @CType("int32_t") int basePipelineIndexAt(long index) { return VkRayTracingPipelineCreateInfoKHR.get_basePipelineIndex(this.segment(), index); } + /// {@return `basePipelineIndex`} + public @CType("int32_t") int basePipelineIndex() { return VkRayTracingPipelineCreateInfoKHR.get_basePipelineIndex(this.segment()); } + /// Sets `basePipelineIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_basePipelineIndex(MemorySegment segment, long index, @CType("int32_t") int value) { VH_basePipelineIndex.set(segment, 0L, index, value); } + /// Sets `basePipelineIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_basePipelineIndex(MemorySegment segment, @CType("int32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_basePipelineIndex(segment, 0L, value); } + /// Sets `basePipelineIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR basePipelineIndexAt(long index, @CType("int32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_basePipelineIndex(this.segment(), index, value); return this; } + /// Sets `basePipelineIndex` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoKHR basePipelineIndex(@CType("int32_t") int value) { VkRayTracingPipelineCreateInfoKHR.set_basePipelineIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRayTracingPipelineInterfaceCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRayTracingPipelineInterfaceCreateInfoKHR.java new file mode 100644 index 00000000..c6962df5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRayTracingPipelineInterfaceCreateInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxPipelineRayPayloadSize +/// [VarHandle][#VH_maxPipelineRayPayloadSize] - [Getter][#maxPipelineRayPayloadSize()] - [Setter][#maxPipelineRayPayloadSize(int)] +/// ### maxPipelineRayHitAttributeSize +/// [VarHandle][#VH_maxPipelineRayHitAttributeSize] - [Getter][#maxPipelineRayHitAttributeSize()] - [Setter][#maxPipelineRayHitAttributeSize(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRayTracingPipelineInterfaceCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t maxPipelineRayPayloadSize; +/// uint32_t maxPipelineRayHitAttributeSize; +/// } VkRayTracingPipelineInterfaceCreateInfoKHR; +/// ``` +public final class VkRayTracingPipelineInterfaceCreateInfoKHR extends Struct { + /// The struct layout of `VkRayTracingPipelineInterfaceCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxPipelineRayPayloadSize"), + ValueLayout.JAVA_INT.withName("maxPipelineRayHitAttributeSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxPipelineRayPayloadSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPipelineRayPayloadSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPipelineRayPayloadSize")); + /// The [VarHandle] of `maxPipelineRayHitAttributeSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPipelineRayHitAttributeSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPipelineRayHitAttributeSize")); + + /// Creates `VkRayTracingPipelineInterfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkRayTracingPipelineInterfaceCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRayTracingPipelineInterfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingPipelineInterfaceCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingPipelineInterfaceCreateInfoKHR(segment); } + + /// Creates `VkRayTracingPipelineInterfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingPipelineInterfaceCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingPipelineInterfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRayTracingPipelineInterfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingPipelineInterfaceCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingPipelineInterfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRayTracingPipelineInterfaceCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRayTracingPipelineInterfaceCreateInfoKHR` + public static VkRayTracingPipelineInterfaceCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkRayTracingPipelineInterfaceCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRayTracingPipelineInterfaceCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRayTracingPipelineInterfaceCreateInfoKHR` + public static VkRayTracingPipelineInterfaceCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkRayTracingPipelineInterfaceCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineInterfaceCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineInterfaceCreateInfoKHR sType(@CType("VkStructureType") int value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineInterfaceCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineInterfaceCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxPipelineRayPayloadSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPipelineRayPayloadSize(MemorySegment segment, long index) { return (int) VH_maxPipelineRayPayloadSize.get(segment, 0L, index); } + /// {@return `maxPipelineRayPayloadSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPipelineRayPayloadSize(MemorySegment segment) { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_maxPipelineRayPayloadSize(segment, 0L); } + /// {@return `maxPipelineRayPayloadSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPipelineRayPayloadSizeAt(long index) { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_maxPipelineRayPayloadSize(this.segment(), index); } + /// {@return `maxPipelineRayPayloadSize`} + public @CType("uint32_t") int maxPipelineRayPayloadSize() { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_maxPipelineRayPayloadSize(this.segment()); } + /// Sets `maxPipelineRayPayloadSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPipelineRayPayloadSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPipelineRayPayloadSize.set(segment, 0L, index, value); } + /// Sets `maxPipelineRayPayloadSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPipelineRayPayloadSize(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_maxPipelineRayPayloadSize(segment, 0L, value); } + /// Sets `maxPipelineRayPayloadSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineInterfaceCreateInfoKHR maxPipelineRayPayloadSizeAt(long index, @CType("uint32_t") int value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_maxPipelineRayPayloadSize(this.segment(), index, value); return this; } + /// Sets `maxPipelineRayPayloadSize` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineInterfaceCreateInfoKHR maxPipelineRayPayloadSize(@CType("uint32_t") int value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_maxPipelineRayPayloadSize(this.segment(), value); return this; } + + /// {@return `maxPipelineRayHitAttributeSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPipelineRayHitAttributeSize(MemorySegment segment, long index) { return (int) VH_maxPipelineRayHitAttributeSize.get(segment, 0L, index); } + /// {@return `maxPipelineRayHitAttributeSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPipelineRayHitAttributeSize(MemorySegment segment) { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_maxPipelineRayHitAttributeSize(segment, 0L); } + /// {@return `maxPipelineRayHitAttributeSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPipelineRayHitAttributeSizeAt(long index) { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_maxPipelineRayHitAttributeSize(this.segment(), index); } + /// {@return `maxPipelineRayHitAttributeSize`} + public @CType("uint32_t") int maxPipelineRayHitAttributeSize() { return VkRayTracingPipelineInterfaceCreateInfoKHR.get_maxPipelineRayHitAttributeSize(this.segment()); } + /// Sets `maxPipelineRayHitAttributeSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPipelineRayHitAttributeSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPipelineRayHitAttributeSize.set(segment, 0L, index, value); } + /// Sets `maxPipelineRayHitAttributeSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPipelineRayHitAttributeSize(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_maxPipelineRayHitAttributeSize(segment, 0L, value); } + /// Sets `maxPipelineRayHitAttributeSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineInterfaceCreateInfoKHR maxPipelineRayHitAttributeSizeAt(long index, @CType("uint32_t") int value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_maxPipelineRayHitAttributeSize(this.segment(), index, value); return this; } + /// Sets `maxPipelineRayHitAttributeSize` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineInterfaceCreateInfoKHR maxPipelineRayHitAttributeSize(@CType("uint32_t") int value) { VkRayTracingPipelineInterfaceCreateInfoKHR.set_maxPipelineRayHitAttributeSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRayTracingShaderGroupCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRayTracingShaderGroupCreateInfoKHR.java new file mode 100644 index 00000000..a59ecc5f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRayTracingShaderGroupCreateInfoKHR.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### generalShader +/// [VarHandle][#VH_generalShader] - [Getter][#generalShader()] - [Setter][#generalShader(int)] +/// ### closestHitShader +/// [VarHandle][#VH_closestHitShader] - [Getter][#closestHitShader()] - [Setter][#closestHitShader(int)] +/// ### anyHitShader +/// [VarHandle][#VH_anyHitShader] - [Getter][#anyHitShader()] - [Setter][#anyHitShader(int)] +/// ### intersectionShader +/// [VarHandle][#VH_intersectionShader] - [Getter][#intersectionShader()] - [Setter][#intersectionShader(int)] +/// ### pShaderGroupCaptureReplayHandle +/// [VarHandle][#VH_pShaderGroupCaptureReplayHandle] - [Getter][#pShaderGroupCaptureReplayHandle()] - [Setter][#pShaderGroupCaptureReplayHandle(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRayTracingShaderGroupCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkRayTracingShaderGroupTypeKHR type; +/// uint32_t generalShader; +/// uint32_t closestHitShader; +/// uint32_t anyHitShader; +/// uint32_t intersectionShader; +/// const void * pShaderGroupCaptureReplayHandle; +/// } VkRayTracingShaderGroupCreateInfoKHR; +/// ``` +public final class VkRayTracingShaderGroupCreateInfoKHR extends Struct { + /// The struct layout of `VkRayTracingShaderGroupCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("generalShader"), + ValueLayout.JAVA_INT.withName("closestHitShader"), + ValueLayout.JAVA_INT.withName("anyHitShader"), + ValueLayout.JAVA_INT.withName("intersectionShader"), + ValueLayout.ADDRESS.withName("pShaderGroupCaptureReplayHandle") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `generalShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_generalShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("generalShader")); + /// The [VarHandle] of `closestHitShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_closestHitShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("closestHitShader")); + /// The [VarHandle] of `anyHitShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_anyHitShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("anyHitShader")); + /// The [VarHandle] of `intersectionShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_intersectionShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("intersectionShader")); + /// The [VarHandle] of `pShaderGroupCaptureReplayHandle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pShaderGroupCaptureReplayHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pShaderGroupCaptureReplayHandle")); + + /// Creates `VkRayTracingShaderGroupCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkRayTracingShaderGroupCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRayTracingShaderGroupCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingShaderGroupCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingShaderGroupCreateInfoKHR(segment); } + + /// Creates `VkRayTracingShaderGroupCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingShaderGroupCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingShaderGroupCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRayTracingShaderGroupCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingShaderGroupCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingShaderGroupCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRayTracingShaderGroupCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRayTracingShaderGroupCreateInfoKHR` + public static VkRayTracingShaderGroupCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkRayTracingShaderGroupCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRayTracingShaderGroupCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRayTracingShaderGroupCreateInfoKHR` + public static VkRayTracingShaderGroupCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkRayTracingShaderGroupCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRayTracingShaderGroupCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRayTracingShaderGroupCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR sType(@CType("VkStructureType") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRayTracingShaderGroupCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRayTracingShaderGroupCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingShaderGroupCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingShaderGroupCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingShaderGroupCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRayTracingShaderGroupTypeKHR") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkRayTracingShaderGroupTypeKHR") int get_type(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoKHR.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkRayTracingShaderGroupTypeKHR") int typeAt(long index) { return VkRayTracingShaderGroupCreateInfoKHR.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkRayTracingShaderGroupTypeKHR") int type() { return VkRayTracingShaderGroupCreateInfoKHR.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkRayTracingShaderGroupTypeKHR") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkRayTracingShaderGroupTypeKHR") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR typeAt(long index, @CType("VkRayTracingShaderGroupTypeKHR") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR type(@CType("VkRayTracingShaderGroupTypeKHR") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_type(this.segment(), value); return this; } + + /// {@return `generalShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_generalShader(MemorySegment segment, long index) { return (int) VH_generalShader.get(segment, 0L, index); } + /// {@return `generalShader`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_generalShader(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoKHR.get_generalShader(segment, 0L); } + /// {@return `generalShader` at the given index} + /// @param index the index + public @CType("uint32_t") int generalShaderAt(long index) { return VkRayTracingShaderGroupCreateInfoKHR.get_generalShader(this.segment(), index); } + /// {@return `generalShader`} + public @CType("uint32_t") int generalShader() { return VkRayTracingShaderGroupCreateInfoKHR.get_generalShader(this.segment()); } + /// Sets `generalShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_generalShader(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_generalShader.set(segment, 0L, index, value); } + /// Sets `generalShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_generalShader(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_generalShader(segment, 0L, value); } + /// Sets `generalShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR generalShaderAt(long index, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_generalShader(this.segment(), index, value); return this; } + /// Sets `generalShader` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR generalShader(@CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_generalShader(this.segment(), value); return this; } + + /// {@return `closestHitShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_closestHitShader(MemorySegment segment, long index) { return (int) VH_closestHitShader.get(segment, 0L, index); } + /// {@return `closestHitShader`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_closestHitShader(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoKHR.get_closestHitShader(segment, 0L); } + /// {@return `closestHitShader` at the given index} + /// @param index the index + public @CType("uint32_t") int closestHitShaderAt(long index) { return VkRayTracingShaderGroupCreateInfoKHR.get_closestHitShader(this.segment(), index); } + /// {@return `closestHitShader`} + public @CType("uint32_t") int closestHitShader() { return VkRayTracingShaderGroupCreateInfoKHR.get_closestHitShader(this.segment()); } + /// Sets `closestHitShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_closestHitShader(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_closestHitShader.set(segment, 0L, index, value); } + /// Sets `closestHitShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_closestHitShader(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_closestHitShader(segment, 0L, value); } + /// Sets `closestHitShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR closestHitShaderAt(long index, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_closestHitShader(this.segment(), index, value); return this; } + /// Sets `closestHitShader` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR closestHitShader(@CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_closestHitShader(this.segment(), value); return this; } + + /// {@return `anyHitShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_anyHitShader(MemorySegment segment, long index) { return (int) VH_anyHitShader.get(segment, 0L, index); } + /// {@return `anyHitShader`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_anyHitShader(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoKHR.get_anyHitShader(segment, 0L); } + /// {@return `anyHitShader` at the given index} + /// @param index the index + public @CType("uint32_t") int anyHitShaderAt(long index) { return VkRayTracingShaderGroupCreateInfoKHR.get_anyHitShader(this.segment(), index); } + /// {@return `anyHitShader`} + public @CType("uint32_t") int anyHitShader() { return VkRayTracingShaderGroupCreateInfoKHR.get_anyHitShader(this.segment()); } + /// Sets `anyHitShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_anyHitShader(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_anyHitShader.set(segment, 0L, index, value); } + /// Sets `anyHitShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_anyHitShader(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_anyHitShader(segment, 0L, value); } + /// Sets `anyHitShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR anyHitShaderAt(long index, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_anyHitShader(this.segment(), index, value); return this; } + /// Sets `anyHitShader` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR anyHitShader(@CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_anyHitShader(this.segment(), value); return this; } + + /// {@return `intersectionShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_intersectionShader(MemorySegment segment, long index) { return (int) VH_intersectionShader.get(segment, 0L, index); } + /// {@return `intersectionShader`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_intersectionShader(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoKHR.get_intersectionShader(segment, 0L); } + /// {@return `intersectionShader` at the given index} + /// @param index the index + public @CType("uint32_t") int intersectionShaderAt(long index) { return VkRayTracingShaderGroupCreateInfoKHR.get_intersectionShader(this.segment(), index); } + /// {@return `intersectionShader`} + public @CType("uint32_t") int intersectionShader() { return VkRayTracingShaderGroupCreateInfoKHR.get_intersectionShader(this.segment()); } + /// Sets `intersectionShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_intersectionShader(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_intersectionShader.set(segment, 0L, index, value); } + /// Sets `intersectionShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_intersectionShader(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_intersectionShader(segment, 0L, value); } + /// Sets `intersectionShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR intersectionShaderAt(long index, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_intersectionShader(this.segment(), index, value); return this; } + /// Sets `intersectionShader` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR intersectionShader(@CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoKHR.set_intersectionShader(this.segment(), value); return this; } + + /// {@return `pShaderGroupCaptureReplayHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pShaderGroupCaptureReplayHandle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pShaderGroupCaptureReplayHandle.get(segment, 0L, index); } + /// {@return `pShaderGroupCaptureReplayHandle`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pShaderGroupCaptureReplayHandle(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoKHR.get_pShaderGroupCaptureReplayHandle(segment, 0L); } + /// {@return `pShaderGroupCaptureReplayHandle` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pShaderGroupCaptureReplayHandleAt(long index) { return VkRayTracingShaderGroupCreateInfoKHR.get_pShaderGroupCaptureReplayHandle(this.segment(), index); } + /// {@return `pShaderGroupCaptureReplayHandle`} + public @CType("const void *") java.lang.foreign.MemorySegment pShaderGroupCaptureReplayHandle() { return VkRayTracingShaderGroupCreateInfoKHR.get_pShaderGroupCaptureReplayHandle(this.segment()); } + /// Sets `pShaderGroupCaptureReplayHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pShaderGroupCaptureReplayHandle(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pShaderGroupCaptureReplayHandle.set(segment, 0L, index, value); } + /// Sets `pShaderGroupCaptureReplayHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pShaderGroupCaptureReplayHandle(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingShaderGroupCreateInfoKHR.set_pShaderGroupCaptureReplayHandle(segment, 0L, value); } + /// Sets `pShaderGroupCaptureReplayHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR pShaderGroupCaptureReplayHandleAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingShaderGroupCreateInfoKHR.set_pShaderGroupCaptureReplayHandle(this.segment(), index, value); return this; } + /// Sets `pShaderGroupCaptureReplayHandle` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoKHR pShaderGroupCaptureReplayHandle(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingShaderGroupCreateInfoKHR.set_pShaderGroupCaptureReplayHandle(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRectLayerKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRectLayerKHR.java new file mode 100644 index 00000000..2b09e031 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRectLayerKHR.java @@ -0,0 +1,189 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### offset +/// [Byte offset][#OFFSET_offset] - [Memory layout][#ML_offset] - [Getter][#offset()] - [Setter][#offset(java.lang.foreign.MemorySegment)] +/// ### extent +/// [Byte offset][#OFFSET_extent] - [Memory layout][#ML_extent] - [Getter][#extent()] - [Setter][#extent(java.lang.foreign.MemorySegment)] +/// ### layer +/// [VarHandle][#VH_layer] - [Getter][#layer()] - [Setter][#layer(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRectLayerKHR { +/// VkOffset2D offset; +/// VkExtent2D extent; +/// uint32_t layer; +/// } VkRectLayerKHR; +/// ``` +public final class VkRectLayerKHR extends Struct { + /// The struct layout of `VkRectLayerKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkOffset2D.LAYOUT.withName("offset"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("extent"), + ValueLayout.JAVA_INT.withName("layer") + ); + /// The byte offset of `offset`. + public static final long OFFSET_offset = LAYOUT.byteOffset(PathElement.groupElement("offset")); + /// The memory layout of `offset`. + public static final MemoryLayout ML_offset = LAYOUT.select(PathElement.groupElement("offset")); + /// The byte offset of `extent`. + public static final long OFFSET_extent = LAYOUT.byteOffset(PathElement.groupElement("extent")); + /// The memory layout of `extent`. + public static final MemoryLayout ML_extent = LAYOUT.select(PathElement.groupElement("extent")); + /// The [VarHandle] of `layer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layer")); + + /// Creates `VkRectLayerKHR` with the given segment. + /// @param segment the memory segment + public VkRectLayerKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRectLayerKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRectLayerKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRectLayerKHR(segment); } + + /// Creates `VkRectLayerKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRectLayerKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRectLayerKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRectLayerKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRectLayerKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRectLayerKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRectLayerKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRectLayerKHR` + public static VkRectLayerKHR alloc(SegmentAllocator allocator) { return new VkRectLayerKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRectLayerKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRectLayerKHR` + public static VkRectLayerKHR alloc(SegmentAllocator allocator, long count) { return new VkRectLayerKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_offset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_offset, index), ML_offset); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_offset(MemorySegment segment) { return VkRectLayerKHR.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkOffset2D") java.lang.foreign.MemorySegment offsetAt(long index) { return VkRectLayerKHR.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkOffset2D") java.lang.foreign.MemorySegment offset() { return VkRectLayerKHR.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_offset, index), ML_offset.byteSize()); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkRectLayerKHR.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRectLayerKHR offsetAt(long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkRectLayerKHR.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkRectLayerKHR offset(@CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkRectLayerKHR.set_offset(this.segment(), value); return this; } + + /// {@return `extent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_extent, index), ML_extent); } + /// {@return `extent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment) { return VkRectLayerKHR.get_extent(segment, 0L); } + /// {@return `extent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment extentAt(long index) { return VkRectLayerKHR.get_extent(this.segment(), index); } + /// {@return `extent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment extent() { return VkRectLayerKHR.get_extent(this.segment()); } + /// Sets `extent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_extent, index), ML_extent.byteSize()); } + /// Sets `extent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkRectLayerKHR.set_extent(segment, 0L, value); } + /// Sets `extent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRectLayerKHR extentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkRectLayerKHR.set_extent(this.segment(), index, value); return this; } + /// Sets `extent` with the given value. + /// @param value the value + /// @return `this` + public VkRectLayerKHR extent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkRectLayerKHR.set_extent(this.segment(), value); return this; } + + /// {@return `layer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_layer(MemorySegment segment, long index) { return (int) VH_layer.get(segment, 0L, index); } + /// {@return `layer`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_layer(MemorySegment segment) { return VkRectLayerKHR.get_layer(segment, 0L); } + /// {@return `layer` at the given index} + /// @param index the index + public @CType("uint32_t") int layerAt(long index) { return VkRectLayerKHR.get_layer(this.segment(), index); } + /// {@return `layer`} + public @CType("uint32_t") int layer() { return VkRectLayerKHR.get_layer(this.segment()); } + /// Sets `layer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layer(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_layer.set(segment, 0L, index, value); } + /// Sets `layer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layer(MemorySegment segment, @CType("uint32_t") int value) { VkRectLayerKHR.set_layer(segment, 0L, value); } + /// Sets `layer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRectLayerKHR layerAt(long index, @CType("uint32_t") int value) { VkRectLayerKHR.set_layer(this.segment(), index, value); return this; } + /// Sets `layer` with the given value. + /// @param value the value + /// @return `this` + public VkRectLayerKHR layer(@CType("uint32_t") int value) { VkRectLayerKHR.set_layer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRefreshObjectKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRefreshObjectKHR.java new file mode 100644 index 00000000..2e2c8d1f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRefreshObjectKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### objectType +/// [VarHandle][#VH_objectType] - [Getter][#objectType()] - [Setter][#objectType(int)] +/// ### objectHandle +/// [VarHandle][#VH_objectHandle] - [Getter][#objectHandle()] - [Setter][#objectHandle(long)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRefreshObjectKHR { +/// VkObjectType objectType; +/// uint64_t objectHandle; +/// VkRefreshObjectFlagsKHR flags; +/// } VkRefreshObjectKHR; +/// ``` +public final class VkRefreshObjectKHR extends Struct { + /// The struct layout of `VkRefreshObjectKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("objectType"), + ValueLayout.JAVA_LONG.withName("objectHandle"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `objectType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_objectType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectType")); + /// The [VarHandle] of `objectHandle` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_objectHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectHandle")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkRefreshObjectKHR` with the given segment. + /// @param segment the memory segment + public VkRefreshObjectKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRefreshObjectKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRefreshObjectKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRefreshObjectKHR(segment); } + + /// Creates `VkRefreshObjectKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRefreshObjectKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRefreshObjectKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRefreshObjectKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRefreshObjectKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRefreshObjectKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRefreshObjectKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRefreshObjectKHR` + public static VkRefreshObjectKHR alloc(SegmentAllocator allocator) { return new VkRefreshObjectKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRefreshObjectKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRefreshObjectKHR` + public static VkRefreshObjectKHR alloc(SegmentAllocator allocator, long count) { return new VkRefreshObjectKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `objectType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkObjectType") int get_objectType(MemorySegment segment, long index) { return (int) VH_objectType.get(segment, 0L, index); } + /// {@return `objectType`} + /// @param segment the segment of the struct + public static @CType("VkObjectType") int get_objectType(MemorySegment segment) { return VkRefreshObjectKHR.get_objectType(segment, 0L); } + /// {@return `objectType` at the given index} + /// @param index the index + public @CType("VkObjectType") int objectTypeAt(long index) { return VkRefreshObjectKHR.get_objectType(this.segment(), index); } + /// {@return `objectType`} + public @CType("VkObjectType") int objectType() { return VkRefreshObjectKHR.get_objectType(this.segment()); } + /// Sets `objectType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectType(MemorySegment segment, long index, @CType("VkObjectType") int value) { VH_objectType.set(segment, 0L, index, value); } + /// Sets `objectType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectType(MemorySegment segment, @CType("VkObjectType") int value) { VkRefreshObjectKHR.set_objectType(segment, 0L, value); } + /// Sets `objectType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRefreshObjectKHR objectTypeAt(long index, @CType("VkObjectType") int value) { VkRefreshObjectKHR.set_objectType(this.segment(), index, value); return this; } + /// Sets `objectType` with the given value. + /// @param value the value + /// @return `this` + public VkRefreshObjectKHR objectType(@CType("VkObjectType") int value) { VkRefreshObjectKHR.set_objectType(this.segment(), value); return this; } + + /// {@return `objectHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_objectHandle(MemorySegment segment, long index) { return (long) VH_objectHandle.get(segment, 0L, index); } + /// {@return `objectHandle`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_objectHandle(MemorySegment segment) { return VkRefreshObjectKHR.get_objectHandle(segment, 0L); } + /// {@return `objectHandle` at the given index} + /// @param index the index + public @CType("uint64_t") long objectHandleAt(long index) { return VkRefreshObjectKHR.get_objectHandle(this.segment(), index); } + /// {@return `objectHandle`} + public @CType("uint64_t") long objectHandle() { return VkRefreshObjectKHR.get_objectHandle(this.segment()); } + /// Sets `objectHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectHandle(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_objectHandle.set(segment, 0L, index, value); } + /// Sets `objectHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectHandle(MemorySegment segment, @CType("uint64_t") long value) { VkRefreshObjectKHR.set_objectHandle(segment, 0L, value); } + /// Sets `objectHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRefreshObjectKHR objectHandleAt(long index, @CType("uint64_t") long value) { VkRefreshObjectKHR.set_objectHandle(this.segment(), index, value); return this; } + /// Sets `objectHandle` with the given value. + /// @param value the value + /// @return `this` + public VkRefreshObjectKHR objectHandle(@CType("uint64_t") long value) { VkRefreshObjectKHR.set_objectHandle(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRefreshObjectFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkRefreshObjectFlagsKHR") int get_flags(MemorySegment segment) { return VkRefreshObjectKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkRefreshObjectFlagsKHR") int flagsAt(long index) { return VkRefreshObjectKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkRefreshObjectFlagsKHR") int flags() { return VkRefreshObjectKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkRefreshObjectFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkRefreshObjectFlagsKHR") int value) { VkRefreshObjectKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRefreshObjectKHR flagsAt(long index, @CType("VkRefreshObjectFlagsKHR") int value) { VkRefreshObjectKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkRefreshObjectKHR flags(@CType("VkRefreshObjectFlagsKHR") int value) { VkRefreshObjectKHR.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRefreshObjectListKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRefreshObjectListKHR.java new file mode 100644 index 00000000..27cfe19d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRefreshObjectListKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### objectCount +/// [VarHandle][#VH_objectCount] - [Getter][#objectCount()] - [Setter][#objectCount(int)] +/// ### pObjects +/// [VarHandle][#VH_pObjects] - [Getter][#pObjects()] - [Setter][#pObjects(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRefreshObjectListKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t objectCount; +/// const VkRefreshObjectKHR * pObjects; +/// } VkRefreshObjectListKHR; +/// ``` +public final class VkRefreshObjectListKHR extends Struct { + /// The struct layout of `VkRefreshObjectListKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("objectCount"), + ValueLayout.ADDRESS.withName("pObjects") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `objectCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_objectCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("objectCount")); + /// The [VarHandle] of `pObjects` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pObjects = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pObjects")); + + /// Creates `VkRefreshObjectListKHR` with the given segment. + /// @param segment the memory segment + public VkRefreshObjectListKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRefreshObjectListKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRefreshObjectListKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRefreshObjectListKHR(segment); } + + /// Creates `VkRefreshObjectListKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRefreshObjectListKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRefreshObjectListKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRefreshObjectListKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRefreshObjectListKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRefreshObjectListKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRefreshObjectListKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRefreshObjectListKHR` + public static VkRefreshObjectListKHR alloc(SegmentAllocator allocator) { return new VkRefreshObjectListKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRefreshObjectListKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRefreshObjectListKHR` + public static VkRefreshObjectListKHR alloc(SegmentAllocator allocator, long count) { return new VkRefreshObjectListKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRefreshObjectListKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRefreshObjectListKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRefreshObjectListKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRefreshObjectListKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRefreshObjectListKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkRefreshObjectListKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRefreshObjectListKHR sType(@CType("VkStructureType") int value) { VkRefreshObjectListKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRefreshObjectListKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRefreshObjectListKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRefreshObjectListKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRefreshObjectListKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRefreshObjectListKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRefreshObjectListKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRefreshObjectListKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRefreshObjectListKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `objectCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_objectCount(MemorySegment segment, long index) { return (int) VH_objectCount.get(segment, 0L, index); } + /// {@return `objectCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_objectCount(MemorySegment segment) { return VkRefreshObjectListKHR.get_objectCount(segment, 0L); } + /// {@return `objectCount` at the given index} + /// @param index the index + public @CType("uint32_t") int objectCountAt(long index) { return VkRefreshObjectListKHR.get_objectCount(this.segment(), index); } + /// {@return `objectCount`} + public @CType("uint32_t") int objectCount() { return VkRefreshObjectListKHR.get_objectCount(this.segment()); } + /// Sets `objectCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_objectCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_objectCount.set(segment, 0L, index, value); } + /// Sets `objectCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_objectCount(MemorySegment segment, @CType("uint32_t") int value) { VkRefreshObjectListKHR.set_objectCount(segment, 0L, value); } + /// Sets `objectCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRefreshObjectListKHR objectCountAt(long index, @CType("uint32_t") int value) { VkRefreshObjectListKHR.set_objectCount(this.segment(), index, value); return this; } + /// Sets `objectCount` with the given value. + /// @param value the value + /// @return `this` + public VkRefreshObjectListKHR objectCount(@CType("uint32_t") int value) { VkRefreshObjectListKHR.set_objectCount(this.segment(), value); return this; } + + /// {@return `pObjects` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRefreshObjectKHR *") java.lang.foreign.MemorySegment get_pObjects(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pObjects.get(segment, 0L, index); } + /// {@return `pObjects`} + /// @param segment the segment of the struct + public static @CType("const VkRefreshObjectKHR *") java.lang.foreign.MemorySegment get_pObjects(MemorySegment segment) { return VkRefreshObjectListKHR.get_pObjects(segment, 0L); } + /// {@return `pObjects` at the given index} + /// @param index the index + public @CType("const VkRefreshObjectKHR *") java.lang.foreign.MemorySegment pObjectsAt(long index) { return VkRefreshObjectListKHR.get_pObjects(this.segment(), index); } + /// {@return `pObjects`} + public @CType("const VkRefreshObjectKHR *") java.lang.foreign.MemorySegment pObjects() { return VkRefreshObjectListKHR.get_pObjects(this.segment()); } + /// Sets `pObjects` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pObjects(MemorySegment segment, long index, @CType("const VkRefreshObjectKHR *") java.lang.foreign.MemorySegment value) { VH_pObjects.set(segment, 0L, index, value); } + /// Sets `pObjects` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pObjects(MemorySegment segment, @CType("const VkRefreshObjectKHR *") java.lang.foreign.MemorySegment value) { VkRefreshObjectListKHR.set_pObjects(segment, 0L, value); } + /// Sets `pObjects` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRefreshObjectListKHR pObjectsAt(long index, @CType("const VkRefreshObjectKHR *") java.lang.foreign.MemorySegment value) { VkRefreshObjectListKHR.set_pObjects(this.segment(), index, value); return this; } + /// Sets `pObjects` with the given value. + /// @param value the value + /// @return `this` + public VkRefreshObjectListKHR pObjects(@CType("const VkRefreshObjectKHR *") java.lang.foreign.MemorySegment value) { VkRefreshObjectListKHR.set_pObjects(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkReleaseCapturedPipelineDataInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkReleaseCapturedPipelineDataInfoKHR.java new file mode 100644 index 00000000..7c0f766c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkReleaseCapturedPipelineDataInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipeline +/// [VarHandle][#VH_pipeline] - [Getter][#pipeline()] - [Setter][#pipeline(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkReleaseCapturedPipelineDataInfoKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkPipeline pipeline; +/// } VkReleaseCapturedPipelineDataInfoKHR; +/// ``` +public final class VkReleaseCapturedPipelineDataInfoKHR extends Struct { + /// The struct layout of `VkReleaseCapturedPipelineDataInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pipeline") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipeline` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipeline")); + + /// Creates `VkReleaseCapturedPipelineDataInfoKHR` with the given segment. + /// @param segment the memory segment + public VkReleaseCapturedPipelineDataInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkReleaseCapturedPipelineDataInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkReleaseCapturedPipelineDataInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkReleaseCapturedPipelineDataInfoKHR(segment); } + + /// Creates `VkReleaseCapturedPipelineDataInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkReleaseCapturedPipelineDataInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkReleaseCapturedPipelineDataInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkReleaseCapturedPipelineDataInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkReleaseCapturedPipelineDataInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkReleaseCapturedPipelineDataInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkReleaseCapturedPipelineDataInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkReleaseCapturedPipelineDataInfoKHR` + public static VkReleaseCapturedPipelineDataInfoKHR alloc(SegmentAllocator allocator) { return new VkReleaseCapturedPipelineDataInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkReleaseCapturedPipelineDataInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkReleaseCapturedPipelineDataInfoKHR` + public static VkReleaseCapturedPipelineDataInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkReleaseCapturedPipelineDataInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkReleaseCapturedPipelineDataInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkReleaseCapturedPipelineDataInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkReleaseCapturedPipelineDataInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkReleaseCapturedPipelineDataInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkReleaseCapturedPipelineDataInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkReleaseCapturedPipelineDataInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkReleaseCapturedPipelineDataInfoKHR sType(@CType("VkStructureType") int value) { VkReleaseCapturedPipelineDataInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkReleaseCapturedPipelineDataInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkReleaseCapturedPipelineDataInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkReleaseCapturedPipelineDataInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkReleaseCapturedPipelineDataInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkReleaseCapturedPipelineDataInfoKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkReleaseCapturedPipelineDataInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkReleaseCapturedPipelineDataInfoKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkReleaseCapturedPipelineDataInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipeline.get(segment, 0L, index); } + /// {@return `pipeline`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment) { return VkReleaseCapturedPipelineDataInfoKHR.get_pipeline(segment, 0L); } + /// {@return `pipeline` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipelineAt(long index) { return VkReleaseCapturedPipelineDataInfoKHR.get_pipeline(this.segment(), index); } + /// {@return `pipeline`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipeline() { return VkReleaseCapturedPipelineDataInfoKHR.get_pipeline(this.segment()); } + /// Sets `pipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipeline(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_pipeline.set(segment, 0L, index, value); } + /// Sets `pipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipeline(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkReleaseCapturedPipelineDataInfoKHR.set_pipeline(segment, 0L, value); } + /// Sets `pipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkReleaseCapturedPipelineDataInfoKHR pipelineAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkReleaseCapturedPipelineDataInfoKHR.set_pipeline(this.segment(), index, value); return this; } + /// Sets `pipeline` with the given value. + /// @param value the value + /// @return `this` + public VkReleaseCapturedPipelineDataInfoKHR pipeline(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkReleaseCapturedPipelineDataInfoKHR.set_pipeline(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRenderingFragmentShadingRateAttachmentInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRenderingFragmentShadingRateAttachmentInfoKHR.java new file mode 100644 index 00000000..040b9c0f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkRenderingFragmentShadingRateAttachmentInfoKHR.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageView +/// [VarHandle][#VH_imageView] - [Getter][#imageView()] - [Setter][#imageView(java.lang.foreign.MemorySegment)] +/// ### imageLayout +/// [VarHandle][#VH_imageLayout] - [Getter][#imageLayout()] - [Setter][#imageLayout(int)] +/// ### shadingRateAttachmentTexelSize +/// [Byte offset][#OFFSET_shadingRateAttachmentTexelSize] - [Memory layout][#ML_shadingRateAttachmentTexelSize] - [Getter][#shadingRateAttachmentTexelSize()] - [Setter][#shadingRateAttachmentTexelSize(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderingFragmentShadingRateAttachmentInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageView imageView; +/// VkImageLayout imageLayout; +/// VkExtent2D shadingRateAttachmentTexelSize; +/// } VkRenderingFragmentShadingRateAttachmentInfoKHR; +/// ``` +public final class VkRenderingFragmentShadingRateAttachmentInfoKHR extends Struct { + /// The struct layout of `VkRenderingFragmentShadingRateAttachmentInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("imageView"), + ValueLayout.JAVA_INT.withName("imageLayout"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("shadingRateAttachmentTexelSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_imageView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageView")); + /// The [VarHandle] of `imageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageLayout")); + /// The byte offset of `shadingRateAttachmentTexelSize`. + public static final long OFFSET_shadingRateAttachmentTexelSize = LAYOUT.byteOffset(PathElement.groupElement("shadingRateAttachmentTexelSize")); + /// The memory layout of `shadingRateAttachmentTexelSize`. + public static final MemoryLayout ML_shadingRateAttachmentTexelSize = LAYOUT.select(PathElement.groupElement("shadingRateAttachmentTexelSize")); + + /// Creates `VkRenderingFragmentShadingRateAttachmentInfoKHR` with the given segment. + /// @param segment the memory segment + public VkRenderingFragmentShadingRateAttachmentInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderingFragmentShadingRateAttachmentInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingFragmentShadingRateAttachmentInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingFragmentShadingRateAttachmentInfoKHR(segment); } + + /// Creates `VkRenderingFragmentShadingRateAttachmentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingFragmentShadingRateAttachmentInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingFragmentShadingRateAttachmentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderingFragmentShadingRateAttachmentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingFragmentShadingRateAttachmentInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingFragmentShadingRateAttachmentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderingFragmentShadingRateAttachmentInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderingFragmentShadingRateAttachmentInfoKHR` + public static VkRenderingFragmentShadingRateAttachmentInfoKHR alloc(SegmentAllocator allocator) { return new VkRenderingFragmentShadingRateAttachmentInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderingFragmentShadingRateAttachmentInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderingFragmentShadingRateAttachmentInfoKHR` + public static VkRenderingFragmentShadingRateAttachmentInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkRenderingFragmentShadingRateAttachmentInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingFragmentShadingRateAttachmentInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingFragmentShadingRateAttachmentInfoKHR sType(@CType("VkStructureType") int value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingFragmentShadingRateAttachmentInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingFragmentShadingRateAttachmentInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `imageView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_imageView.get(segment, 0L, index); } + /// {@return `imageView`} + /// @param segment the segment of the struct + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment) { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_imageView(segment, 0L); } + /// {@return `imageView` at the given index} + /// @param index the index + public @CType("VkImageView") java.lang.foreign.MemorySegment imageViewAt(long index) { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_imageView(this.segment(), index); } + /// {@return `imageView`} + public @CType("VkImageView") java.lang.foreign.MemorySegment imageView() { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_imageView(this.segment()); } + /// Sets `imageView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageView(MemorySegment segment, long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VH_imageView.set(segment, 0L, index, value); } + /// Sets `imageView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageView(MemorySegment segment, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_imageView(segment, 0L, value); } + /// Sets `imageView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingFragmentShadingRateAttachmentInfoKHR imageViewAt(long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_imageView(this.segment(), index, value); return this; } + /// Sets `imageView` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingFragmentShadingRateAttachmentInfoKHR imageView(@CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_imageView(this.segment(), value); return this; } + + /// {@return `imageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_imageLayout(MemorySegment segment, long index) { return (int) VH_imageLayout.get(segment, 0L, index); } + /// {@return `imageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_imageLayout(MemorySegment segment) { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_imageLayout(segment, 0L); } + /// {@return `imageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int imageLayoutAt(long index) { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_imageLayout(this.segment(), index); } + /// {@return `imageLayout`} + public @CType("VkImageLayout") int imageLayout() { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_imageLayout(this.segment()); } + /// Sets `imageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_imageLayout.set(segment, 0L, index, value); } + /// Sets `imageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_imageLayout(segment, 0L, value); } + /// Sets `imageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingFragmentShadingRateAttachmentInfoKHR imageLayoutAt(long index, @CType("VkImageLayout") int value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_imageLayout(this.segment(), index, value); return this; } + /// Sets `imageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingFragmentShadingRateAttachmentInfoKHR imageLayout(@CType("VkImageLayout") int value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_imageLayout(this.segment(), value); return this; } + + /// {@return `shadingRateAttachmentTexelSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_shadingRateAttachmentTexelSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_shadingRateAttachmentTexelSize, index), ML_shadingRateAttachmentTexelSize); } + /// {@return `shadingRateAttachmentTexelSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_shadingRateAttachmentTexelSize(MemorySegment segment) { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_shadingRateAttachmentTexelSize(segment, 0L); } + /// {@return `shadingRateAttachmentTexelSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment shadingRateAttachmentTexelSizeAt(long index) { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_shadingRateAttachmentTexelSize(this.segment(), index); } + /// {@return `shadingRateAttachmentTexelSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment shadingRateAttachmentTexelSize() { return VkRenderingFragmentShadingRateAttachmentInfoKHR.get_shadingRateAttachmentTexelSize(this.segment()); } + /// Sets `shadingRateAttachmentTexelSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRateAttachmentTexelSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_shadingRateAttachmentTexelSize, index), ML_shadingRateAttachmentTexelSize.byteSize()); } + /// Sets `shadingRateAttachmentTexelSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRateAttachmentTexelSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_shadingRateAttachmentTexelSize(segment, 0L, value); } + /// Sets `shadingRateAttachmentTexelSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingFragmentShadingRateAttachmentInfoKHR shadingRateAttachmentTexelSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_shadingRateAttachmentTexelSize(this.segment(), index, value); return this; } + /// Sets `shadingRateAttachmentTexelSize` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingFragmentShadingRateAttachmentInfoKHR shadingRateAttachmentTexelSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkRenderingFragmentShadingRateAttachmentInfoKHR.set_shadingRateAttachmentTexelSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSemaphoreGetFdInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSemaphoreGetFdInfoKHR.java new file mode 100644 index 00000000..df41423b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSemaphoreGetFdInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreGetFdInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// VkExternalSemaphoreHandleTypeFlagBits handleType; +/// } VkSemaphoreGetFdInfoKHR; +/// ``` +public final class VkSemaphoreGetFdInfoKHR extends Struct { + /// The struct layout of `VkSemaphoreGetFdInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkSemaphoreGetFdInfoKHR` with the given segment. + /// @param segment the memory segment + public VkSemaphoreGetFdInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreGetFdInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetFdInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetFdInfoKHR(segment); } + + /// Creates `VkSemaphoreGetFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetFdInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreGetFdInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetFdInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetFdInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreGetFdInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreGetFdInfoKHR` + public static VkSemaphoreGetFdInfoKHR alloc(SegmentAllocator allocator) { return new VkSemaphoreGetFdInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreGetFdInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreGetFdInfoKHR` + public static VkSemaphoreGetFdInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreGetFdInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreGetFdInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreGetFdInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreGetFdInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreGetFdInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetFdInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreGetFdInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetFdInfoKHR sType(@CType("VkStructureType") int value) { VkSemaphoreGetFdInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreGetFdInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreGetFdInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreGetFdInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetFdInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetFdInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetFdInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetFdInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetFdInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkSemaphoreGetFdInfoKHR.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkSemaphoreGetFdInfoKHR.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkSemaphoreGetFdInfoKHR.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetFdInfoKHR.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetFdInfoKHR semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetFdInfoKHR.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetFdInfoKHR semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetFdInfoKHR.set_semaphore(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkSemaphoreGetFdInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleTypeAt(long index) { return VkSemaphoreGetFdInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleType() { return VkSemaphoreGetFdInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetFdInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetFdInfoKHR handleTypeAt(long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetFdInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetFdInfoKHR handleType(@CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetFdInfoKHR.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSemaphoreGetWin32HandleInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSemaphoreGetWin32HandleInfoKHR.java new file mode 100644 index 00000000..6f09056f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSemaphoreGetWin32HandleInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreGetWin32HandleInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// VkExternalSemaphoreHandleTypeFlagBits handleType; +/// } VkSemaphoreGetWin32HandleInfoKHR; +/// ``` +public final class VkSemaphoreGetWin32HandleInfoKHR extends Struct { + /// The struct layout of `VkSemaphoreGetWin32HandleInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkSemaphoreGetWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + public VkSemaphoreGetWin32HandleInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreGetWin32HandleInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetWin32HandleInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetWin32HandleInfoKHR(segment); } + + /// Creates `VkSemaphoreGetWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetWin32HandleInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreGetWin32HandleInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetWin32HandleInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetWin32HandleInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreGetWin32HandleInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreGetWin32HandleInfoKHR` + public static VkSemaphoreGetWin32HandleInfoKHR alloc(SegmentAllocator allocator) { return new VkSemaphoreGetWin32HandleInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreGetWin32HandleInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreGetWin32HandleInfoKHR` + public static VkSemaphoreGetWin32HandleInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreGetWin32HandleInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreGetWin32HandleInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreGetWin32HandleInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreGetWin32HandleInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreGetWin32HandleInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetWin32HandleInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreGetWin32HandleInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetWin32HandleInfoKHR sType(@CType("VkStructureType") int value) { VkSemaphoreGetWin32HandleInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreGetWin32HandleInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreGetWin32HandleInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreGetWin32HandleInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetWin32HandleInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetWin32HandleInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetWin32HandleInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetWin32HandleInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetWin32HandleInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkSemaphoreGetWin32HandleInfoKHR.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkSemaphoreGetWin32HandleInfoKHR.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkSemaphoreGetWin32HandleInfoKHR.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetWin32HandleInfoKHR.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetWin32HandleInfoKHR semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetWin32HandleInfoKHR.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetWin32HandleInfoKHR semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetWin32HandleInfoKHR.set_semaphore(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkSemaphoreGetWin32HandleInfoKHR.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleTypeAt(long index) { return VkSemaphoreGetWin32HandleInfoKHR.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleType() { return VkSemaphoreGetWin32HandleInfoKHR.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetWin32HandleInfoKHR.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetWin32HandleInfoKHR handleTypeAt(long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetWin32HandleInfoKHR.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetWin32HandleInfoKHR handleType(@CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetWin32HandleInfoKHR.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSharedPresentSurfaceCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSharedPresentSurfaceCapabilitiesKHR.java new file mode 100644 index 00000000..3b4b03ad --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSharedPresentSurfaceCapabilitiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sharedPresentSupportedUsageFlags +/// [VarHandle][#VH_sharedPresentSupportedUsageFlags] - [Getter][#sharedPresentSupportedUsageFlags()] - [Setter][#sharedPresentSupportedUsageFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSharedPresentSurfaceCapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkImageUsageFlags sharedPresentSupportedUsageFlags; +/// } VkSharedPresentSurfaceCapabilitiesKHR; +/// ``` +public final class VkSharedPresentSurfaceCapabilitiesKHR extends Struct { + /// The struct layout of `VkSharedPresentSurfaceCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sharedPresentSupportedUsageFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sharedPresentSupportedUsageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sharedPresentSupportedUsageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sharedPresentSupportedUsageFlags")); + + /// Creates `VkSharedPresentSurfaceCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkSharedPresentSurfaceCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSharedPresentSurfaceCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSharedPresentSurfaceCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSharedPresentSurfaceCapabilitiesKHR(segment); } + + /// Creates `VkSharedPresentSurfaceCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSharedPresentSurfaceCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSharedPresentSurfaceCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSharedPresentSurfaceCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSharedPresentSurfaceCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSharedPresentSurfaceCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSharedPresentSurfaceCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSharedPresentSurfaceCapabilitiesKHR` + public static VkSharedPresentSurfaceCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkSharedPresentSurfaceCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSharedPresentSurfaceCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSharedPresentSurfaceCapabilitiesKHR` + public static VkSharedPresentSurfaceCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkSharedPresentSurfaceCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSharedPresentSurfaceCapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSharedPresentSurfaceCapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSharedPresentSurfaceCapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSharedPresentSurfaceCapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSharedPresentSurfaceCapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkSharedPresentSurfaceCapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSharedPresentSurfaceCapabilitiesKHR sType(@CType("VkStructureType") int value) { VkSharedPresentSurfaceCapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSharedPresentSurfaceCapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSharedPresentSurfaceCapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSharedPresentSurfaceCapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSharedPresentSurfaceCapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSharedPresentSurfaceCapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSharedPresentSurfaceCapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSharedPresentSurfaceCapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSharedPresentSurfaceCapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `sharedPresentSupportedUsageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_sharedPresentSupportedUsageFlags(MemorySegment segment, long index) { return (int) VH_sharedPresentSupportedUsageFlags.get(segment, 0L, index); } + /// {@return `sharedPresentSupportedUsageFlags`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_sharedPresentSupportedUsageFlags(MemorySegment segment) { return VkSharedPresentSurfaceCapabilitiesKHR.get_sharedPresentSupportedUsageFlags(segment, 0L); } + /// {@return `sharedPresentSupportedUsageFlags` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int sharedPresentSupportedUsageFlagsAt(long index) { return VkSharedPresentSurfaceCapabilitiesKHR.get_sharedPresentSupportedUsageFlags(this.segment(), index); } + /// {@return `sharedPresentSupportedUsageFlags`} + public @CType("VkImageUsageFlags") int sharedPresentSupportedUsageFlags() { return VkSharedPresentSurfaceCapabilitiesKHR.get_sharedPresentSupportedUsageFlags(this.segment()); } + /// Sets `sharedPresentSupportedUsageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sharedPresentSupportedUsageFlags(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_sharedPresentSupportedUsageFlags.set(segment, 0L, index, value); } + /// Sets `sharedPresentSupportedUsageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sharedPresentSupportedUsageFlags(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkSharedPresentSurfaceCapabilitiesKHR.set_sharedPresentSupportedUsageFlags(segment, 0L, value); } + /// Sets `sharedPresentSupportedUsageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSharedPresentSurfaceCapabilitiesKHR sharedPresentSupportedUsageFlagsAt(long index, @CType("VkImageUsageFlags") int value) { VkSharedPresentSurfaceCapabilitiesKHR.set_sharedPresentSupportedUsageFlags(this.segment(), index, value); return this; } + /// Sets `sharedPresentSupportedUsageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkSharedPresentSurfaceCapabilitiesKHR sharedPresentSupportedUsageFlags(@CType("VkImageUsageFlags") int value) { VkSharedPresentSurfaceCapabilitiesKHR.set_sharedPresentSupportedUsageFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkStridedDeviceAddressRegionKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkStridedDeviceAddressRegionKHR.java new file mode 100644 index 00000000..99e1b827 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkStridedDeviceAddressRegionKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### deviceAddress +/// [VarHandle][#VH_deviceAddress] - [Getter][#deviceAddress()] - [Setter][#deviceAddress(long)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkStridedDeviceAddressRegionKHR { +/// VkDeviceAddress deviceAddress; +/// VkDeviceSize stride; +/// VkDeviceSize size; +/// } VkStridedDeviceAddressRegionKHR; +/// ``` +public final class VkStridedDeviceAddressRegionKHR extends Struct { + /// The struct layout of `VkStridedDeviceAddressRegionKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("deviceAddress"), + ValueLayout.JAVA_LONG.withName("stride"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `deviceAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_deviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceAddress")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkStridedDeviceAddressRegionKHR` with the given segment. + /// @param segment the memory segment + public VkStridedDeviceAddressRegionKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkStridedDeviceAddressRegionKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkStridedDeviceAddressRegionKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkStridedDeviceAddressRegionKHR(segment); } + + /// Creates `VkStridedDeviceAddressRegionKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkStridedDeviceAddressRegionKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkStridedDeviceAddressRegionKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkStridedDeviceAddressRegionKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkStridedDeviceAddressRegionKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkStridedDeviceAddressRegionKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkStridedDeviceAddressRegionKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkStridedDeviceAddressRegionKHR` + public static VkStridedDeviceAddressRegionKHR alloc(SegmentAllocator allocator) { return new VkStridedDeviceAddressRegionKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkStridedDeviceAddressRegionKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkStridedDeviceAddressRegionKHR` + public static VkStridedDeviceAddressRegionKHR alloc(SegmentAllocator allocator, long count) { return new VkStridedDeviceAddressRegionKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `deviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment, long index) { return (long) VH_deviceAddress.get(segment, 0L, index); } + /// {@return `deviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment) { return VkStridedDeviceAddressRegionKHR.get_deviceAddress(segment, 0L); } + /// {@return `deviceAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long deviceAddressAt(long index) { return VkStridedDeviceAddressRegionKHR.get_deviceAddress(this.segment(), index); } + /// {@return `deviceAddress`} + public @CType("VkDeviceAddress") long deviceAddress() { return VkStridedDeviceAddressRegionKHR.get_deviceAddress(this.segment()); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_deviceAddress.set(segment, 0L, index, value); } + /// Sets `deviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkStridedDeviceAddressRegionKHR.set_deviceAddress(segment, 0L, value); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStridedDeviceAddressRegionKHR deviceAddressAt(long index, @CType("VkDeviceAddress") long value) { VkStridedDeviceAddressRegionKHR.set_deviceAddress(this.segment(), index, value); return this; } + /// Sets `deviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkStridedDeviceAddressRegionKHR deviceAddress(@CType("VkDeviceAddress") long value) { VkStridedDeviceAddressRegionKHR.set_deviceAddress(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_stride(MemorySegment segment, long index) { return (long) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_stride(MemorySegment segment) { return VkStridedDeviceAddressRegionKHR.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long strideAt(long index) { return VkStridedDeviceAddressRegionKHR.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("VkDeviceSize") long stride() { return VkStridedDeviceAddressRegionKHR.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkStridedDeviceAddressRegionKHR.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStridedDeviceAddressRegionKHR strideAt(long index, @CType("VkDeviceSize") long value) { VkStridedDeviceAddressRegionKHR.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkStridedDeviceAddressRegionKHR stride(@CType("VkDeviceSize") long value) { VkStridedDeviceAddressRegionKHR.set_stride(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkStridedDeviceAddressRegionKHR.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkStridedDeviceAddressRegionKHR.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkStridedDeviceAddressRegionKHR.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkStridedDeviceAddressRegionKHR.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStridedDeviceAddressRegionKHR sizeAt(long index, @CType("VkDeviceSize") long value) { VkStridedDeviceAddressRegionKHR.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkStridedDeviceAddressRegionKHR size(@CType("VkDeviceSize") long value) { VkStridedDeviceAddressRegionKHR.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceCapabilities2KHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceCapabilities2KHR.java new file mode 100644 index 00000000..23add36a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceCapabilities2KHR.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### surfaceCapabilities +/// [Byte offset][#OFFSET_surfaceCapabilities] - [Memory layout][#ML_surfaceCapabilities] - [Getter][#surfaceCapabilities()] - [Setter][#surfaceCapabilities(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfaceCapabilities2KHR { +/// VkStructureType sType; +/// void * pNext; +/// VkSurfaceCapabilitiesKHR surfaceCapabilities; +/// } VkSurfaceCapabilities2KHR; +/// ``` +public final class VkSurfaceCapabilities2KHR extends Struct { + /// The struct layout of `VkSurfaceCapabilities2KHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.khr.struct.VkSurfaceCapabilitiesKHR.LAYOUT.withName("surfaceCapabilities") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `surfaceCapabilities`. + public static final long OFFSET_surfaceCapabilities = LAYOUT.byteOffset(PathElement.groupElement("surfaceCapabilities")); + /// The memory layout of `surfaceCapabilities`. + public static final MemoryLayout ML_surfaceCapabilities = LAYOUT.select(PathElement.groupElement("surfaceCapabilities")); + + /// Creates `VkSurfaceCapabilities2KHR` with the given segment. + /// @param segment the memory segment + public VkSurfaceCapabilities2KHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfaceCapabilities2KHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilities2KHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilities2KHR(segment); } + + /// Creates `VkSurfaceCapabilities2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilities2KHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilities2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfaceCapabilities2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilities2KHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilities2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfaceCapabilities2KHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfaceCapabilities2KHR` + public static VkSurfaceCapabilities2KHR alloc(SegmentAllocator allocator) { return new VkSurfaceCapabilities2KHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfaceCapabilities2KHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfaceCapabilities2KHR` + public static VkSurfaceCapabilities2KHR alloc(SegmentAllocator allocator, long count) { return new VkSurfaceCapabilities2KHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfaceCapabilities2KHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfaceCapabilities2KHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfaceCapabilities2KHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfaceCapabilities2KHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2KHR sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfaceCapabilities2KHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2KHR sType(@CType("VkStructureType") int value) { VkSurfaceCapabilities2KHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfaceCapabilities2KHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfaceCapabilities2KHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSurfaceCapabilities2KHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2KHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2KHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2KHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2KHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2KHR.set_pNext(this.segment(), value); return this; } + + /// {@return `surfaceCapabilities` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceCapabilitiesKHR") java.lang.foreign.MemorySegment get_surfaceCapabilities(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_surfaceCapabilities, index), ML_surfaceCapabilities); } + /// {@return `surfaceCapabilities`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceCapabilitiesKHR") java.lang.foreign.MemorySegment get_surfaceCapabilities(MemorySegment segment) { return VkSurfaceCapabilities2KHR.get_surfaceCapabilities(segment, 0L); } + /// {@return `surfaceCapabilities` at the given index} + /// @param index the index + public @CType("VkSurfaceCapabilitiesKHR") java.lang.foreign.MemorySegment surfaceCapabilitiesAt(long index) { return VkSurfaceCapabilities2KHR.get_surfaceCapabilities(this.segment(), index); } + /// {@return `surfaceCapabilities`} + public @CType("VkSurfaceCapabilitiesKHR") java.lang.foreign.MemorySegment surfaceCapabilities() { return VkSurfaceCapabilities2KHR.get_surfaceCapabilities(this.segment()); } + /// Sets `surfaceCapabilities` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_surfaceCapabilities(MemorySegment segment, long index, @CType("VkSurfaceCapabilitiesKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_surfaceCapabilities, index), ML_surfaceCapabilities.byteSize()); } + /// Sets `surfaceCapabilities` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_surfaceCapabilities(MemorySegment segment, @CType("VkSurfaceCapabilitiesKHR") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2KHR.set_surfaceCapabilities(segment, 0L, value); } + /// Sets `surfaceCapabilities` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2KHR surfaceCapabilitiesAt(long index, @CType("VkSurfaceCapabilitiesKHR") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2KHR.set_surfaceCapabilities(this.segment(), index, value); return this; } + /// Sets `surfaceCapabilities` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilities2KHR surfaceCapabilities(@CType("VkSurfaceCapabilitiesKHR") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilities2KHR.set_surfaceCapabilities(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceCapabilitiesKHR.java new file mode 100644 index 00000000..aa7c9167 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceCapabilitiesKHR.java @@ -0,0 +1,450 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### minImageCount +/// [VarHandle][#VH_minImageCount] - [Getter][#minImageCount()] - [Setter][#minImageCount(int)] +/// ### maxImageCount +/// [VarHandle][#VH_maxImageCount] - [Getter][#maxImageCount()] - [Setter][#maxImageCount(int)] +/// ### currentExtent +/// [Byte offset][#OFFSET_currentExtent] - [Memory layout][#ML_currentExtent] - [Getter][#currentExtent()] - [Setter][#currentExtent(java.lang.foreign.MemorySegment)] +/// ### minImageExtent +/// [Byte offset][#OFFSET_minImageExtent] - [Memory layout][#ML_minImageExtent] - [Getter][#minImageExtent()] - [Setter][#minImageExtent(java.lang.foreign.MemorySegment)] +/// ### maxImageExtent +/// [Byte offset][#OFFSET_maxImageExtent] - [Memory layout][#ML_maxImageExtent] - [Getter][#maxImageExtent()] - [Setter][#maxImageExtent(java.lang.foreign.MemorySegment)] +/// ### maxImageArrayLayers +/// [VarHandle][#VH_maxImageArrayLayers] - [Getter][#maxImageArrayLayers()] - [Setter][#maxImageArrayLayers(int)] +/// ### supportedTransforms +/// [VarHandle][#VH_supportedTransforms] - [Getter][#supportedTransforms()] - [Setter][#supportedTransforms(int)] +/// ### currentTransform +/// [VarHandle][#VH_currentTransform] - [Getter][#currentTransform()] - [Setter][#currentTransform(int)] +/// ### supportedCompositeAlpha +/// [VarHandle][#VH_supportedCompositeAlpha] - [Getter][#supportedCompositeAlpha()] - [Setter][#supportedCompositeAlpha(int)] +/// ### supportedUsageFlags +/// [VarHandle][#VH_supportedUsageFlags] - [Getter][#supportedUsageFlags()] - [Setter][#supportedUsageFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfaceCapabilitiesKHR { +/// uint32_t minImageCount; +/// uint32_t maxImageCount; +/// VkExtent2D currentExtent; +/// VkExtent2D minImageExtent; +/// VkExtent2D maxImageExtent; +/// uint32_t maxImageArrayLayers; +/// VkSurfaceTransformFlagsKHR supportedTransforms; +/// VkSurfaceTransformFlagBitsKHR currentTransform; +/// VkCompositeAlphaFlagsKHR supportedCompositeAlpha; +/// VkImageUsageFlags supportedUsageFlags; +/// } VkSurfaceCapabilitiesKHR; +/// ``` +public final class VkSurfaceCapabilitiesKHR extends Struct { + /// The struct layout of `VkSurfaceCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("minImageCount"), + ValueLayout.JAVA_INT.withName("maxImageCount"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("currentExtent"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("minImageExtent"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxImageExtent"), + ValueLayout.JAVA_INT.withName("maxImageArrayLayers"), + ValueLayout.JAVA_INT.withName("supportedTransforms"), + ValueLayout.JAVA_INT.withName("currentTransform"), + ValueLayout.JAVA_INT.withName("supportedCompositeAlpha"), + ValueLayout.JAVA_INT.withName("supportedUsageFlags") + ); + /// The [VarHandle] of `minImageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minImageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minImageCount")); + /// The [VarHandle] of `maxImageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageCount")); + /// The byte offset of `currentExtent`. + public static final long OFFSET_currentExtent = LAYOUT.byteOffset(PathElement.groupElement("currentExtent")); + /// The memory layout of `currentExtent`. + public static final MemoryLayout ML_currentExtent = LAYOUT.select(PathElement.groupElement("currentExtent")); + /// The byte offset of `minImageExtent`. + public static final long OFFSET_minImageExtent = LAYOUT.byteOffset(PathElement.groupElement("minImageExtent")); + /// The memory layout of `minImageExtent`. + public static final MemoryLayout ML_minImageExtent = LAYOUT.select(PathElement.groupElement("minImageExtent")); + /// The byte offset of `maxImageExtent`. + public static final long OFFSET_maxImageExtent = LAYOUT.byteOffset(PathElement.groupElement("maxImageExtent")); + /// The memory layout of `maxImageExtent`. + public static final MemoryLayout ML_maxImageExtent = LAYOUT.select(PathElement.groupElement("maxImageExtent")); + /// The [VarHandle] of `maxImageArrayLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageArrayLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageArrayLayers")); + /// The [VarHandle] of `supportedTransforms` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedTransforms = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedTransforms")); + /// The [VarHandle] of `currentTransform` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_currentTransform = LAYOUT.arrayElementVarHandle(PathElement.groupElement("currentTransform")); + /// The [VarHandle] of `supportedCompositeAlpha` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedCompositeAlpha = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedCompositeAlpha")); + /// The [VarHandle] of `supportedUsageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedUsageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedUsageFlags")); + + /// Creates `VkSurfaceCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkSurfaceCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfaceCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilitiesKHR(segment); } + + /// Creates `VkSurfaceCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfaceCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfaceCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfaceCapabilitiesKHR` + public static VkSurfaceCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkSurfaceCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfaceCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfaceCapabilitiesKHR` + public static VkSurfaceCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkSurfaceCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `minImageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minImageCount(MemorySegment segment, long index) { return (int) VH_minImageCount.get(segment, 0L, index); } + /// {@return `minImageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minImageCount(MemorySegment segment) { return VkSurfaceCapabilitiesKHR.get_minImageCount(segment, 0L); } + /// {@return `minImageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int minImageCountAt(long index) { return VkSurfaceCapabilitiesKHR.get_minImageCount(this.segment(), index); } + /// {@return `minImageCount`} + public @CType("uint32_t") int minImageCount() { return VkSurfaceCapabilitiesKHR.get_minImageCount(this.segment()); } + /// Sets `minImageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minImageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minImageCount.set(segment, 0L, index, value); } + /// Sets `minImageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minImageCount(MemorySegment segment, @CType("uint32_t") int value) { VkSurfaceCapabilitiesKHR.set_minImageCount(segment, 0L, value); } + /// Sets `minImageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR minImageCountAt(long index, @CType("uint32_t") int value) { VkSurfaceCapabilitiesKHR.set_minImageCount(this.segment(), index, value); return this; } + /// Sets `minImageCount` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR minImageCount(@CType("uint32_t") int value) { VkSurfaceCapabilitiesKHR.set_minImageCount(this.segment(), value); return this; } + + /// {@return `maxImageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageCount(MemorySegment segment, long index) { return (int) VH_maxImageCount.get(segment, 0L, index); } + /// {@return `maxImageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageCount(MemorySegment segment) { return VkSurfaceCapabilitiesKHR.get_maxImageCount(segment, 0L); } + /// {@return `maxImageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageCountAt(long index) { return VkSurfaceCapabilitiesKHR.get_maxImageCount(this.segment(), index); } + /// {@return `maxImageCount`} + public @CType("uint32_t") int maxImageCount() { return VkSurfaceCapabilitiesKHR.get_maxImageCount(this.segment()); } + /// Sets `maxImageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageCount.set(segment, 0L, index, value); } + /// Sets `maxImageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageCount(MemorySegment segment, @CType("uint32_t") int value) { VkSurfaceCapabilitiesKHR.set_maxImageCount(segment, 0L, value); } + /// Sets `maxImageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR maxImageCountAt(long index, @CType("uint32_t") int value) { VkSurfaceCapabilitiesKHR.set_maxImageCount(this.segment(), index, value); return this; } + /// Sets `maxImageCount` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR maxImageCount(@CType("uint32_t") int value) { VkSurfaceCapabilitiesKHR.set_maxImageCount(this.segment(), value); return this; } + + /// {@return `currentExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_currentExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_currentExtent, index), ML_currentExtent); } + /// {@return `currentExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_currentExtent(MemorySegment segment) { return VkSurfaceCapabilitiesKHR.get_currentExtent(segment, 0L); } + /// {@return `currentExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment currentExtentAt(long index) { return VkSurfaceCapabilitiesKHR.get_currentExtent(this.segment(), index); } + /// {@return `currentExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment currentExtent() { return VkSurfaceCapabilitiesKHR.get_currentExtent(this.segment()); } + /// Sets `currentExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_currentExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_currentExtent, index), ML_currentExtent.byteSize()); } + /// Sets `currentExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_currentExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesKHR.set_currentExtent(segment, 0L, value); } + /// Sets `currentExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR currentExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesKHR.set_currentExtent(this.segment(), index, value); return this; } + /// Sets `currentExtent` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR currentExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesKHR.set_currentExtent(this.segment(), value); return this; } + + /// {@return `minImageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minImageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minImageExtent, index), ML_minImageExtent); } + /// {@return `minImageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minImageExtent(MemorySegment segment) { return VkSurfaceCapabilitiesKHR.get_minImageExtent(segment, 0L); } + /// {@return `minImageExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minImageExtentAt(long index) { return VkSurfaceCapabilitiesKHR.get_minImageExtent(this.segment(), index); } + /// {@return `minImageExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minImageExtent() { return VkSurfaceCapabilitiesKHR.get_minImageExtent(this.segment()); } + /// Sets `minImageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minImageExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minImageExtent, index), ML_minImageExtent.byteSize()); } + /// Sets `minImageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minImageExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesKHR.set_minImageExtent(segment, 0L, value); } + /// Sets `minImageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR minImageExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesKHR.set_minImageExtent(this.segment(), index, value); return this; } + /// Sets `minImageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR minImageExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesKHR.set_minImageExtent(this.segment(), value); return this; } + + /// {@return `maxImageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxImageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxImageExtent, index), ML_maxImageExtent); } + /// {@return `maxImageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxImageExtent(MemorySegment segment) { return VkSurfaceCapabilitiesKHR.get_maxImageExtent(segment, 0L); } + /// {@return `maxImageExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxImageExtentAt(long index) { return VkSurfaceCapabilitiesKHR.get_maxImageExtent(this.segment(), index); } + /// {@return `maxImageExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxImageExtent() { return VkSurfaceCapabilitiesKHR.get_maxImageExtent(this.segment()); } + /// Sets `maxImageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxImageExtent, index), ML_maxImageExtent.byteSize()); } + /// Sets `maxImageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesKHR.set_maxImageExtent(segment, 0L, value); } + /// Sets `maxImageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR maxImageExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesKHR.set_maxImageExtent(this.segment(), index, value); return this; } + /// Sets `maxImageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR maxImageExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesKHR.set_maxImageExtent(this.segment(), value); return this; } + + /// {@return `maxImageArrayLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageArrayLayers(MemorySegment segment, long index) { return (int) VH_maxImageArrayLayers.get(segment, 0L, index); } + /// {@return `maxImageArrayLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageArrayLayers(MemorySegment segment) { return VkSurfaceCapabilitiesKHR.get_maxImageArrayLayers(segment, 0L); } + /// {@return `maxImageArrayLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageArrayLayersAt(long index) { return VkSurfaceCapabilitiesKHR.get_maxImageArrayLayers(this.segment(), index); } + /// {@return `maxImageArrayLayers`} + public @CType("uint32_t") int maxImageArrayLayers() { return VkSurfaceCapabilitiesKHR.get_maxImageArrayLayers(this.segment()); } + /// Sets `maxImageArrayLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageArrayLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageArrayLayers.set(segment, 0L, index, value); } + /// Sets `maxImageArrayLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageArrayLayers(MemorySegment segment, @CType("uint32_t") int value) { VkSurfaceCapabilitiesKHR.set_maxImageArrayLayers(segment, 0L, value); } + /// Sets `maxImageArrayLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR maxImageArrayLayersAt(long index, @CType("uint32_t") int value) { VkSurfaceCapabilitiesKHR.set_maxImageArrayLayers(this.segment(), index, value); return this; } + /// Sets `maxImageArrayLayers` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR maxImageArrayLayers(@CType("uint32_t") int value) { VkSurfaceCapabilitiesKHR.set_maxImageArrayLayers(this.segment(), value); return this; } + + /// {@return `supportedTransforms` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceTransformFlagsKHR") int get_supportedTransforms(MemorySegment segment, long index) { return (int) VH_supportedTransforms.get(segment, 0L, index); } + /// {@return `supportedTransforms`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceTransformFlagsKHR") int get_supportedTransforms(MemorySegment segment) { return VkSurfaceCapabilitiesKHR.get_supportedTransforms(segment, 0L); } + /// {@return `supportedTransforms` at the given index} + /// @param index the index + public @CType("VkSurfaceTransformFlagsKHR") int supportedTransformsAt(long index) { return VkSurfaceCapabilitiesKHR.get_supportedTransforms(this.segment(), index); } + /// {@return `supportedTransforms`} + public @CType("VkSurfaceTransformFlagsKHR") int supportedTransforms() { return VkSurfaceCapabilitiesKHR.get_supportedTransforms(this.segment()); } + /// Sets `supportedTransforms` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedTransforms(MemorySegment segment, long index, @CType("VkSurfaceTransformFlagsKHR") int value) { VH_supportedTransforms.set(segment, 0L, index, value); } + /// Sets `supportedTransforms` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedTransforms(MemorySegment segment, @CType("VkSurfaceTransformFlagsKHR") int value) { VkSurfaceCapabilitiesKHR.set_supportedTransforms(segment, 0L, value); } + /// Sets `supportedTransforms` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR supportedTransformsAt(long index, @CType("VkSurfaceTransformFlagsKHR") int value) { VkSurfaceCapabilitiesKHR.set_supportedTransforms(this.segment(), index, value); return this; } + /// Sets `supportedTransforms` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR supportedTransforms(@CType("VkSurfaceTransformFlagsKHR") int value) { VkSurfaceCapabilitiesKHR.set_supportedTransforms(this.segment(), value); return this; } + + /// {@return `currentTransform` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_currentTransform(MemorySegment segment, long index) { return (int) VH_currentTransform.get(segment, 0L, index); } + /// {@return `currentTransform`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_currentTransform(MemorySegment segment) { return VkSurfaceCapabilitiesKHR.get_currentTransform(segment, 0L); } + /// {@return `currentTransform` at the given index} + /// @param index the index + public @CType("VkSurfaceTransformFlagBitsKHR") int currentTransformAt(long index) { return VkSurfaceCapabilitiesKHR.get_currentTransform(this.segment(), index); } + /// {@return `currentTransform`} + public @CType("VkSurfaceTransformFlagBitsKHR") int currentTransform() { return VkSurfaceCapabilitiesKHR.get_currentTransform(this.segment()); } + /// Sets `currentTransform` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_currentTransform(MemorySegment segment, long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VH_currentTransform.set(segment, 0L, index, value); } + /// Sets `currentTransform` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_currentTransform(MemorySegment segment, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkSurfaceCapabilitiesKHR.set_currentTransform(segment, 0L, value); } + /// Sets `currentTransform` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR currentTransformAt(long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkSurfaceCapabilitiesKHR.set_currentTransform(this.segment(), index, value); return this; } + /// Sets `currentTransform` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR currentTransform(@CType("VkSurfaceTransformFlagBitsKHR") int value) { VkSurfaceCapabilitiesKHR.set_currentTransform(this.segment(), value); return this; } + + /// {@return `supportedCompositeAlpha` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCompositeAlphaFlagsKHR") int get_supportedCompositeAlpha(MemorySegment segment, long index) { return (int) VH_supportedCompositeAlpha.get(segment, 0L, index); } + /// {@return `supportedCompositeAlpha`} + /// @param segment the segment of the struct + public static @CType("VkCompositeAlphaFlagsKHR") int get_supportedCompositeAlpha(MemorySegment segment) { return VkSurfaceCapabilitiesKHR.get_supportedCompositeAlpha(segment, 0L); } + /// {@return `supportedCompositeAlpha` at the given index} + /// @param index the index + public @CType("VkCompositeAlphaFlagsKHR") int supportedCompositeAlphaAt(long index) { return VkSurfaceCapabilitiesKHR.get_supportedCompositeAlpha(this.segment(), index); } + /// {@return `supportedCompositeAlpha`} + public @CType("VkCompositeAlphaFlagsKHR") int supportedCompositeAlpha() { return VkSurfaceCapabilitiesKHR.get_supportedCompositeAlpha(this.segment()); } + /// Sets `supportedCompositeAlpha` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedCompositeAlpha(MemorySegment segment, long index, @CType("VkCompositeAlphaFlagsKHR") int value) { VH_supportedCompositeAlpha.set(segment, 0L, index, value); } + /// Sets `supportedCompositeAlpha` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedCompositeAlpha(MemorySegment segment, @CType("VkCompositeAlphaFlagsKHR") int value) { VkSurfaceCapabilitiesKHR.set_supportedCompositeAlpha(segment, 0L, value); } + /// Sets `supportedCompositeAlpha` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR supportedCompositeAlphaAt(long index, @CType("VkCompositeAlphaFlagsKHR") int value) { VkSurfaceCapabilitiesKHR.set_supportedCompositeAlpha(this.segment(), index, value); return this; } + /// Sets `supportedCompositeAlpha` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR supportedCompositeAlpha(@CType("VkCompositeAlphaFlagsKHR") int value) { VkSurfaceCapabilitiesKHR.set_supportedCompositeAlpha(this.segment(), value); return this; } + + /// {@return `supportedUsageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_supportedUsageFlags(MemorySegment segment, long index) { return (int) VH_supportedUsageFlags.get(segment, 0L, index); } + /// {@return `supportedUsageFlags`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_supportedUsageFlags(MemorySegment segment) { return VkSurfaceCapabilitiesKHR.get_supportedUsageFlags(segment, 0L); } + /// {@return `supportedUsageFlags` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int supportedUsageFlagsAt(long index) { return VkSurfaceCapabilitiesKHR.get_supportedUsageFlags(this.segment(), index); } + /// {@return `supportedUsageFlags`} + public @CType("VkImageUsageFlags") int supportedUsageFlags() { return VkSurfaceCapabilitiesKHR.get_supportedUsageFlags(this.segment()); } + /// Sets `supportedUsageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedUsageFlags(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_supportedUsageFlags.set(segment, 0L, index, value); } + /// Sets `supportedUsageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedUsageFlags(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkSurfaceCapabilitiesKHR.set_supportedUsageFlags(segment, 0L, value); } + /// Sets `supportedUsageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR supportedUsageFlagsAt(long index, @CType("VkImageUsageFlags") int value) { VkSurfaceCapabilitiesKHR.set_supportedUsageFlags(this.segment(), index, value); return this; } + /// Sets `supportedUsageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesKHR supportedUsageFlags(@CType("VkImageUsageFlags") int value) { VkSurfaceCapabilitiesKHR.set_supportedUsageFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceFormat2KHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceFormat2KHR.java new file mode 100644 index 00000000..fada16c8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceFormat2KHR.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### surfaceFormat +/// [Byte offset][#OFFSET_surfaceFormat] - [Memory layout][#ML_surfaceFormat] - [Getter][#surfaceFormat()] - [Setter][#surfaceFormat(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfaceFormat2KHR { +/// VkStructureType sType; +/// void * pNext; +/// VkSurfaceFormatKHR surfaceFormat; +/// } VkSurfaceFormat2KHR; +/// ``` +public final class VkSurfaceFormat2KHR extends Struct { + /// The struct layout of `VkSurfaceFormat2KHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.khr.struct.VkSurfaceFormatKHR.LAYOUT.withName("surfaceFormat") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `surfaceFormat`. + public static final long OFFSET_surfaceFormat = LAYOUT.byteOffset(PathElement.groupElement("surfaceFormat")); + /// The memory layout of `surfaceFormat`. + public static final MemoryLayout ML_surfaceFormat = LAYOUT.select(PathElement.groupElement("surfaceFormat")); + + /// Creates `VkSurfaceFormat2KHR` with the given segment. + /// @param segment the memory segment + public VkSurfaceFormat2KHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfaceFormat2KHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFormat2KHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFormat2KHR(segment); } + + /// Creates `VkSurfaceFormat2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFormat2KHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFormat2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfaceFormat2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFormat2KHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFormat2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfaceFormat2KHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfaceFormat2KHR` + public static VkSurfaceFormat2KHR alloc(SegmentAllocator allocator) { return new VkSurfaceFormat2KHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfaceFormat2KHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfaceFormat2KHR` + public static VkSurfaceFormat2KHR alloc(SegmentAllocator allocator, long count) { return new VkSurfaceFormat2KHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfaceFormat2KHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfaceFormat2KHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfaceFormat2KHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfaceFormat2KHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFormat2KHR sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfaceFormat2KHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFormat2KHR sType(@CType("VkStructureType") int value) { VkSurfaceFormat2KHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfaceFormat2KHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfaceFormat2KHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSurfaceFormat2KHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceFormat2KHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFormat2KHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceFormat2KHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFormat2KHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceFormat2KHR.set_pNext(this.segment(), value); return this; } + + /// {@return `surfaceFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceFormatKHR") java.lang.foreign.MemorySegment get_surfaceFormat(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_surfaceFormat, index), ML_surfaceFormat); } + /// {@return `surfaceFormat`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceFormatKHR") java.lang.foreign.MemorySegment get_surfaceFormat(MemorySegment segment) { return VkSurfaceFormat2KHR.get_surfaceFormat(segment, 0L); } + /// {@return `surfaceFormat` at the given index} + /// @param index the index + public @CType("VkSurfaceFormatKHR") java.lang.foreign.MemorySegment surfaceFormatAt(long index) { return VkSurfaceFormat2KHR.get_surfaceFormat(this.segment(), index); } + /// {@return `surfaceFormat`} + public @CType("VkSurfaceFormatKHR") java.lang.foreign.MemorySegment surfaceFormat() { return VkSurfaceFormat2KHR.get_surfaceFormat(this.segment()); } + /// Sets `surfaceFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_surfaceFormat(MemorySegment segment, long index, @CType("VkSurfaceFormatKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_surfaceFormat, index), ML_surfaceFormat.byteSize()); } + /// Sets `surfaceFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_surfaceFormat(MemorySegment segment, @CType("VkSurfaceFormatKHR") java.lang.foreign.MemorySegment value) { VkSurfaceFormat2KHR.set_surfaceFormat(segment, 0L, value); } + /// Sets `surfaceFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFormat2KHR surfaceFormatAt(long index, @CType("VkSurfaceFormatKHR") java.lang.foreign.MemorySegment value) { VkSurfaceFormat2KHR.set_surfaceFormat(this.segment(), index, value); return this; } + /// Sets `surfaceFormat` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFormat2KHR surfaceFormat(@CType("VkSurfaceFormatKHR") java.lang.foreign.MemorySegment value) { VkSurfaceFormat2KHR.set_surfaceFormat(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceFormatKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceFormatKHR.java new file mode 100644 index 00000000..028fa482 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceFormatKHR.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### colorSpace +/// [VarHandle][#VH_colorSpace] - [Getter][#colorSpace()] - [Setter][#colorSpace(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfaceFormatKHR { +/// VkFormat format; +/// VkColorSpaceKHR colorSpace; +/// } VkSurfaceFormatKHR; +/// ``` +public final class VkSurfaceFormatKHR extends Struct { + /// The struct layout of `VkSurfaceFormatKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_INT.withName("colorSpace") + ); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `colorSpace` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorSpace = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorSpace")); + + /// Creates `VkSurfaceFormatKHR` with the given segment. + /// @param segment the memory segment + public VkSurfaceFormatKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfaceFormatKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFormatKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFormatKHR(segment); } + + /// Creates `VkSurfaceFormatKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFormatKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFormatKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfaceFormatKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceFormatKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceFormatKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfaceFormatKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfaceFormatKHR` + public static VkSurfaceFormatKHR alloc(SegmentAllocator allocator) { return new VkSurfaceFormatKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfaceFormatKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfaceFormatKHR` + public static VkSurfaceFormatKHR alloc(SegmentAllocator allocator, long count) { return new VkSurfaceFormatKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkSurfaceFormatKHR.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkSurfaceFormatKHR.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkSurfaceFormatKHR.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkSurfaceFormatKHR.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFormatKHR formatAt(long index, @CType("VkFormat") int value) { VkSurfaceFormatKHR.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFormatKHR format(@CType("VkFormat") int value) { VkSurfaceFormatKHR.set_format(this.segment(), value); return this; } + + /// {@return `colorSpace` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkColorSpaceKHR") int get_colorSpace(MemorySegment segment, long index) { return (int) VH_colorSpace.get(segment, 0L, index); } + /// {@return `colorSpace`} + /// @param segment the segment of the struct + public static @CType("VkColorSpaceKHR") int get_colorSpace(MemorySegment segment) { return VkSurfaceFormatKHR.get_colorSpace(segment, 0L); } + /// {@return `colorSpace` at the given index} + /// @param index the index + public @CType("VkColorSpaceKHR") int colorSpaceAt(long index) { return VkSurfaceFormatKHR.get_colorSpace(this.segment(), index); } + /// {@return `colorSpace`} + public @CType("VkColorSpaceKHR") int colorSpace() { return VkSurfaceFormatKHR.get_colorSpace(this.segment()); } + /// Sets `colorSpace` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorSpace(MemorySegment segment, long index, @CType("VkColorSpaceKHR") int value) { VH_colorSpace.set(segment, 0L, index, value); } + /// Sets `colorSpace` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorSpace(MemorySegment segment, @CType("VkColorSpaceKHR") int value) { VkSurfaceFormatKHR.set_colorSpace(segment, 0L, value); } + /// Sets `colorSpace` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceFormatKHR colorSpaceAt(long index, @CType("VkColorSpaceKHR") int value) { VkSurfaceFormatKHR.set_colorSpace(this.segment(), index, value); return this; } + /// Sets `colorSpace` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceFormatKHR colorSpace(@CType("VkColorSpaceKHR") int value) { VkSurfaceFormatKHR.set_colorSpace(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceProtectedCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceProtectedCapabilitiesKHR.java new file mode 100644 index 00000000..18996412 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSurfaceProtectedCapabilitiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### supportsProtected +/// [VarHandle][#VH_supportsProtected] - [Getter][#supportsProtected()] - [Setter][#supportsProtected(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfaceProtectedCapabilitiesKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 supportsProtected; +/// } VkSurfaceProtectedCapabilitiesKHR; +/// ``` +public final class VkSurfaceProtectedCapabilitiesKHR extends Struct { + /// The struct layout of `VkSurfaceProtectedCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("supportsProtected") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `supportsProtected` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportsProtected = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportsProtected")); + + /// Creates `VkSurfaceProtectedCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkSurfaceProtectedCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfaceProtectedCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceProtectedCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceProtectedCapabilitiesKHR(segment); } + + /// Creates `VkSurfaceProtectedCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceProtectedCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceProtectedCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfaceProtectedCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceProtectedCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceProtectedCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfaceProtectedCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfaceProtectedCapabilitiesKHR` + public static VkSurfaceProtectedCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkSurfaceProtectedCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfaceProtectedCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfaceProtectedCapabilitiesKHR` + public static VkSurfaceProtectedCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkSurfaceProtectedCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfaceProtectedCapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfaceProtectedCapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfaceProtectedCapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfaceProtectedCapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceProtectedCapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfaceProtectedCapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceProtectedCapabilitiesKHR sType(@CType("VkStructureType") int value) { VkSurfaceProtectedCapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfaceProtectedCapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfaceProtectedCapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSurfaceProtectedCapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSurfaceProtectedCapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceProtectedCapabilitiesKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSurfaceProtectedCapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceProtectedCapabilitiesKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSurfaceProtectedCapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `supportsProtected` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_supportsProtected(MemorySegment segment, long index) { return (int) VH_supportsProtected.get(segment, 0L, index); } + /// {@return `supportsProtected`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_supportsProtected(MemorySegment segment) { return VkSurfaceProtectedCapabilitiesKHR.get_supportsProtected(segment, 0L); } + /// {@return `supportsProtected` at the given index} + /// @param index the index + public @CType("VkBool32") int supportsProtectedAt(long index) { return VkSurfaceProtectedCapabilitiesKHR.get_supportsProtected(this.segment(), index); } + /// {@return `supportsProtected`} + public @CType("VkBool32") int supportsProtected() { return VkSurfaceProtectedCapabilitiesKHR.get_supportsProtected(this.segment()); } + /// Sets `supportsProtected` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportsProtected(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_supportsProtected.set(segment, 0L, index, value); } + /// Sets `supportsProtected` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportsProtected(MemorySegment segment, @CType("VkBool32") int value) { VkSurfaceProtectedCapabilitiesKHR.set_supportsProtected(segment, 0L, value); } + /// Sets `supportsProtected` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceProtectedCapabilitiesKHR supportsProtectedAt(long index, @CType("VkBool32") int value) { VkSurfaceProtectedCapabilitiesKHR.set_supportsProtected(this.segment(), index, value); return this; } + /// Sets `supportsProtected` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceProtectedCapabilitiesKHR supportsProtected(@CType("VkBool32") int value) { VkSurfaceProtectedCapabilitiesKHR.set_supportsProtected(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSwapchainCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSwapchainCreateInfoKHR.java new file mode 100644 index 00000000..47dda33d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkSwapchainCreateInfoKHR.java @@ -0,0 +1,742 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### surface +/// [VarHandle][#VH_surface] - [Getter][#surface()] - [Setter][#surface(java.lang.foreign.MemorySegment)] +/// ### minImageCount +/// [VarHandle][#VH_minImageCount] - [Getter][#minImageCount()] - [Setter][#minImageCount(int)] +/// ### imageFormat +/// [VarHandle][#VH_imageFormat] - [Getter][#imageFormat()] - [Setter][#imageFormat(int)] +/// ### imageColorSpace +/// [VarHandle][#VH_imageColorSpace] - [Getter][#imageColorSpace()] - [Setter][#imageColorSpace(int)] +/// ### imageExtent +/// [Byte offset][#OFFSET_imageExtent] - [Memory layout][#ML_imageExtent] - [Getter][#imageExtent()] - [Setter][#imageExtent(java.lang.foreign.MemorySegment)] +/// ### imageArrayLayers +/// [VarHandle][#VH_imageArrayLayers] - [Getter][#imageArrayLayers()] - [Setter][#imageArrayLayers(int)] +/// ### imageUsage +/// [VarHandle][#VH_imageUsage] - [Getter][#imageUsage()] - [Setter][#imageUsage(int)] +/// ### imageSharingMode +/// [VarHandle][#VH_imageSharingMode] - [Getter][#imageSharingMode()] - [Setter][#imageSharingMode(int)] +/// ### queueFamilyIndexCount +/// [VarHandle][#VH_queueFamilyIndexCount] - [Getter][#queueFamilyIndexCount()] - [Setter][#queueFamilyIndexCount(int)] +/// ### pQueueFamilyIndices +/// [VarHandle][#VH_pQueueFamilyIndices] - [Getter][#pQueueFamilyIndices()] - [Setter][#pQueueFamilyIndices(java.lang.foreign.MemorySegment)] +/// ### preTransform +/// [VarHandle][#VH_preTransform] - [Getter][#preTransform()] - [Setter][#preTransform(int)] +/// ### compositeAlpha +/// [VarHandle][#VH_compositeAlpha] - [Getter][#compositeAlpha()] - [Setter][#compositeAlpha(int)] +/// ### presentMode +/// [VarHandle][#VH_presentMode] - [Getter][#presentMode()] - [Setter][#presentMode(int)] +/// ### clipped +/// [VarHandle][#VH_clipped] - [Getter][#clipped()] - [Setter][#clipped(int)] +/// ### oldSwapchain +/// [VarHandle][#VH_oldSwapchain] - [Getter][#oldSwapchain()] - [Setter][#oldSwapchain(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSwapchainCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkSwapchainCreateFlagsKHR flags; +/// VkSurfaceKHR surface; +/// uint32_t minImageCount; +/// VkFormat imageFormat; +/// VkColorSpaceKHR imageColorSpace; +/// VkExtent2D imageExtent; +/// uint32_t imageArrayLayers; +/// VkImageUsageFlags imageUsage; +/// VkSharingMode imageSharingMode; +/// uint32_t queueFamilyIndexCount; +/// const uint32_t * pQueueFamilyIndices; +/// VkSurfaceTransformFlagBitsKHR preTransform; +/// VkCompositeAlphaFlagBitsKHR compositeAlpha; +/// VkPresentModeKHR presentMode; +/// VkBool32 clipped; +/// VkSwapchainKHR oldSwapchain; +/// } VkSwapchainCreateInfoKHR; +/// ``` +public final class VkSwapchainCreateInfoKHR extends Struct { + /// The struct layout of `VkSwapchainCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("surface"), + ValueLayout.JAVA_INT.withName("minImageCount"), + ValueLayout.JAVA_INT.withName("imageFormat"), + ValueLayout.JAVA_INT.withName("imageColorSpace"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("imageExtent"), + ValueLayout.JAVA_INT.withName("imageArrayLayers"), + ValueLayout.JAVA_INT.withName("imageUsage"), + ValueLayout.JAVA_INT.withName("imageSharingMode"), + ValueLayout.JAVA_INT.withName("queueFamilyIndexCount"), + ValueLayout.ADDRESS.withName("pQueueFamilyIndices"), + ValueLayout.JAVA_INT.withName("preTransform"), + ValueLayout.JAVA_INT.withName("compositeAlpha"), + ValueLayout.JAVA_INT.withName("presentMode"), + ValueLayout.JAVA_INT.withName("clipped"), + ValueLayout.ADDRESS.withName("oldSwapchain") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `surface` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_surface = LAYOUT.arrayElementVarHandle(PathElement.groupElement("surface")); + /// The [VarHandle] of `minImageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minImageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minImageCount")); + /// The [VarHandle] of `imageFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageFormat")); + /// The [VarHandle] of `imageColorSpace` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageColorSpace = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageColorSpace")); + /// The byte offset of `imageExtent`. + public static final long OFFSET_imageExtent = LAYOUT.byteOffset(PathElement.groupElement("imageExtent")); + /// The memory layout of `imageExtent`. + public static final MemoryLayout ML_imageExtent = LAYOUT.select(PathElement.groupElement("imageExtent")); + /// The [VarHandle] of `imageArrayLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageArrayLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageArrayLayers")); + /// The [VarHandle] of `imageUsage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageUsage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageUsage")); + /// The [VarHandle] of `imageSharingMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageSharingMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageSharingMode")); + /// The [VarHandle] of `queueFamilyIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueFamilyIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueFamilyIndexCount")); + /// The [VarHandle] of `pQueueFamilyIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pQueueFamilyIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pQueueFamilyIndices")); + /// The [VarHandle] of `preTransform` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preTransform = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preTransform")); + /// The [VarHandle] of `compositeAlpha` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compositeAlpha = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compositeAlpha")); + /// The [VarHandle] of `presentMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentMode")); + /// The [VarHandle] of `clipped` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_clipped = LAYOUT.arrayElementVarHandle(PathElement.groupElement("clipped")); + /// The [VarHandle] of `oldSwapchain` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_oldSwapchain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("oldSwapchain")); + + /// Creates `VkSwapchainCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkSwapchainCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSwapchainCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainCreateInfoKHR(segment); } + + /// Creates `VkSwapchainCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSwapchainCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSwapchainCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSwapchainCreateInfoKHR` + public static VkSwapchainCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkSwapchainCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSwapchainCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSwapchainCreateInfoKHR` + public static VkSwapchainCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkSwapchainCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSwapchainCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSwapchainCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSwapchainCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkSwapchainCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR sType(@CType("VkStructureType") int value) { VkSwapchainCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSwapchainCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSwapchainCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSwapchainCreateFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSwapchainCreateFlagsKHR") int get_flags(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSwapchainCreateFlagsKHR") int flagsAt(long index) { return VkSwapchainCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSwapchainCreateFlagsKHR") int flags() { return VkSwapchainCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSwapchainCreateFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSwapchainCreateFlagsKHR") int value) { VkSwapchainCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR flagsAt(long index, @CType("VkSwapchainCreateFlagsKHR") int value) { VkSwapchainCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR flags(@CType("VkSwapchainCreateFlagsKHR") int value) { VkSwapchainCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `surface` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment get_surface(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_surface.get(segment, 0L, index); } + /// {@return `surface`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment get_surface(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_surface(segment, 0L); } + /// {@return `surface` at the given index} + /// @param index the index + public @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment surfaceAt(long index) { return VkSwapchainCreateInfoKHR.get_surface(this.segment(), index); } + /// {@return `surface`} + public @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment surface() { return VkSwapchainCreateInfoKHR.get_surface(this.segment()); } + /// Sets `surface` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_surface(MemorySegment segment, long index, @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment value) { VH_surface.set(segment, 0L, index, value); } + /// Sets `surface` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_surface(MemorySegment segment, @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_surface(segment, 0L, value); } + /// Sets `surface` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR surfaceAt(long index, @CType("VkSurfaceKHR") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_surface(this.segment(), index, value); return this; } + /// Sets `surface` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR surface(@CType("VkSurfaceKHR") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_surface(this.segment(), value); return this; } + + /// {@return `minImageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minImageCount(MemorySegment segment, long index) { return (int) VH_minImageCount.get(segment, 0L, index); } + /// {@return `minImageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minImageCount(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_minImageCount(segment, 0L); } + /// {@return `minImageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int minImageCountAt(long index) { return VkSwapchainCreateInfoKHR.get_minImageCount(this.segment(), index); } + /// {@return `minImageCount`} + public @CType("uint32_t") int minImageCount() { return VkSwapchainCreateInfoKHR.get_minImageCount(this.segment()); } + /// Sets `minImageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minImageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minImageCount.set(segment, 0L, index, value); } + /// Sets `minImageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minImageCount(MemorySegment segment, @CType("uint32_t") int value) { VkSwapchainCreateInfoKHR.set_minImageCount(segment, 0L, value); } + /// Sets `minImageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR minImageCountAt(long index, @CType("uint32_t") int value) { VkSwapchainCreateInfoKHR.set_minImageCount(this.segment(), index, value); return this; } + /// Sets `minImageCount` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR minImageCount(@CType("uint32_t") int value) { VkSwapchainCreateInfoKHR.set_minImageCount(this.segment(), value); return this; } + + /// {@return `imageFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_imageFormat(MemorySegment segment, long index) { return (int) VH_imageFormat.get(segment, 0L, index); } + /// {@return `imageFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_imageFormat(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_imageFormat(segment, 0L); } + /// {@return `imageFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int imageFormatAt(long index) { return VkSwapchainCreateInfoKHR.get_imageFormat(this.segment(), index); } + /// {@return `imageFormat`} + public @CType("VkFormat") int imageFormat() { return VkSwapchainCreateInfoKHR.get_imageFormat(this.segment()); } + /// Sets `imageFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_imageFormat.set(segment, 0L, index, value); } + /// Sets `imageFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageFormat(MemorySegment segment, @CType("VkFormat") int value) { VkSwapchainCreateInfoKHR.set_imageFormat(segment, 0L, value); } + /// Sets `imageFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageFormatAt(long index, @CType("VkFormat") int value) { VkSwapchainCreateInfoKHR.set_imageFormat(this.segment(), index, value); return this; } + /// Sets `imageFormat` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageFormat(@CType("VkFormat") int value) { VkSwapchainCreateInfoKHR.set_imageFormat(this.segment(), value); return this; } + + /// {@return `imageColorSpace` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkColorSpaceKHR") int get_imageColorSpace(MemorySegment segment, long index) { return (int) VH_imageColorSpace.get(segment, 0L, index); } + /// {@return `imageColorSpace`} + /// @param segment the segment of the struct + public static @CType("VkColorSpaceKHR") int get_imageColorSpace(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_imageColorSpace(segment, 0L); } + /// {@return `imageColorSpace` at the given index} + /// @param index the index + public @CType("VkColorSpaceKHR") int imageColorSpaceAt(long index) { return VkSwapchainCreateInfoKHR.get_imageColorSpace(this.segment(), index); } + /// {@return `imageColorSpace`} + public @CType("VkColorSpaceKHR") int imageColorSpace() { return VkSwapchainCreateInfoKHR.get_imageColorSpace(this.segment()); } + /// Sets `imageColorSpace` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageColorSpace(MemorySegment segment, long index, @CType("VkColorSpaceKHR") int value) { VH_imageColorSpace.set(segment, 0L, index, value); } + /// Sets `imageColorSpace` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageColorSpace(MemorySegment segment, @CType("VkColorSpaceKHR") int value) { VkSwapchainCreateInfoKHR.set_imageColorSpace(segment, 0L, value); } + /// Sets `imageColorSpace` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageColorSpaceAt(long index, @CType("VkColorSpaceKHR") int value) { VkSwapchainCreateInfoKHR.set_imageColorSpace(this.segment(), index, value); return this; } + /// Sets `imageColorSpace` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageColorSpace(@CType("VkColorSpaceKHR") int value) { VkSwapchainCreateInfoKHR.set_imageColorSpace(this.segment(), value); return this; } + + /// {@return `imageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent); } + /// {@return `imageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_imageExtent(segment, 0L); } + /// {@return `imageExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment imageExtentAt(long index) { return VkSwapchainCreateInfoKHR.get_imageExtent(this.segment(), index); } + /// {@return `imageExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment imageExtent() { return VkSwapchainCreateInfoKHR.get_imageExtent(this.segment()); } + /// Sets `imageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent.byteSize()); } + /// Sets `imageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_imageExtent(segment, 0L, value); } + /// Sets `imageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_imageExtent(this.segment(), index, value); return this; } + /// Sets `imageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_imageExtent(this.segment(), value); return this; } + + /// {@return `imageArrayLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_imageArrayLayers(MemorySegment segment, long index) { return (int) VH_imageArrayLayers.get(segment, 0L, index); } + /// {@return `imageArrayLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_imageArrayLayers(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_imageArrayLayers(segment, 0L); } + /// {@return `imageArrayLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int imageArrayLayersAt(long index) { return VkSwapchainCreateInfoKHR.get_imageArrayLayers(this.segment(), index); } + /// {@return `imageArrayLayers`} + public @CType("uint32_t") int imageArrayLayers() { return VkSwapchainCreateInfoKHR.get_imageArrayLayers(this.segment()); } + /// Sets `imageArrayLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageArrayLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_imageArrayLayers.set(segment, 0L, index, value); } + /// Sets `imageArrayLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageArrayLayers(MemorySegment segment, @CType("uint32_t") int value) { VkSwapchainCreateInfoKHR.set_imageArrayLayers(segment, 0L, value); } + /// Sets `imageArrayLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageArrayLayersAt(long index, @CType("uint32_t") int value) { VkSwapchainCreateInfoKHR.set_imageArrayLayers(this.segment(), index, value); return this; } + /// Sets `imageArrayLayers` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageArrayLayers(@CType("uint32_t") int value) { VkSwapchainCreateInfoKHR.set_imageArrayLayers(this.segment(), value); return this; } + + /// {@return `imageUsage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_imageUsage(MemorySegment segment, long index) { return (int) VH_imageUsage.get(segment, 0L, index); } + /// {@return `imageUsage`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_imageUsage(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_imageUsage(segment, 0L); } + /// {@return `imageUsage` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int imageUsageAt(long index) { return VkSwapchainCreateInfoKHR.get_imageUsage(this.segment(), index); } + /// {@return `imageUsage`} + public @CType("VkImageUsageFlags") int imageUsage() { return VkSwapchainCreateInfoKHR.get_imageUsage(this.segment()); } + /// Sets `imageUsage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageUsage(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_imageUsage.set(segment, 0L, index, value); } + /// Sets `imageUsage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageUsage(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkSwapchainCreateInfoKHR.set_imageUsage(segment, 0L, value); } + /// Sets `imageUsage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageUsageAt(long index, @CType("VkImageUsageFlags") int value) { VkSwapchainCreateInfoKHR.set_imageUsage(this.segment(), index, value); return this; } + /// Sets `imageUsage` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageUsage(@CType("VkImageUsageFlags") int value) { VkSwapchainCreateInfoKHR.set_imageUsage(this.segment(), value); return this; } + + /// {@return `imageSharingMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSharingMode") int get_imageSharingMode(MemorySegment segment, long index) { return (int) VH_imageSharingMode.get(segment, 0L, index); } + /// {@return `imageSharingMode`} + /// @param segment the segment of the struct + public static @CType("VkSharingMode") int get_imageSharingMode(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_imageSharingMode(segment, 0L); } + /// {@return `imageSharingMode` at the given index} + /// @param index the index + public @CType("VkSharingMode") int imageSharingModeAt(long index) { return VkSwapchainCreateInfoKHR.get_imageSharingMode(this.segment(), index); } + /// {@return `imageSharingMode`} + public @CType("VkSharingMode") int imageSharingMode() { return VkSwapchainCreateInfoKHR.get_imageSharingMode(this.segment()); } + /// Sets `imageSharingMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageSharingMode(MemorySegment segment, long index, @CType("VkSharingMode") int value) { VH_imageSharingMode.set(segment, 0L, index, value); } + /// Sets `imageSharingMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageSharingMode(MemorySegment segment, @CType("VkSharingMode") int value) { VkSwapchainCreateInfoKHR.set_imageSharingMode(segment, 0L, value); } + /// Sets `imageSharingMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageSharingModeAt(long index, @CType("VkSharingMode") int value) { VkSwapchainCreateInfoKHR.set_imageSharingMode(this.segment(), index, value); return this; } + /// Sets `imageSharingMode` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR imageSharingMode(@CType("VkSharingMode") int value) { VkSwapchainCreateInfoKHR.set_imageSharingMode(this.segment(), value); return this; } + + /// {@return `queueFamilyIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueFamilyIndexCount(MemorySegment segment, long index) { return (int) VH_queueFamilyIndexCount.get(segment, 0L, index); } + /// {@return `queueFamilyIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueFamilyIndexCount(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_queueFamilyIndexCount(segment, 0L); } + /// {@return `queueFamilyIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queueFamilyIndexCountAt(long index) { return VkSwapchainCreateInfoKHR.get_queueFamilyIndexCount(this.segment(), index); } + /// {@return `queueFamilyIndexCount`} + public @CType("uint32_t") int queueFamilyIndexCount() { return VkSwapchainCreateInfoKHR.get_queueFamilyIndexCount(this.segment()); } + /// Sets `queueFamilyIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFamilyIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueFamilyIndexCount.set(segment, 0L, index, value); } + /// Sets `queueFamilyIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFamilyIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkSwapchainCreateInfoKHR.set_queueFamilyIndexCount(segment, 0L, value); } + /// Sets `queueFamilyIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR queueFamilyIndexCountAt(long index, @CType("uint32_t") int value) { VkSwapchainCreateInfoKHR.set_queueFamilyIndexCount(this.segment(), index, value); return this; } + /// Sets `queueFamilyIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR queueFamilyIndexCount(@CType("uint32_t") int value) { VkSwapchainCreateInfoKHR.set_queueFamilyIndexCount(this.segment(), value); return this; } + + /// {@return `pQueueFamilyIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pQueueFamilyIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pQueueFamilyIndices.get(segment, 0L, index); } + /// {@return `pQueueFamilyIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pQueueFamilyIndices(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_pQueueFamilyIndices(segment, 0L); } + /// {@return `pQueueFamilyIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pQueueFamilyIndicesAt(long index) { return VkSwapchainCreateInfoKHR.get_pQueueFamilyIndices(this.segment(), index); } + /// {@return `pQueueFamilyIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pQueueFamilyIndices() { return VkSwapchainCreateInfoKHR.get_pQueueFamilyIndices(this.segment()); } + /// Sets `pQueueFamilyIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pQueueFamilyIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pQueueFamilyIndices.set(segment, 0L, index, value); } + /// Sets `pQueueFamilyIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pQueueFamilyIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_pQueueFamilyIndices(segment, 0L, value); } + /// Sets `pQueueFamilyIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR pQueueFamilyIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_pQueueFamilyIndices(this.segment(), index, value); return this; } + /// Sets `pQueueFamilyIndices` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR pQueueFamilyIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_pQueueFamilyIndices(this.segment(), value); return this; } + + /// {@return `preTransform` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_preTransform(MemorySegment segment, long index) { return (int) VH_preTransform.get(segment, 0L, index); } + /// {@return `preTransform`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_preTransform(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_preTransform(segment, 0L); } + /// {@return `preTransform` at the given index} + /// @param index the index + public @CType("VkSurfaceTransformFlagBitsKHR") int preTransformAt(long index) { return VkSwapchainCreateInfoKHR.get_preTransform(this.segment(), index); } + /// {@return `preTransform`} + public @CType("VkSurfaceTransformFlagBitsKHR") int preTransform() { return VkSwapchainCreateInfoKHR.get_preTransform(this.segment()); } + /// Sets `preTransform` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preTransform(MemorySegment segment, long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VH_preTransform.set(segment, 0L, index, value); } + /// Sets `preTransform` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preTransform(MemorySegment segment, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkSwapchainCreateInfoKHR.set_preTransform(segment, 0L, value); } + /// Sets `preTransform` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR preTransformAt(long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkSwapchainCreateInfoKHR.set_preTransform(this.segment(), index, value); return this; } + /// Sets `preTransform` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR preTransform(@CType("VkSurfaceTransformFlagBitsKHR") int value) { VkSwapchainCreateInfoKHR.set_preTransform(this.segment(), value); return this; } + + /// {@return `compositeAlpha` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCompositeAlphaFlagBitsKHR") int get_compositeAlpha(MemorySegment segment, long index) { return (int) VH_compositeAlpha.get(segment, 0L, index); } + /// {@return `compositeAlpha`} + /// @param segment the segment of the struct + public static @CType("VkCompositeAlphaFlagBitsKHR") int get_compositeAlpha(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_compositeAlpha(segment, 0L); } + /// {@return `compositeAlpha` at the given index} + /// @param index the index + public @CType("VkCompositeAlphaFlagBitsKHR") int compositeAlphaAt(long index) { return VkSwapchainCreateInfoKHR.get_compositeAlpha(this.segment(), index); } + /// {@return `compositeAlpha`} + public @CType("VkCompositeAlphaFlagBitsKHR") int compositeAlpha() { return VkSwapchainCreateInfoKHR.get_compositeAlpha(this.segment()); } + /// Sets `compositeAlpha` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compositeAlpha(MemorySegment segment, long index, @CType("VkCompositeAlphaFlagBitsKHR") int value) { VH_compositeAlpha.set(segment, 0L, index, value); } + /// Sets `compositeAlpha` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compositeAlpha(MemorySegment segment, @CType("VkCompositeAlphaFlagBitsKHR") int value) { VkSwapchainCreateInfoKHR.set_compositeAlpha(segment, 0L, value); } + /// Sets `compositeAlpha` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR compositeAlphaAt(long index, @CType("VkCompositeAlphaFlagBitsKHR") int value) { VkSwapchainCreateInfoKHR.set_compositeAlpha(this.segment(), index, value); return this; } + /// Sets `compositeAlpha` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR compositeAlpha(@CType("VkCompositeAlphaFlagBitsKHR") int value) { VkSwapchainCreateInfoKHR.set_compositeAlpha(this.segment(), value); return this; } + + /// {@return `presentMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPresentModeKHR") int get_presentMode(MemorySegment segment, long index) { return (int) VH_presentMode.get(segment, 0L, index); } + /// {@return `presentMode`} + /// @param segment the segment of the struct + public static @CType("VkPresentModeKHR") int get_presentMode(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_presentMode(segment, 0L); } + /// {@return `presentMode` at the given index} + /// @param index the index + public @CType("VkPresentModeKHR") int presentModeAt(long index) { return VkSwapchainCreateInfoKHR.get_presentMode(this.segment(), index); } + /// {@return `presentMode`} + public @CType("VkPresentModeKHR") int presentMode() { return VkSwapchainCreateInfoKHR.get_presentMode(this.segment()); } + /// Sets `presentMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentMode(MemorySegment segment, long index, @CType("VkPresentModeKHR") int value) { VH_presentMode.set(segment, 0L, index, value); } + /// Sets `presentMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentMode(MemorySegment segment, @CType("VkPresentModeKHR") int value) { VkSwapchainCreateInfoKHR.set_presentMode(segment, 0L, value); } + /// Sets `presentMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR presentModeAt(long index, @CType("VkPresentModeKHR") int value) { VkSwapchainCreateInfoKHR.set_presentMode(this.segment(), index, value); return this; } + /// Sets `presentMode` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR presentMode(@CType("VkPresentModeKHR") int value) { VkSwapchainCreateInfoKHR.set_presentMode(this.segment(), value); return this; } + + /// {@return `clipped` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_clipped(MemorySegment segment, long index) { return (int) VH_clipped.get(segment, 0L, index); } + /// {@return `clipped`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_clipped(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_clipped(segment, 0L); } + /// {@return `clipped` at the given index} + /// @param index the index + public @CType("VkBool32") int clippedAt(long index) { return VkSwapchainCreateInfoKHR.get_clipped(this.segment(), index); } + /// {@return `clipped`} + public @CType("VkBool32") int clipped() { return VkSwapchainCreateInfoKHR.get_clipped(this.segment()); } + /// Sets `clipped` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_clipped(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_clipped.set(segment, 0L, index, value); } + /// Sets `clipped` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_clipped(MemorySegment segment, @CType("VkBool32") int value) { VkSwapchainCreateInfoKHR.set_clipped(segment, 0L, value); } + /// Sets `clipped` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR clippedAt(long index, @CType("VkBool32") int value) { VkSwapchainCreateInfoKHR.set_clipped(this.segment(), index, value); return this; } + /// Sets `clipped` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR clipped(@CType("VkBool32") int value) { VkSwapchainCreateInfoKHR.set_clipped(this.segment(), value); return this; } + + /// {@return `oldSwapchain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment get_oldSwapchain(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_oldSwapchain.get(segment, 0L, index); } + /// {@return `oldSwapchain`} + /// @param segment the segment of the struct + public static @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment get_oldSwapchain(MemorySegment segment) { return VkSwapchainCreateInfoKHR.get_oldSwapchain(segment, 0L); } + /// {@return `oldSwapchain` at the given index} + /// @param index the index + public @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment oldSwapchainAt(long index) { return VkSwapchainCreateInfoKHR.get_oldSwapchain(this.segment(), index); } + /// {@return `oldSwapchain`} + public @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment oldSwapchain() { return VkSwapchainCreateInfoKHR.get_oldSwapchain(this.segment()); } + /// Sets `oldSwapchain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_oldSwapchain(MemorySegment segment, long index, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VH_oldSwapchain.set(segment, 0L, index, value); } + /// Sets `oldSwapchain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_oldSwapchain(MemorySegment segment, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_oldSwapchain(segment, 0L, value); } + /// Sets `oldSwapchain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR oldSwapchainAt(long index, @CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_oldSwapchain(this.segment(), index, value); return this; } + /// Sets `oldSwapchain` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainCreateInfoKHR oldSwapchain(@CType("VkSwapchainKHR") java.lang.foreign.MemorySegment value) { VkSwapchainCreateInfoKHR.set_oldSwapchain(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkTraceRaysIndirectCommand2KHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkTraceRaysIndirectCommand2KHR.java new file mode 100644 index 00000000..7a7e4160 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkTraceRaysIndirectCommand2KHR.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### raygenShaderRecordAddress +/// [VarHandle][#VH_raygenShaderRecordAddress] - [Getter][#raygenShaderRecordAddress()] - [Setter][#raygenShaderRecordAddress(long)] +/// ### raygenShaderRecordSize +/// [VarHandle][#VH_raygenShaderRecordSize] - [Getter][#raygenShaderRecordSize()] - [Setter][#raygenShaderRecordSize(long)] +/// ### missShaderBindingTableAddress +/// [VarHandle][#VH_missShaderBindingTableAddress] - [Getter][#missShaderBindingTableAddress()] - [Setter][#missShaderBindingTableAddress(long)] +/// ### missShaderBindingTableSize +/// [VarHandle][#VH_missShaderBindingTableSize] - [Getter][#missShaderBindingTableSize()] - [Setter][#missShaderBindingTableSize(long)] +/// ### missShaderBindingTableStride +/// [VarHandle][#VH_missShaderBindingTableStride] - [Getter][#missShaderBindingTableStride()] - [Setter][#missShaderBindingTableStride(long)] +/// ### hitShaderBindingTableAddress +/// [VarHandle][#VH_hitShaderBindingTableAddress] - [Getter][#hitShaderBindingTableAddress()] - [Setter][#hitShaderBindingTableAddress(long)] +/// ### hitShaderBindingTableSize +/// [VarHandle][#VH_hitShaderBindingTableSize] - [Getter][#hitShaderBindingTableSize()] - [Setter][#hitShaderBindingTableSize(long)] +/// ### hitShaderBindingTableStride +/// [VarHandle][#VH_hitShaderBindingTableStride] - [Getter][#hitShaderBindingTableStride()] - [Setter][#hitShaderBindingTableStride(long)] +/// ### callableShaderBindingTableAddress +/// [VarHandle][#VH_callableShaderBindingTableAddress] - [Getter][#callableShaderBindingTableAddress()] - [Setter][#callableShaderBindingTableAddress(long)] +/// ### callableShaderBindingTableSize +/// [VarHandle][#VH_callableShaderBindingTableSize] - [Getter][#callableShaderBindingTableSize()] - [Setter][#callableShaderBindingTableSize(long)] +/// ### callableShaderBindingTableStride +/// [VarHandle][#VH_callableShaderBindingTableStride] - [Getter][#callableShaderBindingTableStride()] - [Setter][#callableShaderBindingTableStride(long)] +/// ### width +/// [VarHandle][#VH_width] - [Getter][#width()] - [Setter][#width(int)] +/// ### height +/// [VarHandle][#VH_height] - [Getter][#height()] - [Setter][#height(int)] +/// ### depth +/// [VarHandle][#VH_depth] - [Getter][#depth()] - [Setter][#depth(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkTraceRaysIndirectCommand2KHR { +/// VkDeviceAddress raygenShaderRecordAddress; +/// VkDeviceSize raygenShaderRecordSize; +/// VkDeviceAddress missShaderBindingTableAddress; +/// VkDeviceSize missShaderBindingTableSize; +/// VkDeviceSize missShaderBindingTableStride; +/// VkDeviceAddress hitShaderBindingTableAddress; +/// VkDeviceSize hitShaderBindingTableSize; +/// VkDeviceSize hitShaderBindingTableStride; +/// VkDeviceAddress callableShaderBindingTableAddress; +/// VkDeviceSize callableShaderBindingTableSize; +/// VkDeviceSize callableShaderBindingTableStride; +/// uint32_t width; +/// uint32_t height; +/// uint32_t depth; +/// } VkTraceRaysIndirectCommand2KHR; +/// ``` +public final class VkTraceRaysIndirectCommand2KHR extends Struct { + /// The struct layout of `VkTraceRaysIndirectCommand2KHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("raygenShaderRecordAddress"), + ValueLayout.JAVA_LONG.withName("raygenShaderRecordSize"), + ValueLayout.JAVA_LONG.withName("missShaderBindingTableAddress"), + ValueLayout.JAVA_LONG.withName("missShaderBindingTableSize"), + ValueLayout.JAVA_LONG.withName("missShaderBindingTableStride"), + ValueLayout.JAVA_LONG.withName("hitShaderBindingTableAddress"), + ValueLayout.JAVA_LONG.withName("hitShaderBindingTableSize"), + ValueLayout.JAVA_LONG.withName("hitShaderBindingTableStride"), + ValueLayout.JAVA_LONG.withName("callableShaderBindingTableAddress"), + ValueLayout.JAVA_LONG.withName("callableShaderBindingTableSize"), + ValueLayout.JAVA_LONG.withName("callableShaderBindingTableStride"), + ValueLayout.JAVA_INT.withName("width"), + ValueLayout.JAVA_INT.withName("height"), + ValueLayout.JAVA_INT.withName("depth") + ); + /// The [VarHandle] of `raygenShaderRecordAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_raygenShaderRecordAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("raygenShaderRecordAddress")); + /// The [VarHandle] of `raygenShaderRecordSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_raygenShaderRecordSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("raygenShaderRecordSize")); + /// The [VarHandle] of `missShaderBindingTableAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_missShaderBindingTableAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("missShaderBindingTableAddress")); + /// The [VarHandle] of `missShaderBindingTableSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_missShaderBindingTableSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("missShaderBindingTableSize")); + /// The [VarHandle] of `missShaderBindingTableStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_missShaderBindingTableStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("missShaderBindingTableStride")); + /// The [VarHandle] of `hitShaderBindingTableAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_hitShaderBindingTableAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hitShaderBindingTableAddress")); + /// The [VarHandle] of `hitShaderBindingTableSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_hitShaderBindingTableSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hitShaderBindingTableSize")); + /// The [VarHandle] of `hitShaderBindingTableStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_hitShaderBindingTableStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hitShaderBindingTableStride")); + /// The [VarHandle] of `callableShaderBindingTableAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_callableShaderBindingTableAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("callableShaderBindingTableAddress")); + /// The [VarHandle] of `callableShaderBindingTableSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_callableShaderBindingTableSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("callableShaderBindingTableSize")); + /// The [VarHandle] of `callableShaderBindingTableStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_callableShaderBindingTableStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("callableShaderBindingTableStride")); + /// The [VarHandle] of `width` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_width = LAYOUT.arrayElementVarHandle(PathElement.groupElement("width")); + /// The [VarHandle] of `height` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_height = LAYOUT.arrayElementVarHandle(PathElement.groupElement("height")); + /// The [VarHandle] of `depth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depth")); + + /// Creates `VkTraceRaysIndirectCommand2KHR` with the given segment. + /// @param segment the memory segment + public VkTraceRaysIndirectCommand2KHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkTraceRaysIndirectCommand2KHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTraceRaysIndirectCommand2KHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTraceRaysIndirectCommand2KHR(segment); } + + /// Creates `VkTraceRaysIndirectCommand2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTraceRaysIndirectCommand2KHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTraceRaysIndirectCommand2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkTraceRaysIndirectCommand2KHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkTraceRaysIndirectCommand2KHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkTraceRaysIndirectCommand2KHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkTraceRaysIndirectCommand2KHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkTraceRaysIndirectCommand2KHR` + public static VkTraceRaysIndirectCommand2KHR alloc(SegmentAllocator allocator) { return new VkTraceRaysIndirectCommand2KHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkTraceRaysIndirectCommand2KHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkTraceRaysIndirectCommand2KHR` + public static VkTraceRaysIndirectCommand2KHR alloc(SegmentAllocator allocator, long count) { return new VkTraceRaysIndirectCommand2KHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `raygenShaderRecordAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_raygenShaderRecordAddress(MemorySegment segment, long index) { return (long) VH_raygenShaderRecordAddress.get(segment, 0L, index); } + /// {@return `raygenShaderRecordAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_raygenShaderRecordAddress(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_raygenShaderRecordAddress(segment, 0L); } + /// {@return `raygenShaderRecordAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long raygenShaderRecordAddressAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_raygenShaderRecordAddress(this.segment(), index); } + /// {@return `raygenShaderRecordAddress`} + public @CType("VkDeviceAddress") long raygenShaderRecordAddress() { return VkTraceRaysIndirectCommand2KHR.get_raygenShaderRecordAddress(this.segment()); } + /// Sets `raygenShaderRecordAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_raygenShaderRecordAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_raygenShaderRecordAddress.set(segment, 0L, index, value); } + /// Sets `raygenShaderRecordAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_raygenShaderRecordAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_raygenShaderRecordAddress(segment, 0L, value); } + /// Sets `raygenShaderRecordAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR raygenShaderRecordAddressAt(long index, @CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_raygenShaderRecordAddress(this.segment(), index, value); return this; } + /// Sets `raygenShaderRecordAddress` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR raygenShaderRecordAddress(@CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_raygenShaderRecordAddress(this.segment(), value); return this; } + + /// {@return `raygenShaderRecordSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_raygenShaderRecordSize(MemorySegment segment, long index) { return (long) VH_raygenShaderRecordSize.get(segment, 0L, index); } + /// {@return `raygenShaderRecordSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_raygenShaderRecordSize(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_raygenShaderRecordSize(segment, 0L); } + /// {@return `raygenShaderRecordSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long raygenShaderRecordSizeAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_raygenShaderRecordSize(this.segment(), index); } + /// {@return `raygenShaderRecordSize`} + public @CType("VkDeviceSize") long raygenShaderRecordSize() { return VkTraceRaysIndirectCommand2KHR.get_raygenShaderRecordSize(this.segment()); } + /// Sets `raygenShaderRecordSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_raygenShaderRecordSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_raygenShaderRecordSize.set(segment, 0L, index, value); } + /// Sets `raygenShaderRecordSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_raygenShaderRecordSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_raygenShaderRecordSize(segment, 0L, value); } + /// Sets `raygenShaderRecordSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR raygenShaderRecordSizeAt(long index, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_raygenShaderRecordSize(this.segment(), index, value); return this; } + /// Sets `raygenShaderRecordSize` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR raygenShaderRecordSize(@CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_raygenShaderRecordSize(this.segment(), value); return this; } + + /// {@return `missShaderBindingTableAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_missShaderBindingTableAddress(MemorySegment segment, long index) { return (long) VH_missShaderBindingTableAddress.get(segment, 0L, index); } + /// {@return `missShaderBindingTableAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_missShaderBindingTableAddress(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_missShaderBindingTableAddress(segment, 0L); } + /// {@return `missShaderBindingTableAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long missShaderBindingTableAddressAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_missShaderBindingTableAddress(this.segment(), index); } + /// {@return `missShaderBindingTableAddress`} + public @CType("VkDeviceAddress") long missShaderBindingTableAddress() { return VkTraceRaysIndirectCommand2KHR.get_missShaderBindingTableAddress(this.segment()); } + /// Sets `missShaderBindingTableAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_missShaderBindingTableAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_missShaderBindingTableAddress.set(segment, 0L, index, value); } + /// Sets `missShaderBindingTableAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_missShaderBindingTableAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_missShaderBindingTableAddress(segment, 0L, value); } + /// Sets `missShaderBindingTableAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR missShaderBindingTableAddressAt(long index, @CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_missShaderBindingTableAddress(this.segment(), index, value); return this; } + /// Sets `missShaderBindingTableAddress` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR missShaderBindingTableAddress(@CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_missShaderBindingTableAddress(this.segment(), value); return this; } + + /// {@return `missShaderBindingTableSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_missShaderBindingTableSize(MemorySegment segment, long index) { return (long) VH_missShaderBindingTableSize.get(segment, 0L, index); } + /// {@return `missShaderBindingTableSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_missShaderBindingTableSize(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_missShaderBindingTableSize(segment, 0L); } + /// {@return `missShaderBindingTableSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long missShaderBindingTableSizeAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_missShaderBindingTableSize(this.segment(), index); } + /// {@return `missShaderBindingTableSize`} + public @CType("VkDeviceSize") long missShaderBindingTableSize() { return VkTraceRaysIndirectCommand2KHR.get_missShaderBindingTableSize(this.segment()); } + /// Sets `missShaderBindingTableSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_missShaderBindingTableSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_missShaderBindingTableSize.set(segment, 0L, index, value); } + /// Sets `missShaderBindingTableSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_missShaderBindingTableSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_missShaderBindingTableSize(segment, 0L, value); } + /// Sets `missShaderBindingTableSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR missShaderBindingTableSizeAt(long index, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_missShaderBindingTableSize(this.segment(), index, value); return this; } + /// Sets `missShaderBindingTableSize` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR missShaderBindingTableSize(@CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_missShaderBindingTableSize(this.segment(), value); return this; } + + /// {@return `missShaderBindingTableStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_missShaderBindingTableStride(MemorySegment segment, long index) { return (long) VH_missShaderBindingTableStride.get(segment, 0L, index); } + /// {@return `missShaderBindingTableStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_missShaderBindingTableStride(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_missShaderBindingTableStride(segment, 0L); } + /// {@return `missShaderBindingTableStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long missShaderBindingTableStrideAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_missShaderBindingTableStride(this.segment(), index); } + /// {@return `missShaderBindingTableStride`} + public @CType("VkDeviceSize") long missShaderBindingTableStride() { return VkTraceRaysIndirectCommand2KHR.get_missShaderBindingTableStride(this.segment()); } + /// Sets `missShaderBindingTableStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_missShaderBindingTableStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_missShaderBindingTableStride.set(segment, 0L, index, value); } + /// Sets `missShaderBindingTableStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_missShaderBindingTableStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_missShaderBindingTableStride(segment, 0L, value); } + /// Sets `missShaderBindingTableStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR missShaderBindingTableStrideAt(long index, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_missShaderBindingTableStride(this.segment(), index, value); return this; } + /// Sets `missShaderBindingTableStride` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR missShaderBindingTableStride(@CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_missShaderBindingTableStride(this.segment(), value); return this; } + + /// {@return `hitShaderBindingTableAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_hitShaderBindingTableAddress(MemorySegment segment, long index) { return (long) VH_hitShaderBindingTableAddress.get(segment, 0L, index); } + /// {@return `hitShaderBindingTableAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_hitShaderBindingTableAddress(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_hitShaderBindingTableAddress(segment, 0L); } + /// {@return `hitShaderBindingTableAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long hitShaderBindingTableAddressAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_hitShaderBindingTableAddress(this.segment(), index); } + /// {@return `hitShaderBindingTableAddress`} + public @CType("VkDeviceAddress") long hitShaderBindingTableAddress() { return VkTraceRaysIndirectCommand2KHR.get_hitShaderBindingTableAddress(this.segment()); } + /// Sets `hitShaderBindingTableAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hitShaderBindingTableAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_hitShaderBindingTableAddress.set(segment, 0L, index, value); } + /// Sets `hitShaderBindingTableAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hitShaderBindingTableAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_hitShaderBindingTableAddress(segment, 0L, value); } + /// Sets `hitShaderBindingTableAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR hitShaderBindingTableAddressAt(long index, @CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_hitShaderBindingTableAddress(this.segment(), index, value); return this; } + /// Sets `hitShaderBindingTableAddress` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR hitShaderBindingTableAddress(@CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_hitShaderBindingTableAddress(this.segment(), value); return this; } + + /// {@return `hitShaderBindingTableSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_hitShaderBindingTableSize(MemorySegment segment, long index) { return (long) VH_hitShaderBindingTableSize.get(segment, 0L, index); } + /// {@return `hitShaderBindingTableSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_hitShaderBindingTableSize(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_hitShaderBindingTableSize(segment, 0L); } + /// {@return `hitShaderBindingTableSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long hitShaderBindingTableSizeAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_hitShaderBindingTableSize(this.segment(), index); } + /// {@return `hitShaderBindingTableSize`} + public @CType("VkDeviceSize") long hitShaderBindingTableSize() { return VkTraceRaysIndirectCommand2KHR.get_hitShaderBindingTableSize(this.segment()); } + /// Sets `hitShaderBindingTableSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hitShaderBindingTableSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_hitShaderBindingTableSize.set(segment, 0L, index, value); } + /// Sets `hitShaderBindingTableSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hitShaderBindingTableSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_hitShaderBindingTableSize(segment, 0L, value); } + /// Sets `hitShaderBindingTableSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR hitShaderBindingTableSizeAt(long index, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_hitShaderBindingTableSize(this.segment(), index, value); return this; } + /// Sets `hitShaderBindingTableSize` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR hitShaderBindingTableSize(@CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_hitShaderBindingTableSize(this.segment(), value); return this; } + + /// {@return `hitShaderBindingTableStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_hitShaderBindingTableStride(MemorySegment segment, long index) { return (long) VH_hitShaderBindingTableStride.get(segment, 0L, index); } + /// {@return `hitShaderBindingTableStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_hitShaderBindingTableStride(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_hitShaderBindingTableStride(segment, 0L); } + /// {@return `hitShaderBindingTableStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long hitShaderBindingTableStrideAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_hitShaderBindingTableStride(this.segment(), index); } + /// {@return `hitShaderBindingTableStride`} + public @CType("VkDeviceSize") long hitShaderBindingTableStride() { return VkTraceRaysIndirectCommand2KHR.get_hitShaderBindingTableStride(this.segment()); } + /// Sets `hitShaderBindingTableStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hitShaderBindingTableStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_hitShaderBindingTableStride.set(segment, 0L, index, value); } + /// Sets `hitShaderBindingTableStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hitShaderBindingTableStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_hitShaderBindingTableStride(segment, 0L, value); } + /// Sets `hitShaderBindingTableStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR hitShaderBindingTableStrideAt(long index, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_hitShaderBindingTableStride(this.segment(), index, value); return this; } + /// Sets `hitShaderBindingTableStride` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR hitShaderBindingTableStride(@CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_hitShaderBindingTableStride(this.segment(), value); return this; } + + /// {@return `callableShaderBindingTableAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_callableShaderBindingTableAddress(MemorySegment segment, long index) { return (long) VH_callableShaderBindingTableAddress.get(segment, 0L, index); } + /// {@return `callableShaderBindingTableAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_callableShaderBindingTableAddress(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_callableShaderBindingTableAddress(segment, 0L); } + /// {@return `callableShaderBindingTableAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long callableShaderBindingTableAddressAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_callableShaderBindingTableAddress(this.segment(), index); } + /// {@return `callableShaderBindingTableAddress`} + public @CType("VkDeviceAddress") long callableShaderBindingTableAddress() { return VkTraceRaysIndirectCommand2KHR.get_callableShaderBindingTableAddress(this.segment()); } + /// Sets `callableShaderBindingTableAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_callableShaderBindingTableAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_callableShaderBindingTableAddress.set(segment, 0L, index, value); } + /// Sets `callableShaderBindingTableAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_callableShaderBindingTableAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_callableShaderBindingTableAddress(segment, 0L, value); } + /// Sets `callableShaderBindingTableAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR callableShaderBindingTableAddressAt(long index, @CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_callableShaderBindingTableAddress(this.segment(), index, value); return this; } + /// Sets `callableShaderBindingTableAddress` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR callableShaderBindingTableAddress(@CType("VkDeviceAddress") long value) { VkTraceRaysIndirectCommand2KHR.set_callableShaderBindingTableAddress(this.segment(), value); return this; } + + /// {@return `callableShaderBindingTableSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_callableShaderBindingTableSize(MemorySegment segment, long index) { return (long) VH_callableShaderBindingTableSize.get(segment, 0L, index); } + /// {@return `callableShaderBindingTableSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_callableShaderBindingTableSize(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_callableShaderBindingTableSize(segment, 0L); } + /// {@return `callableShaderBindingTableSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long callableShaderBindingTableSizeAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_callableShaderBindingTableSize(this.segment(), index); } + /// {@return `callableShaderBindingTableSize`} + public @CType("VkDeviceSize") long callableShaderBindingTableSize() { return VkTraceRaysIndirectCommand2KHR.get_callableShaderBindingTableSize(this.segment()); } + /// Sets `callableShaderBindingTableSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_callableShaderBindingTableSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_callableShaderBindingTableSize.set(segment, 0L, index, value); } + /// Sets `callableShaderBindingTableSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_callableShaderBindingTableSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_callableShaderBindingTableSize(segment, 0L, value); } + /// Sets `callableShaderBindingTableSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR callableShaderBindingTableSizeAt(long index, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_callableShaderBindingTableSize(this.segment(), index, value); return this; } + /// Sets `callableShaderBindingTableSize` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR callableShaderBindingTableSize(@CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_callableShaderBindingTableSize(this.segment(), value); return this; } + + /// {@return `callableShaderBindingTableStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_callableShaderBindingTableStride(MemorySegment segment, long index) { return (long) VH_callableShaderBindingTableStride.get(segment, 0L, index); } + /// {@return `callableShaderBindingTableStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_callableShaderBindingTableStride(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_callableShaderBindingTableStride(segment, 0L); } + /// {@return `callableShaderBindingTableStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long callableShaderBindingTableStrideAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_callableShaderBindingTableStride(this.segment(), index); } + /// {@return `callableShaderBindingTableStride`} + public @CType("VkDeviceSize") long callableShaderBindingTableStride() { return VkTraceRaysIndirectCommand2KHR.get_callableShaderBindingTableStride(this.segment()); } + /// Sets `callableShaderBindingTableStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_callableShaderBindingTableStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_callableShaderBindingTableStride.set(segment, 0L, index, value); } + /// Sets `callableShaderBindingTableStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_callableShaderBindingTableStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_callableShaderBindingTableStride(segment, 0L, value); } + /// Sets `callableShaderBindingTableStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR callableShaderBindingTableStrideAt(long index, @CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_callableShaderBindingTableStride(this.segment(), index, value); return this; } + /// Sets `callableShaderBindingTableStride` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR callableShaderBindingTableStride(@CType("VkDeviceSize") long value) { VkTraceRaysIndirectCommand2KHR.set_callableShaderBindingTableStride(this.segment(), value); return this; } + + /// {@return `width` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_width(MemorySegment segment, long index) { return (int) VH_width.get(segment, 0L, index); } + /// {@return `width`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_width(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_width(segment, 0L); } + /// {@return `width` at the given index} + /// @param index the index + public @CType("uint32_t") int widthAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_width(this.segment(), index); } + /// {@return `width`} + public @CType("uint32_t") int width() { return VkTraceRaysIndirectCommand2KHR.get_width(this.segment()); } + /// Sets `width` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_width(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_width.set(segment, 0L, index, value); } + /// Sets `width` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_width(MemorySegment segment, @CType("uint32_t") int value) { VkTraceRaysIndirectCommand2KHR.set_width(segment, 0L, value); } + /// Sets `width` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR widthAt(long index, @CType("uint32_t") int value) { VkTraceRaysIndirectCommand2KHR.set_width(this.segment(), index, value); return this; } + /// Sets `width` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR width(@CType("uint32_t") int value) { VkTraceRaysIndirectCommand2KHR.set_width(this.segment(), value); return this; } + + /// {@return `height` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_height(MemorySegment segment, long index) { return (int) VH_height.get(segment, 0L, index); } + /// {@return `height`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_height(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_height(segment, 0L); } + /// {@return `height` at the given index} + /// @param index the index + public @CType("uint32_t") int heightAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_height(this.segment(), index); } + /// {@return `height`} + public @CType("uint32_t") int height() { return VkTraceRaysIndirectCommand2KHR.get_height(this.segment()); } + /// Sets `height` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_height(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_height.set(segment, 0L, index, value); } + /// Sets `height` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_height(MemorySegment segment, @CType("uint32_t") int value) { VkTraceRaysIndirectCommand2KHR.set_height(segment, 0L, value); } + /// Sets `height` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR heightAt(long index, @CType("uint32_t") int value) { VkTraceRaysIndirectCommand2KHR.set_height(this.segment(), index, value); return this; } + /// Sets `height` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR height(@CType("uint32_t") int value) { VkTraceRaysIndirectCommand2KHR.set_height(this.segment(), value); return this; } + + /// {@return `depth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_depth(MemorySegment segment, long index) { return (int) VH_depth.get(segment, 0L, index); } + /// {@return `depth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_depth(MemorySegment segment) { return VkTraceRaysIndirectCommand2KHR.get_depth(segment, 0L); } + /// {@return `depth` at the given index} + /// @param index the index + public @CType("uint32_t") int depthAt(long index) { return VkTraceRaysIndirectCommand2KHR.get_depth(this.segment(), index); } + /// {@return `depth`} + public @CType("uint32_t") int depth() { return VkTraceRaysIndirectCommand2KHR.get_depth(this.segment()); } + /// Sets `depth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_depth.set(segment, 0L, index, value); } + /// Sets `depth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depth(MemorySegment segment, @CType("uint32_t") int value) { VkTraceRaysIndirectCommand2KHR.set_depth(segment, 0L, value); } + /// Sets `depth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR depthAt(long index, @CType("uint32_t") int value) { VkTraceRaysIndirectCommand2KHR.set_depth(this.segment(), index, value); return this; } + /// Sets `depth` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommand2KHR depth(@CType("uint32_t") int value) { VkTraceRaysIndirectCommand2KHR.set_depth(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkTraceRaysIndirectCommandKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkTraceRaysIndirectCommandKHR.java new file mode 100644 index 00000000..a05270d1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkTraceRaysIndirectCommandKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### width +/// [VarHandle][#VH_width] - [Getter][#width()] - [Setter][#width(int)] +/// ### height +/// [VarHandle][#VH_height] - [Getter][#height()] - [Setter][#height(int)] +/// ### depth +/// [VarHandle][#VH_depth] - [Getter][#depth()] - [Setter][#depth(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkTraceRaysIndirectCommandKHR { +/// uint32_t width; +/// uint32_t height; +/// uint32_t depth; +/// } VkTraceRaysIndirectCommandKHR; +/// ``` +public final class VkTraceRaysIndirectCommandKHR extends Struct { + /// The struct layout of `VkTraceRaysIndirectCommandKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("width"), + ValueLayout.JAVA_INT.withName("height"), + ValueLayout.JAVA_INT.withName("depth") + ); + /// The [VarHandle] of `width` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_width = LAYOUT.arrayElementVarHandle(PathElement.groupElement("width")); + /// The [VarHandle] of `height` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_height = LAYOUT.arrayElementVarHandle(PathElement.groupElement("height")); + /// The [VarHandle] of `depth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depth")); + + /// Creates `VkTraceRaysIndirectCommandKHR` with the given segment. + /// @param segment the memory segment + public VkTraceRaysIndirectCommandKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkTraceRaysIndirectCommandKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTraceRaysIndirectCommandKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTraceRaysIndirectCommandKHR(segment); } + + /// Creates `VkTraceRaysIndirectCommandKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTraceRaysIndirectCommandKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTraceRaysIndirectCommandKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkTraceRaysIndirectCommandKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkTraceRaysIndirectCommandKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkTraceRaysIndirectCommandKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkTraceRaysIndirectCommandKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkTraceRaysIndirectCommandKHR` + public static VkTraceRaysIndirectCommandKHR alloc(SegmentAllocator allocator) { return new VkTraceRaysIndirectCommandKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkTraceRaysIndirectCommandKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkTraceRaysIndirectCommandKHR` + public static VkTraceRaysIndirectCommandKHR alloc(SegmentAllocator allocator, long count) { return new VkTraceRaysIndirectCommandKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `width` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_width(MemorySegment segment, long index) { return (int) VH_width.get(segment, 0L, index); } + /// {@return `width`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_width(MemorySegment segment) { return VkTraceRaysIndirectCommandKHR.get_width(segment, 0L); } + /// {@return `width` at the given index} + /// @param index the index + public @CType("uint32_t") int widthAt(long index) { return VkTraceRaysIndirectCommandKHR.get_width(this.segment(), index); } + /// {@return `width`} + public @CType("uint32_t") int width() { return VkTraceRaysIndirectCommandKHR.get_width(this.segment()); } + /// Sets `width` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_width(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_width.set(segment, 0L, index, value); } + /// Sets `width` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_width(MemorySegment segment, @CType("uint32_t") int value) { VkTraceRaysIndirectCommandKHR.set_width(segment, 0L, value); } + /// Sets `width` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommandKHR widthAt(long index, @CType("uint32_t") int value) { VkTraceRaysIndirectCommandKHR.set_width(this.segment(), index, value); return this; } + /// Sets `width` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommandKHR width(@CType("uint32_t") int value) { VkTraceRaysIndirectCommandKHR.set_width(this.segment(), value); return this; } + + /// {@return `height` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_height(MemorySegment segment, long index) { return (int) VH_height.get(segment, 0L, index); } + /// {@return `height`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_height(MemorySegment segment) { return VkTraceRaysIndirectCommandKHR.get_height(segment, 0L); } + /// {@return `height` at the given index} + /// @param index the index + public @CType("uint32_t") int heightAt(long index) { return VkTraceRaysIndirectCommandKHR.get_height(this.segment(), index); } + /// {@return `height`} + public @CType("uint32_t") int height() { return VkTraceRaysIndirectCommandKHR.get_height(this.segment()); } + /// Sets `height` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_height(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_height.set(segment, 0L, index, value); } + /// Sets `height` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_height(MemorySegment segment, @CType("uint32_t") int value) { VkTraceRaysIndirectCommandKHR.set_height(segment, 0L, value); } + /// Sets `height` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommandKHR heightAt(long index, @CType("uint32_t") int value) { VkTraceRaysIndirectCommandKHR.set_height(this.segment(), index, value); return this; } + /// Sets `height` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommandKHR height(@CType("uint32_t") int value) { VkTraceRaysIndirectCommandKHR.set_height(this.segment(), value); return this; } + + /// {@return `depth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_depth(MemorySegment segment, long index) { return (int) VH_depth.get(segment, 0L, index); } + /// {@return `depth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_depth(MemorySegment segment) { return VkTraceRaysIndirectCommandKHR.get_depth(segment, 0L); } + /// {@return `depth` at the given index} + /// @param index the index + public @CType("uint32_t") int depthAt(long index) { return VkTraceRaysIndirectCommandKHR.get_depth(this.segment(), index); } + /// {@return `depth`} + public @CType("uint32_t") int depth() { return VkTraceRaysIndirectCommandKHR.get_depth(this.segment()); } + /// Sets `depth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_depth.set(segment, 0L, index, value); } + /// Sets `depth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depth(MemorySegment segment, @CType("uint32_t") int value) { VkTraceRaysIndirectCommandKHR.set_depth(segment, 0L, value); } + /// Sets `depth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommandKHR depthAt(long index, @CType("uint32_t") int value) { VkTraceRaysIndirectCommandKHR.set_depth(this.segment(), index, value); return this; } + /// Sets `depth` with the given value. + /// @param value the value + /// @return `this` + public VkTraceRaysIndirectCommandKHR depth(@CType("uint32_t") int value) { VkTraceRaysIndirectCommandKHR.set_depth(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkTransformMatrixKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkTransformMatrixKHR.java new file mode 100644 index 00000000..2caa639f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkTransformMatrixKHR.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### matrix +/// [VarHandle][#VH_matrix] - [Getter][#matrix()] - [Setter][#matrix(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkTransformMatrixKHR { +/// float matrix; +/// } VkTransformMatrixKHR; +/// ``` +public final class VkTransformMatrixKHR extends Struct { + /// The struct layout of `VkTransformMatrixKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_FLOAT.withName("matrix") + ); + /// The [VarHandle] of `matrix` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_matrix = LAYOUT.arrayElementVarHandle(PathElement.groupElement("matrix")); + + /// Creates `VkTransformMatrixKHR` with the given segment. + /// @param segment the memory segment + public VkTransformMatrixKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkTransformMatrixKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTransformMatrixKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTransformMatrixKHR(segment); } + + /// Creates `VkTransformMatrixKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTransformMatrixKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTransformMatrixKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkTransformMatrixKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkTransformMatrixKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkTransformMatrixKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkTransformMatrixKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkTransformMatrixKHR` + public static VkTransformMatrixKHR alloc(SegmentAllocator allocator) { return new VkTransformMatrixKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkTransformMatrixKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkTransformMatrixKHR` + public static VkTransformMatrixKHR alloc(SegmentAllocator allocator, long count) { return new VkTransformMatrixKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `matrix` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_matrix(MemorySegment segment, long index) { return (float) VH_matrix.get(segment, 0L, index); } + /// {@return `matrix`} + /// @param segment the segment of the struct + public static @CType("float") float get_matrix(MemorySegment segment) { return VkTransformMatrixKHR.get_matrix(segment, 0L); } + /// {@return `matrix` at the given index} + /// @param index the index + public @CType("float") float matrixAt(long index) { return VkTransformMatrixKHR.get_matrix(this.segment(), index); } + /// {@return `matrix`} + public @CType("float") float matrix() { return VkTransformMatrixKHR.get_matrix(this.segment()); } + /// Sets `matrix` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_matrix(MemorySegment segment, long index, @CType("float") float value) { VH_matrix.set(segment, 0L, index, value); } + /// Sets `matrix` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_matrix(MemorySegment segment, @CType("float") float value) { VkTransformMatrixKHR.set_matrix(segment, 0L, value); } + /// Sets `matrix` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTransformMatrixKHR matrixAt(long index, @CType("float") float value) { VkTransformMatrixKHR.set_matrix(this.segment(), index, value); return this; } + /// Sets `matrix` with the given value. + /// @param value the value + /// @return `this` + public VkTransformMatrixKHR matrix(@CType("float") float value) { VkTransformMatrixKHR.set_matrix(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoBeginCodingInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoBeginCodingInfoKHR.java new file mode 100644 index 00000000..fcc17fea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoBeginCodingInfoKHR.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### videoSession +/// [VarHandle][#VH_videoSession] - [Getter][#videoSession()] - [Setter][#videoSession(java.lang.foreign.MemorySegment)] +/// ### videoSessionParameters +/// [VarHandle][#VH_videoSessionParameters] - [Getter][#videoSessionParameters()] - [Setter][#videoSessionParameters(java.lang.foreign.MemorySegment)] +/// ### referenceSlotCount +/// [VarHandle][#VH_referenceSlotCount] - [Getter][#referenceSlotCount()] - [Setter][#referenceSlotCount(int)] +/// ### pReferenceSlots +/// [VarHandle][#VH_pReferenceSlots] - [Getter][#pReferenceSlots()] - [Setter][#pReferenceSlots(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoBeginCodingInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoBeginCodingFlagsKHR flags; +/// VkVideoSessionKHR videoSession; +/// VkVideoSessionParametersKHR videoSessionParameters; +/// uint32_t referenceSlotCount; +/// const VkVideoReferenceSlotInfoKHR * pReferenceSlots; +/// } VkVideoBeginCodingInfoKHR; +/// ``` +public final class VkVideoBeginCodingInfoKHR extends Struct { + /// The struct layout of `VkVideoBeginCodingInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("videoSession"), + ValueLayout.ADDRESS.withName("videoSessionParameters"), + ValueLayout.JAVA_INT.withName("referenceSlotCount"), + ValueLayout.ADDRESS.withName("pReferenceSlots") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `videoSession` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_videoSession = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoSession")); + /// The [VarHandle] of `videoSessionParameters` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_videoSessionParameters = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoSessionParameters")); + /// The [VarHandle] of `referenceSlotCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_referenceSlotCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("referenceSlotCount")); + /// The [VarHandle] of `pReferenceSlots` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pReferenceSlots = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pReferenceSlots")); + + /// Creates `VkVideoBeginCodingInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoBeginCodingInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoBeginCodingInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoBeginCodingInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoBeginCodingInfoKHR(segment); } + + /// Creates `VkVideoBeginCodingInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoBeginCodingInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoBeginCodingInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoBeginCodingInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoBeginCodingInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoBeginCodingInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoBeginCodingInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoBeginCodingInfoKHR` + public static VkVideoBeginCodingInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoBeginCodingInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoBeginCodingInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoBeginCodingInfoKHR` + public static VkVideoBeginCodingInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoBeginCodingInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoBeginCodingInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoBeginCodingInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoBeginCodingInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoBeginCodingInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoBeginCodingInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR sType(@CType("VkStructureType") int value) { VkVideoBeginCodingInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoBeginCodingInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoBeginCodingInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoBeginCodingInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoBeginCodingFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoBeginCodingFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoBeginCodingInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoBeginCodingFlagsKHR") int flagsAt(long index) { return VkVideoBeginCodingInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoBeginCodingFlagsKHR") int flags() { return VkVideoBeginCodingInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoBeginCodingFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoBeginCodingFlagsKHR") int value) { VkVideoBeginCodingInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR flagsAt(long index, @CType("VkVideoBeginCodingFlagsKHR") int value) { VkVideoBeginCodingInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR flags(@CType("VkVideoBeginCodingFlagsKHR") int value) { VkVideoBeginCodingInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `videoSession` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment get_videoSession(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_videoSession.get(segment, 0L, index); } + /// {@return `videoSession`} + /// @param segment the segment of the struct + public static @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment get_videoSession(MemorySegment segment) { return VkVideoBeginCodingInfoKHR.get_videoSession(segment, 0L); } + /// {@return `videoSession` at the given index} + /// @param index the index + public @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment videoSessionAt(long index) { return VkVideoBeginCodingInfoKHR.get_videoSession(this.segment(), index); } + /// {@return `videoSession`} + public @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment videoSession() { return VkVideoBeginCodingInfoKHR.get_videoSession(this.segment()); } + /// Sets `videoSession` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoSession(MemorySegment segment, long index, @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment value) { VH_videoSession.set(segment, 0L, index, value); } + /// Sets `videoSession` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoSession(MemorySegment segment, @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_videoSession(segment, 0L, value); } + /// Sets `videoSession` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR videoSessionAt(long index, @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_videoSession(this.segment(), index, value); return this; } + /// Sets `videoSession` with the given value. + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR videoSession(@CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_videoSession(this.segment(), value); return this; } + + /// {@return `videoSessionParameters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment get_videoSessionParameters(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_videoSessionParameters.get(segment, 0L, index); } + /// {@return `videoSessionParameters`} + /// @param segment the segment of the struct + public static @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment get_videoSessionParameters(MemorySegment segment) { return VkVideoBeginCodingInfoKHR.get_videoSessionParameters(segment, 0L); } + /// {@return `videoSessionParameters` at the given index} + /// @param index the index + public @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment videoSessionParametersAt(long index) { return VkVideoBeginCodingInfoKHR.get_videoSessionParameters(this.segment(), index); } + /// {@return `videoSessionParameters`} + public @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment videoSessionParameters() { return VkVideoBeginCodingInfoKHR.get_videoSessionParameters(this.segment()); } + /// Sets `videoSessionParameters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoSessionParameters(MemorySegment segment, long index, @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VH_videoSessionParameters.set(segment, 0L, index, value); } + /// Sets `videoSessionParameters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoSessionParameters(MemorySegment segment, @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_videoSessionParameters(segment, 0L, value); } + /// Sets `videoSessionParameters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR videoSessionParametersAt(long index, @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_videoSessionParameters(this.segment(), index, value); return this; } + /// Sets `videoSessionParameters` with the given value. + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR videoSessionParameters(@CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_videoSessionParameters(this.segment(), value); return this; } + + /// {@return `referenceSlotCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_referenceSlotCount(MemorySegment segment, long index) { return (int) VH_referenceSlotCount.get(segment, 0L, index); } + /// {@return `referenceSlotCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_referenceSlotCount(MemorySegment segment) { return VkVideoBeginCodingInfoKHR.get_referenceSlotCount(segment, 0L); } + /// {@return `referenceSlotCount` at the given index} + /// @param index the index + public @CType("uint32_t") int referenceSlotCountAt(long index) { return VkVideoBeginCodingInfoKHR.get_referenceSlotCount(this.segment(), index); } + /// {@return `referenceSlotCount`} + public @CType("uint32_t") int referenceSlotCount() { return VkVideoBeginCodingInfoKHR.get_referenceSlotCount(this.segment()); } + /// Sets `referenceSlotCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_referenceSlotCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_referenceSlotCount.set(segment, 0L, index, value); } + /// Sets `referenceSlotCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_referenceSlotCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoBeginCodingInfoKHR.set_referenceSlotCount(segment, 0L, value); } + /// Sets `referenceSlotCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR referenceSlotCountAt(long index, @CType("uint32_t") int value) { VkVideoBeginCodingInfoKHR.set_referenceSlotCount(this.segment(), index, value); return this; } + /// Sets `referenceSlotCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR referenceSlotCount(@CType("uint32_t") int value) { VkVideoBeginCodingInfoKHR.set_referenceSlotCount(this.segment(), value); return this; } + + /// {@return `pReferenceSlots` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment get_pReferenceSlots(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pReferenceSlots.get(segment, 0L, index); } + /// {@return `pReferenceSlots`} + /// @param segment the segment of the struct + public static @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment get_pReferenceSlots(MemorySegment segment) { return VkVideoBeginCodingInfoKHR.get_pReferenceSlots(segment, 0L); } + /// {@return `pReferenceSlots` at the given index} + /// @param index the index + public @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment pReferenceSlotsAt(long index) { return VkVideoBeginCodingInfoKHR.get_pReferenceSlots(this.segment(), index); } + /// {@return `pReferenceSlots`} + public @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment pReferenceSlots() { return VkVideoBeginCodingInfoKHR.get_pReferenceSlots(this.segment()); } + /// Sets `pReferenceSlots` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pReferenceSlots(MemorySegment segment, long index, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pReferenceSlots.set(segment, 0L, index, value); } + /// Sets `pReferenceSlots` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pReferenceSlots(MemorySegment segment, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_pReferenceSlots(segment, 0L, value); } + /// Sets `pReferenceSlots` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR pReferenceSlotsAt(long index, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_pReferenceSlots(this.segment(), index, value); return this; } + /// Sets `pReferenceSlots` with the given value. + /// @param value the value + /// @return `this` + public VkVideoBeginCodingInfoKHR pReferenceSlots(@CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoBeginCodingInfoKHR.set_pReferenceSlots(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoCapabilitiesKHR.java new file mode 100644 index 00000000..255e7dfb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoCapabilitiesKHR.java @@ -0,0 +1,489 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### minBitstreamBufferOffsetAlignment +/// [VarHandle][#VH_minBitstreamBufferOffsetAlignment] - [Getter][#minBitstreamBufferOffsetAlignment()] - [Setter][#minBitstreamBufferOffsetAlignment(long)] +/// ### minBitstreamBufferSizeAlignment +/// [VarHandle][#VH_minBitstreamBufferSizeAlignment] - [Getter][#minBitstreamBufferSizeAlignment()] - [Setter][#minBitstreamBufferSizeAlignment(long)] +/// ### pictureAccessGranularity +/// [Byte offset][#OFFSET_pictureAccessGranularity] - [Memory layout][#ML_pictureAccessGranularity] - [Getter][#pictureAccessGranularity()] - [Setter][#pictureAccessGranularity(java.lang.foreign.MemorySegment)] +/// ### minCodedExtent +/// [Byte offset][#OFFSET_minCodedExtent] - [Memory layout][#ML_minCodedExtent] - [Getter][#minCodedExtent()] - [Setter][#minCodedExtent(java.lang.foreign.MemorySegment)] +/// ### maxCodedExtent +/// [Byte offset][#OFFSET_maxCodedExtent] - [Memory layout][#ML_maxCodedExtent] - [Getter][#maxCodedExtent()] - [Setter][#maxCodedExtent(java.lang.foreign.MemorySegment)] +/// ### maxDpbSlots +/// [VarHandle][#VH_maxDpbSlots] - [Getter][#maxDpbSlots()] - [Setter][#maxDpbSlots(int)] +/// ### maxActiveReferencePictures +/// [VarHandle][#VH_maxActiveReferencePictures] - [Getter][#maxActiveReferencePictures()] - [Setter][#maxActiveReferencePictures(int)] +/// ### stdHeaderVersion +/// [Byte offset][#OFFSET_stdHeaderVersion] - [Memory layout][#ML_stdHeaderVersion] - [Getter][#stdHeaderVersion()] - [Setter][#stdHeaderVersion(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoCapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoCapabilityFlagsKHR flags; +/// VkDeviceSize minBitstreamBufferOffsetAlignment; +/// VkDeviceSize minBitstreamBufferSizeAlignment; +/// VkExtent2D pictureAccessGranularity; +/// VkExtent2D minCodedExtent; +/// VkExtent2D maxCodedExtent; +/// uint32_t maxDpbSlots; +/// uint32_t maxActiveReferencePictures; +/// VkExtensionProperties stdHeaderVersion; +/// } VkVideoCapabilitiesKHR; +/// ``` +public final class VkVideoCapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("minBitstreamBufferOffsetAlignment"), + ValueLayout.JAVA_LONG.withName("minBitstreamBufferSizeAlignment"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("pictureAccessGranularity"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("minCodedExtent"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxCodedExtent"), + ValueLayout.JAVA_INT.withName("maxDpbSlots"), + ValueLayout.JAVA_INT.withName("maxActiveReferencePictures"), + overrungl.vulkan.struct.VkExtensionProperties.LAYOUT.withName("stdHeaderVersion") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `minBitstreamBufferOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_minBitstreamBufferOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minBitstreamBufferOffsetAlignment")); + /// The [VarHandle] of `minBitstreamBufferSizeAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_minBitstreamBufferSizeAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minBitstreamBufferSizeAlignment")); + /// The byte offset of `pictureAccessGranularity`. + public static final long OFFSET_pictureAccessGranularity = LAYOUT.byteOffset(PathElement.groupElement("pictureAccessGranularity")); + /// The memory layout of `pictureAccessGranularity`. + public static final MemoryLayout ML_pictureAccessGranularity = LAYOUT.select(PathElement.groupElement("pictureAccessGranularity")); + /// The byte offset of `minCodedExtent`. + public static final long OFFSET_minCodedExtent = LAYOUT.byteOffset(PathElement.groupElement("minCodedExtent")); + /// The memory layout of `minCodedExtent`. + public static final MemoryLayout ML_minCodedExtent = LAYOUT.select(PathElement.groupElement("minCodedExtent")); + /// The byte offset of `maxCodedExtent`. + public static final long OFFSET_maxCodedExtent = LAYOUT.byteOffset(PathElement.groupElement("maxCodedExtent")); + /// The memory layout of `maxCodedExtent`. + public static final MemoryLayout ML_maxCodedExtent = LAYOUT.select(PathElement.groupElement("maxCodedExtent")); + /// The [VarHandle] of `maxDpbSlots` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDpbSlots = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDpbSlots")); + /// The [VarHandle] of `maxActiveReferencePictures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxActiveReferencePictures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxActiveReferencePictures")); + /// The byte offset of `stdHeaderVersion`. + public static final long OFFSET_stdHeaderVersion = LAYOUT.byteOffset(PathElement.groupElement("stdHeaderVersion")); + /// The memory layout of `stdHeaderVersion`. + public static final MemoryLayout ML_stdHeaderVersion = LAYOUT.select(PathElement.groupElement("stdHeaderVersion")); + + /// Creates `VkVideoCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoCapabilitiesKHR(segment); } + + /// Creates `VkVideoCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoCapabilitiesKHR` + public static VkVideoCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoCapabilitiesKHR` + public static VkVideoCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoCapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoCapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoCapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoCapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoCapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoCapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoCapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoCapabilityFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoCapabilityFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoCapabilityFlagsKHR") int flagsAt(long index) { return VkVideoCapabilitiesKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoCapabilityFlagsKHR") int flags() { return VkVideoCapabilitiesKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoCapabilityFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoCapabilityFlagsKHR") int value) { VkVideoCapabilitiesKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR flagsAt(long index, @CType("VkVideoCapabilityFlagsKHR") int value) { VkVideoCapabilitiesKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR flags(@CType("VkVideoCapabilityFlagsKHR") int value) { VkVideoCapabilitiesKHR.set_flags(this.segment(), value); return this; } + + /// {@return `minBitstreamBufferOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_minBitstreamBufferOffsetAlignment(MemorySegment segment, long index) { return (long) VH_minBitstreamBufferOffsetAlignment.get(segment, 0L, index); } + /// {@return `minBitstreamBufferOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_minBitstreamBufferOffsetAlignment(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_minBitstreamBufferOffsetAlignment(segment, 0L); } + /// {@return `minBitstreamBufferOffsetAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long minBitstreamBufferOffsetAlignmentAt(long index) { return VkVideoCapabilitiesKHR.get_minBitstreamBufferOffsetAlignment(this.segment(), index); } + /// {@return `minBitstreamBufferOffsetAlignment`} + public @CType("VkDeviceSize") long minBitstreamBufferOffsetAlignment() { return VkVideoCapabilitiesKHR.get_minBitstreamBufferOffsetAlignment(this.segment()); } + /// Sets `minBitstreamBufferOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minBitstreamBufferOffsetAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_minBitstreamBufferOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `minBitstreamBufferOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minBitstreamBufferOffsetAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkVideoCapabilitiesKHR.set_minBitstreamBufferOffsetAlignment(segment, 0L, value); } + /// Sets `minBitstreamBufferOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR minBitstreamBufferOffsetAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkVideoCapabilitiesKHR.set_minBitstreamBufferOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `minBitstreamBufferOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR minBitstreamBufferOffsetAlignment(@CType("VkDeviceSize") long value) { VkVideoCapabilitiesKHR.set_minBitstreamBufferOffsetAlignment(this.segment(), value); return this; } + + /// {@return `minBitstreamBufferSizeAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_minBitstreamBufferSizeAlignment(MemorySegment segment, long index) { return (long) VH_minBitstreamBufferSizeAlignment.get(segment, 0L, index); } + /// {@return `minBitstreamBufferSizeAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_minBitstreamBufferSizeAlignment(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_minBitstreamBufferSizeAlignment(segment, 0L); } + /// {@return `minBitstreamBufferSizeAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long minBitstreamBufferSizeAlignmentAt(long index) { return VkVideoCapabilitiesKHR.get_minBitstreamBufferSizeAlignment(this.segment(), index); } + /// {@return `minBitstreamBufferSizeAlignment`} + public @CType("VkDeviceSize") long minBitstreamBufferSizeAlignment() { return VkVideoCapabilitiesKHR.get_minBitstreamBufferSizeAlignment(this.segment()); } + /// Sets `minBitstreamBufferSizeAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minBitstreamBufferSizeAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_minBitstreamBufferSizeAlignment.set(segment, 0L, index, value); } + /// Sets `minBitstreamBufferSizeAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minBitstreamBufferSizeAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkVideoCapabilitiesKHR.set_minBitstreamBufferSizeAlignment(segment, 0L, value); } + /// Sets `minBitstreamBufferSizeAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR minBitstreamBufferSizeAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkVideoCapabilitiesKHR.set_minBitstreamBufferSizeAlignment(this.segment(), index, value); return this; } + /// Sets `minBitstreamBufferSizeAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR minBitstreamBufferSizeAlignment(@CType("VkDeviceSize") long value) { VkVideoCapabilitiesKHR.set_minBitstreamBufferSizeAlignment(this.segment(), value); return this; } + + /// {@return `pictureAccessGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_pictureAccessGranularity(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_pictureAccessGranularity, index), ML_pictureAccessGranularity); } + /// {@return `pictureAccessGranularity`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_pictureAccessGranularity(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_pictureAccessGranularity(segment, 0L); } + /// {@return `pictureAccessGranularity` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment pictureAccessGranularityAt(long index) { return VkVideoCapabilitiesKHR.get_pictureAccessGranularity(this.segment(), index); } + /// {@return `pictureAccessGranularity`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment pictureAccessGranularity() { return VkVideoCapabilitiesKHR.get_pictureAccessGranularity(this.segment()); } + /// Sets `pictureAccessGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pictureAccessGranularity(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_pictureAccessGranularity, index), ML_pictureAccessGranularity.byteSize()); } + /// Sets `pictureAccessGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pictureAccessGranularity(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_pictureAccessGranularity(segment, 0L, value); } + /// Sets `pictureAccessGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR pictureAccessGranularityAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_pictureAccessGranularity(this.segment(), index, value); return this; } + /// Sets `pictureAccessGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR pictureAccessGranularity(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_pictureAccessGranularity(this.segment(), value); return this; } + + /// {@return `minCodedExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minCodedExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minCodedExtent, index), ML_minCodedExtent); } + /// {@return `minCodedExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minCodedExtent(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_minCodedExtent(segment, 0L); } + /// {@return `minCodedExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minCodedExtentAt(long index) { return VkVideoCapabilitiesKHR.get_minCodedExtent(this.segment(), index); } + /// {@return `minCodedExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minCodedExtent() { return VkVideoCapabilitiesKHR.get_minCodedExtent(this.segment()); } + /// Sets `minCodedExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minCodedExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minCodedExtent, index), ML_minCodedExtent.byteSize()); } + /// Sets `minCodedExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minCodedExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_minCodedExtent(segment, 0L, value); } + /// Sets `minCodedExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR minCodedExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_minCodedExtent(this.segment(), index, value); return this; } + /// Sets `minCodedExtent` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR minCodedExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_minCodedExtent(this.segment(), value); return this; } + + /// {@return `maxCodedExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxCodedExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxCodedExtent, index), ML_maxCodedExtent); } + /// {@return `maxCodedExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxCodedExtent(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_maxCodedExtent(segment, 0L); } + /// {@return `maxCodedExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxCodedExtentAt(long index) { return VkVideoCapabilitiesKHR.get_maxCodedExtent(this.segment(), index); } + /// {@return `maxCodedExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxCodedExtent() { return VkVideoCapabilitiesKHR.get_maxCodedExtent(this.segment()); } + /// Sets `maxCodedExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCodedExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxCodedExtent, index), ML_maxCodedExtent.byteSize()); } + /// Sets `maxCodedExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCodedExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_maxCodedExtent(segment, 0L, value); } + /// Sets `maxCodedExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR maxCodedExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_maxCodedExtent(this.segment(), index, value); return this; } + /// Sets `maxCodedExtent` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR maxCodedExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_maxCodedExtent(this.segment(), value); return this; } + + /// {@return `maxDpbSlots` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDpbSlots(MemorySegment segment, long index) { return (int) VH_maxDpbSlots.get(segment, 0L, index); } + /// {@return `maxDpbSlots`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDpbSlots(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_maxDpbSlots(segment, 0L); } + /// {@return `maxDpbSlots` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDpbSlotsAt(long index) { return VkVideoCapabilitiesKHR.get_maxDpbSlots(this.segment(), index); } + /// {@return `maxDpbSlots`} + public @CType("uint32_t") int maxDpbSlots() { return VkVideoCapabilitiesKHR.get_maxDpbSlots(this.segment()); } + /// Sets `maxDpbSlots` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDpbSlots(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDpbSlots.set(segment, 0L, index, value); } + /// Sets `maxDpbSlots` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDpbSlots(MemorySegment segment, @CType("uint32_t") int value) { VkVideoCapabilitiesKHR.set_maxDpbSlots(segment, 0L, value); } + /// Sets `maxDpbSlots` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR maxDpbSlotsAt(long index, @CType("uint32_t") int value) { VkVideoCapabilitiesKHR.set_maxDpbSlots(this.segment(), index, value); return this; } + /// Sets `maxDpbSlots` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR maxDpbSlots(@CType("uint32_t") int value) { VkVideoCapabilitiesKHR.set_maxDpbSlots(this.segment(), value); return this; } + + /// {@return `maxActiveReferencePictures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxActiveReferencePictures(MemorySegment segment, long index) { return (int) VH_maxActiveReferencePictures.get(segment, 0L, index); } + /// {@return `maxActiveReferencePictures`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxActiveReferencePictures(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_maxActiveReferencePictures(segment, 0L); } + /// {@return `maxActiveReferencePictures` at the given index} + /// @param index the index + public @CType("uint32_t") int maxActiveReferencePicturesAt(long index) { return VkVideoCapabilitiesKHR.get_maxActiveReferencePictures(this.segment(), index); } + /// {@return `maxActiveReferencePictures`} + public @CType("uint32_t") int maxActiveReferencePictures() { return VkVideoCapabilitiesKHR.get_maxActiveReferencePictures(this.segment()); } + /// Sets `maxActiveReferencePictures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxActiveReferencePictures(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxActiveReferencePictures.set(segment, 0L, index, value); } + /// Sets `maxActiveReferencePictures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxActiveReferencePictures(MemorySegment segment, @CType("uint32_t") int value) { VkVideoCapabilitiesKHR.set_maxActiveReferencePictures(segment, 0L, value); } + /// Sets `maxActiveReferencePictures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR maxActiveReferencePicturesAt(long index, @CType("uint32_t") int value) { VkVideoCapabilitiesKHR.set_maxActiveReferencePictures(this.segment(), index, value); return this; } + /// Sets `maxActiveReferencePictures` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR maxActiveReferencePictures(@CType("uint32_t") int value) { VkVideoCapabilitiesKHR.set_maxActiveReferencePictures(this.segment(), value); return this; } + + /// {@return `stdHeaderVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtensionProperties") java.lang.foreign.MemorySegment get_stdHeaderVersion(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_stdHeaderVersion, index), ML_stdHeaderVersion); } + /// {@return `stdHeaderVersion`} + /// @param segment the segment of the struct + public static @CType("VkExtensionProperties") java.lang.foreign.MemorySegment get_stdHeaderVersion(MemorySegment segment) { return VkVideoCapabilitiesKHR.get_stdHeaderVersion(segment, 0L); } + /// {@return `stdHeaderVersion` at the given index} + /// @param index the index + public @CType("VkExtensionProperties") java.lang.foreign.MemorySegment stdHeaderVersionAt(long index) { return VkVideoCapabilitiesKHR.get_stdHeaderVersion(this.segment(), index); } + /// {@return `stdHeaderVersion`} + public @CType("VkExtensionProperties") java.lang.foreign.MemorySegment stdHeaderVersion() { return VkVideoCapabilitiesKHR.get_stdHeaderVersion(this.segment()); } + /// Sets `stdHeaderVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdHeaderVersion(MemorySegment segment, long index, @CType("VkExtensionProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_stdHeaderVersion, index), ML_stdHeaderVersion.byteSize()); } + /// Sets `stdHeaderVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdHeaderVersion(MemorySegment segment, @CType("VkExtensionProperties") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_stdHeaderVersion(segment, 0L, value); } + /// Sets `stdHeaderVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR stdHeaderVersionAt(long index, @CType("VkExtensionProperties") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_stdHeaderVersion(this.segment(), index, value); return this; } + /// Sets `stdHeaderVersion` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCapabilitiesKHR stdHeaderVersion(@CType("VkExtensionProperties") java.lang.foreign.MemorySegment value) { VkVideoCapabilitiesKHR.set_stdHeaderVersion(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoCodingControlInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoCodingControlInfoKHR.java new file mode 100644 index 00000000..e5df82fe --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoCodingControlInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoCodingControlInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoCodingControlFlagsKHR flags; +/// } VkVideoCodingControlInfoKHR; +/// ``` +public final class VkVideoCodingControlInfoKHR extends Struct { + /// The struct layout of `VkVideoCodingControlInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkVideoCodingControlInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoCodingControlInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoCodingControlInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoCodingControlInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoCodingControlInfoKHR(segment); } + + /// Creates `VkVideoCodingControlInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoCodingControlInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoCodingControlInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoCodingControlInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoCodingControlInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoCodingControlInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoCodingControlInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoCodingControlInfoKHR` + public static VkVideoCodingControlInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoCodingControlInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoCodingControlInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoCodingControlInfoKHR` + public static VkVideoCodingControlInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoCodingControlInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoCodingControlInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoCodingControlInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoCodingControlInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoCodingControlInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCodingControlInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoCodingControlInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCodingControlInfoKHR sType(@CType("VkStructureType") int value) { VkVideoCodingControlInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoCodingControlInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoCodingControlInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoCodingControlInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoCodingControlInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCodingControlInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoCodingControlInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCodingControlInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoCodingControlInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoCodingControlFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoCodingControlFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoCodingControlInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoCodingControlFlagsKHR") int flagsAt(long index) { return VkVideoCodingControlInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoCodingControlFlagsKHR") int flags() { return VkVideoCodingControlInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoCodingControlFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoCodingControlFlagsKHR") int value) { VkVideoCodingControlInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoCodingControlInfoKHR flagsAt(long index, @CType("VkVideoCodingControlFlagsKHR") int value) { VkVideoCodingControlInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoCodingControlInfoKHR flags(@CType("VkVideoCodingControlFlagsKHR") int value) { VkVideoCodingControlInfoKHR.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1CapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1CapabilitiesKHR.java new file mode 100644 index 00000000..0d2da8d9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1CapabilitiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxLevel +/// [VarHandle][#VH_maxLevel] - [Getter][#maxLevel()] - [Setter][#maxLevel(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeAV1CapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// StdVideoAV1Level maxLevel; +/// } VkVideoDecodeAV1CapabilitiesKHR; +/// ``` +public final class VkVideoDecodeAV1CapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoDecodeAV1CapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxLevel") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLevel")); + + /// Creates `VkVideoDecodeAV1CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeAV1CapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeAV1CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1CapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1CapabilitiesKHR(segment); } + + /// Creates `VkVideoDecodeAV1CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1CapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeAV1CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1CapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeAV1CapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeAV1CapabilitiesKHR` + public static VkVideoDecodeAV1CapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeAV1CapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeAV1CapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeAV1CapabilitiesKHR` + public static VkVideoDecodeAV1CapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeAV1CapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeAV1CapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeAV1CapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeAV1CapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeAV1CapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1CapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeAV1CapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1CapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeAV1CapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeAV1CapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeAV1CapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeAV1CapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1CapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1CapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1CapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1CapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1CapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1Level") int get_maxLevel(MemorySegment segment, long index) { return (int) VH_maxLevel.get(segment, 0L, index); } + /// {@return `maxLevel`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1Level") int get_maxLevel(MemorySegment segment) { return VkVideoDecodeAV1CapabilitiesKHR.get_maxLevel(segment, 0L); } + /// {@return `maxLevel` at the given index} + /// @param index the index + public @CType("StdVideoAV1Level") int maxLevelAt(long index) { return VkVideoDecodeAV1CapabilitiesKHR.get_maxLevel(this.segment(), index); } + /// {@return `maxLevel`} + public @CType("StdVideoAV1Level") int maxLevel() { return VkVideoDecodeAV1CapabilitiesKHR.get_maxLevel(this.segment()); } + /// Sets `maxLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLevel(MemorySegment segment, long index, @CType("StdVideoAV1Level") int value) { VH_maxLevel.set(segment, 0L, index, value); } + /// Sets `maxLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLevel(MemorySegment segment, @CType("StdVideoAV1Level") int value) { VkVideoDecodeAV1CapabilitiesKHR.set_maxLevel(segment, 0L, value); } + /// Sets `maxLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1CapabilitiesKHR maxLevelAt(long index, @CType("StdVideoAV1Level") int value) { VkVideoDecodeAV1CapabilitiesKHR.set_maxLevel(this.segment(), index, value); return this; } + /// Sets `maxLevel` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1CapabilitiesKHR maxLevel(@CType("StdVideoAV1Level") int value) { VkVideoDecodeAV1CapabilitiesKHR.set_maxLevel(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1DpbSlotInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1DpbSlotInfoKHR.java new file mode 100644 index 00000000..e339582e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1DpbSlotInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdReferenceInfo +/// [VarHandle][#VH_pStdReferenceInfo] - [Getter][#pStdReferenceInfo()] - [Setter][#pStdReferenceInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeAV1DpbSlotInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoDecodeAV1ReferenceInfo * pStdReferenceInfo; +/// } VkVideoDecodeAV1DpbSlotInfoKHR; +/// ``` +public final class VkVideoDecodeAV1DpbSlotInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeAV1DpbSlotInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdReferenceInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdReferenceInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdReferenceInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdReferenceInfo")); + + /// Creates `VkVideoDecodeAV1DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeAV1DpbSlotInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeAV1DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1DpbSlotInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1DpbSlotInfoKHR(segment); } + + /// Creates `VkVideoDecodeAV1DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1DpbSlotInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeAV1DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1DpbSlotInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeAV1DpbSlotInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeAV1DpbSlotInfoKHR` + public static VkVideoDecodeAV1DpbSlotInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeAV1DpbSlotInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeAV1DpbSlotInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeAV1DpbSlotInfoKHR` + public static VkVideoDecodeAV1DpbSlotInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeAV1DpbSlotInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeAV1DpbSlotInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeAV1DpbSlotInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeAV1DpbSlotInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeAV1DpbSlotInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1DpbSlotInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeAV1DpbSlotInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1DpbSlotInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeAV1DpbSlotInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeAV1DpbSlotInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeAV1DpbSlotInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeAV1DpbSlotInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1DpbSlotInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1DpbSlotInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1DpbSlotInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1DpbSlotInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1DpbSlotInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdReferenceInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoDecodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdReferenceInfo.get(segment, 0L, index); } + /// {@return `pStdReferenceInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoDecodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment) { return VkVideoDecodeAV1DpbSlotInfoKHR.get_pStdReferenceInfo(segment, 0L); } + /// {@return `pStdReferenceInfo` at the given index} + /// @param index the index + public @CType("const StdVideoDecodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfoAt(long index) { return VkVideoDecodeAV1DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment(), index); } + /// {@return `pStdReferenceInfo`} + public @CType("const StdVideoDecodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfo() { return VkVideoDecodeAV1DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment()); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, long index, @CType("const StdVideoDecodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment value) { VH_pStdReferenceInfo.set(segment, 0L, index, value); } + /// Sets `pStdReferenceInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, @CType("const StdVideoDecodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1DpbSlotInfoKHR.set_pStdReferenceInfo(segment, 0L, value); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1DpbSlotInfoKHR pStdReferenceInfoAt(long index, @CType("const StdVideoDecodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), index, value); return this; } + /// Sets `pStdReferenceInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1DpbSlotInfoKHR pStdReferenceInfo(@CType("const StdVideoDecodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1PictureInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1PictureInfoKHR.java new file mode 100644 index 00000000..ce223135 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1PictureInfoKHR.java @@ -0,0 +1,387 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.khr.VKKHRVideoDecodeAv1.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdPictureInfo +/// [VarHandle][#VH_pStdPictureInfo] - [Getter][#pStdPictureInfo()] - [Setter][#pStdPictureInfo(java.lang.foreign.MemorySegment)] +/// ### referenceNameSlotIndices +/// [Byte offset handle][#MH_referenceNameSlotIndices] - [Memory layout][#ML_referenceNameSlotIndices] - [Getter][#referenceNameSlotIndices(long)] - [Setter][#referenceNameSlotIndices(long, java.lang.foreign.MemorySegment)] +/// ### frameHeaderOffset +/// [VarHandle][#VH_frameHeaderOffset] - [Getter][#frameHeaderOffset()] - [Setter][#frameHeaderOffset(int)] +/// ### tileCount +/// [VarHandle][#VH_tileCount] - [Getter][#tileCount()] - [Setter][#tileCount(int)] +/// ### pTileOffsets +/// [VarHandle][#VH_pTileOffsets] - [Getter][#pTileOffsets()] - [Setter][#pTileOffsets(java.lang.foreign.MemorySegment)] +/// ### pTileSizes +/// [VarHandle][#VH_pTileSizes] - [Getter][#pTileSizes()] - [Setter][#pTileSizes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeAV1PictureInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoDecodeAV1PictureInfo * pStdPictureInfo; +/// int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR] referenceNameSlotIndices; +/// uint32_t frameHeaderOffset; +/// uint32_t tileCount; +/// const uint32_t * pTileOffsets; +/// const uint32_t * pTileSizes; +/// } VkVideoDecodeAV1PictureInfoKHR; +/// ``` +public final class VkVideoDecodeAV1PictureInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeAV1PictureInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdPictureInfo"), + MemoryLayout.sequenceLayout(VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR, ValueLayout.JAVA_INT).withName("referenceNameSlotIndices"), + ValueLayout.JAVA_INT.withName("frameHeaderOffset"), + ValueLayout.JAVA_INT.withName("tileCount"), + ValueLayout.ADDRESS.withName("pTileOffsets"), + ValueLayout.ADDRESS.withName("pTileSizes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdPictureInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdPictureInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdPictureInfo")); + /// The byte offset handle of `referenceNameSlotIndices` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_referenceNameSlotIndices = LAYOUT.byteOffsetHandle(PathElement.groupElement("referenceNameSlotIndices"), PathElement.sequenceElement()); + /// The memory layout of `referenceNameSlotIndices`. + public static final MemoryLayout ML_referenceNameSlotIndices = LAYOUT.select(PathElement.groupElement("referenceNameSlotIndices")); + /// The [VarHandle] of `frameHeaderOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frameHeaderOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameHeaderOffset")); + /// The [VarHandle] of `tileCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tileCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tileCount")); + /// The [VarHandle] of `pTileOffsets` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTileOffsets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTileOffsets")); + /// The [VarHandle] of `pTileSizes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTileSizes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTileSizes")); + + /// Creates `VkVideoDecodeAV1PictureInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeAV1PictureInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeAV1PictureInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1PictureInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1PictureInfoKHR(segment); } + + /// Creates `VkVideoDecodeAV1PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1PictureInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeAV1PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1PictureInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeAV1PictureInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeAV1PictureInfoKHR` + public static VkVideoDecodeAV1PictureInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeAV1PictureInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeAV1PictureInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeAV1PictureInfoKHR` + public static VkVideoDecodeAV1PictureInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeAV1PictureInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeAV1PictureInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeAV1PictureInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeAV1PictureInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeAV1PictureInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeAV1PictureInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeAV1PictureInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeAV1PictureInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeAV1PictureInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeAV1PictureInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdPictureInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoDecodeAV1PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdPictureInfo.get(segment, 0L, index); } + /// {@return `pStdPictureInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoDecodeAV1PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment) { return VkVideoDecodeAV1PictureInfoKHR.get_pStdPictureInfo(segment, 0L); } + /// {@return `pStdPictureInfo` at the given index} + /// @param index the index + public @CType("const StdVideoDecodeAV1PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfoAt(long index) { return VkVideoDecodeAV1PictureInfoKHR.get_pStdPictureInfo(this.segment(), index); } + /// {@return `pStdPictureInfo`} + public @CType("const StdVideoDecodeAV1PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfo() { return VkVideoDecodeAV1PictureInfoKHR.get_pStdPictureInfo(this.segment()); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, long index, @CType("const StdVideoDecodeAV1PictureInfo *") java.lang.foreign.MemorySegment value) { VH_pStdPictureInfo.set(segment, 0L, index, value); } + /// Sets `pStdPictureInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, @CType("const StdVideoDecodeAV1PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pStdPictureInfo(segment, 0L, value); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR pStdPictureInfoAt(long index, @CType("const StdVideoDecodeAV1PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pStdPictureInfo(this.segment(), index, value); return this; } + /// Sets `pStdPictureInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR pStdPictureInfo(@CType("const StdVideoDecodeAV1PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pStdPictureInfo(this.segment(), value); return this; } + + /// {@return `referenceNameSlotIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment get_referenceNameSlotIndices(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_referenceNameSlotIndices.invokeExact(0L, elementIndex), index), ML_referenceNameSlotIndices); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `referenceNameSlotIndices`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment get_referenceNameSlotIndices(MemorySegment segment, long elementIndex) { return VkVideoDecodeAV1PictureInfoKHR.get_referenceNameSlotIndices(segment, 0L, elementIndex); } + /// {@return `referenceNameSlotIndices` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment referenceNameSlotIndicesAt(long index, long elementIndex) { return VkVideoDecodeAV1PictureInfoKHR.get_referenceNameSlotIndices(this.segment(), index, elementIndex); } + /// {@return `referenceNameSlotIndices`} + /// @param elementIndex the index of the element + public @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment referenceNameSlotIndices(long elementIndex) { return VkVideoDecodeAV1PictureInfoKHR.get_referenceNameSlotIndices(this.segment(), elementIndex); } + /// Sets `referenceNameSlotIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_referenceNameSlotIndices(MemorySegment segment, long index, long elementIndex, @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_referenceNameSlotIndices.invokeExact(0L, elementIndex), index), ML_referenceNameSlotIndices.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `referenceNameSlotIndices` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_referenceNameSlotIndices(MemorySegment segment, long elementIndex, @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_referenceNameSlotIndices(segment, 0L, elementIndex, value); } + /// Sets `referenceNameSlotIndices` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR referenceNameSlotIndicesAt(long index, long elementIndex, @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_referenceNameSlotIndices(this.segment(), index, elementIndex, value); return this; } + /// Sets `referenceNameSlotIndices` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR referenceNameSlotIndices(long elementIndex, @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_referenceNameSlotIndices(this.segment(), elementIndex, value); return this; } + + /// {@return `frameHeaderOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frameHeaderOffset(MemorySegment segment, long index) { return (int) VH_frameHeaderOffset.get(segment, 0L, index); } + /// {@return `frameHeaderOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frameHeaderOffset(MemorySegment segment) { return VkVideoDecodeAV1PictureInfoKHR.get_frameHeaderOffset(segment, 0L); } + /// {@return `frameHeaderOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int frameHeaderOffsetAt(long index) { return VkVideoDecodeAV1PictureInfoKHR.get_frameHeaderOffset(this.segment(), index); } + /// {@return `frameHeaderOffset`} + public @CType("uint32_t") int frameHeaderOffset() { return VkVideoDecodeAV1PictureInfoKHR.get_frameHeaderOffset(this.segment()); } + /// Sets `frameHeaderOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameHeaderOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frameHeaderOffset.set(segment, 0L, index, value); } + /// Sets `frameHeaderOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameHeaderOffset(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeAV1PictureInfoKHR.set_frameHeaderOffset(segment, 0L, value); } + /// Sets `frameHeaderOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR frameHeaderOffsetAt(long index, @CType("uint32_t") int value) { VkVideoDecodeAV1PictureInfoKHR.set_frameHeaderOffset(this.segment(), index, value); return this; } + /// Sets `frameHeaderOffset` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR frameHeaderOffset(@CType("uint32_t") int value) { VkVideoDecodeAV1PictureInfoKHR.set_frameHeaderOffset(this.segment(), value); return this; } + + /// {@return `tileCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_tileCount(MemorySegment segment, long index) { return (int) VH_tileCount.get(segment, 0L, index); } + /// {@return `tileCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_tileCount(MemorySegment segment) { return VkVideoDecodeAV1PictureInfoKHR.get_tileCount(segment, 0L); } + /// {@return `tileCount` at the given index} + /// @param index the index + public @CType("uint32_t") int tileCountAt(long index) { return VkVideoDecodeAV1PictureInfoKHR.get_tileCount(this.segment(), index); } + /// {@return `tileCount`} + public @CType("uint32_t") int tileCount() { return VkVideoDecodeAV1PictureInfoKHR.get_tileCount(this.segment()); } + /// Sets `tileCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tileCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_tileCount.set(segment, 0L, index, value); } + /// Sets `tileCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tileCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeAV1PictureInfoKHR.set_tileCount(segment, 0L, value); } + /// Sets `tileCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR tileCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeAV1PictureInfoKHR.set_tileCount(this.segment(), index, value); return this; } + /// Sets `tileCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR tileCount(@CType("uint32_t") int value) { VkVideoDecodeAV1PictureInfoKHR.set_tileCount(this.segment(), value); return this; } + + /// {@return `pTileOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pTileOffsets(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTileOffsets.get(segment, 0L, index); } + /// {@return `pTileOffsets`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pTileOffsets(MemorySegment segment) { return VkVideoDecodeAV1PictureInfoKHR.get_pTileOffsets(segment, 0L); } + /// {@return `pTileOffsets` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pTileOffsetsAt(long index) { return VkVideoDecodeAV1PictureInfoKHR.get_pTileOffsets(this.segment(), index); } + /// {@return `pTileOffsets`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pTileOffsets() { return VkVideoDecodeAV1PictureInfoKHR.get_pTileOffsets(this.segment()); } + /// Sets `pTileOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTileOffsets(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pTileOffsets.set(segment, 0L, index, value); } + /// Sets `pTileOffsets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTileOffsets(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pTileOffsets(segment, 0L, value); } + /// Sets `pTileOffsets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR pTileOffsetsAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pTileOffsets(this.segment(), index, value); return this; } + /// Sets `pTileOffsets` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR pTileOffsets(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pTileOffsets(this.segment(), value); return this; } + + /// {@return `pTileSizes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pTileSizes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTileSizes.get(segment, 0L, index); } + /// {@return `pTileSizes`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pTileSizes(MemorySegment segment) { return VkVideoDecodeAV1PictureInfoKHR.get_pTileSizes(segment, 0L); } + /// {@return `pTileSizes` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pTileSizesAt(long index) { return VkVideoDecodeAV1PictureInfoKHR.get_pTileSizes(this.segment(), index); } + /// {@return `pTileSizes`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pTileSizes() { return VkVideoDecodeAV1PictureInfoKHR.get_pTileSizes(this.segment()); } + /// Sets `pTileSizes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTileSizes(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pTileSizes.set(segment, 0L, index, value); } + /// Sets `pTileSizes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTileSizes(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pTileSizes(segment, 0L, value); } + /// Sets `pTileSizes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR pTileSizesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pTileSizes(this.segment(), index, value); return this; } + /// Sets `pTileSizes` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1PictureInfoKHR pTileSizes(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1PictureInfoKHR.set_pTileSizes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1ProfileInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1ProfileInfoKHR.java new file mode 100644 index 00000000..d6206cda --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1ProfileInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stdProfile +/// [VarHandle][#VH_stdProfile] - [Getter][#stdProfile()] - [Setter][#stdProfile(int)] +/// ### filmGrainSupport +/// [VarHandle][#VH_filmGrainSupport] - [Getter][#filmGrainSupport()] - [Setter][#filmGrainSupport(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeAV1ProfileInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// StdVideoAV1Profile stdProfile; +/// VkBool32 filmGrainSupport; +/// } VkVideoDecodeAV1ProfileInfoKHR; +/// ``` +public final class VkVideoDecodeAV1ProfileInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeAV1ProfileInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stdProfile"), + ValueLayout.JAVA_INT.withName("filmGrainSupport") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stdProfile` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdProfile = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdProfile")); + /// The [VarHandle] of `filmGrainSupport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_filmGrainSupport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("filmGrainSupport")); + + /// Creates `VkVideoDecodeAV1ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeAV1ProfileInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeAV1ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1ProfileInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1ProfileInfoKHR(segment); } + + /// Creates `VkVideoDecodeAV1ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1ProfileInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeAV1ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1ProfileInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeAV1ProfileInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeAV1ProfileInfoKHR` + public static VkVideoDecodeAV1ProfileInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeAV1ProfileInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeAV1ProfileInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeAV1ProfileInfoKHR` + public static VkVideoDecodeAV1ProfileInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeAV1ProfileInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeAV1ProfileInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeAV1ProfileInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeAV1ProfileInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeAV1ProfileInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1ProfileInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeAV1ProfileInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1ProfileInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeAV1ProfileInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeAV1ProfileInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeAV1ProfileInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeAV1ProfileInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1ProfileInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1ProfileInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1ProfileInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1ProfileInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1ProfileInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stdProfile` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1Profile") int get_stdProfile(MemorySegment segment, long index) { return (int) VH_stdProfile.get(segment, 0L, index); } + /// {@return `stdProfile`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1Profile") int get_stdProfile(MemorySegment segment) { return VkVideoDecodeAV1ProfileInfoKHR.get_stdProfile(segment, 0L); } + /// {@return `stdProfile` at the given index} + /// @param index the index + public @CType("StdVideoAV1Profile") int stdProfileAt(long index) { return VkVideoDecodeAV1ProfileInfoKHR.get_stdProfile(this.segment(), index); } + /// {@return `stdProfile`} + public @CType("StdVideoAV1Profile") int stdProfile() { return VkVideoDecodeAV1ProfileInfoKHR.get_stdProfile(this.segment()); } + /// Sets `stdProfile` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdProfile(MemorySegment segment, long index, @CType("StdVideoAV1Profile") int value) { VH_stdProfile.set(segment, 0L, index, value); } + /// Sets `stdProfile` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdProfile(MemorySegment segment, @CType("StdVideoAV1Profile") int value) { VkVideoDecodeAV1ProfileInfoKHR.set_stdProfile(segment, 0L, value); } + /// Sets `stdProfile` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1ProfileInfoKHR stdProfileAt(long index, @CType("StdVideoAV1Profile") int value) { VkVideoDecodeAV1ProfileInfoKHR.set_stdProfile(this.segment(), index, value); return this; } + /// Sets `stdProfile` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1ProfileInfoKHR stdProfile(@CType("StdVideoAV1Profile") int value) { VkVideoDecodeAV1ProfileInfoKHR.set_stdProfile(this.segment(), value); return this; } + + /// {@return `filmGrainSupport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_filmGrainSupport(MemorySegment segment, long index) { return (int) VH_filmGrainSupport.get(segment, 0L, index); } + /// {@return `filmGrainSupport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_filmGrainSupport(MemorySegment segment) { return VkVideoDecodeAV1ProfileInfoKHR.get_filmGrainSupport(segment, 0L); } + /// {@return `filmGrainSupport` at the given index} + /// @param index the index + public @CType("VkBool32") int filmGrainSupportAt(long index) { return VkVideoDecodeAV1ProfileInfoKHR.get_filmGrainSupport(this.segment(), index); } + /// {@return `filmGrainSupport`} + public @CType("VkBool32") int filmGrainSupport() { return VkVideoDecodeAV1ProfileInfoKHR.get_filmGrainSupport(this.segment()); } + /// Sets `filmGrainSupport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_filmGrainSupport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_filmGrainSupport.set(segment, 0L, index, value); } + /// Sets `filmGrainSupport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_filmGrainSupport(MemorySegment segment, @CType("VkBool32") int value) { VkVideoDecodeAV1ProfileInfoKHR.set_filmGrainSupport(segment, 0L, value); } + /// Sets `filmGrainSupport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1ProfileInfoKHR filmGrainSupportAt(long index, @CType("VkBool32") int value) { VkVideoDecodeAV1ProfileInfoKHR.set_filmGrainSupport(this.segment(), index, value); return this; } + /// Sets `filmGrainSupport` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1ProfileInfoKHR filmGrainSupport(@CType("VkBool32") int value) { VkVideoDecodeAV1ProfileInfoKHR.set_filmGrainSupport(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1SessionParametersCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1SessionParametersCreateInfoKHR.java new file mode 100644 index 00000000..8e8671e2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeAV1SessionParametersCreateInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdSequenceHeader +/// [VarHandle][#VH_pStdSequenceHeader] - [Getter][#pStdSequenceHeader()] - [Setter][#pStdSequenceHeader(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeAV1SessionParametersCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoAV1SequenceHeader * pStdSequenceHeader; +/// } VkVideoDecodeAV1SessionParametersCreateInfoKHR; +/// ``` +public final class VkVideoDecodeAV1SessionParametersCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeAV1SessionParametersCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdSequenceHeader") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdSequenceHeader` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdSequenceHeader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdSequenceHeader")); + + /// Creates `VkVideoDecodeAV1SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeAV1SessionParametersCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeAV1SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1SessionParametersCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1SessionParametersCreateInfoKHR(segment); } + + /// Creates `VkVideoDecodeAV1SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1SessionParametersCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeAV1SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeAV1SessionParametersCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeAV1SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeAV1SessionParametersCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeAV1SessionParametersCreateInfoKHR` + public static VkVideoDecodeAV1SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeAV1SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeAV1SessionParametersCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeAV1SessionParametersCreateInfoKHR` + public static VkVideoDecodeAV1SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeAV1SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeAV1SessionParametersCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeAV1SessionParametersCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeAV1SessionParametersCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeAV1SessionParametersCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1SessionParametersCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeAV1SessionParametersCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1SessionParametersCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeAV1SessionParametersCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeAV1SessionParametersCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeAV1SessionParametersCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeAV1SessionParametersCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1SessionParametersCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1SessionParametersCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1SessionParametersCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1SessionParametersCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1SessionParametersCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdSequenceHeader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment get_pStdSequenceHeader(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdSequenceHeader.get(segment, 0L, index); } + /// {@return `pStdSequenceHeader`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment get_pStdSequenceHeader(MemorySegment segment) { return VkVideoDecodeAV1SessionParametersCreateInfoKHR.get_pStdSequenceHeader(segment, 0L); } + /// {@return `pStdSequenceHeader` at the given index} + /// @param index the index + public @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment pStdSequenceHeaderAt(long index) { return VkVideoDecodeAV1SessionParametersCreateInfoKHR.get_pStdSequenceHeader(this.segment(), index); } + /// {@return `pStdSequenceHeader`} + public @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment pStdSequenceHeader() { return VkVideoDecodeAV1SessionParametersCreateInfoKHR.get_pStdSequenceHeader(this.segment()); } + /// Sets `pStdSequenceHeader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdSequenceHeader(MemorySegment segment, long index, @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment value) { VH_pStdSequenceHeader.set(segment, 0L, index, value); } + /// Sets `pStdSequenceHeader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdSequenceHeader(MemorySegment segment, @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1SessionParametersCreateInfoKHR.set_pStdSequenceHeader(segment, 0L, value); } + /// Sets `pStdSequenceHeader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1SessionParametersCreateInfoKHR pStdSequenceHeaderAt(long index, @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1SessionParametersCreateInfoKHR.set_pStdSequenceHeader(this.segment(), index, value); return this; } + /// Sets `pStdSequenceHeader` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeAV1SessionParametersCreateInfoKHR pStdSequenceHeader(@CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment value) { VkVideoDecodeAV1SessionParametersCreateInfoKHR.set_pStdSequenceHeader(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeCapabilitiesKHR.java new file mode 100644 index 00000000..00d01042 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeCapabilitiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeCapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoDecodeCapabilityFlagsKHR flags; +/// } VkVideoDecodeCapabilitiesKHR; +/// ``` +public final class VkVideoDecodeCapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoDecodeCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkVideoDecodeCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeCapabilitiesKHR(segment); } + + /// Creates `VkVideoDecodeCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeCapabilitiesKHR` + public static VkVideoDecodeCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeCapabilitiesKHR` + public static VkVideoDecodeCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeCapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeCapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeCapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeCapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeCapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeCapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeCapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeCapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeCapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeCapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeCapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeCapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeCapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeCapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeCapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeCapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoDecodeCapabilityFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoDecodeCapabilityFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoDecodeCapabilitiesKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoDecodeCapabilityFlagsKHR") int flagsAt(long index) { return VkVideoDecodeCapabilitiesKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoDecodeCapabilityFlagsKHR") int flags() { return VkVideoDecodeCapabilitiesKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoDecodeCapabilityFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoDecodeCapabilityFlagsKHR") int value) { VkVideoDecodeCapabilitiesKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeCapabilitiesKHR flagsAt(long index, @CType("VkVideoDecodeCapabilityFlagsKHR") int value) { VkVideoDecodeCapabilitiesKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeCapabilitiesKHR flags(@CType("VkVideoDecodeCapabilityFlagsKHR") int value) { VkVideoDecodeCapabilitiesKHR.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264CapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264CapabilitiesKHR.java new file mode 100644 index 00000000..2b0ca271 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264CapabilitiesKHR.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxLevelIdc +/// [VarHandle][#VH_maxLevelIdc] - [Getter][#maxLevelIdc()] - [Setter][#maxLevelIdc(int)] +/// ### fieldOffsetGranularity +/// [Byte offset][#OFFSET_fieldOffsetGranularity] - [Memory layout][#ML_fieldOffsetGranularity] - [Getter][#fieldOffsetGranularity()] - [Setter][#fieldOffsetGranularity(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH264CapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// StdVideoH264LevelIdc maxLevelIdc; +/// VkOffset2D fieldOffsetGranularity; +/// } VkVideoDecodeH264CapabilitiesKHR; +/// ``` +public final class VkVideoDecodeH264CapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoDecodeH264CapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxLevelIdc"), + overrungl.vulkan.struct.VkOffset2D.LAYOUT.withName("fieldOffsetGranularity") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxLevelIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxLevelIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLevelIdc")); + /// The byte offset of `fieldOffsetGranularity`. + public static final long OFFSET_fieldOffsetGranularity = LAYOUT.byteOffset(PathElement.groupElement("fieldOffsetGranularity")); + /// The memory layout of `fieldOffsetGranularity`. + public static final MemoryLayout ML_fieldOffsetGranularity = LAYOUT.select(PathElement.groupElement("fieldOffsetGranularity")); + + /// Creates `VkVideoDecodeH264CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH264CapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH264CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264CapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264CapabilitiesKHR(segment); } + + /// Creates `VkVideoDecodeH264CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264CapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH264CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264CapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH264CapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH264CapabilitiesKHR` + public static VkVideoDecodeH264CapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH264CapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH264CapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH264CapabilitiesKHR` + public static VkVideoDecodeH264CapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH264CapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH264CapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH264CapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH264CapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH264CapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264CapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH264CapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264CapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH264CapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH264CapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH264CapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH264CapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264CapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264CapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264CapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264CapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264CapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxLevelIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264LevelIdc") int get_maxLevelIdc(MemorySegment segment, long index) { return (int) VH_maxLevelIdc.get(segment, 0L, index); } + /// {@return `maxLevelIdc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264LevelIdc") int get_maxLevelIdc(MemorySegment segment) { return VkVideoDecodeH264CapabilitiesKHR.get_maxLevelIdc(segment, 0L); } + /// {@return `maxLevelIdc` at the given index} + /// @param index the index + public @CType("StdVideoH264LevelIdc") int maxLevelIdcAt(long index) { return VkVideoDecodeH264CapabilitiesKHR.get_maxLevelIdc(this.segment(), index); } + /// {@return `maxLevelIdc`} + public @CType("StdVideoH264LevelIdc") int maxLevelIdc() { return VkVideoDecodeH264CapabilitiesKHR.get_maxLevelIdc(this.segment()); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, long index, @CType("StdVideoH264LevelIdc") int value) { VH_maxLevelIdc.set(segment, 0L, index, value); } + /// Sets `maxLevelIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, @CType("StdVideoH264LevelIdc") int value) { VkVideoDecodeH264CapabilitiesKHR.set_maxLevelIdc(segment, 0L, value); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264CapabilitiesKHR maxLevelIdcAt(long index, @CType("StdVideoH264LevelIdc") int value) { VkVideoDecodeH264CapabilitiesKHR.set_maxLevelIdc(this.segment(), index, value); return this; } + /// Sets `maxLevelIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264CapabilitiesKHR maxLevelIdc(@CType("StdVideoH264LevelIdc") int value) { VkVideoDecodeH264CapabilitiesKHR.set_maxLevelIdc(this.segment(), value); return this; } + + /// {@return `fieldOffsetGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_fieldOffsetGranularity(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_fieldOffsetGranularity, index), ML_fieldOffsetGranularity); } + /// {@return `fieldOffsetGranularity`} + /// @param segment the segment of the struct + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_fieldOffsetGranularity(MemorySegment segment) { return VkVideoDecodeH264CapabilitiesKHR.get_fieldOffsetGranularity(segment, 0L); } + /// {@return `fieldOffsetGranularity` at the given index} + /// @param index the index + public @CType("VkOffset2D") java.lang.foreign.MemorySegment fieldOffsetGranularityAt(long index) { return VkVideoDecodeH264CapabilitiesKHR.get_fieldOffsetGranularity(this.segment(), index); } + /// {@return `fieldOffsetGranularity`} + public @CType("VkOffset2D") java.lang.foreign.MemorySegment fieldOffsetGranularity() { return VkVideoDecodeH264CapabilitiesKHR.get_fieldOffsetGranularity(this.segment()); } + /// Sets `fieldOffsetGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fieldOffsetGranularity(MemorySegment segment, long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_fieldOffsetGranularity, index), ML_fieldOffsetGranularity.byteSize()); } + /// Sets `fieldOffsetGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fieldOffsetGranularity(MemorySegment segment, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264CapabilitiesKHR.set_fieldOffsetGranularity(segment, 0L, value); } + /// Sets `fieldOffsetGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264CapabilitiesKHR fieldOffsetGranularityAt(long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264CapabilitiesKHR.set_fieldOffsetGranularity(this.segment(), index, value); return this; } + /// Sets `fieldOffsetGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264CapabilitiesKHR fieldOffsetGranularity(@CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264CapabilitiesKHR.set_fieldOffsetGranularity(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264DpbSlotInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264DpbSlotInfoKHR.java new file mode 100644 index 00000000..3e7e97af --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264DpbSlotInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdReferenceInfo +/// [VarHandle][#VH_pStdReferenceInfo] - [Getter][#pStdReferenceInfo()] - [Setter][#pStdReferenceInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH264DpbSlotInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoDecodeH264ReferenceInfo * pStdReferenceInfo; +/// } VkVideoDecodeH264DpbSlotInfoKHR; +/// ``` +public final class VkVideoDecodeH264DpbSlotInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeH264DpbSlotInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdReferenceInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdReferenceInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdReferenceInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdReferenceInfo")); + + /// Creates `VkVideoDecodeH264DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH264DpbSlotInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH264DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264DpbSlotInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264DpbSlotInfoKHR(segment); } + + /// Creates `VkVideoDecodeH264DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264DpbSlotInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH264DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264DpbSlotInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH264DpbSlotInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH264DpbSlotInfoKHR` + public static VkVideoDecodeH264DpbSlotInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH264DpbSlotInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH264DpbSlotInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH264DpbSlotInfoKHR` + public static VkVideoDecodeH264DpbSlotInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH264DpbSlotInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH264DpbSlotInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH264DpbSlotInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH264DpbSlotInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH264DpbSlotInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264DpbSlotInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH264DpbSlotInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264DpbSlotInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH264DpbSlotInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH264DpbSlotInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH264DpbSlotInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH264DpbSlotInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264DpbSlotInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264DpbSlotInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264DpbSlotInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264DpbSlotInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264DpbSlotInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdReferenceInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoDecodeH264ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdReferenceInfo.get(segment, 0L, index); } + /// {@return `pStdReferenceInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoDecodeH264ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment) { return VkVideoDecodeH264DpbSlotInfoKHR.get_pStdReferenceInfo(segment, 0L); } + /// {@return `pStdReferenceInfo` at the given index} + /// @param index the index + public @CType("const StdVideoDecodeH264ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfoAt(long index) { return VkVideoDecodeH264DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment(), index); } + /// {@return `pStdReferenceInfo`} + public @CType("const StdVideoDecodeH264ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfo() { return VkVideoDecodeH264DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment()); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, long index, @CType("const StdVideoDecodeH264ReferenceInfo *") java.lang.foreign.MemorySegment value) { VH_pStdReferenceInfo.set(segment, 0L, index, value); } + /// Sets `pStdReferenceInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, @CType("const StdVideoDecodeH264ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264DpbSlotInfoKHR.set_pStdReferenceInfo(segment, 0L, value); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264DpbSlotInfoKHR pStdReferenceInfoAt(long index, @CType("const StdVideoDecodeH264ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), index, value); return this; } + /// Sets `pStdReferenceInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264DpbSlotInfoKHR pStdReferenceInfo(@CType("const StdVideoDecodeH264ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264PictureInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264PictureInfoKHR.java new file mode 100644 index 00000000..e2e8d554 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264PictureInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdPictureInfo +/// [VarHandle][#VH_pStdPictureInfo] - [Getter][#pStdPictureInfo()] - [Setter][#pStdPictureInfo(java.lang.foreign.MemorySegment)] +/// ### sliceCount +/// [VarHandle][#VH_sliceCount] - [Getter][#sliceCount()] - [Setter][#sliceCount(int)] +/// ### pSliceOffsets +/// [VarHandle][#VH_pSliceOffsets] - [Getter][#pSliceOffsets()] - [Setter][#pSliceOffsets(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH264PictureInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoDecodeH264PictureInfo * pStdPictureInfo; +/// uint32_t sliceCount; +/// const uint32_t * pSliceOffsets; +/// } VkVideoDecodeH264PictureInfoKHR; +/// ``` +public final class VkVideoDecodeH264PictureInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeH264PictureInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdPictureInfo"), + ValueLayout.JAVA_INT.withName("sliceCount"), + ValueLayout.ADDRESS.withName("pSliceOffsets") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdPictureInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdPictureInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdPictureInfo")); + /// The [VarHandle] of `sliceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sliceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sliceCount")); + /// The [VarHandle] of `pSliceOffsets` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSliceOffsets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSliceOffsets")); + + /// Creates `VkVideoDecodeH264PictureInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH264PictureInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH264PictureInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264PictureInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264PictureInfoKHR(segment); } + + /// Creates `VkVideoDecodeH264PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264PictureInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH264PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264PictureInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH264PictureInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH264PictureInfoKHR` + public static VkVideoDecodeH264PictureInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH264PictureInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH264PictureInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH264PictureInfoKHR` + public static VkVideoDecodeH264PictureInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH264PictureInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH264PictureInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH264PictureInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH264PictureInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH264PictureInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264PictureInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH264PictureInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264PictureInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH264PictureInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH264PictureInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH264PictureInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH264PictureInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264PictureInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264PictureInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264PictureInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264PictureInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264PictureInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdPictureInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoDecodeH264PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdPictureInfo.get(segment, 0L, index); } + /// {@return `pStdPictureInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoDecodeH264PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment) { return VkVideoDecodeH264PictureInfoKHR.get_pStdPictureInfo(segment, 0L); } + /// {@return `pStdPictureInfo` at the given index} + /// @param index the index + public @CType("const StdVideoDecodeH264PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfoAt(long index) { return VkVideoDecodeH264PictureInfoKHR.get_pStdPictureInfo(this.segment(), index); } + /// {@return `pStdPictureInfo`} + public @CType("const StdVideoDecodeH264PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfo() { return VkVideoDecodeH264PictureInfoKHR.get_pStdPictureInfo(this.segment()); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, long index, @CType("const StdVideoDecodeH264PictureInfo *") java.lang.foreign.MemorySegment value) { VH_pStdPictureInfo.set(segment, 0L, index, value); } + /// Sets `pStdPictureInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, @CType("const StdVideoDecodeH264PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264PictureInfoKHR.set_pStdPictureInfo(segment, 0L, value); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264PictureInfoKHR pStdPictureInfoAt(long index, @CType("const StdVideoDecodeH264PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264PictureInfoKHR.set_pStdPictureInfo(this.segment(), index, value); return this; } + /// Sets `pStdPictureInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264PictureInfoKHR pStdPictureInfo(@CType("const StdVideoDecodeH264PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264PictureInfoKHR.set_pStdPictureInfo(this.segment(), value); return this; } + + /// {@return `sliceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sliceCount(MemorySegment segment, long index) { return (int) VH_sliceCount.get(segment, 0L, index); } + /// {@return `sliceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sliceCount(MemorySegment segment) { return VkVideoDecodeH264PictureInfoKHR.get_sliceCount(segment, 0L); } + /// {@return `sliceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int sliceCountAt(long index) { return VkVideoDecodeH264PictureInfoKHR.get_sliceCount(this.segment(), index); } + /// {@return `sliceCount`} + public @CType("uint32_t") int sliceCount() { return VkVideoDecodeH264PictureInfoKHR.get_sliceCount(this.segment()); } + /// Sets `sliceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sliceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sliceCount.set(segment, 0L, index, value); } + /// Sets `sliceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sliceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH264PictureInfoKHR.set_sliceCount(segment, 0L, value); } + /// Sets `sliceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264PictureInfoKHR sliceCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH264PictureInfoKHR.set_sliceCount(this.segment(), index, value); return this; } + /// Sets `sliceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264PictureInfoKHR sliceCount(@CType("uint32_t") int value) { VkVideoDecodeH264PictureInfoKHR.set_sliceCount(this.segment(), value); return this; } + + /// {@return `pSliceOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pSliceOffsets(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSliceOffsets.get(segment, 0L, index); } + /// {@return `pSliceOffsets`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pSliceOffsets(MemorySegment segment) { return VkVideoDecodeH264PictureInfoKHR.get_pSliceOffsets(segment, 0L); } + /// {@return `pSliceOffsets` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pSliceOffsetsAt(long index) { return VkVideoDecodeH264PictureInfoKHR.get_pSliceOffsets(this.segment(), index); } + /// {@return `pSliceOffsets`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pSliceOffsets() { return VkVideoDecodeH264PictureInfoKHR.get_pSliceOffsets(this.segment()); } + /// Sets `pSliceOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSliceOffsets(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pSliceOffsets.set(segment, 0L, index, value); } + /// Sets `pSliceOffsets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSliceOffsets(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264PictureInfoKHR.set_pSliceOffsets(segment, 0L, value); } + /// Sets `pSliceOffsets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264PictureInfoKHR pSliceOffsetsAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264PictureInfoKHR.set_pSliceOffsets(this.segment(), index, value); return this; } + /// Sets `pSliceOffsets` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264PictureInfoKHR pSliceOffsets(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264PictureInfoKHR.set_pSliceOffsets(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264ProfileInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264ProfileInfoKHR.java new file mode 100644 index 00000000..627ae6fd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264ProfileInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stdProfileIdc +/// [VarHandle][#VH_stdProfileIdc] - [Getter][#stdProfileIdc()] - [Setter][#stdProfileIdc(int)] +/// ### pictureLayout +/// [VarHandle][#VH_pictureLayout] - [Getter][#pictureLayout()] - [Setter][#pictureLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH264ProfileInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// StdVideoH264ProfileIdc stdProfileIdc; +/// VkVideoDecodeH264PictureLayoutFlagBitsKHR pictureLayout; +/// } VkVideoDecodeH264ProfileInfoKHR; +/// ``` +public final class VkVideoDecodeH264ProfileInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeH264ProfileInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stdProfileIdc"), + ValueLayout.JAVA_INT.withName("pictureLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stdProfileIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdProfileIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdProfileIdc")); + /// The [VarHandle] of `pictureLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pictureLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pictureLayout")); + + /// Creates `VkVideoDecodeH264ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH264ProfileInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH264ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264ProfileInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264ProfileInfoKHR(segment); } + + /// Creates `VkVideoDecodeH264ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264ProfileInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH264ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264ProfileInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH264ProfileInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH264ProfileInfoKHR` + public static VkVideoDecodeH264ProfileInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH264ProfileInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH264ProfileInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH264ProfileInfoKHR` + public static VkVideoDecodeH264ProfileInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH264ProfileInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH264ProfileInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH264ProfileInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH264ProfileInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH264ProfileInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264ProfileInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH264ProfileInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264ProfileInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH264ProfileInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH264ProfileInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH264ProfileInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH264ProfileInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264ProfileInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264ProfileInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264ProfileInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264ProfileInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264ProfileInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stdProfileIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264ProfileIdc") int get_stdProfileIdc(MemorySegment segment, long index) { return (int) VH_stdProfileIdc.get(segment, 0L, index); } + /// {@return `stdProfileIdc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264ProfileIdc") int get_stdProfileIdc(MemorySegment segment) { return VkVideoDecodeH264ProfileInfoKHR.get_stdProfileIdc(segment, 0L); } + /// {@return `stdProfileIdc` at the given index} + /// @param index the index + public @CType("StdVideoH264ProfileIdc") int stdProfileIdcAt(long index) { return VkVideoDecodeH264ProfileInfoKHR.get_stdProfileIdc(this.segment(), index); } + /// {@return `stdProfileIdc`} + public @CType("StdVideoH264ProfileIdc") int stdProfileIdc() { return VkVideoDecodeH264ProfileInfoKHR.get_stdProfileIdc(this.segment()); } + /// Sets `stdProfileIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdProfileIdc(MemorySegment segment, long index, @CType("StdVideoH264ProfileIdc") int value) { VH_stdProfileIdc.set(segment, 0L, index, value); } + /// Sets `stdProfileIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdProfileIdc(MemorySegment segment, @CType("StdVideoH264ProfileIdc") int value) { VkVideoDecodeH264ProfileInfoKHR.set_stdProfileIdc(segment, 0L, value); } + /// Sets `stdProfileIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264ProfileInfoKHR stdProfileIdcAt(long index, @CType("StdVideoH264ProfileIdc") int value) { VkVideoDecodeH264ProfileInfoKHR.set_stdProfileIdc(this.segment(), index, value); return this; } + /// Sets `stdProfileIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264ProfileInfoKHR stdProfileIdc(@CType("StdVideoH264ProfileIdc") int value) { VkVideoDecodeH264ProfileInfoKHR.set_stdProfileIdc(this.segment(), value); return this; } + + /// {@return `pictureLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoDecodeH264PictureLayoutFlagBitsKHR") int get_pictureLayout(MemorySegment segment, long index) { return (int) VH_pictureLayout.get(segment, 0L, index); } + /// {@return `pictureLayout`} + /// @param segment the segment of the struct + public static @CType("VkVideoDecodeH264PictureLayoutFlagBitsKHR") int get_pictureLayout(MemorySegment segment) { return VkVideoDecodeH264ProfileInfoKHR.get_pictureLayout(segment, 0L); } + /// {@return `pictureLayout` at the given index} + /// @param index the index + public @CType("VkVideoDecodeH264PictureLayoutFlagBitsKHR") int pictureLayoutAt(long index) { return VkVideoDecodeH264ProfileInfoKHR.get_pictureLayout(this.segment(), index); } + /// {@return `pictureLayout`} + public @CType("VkVideoDecodeH264PictureLayoutFlagBitsKHR") int pictureLayout() { return VkVideoDecodeH264ProfileInfoKHR.get_pictureLayout(this.segment()); } + /// Sets `pictureLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pictureLayout(MemorySegment segment, long index, @CType("VkVideoDecodeH264PictureLayoutFlagBitsKHR") int value) { VH_pictureLayout.set(segment, 0L, index, value); } + /// Sets `pictureLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pictureLayout(MemorySegment segment, @CType("VkVideoDecodeH264PictureLayoutFlagBitsKHR") int value) { VkVideoDecodeH264ProfileInfoKHR.set_pictureLayout(segment, 0L, value); } + /// Sets `pictureLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264ProfileInfoKHR pictureLayoutAt(long index, @CType("VkVideoDecodeH264PictureLayoutFlagBitsKHR") int value) { VkVideoDecodeH264ProfileInfoKHR.set_pictureLayout(this.segment(), index, value); return this; } + /// Sets `pictureLayout` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264ProfileInfoKHR pictureLayout(@CType("VkVideoDecodeH264PictureLayoutFlagBitsKHR") int value) { VkVideoDecodeH264ProfileInfoKHR.set_pictureLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264SessionParametersAddInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264SessionParametersAddInfoKHR.java new file mode 100644 index 00000000..8a658673 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264SessionParametersAddInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stdSPSCount +/// [VarHandle][#VH_stdSPSCount] - [Getter][#stdSPSCount()] - [Setter][#stdSPSCount(int)] +/// ### pStdSPSs +/// [VarHandle][#VH_pStdSPSs] - [Getter][#pStdSPSs()] - [Setter][#pStdSPSs(java.lang.foreign.MemorySegment)] +/// ### stdPPSCount +/// [VarHandle][#VH_stdPPSCount] - [Getter][#stdPPSCount()] - [Setter][#stdPPSCount(int)] +/// ### pStdPPSs +/// [VarHandle][#VH_pStdPPSs] - [Getter][#pStdPPSs()] - [Setter][#pStdPPSs(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH264SessionParametersAddInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t stdSPSCount; +/// const StdVideoH264SequenceParameterSet * pStdSPSs; +/// uint32_t stdPPSCount; +/// const StdVideoH264PictureParameterSet * pStdPPSs; +/// } VkVideoDecodeH264SessionParametersAddInfoKHR; +/// ``` +public final class VkVideoDecodeH264SessionParametersAddInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeH264SessionParametersAddInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stdSPSCount"), + ValueLayout.ADDRESS.withName("pStdSPSs"), + ValueLayout.JAVA_INT.withName("stdPPSCount"), + ValueLayout.ADDRESS.withName("pStdPPSs") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stdSPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdSPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdSPSCount")); + /// The [VarHandle] of `pStdSPSs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdSPSs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdSPSs")); + /// The [VarHandle] of `stdPPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdPPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdPPSCount")); + /// The [VarHandle] of `pStdPPSs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdPPSs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdPPSs")); + + /// Creates `VkVideoDecodeH264SessionParametersAddInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH264SessionParametersAddInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH264SessionParametersAddInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264SessionParametersAddInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264SessionParametersAddInfoKHR(segment); } + + /// Creates `VkVideoDecodeH264SessionParametersAddInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264SessionParametersAddInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264SessionParametersAddInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH264SessionParametersAddInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264SessionParametersAddInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264SessionParametersAddInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH264SessionParametersAddInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH264SessionParametersAddInfoKHR` + public static VkVideoDecodeH264SessionParametersAddInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH264SessionParametersAddInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH264SessionParametersAddInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH264SessionParametersAddInfoKHR` + public static VkVideoDecodeH264SessionParametersAddInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH264SessionParametersAddInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stdSPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdSPSCount(MemorySegment segment, long index) { return (int) VH_stdSPSCount.get(segment, 0L, index); } + /// {@return `stdSPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdSPSCount(MemorySegment segment) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_stdSPSCount(segment, 0L); } + /// {@return `stdSPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdSPSCountAt(long index) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_stdSPSCount(this.segment(), index); } + /// {@return `stdSPSCount`} + public @CType("uint32_t") int stdSPSCount() { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_stdSPSCount(this.segment()); } + /// Sets `stdSPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdSPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdSPSCount.set(segment, 0L, index, value); } + /// Sets `stdSPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdSPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_stdSPSCount(segment, 0L, value); } + /// Sets `stdSPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR stdSPSCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_stdSPSCount(this.segment(), index, value); return this; } + /// Sets `stdSPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR stdSPSCount(@CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_stdSPSCount(this.segment(), value); return this; } + + /// {@return `pStdSPSs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment get_pStdSPSs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdSPSs.get(segment, 0L, index); } + /// {@return `pStdSPSs`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment get_pStdSPSs(MemorySegment segment) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_pStdSPSs(segment, 0L); } + /// {@return `pStdSPSs` at the given index} + /// @param index the index + public @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment pStdSPSsAt(long index) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_pStdSPSs(this.segment(), index); } + /// {@return `pStdSPSs`} + public @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment pStdSPSs() { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_pStdSPSs(this.segment()); } + /// Sets `pStdSPSs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdSPSs(MemorySegment segment, long index, @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VH_pStdSPSs.set(segment, 0L, index, value); } + /// Sets `pStdSPSs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdSPSs(MemorySegment segment, @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_pStdSPSs(segment, 0L, value); } + /// Sets `pStdSPSs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR pStdSPSsAt(long index, @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_pStdSPSs(this.segment(), index, value); return this; } + /// Sets `pStdSPSs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR pStdSPSs(@CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_pStdSPSs(this.segment(), value); return this; } + + /// {@return `stdPPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdPPSCount(MemorySegment segment, long index) { return (int) VH_stdPPSCount.get(segment, 0L, index); } + /// {@return `stdPPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdPPSCount(MemorySegment segment) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_stdPPSCount(segment, 0L); } + /// {@return `stdPPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdPPSCountAt(long index) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_stdPPSCount(this.segment(), index); } + /// {@return `stdPPSCount`} + public @CType("uint32_t") int stdPPSCount() { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_stdPPSCount(this.segment()); } + /// Sets `stdPPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdPPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdPPSCount.set(segment, 0L, index, value); } + /// Sets `stdPPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdPPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_stdPPSCount(segment, 0L, value); } + /// Sets `stdPPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR stdPPSCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_stdPPSCount(this.segment(), index, value); return this; } + /// Sets `stdPPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR stdPPSCount(@CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_stdPPSCount(this.segment(), value); return this; } + + /// {@return `pStdPPSs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment get_pStdPPSs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdPPSs.get(segment, 0L, index); } + /// {@return `pStdPPSs`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment get_pStdPPSs(MemorySegment segment) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_pStdPPSs(segment, 0L); } + /// {@return `pStdPPSs` at the given index} + /// @param index the index + public @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment pStdPPSsAt(long index) { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_pStdPPSs(this.segment(), index); } + /// {@return `pStdPPSs`} + public @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment pStdPPSs() { return VkVideoDecodeH264SessionParametersAddInfoKHR.get_pStdPPSs(this.segment()); } + /// Sets `pStdPPSs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdPPSs(MemorySegment segment, long index, @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment value) { VH_pStdPPSs.set(segment, 0L, index, value); } + /// Sets `pStdPPSs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdPPSs(MemorySegment segment, @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_pStdPPSs(segment, 0L, value); } + /// Sets `pStdPPSs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR pStdPPSsAt(long index, @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_pStdPPSs(this.segment(), index, value); return this; } + /// Sets `pStdPPSs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersAddInfoKHR pStdPPSs(@CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersAddInfoKHR.set_pStdPPSs(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264SessionParametersCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264SessionParametersCreateInfoKHR.java new file mode 100644 index 00000000..d5a27fb7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH264SessionParametersCreateInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxStdSPSCount +/// [VarHandle][#VH_maxStdSPSCount] - [Getter][#maxStdSPSCount()] - [Setter][#maxStdSPSCount(int)] +/// ### maxStdPPSCount +/// [VarHandle][#VH_maxStdPPSCount] - [Getter][#maxStdPPSCount()] - [Setter][#maxStdPPSCount(int)] +/// ### pParametersAddInfo +/// [VarHandle][#VH_pParametersAddInfo] - [Getter][#pParametersAddInfo()] - [Setter][#pParametersAddInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH264SessionParametersCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t maxStdSPSCount; +/// uint32_t maxStdPPSCount; +/// const VkVideoDecodeH264SessionParametersAddInfoKHR * pParametersAddInfo; +/// } VkVideoDecodeH264SessionParametersCreateInfoKHR; +/// ``` +public final class VkVideoDecodeH264SessionParametersCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeH264SessionParametersCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxStdSPSCount"), + ValueLayout.JAVA_INT.withName("maxStdPPSCount"), + ValueLayout.ADDRESS.withName("pParametersAddInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxStdSPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStdSPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStdSPSCount")); + /// The [VarHandle] of `maxStdPPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStdPPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStdPPSCount")); + /// The [VarHandle] of `pParametersAddInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pParametersAddInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pParametersAddInfo")); + + /// Creates `VkVideoDecodeH264SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH264SessionParametersCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH264SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264SessionParametersCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264SessionParametersCreateInfoKHR(segment); } + + /// Creates `VkVideoDecodeH264SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264SessionParametersCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH264SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH264SessionParametersCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH264SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH264SessionParametersCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH264SessionParametersCreateInfoKHR` + public static VkVideoDecodeH264SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH264SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH264SessionParametersCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH264SessionParametersCreateInfoKHR` + public static VkVideoDecodeH264SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH264SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxStdSPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStdSPSCount(MemorySegment segment, long index) { return (int) VH_maxStdSPSCount.get(segment, 0L, index); } + /// {@return `maxStdSPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStdSPSCount(MemorySegment segment) { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_maxStdSPSCount(segment, 0L); } + /// {@return `maxStdSPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStdSPSCountAt(long index) { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_maxStdSPSCount(this.segment(), index); } + /// {@return `maxStdSPSCount`} + public @CType("uint32_t") int maxStdSPSCount() { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_maxStdSPSCount(this.segment()); } + /// Sets `maxStdSPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStdSPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStdSPSCount.set(segment, 0L, index, value); } + /// Sets `maxStdSPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStdSPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_maxStdSPSCount(segment, 0L, value); } + /// Sets `maxStdSPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersCreateInfoKHR maxStdSPSCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_maxStdSPSCount(this.segment(), index, value); return this; } + /// Sets `maxStdSPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersCreateInfoKHR maxStdSPSCount(@CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_maxStdSPSCount(this.segment(), value); return this; } + + /// {@return `maxStdPPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStdPPSCount(MemorySegment segment, long index) { return (int) VH_maxStdPPSCount.get(segment, 0L, index); } + /// {@return `maxStdPPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStdPPSCount(MemorySegment segment) { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_maxStdPPSCount(segment, 0L); } + /// {@return `maxStdPPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStdPPSCountAt(long index) { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_maxStdPPSCount(this.segment(), index); } + /// {@return `maxStdPPSCount`} + public @CType("uint32_t") int maxStdPPSCount() { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_maxStdPPSCount(this.segment()); } + /// Sets `maxStdPPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStdPPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStdPPSCount.set(segment, 0L, index, value); } + /// Sets `maxStdPPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStdPPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_maxStdPPSCount(segment, 0L, value); } + /// Sets `maxStdPPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersCreateInfoKHR maxStdPPSCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_maxStdPPSCount(this.segment(), index, value); return this; } + /// Sets `maxStdPPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersCreateInfoKHR maxStdPPSCount(@CType("uint32_t") int value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_maxStdPPSCount(this.segment(), value); return this; } + + /// {@return `pParametersAddInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoDecodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment get_pParametersAddInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pParametersAddInfo.get(segment, 0L, index); } + /// {@return `pParametersAddInfo`} + /// @param segment the segment of the struct + public static @CType("const VkVideoDecodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment get_pParametersAddInfo(MemorySegment segment) { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_pParametersAddInfo(segment, 0L); } + /// {@return `pParametersAddInfo` at the given index} + /// @param index the index + public @CType("const VkVideoDecodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment pParametersAddInfoAt(long index) { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_pParametersAddInfo(this.segment(), index); } + /// {@return `pParametersAddInfo`} + public @CType("const VkVideoDecodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment pParametersAddInfo() { return VkVideoDecodeH264SessionParametersCreateInfoKHR.get_pParametersAddInfo(this.segment()); } + /// Sets `pParametersAddInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pParametersAddInfo(MemorySegment segment, long index, @CType("const VkVideoDecodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pParametersAddInfo.set(segment, 0L, index, value); } + /// Sets `pParametersAddInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pParametersAddInfo(MemorySegment segment, @CType("const VkVideoDecodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_pParametersAddInfo(segment, 0L, value); } + /// Sets `pParametersAddInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersCreateInfoKHR pParametersAddInfoAt(long index, @CType("const VkVideoDecodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_pParametersAddInfo(this.segment(), index, value); return this; } + /// Sets `pParametersAddInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH264SessionParametersCreateInfoKHR pParametersAddInfo(@CType("const VkVideoDecodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH264SessionParametersCreateInfoKHR.set_pParametersAddInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265CapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265CapabilitiesKHR.java new file mode 100644 index 00000000..90d9a2b9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265CapabilitiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxLevelIdc +/// [VarHandle][#VH_maxLevelIdc] - [Getter][#maxLevelIdc()] - [Setter][#maxLevelIdc(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH265CapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// StdVideoH265LevelIdc maxLevelIdc; +/// } VkVideoDecodeH265CapabilitiesKHR; +/// ``` +public final class VkVideoDecodeH265CapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoDecodeH265CapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxLevelIdc") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxLevelIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxLevelIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLevelIdc")); + + /// Creates `VkVideoDecodeH265CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH265CapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH265CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265CapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265CapabilitiesKHR(segment); } + + /// Creates `VkVideoDecodeH265CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265CapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH265CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265CapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH265CapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH265CapabilitiesKHR` + public static VkVideoDecodeH265CapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH265CapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH265CapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH265CapabilitiesKHR` + public static VkVideoDecodeH265CapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH265CapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH265CapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH265CapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH265CapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH265CapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265CapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH265CapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265CapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH265CapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH265CapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH265CapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH265CapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265CapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265CapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265CapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265CapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265CapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxLevelIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265LevelIdc") int get_maxLevelIdc(MemorySegment segment, long index) { return (int) VH_maxLevelIdc.get(segment, 0L, index); } + /// {@return `maxLevelIdc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265LevelIdc") int get_maxLevelIdc(MemorySegment segment) { return VkVideoDecodeH265CapabilitiesKHR.get_maxLevelIdc(segment, 0L); } + /// {@return `maxLevelIdc` at the given index} + /// @param index the index + public @CType("StdVideoH265LevelIdc") int maxLevelIdcAt(long index) { return VkVideoDecodeH265CapabilitiesKHR.get_maxLevelIdc(this.segment(), index); } + /// {@return `maxLevelIdc`} + public @CType("StdVideoH265LevelIdc") int maxLevelIdc() { return VkVideoDecodeH265CapabilitiesKHR.get_maxLevelIdc(this.segment()); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, long index, @CType("StdVideoH265LevelIdc") int value) { VH_maxLevelIdc.set(segment, 0L, index, value); } + /// Sets `maxLevelIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, @CType("StdVideoH265LevelIdc") int value) { VkVideoDecodeH265CapabilitiesKHR.set_maxLevelIdc(segment, 0L, value); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265CapabilitiesKHR maxLevelIdcAt(long index, @CType("StdVideoH265LevelIdc") int value) { VkVideoDecodeH265CapabilitiesKHR.set_maxLevelIdc(this.segment(), index, value); return this; } + /// Sets `maxLevelIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265CapabilitiesKHR maxLevelIdc(@CType("StdVideoH265LevelIdc") int value) { VkVideoDecodeH265CapabilitiesKHR.set_maxLevelIdc(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265DpbSlotInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265DpbSlotInfoKHR.java new file mode 100644 index 00000000..8bf44a40 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265DpbSlotInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdReferenceInfo +/// [VarHandle][#VH_pStdReferenceInfo] - [Getter][#pStdReferenceInfo()] - [Setter][#pStdReferenceInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH265DpbSlotInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoDecodeH265ReferenceInfo * pStdReferenceInfo; +/// } VkVideoDecodeH265DpbSlotInfoKHR; +/// ``` +public final class VkVideoDecodeH265DpbSlotInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeH265DpbSlotInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdReferenceInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdReferenceInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdReferenceInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdReferenceInfo")); + + /// Creates `VkVideoDecodeH265DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH265DpbSlotInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH265DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265DpbSlotInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265DpbSlotInfoKHR(segment); } + + /// Creates `VkVideoDecodeH265DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265DpbSlotInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH265DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265DpbSlotInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH265DpbSlotInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH265DpbSlotInfoKHR` + public static VkVideoDecodeH265DpbSlotInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH265DpbSlotInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH265DpbSlotInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH265DpbSlotInfoKHR` + public static VkVideoDecodeH265DpbSlotInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH265DpbSlotInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH265DpbSlotInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH265DpbSlotInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH265DpbSlotInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH265DpbSlotInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265DpbSlotInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH265DpbSlotInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265DpbSlotInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH265DpbSlotInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH265DpbSlotInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH265DpbSlotInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH265DpbSlotInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265DpbSlotInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265DpbSlotInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265DpbSlotInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265DpbSlotInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265DpbSlotInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdReferenceInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoDecodeH265ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdReferenceInfo.get(segment, 0L, index); } + /// {@return `pStdReferenceInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoDecodeH265ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment) { return VkVideoDecodeH265DpbSlotInfoKHR.get_pStdReferenceInfo(segment, 0L); } + /// {@return `pStdReferenceInfo` at the given index} + /// @param index the index + public @CType("const StdVideoDecodeH265ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfoAt(long index) { return VkVideoDecodeH265DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment(), index); } + /// {@return `pStdReferenceInfo`} + public @CType("const StdVideoDecodeH265ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfo() { return VkVideoDecodeH265DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment()); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, long index, @CType("const StdVideoDecodeH265ReferenceInfo *") java.lang.foreign.MemorySegment value) { VH_pStdReferenceInfo.set(segment, 0L, index, value); } + /// Sets `pStdReferenceInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, @CType("const StdVideoDecodeH265ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265DpbSlotInfoKHR.set_pStdReferenceInfo(segment, 0L, value); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265DpbSlotInfoKHR pStdReferenceInfoAt(long index, @CType("const StdVideoDecodeH265ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), index, value); return this; } + /// Sets `pStdReferenceInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265DpbSlotInfoKHR pStdReferenceInfo(@CType("const StdVideoDecodeH265ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265PictureInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265PictureInfoKHR.java new file mode 100644 index 00000000..967829fb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265PictureInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdPictureInfo +/// [VarHandle][#VH_pStdPictureInfo] - [Getter][#pStdPictureInfo()] - [Setter][#pStdPictureInfo(java.lang.foreign.MemorySegment)] +/// ### sliceSegmentCount +/// [VarHandle][#VH_sliceSegmentCount] - [Getter][#sliceSegmentCount()] - [Setter][#sliceSegmentCount(int)] +/// ### pSliceSegmentOffsets +/// [VarHandle][#VH_pSliceSegmentOffsets] - [Getter][#pSliceSegmentOffsets()] - [Setter][#pSliceSegmentOffsets(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH265PictureInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoDecodeH265PictureInfo * pStdPictureInfo; +/// uint32_t sliceSegmentCount; +/// const uint32_t * pSliceSegmentOffsets; +/// } VkVideoDecodeH265PictureInfoKHR; +/// ``` +public final class VkVideoDecodeH265PictureInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeH265PictureInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdPictureInfo"), + ValueLayout.JAVA_INT.withName("sliceSegmentCount"), + ValueLayout.ADDRESS.withName("pSliceSegmentOffsets") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdPictureInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdPictureInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdPictureInfo")); + /// The [VarHandle] of `sliceSegmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sliceSegmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sliceSegmentCount")); + /// The [VarHandle] of `pSliceSegmentOffsets` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSliceSegmentOffsets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSliceSegmentOffsets")); + + /// Creates `VkVideoDecodeH265PictureInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH265PictureInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH265PictureInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265PictureInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265PictureInfoKHR(segment); } + + /// Creates `VkVideoDecodeH265PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265PictureInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH265PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265PictureInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH265PictureInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH265PictureInfoKHR` + public static VkVideoDecodeH265PictureInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH265PictureInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH265PictureInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH265PictureInfoKHR` + public static VkVideoDecodeH265PictureInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH265PictureInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH265PictureInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH265PictureInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH265PictureInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH265PictureInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265PictureInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH265PictureInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265PictureInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH265PictureInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH265PictureInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH265PictureInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH265PictureInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265PictureInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265PictureInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265PictureInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265PictureInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265PictureInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdPictureInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoDecodeH265PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdPictureInfo.get(segment, 0L, index); } + /// {@return `pStdPictureInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoDecodeH265PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment) { return VkVideoDecodeH265PictureInfoKHR.get_pStdPictureInfo(segment, 0L); } + /// {@return `pStdPictureInfo` at the given index} + /// @param index the index + public @CType("const StdVideoDecodeH265PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfoAt(long index) { return VkVideoDecodeH265PictureInfoKHR.get_pStdPictureInfo(this.segment(), index); } + /// {@return `pStdPictureInfo`} + public @CType("const StdVideoDecodeH265PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfo() { return VkVideoDecodeH265PictureInfoKHR.get_pStdPictureInfo(this.segment()); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, long index, @CType("const StdVideoDecodeH265PictureInfo *") java.lang.foreign.MemorySegment value) { VH_pStdPictureInfo.set(segment, 0L, index, value); } + /// Sets `pStdPictureInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, @CType("const StdVideoDecodeH265PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265PictureInfoKHR.set_pStdPictureInfo(segment, 0L, value); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265PictureInfoKHR pStdPictureInfoAt(long index, @CType("const StdVideoDecodeH265PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265PictureInfoKHR.set_pStdPictureInfo(this.segment(), index, value); return this; } + /// Sets `pStdPictureInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265PictureInfoKHR pStdPictureInfo(@CType("const StdVideoDecodeH265PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265PictureInfoKHR.set_pStdPictureInfo(this.segment(), value); return this; } + + /// {@return `sliceSegmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sliceSegmentCount(MemorySegment segment, long index) { return (int) VH_sliceSegmentCount.get(segment, 0L, index); } + /// {@return `sliceSegmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sliceSegmentCount(MemorySegment segment) { return VkVideoDecodeH265PictureInfoKHR.get_sliceSegmentCount(segment, 0L); } + /// {@return `sliceSegmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int sliceSegmentCountAt(long index) { return VkVideoDecodeH265PictureInfoKHR.get_sliceSegmentCount(this.segment(), index); } + /// {@return `sliceSegmentCount`} + public @CType("uint32_t") int sliceSegmentCount() { return VkVideoDecodeH265PictureInfoKHR.get_sliceSegmentCount(this.segment()); } + /// Sets `sliceSegmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sliceSegmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sliceSegmentCount.set(segment, 0L, index, value); } + /// Sets `sliceSegmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sliceSegmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH265PictureInfoKHR.set_sliceSegmentCount(segment, 0L, value); } + /// Sets `sliceSegmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265PictureInfoKHR sliceSegmentCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH265PictureInfoKHR.set_sliceSegmentCount(this.segment(), index, value); return this; } + /// Sets `sliceSegmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265PictureInfoKHR sliceSegmentCount(@CType("uint32_t") int value) { VkVideoDecodeH265PictureInfoKHR.set_sliceSegmentCount(this.segment(), value); return this; } + + /// {@return `pSliceSegmentOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pSliceSegmentOffsets(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSliceSegmentOffsets.get(segment, 0L, index); } + /// {@return `pSliceSegmentOffsets`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pSliceSegmentOffsets(MemorySegment segment) { return VkVideoDecodeH265PictureInfoKHR.get_pSliceSegmentOffsets(segment, 0L); } + /// {@return `pSliceSegmentOffsets` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pSliceSegmentOffsetsAt(long index) { return VkVideoDecodeH265PictureInfoKHR.get_pSliceSegmentOffsets(this.segment(), index); } + /// {@return `pSliceSegmentOffsets`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pSliceSegmentOffsets() { return VkVideoDecodeH265PictureInfoKHR.get_pSliceSegmentOffsets(this.segment()); } + /// Sets `pSliceSegmentOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSliceSegmentOffsets(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pSliceSegmentOffsets.set(segment, 0L, index, value); } + /// Sets `pSliceSegmentOffsets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSliceSegmentOffsets(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265PictureInfoKHR.set_pSliceSegmentOffsets(segment, 0L, value); } + /// Sets `pSliceSegmentOffsets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265PictureInfoKHR pSliceSegmentOffsetsAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265PictureInfoKHR.set_pSliceSegmentOffsets(this.segment(), index, value); return this; } + /// Sets `pSliceSegmentOffsets` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265PictureInfoKHR pSliceSegmentOffsets(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265PictureInfoKHR.set_pSliceSegmentOffsets(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265ProfileInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265ProfileInfoKHR.java new file mode 100644 index 00000000..85a978e2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265ProfileInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stdProfileIdc +/// [VarHandle][#VH_stdProfileIdc] - [Getter][#stdProfileIdc()] - [Setter][#stdProfileIdc(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH265ProfileInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// StdVideoH265ProfileIdc stdProfileIdc; +/// } VkVideoDecodeH265ProfileInfoKHR; +/// ``` +public final class VkVideoDecodeH265ProfileInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeH265ProfileInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stdProfileIdc") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stdProfileIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdProfileIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdProfileIdc")); + + /// Creates `VkVideoDecodeH265ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH265ProfileInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH265ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265ProfileInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265ProfileInfoKHR(segment); } + + /// Creates `VkVideoDecodeH265ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265ProfileInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH265ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265ProfileInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH265ProfileInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH265ProfileInfoKHR` + public static VkVideoDecodeH265ProfileInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH265ProfileInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH265ProfileInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH265ProfileInfoKHR` + public static VkVideoDecodeH265ProfileInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH265ProfileInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH265ProfileInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH265ProfileInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH265ProfileInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH265ProfileInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265ProfileInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH265ProfileInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265ProfileInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH265ProfileInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH265ProfileInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH265ProfileInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH265ProfileInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265ProfileInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265ProfileInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265ProfileInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265ProfileInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265ProfileInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stdProfileIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265ProfileIdc") int get_stdProfileIdc(MemorySegment segment, long index) { return (int) VH_stdProfileIdc.get(segment, 0L, index); } + /// {@return `stdProfileIdc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265ProfileIdc") int get_stdProfileIdc(MemorySegment segment) { return VkVideoDecodeH265ProfileInfoKHR.get_stdProfileIdc(segment, 0L); } + /// {@return `stdProfileIdc` at the given index} + /// @param index the index + public @CType("StdVideoH265ProfileIdc") int stdProfileIdcAt(long index) { return VkVideoDecodeH265ProfileInfoKHR.get_stdProfileIdc(this.segment(), index); } + /// {@return `stdProfileIdc`} + public @CType("StdVideoH265ProfileIdc") int stdProfileIdc() { return VkVideoDecodeH265ProfileInfoKHR.get_stdProfileIdc(this.segment()); } + /// Sets `stdProfileIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdProfileIdc(MemorySegment segment, long index, @CType("StdVideoH265ProfileIdc") int value) { VH_stdProfileIdc.set(segment, 0L, index, value); } + /// Sets `stdProfileIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdProfileIdc(MemorySegment segment, @CType("StdVideoH265ProfileIdc") int value) { VkVideoDecodeH265ProfileInfoKHR.set_stdProfileIdc(segment, 0L, value); } + /// Sets `stdProfileIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265ProfileInfoKHR stdProfileIdcAt(long index, @CType("StdVideoH265ProfileIdc") int value) { VkVideoDecodeH265ProfileInfoKHR.set_stdProfileIdc(this.segment(), index, value); return this; } + /// Sets `stdProfileIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265ProfileInfoKHR stdProfileIdc(@CType("StdVideoH265ProfileIdc") int value) { VkVideoDecodeH265ProfileInfoKHR.set_stdProfileIdc(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265SessionParametersAddInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265SessionParametersAddInfoKHR.java new file mode 100644 index 00000000..cc8644e2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265SessionParametersAddInfoKHR.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stdVPSCount +/// [VarHandle][#VH_stdVPSCount] - [Getter][#stdVPSCount()] - [Setter][#stdVPSCount(int)] +/// ### pStdVPSs +/// [VarHandle][#VH_pStdVPSs] - [Getter][#pStdVPSs()] - [Setter][#pStdVPSs(java.lang.foreign.MemorySegment)] +/// ### stdSPSCount +/// [VarHandle][#VH_stdSPSCount] - [Getter][#stdSPSCount()] - [Setter][#stdSPSCount(int)] +/// ### pStdSPSs +/// [VarHandle][#VH_pStdSPSs] - [Getter][#pStdSPSs()] - [Setter][#pStdSPSs(java.lang.foreign.MemorySegment)] +/// ### stdPPSCount +/// [VarHandle][#VH_stdPPSCount] - [Getter][#stdPPSCount()] - [Setter][#stdPPSCount(int)] +/// ### pStdPPSs +/// [VarHandle][#VH_pStdPPSs] - [Getter][#pStdPPSs()] - [Setter][#pStdPPSs(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH265SessionParametersAddInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t stdVPSCount; +/// const StdVideoH265VideoParameterSet * pStdVPSs; +/// uint32_t stdSPSCount; +/// const StdVideoH265SequenceParameterSet * pStdSPSs; +/// uint32_t stdPPSCount; +/// const StdVideoH265PictureParameterSet * pStdPPSs; +/// } VkVideoDecodeH265SessionParametersAddInfoKHR; +/// ``` +public final class VkVideoDecodeH265SessionParametersAddInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeH265SessionParametersAddInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stdVPSCount"), + ValueLayout.ADDRESS.withName("pStdVPSs"), + ValueLayout.JAVA_INT.withName("stdSPSCount"), + ValueLayout.ADDRESS.withName("pStdSPSs"), + ValueLayout.JAVA_INT.withName("stdPPSCount"), + ValueLayout.ADDRESS.withName("pStdPPSs") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stdVPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdVPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdVPSCount")); + /// The [VarHandle] of `pStdVPSs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdVPSs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdVPSs")); + /// The [VarHandle] of `stdSPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdSPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdSPSCount")); + /// The [VarHandle] of `pStdSPSs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdSPSs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdSPSs")); + /// The [VarHandle] of `stdPPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdPPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdPPSCount")); + /// The [VarHandle] of `pStdPPSs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdPPSs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdPPSs")); + + /// Creates `VkVideoDecodeH265SessionParametersAddInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH265SessionParametersAddInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH265SessionParametersAddInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265SessionParametersAddInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265SessionParametersAddInfoKHR(segment); } + + /// Creates `VkVideoDecodeH265SessionParametersAddInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265SessionParametersAddInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265SessionParametersAddInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH265SessionParametersAddInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265SessionParametersAddInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265SessionParametersAddInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH265SessionParametersAddInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH265SessionParametersAddInfoKHR` + public static VkVideoDecodeH265SessionParametersAddInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH265SessionParametersAddInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH265SessionParametersAddInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH265SessionParametersAddInfoKHR` + public static VkVideoDecodeH265SessionParametersAddInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH265SessionParametersAddInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stdVPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdVPSCount(MemorySegment segment, long index) { return (int) VH_stdVPSCount.get(segment, 0L, index); } + /// {@return `stdVPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdVPSCount(MemorySegment segment) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_stdVPSCount(segment, 0L); } + /// {@return `stdVPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdVPSCountAt(long index) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_stdVPSCount(this.segment(), index); } + /// {@return `stdVPSCount`} + public @CType("uint32_t") int stdVPSCount() { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_stdVPSCount(this.segment()); } + /// Sets `stdVPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdVPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdVPSCount.set(segment, 0L, index, value); } + /// Sets `stdVPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdVPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_stdVPSCount(segment, 0L, value); } + /// Sets `stdVPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR stdVPSCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_stdVPSCount(this.segment(), index, value); return this; } + /// Sets `stdVPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR stdVPSCount(@CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_stdVPSCount(this.segment(), value); return this; } + + /// {@return `pStdVPSs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment get_pStdVPSs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdVPSs.get(segment, 0L, index); } + /// {@return `pStdVPSs`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment get_pStdVPSs(MemorySegment segment) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pStdVPSs(segment, 0L); } + /// {@return `pStdVPSs` at the given index} + /// @param index the index + public @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment pStdVPSsAt(long index) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pStdVPSs(this.segment(), index); } + /// {@return `pStdVPSs`} + public @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment pStdVPSs() { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pStdVPSs(this.segment()); } + /// Sets `pStdVPSs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdVPSs(MemorySegment segment, long index, @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment value) { VH_pStdVPSs.set(segment, 0L, index, value); } + /// Sets `pStdVPSs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdVPSs(MemorySegment segment, @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pStdVPSs(segment, 0L, value); } + /// Sets `pStdVPSs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR pStdVPSsAt(long index, @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pStdVPSs(this.segment(), index, value); return this; } + /// Sets `pStdVPSs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR pStdVPSs(@CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pStdVPSs(this.segment(), value); return this; } + + /// {@return `stdSPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdSPSCount(MemorySegment segment, long index) { return (int) VH_stdSPSCount.get(segment, 0L, index); } + /// {@return `stdSPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdSPSCount(MemorySegment segment) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_stdSPSCount(segment, 0L); } + /// {@return `stdSPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdSPSCountAt(long index) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_stdSPSCount(this.segment(), index); } + /// {@return `stdSPSCount`} + public @CType("uint32_t") int stdSPSCount() { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_stdSPSCount(this.segment()); } + /// Sets `stdSPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdSPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdSPSCount.set(segment, 0L, index, value); } + /// Sets `stdSPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdSPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_stdSPSCount(segment, 0L, value); } + /// Sets `stdSPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR stdSPSCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_stdSPSCount(this.segment(), index, value); return this; } + /// Sets `stdSPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR stdSPSCount(@CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_stdSPSCount(this.segment(), value); return this; } + + /// {@return `pStdSPSs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment get_pStdSPSs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdSPSs.get(segment, 0L, index); } + /// {@return `pStdSPSs`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment get_pStdSPSs(MemorySegment segment) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pStdSPSs(segment, 0L); } + /// {@return `pStdSPSs` at the given index} + /// @param index the index + public @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment pStdSPSsAt(long index) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pStdSPSs(this.segment(), index); } + /// {@return `pStdSPSs`} + public @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment pStdSPSs() { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pStdSPSs(this.segment()); } + /// Sets `pStdSPSs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdSPSs(MemorySegment segment, long index, @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VH_pStdSPSs.set(segment, 0L, index, value); } + /// Sets `pStdSPSs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdSPSs(MemorySegment segment, @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pStdSPSs(segment, 0L, value); } + /// Sets `pStdSPSs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR pStdSPSsAt(long index, @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pStdSPSs(this.segment(), index, value); return this; } + /// Sets `pStdSPSs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR pStdSPSs(@CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pStdSPSs(this.segment(), value); return this; } + + /// {@return `stdPPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdPPSCount(MemorySegment segment, long index) { return (int) VH_stdPPSCount.get(segment, 0L, index); } + /// {@return `stdPPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdPPSCount(MemorySegment segment) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_stdPPSCount(segment, 0L); } + /// {@return `stdPPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdPPSCountAt(long index) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_stdPPSCount(this.segment(), index); } + /// {@return `stdPPSCount`} + public @CType("uint32_t") int stdPPSCount() { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_stdPPSCount(this.segment()); } + /// Sets `stdPPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdPPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdPPSCount.set(segment, 0L, index, value); } + /// Sets `stdPPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdPPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_stdPPSCount(segment, 0L, value); } + /// Sets `stdPPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR stdPPSCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_stdPPSCount(this.segment(), index, value); return this; } + /// Sets `stdPPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR stdPPSCount(@CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_stdPPSCount(this.segment(), value); return this; } + + /// {@return `pStdPPSs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment get_pStdPPSs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdPPSs.get(segment, 0L, index); } + /// {@return `pStdPPSs`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment get_pStdPPSs(MemorySegment segment) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pStdPPSs(segment, 0L); } + /// {@return `pStdPPSs` at the given index} + /// @param index the index + public @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment pStdPPSsAt(long index) { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pStdPPSs(this.segment(), index); } + /// {@return `pStdPPSs`} + public @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment pStdPPSs() { return VkVideoDecodeH265SessionParametersAddInfoKHR.get_pStdPPSs(this.segment()); } + /// Sets `pStdPPSs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdPPSs(MemorySegment segment, long index, @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment value) { VH_pStdPPSs.set(segment, 0L, index, value); } + /// Sets `pStdPPSs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdPPSs(MemorySegment segment, @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pStdPPSs(segment, 0L, value); } + /// Sets `pStdPPSs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR pStdPPSsAt(long index, @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pStdPPSs(this.segment(), index, value); return this; } + /// Sets `pStdPPSs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersAddInfoKHR pStdPPSs(@CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersAddInfoKHR.set_pStdPPSs(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265SessionParametersCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265SessionParametersCreateInfoKHR.java new file mode 100644 index 00000000..48edd395 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeH265SessionParametersCreateInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxStdVPSCount +/// [VarHandle][#VH_maxStdVPSCount] - [Getter][#maxStdVPSCount()] - [Setter][#maxStdVPSCount(int)] +/// ### maxStdSPSCount +/// [VarHandle][#VH_maxStdSPSCount] - [Getter][#maxStdSPSCount()] - [Setter][#maxStdSPSCount(int)] +/// ### maxStdPPSCount +/// [VarHandle][#VH_maxStdPPSCount] - [Getter][#maxStdPPSCount()] - [Setter][#maxStdPPSCount(int)] +/// ### pParametersAddInfo +/// [VarHandle][#VH_pParametersAddInfo] - [Getter][#pParametersAddInfo()] - [Setter][#pParametersAddInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeH265SessionParametersCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t maxStdVPSCount; +/// uint32_t maxStdSPSCount; +/// uint32_t maxStdPPSCount; +/// const VkVideoDecodeH265SessionParametersAddInfoKHR * pParametersAddInfo; +/// } VkVideoDecodeH265SessionParametersCreateInfoKHR; +/// ``` +public final class VkVideoDecodeH265SessionParametersCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeH265SessionParametersCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxStdVPSCount"), + ValueLayout.JAVA_INT.withName("maxStdSPSCount"), + ValueLayout.JAVA_INT.withName("maxStdPPSCount"), + ValueLayout.ADDRESS.withName("pParametersAddInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxStdVPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStdVPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStdVPSCount")); + /// The [VarHandle] of `maxStdSPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStdSPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStdSPSCount")); + /// The [VarHandle] of `maxStdPPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStdPPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStdPPSCount")); + /// The [VarHandle] of `pParametersAddInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pParametersAddInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pParametersAddInfo")); + + /// Creates `VkVideoDecodeH265SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeH265SessionParametersCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeH265SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265SessionParametersCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265SessionParametersCreateInfoKHR(segment); } + + /// Creates `VkVideoDecodeH265SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265SessionParametersCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeH265SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeH265SessionParametersCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeH265SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeH265SessionParametersCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeH265SessionParametersCreateInfoKHR` + public static VkVideoDecodeH265SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeH265SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeH265SessionParametersCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeH265SessionParametersCreateInfoKHR` + public static VkVideoDecodeH265SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeH265SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxStdVPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStdVPSCount(MemorySegment segment, long index) { return (int) VH_maxStdVPSCount.get(segment, 0L, index); } + /// {@return `maxStdVPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStdVPSCount(MemorySegment segment) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_maxStdVPSCount(segment, 0L); } + /// {@return `maxStdVPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStdVPSCountAt(long index) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_maxStdVPSCount(this.segment(), index); } + /// {@return `maxStdVPSCount`} + public @CType("uint32_t") int maxStdVPSCount() { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_maxStdVPSCount(this.segment()); } + /// Sets `maxStdVPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStdVPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStdVPSCount.set(segment, 0L, index, value); } + /// Sets `maxStdVPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStdVPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_maxStdVPSCount(segment, 0L, value); } + /// Sets `maxStdVPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR maxStdVPSCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_maxStdVPSCount(this.segment(), index, value); return this; } + /// Sets `maxStdVPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR maxStdVPSCount(@CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_maxStdVPSCount(this.segment(), value); return this; } + + /// {@return `maxStdSPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStdSPSCount(MemorySegment segment, long index) { return (int) VH_maxStdSPSCount.get(segment, 0L, index); } + /// {@return `maxStdSPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStdSPSCount(MemorySegment segment) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_maxStdSPSCount(segment, 0L); } + /// {@return `maxStdSPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStdSPSCountAt(long index) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_maxStdSPSCount(this.segment(), index); } + /// {@return `maxStdSPSCount`} + public @CType("uint32_t") int maxStdSPSCount() { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_maxStdSPSCount(this.segment()); } + /// Sets `maxStdSPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStdSPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStdSPSCount.set(segment, 0L, index, value); } + /// Sets `maxStdSPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStdSPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_maxStdSPSCount(segment, 0L, value); } + /// Sets `maxStdSPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR maxStdSPSCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_maxStdSPSCount(this.segment(), index, value); return this; } + /// Sets `maxStdSPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR maxStdSPSCount(@CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_maxStdSPSCount(this.segment(), value); return this; } + + /// {@return `maxStdPPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStdPPSCount(MemorySegment segment, long index) { return (int) VH_maxStdPPSCount.get(segment, 0L, index); } + /// {@return `maxStdPPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStdPPSCount(MemorySegment segment) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_maxStdPPSCount(segment, 0L); } + /// {@return `maxStdPPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStdPPSCountAt(long index) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_maxStdPPSCount(this.segment(), index); } + /// {@return `maxStdPPSCount`} + public @CType("uint32_t") int maxStdPPSCount() { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_maxStdPPSCount(this.segment()); } + /// Sets `maxStdPPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStdPPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStdPPSCount.set(segment, 0L, index, value); } + /// Sets `maxStdPPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStdPPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_maxStdPPSCount(segment, 0L, value); } + /// Sets `maxStdPPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR maxStdPPSCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_maxStdPPSCount(this.segment(), index, value); return this; } + /// Sets `maxStdPPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR maxStdPPSCount(@CType("uint32_t") int value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_maxStdPPSCount(this.segment(), value); return this; } + + /// {@return `pParametersAddInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoDecodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment get_pParametersAddInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pParametersAddInfo.get(segment, 0L, index); } + /// {@return `pParametersAddInfo`} + /// @param segment the segment of the struct + public static @CType("const VkVideoDecodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment get_pParametersAddInfo(MemorySegment segment) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_pParametersAddInfo(segment, 0L); } + /// {@return `pParametersAddInfo` at the given index} + /// @param index the index + public @CType("const VkVideoDecodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment pParametersAddInfoAt(long index) { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_pParametersAddInfo(this.segment(), index); } + /// {@return `pParametersAddInfo`} + public @CType("const VkVideoDecodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment pParametersAddInfo() { return VkVideoDecodeH265SessionParametersCreateInfoKHR.get_pParametersAddInfo(this.segment()); } + /// Sets `pParametersAddInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pParametersAddInfo(MemorySegment segment, long index, @CType("const VkVideoDecodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pParametersAddInfo.set(segment, 0L, index, value); } + /// Sets `pParametersAddInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pParametersAddInfo(MemorySegment segment, @CType("const VkVideoDecodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_pParametersAddInfo(segment, 0L, value); } + /// Sets `pParametersAddInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR pParametersAddInfoAt(long index, @CType("const VkVideoDecodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_pParametersAddInfo(this.segment(), index, value); return this; } + /// Sets `pParametersAddInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeH265SessionParametersCreateInfoKHR pParametersAddInfo(@CType("const VkVideoDecodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeH265SessionParametersCreateInfoKHR.set_pParametersAddInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeInfoKHR.java new file mode 100644 index 00000000..1532888a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeInfoKHR.java @@ -0,0 +1,446 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### srcBuffer +/// [VarHandle][#VH_srcBuffer] - [Getter][#srcBuffer()] - [Setter][#srcBuffer(java.lang.foreign.MemorySegment)] +/// ### srcBufferOffset +/// [VarHandle][#VH_srcBufferOffset] - [Getter][#srcBufferOffset()] - [Setter][#srcBufferOffset(long)] +/// ### srcBufferRange +/// [VarHandle][#VH_srcBufferRange] - [Getter][#srcBufferRange()] - [Setter][#srcBufferRange(long)] +/// ### dstPictureResource +/// [Byte offset][#OFFSET_dstPictureResource] - [Memory layout][#ML_dstPictureResource] - [Getter][#dstPictureResource()] - [Setter][#dstPictureResource(java.lang.foreign.MemorySegment)] +/// ### pSetupReferenceSlot +/// [VarHandle][#VH_pSetupReferenceSlot] - [Getter][#pSetupReferenceSlot()] - [Setter][#pSetupReferenceSlot(java.lang.foreign.MemorySegment)] +/// ### referenceSlotCount +/// [VarHandle][#VH_referenceSlotCount] - [Getter][#referenceSlotCount()] - [Setter][#referenceSlotCount(int)] +/// ### pReferenceSlots +/// [VarHandle][#VH_pReferenceSlots] - [Getter][#pReferenceSlots()] - [Setter][#pReferenceSlots(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoDecodeFlagsKHR flags; +/// VkBuffer srcBuffer; +/// VkDeviceSize srcBufferOffset; +/// VkDeviceSize srcBufferRange; +/// VkVideoPictureResourceInfoKHR dstPictureResource; +/// const VkVideoReferenceSlotInfoKHR * pSetupReferenceSlot; +/// uint32_t referenceSlotCount; +/// const VkVideoReferenceSlotInfoKHR * pReferenceSlots; +/// } VkVideoDecodeInfoKHR; +/// ``` +public final class VkVideoDecodeInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("srcBuffer"), + ValueLayout.JAVA_LONG.withName("srcBufferOffset"), + ValueLayout.JAVA_LONG.withName("srcBufferRange"), + overrungl.vulkan.khr.struct.VkVideoPictureResourceInfoKHR.LAYOUT.withName("dstPictureResource"), + ValueLayout.ADDRESS.withName("pSetupReferenceSlot"), + ValueLayout.JAVA_INT.withName("referenceSlotCount"), + ValueLayout.ADDRESS.withName("pReferenceSlots") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `srcBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcBuffer")); + /// The [VarHandle] of `srcBufferOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcBufferOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcBufferOffset")); + /// The [VarHandle] of `srcBufferRange` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcBufferRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcBufferRange")); + /// The byte offset of `dstPictureResource`. + public static final long OFFSET_dstPictureResource = LAYOUT.byteOffset(PathElement.groupElement("dstPictureResource")); + /// The memory layout of `dstPictureResource`. + public static final MemoryLayout ML_dstPictureResource = LAYOUT.select(PathElement.groupElement("dstPictureResource")); + /// The [VarHandle] of `pSetupReferenceSlot` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSetupReferenceSlot = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSetupReferenceSlot")); + /// The [VarHandle] of `referenceSlotCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_referenceSlotCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("referenceSlotCount")); + /// The [VarHandle] of `pReferenceSlots` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pReferenceSlots = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pReferenceSlots")); + + /// Creates `VkVideoDecodeInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeInfoKHR(segment); } + + /// Creates `VkVideoDecodeInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeInfoKHR` + public static VkVideoDecodeInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeInfoKHR` + public static VkVideoDecodeInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoDecodeFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoDecodeFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoDecodeInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoDecodeFlagsKHR") int flagsAt(long index) { return VkVideoDecodeInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoDecodeFlagsKHR") int flags() { return VkVideoDecodeInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoDecodeFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoDecodeFlagsKHR") int value) { VkVideoDecodeInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR flagsAt(long index, @CType("VkVideoDecodeFlagsKHR") int value) { VkVideoDecodeInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR flags(@CType("VkVideoDecodeFlagsKHR") int value) { VkVideoDecodeInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `srcBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_srcBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcBuffer.get(segment, 0L, index); } + /// {@return `srcBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_srcBuffer(MemorySegment segment) { return VkVideoDecodeInfoKHR.get_srcBuffer(segment, 0L); } + /// {@return `srcBuffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment srcBufferAt(long index) { return VkVideoDecodeInfoKHR.get_srcBuffer(this.segment(), index); } + /// {@return `srcBuffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment srcBuffer() { return VkVideoDecodeInfoKHR.get_srcBuffer(this.segment()); } + /// Sets `srcBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcBuffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_srcBuffer.set(segment, 0L, index, value); } + /// Sets `srcBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcBuffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_srcBuffer(segment, 0L, value); } + /// Sets `srcBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR srcBufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_srcBuffer(this.segment(), index, value); return this; } + /// Sets `srcBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR srcBuffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_srcBuffer(this.segment(), value); return this; } + + /// {@return `srcBufferOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_srcBufferOffset(MemorySegment segment, long index) { return (long) VH_srcBufferOffset.get(segment, 0L, index); } + /// {@return `srcBufferOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_srcBufferOffset(MemorySegment segment) { return VkVideoDecodeInfoKHR.get_srcBufferOffset(segment, 0L); } + /// {@return `srcBufferOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long srcBufferOffsetAt(long index) { return VkVideoDecodeInfoKHR.get_srcBufferOffset(this.segment(), index); } + /// {@return `srcBufferOffset`} + public @CType("VkDeviceSize") long srcBufferOffset() { return VkVideoDecodeInfoKHR.get_srcBufferOffset(this.segment()); } + /// Sets `srcBufferOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcBufferOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_srcBufferOffset.set(segment, 0L, index, value); } + /// Sets `srcBufferOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcBufferOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkVideoDecodeInfoKHR.set_srcBufferOffset(segment, 0L, value); } + /// Sets `srcBufferOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR srcBufferOffsetAt(long index, @CType("VkDeviceSize") long value) { VkVideoDecodeInfoKHR.set_srcBufferOffset(this.segment(), index, value); return this; } + /// Sets `srcBufferOffset` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR srcBufferOffset(@CType("VkDeviceSize") long value) { VkVideoDecodeInfoKHR.set_srcBufferOffset(this.segment(), value); return this; } + + /// {@return `srcBufferRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_srcBufferRange(MemorySegment segment, long index) { return (long) VH_srcBufferRange.get(segment, 0L, index); } + /// {@return `srcBufferRange`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_srcBufferRange(MemorySegment segment) { return VkVideoDecodeInfoKHR.get_srcBufferRange(segment, 0L); } + /// {@return `srcBufferRange` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long srcBufferRangeAt(long index) { return VkVideoDecodeInfoKHR.get_srcBufferRange(this.segment(), index); } + /// {@return `srcBufferRange`} + public @CType("VkDeviceSize") long srcBufferRange() { return VkVideoDecodeInfoKHR.get_srcBufferRange(this.segment()); } + /// Sets `srcBufferRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcBufferRange(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_srcBufferRange.set(segment, 0L, index, value); } + /// Sets `srcBufferRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcBufferRange(MemorySegment segment, @CType("VkDeviceSize") long value) { VkVideoDecodeInfoKHR.set_srcBufferRange(segment, 0L, value); } + /// Sets `srcBufferRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR srcBufferRangeAt(long index, @CType("VkDeviceSize") long value) { VkVideoDecodeInfoKHR.set_srcBufferRange(this.segment(), index, value); return this; } + /// Sets `srcBufferRange` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR srcBufferRange(@CType("VkDeviceSize") long value) { VkVideoDecodeInfoKHR.set_srcBufferRange(this.segment(), value); return this; } + + /// {@return `dstPictureResource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment get_dstPictureResource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstPictureResource, index), ML_dstPictureResource); } + /// {@return `dstPictureResource`} + /// @param segment the segment of the struct + public static @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment get_dstPictureResource(MemorySegment segment) { return VkVideoDecodeInfoKHR.get_dstPictureResource(segment, 0L); } + /// {@return `dstPictureResource` at the given index} + /// @param index the index + public @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment dstPictureResourceAt(long index) { return VkVideoDecodeInfoKHR.get_dstPictureResource(this.segment(), index); } + /// {@return `dstPictureResource`} + public @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment dstPictureResource() { return VkVideoDecodeInfoKHR.get_dstPictureResource(this.segment()); } + /// Sets `dstPictureResource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstPictureResource(MemorySegment segment, long index, @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstPictureResource, index), ML_dstPictureResource.byteSize()); } + /// Sets `dstPictureResource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstPictureResource(MemorySegment segment, @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_dstPictureResource(segment, 0L, value); } + /// Sets `dstPictureResource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR dstPictureResourceAt(long index, @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_dstPictureResource(this.segment(), index, value); return this; } + /// Sets `dstPictureResource` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR dstPictureResource(@CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_dstPictureResource(this.segment(), value); return this; } + + /// {@return `pSetupReferenceSlot` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment get_pSetupReferenceSlot(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSetupReferenceSlot.get(segment, 0L, index); } + /// {@return `pSetupReferenceSlot`} + /// @param segment the segment of the struct + public static @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment get_pSetupReferenceSlot(MemorySegment segment) { return VkVideoDecodeInfoKHR.get_pSetupReferenceSlot(segment, 0L); } + /// {@return `pSetupReferenceSlot` at the given index} + /// @param index the index + public @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment pSetupReferenceSlotAt(long index) { return VkVideoDecodeInfoKHR.get_pSetupReferenceSlot(this.segment(), index); } + /// {@return `pSetupReferenceSlot`} + public @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment pSetupReferenceSlot() { return VkVideoDecodeInfoKHR.get_pSetupReferenceSlot(this.segment()); } + /// Sets `pSetupReferenceSlot` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSetupReferenceSlot(MemorySegment segment, long index, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pSetupReferenceSlot.set(segment, 0L, index, value); } + /// Sets `pSetupReferenceSlot` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSetupReferenceSlot(MemorySegment segment, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_pSetupReferenceSlot(segment, 0L, value); } + /// Sets `pSetupReferenceSlot` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR pSetupReferenceSlotAt(long index, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_pSetupReferenceSlot(this.segment(), index, value); return this; } + /// Sets `pSetupReferenceSlot` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR pSetupReferenceSlot(@CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_pSetupReferenceSlot(this.segment(), value); return this; } + + /// {@return `referenceSlotCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_referenceSlotCount(MemorySegment segment, long index) { return (int) VH_referenceSlotCount.get(segment, 0L, index); } + /// {@return `referenceSlotCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_referenceSlotCount(MemorySegment segment) { return VkVideoDecodeInfoKHR.get_referenceSlotCount(segment, 0L); } + /// {@return `referenceSlotCount` at the given index} + /// @param index the index + public @CType("uint32_t") int referenceSlotCountAt(long index) { return VkVideoDecodeInfoKHR.get_referenceSlotCount(this.segment(), index); } + /// {@return `referenceSlotCount`} + public @CType("uint32_t") int referenceSlotCount() { return VkVideoDecodeInfoKHR.get_referenceSlotCount(this.segment()); } + /// Sets `referenceSlotCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_referenceSlotCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_referenceSlotCount.set(segment, 0L, index, value); } + /// Sets `referenceSlotCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_referenceSlotCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoDecodeInfoKHR.set_referenceSlotCount(segment, 0L, value); } + /// Sets `referenceSlotCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR referenceSlotCountAt(long index, @CType("uint32_t") int value) { VkVideoDecodeInfoKHR.set_referenceSlotCount(this.segment(), index, value); return this; } + /// Sets `referenceSlotCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR referenceSlotCount(@CType("uint32_t") int value) { VkVideoDecodeInfoKHR.set_referenceSlotCount(this.segment(), value); return this; } + + /// {@return `pReferenceSlots` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment get_pReferenceSlots(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pReferenceSlots.get(segment, 0L, index); } + /// {@return `pReferenceSlots`} + /// @param segment the segment of the struct + public static @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment get_pReferenceSlots(MemorySegment segment) { return VkVideoDecodeInfoKHR.get_pReferenceSlots(segment, 0L); } + /// {@return `pReferenceSlots` at the given index} + /// @param index the index + public @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment pReferenceSlotsAt(long index) { return VkVideoDecodeInfoKHR.get_pReferenceSlots(this.segment(), index); } + /// {@return `pReferenceSlots`} + public @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment pReferenceSlots() { return VkVideoDecodeInfoKHR.get_pReferenceSlots(this.segment()); } + /// Sets `pReferenceSlots` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pReferenceSlots(MemorySegment segment, long index, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pReferenceSlots.set(segment, 0L, index, value); } + /// Sets `pReferenceSlots` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pReferenceSlots(MemorySegment segment, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_pReferenceSlots(segment, 0L, value); } + /// Sets `pReferenceSlots` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR pReferenceSlotsAt(long index, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_pReferenceSlots(this.segment(), index, value); return this; } + /// Sets `pReferenceSlots` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeInfoKHR pReferenceSlots(@CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoDecodeInfoKHR.set_pReferenceSlots(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeUsageInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeUsageInfoKHR.java new file mode 100644 index 00000000..7da6470a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoDecodeUsageInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### videoUsageHints +/// [VarHandle][#VH_videoUsageHints] - [Getter][#videoUsageHints()] - [Setter][#videoUsageHints(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoDecodeUsageInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoDecodeUsageFlagsKHR videoUsageHints; +/// } VkVideoDecodeUsageInfoKHR; +/// ``` +public final class VkVideoDecodeUsageInfoKHR extends Struct { + /// The struct layout of `VkVideoDecodeUsageInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("videoUsageHints") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `videoUsageHints` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_videoUsageHints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoUsageHints")); + + /// Creates `VkVideoDecodeUsageInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoDecodeUsageInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoDecodeUsageInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeUsageInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeUsageInfoKHR(segment); } + + /// Creates `VkVideoDecodeUsageInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeUsageInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeUsageInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoDecodeUsageInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoDecodeUsageInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoDecodeUsageInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoDecodeUsageInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoDecodeUsageInfoKHR` + public static VkVideoDecodeUsageInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoDecodeUsageInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoDecodeUsageInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoDecodeUsageInfoKHR` + public static VkVideoDecodeUsageInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoDecodeUsageInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoDecodeUsageInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoDecodeUsageInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoDecodeUsageInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoDecodeUsageInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeUsageInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoDecodeUsageInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeUsageInfoKHR sType(@CType("VkStructureType") int value) { VkVideoDecodeUsageInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoDecodeUsageInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoDecodeUsageInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoDecodeUsageInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeUsageInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeUsageInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeUsageInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeUsageInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoDecodeUsageInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `videoUsageHints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoDecodeUsageFlagsKHR") int get_videoUsageHints(MemorySegment segment, long index) { return (int) VH_videoUsageHints.get(segment, 0L, index); } + /// {@return `videoUsageHints`} + /// @param segment the segment of the struct + public static @CType("VkVideoDecodeUsageFlagsKHR") int get_videoUsageHints(MemorySegment segment) { return VkVideoDecodeUsageInfoKHR.get_videoUsageHints(segment, 0L); } + /// {@return `videoUsageHints` at the given index} + /// @param index the index + public @CType("VkVideoDecodeUsageFlagsKHR") int videoUsageHintsAt(long index) { return VkVideoDecodeUsageInfoKHR.get_videoUsageHints(this.segment(), index); } + /// {@return `videoUsageHints`} + public @CType("VkVideoDecodeUsageFlagsKHR") int videoUsageHints() { return VkVideoDecodeUsageInfoKHR.get_videoUsageHints(this.segment()); } + /// Sets `videoUsageHints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoUsageHints(MemorySegment segment, long index, @CType("VkVideoDecodeUsageFlagsKHR") int value) { VH_videoUsageHints.set(segment, 0L, index, value); } + /// Sets `videoUsageHints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoUsageHints(MemorySegment segment, @CType("VkVideoDecodeUsageFlagsKHR") int value) { VkVideoDecodeUsageInfoKHR.set_videoUsageHints(segment, 0L, value); } + /// Sets `videoUsageHints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoDecodeUsageInfoKHR videoUsageHintsAt(long index, @CType("VkVideoDecodeUsageFlagsKHR") int value) { VkVideoDecodeUsageInfoKHR.set_videoUsageHints(this.segment(), index, value); return this; } + /// Sets `videoUsageHints` with the given value. + /// @param value the value + /// @return `this` + public VkVideoDecodeUsageInfoKHR videoUsageHints(@CType("VkVideoDecodeUsageFlagsKHR") int value) { VkVideoDecodeUsageInfoKHR.set_videoUsageHints(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1CapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1CapabilitiesKHR.java new file mode 100644 index 00000000..3eb94dcd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1CapabilitiesKHR.java @@ -0,0 +1,1044 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### maxLevel +/// [VarHandle][#VH_maxLevel] - [Getter][#maxLevel()] - [Setter][#maxLevel(int)] +/// ### codedPictureAlignment +/// [Byte offset][#OFFSET_codedPictureAlignment] - [Memory layout][#ML_codedPictureAlignment] - [Getter][#codedPictureAlignment()] - [Setter][#codedPictureAlignment(java.lang.foreign.MemorySegment)] +/// ### maxTiles +/// [Byte offset][#OFFSET_maxTiles] - [Memory layout][#ML_maxTiles] - [Getter][#maxTiles()] - [Setter][#maxTiles(java.lang.foreign.MemorySegment)] +/// ### minTileSize +/// [Byte offset][#OFFSET_minTileSize] - [Memory layout][#ML_minTileSize] - [Getter][#minTileSize()] - [Setter][#minTileSize(java.lang.foreign.MemorySegment)] +/// ### maxTileSize +/// [Byte offset][#OFFSET_maxTileSize] - [Memory layout][#ML_maxTileSize] - [Getter][#maxTileSize()] - [Setter][#maxTileSize(java.lang.foreign.MemorySegment)] +/// ### superblockSizes +/// [VarHandle][#VH_superblockSizes] - [Getter][#superblockSizes()] - [Setter][#superblockSizes(int)] +/// ### maxSingleReferenceCount +/// [VarHandle][#VH_maxSingleReferenceCount] - [Getter][#maxSingleReferenceCount()] - [Setter][#maxSingleReferenceCount(int)] +/// ### singleReferenceNameMask +/// [VarHandle][#VH_singleReferenceNameMask] - [Getter][#singleReferenceNameMask()] - [Setter][#singleReferenceNameMask(int)] +/// ### maxUnidirectionalCompoundReferenceCount +/// [VarHandle][#VH_maxUnidirectionalCompoundReferenceCount] - [Getter][#maxUnidirectionalCompoundReferenceCount()] - [Setter][#maxUnidirectionalCompoundReferenceCount(int)] +/// ### maxUnidirectionalCompoundGroup1ReferenceCount +/// [VarHandle][#VH_maxUnidirectionalCompoundGroup1ReferenceCount] - [Getter][#maxUnidirectionalCompoundGroup1ReferenceCount()] - [Setter][#maxUnidirectionalCompoundGroup1ReferenceCount(int)] +/// ### unidirectionalCompoundReferenceNameMask +/// [VarHandle][#VH_unidirectionalCompoundReferenceNameMask] - [Getter][#unidirectionalCompoundReferenceNameMask()] - [Setter][#unidirectionalCompoundReferenceNameMask(int)] +/// ### maxBidirectionalCompoundReferenceCount +/// [VarHandle][#VH_maxBidirectionalCompoundReferenceCount] - [Getter][#maxBidirectionalCompoundReferenceCount()] - [Setter][#maxBidirectionalCompoundReferenceCount(int)] +/// ### maxBidirectionalCompoundGroup1ReferenceCount +/// [VarHandle][#VH_maxBidirectionalCompoundGroup1ReferenceCount] - [Getter][#maxBidirectionalCompoundGroup1ReferenceCount()] - [Setter][#maxBidirectionalCompoundGroup1ReferenceCount(int)] +/// ### maxBidirectionalCompoundGroup2ReferenceCount +/// [VarHandle][#VH_maxBidirectionalCompoundGroup2ReferenceCount] - [Getter][#maxBidirectionalCompoundGroup2ReferenceCount()] - [Setter][#maxBidirectionalCompoundGroup2ReferenceCount(int)] +/// ### bidirectionalCompoundReferenceNameMask +/// [VarHandle][#VH_bidirectionalCompoundReferenceNameMask] - [Getter][#bidirectionalCompoundReferenceNameMask()] - [Setter][#bidirectionalCompoundReferenceNameMask(int)] +/// ### maxTemporalLayerCount +/// [VarHandle][#VH_maxTemporalLayerCount] - [Getter][#maxTemporalLayerCount()] - [Setter][#maxTemporalLayerCount(int)] +/// ### maxSpatialLayerCount +/// [VarHandle][#VH_maxSpatialLayerCount] - [Getter][#maxSpatialLayerCount()] - [Setter][#maxSpatialLayerCount(int)] +/// ### maxOperatingPoints +/// [VarHandle][#VH_maxOperatingPoints] - [Getter][#maxOperatingPoints()] - [Setter][#maxOperatingPoints(int)] +/// ### minQIndex +/// [VarHandle][#VH_minQIndex] - [Getter][#minQIndex()] - [Setter][#minQIndex(int)] +/// ### maxQIndex +/// [VarHandle][#VH_maxQIndex] - [Getter][#maxQIndex()] - [Setter][#maxQIndex(int)] +/// ### prefersGopRemainingFrames +/// [VarHandle][#VH_prefersGopRemainingFrames] - [Getter][#prefersGopRemainingFrames()] - [Setter][#prefersGopRemainingFrames(int)] +/// ### requiresGopRemainingFrames +/// [VarHandle][#VH_requiresGopRemainingFrames] - [Getter][#requiresGopRemainingFrames()] - [Setter][#requiresGopRemainingFrames(int)] +/// ### stdSyntaxFlags +/// [VarHandle][#VH_stdSyntaxFlags] - [Getter][#stdSyntaxFlags()] - [Setter][#stdSyntaxFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1CapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoEncodeAV1CapabilityFlagsKHR flags; +/// StdVideoAV1Level maxLevel; +/// VkExtent2D codedPictureAlignment; +/// VkExtent2D maxTiles; +/// VkExtent2D minTileSize; +/// VkExtent2D maxTileSize; +/// VkVideoEncodeAV1SuperblockSizeFlagsKHR superblockSizes; +/// uint32_t maxSingleReferenceCount; +/// uint32_t singleReferenceNameMask; +/// uint32_t maxUnidirectionalCompoundReferenceCount; +/// uint32_t maxUnidirectionalCompoundGroup1ReferenceCount; +/// uint32_t unidirectionalCompoundReferenceNameMask; +/// uint32_t maxBidirectionalCompoundReferenceCount; +/// uint32_t maxBidirectionalCompoundGroup1ReferenceCount; +/// uint32_t maxBidirectionalCompoundGroup2ReferenceCount; +/// uint32_t bidirectionalCompoundReferenceNameMask; +/// uint32_t maxTemporalLayerCount; +/// uint32_t maxSpatialLayerCount; +/// uint32_t maxOperatingPoints; +/// uint32_t minQIndex; +/// uint32_t maxQIndex; +/// VkBool32 prefersGopRemainingFrames; +/// VkBool32 requiresGopRemainingFrames; +/// VkVideoEncodeAV1StdFlagsKHR stdSyntaxFlags; +/// } VkVideoEncodeAV1CapabilitiesKHR; +/// ``` +public final class VkVideoEncodeAV1CapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1CapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("maxLevel"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("codedPictureAlignment"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxTiles"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("minTileSize"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxTileSize"), + ValueLayout.JAVA_INT.withName("superblockSizes"), + ValueLayout.JAVA_INT.withName("maxSingleReferenceCount"), + ValueLayout.JAVA_INT.withName("singleReferenceNameMask"), + ValueLayout.JAVA_INT.withName("maxUnidirectionalCompoundReferenceCount"), + ValueLayout.JAVA_INT.withName("maxUnidirectionalCompoundGroup1ReferenceCount"), + ValueLayout.JAVA_INT.withName("unidirectionalCompoundReferenceNameMask"), + ValueLayout.JAVA_INT.withName("maxBidirectionalCompoundReferenceCount"), + ValueLayout.JAVA_INT.withName("maxBidirectionalCompoundGroup1ReferenceCount"), + ValueLayout.JAVA_INT.withName("maxBidirectionalCompoundGroup2ReferenceCount"), + ValueLayout.JAVA_INT.withName("bidirectionalCompoundReferenceNameMask"), + ValueLayout.JAVA_INT.withName("maxTemporalLayerCount"), + ValueLayout.JAVA_INT.withName("maxSpatialLayerCount"), + ValueLayout.JAVA_INT.withName("maxOperatingPoints"), + ValueLayout.JAVA_INT.withName("minQIndex"), + ValueLayout.JAVA_INT.withName("maxQIndex"), + ValueLayout.JAVA_INT.withName("prefersGopRemainingFrames"), + ValueLayout.JAVA_INT.withName("requiresGopRemainingFrames"), + ValueLayout.JAVA_INT.withName("stdSyntaxFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `maxLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLevel")); + /// The byte offset of `codedPictureAlignment`. + public static final long OFFSET_codedPictureAlignment = LAYOUT.byteOffset(PathElement.groupElement("codedPictureAlignment")); + /// The memory layout of `codedPictureAlignment`. + public static final MemoryLayout ML_codedPictureAlignment = LAYOUT.select(PathElement.groupElement("codedPictureAlignment")); + /// The byte offset of `maxTiles`. + public static final long OFFSET_maxTiles = LAYOUT.byteOffset(PathElement.groupElement("maxTiles")); + /// The memory layout of `maxTiles`. + public static final MemoryLayout ML_maxTiles = LAYOUT.select(PathElement.groupElement("maxTiles")); + /// The byte offset of `minTileSize`. + public static final long OFFSET_minTileSize = LAYOUT.byteOffset(PathElement.groupElement("minTileSize")); + /// The memory layout of `minTileSize`. + public static final MemoryLayout ML_minTileSize = LAYOUT.select(PathElement.groupElement("minTileSize")); + /// The byte offset of `maxTileSize`. + public static final long OFFSET_maxTileSize = LAYOUT.byteOffset(PathElement.groupElement("maxTileSize")); + /// The memory layout of `maxTileSize`. + public static final MemoryLayout ML_maxTileSize = LAYOUT.select(PathElement.groupElement("maxTileSize")); + /// The [VarHandle] of `superblockSizes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_superblockSizes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("superblockSizes")); + /// The [VarHandle] of `maxSingleReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSingleReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSingleReferenceCount")); + /// The [VarHandle] of `singleReferenceNameMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_singleReferenceNameMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("singleReferenceNameMask")); + /// The [VarHandle] of `maxUnidirectionalCompoundReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxUnidirectionalCompoundReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxUnidirectionalCompoundReferenceCount")); + /// The [VarHandle] of `maxUnidirectionalCompoundGroup1ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxUnidirectionalCompoundGroup1ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxUnidirectionalCompoundGroup1ReferenceCount")); + /// The [VarHandle] of `unidirectionalCompoundReferenceNameMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_unidirectionalCompoundReferenceNameMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("unidirectionalCompoundReferenceNameMask")); + /// The [VarHandle] of `maxBidirectionalCompoundReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxBidirectionalCompoundReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBidirectionalCompoundReferenceCount")); + /// The [VarHandle] of `maxBidirectionalCompoundGroup1ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxBidirectionalCompoundGroup1ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBidirectionalCompoundGroup1ReferenceCount")); + /// The [VarHandle] of `maxBidirectionalCompoundGroup2ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxBidirectionalCompoundGroup2ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBidirectionalCompoundGroup2ReferenceCount")); + /// The [VarHandle] of `bidirectionalCompoundReferenceNameMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bidirectionalCompoundReferenceNameMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bidirectionalCompoundReferenceNameMask")); + /// The [VarHandle] of `maxTemporalLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTemporalLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTemporalLayerCount")); + /// The [VarHandle] of `maxSpatialLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSpatialLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSpatialLayerCount")); + /// The [VarHandle] of `maxOperatingPoints` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxOperatingPoints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxOperatingPoints")); + /// The [VarHandle] of `minQIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minQIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minQIndex")); + /// The [VarHandle] of `maxQIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxQIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxQIndex")); + /// The [VarHandle] of `prefersGopRemainingFrames` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_prefersGopRemainingFrames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("prefersGopRemainingFrames")); + /// The [VarHandle] of `requiresGopRemainingFrames` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_requiresGopRemainingFrames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("requiresGopRemainingFrames")); + /// The [VarHandle] of `stdSyntaxFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdSyntaxFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdSyntaxFlags")); + + /// Creates `VkVideoEncodeAV1CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1CapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1CapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1CapabilitiesKHR(segment); } + + /// Creates `VkVideoEncodeAV1CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1CapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1CapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1CapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1CapabilitiesKHR` + public static VkVideoEncodeAV1CapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1CapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1CapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1CapabilitiesKHR` + public static VkVideoEncodeAV1CapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1CapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1CapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1CapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1CapabilityFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1CapabilityFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1CapabilityFlagsKHR") int flagsAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoEncodeAV1CapabilityFlagsKHR") int flags() { return VkVideoEncodeAV1CapabilitiesKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoEncodeAV1CapabilityFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoEncodeAV1CapabilityFlagsKHR") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR flagsAt(long index, @CType("VkVideoEncodeAV1CapabilityFlagsKHR") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR flags(@CType("VkVideoEncodeAV1CapabilityFlagsKHR") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_flags(this.segment(), value); return this; } + + /// {@return `maxLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1Level") int get_maxLevel(MemorySegment segment, long index) { return (int) VH_maxLevel.get(segment, 0L, index); } + /// {@return `maxLevel`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1Level") int get_maxLevel(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxLevel(segment, 0L); } + /// {@return `maxLevel` at the given index} + /// @param index the index + public @CType("StdVideoAV1Level") int maxLevelAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxLevel(this.segment(), index); } + /// {@return `maxLevel`} + public @CType("StdVideoAV1Level") int maxLevel() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxLevel(this.segment()); } + /// Sets `maxLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLevel(MemorySegment segment, long index, @CType("StdVideoAV1Level") int value) { VH_maxLevel.set(segment, 0L, index, value); } + /// Sets `maxLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLevel(MemorySegment segment, @CType("StdVideoAV1Level") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxLevel(segment, 0L, value); } + /// Sets `maxLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxLevelAt(long index, @CType("StdVideoAV1Level") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxLevel(this.segment(), index, value); return this; } + /// Sets `maxLevel` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxLevel(@CType("StdVideoAV1Level") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxLevel(this.segment(), value); return this; } + + /// {@return `codedPictureAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_codedPictureAlignment(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_codedPictureAlignment, index), ML_codedPictureAlignment); } + /// {@return `codedPictureAlignment`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_codedPictureAlignment(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_codedPictureAlignment(segment, 0L); } + /// {@return `codedPictureAlignment` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment codedPictureAlignmentAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_codedPictureAlignment(this.segment(), index); } + /// {@return `codedPictureAlignment`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment codedPictureAlignment() { return VkVideoEncodeAV1CapabilitiesKHR.get_codedPictureAlignment(this.segment()); } + /// Sets `codedPictureAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_codedPictureAlignment(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_codedPictureAlignment, index), ML_codedPictureAlignment.byteSize()); } + /// Sets `codedPictureAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_codedPictureAlignment(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_codedPictureAlignment(segment, 0L, value); } + /// Sets `codedPictureAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR codedPictureAlignmentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_codedPictureAlignment(this.segment(), index, value); return this; } + /// Sets `codedPictureAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR codedPictureAlignment(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_codedPictureAlignment(this.segment(), value); return this; } + + /// {@return `maxTiles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxTiles(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxTiles, index), ML_maxTiles); } + /// {@return `maxTiles`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxTiles(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxTiles(segment, 0L); } + /// {@return `maxTiles` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxTilesAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxTiles(this.segment(), index); } + /// {@return `maxTiles`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxTiles() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxTiles(this.segment()); } + /// Sets `maxTiles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTiles(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxTiles, index), ML_maxTiles.byteSize()); } + /// Sets `maxTiles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTiles(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxTiles(segment, 0L, value); } + /// Sets `maxTiles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxTilesAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxTiles(this.segment(), index, value); return this; } + /// Sets `maxTiles` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxTiles(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxTiles(this.segment(), value); return this; } + + /// {@return `minTileSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minTileSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minTileSize, index), ML_minTileSize); } + /// {@return `minTileSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_minTileSize(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_minTileSize(segment, 0L); } + /// {@return `minTileSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minTileSizeAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_minTileSize(this.segment(), index); } + /// {@return `minTileSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment minTileSize() { return VkVideoEncodeAV1CapabilitiesKHR.get_minTileSize(this.segment()); } + /// Sets `minTileSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minTileSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minTileSize, index), ML_minTileSize.byteSize()); } + /// Sets `minTileSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minTileSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_minTileSize(segment, 0L, value); } + /// Sets `minTileSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR minTileSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_minTileSize(this.segment(), index, value); return this; } + /// Sets `minTileSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR minTileSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_minTileSize(this.segment(), value); return this; } + + /// {@return `maxTileSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxTileSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxTileSize, index), ML_maxTileSize); } + /// {@return `maxTileSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxTileSize(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxTileSize(segment, 0L); } + /// {@return `maxTileSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxTileSizeAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxTileSize(this.segment(), index); } + /// {@return `maxTileSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxTileSize() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxTileSize(this.segment()); } + /// Sets `maxTileSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTileSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxTileSize, index), ML_maxTileSize.byteSize()); } + /// Sets `maxTileSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTileSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxTileSize(segment, 0L, value); } + /// Sets `maxTileSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxTileSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxTileSize(this.segment(), index, value); return this; } + /// Sets `maxTileSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxTileSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxTileSize(this.segment(), value); return this; } + + /// {@return `superblockSizes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int get_superblockSizes(MemorySegment segment, long index) { return (int) VH_superblockSizes.get(segment, 0L, index); } + /// {@return `superblockSizes`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int get_superblockSizes(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_superblockSizes(segment, 0L); } + /// {@return `superblockSizes` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int superblockSizesAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_superblockSizes(this.segment(), index); } + /// {@return `superblockSizes`} + public @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int superblockSizes() { return VkVideoEncodeAV1CapabilitiesKHR.get_superblockSizes(this.segment()); } + /// Sets `superblockSizes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_superblockSizes(MemorySegment segment, long index, @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int value) { VH_superblockSizes.set(segment, 0L, index, value); } + /// Sets `superblockSizes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_superblockSizes(MemorySegment segment, @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_superblockSizes(segment, 0L, value); } + /// Sets `superblockSizes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR superblockSizesAt(long index, @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_superblockSizes(this.segment(), index, value); return this; } + /// Sets `superblockSizes` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR superblockSizes(@CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_superblockSizes(this.segment(), value); return this; } + + /// {@return `maxSingleReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSingleReferenceCount(MemorySegment segment, long index) { return (int) VH_maxSingleReferenceCount.get(segment, 0L, index); } + /// {@return `maxSingleReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSingleReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxSingleReferenceCount(segment, 0L); } + /// {@return `maxSingleReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSingleReferenceCountAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxSingleReferenceCount(this.segment(), index); } + /// {@return `maxSingleReferenceCount`} + public @CType("uint32_t") int maxSingleReferenceCount() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxSingleReferenceCount(this.segment()); } + /// Sets `maxSingleReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSingleReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSingleReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxSingleReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSingleReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxSingleReferenceCount(segment, 0L, value); } + /// Sets `maxSingleReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxSingleReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxSingleReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxSingleReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxSingleReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxSingleReferenceCount(this.segment(), value); return this; } + + /// {@return `singleReferenceNameMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_singleReferenceNameMask(MemorySegment segment, long index) { return (int) VH_singleReferenceNameMask.get(segment, 0L, index); } + /// {@return `singleReferenceNameMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_singleReferenceNameMask(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_singleReferenceNameMask(segment, 0L); } + /// {@return `singleReferenceNameMask` at the given index} + /// @param index the index + public @CType("uint32_t") int singleReferenceNameMaskAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_singleReferenceNameMask(this.segment(), index); } + /// {@return `singleReferenceNameMask`} + public @CType("uint32_t") int singleReferenceNameMask() { return VkVideoEncodeAV1CapabilitiesKHR.get_singleReferenceNameMask(this.segment()); } + /// Sets `singleReferenceNameMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_singleReferenceNameMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_singleReferenceNameMask.set(segment, 0L, index, value); } + /// Sets `singleReferenceNameMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_singleReferenceNameMask(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_singleReferenceNameMask(segment, 0L, value); } + /// Sets `singleReferenceNameMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR singleReferenceNameMaskAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_singleReferenceNameMask(this.segment(), index, value); return this; } + /// Sets `singleReferenceNameMask` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR singleReferenceNameMask(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_singleReferenceNameMask(this.segment(), value); return this; } + + /// {@return `maxUnidirectionalCompoundReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxUnidirectionalCompoundReferenceCount(MemorySegment segment, long index) { return (int) VH_maxUnidirectionalCompoundReferenceCount.get(segment, 0L, index); } + /// {@return `maxUnidirectionalCompoundReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxUnidirectionalCompoundReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxUnidirectionalCompoundReferenceCount(segment, 0L); } + /// {@return `maxUnidirectionalCompoundReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxUnidirectionalCompoundReferenceCountAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxUnidirectionalCompoundReferenceCount(this.segment(), index); } + /// {@return `maxUnidirectionalCompoundReferenceCount`} + public @CType("uint32_t") int maxUnidirectionalCompoundReferenceCount() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxUnidirectionalCompoundReferenceCount(this.segment()); } + /// Sets `maxUnidirectionalCompoundReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxUnidirectionalCompoundReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxUnidirectionalCompoundReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxUnidirectionalCompoundReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxUnidirectionalCompoundReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxUnidirectionalCompoundReferenceCount(segment, 0L, value); } + /// Sets `maxUnidirectionalCompoundReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxUnidirectionalCompoundReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxUnidirectionalCompoundReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxUnidirectionalCompoundReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxUnidirectionalCompoundReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxUnidirectionalCompoundReferenceCount(this.segment(), value); return this; } + + /// {@return `maxUnidirectionalCompoundGroup1ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxUnidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, long index) { return (int) VH_maxUnidirectionalCompoundGroup1ReferenceCount.get(segment, 0L, index); } + /// {@return `maxUnidirectionalCompoundGroup1ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxUnidirectionalCompoundGroup1ReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxUnidirectionalCompoundGroup1ReferenceCount(segment, 0L); } + /// {@return `maxUnidirectionalCompoundGroup1ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxUnidirectionalCompoundGroup1ReferenceCountAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxUnidirectionalCompoundGroup1ReferenceCount(this.segment(), index); } + /// {@return `maxUnidirectionalCompoundGroup1ReferenceCount`} + public @CType("uint32_t") int maxUnidirectionalCompoundGroup1ReferenceCount() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxUnidirectionalCompoundGroup1ReferenceCount(this.segment()); } + /// Sets `maxUnidirectionalCompoundGroup1ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxUnidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxUnidirectionalCompoundGroup1ReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxUnidirectionalCompoundGroup1ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxUnidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxUnidirectionalCompoundGroup1ReferenceCount(segment, 0L, value); } + /// Sets `maxUnidirectionalCompoundGroup1ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxUnidirectionalCompoundGroup1ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxUnidirectionalCompoundGroup1ReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxUnidirectionalCompoundGroup1ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxUnidirectionalCompoundGroup1ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxUnidirectionalCompoundGroup1ReferenceCount(this.segment(), value); return this; } + + /// {@return `unidirectionalCompoundReferenceNameMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_unidirectionalCompoundReferenceNameMask(MemorySegment segment, long index) { return (int) VH_unidirectionalCompoundReferenceNameMask.get(segment, 0L, index); } + /// {@return `unidirectionalCompoundReferenceNameMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_unidirectionalCompoundReferenceNameMask(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_unidirectionalCompoundReferenceNameMask(segment, 0L); } + /// {@return `unidirectionalCompoundReferenceNameMask` at the given index} + /// @param index the index + public @CType("uint32_t") int unidirectionalCompoundReferenceNameMaskAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_unidirectionalCompoundReferenceNameMask(this.segment(), index); } + /// {@return `unidirectionalCompoundReferenceNameMask`} + public @CType("uint32_t") int unidirectionalCompoundReferenceNameMask() { return VkVideoEncodeAV1CapabilitiesKHR.get_unidirectionalCompoundReferenceNameMask(this.segment()); } + /// Sets `unidirectionalCompoundReferenceNameMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_unidirectionalCompoundReferenceNameMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_unidirectionalCompoundReferenceNameMask.set(segment, 0L, index, value); } + /// Sets `unidirectionalCompoundReferenceNameMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_unidirectionalCompoundReferenceNameMask(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_unidirectionalCompoundReferenceNameMask(segment, 0L, value); } + /// Sets `unidirectionalCompoundReferenceNameMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR unidirectionalCompoundReferenceNameMaskAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_unidirectionalCompoundReferenceNameMask(this.segment(), index, value); return this; } + /// Sets `unidirectionalCompoundReferenceNameMask` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR unidirectionalCompoundReferenceNameMask(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_unidirectionalCompoundReferenceNameMask(this.segment(), value); return this; } + + /// {@return `maxBidirectionalCompoundReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxBidirectionalCompoundReferenceCount(MemorySegment segment, long index) { return (int) VH_maxBidirectionalCompoundReferenceCount.get(segment, 0L, index); } + /// {@return `maxBidirectionalCompoundReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxBidirectionalCompoundReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxBidirectionalCompoundReferenceCount(segment, 0L); } + /// {@return `maxBidirectionalCompoundReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxBidirectionalCompoundReferenceCountAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxBidirectionalCompoundReferenceCount(this.segment(), index); } + /// {@return `maxBidirectionalCompoundReferenceCount`} + public @CType("uint32_t") int maxBidirectionalCompoundReferenceCount() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxBidirectionalCompoundReferenceCount(this.segment()); } + /// Sets `maxBidirectionalCompoundReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBidirectionalCompoundReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxBidirectionalCompoundReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxBidirectionalCompoundReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBidirectionalCompoundReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxBidirectionalCompoundReferenceCount(segment, 0L, value); } + /// Sets `maxBidirectionalCompoundReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxBidirectionalCompoundReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxBidirectionalCompoundReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxBidirectionalCompoundReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxBidirectionalCompoundReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxBidirectionalCompoundReferenceCount(this.segment(), value); return this; } + + /// {@return `maxBidirectionalCompoundGroup1ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxBidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, long index) { return (int) VH_maxBidirectionalCompoundGroup1ReferenceCount.get(segment, 0L, index); } + /// {@return `maxBidirectionalCompoundGroup1ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxBidirectionalCompoundGroup1ReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxBidirectionalCompoundGroup1ReferenceCount(segment, 0L); } + /// {@return `maxBidirectionalCompoundGroup1ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxBidirectionalCompoundGroup1ReferenceCountAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxBidirectionalCompoundGroup1ReferenceCount(this.segment(), index); } + /// {@return `maxBidirectionalCompoundGroup1ReferenceCount`} + public @CType("uint32_t") int maxBidirectionalCompoundGroup1ReferenceCount() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxBidirectionalCompoundGroup1ReferenceCount(this.segment()); } + /// Sets `maxBidirectionalCompoundGroup1ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxBidirectionalCompoundGroup1ReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxBidirectionalCompoundGroup1ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxBidirectionalCompoundGroup1ReferenceCount(segment, 0L, value); } + /// Sets `maxBidirectionalCompoundGroup1ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxBidirectionalCompoundGroup1ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxBidirectionalCompoundGroup1ReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxBidirectionalCompoundGroup1ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxBidirectionalCompoundGroup1ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxBidirectionalCompoundGroup1ReferenceCount(this.segment(), value); return this; } + + /// {@return `maxBidirectionalCompoundGroup2ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxBidirectionalCompoundGroup2ReferenceCount(MemorySegment segment, long index) { return (int) VH_maxBidirectionalCompoundGroup2ReferenceCount.get(segment, 0L, index); } + /// {@return `maxBidirectionalCompoundGroup2ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxBidirectionalCompoundGroup2ReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxBidirectionalCompoundGroup2ReferenceCount(segment, 0L); } + /// {@return `maxBidirectionalCompoundGroup2ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxBidirectionalCompoundGroup2ReferenceCountAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxBidirectionalCompoundGroup2ReferenceCount(this.segment(), index); } + /// {@return `maxBidirectionalCompoundGroup2ReferenceCount`} + public @CType("uint32_t") int maxBidirectionalCompoundGroup2ReferenceCount() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxBidirectionalCompoundGroup2ReferenceCount(this.segment()); } + /// Sets `maxBidirectionalCompoundGroup2ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBidirectionalCompoundGroup2ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxBidirectionalCompoundGroup2ReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxBidirectionalCompoundGroup2ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBidirectionalCompoundGroup2ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxBidirectionalCompoundGroup2ReferenceCount(segment, 0L, value); } + /// Sets `maxBidirectionalCompoundGroup2ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxBidirectionalCompoundGroup2ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxBidirectionalCompoundGroup2ReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxBidirectionalCompoundGroup2ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxBidirectionalCompoundGroup2ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxBidirectionalCompoundGroup2ReferenceCount(this.segment(), value); return this; } + + /// {@return `bidirectionalCompoundReferenceNameMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bidirectionalCompoundReferenceNameMask(MemorySegment segment, long index) { return (int) VH_bidirectionalCompoundReferenceNameMask.get(segment, 0L, index); } + /// {@return `bidirectionalCompoundReferenceNameMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bidirectionalCompoundReferenceNameMask(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_bidirectionalCompoundReferenceNameMask(segment, 0L); } + /// {@return `bidirectionalCompoundReferenceNameMask` at the given index} + /// @param index the index + public @CType("uint32_t") int bidirectionalCompoundReferenceNameMaskAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_bidirectionalCompoundReferenceNameMask(this.segment(), index); } + /// {@return `bidirectionalCompoundReferenceNameMask`} + public @CType("uint32_t") int bidirectionalCompoundReferenceNameMask() { return VkVideoEncodeAV1CapabilitiesKHR.get_bidirectionalCompoundReferenceNameMask(this.segment()); } + /// Sets `bidirectionalCompoundReferenceNameMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bidirectionalCompoundReferenceNameMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bidirectionalCompoundReferenceNameMask.set(segment, 0L, index, value); } + /// Sets `bidirectionalCompoundReferenceNameMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bidirectionalCompoundReferenceNameMask(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_bidirectionalCompoundReferenceNameMask(segment, 0L, value); } + /// Sets `bidirectionalCompoundReferenceNameMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR bidirectionalCompoundReferenceNameMaskAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_bidirectionalCompoundReferenceNameMask(this.segment(), index, value); return this; } + /// Sets `bidirectionalCompoundReferenceNameMask` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR bidirectionalCompoundReferenceNameMask(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_bidirectionalCompoundReferenceNameMask(this.segment(), value); return this; } + + /// {@return `maxTemporalLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTemporalLayerCount(MemorySegment segment, long index) { return (int) VH_maxTemporalLayerCount.get(segment, 0L, index); } + /// {@return `maxTemporalLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTemporalLayerCount(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxTemporalLayerCount(segment, 0L); } + /// {@return `maxTemporalLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTemporalLayerCountAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxTemporalLayerCount(this.segment(), index); } + /// {@return `maxTemporalLayerCount`} + public @CType("uint32_t") int maxTemporalLayerCount() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxTemporalLayerCount(this.segment()); } + /// Sets `maxTemporalLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTemporalLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTemporalLayerCount.set(segment, 0L, index, value); } + /// Sets `maxTemporalLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTemporalLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxTemporalLayerCount(segment, 0L, value); } + /// Sets `maxTemporalLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxTemporalLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxTemporalLayerCount(this.segment(), index, value); return this; } + /// Sets `maxTemporalLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxTemporalLayerCount(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxTemporalLayerCount(this.segment(), value); return this; } + + /// {@return `maxSpatialLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSpatialLayerCount(MemorySegment segment, long index) { return (int) VH_maxSpatialLayerCount.get(segment, 0L, index); } + /// {@return `maxSpatialLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSpatialLayerCount(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxSpatialLayerCount(segment, 0L); } + /// {@return `maxSpatialLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSpatialLayerCountAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxSpatialLayerCount(this.segment(), index); } + /// {@return `maxSpatialLayerCount`} + public @CType("uint32_t") int maxSpatialLayerCount() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxSpatialLayerCount(this.segment()); } + /// Sets `maxSpatialLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSpatialLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSpatialLayerCount.set(segment, 0L, index, value); } + /// Sets `maxSpatialLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSpatialLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxSpatialLayerCount(segment, 0L, value); } + /// Sets `maxSpatialLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxSpatialLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxSpatialLayerCount(this.segment(), index, value); return this; } + /// Sets `maxSpatialLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxSpatialLayerCount(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxSpatialLayerCount(this.segment(), value); return this; } + + /// {@return `maxOperatingPoints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxOperatingPoints(MemorySegment segment, long index) { return (int) VH_maxOperatingPoints.get(segment, 0L, index); } + /// {@return `maxOperatingPoints`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxOperatingPoints(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxOperatingPoints(segment, 0L); } + /// {@return `maxOperatingPoints` at the given index} + /// @param index the index + public @CType("uint32_t") int maxOperatingPointsAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxOperatingPoints(this.segment(), index); } + /// {@return `maxOperatingPoints`} + public @CType("uint32_t") int maxOperatingPoints() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxOperatingPoints(this.segment()); } + /// Sets `maxOperatingPoints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxOperatingPoints(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxOperatingPoints.set(segment, 0L, index, value); } + /// Sets `maxOperatingPoints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxOperatingPoints(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxOperatingPoints(segment, 0L, value); } + /// Sets `maxOperatingPoints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxOperatingPointsAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxOperatingPoints(this.segment(), index, value); return this; } + /// Sets `maxOperatingPoints` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxOperatingPoints(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxOperatingPoints(this.segment(), value); return this; } + + /// {@return `minQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minQIndex(MemorySegment segment, long index) { return (int) VH_minQIndex.get(segment, 0L, index); } + /// {@return `minQIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minQIndex(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_minQIndex(segment, 0L); } + /// {@return `minQIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int minQIndexAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_minQIndex(this.segment(), index); } + /// {@return `minQIndex`} + public @CType("uint32_t") int minQIndex() { return VkVideoEncodeAV1CapabilitiesKHR.get_minQIndex(this.segment()); } + /// Sets `minQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minQIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minQIndex.set(segment, 0L, index, value); } + /// Sets `minQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minQIndex(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_minQIndex(segment, 0L, value); } + /// Sets `minQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR minQIndexAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_minQIndex(this.segment(), index, value); return this; } + /// Sets `minQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR minQIndex(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_minQIndex(this.segment(), value); return this; } + + /// {@return `maxQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxQIndex(MemorySegment segment, long index) { return (int) VH_maxQIndex.get(segment, 0L, index); } + /// {@return `maxQIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxQIndex(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxQIndex(segment, 0L); } + /// {@return `maxQIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int maxQIndexAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_maxQIndex(this.segment(), index); } + /// {@return `maxQIndex`} + public @CType("uint32_t") int maxQIndex() { return VkVideoEncodeAV1CapabilitiesKHR.get_maxQIndex(this.segment()); } + /// Sets `maxQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxQIndex.set(segment, 0L, index, value); } + /// Sets `maxQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQIndex(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxQIndex(segment, 0L, value); } + /// Sets `maxQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxQIndexAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxQIndex(this.segment(), index, value); return this; } + /// Sets `maxQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR maxQIndex(@CType("uint32_t") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_maxQIndex(this.segment(), value); return this; } + + /// {@return `prefersGopRemainingFrames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_prefersGopRemainingFrames(MemorySegment segment, long index) { return (int) VH_prefersGopRemainingFrames.get(segment, 0L, index); } + /// {@return `prefersGopRemainingFrames`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_prefersGopRemainingFrames(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_prefersGopRemainingFrames(segment, 0L); } + /// {@return `prefersGopRemainingFrames` at the given index} + /// @param index the index + public @CType("VkBool32") int prefersGopRemainingFramesAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_prefersGopRemainingFrames(this.segment(), index); } + /// {@return `prefersGopRemainingFrames`} + public @CType("VkBool32") int prefersGopRemainingFrames() { return VkVideoEncodeAV1CapabilitiesKHR.get_prefersGopRemainingFrames(this.segment()); } + /// Sets `prefersGopRemainingFrames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_prefersGopRemainingFrames(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_prefersGopRemainingFrames.set(segment, 0L, index, value); } + /// Sets `prefersGopRemainingFrames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_prefersGopRemainingFrames(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_prefersGopRemainingFrames(segment, 0L, value); } + /// Sets `prefersGopRemainingFrames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR prefersGopRemainingFramesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_prefersGopRemainingFrames(this.segment(), index, value); return this; } + /// Sets `prefersGopRemainingFrames` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR prefersGopRemainingFrames(@CType("VkBool32") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_prefersGopRemainingFrames(this.segment(), value); return this; } + + /// {@return `requiresGopRemainingFrames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_requiresGopRemainingFrames(MemorySegment segment, long index) { return (int) VH_requiresGopRemainingFrames.get(segment, 0L, index); } + /// {@return `requiresGopRemainingFrames`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_requiresGopRemainingFrames(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_requiresGopRemainingFrames(segment, 0L); } + /// {@return `requiresGopRemainingFrames` at the given index} + /// @param index the index + public @CType("VkBool32") int requiresGopRemainingFramesAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_requiresGopRemainingFrames(this.segment(), index); } + /// {@return `requiresGopRemainingFrames`} + public @CType("VkBool32") int requiresGopRemainingFrames() { return VkVideoEncodeAV1CapabilitiesKHR.get_requiresGopRemainingFrames(this.segment()); } + /// Sets `requiresGopRemainingFrames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_requiresGopRemainingFrames(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_requiresGopRemainingFrames.set(segment, 0L, index, value); } + /// Sets `requiresGopRemainingFrames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_requiresGopRemainingFrames(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_requiresGopRemainingFrames(segment, 0L, value); } + /// Sets `requiresGopRemainingFrames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR requiresGopRemainingFramesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_requiresGopRemainingFrames(this.segment(), index, value); return this; } + /// Sets `requiresGopRemainingFrames` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR requiresGopRemainingFrames(@CType("VkBool32") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_requiresGopRemainingFrames(this.segment(), value); return this; } + + /// {@return `stdSyntaxFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1StdFlagsKHR") int get_stdSyntaxFlags(MemorySegment segment, long index) { return (int) VH_stdSyntaxFlags.get(segment, 0L, index); } + /// {@return `stdSyntaxFlags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1StdFlagsKHR") int get_stdSyntaxFlags(MemorySegment segment) { return VkVideoEncodeAV1CapabilitiesKHR.get_stdSyntaxFlags(segment, 0L); } + /// {@return `stdSyntaxFlags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1StdFlagsKHR") int stdSyntaxFlagsAt(long index) { return VkVideoEncodeAV1CapabilitiesKHR.get_stdSyntaxFlags(this.segment(), index); } + /// {@return `stdSyntaxFlags`} + public @CType("VkVideoEncodeAV1StdFlagsKHR") int stdSyntaxFlags() { return VkVideoEncodeAV1CapabilitiesKHR.get_stdSyntaxFlags(this.segment()); } + /// Sets `stdSyntaxFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdSyntaxFlags(MemorySegment segment, long index, @CType("VkVideoEncodeAV1StdFlagsKHR") int value) { VH_stdSyntaxFlags.set(segment, 0L, index, value); } + /// Sets `stdSyntaxFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdSyntaxFlags(MemorySegment segment, @CType("VkVideoEncodeAV1StdFlagsKHR") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_stdSyntaxFlags(segment, 0L, value); } + /// Sets `stdSyntaxFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR stdSyntaxFlagsAt(long index, @CType("VkVideoEncodeAV1StdFlagsKHR") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_stdSyntaxFlags(this.segment(), index, value); return this; } + /// Sets `stdSyntaxFlags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1CapabilitiesKHR stdSyntaxFlags(@CType("VkVideoEncodeAV1StdFlagsKHR") int value) { VkVideoEncodeAV1CapabilitiesKHR.set_stdSyntaxFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1DpbSlotInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1DpbSlotInfoKHR.java new file mode 100644 index 00000000..16094481 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1DpbSlotInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdReferenceInfo +/// [VarHandle][#VH_pStdReferenceInfo] - [Getter][#pStdReferenceInfo()] - [Setter][#pStdReferenceInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1DpbSlotInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoEncodeAV1ReferenceInfo * pStdReferenceInfo; +/// } VkVideoEncodeAV1DpbSlotInfoKHR; +/// ``` +public final class VkVideoEncodeAV1DpbSlotInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1DpbSlotInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdReferenceInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdReferenceInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdReferenceInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdReferenceInfo")); + + /// Creates `VkVideoEncodeAV1DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1DpbSlotInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1DpbSlotInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1DpbSlotInfoKHR(segment); } + + /// Creates `VkVideoEncodeAV1DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1DpbSlotInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1DpbSlotInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1DpbSlotInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1DpbSlotInfoKHR` + public static VkVideoEncodeAV1DpbSlotInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1DpbSlotInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1DpbSlotInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1DpbSlotInfoKHR` + public static VkVideoEncodeAV1DpbSlotInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1DpbSlotInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1DpbSlotInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1DpbSlotInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1DpbSlotInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1DpbSlotInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1DpbSlotInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1DpbSlotInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1DpbSlotInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1DpbSlotInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1DpbSlotInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1DpbSlotInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1DpbSlotInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1DpbSlotInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1DpbSlotInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1DpbSlotInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1DpbSlotInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1DpbSlotInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdReferenceInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdReferenceInfo.get(segment, 0L, index); } + /// {@return `pStdReferenceInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment) { return VkVideoEncodeAV1DpbSlotInfoKHR.get_pStdReferenceInfo(segment, 0L); } + /// {@return `pStdReferenceInfo` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfoAt(long index) { return VkVideoEncodeAV1DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment(), index); } + /// {@return `pStdReferenceInfo`} + public @CType("const StdVideoEncodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfo() { return VkVideoEncodeAV1DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment()); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, long index, @CType("const StdVideoEncodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment value) { VH_pStdReferenceInfo.set(segment, 0L, index, value); } + /// Sets `pStdReferenceInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, @CType("const StdVideoEncodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1DpbSlotInfoKHR.set_pStdReferenceInfo(segment, 0L, value); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1DpbSlotInfoKHR pStdReferenceInfoAt(long index, @CType("const StdVideoEncodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), index, value); return this; } + /// Sets `pStdReferenceInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1DpbSlotInfoKHR pStdReferenceInfo(@CType("const StdVideoEncodeAV1ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1FrameSizeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1FrameSizeKHR.java new file mode 100644 index 00000000..92ff4c88 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1FrameSizeKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### intraFrameSize +/// [VarHandle][#VH_intraFrameSize] - [Getter][#intraFrameSize()] - [Setter][#intraFrameSize(int)] +/// ### predictiveFrameSize +/// [VarHandle][#VH_predictiveFrameSize] - [Getter][#predictiveFrameSize()] - [Setter][#predictiveFrameSize(int)] +/// ### bipredictiveFrameSize +/// [VarHandle][#VH_bipredictiveFrameSize] - [Getter][#bipredictiveFrameSize()] - [Setter][#bipredictiveFrameSize(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1FrameSizeKHR { +/// uint32_t intraFrameSize; +/// uint32_t predictiveFrameSize; +/// uint32_t bipredictiveFrameSize; +/// } VkVideoEncodeAV1FrameSizeKHR; +/// ``` +public final class VkVideoEncodeAV1FrameSizeKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1FrameSizeKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("intraFrameSize"), + ValueLayout.JAVA_INT.withName("predictiveFrameSize"), + ValueLayout.JAVA_INT.withName("bipredictiveFrameSize") + ); + /// The [VarHandle] of `intraFrameSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_intraFrameSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("intraFrameSize")); + /// The [VarHandle] of `predictiveFrameSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_predictiveFrameSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("predictiveFrameSize")); + /// The [VarHandle] of `bipredictiveFrameSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bipredictiveFrameSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bipredictiveFrameSize")); + + /// Creates `VkVideoEncodeAV1FrameSizeKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1FrameSizeKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1FrameSizeKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1FrameSizeKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1FrameSizeKHR(segment); } + + /// Creates `VkVideoEncodeAV1FrameSizeKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1FrameSizeKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1FrameSizeKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1FrameSizeKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1FrameSizeKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1FrameSizeKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1FrameSizeKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1FrameSizeKHR` + public static VkVideoEncodeAV1FrameSizeKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1FrameSizeKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1FrameSizeKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1FrameSizeKHR` + public static VkVideoEncodeAV1FrameSizeKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1FrameSizeKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `intraFrameSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_intraFrameSize(MemorySegment segment, long index) { return (int) VH_intraFrameSize.get(segment, 0L, index); } + /// {@return `intraFrameSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_intraFrameSize(MemorySegment segment) { return VkVideoEncodeAV1FrameSizeKHR.get_intraFrameSize(segment, 0L); } + /// {@return `intraFrameSize` at the given index} + /// @param index the index + public @CType("uint32_t") int intraFrameSizeAt(long index) { return VkVideoEncodeAV1FrameSizeKHR.get_intraFrameSize(this.segment(), index); } + /// {@return `intraFrameSize`} + public @CType("uint32_t") int intraFrameSize() { return VkVideoEncodeAV1FrameSizeKHR.get_intraFrameSize(this.segment()); } + /// Sets `intraFrameSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_intraFrameSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_intraFrameSize.set(segment, 0L, index, value); } + /// Sets `intraFrameSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_intraFrameSize(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1FrameSizeKHR.set_intraFrameSize(segment, 0L, value); } + /// Sets `intraFrameSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1FrameSizeKHR intraFrameSizeAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1FrameSizeKHR.set_intraFrameSize(this.segment(), index, value); return this; } + /// Sets `intraFrameSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1FrameSizeKHR intraFrameSize(@CType("uint32_t") int value) { VkVideoEncodeAV1FrameSizeKHR.set_intraFrameSize(this.segment(), value); return this; } + + /// {@return `predictiveFrameSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_predictiveFrameSize(MemorySegment segment, long index) { return (int) VH_predictiveFrameSize.get(segment, 0L, index); } + /// {@return `predictiveFrameSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_predictiveFrameSize(MemorySegment segment) { return VkVideoEncodeAV1FrameSizeKHR.get_predictiveFrameSize(segment, 0L); } + /// {@return `predictiveFrameSize` at the given index} + /// @param index the index + public @CType("uint32_t") int predictiveFrameSizeAt(long index) { return VkVideoEncodeAV1FrameSizeKHR.get_predictiveFrameSize(this.segment(), index); } + /// {@return `predictiveFrameSize`} + public @CType("uint32_t") int predictiveFrameSize() { return VkVideoEncodeAV1FrameSizeKHR.get_predictiveFrameSize(this.segment()); } + /// Sets `predictiveFrameSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_predictiveFrameSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_predictiveFrameSize.set(segment, 0L, index, value); } + /// Sets `predictiveFrameSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_predictiveFrameSize(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1FrameSizeKHR.set_predictiveFrameSize(segment, 0L, value); } + /// Sets `predictiveFrameSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1FrameSizeKHR predictiveFrameSizeAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1FrameSizeKHR.set_predictiveFrameSize(this.segment(), index, value); return this; } + /// Sets `predictiveFrameSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1FrameSizeKHR predictiveFrameSize(@CType("uint32_t") int value) { VkVideoEncodeAV1FrameSizeKHR.set_predictiveFrameSize(this.segment(), value); return this; } + + /// {@return `bipredictiveFrameSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bipredictiveFrameSize(MemorySegment segment, long index) { return (int) VH_bipredictiveFrameSize.get(segment, 0L, index); } + /// {@return `bipredictiveFrameSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bipredictiveFrameSize(MemorySegment segment) { return VkVideoEncodeAV1FrameSizeKHR.get_bipredictiveFrameSize(segment, 0L); } + /// {@return `bipredictiveFrameSize` at the given index} + /// @param index the index + public @CType("uint32_t") int bipredictiveFrameSizeAt(long index) { return VkVideoEncodeAV1FrameSizeKHR.get_bipredictiveFrameSize(this.segment(), index); } + /// {@return `bipredictiveFrameSize`} + public @CType("uint32_t") int bipredictiveFrameSize() { return VkVideoEncodeAV1FrameSizeKHR.get_bipredictiveFrameSize(this.segment()); } + /// Sets `bipredictiveFrameSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bipredictiveFrameSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bipredictiveFrameSize.set(segment, 0L, index, value); } + /// Sets `bipredictiveFrameSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bipredictiveFrameSize(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1FrameSizeKHR.set_bipredictiveFrameSize(segment, 0L, value); } + /// Sets `bipredictiveFrameSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1FrameSizeKHR bipredictiveFrameSizeAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1FrameSizeKHR.set_bipredictiveFrameSize(this.segment(), index, value); return this; } + /// Sets `bipredictiveFrameSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1FrameSizeKHR bipredictiveFrameSize(@CType("uint32_t") int value) { VkVideoEncodeAV1FrameSizeKHR.set_bipredictiveFrameSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1GopRemainingFrameInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1GopRemainingFrameInfoKHR.java new file mode 100644 index 00000000..9fd44888 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1GopRemainingFrameInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### useGopRemainingFrames +/// [VarHandle][#VH_useGopRemainingFrames] - [Getter][#useGopRemainingFrames()] - [Setter][#useGopRemainingFrames(int)] +/// ### gopRemainingIntra +/// [VarHandle][#VH_gopRemainingIntra] - [Getter][#gopRemainingIntra()] - [Setter][#gopRemainingIntra(int)] +/// ### gopRemainingPredictive +/// [VarHandle][#VH_gopRemainingPredictive] - [Getter][#gopRemainingPredictive()] - [Setter][#gopRemainingPredictive(int)] +/// ### gopRemainingBipredictive +/// [VarHandle][#VH_gopRemainingBipredictive] - [Getter][#gopRemainingBipredictive()] - [Setter][#gopRemainingBipredictive(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1GopRemainingFrameInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 useGopRemainingFrames; +/// uint32_t gopRemainingIntra; +/// uint32_t gopRemainingPredictive; +/// uint32_t gopRemainingBipredictive; +/// } VkVideoEncodeAV1GopRemainingFrameInfoKHR; +/// ``` +public final class VkVideoEncodeAV1GopRemainingFrameInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1GopRemainingFrameInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("useGopRemainingFrames"), + ValueLayout.JAVA_INT.withName("gopRemainingIntra"), + ValueLayout.JAVA_INT.withName("gopRemainingPredictive"), + ValueLayout.JAVA_INT.withName("gopRemainingBipredictive") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `useGopRemainingFrames` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useGopRemainingFrames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useGopRemainingFrames")); + /// The [VarHandle] of `gopRemainingIntra` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopRemainingIntra = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopRemainingIntra")); + /// The [VarHandle] of `gopRemainingPredictive` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopRemainingPredictive = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopRemainingPredictive")); + /// The [VarHandle] of `gopRemainingBipredictive` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopRemainingBipredictive = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopRemainingBipredictive")); + + /// Creates `VkVideoEncodeAV1GopRemainingFrameInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1GopRemainingFrameInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1GopRemainingFrameInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1GopRemainingFrameInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1GopRemainingFrameInfoKHR(segment); } + + /// Creates `VkVideoEncodeAV1GopRemainingFrameInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1GopRemainingFrameInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1GopRemainingFrameInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1GopRemainingFrameInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1GopRemainingFrameInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1GopRemainingFrameInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1GopRemainingFrameInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1GopRemainingFrameInfoKHR` + public static VkVideoEncodeAV1GopRemainingFrameInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1GopRemainingFrameInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1GopRemainingFrameInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1GopRemainingFrameInfoKHR` + public static VkVideoEncodeAV1GopRemainingFrameInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1GopRemainingFrameInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `useGopRemainingFrames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useGopRemainingFrames(MemorySegment segment, long index) { return (int) VH_useGopRemainingFrames.get(segment, 0L, index); } + /// {@return `useGopRemainingFrames`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useGopRemainingFrames(MemorySegment segment) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_useGopRemainingFrames(segment, 0L); } + /// {@return `useGopRemainingFrames` at the given index} + /// @param index the index + public @CType("VkBool32") int useGopRemainingFramesAt(long index) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_useGopRemainingFrames(this.segment(), index); } + /// {@return `useGopRemainingFrames`} + public @CType("VkBool32") int useGopRemainingFrames() { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_useGopRemainingFrames(this.segment()); } + /// Sets `useGopRemainingFrames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useGopRemainingFrames(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useGopRemainingFrames.set(segment, 0L, index, value); } + /// Sets `useGopRemainingFrames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useGopRemainingFrames(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_useGopRemainingFrames(segment, 0L, value); } + /// Sets `useGopRemainingFrames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR useGopRemainingFramesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_useGopRemainingFrames(this.segment(), index, value); return this; } + /// Sets `useGopRemainingFrames` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR useGopRemainingFrames(@CType("VkBool32") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_useGopRemainingFrames(this.segment(), value); return this; } + + /// {@return `gopRemainingIntra` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopRemainingIntra(MemorySegment segment, long index) { return (int) VH_gopRemainingIntra.get(segment, 0L, index); } + /// {@return `gopRemainingIntra`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopRemainingIntra(MemorySegment segment) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_gopRemainingIntra(segment, 0L); } + /// {@return `gopRemainingIntra` at the given index} + /// @param index the index + public @CType("uint32_t") int gopRemainingIntraAt(long index) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_gopRemainingIntra(this.segment(), index); } + /// {@return `gopRemainingIntra`} + public @CType("uint32_t") int gopRemainingIntra() { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_gopRemainingIntra(this.segment()); } + /// Sets `gopRemainingIntra` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopRemainingIntra(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopRemainingIntra.set(segment, 0L, index, value); } + /// Sets `gopRemainingIntra` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopRemainingIntra(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_gopRemainingIntra(segment, 0L, value); } + /// Sets `gopRemainingIntra` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR gopRemainingIntraAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_gopRemainingIntra(this.segment(), index, value); return this; } + /// Sets `gopRemainingIntra` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR gopRemainingIntra(@CType("uint32_t") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_gopRemainingIntra(this.segment(), value); return this; } + + /// {@return `gopRemainingPredictive` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopRemainingPredictive(MemorySegment segment, long index) { return (int) VH_gopRemainingPredictive.get(segment, 0L, index); } + /// {@return `gopRemainingPredictive`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopRemainingPredictive(MemorySegment segment) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_gopRemainingPredictive(segment, 0L); } + /// {@return `gopRemainingPredictive` at the given index} + /// @param index the index + public @CType("uint32_t") int gopRemainingPredictiveAt(long index) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_gopRemainingPredictive(this.segment(), index); } + /// {@return `gopRemainingPredictive`} + public @CType("uint32_t") int gopRemainingPredictive() { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_gopRemainingPredictive(this.segment()); } + /// Sets `gopRemainingPredictive` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopRemainingPredictive(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopRemainingPredictive.set(segment, 0L, index, value); } + /// Sets `gopRemainingPredictive` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopRemainingPredictive(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_gopRemainingPredictive(segment, 0L, value); } + /// Sets `gopRemainingPredictive` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR gopRemainingPredictiveAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_gopRemainingPredictive(this.segment(), index, value); return this; } + /// Sets `gopRemainingPredictive` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR gopRemainingPredictive(@CType("uint32_t") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_gopRemainingPredictive(this.segment(), value); return this; } + + /// {@return `gopRemainingBipredictive` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopRemainingBipredictive(MemorySegment segment, long index) { return (int) VH_gopRemainingBipredictive.get(segment, 0L, index); } + /// {@return `gopRemainingBipredictive`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopRemainingBipredictive(MemorySegment segment) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_gopRemainingBipredictive(segment, 0L); } + /// {@return `gopRemainingBipredictive` at the given index} + /// @param index the index + public @CType("uint32_t") int gopRemainingBipredictiveAt(long index) { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_gopRemainingBipredictive(this.segment(), index); } + /// {@return `gopRemainingBipredictive`} + public @CType("uint32_t") int gopRemainingBipredictive() { return VkVideoEncodeAV1GopRemainingFrameInfoKHR.get_gopRemainingBipredictive(this.segment()); } + /// Sets `gopRemainingBipredictive` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopRemainingBipredictive(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopRemainingBipredictive.set(segment, 0L, index, value); } + /// Sets `gopRemainingBipredictive` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopRemainingBipredictive(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_gopRemainingBipredictive(segment, 0L, value); } + /// Sets `gopRemainingBipredictive` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR gopRemainingBipredictiveAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_gopRemainingBipredictive(this.segment(), index, value); return this; } + /// Sets `gopRemainingBipredictive` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1GopRemainingFrameInfoKHR gopRemainingBipredictive(@CType("uint32_t") int value) { VkVideoEncodeAV1GopRemainingFrameInfoKHR.set_gopRemainingBipredictive(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1PictureInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1PictureInfoKHR.java new file mode 100644 index 00000000..e6ecb989 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1PictureInfoKHR.java @@ -0,0 +1,424 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.khr.VKKHRVideoDecodeAv1.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### predictionMode +/// [VarHandle][#VH_predictionMode] - [Getter][#predictionMode()] - [Setter][#predictionMode(int)] +/// ### rateControlGroup +/// [VarHandle][#VH_rateControlGroup] - [Getter][#rateControlGroup()] - [Setter][#rateControlGroup(int)] +/// ### constantQIndex +/// [VarHandle][#VH_constantQIndex] - [Getter][#constantQIndex()] - [Setter][#constantQIndex(int)] +/// ### pStdPictureInfo +/// [VarHandle][#VH_pStdPictureInfo] - [Getter][#pStdPictureInfo()] - [Setter][#pStdPictureInfo(java.lang.foreign.MemorySegment)] +/// ### referenceNameSlotIndices +/// [Byte offset handle][#MH_referenceNameSlotIndices] - [Memory layout][#ML_referenceNameSlotIndices] - [Getter][#referenceNameSlotIndices(long)] - [Setter][#referenceNameSlotIndices(long, java.lang.foreign.MemorySegment)] +/// ### primaryReferenceCdfOnly +/// [VarHandle][#VH_primaryReferenceCdfOnly] - [Getter][#primaryReferenceCdfOnly()] - [Setter][#primaryReferenceCdfOnly(int)] +/// ### generateObuExtensionHeader +/// [VarHandle][#VH_generateObuExtensionHeader] - [Getter][#generateObuExtensionHeader()] - [Setter][#generateObuExtensionHeader(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1PictureInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoEncodeAV1PredictionModeKHR predictionMode; +/// VkVideoEncodeAV1RateControlGroupKHR rateControlGroup; +/// uint32_t constantQIndex; +/// const StdVideoEncodeAV1PictureInfo * pStdPictureInfo; +/// int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR] referenceNameSlotIndices; +/// VkBool32 primaryReferenceCdfOnly; +/// VkBool32 generateObuExtensionHeader; +/// } VkVideoEncodeAV1PictureInfoKHR; +/// ``` +public final class VkVideoEncodeAV1PictureInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1PictureInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("predictionMode"), + ValueLayout.JAVA_INT.withName("rateControlGroup"), + ValueLayout.JAVA_INT.withName("constantQIndex"), + ValueLayout.ADDRESS.withName("pStdPictureInfo"), + MemoryLayout.sequenceLayout(VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR, ValueLayout.JAVA_INT).withName("referenceNameSlotIndices"), + ValueLayout.JAVA_INT.withName("primaryReferenceCdfOnly"), + ValueLayout.JAVA_INT.withName("generateObuExtensionHeader") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `predictionMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_predictionMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("predictionMode")); + /// The [VarHandle] of `rateControlGroup` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rateControlGroup = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rateControlGroup")); + /// The [VarHandle] of `constantQIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constantQIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constantQIndex")); + /// The [VarHandle] of `pStdPictureInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdPictureInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdPictureInfo")); + /// The byte offset handle of `referenceNameSlotIndices` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_referenceNameSlotIndices = LAYOUT.byteOffsetHandle(PathElement.groupElement("referenceNameSlotIndices"), PathElement.sequenceElement()); + /// The memory layout of `referenceNameSlotIndices`. + public static final MemoryLayout ML_referenceNameSlotIndices = LAYOUT.select(PathElement.groupElement("referenceNameSlotIndices")); + /// The [VarHandle] of `primaryReferenceCdfOnly` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primaryReferenceCdfOnly = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primaryReferenceCdfOnly")); + /// The [VarHandle] of `generateObuExtensionHeader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_generateObuExtensionHeader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("generateObuExtensionHeader")); + + /// Creates `VkVideoEncodeAV1PictureInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1PictureInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1PictureInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1PictureInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1PictureInfoKHR(segment); } + + /// Creates `VkVideoEncodeAV1PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1PictureInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1PictureInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1PictureInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1PictureInfoKHR` + public static VkVideoEncodeAV1PictureInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1PictureInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1PictureInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1PictureInfoKHR` + public static VkVideoEncodeAV1PictureInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1PictureInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1PictureInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1PictureInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1PictureInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1PictureInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1PictureInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1PictureInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1PictureInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1PictureInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1PictureInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1PictureInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1PictureInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1PictureInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `predictionMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1PredictionModeKHR") int get_predictionMode(MemorySegment segment, long index) { return (int) VH_predictionMode.get(segment, 0L, index); } + /// {@return `predictionMode`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1PredictionModeKHR") int get_predictionMode(MemorySegment segment) { return VkVideoEncodeAV1PictureInfoKHR.get_predictionMode(segment, 0L); } + /// {@return `predictionMode` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1PredictionModeKHR") int predictionModeAt(long index) { return VkVideoEncodeAV1PictureInfoKHR.get_predictionMode(this.segment(), index); } + /// {@return `predictionMode`} + public @CType("VkVideoEncodeAV1PredictionModeKHR") int predictionMode() { return VkVideoEncodeAV1PictureInfoKHR.get_predictionMode(this.segment()); } + /// Sets `predictionMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_predictionMode(MemorySegment segment, long index, @CType("VkVideoEncodeAV1PredictionModeKHR") int value) { VH_predictionMode.set(segment, 0L, index, value); } + /// Sets `predictionMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_predictionMode(MemorySegment segment, @CType("VkVideoEncodeAV1PredictionModeKHR") int value) { VkVideoEncodeAV1PictureInfoKHR.set_predictionMode(segment, 0L, value); } + /// Sets `predictionMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR predictionModeAt(long index, @CType("VkVideoEncodeAV1PredictionModeKHR") int value) { VkVideoEncodeAV1PictureInfoKHR.set_predictionMode(this.segment(), index, value); return this; } + /// Sets `predictionMode` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR predictionMode(@CType("VkVideoEncodeAV1PredictionModeKHR") int value) { VkVideoEncodeAV1PictureInfoKHR.set_predictionMode(this.segment(), value); return this; } + + /// {@return `rateControlGroup` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1RateControlGroupKHR") int get_rateControlGroup(MemorySegment segment, long index) { return (int) VH_rateControlGroup.get(segment, 0L, index); } + /// {@return `rateControlGroup`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1RateControlGroupKHR") int get_rateControlGroup(MemorySegment segment) { return VkVideoEncodeAV1PictureInfoKHR.get_rateControlGroup(segment, 0L); } + /// {@return `rateControlGroup` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1RateControlGroupKHR") int rateControlGroupAt(long index) { return VkVideoEncodeAV1PictureInfoKHR.get_rateControlGroup(this.segment(), index); } + /// {@return `rateControlGroup`} + public @CType("VkVideoEncodeAV1RateControlGroupKHR") int rateControlGroup() { return VkVideoEncodeAV1PictureInfoKHR.get_rateControlGroup(this.segment()); } + /// Sets `rateControlGroup` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rateControlGroup(MemorySegment segment, long index, @CType("VkVideoEncodeAV1RateControlGroupKHR") int value) { VH_rateControlGroup.set(segment, 0L, index, value); } + /// Sets `rateControlGroup` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rateControlGroup(MemorySegment segment, @CType("VkVideoEncodeAV1RateControlGroupKHR") int value) { VkVideoEncodeAV1PictureInfoKHR.set_rateControlGroup(segment, 0L, value); } + /// Sets `rateControlGroup` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR rateControlGroupAt(long index, @CType("VkVideoEncodeAV1RateControlGroupKHR") int value) { VkVideoEncodeAV1PictureInfoKHR.set_rateControlGroup(this.segment(), index, value); return this; } + /// Sets `rateControlGroup` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR rateControlGroup(@CType("VkVideoEncodeAV1RateControlGroupKHR") int value) { VkVideoEncodeAV1PictureInfoKHR.set_rateControlGroup(this.segment(), value); return this; } + + /// {@return `constantQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_constantQIndex(MemorySegment segment, long index) { return (int) VH_constantQIndex.get(segment, 0L, index); } + /// {@return `constantQIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_constantQIndex(MemorySegment segment) { return VkVideoEncodeAV1PictureInfoKHR.get_constantQIndex(segment, 0L); } + /// {@return `constantQIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int constantQIndexAt(long index) { return VkVideoEncodeAV1PictureInfoKHR.get_constantQIndex(this.segment(), index); } + /// {@return `constantQIndex`} + public @CType("uint32_t") int constantQIndex() { return VkVideoEncodeAV1PictureInfoKHR.get_constantQIndex(this.segment()); } + /// Sets `constantQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constantQIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_constantQIndex.set(segment, 0L, index, value); } + /// Sets `constantQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constantQIndex(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1PictureInfoKHR.set_constantQIndex(segment, 0L, value); } + /// Sets `constantQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR constantQIndexAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1PictureInfoKHR.set_constantQIndex(this.segment(), index, value); return this; } + /// Sets `constantQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR constantQIndex(@CType("uint32_t") int value) { VkVideoEncodeAV1PictureInfoKHR.set_constantQIndex(this.segment(), value); return this; } + + /// {@return `pStdPictureInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeAV1PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdPictureInfo.get(segment, 0L, index); } + /// {@return `pStdPictureInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeAV1PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment) { return VkVideoEncodeAV1PictureInfoKHR.get_pStdPictureInfo(segment, 0L); } + /// {@return `pStdPictureInfo` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeAV1PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfoAt(long index) { return VkVideoEncodeAV1PictureInfoKHR.get_pStdPictureInfo(this.segment(), index); } + /// {@return `pStdPictureInfo`} + public @CType("const StdVideoEncodeAV1PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfo() { return VkVideoEncodeAV1PictureInfoKHR.get_pStdPictureInfo(this.segment()); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, long index, @CType("const StdVideoEncodeAV1PictureInfo *") java.lang.foreign.MemorySegment value) { VH_pStdPictureInfo.set(segment, 0L, index, value); } + /// Sets `pStdPictureInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, @CType("const StdVideoEncodeAV1PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1PictureInfoKHR.set_pStdPictureInfo(segment, 0L, value); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR pStdPictureInfoAt(long index, @CType("const StdVideoEncodeAV1PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1PictureInfoKHR.set_pStdPictureInfo(this.segment(), index, value); return this; } + /// Sets `pStdPictureInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR pStdPictureInfo(@CType("const StdVideoEncodeAV1PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1PictureInfoKHR.set_pStdPictureInfo(this.segment(), value); return this; } + + /// {@return `referenceNameSlotIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment get_referenceNameSlotIndices(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_referenceNameSlotIndices.invokeExact(0L, elementIndex), index), ML_referenceNameSlotIndices); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `referenceNameSlotIndices`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment get_referenceNameSlotIndices(MemorySegment segment, long elementIndex) { return VkVideoEncodeAV1PictureInfoKHR.get_referenceNameSlotIndices(segment, 0L, elementIndex); } + /// {@return `referenceNameSlotIndices` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment referenceNameSlotIndicesAt(long index, long elementIndex) { return VkVideoEncodeAV1PictureInfoKHR.get_referenceNameSlotIndices(this.segment(), index, elementIndex); } + /// {@return `referenceNameSlotIndices`} + /// @param elementIndex the index of the element + public @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment referenceNameSlotIndices(long elementIndex) { return VkVideoEncodeAV1PictureInfoKHR.get_referenceNameSlotIndices(this.segment(), elementIndex); } + /// Sets `referenceNameSlotIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_referenceNameSlotIndices(MemorySegment segment, long index, long elementIndex, @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_referenceNameSlotIndices.invokeExact(0L, elementIndex), index), ML_referenceNameSlotIndices.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `referenceNameSlotIndices` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_referenceNameSlotIndices(MemorySegment segment, long elementIndex, @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1PictureInfoKHR.set_referenceNameSlotIndices(segment, 0L, elementIndex, value); } + /// Sets `referenceNameSlotIndices` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR referenceNameSlotIndicesAt(long index, long elementIndex, @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1PictureInfoKHR.set_referenceNameSlotIndices(this.segment(), index, elementIndex, value); return this; } + /// Sets `referenceNameSlotIndices` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR referenceNameSlotIndices(long elementIndex, @CType("int32_t[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1PictureInfoKHR.set_referenceNameSlotIndices(this.segment(), elementIndex, value); return this; } + + /// {@return `primaryReferenceCdfOnly` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primaryReferenceCdfOnly(MemorySegment segment, long index) { return (int) VH_primaryReferenceCdfOnly.get(segment, 0L, index); } + /// {@return `primaryReferenceCdfOnly`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primaryReferenceCdfOnly(MemorySegment segment) { return VkVideoEncodeAV1PictureInfoKHR.get_primaryReferenceCdfOnly(segment, 0L); } + /// {@return `primaryReferenceCdfOnly` at the given index} + /// @param index the index + public @CType("VkBool32") int primaryReferenceCdfOnlyAt(long index) { return VkVideoEncodeAV1PictureInfoKHR.get_primaryReferenceCdfOnly(this.segment(), index); } + /// {@return `primaryReferenceCdfOnly`} + public @CType("VkBool32") int primaryReferenceCdfOnly() { return VkVideoEncodeAV1PictureInfoKHR.get_primaryReferenceCdfOnly(this.segment()); } + /// Sets `primaryReferenceCdfOnly` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primaryReferenceCdfOnly(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primaryReferenceCdfOnly.set(segment, 0L, index, value); } + /// Sets `primaryReferenceCdfOnly` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primaryReferenceCdfOnly(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeAV1PictureInfoKHR.set_primaryReferenceCdfOnly(segment, 0L, value); } + /// Sets `primaryReferenceCdfOnly` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR primaryReferenceCdfOnlyAt(long index, @CType("VkBool32") int value) { VkVideoEncodeAV1PictureInfoKHR.set_primaryReferenceCdfOnly(this.segment(), index, value); return this; } + /// Sets `primaryReferenceCdfOnly` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR primaryReferenceCdfOnly(@CType("VkBool32") int value) { VkVideoEncodeAV1PictureInfoKHR.set_primaryReferenceCdfOnly(this.segment(), value); return this; } + + /// {@return `generateObuExtensionHeader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_generateObuExtensionHeader(MemorySegment segment, long index) { return (int) VH_generateObuExtensionHeader.get(segment, 0L, index); } + /// {@return `generateObuExtensionHeader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_generateObuExtensionHeader(MemorySegment segment) { return VkVideoEncodeAV1PictureInfoKHR.get_generateObuExtensionHeader(segment, 0L); } + /// {@return `generateObuExtensionHeader` at the given index} + /// @param index the index + public @CType("VkBool32") int generateObuExtensionHeaderAt(long index) { return VkVideoEncodeAV1PictureInfoKHR.get_generateObuExtensionHeader(this.segment(), index); } + /// {@return `generateObuExtensionHeader`} + public @CType("VkBool32") int generateObuExtensionHeader() { return VkVideoEncodeAV1PictureInfoKHR.get_generateObuExtensionHeader(this.segment()); } + /// Sets `generateObuExtensionHeader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_generateObuExtensionHeader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_generateObuExtensionHeader.set(segment, 0L, index, value); } + /// Sets `generateObuExtensionHeader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_generateObuExtensionHeader(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeAV1PictureInfoKHR.set_generateObuExtensionHeader(segment, 0L, value); } + /// Sets `generateObuExtensionHeader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR generateObuExtensionHeaderAt(long index, @CType("VkBool32") int value) { VkVideoEncodeAV1PictureInfoKHR.set_generateObuExtensionHeader(this.segment(), index, value); return this; } + /// Sets `generateObuExtensionHeader` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1PictureInfoKHR generateObuExtensionHeader(@CType("VkBool32") int value) { VkVideoEncodeAV1PictureInfoKHR.set_generateObuExtensionHeader(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1ProfileInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1ProfileInfoKHR.java new file mode 100644 index 00000000..e5299eb9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1ProfileInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stdProfile +/// [VarHandle][#VH_stdProfile] - [Getter][#stdProfile()] - [Setter][#stdProfile(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1ProfileInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// StdVideoAV1Profile stdProfile; +/// } VkVideoEncodeAV1ProfileInfoKHR; +/// ``` +public final class VkVideoEncodeAV1ProfileInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1ProfileInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stdProfile") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stdProfile` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdProfile = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdProfile")); + + /// Creates `VkVideoEncodeAV1ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1ProfileInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1ProfileInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1ProfileInfoKHR(segment); } + + /// Creates `VkVideoEncodeAV1ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1ProfileInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1ProfileInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1ProfileInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1ProfileInfoKHR` + public static VkVideoEncodeAV1ProfileInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1ProfileInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1ProfileInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1ProfileInfoKHR` + public static VkVideoEncodeAV1ProfileInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1ProfileInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1ProfileInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1ProfileInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1ProfileInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1ProfileInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1ProfileInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1ProfileInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1ProfileInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1ProfileInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1ProfileInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1ProfileInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1ProfileInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1ProfileInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1ProfileInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1ProfileInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1ProfileInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1ProfileInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stdProfile` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1Profile") int get_stdProfile(MemorySegment segment, long index) { return (int) VH_stdProfile.get(segment, 0L, index); } + /// {@return `stdProfile`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1Profile") int get_stdProfile(MemorySegment segment) { return VkVideoEncodeAV1ProfileInfoKHR.get_stdProfile(segment, 0L); } + /// {@return `stdProfile` at the given index} + /// @param index the index + public @CType("StdVideoAV1Profile") int stdProfileAt(long index) { return VkVideoEncodeAV1ProfileInfoKHR.get_stdProfile(this.segment(), index); } + /// {@return `stdProfile`} + public @CType("StdVideoAV1Profile") int stdProfile() { return VkVideoEncodeAV1ProfileInfoKHR.get_stdProfile(this.segment()); } + /// Sets `stdProfile` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdProfile(MemorySegment segment, long index, @CType("StdVideoAV1Profile") int value) { VH_stdProfile.set(segment, 0L, index, value); } + /// Sets `stdProfile` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdProfile(MemorySegment segment, @CType("StdVideoAV1Profile") int value) { VkVideoEncodeAV1ProfileInfoKHR.set_stdProfile(segment, 0L, value); } + /// Sets `stdProfile` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1ProfileInfoKHR stdProfileAt(long index, @CType("StdVideoAV1Profile") int value) { VkVideoEncodeAV1ProfileInfoKHR.set_stdProfile(this.segment(), index, value); return this; } + /// Sets `stdProfile` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1ProfileInfoKHR stdProfile(@CType("StdVideoAV1Profile") int value) { VkVideoEncodeAV1ProfileInfoKHR.set_stdProfile(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1QIndexKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1QIndexKHR.java new file mode 100644 index 00000000..965722e7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1QIndexKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### intraQIndex +/// [VarHandle][#VH_intraQIndex] - [Getter][#intraQIndex()] - [Setter][#intraQIndex(int)] +/// ### predictiveQIndex +/// [VarHandle][#VH_predictiveQIndex] - [Getter][#predictiveQIndex()] - [Setter][#predictiveQIndex(int)] +/// ### bipredictiveQIndex +/// [VarHandle][#VH_bipredictiveQIndex] - [Getter][#bipredictiveQIndex()] - [Setter][#bipredictiveQIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1QIndexKHR { +/// uint32_t intraQIndex; +/// uint32_t predictiveQIndex; +/// uint32_t bipredictiveQIndex; +/// } VkVideoEncodeAV1QIndexKHR; +/// ``` +public final class VkVideoEncodeAV1QIndexKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1QIndexKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("intraQIndex"), + ValueLayout.JAVA_INT.withName("predictiveQIndex"), + ValueLayout.JAVA_INT.withName("bipredictiveQIndex") + ); + /// The [VarHandle] of `intraQIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_intraQIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("intraQIndex")); + /// The [VarHandle] of `predictiveQIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_predictiveQIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("predictiveQIndex")); + /// The [VarHandle] of `bipredictiveQIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bipredictiveQIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bipredictiveQIndex")); + + /// Creates `VkVideoEncodeAV1QIndexKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1QIndexKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1QIndexKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1QIndexKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1QIndexKHR(segment); } + + /// Creates `VkVideoEncodeAV1QIndexKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1QIndexKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1QIndexKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1QIndexKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1QIndexKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1QIndexKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1QIndexKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1QIndexKHR` + public static VkVideoEncodeAV1QIndexKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1QIndexKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1QIndexKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1QIndexKHR` + public static VkVideoEncodeAV1QIndexKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1QIndexKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `intraQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_intraQIndex(MemorySegment segment, long index) { return (int) VH_intraQIndex.get(segment, 0L, index); } + /// {@return `intraQIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_intraQIndex(MemorySegment segment) { return VkVideoEncodeAV1QIndexKHR.get_intraQIndex(segment, 0L); } + /// {@return `intraQIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int intraQIndexAt(long index) { return VkVideoEncodeAV1QIndexKHR.get_intraQIndex(this.segment(), index); } + /// {@return `intraQIndex`} + public @CType("uint32_t") int intraQIndex() { return VkVideoEncodeAV1QIndexKHR.get_intraQIndex(this.segment()); } + /// Sets `intraQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_intraQIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_intraQIndex.set(segment, 0L, index, value); } + /// Sets `intraQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_intraQIndex(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QIndexKHR.set_intraQIndex(segment, 0L, value); } + /// Sets `intraQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QIndexKHR intraQIndexAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QIndexKHR.set_intraQIndex(this.segment(), index, value); return this; } + /// Sets `intraQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QIndexKHR intraQIndex(@CType("uint32_t") int value) { VkVideoEncodeAV1QIndexKHR.set_intraQIndex(this.segment(), value); return this; } + + /// {@return `predictiveQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_predictiveQIndex(MemorySegment segment, long index) { return (int) VH_predictiveQIndex.get(segment, 0L, index); } + /// {@return `predictiveQIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_predictiveQIndex(MemorySegment segment) { return VkVideoEncodeAV1QIndexKHR.get_predictiveQIndex(segment, 0L); } + /// {@return `predictiveQIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int predictiveQIndexAt(long index) { return VkVideoEncodeAV1QIndexKHR.get_predictiveQIndex(this.segment(), index); } + /// {@return `predictiveQIndex`} + public @CType("uint32_t") int predictiveQIndex() { return VkVideoEncodeAV1QIndexKHR.get_predictiveQIndex(this.segment()); } + /// Sets `predictiveQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_predictiveQIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_predictiveQIndex.set(segment, 0L, index, value); } + /// Sets `predictiveQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_predictiveQIndex(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QIndexKHR.set_predictiveQIndex(segment, 0L, value); } + /// Sets `predictiveQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QIndexKHR predictiveQIndexAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QIndexKHR.set_predictiveQIndex(this.segment(), index, value); return this; } + /// Sets `predictiveQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QIndexKHR predictiveQIndex(@CType("uint32_t") int value) { VkVideoEncodeAV1QIndexKHR.set_predictiveQIndex(this.segment(), value); return this; } + + /// {@return `bipredictiveQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bipredictiveQIndex(MemorySegment segment, long index) { return (int) VH_bipredictiveQIndex.get(segment, 0L, index); } + /// {@return `bipredictiveQIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bipredictiveQIndex(MemorySegment segment) { return VkVideoEncodeAV1QIndexKHR.get_bipredictiveQIndex(segment, 0L); } + /// {@return `bipredictiveQIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int bipredictiveQIndexAt(long index) { return VkVideoEncodeAV1QIndexKHR.get_bipredictiveQIndex(this.segment(), index); } + /// {@return `bipredictiveQIndex`} + public @CType("uint32_t") int bipredictiveQIndex() { return VkVideoEncodeAV1QIndexKHR.get_bipredictiveQIndex(this.segment()); } + /// Sets `bipredictiveQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bipredictiveQIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bipredictiveQIndex.set(segment, 0L, index, value); } + /// Sets `bipredictiveQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bipredictiveQIndex(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QIndexKHR.set_bipredictiveQIndex(segment, 0L, value); } + /// Sets `bipredictiveQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QIndexKHR bipredictiveQIndexAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QIndexKHR.set_bipredictiveQIndex(this.segment(), index, value); return this; } + /// Sets `bipredictiveQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QIndexKHR bipredictiveQIndex(@CType("uint32_t") int value) { VkVideoEncodeAV1QIndexKHR.set_bipredictiveQIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1QualityLevelPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1QualityLevelPropertiesKHR.java new file mode 100644 index 00000000..66a7884b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1QualityLevelPropertiesKHR.java @@ -0,0 +1,705 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### preferredRateControlFlags +/// [VarHandle][#VH_preferredRateControlFlags] - [Getter][#preferredRateControlFlags()] - [Setter][#preferredRateControlFlags(int)] +/// ### preferredGopFrameCount +/// [VarHandle][#VH_preferredGopFrameCount] - [Getter][#preferredGopFrameCount()] - [Setter][#preferredGopFrameCount(int)] +/// ### preferredKeyFramePeriod +/// [VarHandle][#VH_preferredKeyFramePeriod] - [Getter][#preferredKeyFramePeriod()] - [Setter][#preferredKeyFramePeriod(int)] +/// ### preferredConsecutiveBipredictiveFrameCount +/// [VarHandle][#VH_preferredConsecutiveBipredictiveFrameCount] - [Getter][#preferredConsecutiveBipredictiveFrameCount()] - [Setter][#preferredConsecutiveBipredictiveFrameCount(int)] +/// ### preferredTemporalLayerCount +/// [VarHandle][#VH_preferredTemporalLayerCount] - [Getter][#preferredTemporalLayerCount()] - [Setter][#preferredTemporalLayerCount(int)] +/// ### preferredConstantQIndex +/// [Byte offset][#OFFSET_preferredConstantQIndex] - [Memory layout][#ML_preferredConstantQIndex] - [Getter][#preferredConstantQIndex()] - [Setter][#preferredConstantQIndex(java.lang.foreign.MemorySegment)] +/// ### preferredMaxSingleReferenceCount +/// [VarHandle][#VH_preferredMaxSingleReferenceCount] - [Getter][#preferredMaxSingleReferenceCount()] - [Setter][#preferredMaxSingleReferenceCount(int)] +/// ### preferredSingleReferenceNameMask +/// [VarHandle][#VH_preferredSingleReferenceNameMask] - [Getter][#preferredSingleReferenceNameMask()] - [Setter][#preferredSingleReferenceNameMask(int)] +/// ### preferredMaxUnidirectionalCompoundReferenceCount +/// [VarHandle][#VH_preferredMaxUnidirectionalCompoundReferenceCount] - [Getter][#preferredMaxUnidirectionalCompoundReferenceCount()] - [Setter][#preferredMaxUnidirectionalCompoundReferenceCount(int)] +/// ### preferredMaxUnidirectionalCompoundGroup1ReferenceCount +/// [VarHandle][#VH_preferredMaxUnidirectionalCompoundGroup1ReferenceCount] - [Getter][#preferredMaxUnidirectionalCompoundGroup1ReferenceCount()] - [Setter][#preferredMaxUnidirectionalCompoundGroup1ReferenceCount(int)] +/// ### preferredUnidirectionalCompoundReferenceNameMask +/// [VarHandle][#VH_preferredUnidirectionalCompoundReferenceNameMask] - [Getter][#preferredUnidirectionalCompoundReferenceNameMask()] - [Setter][#preferredUnidirectionalCompoundReferenceNameMask(int)] +/// ### preferredMaxBidirectionalCompoundReferenceCount +/// [VarHandle][#VH_preferredMaxBidirectionalCompoundReferenceCount] - [Getter][#preferredMaxBidirectionalCompoundReferenceCount()] - [Setter][#preferredMaxBidirectionalCompoundReferenceCount(int)] +/// ### preferredMaxBidirectionalCompoundGroup1ReferenceCount +/// [VarHandle][#VH_preferredMaxBidirectionalCompoundGroup1ReferenceCount] - [Getter][#preferredMaxBidirectionalCompoundGroup1ReferenceCount()] - [Setter][#preferredMaxBidirectionalCompoundGroup1ReferenceCount(int)] +/// ### preferredMaxBidirectionalCompoundGroup2ReferenceCount +/// [VarHandle][#VH_preferredMaxBidirectionalCompoundGroup2ReferenceCount] - [Getter][#preferredMaxBidirectionalCompoundGroup2ReferenceCount()] - [Setter][#preferredMaxBidirectionalCompoundGroup2ReferenceCount(int)] +/// ### preferredBidirectionalCompoundReferenceNameMask +/// [VarHandle][#VH_preferredBidirectionalCompoundReferenceNameMask] - [Getter][#preferredBidirectionalCompoundReferenceNameMask()] - [Setter][#preferredBidirectionalCompoundReferenceNameMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1QualityLevelPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoEncodeAV1RateControlFlagsKHR preferredRateControlFlags; +/// uint32_t preferredGopFrameCount; +/// uint32_t preferredKeyFramePeriod; +/// uint32_t preferredConsecutiveBipredictiveFrameCount; +/// uint32_t preferredTemporalLayerCount; +/// VkVideoEncodeAV1QIndexKHR preferredConstantQIndex; +/// uint32_t preferredMaxSingleReferenceCount; +/// uint32_t preferredSingleReferenceNameMask; +/// uint32_t preferredMaxUnidirectionalCompoundReferenceCount; +/// uint32_t preferredMaxUnidirectionalCompoundGroup1ReferenceCount; +/// uint32_t preferredUnidirectionalCompoundReferenceNameMask; +/// uint32_t preferredMaxBidirectionalCompoundReferenceCount; +/// uint32_t preferredMaxBidirectionalCompoundGroup1ReferenceCount; +/// uint32_t preferredMaxBidirectionalCompoundGroup2ReferenceCount; +/// uint32_t preferredBidirectionalCompoundReferenceNameMask; +/// } VkVideoEncodeAV1QualityLevelPropertiesKHR; +/// ``` +public final class VkVideoEncodeAV1QualityLevelPropertiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1QualityLevelPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("preferredRateControlFlags"), + ValueLayout.JAVA_INT.withName("preferredGopFrameCount"), + ValueLayout.JAVA_INT.withName("preferredKeyFramePeriod"), + ValueLayout.JAVA_INT.withName("preferredConsecutiveBipredictiveFrameCount"), + ValueLayout.JAVA_INT.withName("preferredTemporalLayerCount"), + overrungl.vulkan.khr.struct.VkVideoEncodeAV1QIndexKHR.LAYOUT.withName("preferredConstantQIndex"), + ValueLayout.JAVA_INT.withName("preferredMaxSingleReferenceCount"), + ValueLayout.JAVA_INT.withName("preferredSingleReferenceNameMask"), + ValueLayout.JAVA_INT.withName("preferredMaxUnidirectionalCompoundReferenceCount"), + ValueLayout.JAVA_INT.withName("preferredMaxUnidirectionalCompoundGroup1ReferenceCount"), + ValueLayout.JAVA_INT.withName("preferredUnidirectionalCompoundReferenceNameMask"), + ValueLayout.JAVA_INT.withName("preferredMaxBidirectionalCompoundReferenceCount"), + ValueLayout.JAVA_INT.withName("preferredMaxBidirectionalCompoundGroup1ReferenceCount"), + ValueLayout.JAVA_INT.withName("preferredMaxBidirectionalCompoundGroup2ReferenceCount"), + ValueLayout.JAVA_INT.withName("preferredBidirectionalCompoundReferenceNameMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `preferredRateControlFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredRateControlFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredRateControlFlags")); + /// The [VarHandle] of `preferredGopFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredGopFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredGopFrameCount")); + /// The [VarHandle] of `preferredKeyFramePeriod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredKeyFramePeriod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredKeyFramePeriod")); + /// The [VarHandle] of `preferredConsecutiveBipredictiveFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredConsecutiveBipredictiveFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredConsecutiveBipredictiveFrameCount")); + /// The [VarHandle] of `preferredTemporalLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredTemporalLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredTemporalLayerCount")); + /// The byte offset of `preferredConstantQIndex`. + public static final long OFFSET_preferredConstantQIndex = LAYOUT.byteOffset(PathElement.groupElement("preferredConstantQIndex")); + /// The memory layout of `preferredConstantQIndex`. + public static final MemoryLayout ML_preferredConstantQIndex = LAYOUT.select(PathElement.groupElement("preferredConstantQIndex")); + /// The [VarHandle] of `preferredMaxSingleReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredMaxSingleReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredMaxSingleReferenceCount")); + /// The [VarHandle] of `preferredSingleReferenceNameMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredSingleReferenceNameMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredSingleReferenceNameMask")); + /// The [VarHandle] of `preferredMaxUnidirectionalCompoundReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredMaxUnidirectionalCompoundReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredMaxUnidirectionalCompoundReferenceCount")); + /// The [VarHandle] of `preferredMaxUnidirectionalCompoundGroup1ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredMaxUnidirectionalCompoundGroup1ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredMaxUnidirectionalCompoundGroup1ReferenceCount")); + /// The [VarHandle] of `preferredUnidirectionalCompoundReferenceNameMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredUnidirectionalCompoundReferenceNameMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredUnidirectionalCompoundReferenceNameMask")); + /// The [VarHandle] of `preferredMaxBidirectionalCompoundReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredMaxBidirectionalCompoundReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredMaxBidirectionalCompoundReferenceCount")); + /// The [VarHandle] of `preferredMaxBidirectionalCompoundGroup1ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredMaxBidirectionalCompoundGroup1ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredMaxBidirectionalCompoundGroup1ReferenceCount")); + /// The [VarHandle] of `preferredMaxBidirectionalCompoundGroup2ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredMaxBidirectionalCompoundGroup2ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredMaxBidirectionalCompoundGroup2ReferenceCount")); + /// The [VarHandle] of `preferredBidirectionalCompoundReferenceNameMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredBidirectionalCompoundReferenceNameMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredBidirectionalCompoundReferenceNameMask")); + + /// Creates `VkVideoEncodeAV1QualityLevelPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1QualityLevelPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1QualityLevelPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1QualityLevelPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1QualityLevelPropertiesKHR(segment); } + + /// Creates `VkVideoEncodeAV1QualityLevelPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1QualityLevelPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1QualityLevelPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1QualityLevelPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1QualityLevelPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1QualityLevelPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1QualityLevelPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1QualityLevelPropertiesKHR` + public static VkVideoEncodeAV1QualityLevelPropertiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1QualityLevelPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1QualityLevelPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1QualityLevelPropertiesKHR` + public static VkVideoEncodeAV1QualityLevelPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1QualityLevelPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `preferredRateControlFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1RateControlFlagsKHR") int get_preferredRateControlFlags(MemorySegment segment, long index) { return (int) VH_preferredRateControlFlags.get(segment, 0L, index); } + /// {@return `preferredRateControlFlags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1RateControlFlagsKHR") int get_preferredRateControlFlags(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredRateControlFlags(segment, 0L); } + /// {@return `preferredRateControlFlags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1RateControlFlagsKHR") int preferredRateControlFlagsAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredRateControlFlags(this.segment(), index); } + /// {@return `preferredRateControlFlags`} + public @CType("VkVideoEncodeAV1RateControlFlagsKHR") int preferredRateControlFlags() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredRateControlFlags(this.segment()); } + /// Sets `preferredRateControlFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredRateControlFlags(MemorySegment segment, long index, @CType("VkVideoEncodeAV1RateControlFlagsKHR") int value) { VH_preferredRateControlFlags.set(segment, 0L, index, value); } + /// Sets `preferredRateControlFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredRateControlFlags(MemorySegment segment, @CType("VkVideoEncodeAV1RateControlFlagsKHR") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredRateControlFlags(segment, 0L, value); } + /// Sets `preferredRateControlFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredRateControlFlagsAt(long index, @CType("VkVideoEncodeAV1RateControlFlagsKHR") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredRateControlFlags(this.segment(), index, value); return this; } + /// Sets `preferredRateControlFlags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredRateControlFlags(@CType("VkVideoEncodeAV1RateControlFlagsKHR") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredRateControlFlags(this.segment(), value); return this; } + + /// {@return `preferredGopFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredGopFrameCount(MemorySegment segment, long index) { return (int) VH_preferredGopFrameCount.get(segment, 0L, index); } + /// {@return `preferredGopFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredGopFrameCount(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredGopFrameCount(segment, 0L); } + /// {@return `preferredGopFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredGopFrameCountAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredGopFrameCount(this.segment(), index); } + /// {@return `preferredGopFrameCount`} + public @CType("uint32_t") int preferredGopFrameCount() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredGopFrameCount(this.segment()); } + /// Sets `preferredGopFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredGopFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredGopFrameCount.set(segment, 0L, index, value); } + /// Sets `preferredGopFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredGopFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredGopFrameCount(segment, 0L, value); } + /// Sets `preferredGopFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredGopFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredGopFrameCount(this.segment(), index, value); return this; } + /// Sets `preferredGopFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredGopFrameCount(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredGopFrameCount(this.segment(), value); return this; } + + /// {@return `preferredKeyFramePeriod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredKeyFramePeriod(MemorySegment segment, long index) { return (int) VH_preferredKeyFramePeriod.get(segment, 0L, index); } + /// {@return `preferredKeyFramePeriod`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredKeyFramePeriod(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredKeyFramePeriod(segment, 0L); } + /// {@return `preferredKeyFramePeriod` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredKeyFramePeriodAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredKeyFramePeriod(this.segment(), index); } + /// {@return `preferredKeyFramePeriod`} + public @CType("uint32_t") int preferredKeyFramePeriod() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredKeyFramePeriod(this.segment()); } + /// Sets `preferredKeyFramePeriod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredKeyFramePeriod(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredKeyFramePeriod.set(segment, 0L, index, value); } + /// Sets `preferredKeyFramePeriod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredKeyFramePeriod(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredKeyFramePeriod(segment, 0L, value); } + /// Sets `preferredKeyFramePeriod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredKeyFramePeriodAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredKeyFramePeriod(this.segment(), index, value); return this; } + /// Sets `preferredKeyFramePeriod` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredKeyFramePeriod(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredKeyFramePeriod(this.segment(), value); return this; } + + /// {@return `preferredConsecutiveBipredictiveFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredConsecutiveBipredictiveFrameCount(MemorySegment segment, long index) { return (int) VH_preferredConsecutiveBipredictiveFrameCount.get(segment, 0L, index); } + /// {@return `preferredConsecutiveBipredictiveFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredConsecutiveBipredictiveFrameCount(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredConsecutiveBipredictiveFrameCount(segment, 0L); } + /// {@return `preferredConsecutiveBipredictiveFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredConsecutiveBipredictiveFrameCountAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredConsecutiveBipredictiveFrameCount(this.segment(), index); } + /// {@return `preferredConsecutiveBipredictiveFrameCount`} + public @CType("uint32_t") int preferredConsecutiveBipredictiveFrameCount() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredConsecutiveBipredictiveFrameCount(this.segment()); } + /// Sets `preferredConsecutiveBipredictiveFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredConsecutiveBipredictiveFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredConsecutiveBipredictiveFrameCount.set(segment, 0L, index, value); } + /// Sets `preferredConsecutiveBipredictiveFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredConsecutiveBipredictiveFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredConsecutiveBipredictiveFrameCount(segment, 0L, value); } + /// Sets `preferredConsecutiveBipredictiveFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredConsecutiveBipredictiveFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredConsecutiveBipredictiveFrameCount(this.segment(), index, value); return this; } + /// Sets `preferredConsecutiveBipredictiveFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredConsecutiveBipredictiveFrameCount(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredConsecutiveBipredictiveFrameCount(this.segment(), value); return this; } + + /// {@return `preferredTemporalLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredTemporalLayerCount(MemorySegment segment, long index) { return (int) VH_preferredTemporalLayerCount.get(segment, 0L, index); } + /// {@return `preferredTemporalLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredTemporalLayerCount(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredTemporalLayerCount(segment, 0L); } + /// {@return `preferredTemporalLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredTemporalLayerCountAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredTemporalLayerCount(this.segment(), index); } + /// {@return `preferredTemporalLayerCount`} + public @CType("uint32_t") int preferredTemporalLayerCount() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredTemporalLayerCount(this.segment()); } + /// Sets `preferredTemporalLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredTemporalLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredTemporalLayerCount.set(segment, 0L, index, value); } + /// Sets `preferredTemporalLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredTemporalLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredTemporalLayerCount(segment, 0L, value); } + /// Sets `preferredTemporalLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredTemporalLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredTemporalLayerCount(this.segment(), index, value); return this; } + /// Sets `preferredTemporalLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredTemporalLayerCount(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredTemporalLayerCount(this.segment(), value); return this; } + + /// {@return `preferredConstantQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment get_preferredConstantQIndex(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_preferredConstantQIndex, index), ML_preferredConstantQIndex); } + /// {@return `preferredConstantQIndex`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment get_preferredConstantQIndex(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredConstantQIndex(segment, 0L); } + /// {@return `preferredConstantQIndex` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment preferredConstantQIndexAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredConstantQIndex(this.segment(), index); } + /// {@return `preferredConstantQIndex`} + public @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment preferredConstantQIndex() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredConstantQIndex(this.segment()); } + /// Sets `preferredConstantQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredConstantQIndex(MemorySegment segment, long index, @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_preferredConstantQIndex, index), ML_preferredConstantQIndex.byteSize()); } + /// Sets `preferredConstantQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredConstantQIndex(MemorySegment segment, @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredConstantQIndex(segment, 0L, value); } + /// Sets `preferredConstantQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredConstantQIndexAt(long index, @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredConstantQIndex(this.segment(), index, value); return this; } + /// Sets `preferredConstantQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredConstantQIndex(@CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredConstantQIndex(this.segment(), value); return this; } + + /// {@return `preferredMaxSingleReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredMaxSingleReferenceCount(MemorySegment segment, long index) { return (int) VH_preferredMaxSingleReferenceCount.get(segment, 0L, index); } + /// {@return `preferredMaxSingleReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredMaxSingleReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxSingleReferenceCount(segment, 0L); } + /// {@return `preferredMaxSingleReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredMaxSingleReferenceCountAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxSingleReferenceCount(this.segment(), index); } + /// {@return `preferredMaxSingleReferenceCount`} + public @CType("uint32_t") int preferredMaxSingleReferenceCount() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxSingleReferenceCount(this.segment()); } + /// Sets `preferredMaxSingleReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredMaxSingleReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredMaxSingleReferenceCount.set(segment, 0L, index, value); } + /// Sets `preferredMaxSingleReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredMaxSingleReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxSingleReferenceCount(segment, 0L, value); } + /// Sets `preferredMaxSingleReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxSingleReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxSingleReferenceCount(this.segment(), index, value); return this; } + /// Sets `preferredMaxSingleReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxSingleReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxSingleReferenceCount(this.segment(), value); return this; } + + /// {@return `preferredSingleReferenceNameMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredSingleReferenceNameMask(MemorySegment segment, long index) { return (int) VH_preferredSingleReferenceNameMask.get(segment, 0L, index); } + /// {@return `preferredSingleReferenceNameMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredSingleReferenceNameMask(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredSingleReferenceNameMask(segment, 0L); } + /// {@return `preferredSingleReferenceNameMask` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredSingleReferenceNameMaskAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredSingleReferenceNameMask(this.segment(), index); } + /// {@return `preferredSingleReferenceNameMask`} + public @CType("uint32_t") int preferredSingleReferenceNameMask() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredSingleReferenceNameMask(this.segment()); } + /// Sets `preferredSingleReferenceNameMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredSingleReferenceNameMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredSingleReferenceNameMask.set(segment, 0L, index, value); } + /// Sets `preferredSingleReferenceNameMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredSingleReferenceNameMask(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredSingleReferenceNameMask(segment, 0L, value); } + /// Sets `preferredSingleReferenceNameMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredSingleReferenceNameMaskAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredSingleReferenceNameMask(this.segment(), index, value); return this; } + /// Sets `preferredSingleReferenceNameMask` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredSingleReferenceNameMask(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredSingleReferenceNameMask(this.segment(), value); return this; } + + /// {@return `preferredMaxUnidirectionalCompoundReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredMaxUnidirectionalCompoundReferenceCount(MemorySegment segment, long index) { return (int) VH_preferredMaxUnidirectionalCompoundReferenceCount.get(segment, 0L, index); } + /// {@return `preferredMaxUnidirectionalCompoundReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredMaxUnidirectionalCompoundReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxUnidirectionalCompoundReferenceCount(segment, 0L); } + /// {@return `preferredMaxUnidirectionalCompoundReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredMaxUnidirectionalCompoundReferenceCountAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxUnidirectionalCompoundReferenceCount(this.segment(), index); } + /// {@return `preferredMaxUnidirectionalCompoundReferenceCount`} + public @CType("uint32_t") int preferredMaxUnidirectionalCompoundReferenceCount() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxUnidirectionalCompoundReferenceCount(this.segment()); } + /// Sets `preferredMaxUnidirectionalCompoundReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredMaxUnidirectionalCompoundReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredMaxUnidirectionalCompoundReferenceCount.set(segment, 0L, index, value); } + /// Sets `preferredMaxUnidirectionalCompoundReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredMaxUnidirectionalCompoundReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxUnidirectionalCompoundReferenceCount(segment, 0L, value); } + /// Sets `preferredMaxUnidirectionalCompoundReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxUnidirectionalCompoundReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxUnidirectionalCompoundReferenceCount(this.segment(), index, value); return this; } + /// Sets `preferredMaxUnidirectionalCompoundReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxUnidirectionalCompoundReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxUnidirectionalCompoundReferenceCount(this.segment(), value); return this; } + + /// {@return `preferredMaxUnidirectionalCompoundGroup1ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredMaxUnidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, long index) { return (int) VH_preferredMaxUnidirectionalCompoundGroup1ReferenceCount.get(segment, 0L, index); } + /// {@return `preferredMaxUnidirectionalCompoundGroup1ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredMaxUnidirectionalCompoundGroup1ReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxUnidirectionalCompoundGroup1ReferenceCount(segment, 0L); } + /// {@return `preferredMaxUnidirectionalCompoundGroup1ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredMaxUnidirectionalCompoundGroup1ReferenceCountAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxUnidirectionalCompoundGroup1ReferenceCount(this.segment(), index); } + /// {@return `preferredMaxUnidirectionalCompoundGroup1ReferenceCount`} + public @CType("uint32_t") int preferredMaxUnidirectionalCompoundGroup1ReferenceCount() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxUnidirectionalCompoundGroup1ReferenceCount(this.segment()); } + /// Sets `preferredMaxUnidirectionalCompoundGroup1ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredMaxUnidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredMaxUnidirectionalCompoundGroup1ReferenceCount.set(segment, 0L, index, value); } + /// Sets `preferredMaxUnidirectionalCompoundGroup1ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredMaxUnidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxUnidirectionalCompoundGroup1ReferenceCount(segment, 0L, value); } + /// Sets `preferredMaxUnidirectionalCompoundGroup1ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxUnidirectionalCompoundGroup1ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxUnidirectionalCompoundGroup1ReferenceCount(this.segment(), index, value); return this; } + /// Sets `preferredMaxUnidirectionalCompoundGroup1ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxUnidirectionalCompoundGroup1ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxUnidirectionalCompoundGroup1ReferenceCount(this.segment(), value); return this; } + + /// {@return `preferredUnidirectionalCompoundReferenceNameMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredUnidirectionalCompoundReferenceNameMask(MemorySegment segment, long index) { return (int) VH_preferredUnidirectionalCompoundReferenceNameMask.get(segment, 0L, index); } + /// {@return `preferredUnidirectionalCompoundReferenceNameMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredUnidirectionalCompoundReferenceNameMask(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredUnidirectionalCompoundReferenceNameMask(segment, 0L); } + /// {@return `preferredUnidirectionalCompoundReferenceNameMask` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredUnidirectionalCompoundReferenceNameMaskAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredUnidirectionalCompoundReferenceNameMask(this.segment(), index); } + /// {@return `preferredUnidirectionalCompoundReferenceNameMask`} + public @CType("uint32_t") int preferredUnidirectionalCompoundReferenceNameMask() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredUnidirectionalCompoundReferenceNameMask(this.segment()); } + /// Sets `preferredUnidirectionalCompoundReferenceNameMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredUnidirectionalCompoundReferenceNameMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredUnidirectionalCompoundReferenceNameMask.set(segment, 0L, index, value); } + /// Sets `preferredUnidirectionalCompoundReferenceNameMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredUnidirectionalCompoundReferenceNameMask(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredUnidirectionalCompoundReferenceNameMask(segment, 0L, value); } + /// Sets `preferredUnidirectionalCompoundReferenceNameMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredUnidirectionalCompoundReferenceNameMaskAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredUnidirectionalCompoundReferenceNameMask(this.segment(), index, value); return this; } + /// Sets `preferredUnidirectionalCompoundReferenceNameMask` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredUnidirectionalCompoundReferenceNameMask(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredUnidirectionalCompoundReferenceNameMask(this.segment(), value); return this; } + + /// {@return `preferredMaxBidirectionalCompoundReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredMaxBidirectionalCompoundReferenceCount(MemorySegment segment, long index) { return (int) VH_preferredMaxBidirectionalCompoundReferenceCount.get(segment, 0L, index); } + /// {@return `preferredMaxBidirectionalCompoundReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredMaxBidirectionalCompoundReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxBidirectionalCompoundReferenceCount(segment, 0L); } + /// {@return `preferredMaxBidirectionalCompoundReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredMaxBidirectionalCompoundReferenceCountAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxBidirectionalCompoundReferenceCount(this.segment(), index); } + /// {@return `preferredMaxBidirectionalCompoundReferenceCount`} + public @CType("uint32_t") int preferredMaxBidirectionalCompoundReferenceCount() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxBidirectionalCompoundReferenceCount(this.segment()); } + /// Sets `preferredMaxBidirectionalCompoundReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredMaxBidirectionalCompoundReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredMaxBidirectionalCompoundReferenceCount.set(segment, 0L, index, value); } + /// Sets `preferredMaxBidirectionalCompoundReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredMaxBidirectionalCompoundReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxBidirectionalCompoundReferenceCount(segment, 0L, value); } + /// Sets `preferredMaxBidirectionalCompoundReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxBidirectionalCompoundReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxBidirectionalCompoundReferenceCount(this.segment(), index, value); return this; } + /// Sets `preferredMaxBidirectionalCompoundReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxBidirectionalCompoundReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxBidirectionalCompoundReferenceCount(this.segment(), value); return this; } + + /// {@return `preferredMaxBidirectionalCompoundGroup1ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredMaxBidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, long index) { return (int) VH_preferredMaxBidirectionalCompoundGroup1ReferenceCount.get(segment, 0L, index); } + /// {@return `preferredMaxBidirectionalCompoundGroup1ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredMaxBidirectionalCompoundGroup1ReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxBidirectionalCompoundGroup1ReferenceCount(segment, 0L); } + /// {@return `preferredMaxBidirectionalCompoundGroup1ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredMaxBidirectionalCompoundGroup1ReferenceCountAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxBidirectionalCompoundGroup1ReferenceCount(this.segment(), index); } + /// {@return `preferredMaxBidirectionalCompoundGroup1ReferenceCount`} + public @CType("uint32_t") int preferredMaxBidirectionalCompoundGroup1ReferenceCount() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxBidirectionalCompoundGroup1ReferenceCount(this.segment()); } + /// Sets `preferredMaxBidirectionalCompoundGroup1ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredMaxBidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredMaxBidirectionalCompoundGroup1ReferenceCount.set(segment, 0L, index, value); } + /// Sets `preferredMaxBidirectionalCompoundGroup1ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredMaxBidirectionalCompoundGroup1ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxBidirectionalCompoundGroup1ReferenceCount(segment, 0L, value); } + /// Sets `preferredMaxBidirectionalCompoundGroup1ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxBidirectionalCompoundGroup1ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxBidirectionalCompoundGroup1ReferenceCount(this.segment(), index, value); return this; } + /// Sets `preferredMaxBidirectionalCompoundGroup1ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxBidirectionalCompoundGroup1ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxBidirectionalCompoundGroup1ReferenceCount(this.segment(), value); return this; } + + /// {@return `preferredMaxBidirectionalCompoundGroup2ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredMaxBidirectionalCompoundGroup2ReferenceCount(MemorySegment segment, long index) { return (int) VH_preferredMaxBidirectionalCompoundGroup2ReferenceCount.get(segment, 0L, index); } + /// {@return `preferredMaxBidirectionalCompoundGroup2ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredMaxBidirectionalCompoundGroup2ReferenceCount(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxBidirectionalCompoundGroup2ReferenceCount(segment, 0L); } + /// {@return `preferredMaxBidirectionalCompoundGroup2ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredMaxBidirectionalCompoundGroup2ReferenceCountAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxBidirectionalCompoundGroup2ReferenceCount(this.segment(), index); } + /// {@return `preferredMaxBidirectionalCompoundGroup2ReferenceCount`} + public @CType("uint32_t") int preferredMaxBidirectionalCompoundGroup2ReferenceCount() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredMaxBidirectionalCompoundGroup2ReferenceCount(this.segment()); } + /// Sets `preferredMaxBidirectionalCompoundGroup2ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredMaxBidirectionalCompoundGroup2ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredMaxBidirectionalCompoundGroup2ReferenceCount.set(segment, 0L, index, value); } + /// Sets `preferredMaxBidirectionalCompoundGroup2ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredMaxBidirectionalCompoundGroup2ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxBidirectionalCompoundGroup2ReferenceCount(segment, 0L, value); } + /// Sets `preferredMaxBidirectionalCompoundGroup2ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxBidirectionalCompoundGroup2ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxBidirectionalCompoundGroup2ReferenceCount(this.segment(), index, value); return this; } + /// Sets `preferredMaxBidirectionalCompoundGroup2ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredMaxBidirectionalCompoundGroup2ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredMaxBidirectionalCompoundGroup2ReferenceCount(this.segment(), value); return this; } + + /// {@return `preferredBidirectionalCompoundReferenceNameMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredBidirectionalCompoundReferenceNameMask(MemorySegment segment, long index) { return (int) VH_preferredBidirectionalCompoundReferenceNameMask.get(segment, 0L, index); } + /// {@return `preferredBidirectionalCompoundReferenceNameMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredBidirectionalCompoundReferenceNameMask(MemorySegment segment) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredBidirectionalCompoundReferenceNameMask(segment, 0L); } + /// {@return `preferredBidirectionalCompoundReferenceNameMask` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredBidirectionalCompoundReferenceNameMaskAt(long index) { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredBidirectionalCompoundReferenceNameMask(this.segment(), index); } + /// {@return `preferredBidirectionalCompoundReferenceNameMask`} + public @CType("uint32_t") int preferredBidirectionalCompoundReferenceNameMask() { return VkVideoEncodeAV1QualityLevelPropertiesKHR.get_preferredBidirectionalCompoundReferenceNameMask(this.segment()); } + /// Sets `preferredBidirectionalCompoundReferenceNameMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredBidirectionalCompoundReferenceNameMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredBidirectionalCompoundReferenceNameMask.set(segment, 0L, index, value); } + /// Sets `preferredBidirectionalCompoundReferenceNameMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredBidirectionalCompoundReferenceNameMask(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredBidirectionalCompoundReferenceNameMask(segment, 0L, value); } + /// Sets `preferredBidirectionalCompoundReferenceNameMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredBidirectionalCompoundReferenceNameMaskAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredBidirectionalCompoundReferenceNameMask(this.segment(), index, value); return this; } + /// Sets `preferredBidirectionalCompoundReferenceNameMask` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QualityLevelPropertiesKHR preferredBidirectionalCompoundReferenceNameMask(@CType("uint32_t") int value) { VkVideoEncodeAV1QualityLevelPropertiesKHR.set_preferredBidirectionalCompoundReferenceNameMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.java new file mode 100644 index 00000000..900ba428 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minQIndexDelta +/// [VarHandle][#VH_minQIndexDelta] - [Getter][#minQIndexDelta()] - [Setter][#minQIndexDelta(int)] +/// ### maxQIndexDelta +/// [VarHandle][#VH_maxQIndexDelta] - [Getter][#maxQIndexDelta()] - [Setter][#maxQIndexDelta(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1QuantizationMapCapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// int32_t minQIndexDelta; +/// int32_t maxQIndexDelta; +/// } VkVideoEncodeAV1QuantizationMapCapabilitiesKHR; +/// ``` +public final class VkVideoEncodeAV1QuantizationMapCapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("minQIndexDelta"), + ValueLayout.JAVA_INT.withName("maxQIndexDelta") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minQIndexDelta` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minQIndexDelta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minQIndexDelta")); + /// The [VarHandle] of `maxQIndexDelta` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxQIndexDelta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxQIndexDelta")); + + /// Creates `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1QuantizationMapCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1QuantizationMapCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1QuantizationMapCapabilitiesKHR(segment); } + + /// Creates `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1QuantizationMapCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1QuantizationMapCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1QuantizationMapCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1QuantizationMapCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR` + public static VkVideoEncodeAV1QuantizationMapCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1QuantizationMapCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1QuantizationMapCapabilitiesKHR` + public static VkVideoEncodeAV1QuantizationMapCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1QuantizationMapCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QuantizationMapCapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QuantizationMapCapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QuantizationMapCapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QuantizationMapCapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `minQIndexDelta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_minQIndexDelta(MemorySegment segment, long index) { return (int) VH_minQIndexDelta.get(segment, 0L, index); } + /// {@return `minQIndexDelta`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_minQIndexDelta(MemorySegment segment) { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_minQIndexDelta(segment, 0L); } + /// {@return `minQIndexDelta` at the given index} + /// @param index the index + public @CType("int32_t") int minQIndexDeltaAt(long index) { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_minQIndexDelta(this.segment(), index); } + /// {@return `minQIndexDelta`} + public @CType("int32_t") int minQIndexDelta() { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_minQIndexDelta(this.segment()); } + /// Sets `minQIndexDelta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minQIndexDelta(MemorySegment segment, long index, @CType("int32_t") int value) { VH_minQIndexDelta.set(segment, 0L, index, value); } + /// Sets `minQIndexDelta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minQIndexDelta(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_minQIndexDelta(segment, 0L, value); } + /// Sets `minQIndexDelta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QuantizationMapCapabilitiesKHR minQIndexDeltaAt(long index, @CType("int32_t") int value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_minQIndexDelta(this.segment(), index, value); return this; } + /// Sets `minQIndexDelta` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QuantizationMapCapabilitiesKHR minQIndexDelta(@CType("int32_t") int value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_minQIndexDelta(this.segment(), value); return this; } + + /// {@return `maxQIndexDelta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_maxQIndexDelta(MemorySegment segment, long index) { return (int) VH_maxQIndexDelta.get(segment, 0L, index); } + /// {@return `maxQIndexDelta`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_maxQIndexDelta(MemorySegment segment) { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_maxQIndexDelta(segment, 0L); } + /// {@return `maxQIndexDelta` at the given index} + /// @param index the index + public @CType("int32_t") int maxQIndexDeltaAt(long index) { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_maxQIndexDelta(this.segment(), index); } + /// {@return `maxQIndexDelta`} + public @CType("int32_t") int maxQIndexDelta() { return VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.get_maxQIndexDelta(this.segment()); } + /// Sets `maxQIndexDelta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQIndexDelta(MemorySegment segment, long index, @CType("int32_t") int value) { VH_maxQIndexDelta.set(segment, 0L, index, value); } + /// Sets `maxQIndexDelta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQIndexDelta(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_maxQIndexDelta(segment, 0L, value); } + /// Sets `maxQIndexDelta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QuantizationMapCapabilitiesKHR maxQIndexDeltaAt(long index, @CType("int32_t") int value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_maxQIndexDelta(this.segment(), index, value); return this; } + /// Sets `maxQIndexDelta` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1QuantizationMapCapabilitiesKHR maxQIndexDelta(@CType("int32_t") int value) { VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.set_maxQIndexDelta(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1RateControlInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1RateControlInfoKHR.java new file mode 100644 index 00000000..77516dfb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1RateControlInfoKHR.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### gopFrameCount +/// [VarHandle][#VH_gopFrameCount] - [Getter][#gopFrameCount()] - [Setter][#gopFrameCount(int)] +/// ### keyFramePeriod +/// [VarHandle][#VH_keyFramePeriod] - [Getter][#keyFramePeriod()] - [Setter][#keyFramePeriod(int)] +/// ### consecutiveBipredictiveFrameCount +/// [VarHandle][#VH_consecutiveBipredictiveFrameCount] - [Getter][#consecutiveBipredictiveFrameCount()] - [Setter][#consecutiveBipredictiveFrameCount(int)] +/// ### temporalLayerCount +/// [VarHandle][#VH_temporalLayerCount] - [Getter][#temporalLayerCount()] - [Setter][#temporalLayerCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1RateControlInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoEncodeAV1RateControlFlagsKHR flags; +/// uint32_t gopFrameCount; +/// uint32_t keyFramePeriod; +/// uint32_t consecutiveBipredictiveFrameCount; +/// uint32_t temporalLayerCount; +/// } VkVideoEncodeAV1RateControlInfoKHR; +/// ``` +public final class VkVideoEncodeAV1RateControlInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1RateControlInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("gopFrameCount"), + ValueLayout.JAVA_INT.withName("keyFramePeriod"), + ValueLayout.JAVA_INT.withName("consecutiveBipredictiveFrameCount"), + ValueLayout.JAVA_INT.withName("temporalLayerCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `gopFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopFrameCount")); + /// The [VarHandle] of `keyFramePeriod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_keyFramePeriod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("keyFramePeriod")); + /// The [VarHandle] of `consecutiveBipredictiveFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_consecutiveBipredictiveFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("consecutiveBipredictiveFrameCount")); + /// The [VarHandle] of `temporalLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_temporalLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("temporalLayerCount")); + + /// Creates `VkVideoEncodeAV1RateControlInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1RateControlInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1RateControlInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1RateControlInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1RateControlInfoKHR(segment); } + + /// Creates `VkVideoEncodeAV1RateControlInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1RateControlInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1RateControlInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1RateControlInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1RateControlInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1RateControlInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1RateControlInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1RateControlInfoKHR` + public static VkVideoEncodeAV1RateControlInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1RateControlInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1RateControlInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1RateControlInfoKHR` + public static VkVideoEncodeAV1RateControlInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1RateControlInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1RateControlInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1RateControlInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1RateControlInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1RateControlInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1RateControlInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1RateControlInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1RateControlFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1RateControlFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoEncodeAV1RateControlInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1RateControlFlagsKHR") int flagsAt(long index) { return VkVideoEncodeAV1RateControlInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoEncodeAV1RateControlFlagsKHR") int flags() { return VkVideoEncodeAV1RateControlInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoEncodeAV1RateControlFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoEncodeAV1RateControlFlagsKHR") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR flagsAt(long index, @CType("VkVideoEncodeAV1RateControlFlagsKHR") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR flags(@CType("VkVideoEncodeAV1RateControlFlagsKHR") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `gopFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopFrameCount(MemorySegment segment, long index) { return (int) VH_gopFrameCount.get(segment, 0L, index); } + /// {@return `gopFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopFrameCount(MemorySegment segment) { return VkVideoEncodeAV1RateControlInfoKHR.get_gopFrameCount(segment, 0L); } + /// {@return `gopFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int gopFrameCountAt(long index) { return VkVideoEncodeAV1RateControlInfoKHR.get_gopFrameCount(this.segment(), index); } + /// {@return `gopFrameCount`} + public @CType("uint32_t") int gopFrameCount() { return VkVideoEncodeAV1RateControlInfoKHR.get_gopFrameCount(this.segment()); } + /// Sets `gopFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopFrameCount.set(segment, 0L, index, value); } + /// Sets `gopFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_gopFrameCount(segment, 0L, value); } + /// Sets `gopFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR gopFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_gopFrameCount(this.segment(), index, value); return this; } + /// Sets `gopFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR gopFrameCount(@CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_gopFrameCount(this.segment(), value); return this; } + + /// {@return `keyFramePeriod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_keyFramePeriod(MemorySegment segment, long index) { return (int) VH_keyFramePeriod.get(segment, 0L, index); } + /// {@return `keyFramePeriod`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_keyFramePeriod(MemorySegment segment) { return VkVideoEncodeAV1RateControlInfoKHR.get_keyFramePeriod(segment, 0L); } + /// {@return `keyFramePeriod` at the given index} + /// @param index the index + public @CType("uint32_t") int keyFramePeriodAt(long index) { return VkVideoEncodeAV1RateControlInfoKHR.get_keyFramePeriod(this.segment(), index); } + /// {@return `keyFramePeriod`} + public @CType("uint32_t") int keyFramePeriod() { return VkVideoEncodeAV1RateControlInfoKHR.get_keyFramePeriod(this.segment()); } + /// Sets `keyFramePeriod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_keyFramePeriod(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_keyFramePeriod.set(segment, 0L, index, value); } + /// Sets `keyFramePeriod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_keyFramePeriod(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_keyFramePeriod(segment, 0L, value); } + /// Sets `keyFramePeriod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR keyFramePeriodAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_keyFramePeriod(this.segment(), index, value); return this; } + /// Sets `keyFramePeriod` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR keyFramePeriod(@CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_keyFramePeriod(this.segment(), value); return this; } + + /// {@return `consecutiveBipredictiveFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_consecutiveBipredictiveFrameCount(MemorySegment segment, long index) { return (int) VH_consecutiveBipredictiveFrameCount.get(segment, 0L, index); } + /// {@return `consecutiveBipredictiveFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_consecutiveBipredictiveFrameCount(MemorySegment segment) { return VkVideoEncodeAV1RateControlInfoKHR.get_consecutiveBipredictiveFrameCount(segment, 0L); } + /// {@return `consecutiveBipredictiveFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int consecutiveBipredictiveFrameCountAt(long index) { return VkVideoEncodeAV1RateControlInfoKHR.get_consecutiveBipredictiveFrameCount(this.segment(), index); } + /// {@return `consecutiveBipredictiveFrameCount`} + public @CType("uint32_t") int consecutiveBipredictiveFrameCount() { return VkVideoEncodeAV1RateControlInfoKHR.get_consecutiveBipredictiveFrameCount(this.segment()); } + /// Sets `consecutiveBipredictiveFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_consecutiveBipredictiveFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_consecutiveBipredictiveFrameCount.set(segment, 0L, index, value); } + /// Sets `consecutiveBipredictiveFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_consecutiveBipredictiveFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_consecutiveBipredictiveFrameCount(segment, 0L, value); } + /// Sets `consecutiveBipredictiveFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR consecutiveBipredictiveFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_consecutiveBipredictiveFrameCount(this.segment(), index, value); return this; } + /// Sets `consecutiveBipredictiveFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR consecutiveBipredictiveFrameCount(@CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_consecutiveBipredictiveFrameCount(this.segment(), value); return this; } + + /// {@return `temporalLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_temporalLayerCount(MemorySegment segment, long index) { return (int) VH_temporalLayerCount.get(segment, 0L, index); } + /// {@return `temporalLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_temporalLayerCount(MemorySegment segment) { return VkVideoEncodeAV1RateControlInfoKHR.get_temporalLayerCount(segment, 0L); } + /// {@return `temporalLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int temporalLayerCountAt(long index) { return VkVideoEncodeAV1RateControlInfoKHR.get_temporalLayerCount(this.segment(), index); } + /// {@return `temporalLayerCount`} + public @CType("uint32_t") int temporalLayerCount() { return VkVideoEncodeAV1RateControlInfoKHR.get_temporalLayerCount(this.segment()); } + /// Sets `temporalLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_temporalLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_temporalLayerCount.set(segment, 0L, index, value); } + /// Sets `temporalLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_temporalLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_temporalLayerCount(segment, 0L, value); } + /// Sets `temporalLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR temporalLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_temporalLayerCount(this.segment(), index, value); return this; } + /// Sets `temporalLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlInfoKHR temporalLayerCount(@CType("uint32_t") int value) { VkVideoEncodeAV1RateControlInfoKHR.set_temporalLayerCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1RateControlLayerInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1RateControlLayerInfoKHR.java new file mode 100644 index 00000000..6d828d50 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1RateControlLayerInfoKHR.java @@ -0,0 +1,376 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### useMinQIndex +/// [VarHandle][#VH_useMinQIndex] - [Getter][#useMinQIndex()] - [Setter][#useMinQIndex(int)] +/// ### minQIndex +/// [Byte offset][#OFFSET_minQIndex] - [Memory layout][#ML_minQIndex] - [Getter][#minQIndex()] - [Setter][#minQIndex(java.lang.foreign.MemorySegment)] +/// ### useMaxQIndex +/// [VarHandle][#VH_useMaxQIndex] - [Getter][#useMaxQIndex()] - [Setter][#useMaxQIndex(int)] +/// ### maxQIndex +/// [Byte offset][#OFFSET_maxQIndex] - [Memory layout][#ML_maxQIndex] - [Getter][#maxQIndex()] - [Setter][#maxQIndex(java.lang.foreign.MemorySegment)] +/// ### useMaxFrameSize +/// [VarHandle][#VH_useMaxFrameSize] - [Getter][#useMaxFrameSize()] - [Setter][#useMaxFrameSize(int)] +/// ### maxFrameSize +/// [Byte offset][#OFFSET_maxFrameSize] - [Memory layout][#ML_maxFrameSize] - [Getter][#maxFrameSize()] - [Setter][#maxFrameSize(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1RateControlLayerInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 useMinQIndex; +/// VkVideoEncodeAV1QIndexKHR minQIndex; +/// VkBool32 useMaxQIndex; +/// VkVideoEncodeAV1QIndexKHR maxQIndex; +/// VkBool32 useMaxFrameSize; +/// VkVideoEncodeAV1FrameSizeKHR maxFrameSize; +/// } VkVideoEncodeAV1RateControlLayerInfoKHR; +/// ``` +public final class VkVideoEncodeAV1RateControlLayerInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1RateControlLayerInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("useMinQIndex"), + overrungl.vulkan.khr.struct.VkVideoEncodeAV1QIndexKHR.LAYOUT.withName("minQIndex"), + ValueLayout.JAVA_INT.withName("useMaxQIndex"), + overrungl.vulkan.khr.struct.VkVideoEncodeAV1QIndexKHR.LAYOUT.withName("maxQIndex"), + ValueLayout.JAVA_INT.withName("useMaxFrameSize"), + overrungl.vulkan.khr.struct.VkVideoEncodeAV1FrameSizeKHR.LAYOUT.withName("maxFrameSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `useMinQIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMinQIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMinQIndex")); + /// The byte offset of `minQIndex`. + public static final long OFFSET_minQIndex = LAYOUT.byteOffset(PathElement.groupElement("minQIndex")); + /// The memory layout of `minQIndex`. + public static final MemoryLayout ML_minQIndex = LAYOUT.select(PathElement.groupElement("minQIndex")); + /// The [VarHandle] of `useMaxQIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMaxQIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMaxQIndex")); + /// The byte offset of `maxQIndex`. + public static final long OFFSET_maxQIndex = LAYOUT.byteOffset(PathElement.groupElement("maxQIndex")); + /// The memory layout of `maxQIndex`. + public static final MemoryLayout ML_maxQIndex = LAYOUT.select(PathElement.groupElement("maxQIndex")); + /// The [VarHandle] of `useMaxFrameSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMaxFrameSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMaxFrameSize")); + /// The byte offset of `maxFrameSize`. + public static final long OFFSET_maxFrameSize = LAYOUT.byteOffset(PathElement.groupElement("maxFrameSize")); + /// The memory layout of `maxFrameSize`. + public static final MemoryLayout ML_maxFrameSize = LAYOUT.select(PathElement.groupElement("maxFrameSize")); + + /// Creates `VkVideoEncodeAV1RateControlLayerInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1RateControlLayerInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1RateControlLayerInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1RateControlLayerInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1RateControlLayerInfoKHR(segment); } + + /// Creates `VkVideoEncodeAV1RateControlLayerInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1RateControlLayerInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1RateControlLayerInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1RateControlLayerInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1RateControlLayerInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1RateControlLayerInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1RateControlLayerInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1RateControlLayerInfoKHR` + public static VkVideoEncodeAV1RateControlLayerInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1RateControlLayerInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1RateControlLayerInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1RateControlLayerInfoKHR` + public static VkVideoEncodeAV1RateControlLayerInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1RateControlLayerInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `useMinQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMinQIndex(MemorySegment segment, long index) { return (int) VH_useMinQIndex.get(segment, 0L, index); } + /// {@return `useMinQIndex`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMinQIndex(MemorySegment segment) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_useMinQIndex(segment, 0L); } + /// {@return `useMinQIndex` at the given index} + /// @param index the index + public @CType("VkBool32") int useMinQIndexAt(long index) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_useMinQIndex(this.segment(), index); } + /// {@return `useMinQIndex`} + public @CType("VkBool32") int useMinQIndex() { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_useMinQIndex(this.segment()); } + /// Sets `useMinQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMinQIndex(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMinQIndex.set(segment, 0L, index, value); } + /// Sets `useMinQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMinQIndex(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_useMinQIndex(segment, 0L, value); } + /// Sets `useMinQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR useMinQIndexAt(long index, @CType("VkBool32") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_useMinQIndex(this.segment(), index, value); return this; } + /// Sets `useMinQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR useMinQIndex(@CType("VkBool32") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_useMinQIndex(this.segment(), value); return this; } + + /// {@return `minQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment get_minQIndex(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minQIndex, index), ML_minQIndex); } + /// {@return `minQIndex`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment get_minQIndex(MemorySegment segment) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_minQIndex(segment, 0L); } + /// {@return `minQIndex` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment minQIndexAt(long index) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_minQIndex(this.segment(), index); } + /// {@return `minQIndex`} + public @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment minQIndex() { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_minQIndex(this.segment()); } + /// Sets `minQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minQIndex(MemorySegment segment, long index, @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minQIndex, index), ML_minQIndex.byteSize()); } + /// Sets `minQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minQIndex(MemorySegment segment, @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_minQIndex(segment, 0L, value); } + /// Sets `minQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR minQIndexAt(long index, @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_minQIndex(this.segment(), index, value); return this; } + /// Sets `minQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR minQIndex(@CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_minQIndex(this.segment(), value); return this; } + + /// {@return `useMaxQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMaxQIndex(MemorySegment segment, long index) { return (int) VH_useMaxQIndex.get(segment, 0L, index); } + /// {@return `useMaxQIndex`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMaxQIndex(MemorySegment segment) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_useMaxQIndex(segment, 0L); } + /// {@return `useMaxQIndex` at the given index} + /// @param index the index + public @CType("VkBool32") int useMaxQIndexAt(long index) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_useMaxQIndex(this.segment(), index); } + /// {@return `useMaxQIndex`} + public @CType("VkBool32") int useMaxQIndex() { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_useMaxQIndex(this.segment()); } + /// Sets `useMaxQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMaxQIndex(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMaxQIndex.set(segment, 0L, index, value); } + /// Sets `useMaxQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMaxQIndex(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_useMaxQIndex(segment, 0L, value); } + /// Sets `useMaxQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR useMaxQIndexAt(long index, @CType("VkBool32") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_useMaxQIndex(this.segment(), index, value); return this; } + /// Sets `useMaxQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR useMaxQIndex(@CType("VkBool32") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_useMaxQIndex(this.segment(), value); return this; } + + /// {@return `maxQIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment get_maxQIndex(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxQIndex, index), ML_maxQIndex); } + /// {@return `maxQIndex`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment get_maxQIndex(MemorySegment segment) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_maxQIndex(segment, 0L); } + /// {@return `maxQIndex` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment maxQIndexAt(long index) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_maxQIndex(this.segment(), index); } + /// {@return `maxQIndex`} + public @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment maxQIndex() { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_maxQIndex(this.segment()); } + /// Sets `maxQIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQIndex(MemorySegment segment, long index, @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxQIndex, index), ML_maxQIndex.byteSize()); } + /// Sets `maxQIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQIndex(MemorySegment segment, @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_maxQIndex(segment, 0L, value); } + /// Sets `maxQIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR maxQIndexAt(long index, @CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_maxQIndex(this.segment(), index, value); return this; } + /// Sets `maxQIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR maxQIndex(@CType("VkVideoEncodeAV1QIndexKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_maxQIndex(this.segment(), value); return this; } + + /// {@return `useMaxFrameSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMaxFrameSize(MemorySegment segment, long index) { return (int) VH_useMaxFrameSize.get(segment, 0L, index); } + /// {@return `useMaxFrameSize`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMaxFrameSize(MemorySegment segment) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_useMaxFrameSize(segment, 0L); } + /// {@return `useMaxFrameSize` at the given index} + /// @param index the index + public @CType("VkBool32") int useMaxFrameSizeAt(long index) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_useMaxFrameSize(this.segment(), index); } + /// {@return `useMaxFrameSize`} + public @CType("VkBool32") int useMaxFrameSize() { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_useMaxFrameSize(this.segment()); } + /// Sets `useMaxFrameSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMaxFrameSize(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMaxFrameSize.set(segment, 0L, index, value); } + /// Sets `useMaxFrameSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMaxFrameSize(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_useMaxFrameSize(segment, 0L, value); } + /// Sets `useMaxFrameSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR useMaxFrameSizeAt(long index, @CType("VkBool32") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_useMaxFrameSize(this.segment(), index, value); return this; } + /// Sets `useMaxFrameSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR useMaxFrameSize(@CType("VkBool32") int value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_useMaxFrameSize(this.segment(), value); return this; } + + /// {@return `maxFrameSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1FrameSizeKHR") java.lang.foreign.MemorySegment get_maxFrameSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxFrameSize, index), ML_maxFrameSize); } + /// {@return `maxFrameSize`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1FrameSizeKHR") java.lang.foreign.MemorySegment get_maxFrameSize(MemorySegment segment) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_maxFrameSize(segment, 0L); } + /// {@return `maxFrameSize` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1FrameSizeKHR") java.lang.foreign.MemorySegment maxFrameSizeAt(long index) { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_maxFrameSize(this.segment(), index); } + /// {@return `maxFrameSize`} + public @CType("VkVideoEncodeAV1FrameSizeKHR") java.lang.foreign.MemorySegment maxFrameSize() { return VkVideoEncodeAV1RateControlLayerInfoKHR.get_maxFrameSize(this.segment()); } + /// Sets `maxFrameSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFrameSize(MemorySegment segment, long index, @CType("VkVideoEncodeAV1FrameSizeKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxFrameSize, index), ML_maxFrameSize.byteSize()); } + /// Sets `maxFrameSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFrameSize(MemorySegment segment, @CType("VkVideoEncodeAV1FrameSizeKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_maxFrameSize(segment, 0L, value); } + /// Sets `maxFrameSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR maxFrameSizeAt(long index, @CType("VkVideoEncodeAV1FrameSizeKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_maxFrameSize(this.segment(), index, value); return this; } + /// Sets `maxFrameSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1RateControlLayerInfoKHR maxFrameSize(@CType("VkVideoEncodeAV1FrameSizeKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1RateControlLayerInfoKHR.set_maxFrameSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1SessionCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1SessionCreateInfoKHR.java new file mode 100644 index 00000000..db0c8b2c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1SessionCreateInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### useMaxLevel +/// [VarHandle][#VH_useMaxLevel] - [Getter][#useMaxLevel()] - [Setter][#useMaxLevel(int)] +/// ### maxLevel +/// [VarHandle][#VH_maxLevel] - [Getter][#maxLevel()] - [Setter][#maxLevel(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1SessionCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 useMaxLevel; +/// StdVideoAV1Level maxLevel; +/// } VkVideoEncodeAV1SessionCreateInfoKHR; +/// ``` +public final class VkVideoEncodeAV1SessionCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1SessionCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("useMaxLevel"), + ValueLayout.JAVA_INT.withName("maxLevel") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `useMaxLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMaxLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMaxLevel")); + /// The [VarHandle] of `maxLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLevel")); + + /// Creates `VkVideoEncodeAV1SessionCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1SessionCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1SessionCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1SessionCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1SessionCreateInfoKHR(segment); } + + /// Creates `VkVideoEncodeAV1SessionCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1SessionCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1SessionCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1SessionCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1SessionCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1SessionCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1SessionCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1SessionCreateInfoKHR` + public static VkVideoEncodeAV1SessionCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1SessionCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1SessionCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1SessionCreateInfoKHR` + public static VkVideoEncodeAV1SessionCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1SessionCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1SessionCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1SessionCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1SessionCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1SessionCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1SessionCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1SessionCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `useMaxLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMaxLevel(MemorySegment segment, long index) { return (int) VH_useMaxLevel.get(segment, 0L, index); } + /// {@return `useMaxLevel`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMaxLevel(MemorySegment segment) { return VkVideoEncodeAV1SessionCreateInfoKHR.get_useMaxLevel(segment, 0L); } + /// {@return `useMaxLevel` at the given index} + /// @param index the index + public @CType("VkBool32") int useMaxLevelAt(long index) { return VkVideoEncodeAV1SessionCreateInfoKHR.get_useMaxLevel(this.segment(), index); } + /// {@return `useMaxLevel`} + public @CType("VkBool32") int useMaxLevel() { return VkVideoEncodeAV1SessionCreateInfoKHR.get_useMaxLevel(this.segment()); } + /// Sets `useMaxLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMaxLevel(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMaxLevel.set(segment, 0L, index, value); } + /// Sets `useMaxLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMaxLevel(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_useMaxLevel(segment, 0L, value); } + /// Sets `useMaxLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionCreateInfoKHR useMaxLevelAt(long index, @CType("VkBool32") int value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_useMaxLevel(this.segment(), index, value); return this; } + /// Sets `useMaxLevel` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionCreateInfoKHR useMaxLevel(@CType("VkBool32") int value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_useMaxLevel(this.segment(), value); return this; } + + /// {@return `maxLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1Level") int get_maxLevel(MemorySegment segment, long index) { return (int) VH_maxLevel.get(segment, 0L, index); } + /// {@return `maxLevel`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1Level") int get_maxLevel(MemorySegment segment) { return VkVideoEncodeAV1SessionCreateInfoKHR.get_maxLevel(segment, 0L); } + /// {@return `maxLevel` at the given index} + /// @param index the index + public @CType("StdVideoAV1Level") int maxLevelAt(long index) { return VkVideoEncodeAV1SessionCreateInfoKHR.get_maxLevel(this.segment(), index); } + /// {@return `maxLevel`} + public @CType("StdVideoAV1Level") int maxLevel() { return VkVideoEncodeAV1SessionCreateInfoKHR.get_maxLevel(this.segment()); } + /// Sets `maxLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLevel(MemorySegment segment, long index, @CType("StdVideoAV1Level") int value) { VH_maxLevel.set(segment, 0L, index, value); } + /// Sets `maxLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLevel(MemorySegment segment, @CType("StdVideoAV1Level") int value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_maxLevel(segment, 0L, value); } + /// Sets `maxLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionCreateInfoKHR maxLevelAt(long index, @CType("StdVideoAV1Level") int value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_maxLevel(this.segment(), index, value); return this; } + /// Sets `maxLevel` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionCreateInfoKHR maxLevel(@CType("StdVideoAV1Level") int value) { VkVideoEncodeAV1SessionCreateInfoKHR.set_maxLevel(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1SessionParametersCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1SessionParametersCreateInfoKHR.java new file mode 100644 index 00000000..1028a059 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeAV1SessionParametersCreateInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdSequenceHeader +/// [VarHandle][#VH_pStdSequenceHeader] - [Getter][#pStdSequenceHeader()] - [Setter][#pStdSequenceHeader(java.lang.foreign.MemorySegment)] +/// ### pStdDecoderModelInfo +/// [VarHandle][#VH_pStdDecoderModelInfo] - [Getter][#pStdDecoderModelInfo()] - [Setter][#pStdDecoderModelInfo(java.lang.foreign.MemorySegment)] +/// ### stdOperatingPointCount +/// [VarHandle][#VH_stdOperatingPointCount] - [Getter][#stdOperatingPointCount()] - [Setter][#stdOperatingPointCount(int)] +/// ### pStdOperatingPoints +/// [VarHandle][#VH_pStdOperatingPoints] - [Getter][#pStdOperatingPoints()] - [Setter][#pStdOperatingPoints(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeAV1SessionParametersCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoAV1SequenceHeader * pStdSequenceHeader; +/// const StdVideoEncodeAV1DecoderModelInfo * pStdDecoderModelInfo; +/// uint32_t stdOperatingPointCount; +/// const StdVideoEncodeAV1OperatingPointInfo * pStdOperatingPoints; +/// } VkVideoEncodeAV1SessionParametersCreateInfoKHR; +/// ``` +public final class VkVideoEncodeAV1SessionParametersCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeAV1SessionParametersCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdSequenceHeader"), + ValueLayout.ADDRESS.withName("pStdDecoderModelInfo"), + ValueLayout.JAVA_INT.withName("stdOperatingPointCount"), + ValueLayout.ADDRESS.withName("pStdOperatingPoints") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdSequenceHeader` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdSequenceHeader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdSequenceHeader")); + /// The [VarHandle] of `pStdDecoderModelInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdDecoderModelInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdDecoderModelInfo")); + /// The [VarHandle] of `stdOperatingPointCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdOperatingPointCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdOperatingPointCount")); + /// The [VarHandle] of `pStdOperatingPoints` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdOperatingPoints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdOperatingPoints")); + + /// Creates `VkVideoEncodeAV1SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeAV1SessionParametersCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeAV1SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1SessionParametersCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1SessionParametersCreateInfoKHR(segment); } + + /// Creates `VkVideoEncodeAV1SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1SessionParametersCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeAV1SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeAV1SessionParametersCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeAV1SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeAV1SessionParametersCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeAV1SessionParametersCreateInfoKHR` + public static VkVideoEncodeAV1SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeAV1SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeAV1SessionParametersCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeAV1SessionParametersCreateInfoKHR` + public static VkVideoEncodeAV1SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeAV1SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdSequenceHeader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment get_pStdSequenceHeader(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdSequenceHeader.get(segment, 0L, index); } + /// {@return `pStdSequenceHeader`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment get_pStdSequenceHeader(MemorySegment segment) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pStdSequenceHeader(segment, 0L); } + /// {@return `pStdSequenceHeader` at the given index} + /// @param index the index + public @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment pStdSequenceHeaderAt(long index) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pStdSequenceHeader(this.segment(), index); } + /// {@return `pStdSequenceHeader`} + public @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment pStdSequenceHeader() { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pStdSequenceHeader(this.segment()); } + /// Sets `pStdSequenceHeader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdSequenceHeader(MemorySegment segment, long index, @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment value) { VH_pStdSequenceHeader.set(segment, 0L, index, value); } + /// Sets `pStdSequenceHeader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdSequenceHeader(MemorySegment segment, @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pStdSequenceHeader(segment, 0L, value); } + /// Sets `pStdSequenceHeader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR pStdSequenceHeaderAt(long index, @CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pStdSequenceHeader(this.segment(), index, value); return this; } + /// Sets `pStdSequenceHeader` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR pStdSequenceHeader(@CType("const StdVideoAV1SequenceHeader *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pStdSequenceHeader(this.segment(), value); return this; } + + /// {@return `pStdDecoderModelInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeAV1DecoderModelInfo *") java.lang.foreign.MemorySegment get_pStdDecoderModelInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdDecoderModelInfo.get(segment, 0L, index); } + /// {@return `pStdDecoderModelInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeAV1DecoderModelInfo *") java.lang.foreign.MemorySegment get_pStdDecoderModelInfo(MemorySegment segment) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pStdDecoderModelInfo(segment, 0L); } + /// {@return `pStdDecoderModelInfo` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeAV1DecoderModelInfo *") java.lang.foreign.MemorySegment pStdDecoderModelInfoAt(long index) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pStdDecoderModelInfo(this.segment(), index); } + /// {@return `pStdDecoderModelInfo`} + public @CType("const StdVideoEncodeAV1DecoderModelInfo *") java.lang.foreign.MemorySegment pStdDecoderModelInfo() { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pStdDecoderModelInfo(this.segment()); } + /// Sets `pStdDecoderModelInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdDecoderModelInfo(MemorySegment segment, long index, @CType("const StdVideoEncodeAV1DecoderModelInfo *") java.lang.foreign.MemorySegment value) { VH_pStdDecoderModelInfo.set(segment, 0L, index, value); } + /// Sets `pStdDecoderModelInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdDecoderModelInfo(MemorySegment segment, @CType("const StdVideoEncodeAV1DecoderModelInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pStdDecoderModelInfo(segment, 0L, value); } + /// Sets `pStdDecoderModelInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR pStdDecoderModelInfoAt(long index, @CType("const StdVideoEncodeAV1DecoderModelInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pStdDecoderModelInfo(this.segment(), index, value); return this; } + /// Sets `pStdDecoderModelInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR pStdDecoderModelInfo(@CType("const StdVideoEncodeAV1DecoderModelInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pStdDecoderModelInfo(this.segment(), value); return this; } + + /// {@return `stdOperatingPointCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdOperatingPointCount(MemorySegment segment, long index) { return (int) VH_stdOperatingPointCount.get(segment, 0L, index); } + /// {@return `stdOperatingPointCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdOperatingPointCount(MemorySegment segment) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_stdOperatingPointCount(segment, 0L); } + /// {@return `stdOperatingPointCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdOperatingPointCountAt(long index) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_stdOperatingPointCount(this.segment(), index); } + /// {@return `stdOperatingPointCount`} + public @CType("uint32_t") int stdOperatingPointCount() { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_stdOperatingPointCount(this.segment()); } + /// Sets `stdOperatingPointCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdOperatingPointCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdOperatingPointCount.set(segment, 0L, index, value); } + /// Sets `stdOperatingPointCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdOperatingPointCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_stdOperatingPointCount(segment, 0L, value); } + /// Sets `stdOperatingPointCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR stdOperatingPointCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_stdOperatingPointCount(this.segment(), index, value); return this; } + /// Sets `stdOperatingPointCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR stdOperatingPointCount(@CType("uint32_t") int value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_stdOperatingPointCount(this.segment(), value); return this; } + + /// {@return `pStdOperatingPoints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeAV1OperatingPointInfo *") java.lang.foreign.MemorySegment get_pStdOperatingPoints(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdOperatingPoints.get(segment, 0L, index); } + /// {@return `pStdOperatingPoints`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeAV1OperatingPointInfo *") java.lang.foreign.MemorySegment get_pStdOperatingPoints(MemorySegment segment) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pStdOperatingPoints(segment, 0L); } + /// {@return `pStdOperatingPoints` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeAV1OperatingPointInfo *") java.lang.foreign.MemorySegment pStdOperatingPointsAt(long index) { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pStdOperatingPoints(this.segment(), index); } + /// {@return `pStdOperatingPoints`} + public @CType("const StdVideoEncodeAV1OperatingPointInfo *") java.lang.foreign.MemorySegment pStdOperatingPoints() { return VkVideoEncodeAV1SessionParametersCreateInfoKHR.get_pStdOperatingPoints(this.segment()); } + /// Sets `pStdOperatingPoints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdOperatingPoints(MemorySegment segment, long index, @CType("const StdVideoEncodeAV1OperatingPointInfo *") java.lang.foreign.MemorySegment value) { VH_pStdOperatingPoints.set(segment, 0L, index, value); } + /// Sets `pStdOperatingPoints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdOperatingPoints(MemorySegment segment, @CType("const StdVideoEncodeAV1OperatingPointInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pStdOperatingPoints(segment, 0L, value); } + /// Sets `pStdOperatingPoints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR pStdOperatingPointsAt(long index, @CType("const StdVideoEncodeAV1OperatingPointInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pStdOperatingPoints(this.segment(), index, value); return this; } + /// Sets `pStdOperatingPoints` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeAV1SessionParametersCreateInfoKHR pStdOperatingPoints(@CType("const StdVideoEncodeAV1OperatingPointInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeAV1SessionParametersCreateInfoKHR.set_pStdOperatingPoints(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeCapabilitiesKHR.java new file mode 100644 index 00000000..e8d3587b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeCapabilitiesKHR.java @@ -0,0 +1,409 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### rateControlModes +/// [VarHandle][#VH_rateControlModes] - [Getter][#rateControlModes()] - [Setter][#rateControlModes(int)] +/// ### maxRateControlLayers +/// [VarHandle][#VH_maxRateControlLayers] - [Getter][#maxRateControlLayers()] - [Setter][#maxRateControlLayers(int)] +/// ### maxBitrate +/// [VarHandle][#VH_maxBitrate] - [Getter][#maxBitrate()] - [Setter][#maxBitrate(long)] +/// ### maxQualityLevels +/// [VarHandle][#VH_maxQualityLevels] - [Getter][#maxQualityLevels()] - [Setter][#maxQualityLevels(int)] +/// ### encodeInputPictureGranularity +/// [Byte offset][#OFFSET_encodeInputPictureGranularity] - [Memory layout][#ML_encodeInputPictureGranularity] - [Getter][#encodeInputPictureGranularity()] - [Setter][#encodeInputPictureGranularity(java.lang.foreign.MemorySegment)] +/// ### supportedEncodeFeedbackFlags +/// [VarHandle][#VH_supportedEncodeFeedbackFlags] - [Getter][#supportedEncodeFeedbackFlags()] - [Setter][#supportedEncodeFeedbackFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeCapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoEncodeCapabilityFlagsKHR flags; +/// VkVideoEncodeRateControlModeFlagsKHR rateControlModes; +/// uint32_t maxRateControlLayers; +/// uint64_t maxBitrate; +/// uint32_t maxQualityLevels; +/// VkExtent2D encodeInputPictureGranularity; +/// VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags; +/// } VkVideoEncodeCapabilitiesKHR; +/// ``` +public final class VkVideoEncodeCapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("rateControlModes"), + ValueLayout.JAVA_INT.withName("maxRateControlLayers"), + ValueLayout.JAVA_LONG.withName("maxBitrate"), + ValueLayout.JAVA_INT.withName("maxQualityLevels"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("encodeInputPictureGranularity"), + ValueLayout.JAVA_INT.withName("supportedEncodeFeedbackFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `rateControlModes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rateControlModes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rateControlModes")); + /// The [VarHandle] of `maxRateControlLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxRateControlLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxRateControlLayers")); + /// The [VarHandle] of `maxBitrate` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxBitrate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBitrate")); + /// The [VarHandle] of `maxQualityLevels` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxQualityLevels = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxQualityLevels")); + /// The byte offset of `encodeInputPictureGranularity`. + public static final long OFFSET_encodeInputPictureGranularity = LAYOUT.byteOffset(PathElement.groupElement("encodeInputPictureGranularity")); + /// The memory layout of `encodeInputPictureGranularity`. + public static final MemoryLayout ML_encodeInputPictureGranularity = LAYOUT.select(PathElement.groupElement("encodeInputPictureGranularity")); + /// The [VarHandle] of `supportedEncodeFeedbackFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedEncodeFeedbackFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedEncodeFeedbackFlags")); + + /// Creates `VkVideoEncodeCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeCapabilitiesKHR(segment); } + + /// Creates `VkVideoEncodeCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeCapabilitiesKHR` + public static VkVideoEncodeCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeCapabilitiesKHR` + public static VkVideoEncodeCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeCapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeCapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeCapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeCapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeCapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeCapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeCapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeCapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeCapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeCapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeCapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeCapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeCapabilityFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeCapabilityFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoEncodeCapabilitiesKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeCapabilityFlagsKHR") int flagsAt(long index) { return VkVideoEncodeCapabilitiesKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoEncodeCapabilityFlagsKHR") int flags() { return VkVideoEncodeCapabilitiesKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoEncodeCapabilityFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoEncodeCapabilityFlagsKHR") int value) { VkVideoEncodeCapabilitiesKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR flagsAt(long index, @CType("VkVideoEncodeCapabilityFlagsKHR") int value) { VkVideoEncodeCapabilitiesKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR flags(@CType("VkVideoEncodeCapabilityFlagsKHR") int value) { VkVideoEncodeCapabilitiesKHR.set_flags(this.segment(), value); return this; } + + /// {@return `rateControlModes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeRateControlModeFlagsKHR") int get_rateControlModes(MemorySegment segment, long index) { return (int) VH_rateControlModes.get(segment, 0L, index); } + /// {@return `rateControlModes`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeRateControlModeFlagsKHR") int get_rateControlModes(MemorySegment segment) { return VkVideoEncodeCapabilitiesKHR.get_rateControlModes(segment, 0L); } + /// {@return `rateControlModes` at the given index} + /// @param index the index + public @CType("VkVideoEncodeRateControlModeFlagsKHR") int rateControlModesAt(long index) { return VkVideoEncodeCapabilitiesKHR.get_rateControlModes(this.segment(), index); } + /// {@return `rateControlModes`} + public @CType("VkVideoEncodeRateControlModeFlagsKHR") int rateControlModes() { return VkVideoEncodeCapabilitiesKHR.get_rateControlModes(this.segment()); } + /// Sets `rateControlModes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rateControlModes(MemorySegment segment, long index, @CType("VkVideoEncodeRateControlModeFlagsKHR") int value) { VH_rateControlModes.set(segment, 0L, index, value); } + /// Sets `rateControlModes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rateControlModes(MemorySegment segment, @CType("VkVideoEncodeRateControlModeFlagsKHR") int value) { VkVideoEncodeCapabilitiesKHR.set_rateControlModes(segment, 0L, value); } + /// Sets `rateControlModes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR rateControlModesAt(long index, @CType("VkVideoEncodeRateControlModeFlagsKHR") int value) { VkVideoEncodeCapabilitiesKHR.set_rateControlModes(this.segment(), index, value); return this; } + /// Sets `rateControlModes` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR rateControlModes(@CType("VkVideoEncodeRateControlModeFlagsKHR") int value) { VkVideoEncodeCapabilitiesKHR.set_rateControlModes(this.segment(), value); return this; } + + /// {@return `maxRateControlLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxRateControlLayers(MemorySegment segment, long index) { return (int) VH_maxRateControlLayers.get(segment, 0L, index); } + /// {@return `maxRateControlLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxRateControlLayers(MemorySegment segment) { return VkVideoEncodeCapabilitiesKHR.get_maxRateControlLayers(segment, 0L); } + /// {@return `maxRateControlLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxRateControlLayersAt(long index) { return VkVideoEncodeCapabilitiesKHR.get_maxRateControlLayers(this.segment(), index); } + /// {@return `maxRateControlLayers`} + public @CType("uint32_t") int maxRateControlLayers() { return VkVideoEncodeCapabilitiesKHR.get_maxRateControlLayers(this.segment()); } + /// Sets `maxRateControlLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxRateControlLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxRateControlLayers.set(segment, 0L, index, value); } + /// Sets `maxRateControlLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxRateControlLayers(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeCapabilitiesKHR.set_maxRateControlLayers(segment, 0L, value); } + /// Sets `maxRateControlLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR maxRateControlLayersAt(long index, @CType("uint32_t") int value) { VkVideoEncodeCapabilitiesKHR.set_maxRateControlLayers(this.segment(), index, value); return this; } + /// Sets `maxRateControlLayers` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR maxRateControlLayers(@CType("uint32_t") int value) { VkVideoEncodeCapabilitiesKHR.set_maxRateControlLayers(this.segment(), value); return this; } + + /// {@return `maxBitrate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxBitrate(MemorySegment segment, long index) { return (long) VH_maxBitrate.get(segment, 0L, index); } + /// {@return `maxBitrate`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxBitrate(MemorySegment segment) { return VkVideoEncodeCapabilitiesKHR.get_maxBitrate(segment, 0L); } + /// {@return `maxBitrate` at the given index} + /// @param index the index + public @CType("uint64_t") long maxBitrateAt(long index) { return VkVideoEncodeCapabilitiesKHR.get_maxBitrate(this.segment(), index); } + /// {@return `maxBitrate`} + public @CType("uint64_t") long maxBitrate() { return VkVideoEncodeCapabilitiesKHR.get_maxBitrate(this.segment()); } + /// Sets `maxBitrate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBitrate(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxBitrate.set(segment, 0L, index, value); } + /// Sets `maxBitrate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBitrate(MemorySegment segment, @CType("uint64_t") long value) { VkVideoEncodeCapabilitiesKHR.set_maxBitrate(segment, 0L, value); } + /// Sets `maxBitrate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR maxBitrateAt(long index, @CType("uint64_t") long value) { VkVideoEncodeCapabilitiesKHR.set_maxBitrate(this.segment(), index, value); return this; } + /// Sets `maxBitrate` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR maxBitrate(@CType("uint64_t") long value) { VkVideoEncodeCapabilitiesKHR.set_maxBitrate(this.segment(), value); return this; } + + /// {@return `maxQualityLevels` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxQualityLevels(MemorySegment segment, long index) { return (int) VH_maxQualityLevels.get(segment, 0L, index); } + /// {@return `maxQualityLevels`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxQualityLevels(MemorySegment segment) { return VkVideoEncodeCapabilitiesKHR.get_maxQualityLevels(segment, 0L); } + /// {@return `maxQualityLevels` at the given index} + /// @param index the index + public @CType("uint32_t") int maxQualityLevelsAt(long index) { return VkVideoEncodeCapabilitiesKHR.get_maxQualityLevels(this.segment(), index); } + /// {@return `maxQualityLevels`} + public @CType("uint32_t") int maxQualityLevels() { return VkVideoEncodeCapabilitiesKHR.get_maxQualityLevels(this.segment()); } + /// Sets `maxQualityLevels` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQualityLevels(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxQualityLevels.set(segment, 0L, index, value); } + /// Sets `maxQualityLevels` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQualityLevels(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeCapabilitiesKHR.set_maxQualityLevels(segment, 0L, value); } + /// Sets `maxQualityLevels` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR maxQualityLevelsAt(long index, @CType("uint32_t") int value) { VkVideoEncodeCapabilitiesKHR.set_maxQualityLevels(this.segment(), index, value); return this; } + /// Sets `maxQualityLevels` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR maxQualityLevels(@CType("uint32_t") int value) { VkVideoEncodeCapabilitiesKHR.set_maxQualityLevels(this.segment(), value); return this; } + + /// {@return `encodeInputPictureGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_encodeInputPictureGranularity(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_encodeInputPictureGranularity, index), ML_encodeInputPictureGranularity); } + /// {@return `encodeInputPictureGranularity`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_encodeInputPictureGranularity(MemorySegment segment) { return VkVideoEncodeCapabilitiesKHR.get_encodeInputPictureGranularity(segment, 0L); } + /// {@return `encodeInputPictureGranularity` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment encodeInputPictureGranularityAt(long index) { return VkVideoEncodeCapabilitiesKHR.get_encodeInputPictureGranularity(this.segment(), index); } + /// {@return `encodeInputPictureGranularity`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment encodeInputPictureGranularity() { return VkVideoEncodeCapabilitiesKHR.get_encodeInputPictureGranularity(this.segment()); } + /// Sets `encodeInputPictureGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_encodeInputPictureGranularity(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_encodeInputPictureGranularity, index), ML_encodeInputPictureGranularity.byteSize()); } + /// Sets `encodeInputPictureGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_encodeInputPictureGranularity(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeCapabilitiesKHR.set_encodeInputPictureGranularity(segment, 0L, value); } + /// Sets `encodeInputPictureGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR encodeInputPictureGranularityAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeCapabilitiesKHR.set_encodeInputPictureGranularity(this.segment(), index, value); return this; } + /// Sets `encodeInputPictureGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR encodeInputPictureGranularity(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeCapabilitiesKHR.set_encodeInputPictureGranularity(this.segment(), value); return this; } + + /// {@return `supportedEncodeFeedbackFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeFeedbackFlagsKHR") int get_supportedEncodeFeedbackFlags(MemorySegment segment, long index) { return (int) VH_supportedEncodeFeedbackFlags.get(segment, 0L, index); } + /// {@return `supportedEncodeFeedbackFlags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeFeedbackFlagsKHR") int get_supportedEncodeFeedbackFlags(MemorySegment segment) { return VkVideoEncodeCapabilitiesKHR.get_supportedEncodeFeedbackFlags(segment, 0L); } + /// {@return `supportedEncodeFeedbackFlags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeFeedbackFlagsKHR") int supportedEncodeFeedbackFlagsAt(long index) { return VkVideoEncodeCapabilitiesKHR.get_supportedEncodeFeedbackFlags(this.segment(), index); } + /// {@return `supportedEncodeFeedbackFlags`} + public @CType("VkVideoEncodeFeedbackFlagsKHR") int supportedEncodeFeedbackFlags() { return VkVideoEncodeCapabilitiesKHR.get_supportedEncodeFeedbackFlags(this.segment()); } + /// Sets `supportedEncodeFeedbackFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedEncodeFeedbackFlags(MemorySegment segment, long index, @CType("VkVideoEncodeFeedbackFlagsKHR") int value) { VH_supportedEncodeFeedbackFlags.set(segment, 0L, index, value); } + /// Sets `supportedEncodeFeedbackFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedEncodeFeedbackFlags(MemorySegment segment, @CType("VkVideoEncodeFeedbackFlagsKHR") int value) { VkVideoEncodeCapabilitiesKHR.set_supportedEncodeFeedbackFlags(segment, 0L, value); } + /// Sets `supportedEncodeFeedbackFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR supportedEncodeFeedbackFlagsAt(long index, @CType("VkVideoEncodeFeedbackFlagsKHR") int value) { VkVideoEncodeCapabilitiesKHR.set_supportedEncodeFeedbackFlags(this.segment(), index, value); return this; } + /// Sets `supportedEncodeFeedbackFlags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeCapabilitiesKHR supportedEncodeFeedbackFlags(@CType("VkVideoEncodeFeedbackFlagsKHR") int value) { VkVideoEncodeCapabilitiesKHR.set_supportedEncodeFeedbackFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264CapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264CapabilitiesKHR.java new file mode 100644 index 00000000..2e525ced --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264CapabilitiesKHR.java @@ -0,0 +1,629 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### maxLevelIdc +/// [VarHandle][#VH_maxLevelIdc] - [Getter][#maxLevelIdc()] - [Setter][#maxLevelIdc(int)] +/// ### maxSliceCount +/// [VarHandle][#VH_maxSliceCount] - [Getter][#maxSliceCount()] - [Setter][#maxSliceCount(int)] +/// ### maxPPictureL0ReferenceCount +/// [VarHandle][#VH_maxPPictureL0ReferenceCount] - [Getter][#maxPPictureL0ReferenceCount()] - [Setter][#maxPPictureL0ReferenceCount(int)] +/// ### maxBPictureL0ReferenceCount +/// [VarHandle][#VH_maxBPictureL0ReferenceCount] - [Getter][#maxBPictureL0ReferenceCount()] - [Setter][#maxBPictureL0ReferenceCount(int)] +/// ### maxL1ReferenceCount +/// [VarHandle][#VH_maxL1ReferenceCount] - [Getter][#maxL1ReferenceCount()] - [Setter][#maxL1ReferenceCount(int)] +/// ### maxTemporalLayerCount +/// [VarHandle][#VH_maxTemporalLayerCount] - [Getter][#maxTemporalLayerCount()] - [Setter][#maxTemporalLayerCount(int)] +/// ### expectDyadicTemporalLayerPattern +/// [VarHandle][#VH_expectDyadicTemporalLayerPattern] - [Getter][#expectDyadicTemporalLayerPattern()] - [Setter][#expectDyadicTemporalLayerPattern(int)] +/// ### minQp +/// [VarHandle][#VH_minQp] - [Getter][#minQp()] - [Setter][#minQp(int)] +/// ### maxQp +/// [VarHandle][#VH_maxQp] - [Getter][#maxQp()] - [Setter][#maxQp(int)] +/// ### prefersGopRemainingFrames +/// [VarHandle][#VH_prefersGopRemainingFrames] - [Getter][#prefersGopRemainingFrames()] - [Setter][#prefersGopRemainingFrames(int)] +/// ### requiresGopRemainingFrames +/// [VarHandle][#VH_requiresGopRemainingFrames] - [Getter][#requiresGopRemainingFrames()] - [Setter][#requiresGopRemainingFrames(int)] +/// ### stdSyntaxFlags +/// [VarHandle][#VH_stdSyntaxFlags] - [Getter][#stdSyntaxFlags()] - [Setter][#stdSyntaxFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264CapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoEncodeH264CapabilityFlagsKHR flags; +/// StdVideoH264LevelIdc maxLevelIdc; +/// uint32_t maxSliceCount; +/// uint32_t maxPPictureL0ReferenceCount; +/// uint32_t maxBPictureL0ReferenceCount; +/// uint32_t maxL1ReferenceCount; +/// uint32_t maxTemporalLayerCount; +/// VkBool32 expectDyadicTemporalLayerPattern; +/// int32_t minQp; +/// int32_t maxQp; +/// VkBool32 prefersGopRemainingFrames; +/// VkBool32 requiresGopRemainingFrames; +/// VkVideoEncodeH264StdFlagsKHR stdSyntaxFlags; +/// } VkVideoEncodeH264CapabilitiesKHR; +/// ``` +public final class VkVideoEncodeH264CapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264CapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("maxLevelIdc"), + ValueLayout.JAVA_INT.withName("maxSliceCount"), + ValueLayout.JAVA_INT.withName("maxPPictureL0ReferenceCount"), + ValueLayout.JAVA_INT.withName("maxBPictureL0ReferenceCount"), + ValueLayout.JAVA_INT.withName("maxL1ReferenceCount"), + ValueLayout.JAVA_INT.withName("maxTemporalLayerCount"), + ValueLayout.JAVA_INT.withName("expectDyadicTemporalLayerPattern"), + ValueLayout.JAVA_INT.withName("minQp"), + ValueLayout.JAVA_INT.withName("maxQp"), + ValueLayout.JAVA_INT.withName("prefersGopRemainingFrames"), + ValueLayout.JAVA_INT.withName("requiresGopRemainingFrames"), + ValueLayout.JAVA_INT.withName("stdSyntaxFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `maxLevelIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxLevelIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLevelIdc")); + /// The [VarHandle] of `maxSliceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSliceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSliceCount")); + /// The [VarHandle] of `maxPPictureL0ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPPictureL0ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPPictureL0ReferenceCount")); + /// The [VarHandle] of `maxBPictureL0ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxBPictureL0ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBPictureL0ReferenceCount")); + /// The [VarHandle] of `maxL1ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxL1ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxL1ReferenceCount")); + /// The [VarHandle] of `maxTemporalLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTemporalLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTemporalLayerCount")); + /// The [VarHandle] of `expectDyadicTemporalLayerPattern` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_expectDyadicTemporalLayerPattern = LAYOUT.arrayElementVarHandle(PathElement.groupElement("expectDyadicTemporalLayerPattern")); + /// The [VarHandle] of `minQp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minQp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minQp")); + /// The [VarHandle] of `maxQp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxQp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxQp")); + /// The [VarHandle] of `prefersGopRemainingFrames` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_prefersGopRemainingFrames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("prefersGopRemainingFrames")); + /// The [VarHandle] of `requiresGopRemainingFrames` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_requiresGopRemainingFrames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("requiresGopRemainingFrames")); + /// The [VarHandle] of `stdSyntaxFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdSyntaxFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdSyntaxFlags")); + + /// Creates `VkVideoEncodeH264CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264CapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264CapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264CapabilitiesKHR(segment); } + + /// Creates `VkVideoEncodeH264CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264CapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264CapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264CapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264CapabilitiesKHR` + public static VkVideoEncodeH264CapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264CapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264CapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264CapabilitiesKHR` + public static VkVideoEncodeH264CapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264CapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264CapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264CapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264CapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264CapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264CapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264CapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264CapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264CapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH264CapabilityFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH264CapabilityFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH264CapabilityFlagsKHR") int flagsAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoEncodeH264CapabilityFlagsKHR") int flags() { return VkVideoEncodeH264CapabilitiesKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoEncodeH264CapabilityFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoEncodeH264CapabilityFlagsKHR") int value) { VkVideoEncodeH264CapabilitiesKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR flagsAt(long index, @CType("VkVideoEncodeH264CapabilityFlagsKHR") int value) { VkVideoEncodeH264CapabilitiesKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR flags(@CType("VkVideoEncodeH264CapabilityFlagsKHR") int value) { VkVideoEncodeH264CapabilitiesKHR.set_flags(this.segment(), value); return this; } + + /// {@return `maxLevelIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264LevelIdc") int get_maxLevelIdc(MemorySegment segment, long index) { return (int) VH_maxLevelIdc.get(segment, 0L, index); } + /// {@return `maxLevelIdc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264LevelIdc") int get_maxLevelIdc(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_maxLevelIdc(segment, 0L); } + /// {@return `maxLevelIdc` at the given index} + /// @param index the index + public @CType("StdVideoH264LevelIdc") int maxLevelIdcAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_maxLevelIdc(this.segment(), index); } + /// {@return `maxLevelIdc`} + public @CType("StdVideoH264LevelIdc") int maxLevelIdc() { return VkVideoEncodeH264CapabilitiesKHR.get_maxLevelIdc(this.segment()); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, long index, @CType("StdVideoH264LevelIdc") int value) { VH_maxLevelIdc.set(segment, 0L, index, value); } + /// Sets `maxLevelIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, @CType("StdVideoH264LevelIdc") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxLevelIdc(segment, 0L, value); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxLevelIdcAt(long index, @CType("StdVideoH264LevelIdc") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxLevelIdc(this.segment(), index, value); return this; } + /// Sets `maxLevelIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxLevelIdc(@CType("StdVideoH264LevelIdc") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxLevelIdc(this.segment(), value); return this; } + + /// {@return `maxSliceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSliceCount(MemorySegment segment, long index) { return (int) VH_maxSliceCount.get(segment, 0L, index); } + /// {@return `maxSliceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSliceCount(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_maxSliceCount(segment, 0L); } + /// {@return `maxSliceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSliceCountAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_maxSliceCount(this.segment(), index); } + /// {@return `maxSliceCount`} + public @CType("uint32_t") int maxSliceCount() { return VkVideoEncodeH264CapabilitiesKHR.get_maxSliceCount(this.segment()); } + /// Sets `maxSliceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSliceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSliceCount.set(segment, 0L, index, value); } + /// Sets `maxSliceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSliceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxSliceCount(segment, 0L, value); } + /// Sets `maxSliceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxSliceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxSliceCount(this.segment(), index, value); return this; } + /// Sets `maxSliceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxSliceCount(@CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxSliceCount(this.segment(), value); return this; } + + /// {@return `maxPPictureL0ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPPictureL0ReferenceCount(MemorySegment segment, long index) { return (int) VH_maxPPictureL0ReferenceCount.get(segment, 0L, index); } + /// {@return `maxPPictureL0ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPPictureL0ReferenceCount(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_maxPPictureL0ReferenceCount(segment, 0L); } + /// {@return `maxPPictureL0ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPPictureL0ReferenceCountAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_maxPPictureL0ReferenceCount(this.segment(), index); } + /// {@return `maxPPictureL0ReferenceCount`} + public @CType("uint32_t") int maxPPictureL0ReferenceCount() { return VkVideoEncodeH264CapabilitiesKHR.get_maxPPictureL0ReferenceCount(this.segment()); } + /// Sets `maxPPictureL0ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPPictureL0ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPPictureL0ReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxPPictureL0ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPPictureL0ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxPPictureL0ReferenceCount(segment, 0L, value); } + /// Sets `maxPPictureL0ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxPPictureL0ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxPPictureL0ReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxPPictureL0ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxPPictureL0ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxPPictureL0ReferenceCount(this.segment(), value); return this; } + + /// {@return `maxBPictureL0ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxBPictureL0ReferenceCount(MemorySegment segment, long index) { return (int) VH_maxBPictureL0ReferenceCount.get(segment, 0L, index); } + /// {@return `maxBPictureL0ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxBPictureL0ReferenceCount(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_maxBPictureL0ReferenceCount(segment, 0L); } + /// {@return `maxBPictureL0ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxBPictureL0ReferenceCountAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_maxBPictureL0ReferenceCount(this.segment(), index); } + /// {@return `maxBPictureL0ReferenceCount`} + public @CType("uint32_t") int maxBPictureL0ReferenceCount() { return VkVideoEncodeH264CapabilitiesKHR.get_maxBPictureL0ReferenceCount(this.segment()); } + /// Sets `maxBPictureL0ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBPictureL0ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxBPictureL0ReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxBPictureL0ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBPictureL0ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxBPictureL0ReferenceCount(segment, 0L, value); } + /// Sets `maxBPictureL0ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxBPictureL0ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxBPictureL0ReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxBPictureL0ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxBPictureL0ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxBPictureL0ReferenceCount(this.segment(), value); return this; } + + /// {@return `maxL1ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxL1ReferenceCount(MemorySegment segment, long index) { return (int) VH_maxL1ReferenceCount.get(segment, 0L, index); } + /// {@return `maxL1ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxL1ReferenceCount(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_maxL1ReferenceCount(segment, 0L); } + /// {@return `maxL1ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxL1ReferenceCountAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_maxL1ReferenceCount(this.segment(), index); } + /// {@return `maxL1ReferenceCount`} + public @CType("uint32_t") int maxL1ReferenceCount() { return VkVideoEncodeH264CapabilitiesKHR.get_maxL1ReferenceCount(this.segment()); } + /// Sets `maxL1ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxL1ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxL1ReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxL1ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxL1ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxL1ReferenceCount(segment, 0L, value); } + /// Sets `maxL1ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxL1ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxL1ReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxL1ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxL1ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxL1ReferenceCount(this.segment(), value); return this; } + + /// {@return `maxTemporalLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTemporalLayerCount(MemorySegment segment, long index) { return (int) VH_maxTemporalLayerCount.get(segment, 0L, index); } + /// {@return `maxTemporalLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTemporalLayerCount(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_maxTemporalLayerCount(segment, 0L); } + /// {@return `maxTemporalLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTemporalLayerCountAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_maxTemporalLayerCount(this.segment(), index); } + /// {@return `maxTemporalLayerCount`} + public @CType("uint32_t") int maxTemporalLayerCount() { return VkVideoEncodeH264CapabilitiesKHR.get_maxTemporalLayerCount(this.segment()); } + /// Sets `maxTemporalLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTemporalLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTemporalLayerCount.set(segment, 0L, index, value); } + /// Sets `maxTemporalLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTemporalLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxTemporalLayerCount(segment, 0L, value); } + /// Sets `maxTemporalLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxTemporalLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxTemporalLayerCount(this.segment(), index, value); return this; } + /// Sets `maxTemporalLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxTemporalLayerCount(@CType("uint32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxTemporalLayerCount(this.segment(), value); return this; } + + /// {@return `expectDyadicTemporalLayerPattern` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_expectDyadicTemporalLayerPattern(MemorySegment segment, long index) { return (int) VH_expectDyadicTemporalLayerPattern.get(segment, 0L, index); } + /// {@return `expectDyadicTemporalLayerPattern`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_expectDyadicTemporalLayerPattern(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_expectDyadicTemporalLayerPattern(segment, 0L); } + /// {@return `expectDyadicTemporalLayerPattern` at the given index} + /// @param index the index + public @CType("VkBool32") int expectDyadicTemporalLayerPatternAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_expectDyadicTemporalLayerPattern(this.segment(), index); } + /// {@return `expectDyadicTemporalLayerPattern`} + public @CType("VkBool32") int expectDyadicTemporalLayerPattern() { return VkVideoEncodeH264CapabilitiesKHR.get_expectDyadicTemporalLayerPattern(this.segment()); } + /// Sets `expectDyadicTemporalLayerPattern` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_expectDyadicTemporalLayerPattern(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_expectDyadicTemporalLayerPattern.set(segment, 0L, index, value); } + /// Sets `expectDyadicTemporalLayerPattern` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_expectDyadicTemporalLayerPattern(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264CapabilitiesKHR.set_expectDyadicTemporalLayerPattern(segment, 0L, value); } + /// Sets `expectDyadicTemporalLayerPattern` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR expectDyadicTemporalLayerPatternAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264CapabilitiesKHR.set_expectDyadicTemporalLayerPattern(this.segment(), index, value); return this; } + /// Sets `expectDyadicTemporalLayerPattern` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR expectDyadicTemporalLayerPattern(@CType("VkBool32") int value) { VkVideoEncodeH264CapabilitiesKHR.set_expectDyadicTemporalLayerPattern(this.segment(), value); return this; } + + /// {@return `minQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_minQp(MemorySegment segment, long index) { return (int) VH_minQp.get(segment, 0L, index); } + /// {@return `minQp`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_minQp(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_minQp(segment, 0L); } + /// {@return `minQp` at the given index} + /// @param index the index + public @CType("int32_t") int minQpAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_minQp(this.segment(), index); } + /// {@return `minQp`} + public @CType("int32_t") int minQp() { return VkVideoEncodeH264CapabilitiesKHR.get_minQp(this.segment()); } + /// Sets `minQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minQp(MemorySegment segment, long index, @CType("int32_t") int value) { VH_minQp.set(segment, 0L, index, value); } + /// Sets `minQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minQp(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_minQp(segment, 0L, value); } + /// Sets `minQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR minQpAt(long index, @CType("int32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_minQp(this.segment(), index, value); return this; } + /// Sets `minQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR minQp(@CType("int32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_minQp(this.segment(), value); return this; } + + /// {@return `maxQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_maxQp(MemorySegment segment, long index) { return (int) VH_maxQp.get(segment, 0L, index); } + /// {@return `maxQp`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_maxQp(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_maxQp(segment, 0L); } + /// {@return `maxQp` at the given index} + /// @param index the index + public @CType("int32_t") int maxQpAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_maxQp(this.segment(), index); } + /// {@return `maxQp`} + public @CType("int32_t") int maxQp() { return VkVideoEncodeH264CapabilitiesKHR.get_maxQp(this.segment()); } + /// Sets `maxQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQp(MemorySegment segment, long index, @CType("int32_t") int value) { VH_maxQp.set(segment, 0L, index, value); } + /// Sets `maxQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQp(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxQp(segment, 0L, value); } + /// Sets `maxQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxQpAt(long index, @CType("int32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxQp(this.segment(), index, value); return this; } + /// Sets `maxQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR maxQp(@CType("int32_t") int value) { VkVideoEncodeH264CapabilitiesKHR.set_maxQp(this.segment(), value); return this; } + + /// {@return `prefersGopRemainingFrames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_prefersGopRemainingFrames(MemorySegment segment, long index) { return (int) VH_prefersGopRemainingFrames.get(segment, 0L, index); } + /// {@return `prefersGopRemainingFrames`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_prefersGopRemainingFrames(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_prefersGopRemainingFrames(segment, 0L); } + /// {@return `prefersGopRemainingFrames` at the given index} + /// @param index the index + public @CType("VkBool32") int prefersGopRemainingFramesAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_prefersGopRemainingFrames(this.segment(), index); } + /// {@return `prefersGopRemainingFrames`} + public @CType("VkBool32") int prefersGopRemainingFrames() { return VkVideoEncodeH264CapabilitiesKHR.get_prefersGopRemainingFrames(this.segment()); } + /// Sets `prefersGopRemainingFrames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_prefersGopRemainingFrames(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_prefersGopRemainingFrames.set(segment, 0L, index, value); } + /// Sets `prefersGopRemainingFrames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_prefersGopRemainingFrames(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264CapabilitiesKHR.set_prefersGopRemainingFrames(segment, 0L, value); } + /// Sets `prefersGopRemainingFrames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR prefersGopRemainingFramesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264CapabilitiesKHR.set_prefersGopRemainingFrames(this.segment(), index, value); return this; } + /// Sets `prefersGopRemainingFrames` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR prefersGopRemainingFrames(@CType("VkBool32") int value) { VkVideoEncodeH264CapabilitiesKHR.set_prefersGopRemainingFrames(this.segment(), value); return this; } + + /// {@return `requiresGopRemainingFrames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_requiresGopRemainingFrames(MemorySegment segment, long index) { return (int) VH_requiresGopRemainingFrames.get(segment, 0L, index); } + /// {@return `requiresGopRemainingFrames`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_requiresGopRemainingFrames(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_requiresGopRemainingFrames(segment, 0L); } + /// {@return `requiresGopRemainingFrames` at the given index} + /// @param index the index + public @CType("VkBool32") int requiresGopRemainingFramesAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_requiresGopRemainingFrames(this.segment(), index); } + /// {@return `requiresGopRemainingFrames`} + public @CType("VkBool32") int requiresGopRemainingFrames() { return VkVideoEncodeH264CapabilitiesKHR.get_requiresGopRemainingFrames(this.segment()); } + /// Sets `requiresGopRemainingFrames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_requiresGopRemainingFrames(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_requiresGopRemainingFrames.set(segment, 0L, index, value); } + /// Sets `requiresGopRemainingFrames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_requiresGopRemainingFrames(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264CapabilitiesKHR.set_requiresGopRemainingFrames(segment, 0L, value); } + /// Sets `requiresGopRemainingFrames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR requiresGopRemainingFramesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264CapabilitiesKHR.set_requiresGopRemainingFrames(this.segment(), index, value); return this; } + /// Sets `requiresGopRemainingFrames` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR requiresGopRemainingFrames(@CType("VkBool32") int value) { VkVideoEncodeH264CapabilitiesKHR.set_requiresGopRemainingFrames(this.segment(), value); return this; } + + /// {@return `stdSyntaxFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH264StdFlagsKHR") int get_stdSyntaxFlags(MemorySegment segment, long index) { return (int) VH_stdSyntaxFlags.get(segment, 0L, index); } + /// {@return `stdSyntaxFlags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH264StdFlagsKHR") int get_stdSyntaxFlags(MemorySegment segment) { return VkVideoEncodeH264CapabilitiesKHR.get_stdSyntaxFlags(segment, 0L); } + /// {@return `stdSyntaxFlags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH264StdFlagsKHR") int stdSyntaxFlagsAt(long index) { return VkVideoEncodeH264CapabilitiesKHR.get_stdSyntaxFlags(this.segment(), index); } + /// {@return `stdSyntaxFlags`} + public @CType("VkVideoEncodeH264StdFlagsKHR") int stdSyntaxFlags() { return VkVideoEncodeH264CapabilitiesKHR.get_stdSyntaxFlags(this.segment()); } + /// Sets `stdSyntaxFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdSyntaxFlags(MemorySegment segment, long index, @CType("VkVideoEncodeH264StdFlagsKHR") int value) { VH_stdSyntaxFlags.set(segment, 0L, index, value); } + /// Sets `stdSyntaxFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdSyntaxFlags(MemorySegment segment, @CType("VkVideoEncodeH264StdFlagsKHR") int value) { VkVideoEncodeH264CapabilitiesKHR.set_stdSyntaxFlags(segment, 0L, value); } + /// Sets `stdSyntaxFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR stdSyntaxFlagsAt(long index, @CType("VkVideoEncodeH264StdFlagsKHR") int value) { VkVideoEncodeH264CapabilitiesKHR.set_stdSyntaxFlags(this.segment(), index, value); return this; } + /// Sets `stdSyntaxFlags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264CapabilitiesKHR stdSyntaxFlags(@CType("VkVideoEncodeH264StdFlagsKHR") int value) { VkVideoEncodeH264CapabilitiesKHR.set_stdSyntaxFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264DpbSlotInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264DpbSlotInfoKHR.java new file mode 100644 index 00000000..d91fa504 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264DpbSlotInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdReferenceInfo +/// [VarHandle][#VH_pStdReferenceInfo] - [Getter][#pStdReferenceInfo()] - [Setter][#pStdReferenceInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264DpbSlotInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoEncodeH264ReferenceInfo * pStdReferenceInfo; +/// } VkVideoEncodeH264DpbSlotInfoKHR; +/// ``` +public final class VkVideoEncodeH264DpbSlotInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264DpbSlotInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdReferenceInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdReferenceInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdReferenceInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdReferenceInfo")); + + /// Creates `VkVideoEncodeH264DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264DpbSlotInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264DpbSlotInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264DpbSlotInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264DpbSlotInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264DpbSlotInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264DpbSlotInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264DpbSlotInfoKHR` + public static VkVideoEncodeH264DpbSlotInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264DpbSlotInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264DpbSlotInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264DpbSlotInfoKHR` + public static VkVideoEncodeH264DpbSlotInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264DpbSlotInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264DpbSlotInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264DpbSlotInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264DpbSlotInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264DpbSlotInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264DpbSlotInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264DpbSlotInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264DpbSlotInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264DpbSlotInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264DpbSlotInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264DpbSlotInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264DpbSlotInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264DpbSlotInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264DpbSlotInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264DpbSlotInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264DpbSlotInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264DpbSlotInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdReferenceInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH264ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdReferenceInfo.get(segment, 0L, index); } + /// {@return `pStdReferenceInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH264ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment) { return VkVideoEncodeH264DpbSlotInfoKHR.get_pStdReferenceInfo(segment, 0L); } + /// {@return `pStdReferenceInfo` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH264ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfoAt(long index) { return VkVideoEncodeH264DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment(), index); } + /// {@return `pStdReferenceInfo`} + public @CType("const StdVideoEncodeH264ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfo() { return VkVideoEncodeH264DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment()); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, long index, @CType("const StdVideoEncodeH264ReferenceInfo *") java.lang.foreign.MemorySegment value) { VH_pStdReferenceInfo.set(segment, 0L, index, value); } + /// Sets `pStdReferenceInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, @CType("const StdVideoEncodeH264ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264DpbSlotInfoKHR.set_pStdReferenceInfo(segment, 0L, value); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264DpbSlotInfoKHR pStdReferenceInfoAt(long index, @CType("const StdVideoEncodeH264ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), index, value); return this; } + /// Sets `pStdReferenceInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264DpbSlotInfoKHR pStdReferenceInfo(@CType("const StdVideoEncodeH264ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264FrameSizeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264FrameSizeKHR.java new file mode 100644 index 00000000..e4d64953 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264FrameSizeKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### frameISize +/// [VarHandle][#VH_frameISize] - [Getter][#frameISize()] - [Setter][#frameISize(int)] +/// ### framePSize +/// [VarHandle][#VH_framePSize] - [Getter][#framePSize()] - [Setter][#framePSize(int)] +/// ### frameBSize +/// [VarHandle][#VH_frameBSize] - [Getter][#frameBSize()] - [Setter][#frameBSize(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264FrameSizeKHR { +/// uint32_t frameISize; +/// uint32_t framePSize; +/// uint32_t frameBSize; +/// } VkVideoEncodeH264FrameSizeKHR; +/// ``` +public final class VkVideoEncodeH264FrameSizeKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264FrameSizeKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("frameISize"), + ValueLayout.JAVA_INT.withName("framePSize"), + ValueLayout.JAVA_INT.withName("frameBSize") + ); + /// The [VarHandle] of `frameISize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frameISize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameISize")); + /// The [VarHandle] of `framePSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_framePSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("framePSize")); + /// The [VarHandle] of `frameBSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frameBSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameBSize")); + + /// Creates `VkVideoEncodeH264FrameSizeKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264FrameSizeKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264FrameSizeKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264FrameSizeKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264FrameSizeKHR(segment); } + + /// Creates `VkVideoEncodeH264FrameSizeKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264FrameSizeKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264FrameSizeKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264FrameSizeKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264FrameSizeKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264FrameSizeKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264FrameSizeKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264FrameSizeKHR` + public static VkVideoEncodeH264FrameSizeKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264FrameSizeKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264FrameSizeKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264FrameSizeKHR` + public static VkVideoEncodeH264FrameSizeKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264FrameSizeKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `frameISize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frameISize(MemorySegment segment, long index) { return (int) VH_frameISize.get(segment, 0L, index); } + /// {@return `frameISize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frameISize(MemorySegment segment) { return VkVideoEncodeH264FrameSizeKHR.get_frameISize(segment, 0L); } + /// {@return `frameISize` at the given index} + /// @param index the index + public @CType("uint32_t") int frameISizeAt(long index) { return VkVideoEncodeH264FrameSizeKHR.get_frameISize(this.segment(), index); } + /// {@return `frameISize`} + public @CType("uint32_t") int frameISize() { return VkVideoEncodeH264FrameSizeKHR.get_frameISize(this.segment()); } + /// Sets `frameISize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameISize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frameISize.set(segment, 0L, index, value); } + /// Sets `frameISize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameISize(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264FrameSizeKHR.set_frameISize(segment, 0L, value); } + /// Sets `frameISize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264FrameSizeKHR frameISizeAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264FrameSizeKHR.set_frameISize(this.segment(), index, value); return this; } + /// Sets `frameISize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264FrameSizeKHR frameISize(@CType("uint32_t") int value) { VkVideoEncodeH264FrameSizeKHR.set_frameISize(this.segment(), value); return this; } + + /// {@return `framePSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_framePSize(MemorySegment segment, long index) { return (int) VH_framePSize.get(segment, 0L, index); } + /// {@return `framePSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_framePSize(MemorySegment segment) { return VkVideoEncodeH264FrameSizeKHR.get_framePSize(segment, 0L); } + /// {@return `framePSize` at the given index} + /// @param index the index + public @CType("uint32_t") int framePSizeAt(long index) { return VkVideoEncodeH264FrameSizeKHR.get_framePSize(this.segment(), index); } + /// {@return `framePSize`} + public @CType("uint32_t") int framePSize() { return VkVideoEncodeH264FrameSizeKHR.get_framePSize(this.segment()); } + /// Sets `framePSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_framePSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_framePSize.set(segment, 0L, index, value); } + /// Sets `framePSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_framePSize(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264FrameSizeKHR.set_framePSize(segment, 0L, value); } + /// Sets `framePSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264FrameSizeKHR framePSizeAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264FrameSizeKHR.set_framePSize(this.segment(), index, value); return this; } + /// Sets `framePSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264FrameSizeKHR framePSize(@CType("uint32_t") int value) { VkVideoEncodeH264FrameSizeKHR.set_framePSize(this.segment(), value); return this; } + + /// {@return `frameBSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frameBSize(MemorySegment segment, long index) { return (int) VH_frameBSize.get(segment, 0L, index); } + /// {@return `frameBSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frameBSize(MemorySegment segment) { return VkVideoEncodeH264FrameSizeKHR.get_frameBSize(segment, 0L); } + /// {@return `frameBSize` at the given index} + /// @param index the index + public @CType("uint32_t") int frameBSizeAt(long index) { return VkVideoEncodeH264FrameSizeKHR.get_frameBSize(this.segment(), index); } + /// {@return `frameBSize`} + public @CType("uint32_t") int frameBSize() { return VkVideoEncodeH264FrameSizeKHR.get_frameBSize(this.segment()); } + /// Sets `frameBSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameBSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frameBSize.set(segment, 0L, index, value); } + /// Sets `frameBSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameBSize(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264FrameSizeKHR.set_frameBSize(segment, 0L, value); } + /// Sets `frameBSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264FrameSizeKHR frameBSizeAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264FrameSizeKHR.set_frameBSize(this.segment(), index, value); return this; } + /// Sets `frameBSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264FrameSizeKHR frameBSize(@CType("uint32_t") int value) { VkVideoEncodeH264FrameSizeKHR.set_frameBSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264GopRemainingFrameInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264GopRemainingFrameInfoKHR.java new file mode 100644 index 00000000..b7373000 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264GopRemainingFrameInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### useGopRemainingFrames +/// [VarHandle][#VH_useGopRemainingFrames] - [Getter][#useGopRemainingFrames()] - [Setter][#useGopRemainingFrames(int)] +/// ### gopRemainingI +/// [VarHandle][#VH_gopRemainingI] - [Getter][#gopRemainingI()] - [Setter][#gopRemainingI(int)] +/// ### gopRemainingP +/// [VarHandle][#VH_gopRemainingP] - [Getter][#gopRemainingP()] - [Setter][#gopRemainingP(int)] +/// ### gopRemainingB +/// [VarHandle][#VH_gopRemainingB] - [Getter][#gopRemainingB()] - [Setter][#gopRemainingB(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264GopRemainingFrameInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 useGopRemainingFrames; +/// uint32_t gopRemainingI; +/// uint32_t gopRemainingP; +/// uint32_t gopRemainingB; +/// } VkVideoEncodeH264GopRemainingFrameInfoKHR; +/// ``` +public final class VkVideoEncodeH264GopRemainingFrameInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264GopRemainingFrameInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("useGopRemainingFrames"), + ValueLayout.JAVA_INT.withName("gopRemainingI"), + ValueLayout.JAVA_INT.withName("gopRemainingP"), + ValueLayout.JAVA_INT.withName("gopRemainingB") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `useGopRemainingFrames` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useGopRemainingFrames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useGopRemainingFrames")); + /// The [VarHandle] of `gopRemainingI` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopRemainingI = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopRemainingI")); + /// The [VarHandle] of `gopRemainingP` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopRemainingP = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopRemainingP")); + /// The [VarHandle] of `gopRemainingB` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopRemainingB = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopRemainingB")); + + /// Creates `VkVideoEncodeH264GopRemainingFrameInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264GopRemainingFrameInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264GopRemainingFrameInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264GopRemainingFrameInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264GopRemainingFrameInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264GopRemainingFrameInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264GopRemainingFrameInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264GopRemainingFrameInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264GopRemainingFrameInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264GopRemainingFrameInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264GopRemainingFrameInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264GopRemainingFrameInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264GopRemainingFrameInfoKHR` + public static VkVideoEncodeH264GopRemainingFrameInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264GopRemainingFrameInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264GopRemainingFrameInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264GopRemainingFrameInfoKHR` + public static VkVideoEncodeH264GopRemainingFrameInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264GopRemainingFrameInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `useGopRemainingFrames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useGopRemainingFrames(MemorySegment segment, long index) { return (int) VH_useGopRemainingFrames.get(segment, 0L, index); } + /// {@return `useGopRemainingFrames`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useGopRemainingFrames(MemorySegment segment) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_useGopRemainingFrames(segment, 0L); } + /// {@return `useGopRemainingFrames` at the given index} + /// @param index the index + public @CType("VkBool32") int useGopRemainingFramesAt(long index) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_useGopRemainingFrames(this.segment(), index); } + /// {@return `useGopRemainingFrames`} + public @CType("VkBool32") int useGopRemainingFrames() { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_useGopRemainingFrames(this.segment()); } + /// Sets `useGopRemainingFrames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useGopRemainingFrames(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useGopRemainingFrames.set(segment, 0L, index, value); } + /// Sets `useGopRemainingFrames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useGopRemainingFrames(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_useGopRemainingFrames(segment, 0L, value); } + /// Sets `useGopRemainingFrames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR useGopRemainingFramesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_useGopRemainingFrames(this.segment(), index, value); return this; } + /// Sets `useGopRemainingFrames` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR useGopRemainingFrames(@CType("VkBool32") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_useGopRemainingFrames(this.segment(), value); return this; } + + /// {@return `gopRemainingI` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopRemainingI(MemorySegment segment, long index) { return (int) VH_gopRemainingI.get(segment, 0L, index); } + /// {@return `gopRemainingI`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopRemainingI(MemorySegment segment) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_gopRemainingI(segment, 0L); } + /// {@return `gopRemainingI` at the given index} + /// @param index the index + public @CType("uint32_t") int gopRemainingIAt(long index) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_gopRemainingI(this.segment(), index); } + /// {@return `gopRemainingI`} + public @CType("uint32_t") int gopRemainingI() { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_gopRemainingI(this.segment()); } + /// Sets `gopRemainingI` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopRemainingI(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopRemainingI.set(segment, 0L, index, value); } + /// Sets `gopRemainingI` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopRemainingI(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_gopRemainingI(segment, 0L, value); } + /// Sets `gopRemainingI` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR gopRemainingIAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_gopRemainingI(this.segment(), index, value); return this; } + /// Sets `gopRemainingI` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR gopRemainingI(@CType("uint32_t") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_gopRemainingI(this.segment(), value); return this; } + + /// {@return `gopRemainingP` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopRemainingP(MemorySegment segment, long index) { return (int) VH_gopRemainingP.get(segment, 0L, index); } + /// {@return `gopRemainingP`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopRemainingP(MemorySegment segment) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_gopRemainingP(segment, 0L); } + /// {@return `gopRemainingP` at the given index} + /// @param index the index + public @CType("uint32_t") int gopRemainingPAt(long index) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_gopRemainingP(this.segment(), index); } + /// {@return `gopRemainingP`} + public @CType("uint32_t") int gopRemainingP() { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_gopRemainingP(this.segment()); } + /// Sets `gopRemainingP` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopRemainingP(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopRemainingP.set(segment, 0L, index, value); } + /// Sets `gopRemainingP` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopRemainingP(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_gopRemainingP(segment, 0L, value); } + /// Sets `gopRemainingP` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR gopRemainingPAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_gopRemainingP(this.segment(), index, value); return this; } + /// Sets `gopRemainingP` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR gopRemainingP(@CType("uint32_t") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_gopRemainingP(this.segment(), value); return this; } + + /// {@return `gopRemainingB` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopRemainingB(MemorySegment segment, long index) { return (int) VH_gopRemainingB.get(segment, 0L, index); } + /// {@return `gopRemainingB`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopRemainingB(MemorySegment segment) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_gopRemainingB(segment, 0L); } + /// {@return `gopRemainingB` at the given index} + /// @param index the index + public @CType("uint32_t") int gopRemainingBAt(long index) { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_gopRemainingB(this.segment(), index); } + /// {@return `gopRemainingB`} + public @CType("uint32_t") int gopRemainingB() { return VkVideoEncodeH264GopRemainingFrameInfoKHR.get_gopRemainingB(this.segment()); } + /// Sets `gopRemainingB` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopRemainingB(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopRemainingB.set(segment, 0L, index, value); } + /// Sets `gopRemainingB` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopRemainingB(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_gopRemainingB(segment, 0L, value); } + /// Sets `gopRemainingB` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR gopRemainingBAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_gopRemainingB(this.segment(), index, value); return this; } + /// Sets `gopRemainingB` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264GopRemainingFrameInfoKHR gopRemainingB(@CType("uint32_t") int value) { VkVideoEncodeH264GopRemainingFrameInfoKHR.set_gopRemainingB(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264NaluSliceInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264NaluSliceInfoKHR.java new file mode 100644 index 00000000..52b5ca3b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264NaluSliceInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### constantQp +/// [VarHandle][#VH_constantQp] - [Getter][#constantQp()] - [Setter][#constantQp(int)] +/// ### pStdSliceHeader +/// [VarHandle][#VH_pStdSliceHeader] - [Getter][#pStdSliceHeader()] - [Setter][#pStdSliceHeader(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264NaluSliceInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// int32_t constantQp; +/// const StdVideoEncodeH264SliceHeader * pStdSliceHeader; +/// } VkVideoEncodeH264NaluSliceInfoKHR; +/// ``` +public final class VkVideoEncodeH264NaluSliceInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264NaluSliceInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("constantQp"), + ValueLayout.ADDRESS.withName("pStdSliceHeader") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `constantQp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constantQp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constantQp")); + /// The [VarHandle] of `pStdSliceHeader` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdSliceHeader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdSliceHeader")); + + /// Creates `VkVideoEncodeH264NaluSliceInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264NaluSliceInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264NaluSliceInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264NaluSliceInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264NaluSliceInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264NaluSliceInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264NaluSliceInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264NaluSliceInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264NaluSliceInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264NaluSliceInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264NaluSliceInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264NaluSliceInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264NaluSliceInfoKHR` + public static VkVideoEncodeH264NaluSliceInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264NaluSliceInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264NaluSliceInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264NaluSliceInfoKHR` + public static VkVideoEncodeH264NaluSliceInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264NaluSliceInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264NaluSliceInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264NaluSliceInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264NaluSliceInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264NaluSliceInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264NaluSliceInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264NaluSliceInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264NaluSliceInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264NaluSliceInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264NaluSliceInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264NaluSliceInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264NaluSliceInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264NaluSliceInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264NaluSliceInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264NaluSliceInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264NaluSliceInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264NaluSliceInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `constantQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_constantQp(MemorySegment segment, long index) { return (int) VH_constantQp.get(segment, 0L, index); } + /// {@return `constantQp`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_constantQp(MemorySegment segment) { return VkVideoEncodeH264NaluSliceInfoKHR.get_constantQp(segment, 0L); } + /// {@return `constantQp` at the given index} + /// @param index the index + public @CType("int32_t") int constantQpAt(long index) { return VkVideoEncodeH264NaluSliceInfoKHR.get_constantQp(this.segment(), index); } + /// {@return `constantQp`} + public @CType("int32_t") int constantQp() { return VkVideoEncodeH264NaluSliceInfoKHR.get_constantQp(this.segment()); } + /// Sets `constantQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constantQp(MemorySegment segment, long index, @CType("int32_t") int value) { VH_constantQp.set(segment, 0L, index, value); } + /// Sets `constantQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constantQp(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH264NaluSliceInfoKHR.set_constantQp(segment, 0L, value); } + /// Sets `constantQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264NaluSliceInfoKHR constantQpAt(long index, @CType("int32_t") int value) { VkVideoEncodeH264NaluSliceInfoKHR.set_constantQp(this.segment(), index, value); return this; } + /// Sets `constantQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264NaluSliceInfoKHR constantQp(@CType("int32_t") int value) { VkVideoEncodeH264NaluSliceInfoKHR.set_constantQp(this.segment(), value); return this; } + + /// {@return `pStdSliceHeader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH264SliceHeader *") java.lang.foreign.MemorySegment get_pStdSliceHeader(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdSliceHeader.get(segment, 0L, index); } + /// {@return `pStdSliceHeader`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH264SliceHeader *") java.lang.foreign.MemorySegment get_pStdSliceHeader(MemorySegment segment) { return VkVideoEncodeH264NaluSliceInfoKHR.get_pStdSliceHeader(segment, 0L); } + /// {@return `pStdSliceHeader` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH264SliceHeader *") java.lang.foreign.MemorySegment pStdSliceHeaderAt(long index) { return VkVideoEncodeH264NaluSliceInfoKHR.get_pStdSliceHeader(this.segment(), index); } + /// {@return `pStdSliceHeader`} + public @CType("const StdVideoEncodeH264SliceHeader *") java.lang.foreign.MemorySegment pStdSliceHeader() { return VkVideoEncodeH264NaluSliceInfoKHR.get_pStdSliceHeader(this.segment()); } + /// Sets `pStdSliceHeader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdSliceHeader(MemorySegment segment, long index, @CType("const StdVideoEncodeH264SliceHeader *") java.lang.foreign.MemorySegment value) { VH_pStdSliceHeader.set(segment, 0L, index, value); } + /// Sets `pStdSliceHeader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdSliceHeader(MemorySegment segment, @CType("const StdVideoEncodeH264SliceHeader *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264NaluSliceInfoKHR.set_pStdSliceHeader(segment, 0L, value); } + /// Sets `pStdSliceHeader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264NaluSliceInfoKHR pStdSliceHeaderAt(long index, @CType("const StdVideoEncodeH264SliceHeader *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264NaluSliceInfoKHR.set_pStdSliceHeader(this.segment(), index, value); return this; } + /// Sets `pStdSliceHeader` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264NaluSliceInfoKHR pStdSliceHeader(@CType("const StdVideoEncodeH264SliceHeader *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264NaluSliceInfoKHR.set_pStdSliceHeader(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264PictureInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264PictureInfoKHR.java new file mode 100644 index 00000000..6ce4394c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264PictureInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### naluSliceEntryCount +/// [VarHandle][#VH_naluSliceEntryCount] - [Getter][#naluSliceEntryCount()] - [Setter][#naluSliceEntryCount(int)] +/// ### pNaluSliceEntries +/// [VarHandle][#VH_pNaluSliceEntries] - [Getter][#pNaluSliceEntries()] - [Setter][#pNaluSliceEntries(java.lang.foreign.MemorySegment)] +/// ### pStdPictureInfo +/// [VarHandle][#VH_pStdPictureInfo] - [Getter][#pStdPictureInfo()] - [Setter][#pStdPictureInfo(java.lang.foreign.MemorySegment)] +/// ### generatePrefixNalu +/// [VarHandle][#VH_generatePrefixNalu] - [Getter][#generatePrefixNalu()] - [Setter][#generatePrefixNalu(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264PictureInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t naluSliceEntryCount; +/// const VkVideoEncodeH264NaluSliceInfoKHR * pNaluSliceEntries; +/// const StdVideoEncodeH264PictureInfo * pStdPictureInfo; +/// VkBool32 generatePrefixNalu; +/// } VkVideoEncodeH264PictureInfoKHR; +/// ``` +public final class VkVideoEncodeH264PictureInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264PictureInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("naluSliceEntryCount"), + ValueLayout.ADDRESS.withName("pNaluSliceEntries"), + ValueLayout.ADDRESS.withName("pStdPictureInfo"), + ValueLayout.JAVA_INT.withName("generatePrefixNalu") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `naluSliceEntryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_naluSliceEntryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("naluSliceEntryCount")); + /// The [VarHandle] of `pNaluSliceEntries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNaluSliceEntries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNaluSliceEntries")); + /// The [VarHandle] of `pStdPictureInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdPictureInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdPictureInfo")); + /// The [VarHandle] of `generatePrefixNalu` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_generatePrefixNalu = LAYOUT.arrayElementVarHandle(PathElement.groupElement("generatePrefixNalu")); + + /// Creates `VkVideoEncodeH264PictureInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264PictureInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264PictureInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264PictureInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264PictureInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264PictureInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264PictureInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264PictureInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264PictureInfoKHR` + public static VkVideoEncodeH264PictureInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264PictureInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264PictureInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264PictureInfoKHR` + public static VkVideoEncodeH264PictureInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264PictureInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264PictureInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264PictureInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264PictureInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264PictureInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264PictureInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264PictureInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264PictureInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264PictureInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264PictureInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264PictureInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264PictureInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264PictureInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `naluSliceEntryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_naluSliceEntryCount(MemorySegment segment, long index) { return (int) VH_naluSliceEntryCount.get(segment, 0L, index); } + /// {@return `naluSliceEntryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_naluSliceEntryCount(MemorySegment segment) { return VkVideoEncodeH264PictureInfoKHR.get_naluSliceEntryCount(segment, 0L); } + /// {@return `naluSliceEntryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int naluSliceEntryCountAt(long index) { return VkVideoEncodeH264PictureInfoKHR.get_naluSliceEntryCount(this.segment(), index); } + /// {@return `naluSliceEntryCount`} + public @CType("uint32_t") int naluSliceEntryCount() { return VkVideoEncodeH264PictureInfoKHR.get_naluSliceEntryCount(this.segment()); } + /// Sets `naluSliceEntryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_naluSliceEntryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_naluSliceEntryCount.set(segment, 0L, index, value); } + /// Sets `naluSliceEntryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_naluSliceEntryCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264PictureInfoKHR.set_naluSliceEntryCount(segment, 0L, value); } + /// Sets `naluSliceEntryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR naluSliceEntryCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264PictureInfoKHR.set_naluSliceEntryCount(this.segment(), index, value); return this; } + /// Sets `naluSliceEntryCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR naluSliceEntryCount(@CType("uint32_t") int value) { VkVideoEncodeH264PictureInfoKHR.set_naluSliceEntryCount(this.segment(), value); return this; } + + /// {@return `pNaluSliceEntries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoEncodeH264NaluSliceInfoKHR *") java.lang.foreign.MemorySegment get_pNaluSliceEntries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNaluSliceEntries.get(segment, 0L, index); } + /// {@return `pNaluSliceEntries`} + /// @param segment the segment of the struct + public static @CType("const VkVideoEncodeH264NaluSliceInfoKHR *") java.lang.foreign.MemorySegment get_pNaluSliceEntries(MemorySegment segment) { return VkVideoEncodeH264PictureInfoKHR.get_pNaluSliceEntries(segment, 0L); } + /// {@return `pNaluSliceEntries` at the given index} + /// @param index the index + public @CType("const VkVideoEncodeH264NaluSliceInfoKHR *") java.lang.foreign.MemorySegment pNaluSliceEntriesAt(long index) { return VkVideoEncodeH264PictureInfoKHR.get_pNaluSliceEntries(this.segment(), index); } + /// {@return `pNaluSliceEntries`} + public @CType("const VkVideoEncodeH264NaluSliceInfoKHR *") java.lang.foreign.MemorySegment pNaluSliceEntries() { return VkVideoEncodeH264PictureInfoKHR.get_pNaluSliceEntries(this.segment()); } + /// Sets `pNaluSliceEntries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNaluSliceEntries(MemorySegment segment, long index, @CType("const VkVideoEncodeH264NaluSliceInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pNaluSliceEntries.set(segment, 0L, index, value); } + /// Sets `pNaluSliceEntries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNaluSliceEntries(MemorySegment segment, @CType("const VkVideoEncodeH264NaluSliceInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264PictureInfoKHR.set_pNaluSliceEntries(segment, 0L, value); } + /// Sets `pNaluSliceEntries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR pNaluSliceEntriesAt(long index, @CType("const VkVideoEncodeH264NaluSliceInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264PictureInfoKHR.set_pNaluSliceEntries(this.segment(), index, value); return this; } + /// Sets `pNaluSliceEntries` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR pNaluSliceEntries(@CType("const VkVideoEncodeH264NaluSliceInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264PictureInfoKHR.set_pNaluSliceEntries(this.segment(), value); return this; } + + /// {@return `pStdPictureInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH264PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdPictureInfo.get(segment, 0L, index); } + /// {@return `pStdPictureInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH264PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment) { return VkVideoEncodeH264PictureInfoKHR.get_pStdPictureInfo(segment, 0L); } + /// {@return `pStdPictureInfo` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH264PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfoAt(long index) { return VkVideoEncodeH264PictureInfoKHR.get_pStdPictureInfo(this.segment(), index); } + /// {@return `pStdPictureInfo`} + public @CType("const StdVideoEncodeH264PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfo() { return VkVideoEncodeH264PictureInfoKHR.get_pStdPictureInfo(this.segment()); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, long index, @CType("const StdVideoEncodeH264PictureInfo *") java.lang.foreign.MemorySegment value) { VH_pStdPictureInfo.set(segment, 0L, index, value); } + /// Sets `pStdPictureInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, @CType("const StdVideoEncodeH264PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264PictureInfoKHR.set_pStdPictureInfo(segment, 0L, value); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR pStdPictureInfoAt(long index, @CType("const StdVideoEncodeH264PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264PictureInfoKHR.set_pStdPictureInfo(this.segment(), index, value); return this; } + /// Sets `pStdPictureInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR pStdPictureInfo(@CType("const StdVideoEncodeH264PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264PictureInfoKHR.set_pStdPictureInfo(this.segment(), value); return this; } + + /// {@return `generatePrefixNalu` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_generatePrefixNalu(MemorySegment segment, long index) { return (int) VH_generatePrefixNalu.get(segment, 0L, index); } + /// {@return `generatePrefixNalu`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_generatePrefixNalu(MemorySegment segment) { return VkVideoEncodeH264PictureInfoKHR.get_generatePrefixNalu(segment, 0L); } + /// {@return `generatePrefixNalu` at the given index} + /// @param index the index + public @CType("VkBool32") int generatePrefixNaluAt(long index) { return VkVideoEncodeH264PictureInfoKHR.get_generatePrefixNalu(this.segment(), index); } + /// {@return `generatePrefixNalu`} + public @CType("VkBool32") int generatePrefixNalu() { return VkVideoEncodeH264PictureInfoKHR.get_generatePrefixNalu(this.segment()); } + /// Sets `generatePrefixNalu` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_generatePrefixNalu(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_generatePrefixNalu.set(segment, 0L, index, value); } + /// Sets `generatePrefixNalu` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_generatePrefixNalu(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264PictureInfoKHR.set_generatePrefixNalu(segment, 0L, value); } + /// Sets `generatePrefixNalu` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR generatePrefixNaluAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264PictureInfoKHR.set_generatePrefixNalu(this.segment(), index, value); return this; } + /// Sets `generatePrefixNalu` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264PictureInfoKHR generatePrefixNalu(@CType("VkBool32") int value) { VkVideoEncodeH264PictureInfoKHR.set_generatePrefixNalu(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264ProfileInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264ProfileInfoKHR.java new file mode 100644 index 00000000..f771c9d5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264ProfileInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stdProfileIdc +/// [VarHandle][#VH_stdProfileIdc] - [Getter][#stdProfileIdc()] - [Setter][#stdProfileIdc(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264ProfileInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// StdVideoH264ProfileIdc stdProfileIdc; +/// } VkVideoEncodeH264ProfileInfoKHR; +/// ``` +public final class VkVideoEncodeH264ProfileInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264ProfileInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stdProfileIdc") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stdProfileIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdProfileIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdProfileIdc")); + + /// Creates `VkVideoEncodeH264ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264ProfileInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264ProfileInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264ProfileInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264ProfileInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264ProfileInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264ProfileInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264ProfileInfoKHR` + public static VkVideoEncodeH264ProfileInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264ProfileInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264ProfileInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264ProfileInfoKHR` + public static VkVideoEncodeH264ProfileInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264ProfileInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264ProfileInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264ProfileInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264ProfileInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264ProfileInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264ProfileInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264ProfileInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264ProfileInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264ProfileInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264ProfileInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264ProfileInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264ProfileInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264ProfileInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264ProfileInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264ProfileInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264ProfileInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264ProfileInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stdProfileIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264ProfileIdc") int get_stdProfileIdc(MemorySegment segment, long index) { return (int) VH_stdProfileIdc.get(segment, 0L, index); } + /// {@return `stdProfileIdc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264ProfileIdc") int get_stdProfileIdc(MemorySegment segment) { return VkVideoEncodeH264ProfileInfoKHR.get_stdProfileIdc(segment, 0L); } + /// {@return `stdProfileIdc` at the given index} + /// @param index the index + public @CType("StdVideoH264ProfileIdc") int stdProfileIdcAt(long index) { return VkVideoEncodeH264ProfileInfoKHR.get_stdProfileIdc(this.segment(), index); } + /// {@return `stdProfileIdc`} + public @CType("StdVideoH264ProfileIdc") int stdProfileIdc() { return VkVideoEncodeH264ProfileInfoKHR.get_stdProfileIdc(this.segment()); } + /// Sets `stdProfileIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdProfileIdc(MemorySegment segment, long index, @CType("StdVideoH264ProfileIdc") int value) { VH_stdProfileIdc.set(segment, 0L, index, value); } + /// Sets `stdProfileIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdProfileIdc(MemorySegment segment, @CType("StdVideoH264ProfileIdc") int value) { VkVideoEncodeH264ProfileInfoKHR.set_stdProfileIdc(segment, 0L, value); } + /// Sets `stdProfileIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264ProfileInfoKHR stdProfileIdcAt(long index, @CType("StdVideoH264ProfileIdc") int value) { VkVideoEncodeH264ProfileInfoKHR.set_stdProfileIdc(this.segment(), index, value); return this; } + /// Sets `stdProfileIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264ProfileInfoKHR stdProfileIdc(@CType("StdVideoH264ProfileIdc") int value) { VkVideoEncodeH264ProfileInfoKHR.set_stdProfileIdc(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264QpKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264QpKHR.java new file mode 100644 index 00000000..3c99eab9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264QpKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### qpI +/// [VarHandle][#VH_qpI] - [Getter][#qpI()] - [Setter][#qpI(int)] +/// ### qpP +/// [VarHandle][#VH_qpP] - [Getter][#qpP()] - [Setter][#qpP(int)] +/// ### qpB +/// [VarHandle][#VH_qpB] - [Getter][#qpB()] - [Setter][#qpB(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264QpKHR { +/// int32_t qpI; +/// int32_t qpP; +/// int32_t qpB; +/// } VkVideoEncodeH264QpKHR; +/// ``` +public final class VkVideoEncodeH264QpKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264QpKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("qpI"), + ValueLayout.JAVA_INT.withName("qpP"), + ValueLayout.JAVA_INT.withName("qpB") + ); + /// The [VarHandle] of `qpI` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_qpI = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qpI")); + /// The [VarHandle] of `qpP` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_qpP = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qpP")); + /// The [VarHandle] of `qpB` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_qpB = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qpB")); + + /// Creates `VkVideoEncodeH264QpKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264QpKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264QpKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264QpKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264QpKHR(segment); } + + /// Creates `VkVideoEncodeH264QpKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264QpKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264QpKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264QpKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264QpKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264QpKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264QpKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264QpKHR` + public static VkVideoEncodeH264QpKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264QpKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264QpKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264QpKHR` + public static VkVideoEncodeH264QpKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264QpKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `qpI` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_qpI(MemorySegment segment, long index) { return (int) VH_qpI.get(segment, 0L, index); } + /// {@return `qpI`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_qpI(MemorySegment segment) { return VkVideoEncodeH264QpKHR.get_qpI(segment, 0L); } + /// {@return `qpI` at the given index} + /// @param index the index + public @CType("int32_t") int qpIAt(long index) { return VkVideoEncodeH264QpKHR.get_qpI(this.segment(), index); } + /// {@return `qpI`} + public @CType("int32_t") int qpI() { return VkVideoEncodeH264QpKHR.get_qpI(this.segment()); } + /// Sets `qpI` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qpI(MemorySegment segment, long index, @CType("int32_t") int value) { VH_qpI.set(segment, 0L, index, value); } + /// Sets `qpI` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qpI(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH264QpKHR.set_qpI(segment, 0L, value); } + /// Sets `qpI` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QpKHR qpIAt(long index, @CType("int32_t") int value) { VkVideoEncodeH264QpKHR.set_qpI(this.segment(), index, value); return this; } + /// Sets `qpI` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QpKHR qpI(@CType("int32_t") int value) { VkVideoEncodeH264QpKHR.set_qpI(this.segment(), value); return this; } + + /// {@return `qpP` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_qpP(MemorySegment segment, long index) { return (int) VH_qpP.get(segment, 0L, index); } + /// {@return `qpP`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_qpP(MemorySegment segment) { return VkVideoEncodeH264QpKHR.get_qpP(segment, 0L); } + /// {@return `qpP` at the given index} + /// @param index the index + public @CType("int32_t") int qpPAt(long index) { return VkVideoEncodeH264QpKHR.get_qpP(this.segment(), index); } + /// {@return `qpP`} + public @CType("int32_t") int qpP() { return VkVideoEncodeH264QpKHR.get_qpP(this.segment()); } + /// Sets `qpP` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qpP(MemorySegment segment, long index, @CType("int32_t") int value) { VH_qpP.set(segment, 0L, index, value); } + /// Sets `qpP` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qpP(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH264QpKHR.set_qpP(segment, 0L, value); } + /// Sets `qpP` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QpKHR qpPAt(long index, @CType("int32_t") int value) { VkVideoEncodeH264QpKHR.set_qpP(this.segment(), index, value); return this; } + /// Sets `qpP` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QpKHR qpP(@CType("int32_t") int value) { VkVideoEncodeH264QpKHR.set_qpP(this.segment(), value); return this; } + + /// {@return `qpB` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_qpB(MemorySegment segment, long index) { return (int) VH_qpB.get(segment, 0L, index); } + /// {@return `qpB`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_qpB(MemorySegment segment) { return VkVideoEncodeH264QpKHR.get_qpB(segment, 0L); } + /// {@return `qpB` at the given index} + /// @param index the index + public @CType("int32_t") int qpBAt(long index) { return VkVideoEncodeH264QpKHR.get_qpB(this.segment(), index); } + /// {@return `qpB`} + public @CType("int32_t") int qpB() { return VkVideoEncodeH264QpKHR.get_qpB(this.segment()); } + /// Sets `qpB` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qpB(MemorySegment segment, long index, @CType("int32_t") int value) { VH_qpB.set(segment, 0L, index, value); } + /// Sets `qpB` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qpB(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH264QpKHR.set_qpB(segment, 0L, value); } + /// Sets `qpB` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QpKHR qpBAt(long index, @CType("int32_t") int value) { VkVideoEncodeH264QpKHR.set_qpB(this.segment(), index, value); return this; } + /// Sets `qpB` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QpKHR qpB(@CType("int32_t") int value) { VkVideoEncodeH264QpKHR.set_qpB(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264QualityLevelPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264QualityLevelPropertiesKHR.java new file mode 100644 index 00000000..60dde59c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264QualityLevelPropertiesKHR.java @@ -0,0 +1,483 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### preferredRateControlFlags +/// [VarHandle][#VH_preferredRateControlFlags] - [Getter][#preferredRateControlFlags()] - [Setter][#preferredRateControlFlags(int)] +/// ### preferredGopFrameCount +/// [VarHandle][#VH_preferredGopFrameCount] - [Getter][#preferredGopFrameCount()] - [Setter][#preferredGopFrameCount(int)] +/// ### preferredIdrPeriod +/// [VarHandle][#VH_preferredIdrPeriod] - [Getter][#preferredIdrPeriod()] - [Setter][#preferredIdrPeriod(int)] +/// ### preferredConsecutiveBFrameCount +/// [VarHandle][#VH_preferredConsecutiveBFrameCount] - [Getter][#preferredConsecutiveBFrameCount()] - [Setter][#preferredConsecutiveBFrameCount(int)] +/// ### preferredTemporalLayerCount +/// [VarHandle][#VH_preferredTemporalLayerCount] - [Getter][#preferredTemporalLayerCount()] - [Setter][#preferredTemporalLayerCount(int)] +/// ### preferredConstantQp +/// [Byte offset][#OFFSET_preferredConstantQp] - [Memory layout][#ML_preferredConstantQp] - [Getter][#preferredConstantQp()] - [Setter][#preferredConstantQp(java.lang.foreign.MemorySegment)] +/// ### preferredMaxL0ReferenceCount +/// [VarHandle][#VH_preferredMaxL0ReferenceCount] - [Getter][#preferredMaxL0ReferenceCount()] - [Setter][#preferredMaxL0ReferenceCount(int)] +/// ### preferredMaxL1ReferenceCount +/// [VarHandle][#VH_preferredMaxL1ReferenceCount] - [Getter][#preferredMaxL1ReferenceCount()] - [Setter][#preferredMaxL1ReferenceCount(int)] +/// ### preferredStdEntropyCodingModeFlag +/// [VarHandle][#VH_preferredStdEntropyCodingModeFlag] - [Getter][#preferredStdEntropyCodingModeFlag()] - [Setter][#preferredStdEntropyCodingModeFlag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264QualityLevelPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoEncodeH264RateControlFlagsKHR preferredRateControlFlags; +/// uint32_t preferredGopFrameCount; +/// uint32_t preferredIdrPeriod; +/// uint32_t preferredConsecutiveBFrameCount; +/// uint32_t preferredTemporalLayerCount; +/// VkVideoEncodeH264QpKHR preferredConstantQp; +/// uint32_t preferredMaxL0ReferenceCount; +/// uint32_t preferredMaxL1ReferenceCount; +/// VkBool32 preferredStdEntropyCodingModeFlag; +/// } VkVideoEncodeH264QualityLevelPropertiesKHR; +/// ``` +public final class VkVideoEncodeH264QualityLevelPropertiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264QualityLevelPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("preferredRateControlFlags"), + ValueLayout.JAVA_INT.withName("preferredGopFrameCount"), + ValueLayout.JAVA_INT.withName("preferredIdrPeriod"), + ValueLayout.JAVA_INT.withName("preferredConsecutiveBFrameCount"), + ValueLayout.JAVA_INT.withName("preferredTemporalLayerCount"), + overrungl.vulkan.khr.struct.VkVideoEncodeH264QpKHR.LAYOUT.withName("preferredConstantQp"), + ValueLayout.JAVA_INT.withName("preferredMaxL0ReferenceCount"), + ValueLayout.JAVA_INT.withName("preferredMaxL1ReferenceCount"), + ValueLayout.JAVA_INT.withName("preferredStdEntropyCodingModeFlag") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `preferredRateControlFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredRateControlFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredRateControlFlags")); + /// The [VarHandle] of `preferredGopFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredGopFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredGopFrameCount")); + /// The [VarHandle] of `preferredIdrPeriod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredIdrPeriod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredIdrPeriod")); + /// The [VarHandle] of `preferredConsecutiveBFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredConsecutiveBFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredConsecutiveBFrameCount")); + /// The [VarHandle] of `preferredTemporalLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredTemporalLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredTemporalLayerCount")); + /// The byte offset of `preferredConstantQp`. + public static final long OFFSET_preferredConstantQp = LAYOUT.byteOffset(PathElement.groupElement("preferredConstantQp")); + /// The memory layout of `preferredConstantQp`. + public static final MemoryLayout ML_preferredConstantQp = LAYOUT.select(PathElement.groupElement("preferredConstantQp")); + /// The [VarHandle] of `preferredMaxL0ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredMaxL0ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredMaxL0ReferenceCount")); + /// The [VarHandle] of `preferredMaxL1ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredMaxL1ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredMaxL1ReferenceCount")); + /// The [VarHandle] of `preferredStdEntropyCodingModeFlag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredStdEntropyCodingModeFlag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredStdEntropyCodingModeFlag")); + + /// Creates `VkVideoEncodeH264QualityLevelPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264QualityLevelPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264QualityLevelPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264QualityLevelPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264QualityLevelPropertiesKHR(segment); } + + /// Creates `VkVideoEncodeH264QualityLevelPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264QualityLevelPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264QualityLevelPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264QualityLevelPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264QualityLevelPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264QualityLevelPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264QualityLevelPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264QualityLevelPropertiesKHR` + public static VkVideoEncodeH264QualityLevelPropertiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264QualityLevelPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264QualityLevelPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264QualityLevelPropertiesKHR` + public static VkVideoEncodeH264QualityLevelPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264QualityLevelPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `preferredRateControlFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH264RateControlFlagsKHR") int get_preferredRateControlFlags(MemorySegment segment, long index) { return (int) VH_preferredRateControlFlags.get(segment, 0L, index); } + /// {@return `preferredRateControlFlags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH264RateControlFlagsKHR") int get_preferredRateControlFlags(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredRateControlFlags(segment, 0L); } + /// {@return `preferredRateControlFlags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH264RateControlFlagsKHR") int preferredRateControlFlagsAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredRateControlFlags(this.segment(), index); } + /// {@return `preferredRateControlFlags`} + public @CType("VkVideoEncodeH264RateControlFlagsKHR") int preferredRateControlFlags() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredRateControlFlags(this.segment()); } + /// Sets `preferredRateControlFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredRateControlFlags(MemorySegment segment, long index, @CType("VkVideoEncodeH264RateControlFlagsKHR") int value) { VH_preferredRateControlFlags.set(segment, 0L, index, value); } + /// Sets `preferredRateControlFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredRateControlFlags(MemorySegment segment, @CType("VkVideoEncodeH264RateControlFlagsKHR") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredRateControlFlags(segment, 0L, value); } + /// Sets `preferredRateControlFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredRateControlFlagsAt(long index, @CType("VkVideoEncodeH264RateControlFlagsKHR") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredRateControlFlags(this.segment(), index, value); return this; } + /// Sets `preferredRateControlFlags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredRateControlFlags(@CType("VkVideoEncodeH264RateControlFlagsKHR") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredRateControlFlags(this.segment(), value); return this; } + + /// {@return `preferredGopFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredGopFrameCount(MemorySegment segment, long index) { return (int) VH_preferredGopFrameCount.get(segment, 0L, index); } + /// {@return `preferredGopFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredGopFrameCount(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredGopFrameCount(segment, 0L); } + /// {@return `preferredGopFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredGopFrameCountAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredGopFrameCount(this.segment(), index); } + /// {@return `preferredGopFrameCount`} + public @CType("uint32_t") int preferredGopFrameCount() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredGopFrameCount(this.segment()); } + /// Sets `preferredGopFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredGopFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredGopFrameCount.set(segment, 0L, index, value); } + /// Sets `preferredGopFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredGopFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredGopFrameCount(segment, 0L, value); } + /// Sets `preferredGopFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredGopFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredGopFrameCount(this.segment(), index, value); return this; } + /// Sets `preferredGopFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredGopFrameCount(@CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredGopFrameCount(this.segment(), value); return this; } + + /// {@return `preferredIdrPeriod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredIdrPeriod(MemorySegment segment, long index) { return (int) VH_preferredIdrPeriod.get(segment, 0L, index); } + /// {@return `preferredIdrPeriod`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredIdrPeriod(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredIdrPeriod(segment, 0L); } + /// {@return `preferredIdrPeriod` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredIdrPeriodAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredIdrPeriod(this.segment(), index); } + /// {@return `preferredIdrPeriod`} + public @CType("uint32_t") int preferredIdrPeriod() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredIdrPeriod(this.segment()); } + /// Sets `preferredIdrPeriod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredIdrPeriod(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredIdrPeriod.set(segment, 0L, index, value); } + /// Sets `preferredIdrPeriod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredIdrPeriod(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredIdrPeriod(segment, 0L, value); } + /// Sets `preferredIdrPeriod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredIdrPeriodAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredIdrPeriod(this.segment(), index, value); return this; } + /// Sets `preferredIdrPeriod` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredIdrPeriod(@CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredIdrPeriod(this.segment(), value); return this; } + + /// {@return `preferredConsecutiveBFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredConsecutiveBFrameCount(MemorySegment segment, long index) { return (int) VH_preferredConsecutiveBFrameCount.get(segment, 0L, index); } + /// {@return `preferredConsecutiveBFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredConsecutiveBFrameCount(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredConsecutiveBFrameCount(segment, 0L); } + /// {@return `preferredConsecutiveBFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredConsecutiveBFrameCountAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredConsecutiveBFrameCount(this.segment(), index); } + /// {@return `preferredConsecutiveBFrameCount`} + public @CType("uint32_t") int preferredConsecutiveBFrameCount() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredConsecutiveBFrameCount(this.segment()); } + /// Sets `preferredConsecutiveBFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredConsecutiveBFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredConsecutiveBFrameCount.set(segment, 0L, index, value); } + /// Sets `preferredConsecutiveBFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredConsecutiveBFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredConsecutiveBFrameCount(segment, 0L, value); } + /// Sets `preferredConsecutiveBFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredConsecutiveBFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredConsecutiveBFrameCount(this.segment(), index, value); return this; } + /// Sets `preferredConsecutiveBFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredConsecutiveBFrameCount(@CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredConsecutiveBFrameCount(this.segment(), value); return this; } + + /// {@return `preferredTemporalLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredTemporalLayerCount(MemorySegment segment, long index) { return (int) VH_preferredTemporalLayerCount.get(segment, 0L, index); } + /// {@return `preferredTemporalLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredTemporalLayerCount(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredTemporalLayerCount(segment, 0L); } + /// {@return `preferredTemporalLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredTemporalLayerCountAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredTemporalLayerCount(this.segment(), index); } + /// {@return `preferredTemporalLayerCount`} + public @CType("uint32_t") int preferredTemporalLayerCount() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredTemporalLayerCount(this.segment()); } + /// Sets `preferredTemporalLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredTemporalLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredTemporalLayerCount.set(segment, 0L, index, value); } + /// Sets `preferredTemporalLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredTemporalLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredTemporalLayerCount(segment, 0L, value); } + /// Sets `preferredTemporalLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredTemporalLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredTemporalLayerCount(this.segment(), index, value); return this; } + /// Sets `preferredTemporalLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredTemporalLayerCount(@CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredTemporalLayerCount(this.segment(), value); return this; } + + /// {@return `preferredConstantQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment get_preferredConstantQp(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_preferredConstantQp, index), ML_preferredConstantQp); } + /// {@return `preferredConstantQp`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment get_preferredConstantQp(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredConstantQp(segment, 0L); } + /// {@return `preferredConstantQp` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment preferredConstantQpAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredConstantQp(this.segment(), index); } + /// {@return `preferredConstantQp`} + public @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment preferredConstantQp() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredConstantQp(this.segment()); } + /// Sets `preferredConstantQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredConstantQp(MemorySegment segment, long index, @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_preferredConstantQp, index), ML_preferredConstantQp.byteSize()); } + /// Sets `preferredConstantQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredConstantQp(MemorySegment segment, @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredConstantQp(segment, 0L, value); } + /// Sets `preferredConstantQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredConstantQpAt(long index, @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredConstantQp(this.segment(), index, value); return this; } + /// Sets `preferredConstantQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredConstantQp(@CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredConstantQp(this.segment(), value); return this; } + + /// {@return `preferredMaxL0ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredMaxL0ReferenceCount(MemorySegment segment, long index) { return (int) VH_preferredMaxL0ReferenceCount.get(segment, 0L, index); } + /// {@return `preferredMaxL0ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredMaxL0ReferenceCount(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredMaxL0ReferenceCount(segment, 0L); } + /// {@return `preferredMaxL0ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredMaxL0ReferenceCountAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredMaxL0ReferenceCount(this.segment(), index); } + /// {@return `preferredMaxL0ReferenceCount`} + public @CType("uint32_t") int preferredMaxL0ReferenceCount() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredMaxL0ReferenceCount(this.segment()); } + /// Sets `preferredMaxL0ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredMaxL0ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredMaxL0ReferenceCount.set(segment, 0L, index, value); } + /// Sets `preferredMaxL0ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredMaxL0ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredMaxL0ReferenceCount(segment, 0L, value); } + /// Sets `preferredMaxL0ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredMaxL0ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredMaxL0ReferenceCount(this.segment(), index, value); return this; } + /// Sets `preferredMaxL0ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredMaxL0ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredMaxL0ReferenceCount(this.segment(), value); return this; } + + /// {@return `preferredMaxL1ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredMaxL1ReferenceCount(MemorySegment segment, long index) { return (int) VH_preferredMaxL1ReferenceCount.get(segment, 0L, index); } + /// {@return `preferredMaxL1ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredMaxL1ReferenceCount(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredMaxL1ReferenceCount(segment, 0L); } + /// {@return `preferredMaxL1ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredMaxL1ReferenceCountAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredMaxL1ReferenceCount(this.segment(), index); } + /// {@return `preferredMaxL1ReferenceCount`} + public @CType("uint32_t") int preferredMaxL1ReferenceCount() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredMaxL1ReferenceCount(this.segment()); } + /// Sets `preferredMaxL1ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredMaxL1ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredMaxL1ReferenceCount.set(segment, 0L, index, value); } + /// Sets `preferredMaxL1ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredMaxL1ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredMaxL1ReferenceCount(segment, 0L, value); } + /// Sets `preferredMaxL1ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredMaxL1ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredMaxL1ReferenceCount(this.segment(), index, value); return this; } + /// Sets `preferredMaxL1ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredMaxL1ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredMaxL1ReferenceCount(this.segment(), value); return this; } + + /// {@return `preferredStdEntropyCodingModeFlag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_preferredStdEntropyCodingModeFlag(MemorySegment segment, long index) { return (int) VH_preferredStdEntropyCodingModeFlag.get(segment, 0L, index); } + /// {@return `preferredStdEntropyCodingModeFlag`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_preferredStdEntropyCodingModeFlag(MemorySegment segment) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredStdEntropyCodingModeFlag(segment, 0L); } + /// {@return `preferredStdEntropyCodingModeFlag` at the given index} + /// @param index the index + public @CType("VkBool32") int preferredStdEntropyCodingModeFlagAt(long index) { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredStdEntropyCodingModeFlag(this.segment(), index); } + /// {@return `preferredStdEntropyCodingModeFlag`} + public @CType("VkBool32") int preferredStdEntropyCodingModeFlag() { return VkVideoEncodeH264QualityLevelPropertiesKHR.get_preferredStdEntropyCodingModeFlag(this.segment()); } + /// Sets `preferredStdEntropyCodingModeFlag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredStdEntropyCodingModeFlag(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_preferredStdEntropyCodingModeFlag.set(segment, 0L, index, value); } + /// Sets `preferredStdEntropyCodingModeFlag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredStdEntropyCodingModeFlag(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredStdEntropyCodingModeFlag(segment, 0L, value); } + /// Sets `preferredStdEntropyCodingModeFlag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredStdEntropyCodingModeFlagAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredStdEntropyCodingModeFlag(this.segment(), index, value); return this; } + /// Sets `preferredStdEntropyCodingModeFlag` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QualityLevelPropertiesKHR preferredStdEntropyCodingModeFlag(@CType("VkBool32") int value) { VkVideoEncodeH264QualityLevelPropertiesKHR.set_preferredStdEntropyCodingModeFlag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264QuantizationMapCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264QuantizationMapCapabilitiesKHR.java new file mode 100644 index 00000000..2e695879 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264QuantizationMapCapabilitiesKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minQpDelta +/// [VarHandle][#VH_minQpDelta] - [Getter][#minQpDelta()] - [Setter][#minQpDelta(int)] +/// ### maxQpDelta +/// [VarHandle][#VH_maxQpDelta] - [Getter][#maxQpDelta()] - [Setter][#maxQpDelta(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264QuantizationMapCapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// int32_t minQpDelta; +/// int32_t maxQpDelta; +/// } VkVideoEncodeH264QuantizationMapCapabilitiesKHR; +/// ``` +public final class VkVideoEncodeH264QuantizationMapCapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264QuantizationMapCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("minQpDelta"), + ValueLayout.JAVA_INT.withName("maxQpDelta") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minQpDelta` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minQpDelta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minQpDelta")); + /// The [VarHandle] of `maxQpDelta` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxQpDelta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxQpDelta")); + + /// Creates `VkVideoEncodeH264QuantizationMapCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264QuantizationMapCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264QuantizationMapCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264QuantizationMapCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264QuantizationMapCapabilitiesKHR(segment); } + + /// Creates `VkVideoEncodeH264QuantizationMapCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264QuantizationMapCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264QuantizationMapCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264QuantizationMapCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264QuantizationMapCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264QuantizationMapCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264QuantizationMapCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264QuantizationMapCapabilitiesKHR` + public static VkVideoEncodeH264QuantizationMapCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264QuantizationMapCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264QuantizationMapCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264QuantizationMapCapabilitiesKHR` + public static VkVideoEncodeH264QuantizationMapCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264QuantizationMapCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QuantizationMapCapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QuantizationMapCapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QuantizationMapCapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QuantizationMapCapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `minQpDelta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_minQpDelta(MemorySegment segment, long index) { return (int) VH_minQpDelta.get(segment, 0L, index); } + /// {@return `minQpDelta`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_minQpDelta(MemorySegment segment) { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_minQpDelta(segment, 0L); } + /// {@return `minQpDelta` at the given index} + /// @param index the index + public @CType("int32_t") int minQpDeltaAt(long index) { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_minQpDelta(this.segment(), index); } + /// {@return `minQpDelta`} + public @CType("int32_t") int minQpDelta() { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_minQpDelta(this.segment()); } + /// Sets `minQpDelta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minQpDelta(MemorySegment segment, long index, @CType("int32_t") int value) { VH_minQpDelta.set(segment, 0L, index, value); } + /// Sets `minQpDelta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minQpDelta(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_minQpDelta(segment, 0L, value); } + /// Sets `minQpDelta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QuantizationMapCapabilitiesKHR minQpDeltaAt(long index, @CType("int32_t") int value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_minQpDelta(this.segment(), index, value); return this; } + /// Sets `minQpDelta` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QuantizationMapCapabilitiesKHR minQpDelta(@CType("int32_t") int value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_minQpDelta(this.segment(), value); return this; } + + /// {@return `maxQpDelta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_maxQpDelta(MemorySegment segment, long index) { return (int) VH_maxQpDelta.get(segment, 0L, index); } + /// {@return `maxQpDelta`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_maxQpDelta(MemorySegment segment) { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_maxQpDelta(segment, 0L); } + /// {@return `maxQpDelta` at the given index} + /// @param index the index + public @CType("int32_t") int maxQpDeltaAt(long index) { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_maxQpDelta(this.segment(), index); } + /// {@return `maxQpDelta`} + public @CType("int32_t") int maxQpDelta() { return VkVideoEncodeH264QuantizationMapCapabilitiesKHR.get_maxQpDelta(this.segment()); } + /// Sets `maxQpDelta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQpDelta(MemorySegment segment, long index, @CType("int32_t") int value) { VH_maxQpDelta.set(segment, 0L, index, value); } + /// Sets `maxQpDelta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQpDelta(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_maxQpDelta(segment, 0L, value); } + /// Sets `maxQpDelta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QuantizationMapCapabilitiesKHR maxQpDeltaAt(long index, @CType("int32_t") int value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_maxQpDelta(this.segment(), index, value); return this; } + /// Sets `maxQpDelta` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264QuantizationMapCapabilitiesKHR maxQpDelta(@CType("int32_t") int value) { VkVideoEncodeH264QuantizationMapCapabilitiesKHR.set_maxQpDelta(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264RateControlInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264RateControlInfoKHR.java new file mode 100644 index 00000000..10168e32 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264RateControlInfoKHR.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### gopFrameCount +/// [VarHandle][#VH_gopFrameCount] - [Getter][#gopFrameCount()] - [Setter][#gopFrameCount(int)] +/// ### idrPeriod +/// [VarHandle][#VH_idrPeriod] - [Getter][#idrPeriod()] - [Setter][#idrPeriod(int)] +/// ### consecutiveBFrameCount +/// [VarHandle][#VH_consecutiveBFrameCount] - [Getter][#consecutiveBFrameCount()] - [Setter][#consecutiveBFrameCount(int)] +/// ### temporalLayerCount +/// [VarHandle][#VH_temporalLayerCount] - [Getter][#temporalLayerCount()] - [Setter][#temporalLayerCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264RateControlInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoEncodeH264RateControlFlagsKHR flags; +/// uint32_t gopFrameCount; +/// uint32_t idrPeriod; +/// uint32_t consecutiveBFrameCount; +/// uint32_t temporalLayerCount; +/// } VkVideoEncodeH264RateControlInfoKHR; +/// ``` +public final class VkVideoEncodeH264RateControlInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264RateControlInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("gopFrameCount"), + ValueLayout.JAVA_INT.withName("idrPeriod"), + ValueLayout.JAVA_INT.withName("consecutiveBFrameCount"), + ValueLayout.JAVA_INT.withName("temporalLayerCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `gopFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopFrameCount")); + /// The [VarHandle] of `idrPeriod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_idrPeriod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("idrPeriod")); + /// The [VarHandle] of `consecutiveBFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_consecutiveBFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("consecutiveBFrameCount")); + /// The [VarHandle] of `temporalLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_temporalLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("temporalLayerCount")); + + /// Creates `VkVideoEncodeH264RateControlInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264RateControlInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264RateControlInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264RateControlInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264RateControlInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264RateControlInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264RateControlInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264RateControlInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264RateControlInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264RateControlInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264RateControlInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264RateControlInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264RateControlInfoKHR` + public static VkVideoEncodeH264RateControlInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264RateControlInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264RateControlInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264RateControlInfoKHR` + public static VkVideoEncodeH264RateControlInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264RateControlInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264RateControlInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264RateControlInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264RateControlInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264RateControlInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264RateControlInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264RateControlInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264RateControlInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264RateControlInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264RateControlInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH264RateControlFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH264RateControlFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoEncodeH264RateControlInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH264RateControlFlagsKHR") int flagsAt(long index) { return VkVideoEncodeH264RateControlInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoEncodeH264RateControlFlagsKHR") int flags() { return VkVideoEncodeH264RateControlInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoEncodeH264RateControlFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoEncodeH264RateControlFlagsKHR") int value) { VkVideoEncodeH264RateControlInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR flagsAt(long index, @CType("VkVideoEncodeH264RateControlFlagsKHR") int value) { VkVideoEncodeH264RateControlInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR flags(@CType("VkVideoEncodeH264RateControlFlagsKHR") int value) { VkVideoEncodeH264RateControlInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `gopFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopFrameCount(MemorySegment segment, long index) { return (int) VH_gopFrameCount.get(segment, 0L, index); } + /// {@return `gopFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopFrameCount(MemorySegment segment) { return VkVideoEncodeH264RateControlInfoKHR.get_gopFrameCount(segment, 0L); } + /// {@return `gopFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int gopFrameCountAt(long index) { return VkVideoEncodeH264RateControlInfoKHR.get_gopFrameCount(this.segment(), index); } + /// {@return `gopFrameCount`} + public @CType("uint32_t") int gopFrameCount() { return VkVideoEncodeH264RateControlInfoKHR.get_gopFrameCount(this.segment()); } + /// Sets `gopFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopFrameCount.set(segment, 0L, index, value); } + /// Sets `gopFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_gopFrameCount(segment, 0L, value); } + /// Sets `gopFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR gopFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_gopFrameCount(this.segment(), index, value); return this; } + /// Sets `gopFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR gopFrameCount(@CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_gopFrameCount(this.segment(), value); return this; } + + /// {@return `idrPeriod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_idrPeriod(MemorySegment segment, long index) { return (int) VH_idrPeriod.get(segment, 0L, index); } + /// {@return `idrPeriod`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_idrPeriod(MemorySegment segment) { return VkVideoEncodeH264RateControlInfoKHR.get_idrPeriod(segment, 0L); } + /// {@return `idrPeriod` at the given index} + /// @param index the index + public @CType("uint32_t") int idrPeriodAt(long index) { return VkVideoEncodeH264RateControlInfoKHR.get_idrPeriod(this.segment(), index); } + /// {@return `idrPeriod`} + public @CType("uint32_t") int idrPeriod() { return VkVideoEncodeH264RateControlInfoKHR.get_idrPeriod(this.segment()); } + /// Sets `idrPeriod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_idrPeriod(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_idrPeriod.set(segment, 0L, index, value); } + /// Sets `idrPeriod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_idrPeriod(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_idrPeriod(segment, 0L, value); } + /// Sets `idrPeriod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR idrPeriodAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_idrPeriod(this.segment(), index, value); return this; } + /// Sets `idrPeriod` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR idrPeriod(@CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_idrPeriod(this.segment(), value); return this; } + + /// {@return `consecutiveBFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_consecutiveBFrameCount(MemorySegment segment, long index) { return (int) VH_consecutiveBFrameCount.get(segment, 0L, index); } + /// {@return `consecutiveBFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_consecutiveBFrameCount(MemorySegment segment) { return VkVideoEncodeH264RateControlInfoKHR.get_consecutiveBFrameCount(segment, 0L); } + /// {@return `consecutiveBFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int consecutiveBFrameCountAt(long index) { return VkVideoEncodeH264RateControlInfoKHR.get_consecutiveBFrameCount(this.segment(), index); } + /// {@return `consecutiveBFrameCount`} + public @CType("uint32_t") int consecutiveBFrameCount() { return VkVideoEncodeH264RateControlInfoKHR.get_consecutiveBFrameCount(this.segment()); } + /// Sets `consecutiveBFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_consecutiveBFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_consecutiveBFrameCount.set(segment, 0L, index, value); } + /// Sets `consecutiveBFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_consecutiveBFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_consecutiveBFrameCount(segment, 0L, value); } + /// Sets `consecutiveBFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR consecutiveBFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_consecutiveBFrameCount(this.segment(), index, value); return this; } + /// Sets `consecutiveBFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR consecutiveBFrameCount(@CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_consecutiveBFrameCount(this.segment(), value); return this; } + + /// {@return `temporalLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_temporalLayerCount(MemorySegment segment, long index) { return (int) VH_temporalLayerCount.get(segment, 0L, index); } + /// {@return `temporalLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_temporalLayerCount(MemorySegment segment) { return VkVideoEncodeH264RateControlInfoKHR.get_temporalLayerCount(segment, 0L); } + /// {@return `temporalLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int temporalLayerCountAt(long index) { return VkVideoEncodeH264RateControlInfoKHR.get_temporalLayerCount(this.segment(), index); } + /// {@return `temporalLayerCount`} + public @CType("uint32_t") int temporalLayerCount() { return VkVideoEncodeH264RateControlInfoKHR.get_temporalLayerCount(this.segment()); } + /// Sets `temporalLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_temporalLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_temporalLayerCount.set(segment, 0L, index, value); } + /// Sets `temporalLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_temporalLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_temporalLayerCount(segment, 0L, value); } + /// Sets `temporalLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR temporalLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_temporalLayerCount(this.segment(), index, value); return this; } + /// Sets `temporalLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlInfoKHR temporalLayerCount(@CType("uint32_t") int value) { VkVideoEncodeH264RateControlInfoKHR.set_temporalLayerCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264RateControlLayerInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264RateControlLayerInfoKHR.java new file mode 100644 index 00000000..7da4f2ab --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264RateControlLayerInfoKHR.java @@ -0,0 +1,376 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### useMinQp +/// [VarHandle][#VH_useMinQp] - [Getter][#useMinQp()] - [Setter][#useMinQp(int)] +/// ### minQp +/// [Byte offset][#OFFSET_minQp] - [Memory layout][#ML_minQp] - [Getter][#minQp()] - [Setter][#minQp(java.lang.foreign.MemorySegment)] +/// ### useMaxQp +/// [VarHandle][#VH_useMaxQp] - [Getter][#useMaxQp()] - [Setter][#useMaxQp(int)] +/// ### maxQp +/// [Byte offset][#OFFSET_maxQp] - [Memory layout][#ML_maxQp] - [Getter][#maxQp()] - [Setter][#maxQp(java.lang.foreign.MemorySegment)] +/// ### useMaxFrameSize +/// [VarHandle][#VH_useMaxFrameSize] - [Getter][#useMaxFrameSize()] - [Setter][#useMaxFrameSize(int)] +/// ### maxFrameSize +/// [Byte offset][#OFFSET_maxFrameSize] - [Memory layout][#ML_maxFrameSize] - [Getter][#maxFrameSize()] - [Setter][#maxFrameSize(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264RateControlLayerInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 useMinQp; +/// VkVideoEncodeH264QpKHR minQp; +/// VkBool32 useMaxQp; +/// VkVideoEncodeH264QpKHR maxQp; +/// VkBool32 useMaxFrameSize; +/// VkVideoEncodeH264FrameSizeKHR maxFrameSize; +/// } VkVideoEncodeH264RateControlLayerInfoKHR; +/// ``` +public final class VkVideoEncodeH264RateControlLayerInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264RateControlLayerInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("useMinQp"), + overrungl.vulkan.khr.struct.VkVideoEncodeH264QpKHR.LAYOUT.withName("minQp"), + ValueLayout.JAVA_INT.withName("useMaxQp"), + overrungl.vulkan.khr.struct.VkVideoEncodeH264QpKHR.LAYOUT.withName("maxQp"), + ValueLayout.JAVA_INT.withName("useMaxFrameSize"), + overrungl.vulkan.khr.struct.VkVideoEncodeH264FrameSizeKHR.LAYOUT.withName("maxFrameSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `useMinQp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMinQp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMinQp")); + /// The byte offset of `minQp`. + public static final long OFFSET_minQp = LAYOUT.byteOffset(PathElement.groupElement("minQp")); + /// The memory layout of `minQp`. + public static final MemoryLayout ML_minQp = LAYOUT.select(PathElement.groupElement("minQp")); + /// The [VarHandle] of `useMaxQp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMaxQp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMaxQp")); + /// The byte offset of `maxQp`. + public static final long OFFSET_maxQp = LAYOUT.byteOffset(PathElement.groupElement("maxQp")); + /// The memory layout of `maxQp`. + public static final MemoryLayout ML_maxQp = LAYOUT.select(PathElement.groupElement("maxQp")); + /// The [VarHandle] of `useMaxFrameSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMaxFrameSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMaxFrameSize")); + /// The byte offset of `maxFrameSize`. + public static final long OFFSET_maxFrameSize = LAYOUT.byteOffset(PathElement.groupElement("maxFrameSize")); + /// The memory layout of `maxFrameSize`. + public static final MemoryLayout ML_maxFrameSize = LAYOUT.select(PathElement.groupElement("maxFrameSize")); + + /// Creates `VkVideoEncodeH264RateControlLayerInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264RateControlLayerInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264RateControlLayerInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264RateControlLayerInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264RateControlLayerInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264RateControlLayerInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264RateControlLayerInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264RateControlLayerInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264RateControlLayerInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264RateControlLayerInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264RateControlLayerInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264RateControlLayerInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264RateControlLayerInfoKHR` + public static VkVideoEncodeH264RateControlLayerInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264RateControlLayerInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264RateControlLayerInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264RateControlLayerInfoKHR` + public static VkVideoEncodeH264RateControlLayerInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264RateControlLayerInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264RateControlLayerInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264RateControlLayerInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `useMinQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMinQp(MemorySegment segment, long index) { return (int) VH_useMinQp.get(segment, 0L, index); } + /// {@return `useMinQp`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMinQp(MemorySegment segment) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_useMinQp(segment, 0L); } + /// {@return `useMinQp` at the given index} + /// @param index the index + public @CType("VkBool32") int useMinQpAt(long index) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_useMinQp(this.segment(), index); } + /// {@return `useMinQp`} + public @CType("VkBool32") int useMinQp() { return VkVideoEncodeH264RateControlLayerInfoKHR.get_useMinQp(this.segment()); } + /// Sets `useMinQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMinQp(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMinQp.set(segment, 0L, index, value); } + /// Sets `useMinQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMinQp(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_useMinQp(segment, 0L, value); } + /// Sets `useMinQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR useMinQpAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_useMinQp(this.segment(), index, value); return this; } + /// Sets `useMinQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR useMinQp(@CType("VkBool32") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_useMinQp(this.segment(), value); return this; } + + /// {@return `minQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment get_minQp(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minQp, index), ML_minQp); } + /// {@return `minQp`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment get_minQp(MemorySegment segment) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_minQp(segment, 0L); } + /// {@return `minQp` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment minQpAt(long index) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_minQp(this.segment(), index); } + /// {@return `minQp`} + public @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment minQp() { return VkVideoEncodeH264RateControlLayerInfoKHR.get_minQp(this.segment()); } + /// Sets `minQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minQp(MemorySegment segment, long index, @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minQp, index), ML_minQp.byteSize()); } + /// Sets `minQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minQp(MemorySegment segment, @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_minQp(segment, 0L, value); } + /// Sets `minQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR minQpAt(long index, @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_minQp(this.segment(), index, value); return this; } + /// Sets `minQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR minQp(@CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_minQp(this.segment(), value); return this; } + + /// {@return `useMaxQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMaxQp(MemorySegment segment, long index) { return (int) VH_useMaxQp.get(segment, 0L, index); } + /// {@return `useMaxQp`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMaxQp(MemorySegment segment) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_useMaxQp(segment, 0L); } + /// {@return `useMaxQp` at the given index} + /// @param index the index + public @CType("VkBool32") int useMaxQpAt(long index) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_useMaxQp(this.segment(), index); } + /// {@return `useMaxQp`} + public @CType("VkBool32") int useMaxQp() { return VkVideoEncodeH264RateControlLayerInfoKHR.get_useMaxQp(this.segment()); } + /// Sets `useMaxQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMaxQp(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMaxQp.set(segment, 0L, index, value); } + /// Sets `useMaxQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMaxQp(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_useMaxQp(segment, 0L, value); } + /// Sets `useMaxQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR useMaxQpAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_useMaxQp(this.segment(), index, value); return this; } + /// Sets `useMaxQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR useMaxQp(@CType("VkBool32") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_useMaxQp(this.segment(), value); return this; } + + /// {@return `maxQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment get_maxQp(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxQp, index), ML_maxQp); } + /// {@return `maxQp`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment get_maxQp(MemorySegment segment) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_maxQp(segment, 0L); } + /// {@return `maxQp` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment maxQpAt(long index) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_maxQp(this.segment(), index); } + /// {@return `maxQp`} + public @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment maxQp() { return VkVideoEncodeH264RateControlLayerInfoKHR.get_maxQp(this.segment()); } + /// Sets `maxQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQp(MemorySegment segment, long index, @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxQp, index), ML_maxQp.byteSize()); } + /// Sets `maxQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQp(MemorySegment segment, @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_maxQp(segment, 0L, value); } + /// Sets `maxQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR maxQpAt(long index, @CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_maxQp(this.segment(), index, value); return this; } + /// Sets `maxQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR maxQp(@CType("VkVideoEncodeH264QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_maxQp(this.segment(), value); return this; } + + /// {@return `useMaxFrameSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMaxFrameSize(MemorySegment segment, long index) { return (int) VH_useMaxFrameSize.get(segment, 0L, index); } + /// {@return `useMaxFrameSize`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMaxFrameSize(MemorySegment segment) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_useMaxFrameSize(segment, 0L); } + /// {@return `useMaxFrameSize` at the given index} + /// @param index the index + public @CType("VkBool32") int useMaxFrameSizeAt(long index) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_useMaxFrameSize(this.segment(), index); } + /// {@return `useMaxFrameSize`} + public @CType("VkBool32") int useMaxFrameSize() { return VkVideoEncodeH264RateControlLayerInfoKHR.get_useMaxFrameSize(this.segment()); } + /// Sets `useMaxFrameSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMaxFrameSize(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMaxFrameSize.set(segment, 0L, index, value); } + /// Sets `useMaxFrameSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMaxFrameSize(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_useMaxFrameSize(segment, 0L, value); } + /// Sets `useMaxFrameSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR useMaxFrameSizeAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_useMaxFrameSize(this.segment(), index, value); return this; } + /// Sets `useMaxFrameSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR useMaxFrameSize(@CType("VkBool32") int value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_useMaxFrameSize(this.segment(), value); return this; } + + /// {@return `maxFrameSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH264FrameSizeKHR") java.lang.foreign.MemorySegment get_maxFrameSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxFrameSize, index), ML_maxFrameSize); } + /// {@return `maxFrameSize`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH264FrameSizeKHR") java.lang.foreign.MemorySegment get_maxFrameSize(MemorySegment segment) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_maxFrameSize(segment, 0L); } + /// {@return `maxFrameSize` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH264FrameSizeKHR") java.lang.foreign.MemorySegment maxFrameSizeAt(long index) { return VkVideoEncodeH264RateControlLayerInfoKHR.get_maxFrameSize(this.segment(), index); } + /// {@return `maxFrameSize`} + public @CType("VkVideoEncodeH264FrameSizeKHR") java.lang.foreign.MemorySegment maxFrameSize() { return VkVideoEncodeH264RateControlLayerInfoKHR.get_maxFrameSize(this.segment()); } + /// Sets `maxFrameSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFrameSize(MemorySegment segment, long index, @CType("VkVideoEncodeH264FrameSizeKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxFrameSize, index), ML_maxFrameSize.byteSize()); } + /// Sets `maxFrameSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFrameSize(MemorySegment segment, @CType("VkVideoEncodeH264FrameSizeKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_maxFrameSize(segment, 0L, value); } + /// Sets `maxFrameSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR maxFrameSizeAt(long index, @CType("VkVideoEncodeH264FrameSizeKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_maxFrameSize(this.segment(), index, value); return this; } + /// Sets `maxFrameSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264RateControlLayerInfoKHR maxFrameSize(@CType("VkVideoEncodeH264FrameSizeKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264RateControlLayerInfoKHR.set_maxFrameSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionCreateInfoKHR.java new file mode 100644 index 00000000..7c1aacbd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionCreateInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### useMaxLevelIdc +/// [VarHandle][#VH_useMaxLevelIdc] - [Getter][#useMaxLevelIdc()] - [Setter][#useMaxLevelIdc(int)] +/// ### maxLevelIdc +/// [VarHandle][#VH_maxLevelIdc] - [Getter][#maxLevelIdc()] - [Setter][#maxLevelIdc(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264SessionCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 useMaxLevelIdc; +/// StdVideoH264LevelIdc maxLevelIdc; +/// } VkVideoEncodeH264SessionCreateInfoKHR; +/// ``` +public final class VkVideoEncodeH264SessionCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264SessionCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("useMaxLevelIdc"), + ValueLayout.JAVA_INT.withName("maxLevelIdc") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `useMaxLevelIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMaxLevelIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMaxLevelIdc")); + /// The [VarHandle] of `maxLevelIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxLevelIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLevelIdc")); + + /// Creates `VkVideoEncodeH264SessionCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264SessionCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264SessionCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionCreateInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264SessionCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264SessionCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264SessionCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264SessionCreateInfoKHR` + public static VkVideoEncodeH264SessionCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264SessionCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264SessionCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264SessionCreateInfoKHR` + public static VkVideoEncodeH264SessionCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264SessionCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264SessionCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264SessionCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264SessionCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264SessionCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264SessionCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264SessionCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264SessionCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264SessionCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264SessionCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `useMaxLevelIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMaxLevelIdc(MemorySegment segment, long index) { return (int) VH_useMaxLevelIdc.get(segment, 0L, index); } + /// {@return `useMaxLevelIdc`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMaxLevelIdc(MemorySegment segment) { return VkVideoEncodeH264SessionCreateInfoKHR.get_useMaxLevelIdc(segment, 0L); } + /// {@return `useMaxLevelIdc` at the given index} + /// @param index the index + public @CType("VkBool32") int useMaxLevelIdcAt(long index) { return VkVideoEncodeH264SessionCreateInfoKHR.get_useMaxLevelIdc(this.segment(), index); } + /// {@return `useMaxLevelIdc`} + public @CType("VkBool32") int useMaxLevelIdc() { return VkVideoEncodeH264SessionCreateInfoKHR.get_useMaxLevelIdc(this.segment()); } + /// Sets `useMaxLevelIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMaxLevelIdc(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMaxLevelIdc.set(segment, 0L, index, value); } + /// Sets `useMaxLevelIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMaxLevelIdc(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264SessionCreateInfoKHR.set_useMaxLevelIdc(segment, 0L, value); } + /// Sets `useMaxLevelIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionCreateInfoKHR useMaxLevelIdcAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264SessionCreateInfoKHR.set_useMaxLevelIdc(this.segment(), index, value); return this; } + /// Sets `useMaxLevelIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionCreateInfoKHR useMaxLevelIdc(@CType("VkBool32") int value) { VkVideoEncodeH264SessionCreateInfoKHR.set_useMaxLevelIdc(this.segment(), value); return this; } + + /// {@return `maxLevelIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264LevelIdc") int get_maxLevelIdc(MemorySegment segment, long index) { return (int) VH_maxLevelIdc.get(segment, 0L, index); } + /// {@return `maxLevelIdc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264LevelIdc") int get_maxLevelIdc(MemorySegment segment) { return VkVideoEncodeH264SessionCreateInfoKHR.get_maxLevelIdc(segment, 0L); } + /// {@return `maxLevelIdc` at the given index} + /// @param index the index + public @CType("StdVideoH264LevelIdc") int maxLevelIdcAt(long index) { return VkVideoEncodeH264SessionCreateInfoKHR.get_maxLevelIdc(this.segment(), index); } + /// {@return `maxLevelIdc`} + public @CType("StdVideoH264LevelIdc") int maxLevelIdc() { return VkVideoEncodeH264SessionCreateInfoKHR.get_maxLevelIdc(this.segment()); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, long index, @CType("StdVideoH264LevelIdc") int value) { VH_maxLevelIdc.set(segment, 0L, index, value); } + /// Sets `maxLevelIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, @CType("StdVideoH264LevelIdc") int value) { VkVideoEncodeH264SessionCreateInfoKHR.set_maxLevelIdc(segment, 0L, value); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionCreateInfoKHR maxLevelIdcAt(long index, @CType("StdVideoH264LevelIdc") int value) { VkVideoEncodeH264SessionCreateInfoKHR.set_maxLevelIdc(this.segment(), index, value); return this; } + /// Sets `maxLevelIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionCreateInfoKHR maxLevelIdc(@CType("StdVideoH264LevelIdc") int value) { VkVideoEncodeH264SessionCreateInfoKHR.set_maxLevelIdc(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersAddInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersAddInfoKHR.java new file mode 100644 index 00000000..cdf318e9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersAddInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stdSPSCount +/// [VarHandle][#VH_stdSPSCount] - [Getter][#stdSPSCount()] - [Setter][#stdSPSCount(int)] +/// ### pStdSPSs +/// [VarHandle][#VH_pStdSPSs] - [Getter][#pStdSPSs()] - [Setter][#pStdSPSs(java.lang.foreign.MemorySegment)] +/// ### stdPPSCount +/// [VarHandle][#VH_stdPPSCount] - [Getter][#stdPPSCount()] - [Setter][#stdPPSCount(int)] +/// ### pStdPPSs +/// [VarHandle][#VH_pStdPPSs] - [Getter][#pStdPPSs()] - [Setter][#pStdPPSs(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264SessionParametersAddInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t stdSPSCount; +/// const StdVideoH264SequenceParameterSet * pStdSPSs; +/// uint32_t stdPPSCount; +/// const StdVideoH264PictureParameterSet * pStdPPSs; +/// } VkVideoEncodeH264SessionParametersAddInfoKHR; +/// ``` +public final class VkVideoEncodeH264SessionParametersAddInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264SessionParametersAddInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stdSPSCount"), + ValueLayout.ADDRESS.withName("pStdSPSs"), + ValueLayout.JAVA_INT.withName("stdPPSCount"), + ValueLayout.ADDRESS.withName("pStdPPSs") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stdSPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdSPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdSPSCount")); + /// The [VarHandle] of `pStdSPSs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdSPSs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdSPSs")); + /// The [VarHandle] of `stdPPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdPPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdPPSCount")); + /// The [VarHandle] of `pStdPPSs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdPPSs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdPPSs")); + + /// Creates `VkVideoEncodeH264SessionParametersAddInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264SessionParametersAddInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264SessionParametersAddInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersAddInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersAddInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264SessionParametersAddInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersAddInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersAddInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264SessionParametersAddInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersAddInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersAddInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264SessionParametersAddInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264SessionParametersAddInfoKHR` + public static VkVideoEncodeH264SessionParametersAddInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264SessionParametersAddInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264SessionParametersAddInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264SessionParametersAddInfoKHR` + public static VkVideoEncodeH264SessionParametersAddInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264SessionParametersAddInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stdSPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdSPSCount(MemorySegment segment, long index) { return (int) VH_stdSPSCount.get(segment, 0L, index); } + /// {@return `stdSPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdSPSCount(MemorySegment segment) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_stdSPSCount(segment, 0L); } + /// {@return `stdSPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdSPSCountAt(long index) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_stdSPSCount(this.segment(), index); } + /// {@return `stdSPSCount`} + public @CType("uint32_t") int stdSPSCount() { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_stdSPSCount(this.segment()); } + /// Sets `stdSPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdSPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdSPSCount.set(segment, 0L, index, value); } + /// Sets `stdSPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdSPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_stdSPSCount(segment, 0L, value); } + /// Sets `stdSPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR stdSPSCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_stdSPSCount(this.segment(), index, value); return this; } + /// Sets `stdSPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR stdSPSCount(@CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_stdSPSCount(this.segment(), value); return this; } + + /// {@return `pStdSPSs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment get_pStdSPSs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdSPSs.get(segment, 0L, index); } + /// {@return `pStdSPSs`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment get_pStdSPSs(MemorySegment segment) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_pStdSPSs(segment, 0L); } + /// {@return `pStdSPSs` at the given index} + /// @param index the index + public @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment pStdSPSsAt(long index) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_pStdSPSs(this.segment(), index); } + /// {@return `pStdSPSs`} + public @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment pStdSPSs() { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_pStdSPSs(this.segment()); } + /// Sets `pStdSPSs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdSPSs(MemorySegment segment, long index, @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VH_pStdSPSs.set(segment, 0L, index, value); } + /// Sets `pStdSPSs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdSPSs(MemorySegment segment, @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_pStdSPSs(segment, 0L, value); } + /// Sets `pStdSPSs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR pStdSPSsAt(long index, @CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_pStdSPSs(this.segment(), index, value); return this; } + /// Sets `pStdSPSs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR pStdSPSs(@CType("const StdVideoH264SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_pStdSPSs(this.segment(), value); return this; } + + /// {@return `stdPPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdPPSCount(MemorySegment segment, long index) { return (int) VH_stdPPSCount.get(segment, 0L, index); } + /// {@return `stdPPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdPPSCount(MemorySegment segment) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_stdPPSCount(segment, 0L); } + /// {@return `stdPPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdPPSCountAt(long index) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_stdPPSCount(this.segment(), index); } + /// {@return `stdPPSCount`} + public @CType("uint32_t") int stdPPSCount() { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_stdPPSCount(this.segment()); } + /// Sets `stdPPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdPPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdPPSCount.set(segment, 0L, index, value); } + /// Sets `stdPPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdPPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_stdPPSCount(segment, 0L, value); } + /// Sets `stdPPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR stdPPSCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_stdPPSCount(this.segment(), index, value); return this; } + /// Sets `stdPPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR stdPPSCount(@CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_stdPPSCount(this.segment(), value); return this; } + + /// {@return `pStdPPSs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment get_pStdPPSs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdPPSs.get(segment, 0L, index); } + /// {@return `pStdPPSs`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment get_pStdPPSs(MemorySegment segment) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_pStdPPSs(segment, 0L); } + /// {@return `pStdPPSs` at the given index} + /// @param index the index + public @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment pStdPPSsAt(long index) { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_pStdPPSs(this.segment(), index); } + /// {@return `pStdPPSs`} + public @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment pStdPPSs() { return VkVideoEncodeH264SessionParametersAddInfoKHR.get_pStdPPSs(this.segment()); } + /// Sets `pStdPPSs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdPPSs(MemorySegment segment, long index, @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment value) { VH_pStdPPSs.set(segment, 0L, index, value); } + /// Sets `pStdPPSs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdPPSs(MemorySegment segment, @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_pStdPPSs(segment, 0L, value); } + /// Sets `pStdPPSs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR pStdPPSsAt(long index, @CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_pStdPPSs(this.segment(), index, value); return this; } + /// Sets `pStdPPSs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersAddInfoKHR pStdPPSs(@CType("const StdVideoH264PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersAddInfoKHR.set_pStdPPSs(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersCreateInfoKHR.java new file mode 100644 index 00000000..c5b7dc87 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersCreateInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxStdSPSCount +/// [VarHandle][#VH_maxStdSPSCount] - [Getter][#maxStdSPSCount()] - [Setter][#maxStdSPSCount(int)] +/// ### maxStdPPSCount +/// [VarHandle][#VH_maxStdPPSCount] - [Getter][#maxStdPPSCount()] - [Setter][#maxStdPPSCount(int)] +/// ### pParametersAddInfo +/// [VarHandle][#VH_pParametersAddInfo] - [Getter][#pParametersAddInfo()] - [Setter][#pParametersAddInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264SessionParametersCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t maxStdSPSCount; +/// uint32_t maxStdPPSCount; +/// const VkVideoEncodeH264SessionParametersAddInfoKHR * pParametersAddInfo; +/// } VkVideoEncodeH264SessionParametersCreateInfoKHR; +/// ``` +public final class VkVideoEncodeH264SessionParametersCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264SessionParametersCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxStdSPSCount"), + ValueLayout.JAVA_INT.withName("maxStdPPSCount"), + ValueLayout.ADDRESS.withName("pParametersAddInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxStdSPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStdSPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStdSPSCount")); + /// The [VarHandle] of `maxStdPPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStdPPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStdPPSCount")); + /// The [VarHandle] of `pParametersAddInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pParametersAddInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pParametersAddInfo")); + + /// Creates `VkVideoEncodeH264SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264SessionParametersCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersCreateInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264SessionParametersCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264SessionParametersCreateInfoKHR` + public static VkVideoEncodeH264SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264SessionParametersCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264SessionParametersCreateInfoKHR` + public static VkVideoEncodeH264SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxStdSPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStdSPSCount(MemorySegment segment, long index) { return (int) VH_maxStdSPSCount.get(segment, 0L, index); } + /// {@return `maxStdSPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStdSPSCount(MemorySegment segment) { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_maxStdSPSCount(segment, 0L); } + /// {@return `maxStdSPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStdSPSCountAt(long index) { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_maxStdSPSCount(this.segment(), index); } + /// {@return `maxStdSPSCount`} + public @CType("uint32_t") int maxStdSPSCount() { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_maxStdSPSCount(this.segment()); } + /// Sets `maxStdSPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStdSPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStdSPSCount.set(segment, 0L, index, value); } + /// Sets `maxStdSPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStdSPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_maxStdSPSCount(segment, 0L, value); } + /// Sets `maxStdSPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersCreateInfoKHR maxStdSPSCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_maxStdSPSCount(this.segment(), index, value); return this; } + /// Sets `maxStdSPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersCreateInfoKHR maxStdSPSCount(@CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_maxStdSPSCount(this.segment(), value); return this; } + + /// {@return `maxStdPPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStdPPSCount(MemorySegment segment, long index) { return (int) VH_maxStdPPSCount.get(segment, 0L, index); } + /// {@return `maxStdPPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStdPPSCount(MemorySegment segment) { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_maxStdPPSCount(segment, 0L); } + /// {@return `maxStdPPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStdPPSCountAt(long index) { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_maxStdPPSCount(this.segment(), index); } + /// {@return `maxStdPPSCount`} + public @CType("uint32_t") int maxStdPPSCount() { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_maxStdPPSCount(this.segment()); } + /// Sets `maxStdPPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStdPPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStdPPSCount.set(segment, 0L, index, value); } + /// Sets `maxStdPPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStdPPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_maxStdPPSCount(segment, 0L, value); } + /// Sets `maxStdPPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersCreateInfoKHR maxStdPPSCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_maxStdPPSCount(this.segment(), index, value); return this; } + /// Sets `maxStdPPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersCreateInfoKHR maxStdPPSCount(@CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_maxStdPPSCount(this.segment(), value); return this; } + + /// {@return `pParametersAddInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoEncodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment get_pParametersAddInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pParametersAddInfo.get(segment, 0L, index); } + /// {@return `pParametersAddInfo`} + /// @param segment the segment of the struct + public static @CType("const VkVideoEncodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment get_pParametersAddInfo(MemorySegment segment) { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_pParametersAddInfo(segment, 0L); } + /// {@return `pParametersAddInfo` at the given index} + /// @param index the index + public @CType("const VkVideoEncodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment pParametersAddInfoAt(long index) { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_pParametersAddInfo(this.segment(), index); } + /// {@return `pParametersAddInfo`} + public @CType("const VkVideoEncodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment pParametersAddInfo() { return VkVideoEncodeH264SessionParametersCreateInfoKHR.get_pParametersAddInfo(this.segment()); } + /// Sets `pParametersAddInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pParametersAddInfo(MemorySegment segment, long index, @CType("const VkVideoEncodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pParametersAddInfo.set(segment, 0L, index, value); } + /// Sets `pParametersAddInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pParametersAddInfo(MemorySegment segment, @CType("const VkVideoEncodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_pParametersAddInfo(segment, 0L, value); } + /// Sets `pParametersAddInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersCreateInfoKHR pParametersAddInfoAt(long index, @CType("const VkVideoEncodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_pParametersAddInfo(this.segment(), index, value); return this; } + /// Sets `pParametersAddInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersCreateInfoKHR pParametersAddInfo(@CType("const VkVideoEncodeH264SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersCreateInfoKHR.set_pParametersAddInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersFeedbackInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersFeedbackInfoKHR.java new file mode 100644 index 00000000..937470ee --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersFeedbackInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### hasStdSPSOverrides +/// [VarHandle][#VH_hasStdSPSOverrides] - [Getter][#hasStdSPSOverrides()] - [Setter][#hasStdSPSOverrides(int)] +/// ### hasStdPPSOverrides +/// [VarHandle][#VH_hasStdPPSOverrides] - [Getter][#hasStdPPSOverrides()] - [Setter][#hasStdPPSOverrides(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264SessionParametersFeedbackInfoKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 hasStdSPSOverrides; +/// VkBool32 hasStdPPSOverrides; +/// } VkVideoEncodeH264SessionParametersFeedbackInfoKHR; +/// ``` +public final class VkVideoEncodeH264SessionParametersFeedbackInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264SessionParametersFeedbackInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("hasStdSPSOverrides"), + ValueLayout.JAVA_INT.withName("hasStdPPSOverrides") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `hasStdSPSOverrides` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hasStdSPSOverrides = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hasStdSPSOverrides")); + /// The [VarHandle] of `hasStdPPSOverrides` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hasStdPPSOverrides = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hasStdPPSOverrides")); + + /// Creates `VkVideoEncodeH264SessionParametersFeedbackInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264SessionParametersFeedbackInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264SessionParametersFeedbackInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersFeedbackInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersFeedbackInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264SessionParametersFeedbackInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersFeedbackInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersFeedbackInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264SessionParametersFeedbackInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersFeedbackInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersFeedbackInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264SessionParametersFeedbackInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264SessionParametersFeedbackInfoKHR` + public static VkVideoEncodeH264SessionParametersFeedbackInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264SessionParametersFeedbackInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264SessionParametersFeedbackInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264SessionParametersFeedbackInfoKHR` + public static VkVideoEncodeH264SessionParametersFeedbackInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264SessionParametersFeedbackInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersFeedbackInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersFeedbackInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersFeedbackInfoKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersFeedbackInfoKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `hasStdSPSOverrides` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hasStdSPSOverrides(MemorySegment segment, long index) { return (int) VH_hasStdSPSOverrides.get(segment, 0L, index); } + /// {@return `hasStdSPSOverrides`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hasStdSPSOverrides(MemorySegment segment) { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_hasStdSPSOverrides(segment, 0L); } + /// {@return `hasStdSPSOverrides` at the given index} + /// @param index the index + public @CType("VkBool32") int hasStdSPSOverridesAt(long index) { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_hasStdSPSOverrides(this.segment(), index); } + /// {@return `hasStdSPSOverrides`} + public @CType("VkBool32") int hasStdSPSOverrides() { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_hasStdSPSOverrides(this.segment()); } + /// Sets `hasStdSPSOverrides` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hasStdSPSOverrides(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hasStdSPSOverrides.set(segment, 0L, index, value); } + /// Sets `hasStdSPSOverrides` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hasStdSPSOverrides(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_hasStdSPSOverrides(segment, 0L, value); } + /// Sets `hasStdSPSOverrides` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersFeedbackInfoKHR hasStdSPSOverridesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_hasStdSPSOverrides(this.segment(), index, value); return this; } + /// Sets `hasStdSPSOverrides` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersFeedbackInfoKHR hasStdSPSOverrides(@CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_hasStdSPSOverrides(this.segment(), value); return this; } + + /// {@return `hasStdPPSOverrides` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hasStdPPSOverrides(MemorySegment segment, long index) { return (int) VH_hasStdPPSOverrides.get(segment, 0L, index); } + /// {@return `hasStdPPSOverrides`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hasStdPPSOverrides(MemorySegment segment) { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_hasStdPPSOverrides(segment, 0L); } + /// {@return `hasStdPPSOverrides` at the given index} + /// @param index the index + public @CType("VkBool32") int hasStdPPSOverridesAt(long index) { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_hasStdPPSOverrides(this.segment(), index); } + /// {@return `hasStdPPSOverrides`} + public @CType("VkBool32") int hasStdPPSOverrides() { return VkVideoEncodeH264SessionParametersFeedbackInfoKHR.get_hasStdPPSOverrides(this.segment()); } + /// Sets `hasStdPPSOverrides` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hasStdPPSOverrides(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hasStdPPSOverrides.set(segment, 0L, index, value); } + /// Sets `hasStdPPSOverrides` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hasStdPPSOverrides(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_hasStdPPSOverrides(segment, 0L, value); } + /// Sets `hasStdPPSOverrides` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersFeedbackInfoKHR hasStdPPSOverridesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_hasStdPPSOverrides(this.segment(), index, value); return this; } + /// Sets `hasStdPPSOverrides` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersFeedbackInfoKHR hasStdPPSOverrides(@CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersFeedbackInfoKHR.set_hasStdPPSOverrides(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersGetInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersGetInfoKHR.java new file mode 100644 index 00000000..dcd3def7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH264SessionParametersGetInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### writeStdSPS +/// [VarHandle][#VH_writeStdSPS] - [Getter][#writeStdSPS()] - [Setter][#writeStdSPS(int)] +/// ### writeStdPPS +/// [VarHandle][#VH_writeStdPPS] - [Getter][#writeStdPPS()] - [Setter][#writeStdPPS(int)] +/// ### stdSPSId +/// [VarHandle][#VH_stdSPSId] - [Getter][#stdSPSId()] - [Setter][#stdSPSId(int)] +/// ### stdPPSId +/// [VarHandle][#VH_stdPPSId] - [Getter][#stdPPSId()] - [Setter][#stdPPSId(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH264SessionParametersGetInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 writeStdSPS; +/// VkBool32 writeStdPPS; +/// uint32_t stdSPSId; +/// uint32_t stdPPSId; +/// } VkVideoEncodeH264SessionParametersGetInfoKHR; +/// ``` +public final class VkVideoEncodeH264SessionParametersGetInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH264SessionParametersGetInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("writeStdSPS"), + ValueLayout.JAVA_INT.withName("writeStdPPS"), + ValueLayout.JAVA_INT.withName("stdSPSId"), + ValueLayout.JAVA_INT.withName("stdPPSId") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `writeStdSPS` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_writeStdSPS = LAYOUT.arrayElementVarHandle(PathElement.groupElement("writeStdSPS")); + /// The [VarHandle] of `writeStdPPS` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_writeStdPPS = LAYOUT.arrayElementVarHandle(PathElement.groupElement("writeStdPPS")); + /// The [VarHandle] of `stdSPSId` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdSPSId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdSPSId")); + /// The [VarHandle] of `stdPPSId` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdPPSId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdPPSId")); + + /// Creates `VkVideoEncodeH264SessionParametersGetInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH264SessionParametersGetInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH264SessionParametersGetInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersGetInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersGetInfoKHR(segment); } + + /// Creates `VkVideoEncodeH264SessionParametersGetInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersGetInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersGetInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH264SessionParametersGetInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH264SessionParametersGetInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH264SessionParametersGetInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH264SessionParametersGetInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH264SessionParametersGetInfoKHR` + public static VkVideoEncodeH264SessionParametersGetInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH264SessionParametersGetInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH264SessionParametersGetInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH264SessionParametersGetInfoKHR` + public static VkVideoEncodeH264SessionParametersGetInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH264SessionParametersGetInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `writeStdSPS` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_writeStdSPS(MemorySegment segment, long index) { return (int) VH_writeStdSPS.get(segment, 0L, index); } + /// {@return `writeStdSPS`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_writeStdSPS(MemorySegment segment) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_writeStdSPS(segment, 0L); } + /// {@return `writeStdSPS` at the given index} + /// @param index the index + public @CType("VkBool32") int writeStdSPSAt(long index) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_writeStdSPS(this.segment(), index); } + /// {@return `writeStdSPS`} + public @CType("VkBool32") int writeStdSPS() { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_writeStdSPS(this.segment()); } + /// Sets `writeStdSPS` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_writeStdSPS(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_writeStdSPS.set(segment, 0L, index, value); } + /// Sets `writeStdSPS` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_writeStdSPS(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_writeStdSPS(segment, 0L, value); } + /// Sets `writeStdSPS` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR writeStdSPSAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_writeStdSPS(this.segment(), index, value); return this; } + /// Sets `writeStdSPS` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR writeStdSPS(@CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_writeStdSPS(this.segment(), value); return this; } + + /// {@return `writeStdPPS` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_writeStdPPS(MemorySegment segment, long index) { return (int) VH_writeStdPPS.get(segment, 0L, index); } + /// {@return `writeStdPPS`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_writeStdPPS(MemorySegment segment) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_writeStdPPS(segment, 0L); } + /// {@return `writeStdPPS` at the given index} + /// @param index the index + public @CType("VkBool32") int writeStdPPSAt(long index) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_writeStdPPS(this.segment(), index); } + /// {@return `writeStdPPS`} + public @CType("VkBool32") int writeStdPPS() { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_writeStdPPS(this.segment()); } + /// Sets `writeStdPPS` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_writeStdPPS(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_writeStdPPS.set(segment, 0L, index, value); } + /// Sets `writeStdPPS` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_writeStdPPS(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_writeStdPPS(segment, 0L, value); } + /// Sets `writeStdPPS` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR writeStdPPSAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_writeStdPPS(this.segment(), index, value); return this; } + /// Sets `writeStdPPS` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR writeStdPPS(@CType("VkBool32") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_writeStdPPS(this.segment(), value); return this; } + + /// {@return `stdSPSId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdSPSId(MemorySegment segment, long index) { return (int) VH_stdSPSId.get(segment, 0L, index); } + /// {@return `stdSPSId`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdSPSId(MemorySegment segment) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_stdSPSId(segment, 0L); } + /// {@return `stdSPSId` at the given index} + /// @param index the index + public @CType("uint32_t") int stdSPSIdAt(long index) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_stdSPSId(this.segment(), index); } + /// {@return `stdSPSId`} + public @CType("uint32_t") int stdSPSId() { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_stdSPSId(this.segment()); } + /// Sets `stdSPSId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdSPSId(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdSPSId.set(segment, 0L, index, value); } + /// Sets `stdSPSId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdSPSId(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_stdSPSId(segment, 0L, value); } + /// Sets `stdSPSId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR stdSPSIdAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_stdSPSId(this.segment(), index, value); return this; } + /// Sets `stdSPSId` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR stdSPSId(@CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_stdSPSId(this.segment(), value); return this; } + + /// {@return `stdPPSId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdPPSId(MemorySegment segment, long index) { return (int) VH_stdPPSId.get(segment, 0L, index); } + /// {@return `stdPPSId`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdPPSId(MemorySegment segment) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_stdPPSId(segment, 0L); } + /// {@return `stdPPSId` at the given index} + /// @param index the index + public @CType("uint32_t") int stdPPSIdAt(long index) { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_stdPPSId(this.segment(), index); } + /// {@return `stdPPSId`} + public @CType("uint32_t") int stdPPSId() { return VkVideoEncodeH264SessionParametersGetInfoKHR.get_stdPPSId(this.segment()); } + /// Sets `stdPPSId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdPPSId(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdPPSId.set(segment, 0L, index, value); } + /// Sets `stdPPSId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdPPSId(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_stdPPSId(segment, 0L, value); } + /// Sets `stdPPSId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR stdPPSIdAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_stdPPSId(this.segment(), index, value); return this; } + /// Sets `stdPPSId` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH264SessionParametersGetInfoKHR stdPPSId(@CType("uint32_t") int value) { VkVideoEncodeH264SessionParametersGetInfoKHR.set_stdPPSId(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265CapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265CapabilitiesKHR.java new file mode 100644 index 00000000..fe9c54d8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265CapabilitiesKHR.java @@ -0,0 +1,742 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### maxLevelIdc +/// [VarHandle][#VH_maxLevelIdc] - [Getter][#maxLevelIdc()] - [Setter][#maxLevelIdc(int)] +/// ### maxSliceSegmentCount +/// [VarHandle][#VH_maxSliceSegmentCount] - [Getter][#maxSliceSegmentCount()] - [Setter][#maxSliceSegmentCount(int)] +/// ### maxTiles +/// [Byte offset][#OFFSET_maxTiles] - [Memory layout][#ML_maxTiles] - [Getter][#maxTiles()] - [Setter][#maxTiles(java.lang.foreign.MemorySegment)] +/// ### ctbSizes +/// [VarHandle][#VH_ctbSizes] - [Getter][#ctbSizes()] - [Setter][#ctbSizes(int)] +/// ### transformBlockSizes +/// [VarHandle][#VH_transformBlockSizes] - [Getter][#transformBlockSizes()] - [Setter][#transformBlockSizes(int)] +/// ### maxPPictureL0ReferenceCount +/// [VarHandle][#VH_maxPPictureL0ReferenceCount] - [Getter][#maxPPictureL0ReferenceCount()] - [Setter][#maxPPictureL0ReferenceCount(int)] +/// ### maxBPictureL0ReferenceCount +/// [VarHandle][#VH_maxBPictureL0ReferenceCount] - [Getter][#maxBPictureL0ReferenceCount()] - [Setter][#maxBPictureL0ReferenceCount(int)] +/// ### maxL1ReferenceCount +/// [VarHandle][#VH_maxL1ReferenceCount] - [Getter][#maxL1ReferenceCount()] - [Setter][#maxL1ReferenceCount(int)] +/// ### maxSubLayerCount +/// [VarHandle][#VH_maxSubLayerCount] - [Getter][#maxSubLayerCount()] - [Setter][#maxSubLayerCount(int)] +/// ### expectDyadicTemporalSubLayerPattern +/// [VarHandle][#VH_expectDyadicTemporalSubLayerPattern] - [Getter][#expectDyadicTemporalSubLayerPattern()] - [Setter][#expectDyadicTemporalSubLayerPattern(int)] +/// ### minQp +/// [VarHandle][#VH_minQp] - [Getter][#minQp()] - [Setter][#minQp(int)] +/// ### maxQp +/// [VarHandle][#VH_maxQp] - [Getter][#maxQp()] - [Setter][#maxQp(int)] +/// ### prefersGopRemainingFrames +/// [VarHandle][#VH_prefersGopRemainingFrames] - [Getter][#prefersGopRemainingFrames()] - [Setter][#prefersGopRemainingFrames(int)] +/// ### requiresGopRemainingFrames +/// [VarHandle][#VH_requiresGopRemainingFrames] - [Getter][#requiresGopRemainingFrames()] - [Setter][#requiresGopRemainingFrames(int)] +/// ### stdSyntaxFlags +/// [VarHandle][#VH_stdSyntaxFlags] - [Getter][#stdSyntaxFlags()] - [Setter][#stdSyntaxFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265CapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoEncodeH265CapabilityFlagsKHR flags; +/// StdVideoH265LevelIdc maxLevelIdc; +/// uint32_t maxSliceSegmentCount; +/// VkExtent2D maxTiles; +/// VkVideoEncodeH265CtbSizeFlagsKHR ctbSizes; +/// VkVideoEncodeH265TransformBlockSizeFlagsKHR transformBlockSizes; +/// uint32_t maxPPictureL0ReferenceCount; +/// uint32_t maxBPictureL0ReferenceCount; +/// uint32_t maxL1ReferenceCount; +/// uint32_t maxSubLayerCount; +/// VkBool32 expectDyadicTemporalSubLayerPattern; +/// int32_t minQp; +/// int32_t maxQp; +/// VkBool32 prefersGopRemainingFrames; +/// VkBool32 requiresGopRemainingFrames; +/// VkVideoEncodeH265StdFlagsKHR stdSyntaxFlags; +/// } VkVideoEncodeH265CapabilitiesKHR; +/// ``` +public final class VkVideoEncodeH265CapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265CapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("maxLevelIdc"), + ValueLayout.JAVA_INT.withName("maxSliceSegmentCount"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxTiles"), + ValueLayout.JAVA_INT.withName("ctbSizes"), + ValueLayout.JAVA_INT.withName("transformBlockSizes"), + ValueLayout.JAVA_INT.withName("maxPPictureL0ReferenceCount"), + ValueLayout.JAVA_INT.withName("maxBPictureL0ReferenceCount"), + ValueLayout.JAVA_INT.withName("maxL1ReferenceCount"), + ValueLayout.JAVA_INT.withName("maxSubLayerCount"), + ValueLayout.JAVA_INT.withName("expectDyadicTemporalSubLayerPattern"), + ValueLayout.JAVA_INT.withName("minQp"), + ValueLayout.JAVA_INT.withName("maxQp"), + ValueLayout.JAVA_INT.withName("prefersGopRemainingFrames"), + ValueLayout.JAVA_INT.withName("requiresGopRemainingFrames"), + ValueLayout.JAVA_INT.withName("stdSyntaxFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `maxLevelIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxLevelIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLevelIdc")); + /// The [VarHandle] of `maxSliceSegmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSliceSegmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSliceSegmentCount")); + /// The byte offset of `maxTiles`. + public static final long OFFSET_maxTiles = LAYOUT.byteOffset(PathElement.groupElement("maxTiles")); + /// The memory layout of `maxTiles`. + public static final MemoryLayout ML_maxTiles = LAYOUT.select(PathElement.groupElement("maxTiles")); + /// The [VarHandle] of `ctbSizes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ctbSizes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ctbSizes")); + /// The [VarHandle] of `transformBlockSizes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transformBlockSizes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformBlockSizes")); + /// The [VarHandle] of `maxPPictureL0ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPPictureL0ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPPictureL0ReferenceCount")); + /// The [VarHandle] of `maxBPictureL0ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxBPictureL0ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBPictureL0ReferenceCount")); + /// The [VarHandle] of `maxL1ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxL1ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxL1ReferenceCount")); + /// The [VarHandle] of `maxSubLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSubLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSubLayerCount")); + /// The [VarHandle] of `expectDyadicTemporalSubLayerPattern` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_expectDyadicTemporalSubLayerPattern = LAYOUT.arrayElementVarHandle(PathElement.groupElement("expectDyadicTemporalSubLayerPattern")); + /// The [VarHandle] of `minQp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minQp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minQp")); + /// The [VarHandle] of `maxQp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxQp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxQp")); + /// The [VarHandle] of `prefersGopRemainingFrames` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_prefersGopRemainingFrames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("prefersGopRemainingFrames")); + /// The [VarHandle] of `requiresGopRemainingFrames` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_requiresGopRemainingFrames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("requiresGopRemainingFrames")); + /// The [VarHandle] of `stdSyntaxFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdSyntaxFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdSyntaxFlags")); + + /// Creates `VkVideoEncodeH265CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265CapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265CapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265CapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265CapabilitiesKHR(segment); } + + /// Creates `VkVideoEncodeH265CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265CapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265CapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265CapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265CapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265CapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265CapabilitiesKHR` + public static VkVideoEncodeH265CapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265CapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265CapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265CapabilitiesKHR` + public static VkVideoEncodeH265CapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265CapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265CapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265CapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265CapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265CapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265CapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265CapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265CapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265CapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265CapabilityFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265CapabilityFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265CapabilityFlagsKHR") int flagsAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoEncodeH265CapabilityFlagsKHR") int flags() { return VkVideoEncodeH265CapabilitiesKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoEncodeH265CapabilityFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoEncodeH265CapabilityFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR flagsAt(long index, @CType("VkVideoEncodeH265CapabilityFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR flags(@CType("VkVideoEncodeH265CapabilityFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_flags(this.segment(), value); return this; } + + /// {@return `maxLevelIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265LevelIdc") int get_maxLevelIdc(MemorySegment segment, long index) { return (int) VH_maxLevelIdc.get(segment, 0L, index); } + /// {@return `maxLevelIdc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265LevelIdc") int get_maxLevelIdc(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_maxLevelIdc(segment, 0L); } + /// {@return `maxLevelIdc` at the given index} + /// @param index the index + public @CType("StdVideoH265LevelIdc") int maxLevelIdcAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_maxLevelIdc(this.segment(), index); } + /// {@return `maxLevelIdc`} + public @CType("StdVideoH265LevelIdc") int maxLevelIdc() { return VkVideoEncodeH265CapabilitiesKHR.get_maxLevelIdc(this.segment()); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, long index, @CType("StdVideoH265LevelIdc") int value) { VH_maxLevelIdc.set(segment, 0L, index, value); } + /// Sets `maxLevelIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, @CType("StdVideoH265LevelIdc") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxLevelIdc(segment, 0L, value); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxLevelIdcAt(long index, @CType("StdVideoH265LevelIdc") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxLevelIdc(this.segment(), index, value); return this; } + /// Sets `maxLevelIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxLevelIdc(@CType("StdVideoH265LevelIdc") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxLevelIdc(this.segment(), value); return this; } + + /// {@return `maxSliceSegmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSliceSegmentCount(MemorySegment segment, long index) { return (int) VH_maxSliceSegmentCount.get(segment, 0L, index); } + /// {@return `maxSliceSegmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSliceSegmentCount(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_maxSliceSegmentCount(segment, 0L); } + /// {@return `maxSliceSegmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSliceSegmentCountAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_maxSliceSegmentCount(this.segment(), index); } + /// {@return `maxSliceSegmentCount`} + public @CType("uint32_t") int maxSliceSegmentCount() { return VkVideoEncodeH265CapabilitiesKHR.get_maxSliceSegmentCount(this.segment()); } + /// Sets `maxSliceSegmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSliceSegmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSliceSegmentCount.set(segment, 0L, index, value); } + /// Sets `maxSliceSegmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSliceSegmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxSliceSegmentCount(segment, 0L, value); } + /// Sets `maxSliceSegmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxSliceSegmentCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxSliceSegmentCount(this.segment(), index, value); return this; } + /// Sets `maxSliceSegmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxSliceSegmentCount(@CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxSliceSegmentCount(this.segment(), value); return this; } + + /// {@return `maxTiles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxTiles(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxTiles, index), ML_maxTiles); } + /// {@return `maxTiles`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxTiles(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_maxTiles(segment, 0L); } + /// {@return `maxTiles` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxTilesAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_maxTiles(this.segment(), index); } + /// {@return `maxTiles`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxTiles() { return VkVideoEncodeH265CapabilitiesKHR.get_maxTiles(this.segment()); } + /// Sets `maxTiles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTiles(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxTiles, index), ML_maxTiles.byteSize()); } + /// Sets `maxTiles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTiles(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265CapabilitiesKHR.set_maxTiles(segment, 0L, value); } + /// Sets `maxTiles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxTilesAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265CapabilitiesKHR.set_maxTiles(this.segment(), index, value); return this; } + /// Sets `maxTiles` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxTiles(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265CapabilitiesKHR.set_maxTiles(this.segment(), value); return this; } + + /// {@return `ctbSizes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int get_ctbSizes(MemorySegment segment, long index) { return (int) VH_ctbSizes.get(segment, 0L, index); } + /// {@return `ctbSizes`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int get_ctbSizes(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_ctbSizes(segment, 0L); } + /// {@return `ctbSizes` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int ctbSizesAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_ctbSizes(this.segment(), index); } + /// {@return `ctbSizes`} + public @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int ctbSizes() { return VkVideoEncodeH265CapabilitiesKHR.get_ctbSizes(this.segment()); } + /// Sets `ctbSizes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ctbSizes(MemorySegment segment, long index, @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int value) { VH_ctbSizes.set(segment, 0L, index, value); } + /// Sets `ctbSizes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ctbSizes(MemorySegment segment, @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_ctbSizes(segment, 0L, value); } + /// Sets `ctbSizes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR ctbSizesAt(long index, @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_ctbSizes(this.segment(), index, value); return this; } + /// Sets `ctbSizes` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR ctbSizes(@CType("VkVideoEncodeH265CtbSizeFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_ctbSizes(this.segment(), value); return this; } + + /// {@return `transformBlockSizes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265TransformBlockSizeFlagsKHR") int get_transformBlockSizes(MemorySegment segment, long index) { return (int) VH_transformBlockSizes.get(segment, 0L, index); } + /// {@return `transformBlockSizes`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265TransformBlockSizeFlagsKHR") int get_transformBlockSizes(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_transformBlockSizes(segment, 0L); } + /// {@return `transformBlockSizes` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265TransformBlockSizeFlagsKHR") int transformBlockSizesAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_transformBlockSizes(this.segment(), index); } + /// {@return `transformBlockSizes`} + public @CType("VkVideoEncodeH265TransformBlockSizeFlagsKHR") int transformBlockSizes() { return VkVideoEncodeH265CapabilitiesKHR.get_transformBlockSizes(this.segment()); } + /// Sets `transformBlockSizes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformBlockSizes(MemorySegment segment, long index, @CType("VkVideoEncodeH265TransformBlockSizeFlagsKHR") int value) { VH_transformBlockSizes.set(segment, 0L, index, value); } + /// Sets `transformBlockSizes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformBlockSizes(MemorySegment segment, @CType("VkVideoEncodeH265TransformBlockSizeFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_transformBlockSizes(segment, 0L, value); } + /// Sets `transformBlockSizes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR transformBlockSizesAt(long index, @CType("VkVideoEncodeH265TransformBlockSizeFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_transformBlockSizes(this.segment(), index, value); return this; } + /// Sets `transformBlockSizes` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR transformBlockSizes(@CType("VkVideoEncodeH265TransformBlockSizeFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_transformBlockSizes(this.segment(), value); return this; } + + /// {@return `maxPPictureL0ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPPictureL0ReferenceCount(MemorySegment segment, long index) { return (int) VH_maxPPictureL0ReferenceCount.get(segment, 0L, index); } + /// {@return `maxPPictureL0ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPPictureL0ReferenceCount(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_maxPPictureL0ReferenceCount(segment, 0L); } + /// {@return `maxPPictureL0ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPPictureL0ReferenceCountAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_maxPPictureL0ReferenceCount(this.segment(), index); } + /// {@return `maxPPictureL0ReferenceCount`} + public @CType("uint32_t") int maxPPictureL0ReferenceCount() { return VkVideoEncodeH265CapabilitiesKHR.get_maxPPictureL0ReferenceCount(this.segment()); } + /// Sets `maxPPictureL0ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPPictureL0ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPPictureL0ReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxPPictureL0ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPPictureL0ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxPPictureL0ReferenceCount(segment, 0L, value); } + /// Sets `maxPPictureL0ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxPPictureL0ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxPPictureL0ReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxPPictureL0ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxPPictureL0ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxPPictureL0ReferenceCount(this.segment(), value); return this; } + + /// {@return `maxBPictureL0ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxBPictureL0ReferenceCount(MemorySegment segment, long index) { return (int) VH_maxBPictureL0ReferenceCount.get(segment, 0L, index); } + /// {@return `maxBPictureL0ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxBPictureL0ReferenceCount(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_maxBPictureL0ReferenceCount(segment, 0L); } + /// {@return `maxBPictureL0ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxBPictureL0ReferenceCountAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_maxBPictureL0ReferenceCount(this.segment(), index); } + /// {@return `maxBPictureL0ReferenceCount`} + public @CType("uint32_t") int maxBPictureL0ReferenceCount() { return VkVideoEncodeH265CapabilitiesKHR.get_maxBPictureL0ReferenceCount(this.segment()); } + /// Sets `maxBPictureL0ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBPictureL0ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxBPictureL0ReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxBPictureL0ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBPictureL0ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxBPictureL0ReferenceCount(segment, 0L, value); } + /// Sets `maxBPictureL0ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxBPictureL0ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxBPictureL0ReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxBPictureL0ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxBPictureL0ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxBPictureL0ReferenceCount(this.segment(), value); return this; } + + /// {@return `maxL1ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxL1ReferenceCount(MemorySegment segment, long index) { return (int) VH_maxL1ReferenceCount.get(segment, 0L, index); } + /// {@return `maxL1ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxL1ReferenceCount(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_maxL1ReferenceCount(segment, 0L); } + /// {@return `maxL1ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxL1ReferenceCountAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_maxL1ReferenceCount(this.segment(), index); } + /// {@return `maxL1ReferenceCount`} + public @CType("uint32_t") int maxL1ReferenceCount() { return VkVideoEncodeH265CapabilitiesKHR.get_maxL1ReferenceCount(this.segment()); } + /// Sets `maxL1ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxL1ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxL1ReferenceCount.set(segment, 0L, index, value); } + /// Sets `maxL1ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxL1ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxL1ReferenceCount(segment, 0L, value); } + /// Sets `maxL1ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxL1ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxL1ReferenceCount(this.segment(), index, value); return this; } + /// Sets `maxL1ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxL1ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxL1ReferenceCount(this.segment(), value); return this; } + + /// {@return `maxSubLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSubLayerCount(MemorySegment segment, long index) { return (int) VH_maxSubLayerCount.get(segment, 0L, index); } + /// {@return `maxSubLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSubLayerCount(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_maxSubLayerCount(segment, 0L); } + /// {@return `maxSubLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSubLayerCountAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_maxSubLayerCount(this.segment(), index); } + /// {@return `maxSubLayerCount`} + public @CType("uint32_t") int maxSubLayerCount() { return VkVideoEncodeH265CapabilitiesKHR.get_maxSubLayerCount(this.segment()); } + /// Sets `maxSubLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSubLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSubLayerCount.set(segment, 0L, index, value); } + /// Sets `maxSubLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSubLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxSubLayerCount(segment, 0L, value); } + /// Sets `maxSubLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxSubLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxSubLayerCount(this.segment(), index, value); return this; } + /// Sets `maxSubLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxSubLayerCount(@CType("uint32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxSubLayerCount(this.segment(), value); return this; } + + /// {@return `expectDyadicTemporalSubLayerPattern` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_expectDyadicTemporalSubLayerPattern(MemorySegment segment, long index) { return (int) VH_expectDyadicTemporalSubLayerPattern.get(segment, 0L, index); } + /// {@return `expectDyadicTemporalSubLayerPattern`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_expectDyadicTemporalSubLayerPattern(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_expectDyadicTemporalSubLayerPattern(segment, 0L); } + /// {@return `expectDyadicTemporalSubLayerPattern` at the given index} + /// @param index the index + public @CType("VkBool32") int expectDyadicTemporalSubLayerPatternAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_expectDyadicTemporalSubLayerPattern(this.segment(), index); } + /// {@return `expectDyadicTemporalSubLayerPattern`} + public @CType("VkBool32") int expectDyadicTemporalSubLayerPattern() { return VkVideoEncodeH265CapabilitiesKHR.get_expectDyadicTemporalSubLayerPattern(this.segment()); } + /// Sets `expectDyadicTemporalSubLayerPattern` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_expectDyadicTemporalSubLayerPattern(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_expectDyadicTemporalSubLayerPattern.set(segment, 0L, index, value); } + /// Sets `expectDyadicTemporalSubLayerPattern` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_expectDyadicTemporalSubLayerPattern(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265CapabilitiesKHR.set_expectDyadicTemporalSubLayerPattern(segment, 0L, value); } + /// Sets `expectDyadicTemporalSubLayerPattern` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR expectDyadicTemporalSubLayerPatternAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265CapabilitiesKHR.set_expectDyadicTemporalSubLayerPattern(this.segment(), index, value); return this; } + /// Sets `expectDyadicTemporalSubLayerPattern` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR expectDyadicTemporalSubLayerPattern(@CType("VkBool32") int value) { VkVideoEncodeH265CapabilitiesKHR.set_expectDyadicTemporalSubLayerPattern(this.segment(), value); return this; } + + /// {@return `minQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_minQp(MemorySegment segment, long index) { return (int) VH_minQp.get(segment, 0L, index); } + /// {@return `minQp`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_minQp(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_minQp(segment, 0L); } + /// {@return `minQp` at the given index} + /// @param index the index + public @CType("int32_t") int minQpAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_minQp(this.segment(), index); } + /// {@return `minQp`} + public @CType("int32_t") int minQp() { return VkVideoEncodeH265CapabilitiesKHR.get_minQp(this.segment()); } + /// Sets `minQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minQp(MemorySegment segment, long index, @CType("int32_t") int value) { VH_minQp.set(segment, 0L, index, value); } + /// Sets `minQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minQp(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_minQp(segment, 0L, value); } + /// Sets `minQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR minQpAt(long index, @CType("int32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_minQp(this.segment(), index, value); return this; } + /// Sets `minQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR minQp(@CType("int32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_minQp(this.segment(), value); return this; } + + /// {@return `maxQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_maxQp(MemorySegment segment, long index) { return (int) VH_maxQp.get(segment, 0L, index); } + /// {@return `maxQp`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_maxQp(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_maxQp(segment, 0L); } + /// {@return `maxQp` at the given index} + /// @param index the index + public @CType("int32_t") int maxQpAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_maxQp(this.segment(), index); } + /// {@return `maxQp`} + public @CType("int32_t") int maxQp() { return VkVideoEncodeH265CapabilitiesKHR.get_maxQp(this.segment()); } + /// Sets `maxQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQp(MemorySegment segment, long index, @CType("int32_t") int value) { VH_maxQp.set(segment, 0L, index, value); } + /// Sets `maxQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQp(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxQp(segment, 0L, value); } + /// Sets `maxQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxQpAt(long index, @CType("int32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxQp(this.segment(), index, value); return this; } + /// Sets `maxQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR maxQp(@CType("int32_t") int value) { VkVideoEncodeH265CapabilitiesKHR.set_maxQp(this.segment(), value); return this; } + + /// {@return `prefersGopRemainingFrames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_prefersGopRemainingFrames(MemorySegment segment, long index) { return (int) VH_prefersGopRemainingFrames.get(segment, 0L, index); } + /// {@return `prefersGopRemainingFrames`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_prefersGopRemainingFrames(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_prefersGopRemainingFrames(segment, 0L); } + /// {@return `prefersGopRemainingFrames` at the given index} + /// @param index the index + public @CType("VkBool32") int prefersGopRemainingFramesAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_prefersGopRemainingFrames(this.segment(), index); } + /// {@return `prefersGopRemainingFrames`} + public @CType("VkBool32") int prefersGopRemainingFrames() { return VkVideoEncodeH265CapabilitiesKHR.get_prefersGopRemainingFrames(this.segment()); } + /// Sets `prefersGopRemainingFrames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_prefersGopRemainingFrames(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_prefersGopRemainingFrames.set(segment, 0L, index, value); } + /// Sets `prefersGopRemainingFrames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_prefersGopRemainingFrames(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265CapabilitiesKHR.set_prefersGopRemainingFrames(segment, 0L, value); } + /// Sets `prefersGopRemainingFrames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR prefersGopRemainingFramesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265CapabilitiesKHR.set_prefersGopRemainingFrames(this.segment(), index, value); return this; } + /// Sets `prefersGopRemainingFrames` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR prefersGopRemainingFrames(@CType("VkBool32") int value) { VkVideoEncodeH265CapabilitiesKHR.set_prefersGopRemainingFrames(this.segment(), value); return this; } + + /// {@return `requiresGopRemainingFrames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_requiresGopRemainingFrames(MemorySegment segment, long index) { return (int) VH_requiresGopRemainingFrames.get(segment, 0L, index); } + /// {@return `requiresGopRemainingFrames`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_requiresGopRemainingFrames(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_requiresGopRemainingFrames(segment, 0L); } + /// {@return `requiresGopRemainingFrames` at the given index} + /// @param index the index + public @CType("VkBool32") int requiresGopRemainingFramesAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_requiresGopRemainingFrames(this.segment(), index); } + /// {@return `requiresGopRemainingFrames`} + public @CType("VkBool32") int requiresGopRemainingFrames() { return VkVideoEncodeH265CapabilitiesKHR.get_requiresGopRemainingFrames(this.segment()); } + /// Sets `requiresGopRemainingFrames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_requiresGopRemainingFrames(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_requiresGopRemainingFrames.set(segment, 0L, index, value); } + /// Sets `requiresGopRemainingFrames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_requiresGopRemainingFrames(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265CapabilitiesKHR.set_requiresGopRemainingFrames(segment, 0L, value); } + /// Sets `requiresGopRemainingFrames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR requiresGopRemainingFramesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265CapabilitiesKHR.set_requiresGopRemainingFrames(this.segment(), index, value); return this; } + /// Sets `requiresGopRemainingFrames` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR requiresGopRemainingFrames(@CType("VkBool32") int value) { VkVideoEncodeH265CapabilitiesKHR.set_requiresGopRemainingFrames(this.segment(), value); return this; } + + /// {@return `stdSyntaxFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265StdFlagsKHR") int get_stdSyntaxFlags(MemorySegment segment, long index) { return (int) VH_stdSyntaxFlags.get(segment, 0L, index); } + /// {@return `stdSyntaxFlags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265StdFlagsKHR") int get_stdSyntaxFlags(MemorySegment segment) { return VkVideoEncodeH265CapabilitiesKHR.get_stdSyntaxFlags(segment, 0L); } + /// {@return `stdSyntaxFlags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265StdFlagsKHR") int stdSyntaxFlagsAt(long index) { return VkVideoEncodeH265CapabilitiesKHR.get_stdSyntaxFlags(this.segment(), index); } + /// {@return `stdSyntaxFlags`} + public @CType("VkVideoEncodeH265StdFlagsKHR") int stdSyntaxFlags() { return VkVideoEncodeH265CapabilitiesKHR.get_stdSyntaxFlags(this.segment()); } + /// Sets `stdSyntaxFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdSyntaxFlags(MemorySegment segment, long index, @CType("VkVideoEncodeH265StdFlagsKHR") int value) { VH_stdSyntaxFlags.set(segment, 0L, index, value); } + /// Sets `stdSyntaxFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdSyntaxFlags(MemorySegment segment, @CType("VkVideoEncodeH265StdFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_stdSyntaxFlags(segment, 0L, value); } + /// Sets `stdSyntaxFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR stdSyntaxFlagsAt(long index, @CType("VkVideoEncodeH265StdFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_stdSyntaxFlags(this.segment(), index, value); return this; } + /// Sets `stdSyntaxFlags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265CapabilitiesKHR stdSyntaxFlags(@CType("VkVideoEncodeH265StdFlagsKHR") int value) { VkVideoEncodeH265CapabilitiesKHR.set_stdSyntaxFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265DpbSlotInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265DpbSlotInfoKHR.java new file mode 100644 index 00000000..236429fc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265DpbSlotInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pStdReferenceInfo +/// [VarHandle][#VH_pStdReferenceInfo] - [Getter][#pStdReferenceInfo()] - [Setter][#pStdReferenceInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265DpbSlotInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// const StdVideoEncodeH265ReferenceInfo * pStdReferenceInfo; +/// } VkVideoEncodeH265DpbSlotInfoKHR; +/// ``` +public final class VkVideoEncodeH265DpbSlotInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265DpbSlotInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pStdReferenceInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pStdReferenceInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdReferenceInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdReferenceInfo")); + + /// Creates `VkVideoEncodeH265DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265DpbSlotInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265DpbSlotInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265DpbSlotInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265DpbSlotInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265DpbSlotInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265DpbSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265DpbSlotInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265DpbSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265DpbSlotInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265DpbSlotInfoKHR` + public static VkVideoEncodeH265DpbSlotInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265DpbSlotInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265DpbSlotInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265DpbSlotInfoKHR` + public static VkVideoEncodeH265DpbSlotInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265DpbSlotInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265DpbSlotInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265DpbSlotInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265DpbSlotInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265DpbSlotInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265DpbSlotInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265DpbSlotInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265DpbSlotInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265DpbSlotInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265DpbSlotInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265DpbSlotInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265DpbSlotInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265DpbSlotInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265DpbSlotInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265DpbSlotInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265DpbSlotInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265DpbSlotInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `pStdReferenceInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH265ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdReferenceInfo.get(segment, 0L, index); } + /// {@return `pStdReferenceInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH265ReferenceInfo *") java.lang.foreign.MemorySegment get_pStdReferenceInfo(MemorySegment segment) { return VkVideoEncodeH265DpbSlotInfoKHR.get_pStdReferenceInfo(segment, 0L); } + /// {@return `pStdReferenceInfo` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH265ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfoAt(long index) { return VkVideoEncodeH265DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment(), index); } + /// {@return `pStdReferenceInfo`} + public @CType("const StdVideoEncodeH265ReferenceInfo *") java.lang.foreign.MemorySegment pStdReferenceInfo() { return VkVideoEncodeH265DpbSlotInfoKHR.get_pStdReferenceInfo(this.segment()); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, long index, @CType("const StdVideoEncodeH265ReferenceInfo *") java.lang.foreign.MemorySegment value) { VH_pStdReferenceInfo.set(segment, 0L, index, value); } + /// Sets `pStdReferenceInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdReferenceInfo(MemorySegment segment, @CType("const StdVideoEncodeH265ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265DpbSlotInfoKHR.set_pStdReferenceInfo(segment, 0L, value); } + /// Sets `pStdReferenceInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265DpbSlotInfoKHR pStdReferenceInfoAt(long index, @CType("const StdVideoEncodeH265ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), index, value); return this; } + /// Sets `pStdReferenceInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265DpbSlotInfoKHR pStdReferenceInfo(@CType("const StdVideoEncodeH265ReferenceInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265DpbSlotInfoKHR.set_pStdReferenceInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265FrameSizeKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265FrameSizeKHR.java new file mode 100644 index 00000000..760bad6a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265FrameSizeKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### frameISize +/// [VarHandle][#VH_frameISize] - [Getter][#frameISize()] - [Setter][#frameISize(int)] +/// ### framePSize +/// [VarHandle][#VH_framePSize] - [Getter][#framePSize()] - [Setter][#framePSize(int)] +/// ### frameBSize +/// [VarHandle][#VH_frameBSize] - [Getter][#frameBSize()] - [Setter][#frameBSize(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265FrameSizeKHR { +/// uint32_t frameISize; +/// uint32_t framePSize; +/// uint32_t frameBSize; +/// } VkVideoEncodeH265FrameSizeKHR; +/// ``` +public final class VkVideoEncodeH265FrameSizeKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265FrameSizeKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("frameISize"), + ValueLayout.JAVA_INT.withName("framePSize"), + ValueLayout.JAVA_INT.withName("frameBSize") + ); + /// The [VarHandle] of `frameISize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frameISize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameISize")); + /// The [VarHandle] of `framePSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_framePSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("framePSize")); + /// The [VarHandle] of `frameBSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frameBSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameBSize")); + + /// Creates `VkVideoEncodeH265FrameSizeKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265FrameSizeKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265FrameSizeKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265FrameSizeKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265FrameSizeKHR(segment); } + + /// Creates `VkVideoEncodeH265FrameSizeKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265FrameSizeKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265FrameSizeKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265FrameSizeKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265FrameSizeKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265FrameSizeKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265FrameSizeKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265FrameSizeKHR` + public static VkVideoEncodeH265FrameSizeKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265FrameSizeKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265FrameSizeKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265FrameSizeKHR` + public static VkVideoEncodeH265FrameSizeKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265FrameSizeKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `frameISize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frameISize(MemorySegment segment, long index) { return (int) VH_frameISize.get(segment, 0L, index); } + /// {@return `frameISize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frameISize(MemorySegment segment) { return VkVideoEncodeH265FrameSizeKHR.get_frameISize(segment, 0L); } + /// {@return `frameISize` at the given index} + /// @param index the index + public @CType("uint32_t") int frameISizeAt(long index) { return VkVideoEncodeH265FrameSizeKHR.get_frameISize(this.segment(), index); } + /// {@return `frameISize`} + public @CType("uint32_t") int frameISize() { return VkVideoEncodeH265FrameSizeKHR.get_frameISize(this.segment()); } + /// Sets `frameISize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameISize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frameISize.set(segment, 0L, index, value); } + /// Sets `frameISize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameISize(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265FrameSizeKHR.set_frameISize(segment, 0L, value); } + /// Sets `frameISize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265FrameSizeKHR frameISizeAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265FrameSizeKHR.set_frameISize(this.segment(), index, value); return this; } + /// Sets `frameISize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265FrameSizeKHR frameISize(@CType("uint32_t") int value) { VkVideoEncodeH265FrameSizeKHR.set_frameISize(this.segment(), value); return this; } + + /// {@return `framePSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_framePSize(MemorySegment segment, long index) { return (int) VH_framePSize.get(segment, 0L, index); } + /// {@return `framePSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_framePSize(MemorySegment segment) { return VkVideoEncodeH265FrameSizeKHR.get_framePSize(segment, 0L); } + /// {@return `framePSize` at the given index} + /// @param index the index + public @CType("uint32_t") int framePSizeAt(long index) { return VkVideoEncodeH265FrameSizeKHR.get_framePSize(this.segment(), index); } + /// {@return `framePSize`} + public @CType("uint32_t") int framePSize() { return VkVideoEncodeH265FrameSizeKHR.get_framePSize(this.segment()); } + /// Sets `framePSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_framePSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_framePSize.set(segment, 0L, index, value); } + /// Sets `framePSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_framePSize(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265FrameSizeKHR.set_framePSize(segment, 0L, value); } + /// Sets `framePSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265FrameSizeKHR framePSizeAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265FrameSizeKHR.set_framePSize(this.segment(), index, value); return this; } + /// Sets `framePSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265FrameSizeKHR framePSize(@CType("uint32_t") int value) { VkVideoEncodeH265FrameSizeKHR.set_framePSize(this.segment(), value); return this; } + + /// {@return `frameBSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frameBSize(MemorySegment segment, long index) { return (int) VH_frameBSize.get(segment, 0L, index); } + /// {@return `frameBSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frameBSize(MemorySegment segment) { return VkVideoEncodeH265FrameSizeKHR.get_frameBSize(segment, 0L); } + /// {@return `frameBSize` at the given index} + /// @param index the index + public @CType("uint32_t") int frameBSizeAt(long index) { return VkVideoEncodeH265FrameSizeKHR.get_frameBSize(this.segment(), index); } + /// {@return `frameBSize`} + public @CType("uint32_t") int frameBSize() { return VkVideoEncodeH265FrameSizeKHR.get_frameBSize(this.segment()); } + /// Sets `frameBSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameBSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frameBSize.set(segment, 0L, index, value); } + /// Sets `frameBSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameBSize(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265FrameSizeKHR.set_frameBSize(segment, 0L, value); } + /// Sets `frameBSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265FrameSizeKHR frameBSizeAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265FrameSizeKHR.set_frameBSize(this.segment(), index, value); return this; } + /// Sets `frameBSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265FrameSizeKHR frameBSize(@CType("uint32_t") int value) { VkVideoEncodeH265FrameSizeKHR.set_frameBSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265GopRemainingFrameInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265GopRemainingFrameInfoKHR.java new file mode 100644 index 00000000..4fb298b8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265GopRemainingFrameInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### useGopRemainingFrames +/// [VarHandle][#VH_useGopRemainingFrames] - [Getter][#useGopRemainingFrames()] - [Setter][#useGopRemainingFrames(int)] +/// ### gopRemainingI +/// [VarHandle][#VH_gopRemainingI] - [Getter][#gopRemainingI()] - [Setter][#gopRemainingI(int)] +/// ### gopRemainingP +/// [VarHandle][#VH_gopRemainingP] - [Getter][#gopRemainingP()] - [Setter][#gopRemainingP(int)] +/// ### gopRemainingB +/// [VarHandle][#VH_gopRemainingB] - [Getter][#gopRemainingB()] - [Setter][#gopRemainingB(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265GopRemainingFrameInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 useGopRemainingFrames; +/// uint32_t gopRemainingI; +/// uint32_t gopRemainingP; +/// uint32_t gopRemainingB; +/// } VkVideoEncodeH265GopRemainingFrameInfoKHR; +/// ``` +public final class VkVideoEncodeH265GopRemainingFrameInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265GopRemainingFrameInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("useGopRemainingFrames"), + ValueLayout.JAVA_INT.withName("gopRemainingI"), + ValueLayout.JAVA_INT.withName("gopRemainingP"), + ValueLayout.JAVA_INT.withName("gopRemainingB") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `useGopRemainingFrames` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useGopRemainingFrames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useGopRemainingFrames")); + /// The [VarHandle] of `gopRemainingI` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopRemainingI = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopRemainingI")); + /// The [VarHandle] of `gopRemainingP` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopRemainingP = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopRemainingP")); + /// The [VarHandle] of `gopRemainingB` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopRemainingB = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopRemainingB")); + + /// Creates `VkVideoEncodeH265GopRemainingFrameInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265GopRemainingFrameInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265GopRemainingFrameInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265GopRemainingFrameInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265GopRemainingFrameInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265GopRemainingFrameInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265GopRemainingFrameInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265GopRemainingFrameInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265GopRemainingFrameInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265GopRemainingFrameInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265GopRemainingFrameInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265GopRemainingFrameInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265GopRemainingFrameInfoKHR` + public static VkVideoEncodeH265GopRemainingFrameInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265GopRemainingFrameInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265GopRemainingFrameInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265GopRemainingFrameInfoKHR` + public static VkVideoEncodeH265GopRemainingFrameInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265GopRemainingFrameInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `useGopRemainingFrames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useGopRemainingFrames(MemorySegment segment, long index) { return (int) VH_useGopRemainingFrames.get(segment, 0L, index); } + /// {@return `useGopRemainingFrames`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useGopRemainingFrames(MemorySegment segment) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_useGopRemainingFrames(segment, 0L); } + /// {@return `useGopRemainingFrames` at the given index} + /// @param index the index + public @CType("VkBool32") int useGopRemainingFramesAt(long index) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_useGopRemainingFrames(this.segment(), index); } + /// {@return `useGopRemainingFrames`} + public @CType("VkBool32") int useGopRemainingFrames() { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_useGopRemainingFrames(this.segment()); } + /// Sets `useGopRemainingFrames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useGopRemainingFrames(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useGopRemainingFrames.set(segment, 0L, index, value); } + /// Sets `useGopRemainingFrames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useGopRemainingFrames(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_useGopRemainingFrames(segment, 0L, value); } + /// Sets `useGopRemainingFrames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR useGopRemainingFramesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_useGopRemainingFrames(this.segment(), index, value); return this; } + /// Sets `useGopRemainingFrames` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR useGopRemainingFrames(@CType("VkBool32") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_useGopRemainingFrames(this.segment(), value); return this; } + + /// {@return `gopRemainingI` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopRemainingI(MemorySegment segment, long index) { return (int) VH_gopRemainingI.get(segment, 0L, index); } + /// {@return `gopRemainingI`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopRemainingI(MemorySegment segment) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_gopRemainingI(segment, 0L); } + /// {@return `gopRemainingI` at the given index} + /// @param index the index + public @CType("uint32_t") int gopRemainingIAt(long index) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_gopRemainingI(this.segment(), index); } + /// {@return `gopRemainingI`} + public @CType("uint32_t") int gopRemainingI() { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_gopRemainingI(this.segment()); } + /// Sets `gopRemainingI` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopRemainingI(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopRemainingI.set(segment, 0L, index, value); } + /// Sets `gopRemainingI` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopRemainingI(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_gopRemainingI(segment, 0L, value); } + /// Sets `gopRemainingI` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR gopRemainingIAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_gopRemainingI(this.segment(), index, value); return this; } + /// Sets `gopRemainingI` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR gopRemainingI(@CType("uint32_t") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_gopRemainingI(this.segment(), value); return this; } + + /// {@return `gopRemainingP` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopRemainingP(MemorySegment segment, long index) { return (int) VH_gopRemainingP.get(segment, 0L, index); } + /// {@return `gopRemainingP`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopRemainingP(MemorySegment segment) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_gopRemainingP(segment, 0L); } + /// {@return `gopRemainingP` at the given index} + /// @param index the index + public @CType("uint32_t") int gopRemainingPAt(long index) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_gopRemainingP(this.segment(), index); } + /// {@return `gopRemainingP`} + public @CType("uint32_t") int gopRemainingP() { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_gopRemainingP(this.segment()); } + /// Sets `gopRemainingP` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopRemainingP(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopRemainingP.set(segment, 0L, index, value); } + /// Sets `gopRemainingP` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopRemainingP(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_gopRemainingP(segment, 0L, value); } + /// Sets `gopRemainingP` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR gopRemainingPAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_gopRemainingP(this.segment(), index, value); return this; } + /// Sets `gopRemainingP` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR gopRemainingP(@CType("uint32_t") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_gopRemainingP(this.segment(), value); return this; } + + /// {@return `gopRemainingB` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopRemainingB(MemorySegment segment, long index) { return (int) VH_gopRemainingB.get(segment, 0L, index); } + /// {@return `gopRemainingB`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopRemainingB(MemorySegment segment) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_gopRemainingB(segment, 0L); } + /// {@return `gopRemainingB` at the given index} + /// @param index the index + public @CType("uint32_t") int gopRemainingBAt(long index) { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_gopRemainingB(this.segment(), index); } + /// {@return `gopRemainingB`} + public @CType("uint32_t") int gopRemainingB() { return VkVideoEncodeH265GopRemainingFrameInfoKHR.get_gopRemainingB(this.segment()); } + /// Sets `gopRemainingB` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopRemainingB(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopRemainingB.set(segment, 0L, index, value); } + /// Sets `gopRemainingB` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopRemainingB(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_gopRemainingB(segment, 0L, value); } + /// Sets `gopRemainingB` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR gopRemainingBAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_gopRemainingB(this.segment(), index, value); return this; } + /// Sets `gopRemainingB` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265GopRemainingFrameInfoKHR gopRemainingB(@CType("uint32_t") int value) { VkVideoEncodeH265GopRemainingFrameInfoKHR.set_gopRemainingB(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265NaluSliceSegmentInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265NaluSliceSegmentInfoKHR.java new file mode 100644 index 00000000..af2caf55 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265NaluSliceSegmentInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### constantQp +/// [VarHandle][#VH_constantQp] - [Getter][#constantQp()] - [Setter][#constantQp(int)] +/// ### pStdSliceSegmentHeader +/// [VarHandle][#VH_pStdSliceSegmentHeader] - [Getter][#pStdSliceSegmentHeader()] - [Setter][#pStdSliceSegmentHeader(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265NaluSliceSegmentInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// int32_t constantQp; +/// const StdVideoEncodeH265SliceSegmentHeader * pStdSliceSegmentHeader; +/// } VkVideoEncodeH265NaluSliceSegmentInfoKHR; +/// ``` +public final class VkVideoEncodeH265NaluSliceSegmentInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265NaluSliceSegmentInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("constantQp"), + ValueLayout.ADDRESS.withName("pStdSliceSegmentHeader") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `constantQp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constantQp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constantQp")); + /// The [VarHandle] of `pStdSliceSegmentHeader` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdSliceSegmentHeader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdSliceSegmentHeader")); + + /// Creates `VkVideoEncodeH265NaluSliceSegmentInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265NaluSliceSegmentInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265NaluSliceSegmentInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265NaluSliceSegmentInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265NaluSliceSegmentInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265NaluSliceSegmentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265NaluSliceSegmentInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265NaluSliceSegmentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265NaluSliceSegmentInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265NaluSliceSegmentInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265NaluSliceSegmentInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265NaluSliceSegmentInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265NaluSliceSegmentInfoKHR` + public static VkVideoEncodeH265NaluSliceSegmentInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265NaluSliceSegmentInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265NaluSliceSegmentInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265NaluSliceSegmentInfoKHR` + public static VkVideoEncodeH265NaluSliceSegmentInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265NaluSliceSegmentInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265NaluSliceSegmentInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265NaluSliceSegmentInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265NaluSliceSegmentInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265NaluSliceSegmentInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `constantQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_constantQp(MemorySegment segment, long index) { return (int) VH_constantQp.get(segment, 0L, index); } + /// {@return `constantQp`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_constantQp(MemorySegment segment) { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_constantQp(segment, 0L); } + /// {@return `constantQp` at the given index} + /// @param index the index + public @CType("int32_t") int constantQpAt(long index) { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_constantQp(this.segment(), index); } + /// {@return `constantQp`} + public @CType("int32_t") int constantQp() { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_constantQp(this.segment()); } + /// Sets `constantQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constantQp(MemorySegment segment, long index, @CType("int32_t") int value) { VH_constantQp.set(segment, 0L, index, value); } + /// Sets `constantQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constantQp(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_constantQp(segment, 0L, value); } + /// Sets `constantQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265NaluSliceSegmentInfoKHR constantQpAt(long index, @CType("int32_t") int value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_constantQp(this.segment(), index, value); return this; } + /// Sets `constantQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265NaluSliceSegmentInfoKHR constantQp(@CType("int32_t") int value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_constantQp(this.segment(), value); return this; } + + /// {@return `pStdSliceSegmentHeader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH265SliceSegmentHeader *") java.lang.foreign.MemorySegment get_pStdSliceSegmentHeader(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdSliceSegmentHeader.get(segment, 0L, index); } + /// {@return `pStdSliceSegmentHeader`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH265SliceSegmentHeader *") java.lang.foreign.MemorySegment get_pStdSliceSegmentHeader(MemorySegment segment) { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_pStdSliceSegmentHeader(segment, 0L); } + /// {@return `pStdSliceSegmentHeader` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH265SliceSegmentHeader *") java.lang.foreign.MemorySegment pStdSliceSegmentHeaderAt(long index) { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_pStdSliceSegmentHeader(this.segment(), index); } + /// {@return `pStdSliceSegmentHeader`} + public @CType("const StdVideoEncodeH265SliceSegmentHeader *") java.lang.foreign.MemorySegment pStdSliceSegmentHeader() { return VkVideoEncodeH265NaluSliceSegmentInfoKHR.get_pStdSliceSegmentHeader(this.segment()); } + /// Sets `pStdSliceSegmentHeader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdSliceSegmentHeader(MemorySegment segment, long index, @CType("const StdVideoEncodeH265SliceSegmentHeader *") java.lang.foreign.MemorySegment value) { VH_pStdSliceSegmentHeader.set(segment, 0L, index, value); } + /// Sets `pStdSliceSegmentHeader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdSliceSegmentHeader(MemorySegment segment, @CType("const StdVideoEncodeH265SliceSegmentHeader *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_pStdSliceSegmentHeader(segment, 0L, value); } + /// Sets `pStdSliceSegmentHeader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265NaluSliceSegmentInfoKHR pStdSliceSegmentHeaderAt(long index, @CType("const StdVideoEncodeH265SliceSegmentHeader *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_pStdSliceSegmentHeader(this.segment(), index, value); return this; } + /// Sets `pStdSliceSegmentHeader` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265NaluSliceSegmentInfoKHR pStdSliceSegmentHeader(@CType("const StdVideoEncodeH265SliceSegmentHeader *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265NaluSliceSegmentInfoKHR.set_pStdSliceSegmentHeader(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265PictureInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265PictureInfoKHR.java new file mode 100644 index 00000000..d0b6e380 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265PictureInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### naluSliceSegmentEntryCount +/// [VarHandle][#VH_naluSliceSegmentEntryCount] - [Getter][#naluSliceSegmentEntryCount()] - [Setter][#naluSliceSegmentEntryCount(int)] +/// ### pNaluSliceSegmentEntries +/// [VarHandle][#VH_pNaluSliceSegmentEntries] - [Getter][#pNaluSliceSegmentEntries()] - [Setter][#pNaluSliceSegmentEntries(java.lang.foreign.MemorySegment)] +/// ### pStdPictureInfo +/// [VarHandle][#VH_pStdPictureInfo] - [Getter][#pStdPictureInfo()] - [Setter][#pStdPictureInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265PictureInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t naluSliceSegmentEntryCount; +/// const VkVideoEncodeH265NaluSliceSegmentInfoKHR * pNaluSliceSegmentEntries; +/// const StdVideoEncodeH265PictureInfo * pStdPictureInfo; +/// } VkVideoEncodeH265PictureInfoKHR; +/// ``` +public final class VkVideoEncodeH265PictureInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265PictureInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("naluSliceSegmentEntryCount"), + ValueLayout.ADDRESS.withName("pNaluSliceSegmentEntries"), + ValueLayout.ADDRESS.withName("pStdPictureInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `naluSliceSegmentEntryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_naluSliceSegmentEntryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("naluSliceSegmentEntryCount")); + /// The [VarHandle] of `pNaluSliceSegmentEntries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNaluSliceSegmentEntries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNaluSliceSegmentEntries")); + /// The [VarHandle] of `pStdPictureInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdPictureInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdPictureInfo")); + + /// Creates `VkVideoEncodeH265PictureInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265PictureInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265PictureInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265PictureInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265PictureInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265PictureInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265PictureInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265PictureInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265PictureInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265PictureInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265PictureInfoKHR` + public static VkVideoEncodeH265PictureInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265PictureInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265PictureInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265PictureInfoKHR` + public static VkVideoEncodeH265PictureInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265PictureInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265PictureInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265PictureInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265PictureInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265PictureInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265PictureInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265PictureInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265PictureInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265PictureInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265PictureInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265PictureInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265PictureInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265PictureInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265PictureInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265PictureInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265PictureInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265PictureInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `naluSliceSegmentEntryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_naluSliceSegmentEntryCount(MemorySegment segment, long index) { return (int) VH_naluSliceSegmentEntryCount.get(segment, 0L, index); } + /// {@return `naluSliceSegmentEntryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_naluSliceSegmentEntryCount(MemorySegment segment) { return VkVideoEncodeH265PictureInfoKHR.get_naluSliceSegmentEntryCount(segment, 0L); } + /// {@return `naluSliceSegmentEntryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int naluSliceSegmentEntryCountAt(long index) { return VkVideoEncodeH265PictureInfoKHR.get_naluSliceSegmentEntryCount(this.segment(), index); } + /// {@return `naluSliceSegmentEntryCount`} + public @CType("uint32_t") int naluSliceSegmentEntryCount() { return VkVideoEncodeH265PictureInfoKHR.get_naluSliceSegmentEntryCount(this.segment()); } + /// Sets `naluSliceSegmentEntryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_naluSliceSegmentEntryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_naluSliceSegmentEntryCount.set(segment, 0L, index, value); } + /// Sets `naluSliceSegmentEntryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_naluSliceSegmentEntryCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265PictureInfoKHR.set_naluSliceSegmentEntryCount(segment, 0L, value); } + /// Sets `naluSliceSegmentEntryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265PictureInfoKHR naluSliceSegmentEntryCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265PictureInfoKHR.set_naluSliceSegmentEntryCount(this.segment(), index, value); return this; } + /// Sets `naluSliceSegmentEntryCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265PictureInfoKHR naluSliceSegmentEntryCount(@CType("uint32_t") int value) { VkVideoEncodeH265PictureInfoKHR.set_naluSliceSegmentEntryCount(this.segment(), value); return this; } + + /// {@return `pNaluSliceSegmentEntries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoEncodeH265NaluSliceSegmentInfoKHR *") java.lang.foreign.MemorySegment get_pNaluSliceSegmentEntries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNaluSliceSegmentEntries.get(segment, 0L, index); } + /// {@return `pNaluSliceSegmentEntries`} + /// @param segment the segment of the struct + public static @CType("const VkVideoEncodeH265NaluSliceSegmentInfoKHR *") java.lang.foreign.MemorySegment get_pNaluSliceSegmentEntries(MemorySegment segment) { return VkVideoEncodeH265PictureInfoKHR.get_pNaluSliceSegmentEntries(segment, 0L); } + /// {@return `pNaluSliceSegmentEntries` at the given index} + /// @param index the index + public @CType("const VkVideoEncodeH265NaluSliceSegmentInfoKHR *") java.lang.foreign.MemorySegment pNaluSliceSegmentEntriesAt(long index) { return VkVideoEncodeH265PictureInfoKHR.get_pNaluSliceSegmentEntries(this.segment(), index); } + /// {@return `pNaluSliceSegmentEntries`} + public @CType("const VkVideoEncodeH265NaluSliceSegmentInfoKHR *") java.lang.foreign.MemorySegment pNaluSliceSegmentEntries() { return VkVideoEncodeH265PictureInfoKHR.get_pNaluSliceSegmentEntries(this.segment()); } + /// Sets `pNaluSliceSegmentEntries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNaluSliceSegmentEntries(MemorySegment segment, long index, @CType("const VkVideoEncodeH265NaluSliceSegmentInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pNaluSliceSegmentEntries.set(segment, 0L, index, value); } + /// Sets `pNaluSliceSegmentEntries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNaluSliceSegmentEntries(MemorySegment segment, @CType("const VkVideoEncodeH265NaluSliceSegmentInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265PictureInfoKHR.set_pNaluSliceSegmentEntries(segment, 0L, value); } + /// Sets `pNaluSliceSegmentEntries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265PictureInfoKHR pNaluSliceSegmentEntriesAt(long index, @CType("const VkVideoEncodeH265NaluSliceSegmentInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265PictureInfoKHR.set_pNaluSliceSegmentEntries(this.segment(), index, value); return this; } + /// Sets `pNaluSliceSegmentEntries` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265PictureInfoKHR pNaluSliceSegmentEntries(@CType("const VkVideoEncodeH265NaluSliceSegmentInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265PictureInfoKHR.set_pNaluSliceSegmentEntries(this.segment(), value); return this; } + + /// {@return `pStdPictureInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH265PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdPictureInfo.get(segment, 0L, index); } + /// {@return `pStdPictureInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH265PictureInfo *") java.lang.foreign.MemorySegment get_pStdPictureInfo(MemorySegment segment) { return VkVideoEncodeH265PictureInfoKHR.get_pStdPictureInfo(segment, 0L); } + /// {@return `pStdPictureInfo` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH265PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfoAt(long index) { return VkVideoEncodeH265PictureInfoKHR.get_pStdPictureInfo(this.segment(), index); } + /// {@return `pStdPictureInfo`} + public @CType("const StdVideoEncodeH265PictureInfo *") java.lang.foreign.MemorySegment pStdPictureInfo() { return VkVideoEncodeH265PictureInfoKHR.get_pStdPictureInfo(this.segment()); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, long index, @CType("const StdVideoEncodeH265PictureInfo *") java.lang.foreign.MemorySegment value) { VH_pStdPictureInfo.set(segment, 0L, index, value); } + /// Sets `pStdPictureInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdPictureInfo(MemorySegment segment, @CType("const StdVideoEncodeH265PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265PictureInfoKHR.set_pStdPictureInfo(segment, 0L, value); } + /// Sets `pStdPictureInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265PictureInfoKHR pStdPictureInfoAt(long index, @CType("const StdVideoEncodeH265PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265PictureInfoKHR.set_pStdPictureInfo(this.segment(), index, value); return this; } + /// Sets `pStdPictureInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265PictureInfoKHR pStdPictureInfo(@CType("const StdVideoEncodeH265PictureInfo *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265PictureInfoKHR.set_pStdPictureInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265ProfileInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265ProfileInfoKHR.java new file mode 100644 index 00000000..3514496f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265ProfileInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stdProfileIdc +/// [VarHandle][#VH_stdProfileIdc] - [Getter][#stdProfileIdc()] - [Setter][#stdProfileIdc(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265ProfileInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// StdVideoH265ProfileIdc stdProfileIdc; +/// } VkVideoEncodeH265ProfileInfoKHR; +/// ``` +public final class VkVideoEncodeH265ProfileInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265ProfileInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stdProfileIdc") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stdProfileIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdProfileIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdProfileIdc")); + + /// Creates `VkVideoEncodeH265ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265ProfileInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265ProfileInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265ProfileInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265ProfileInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265ProfileInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265ProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265ProfileInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265ProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265ProfileInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265ProfileInfoKHR` + public static VkVideoEncodeH265ProfileInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265ProfileInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265ProfileInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265ProfileInfoKHR` + public static VkVideoEncodeH265ProfileInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265ProfileInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265ProfileInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265ProfileInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265ProfileInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265ProfileInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265ProfileInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265ProfileInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265ProfileInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265ProfileInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265ProfileInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265ProfileInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265ProfileInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265ProfileInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265ProfileInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265ProfileInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265ProfileInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265ProfileInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stdProfileIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265ProfileIdc") int get_stdProfileIdc(MemorySegment segment, long index) { return (int) VH_stdProfileIdc.get(segment, 0L, index); } + /// {@return `stdProfileIdc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265ProfileIdc") int get_stdProfileIdc(MemorySegment segment) { return VkVideoEncodeH265ProfileInfoKHR.get_stdProfileIdc(segment, 0L); } + /// {@return `stdProfileIdc` at the given index} + /// @param index the index + public @CType("StdVideoH265ProfileIdc") int stdProfileIdcAt(long index) { return VkVideoEncodeH265ProfileInfoKHR.get_stdProfileIdc(this.segment(), index); } + /// {@return `stdProfileIdc`} + public @CType("StdVideoH265ProfileIdc") int stdProfileIdc() { return VkVideoEncodeH265ProfileInfoKHR.get_stdProfileIdc(this.segment()); } + /// Sets `stdProfileIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdProfileIdc(MemorySegment segment, long index, @CType("StdVideoH265ProfileIdc") int value) { VH_stdProfileIdc.set(segment, 0L, index, value); } + /// Sets `stdProfileIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdProfileIdc(MemorySegment segment, @CType("StdVideoH265ProfileIdc") int value) { VkVideoEncodeH265ProfileInfoKHR.set_stdProfileIdc(segment, 0L, value); } + /// Sets `stdProfileIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265ProfileInfoKHR stdProfileIdcAt(long index, @CType("StdVideoH265ProfileIdc") int value) { VkVideoEncodeH265ProfileInfoKHR.set_stdProfileIdc(this.segment(), index, value); return this; } + /// Sets `stdProfileIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265ProfileInfoKHR stdProfileIdc(@CType("StdVideoH265ProfileIdc") int value) { VkVideoEncodeH265ProfileInfoKHR.set_stdProfileIdc(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265QpKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265QpKHR.java new file mode 100644 index 00000000..cc7ebae0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265QpKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### qpI +/// [VarHandle][#VH_qpI] - [Getter][#qpI()] - [Setter][#qpI(int)] +/// ### qpP +/// [VarHandle][#VH_qpP] - [Getter][#qpP()] - [Setter][#qpP(int)] +/// ### qpB +/// [VarHandle][#VH_qpB] - [Getter][#qpB()] - [Setter][#qpB(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265QpKHR { +/// int32_t qpI; +/// int32_t qpP; +/// int32_t qpB; +/// } VkVideoEncodeH265QpKHR; +/// ``` +public final class VkVideoEncodeH265QpKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265QpKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("qpI"), + ValueLayout.JAVA_INT.withName("qpP"), + ValueLayout.JAVA_INT.withName("qpB") + ); + /// The [VarHandle] of `qpI` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_qpI = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qpI")); + /// The [VarHandle] of `qpP` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_qpP = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qpP")); + /// The [VarHandle] of `qpB` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_qpB = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qpB")); + + /// Creates `VkVideoEncodeH265QpKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265QpKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265QpKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265QpKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265QpKHR(segment); } + + /// Creates `VkVideoEncodeH265QpKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265QpKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265QpKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265QpKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265QpKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265QpKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265QpKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265QpKHR` + public static VkVideoEncodeH265QpKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265QpKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265QpKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265QpKHR` + public static VkVideoEncodeH265QpKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265QpKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `qpI` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_qpI(MemorySegment segment, long index) { return (int) VH_qpI.get(segment, 0L, index); } + /// {@return `qpI`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_qpI(MemorySegment segment) { return VkVideoEncodeH265QpKHR.get_qpI(segment, 0L); } + /// {@return `qpI` at the given index} + /// @param index the index + public @CType("int32_t") int qpIAt(long index) { return VkVideoEncodeH265QpKHR.get_qpI(this.segment(), index); } + /// {@return `qpI`} + public @CType("int32_t") int qpI() { return VkVideoEncodeH265QpKHR.get_qpI(this.segment()); } + /// Sets `qpI` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qpI(MemorySegment segment, long index, @CType("int32_t") int value) { VH_qpI.set(segment, 0L, index, value); } + /// Sets `qpI` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qpI(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH265QpKHR.set_qpI(segment, 0L, value); } + /// Sets `qpI` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QpKHR qpIAt(long index, @CType("int32_t") int value) { VkVideoEncodeH265QpKHR.set_qpI(this.segment(), index, value); return this; } + /// Sets `qpI` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QpKHR qpI(@CType("int32_t") int value) { VkVideoEncodeH265QpKHR.set_qpI(this.segment(), value); return this; } + + /// {@return `qpP` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_qpP(MemorySegment segment, long index) { return (int) VH_qpP.get(segment, 0L, index); } + /// {@return `qpP`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_qpP(MemorySegment segment) { return VkVideoEncodeH265QpKHR.get_qpP(segment, 0L); } + /// {@return `qpP` at the given index} + /// @param index the index + public @CType("int32_t") int qpPAt(long index) { return VkVideoEncodeH265QpKHR.get_qpP(this.segment(), index); } + /// {@return `qpP`} + public @CType("int32_t") int qpP() { return VkVideoEncodeH265QpKHR.get_qpP(this.segment()); } + /// Sets `qpP` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qpP(MemorySegment segment, long index, @CType("int32_t") int value) { VH_qpP.set(segment, 0L, index, value); } + /// Sets `qpP` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qpP(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH265QpKHR.set_qpP(segment, 0L, value); } + /// Sets `qpP` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QpKHR qpPAt(long index, @CType("int32_t") int value) { VkVideoEncodeH265QpKHR.set_qpP(this.segment(), index, value); return this; } + /// Sets `qpP` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QpKHR qpP(@CType("int32_t") int value) { VkVideoEncodeH265QpKHR.set_qpP(this.segment(), value); return this; } + + /// {@return `qpB` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_qpB(MemorySegment segment, long index) { return (int) VH_qpB.get(segment, 0L, index); } + /// {@return `qpB`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_qpB(MemorySegment segment) { return VkVideoEncodeH265QpKHR.get_qpB(segment, 0L); } + /// {@return `qpB` at the given index} + /// @param index the index + public @CType("int32_t") int qpBAt(long index) { return VkVideoEncodeH265QpKHR.get_qpB(this.segment(), index); } + /// {@return `qpB`} + public @CType("int32_t") int qpB() { return VkVideoEncodeH265QpKHR.get_qpB(this.segment()); } + /// Sets `qpB` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qpB(MemorySegment segment, long index, @CType("int32_t") int value) { VH_qpB.set(segment, 0L, index, value); } + /// Sets `qpB` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qpB(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH265QpKHR.set_qpB(segment, 0L, value); } + /// Sets `qpB` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QpKHR qpBAt(long index, @CType("int32_t") int value) { VkVideoEncodeH265QpKHR.set_qpB(this.segment(), index, value); return this; } + /// Sets `qpB` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QpKHR qpB(@CType("int32_t") int value) { VkVideoEncodeH265QpKHR.set_qpB(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265QualityLevelPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265QualityLevelPropertiesKHR.java new file mode 100644 index 00000000..bb2a81c8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265QualityLevelPropertiesKHR.java @@ -0,0 +1,446 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### preferredRateControlFlags +/// [VarHandle][#VH_preferredRateControlFlags] - [Getter][#preferredRateControlFlags()] - [Setter][#preferredRateControlFlags(int)] +/// ### preferredGopFrameCount +/// [VarHandle][#VH_preferredGopFrameCount] - [Getter][#preferredGopFrameCount()] - [Setter][#preferredGopFrameCount(int)] +/// ### preferredIdrPeriod +/// [VarHandle][#VH_preferredIdrPeriod] - [Getter][#preferredIdrPeriod()] - [Setter][#preferredIdrPeriod(int)] +/// ### preferredConsecutiveBFrameCount +/// [VarHandle][#VH_preferredConsecutiveBFrameCount] - [Getter][#preferredConsecutiveBFrameCount()] - [Setter][#preferredConsecutiveBFrameCount(int)] +/// ### preferredSubLayerCount +/// [VarHandle][#VH_preferredSubLayerCount] - [Getter][#preferredSubLayerCount()] - [Setter][#preferredSubLayerCount(int)] +/// ### preferredConstantQp +/// [Byte offset][#OFFSET_preferredConstantQp] - [Memory layout][#ML_preferredConstantQp] - [Getter][#preferredConstantQp()] - [Setter][#preferredConstantQp(java.lang.foreign.MemorySegment)] +/// ### preferredMaxL0ReferenceCount +/// [VarHandle][#VH_preferredMaxL0ReferenceCount] - [Getter][#preferredMaxL0ReferenceCount()] - [Setter][#preferredMaxL0ReferenceCount(int)] +/// ### preferredMaxL1ReferenceCount +/// [VarHandle][#VH_preferredMaxL1ReferenceCount] - [Getter][#preferredMaxL1ReferenceCount()] - [Setter][#preferredMaxL1ReferenceCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265QualityLevelPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoEncodeH265RateControlFlagsKHR preferredRateControlFlags; +/// uint32_t preferredGopFrameCount; +/// uint32_t preferredIdrPeriod; +/// uint32_t preferredConsecutiveBFrameCount; +/// uint32_t preferredSubLayerCount; +/// VkVideoEncodeH265QpKHR preferredConstantQp; +/// uint32_t preferredMaxL0ReferenceCount; +/// uint32_t preferredMaxL1ReferenceCount; +/// } VkVideoEncodeH265QualityLevelPropertiesKHR; +/// ``` +public final class VkVideoEncodeH265QualityLevelPropertiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265QualityLevelPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("preferredRateControlFlags"), + ValueLayout.JAVA_INT.withName("preferredGopFrameCount"), + ValueLayout.JAVA_INT.withName("preferredIdrPeriod"), + ValueLayout.JAVA_INT.withName("preferredConsecutiveBFrameCount"), + ValueLayout.JAVA_INT.withName("preferredSubLayerCount"), + overrungl.vulkan.khr.struct.VkVideoEncodeH265QpKHR.LAYOUT.withName("preferredConstantQp"), + ValueLayout.JAVA_INT.withName("preferredMaxL0ReferenceCount"), + ValueLayout.JAVA_INT.withName("preferredMaxL1ReferenceCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `preferredRateControlFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredRateControlFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredRateControlFlags")); + /// The [VarHandle] of `preferredGopFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredGopFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredGopFrameCount")); + /// The [VarHandle] of `preferredIdrPeriod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredIdrPeriod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredIdrPeriod")); + /// The [VarHandle] of `preferredConsecutiveBFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredConsecutiveBFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredConsecutiveBFrameCount")); + /// The [VarHandle] of `preferredSubLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredSubLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredSubLayerCount")); + /// The byte offset of `preferredConstantQp`. + public static final long OFFSET_preferredConstantQp = LAYOUT.byteOffset(PathElement.groupElement("preferredConstantQp")); + /// The memory layout of `preferredConstantQp`. + public static final MemoryLayout ML_preferredConstantQp = LAYOUT.select(PathElement.groupElement("preferredConstantQp")); + /// The [VarHandle] of `preferredMaxL0ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredMaxL0ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredMaxL0ReferenceCount")); + /// The [VarHandle] of `preferredMaxL1ReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredMaxL1ReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredMaxL1ReferenceCount")); + + /// Creates `VkVideoEncodeH265QualityLevelPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265QualityLevelPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265QualityLevelPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265QualityLevelPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265QualityLevelPropertiesKHR(segment); } + + /// Creates `VkVideoEncodeH265QualityLevelPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265QualityLevelPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265QualityLevelPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265QualityLevelPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265QualityLevelPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265QualityLevelPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265QualityLevelPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265QualityLevelPropertiesKHR` + public static VkVideoEncodeH265QualityLevelPropertiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265QualityLevelPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265QualityLevelPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265QualityLevelPropertiesKHR` + public static VkVideoEncodeH265QualityLevelPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265QualityLevelPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `preferredRateControlFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265RateControlFlagsKHR") int get_preferredRateControlFlags(MemorySegment segment, long index) { return (int) VH_preferredRateControlFlags.get(segment, 0L, index); } + /// {@return `preferredRateControlFlags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265RateControlFlagsKHR") int get_preferredRateControlFlags(MemorySegment segment) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredRateControlFlags(segment, 0L); } + /// {@return `preferredRateControlFlags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265RateControlFlagsKHR") int preferredRateControlFlagsAt(long index) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredRateControlFlags(this.segment(), index); } + /// {@return `preferredRateControlFlags`} + public @CType("VkVideoEncodeH265RateControlFlagsKHR") int preferredRateControlFlags() { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredRateControlFlags(this.segment()); } + /// Sets `preferredRateControlFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredRateControlFlags(MemorySegment segment, long index, @CType("VkVideoEncodeH265RateControlFlagsKHR") int value) { VH_preferredRateControlFlags.set(segment, 0L, index, value); } + /// Sets `preferredRateControlFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredRateControlFlags(MemorySegment segment, @CType("VkVideoEncodeH265RateControlFlagsKHR") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredRateControlFlags(segment, 0L, value); } + /// Sets `preferredRateControlFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredRateControlFlagsAt(long index, @CType("VkVideoEncodeH265RateControlFlagsKHR") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredRateControlFlags(this.segment(), index, value); return this; } + /// Sets `preferredRateControlFlags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredRateControlFlags(@CType("VkVideoEncodeH265RateControlFlagsKHR") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredRateControlFlags(this.segment(), value); return this; } + + /// {@return `preferredGopFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredGopFrameCount(MemorySegment segment, long index) { return (int) VH_preferredGopFrameCount.get(segment, 0L, index); } + /// {@return `preferredGopFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredGopFrameCount(MemorySegment segment) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredGopFrameCount(segment, 0L); } + /// {@return `preferredGopFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredGopFrameCountAt(long index) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredGopFrameCount(this.segment(), index); } + /// {@return `preferredGopFrameCount`} + public @CType("uint32_t") int preferredGopFrameCount() { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredGopFrameCount(this.segment()); } + /// Sets `preferredGopFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredGopFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredGopFrameCount.set(segment, 0L, index, value); } + /// Sets `preferredGopFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredGopFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredGopFrameCount(segment, 0L, value); } + /// Sets `preferredGopFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredGopFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredGopFrameCount(this.segment(), index, value); return this; } + /// Sets `preferredGopFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredGopFrameCount(@CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredGopFrameCount(this.segment(), value); return this; } + + /// {@return `preferredIdrPeriod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredIdrPeriod(MemorySegment segment, long index) { return (int) VH_preferredIdrPeriod.get(segment, 0L, index); } + /// {@return `preferredIdrPeriod`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredIdrPeriod(MemorySegment segment) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredIdrPeriod(segment, 0L); } + /// {@return `preferredIdrPeriod` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredIdrPeriodAt(long index) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredIdrPeriod(this.segment(), index); } + /// {@return `preferredIdrPeriod`} + public @CType("uint32_t") int preferredIdrPeriod() { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredIdrPeriod(this.segment()); } + /// Sets `preferredIdrPeriod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredIdrPeriod(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredIdrPeriod.set(segment, 0L, index, value); } + /// Sets `preferredIdrPeriod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredIdrPeriod(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredIdrPeriod(segment, 0L, value); } + /// Sets `preferredIdrPeriod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredIdrPeriodAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredIdrPeriod(this.segment(), index, value); return this; } + /// Sets `preferredIdrPeriod` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredIdrPeriod(@CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredIdrPeriod(this.segment(), value); return this; } + + /// {@return `preferredConsecutiveBFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredConsecutiveBFrameCount(MemorySegment segment, long index) { return (int) VH_preferredConsecutiveBFrameCount.get(segment, 0L, index); } + /// {@return `preferredConsecutiveBFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredConsecutiveBFrameCount(MemorySegment segment) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredConsecutiveBFrameCount(segment, 0L); } + /// {@return `preferredConsecutiveBFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredConsecutiveBFrameCountAt(long index) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredConsecutiveBFrameCount(this.segment(), index); } + /// {@return `preferredConsecutiveBFrameCount`} + public @CType("uint32_t") int preferredConsecutiveBFrameCount() { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredConsecutiveBFrameCount(this.segment()); } + /// Sets `preferredConsecutiveBFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredConsecutiveBFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredConsecutiveBFrameCount.set(segment, 0L, index, value); } + /// Sets `preferredConsecutiveBFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredConsecutiveBFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredConsecutiveBFrameCount(segment, 0L, value); } + /// Sets `preferredConsecutiveBFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredConsecutiveBFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredConsecutiveBFrameCount(this.segment(), index, value); return this; } + /// Sets `preferredConsecutiveBFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredConsecutiveBFrameCount(@CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredConsecutiveBFrameCount(this.segment(), value); return this; } + + /// {@return `preferredSubLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredSubLayerCount(MemorySegment segment, long index) { return (int) VH_preferredSubLayerCount.get(segment, 0L, index); } + /// {@return `preferredSubLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredSubLayerCount(MemorySegment segment) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredSubLayerCount(segment, 0L); } + /// {@return `preferredSubLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredSubLayerCountAt(long index) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredSubLayerCount(this.segment(), index); } + /// {@return `preferredSubLayerCount`} + public @CType("uint32_t") int preferredSubLayerCount() { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredSubLayerCount(this.segment()); } + /// Sets `preferredSubLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredSubLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredSubLayerCount.set(segment, 0L, index, value); } + /// Sets `preferredSubLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredSubLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredSubLayerCount(segment, 0L, value); } + /// Sets `preferredSubLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredSubLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredSubLayerCount(this.segment(), index, value); return this; } + /// Sets `preferredSubLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredSubLayerCount(@CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredSubLayerCount(this.segment(), value); return this; } + + /// {@return `preferredConstantQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment get_preferredConstantQp(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_preferredConstantQp, index), ML_preferredConstantQp); } + /// {@return `preferredConstantQp`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment get_preferredConstantQp(MemorySegment segment) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredConstantQp(segment, 0L); } + /// {@return `preferredConstantQp` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment preferredConstantQpAt(long index) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredConstantQp(this.segment(), index); } + /// {@return `preferredConstantQp`} + public @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment preferredConstantQp() { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredConstantQp(this.segment()); } + /// Sets `preferredConstantQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredConstantQp(MemorySegment segment, long index, @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_preferredConstantQp, index), ML_preferredConstantQp.byteSize()); } + /// Sets `preferredConstantQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredConstantQp(MemorySegment segment, @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredConstantQp(segment, 0L, value); } + /// Sets `preferredConstantQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredConstantQpAt(long index, @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredConstantQp(this.segment(), index, value); return this; } + /// Sets `preferredConstantQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredConstantQp(@CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredConstantQp(this.segment(), value); return this; } + + /// {@return `preferredMaxL0ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredMaxL0ReferenceCount(MemorySegment segment, long index) { return (int) VH_preferredMaxL0ReferenceCount.get(segment, 0L, index); } + /// {@return `preferredMaxL0ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredMaxL0ReferenceCount(MemorySegment segment) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredMaxL0ReferenceCount(segment, 0L); } + /// {@return `preferredMaxL0ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredMaxL0ReferenceCountAt(long index) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredMaxL0ReferenceCount(this.segment(), index); } + /// {@return `preferredMaxL0ReferenceCount`} + public @CType("uint32_t") int preferredMaxL0ReferenceCount() { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredMaxL0ReferenceCount(this.segment()); } + /// Sets `preferredMaxL0ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredMaxL0ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredMaxL0ReferenceCount.set(segment, 0L, index, value); } + /// Sets `preferredMaxL0ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredMaxL0ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredMaxL0ReferenceCount(segment, 0L, value); } + /// Sets `preferredMaxL0ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredMaxL0ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredMaxL0ReferenceCount(this.segment(), index, value); return this; } + /// Sets `preferredMaxL0ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredMaxL0ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredMaxL0ReferenceCount(this.segment(), value); return this; } + + /// {@return `preferredMaxL1ReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredMaxL1ReferenceCount(MemorySegment segment, long index) { return (int) VH_preferredMaxL1ReferenceCount.get(segment, 0L, index); } + /// {@return `preferredMaxL1ReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredMaxL1ReferenceCount(MemorySegment segment) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredMaxL1ReferenceCount(segment, 0L); } + /// {@return `preferredMaxL1ReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredMaxL1ReferenceCountAt(long index) { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredMaxL1ReferenceCount(this.segment(), index); } + /// {@return `preferredMaxL1ReferenceCount`} + public @CType("uint32_t") int preferredMaxL1ReferenceCount() { return VkVideoEncodeH265QualityLevelPropertiesKHR.get_preferredMaxL1ReferenceCount(this.segment()); } + /// Sets `preferredMaxL1ReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredMaxL1ReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredMaxL1ReferenceCount.set(segment, 0L, index, value); } + /// Sets `preferredMaxL1ReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredMaxL1ReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredMaxL1ReferenceCount(segment, 0L, value); } + /// Sets `preferredMaxL1ReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredMaxL1ReferenceCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredMaxL1ReferenceCount(this.segment(), index, value); return this; } + /// Sets `preferredMaxL1ReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QualityLevelPropertiesKHR preferredMaxL1ReferenceCount(@CType("uint32_t") int value) { VkVideoEncodeH265QualityLevelPropertiesKHR.set_preferredMaxL1ReferenceCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265QuantizationMapCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265QuantizationMapCapabilitiesKHR.java new file mode 100644 index 00000000..6ba9ab60 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265QuantizationMapCapabilitiesKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minQpDelta +/// [VarHandle][#VH_minQpDelta] - [Getter][#minQpDelta()] - [Setter][#minQpDelta(int)] +/// ### maxQpDelta +/// [VarHandle][#VH_maxQpDelta] - [Getter][#maxQpDelta()] - [Setter][#maxQpDelta(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265QuantizationMapCapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// int32_t minQpDelta; +/// int32_t maxQpDelta; +/// } VkVideoEncodeH265QuantizationMapCapabilitiesKHR; +/// ``` +public final class VkVideoEncodeH265QuantizationMapCapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265QuantizationMapCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("minQpDelta"), + ValueLayout.JAVA_INT.withName("maxQpDelta") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minQpDelta` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minQpDelta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minQpDelta")); + /// The [VarHandle] of `maxQpDelta` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxQpDelta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxQpDelta")); + + /// Creates `VkVideoEncodeH265QuantizationMapCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265QuantizationMapCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265QuantizationMapCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265QuantizationMapCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265QuantizationMapCapabilitiesKHR(segment); } + + /// Creates `VkVideoEncodeH265QuantizationMapCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265QuantizationMapCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265QuantizationMapCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265QuantizationMapCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265QuantizationMapCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265QuantizationMapCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265QuantizationMapCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265QuantizationMapCapabilitiesKHR` + public static VkVideoEncodeH265QuantizationMapCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265QuantizationMapCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265QuantizationMapCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265QuantizationMapCapabilitiesKHR` + public static VkVideoEncodeH265QuantizationMapCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265QuantizationMapCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QuantizationMapCapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QuantizationMapCapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QuantizationMapCapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QuantizationMapCapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `minQpDelta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_minQpDelta(MemorySegment segment, long index) { return (int) VH_minQpDelta.get(segment, 0L, index); } + /// {@return `minQpDelta`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_minQpDelta(MemorySegment segment) { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_minQpDelta(segment, 0L); } + /// {@return `minQpDelta` at the given index} + /// @param index the index + public @CType("int32_t") int minQpDeltaAt(long index) { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_minQpDelta(this.segment(), index); } + /// {@return `minQpDelta`} + public @CType("int32_t") int minQpDelta() { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_minQpDelta(this.segment()); } + /// Sets `minQpDelta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minQpDelta(MemorySegment segment, long index, @CType("int32_t") int value) { VH_minQpDelta.set(segment, 0L, index, value); } + /// Sets `minQpDelta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minQpDelta(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_minQpDelta(segment, 0L, value); } + /// Sets `minQpDelta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QuantizationMapCapabilitiesKHR minQpDeltaAt(long index, @CType("int32_t") int value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_minQpDelta(this.segment(), index, value); return this; } + /// Sets `minQpDelta` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QuantizationMapCapabilitiesKHR minQpDelta(@CType("int32_t") int value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_minQpDelta(this.segment(), value); return this; } + + /// {@return `maxQpDelta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_maxQpDelta(MemorySegment segment, long index) { return (int) VH_maxQpDelta.get(segment, 0L, index); } + /// {@return `maxQpDelta`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_maxQpDelta(MemorySegment segment) { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_maxQpDelta(segment, 0L); } + /// {@return `maxQpDelta` at the given index} + /// @param index the index + public @CType("int32_t") int maxQpDeltaAt(long index) { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_maxQpDelta(this.segment(), index); } + /// {@return `maxQpDelta`} + public @CType("int32_t") int maxQpDelta() { return VkVideoEncodeH265QuantizationMapCapabilitiesKHR.get_maxQpDelta(this.segment()); } + /// Sets `maxQpDelta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQpDelta(MemorySegment segment, long index, @CType("int32_t") int value) { VH_maxQpDelta.set(segment, 0L, index, value); } + /// Sets `maxQpDelta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQpDelta(MemorySegment segment, @CType("int32_t") int value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_maxQpDelta(segment, 0L, value); } + /// Sets `maxQpDelta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QuantizationMapCapabilitiesKHR maxQpDeltaAt(long index, @CType("int32_t") int value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_maxQpDelta(this.segment(), index, value); return this; } + /// Sets `maxQpDelta` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265QuantizationMapCapabilitiesKHR maxQpDelta(@CType("int32_t") int value) { VkVideoEncodeH265QuantizationMapCapabilitiesKHR.set_maxQpDelta(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265RateControlInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265RateControlInfoKHR.java new file mode 100644 index 00000000..d5aac56c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265RateControlInfoKHR.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### gopFrameCount +/// [VarHandle][#VH_gopFrameCount] - [Getter][#gopFrameCount()] - [Setter][#gopFrameCount(int)] +/// ### idrPeriod +/// [VarHandle][#VH_idrPeriod] - [Getter][#idrPeriod()] - [Setter][#idrPeriod(int)] +/// ### consecutiveBFrameCount +/// [VarHandle][#VH_consecutiveBFrameCount] - [Getter][#consecutiveBFrameCount()] - [Setter][#consecutiveBFrameCount(int)] +/// ### subLayerCount +/// [VarHandle][#VH_subLayerCount] - [Getter][#subLayerCount()] - [Setter][#subLayerCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265RateControlInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoEncodeH265RateControlFlagsKHR flags; +/// uint32_t gopFrameCount; +/// uint32_t idrPeriod; +/// uint32_t consecutiveBFrameCount; +/// uint32_t subLayerCount; +/// } VkVideoEncodeH265RateControlInfoKHR; +/// ``` +public final class VkVideoEncodeH265RateControlInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265RateControlInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("gopFrameCount"), + ValueLayout.JAVA_INT.withName("idrPeriod"), + ValueLayout.JAVA_INT.withName("consecutiveBFrameCount"), + ValueLayout.JAVA_INT.withName("subLayerCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `gopFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gopFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gopFrameCount")); + /// The [VarHandle] of `idrPeriod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_idrPeriod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("idrPeriod")); + /// The [VarHandle] of `consecutiveBFrameCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_consecutiveBFrameCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("consecutiveBFrameCount")); + /// The [VarHandle] of `subLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subLayerCount")); + + /// Creates `VkVideoEncodeH265RateControlInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265RateControlInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265RateControlInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265RateControlInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265RateControlInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265RateControlInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265RateControlInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265RateControlInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265RateControlInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265RateControlInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265RateControlInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265RateControlInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265RateControlInfoKHR` + public static VkVideoEncodeH265RateControlInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265RateControlInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265RateControlInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265RateControlInfoKHR` + public static VkVideoEncodeH265RateControlInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265RateControlInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265RateControlInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265RateControlInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265RateControlInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265RateControlInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265RateControlInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265RateControlInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265RateControlInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265RateControlInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265RateControlInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265RateControlFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265RateControlFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoEncodeH265RateControlInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265RateControlFlagsKHR") int flagsAt(long index) { return VkVideoEncodeH265RateControlInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoEncodeH265RateControlFlagsKHR") int flags() { return VkVideoEncodeH265RateControlInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoEncodeH265RateControlFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoEncodeH265RateControlFlagsKHR") int value) { VkVideoEncodeH265RateControlInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR flagsAt(long index, @CType("VkVideoEncodeH265RateControlFlagsKHR") int value) { VkVideoEncodeH265RateControlInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR flags(@CType("VkVideoEncodeH265RateControlFlagsKHR") int value) { VkVideoEncodeH265RateControlInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `gopFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gopFrameCount(MemorySegment segment, long index) { return (int) VH_gopFrameCount.get(segment, 0L, index); } + /// {@return `gopFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gopFrameCount(MemorySegment segment) { return VkVideoEncodeH265RateControlInfoKHR.get_gopFrameCount(segment, 0L); } + /// {@return `gopFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int gopFrameCountAt(long index) { return VkVideoEncodeH265RateControlInfoKHR.get_gopFrameCount(this.segment(), index); } + /// {@return `gopFrameCount`} + public @CType("uint32_t") int gopFrameCount() { return VkVideoEncodeH265RateControlInfoKHR.get_gopFrameCount(this.segment()); } + /// Sets `gopFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gopFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gopFrameCount.set(segment, 0L, index, value); } + /// Sets `gopFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gopFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_gopFrameCount(segment, 0L, value); } + /// Sets `gopFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR gopFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_gopFrameCount(this.segment(), index, value); return this; } + /// Sets `gopFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR gopFrameCount(@CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_gopFrameCount(this.segment(), value); return this; } + + /// {@return `idrPeriod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_idrPeriod(MemorySegment segment, long index) { return (int) VH_idrPeriod.get(segment, 0L, index); } + /// {@return `idrPeriod`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_idrPeriod(MemorySegment segment) { return VkVideoEncodeH265RateControlInfoKHR.get_idrPeriod(segment, 0L); } + /// {@return `idrPeriod` at the given index} + /// @param index the index + public @CType("uint32_t") int idrPeriodAt(long index) { return VkVideoEncodeH265RateControlInfoKHR.get_idrPeriod(this.segment(), index); } + /// {@return `idrPeriod`} + public @CType("uint32_t") int idrPeriod() { return VkVideoEncodeH265RateControlInfoKHR.get_idrPeriod(this.segment()); } + /// Sets `idrPeriod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_idrPeriod(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_idrPeriod.set(segment, 0L, index, value); } + /// Sets `idrPeriod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_idrPeriod(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_idrPeriod(segment, 0L, value); } + /// Sets `idrPeriod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR idrPeriodAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_idrPeriod(this.segment(), index, value); return this; } + /// Sets `idrPeriod` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR idrPeriod(@CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_idrPeriod(this.segment(), value); return this; } + + /// {@return `consecutiveBFrameCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_consecutiveBFrameCount(MemorySegment segment, long index) { return (int) VH_consecutiveBFrameCount.get(segment, 0L, index); } + /// {@return `consecutiveBFrameCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_consecutiveBFrameCount(MemorySegment segment) { return VkVideoEncodeH265RateControlInfoKHR.get_consecutiveBFrameCount(segment, 0L); } + /// {@return `consecutiveBFrameCount` at the given index} + /// @param index the index + public @CType("uint32_t") int consecutiveBFrameCountAt(long index) { return VkVideoEncodeH265RateControlInfoKHR.get_consecutiveBFrameCount(this.segment(), index); } + /// {@return `consecutiveBFrameCount`} + public @CType("uint32_t") int consecutiveBFrameCount() { return VkVideoEncodeH265RateControlInfoKHR.get_consecutiveBFrameCount(this.segment()); } + /// Sets `consecutiveBFrameCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_consecutiveBFrameCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_consecutiveBFrameCount.set(segment, 0L, index, value); } + /// Sets `consecutiveBFrameCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_consecutiveBFrameCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_consecutiveBFrameCount(segment, 0L, value); } + /// Sets `consecutiveBFrameCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR consecutiveBFrameCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_consecutiveBFrameCount(this.segment(), index, value); return this; } + /// Sets `consecutiveBFrameCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR consecutiveBFrameCount(@CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_consecutiveBFrameCount(this.segment(), value); return this; } + + /// {@return `subLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subLayerCount(MemorySegment segment, long index) { return (int) VH_subLayerCount.get(segment, 0L, index); } + /// {@return `subLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subLayerCount(MemorySegment segment) { return VkVideoEncodeH265RateControlInfoKHR.get_subLayerCount(segment, 0L); } + /// {@return `subLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int subLayerCountAt(long index) { return VkVideoEncodeH265RateControlInfoKHR.get_subLayerCount(this.segment(), index); } + /// {@return `subLayerCount`} + public @CType("uint32_t") int subLayerCount() { return VkVideoEncodeH265RateControlInfoKHR.get_subLayerCount(this.segment()); } + /// Sets `subLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subLayerCount.set(segment, 0L, index, value); } + /// Sets `subLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_subLayerCount(segment, 0L, value); } + /// Sets `subLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR subLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_subLayerCount(this.segment(), index, value); return this; } + /// Sets `subLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlInfoKHR subLayerCount(@CType("uint32_t") int value) { VkVideoEncodeH265RateControlInfoKHR.set_subLayerCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265RateControlLayerInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265RateControlLayerInfoKHR.java new file mode 100644 index 00000000..e78dac25 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265RateControlLayerInfoKHR.java @@ -0,0 +1,376 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### useMinQp +/// [VarHandle][#VH_useMinQp] - [Getter][#useMinQp()] - [Setter][#useMinQp(int)] +/// ### minQp +/// [Byte offset][#OFFSET_minQp] - [Memory layout][#ML_minQp] - [Getter][#minQp()] - [Setter][#minQp(java.lang.foreign.MemorySegment)] +/// ### useMaxQp +/// [VarHandle][#VH_useMaxQp] - [Getter][#useMaxQp()] - [Setter][#useMaxQp(int)] +/// ### maxQp +/// [Byte offset][#OFFSET_maxQp] - [Memory layout][#ML_maxQp] - [Getter][#maxQp()] - [Setter][#maxQp(java.lang.foreign.MemorySegment)] +/// ### useMaxFrameSize +/// [VarHandle][#VH_useMaxFrameSize] - [Getter][#useMaxFrameSize()] - [Setter][#useMaxFrameSize(int)] +/// ### maxFrameSize +/// [Byte offset][#OFFSET_maxFrameSize] - [Memory layout][#ML_maxFrameSize] - [Getter][#maxFrameSize()] - [Setter][#maxFrameSize(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265RateControlLayerInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 useMinQp; +/// VkVideoEncodeH265QpKHR minQp; +/// VkBool32 useMaxQp; +/// VkVideoEncodeH265QpKHR maxQp; +/// VkBool32 useMaxFrameSize; +/// VkVideoEncodeH265FrameSizeKHR maxFrameSize; +/// } VkVideoEncodeH265RateControlLayerInfoKHR; +/// ``` +public final class VkVideoEncodeH265RateControlLayerInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265RateControlLayerInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("useMinQp"), + overrungl.vulkan.khr.struct.VkVideoEncodeH265QpKHR.LAYOUT.withName("minQp"), + ValueLayout.JAVA_INT.withName("useMaxQp"), + overrungl.vulkan.khr.struct.VkVideoEncodeH265QpKHR.LAYOUT.withName("maxQp"), + ValueLayout.JAVA_INT.withName("useMaxFrameSize"), + overrungl.vulkan.khr.struct.VkVideoEncodeH265FrameSizeKHR.LAYOUT.withName("maxFrameSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `useMinQp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMinQp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMinQp")); + /// The byte offset of `minQp`. + public static final long OFFSET_minQp = LAYOUT.byteOffset(PathElement.groupElement("minQp")); + /// The memory layout of `minQp`. + public static final MemoryLayout ML_minQp = LAYOUT.select(PathElement.groupElement("minQp")); + /// The [VarHandle] of `useMaxQp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMaxQp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMaxQp")); + /// The byte offset of `maxQp`. + public static final long OFFSET_maxQp = LAYOUT.byteOffset(PathElement.groupElement("maxQp")); + /// The memory layout of `maxQp`. + public static final MemoryLayout ML_maxQp = LAYOUT.select(PathElement.groupElement("maxQp")); + /// The [VarHandle] of `useMaxFrameSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMaxFrameSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMaxFrameSize")); + /// The byte offset of `maxFrameSize`. + public static final long OFFSET_maxFrameSize = LAYOUT.byteOffset(PathElement.groupElement("maxFrameSize")); + /// The memory layout of `maxFrameSize`. + public static final MemoryLayout ML_maxFrameSize = LAYOUT.select(PathElement.groupElement("maxFrameSize")); + + /// Creates `VkVideoEncodeH265RateControlLayerInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265RateControlLayerInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265RateControlLayerInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265RateControlLayerInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265RateControlLayerInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265RateControlLayerInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265RateControlLayerInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265RateControlLayerInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265RateControlLayerInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265RateControlLayerInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265RateControlLayerInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265RateControlLayerInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265RateControlLayerInfoKHR` + public static VkVideoEncodeH265RateControlLayerInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265RateControlLayerInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265RateControlLayerInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265RateControlLayerInfoKHR` + public static VkVideoEncodeH265RateControlLayerInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265RateControlLayerInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265RateControlLayerInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265RateControlLayerInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `useMinQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMinQp(MemorySegment segment, long index) { return (int) VH_useMinQp.get(segment, 0L, index); } + /// {@return `useMinQp`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMinQp(MemorySegment segment) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_useMinQp(segment, 0L); } + /// {@return `useMinQp` at the given index} + /// @param index the index + public @CType("VkBool32") int useMinQpAt(long index) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_useMinQp(this.segment(), index); } + /// {@return `useMinQp`} + public @CType("VkBool32") int useMinQp() { return VkVideoEncodeH265RateControlLayerInfoKHR.get_useMinQp(this.segment()); } + /// Sets `useMinQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMinQp(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMinQp.set(segment, 0L, index, value); } + /// Sets `useMinQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMinQp(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_useMinQp(segment, 0L, value); } + /// Sets `useMinQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR useMinQpAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_useMinQp(this.segment(), index, value); return this; } + /// Sets `useMinQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR useMinQp(@CType("VkBool32") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_useMinQp(this.segment(), value); return this; } + + /// {@return `minQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment get_minQp(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minQp, index), ML_minQp); } + /// {@return `minQp`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment get_minQp(MemorySegment segment) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_minQp(segment, 0L); } + /// {@return `minQp` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment minQpAt(long index) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_minQp(this.segment(), index); } + /// {@return `minQp`} + public @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment minQp() { return VkVideoEncodeH265RateControlLayerInfoKHR.get_minQp(this.segment()); } + /// Sets `minQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minQp(MemorySegment segment, long index, @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minQp, index), ML_minQp.byteSize()); } + /// Sets `minQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minQp(MemorySegment segment, @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_minQp(segment, 0L, value); } + /// Sets `minQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR minQpAt(long index, @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_minQp(this.segment(), index, value); return this; } + /// Sets `minQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR minQp(@CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_minQp(this.segment(), value); return this; } + + /// {@return `useMaxQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMaxQp(MemorySegment segment, long index) { return (int) VH_useMaxQp.get(segment, 0L, index); } + /// {@return `useMaxQp`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMaxQp(MemorySegment segment) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_useMaxQp(segment, 0L); } + /// {@return `useMaxQp` at the given index} + /// @param index the index + public @CType("VkBool32") int useMaxQpAt(long index) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_useMaxQp(this.segment(), index); } + /// {@return `useMaxQp`} + public @CType("VkBool32") int useMaxQp() { return VkVideoEncodeH265RateControlLayerInfoKHR.get_useMaxQp(this.segment()); } + /// Sets `useMaxQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMaxQp(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMaxQp.set(segment, 0L, index, value); } + /// Sets `useMaxQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMaxQp(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_useMaxQp(segment, 0L, value); } + /// Sets `useMaxQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR useMaxQpAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_useMaxQp(this.segment(), index, value); return this; } + /// Sets `useMaxQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR useMaxQp(@CType("VkBool32") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_useMaxQp(this.segment(), value); return this; } + + /// {@return `maxQp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment get_maxQp(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxQp, index), ML_maxQp); } + /// {@return `maxQp`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment get_maxQp(MemorySegment segment) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_maxQp(segment, 0L); } + /// {@return `maxQp` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment maxQpAt(long index) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_maxQp(this.segment(), index); } + /// {@return `maxQp`} + public @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment maxQp() { return VkVideoEncodeH265RateControlLayerInfoKHR.get_maxQp(this.segment()); } + /// Sets `maxQp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQp(MemorySegment segment, long index, @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxQp, index), ML_maxQp.byteSize()); } + /// Sets `maxQp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQp(MemorySegment segment, @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_maxQp(segment, 0L, value); } + /// Sets `maxQp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR maxQpAt(long index, @CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_maxQp(this.segment(), index, value); return this; } + /// Sets `maxQp` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR maxQp(@CType("VkVideoEncodeH265QpKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_maxQp(this.segment(), value); return this; } + + /// {@return `useMaxFrameSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMaxFrameSize(MemorySegment segment, long index) { return (int) VH_useMaxFrameSize.get(segment, 0L, index); } + /// {@return `useMaxFrameSize`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMaxFrameSize(MemorySegment segment) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_useMaxFrameSize(segment, 0L); } + /// {@return `useMaxFrameSize` at the given index} + /// @param index the index + public @CType("VkBool32") int useMaxFrameSizeAt(long index) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_useMaxFrameSize(this.segment(), index); } + /// {@return `useMaxFrameSize`} + public @CType("VkBool32") int useMaxFrameSize() { return VkVideoEncodeH265RateControlLayerInfoKHR.get_useMaxFrameSize(this.segment()); } + /// Sets `useMaxFrameSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMaxFrameSize(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMaxFrameSize.set(segment, 0L, index, value); } + /// Sets `useMaxFrameSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMaxFrameSize(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_useMaxFrameSize(segment, 0L, value); } + /// Sets `useMaxFrameSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR useMaxFrameSizeAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_useMaxFrameSize(this.segment(), index, value); return this; } + /// Sets `useMaxFrameSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR useMaxFrameSize(@CType("VkBool32") int value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_useMaxFrameSize(this.segment(), value); return this; } + + /// {@return `maxFrameSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265FrameSizeKHR") java.lang.foreign.MemorySegment get_maxFrameSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxFrameSize, index), ML_maxFrameSize); } + /// {@return `maxFrameSize`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265FrameSizeKHR") java.lang.foreign.MemorySegment get_maxFrameSize(MemorySegment segment) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_maxFrameSize(segment, 0L); } + /// {@return `maxFrameSize` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265FrameSizeKHR") java.lang.foreign.MemorySegment maxFrameSizeAt(long index) { return VkVideoEncodeH265RateControlLayerInfoKHR.get_maxFrameSize(this.segment(), index); } + /// {@return `maxFrameSize`} + public @CType("VkVideoEncodeH265FrameSizeKHR") java.lang.foreign.MemorySegment maxFrameSize() { return VkVideoEncodeH265RateControlLayerInfoKHR.get_maxFrameSize(this.segment()); } + /// Sets `maxFrameSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFrameSize(MemorySegment segment, long index, @CType("VkVideoEncodeH265FrameSizeKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxFrameSize, index), ML_maxFrameSize.byteSize()); } + /// Sets `maxFrameSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFrameSize(MemorySegment segment, @CType("VkVideoEncodeH265FrameSizeKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_maxFrameSize(segment, 0L, value); } + /// Sets `maxFrameSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR maxFrameSizeAt(long index, @CType("VkVideoEncodeH265FrameSizeKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_maxFrameSize(this.segment(), index, value); return this; } + /// Sets `maxFrameSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265RateControlLayerInfoKHR maxFrameSize(@CType("VkVideoEncodeH265FrameSizeKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265RateControlLayerInfoKHR.set_maxFrameSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionCreateInfoKHR.java new file mode 100644 index 00000000..fa851c69 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionCreateInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### useMaxLevelIdc +/// [VarHandle][#VH_useMaxLevelIdc] - [Getter][#useMaxLevelIdc()] - [Setter][#useMaxLevelIdc(int)] +/// ### maxLevelIdc +/// [VarHandle][#VH_maxLevelIdc] - [Getter][#maxLevelIdc()] - [Setter][#maxLevelIdc(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265SessionCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 useMaxLevelIdc; +/// StdVideoH265LevelIdc maxLevelIdc; +/// } VkVideoEncodeH265SessionCreateInfoKHR; +/// ``` +public final class VkVideoEncodeH265SessionCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265SessionCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("useMaxLevelIdc"), + ValueLayout.JAVA_INT.withName("maxLevelIdc") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `useMaxLevelIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_useMaxLevelIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("useMaxLevelIdc")); + /// The [VarHandle] of `maxLevelIdc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxLevelIdc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLevelIdc")); + + /// Creates `VkVideoEncodeH265SessionCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265SessionCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265SessionCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionCreateInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265SessionCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265SessionCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265SessionCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265SessionCreateInfoKHR` + public static VkVideoEncodeH265SessionCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265SessionCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265SessionCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265SessionCreateInfoKHR` + public static VkVideoEncodeH265SessionCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265SessionCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265SessionCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265SessionCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265SessionCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265SessionCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265SessionCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265SessionCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265SessionCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265SessionCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265SessionCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `useMaxLevelIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_useMaxLevelIdc(MemorySegment segment, long index) { return (int) VH_useMaxLevelIdc.get(segment, 0L, index); } + /// {@return `useMaxLevelIdc`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_useMaxLevelIdc(MemorySegment segment) { return VkVideoEncodeH265SessionCreateInfoKHR.get_useMaxLevelIdc(segment, 0L); } + /// {@return `useMaxLevelIdc` at the given index} + /// @param index the index + public @CType("VkBool32") int useMaxLevelIdcAt(long index) { return VkVideoEncodeH265SessionCreateInfoKHR.get_useMaxLevelIdc(this.segment(), index); } + /// {@return `useMaxLevelIdc`} + public @CType("VkBool32") int useMaxLevelIdc() { return VkVideoEncodeH265SessionCreateInfoKHR.get_useMaxLevelIdc(this.segment()); } + /// Sets `useMaxLevelIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_useMaxLevelIdc(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_useMaxLevelIdc.set(segment, 0L, index, value); } + /// Sets `useMaxLevelIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_useMaxLevelIdc(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265SessionCreateInfoKHR.set_useMaxLevelIdc(segment, 0L, value); } + /// Sets `useMaxLevelIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionCreateInfoKHR useMaxLevelIdcAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265SessionCreateInfoKHR.set_useMaxLevelIdc(this.segment(), index, value); return this; } + /// Sets `useMaxLevelIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionCreateInfoKHR useMaxLevelIdc(@CType("VkBool32") int value) { VkVideoEncodeH265SessionCreateInfoKHR.set_useMaxLevelIdc(this.segment(), value); return this; } + + /// {@return `maxLevelIdc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265LevelIdc") int get_maxLevelIdc(MemorySegment segment, long index) { return (int) VH_maxLevelIdc.get(segment, 0L, index); } + /// {@return `maxLevelIdc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265LevelIdc") int get_maxLevelIdc(MemorySegment segment) { return VkVideoEncodeH265SessionCreateInfoKHR.get_maxLevelIdc(segment, 0L); } + /// {@return `maxLevelIdc` at the given index} + /// @param index the index + public @CType("StdVideoH265LevelIdc") int maxLevelIdcAt(long index) { return VkVideoEncodeH265SessionCreateInfoKHR.get_maxLevelIdc(this.segment(), index); } + /// {@return `maxLevelIdc`} + public @CType("StdVideoH265LevelIdc") int maxLevelIdc() { return VkVideoEncodeH265SessionCreateInfoKHR.get_maxLevelIdc(this.segment()); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, long index, @CType("StdVideoH265LevelIdc") int value) { VH_maxLevelIdc.set(segment, 0L, index, value); } + /// Sets `maxLevelIdc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLevelIdc(MemorySegment segment, @CType("StdVideoH265LevelIdc") int value) { VkVideoEncodeH265SessionCreateInfoKHR.set_maxLevelIdc(segment, 0L, value); } + /// Sets `maxLevelIdc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionCreateInfoKHR maxLevelIdcAt(long index, @CType("StdVideoH265LevelIdc") int value) { VkVideoEncodeH265SessionCreateInfoKHR.set_maxLevelIdc(this.segment(), index, value); return this; } + /// Sets `maxLevelIdc` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionCreateInfoKHR maxLevelIdc(@CType("StdVideoH265LevelIdc") int value) { VkVideoEncodeH265SessionCreateInfoKHR.set_maxLevelIdc(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersAddInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersAddInfoKHR.java new file mode 100644 index 00000000..177b1b4b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersAddInfoKHR.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stdVPSCount +/// [VarHandle][#VH_stdVPSCount] - [Getter][#stdVPSCount()] - [Setter][#stdVPSCount(int)] +/// ### pStdVPSs +/// [VarHandle][#VH_pStdVPSs] - [Getter][#pStdVPSs()] - [Setter][#pStdVPSs(java.lang.foreign.MemorySegment)] +/// ### stdSPSCount +/// [VarHandle][#VH_stdSPSCount] - [Getter][#stdSPSCount()] - [Setter][#stdSPSCount(int)] +/// ### pStdSPSs +/// [VarHandle][#VH_pStdSPSs] - [Getter][#pStdSPSs()] - [Setter][#pStdSPSs(java.lang.foreign.MemorySegment)] +/// ### stdPPSCount +/// [VarHandle][#VH_stdPPSCount] - [Getter][#stdPPSCount()] - [Setter][#stdPPSCount(int)] +/// ### pStdPPSs +/// [VarHandle][#VH_pStdPPSs] - [Getter][#pStdPPSs()] - [Setter][#pStdPPSs(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265SessionParametersAddInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t stdVPSCount; +/// const StdVideoH265VideoParameterSet * pStdVPSs; +/// uint32_t stdSPSCount; +/// const StdVideoH265SequenceParameterSet * pStdSPSs; +/// uint32_t stdPPSCount; +/// const StdVideoH265PictureParameterSet * pStdPPSs; +/// } VkVideoEncodeH265SessionParametersAddInfoKHR; +/// ``` +public final class VkVideoEncodeH265SessionParametersAddInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265SessionParametersAddInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stdVPSCount"), + ValueLayout.ADDRESS.withName("pStdVPSs"), + ValueLayout.JAVA_INT.withName("stdSPSCount"), + ValueLayout.ADDRESS.withName("pStdSPSs"), + ValueLayout.JAVA_INT.withName("stdPPSCount"), + ValueLayout.ADDRESS.withName("pStdPPSs") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stdVPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdVPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdVPSCount")); + /// The [VarHandle] of `pStdVPSs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdVPSs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdVPSs")); + /// The [VarHandle] of `stdSPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdSPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdSPSCount")); + /// The [VarHandle] of `pStdSPSs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdSPSs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdSPSs")); + /// The [VarHandle] of `stdPPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdPPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdPPSCount")); + /// The [VarHandle] of `pStdPPSs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdPPSs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdPPSs")); + + /// Creates `VkVideoEncodeH265SessionParametersAddInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265SessionParametersAddInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265SessionParametersAddInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersAddInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersAddInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265SessionParametersAddInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersAddInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersAddInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265SessionParametersAddInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersAddInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersAddInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265SessionParametersAddInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265SessionParametersAddInfoKHR` + public static VkVideoEncodeH265SessionParametersAddInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265SessionParametersAddInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265SessionParametersAddInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265SessionParametersAddInfoKHR` + public static VkVideoEncodeH265SessionParametersAddInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265SessionParametersAddInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `stdVPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdVPSCount(MemorySegment segment, long index) { return (int) VH_stdVPSCount.get(segment, 0L, index); } + /// {@return `stdVPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdVPSCount(MemorySegment segment) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_stdVPSCount(segment, 0L); } + /// {@return `stdVPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdVPSCountAt(long index) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_stdVPSCount(this.segment(), index); } + /// {@return `stdVPSCount`} + public @CType("uint32_t") int stdVPSCount() { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_stdVPSCount(this.segment()); } + /// Sets `stdVPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdVPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdVPSCount.set(segment, 0L, index, value); } + /// Sets `stdVPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdVPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_stdVPSCount(segment, 0L, value); } + /// Sets `stdVPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR stdVPSCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_stdVPSCount(this.segment(), index, value); return this; } + /// Sets `stdVPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR stdVPSCount(@CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_stdVPSCount(this.segment(), value); return this; } + + /// {@return `pStdVPSs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment get_pStdVPSs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdVPSs.get(segment, 0L, index); } + /// {@return `pStdVPSs`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment get_pStdVPSs(MemorySegment segment) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pStdVPSs(segment, 0L); } + /// {@return `pStdVPSs` at the given index} + /// @param index the index + public @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment pStdVPSsAt(long index) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pStdVPSs(this.segment(), index); } + /// {@return `pStdVPSs`} + public @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment pStdVPSs() { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pStdVPSs(this.segment()); } + /// Sets `pStdVPSs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdVPSs(MemorySegment segment, long index, @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment value) { VH_pStdVPSs.set(segment, 0L, index, value); } + /// Sets `pStdVPSs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdVPSs(MemorySegment segment, @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pStdVPSs(segment, 0L, value); } + /// Sets `pStdVPSs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR pStdVPSsAt(long index, @CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pStdVPSs(this.segment(), index, value); return this; } + /// Sets `pStdVPSs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR pStdVPSs(@CType("const StdVideoH265VideoParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pStdVPSs(this.segment(), value); return this; } + + /// {@return `stdSPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdSPSCount(MemorySegment segment, long index) { return (int) VH_stdSPSCount.get(segment, 0L, index); } + /// {@return `stdSPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdSPSCount(MemorySegment segment) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_stdSPSCount(segment, 0L); } + /// {@return `stdSPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdSPSCountAt(long index) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_stdSPSCount(this.segment(), index); } + /// {@return `stdSPSCount`} + public @CType("uint32_t") int stdSPSCount() { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_stdSPSCount(this.segment()); } + /// Sets `stdSPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdSPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdSPSCount.set(segment, 0L, index, value); } + /// Sets `stdSPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdSPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_stdSPSCount(segment, 0L, value); } + /// Sets `stdSPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR stdSPSCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_stdSPSCount(this.segment(), index, value); return this; } + /// Sets `stdSPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR stdSPSCount(@CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_stdSPSCount(this.segment(), value); return this; } + + /// {@return `pStdSPSs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment get_pStdSPSs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdSPSs.get(segment, 0L, index); } + /// {@return `pStdSPSs`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment get_pStdSPSs(MemorySegment segment) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pStdSPSs(segment, 0L); } + /// {@return `pStdSPSs` at the given index} + /// @param index the index + public @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment pStdSPSsAt(long index) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pStdSPSs(this.segment(), index); } + /// {@return `pStdSPSs`} + public @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment pStdSPSs() { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pStdSPSs(this.segment()); } + /// Sets `pStdSPSs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdSPSs(MemorySegment segment, long index, @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VH_pStdSPSs.set(segment, 0L, index, value); } + /// Sets `pStdSPSs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdSPSs(MemorySegment segment, @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pStdSPSs(segment, 0L, value); } + /// Sets `pStdSPSs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR pStdSPSsAt(long index, @CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pStdSPSs(this.segment(), index, value); return this; } + /// Sets `pStdSPSs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR pStdSPSs(@CType("const StdVideoH265SequenceParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pStdSPSs(this.segment(), value); return this; } + + /// {@return `stdPPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdPPSCount(MemorySegment segment, long index) { return (int) VH_stdPPSCount.get(segment, 0L, index); } + /// {@return `stdPPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdPPSCount(MemorySegment segment) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_stdPPSCount(segment, 0L); } + /// {@return `stdPPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stdPPSCountAt(long index) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_stdPPSCount(this.segment(), index); } + /// {@return `stdPPSCount`} + public @CType("uint32_t") int stdPPSCount() { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_stdPPSCount(this.segment()); } + /// Sets `stdPPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdPPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdPPSCount.set(segment, 0L, index, value); } + /// Sets `stdPPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdPPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_stdPPSCount(segment, 0L, value); } + /// Sets `stdPPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR stdPPSCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_stdPPSCount(this.segment(), index, value); return this; } + /// Sets `stdPPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR stdPPSCount(@CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_stdPPSCount(this.segment(), value); return this; } + + /// {@return `pStdPPSs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment get_pStdPPSs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdPPSs.get(segment, 0L, index); } + /// {@return `pStdPPSs`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment get_pStdPPSs(MemorySegment segment) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pStdPPSs(segment, 0L); } + /// {@return `pStdPPSs` at the given index} + /// @param index the index + public @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment pStdPPSsAt(long index) { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pStdPPSs(this.segment(), index); } + /// {@return `pStdPPSs`} + public @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment pStdPPSs() { return VkVideoEncodeH265SessionParametersAddInfoKHR.get_pStdPPSs(this.segment()); } + /// Sets `pStdPPSs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdPPSs(MemorySegment segment, long index, @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment value) { VH_pStdPPSs.set(segment, 0L, index, value); } + /// Sets `pStdPPSs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdPPSs(MemorySegment segment, @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pStdPPSs(segment, 0L, value); } + /// Sets `pStdPPSs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR pStdPPSsAt(long index, @CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pStdPPSs(this.segment(), index, value); return this; } + /// Sets `pStdPPSs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersAddInfoKHR pStdPPSs(@CType("const StdVideoH265PictureParameterSet *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersAddInfoKHR.set_pStdPPSs(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersCreateInfoKHR.java new file mode 100644 index 00000000..b6609a71 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersCreateInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxStdVPSCount +/// [VarHandle][#VH_maxStdVPSCount] - [Getter][#maxStdVPSCount()] - [Setter][#maxStdVPSCount(int)] +/// ### maxStdSPSCount +/// [VarHandle][#VH_maxStdSPSCount] - [Getter][#maxStdSPSCount()] - [Setter][#maxStdSPSCount(int)] +/// ### maxStdPPSCount +/// [VarHandle][#VH_maxStdPPSCount] - [Getter][#maxStdPPSCount()] - [Setter][#maxStdPPSCount(int)] +/// ### pParametersAddInfo +/// [VarHandle][#VH_pParametersAddInfo] - [Getter][#pParametersAddInfo()] - [Setter][#pParametersAddInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265SessionParametersCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t maxStdVPSCount; +/// uint32_t maxStdSPSCount; +/// uint32_t maxStdPPSCount; +/// const VkVideoEncodeH265SessionParametersAddInfoKHR * pParametersAddInfo; +/// } VkVideoEncodeH265SessionParametersCreateInfoKHR; +/// ``` +public final class VkVideoEncodeH265SessionParametersCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265SessionParametersCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxStdVPSCount"), + ValueLayout.JAVA_INT.withName("maxStdSPSCount"), + ValueLayout.JAVA_INT.withName("maxStdPPSCount"), + ValueLayout.ADDRESS.withName("pParametersAddInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxStdVPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStdVPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStdVPSCount")); + /// The [VarHandle] of `maxStdSPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStdSPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStdSPSCount")); + /// The [VarHandle] of `maxStdPPSCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStdPPSCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStdPPSCount")); + /// The [VarHandle] of `pParametersAddInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pParametersAddInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pParametersAddInfo")); + + /// Creates `VkVideoEncodeH265SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265SessionParametersCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265SessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersCreateInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265SessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265SessionParametersCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265SessionParametersCreateInfoKHR` + public static VkVideoEncodeH265SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265SessionParametersCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265SessionParametersCreateInfoKHR` + public static VkVideoEncodeH265SessionParametersCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265SessionParametersCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxStdVPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStdVPSCount(MemorySegment segment, long index) { return (int) VH_maxStdVPSCount.get(segment, 0L, index); } + /// {@return `maxStdVPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStdVPSCount(MemorySegment segment) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_maxStdVPSCount(segment, 0L); } + /// {@return `maxStdVPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStdVPSCountAt(long index) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_maxStdVPSCount(this.segment(), index); } + /// {@return `maxStdVPSCount`} + public @CType("uint32_t") int maxStdVPSCount() { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_maxStdVPSCount(this.segment()); } + /// Sets `maxStdVPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStdVPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStdVPSCount.set(segment, 0L, index, value); } + /// Sets `maxStdVPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStdVPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_maxStdVPSCount(segment, 0L, value); } + /// Sets `maxStdVPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR maxStdVPSCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_maxStdVPSCount(this.segment(), index, value); return this; } + /// Sets `maxStdVPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR maxStdVPSCount(@CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_maxStdVPSCount(this.segment(), value); return this; } + + /// {@return `maxStdSPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStdSPSCount(MemorySegment segment, long index) { return (int) VH_maxStdSPSCount.get(segment, 0L, index); } + /// {@return `maxStdSPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStdSPSCount(MemorySegment segment) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_maxStdSPSCount(segment, 0L); } + /// {@return `maxStdSPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStdSPSCountAt(long index) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_maxStdSPSCount(this.segment(), index); } + /// {@return `maxStdSPSCount`} + public @CType("uint32_t") int maxStdSPSCount() { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_maxStdSPSCount(this.segment()); } + /// Sets `maxStdSPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStdSPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStdSPSCount.set(segment, 0L, index, value); } + /// Sets `maxStdSPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStdSPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_maxStdSPSCount(segment, 0L, value); } + /// Sets `maxStdSPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR maxStdSPSCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_maxStdSPSCount(this.segment(), index, value); return this; } + /// Sets `maxStdSPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR maxStdSPSCount(@CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_maxStdSPSCount(this.segment(), value); return this; } + + /// {@return `maxStdPPSCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStdPPSCount(MemorySegment segment, long index) { return (int) VH_maxStdPPSCount.get(segment, 0L, index); } + /// {@return `maxStdPPSCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStdPPSCount(MemorySegment segment) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_maxStdPPSCount(segment, 0L); } + /// {@return `maxStdPPSCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStdPPSCountAt(long index) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_maxStdPPSCount(this.segment(), index); } + /// {@return `maxStdPPSCount`} + public @CType("uint32_t") int maxStdPPSCount() { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_maxStdPPSCount(this.segment()); } + /// Sets `maxStdPPSCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStdPPSCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStdPPSCount.set(segment, 0L, index, value); } + /// Sets `maxStdPPSCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStdPPSCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_maxStdPPSCount(segment, 0L, value); } + /// Sets `maxStdPPSCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR maxStdPPSCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_maxStdPPSCount(this.segment(), index, value); return this; } + /// Sets `maxStdPPSCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR maxStdPPSCount(@CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_maxStdPPSCount(this.segment(), value); return this; } + + /// {@return `pParametersAddInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoEncodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment get_pParametersAddInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pParametersAddInfo.get(segment, 0L, index); } + /// {@return `pParametersAddInfo`} + /// @param segment the segment of the struct + public static @CType("const VkVideoEncodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment get_pParametersAddInfo(MemorySegment segment) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_pParametersAddInfo(segment, 0L); } + /// {@return `pParametersAddInfo` at the given index} + /// @param index the index + public @CType("const VkVideoEncodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment pParametersAddInfoAt(long index) { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_pParametersAddInfo(this.segment(), index); } + /// {@return `pParametersAddInfo`} + public @CType("const VkVideoEncodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment pParametersAddInfo() { return VkVideoEncodeH265SessionParametersCreateInfoKHR.get_pParametersAddInfo(this.segment()); } + /// Sets `pParametersAddInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pParametersAddInfo(MemorySegment segment, long index, @CType("const VkVideoEncodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pParametersAddInfo.set(segment, 0L, index, value); } + /// Sets `pParametersAddInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pParametersAddInfo(MemorySegment segment, @CType("const VkVideoEncodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_pParametersAddInfo(segment, 0L, value); } + /// Sets `pParametersAddInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR pParametersAddInfoAt(long index, @CType("const VkVideoEncodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_pParametersAddInfo(this.segment(), index, value); return this; } + /// Sets `pParametersAddInfo` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersCreateInfoKHR pParametersAddInfo(@CType("const VkVideoEncodeH265SessionParametersAddInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersCreateInfoKHR.set_pParametersAddInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersFeedbackInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersFeedbackInfoKHR.java new file mode 100644 index 00000000..e4dd3c3a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersFeedbackInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### hasStdVPSOverrides +/// [VarHandle][#VH_hasStdVPSOverrides] - [Getter][#hasStdVPSOverrides()] - [Setter][#hasStdVPSOverrides(int)] +/// ### hasStdSPSOverrides +/// [VarHandle][#VH_hasStdSPSOverrides] - [Getter][#hasStdSPSOverrides()] - [Setter][#hasStdSPSOverrides(int)] +/// ### hasStdPPSOverrides +/// [VarHandle][#VH_hasStdPPSOverrides] - [Getter][#hasStdPPSOverrides()] - [Setter][#hasStdPPSOverrides(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265SessionParametersFeedbackInfoKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 hasStdVPSOverrides; +/// VkBool32 hasStdSPSOverrides; +/// VkBool32 hasStdPPSOverrides; +/// } VkVideoEncodeH265SessionParametersFeedbackInfoKHR; +/// ``` +public final class VkVideoEncodeH265SessionParametersFeedbackInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265SessionParametersFeedbackInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("hasStdVPSOverrides"), + ValueLayout.JAVA_INT.withName("hasStdSPSOverrides"), + ValueLayout.JAVA_INT.withName("hasStdPPSOverrides") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `hasStdVPSOverrides` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hasStdVPSOverrides = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hasStdVPSOverrides")); + /// The [VarHandle] of `hasStdSPSOverrides` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hasStdSPSOverrides = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hasStdSPSOverrides")); + /// The [VarHandle] of `hasStdPPSOverrides` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hasStdPPSOverrides = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hasStdPPSOverrides")); + + /// Creates `VkVideoEncodeH265SessionParametersFeedbackInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265SessionParametersFeedbackInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersFeedbackInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersFeedbackInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265SessionParametersFeedbackInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersFeedbackInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersFeedbackInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265SessionParametersFeedbackInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersFeedbackInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersFeedbackInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265SessionParametersFeedbackInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265SessionParametersFeedbackInfoKHR` + public static VkVideoEncodeH265SessionParametersFeedbackInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265SessionParametersFeedbackInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265SessionParametersFeedbackInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265SessionParametersFeedbackInfoKHR` + public static VkVideoEncodeH265SessionParametersFeedbackInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265SessionParametersFeedbackInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `hasStdVPSOverrides` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hasStdVPSOverrides(MemorySegment segment, long index) { return (int) VH_hasStdVPSOverrides.get(segment, 0L, index); } + /// {@return `hasStdVPSOverrides`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hasStdVPSOverrides(MemorySegment segment) { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_hasStdVPSOverrides(segment, 0L); } + /// {@return `hasStdVPSOverrides` at the given index} + /// @param index the index + public @CType("VkBool32") int hasStdVPSOverridesAt(long index) { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_hasStdVPSOverrides(this.segment(), index); } + /// {@return `hasStdVPSOverrides`} + public @CType("VkBool32") int hasStdVPSOverrides() { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_hasStdVPSOverrides(this.segment()); } + /// Sets `hasStdVPSOverrides` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hasStdVPSOverrides(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hasStdVPSOverrides.set(segment, 0L, index, value); } + /// Sets `hasStdVPSOverrides` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hasStdVPSOverrides(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_hasStdVPSOverrides(segment, 0L, value); } + /// Sets `hasStdVPSOverrides` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR hasStdVPSOverridesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_hasStdVPSOverrides(this.segment(), index, value); return this; } + /// Sets `hasStdVPSOverrides` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR hasStdVPSOverrides(@CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_hasStdVPSOverrides(this.segment(), value); return this; } + + /// {@return `hasStdSPSOverrides` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hasStdSPSOverrides(MemorySegment segment, long index) { return (int) VH_hasStdSPSOverrides.get(segment, 0L, index); } + /// {@return `hasStdSPSOverrides`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hasStdSPSOverrides(MemorySegment segment) { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_hasStdSPSOverrides(segment, 0L); } + /// {@return `hasStdSPSOverrides` at the given index} + /// @param index the index + public @CType("VkBool32") int hasStdSPSOverridesAt(long index) { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_hasStdSPSOverrides(this.segment(), index); } + /// {@return `hasStdSPSOverrides`} + public @CType("VkBool32") int hasStdSPSOverrides() { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_hasStdSPSOverrides(this.segment()); } + /// Sets `hasStdSPSOverrides` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hasStdSPSOverrides(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hasStdSPSOverrides.set(segment, 0L, index, value); } + /// Sets `hasStdSPSOverrides` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hasStdSPSOverrides(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_hasStdSPSOverrides(segment, 0L, value); } + /// Sets `hasStdSPSOverrides` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR hasStdSPSOverridesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_hasStdSPSOverrides(this.segment(), index, value); return this; } + /// Sets `hasStdSPSOverrides` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR hasStdSPSOverrides(@CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_hasStdSPSOverrides(this.segment(), value); return this; } + + /// {@return `hasStdPPSOverrides` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hasStdPPSOverrides(MemorySegment segment, long index) { return (int) VH_hasStdPPSOverrides.get(segment, 0L, index); } + /// {@return `hasStdPPSOverrides`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hasStdPPSOverrides(MemorySegment segment) { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_hasStdPPSOverrides(segment, 0L); } + /// {@return `hasStdPPSOverrides` at the given index} + /// @param index the index + public @CType("VkBool32") int hasStdPPSOverridesAt(long index) { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_hasStdPPSOverrides(this.segment(), index); } + /// {@return `hasStdPPSOverrides`} + public @CType("VkBool32") int hasStdPPSOverrides() { return VkVideoEncodeH265SessionParametersFeedbackInfoKHR.get_hasStdPPSOverrides(this.segment()); } + /// Sets `hasStdPPSOverrides` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hasStdPPSOverrides(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hasStdPPSOverrides.set(segment, 0L, index, value); } + /// Sets `hasStdPPSOverrides` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hasStdPPSOverrides(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_hasStdPPSOverrides(segment, 0L, value); } + /// Sets `hasStdPPSOverrides` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR hasStdPPSOverridesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_hasStdPPSOverrides(this.segment(), index, value); return this; } + /// Sets `hasStdPPSOverrides` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersFeedbackInfoKHR hasStdPPSOverrides(@CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersFeedbackInfoKHR.set_hasStdPPSOverrides(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersGetInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersGetInfoKHR.java new file mode 100644 index 00000000..5357dae7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeH265SessionParametersGetInfoKHR.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### writeStdVPS +/// [VarHandle][#VH_writeStdVPS] - [Getter][#writeStdVPS()] - [Setter][#writeStdVPS(int)] +/// ### writeStdSPS +/// [VarHandle][#VH_writeStdSPS] - [Getter][#writeStdSPS()] - [Setter][#writeStdSPS(int)] +/// ### writeStdPPS +/// [VarHandle][#VH_writeStdPPS] - [Getter][#writeStdPPS()] - [Setter][#writeStdPPS(int)] +/// ### stdVPSId +/// [VarHandle][#VH_stdVPSId] - [Getter][#stdVPSId()] - [Setter][#stdVPSId(int)] +/// ### stdSPSId +/// [VarHandle][#VH_stdSPSId] - [Getter][#stdSPSId()] - [Setter][#stdSPSId(int)] +/// ### stdPPSId +/// [VarHandle][#VH_stdPPSId] - [Getter][#stdPPSId()] - [Setter][#stdPPSId(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeH265SessionParametersGetInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 writeStdVPS; +/// VkBool32 writeStdSPS; +/// VkBool32 writeStdPPS; +/// uint32_t stdVPSId; +/// uint32_t stdSPSId; +/// uint32_t stdPPSId; +/// } VkVideoEncodeH265SessionParametersGetInfoKHR; +/// ``` +public final class VkVideoEncodeH265SessionParametersGetInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeH265SessionParametersGetInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("writeStdVPS"), + ValueLayout.JAVA_INT.withName("writeStdSPS"), + ValueLayout.JAVA_INT.withName("writeStdPPS"), + ValueLayout.JAVA_INT.withName("stdVPSId"), + ValueLayout.JAVA_INT.withName("stdSPSId"), + ValueLayout.JAVA_INT.withName("stdPPSId") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `writeStdVPS` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_writeStdVPS = LAYOUT.arrayElementVarHandle(PathElement.groupElement("writeStdVPS")); + /// The [VarHandle] of `writeStdSPS` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_writeStdSPS = LAYOUT.arrayElementVarHandle(PathElement.groupElement("writeStdSPS")); + /// The [VarHandle] of `writeStdPPS` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_writeStdPPS = LAYOUT.arrayElementVarHandle(PathElement.groupElement("writeStdPPS")); + /// The [VarHandle] of `stdVPSId` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdVPSId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdVPSId")); + /// The [VarHandle] of `stdSPSId` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdSPSId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdSPSId")); + /// The [VarHandle] of `stdPPSId` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stdPPSId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stdPPSId")); + + /// Creates `VkVideoEncodeH265SessionParametersGetInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeH265SessionParametersGetInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeH265SessionParametersGetInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersGetInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersGetInfoKHR(segment); } + + /// Creates `VkVideoEncodeH265SessionParametersGetInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersGetInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersGetInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeH265SessionParametersGetInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeH265SessionParametersGetInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeH265SessionParametersGetInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeH265SessionParametersGetInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeH265SessionParametersGetInfoKHR` + public static VkVideoEncodeH265SessionParametersGetInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeH265SessionParametersGetInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeH265SessionParametersGetInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeH265SessionParametersGetInfoKHR` + public static VkVideoEncodeH265SessionParametersGetInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeH265SessionParametersGetInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `writeStdVPS` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_writeStdVPS(MemorySegment segment, long index) { return (int) VH_writeStdVPS.get(segment, 0L, index); } + /// {@return `writeStdVPS`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_writeStdVPS(MemorySegment segment) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_writeStdVPS(segment, 0L); } + /// {@return `writeStdVPS` at the given index} + /// @param index the index + public @CType("VkBool32") int writeStdVPSAt(long index) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_writeStdVPS(this.segment(), index); } + /// {@return `writeStdVPS`} + public @CType("VkBool32") int writeStdVPS() { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_writeStdVPS(this.segment()); } + /// Sets `writeStdVPS` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_writeStdVPS(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_writeStdVPS.set(segment, 0L, index, value); } + /// Sets `writeStdVPS` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_writeStdVPS(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_writeStdVPS(segment, 0L, value); } + /// Sets `writeStdVPS` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR writeStdVPSAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_writeStdVPS(this.segment(), index, value); return this; } + /// Sets `writeStdVPS` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR writeStdVPS(@CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_writeStdVPS(this.segment(), value); return this; } + + /// {@return `writeStdSPS` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_writeStdSPS(MemorySegment segment, long index) { return (int) VH_writeStdSPS.get(segment, 0L, index); } + /// {@return `writeStdSPS`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_writeStdSPS(MemorySegment segment) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_writeStdSPS(segment, 0L); } + /// {@return `writeStdSPS` at the given index} + /// @param index the index + public @CType("VkBool32") int writeStdSPSAt(long index) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_writeStdSPS(this.segment(), index); } + /// {@return `writeStdSPS`} + public @CType("VkBool32") int writeStdSPS() { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_writeStdSPS(this.segment()); } + /// Sets `writeStdSPS` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_writeStdSPS(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_writeStdSPS.set(segment, 0L, index, value); } + /// Sets `writeStdSPS` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_writeStdSPS(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_writeStdSPS(segment, 0L, value); } + /// Sets `writeStdSPS` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR writeStdSPSAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_writeStdSPS(this.segment(), index, value); return this; } + /// Sets `writeStdSPS` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR writeStdSPS(@CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_writeStdSPS(this.segment(), value); return this; } + + /// {@return `writeStdPPS` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_writeStdPPS(MemorySegment segment, long index) { return (int) VH_writeStdPPS.get(segment, 0L, index); } + /// {@return `writeStdPPS`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_writeStdPPS(MemorySegment segment) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_writeStdPPS(segment, 0L); } + /// {@return `writeStdPPS` at the given index} + /// @param index the index + public @CType("VkBool32") int writeStdPPSAt(long index) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_writeStdPPS(this.segment(), index); } + /// {@return `writeStdPPS`} + public @CType("VkBool32") int writeStdPPS() { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_writeStdPPS(this.segment()); } + /// Sets `writeStdPPS` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_writeStdPPS(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_writeStdPPS.set(segment, 0L, index, value); } + /// Sets `writeStdPPS` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_writeStdPPS(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_writeStdPPS(segment, 0L, value); } + /// Sets `writeStdPPS` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR writeStdPPSAt(long index, @CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_writeStdPPS(this.segment(), index, value); return this; } + /// Sets `writeStdPPS` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR writeStdPPS(@CType("VkBool32") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_writeStdPPS(this.segment(), value); return this; } + + /// {@return `stdVPSId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdVPSId(MemorySegment segment, long index) { return (int) VH_stdVPSId.get(segment, 0L, index); } + /// {@return `stdVPSId`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdVPSId(MemorySegment segment) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_stdVPSId(segment, 0L); } + /// {@return `stdVPSId` at the given index} + /// @param index the index + public @CType("uint32_t") int stdVPSIdAt(long index) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_stdVPSId(this.segment(), index); } + /// {@return `stdVPSId`} + public @CType("uint32_t") int stdVPSId() { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_stdVPSId(this.segment()); } + /// Sets `stdVPSId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdVPSId(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdVPSId.set(segment, 0L, index, value); } + /// Sets `stdVPSId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdVPSId(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_stdVPSId(segment, 0L, value); } + /// Sets `stdVPSId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR stdVPSIdAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_stdVPSId(this.segment(), index, value); return this; } + /// Sets `stdVPSId` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR stdVPSId(@CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_stdVPSId(this.segment(), value); return this; } + + /// {@return `stdSPSId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdSPSId(MemorySegment segment, long index) { return (int) VH_stdSPSId.get(segment, 0L, index); } + /// {@return `stdSPSId`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdSPSId(MemorySegment segment) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_stdSPSId(segment, 0L); } + /// {@return `stdSPSId` at the given index} + /// @param index the index + public @CType("uint32_t") int stdSPSIdAt(long index) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_stdSPSId(this.segment(), index); } + /// {@return `stdSPSId`} + public @CType("uint32_t") int stdSPSId() { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_stdSPSId(this.segment()); } + /// Sets `stdSPSId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdSPSId(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdSPSId.set(segment, 0L, index, value); } + /// Sets `stdSPSId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdSPSId(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_stdSPSId(segment, 0L, value); } + /// Sets `stdSPSId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR stdSPSIdAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_stdSPSId(this.segment(), index, value); return this; } + /// Sets `stdSPSId` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR stdSPSId(@CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_stdSPSId(this.segment(), value); return this; } + + /// {@return `stdPPSId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stdPPSId(MemorySegment segment, long index) { return (int) VH_stdPPSId.get(segment, 0L, index); } + /// {@return `stdPPSId`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stdPPSId(MemorySegment segment) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_stdPPSId(segment, 0L); } + /// {@return `stdPPSId` at the given index} + /// @param index the index + public @CType("uint32_t") int stdPPSIdAt(long index) { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_stdPPSId(this.segment(), index); } + /// {@return `stdPPSId`} + public @CType("uint32_t") int stdPPSId() { return VkVideoEncodeH265SessionParametersGetInfoKHR.get_stdPPSId(this.segment()); } + /// Sets `stdPPSId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stdPPSId(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stdPPSId.set(segment, 0L, index, value); } + /// Sets `stdPPSId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stdPPSId(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_stdPPSId(segment, 0L, value); } + /// Sets `stdPPSId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR stdPPSIdAt(long index, @CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_stdPPSId(this.segment(), index, value); return this; } + /// Sets `stdPPSId` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeH265SessionParametersGetInfoKHR stdPPSId(@CType("uint32_t") int value) { VkVideoEncodeH265SessionParametersGetInfoKHR.set_stdPPSId(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeInfoKHR.java new file mode 100644 index 00000000..e4130063 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeInfoKHR.java @@ -0,0 +1,483 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### dstBuffer +/// [VarHandle][#VH_dstBuffer] - [Getter][#dstBuffer()] - [Setter][#dstBuffer(java.lang.foreign.MemorySegment)] +/// ### dstBufferOffset +/// [VarHandle][#VH_dstBufferOffset] - [Getter][#dstBufferOffset()] - [Setter][#dstBufferOffset(long)] +/// ### dstBufferRange +/// [VarHandle][#VH_dstBufferRange] - [Getter][#dstBufferRange()] - [Setter][#dstBufferRange(long)] +/// ### srcPictureResource +/// [Byte offset][#OFFSET_srcPictureResource] - [Memory layout][#ML_srcPictureResource] - [Getter][#srcPictureResource()] - [Setter][#srcPictureResource(java.lang.foreign.MemorySegment)] +/// ### pSetupReferenceSlot +/// [VarHandle][#VH_pSetupReferenceSlot] - [Getter][#pSetupReferenceSlot()] - [Setter][#pSetupReferenceSlot(java.lang.foreign.MemorySegment)] +/// ### referenceSlotCount +/// [VarHandle][#VH_referenceSlotCount] - [Getter][#referenceSlotCount()] - [Setter][#referenceSlotCount(int)] +/// ### pReferenceSlots +/// [VarHandle][#VH_pReferenceSlots] - [Getter][#pReferenceSlots()] - [Setter][#pReferenceSlots(java.lang.foreign.MemorySegment)] +/// ### precedingExternallyEncodedBytes +/// [VarHandle][#VH_precedingExternallyEncodedBytes] - [Getter][#precedingExternallyEncodedBytes()] - [Setter][#precedingExternallyEncodedBytes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoEncodeFlagsKHR flags; +/// VkBuffer dstBuffer; +/// VkDeviceSize dstBufferOffset; +/// VkDeviceSize dstBufferRange; +/// VkVideoPictureResourceInfoKHR srcPictureResource; +/// const VkVideoReferenceSlotInfoKHR * pSetupReferenceSlot; +/// uint32_t referenceSlotCount; +/// const VkVideoReferenceSlotInfoKHR * pReferenceSlots; +/// uint32_t precedingExternallyEncodedBytes; +/// } VkVideoEncodeInfoKHR; +/// ``` +public final class VkVideoEncodeInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("dstBuffer"), + ValueLayout.JAVA_LONG.withName("dstBufferOffset"), + ValueLayout.JAVA_LONG.withName("dstBufferRange"), + overrungl.vulkan.khr.struct.VkVideoPictureResourceInfoKHR.LAYOUT.withName("srcPictureResource"), + ValueLayout.ADDRESS.withName("pSetupReferenceSlot"), + ValueLayout.JAVA_INT.withName("referenceSlotCount"), + ValueLayout.ADDRESS.withName("pReferenceSlots"), + ValueLayout.JAVA_INT.withName("precedingExternallyEncodedBytes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `dstBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstBuffer")); + /// The [VarHandle] of `dstBufferOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstBufferOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstBufferOffset")); + /// The [VarHandle] of `dstBufferRange` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstBufferRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstBufferRange")); + /// The byte offset of `srcPictureResource`. + public static final long OFFSET_srcPictureResource = LAYOUT.byteOffset(PathElement.groupElement("srcPictureResource")); + /// The memory layout of `srcPictureResource`. + public static final MemoryLayout ML_srcPictureResource = LAYOUT.select(PathElement.groupElement("srcPictureResource")); + /// The [VarHandle] of `pSetupReferenceSlot` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSetupReferenceSlot = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSetupReferenceSlot")); + /// The [VarHandle] of `referenceSlotCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_referenceSlotCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("referenceSlotCount")); + /// The [VarHandle] of `pReferenceSlots` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pReferenceSlots = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pReferenceSlots")); + /// The [VarHandle] of `precedingExternallyEncodedBytes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_precedingExternallyEncodedBytes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("precedingExternallyEncodedBytes")); + + /// Creates `VkVideoEncodeInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeInfoKHR(segment); } + + /// Creates `VkVideoEncodeInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeInfoKHR` + public static VkVideoEncodeInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeInfoKHR` + public static VkVideoEncodeInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeFlagsKHR") int flagsAt(long index) { return VkVideoEncodeInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoEncodeFlagsKHR") int flags() { return VkVideoEncodeInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoEncodeFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoEncodeFlagsKHR") int value) { VkVideoEncodeInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR flagsAt(long index, @CType("VkVideoEncodeFlagsKHR") int value) { VkVideoEncodeInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR flags(@CType("VkVideoEncodeFlagsKHR") int value) { VkVideoEncodeInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `dstBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_dstBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstBuffer.get(segment, 0L, index); } + /// {@return `dstBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_dstBuffer(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_dstBuffer(segment, 0L); } + /// {@return `dstBuffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment dstBufferAt(long index) { return VkVideoEncodeInfoKHR.get_dstBuffer(this.segment(), index); } + /// {@return `dstBuffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment dstBuffer() { return VkVideoEncodeInfoKHR.get_dstBuffer(this.segment()); } + /// Sets `dstBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstBuffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_dstBuffer.set(segment, 0L, index, value); } + /// Sets `dstBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstBuffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_dstBuffer(segment, 0L, value); } + /// Sets `dstBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR dstBufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_dstBuffer(this.segment(), index, value); return this; } + /// Sets `dstBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR dstBuffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_dstBuffer(this.segment(), value); return this; } + + /// {@return `dstBufferOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_dstBufferOffset(MemorySegment segment, long index) { return (long) VH_dstBufferOffset.get(segment, 0L, index); } + /// {@return `dstBufferOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_dstBufferOffset(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_dstBufferOffset(segment, 0L); } + /// {@return `dstBufferOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long dstBufferOffsetAt(long index) { return VkVideoEncodeInfoKHR.get_dstBufferOffset(this.segment(), index); } + /// {@return `dstBufferOffset`} + public @CType("VkDeviceSize") long dstBufferOffset() { return VkVideoEncodeInfoKHR.get_dstBufferOffset(this.segment()); } + /// Sets `dstBufferOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstBufferOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_dstBufferOffset.set(segment, 0L, index, value); } + /// Sets `dstBufferOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstBufferOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkVideoEncodeInfoKHR.set_dstBufferOffset(segment, 0L, value); } + /// Sets `dstBufferOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR dstBufferOffsetAt(long index, @CType("VkDeviceSize") long value) { VkVideoEncodeInfoKHR.set_dstBufferOffset(this.segment(), index, value); return this; } + /// Sets `dstBufferOffset` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR dstBufferOffset(@CType("VkDeviceSize") long value) { VkVideoEncodeInfoKHR.set_dstBufferOffset(this.segment(), value); return this; } + + /// {@return `dstBufferRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_dstBufferRange(MemorySegment segment, long index) { return (long) VH_dstBufferRange.get(segment, 0L, index); } + /// {@return `dstBufferRange`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_dstBufferRange(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_dstBufferRange(segment, 0L); } + /// {@return `dstBufferRange` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long dstBufferRangeAt(long index) { return VkVideoEncodeInfoKHR.get_dstBufferRange(this.segment(), index); } + /// {@return `dstBufferRange`} + public @CType("VkDeviceSize") long dstBufferRange() { return VkVideoEncodeInfoKHR.get_dstBufferRange(this.segment()); } + /// Sets `dstBufferRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstBufferRange(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_dstBufferRange.set(segment, 0L, index, value); } + /// Sets `dstBufferRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstBufferRange(MemorySegment segment, @CType("VkDeviceSize") long value) { VkVideoEncodeInfoKHR.set_dstBufferRange(segment, 0L, value); } + /// Sets `dstBufferRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR dstBufferRangeAt(long index, @CType("VkDeviceSize") long value) { VkVideoEncodeInfoKHR.set_dstBufferRange(this.segment(), index, value); return this; } + /// Sets `dstBufferRange` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR dstBufferRange(@CType("VkDeviceSize") long value) { VkVideoEncodeInfoKHR.set_dstBufferRange(this.segment(), value); return this; } + + /// {@return `srcPictureResource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment get_srcPictureResource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcPictureResource, index), ML_srcPictureResource); } + /// {@return `srcPictureResource`} + /// @param segment the segment of the struct + public static @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment get_srcPictureResource(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_srcPictureResource(segment, 0L); } + /// {@return `srcPictureResource` at the given index} + /// @param index the index + public @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment srcPictureResourceAt(long index) { return VkVideoEncodeInfoKHR.get_srcPictureResource(this.segment(), index); } + /// {@return `srcPictureResource`} + public @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment srcPictureResource() { return VkVideoEncodeInfoKHR.get_srcPictureResource(this.segment()); } + /// Sets `srcPictureResource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcPictureResource(MemorySegment segment, long index, @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcPictureResource, index), ML_srcPictureResource.byteSize()); } + /// Sets `srcPictureResource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcPictureResource(MemorySegment segment, @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_srcPictureResource(segment, 0L, value); } + /// Sets `srcPictureResource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR srcPictureResourceAt(long index, @CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_srcPictureResource(this.segment(), index, value); return this; } + /// Sets `srcPictureResource` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR srcPictureResource(@CType("VkVideoPictureResourceInfoKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_srcPictureResource(this.segment(), value); return this; } + + /// {@return `pSetupReferenceSlot` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment get_pSetupReferenceSlot(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSetupReferenceSlot.get(segment, 0L, index); } + /// {@return `pSetupReferenceSlot`} + /// @param segment the segment of the struct + public static @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment get_pSetupReferenceSlot(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_pSetupReferenceSlot(segment, 0L); } + /// {@return `pSetupReferenceSlot` at the given index} + /// @param index the index + public @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment pSetupReferenceSlotAt(long index) { return VkVideoEncodeInfoKHR.get_pSetupReferenceSlot(this.segment(), index); } + /// {@return `pSetupReferenceSlot`} + public @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment pSetupReferenceSlot() { return VkVideoEncodeInfoKHR.get_pSetupReferenceSlot(this.segment()); } + /// Sets `pSetupReferenceSlot` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSetupReferenceSlot(MemorySegment segment, long index, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pSetupReferenceSlot.set(segment, 0L, index, value); } + /// Sets `pSetupReferenceSlot` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSetupReferenceSlot(MemorySegment segment, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_pSetupReferenceSlot(segment, 0L, value); } + /// Sets `pSetupReferenceSlot` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR pSetupReferenceSlotAt(long index, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_pSetupReferenceSlot(this.segment(), index, value); return this; } + /// Sets `pSetupReferenceSlot` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR pSetupReferenceSlot(@CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_pSetupReferenceSlot(this.segment(), value); return this; } + + /// {@return `referenceSlotCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_referenceSlotCount(MemorySegment segment, long index) { return (int) VH_referenceSlotCount.get(segment, 0L, index); } + /// {@return `referenceSlotCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_referenceSlotCount(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_referenceSlotCount(segment, 0L); } + /// {@return `referenceSlotCount` at the given index} + /// @param index the index + public @CType("uint32_t") int referenceSlotCountAt(long index) { return VkVideoEncodeInfoKHR.get_referenceSlotCount(this.segment(), index); } + /// {@return `referenceSlotCount`} + public @CType("uint32_t") int referenceSlotCount() { return VkVideoEncodeInfoKHR.get_referenceSlotCount(this.segment()); } + /// Sets `referenceSlotCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_referenceSlotCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_referenceSlotCount.set(segment, 0L, index, value); } + /// Sets `referenceSlotCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_referenceSlotCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeInfoKHR.set_referenceSlotCount(segment, 0L, value); } + /// Sets `referenceSlotCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR referenceSlotCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeInfoKHR.set_referenceSlotCount(this.segment(), index, value); return this; } + /// Sets `referenceSlotCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR referenceSlotCount(@CType("uint32_t") int value) { VkVideoEncodeInfoKHR.set_referenceSlotCount(this.segment(), value); return this; } + + /// {@return `pReferenceSlots` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment get_pReferenceSlots(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pReferenceSlots.get(segment, 0L, index); } + /// {@return `pReferenceSlots`} + /// @param segment the segment of the struct + public static @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment get_pReferenceSlots(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_pReferenceSlots(segment, 0L); } + /// {@return `pReferenceSlots` at the given index} + /// @param index the index + public @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment pReferenceSlotsAt(long index) { return VkVideoEncodeInfoKHR.get_pReferenceSlots(this.segment(), index); } + /// {@return `pReferenceSlots`} + public @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment pReferenceSlots() { return VkVideoEncodeInfoKHR.get_pReferenceSlots(this.segment()); } + /// Sets `pReferenceSlots` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pReferenceSlots(MemorySegment segment, long index, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pReferenceSlots.set(segment, 0L, index, value); } + /// Sets `pReferenceSlots` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pReferenceSlots(MemorySegment segment, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_pReferenceSlots(segment, 0L, value); } + /// Sets `pReferenceSlots` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR pReferenceSlotsAt(long index, @CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_pReferenceSlots(this.segment(), index, value); return this; } + /// Sets `pReferenceSlots` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR pReferenceSlots(@CType("const VkVideoReferenceSlotInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeInfoKHR.set_pReferenceSlots(this.segment(), value); return this; } + + /// {@return `precedingExternallyEncodedBytes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_precedingExternallyEncodedBytes(MemorySegment segment, long index) { return (int) VH_precedingExternallyEncodedBytes.get(segment, 0L, index); } + /// {@return `precedingExternallyEncodedBytes`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_precedingExternallyEncodedBytes(MemorySegment segment) { return VkVideoEncodeInfoKHR.get_precedingExternallyEncodedBytes(segment, 0L); } + /// {@return `precedingExternallyEncodedBytes` at the given index} + /// @param index the index + public @CType("uint32_t") int precedingExternallyEncodedBytesAt(long index) { return VkVideoEncodeInfoKHR.get_precedingExternallyEncodedBytes(this.segment(), index); } + /// {@return `precedingExternallyEncodedBytes`} + public @CType("uint32_t") int precedingExternallyEncodedBytes() { return VkVideoEncodeInfoKHR.get_precedingExternallyEncodedBytes(this.segment()); } + /// Sets `precedingExternallyEncodedBytes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_precedingExternallyEncodedBytes(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_precedingExternallyEncodedBytes.set(segment, 0L, index, value); } + /// Sets `precedingExternallyEncodedBytes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_precedingExternallyEncodedBytes(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeInfoKHR.set_precedingExternallyEncodedBytes(segment, 0L, value); } + /// Sets `precedingExternallyEncodedBytes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR precedingExternallyEncodedBytesAt(long index, @CType("uint32_t") int value) { VkVideoEncodeInfoKHR.set_precedingExternallyEncodedBytes(this.segment(), index, value); return this; } + /// Sets `precedingExternallyEncodedBytes` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeInfoKHR precedingExternallyEncodedBytes(@CType("uint32_t") int value) { VkVideoEncodeInfoKHR.set_precedingExternallyEncodedBytes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQualityLevelInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQualityLevelInfoKHR.java new file mode 100644 index 00000000..239baab9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQualityLevelInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### qualityLevel +/// [VarHandle][#VH_qualityLevel] - [Getter][#qualityLevel()] - [Setter][#qualityLevel(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeQualityLevelInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t qualityLevel; +/// } VkVideoEncodeQualityLevelInfoKHR; +/// ``` +public final class VkVideoEncodeQualityLevelInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeQualityLevelInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("qualityLevel") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `qualityLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_qualityLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qualityLevel")); + + /// Creates `VkVideoEncodeQualityLevelInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeQualityLevelInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeQualityLevelInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQualityLevelInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQualityLevelInfoKHR(segment); } + + /// Creates `VkVideoEncodeQualityLevelInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQualityLevelInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQualityLevelInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeQualityLevelInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQualityLevelInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQualityLevelInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeQualityLevelInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeQualityLevelInfoKHR` + public static VkVideoEncodeQualityLevelInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeQualityLevelInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeQualityLevelInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeQualityLevelInfoKHR` + public static VkVideoEncodeQualityLevelInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeQualityLevelInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeQualityLevelInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeQualityLevelInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeQualityLevelInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeQualityLevelInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeQualityLevelInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeQualityLevelInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeQualityLevelInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeQualityLevelInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeQualityLevelInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQualityLevelInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQualityLevelInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQualityLevelInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `qualityLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_qualityLevel(MemorySegment segment, long index) { return (int) VH_qualityLevel.get(segment, 0L, index); } + /// {@return `qualityLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_qualityLevel(MemorySegment segment) { return VkVideoEncodeQualityLevelInfoKHR.get_qualityLevel(segment, 0L); } + /// {@return `qualityLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int qualityLevelAt(long index) { return VkVideoEncodeQualityLevelInfoKHR.get_qualityLevel(this.segment(), index); } + /// {@return `qualityLevel`} + public @CType("uint32_t") int qualityLevel() { return VkVideoEncodeQualityLevelInfoKHR.get_qualityLevel(this.segment()); } + /// Sets `qualityLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qualityLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_qualityLevel.set(segment, 0L, index, value); } + /// Sets `qualityLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qualityLevel(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeQualityLevelInfoKHR.set_qualityLevel(segment, 0L, value); } + /// Sets `qualityLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelInfoKHR qualityLevelAt(long index, @CType("uint32_t") int value) { VkVideoEncodeQualityLevelInfoKHR.set_qualityLevel(this.segment(), index, value); return this; } + /// Sets `qualityLevel` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelInfoKHR qualityLevel(@CType("uint32_t") int value) { VkVideoEncodeQualityLevelInfoKHR.set_qualityLevel(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQualityLevelPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQualityLevelPropertiesKHR.java new file mode 100644 index 00000000..1aa87928 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQualityLevelPropertiesKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### preferredRateControlMode +/// [VarHandle][#VH_preferredRateControlMode] - [Getter][#preferredRateControlMode()] - [Setter][#preferredRateControlMode(int)] +/// ### preferredRateControlLayerCount +/// [VarHandle][#VH_preferredRateControlLayerCount] - [Getter][#preferredRateControlLayerCount()] - [Setter][#preferredRateControlLayerCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeQualityLevelPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoEncodeRateControlModeFlagBitsKHR preferredRateControlMode; +/// uint32_t preferredRateControlLayerCount; +/// } VkVideoEncodeQualityLevelPropertiesKHR; +/// ``` +public final class VkVideoEncodeQualityLevelPropertiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeQualityLevelPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("preferredRateControlMode"), + ValueLayout.JAVA_INT.withName("preferredRateControlLayerCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `preferredRateControlMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredRateControlMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredRateControlMode")); + /// The [VarHandle] of `preferredRateControlLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preferredRateControlLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preferredRateControlLayerCount")); + + /// Creates `VkVideoEncodeQualityLevelPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeQualityLevelPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeQualityLevelPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQualityLevelPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQualityLevelPropertiesKHR(segment); } + + /// Creates `VkVideoEncodeQualityLevelPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQualityLevelPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQualityLevelPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeQualityLevelPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQualityLevelPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQualityLevelPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeQualityLevelPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeQualityLevelPropertiesKHR` + public static VkVideoEncodeQualityLevelPropertiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeQualityLevelPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeQualityLevelPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeQualityLevelPropertiesKHR` + public static VkVideoEncodeQualityLevelPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeQualityLevelPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeQualityLevelPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeQualityLevelPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeQualityLevelPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeQualityLevelPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeQualityLevelPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelPropertiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeQualityLevelPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeQualityLevelPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeQualityLevelPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeQualityLevelPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQualityLevelPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQualityLevelPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQualityLevelPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `preferredRateControlMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int get_preferredRateControlMode(MemorySegment segment, long index) { return (int) VH_preferredRateControlMode.get(segment, 0L, index); } + /// {@return `preferredRateControlMode`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int get_preferredRateControlMode(MemorySegment segment) { return VkVideoEncodeQualityLevelPropertiesKHR.get_preferredRateControlMode(segment, 0L); } + /// {@return `preferredRateControlMode` at the given index} + /// @param index the index + public @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int preferredRateControlModeAt(long index) { return VkVideoEncodeQualityLevelPropertiesKHR.get_preferredRateControlMode(this.segment(), index); } + /// {@return `preferredRateControlMode`} + public @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int preferredRateControlMode() { return VkVideoEncodeQualityLevelPropertiesKHR.get_preferredRateControlMode(this.segment()); } + /// Sets `preferredRateControlMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredRateControlMode(MemorySegment segment, long index, @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int value) { VH_preferredRateControlMode.set(segment, 0L, index, value); } + /// Sets `preferredRateControlMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredRateControlMode(MemorySegment segment, @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int value) { VkVideoEncodeQualityLevelPropertiesKHR.set_preferredRateControlMode(segment, 0L, value); } + /// Sets `preferredRateControlMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelPropertiesKHR preferredRateControlModeAt(long index, @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int value) { VkVideoEncodeQualityLevelPropertiesKHR.set_preferredRateControlMode(this.segment(), index, value); return this; } + /// Sets `preferredRateControlMode` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelPropertiesKHR preferredRateControlMode(@CType("VkVideoEncodeRateControlModeFlagBitsKHR") int value) { VkVideoEncodeQualityLevelPropertiesKHR.set_preferredRateControlMode(this.segment(), value); return this; } + + /// {@return `preferredRateControlLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preferredRateControlLayerCount(MemorySegment segment, long index) { return (int) VH_preferredRateControlLayerCount.get(segment, 0L, index); } + /// {@return `preferredRateControlLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preferredRateControlLayerCount(MemorySegment segment) { return VkVideoEncodeQualityLevelPropertiesKHR.get_preferredRateControlLayerCount(segment, 0L); } + /// {@return `preferredRateControlLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preferredRateControlLayerCountAt(long index) { return VkVideoEncodeQualityLevelPropertiesKHR.get_preferredRateControlLayerCount(this.segment(), index); } + /// {@return `preferredRateControlLayerCount`} + public @CType("uint32_t") int preferredRateControlLayerCount() { return VkVideoEncodeQualityLevelPropertiesKHR.get_preferredRateControlLayerCount(this.segment()); } + /// Sets `preferredRateControlLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preferredRateControlLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preferredRateControlLayerCount.set(segment, 0L, index, value); } + /// Sets `preferredRateControlLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preferredRateControlLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeQualityLevelPropertiesKHR.set_preferredRateControlLayerCount(segment, 0L, value); } + /// Sets `preferredRateControlLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelPropertiesKHR preferredRateControlLayerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeQualityLevelPropertiesKHR.set_preferredRateControlLayerCount(this.segment(), index, value); return this; } + /// Sets `preferredRateControlLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQualityLevelPropertiesKHR preferredRateControlLayerCount(@CType("uint32_t") int value) { VkVideoEncodeQualityLevelPropertiesKHR.set_preferredRateControlLayerCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQuantizationMapCapabilitiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQuantizationMapCapabilitiesKHR.java new file mode 100644 index 00000000..c43a5f1f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQuantizationMapCapabilitiesKHR.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxQuantizationMapExtent +/// [Byte offset][#OFFSET_maxQuantizationMapExtent] - [Memory layout][#ML_maxQuantizationMapExtent] - [Getter][#maxQuantizationMapExtent()] - [Setter][#maxQuantizationMapExtent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeQuantizationMapCapabilitiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkExtent2D maxQuantizationMapExtent; +/// } VkVideoEncodeQuantizationMapCapabilitiesKHR; +/// ``` +public final class VkVideoEncodeQuantizationMapCapabilitiesKHR extends Struct { + /// The struct layout of `VkVideoEncodeQuantizationMapCapabilitiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxQuantizationMapExtent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `maxQuantizationMapExtent`. + public static final long OFFSET_maxQuantizationMapExtent = LAYOUT.byteOffset(PathElement.groupElement("maxQuantizationMapExtent")); + /// The memory layout of `maxQuantizationMapExtent`. + public static final MemoryLayout ML_maxQuantizationMapExtent = LAYOUT.select(PathElement.groupElement("maxQuantizationMapExtent")); + + /// Creates `VkVideoEncodeQuantizationMapCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeQuantizationMapCapabilitiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeQuantizationMapCapabilitiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQuantizationMapCapabilitiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQuantizationMapCapabilitiesKHR(segment); } + + /// Creates `VkVideoEncodeQuantizationMapCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQuantizationMapCapabilitiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQuantizationMapCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeQuantizationMapCapabilitiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQuantizationMapCapabilitiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQuantizationMapCapabilitiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeQuantizationMapCapabilitiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeQuantizationMapCapabilitiesKHR` + public static VkVideoEncodeQuantizationMapCapabilitiesKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeQuantizationMapCapabilitiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeQuantizationMapCapabilitiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeQuantizationMapCapabilitiesKHR` + public static VkVideoEncodeQuantizationMapCapabilitiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeQuantizationMapCapabilitiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeQuantizationMapCapabilitiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeQuantizationMapCapabilitiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeQuantizationMapCapabilitiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeQuantizationMapCapabilitiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapCapabilitiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeQuantizationMapCapabilitiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapCapabilitiesKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeQuantizationMapCapabilitiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeQuantizationMapCapabilitiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeQuantizationMapCapabilitiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeQuantizationMapCapabilitiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapCapabilitiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapCapabilitiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapCapabilitiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapCapabilitiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapCapabilitiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `maxQuantizationMapExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxQuantizationMapExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxQuantizationMapExtent, index), ML_maxQuantizationMapExtent); } + /// {@return `maxQuantizationMapExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxQuantizationMapExtent(MemorySegment segment) { return VkVideoEncodeQuantizationMapCapabilitiesKHR.get_maxQuantizationMapExtent(segment, 0L); } + /// {@return `maxQuantizationMapExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxQuantizationMapExtentAt(long index) { return VkVideoEncodeQuantizationMapCapabilitiesKHR.get_maxQuantizationMapExtent(this.segment(), index); } + /// {@return `maxQuantizationMapExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxQuantizationMapExtent() { return VkVideoEncodeQuantizationMapCapabilitiesKHR.get_maxQuantizationMapExtent(this.segment()); } + /// Sets `maxQuantizationMapExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQuantizationMapExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxQuantizationMapExtent, index), ML_maxQuantizationMapExtent.byteSize()); } + /// Sets `maxQuantizationMapExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQuantizationMapExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapCapabilitiesKHR.set_maxQuantizationMapExtent(segment, 0L, value); } + /// Sets `maxQuantizationMapExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapCapabilitiesKHR maxQuantizationMapExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapCapabilitiesKHR.set_maxQuantizationMapExtent(this.segment(), index, value); return this; } + /// Sets `maxQuantizationMapExtent` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapCapabilitiesKHR maxQuantizationMapExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapCapabilitiesKHR.set_maxQuantizationMapExtent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQuantizationMapInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQuantizationMapInfoKHR.java new file mode 100644 index 00000000..16abb5b5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQuantizationMapInfoKHR.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### quantizationMap +/// [VarHandle][#VH_quantizationMap] - [Getter][#quantizationMap()] - [Setter][#quantizationMap(java.lang.foreign.MemorySegment)] +/// ### quantizationMapExtent +/// [Byte offset][#OFFSET_quantizationMapExtent] - [Memory layout][#ML_quantizationMapExtent] - [Getter][#quantizationMapExtent()] - [Setter][#quantizationMapExtent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeQuantizationMapInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageView quantizationMap; +/// VkExtent2D quantizationMapExtent; +/// } VkVideoEncodeQuantizationMapInfoKHR; +/// ``` +public final class VkVideoEncodeQuantizationMapInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeQuantizationMapInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("quantizationMap"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("quantizationMapExtent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `quantizationMap` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_quantizationMap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("quantizationMap")); + /// The byte offset of `quantizationMapExtent`. + public static final long OFFSET_quantizationMapExtent = LAYOUT.byteOffset(PathElement.groupElement("quantizationMapExtent")); + /// The memory layout of `quantizationMapExtent`. + public static final MemoryLayout ML_quantizationMapExtent = LAYOUT.select(PathElement.groupElement("quantizationMapExtent")); + + /// Creates `VkVideoEncodeQuantizationMapInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeQuantizationMapInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeQuantizationMapInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQuantizationMapInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQuantizationMapInfoKHR(segment); } + + /// Creates `VkVideoEncodeQuantizationMapInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQuantizationMapInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQuantizationMapInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeQuantizationMapInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQuantizationMapInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQuantizationMapInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeQuantizationMapInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeQuantizationMapInfoKHR` + public static VkVideoEncodeQuantizationMapInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeQuantizationMapInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeQuantizationMapInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeQuantizationMapInfoKHR` + public static VkVideoEncodeQuantizationMapInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeQuantizationMapInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeQuantizationMapInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeQuantizationMapInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeQuantizationMapInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeQuantizationMapInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeQuantizationMapInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeQuantizationMapInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeQuantizationMapInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeQuantizationMapInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeQuantizationMapInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `quantizationMap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_quantizationMap(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_quantizationMap.get(segment, 0L, index); } + /// {@return `quantizationMap`} + /// @param segment the segment of the struct + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_quantizationMap(MemorySegment segment) { return VkVideoEncodeQuantizationMapInfoKHR.get_quantizationMap(segment, 0L); } + /// {@return `quantizationMap` at the given index} + /// @param index the index + public @CType("VkImageView") java.lang.foreign.MemorySegment quantizationMapAt(long index) { return VkVideoEncodeQuantizationMapInfoKHR.get_quantizationMap(this.segment(), index); } + /// {@return `quantizationMap`} + public @CType("VkImageView") java.lang.foreign.MemorySegment quantizationMap() { return VkVideoEncodeQuantizationMapInfoKHR.get_quantizationMap(this.segment()); } + /// Sets `quantizationMap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_quantizationMap(MemorySegment segment, long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VH_quantizationMap.set(segment, 0L, index, value); } + /// Sets `quantizationMap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_quantizationMap(MemorySegment segment, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapInfoKHR.set_quantizationMap(segment, 0L, value); } + /// Sets `quantizationMap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapInfoKHR quantizationMapAt(long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapInfoKHR.set_quantizationMap(this.segment(), index, value); return this; } + /// Sets `quantizationMap` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapInfoKHR quantizationMap(@CType("VkImageView") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapInfoKHR.set_quantizationMap(this.segment(), value); return this; } + + /// {@return `quantizationMapExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_quantizationMapExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_quantizationMapExtent, index), ML_quantizationMapExtent); } + /// {@return `quantizationMapExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_quantizationMapExtent(MemorySegment segment) { return VkVideoEncodeQuantizationMapInfoKHR.get_quantizationMapExtent(segment, 0L); } + /// {@return `quantizationMapExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment quantizationMapExtentAt(long index) { return VkVideoEncodeQuantizationMapInfoKHR.get_quantizationMapExtent(this.segment(), index); } + /// {@return `quantizationMapExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment quantizationMapExtent() { return VkVideoEncodeQuantizationMapInfoKHR.get_quantizationMapExtent(this.segment()); } + /// Sets `quantizationMapExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_quantizationMapExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_quantizationMapExtent, index), ML_quantizationMapExtent.byteSize()); } + /// Sets `quantizationMapExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_quantizationMapExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapInfoKHR.set_quantizationMapExtent(segment, 0L, value); } + /// Sets `quantizationMapExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapInfoKHR quantizationMapExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapInfoKHR.set_quantizationMapExtent(this.segment(), index, value); return this; } + /// Sets `quantizationMapExtent` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapInfoKHR quantizationMapExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapInfoKHR.set_quantizationMapExtent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.java new file mode 100644 index 00000000..2a4ce780 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### quantizationMapTexelSize +/// [Byte offset][#OFFSET_quantizationMapTexelSize] - [Memory layout][#ML_quantizationMapTexelSize] - [Getter][#quantizationMapTexelSize()] - [Setter][#quantizationMapTexelSize(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkExtent2D quantizationMapTexelSize; +/// } VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR; +/// ``` +public final class VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("quantizationMapTexelSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `quantizationMapTexelSize`. + public static final long OFFSET_quantizationMapTexelSize = LAYOUT.byteOffset(PathElement.groupElement("quantizationMapTexelSize")); + /// The memory layout of `quantizationMapTexelSize`. + public static final MemoryLayout ML_quantizationMapTexelSize = LAYOUT.select(PathElement.groupElement("quantizationMapTexelSize")); + + /// Creates `VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR(segment); } + + /// Creates `VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR` + public static VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR` + public static VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `quantizationMapTexelSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_quantizationMapTexelSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_quantizationMapTexelSize, index), ML_quantizationMapTexelSize); } + /// {@return `quantizationMapTexelSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_quantizationMapTexelSize(MemorySegment segment) { return VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.get_quantizationMapTexelSize(segment, 0L); } + /// {@return `quantizationMapTexelSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment quantizationMapTexelSizeAt(long index) { return VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.get_quantizationMapTexelSize(this.segment(), index); } + /// {@return `quantizationMapTexelSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment quantizationMapTexelSize() { return VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.get_quantizationMapTexelSize(this.segment()); } + /// Sets `quantizationMapTexelSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_quantizationMapTexelSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_quantizationMapTexelSize, index), ML_quantizationMapTexelSize.byteSize()); } + /// Sets `quantizationMapTexelSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_quantizationMapTexelSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.set_quantizationMapTexelSize(segment, 0L, value); } + /// Sets `quantizationMapTexelSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR quantizationMapTexelSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.set_quantizationMapTexelSize(this.segment(), index, value); return this; } + /// Sets `quantizationMapTexelSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR quantizationMapTexelSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.set_quantizationMapTexelSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeRateControlInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeRateControlInfoKHR.java new file mode 100644 index 00000000..7d523b1e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeRateControlInfoKHR.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### rateControlMode +/// [VarHandle][#VH_rateControlMode] - [Getter][#rateControlMode()] - [Setter][#rateControlMode(int)] +/// ### layerCount +/// [VarHandle][#VH_layerCount] - [Getter][#layerCount()] - [Setter][#layerCount(int)] +/// ### pLayers +/// [VarHandle][#VH_pLayers] - [Getter][#pLayers()] - [Setter][#pLayers(java.lang.foreign.MemorySegment)] +/// ### virtualBufferSizeInMs +/// [VarHandle][#VH_virtualBufferSizeInMs] - [Getter][#virtualBufferSizeInMs()] - [Setter][#virtualBufferSizeInMs(int)] +/// ### initialVirtualBufferSizeInMs +/// [VarHandle][#VH_initialVirtualBufferSizeInMs] - [Getter][#initialVirtualBufferSizeInMs()] - [Setter][#initialVirtualBufferSizeInMs(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeRateControlInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoEncodeRateControlFlagsKHR flags; +/// VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode; +/// uint32_t layerCount; +/// const VkVideoEncodeRateControlLayerInfoKHR * pLayers; +/// uint32_t virtualBufferSizeInMs; +/// uint32_t initialVirtualBufferSizeInMs; +/// } VkVideoEncodeRateControlInfoKHR; +/// ``` +public final class VkVideoEncodeRateControlInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeRateControlInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("rateControlMode"), + ValueLayout.JAVA_INT.withName("layerCount"), + ValueLayout.ADDRESS.withName("pLayers"), + ValueLayout.JAVA_INT.withName("virtualBufferSizeInMs"), + ValueLayout.JAVA_INT.withName("initialVirtualBufferSizeInMs") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `rateControlMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rateControlMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rateControlMode")); + /// The [VarHandle] of `layerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layerCount")); + /// The [VarHandle] of `pLayers` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLayers")); + /// The [VarHandle] of `virtualBufferSizeInMs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_virtualBufferSizeInMs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("virtualBufferSizeInMs")); + /// The [VarHandle] of `initialVirtualBufferSizeInMs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_initialVirtualBufferSizeInMs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initialVirtualBufferSizeInMs")); + + /// Creates `VkVideoEncodeRateControlInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeRateControlInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeRateControlInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeRateControlInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeRateControlInfoKHR(segment); } + + /// Creates `VkVideoEncodeRateControlInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeRateControlInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeRateControlInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeRateControlInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeRateControlInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeRateControlInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeRateControlInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeRateControlInfoKHR` + public static VkVideoEncodeRateControlInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeRateControlInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeRateControlInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeRateControlInfoKHR` + public static VkVideoEncodeRateControlInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeRateControlInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeRateControlInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeRateControlInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeRateControlInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeRateControlInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeRateControlInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeRateControlInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeRateControlInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeRateControlInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeRateControlInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeRateControlInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeRateControlInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeRateControlInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeRateControlFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeRateControlFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoEncodeRateControlInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoEncodeRateControlFlagsKHR") int flagsAt(long index) { return VkVideoEncodeRateControlInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoEncodeRateControlFlagsKHR") int flags() { return VkVideoEncodeRateControlInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoEncodeRateControlFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoEncodeRateControlFlagsKHR") int value) { VkVideoEncodeRateControlInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR flagsAt(long index, @CType("VkVideoEncodeRateControlFlagsKHR") int value) { VkVideoEncodeRateControlInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR flags(@CType("VkVideoEncodeRateControlFlagsKHR") int value) { VkVideoEncodeRateControlInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `rateControlMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int get_rateControlMode(MemorySegment segment, long index) { return (int) VH_rateControlMode.get(segment, 0L, index); } + /// {@return `rateControlMode`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int get_rateControlMode(MemorySegment segment) { return VkVideoEncodeRateControlInfoKHR.get_rateControlMode(segment, 0L); } + /// {@return `rateControlMode` at the given index} + /// @param index the index + public @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int rateControlModeAt(long index) { return VkVideoEncodeRateControlInfoKHR.get_rateControlMode(this.segment(), index); } + /// {@return `rateControlMode`} + public @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int rateControlMode() { return VkVideoEncodeRateControlInfoKHR.get_rateControlMode(this.segment()); } + /// Sets `rateControlMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rateControlMode(MemorySegment segment, long index, @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int value) { VH_rateControlMode.set(segment, 0L, index, value); } + /// Sets `rateControlMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rateControlMode(MemorySegment segment, @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int value) { VkVideoEncodeRateControlInfoKHR.set_rateControlMode(segment, 0L, value); } + /// Sets `rateControlMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR rateControlModeAt(long index, @CType("VkVideoEncodeRateControlModeFlagBitsKHR") int value) { VkVideoEncodeRateControlInfoKHR.set_rateControlMode(this.segment(), index, value); return this; } + /// Sets `rateControlMode` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR rateControlMode(@CType("VkVideoEncodeRateControlModeFlagBitsKHR") int value) { VkVideoEncodeRateControlInfoKHR.set_rateControlMode(this.segment(), value); return this; } + + /// {@return `layerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_layerCount(MemorySegment segment, long index) { return (int) VH_layerCount.get(segment, 0L, index); } + /// {@return `layerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_layerCount(MemorySegment segment) { return VkVideoEncodeRateControlInfoKHR.get_layerCount(segment, 0L); } + /// {@return `layerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int layerCountAt(long index) { return VkVideoEncodeRateControlInfoKHR.get_layerCount(this.segment(), index); } + /// {@return `layerCount`} + public @CType("uint32_t") int layerCount() { return VkVideoEncodeRateControlInfoKHR.get_layerCount(this.segment()); } + /// Sets `layerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_layerCount.set(segment, 0L, index, value); } + /// Sets `layerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layerCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeRateControlInfoKHR.set_layerCount(segment, 0L, value); } + /// Sets `layerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR layerCountAt(long index, @CType("uint32_t") int value) { VkVideoEncodeRateControlInfoKHR.set_layerCount(this.segment(), index, value); return this; } + /// Sets `layerCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR layerCount(@CType("uint32_t") int value) { VkVideoEncodeRateControlInfoKHR.set_layerCount(this.segment(), value); return this; } + + /// {@return `pLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoEncodeRateControlLayerInfoKHR *") java.lang.foreign.MemorySegment get_pLayers(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLayers.get(segment, 0L, index); } + /// {@return `pLayers`} + /// @param segment the segment of the struct + public static @CType("const VkVideoEncodeRateControlLayerInfoKHR *") java.lang.foreign.MemorySegment get_pLayers(MemorySegment segment) { return VkVideoEncodeRateControlInfoKHR.get_pLayers(segment, 0L); } + /// {@return `pLayers` at the given index} + /// @param index the index + public @CType("const VkVideoEncodeRateControlLayerInfoKHR *") java.lang.foreign.MemorySegment pLayersAt(long index) { return VkVideoEncodeRateControlInfoKHR.get_pLayers(this.segment(), index); } + /// {@return `pLayers`} + public @CType("const VkVideoEncodeRateControlLayerInfoKHR *") java.lang.foreign.MemorySegment pLayers() { return VkVideoEncodeRateControlInfoKHR.get_pLayers(this.segment()); } + /// Sets `pLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLayers(MemorySegment segment, long index, @CType("const VkVideoEncodeRateControlLayerInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pLayers.set(segment, 0L, index, value); } + /// Sets `pLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLayers(MemorySegment segment, @CType("const VkVideoEncodeRateControlLayerInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeRateControlInfoKHR.set_pLayers(segment, 0L, value); } + /// Sets `pLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR pLayersAt(long index, @CType("const VkVideoEncodeRateControlLayerInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeRateControlInfoKHR.set_pLayers(this.segment(), index, value); return this; } + /// Sets `pLayers` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR pLayers(@CType("const VkVideoEncodeRateControlLayerInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoEncodeRateControlInfoKHR.set_pLayers(this.segment(), value); return this; } + + /// {@return `virtualBufferSizeInMs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_virtualBufferSizeInMs(MemorySegment segment, long index) { return (int) VH_virtualBufferSizeInMs.get(segment, 0L, index); } + /// {@return `virtualBufferSizeInMs`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_virtualBufferSizeInMs(MemorySegment segment) { return VkVideoEncodeRateControlInfoKHR.get_virtualBufferSizeInMs(segment, 0L); } + /// {@return `virtualBufferSizeInMs` at the given index} + /// @param index the index + public @CType("uint32_t") int virtualBufferSizeInMsAt(long index) { return VkVideoEncodeRateControlInfoKHR.get_virtualBufferSizeInMs(this.segment(), index); } + /// {@return `virtualBufferSizeInMs`} + public @CType("uint32_t") int virtualBufferSizeInMs() { return VkVideoEncodeRateControlInfoKHR.get_virtualBufferSizeInMs(this.segment()); } + /// Sets `virtualBufferSizeInMs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_virtualBufferSizeInMs(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_virtualBufferSizeInMs.set(segment, 0L, index, value); } + /// Sets `virtualBufferSizeInMs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_virtualBufferSizeInMs(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeRateControlInfoKHR.set_virtualBufferSizeInMs(segment, 0L, value); } + /// Sets `virtualBufferSizeInMs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR virtualBufferSizeInMsAt(long index, @CType("uint32_t") int value) { VkVideoEncodeRateControlInfoKHR.set_virtualBufferSizeInMs(this.segment(), index, value); return this; } + /// Sets `virtualBufferSizeInMs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR virtualBufferSizeInMs(@CType("uint32_t") int value) { VkVideoEncodeRateControlInfoKHR.set_virtualBufferSizeInMs(this.segment(), value); return this; } + + /// {@return `initialVirtualBufferSizeInMs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_initialVirtualBufferSizeInMs(MemorySegment segment, long index) { return (int) VH_initialVirtualBufferSizeInMs.get(segment, 0L, index); } + /// {@return `initialVirtualBufferSizeInMs`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_initialVirtualBufferSizeInMs(MemorySegment segment) { return VkVideoEncodeRateControlInfoKHR.get_initialVirtualBufferSizeInMs(segment, 0L); } + /// {@return `initialVirtualBufferSizeInMs` at the given index} + /// @param index the index + public @CType("uint32_t") int initialVirtualBufferSizeInMsAt(long index) { return VkVideoEncodeRateControlInfoKHR.get_initialVirtualBufferSizeInMs(this.segment(), index); } + /// {@return `initialVirtualBufferSizeInMs`} + public @CType("uint32_t") int initialVirtualBufferSizeInMs() { return VkVideoEncodeRateControlInfoKHR.get_initialVirtualBufferSizeInMs(this.segment()); } + /// Sets `initialVirtualBufferSizeInMs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initialVirtualBufferSizeInMs(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_initialVirtualBufferSizeInMs.set(segment, 0L, index, value); } + /// Sets `initialVirtualBufferSizeInMs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initialVirtualBufferSizeInMs(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeRateControlInfoKHR.set_initialVirtualBufferSizeInMs(segment, 0L, value); } + /// Sets `initialVirtualBufferSizeInMs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR initialVirtualBufferSizeInMsAt(long index, @CType("uint32_t") int value) { VkVideoEncodeRateControlInfoKHR.set_initialVirtualBufferSizeInMs(this.segment(), index, value); return this; } + /// Sets `initialVirtualBufferSizeInMs` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlInfoKHR initialVirtualBufferSizeInMs(@CType("uint32_t") int value) { VkVideoEncodeRateControlInfoKHR.set_initialVirtualBufferSizeInMs(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeRateControlLayerInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeRateControlLayerInfoKHR.java new file mode 100644 index 00000000..50cbf441 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeRateControlLayerInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### averageBitrate +/// [VarHandle][#VH_averageBitrate] - [Getter][#averageBitrate()] - [Setter][#averageBitrate(long)] +/// ### maxBitrate +/// [VarHandle][#VH_maxBitrate] - [Getter][#maxBitrate()] - [Setter][#maxBitrate(long)] +/// ### frameRateNumerator +/// [VarHandle][#VH_frameRateNumerator] - [Getter][#frameRateNumerator()] - [Setter][#frameRateNumerator(int)] +/// ### frameRateDenominator +/// [VarHandle][#VH_frameRateDenominator] - [Getter][#frameRateDenominator()] - [Setter][#frameRateDenominator(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeRateControlLayerInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint64_t averageBitrate; +/// uint64_t maxBitrate; +/// uint32_t frameRateNumerator; +/// uint32_t frameRateDenominator; +/// } VkVideoEncodeRateControlLayerInfoKHR; +/// ``` +public final class VkVideoEncodeRateControlLayerInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeRateControlLayerInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("averageBitrate"), + ValueLayout.JAVA_LONG.withName("maxBitrate"), + ValueLayout.JAVA_INT.withName("frameRateNumerator"), + ValueLayout.JAVA_INT.withName("frameRateDenominator") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `averageBitrate` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_averageBitrate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("averageBitrate")); + /// The [VarHandle] of `maxBitrate` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxBitrate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBitrate")); + /// The [VarHandle] of `frameRateNumerator` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frameRateNumerator = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameRateNumerator")); + /// The [VarHandle] of `frameRateDenominator` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frameRateDenominator = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frameRateDenominator")); + + /// Creates `VkVideoEncodeRateControlLayerInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeRateControlLayerInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeRateControlLayerInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeRateControlLayerInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeRateControlLayerInfoKHR(segment); } + + /// Creates `VkVideoEncodeRateControlLayerInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeRateControlLayerInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeRateControlLayerInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeRateControlLayerInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeRateControlLayerInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeRateControlLayerInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeRateControlLayerInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeRateControlLayerInfoKHR` + public static VkVideoEncodeRateControlLayerInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeRateControlLayerInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeRateControlLayerInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeRateControlLayerInfoKHR` + public static VkVideoEncodeRateControlLayerInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeRateControlLayerInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeRateControlLayerInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeRateControlLayerInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeRateControlLayerInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeRateControlLayerInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeRateControlLayerInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeRateControlLayerInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeRateControlLayerInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeRateControlLayerInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeRateControlLayerInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeRateControlLayerInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeRateControlLayerInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeRateControlLayerInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `averageBitrate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_averageBitrate(MemorySegment segment, long index) { return (long) VH_averageBitrate.get(segment, 0L, index); } + /// {@return `averageBitrate`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_averageBitrate(MemorySegment segment) { return VkVideoEncodeRateControlLayerInfoKHR.get_averageBitrate(segment, 0L); } + /// {@return `averageBitrate` at the given index} + /// @param index the index + public @CType("uint64_t") long averageBitrateAt(long index) { return VkVideoEncodeRateControlLayerInfoKHR.get_averageBitrate(this.segment(), index); } + /// {@return `averageBitrate`} + public @CType("uint64_t") long averageBitrate() { return VkVideoEncodeRateControlLayerInfoKHR.get_averageBitrate(this.segment()); } + /// Sets `averageBitrate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_averageBitrate(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_averageBitrate.set(segment, 0L, index, value); } + /// Sets `averageBitrate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_averageBitrate(MemorySegment segment, @CType("uint64_t") long value) { VkVideoEncodeRateControlLayerInfoKHR.set_averageBitrate(segment, 0L, value); } + /// Sets `averageBitrate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR averageBitrateAt(long index, @CType("uint64_t") long value) { VkVideoEncodeRateControlLayerInfoKHR.set_averageBitrate(this.segment(), index, value); return this; } + /// Sets `averageBitrate` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR averageBitrate(@CType("uint64_t") long value) { VkVideoEncodeRateControlLayerInfoKHR.set_averageBitrate(this.segment(), value); return this; } + + /// {@return `maxBitrate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxBitrate(MemorySegment segment, long index) { return (long) VH_maxBitrate.get(segment, 0L, index); } + /// {@return `maxBitrate`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxBitrate(MemorySegment segment) { return VkVideoEncodeRateControlLayerInfoKHR.get_maxBitrate(segment, 0L); } + /// {@return `maxBitrate` at the given index} + /// @param index the index + public @CType("uint64_t") long maxBitrateAt(long index) { return VkVideoEncodeRateControlLayerInfoKHR.get_maxBitrate(this.segment(), index); } + /// {@return `maxBitrate`} + public @CType("uint64_t") long maxBitrate() { return VkVideoEncodeRateControlLayerInfoKHR.get_maxBitrate(this.segment()); } + /// Sets `maxBitrate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBitrate(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxBitrate.set(segment, 0L, index, value); } + /// Sets `maxBitrate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBitrate(MemorySegment segment, @CType("uint64_t") long value) { VkVideoEncodeRateControlLayerInfoKHR.set_maxBitrate(segment, 0L, value); } + /// Sets `maxBitrate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR maxBitrateAt(long index, @CType("uint64_t") long value) { VkVideoEncodeRateControlLayerInfoKHR.set_maxBitrate(this.segment(), index, value); return this; } + /// Sets `maxBitrate` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR maxBitrate(@CType("uint64_t") long value) { VkVideoEncodeRateControlLayerInfoKHR.set_maxBitrate(this.segment(), value); return this; } + + /// {@return `frameRateNumerator` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frameRateNumerator(MemorySegment segment, long index) { return (int) VH_frameRateNumerator.get(segment, 0L, index); } + /// {@return `frameRateNumerator`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frameRateNumerator(MemorySegment segment) { return VkVideoEncodeRateControlLayerInfoKHR.get_frameRateNumerator(segment, 0L); } + /// {@return `frameRateNumerator` at the given index} + /// @param index the index + public @CType("uint32_t") int frameRateNumeratorAt(long index) { return VkVideoEncodeRateControlLayerInfoKHR.get_frameRateNumerator(this.segment(), index); } + /// {@return `frameRateNumerator`} + public @CType("uint32_t") int frameRateNumerator() { return VkVideoEncodeRateControlLayerInfoKHR.get_frameRateNumerator(this.segment()); } + /// Sets `frameRateNumerator` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameRateNumerator(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frameRateNumerator.set(segment, 0L, index, value); } + /// Sets `frameRateNumerator` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameRateNumerator(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeRateControlLayerInfoKHR.set_frameRateNumerator(segment, 0L, value); } + /// Sets `frameRateNumerator` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR frameRateNumeratorAt(long index, @CType("uint32_t") int value) { VkVideoEncodeRateControlLayerInfoKHR.set_frameRateNumerator(this.segment(), index, value); return this; } + /// Sets `frameRateNumerator` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR frameRateNumerator(@CType("uint32_t") int value) { VkVideoEncodeRateControlLayerInfoKHR.set_frameRateNumerator(this.segment(), value); return this; } + + /// {@return `frameRateDenominator` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frameRateDenominator(MemorySegment segment, long index) { return (int) VH_frameRateDenominator.get(segment, 0L, index); } + /// {@return `frameRateDenominator`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frameRateDenominator(MemorySegment segment) { return VkVideoEncodeRateControlLayerInfoKHR.get_frameRateDenominator(segment, 0L); } + /// {@return `frameRateDenominator` at the given index} + /// @param index the index + public @CType("uint32_t") int frameRateDenominatorAt(long index) { return VkVideoEncodeRateControlLayerInfoKHR.get_frameRateDenominator(this.segment(), index); } + /// {@return `frameRateDenominator`} + public @CType("uint32_t") int frameRateDenominator() { return VkVideoEncodeRateControlLayerInfoKHR.get_frameRateDenominator(this.segment()); } + /// Sets `frameRateDenominator` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frameRateDenominator(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frameRateDenominator.set(segment, 0L, index, value); } + /// Sets `frameRateDenominator` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frameRateDenominator(MemorySegment segment, @CType("uint32_t") int value) { VkVideoEncodeRateControlLayerInfoKHR.set_frameRateDenominator(segment, 0L, value); } + /// Sets `frameRateDenominator` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR frameRateDenominatorAt(long index, @CType("uint32_t") int value) { VkVideoEncodeRateControlLayerInfoKHR.set_frameRateDenominator(this.segment(), index, value); return this; } + /// Sets `frameRateDenominator` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeRateControlLayerInfoKHR frameRateDenominator(@CType("uint32_t") int value) { VkVideoEncodeRateControlLayerInfoKHR.set_frameRateDenominator(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeSessionParametersFeedbackInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeSessionParametersFeedbackInfoKHR.java new file mode 100644 index 00000000..16d7449e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeSessionParametersFeedbackInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### hasOverrides +/// [VarHandle][#VH_hasOverrides] - [Getter][#hasOverrides()] - [Setter][#hasOverrides(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeSessionParametersFeedbackInfoKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 hasOverrides; +/// } VkVideoEncodeSessionParametersFeedbackInfoKHR; +/// ``` +public final class VkVideoEncodeSessionParametersFeedbackInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeSessionParametersFeedbackInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("hasOverrides") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `hasOverrides` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hasOverrides = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hasOverrides")); + + /// Creates `VkVideoEncodeSessionParametersFeedbackInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeSessionParametersFeedbackInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeSessionParametersFeedbackInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeSessionParametersFeedbackInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeSessionParametersFeedbackInfoKHR(segment); } + + /// Creates `VkVideoEncodeSessionParametersFeedbackInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeSessionParametersFeedbackInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeSessionParametersFeedbackInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeSessionParametersFeedbackInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeSessionParametersFeedbackInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeSessionParametersFeedbackInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeSessionParametersFeedbackInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeSessionParametersFeedbackInfoKHR` + public static VkVideoEncodeSessionParametersFeedbackInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeSessionParametersFeedbackInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeSessionParametersFeedbackInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeSessionParametersFeedbackInfoKHR` + public static VkVideoEncodeSessionParametersFeedbackInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeSessionParametersFeedbackInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeSessionParametersFeedbackInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeSessionParametersFeedbackInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeSessionParametersFeedbackInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeSessionParametersFeedbackInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersFeedbackInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeSessionParametersFeedbackInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersFeedbackInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeSessionParametersFeedbackInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeSessionParametersFeedbackInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeSessionParametersFeedbackInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeSessionParametersFeedbackInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeSessionParametersFeedbackInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersFeedbackInfoKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeSessionParametersFeedbackInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersFeedbackInfoKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeSessionParametersFeedbackInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `hasOverrides` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hasOverrides(MemorySegment segment, long index) { return (int) VH_hasOverrides.get(segment, 0L, index); } + /// {@return `hasOverrides`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hasOverrides(MemorySegment segment) { return VkVideoEncodeSessionParametersFeedbackInfoKHR.get_hasOverrides(segment, 0L); } + /// {@return `hasOverrides` at the given index} + /// @param index the index + public @CType("VkBool32") int hasOverridesAt(long index) { return VkVideoEncodeSessionParametersFeedbackInfoKHR.get_hasOverrides(this.segment(), index); } + /// {@return `hasOverrides`} + public @CType("VkBool32") int hasOverrides() { return VkVideoEncodeSessionParametersFeedbackInfoKHR.get_hasOverrides(this.segment()); } + /// Sets `hasOverrides` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hasOverrides(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hasOverrides.set(segment, 0L, index, value); } + /// Sets `hasOverrides` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hasOverrides(MemorySegment segment, @CType("VkBool32") int value) { VkVideoEncodeSessionParametersFeedbackInfoKHR.set_hasOverrides(segment, 0L, value); } + /// Sets `hasOverrides` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersFeedbackInfoKHR hasOverridesAt(long index, @CType("VkBool32") int value) { VkVideoEncodeSessionParametersFeedbackInfoKHR.set_hasOverrides(this.segment(), index, value); return this; } + /// Sets `hasOverrides` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersFeedbackInfoKHR hasOverrides(@CType("VkBool32") int value) { VkVideoEncodeSessionParametersFeedbackInfoKHR.set_hasOverrides(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeSessionParametersGetInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeSessionParametersGetInfoKHR.java new file mode 100644 index 00000000..d4369820 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeSessionParametersGetInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### videoSessionParameters +/// [VarHandle][#VH_videoSessionParameters] - [Getter][#videoSessionParameters()] - [Setter][#videoSessionParameters(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeSessionParametersGetInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoSessionParametersKHR videoSessionParameters; +/// } VkVideoEncodeSessionParametersGetInfoKHR; +/// ``` +public final class VkVideoEncodeSessionParametersGetInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeSessionParametersGetInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("videoSessionParameters") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `videoSessionParameters` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_videoSessionParameters = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoSessionParameters")); + + /// Creates `VkVideoEncodeSessionParametersGetInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeSessionParametersGetInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeSessionParametersGetInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeSessionParametersGetInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeSessionParametersGetInfoKHR(segment); } + + /// Creates `VkVideoEncodeSessionParametersGetInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeSessionParametersGetInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeSessionParametersGetInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeSessionParametersGetInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeSessionParametersGetInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeSessionParametersGetInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeSessionParametersGetInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeSessionParametersGetInfoKHR` + public static VkVideoEncodeSessionParametersGetInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeSessionParametersGetInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeSessionParametersGetInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeSessionParametersGetInfoKHR` + public static VkVideoEncodeSessionParametersGetInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeSessionParametersGetInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeSessionParametersGetInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeSessionParametersGetInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeSessionParametersGetInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeSessionParametersGetInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersGetInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeSessionParametersGetInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersGetInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeSessionParametersGetInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeSessionParametersGetInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeSessionParametersGetInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeSessionParametersGetInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeSessionParametersGetInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersGetInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeSessionParametersGetInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersGetInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeSessionParametersGetInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `videoSessionParameters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment get_videoSessionParameters(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_videoSessionParameters.get(segment, 0L, index); } + /// {@return `videoSessionParameters`} + /// @param segment the segment of the struct + public static @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment get_videoSessionParameters(MemorySegment segment) { return VkVideoEncodeSessionParametersGetInfoKHR.get_videoSessionParameters(segment, 0L); } + /// {@return `videoSessionParameters` at the given index} + /// @param index the index + public @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment videoSessionParametersAt(long index) { return VkVideoEncodeSessionParametersGetInfoKHR.get_videoSessionParameters(this.segment(), index); } + /// {@return `videoSessionParameters`} + public @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment videoSessionParameters() { return VkVideoEncodeSessionParametersGetInfoKHR.get_videoSessionParameters(this.segment()); } + /// Sets `videoSessionParameters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoSessionParameters(MemorySegment segment, long index, @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VH_videoSessionParameters.set(segment, 0L, index, value); } + /// Sets `videoSessionParameters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoSessionParameters(MemorySegment segment, @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeSessionParametersGetInfoKHR.set_videoSessionParameters(segment, 0L, value); } + /// Sets `videoSessionParameters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersGetInfoKHR videoSessionParametersAt(long index, @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeSessionParametersGetInfoKHR.set_videoSessionParameters(this.segment(), index, value); return this; } + /// Sets `videoSessionParameters` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeSessionParametersGetInfoKHR videoSessionParameters(@CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VkVideoEncodeSessionParametersGetInfoKHR.set_videoSessionParameters(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeUsageInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeUsageInfoKHR.java new file mode 100644 index 00000000..bde66ecc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEncodeUsageInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### videoUsageHints +/// [VarHandle][#VH_videoUsageHints] - [Getter][#videoUsageHints()] - [Setter][#videoUsageHints(int)] +/// ### videoContentHints +/// [VarHandle][#VH_videoContentHints] - [Getter][#videoContentHints()] - [Setter][#videoContentHints(int)] +/// ### tuningMode +/// [VarHandle][#VH_tuningMode] - [Getter][#tuningMode()] - [Setter][#tuningMode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEncodeUsageInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoEncodeUsageFlagsKHR videoUsageHints; +/// VkVideoEncodeContentFlagsKHR videoContentHints; +/// VkVideoEncodeTuningModeKHR tuningMode; +/// } VkVideoEncodeUsageInfoKHR; +/// ``` +public final class VkVideoEncodeUsageInfoKHR extends Struct { + /// The struct layout of `VkVideoEncodeUsageInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("videoUsageHints"), + ValueLayout.JAVA_INT.withName("videoContentHints"), + ValueLayout.JAVA_INT.withName("tuningMode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `videoUsageHints` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_videoUsageHints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoUsageHints")); + /// The [VarHandle] of `videoContentHints` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_videoContentHints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoContentHints")); + /// The [VarHandle] of `tuningMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tuningMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tuningMode")); + + /// Creates `VkVideoEncodeUsageInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEncodeUsageInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEncodeUsageInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeUsageInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeUsageInfoKHR(segment); } + + /// Creates `VkVideoEncodeUsageInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeUsageInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeUsageInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEncodeUsageInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEncodeUsageInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEncodeUsageInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEncodeUsageInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEncodeUsageInfoKHR` + public static VkVideoEncodeUsageInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEncodeUsageInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEncodeUsageInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEncodeUsageInfoKHR` + public static VkVideoEncodeUsageInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEncodeUsageInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEncodeUsageInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEncodeUsageInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEncodeUsageInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEncodeUsageInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeUsageInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEncodeUsageInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeUsageInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEncodeUsageInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEncodeUsageInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEncodeUsageInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEncodeUsageInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeUsageInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeUsageInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeUsageInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeUsageInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEncodeUsageInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `videoUsageHints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeUsageFlagsKHR") int get_videoUsageHints(MemorySegment segment, long index) { return (int) VH_videoUsageHints.get(segment, 0L, index); } + /// {@return `videoUsageHints`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeUsageFlagsKHR") int get_videoUsageHints(MemorySegment segment) { return VkVideoEncodeUsageInfoKHR.get_videoUsageHints(segment, 0L); } + /// {@return `videoUsageHints` at the given index} + /// @param index the index + public @CType("VkVideoEncodeUsageFlagsKHR") int videoUsageHintsAt(long index) { return VkVideoEncodeUsageInfoKHR.get_videoUsageHints(this.segment(), index); } + /// {@return `videoUsageHints`} + public @CType("VkVideoEncodeUsageFlagsKHR") int videoUsageHints() { return VkVideoEncodeUsageInfoKHR.get_videoUsageHints(this.segment()); } + /// Sets `videoUsageHints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoUsageHints(MemorySegment segment, long index, @CType("VkVideoEncodeUsageFlagsKHR") int value) { VH_videoUsageHints.set(segment, 0L, index, value); } + /// Sets `videoUsageHints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoUsageHints(MemorySegment segment, @CType("VkVideoEncodeUsageFlagsKHR") int value) { VkVideoEncodeUsageInfoKHR.set_videoUsageHints(segment, 0L, value); } + /// Sets `videoUsageHints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeUsageInfoKHR videoUsageHintsAt(long index, @CType("VkVideoEncodeUsageFlagsKHR") int value) { VkVideoEncodeUsageInfoKHR.set_videoUsageHints(this.segment(), index, value); return this; } + /// Sets `videoUsageHints` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeUsageInfoKHR videoUsageHints(@CType("VkVideoEncodeUsageFlagsKHR") int value) { VkVideoEncodeUsageInfoKHR.set_videoUsageHints(this.segment(), value); return this; } + + /// {@return `videoContentHints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeContentFlagsKHR") int get_videoContentHints(MemorySegment segment, long index) { return (int) VH_videoContentHints.get(segment, 0L, index); } + /// {@return `videoContentHints`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeContentFlagsKHR") int get_videoContentHints(MemorySegment segment) { return VkVideoEncodeUsageInfoKHR.get_videoContentHints(segment, 0L); } + /// {@return `videoContentHints` at the given index} + /// @param index the index + public @CType("VkVideoEncodeContentFlagsKHR") int videoContentHintsAt(long index) { return VkVideoEncodeUsageInfoKHR.get_videoContentHints(this.segment(), index); } + /// {@return `videoContentHints`} + public @CType("VkVideoEncodeContentFlagsKHR") int videoContentHints() { return VkVideoEncodeUsageInfoKHR.get_videoContentHints(this.segment()); } + /// Sets `videoContentHints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoContentHints(MemorySegment segment, long index, @CType("VkVideoEncodeContentFlagsKHR") int value) { VH_videoContentHints.set(segment, 0L, index, value); } + /// Sets `videoContentHints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoContentHints(MemorySegment segment, @CType("VkVideoEncodeContentFlagsKHR") int value) { VkVideoEncodeUsageInfoKHR.set_videoContentHints(segment, 0L, value); } + /// Sets `videoContentHints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeUsageInfoKHR videoContentHintsAt(long index, @CType("VkVideoEncodeContentFlagsKHR") int value) { VkVideoEncodeUsageInfoKHR.set_videoContentHints(this.segment(), index, value); return this; } + /// Sets `videoContentHints` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeUsageInfoKHR videoContentHints(@CType("VkVideoEncodeContentFlagsKHR") int value) { VkVideoEncodeUsageInfoKHR.set_videoContentHints(this.segment(), value); return this; } + + /// {@return `tuningMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeTuningModeKHR") int get_tuningMode(MemorySegment segment, long index) { return (int) VH_tuningMode.get(segment, 0L, index); } + /// {@return `tuningMode`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeTuningModeKHR") int get_tuningMode(MemorySegment segment) { return VkVideoEncodeUsageInfoKHR.get_tuningMode(segment, 0L); } + /// {@return `tuningMode` at the given index} + /// @param index the index + public @CType("VkVideoEncodeTuningModeKHR") int tuningModeAt(long index) { return VkVideoEncodeUsageInfoKHR.get_tuningMode(this.segment(), index); } + /// {@return `tuningMode`} + public @CType("VkVideoEncodeTuningModeKHR") int tuningMode() { return VkVideoEncodeUsageInfoKHR.get_tuningMode(this.segment()); } + /// Sets `tuningMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tuningMode(MemorySegment segment, long index, @CType("VkVideoEncodeTuningModeKHR") int value) { VH_tuningMode.set(segment, 0L, index, value); } + /// Sets `tuningMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tuningMode(MemorySegment segment, @CType("VkVideoEncodeTuningModeKHR") int value) { VkVideoEncodeUsageInfoKHR.set_tuningMode(segment, 0L, value); } + /// Sets `tuningMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEncodeUsageInfoKHR tuningModeAt(long index, @CType("VkVideoEncodeTuningModeKHR") int value) { VkVideoEncodeUsageInfoKHR.set_tuningMode(this.segment(), index, value); return this; } + /// Sets `tuningMode` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEncodeUsageInfoKHR tuningMode(@CType("VkVideoEncodeTuningModeKHR") int value) { VkVideoEncodeUsageInfoKHR.set_tuningMode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEndCodingInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEndCodingInfoKHR.java new file mode 100644 index 00000000..66344fbf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoEndCodingInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoEndCodingInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoEndCodingFlagsKHR flags; +/// } VkVideoEndCodingInfoKHR; +/// ``` +public final class VkVideoEndCodingInfoKHR extends Struct { + /// The struct layout of `VkVideoEndCodingInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkVideoEndCodingInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoEndCodingInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoEndCodingInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEndCodingInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEndCodingInfoKHR(segment); } + + /// Creates `VkVideoEndCodingInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEndCodingInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEndCodingInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoEndCodingInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoEndCodingInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoEndCodingInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoEndCodingInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoEndCodingInfoKHR` + public static VkVideoEndCodingInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoEndCodingInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoEndCodingInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoEndCodingInfoKHR` + public static VkVideoEndCodingInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoEndCodingInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoEndCodingInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoEndCodingInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoEndCodingInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoEndCodingInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEndCodingInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoEndCodingInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEndCodingInfoKHR sType(@CType("VkStructureType") int value) { VkVideoEndCodingInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoEndCodingInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoEndCodingInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoEndCodingInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEndCodingInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEndCodingInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEndCodingInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEndCodingInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoEndCodingInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEndCodingFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoEndCodingFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoEndCodingInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoEndCodingFlagsKHR") int flagsAt(long index) { return VkVideoEndCodingInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoEndCodingFlagsKHR") int flags() { return VkVideoEndCodingInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoEndCodingFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoEndCodingFlagsKHR") int value) { VkVideoEndCodingInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoEndCodingInfoKHR flagsAt(long index, @CType("VkVideoEndCodingFlagsKHR") int value) { VkVideoEndCodingInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoEndCodingInfoKHR flags(@CType("VkVideoEndCodingFlagsKHR") int value) { VkVideoEndCodingInfoKHR.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatAV1QuantizationMapPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatAV1QuantizationMapPropertiesKHR.java new file mode 100644 index 00000000..bbcd7caa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatAV1QuantizationMapPropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### compatibleSuperblockSizes +/// [VarHandle][#VH_compatibleSuperblockSizes] - [Getter][#compatibleSuperblockSizes()] - [Setter][#compatibleSuperblockSizes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoFormatAV1QuantizationMapPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoEncodeAV1SuperblockSizeFlagsKHR compatibleSuperblockSizes; +/// } VkVideoFormatAV1QuantizationMapPropertiesKHR; +/// ``` +public final class VkVideoFormatAV1QuantizationMapPropertiesKHR extends Struct { + /// The struct layout of `VkVideoFormatAV1QuantizationMapPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("compatibleSuperblockSizes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `compatibleSuperblockSizes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compatibleSuperblockSizes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compatibleSuperblockSizes")); + + /// Creates `VkVideoFormatAV1QuantizationMapPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoFormatAV1QuantizationMapPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoFormatAV1QuantizationMapPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatAV1QuantizationMapPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatAV1QuantizationMapPropertiesKHR(segment); } + + /// Creates `VkVideoFormatAV1QuantizationMapPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatAV1QuantizationMapPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatAV1QuantizationMapPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoFormatAV1QuantizationMapPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatAV1QuantizationMapPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatAV1QuantizationMapPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoFormatAV1QuantizationMapPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoFormatAV1QuantizationMapPropertiesKHR` + public static VkVideoFormatAV1QuantizationMapPropertiesKHR alloc(SegmentAllocator allocator) { return new VkVideoFormatAV1QuantizationMapPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoFormatAV1QuantizationMapPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoFormatAV1QuantizationMapPropertiesKHR` + public static VkVideoFormatAV1QuantizationMapPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoFormatAV1QuantizationMapPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoFormatAV1QuantizationMapPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoFormatAV1QuantizationMapPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoFormatAV1QuantizationMapPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoFormatAV1QuantizationMapPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatAV1QuantizationMapPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoFormatAV1QuantizationMapPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatAV1QuantizationMapPropertiesKHR sType(@CType("VkStructureType") int value) { VkVideoFormatAV1QuantizationMapPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoFormatAV1QuantizationMapPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoFormatAV1QuantizationMapPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoFormatAV1QuantizationMapPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatAV1QuantizationMapPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatAV1QuantizationMapPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatAV1QuantizationMapPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatAV1QuantizationMapPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatAV1QuantizationMapPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `compatibleSuperblockSizes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int get_compatibleSuperblockSizes(MemorySegment segment, long index) { return (int) VH_compatibleSuperblockSizes.get(segment, 0L, index); } + /// {@return `compatibleSuperblockSizes`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int get_compatibleSuperblockSizes(MemorySegment segment) { return VkVideoFormatAV1QuantizationMapPropertiesKHR.get_compatibleSuperblockSizes(segment, 0L); } + /// {@return `compatibleSuperblockSizes` at the given index} + /// @param index the index + public @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int compatibleSuperblockSizesAt(long index) { return VkVideoFormatAV1QuantizationMapPropertiesKHR.get_compatibleSuperblockSizes(this.segment(), index); } + /// {@return `compatibleSuperblockSizes`} + public @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int compatibleSuperblockSizes() { return VkVideoFormatAV1QuantizationMapPropertiesKHR.get_compatibleSuperblockSizes(this.segment()); } + /// Sets `compatibleSuperblockSizes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compatibleSuperblockSizes(MemorySegment segment, long index, @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int value) { VH_compatibleSuperblockSizes.set(segment, 0L, index, value); } + /// Sets `compatibleSuperblockSizes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compatibleSuperblockSizes(MemorySegment segment, @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int value) { VkVideoFormatAV1QuantizationMapPropertiesKHR.set_compatibleSuperblockSizes(segment, 0L, value); } + /// Sets `compatibleSuperblockSizes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatAV1QuantizationMapPropertiesKHR compatibleSuperblockSizesAt(long index, @CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int value) { VkVideoFormatAV1QuantizationMapPropertiesKHR.set_compatibleSuperblockSizes(this.segment(), index, value); return this; } + /// Sets `compatibleSuperblockSizes` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatAV1QuantizationMapPropertiesKHR compatibleSuperblockSizes(@CType("VkVideoEncodeAV1SuperblockSizeFlagsKHR") int value) { VkVideoFormatAV1QuantizationMapPropertiesKHR.set_compatibleSuperblockSizes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatH265QuantizationMapPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatH265QuantizationMapPropertiesKHR.java new file mode 100644 index 00000000..f80a5d89 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatH265QuantizationMapPropertiesKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### compatibleCtbSizes +/// [VarHandle][#VH_compatibleCtbSizes] - [Getter][#compatibleCtbSizes()] - [Setter][#compatibleCtbSizes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoFormatH265QuantizationMapPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkVideoEncodeH265CtbSizeFlagsKHR compatibleCtbSizes; +/// } VkVideoFormatH265QuantizationMapPropertiesKHR; +/// ``` +public final class VkVideoFormatH265QuantizationMapPropertiesKHR extends Struct { + /// The struct layout of `VkVideoFormatH265QuantizationMapPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("compatibleCtbSizes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `compatibleCtbSizes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compatibleCtbSizes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compatibleCtbSizes")); + + /// Creates `VkVideoFormatH265QuantizationMapPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoFormatH265QuantizationMapPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoFormatH265QuantizationMapPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatH265QuantizationMapPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatH265QuantizationMapPropertiesKHR(segment); } + + /// Creates `VkVideoFormatH265QuantizationMapPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatH265QuantizationMapPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatH265QuantizationMapPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoFormatH265QuantizationMapPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatH265QuantizationMapPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatH265QuantizationMapPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoFormatH265QuantizationMapPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoFormatH265QuantizationMapPropertiesKHR` + public static VkVideoFormatH265QuantizationMapPropertiesKHR alloc(SegmentAllocator allocator) { return new VkVideoFormatH265QuantizationMapPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoFormatH265QuantizationMapPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoFormatH265QuantizationMapPropertiesKHR` + public static VkVideoFormatH265QuantizationMapPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoFormatH265QuantizationMapPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoFormatH265QuantizationMapPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoFormatH265QuantizationMapPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoFormatH265QuantizationMapPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoFormatH265QuantizationMapPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatH265QuantizationMapPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoFormatH265QuantizationMapPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatH265QuantizationMapPropertiesKHR sType(@CType("VkStructureType") int value) { VkVideoFormatH265QuantizationMapPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoFormatH265QuantizationMapPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoFormatH265QuantizationMapPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoFormatH265QuantizationMapPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatH265QuantizationMapPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatH265QuantizationMapPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatH265QuantizationMapPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatH265QuantizationMapPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatH265QuantizationMapPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `compatibleCtbSizes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int get_compatibleCtbSizes(MemorySegment segment, long index) { return (int) VH_compatibleCtbSizes.get(segment, 0L, index); } + /// {@return `compatibleCtbSizes`} + /// @param segment the segment of the struct + public static @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int get_compatibleCtbSizes(MemorySegment segment) { return VkVideoFormatH265QuantizationMapPropertiesKHR.get_compatibleCtbSizes(segment, 0L); } + /// {@return `compatibleCtbSizes` at the given index} + /// @param index the index + public @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int compatibleCtbSizesAt(long index) { return VkVideoFormatH265QuantizationMapPropertiesKHR.get_compatibleCtbSizes(this.segment(), index); } + /// {@return `compatibleCtbSizes`} + public @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int compatibleCtbSizes() { return VkVideoFormatH265QuantizationMapPropertiesKHR.get_compatibleCtbSizes(this.segment()); } + /// Sets `compatibleCtbSizes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compatibleCtbSizes(MemorySegment segment, long index, @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int value) { VH_compatibleCtbSizes.set(segment, 0L, index, value); } + /// Sets `compatibleCtbSizes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compatibleCtbSizes(MemorySegment segment, @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int value) { VkVideoFormatH265QuantizationMapPropertiesKHR.set_compatibleCtbSizes(segment, 0L, value); } + /// Sets `compatibleCtbSizes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatH265QuantizationMapPropertiesKHR compatibleCtbSizesAt(long index, @CType("VkVideoEncodeH265CtbSizeFlagsKHR") int value) { VkVideoFormatH265QuantizationMapPropertiesKHR.set_compatibleCtbSizes(this.segment(), index, value); return this; } + /// Sets `compatibleCtbSizes` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatH265QuantizationMapPropertiesKHR compatibleCtbSizes(@CType("VkVideoEncodeH265CtbSizeFlagsKHR") int value) { VkVideoFormatH265QuantizationMapPropertiesKHR.set_compatibleCtbSizes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatPropertiesKHR.java new file mode 100644 index 00000000..8ac51988 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatPropertiesKHR.java @@ -0,0 +1,372 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### componentMapping +/// [Byte offset][#OFFSET_componentMapping] - [Memory layout][#ML_componentMapping] - [Getter][#componentMapping()] - [Setter][#componentMapping(java.lang.foreign.MemorySegment)] +/// ### imageCreateFlags +/// [VarHandle][#VH_imageCreateFlags] - [Getter][#imageCreateFlags()] - [Setter][#imageCreateFlags(int)] +/// ### imageType +/// [VarHandle][#VH_imageType] - [Getter][#imageType()] - [Setter][#imageType(int)] +/// ### imageTiling +/// [VarHandle][#VH_imageTiling] - [Getter][#imageTiling()] - [Setter][#imageTiling(int)] +/// ### imageUsageFlags +/// [VarHandle][#VH_imageUsageFlags] - [Getter][#imageUsageFlags()] - [Setter][#imageUsageFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoFormatPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkFormat format; +/// VkComponentMapping componentMapping; +/// VkImageCreateFlags imageCreateFlags; +/// VkImageType imageType; +/// VkImageTiling imageTiling; +/// VkImageUsageFlags imageUsageFlags; +/// } VkVideoFormatPropertiesKHR; +/// ``` +public final class VkVideoFormatPropertiesKHR extends Struct { + /// The struct layout of `VkVideoFormatPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("format"), + overrungl.vulkan.struct.VkComponentMapping.LAYOUT.withName("componentMapping"), + ValueLayout.JAVA_INT.withName("imageCreateFlags"), + ValueLayout.JAVA_INT.withName("imageType"), + ValueLayout.JAVA_INT.withName("imageTiling"), + ValueLayout.JAVA_INT.withName("imageUsageFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The byte offset of `componentMapping`. + public static final long OFFSET_componentMapping = LAYOUT.byteOffset(PathElement.groupElement("componentMapping")); + /// The memory layout of `componentMapping`. + public static final MemoryLayout ML_componentMapping = LAYOUT.select(PathElement.groupElement("componentMapping")); + /// The [VarHandle] of `imageCreateFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageCreateFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageCreateFlags")); + /// The [VarHandle] of `imageType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageType")); + /// The [VarHandle] of `imageTiling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageTiling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageTiling")); + /// The [VarHandle] of `imageUsageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageUsageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageUsageFlags")); + + /// Creates `VkVideoFormatPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoFormatPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoFormatPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatPropertiesKHR(segment); } + + /// Creates `VkVideoFormatPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoFormatPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoFormatPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoFormatPropertiesKHR` + public static VkVideoFormatPropertiesKHR alloc(SegmentAllocator allocator) { return new VkVideoFormatPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoFormatPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoFormatPropertiesKHR` + public static VkVideoFormatPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoFormatPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoFormatPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoFormatPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoFormatPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoFormatPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoFormatPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR sType(@CType("VkStructureType") int value) { VkVideoFormatPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoFormatPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoFormatPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoFormatPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkVideoFormatPropertiesKHR.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkVideoFormatPropertiesKHR.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkVideoFormatPropertiesKHR.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkVideoFormatPropertiesKHR.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR formatAt(long index, @CType("VkFormat") int value) { VkVideoFormatPropertiesKHR.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR format(@CType("VkFormat") int value) { VkVideoFormatPropertiesKHR.set_format(this.segment(), value); return this; } + + /// {@return `componentMapping` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_componentMapping(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_componentMapping, index), ML_componentMapping); } + /// {@return `componentMapping`} + /// @param segment the segment of the struct + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_componentMapping(MemorySegment segment) { return VkVideoFormatPropertiesKHR.get_componentMapping(segment, 0L); } + /// {@return `componentMapping` at the given index} + /// @param index the index + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment componentMappingAt(long index) { return VkVideoFormatPropertiesKHR.get_componentMapping(this.segment(), index); } + /// {@return `componentMapping`} + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment componentMapping() { return VkVideoFormatPropertiesKHR.get_componentMapping(this.segment()); } + /// Sets `componentMapping` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_componentMapping(MemorySegment segment, long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_componentMapping, index), ML_componentMapping.byteSize()); } + /// Sets `componentMapping` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_componentMapping(MemorySegment segment, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkVideoFormatPropertiesKHR.set_componentMapping(segment, 0L, value); } + /// Sets `componentMapping` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR componentMappingAt(long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkVideoFormatPropertiesKHR.set_componentMapping(this.segment(), index, value); return this; } + /// Sets `componentMapping` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR componentMapping(@CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkVideoFormatPropertiesKHR.set_componentMapping(this.segment(), value); return this; } + + /// {@return `imageCreateFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageCreateFlags") int get_imageCreateFlags(MemorySegment segment, long index) { return (int) VH_imageCreateFlags.get(segment, 0L, index); } + /// {@return `imageCreateFlags`} + /// @param segment the segment of the struct + public static @CType("VkImageCreateFlags") int get_imageCreateFlags(MemorySegment segment) { return VkVideoFormatPropertiesKHR.get_imageCreateFlags(segment, 0L); } + /// {@return `imageCreateFlags` at the given index} + /// @param index the index + public @CType("VkImageCreateFlags") int imageCreateFlagsAt(long index) { return VkVideoFormatPropertiesKHR.get_imageCreateFlags(this.segment(), index); } + /// {@return `imageCreateFlags`} + public @CType("VkImageCreateFlags") int imageCreateFlags() { return VkVideoFormatPropertiesKHR.get_imageCreateFlags(this.segment()); } + /// Sets `imageCreateFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageCreateFlags(MemorySegment segment, long index, @CType("VkImageCreateFlags") int value) { VH_imageCreateFlags.set(segment, 0L, index, value); } + /// Sets `imageCreateFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageCreateFlags(MemorySegment segment, @CType("VkImageCreateFlags") int value) { VkVideoFormatPropertiesKHR.set_imageCreateFlags(segment, 0L, value); } + /// Sets `imageCreateFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR imageCreateFlagsAt(long index, @CType("VkImageCreateFlags") int value) { VkVideoFormatPropertiesKHR.set_imageCreateFlags(this.segment(), index, value); return this; } + /// Sets `imageCreateFlags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR imageCreateFlags(@CType("VkImageCreateFlags") int value) { VkVideoFormatPropertiesKHR.set_imageCreateFlags(this.segment(), value); return this; } + + /// {@return `imageType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageType") int get_imageType(MemorySegment segment, long index) { return (int) VH_imageType.get(segment, 0L, index); } + /// {@return `imageType`} + /// @param segment the segment of the struct + public static @CType("VkImageType") int get_imageType(MemorySegment segment) { return VkVideoFormatPropertiesKHR.get_imageType(segment, 0L); } + /// {@return `imageType` at the given index} + /// @param index the index + public @CType("VkImageType") int imageTypeAt(long index) { return VkVideoFormatPropertiesKHR.get_imageType(this.segment(), index); } + /// {@return `imageType`} + public @CType("VkImageType") int imageType() { return VkVideoFormatPropertiesKHR.get_imageType(this.segment()); } + /// Sets `imageType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageType(MemorySegment segment, long index, @CType("VkImageType") int value) { VH_imageType.set(segment, 0L, index, value); } + /// Sets `imageType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageType(MemorySegment segment, @CType("VkImageType") int value) { VkVideoFormatPropertiesKHR.set_imageType(segment, 0L, value); } + /// Sets `imageType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR imageTypeAt(long index, @CType("VkImageType") int value) { VkVideoFormatPropertiesKHR.set_imageType(this.segment(), index, value); return this; } + /// Sets `imageType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR imageType(@CType("VkImageType") int value) { VkVideoFormatPropertiesKHR.set_imageType(this.segment(), value); return this; } + + /// {@return `imageTiling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageTiling") int get_imageTiling(MemorySegment segment, long index) { return (int) VH_imageTiling.get(segment, 0L, index); } + /// {@return `imageTiling`} + /// @param segment the segment of the struct + public static @CType("VkImageTiling") int get_imageTiling(MemorySegment segment) { return VkVideoFormatPropertiesKHR.get_imageTiling(segment, 0L); } + /// {@return `imageTiling` at the given index} + /// @param index the index + public @CType("VkImageTiling") int imageTilingAt(long index) { return VkVideoFormatPropertiesKHR.get_imageTiling(this.segment(), index); } + /// {@return `imageTiling`} + public @CType("VkImageTiling") int imageTiling() { return VkVideoFormatPropertiesKHR.get_imageTiling(this.segment()); } + /// Sets `imageTiling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageTiling(MemorySegment segment, long index, @CType("VkImageTiling") int value) { VH_imageTiling.set(segment, 0L, index, value); } + /// Sets `imageTiling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageTiling(MemorySegment segment, @CType("VkImageTiling") int value) { VkVideoFormatPropertiesKHR.set_imageTiling(segment, 0L, value); } + /// Sets `imageTiling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR imageTilingAt(long index, @CType("VkImageTiling") int value) { VkVideoFormatPropertiesKHR.set_imageTiling(this.segment(), index, value); return this; } + /// Sets `imageTiling` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR imageTiling(@CType("VkImageTiling") int value) { VkVideoFormatPropertiesKHR.set_imageTiling(this.segment(), value); return this; } + + /// {@return `imageUsageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_imageUsageFlags(MemorySegment segment, long index) { return (int) VH_imageUsageFlags.get(segment, 0L, index); } + /// {@return `imageUsageFlags`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_imageUsageFlags(MemorySegment segment) { return VkVideoFormatPropertiesKHR.get_imageUsageFlags(segment, 0L); } + /// {@return `imageUsageFlags` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int imageUsageFlagsAt(long index) { return VkVideoFormatPropertiesKHR.get_imageUsageFlags(this.segment(), index); } + /// {@return `imageUsageFlags`} + public @CType("VkImageUsageFlags") int imageUsageFlags() { return VkVideoFormatPropertiesKHR.get_imageUsageFlags(this.segment()); } + /// Sets `imageUsageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageUsageFlags(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_imageUsageFlags.set(segment, 0L, index, value); } + /// Sets `imageUsageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageUsageFlags(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkVideoFormatPropertiesKHR.set_imageUsageFlags(segment, 0L, value); } + /// Sets `imageUsageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR imageUsageFlagsAt(long index, @CType("VkImageUsageFlags") int value) { VkVideoFormatPropertiesKHR.set_imageUsageFlags(this.segment(), index, value); return this; } + /// Sets `imageUsageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatPropertiesKHR imageUsageFlags(@CType("VkImageUsageFlags") int value) { VkVideoFormatPropertiesKHR.set_imageUsageFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatQuantizationMapPropertiesKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatQuantizationMapPropertiesKHR.java new file mode 100644 index 00000000..a73bc3d8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoFormatQuantizationMapPropertiesKHR.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### quantizationMapTexelSize +/// [Byte offset][#OFFSET_quantizationMapTexelSize] - [Memory layout][#ML_quantizationMapTexelSize] - [Getter][#quantizationMapTexelSize()] - [Setter][#quantizationMapTexelSize(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoFormatQuantizationMapPropertiesKHR { +/// VkStructureType sType; +/// void * pNext; +/// VkExtent2D quantizationMapTexelSize; +/// } VkVideoFormatQuantizationMapPropertiesKHR; +/// ``` +public final class VkVideoFormatQuantizationMapPropertiesKHR extends Struct { + /// The struct layout of `VkVideoFormatQuantizationMapPropertiesKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("quantizationMapTexelSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `quantizationMapTexelSize`. + public static final long OFFSET_quantizationMapTexelSize = LAYOUT.byteOffset(PathElement.groupElement("quantizationMapTexelSize")); + /// The memory layout of `quantizationMapTexelSize`. + public static final MemoryLayout ML_quantizationMapTexelSize = LAYOUT.select(PathElement.groupElement("quantizationMapTexelSize")); + + /// Creates `VkVideoFormatQuantizationMapPropertiesKHR` with the given segment. + /// @param segment the memory segment + public VkVideoFormatQuantizationMapPropertiesKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoFormatQuantizationMapPropertiesKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatQuantizationMapPropertiesKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatQuantizationMapPropertiesKHR(segment); } + + /// Creates `VkVideoFormatQuantizationMapPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatQuantizationMapPropertiesKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatQuantizationMapPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoFormatQuantizationMapPropertiesKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoFormatQuantizationMapPropertiesKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoFormatQuantizationMapPropertiesKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoFormatQuantizationMapPropertiesKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoFormatQuantizationMapPropertiesKHR` + public static VkVideoFormatQuantizationMapPropertiesKHR alloc(SegmentAllocator allocator) { return new VkVideoFormatQuantizationMapPropertiesKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoFormatQuantizationMapPropertiesKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoFormatQuantizationMapPropertiesKHR` + public static VkVideoFormatQuantizationMapPropertiesKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoFormatQuantizationMapPropertiesKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoFormatQuantizationMapPropertiesKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoFormatQuantizationMapPropertiesKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoFormatQuantizationMapPropertiesKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoFormatQuantizationMapPropertiesKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatQuantizationMapPropertiesKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoFormatQuantizationMapPropertiesKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatQuantizationMapPropertiesKHR sType(@CType("VkStructureType") int value) { VkVideoFormatQuantizationMapPropertiesKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoFormatQuantizationMapPropertiesKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoFormatQuantizationMapPropertiesKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoFormatQuantizationMapPropertiesKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatQuantizationMapPropertiesKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatQuantizationMapPropertiesKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatQuantizationMapPropertiesKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatQuantizationMapPropertiesKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoFormatQuantizationMapPropertiesKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `quantizationMapTexelSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_quantizationMapTexelSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_quantizationMapTexelSize, index), ML_quantizationMapTexelSize); } + /// {@return `quantizationMapTexelSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_quantizationMapTexelSize(MemorySegment segment) { return VkVideoFormatQuantizationMapPropertiesKHR.get_quantizationMapTexelSize(segment, 0L); } + /// {@return `quantizationMapTexelSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment quantizationMapTexelSizeAt(long index) { return VkVideoFormatQuantizationMapPropertiesKHR.get_quantizationMapTexelSize(this.segment(), index); } + /// {@return `quantizationMapTexelSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment quantizationMapTexelSize() { return VkVideoFormatQuantizationMapPropertiesKHR.get_quantizationMapTexelSize(this.segment()); } + /// Sets `quantizationMapTexelSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_quantizationMapTexelSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_quantizationMapTexelSize, index), ML_quantizationMapTexelSize.byteSize()); } + /// Sets `quantizationMapTexelSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_quantizationMapTexelSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoFormatQuantizationMapPropertiesKHR.set_quantizationMapTexelSize(segment, 0L, value); } + /// Sets `quantizationMapTexelSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoFormatQuantizationMapPropertiesKHR quantizationMapTexelSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoFormatQuantizationMapPropertiesKHR.set_quantizationMapTexelSize(this.segment(), index, value); return this; } + /// Sets `quantizationMapTexelSize` with the given value. + /// @param value the value + /// @return `this` + public VkVideoFormatQuantizationMapPropertiesKHR quantizationMapTexelSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoFormatQuantizationMapPropertiesKHR.set_quantizationMapTexelSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoInlineQueryInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoInlineQueryInfoKHR.java new file mode 100644 index 00000000..3cd0b29b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoInlineQueryInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### queryPool +/// [VarHandle][#VH_queryPool] - [Getter][#queryPool()] - [Setter][#queryPool(java.lang.foreign.MemorySegment)] +/// ### firstQuery +/// [VarHandle][#VH_firstQuery] - [Getter][#firstQuery()] - [Setter][#firstQuery(int)] +/// ### queryCount +/// [VarHandle][#VH_queryCount] - [Getter][#queryCount()] - [Setter][#queryCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoInlineQueryInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkQueryPool queryPool; +/// uint32_t firstQuery; +/// uint32_t queryCount; +/// } VkVideoInlineQueryInfoKHR; +/// ``` +public final class VkVideoInlineQueryInfoKHR extends Struct { + /// The struct layout of `VkVideoInlineQueryInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("queryPool"), + ValueLayout.JAVA_INT.withName("firstQuery"), + ValueLayout.JAVA_INT.withName("queryCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `queryPool` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_queryPool = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queryPool")); + /// The [VarHandle] of `firstQuery` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstQuery = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstQuery")); + /// The [VarHandle] of `queryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queryCount")); + + /// Creates `VkVideoInlineQueryInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoInlineQueryInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoInlineQueryInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoInlineQueryInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoInlineQueryInfoKHR(segment); } + + /// Creates `VkVideoInlineQueryInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoInlineQueryInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoInlineQueryInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoInlineQueryInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoInlineQueryInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoInlineQueryInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoInlineQueryInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoInlineQueryInfoKHR` + public static VkVideoInlineQueryInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoInlineQueryInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoInlineQueryInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoInlineQueryInfoKHR` + public static VkVideoInlineQueryInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoInlineQueryInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoInlineQueryInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoInlineQueryInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoInlineQueryInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoInlineQueryInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoInlineQueryInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoInlineQueryInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoInlineQueryInfoKHR sType(@CType("VkStructureType") int value) { VkVideoInlineQueryInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoInlineQueryInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoInlineQueryInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoInlineQueryInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoInlineQueryInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoInlineQueryInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoInlineQueryInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoInlineQueryInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoInlineQueryInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `queryPool` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueryPool") java.lang.foreign.MemorySegment get_queryPool(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_queryPool.get(segment, 0L, index); } + /// {@return `queryPool`} + /// @param segment the segment of the struct + public static @CType("VkQueryPool") java.lang.foreign.MemorySegment get_queryPool(MemorySegment segment) { return VkVideoInlineQueryInfoKHR.get_queryPool(segment, 0L); } + /// {@return `queryPool` at the given index} + /// @param index the index + public @CType("VkQueryPool") java.lang.foreign.MemorySegment queryPoolAt(long index) { return VkVideoInlineQueryInfoKHR.get_queryPool(this.segment(), index); } + /// {@return `queryPool`} + public @CType("VkQueryPool") java.lang.foreign.MemorySegment queryPool() { return VkVideoInlineQueryInfoKHR.get_queryPool(this.segment()); } + /// Sets `queryPool` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queryPool(MemorySegment segment, long index, @CType("VkQueryPool") java.lang.foreign.MemorySegment value) { VH_queryPool.set(segment, 0L, index, value); } + /// Sets `queryPool` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queryPool(MemorySegment segment, @CType("VkQueryPool") java.lang.foreign.MemorySegment value) { VkVideoInlineQueryInfoKHR.set_queryPool(segment, 0L, value); } + /// Sets `queryPool` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoInlineQueryInfoKHR queryPoolAt(long index, @CType("VkQueryPool") java.lang.foreign.MemorySegment value) { VkVideoInlineQueryInfoKHR.set_queryPool(this.segment(), index, value); return this; } + /// Sets `queryPool` with the given value. + /// @param value the value + /// @return `this` + public VkVideoInlineQueryInfoKHR queryPool(@CType("VkQueryPool") java.lang.foreign.MemorySegment value) { VkVideoInlineQueryInfoKHR.set_queryPool(this.segment(), value); return this; } + + /// {@return `firstQuery` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstQuery(MemorySegment segment, long index) { return (int) VH_firstQuery.get(segment, 0L, index); } + /// {@return `firstQuery`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstQuery(MemorySegment segment) { return VkVideoInlineQueryInfoKHR.get_firstQuery(segment, 0L); } + /// {@return `firstQuery` at the given index} + /// @param index the index + public @CType("uint32_t") int firstQueryAt(long index) { return VkVideoInlineQueryInfoKHR.get_firstQuery(this.segment(), index); } + /// {@return `firstQuery`} + public @CType("uint32_t") int firstQuery() { return VkVideoInlineQueryInfoKHR.get_firstQuery(this.segment()); } + /// Sets `firstQuery` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstQuery(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstQuery.set(segment, 0L, index, value); } + /// Sets `firstQuery` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstQuery(MemorySegment segment, @CType("uint32_t") int value) { VkVideoInlineQueryInfoKHR.set_firstQuery(segment, 0L, value); } + /// Sets `firstQuery` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoInlineQueryInfoKHR firstQueryAt(long index, @CType("uint32_t") int value) { VkVideoInlineQueryInfoKHR.set_firstQuery(this.segment(), index, value); return this; } + /// Sets `firstQuery` with the given value. + /// @param value the value + /// @return `this` + public VkVideoInlineQueryInfoKHR firstQuery(@CType("uint32_t") int value) { VkVideoInlineQueryInfoKHR.set_firstQuery(this.segment(), value); return this; } + + /// {@return `queryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queryCount(MemorySegment segment, long index) { return (int) VH_queryCount.get(segment, 0L, index); } + /// {@return `queryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queryCount(MemorySegment segment) { return VkVideoInlineQueryInfoKHR.get_queryCount(segment, 0L); } + /// {@return `queryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queryCountAt(long index) { return VkVideoInlineQueryInfoKHR.get_queryCount(this.segment(), index); } + /// {@return `queryCount`} + public @CType("uint32_t") int queryCount() { return VkVideoInlineQueryInfoKHR.get_queryCount(this.segment()); } + /// Sets `queryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queryCount.set(segment, 0L, index, value); } + /// Sets `queryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queryCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoInlineQueryInfoKHR.set_queryCount(segment, 0L, value); } + /// Sets `queryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoInlineQueryInfoKHR queryCountAt(long index, @CType("uint32_t") int value) { VkVideoInlineQueryInfoKHR.set_queryCount(this.segment(), index, value); return this; } + /// Sets `queryCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoInlineQueryInfoKHR queryCount(@CType("uint32_t") int value) { VkVideoInlineQueryInfoKHR.set_queryCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoPictureResourceInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoPictureResourceInfoKHR.java new file mode 100644 index 00000000..7b15efe1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoPictureResourceInfoKHR.java @@ -0,0 +1,300 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### codedOffset +/// [Byte offset][#OFFSET_codedOffset] - [Memory layout][#ML_codedOffset] - [Getter][#codedOffset()] - [Setter][#codedOffset(java.lang.foreign.MemorySegment)] +/// ### codedExtent +/// [Byte offset][#OFFSET_codedExtent] - [Memory layout][#ML_codedExtent] - [Getter][#codedExtent()] - [Setter][#codedExtent(java.lang.foreign.MemorySegment)] +/// ### baseArrayLayer +/// [VarHandle][#VH_baseArrayLayer] - [Getter][#baseArrayLayer()] - [Setter][#baseArrayLayer(int)] +/// ### imageViewBinding +/// [VarHandle][#VH_imageViewBinding] - [Getter][#imageViewBinding()] - [Setter][#imageViewBinding(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoPictureResourceInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkOffset2D codedOffset; +/// VkExtent2D codedExtent; +/// uint32_t baseArrayLayer; +/// VkImageView imageViewBinding; +/// } VkVideoPictureResourceInfoKHR; +/// ``` +public final class VkVideoPictureResourceInfoKHR extends Struct { + /// The struct layout of `VkVideoPictureResourceInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkOffset2D.LAYOUT.withName("codedOffset"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("codedExtent"), + ValueLayout.JAVA_INT.withName("baseArrayLayer"), + ValueLayout.ADDRESS.withName("imageViewBinding") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `codedOffset`. + public static final long OFFSET_codedOffset = LAYOUT.byteOffset(PathElement.groupElement("codedOffset")); + /// The memory layout of `codedOffset`. + public static final MemoryLayout ML_codedOffset = LAYOUT.select(PathElement.groupElement("codedOffset")); + /// The byte offset of `codedExtent`. + public static final long OFFSET_codedExtent = LAYOUT.byteOffset(PathElement.groupElement("codedExtent")); + /// The memory layout of `codedExtent`. + public static final MemoryLayout ML_codedExtent = LAYOUT.select(PathElement.groupElement("codedExtent")); + /// The [VarHandle] of `baseArrayLayer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_baseArrayLayer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("baseArrayLayer")); + /// The [VarHandle] of `imageViewBinding` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_imageViewBinding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageViewBinding")); + + /// Creates `VkVideoPictureResourceInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoPictureResourceInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoPictureResourceInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoPictureResourceInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoPictureResourceInfoKHR(segment); } + + /// Creates `VkVideoPictureResourceInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoPictureResourceInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoPictureResourceInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoPictureResourceInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoPictureResourceInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoPictureResourceInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoPictureResourceInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoPictureResourceInfoKHR` + public static VkVideoPictureResourceInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoPictureResourceInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoPictureResourceInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoPictureResourceInfoKHR` + public static VkVideoPictureResourceInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoPictureResourceInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoPictureResourceInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoPictureResourceInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoPictureResourceInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoPictureResourceInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoPictureResourceInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR sType(@CType("VkStructureType") int value) { VkVideoPictureResourceInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoPictureResourceInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoPictureResourceInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoPictureResourceInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `codedOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_codedOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_codedOffset, index), ML_codedOffset); } + /// {@return `codedOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_codedOffset(MemorySegment segment) { return VkVideoPictureResourceInfoKHR.get_codedOffset(segment, 0L); } + /// {@return `codedOffset` at the given index} + /// @param index the index + public @CType("VkOffset2D") java.lang.foreign.MemorySegment codedOffsetAt(long index) { return VkVideoPictureResourceInfoKHR.get_codedOffset(this.segment(), index); } + /// {@return `codedOffset`} + public @CType("VkOffset2D") java.lang.foreign.MemorySegment codedOffset() { return VkVideoPictureResourceInfoKHR.get_codedOffset(this.segment()); } + /// Sets `codedOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_codedOffset(MemorySegment segment, long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_codedOffset, index), ML_codedOffset.byteSize()); } + /// Sets `codedOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_codedOffset(MemorySegment segment, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_codedOffset(segment, 0L, value); } + /// Sets `codedOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR codedOffsetAt(long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_codedOffset(this.segment(), index, value); return this; } + /// Sets `codedOffset` with the given value. + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR codedOffset(@CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_codedOffset(this.segment(), value); return this; } + + /// {@return `codedExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_codedExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_codedExtent, index), ML_codedExtent); } + /// {@return `codedExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_codedExtent(MemorySegment segment) { return VkVideoPictureResourceInfoKHR.get_codedExtent(segment, 0L); } + /// {@return `codedExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment codedExtentAt(long index) { return VkVideoPictureResourceInfoKHR.get_codedExtent(this.segment(), index); } + /// {@return `codedExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment codedExtent() { return VkVideoPictureResourceInfoKHR.get_codedExtent(this.segment()); } + /// Sets `codedExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_codedExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_codedExtent, index), ML_codedExtent.byteSize()); } + /// Sets `codedExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_codedExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_codedExtent(segment, 0L, value); } + /// Sets `codedExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR codedExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_codedExtent(this.segment(), index, value); return this; } + /// Sets `codedExtent` with the given value. + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR codedExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_codedExtent(this.segment(), value); return this; } + + /// {@return `baseArrayLayer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_baseArrayLayer(MemorySegment segment, long index) { return (int) VH_baseArrayLayer.get(segment, 0L, index); } + /// {@return `baseArrayLayer`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_baseArrayLayer(MemorySegment segment) { return VkVideoPictureResourceInfoKHR.get_baseArrayLayer(segment, 0L); } + /// {@return `baseArrayLayer` at the given index} + /// @param index the index + public @CType("uint32_t") int baseArrayLayerAt(long index) { return VkVideoPictureResourceInfoKHR.get_baseArrayLayer(this.segment(), index); } + /// {@return `baseArrayLayer`} + public @CType("uint32_t") int baseArrayLayer() { return VkVideoPictureResourceInfoKHR.get_baseArrayLayer(this.segment()); } + /// Sets `baseArrayLayer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_baseArrayLayer(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_baseArrayLayer.set(segment, 0L, index, value); } + /// Sets `baseArrayLayer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_baseArrayLayer(MemorySegment segment, @CType("uint32_t") int value) { VkVideoPictureResourceInfoKHR.set_baseArrayLayer(segment, 0L, value); } + /// Sets `baseArrayLayer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR baseArrayLayerAt(long index, @CType("uint32_t") int value) { VkVideoPictureResourceInfoKHR.set_baseArrayLayer(this.segment(), index, value); return this; } + /// Sets `baseArrayLayer` with the given value. + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR baseArrayLayer(@CType("uint32_t") int value) { VkVideoPictureResourceInfoKHR.set_baseArrayLayer(this.segment(), value); return this; } + + /// {@return `imageViewBinding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageViewBinding(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_imageViewBinding.get(segment, 0L, index); } + /// {@return `imageViewBinding`} + /// @param segment the segment of the struct + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageViewBinding(MemorySegment segment) { return VkVideoPictureResourceInfoKHR.get_imageViewBinding(segment, 0L); } + /// {@return `imageViewBinding` at the given index} + /// @param index the index + public @CType("VkImageView") java.lang.foreign.MemorySegment imageViewBindingAt(long index) { return VkVideoPictureResourceInfoKHR.get_imageViewBinding(this.segment(), index); } + /// {@return `imageViewBinding`} + public @CType("VkImageView") java.lang.foreign.MemorySegment imageViewBinding() { return VkVideoPictureResourceInfoKHR.get_imageViewBinding(this.segment()); } + /// Sets `imageViewBinding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageViewBinding(MemorySegment segment, long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VH_imageViewBinding.set(segment, 0L, index, value); } + /// Sets `imageViewBinding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageViewBinding(MemorySegment segment, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_imageViewBinding(segment, 0L, value); } + /// Sets `imageViewBinding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR imageViewBindingAt(long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_imageViewBinding(this.segment(), index, value); return this; } + /// Sets `imageViewBinding` with the given value. + /// @param value the value + /// @return `this` + public VkVideoPictureResourceInfoKHR imageViewBinding(@CType("VkImageView") java.lang.foreign.MemorySegment value) { VkVideoPictureResourceInfoKHR.set_imageViewBinding(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoProfileInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoProfileInfoKHR.java new file mode 100644 index 00000000..393acf2b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoProfileInfoKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### videoCodecOperation +/// [VarHandle][#VH_videoCodecOperation] - [Getter][#videoCodecOperation()] - [Setter][#videoCodecOperation(int)] +/// ### chromaSubsampling +/// [VarHandle][#VH_chromaSubsampling] - [Getter][#chromaSubsampling()] - [Setter][#chromaSubsampling(int)] +/// ### lumaBitDepth +/// [VarHandle][#VH_lumaBitDepth] - [Getter][#lumaBitDepth()] - [Setter][#lumaBitDepth(int)] +/// ### chromaBitDepth +/// [VarHandle][#VH_chromaBitDepth] - [Getter][#chromaBitDepth()] - [Setter][#chromaBitDepth(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoProfileInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoCodecOperationFlagBitsKHR videoCodecOperation; +/// VkVideoChromaSubsamplingFlagsKHR chromaSubsampling; +/// VkVideoComponentBitDepthFlagsKHR lumaBitDepth; +/// VkVideoComponentBitDepthFlagsKHR chromaBitDepth; +/// } VkVideoProfileInfoKHR; +/// ``` +public final class VkVideoProfileInfoKHR extends Struct { + /// The struct layout of `VkVideoProfileInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("videoCodecOperation"), + ValueLayout.JAVA_INT.withName("chromaSubsampling"), + ValueLayout.JAVA_INT.withName("lumaBitDepth"), + ValueLayout.JAVA_INT.withName("chromaBitDepth") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `videoCodecOperation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_videoCodecOperation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoCodecOperation")); + /// The [VarHandle] of `chromaSubsampling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chromaSubsampling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chromaSubsampling")); + /// The [VarHandle] of `lumaBitDepth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_lumaBitDepth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lumaBitDepth")); + /// The [VarHandle] of `chromaBitDepth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chromaBitDepth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chromaBitDepth")); + + /// Creates `VkVideoProfileInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoProfileInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoProfileInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoProfileInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoProfileInfoKHR(segment); } + + /// Creates `VkVideoProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoProfileInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoProfileInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoProfileInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoProfileInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoProfileInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoProfileInfoKHR` + public static VkVideoProfileInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoProfileInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoProfileInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoProfileInfoKHR` + public static VkVideoProfileInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoProfileInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoProfileInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoProfileInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoProfileInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoProfileInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoProfileInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR sType(@CType("VkStructureType") int value) { VkVideoProfileInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoProfileInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoProfileInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoProfileInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoProfileInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoProfileInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoProfileInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `videoCodecOperation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoCodecOperationFlagBitsKHR") int get_videoCodecOperation(MemorySegment segment, long index) { return (int) VH_videoCodecOperation.get(segment, 0L, index); } + /// {@return `videoCodecOperation`} + /// @param segment the segment of the struct + public static @CType("VkVideoCodecOperationFlagBitsKHR") int get_videoCodecOperation(MemorySegment segment) { return VkVideoProfileInfoKHR.get_videoCodecOperation(segment, 0L); } + /// {@return `videoCodecOperation` at the given index} + /// @param index the index + public @CType("VkVideoCodecOperationFlagBitsKHR") int videoCodecOperationAt(long index) { return VkVideoProfileInfoKHR.get_videoCodecOperation(this.segment(), index); } + /// {@return `videoCodecOperation`} + public @CType("VkVideoCodecOperationFlagBitsKHR") int videoCodecOperation() { return VkVideoProfileInfoKHR.get_videoCodecOperation(this.segment()); } + /// Sets `videoCodecOperation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoCodecOperation(MemorySegment segment, long index, @CType("VkVideoCodecOperationFlagBitsKHR") int value) { VH_videoCodecOperation.set(segment, 0L, index, value); } + /// Sets `videoCodecOperation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoCodecOperation(MemorySegment segment, @CType("VkVideoCodecOperationFlagBitsKHR") int value) { VkVideoProfileInfoKHR.set_videoCodecOperation(segment, 0L, value); } + /// Sets `videoCodecOperation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR videoCodecOperationAt(long index, @CType("VkVideoCodecOperationFlagBitsKHR") int value) { VkVideoProfileInfoKHR.set_videoCodecOperation(this.segment(), index, value); return this; } + /// Sets `videoCodecOperation` with the given value. + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR videoCodecOperation(@CType("VkVideoCodecOperationFlagBitsKHR") int value) { VkVideoProfileInfoKHR.set_videoCodecOperation(this.segment(), value); return this; } + + /// {@return `chromaSubsampling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoChromaSubsamplingFlagsKHR") int get_chromaSubsampling(MemorySegment segment, long index) { return (int) VH_chromaSubsampling.get(segment, 0L, index); } + /// {@return `chromaSubsampling`} + /// @param segment the segment of the struct + public static @CType("VkVideoChromaSubsamplingFlagsKHR") int get_chromaSubsampling(MemorySegment segment) { return VkVideoProfileInfoKHR.get_chromaSubsampling(segment, 0L); } + /// {@return `chromaSubsampling` at the given index} + /// @param index the index + public @CType("VkVideoChromaSubsamplingFlagsKHR") int chromaSubsamplingAt(long index) { return VkVideoProfileInfoKHR.get_chromaSubsampling(this.segment(), index); } + /// {@return `chromaSubsampling`} + public @CType("VkVideoChromaSubsamplingFlagsKHR") int chromaSubsampling() { return VkVideoProfileInfoKHR.get_chromaSubsampling(this.segment()); } + /// Sets `chromaSubsampling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chromaSubsampling(MemorySegment segment, long index, @CType("VkVideoChromaSubsamplingFlagsKHR") int value) { VH_chromaSubsampling.set(segment, 0L, index, value); } + /// Sets `chromaSubsampling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chromaSubsampling(MemorySegment segment, @CType("VkVideoChromaSubsamplingFlagsKHR") int value) { VkVideoProfileInfoKHR.set_chromaSubsampling(segment, 0L, value); } + /// Sets `chromaSubsampling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR chromaSubsamplingAt(long index, @CType("VkVideoChromaSubsamplingFlagsKHR") int value) { VkVideoProfileInfoKHR.set_chromaSubsampling(this.segment(), index, value); return this; } + /// Sets `chromaSubsampling` with the given value. + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR chromaSubsampling(@CType("VkVideoChromaSubsamplingFlagsKHR") int value) { VkVideoProfileInfoKHR.set_chromaSubsampling(this.segment(), value); return this; } + + /// {@return `lumaBitDepth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoComponentBitDepthFlagsKHR") int get_lumaBitDepth(MemorySegment segment, long index) { return (int) VH_lumaBitDepth.get(segment, 0L, index); } + /// {@return `lumaBitDepth`} + /// @param segment the segment of the struct + public static @CType("VkVideoComponentBitDepthFlagsKHR") int get_lumaBitDepth(MemorySegment segment) { return VkVideoProfileInfoKHR.get_lumaBitDepth(segment, 0L); } + /// {@return `lumaBitDepth` at the given index} + /// @param index the index + public @CType("VkVideoComponentBitDepthFlagsKHR") int lumaBitDepthAt(long index) { return VkVideoProfileInfoKHR.get_lumaBitDepth(this.segment(), index); } + /// {@return `lumaBitDepth`} + public @CType("VkVideoComponentBitDepthFlagsKHR") int lumaBitDepth() { return VkVideoProfileInfoKHR.get_lumaBitDepth(this.segment()); } + /// Sets `lumaBitDepth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lumaBitDepth(MemorySegment segment, long index, @CType("VkVideoComponentBitDepthFlagsKHR") int value) { VH_lumaBitDepth.set(segment, 0L, index, value); } + /// Sets `lumaBitDepth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lumaBitDepth(MemorySegment segment, @CType("VkVideoComponentBitDepthFlagsKHR") int value) { VkVideoProfileInfoKHR.set_lumaBitDepth(segment, 0L, value); } + /// Sets `lumaBitDepth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR lumaBitDepthAt(long index, @CType("VkVideoComponentBitDepthFlagsKHR") int value) { VkVideoProfileInfoKHR.set_lumaBitDepth(this.segment(), index, value); return this; } + /// Sets `lumaBitDepth` with the given value. + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR lumaBitDepth(@CType("VkVideoComponentBitDepthFlagsKHR") int value) { VkVideoProfileInfoKHR.set_lumaBitDepth(this.segment(), value); return this; } + + /// {@return `chromaBitDepth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoComponentBitDepthFlagsKHR") int get_chromaBitDepth(MemorySegment segment, long index) { return (int) VH_chromaBitDepth.get(segment, 0L, index); } + /// {@return `chromaBitDepth`} + /// @param segment the segment of the struct + public static @CType("VkVideoComponentBitDepthFlagsKHR") int get_chromaBitDepth(MemorySegment segment) { return VkVideoProfileInfoKHR.get_chromaBitDepth(segment, 0L); } + /// {@return `chromaBitDepth` at the given index} + /// @param index the index + public @CType("VkVideoComponentBitDepthFlagsKHR") int chromaBitDepthAt(long index) { return VkVideoProfileInfoKHR.get_chromaBitDepth(this.segment(), index); } + /// {@return `chromaBitDepth`} + public @CType("VkVideoComponentBitDepthFlagsKHR") int chromaBitDepth() { return VkVideoProfileInfoKHR.get_chromaBitDepth(this.segment()); } + /// Sets `chromaBitDepth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chromaBitDepth(MemorySegment segment, long index, @CType("VkVideoComponentBitDepthFlagsKHR") int value) { VH_chromaBitDepth.set(segment, 0L, index, value); } + /// Sets `chromaBitDepth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chromaBitDepth(MemorySegment segment, @CType("VkVideoComponentBitDepthFlagsKHR") int value) { VkVideoProfileInfoKHR.set_chromaBitDepth(segment, 0L, value); } + /// Sets `chromaBitDepth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR chromaBitDepthAt(long index, @CType("VkVideoComponentBitDepthFlagsKHR") int value) { VkVideoProfileInfoKHR.set_chromaBitDepth(this.segment(), index, value); return this; } + /// Sets `chromaBitDepth` with the given value. + /// @param value the value + /// @return `this` + public VkVideoProfileInfoKHR chromaBitDepth(@CType("VkVideoComponentBitDepthFlagsKHR") int value) { VkVideoProfileInfoKHR.set_chromaBitDepth(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoProfileListInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoProfileListInfoKHR.java new file mode 100644 index 00000000..9181fa65 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoProfileListInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### profileCount +/// [VarHandle][#VH_profileCount] - [Getter][#profileCount()] - [Setter][#profileCount(int)] +/// ### pProfiles +/// [VarHandle][#VH_pProfiles] - [Getter][#pProfiles()] - [Setter][#pProfiles(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoProfileListInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t profileCount; +/// const VkVideoProfileInfoKHR * pProfiles; +/// } VkVideoProfileListInfoKHR; +/// ``` +public final class VkVideoProfileListInfoKHR extends Struct { + /// The struct layout of `VkVideoProfileListInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("profileCount"), + ValueLayout.ADDRESS.withName("pProfiles") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `profileCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_profileCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("profileCount")); + /// The [VarHandle] of `pProfiles` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pProfiles = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pProfiles")); + + /// Creates `VkVideoProfileListInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoProfileListInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoProfileListInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoProfileListInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoProfileListInfoKHR(segment); } + + /// Creates `VkVideoProfileListInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoProfileListInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoProfileListInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoProfileListInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoProfileListInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoProfileListInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoProfileListInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoProfileListInfoKHR` + public static VkVideoProfileListInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoProfileListInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoProfileListInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoProfileListInfoKHR` + public static VkVideoProfileListInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoProfileListInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoProfileListInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoProfileListInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoProfileListInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoProfileListInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoProfileListInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoProfileListInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoProfileListInfoKHR sType(@CType("VkStructureType") int value) { VkVideoProfileListInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoProfileListInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoProfileListInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoProfileListInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoProfileListInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoProfileListInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoProfileListInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoProfileListInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoProfileListInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `profileCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_profileCount(MemorySegment segment, long index) { return (int) VH_profileCount.get(segment, 0L, index); } + /// {@return `profileCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_profileCount(MemorySegment segment) { return VkVideoProfileListInfoKHR.get_profileCount(segment, 0L); } + /// {@return `profileCount` at the given index} + /// @param index the index + public @CType("uint32_t") int profileCountAt(long index) { return VkVideoProfileListInfoKHR.get_profileCount(this.segment(), index); } + /// {@return `profileCount`} + public @CType("uint32_t") int profileCount() { return VkVideoProfileListInfoKHR.get_profileCount(this.segment()); } + /// Sets `profileCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_profileCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_profileCount.set(segment, 0L, index, value); } + /// Sets `profileCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_profileCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoProfileListInfoKHR.set_profileCount(segment, 0L, value); } + /// Sets `profileCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoProfileListInfoKHR profileCountAt(long index, @CType("uint32_t") int value) { VkVideoProfileListInfoKHR.set_profileCount(this.segment(), index, value); return this; } + /// Sets `profileCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoProfileListInfoKHR profileCount(@CType("uint32_t") int value) { VkVideoProfileListInfoKHR.set_profileCount(this.segment(), value); return this; } + + /// {@return `pProfiles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment get_pProfiles(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pProfiles.get(segment, 0L, index); } + /// {@return `pProfiles`} + /// @param segment the segment of the struct + public static @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment get_pProfiles(MemorySegment segment) { return VkVideoProfileListInfoKHR.get_pProfiles(segment, 0L); } + /// {@return `pProfiles` at the given index} + /// @param index the index + public @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment pProfilesAt(long index) { return VkVideoProfileListInfoKHR.get_pProfiles(this.segment(), index); } + /// {@return `pProfiles`} + public @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment pProfiles() { return VkVideoProfileListInfoKHR.get_pProfiles(this.segment()); } + /// Sets `pProfiles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pProfiles(MemorySegment segment, long index, @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pProfiles.set(segment, 0L, index, value); } + /// Sets `pProfiles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pProfiles(MemorySegment segment, @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoProfileListInfoKHR.set_pProfiles(segment, 0L, value); } + /// Sets `pProfiles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoProfileListInfoKHR pProfilesAt(long index, @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoProfileListInfoKHR.set_pProfiles(this.segment(), index, value); return this; } + /// Sets `pProfiles` with the given value. + /// @param value the value + /// @return `this` + public VkVideoProfileListInfoKHR pProfiles(@CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoProfileListInfoKHR.set_pProfiles(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoReferenceSlotInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoReferenceSlotInfoKHR.java new file mode 100644 index 00000000..2785deb8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoReferenceSlotInfoKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### slotIndex +/// [VarHandle][#VH_slotIndex] - [Getter][#slotIndex()] - [Setter][#slotIndex(int)] +/// ### pPictureResource +/// [VarHandle][#VH_pPictureResource] - [Getter][#pPictureResource()] - [Setter][#pPictureResource(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoReferenceSlotInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// int32_t slotIndex; +/// const VkVideoPictureResourceInfoKHR * pPictureResource; +/// } VkVideoReferenceSlotInfoKHR; +/// ``` +public final class VkVideoReferenceSlotInfoKHR extends Struct { + /// The struct layout of `VkVideoReferenceSlotInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("slotIndex"), + ValueLayout.ADDRESS.withName("pPictureResource") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `slotIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_slotIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slotIndex")); + /// The [VarHandle] of `pPictureResource` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPictureResource = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPictureResource")); + + /// Creates `VkVideoReferenceSlotInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoReferenceSlotInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoReferenceSlotInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoReferenceSlotInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoReferenceSlotInfoKHR(segment); } + + /// Creates `VkVideoReferenceSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoReferenceSlotInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoReferenceSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoReferenceSlotInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoReferenceSlotInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoReferenceSlotInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoReferenceSlotInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoReferenceSlotInfoKHR` + public static VkVideoReferenceSlotInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoReferenceSlotInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoReferenceSlotInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoReferenceSlotInfoKHR` + public static VkVideoReferenceSlotInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoReferenceSlotInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoReferenceSlotInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoReferenceSlotInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoReferenceSlotInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoReferenceSlotInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoReferenceSlotInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoReferenceSlotInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoReferenceSlotInfoKHR sType(@CType("VkStructureType") int value) { VkVideoReferenceSlotInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoReferenceSlotInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoReferenceSlotInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoReferenceSlotInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoReferenceSlotInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoReferenceSlotInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoReferenceSlotInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoReferenceSlotInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoReferenceSlotInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `slotIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_slotIndex(MemorySegment segment, long index) { return (int) VH_slotIndex.get(segment, 0L, index); } + /// {@return `slotIndex`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_slotIndex(MemorySegment segment) { return VkVideoReferenceSlotInfoKHR.get_slotIndex(segment, 0L); } + /// {@return `slotIndex` at the given index} + /// @param index the index + public @CType("int32_t") int slotIndexAt(long index) { return VkVideoReferenceSlotInfoKHR.get_slotIndex(this.segment(), index); } + /// {@return `slotIndex`} + public @CType("int32_t") int slotIndex() { return VkVideoReferenceSlotInfoKHR.get_slotIndex(this.segment()); } + /// Sets `slotIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slotIndex(MemorySegment segment, long index, @CType("int32_t") int value) { VH_slotIndex.set(segment, 0L, index, value); } + /// Sets `slotIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slotIndex(MemorySegment segment, @CType("int32_t") int value) { VkVideoReferenceSlotInfoKHR.set_slotIndex(segment, 0L, value); } + /// Sets `slotIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoReferenceSlotInfoKHR slotIndexAt(long index, @CType("int32_t") int value) { VkVideoReferenceSlotInfoKHR.set_slotIndex(this.segment(), index, value); return this; } + /// Sets `slotIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoReferenceSlotInfoKHR slotIndex(@CType("int32_t") int value) { VkVideoReferenceSlotInfoKHR.set_slotIndex(this.segment(), value); return this; } + + /// {@return `pPictureResource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoPictureResourceInfoKHR *") java.lang.foreign.MemorySegment get_pPictureResource(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPictureResource.get(segment, 0L, index); } + /// {@return `pPictureResource`} + /// @param segment the segment of the struct + public static @CType("const VkVideoPictureResourceInfoKHR *") java.lang.foreign.MemorySegment get_pPictureResource(MemorySegment segment) { return VkVideoReferenceSlotInfoKHR.get_pPictureResource(segment, 0L); } + /// {@return `pPictureResource` at the given index} + /// @param index the index + public @CType("const VkVideoPictureResourceInfoKHR *") java.lang.foreign.MemorySegment pPictureResourceAt(long index) { return VkVideoReferenceSlotInfoKHR.get_pPictureResource(this.segment(), index); } + /// {@return `pPictureResource`} + public @CType("const VkVideoPictureResourceInfoKHR *") java.lang.foreign.MemorySegment pPictureResource() { return VkVideoReferenceSlotInfoKHR.get_pPictureResource(this.segment()); } + /// Sets `pPictureResource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPictureResource(MemorySegment segment, long index, @CType("const VkVideoPictureResourceInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pPictureResource.set(segment, 0L, index, value); } + /// Sets `pPictureResource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPictureResource(MemorySegment segment, @CType("const VkVideoPictureResourceInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoReferenceSlotInfoKHR.set_pPictureResource(segment, 0L, value); } + /// Sets `pPictureResource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoReferenceSlotInfoKHR pPictureResourceAt(long index, @CType("const VkVideoPictureResourceInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoReferenceSlotInfoKHR.set_pPictureResource(this.segment(), index, value); return this; } + /// Sets `pPictureResource` with the given value. + /// @param value the value + /// @return `this` + public VkVideoReferenceSlotInfoKHR pPictureResource(@CType("const VkVideoPictureResourceInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoReferenceSlotInfoKHR.set_pPictureResource(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionCreateInfoKHR.java new file mode 100644 index 00000000..1b4e1629 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionCreateInfoKHR.java @@ -0,0 +1,483 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### queueFamilyIndex +/// [VarHandle][#VH_queueFamilyIndex] - [Getter][#queueFamilyIndex()] - [Setter][#queueFamilyIndex(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pVideoProfile +/// [VarHandle][#VH_pVideoProfile] - [Getter][#pVideoProfile()] - [Setter][#pVideoProfile(java.lang.foreign.MemorySegment)] +/// ### pictureFormat +/// [VarHandle][#VH_pictureFormat] - [Getter][#pictureFormat()] - [Setter][#pictureFormat(int)] +/// ### maxCodedExtent +/// [Byte offset][#OFFSET_maxCodedExtent] - [Memory layout][#ML_maxCodedExtent] - [Getter][#maxCodedExtent()] - [Setter][#maxCodedExtent(java.lang.foreign.MemorySegment)] +/// ### referencePictureFormat +/// [VarHandle][#VH_referencePictureFormat] - [Getter][#referencePictureFormat()] - [Setter][#referencePictureFormat(int)] +/// ### maxDpbSlots +/// [VarHandle][#VH_maxDpbSlots] - [Getter][#maxDpbSlots()] - [Setter][#maxDpbSlots(int)] +/// ### maxActiveReferencePictures +/// [VarHandle][#VH_maxActiveReferencePictures] - [Getter][#maxActiveReferencePictures()] - [Setter][#maxActiveReferencePictures(int)] +/// ### pStdHeaderVersion +/// [VarHandle][#VH_pStdHeaderVersion] - [Getter][#pStdHeaderVersion()] - [Setter][#pStdHeaderVersion(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoSessionCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t queueFamilyIndex; +/// VkVideoSessionCreateFlagsKHR flags; +/// const VkVideoProfileInfoKHR * pVideoProfile; +/// VkFormat pictureFormat; +/// VkExtent2D maxCodedExtent; +/// VkFormat referencePictureFormat; +/// uint32_t maxDpbSlots; +/// uint32_t maxActiveReferencePictures; +/// const VkExtensionProperties * pStdHeaderVersion; +/// } VkVideoSessionCreateInfoKHR; +/// ``` +public final class VkVideoSessionCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoSessionCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("queueFamilyIndex"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("pVideoProfile"), + ValueLayout.JAVA_INT.withName("pictureFormat"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxCodedExtent"), + ValueLayout.JAVA_INT.withName("referencePictureFormat"), + ValueLayout.JAVA_INT.withName("maxDpbSlots"), + ValueLayout.JAVA_INT.withName("maxActiveReferencePictures"), + ValueLayout.ADDRESS.withName("pStdHeaderVersion") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `queueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueFamilyIndex")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pVideoProfile` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVideoProfile = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVideoProfile")); + /// The [VarHandle] of `pictureFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pictureFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pictureFormat")); + /// The byte offset of `maxCodedExtent`. + public static final long OFFSET_maxCodedExtent = LAYOUT.byteOffset(PathElement.groupElement("maxCodedExtent")); + /// The memory layout of `maxCodedExtent`. + public static final MemoryLayout ML_maxCodedExtent = LAYOUT.select(PathElement.groupElement("maxCodedExtent")); + /// The [VarHandle] of `referencePictureFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_referencePictureFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("referencePictureFormat")); + /// The [VarHandle] of `maxDpbSlots` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDpbSlots = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDpbSlots")); + /// The [VarHandle] of `maxActiveReferencePictures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxActiveReferencePictures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxActiveReferencePictures")); + /// The [VarHandle] of `pStdHeaderVersion` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStdHeaderVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStdHeaderVersion")); + + /// Creates `VkVideoSessionCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoSessionCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoSessionCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionCreateInfoKHR(segment); } + + /// Creates `VkVideoSessionCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoSessionCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoSessionCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoSessionCreateInfoKHR` + public static VkVideoSessionCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoSessionCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoSessionCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoSessionCreateInfoKHR` + public static VkVideoSessionCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoSessionCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoSessionCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoSessionCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoSessionCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoSessionCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoSessionCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoSessionCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoSessionCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `queueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueFamilyIndex(MemorySegment segment, long index) { return (int) VH_queueFamilyIndex.get(segment, 0L, index); } + /// {@return `queueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueFamilyIndex(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_queueFamilyIndex(segment, 0L); } + /// {@return `queueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int queueFamilyIndexAt(long index) { return VkVideoSessionCreateInfoKHR.get_queueFamilyIndex(this.segment(), index); } + /// {@return `queueFamilyIndex`} + public @CType("uint32_t") int queueFamilyIndex() { return VkVideoSessionCreateInfoKHR.get_queueFamilyIndex(this.segment()); } + /// Sets `queueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `queueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkVideoSessionCreateInfoKHR.set_queueFamilyIndex(segment, 0L, value); } + /// Sets `queueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR queueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkVideoSessionCreateInfoKHR.set_queueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `queueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR queueFamilyIndex(@CType("uint32_t") int value) { VkVideoSessionCreateInfoKHR.set_queueFamilyIndex(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoSessionCreateFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoSessionCreateFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoSessionCreateFlagsKHR") int flagsAt(long index) { return VkVideoSessionCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoSessionCreateFlagsKHR") int flags() { return VkVideoSessionCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoSessionCreateFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoSessionCreateFlagsKHR") int value) { VkVideoSessionCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR flagsAt(long index, @CType("VkVideoSessionCreateFlagsKHR") int value) { VkVideoSessionCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR flags(@CType("VkVideoSessionCreateFlagsKHR") int value) { VkVideoSessionCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `pVideoProfile` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment get_pVideoProfile(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVideoProfile.get(segment, 0L, index); } + /// {@return `pVideoProfile`} + /// @param segment the segment of the struct + public static @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment get_pVideoProfile(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_pVideoProfile(segment, 0L); } + /// {@return `pVideoProfile` at the given index} + /// @param index the index + public @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment pVideoProfileAt(long index) { return VkVideoSessionCreateInfoKHR.get_pVideoProfile(this.segment(), index); } + /// {@return `pVideoProfile`} + public @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment pVideoProfile() { return VkVideoSessionCreateInfoKHR.get_pVideoProfile(this.segment()); } + /// Sets `pVideoProfile` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVideoProfile(MemorySegment segment, long index, @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VH_pVideoProfile.set(segment, 0L, index, value); } + /// Sets `pVideoProfile` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVideoProfile(MemorySegment segment, @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_pVideoProfile(segment, 0L, value); } + /// Sets `pVideoProfile` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR pVideoProfileAt(long index, @CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_pVideoProfile(this.segment(), index, value); return this; } + /// Sets `pVideoProfile` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR pVideoProfile(@CType("const VkVideoProfileInfoKHR *") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_pVideoProfile(this.segment(), value); return this; } + + /// {@return `pictureFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_pictureFormat(MemorySegment segment, long index) { return (int) VH_pictureFormat.get(segment, 0L, index); } + /// {@return `pictureFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_pictureFormat(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_pictureFormat(segment, 0L); } + /// {@return `pictureFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int pictureFormatAt(long index) { return VkVideoSessionCreateInfoKHR.get_pictureFormat(this.segment(), index); } + /// {@return `pictureFormat`} + public @CType("VkFormat") int pictureFormat() { return VkVideoSessionCreateInfoKHR.get_pictureFormat(this.segment()); } + /// Sets `pictureFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pictureFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_pictureFormat.set(segment, 0L, index, value); } + /// Sets `pictureFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pictureFormat(MemorySegment segment, @CType("VkFormat") int value) { VkVideoSessionCreateInfoKHR.set_pictureFormat(segment, 0L, value); } + /// Sets `pictureFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR pictureFormatAt(long index, @CType("VkFormat") int value) { VkVideoSessionCreateInfoKHR.set_pictureFormat(this.segment(), index, value); return this; } + /// Sets `pictureFormat` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR pictureFormat(@CType("VkFormat") int value) { VkVideoSessionCreateInfoKHR.set_pictureFormat(this.segment(), value); return this; } + + /// {@return `maxCodedExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxCodedExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxCodedExtent, index), ML_maxCodedExtent); } + /// {@return `maxCodedExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxCodedExtent(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_maxCodedExtent(segment, 0L); } + /// {@return `maxCodedExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxCodedExtentAt(long index) { return VkVideoSessionCreateInfoKHR.get_maxCodedExtent(this.segment(), index); } + /// {@return `maxCodedExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxCodedExtent() { return VkVideoSessionCreateInfoKHR.get_maxCodedExtent(this.segment()); } + /// Sets `maxCodedExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCodedExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxCodedExtent, index), ML_maxCodedExtent.byteSize()); } + /// Sets `maxCodedExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCodedExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_maxCodedExtent(segment, 0L, value); } + /// Sets `maxCodedExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR maxCodedExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_maxCodedExtent(this.segment(), index, value); return this; } + /// Sets `maxCodedExtent` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR maxCodedExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_maxCodedExtent(this.segment(), value); return this; } + + /// {@return `referencePictureFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_referencePictureFormat(MemorySegment segment, long index) { return (int) VH_referencePictureFormat.get(segment, 0L, index); } + /// {@return `referencePictureFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_referencePictureFormat(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_referencePictureFormat(segment, 0L); } + /// {@return `referencePictureFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int referencePictureFormatAt(long index) { return VkVideoSessionCreateInfoKHR.get_referencePictureFormat(this.segment(), index); } + /// {@return `referencePictureFormat`} + public @CType("VkFormat") int referencePictureFormat() { return VkVideoSessionCreateInfoKHR.get_referencePictureFormat(this.segment()); } + /// Sets `referencePictureFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_referencePictureFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_referencePictureFormat.set(segment, 0L, index, value); } + /// Sets `referencePictureFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_referencePictureFormat(MemorySegment segment, @CType("VkFormat") int value) { VkVideoSessionCreateInfoKHR.set_referencePictureFormat(segment, 0L, value); } + /// Sets `referencePictureFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR referencePictureFormatAt(long index, @CType("VkFormat") int value) { VkVideoSessionCreateInfoKHR.set_referencePictureFormat(this.segment(), index, value); return this; } + /// Sets `referencePictureFormat` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR referencePictureFormat(@CType("VkFormat") int value) { VkVideoSessionCreateInfoKHR.set_referencePictureFormat(this.segment(), value); return this; } + + /// {@return `maxDpbSlots` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDpbSlots(MemorySegment segment, long index) { return (int) VH_maxDpbSlots.get(segment, 0L, index); } + /// {@return `maxDpbSlots`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDpbSlots(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_maxDpbSlots(segment, 0L); } + /// {@return `maxDpbSlots` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDpbSlotsAt(long index) { return VkVideoSessionCreateInfoKHR.get_maxDpbSlots(this.segment(), index); } + /// {@return `maxDpbSlots`} + public @CType("uint32_t") int maxDpbSlots() { return VkVideoSessionCreateInfoKHR.get_maxDpbSlots(this.segment()); } + /// Sets `maxDpbSlots` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDpbSlots(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDpbSlots.set(segment, 0L, index, value); } + /// Sets `maxDpbSlots` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDpbSlots(MemorySegment segment, @CType("uint32_t") int value) { VkVideoSessionCreateInfoKHR.set_maxDpbSlots(segment, 0L, value); } + /// Sets `maxDpbSlots` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR maxDpbSlotsAt(long index, @CType("uint32_t") int value) { VkVideoSessionCreateInfoKHR.set_maxDpbSlots(this.segment(), index, value); return this; } + /// Sets `maxDpbSlots` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR maxDpbSlots(@CType("uint32_t") int value) { VkVideoSessionCreateInfoKHR.set_maxDpbSlots(this.segment(), value); return this; } + + /// {@return `maxActiveReferencePictures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxActiveReferencePictures(MemorySegment segment, long index) { return (int) VH_maxActiveReferencePictures.get(segment, 0L, index); } + /// {@return `maxActiveReferencePictures`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxActiveReferencePictures(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_maxActiveReferencePictures(segment, 0L); } + /// {@return `maxActiveReferencePictures` at the given index} + /// @param index the index + public @CType("uint32_t") int maxActiveReferencePicturesAt(long index) { return VkVideoSessionCreateInfoKHR.get_maxActiveReferencePictures(this.segment(), index); } + /// {@return `maxActiveReferencePictures`} + public @CType("uint32_t") int maxActiveReferencePictures() { return VkVideoSessionCreateInfoKHR.get_maxActiveReferencePictures(this.segment()); } + /// Sets `maxActiveReferencePictures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxActiveReferencePictures(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxActiveReferencePictures.set(segment, 0L, index, value); } + /// Sets `maxActiveReferencePictures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxActiveReferencePictures(MemorySegment segment, @CType("uint32_t") int value) { VkVideoSessionCreateInfoKHR.set_maxActiveReferencePictures(segment, 0L, value); } + /// Sets `maxActiveReferencePictures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR maxActiveReferencePicturesAt(long index, @CType("uint32_t") int value) { VkVideoSessionCreateInfoKHR.set_maxActiveReferencePictures(this.segment(), index, value); return this; } + /// Sets `maxActiveReferencePictures` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR maxActiveReferencePictures(@CType("uint32_t") int value) { VkVideoSessionCreateInfoKHR.set_maxActiveReferencePictures(this.segment(), value); return this; } + + /// {@return `pStdHeaderVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkExtensionProperties *") java.lang.foreign.MemorySegment get_pStdHeaderVersion(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStdHeaderVersion.get(segment, 0L, index); } + /// {@return `pStdHeaderVersion`} + /// @param segment the segment of the struct + public static @CType("const VkExtensionProperties *") java.lang.foreign.MemorySegment get_pStdHeaderVersion(MemorySegment segment) { return VkVideoSessionCreateInfoKHR.get_pStdHeaderVersion(segment, 0L); } + /// {@return `pStdHeaderVersion` at the given index} + /// @param index the index + public @CType("const VkExtensionProperties *") java.lang.foreign.MemorySegment pStdHeaderVersionAt(long index) { return VkVideoSessionCreateInfoKHR.get_pStdHeaderVersion(this.segment(), index); } + /// {@return `pStdHeaderVersion`} + public @CType("const VkExtensionProperties *") java.lang.foreign.MemorySegment pStdHeaderVersion() { return VkVideoSessionCreateInfoKHR.get_pStdHeaderVersion(this.segment()); } + /// Sets `pStdHeaderVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStdHeaderVersion(MemorySegment segment, long index, @CType("const VkExtensionProperties *") java.lang.foreign.MemorySegment value) { VH_pStdHeaderVersion.set(segment, 0L, index, value); } + /// Sets `pStdHeaderVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStdHeaderVersion(MemorySegment segment, @CType("const VkExtensionProperties *") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_pStdHeaderVersion(segment, 0L, value); } + /// Sets `pStdHeaderVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR pStdHeaderVersionAt(long index, @CType("const VkExtensionProperties *") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_pStdHeaderVersion(this.segment(), index, value); return this; } + /// Sets `pStdHeaderVersion` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionCreateInfoKHR pStdHeaderVersion(@CType("const VkExtensionProperties *") java.lang.foreign.MemorySegment value) { VkVideoSessionCreateInfoKHR.set_pStdHeaderVersion(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionMemoryRequirementsKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionMemoryRequirementsKHR.java new file mode 100644 index 00000000..fc527fec --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionMemoryRequirementsKHR.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryBindIndex +/// [VarHandle][#VH_memoryBindIndex] - [Getter][#memoryBindIndex()] - [Setter][#memoryBindIndex(int)] +/// ### memoryRequirements +/// [Byte offset][#OFFSET_memoryRequirements] - [Memory layout][#ML_memoryRequirements] - [Getter][#memoryRequirements()] - [Setter][#memoryRequirements(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoSessionMemoryRequirementsKHR { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t memoryBindIndex; +/// VkMemoryRequirements memoryRequirements; +/// } VkVideoSessionMemoryRequirementsKHR; +/// ``` +public final class VkVideoSessionMemoryRequirementsKHR extends Struct { + /// The struct layout of `VkVideoSessionMemoryRequirementsKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryBindIndex"), + overrungl.vulkan.struct.VkMemoryRequirements.LAYOUT.withName("memoryRequirements") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryBindIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryBindIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryBindIndex")); + /// The byte offset of `memoryRequirements`. + public static final long OFFSET_memoryRequirements = LAYOUT.byteOffset(PathElement.groupElement("memoryRequirements")); + /// The memory layout of `memoryRequirements`. + public static final MemoryLayout ML_memoryRequirements = LAYOUT.select(PathElement.groupElement("memoryRequirements")); + + /// Creates `VkVideoSessionMemoryRequirementsKHR` with the given segment. + /// @param segment the memory segment + public VkVideoSessionMemoryRequirementsKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoSessionMemoryRequirementsKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionMemoryRequirementsKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionMemoryRequirementsKHR(segment); } + + /// Creates `VkVideoSessionMemoryRequirementsKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionMemoryRequirementsKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionMemoryRequirementsKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoSessionMemoryRequirementsKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionMemoryRequirementsKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionMemoryRequirementsKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoSessionMemoryRequirementsKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoSessionMemoryRequirementsKHR` + public static VkVideoSessionMemoryRequirementsKHR alloc(SegmentAllocator allocator) { return new VkVideoSessionMemoryRequirementsKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoSessionMemoryRequirementsKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoSessionMemoryRequirementsKHR` + public static VkVideoSessionMemoryRequirementsKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoSessionMemoryRequirementsKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoSessionMemoryRequirementsKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoSessionMemoryRequirementsKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoSessionMemoryRequirementsKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoSessionMemoryRequirementsKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionMemoryRequirementsKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoSessionMemoryRequirementsKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionMemoryRequirementsKHR sType(@CType("VkStructureType") int value) { VkVideoSessionMemoryRequirementsKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoSessionMemoryRequirementsKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoSessionMemoryRequirementsKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkVideoSessionMemoryRequirementsKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoSessionMemoryRequirementsKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionMemoryRequirementsKHR pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkVideoSessionMemoryRequirementsKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionMemoryRequirementsKHR pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkVideoSessionMemoryRequirementsKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryBindIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryBindIndex(MemorySegment segment, long index) { return (int) VH_memoryBindIndex.get(segment, 0L, index); } + /// {@return `memoryBindIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryBindIndex(MemorySegment segment) { return VkVideoSessionMemoryRequirementsKHR.get_memoryBindIndex(segment, 0L); } + /// {@return `memoryBindIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryBindIndexAt(long index) { return VkVideoSessionMemoryRequirementsKHR.get_memoryBindIndex(this.segment(), index); } + /// {@return `memoryBindIndex`} + public @CType("uint32_t") int memoryBindIndex() { return VkVideoSessionMemoryRequirementsKHR.get_memoryBindIndex(this.segment()); } + /// Sets `memoryBindIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryBindIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryBindIndex.set(segment, 0L, index, value); } + /// Sets `memoryBindIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryBindIndex(MemorySegment segment, @CType("uint32_t") int value) { VkVideoSessionMemoryRequirementsKHR.set_memoryBindIndex(segment, 0L, value); } + /// Sets `memoryBindIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionMemoryRequirementsKHR memoryBindIndexAt(long index, @CType("uint32_t") int value) { VkVideoSessionMemoryRequirementsKHR.set_memoryBindIndex(this.segment(), index, value); return this; } + /// Sets `memoryBindIndex` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionMemoryRequirementsKHR memoryBindIndex(@CType("uint32_t") int value) { VkVideoSessionMemoryRequirementsKHR.set_memoryBindIndex(this.segment(), value); return this; } + + /// {@return `memoryRequirements` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment get_memoryRequirements(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_memoryRequirements, index), ML_memoryRequirements); } + /// {@return `memoryRequirements`} + /// @param segment the segment of the struct + public static @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment get_memoryRequirements(MemorySegment segment) { return VkVideoSessionMemoryRequirementsKHR.get_memoryRequirements(segment, 0L); } + /// {@return `memoryRequirements` at the given index} + /// @param index the index + public @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment memoryRequirementsAt(long index) { return VkVideoSessionMemoryRequirementsKHR.get_memoryRequirements(this.segment(), index); } + /// {@return `memoryRequirements`} + public @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment memoryRequirements() { return VkVideoSessionMemoryRequirementsKHR.get_memoryRequirements(this.segment()); } + /// Sets `memoryRequirements` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryRequirements(MemorySegment segment, long index, @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_memoryRequirements, index), ML_memoryRequirements.byteSize()); } + /// Sets `memoryRequirements` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryRequirements(MemorySegment segment, @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment value) { VkVideoSessionMemoryRequirementsKHR.set_memoryRequirements(segment, 0L, value); } + /// Sets `memoryRequirements` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionMemoryRequirementsKHR memoryRequirementsAt(long index, @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment value) { VkVideoSessionMemoryRequirementsKHR.set_memoryRequirements(this.segment(), index, value); return this; } + /// Sets `memoryRequirements` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionMemoryRequirementsKHR memoryRequirements(@CType("VkMemoryRequirements") java.lang.foreign.MemorySegment value) { VkVideoSessionMemoryRequirementsKHR.set_memoryRequirements(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionParametersCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionParametersCreateInfoKHR.java new file mode 100644 index 00000000..c4f60aa5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionParametersCreateInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### videoSessionParametersTemplate +/// [VarHandle][#VH_videoSessionParametersTemplate] - [Getter][#videoSessionParametersTemplate()] - [Setter][#videoSessionParametersTemplate(java.lang.foreign.MemorySegment)] +/// ### videoSession +/// [VarHandle][#VH_videoSession] - [Getter][#videoSession()] - [Setter][#videoSession(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoSessionParametersCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkVideoSessionParametersCreateFlagsKHR flags; +/// VkVideoSessionParametersKHR videoSessionParametersTemplate; +/// VkVideoSessionKHR videoSession; +/// } VkVideoSessionParametersCreateInfoKHR; +/// ``` +public final class VkVideoSessionParametersCreateInfoKHR extends Struct { + /// The struct layout of `VkVideoSessionParametersCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("videoSessionParametersTemplate"), + ValueLayout.ADDRESS.withName("videoSession") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `videoSessionParametersTemplate` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_videoSessionParametersTemplate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoSessionParametersTemplate")); + /// The [VarHandle] of `videoSession` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_videoSession = LAYOUT.arrayElementVarHandle(PathElement.groupElement("videoSession")); + + /// Creates `VkVideoSessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoSessionParametersCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoSessionParametersCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionParametersCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionParametersCreateInfoKHR(segment); } + + /// Creates `VkVideoSessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionParametersCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoSessionParametersCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionParametersCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionParametersCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoSessionParametersCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoSessionParametersCreateInfoKHR` + public static VkVideoSessionParametersCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoSessionParametersCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoSessionParametersCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoSessionParametersCreateInfoKHR` + public static VkVideoSessionParametersCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoSessionParametersCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoSessionParametersCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoSessionParametersCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoSessionParametersCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoSessionParametersCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionParametersCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoSessionParametersCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionParametersCreateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoSessionParametersCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoSessionParametersCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoSessionParametersCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoSessionParametersCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionParametersCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionParametersCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoSessionParametersCreateFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkVideoSessionParametersCreateFlagsKHR") int get_flags(MemorySegment segment) { return VkVideoSessionParametersCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkVideoSessionParametersCreateFlagsKHR") int flagsAt(long index) { return VkVideoSessionParametersCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkVideoSessionParametersCreateFlagsKHR") int flags() { return VkVideoSessionParametersCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkVideoSessionParametersCreateFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkVideoSessionParametersCreateFlagsKHR") int value) { VkVideoSessionParametersCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionParametersCreateInfoKHR flagsAt(long index, @CType("VkVideoSessionParametersCreateFlagsKHR") int value) { VkVideoSessionParametersCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionParametersCreateInfoKHR flags(@CType("VkVideoSessionParametersCreateFlagsKHR") int value) { VkVideoSessionParametersCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `videoSessionParametersTemplate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment get_videoSessionParametersTemplate(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_videoSessionParametersTemplate.get(segment, 0L, index); } + /// {@return `videoSessionParametersTemplate`} + /// @param segment the segment of the struct + public static @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment get_videoSessionParametersTemplate(MemorySegment segment) { return VkVideoSessionParametersCreateInfoKHR.get_videoSessionParametersTemplate(segment, 0L); } + /// {@return `videoSessionParametersTemplate` at the given index} + /// @param index the index + public @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment videoSessionParametersTemplateAt(long index) { return VkVideoSessionParametersCreateInfoKHR.get_videoSessionParametersTemplate(this.segment(), index); } + /// {@return `videoSessionParametersTemplate`} + public @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment videoSessionParametersTemplate() { return VkVideoSessionParametersCreateInfoKHR.get_videoSessionParametersTemplate(this.segment()); } + /// Sets `videoSessionParametersTemplate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoSessionParametersTemplate(MemorySegment segment, long index, @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VH_videoSessionParametersTemplate.set(segment, 0L, index, value); } + /// Sets `videoSessionParametersTemplate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoSessionParametersTemplate(MemorySegment segment, @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersCreateInfoKHR.set_videoSessionParametersTemplate(segment, 0L, value); } + /// Sets `videoSessionParametersTemplate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionParametersCreateInfoKHR videoSessionParametersTemplateAt(long index, @CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersCreateInfoKHR.set_videoSessionParametersTemplate(this.segment(), index, value); return this; } + /// Sets `videoSessionParametersTemplate` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionParametersCreateInfoKHR videoSessionParametersTemplate(@CType("VkVideoSessionParametersKHR") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersCreateInfoKHR.set_videoSessionParametersTemplate(this.segment(), value); return this; } + + /// {@return `videoSession` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment get_videoSession(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_videoSession.get(segment, 0L, index); } + /// {@return `videoSession`} + /// @param segment the segment of the struct + public static @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment get_videoSession(MemorySegment segment) { return VkVideoSessionParametersCreateInfoKHR.get_videoSession(segment, 0L); } + /// {@return `videoSession` at the given index} + /// @param index the index + public @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment videoSessionAt(long index) { return VkVideoSessionParametersCreateInfoKHR.get_videoSession(this.segment(), index); } + /// {@return `videoSession`} + public @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment videoSession() { return VkVideoSessionParametersCreateInfoKHR.get_videoSession(this.segment()); } + /// Sets `videoSession` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_videoSession(MemorySegment segment, long index, @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment value) { VH_videoSession.set(segment, 0L, index, value); } + /// Sets `videoSession` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_videoSession(MemorySegment segment, @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersCreateInfoKHR.set_videoSession(segment, 0L, value); } + /// Sets `videoSession` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionParametersCreateInfoKHR videoSessionAt(long index, @CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersCreateInfoKHR.set_videoSession(this.segment(), index, value); return this; } + /// Sets `videoSession` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionParametersCreateInfoKHR videoSession(@CType("VkVideoSessionKHR") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersCreateInfoKHR.set_videoSession(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionParametersUpdateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionParametersUpdateInfoKHR.java new file mode 100644 index 00000000..d19d7258 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkVideoSessionParametersUpdateInfoKHR.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### updateSequenceCount +/// [VarHandle][#VH_updateSequenceCount] - [Getter][#updateSequenceCount()] - [Setter][#updateSequenceCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVideoSessionParametersUpdateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t updateSequenceCount; +/// } VkVideoSessionParametersUpdateInfoKHR; +/// ``` +public final class VkVideoSessionParametersUpdateInfoKHR extends Struct { + /// The struct layout of `VkVideoSessionParametersUpdateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("updateSequenceCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `updateSequenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_updateSequenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("updateSequenceCount")); + + /// Creates `VkVideoSessionParametersUpdateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkVideoSessionParametersUpdateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVideoSessionParametersUpdateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionParametersUpdateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionParametersUpdateInfoKHR(segment); } + + /// Creates `VkVideoSessionParametersUpdateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionParametersUpdateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionParametersUpdateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVideoSessionParametersUpdateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVideoSessionParametersUpdateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVideoSessionParametersUpdateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVideoSessionParametersUpdateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVideoSessionParametersUpdateInfoKHR` + public static VkVideoSessionParametersUpdateInfoKHR alloc(SegmentAllocator allocator) { return new VkVideoSessionParametersUpdateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVideoSessionParametersUpdateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVideoSessionParametersUpdateInfoKHR` + public static VkVideoSessionParametersUpdateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkVideoSessionParametersUpdateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkVideoSessionParametersUpdateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkVideoSessionParametersUpdateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkVideoSessionParametersUpdateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkVideoSessionParametersUpdateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionParametersUpdateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkVideoSessionParametersUpdateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionParametersUpdateInfoKHR sType(@CType("VkStructureType") int value) { VkVideoSessionParametersUpdateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkVideoSessionParametersUpdateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkVideoSessionParametersUpdateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkVideoSessionParametersUpdateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersUpdateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionParametersUpdateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersUpdateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionParametersUpdateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkVideoSessionParametersUpdateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `updateSequenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_updateSequenceCount(MemorySegment segment, long index) { return (int) VH_updateSequenceCount.get(segment, 0L, index); } + /// {@return `updateSequenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_updateSequenceCount(MemorySegment segment) { return VkVideoSessionParametersUpdateInfoKHR.get_updateSequenceCount(segment, 0L); } + /// {@return `updateSequenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int updateSequenceCountAt(long index) { return VkVideoSessionParametersUpdateInfoKHR.get_updateSequenceCount(this.segment(), index); } + /// {@return `updateSequenceCount`} + public @CType("uint32_t") int updateSequenceCount() { return VkVideoSessionParametersUpdateInfoKHR.get_updateSequenceCount(this.segment()); } + /// Sets `updateSequenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_updateSequenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_updateSequenceCount.set(segment, 0L, index, value); } + /// Sets `updateSequenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_updateSequenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkVideoSessionParametersUpdateInfoKHR.set_updateSequenceCount(segment, 0L, value); } + /// Sets `updateSequenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVideoSessionParametersUpdateInfoKHR updateSequenceCountAt(long index, @CType("uint32_t") int value) { VkVideoSessionParametersUpdateInfoKHR.set_updateSequenceCount(this.segment(), index, value); return this; } + /// Sets `updateSequenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkVideoSessionParametersUpdateInfoKHR updateSequenceCount(@CType("uint32_t") int value) { VkVideoSessionParametersUpdateInfoKHR.set_updateSequenceCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWaylandSurfaceCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWaylandSurfaceCreateInfoKHR.java new file mode 100644 index 00000000..ab5d9650 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWaylandSurfaceCreateInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### display +/// [VarHandle][#VH_display] - [Getter][#display()] - [Setter][#display(java.lang.foreign.MemorySegment)] +/// ### surface +/// [VarHandle][#VH_surface] - [Getter][#surface()] - [Setter][#surface(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkWaylandSurfaceCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkWaylandSurfaceCreateFlagsKHR flags; +/// struct wl_display * display; +/// struct wl_surface * surface; +/// } VkWaylandSurfaceCreateInfoKHR; +/// ``` +public final class VkWaylandSurfaceCreateInfoKHR extends Struct { + /// The struct layout of `VkWaylandSurfaceCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("display"), + ValueLayout.ADDRESS.withName("surface") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `display` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_display = LAYOUT.arrayElementVarHandle(PathElement.groupElement("display")); + /// The [VarHandle] of `surface` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_surface = LAYOUT.arrayElementVarHandle(PathElement.groupElement("surface")); + + /// Creates `VkWaylandSurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkWaylandSurfaceCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkWaylandSurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWaylandSurfaceCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWaylandSurfaceCreateInfoKHR(segment); } + + /// Creates `VkWaylandSurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWaylandSurfaceCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWaylandSurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkWaylandSurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkWaylandSurfaceCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkWaylandSurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkWaylandSurfaceCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkWaylandSurfaceCreateInfoKHR` + public static VkWaylandSurfaceCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkWaylandSurfaceCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkWaylandSurfaceCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkWaylandSurfaceCreateInfoKHR` + public static VkWaylandSurfaceCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkWaylandSurfaceCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkWaylandSurfaceCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkWaylandSurfaceCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkWaylandSurfaceCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkWaylandSurfaceCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWaylandSurfaceCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkWaylandSurfaceCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkWaylandSurfaceCreateInfoKHR sType(@CType("VkStructureType") int value) { VkWaylandSurfaceCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkWaylandSurfaceCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkWaylandSurfaceCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkWaylandSurfaceCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWaylandSurfaceCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWaylandSurfaceCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWaylandSurfaceCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkWaylandSurfaceCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWaylandSurfaceCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkWaylandSurfaceCreateFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkWaylandSurfaceCreateFlagsKHR") int get_flags(MemorySegment segment) { return VkWaylandSurfaceCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkWaylandSurfaceCreateFlagsKHR") int flagsAt(long index) { return VkWaylandSurfaceCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkWaylandSurfaceCreateFlagsKHR") int flags() { return VkWaylandSurfaceCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkWaylandSurfaceCreateFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkWaylandSurfaceCreateFlagsKHR") int value) { VkWaylandSurfaceCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWaylandSurfaceCreateInfoKHR flagsAt(long index, @CType("VkWaylandSurfaceCreateFlagsKHR") int value) { VkWaylandSurfaceCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkWaylandSurfaceCreateInfoKHR flags(@CType("VkWaylandSurfaceCreateFlagsKHR") int value) { VkWaylandSurfaceCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `display` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("struct wl_display *") java.lang.foreign.MemorySegment get_display(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_display.get(segment, 0L, index); } + /// {@return `display`} + /// @param segment the segment of the struct + public static @CType("struct wl_display *") java.lang.foreign.MemorySegment get_display(MemorySegment segment) { return VkWaylandSurfaceCreateInfoKHR.get_display(segment, 0L); } + /// {@return `display` at the given index} + /// @param index the index + public @CType("struct wl_display *") java.lang.foreign.MemorySegment displayAt(long index) { return VkWaylandSurfaceCreateInfoKHR.get_display(this.segment(), index); } + /// {@return `display`} + public @CType("struct wl_display *") java.lang.foreign.MemorySegment display() { return VkWaylandSurfaceCreateInfoKHR.get_display(this.segment()); } + /// Sets `display` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_display(MemorySegment segment, long index, @CType("struct wl_display *") java.lang.foreign.MemorySegment value) { VH_display.set(segment, 0L, index, value); } + /// Sets `display` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_display(MemorySegment segment, @CType("struct wl_display *") java.lang.foreign.MemorySegment value) { VkWaylandSurfaceCreateInfoKHR.set_display(segment, 0L, value); } + /// Sets `display` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWaylandSurfaceCreateInfoKHR displayAt(long index, @CType("struct wl_display *") java.lang.foreign.MemorySegment value) { VkWaylandSurfaceCreateInfoKHR.set_display(this.segment(), index, value); return this; } + /// Sets `display` with the given value. + /// @param value the value + /// @return `this` + public VkWaylandSurfaceCreateInfoKHR display(@CType("struct wl_display *") java.lang.foreign.MemorySegment value) { VkWaylandSurfaceCreateInfoKHR.set_display(this.segment(), value); return this; } + + /// {@return `surface` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("struct wl_surface *") java.lang.foreign.MemorySegment get_surface(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_surface.get(segment, 0L, index); } + /// {@return `surface`} + /// @param segment the segment of the struct + public static @CType("struct wl_surface *") java.lang.foreign.MemorySegment get_surface(MemorySegment segment) { return VkWaylandSurfaceCreateInfoKHR.get_surface(segment, 0L); } + /// {@return `surface` at the given index} + /// @param index the index + public @CType("struct wl_surface *") java.lang.foreign.MemorySegment surfaceAt(long index) { return VkWaylandSurfaceCreateInfoKHR.get_surface(this.segment(), index); } + /// {@return `surface`} + public @CType("struct wl_surface *") java.lang.foreign.MemorySegment surface() { return VkWaylandSurfaceCreateInfoKHR.get_surface(this.segment()); } + /// Sets `surface` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_surface(MemorySegment segment, long index, @CType("struct wl_surface *") java.lang.foreign.MemorySegment value) { VH_surface.set(segment, 0L, index, value); } + /// Sets `surface` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_surface(MemorySegment segment, @CType("struct wl_surface *") java.lang.foreign.MemorySegment value) { VkWaylandSurfaceCreateInfoKHR.set_surface(segment, 0L, value); } + /// Sets `surface` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWaylandSurfaceCreateInfoKHR surfaceAt(long index, @CType("struct wl_surface *") java.lang.foreign.MemorySegment value) { VkWaylandSurfaceCreateInfoKHR.set_surface(this.segment(), index, value); return this; } + /// Sets `surface` with the given value. + /// @param value the value + /// @return `this` + public VkWaylandSurfaceCreateInfoKHR surface(@CType("struct wl_surface *") java.lang.foreign.MemorySegment value) { VkWaylandSurfaceCreateInfoKHR.set_surface(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWin32KeyedMutexAcquireReleaseInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWin32KeyedMutexAcquireReleaseInfoKHR.java new file mode 100644 index 00000000..73d27b9e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWin32KeyedMutexAcquireReleaseInfoKHR.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### acquireCount +/// [VarHandle][#VH_acquireCount] - [Getter][#acquireCount()] - [Setter][#acquireCount(int)] +/// ### pAcquireSyncs +/// [VarHandle][#VH_pAcquireSyncs] - [Getter][#pAcquireSyncs()] - [Setter][#pAcquireSyncs(java.lang.foreign.MemorySegment)] +/// ### pAcquireKeys +/// [VarHandle][#VH_pAcquireKeys] - [Getter][#pAcquireKeys()] - [Setter][#pAcquireKeys(java.lang.foreign.MemorySegment)] +/// ### pAcquireTimeouts +/// [VarHandle][#VH_pAcquireTimeouts] - [Getter][#pAcquireTimeouts()] - [Setter][#pAcquireTimeouts(java.lang.foreign.MemorySegment)] +/// ### releaseCount +/// [VarHandle][#VH_releaseCount] - [Getter][#releaseCount()] - [Setter][#releaseCount(int)] +/// ### pReleaseSyncs +/// [VarHandle][#VH_pReleaseSyncs] - [Getter][#pReleaseSyncs()] - [Setter][#pReleaseSyncs(java.lang.foreign.MemorySegment)] +/// ### pReleaseKeys +/// [VarHandle][#VH_pReleaseKeys] - [Getter][#pReleaseKeys()] - [Setter][#pReleaseKeys(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t acquireCount; +/// const VkDeviceMemory * pAcquireSyncs; +/// const uint64_t * pAcquireKeys; +/// const uint32_t * pAcquireTimeouts; +/// uint32_t releaseCount; +/// const VkDeviceMemory * pReleaseSyncs; +/// const uint64_t * pReleaseKeys; +/// } VkWin32KeyedMutexAcquireReleaseInfoKHR; +/// ``` +public final class VkWin32KeyedMutexAcquireReleaseInfoKHR extends Struct { + /// The struct layout of `VkWin32KeyedMutexAcquireReleaseInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("acquireCount"), + ValueLayout.ADDRESS.withName("pAcquireSyncs"), + ValueLayout.ADDRESS.withName("pAcquireKeys"), + ValueLayout.ADDRESS.withName("pAcquireTimeouts"), + ValueLayout.JAVA_INT.withName("releaseCount"), + ValueLayout.ADDRESS.withName("pReleaseSyncs"), + ValueLayout.ADDRESS.withName("pReleaseKeys") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `acquireCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_acquireCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("acquireCount")); + /// The [VarHandle] of `pAcquireSyncs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAcquireSyncs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAcquireSyncs")); + /// The [VarHandle] of `pAcquireKeys` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAcquireKeys = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAcquireKeys")); + /// The [VarHandle] of `pAcquireTimeouts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAcquireTimeouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAcquireTimeouts")); + /// The [VarHandle] of `releaseCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_releaseCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("releaseCount")); + /// The [VarHandle] of `pReleaseSyncs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pReleaseSyncs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pReleaseSyncs")); + /// The [VarHandle] of `pReleaseKeys` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pReleaseKeys = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pReleaseKeys")); + + /// Creates `VkWin32KeyedMutexAcquireReleaseInfoKHR` with the given segment. + /// @param segment the memory segment + public VkWin32KeyedMutexAcquireReleaseInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkWin32KeyedMutexAcquireReleaseInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWin32KeyedMutexAcquireReleaseInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWin32KeyedMutexAcquireReleaseInfoKHR(segment); } + + /// Creates `VkWin32KeyedMutexAcquireReleaseInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWin32KeyedMutexAcquireReleaseInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWin32KeyedMutexAcquireReleaseInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkWin32KeyedMutexAcquireReleaseInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkWin32KeyedMutexAcquireReleaseInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkWin32KeyedMutexAcquireReleaseInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkWin32KeyedMutexAcquireReleaseInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkWin32KeyedMutexAcquireReleaseInfoKHR` + public static VkWin32KeyedMutexAcquireReleaseInfoKHR alloc(SegmentAllocator allocator) { return new VkWin32KeyedMutexAcquireReleaseInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkWin32KeyedMutexAcquireReleaseInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkWin32KeyedMutexAcquireReleaseInfoKHR` + public static VkWin32KeyedMutexAcquireReleaseInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkWin32KeyedMutexAcquireReleaseInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR sType(@CType("VkStructureType") int value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `acquireCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_acquireCount(MemorySegment segment, long index) { return (int) VH_acquireCount.get(segment, 0L, index); } + /// {@return `acquireCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_acquireCount(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_acquireCount(segment, 0L); } + /// {@return `acquireCount` at the given index} + /// @param index the index + public @CType("uint32_t") int acquireCountAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_acquireCount(this.segment(), index); } + /// {@return `acquireCount`} + public @CType("uint32_t") int acquireCount() { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_acquireCount(this.segment()); } + /// Sets `acquireCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_acquireCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_acquireCount.set(segment, 0L, index, value); } + /// Sets `acquireCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_acquireCount(MemorySegment segment, @CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_acquireCount(segment, 0L, value); } + /// Sets `acquireCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR acquireCountAt(long index, @CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_acquireCount(this.segment(), index, value); return this; } + /// Sets `acquireCount` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR acquireCount(@CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_acquireCount(this.segment(), value); return this; } + + /// {@return `pAcquireSyncs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment get_pAcquireSyncs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAcquireSyncs.get(segment, 0L, index); } + /// {@return `pAcquireSyncs`} + /// @param segment the segment of the struct + public static @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment get_pAcquireSyncs(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pAcquireSyncs(segment, 0L); } + /// {@return `pAcquireSyncs` at the given index} + /// @param index the index + public @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment pAcquireSyncsAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pAcquireSyncs(this.segment(), index); } + /// {@return `pAcquireSyncs`} + public @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment pAcquireSyncs() { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pAcquireSyncs(this.segment()); } + /// Sets `pAcquireSyncs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAcquireSyncs(MemorySegment segment, long index, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VH_pAcquireSyncs.set(segment, 0L, index, value); } + /// Sets `pAcquireSyncs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAcquireSyncs(MemorySegment segment, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pAcquireSyncs(segment, 0L, value); } + /// Sets `pAcquireSyncs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pAcquireSyncsAt(long index, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pAcquireSyncs(this.segment(), index, value); return this; } + /// Sets `pAcquireSyncs` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pAcquireSyncs(@CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pAcquireSyncs(this.segment(), value); return this; } + + /// {@return `pAcquireKeys` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pAcquireKeys(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAcquireKeys.get(segment, 0L, index); } + /// {@return `pAcquireKeys`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pAcquireKeys(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pAcquireKeys(segment, 0L); } + /// {@return `pAcquireKeys` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pAcquireKeysAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pAcquireKeys(this.segment(), index); } + /// {@return `pAcquireKeys`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pAcquireKeys() { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pAcquireKeys(this.segment()); } + /// Sets `pAcquireKeys` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAcquireKeys(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pAcquireKeys.set(segment, 0L, index, value); } + /// Sets `pAcquireKeys` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAcquireKeys(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pAcquireKeys(segment, 0L, value); } + /// Sets `pAcquireKeys` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pAcquireKeysAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pAcquireKeys(this.segment(), index, value); return this; } + /// Sets `pAcquireKeys` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pAcquireKeys(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pAcquireKeys(this.segment(), value); return this; } + + /// {@return `pAcquireTimeouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pAcquireTimeouts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAcquireTimeouts.get(segment, 0L, index); } + /// {@return `pAcquireTimeouts`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pAcquireTimeouts(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pAcquireTimeouts(segment, 0L); } + /// {@return `pAcquireTimeouts` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pAcquireTimeoutsAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pAcquireTimeouts(this.segment(), index); } + /// {@return `pAcquireTimeouts`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pAcquireTimeouts() { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pAcquireTimeouts(this.segment()); } + /// Sets `pAcquireTimeouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAcquireTimeouts(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pAcquireTimeouts.set(segment, 0L, index, value); } + /// Sets `pAcquireTimeouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAcquireTimeouts(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pAcquireTimeouts(segment, 0L, value); } + /// Sets `pAcquireTimeouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pAcquireTimeoutsAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pAcquireTimeouts(this.segment(), index, value); return this; } + /// Sets `pAcquireTimeouts` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pAcquireTimeouts(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pAcquireTimeouts(this.segment(), value); return this; } + + /// {@return `releaseCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_releaseCount(MemorySegment segment, long index) { return (int) VH_releaseCount.get(segment, 0L, index); } + /// {@return `releaseCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_releaseCount(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_releaseCount(segment, 0L); } + /// {@return `releaseCount` at the given index} + /// @param index the index + public @CType("uint32_t") int releaseCountAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_releaseCount(this.segment(), index); } + /// {@return `releaseCount`} + public @CType("uint32_t") int releaseCount() { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_releaseCount(this.segment()); } + /// Sets `releaseCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_releaseCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_releaseCount.set(segment, 0L, index, value); } + /// Sets `releaseCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_releaseCount(MemorySegment segment, @CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_releaseCount(segment, 0L, value); } + /// Sets `releaseCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR releaseCountAt(long index, @CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_releaseCount(this.segment(), index, value); return this; } + /// Sets `releaseCount` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR releaseCount(@CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_releaseCount(this.segment(), value); return this; } + + /// {@return `pReleaseSyncs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment get_pReleaseSyncs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pReleaseSyncs.get(segment, 0L, index); } + /// {@return `pReleaseSyncs`} + /// @param segment the segment of the struct + public static @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment get_pReleaseSyncs(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pReleaseSyncs(segment, 0L); } + /// {@return `pReleaseSyncs` at the given index} + /// @param index the index + public @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment pReleaseSyncsAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pReleaseSyncs(this.segment(), index); } + /// {@return `pReleaseSyncs`} + public @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment pReleaseSyncs() { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pReleaseSyncs(this.segment()); } + /// Sets `pReleaseSyncs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pReleaseSyncs(MemorySegment segment, long index, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VH_pReleaseSyncs.set(segment, 0L, index, value); } + /// Sets `pReleaseSyncs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pReleaseSyncs(MemorySegment segment, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pReleaseSyncs(segment, 0L, value); } + /// Sets `pReleaseSyncs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pReleaseSyncsAt(long index, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pReleaseSyncs(this.segment(), index, value); return this; } + /// Sets `pReleaseSyncs` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pReleaseSyncs(@CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pReleaseSyncs(this.segment(), value); return this; } + + /// {@return `pReleaseKeys` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pReleaseKeys(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pReleaseKeys.get(segment, 0L, index); } + /// {@return `pReleaseKeys`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pReleaseKeys(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pReleaseKeys(segment, 0L); } + /// {@return `pReleaseKeys` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pReleaseKeysAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pReleaseKeys(this.segment(), index); } + /// {@return `pReleaseKeys`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pReleaseKeys() { return VkWin32KeyedMutexAcquireReleaseInfoKHR.get_pReleaseKeys(this.segment()); } + /// Sets `pReleaseKeys` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pReleaseKeys(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pReleaseKeys.set(segment, 0L, index, value); } + /// Sets `pReleaseKeys` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pReleaseKeys(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pReleaseKeys(segment, 0L, value); } + /// Sets `pReleaseKeys` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pReleaseKeysAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pReleaseKeys(this.segment(), index, value); return this; } + /// Sets `pReleaseKeys` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoKHR pReleaseKeys(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoKHR.set_pReleaseKeys(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWin32SurfaceCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWin32SurfaceCreateInfoKHR.java new file mode 100644 index 00000000..e27392c8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWin32SurfaceCreateInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### hinstance +/// [VarHandle][#VH_hinstance] - [Getter][#hinstance()] - [Setter][#hinstance(java.lang.foreign.MemorySegment)] +/// ### hwnd +/// [VarHandle][#VH_hwnd] - [Getter][#hwnd()] - [Setter][#hwnd(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkWin32SurfaceCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkWin32SurfaceCreateFlagsKHR flags; +/// HINSTANCE hinstance; +/// HWND hwnd; +/// } VkWin32SurfaceCreateInfoKHR; +/// ``` +public final class VkWin32SurfaceCreateInfoKHR extends Struct { + /// The struct layout of `VkWin32SurfaceCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("hinstance"), + ValueLayout.ADDRESS.withName("hwnd") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `hinstance` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_hinstance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hinstance")); + /// The [VarHandle] of `hwnd` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_hwnd = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hwnd")); + + /// Creates `VkWin32SurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkWin32SurfaceCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkWin32SurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWin32SurfaceCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWin32SurfaceCreateInfoKHR(segment); } + + /// Creates `VkWin32SurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWin32SurfaceCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWin32SurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkWin32SurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkWin32SurfaceCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkWin32SurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkWin32SurfaceCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkWin32SurfaceCreateInfoKHR` + public static VkWin32SurfaceCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkWin32SurfaceCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkWin32SurfaceCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkWin32SurfaceCreateInfoKHR` + public static VkWin32SurfaceCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkWin32SurfaceCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkWin32SurfaceCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkWin32SurfaceCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkWin32SurfaceCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkWin32SurfaceCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32SurfaceCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkWin32SurfaceCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkWin32SurfaceCreateInfoKHR sType(@CType("VkStructureType") int value) { VkWin32SurfaceCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkWin32SurfaceCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkWin32SurfaceCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkWin32SurfaceCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWin32SurfaceCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32SurfaceCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWin32SurfaceCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkWin32SurfaceCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWin32SurfaceCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkWin32SurfaceCreateFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkWin32SurfaceCreateFlagsKHR") int get_flags(MemorySegment segment) { return VkWin32SurfaceCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkWin32SurfaceCreateFlagsKHR") int flagsAt(long index) { return VkWin32SurfaceCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkWin32SurfaceCreateFlagsKHR") int flags() { return VkWin32SurfaceCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkWin32SurfaceCreateFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkWin32SurfaceCreateFlagsKHR") int value) { VkWin32SurfaceCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32SurfaceCreateInfoKHR flagsAt(long index, @CType("VkWin32SurfaceCreateFlagsKHR") int value) { VkWin32SurfaceCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkWin32SurfaceCreateInfoKHR flags(@CType("VkWin32SurfaceCreateFlagsKHR") int value) { VkWin32SurfaceCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `hinstance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("HINSTANCE") java.lang.foreign.MemorySegment get_hinstance(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_hinstance.get(segment, 0L, index); } + /// {@return `hinstance`} + /// @param segment the segment of the struct + public static @CType("HINSTANCE") java.lang.foreign.MemorySegment get_hinstance(MemorySegment segment) { return VkWin32SurfaceCreateInfoKHR.get_hinstance(segment, 0L); } + /// {@return `hinstance` at the given index} + /// @param index the index + public @CType("HINSTANCE") java.lang.foreign.MemorySegment hinstanceAt(long index) { return VkWin32SurfaceCreateInfoKHR.get_hinstance(this.segment(), index); } + /// {@return `hinstance`} + public @CType("HINSTANCE") java.lang.foreign.MemorySegment hinstance() { return VkWin32SurfaceCreateInfoKHR.get_hinstance(this.segment()); } + /// Sets `hinstance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hinstance(MemorySegment segment, long index, @CType("HINSTANCE") java.lang.foreign.MemorySegment value) { VH_hinstance.set(segment, 0L, index, value); } + /// Sets `hinstance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hinstance(MemorySegment segment, @CType("HINSTANCE") java.lang.foreign.MemorySegment value) { VkWin32SurfaceCreateInfoKHR.set_hinstance(segment, 0L, value); } + /// Sets `hinstance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32SurfaceCreateInfoKHR hinstanceAt(long index, @CType("HINSTANCE") java.lang.foreign.MemorySegment value) { VkWin32SurfaceCreateInfoKHR.set_hinstance(this.segment(), index, value); return this; } + /// Sets `hinstance` with the given value. + /// @param value the value + /// @return `this` + public VkWin32SurfaceCreateInfoKHR hinstance(@CType("HINSTANCE") java.lang.foreign.MemorySegment value) { VkWin32SurfaceCreateInfoKHR.set_hinstance(this.segment(), value); return this; } + + /// {@return `hwnd` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("HWND") java.lang.foreign.MemorySegment get_hwnd(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_hwnd.get(segment, 0L, index); } + /// {@return `hwnd`} + /// @param segment the segment of the struct + public static @CType("HWND") java.lang.foreign.MemorySegment get_hwnd(MemorySegment segment) { return VkWin32SurfaceCreateInfoKHR.get_hwnd(segment, 0L); } + /// {@return `hwnd` at the given index} + /// @param index the index + public @CType("HWND") java.lang.foreign.MemorySegment hwndAt(long index) { return VkWin32SurfaceCreateInfoKHR.get_hwnd(this.segment(), index); } + /// {@return `hwnd`} + public @CType("HWND") java.lang.foreign.MemorySegment hwnd() { return VkWin32SurfaceCreateInfoKHR.get_hwnd(this.segment()); } + /// Sets `hwnd` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hwnd(MemorySegment segment, long index, @CType("HWND") java.lang.foreign.MemorySegment value) { VH_hwnd.set(segment, 0L, index, value); } + /// Sets `hwnd` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hwnd(MemorySegment segment, @CType("HWND") java.lang.foreign.MemorySegment value) { VkWin32SurfaceCreateInfoKHR.set_hwnd(segment, 0L, value); } + /// Sets `hwnd` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32SurfaceCreateInfoKHR hwndAt(long index, @CType("HWND") java.lang.foreign.MemorySegment value) { VkWin32SurfaceCreateInfoKHR.set_hwnd(this.segment(), index, value); return this; } + /// Sets `hwnd` with the given value. + /// @param value the value + /// @return `this` + public VkWin32SurfaceCreateInfoKHR hwnd(@CType("HWND") java.lang.foreign.MemorySegment value) { VkWin32SurfaceCreateInfoKHR.set_hwnd(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWriteDescriptorSetAccelerationStructureKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWriteDescriptorSetAccelerationStructureKHR.java new file mode 100644 index 00000000..738e0765 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkWriteDescriptorSetAccelerationStructureKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### accelerationStructureCount +/// [VarHandle][#VH_accelerationStructureCount] - [Getter][#accelerationStructureCount()] - [Setter][#accelerationStructureCount(int)] +/// ### pAccelerationStructures +/// [VarHandle][#VH_pAccelerationStructures] - [Getter][#pAccelerationStructures()] - [Setter][#pAccelerationStructures(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkWriteDescriptorSetAccelerationStructureKHR { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t accelerationStructureCount; +/// const VkAccelerationStructureKHR * pAccelerationStructures; +/// } VkWriteDescriptorSetAccelerationStructureKHR; +/// ``` +public final class VkWriteDescriptorSetAccelerationStructureKHR extends Struct { + /// The struct layout of `VkWriteDescriptorSetAccelerationStructureKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("accelerationStructureCount"), + ValueLayout.ADDRESS.withName("pAccelerationStructures") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `accelerationStructureCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_accelerationStructureCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureCount")); + /// The [VarHandle] of `pAccelerationStructures` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAccelerationStructures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAccelerationStructures")); + + /// Creates `VkWriteDescriptorSetAccelerationStructureKHR` with the given segment. + /// @param segment the memory segment + public VkWriteDescriptorSetAccelerationStructureKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkWriteDescriptorSetAccelerationStructureKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSetAccelerationStructureKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSetAccelerationStructureKHR(segment); } + + /// Creates `VkWriteDescriptorSetAccelerationStructureKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSetAccelerationStructureKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSetAccelerationStructureKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkWriteDescriptorSetAccelerationStructureKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSetAccelerationStructureKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSetAccelerationStructureKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkWriteDescriptorSetAccelerationStructureKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkWriteDescriptorSetAccelerationStructureKHR` + public static VkWriteDescriptorSetAccelerationStructureKHR alloc(SegmentAllocator allocator) { return new VkWriteDescriptorSetAccelerationStructureKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkWriteDescriptorSetAccelerationStructureKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkWriteDescriptorSetAccelerationStructureKHR` + public static VkWriteDescriptorSetAccelerationStructureKHR alloc(SegmentAllocator allocator, long count) { return new VkWriteDescriptorSetAccelerationStructureKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkWriteDescriptorSetAccelerationStructureKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkWriteDescriptorSetAccelerationStructureKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkWriteDescriptorSetAccelerationStructureKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkWriteDescriptorSetAccelerationStructureKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkWriteDescriptorSetAccelerationStructureKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureKHR sType(@CType("VkStructureType") int value) { VkWriteDescriptorSetAccelerationStructureKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkWriteDescriptorSetAccelerationStructureKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkWriteDescriptorSetAccelerationStructureKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkWriteDescriptorSetAccelerationStructureKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `accelerationStructureCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_accelerationStructureCount(MemorySegment segment, long index) { return (int) VH_accelerationStructureCount.get(segment, 0L, index); } + /// {@return `accelerationStructureCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_accelerationStructureCount(MemorySegment segment) { return VkWriteDescriptorSetAccelerationStructureKHR.get_accelerationStructureCount(segment, 0L); } + /// {@return `accelerationStructureCount` at the given index} + /// @param index the index + public @CType("uint32_t") int accelerationStructureCountAt(long index) { return VkWriteDescriptorSetAccelerationStructureKHR.get_accelerationStructureCount(this.segment(), index); } + /// {@return `accelerationStructureCount`} + public @CType("uint32_t") int accelerationStructureCount() { return VkWriteDescriptorSetAccelerationStructureKHR.get_accelerationStructureCount(this.segment()); } + /// Sets `accelerationStructureCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_accelerationStructureCount.set(segment, 0L, index, value); } + /// Sets `accelerationStructureCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureCount(MemorySegment segment, @CType("uint32_t") int value) { VkWriteDescriptorSetAccelerationStructureKHR.set_accelerationStructureCount(segment, 0L, value); } + /// Sets `accelerationStructureCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureKHR accelerationStructureCountAt(long index, @CType("uint32_t") int value) { VkWriteDescriptorSetAccelerationStructureKHR.set_accelerationStructureCount(this.segment(), index, value); return this; } + /// Sets `accelerationStructureCount` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureKHR accelerationStructureCount(@CType("uint32_t") int value) { VkWriteDescriptorSetAccelerationStructureKHR.set_accelerationStructureCount(this.segment(), value); return this; } + + /// {@return `pAccelerationStructures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAccelerationStructureKHR *") java.lang.foreign.MemorySegment get_pAccelerationStructures(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAccelerationStructures.get(segment, 0L, index); } + /// {@return `pAccelerationStructures`} + /// @param segment the segment of the struct + public static @CType("const VkAccelerationStructureKHR *") java.lang.foreign.MemorySegment get_pAccelerationStructures(MemorySegment segment) { return VkWriteDescriptorSetAccelerationStructureKHR.get_pAccelerationStructures(segment, 0L); } + /// {@return `pAccelerationStructures` at the given index} + /// @param index the index + public @CType("const VkAccelerationStructureKHR *") java.lang.foreign.MemorySegment pAccelerationStructuresAt(long index) { return VkWriteDescriptorSetAccelerationStructureKHR.get_pAccelerationStructures(this.segment(), index); } + /// {@return `pAccelerationStructures`} + public @CType("const VkAccelerationStructureKHR *") java.lang.foreign.MemorySegment pAccelerationStructures() { return VkWriteDescriptorSetAccelerationStructureKHR.get_pAccelerationStructures(this.segment()); } + /// Sets `pAccelerationStructures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAccelerationStructures(MemorySegment segment, long index, @CType("const VkAccelerationStructureKHR *") java.lang.foreign.MemorySegment value) { VH_pAccelerationStructures.set(segment, 0L, index, value); } + /// Sets `pAccelerationStructures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAccelerationStructures(MemorySegment segment, @CType("const VkAccelerationStructureKHR *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureKHR.set_pAccelerationStructures(segment, 0L, value); } + /// Sets `pAccelerationStructures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureKHR pAccelerationStructuresAt(long index, @CType("const VkAccelerationStructureKHR *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureKHR.set_pAccelerationStructures(this.segment(), index, value); return this; } + /// Sets `pAccelerationStructures` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureKHR pAccelerationStructures(@CType("const VkAccelerationStructureKHR *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureKHR.set_pAccelerationStructures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkXcbSurfaceCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkXcbSurfaceCreateInfoKHR.java new file mode 100644 index 00000000..950b5e83 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkXcbSurfaceCreateInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### connection +/// [VarHandle][#VH_connection] - [Getter][#connection()] - [Setter][#connection(java.lang.foreign.MemorySegment)] +/// ### window +/// [VarHandle][#VH_window] - [Getter][#window()] - [Setter][#window(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkXcbSurfaceCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkXcbSurfaceCreateFlagsKHR flags; +/// xcb_connection_t * connection; +/// xcb_window_t window; +/// } VkXcbSurfaceCreateInfoKHR; +/// ``` +public final class VkXcbSurfaceCreateInfoKHR extends Struct { + /// The struct layout of `VkXcbSurfaceCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("connection"), + ValueLayout.JAVA_INT.withName("window") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `connection` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_connection = LAYOUT.arrayElementVarHandle(PathElement.groupElement("connection")); + /// The [VarHandle] of `window` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_window = LAYOUT.arrayElementVarHandle(PathElement.groupElement("window")); + + /// Creates `VkXcbSurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkXcbSurfaceCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkXcbSurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkXcbSurfaceCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkXcbSurfaceCreateInfoKHR(segment); } + + /// Creates `VkXcbSurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkXcbSurfaceCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkXcbSurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkXcbSurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkXcbSurfaceCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkXcbSurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkXcbSurfaceCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkXcbSurfaceCreateInfoKHR` + public static VkXcbSurfaceCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkXcbSurfaceCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkXcbSurfaceCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkXcbSurfaceCreateInfoKHR` + public static VkXcbSurfaceCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkXcbSurfaceCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkXcbSurfaceCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkXcbSurfaceCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkXcbSurfaceCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkXcbSurfaceCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXcbSurfaceCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkXcbSurfaceCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkXcbSurfaceCreateInfoKHR sType(@CType("VkStructureType") int value) { VkXcbSurfaceCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkXcbSurfaceCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkXcbSurfaceCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkXcbSurfaceCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkXcbSurfaceCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXcbSurfaceCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkXcbSurfaceCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkXcbSurfaceCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkXcbSurfaceCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkXcbSurfaceCreateFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkXcbSurfaceCreateFlagsKHR") int get_flags(MemorySegment segment) { return VkXcbSurfaceCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkXcbSurfaceCreateFlagsKHR") int flagsAt(long index) { return VkXcbSurfaceCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkXcbSurfaceCreateFlagsKHR") int flags() { return VkXcbSurfaceCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkXcbSurfaceCreateFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkXcbSurfaceCreateFlagsKHR") int value) { VkXcbSurfaceCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXcbSurfaceCreateInfoKHR flagsAt(long index, @CType("VkXcbSurfaceCreateFlagsKHR") int value) { VkXcbSurfaceCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkXcbSurfaceCreateInfoKHR flags(@CType("VkXcbSurfaceCreateFlagsKHR") int value) { VkXcbSurfaceCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `connection` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("xcb_connection_t *") java.lang.foreign.MemorySegment get_connection(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_connection.get(segment, 0L, index); } + /// {@return `connection`} + /// @param segment the segment of the struct + public static @CType("xcb_connection_t *") java.lang.foreign.MemorySegment get_connection(MemorySegment segment) { return VkXcbSurfaceCreateInfoKHR.get_connection(segment, 0L); } + /// {@return `connection` at the given index} + /// @param index the index + public @CType("xcb_connection_t *") java.lang.foreign.MemorySegment connectionAt(long index) { return VkXcbSurfaceCreateInfoKHR.get_connection(this.segment(), index); } + /// {@return `connection`} + public @CType("xcb_connection_t *") java.lang.foreign.MemorySegment connection() { return VkXcbSurfaceCreateInfoKHR.get_connection(this.segment()); } + /// Sets `connection` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_connection(MemorySegment segment, long index, @CType("xcb_connection_t *") java.lang.foreign.MemorySegment value) { VH_connection.set(segment, 0L, index, value); } + /// Sets `connection` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_connection(MemorySegment segment, @CType("xcb_connection_t *") java.lang.foreign.MemorySegment value) { VkXcbSurfaceCreateInfoKHR.set_connection(segment, 0L, value); } + /// Sets `connection` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXcbSurfaceCreateInfoKHR connectionAt(long index, @CType("xcb_connection_t *") java.lang.foreign.MemorySegment value) { VkXcbSurfaceCreateInfoKHR.set_connection(this.segment(), index, value); return this; } + /// Sets `connection` with the given value. + /// @param value the value + /// @return `this` + public VkXcbSurfaceCreateInfoKHR connection(@CType("xcb_connection_t *") java.lang.foreign.MemorySegment value) { VkXcbSurfaceCreateInfoKHR.set_connection(this.segment(), value); return this; } + + /// {@return `window` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("xcb_window_t") int get_window(MemorySegment segment, long index) { return (int) VH_window.get(segment, 0L, index); } + /// {@return `window`} + /// @param segment the segment of the struct + public static @CType("xcb_window_t") int get_window(MemorySegment segment) { return VkXcbSurfaceCreateInfoKHR.get_window(segment, 0L); } + /// {@return `window` at the given index} + /// @param index the index + public @CType("xcb_window_t") int windowAt(long index) { return VkXcbSurfaceCreateInfoKHR.get_window(this.segment(), index); } + /// {@return `window`} + public @CType("xcb_window_t") int window() { return VkXcbSurfaceCreateInfoKHR.get_window(this.segment()); } + /// Sets `window` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_window(MemorySegment segment, long index, @CType("xcb_window_t") int value) { VH_window.set(segment, 0L, index, value); } + /// Sets `window` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_window(MemorySegment segment, @CType("xcb_window_t") int value) { VkXcbSurfaceCreateInfoKHR.set_window(segment, 0L, value); } + /// Sets `window` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXcbSurfaceCreateInfoKHR windowAt(long index, @CType("xcb_window_t") int value) { VkXcbSurfaceCreateInfoKHR.set_window(this.segment(), index, value); return this; } + /// Sets `window` with the given value. + /// @param value the value + /// @return `this` + public VkXcbSurfaceCreateInfoKHR window(@CType("xcb_window_t") int value) { VkXcbSurfaceCreateInfoKHR.set_window(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkXlibSurfaceCreateInfoKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkXlibSurfaceCreateInfoKHR.java new file mode 100644 index 00000000..52a420c7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/struct/VkXlibSurfaceCreateInfoKHR.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### dpy +/// [VarHandle][#VH_dpy] - [Getter][#dpy()] - [Setter][#dpy(java.lang.foreign.MemorySegment)] +/// ### window +/// [VarHandle][#VH_window] - [Getter][#window()] - [Setter][#window(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkXlibSurfaceCreateInfoKHR { +/// VkStructureType sType; +/// const void * pNext; +/// VkXlibSurfaceCreateFlagsKHR flags; +/// Display * dpy; +/// Window window; +/// } VkXlibSurfaceCreateInfoKHR; +/// ``` +public final class VkXlibSurfaceCreateInfoKHR extends Struct { + /// The struct layout of `VkXlibSurfaceCreateInfoKHR`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("dpy"), + ValueLayout.JAVA_LONG.withName("window") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `dpy` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dpy = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dpy")); + /// The [VarHandle] of `window` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_window = LAYOUT.arrayElementVarHandle(PathElement.groupElement("window")); + + /// Creates `VkXlibSurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + public VkXlibSurfaceCreateInfoKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkXlibSurfaceCreateInfoKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkXlibSurfaceCreateInfoKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkXlibSurfaceCreateInfoKHR(segment); } + + /// Creates `VkXlibSurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkXlibSurfaceCreateInfoKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkXlibSurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkXlibSurfaceCreateInfoKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkXlibSurfaceCreateInfoKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkXlibSurfaceCreateInfoKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkXlibSurfaceCreateInfoKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkXlibSurfaceCreateInfoKHR` + public static VkXlibSurfaceCreateInfoKHR alloc(SegmentAllocator allocator) { return new VkXlibSurfaceCreateInfoKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkXlibSurfaceCreateInfoKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkXlibSurfaceCreateInfoKHR` + public static VkXlibSurfaceCreateInfoKHR alloc(SegmentAllocator allocator, long count) { return new VkXlibSurfaceCreateInfoKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkXlibSurfaceCreateInfoKHR.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkXlibSurfaceCreateInfoKHR.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkXlibSurfaceCreateInfoKHR.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkXlibSurfaceCreateInfoKHR.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXlibSurfaceCreateInfoKHR sTypeAt(long index, @CType("VkStructureType") int value) { VkXlibSurfaceCreateInfoKHR.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkXlibSurfaceCreateInfoKHR sType(@CType("VkStructureType") int value) { VkXlibSurfaceCreateInfoKHR.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkXlibSurfaceCreateInfoKHR.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkXlibSurfaceCreateInfoKHR.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkXlibSurfaceCreateInfoKHR.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkXlibSurfaceCreateInfoKHR.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXlibSurfaceCreateInfoKHR pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkXlibSurfaceCreateInfoKHR.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkXlibSurfaceCreateInfoKHR pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkXlibSurfaceCreateInfoKHR.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkXlibSurfaceCreateFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkXlibSurfaceCreateFlagsKHR") int get_flags(MemorySegment segment) { return VkXlibSurfaceCreateInfoKHR.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkXlibSurfaceCreateFlagsKHR") int flagsAt(long index) { return VkXlibSurfaceCreateInfoKHR.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkXlibSurfaceCreateFlagsKHR") int flags() { return VkXlibSurfaceCreateInfoKHR.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkXlibSurfaceCreateFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkXlibSurfaceCreateFlagsKHR") int value) { VkXlibSurfaceCreateInfoKHR.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXlibSurfaceCreateInfoKHR flagsAt(long index, @CType("VkXlibSurfaceCreateFlagsKHR") int value) { VkXlibSurfaceCreateInfoKHR.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkXlibSurfaceCreateInfoKHR flags(@CType("VkXlibSurfaceCreateFlagsKHR") int value) { VkXlibSurfaceCreateInfoKHR.set_flags(this.segment(), value); return this; } + + /// {@return `dpy` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("Display *") java.lang.foreign.MemorySegment get_dpy(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dpy.get(segment, 0L, index); } + /// {@return `dpy`} + /// @param segment the segment of the struct + public static @CType("Display *") java.lang.foreign.MemorySegment get_dpy(MemorySegment segment) { return VkXlibSurfaceCreateInfoKHR.get_dpy(segment, 0L); } + /// {@return `dpy` at the given index} + /// @param index the index + public @CType("Display *") java.lang.foreign.MemorySegment dpyAt(long index) { return VkXlibSurfaceCreateInfoKHR.get_dpy(this.segment(), index); } + /// {@return `dpy`} + public @CType("Display *") java.lang.foreign.MemorySegment dpy() { return VkXlibSurfaceCreateInfoKHR.get_dpy(this.segment()); } + /// Sets `dpy` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dpy(MemorySegment segment, long index, @CType("Display *") java.lang.foreign.MemorySegment value) { VH_dpy.set(segment, 0L, index, value); } + /// Sets `dpy` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dpy(MemorySegment segment, @CType("Display *") java.lang.foreign.MemorySegment value) { VkXlibSurfaceCreateInfoKHR.set_dpy(segment, 0L, value); } + /// Sets `dpy` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXlibSurfaceCreateInfoKHR dpyAt(long index, @CType("Display *") java.lang.foreign.MemorySegment value) { VkXlibSurfaceCreateInfoKHR.set_dpy(this.segment(), index, value); return this; } + /// Sets `dpy` with the given value. + /// @param value the value + /// @return `this` + public VkXlibSurfaceCreateInfoKHR dpy(@CType("Display *") java.lang.foreign.MemorySegment value) { VkXlibSurfaceCreateInfoKHR.set_dpy(this.segment(), value); return this; } + + /// {@return `window` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("Window") long get_window(MemorySegment segment, long index) { return (long) VH_window.get(segment, 0L, index); } + /// {@return `window`} + /// @param segment the segment of the struct + public static @CType("Window") long get_window(MemorySegment segment) { return VkXlibSurfaceCreateInfoKHR.get_window(segment, 0L); } + /// {@return `window` at the given index} + /// @param index the index + public @CType("Window") long windowAt(long index) { return VkXlibSurfaceCreateInfoKHR.get_window(this.segment(), index); } + /// {@return `window`} + public @CType("Window") long window() { return VkXlibSurfaceCreateInfoKHR.get_window(this.segment()); } + /// Sets `window` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_window(MemorySegment segment, long index, @CType("Window") long value) { VH_window.set(segment, 0L, index, value); } + /// Sets `window` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_window(MemorySegment segment, @CType("Window") long value) { VkXlibSurfaceCreateInfoKHR.set_window(segment, 0L, value); } + /// Sets `window` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkXlibSurfaceCreateInfoKHR windowAt(long index, @CType("Window") long value) { VkXlibSurfaceCreateInfoKHR.set_window(this.segment(), index, value); return this; } + /// Sets `window` with the given value. + /// @param value the value + /// @return `this` + public VkXlibSurfaceCreateInfoKHR window(@CType("Window") long value) { VkXlibSurfaceCreateInfoKHR.set_window(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkAccelerationStructureGeometryDataKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkAccelerationStructureGeometryDataKHR.java new file mode 100644 index 00000000..ff523257 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkAccelerationStructureGeometryDataKHR.java @@ -0,0 +1,191 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### triangles +/// [Byte offset][#OFFSET_triangles] - [Memory layout][#ML_triangles] - [Getter][#triangles()] - [Setter][#triangles(java.lang.foreign.MemorySegment)] +/// ### aabbs +/// [Byte offset][#OFFSET_aabbs] - [Memory layout][#ML_aabbs] - [Getter][#aabbs()] - [Setter][#aabbs(java.lang.foreign.MemorySegment)] +/// ### instances +/// [Byte offset][#OFFSET_instances] - [Memory layout][#ML_instances] - [Getter][#instances()] - [Setter][#instances(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkAccelerationStructureGeometryDataKHR { +/// VkAccelerationStructureGeometryTrianglesDataKHR triangles; +/// VkAccelerationStructureGeometryAabbsDataKHR aabbs; +/// VkAccelerationStructureGeometryInstancesDataKHR instances; +/// } VkAccelerationStructureGeometryDataKHR; +/// ``` +public final class VkAccelerationStructureGeometryDataKHR extends Union { + /// The union layout of `VkAccelerationStructureGeometryDataKHR`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + overrungl.vulkan.khr.struct.VkAccelerationStructureGeometryTrianglesDataKHR.LAYOUT.withName("triangles"), + overrungl.vulkan.khr.struct.VkAccelerationStructureGeometryAabbsDataKHR.LAYOUT.withName("aabbs"), + overrungl.vulkan.khr.struct.VkAccelerationStructureGeometryInstancesDataKHR.LAYOUT.withName("instances") + ); + /// The byte offset of `triangles`. + public static final long OFFSET_triangles = LAYOUT.byteOffset(PathElement.groupElement("triangles")); + /// The memory layout of `triangles`. + public static final MemoryLayout ML_triangles = LAYOUT.select(PathElement.groupElement("triangles")); + /// The byte offset of `aabbs`. + public static final long OFFSET_aabbs = LAYOUT.byteOffset(PathElement.groupElement("aabbs")); + /// The memory layout of `aabbs`. + public static final MemoryLayout ML_aabbs = LAYOUT.select(PathElement.groupElement("aabbs")); + /// The byte offset of `instances`. + public static final long OFFSET_instances = LAYOUT.byteOffset(PathElement.groupElement("instances")); + /// The memory layout of `instances`. + public static final MemoryLayout ML_instances = LAYOUT.select(PathElement.groupElement("instances")); + + /// Creates `VkAccelerationStructureGeometryDataKHR` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureGeometryDataKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureGeometryDataKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryDataKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryDataKHR(segment); } + + /// Creates `VkAccelerationStructureGeometryDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryDataKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureGeometryDataKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryDataKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryDataKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureGeometryDataKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureGeometryDataKHR` + public static VkAccelerationStructureGeometryDataKHR alloc(SegmentAllocator allocator) { return new VkAccelerationStructureGeometryDataKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureGeometryDataKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureGeometryDataKHR` + public static VkAccelerationStructureGeometryDataKHR alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureGeometryDataKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `triangles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureGeometryTrianglesDataKHR") java.lang.foreign.MemorySegment get_triangles(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_triangles, index), ML_triangles); } + /// {@return `triangles`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureGeometryTrianglesDataKHR") java.lang.foreign.MemorySegment get_triangles(MemorySegment segment) { return VkAccelerationStructureGeometryDataKHR.get_triangles(segment, 0L); } + /// {@return `triangles` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureGeometryTrianglesDataKHR") java.lang.foreign.MemorySegment trianglesAt(long index) { return VkAccelerationStructureGeometryDataKHR.get_triangles(this.segment(), index); } + /// {@return `triangles`} + public @CType("VkAccelerationStructureGeometryTrianglesDataKHR") java.lang.foreign.MemorySegment triangles() { return VkAccelerationStructureGeometryDataKHR.get_triangles(this.segment()); } + /// Sets `triangles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_triangles(MemorySegment segment, long index, @CType("VkAccelerationStructureGeometryTrianglesDataKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_triangles, index), ML_triangles.byteSize()); } + /// Sets `triangles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_triangles(MemorySegment segment, @CType("VkAccelerationStructureGeometryTrianglesDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryDataKHR.set_triangles(segment, 0L, value); } + /// Sets `triangles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryDataKHR trianglesAt(long index, @CType("VkAccelerationStructureGeometryTrianglesDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryDataKHR.set_triangles(this.segment(), index, value); return this; } + /// Sets `triangles` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryDataKHR triangles(@CType("VkAccelerationStructureGeometryTrianglesDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryDataKHR.set_triangles(this.segment(), value); return this; } + + /// {@return `aabbs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureGeometryAabbsDataKHR") java.lang.foreign.MemorySegment get_aabbs(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_aabbs, index), ML_aabbs); } + /// {@return `aabbs`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureGeometryAabbsDataKHR") java.lang.foreign.MemorySegment get_aabbs(MemorySegment segment) { return VkAccelerationStructureGeometryDataKHR.get_aabbs(segment, 0L); } + /// {@return `aabbs` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureGeometryAabbsDataKHR") java.lang.foreign.MemorySegment aabbsAt(long index) { return VkAccelerationStructureGeometryDataKHR.get_aabbs(this.segment(), index); } + /// {@return `aabbs`} + public @CType("VkAccelerationStructureGeometryAabbsDataKHR") java.lang.foreign.MemorySegment aabbs() { return VkAccelerationStructureGeometryDataKHR.get_aabbs(this.segment()); } + /// Sets `aabbs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aabbs(MemorySegment segment, long index, @CType("VkAccelerationStructureGeometryAabbsDataKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_aabbs, index), ML_aabbs.byteSize()); } + /// Sets `aabbs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aabbs(MemorySegment segment, @CType("VkAccelerationStructureGeometryAabbsDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryDataKHR.set_aabbs(segment, 0L, value); } + /// Sets `aabbs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryDataKHR aabbsAt(long index, @CType("VkAccelerationStructureGeometryAabbsDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryDataKHR.set_aabbs(this.segment(), index, value); return this; } + /// Sets `aabbs` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryDataKHR aabbs(@CType("VkAccelerationStructureGeometryAabbsDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryDataKHR.set_aabbs(this.segment(), value); return this; } + + /// {@return `instances` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureGeometryInstancesDataKHR") java.lang.foreign.MemorySegment get_instances(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_instances, index), ML_instances); } + /// {@return `instances`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureGeometryInstancesDataKHR") java.lang.foreign.MemorySegment get_instances(MemorySegment segment) { return VkAccelerationStructureGeometryDataKHR.get_instances(segment, 0L); } + /// {@return `instances` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureGeometryInstancesDataKHR") java.lang.foreign.MemorySegment instancesAt(long index) { return VkAccelerationStructureGeometryDataKHR.get_instances(this.segment(), index); } + /// {@return `instances`} + public @CType("VkAccelerationStructureGeometryInstancesDataKHR") java.lang.foreign.MemorySegment instances() { return VkAccelerationStructureGeometryDataKHR.get_instances(this.segment()); } + /// Sets `instances` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_instances(MemorySegment segment, long index, @CType("VkAccelerationStructureGeometryInstancesDataKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_instances, index), ML_instances.byteSize()); } + /// Sets `instances` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_instances(MemorySegment segment, @CType("VkAccelerationStructureGeometryInstancesDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryDataKHR.set_instances(segment, 0L, value); } + /// Sets `instances` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryDataKHR instancesAt(long index, @CType("VkAccelerationStructureGeometryInstancesDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryDataKHR.set_instances(this.segment(), index, value); return this; } + /// Sets `instances` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryDataKHR instances(@CType("VkAccelerationStructureGeometryInstancesDataKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryDataKHR.set_instances(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkDeviceOrHostAddressConstKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkDeviceOrHostAddressConstKHR.java new file mode 100644 index 00000000..028d4c4c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkDeviceOrHostAddressConstKHR.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### deviceAddress +/// [VarHandle][#VH_deviceAddress] - [Getter][#deviceAddress()] - [Setter][#deviceAddress(long)] +/// ### hostAddress +/// [VarHandle][#VH_hostAddress] - [Getter][#hostAddress()] - [Setter][#hostAddress(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkDeviceOrHostAddressConstKHR { +/// VkDeviceAddress deviceAddress; +/// const void * hostAddress; +/// } VkDeviceOrHostAddressConstKHR; +/// ``` +public final class VkDeviceOrHostAddressConstKHR extends Union { + /// The union layout of `VkDeviceOrHostAddressConstKHR`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + ValueLayout.JAVA_LONG.withName("deviceAddress"), + ValueLayout.ADDRESS.withName("hostAddress") + ); + /// The [VarHandle] of `deviceAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_deviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceAddress")); + /// The [VarHandle] of `hostAddress` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_hostAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hostAddress")); + + /// Creates `VkDeviceOrHostAddressConstKHR` with the given segment. + /// @param segment the memory segment + public VkDeviceOrHostAddressConstKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceOrHostAddressConstKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceOrHostAddressConstKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceOrHostAddressConstKHR(segment); } + + /// Creates `VkDeviceOrHostAddressConstKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceOrHostAddressConstKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceOrHostAddressConstKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceOrHostAddressConstKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceOrHostAddressConstKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceOrHostAddressConstKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceOrHostAddressConstKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceOrHostAddressConstKHR` + public static VkDeviceOrHostAddressConstKHR alloc(SegmentAllocator allocator) { return new VkDeviceOrHostAddressConstKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceOrHostAddressConstKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceOrHostAddressConstKHR` + public static VkDeviceOrHostAddressConstKHR alloc(SegmentAllocator allocator, long count) { return new VkDeviceOrHostAddressConstKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `deviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment, long index) { return (long) VH_deviceAddress.get(segment, 0L, index); } + /// {@return `deviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment) { return VkDeviceOrHostAddressConstKHR.get_deviceAddress(segment, 0L); } + /// {@return `deviceAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long deviceAddressAt(long index) { return VkDeviceOrHostAddressConstKHR.get_deviceAddress(this.segment(), index); } + /// {@return `deviceAddress`} + public @CType("VkDeviceAddress") long deviceAddress() { return VkDeviceOrHostAddressConstKHR.get_deviceAddress(this.segment()); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_deviceAddress.set(segment, 0L, index, value); } + /// Sets `deviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDeviceOrHostAddressConstKHR.set_deviceAddress(segment, 0L, value); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressConstKHR deviceAddressAt(long index, @CType("VkDeviceAddress") long value) { VkDeviceOrHostAddressConstKHR.set_deviceAddress(this.segment(), index, value); return this; } + /// Sets `deviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressConstKHR deviceAddress(@CType("VkDeviceAddress") long value) { VkDeviceOrHostAddressConstKHR.set_deviceAddress(this.segment(), value); return this; } + + /// {@return `hostAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_hostAddress(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_hostAddress.get(segment, 0L, index); } + /// {@return `hostAddress`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_hostAddress(MemorySegment segment) { return VkDeviceOrHostAddressConstKHR.get_hostAddress(segment, 0L); } + /// {@return `hostAddress` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment hostAddressAt(long index) { return VkDeviceOrHostAddressConstKHR.get_hostAddress(this.segment(), index); } + /// {@return `hostAddress`} + public @CType("const void *") java.lang.foreign.MemorySegment hostAddress() { return VkDeviceOrHostAddressConstKHR.get_hostAddress(this.segment()); } + /// Sets `hostAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hostAddress(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_hostAddress.set(segment, 0L, index, value); } + /// Sets `hostAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hostAddress(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceOrHostAddressConstKHR.set_hostAddress(segment, 0L, value); } + /// Sets `hostAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressConstKHR hostAddressAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceOrHostAddressConstKHR.set_hostAddress(this.segment(), index, value); return this; } + /// Sets `hostAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressConstKHR hostAddress(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceOrHostAddressConstKHR.set_hostAddress(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkDeviceOrHostAddressKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkDeviceOrHostAddressKHR.java new file mode 100644 index 00000000..31c9d5c9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkDeviceOrHostAddressKHR.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### deviceAddress +/// [VarHandle][#VH_deviceAddress] - [Getter][#deviceAddress()] - [Setter][#deviceAddress(long)] +/// ### hostAddress +/// [VarHandle][#VH_hostAddress] - [Getter][#hostAddress()] - [Setter][#hostAddress(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkDeviceOrHostAddressKHR { +/// VkDeviceAddress deviceAddress; +/// void * hostAddress; +/// } VkDeviceOrHostAddressKHR; +/// ``` +public final class VkDeviceOrHostAddressKHR extends Union { + /// The union layout of `VkDeviceOrHostAddressKHR`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + ValueLayout.JAVA_LONG.withName("deviceAddress"), + ValueLayout.ADDRESS.withName("hostAddress") + ); + /// The [VarHandle] of `deviceAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_deviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceAddress")); + /// The [VarHandle] of `hostAddress` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_hostAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hostAddress")); + + /// Creates `VkDeviceOrHostAddressKHR` with the given segment. + /// @param segment the memory segment + public VkDeviceOrHostAddressKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceOrHostAddressKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceOrHostAddressKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceOrHostAddressKHR(segment); } + + /// Creates `VkDeviceOrHostAddressKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceOrHostAddressKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceOrHostAddressKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceOrHostAddressKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceOrHostAddressKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceOrHostAddressKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceOrHostAddressKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceOrHostAddressKHR` + public static VkDeviceOrHostAddressKHR alloc(SegmentAllocator allocator) { return new VkDeviceOrHostAddressKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceOrHostAddressKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceOrHostAddressKHR` + public static VkDeviceOrHostAddressKHR alloc(SegmentAllocator allocator, long count) { return new VkDeviceOrHostAddressKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `deviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment, long index) { return (long) VH_deviceAddress.get(segment, 0L, index); } + /// {@return `deviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment) { return VkDeviceOrHostAddressKHR.get_deviceAddress(segment, 0L); } + /// {@return `deviceAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long deviceAddressAt(long index) { return VkDeviceOrHostAddressKHR.get_deviceAddress(this.segment(), index); } + /// {@return `deviceAddress`} + public @CType("VkDeviceAddress") long deviceAddress() { return VkDeviceOrHostAddressKHR.get_deviceAddress(this.segment()); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_deviceAddress.set(segment, 0L, index, value); } + /// Sets `deviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDeviceOrHostAddressKHR.set_deviceAddress(segment, 0L, value); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressKHR deviceAddressAt(long index, @CType("VkDeviceAddress") long value) { VkDeviceOrHostAddressKHR.set_deviceAddress(this.segment(), index, value); return this; } + /// Sets `deviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressKHR deviceAddress(@CType("VkDeviceAddress") long value) { VkDeviceOrHostAddressKHR.set_deviceAddress(this.segment(), value); return this; } + + /// {@return `hostAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_hostAddress(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_hostAddress.get(segment, 0L, index); } + /// {@return `hostAddress`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_hostAddress(MemorySegment segment) { return VkDeviceOrHostAddressKHR.get_hostAddress(segment, 0L); } + /// {@return `hostAddress` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment hostAddressAt(long index) { return VkDeviceOrHostAddressKHR.get_hostAddress(this.segment(), index); } + /// {@return `hostAddress`} + public @CType("void *") java.lang.foreign.MemorySegment hostAddress() { return VkDeviceOrHostAddressKHR.get_hostAddress(this.segment()); } + /// Sets `hostAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hostAddress(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_hostAddress.set(segment, 0L, index, value); } + /// Sets `hostAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hostAddress(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceOrHostAddressKHR.set_hostAddress(segment, 0L, value); } + /// Sets `hostAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressKHR hostAddressAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceOrHostAddressKHR.set_hostAddress(this.segment(), index, value); return this; } + /// Sets `hostAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceOrHostAddressKHR hostAddress(@CType("void *") java.lang.foreign.MemorySegment value) { VkDeviceOrHostAddressKHR.set_hostAddress(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkPerformanceCounterResultKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkPerformanceCounterResultKHR.java new file mode 100644 index 00000000..8e24eaf3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkPerformanceCounterResultKHR.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### int32 +/// [VarHandle][#VH_int32] - [Getter][#int32()] - [Setter][#int32(int)] +/// ### int64 +/// [VarHandle][#VH_int64] - [Getter][#int64()] - [Setter][#int64(long)] +/// ### uint32 +/// [VarHandle][#VH_uint32] - [Getter][#uint32()] - [Setter][#uint32(int)] +/// ### uint64 +/// [VarHandle][#VH_uint64] - [Getter][#uint64()] - [Setter][#uint64(long)] +/// ### float32 +/// [VarHandle][#VH_float32] - [Getter][#float32()] - [Setter][#float32(float)] +/// ### float64 +/// [VarHandle][#VH_float64] - [Getter][#float64()] - [Setter][#float64(double)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkPerformanceCounterResultKHR { +/// int32_t int32; +/// int64_t int64; +/// uint32_t uint32; +/// uint64_t uint64; +/// float float32; +/// double float64; +/// } VkPerformanceCounterResultKHR; +/// ``` +public final class VkPerformanceCounterResultKHR extends Union { + /// The union layout of `VkPerformanceCounterResultKHR`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + ValueLayout.JAVA_INT.withName("int32"), + ValueLayout.JAVA_LONG.withName("int64"), + ValueLayout.JAVA_INT.withName("uint32"), + ValueLayout.JAVA_LONG.withName("uint64"), + ValueLayout.JAVA_FLOAT.withName("float32"), + ValueLayout.JAVA_DOUBLE.withName("float64") + ); + /// The [VarHandle] of `int32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_int32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("int32")); + /// The [VarHandle] of `int64` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_int64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("int64")); + /// The [VarHandle] of `uint32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uint32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uint32")); + /// The [VarHandle] of `uint64` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_uint64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uint64")); + /// The [VarHandle] of `float32` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_float32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("float32")); + /// The [VarHandle] of `float64` of type `(MemorySegment base, long baseOffset, long index)double`. + public static final VarHandle VH_float64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("float64")); + + /// Creates `VkPerformanceCounterResultKHR` with the given segment. + /// @param segment the memory segment + public VkPerformanceCounterResultKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPerformanceCounterResultKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceCounterResultKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceCounterResultKHR(segment); } + + /// Creates `VkPerformanceCounterResultKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceCounterResultKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceCounterResultKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPerformanceCounterResultKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPerformanceCounterResultKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPerformanceCounterResultKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPerformanceCounterResultKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPerformanceCounterResultKHR` + public static VkPerformanceCounterResultKHR alloc(SegmentAllocator allocator) { return new VkPerformanceCounterResultKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPerformanceCounterResultKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPerformanceCounterResultKHR` + public static VkPerformanceCounterResultKHR alloc(SegmentAllocator allocator, long count) { return new VkPerformanceCounterResultKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `int32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_int32(MemorySegment segment, long index) { return (int) VH_int32.get(segment, 0L, index); } + /// {@return `int32`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_int32(MemorySegment segment) { return VkPerformanceCounterResultKHR.get_int32(segment, 0L); } + /// {@return `int32` at the given index} + /// @param index the index + public @CType("int32_t") int int32At(long index) { return VkPerformanceCounterResultKHR.get_int32(this.segment(), index); } + /// {@return `int32`} + public @CType("int32_t") int int32() { return VkPerformanceCounterResultKHR.get_int32(this.segment()); } + /// Sets `int32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_int32(MemorySegment segment, long index, @CType("int32_t") int value) { VH_int32.set(segment, 0L, index, value); } + /// Sets `int32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_int32(MemorySegment segment, @CType("int32_t") int value) { VkPerformanceCounterResultKHR.set_int32(segment, 0L, value); } + /// Sets `int32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR int32At(long index, @CType("int32_t") int value) { VkPerformanceCounterResultKHR.set_int32(this.segment(), index, value); return this; } + /// Sets `int32` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR int32(@CType("int32_t") int value) { VkPerformanceCounterResultKHR.set_int32(this.segment(), value); return this; } + + /// {@return `int64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int64_t") long get_int64(MemorySegment segment, long index) { return (long) VH_int64.get(segment, 0L, index); } + /// {@return `int64`} + /// @param segment the segment of the struct + public static @CType("int64_t") long get_int64(MemorySegment segment) { return VkPerformanceCounterResultKHR.get_int64(segment, 0L); } + /// {@return `int64` at the given index} + /// @param index the index + public @CType("int64_t") long int64At(long index) { return VkPerformanceCounterResultKHR.get_int64(this.segment(), index); } + /// {@return `int64`} + public @CType("int64_t") long int64() { return VkPerformanceCounterResultKHR.get_int64(this.segment()); } + /// Sets `int64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_int64(MemorySegment segment, long index, @CType("int64_t") long value) { VH_int64.set(segment, 0L, index, value); } + /// Sets `int64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_int64(MemorySegment segment, @CType("int64_t") long value) { VkPerformanceCounterResultKHR.set_int64(segment, 0L, value); } + /// Sets `int64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR int64At(long index, @CType("int64_t") long value) { VkPerformanceCounterResultKHR.set_int64(this.segment(), index, value); return this; } + /// Sets `int64` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR int64(@CType("int64_t") long value) { VkPerformanceCounterResultKHR.set_int64(this.segment(), value); return this; } + + /// {@return `uint32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_uint32(MemorySegment segment, long index) { return (int) VH_uint32.get(segment, 0L, index); } + /// {@return `uint32`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_uint32(MemorySegment segment) { return VkPerformanceCounterResultKHR.get_uint32(segment, 0L); } + /// {@return `uint32` at the given index} + /// @param index the index + public @CType("uint32_t") int uint32At(long index) { return VkPerformanceCounterResultKHR.get_uint32(this.segment(), index); } + /// {@return `uint32`} + public @CType("uint32_t") int uint32() { return VkPerformanceCounterResultKHR.get_uint32(this.segment()); } + /// Sets `uint32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uint32(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_uint32.set(segment, 0L, index, value); } + /// Sets `uint32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uint32(MemorySegment segment, @CType("uint32_t") int value) { VkPerformanceCounterResultKHR.set_uint32(segment, 0L, value); } + /// Sets `uint32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR uint32At(long index, @CType("uint32_t") int value) { VkPerformanceCounterResultKHR.set_uint32(this.segment(), index, value); return this; } + /// Sets `uint32` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR uint32(@CType("uint32_t") int value) { VkPerformanceCounterResultKHR.set_uint32(this.segment(), value); return this; } + + /// {@return `uint64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_uint64(MemorySegment segment, long index) { return (long) VH_uint64.get(segment, 0L, index); } + /// {@return `uint64`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_uint64(MemorySegment segment) { return VkPerformanceCounterResultKHR.get_uint64(segment, 0L); } + /// {@return `uint64` at the given index} + /// @param index the index + public @CType("uint64_t") long uint64At(long index) { return VkPerformanceCounterResultKHR.get_uint64(this.segment(), index); } + /// {@return `uint64`} + public @CType("uint64_t") long uint64() { return VkPerformanceCounterResultKHR.get_uint64(this.segment()); } + /// Sets `uint64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uint64(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_uint64.set(segment, 0L, index, value); } + /// Sets `uint64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uint64(MemorySegment segment, @CType("uint64_t") long value) { VkPerformanceCounterResultKHR.set_uint64(segment, 0L, value); } + /// Sets `uint64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR uint64At(long index, @CType("uint64_t") long value) { VkPerformanceCounterResultKHR.set_uint64(this.segment(), index, value); return this; } + /// Sets `uint64` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR uint64(@CType("uint64_t") long value) { VkPerformanceCounterResultKHR.set_uint64(this.segment(), value); return this; } + + /// {@return `float32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_float32(MemorySegment segment, long index) { return (float) VH_float32.get(segment, 0L, index); } + /// {@return `float32`} + /// @param segment the segment of the struct + public static @CType("float") float get_float32(MemorySegment segment) { return VkPerformanceCounterResultKHR.get_float32(segment, 0L); } + /// {@return `float32` at the given index} + /// @param index the index + public @CType("float") float float32At(long index) { return VkPerformanceCounterResultKHR.get_float32(this.segment(), index); } + /// {@return `float32`} + public @CType("float") float float32() { return VkPerformanceCounterResultKHR.get_float32(this.segment()); } + /// Sets `float32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_float32(MemorySegment segment, long index, @CType("float") float value) { VH_float32.set(segment, 0L, index, value); } + /// Sets `float32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_float32(MemorySegment segment, @CType("float") float value) { VkPerformanceCounterResultKHR.set_float32(segment, 0L, value); } + /// Sets `float32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR float32At(long index, @CType("float") float value) { VkPerformanceCounterResultKHR.set_float32(this.segment(), index, value); return this; } + /// Sets `float32` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR float32(@CType("float") float value) { VkPerformanceCounterResultKHR.set_float32(this.segment(), value); return this; } + + /// {@return `float64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("double") double get_float64(MemorySegment segment, long index) { return (double) VH_float64.get(segment, 0L, index); } + /// {@return `float64`} + /// @param segment the segment of the struct + public static @CType("double") double get_float64(MemorySegment segment) { return VkPerformanceCounterResultKHR.get_float64(segment, 0L); } + /// {@return `float64` at the given index} + /// @param index the index + public @CType("double") double float64At(long index) { return VkPerformanceCounterResultKHR.get_float64(this.segment(), index); } + /// {@return `float64`} + public @CType("double") double float64() { return VkPerformanceCounterResultKHR.get_float64(this.segment()); } + /// Sets `float64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_float64(MemorySegment segment, long index, @CType("double") double value) { VH_float64.set(segment, 0L, index, value); } + /// Sets `float64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_float64(MemorySegment segment, @CType("double") double value) { VkPerformanceCounterResultKHR.set_float64(segment, 0L, value); } + /// Sets `float64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR float64At(long index, @CType("double") double value) { VkPerformanceCounterResultKHR.set_float64(this.segment(), index, value); return this; } + /// Sets `float64` with the given value. + /// @param value the value + /// @return `this` + public VkPerformanceCounterResultKHR float64(@CType("double") double value) { VkPerformanceCounterResultKHR.set_float64(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkPipelineExecutableStatisticValueKHR.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkPipelineExecutableStatisticValueKHR.java new file mode 100644 index 00000000..d80f6d03 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/khr/union/VkPipelineExecutableStatisticValueKHR.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.khr.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### b32 +/// [VarHandle][#VH_b32] - [Getter][#b32()] - [Setter][#b32(int)] +/// ### i64 +/// [VarHandle][#VH_i64] - [Getter][#i64()] - [Setter][#i64(long)] +/// ### u64 +/// [VarHandle][#VH_u64] - [Getter][#u64()] - [Setter][#u64(long)] +/// ### f64 +/// [VarHandle][#VH_f64] - [Getter][#f64()] - [Setter][#f64(double)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkPipelineExecutableStatisticValueKHR { +/// VkBool32 b32; +/// int64_t i64; +/// uint64_t u64; +/// double f64; +/// } VkPipelineExecutableStatisticValueKHR; +/// ``` +public final class VkPipelineExecutableStatisticValueKHR extends Union { + /// The union layout of `VkPipelineExecutableStatisticValueKHR`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + ValueLayout.JAVA_INT.withName("b32"), + ValueLayout.JAVA_LONG.withName("i64"), + ValueLayout.JAVA_LONG.withName("u64"), + ValueLayout.JAVA_DOUBLE.withName("f64") + ); + /// The [VarHandle] of `b32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_b32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("b32")); + /// The [VarHandle] of `i64` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_i64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("i64")); + /// The [VarHandle] of `u64` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_u64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("u64")); + /// The [VarHandle] of `f64` of type `(MemorySegment base, long baseOffset, long index)double`. + public static final VarHandle VH_f64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("f64")); + + /// Creates `VkPipelineExecutableStatisticValueKHR` with the given segment. + /// @param segment the memory segment + public VkPipelineExecutableStatisticValueKHR(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineExecutableStatisticValueKHR` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableStatisticValueKHR of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableStatisticValueKHR(segment); } + + /// Creates `VkPipelineExecutableStatisticValueKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableStatisticValueKHR ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableStatisticValueKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineExecutableStatisticValueKHR` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineExecutableStatisticValueKHR ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineExecutableStatisticValueKHR(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineExecutableStatisticValueKHR` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineExecutableStatisticValueKHR` + public static VkPipelineExecutableStatisticValueKHR alloc(SegmentAllocator allocator) { return new VkPipelineExecutableStatisticValueKHR(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineExecutableStatisticValueKHR` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineExecutableStatisticValueKHR` + public static VkPipelineExecutableStatisticValueKHR alloc(SegmentAllocator allocator, long count) { return new VkPipelineExecutableStatisticValueKHR(allocator.allocate(LAYOUT, count)); } + + /// {@return `b32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_b32(MemorySegment segment, long index) { return (int) VH_b32.get(segment, 0L, index); } + /// {@return `b32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_b32(MemorySegment segment) { return VkPipelineExecutableStatisticValueKHR.get_b32(segment, 0L); } + /// {@return `b32` at the given index} + /// @param index the index + public @CType("VkBool32") int b32At(long index) { return VkPipelineExecutableStatisticValueKHR.get_b32(this.segment(), index); } + /// {@return `b32`} + public @CType("VkBool32") int b32() { return VkPipelineExecutableStatisticValueKHR.get_b32(this.segment()); } + /// Sets `b32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_b32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_b32.set(segment, 0L, index, value); } + /// Sets `b32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_b32(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineExecutableStatisticValueKHR.set_b32(segment, 0L, value); } + /// Sets `b32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticValueKHR b32At(long index, @CType("VkBool32") int value) { VkPipelineExecutableStatisticValueKHR.set_b32(this.segment(), index, value); return this; } + /// Sets `b32` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticValueKHR b32(@CType("VkBool32") int value) { VkPipelineExecutableStatisticValueKHR.set_b32(this.segment(), value); return this; } + + /// {@return `i64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int64_t") long get_i64(MemorySegment segment, long index) { return (long) VH_i64.get(segment, 0L, index); } + /// {@return `i64`} + /// @param segment the segment of the struct + public static @CType("int64_t") long get_i64(MemorySegment segment) { return VkPipelineExecutableStatisticValueKHR.get_i64(segment, 0L); } + /// {@return `i64` at the given index} + /// @param index the index + public @CType("int64_t") long i64At(long index) { return VkPipelineExecutableStatisticValueKHR.get_i64(this.segment(), index); } + /// {@return `i64`} + public @CType("int64_t") long i64() { return VkPipelineExecutableStatisticValueKHR.get_i64(this.segment()); } + /// Sets `i64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_i64(MemorySegment segment, long index, @CType("int64_t") long value) { VH_i64.set(segment, 0L, index, value); } + /// Sets `i64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_i64(MemorySegment segment, @CType("int64_t") long value) { VkPipelineExecutableStatisticValueKHR.set_i64(segment, 0L, value); } + /// Sets `i64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticValueKHR i64At(long index, @CType("int64_t") long value) { VkPipelineExecutableStatisticValueKHR.set_i64(this.segment(), index, value); return this; } + /// Sets `i64` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticValueKHR i64(@CType("int64_t") long value) { VkPipelineExecutableStatisticValueKHR.set_i64(this.segment(), value); return this; } + + /// {@return `u64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_u64(MemorySegment segment, long index) { return (long) VH_u64.get(segment, 0L, index); } + /// {@return `u64`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_u64(MemorySegment segment) { return VkPipelineExecutableStatisticValueKHR.get_u64(segment, 0L); } + /// {@return `u64` at the given index} + /// @param index the index + public @CType("uint64_t") long u64At(long index) { return VkPipelineExecutableStatisticValueKHR.get_u64(this.segment(), index); } + /// {@return `u64`} + public @CType("uint64_t") long u64() { return VkPipelineExecutableStatisticValueKHR.get_u64(this.segment()); } + /// Sets `u64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_u64(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_u64.set(segment, 0L, index, value); } + /// Sets `u64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_u64(MemorySegment segment, @CType("uint64_t") long value) { VkPipelineExecutableStatisticValueKHR.set_u64(segment, 0L, value); } + /// Sets `u64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticValueKHR u64At(long index, @CType("uint64_t") long value) { VkPipelineExecutableStatisticValueKHR.set_u64(this.segment(), index, value); return this; } + /// Sets `u64` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticValueKHR u64(@CType("uint64_t") long value) { VkPipelineExecutableStatisticValueKHR.set_u64(this.segment(), value); return this; } + + /// {@return `f64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("double") double get_f64(MemorySegment segment, long index) { return (double) VH_f64.get(segment, 0L, index); } + /// {@return `f64`} + /// @param segment the segment of the struct + public static @CType("double") double get_f64(MemorySegment segment) { return VkPipelineExecutableStatisticValueKHR.get_f64(segment, 0L); } + /// {@return `f64` at the given index} + /// @param index the index + public @CType("double") double f64At(long index) { return VkPipelineExecutableStatisticValueKHR.get_f64(this.segment(), index); } + /// {@return `f64`} + public @CType("double") double f64() { return VkPipelineExecutableStatisticValueKHR.get_f64(this.segment()); } + /// Sets `f64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_f64(MemorySegment segment, long index, @CType("double") double value) { VH_f64.set(segment, 0L, index, value); } + /// Sets `f64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_f64(MemorySegment segment, @CType("double") double value) { VkPipelineExecutableStatisticValueKHR.set_f64(segment, 0L, value); } + /// Sets `f64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticValueKHR f64At(long index, @CType("double") double value) { VkPipelineExecutableStatisticValueKHR.set_f64(this.segment(), index, value); return this; } + /// Sets `f64` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineExecutableStatisticValueKHR f64(@CType("double") double value) { VkPipelineExecutableStatisticValueKHR.set_f64(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/lunarg/VKLUNARGDirectDriverLoading.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/lunarg/VKLUNARGDirectDriverLoading.java new file mode 100644 index 00000000..7d836983 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/lunarg/VKLUNARGDirectDriverLoading.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.lunarg; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKLUNARGDirectDriverLoading { + public static final int VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG = 0; + public static final int VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG = 1; + public static final int VK_LUNARG_DIRECT_DRIVER_LOADING_SPEC_VERSION = 1; + public static final String VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME = "VK_LUNARG_direct_driver_loading"; + public static final int VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG = 1000459000; + public static final int VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG = 1000459001; + + public VKLUNARGDirectDriverLoading(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/lunarg/struct/VkDirectDriverLoadingInfoLUNARG.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/lunarg/struct/VkDirectDriverLoadingInfoLUNARG.java new file mode 100644 index 00000000..1c96d23c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/lunarg/struct/VkDirectDriverLoadingInfoLUNARG.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.lunarg.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pfnGetInstanceProcAddr +/// [VarHandle][#VH_pfnGetInstanceProcAddr] - [Getter][#pfnGetInstanceProcAddr()] - [Setter][#pfnGetInstanceProcAddr(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDirectDriverLoadingInfoLUNARG { +/// VkStructureType sType; +/// void * pNext; +/// VkDirectDriverLoadingFlagsLUNARG flags; +/// PFN_vkGetInstanceProcAddrLUNARG pfnGetInstanceProcAddr; +/// } VkDirectDriverLoadingInfoLUNARG; +/// ``` +public final class VkDirectDriverLoadingInfoLUNARG extends Struct { + /// The struct layout of `VkDirectDriverLoadingInfoLUNARG`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("pfnGetInstanceProcAddr") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pfnGetInstanceProcAddr` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pfnGetInstanceProcAddr = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pfnGetInstanceProcAddr")); + + /// Creates `VkDirectDriverLoadingInfoLUNARG` with the given segment. + /// @param segment the memory segment + public VkDirectDriverLoadingInfoLUNARG(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDirectDriverLoadingInfoLUNARG` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDirectDriverLoadingInfoLUNARG of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDirectDriverLoadingInfoLUNARG(segment); } + + /// Creates `VkDirectDriverLoadingInfoLUNARG` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDirectDriverLoadingInfoLUNARG ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDirectDriverLoadingInfoLUNARG(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDirectDriverLoadingInfoLUNARG` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDirectDriverLoadingInfoLUNARG ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDirectDriverLoadingInfoLUNARG(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDirectDriverLoadingInfoLUNARG` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDirectDriverLoadingInfoLUNARG` + public static VkDirectDriverLoadingInfoLUNARG alloc(SegmentAllocator allocator) { return new VkDirectDriverLoadingInfoLUNARG(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDirectDriverLoadingInfoLUNARG` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDirectDriverLoadingInfoLUNARG` + public static VkDirectDriverLoadingInfoLUNARG alloc(SegmentAllocator allocator, long count) { return new VkDirectDriverLoadingInfoLUNARG(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDirectDriverLoadingInfoLUNARG.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDirectDriverLoadingInfoLUNARG.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDirectDriverLoadingInfoLUNARG.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDirectDriverLoadingInfoLUNARG.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingInfoLUNARG sTypeAt(long index, @CType("VkStructureType") int value) { VkDirectDriverLoadingInfoLUNARG.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingInfoLUNARG sType(@CType("VkStructureType") int value) { VkDirectDriverLoadingInfoLUNARG.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDirectDriverLoadingInfoLUNARG.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDirectDriverLoadingInfoLUNARG.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDirectDriverLoadingInfoLUNARG.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingInfoLUNARG.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingInfoLUNARG pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingInfoLUNARG.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingInfoLUNARG pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingInfoLUNARG.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDirectDriverLoadingFlagsLUNARG") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDirectDriverLoadingFlagsLUNARG") int get_flags(MemorySegment segment) { return VkDirectDriverLoadingInfoLUNARG.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDirectDriverLoadingFlagsLUNARG") int flagsAt(long index) { return VkDirectDriverLoadingInfoLUNARG.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDirectDriverLoadingFlagsLUNARG") int flags() { return VkDirectDriverLoadingInfoLUNARG.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDirectDriverLoadingFlagsLUNARG") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDirectDriverLoadingFlagsLUNARG") int value) { VkDirectDriverLoadingInfoLUNARG.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingInfoLUNARG flagsAt(long index, @CType("VkDirectDriverLoadingFlagsLUNARG") int value) { VkDirectDriverLoadingInfoLUNARG.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingInfoLUNARG flags(@CType("VkDirectDriverLoadingFlagsLUNARG") int value) { VkDirectDriverLoadingInfoLUNARG.set_flags(this.segment(), value); return this; } + + /// {@return `pfnGetInstanceProcAddr` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("PFN_vkGetInstanceProcAddrLUNARG") java.lang.foreign.MemorySegment get_pfnGetInstanceProcAddr(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pfnGetInstanceProcAddr.get(segment, 0L, index); } + /// {@return `pfnGetInstanceProcAddr`} + /// @param segment the segment of the struct + public static @CType("PFN_vkGetInstanceProcAddrLUNARG") java.lang.foreign.MemorySegment get_pfnGetInstanceProcAddr(MemorySegment segment) { return VkDirectDriverLoadingInfoLUNARG.get_pfnGetInstanceProcAddr(segment, 0L); } + /// {@return `pfnGetInstanceProcAddr` at the given index} + /// @param index the index + public @CType("PFN_vkGetInstanceProcAddrLUNARG") java.lang.foreign.MemorySegment pfnGetInstanceProcAddrAt(long index) { return VkDirectDriverLoadingInfoLUNARG.get_pfnGetInstanceProcAddr(this.segment(), index); } + /// {@return `pfnGetInstanceProcAddr`} + public @CType("PFN_vkGetInstanceProcAddrLUNARG") java.lang.foreign.MemorySegment pfnGetInstanceProcAddr() { return VkDirectDriverLoadingInfoLUNARG.get_pfnGetInstanceProcAddr(this.segment()); } + /// Sets `pfnGetInstanceProcAddr` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pfnGetInstanceProcAddr(MemorySegment segment, long index, @CType("PFN_vkGetInstanceProcAddrLUNARG") java.lang.foreign.MemorySegment value) { VH_pfnGetInstanceProcAddr.set(segment, 0L, index, value); } + /// Sets `pfnGetInstanceProcAddr` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pfnGetInstanceProcAddr(MemorySegment segment, @CType("PFN_vkGetInstanceProcAddrLUNARG") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingInfoLUNARG.set_pfnGetInstanceProcAddr(segment, 0L, value); } + /// Sets `pfnGetInstanceProcAddr` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingInfoLUNARG pfnGetInstanceProcAddrAt(long index, @CType("PFN_vkGetInstanceProcAddrLUNARG") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingInfoLUNARG.set_pfnGetInstanceProcAddr(this.segment(), index, value); return this; } + /// Sets `pfnGetInstanceProcAddr` with the given value. + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingInfoLUNARG pfnGetInstanceProcAddr(@CType("PFN_vkGetInstanceProcAddrLUNARG") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingInfoLUNARG.set_pfnGetInstanceProcAddr(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/lunarg/struct/VkDirectDriverLoadingListLUNARG.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/lunarg/struct/VkDirectDriverLoadingListLUNARG.java new file mode 100644 index 00000000..1fbec008 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/lunarg/struct/VkDirectDriverLoadingListLUNARG.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.lunarg.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### mode +/// [VarHandle][#VH_mode] - [Getter][#mode()] - [Setter][#mode(int)] +/// ### driverCount +/// [VarHandle][#VH_driverCount] - [Getter][#driverCount()] - [Setter][#driverCount(int)] +/// ### pDrivers +/// [VarHandle][#VH_pDrivers] - [Getter][#pDrivers()] - [Setter][#pDrivers(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDirectDriverLoadingListLUNARG { +/// VkStructureType sType; +/// const void * pNext; +/// VkDirectDriverLoadingModeLUNARG mode; +/// uint32_t driverCount; +/// const VkDirectDriverLoadingInfoLUNARG * pDrivers; +/// } VkDirectDriverLoadingListLUNARG; +/// ``` +public final class VkDirectDriverLoadingListLUNARG extends Struct { + /// The struct layout of `VkDirectDriverLoadingListLUNARG`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("mode"), + ValueLayout.JAVA_INT.withName("driverCount"), + ValueLayout.ADDRESS.withName("pDrivers") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mode")); + /// The [VarHandle] of `driverCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_driverCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("driverCount")); + /// The [VarHandle] of `pDrivers` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDrivers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDrivers")); + + /// Creates `VkDirectDriverLoadingListLUNARG` with the given segment. + /// @param segment the memory segment + public VkDirectDriverLoadingListLUNARG(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDirectDriverLoadingListLUNARG` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDirectDriverLoadingListLUNARG of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDirectDriverLoadingListLUNARG(segment); } + + /// Creates `VkDirectDriverLoadingListLUNARG` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDirectDriverLoadingListLUNARG ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDirectDriverLoadingListLUNARG(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDirectDriverLoadingListLUNARG` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDirectDriverLoadingListLUNARG ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDirectDriverLoadingListLUNARG(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDirectDriverLoadingListLUNARG` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDirectDriverLoadingListLUNARG` + public static VkDirectDriverLoadingListLUNARG alloc(SegmentAllocator allocator) { return new VkDirectDriverLoadingListLUNARG(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDirectDriverLoadingListLUNARG` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDirectDriverLoadingListLUNARG` + public static VkDirectDriverLoadingListLUNARG alloc(SegmentAllocator allocator, long count) { return new VkDirectDriverLoadingListLUNARG(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDirectDriverLoadingListLUNARG.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDirectDriverLoadingListLUNARG.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDirectDriverLoadingListLUNARG.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDirectDriverLoadingListLUNARG.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingListLUNARG sTypeAt(long index, @CType("VkStructureType") int value) { VkDirectDriverLoadingListLUNARG.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingListLUNARG sType(@CType("VkStructureType") int value) { VkDirectDriverLoadingListLUNARG.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDirectDriverLoadingListLUNARG.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDirectDriverLoadingListLUNARG.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDirectDriverLoadingListLUNARG.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingListLUNARG.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingListLUNARG pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingListLUNARG.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingListLUNARG pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingListLUNARG.set_pNext(this.segment(), value); return this; } + + /// {@return `mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDirectDriverLoadingModeLUNARG") int get_mode(MemorySegment segment, long index) { return (int) VH_mode.get(segment, 0L, index); } + /// {@return `mode`} + /// @param segment the segment of the struct + public static @CType("VkDirectDriverLoadingModeLUNARG") int get_mode(MemorySegment segment) { return VkDirectDriverLoadingListLUNARG.get_mode(segment, 0L); } + /// {@return `mode` at the given index} + /// @param index the index + public @CType("VkDirectDriverLoadingModeLUNARG") int modeAt(long index) { return VkDirectDriverLoadingListLUNARG.get_mode(this.segment(), index); } + /// {@return `mode`} + public @CType("VkDirectDriverLoadingModeLUNARG") int mode() { return VkDirectDriverLoadingListLUNARG.get_mode(this.segment()); } + /// Sets `mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mode(MemorySegment segment, long index, @CType("VkDirectDriverLoadingModeLUNARG") int value) { VH_mode.set(segment, 0L, index, value); } + /// Sets `mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mode(MemorySegment segment, @CType("VkDirectDriverLoadingModeLUNARG") int value) { VkDirectDriverLoadingListLUNARG.set_mode(segment, 0L, value); } + /// Sets `mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingListLUNARG modeAt(long index, @CType("VkDirectDriverLoadingModeLUNARG") int value) { VkDirectDriverLoadingListLUNARG.set_mode(this.segment(), index, value); return this; } + /// Sets `mode` with the given value. + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingListLUNARG mode(@CType("VkDirectDriverLoadingModeLUNARG") int value) { VkDirectDriverLoadingListLUNARG.set_mode(this.segment(), value); return this; } + + /// {@return `driverCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_driverCount(MemorySegment segment, long index) { return (int) VH_driverCount.get(segment, 0L, index); } + /// {@return `driverCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_driverCount(MemorySegment segment) { return VkDirectDriverLoadingListLUNARG.get_driverCount(segment, 0L); } + /// {@return `driverCount` at the given index} + /// @param index the index + public @CType("uint32_t") int driverCountAt(long index) { return VkDirectDriverLoadingListLUNARG.get_driverCount(this.segment(), index); } + /// {@return `driverCount`} + public @CType("uint32_t") int driverCount() { return VkDirectDriverLoadingListLUNARG.get_driverCount(this.segment()); } + /// Sets `driverCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_driverCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_driverCount.set(segment, 0L, index, value); } + /// Sets `driverCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_driverCount(MemorySegment segment, @CType("uint32_t") int value) { VkDirectDriverLoadingListLUNARG.set_driverCount(segment, 0L, value); } + /// Sets `driverCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingListLUNARG driverCountAt(long index, @CType("uint32_t") int value) { VkDirectDriverLoadingListLUNARG.set_driverCount(this.segment(), index, value); return this; } + /// Sets `driverCount` with the given value. + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingListLUNARG driverCount(@CType("uint32_t") int value) { VkDirectDriverLoadingListLUNARG.set_driverCount(this.segment(), value); return this; } + + /// {@return `pDrivers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDirectDriverLoadingInfoLUNARG *") java.lang.foreign.MemorySegment get_pDrivers(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDrivers.get(segment, 0L, index); } + /// {@return `pDrivers`} + /// @param segment the segment of the struct + public static @CType("const VkDirectDriverLoadingInfoLUNARG *") java.lang.foreign.MemorySegment get_pDrivers(MemorySegment segment) { return VkDirectDriverLoadingListLUNARG.get_pDrivers(segment, 0L); } + /// {@return `pDrivers` at the given index} + /// @param index the index + public @CType("const VkDirectDriverLoadingInfoLUNARG *") java.lang.foreign.MemorySegment pDriversAt(long index) { return VkDirectDriverLoadingListLUNARG.get_pDrivers(this.segment(), index); } + /// {@return `pDrivers`} + public @CType("const VkDirectDriverLoadingInfoLUNARG *") java.lang.foreign.MemorySegment pDrivers() { return VkDirectDriverLoadingListLUNARG.get_pDrivers(this.segment()); } + /// Sets `pDrivers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDrivers(MemorySegment segment, long index, @CType("const VkDirectDriverLoadingInfoLUNARG *") java.lang.foreign.MemorySegment value) { VH_pDrivers.set(segment, 0L, index, value); } + /// Sets `pDrivers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDrivers(MemorySegment segment, @CType("const VkDirectDriverLoadingInfoLUNARG *") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingListLUNARG.set_pDrivers(segment, 0L, value); } + /// Sets `pDrivers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingListLUNARG pDriversAt(long index, @CType("const VkDirectDriverLoadingInfoLUNARG *") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingListLUNARG.set_pDrivers(this.segment(), index, value); return this; } + /// Sets `pDrivers` with the given value. + /// @param value the value + /// @return `this` + public VkDirectDriverLoadingListLUNARG pDrivers(@CType("const VkDirectDriverLoadingInfoLUNARG *") java.lang.foreign.MemorySegment value) { VkDirectDriverLoadingListLUNARG.set_pDrivers(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/VKMESAImageAlignmentControl.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/VKMESAImageAlignmentControl.java new file mode 100644 index 00000000..3e7af6ca --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/VKMESAImageAlignmentControl.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.mesa; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKMESAImageAlignmentControl { + public static final int VK_MESA_IMAGE_ALIGNMENT_CONTROL_SPEC_VERSION = 1; + public static final String VK_MESA_IMAGE_ALIGNMENT_CONTROL_EXTENSION_NAME = "VK_MESA_image_alignment_control"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_FEATURES_MESA = 1000575000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_PROPERTIES_MESA = 1000575001; + public static final int VK_STRUCTURE_TYPE_IMAGE_ALIGNMENT_CONTROL_CREATE_INFO_MESA = 1000575002; + + public VKMESAImageAlignmentControl(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/struct/VkImageAlignmentControlCreateInfoMESA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/struct/VkImageAlignmentControlCreateInfoMESA.java new file mode 100644 index 00000000..58c7eabe --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/struct/VkImageAlignmentControlCreateInfoMESA.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.mesa.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maximumRequestedAlignment +/// [VarHandle][#VH_maximumRequestedAlignment] - [Getter][#maximumRequestedAlignment()] - [Setter][#maximumRequestedAlignment(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageAlignmentControlCreateInfoMESA { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t maximumRequestedAlignment; +/// } VkImageAlignmentControlCreateInfoMESA; +/// ``` +public final class VkImageAlignmentControlCreateInfoMESA extends Struct { + /// The struct layout of `VkImageAlignmentControlCreateInfoMESA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maximumRequestedAlignment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maximumRequestedAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maximumRequestedAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maximumRequestedAlignment")); + + /// Creates `VkImageAlignmentControlCreateInfoMESA` with the given segment. + /// @param segment the memory segment + public VkImageAlignmentControlCreateInfoMESA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageAlignmentControlCreateInfoMESA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageAlignmentControlCreateInfoMESA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageAlignmentControlCreateInfoMESA(segment); } + + /// Creates `VkImageAlignmentControlCreateInfoMESA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageAlignmentControlCreateInfoMESA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageAlignmentControlCreateInfoMESA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageAlignmentControlCreateInfoMESA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageAlignmentControlCreateInfoMESA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageAlignmentControlCreateInfoMESA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageAlignmentControlCreateInfoMESA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageAlignmentControlCreateInfoMESA` + public static VkImageAlignmentControlCreateInfoMESA alloc(SegmentAllocator allocator) { return new VkImageAlignmentControlCreateInfoMESA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageAlignmentControlCreateInfoMESA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageAlignmentControlCreateInfoMESA` + public static VkImageAlignmentControlCreateInfoMESA alloc(SegmentAllocator allocator, long count) { return new VkImageAlignmentControlCreateInfoMESA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageAlignmentControlCreateInfoMESA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageAlignmentControlCreateInfoMESA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageAlignmentControlCreateInfoMESA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageAlignmentControlCreateInfoMESA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageAlignmentControlCreateInfoMESA sTypeAt(long index, @CType("VkStructureType") int value) { VkImageAlignmentControlCreateInfoMESA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageAlignmentControlCreateInfoMESA sType(@CType("VkStructureType") int value) { VkImageAlignmentControlCreateInfoMESA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageAlignmentControlCreateInfoMESA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageAlignmentControlCreateInfoMESA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageAlignmentControlCreateInfoMESA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageAlignmentControlCreateInfoMESA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageAlignmentControlCreateInfoMESA pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageAlignmentControlCreateInfoMESA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageAlignmentControlCreateInfoMESA pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageAlignmentControlCreateInfoMESA.set_pNext(this.segment(), value); return this; } + + /// {@return `maximumRequestedAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maximumRequestedAlignment(MemorySegment segment, long index) { return (int) VH_maximumRequestedAlignment.get(segment, 0L, index); } + /// {@return `maximumRequestedAlignment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maximumRequestedAlignment(MemorySegment segment) { return VkImageAlignmentControlCreateInfoMESA.get_maximumRequestedAlignment(segment, 0L); } + /// {@return `maximumRequestedAlignment` at the given index} + /// @param index the index + public @CType("uint32_t") int maximumRequestedAlignmentAt(long index) { return VkImageAlignmentControlCreateInfoMESA.get_maximumRequestedAlignment(this.segment(), index); } + /// {@return `maximumRequestedAlignment`} + public @CType("uint32_t") int maximumRequestedAlignment() { return VkImageAlignmentControlCreateInfoMESA.get_maximumRequestedAlignment(this.segment()); } + /// Sets `maximumRequestedAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maximumRequestedAlignment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maximumRequestedAlignment.set(segment, 0L, index, value); } + /// Sets `maximumRequestedAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maximumRequestedAlignment(MemorySegment segment, @CType("uint32_t") int value) { VkImageAlignmentControlCreateInfoMESA.set_maximumRequestedAlignment(segment, 0L, value); } + /// Sets `maximumRequestedAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageAlignmentControlCreateInfoMESA maximumRequestedAlignmentAt(long index, @CType("uint32_t") int value) { VkImageAlignmentControlCreateInfoMESA.set_maximumRequestedAlignment(this.segment(), index, value); return this; } + /// Sets `maximumRequestedAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkImageAlignmentControlCreateInfoMESA maximumRequestedAlignment(@CType("uint32_t") int value) { VkImageAlignmentControlCreateInfoMESA.set_maximumRequestedAlignment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/struct/VkPhysicalDeviceImageAlignmentControlFeaturesMESA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/struct/VkPhysicalDeviceImageAlignmentControlFeaturesMESA.java new file mode 100644 index 00000000..119fad18 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/struct/VkPhysicalDeviceImageAlignmentControlFeaturesMESA.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.mesa.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageAlignmentControl +/// [VarHandle][#VH_imageAlignmentControl] - [Getter][#imageAlignmentControl()] - [Setter][#imageAlignmentControl(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageAlignmentControlFeaturesMESA { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 imageAlignmentControl; +/// } VkPhysicalDeviceImageAlignmentControlFeaturesMESA; +/// ``` +public final class VkPhysicalDeviceImageAlignmentControlFeaturesMESA extends Struct { + /// The struct layout of `VkPhysicalDeviceImageAlignmentControlFeaturesMESA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("imageAlignmentControl") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageAlignmentControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageAlignmentControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageAlignmentControl")); + + /// Creates `VkPhysicalDeviceImageAlignmentControlFeaturesMESA` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageAlignmentControlFeaturesMESA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageAlignmentControlFeaturesMESA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageAlignmentControlFeaturesMESA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageAlignmentControlFeaturesMESA(segment); } + + /// Creates `VkPhysicalDeviceImageAlignmentControlFeaturesMESA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageAlignmentControlFeaturesMESA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageAlignmentControlFeaturesMESA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageAlignmentControlFeaturesMESA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageAlignmentControlFeaturesMESA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageAlignmentControlFeaturesMESA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageAlignmentControlFeaturesMESA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageAlignmentControlFeaturesMESA` + public static VkPhysicalDeviceImageAlignmentControlFeaturesMESA alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageAlignmentControlFeaturesMESA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageAlignmentControlFeaturesMESA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageAlignmentControlFeaturesMESA` + public static VkPhysicalDeviceImageAlignmentControlFeaturesMESA alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageAlignmentControlFeaturesMESA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageAlignmentControlFeaturesMESA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageAlignmentControlFeaturesMESA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageAlignmentControlFeaturesMESA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageAlignmentControlFeaturesMESA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlFeaturesMESA sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageAlignmentControlFeaturesMESA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlFeaturesMESA sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageAlignmentControlFeaturesMESA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageAlignmentControlFeaturesMESA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageAlignmentControlFeaturesMESA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageAlignmentControlFeaturesMESA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageAlignmentControlFeaturesMESA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlFeaturesMESA pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageAlignmentControlFeaturesMESA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlFeaturesMESA pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageAlignmentControlFeaturesMESA.set_pNext(this.segment(), value); return this; } + + /// {@return `imageAlignmentControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imageAlignmentControl(MemorySegment segment, long index) { return (int) VH_imageAlignmentControl.get(segment, 0L, index); } + /// {@return `imageAlignmentControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imageAlignmentControl(MemorySegment segment) { return VkPhysicalDeviceImageAlignmentControlFeaturesMESA.get_imageAlignmentControl(segment, 0L); } + /// {@return `imageAlignmentControl` at the given index} + /// @param index the index + public @CType("VkBool32") int imageAlignmentControlAt(long index) { return VkPhysicalDeviceImageAlignmentControlFeaturesMESA.get_imageAlignmentControl(this.segment(), index); } + /// {@return `imageAlignmentControl`} + public @CType("VkBool32") int imageAlignmentControl() { return VkPhysicalDeviceImageAlignmentControlFeaturesMESA.get_imageAlignmentControl(this.segment()); } + /// Sets `imageAlignmentControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageAlignmentControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imageAlignmentControl.set(segment, 0L, index, value); } + /// Sets `imageAlignmentControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageAlignmentControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImageAlignmentControlFeaturesMESA.set_imageAlignmentControl(segment, 0L, value); } + /// Sets `imageAlignmentControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlFeaturesMESA imageAlignmentControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImageAlignmentControlFeaturesMESA.set_imageAlignmentControl(this.segment(), index, value); return this; } + /// Sets `imageAlignmentControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlFeaturesMESA imageAlignmentControl(@CType("VkBool32") int value) { VkPhysicalDeviceImageAlignmentControlFeaturesMESA.set_imageAlignmentControl(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/struct/VkPhysicalDeviceImageAlignmentControlPropertiesMESA.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/struct/VkPhysicalDeviceImageAlignmentControlPropertiesMESA.java new file mode 100644 index 00000000..8540df50 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mesa/struct/VkPhysicalDeviceImageAlignmentControlPropertiesMESA.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.mesa.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### supportedImageAlignmentMask +/// [VarHandle][#VH_supportedImageAlignmentMask] - [Getter][#supportedImageAlignmentMask()] - [Setter][#supportedImageAlignmentMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageAlignmentControlPropertiesMESA { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t supportedImageAlignmentMask; +/// } VkPhysicalDeviceImageAlignmentControlPropertiesMESA; +/// ``` +public final class VkPhysicalDeviceImageAlignmentControlPropertiesMESA extends Struct { + /// The struct layout of `VkPhysicalDeviceImageAlignmentControlPropertiesMESA`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("supportedImageAlignmentMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `supportedImageAlignmentMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedImageAlignmentMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedImageAlignmentMask")); + + /// Creates `VkPhysicalDeviceImageAlignmentControlPropertiesMESA` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageAlignmentControlPropertiesMESA(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageAlignmentControlPropertiesMESA` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageAlignmentControlPropertiesMESA of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageAlignmentControlPropertiesMESA(segment); } + + /// Creates `VkPhysicalDeviceImageAlignmentControlPropertiesMESA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageAlignmentControlPropertiesMESA ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageAlignmentControlPropertiesMESA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageAlignmentControlPropertiesMESA` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageAlignmentControlPropertiesMESA ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageAlignmentControlPropertiesMESA(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageAlignmentControlPropertiesMESA` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageAlignmentControlPropertiesMESA` + public static VkPhysicalDeviceImageAlignmentControlPropertiesMESA alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageAlignmentControlPropertiesMESA(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageAlignmentControlPropertiesMESA` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageAlignmentControlPropertiesMESA` + public static VkPhysicalDeviceImageAlignmentControlPropertiesMESA alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageAlignmentControlPropertiesMESA(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageAlignmentControlPropertiesMESA.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageAlignmentControlPropertiesMESA.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageAlignmentControlPropertiesMESA.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageAlignmentControlPropertiesMESA.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlPropertiesMESA sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageAlignmentControlPropertiesMESA.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlPropertiesMESA sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageAlignmentControlPropertiesMESA.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageAlignmentControlPropertiesMESA.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageAlignmentControlPropertiesMESA.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageAlignmentControlPropertiesMESA.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageAlignmentControlPropertiesMESA.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlPropertiesMESA pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageAlignmentControlPropertiesMESA.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlPropertiesMESA pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageAlignmentControlPropertiesMESA.set_pNext(this.segment(), value); return this; } + + /// {@return `supportedImageAlignmentMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_supportedImageAlignmentMask(MemorySegment segment, long index) { return (int) VH_supportedImageAlignmentMask.get(segment, 0L, index); } + /// {@return `supportedImageAlignmentMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_supportedImageAlignmentMask(MemorySegment segment) { return VkPhysicalDeviceImageAlignmentControlPropertiesMESA.get_supportedImageAlignmentMask(segment, 0L); } + /// {@return `supportedImageAlignmentMask` at the given index} + /// @param index the index + public @CType("uint32_t") int supportedImageAlignmentMaskAt(long index) { return VkPhysicalDeviceImageAlignmentControlPropertiesMESA.get_supportedImageAlignmentMask(this.segment(), index); } + /// {@return `supportedImageAlignmentMask`} + public @CType("uint32_t") int supportedImageAlignmentMask() { return VkPhysicalDeviceImageAlignmentControlPropertiesMESA.get_supportedImageAlignmentMask(this.segment()); } + /// Sets `supportedImageAlignmentMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedImageAlignmentMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_supportedImageAlignmentMask.set(segment, 0L, index, value); } + /// Sets `supportedImageAlignmentMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedImageAlignmentMask(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceImageAlignmentControlPropertiesMESA.set_supportedImageAlignmentMask(segment, 0L, value); } + /// Sets `supportedImageAlignmentMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlPropertiesMESA supportedImageAlignmentMaskAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceImageAlignmentControlPropertiesMESA.set_supportedImageAlignmentMask(this.segment(), index, value); return this; } + /// Sets `supportedImageAlignmentMask` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageAlignmentControlPropertiesMESA supportedImageAlignmentMask(@CType("uint32_t") int value) { VkPhysicalDeviceImageAlignmentControlPropertiesMESA.set_supportedImageAlignmentMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/msft/VKMSFTLayeredDriver.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/msft/VKMSFTLayeredDriver.java new file mode 100644 index 00000000..5e5f3d88 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/msft/VKMSFTLayeredDriver.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.msft; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKMSFTLayeredDriver { + public static final int VK_LAYERED_DRIVER_UNDERLYING_API_NONE_MSFT = 0; + public static final int VK_LAYERED_DRIVER_UNDERLYING_API_D3D12_MSFT = 1; + public static final int VK_MSFT_LAYERED_DRIVER_SPEC_VERSION = 1; + public static final String VK_MSFT_LAYERED_DRIVER_EXTENSION_NAME = "VK_MSFT_layered_driver"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT = 1000530000; + + public VKMSFTLayeredDriver(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/msft/struct/VkPhysicalDeviceLayeredDriverPropertiesMSFT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/msft/struct/VkPhysicalDeviceLayeredDriverPropertiesMSFT.java new file mode 100644 index 00000000..fdfa65d0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/msft/struct/VkPhysicalDeviceLayeredDriverPropertiesMSFT.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.msft.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### underlyingAPI +/// [VarHandle][#VH_underlyingAPI] - [Getter][#underlyingAPI()] - [Setter][#underlyingAPI(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLayeredDriverPropertiesMSFT { +/// VkStructureType sType; +/// void * pNext; +/// VkLayeredDriverUnderlyingApiMSFT underlyingAPI; +/// } VkPhysicalDeviceLayeredDriverPropertiesMSFT; +/// ``` +public final class VkPhysicalDeviceLayeredDriverPropertiesMSFT extends Struct { + /// The struct layout of `VkPhysicalDeviceLayeredDriverPropertiesMSFT`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("underlyingAPI") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `underlyingAPI` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_underlyingAPI = LAYOUT.arrayElementVarHandle(PathElement.groupElement("underlyingAPI")); + + /// Creates `VkPhysicalDeviceLayeredDriverPropertiesMSFT` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLayeredDriverPropertiesMSFT(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLayeredDriverPropertiesMSFT` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredDriverPropertiesMSFT of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredDriverPropertiesMSFT(segment); } + + /// Creates `VkPhysicalDeviceLayeredDriverPropertiesMSFT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredDriverPropertiesMSFT ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredDriverPropertiesMSFT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLayeredDriverPropertiesMSFT` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLayeredDriverPropertiesMSFT ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLayeredDriverPropertiesMSFT(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLayeredDriverPropertiesMSFT` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLayeredDriverPropertiesMSFT` + public static VkPhysicalDeviceLayeredDriverPropertiesMSFT alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLayeredDriverPropertiesMSFT(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLayeredDriverPropertiesMSFT` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLayeredDriverPropertiesMSFT` + public static VkPhysicalDeviceLayeredDriverPropertiesMSFT alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLayeredDriverPropertiesMSFT(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceLayeredDriverPropertiesMSFT.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceLayeredDriverPropertiesMSFT.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceLayeredDriverPropertiesMSFT.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceLayeredDriverPropertiesMSFT.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredDriverPropertiesMSFT sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceLayeredDriverPropertiesMSFT.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredDriverPropertiesMSFT sType(@CType("VkStructureType") int value) { VkPhysicalDeviceLayeredDriverPropertiesMSFT.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceLayeredDriverPropertiesMSFT.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceLayeredDriverPropertiesMSFT.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceLayeredDriverPropertiesMSFT.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredDriverPropertiesMSFT.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredDriverPropertiesMSFT pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredDriverPropertiesMSFT.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredDriverPropertiesMSFT pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLayeredDriverPropertiesMSFT.set_pNext(this.segment(), value); return this; } + + /// {@return `underlyingAPI` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkLayeredDriverUnderlyingApiMSFT") int get_underlyingAPI(MemorySegment segment, long index) { return (int) VH_underlyingAPI.get(segment, 0L, index); } + /// {@return `underlyingAPI`} + /// @param segment the segment of the struct + public static @CType("VkLayeredDriverUnderlyingApiMSFT") int get_underlyingAPI(MemorySegment segment) { return VkPhysicalDeviceLayeredDriverPropertiesMSFT.get_underlyingAPI(segment, 0L); } + /// {@return `underlyingAPI` at the given index} + /// @param index the index + public @CType("VkLayeredDriverUnderlyingApiMSFT") int underlyingAPIAt(long index) { return VkPhysicalDeviceLayeredDriverPropertiesMSFT.get_underlyingAPI(this.segment(), index); } + /// {@return `underlyingAPI`} + public @CType("VkLayeredDriverUnderlyingApiMSFT") int underlyingAPI() { return VkPhysicalDeviceLayeredDriverPropertiesMSFT.get_underlyingAPI(this.segment()); } + /// Sets `underlyingAPI` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_underlyingAPI(MemorySegment segment, long index, @CType("VkLayeredDriverUnderlyingApiMSFT") int value) { VH_underlyingAPI.set(segment, 0L, index, value); } + /// Sets `underlyingAPI` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_underlyingAPI(MemorySegment segment, @CType("VkLayeredDriverUnderlyingApiMSFT") int value) { VkPhysicalDeviceLayeredDriverPropertiesMSFT.set_underlyingAPI(segment, 0L, value); } + /// Sets `underlyingAPI` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredDriverPropertiesMSFT underlyingAPIAt(long index, @CType("VkLayeredDriverUnderlyingApiMSFT") int value) { VkPhysicalDeviceLayeredDriverPropertiesMSFT.set_underlyingAPI(this.segment(), index, value); return this; } + /// Sets `underlyingAPI` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLayeredDriverPropertiesMSFT underlyingAPI(@CType("VkLayeredDriverUnderlyingApiMSFT") int value) { VkPhysicalDeviceLayeredDriverPropertiesMSFT.set_underlyingAPI(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/VKMVKIosSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/VKMVKIosSurface.java new file mode 100644 index 00000000..f0e002da --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/VKMVKIosSurface.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.mvk; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKMVKIosSurface { + public static final int VK_MVK_IOS_SURFACE_SPEC_VERSION = 3; + public static final String VK_MVK_IOS_SURFACE_EXTENSION_NAME = "VK_MVK_ios_surface"; + public static final int VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000; + public static final MethodHandle MH_vkCreateIOSSurfaceMVK = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateIOSSurfaceMVK; + + public VKMVKIosSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateIOSSurfaceMVK = func.invoke(instance, "vkCreateIOSSurfaceMVK"); + } + + public @CType("VkResult") int CreateIOSSurfaceMVK(@CType("VkInstance") MemorySegment instance, @CType("const VkIOSSurfaceCreateInfoMVK *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateIOSSurfaceMVK)) throw new SymbolNotFoundError("Symbol not found: vkCreateIOSSurfaceMVK"); + try { return (int) MH_vkCreateIOSSurfaceMVK.invokeExact(PFN_vkCreateIOSSurfaceMVK, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateIOSSurfaceMVK", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/VKMVKMacosSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/VKMVKMacosSurface.java new file mode 100644 index 00000000..0fe162f1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/VKMVKMacosSurface.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.mvk; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKMVKMacosSurface { + public static final int VK_MVK_MACOS_SURFACE_SPEC_VERSION = 3; + public static final String VK_MVK_MACOS_SURFACE_EXTENSION_NAME = "VK_MVK_macos_surface"; + public static final int VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000; + public static final MethodHandle MH_vkCreateMacOSSurfaceMVK = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateMacOSSurfaceMVK; + + public VKMVKMacosSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateMacOSSurfaceMVK = func.invoke(instance, "vkCreateMacOSSurfaceMVK"); + } + + public @CType("VkResult") int CreateMacOSSurfaceMVK(@CType("VkInstance") MemorySegment instance, @CType("const VkMacOSSurfaceCreateInfoMVK *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateMacOSSurfaceMVK)) throw new SymbolNotFoundError("Symbol not found: vkCreateMacOSSurfaceMVK"); + try { return (int) MH_vkCreateMacOSSurfaceMVK.invokeExact(PFN_vkCreateMacOSSurfaceMVK, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateMacOSSurfaceMVK", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/struct/VkIOSSurfaceCreateInfoMVK.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/struct/VkIOSSurfaceCreateInfoMVK.java new file mode 100644 index 00000000..7efc36c7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/struct/VkIOSSurfaceCreateInfoMVK.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.mvk.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pView +/// [VarHandle][#VH_pView] - [Getter][#pView()] - [Setter][#pView(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIOSSurfaceCreateInfoMVK { +/// VkStructureType sType; +/// const void * pNext; +/// VkIOSSurfaceCreateFlagsMVK flags; +/// const void * pView; +/// } VkIOSSurfaceCreateInfoMVK; +/// ``` +public final class VkIOSSurfaceCreateInfoMVK extends Struct { + /// The struct layout of `VkIOSSurfaceCreateInfoMVK`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("pView") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pView")); + + /// Creates `VkIOSSurfaceCreateInfoMVK` with the given segment. + /// @param segment the memory segment + public VkIOSSurfaceCreateInfoMVK(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIOSSurfaceCreateInfoMVK` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIOSSurfaceCreateInfoMVK of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIOSSurfaceCreateInfoMVK(segment); } + + /// Creates `VkIOSSurfaceCreateInfoMVK` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIOSSurfaceCreateInfoMVK ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIOSSurfaceCreateInfoMVK(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIOSSurfaceCreateInfoMVK` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIOSSurfaceCreateInfoMVK ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIOSSurfaceCreateInfoMVK(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIOSSurfaceCreateInfoMVK` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIOSSurfaceCreateInfoMVK` + public static VkIOSSurfaceCreateInfoMVK alloc(SegmentAllocator allocator) { return new VkIOSSurfaceCreateInfoMVK(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIOSSurfaceCreateInfoMVK` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIOSSurfaceCreateInfoMVK` + public static VkIOSSurfaceCreateInfoMVK alloc(SegmentAllocator allocator, long count) { return new VkIOSSurfaceCreateInfoMVK(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkIOSSurfaceCreateInfoMVK.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkIOSSurfaceCreateInfoMVK.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkIOSSurfaceCreateInfoMVK.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkIOSSurfaceCreateInfoMVK.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIOSSurfaceCreateInfoMVK sTypeAt(long index, @CType("VkStructureType") int value) { VkIOSSurfaceCreateInfoMVK.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkIOSSurfaceCreateInfoMVK sType(@CType("VkStructureType") int value) { VkIOSSurfaceCreateInfoMVK.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkIOSSurfaceCreateInfoMVK.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkIOSSurfaceCreateInfoMVK.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkIOSSurfaceCreateInfoMVK.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIOSSurfaceCreateInfoMVK.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIOSSurfaceCreateInfoMVK pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIOSSurfaceCreateInfoMVK.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkIOSSurfaceCreateInfoMVK pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkIOSSurfaceCreateInfoMVK.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIOSSurfaceCreateFlagsMVK") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkIOSSurfaceCreateFlagsMVK") int get_flags(MemorySegment segment) { return VkIOSSurfaceCreateInfoMVK.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkIOSSurfaceCreateFlagsMVK") int flagsAt(long index) { return VkIOSSurfaceCreateInfoMVK.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkIOSSurfaceCreateFlagsMVK") int flags() { return VkIOSSurfaceCreateInfoMVK.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkIOSSurfaceCreateFlagsMVK") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkIOSSurfaceCreateFlagsMVK") int value) { VkIOSSurfaceCreateInfoMVK.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIOSSurfaceCreateInfoMVK flagsAt(long index, @CType("VkIOSSurfaceCreateFlagsMVK") int value) { VkIOSSurfaceCreateInfoMVK.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkIOSSurfaceCreateInfoMVK flags(@CType("VkIOSSurfaceCreateFlagsMVK") int value) { VkIOSSurfaceCreateInfoMVK.set_flags(this.segment(), value); return this; } + + /// {@return `pView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pView.get(segment, 0L, index); } + /// {@return `pView`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pView(MemorySegment segment) { return VkIOSSurfaceCreateInfoMVK.get_pView(segment, 0L); } + /// {@return `pView` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pViewAt(long index) { return VkIOSSurfaceCreateInfoMVK.get_pView(this.segment(), index); } + /// {@return `pView`} + public @CType("const void *") java.lang.foreign.MemorySegment pView() { return VkIOSSurfaceCreateInfoMVK.get_pView(this.segment()); } + /// Sets `pView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pView(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pView.set(segment, 0L, index, value); } + /// Sets `pView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pView(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIOSSurfaceCreateInfoMVK.set_pView(segment, 0L, value); } + /// Sets `pView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIOSSurfaceCreateInfoMVK pViewAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIOSSurfaceCreateInfoMVK.set_pView(this.segment(), index, value); return this; } + /// Sets `pView` with the given value. + /// @param value the value + /// @return `this` + public VkIOSSurfaceCreateInfoMVK pView(@CType("const void *") java.lang.foreign.MemorySegment value) { VkIOSSurfaceCreateInfoMVK.set_pView(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/struct/VkMacOSSurfaceCreateInfoMVK.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/struct/VkMacOSSurfaceCreateInfoMVK.java new file mode 100644 index 00000000..61427842 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/mvk/struct/VkMacOSSurfaceCreateInfoMVK.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.mvk.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pView +/// [VarHandle][#VH_pView] - [Getter][#pView()] - [Setter][#pView(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMacOSSurfaceCreateInfoMVK { +/// VkStructureType sType; +/// const void * pNext; +/// VkMacOSSurfaceCreateFlagsMVK flags; +/// const void * pView; +/// } VkMacOSSurfaceCreateInfoMVK; +/// ``` +public final class VkMacOSSurfaceCreateInfoMVK extends Struct { + /// The struct layout of `VkMacOSSurfaceCreateInfoMVK`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("pView") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pView")); + + /// Creates `VkMacOSSurfaceCreateInfoMVK` with the given segment. + /// @param segment the memory segment + public VkMacOSSurfaceCreateInfoMVK(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMacOSSurfaceCreateInfoMVK` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMacOSSurfaceCreateInfoMVK of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMacOSSurfaceCreateInfoMVK(segment); } + + /// Creates `VkMacOSSurfaceCreateInfoMVK` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMacOSSurfaceCreateInfoMVK ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMacOSSurfaceCreateInfoMVK(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMacOSSurfaceCreateInfoMVK` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMacOSSurfaceCreateInfoMVK ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMacOSSurfaceCreateInfoMVK(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMacOSSurfaceCreateInfoMVK` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMacOSSurfaceCreateInfoMVK` + public static VkMacOSSurfaceCreateInfoMVK alloc(SegmentAllocator allocator) { return new VkMacOSSurfaceCreateInfoMVK(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMacOSSurfaceCreateInfoMVK` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMacOSSurfaceCreateInfoMVK` + public static VkMacOSSurfaceCreateInfoMVK alloc(SegmentAllocator allocator, long count) { return new VkMacOSSurfaceCreateInfoMVK(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMacOSSurfaceCreateInfoMVK.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMacOSSurfaceCreateInfoMVK.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMacOSSurfaceCreateInfoMVK.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMacOSSurfaceCreateInfoMVK.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMacOSSurfaceCreateInfoMVK sTypeAt(long index, @CType("VkStructureType") int value) { VkMacOSSurfaceCreateInfoMVK.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMacOSSurfaceCreateInfoMVK sType(@CType("VkStructureType") int value) { VkMacOSSurfaceCreateInfoMVK.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMacOSSurfaceCreateInfoMVK.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMacOSSurfaceCreateInfoMVK.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMacOSSurfaceCreateInfoMVK.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMacOSSurfaceCreateInfoMVK.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMacOSSurfaceCreateInfoMVK pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMacOSSurfaceCreateInfoMVK.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMacOSSurfaceCreateInfoMVK pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMacOSSurfaceCreateInfoMVK.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMacOSSurfaceCreateFlagsMVK") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkMacOSSurfaceCreateFlagsMVK") int get_flags(MemorySegment segment) { return VkMacOSSurfaceCreateInfoMVK.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkMacOSSurfaceCreateFlagsMVK") int flagsAt(long index) { return VkMacOSSurfaceCreateInfoMVK.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkMacOSSurfaceCreateFlagsMVK") int flags() { return VkMacOSSurfaceCreateInfoMVK.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkMacOSSurfaceCreateFlagsMVK") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkMacOSSurfaceCreateFlagsMVK") int value) { VkMacOSSurfaceCreateInfoMVK.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMacOSSurfaceCreateInfoMVK flagsAt(long index, @CType("VkMacOSSurfaceCreateFlagsMVK") int value) { VkMacOSSurfaceCreateInfoMVK.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkMacOSSurfaceCreateInfoMVK flags(@CType("VkMacOSSurfaceCreateFlagsMVK") int value) { VkMacOSSurfaceCreateInfoMVK.set_flags(this.segment(), value); return this; } + + /// {@return `pView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pView.get(segment, 0L, index); } + /// {@return `pView`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pView(MemorySegment segment) { return VkMacOSSurfaceCreateInfoMVK.get_pView(segment, 0L); } + /// {@return `pView` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pViewAt(long index) { return VkMacOSSurfaceCreateInfoMVK.get_pView(this.segment(), index); } + /// {@return `pView`} + public @CType("const void *") java.lang.foreign.MemorySegment pView() { return VkMacOSSurfaceCreateInfoMVK.get_pView(this.segment()); } + /// Sets `pView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pView(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pView.set(segment, 0L, index, value); } + /// Sets `pView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pView(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMacOSSurfaceCreateInfoMVK.set_pView(segment, 0L, value); } + /// Sets `pView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMacOSSurfaceCreateInfoMVK pViewAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMacOSSurfaceCreateInfoMVK.set_pView(this.segment(), index, value); return this; } + /// Sets `pView` with the given value. + /// @param value the value + /// @return `this` + public VkMacOSSurfaceCreateInfoMVK pView(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMacOSSurfaceCreateInfoMVK.set_pView(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nn/VKNNViSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nn/VKNNViSurface.java new file mode 100644 index 00000000..23c61ea0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nn/VKNNViSurface.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nn; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNNViSurface { + public static final int VK_NN_VI_SURFACE_SPEC_VERSION = 1; + public static final String VK_NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"; + public static final int VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000; + public static final MethodHandle MH_vkCreateViSurfaceNN = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateViSurfaceNN; + + public VKNNViSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateViSurfaceNN = func.invoke(instance, "vkCreateViSurfaceNN"); + } + + public @CType("VkResult") int CreateViSurfaceNN(@CType("VkInstance") MemorySegment instance, @CType("const VkViSurfaceCreateInfoNN *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateViSurfaceNN)) throw new SymbolNotFoundError("Symbol not found: vkCreateViSurfaceNN"); + try { return (int) MH_vkCreateViSurfaceNN.invokeExact(PFN_vkCreateViSurfaceNN, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateViSurfaceNN", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nn/struct/VkViSurfaceCreateInfoNN.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nn/struct/VkViSurfaceCreateInfoNN.java new file mode 100644 index 00000000..f1ed8a63 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nn/struct/VkViSurfaceCreateInfoNN.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nn.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### window +/// [VarHandle][#VH_window] - [Getter][#window()] - [Setter][#window(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkViSurfaceCreateInfoNN { +/// VkStructureType sType; +/// const void * pNext; +/// VkViSurfaceCreateFlagsNN flags; +/// void * window; +/// } VkViSurfaceCreateInfoNN; +/// ``` +public final class VkViSurfaceCreateInfoNN extends Struct { + /// The struct layout of `VkViSurfaceCreateInfoNN`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("window") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `window` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_window = LAYOUT.arrayElementVarHandle(PathElement.groupElement("window")); + + /// Creates `VkViSurfaceCreateInfoNN` with the given segment. + /// @param segment the memory segment + public VkViSurfaceCreateInfoNN(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkViSurfaceCreateInfoNN` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkViSurfaceCreateInfoNN of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkViSurfaceCreateInfoNN(segment); } + + /// Creates `VkViSurfaceCreateInfoNN` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkViSurfaceCreateInfoNN ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkViSurfaceCreateInfoNN(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkViSurfaceCreateInfoNN` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkViSurfaceCreateInfoNN ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkViSurfaceCreateInfoNN(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkViSurfaceCreateInfoNN` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkViSurfaceCreateInfoNN` + public static VkViSurfaceCreateInfoNN alloc(SegmentAllocator allocator) { return new VkViSurfaceCreateInfoNN(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkViSurfaceCreateInfoNN` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkViSurfaceCreateInfoNN` + public static VkViSurfaceCreateInfoNN alloc(SegmentAllocator allocator, long count) { return new VkViSurfaceCreateInfoNN(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkViSurfaceCreateInfoNN.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkViSurfaceCreateInfoNN.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkViSurfaceCreateInfoNN.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkViSurfaceCreateInfoNN.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViSurfaceCreateInfoNN sTypeAt(long index, @CType("VkStructureType") int value) { VkViSurfaceCreateInfoNN.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkViSurfaceCreateInfoNN sType(@CType("VkStructureType") int value) { VkViSurfaceCreateInfoNN.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkViSurfaceCreateInfoNN.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkViSurfaceCreateInfoNN.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkViSurfaceCreateInfoNN.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkViSurfaceCreateInfoNN.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViSurfaceCreateInfoNN pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkViSurfaceCreateInfoNN.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkViSurfaceCreateInfoNN pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkViSurfaceCreateInfoNN.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkViSurfaceCreateFlagsNN") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkViSurfaceCreateFlagsNN") int get_flags(MemorySegment segment) { return VkViSurfaceCreateInfoNN.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkViSurfaceCreateFlagsNN") int flagsAt(long index) { return VkViSurfaceCreateInfoNN.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkViSurfaceCreateFlagsNN") int flags() { return VkViSurfaceCreateInfoNN.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkViSurfaceCreateFlagsNN") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkViSurfaceCreateFlagsNN") int value) { VkViSurfaceCreateInfoNN.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViSurfaceCreateInfoNN flagsAt(long index, @CType("VkViSurfaceCreateFlagsNN") int value) { VkViSurfaceCreateInfoNN.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkViSurfaceCreateInfoNN flags(@CType("VkViSurfaceCreateFlagsNN") int value) { VkViSurfaceCreateInfoNN.set_flags(this.segment(), value); return this; } + + /// {@return `window` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_window(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_window.get(segment, 0L, index); } + /// {@return `window`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_window(MemorySegment segment) { return VkViSurfaceCreateInfoNN.get_window(segment, 0L); } + /// {@return `window` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment windowAt(long index) { return VkViSurfaceCreateInfoNN.get_window(this.segment(), index); } + /// {@return `window`} + public @CType("void *") java.lang.foreign.MemorySegment window() { return VkViSurfaceCreateInfoNN.get_window(this.segment()); } + /// Sets `window` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_window(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_window.set(segment, 0L, index, value); } + /// Sets `window` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_window(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkViSurfaceCreateInfoNN.set_window(segment, 0L, value); } + /// Sets `window` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViSurfaceCreateInfoNN windowAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkViSurfaceCreateInfoNN.set_window(this.segment(), index, value); return this; } + /// Sets `window` with the given value. + /// @param value the value + /// @return `this` + public VkViSurfaceCreateInfoNN window(@CType("void *") java.lang.foreign.MemorySegment value) { VkViSurfaceCreateInfoNN.set_window(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVAcquireWinrtDisplay.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVAcquireWinrtDisplay.java new file mode 100644 index 00000000..a5336c85 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVAcquireWinrtDisplay.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVAcquireWinrtDisplay { + public static final int VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION = 1; + public static final String VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME = "VK_NV_acquire_winrt_display"; + public static final MethodHandle MH_vkAcquireWinrtDisplayNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetWinrtDisplayNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkAcquireWinrtDisplayNV; + public final MemorySegment PFN_vkGetWinrtDisplayNV; + + public VKNVAcquireWinrtDisplay(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkAcquireWinrtDisplayNV = func.invoke(device, "vkAcquireWinrtDisplayNV"); + PFN_vkGetWinrtDisplayNV = func.invoke(device, "vkGetWinrtDisplayNV"); + } + + public @CType("VkResult") int AcquireWinrtDisplayNV(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkDisplayKHR") MemorySegment display) { + if (Unmarshal.isNullPointer(PFN_vkAcquireWinrtDisplayNV)) throw new SymbolNotFoundError("Symbol not found: vkAcquireWinrtDisplayNV"); + try { return (int) MH_vkAcquireWinrtDisplayNV.invokeExact(PFN_vkAcquireWinrtDisplayNV, physicalDevice, display); } + catch (Throwable e) { throw new RuntimeException("error in vkAcquireWinrtDisplayNV", e); } + } + + public @CType("VkResult") int GetWinrtDisplayNV(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t") int deviceRelativeId, @CType("VkDisplayKHR *") MemorySegment pDisplay) { + if (Unmarshal.isNullPointer(PFN_vkGetWinrtDisplayNV)) throw new SymbolNotFoundError("Symbol not found: vkGetWinrtDisplayNV"); + try { return (int) MH_vkGetWinrtDisplayNV.invokeExact(PFN_vkGetWinrtDisplayNV, physicalDevice, deviceRelativeId, pDisplay); } + catch (Throwable e) { throw new RuntimeException("error in vkGetWinrtDisplayNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVClipSpaceWScaling.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVClipSpaceWScaling.java new file mode 100644 index 00000000..e9c31529 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVClipSpaceWScaling.java @@ -0,0 +1,43 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVClipSpaceWScaling { + public static final int VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION = 1; + public static final String VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME = "VK_NV_clip_space_w_scaling"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000; + public static final int VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000; + public static final MethodHandle MH_vkCmdSetViewportWScalingNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetViewportWScalingNV; + + public VKNVClipSpaceWScaling(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetViewportWScalingNV = func.invoke(device, "vkCmdSetViewportWScalingNV"); + } + + public void CmdSetViewportWScalingNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstViewport, @CType("uint32_t") int viewportCount, @CType("const VkViewportWScalingNV *") MemorySegment pViewportWScalings) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetViewportWScalingNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetViewportWScalingNV"); + try { MH_vkCmdSetViewportWScalingNV.invokeExact(PFN_vkCmdSetViewportWScalingNV, commandBuffer, firstViewport, viewportCount, pViewportWScalings); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetViewportWScalingNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCommandBufferInheritance.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCommandBufferInheritance.java new file mode 100644 index 00000000..0f0afd06 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCommandBufferInheritance.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVCommandBufferInheritance { + public static final int VK_NV_COMMAND_BUFFER_INHERITANCE_SPEC_VERSION = 1; + public static final String VK_NV_COMMAND_BUFFER_INHERITANCE_EXTENSION_NAME = "VK_NV_command_buffer_inheritance"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMMAND_BUFFER_INHERITANCE_FEATURES_NV = 1000559000; + + public VKNVCommandBufferInheritance(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVComputeShaderDerivatives.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVComputeShaderDerivatives.java new file mode 100644 index 00000000..b1376b18 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVComputeShaderDerivatives.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.khr.VKKHRComputeShaderDerivatives.*; +public class VKNVComputeShaderDerivatives { + public static final int VK_NV_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION = 1; + public static final String VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME = "VK_NV_compute_shader_derivatives"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR; + + public VKNVComputeShaderDerivatives(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCooperativeMatrix.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCooperativeMatrix.java new file mode 100644 index 00000000..fb6e27a4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCooperativeMatrix.java @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.khr.VKKHRCooperativeMatrix.*; +public class VKNVCooperativeMatrix { + public static final int VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION = 1; + public static final String VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME = "VK_NV_cooperative_matrix"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000; + public static final int VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002; + public static final int VK_SCOPE_DEVICE_NV = VK_SCOPE_DEVICE_KHR; + public static final int VK_SCOPE_WORKGROUP_NV = VK_SCOPE_WORKGROUP_KHR; + public static final int VK_SCOPE_SUBGROUP_NV = VK_SCOPE_SUBGROUP_KHR; + public static final int VK_SCOPE_QUEUE_FAMILY_NV = VK_SCOPE_QUEUE_FAMILY_KHR; + public static final int VK_COMPONENT_TYPE_FLOAT16_NV = VK_COMPONENT_TYPE_FLOAT16_KHR; + public static final int VK_COMPONENT_TYPE_FLOAT32_NV = VK_COMPONENT_TYPE_FLOAT32_KHR; + public static final int VK_COMPONENT_TYPE_FLOAT64_NV = VK_COMPONENT_TYPE_FLOAT64_KHR; + public static final int VK_COMPONENT_TYPE_SINT8_NV = VK_COMPONENT_TYPE_SINT8_KHR; + public static final int VK_COMPONENT_TYPE_SINT16_NV = VK_COMPONENT_TYPE_SINT16_KHR; + public static final int VK_COMPONENT_TYPE_SINT32_NV = VK_COMPONENT_TYPE_SINT32_KHR; + public static final int VK_COMPONENT_TYPE_SINT64_NV = VK_COMPONENT_TYPE_SINT64_KHR; + public static final int VK_COMPONENT_TYPE_UINT8_NV = VK_COMPONENT_TYPE_UINT8_KHR; + public static final int VK_COMPONENT_TYPE_UINT16_NV = VK_COMPONENT_TYPE_UINT16_KHR; + public static final int VK_COMPONENT_TYPE_UINT32_NV = VK_COMPONENT_TYPE_UINT32_KHR; + public static final int VK_COMPONENT_TYPE_UINT64_NV = VK_COMPONENT_TYPE_UINT64_KHR; + public static final MethodHandle MH_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV; + + public VKNVCooperativeMatrix(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = func.invoke(device, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV"); + } + + public @CType("VkResult") int GetPhysicalDeviceCooperativeMatrixPropertiesNV(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkCooperativeMatrixPropertiesNV *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceCooperativeMatrixPropertiesNV"); + try { return (int) MH_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV.invokeExact(PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV, physicalDevice, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceCooperativeMatrixPropertiesNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCooperativeMatrix2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCooperativeMatrix2.java new file mode 100644 index 00000000..0836b961 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCooperativeMatrix2.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVCooperativeMatrix2 { + public static final int VK_NV_COOPERATIVE_MATRIX_2_SPEC_VERSION = 1; + public static final String VK_NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME = "VK_NV_cooperative_matrix2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV = 1000593000; + public static final int VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV = 1000593001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV = 1000593002; + public static final MethodHandle MH_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV; + + public VKNVCooperativeMatrix2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = func.invoke(device, "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV"); + } + + public @CType("VkResult") int GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pPropertyCount, @CType("VkCooperativeMatrixFlexibleDimensionsPropertiesNV *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV"); + try { return (int) MH_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV.invokeExact(PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV, physicalDevice, pPropertyCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCopyMemoryIndirect.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCopyMemoryIndirect.java new file mode 100644 index 00000000..b9a61f13 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCopyMemoryIndirect.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVCopyMemoryIndirect { + public static final int VK_NV_COPY_MEMORY_INDIRECT_SPEC_VERSION = 1; + public static final String VK_NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_NV_copy_memory_indirect"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV = 1000426000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV = 1000426001; + public static final MethodHandle MH_vkCmdCopyMemoryIndirectNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdCopyMemoryToImageIndirectNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdCopyMemoryIndirectNV; + public final MemorySegment PFN_vkCmdCopyMemoryToImageIndirectNV; + + public VKNVCopyMemoryIndirect(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdCopyMemoryIndirectNV = func.invoke(device, "vkCmdCopyMemoryIndirectNV"); + PFN_vkCmdCopyMemoryToImageIndirectNV = func.invoke(device, "vkCmdCopyMemoryToImageIndirectNV"); + } + + public void CmdCopyMemoryIndirectNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDeviceAddress") long copyBufferAddress, @CType("uint32_t") int copyCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyMemoryIndirectNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyMemoryIndirectNV"); + try { MH_vkCmdCopyMemoryIndirectNV.invokeExact(PFN_vkCmdCopyMemoryIndirectNV, commandBuffer, copyBufferAddress, copyCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyMemoryIndirectNV", e); } + } + + public void CmdCopyMemoryToImageIndirectNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDeviceAddress") long copyBufferAddress, @CType("uint32_t") int copyCount, @CType("uint32_t") int stride, @CType("VkImage") MemorySegment dstImage, @CType("VkImageLayout") int dstImageLayout, @CType("const VkImageSubresourceLayers *") MemorySegment pImageSubresources) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyMemoryToImageIndirectNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyMemoryToImageIndirectNV"); + try { MH_vkCmdCopyMemoryToImageIndirectNV.invokeExact(PFN_vkCmdCopyMemoryToImageIndirectNV, commandBuffer, copyBufferAddress, copyCount, stride, dstImage, dstImageLayout, pImageSubresources); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyMemoryToImageIndirectNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCornerSampledImage.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCornerSampledImage.java new file mode 100644 index 00000000..ba031b90 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCornerSampledImage.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVCornerSampledImage { + public static final int VK_NV_CORNER_SAMPLED_IMAGE_SPEC_VERSION = 2; + public static final String VK_NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME = "VK_NV_corner_sampled_image"; + public static final int VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV = 0x00002000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000; + + public VKNVCornerSampledImage(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCoverageReductionMode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCoverageReductionMode.java new file mode 100644 index 00000000..6136d249 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCoverageReductionMode.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVCoverageReductionMode { + public static final int VK_COVERAGE_REDUCTION_MODE_MERGE_NV = 0; + public static final int VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV = 1; + public static final int VK_NV_COVERAGE_REDUCTION_MODE_SPEC_VERSION = 1; + public static final String VK_NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME = "VK_NV_coverage_reduction_mode"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV = 1000250000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV = 1000250001; + public static final int VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV = 1000250002; + public static final MethodHandle MH_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV; + + public VKNVCoverageReductionMode(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = func.invoke(device, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV"); + } + + public @CType("VkResult") int GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t *") MemorySegment pCombinationCount, @CType("VkFramebufferMixedSamplesCombinationNV *") MemorySegment pCombinations) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV"); + try { return (int) MH_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV.invokeExact(PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV, physicalDevice, pCombinationCount, pCombinations); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCudaKernelLaunch.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCudaKernelLaunch.java new file mode 100644 index 00000000..5a3c6251 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVCudaKernelLaunch.java @@ -0,0 +1,95 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVCudaKernelLaunch { + public static final int VK_NV_CUDA_KERNEL_LAUNCH_SPEC_VERSION = 2; + public static final String VK_NV_CUDA_KERNEL_LAUNCH_EXTENSION_NAME = "VK_NV_cuda_kernel_launch"; + public static final int VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV = 1000307000; + public static final int VK_STRUCTURE_TYPE_CUDA_FUNCTION_CREATE_INFO_NV = 1000307001; + public static final int VK_STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV = 1000307002; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV = 1000307003; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV = 1000307004; + public static final int VK_OBJECT_TYPE_CUDA_MODULE_NV = 1000307000; + public static final int VK_OBJECT_TYPE_CUDA_FUNCTION_NV = 1000307001; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_CUDA_MODULE_NV_EXT = 1000307000; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_CUDA_FUNCTION_NV_EXT = 1000307001; + public static final MethodHandle MH_vkCreateCudaModuleNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetCudaModuleCacheNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateCudaFunctionNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyCudaModuleNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyCudaFunctionNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCudaLaunchKernelNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateCudaModuleNV; + public final MemorySegment PFN_vkGetCudaModuleCacheNV; + public final MemorySegment PFN_vkCreateCudaFunctionNV; + public final MemorySegment PFN_vkDestroyCudaModuleNV; + public final MemorySegment PFN_vkDestroyCudaFunctionNV; + public final MemorySegment PFN_vkCmdCudaLaunchKernelNV; + + public VKNVCudaKernelLaunch(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateCudaModuleNV = func.invoke(device, "vkCreateCudaModuleNV"); + PFN_vkGetCudaModuleCacheNV = func.invoke(device, "vkGetCudaModuleCacheNV"); + PFN_vkCreateCudaFunctionNV = func.invoke(device, "vkCreateCudaFunctionNV"); + PFN_vkDestroyCudaModuleNV = func.invoke(device, "vkDestroyCudaModuleNV"); + PFN_vkDestroyCudaFunctionNV = func.invoke(device, "vkDestroyCudaFunctionNV"); + PFN_vkCmdCudaLaunchKernelNV = func.invoke(device, "vkCmdCudaLaunchKernelNV"); + } + + public @CType("VkResult") int CreateCudaModuleNV(@CType("VkDevice") MemorySegment device, @CType("const VkCudaModuleCreateInfoNV *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkCudaModuleNV *") MemorySegment pModule) { + if (Unmarshal.isNullPointer(PFN_vkCreateCudaModuleNV)) throw new SymbolNotFoundError("Symbol not found: vkCreateCudaModuleNV"); + try { return (int) MH_vkCreateCudaModuleNV.invokeExact(PFN_vkCreateCudaModuleNV, device, pCreateInfo, pAllocator, pModule); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateCudaModuleNV", e); } + } + + public @CType("VkResult") int GetCudaModuleCacheNV(@CType("VkDevice") MemorySegment device, @CType("VkCudaModuleNV") MemorySegment module, @CType("size_t *") MemorySegment pCacheSize, @CType("void *") MemorySegment pCacheData) { + if (Unmarshal.isNullPointer(PFN_vkGetCudaModuleCacheNV)) throw new SymbolNotFoundError("Symbol not found: vkGetCudaModuleCacheNV"); + try { return (int) MH_vkGetCudaModuleCacheNV.invokeExact(PFN_vkGetCudaModuleCacheNV, device, module, pCacheSize, pCacheData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetCudaModuleCacheNV", e); } + } + + public @CType("VkResult") int CreateCudaFunctionNV(@CType("VkDevice") MemorySegment device, @CType("const VkCudaFunctionCreateInfoNV *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkCudaFunctionNV *") MemorySegment pFunction) { + if (Unmarshal.isNullPointer(PFN_vkCreateCudaFunctionNV)) throw new SymbolNotFoundError("Symbol not found: vkCreateCudaFunctionNV"); + try { return (int) MH_vkCreateCudaFunctionNV.invokeExact(PFN_vkCreateCudaFunctionNV, device, pCreateInfo, pAllocator, pFunction); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateCudaFunctionNV", e); } + } + + public void DestroyCudaModuleNV(@CType("VkDevice") MemorySegment device, @CType("VkCudaModuleNV") MemorySegment module, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyCudaModuleNV)) throw new SymbolNotFoundError("Symbol not found: vkDestroyCudaModuleNV"); + try { MH_vkDestroyCudaModuleNV.invokeExact(PFN_vkDestroyCudaModuleNV, device, module, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyCudaModuleNV", e); } + } + + public void DestroyCudaFunctionNV(@CType("VkDevice") MemorySegment device, @CType("VkCudaFunctionNV") MemorySegment function, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyCudaFunctionNV)) throw new SymbolNotFoundError("Symbol not found: vkDestroyCudaFunctionNV"); + try { MH_vkDestroyCudaFunctionNV.invokeExact(PFN_vkDestroyCudaFunctionNV, device, function, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyCudaFunctionNV", e); } + } + + public void CmdCudaLaunchKernelNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCudaLaunchInfoNV *") MemorySegment pLaunchInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCudaLaunchKernelNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdCudaLaunchKernelNV"); + try { MH_vkCmdCudaLaunchKernelNV.invokeExact(PFN_vkCmdCudaLaunchKernelNV, commandBuffer, pLaunchInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCudaLaunchKernelNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDedicatedAllocation.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDedicatedAllocation.java new file mode 100644 index 00000000..946aa469 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDedicatedAllocation.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVDedicatedAllocation { + public static final int VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION = 1; + public static final String VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME = "VK_NV_dedicated_allocation"; + public static final int VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000; + public static final int VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001; + public static final int VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002; + + public VKNVDedicatedAllocation(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDedicatedAllocationImageAliasing.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDedicatedAllocationImageAliasing.java new file mode 100644 index 00000000..883b9f83 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDedicatedAllocationImageAliasing.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVDedicatedAllocationImageAliasing { + public static final int VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_SPEC_VERSION = 1; + public static final String VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME = "VK_NV_dedicated_allocation_image_aliasing"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV = 1000240000; + + public VKNVDedicatedAllocationImageAliasing(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDescriptorPoolOverallocation.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDescriptorPoolOverallocation.java new file mode 100644 index 00000000..6f53aae0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDescriptorPoolOverallocation.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVDescriptorPoolOverallocation { + public static final int VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_SPEC_VERSION = 1; + public static final String VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_EXTENSION_NAME = "VK_NV_descriptor_pool_overallocation"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV = 1000546000; + public static final int VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV = 0x00000008; + public static final int VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_POOLS_BIT_NV = 0x00000010; + + public VKNVDescriptorPoolOverallocation(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceDiagnosticCheckpoints.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceDiagnosticCheckpoints.java new file mode 100644 index 00000000..eb60d252 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceDiagnosticCheckpoints.java @@ -0,0 +1,63 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVDeviceDiagnosticCheckpoints { + public static final int VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_SPEC_VERSION = 2; + public static final String VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME = "VK_NV_device_diagnostic_checkpoints"; + public static final int VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV = 1000206000; + public static final int VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001; + public static final int VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV = 1000206008; + public static final int VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV = 1000206009; + public static final MethodHandle MH_vkCmdSetCheckpointNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetQueueCheckpointDataNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetQueueCheckpointData2NV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetCheckpointNV; + public final MemorySegment PFN_vkGetQueueCheckpointDataNV; + public final MemorySegment PFN_vkGetQueueCheckpointData2NV; + + public VKNVDeviceDiagnosticCheckpoints(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetCheckpointNV = func.invoke(device, "vkCmdSetCheckpointNV"); + PFN_vkGetQueueCheckpointDataNV = func.invoke(device, "vkGetQueueCheckpointDataNV"); + PFN_vkGetQueueCheckpointData2NV = func.invoke(device, "vkGetQueueCheckpointData2NV"); + } + + public void CmdSetCheckpointNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const void *") MemorySegment pCheckpointMarker) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCheckpointNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCheckpointNV"); + try { MH_vkCmdSetCheckpointNV.invokeExact(PFN_vkCmdSetCheckpointNV, commandBuffer, pCheckpointMarker); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCheckpointNV", e); } + } + + public void GetQueueCheckpointDataNV(@CType("VkQueue") MemorySegment queue, @CType("uint32_t *") MemorySegment pCheckpointDataCount, @CType("VkCheckpointDataNV *") MemorySegment pCheckpointData) { + if (Unmarshal.isNullPointer(PFN_vkGetQueueCheckpointDataNV)) throw new SymbolNotFoundError("Symbol not found: vkGetQueueCheckpointDataNV"); + try { MH_vkGetQueueCheckpointDataNV.invokeExact(PFN_vkGetQueueCheckpointDataNV, queue, pCheckpointDataCount, pCheckpointData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetQueueCheckpointDataNV", e); } + } + + public void GetQueueCheckpointData2NV(@CType("VkQueue") MemorySegment queue, @CType("uint32_t *") MemorySegment pCheckpointDataCount, @CType("VkCheckpointData2NV *") MemorySegment pCheckpointData) { + if (Unmarshal.isNullPointer(PFN_vkGetQueueCheckpointData2NV)) throw new SymbolNotFoundError("Symbol not found: vkGetQueueCheckpointData2NV"); + try { MH_vkGetQueueCheckpointData2NV.invokeExact(PFN_vkGetQueueCheckpointData2NV, queue, pCheckpointDataCount, pCheckpointData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetQueueCheckpointData2NV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceDiagnosticsConfig.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceDiagnosticsConfig.java new file mode 100644 index 00000000..d5d1d0b9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceDiagnosticsConfig.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVDeviceDiagnosticsConfig { + public static final int VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV = 0x00000001; + public static final int VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV = 0x00000002; + public static final int VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV = 0x00000004; + public static final int VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV = 0x00000008; + public static final int VK_NV_DEVICE_DIAGNOSTICS_CONFIG_SPEC_VERSION = 2; + public static final String VK_NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME = "VK_NV_device_diagnostics_config"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000; + public static final int VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001; + + public VKNVDeviceDiagnosticsConfig(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceGeneratedCommands.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceGeneratedCommands.java new file mode 100644 index 00000000..48665fd6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceGeneratedCommands.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVDeviceGeneratedCommands { + public static final int VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV = 0x00000001; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV = 0; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV = 1; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV = 2; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV = 3; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV = 4; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV = 5; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV = 6; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV = 7; + public static final int VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV = 0x00000001; + public static final int VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV = 0x00000002; + public static final int VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV = 0x00000004; + public static final int VK_NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION = 3; + public static final String VK_NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NV_device_generated_commands"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV = 1000277000; + public static final int VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV = 1000277001; + public static final int VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV = 1000277002; + public static final int VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV = 1000277003; + public static final int VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV = 1000277004; + public static final int VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV = 1000277005; + public static final int VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV = 1000277006; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV = 1000277007; + public static final int VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x00040000; + public static final int VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV = 0x00020000; + public static final int VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000; + public static final int VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000; + public static final int VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV = 1000277000; + public static final MethodHandle MH_vkGetGeneratedCommandsMemoryRequirementsNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdPreprocessGeneratedCommandsNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdExecuteGeneratedCommandsNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBindPipelineShaderGroupNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCreateIndirectCommandsLayoutNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyIndirectCommandsLayoutNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetGeneratedCommandsMemoryRequirementsNV; + public final MemorySegment PFN_vkCmdPreprocessGeneratedCommandsNV; + public final MemorySegment PFN_vkCmdExecuteGeneratedCommandsNV; + public final MemorySegment PFN_vkCmdBindPipelineShaderGroupNV; + public final MemorySegment PFN_vkCreateIndirectCommandsLayoutNV; + public final MemorySegment PFN_vkDestroyIndirectCommandsLayoutNV; + + public VKNVDeviceGeneratedCommands(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetGeneratedCommandsMemoryRequirementsNV = func.invoke(device, "vkGetGeneratedCommandsMemoryRequirementsNV"); + PFN_vkCmdPreprocessGeneratedCommandsNV = func.invoke(device, "vkCmdPreprocessGeneratedCommandsNV"); + PFN_vkCmdExecuteGeneratedCommandsNV = func.invoke(device, "vkCmdExecuteGeneratedCommandsNV"); + PFN_vkCmdBindPipelineShaderGroupNV = func.invoke(device, "vkCmdBindPipelineShaderGroupNV"); + PFN_vkCreateIndirectCommandsLayoutNV = func.invoke(device, "vkCreateIndirectCommandsLayoutNV"); + PFN_vkDestroyIndirectCommandsLayoutNV = func.invoke(device, "vkDestroyIndirectCommandsLayoutNV"); + } + + public void GetGeneratedCommandsMemoryRequirementsNV(@CType("VkDevice") MemorySegment device, @CType("const VkGeneratedCommandsMemoryRequirementsInfoNV *") MemorySegment pInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetGeneratedCommandsMemoryRequirementsNV)) throw new SymbolNotFoundError("Symbol not found: vkGetGeneratedCommandsMemoryRequirementsNV"); + try { MH_vkGetGeneratedCommandsMemoryRequirementsNV.invokeExact(PFN_vkGetGeneratedCommandsMemoryRequirementsNV, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetGeneratedCommandsMemoryRequirementsNV", e); } + } + + public void CmdPreprocessGeneratedCommandsNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkGeneratedCommandsInfoNV *") MemorySegment pGeneratedCommandsInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdPreprocessGeneratedCommandsNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdPreprocessGeneratedCommandsNV"); + try { MH_vkCmdPreprocessGeneratedCommandsNV.invokeExact(PFN_vkCmdPreprocessGeneratedCommandsNV, commandBuffer, pGeneratedCommandsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdPreprocessGeneratedCommandsNV", e); } + } + + public void CmdExecuteGeneratedCommandsNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBool32") int isPreprocessed, @CType("const VkGeneratedCommandsInfoNV *") MemorySegment pGeneratedCommandsInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdExecuteGeneratedCommandsNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdExecuteGeneratedCommandsNV"); + try { MH_vkCmdExecuteGeneratedCommandsNV.invokeExact(PFN_vkCmdExecuteGeneratedCommandsNV, commandBuffer, isPreprocessed, pGeneratedCommandsInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdExecuteGeneratedCommandsNV", e); } + } + + public void CmdBindPipelineShaderGroupNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineBindPoint") int pipelineBindPoint, @CType("VkPipeline") MemorySegment pipeline, @CType("uint32_t") int groupIndex) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindPipelineShaderGroupNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindPipelineShaderGroupNV"); + try { MH_vkCmdBindPipelineShaderGroupNV.invokeExact(PFN_vkCmdBindPipelineShaderGroupNV, commandBuffer, pipelineBindPoint, pipeline, groupIndex); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindPipelineShaderGroupNV", e); } + } + + public @CType("VkResult") int CreateIndirectCommandsLayoutNV(@CType("VkDevice") MemorySegment device, @CType("const VkIndirectCommandsLayoutCreateInfoNV *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkIndirectCommandsLayoutNV *") MemorySegment pIndirectCommandsLayout) { + if (Unmarshal.isNullPointer(PFN_vkCreateIndirectCommandsLayoutNV)) throw new SymbolNotFoundError("Symbol not found: vkCreateIndirectCommandsLayoutNV"); + try { return (int) MH_vkCreateIndirectCommandsLayoutNV.invokeExact(PFN_vkCreateIndirectCommandsLayoutNV, device, pCreateInfo, pAllocator, pIndirectCommandsLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateIndirectCommandsLayoutNV", e); } + } + + public void DestroyIndirectCommandsLayoutNV(@CType("VkDevice") MemorySegment device, @CType("VkIndirectCommandsLayoutNV") MemorySegment indirectCommandsLayout, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyIndirectCommandsLayoutNV)) throw new SymbolNotFoundError("Symbol not found: vkDestroyIndirectCommandsLayoutNV"); + try { MH_vkDestroyIndirectCommandsLayoutNV.invokeExact(PFN_vkDestroyIndirectCommandsLayoutNV, device, indirectCommandsLayout, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyIndirectCommandsLayoutNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceGeneratedCommandsCompute.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceGeneratedCommandsCompute.java new file mode 100644 index 00000000..90cdf85e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDeviceGeneratedCommandsCompute.java @@ -0,0 +1,65 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVDeviceGeneratedCommandsCompute { + public static final int VK_NV_DEVICE_GENERATED_COMMANDS_COMPUTE_SPEC_VERSION = 2; + public static final String VK_NV_DEVICE_GENERATED_COMMANDS_COMPUTE_EXTENSION_NAME = "VK_NV_device_generated_commands_compute"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV = 1000428000; + public static final int VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_INDIRECT_BUFFER_INFO_NV = 1000428001; + public static final int VK_STRUCTURE_TYPE_PIPELINE_INDIRECT_DEVICE_ADDRESS_INFO_NV = 1000428002; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV = 1000428003; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV = 1000428004; + public static final int VK_DESCRIPTOR_SET_LAYOUT_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x00000080; + public static final MethodHandle MH_vkGetPipelineIndirectMemoryRequirementsNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdUpdatePipelineIndirectBufferNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPipelineIndirectDeviceAddressNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPipelineIndirectMemoryRequirementsNV; + public final MemorySegment PFN_vkCmdUpdatePipelineIndirectBufferNV; + public final MemorySegment PFN_vkGetPipelineIndirectDeviceAddressNV; + + public VKNVDeviceGeneratedCommandsCompute(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPipelineIndirectMemoryRequirementsNV = func.invoke(device, "vkGetPipelineIndirectMemoryRequirementsNV"); + PFN_vkCmdUpdatePipelineIndirectBufferNV = func.invoke(device, "vkCmdUpdatePipelineIndirectBufferNV"); + PFN_vkGetPipelineIndirectDeviceAddressNV = func.invoke(device, "vkGetPipelineIndirectDeviceAddressNV"); + } + + public void GetPipelineIndirectMemoryRequirementsNV(@CType("VkDevice") MemorySegment device, @CType("const VkComputePipelineCreateInfo *") MemorySegment pCreateInfo, @CType("VkMemoryRequirements2 *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetPipelineIndirectMemoryRequirementsNV)) throw new SymbolNotFoundError("Symbol not found: vkGetPipelineIndirectMemoryRequirementsNV"); + try { MH_vkGetPipelineIndirectMemoryRequirementsNV.invokeExact(PFN_vkGetPipelineIndirectMemoryRequirementsNV, device, pCreateInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPipelineIndirectMemoryRequirementsNV", e); } + } + + public void CmdUpdatePipelineIndirectBufferNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkPipelineBindPoint") int pipelineBindPoint, @CType("VkPipeline") MemorySegment pipeline) { + if (Unmarshal.isNullPointer(PFN_vkCmdUpdatePipelineIndirectBufferNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdUpdatePipelineIndirectBufferNV"); + try { MH_vkCmdUpdatePipelineIndirectBufferNV.invokeExact(PFN_vkCmdUpdatePipelineIndirectBufferNV, commandBuffer, pipelineBindPoint, pipeline); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdUpdatePipelineIndirectBufferNV", e); } + } + + public @CType("VkDeviceAddress") long GetPipelineIndirectDeviceAddressNV(@CType("VkDevice") MemorySegment device, @CType("const VkPipelineIndirectDeviceAddressInfoNV *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetPipelineIndirectDeviceAddressNV)) throw new SymbolNotFoundError("Symbol not found: vkGetPipelineIndirectDeviceAddressNV"); + try { return (long) MH_vkGetPipelineIndirectDeviceAddressNV.invokeExact(PFN_vkGetPipelineIndirectDeviceAddressNV, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPipelineIndirectDeviceAddressNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDisplacementMicromap.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDisplacementMicromap.java new file mode 100644 index 00000000..e351dac8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDisplacementMicromap.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVDisplacementMicromap { + public static final int VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV = 1; + public static final int VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV = 2; + public static final int VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV = 3; + public static final int VK_NV_DISPLACEMENT_MICROMAP_SPEC_VERSION = 2; + public static final String VK_NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME = "VK_NV_displacement_micromap"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV = 1000397000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV = 1000397001; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV = 1000397002; + public static final int VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV = 0x00000200; + public static final int VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV = 1000397000; + + public VKNVDisplacementMicromap(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDisplayStereo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDisplayStereo.java new file mode 100644 index 00000000..3c0d9463 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVDisplayStereo.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVDisplayStereo { + public static final int VK_DISPLAY_SURFACE_STEREO_TYPE_NONE_NV = 0; + public static final int VK_DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV = 1; + public static final int VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV = 2; + public static final int VK_DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV = 3; + public static final int VK_NV_DISPLAY_STEREO_SPEC_VERSION = 1; + public static final String VK_NV_DISPLAY_STEREO_EXTENSION_NAME = "VK_NV_display_stereo"; + public static final int VK_STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV = 1000551000; + public static final int VK_STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV = 1000551001; + + public VKNVDisplayStereo(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExtendedSparseAddressSpace.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExtendedSparseAddressSpace.java new file mode 100644 index 00000000..c632e2fa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExtendedSparseAddressSpace.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVExtendedSparseAddressSpace { + public static final int VK_NV_EXTENDED_SPARSE_ADDRESS_SPACE_SPEC_VERSION = 1; + public static final String VK_NV_EXTENDED_SPARSE_ADDRESS_SPACE_EXTENSION_NAME = "VK_NV_extended_sparse_address_space"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV = 1000492000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_PROPERTIES_NV = 1000492001; + + public VKNVExtendedSparseAddressSpace(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemory.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemory.java new file mode 100644 index 00000000..29644c26 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemory.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVExternalMemory { + public static final int VK_NV_EXTERNAL_MEMORY_SPEC_VERSION = 1; + public static final String VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_NV_external_memory"; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000; + public static final int VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001; + + public VKNVExternalMemory(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemoryCapabilities.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemoryCapabilities.java new file mode 100644 index 00000000..6f73f256 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemoryCapabilities.java @@ -0,0 +1,48 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVExternalMemoryCapabilities { + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008; + public static final int VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001; + public static final int VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002; + public static final int VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004; + public static final int VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION = 1; + public static final String VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_NV_external_memory_capabilities"; + public static final MethodHandle MH_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV; + + public VKNVExternalMemoryCapabilities(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = func.invoke(instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV"); + } + + public @CType("VkResult") int GetPhysicalDeviceExternalImageFormatPropertiesNV(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("VkFormat") int format, @CType("VkImageType") int type, @CType("VkImageTiling") int tiling, @CType("VkImageUsageFlags") int usage, @CType("VkImageCreateFlags") int flags, @CType("VkExternalMemoryHandleTypeFlagsNV") int externalHandleType, @CType("VkExternalImageFormatPropertiesNV *") MemorySegment pExternalImageFormatProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceExternalImageFormatPropertiesNV"); + try { return (int) MH_vkGetPhysicalDeviceExternalImageFormatPropertiesNV.invokeExact(PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV, physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceExternalImageFormatPropertiesNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemoryRdma.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemoryRdma.java new file mode 100644 index 00000000..8905ee4c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemoryRdma.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVExternalMemoryRdma { + public static final int VK_NV_EXTERNAL_MEMORY_RDMA_SPEC_VERSION = 1; + public static final String VK_NV_EXTERNAL_MEMORY_RDMA_EXTENSION_NAME = "VK_NV_external_memory_rdma"; + public static final int VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV = 1000371000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV = 1000371001; + public static final int VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV = 0x00000100; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV = 0x00001000; + public static final MethodHandle MH_vkGetMemoryRemoteAddressNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetMemoryRemoteAddressNV; + + public VKNVExternalMemoryRdma(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetMemoryRemoteAddressNV = func.invoke(device, "vkGetMemoryRemoteAddressNV"); + } + + public @CType("VkResult") int GetMemoryRemoteAddressNV(@CType("VkDevice") MemorySegment device, @CType("const VkMemoryGetRemoteAddressInfoNV *") MemorySegment pMemoryGetRemoteAddressInfo, @CType("VkRemoteAddressNV *") MemorySegment pAddress) { + if (Unmarshal.isNullPointer(PFN_vkGetMemoryRemoteAddressNV)) throw new SymbolNotFoundError("Symbol not found: vkGetMemoryRemoteAddressNV"); + try { return (int) MH_vkGetMemoryRemoteAddressNV.invokeExact(PFN_vkGetMemoryRemoteAddressNV, device, pMemoryGetRemoteAddressInfo, pAddress); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMemoryRemoteAddressNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemoryWin32.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemoryWin32.java new file mode 100644 index 00000000..2fb5c776 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVExternalMemoryWin32.java @@ -0,0 +1,43 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVExternalMemoryWin32 { + public static final int VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION = 1; + public static final String VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_NV_external_memory_win32"; + public static final int VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000; + public static final int VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001; + public static final MethodHandle MH_vkGetMemoryWin32HandleNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetMemoryWin32HandleNV; + + public VKNVExternalMemoryWin32(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetMemoryWin32HandleNV = func.invoke(device, "vkGetMemoryWin32HandleNV"); + } + + public @CType("VkResult") int GetMemoryWin32HandleNV(@CType("VkDevice") MemorySegment device, @CType("VkDeviceMemory") MemorySegment memory, @CType("VkExternalMemoryHandleTypeFlagsNV") int handleType, @CType("HANDLE *") MemorySegment pHandle) { + if (Unmarshal.isNullPointer(PFN_vkGetMemoryWin32HandleNV)) throw new SymbolNotFoundError("Symbol not found: vkGetMemoryWin32HandleNV"); + try { return (int) MH_vkGetMemoryWin32HandleNV.invokeExact(PFN_vkGetMemoryWin32HandleNV, device, memory, handleType, pHandle); } + catch (Throwable e) { throw new RuntimeException("error in vkGetMemoryWin32HandleNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFillRectangle.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFillRectangle.java new file mode 100644 index 00000000..54f523e4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFillRectangle.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVFillRectangle { + public static final int VK_NV_FILL_RECTANGLE_SPEC_VERSION = 1; + public static final String VK_NV_FILL_RECTANGLE_EXTENSION_NAME = "VK_NV_fill_rectangle"; + public static final int VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000; + + public VKNVFillRectangle(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFragmentCoverageToColor.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFragmentCoverageToColor.java new file mode 100644 index 00000000..3db15286 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFragmentCoverageToColor.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVFragmentCoverageToColor { + public static final int VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION = 1; + public static final String VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME = "VK_NV_fragment_coverage_to_color"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000; + + public VKNVFragmentCoverageToColor(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFragmentShaderBarycentric.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFragmentShaderBarycentric.java new file mode 100644 index 00000000..50ce5e8a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFragmentShaderBarycentric.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.khr.VKKHRFragmentShaderBarycentric.*; +public class VKNVFragmentShaderBarycentric { + public static final int VK_NV_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION = 1; + public static final String VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_NV_fragment_shader_barycentric"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR; + + public VKNVFragmentShaderBarycentric(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFragmentShadingRateEnums.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFragmentShadingRateEnums.java new file mode 100644 index 00000000..62e59352 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFragmentShadingRateEnums.java @@ -0,0 +1,58 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVFragmentShadingRateEnums { + public static final int VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = 0; + public static final int VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = 1; + public static final int VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = 4; + public static final int VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = 5; + public static final int VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = 6; + public static final int VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = 9; + public static final int VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = 10; + public static final int VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = 11; + public static final int VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = 12; + public static final int VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = 13; + public static final int VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = 14; + public static final int VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV = 15; + public static final int VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV = 0; + public static final int VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV = 1; + public static final int VK_NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION = 1; + public static final String VK_NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME = "VK_NV_fragment_shading_rate_enums"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV = 1000326000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV = 1000326001; + public static final int VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV = 1000326002; + public static final MethodHandle MH_vkCmdSetFragmentShadingRateEnumNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdSetFragmentShadingRateEnumNV; + + public VKNVFragmentShadingRateEnums(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetFragmentShadingRateEnumNV = func.invoke(device, "vkCmdSetFragmentShadingRateEnumNV"); + } + + public void CmdSetFragmentShadingRateEnumNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkFragmentShadingRateNV") int shadingRate, @CType("const VkFragmentShadingRateCombinerOpKHR [2]") int combinerOps) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetFragmentShadingRateEnumNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetFragmentShadingRateEnumNV"); + try { MH_vkCmdSetFragmentShadingRateEnumNV.invokeExact(PFN_vkCmdSetFragmentShadingRateEnumNV, commandBuffer, shadingRate, combinerOps); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetFragmentShadingRateEnumNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFramebufferMixedSamples.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFramebufferMixedSamples.java new file mode 100644 index 00000000..898ccef2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVFramebufferMixedSamples.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.amd.VKAMDMixedAttachmentSamples.*; +public class VKNVFramebufferMixedSamples { + public static final int VK_COVERAGE_MODULATION_MODE_NONE_NV = 0; + public static final int VK_COVERAGE_MODULATION_MODE_RGB_NV = 1; + public static final int VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2; + public static final int VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3; + public static final int VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION = 1; + public static final String VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME = "VK_NV_framebuffer_mixed_samples"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000; + public static final int VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV = VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD; + + public VKNVFramebufferMixedSamples(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVGeometryShaderPassthrough.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVGeometryShaderPassthrough.java new file mode 100644 index 00000000..423fee45 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVGeometryShaderPassthrough.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVGeometryShaderPassthrough { + public static final int VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION = 1; + public static final String VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME = "VK_NV_geometry_shader_passthrough"; + + public VKNVGeometryShaderPassthrough(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVGlslShader.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVGlslShader.java new file mode 100644 index 00000000..db90510e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVGlslShader.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVGlslShader { + public static final int VK_NV_GLSL_SHADER_SPEC_VERSION = 1; + public static final String VK_NV_GLSL_SHADER_EXTENSION_NAME = "VK_NV_glsl_shader"; + public static final int VK_ERROR_INVALID_SHADER_NV = -1000012000; + + public VKNVGlslShader(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVInheritedViewportScissor.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVInheritedViewportScissor.java new file mode 100644 index 00000000..a58f24f4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVInheritedViewportScissor.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVInheritedViewportScissor { + public static final int VK_NV_INHERITED_VIEWPORT_SCISSOR_SPEC_VERSION = 1; + public static final String VK_NV_INHERITED_VIEWPORT_SCISSOR_EXTENSION_NAME = "VK_NV_inherited_viewport_scissor"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV = 1000278000; + public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV = 1000278001; + + public VKNVInheritedViewportScissor(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVLinearColorAttachment.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVLinearColorAttachment.java new file mode 100644 index 00000000..49273ad9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVLinearColorAttachment.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVLinearColorAttachment { + public static final int VK_NV_LINEAR_COLOR_ATTACHMENT_SPEC_VERSION = 1; + public static final String VK_NV_LINEAR_COLOR_ATTACHMENT_EXTENSION_NAME = "VK_NV_linear_color_attachment"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000; + public static final long VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV = 0x4000000000L; + + public VKNVLinearColorAttachment(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVLowLatency.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVLowLatency.java new file mode 100644 index 00000000..06d38006 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVLowLatency.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVLowLatency { + public static final int VK_NV_LOW_LATENCY_SPEC_VERSION = 1; + public static final String VK_NV_LOW_LATENCY_EXTENSION_NAME = "VK_NV_low_latency"; + public static final int VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV = 1000310000; + + public VKNVLowLatency(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVLowLatency2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVLowLatency2.java new file mode 100644 index 00000000..8e8bfa8b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVLowLatency2.java @@ -0,0 +1,100 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVLowLatency2 { + public static final int VK_LATENCY_MARKER_SIMULATION_START_NV = 0; + public static final int VK_LATENCY_MARKER_SIMULATION_END_NV = 1; + public static final int VK_LATENCY_MARKER_RENDERSUBMIT_START_NV = 2; + public static final int VK_LATENCY_MARKER_RENDERSUBMIT_END_NV = 3; + public static final int VK_LATENCY_MARKER_PRESENT_START_NV = 4; + public static final int VK_LATENCY_MARKER_PRESENT_END_NV = 5; + public static final int VK_LATENCY_MARKER_INPUT_SAMPLE_NV = 6; + public static final int VK_LATENCY_MARKER_TRIGGER_FLASH_NV = 7; + public static final int VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_START_NV = 8; + public static final int VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_END_NV = 9; + public static final int VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_START_NV = 10; + public static final int VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_END_NV = 11; + public static final int VK_OUT_OF_BAND_QUEUE_TYPE_RENDER_NV = 0; + public static final int VK_OUT_OF_BAND_QUEUE_TYPE_PRESENT_NV = 1; + public static final int VK_NV_LOW_LATENCY_2_SPEC_VERSION = 2; + public static final String VK_NV_LOW_LATENCY_2_EXTENSION_NAME = "VK_NV_low_latency2"; + public static final int VK_STRUCTURE_TYPE_LATENCY_SLEEP_MODE_INFO_NV = 1000505000; + public static final int VK_STRUCTURE_TYPE_LATENCY_SLEEP_INFO_NV = 1000505001; + public static final int VK_STRUCTURE_TYPE_SET_LATENCY_MARKER_INFO_NV = 1000505002; + public static final int VK_STRUCTURE_TYPE_GET_LATENCY_MARKER_INFO_NV = 1000505003; + public static final int VK_STRUCTURE_TYPE_LATENCY_TIMINGS_FRAME_REPORT_NV = 1000505004; + public static final int VK_STRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NV = 1000505005; + public static final int VK_STRUCTURE_TYPE_OUT_OF_BAND_QUEUE_TYPE_INFO_NV = 1000505006; + public static final int VK_STRUCTURE_TYPE_SWAPCHAIN_LATENCY_CREATE_INFO_NV = 1000505007; + public static final int VK_STRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NV = 1000505008; + public static final MethodHandle MH_vkSetLatencySleepModeNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkLatencySleepNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkSetLatencyMarkerNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetLatencyTimingsNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkQueueNotifyOutOfBandNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkSetLatencySleepModeNV; + public final MemorySegment PFN_vkLatencySleepNV; + public final MemorySegment PFN_vkSetLatencyMarkerNV; + public final MemorySegment PFN_vkGetLatencyTimingsNV; + public final MemorySegment PFN_vkQueueNotifyOutOfBandNV; + + public VKNVLowLatency2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkSetLatencySleepModeNV = func.invoke(device, "vkSetLatencySleepModeNV"); + PFN_vkLatencySleepNV = func.invoke(device, "vkLatencySleepNV"); + PFN_vkSetLatencyMarkerNV = func.invoke(device, "vkSetLatencyMarkerNV"); + PFN_vkGetLatencyTimingsNV = func.invoke(device, "vkGetLatencyTimingsNV"); + PFN_vkQueueNotifyOutOfBandNV = func.invoke(device, "vkQueueNotifyOutOfBandNV"); + } + + public @CType("VkResult") int SetLatencySleepModeNV(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("const VkLatencySleepModeInfoNV *") MemorySegment pSleepModeInfo) { + if (Unmarshal.isNullPointer(PFN_vkSetLatencySleepModeNV)) throw new SymbolNotFoundError("Symbol not found: vkSetLatencySleepModeNV"); + try { return (int) MH_vkSetLatencySleepModeNV.invokeExact(PFN_vkSetLatencySleepModeNV, device, swapchain, pSleepModeInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkSetLatencySleepModeNV", e); } + } + + public @CType("VkResult") int LatencySleepNV(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("const VkLatencySleepInfoNV *") MemorySegment pSleepInfo) { + if (Unmarshal.isNullPointer(PFN_vkLatencySleepNV)) throw new SymbolNotFoundError("Symbol not found: vkLatencySleepNV"); + try { return (int) MH_vkLatencySleepNV.invokeExact(PFN_vkLatencySleepNV, device, swapchain, pSleepInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkLatencySleepNV", e); } + } + + public void SetLatencyMarkerNV(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("const VkSetLatencyMarkerInfoNV *") MemorySegment pLatencyMarkerInfo) { + if (Unmarshal.isNullPointer(PFN_vkSetLatencyMarkerNV)) throw new SymbolNotFoundError("Symbol not found: vkSetLatencyMarkerNV"); + try { MH_vkSetLatencyMarkerNV.invokeExact(PFN_vkSetLatencyMarkerNV, device, swapchain, pLatencyMarkerInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkSetLatencyMarkerNV", e); } + } + + public void GetLatencyTimingsNV(@CType("VkDevice") MemorySegment device, @CType("VkSwapchainKHR") MemorySegment swapchain, @CType("VkGetLatencyMarkerInfoNV *") MemorySegment pLatencyMarkerInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetLatencyTimingsNV)) throw new SymbolNotFoundError("Symbol not found: vkGetLatencyTimingsNV"); + try { MH_vkGetLatencyTimingsNV.invokeExact(PFN_vkGetLatencyTimingsNV, device, swapchain, pLatencyMarkerInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetLatencyTimingsNV", e); } + } + + public void QueueNotifyOutOfBandNV(@CType("VkQueue") MemorySegment queue, @CType("const VkOutOfBandQueueTypeInfoNV *") MemorySegment pQueueTypeInfo) { + if (Unmarshal.isNullPointer(PFN_vkQueueNotifyOutOfBandNV)) throw new SymbolNotFoundError("Symbol not found: vkQueueNotifyOutOfBandNV"); + try { MH_vkQueueNotifyOutOfBandNV.invokeExact(PFN_vkQueueNotifyOutOfBandNV, queue, pQueueTypeInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkQueueNotifyOutOfBandNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVMemoryDecompression.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVMemoryDecompression.java new file mode 100644 index 00000000..bb7d04ec --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVMemoryDecompression.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVMemoryDecompression { + public static final long VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV = 0x00000001L; + public static final int VK_NV_MEMORY_DECOMPRESSION_SPEC_VERSION = 1; + public static final String VK_NV_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_NV_memory_decompression"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV = 1000427000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV = 1000427001; + public static final MethodHandle MH_vkCmdDecompressMemoryNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdDecompressMemoryIndirectCountNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdDecompressMemoryNV; + public final MemorySegment PFN_vkCmdDecompressMemoryIndirectCountNV; + + public VKNVMemoryDecompression(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdDecompressMemoryNV = func.invoke(device, "vkCmdDecompressMemoryNV"); + PFN_vkCmdDecompressMemoryIndirectCountNV = func.invoke(device, "vkCmdDecompressMemoryIndirectCountNV"); + } + + public void CmdDecompressMemoryNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int decompressRegionCount, @CType("const VkDecompressMemoryRegionNV *") MemorySegment pDecompressMemoryRegions) { + if (Unmarshal.isNullPointer(PFN_vkCmdDecompressMemoryNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdDecompressMemoryNV"); + try { MH_vkCmdDecompressMemoryNV.invokeExact(PFN_vkCmdDecompressMemoryNV, commandBuffer, decompressRegionCount, pDecompressMemoryRegions); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDecompressMemoryNV", e); } + } + + public void CmdDecompressMemoryIndirectCountNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkDeviceAddress") long indirectCommandsAddress, @CType("VkDeviceAddress") long indirectCommandsCountAddress, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDecompressMemoryIndirectCountNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdDecompressMemoryIndirectCountNV"); + try { MH_vkCmdDecompressMemoryIndirectCountNV.invokeExact(PFN_vkCmdDecompressMemoryIndirectCountNV, commandBuffer, indirectCommandsAddress, indirectCommandsCountAddress, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDecompressMemoryIndirectCountNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVMeshShader.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVMeshShader.java new file mode 100644 index 00000000..a51aa7a5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVMeshShader.java @@ -0,0 +1,68 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.ext.VKEXTMeshShader.*; +public class VKNVMeshShader { + public static final int VK_NV_MESH_SHADER_SPEC_VERSION = 1; + public static final String VK_NV_MESH_SHADER_EXTENSION_NAME = "VK_NV_mesh_shader"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT = 1000202002; + public static final int VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT = 1000202003; + public static final int VK_SHADER_STAGE_TASK_BIT_NV = VK_SHADER_STAGE_TASK_BIT_EXT; + public static final int VK_SHADER_STAGE_MESH_BIT_NV = VK_SHADER_STAGE_MESH_BIT_EXT; + public static final int VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV = VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT; + public static final int VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV = VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT; + public static final MethodHandle MH_vkCmdDrawMeshTasksNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawMeshTasksIndirectNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdDrawMeshTasksIndirectCountNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCmdDrawMeshTasksNV; + public final MemorySegment PFN_vkCmdDrawMeshTasksIndirectNV; + public final MemorySegment PFN_vkCmdDrawMeshTasksIndirectCountNV; + + public VKNVMeshShader(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdDrawMeshTasksNV = func.invoke(device, "vkCmdDrawMeshTasksNV"); + PFN_vkCmdDrawMeshTasksIndirectNV = func.invoke(device, "vkCmdDrawMeshTasksIndirectNV"); + PFN_vkCmdDrawMeshTasksIndirectCountNV = func.invoke(device, "vkCmdDrawMeshTasksIndirectCountNV"); + } + + public void CmdDrawMeshTasksNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int taskCount, @CType("uint32_t") int firstTask) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawMeshTasksNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawMeshTasksNV"); + try { MH_vkCmdDrawMeshTasksNV.invokeExact(PFN_vkCmdDrawMeshTasksNV, commandBuffer, taskCount, firstTask); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawMeshTasksNV", e); } + } + + public void CmdDrawMeshTasksIndirectNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("uint32_t") int drawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawMeshTasksIndirectNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawMeshTasksIndirectNV"); + try { MH_vkCmdDrawMeshTasksIndirectNV.invokeExact(PFN_vkCmdDrawMeshTasksIndirectNV, commandBuffer, buffer, offset, drawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawMeshTasksIndirectNV", e); } + } + + public void CmdDrawMeshTasksIndirectCountNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment buffer, @CType("VkDeviceSize") long offset, @CType("VkBuffer") MemorySegment countBuffer, @CType("VkDeviceSize") long countBufferOffset, @CType("uint32_t") int maxDrawCount, @CType("uint32_t") int stride) { + if (Unmarshal.isNullPointer(PFN_vkCmdDrawMeshTasksIndirectCountNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdDrawMeshTasksIndirectCountNV"); + try { MH_vkCmdDrawMeshTasksIndirectCountNV.invokeExact(PFN_vkCmdDrawMeshTasksIndirectCountNV, commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdDrawMeshTasksIndirectCountNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVOpticalFlow.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVOpticalFlow.java new file mode 100644 index 00000000..e32e746d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVOpticalFlow.java @@ -0,0 +1,125 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.nv.VKNVOpticalFlow.*; +public class VKNVOpticalFlow { + public static final int VK_OPTICAL_FLOW_USAGE_UNKNOWN_NV = 0; + public static final int VK_OPTICAL_FLOW_USAGE_INPUT_BIT_NV = 0x00000001; + public static final int VK_OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV = 0x00000002; + public static final int VK_OPTICAL_FLOW_USAGE_HINT_BIT_NV = 0x00000004; + public static final int VK_OPTICAL_FLOW_USAGE_COST_BIT_NV = 0x00000008; + public static final int VK_OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV = 0x00000010; + public static final int VK_OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV = 0; + public static final int VK_OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV = 0x00000001; + public static final int VK_OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV = 0x00000002; + public static final int VK_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV = 0x00000004; + public static final int VK_OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV = 0x00000008; + public static final int VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV = 0; + public static final int VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV = 1; + public static final int VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV = 2; + public static final int VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV = 3; + public static final int VK_OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV = 0; + public static final int VK_OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV = 1; + public static final int VK_OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV = 2; + public static final int VK_OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV = 3; + public static final int VK_OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV = 4; + public static final int VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV = 5; + public static final int VK_OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV = 6; + public static final int VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV = 7; + public static final int VK_OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV = 8; + public static final int VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV = 0x00000001; + public static final int VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV = 0x00000002; + public static final int VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV = 0x00000004; + public static final int VK_OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV = 0x00000008; + public static final int VK_OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV = 0x00000010; + public static final int VK_OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV = 0x00000001; + public static final int VK_NV_OPTICAL_FLOW_SPEC_VERSION = 1; + public static final String VK_NV_OPTICAL_FLOW_EXTENSION_NAME = "VK_NV_optical_flow"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV = 1000464000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV = 1000464001; + public static final int VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV = 1000464002; + public static final int VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV = 1000464003; + public static final int VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV = 1000464004; + public static final int VK_STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV = 1000464005; + public static final int VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV = 1000464010; + public static final int VK_FORMAT_R16G16_SFIXED5_NV = 1000464000; + public static final int VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV = 1000464000; + public static final int VK_QUEUE_OPTICAL_FLOW_BIT_NV = 0x00000100; + public static final long VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV = 0x20000000L; + public static final long VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV = 0x40000000000L; + public static final long VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV = 0x80000000000L; + public static final long VK_FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV = 0x10000000000L; + public static final long VK_FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV = 0x20000000000L; + public static final long VK_FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV = 0x40000000000L; + public static final int VK_FORMAT_R16G16_S10_5_NV = VK_FORMAT_R16G16_SFIXED5_NV; + public static final MethodHandle MH_vkGetPhysicalDeviceOpticalFlowImageFormatsNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateOpticalFlowSessionNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyOpticalFlowSessionNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkBindOpticalFlowSessionImageNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdOpticalFlowExecuteNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV; + public final MemorySegment PFN_vkCreateOpticalFlowSessionNV; + public final MemorySegment PFN_vkDestroyOpticalFlowSessionNV; + public final MemorySegment PFN_vkBindOpticalFlowSessionImageNV; + public final MemorySegment PFN_vkCmdOpticalFlowExecuteNV; + + public VKNVOpticalFlow(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV = func.invoke(device, "vkGetPhysicalDeviceOpticalFlowImageFormatsNV"); + PFN_vkCreateOpticalFlowSessionNV = func.invoke(device, "vkCreateOpticalFlowSessionNV"); + PFN_vkDestroyOpticalFlowSessionNV = func.invoke(device, "vkDestroyOpticalFlowSessionNV"); + PFN_vkBindOpticalFlowSessionImageNV = func.invoke(device, "vkBindOpticalFlowSessionImageNV"); + PFN_vkCmdOpticalFlowExecuteNV = func.invoke(device, "vkCmdOpticalFlowExecuteNV"); + } + + public @CType("VkResult") int GetPhysicalDeviceOpticalFlowImageFormatsNV(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("const VkOpticalFlowImageFormatInfoNV *") MemorySegment pOpticalFlowImageFormatInfo, @CType("uint32_t *") MemorySegment pFormatCount, @CType("VkOpticalFlowImageFormatPropertiesNV *") MemorySegment pImageFormatProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceOpticalFlowImageFormatsNV"); + try { return (int) MH_vkGetPhysicalDeviceOpticalFlowImageFormatsNV.invokeExact(PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV, physicalDevice, pOpticalFlowImageFormatInfo, pFormatCount, pImageFormatProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceOpticalFlowImageFormatsNV", e); } + } + + public @CType("VkResult") int CreateOpticalFlowSessionNV(@CType("VkDevice") MemorySegment device, @CType("const VkOpticalFlowSessionCreateInfoNV *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkOpticalFlowSessionNV *") MemorySegment pSession) { + if (Unmarshal.isNullPointer(PFN_vkCreateOpticalFlowSessionNV)) throw new SymbolNotFoundError("Symbol not found: vkCreateOpticalFlowSessionNV"); + try { return (int) MH_vkCreateOpticalFlowSessionNV.invokeExact(PFN_vkCreateOpticalFlowSessionNV, device, pCreateInfo, pAllocator, pSession); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateOpticalFlowSessionNV", e); } + } + + public void DestroyOpticalFlowSessionNV(@CType("VkDevice") MemorySegment device, @CType("VkOpticalFlowSessionNV") MemorySegment session, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyOpticalFlowSessionNV)) throw new SymbolNotFoundError("Symbol not found: vkDestroyOpticalFlowSessionNV"); + try { MH_vkDestroyOpticalFlowSessionNV.invokeExact(PFN_vkDestroyOpticalFlowSessionNV, device, session, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyOpticalFlowSessionNV", e); } + } + + public @CType("VkResult") int BindOpticalFlowSessionImageNV(@CType("VkDevice") MemorySegment device, @CType("VkOpticalFlowSessionNV") MemorySegment session, @CType("VkOpticalFlowSessionBindingPointNV") int bindingPoint, @CType("VkImageView") MemorySegment view, @CType("VkImageLayout") int layout) { + if (Unmarshal.isNullPointer(PFN_vkBindOpticalFlowSessionImageNV)) throw new SymbolNotFoundError("Symbol not found: vkBindOpticalFlowSessionImageNV"); + try { return (int) MH_vkBindOpticalFlowSessionImageNV.invokeExact(PFN_vkBindOpticalFlowSessionImageNV, device, session, bindingPoint, view, layout); } + catch (Throwable e) { throw new RuntimeException("error in vkBindOpticalFlowSessionImageNV", e); } + } + + public void CmdOpticalFlowExecuteNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkOpticalFlowSessionNV") MemorySegment session, @CType("const VkOpticalFlowExecuteInfoNV *") MemorySegment pExecuteInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdOpticalFlowExecuteNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdOpticalFlowExecuteNV"); + try { MH_vkCmdOpticalFlowExecuteNV.invokeExact(PFN_vkCmdOpticalFlowExecuteNV, commandBuffer, session, pExecuteInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdOpticalFlowExecuteNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVPerStageDescriptorSet.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVPerStageDescriptorSet.java new file mode 100644 index 00000000..ad3f2c2b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVPerStageDescriptorSet.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVPerStageDescriptorSet { + public static final int VK_NV_PER_STAGE_DESCRIPTOR_SET_SPEC_VERSION = 1; + public static final String VK_NV_PER_STAGE_DESCRIPTOR_SET_EXTENSION_NAME = "VK_NV_per_stage_descriptor_set"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV = 1000516000; + public static final int VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV = 0x00000040; + + public VKNVPerStageDescriptorSet(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVPresentBarrier.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVPresentBarrier.java new file mode 100644 index 00000000..c6a88e70 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVPresentBarrier.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVPresentBarrier { + public static final int VK_NV_PRESENT_BARRIER_SPEC_VERSION = 1; + public static final String VK_NV_PRESENT_BARRIER_EXTENSION_NAME = "VK_NV_present_barrier"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV = 1000292000; + public static final int VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_BARRIER_NV = 1000292001; + public static final int VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV = 1000292002; + + public VKNVPresentBarrier(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRawAccessChains.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRawAccessChains.java new file mode 100644 index 00000000..7b1e91c1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRawAccessChains.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVRawAccessChains { + public static final int VK_NV_RAW_ACCESS_CHAINS_SPEC_VERSION = 1; + public static final String VK_NV_RAW_ACCESS_CHAINS_EXTENSION_NAME = "VK_NV_raw_access_chains"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV = 1000555000; + + public VKNVRawAccessChains(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracing.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracing.java new file mode 100644 index 00000000..445a6b6e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracing.java @@ -0,0 +1,195 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.khr.VKKHRAccelerationStructure.*; +import static overrungl.vulkan.khr.VKKHRRayTracingPipeline.*; +public class VKNVRayTracing { + public static final int VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV = 0; + public static final int VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV = 1; + public static final int VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV = 2; + public static final int VK_NV_RAY_TRACING_SPEC_VERSION = 3; + public static final String VK_NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"; + public static final int VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV = 1000165000; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000165001; + public static final int VK_STRUCTURE_TYPE_GEOMETRY_NV = 1000165003; + public static final int VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV = 1000165004; + public static final int VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV = 1000165005; + public static final int VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV = 1000165006; + public static final int VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV = 1000165007; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV = 1000165008; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV = 1000165009; + public static final int VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV = 1000165011; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV = 1000165012; + public static final int VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV = 1000165000; + public static final int VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000; + public static final int VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV = 0x00000020; + public static final int VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV = 1000165000; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT = 1000165000; + public static final int VK_SHADER_UNUSED_NV = VK_SHADER_UNUSED_KHR; + public static final int VK_SHADER_STAGE_RAYGEN_BIT_NV = VK_SHADER_STAGE_RAYGEN_BIT_KHR; + public static final int VK_SHADER_STAGE_ANY_HIT_BIT_NV = VK_SHADER_STAGE_ANY_HIT_BIT_KHR; + public static final int VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR; + public static final int VK_SHADER_STAGE_MISS_BIT_NV = VK_SHADER_STAGE_MISS_BIT_KHR; + public static final int VK_SHADER_STAGE_INTERSECTION_BIT_NV = VK_SHADER_STAGE_INTERSECTION_BIT_KHR; + public static final int VK_SHADER_STAGE_CALLABLE_BIT_NV = VK_SHADER_STAGE_CALLABLE_BIT_KHR; + public static final int VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR; + public static final int VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR; + public static final int VK_BUFFER_USAGE_RAY_TRACING_BIT_NV = VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR; + public static final int VK_PIPELINE_BIND_POINT_RAY_TRACING_NV = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR; + public static final int VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR; + public static final int VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR; + public static final int VK_INDEX_TYPE_NONE_NV = VK_INDEX_TYPE_NONE_KHR; + public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR; + public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR; + public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR; + public static final int VK_GEOMETRY_TYPE_TRIANGLES_NV = VK_GEOMETRY_TYPE_TRIANGLES_KHR; + public static final int VK_GEOMETRY_TYPE_AABBS_NV = VK_GEOMETRY_TYPE_AABBS_KHR; + public static final int VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR; + public static final int VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR; + public static final int VK_GEOMETRY_OPAQUE_BIT_NV = VK_GEOMETRY_OPAQUE_BIT_KHR; + public static final int VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR; + public static final int VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR; + public static final int VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR; + public static final int VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR; + public static final int VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR; + public static final int VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV = VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR; + public static final int VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV = VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR; + public static final MethodHandle MH_vkCreateAccelerationStructureNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyAccelerationStructureNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetAccelerationStructureMemoryRequirementsNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkBindAccelerationStructureMemoryNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdBuildAccelerationStructureNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG)); + public static final MethodHandle MH_vkCmdCopyAccelerationStructureNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdTraceRaysNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCreateRayTracingPipelinesNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetRayTracingShaderGroupHandlesNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetAccelerationStructureHandleNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdWriteAccelerationStructuresPropertiesNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCompileDeferredNV = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public final MemorySegment PFN_vkCreateAccelerationStructureNV; + public final MemorySegment PFN_vkDestroyAccelerationStructureNV; + public final MemorySegment PFN_vkGetAccelerationStructureMemoryRequirementsNV; + public final MemorySegment PFN_vkBindAccelerationStructureMemoryNV; + public final MemorySegment PFN_vkCmdBuildAccelerationStructureNV; + public final MemorySegment PFN_vkCmdCopyAccelerationStructureNV; + public final MemorySegment PFN_vkCmdTraceRaysNV; + public final MemorySegment PFN_vkCreateRayTracingPipelinesNV; + public final MemorySegment PFN_vkGetRayTracingShaderGroupHandlesNV; + public final MemorySegment PFN_vkGetAccelerationStructureHandleNV; + public final MemorySegment PFN_vkCmdWriteAccelerationStructuresPropertiesNV; + public final MemorySegment PFN_vkCompileDeferredNV; + + public VKNVRayTracing(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateAccelerationStructureNV = func.invoke(device, "vkCreateAccelerationStructureNV"); + PFN_vkDestroyAccelerationStructureNV = func.invoke(device, "vkDestroyAccelerationStructureNV"); + PFN_vkGetAccelerationStructureMemoryRequirementsNV = func.invoke(device, "vkGetAccelerationStructureMemoryRequirementsNV"); + PFN_vkBindAccelerationStructureMemoryNV = func.invoke(device, "vkBindAccelerationStructureMemoryNV"); + PFN_vkCmdBuildAccelerationStructureNV = func.invoke(device, "vkCmdBuildAccelerationStructureNV"); + PFN_vkCmdCopyAccelerationStructureNV = func.invoke(device, "vkCmdCopyAccelerationStructureNV"); + PFN_vkCmdTraceRaysNV = func.invoke(device, "vkCmdTraceRaysNV"); + PFN_vkCreateRayTracingPipelinesNV = func.invoke(device, "vkCreateRayTracingPipelinesNV"); + PFN_vkGetRayTracingShaderGroupHandlesNV = func.invoke(device, "vkGetRayTracingShaderGroupHandlesNV", "vkGetRayTracingShaderGroupHandlesKHR"); + PFN_vkGetAccelerationStructureHandleNV = func.invoke(device, "vkGetAccelerationStructureHandleNV"); + PFN_vkCmdWriteAccelerationStructuresPropertiesNV = func.invoke(device, "vkCmdWriteAccelerationStructuresPropertiesNV"); + PFN_vkCompileDeferredNV = func.invoke(device, "vkCompileDeferredNV"); + } + + public @CType("VkResult") int CreateAccelerationStructureNV(@CType("VkDevice") MemorySegment device, @CType("const VkAccelerationStructureCreateInfoNV *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkAccelerationStructureNV *") MemorySegment pAccelerationStructure) { + if (Unmarshal.isNullPointer(PFN_vkCreateAccelerationStructureNV)) throw new SymbolNotFoundError("Symbol not found: vkCreateAccelerationStructureNV"); + try { return (int) MH_vkCreateAccelerationStructureNV.invokeExact(PFN_vkCreateAccelerationStructureNV, device, pCreateInfo, pAllocator, pAccelerationStructure); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateAccelerationStructureNV", e); } + } + + public void DestroyAccelerationStructureNV(@CType("VkDevice") MemorySegment device, @CType("VkAccelerationStructureNV") MemorySegment accelerationStructure, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyAccelerationStructureNV)) throw new SymbolNotFoundError("Symbol not found: vkDestroyAccelerationStructureNV"); + try { MH_vkDestroyAccelerationStructureNV.invokeExact(PFN_vkDestroyAccelerationStructureNV, device, accelerationStructure, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyAccelerationStructureNV", e); } + } + + public void GetAccelerationStructureMemoryRequirementsNV(@CType("VkDevice") MemorySegment device, @CType("const VkAccelerationStructureMemoryRequirementsInfoNV *") MemorySegment pInfo, @CType("VkMemoryRequirements2KHR *") MemorySegment pMemoryRequirements) { + if (Unmarshal.isNullPointer(PFN_vkGetAccelerationStructureMemoryRequirementsNV)) throw new SymbolNotFoundError("Symbol not found: vkGetAccelerationStructureMemoryRequirementsNV"); + try { MH_vkGetAccelerationStructureMemoryRequirementsNV.invokeExact(PFN_vkGetAccelerationStructureMemoryRequirementsNV, device, pInfo, pMemoryRequirements); } + catch (Throwable e) { throw new RuntimeException("error in vkGetAccelerationStructureMemoryRequirementsNV", e); } + } + + public @CType("VkResult") int BindAccelerationStructureMemoryNV(@CType("VkDevice") MemorySegment device, @CType("uint32_t") int bindInfoCount, @CType("const VkBindAccelerationStructureMemoryInfoNV *") MemorySegment pBindInfos) { + if (Unmarshal.isNullPointer(PFN_vkBindAccelerationStructureMemoryNV)) throw new SymbolNotFoundError("Symbol not found: vkBindAccelerationStructureMemoryNV"); + try { return (int) MH_vkBindAccelerationStructureMemoryNV.invokeExact(PFN_vkBindAccelerationStructureMemoryNV, device, bindInfoCount, pBindInfos); } + catch (Throwable e) { throw new RuntimeException("error in vkBindAccelerationStructureMemoryNV", e); } + } + + public void CmdBuildAccelerationStructureNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkAccelerationStructureInfoNV *") MemorySegment pInfo, @CType("VkBuffer") MemorySegment instanceData, @CType("VkDeviceSize") long instanceOffset, @CType("VkBool32") int update, @CType("VkAccelerationStructureNV") MemorySegment dst, @CType("VkAccelerationStructureNV") MemorySegment src, @CType("VkBuffer") MemorySegment scratch, @CType("VkDeviceSize") long scratchOffset) { + if (Unmarshal.isNullPointer(PFN_vkCmdBuildAccelerationStructureNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdBuildAccelerationStructureNV"); + try { MH_vkCmdBuildAccelerationStructureNV.invokeExact(PFN_vkCmdBuildAccelerationStructureNV, commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, scratch, scratchOffset); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBuildAccelerationStructureNV", e); } + } + + public void CmdCopyAccelerationStructureNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkAccelerationStructureNV") MemorySegment dst, @CType("VkAccelerationStructureNV") MemorySegment src, @CType("VkCopyAccelerationStructureModeKHR") int mode) { + if (Unmarshal.isNullPointer(PFN_vkCmdCopyAccelerationStructureNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdCopyAccelerationStructureNV"); + try { MH_vkCmdCopyAccelerationStructureNV.invokeExact(PFN_vkCmdCopyAccelerationStructureNV, commandBuffer, dst, src, mode); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCopyAccelerationStructureNV", e); } + } + + public void CmdTraceRaysNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkBuffer") MemorySegment raygenShaderBindingTableBuffer, @CType("VkDeviceSize") long raygenShaderBindingOffset, @CType("VkBuffer") MemorySegment missShaderBindingTableBuffer, @CType("VkDeviceSize") long missShaderBindingOffset, @CType("VkDeviceSize") long missShaderBindingStride, @CType("VkBuffer") MemorySegment hitShaderBindingTableBuffer, @CType("VkDeviceSize") long hitShaderBindingOffset, @CType("VkDeviceSize") long hitShaderBindingStride, @CType("VkBuffer") MemorySegment callableShaderBindingTableBuffer, @CType("VkDeviceSize") long callableShaderBindingOffset, @CType("VkDeviceSize") long callableShaderBindingStride, @CType("uint32_t") int width, @CType("uint32_t") int height, @CType("uint32_t") int depth) { + if (Unmarshal.isNullPointer(PFN_vkCmdTraceRaysNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdTraceRaysNV"); + try { MH_vkCmdTraceRaysNV.invokeExact(PFN_vkCmdTraceRaysNV, commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, width, height, depth); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdTraceRaysNV", e); } + } + + public @CType("VkResult") int CreateRayTracingPipelinesNV(@CType("VkDevice") MemorySegment device, @CType("VkPipelineCache") MemorySegment pipelineCache, @CType("uint32_t") int createInfoCount, @CType("const VkRayTracingPipelineCreateInfoNV *") MemorySegment pCreateInfos, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkPipeline *") MemorySegment pPipelines) { + if (Unmarshal.isNullPointer(PFN_vkCreateRayTracingPipelinesNV)) throw new SymbolNotFoundError("Symbol not found: vkCreateRayTracingPipelinesNV"); + try { return (int) MH_vkCreateRayTracingPipelinesNV.invokeExact(PFN_vkCreateRayTracingPipelinesNV, device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateRayTracingPipelinesNV", e); } + } + + public @CType("VkResult") int GetRayTracingShaderGroupHandlesNV(@CType("VkDevice") MemorySegment device, @CType("VkPipeline") MemorySegment pipeline, @CType("uint32_t") int firstGroup, @CType("uint32_t") int groupCount, @CType("size_t") long dataSize, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetRayTracingShaderGroupHandlesNV)) throw new SymbolNotFoundError("Symbol not found: vkGetRayTracingShaderGroupHandlesNV"); + try { return (int) MH_vkGetRayTracingShaderGroupHandlesNV.invokeExact(PFN_vkGetRayTracingShaderGroupHandlesNV, device, pipeline, firstGroup, groupCount, dataSize, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetRayTracingShaderGroupHandlesNV", e); } + } + + public @CType("VkResult") int GetAccelerationStructureHandleNV(@CType("VkDevice") MemorySegment device, @CType("VkAccelerationStructureNV") MemorySegment accelerationStructure, @CType("size_t") long dataSize, @CType("void *") MemorySegment pData) { + if (Unmarshal.isNullPointer(PFN_vkGetAccelerationStructureHandleNV)) throw new SymbolNotFoundError("Symbol not found: vkGetAccelerationStructureHandleNV"); + try { return (int) MH_vkGetAccelerationStructureHandleNV.invokeExact(PFN_vkGetAccelerationStructureHandleNV, device, accelerationStructure, dataSize, pData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetAccelerationStructureHandleNV", e); } + } + + public void CmdWriteAccelerationStructuresPropertiesNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int accelerationStructureCount, @CType("const VkAccelerationStructureNV *") MemorySegment pAccelerationStructures, @CType("VkQueryType") int queryType, @CType("VkQueryPool") MemorySegment queryPool, @CType("uint32_t") int firstQuery) { + if (Unmarshal.isNullPointer(PFN_vkCmdWriteAccelerationStructuresPropertiesNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdWriteAccelerationStructuresPropertiesNV"); + try { MH_vkCmdWriteAccelerationStructuresPropertiesNV.invokeExact(PFN_vkCmdWriteAccelerationStructuresPropertiesNV, commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdWriteAccelerationStructuresPropertiesNV", e); } + } + + public @CType("VkResult") int CompileDeferredNV(@CType("VkDevice") MemorySegment device, @CType("VkPipeline") MemorySegment pipeline, @CType("uint32_t") int shader) { + if (Unmarshal.isNullPointer(PFN_vkCompileDeferredNV)) throw new SymbolNotFoundError("Symbol not found: vkCompileDeferredNV"); + try { return (int) MH_vkCompileDeferredNV.invokeExact(PFN_vkCompileDeferredNV, device, pipeline, shader); } + catch (Throwable e) { throw new RuntimeException("error in vkCompileDeferredNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracingInvocationReorder.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracingInvocationReorder.java new file mode 100644 index 00000000..ea62db50 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracingInvocationReorder.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVRayTracingInvocationReorder { + public static final int VK_RAY_TRACING_INVOCATION_REORDER_MODE_NONE_NV = 0; + public static final int VK_RAY_TRACING_INVOCATION_REORDER_MODE_REORDER_NV = 1; + public static final int VK_NV_RAY_TRACING_INVOCATION_REORDER_SPEC_VERSION = 1; + public static final String VK_NV_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME = "VK_NV_ray_tracing_invocation_reorder"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV = 1000490000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV = 1000490001; + + public VKNVRayTracingInvocationReorder(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracingMotionBlur.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracingMotionBlur.java new file mode 100644 index 00000000..639e680c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracingMotionBlur.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVRayTracingMotionBlur { + public static final int VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV = 0; + public static final int VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV = 1; + public static final int VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV = 2; + public static final int VK_NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION = 1; + public static final String VK_NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME = "VK_NV_ray_tracing_motion_blur"; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV = 1000327000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV = 1000327001; + public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV = 1000327002; + public static final int VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = 0x00000020; + public static final int VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV = 0x00000004; + public static final int VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000; + + public VKNVRayTracingMotionBlur(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracingValidation.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracingValidation.java new file mode 100644 index 00000000..2f8971e4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRayTracingValidation.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVRayTracingValidation { + public static final int VK_NV_RAY_TRACING_VALIDATION_SPEC_VERSION = 1; + public static final String VK_NV_RAY_TRACING_VALIDATION_EXTENSION_NAME = "VK_NV_ray_tracing_validation"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV = 1000568000; + + public VKNVRayTracingValidation(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRepresentativeFragmentTest.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRepresentativeFragmentTest.java new file mode 100644 index 00000000..b87dd87e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVRepresentativeFragmentTest.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVRepresentativeFragmentTest { + public static final int VK_NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION = 2; + public static final String VK_NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME = "VK_NV_representative_fragment_test"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV = 1000166000; + public static final int VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV = 1000166001; + + public VKNVRepresentativeFragmentTest(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVSampleMaskOverrideCoverage.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVSampleMaskOverrideCoverage.java new file mode 100644 index 00000000..e52d537d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVSampleMaskOverrideCoverage.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVSampleMaskOverrideCoverage { + public static final int VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION = 1; + public static final String VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME = "VK_NV_sample_mask_override_coverage"; + + public VKNVSampleMaskOverrideCoverage(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVScissorExclusive.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVScissorExclusive.java new file mode 100644 index 00000000..69f40d3c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVScissorExclusive.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVScissorExclusive { + public static final int VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION = 2; + public static final String VK_NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME = "VK_NV_scissor_exclusive"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV = 1000205000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV = 1000205002; + public static final int VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV = 1000205000; + public static final int VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV = 1000205001; + public static final MethodHandle MH_vkCmdSetExclusiveScissorEnableNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetExclusiveScissorNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdSetExclusiveScissorEnableNV; + public final MemorySegment PFN_vkCmdSetExclusiveScissorNV; + + public VKNVScissorExclusive(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdSetExclusiveScissorEnableNV = func.invoke(device, "vkCmdSetExclusiveScissorEnableNV"); + PFN_vkCmdSetExclusiveScissorNV = func.invoke(device, "vkCmdSetExclusiveScissorNV"); + } + + public void CmdSetExclusiveScissorEnableNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstExclusiveScissor, @CType("uint32_t") int exclusiveScissorCount, @CType("const VkBool32 *") MemorySegment pExclusiveScissorEnables) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetExclusiveScissorEnableNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetExclusiveScissorEnableNV"); + try { MH_vkCmdSetExclusiveScissorEnableNV.invokeExact(PFN_vkCmdSetExclusiveScissorEnableNV, commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissorEnables); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetExclusiveScissorEnableNV", e); } + } + + public void CmdSetExclusiveScissorNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstExclusiveScissor, @CType("uint32_t") int exclusiveScissorCount, @CType("const VkRect2D *") MemorySegment pExclusiveScissors) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetExclusiveScissorNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetExclusiveScissorNV"); + try { MH_vkCmdSetExclusiveScissorNV.invokeExact(PFN_vkCmdSetExclusiveScissorNV, commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetExclusiveScissorNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderAtomicFloat16Vector.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderAtomicFloat16Vector.java new file mode 100644 index 00000000..489d35fb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderAtomicFloat16Vector.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVShaderAtomicFloat16Vector { + public static final int VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_SPEC_VERSION = 1; + public static final String VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_EXTENSION_NAME = "VK_NV_shader_atomic_float16_vector"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV = 1000563000; + + public VKNVShaderAtomicFloat16Vector(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderImageFootprint.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderImageFootprint.java new file mode 100644 index 00000000..9d5de73f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderImageFootprint.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVShaderImageFootprint { + public static final int VK_NV_SHADER_IMAGE_FOOTPRINT_SPEC_VERSION = 2; + public static final String VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME = "VK_NV_shader_image_footprint"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000; + + public VKNVShaderImageFootprint(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderSmBuiltins.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderSmBuiltins.java new file mode 100644 index 00000000..bc7369eb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderSmBuiltins.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVShaderSmBuiltins { + public static final int VK_NV_SHADER_SM_BUILTINS_SPEC_VERSION = 1; + public static final String VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME = "VK_NV_shader_sm_builtins"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV = 1000154000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV = 1000154001; + + public VKNVShaderSmBuiltins(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderSubgroupPartitioned.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderSubgroupPartitioned.java new file mode 100644 index 00000000..ef85b267 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShaderSubgroupPartitioned.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVShaderSubgroupPartitioned { + public static final int VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION = 1; + public static final String VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME = "VK_NV_shader_subgroup_partitioned"; + public static final int VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = 0x00000100; + + public VKNVShaderSubgroupPartitioned(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShadingRateImage.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShadingRateImage.java new file mode 100644 index 00000000..21d2f6de --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVShadingRateImage.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.khr.VKKHRFragmentShadingRate.*; +public class VKNVShadingRateImage { + public static final int VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV = 0; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV = 1; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV = 2; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV = 3; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV = 4; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV = 5; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV = 6; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV = 7; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV = 8; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV = 9; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV = 10; + public static final int VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV = 11; + public static final int VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV = 0; + public static final int VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV = 1; + public static final int VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV = 2; + public static final int VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV = 3; + public static final int VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION = 3; + public static final String VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME = "VK_NV_shading_rate_image"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV = 1000164000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV = 1000164001; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV = 1000164002; + public static final int VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV = 1000164004; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV = 1000164005; + public static final int VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV = 1000164006; + public static final int VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV = VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR; + public static final int VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV = VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR; + public static final int VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV = VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR; + public static final int VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV = VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR; + public static final MethodHandle MH_vkCmdBindShadingRateImageNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_INT)); + public static final MethodHandle MH_vkCmdSetViewportShadingRatePaletteNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdSetCoarseSampleOrderNV = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCmdBindShadingRateImageNV; + public final MemorySegment PFN_vkCmdSetViewportShadingRatePaletteNV; + public final MemorySegment PFN_vkCmdSetCoarseSampleOrderNV; + + public VKNVShadingRateImage(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCmdBindShadingRateImageNV = func.invoke(device, "vkCmdBindShadingRateImageNV"); + PFN_vkCmdSetViewportShadingRatePaletteNV = func.invoke(device, "vkCmdSetViewportShadingRatePaletteNV"); + PFN_vkCmdSetCoarseSampleOrderNV = func.invoke(device, "vkCmdSetCoarseSampleOrderNV"); + } + + public void CmdBindShadingRateImageNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkImageView") MemorySegment imageView, @CType("VkImageLayout") int imageLayout) { + if (Unmarshal.isNullPointer(PFN_vkCmdBindShadingRateImageNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdBindShadingRateImageNV"); + try { MH_vkCmdBindShadingRateImageNV.invokeExact(PFN_vkCmdBindShadingRateImageNV, commandBuffer, imageView, imageLayout); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdBindShadingRateImageNV", e); } + } + + public void CmdSetViewportShadingRatePaletteNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("uint32_t") int firstViewport, @CType("uint32_t") int viewportCount, @CType("const VkShadingRatePaletteNV *") MemorySegment pShadingRatePalettes) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetViewportShadingRatePaletteNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetViewportShadingRatePaletteNV"); + try { MH_vkCmdSetViewportShadingRatePaletteNV.invokeExact(PFN_vkCmdSetViewportShadingRatePaletteNV, commandBuffer, firstViewport, viewportCount, pShadingRatePalettes); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetViewportShadingRatePaletteNV", e); } + } + + public void CmdSetCoarseSampleOrderNV(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("VkCoarseSampleOrderTypeNV") int sampleOrderType, @CType("uint32_t") int customSampleOrderCount, @CType("const VkCoarseSampleOrderCustomNV *") MemorySegment pCustomSampleOrders) { + if (Unmarshal.isNullPointer(PFN_vkCmdSetCoarseSampleOrderNV)) throw new SymbolNotFoundError("Symbol not found: vkCmdSetCoarseSampleOrderNV"); + try { MH_vkCmdSetCoarseSampleOrderNV.invokeExact(PFN_vkCmdSetCoarseSampleOrderNV, commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdSetCoarseSampleOrderNV", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVViewportArray2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVViewportArray2.java new file mode 100644 index 00000000..34cd3fbf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVViewportArray2.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.nv.VKNVViewportArray2.*; +public class VKNVViewportArray2 { + public static final int VK_NV_VIEWPORT_ARRAY_2_SPEC_VERSION = 1; + public static final String VK_NV_VIEWPORT_ARRAY_2_EXTENSION_NAME = "VK_NV_viewport_array2"; + public static final int VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION = VK_NV_VIEWPORT_ARRAY_2_SPEC_VERSION; + public static final String VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME = VK_NV_VIEWPORT_ARRAY_2_EXTENSION_NAME; + + public VKNVViewportArray2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVViewportSwizzle.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVViewportSwizzle.java new file mode 100644 index 00000000..a661b798 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVViewportSwizzle.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVViewportSwizzle { + public static final int VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0; + public static final int VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1; + public static final int VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2; + public static final int VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3; + public static final int VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4; + public static final int VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5; + public static final int VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6; + public static final int VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7; + public static final int VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION = 1; + public static final String VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME = "VK_NV_viewport_swizzle"; + public static final int VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000; + + public VKNVViewportSwizzle(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVWin32KeyedMutex.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVWin32KeyedMutex.java new file mode 100644 index 00000000..97aa9891 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/VKNVWin32KeyedMutex.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVWin32KeyedMutex { + public static final int VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION = 2; + public static final String VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_NV_win32_keyed_mutex"; + public static final int VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000; + + public VKNVWin32KeyedMutex(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureCreateInfoNV.java new file mode 100644 index 00000000..7b16628d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureCreateInfoNV.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### compactedSize +/// [VarHandle][#VH_compactedSize] - [Getter][#compactedSize()] - [Setter][#compactedSize(long)] +/// ### info +/// [Byte offset][#OFFSET_info] - [Memory layout][#ML_info] - [Getter][#info()] - [Setter][#info(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceSize compactedSize; +/// VkAccelerationStructureInfoNV info; +/// } VkAccelerationStructureCreateInfoNV; +/// ``` +public final class VkAccelerationStructureCreateInfoNV extends Struct { + /// The struct layout of `VkAccelerationStructureCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("compactedSize"), + overrungl.vulkan.nv.struct.VkAccelerationStructureInfoNV.LAYOUT.withName("info") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `compactedSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_compactedSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compactedSize")); + /// The byte offset of `info`. + public static final long OFFSET_info = LAYOUT.byteOffset(PathElement.groupElement("info")); + /// The memory layout of `info`. + public static final MemoryLayout ML_info = LAYOUT.select(PathElement.groupElement("info")); + + /// Creates `VkAccelerationStructureCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureCreateInfoNV(segment); } + + /// Creates `VkAccelerationStructureCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureCreateInfoNV` + public static VkAccelerationStructureCreateInfoNV alloc(SegmentAllocator allocator) { return new VkAccelerationStructureCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureCreateInfoNV` + public static VkAccelerationStructureCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoNV sType(@CType("VkStructureType") int value) { VkAccelerationStructureCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `compactedSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_compactedSize(MemorySegment segment, long index) { return (long) VH_compactedSize.get(segment, 0L, index); } + /// {@return `compactedSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_compactedSize(MemorySegment segment) { return VkAccelerationStructureCreateInfoNV.get_compactedSize(segment, 0L); } + /// {@return `compactedSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long compactedSizeAt(long index) { return VkAccelerationStructureCreateInfoNV.get_compactedSize(this.segment(), index); } + /// {@return `compactedSize`} + public @CType("VkDeviceSize") long compactedSize() { return VkAccelerationStructureCreateInfoNV.get_compactedSize(this.segment()); } + /// Sets `compactedSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compactedSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_compactedSize.set(segment, 0L, index, value); } + /// Sets `compactedSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compactedSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureCreateInfoNV.set_compactedSize(segment, 0L, value); } + /// Sets `compactedSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoNV compactedSizeAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureCreateInfoNV.set_compactedSize(this.segment(), index, value); return this; } + /// Sets `compactedSize` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoNV compactedSize(@CType("VkDeviceSize") long value) { VkAccelerationStructureCreateInfoNV.set_compactedSize(this.segment(), value); return this; } + + /// {@return `info` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureInfoNV") java.lang.foreign.MemorySegment get_info(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_info, index), ML_info); } + /// {@return `info`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureInfoNV") java.lang.foreign.MemorySegment get_info(MemorySegment segment) { return VkAccelerationStructureCreateInfoNV.get_info(segment, 0L); } + /// {@return `info` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureInfoNV") java.lang.foreign.MemorySegment infoAt(long index) { return VkAccelerationStructureCreateInfoNV.get_info(this.segment(), index); } + /// {@return `info`} + public @CType("VkAccelerationStructureInfoNV") java.lang.foreign.MemorySegment info() { return VkAccelerationStructureCreateInfoNV.get_info(this.segment()); } + /// Sets `info` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_info(MemorySegment segment, long index, @CType("VkAccelerationStructureInfoNV") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_info, index), ML_info.byteSize()); } + /// Sets `info` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_info(MemorySegment segment, @CType("VkAccelerationStructureInfoNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoNV.set_info(segment, 0L, value); } + /// Sets `info` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoNV infoAt(long index, @CType("VkAccelerationStructureInfoNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoNV.set_info(this.segment(), index, value); return this; } + /// Sets `info` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureCreateInfoNV info(@CType("VkAccelerationStructureInfoNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureCreateInfoNV.set_info(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureGeometryMotionTrianglesDataNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureGeometryMotionTrianglesDataNV.java new file mode 100644 index 00000000..c7149237 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureGeometryMotionTrianglesDataNV.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### vertexData +/// [Byte offset][#OFFSET_vertexData] - [Memory layout][#ML_vertexData] - [Getter][#vertexData()] - [Setter][#vertexData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureGeometryMotionTrianglesDataNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceOrHostAddressConstKHR vertexData; +/// } VkAccelerationStructureGeometryMotionTrianglesDataNV; +/// ``` +public final class VkAccelerationStructureGeometryMotionTrianglesDataNV extends Struct { + /// The struct layout of `VkAccelerationStructureGeometryMotionTrianglesDataNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("vertexData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `vertexData`. + public static final long OFFSET_vertexData = LAYOUT.byteOffset(PathElement.groupElement("vertexData")); + /// The memory layout of `vertexData`. + public static final MemoryLayout ML_vertexData = LAYOUT.select(PathElement.groupElement("vertexData")); + + /// Creates `VkAccelerationStructureGeometryMotionTrianglesDataNV` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureGeometryMotionTrianglesDataNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureGeometryMotionTrianglesDataNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryMotionTrianglesDataNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryMotionTrianglesDataNV(segment); } + + /// Creates `VkAccelerationStructureGeometryMotionTrianglesDataNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryMotionTrianglesDataNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryMotionTrianglesDataNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureGeometryMotionTrianglesDataNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureGeometryMotionTrianglesDataNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureGeometryMotionTrianglesDataNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureGeometryMotionTrianglesDataNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureGeometryMotionTrianglesDataNV` + public static VkAccelerationStructureGeometryMotionTrianglesDataNV alloc(SegmentAllocator allocator) { return new VkAccelerationStructureGeometryMotionTrianglesDataNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureGeometryMotionTrianglesDataNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureGeometryMotionTrianglesDataNV` + public static VkAccelerationStructureGeometryMotionTrianglesDataNV alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureGeometryMotionTrianglesDataNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureGeometryMotionTrianglesDataNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureGeometryMotionTrianglesDataNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureGeometryMotionTrianglesDataNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureGeometryMotionTrianglesDataNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryMotionTrianglesDataNV sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureGeometryMotionTrianglesDataNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryMotionTrianglesDataNV sType(@CType("VkStructureType") int value) { VkAccelerationStructureGeometryMotionTrianglesDataNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureGeometryMotionTrianglesDataNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureGeometryMotionTrianglesDataNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureGeometryMotionTrianglesDataNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryMotionTrianglesDataNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryMotionTrianglesDataNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryMotionTrianglesDataNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryMotionTrianglesDataNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryMotionTrianglesDataNV.set_pNext(this.segment(), value); return this; } + + /// {@return `vertexData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_vertexData(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_vertexData, index), ML_vertexData); } + /// {@return `vertexData`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_vertexData(MemorySegment segment) { return VkAccelerationStructureGeometryMotionTrianglesDataNV.get_vertexData(segment, 0L); } + /// {@return `vertexData` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment vertexDataAt(long index) { return VkAccelerationStructureGeometryMotionTrianglesDataNV.get_vertexData(this.segment(), index); } + /// {@return `vertexData`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment vertexData() { return VkAccelerationStructureGeometryMotionTrianglesDataNV.get_vertexData(this.segment()); } + /// Sets `vertexData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexData(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_vertexData, index), ML_vertexData.byteSize()); } + /// Sets `vertexData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexData(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryMotionTrianglesDataNV.set_vertexData(segment, 0L, value); } + /// Sets `vertexData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryMotionTrianglesDataNV vertexDataAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryMotionTrianglesDataNV.set_vertexData(this.segment(), index, value); return this; } + /// Sets `vertexData` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureGeometryMotionTrianglesDataNV vertexData(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureGeometryMotionTrianglesDataNV.set_vertexData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureInfoNV.java new file mode 100644 index 00000000..f07006a9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureInfoNV.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### instanceCount +/// [VarHandle][#VH_instanceCount] - [Getter][#instanceCount()] - [Setter][#instanceCount(int)] +/// ### geometryCount +/// [VarHandle][#VH_geometryCount] - [Getter][#geometryCount()] - [Setter][#geometryCount(int)] +/// ### pGeometries +/// [VarHandle][#VH_pGeometries] - [Getter][#pGeometries()] - [Setter][#pGeometries(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccelerationStructureTypeNV type; +/// VkBuildAccelerationStructureFlagsNV flags; +/// uint32_t instanceCount; +/// uint32_t geometryCount; +/// const VkGeometryNV * pGeometries; +/// } VkAccelerationStructureInfoNV; +/// ``` +public final class VkAccelerationStructureInfoNV extends Struct { + /// The struct layout of `VkAccelerationStructureInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("instanceCount"), + ValueLayout.JAVA_INT.withName("geometryCount"), + ValueLayout.ADDRESS.withName("pGeometries") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `instanceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_instanceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("instanceCount")); + /// The [VarHandle] of `geometryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_geometryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("geometryCount")); + /// The [VarHandle] of `pGeometries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pGeometries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pGeometries")); + + /// Creates `VkAccelerationStructureInfoNV` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureInfoNV(segment); } + + /// Creates `VkAccelerationStructureInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureInfoNV` + public static VkAccelerationStructureInfoNV alloc(SegmentAllocator allocator) { return new VkAccelerationStructureInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureInfoNV` + public static VkAccelerationStructureInfoNV alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV sType(@CType("VkStructureType") int value) { VkAccelerationStructureInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureTypeNV") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureTypeNV") int get_type(MemorySegment segment) { return VkAccelerationStructureInfoNV.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureTypeNV") int typeAt(long index) { return VkAccelerationStructureInfoNV.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkAccelerationStructureTypeNV") int type() { return VkAccelerationStructureInfoNV.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkAccelerationStructureTypeNV") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkAccelerationStructureTypeNV") int value) { VkAccelerationStructureInfoNV.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV typeAt(long index, @CType("VkAccelerationStructureTypeNV") int value) { VkAccelerationStructureInfoNV.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV type(@CType("VkAccelerationStructureTypeNV") int value) { VkAccelerationStructureInfoNV.set_type(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuildAccelerationStructureFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkBuildAccelerationStructureFlagsNV") int get_flags(MemorySegment segment) { return VkAccelerationStructureInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkBuildAccelerationStructureFlagsNV") int flagsAt(long index) { return VkAccelerationStructureInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkBuildAccelerationStructureFlagsNV") int flags() { return VkAccelerationStructureInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkBuildAccelerationStructureFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkBuildAccelerationStructureFlagsNV") int value) { VkAccelerationStructureInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV flagsAt(long index, @CType("VkBuildAccelerationStructureFlagsNV") int value) { VkAccelerationStructureInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV flags(@CType("VkBuildAccelerationStructureFlagsNV") int value) { VkAccelerationStructureInfoNV.set_flags(this.segment(), value); return this; } + + /// {@return `instanceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_instanceCount(MemorySegment segment, long index) { return (int) VH_instanceCount.get(segment, 0L, index); } + /// {@return `instanceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_instanceCount(MemorySegment segment) { return VkAccelerationStructureInfoNV.get_instanceCount(segment, 0L); } + /// {@return `instanceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int instanceCountAt(long index) { return VkAccelerationStructureInfoNV.get_instanceCount(this.segment(), index); } + /// {@return `instanceCount`} + public @CType("uint32_t") int instanceCount() { return VkAccelerationStructureInfoNV.get_instanceCount(this.segment()); } + /// Sets `instanceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_instanceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_instanceCount.set(segment, 0L, index, value); } + /// Sets `instanceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_instanceCount(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureInfoNV.set_instanceCount(segment, 0L, value); } + /// Sets `instanceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV instanceCountAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureInfoNV.set_instanceCount(this.segment(), index, value); return this; } + /// Sets `instanceCount` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV instanceCount(@CType("uint32_t") int value) { VkAccelerationStructureInfoNV.set_instanceCount(this.segment(), value); return this; } + + /// {@return `geometryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_geometryCount(MemorySegment segment, long index) { return (int) VH_geometryCount.get(segment, 0L, index); } + /// {@return `geometryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_geometryCount(MemorySegment segment) { return VkAccelerationStructureInfoNV.get_geometryCount(segment, 0L); } + /// {@return `geometryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int geometryCountAt(long index) { return VkAccelerationStructureInfoNV.get_geometryCount(this.segment(), index); } + /// {@return `geometryCount`} + public @CType("uint32_t") int geometryCount() { return VkAccelerationStructureInfoNV.get_geometryCount(this.segment()); } + /// Sets `geometryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_geometryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_geometryCount.set(segment, 0L, index, value); } + /// Sets `geometryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_geometryCount(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureInfoNV.set_geometryCount(segment, 0L, value); } + /// Sets `geometryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV geometryCountAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureInfoNV.set_geometryCount(this.segment(), index, value); return this; } + /// Sets `geometryCount` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV geometryCount(@CType("uint32_t") int value) { VkAccelerationStructureInfoNV.set_geometryCount(this.segment(), value); return this; } + + /// {@return `pGeometries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkGeometryNV *") java.lang.foreign.MemorySegment get_pGeometries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pGeometries.get(segment, 0L, index); } + /// {@return `pGeometries`} + /// @param segment the segment of the struct + public static @CType("const VkGeometryNV *") java.lang.foreign.MemorySegment get_pGeometries(MemorySegment segment) { return VkAccelerationStructureInfoNV.get_pGeometries(segment, 0L); } + /// {@return `pGeometries` at the given index} + /// @param index the index + public @CType("const VkGeometryNV *") java.lang.foreign.MemorySegment pGeometriesAt(long index) { return VkAccelerationStructureInfoNV.get_pGeometries(this.segment(), index); } + /// {@return `pGeometries`} + public @CType("const VkGeometryNV *") java.lang.foreign.MemorySegment pGeometries() { return VkAccelerationStructureInfoNV.get_pGeometries(this.segment()); } + /// Sets `pGeometries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pGeometries(MemorySegment segment, long index, @CType("const VkGeometryNV *") java.lang.foreign.MemorySegment value) { VH_pGeometries.set(segment, 0L, index, value); } + /// Sets `pGeometries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pGeometries(MemorySegment segment, @CType("const VkGeometryNV *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureInfoNV.set_pGeometries(segment, 0L, value); } + /// Sets `pGeometries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV pGeometriesAt(long index, @CType("const VkGeometryNV *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureInfoNV.set_pGeometries(this.segment(), index, value); return this; } + /// Sets `pGeometries` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureInfoNV pGeometries(@CType("const VkGeometryNV *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureInfoNV.set_pGeometries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMatrixMotionInstanceNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMatrixMotionInstanceNV.java new file mode 100644 index 00000000..11c65306 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMatrixMotionInstanceNV.java @@ -0,0 +1,337 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### transformT0 +/// [Byte offset][#OFFSET_transformT0] - [Memory layout][#ML_transformT0] - [Getter][#transformT0()] - [Setter][#transformT0(java.lang.foreign.MemorySegment)] +/// ### transformT1 +/// [Byte offset][#OFFSET_transformT1] - [Memory layout][#ML_transformT1] - [Getter][#transformT1()] - [Setter][#transformT1(java.lang.foreign.MemorySegment)] +/// ### instanceCustomIndex +/// [VarHandle][#VH_instanceCustomIndex] - [Getter][#instanceCustomIndex()] - [Setter][#instanceCustomIndex(int)] +/// ### mask +/// [VarHandle][#VH_mask] - [Getter][#mask()] - [Setter][#mask(int)] +/// ### instanceShaderBindingTableRecordOffset +/// [VarHandle][#VH_instanceShaderBindingTableRecordOffset] - [Getter][#instanceShaderBindingTableRecordOffset()] - [Setter][#instanceShaderBindingTableRecordOffset(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### accelerationStructureReference +/// [VarHandle][#VH_accelerationStructureReference] - [Getter][#accelerationStructureReference()] - [Setter][#accelerationStructureReference(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureMatrixMotionInstanceNV { +/// VkTransformMatrixKHR transformT0; +/// VkTransformMatrixKHR transformT1; +/// uint32_t instanceCustomIndex; +/// uint32_t mask; +/// uint32_t instanceShaderBindingTableRecordOffset; +/// VkGeometryInstanceFlagsKHR flags; +/// uint64_t accelerationStructureReference; +/// } VkAccelerationStructureMatrixMotionInstanceNV; +/// ``` +public final class VkAccelerationStructureMatrixMotionInstanceNV extends Struct { + /// The struct layout of `VkAccelerationStructureMatrixMotionInstanceNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.khr.struct.VkTransformMatrixKHR.LAYOUT.withName("transformT0"), + overrungl.vulkan.khr.struct.VkTransformMatrixKHR.LAYOUT.withName("transformT1"), + ValueLayout.JAVA_INT.withName("instanceCustomIndex"), + ValueLayout.JAVA_INT.withName("mask"), + ValueLayout.JAVA_INT.withName("instanceShaderBindingTableRecordOffset"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("accelerationStructureReference") + ); + /// The byte offset of `transformT0`. + public static final long OFFSET_transformT0 = LAYOUT.byteOffset(PathElement.groupElement("transformT0")); + /// The memory layout of `transformT0`. + public static final MemoryLayout ML_transformT0 = LAYOUT.select(PathElement.groupElement("transformT0")); + /// The byte offset of `transformT1`. + public static final long OFFSET_transformT1 = LAYOUT.byteOffset(PathElement.groupElement("transformT1")); + /// The memory layout of `transformT1`. + public static final MemoryLayout ML_transformT1 = LAYOUT.select(PathElement.groupElement("transformT1")); + /// The [VarHandle] of `instanceCustomIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_instanceCustomIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("instanceCustomIndex")); + /// The [VarHandle] of `mask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mask")); + /// The [VarHandle] of `instanceShaderBindingTableRecordOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_instanceShaderBindingTableRecordOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("instanceShaderBindingTableRecordOffset")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `accelerationStructureReference` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_accelerationStructureReference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureReference")); + + /// Creates `VkAccelerationStructureMatrixMotionInstanceNV` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureMatrixMotionInstanceNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureMatrixMotionInstanceNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMatrixMotionInstanceNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMatrixMotionInstanceNV(segment); } + + /// Creates `VkAccelerationStructureMatrixMotionInstanceNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMatrixMotionInstanceNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMatrixMotionInstanceNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureMatrixMotionInstanceNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMatrixMotionInstanceNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMatrixMotionInstanceNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureMatrixMotionInstanceNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureMatrixMotionInstanceNV` + public static VkAccelerationStructureMatrixMotionInstanceNV alloc(SegmentAllocator allocator) { return new VkAccelerationStructureMatrixMotionInstanceNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureMatrixMotionInstanceNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureMatrixMotionInstanceNV` + public static VkAccelerationStructureMatrixMotionInstanceNV alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureMatrixMotionInstanceNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `transformT0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment get_transformT0(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_transformT0, index), ML_transformT0); } + /// {@return `transformT0`} + /// @param segment the segment of the struct + public static @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment get_transformT0(MemorySegment segment) { return VkAccelerationStructureMatrixMotionInstanceNV.get_transformT0(segment, 0L); } + /// {@return `transformT0` at the given index} + /// @param index the index + public @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment transformT0At(long index) { return VkAccelerationStructureMatrixMotionInstanceNV.get_transformT0(this.segment(), index); } + /// {@return `transformT0`} + public @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment transformT0() { return VkAccelerationStructureMatrixMotionInstanceNV.get_transformT0(this.segment()); } + /// Sets `transformT0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformT0(MemorySegment segment, long index, @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_transformT0, index), ML_transformT0.byteSize()); } + /// Sets `transformT0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformT0(MemorySegment segment, @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMatrixMotionInstanceNV.set_transformT0(segment, 0L, value); } + /// Sets `transformT0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV transformT0At(long index, @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMatrixMotionInstanceNV.set_transformT0(this.segment(), index, value); return this; } + /// Sets `transformT0` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV transformT0(@CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMatrixMotionInstanceNV.set_transformT0(this.segment(), value); return this; } + + /// {@return `transformT1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment get_transformT1(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_transformT1, index), ML_transformT1); } + /// {@return `transformT1`} + /// @param segment the segment of the struct + public static @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment get_transformT1(MemorySegment segment) { return VkAccelerationStructureMatrixMotionInstanceNV.get_transformT1(segment, 0L); } + /// {@return `transformT1` at the given index} + /// @param index the index + public @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment transformT1At(long index) { return VkAccelerationStructureMatrixMotionInstanceNV.get_transformT1(this.segment(), index); } + /// {@return `transformT1`} + public @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment transformT1() { return VkAccelerationStructureMatrixMotionInstanceNV.get_transformT1(this.segment()); } + /// Sets `transformT1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformT1(MemorySegment segment, long index, @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_transformT1, index), ML_transformT1.byteSize()); } + /// Sets `transformT1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformT1(MemorySegment segment, @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMatrixMotionInstanceNV.set_transformT1(segment, 0L, value); } + /// Sets `transformT1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV transformT1At(long index, @CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMatrixMotionInstanceNV.set_transformT1(this.segment(), index, value); return this; } + /// Sets `transformT1` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV transformT1(@CType("VkTransformMatrixKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMatrixMotionInstanceNV.set_transformT1(this.segment(), value); return this; } + + /// {@return `instanceCustomIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_instanceCustomIndex(MemorySegment segment, long index) { return (int) VH_instanceCustomIndex.get(segment, 0L, index); } + /// {@return `instanceCustomIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_instanceCustomIndex(MemorySegment segment) { return VkAccelerationStructureMatrixMotionInstanceNV.get_instanceCustomIndex(segment, 0L); } + /// {@return `instanceCustomIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int instanceCustomIndexAt(long index) { return VkAccelerationStructureMatrixMotionInstanceNV.get_instanceCustomIndex(this.segment(), index); } + /// {@return `instanceCustomIndex`} + public @CType("uint32_t") int instanceCustomIndex() { return VkAccelerationStructureMatrixMotionInstanceNV.get_instanceCustomIndex(this.segment()); } + /// Sets `instanceCustomIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_instanceCustomIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_instanceCustomIndex.set(segment, 0L, index, value); } + /// Sets `instanceCustomIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_instanceCustomIndex(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_instanceCustomIndex(segment, 0L, value); } + /// Sets `instanceCustomIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV instanceCustomIndexAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_instanceCustomIndex(this.segment(), index, value); return this; } + /// Sets `instanceCustomIndex` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV instanceCustomIndex(@CType("uint32_t") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_instanceCustomIndex(this.segment(), value); return this; } + + /// {@return `mask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_mask(MemorySegment segment, long index) { return (int) VH_mask.get(segment, 0L, index); } + /// {@return `mask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_mask(MemorySegment segment) { return VkAccelerationStructureMatrixMotionInstanceNV.get_mask(segment, 0L); } + /// {@return `mask` at the given index} + /// @param index the index + public @CType("uint32_t") int maskAt(long index) { return VkAccelerationStructureMatrixMotionInstanceNV.get_mask(this.segment(), index); } + /// {@return `mask`} + public @CType("uint32_t") int mask() { return VkAccelerationStructureMatrixMotionInstanceNV.get_mask(this.segment()); } + /// Sets `mask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_mask.set(segment, 0L, index, value); } + /// Sets `mask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mask(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_mask(segment, 0L, value); } + /// Sets `mask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV maskAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_mask(this.segment(), index, value); return this; } + /// Sets `mask` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV mask(@CType("uint32_t") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_mask(this.segment(), value); return this; } + + /// {@return `instanceShaderBindingTableRecordOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_instanceShaderBindingTableRecordOffset(MemorySegment segment, long index) { return (int) VH_instanceShaderBindingTableRecordOffset.get(segment, 0L, index); } + /// {@return `instanceShaderBindingTableRecordOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_instanceShaderBindingTableRecordOffset(MemorySegment segment) { return VkAccelerationStructureMatrixMotionInstanceNV.get_instanceShaderBindingTableRecordOffset(segment, 0L); } + /// {@return `instanceShaderBindingTableRecordOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int instanceShaderBindingTableRecordOffsetAt(long index) { return VkAccelerationStructureMatrixMotionInstanceNV.get_instanceShaderBindingTableRecordOffset(this.segment(), index); } + /// {@return `instanceShaderBindingTableRecordOffset`} + public @CType("uint32_t") int instanceShaderBindingTableRecordOffset() { return VkAccelerationStructureMatrixMotionInstanceNV.get_instanceShaderBindingTableRecordOffset(this.segment()); } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_instanceShaderBindingTableRecordOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_instanceShaderBindingTableRecordOffset.set(segment, 0L, index, value); } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_instanceShaderBindingTableRecordOffset(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_instanceShaderBindingTableRecordOffset(segment, 0L, value); } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV instanceShaderBindingTableRecordOffsetAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_instanceShaderBindingTableRecordOffset(this.segment(), index, value); return this; } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV instanceShaderBindingTableRecordOffset(@CType("uint32_t") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_instanceShaderBindingTableRecordOffset(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGeometryInstanceFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkGeometryInstanceFlagsKHR") int get_flags(MemorySegment segment) { return VkAccelerationStructureMatrixMotionInstanceNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkGeometryInstanceFlagsKHR") int flagsAt(long index) { return VkAccelerationStructureMatrixMotionInstanceNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkGeometryInstanceFlagsKHR") int flags() { return VkAccelerationStructureMatrixMotionInstanceNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkGeometryInstanceFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkGeometryInstanceFlagsKHR") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV flagsAt(long index, @CType("VkGeometryInstanceFlagsKHR") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV flags(@CType("VkGeometryInstanceFlagsKHR") int value) { VkAccelerationStructureMatrixMotionInstanceNV.set_flags(this.segment(), value); return this; } + + /// {@return `accelerationStructureReference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_accelerationStructureReference(MemorySegment segment, long index) { return (long) VH_accelerationStructureReference.get(segment, 0L, index); } + /// {@return `accelerationStructureReference`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_accelerationStructureReference(MemorySegment segment) { return VkAccelerationStructureMatrixMotionInstanceNV.get_accelerationStructureReference(segment, 0L); } + /// {@return `accelerationStructureReference` at the given index} + /// @param index the index + public @CType("uint64_t") long accelerationStructureReferenceAt(long index) { return VkAccelerationStructureMatrixMotionInstanceNV.get_accelerationStructureReference(this.segment(), index); } + /// {@return `accelerationStructureReference`} + public @CType("uint64_t") long accelerationStructureReference() { return VkAccelerationStructureMatrixMotionInstanceNV.get_accelerationStructureReference(this.segment()); } + /// Sets `accelerationStructureReference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureReference(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_accelerationStructureReference.set(segment, 0L, index, value); } + /// Sets `accelerationStructureReference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureReference(MemorySegment segment, @CType("uint64_t") long value) { VkAccelerationStructureMatrixMotionInstanceNV.set_accelerationStructureReference(segment, 0L, value); } + /// Sets `accelerationStructureReference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV accelerationStructureReferenceAt(long index, @CType("uint64_t") long value) { VkAccelerationStructureMatrixMotionInstanceNV.set_accelerationStructureReference(this.segment(), index, value); return this; } + /// Sets `accelerationStructureReference` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMatrixMotionInstanceNV accelerationStructureReference(@CType("uint64_t") long value) { VkAccelerationStructureMatrixMotionInstanceNV.set_accelerationStructureReference(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMemoryRequirementsInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMemoryRequirementsInfoNV.java new file mode 100644 index 00000000..ebf1ff5e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMemoryRequirementsInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### accelerationStructure +/// [VarHandle][#VH_accelerationStructure] - [Getter][#accelerationStructure()] - [Setter][#accelerationStructure(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureMemoryRequirementsInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccelerationStructureMemoryRequirementsTypeNV type; +/// VkAccelerationStructureNV accelerationStructure; +/// } VkAccelerationStructureMemoryRequirementsInfoNV; +/// ``` +public final class VkAccelerationStructureMemoryRequirementsInfoNV extends Struct { + /// The struct layout of `VkAccelerationStructureMemoryRequirementsInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.ADDRESS.withName("accelerationStructure") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `accelerationStructure` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_accelerationStructure = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructure")); + + /// Creates `VkAccelerationStructureMemoryRequirementsInfoNV` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureMemoryRequirementsInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureMemoryRequirementsInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMemoryRequirementsInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMemoryRequirementsInfoNV(segment); } + + /// Creates `VkAccelerationStructureMemoryRequirementsInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMemoryRequirementsInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMemoryRequirementsInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureMemoryRequirementsInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMemoryRequirementsInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMemoryRequirementsInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureMemoryRequirementsInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureMemoryRequirementsInfoNV` + public static VkAccelerationStructureMemoryRequirementsInfoNV alloc(SegmentAllocator allocator) { return new VkAccelerationStructureMemoryRequirementsInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureMemoryRequirementsInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureMemoryRequirementsInfoNV` + public static VkAccelerationStructureMemoryRequirementsInfoNV alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureMemoryRequirementsInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureMemoryRequirementsInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureMemoryRequirementsInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureMemoryRequirementsInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMemoryRequirementsInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMemoryRequirementsInfoNV sType(@CType("VkStructureType") int value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureMemoryRequirementsInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureMemoryRequirementsInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureMemoryRequirementsInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMemoryRequirementsInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMemoryRequirementsInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureMemoryRequirementsTypeNV") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureMemoryRequirementsTypeNV") int get_type(MemorySegment segment) { return VkAccelerationStructureMemoryRequirementsInfoNV.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureMemoryRequirementsTypeNV") int typeAt(long index) { return VkAccelerationStructureMemoryRequirementsInfoNV.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkAccelerationStructureMemoryRequirementsTypeNV") int type() { return VkAccelerationStructureMemoryRequirementsInfoNV.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkAccelerationStructureMemoryRequirementsTypeNV") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkAccelerationStructureMemoryRequirementsTypeNV") int value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMemoryRequirementsInfoNV typeAt(long index, @CType("VkAccelerationStructureMemoryRequirementsTypeNV") int value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMemoryRequirementsInfoNV type(@CType("VkAccelerationStructureMemoryRequirementsTypeNV") int value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_type(this.segment(), value); return this; } + + /// {@return `accelerationStructure` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment get_accelerationStructure(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_accelerationStructure.get(segment, 0L, index); } + /// {@return `accelerationStructure`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment get_accelerationStructure(MemorySegment segment) { return VkAccelerationStructureMemoryRequirementsInfoNV.get_accelerationStructure(segment, 0L); } + /// {@return `accelerationStructure` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment accelerationStructureAt(long index) { return VkAccelerationStructureMemoryRequirementsInfoNV.get_accelerationStructure(this.segment(), index); } + /// {@return `accelerationStructure`} + public @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment accelerationStructure() { return VkAccelerationStructureMemoryRequirementsInfoNV.get_accelerationStructure(this.segment()); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, long index, @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VH_accelerationStructure.set(segment, 0L, index, value); } + /// Sets `accelerationStructure` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_accelerationStructure(segment, 0L, value); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMemoryRequirementsInfoNV accelerationStructureAt(long index, @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_accelerationStructure(this.segment(), index, value); return this; } + /// Sets `accelerationStructure` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMemoryRequirementsInfoNV accelerationStructure(@CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMemoryRequirementsInfoNV.set_accelerationStructure(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMotionInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMotionInfoNV.java new file mode 100644 index 00000000..b06b0e50 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMotionInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxInstances +/// [VarHandle][#VH_maxInstances] - [Getter][#maxInstances()] - [Setter][#maxInstances(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureMotionInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t maxInstances; +/// VkAccelerationStructureMotionInfoFlagsNV flags; +/// } VkAccelerationStructureMotionInfoNV; +/// ``` +public final class VkAccelerationStructureMotionInfoNV extends Struct { + /// The struct layout of `VkAccelerationStructureMotionInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxInstances"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxInstances` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxInstances = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxInstances")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkAccelerationStructureMotionInfoNV` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureMotionInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureMotionInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMotionInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMotionInfoNV(segment); } + + /// Creates `VkAccelerationStructureMotionInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMotionInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMotionInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureMotionInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMotionInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMotionInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureMotionInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureMotionInfoNV` + public static VkAccelerationStructureMotionInfoNV alloc(SegmentAllocator allocator) { return new VkAccelerationStructureMotionInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureMotionInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureMotionInfoNV` + public static VkAccelerationStructureMotionInfoNV alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureMotionInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureMotionInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureMotionInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureMotionInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureMotionInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureMotionInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInfoNV sType(@CType("VkStructureType") int value) { VkAccelerationStructureMotionInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureMotionInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureMotionInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureMotionInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `maxInstances` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxInstances(MemorySegment segment, long index) { return (int) VH_maxInstances.get(segment, 0L, index); } + /// {@return `maxInstances`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxInstances(MemorySegment segment) { return VkAccelerationStructureMotionInfoNV.get_maxInstances(segment, 0L); } + /// {@return `maxInstances` at the given index} + /// @param index the index + public @CType("uint32_t") int maxInstancesAt(long index) { return VkAccelerationStructureMotionInfoNV.get_maxInstances(this.segment(), index); } + /// {@return `maxInstances`} + public @CType("uint32_t") int maxInstances() { return VkAccelerationStructureMotionInfoNV.get_maxInstances(this.segment()); } + /// Sets `maxInstances` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxInstances(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxInstances.set(segment, 0L, index, value); } + /// Sets `maxInstances` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxInstances(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureMotionInfoNV.set_maxInstances(segment, 0L, value); } + /// Sets `maxInstances` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInfoNV maxInstancesAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureMotionInfoNV.set_maxInstances(this.segment(), index, value); return this; } + /// Sets `maxInstances` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInfoNV maxInstances(@CType("uint32_t") int value) { VkAccelerationStructureMotionInfoNV.set_maxInstances(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureMotionInfoFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureMotionInfoFlagsNV") int get_flags(MemorySegment segment) { return VkAccelerationStructureMotionInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureMotionInfoFlagsNV") int flagsAt(long index) { return VkAccelerationStructureMotionInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkAccelerationStructureMotionInfoFlagsNV") int flags() { return VkAccelerationStructureMotionInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkAccelerationStructureMotionInfoFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkAccelerationStructureMotionInfoFlagsNV") int value) { VkAccelerationStructureMotionInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInfoNV flagsAt(long index, @CType("VkAccelerationStructureMotionInfoFlagsNV") int value) { VkAccelerationStructureMotionInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInfoNV flags(@CType("VkAccelerationStructureMotionInfoFlagsNV") int value) { VkAccelerationStructureMotionInfoNV.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMotionInstanceNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMotionInstanceNV.java new file mode 100644 index 00000000..5221d839 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureMotionInstanceNV.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### data +/// [Byte offset][#OFFSET_data] - [Memory layout][#ML_data] - [Getter][#data()] - [Setter][#data(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureMotionInstanceNV { +/// VkAccelerationStructureMotionInstanceTypeNV type; +/// VkAccelerationStructureMotionInstanceFlagsNV flags; +/// VkAccelerationStructureMotionInstanceDataNV data; +/// } VkAccelerationStructureMotionInstanceNV; +/// ``` +public final class VkAccelerationStructureMotionInstanceNV extends Struct { + /// The struct layout of `VkAccelerationStructureMotionInstanceNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("flags"), + overrungl.vulkan.nv.union.VkAccelerationStructureMotionInstanceDataNV.LAYOUT.withName("data") + ); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The byte offset of `data`. + public static final long OFFSET_data = LAYOUT.byteOffset(PathElement.groupElement("data")); + /// The memory layout of `data`. + public static final MemoryLayout ML_data = LAYOUT.select(PathElement.groupElement("data")); + + /// Creates `VkAccelerationStructureMotionInstanceNV` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureMotionInstanceNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureMotionInstanceNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMotionInstanceNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMotionInstanceNV(segment); } + + /// Creates `VkAccelerationStructureMotionInstanceNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMotionInstanceNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMotionInstanceNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureMotionInstanceNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMotionInstanceNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMotionInstanceNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureMotionInstanceNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureMotionInstanceNV` + public static VkAccelerationStructureMotionInstanceNV alloc(SegmentAllocator allocator) { return new VkAccelerationStructureMotionInstanceNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureMotionInstanceNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureMotionInstanceNV` + public static VkAccelerationStructureMotionInstanceNV alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureMotionInstanceNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureMotionInstanceTypeNV") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureMotionInstanceTypeNV") int get_type(MemorySegment segment) { return VkAccelerationStructureMotionInstanceNV.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureMotionInstanceTypeNV") int typeAt(long index) { return VkAccelerationStructureMotionInstanceNV.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkAccelerationStructureMotionInstanceTypeNV") int type() { return VkAccelerationStructureMotionInstanceNV.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkAccelerationStructureMotionInstanceTypeNV") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkAccelerationStructureMotionInstanceTypeNV") int value) { VkAccelerationStructureMotionInstanceNV.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceNV typeAt(long index, @CType("VkAccelerationStructureMotionInstanceTypeNV") int value) { VkAccelerationStructureMotionInstanceNV.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceNV type(@CType("VkAccelerationStructureMotionInstanceTypeNV") int value) { VkAccelerationStructureMotionInstanceNV.set_type(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureMotionInstanceFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureMotionInstanceFlagsNV") int get_flags(MemorySegment segment) { return VkAccelerationStructureMotionInstanceNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureMotionInstanceFlagsNV") int flagsAt(long index) { return VkAccelerationStructureMotionInstanceNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkAccelerationStructureMotionInstanceFlagsNV") int flags() { return VkAccelerationStructureMotionInstanceNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkAccelerationStructureMotionInstanceFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkAccelerationStructureMotionInstanceFlagsNV") int value) { VkAccelerationStructureMotionInstanceNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceNV flagsAt(long index, @CType("VkAccelerationStructureMotionInstanceFlagsNV") int value) { VkAccelerationStructureMotionInstanceNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceNV flags(@CType("VkAccelerationStructureMotionInstanceFlagsNV") int value) { VkAccelerationStructureMotionInstanceNV.set_flags(this.segment(), value); return this; } + + /// {@return `data` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureMotionInstanceDataNV") java.lang.foreign.MemorySegment get_data(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_data, index), ML_data); } + /// {@return `data`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureMotionInstanceDataNV") java.lang.foreign.MemorySegment get_data(MemorySegment segment) { return VkAccelerationStructureMotionInstanceNV.get_data(segment, 0L); } + /// {@return `data` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureMotionInstanceDataNV") java.lang.foreign.MemorySegment dataAt(long index) { return VkAccelerationStructureMotionInstanceNV.get_data(this.segment(), index); } + /// {@return `data`} + public @CType("VkAccelerationStructureMotionInstanceDataNV") java.lang.foreign.MemorySegment data() { return VkAccelerationStructureMotionInstanceNV.get_data(this.segment()); } + /// Sets `data` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_data(MemorySegment segment, long index, @CType("VkAccelerationStructureMotionInstanceDataNV") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_data, index), ML_data.byteSize()); } + /// Sets `data` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_data(MemorySegment segment, @CType("VkAccelerationStructureMotionInstanceDataNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceNV.set_data(segment, 0L, value); } + /// Sets `data` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceNV dataAt(long index, @CType("VkAccelerationStructureMotionInstanceDataNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceNV.set_data(this.segment(), index, value); return this; } + /// Sets `data` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceNV data(@CType("VkAccelerationStructureMotionInstanceDataNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceNV.set_data(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureSRTMotionInstanceNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureSRTMotionInstanceNV.java new file mode 100644 index 00000000..1546923c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureSRTMotionInstanceNV.java @@ -0,0 +1,337 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### transformT0 +/// [Byte offset][#OFFSET_transformT0] - [Memory layout][#ML_transformT0] - [Getter][#transformT0()] - [Setter][#transformT0(java.lang.foreign.MemorySegment)] +/// ### transformT1 +/// [Byte offset][#OFFSET_transformT1] - [Memory layout][#ML_transformT1] - [Getter][#transformT1()] - [Setter][#transformT1(java.lang.foreign.MemorySegment)] +/// ### instanceCustomIndex +/// [VarHandle][#VH_instanceCustomIndex] - [Getter][#instanceCustomIndex()] - [Setter][#instanceCustomIndex(int)] +/// ### mask +/// [VarHandle][#VH_mask] - [Getter][#mask()] - [Setter][#mask(int)] +/// ### instanceShaderBindingTableRecordOffset +/// [VarHandle][#VH_instanceShaderBindingTableRecordOffset] - [Getter][#instanceShaderBindingTableRecordOffset()] - [Setter][#instanceShaderBindingTableRecordOffset(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### accelerationStructureReference +/// [VarHandle][#VH_accelerationStructureReference] - [Getter][#accelerationStructureReference()] - [Setter][#accelerationStructureReference(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureSRTMotionInstanceNV { +/// VkSRTDataNV transformT0; +/// VkSRTDataNV transformT1; +/// uint32_t instanceCustomIndex; +/// uint32_t mask; +/// uint32_t instanceShaderBindingTableRecordOffset; +/// VkGeometryInstanceFlagsKHR flags; +/// uint64_t accelerationStructureReference; +/// } VkAccelerationStructureSRTMotionInstanceNV; +/// ``` +public final class VkAccelerationStructureSRTMotionInstanceNV extends Struct { + /// The struct layout of `VkAccelerationStructureSRTMotionInstanceNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.nv.struct.VkSRTDataNV.LAYOUT.withName("transformT0"), + overrungl.vulkan.nv.struct.VkSRTDataNV.LAYOUT.withName("transformT1"), + ValueLayout.JAVA_INT.withName("instanceCustomIndex"), + ValueLayout.JAVA_INT.withName("mask"), + ValueLayout.JAVA_INT.withName("instanceShaderBindingTableRecordOffset"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("accelerationStructureReference") + ); + /// The byte offset of `transformT0`. + public static final long OFFSET_transformT0 = LAYOUT.byteOffset(PathElement.groupElement("transformT0")); + /// The memory layout of `transformT0`. + public static final MemoryLayout ML_transformT0 = LAYOUT.select(PathElement.groupElement("transformT0")); + /// The byte offset of `transformT1`. + public static final long OFFSET_transformT1 = LAYOUT.byteOffset(PathElement.groupElement("transformT1")); + /// The memory layout of `transformT1`. + public static final MemoryLayout ML_transformT1 = LAYOUT.select(PathElement.groupElement("transformT1")); + /// The [VarHandle] of `instanceCustomIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_instanceCustomIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("instanceCustomIndex")); + /// The [VarHandle] of `mask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mask")); + /// The [VarHandle] of `instanceShaderBindingTableRecordOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_instanceShaderBindingTableRecordOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("instanceShaderBindingTableRecordOffset")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `accelerationStructureReference` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_accelerationStructureReference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureReference")); + + /// Creates `VkAccelerationStructureSRTMotionInstanceNV` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureSRTMotionInstanceNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureSRTMotionInstanceNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureSRTMotionInstanceNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureSRTMotionInstanceNV(segment); } + + /// Creates `VkAccelerationStructureSRTMotionInstanceNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureSRTMotionInstanceNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureSRTMotionInstanceNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureSRTMotionInstanceNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureSRTMotionInstanceNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureSRTMotionInstanceNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureSRTMotionInstanceNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureSRTMotionInstanceNV` + public static VkAccelerationStructureSRTMotionInstanceNV alloc(SegmentAllocator allocator) { return new VkAccelerationStructureSRTMotionInstanceNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureSRTMotionInstanceNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureSRTMotionInstanceNV` + public static VkAccelerationStructureSRTMotionInstanceNV alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureSRTMotionInstanceNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `transformT0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSRTDataNV") java.lang.foreign.MemorySegment get_transformT0(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_transformT0, index), ML_transformT0); } + /// {@return `transformT0`} + /// @param segment the segment of the struct + public static @CType("VkSRTDataNV") java.lang.foreign.MemorySegment get_transformT0(MemorySegment segment) { return VkAccelerationStructureSRTMotionInstanceNV.get_transformT0(segment, 0L); } + /// {@return `transformT0` at the given index} + /// @param index the index + public @CType("VkSRTDataNV") java.lang.foreign.MemorySegment transformT0At(long index) { return VkAccelerationStructureSRTMotionInstanceNV.get_transformT0(this.segment(), index); } + /// {@return `transformT0`} + public @CType("VkSRTDataNV") java.lang.foreign.MemorySegment transformT0() { return VkAccelerationStructureSRTMotionInstanceNV.get_transformT0(this.segment()); } + /// Sets `transformT0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformT0(MemorySegment segment, long index, @CType("VkSRTDataNV") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_transformT0, index), ML_transformT0.byteSize()); } + /// Sets `transformT0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformT0(MemorySegment segment, @CType("VkSRTDataNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureSRTMotionInstanceNV.set_transformT0(segment, 0L, value); } + /// Sets `transformT0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV transformT0At(long index, @CType("VkSRTDataNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureSRTMotionInstanceNV.set_transformT0(this.segment(), index, value); return this; } + /// Sets `transformT0` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV transformT0(@CType("VkSRTDataNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureSRTMotionInstanceNV.set_transformT0(this.segment(), value); return this; } + + /// {@return `transformT1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSRTDataNV") java.lang.foreign.MemorySegment get_transformT1(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_transformT1, index), ML_transformT1); } + /// {@return `transformT1`} + /// @param segment the segment of the struct + public static @CType("VkSRTDataNV") java.lang.foreign.MemorySegment get_transformT1(MemorySegment segment) { return VkAccelerationStructureSRTMotionInstanceNV.get_transformT1(segment, 0L); } + /// {@return `transformT1` at the given index} + /// @param index the index + public @CType("VkSRTDataNV") java.lang.foreign.MemorySegment transformT1At(long index) { return VkAccelerationStructureSRTMotionInstanceNV.get_transformT1(this.segment(), index); } + /// {@return `transformT1`} + public @CType("VkSRTDataNV") java.lang.foreign.MemorySegment transformT1() { return VkAccelerationStructureSRTMotionInstanceNV.get_transformT1(this.segment()); } + /// Sets `transformT1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformT1(MemorySegment segment, long index, @CType("VkSRTDataNV") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_transformT1, index), ML_transformT1.byteSize()); } + /// Sets `transformT1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformT1(MemorySegment segment, @CType("VkSRTDataNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureSRTMotionInstanceNV.set_transformT1(segment, 0L, value); } + /// Sets `transformT1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV transformT1At(long index, @CType("VkSRTDataNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureSRTMotionInstanceNV.set_transformT1(this.segment(), index, value); return this; } + /// Sets `transformT1` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV transformT1(@CType("VkSRTDataNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureSRTMotionInstanceNV.set_transformT1(this.segment(), value); return this; } + + /// {@return `instanceCustomIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_instanceCustomIndex(MemorySegment segment, long index) { return (int) VH_instanceCustomIndex.get(segment, 0L, index); } + /// {@return `instanceCustomIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_instanceCustomIndex(MemorySegment segment) { return VkAccelerationStructureSRTMotionInstanceNV.get_instanceCustomIndex(segment, 0L); } + /// {@return `instanceCustomIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int instanceCustomIndexAt(long index) { return VkAccelerationStructureSRTMotionInstanceNV.get_instanceCustomIndex(this.segment(), index); } + /// {@return `instanceCustomIndex`} + public @CType("uint32_t") int instanceCustomIndex() { return VkAccelerationStructureSRTMotionInstanceNV.get_instanceCustomIndex(this.segment()); } + /// Sets `instanceCustomIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_instanceCustomIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_instanceCustomIndex.set(segment, 0L, index, value); } + /// Sets `instanceCustomIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_instanceCustomIndex(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_instanceCustomIndex(segment, 0L, value); } + /// Sets `instanceCustomIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV instanceCustomIndexAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_instanceCustomIndex(this.segment(), index, value); return this; } + /// Sets `instanceCustomIndex` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV instanceCustomIndex(@CType("uint32_t") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_instanceCustomIndex(this.segment(), value); return this; } + + /// {@return `mask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_mask(MemorySegment segment, long index) { return (int) VH_mask.get(segment, 0L, index); } + /// {@return `mask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_mask(MemorySegment segment) { return VkAccelerationStructureSRTMotionInstanceNV.get_mask(segment, 0L); } + /// {@return `mask` at the given index} + /// @param index the index + public @CType("uint32_t") int maskAt(long index) { return VkAccelerationStructureSRTMotionInstanceNV.get_mask(this.segment(), index); } + /// {@return `mask`} + public @CType("uint32_t") int mask() { return VkAccelerationStructureSRTMotionInstanceNV.get_mask(this.segment()); } + /// Sets `mask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_mask.set(segment, 0L, index, value); } + /// Sets `mask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mask(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_mask(segment, 0L, value); } + /// Sets `mask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV maskAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_mask(this.segment(), index, value); return this; } + /// Sets `mask` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV mask(@CType("uint32_t") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_mask(this.segment(), value); return this; } + + /// {@return `instanceShaderBindingTableRecordOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_instanceShaderBindingTableRecordOffset(MemorySegment segment, long index) { return (int) VH_instanceShaderBindingTableRecordOffset.get(segment, 0L, index); } + /// {@return `instanceShaderBindingTableRecordOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_instanceShaderBindingTableRecordOffset(MemorySegment segment) { return VkAccelerationStructureSRTMotionInstanceNV.get_instanceShaderBindingTableRecordOffset(segment, 0L); } + /// {@return `instanceShaderBindingTableRecordOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int instanceShaderBindingTableRecordOffsetAt(long index) { return VkAccelerationStructureSRTMotionInstanceNV.get_instanceShaderBindingTableRecordOffset(this.segment(), index); } + /// {@return `instanceShaderBindingTableRecordOffset`} + public @CType("uint32_t") int instanceShaderBindingTableRecordOffset() { return VkAccelerationStructureSRTMotionInstanceNV.get_instanceShaderBindingTableRecordOffset(this.segment()); } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_instanceShaderBindingTableRecordOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_instanceShaderBindingTableRecordOffset.set(segment, 0L, index, value); } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_instanceShaderBindingTableRecordOffset(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_instanceShaderBindingTableRecordOffset(segment, 0L, value); } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV instanceShaderBindingTableRecordOffsetAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_instanceShaderBindingTableRecordOffset(this.segment(), index, value); return this; } + /// Sets `instanceShaderBindingTableRecordOffset` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV instanceShaderBindingTableRecordOffset(@CType("uint32_t") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_instanceShaderBindingTableRecordOffset(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGeometryInstanceFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkGeometryInstanceFlagsKHR") int get_flags(MemorySegment segment) { return VkAccelerationStructureSRTMotionInstanceNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkGeometryInstanceFlagsKHR") int flagsAt(long index) { return VkAccelerationStructureSRTMotionInstanceNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkGeometryInstanceFlagsKHR") int flags() { return VkAccelerationStructureSRTMotionInstanceNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkGeometryInstanceFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkGeometryInstanceFlagsKHR") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV flagsAt(long index, @CType("VkGeometryInstanceFlagsKHR") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV flags(@CType("VkGeometryInstanceFlagsKHR") int value) { VkAccelerationStructureSRTMotionInstanceNV.set_flags(this.segment(), value); return this; } + + /// {@return `accelerationStructureReference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_accelerationStructureReference(MemorySegment segment, long index) { return (long) VH_accelerationStructureReference.get(segment, 0L, index); } + /// {@return `accelerationStructureReference`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_accelerationStructureReference(MemorySegment segment) { return VkAccelerationStructureSRTMotionInstanceNV.get_accelerationStructureReference(segment, 0L); } + /// {@return `accelerationStructureReference` at the given index} + /// @param index the index + public @CType("uint64_t") long accelerationStructureReferenceAt(long index) { return VkAccelerationStructureSRTMotionInstanceNV.get_accelerationStructureReference(this.segment(), index); } + /// {@return `accelerationStructureReference`} + public @CType("uint64_t") long accelerationStructureReference() { return VkAccelerationStructureSRTMotionInstanceNV.get_accelerationStructureReference(this.segment()); } + /// Sets `accelerationStructureReference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureReference(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_accelerationStructureReference.set(segment, 0L, index, value); } + /// Sets `accelerationStructureReference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureReference(MemorySegment segment, @CType("uint64_t") long value) { VkAccelerationStructureSRTMotionInstanceNV.set_accelerationStructureReference(segment, 0L, value); } + /// Sets `accelerationStructureReference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV accelerationStructureReferenceAt(long index, @CType("uint64_t") long value) { VkAccelerationStructureSRTMotionInstanceNV.set_accelerationStructureReference(this.segment(), index, value); return this; } + /// Sets `accelerationStructureReference` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureSRTMotionInstanceNV accelerationStructureReference(@CType("uint64_t") long value) { VkAccelerationStructureSRTMotionInstanceNV.set_accelerationStructureReference(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureTrianglesDisplacementMicromapNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureTrianglesDisplacementMicromapNV.java new file mode 100644 index 00000000..3da4e5bc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkAccelerationStructureTrianglesDisplacementMicromapNV.java @@ -0,0 +1,748 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### displacementBiasAndScaleFormat +/// [VarHandle][#VH_displacementBiasAndScaleFormat] - [Getter][#displacementBiasAndScaleFormat()] - [Setter][#displacementBiasAndScaleFormat(int)] +/// ### displacementVectorFormat +/// [VarHandle][#VH_displacementVectorFormat] - [Getter][#displacementVectorFormat()] - [Setter][#displacementVectorFormat(int)] +/// ### displacementBiasAndScaleBuffer +/// [Byte offset][#OFFSET_displacementBiasAndScaleBuffer] - [Memory layout][#ML_displacementBiasAndScaleBuffer] - [Getter][#displacementBiasAndScaleBuffer()] - [Setter][#displacementBiasAndScaleBuffer(java.lang.foreign.MemorySegment)] +/// ### displacementBiasAndScaleStride +/// [VarHandle][#VH_displacementBiasAndScaleStride] - [Getter][#displacementBiasAndScaleStride()] - [Setter][#displacementBiasAndScaleStride(long)] +/// ### displacementVectorBuffer +/// [Byte offset][#OFFSET_displacementVectorBuffer] - [Memory layout][#ML_displacementVectorBuffer] - [Getter][#displacementVectorBuffer()] - [Setter][#displacementVectorBuffer(java.lang.foreign.MemorySegment)] +/// ### displacementVectorStride +/// [VarHandle][#VH_displacementVectorStride] - [Getter][#displacementVectorStride()] - [Setter][#displacementVectorStride(long)] +/// ### displacedMicromapPrimitiveFlags +/// [Byte offset][#OFFSET_displacedMicromapPrimitiveFlags] - [Memory layout][#ML_displacedMicromapPrimitiveFlags] - [Getter][#displacedMicromapPrimitiveFlags()] - [Setter][#displacedMicromapPrimitiveFlags(java.lang.foreign.MemorySegment)] +/// ### displacedMicromapPrimitiveFlagsStride +/// [VarHandle][#VH_displacedMicromapPrimitiveFlagsStride] - [Getter][#displacedMicromapPrimitiveFlagsStride()] - [Setter][#displacedMicromapPrimitiveFlagsStride(long)] +/// ### indexType +/// [VarHandle][#VH_indexType] - [Getter][#indexType()] - [Setter][#indexType(int)] +/// ### indexBuffer +/// [Byte offset][#OFFSET_indexBuffer] - [Memory layout][#ML_indexBuffer] - [Getter][#indexBuffer()] - [Setter][#indexBuffer(java.lang.foreign.MemorySegment)] +/// ### indexStride +/// [VarHandle][#VH_indexStride] - [Getter][#indexStride()] - [Setter][#indexStride(long)] +/// ### baseTriangle +/// [VarHandle][#VH_baseTriangle] - [Getter][#baseTriangle()] - [Setter][#baseTriangle(int)] +/// ### usageCountsCount +/// [VarHandle][#VH_usageCountsCount] - [Getter][#usageCountsCount()] - [Setter][#usageCountsCount(int)] +/// ### pUsageCounts +/// [VarHandle][#VH_pUsageCounts] - [Getter][#pUsageCounts()] - [Setter][#pUsageCounts(java.lang.foreign.MemorySegment)] +/// ### ppUsageCounts +/// [VarHandle][#VH_ppUsageCounts] - [Getter][#ppUsageCounts()] - [Setter][#ppUsageCounts(java.lang.foreign.MemorySegment)] +/// ### micromap +/// [VarHandle][#VH_micromap] - [Getter][#micromap()] - [Setter][#micromap(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAccelerationStructureTrianglesDisplacementMicromapNV { +/// VkStructureType sType; +/// void * pNext; +/// VkFormat displacementBiasAndScaleFormat; +/// VkFormat displacementVectorFormat; +/// VkDeviceOrHostAddressConstKHR displacementBiasAndScaleBuffer; +/// VkDeviceSize displacementBiasAndScaleStride; +/// VkDeviceOrHostAddressConstKHR displacementVectorBuffer; +/// VkDeviceSize displacementVectorStride; +/// VkDeviceOrHostAddressConstKHR displacedMicromapPrimitiveFlags; +/// VkDeviceSize displacedMicromapPrimitiveFlagsStride; +/// VkIndexType indexType; +/// VkDeviceOrHostAddressConstKHR indexBuffer; +/// VkDeviceSize indexStride; +/// uint32_t baseTriangle; +/// uint32_t usageCountsCount; +/// const VkMicromapUsageEXT * pUsageCounts; +/// const VkMicromapUsageEXT * const* ppUsageCounts; +/// VkMicromapEXT micromap; +/// } VkAccelerationStructureTrianglesDisplacementMicromapNV; +/// ``` +public final class VkAccelerationStructureTrianglesDisplacementMicromapNV extends Struct { + /// The struct layout of `VkAccelerationStructureTrianglesDisplacementMicromapNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("displacementBiasAndScaleFormat"), + ValueLayout.JAVA_INT.withName("displacementVectorFormat"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("displacementBiasAndScaleBuffer"), + ValueLayout.JAVA_LONG.withName("displacementBiasAndScaleStride"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("displacementVectorBuffer"), + ValueLayout.JAVA_LONG.withName("displacementVectorStride"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("displacedMicromapPrimitiveFlags"), + ValueLayout.JAVA_LONG.withName("displacedMicromapPrimitiveFlagsStride"), + ValueLayout.JAVA_INT.withName("indexType"), + overrungl.vulkan.khr.union.VkDeviceOrHostAddressConstKHR.LAYOUT.withName("indexBuffer"), + ValueLayout.JAVA_LONG.withName("indexStride"), + ValueLayout.JAVA_INT.withName("baseTriangle"), + ValueLayout.JAVA_INT.withName("usageCountsCount"), + ValueLayout.ADDRESS.withName("pUsageCounts"), + ValueLayout.ADDRESS.withName("ppUsageCounts"), + ValueLayout.ADDRESS.withName("micromap") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `displacementBiasAndScaleFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_displacementBiasAndScaleFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displacementBiasAndScaleFormat")); + /// The [VarHandle] of `displacementVectorFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_displacementVectorFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displacementVectorFormat")); + /// The byte offset of `displacementBiasAndScaleBuffer`. + public static final long OFFSET_displacementBiasAndScaleBuffer = LAYOUT.byteOffset(PathElement.groupElement("displacementBiasAndScaleBuffer")); + /// The memory layout of `displacementBiasAndScaleBuffer`. + public static final MemoryLayout ML_displacementBiasAndScaleBuffer = LAYOUT.select(PathElement.groupElement("displacementBiasAndScaleBuffer")); + /// The [VarHandle] of `displacementBiasAndScaleStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_displacementBiasAndScaleStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displacementBiasAndScaleStride")); + /// The byte offset of `displacementVectorBuffer`. + public static final long OFFSET_displacementVectorBuffer = LAYOUT.byteOffset(PathElement.groupElement("displacementVectorBuffer")); + /// The memory layout of `displacementVectorBuffer`. + public static final MemoryLayout ML_displacementVectorBuffer = LAYOUT.select(PathElement.groupElement("displacementVectorBuffer")); + /// The [VarHandle] of `displacementVectorStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_displacementVectorStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displacementVectorStride")); + /// The byte offset of `displacedMicromapPrimitiveFlags`. + public static final long OFFSET_displacedMicromapPrimitiveFlags = LAYOUT.byteOffset(PathElement.groupElement("displacedMicromapPrimitiveFlags")); + /// The memory layout of `displacedMicromapPrimitiveFlags`. + public static final MemoryLayout ML_displacedMicromapPrimitiveFlags = LAYOUT.select(PathElement.groupElement("displacedMicromapPrimitiveFlags")); + /// The [VarHandle] of `displacedMicromapPrimitiveFlagsStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_displacedMicromapPrimitiveFlagsStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displacedMicromapPrimitiveFlagsStride")); + /// The [VarHandle] of `indexType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexType")); + /// The byte offset of `indexBuffer`. + public static final long OFFSET_indexBuffer = LAYOUT.byteOffset(PathElement.groupElement("indexBuffer")); + /// The memory layout of `indexBuffer`. + public static final MemoryLayout ML_indexBuffer = LAYOUT.select(PathElement.groupElement("indexBuffer")); + /// The [VarHandle] of `indexStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_indexStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexStride")); + /// The [VarHandle] of `baseTriangle` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_baseTriangle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("baseTriangle")); + /// The [VarHandle] of `usageCountsCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usageCountsCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usageCountsCount")); + /// The [VarHandle] of `pUsageCounts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pUsageCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pUsageCounts")); + /// The [VarHandle] of `ppUsageCounts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_ppUsageCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ppUsageCounts")); + /// The [VarHandle] of `micromap` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_micromap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("micromap")); + + /// Creates `VkAccelerationStructureTrianglesDisplacementMicromapNV` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureTrianglesDisplacementMicromapNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureTrianglesDisplacementMicromapNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureTrianglesDisplacementMicromapNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureTrianglesDisplacementMicromapNV(segment); } + + /// Creates `VkAccelerationStructureTrianglesDisplacementMicromapNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureTrianglesDisplacementMicromapNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureTrianglesDisplacementMicromapNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureTrianglesDisplacementMicromapNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureTrianglesDisplacementMicromapNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureTrianglesDisplacementMicromapNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureTrianglesDisplacementMicromapNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureTrianglesDisplacementMicromapNV` + public static VkAccelerationStructureTrianglesDisplacementMicromapNV alloc(SegmentAllocator allocator) { return new VkAccelerationStructureTrianglesDisplacementMicromapNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureTrianglesDisplacementMicromapNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureTrianglesDisplacementMicromapNV` + public static VkAccelerationStructureTrianglesDisplacementMicromapNV alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureTrianglesDisplacementMicromapNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV sTypeAt(long index, @CType("VkStructureType") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV sType(@CType("VkStructureType") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_pNext(this.segment(), value); return this; } + + /// {@return `displacementBiasAndScaleFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_displacementBiasAndScaleFormat(MemorySegment segment, long index) { return (int) VH_displacementBiasAndScaleFormat.get(segment, 0L, index); } + /// {@return `displacementBiasAndScaleFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_displacementBiasAndScaleFormat(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementBiasAndScaleFormat(segment, 0L); } + /// {@return `displacementBiasAndScaleFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int displacementBiasAndScaleFormatAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementBiasAndScaleFormat(this.segment(), index); } + /// {@return `displacementBiasAndScaleFormat`} + public @CType("VkFormat") int displacementBiasAndScaleFormat() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementBiasAndScaleFormat(this.segment()); } + /// Sets `displacementBiasAndScaleFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displacementBiasAndScaleFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_displacementBiasAndScaleFormat.set(segment, 0L, index, value); } + /// Sets `displacementBiasAndScaleFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displacementBiasAndScaleFormat(MemorySegment segment, @CType("VkFormat") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementBiasAndScaleFormat(segment, 0L, value); } + /// Sets `displacementBiasAndScaleFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementBiasAndScaleFormatAt(long index, @CType("VkFormat") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementBiasAndScaleFormat(this.segment(), index, value); return this; } + /// Sets `displacementBiasAndScaleFormat` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementBiasAndScaleFormat(@CType("VkFormat") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementBiasAndScaleFormat(this.segment(), value); return this; } + + /// {@return `displacementVectorFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_displacementVectorFormat(MemorySegment segment, long index) { return (int) VH_displacementVectorFormat.get(segment, 0L, index); } + /// {@return `displacementVectorFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_displacementVectorFormat(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementVectorFormat(segment, 0L); } + /// {@return `displacementVectorFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int displacementVectorFormatAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementVectorFormat(this.segment(), index); } + /// {@return `displacementVectorFormat`} + public @CType("VkFormat") int displacementVectorFormat() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementVectorFormat(this.segment()); } + /// Sets `displacementVectorFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displacementVectorFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_displacementVectorFormat.set(segment, 0L, index, value); } + /// Sets `displacementVectorFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displacementVectorFormat(MemorySegment segment, @CType("VkFormat") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementVectorFormat(segment, 0L, value); } + /// Sets `displacementVectorFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementVectorFormatAt(long index, @CType("VkFormat") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementVectorFormat(this.segment(), index, value); return this; } + /// Sets `displacementVectorFormat` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementVectorFormat(@CType("VkFormat") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementVectorFormat(this.segment(), value); return this; } + + /// {@return `displacementBiasAndScaleBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_displacementBiasAndScaleBuffer(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_displacementBiasAndScaleBuffer, index), ML_displacementBiasAndScaleBuffer); } + /// {@return `displacementBiasAndScaleBuffer`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_displacementBiasAndScaleBuffer(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementBiasAndScaleBuffer(segment, 0L); } + /// {@return `displacementBiasAndScaleBuffer` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment displacementBiasAndScaleBufferAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementBiasAndScaleBuffer(this.segment(), index); } + /// {@return `displacementBiasAndScaleBuffer`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment displacementBiasAndScaleBuffer() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementBiasAndScaleBuffer(this.segment()); } + /// Sets `displacementBiasAndScaleBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displacementBiasAndScaleBuffer(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_displacementBiasAndScaleBuffer, index), ML_displacementBiasAndScaleBuffer.byteSize()); } + /// Sets `displacementBiasAndScaleBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displacementBiasAndScaleBuffer(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementBiasAndScaleBuffer(segment, 0L, value); } + /// Sets `displacementBiasAndScaleBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementBiasAndScaleBufferAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementBiasAndScaleBuffer(this.segment(), index, value); return this; } + /// Sets `displacementBiasAndScaleBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementBiasAndScaleBuffer(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementBiasAndScaleBuffer(this.segment(), value); return this; } + + /// {@return `displacementBiasAndScaleStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_displacementBiasAndScaleStride(MemorySegment segment, long index) { return (long) VH_displacementBiasAndScaleStride.get(segment, 0L, index); } + /// {@return `displacementBiasAndScaleStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_displacementBiasAndScaleStride(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementBiasAndScaleStride(segment, 0L); } + /// {@return `displacementBiasAndScaleStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long displacementBiasAndScaleStrideAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementBiasAndScaleStride(this.segment(), index); } + /// {@return `displacementBiasAndScaleStride`} + public @CType("VkDeviceSize") long displacementBiasAndScaleStride() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementBiasAndScaleStride(this.segment()); } + /// Sets `displacementBiasAndScaleStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displacementBiasAndScaleStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_displacementBiasAndScaleStride.set(segment, 0L, index, value); } + /// Sets `displacementBiasAndScaleStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displacementBiasAndScaleStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementBiasAndScaleStride(segment, 0L, value); } + /// Sets `displacementBiasAndScaleStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementBiasAndScaleStrideAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementBiasAndScaleStride(this.segment(), index, value); return this; } + /// Sets `displacementBiasAndScaleStride` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementBiasAndScaleStride(@CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementBiasAndScaleStride(this.segment(), value); return this; } + + /// {@return `displacementVectorBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_displacementVectorBuffer(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_displacementVectorBuffer, index), ML_displacementVectorBuffer); } + /// {@return `displacementVectorBuffer`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_displacementVectorBuffer(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementVectorBuffer(segment, 0L); } + /// {@return `displacementVectorBuffer` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment displacementVectorBufferAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementVectorBuffer(this.segment(), index); } + /// {@return `displacementVectorBuffer`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment displacementVectorBuffer() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementVectorBuffer(this.segment()); } + /// Sets `displacementVectorBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displacementVectorBuffer(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_displacementVectorBuffer, index), ML_displacementVectorBuffer.byteSize()); } + /// Sets `displacementVectorBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displacementVectorBuffer(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementVectorBuffer(segment, 0L, value); } + /// Sets `displacementVectorBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementVectorBufferAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementVectorBuffer(this.segment(), index, value); return this; } + /// Sets `displacementVectorBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementVectorBuffer(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementVectorBuffer(this.segment(), value); return this; } + + /// {@return `displacementVectorStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_displacementVectorStride(MemorySegment segment, long index) { return (long) VH_displacementVectorStride.get(segment, 0L, index); } + /// {@return `displacementVectorStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_displacementVectorStride(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementVectorStride(segment, 0L); } + /// {@return `displacementVectorStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long displacementVectorStrideAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementVectorStride(this.segment(), index); } + /// {@return `displacementVectorStride`} + public @CType("VkDeviceSize") long displacementVectorStride() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacementVectorStride(this.segment()); } + /// Sets `displacementVectorStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displacementVectorStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_displacementVectorStride.set(segment, 0L, index, value); } + /// Sets `displacementVectorStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displacementVectorStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementVectorStride(segment, 0L, value); } + /// Sets `displacementVectorStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementVectorStrideAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementVectorStride(this.segment(), index, value); return this; } + /// Sets `displacementVectorStride` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacementVectorStride(@CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacementVectorStride(this.segment(), value); return this; } + + /// {@return `displacedMicromapPrimitiveFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_displacedMicromapPrimitiveFlags(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_displacedMicromapPrimitiveFlags, index), ML_displacedMicromapPrimitiveFlags); } + /// {@return `displacedMicromapPrimitiveFlags`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_displacedMicromapPrimitiveFlags(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacedMicromapPrimitiveFlags(segment, 0L); } + /// {@return `displacedMicromapPrimitiveFlags` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment displacedMicromapPrimitiveFlagsAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacedMicromapPrimitiveFlags(this.segment(), index); } + /// {@return `displacedMicromapPrimitiveFlags`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment displacedMicromapPrimitiveFlags() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacedMicromapPrimitiveFlags(this.segment()); } + /// Sets `displacedMicromapPrimitiveFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displacedMicromapPrimitiveFlags(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_displacedMicromapPrimitiveFlags, index), ML_displacedMicromapPrimitiveFlags.byteSize()); } + /// Sets `displacedMicromapPrimitiveFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displacedMicromapPrimitiveFlags(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacedMicromapPrimitiveFlags(segment, 0L, value); } + /// Sets `displacedMicromapPrimitiveFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacedMicromapPrimitiveFlagsAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacedMicromapPrimitiveFlags(this.segment(), index, value); return this; } + /// Sets `displacedMicromapPrimitiveFlags` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacedMicromapPrimitiveFlags(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacedMicromapPrimitiveFlags(this.segment(), value); return this; } + + /// {@return `displacedMicromapPrimitiveFlagsStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_displacedMicromapPrimitiveFlagsStride(MemorySegment segment, long index) { return (long) VH_displacedMicromapPrimitiveFlagsStride.get(segment, 0L, index); } + /// {@return `displacedMicromapPrimitiveFlagsStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_displacedMicromapPrimitiveFlagsStride(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacedMicromapPrimitiveFlagsStride(segment, 0L); } + /// {@return `displacedMicromapPrimitiveFlagsStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long displacedMicromapPrimitiveFlagsStrideAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacedMicromapPrimitiveFlagsStride(this.segment(), index); } + /// {@return `displacedMicromapPrimitiveFlagsStride`} + public @CType("VkDeviceSize") long displacedMicromapPrimitiveFlagsStride() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_displacedMicromapPrimitiveFlagsStride(this.segment()); } + /// Sets `displacedMicromapPrimitiveFlagsStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displacedMicromapPrimitiveFlagsStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_displacedMicromapPrimitiveFlagsStride.set(segment, 0L, index, value); } + /// Sets `displacedMicromapPrimitiveFlagsStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displacedMicromapPrimitiveFlagsStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacedMicromapPrimitiveFlagsStride(segment, 0L, value); } + /// Sets `displacedMicromapPrimitiveFlagsStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacedMicromapPrimitiveFlagsStrideAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacedMicromapPrimitiveFlagsStride(this.segment(), index, value); return this; } + /// Sets `displacedMicromapPrimitiveFlagsStride` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV displacedMicromapPrimitiveFlagsStride(@CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_displacedMicromapPrimitiveFlagsStride(this.segment(), value); return this; } + + /// {@return `indexType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndexType") int get_indexType(MemorySegment segment, long index) { return (int) VH_indexType.get(segment, 0L, index); } + /// {@return `indexType`} + /// @param segment the segment of the struct + public static @CType("VkIndexType") int get_indexType(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_indexType(segment, 0L); } + /// {@return `indexType` at the given index} + /// @param index the index + public @CType("VkIndexType") int indexTypeAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_indexType(this.segment(), index); } + /// {@return `indexType`} + public @CType("VkIndexType") int indexType() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_indexType(this.segment()); } + /// Sets `indexType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexType(MemorySegment segment, long index, @CType("VkIndexType") int value) { VH_indexType.set(segment, 0L, index, value); } + /// Sets `indexType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexType(MemorySegment segment, @CType("VkIndexType") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_indexType(segment, 0L, value); } + /// Sets `indexType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV indexTypeAt(long index, @CType("VkIndexType") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_indexType(this.segment(), index, value); return this; } + /// Sets `indexType` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV indexType(@CType("VkIndexType") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_indexType(this.segment(), value); return this; } + + /// {@return `indexBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_indexBuffer(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_indexBuffer, index), ML_indexBuffer); } + /// {@return `indexBuffer`} + /// @param segment the segment of the struct + public static @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment get_indexBuffer(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_indexBuffer(segment, 0L); } + /// {@return `indexBuffer` at the given index} + /// @param index the index + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment indexBufferAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_indexBuffer(this.segment(), index); } + /// {@return `indexBuffer`} + public @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment indexBuffer() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_indexBuffer(this.segment()); } + /// Sets `indexBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexBuffer(MemorySegment segment, long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_indexBuffer, index), ML_indexBuffer.byteSize()); } + /// Sets `indexBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexBuffer(MemorySegment segment, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_indexBuffer(segment, 0L, value); } + /// Sets `indexBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV indexBufferAt(long index, @CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_indexBuffer(this.segment(), index, value); return this; } + /// Sets `indexBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV indexBuffer(@CType("VkDeviceOrHostAddressConstKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_indexBuffer(this.segment(), value); return this; } + + /// {@return `indexStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_indexStride(MemorySegment segment, long index) { return (long) VH_indexStride.get(segment, 0L, index); } + /// {@return `indexStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_indexStride(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_indexStride(segment, 0L); } + /// {@return `indexStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long indexStrideAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_indexStride(this.segment(), index); } + /// {@return `indexStride`} + public @CType("VkDeviceSize") long indexStride() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_indexStride(this.segment()); } + /// Sets `indexStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_indexStride.set(segment, 0L, index, value); } + /// Sets `indexStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_indexStride(segment, 0L, value); } + /// Sets `indexStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV indexStrideAt(long index, @CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_indexStride(this.segment(), index, value); return this; } + /// Sets `indexStride` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV indexStride(@CType("VkDeviceSize") long value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_indexStride(this.segment(), value); return this; } + + /// {@return `baseTriangle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_baseTriangle(MemorySegment segment, long index) { return (int) VH_baseTriangle.get(segment, 0L, index); } + /// {@return `baseTriangle`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_baseTriangle(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_baseTriangle(segment, 0L); } + /// {@return `baseTriangle` at the given index} + /// @param index the index + public @CType("uint32_t") int baseTriangleAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_baseTriangle(this.segment(), index); } + /// {@return `baseTriangle`} + public @CType("uint32_t") int baseTriangle() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_baseTriangle(this.segment()); } + /// Sets `baseTriangle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_baseTriangle(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_baseTriangle.set(segment, 0L, index, value); } + /// Sets `baseTriangle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_baseTriangle(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_baseTriangle(segment, 0L, value); } + /// Sets `baseTriangle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV baseTriangleAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_baseTriangle(this.segment(), index, value); return this; } + /// Sets `baseTriangle` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV baseTriangle(@CType("uint32_t") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_baseTriangle(this.segment(), value); return this; } + + /// {@return `usageCountsCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_usageCountsCount(MemorySegment segment, long index) { return (int) VH_usageCountsCount.get(segment, 0L, index); } + /// {@return `usageCountsCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_usageCountsCount(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_usageCountsCount(segment, 0L); } + /// {@return `usageCountsCount` at the given index} + /// @param index the index + public @CType("uint32_t") int usageCountsCountAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_usageCountsCount(this.segment(), index); } + /// {@return `usageCountsCount`} + public @CType("uint32_t") int usageCountsCount() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_usageCountsCount(this.segment()); } + /// Sets `usageCountsCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usageCountsCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_usageCountsCount.set(segment, 0L, index, value); } + /// Sets `usageCountsCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usageCountsCount(MemorySegment segment, @CType("uint32_t") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_usageCountsCount(segment, 0L, value); } + /// Sets `usageCountsCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV usageCountsCountAt(long index, @CType("uint32_t") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_usageCountsCount(this.segment(), index, value); return this; } + /// Sets `usageCountsCount` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV usageCountsCount(@CType("uint32_t") int value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_usageCountsCount(this.segment(), value); return this; } + + /// {@return `pUsageCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment get_pUsageCounts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pUsageCounts.get(segment, 0L, index); } + /// {@return `pUsageCounts`} + /// @param segment the segment of the struct + public static @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment get_pUsageCounts(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_pUsageCounts(segment, 0L); } + /// {@return `pUsageCounts` at the given index} + /// @param index the index + public @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment pUsageCountsAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_pUsageCounts(this.segment(), index); } + /// {@return `pUsageCounts`} + public @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment pUsageCounts() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_pUsageCounts(this.segment()); } + /// Sets `pUsageCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pUsageCounts(MemorySegment segment, long index, @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VH_pUsageCounts.set(segment, 0L, index, value); } + /// Sets `pUsageCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pUsageCounts(MemorySegment segment, @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_pUsageCounts(segment, 0L, value); } + /// Sets `pUsageCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV pUsageCountsAt(long index, @CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_pUsageCounts(this.segment(), index, value); return this; } + /// Sets `pUsageCounts` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV pUsageCounts(@CType("const VkMicromapUsageEXT *") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_pUsageCounts(this.segment(), value); return this; } + + /// {@return `ppUsageCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment get_ppUsageCounts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_ppUsageCounts.get(segment, 0L, index); } + /// {@return `ppUsageCounts`} + /// @param segment the segment of the struct + public static @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment get_ppUsageCounts(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_ppUsageCounts(segment, 0L); } + /// {@return `ppUsageCounts` at the given index} + /// @param index the index + public @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment ppUsageCountsAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_ppUsageCounts(this.segment(), index); } + /// {@return `ppUsageCounts`} + public @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment ppUsageCounts() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_ppUsageCounts(this.segment()); } + /// Sets `ppUsageCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ppUsageCounts(MemorySegment segment, long index, @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VH_ppUsageCounts.set(segment, 0L, index, value); } + /// Sets `ppUsageCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ppUsageCounts(MemorySegment segment, @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_ppUsageCounts(segment, 0L, value); } + /// Sets `ppUsageCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV ppUsageCountsAt(long index, @CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_ppUsageCounts(this.segment(), index, value); return this; } + /// Sets `ppUsageCounts` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV ppUsageCounts(@CType("const VkMicromapUsageEXT * const*") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_ppUsageCounts(this.segment(), value); return this; } + + /// {@return `micromap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_micromap(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_micromap.get(segment, 0L, index); } + /// {@return `micromap`} + /// @param segment the segment of the struct + public static @CType("VkMicromapEXT") java.lang.foreign.MemorySegment get_micromap(MemorySegment segment) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_micromap(segment, 0L); } + /// {@return `micromap` at the given index} + /// @param index the index + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment micromapAt(long index) { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_micromap(this.segment(), index); } + /// {@return `micromap`} + public @CType("VkMicromapEXT") java.lang.foreign.MemorySegment micromap() { return VkAccelerationStructureTrianglesDisplacementMicromapNV.get_micromap(this.segment()); } + /// Sets `micromap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_micromap(MemorySegment segment, long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VH_micromap.set(segment, 0L, index, value); } + /// Sets `micromap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_micromap(MemorySegment segment, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_micromap(segment, 0L, value); } + /// Sets `micromap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV micromapAt(long index, @CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_micromap(this.segment(), index, value); return this; } + /// Sets `micromap` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureTrianglesDisplacementMicromapNV micromap(@CType("VkMicromapEXT") java.lang.foreign.MemorySegment value) { VkAccelerationStructureTrianglesDisplacementMicromapNV.set_micromap(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindAccelerationStructureMemoryInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindAccelerationStructureMemoryInfoNV.java new file mode 100644 index 00000000..54d6b24a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindAccelerationStructureMemoryInfoNV.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### accelerationStructure +/// [VarHandle][#VH_accelerationStructure] - [Getter][#accelerationStructure()] - [Setter][#accelerationStructure(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### memoryOffset +/// [VarHandle][#VH_memoryOffset] - [Getter][#memoryOffset()] - [Setter][#memoryOffset(long)] +/// ### deviceIndexCount +/// [VarHandle][#VH_deviceIndexCount] - [Getter][#deviceIndexCount()] - [Setter][#deviceIndexCount(int)] +/// ### pDeviceIndices +/// [VarHandle][#VH_pDeviceIndices] - [Getter][#pDeviceIndices()] - [Setter][#pDeviceIndices(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindAccelerationStructureMemoryInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccelerationStructureNV accelerationStructure; +/// VkDeviceMemory memory; +/// VkDeviceSize memoryOffset; +/// uint32_t deviceIndexCount; +/// const uint32_t * pDeviceIndices; +/// } VkBindAccelerationStructureMemoryInfoNV; +/// ``` +public final class VkBindAccelerationStructureMemoryInfoNV extends Struct { + /// The struct layout of `VkBindAccelerationStructureMemoryInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("accelerationStructure"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_LONG.withName("memoryOffset"), + ValueLayout.JAVA_INT.withName("deviceIndexCount"), + ValueLayout.ADDRESS.withName("pDeviceIndices") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `accelerationStructure` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_accelerationStructure = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructure")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `memoryOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_memoryOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryOffset")); + /// The [VarHandle] of `deviceIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceIndexCount")); + /// The [VarHandle] of `pDeviceIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDeviceIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDeviceIndices")); + + /// Creates `VkBindAccelerationStructureMemoryInfoNV` with the given segment. + /// @param segment the memory segment + public VkBindAccelerationStructureMemoryInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindAccelerationStructureMemoryInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindAccelerationStructureMemoryInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindAccelerationStructureMemoryInfoNV(segment); } + + /// Creates `VkBindAccelerationStructureMemoryInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindAccelerationStructureMemoryInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindAccelerationStructureMemoryInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindAccelerationStructureMemoryInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindAccelerationStructureMemoryInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindAccelerationStructureMemoryInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindAccelerationStructureMemoryInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindAccelerationStructureMemoryInfoNV` + public static VkBindAccelerationStructureMemoryInfoNV alloc(SegmentAllocator allocator) { return new VkBindAccelerationStructureMemoryInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindAccelerationStructureMemoryInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindAccelerationStructureMemoryInfoNV` + public static VkBindAccelerationStructureMemoryInfoNV alloc(SegmentAllocator allocator, long count) { return new VkBindAccelerationStructureMemoryInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindAccelerationStructureMemoryInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindAccelerationStructureMemoryInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindAccelerationStructureMemoryInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindAccelerationStructureMemoryInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkBindAccelerationStructureMemoryInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV sType(@CType("VkStructureType") int value) { VkBindAccelerationStructureMemoryInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindAccelerationStructureMemoryInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindAccelerationStructureMemoryInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindAccelerationStructureMemoryInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `accelerationStructure` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment get_accelerationStructure(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_accelerationStructure.get(segment, 0L, index); } + /// {@return `accelerationStructure`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment get_accelerationStructure(MemorySegment segment) { return VkBindAccelerationStructureMemoryInfoNV.get_accelerationStructure(segment, 0L); } + /// {@return `accelerationStructure` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment accelerationStructureAt(long index) { return VkBindAccelerationStructureMemoryInfoNV.get_accelerationStructure(this.segment(), index); } + /// {@return `accelerationStructure`} + public @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment accelerationStructure() { return VkBindAccelerationStructureMemoryInfoNV.get_accelerationStructure(this.segment()); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, long index, @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VH_accelerationStructure.set(segment, 0L, index, value); } + /// Sets `accelerationStructure` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructure(MemorySegment segment, @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_accelerationStructure(segment, 0L, value); } + /// Sets `accelerationStructure` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV accelerationStructureAt(long index, @CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_accelerationStructure(this.segment(), index, value); return this; } + /// Sets `accelerationStructure` with the given value. + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV accelerationStructure(@CType("VkAccelerationStructureNV") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_accelerationStructure(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkBindAccelerationStructureMemoryInfoNV.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkBindAccelerationStructureMemoryInfoNV.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkBindAccelerationStructureMemoryInfoNV.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_memory(this.segment(), value); return this; } + + /// {@return `memoryOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment, long index) { return (long) VH_memoryOffset.get(segment, 0L, index); } + /// {@return `memoryOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment) { return VkBindAccelerationStructureMemoryInfoNV.get_memoryOffset(segment, 0L); } + /// {@return `memoryOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long memoryOffsetAt(long index) { return VkBindAccelerationStructureMemoryInfoNV.get_memoryOffset(this.segment(), index); } + /// {@return `memoryOffset`} + public @CType("VkDeviceSize") long memoryOffset() { return VkBindAccelerationStructureMemoryInfoNV.get_memoryOffset(this.segment()); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_memoryOffset.set(segment, 0L, index, value); } + /// Sets `memoryOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBindAccelerationStructureMemoryInfoNV.set_memoryOffset(segment, 0L, value); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV memoryOffsetAt(long index, @CType("VkDeviceSize") long value) { VkBindAccelerationStructureMemoryInfoNV.set_memoryOffset(this.segment(), index, value); return this; } + /// Sets `memoryOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV memoryOffset(@CType("VkDeviceSize") long value) { VkBindAccelerationStructureMemoryInfoNV.set_memoryOffset(this.segment(), value); return this; } + + /// {@return `deviceIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceIndexCount(MemorySegment segment, long index) { return (int) VH_deviceIndexCount.get(segment, 0L, index); } + /// {@return `deviceIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceIndexCount(MemorySegment segment) { return VkBindAccelerationStructureMemoryInfoNV.get_deviceIndexCount(segment, 0L); } + /// {@return `deviceIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceIndexCountAt(long index) { return VkBindAccelerationStructureMemoryInfoNV.get_deviceIndexCount(this.segment(), index); } + /// {@return `deviceIndexCount`} + public @CType("uint32_t") int deviceIndexCount() { return VkBindAccelerationStructureMemoryInfoNV.get_deviceIndexCount(this.segment()); } + /// Sets `deviceIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceIndexCount.set(segment, 0L, index, value); } + /// Sets `deviceIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindAccelerationStructureMemoryInfoNV.set_deviceIndexCount(segment, 0L, value); } + /// Sets `deviceIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV deviceIndexCountAt(long index, @CType("uint32_t") int value) { VkBindAccelerationStructureMemoryInfoNV.set_deviceIndexCount(this.segment(), index, value); return this; } + /// Sets `deviceIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV deviceIndexCount(@CType("uint32_t") int value) { VkBindAccelerationStructureMemoryInfoNV.set_deviceIndexCount(this.segment(), value); return this; } + + /// {@return `pDeviceIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDeviceIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDeviceIndices.get(segment, 0L, index); } + /// {@return `pDeviceIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDeviceIndices(MemorySegment segment) { return VkBindAccelerationStructureMemoryInfoNV.get_pDeviceIndices(segment, 0L); } + /// {@return `pDeviceIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDeviceIndicesAt(long index) { return VkBindAccelerationStructureMemoryInfoNV.get_pDeviceIndices(this.segment(), index); } + /// {@return `pDeviceIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDeviceIndices() { return VkBindAccelerationStructureMemoryInfoNV.get_pDeviceIndices(this.segment()); } + /// Sets `pDeviceIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDeviceIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pDeviceIndices.set(segment, 0L, index, value); } + /// Sets `pDeviceIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDeviceIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_pDeviceIndices(segment, 0L, value); } + /// Sets `pDeviceIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV pDeviceIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_pDeviceIndices(this.segment(), index, value); return this; } + /// Sets `pDeviceIndices` with the given value. + /// @param value the value + /// @return `this` + public VkBindAccelerationStructureMemoryInfoNV pDeviceIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindAccelerationStructureMemoryInfoNV.set_pDeviceIndices(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindIndexBufferIndirectCommandNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindIndexBufferIndirectCommandNV.java new file mode 100644 index 00000000..67da4e37 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindIndexBufferIndirectCommandNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### bufferAddress +/// [VarHandle][#VH_bufferAddress] - [Getter][#bufferAddress()] - [Setter][#bufferAddress(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(int)] +/// ### indexType +/// [VarHandle][#VH_indexType] - [Getter][#indexType()] - [Setter][#indexType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindIndexBufferIndirectCommandNV { +/// VkDeviceAddress bufferAddress; +/// uint32_t size; +/// VkIndexType indexType; +/// } VkBindIndexBufferIndirectCommandNV; +/// ``` +public final class VkBindIndexBufferIndirectCommandNV extends Struct { + /// The struct layout of `VkBindIndexBufferIndirectCommandNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("bufferAddress"), + ValueLayout.JAVA_INT.withName("size"), + ValueLayout.JAVA_INT.withName("indexType") + ); + /// The [VarHandle] of `bufferAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_bufferAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferAddress")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `indexType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexType")); + + /// Creates `VkBindIndexBufferIndirectCommandNV` with the given segment. + /// @param segment the memory segment + public VkBindIndexBufferIndirectCommandNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindIndexBufferIndirectCommandNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindIndexBufferIndirectCommandNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindIndexBufferIndirectCommandNV(segment); } + + /// Creates `VkBindIndexBufferIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindIndexBufferIndirectCommandNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindIndexBufferIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindIndexBufferIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindIndexBufferIndirectCommandNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindIndexBufferIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindIndexBufferIndirectCommandNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindIndexBufferIndirectCommandNV` + public static VkBindIndexBufferIndirectCommandNV alloc(SegmentAllocator allocator) { return new VkBindIndexBufferIndirectCommandNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindIndexBufferIndirectCommandNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindIndexBufferIndirectCommandNV` + public static VkBindIndexBufferIndirectCommandNV alloc(SegmentAllocator allocator, long count) { return new VkBindIndexBufferIndirectCommandNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `bufferAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_bufferAddress(MemorySegment segment, long index) { return (long) VH_bufferAddress.get(segment, 0L, index); } + /// {@return `bufferAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_bufferAddress(MemorySegment segment) { return VkBindIndexBufferIndirectCommandNV.get_bufferAddress(segment, 0L); } + /// {@return `bufferAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long bufferAddressAt(long index) { return VkBindIndexBufferIndirectCommandNV.get_bufferAddress(this.segment(), index); } + /// {@return `bufferAddress`} + public @CType("VkDeviceAddress") long bufferAddress() { return VkBindIndexBufferIndirectCommandNV.get_bufferAddress(this.segment()); } + /// Sets `bufferAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_bufferAddress.set(segment, 0L, index, value); } + /// Sets `bufferAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkBindIndexBufferIndirectCommandNV.set_bufferAddress(segment, 0L, value); } + /// Sets `bufferAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandNV bufferAddressAt(long index, @CType("VkDeviceAddress") long value) { VkBindIndexBufferIndirectCommandNV.set_bufferAddress(this.segment(), index, value); return this; } + /// Sets `bufferAddress` with the given value. + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandNV bufferAddress(@CType("VkDeviceAddress") long value) { VkBindIndexBufferIndirectCommandNV.set_bufferAddress(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_size(MemorySegment segment, long index) { return (int) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_size(MemorySegment segment) { return VkBindIndexBufferIndirectCommandNV.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("uint32_t") int sizeAt(long index) { return VkBindIndexBufferIndirectCommandNV.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("uint32_t") int size() { return VkBindIndexBufferIndirectCommandNV.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("uint32_t") int value) { VkBindIndexBufferIndirectCommandNV.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandNV sizeAt(long index, @CType("uint32_t") int value) { VkBindIndexBufferIndirectCommandNV.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandNV size(@CType("uint32_t") int value) { VkBindIndexBufferIndirectCommandNV.set_size(this.segment(), value); return this; } + + /// {@return `indexType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndexType") int get_indexType(MemorySegment segment, long index) { return (int) VH_indexType.get(segment, 0L, index); } + /// {@return `indexType`} + /// @param segment the segment of the struct + public static @CType("VkIndexType") int get_indexType(MemorySegment segment) { return VkBindIndexBufferIndirectCommandNV.get_indexType(segment, 0L); } + /// {@return `indexType` at the given index} + /// @param index the index + public @CType("VkIndexType") int indexTypeAt(long index) { return VkBindIndexBufferIndirectCommandNV.get_indexType(this.segment(), index); } + /// {@return `indexType`} + public @CType("VkIndexType") int indexType() { return VkBindIndexBufferIndirectCommandNV.get_indexType(this.segment()); } + /// Sets `indexType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexType(MemorySegment segment, long index, @CType("VkIndexType") int value) { VH_indexType.set(segment, 0L, index, value); } + /// Sets `indexType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexType(MemorySegment segment, @CType("VkIndexType") int value) { VkBindIndexBufferIndirectCommandNV.set_indexType(segment, 0L, value); } + /// Sets `indexType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandNV indexTypeAt(long index, @CType("VkIndexType") int value) { VkBindIndexBufferIndirectCommandNV.set_indexType(this.segment(), index, value); return this; } + /// Sets `indexType` with the given value. + /// @param value the value + /// @return `this` + public VkBindIndexBufferIndirectCommandNV indexType(@CType("VkIndexType") int value) { VkBindIndexBufferIndirectCommandNV.set_indexType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindPipelineIndirectCommandNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindPipelineIndirectCommandNV.java new file mode 100644 index 00000000..f038b94e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindPipelineIndirectCommandNV.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### pipelineAddress +/// [VarHandle][#VH_pipelineAddress] - [Getter][#pipelineAddress()] - [Setter][#pipelineAddress(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindPipelineIndirectCommandNV { +/// VkDeviceAddress pipelineAddress; +/// } VkBindPipelineIndirectCommandNV; +/// ``` +public final class VkBindPipelineIndirectCommandNV extends Struct { + /// The struct layout of `VkBindPipelineIndirectCommandNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("pipelineAddress") + ); + /// The [VarHandle] of `pipelineAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_pipelineAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineAddress")); + + /// Creates `VkBindPipelineIndirectCommandNV` with the given segment. + /// @param segment the memory segment + public VkBindPipelineIndirectCommandNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindPipelineIndirectCommandNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindPipelineIndirectCommandNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindPipelineIndirectCommandNV(segment); } + + /// Creates `VkBindPipelineIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindPipelineIndirectCommandNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindPipelineIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindPipelineIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindPipelineIndirectCommandNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindPipelineIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindPipelineIndirectCommandNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindPipelineIndirectCommandNV` + public static VkBindPipelineIndirectCommandNV alloc(SegmentAllocator allocator) { return new VkBindPipelineIndirectCommandNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindPipelineIndirectCommandNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindPipelineIndirectCommandNV` + public static VkBindPipelineIndirectCommandNV alloc(SegmentAllocator allocator, long count) { return new VkBindPipelineIndirectCommandNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `pipelineAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_pipelineAddress(MemorySegment segment, long index) { return (long) VH_pipelineAddress.get(segment, 0L, index); } + /// {@return `pipelineAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_pipelineAddress(MemorySegment segment) { return VkBindPipelineIndirectCommandNV.get_pipelineAddress(segment, 0L); } + /// {@return `pipelineAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long pipelineAddressAt(long index) { return VkBindPipelineIndirectCommandNV.get_pipelineAddress(this.segment(), index); } + /// {@return `pipelineAddress`} + public @CType("VkDeviceAddress") long pipelineAddress() { return VkBindPipelineIndirectCommandNV.get_pipelineAddress(this.segment()); } + /// Sets `pipelineAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_pipelineAddress.set(segment, 0L, index, value); } + /// Sets `pipelineAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkBindPipelineIndirectCommandNV.set_pipelineAddress(segment, 0L, value); } + /// Sets `pipelineAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindPipelineIndirectCommandNV pipelineAddressAt(long index, @CType("VkDeviceAddress") long value) { VkBindPipelineIndirectCommandNV.set_pipelineAddress(this.segment(), index, value); return this; } + /// Sets `pipelineAddress` with the given value. + /// @param value the value + /// @return `this` + public VkBindPipelineIndirectCommandNV pipelineAddress(@CType("VkDeviceAddress") long value) { VkBindPipelineIndirectCommandNV.set_pipelineAddress(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindShaderGroupIndirectCommandNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindShaderGroupIndirectCommandNV.java new file mode 100644 index 00000000..f46e5c4f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindShaderGroupIndirectCommandNV.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### groupIndex +/// [VarHandle][#VH_groupIndex] - [Getter][#groupIndex()] - [Setter][#groupIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindShaderGroupIndirectCommandNV { +/// uint32_t groupIndex; +/// } VkBindShaderGroupIndirectCommandNV; +/// ``` +public final class VkBindShaderGroupIndirectCommandNV extends Struct { + /// The struct layout of `VkBindShaderGroupIndirectCommandNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("groupIndex") + ); + /// The [VarHandle] of `groupIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_groupIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("groupIndex")); + + /// Creates `VkBindShaderGroupIndirectCommandNV` with the given segment. + /// @param segment the memory segment + public VkBindShaderGroupIndirectCommandNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindShaderGroupIndirectCommandNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindShaderGroupIndirectCommandNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindShaderGroupIndirectCommandNV(segment); } + + /// Creates `VkBindShaderGroupIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindShaderGroupIndirectCommandNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindShaderGroupIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindShaderGroupIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindShaderGroupIndirectCommandNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindShaderGroupIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindShaderGroupIndirectCommandNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindShaderGroupIndirectCommandNV` + public static VkBindShaderGroupIndirectCommandNV alloc(SegmentAllocator allocator) { return new VkBindShaderGroupIndirectCommandNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindShaderGroupIndirectCommandNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindShaderGroupIndirectCommandNV` + public static VkBindShaderGroupIndirectCommandNV alloc(SegmentAllocator allocator, long count) { return new VkBindShaderGroupIndirectCommandNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `groupIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_groupIndex(MemorySegment segment, long index) { return (int) VH_groupIndex.get(segment, 0L, index); } + /// {@return `groupIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_groupIndex(MemorySegment segment) { return VkBindShaderGroupIndirectCommandNV.get_groupIndex(segment, 0L); } + /// {@return `groupIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int groupIndexAt(long index) { return VkBindShaderGroupIndirectCommandNV.get_groupIndex(this.segment(), index); } + /// {@return `groupIndex`} + public @CType("uint32_t") int groupIndex() { return VkBindShaderGroupIndirectCommandNV.get_groupIndex(this.segment()); } + /// Sets `groupIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_groupIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_groupIndex.set(segment, 0L, index, value); } + /// Sets `groupIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_groupIndex(MemorySegment segment, @CType("uint32_t") int value) { VkBindShaderGroupIndirectCommandNV.set_groupIndex(segment, 0L, value); } + /// Sets `groupIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindShaderGroupIndirectCommandNV groupIndexAt(long index, @CType("uint32_t") int value) { VkBindShaderGroupIndirectCommandNV.set_groupIndex(this.segment(), index, value); return this; } + /// Sets `groupIndex` with the given value. + /// @param value the value + /// @return `this` + public VkBindShaderGroupIndirectCommandNV groupIndex(@CType("uint32_t") int value) { VkBindShaderGroupIndirectCommandNV.set_groupIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindVertexBufferIndirectCommandNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindVertexBufferIndirectCommandNV.java new file mode 100644 index 00000000..5122d09a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkBindVertexBufferIndirectCommandNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### bufferAddress +/// [VarHandle][#VH_bufferAddress] - [Getter][#bufferAddress()] - [Setter][#bufferAddress(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(int)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindVertexBufferIndirectCommandNV { +/// VkDeviceAddress bufferAddress; +/// uint32_t size; +/// uint32_t stride; +/// } VkBindVertexBufferIndirectCommandNV; +/// ``` +public final class VkBindVertexBufferIndirectCommandNV extends Struct { + /// The struct layout of `VkBindVertexBufferIndirectCommandNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("bufferAddress"), + ValueLayout.JAVA_INT.withName("size"), + ValueLayout.JAVA_INT.withName("stride") + ); + /// The [VarHandle] of `bufferAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_bufferAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferAddress")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + + /// Creates `VkBindVertexBufferIndirectCommandNV` with the given segment. + /// @param segment the memory segment + public VkBindVertexBufferIndirectCommandNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindVertexBufferIndirectCommandNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindVertexBufferIndirectCommandNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindVertexBufferIndirectCommandNV(segment); } + + /// Creates `VkBindVertexBufferIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindVertexBufferIndirectCommandNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindVertexBufferIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindVertexBufferIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindVertexBufferIndirectCommandNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindVertexBufferIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindVertexBufferIndirectCommandNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindVertexBufferIndirectCommandNV` + public static VkBindVertexBufferIndirectCommandNV alloc(SegmentAllocator allocator) { return new VkBindVertexBufferIndirectCommandNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindVertexBufferIndirectCommandNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindVertexBufferIndirectCommandNV` + public static VkBindVertexBufferIndirectCommandNV alloc(SegmentAllocator allocator, long count) { return new VkBindVertexBufferIndirectCommandNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `bufferAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_bufferAddress(MemorySegment segment, long index) { return (long) VH_bufferAddress.get(segment, 0L, index); } + /// {@return `bufferAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_bufferAddress(MemorySegment segment) { return VkBindVertexBufferIndirectCommandNV.get_bufferAddress(segment, 0L); } + /// {@return `bufferAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long bufferAddressAt(long index) { return VkBindVertexBufferIndirectCommandNV.get_bufferAddress(this.segment(), index); } + /// {@return `bufferAddress`} + public @CType("VkDeviceAddress") long bufferAddress() { return VkBindVertexBufferIndirectCommandNV.get_bufferAddress(this.segment()); } + /// Sets `bufferAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_bufferAddress.set(segment, 0L, index, value); } + /// Sets `bufferAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkBindVertexBufferIndirectCommandNV.set_bufferAddress(segment, 0L, value); } + /// Sets `bufferAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandNV bufferAddressAt(long index, @CType("VkDeviceAddress") long value) { VkBindVertexBufferIndirectCommandNV.set_bufferAddress(this.segment(), index, value); return this; } + /// Sets `bufferAddress` with the given value. + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandNV bufferAddress(@CType("VkDeviceAddress") long value) { VkBindVertexBufferIndirectCommandNV.set_bufferAddress(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_size(MemorySegment segment, long index) { return (int) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_size(MemorySegment segment) { return VkBindVertexBufferIndirectCommandNV.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("uint32_t") int sizeAt(long index) { return VkBindVertexBufferIndirectCommandNV.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("uint32_t") int size() { return VkBindVertexBufferIndirectCommandNV.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandNV.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandNV sizeAt(long index, @CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandNV.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandNV size(@CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandNV.set_size(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stride(MemorySegment segment, long index) { return (int) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stride(MemorySegment segment) { return VkBindVertexBufferIndirectCommandNV.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("uint32_t") int strideAt(long index) { return VkBindVertexBufferIndirectCommandNV.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("uint32_t") int stride() { return VkBindVertexBufferIndirectCommandNV.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandNV.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandNV strideAt(long index, @CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandNV.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkBindVertexBufferIndirectCommandNV stride(@CType("uint32_t") int value) { VkBindVertexBufferIndirectCommandNV.set_stride(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCheckpointData2NV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCheckpointData2NV.java new file mode 100644 index 00000000..459102b2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCheckpointData2NV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stage +/// [VarHandle][#VH_stage] - [Getter][#stage()] - [Setter][#stage(long)] +/// ### pCheckpointMarker +/// [VarHandle][#VH_pCheckpointMarker] - [Getter][#pCheckpointMarker()] - [Setter][#pCheckpointMarker(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCheckpointData2NV { +/// VkStructureType sType; +/// void * pNext; +/// VkPipelineStageFlags2 stage; +/// void * pCheckpointMarker; +/// } VkCheckpointData2NV; +/// ``` +public final class VkCheckpointData2NV extends Struct { + /// The struct layout of `VkCheckpointData2NV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("stage"), + ValueLayout.ADDRESS.withName("pCheckpointMarker") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stage` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_stage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stage")); + /// The [VarHandle] of `pCheckpointMarker` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCheckpointMarker = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCheckpointMarker")); + + /// Creates `VkCheckpointData2NV` with the given segment. + /// @param segment the memory segment + public VkCheckpointData2NV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCheckpointData2NV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCheckpointData2NV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCheckpointData2NV(segment); } + + /// Creates `VkCheckpointData2NV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCheckpointData2NV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCheckpointData2NV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCheckpointData2NV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCheckpointData2NV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCheckpointData2NV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCheckpointData2NV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCheckpointData2NV` + public static VkCheckpointData2NV alloc(SegmentAllocator allocator) { return new VkCheckpointData2NV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCheckpointData2NV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCheckpointData2NV` + public static VkCheckpointData2NV alloc(SegmentAllocator allocator, long count) { return new VkCheckpointData2NV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCheckpointData2NV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCheckpointData2NV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCheckpointData2NV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCheckpointData2NV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCheckpointData2NV sTypeAt(long index, @CType("VkStructureType") int value) { VkCheckpointData2NV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCheckpointData2NV sType(@CType("VkStructureType") int value) { VkCheckpointData2NV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCheckpointData2NV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCheckpointData2NV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkCheckpointData2NV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointData2NV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCheckpointData2NV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointData2NV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCheckpointData2NV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointData2NV.set_pNext(this.segment(), value); return this; } + + /// {@return `stage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags2") long get_stage(MemorySegment segment, long index) { return (long) VH_stage.get(segment, 0L, index); } + /// {@return `stage`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags2") long get_stage(MemorySegment segment) { return VkCheckpointData2NV.get_stage(segment, 0L); } + /// {@return `stage` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags2") long stageAt(long index) { return VkCheckpointData2NV.get_stage(this.segment(), index); } + /// {@return `stage`} + public @CType("VkPipelineStageFlags2") long stage() { return VkCheckpointData2NV.get_stage(this.segment()); } + /// Sets `stage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stage(MemorySegment segment, long index, @CType("VkPipelineStageFlags2") long value) { VH_stage.set(segment, 0L, index, value); } + /// Sets `stage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stage(MemorySegment segment, @CType("VkPipelineStageFlags2") long value) { VkCheckpointData2NV.set_stage(segment, 0L, value); } + /// Sets `stage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCheckpointData2NV stageAt(long index, @CType("VkPipelineStageFlags2") long value) { VkCheckpointData2NV.set_stage(this.segment(), index, value); return this; } + /// Sets `stage` with the given value. + /// @param value the value + /// @return `this` + public VkCheckpointData2NV stage(@CType("VkPipelineStageFlags2") long value) { VkCheckpointData2NV.set_stage(this.segment(), value); return this; } + + /// {@return `pCheckpointMarker` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pCheckpointMarker(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCheckpointMarker.get(segment, 0L, index); } + /// {@return `pCheckpointMarker`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pCheckpointMarker(MemorySegment segment) { return VkCheckpointData2NV.get_pCheckpointMarker(segment, 0L); } + /// {@return `pCheckpointMarker` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pCheckpointMarkerAt(long index) { return VkCheckpointData2NV.get_pCheckpointMarker(this.segment(), index); } + /// {@return `pCheckpointMarker`} + public @CType("void *") java.lang.foreign.MemorySegment pCheckpointMarker() { return VkCheckpointData2NV.get_pCheckpointMarker(this.segment()); } + /// Sets `pCheckpointMarker` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCheckpointMarker(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pCheckpointMarker.set(segment, 0L, index, value); } + /// Sets `pCheckpointMarker` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCheckpointMarker(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointData2NV.set_pCheckpointMarker(segment, 0L, value); } + /// Sets `pCheckpointMarker` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCheckpointData2NV pCheckpointMarkerAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointData2NV.set_pCheckpointMarker(this.segment(), index, value); return this; } + /// Sets `pCheckpointMarker` with the given value. + /// @param value the value + /// @return `this` + public VkCheckpointData2NV pCheckpointMarker(@CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointData2NV.set_pCheckpointMarker(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCheckpointDataNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCheckpointDataNV.java new file mode 100644 index 00000000..37355247 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCheckpointDataNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stage +/// [VarHandle][#VH_stage] - [Getter][#stage()] - [Setter][#stage(int)] +/// ### pCheckpointMarker +/// [VarHandle][#VH_pCheckpointMarker] - [Getter][#pCheckpointMarker()] - [Setter][#pCheckpointMarker(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCheckpointDataNV { +/// VkStructureType sType; +/// void * pNext; +/// VkPipelineStageFlagBits stage; +/// void * pCheckpointMarker; +/// } VkCheckpointDataNV; +/// ``` +public final class VkCheckpointDataNV extends Struct { + /// The struct layout of `VkCheckpointDataNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stage"), + ValueLayout.ADDRESS.withName("pCheckpointMarker") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stage")); + /// The [VarHandle] of `pCheckpointMarker` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCheckpointMarker = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCheckpointMarker")); + + /// Creates `VkCheckpointDataNV` with the given segment. + /// @param segment the memory segment + public VkCheckpointDataNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCheckpointDataNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCheckpointDataNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCheckpointDataNV(segment); } + + /// Creates `VkCheckpointDataNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCheckpointDataNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCheckpointDataNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCheckpointDataNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCheckpointDataNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCheckpointDataNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCheckpointDataNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCheckpointDataNV` + public static VkCheckpointDataNV alloc(SegmentAllocator allocator) { return new VkCheckpointDataNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCheckpointDataNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCheckpointDataNV` + public static VkCheckpointDataNV alloc(SegmentAllocator allocator, long count) { return new VkCheckpointDataNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCheckpointDataNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCheckpointDataNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCheckpointDataNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCheckpointDataNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCheckpointDataNV sTypeAt(long index, @CType("VkStructureType") int value) { VkCheckpointDataNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCheckpointDataNV sType(@CType("VkStructureType") int value) { VkCheckpointDataNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCheckpointDataNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCheckpointDataNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkCheckpointDataNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointDataNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCheckpointDataNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointDataNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCheckpointDataNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointDataNV.set_pNext(this.segment(), value); return this; } + + /// {@return `stage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlagBits") int get_stage(MemorySegment segment, long index) { return (int) VH_stage.get(segment, 0L, index); } + /// {@return `stage`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlagBits") int get_stage(MemorySegment segment) { return VkCheckpointDataNV.get_stage(segment, 0L); } + /// {@return `stage` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlagBits") int stageAt(long index) { return VkCheckpointDataNV.get_stage(this.segment(), index); } + /// {@return `stage`} + public @CType("VkPipelineStageFlagBits") int stage() { return VkCheckpointDataNV.get_stage(this.segment()); } + /// Sets `stage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stage(MemorySegment segment, long index, @CType("VkPipelineStageFlagBits") int value) { VH_stage.set(segment, 0L, index, value); } + /// Sets `stage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stage(MemorySegment segment, @CType("VkPipelineStageFlagBits") int value) { VkCheckpointDataNV.set_stage(segment, 0L, value); } + /// Sets `stage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCheckpointDataNV stageAt(long index, @CType("VkPipelineStageFlagBits") int value) { VkCheckpointDataNV.set_stage(this.segment(), index, value); return this; } + /// Sets `stage` with the given value. + /// @param value the value + /// @return `this` + public VkCheckpointDataNV stage(@CType("VkPipelineStageFlagBits") int value) { VkCheckpointDataNV.set_stage(this.segment(), value); return this; } + + /// {@return `pCheckpointMarker` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pCheckpointMarker(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCheckpointMarker.get(segment, 0L, index); } + /// {@return `pCheckpointMarker`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pCheckpointMarker(MemorySegment segment) { return VkCheckpointDataNV.get_pCheckpointMarker(segment, 0L); } + /// {@return `pCheckpointMarker` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pCheckpointMarkerAt(long index) { return VkCheckpointDataNV.get_pCheckpointMarker(this.segment(), index); } + /// {@return `pCheckpointMarker`} + public @CType("void *") java.lang.foreign.MemorySegment pCheckpointMarker() { return VkCheckpointDataNV.get_pCheckpointMarker(this.segment()); } + /// Sets `pCheckpointMarker` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCheckpointMarker(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pCheckpointMarker.set(segment, 0L, index, value); } + /// Sets `pCheckpointMarker` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCheckpointMarker(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointDataNV.set_pCheckpointMarker(segment, 0L, value); } + /// Sets `pCheckpointMarker` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCheckpointDataNV pCheckpointMarkerAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointDataNV.set_pCheckpointMarker(this.segment(), index, value); return this; } + /// Sets `pCheckpointMarker` with the given value. + /// @param value the value + /// @return `this` + public VkCheckpointDataNV pCheckpointMarker(@CType("void *") java.lang.foreign.MemorySegment value) { VkCheckpointDataNV.set_pCheckpointMarker(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCoarseSampleLocationNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCoarseSampleLocationNV.java new file mode 100644 index 00000000..f9e7e583 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCoarseSampleLocationNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### pixelX +/// [VarHandle][#VH_pixelX] - [Getter][#pixelX()] - [Setter][#pixelX(int)] +/// ### pixelY +/// [VarHandle][#VH_pixelY] - [Getter][#pixelY()] - [Setter][#pixelY(int)] +/// ### sample +/// [VarHandle][#VH_sample] - [Getter][#sample()] - [Setter][#sample(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCoarseSampleLocationNV { +/// uint32_t pixelX; +/// uint32_t pixelY; +/// uint32_t sample; +/// } VkCoarseSampleLocationNV; +/// ``` +public final class VkCoarseSampleLocationNV extends Struct { + /// The struct layout of `VkCoarseSampleLocationNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("pixelX"), + ValueLayout.JAVA_INT.withName("pixelY"), + ValueLayout.JAVA_INT.withName("sample") + ); + /// The [VarHandle] of `pixelX` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pixelX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pixelX")); + /// The [VarHandle] of `pixelY` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pixelY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pixelY")); + /// The [VarHandle] of `sample` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sample = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sample")); + + /// Creates `VkCoarseSampleLocationNV` with the given segment. + /// @param segment the memory segment + public VkCoarseSampleLocationNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCoarseSampleLocationNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCoarseSampleLocationNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCoarseSampleLocationNV(segment); } + + /// Creates `VkCoarseSampleLocationNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCoarseSampleLocationNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCoarseSampleLocationNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCoarseSampleLocationNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCoarseSampleLocationNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCoarseSampleLocationNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCoarseSampleLocationNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCoarseSampleLocationNV` + public static VkCoarseSampleLocationNV alloc(SegmentAllocator allocator) { return new VkCoarseSampleLocationNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCoarseSampleLocationNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCoarseSampleLocationNV` + public static VkCoarseSampleLocationNV alloc(SegmentAllocator allocator, long count) { return new VkCoarseSampleLocationNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `pixelX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pixelX(MemorySegment segment, long index) { return (int) VH_pixelX.get(segment, 0L, index); } + /// {@return `pixelX`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pixelX(MemorySegment segment) { return VkCoarseSampleLocationNV.get_pixelX(segment, 0L); } + /// {@return `pixelX` at the given index} + /// @param index the index + public @CType("uint32_t") int pixelXAt(long index) { return VkCoarseSampleLocationNV.get_pixelX(this.segment(), index); } + /// {@return `pixelX`} + public @CType("uint32_t") int pixelX() { return VkCoarseSampleLocationNV.get_pixelX(this.segment()); } + /// Sets `pixelX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pixelX(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pixelX.set(segment, 0L, index, value); } + /// Sets `pixelX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pixelX(MemorySegment segment, @CType("uint32_t") int value) { VkCoarseSampleLocationNV.set_pixelX(segment, 0L, value); } + /// Sets `pixelX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCoarseSampleLocationNV pixelXAt(long index, @CType("uint32_t") int value) { VkCoarseSampleLocationNV.set_pixelX(this.segment(), index, value); return this; } + /// Sets `pixelX` with the given value. + /// @param value the value + /// @return `this` + public VkCoarseSampleLocationNV pixelX(@CType("uint32_t") int value) { VkCoarseSampleLocationNV.set_pixelX(this.segment(), value); return this; } + + /// {@return `pixelY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pixelY(MemorySegment segment, long index) { return (int) VH_pixelY.get(segment, 0L, index); } + /// {@return `pixelY`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pixelY(MemorySegment segment) { return VkCoarseSampleLocationNV.get_pixelY(segment, 0L); } + /// {@return `pixelY` at the given index} + /// @param index the index + public @CType("uint32_t") int pixelYAt(long index) { return VkCoarseSampleLocationNV.get_pixelY(this.segment(), index); } + /// {@return `pixelY`} + public @CType("uint32_t") int pixelY() { return VkCoarseSampleLocationNV.get_pixelY(this.segment()); } + /// Sets `pixelY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pixelY(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pixelY.set(segment, 0L, index, value); } + /// Sets `pixelY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pixelY(MemorySegment segment, @CType("uint32_t") int value) { VkCoarseSampleLocationNV.set_pixelY(segment, 0L, value); } + /// Sets `pixelY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCoarseSampleLocationNV pixelYAt(long index, @CType("uint32_t") int value) { VkCoarseSampleLocationNV.set_pixelY(this.segment(), index, value); return this; } + /// Sets `pixelY` with the given value. + /// @param value the value + /// @return `this` + public VkCoarseSampleLocationNV pixelY(@CType("uint32_t") int value) { VkCoarseSampleLocationNV.set_pixelY(this.segment(), value); return this; } + + /// {@return `sample` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sample(MemorySegment segment, long index) { return (int) VH_sample.get(segment, 0L, index); } + /// {@return `sample`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sample(MemorySegment segment) { return VkCoarseSampleLocationNV.get_sample(segment, 0L); } + /// {@return `sample` at the given index} + /// @param index the index + public @CType("uint32_t") int sampleAt(long index) { return VkCoarseSampleLocationNV.get_sample(this.segment(), index); } + /// {@return `sample`} + public @CType("uint32_t") int sample() { return VkCoarseSampleLocationNV.get_sample(this.segment()); } + /// Sets `sample` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sample(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sample.set(segment, 0L, index, value); } + /// Sets `sample` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sample(MemorySegment segment, @CType("uint32_t") int value) { VkCoarseSampleLocationNV.set_sample(segment, 0L, value); } + /// Sets `sample` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCoarseSampleLocationNV sampleAt(long index, @CType("uint32_t") int value) { VkCoarseSampleLocationNV.set_sample(this.segment(), index, value); return this; } + /// Sets `sample` with the given value. + /// @param value the value + /// @return `this` + public VkCoarseSampleLocationNV sample(@CType("uint32_t") int value) { VkCoarseSampleLocationNV.set_sample(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCoarseSampleOrderCustomNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCoarseSampleOrderCustomNV.java new file mode 100644 index 00000000..05ca589d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCoarseSampleOrderCustomNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### shadingRate +/// [VarHandle][#VH_shadingRate] - [Getter][#shadingRate()] - [Setter][#shadingRate(int)] +/// ### sampleCount +/// [VarHandle][#VH_sampleCount] - [Getter][#sampleCount()] - [Setter][#sampleCount(int)] +/// ### sampleLocationCount +/// [VarHandle][#VH_sampleLocationCount] - [Getter][#sampleLocationCount()] - [Setter][#sampleLocationCount(int)] +/// ### pSampleLocations +/// [VarHandle][#VH_pSampleLocations] - [Getter][#pSampleLocations()] - [Setter][#pSampleLocations(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCoarseSampleOrderCustomNV { +/// VkShadingRatePaletteEntryNV shadingRate; +/// uint32_t sampleCount; +/// uint32_t sampleLocationCount; +/// const VkCoarseSampleLocationNV * pSampleLocations; +/// } VkCoarseSampleOrderCustomNV; +/// ``` +public final class VkCoarseSampleOrderCustomNV extends Struct { + /// The struct layout of `VkCoarseSampleOrderCustomNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("shadingRate"), + ValueLayout.JAVA_INT.withName("sampleCount"), + ValueLayout.JAVA_INT.withName("sampleLocationCount"), + ValueLayout.ADDRESS.withName("pSampleLocations") + ); + /// The [VarHandle] of `shadingRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shadingRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shadingRate")); + /// The [VarHandle] of `sampleCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleCount")); + /// The [VarHandle] of `sampleLocationCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleLocationCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleLocationCount")); + /// The [VarHandle] of `pSampleLocations` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSampleLocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSampleLocations")); + + /// Creates `VkCoarseSampleOrderCustomNV` with the given segment. + /// @param segment the memory segment + public VkCoarseSampleOrderCustomNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCoarseSampleOrderCustomNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCoarseSampleOrderCustomNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCoarseSampleOrderCustomNV(segment); } + + /// Creates `VkCoarseSampleOrderCustomNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCoarseSampleOrderCustomNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCoarseSampleOrderCustomNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCoarseSampleOrderCustomNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCoarseSampleOrderCustomNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCoarseSampleOrderCustomNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCoarseSampleOrderCustomNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCoarseSampleOrderCustomNV` + public static VkCoarseSampleOrderCustomNV alloc(SegmentAllocator allocator) { return new VkCoarseSampleOrderCustomNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCoarseSampleOrderCustomNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCoarseSampleOrderCustomNV` + public static VkCoarseSampleOrderCustomNV alloc(SegmentAllocator allocator, long count) { return new VkCoarseSampleOrderCustomNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `shadingRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShadingRatePaletteEntryNV") int get_shadingRate(MemorySegment segment, long index) { return (int) VH_shadingRate.get(segment, 0L, index); } + /// {@return `shadingRate`} + /// @param segment the segment of the struct + public static @CType("VkShadingRatePaletteEntryNV") int get_shadingRate(MemorySegment segment) { return VkCoarseSampleOrderCustomNV.get_shadingRate(segment, 0L); } + /// {@return `shadingRate` at the given index} + /// @param index the index + public @CType("VkShadingRatePaletteEntryNV") int shadingRateAt(long index) { return VkCoarseSampleOrderCustomNV.get_shadingRate(this.segment(), index); } + /// {@return `shadingRate`} + public @CType("VkShadingRatePaletteEntryNV") int shadingRate() { return VkCoarseSampleOrderCustomNV.get_shadingRate(this.segment()); } + /// Sets `shadingRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRate(MemorySegment segment, long index, @CType("VkShadingRatePaletteEntryNV") int value) { VH_shadingRate.set(segment, 0L, index, value); } + /// Sets `shadingRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRate(MemorySegment segment, @CType("VkShadingRatePaletteEntryNV") int value) { VkCoarseSampleOrderCustomNV.set_shadingRate(segment, 0L, value); } + /// Sets `shadingRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCoarseSampleOrderCustomNV shadingRateAt(long index, @CType("VkShadingRatePaletteEntryNV") int value) { VkCoarseSampleOrderCustomNV.set_shadingRate(this.segment(), index, value); return this; } + /// Sets `shadingRate` with the given value. + /// @param value the value + /// @return `this` + public VkCoarseSampleOrderCustomNV shadingRate(@CType("VkShadingRatePaletteEntryNV") int value) { VkCoarseSampleOrderCustomNV.set_shadingRate(this.segment(), value); return this; } + + /// {@return `sampleCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sampleCount(MemorySegment segment, long index) { return (int) VH_sampleCount.get(segment, 0L, index); } + /// {@return `sampleCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sampleCount(MemorySegment segment) { return VkCoarseSampleOrderCustomNV.get_sampleCount(segment, 0L); } + /// {@return `sampleCount` at the given index} + /// @param index the index + public @CType("uint32_t") int sampleCountAt(long index) { return VkCoarseSampleOrderCustomNV.get_sampleCount(this.segment(), index); } + /// {@return `sampleCount`} + public @CType("uint32_t") int sampleCount() { return VkCoarseSampleOrderCustomNV.get_sampleCount(this.segment()); } + /// Sets `sampleCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sampleCount.set(segment, 0L, index, value); } + /// Sets `sampleCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleCount(MemorySegment segment, @CType("uint32_t") int value) { VkCoarseSampleOrderCustomNV.set_sampleCount(segment, 0L, value); } + /// Sets `sampleCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCoarseSampleOrderCustomNV sampleCountAt(long index, @CType("uint32_t") int value) { VkCoarseSampleOrderCustomNV.set_sampleCount(this.segment(), index, value); return this; } + /// Sets `sampleCount` with the given value. + /// @param value the value + /// @return `this` + public VkCoarseSampleOrderCustomNV sampleCount(@CType("uint32_t") int value) { VkCoarseSampleOrderCustomNV.set_sampleCount(this.segment(), value); return this; } + + /// {@return `sampleLocationCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sampleLocationCount(MemorySegment segment, long index) { return (int) VH_sampleLocationCount.get(segment, 0L, index); } + /// {@return `sampleLocationCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sampleLocationCount(MemorySegment segment) { return VkCoarseSampleOrderCustomNV.get_sampleLocationCount(segment, 0L); } + /// {@return `sampleLocationCount` at the given index} + /// @param index the index + public @CType("uint32_t") int sampleLocationCountAt(long index) { return VkCoarseSampleOrderCustomNV.get_sampleLocationCount(this.segment(), index); } + /// {@return `sampleLocationCount`} + public @CType("uint32_t") int sampleLocationCount() { return VkCoarseSampleOrderCustomNV.get_sampleLocationCount(this.segment()); } + /// Sets `sampleLocationCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleLocationCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sampleLocationCount.set(segment, 0L, index, value); } + /// Sets `sampleLocationCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleLocationCount(MemorySegment segment, @CType("uint32_t") int value) { VkCoarseSampleOrderCustomNV.set_sampleLocationCount(segment, 0L, value); } + /// Sets `sampleLocationCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCoarseSampleOrderCustomNV sampleLocationCountAt(long index, @CType("uint32_t") int value) { VkCoarseSampleOrderCustomNV.set_sampleLocationCount(this.segment(), index, value); return this; } + /// Sets `sampleLocationCount` with the given value. + /// @param value the value + /// @return `this` + public VkCoarseSampleOrderCustomNV sampleLocationCount(@CType("uint32_t") int value) { VkCoarseSampleOrderCustomNV.set_sampleLocationCount(this.segment(), value); return this; } + + /// {@return `pSampleLocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkCoarseSampleLocationNV *") java.lang.foreign.MemorySegment get_pSampleLocations(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSampleLocations.get(segment, 0L, index); } + /// {@return `pSampleLocations`} + /// @param segment the segment of the struct + public static @CType("const VkCoarseSampleLocationNV *") java.lang.foreign.MemorySegment get_pSampleLocations(MemorySegment segment) { return VkCoarseSampleOrderCustomNV.get_pSampleLocations(segment, 0L); } + /// {@return `pSampleLocations` at the given index} + /// @param index the index + public @CType("const VkCoarseSampleLocationNV *") java.lang.foreign.MemorySegment pSampleLocationsAt(long index) { return VkCoarseSampleOrderCustomNV.get_pSampleLocations(this.segment(), index); } + /// {@return `pSampleLocations`} + public @CType("const VkCoarseSampleLocationNV *") java.lang.foreign.MemorySegment pSampleLocations() { return VkCoarseSampleOrderCustomNV.get_pSampleLocations(this.segment()); } + /// Sets `pSampleLocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSampleLocations(MemorySegment segment, long index, @CType("const VkCoarseSampleLocationNV *") java.lang.foreign.MemorySegment value) { VH_pSampleLocations.set(segment, 0L, index, value); } + /// Sets `pSampleLocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSampleLocations(MemorySegment segment, @CType("const VkCoarseSampleLocationNV *") java.lang.foreign.MemorySegment value) { VkCoarseSampleOrderCustomNV.set_pSampleLocations(segment, 0L, value); } + /// Sets `pSampleLocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCoarseSampleOrderCustomNV pSampleLocationsAt(long index, @CType("const VkCoarseSampleLocationNV *") java.lang.foreign.MemorySegment value) { VkCoarseSampleOrderCustomNV.set_pSampleLocations(this.segment(), index, value); return this; } + /// Sets `pSampleLocations` with the given value. + /// @param value the value + /// @return `this` + public VkCoarseSampleOrderCustomNV pSampleLocations(@CType("const VkCoarseSampleLocationNV *") java.lang.foreign.MemorySegment value) { VkCoarseSampleOrderCustomNV.set_pSampleLocations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCommandBufferInheritanceViewportScissorInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCommandBufferInheritanceViewportScissorInfoNV.java new file mode 100644 index 00000000..df1a5813 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCommandBufferInheritanceViewportScissorInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### viewportScissor2D +/// [VarHandle][#VH_viewportScissor2D] - [Getter][#viewportScissor2D()] - [Setter][#viewportScissor2D(int)] +/// ### viewportDepthCount +/// [VarHandle][#VH_viewportDepthCount] - [Getter][#viewportDepthCount()] - [Setter][#viewportDepthCount(int)] +/// ### pViewportDepths +/// [VarHandle][#VH_pViewportDepths] - [Getter][#pViewportDepths()] - [Setter][#pViewportDepths(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandBufferInheritanceViewportScissorInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 viewportScissor2D; +/// uint32_t viewportDepthCount; +/// const VkViewport * pViewportDepths; +/// } VkCommandBufferInheritanceViewportScissorInfoNV; +/// ``` +public final class VkCommandBufferInheritanceViewportScissorInfoNV extends Struct { + /// The struct layout of `VkCommandBufferInheritanceViewportScissorInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("viewportScissor2D"), + ValueLayout.JAVA_INT.withName("viewportDepthCount"), + ValueLayout.ADDRESS.withName("pViewportDepths") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `viewportScissor2D` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewportScissor2D = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewportScissor2D")); + /// The [VarHandle] of `viewportDepthCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewportDepthCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewportDepthCount")); + /// The [VarHandle] of `pViewportDepths` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pViewportDepths = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pViewportDepths")); + + /// Creates `VkCommandBufferInheritanceViewportScissorInfoNV` with the given segment. + /// @param segment the memory segment + public VkCommandBufferInheritanceViewportScissorInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandBufferInheritanceViewportScissorInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceViewportScissorInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceViewportScissorInfoNV(segment); } + + /// Creates `VkCommandBufferInheritanceViewportScissorInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceViewportScissorInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceViewportScissorInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandBufferInheritanceViewportScissorInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceViewportScissorInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceViewportScissorInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandBufferInheritanceViewportScissorInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandBufferInheritanceViewportScissorInfoNV` + public static VkCommandBufferInheritanceViewportScissorInfoNV alloc(SegmentAllocator allocator) { return new VkCommandBufferInheritanceViewportScissorInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandBufferInheritanceViewportScissorInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandBufferInheritanceViewportScissorInfoNV` + public static VkCommandBufferInheritanceViewportScissorInfoNV alloc(SegmentAllocator allocator, long count) { return new VkCommandBufferInheritanceViewportScissorInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandBufferInheritanceViewportScissorInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandBufferInheritanceViewportScissorInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandBufferInheritanceViewportScissorInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceViewportScissorInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceViewportScissorInfoNV sType(@CType("VkStructureType") int value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandBufferInheritanceViewportScissorInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandBufferInheritanceViewportScissorInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCommandBufferInheritanceViewportScissorInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceViewportScissorInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceViewportScissorInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `viewportScissor2D` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_viewportScissor2D(MemorySegment segment, long index) { return (int) VH_viewportScissor2D.get(segment, 0L, index); } + /// {@return `viewportScissor2D`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_viewportScissor2D(MemorySegment segment) { return VkCommandBufferInheritanceViewportScissorInfoNV.get_viewportScissor2D(segment, 0L); } + /// {@return `viewportScissor2D` at the given index} + /// @param index the index + public @CType("VkBool32") int viewportScissor2DAt(long index) { return VkCommandBufferInheritanceViewportScissorInfoNV.get_viewportScissor2D(this.segment(), index); } + /// {@return `viewportScissor2D`} + public @CType("VkBool32") int viewportScissor2D() { return VkCommandBufferInheritanceViewportScissorInfoNV.get_viewportScissor2D(this.segment()); } + /// Sets `viewportScissor2D` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewportScissor2D(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_viewportScissor2D.set(segment, 0L, index, value); } + /// Sets `viewportScissor2D` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewportScissor2D(MemorySegment segment, @CType("VkBool32") int value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_viewportScissor2D(segment, 0L, value); } + /// Sets `viewportScissor2D` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceViewportScissorInfoNV viewportScissor2DAt(long index, @CType("VkBool32") int value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_viewportScissor2D(this.segment(), index, value); return this; } + /// Sets `viewportScissor2D` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceViewportScissorInfoNV viewportScissor2D(@CType("VkBool32") int value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_viewportScissor2D(this.segment(), value); return this; } + + /// {@return `viewportDepthCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewportDepthCount(MemorySegment segment, long index) { return (int) VH_viewportDepthCount.get(segment, 0L, index); } + /// {@return `viewportDepthCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewportDepthCount(MemorySegment segment) { return VkCommandBufferInheritanceViewportScissorInfoNV.get_viewportDepthCount(segment, 0L); } + /// {@return `viewportDepthCount` at the given index} + /// @param index the index + public @CType("uint32_t") int viewportDepthCountAt(long index) { return VkCommandBufferInheritanceViewportScissorInfoNV.get_viewportDepthCount(this.segment(), index); } + /// {@return `viewportDepthCount`} + public @CType("uint32_t") int viewportDepthCount() { return VkCommandBufferInheritanceViewportScissorInfoNV.get_viewportDepthCount(this.segment()); } + /// Sets `viewportDepthCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewportDepthCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewportDepthCount.set(segment, 0L, index, value); } + /// Sets `viewportDepthCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewportDepthCount(MemorySegment segment, @CType("uint32_t") int value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_viewportDepthCount(segment, 0L, value); } + /// Sets `viewportDepthCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceViewportScissorInfoNV viewportDepthCountAt(long index, @CType("uint32_t") int value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_viewportDepthCount(this.segment(), index, value); return this; } + /// Sets `viewportDepthCount` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceViewportScissorInfoNV viewportDepthCount(@CType("uint32_t") int value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_viewportDepthCount(this.segment(), value); return this; } + + /// {@return `pViewportDepths` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkViewport *") java.lang.foreign.MemorySegment get_pViewportDepths(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pViewportDepths.get(segment, 0L, index); } + /// {@return `pViewportDepths`} + /// @param segment the segment of the struct + public static @CType("const VkViewport *") java.lang.foreign.MemorySegment get_pViewportDepths(MemorySegment segment) { return VkCommandBufferInheritanceViewportScissorInfoNV.get_pViewportDepths(segment, 0L); } + /// {@return `pViewportDepths` at the given index} + /// @param index the index + public @CType("const VkViewport *") java.lang.foreign.MemorySegment pViewportDepthsAt(long index) { return VkCommandBufferInheritanceViewportScissorInfoNV.get_pViewportDepths(this.segment(), index); } + /// {@return `pViewportDepths`} + public @CType("const VkViewport *") java.lang.foreign.MemorySegment pViewportDepths() { return VkCommandBufferInheritanceViewportScissorInfoNV.get_pViewportDepths(this.segment()); } + /// Sets `pViewportDepths` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pViewportDepths(MemorySegment segment, long index, @CType("const VkViewport *") java.lang.foreign.MemorySegment value) { VH_pViewportDepths.set(segment, 0L, index, value); } + /// Sets `pViewportDepths` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pViewportDepths(MemorySegment segment, @CType("const VkViewport *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_pViewportDepths(segment, 0L, value); } + /// Sets `pViewportDepths` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceViewportScissorInfoNV pViewportDepthsAt(long index, @CType("const VkViewport *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_pViewportDepths(this.segment(), index, value); return this; } + /// Sets `pViewportDepths` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceViewportScissorInfoNV pViewportDepths(@CType("const VkViewport *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceViewportScissorInfoNV.set_pViewportDepths(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkComputePipelineIndirectBufferInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkComputePipelineIndirectBufferInfoNV.java new file mode 100644 index 00000000..077ccc5e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkComputePipelineIndirectBufferInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceAddress +/// [VarHandle][#VH_deviceAddress] - [Getter][#deviceAddress()] - [Setter][#deviceAddress(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ### pipelineDeviceAddressCaptureReplay +/// [VarHandle][#VH_pipelineDeviceAddressCaptureReplay] - [Getter][#pipelineDeviceAddressCaptureReplay()] - [Setter][#pipelineDeviceAddressCaptureReplay(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkComputePipelineIndirectBufferInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceAddress deviceAddress; +/// VkDeviceSize size; +/// VkDeviceAddress pipelineDeviceAddressCaptureReplay; +/// } VkComputePipelineIndirectBufferInfoNV; +/// ``` +public final class VkComputePipelineIndirectBufferInfoNV extends Struct { + /// The struct layout of `VkComputePipelineIndirectBufferInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("deviceAddress"), + ValueLayout.JAVA_LONG.withName("size"), + ValueLayout.JAVA_LONG.withName("pipelineDeviceAddressCaptureReplay") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_deviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceAddress")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `pipelineDeviceAddressCaptureReplay` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_pipelineDeviceAddressCaptureReplay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineDeviceAddressCaptureReplay")); + + /// Creates `VkComputePipelineIndirectBufferInfoNV` with the given segment. + /// @param segment the memory segment + public VkComputePipelineIndirectBufferInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkComputePipelineIndirectBufferInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkComputePipelineIndirectBufferInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkComputePipelineIndirectBufferInfoNV(segment); } + + /// Creates `VkComputePipelineIndirectBufferInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkComputePipelineIndirectBufferInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkComputePipelineIndirectBufferInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkComputePipelineIndirectBufferInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkComputePipelineIndirectBufferInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkComputePipelineIndirectBufferInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkComputePipelineIndirectBufferInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkComputePipelineIndirectBufferInfoNV` + public static VkComputePipelineIndirectBufferInfoNV alloc(SegmentAllocator allocator) { return new VkComputePipelineIndirectBufferInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkComputePipelineIndirectBufferInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkComputePipelineIndirectBufferInfoNV` + public static VkComputePipelineIndirectBufferInfoNV alloc(SegmentAllocator allocator, long count) { return new VkComputePipelineIndirectBufferInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkComputePipelineIndirectBufferInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkComputePipelineIndirectBufferInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkComputePipelineIndirectBufferInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkComputePipelineIndirectBufferInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineIndirectBufferInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkComputePipelineIndirectBufferInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineIndirectBufferInfoNV sType(@CType("VkStructureType") int value) { VkComputePipelineIndirectBufferInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkComputePipelineIndirectBufferInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkComputePipelineIndirectBufferInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkComputePipelineIndirectBufferInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkComputePipelineIndirectBufferInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineIndirectBufferInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkComputePipelineIndirectBufferInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineIndirectBufferInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkComputePipelineIndirectBufferInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment, long index) { return (long) VH_deviceAddress.get(segment, 0L, index); } + /// {@return `deviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment) { return VkComputePipelineIndirectBufferInfoNV.get_deviceAddress(segment, 0L); } + /// {@return `deviceAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long deviceAddressAt(long index) { return VkComputePipelineIndirectBufferInfoNV.get_deviceAddress(this.segment(), index); } + /// {@return `deviceAddress`} + public @CType("VkDeviceAddress") long deviceAddress() { return VkComputePipelineIndirectBufferInfoNV.get_deviceAddress(this.segment()); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_deviceAddress.set(segment, 0L, index, value); } + /// Sets `deviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkComputePipelineIndirectBufferInfoNV.set_deviceAddress(segment, 0L, value); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineIndirectBufferInfoNV deviceAddressAt(long index, @CType("VkDeviceAddress") long value) { VkComputePipelineIndirectBufferInfoNV.set_deviceAddress(this.segment(), index, value); return this; } + /// Sets `deviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineIndirectBufferInfoNV deviceAddress(@CType("VkDeviceAddress") long value) { VkComputePipelineIndirectBufferInfoNV.set_deviceAddress(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkComputePipelineIndirectBufferInfoNV.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkComputePipelineIndirectBufferInfoNV.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkComputePipelineIndirectBufferInfoNV.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkComputePipelineIndirectBufferInfoNV.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineIndirectBufferInfoNV sizeAt(long index, @CType("VkDeviceSize") long value) { VkComputePipelineIndirectBufferInfoNV.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineIndirectBufferInfoNV size(@CType("VkDeviceSize") long value) { VkComputePipelineIndirectBufferInfoNV.set_size(this.segment(), value); return this; } + + /// {@return `pipelineDeviceAddressCaptureReplay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_pipelineDeviceAddressCaptureReplay(MemorySegment segment, long index) { return (long) VH_pipelineDeviceAddressCaptureReplay.get(segment, 0L, index); } + /// {@return `pipelineDeviceAddressCaptureReplay`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_pipelineDeviceAddressCaptureReplay(MemorySegment segment) { return VkComputePipelineIndirectBufferInfoNV.get_pipelineDeviceAddressCaptureReplay(segment, 0L); } + /// {@return `pipelineDeviceAddressCaptureReplay` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long pipelineDeviceAddressCaptureReplayAt(long index) { return VkComputePipelineIndirectBufferInfoNV.get_pipelineDeviceAddressCaptureReplay(this.segment(), index); } + /// {@return `pipelineDeviceAddressCaptureReplay`} + public @CType("VkDeviceAddress") long pipelineDeviceAddressCaptureReplay() { return VkComputePipelineIndirectBufferInfoNV.get_pipelineDeviceAddressCaptureReplay(this.segment()); } + /// Sets `pipelineDeviceAddressCaptureReplay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineDeviceAddressCaptureReplay(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_pipelineDeviceAddressCaptureReplay.set(segment, 0L, index, value); } + /// Sets `pipelineDeviceAddressCaptureReplay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineDeviceAddressCaptureReplay(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkComputePipelineIndirectBufferInfoNV.set_pipelineDeviceAddressCaptureReplay(segment, 0L, value); } + /// Sets `pipelineDeviceAddressCaptureReplay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineIndirectBufferInfoNV pipelineDeviceAddressCaptureReplayAt(long index, @CType("VkDeviceAddress") long value) { VkComputePipelineIndirectBufferInfoNV.set_pipelineDeviceAddressCaptureReplay(this.segment(), index, value); return this; } + /// Sets `pipelineDeviceAddressCaptureReplay` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineIndirectBufferInfoNV pipelineDeviceAddressCaptureReplay(@CType("VkDeviceAddress") long value) { VkComputePipelineIndirectBufferInfoNV.set_pipelineDeviceAddressCaptureReplay(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCooperativeMatrixFlexibleDimensionsPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCooperativeMatrixFlexibleDimensionsPropertiesNV.java new file mode 100644 index 00000000..a801e18e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCooperativeMatrixFlexibleDimensionsPropertiesNV.java @@ -0,0 +1,518 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### MGranularity +/// [VarHandle][#VH_MGranularity] - [Getter][#MGranularity()] - [Setter][#MGranularity(int)] +/// ### NGranularity +/// [VarHandle][#VH_NGranularity] - [Getter][#NGranularity()] - [Setter][#NGranularity(int)] +/// ### KGranularity +/// [VarHandle][#VH_KGranularity] - [Getter][#KGranularity()] - [Setter][#KGranularity(int)] +/// ### AType +/// [VarHandle][#VH_AType] - [Getter][#AType()] - [Setter][#AType(int)] +/// ### BType +/// [VarHandle][#VH_BType] - [Getter][#BType()] - [Setter][#BType(int)] +/// ### CType +/// [VarHandle][#VH_CType] - [Getter][#CType()] - [Setter][#CType(int)] +/// ### ResultType +/// [VarHandle][#VH_ResultType] - [Getter][#ResultType()] - [Setter][#ResultType(int)] +/// ### saturatingAccumulation +/// [VarHandle][#VH_saturatingAccumulation] - [Getter][#saturatingAccumulation()] - [Setter][#saturatingAccumulation(int)] +/// ### scope +/// [VarHandle][#VH_scope] - [Getter][#scope()] - [Setter][#scope(int)] +/// ### workgroupInvocations +/// [VarHandle][#VH_workgroupInvocations] - [Getter][#workgroupInvocations()] - [Setter][#workgroupInvocations(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCooperativeMatrixFlexibleDimensionsPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t MGranularity; +/// uint32_t NGranularity; +/// uint32_t KGranularity; +/// VkComponentTypeKHR AType; +/// VkComponentTypeKHR BType; +/// VkComponentTypeKHR CType; +/// VkComponentTypeKHR ResultType; +/// VkBool32 saturatingAccumulation; +/// VkScopeKHR scope; +/// uint32_t workgroupInvocations; +/// } VkCooperativeMatrixFlexibleDimensionsPropertiesNV; +/// ``` +public final class VkCooperativeMatrixFlexibleDimensionsPropertiesNV extends Struct { + /// The struct layout of `VkCooperativeMatrixFlexibleDimensionsPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("MGranularity"), + ValueLayout.JAVA_INT.withName("NGranularity"), + ValueLayout.JAVA_INT.withName("KGranularity"), + ValueLayout.JAVA_INT.withName("AType"), + ValueLayout.JAVA_INT.withName("BType"), + ValueLayout.JAVA_INT.withName("CType"), + ValueLayout.JAVA_INT.withName("ResultType"), + ValueLayout.JAVA_INT.withName("saturatingAccumulation"), + ValueLayout.JAVA_INT.withName("scope"), + ValueLayout.JAVA_INT.withName("workgroupInvocations") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `MGranularity` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_MGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("MGranularity")); + /// The [VarHandle] of `NGranularity` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_NGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("NGranularity")); + /// The [VarHandle] of `KGranularity` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_KGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("KGranularity")); + /// The [VarHandle] of `AType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_AType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("AType")); + /// The [VarHandle] of `BType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_BType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("BType")); + /// The [VarHandle] of `CType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_CType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("CType")); + /// The [VarHandle] of `ResultType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ResultType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ResultType")); + /// The [VarHandle] of `saturatingAccumulation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_saturatingAccumulation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("saturatingAccumulation")); + /// The [VarHandle] of `scope` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_scope = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scope")); + /// The [VarHandle] of `workgroupInvocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_workgroupInvocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("workgroupInvocations")); + + /// Creates `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCooperativeMatrixFlexibleDimensionsPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCooperativeMatrixFlexibleDimensionsPropertiesNV(segment); } + + /// Creates `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCooperativeMatrixFlexibleDimensionsPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCooperativeMatrixFlexibleDimensionsPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCooperativeMatrixFlexibleDimensionsPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCooperativeMatrixFlexibleDimensionsPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` + public static VkCooperativeMatrixFlexibleDimensionsPropertiesNV alloc(SegmentAllocator allocator) { return new VkCooperativeMatrixFlexibleDimensionsPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCooperativeMatrixFlexibleDimensionsPropertiesNV` + public static VkCooperativeMatrixFlexibleDimensionsPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkCooperativeMatrixFlexibleDimensionsPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV sType(@CType("VkStructureType") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `MGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_MGranularity(MemorySegment segment, long index) { return (int) VH_MGranularity.get(segment, 0L, index); } + /// {@return `MGranularity`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_MGranularity(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_MGranularity(segment, 0L); } + /// {@return `MGranularity` at the given index} + /// @param index the index + public @CType("uint32_t") int MGranularityAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_MGranularity(this.segment(), index); } + /// {@return `MGranularity`} + public @CType("uint32_t") int MGranularity() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_MGranularity(this.segment()); } + /// Sets `MGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_MGranularity(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_MGranularity.set(segment, 0L, index, value); } + /// Sets `MGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_MGranularity(MemorySegment segment, @CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_MGranularity(segment, 0L, value); } + /// Sets `MGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV MGranularityAt(long index, @CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_MGranularity(this.segment(), index, value); return this; } + /// Sets `MGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV MGranularity(@CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_MGranularity(this.segment(), value); return this; } + + /// {@return `NGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_NGranularity(MemorySegment segment, long index) { return (int) VH_NGranularity.get(segment, 0L, index); } + /// {@return `NGranularity`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_NGranularity(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_NGranularity(segment, 0L); } + /// {@return `NGranularity` at the given index} + /// @param index the index + public @CType("uint32_t") int NGranularityAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_NGranularity(this.segment(), index); } + /// {@return `NGranularity`} + public @CType("uint32_t") int NGranularity() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_NGranularity(this.segment()); } + /// Sets `NGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_NGranularity(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_NGranularity.set(segment, 0L, index, value); } + /// Sets `NGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_NGranularity(MemorySegment segment, @CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_NGranularity(segment, 0L, value); } + /// Sets `NGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV NGranularityAt(long index, @CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_NGranularity(this.segment(), index, value); return this; } + /// Sets `NGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV NGranularity(@CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_NGranularity(this.segment(), value); return this; } + + /// {@return `KGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_KGranularity(MemorySegment segment, long index) { return (int) VH_KGranularity.get(segment, 0L, index); } + /// {@return `KGranularity`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_KGranularity(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_KGranularity(segment, 0L); } + /// {@return `KGranularity` at the given index} + /// @param index the index + public @CType("uint32_t") int KGranularityAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_KGranularity(this.segment(), index); } + /// {@return `KGranularity`} + public @CType("uint32_t") int KGranularity() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_KGranularity(this.segment()); } + /// Sets `KGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_KGranularity(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_KGranularity.set(segment, 0L, index, value); } + /// Sets `KGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_KGranularity(MemorySegment segment, @CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_KGranularity(segment, 0L, value); } + /// Sets `KGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV KGranularityAt(long index, @CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_KGranularity(this.segment(), index, value); return this; } + /// Sets `KGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV KGranularity(@CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_KGranularity(this.segment(), value); return this; } + + /// {@return `AType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeKHR") int get_AType(MemorySegment segment, long index) { return (int) VH_AType.get(segment, 0L, index); } + /// {@return `AType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeKHR") int get_AType(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_AType(segment, 0L); } + /// {@return `AType` at the given index} + /// @param index the index + public @CType("VkComponentTypeKHR") int ATypeAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_AType(this.segment(), index); } + /// {@return `AType`} + public @CType("VkComponentTypeKHR") int AType() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_AType(this.segment()); } + /// Sets `AType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_AType(MemorySegment segment, long index, @CType("VkComponentTypeKHR") int value) { VH_AType.set(segment, 0L, index, value); } + /// Sets `AType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_AType(MemorySegment segment, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_AType(segment, 0L, value); } + /// Sets `AType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV ATypeAt(long index, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_AType(this.segment(), index, value); return this; } + /// Sets `AType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV AType(@CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_AType(this.segment(), value); return this; } + + /// {@return `BType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeKHR") int get_BType(MemorySegment segment, long index) { return (int) VH_BType.get(segment, 0L, index); } + /// {@return `BType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeKHR") int get_BType(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_BType(segment, 0L); } + /// {@return `BType` at the given index} + /// @param index the index + public @CType("VkComponentTypeKHR") int BTypeAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_BType(this.segment(), index); } + /// {@return `BType`} + public @CType("VkComponentTypeKHR") int BType() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_BType(this.segment()); } + /// Sets `BType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_BType(MemorySegment segment, long index, @CType("VkComponentTypeKHR") int value) { VH_BType.set(segment, 0L, index, value); } + /// Sets `BType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_BType(MemorySegment segment, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_BType(segment, 0L, value); } + /// Sets `BType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV BTypeAt(long index, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_BType(this.segment(), index, value); return this; } + /// Sets `BType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV BType(@CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_BType(this.segment(), value); return this; } + + /// {@return `CType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeKHR") int get_CType(MemorySegment segment, long index) { return (int) VH_CType.get(segment, 0L, index); } + /// {@return `CType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeKHR") int get_CType(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_CType(segment, 0L); } + /// {@return `CType` at the given index} + /// @param index the index + public @CType("VkComponentTypeKHR") int CTypeAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_CType(this.segment(), index); } + /// {@return `CType`} + public @CType("VkComponentTypeKHR") int CType() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_CType(this.segment()); } + /// Sets `CType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_CType(MemorySegment segment, long index, @CType("VkComponentTypeKHR") int value) { VH_CType.set(segment, 0L, index, value); } + /// Sets `CType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_CType(MemorySegment segment, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_CType(segment, 0L, value); } + /// Sets `CType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV CTypeAt(long index, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_CType(this.segment(), index, value); return this; } + /// Sets `CType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV CType(@CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_CType(this.segment(), value); return this; } + + /// {@return `ResultType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeKHR") int get_ResultType(MemorySegment segment, long index) { return (int) VH_ResultType.get(segment, 0L, index); } + /// {@return `ResultType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeKHR") int get_ResultType(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_ResultType(segment, 0L); } + /// {@return `ResultType` at the given index} + /// @param index the index + public @CType("VkComponentTypeKHR") int ResultTypeAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_ResultType(this.segment(), index); } + /// {@return `ResultType`} + public @CType("VkComponentTypeKHR") int ResultType() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_ResultType(this.segment()); } + /// Sets `ResultType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ResultType(MemorySegment segment, long index, @CType("VkComponentTypeKHR") int value) { VH_ResultType.set(segment, 0L, index, value); } + /// Sets `ResultType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ResultType(MemorySegment segment, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_ResultType(segment, 0L, value); } + /// Sets `ResultType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV ResultTypeAt(long index, @CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_ResultType(this.segment(), index, value); return this; } + /// Sets `ResultType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV ResultType(@CType("VkComponentTypeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_ResultType(this.segment(), value); return this; } + + /// {@return `saturatingAccumulation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_saturatingAccumulation(MemorySegment segment, long index) { return (int) VH_saturatingAccumulation.get(segment, 0L, index); } + /// {@return `saturatingAccumulation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_saturatingAccumulation(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_saturatingAccumulation(segment, 0L); } + /// {@return `saturatingAccumulation` at the given index} + /// @param index the index + public @CType("VkBool32") int saturatingAccumulationAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_saturatingAccumulation(this.segment(), index); } + /// {@return `saturatingAccumulation`} + public @CType("VkBool32") int saturatingAccumulation() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_saturatingAccumulation(this.segment()); } + /// Sets `saturatingAccumulation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_saturatingAccumulation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_saturatingAccumulation.set(segment, 0L, index, value); } + /// Sets `saturatingAccumulation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_saturatingAccumulation(MemorySegment segment, @CType("VkBool32") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_saturatingAccumulation(segment, 0L, value); } + /// Sets `saturatingAccumulation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV saturatingAccumulationAt(long index, @CType("VkBool32") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_saturatingAccumulation(this.segment(), index, value); return this; } + /// Sets `saturatingAccumulation` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV saturatingAccumulation(@CType("VkBool32") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_saturatingAccumulation(this.segment(), value); return this; } + + /// {@return `scope` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkScopeKHR") int get_scope(MemorySegment segment, long index) { return (int) VH_scope.get(segment, 0L, index); } + /// {@return `scope`} + /// @param segment the segment of the struct + public static @CType("VkScopeKHR") int get_scope(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_scope(segment, 0L); } + /// {@return `scope` at the given index} + /// @param index the index + public @CType("VkScopeKHR") int scopeAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_scope(this.segment(), index); } + /// {@return `scope`} + public @CType("VkScopeKHR") int scope() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_scope(this.segment()); } + /// Sets `scope` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scope(MemorySegment segment, long index, @CType("VkScopeKHR") int value) { VH_scope.set(segment, 0L, index, value); } + /// Sets `scope` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scope(MemorySegment segment, @CType("VkScopeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_scope(segment, 0L, value); } + /// Sets `scope` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV scopeAt(long index, @CType("VkScopeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_scope(this.segment(), index, value); return this; } + /// Sets `scope` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV scope(@CType("VkScopeKHR") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_scope(this.segment(), value); return this; } + + /// {@return `workgroupInvocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_workgroupInvocations(MemorySegment segment, long index) { return (int) VH_workgroupInvocations.get(segment, 0L, index); } + /// {@return `workgroupInvocations`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_workgroupInvocations(MemorySegment segment) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_workgroupInvocations(segment, 0L); } + /// {@return `workgroupInvocations` at the given index} + /// @param index the index + public @CType("uint32_t") int workgroupInvocationsAt(long index) { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_workgroupInvocations(this.segment(), index); } + /// {@return `workgroupInvocations`} + public @CType("uint32_t") int workgroupInvocations() { return VkCooperativeMatrixFlexibleDimensionsPropertiesNV.get_workgroupInvocations(this.segment()); } + /// Sets `workgroupInvocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_workgroupInvocations(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_workgroupInvocations.set(segment, 0L, index, value); } + /// Sets `workgroupInvocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_workgroupInvocations(MemorySegment segment, @CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_workgroupInvocations(segment, 0L, value); } + /// Sets `workgroupInvocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV workgroupInvocationsAt(long index, @CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_workgroupInvocations(this.segment(), index, value); return this; } + /// Sets `workgroupInvocations` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixFlexibleDimensionsPropertiesNV workgroupInvocations(@CType("uint32_t") int value) { VkCooperativeMatrixFlexibleDimensionsPropertiesNV.set_workgroupInvocations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCooperativeMatrixPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCooperativeMatrixPropertiesNV.java new file mode 100644 index 00000000..c55459d1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCooperativeMatrixPropertiesNV.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### MSize +/// [VarHandle][#VH_MSize] - [Getter][#MSize()] - [Setter][#MSize(int)] +/// ### NSize +/// [VarHandle][#VH_NSize] - [Getter][#NSize()] - [Setter][#NSize(int)] +/// ### KSize +/// [VarHandle][#VH_KSize] - [Getter][#KSize()] - [Setter][#KSize(int)] +/// ### AType +/// [VarHandle][#VH_AType] - [Getter][#AType()] - [Setter][#AType(int)] +/// ### BType +/// [VarHandle][#VH_BType] - [Getter][#BType()] - [Setter][#BType(int)] +/// ### CType +/// [VarHandle][#VH_CType] - [Getter][#CType()] - [Setter][#CType(int)] +/// ### DType +/// [VarHandle][#VH_DType] - [Getter][#DType()] - [Setter][#DType(int)] +/// ### scope +/// [VarHandle][#VH_scope] - [Getter][#scope()] - [Setter][#scope(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCooperativeMatrixPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t MSize; +/// uint32_t NSize; +/// uint32_t KSize; +/// VkComponentTypeNV AType; +/// VkComponentTypeNV BType; +/// VkComponentTypeNV CType; +/// VkComponentTypeNV DType; +/// VkScopeNV scope; +/// } VkCooperativeMatrixPropertiesNV; +/// ``` +public final class VkCooperativeMatrixPropertiesNV extends Struct { + /// The struct layout of `VkCooperativeMatrixPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("MSize"), + ValueLayout.JAVA_INT.withName("NSize"), + ValueLayout.JAVA_INT.withName("KSize"), + ValueLayout.JAVA_INT.withName("AType"), + ValueLayout.JAVA_INT.withName("BType"), + ValueLayout.JAVA_INT.withName("CType"), + ValueLayout.JAVA_INT.withName("DType"), + ValueLayout.JAVA_INT.withName("scope") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `MSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_MSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("MSize")); + /// The [VarHandle] of `NSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_NSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("NSize")); + /// The [VarHandle] of `KSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_KSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("KSize")); + /// The [VarHandle] of `AType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_AType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("AType")); + /// The [VarHandle] of `BType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_BType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("BType")); + /// The [VarHandle] of `CType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_CType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("CType")); + /// The [VarHandle] of `DType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_DType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("DType")); + /// The [VarHandle] of `scope` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_scope = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scope")); + + /// Creates `VkCooperativeMatrixPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkCooperativeMatrixPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCooperativeMatrixPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCooperativeMatrixPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCooperativeMatrixPropertiesNV(segment); } + + /// Creates `VkCooperativeMatrixPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCooperativeMatrixPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCooperativeMatrixPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCooperativeMatrixPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCooperativeMatrixPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCooperativeMatrixPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCooperativeMatrixPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCooperativeMatrixPropertiesNV` + public static VkCooperativeMatrixPropertiesNV alloc(SegmentAllocator allocator) { return new VkCooperativeMatrixPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCooperativeMatrixPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCooperativeMatrixPropertiesNV` + public static VkCooperativeMatrixPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkCooperativeMatrixPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCooperativeMatrixPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCooperativeMatrixPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCooperativeMatrixPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCooperativeMatrixPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkCooperativeMatrixPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV sType(@CType("VkStructureType") int value) { VkCooperativeMatrixPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCooperativeMatrixPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCooperativeMatrixPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkCooperativeMatrixPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkCooperativeMatrixPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkCooperativeMatrixPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkCooperativeMatrixPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `MSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_MSize(MemorySegment segment, long index) { return (int) VH_MSize.get(segment, 0L, index); } + /// {@return `MSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_MSize(MemorySegment segment) { return VkCooperativeMatrixPropertiesNV.get_MSize(segment, 0L); } + /// {@return `MSize` at the given index} + /// @param index the index + public @CType("uint32_t") int MSizeAt(long index) { return VkCooperativeMatrixPropertiesNV.get_MSize(this.segment(), index); } + /// {@return `MSize`} + public @CType("uint32_t") int MSize() { return VkCooperativeMatrixPropertiesNV.get_MSize(this.segment()); } + /// Sets `MSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_MSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_MSize.set(segment, 0L, index, value); } + /// Sets `MSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_MSize(MemorySegment segment, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesNV.set_MSize(segment, 0L, value); } + /// Sets `MSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV MSizeAt(long index, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesNV.set_MSize(this.segment(), index, value); return this; } + /// Sets `MSize` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV MSize(@CType("uint32_t") int value) { VkCooperativeMatrixPropertiesNV.set_MSize(this.segment(), value); return this; } + + /// {@return `NSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_NSize(MemorySegment segment, long index) { return (int) VH_NSize.get(segment, 0L, index); } + /// {@return `NSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_NSize(MemorySegment segment) { return VkCooperativeMatrixPropertiesNV.get_NSize(segment, 0L); } + /// {@return `NSize` at the given index} + /// @param index the index + public @CType("uint32_t") int NSizeAt(long index) { return VkCooperativeMatrixPropertiesNV.get_NSize(this.segment(), index); } + /// {@return `NSize`} + public @CType("uint32_t") int NSize() { return VkCooperativeMatrixPropertiesNV.get_NSize(this.segment()); } + /// Sets `NSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_NSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_NSize.set(segment, 0L, index, value); } + /// Sets `NSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_NSize(MemorySegment segment, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesNV.set_NSize(segment, 0L, value); } + /// Sets `NSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV NSizeAt(long index, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesNV.set_NSize(this.segment(), index, value); return this; } + /// Sets `NSize` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV NSize(@CType("uint32_t") int value) { VkCooperativeMatrixPropertiesNV.set_NSize(this.segment(), value); return this; } + + /// {@return `KSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_KSize(MemorySegment segment, long index) { return (int) VH_KSize.get(segment, 0L, index); } + /// {@return `KSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_KSize(MemorySegment segment) { return VkCooperativeMatrixPropertiesNV.get_KSize(segment, 0L); } + /// {@return `KSize` at the given index} + /// @param index the index + public @CType("uint32_t") int KSizeAt(long index) { return VkCooperativeMatrixPropertiesNV.get_KSize(this.segment(), index); } + /// {@return `KSize`} + public @CType("uint32_t") int KSize() { return VkCooperativeMatrixPropertiesNV.get_KSize(this.segment()); } + /// Sets `KSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_KSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_KSize.set(segment, 0L, index, value); } + /// Sets `KSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_KSize(MemorySegment segment, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesNV.set_KSize(segment, 0L, value); } + /// Sets `KSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV KSizeAt(long index, @CType("uint32_t") int value) { VkCooperativeMatrixPropertiesNV.set_KSize(this.segment(), index, value); return this; } + /// Sets `KSize` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV KSize(@CType("uint32_t") int value) { VkCooperativeMatrixPropertiesNV.set_KSize(this.segment(), value); return this; } + + /// {@return `AType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeNV") int get_AType(MemorySegment segment, long index) { return (int) VH_AType.get(segment, 0L, index); } + /// {@return `AType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeNV") int get_AType(MemorySegment segment) { return VkCooperativeMatrixPropertiesNV.get_AType(segment, 0L); } + /// {@return `AType` at the given index} + /// @param index the index + public @CType("VkComponentTypeNV") int ATypeAt(long index) { return VkCooperativeMatrixPropertiesNV.get_AType(this.segment(), index); } + /// {@return `AType`} + public @CType("VkComponentTypeNV") int AType() { return VkCooperativeMatrixPropertiesNV.get_AType(this.segment()); } + /// Sets `AType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_AType(MemorySegment segment, long index, @CType("VkComponentTypeNV") int value) { VH_AType.set(segment, 0L, index, value); } + /// Sets `AType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_AType(MemorySegment segment, @CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_AType(segment, 0L, value); } + /// Sets `AType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV ATypeAt(long index, @CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_AType(this.segment(), index, value); return this; } + /// Sets `AType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV AType(@CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_AType(this.segment(), value); return this; } + + /// {@return `BType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeNV") int get_BType(MemorySegment segment, long index) { return (int) VH_BType.get(segment, 0L, index); } + /// {@return `BType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeNV") int get_BType(MemorySegment segment) { return VkCooperativeMatrixPropertiesNV.get_BType(segment, 0L); } + /// {@return `BType` at the given index} + /// @param index the index + public @CType("VkComponentTypeNV") int BTypeAt(long index) { return VkCooperativeMatrixPropertiesNV.get_BType(this.segment(), index); } + /// {@return `BType`} + public @CType("VkComponentTypeNV") int BType() { return VkCooperativeMatrixPropertiesNV.get_BType(this.segment()); } + /// Sets `BType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_BType(MemorySegment segment, long index, @CType("VkComponentTypeNV") int value) { VH_BType.set(segment, 0L, index, value); } + /// Sets `BType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_BType(MemorySegment segment, @CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_BType(segment, 0L, value); } + /// Sets `BType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV BTypeAt(long index, @CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_BType(this.segment(), index, value); return this; } + /// Sets `BType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV BType(@CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_BType(this.segment(), value); return this; } + + /// {@return `CType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeNV") int get_CType(MemorySegment segment, long index) { return (int) VH_CType.get(segment, 0L, index); } + /// {@return `CType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeNV") int get_CType(MemorySegment segment) { return VkCooperativeMatrixPropertiesNV.get_CType(segment, 0L); } + /// {@return `CType` at the given index} + /// @param index the index + public @CType("VkComponentTypeNV") int CTypeAt(long index) { return VkCooperativeMatrixPropertiesNV.get_CType(this.segment(), index); } + /// {@return `CType`} + public @CType("VkComponentTypeNV") int CType() { return VkCooperativeMatrixPropertiesNV.get_CType(this.segment()); } + /// Sets `CType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_CType(MemorySegment segment, long index, @CType("VkComponentTypeNV") int value) { VH_CType.set(segment, 0L, index, value); } + /// Sets `CType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_CType(MemorySegment segment, @CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_CType(segment, 0L, value); } + /// Sets `CType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV CTypeAt(long index, @CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_CType(this.segment(), index, value); return this; } + /// Sets `CType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV CType(@CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_CType(this.segment(), value); return this; } + + /// {@return `DType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentTypeNV") int get_DType(MemorySegment segment, long index) { return (int) VH_DType.get(segment, 0L, index); } + /// {@return `DType`} + /// @param segment the segment of the struct + public static @CType("VkComponentTypeNV") int get_DType(MemorySegment segment) { return VkCooperativeMatrixPropertiesNV.get_DType(segment, 0L); } + /// {@return `DType` at the given index} + /// @param index the index + public @CType("VkComponentTypeNV") int DTypeAt(long index) { return VkCooperativeMatrixPropertiesNV.get_DType(this.segment(), index); } + /// {@return `DType`} + public @CType("VkComponentTypeNV") int DType() { return VkCooperativeMatrixPropertiesNV.get_DType(this.segment()); } + /// Sets `DType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_DType(MemorySegment segment, long index, @CType("VkComponentTypeNV") int value) { VH_DType.set(segment, 0L, index, value); } + /// Sets `DType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_DType(MemorySegment segment, @CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_DType(segment, 0L, value); } + /// Sets `DType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV DTypeAt(long index, @CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_DType(this.segment(), index, value); return this; } + /// Sets `DType` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV DType(@CType("VkComponentTypeNV") int value) { VkCooperativeMatrixPropertiesNV.set_DType(this.segment(), value); return this; } + + /// {@return `scope` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkScopeNV") int get_scope(MemorySegment segment, long index) { return (int) VH_scope.get(segment, 0L, index); } + /// {@return `scope`} + /// @param segment the segment of the struct + public static @CType("VkScopeNV") int get_scope(MemorySegment segment) { return VkCooperativeMatrixPropertiesNV.get_scope(segment, 0L); } + /// {@return `scope` at the given index} + /// @param index the index + public @CType("VkScopeNV") int scopeAt(long index) { return VkCooperativeMatrixPropertiesNV.get_scope(this.segment(), index); } + /// {@return `scope`} + public @CType("VkScopeNV") int scope() { return VkCooperativeMatrixPropertiesNV.get_scope(this.segment()); } + /// Sets `scope` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scope(MemorySegment segment, long index, @CType("VkScopeNV") int value) { VH_scope.set(segment, 0L, index, value); } + /// Sets `scope` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scope(MemorySegment segment, @CType("VkScopeNV") int value) { VkCooperativeMatrixPropertiesNV.set_scope(segment, 0L, value); } + /// Sets `scope` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV scopeAt(long index, @CType("VkScopeNV") int value) { VkCooperativeMatrixPropertiesNV.set_scope(this.segment(), index, value); return this; } + /// Sets `scope` with the given value. + /// @param value the value + /// @return `this` + public VkCooperativeMatrixPropertiesNV scope(@CType("VkScopeNV") int value) { VkCooperativeMatrixPropertiesNV.set_scope(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCopyMemoryIndirectCommandNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCopyMemoryIndirectCommandNV.java new file mode 100644 index 00000000..14f31418 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCopyMemoryIndirectCommandNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### srcAddress +/// [VarHandle][#VH_srcAddress] - [Getter][#srcAddress()] - [Setter][#srcAddress(long)] +/// ### dstAddress +/// [VarHandle][#VH_dstAddress] - [Getter][#dstAddress()] - [Setter][#dstAddress(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyMemoryIndirectCommandNV { +/// VkDeviceAddress srcAddress; +/// VkDeviceAddress dstAddress; +/// VkDeviceSize size; +/// } VkCopyMemoryIndirectCommandNV; +/// ``` +public final class VkCopyMemoryIndirectCommandNV extends Struct { + /// The struct layout of `VkCopyMemoryIndirectCommandNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("srcAddress"), + ValueLayout.JAVA_LONG.withName("dstAddress"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `srcAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAddress")); + /// The [VarHandle] of `dstAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAddress")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkCopyMemoryIndirectCommandNV` with the given segment. + /// @param segment the memory segment + public VkCopyMemoryIndirectCommandNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyMemoryIndirectCommandNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryIndirectCommandNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryIndirectCommandNV(segment); } + + /// Creates `VkCopyMemoryIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryIndirectCommandNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyMemoryIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryIndirectCommandNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyMemoryIndirectCommandNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyMemoryIndirectCommandNV` + public static VkCopyMemoryIndirectCommandNV alloc(SegmentAllocator allocator) { return new VkCopyMemoryIndirectCommandNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyMemoryIndirectCommandNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyMemoryIndirectCommandNV` + public static VkCopyMemoryIndirectCommandNV alloc(SegmentAllocator allocator, long count) { return new VkCopyMemoryIndirectCommandNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `srcAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_srcAddress(MemorySegment segment, long index) { return (long) VH_srcAddress.get(segment, 0L, index); } + /// {@return `srcAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_srcAddress(MemorySegment segment) { return VkCopyMemoryIndirectCommandNV.get_srcAddress(segment, 0L); } + /// {@return `srcAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long srcAddressAt(long index) { return VkCopyMemoryIndirectCommandNV.get_srcAddress(this.segment(), index); } + /// {@return `srcAddress`} + public @CType("VkDeviceAddress") long srcAddress() { return VkCopyMemoryIndirectCommandNV.get_srcAddress(this.segment()); } + /// Sets `srcAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_srcAddress.set(segment, 0L, index, value); } + /// Sets `srcAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkCopyMemoryIndirectCommandNV.set_srcAddress(segment, 0L, value); } + /// Sets `srcAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryIndirectCommandNV srcAddressAt(long index, @CType("VkDeviceAddress") long value) { VkCopyMemoryIndirectCommandNV.set_srcAddress(this.segment(), index, value); return this; } + /// Sets `srcAddress` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryIndirectCommandNV srcAddress(@CType("VkDeviceAddress") long value) { VkCopyMemoryIndirectCommandNV.set_srcAddress(this.segment(), value); return this; } + + /// {@return `dstAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_dstAddress(MemorySegment segment, long index) { return (long) VH_dstAddress.get(segment, 0L, index); } + /// {@return `dstAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_dstAddress(MemorySegment segment) { return VkCopyMemoryIndirectCommandNV.get_dstAddress(segment, 0L); } + /// {@return `dstAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long dstAddressAt(long index) { return VkCopyMemoryIndirectCommandNV.get_dstAddress(this.segment(), index); } + /// {@return `dstAddress`} + public @CType("VkDeviceAddress") long dstAddress() { return VkCopyMemoryIndirectCommandNV.get_dstAddress(this.segment()); } + /// Sets `dstAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_dstAddress.set(segment, 0L, index, value); } + /// Sets `dstAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkCopyMemoryIndirectCommandNV.set_dstAddress(segment, 0L, value); } + /// Sets `dstAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryIndirectCommandNV dstAddressAt(long index, @CType("VkDeviceAddress") long value) { VkCopyMemoryIndirectCommandNV.set_dstAddress(this.segment(), index, value); return this; } + /// Sets `dstAddress` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryIndirectCommandNV dstAddress(@CType("VkDeviceAddress") long value) { VkCopyMemoryIndirectCommandNV.set_dstAddress(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkCopyMemoryIndirectCommandNV.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkCopyMemoryIndirectCommandNV.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkCopyMemoryIndirectCommandNV.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkCopyMemoryIndirectCommandNV.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryIndirectCommandNV sizeAt(long index, @CType("VkDeviceSize") long value) { VkCopyMemoryIndirectCommandNV.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryIndirectCommandNV size(@CType("VkDeviceSize") long value) { VkCopyMemoryIndirectCommandNV.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCopyMemoryToImageIndirectCommandNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCopyMemoryToImageIndirectCommandNV.java new file mode 100644 index 00000000..1da48674 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCopyMemoryToImageIndirectCommandNV.java @@ -0,0 +1,302 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### srcAddress +/// [VarHandle][#VH_srcAddress] - [Getter][#srcAddress()] - [Setter][#srcAddress(long)] +/// ### bufferRowLength +/// [VarHandle][#VH_bufferRowLength] - [Getter][#bufferRowLength()] - [Setter][#bufferRowLength(int)] +/// ### bufferImageHeight +/// [VarHandle][#VH_bufferImageHeight] - [Getter][#bufferImageHeight()] - [Setter][#bufferImageHeight(int)] +/// ### imageSubresource +/// [Byte offset][#OFFSET_imageSubresource] - [Memory layout][#ML_imageSubresource] - [Getter][#imageSubresource()] - [Setter][#imageSubresource(java.lang.foreign.MemorySegment)] +/// ### imageOffset +/// [Byte offset][#OFFSET_imageOffset] - [Memory layout][#ML_imageOffset] - [Getter][#imageOffset()] - [Setter][#imageOffset(java.lang.foreign.MemorySegment)] +/// ### imageExtent +/// [Byte offset][#OFFSET_imageExtent] - [Memory layout][#ML_imageExtent] - [Getter][#imageExtent()] - [Setter][#imageExtent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyMemoryToImageIndirectCommandNV { +/// VkDeviceAddress srcAddress; +/// uint32_t bufferRowLength; +/// uint32_t bufferImageHeight; +/// VkImageSubresourceLayers imageSubresource; +/// VkOffset3D imageOffset; +/// VkExtent3D imageExtent; +/// } VkCopyMemoryToImageIndirectCommandNV; +/// ``` +public final class VkCopyMemoryToImageIndirectCommandNV extends Struct { + /// The struct layout of `VkCopyMemoryToImageIndirectCommandNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("srcAddress"), + ValueLayout.JAVA_INT.withName("bufferRowLength"), + ValueLayout.JAVA_INT.withName("bufferImageHeight"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("imageSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("imageOffset"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("imageExtent") + ); + /// The [VarHandle] of `srcAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAddress")); + /// The [VarHandle] of `bufferRowLength` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferRowLength = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferRowLength")); + /// The [VarHandle] of `bufferImageHeight` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferImageHeight = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferImageHeight")); + /// The byte offset of `imageSubresource`. + public static final long OFFSET_imageSubresource = LAYOUT.byteOffset(PathElement.groupElement("imageSubresource")); + /// The memory layout of `imageSubresource`. + public static final MemoryLayout ML_imageSubresource = LAYOUT.select(PathElement.groupElement("imageSubresource")); + /// The byte offset of `imageOffset`. + public static final long OFFSET_imageOffset = LAYOUT.byteOffset(PathElement.groupElement("imageOffset")); + /// The memory layout of `imageOffset`. + public static final MemoryLayout ML_imageOffset = LAYOUT.select(PathElement.groupElement("imageOffset")); + /// The byte offset of `imageExtent`. + public static final long OFFSET_imageExtent = LAYOUT.byteOffset(PathElement.groupElement("imageExtent")); + /// The memory layout of `imageExtent`. + public static final MemoryLayout ML_imageExtent = LAYOUT.select(PathElement.groupElement("imageExtent")); + + /// Creates `VkCopyMemoryToImageIndirectCommandNV` with the given segment. + /// @param segment the memory segment + public VkCopyMemoryToImageIndirectCommandNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyMemoryToImageIndirectCommandNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToImageIndirectCommandNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToImageIndirectCommandNV(segment); } + + /// Creates `VkCopyMemoryToImageIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToImageIndirectCommandNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToImageIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyMemoryToImageIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToImageIndirectCommandNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToImageIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyMemoryToImageIndirectCommandNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyMemoryToImageIndirectCommandNV` + public static VkCopyMemoryToImageIndirectCommandNV alloc(SegmentAllocator allocator) { return new VkCopyMemoryToImageIndirectCommandNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyMemoryToImageIndirectCommandNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyMemoryToImageIndirectCommandNV` + public static VkCopyMemoryToImageIndirectCommandNV alloc(SegmentAllocator allocator, long count) { return new VkCopyMemoryToImageIndirectCommandNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `srcAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_srcAddress(MemorySegment segment, long index) { return (long) VH_srcAddress.get(segment, 0L, index); } + /// {@return `srcAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_srcAddress(MemorySegment segment) { return VkCopyMemoryToImageIndirectCommandNV.get_srcAddress(segment, 0L); } + /// {@return `srcAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long srcAddressAt(long index) { return VkCopyMemoryToImageIndirectCommandNV.get_srcAddress(this.segment(), index); } + /// {@return `srcAddress`} + public @CType("VkDeviceAddress") long srcAddress() { return VkCopyMemoryToImageIndirectCommandNV.get_srcAddress(this.segment()); } + /// Sets `srcAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_srcAddress.set(segment, 0L, index, value); } + /// Sets `srcAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkCopyMemoryToImageIndirectCommandNV.set_srcAddress(segment, 0L, value); } + /// Sets `srcAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV srcAddressAt(long index, @CType("VkDeviceAddress") long value) { VkCopyMemoryToImageIndirectCommandNV.set_srcAddress(this.segment(), index, value); return this; } + /// Sets `srcAddress` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV srcAddress(@CType("VkDeviceAddress") long value) { VkCopyMemoryToImageIndirectCommandNV.set_srcAddress(this.segment(), value); return this; } + + /// {@return `bufferRowLength` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferRowLength(MemorySegment segment, long index) { return (int) VH_bufferRowLength.get(segment, 0L, index); } + /// {@return `bufferRowLength`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferRowLength(MemorySegment segment) { return VkCopyMemoryToImageIndirectCommandNV.get_bufferRowLength(segment, 0L); } + /// {@return `bufferRowLength` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferRowLengthAt(long index) { return VkCopyMemoryToImageIndirectCommandNV.get_bufferRowLength(this.segment(), index); } + /// {@return `bufferRowLength`} + public @CType("uint32_t") int bufferRowLength() { return VkCopyMemoryToImageIndirectCommandNV.get_bufferRowLength(this.segment()); } + /// Sets `bufferRowLength` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferRowLength(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferRowLength.set(segment, 0L, index, value); } + /// Sets `bufferRowLength` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferRowLength(MemorySegment segment, @CType("uint32_t") int value) { VkCopyMemoryToImageIndirectCommandNV.set_bufferRowLength(segment, 0L, value); } + /// Sets `bufferRowLength` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV bufferRowLengthAt(long index, @CType("uint32_t") int value) { VkCopyMemoryToImageIndirectCommandNV.set_bufferRowLength(this.segment(), index, value); return this; } + /// Sets `bufferRowLength` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV bufferRowLength(@CType("uint32_t") int value) { VkCopyMemoryToImageIndirectCommandNV.set_bufferRowLength(this.segment(), value); return this; } + + /// {@return `bufferImageHeight` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferImageHeight(MemorySegment segment, long index) { return (int) VH_bufferImageHeight.get(segment, 0L, index); } + /// {@return `bufferImageHeight`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferImageHeight(MemorySegment segment) { return VkCopyMemoryToImageIndirectCommandNV.get_bufferImageHeight(segment, 0L); } + /// {@return `bufferImageHeight` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferImageHeightAt(long index) { return VkCopyMemoryToImageIndirectCommandNV.get_bufferImageHeight(this.segment(), index); } + /// {@return `bufferImageHeight`} + public @CType("uint32_t") int bufferImageHeight() { return VkCopyMemoryToImageIndirectCommandNV.get_bufferImageHeight(this.segment()); } + /// Sets `bufferImageHeight` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferImageHeight(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferImageHeight.set(segment, 0L, index, value); } + /// Sets `bufferImageHeight` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferImageHeight(MemorySegment segment, @CType("uint32_t") int value) { VkCopyMemoryToImageIndirectCommandNV.set_bufferImageHeight(segment, 0L, value); } + /// Sets `bufferImageHeight` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV bufferImageHeightAt(long index, @CType("uint32_t") int value) { VkCopyMemoryToImageIndirectCommandNV.set_bufferImageHeight(this.segment(), index, value); return this; } + /// Sets `bufferImageHeight` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV bufferImageHeight(@CType("uint32_t") int value) { VkCopyMemoryToImageIndirectCommandNV.set_bufferImageHeight(this.segment(), value); return this; } + + /// {@return `imageSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource); } + /// {@return `imageSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment) { return VkCopyMemoryToImageIndirectCommandNV.get_imageSubresource(segment, 0L); } + /// {@return `imageSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment imageSubresourceAt(long index) { return VkCopyMemoryToImageIndirectCommandNV.get_imageSubresource(this.segment(), index); } + /// {@return `imageSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment imageSubresource() { return VkCopyMemoryToImageIndirectCommandNV.get_imageSubresource(this.segment()); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource.byteSize()); } + /// Sets `imageSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageIndirectCommandNV.set_imageSubresource(segment, 0L, value); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV imageSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageIndirectCommandNV.set_imageSubresource(this.segment(), index, value); return this; } + /// Sets `imageSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV imageSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageIndirectCommandNV.set_imageSubresource(this.segment(), value); return this; } + + /// {@return `imageOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_imageOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageOffset, index), ML_imageOffset); } + /// {@return `imageOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_imageOffset(MemorySegment segment) { return VkCopyMemoryToImageIndirectCommandNV.get_imageOffset(segment, 0L); } + /// {@return `imageOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment imageOffsetAt(long index) { return VkCopyMemoryToImageIndirectCommandNV.get_imageOffset(this.segment(), index); } + /// {@return `imageOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment imageOffset() { return VkCopyMemoryToImageIndirectCommandNV.get_imageOffset(this.segment()); } + /// Sets `imageOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageOffset, index), ML_imageOffset.byteSize()); } + /// Sets `imageOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageIndirectCommandNV.set_imageOffset(segment, 0L, value); } + /// Sets `imageOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV imageOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageIndirectCommandNV.set_imageOffset(this.segment(), index, value); return this; } + /// Sets `imageOffset` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV imageOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageIndirectCommandNV.set_imageOffset(this.segment(), value); return this; } + + /// {@return `imageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent); } + /// {@return `imageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment) { return VkCopyMemoryToImageIndirectCommandNV.get_imageExtent(segment, 0L); } + /// {@return `imageExtent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageExtentAt(long index) { return VkCopyMemoryToImageIndirectCommandNV.get_imageExtent(this.segment(), index); } + /// {@return `imageExtent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageExtent() { return VkCopyMemoryToImageIndirectCommandNV.get_imageExtent(this.segment()); } + /// Sets `imageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageExtent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent.byteSize()); } + /// Sets `imageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageExtent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageIndirectCommandNV.set_imageExtent(segment, 0L, value); } + /// Sets `imageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV imageExtentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageIndirectCommandNV.set_imageExtent(this.segment(), index, value); return this; } + /// Sets `imageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageIndirectCommandNV imageExtent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageIndirectCommandNV.set_imageExtent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCudaFunctionCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCudaFunctionCreateInfoNV.java new file mode 100644 index 00000000..3b313260 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCudaFunctionCreateInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### module +/// [VarHandle][#VH_module] - [Getter][#module()] - [Setter][#module(java.lang.foreign.MemorySegment)] +/// ### pName +/// [VarHandle][#VH_pName] - [Getter][#pName()] - [Setter][#pName(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCudaFunctionCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkCudaModuleNV module; +/// const char * pName; +/// } VkCudaFunctionCreateInfoNV; +/// ``` +public final class VkCudaFunctionCreateInfoNV extends Struct { + /// The struct layout of `VkCudaFunctionCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("module"), + ValueLayout.ADDRESS.withName("pName") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `module` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_module = LAYOUT.arrayElementVarHandle(PathElement.groupElement("module")); + /// The [VarHandle] of `pName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pName")); + + /// Creates `VkCudaFunctionCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkCudaFunctionCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCudaFunctionCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCudaFunctionCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCudaFunctionCreateInfoNV(segment); } + + /// Creates `VkCudaFunctionCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCudaFunctionCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCudaFunctionCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCudaFunctionCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCudaFunctionCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCudaFunctionCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCudaFunctionCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCudaFunctionCreateInfoNV` + public static VkCudaFunctionCreateInfoNV alloc(SegmentAllocator allocator) { return new VkCudaFunctionCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCudaFunctionCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCudaFunctionCreateInfoNV` + public static VkCudaFunctionCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkCudaFunctionCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCudaFunctionCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCudaFunctionCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCudaFunctionCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCudaFunctionCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaFunctionCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkCudaFunctionCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCudaFunctionCreateInfoNV sType(@CType("VkStructureType") int value) { VkCudaFunctionCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCudaFunctionCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCudaFunctionCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCudaFunctionCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaFunctionCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaFunctionCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaFunctionCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCudaFunctionCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaFunctionCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `module` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCudaModuleNV") java.lang.foreign.MemorySegment get_module(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_module.get(segment, 0L, index); } + /// {@return `module`} + /// @param segment the segment of the struct + public static @CType("VkCudaModuleNV") java.lang.foreign.MemorySegment get_module(MemorySegment segment) { return VkCudaFunctionCreateInfoNV.get_module(segment, 0L); } + /// {@return `module` at the given index} + /// @param index the index + public @CType("VkCudaModuleNV") java.lang.foreign.MemorySegment moduleAt(long index) { return VkCudaFunctionCreateInfoNV.get_module(this.segment(), index); } + /// {@return `module`} + public @CType("VkCudaModuleNV") java.lang.foreign.MemorySegment module() { return VkCudaFunctionCreateInfoNV.get_module(this.segment()); } + /// Sets `module` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_module(MemorySegment segment, long index, @CType("VkCudaModuleNV") java.lang.foreign.MemorySegment value) { VH_module.set(segment, 0L, index, value); } + /// Sets `module` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_module(MemorySegment segment, @CType("VkCudaModuleNV") java.lang.foreign.MemorySegment value) { VkCudaFunctionCreateInfoNV.set_module(segment, 0L, value); } + /// Sets `module` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaFunctionCreateInfoNV moduleAt(long index, @CType("VkCudaModuleNV") java.lang.foreign.MemorySegment value) { VkCudaFunctionCreateInfoNV.set_module(this.segment(), index, value); return this; } + /// Sets `module` with the given value. + /// @param value the value + /// @return `this` + public VkCudaFunctionCreateInfoNV module(@CType("VkCudaModuleNV") java.lang.foreign.MemorySegment value) { VkCudaFunctionCreateInfoNV.set_module(this.segment(), value); return this; } + + /// {@return `pName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pName.get(segment, 0L, index); } + /// {@return `pName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pName(MemorySegment segment) { return VkCudaFunctionCreateInfoNV.get_pName(segment, 0L); } + /// {@return `pName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pNameAt(long index) { return VkCudaFunctionCreateInfoNV.get_pName(this.segment(), index); } + /// {@return `pName`} + public @CType("const char *") java.lang.foreign.MemorySegment pName() { return VkCudaFunctionCreateInfoNV.get_pName(this.segment()); } + /// Sets `pName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pName.set(segment, 0L, index, value); } + /// Sets `pName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkCudaFunctionCreateInfoNV.set_pName(segment, 0L, value); } + /// Sets `pName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaFunctionCreateInfoNV pNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkCudaFunctionCreateInfoNV.set_pName(this.segment(), index, value); return this; } + /// Sets `pName` with the given value. + /// @param value the value + /// @return `this` + public VkCudaFunctionCreateInfoNV pName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkCudaFunctionCreateInfoNV.set_pName(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCudaLaunchInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCudaLaunchInfoNV.java new file mode 100644 index 00000000..513d0fa9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCudaLaunchInfoNV.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### function +/// [VarHandle][#VH_function] - [Getter][#function()] - [Setter][#function(java.lang.foreign.MemorySegment)] +/// ### gridDimX +/// [VarHandle][#VH_gridDimX] - [Getter][#gridDimX()] - [Setter][#gridDimX(int)] +/// ### gridDimY +/// [VarHandle][#VH_gridDimY] - [Getter][#gridDimY()] - [Setter][#gridDimY(int)] +/// ### gridDimZ +/// [VarHandle][#VH_gridDimZ] - [Getter][#gridDimZ()] - [Setter][#gridDimZ(int)] +/// ### blockDimX +/// [VarHandle][#VH_blockDimX] - [Getter][#blockDimX()] - [Setter][#blockDimX(int)] +/// ### blockDimY +/// [VarHandle][#VH_blockDimY] - [Getter][#blockDimY()] - [Setter][#blockDimY(int)] +/// ### blockDimZ +/// [VarHandle][#VH_blockDimZ] - [Getter][#blockDimZ()] - [Setter][#blockDimZ(int)] +/// ### sharedMemBytes +/// [VarHandle][#VH_sharedMemBytes] - [Getter][#sharedMemBytes()] - [Setter][#sharedMemBytes(int)] +/// ### paramCount +/// [VarHandle][#VH_paramCount] - [Getter][#paramCount()] - [Setter][#paramCount(long)] +/// ### pParams +/// [VarHandle][#VH_pParams] - [Getter][#pParams()] - [Setter][#pParams(java.lang.foreign.MemorySegment)] +/// ### extraCount +/// [VarHandle][#VH_extraCount] - [Getter][#extraCount()] - [Setter][#extraCount(long)] +/// ### pExtras +/// [VarHandle][#VH_pExtras] - [Getter][#pExtras()] - [Setter][#pExtras(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCudaLaunchInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkCudaFunctionNV function; +/// uint32_t gridDimX; +/// uint32_t gridDimY; +/// uint32_t gridDimZ; +/// uint32_t blockDimX; +/// uint32_t blockDimY; +/// uint32_t blockDimZ; +/// uint32_t sharedMemBytes; +/// size_t paramCount; +/// const void * const * pParams; +/// size_t extraCount; +/// const void * const * pExtras; +/// } VkCudaLaunchInfoNV; +/// ``` +public final class VkCudaLaunchInfoNV extends Struct { + /// The struct layout of `VkCudaLaunchInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("function"), + ValueLayout.JAVA_INT.withName("gridDimX"), + ValueLayout.JAVA_INT.withName("gridDimY"), + ValueLayout.JAVA_INT.withName("gridDimZ"), + ValueLayout.JAVA_INT.withName("blockDimX"), + ValueLayout.JAVA_INT.withName("blockDimY"), + ValueLayout.JAVA_INT.withName("blockDimZ"), + ValueLayout.JAVA_INT.withName("sharedMemBytes"), + ValueLayout.JAVA_LONG.withName("paramCount"), + ValueLayout.ADDRESS.withName("pParams"), + ValueLayout.JAVA_LONG.withName("extraCount"), + ValueLayout.ADDRESS.withName("pExtras") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `function` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_function = LAYOUT.arrayElementVarHandle(PathElement.groupElement("function")); + /// The [VarHandle] of `gridDimX` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gridDimX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gridDimX")); + /// The [VarHandle] of `gridDimY` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gridDimY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gridDimY")); + /// The [VarHandle] of `gridDimZ` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gridDimZ = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gridDimZ")); + /// The [VarHandle] of `blockDimX` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blockDimX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blockDimX")); + /// The [VarHandle] of `blockDimY` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blockDimY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blockDimY")); + /// The [VarHandle] of `blockDimZ` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blockDimZ = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blockDimZ")); + /// The [VarHandle] of `sharedMemBytes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sharedMemBytes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sharedMemBytes")); + /// The [VarHandle] of `paramCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_paramCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("paramCount")); + /// The [VarHandle] of `pParams` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pParams = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pParams")); + /// The [VarHandle] of `extraCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_extraCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extraCount")); + /// The [VarHandle] of `pExtras` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pExtras = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pExtras")); + + /// Creates `VkCudaLaunchInfoNV` with the given segment. + /// @param segment the memory segment + public VkCudaLaunchInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCudaLaunchInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCudaLaunchInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCudaLaunchInfoNV(segment); } + + /// Creates `VkCudaLaunchInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCudaLaunchInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCudaLaunchInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCudaLaunchInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCudaLaunchInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCudaLaunchInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCudaLaunchInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCudaLaunchInfoNV` + public static VkCudaLaunchInfoNV alloc(SegmentAllocator allocator) { return new VkCudaLaunchInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCudaLaunchInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCudaLaunchInfoNV` + public static VkCudaLaunchInfoNV alloc(SegmentAllocator allocator, long count) { return new VkCudaLaunchInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCudaLaunchInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCudaLaunchInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCudaLaunchInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCudaLaunchInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkCudaLaunchInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV sType(@CType("VkStructureType") int value) { VkCudaLaunchInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCudaLaunchInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCudaLaunchInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCudaLaunchInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `function` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCudaFunctionNV") java.lang.foreign.MemorySegment get_function(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_function.get(segment, 0L, index); } + /// {@return `function`} + /// @param segment the segment of the struct + public static @CType("VkCudaFunctionNV") java.lang.foreign.MemorySegment get_function(MemorySegment segment) { return VkCudaLaunchInfoNV.get_function(segment, 0L); } + /// {@return `function` at the given index} + /// @param index the index + public @CType("VkCudaFunctionNV") java.lang.foreign.MemorySegment functionAt(long index) { return VkCudaLaunchInfoNV.get_function(this.segment(), index); } + /// {@return `function`} + public @CType("VkCudaFunctionNV") java.lang.foreign.MemorySegment function() { return VkCudaLaunchInfoNV.get_function(this.segment()); } + /// Sets `function` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_function(MemorySegment segment, long index, @CType("VkCudaFunctionNV") java.lang.foreign.MemorySegment value) { VH_function.set(segment, 0L, index, value); } + /// Sets `function` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_function(MemorySegment segment, @CType("VkCudaFunctionNV") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_function(segment, 0L, value); } + /// Sets `function` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV functionAt(long index, @CType("VkCudaFunctionNV") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_function(this.segment(), index, value); return this; } + /// Sets `function` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV function(@CType("VkCudaFunctionNV") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_function(this.segment(), value); return this; } + + /// {@return `gridDimX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gridDimX(MemorySegment segment, long index) { return (int) VH_gridDimX.get(segment, 0L, index); } + /// {@return `gridDimX`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gridDimX(MemorySegment segment) { return VkCudaLaunchInfoNV.get_gridDimX(segment, 0L); } + /// {@return `gridDimX` at the given index} + /// @param index the index + public @CType("uint32_t") int gridDimXAt(long index) { return VkCudaLaunchInfoNV.get_gridDimX(this.segment(), index); } + /// {@return `gridDimX`} + public @CType("uint32_t") int gridDimX() { return VkCudaLaunchInfoNV.get_gridDimX(this.segment()); } + /// Sets `gridDimX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gridDimX(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gridDimX.set(segment, 0L, index, value); } + /// Sets `gridDimX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gridDimX(MemorySegment segment, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_gridDimX(segment, 0L, value); } + /// Sets `gridDimX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV gridDimXAt(long index, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_gridDimX(this.segment(), index, value); return this; } + /// Sets `gridDimX` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV gridDimX(@CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_gridDimX(this.segment(), value); return this; } + + /// {@return `gridDimY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gridDimY(MemorySegment segment, long index) { return (int) VH_gridDimY.get(segment, 0L, index); } + /// {@return `gridDimY`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gridDimY(MemorySegment segment) { return VkCudaLaunchInfoNV.get_gridDimY(segment, 0L); } + /// {@return `gridDimY` at the given index} + /// @param index the index + public @CType("uint32_t") int gridDimYAt(long index) { return VkCudaLaunchInfoNV.get_gridDimY(this.segment(), index); } + /// {@return `gridDimY`} + public @CType("uint32_t") int gridDimY() { return VkCudaLaunchInfoNV.get_gridDimY(this.segment()); } + /// Sets `gridDimY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gridDimY(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gridDimY.set(segment, 0L, index, value); } + /// Sets `gridDimY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gridDimY(MemorySegment segment, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_gridDimY(segment, 0L, value); } + /// Sets `gridDimY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV gridDimYAt(long index, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_gridDimY(this.segment(), index, value); return this; } + /// Sets `gridDimY` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV gridDimY(@CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_gridDimY(this.segment(), value); return this; } + + /// {@return `gridDimZ` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gridDimZ(MemorySegment segment, long index) { return (int) VH_gridDimZ.get(segment, 0L, index); } + /// {@return `gridDimZ`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gridDimZ(MemorySegment segment) { return VkCudaLaunchInfoNV.get_gridDimZ(segment, 0L); } + /// {@return `gridDimZ` at the given index} + /// @param index the index + public @CType("uint32_t") int gridDimZAt(long index) { return VkCudaLaunchInfoNV.get_gridDimZ(this.segment(), index); } + /// {@return `gridDimZ`} + public @CType("uint32_t") int gridDimZ() { return VkCudaLaunchInfoNV.get_gridDimZ(this.segment()); } + /// Sets `gridDimZ` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gridDimZ(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gridDimZ.set(segment, 0L, index, value); } + /// Sets `gridDimZ` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gridDimZ(MemorySegment segment, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_gridDimZ(segment, 0L, value); } + /// Sets `gridDimZ` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV gridDimZAt(long index, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_gridDimZ(this.segment(), index, value); return this; } + /// Sets `gridDimZ` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV gridDimZ(@CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_gridDimZ(this.segment(), value); return this; } + + /// {@return `blockDimX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_blockDimX(MemorySegment segment, long index) { return (int) VH_blockDimX.get(segment, 0L, index); } + /// {@return `blockDimX`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_blockDimX(MemorySegment segment) { return VkCudaLaunchInfoNV.get_blockDimX(segment, 0L); } + /// {@return `blockDimX` at the given index} + /// @param index the index + public @CType("uint32_t") int blockDimXAt(long index) { return VkCudaLaunchInfoNV.get_blockDimX(this.segment(), index); } + /// {@return `blockDimX`} + public @CType("uint32_t") int blockDimX() { return VkCudaLaunchInfoNV.get_blockDimX(this.segment()); } + /// Sets `blockDimX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blockDimX(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_blockDimX.set(segment, 0L, index, value); } + /// Sets `blockDimX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blockDimX(MemorySegment segment, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_blockDimX(segment, 0L, value); } + /// Sets `blockDimX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV blockDimXAt(long index, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_blockDimX(this.segment(), index, value); return this; } + /// Sets `blockDimX` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV blockDimX(@CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_blockDimX(this.segment(), value); return this; } + + /// {@return `blockDimY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_blockDimY(MemorySegment segment, long index) { return (int) VH_blockDimY.get(segment, 0L, index); } + /// {@return `blockDimY`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_blockDimY(MemorySegment segment) { return VkCudaLaunchInfoNV.get_blockDimY(segment, 0L); } + /// {@return `blockDimY` at the given index} + /// @param index the index + public @CType("uint32_t") int blockDimYAt(long index) { return VkCudaLaunchInfoNV.get_blockDimY(this.segment(), index); } + /// {@return `blockDimY`} + public @CType("uint32_t") int blockDimY() { return VkCudaLaunchInfoNV.get_blockDimY(this.segment()); } + /// Sets `blockDimY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blockDimY(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_blockDimY.set(segment, 0L, index, value); } + /// Sets `blockDimY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blockDimY(MemorySegment segment, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_blockDimY(segment, 0L, value); } + /// Sets `blockDimY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV blockDimYAt(long index, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_blockDimY(this.segment(), index, value); return this; } + /// Sets `blockDimY` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV blockDimY(@CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_blockDimY(this.segment(), value); return this; } + + /// {@return `blockDimZ` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_blockDimZ(MemorySegment segment, long index) { return (int) VH_blockDimZ.get(segment, 0L, index); } + /// {@return `blockDimZ`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_blockDimZ(MemorySegment segment) { return VkCudaLaunchInfoNV.get_blockDimZ(segment, 0L); } + /// {@return `blockDimZ` at the given index} + /// @param index the index + public @CType("uint32_t") int blockDimZAt(long index) { return VkCudaLaunchInfoNV.get_blockDimZ(this.segment(), index); } + /// {@return `blockDimZ`} + public @CType("uint32_t") int blockDimZ() { return VkCudaLaunchInfoNV.get_blockDimZ(this.segment()); } + /// Sets `blockDimZ` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blockDimZ(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_blockDimZ.set(segment, 0L, index, value); } + /// Sets `blockDimZ` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blockDimZ(MemorySegment segment, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_blockDimZ(segment, 0L, value); } + /// Sets `blockDimZ` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV blockDimZAt(long index, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_blockDimZ(this.segment(), index, value); return this; } + /// Sets `blockDimZ` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV blockDimZ(@CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_blockDimZ(this.segment(), value); return this; } + + /// {@return `sharedMemBytes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sharedMemBytes(MemorySegment segment, long index) { return (int) VH_sharedMemBytes.get(segment, 0L, index); } + /// {@return `sharedMemBytes`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sharedMemBytes(MemorySegment segment) { return VkCudaLaunchInfoNV.get_sharedMemBytes(segment, 0L); } + /// {@return `sharedMemBytes` at the given index} + /// @param index the index + public @CType("uint32_t") int sharedMemBytesAt(long index) { return VkCudaLaunchInfoNV.get_sharedMemBytes(this.segment(), index); } + /// {@return `sharedMemBytes`} + public @CType("uint32_t") int sharedMemBytes() { return VkCudaLaunchInfoNV.get_sharedMemBytes(this.segment()); } + /// Sets `sharedMemBytes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sharedMemBytes(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sharedMemBytes.set(segment, 0L, index, value); } + /// Sets `sharedMemBytes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sharedMemBytes(MemorySegment segment, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_sharedMemBytes(segment, 0L, value); } + /// Sets `sharedMemBytes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV sharedMemBytesAt(long index, @CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_sharedMemBytes(this.segment(), index, value); return this; } + /// Sets `sharedMemBytes` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV sharedMemBytes(@CType("uint32_t") int value) { VkCudaLaunchInfoNV.set_sharedMemBytes(this.segment(), value); return this; } + + /// {@return `paramCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_paramCount(MemorySegment segment, long index) { return (long) VH_paramCount.get(segment, 0L, index); } + /// {@return `paramCount`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_paramCount(MemorySegment segment) { return VkCudaLaunchInfoNV.get_paramCount(segment, 0L); } + /// {@return `paramCount` at the given index} + /// @param index the index + public @CType("size_t") long paramCountAt(long index) { return VkCudaLaunchInfoNV.get_paramCount(this.segment(), index); } + /// {@return `paramCount`} + public @CType("size_t") long paramCount() { return VkCudaLaunchInfoNV.get_paramCount(this.segment()); } + /// Sets `paramCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_paramCount(MemorySegment segment, long index, @CType("size_t") long value) { VH_paramCount.set(segment, 0L, index, value); } + /// Sets `paramCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_paramCount(MemorySegment segment, @CType("size_t") long value) { VkCudaLaunchInfoNV.set_paramCount(segment, 0L, value); } + /// Sets `paramCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV paramCountAt(long index, @CType("size_t") long value) { VkCudaLaunchInfoNV.set_paramCount(this.segment(), index, value); return this; } + /// Sets `paramCount` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV paramCount(@CType("size_t") long value) { VkCudaLaunchInfoNV.set_paramCount(this.segment(), value); return this; } + + /// {@return `pParams` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void * const *") java.lang.foreign.MemorySegment get_pParams(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pParams.get(segment, 0L, index); } + /// {@return `pParams`} + /// @param segment the segment of the struct + public static @CType("const void * const *") java.lang.foreign.MemorySegment get_pParams(MemorySegment segment) { return VkCudaLaunchInfoNV.get_pParams(segment, 0L); } + /// {@return `pParams` at the given index} + /// @param index the index + public @CType("const void * const *") java.lang.foreign.MemorySegment pParamsAt(long index) { return VkCudaLaunchInfoNV.get_pParams(this.segment(), index); } + /// {@return `pParams`} + public @CType("const void * const *") java.lang.foreign.MemorySegment pParams() { return VkCudaLaunchInfoNV.get_pParams(this.segment()); } + /// Sets `pParams` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pParams(MemorySegment segment, long index, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VH_pParams.set(segment, 0L, index, value); } + /// Sets `pParams` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pParams(MemorySegment segment, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_pParams(segment, 0L, value); } + /// Sets `pParams` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV pParamsAt(long index, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_pParams(this.segment(), index, value); return this; } + /// Sets `pParams` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV pParams(@CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_pParams(this.segment(), value); return this; } + + /// {@return `extraCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_extraCount(MemorySegment segment, long index) { return (long) VH_extraCount.get(segment, 0L, index); } + /// {@return `extraCount`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_extraCount(MemorySegment segment) { return VkCudaLaunchInfoNV.get_extraCount(segment, 0L); } + /// {@return `extraCount` at the given index} + /// @param index the index + public @CType("size_t") long extraCountAt(long index) { return VkCudaLaunchInfoNV.get_extraCount(this.segment(), index); } + /// {@return `extraCount`} + public @CType("size_t") long extraCount() { return VkCudaLaunchInfoNV.get_extraCount(this.segment()); } + /// Sets `extraCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extraCount(MemorySegment segment, long index, @CType("size_t") long value) { VH_extraCount.set(segment, 0L, index, value); } + /// Sets `extraCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extraCount(MemorySegment segment, @CType("size_t") long value) { VkCudaLaunchInfoNV.set_extraCount(segment, 0L, value); } + /// Sets `extraCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV extraCountAt(long index, @CType("size_t") long value) { VkCudaLaunchInfoNV.set_extraCount(this.segment(), index, value); return this; } + /// Sets `extraCount` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV extraCount(@CType("size_t") long value) { VkCudaLaunchInfoNV.set_extraCount(this.segment(), value); return this; } + + /// {@return `pExtras` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void * const *") java.lang.foreign.MemorySegment get_pExtras(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pExtras.get(segment, 0L, index); } + /// {@return `pExtras`} + /// @param segment the segment of the struct + public static @CType("const void * const *") java.lang.foreign.MemorySegment get_pExtras(MemorySegment segment) { return VkCudaLaunchInfoNV.get_pExtras(segment, 0L); } + /// {@return `pExtras` at the given index} + /// @param index the index + public @CType("const void * const *") java.lang.foreign.MemorySegment pExtrasAt(long index) { return VkCudaLaunchInfoNV.get_pExtras(this.segment(), index); } + /// {@return `pExtras`} + public @CType("const void * const *") java.lang.foreign.MemorySegment pExtras() { return VkCudaLaunchInfoNV.get_pExtras(this.segment()); } + /// Sets `pExtras` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pExtras(MemorySegment segment, long index, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VH_pExtras.set(segment, 0L, index, value); } + /// Sets `pExtras` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pExtras(MemorySegment segment, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_pExtras(segment, 0L, value); } + /// Sets `pExtras` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV pExtrasAt(long index, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_pExtras(this.segment(), index, value); return this; } + /// Sets `pExtras` with the given value. + /// @param value the value + /// @return `this` + public VkCudaLaunchInfoNV pExtras(@CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCudaLaunchInfoNV.set_pExtras(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCudaModuleCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCudaModuleCreateInfoNV.java new file mode 100644 index 00000000..c9526dc3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkCudaModuleCreateInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dataSize +/// [VarHandle][#VH_dataSize] - [Getter][#dataSize()] - [Setter][#dataSize(long)] +/// ### pData +/// [VarHandle][#VH_pData] - [Getter][#pData()] - [Setter][#pData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCudaModuleCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// size_t dataSize; +/// const void * pData; +/// } VkCudaModuleCreateInfoNV; +/// ``` +public final class VkCudaModuleCreateInfoNV extends Struct { + /// The struct layout of `VkCudaModuleCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("dataSize"), + ValueLayout.ADDRESS.withName("pData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dataSize")); + /// The [VarHandle] of `pData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pData")); + + /// Creates `VkCudaModuleCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkCudaModuleCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCudaModuleCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCudaModuleCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCudaModuleCreateInfoNV(segment); } + + /// Creates `VkCudaModuleCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCudaModuleCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCudaModuleCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCudaModuleCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCudaModuleCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCudaModuleCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCudaModuleCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCudaModuleCreateInfoNV` + public static VkCudaModuleCreateInfoNV alloc(SegmentAllocator allocator) { return new VkCudaModuleCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCudaModuleCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCudaModuleCreateInfoNV` + public static VkCudaModuleCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkCudaModuleCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCudaModuleCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCudaModuleCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCudaModuleCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCudaModuleCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaModuleCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkCudaModuleCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCudaModuleCreateInfoNV sType(@CType("VkStructureType") int value) { VkCudaModuleCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCudaModuleCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCudaModuleCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCudaModuleCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaModuleCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaModuleCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaModuleCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCudaModuleCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaModuleCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `dataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_dataSize(MemorySegment segment, long index) { return (long) VH_dataSize.get(segment, 0L, index); } + /// {@return `dataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_dataSize(MemorySegment segment) { return VkCudaModuleCreateInfoNV.get_dataSize(segment, 0L); } + /// {@return `dataSize` at the given index} + /// @param index the index + public @CType("size_t") long dataSizeAt(long index) { return VkCudaModuleCreateInfoNV.get_dataSize(this.segment(), index); } + /// {@return `dataSize`} + public @CType("size_t") long dataSize() { return VkCudaModuleCreateInfoNV.get_dataSize(this.segment()); } + /// Sets `dataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_dataSize.set(segment, 0L, index, value); } + /// Sets `dataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dataSize(MemorySegment segment, @CType("size_t") long value) { VkCudaModuleCreateInfoNV.set_dataSize(segment, 0L, value); } + /// Sets `dataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaModuleCreateInfoNV dataSizeAt(long index, @CType("size_t") long value) { VkCudaModuleCreateInfoNV.set_dataSize(this.segment(), index, value); return this; } + /// Sets `dataSize` with the given value. + /// @param value the value + /// @return `this` + public VkCudaModuleCreateInfoNV dataSize(@CType("size_t") long value) { VkCudaModuleCreateInfoNV.set_dataSize(this.segment(), value); return this; } + + /// {@return `pData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pData.get(segment, 0L, index); } + /// {@return `pData`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment) { return VkCudaModuleCreateInfoNV.get_pData(segment, 0L); } + /// {@return `pData` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pDataAt(long index) { return VkCudaModuleCreateInfoNV.get_pData(this.segment(), index); } + /// {@return `pData`} + public @CType("const void *") java.lang.foreign.MemorySegment pData() { return VkCudaModuleCreateInfoNV.get_pData(this.segment()); } + /// Sets `pData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pData(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pData.set(segment, 0L, index, value); } + /// Sets `pData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pData(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaModuleCreateInfoNV.set_pData(segment, 0L, value); } + /// Sets `pData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCudaModuleCreateInfoNV pDataAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaModuleCreateInfoNV.set_pData(this.segment(), index, value); return this; } + /// Sets `pData` with the given value. + /// @param value the value + /// @return `this` + public VkCudaModuleCreateInfoNV pData(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCudaModuleCreateInfoNV.set_pData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDecompressMemoryRegionNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDecompressMemoryRegionNV.java new file mode 100644 index 00000000..82bf6630 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDecompressMemoryRegionNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### srcAddress +/// [VarHandle][#VH_srcAddress] - [Getter][#srcAddress()] - [Setter][#srcAddress(long)] +/// ### dstAddress +/// [VarHandle][#VH_dstAddress] - [Getter][#dstAddress()] - [Setter][#dstAddress(long)] +/// ### compressedSize +/// [VarHandle][#VH_compressedSize] - [Getter][#compressedSize()] - [Setter][#compressedSize(long)] +/// ### decompressedSize +/// [VarHandle][#VH_decompressedSize] - [Getter][#decompressedSize()] - [Setter][#decompressedSize(long)] +/// ### decompressionMethod +/// [VarHandle][#VH_decompressionMethod] - [Getter][#decompressionMethod()] - [Setter][#decompressionMethod(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDecompressMemoryRegionNV { +/// VkDeviceAddress srcAddress; +/// VkDeviceAddress dstAddress; +/// VkDeviceSize compressedSize; +/// VkDeviceSize decompressedSize; +/// VkMemoryDecompressionMethodFlagsNV decompressionMethod; +/// } VkDecompressMemoryRegionNV; +/// ``` +public final class VkDecompressMemoryRegionNV extends Struct { + /// The struct layout of `VkDecompressMemoryRegionNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("srcAddress"), + ValueLayout.JAVA_LONG.withName("dstAddress"), + ValueLayout.JAVA_LONG.withName("compressedSize"), + ValueLayout.JAVA_LONG.withName("decompressedSize"), + ValueLayout.JAVA_LONG.withName("decompressionMethod") + ); + /// The [VarHandle] of `srcAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAddress")); + /// The [VarHandle] of `dstAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAddress")); + /// The [VarHandle] of `compressedSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_compressedSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compressedSize")); + /// The [VarHandle] of `decompressedSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_decompressedSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("decompressedSize")); + /// The [VarHandle] of `decompressionMethod` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_decompressionMethod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("decompressionMethod")); + + /// Creates `VkDecompressMemoryRegionNV` with the given segment. + /// @param segment the memory segment + public VkDecompressMemoryRegionNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDecompressMemoryRegionNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDecompressMemoryRegionNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDecompressMemoryRegionNV(segment); } + + /// Creates `VkDecompressMemoryRegionNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDecompressMemoryRegionNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDecompressMemoryRegionNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDecompressMemoryRegionNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDecompressMemoryRegionNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDecompressMemoryRegionNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDecompressMemoryRegionNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDecompressMemoryRegionNV` + public static VkDecompressMemoryRegionNV alloc(SegmentAllocator allocator) { return new VkDecompressMemoryRegionNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDecompressMemoryRegionNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDecompressMemoryRegionNV` + public static VkDecompressMemoryRegionNV alloc(SegmentAllocator allocator, long count) { return new VkDecompressMemoryRegionNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `srcAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_srcAddress(MemorySegment segment, long index) { return (long) VH_srcAddress.get(segment, 0L, index); } + /// {@return `srcAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_srcAddress(MemorySegment segment) { return VkDecompressMemoryRegionNV.get_srcAddress(segment, 0L); } + /// {@return `srcAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long srcAddressAt(long index) { return VkDecompressMemoryRegionNV.get_srcAddress(this.segment(), index); } + /// {@return `srcAddress`} + public @CType("VkDeviceAddress") long srcAddress() { return VkDecompressMemoryRegionNV.get_srcAddress(this.segment()); } + /// Sets `srcAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_srcAddress.set(segment, 0L, index, value); } + /// Sets `srcAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDecompressMemoryRegionNV.set_srcAddress(segment, 0L, value); } + /// Sets `srcAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDecompressMemoryRegionNV srcAddressAt(long index, @CType("VkDeviceAddress") long value) { VkDecompressMemoryRegionNV.set_srcAddress(this.segment(), index, value); return this; } + /// Sets `srcAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDecompressMemoryRegionNV srcAddress(@CType("VkDeviceAddress") long value) { VkDecompressMemoryRegionNV.set_srcAddress(this.segment(), value); return this; } + + /// {@return `dstAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_dstAddress(MemorySegment segment, long index) { return (long) VH_dstAddress.get(segment, 0L, index); } + /// {@return `dstAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_dstAddress(MemorySegment segment) { return VkDecompressMemoryRegionNV.get_dstAddress(segment, 0L); } + /// {@return `dstAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long dstAddressAt(long index) { return VkDecompressMemoryRegionNV.get_dstAddress(this.segment(), index); } + /// {@return `dstAddress`} + public @CType("VkDeviceAddress") long dstAddress() { return VkDecompressMemoryRegionNV.get_dstAddress(this.segment()); } + /// Sets `dstAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_dstAddress.set(segment, 0L, index, value); } + /// Sets `dstAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkDecompressMemoryRegionNV.set_dstAddress(segment, 0L, value); } + /// Sets `dstAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDecompressMemoryRegionNV dstAddressAt(long index, @CType("VkDeviceAddress") long value) { VkDecompressMemoryRegionNV.set_dstAddress(this.segment(), index, value); return this; } + /// Sets `dstAddress` with the given value. + /// @param value the value + /// @return `this` + public VkDecompressMemoryRegionNV dstAddress(@CType("VkDeviceAddress") long value) { VkDecompressMemoryRegionNV.set_dstAddress(this.segment(), value); return this; } + + /// {@return `compressedSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_compressedSize(MemorySegment segment, long index) { return (long) VH_compressedSize.get(segment, 0L, index); } + /// {@return `compressedSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_compressedSize(MemorySegment segment) { return VkDecompressMemoryRegionNV.get_compressedSize(segment, 0L); } + /// {@return `compressedSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long compressedSizeAt(long index) { return VkDecompressMemoryRegionNV.get_compressedSize(this.segment(), index); } + /// {@return `compressedSize`} + public @CType("VkDeviceSize") long compressedSize() { return VkDecompressMemoryRegionNV.get_compressedSize(this.segment()); } + /// Sets `compressedSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compressedSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_compressedSize.set(segment, 0L, index, value); } + /// Sets `compressedSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compressedSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkDecompressMemoryRegionNV.set_compressedSize(segment, 0L, value); } + /// Sets `compressedSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDecompressMemoryRegionNV compressedSizeAt(long index, @CType("VkDeviceSize") long value) { VkDecompressMemoryRegionNV.set_compressedSize(this.segment(), index, value); return this; } + /// Sets `compressedSize` with the given value. + /// @param value the value + /// @return `this` + public VkDecompressMemoryRegionNV compressedSize(@CType("VkDeviceSize") long value) { VkDecompressMemoryRegionNV.set_compressedSize(this.segment(), value); return this; } + + /// {@return `decompressedSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_decompressedSize(MemorySegment segment, long index) { return (long) VH_decompressedSize.get(segment, 0L, index); } + /// {@return `decompressedSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_decompressedSize(MemorySegment segment) { return VkDecompressMemoryRegionNV.get_decompressedSize(segment, 0L); } + /// {@return `decompressedSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long decompressedSizeAt(long index) { return VkDecompressMemoryRegionNV.get_decompressedSize(this.segment(), index); } + /// {@return `decompressedSize`} + public @CType("VkDeviceSize") long decompressedSize() { return VkDecompressMemoryRegionNV.get_decompressedSize(this.segment()); } + /// Sets `decompressedSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_decompressedSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_decompressedSize.set(segment, 0L, index, value); } + /// Sets `decompressedSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_decompressedSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkDecompressMemoryRegionNV.set_decompressedSize(segment, 0L, value); } + /// Sets `decompressedSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDecompressMemoryRegionNV decompressedSizeAt(long index, @CType("VkDeviceSize") long value) { VkDecompressMemoryRegionNV.set_decompressedSize(this.segment(), index, value); return this; } + /// Sets `decompressedSize` with the given value. + /// @param value the value + /// @return `this` + public VkDecompressMemoryRegionNV decompressedSize(@CType("VkDeviceSize") long value) { VkDecompressMemoryRegionNV.set_decompressedSize(this.segment(), value); return this; } + + /// {@return `decompressionMethod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMemoryDecompressionMethodFlagsNV") long get_decompressionMethod(MemorySegment segment, long index) { return (long) VH_decompressionMethod.get(segment, 0L, index); } + /// {@return `decompressionMethod`} + /// @param segment the segment of the struct + public static @CType("VkMemoryDecompressionMethodFlagsNV") long get_decompressionMethod(MemorySegment segment) { return VkDecompressMemoryRegionNV.get_decompressionMethod(segment, 0L); } + /// {@return `decompressionMethod` at the given index} + /// @param index the index + public @CType("VkMemoryDecompressionMethodFlagsNV") long decompressionMethodAt(long index) { return VkDecompressMemoryRegionNV.get_decompressionMethod(this.segment(), index); } + /// {@return `decompressionMethod`} + public @CType("VkMemoryDecompressionMethodFlagsNV") long decompressionMethod() { return VkDecompressMemoryRegionNV.get_decompressionMethod(this.segment()); } + /// Sets `decompressionMethod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_decompressionMethod(MemorySegment segment, long index, @CType("VkMemoryDecompressionMethodFlagsNV") long value) { VH_decompressionMethod.set(segment, 0L, index, value); } + /// Sets `decompressionMethod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_decompressionMethod(MemorySegment segment, @CType("VkMemoryDecompressionMethodFlagsNV") long value) { VkDecompressMemoryRegionNV.set_decompressionMethod(segment, 0L, value); } + /// Sets `decompressionMethod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDecompressMemoryRegionNV decompressionMethodAt(long index, @CType("VkMemoryDecompressionMethodFlagsNV") long value) { VkDecompressMemoryRegionNV.set_decompressionMethod(this.segment(), index, value); return this; } + /// Sets `decompressionMethod` with the given value. + /// @param value the value + /// @return `this` + public VkDecompressMemoryRegionNV decompressionMethod(@CType("VkMemoryDecompressionMethodFlagsNV") long value) { VkDecompressMemoryRegionNV.set_decompressionMethod(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDedicatedAllocationBufferCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDedicatedAllocationBufferCreateInfoNV.java new file mode 100644 index 00000000..6ca81f2d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDedicatedAllocationBufferCreateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dedicatedAllocation +/// [VarHandle][#VH_dedicatedAllocation] - [Getter][#dedicatedAllocation()] - [Setter][#dedicatedAllocation(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDedicatedAllocationBufferCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 dedicatedAllocation; +/// } VkDedicatedAllocationBufferCreateInfoNV; +/// ``` +public final class VkDedicatedAllocationBufferCreateInfoNV extends Struct { + /// The struct layout of `VkDedicatedAllocationBufferCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("dedicatedAllocation") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dedicatedAllocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dedicatedAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dedicatedAllocation")); + + /// Creates `VkDedicatedAllocationBufferCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkDedicatedAllocationBufferCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDedicatedAllocationBufferCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDedicatedAllocationBufferCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDedicatedAllocationBufferCreateInfoNV(segment); } + + /// Creates `VkDedicatedAllocationBufferCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDedicatedAllocationBufferCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDedicatedAllocationBufferCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDedicatedAllocationBufferCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDedicatedAllocationBufferCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDedicatedAllocationBufferCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDedicatedAllocationBufferCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDedicatedAllocationBufferCreateInfoNV` + public static VkDedicatedAllocationBufferCreateInfoNV alloc(SegmentAllocator allocator) { return new VkDedicatedAllocationBufferCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDedicatedAllocationBufferCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDedicatedAllocationBufferCreateInfoNV` + public static VkDedicatedAllocationBufferCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkDedicatedAllocationBufferCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDedicatedAllocationBufferCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDedicatedAllocationBufferCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDedicatedAllocationBufferCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDedicatedAllocationBufferCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDedicatedAllocationBufferCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkDedicatedAllocationBufferCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDedicatedAllocationBufferCreateInfoNV sType(@CType("VkStructureType") int value) { VkDedicatedAllocationBufferCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDedicatedAllocationBufferCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDedicatedAllocationBufferCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDedicatedAllocationBufferCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationBufferCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDedicatedAllocationBufferCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationBufferCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDedicatedAllocationBufferCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationBufferCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `dedicatedAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dedicatedAllocation(MemorySegment segment, long index) { return (int) VH_dedicatedAllocation.get(segment, 0L, index); } + /// {@return `dedicatedAllocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dedicatedAllocation(MemorySegment segment) { return VkDedicatedAllocationBufferCreateInfoNV.get_dedicatedAllocation(segment, 0L); } + /// {@return `dedicatedAllocation` at the given index} + /// @param index the index + public @CType("VkBool32") int dedicatedAllocationAt(long index) { return VkDedicatedAllocationBufferCreateInfoNV.get_dedicatedAllocation(this.segment(), index); } + /// {@return `dedicatedAllocation`} + public @CType("VkBool32") int dedicatedAllocation() { return VkDedicatedAllocationBufferCreateInfoNV.get_dedicatedAllocation(this.segment()); } + /// Sets `dedicatedAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dedicatedAllocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dedicatedAllocation.set(segment, 0L, index, value); } + /// Sets `dedicatedAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dedicatedAllocation(MemorySegment segment, @CType("VkBool32") int value) { VkDedicatedAllocationBufferCreateInfoNV.set_dedicatedAllocation(segment, 0L, value); } + /// Sets `dedicatedAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDedicatedAllocationBufferCreateInfoNV dedicatedAllocationAt(long index, @CType("VkBool32") int value) { VkDedicatedAllocationBufferCreateInfoNV.set_dedicatedAllocation(this.segment(), index, value); return this; } + /// Sets `dedicatedAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkDedicatedAllocationBufferCreateInfoNV dedicatedAllocation(@CType("VkBool32") int value) { VkDedicatedAllocationBufferCreateInfoNV.set_dedicatedAllocation(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDedicatedAllocationImageCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDedicatedAllocationImageCreateInfoNV.java new file mode 100644 index 00000000..23156405 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDedicatedAllocationImageCreateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dedicatedAllocation +/// [VarHandle][#VH_dedicatedAllocation] - [Getter][#dedicatedAllocation()] - [Setter][#dedicatedAllocation(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDedicatedAllocationImageCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 dedicatedAllocation; +/// } VkDedicatedAllocationImageCreateInfoNV; +/// ``` +public final class VkDedicatedAllocationImageCreateInfoNV extends Struct { + /// The struct layout of `VkDedicatedAllocationImageCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("dedicatedAllocation") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dedicatedAllocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dedicatedAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dedicatedAllocation")); + + /// Creates `VkDedicatedAllocationImageCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkDedicatedAllocationImageCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDedicatedAllocationImageCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDedicatedAllocationImageCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDedicatedAllocationImageCreateInfoNV(segment); } + + /// Creates `VkDedicatedAllocationImageCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDedicatedAllocationImageCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDedicatedAllocationImageCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDedicatedAllocationImageCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDedicatedAllocationImageCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDedicatedAllocationImageCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDedicatedAllocationImageCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDedicatedAllocationImageCreateInfoNV` + public static VkDedicatedAllocationImageCreateInfoNV alloc(SegmentAllocator allocator) { return new VkDedicatedAllocationImageCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDedicatedAllocationImageCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDedicatedAllocationImageCreateInfoNV` + public static VkDedicatedAllocationImageCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkDedicatedAllocationImageCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDedicatedAllocationImageCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDedicatedAllocationImageCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDedicatedAllocationImageCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDedicatedAllocationImageCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDedicatedAllocationImageCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkDedicatedAllocationImageCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDedicatedAllocationImageCreateInfoNV sType(@CType("VkStructureType") int value) { VkDedicatedAllocationImageCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDedicatedAllocationImageCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDedicatedAllocationImageCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDedicatedAllocationImageCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationImageCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDedicatedAllocationImageCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationImageCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDedicatedAllocationImageCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationImageCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `dedicatedAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dedicatedAllocation(MemorySegment segment, long index) { return (int) VH_dedicatedAllocation.get(segment, 0L, index); } + /// {@return `dedicatedAllocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dedicatedAllocation(MemorySegment segment) { return VkDedicatedAllocationImageCreateInfoNV.get_dedicatedAllocation(segment, 0L); } + /// {@return `dedicatedAllocation` at the given index} + /// @param index the index + public @CType("VkBool32") int dedicatedAllocationAt(long index) { return VkDedicatedAllocationImageCreateInfoNV.get_dedicatedAllocation(this.segment(), index); } + /// {@return `dedicatedAllocation`} + public @CType("VkBool32") int dedicatedAllocation() { return VkDedicatedAllocationImageCreateInfoNV.get_dedicatedAllocation(this.segment()); } + /// Sets `dedicatedAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dedicatedAllocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dedicatedAllocation.set(segment, 0L, index, value); } + /// Sets `dedicatedAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dedicatedAllocation(MemorySegment segment, @CType("VkBool32") int value) { VkDedicatedAllocationImageCreateInfoNV.set_dedicatedAllocation(segment, 0L, value); } + /// Sets `dedicatedAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDedicatedAllocationImageCreateInfoNV dedicatedAllocationAt(long index, @CType("VkBool32") int value) { VkDedicatedAllocationImageCreateInfoNV.set_dedicatedAllocation(this.segment(), index, value); return this; } + /// Sets `dedicatedAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkDedicatedAllocationImageCreateInfoNV dedicatedAllocation(@CType("VkBool32") int value) { VkDedicatedAllocationImageCreateInfoNV.set_dedicatedAllocation(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDedicatedAllocationMemoryAllocateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDedicatedAllocationMemoryAllocateInfoNV.java new file mode 100644 index 00000000..e7115205 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDedicatedAllocationMemoryAllocateInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDedicatedAllocationMemoryAllocateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage image; +/// VkBuffer buffer; +/// } VkDedicatedAllocationMemoryAllocateInfoNV; +/// ``` +public final class VkDedicatedAllocationMemoryAllocateInfoNV extends Struct { + /// The struct layout of `VkDedicatedAllocationMemoryAllocateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("image"), + ValueLayout.ADDRESS.withName("buffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + + /// Creates `VkDedicatedAllocationMemoryAllocateInfoNV` with the given segment. + /// @param segment the memory segment + public VkDedicatedAllocationMemoryAllocateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDedicatedAllocationMemoryAllocateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDedicatedAllocationMemoryAllocateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDedicatedAllocationMemoryAllocateInfoNV(segment); } + + /// Creates `VkDedicatedAllocationMemoryAllocateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDedicatedAllocationMemoryAllocateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDedicatedAllocationMemoryAllocateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDedicatedAllocationMemoryAllocateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDedicatedAllocationMemoryAllocateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDedicatedAllocationMemoryAllocateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDedicatedAllocationMemoryAllocateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDedicatedAllocationMemoryAllocateInfoNV` + public static VkDedicatedAllocationMemoryAllocateInfoNV alloc(SegmentAllocator allocator) { return new VkDedicatedAllocationMemoryAllocateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDedicatedAllocationMemoryAllocateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDedicatedAllocationMemoryAllocateInfoNV` + public static VkDedicatedAllocationMemoryAllocateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkDedicatedAllocationMemoryAllocateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDedicatedAllocationMemoryAllocateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDedicatedAllocationMemoryAllocateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDedicatedAllocationMemoryAllocateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDedicatedAllocationMemoryAllocateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDedicatedAllocationMemoryAllocateInfoNV sType(@CType("VkStructureType") int value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDedicatedAllocationMemoryAllocateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDedicatedAllocationMemoryAllocateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDedicatedAllocationMemoryAllocateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDedicatedAllocationMemoryAllocateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDedicatedAllocationMemoryAllocateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkDedicatedAllocationMemoryAllocateInfoNV.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkDedicatedAllocationMemoryAllocateInfoNV.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkDedicatedAllocationMemoryAllocateInfoNV.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDedicatedAllocationMemoryAllocateInfoNV imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkDedicatedAllocationMemoryAllocateInfoNV image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_image(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkDedicatedAllocationMemoryAllocateInfoNV.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkDedicatedAllocationMemoryAllocateInfoNV.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkDedicatedAllocationMemoryAllocateInfoNV.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDedicatedAllocationMemoryAllocateInfoNV bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkDedicatedAllocationMemoryAllocateInfoNV buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkDedicatedAllocationMemoryAllocateInfoNV.set_buffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDeviceDiagnosticsConfigCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDeviceDiagnosticsConfigCreateInfoNV.java new file mode 100644 index 00000000..4b097acf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDeviceDiagnosticsConfigCreateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceDiagnosticsConfigCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceDiagnosticsConfigFlagsNV flags; +/// } VkDeviceDiagnosticsConfigCreateInfoNV; +/// ``` +public final class VkDeviceDiagnosticsConfigCreateInfoNV extends Struct { + /// The struct layout of `VkDeviceDiagnosticsConfigCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkDeviceDiagnosticsConfigCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkDeviceDiagnosticsConfigCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceDiagnosticsConfigCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceDiagnosticsConfigCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceDiagnosticsConfigCreateInfoNV(segment); } + + /// Creates `VkDeviceDiagnosticsConfigCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceDiagnosticsConfigCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceDiagnosticsConfigCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceDiagnosticsConfigCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceDiagnosticsConfigCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceDiagnosticsConfigCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceDiagnosticsConfigCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceDiagnosticsConfigCreateInfoNV` + public static VkDeviceDiagnosticsConfigCreateInfoNV alloc(SegmentAllocator allocator) { return new VkDeviceDiagnosticsConfigCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceDiagnosticsConfigCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceDiagnosticsConfigCreateInfoNV` + public static VkDeviceDiagnosticsConfigCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkDeviceDiagnosticsConfigCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceDiagnosticsConfigCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceDiagnosticsConfigCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceDiagnosticsConfigCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceDiagnosticsConfigCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceDiagnosticsConfigCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceDiagnosticsConfigCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceDiagnosticsConfigCreateInfoNV sType(@CType("VkStructureType") int value) { VkDeviceDiagnosticsConfigCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceDiagnosticsConfigCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceDiagnosticsConfigCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceDiagnosticsConfigCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceDiagnosticsConfigCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceDiagnosticsConfigCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceDiagnosticsConfigCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceDiagnosticsConfigCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceDiagnosticsConfigCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceDiagnosticsConfigFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDeviceDiagnosticsConfigFlagsNV") int get_flags(MemorySegment segment) { return VkDeviceDiagnosticsConfigCreateInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDeviceDiagnosticsConfigFlagsNV") int flagsAt(long index) { return VkDeviceDiagnosticsConfigCreateInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDeviceDiagnosticsConfigFlagsNV") int flags() { return VkDeviceDiagnosticsConfigCreateInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDeviceDiagnosticsConfigFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDeviceDiagnosticsConfigFlagsNV") int value) { VkDeviceDiagnosticsConfigCreateInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceDiagnosticsConfigCreateInfoNV flagsAt(long index, @CType("VkDeviceDiagnosticsConfigFlagsNV") int value) { VkDeviceDiagnosticsConfigCreateInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceDiagnosticsConfigCreateInfoNV flags(@CType("VkDeviceDiagnosticsConfigFlagsNV") int value) { VkDeviceDiagnosticsConfigCreateInfoNV.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.java new file mode 100644 index 00000000..7e788a6b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphoreSciSyncPoolRequestCount +/// [VarHandle][#VH_semaphoreSciSyncPoolRequestCount] - [Getter][#semaphoreSciSyncPoolRequestCount()] - [Setter][#semaphoreSciSyncPoolRequestCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t semaphoreSciSyncPoolRequestCount; +/// } VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV; +/// ``` +public final class VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV extends Struct { + /// The struct layout of `VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("semaphoreSciSyncPoolRequestCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphoreSciSyncPoolRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_semaphoreSciSyncPoolRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphoreSciSyncPoolRequestCount")); + + /// Creates `VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV(segment); } + + /// Creates `VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV` + public static VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV alloc(SegmentAllocator allocator) { return new VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV` + public static VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV sType(@CType("VkStructureType") int value) { VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphoreSciSyncPoolRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_semaphoreSciSyncPoolRequestCount(MemorySegment segment, long index) { return (int) VH_semaphoreSciSyncPoolRequestCount.get(segment, 0L, index); } + /// {@return `semaphoreSciSyncPoolRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_semaphoreSciSyncPoolRequestCount(MemorySegment segment) { return VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.get_semaphoreSciSyncPoolRequestCount(segment, 0L); } + /// {@return `semaphoreSciSyncPoolRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int semaphoreSciSyncPoolRequestCountAt(long index) { return VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.get_semaphoreSciSyncPoolRequestCount(this.segment(), index); } + /// {@return `semaphoreSciSyncPoolRequestCount`} + public @CType("uint32_t") int semaphoreSciSyncPoolRequestCount() { return VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.get_semaphoreSciSyncPoolRequestCount(this.segment()); } + /// Sets `semaphoreSciSyncPoolRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphoreSciSyncPoolRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_semaphoreSciSyncPoolRequestCount.set(segment, 0L, index, value); } + /// Sets `semaphoreSciSyncPoolRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphoreSciSyncPoolRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.set_semaphoreSciSyncPoolRequestCount(segment, 0L, value); } + /// Sets `semaphoreSciSyncPoolRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV semaphoreSciSyncPoolRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.set_semaphoreSciSyncPoolRequestCount(this.segment(), index, value); return this; } + /// Sets `semaphoreSciSyncPoolRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV semaphoreSciSyncPoolRequestCount(@CType("uint32_t") int value) { VkDeviceSemaphoreSciSyncPoolReservationCreateInfoNV.set_semaphoreSciSyncPoolRequestCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDisplayModeStereoPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDisplayModeStereoPropertiesNV.java new file mode 100644 index 00000000..215b0b85 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDisplayModeStereoPropertiesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### hdmi3DSupported +/// [VarHandle][#VH_hdmi3DSupported] - [Getter][#hdmi3DSupported()] - [Setter][#hdmi3DSupported(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplayModeStereoPropertiesNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 hdmi3DSupported; +/// } VkDisplayModeStereoPropertiesNV; +/// ``` +public final class VkDisplayModeStereoPropertiesNV extends Struct { + /// The struct layout of `VkDisplayModeStereoPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("hdmi3DSupported") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `hdmi3DSupported` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hdmi3DSupported = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hdmi3DSupported")); + + /// Creates `VkDisplayModeStereoPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkDisplayModeStereoPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplayModeStereoPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeStereoPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeStereoPropertiesNV(segment); } + + /// Creates `VkDisplayModeStereoPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeStereoPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeStereoPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplayModeStereoPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplayModeStereoPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplayModeStereoPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplayModeStereoPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplayModeStereoPropertiesNV` + public static VkDisplayModeStereoPropertiesNV alloc(SegmentAllocator allocator) { return new VkDisplayModeStereoPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplayModeStereoPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplayModeStereoPropertiesNV` + public static VkDisplayModeStereoPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkDisplayModeStereoPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplayModeStereoPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplayModeStereoPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplayModeStereoPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplayModeStereoPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeStereoPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplayModeStereoPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeStereoPropertiesNV sType(@CType("VkStructureType") int value) { VkDisplayModeStereoPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplayModeStereoPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplayModeStereoPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDisplayModeStereoPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayModeStereoPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeStereoPropertiesNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayModeStereoPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeStereoPropertiesNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplayModeStereoPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `hdmi3DSupported` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hdmi3DSupported(MemorySegment segment, long index) { return (int) VH_hdmi3DSupported.get(segment, 0L, index); } + /// {@return `hdmi3DSupported`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hdmi3DSupported(MemorySegment segment) { return VkDisplayModeStereoPropertiesNV.get_hdmi3DSupported(segment, 0L); } + /// {@return `hdmi3DSupported` at the given index} + /// @param index the index + public @CType("VkBool32") int hdmi3DSupportedAt(long index) { return VkDisplayModeStereoPropertiesNV.get_hdmi3DSupported(this.segment(), index); } + /// {@return `hdmi3DSupported`} + public @CType("VkBool32") int hdmi3DSupported() { return VkDisplayModeStereoPropertiesNV.get_hdmi3DSupported(this.segment()); } + /// Sets `hdmi3DSupported` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hdmi3DSupported(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hdmi3DSupported.set(segment, 0L, index, value); } + /// Sets `hdmi3DSupported` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hdmi3DSupported(MemorySegment segment, @CType("VkBool32") int value) { VkDisplayModeStereoPropertiesNV.set_hdmi3DSupported(segment, 0L, value); } + /// Sets `hdmi3DSupported` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplayModeStereoPropertiesNV hdmi3DSupportedAt(long index, @CType("VkBool32") int value) { VkDisplayModeStereoPropertiesNV.set_hdmi3DSupported(this.segment(), index, value); return this; } + /// Sets `hdmi3DSupported` with the given value. + /// @param value the value + /// @return `this` + public VkDisplayModeStereoPropertiesNV hdmi3DSupported(@CType("VkBool32") int value) { VkDisplayModeStereoPropertiesNV.set_hdmi3DSupported(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDisplaySurfaceStereoCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDisplaySurfaceStereoCreateInfoNV.java new file mode 100644 index 00000000..f27a6171 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDisplaySurfaceStereoCreateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stereoType +/// [VarHandle][#VH_stereoType] - [Getter][#stereoType()] - [Setter][#stereoType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDisplaySurfaceStereoCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkDisplaySurfaceStereoTypeNV stereoType; +/// } VkDisplaySurfaceStereoCreateInfoNV; +/// ``` +public final class VkDisplaySurfaceStereoCreateInfoNV extends Struct { + /// The struct layout of `VkDisplaySurfaceStereoCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stereoType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stereoType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stereoType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stereoType")); + + /// Creates `VkDisplaySurfaceStereoCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkDisplaySurfaceStereoCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDisplaySurfaceStereoCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplaySurfaceStereoCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplaySurfaceStereoCreateInfoNV(segment); } + + /// Creates `VkDisplaySurfaceStereoCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplaySurfaceStereoCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplaySurfaceStereoCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDisplaySurfaceStereoCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDisplaySurfaceStereoCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDisplaySurfaceStereoCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDisplaySurfaceStereoCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDisplaySurfaceStereoCreateInfoNV` + public static VkDisplaySurfaceStereoCreateInfoNV alloc(SegmentAllocator allocator) { return new VkDisplaySurfaceStereoCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDisplaySurfaceStereoCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDisplaySurfaceStereoCreateInfoNV` + public static VkDisplaySurfaceStereoCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkDisplaySurfaceStereoCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDisplaySurfaceStereoCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDisplaySurfaceStereoCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDisplaySurfaceStereoCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDisplaySurfaceStereoCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceStereoCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkDisplaySurfaceStereoCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceStereoCreateInfoNV sType(@CType("VkStructureType") int value) { VkDisplaySurfaceStereoCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDisplaySurfaceStereoCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDisplaySurfaceStereoCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDisplaySurfaceStereoCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceStereoCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceStereoCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceStereoCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceStereoCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDisplaySurfaceStereoCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `stereoType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDisplaySurfaceStereoTypeNV") int get_stereoType(MemorySegment segment, long index) { return (int) VH_stereoType.get(segment, 0L, index); } + /// {@return `stereoType`} + /// @param segment the segment of the struct + public static @CType("VkDisplaySurfaceStereoTypeNV") int get_stereoType(MemorySegment segment) { return VkDisplaySurfaceStereoCreateInfoNV.get_stereoType(segment, 0L); } + /// {@return `stereoType` at the given index} + /// @param index the index + public @CType("VkDisplaySurfaceStereoTypeNV") int stereoTypeAt(long index) { return VkDisplaySurfaceStereoCreateInfoNV.get_stereoType(this.segment(), index); } + /// {@return `stereoType`} + public @CType("VkDisplaySurfaceStereoTypeNV") int stereoType() { return VkDisplaySurfaceStereoCreateInfoNV.get_stereoType(this.segment()); } + /// Sets `stereoType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stereoType(MemorySegment segment, long index, @CType("VkDisplaySurfaceStereoTypeNV") int value) { VH_stereoType.set(segment, 0L, index, value); } + /// Sets `stereoType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stereoType(MemorySegment segment, @CType("VkDisplaySurfaceStereoTypeNV") int value) { VkDisplaySurfaceStereoCreateInfoNV.set_stereoType(segment, 0L, value); } + /// Sets `stereoType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDisplaySurfaceStereoCreateInfoNV stereoTypeAt(long index, @CType("VkDisplaySurfaceStereoTypeNV") int value) { VkDisplaySurfaceStereoCreateInfoNV.set_stereoType(this.segment(), index, value); return this; } + /// Sets `stereoType` with the given value. + /// @param value the value + /// @return `this` + public VkDisplaySurfaceStereoCreateInfoNV stereoType(@CType("VkDisplaySurfaceStereoTypeNV") int value) { VkDisplaySurfaceStereoCreateInfoNV.set_stereoType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDrawMeshTasksIndirectCommandNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDrawMeshTasksIndirectCommandNV.java new file mode 100644 index 00000000..52229da0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkDrawMeshTasksIndirectCommandNV.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### taskCount +/// [VarHandle][#VH_taskCount] - [Getter][#taskCount()] - [Setter][#taskCount(int)] +/// ### firstTask +/// [VarHandle][#VH_firstTask] - [Getter][#firstTask()] - [Setter][#firstTask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDrawMeshTasksIndirectCommandNV { +/// uint32_t taskCount; +/// uint32_t firstTask; +/// } VkDrawMeshTasksIndirectCommandNV; +/// ``` +public final class VkDrawMeshTasksIndirectCommandNV extends Struct { + /// The struct layout of `VkDrawMeshTasksIndirectCommandNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("taskCount"), + ValueLayout.JAVA_INT.withName("firstTask") + ); + /// The [VarHandle] of `taskCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_taskCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("taskCount")); + /// The [VarHandle] of `firstTask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstTask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstTask")); + + /// Creates `VkDrawMeshTasksIndirectCommandNV` with the given segment. + /// @param segment the memory segment + public VkDrawMeshTasksIndirectCommandNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDrawMeshTasksIndirectCommandNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawMeshTasksIndirectCommandNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawMeshTasksIndirectCommandNV(segment); } + + /// Creates `VkDrawMeshTasksIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawMeshTasksIndirectCommandNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawMeshTasksIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDrawMeshTasksIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawMeshTasksIndirectCommandNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawMeshTasksIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDrawMeshTasksIndirectCommandNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDrawMeshTasksIndirectCommandNV` + public static VkDrawMeshTasksIndirectCommandNV alloc(SegmentAllocator allocator) { return new VkDrawMeshTasksIndirectCommandNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDrawMeshTasksIndirectCommandNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDrawMeshTasksIndirectCommandNV` + public static VkDrawMeshTasksIndirectCommandNV alloc(SegmentAllocator allocator, long count) { return new VkDrawMeshTasksIndirectCommandNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `taskCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_taskCount(MemorySegment segment, long index) { return (int) VH_taskCount.get(segment, 0L, index); } + /// {@return `taskCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_taskCount(MemorySegment segment) { return VkDrawMeshTasksIndirectCommandNV.get_taskCount(segment, 0L); } + /// {@return `taskCount` at the given index} + /// @param index the index + public @CType("uint32_t") int taskCountAt(long index) { return VkDrawMeshTasksIndirectCommandNV.get_taskCount(this.segment(), index); } + /// {@return `taskCount`} + public @CType("uint32_t") int taskCount() { return VkDrawMeshTasksIndirectCommandNV.get_taskCount(this.segment()); } + /// Sets `taskCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_taskCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_taskCount.set(segment, 0L, index, value); } + /// Sets `taskCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_taskCount(MemorySegment segment, @CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandNV.set_taskCount(segment, 0L, value); } + /// Sets `taskCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawMeshTasksIndirectCommandNV taskCountAt(long index, @CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandNV.set_taskCount(this.segment(), index, value); return this; } + /// Sets `taskCount` with the given value. + /// @param value the value + /// @return `this` + public VkDrawMeshTasksIndirectCommandNV taskCount(@CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandNV.set_taskCount(this.segment(), value); return this; } + + /// {@return `firstTask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstTask(MemorySegment segment, long index) { return (int) VH_firstTask.get(segment, 0L, index); } + /// {@return `firstTask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstTask(MemorySegment segment) { return VkDrawMeshTasksIndirectCommandNV.get_firstTask(segment, 0L); } + /// {@return `firstTask` at the given index} + /// @param index the index + public @CType("uint32_t") int firstTaskAt(long index) { return VkDrawMeshTasksIndirectCommandNV.get_firstTask(this.segment(), index); } + /// {@return `firstTask`} + public @CType("uint32_t") int firstTask() { return VkDrawMeshTasksIndirectCommandNV.get_firstTask(this.segment()); } + /// Sets `firstTask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstTask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstTask.set(segment, 0L, index, value); } + /// Sets `firstTask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstTask(MemorySegment segment, @CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandNV.set_firstTask(segment, 0L, value); } + /// Sets `firstTask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawMeshTasksIndirectCommandNV firstTaskAt(long index, @CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandNV.set_firstTask(this.segment(), index, value); return this; } + /// Sets `firstTask` with the given value. + /// @param value the value + /// @return `this` + public VkDrawMeshTasksIndirectCommandNV firstTask(@CType("uint32_t") int value) { VkDrawMeshTasksIndirectCommandNV.set_firstTask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportFenceSciSyncInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportFenceSciSyncInfoNV.java new file mode 100644 index 00000000..29d9bb52 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportFenceSciSyncInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pAttributes +/// [VarHandle][#VH_pAttributes] - [Getter][#pAttributes()] - [Setter][#pAttributes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportFenceSciSyncInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// NvSciSyncAttrList pAttributes; +/// } VkExportFenceSciSyncInfoNV; +/// ``` +public final class VkExportFenceSciSyncInfoNV extends Struct { + /// The struct layout of `VkExportFenceSciSyncInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pAttributes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pAttributes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttributes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttributes")); + + /// Creates `VkExportFenceSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + public VkExportFenceSciSyncInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportFenceSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportFenceSciSyncInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportFenceSciSyncInfoNV(segment); } + + /// Creates `VkExportFenceSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportFenceSciSyncInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportFenceSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportFenceSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportFenceSciSyncInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportFenceSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportFenceSciSyncInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportFenceSciSyncInfoNV` + public static VkExportFenceSciSyncInfoNV alloc(SegmentAllocator allocator) { return new VkExportFenceSciSyncInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportFenceSciSyncInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportFenceSciSyncInfoNV` + public static VkExportFenceSciSyncInfoNV alloc(SegmentAllocator allocator, long count) { return new VkExportFenceSciSyncInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportFenceSciSyncInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportFenceSciSyncInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportFenceSciSyncInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportFenceSciSyncInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceSciSyncInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkExportFenceSciSyncInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceSciSyncInfoNV sType(@CType("VkStructureType") int value) { VkExportFenceSciSyncInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportFenceSciSyncInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportFenceSciSyncInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportFenceSciSyncInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportFenceSciSyncInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceSciSyncInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportFenceSciSyncInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceSciSyncInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportFenceSciSyncInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `pAttributes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttributes.get(segment, 0L, index); } + /// {@return `pAttributes`} + /// @param segment the segment of the struct + public static @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment) { return VkExportFenceSciSyncInfoNV.get_pAttributes(segment, 0L); } + /// {@return `pAttributes` at the given index} + /// @param index the index + public @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment pAttributesAt(long index) { return VkExportFenceSciSyncInfoNV.get_pAttributes(this.segment(), index); } + /// {@return `pAttributes`} + public @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment pAttributes() { return VkExportFenceSciSyncInfoNV.get_pAttributes(this.segment()); } + /// Sets `pAttributes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttributes(MemorySegment segment, long index, @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment value) { VH_pAttributes.set(segment, 0L, index, value); } + /// Sets `pAttributes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttributes(MemorySegment segment, @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment value) { VkExportFenceSciSyncInfoNV.set_pAttributes(segment, 0L, value); } + /// Sets `pAttributes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceSciSyncInfoNV pAttributesAt(long index, @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment value) { VkExportFenceSciSyncInfoNV.set_pAttributes(this.segment(), index, value); return this; } + /// Sets `pAttributes` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceSciSyncInfoNV pAttributes(@CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment value) { VkExportFenceSciSyncInfoNV.set_pAttributes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportMemoryAllocateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportMemoryAllocateInfoNV.java new file mode 100644 index 00000000..21772bc2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportMemoryAllocateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleTypes +/// [VarHandle][#VH_handleTypes] - [Getter][#handleTypes()] - [Setter][#handleTypes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMemoryAllocateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlagsNV handleTypes; +/// } VkExportMemoryAllocateInfoNV; +/// ``` +public final class VkExportMemoryAllocateInfoNV extends Struct { + /// The struct layout of `VkExportMemoryAllocateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleTypes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleTypes")); + + /// Creates `VkExportMemoryAllocateInfoNV` with the given segment. + /// @param segment the memory segment + public VkExportMemoryAllocateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMemoryAllocateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryAllocateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryAllocateInfoNV(segment); } + + /// Creates `VkExportMemoryAllocateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryAllocateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryAllocateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMemoryAllocateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryAllocateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryAllocateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMemoryAllocateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMemoryAllocateInfoNV` + public static VkExportMemoryAllocateInfoNV alloc(SegmentAllocator allocator) { return new VkExportMemoryAllocateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMemoryAllocateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMemoryAllocateInfoNV` + public static VkExportMemoryAllocateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkExportMemoryAllocateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMemoryAllocateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMemoryAllocateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMemoryAllocateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMemoryAllocateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMemoryAllocateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfoNV sType(@CType("VkStructureType") int value) { VkExportMemoryAllocateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMemoryAllocateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMemoryAllocateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMemoryAllocateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryAllocateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryAllocateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryAllocateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `handleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagsNV") int get_handleTypes(MemorySegment segment, long index) { return (int) VH_handleTypes.get(segment, 0L, index); } + /// {@return `handleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagsNV") int get_handleTypes(MemorySegment segment) { return VkExportMemoryAllocateInfoNV.get_handleTypes(segment, 0L); } + /// {@return `handleTypes` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagsNV") int handleTypesAt(long index) { return VkExportMemoryAllocateInfoNV.get_handleTypes(this.segment(), index); } + /// {@return `handleTypes`} + public @CType("VkExternalMemoryHandleTypeFlagsNV") int handleTypes() { return VkExportMemoryAllocateInfoNV.get_handleTypes(this.segment()); } + /// Sets `handleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleTypes(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VH_handleTypes.set(segment, 0L, index, value); } + /// Sets `handleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleTypes(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExportMemoryAllocateInfoNV.set_handleTypes(segment, 0L, value); } + /// Sets `handleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfoNV handleTypesAt(long index, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExportMemoryAllocateInfoNV.set_handleTypes(this.segment(), index, value); return this; } + /// Sets `handleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfoNV handleTypes(@CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExportMemoryAllocateInfoNV.set_handleTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportMemorySciBufInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportMemorySciBufInfoNV.java new file mode 100644 index 00000000..425c62e4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportMemorySciBufInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pAttributes +/// [VarHandle][#VH_pAttributes] - [Getter][#pAttributes()] - [Setter][#pAttributes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMemorySciBufInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// NvSciBufAttrList pAttributes; +/// } VkExportMemorySciBufInfoNV; +/// ``` +public final class VkExportMemorySciBufInfoNV extends Struct { + /// The struct layout of `VkExportMemorySciBufInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pAttributes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pAttributes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttributes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttributes")); + + /// Creates `VkExportMemorySciBufInfoNV` with the given segment. + /// @param segment the memory segment + public VkExportMemorySciBufInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMemorySciBufInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemorySciBufInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemorySciBufInfoNV(segment); } + + /// Creates `VkExportMemorySciBufInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemorySciBufInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemorySciBufInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMemorySciBufInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemorySciBufInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemorySciBufInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMemorySciBufInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMemorySciBufInfoNV` + public static VkExportMemorySciBufInfoNV alloc(SegmentAllocator allocator) { return new VkExportMemorySciBufInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMemorySciBufInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMemorySciBufInfoNV` + public static VkExportMemorySciBufInfoNV alloc(SegmentAllocator allocator, long count) { return new VkExportMemorySciBufInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMemorySciBufInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMemorySciBufInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMemorySciBufInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMemorySciBufInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemorySciBufInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMemorySciBufInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemorySciBufInfoNV sType(@CType("VkStructureType") int value) { VkExportMemorySciBufInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMemorySciBufInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMemorySciBufInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMemorySciBufInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemorySciBufInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemorySciBufInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemorySciBufInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemorySciBufInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemorySciBufInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `pAttributes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("NvSciBufAttrList") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttributes.get(segment, 0L, index); } + /// {@return `pAttributes`} + /// @param segment the segment of the struct + public static @CType("NvSciBufAttrList") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment) { return VkExportMemorySciBufInfoNV.get_pAttributes(segment, 0L); } + /// {@return `pAttributes` at the given index} + /// @param index the index + public @CType("NvSciBufAttrList") java.lang.foreign.MemorySegment pAttributesAt(long index) { return VkExportMemorySciBufInfoNV.get_pAttributes(this.segment(), index); } + /// {@return `pAttributes`} + public @CType("NvSciBufAttrList") java.lang.foreign.MemorySegment pAttributes() { return VkExportMemorySciBufInfoNV.get_pAttributes(this.segment()); } + /// Sets `pAttributes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttributes(MemorySegment segment, long index, @CType("NvSciBufAttrList") java.lang.foreign.MemorySegment value) { VH_pAttributes.set(segment, 0L, index, value); } + /// Sets `pAttributes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttributes(MemorySegment segment, @CType("NvSciBufAttrList") java.lang.foreign.MemorySegment value) { VkExportMemorySciBufInfoNV.set_pAttributes(segment, 0L, value); } + /// Sets `pAttributes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemorySciBufInfoNV pAttributesAt(long index, @CType("NvSciBufAttrList") java.lang.foreign.MemorySegment value) { VkExportMemorySciBufInfoNV.set_pAttributes(this.segment(), index, value); return this; } + /// Sets `pAttributes` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemorySciBufInfoNV pAttributes(@CType("NvSciBufAttrList") java.lang.foreign.MemorySegment value) { VkExportMemorySciBufInfoNV.set_pAttributes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportMemoryWin32HandleInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportMemoryWin32HandleInfoNV.java new file mode 100644 index 00000000..5a685c80 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportMemoryWin32HandleInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pAttributes +/// [VarHandle][#VH_pAttributes] - [Getter][#pAttributes()] - [Setter][#pAttributes(java.lang.foreign.MemorySegment)] +/// ### dwAccess +/// [VarHandle][#VH_dwAccess] - [Getter][#dwAccess()] - [Setter][#dwAccess(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMemoryWin32HandleInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// const SECURITY_ATTRIBUTES * pAttributes; +/// DWORD dwAccess; +/// } VkExportMemoryWin32HandleInfoNV; +/// ``` +public final class VkExportMemoryWin32HandleInfoNV extends Struct { + /// The struct layout of `VkExportMemoryWin32HandleInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pAttributes"), + ValueLayout.JAVA_INT.withName("dwAccess") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pAttributes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttributes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttributes")); + /// The [VarHandle] of `dwAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dwAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dwAccess")); + + /// Creates `VkExportMemoryWin32HandleInfoNV` with the given segment. + /// @param segment the memory segment + public VkExportMemoryWin32HandleInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMemoryWin32HandleInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryWin32HandleInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryWin32HandleInfoNV(segment); } + + /// Creates `VkExportMemoryWin32HandleInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryWin32HandleInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryWin32HandleInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMemoryWin32HandleInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryWin32HandleInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryWin32HandleInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMemoryWin32HandleInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMemoryWin32HandleInfoNV` + public static VkExportMemoryWin32HandleInfoNV alloc(SegmentAllocator allocator) { return new VkExportMemoryWin32HandleInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMemoryWin32HandleInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMemoryWin32HandleInfoNV` + public static VkExportMemoryWin32HandleInfoNV alloc(SegmentAllocator allocator, long count) { return new VkExportMemoryWin32HandleInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMemoryWin32HandleInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMemoryWin32HandleInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMemoryWin32HandleInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMemoryWin32HandleInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMemoryWin32HandleInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoNV sType(@CType("VkStructureType") int value) { VkExportMemoryWin32HandleInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMemoryWin32HandleInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMemoryWin32HandleInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMemoryWin32HandleInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `pAttributes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttributes.get(segment, 0L, index); } + /// {@return `pAttributes`} + /// @param segment the segment of the struct + public static @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment) { return VkExportMemoryWin32HandleInfoNV.get_pAttributes(segment, 0L); } + /// {@return `pAttributes` at the given index} + /// @param index the index + public @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment pAttributesAt(long index) { return VkExportMemoryWin32HandleInfoNV.get_pAttributes(this.segment(), index); } + /// {@return `pAttributes`} + public @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment pAttributes() { return VkExportMemoryWin32HandleInfoNV.get_pAttributes(this.segment()); } + /// Sets `pAttributes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttributes(MemorySegment segment, long index, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VH_pAttributes.set(segment, 0L, index, value); } + /// Sets `pAttributes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttributes(MemorySegment segment, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoNV.set_pAttributes(segment, 0L, value); } + /// Sets `pAttributes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoNV pAttributesAt(long index, @CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoNV.set_pAttributes(this.segment(), index, value); return this; } + /// Sets `pAttributes` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoNV pAttributes(@CType("const SECURITY_ATTRIBUTES *") java.lang.foreign.MemorySegment value) { VkExportMemoryWin32HandleInfoNV.set_pAttributes(this.segment(), value); return this; } + + /// {@return `dwAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("DWORD") int get_dwAccess(MemorySegment segment, long index) { return (int) VH_dwAccess.get(segment, 0L, index); } + /// {@return `dwAccess`} + /// @param segment the segment of the struct + public static @CType("DWORD") int get_dwAccess(MemorySegment segment) { return VkExportMemoryWin32HandleInfoNV.get_dwAccess(segment, 0L); } + /// {@return `dwAccess` at the given index} + /// @param index the index + public @CType("DWORD") int dwAccessAt(long index) { return VkExportMemoryWin32HandleInfoNV.get_dwAccess(this.segment(), index); } + /// {@return `dwAccess`} + public @CType("DWORD") int dwAccess() { return VkExportMemoryWin32HandleInfoNV.get_dwAccess(this.segment()); } + /// Sets `dwAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dwAccess(MemorySegment segment, long index, @CType("DWORD") int value) { VH_dwAccess.set(segment, 0L, index, value); } + /// Sets `dwAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dwAccess(MemorySegment segment, @CType("DWORD") int value) { VkExportMemoryWin32HandleInfoNV.set_dwAccess(segment, 0L, value); } + /// Sets `dwAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoNV dwAccessAt(long index, @CType("DWORD") int value) { VkExportMemoryWin32HandleInfoNV.set_dwAccess(this.segment(), index, value); return this; } + /// Sets `dwAccess` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryWin32HandleInfoNV dwAccess(@CType("DWORD") int value) { VkExportMemoryWin32HandleInfoNV.set_dwAccess(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportSemaphoreSciSyncInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportSemaphoreSciSyncInfoNV.java new file mode 100644 index 00000000..0c0c1052 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExportSemaphoreSciSyncInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pAttributes +/// [VarHandle][#VH_pAttributes] - [Getter][#pAttributes()] - [Setter][#pAttributes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportSemaphoreSciSyncInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// NvSciSyncAttrList pAttributes; +/// } VkExportSemaphoreSciSyncInfoNV; +/// ``` +public final class VkExportSemaphoreSciSyncInfoNV extends Struct { + /// The struct layout of `VkExportSemaphoreSciSyncInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pAttributes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pAttributes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttributes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttributes")); + + /// Creates `VkExportSemaphoreSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + public VkExportSemaphoreSciSyncInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportSemaphoreSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportSemaphoreSciSyncInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportSemaphoreSciSyncInfoNV(segment); } + + /// Creates `VkExportSemaphoreSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportSemaphoreSciSyncInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportSemaphoreSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportSemaphoreSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportSemaphoreSciSyncInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportSemaphoreSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportSemaphoreSciSyncInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportSemaphoreSciSyncInfoNV` + public static VkExportSemaphoreSciSyncInfoNV alloc(SegmentAllocator allocator) { return new VkExportSemaphoreSciSyncInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportSemaphoreSciSyncInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportSemaphoreSciSyncInfoNV` + public static VkExportSemaphoreSciSyncInfoNV alloc(SegmentAllocator allocator, long count) { return new VkExportSemaphoreSciSyncInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportSemaphoreSciSyncInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportSemaphoreSciSyncInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportSemaphoreSciSyncInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportSemaphoreSciSyncInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreSciSyncInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkExportSemaphoreSciSyncInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreSciSyncInfoNV sType(@CType("VkStructureType") int value) { VkExportSemaphoreSciSyncInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportSemaphoreSciSyncInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportSemaphoreSciSyncInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportSemaphoreSciSyncInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreSciSyncInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreSciSyncInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreSciSyncInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreSciSyncInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreSciSyncInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `pAttributes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttributes.get(segment, 0L, index); } + /// {@return `pAttributes`} + /// @param segment the segment of the struct + public static @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment get_pAttributes(MemorySegment segment) { return VkExportSemaphoreSciSyncInfoNV.get_pAttributes(segment, 0L); } + /// {@return `pAttributes` at the given index} + /// @param index the index + public @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment pAttributesAt(long index) { return VkExportSemaphoreSciSyncInfoNV.get_pAttributes(this.segment(), index); } + /// {@return `pAttributes`} + public @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment pAttributes() { return VkExportSemaphoreSciSyncInfoNV.get_pAttributes(this.segment()); } + /// Sets `pAttributes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttributes(MemorySegment segment, long index, @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment value) { VH_pAttributes.set(segment, 0L, index, value); } + /// Sets `pAttributes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttributes(MemorySegment segment, @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment value) { VkExportSemaphoreSciSyncInfoNV.set_pAttributes(segment, 0L, value); } + /// Sets `pAttributes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreSciSyncInfoNV pAttributesAt(long index, @CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment value) { VkExportSemaphoreSciSyncInfoNV.set_pAttributes(this.segment(), index, value); return this; } + /// Sets `pAttributes` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreSciSyncInfoNV pAttributes(@CType("NvSciSyncAttrList") java.lang.foreign.MemorySegment value) { VkExportSemaphoreSciSyncInfoNV.set_pAttributes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExternalImageFormatPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExternalImageFormatPropertiesNV.java new file mode 100644 index 00000000..985d9e65 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExternalImageFormatPropertiesNV.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### imageFormatProperties +/// [Byte offset][#OFFSET_imageFormatProperties] - [Memory layout][#ML_imageFormatProperties] - [Getter][#imageFormatProperties()] - [Setter][#imageFormatProperties(java.lang.foreign.MemorySegment)] +/// ### externalMemoryFeatures +/// [VarHandle][#VH_externalMemoryFeatures] - [Getter][#externalMemoryFeatures()] - [Setter][#externalMemoryFeatures(int)] +/// ### exportFromImportedHandleTypes +/// [VarHandle][#VH_exportFromImportedHandleTypes] - [Getter][#exportFromImportedHandleTypes()] - [Setter][#exportFromImportedHandleTypes(int)] +/// ### compatibleHandleTypes +/// [VarHandle][#VH_compatibleHandleTypes] - [Getter][#compatibleHandleTypes()] - [Setter][#compatibleHandleTypes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalImageFormatPropertiesNV { +/// VkImageFormatProperties imageFormatProperties; +/// VkExternalMemoryFeatureFlagsNV externalMemoryFeatures; +/// VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes; +/// VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes; +/// } VkExternalImageFormatPropertiesNV; +/// ``` +public final class VkExternalImageFormatPropertiesNV extends Struct { + /// The struct layout of `VkExternalImageFormatPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkImageFormatProperties.LAYOUT.withName("imageFormatProperties"), + ValueLayout.JAVA_INT.withName("externalMemoryFeatures"), + ValueLayout.JAVA_INT.withName("exportFromImportedHandleTypes"), + ValueLayout.JAVA_INT.withName("compatibleHandleTypes") + ); + /// The byte offset of `imageFormatProperties`. + public static final long OFFSET_imageFormatProperties = LAYOUT.byteOffset(PathElement.groupElement("imageFormatProperties")); + /// The memory layout of `imageFormatProperties`. + public static final MemoryLayout ML_imageFormatProperties = LAYOUT.select(PathElement.groupElement("imageFormatProperties")); + /// The [VarHandle] of `externalMemoryFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_externalMemoryFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalMemoryFeatures")); + /// The [VarHandle] of `exportFromImportedHandleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_exportFromImportedHandleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("exportFromImportedHandleTypes")); + /// The [VarHandle] of `compatibleHandleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compatibleHandleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compatibleHandleTypes")); + + /// Creates `VkExternalImageFormatPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkExternalImageFormatPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalImageFormatPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalImageFormatPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalImageFormatPropertiesNV(segment); } + + /// Creates `VkExternalImageFormatPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalImageFormatPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalImageFormatPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalImageFormatPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalImageFormatPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalImageFormatPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalImageFormatPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalImageFormatPropertiesNV` + public static VkExternalImageFormatPropertiesNV alloc(SegmentAllocator allocator) { return new VkExternalImageFormatPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalImageFormatPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalImageFormatPropertiesNV` + public static VkExternalImageFormatPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkExternalImageFormatPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `imageFormatProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment get_imageFormatProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageFormatProperties, index), ML_imageFormatProperties); } + /// {@return `imageFormatProperties`} + /// @param segment the segment of the struct + public static @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment get_imageFormatProperties(MemorySegment segment) { return VkExternalImageFormatPropertiesNV.get_imageFormatProperties(segment, 0L); } + /// {@return `imageFormatProperties` at the given index} + /// @param index the index + public @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment imageFormatPropertiesAt(long index) { return VkExternalImageFormatPropertiesNV.get_imageFormatProperties(this.segment(), index); } + /// {@return `imageFormatProperties`} + public @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment imageFormatProperties() { return VkExternalImageFormatPropertiesNV.get_imageFormatProperties(this.segment()); } + /// Sets `imageFormatProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageFormatProperties(MemorySegment segment, long index, @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageFormatProperties, index), ML_imageFormatProperties.byteSize()); } + /// Sets `imageFormatProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageFormatProperties(MemorySegment segment, @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment value) { VkExternalImageFormatPropertiesNV.set_imageFormatProperties(segment, 0L, value); } + /// Sets `imageFormatProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalImageFormatPropertiesNV imageFormatPropertiesAt(long index, @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment value) { VkExternalImageFormatPropertiesNV.set_imageFormatProperties(this.segment(), index, value); return this; } + /// Sets `imageFormatProperties` with the given value. + /// @param value the value + /// @return `this` + public VkExternalImageFormatPropertiesNV imageFormatProperties(@CType("VkImageFormatProperties") java.lang.foreign.MemorySegment value) { VkExternalImageFormatPropertiesNV.set_imageFormatProperties(this.segment(), value); return this; } + + /// {@return `externalMemoryFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryFeatureFlagsNV") int get_externalMemoryFeatures(MemorySegment segment, long index) { return (int) VH_externalMemoryFeatures.get(segment, 0L, index); } + /// {@return `externalMemoryFeatures`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryFeatureFlagsNV") int get_externalMemoryFeatures(MemorySegment segment) { return VkExternalImageFormatPropertiesNV.get_externalMemoryFeatures(segment, 0L); } + /// {@return `externalMemoryFeatures` at the given index} + /// @param index the index + public @CType("VkExternalMemoryFeatureFlagsNV") int externalMemoryFeaturesAt(long index) { return VkExternalImageFormatPropertiesNV.get_externalMemoryFeatures(this.segment(), index); } + /// {@return `externalMemoryFeatures`} + public @CType("VkExternalMemoryFeatureFlagsNV") int externalMemoryFeatures() { return VkExternalImageFormatPropertiesNV.get_externalMemoryFeatures(this.segment()); } + /// Sets `externalMemoryFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalMemoryFeatures(MemorySegment segment, long index, @CType("VkExternalMemoryFeatureFlagsNV") int value) { VH_externalMemoryFeatures.set(segment, 0L, index, value); } + /// Sets `externalMemoryFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalMemoryFeatures(MemorySegment segment, @CType("VkExternalMemoryFeatureFlagsNV") int value) { VkExternalImageFormatPropertiesNV.set_externalMemoryFeatures(segment, 0L, value); } + /// Sets `externalMemoryFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalImageFormatPropertiesNV externalMemoryFeaturesAt(long index, @CType("VkExternalMemoryFeatureFlagsNV") int value) { VkExternalImageFormatPropertiesNV.set_externalMemoryFeatures(this.segment(), index, value); return this; } + /// Sets `externalMemoryFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkExternalImageFormatPropertiesNV externalMemoryFeatures(@CType("VkExternalMemoryFeatureFlagsNV") int value) { VkExternalImageFormatPropertiesNV.set_externalMemoryFeatures(this.segment(), value); return this; } + + /// {@return `exportFromImportedHandleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagsNV") int get_exportFromImportedHandleTypes(MemorySegment segment, long index) { return (int) VH_exportFromImportedHandleTypes.get(segment, 0L, index); } + /// {@return `exportFromImportedHandleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagsNV") int get_exportFromImportedHandleTypes(MemorySegment segment) { return VkExternalImageFormatPropertiesNV.get_exportFromImportedHandleTypes(segment, 0L); } + /// {@return `exportFromImportedHandleTypes` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagsNV") int exportFromImportedHandleTypesAt(long index) { return VkExternalImageFormatPropertiesNV.get_exportFromImportedHandleTypes(this.segment(), index); } + /// {@return `exportFromImportedHandleTypes`} + public @CType("VkExternalMemoryHandleTypeFlagsNV") int exportFromImportedHandleTypes() { return VkExternalImageFormatPropertiesNV.get_exportFromImportedHandleTypes(this.segment()); } + /// Sets `exportFromImportedHandleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_exportFromImportedHandleTypes(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VH_exportFromImportedHandleTypes.set(segment, 0L, index, value); } + /// Sets `exportFromImportedHandleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_exportFromImportedHandleTypes(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExternalImageFormatPropertiesNV.set_exportFromImportedHandleTypes(segment, 0L, value); } + /// Sets `exportFromImportedHandleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalImageFormatPropertiesNV exportFromImportedHandleTypesAt(long index, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExternalImageFormatPropertiesNV.set_exportFromImportedHandleTypes(this.segment(), index, value); return this; } + /// Sets `exportFromImportedHandleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalImageFormatPropertiesNV exportFromImportedHandleTypes(@CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExternalImageFormatPropertiesNV.set_exportFromImportedHandleTypes(this.segment(), value); return this; } + + /// {@return `compatibleHandleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagsNV") int get_compatibleHandleTypes(MemorySegment segment, long index) { return (int) VH_compatibleHandleTypes.get(segment, 0L, index); } + /// {@return `compatibleHandleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagsNV") int get_compatibleHandleTypes(MemorySegment segment) { return VkExternalImageFormatPropertiesNV.get_compatibleHandleTypes(segment, 0L); } + /// {@return `compatibleHandleTypes` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagsNV") int compatibleHandleTypesAt(long index) { return VkExternalImageFormatPropertiesNV.get_compatibleHandleTypes(this.segment(), index); } + /// {@return `compatibleHandleTypes`} + public @CType("VkExternalMemoryHandleTypeFlagsNV") int compatibleHandleTypes() { return VkExternalImageFormatPropertiesNV.get_compatibleHandleTypes(this.segment()); } + /// Sets `compatibleHandleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compatibleHandleTypes(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VH_compatibleHandleTypes.set(segment, 0L, index, value); } + /// Sets `compatibleHandleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compatibleHandleTypes(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExternalImageFormatPropertiesNV.set_compatibleHandleTypes(segment, 0L, value); } + /// Sets `compatibleHandleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalImageFormatPropertiesNV compatibleHandleTypesAt(long index, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExternalImageFormatPropertiesNV.set_compatibleHandleTypes(this.segment(), index, value); return this; } + /// Sets `compatibleHandleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalImageFormatPropertiesNV compatibleHandleTypes(@CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExternalImageFormatPropertiesNV.set_compatibleHandleTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExternalMemoryImageCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExternalMemoryImageCreateInfoNV.java new file mode 100644 index 00000000..6612864e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkExternalMemoryImageCreateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleTypes +/// [VarHandle][#VH_handleTypes] - [Getter][#handleTypes()] - [Setter][#handleTypes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalMemoryImageCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlagsNV handleTypes; +/// } VkExternalMemoryImageCreateInfoNV; +/// ``` +public final class VkExternalMemoryImageCreateInfoNV extends Struct { + /// The struct layout of `VkExternalMemoryImageCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleTypes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleTypes")); + + /// Creates `VkExternalMemoryImageCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkExternalMemoryImageCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalMemoryImageCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryImageCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryImageCreateInfoNV(segment); } + + /// Creates `VkExternalMemoryImageCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryImageCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryImageCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalMemoryImageCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryImageCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryImageCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalMemoryImageCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalMemoryImageCreateInfoNV` + public static VkExternalMemoryImageCreateInfoNV alloc(SegmentAllocator allocator) { return new VkExternalMemoryImageCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalMemoryImageCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalMemoryImageCreateInfoNV` + public static VkExternalMemoryImageCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkExternalMemoryImageCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExternalMemoryImageCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExternalMemoryImageCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExternalMemoryImageCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExternalMemoryImageCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkExternalMemoryImageCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfoNV sType(@CType("VkStructureType") int value) { VkExternalMemoryImageCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExternalMemoryImageCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExternalMemoryImageCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExternalMemoryImageCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryImageCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryImageCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryImageCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `handleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagsNV") int get_handleTypes(MemorySegment segment, long index) { return (int) VH_handleTypes.get(segment, 0L, index); } + /// {@return `handleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagsNV") int get_handleTypes(MemorySegment segment) { return VkExternalMemoryImageCreateInfoNV.get_handleTypes(segment, 0L); } + /// {@return `handleTypes` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagsNV") int handleTypesAt(long index) { return VkExternalMemoryImageCreateInfoNV.get_handleTypes(this.segment(), index); } + /// {@return `handleTypes`} + public @CType("VkExternalMemoryHandleTypeFlagsNV") int handleTypes() { return VkExternalMemoryImageCreateInfoNV.get_handleTypes(this.segment()); } + /// Sets `handleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleTypes(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VH_handleTypes.set(segment, 0L, index, value); } + /// Sets `handleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleTypes(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExternalMemoryImageCreateInfoNV.set_handleTypes(segment, 0L, value); } + /// Sets `handleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfoNV handleTypesAt(long index, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExternalMemoryImageCreateInfoNV.set_handleTypes(this.segment(), index, value); return this; } + /// Sets `handleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfoNV handleTypes(@CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkExternalMemoryImageCreateInfoNV.set_handleTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkFenceGetSciSyncInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkFenceGetSciSyncInfoNV.java new file mode 100644 index 00000000..a890ca13 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkFenceGetSciSyncInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fence +/// [VarHandle][#VH_fence] - [Getter][#fence()] - [Setter][#fence(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFenceGetSciSyncInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkFence fence; +/// VkExternalFenceHandleTypeFlagBits handleType; +/// } VkFenceGetSciSyncInfoNV; +/// ``` +public final class VkFenceGetSciSyncInfoNV extends Struct { + /// The struct layout of `VkFenceGetSciSyncInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("fence"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fence` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_fence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fence")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkFenceGetSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + public VkFenceGetSciSyncInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFenceGetSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceGetSciSyncInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceGetSciSyncInfoNV(segment); } + + /// Creates `VkFenceGetSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceGetSciSyncInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceGetSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFenceGetSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceGetSciSyncInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceGetSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFenceGetSciSyncInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFenceGetSciSyncInfoNV` + public static VkFenceGetSciSyncInfoNV alloc(SegmentAllocator allocator) { return new VkFenceGetSciSyncInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFenceGetSciSyncInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFenceGetSciSyncInfoNV` + public static VkFenceGetSciSyncInfoNV alloc(SegmentAllocator allocator, long count) { return new VkFenceGetSciSyncInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFenceGetSciSyncInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFenceGetSciSyncInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFenceGetSciSyncInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFenceGetSciSyncInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetSciSyncInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkFenceGetSciSyncInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetSciSyncInfoNV sType(@CType("VkStructureType") int value) { VkFenceGetSciSyncInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFenceGetSciSyncInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFenceGetSciSyncInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkFenceGetSciSyncInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceGetSciSyncInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetSciSyncInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceGetSciSyncInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetSciSyncInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceGetSciSyncInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `fence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_fence.get(segment, 0L, index); } + /// {@return `fence`} + /// @param segment the segment of the struct + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment) { return VkFenceGetSciSyncInfoNV.get_fence(segment, 0L); } + /// {@return `fence` at the given index} + /// @param index the index + public @CType("VkFence") java.lang.foreign.MemorySegment fenceAt(long index) { return VkFenceGetSciSyncInfoNV.get_fence(this.segment(), index); } + /// {@return `fence`} + public @CType("VkFence") java.lang.foreign.MemorySegment fence() { return VkFenceGetSciSyncInfoNV.get_fence(this.segment()); } + /// Sets `fence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fence(MemorySegment segment, long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VH_fence.set(segment, 0L, index, value); } + /// Sets `fence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fence(MemorySegment segment, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkFenceGetSciSyncInfoNV.set_fence(segment, 0L, value); } + /// Sets `fence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetSciSyncInfoNV fenceAt(long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkFenceGetSciSyncInfoNV.set_fence(this.segment(), index, value); return this; } + /// Sets `fence` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetSciSyncInfoNV fence(@CType("VkFence") java.lang.foreign.MemorySegment value) { VkFenceGetSciSyncInfoNV.set_fence(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkFenceGetSciSyncInfoNV.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalFenceHandleTypeFlagBits") int handleTypeAt(long index) { return VkFenceGetSciSyncInfoNV.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalFenceHandleTypeFlagBits") int handleType() { return VkFenceGetSciSyncInfoNV.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkFenceGetSciSyncInfoNV.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceGetSciSyncInfoNV handleTypeAt(long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkFenceGetSciSyncInfoNV.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkFenceGetSciSyncInfoNV handleType(@CType("VkExternalFenceHandleTypeFlagBits") int value) { VkFenceGetSciSyncInfoNV.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkFramebufferMixedSamplesCombinationNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkFramebufferMixedSamplesCombinationNV.java new file mode 100644 index 00000000..fc9f124c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkFramebufferMixedSamplesCombinationNV.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### coverageReductionMode +/// [VarHandle][#VH_coverageReductionMode] - [Getter][#coverageReductionMode()] - [Setter][#coverageReductionMode(int)] +/// ### rasterizationSamples +/// [VarHandle][#VH_rasterizationSamples] - [Getter][#rasterizationSamples()] - [Setter][#rasterizationSamples(int)] +/// ### depthStencilSamples +/// [VarHandle][#VH_depthStencilSamples] - [Getter][#depthStencilSamples()] - [Setter][#depthStencilSamples(int)] +/// ### colorSamples +/// [VarHandle][#VH_colorSamples] - [Getter][#colorSamples()] - [Setter][#colorSamples(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFramebufferMixedSamplesCombinationNV { +/// VkStructureType sType; +/// void * pNext; +/// VkCoverageReductionModeNV coverageReductionMode; +/// VkSampleCountFlagBits rasterizationSamples; +/// VkSampleCountFlags depthStencilSamples; +/// VkSampleCountFlags colorSamples; +/// } VkFramebufferMixedSamplesCombinationNV; +/// ``` +public final class VkFramebufferMixedSamplesCombinationNV extends Struct { + /// The struct layout of `VkFramebufferMixedSamplesCombinationNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("coverageReductionMode"), + ValueLayout.JAVA_INT.withName("rasterizationSamples"), + ValueLayout.JAVA_INT.withName("depthStencilSamples"), + ValueLayout.JAVA_INT.withName("colorSamples") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `coverageReductionMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_coverageReductionMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("coverageReductionMode")); + /// The [VarHandle] of `rasterizationSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rasterizationSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rasterizationSamples")); + /// The [VarHandle] of `depthStencilSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthStencilSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthStencilSamples")); + /// The [VarHandle] of `colorSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorSamples")); + + /// Creates `VkFramebufferMixedSamplesCombinationNV` with the given segment. + /// @param segment the memory segment + public VkFramebufferMixedSamplesCombinationNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFramebufferMixedSamplesCombinationNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferMixedSamplesCombinationNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferMixedSamplesCombinationNV(segment); } + + /// Creates `VkFramebufferMixedSamplesCombinationNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferMixedSamplesCombinationNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferMixedSamplesCombinationNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFramebufferMixedSamplesCombinationNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferMixedSamplesCombinationNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferMixedSamplesCombinationNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFramebufferMixedSamplesCombinationNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFramebufferMixedSamplesCombinationNV` + public static VkFramebufferMixedSamplesCombinationNV alloc(SegmentAllocator allocator) { return new VkFramebufferMixedSamplesCombinationNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFramebufferMixedSamplesCombinationNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFramebufferMixedSamplesCombinationNV` + public static VkFramebufferMixedSamplesCombinationNV alloc(SegmentAllocator allocator, long count) { return new VkFramebufferMixedSamplesCombinationNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFramebufferMixedSamplesCombinationNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFramebufferMixedSamplesCombinationNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFramebufferMixedSamplesCombinationNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFramebufferMixedSamplesCombinationNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV sTypeAt(long index, @CType("VkStructureType") int value) { VkFramebufferMixedSamplesCombinationNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV sType(@CType("VkStructureType") int value) { VkFramebufferMixedSamplesCombinationNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFramebufferMixedSamplesCombinationNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFramebufferMixedSamplesCombinationNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkFramebufferMixedSamplesCombinationNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkFramebufferMixedSamplesCombinationNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkFramebufferMixedSamplesCombinationNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkFramebufferMixedSamplesCombinationNV.set_pNext(this.segment(), value); return this; } + + /// {@return `coverageReductionMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCoverageReductionModeNV") int get_coverageReductionMode(MemorySegment segment, long index) { return (int) VH_coverageReductionMode.get(segment, 0L, index); } + /// {@return `coverageReductionMode`} + /// @param segment the segment of the struct + public static @CType("VkCoverageReductionModeNV") int get_coverageReductionMode(MemorySegment segment) { return VkFramebufferMixedSamplesCombinationNV.get_coverageReductionMode(segment, 0L); } + /// {@return `coverageReductionMode` at the given index} + /// @param index the index + public @CType("VkCoverageReductionModeNV") int coverageReductionModeAt(long index) { return VkFramebufferMixedSamplesCombinationNV.get_coverageReductionMode(this.segment(), index); } + /// {@return `coverageReductionMode`} + public @CType("VkCoverageReductionModeNV") int coverageReductionMode() { return VkFramebufferMixedSamplesCombinationNV.get_coverageReductionMode(this.segment()); } + /// Sets `coverageReductionMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_coverageReductionMode(MemorySegment segment, long index, @CType("VkCoverageReductionModeNV") int value) { VH_coverageReductionMode.set(segment, 0L, index, value); } + /// Sets `coverageReductionMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_coverageReductionMode(MemorySegment segment, @CType("VkCoverageReductionModeNV") int value) { VkFramebufferMixedSamplesCombinationNV.set_coverageReductionMode(segment, 0L, value); } + /// Sets `coverageReductionMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV coverageReductionModeAt(long index, @CType("VkCoverageReductionModeNV") int value) { VkFramebufferMixedSamplesCombinationNV.set_coverageReductionMode(this.segment(), index, value); return this; } + /// Sets `coverageReductionMode` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV coverageReductionMode(@CType("VkCoverageReductionModeNV") int value) { VkFramebufferMixedSamplesCombinationNV.set_coverageReductionMode(this.segment(), value); return this; } + + /// {@return `rasterizationSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_rasterizationSamples(MemorySegment segment, long index) { return (int) VH_rasterizationSamples.get(segment, 0L, index); } + /// {@return `rasterizationSamples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_rasterizationSamples(MemorySegment segment) { return VkFramebufferMixedSamplesCombinationNV.get_rasterizationSamples(segment, 0L); } + /// {@return `rasterizationSamples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int rasterizationSamplesAt(long index) { return VkFramebufferMixedSamplesCombinationNV.get_rasterizationSamples(this.segment(), index); } + /// {@return `rasterizationSamples`} + public @CType("VkSampleCountFlagBits") int rasterizationSamples() { return VkFramebufferMixedSamplesCombinationNV.get_rasterizationSamples(this.segment()); } + /// Sets `rasterizationSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rasterizationSamples(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_rasterizationSamples.set(segment, 0L, index, value); } + /// Sets `rasterizationSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rasterizationSamples(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkFramebufferMixedSamplesCombinationNV.set_rasterizationSamples(segment, 0L, value); } + /// Sets `rasterizationSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV rasterizationSamplesAt(long index, @CType("VkSampleCountFlagBits") int value) { VkFramebufferMixedSamplesCombinationNV.set_rasterizationSamples(this.segment(), index, value); return this; } + /// Sets `rasterizationSamples` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV rasterizationSamples(@CType("VkSampleCountFlagBits") int value) { VkFramebufferMixedSamplesCombinationNV.set_rasterizationSamples(this.segment(), value); return this; } + + /// {@return `depthStencilSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_depthStencilSamples(MemorySegment segment, long index) { return (int) VH_depthStencilSamples.get(segment, 0L, index); } + /// {@return `depthStencilSamples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_depthStencilSamples(MemorySegment segment) { return VkFramebufferMixedSamplesCombinationNV.get_depthStencilSamples(segment, 0L); } + /// {@return `depthStencilSamples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int depthStencilSamplesAt(long index) { return VkFramebufferMixedSamplesCombinationNV.get_depthStencilSamples(this.segment(), index); } + /// {@return `depthStencilSamples`} + public @CType("VkSampleCountFlags") int depthStencilSamples() { return VkFramebufferMixedSamplesCombinationNV.get_depthStencilSamples(this.segment()); } + /// Sets `depthStencilSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthStencilSamples(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_depthStencilSamples.set(segment, 0L, index, value); } + /// Sets `depthStencilSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthStencilSamples(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkFramebufferMixedSamplesCombinationNV.set_depthStencilSamples(segment, 0L, value); } + /// Sets `depthStencilSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV depthStencilSamplesAt(long index, @CType("VkSampleCountFlags") int value) { VkFramebufferMixedSamplesCombinationNV.set_depthStencilSamples(this.segment(), index, value); return this; } + /// Sets `depthStencilSamples` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV depthStencilSamples(@CType("VkSampleCountFlags") int value) { VkFramebufferMixedSamplesCombinationNV.set_depthStencilSamples(this.segment(), value); return this; } + + /// {@return `colorSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_colorSamples(MemorySegment segment, long index) { return (int) VH_colorSamples.get(segment, 0L, index); } + /// {@return `colorSamples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_colorSamples(MemorySegment segment) { return VkFramebufferMixedSamplesCombinationNV.get_colorSamples(segment, 0L); } + /// {@return `colorSamples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int colorSamplesAt(long index) { return VkFramebufferMixedSamplesCombinationNV.get_colorSamples(this.segment(), index); } + /// {@return `colorSamples`} + public @CType("VkSampleCountFlags") int colorSamples() { return VkFramebufferMixedSamplesCombinationNV.get_colorSamples(this.segment()); } + /// Sets `colorSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorSamples(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_colorSamples.set(segment, 0L, index, value); } + /// Sets `colorSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorSamples(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkFramebufferMixedSamplesCombinationNV.set_colorSamples(segment, 0L, value); } + /// Sets `colorSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV colorSamplesAt(long index, @CType("VkSampleCountFlags") int value) { VkFramebufferMixedSamplesCombinationNV.set_colorSamples(this.segment(), index, value); return this; } + /// Sets `colorSamples` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferMixedSamplesCombinationNV colorSamples(@CType("VkSampleCountFlags") int value) { VkFramebufferMixedSamplesCombinationNV.set_colorSamples(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeneratedCommandsInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeneratedCommandsInfoNV.java new file mode 100644 index 00000000..6dc4c045 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeneratedCommandsInfoNV.java @@ -0,0 +1,629 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineBindPoint +/// [VarHandle][#VH_pipelineBindPoint] - [Getter][#pipelineBindPoint()] - [Setter][#pipelineBindPoint(int)] +/// ### pipeline +/// [VarHandle][#VH_pipeline] - [Getter][#pipeline()] - [Setter][#pipeline(java.lang.foreign.MemorySegment)] +/// ### indirectCommandsLayout +/// [VarHandle][#VH_indirectCommandsLayout] - [Getter][#indirectCommandsLayout()] - [Setter][#indirectCommandsLayout(java.lang.foreign.MemorySegment)] +/// ### streamCount +/// [VarHandle][#VH_streamCount] - [Getter][#streamCount()] - [Setter][#streamCount(int)] +/// ### pStreams +/// [VarHandle][#VH_pStreams] - [Getter][#pStreams()] - [Setter][#pStreams(java.lang.foreign.MemorySegment)] +/// ### sequencesCount +/// [VarHandle][#VH_sequencesCount] - [Getter][#sequencesCount()] - [Setter][#sequencesCount(int)] +/// ### preprocessBuffer +/// [VarHandle][#VH_preprocessBuffer] - [Getter][#preprocessBuffer()] - [Setter][#preprocessBuffer(java.lang.foreign.MemorySegment)] +/// ### preprocessOffset +/// [VarHandle][#VH_preprocessOffset] - [Getter][#preprocessOffset()] - [Setter][#preprocessOffset(long)] +/// ### preprocessSize +/// [VarHandle][#VH_preprocessSize] - [Getter][#preprocessSize()] - [Setter][#preprocessSize(long)] +/// ### sequencesCountBuffer +/// [VarHandle][#VH_sequencesCountBuffer] - [Getter][#sequencesCountBuffer()] - [Setter][#sequencesCountBuffer(java.lang.foreign.MemorySegment)] +/// ### sequencesCountOffset +/// [VarHandle][#VH_sequencesCountOffset] - [Getter][#sequencesCountOffset()] - [Setter][#sequencesCountOffset(long)] +/// ### sequencesIndexBuffer +/// [VarHandle][#VH_sequencesIndexBuffer] - [Getter][#sequencesIndexBuffer()] - [Setter][#sequencesIndexBuffer(java.lang.foreign.MemorySegment)] +/// ### sequencesIndexOffset +/// [VarHandle][#VH_sequencesIndexOffset] - [Getter][#sequencesIndexOffset()] - [Setter][#sequencesIndexOffset(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGeneratedCommandsInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineBindPoint pipelineBindPoint; +/// VkPipeline pipeline; +/// VkIndirectCommandsLayoutNV indirectCommandsLayout; +/// uint32_t streamCount; +/// const VkIndirectCommandsStreamNV * pStreams; +/// uint32_t sequencesCount; +/// VkBuffer preprocessBuffer; +/// VkDeviceSize preprocessOffset; +/// VkDeviceSize preprocessSize; +/// VkBuffer sequencesCountBuffer; +/// VkDeviceSize sequencesCountOffset; +/// VkBuffer sequencesIndexBuffer; +/// VkDeviceSize sequencesIndexOffset; +/// } VkGeneratedCommandsInfoNV; +/// ``` +public final class VkGeneratedCommandsInfoNV extends Struct { + /// The struct layout of `VkGeneratedCommandsInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineBindPoint"), + ValueLayout.ADDRESS.withName("pipeline"), + ValueLayout.ADDRESS.withName("indirectCommandsLayout"), + ValueLayout.JAVA_INT.withName("streamCount"), + ValueLayout.ADDRESS.withName("pStreams"), + ValueLayout.JAVA_INT.withName("sequencesCount"), + ValueLayout.ADDRESS.withName("preprocessBuffer"), + ValueLayout.JAVA_LONG.withName("preprocessOffset"), + ValueLayout.JAVA_LONG.withName("preprocessSize"), + ValueLayout.ADDRESS.withName("sequencesCountBuffer"), + ValueLayout.JAVA_LONG.withName("sequencesCountOffset"), + ValueLayout.ADDRESS.withName("sequencesIndexBuffer"), + ValueLayout.JAVA_LONG.withName("sequencesIndexOffset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineBindPoint` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBindPoint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBindPoint")); + /// The [VarHandle] of `pipeline` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipeline")); + /// The [VarHandle] of `indirectCommandsLayout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_indirectCommandsLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectCommandsLayout")); + /// The [VarHandle] of `streamCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_streamCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("streamCount")); + /// The [VarHandle] of `pStreams` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStreams = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStreams")); + /// The [VarHandle] of `sequencesCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sequencesCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sequencesCount")); + /// The [VarHandle] of `preprocessBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_preprocessBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preprocessBuffer")); + /// The [VarHandle] of `preprocessOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_preprocessOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preprocessOffset")); + /// The [VarHandle] of `preprocessSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_preprocessSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preprocessSize")); + /// The [VarHandle] of `sequencesCountBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_sequencesCountBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sequencesCountBuffer")); + /// The [VarHandle] of `sequencesCountOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_sequencesCountOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sequencesCountOffset")); + /// The [VarHandle] of `sequencesIndexBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_sequencesIndexBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sequencesIndexBuffer")); + /// The [VarHandle] of `sequencesIndexOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_sequencesIndexOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sequencesIndexOffset")); + + /// Creates `VkGeneratedCommandsInfoNV` with the given segment. + /// @param segment the memory segment + public VkGeneratedCommandsInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGeneratedCommandsInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsInfoNV(segment); } + + /// Creates `VkGeneratedCommandsInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGeneratedCommandsInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGeneratedCommandsInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGeneratedCommandsInfoNV` + public static VkGeneratedCommandsInfoNV alloc(SegmentAllocator allocator) { return new VkGeneratedCommandsInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGeneratedCommandsInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGeneratedCommandsInfoNV` + public static VkGeneratedCommandsInfoNV alloc(SegmentAllocator allocator, long count) { return new VkGeneratedCommandsInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGeneratedCommandsInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGeneratedCommandsInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGeneratedCommandsInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkGeneratedCommandsInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sType(@CType("VkStructureType") int value) { VkGeneratedCommandsInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGeneratedCommandsInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGeneratedCommandsInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineBindPoint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment, long index) { return (int) VH_pipelineBindPoint.get(segment, 0L, index); } + /// {@return `pipelineBindPoint`} + /// @param segment the segment of the struct + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_pipelineBindPoint(segment, 0L); } + /// {@return `pipelineBindPoint` at the given index} + /// @param index the index + public @CType("VkPipelineBindPoint") int pipelineBindPointAt(long index) { return VkGeneratedCommandsInfoNV.get_pipelineBindPoint(this.segment(), index); } + /// {@return `pipelineBindPoint`} + public @CType("VkPipelineBindPoint") int pipelineBindPoint() { return VkGeneratedCommandsInfoNV.get_pipelineBindPoint(this.segment()); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, long index, @CType("VkPipelineBindPoint") int value) { VH_pipelineBindPoint.set(segment, 0L, index, value); } + /// Sets `pipelineBindPoint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, @CType("VkPipelineBindPoint") int value) { VkGeneratedCommandsInfoNV.set_pipelineBindPoint(segment, 0L, value); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV pipelineBindPointAt(long index, @CType("VkPipelineBindPoint") int value) { VkGeneratedCommandsInfoNV.set_pipelineBindPoint(this.segment(), index, value); return this; } + /// Sets `pipelineBindPoint` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV pipelineBindPoint(@CType("VkPipelineBindPoint") int value) { VkGeneratedCommandsInfoNV.set_pipelineBindPoint(this.segment(), value); return this; } + + /// {@return `pipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipeline.get(segment, 0L, index); } + /// {@return `pipeline`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_pipeline(segment, 0L); } + /// {@return `pipeline` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipelineAt(long index) { return VkGeneratedCommandsInfoNV.get_pipeline(this.segment(), index); } + /// {@return `pipeline`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipeline() { return VkGeneratedCommandsInfoNV.get_pipeline(this.segment()); } + /// Sets `pipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipeline(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_pipeline.set(segment, 0L, index, value); } + /// Sets `pipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipeline(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_pipeline(segment, 0L, value); } + /// Sets `pipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV pipelineAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_pipeline(this.segment(), index, value); return this; } + /// Sets `pipeline` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV pipeline(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_pipeline(this.segment(), value); return this; } + + /// {@return `indirectCommandsLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment get_indirectCommandsLayout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_indirectCommandsLayout.get(segment, 0L, index); } + /// {@return `indirectCommandsLayout`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment get_indirectCommandsLayout(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_indirectCommandsLayout(segment, 0L); } + /// {@return `indirectCommandsLayout` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment indirectCommandsLayoutAt(long index) { return VkGeneratedCommandsInfoNV.get_indirectCommandsLayout(this.segment(), index); } + /// {@return `indirectCommandsLayout`} + public @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment indirectCommandsLayout() { return VkGeneratedCommandsInfoNV.get_indirectCommandsLayout(this.segment()); } + /// Sets `indirectCommandsLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectCommandsLayout(MemorySegment segment, long index, @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment value) { VH_indirectCommandsLayout.set(segment, 0L, index, value); } + /// Sets `indirectCommandsLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectCommandsLayout(MemorySegment segment, @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_indirectCommandsLayout(segment, 0L, value); } + /// Sets `indirectCommandsLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV indirectCommandsLayoutAt(long index, @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_indirectCommandsLayout(this.segment(), index, value); return this; } + /// Sets `indirectCommandsLayout` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV indirectCommandsLayout(@CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_indirectCommandsLayout(this.segment(), value); return this; } + + /// {@return `streamCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_streamCount(MemorySegment segment, long index) { return (int) VH_streamCount.get(segment, 0L, index); } + /// {@return `streamCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_streamCount(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_streamCount(segment, 0L); } + /// {@return `streamCount` at the given index} + /// @param index the index + public @CType("uint32_t") int streamCountAt(long index) { return VkGeneratedCommandsInfoNV.get_streamCount(this.segment(), index); } + /// {@return `streamCount`} + public @CType("uint32_t") int streamCount() { return VkGeneratedCommandsInfoNV.get_streamCount(this.segment()); } + /// Sets `streamCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_streamCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_streamCount.set(segment, 0L, index, value); } + /// Sets `streamCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_streamCount(MemorySegment segment, @CType("uint32_t") int value) { VkGeneratedCommandsInfoNV.set_streamCount(segment, 0L, value); } + /// Sets `streamCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV streamCountAt(long index, @CType("uint32_t") int value) { VkGeneratedCommandsInfoNV.set_streamCount(this.segment(), index, value); return this; } + /// Sets `streamCount` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV streamCount(@CType("uint32_t") int value) { VkGeneratedCommandsInfoNV.set_streamCount(this.segment(), value); return this; } + + /// {@return `pStreams` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndirectCommandsStreamNV *") java.lang.foreign.MemorySegment get_pStreams(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStreams.get(segment, 0L, index); } + /// {@return `pStreams`} + /// @param segment the segment of the struct + public static @CType("const VkIndirectCommandsStreamNV *") java.lang.foreign.MemorySegment get_pStreams(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_pStreams(segment, 0L); } + /// {@return `pStreams` at the given index} + /// @param index the index + public @CType("const VkIndirectCommandsStreamNV *") java.lang.foreign.MemorySegment pStreamsAt(long index) { return VkGeneratedCommandsInfoNV.get_pStreams(this.segment(), index); } + /// {@return `pStreams`} + public @CType("const VkIndirectCommandsStreamNV *") java.lang.foreign.MemorySegment pStreams() { return VkGeneratedCommandsInfoNV.get_pStreams(this.segment()); } + /// Sets `pStreams` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStreams(MemorySegment segment, long index, @CType("const VkIndirectCommandsStreamNV *") java.lang.foreign.MemorySegment value) { VH_pStreams.set(segment, 0L, index, value); } + /// Sets `pStreams` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStreams(MemorySegment segment, @CType("const VkIndirectCommandsStreamNV *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_pStreams(segment, 0L, value); } + /// Sets `pStreams` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV pStreamsAt(long index, @CType("const VkIndirectCommandsStreamNV *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_pStreams(this.segment(), index, value); return this; } + /// Sets `pStreams` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV pStreams(@CType("const VkIndirectCommandsStreamNV *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_pStreams(this.segment(), value); return this; } + + /// {@return `sequencesCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sequencesCount(MemorySegment segment, long index) { return (int) VH_sequencesCount.get(segment, 0L, index); } + /// {@return `sequencesCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sequencesCount(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_sequencesCount(segment, 0L); } + /// {@return `sequencesCount` at the given index} + /// @param index the index + public @CType("uint32_t") int sequencesCountAt(long index) { return VkGeneratedCommandsInfoNV.get_sequencesCount(this.segment(), index); } + /// {@return `sequencesCount`} + public @CType("uint32_t") int sequencesCount() { return VkGeneratedCommandsInfoNV.get_sequencesCount(this.segment()); } + /// Sets `sequencesCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sequencesCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sequencesCount.set(segment, 0L, index, value); } + /// Sets `sequencesCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sequencesCount(MemorySegment segment, @CType("uint32_t") int value) { VkGeneratedCommandsInfoNV.set_sequencesCount(segment, 0L, value); } + /// Sets `sequencesCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sequencesCountAt(long index, @CType("uint32_t") int value) { VkGeneratedCommandsInfoNV.set_sequencesCount(this.segment(), index, value); return this; } + /// Sets `sequencesCount` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sequencesCount(@CType("uint32_t") int value) { VkGeneratedCommandsInfoNV.set_sequencesCount(this.segment(), value); return this; } + + /// {@return `preprocessBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_preprocessBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_preprocessBuffer.get(segment, 0L, index); } + /// {@return `preprocessBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_preprocessBuffer(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_preprocessBuffer(segment, 0L); } + /// {@return `preprocessBuffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment preprocessBufferAt(long index) { return VkGeneratedCommandsInfoNV.get_preprocessBuffer(this.segment(), index); } + /// {@return `preprocessBuffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment preprocessBuffer() { return VkGeneratedCommandsInfoNV.get_preprocessBuffer(this.segment()); } + /// Sets `preprocessBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preprocessBuffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_preprocessBuffer.set(segment, 0L, index, value); } + /// Sets `preprocessBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preprocessBuffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_preprocessBuffer(segment, 0L, value); } + /// Sets `preprocessBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV preprocessBufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_preprocessBuffer(this.segment(), index, value); return this; } + /// Sets `preprocessBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV preprocessBuffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_preprocessBuffer(this.segment(), value); return this; } + + /// {@return `preprocessOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_preprocessOffset(MemorySegment segment, long index) { return (long) VH_preprocessOffset.get(segment, 0L, index); } + /// {@return `preprocessOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_preprocessOffset(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_preprocessOffset(segment, 0L); } + /// {@return `preprocessOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long preprocessOffsetAt(long index) { return VkGeneratedCommandsInfoNV.get_preprocessOffset(this.segment(), index); } + /// {@return `preprocessOffset`} + public @CType("VkDeviceSize") long preprocessOffset() { return VkGeneratedCommandsInfoNV.get_preprocessOffset(this.segment()); } + /// Sets `preprocessOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preprocessOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_preprocessOffset.set(segment, 0L, index, value); } + /// Sets `preprocessOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preprocessOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_preprocessOffset(segment, 0L, value); } + /// Sets `preprocessOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV preprocessOffsetAt(long index, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_preprocessOffset(this.segment(), index, value); return this; } + /// Sets `preprocessOffset` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV preprocessOffset(@CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_preprocessOffset(this.segment(), value); return this; } + + /// {@return `preprocessSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_preprocessSize(MemorySegment segment, long index) { return (long) VH_preprocessSize.get(segment, 0L, index); } + /// {@return `preprocessSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_preprocessSize(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_preprocessSize(segment, 0L); } + /// {@return `preprocessSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long preprocessSizeAt(long index) { return VkGeneratedCommandsInfoNV.get_preprocessSize(this.segment(), index); } + /// {@return `preprocessSize`} + public @CType("VkDeviceSize") long preprocessSize() { return VkGeneratedCommandsInfoNV.get_preprocessSize(this.segment()); } + /// Sets `preprocessSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preprocessSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_preprocessSize.set(segment, 0L, index, value); } + /// Sets `preprocessSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preprocessSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_preprocessSize(segment, 0L, value); } + /// Sets `preprocessSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV preprocessSizeAt(long index, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_preprocessSize(this.segment(), index, value); return this; } + /// Sets `preprocessSize` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV preprocessSize(@CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_preprocessSize(this.segment(), value); return this; } + + /// {@return `sequencesCountBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_sequencesCountBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_sequencesCountBuffer.get(segment, 0L, index); } + /// {@return `sequencesCountBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_sequencesCountBuffer(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_sequencesCountBuffer(segment, 0L); } + /// {@return `sequencesCountBuffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment sequencesCountBufferAt(long index) { return VkGeneratedCommandsInfoNV.get_sequencesCountBuffer(this.segment(), index); } + /// {@return `sequencesCountBuffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment sequencesCountBuffer() { return VkGeneratedCommandsInfoNV.get_sequencesCountBuffer(this.segment()); } + /// Sets `sequencesCountBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sequencesCountBuffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_sequencesCountBuffer.set(segment, 0L, index, value); } + /// Sets `sequencesCountBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sequencesCountBuffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_sequencesCountBuffer(segment, 0L, value); } + /// Sets `sequencesCountBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sequencesCountBufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_sequencesCountBuffer(this.segment(), index, value); return this; } + /// Sets `sequencesCountBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sequencesCountBuffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_sequencesCountBuffer(this.segment(), value); return this; } + + /// {@return `sequencesCountOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_sequencesCountOffset(MemorySegment segment, long index) { return (long) VH_sequencesCountOffset.get(segment, 0L, index); } + /// {@return `sequencesCountOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_sequencesCountOffset(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_sequencesCountOffset(segment, 0L); } + /// {@return `sequencesCountOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sequencesCountOffsetAt(long index) { return VkGeneratedCommandsInfoNV.get_sequencesCountOffset(this.segment(), index); } + /// {@return `sequencesCountOffset`} + public @CType("VkDeviceSize") long sequencesCountOffset() { return VkGeneratedCommandsInfoNV.get_sequencesCountOffset(this.segment()); } + /// Sets `sequencesCountOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sequencesCountOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_sequencesCountOffset.set(segment, 0L, index, value); } + /// Sets `sequencesCountOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sequencesCountOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_sequencesCountOffset(segment, 0L, value); } + /// Sets `sequencesCountOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sequencesCountOffsetAt(long index, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_sequencesCountOffset(this.segment(), index, value); return this; } + /// Sets `sequencesCountOffset` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sequencesCountOffset(@CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_sequencesCountOffset(this.segment(), value); return this; } + + /// {@return `sequencesIndexBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_sequencesIndexBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_sequencesIndexBuffer.get(segment, 0L, index); } + /// {@return `sequencesIndexBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_sequencesIndexBuffer(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_sequencesIndexBuffer(segment, 0L); } + /// {@return `sequencesIndexBuffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment sequencesIndexBufferAt(long index) { return VkGeneratedCommandsInfoNV.get_sequencesIndexBuffer(this.segment(), index); } + /// {@return `sequencesIndexBuffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment sequencesIndexBuffer() { return VkGeneratedCommandsInfoNV.get_sequencesIndexBuffer(this.segment()); } + /// Sets `sequencesIndexBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sequencesIndexBuffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_sequencesIndexBuffer.set(segment, 0L, index, value); } + /// Sets `sequencesIndexBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sequencesIndexBuffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_sequencesIndexBuffer(segment, 0L, value); } + /// Sets `sequencesIndexBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sequencesIndexBufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_sequencesIndexBuffer(this.segment(), index, value); return this; } + /// Sets `sequencesIndexBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sequencesIndexBuffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsInfoNV.set_sequencesIndexBuffer(this.segment(), value); return this; } + + /// {@return `sequencesIndexOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_sequencesIndexOffset(MemorySegment segment, long index) { return (long) VH_sequencesIndexOffset.get(segment, 0L, index); } + /// {@return `sequencesIndexOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_sequencesIndexOffset(MemorySegment segment) { return VkGeneratedCommandsInfoNV.get_sequencesIndexOffset(segment, 0L); } + /// {@return `sequencesIndexOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sequencesIndexOffsetAt(long index) { return VkGeneratedCommandsInfoNV.get_sequencesIndexOffset(this.segment(), index); } + /// {@return `sequencesIndexOffset`} + public @CType("VkDeviceSize") long sequencesIndexOffset() { return VkGeneratedCommandsInfoNV.get_sequencesIndexOffset(this.segment()); } + /// Sets `sequencesIndexOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sequencesIndexOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_sequencesIndexOffset.set(segment, 0L, index, value); } + /// Sets `sequencesIndexOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sequencesIndexOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_sequencesIndexOffset(segment, 0L, value); } + /// Sets `sequencesIndexOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sequencesIndexOffsetAt(long index, @CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_sequencesIndexOffset(this.segment(), index, value); return this; } + /// Sets `sequencesIndexOffset` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsInfoNV sequencesIndexOffset(@CType("VkDeviceSize") long value) { VkGeneratedCommandsInfoNV.set_sequencesIndexOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeneratedCommandsMemoryRequirementsInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeneratedCommandsMemoryRequirementsInfoNV.java new file mode 100644 index 00000000..6615c51e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeneratedCommandsMemoryRequirementsInfoNV.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineBindPoint +/// [VarHandle][#VH_pipelineBindPoint] - [Getter][#pipelineBindPoint()] - [Setter][#pipelineBindPoint(int)] +/// ### pipeline +/// [VarHandle][#VH_pipeline] - [Getter][#pipeline()] - [Setter][#pipeline(java.lang.foreign.MemorySegment)] +/// ### indirectCommandsLayout +/// [VarHandle][#VH_indirectCommandsLayout] - [Getter][#indirectCommandsLayout()] - [Setter][#indirectCommandsLayout(java.lang.foreign.MemorySegment)] +/// ### maxSequencesCount +/// [VarHandle][#VH_maxSequencesCount] - [Getter][#maxSequencesCount()] - [Setter][#maxSequencesCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGeneratedCommandsMemoryRequirementsInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineBindPoint pipelineBindPoint; +/// VkPipeline pipeline; +/// VkIndirectCommandsLayoutNV indirectCommandsLayout; +/// uint32_t maxSequencesCount; +/// } VkGeneratedCommandsMemoryRequirementsInfoNV; +/// ``` +public final class VkGeneratedCommandsMemoryRequirementsInfoNV extends Struct { + /// The struct layout of `VkGeneratedCommandsMemoryRequirementsInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineBindPoint"), + ValueLayout.ADDRESS.withName("pipeline"), + ValueLayout.ADDRESS.withName("indirectCommandsLayout"), + ValueLayout.JAVA_INT.withName("maxSequencesCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineBindPoint` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBindPoint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBindPoint")); + /// The [VarHandle] of `pipeline` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipeline")); + /// The [VarHandle] of `indirectCommandsLayout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_indirectCommandsLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectCommandsLayout")); + /// The [VarHandle] of `maxSequencesCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSequencesCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSequencesCount")); + + /// Creates `VkGeneratedCommandsMemoryRequirementsInfoNV` with the given segment. + /// @param segment the memory segment + public VkGeneratedCommandsMemoryRequirementsInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGeneratedCommandsMemoryRequirementsInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsMemoryRequirementsInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsMemoryRequirementsInfoNV(segment); } + + /// Creates `VkGeneratedCommandsMemoryRequirementsInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsMemoryRequirementsInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsMemoryRequirementsInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGeneratedCommandsMemoryRequirementsInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeneratedCommandsMemoryRequirementsInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGeneratedCommandsMemoryRequirementsInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGeneratedCommandsMemoryRequirementsInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGeneratedCommandsMemoryRequirementsInfoNV` + public static VkGeneratedCommandsMemoryRequirementsInfoNV alloc(SegmentAllocator allocator) { return new VkGeneratedCommandsMemoryRequirementsInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGeneratedCommandsMemoryRequirementsInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGeneratedCommandsMemoryRequirementsInfoNV` + public static VkGeneratedCommandsMemoryRequirementsInfoNV alloc(SegmentAllocator allocator, long count) { return new VkGeneratedCommandsMemoryRequirementsInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV sType(@CType("VkStructureType") int value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineBindPoint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment, long index) { return (int) VH_pipelineBindPoint.get(segment, 0L, index); } + /// {@return `pipelineBindPoint`} + /// @param segment the segment of the struct + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_pipelineBindPoint(segment, 0L); } + /// {@return `pipelineBindPoint` at the given index} + /// @param index the index + public @CType("VkPipelineBindPoint") int pipelineBindPointAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_pipelineBindPoint(this.segment(), index); } + /// {@return `pipelineBindPoint`} + public @CType("VkPipelineBindPoint") int pipelineBindPoint() { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_pipelineBindPoint(this.segment()); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, long index, @CType("VkPipelineBindPoint") int value) { VH_pipelineBindPoint.set(segment, 0L, index, value); } + /// Sets `pipelineBindPoint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, @CType("VkPipelineBindPoint") int value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_pipelineBindPoint(segment, 0L, value); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV pipelineBindPointAt(long index, @CType("VkPipelineBindPoint") int value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_pipelineBindPoint(this.segment(), index, value); return this; } + /// Sets `pipelineBindPoint` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV pipelineBindPoint(@CType("VkPipelineBindPoint") int value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_pipelineBindPoint(this.segment(), value); return this; } + + /// {@return `pipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipeline.get(segment, 0L, index); } + /// {@return `pipeline`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_pipeline(segment, 0L); } + /// {@return `pipeline` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipelineAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_pipeline(this.segment(), index); } + /// {@return `pipeline`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipeline() { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_pipeline(this.segment()); } + /// Sets `pipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipeline(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_pipeline.set(segment, 0L, index, value); } + /// Sets `pipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipeline(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_pipeline(segment, 0L, value); } + /// Sets `pipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV pipelineAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_pipeline(this.segment(), index, value); return this; } + /// Sets `pipeline` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV pipeline(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_pipeline(this.segment(), value); return this; } + + /// {@return `indirectCommandsLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment get_indirectCommandsLayout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_indirectCommandsLayout.get(segment, 0L, index); } + /// {@return `indirectCommandsLayout`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment get_indirectCommandsLayout(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_indirectCommandsLayout(segment, 0L); } + /// {@return `indirectCommandsLayout` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment indirectCommandsLayoutAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_indirectCommandsLayout(this.segment(), index); } + /// {@return `indirectCommandsLayout`} + public @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment indirectCommandsLayout() { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_indirectCommandsLayout(this.segment()); } + /// Sets `indirectCommandsLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectCommandsLayout(MemorySegment segment, long index, @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment value) { VH_indirectCommandsLayout.set(segment, 0L, index, value); } + /// Sets `indirectCommandsLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectCommandsLayout(MemorySegment segment, @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_indirectCommandsLayout(segment, 0L, value); } + /// Sets `indirectCommandsLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV indirectCommandsLayoutAt(long index, @CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_indirectCommandsLayout(this.segment(), index, value); return this; } + /// Sets `indirectCommandsLayout` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV indirectCommandsLayout(@CType("VkIndirectCommandsLayoutNV") java.lang.foreign.MemorySegment value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_indirectCommandsLayout(this.segment(), value); return this; } + + /// {@return `maxSequencesCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSequencesCount(MemorySegment segment, long index) { return (int) VH_maxSequencesCount.get(segment, 0L, index); } + /// {@return `maxSequencesCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSequencesCount(MemorySegment segment) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_maxSequencesCount(segment, 0L); } + /// {@return `maxSequencesCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSequencesCountAt(long index) { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_maxSequencesCount(this.segment(), index); } + /// {@return `maxSequencesCount`} + public @CType("uint32_t") int maxSequencesCount() { return VkGeneratedCommandsMemoryRequirementsInfoNV.get_maxSequencesCount(this.segment()); } + /// Sets `maxSequencesCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSequencesCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSequencesCount.set(segment, 0L, index, value); } + /// Sets `maxSequencesCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSequencesCount(MemorySegment segment, @CType("uint32_t") int value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_maxSequencesCount(segment, 0L, value); } + /// Sets `maxSequencesCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV maxSequencesCountAt(long index, @CType("uint32_t") int value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_maxSequencesCount(this.segment(), index, value); return this; } + /// Sets `maxSequencesCount` with the given value. + /// @param value the value + /// @return `this` + public VkGeneratedCommandsMemoryRequirementsInfoNV maxSequencesCount(@CType("uint32_t") int value) { VkGeneratedCommandsMemoryRequirementsInfoNV.set_maxSequencesCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryAABBNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryAABBNV.java new file mode 100644 index 00000000..efa4c18e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryAABBNV.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### aabbData +/// [VarHandle][#VH_aabbData] - [Getter][#aabbData()] - [Setter][#aabbData(java.lang.foreign.MemorySegment)] +/// ### numAABBs +/// [VarHandle][#VH_numAABBs] - [Getter][#numAABBs()] - [Setter][#numAABBs(int)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(int)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGeometryAABBNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBuffer aabbData; +/// uint32_t numAABBs; +/// uint32_t stride; +/// VkDeviceSize offset; +/// } VkGeometryAABBNV; +/// ``` +public final class VkGeometryAABBNV extends Struct { + /// The struct layout of `VkGeometryAABBNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("aabbData"), + ValueLayout.JAVA_INT.withName("numAABBs"), + ValueLayout.JAVA_INT.withName("stride"), + ValueLayout.JAVA_LONG.withName("offset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `aabbData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_aabbData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aabbData")); + /// The [VarHandle] of `numAABBs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_numAABBs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("numAABBs")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + + /// Creates `VkGeometryAABBNV` with the given segment. + /// @param segment the memory segment + public VkGeometryAABBNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGeometryAABBNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryAABBNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryAABBNV(segment); } + + /// Creates `VkGeometryAABBNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryAABBNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryAABBNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGeometryAABBNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryAABBNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryAABBNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGeometryAABBNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGeometryAABBNV` + public static VkGeometryAABBNV alloc(SegmentAllocator allocator) { return new VkGeometryAABBNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGeometryAABBNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGeometryAABBNV` + public static VkGeometryAABBNV alloc(SegmentAllocator allocator, long count) { return new VkGeometryAABBNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGeometryAABBNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGeometryAABBNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGeometryAABBNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGeometryAABBNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryAABBNV sTypeAt(long index, @CType("VkStructureType") int value) { VkGeometryAABBNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryAABBNV sType(@CType("VkStructureType") int value) { VkGeometryAABBNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGeometryAABBNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGeometryAABBNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGeometryAABBNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeometryAABBNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryAABBNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeometryAABBNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryAABBNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGeometryAABBNV.set_pNext(this.segment(), value); return this; } + + /// {@return `aabbData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_aabbData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_aabbData.get(segment, 0L, index); } + /// {@return `aabbData`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_aabbData(MemorySegment segment) { return VkGeometryAABBNV.get_aabbData(segment, 0L); } + /// {@return `aabbData` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment aabbDataAt(long index) { return VkGeometryAABBNV.get_aabbData(this.segment(), index); } + /// {@return `aabbData`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment aabbData() { return VkGeometryAABBNV.get_aabbData(this.segment()); } + /// Sets `aabbData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aabbData(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_aabbData.set(segment, 0L, index, value); } + /// Sets `aabbData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aabbData(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryAABBNV.set_aabbData(segment, 0L, value); } + /// Sets `aabbData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryAABBNV aabbDataAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryAABBNV.set_aabbData(this.segment(), index, value); return this; } + /// Sets `aabbData` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryAABBNV aabbData(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryAABBNV.set_aabbData(this.segment(), value); return this; } + + /// {@return `numAABBs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_numAABBs(MemorySegment segment, long index) { return (int) VH_numAABBs.get(segment, 0L, index); } + /// {@return `numAABBs`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_numAABBs(MemorySegment segment) { return VkGeometryAABBNV.get_numAABBs(segment, 0L); } + /// {@return `numAABBs` at the given index} + /// @param index the index + public @CType("uint32_t") int numAABBsAt(long index) { return VkGeometryAABBNV.get_numAABBs(this.segment(), index); } + /// {@return `numAABBs`} + public @CType("uint32_t") int numAABBs() { return VkGeometryAABBNV.get_numAABBs(this.segment()); } + /// Sets `numAABBs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_numAABBs(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_numAABBs.set(segment, 0L, index, value); } + /// Sets `numAABBs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_numAABBs(MemorySegment segment, @CType("uint32_t") int value) { VkGeometryAABBNV.set_numAABBs(segment, 0L, value); } + /// Sets `numAABBs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryAABBNV numAABBsAt(long index, @CType("uint32_t") int value) { VkGeometryAABBNV.set_numAABBs(this.segment(), index, value); return this; } + /// Sets `numAABBs` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryAABBNV numAABBs(@CType("uint32_t") int value) { VkGeometryAABBNV.set_numAABBs(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stride(MemorySegment segment, long index) { return (int) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stride(MemorySegment segment) { return VkGeometryAABBNV.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("uint32_t") int strideAt(long index) { return VkGeometryAABBNV.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("uint32_t") int stride() { return VkGeometryAABBNV.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("uint32_t") int value) { VkGeometryAABBNV.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryAABBNV strideAt(long index, @CType("uint32_t") int value) { VkGeometryAABBNV.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryAABBNV stride(@CType("uint32_t") int value) { VkGeometryAABBNV.set_stride(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkGeometryAABBNV.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkGeometryAABBNV.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkGeometryAABBNV.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeometryAABBNV.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryAABBNV offsetAt(long index, @CType("VkDeviceSize") long value) { VkGeometryAABBNV.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryAABBNV offset(@CType("VkDeviceSize") long value) { VkGeometryAABBNV.set_offset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryDataNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryDataNV.java new file mode 100644 index 00000000..c6f5b6b5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryDataNV.java @@ -0,0 +1,152 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### triangles +/// [Byte offset][#OFFSET_triangles] - [Memory layout][#ML_triangles] - [Getter][#triangles()] - [Setter][#triangles(java.lang.foreign.MemorySegment)] +/// ### aabbs +/// [Byte offset][#OFFSET_aabbs] - [Memory layout][#ML_aabbs] - [Getter][#aabbs()] - [Setter][#aabbs(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGeometryDataNV { +/// VkGeometryTrianglesNV triangles; +/// VkGeometryAABBNV aabbs; +/// } VkGeometryDataNV; +/// ``` +public final class VkGeometryDataNV extends Struct { + /// The struct layout of `VkGeometryDataNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.nv.struct.VkGeometryTrianglesNV.LAYOUT.withName("triangles"), + overrungl.vulkan.nv.struct.VkGeometryAABBNV.LAYOUT.withName("aabbs") + ); + /// The byte offset of `triangles`. + public static final long OFFSET_triangles = LAYOUT.byteOffset(PathElement.groupElement("triangles")); + /// The memory layout of `triangles`. + public static final MemoryLayout ML_triangles = LAYOUT.select(PathElement.groupElement("triangles")); + /// The byte offset of `aabbs`. + public static final long OFFSET_aabbs = LAYOUT.byteOffset(PathElement.groupElement("aabbs")); + /// The memory layout of `aabbs`. + public static final MemoryLayout ML_aabbs = LAYOUT.select(PathElement.groupElement("aabbs")); + + /// Creates `VkGeometryDataNV` with the given segment. + /// @param segment the memory segment + public VkGeometryDataNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGeometryDataNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryDataNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryDataNV(segment); } + + /// Creates `VkGeometryDataNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryDataNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryDataNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGeometryDataNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryDataNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryDataNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGeometryDataNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGeometryDataNV` + public static VkGeometryDataNV alloc(SegmentAllocator allocator) { return new VkGeometryDataNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGeometryDataNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGeometryDataNV` + public static VkGeometryDataNV alloc(SegmentAllocator allocator, long count) { return new VkGeometryDataNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `triangles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGeometryTrianglesNV") java.lang.foreign.MemorySegment get_triangles(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_triangles, index), ML_triangles); } + /// {@return `triangles`} + /// @param segment the segment of the struct + public static @CType("VkGeometryTrianglesNV") java.lang.foreign.MemorySegment get_triangles(MemorySegment segment) { return VkGeometryDataNV.get_triangles(segment, 0L); } + /// {@return `triangles` at the given index} + /// @param index the index + public @CType("VkGeometryTrianglesNV") java.lang.foreign.MemorySegment trianglesAt(long index) { return VkGeometryDataNV.get_triangles(this.segment(), index); } + /// {@return `triangles`} + public @CType("VkGeometryTrianglesNV") java.lang.foreign.MemorySegment triangles() { return VkGeometryDataNV.get_triangles(this.segment()); } + /// Sets `triangles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_triangles(MemorySegment segment, long index, @CType("VkGeometryTrianglesNV") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_triangles, index), ML_triangles.byteSize()); } + /// Sets `triangles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_triangles(MemorySegment segment, @CType("VkGeometryTrianglesNV") java.lang.foreign.MemorySegment value) { VkGeometryDataNV.set_triangles(segment, 0L, value); } + /// Sets `triangles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryDataNV trianglesAt(long index, @CType("VkGeometryTrianglesNV") java.lang.foreign.MemorySegment value) { VkGeometryDataNV.set_triangles(this.segment(), index, value); return this; } + /// Sets `triangles` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryDataNV triangles(@CType("VkGeometryTrianglesNV") java.lang.foreign.MemorySegment value) { VkGeometryDataNV.set_triangles(this.segment(), value); return this; } + + /// {@return `aabbs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGeometryAABBNV") java.lang.foreign.MemorySegment get_aabbs(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_aabbs, index), ML_aabbs); } + /// {@return `aabbs`} + /// @param segment the segment of the struct + public static @CType("VkGeometryAABBNV") java.lang.foreign.MemorySegment get_aabbs(MemorySegment segment) { return VkGeometryDataNV.get_aabbs(segment, 0L); } + /// {@return `aabbs` at the given index} + /// @param index the index + public @CType("VkGeometryAABBNV") java.lang.foreign.MemorySegment aabbsAt(long index) { return VkGeometryDataNV.get_aabbs(this.segment(), index); } + /// {@return `aabbs`} + public @CType("VkGeometryAABBNV") java.lang.foreign.MemorySegment aabbs() { return VkGeometryDataNV.get_aabbs(this.segment()); } + /// Sets `aabbs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aabbs(MemorySegment segment, long index, @CType("VkGeometryAABBNV") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_aabbs, index), ML_aabbs.byteSize()); } + /// Sets `aabbs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aabbs(MemorySegment segment, @CType("VkGeometryAABBNV") java.lang.foreign.MemorySegment value) { VkGeometryDataNV.set_aabbs(segment, 0L, value); } + /// Sets `aabbs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryDataNV aabbsAt(long index, @CType("VkGeometryAABBNV") java.lang.foreign.MemorySegment value) { VkGeometryDataNV.set_aabbs(this.segment(), index, value); return this; } + /// Sets `aabbs` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryDataNV aabbs(@CType("VkGeometryAABBNV") java.lang.foreign.MemorySegment value) { VkGeometryDataNV.set_aabbs(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryNV.java new file mode 100644 index 00000000..b263b5fb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryNV.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### geometryType +/// [VarHandle][#VH_geometryType] - [Getter][#geometryType()] - [Setter][#geometryType(int)] +/// ### geometry +/// [Byte offset][#OFFSET_geometry] - [Memory layout][#ML_geometry] - [Getter][#geometry()] - [Setter][#geometry(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGeometryNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkGeometryTypeKHR geometryType; +/// VkGeometryDataNV geometry; +/// VkGeometryFlagsKHR flags; +/// } VkGeometryNV; +/// ``` +public final class VkGeometryNV extends Struct { + /// The struct layout of `VkGeometryNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("geometryType"), + overrungl.vulkan.nv.struct.VkGeometryDataNV.LAYOUT.withName("geometry"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `geometryType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_geometryType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("geometryType")); + /// The byte offset of `geometry`. + public static final long OFFSET_geometry = LAYOUT.byteOffset(PathElement.groupElement("geometry")); + /// The memory layout of `geometry`. + public static final MemoryLayout ML_geometry = LAYOUT.select(PathElement.groupElement("geometry")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkGeometryNV` with the given segment. + /// @param segment the memory segment + public VkGeometryNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGeometryNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryNV(segment); } + + /// Creates `VkGeometryNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGeometryNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGeometryNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGeometryNV` + public static VkGeometryNV alloc(SegmentAllocator allocator) { return new VkGeometryNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGeometryNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGeometryNV` + public static VkGeometryNV alloc(SegmentAllocator allocator, long count) { return new VkGeometryNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGeometryNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGeometryNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGeometryNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGeometryNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryNV sTypeAt(long index, @CType("VkStructureType") int value) { VkGeometryNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryNV sType(@CType("VkStructureType") int value) { VkGeometryNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGeometryNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGeometryNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGeometryNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeometryNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeometryNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGeometryNV.set_pNext(this.segment(), value); return this; } + + /// {@return `geometryType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGeometryTypeKHR") int get_geometryType(MemorySegment segment, long index) { return (int) VH_geometryType.get(segment, 0L, index); } + /// {@return `geometryType`} + /// @param segment the segment of the struct + public static @CType("VkGeometryTypeKHR") int get_geometryType(MemorySegment segment) { return VkGeometryNV.get_geometryType(segment, 0L); } + /// {@return `geometryType` at the given index} + /// @param index the index + public @CType("VkGeometryTypeKHR") int geometryTypeAt(long index) { return VkGeometryNV.get_geometryType(this.segment(), index); } + /// {@return `geometryType`} + public @CType("VkGeometryTypeKHR") int geometryType() { return VkGeometryNV.get_geometryType(this.segment()); } + /// Sets `geometryType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_geometryType(MemorySegment segment, long index, @CType("VkGeometryTypeKHR") int value) { VH_geometryType.set(segment, 0L, index, value); } + /// Sets `geometryType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_geometryType(MemorySegment segment, @CType("VkGeometryTypeKHR") int value) { VkGeometryNV.set_geometryType(segment, 0L, value); } + /// Sets `geometryType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryNV geometryTypeAt(long index, @CType("VkGeometryTypeKHR") int value) { VkGeometryNV.set_geometryType(this.segment(), index, value); return this; } + /// Sets `geometryType` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryNV geometryType(@CType("VkGeometryTypeKHR") int value) { VkGeometryNV.set_geometryType(this.segment(), value); return this; } + + /// {@return `geometry` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGeometryDataNV") java.lang.foreign.MemorySegment get_geometry(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_geometry, index), ML_geometry); } + /// {@return `geometry`} + /// @param segment the segment of the struct + public static @CType("VkGeometryDataNV") java.lang.foreign.MemorySegment get_geometry(MemorySegment segment) { return VkGeometryNV.get_geometry(segment, 0L); } + /// {@return `geometry` at the given index} + /// @param index the index + public @CType("VkGeometryDataNV") java.lang.foreign.MemorySegment geometryAt(long index) { return VkGeometryNV.get_geometry(this.segment(), index); } + /// {@return `geometry`} + public @CType("VkGeometryDataNV") java.lang.foreign.MemorySegment geometry() { return VkGeometryNV.get_geometry(this.segment()); } + /// Sets `geometry` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_geometry(MemorySegment segment, long index, @CType("VkGeometryDataNV") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_geometry, index), ML_geometry.byteSize()); } + /// Sets `geometry` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_geometry(MemorySegment segment, @CType("VkGeometryDataNV") java.lang.foreign.MemorySegment value) { VkGeometryNV.set_geometry(segment, 0L, value); } + /// Sets `geometry` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryNV geometryAt(long index, @CType("VkGeometryDataNV") java.lang.foreign.MemorySegment value) { VkGeometryNV.set_geometry(this.segment(), index, value); return this; } + /// Sets `geometry` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryNV geometry(@CType("VkGeometryDataNV") java.lang.foreign.MemorySegment value) { VkGeometryNV.set_geometry(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkGeometryFlagsKHR") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkGeometryFlagsKHR") int get_flags(MemorySegment segment) { return VkGeometryNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkGeometryFlagsKHR") int flagsAt(long index) { return VkGeometryNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkGeometryFlagsKHR") int flags() { return VkGeometryNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkGeometryFlagsKHR") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkGeometryFlagsKHR") int value) { VkGeometryNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryNV flagsAt(long index, @CType("VkGeometryFlagsKHR") int value) { VkGeometryNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryNV flags(@CType("VkGeometryFlagsKHR") int value) { VkGeometryNV.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryTrianglesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryTrianglesNV.java new file mode 100644 index 00000000..1fa64532 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGeometryTrianglesNV.java @@ -0,0 +1,555 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### vertexData +/// [VarHandle][#VH_vertexData] - [Getter][#vertexData()] - [Setter][#vertexData(java.lang.foreign.MemorySegment)] +/// ### vertexOffset +/// [VarHandle][#VH_vertexOffset] - [Getter][#vertexOffset()] - [Setter][#vertexOffset(long)] +/// ### vertexCount +/// [VarHandle][#VH_vertexCount] - [Getter][#vertexCount()] - [Setter][#vertexCount(int)] +/// ### vertexStride +/// [VarHandle][#VH_vertexStride] - [Getter][#vertexStride()] - [Setter][#vertexStride(long)] +/// ### vertexFormat +/// [VarHandle][#VH_vertexFormat] - [Getter][#vertexFormat()] - [Setter][#vertexFormat(int)] +/// ### indexData +/// [VarHandle][#VH_indexData] - [Getter][#indexData()] - [Setter][#indexData(java.lang.foreign.MemorySegment)] +/// ### indexOffset +/// [VarHandle][#VH_indexOffset] - [Getter][#indexOffset()] - [Setter][#indexOffset(long)] +/// ### indexCount +/// [VarHandle][#VH_indexCount] - [Getter][#indexCount()] - [Setter][#indexCount(int)] +/// ### indexType +/// [VarHandle][#VH_indexType] - [Getter][#indexType()] - [Setter][#indexType(int)] +/// ### transformData +/// [VarHandle][#VH_transformData] - [Getter][#transformData()] - [Setter][#transformData(java.lang.foreign.MemorySegment)] +/// ### transformOffset +/// [VarHandle][#VH_transformOffset] - [Getter][#transformOffset()] - [Setter][#transformOffset(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGeometryTrianglesNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBuffer vertexData; +/// VkDeviceSize vertexOffset; +/// uint32_t vertexCount; +/// VkDeviceSize vertexStride; +/// VkFormat vertexFormat; +/// VkBuffer indexData; +/// VkDeviceSize indexOffset; +/// uint32_t indexCount; +/// VkIndexType indexType; +/// VkBuffer transformData; +/// VkDeviceSize transformOffset; +/// } VkGeometryTrianglesNV; +/// ``` +public final class VkGeometryTrianglesNV extends Struct { + /// The struct layout of `VkGeometryTrianglesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("vertexData"), + ValueLayout.JAVA_LONG.withName("vertexOffset"), + ValueLayout.JAVA_INT.withName("vertexCount"), + ValueLayout.JAVA_LONG.withName("vertexStride"), + ValueLayout.JAVA_INT.withName("vertexFormat"), + ValueLayout.ADDRESS.withName("indexData"), + ValueLayout.JAVA_LONG.withName("indexOffset"), + ValueLayout.JAVA_INT.withName("indexCount"), + ValueLayout.JAVA_INT.withName("indexType"), + ValueLayout.ADDRESS.withName("transformData"), + ValueLayout.JAVA_LONG.withName("transformOffset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `vertexData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_vertexData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexData")); + /// The [VarHandle] of `vertexOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_vertexOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexOffset")); + /// The [VarHandle] of `vertexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexCount")); + /// The [VarHandle] of `vertexStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_vertexStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexStride")); + /// The [VarHandle] of `vertexFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexFormat")); + /// The [VarHandle] of `indexData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_indexData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexData")); + /// The [VarHandle] of `indexOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_indexOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexOffset")); + /// The [VarHandle] of `indexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexCount")); + /// The [VarHandle] of `indexType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexType")); + /// The [VarHandle] of `transformData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_transformData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformData")); + /// The [VarHandle] of `transformOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_transformOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transformOffset")); + + /// Creates `VkGeometryTrianglesNV` with the given segment. + /// @param segment the memory segment + public VkGeometryTrianglesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGeometryTrianglesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryTrianglesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryTrianglesNV(segment); } + + /// Creates `VkGeometryTrianglesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryTrianglesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryTrianglesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGeometryTrianglesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGeometryTrianglesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGeometryTrianglesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGeometryTrianglesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGeometryTrianglesNV` + public static VkGeometryTrianglesNV alloc(SegmentAllocator allocator) { return new VkGeometryTrianglesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGeometryTrianglesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGeometryTrianglesNV` + public static VkGeometryTrianglesNV alloc(SegmentAllocator allocator, long count) { return new VkGeometryTrianglesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGeometryTrianglesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGeometryTrianglesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGeometryTrianglesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGeometryTrianglesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkGeometryTrianglesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV sType(@CType("VkStructureType") int value) { VkGeometryTrianglesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGeometryTrianglesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGeometryTrianglesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGeometryTrianglesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `vertexData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_vertexData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_vertexData.get(segment, 0L, index); } + /// {@return `vertexData`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_vertexData(MemorySegment segment) { return VkGeometryTrianglesNV.get_vertexData(segment, 0L); } + /// {@return `vertexData` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment vertexDataAt(long index) { return VkGeometryTrianglesNV.get_vertexData(this.segment(), index); } + /// {@return `vertexData`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment vertexData() { return VkGeometryTrianglesNV.get_vertexData(this.segment()); } + /// Sets `vertexData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexData(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_vertexData.set(segment, 0L, index, value); } + /// Sets `vertexData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexData(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_vertexData(segment, 0L, value); } + /// Sets `vertexData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV vertexDataAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_vertexData(this.segment(), index, value); return this; } + /// Sets `vertexData` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV vertexData(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_vertexData(this.segment(), value); return this; } + + /// {@return `vertexOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_vertexOffset(MemorySegment segment, long index) { return (long) VH_vertexOffset.get(segment, 0L, index); } + /// {@return `vertexOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_vertexOffset(MemorySegment segment) { return VkGeometryTrianglesNV.get_vertexOffset(segment, 0L); } + /// {@return `vertexOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long vertexOffsetAt(long index) { return VkGeometryTrianglesNV.get_vertexOffset(this.segment(), index); } + /// {@return `vertexOffset`} + public @CType("VkDeviceSize") long vertexOffset() { return VkGeometryTrianglesNV.get_vertexOffset(this.segment()); } + /// Sets `vertexOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_vertexOffset.set(segment, 0L, index, value); } + /// Sets `vertexOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_vertexOffset(segment, 0L, value); } + /// Sets `vertexOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV vertexOffsetAt(long index, @CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_vertexOffset(this.segment(), index, value); return this; } + /// Sets `vertexOffset` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV vertexOffset(@CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_vertexOffset(this.segment(), value); return this; } + + /// {@return `vertexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vertexCount(MemorySegment segment, long index) { return (int) VH_vertexCount.get(segment, 0L, index); } + /// {@return `vertexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vertexCount(MemorySegment segment) { return VkGeometryTrianglesNV.get_vertexCount(segment, 0L); } + /// {@return `vertexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int vertexCountAt(long index) { return VkGeometryTrianglesNV.get_vertexCount(this.segment(), index); } + /// {@return `vertexCount`} + public @CType("uint32_t") int vertexCount() { return VkGeometryTrianglesNV.get_vertexCount(this.segment()); } + /// Sets `vertexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vertexCount.set(segment, 0L, index, value); } + /// Sets `vertexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexCount(MemorySegment segment, @CType("uint32_t") int value) { VkGeometryTrianglesNV.set_vertexCount(segment, 0L, value); } + /// Sets `vertexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV vertexCountAt(long index, @CType("uint32_t") int value) { VkGeometryTrianglesNV.set_vertexCount(this.segment(), index, value); return this; } + /// Sets `vertexCount` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV vertexCount(@CType("uint32_t") int value) { VkGeometryTrianglesNV.set_vertexCount(this.segment(), value); return this; } + + /// {@return `vertexStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_vertexStride(MemorySegment segment, long index) { return (long) VH_vertexStride.get(segment, 0L, index); } + /// {@return `vertexStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_vertexStride(MemorySegment segment) { return VkGeometryTrianglesNV.get_vertexStride(segment, 0L); } + /// {@return `vertexStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long vertexStrideAt(long index) { return VkGeometryTrianglesNV.get_vertexStride(this.segment(), index); } + /// {@return `vertexStride`} + public @CType("VkDeviceSize") long vertexStride() { return VkGeometryTrianglesNV.get_vertexStride(this.segment()); } + /// Sets `vertexStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_vertexStride.set(segment, 0L, index, value); } + /// Sets `vertexStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_vertexStride(segment, 0L, value); } + /// Sets `vertexStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV vertexStrideAt(long index, @CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_vertexStride(this.segment(), index, value); return this; } + /// Sets `vertexStride` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV vertexStride(@CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_vertexStride(this.segment(), value); return this; } + + /// {@return `vertexFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_vertexFormat(MemorySegment segment, long index) { return (int) VH_vertexFormat.get(segment, 0L, index); } + /// {@return `vertexFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_vertexFormat(MemorySegment segment) { return VkGeometryTrianglesNV.get_vertexFormat(segment, 0L); } + /// {@return `vertexFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int vertexFormatAt(long index) { return VkGeometryTrianglesNV.get_vertexFormat(this.segment(), index); } + /// {@return `vertexFormat`} + public @CType("VkFormat") int vertexFormat() { return VkGeometryTrianglesNV.get_vertexFormat(this.segment()); } + /// Sets `vertexFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_vertexFormat.set(segment, 0L, index, value); } + /// Sets `vertexFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexFormat(MemorySegment segment, @CType("VkFormat") int value) { VkGeometryTrianglesNV.set_vertexFormat(segment, 0L, value); } + /// Sets `vertexFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV vertexFormatAt(long index, @CType("VkFormat") int value) { VkGeometryTrianglesNV.set_vertexFormat(this.segment(), index, value); return this; } + /// Sets `vertexFormat` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV vertexFormat(@CType("VkFormat") int value) { VkGeometryTrianglesNV.set_vertexFormat(this.segment(), value); return this; } + + /// {@return `indexData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_indexData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_indexData.get(segment, 0L, index); } + /// {@return `indexData`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_indexData(MemorySegment segment) { return VkGeometryTrianglesNV.get_indexData(segment, 0L); } + /// {@return `indexData` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment indexDataAt(long index) { return VkGeometryTrianglesNV.get_indexData(this.segment(), index); } + /// {@return `indexData`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment indexData() { return VkGeometryTrianglesNV.get_indexData(this.segment()); } + /// Sets `indexData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexData(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_indexData.set(segment, 0L, index, value); } + /// Sets `indexData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexData(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_indexData(segment, 0L, value); } + /// Sets `indexData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV indexDataAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_indexData(this.segment(), index, value); return this; } + /// Sets `indexData` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV indexData(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_indexData(this.segment(), value); return this; } + + /// {@return `indexOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_indexOffset(MemorySegment segment, long index) { return (long) VH_indexOffset.get(segment, 0L, index); } + /// {@return `indexOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_indexOffset(MemorySegment segment) { return VkGeometryTrianglesNV.get_indexOffset(segment, 0L); } + /// {@return `indexOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long indexOffsetAt(long index) { return VkGeometryTrianglesNV.get_indexOffset(this.segment(), index); } + /// {@return `indexOffset`} + public @CType("VkDeviceSize") long indexOffset() { return VkGeometryTrianglesNV.get_indexOffset(this.segment()); } + /// Sets `indexOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_indexOffset.set(segment, 0L, index, value); } + /// Sets `indexOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_indexOffset(segment, 0L, value); } + /// Sets `indexOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV indexOffsetAt(long index, @CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_indexOffset(this.segment(), index, value); return this; } + /// Sets `indexOffset` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV indexOffset(@CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_indexOffset(this.segment(), value); return this; } + + /// {@return `indexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_indexCount(MemorySegment segment, long index) { return (int) VH_indexCount.get(segment, 0L, index); } + /// {@return `indexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_indexCount(MemorySegment segment) { return VkGeometryTrianglesNV.get_indexCount(segment, 0L); } + /// {@return `indexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int indexCountAt(long index) { return VkGeometryTrianglesNV.get_indexCount(this.segment(), index); } + /// {@return `indexCount`} + public @CType("uint32_t") int indexCount() { return VkGeometryTrianglesNV.get_indexCount(this.segment()); } + /// Sets `indexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_indexCount.set(segment, 0L, index, value); } + /// Sets `indexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexCount(MemorySegment segment, @CType("uint32_t") int value) { VkGeometryTrianglesNV.set_indexCount(segment, 0L, value); } + /// Sets `indexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV indexCountAt(long index, @CType("uint32_t") int value) { VkGeometryTrianglesNV.set_indexCount(this.segment(), index, value); return this; } + /// Sets `indexCount` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV indexCount(@CType("uint32_t") int value) { VkGeometryTrianglesNV.set_indexCount(this.segment(), value); return this; } + + /// {@return `indexType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndexType") int get_indexType(MemorySegment segment, long index) { return (int) VH_indexType.get(segment, 0L, index); } + /// {@return `indexType`} + /// @param segment the segment of the struct + public static @CType("VkIndexType") int get_indexType(MemorySegment segment) { return VkGeometryTrianglesNV.get_indexType(segment, 0L); } + /// {@return `indexType` at the given index} + /// @param index the index + public @CType("VkIndexType") int indexTypeAt(long index) { return VkGeometryTrianglesNV.get_indexType(this.segment(), index); } + /// {@return `indexType`} + public @CType("VkIndexType") int indexType() { return VkGeometryTrianglesNV.get_indexType(this.segment()); } + /// Sets `indexType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexType(MemorySegment segment, long index, @CType("VkIndexType") int value) { VH_indexType.set(segment, 0L, index, value); } + /// Sets `indexType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexType(MemorySegment segment, @CType("VkIndexType") int value) { VkGeometryTrianglesNV.set_indexType(segment, 0L, value); } + /// Sets `indexType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV indexTypeAt(long index, @CType("VkIndexType") int value) { VkGeometryTrianglesNV.set_indexType(this.segment(), index, value); return this; } + /// Sets `indexType` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV indexType(@CType("VkIndexType") int value) { VkGeometryTrianglesNV.set_indexType(this.segment(), value); return this; } + + /// {@return `transformData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_transformData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_transformData.get(segment, 0L, index); } + /// {@return `transformData`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_transformData(MemorySegment segment) { return VkGeometryTrianglesNV.get_transformData(segment, 0L); } + /// {@return `transformData` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment transformDataAt(long index) { return VkGeometryTrianglesNV.get_transformData(this.segment(), index); } + /// {@return `transformData`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment transformData() { return VkGeometryTrianglesNV.get_transformData(this.segment()); } + /// Sets `transformData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformData(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_transformData.set(segment, 0L, index, value); } + /// Sets `transformData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformData(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_transformData(segment, 0L, value); } + /// Sets `transformData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV transformDataAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_transformData(this.segment(), index, value); return this; } + /// Sets `transformData` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV transformData(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkGeometryTrianglesNV.set_transformData(this.segment(), value); return this; } + + /// {@return `transformOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_transformOffset(MemorySegment segment, long index) { return (long) VH_transformOffset.get(segment, 0L, index); } + /// {@return `transformOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_transformOffset(MemorySegment segment) { return VkGeometryTrianglesNV.get_transformOffset(segment, 0L); } + /// {@return `transformOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long transformOffsetAt(long index) { return VkGeometryTrianglesNV.get_transformOffset(this.segment(), index); } + /// {@return `transformOffset`} + public @CType("VkDeviceSize") long transformOffset() { return VkGeometryTrianglesNV.get_transformOffset(this.segment()); } + /// Sets `transformOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transformOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_transformOffset.set(segment, 0L, index, value); } + /// Sets `transformOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transformOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_transformOffset(segment, 0L, value); } + /// Sets `transformOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV transformOffsetAt(long index, @CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_transformOffset(this.segment(), index, value); return this; } + /// Sets `transformOffset` with the given value. + /// @param value the value + /// @return `this` + public VkGeometryTrianglesNV transformOffset(@CType("VkDeviceSize") long value) { VkGeometryTrianglesNV.set_transformOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGetLatencyMarkerInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGetLatencyMarkerInfoNV.java new file mode 100644 index 00000000..06ed42d4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGetLatencyMarkerInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### timingCount +/// [VarHandle][#VH_timingCount] - [Getter][#timingCount()] - [Setter][#timingCount(int)] +/// ### pTimings +/// [VarHandle][#VH_pTimings] - [Getter][#pTimings()] - [Setter][#pTimings(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGetLatencyMarkerInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t timingCount; +/// VkLatencyTimingsFrameReportNV * pTimings; +/// } VkGetLatencyMarkerInfoNV; +/// ``` +public final class VkGetLatencyMarkerInfoNV extends Struct { + /// The struct layout of `VkGetLatencyMarkerInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("timingCount"), + ValueLayout.ADDRESS.withName("pTimings") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `timingCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_timingCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timingCount")); + /// The [VarHandle] of `pTimings` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTimings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTimings")); + + /// Creates `VkGetLatencyMarkerInfoNV` with the given segment. + /// @param segment the memory segment + public VkGetLatencyMarkerInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGetLatencyMarkerInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGetLatencyMarkerInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGetLatencyMarkerInfoNV(segment); } + + /// Creates `VkGetLatencyMarkerInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGetLatencyMarkerInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGetLatencyMarkerInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGetLatencyMarkerInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGetLatencyMarkerInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGetLatencyMarkerInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGetLatencyMarkerInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGetLatencyMarkerInfoNV` + public static VkGetLatencyMarkerInfoNV alloc(SegmentAllocator allocator) { return new VkGetLatencyMarkerInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGetLatencyMarkerInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGetLatencyMarkerInfoNV` + public static VkGetLatencyMarkerInfoNV alloc(SegmentAllocator allocator, long count) { return new VkGetLatencyMarkerInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGetLatencyMarkerInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGetLatencyMarkerInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGetLatencyMarkerInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGetLatencyMarkerInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGetLatencyMarkerInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkGetLatencyMarkerInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGetLatencyMarkerInfoNV sType(@CType("VkStructureType") int value) { VkGetLatencyMarkerInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGetLatencyMarkerInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGetLatencyMarkerInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGetLatencyMarkerInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGetLatencyMarkerInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGetLatencyMarkerInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGetLatencyMarkerInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGetLatencyMarkerInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGetLatencyMarkerInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `timingCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_timingCount(MemorySegment segment, long index) { return (int) VH_timingCount.get(segment, 0L, index); } + /// {@return `timingCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_timingCount(MemorySegment segment) { return VkGetLatencyMarkerInfoNV.get_timingCount(segment, 0L); } + /// {@return `timingCount` at the given index} + /// @param index the index + public @CType("uint32_t") int timingCountAt(long index) { return VkGetLatencyMarkerInfoNV.get_timingCount(this.segment(), index); } + /// {@return `timingCount`} + public @CType("uint32_t") int timingCount() { return VkGetLatencyMarkerInfoNV.get_timingCount(this.segment()); } + /// Sets `timingCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timingCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_timingCount.set(segment, 0L, index, value); } + /// Sets `timingCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timingCount(MemorySegment segment, @CType("uint32_t") int value) { VkGetLatencyMarkerInfoNV.set_timingCount(segment, 0L, value); } + /// Sets `timingCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGetLatencyMarkerInfoNV timingCountAt(long index, @CType("uint32_t") int value) { VkGetLatencyMarkerInfoNV.set_timingCount(this.segment(), index, value); return this; } + /// Sets `timingCount` with the given value. + /// @param value the value + /// @return `this` + public VkGetLatencyMarkerInfoNV timingCount(@CType("uint32_t") int value) { VkGetLatencyMarkerInfoNV.set_timingCount(this.segment(), value); return this; } + + /// {@return `pTimings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkLatencyTimingsFrameReportNV *") java.lang.foreign.MemorySegment get_pTimings(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTimings.get(segment, 0L, index); } + /// {@return `pTimings`} + /// @param segment the segment of the struct + public static @CType("VkLatencyTimingsFrameReportNV *") java.lang.foreign.MemorySegment get_pTimings(MemorySegment segment) { return VkGetLatencyMarkerInfoNV.get_pTimings(segment, 0L); } + /// {@return `pTimings` at the given index} + /// @param index the index + public @CType("VkLatencyTimingsFrameReportNV *") java.lang.foreign.MemorySegment pTimingsAt(long index) { return VkGetLatencyMarkerInfoNV.get_pTimings(this.segment(), index); } + /// {@return `pTimings`} + public @CType("VkLatencyTimingsFrameReportNV *") java.lang.foreign.MemorySegment pTimings() { return VkGetLatencyMarkerInfoNV.get_pTimings(this.segment()); } + /// Sets `pTimings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTimings(MemorySegment segment, long index, @CType("VkLatencyTimingsFrameReportNV *") java.lang.foreign.MemorySegment value) { VH_pTimings.set(segment, 0L, index, value); } + /// Sets `pTimings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTimings(MemorySegment segment, @CType("VkLatencyTimingsFrameReportNV *") java.lang.foreign.MemorySegment value) { VkGetLatencyMarkerInfoNV.set_pTimings(segment, 0L, value); } + /// Sets `pTimings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGetLatencyMarkerInfoNV pTimingsAt(long index, @CType("VkLatencyTimingsFrameReportNV *") java.lang.foreign.MemorySegment value) { VkGetLatencyMarkerInfoNV.set_pTimings(this.segment(), index, value); return this; } + /// Sets `pTimings` with the given value. + /// @param value the value + /// @return `this` + public VkGetLatencyMarkerInfoNV pTimings(@CType("VkLatencyTimingsFrameReportNV *") java.lang.foreign.MemorySegment value) { VkGetLatencyMarkerInfoNV.set_pTimings(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGraphicsPipelineShaderGroupsCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGraphicsPipelineShaderGroupsCreateInfoNV.java new file mode 100644 index 00000000..31069dd4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGraphicsPipelineShaderGroupsCreateInfoNV.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### groupCount +/// [VarHandle][#VH_groupCount] - [Getter][#groupCount()] - [Setter][#groupCount(int)] +/// ### pGroups +/// [VarHandle][#VH_pGroups] - [Getter][#pGroups()] - [Setter][#pGroups(java.lang.foreign.MemorySegment)] +/// ### pipelineCount +/// [VarHandle][#VH_pipelineCount] - [Getter][#pipelineCount()] - [Setter][#pipelineCount(int)] +/// ### pPipelines +/// [VarHandle][#VH_pPipelines] - [Getter][#pPipelines()] - [Setter][#pPipelines(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGraphicsPipelineShaderGroupsCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t groupCount; +/// const VkGraphicsShaderGroupCreateInfoNV * pGroups; +/// uint32_t pipelineCount; +/// const VkPipeline * pPipelines; +/// } VkGraphicsPipelineShaderGroupsCreateInfoNV; +/// ``` +public final class VkGraphicsPipelineShaderGroupsCreateInfoNV extends Struct { + /// The struct layout of `VkGraphicsPipelineShaderGroupsCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("groupCount"), + ValueLayout.ADDRESS.withName("pGroups"), + ValueLayout.JAVA_INT.withName("pipelineCount"), + ValueLayout.ADDRESS.withName("pPipelines") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `groupCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_groupCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("groupCount")); + /// The [VarHandle] of `pGroups` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pGroups = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pGroups")); + /// The [VarHandle] of `pipelineCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineCount")); + /// The [VarHandle] of `pPipelines` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelines")); + + /// Creates `VkGraphicsPipelineShaderGroupsCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkGraphicsPipelineShaderGroupsCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGraphicsPipelineShaderGroupsCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsPipelineShaderGroupsCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsPipelineShaderGroupsCreateInfoNV(segment); } + + /// Creates `VkGraphicsPipelineShaderGroupsCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsPipelineShaderGroupsCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsPipelineShaderGroupsCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGraphicsPipelineShaderGroupsCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsPipelineShaderGroupsCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsPipelineShaderGroupsCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGraphicsPipelineShaderGroupsCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGraphicsPipelineShaderGroupsCreateInfoNV` + public static VkGraphicsPipelineShaderGroupsCreateInfoNV alloc(SegmentAllocator allocator) { return new VkGraphicsPipelineShaderGroupsCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGraphicsPipelineShaderGroupsCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGraphicsPipelineShaderGroupsCreateInfoNV` + public static VkGraphicsPipelineShaderGroupsCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkGraphicsPipelineShaderGroupsCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV sType(@CType("VkStructureType") int value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `groupCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_groupCount(MemorySegment segment, long index) { return (int) VH_groupCount.get(segment, 0L, index); } + /// {@return `groupCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_groupCount(MemorySegment segment) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_groupCount(segment, 0L); } + /// {@return `groupCount` at the given index} + /// @param index the index + public @CType("uint32_t") int groupCountAt(long index) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_groupCount(this.segment(), index); } + /// {@return `groupCount`} + public @CType("uint32_t") int groupCount() { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_groupCount(this.segment()); } + /// Sets `groupCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_groupCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_groupCount.set(segment, 0L, index, value); } + /// Sets `groupCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_groupCount(MemorySegment segment, @CType("uint32_t") int value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_groupCount(segment, 0L, value); } + /// Sets `groupCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV groupCountAt(long index, @CType("uint32_t") int value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_groupCount(this.segment(), index, value); return this; } + /// Sets `groupCount` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV groupCount(@CType("uint32_t") int value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_groupCount(this.segment(), value); return this; } + + /// {@return `pGroups` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkGraphicsShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment get_pGroups(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pGroups.get(segment, 0L, index); } + /// {@return `pGroups`} + /// @param segment the segment of the struct + public static @CType("const VkGraphicsShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment get_pGroups(MemorySegment segment) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pGroups(segment, 0L); } + /// {@return `pGroups` at the given index} + /// @param index the index + public @CType("const VkGraphicsShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment pGroupsAt(long index) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pGroups(this.segment(), index); } + /// {@return `pGroups`} + public @CType("const VkGraphicsShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment pGroups() { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pGroups(this.segment()); } + /// Sets `pGroups` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pGroups(MemorySegment segment, long index, @CType("const VkGraphicsShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment value) { VH_pGroups.set(segment, 0L, index, value); } + /// Sets `pGroups` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pGroups(MemorySegment segment, @CType("const VkGraphicsShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pGroups(segment, 0L, value); } + /// Sets `pGroups` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV pGroupsAt(long index, @CType("const VkGraphicsShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pGroups(this.segment(), index, value); return this; } + /// Sets `pGroups` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV pGroups(@CType("const VkGraphicsShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pGroups(this.segment(), value); return this; } + + /// {@return `pipelineCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pipelineCount(MemorySegment segment, long index) { return (int) VH_pipelineCount.get(segment, 0L, index); } + /// {@return `pipelineCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pipelineCount(MemorySegment segment) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pipelineCount(segment, 0L); } + /// {@return `pipelineCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pipelineCountAt(long index) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pipelineCount(this.segment(), index); } + /// {@return `pipelineCount`} + public @CType("uint32_t") int pipelineCount() { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pipelineCount(this.segment()); } + /// Sets `pipelineCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pipelineCount.set(segment, 0L, index, value); } + /// Sets `pipelineCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineCount(MemorySegment segment, @CType("uint32_t") int value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pipelineCount(segment, 0L, value); } + /// Sets `pipelineCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV pipelineCountAt(long index, @CType("uint32_t") int value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pipelineCount(this.segment(), index, value); return this; } + /// Sets `pipelineCount` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV pipelineCount(@CType("uint32_t") int value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pipelineCount(this.segment(), value); return this; } + + /// {@return `pPipelines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipeline *") java.lang.foreign.MemorySegment get_pPipelines(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelines.get(segment, 0L, index); } + /// {@return `pPipelines`} + /// @param segment the segment of the struct + public static @CType("const VkPipeline *") java.lang.foreign.MemorySegment get_pPipelines(MemorySegment segment) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pPipelines(segment, 0L); } + /// {@return `pPipelines` at the given index} + /// @param index the index + public @CType("const VkPipeline *") java.lang.foreign.MemorySegment pPipelinesAt(long index) { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pPipelines(this.segment(), index); } + /// {@return `pPipelines`} + public @CType("const VkPipeline *") java.lang.foreign.MemorySegment pPipelines() { return VkGraphicsPipelineShaderGroupsCreateInfoNV.get_pPipelines(this.segment()); } + /// Sets `pPipelines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelines(MemorySegment segment, long index, @CType("const VkPipeline *") java.lang.foreign.MemorySegment value) { VH_pPipelines.set(segment, 0L, index, value); } + /// Sets `pPipelines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelines(MemorySegment segment, @CType("const VkPipeline *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pPipelines(segment, 0L, value); } + /// Sets `pPipelines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV pPipelinesAt(long index, @CType("const VkPipeline *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pPipelines(this.segment(), index, value); return this; } + /// Sets `pPipelines` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineShaderGroupsCreateInfoNV pPipelines(@CType("const VkPipeline *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineShaderGroupsCreateInfoNV.set_pPipelines(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGraphicsShaderGroupCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGraphicsShaderGroupCreateInfoNV.java new file mode 100644 index 00000000..0d9c62c2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkGraphicsShaderGroupCreateInfoNV.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stageCount +/// [VarHandle][#VH_stageCount] - [Getter][#stageCount()] - [Setter][#stageCount(int)] +/// ### pStages +/// [VarHandle][#VH_pStages] - [Getter][#pStages()] - [Setter][#pStages(java.lang.foreign.MemorySegment)] +/// ### pVertexInputState +/// [VarHandle][#VH_pVertexInputState] - [Getter][#pVertexInputState()] - [Setter][#pVertexInputState(java.lang.foreign.MemorySegment)] +/// ### pTessellationState +/// [VarHandle][#VH_pTessellationState] - [Getter][#pTessellationState()] - [Setter][#pTessellationState(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGraphicsShaderGroupCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t stageCount; +/// const VkPipelineShaderStageCreateInfo * pStages; +/// const VkPipelineVertexInputStateCreateInfo * pVertexInputState; +/// const VkPipelineTessellationStateCreateInfo * pTessellationState; +/// } VkGraphicsShaderGroupCreateInfoNV; +/// ``` +public final class VkGraphicsShaderGroupCreateInfoNV extends Struct { + /// The struct layout of `VkGraphicsShaderGroupCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stageCount"), + ValueLayout.ADDRESS.withName("pStages"), + ValueLayout.ADDRESS.withName("pVertexInputState"), + ValueLayout.ADDRESS.withName("pTessellationState") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageCount")); + /// The [VarHandle] of `pStages` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStages")); + /// The [VarHandle] of `pVertexInputState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVertexInputState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVertexInputState")); + /// The [VarHandle] of `pTessellationState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTessellationState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTessellationState")); + + /// Creates `VkGraphicsShaderGroupCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkGraphicsShaderGroupCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGraphicsShaderGroupCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsShaderGroupCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsShaderGroupCreateInfoNV(segment); } + + /// Creates `VkGraphicsShaderGroupCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsShaderGroupCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsShaderGroupCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGraphicsShaderGroupCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsShaderGroupCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsShaderGroupCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGraphicsShaderGroupCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGraphicsShaderGroupCreateInfoNV` + public static VkGraphicsShaderGroupCreateInfoNV alloc(SegmentAllocator allocator) { return new VkGraphicsShaderGroupCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGraphicsShaderGroupCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGraphicsShaderGroupCreateInfoNV` + public static VkGraphicsShaderGroupCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkGraphicsShaderGroupCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGraphicsShaderGroupCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGraphicsShaderGroupCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGraphicsShaderGroupCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGraphicsShaderGroupCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkGraphicsShaderGroupCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV sType(@CType("VkStructureType") int value) { VkGraphicsShaderGroupCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGraphicsShaderGroupCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGraphicsShaderGroupCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGraphicsShaderGroupCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `stageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stageCount(MemorySegment segment, long index) { return (int) VH_stageCount.get(segment, 0L, index); } + /// {@return `stageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stageCount(MemorySegment segment) { return VkGraphicsShaderGroupCreateInfoNV.get_stageCount(segment, 0L); } + /// {@return `stageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stageCountAt(long index) { return VkGraphicsShaderGroupCreateInfoNV.get_stageCount(this.segment(), index); } + /// {@return `stageCount`} + public @CType("uint32_t") int stageCount() { return VkGraphicsShaderGroupCreateInfoNV.get_stageCount(this.segment()); } + /// Sets `stageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stageCount.set(segment, 0L, index, value); } + /// Sets `stageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageCount(MemorySegment segment, @CType("uint32_t") int value) { VkGraphicsShaderGroupCreateInfoNV.set_stageCount(segment, 0L, value); } + /// Sets `stageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV stageCountAt(long index, @CType("uint32_t") int value) { VkGraphicsShaderGroupCreateInfoNV.set_stageCount(this.segment(), index, value); return this; } + /// Sets `stageCount` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV stageCount(@CType("uint32_t") int value) { VkGraphicsShaderGroupCreateInfoNV.set_stageCount(this.segment(), value); return this; } + + /// {@return `pStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment get_pStages(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStages.get(segment, 0L, index); } + /// {@return `pStages`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment get_pStages(MemorySegment segment) { return VkGraphicsShaderGroupCreateInfoNV.get_pStages(segment, 0L); } + /// {@return `pStages` at the given index} + /// @param index the index + public @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment pStagesAt(long index) { return VkGraphicsShaderGroupCreateInfoNV.get_pStages(this.segment(), index); } + /// {@return `pStages`} + public @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment pStages() { return VkGraphicsShaderGroupCreateInfoNV.get_pStages(this.segment()); } + /// Sets `pStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStages(MemorySegment segment, long index, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pStages.set(segment, 0L, index, value); } + /// Sets `pStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStages(MemorySegment segment, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pStages(segment, 0L, value); } + /// Sets `pStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV pStagesAt(long index, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pStages(this.segment(), index, value); return this; } + /// Sets `pStages` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV pStages(@CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pStages(this.segment(), value); return this; } + + /// {@return `pVertexInputState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment get_pVertexInputState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVertexInputState.get(segment, 0L, index); } + /// {@return `pVertexInputState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment get_pVertexInputState(MemorySegment segment) { return VkGraphicsShaderGroupCreateInfoNV.get_pVertexInputState(segment, 0L); } + /// {@return `pVertexInputState` at the given index} + /// @param index the index + public @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment pVertexInputStateAt(long index) { return VkGraphicsShaderGroupCreateInfoNV.get_pVertexInputState(this.segment(), index); } + /// {@return `pVertexInputState`} + public @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment pVertexInputState() { return VkGraphicsShaderGroupCreateInfoNV.get_pVertexInputState(this.segment()); } + /// Sets `pVertexInputState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVertexInputState(MemorySegment segment, long index, @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pVertexInputState.set(segment, 0L, index, value); } + /// Sets `pVertexInputState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVertexInputState(MemorySegment segment, @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pVertexInputState(segment, 0L, value); } + /// Sets `pVertexInputState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV pVertexInputStateAt(long index, @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pVertexInputState(this.segment(), index, value); return this; } + /// Sets `pVertexInputState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV pVertexInputState(@CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pVertexInputState(this.segment(), value); return this; } + + /// {@return `pTessellationState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment get_pTessellationState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTessellationState.get(segment, 0L, index); } + /// {@return `pTessellationState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment get_pTessellationState(MemorySegment segment) { return VkGraphicsShaderGroupCreateInfoNV.get_pTessellationState(segment, 0L); } + /// {@return `pTessellationState` at the given index} + /// @param index the index + public @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment pTessellationStateAt(long index) { return VkGraphicsShaderGroupCreateInfoNV.get_pTessellationState(this.segment(), index); } + /// {@return `pTessellationState`} + public @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment pTessellationState() { return VkGraphicsShaderGroupCreateInfoNV.get_pTessellationState(this.segment()); } + /// Sets `pTessellationState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTessellationState(MemorySegment segment, long index, @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pTessellationState.set(segment, 0L, index, value); } + /// Sets `pTessellationState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTessellationState(MemorySegment segment, @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pTessellationState(segment, 0L, value); } + /// Sets `pTessellationState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV pTessellationStateAt(long index, @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pTessellationState(this.segment(), index, value); return this; } + /// Sets `pTessellationState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsShaderGroupCreateInfoNV pTessellationState(@CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsShaderGroupCreateInfoNV.set_pTessellationState(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportFenceSciSyncInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportFenceSciSyncInfoNV.java new file mode 100644 index 00000000..b964807b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportFenceSciSyncInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fence +/// [VarHandle][#VH_fence] - [Getter][#fence()] - [Setter][#fence(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### handle +/// [VarHandle][#VH_handle] - [Getter][#handle()] - [Setter][#handle(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportFenceSciSyncInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkFence fence; +/// VkExternalFenceHandleTypeFlagBits handleType; +/// void * handle; +/// } VkImportFenceSciSyncInfoNV; +/// ``` +public final class VkImportFenceSciSyncInfoNV extends Struct { + /// The struct layout of `VkImportFenceSciSyncInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("fence"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.ADDRESS.withName("handle") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fence` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_fence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fence")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `handle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_handle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handle")); + + /// Creates `VkImportFenceSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + public VkImportFenceSciSyncInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportFenceSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportFenceSciSyncInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportFenceSciSyncInfoNV(segment); } + + /// Creates `VkImportFenceSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportFenceSciSyncInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportFenceSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportFenceSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportFenceSciSyncInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportFenceSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportFenceSciSyncInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportFenceSciSyncInfoNV` + public static VkImportFenceSciSyncInfoNV alloc(SegmentAllocator allocator) { return new VkImportFenceSciSyncInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportFenceSciSyncInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportFenceSciSyncInfoNV` + public static VkImportFenceSciSyncInfoNV alloc(SegmentAllocator allocator, long count) { return new VkImportFenceSciSyncInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportFenceSciSyncInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportFenceSciSyncInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportFenceSciSyncInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportFenceSciSyncInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceSciSyncInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkImportFenceSciSyncInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceSciSyncInfoNV sType(@CType("VkStructureType") int value) { VkImportFenceSciSyncInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportFenceSciSyncInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportFenceSciSyncInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportFenceSciSyncInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportFenceSciSyncInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceSciSyncInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportFenceSciSyncInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceSciSyncInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportFenceSciSyncInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `fence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_fence.get(segment, 0L, index); } + /// {@return `fence`} + /// @param segment the segment of the struct + public static @CType("VkFence") java.lang.foreign.MemorySegment get_fence(MemorySegment segment) { return VkImportFenceSciSyncInfoNV.get_fence(segment, 0L); } + /// {@return `fence` at the given index} + /// @param index the index + public @CType("VkFence") java.lang.foreign.MemorySegment fenceAt(long index) { return VkImportFenceSciSyncInfoNV.get_fence(this.segment(), index); } + /// {@return `fence`} + public @CType("VkFence") java.lang.foreign.MemorySegment fence() { return VkImportFenceSciSyncInfoNV.get_fence(this.segment()); } + /// Sets `fence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fence(MemorySegment segment, long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VH_fence.set(segment, 0L, index, value); } + /// Sets `fence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fence(MemorySegment segment, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkImportFenceSciSyncInfoNV.set_fence(segment, 0L, value); } + /// Sets `fence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceSciSyncInfoNV fenceAt(long index, @CType("VkFence") java.lang.foreign.MemorySegment value) { VkImportFenceSciSyncInfoNV.set_fence(this.segment(), index, value); return this; } + /// Sets `fence` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceSciSyncInfoNV fence(@CType("VkFence") java.lang.foreign.MemorySegment value) { VkImportFenceSciSyncInfoNV.set_fence(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportFenceSciSyncInfoNV.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalFenceHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportFenceSciSyncInfoNV.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalFenceHandleTypeFlagBits") int handleType() { return VkImportFenceSciSyncInfoNV.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkImportFenceSciSyncInfoNV.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceSciSyncInfoNV handleTypeAt(long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkImportFenceSciSyncInfoNV.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceSciSyncInfoNV handleType(@CType("VkExternalFenceHandleTypeFlagBits") int value) { VkImportFenceSciSyncInfoNV.set_handleType(this.segment(), value); return this; } + + /// {@return `handle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_handle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_handle.get(segment, 0L, index); } + /// {@return `handle`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_handle(MemorySegment segment) { return VkImportFenceSciSyncInfoNV.get_handle(segment, 0L); } + /// {@return `handle` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment handleAt(long index) { return VkImportFenceSciSyncInfoNV.get_handle(this.segment(), index); } + /// {@return `handle`} + public @CType("void *") java.lang.foreign.MemorySegment handle() { return VkImportFenceSciSyncInfoNV.get_handle(this.segment()); } + /// Sets `handle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handle(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_handle.set(segment, 0L, index, value); } + /// Sets `handle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handle(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkImportFenceSciSyncInfoNV.set_handle(segment, 0L, value); } + /// Sets `handle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportFenceSciSyncInfoNV handleAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkImportFenceSciSyncInfoNV.set_handle(this.segment(), index, value); return this; } + /// Sets `handle` with the given value. + /// @param value the value + /// @return `this` + public VkImportFenceSciSyncInfoNV handle(@CType("void *") java.lang.foreign.MemorySegment value) { VkImportFenceSciSyncInfoNV.set_handle(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportMemorySciBufInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportMemorySciBufInfoNV.java new file mode 100644 index 00000000..69d92529 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportMemorySciBufInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### handle +/// [VarHandle][#VH_handle] - [Getter][#handle()] - [Setter][#handle(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMemorySciBufInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// NvSciBufObj handle; +/// } VkImportMemorySciBufInfoNV; +/// ``` +public final class VkImportMemorySciBufInfoNV extends Struct { + /// The struct layout of `VkImportMemorySciBufInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.ADDRESS.withName("handle") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `handle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_handle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handle")); + + /// Creates `VkImportMemorySciBufInfoNV` with the given segment. + /// @param segment the memory segment + public VkImportMemorySciBufInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMemorySciBufInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemorySciBufInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemorySciBufInfoNV(segment); } + + /// Creates `VkImportMemorySciBufInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemorySciBufInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemorySciBufInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMemorySciBufInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemorySciBufInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemorySciBufInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMemorySciBufInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMemorySciBufInfoNV` + public static VkImportMemorySciBufInfoNV alloc(SegmentAllocator allocator) { return new VkImportMemorySciBufInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMemorySciBufInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMemorySciBufInfoNV` + public static VkImportMemorySciBufInfoNV alloc(SegmentAllocator allocator, long count) { return new VkImportMemorySciBufInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMemorySciBufInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMemorySciBufInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMemorySciBufInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMemorySciBufInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemorySciBufInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMemorySciBufInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemorySciBufInfoNV sType(@CType("VkStructureType") int value) { VkImportMemorySciBufInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMemorySciBufInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMemorySciBufInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMemorySciBufInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemorySciBufInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemorySciBufInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemorySciBufInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemorySciBufInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemorySciBufInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportMemorySciBufInfoNV.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportMemorySciBufInfoNV.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkImportMemorySciBufInfoNV.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemorySciBufInfoNV.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemorySciBufInfoNV handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemorySciBufInfoNV.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemorySciBufInfoNV handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkImportMemorySciBufInfoNV.set_handleType(this.segment(), value); return this; } + + /// {@return `handle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("NvSciBufObj") java.lang.foreign.MemorySegment get_handle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_handle.get(segment, 0L, index); } + /// {@return `handle`} + /// @param segment the segment of the struct + public static @CType("NvSciBufObj") java.lang.foreign.MemorySegment get_handle(MemorySegment segment) { return VkImportMemorySciBufInfoNV.get_handle(segment, 0L); } + /// {@return `handle` at the given index} + /// @param index the index + public @CType("NvSciBufObj") java.lang.foreign.MemorySegment handleAt(long index) { return VkImportMemorySciBufInfoNV.get_handle(this.segment(), index); } + /// {@return `handle`} + public @CType("NvSciBufObj") java.lang.foreign.MemorySegment handle() { return VkImportMemorySciBufInfoNV.get_handle(this.segment()); } + /// Sets `handle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handle(MemorySegment segment, long index, @CType("NvSciBufObj") java.lang.foreign.MemorySegment value) { VH_handle.set(segment, 0L, index, value); } + /// Sets `handle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handle(MemorySegment segment, @CType("NvSciBufObj") java.lang.foreign.MemorySegment value) { VkImportMemorySciBufInfoNV.set_handle(segment, 0L, value); } + /// Sets `handle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemorySciBufInfoNV handleAt(long index, @CType("NvSciBufObj") java.lang.foreign.MemorySegment value) { VkImportMemorySciBufInfoNV.set_handle(this.segment(), index, value); return this; } + /// Sets `handle` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemorySciBufInfoNV handle(@CType("NvSciBufObj") java.lang.foreign.MemorySegment value) { VkImportMemorySciBufInfoNV.set_handle(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportMemoryWin32HandleInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportMemoryWin32HandleInfoNV.java new file mode 100644 index 00000000..d470442c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportMemoryWin32HandleInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### handle +/// [VarHandle][#VH_handle] - [Getter][#handle()] - [Setter][#handle(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportMemoryWin32HandleInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlagsNV handleType; +/// HANDLE handle; +/// } VkImportMemoryWin32HandleInfoNV; +/// ``` +public final class VkImportMemoryWin32HandleInfoNV extends Struct { + /// The struct layout of `VkImportMemoryWin32HandleInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.ADDRESS.withName("handle") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `handle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_handle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handle")); + + /// Creates `VkImportMemoryWin32HandleInfoNV` with the given segment. + /// @param segment the memory segment + public VkImportMemoryWin32HandleInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportMemoryWin32HandleInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryWin32HandleInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryWin32HandleInfoNV(segment); } + + /// Creates `VkImportMemoryWin32HandleInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryWin32HandleInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryWin32HandleInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportMemoryWin32HandleInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportMemoryWin32HandleInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportMemoryWin32HandleInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportMemoryWin32HandleInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportMemoryWin32HandleInfoNV` + public static VkImportMemoryWin32HandleInfoNV alloc(SegmentAllocator allocator) { return new VkImportMemoryWin32HandleInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportMemoryWin32HandleInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportMemoryWin32HandleInfoNV` + public static VkImportMemoryWin32HandleInfoNV alloc(SegmentAllocator allocator, long count) { return new VkImportMemoryWin32HandleInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportMemoryWin32HandleInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportMemoryWin32HandleInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportMemoryWin32HandleInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportMemoryWin32HandleInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkImportMemoryWin32HandleInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoNV sType(@CType("VkStructureType") int value) { VkImportMemoryWin32HandleInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportMemoryWin32HandleInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportMemoryWin32HandleInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportMemoryWin32HandleInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagsNV") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagsNV") int get_handleType(MemorySegment segment) { return VkImportMemoryWin32HandleInfoNV.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagsNV") int handleTypeAt(long index) { return VkImportMemoryWin32HandleInfoNV.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagsNV") int handleType() { return VkImportMemoryWin32HandleInfoNV.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkImportMemoryWin32HandleInfoNV.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoNV handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkImportMemoryWin32HandleInfoNV.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoNV handleType(@CType("VkExternalMemoryHandleTypeFlagsNV") int value) { VkImportMemoryWin32HandleInfoNV.set_handleType(this.segment(), value); return this; } + + /// {@return `handle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("HANDLE") java.lang.foreign.MemorySegment get_handle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_handle.get(segment, 0L, index); } + /// {@return `handle`} + /// @param segment the segment of the struct + public static @CType("HANDLE") java.lang.foreign.MemorySegment get_handle(MemorySegment segment) { return VkImportMemoryWin32HandleInfoNV.get_handle(segment, 0L); } + /// {@return `handle` at the given index} + /// @param index the index + public @CType("HANDLE") java.lang.foreign.MemorySegment handleAt(long index) { return VkImportMemoryWin32HandleInfoNV.get_handle(this.segment(), index); } + /// {@return `handle`} + public @CType("HANDLE") java.lang.foreign.MemorySegment handle() { return VkImportMemoryWin32HandleInfoNV.get_handle(this.segment()); } + /// Sets `handle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handle(MemorySegment segment, long index, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VH_handle.set(segment, 0L, index, value); } + /// Sets `handle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handle(MemorySegment segment, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoNV.set_handle(segment, 0L, value); } + /// Sets `handle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoNV handleAt(long index, @CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoNV.set_handle(this.segment(), index, value); return this; } + /// Sets `handle` with the given value. + /// @param value the value + /// @return `this` + public VkImportMemoryWin32HandleInfoNV handle(@CType("HANDLE") java.lang.foreign.MemorySegment value) { VkImportMemoryWin32HandleInfoNV.set_handle(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportSemaphoreSciSyncInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportSemaphoreSciSyncInfoNV.java new file mode 100644 index 00000000..f6b84fd7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkImportSemaphoreSciSyncInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ### handle +/// [VarHandle][#VH_handle] - [Getter][#handle()] - [Setter][#handle(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportSemaphoreSciSyncInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// VkExternalSemaphoreHandleTypeFlagBits handleType; +/// void * handle; +/// } VkImportSemaphoreSciSyncInfoNV; +/// ``` +public final class VkImportSemaphoreSciSyncInfoNV extends Struct { + /// The struct layout of `VkImportSemaphoreSciSyncInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.JAVA_INT.withName("handleType"), + ValueLayout.ADDRESS.withName("handle") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + /// The [VarHandle] of `handle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_handle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handle")); + + /// Creates `VkImportSemaphoreSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + public VkImportSemaphoreSciSyncInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportSemaphoreSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreSciSyncInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreSciSyncInfoNV(segment); } + + /// Creates `VkImportSemaphoreSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreSciSyncInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportSemaphoreSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportSemaphoreSciSyncInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportSemaphoreSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportSemaphoreSciSyncInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportSemaphoreSciSyncInfoNV` + public static VkImportSemaphoreSciSyncInfoNV alloc(SegmentAllocator allocator) { return new VkImportSemaphoreSciSyncInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportSemaphoreSciSyncInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportSemaphoreSciSyncInfoNV` + public static VkImportSemaphoreSciSyncInfoNV alloc(SegmentAllocator allocator, long count) { return new VkImportSemaphoreSciSyncInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportSemaphoreSciSyncInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportSemaphoreSciSyncInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportSemaphoreSciSyncInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportSemaphoreSciSyncInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreSciSyncInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkImportSemaphoreSciSyncInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreSciSyncInfoNV sType(@CType("VkStructureType") int value) { VkImportSemaphoreSciSyncInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportSemaphoreSciSyncInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportSemaphoreSciSyncInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportSemaphoreSciSyncInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreSciSyncInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreSciSyncInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreSciSyncInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreSciSyncInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreSciSyncInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkImportSemaphoreSciSyncInfoNV.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkImportSemaphoreSciSyncInfoNV.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkImportSemaphoreSciSyncInfoNV.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreSciSyncInfoNV.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreSciSyncInfoNV semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreSciSyncInfoNV.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreSciSyncInfoNV semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkImportSemaphoreSciSyncInfoNV.set_semaphore(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkImportSemaphoreSciSyncInfoNV.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleTypeAt(long index) { return VkImportSemaphoreSciSyncInfoNV.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleType() { return VkImportSemaphoreSciSyncInfoNV.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreSciSyncInfoNV.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreSciSyncInfoNV handleTypeAt(long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreSciSyncInfoNV.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreSciSyncInfoNV handleType(@CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkImportSemaphoreSciSyncInfoNV.set_handleType(this.segment(), value); return this; } + + /// {@return `handle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_handle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_handle.get(segment, 0L, index); } + /// {@return `handle`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_handle(MemorySegment segment) { return VkImportSemaphoreSciSyncInfoNV.get_handle(segment, 0L); } + /// {@return `handle` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment handleAt(long index) { return VkImportSemaphoreSciSyncInfoNV.get_handle(this.segment(), index); } + /// {@return `handle`} + public @CType("void *") java.lang.foreign.MemorySegment handle() { return VkImportSemaphoreSciSyncInfoNV.get_handle(this.segment()); } + /// Sets `handle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handle(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_handle.set(segment, 0L, index, value); } + /// Sets `handle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handle(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreSciSyncInfoNV.set_handle(segment, 0L, value); } + /// Sets `handle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportSemaphoreSciSyncInfoNV handleAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreSciSyncInfoNV.set_handle(this.segment(), index, value); return this; } + /// Sets `handle` with the given value. + /// @param value the value + /// @return `this` + public VkImportSemaphoreSciSyncInfoNV handle(@CType("void *") java.lang.foreign.MemorySegment value) { VkImportSemaphoreSciSyncInfoNV.set_handle(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkIndirectCommandsLayoutCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkIndirectCommandsLayoutCreateInfoNV.java new file mode 100644 index 00000000..d521e05c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkIndirectCommandsLayoutCreateInfoNV.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pipelineBindPoint +/// [VarHandle][#VH_pipelineBindPoint] - [Getter][#pipelineBindPoint()] - [Setter][#pipelineBindPoint(int)] +/// ### tokenCount +/// [VarHandle][#VH_tokenCount] - [Getter][#tokenCount()] - [Setter][#tokenCount(int)] +/// ### pTokens +/// [VarHandle][#VH_pTokens] - [Getter][#pTokens()] - [Setter][#pTokens(java.lang.foreign.MemorySegment)] +/// ### streamCount +/// [VarHandle][#VH_streamCount] - [Getter][#streamCount()] - [Setter][#streamCount(int)] +/// ### pStreamStrides +/// [VarHandle][#VH_pStreamStrides] - [Getter][#pStreamStrides()] - [Setter][#pStreamStrides(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectCommandsLayoutCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkIndirectCommandsLayoutUsageFlagsNV flags; +/// VkPipelineBindPoint pipelineBindPoint; +/// uint32_t tokenCount; +/// const VkIndirectCommandsLayoutTokenNV * pTokens; +/// uint32_t streamCount; +/// const uint32_t * pStreamStrides; +/// } VkIndirectCommandsLayoutCreateInfoNV; +/// ``` +public final class VkIndirectCommandsLayoutCreateInfoNV extends Struct { + /// The struct layout of `VkIndirectCommandsLayoutCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("pipelineBindPoint"), + ValueLayout.JAVA_INT.withName("tokenCount"), + ValueLayout.ADDRESS.withName("pTokens"), + ValueLayout.JAVA_INT.withName("streamCount"), + ValueLayout.ADDRESS.withName("pStreamStrides") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pipelineBindPoint` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBindPoint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBindPoint")); + /// The [VarHandle] of `tokenCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tokenCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tokenCount")); + /// The [VarHandle] of `pTokens` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTokens = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTokens")); + /// The [VarHandle] of `streamCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_streamCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("streamCount")); + /// The [VarHandle] of `pStreamStrides` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStreamStrides = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStreamStrides")); + + /// Creates `VkIndirectCommandsLayoutCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkIndirectCommandsLayoutCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectCommandsLayoutCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutCreateInfoNV(segment); } + + /// Creates `VkIndirectCommandsLayoutCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectCommandsLayoutCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectCommandsLayoutCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectCommandsLayoutCreateInfoNV` + public static VkIndirectCommandsLayoutCreateInfoNV alloc(SegmentAllocator allocator) { return new VkIndirectCommandsLayoutCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectCommandsLayoutCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectCommandsLayoutCreateInfoNV` + public static VkIndirectCommandsLayoutCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkIndirectCommandsLayoutCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkIndirectCommandsLayoutCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkIndirectCommandsLayoutCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV sType(@CType("VkStructureType") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkIndirectCommandsLayoutCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkIndirectCommandsLayoutCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsLayoutUsageFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsLayoutUsageFlagsNV") int get_flags(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsLayoutUsageFlagsNV") int flagsAt(long index) { return VkIndirectCommandsLayoutCreateInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkIndirectCommandsLayoutUsageFlagsNV") int flags() { return VkIndirectCommandsLayoutCreateInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkIndirectCommandsLayoutUsageFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkIndirectCommandsLayoutUsageFlagsNV") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV flagsAt(long index, @CType("VkIndirectCommandsLayoutUsageFlagsNV") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV flags(@CType("VkIndirectCommandsLayoutUsageFlagsNV") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_flags(this.segment(), value); return this; } + + /// {@return `pipelineBindPoint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment, long index) { return (int) VH_pipelineBindPoint.get(segment, 0L, index); } + /// {@return `pipelineBindPoint`} + /// @param segment the segment of the struct + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoNV.get_pipelineBindPoint(segment, 0L); } + /// {@return `pipelineBindPoint` at the given index} + /// @param index the index + public @CType("VkPipelineBindPoint") int pipelineBindPointAt(long index) { return VkIndirectCommandsLayoutCreateInfoNV.get_pipelineBindPoint(this.segment(), index); } + /// {@return `pipelineBindPoint`} + public @CType("VkPipelineBindPoint") int pipelineBindPoint() { return VkIndirectCommandsLayoutCreateInfoNV.get_pipelineBindPoint(this.segment()); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, long index, @CType("VkPipelineBindPoint") int value) { VH_pipelineBindPoint.set(segment, 0L, index, value); } + /// Sets `pipelineBindPoint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, @CType("VkPipelineBindPoint") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_pipelineBindPoint(segment, 0L, value); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV pipelineBindPointAt(long index, @CType("VkPipelineBindPoint") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_pipelineBindPoint(this.segment(), index, value); return this; } + /// Sets `pipelineBindPoint` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV pipelineBindPoint(@CType("VkPipelineBindPoint") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_pipelineBindPoint(this.segment(), value); return this; } + + /// {@return `tokenCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_tokenCount(MemorySegment segment, long index) { return (int) VH_tokenCount.get(segment, 0L, index); } + /// {@return `tokenCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_tokenCount(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoNV.get_tokenCount(segment, 0L); } + /// {@return `tokenCount` at the given index} + /// @param index the index + public @CType("uint32_t") int tokenCountAt(long index) { return VkIndirectCommandsLayoutCreateInfoNV.get_tokenCount(this.segment(), index); } + /// {@return `tokenCount`} + public @CType("uint32_t") int tokenCount() { return VkIndirectCommandsLayoutCreateInfoNV.get_tokenCount(this.segment()); } + /// Sets `tokenCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tokenCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_tokenCount.set(segment, 0L, index, value); } + /// Sets `tokenCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tokenCount(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_tokenCount(segment, 0L, value); } + /// Sets `tokenCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV tokenCountAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_tokenCount(this.segment(), index, value); return this; } + /// Sets `tokenCount` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV tokenCount(@CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_tokenCount(this.segment(), value); return this; } + + /// {@return `pTokens` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndirectCommandsLayoutTokenNV *") java.lang.foreign.MemorySegment get_pTokens(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTokens.get(segment, 0L, index); } + /// {@return `pTokens`} + /// @param segment the segment of the struct + public static @CType("const VkIndirectCommandsLayoutTokenNV *") java.lang.foreign.MemorySegment get_pTokens(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoNV.get_pTokens(segment, 0L); } + /// {@return `pTokens` at the given index} + /// @param index the index + public @CType("const VkIndirectCommandsLayoutTokenNV *") java.lang.foreign.MemorySegment pTokensAt(long index) { return VkIndirectCommandsLayoutCreateInfoNV.get_pTokens(this.segment(), index); } + /// {@return `pTokens`} + public @CType("const VkIndirectCommandsLayoutTokenNV *") java.lang.foreign.MemorySegment pTokens() { return VkIndirectCommandsLayoutCreateInfoNV.get_pTokens(this.segment()); } + /// Sets `pTokens` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTokens(MemorySegment segment, long index, @CType("const VkIndirectCommandsLayoutTokenNV *") java.lang.foreign.MemorySegment value) { VH_pTokens.set(segment, 0L, index, value); } + /// Sets `pTokens` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTokens(MemorySegment segment, @CType("const VkIndirectCommandsLayoutTokenNV *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoNV.set_pTokens(segment, 0L, value); } + /// Sets `pTokens` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV pTokensAt(long index, @CType("const VkIndirectCommandsLayoutTokenNV *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoNV.set_pTokens(this.segment(), index, value); return this; } + /// Sets `pTokens` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV pTokens(@CType("const VkIndirectCommandsLayoutTokenNV *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoNV.set_pTokens(this.segment(), value); return this; } + + /// {@return `streamCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_streamCount(MemorySegment segment, long index) { return (int) VH_streamCount.get(segment, 0L, index); } + /// {@return `streamCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_streamCount(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoNV.get_streamCount(segment, 0L); } + /// {@return `streamCount` at the given index} + /// @param index the index + public @CType("uint32_t") int streamCountAt(long index) { return VkIndirectCommandsLayoutCreateInfoNV.get_streamCount(this.segment(), index); } + /// {@return `streamCount`} + public @CType("uint32_t") int streamCount() { return VkIndirectCommandsLayoutCreateInfoNV.get_streamCount(this.segment()); } + /// Sets `streamCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_streamCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_streamCount.set(segment, 0L, index, value); } + /// Sets `streamCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_streamCount(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_streamCount(segment, 0L, value); } + /// Sets `streamCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV streamCountAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_streamCount(this.segment(), index, value); return this; } + /// Sets `streamCount` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV streamCount(@CType("uint32_t") int value) { VkIndirectCommandsLayoutCreateInfoNV.set_streamCount(this.segment(), value); return this; } + + /// {@return `pStreamStrides` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pStreamStrides(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStreamStrides.get(segment, 0L, index); } + /// {@return `pStreamStrides`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pStreamStrides(MemorySegment segment) { return VkIndirectCommandsLayoutCreateInfoNV.get_pStreamStrides(segment, 0L); } + /// {@return `pStreamStrides` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pStreamStridesAt(long index) { return VkIndirectCommandsLayoutCreateInfoNV.get_pStreamStrides(this.segment(), index); } + /// {@return `pStreamStrides`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pStreamStrides() { return VkIndirectCommandsLayoutCreateInfoNV.get_pStreamStrides(this.segment()); } + /// Sets `pStreamStrides` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStreamStrides(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pStreamStrides.set(segment, 0L, index, value); } + /// Sets `pStreamStrides` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStreamStrides(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoNV.set_pStreamStrides(segment, 0L, value); } + /// Sets `pStreamStrides` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV pStreamStridesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoNV.set_pStreamStrides(this.segment(), index, value); return this; } + /// Sets `pStreamStrides` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutCreateInfoNV pStreamStrides(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutCreateInfoNV.set_pStreamStrides(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkIndirectCommandsLayoutTokenNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkIndirectCommandsLayoutTokenNV.java new file mode 100644 index 00000000..45a2512e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkIndirectCommandsLayoutTokenNV.java @@ -0,0 +1,629 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### tokenType +/// [VarHandle][#VH_tokenType] - [Getter][#tokenType()] - [Setter][#tokenType(int)] +/// ### stream +/// [VarHandle][#VH_stream] - [Getter][#stream()] - [Setter][#stream(int)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(int)] +/// ### vertexBindingUnit +/// [VarHandle][#VH_vertexBindingUnit] - [Getter][#vertexBindingUnit()] - [Setter][#vertexBindingUnit(int)] +/// ### vertexDynamicStride +/// [VarHandle][#VH_vertexDynamicStride] - [Getter][#vertexDynamicStride()] - [Setter][#vertexDynamicStride(int)] +/// ### pushconstantPipelineLayout +/// [VarHandle][#VH_pushconstantPipelineLayout] - [Getter][#pushconstantPipelineLayout()] - [Setter][#pushconstantPipelineLayout(java.lang.foreign.MemorySegment)] +/// ### pushconstantShaderStageFlags +/// [VarHandle][#VH_pushconstantShaderStageFlags] - [Getter][#pushconstantShaderStageFlags()] - [Setter][#pushconstantShaderStageFlags(int)] +/// ### pushconstantOffset +/// [VarHandle][#VH_pushconstantOffset] - [Getter][#pushconstantOffset()] - [Setter][#pushconstantOffset(int)] +/// ### pushconstantSize +/// [VarHandle][#VH_pushconstantSize] - [Getter][#pushconstantSize()] - [Setter][#pushconstantSize(int)] +/// ### indirectStateFlags +/// [VarHandle][#VH_indirectStateFlags] - [Getter][#indirectStateFlags()] - [Setter][#indirectStateFlags(int)] +/// ### indexTypeCount +/// [VarHandle][#VH_indexTypeCount] - [Getter][#indexTypeCount()] - [Setter][#indexTypeCount(int)] +/// ### pIndexTypes +/// [VarHandle][#VH_pIndexTypes] - [Getter][#pIndexTypes()] - [Setter][#pIndexTypes(java.lang.foreign.MemorySegment)] +/// ### pIndexTypeValues +/// [VarHandle][#VH_pIndexTypeValues] - [Getter][#pIndexTypeValues()] - [Setter][#pIndexTypeValues(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectCommandsLayoutTokenNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkIndirectCommandsTokenTypeNV tokenType; +/// uint32_t stream; +/// uint32_t offset; +/// uint32_t vertexBindingUnit; +/// VkBool32 vertexDynamicStride; +/// VkPipelineLayout pushconstantPipelineLayout; +/// VkShaderStageFlags pushconstantShaderStageFlags; +/// uint32_t pushconstantOffset; +/// uint32_t pushconstantSize; +/// VkIndirectStateFlagsNV indirectStateFlags; +/// uint32_t indexTypeCount; +/// const VkIndexType * pIndexTypes; +/// const uint32_t * pIndexTypeValues; +/// } VkIndirectCommandsLayoutTokenNV; +/// ``` +public final class VkIndirectCommandsLayoutTokenNV extends Struct { + /// The struct layout of `VkIndirectCommandsLayoutTokenNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("tokenType"), + ValueLayout.JAVA_INT.withName("stream"), + ValueLayout.JAVA_INT.withName("offset"), + ValueLayout.JAVA_INT.withName("vertexBindingUnit"), + ValueLayout.JAVA_INT.withName("vertexDynamicStride"), + ValueLayout.ADDRESS.withName("pushconstantPipelineLayout"), + ValueLayout.JAVA_INT.withName("pushconstantShaderStageFlags"), + ValueLayout.JAVA_INT.withName("pushconstantOffset"), + ValueLayout.JAVA_INT.withName("pushconstantSize"), + ValueLayout.JAVA_INT.withName("indirectStateFlags"), + ValueLayout.JAVA_INT.withName("indexTypeCount"), + ValueLayout.ADDRESS.withName("pIndexTypes"), + ValueLayout.ADDRESS.withName("pIndexTypeValues") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `tokenType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tokenType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tokenType")); + /// The [VarHandle] of `stream` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stream = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stream")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `vertexBindingUnit` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexBindingUnit = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexBindingUnit")); + /// The [VarHandle] of `vertexDynamicStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexDynamicStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexDynamicStride")); + /// The [VarHandle] of `pushconstantPipelineLayout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pushconstantPipelineLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pushconstantPipelineLayout")); + /// The [VarHandle] of `pushconstantShaderStageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pushconstantShaderStageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pushconstantShaderStageFlags")); + /// The [VarHandle] of `pushconstantOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pushconstantOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pushconstantOffset")); + /// The [VarHandle] of `pushconstantSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pushconstantSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pushconstantSize")); + /// The [VarHandle] of `indirectStateFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indirectStateFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectStateFlags")); + /// The [VarHandle] of `indexTypeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexTypeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexTypeCount")); + /// The [VarHandle] of `pIndexTypes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pIndexTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pIndexTypes")); + /// The [VarHandle] of `pIndexTypeValues` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pIndexTypeValues = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pIndexTypeValues")); + + /// Creates `VkIndirectCommandsLayoutTokenNV` with the given segment. + /// @param segment the memory segment + public VkIndirectCommandsLayoutTokenNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectCommandsLayoutTokenNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutTokenNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutTokenNV(segment); } + + /// Creates `VkIndirectCommandsLayoutTokenNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutTokenNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutTokenNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectCommandsLayoutTokenNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsLayoutTokenNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsLayoutTokenNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectCommandsLayoutTokenNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectCommandsLayoutTokenNV` + public static VkIndirectCommandsLayoutTokenNV alloc(SegmentAllocator allocator) { return new VkIndirectCommandsLayoutTokenNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectCommandsLayoutTokenNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectCommandsLayoutTokenNV` + public static VkIndirectCommandsLayoutTokenNV alloc(SegmentAllocator allocator, long count) { return new VkIndirectCommandsLayoutTokenNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkIndirectCommandsLayoutTokenNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkIndirectCommandsLayoutTokenNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV sTypeAt(long index, @CType("VkStructureType") int value) { VkIndirectCommandsLayoutTokenNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV sType(@CType("VkStructureType") int value) { VkIndirectCommandsLayoutTokenNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkIndirectCommandsLayoutTokenNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pNext(this.segment(), value); return this; } + + /// {@return `tokenType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectCommandsTokenTypeNV") int get_tokenType(MemorySegment segment, long index) { return (int) VH_tokenType.get(segment, 0L, index); } + /// {@return `tokenType`} + /// @param segment the segment of the struct + public static @CType("VkIndirectCommandsTokenTypeNV") int get_tokenType(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_tokenType(segment, 0L); } + /// {@return `tokenType` at the given index} + /// @param index the index + public @CType("VkIndirectCommandsTokenTypeNV") int tokenTypeAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_tokenType(this.segment(), index); } + /// {@return `tokenType`} + public @CType("VkIndirectCommandsTokenTypeNV") int tokenType() { return VkIndirectCommandsLayoutTokenNV.get_tokenType(this.segment()); } + /// Sets `tokenType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tokenType(MemorySegment segment, long index, @CType("VkIndirectCommandsTokenTypeNV") int value) { VH_tokenType.set(segment, 0L, index, value); } + /// Sets `tokenType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tokenType(MemorySegment segment, @CType("VkIndirectCommandsTokenTypeNV") int value) { VkIndirectCommandsLayoutTokenNV.set_tokenType(segment, 0L, value); } + /// Sets `tokenType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV tokenTypeAt(long index, @CType("VkIndirectCommandsTokenTypeNV") int value) { VkIndirectCommandsLayoutTokenNV.set_tokenType(this.segment(), index, value); return this; } + /// Sets `tokenType` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV tokenType(@CType("VkIndirectCommandsTokenTypeNV") int value) { VkIndirectCommandsLayoutTokenNV.set_tokenType(this.segment(), value); return this; } + + /// {@return `stream` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stream(MemorySegment segment, long index) { return (int) VH_stream.get(segment, 0L, index); } + /// {@return `stream`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stream(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_stream(segment, 0L); } + /// {@return `stream` at the given index} + /// @param index the index + public @CType("uint32_t") int streamAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_stream(this.segment(), index); } + /// {@return `stream`} + public @CType("uint32_t") int stream() { return VkIndirectCommandsLayoutTokenNV.get_stream(this.segment()); } + /// Sets `stream` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stream(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stream.set(segment, 0L, index, value); } + /// Sets `stream` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stream(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_stream(segment, 0L, value); } + /// Sets `stream` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV streamAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_stream(this.segment(), index, value); return this; } + /// Sets `stream` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV stream(@CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_stream(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_offset(MemorySegment segment, long index) { return (int) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_offset(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("uint32_t") int offsetAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("uint32_t") int offset() { return VkIndirectCommandsLayoutTokenNV.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV offsetAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV offset(@CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_offset(this.segment(), value); return this; } + + /// {@return `vertexBindingUnit` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vertexBindingUnit(MemorySegment segment, long index) { return (int) VH_vertexBindingUnit.get(segment, 0L, index); } + /// {@return `vertexBindingUnit`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vertexBindingUnit(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_vertexBindingUnit(segment, 0L); } + /// {@return `vertexBindingUnit` at the given index} + /// @param index the index + public @CType("uint32_t") int vertexBindingUnitAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_vertexBindingUnit(this.segment(), index); } + /// {@return `vertexBindingUnit`} + public @CType("uint32_t") int vertexBindingUnit() { return VkIndirectCommandsLayoutTokenNV.get_vertexBindingUnit(this.segment()); } + /// Sets `vertexBindingUnit` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexBindingUnit(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vertexBindingUnit.set(segment, 0L, index, value); } + /// Sets `vertexBindingUnit` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexBindingUnit(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_vertexBindingUnit(segment, 0L, value); } + /// Sets `vertexBindingUnit` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV vertexBindingUnitAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_vertexBindingUnit(this.segment(), index, value); return this; } + /// Sets `vertexBindingUnit` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV vertexBindingUnit(@CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_vertexBindingUnit(this.segment(), value); return this; } + + /// {@return `vertexDynamicStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vertexDynamicStride(MemorySegment segment, long index) { return (int) VH_vertexDynamicStride.get(segment, 0L, index); } + /// {@return `vertexDynamicStride`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vertexDynamicStride(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_vertexDynamicStride(segment, 0L); } + /// {@return `vertexDynamicStride` at the given index} + /// @param index the index + public @CType("VkBool32") int vertexDynamicStrideAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_vertexDynamicStride(this.segment(), index); } + /// {@return `vertexDynamicStride`} + public @CType("VkBool32") int vertexDynamicStride() { return VkIndirectCommandsLayoutTokenNV.get_vertexDynamicStride(this.segment()); } + /// Sets `vertexDynamicStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexDynamicStride(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vertexDynamicStride.set(segment, 0L, index, value); } + /// Sets `vertexDynamicStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexDynamicStride(MemorySegment segment, @CType("VkBool32") int value) { VkIndirectCommandsLayoutTokenNV.set_vertexDynamicStride(segment, 0L, value); } + /// Sets `vertexDynamicStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV vertexDynamicStrideAt(long index, @CType("VkBool32") int value) { VkIndirectCommandsLayoutTokenNV.set_vertexDynamicStride(this.segment(), index, value); return this; } + /// Sets `vertexDynamicStride` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV vertexDynamicStride(@CType("VkBool32") int value) { VkIndirectCommandsLayoutTokenNV.set_vertexDynamicStride(this.segment(), value); return this; } + + /// {@return `pushconstantPipelineLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_pushconstantPipelineLayout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pushconstantPipelineLayout.get(segment, 0L, index); } + /// {@return `pushconstantPipelineLayout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_pushconstantPipelineLayout(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_pushconstantPipelineLayout(segment, 0L); } + /// {@return `pushconstantPipelineLayout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment pushconstantPipelineLayoutAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_pushconstantPipelineLayout(this.segment(), index); } + /// {@return `pushconstantPipelineLayout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment pushconstantPipelineLayout() { return VkIndirectCommandsLayoutTokenNV.get_pushconstantPipelineLayout(this.segment()); } + /// Sets `pushconstantPipelineLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pushconstantPipelineLayout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_pushconstantPipelineLayout.set(segment, 0L, index, value); } + /// Sets `pushconstantPipelineLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pushconstantPipelineLayout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantPipelineLayout(segment, 0L, value); } + /// Sets `pushconstantPipelineLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pushconstantPipelineLayoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantPipelineLayout(this.segment(), index, value); return this; } + /// Sets `pushconstantPipelineLayout` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pushconstantPipelineLayout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantPipelineLayout(this.segment(), value); return this; } + + /// {@return `pushconstantShaderStageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_pushconstantShaderStageFlags(MemorySegment segment, long index) { return (int) VH_pushconstantShaderStageFlags.get(segment, 0L, index); } + /// {@return `pushconstantShaderStageFlags`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_pushconstantShaderStageFlags(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_pushconstantShaderStageFlags(segment, 0L); } + /// {@return `pushconstantShaderStageFlags` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int pushconstantShaderStageFlagsAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_pushconstantShaderStageFlags(this.segment(), index); } + /// {@return `pushconstantShaderStageFlags`} + public @CType("VkShaderStageFlags") int pushconstantShaderStageFlags() { return VkIndirectCommandsLayoutTokenNV.get_pushconstantShaderStageFlags(this.segment()); } + /// Sets `pushconstantShaderStageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pushconstantShaderStageFlags(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_pushconstantShaderStageFlags.set(segment, 0L, index, value); } + /// Sets `pushconstantShaderStageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pushconstantShaderStageFlags(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantShaderStageFlags(segment, 0L, value); } + /// Sets `pushconstantShaderStageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pushconstantShaderStageFlagsAt(long index, @CType("VkShaderStageFlags") int value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantShaderStageFlags(this.segment(), index, value); return this; } + /// Sets `pushconstantShaderStageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pushconstantShaderStageFlags(@CType("VkShaderStageFlags") int value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantShaderStageFlags(this.segment(), value); return this; } + + /// {@return `pushconstantOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pushconstantOffset(MemorySegment segment, long index) { return (int) VH_pushconstantOffset.get(segment, 0L, index); } + /// {@return `pushconstantOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pushconstantOffset(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_pushconstantOffset(segment, 0L); } + /// {@return `pushconstantOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int pushconstantOffsetAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_pushconstantOffset(this.segment(), index); } + /// {@return `pushconstantOffset`} + public @CType("uint32_t") int pushconstantOffset() { return VkIndirectCommandsLayoutTokenNV.get_pushconstantOffset(this.segment()); } + /// Sets `pushconstantOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pushconstantOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pushconstantOffset.set(segment, 0L, index, value); } + /// Sets `pushconstantOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pushconstantOffset(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantOffset(segment, 0L, value); } + /// Sets `pushconstantOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pushconstantOffsetAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantOffset(this.segment(), index, value); return this; } + /// Sets `pushconstantOffset` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pushconstantOffset(@CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantOffset(this.segment(), value); return this; } + + /// {@return `pushconstantSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pushconstantSize(MemorySegment segment, long index) { return (int) VH_pushconstantSize.get(segment, 0L, index); } + /// {@return `pushconstantSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pushconstantSize(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_pushconstantSize(segment, 0L); } + /// {@return `pushconstantSize` at the given index} + /// @param index the index + public @CType("uint32_t") int pushconstantSizeAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_pushconstantSize(this.segment(), index); } + /// {@return `pushconstantSize`} + public @CType("uint32_t") int pushconstantSize() { return VkIndirectCommandsLayoutTokenNV.get_pushconstantSize(this.segment()); } + /// Sets `pushconstantSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pushconstantSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pushconstantSize.set(segment, 0L, index, value); } + /// Sets `pushconstantSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pushconstantSize(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantSize(segment, 0L, value); } + /// Sets `pushconstantSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pushconstantSizeAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantSize(this.segment(), index, value); return this; } + /// Sets `pushconstantSize` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pushconstantSize(@CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_pushconstantSize(this.segment(), value); return this; } + + /// {@return `indirectStateFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkIndirectStateFlagsNV") int get_indirectStateFlags(MemorySegment segment, long index) { return (int) VH_indirectStateFlags.get(segment, 0L, index); } + /// {@return `indirectStateFlags`} + /// @param segment the segment of the struct + public static @CType("VkIndirectStateFlagsNV") int get_indirectStateFlags(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_indirectStateFlags(segment, 0L); } + /// {@return `indirectStateFlags` at the given index} + /// @param index the index + public @CType("VkIndirectStateFlagsNV") int indirectStateFlagsAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_indirectStateFlags(this.segment(), index); } + /// {@return `indirectStateFlags`} + public @CType("VkIndirectStateFlagsNV") int indirectStateFlags() { return VkIndirectCommandsLayoutTokenNV.get_indirectStateFlags(this.segment()); } + /// Sets `indirectStateFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectStateFlags(MemorySegment segment, long index, @CType("VkIndirectStateFlagsNV") int value) { VH_indirectStateFlags.set(segment, 0L, index, value); } + /// Sets `indirectStateFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectStateFlags(MemorySegment segment, @CType("VkIndirectStateFlagsNV") int value) { VkIndirectCommandsLayoutTokenNV.set_indirectStateFlags(segment, 0L, value); } + /// Sets `indirectStateFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV indirectStateFlagsAt(long index, @CType("VkIndirectStateFlagsNV") int value) { VkIndirectCommandsLayoutTokenNV.set_indirectStateFlags(this.segment(), index, value); return this; } + /// Sets `indirectStateFlags` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV indirectStateFlags(@CType("VkIndirectStateFlagsNV") int value) { VkIndirectCommandsLayoutTokenNV.set_indirectStateFlags(this.segment(), value); return this; } + + /// {@return `indexTypeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_indexTypeCount(MemorySegment segment, long index) { return (int) VH_indexTypeCount.get(segment, 0L, index); } + /// {@return `indexTypeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_indexTypeCount(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_indexTypeCount(segment, 0L); } + /// {@return `indexTypeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int indexTypeCountAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_indexTypeCount(this.segment(), index); } + /// {@return `indexTypeCount`} + public @CType("uint32_t") int indexTypeCount() { return VkIndirectCommandsLayoutTokenNV.get_indexTypeCount(this.segment()); } + /// Sets `indexTypeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexTypeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_indexTypeCount.set(segment, 0L, index, value); } + /// Sets `indexTypeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexTypeCount(MemorySegment segment, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_indexTypeCount(segment, 0L, value); } + /// Sets `indexTypeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV indexTypeCountAt(long index, @CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_indexTypeCount(this.segment(), index, value); return this; } + /// Sets `indexTypeCount` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV indexTypeCount(@CType("uint32_t") int value) { VkIndirectCommandsLayoutTokenNV.set_indexTypeCount(this.segment(), value); return this; } + + /// {@return `pIndexTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkIndexType *") java.lang.foreign.MemorySegment get_pIndexTypes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pIndexTypes.get(segment, 0L, index); } + /// {@return `pIndexTypes`} + /// @param segment the segment of the struct + public static @CType("const VkIndexType *") java.lang.foreign.MemorySegment get_pIndexTypes(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_pIndexTypes(segment, 0L); } + /// {@return `pIndexTypes` at the given index} + /// @param index the index + public @CType("const VkIndexType *") java.lang.foreign.MemorySegment pIndexTypesAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_pIndexTypes(this.segment(), index); } + /// {@return `pIndexTypes`} + public @CType("const VkIndexType *") java.lang.foreign.MemorySegment pIndexTypes() { return VkIndirectCommandsLayoutTokenNV.get_pIndexTypes(this.segment()); } + /// Sets `pIndexTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pIndexTypes(MemorySegment segment, long index, @CType("const VkIndexType *") java.lang.foreign.MemorySegment value) { VH_pIndexTypes.set(segment, 0L, index, value); } + /// Sets `pIndexTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pIndexTypes(MemorySegment segment, @CType("const VkIndexType *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pIndexTypes(segment, 0L, value); } + /// Sets `pIndexTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pIndexTypesAt(long index, @CType("const VkIndexType *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pIndexTypes(this.segment(), index, value); return this; } + /// Sets `pIndexTypes` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pIndexTypes(@CType("const VkIndexType *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pIndexTypes(this.segment(), value); return this; } + + /// {@return `pIndexTypeValues` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pIndexTypeValues(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pIndexTypeValues.get(segment, 0L, index); } + /// {@return `pIndexTypeValues`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pIndexTypeValues(MemorySegment segment) { return VkIndirectCommandsLayoutTokenNV.get_pIndexTypeValues(segment, 0L); } + /// {@return `pIndexTypeValues` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pIndexTypeValuesAt(long index) { return VkIndirectCommandsLayoutTokenNV.get_pIndexTypeValues(this.segment(), index); } + /// {@return `pIndexTypeValues`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pIndexTypeValues() { return VkIndirectCommandsLayoutTokenNV.get_pIndexTypeValues(this.segment()); } + /// Sets `pIndexTypeValues` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pIndexTypeValues(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pIndexTypeValues.set(segment, 0L, index, value); } + /// Sets `pIndexTypeValues` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pIndexTypeValues(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pIndexTypeValues(segment, 0L, value); } + /// Sets `pIndexTypeValues` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pIndexTypeValuesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pIndexTypeValues(this.segment(), index, value); return this; } + /// Sets `pIndexTypeValues` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsLayoutTokenNV pIndexTypeValues(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkIndirectCommandsLayoutTokenNV.set_pIndexTypeValues(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkIndirectCommandsStreamNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkIndirectCommandsStreamNV.java new file mode 100644 index 00000000..c753ee65 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkIndirectCommandsStreamNV.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkIndirectCommandsStreamNV { +/// VkBuffer buffer; +/// VkDeviceSize offset; +/// } VkIndirectCommandsStreamNV; +/// ``` +public final class VkIndirectCommandsStreamNV extends Struct { + /// The struct layout of `VkIndirectCommandsStreamNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("buffer"), + ValueLayout.JAVA_LONG.withName("offset") + ); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + + /// Creates `VkIndirectCommandsStreamNV` with the given segment. + /// @param segment the memory segment + public VkIndirectCommandsStreamNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkIndirectCommandsStreamNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsStreamNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsStreamNV(segment); } + + /// Creates `VkIndirectCommandsStreamNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsStreamNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsStreamNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkIndirectCommandsStreamNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkIndirectCommandsStreamNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkIndirectCommandsStreamNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkIndirectCommandsStreamNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkIndirectCommandsStreamNV` + public static VkIndirectCommandsStreamNV alloc(SegmentAllocator allocator) { return new VkIndirectCommandsStreamNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkIndirectCommandsStreamNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkIndirectCommandsStreamNV` + public static VkIndirectCommandsStreamNV alloc(SegmentAllocator allocator, long count) { return new VkIndirectCommandsStreamNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkIndirectCommandsStreamNV.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkIndirectCommandsStreamNV.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkIndirectCommandsStreamNV.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkIndirectCommandsStreamNV.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsStreamNV bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkIndirectCommandsStreamNV.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsStreamNV buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkIndirectCommandsStreamNV.set_buffer(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkIndirectCommandsStreamNV.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkIndirectCommandsStreamNV.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkIndirectCommandsStreamNV.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkIndirectCommandsStreamNV.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkIndirectCommandsStreamNV offsetAt(long index, @CType("VkDeviceSize") long value) { VkIndirectCommandsStreamNV.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkIndirectCommandsStreamNV offset(@CType("VkDeviceSize") long value) { VkIndirectCommandsStreamNV.set_offset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySleepInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySleepInfoNV.java new file mode 100644 index 00000000..81142050 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySleepInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### signalSemaphore +/// [VarHandle][#VH_signalSemaphore] - [Getter][#signalSemaphore()] - [Setter][#signalSemaphore(java.lang.foreign.MemorySegment)] +/// ### value +/// [VarHandle][#VH_value] - [Getter][#value()] - [Setter][#value(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkLatencySleepInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore signalSemaphore; +/// uint64_t value; +/// } VkLatencySleepInfoNV; +/// ``` +public final class VkLatencySleepInfoNV extends Struct { + /// The struct layout of `VkLatencySleepInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("signalSemaphore"), + ValueLayout.JAVA_LONG.withName("value") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `signalSemaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_signalSemaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("signalSemaphore")); + /// The [VarHandle] of `value` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_value = LAYOUT.arrayElementVarHandle(PathElement.groupElement("value")); + + /// Creates `VkLatencySleepInfoNV` with the given segment. + /// @param segment the memory segment + public VkLatencySleepInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkLatencySleepInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySleepInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySleepInfoNV(segment); } + + /// Creates `VkLatencySleepInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySleepInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySleepInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkLatencySleepInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySleepInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySleepInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkLatencySleepInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkLatencySleepInfoNV` + public static VkLatencySleepInfoNV alloc(SegmentAllocator allocator) { return new VkLatencySleepInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkLatencySleepInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkLatencySleepInfoNV` + public static VkLatencySleepInfoNV alloc(SegmentAllocator allocator, long count) { return new VkLatencySleepInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkLatencySleepInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkLatencySleepInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkLatencySleepInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkLatencySleepInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySleepInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkLatencySleepInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySleepInfoNV sType(@CType("VkStructureType") int value) { VkLatencySleepInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkLatencySleepInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkLatencySleepInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkLatencySleepInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySleepInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySleepInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySleepInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySleepInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySleepInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `signalSemaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_signalSemaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_signalSemaphore.get(segment, 0L, index); } + /// {@return `signalSemaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_signalSemaphore(MemorySegment segment) { return VkLatencySleepInfoNV.get_signalSemaphore(segment, 0L); } + /// {@return `signalSemaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment signalSemaphoreAt(long index) { return VkLatencySleepInfoNV.get_signalSemaphore(this.segment(), index); } + /// {@return `signalSemaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment signalSemaphore() { return VkLatencySleepInfoNV.get_signalSemaphore(this.segment()); } + /// Sets `signalSemaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_signalSemaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_signalSemaphore.set(segment, 0L, index, value); } + /// Sets `signalSemaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_signalSemaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkLatencySleepInfoNV.set_signalSemaphore(segment, 0L, value); } + /// Sets `signalSemaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySleepInfoNV signalSemaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkLatencySleepInfoNV.set_signalSemaphore(this.segment(), index, value); return this; } + /// Sets `signalSemaphore` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySleepInfoNV signalSemaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkLatencySleepInfoNV.set_signalSemaphore(this.segment(), value); return this; } + + /// {@return `value` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_value(MemorySegment segment, long index) { return (long) VH_value.get(segment, 0L, index); } + /// {@return `value`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_value(MemorySegment segment) { return VkLatencySleepInfoNV.get_value(segment, 0L); } + /// {@return `value` at the given index} + /// @param index the index + public @CType("uint64_t") long valueAt(long index) { return VkLatencySleepInfoNV.get_value(this.segment(), index); } + /// {@return `value`} + public @CType("uint64_t") long value() { return VkLatencySleepInfoNV.get_value(this.segment()); } + /// Sets `value` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_value(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_value.set(segment, 0L, index, value); } + /// Sets `value` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_value(MemorySegment segment, @CType("uint64_t") long value) { VkLatencySleepInfoNV.set_value(segment, 0L, value); } + /// Sets `value` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySleepInfoNV valueAt(long index, @CType("uint64_t") long value) { VkLatencySleepInfoNV.set_value(this.segment(), index, value); return this; } + /// Sets `value` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySleepInfoNV value(@CType("uint64_t") long value) { VkLatencySleepInfoNV.set_value(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySleepModeInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySleepModeInfoNV.java new file mode 100644 index 00000000..16c35c4f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySleepModeInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### lowLatencyMode +/// [VarHandle][#VH_lowLatencyMode] - [Getter][#lowLatencyMode()] - [Setter][#lowLatencyMode(int)] +/// ### lowLatencyBoost +/// [VarHandle][#VH_lowLatencyBoost] - [Getter][#lowLatencyBoost()] - [Setter][#lowLatencyBoost(int)] +/// ### minimumIntervalUs +/// [VarHandle][#VH_minimumIntervalUs] - [Getter][#minimumIntervalUs()] - [Setter][#minimumIntervalUs(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkLatencySleepModeInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 lowLatencyMode; +/// VkBool32 lowLatencyBoost; +/// uint32_t minimumIntervalUs; +/// } VkLatencySleepModeInfoNV; +/// ``` +public final class VkLatencySleepModeInfoNV extends Struct { + /// The struct layout of `VkLatencySleepModeInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("lowLatencyMode"), + ValueLayout.JAVA_INT.withName("lowLatencyBoost"), + ValueLayout.JAVA_INT.withName("minimumIntervalUs") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `lowLatencyMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_lowLatencyMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lowLatencyMode")); + /// The [VarHandle] of `lowLatencyBoost` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_lowLatencyBoost = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lowLatencyBoost")); + /// The [VarHandle] of `minimumIntervalUs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minimumIntervalUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minimumIntervalUs")); + + /// Creates `VkLatencySleepModeInfoNV` with the given segment. + /// @param segment the memory segment + public VkLatencySleepModeInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkLatencySleepModeInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySleepModeInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySleepModeInfoNV(segment); } + + /// Creates `VkLatencySleepModeInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySleepModeInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySleepModeInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkLatencySleepModeInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySleepModeInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySleepModeInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkLatencySleepModeInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkLatencySleepModeInfoNV` + public static VkLatencySleepModeInfoNV alloc(SegmentAllocator allocator) { return new VkLatencySleepModeInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkLatencySleepModeInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkLatencySleepModeInfoNV` + public static VkLatencySleepModeInfoNV alloc(SegmentAllocator allocator, long count) { return new VkLatencySleepModeInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkLatencySleepModeInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkLatencySleepModeInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkLatencySleepModeInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkLatencySleepModeInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySleepModeInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkLatencySleepModeInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySleepModeInfoNV sType(@CType("VkStructureType") int value) { VkLatencySleepModeInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkLatencySleepModeInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkLatencySleepModeInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkLatencySleepModeInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySleepModeInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySleepModeInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySleepModeInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySleepModeInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySleepModeInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `lowLatencyMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_lowLatencyMode(MemorySegment segment, long index) { return (int) VH_lowLatencyMode.get(segment, 0L, index); } + /// {@return `lowLatencyMode`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_lowLatencyMode(MemorySegment segment) { return VkLatencySleepModeInfoNV.get_lowLatencyMode(segment, 0L); } + /// {@return `lowLatencyMode` at the given index} + /// @param index the index + public @CType("VkBool32") int lowLatencyModeAt(long index) { return VkLatencySleepModeInfoNV.get_lowLatencyMode(this.segment(), index); } + /// {@return `lowLatencyMode`} + public @CType("VkBool32") int lowLatencyMode() { return VkLatencySleepModeInfoNV.get_lowLatencyMode(this.segment()); } + /// Sets `lowLatencyMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lowLatencyMode(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_lowLatencyMode.set(segment, 0L, index, value); } + /// Sets `lowLatencyMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lowLatencyMode(MemorySegment segment, @CType("VkBool32") int value) { VkLatencySleepModeInfoNV.set_lowLatencyMode(segment, 0L, value); } + /// Sets `lowLatencyMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySleepModeInfoNV lowLatencyModeAt(long index, @CType("VkBool32") int value) { VkLatencySleepModeInfoNV.set_lowLatencyMode(this.segment(), index, value); return this; } + /// Sets `lowLatencyMode` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySleepModeInfoNV lowLatencyMode(@CType("VkBool32") int value) { VkLatencySleepModeInfoNV.set_lowLatencyMode(this.segment(), value); return this; } + + /// {@return `lowLatencyBoost` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_lowLatencyBoost(MemorySegment segment, long index) { return (int) VH_lowLatencyBoost.get(segment, 0L, index); } + /// {@return `lowLatencyBoost`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_lowLatencyBoost(MemorySegment segment) { return VkLatencySleepModeInfoNV.get_lowLatencyBoost(segment, 0L); } + /// {@return `lowLatencyBoost` at the given index} + /// @param index the index + public @CType("VkBool32") int lowLatencyBoostAt(long index) { return VkLatencySleepModeInfoNV.get_lowLatencyBoost(this.segment(), index); } + /// {@return `lowLatencyBoost`} + public @CType("VkBool32") int lowLatencyBoost() { return VkLatencySleepModeInfoNV.get_lowLatencyBoost(this.segment()); } + /// Sets `lowLatencyBoost` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lowLatencyBoost(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_lowLatencyBoost.set(segment, 0L, index, value); } + /// Sets `lowLatencyBoost` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lowLatencyBoost(MemorySegment segment, @CType("VkBool32") int value) { VkLatencySleepModeInfoNV.set_lowLatencyBoost(segment, 0L, value); } + /// Sets `lowLatencyBoost` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySleepModeInfoNV lowLatencyBoostAt(long index, @CType("VkBool32") int value) { VkLatencySleepModeInfoNV.set_lowLatencyBoost(this.segment(), index, value); return this; } + /// Sets `lowLatencyBoost` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySleepModeInfoNV lowLatencyBoost(@CType("VkBool32") int value) { VkLatencySleepModeInfoNV.set_lowLatencyBoost(this.segment(), value); return this; } + + /// {@return `minimumIntervalUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minimumIntervalUs(MemorySegment segment, long index) { return (int) VH_minimumIntervalUs.get(segment, 0L, index); } + /// {@return `minimumIntervalUs`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minimumIntervalUs(MemorySegment segment) { return VkLatencySleepModeInfoNV.get_minimumIntervalUs(segment, 0L); } + /// {@return `minimumIntervalUs` at the given index} + /// @param index the index + public @CType("uint32_t") int minimumIntervalUsAt(long index) { return VkLatencySleepModeInfoNV.get_minimumIntervalUs(this.segment(), index); } + /// {@return `minimumIntervalUs`} + public @CType("uint32_t") int minimumIntervalUs() { return VkLatencySleepModeInfoNV.get_minimumIntervalUs(this.segment()); } + /// Sets `minimumIntervalUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minimumIntervalUs(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minimumIntervalUs.set(segment, 0L, index, value); } + /// Sets `minimumIntervalUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minimumIntervalUs(MemorySegment segment, @CType("uint32_t") int value) { VkLatencySleepModeInfoNV.set_minimumIntervalUs(segment, 0L, value); } + /// Sets `minimumIntervalUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySleepModeInfoNV minimumIntervalUsAt(long index, @CType("uint32_t") int value) { VkLatencySleepModeInfoNV.set_minimumIntervalUs(this.segment(), index, value); return this; } + /// Sets `minimumIntervalUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySleepModeInfoNV minimumIntervalUs(@CType("uint32_t") int value) { VkLatencySleepModeInfoNV.set_minimumIntervalUs(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySubmissionPresentIdNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySubmissionPresentIdNV.java new file mode 100644 index 00000000..34f9ad95 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySubmissionPresentIdNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentID +/// [VarHandle][#VH_presentID] - [Getter][#presentID()] - [Setter][#presentID(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkLatencySubmissionPresentIdNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint64_t presentID; +/// } VkLatencySubmissionPresentIdNV; +/// ``` +public final class VkLatencySubmissionPresentIdNV extends Struct { + /// The struct layout of `VkLatencySubmissionPresentIdNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("presentID") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentID` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_presentID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentID")); + + /// Creates `VkLatencySubmissionPresentIdNV` with the given segment. + /// @param segment the memory segment + public VkLatencySubmissionPresentIdNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkLatencySubmissionPresentIdNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySubmissionPresentIdNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySubmissionPresentIdNV(segment); } + + /// Creates `VkLatencySubmissionPresentIdNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySubmissionPresentIdNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySubmissionPresentIdNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkLatencySubmissionPresentIdNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySubmissionPresentIdNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySubmissionPresentIdNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkLatencySubmissionPresentIdNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkLatencySubmissionPresentIdNV` + public static VkLatencySubmissionPresentIdNV alloc(SegmentAllocator allocator) { return new VkLatencySubmissionPresentIdNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkLatencySubmissionPresentIdNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkLatencySubmissionPresentIdNV` + public static VkLatencySubmissionPresentIdNV alloc(SegmentAllocator allocator, long count) { return new VkLatencySubmissionPresentIdNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkLatencySubmissionPresentIdNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkLatencySubmissionPresentIdNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkLatencySubmissionPresentIdNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkLatencySubmissionPresentIdNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySubmissionPresentIdNV sTypeAt(long index, @CType("VkStructureType") int value) { VkLatencySubmissionPresentIdNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySubmissionPresentIdNV sType(@CType("VkStructureType") int value) { VkLatencySubmissionPresentIdNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkLatencySubmissionPresentIdNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkLatencySubmissionPresentIdNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkLatencySubmissionPresentIdNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySubmissionPresentIdNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySubmissionPresentIdNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySubmissionPresentIdNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySubmissionPresentIdNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySubmissionPresentIdNV.set_pNext(this.segment(), value); return this; } + + /// {@return `presentID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_presentID(MemorySegment segment, long index) { return (long) VH_presentID.get(segment, 0L, index); } + /// {@return `presentID`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_presentID(MemorySegment segment) { return VkLatencySubmissionPresentIdNV.get_presentID(segment, 0L); } + /// {@return `presentID` at the given index} + /// @param index the index + public @CType("uint64_t") long presentIDAt(long index) { return VkLatencySubmissionPresentIdNV.get_presentID(this.segment(), index); } + /// {@return `presentID`} + public @CType("uint64_t") long presentID() { return VkLatencySubmissionPresentIdNV.get_presentID(this.segment()); } + /// Sets `presentID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentID(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_presentID.set(segment, 0L, index, value); } + /// Sets `presentID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentID(MemorySegment segment, @CType("uint64_t") long value) { VkLatencySubmissionPresentIdNV.set_presentID(segment, 0L, value); } + /// Sets `presentID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySubmissionPresentIdNV presentIDAt(long index, @CType("uint64_t") long value) { VkLatencySubmissionPresentIdNV.set_presentID(this.segment(), index, value); return this; } + /// Sets `presentID` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySubmissionPresentIdNV presentID(@CType("uint64_t") long value) { VkLatencySubmissionPresentIdNV.set_presentID(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySurfaceCapabilitiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySurfaceCapabilitiesNV.java new file mode 100644 index 00000000..29e179d4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencySurfaceCapabilitiesNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentModeCount +/// [VarHandle][#VH_presentModeCount] - [Getter][#presentModeCount()] - [Setter][#presentModeCount(int)] +/// ### pPresentModes +/// [VarHandle][#VH_pPresentModes] - [Getter][#pPresentModes()] - [Setter][#pPresentModes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkLatencySurfaceCapabilitiesNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t presentModeCount; +/// VkPresentModeKHR * pPresentModes; +/// } VkLatencySurfaceCapabilitiesNV; +/// ``` +public final class VkLatencySurfaceCapabilitiesNV extends Struct { + /// The struct layout of `VkLatencySurfaceCapabilitiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("presentModeCount"), + ValueLayout.ADDRESS.withName("pPresentModes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentModeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentModeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentModeCount")); + /// The [VarHandle] of `pPresentModes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPresentModes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPresentModes")); + + /// Creates `VkLatencySurfaceCapabilitiesNV` with the given segment. + /// @param segment the memory segment + public VkLatencySurfaceCapabilitiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkLatencySurfaceCapabilitiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySurfaceCapabilitiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySurfaceCapabilitiesNV(segment); } + + /// Creates `VkLatencySurfaceCapabilitiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySurfaceCapabilitiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySurfaceCapabilitiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkLatencySurfaceCapabilitiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencySurfaceCapabilitiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencySurfaceCapabilitiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkLatencySurfaceCapabilitiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkLatencySurfaceCapabilitiesNV` + public static VkLatencySurfaceCapabilitiesNV alloc(SegmentAllocator allocator) { return new VkLatencySurfaceCapabilitiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkLatencySurfaceCapabilitiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkLatencySurfaceCapabilitiesNV` + public static VkLatencySurfaceCapabilitiesNV alloc(SegmentAllocator allocator, long count) { return new VkLatencySurfaceCapabilitiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkLatencySurfaceCapabilitiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkLatencySurfaceCapabilitiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkLatencySurfaceCapabilitiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkLatencySurfaceCapabilitiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySurfaceCapabilitiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkLatencySurfaceCapabilitiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySurfaceCapabilitiesNV sType(@CType("VkStructureType") int value) { VkLatencySurfaceCapabilitiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkLatencySurfaceCapabilitiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkLatencySurfaceCapabilitiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkLatencySurfaceCapabilitiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySurfaceCapabilitiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySurfaceCapabilitiesNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySurfaceCapabilitiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySurfaceCapabilitiesNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencySurfaceCapabilitiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `presentModeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_presentModeCount(MemorySegment segment, long index) { return (int) VH_presentModeCount.get(segment, 0L, index); } + /// {@return `presentModeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_presentModeCount(MemorySegment segment) { return VkLatencySurfaceCapabilitiesNV.get_presentModeCount(segment, 0L); } + /// {@return `presentModeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int presentModeCountAt(long index) { return VkLatencySurfaceCapabilitiesNV.get_presentModeCount(this.segment(), index); } + /// {@return `presentModeCount`} + public @CType("uint32_t") int presentModeCount() { return VkLatencySurfaceCapabilitiesNV.get_presentModeCount(this.segment()); } + /// Sets `presentModeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentModeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_presentModeCount.set(segment, 0L, index, value); } + /// Sets `presentModeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentModeCount(MemorySegment segment, @CType("uint32_t") int value) { VkLatencySurfaceCapabilitiesNV.set_presentModeCount(segment, 0L, value); } + /// Sets `presentModeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySurfaceCapabilitiesNV presentModeCountAt(long index, @CType("uint32_t") int value) { VkLatencySurfaceCapabilitiesNV.set_presentModeCount(this.segment(), index, value); return this; } + /// Sets `presentModeCount` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySurfaceCapabilitiesNV presentModeCount(@CType("uint32_t") int value) { VkLatencySurfaceCapabilitiesNV.set_presentModeCount(this.segment(), value); return this; } + + /// {@return `pPresentModes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment get_pPresentModes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPresentModes.get(segment, 0L, index); } + /// {@return `pPresentModes`} + /// @param segment the segment of the struct + public static @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment get_pPresentModes(MemorySegment segment) { return VkLatencySurfaceCapabilitiesNV.get_pPresentModes(segment, 0L); } + /// {@return `pPresentModes` at the given index} + /// @param index the index + public @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment pPresentModesAt(long index) { return VkLatencySurfaceCapabilitiesNV.get_pPresentModes(this.segment(), index); } + /// {@return `pPresentModes`} + public @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment pPresentModes() { return VkLatencySurfaceCapabilitiesNV.get_pPresentModes(this.segment()); } + /// Sets `pPresentModes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPresentModes(MemorySegment segment, long index, @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VH_pPresentModes.set(segment, 0L, index, value); } + /// Sets `pPresentModes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPresentModes(MemorySegment segment, @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkLatencySurfaceCapabilitiesNV.set_pPresentModes(segment, 0L, value); } + /// Sets `pPresentModes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencySurfaceCapabilitiesNV pPresentModesAt(long index, @CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkLatencySurfaceCapabilitiesNV.set_pPresentModes(this.segment(), index, value); return this; } + /// Sets `pPresentModes` with the given value. + /// @param value the value + /// @return `this` + public VkLatencySurfaceCapabilitiesNV pPresentModes(@CType("VkPresentModeKHR *") java.lang.foreign.MemorySegment value) { VkLatencySurfaceCapabilitiesNV.set_pPresentModes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencyTimingsFrameReportNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencyTimingsFrameReportNV.java new file mode 100644 index 00000000..877cb21f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkLatencyTimingsFrameReportNV.java @@ -0,0 +1,666 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentID +/// [VarHandle][#VH_presentID] - [Getter][#presentID()] - [Setter][#presentID(long)] +/// ### inputSampleTimeUs +/// [VarHandle][#VH_inputSampleTimeUs] - [Getter][#inputSampleTimeUs()] - [Setter][#inputSampleTimeUs(long)] +/// ### simStartTimeUs +/// [VarHandle][#VH_simStartTimeUs] - [Getter][#simStartTimeUs()] - [Setter][#simStartTimeUs(long)] +/// ### simEndTimeUs +/// [VarHandle][#VH_simEndTimeUs] - [Getter][#simEndTimeUs()] - [Setter][#simEndTimeUs(long)] +/// ### renderSubmitStartTimeUs +/// [VarHandle][#VH_renderSubmitStartTimeUs] - [Getter][#renderSubmitStartTimeUs()] - [Setter][#renderSubmitStartTimeUs(long)] +/// ### renderSubmitEndTimeUs +/// [VarHandle][#VH_renderSubmitEndTimeUs] - [Getter][#renderSubmitEndTimeUs()] - [Setter][#renderSubmitEndTimeUs(long)] +/// ### presentStartTimeUs +/// [VarHandle][#VH_presentStartTimeUs] - [Getter][#presentStartTimeUs()] - [Setter][#presentStartTimeUs(long)] +/// ### presentEndTimeUs +/// [VarHandle][#VH_presentEndTimeUs] - [Getter][#presentEndTimeUs()] - [Setter][#presentEndTimeUs(long)] +/// ### driverStartTimeUs +/// [VarHandle][#VH_driverStartTimeUs] - [Getter][#driverStartTimeUs()] - [Setter][#driverStartTimeUs(long)] +/// ### driverEndTimeUs +/// [VarHandle][#VH_driverEndTimeUs] - [Getter][#driverEndTimeUs()] - [Setter][#driverEndTimeUs(long)] +/// ### osRenderQueueStartTimeUs +/// [VarHandle][#VH_osRenderQueueStartTimeUs] - [Getter][#osRenderQueueStartTimeUs()] - [Setter][#osRenderQueueStartTimeUs(long)] +/// ### osRenderQueueEndTimeUs +/// [VarHandle][#VH_osRenderQueueEndTimeUs] - [Getter][#osRenderQueueEndTimeUs()] - [Setter][#osRenderQueueEndTimeUs(long)] +/// ### gpuRenderStartTimeUs +/// [VarHandle][#VH_gpuRenderStartTimeUs] - [Getter][#gpuRenderStartTimeUs()] - [Setter][#gpuRenderStartTimeUs(long)] +/// ### gpuRenderEndTimeUs +/// [VarHandle][#VH_gpuRenderEndTimeUs] - [Getter][#gpuRenderEndTimeUs()] - [Setter][#gpuRenderEndTimeUs(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkLatencyTimingsFrameReportNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint64_t presentID; +/// uint64_t inputSampleTimeUs; +/// uint64_t simStartTimeUs; +/// uint64_t simEndTimeUs; +/// uint64_t renderSubmitStartTimeUs; +/// uint64_t renderSubmitEndTimeUs; +/// uint64_t presentStartTimeUs; +/// uint64_t presentEndTimeUs; +/// uint64_t driverStartTimeUs; +/// uint64_t driverEndTimeUs; +/// uint64_t osRenderQueueStartTimeUs; +/// uint64_t osRenderQueueEndTimeUs; +/// uint64_t gpuRenderStartTimeUs; +/// uint64_t gpuRenderEndTimeUs; +/// } VkLatencyTimingsFrameReportNV; +/// ``` +public final class VkLatencyTimingsFrameReportNV extends Struct { + /// The struct layout of `VkLatencyTimingsFrameReportNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("presentID"), + ValueLayout.JAVA_LONG.withName("inputSampleTimeUs"), + ValueLayout.JAVA_LONG.withName("simStartTimeUs"), + ValueLayout.JAVA_LONG.withName("simEndTimeUs"), + ValueLayout.JAVA_LONG.withName("renderSubmitStartTimeUs"), + ValueLayout.JAVA_LONG.withName("renderSubmitEndTimeUs"), + ValueLayout.JAVA_LONG.withName("presentStartTimeUs"), + ValueLayout.JAVA_LONG.withName("presentEndTimeUs"), + ValueLayout.JAVA_LONG.withName("driverStartTimeUs"), + ValueLayout.JAVA_LONG.withName("driverEndTimeUs"), + ValueLayout.JAVA_LONG.withName("osRenderQueueStartTimeUs"), + ValueLayout.JAVA_LONG.withName("osRenderQueueEndTimeUs"), + ValueLayout.JAVA_LONG.withName("gpuRenderStartTimeUs"), + ValueLayout.JAVA_LONG.withName("gpuRenderEndTimeUs") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentID` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_presentID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentID")); + /// The [VarHandle] of `inputSampleTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_inputSampleTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inputSampleTimeUs")); + /// The [VarHandle] of `simStartTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_simStartTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("simStartTimeUs")); + /// The [VarHandle] of `simEndTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_simEndTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("simEndTimeUs")); + /// The [VarHandle] of `renderSubmitStartTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_renderSubmitStartTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderSubmitStartTimeUs")); + /// The [VarHandle] of `renderSubmitEndTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_renderSubmitEndTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderSubmitEndTimeUs")); + /// The [VarHandle] of `presentStartTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_presentStartTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentStartTimeUs")); + /// The [VarHandle] of `presentEndTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_presentEndTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentEndTimeUs")); + /// The [VarHandle] of `driverStartTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_driverStartTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("driverStartTimeUs")); + /// The [VarHandle] of `driverEndTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_driverEndTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("driverEndTimeUs")); + /// The [VarHandle] of `osRenderQueueStartTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_osRenderQueueStartTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("osRenderQueueStartTimeUs")); + /// The [VarHandle] of `osRenderQueueEndTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_osRenderQueueEndTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("osRenderQueueEndTimeUs")); + /// The [VarHandle] of `gpuRenderStartTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_gpuRenderStartTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gpuRenderStartTimeUs")); + /// The [VarHandle] of `gpuRenderEndTimeUs` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_gpuRenderEndTimeUs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gpuRenderEndTimeUs")); + + /// Creates `VkLatencyTimingsFrameReportNV` with the given segment. + /// @param segment the memory segment + public VkLatencyTimingsFrameReportNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkLatencyTimingsFrameReportNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencyTimingsFrameReportNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencyTimingsFrameReportNV(segment); } + + /// Creates `VkLatencyTimingsFrameReportNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencyTimingsFrameReportNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencyTimingsFrameReportNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkLatencyTimingsFrameReportNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkLatencyTimingsFrameReportNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkLatencyTimingsFrameReportNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkLatencyTimingsFrameReportNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkLatencyTimingsFrameReportNV` + public static VkLatencyTimingsFrameReportNV alloc(SegmentAllocator allocator) { return new VkLatencyTimingsFrameReportNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkLatencyTimingsFrameReportNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkLatencyTimingsFrameReportNV` + public static VkLatencyTimingsFrameReportNV alloc(SegmentAllocator allocator, long count) { return new VkLatencyTimingsFrameReportNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkLatencyTimingsFrameReportNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkLatencyTimingsFrameReportNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkLatencyTimingsFrameReportNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV sTypeAt(long index, @CType("VkStructureType") int value) { VkLatencyTimingsFrameReportNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV sType(@CType("VkStructureType") int value) { VkLatencyTimingsFrameReportNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkLatencyTimingsFrameReportNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkLatencyTimingsFrameReportNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencyTimingsFrameReportNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencyTimingsFrameReportNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkLatencyTimingsFrameReportNV.set_pNext(this.segment(), value); return this; } + + /// {@return `presentID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_presentID(MemorySegment segment, long index) { return (long) VH_presentID.get(segment, 0L, index); } + /// {@return `presentID`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_presentID(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_presentID(segment, 0L); } + /// {@return `presentID` at the given index} + /// @param index the index + public @CType("uint64_t") long presentIDAt(long index) { return VkLatencyTimingsFrameReportNV.get_presentID(this.segment(), index); } + /// {@return `presentID`} + public @CType("uint64_t") long presentID() { return VkLatencyTimingsFrameReportNV.get_presentID(this.segment()); } + /// Sets `presentID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentID(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_presentID.set(segment, 0L, index, value); } + /// Sets `presentID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentID(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_presentID(segment, 0L, value); } + /// Sets `presentID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV presentIDAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_presentID(this.segment(), index, value); return this; } + /// Sets `presentID` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV presentID(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_presentID(this.segment(), value); return this; } + + /// {@return `inputSampleTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_inputSampleTimeUs(MemorySegment segment, long index) { return (long) VH_inputSampleTimeUs.get(segment, 0L, index); } + /// {@return `inputSampleTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_inputSampleTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_inputSampleTimeUs(segment, 0L); } + /// {@return `inputSampleTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long inputSampleTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_inputSampleTimeUs(this.segment(), index); } + /// {@return `inputSampleTimeUs`} + public @CType("uint64_t") long inputSampleTimeUs() { return VkLatencyTimingsFrameReportNV.get_inputSampleTimeUs(this.segment()); } + /// Sets `inputSampleTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inputSampleTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_inputSampleTimeUs.set(segment, 0L, index, value); } + /// Sets `inputSampleTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inputSampleTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_inputSampleTimeUs(segment, 0L, value); } + /// Sets `inputSampleTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV inputSampleTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_inputSampleTimeUs(this.segment(), index, value); return this; } + /// Sets `inputSampleTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV inputSampleTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_inputSampleTimeUs(this.segment(), value); return this; } + + /// {@return `simStartTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_simStartTimeUs(MemorySegment segment, long index) { return (long) VH_simStartTimeUs.get(segment, 0L, index); } + /// {@return `simStartTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_simStartTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_simStartTimeUs(segment, 0L); } + /// {@return `simStartTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long simStartTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_simStartTimeUs(this.segment(), index); } + /// {@return `simStartTimeUs`} + public @CType("uint64_t") long simStartTimeUs() { return VkLatencyTimingsFrameReportNV.get_simStartTimeUs(this.segment()); } + /// Sets `simStartTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_simStartTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_simStartTimeUs.set(segment, 0L, index, value); } + /// Sets `simStartTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_simStartTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_simStartTimeUs(segment, 0L, value); } + /// Sets `simStartTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV simStartTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_simStartTimeUs(this.segment(), index, value); return this; } + /// Sets `simStartTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV simStartTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_simStartTimeUs(this.segment(), value); return this; } + + /// {@return `simEndTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_simEndTimeUs(MemorySegment segment, long index) { return (long) VH_simEndTimeUs.get(segment, 0L, index); } + /// {@return `simEndTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_simEndTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_simEndTimeUs(segment, 0L); } + /// {@return `simEndTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long simEndTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_simEndTimeUs(this.segment(), index); } + /// {@return `simEndTimeUs`} + public @CType("uint64_t") long simEndTimeUs() { return VkLatencyTimingsFrameReportNV.get_simEndTimeUs(this.segment()); } + /// Sets `simEndTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_simEndTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_simEndTimeUs.set(segment, 0L, index, value); } + /// Sets `simEndTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_simEndTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_simEndTimeUs(segment, 0L, value); } + /// Sets `simEndTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV simEndTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_simEndTimeUs(this.segment(), index, value); return this; } + /// Sets `simEndTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV simEndTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_simEndTimeUs(this.segment(), value); return this; } + + /// {@return `renderSubmitStartTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_renderSubmitStartTimeUs(MemorySegment segment, long index) { return (long) VH_renderSubmitStartTimeUs.get(segment, 0L, index); } + /// {@return `renderSubmitStartTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_renderSubmitStartTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_renderSubmitStartTimeUs(segment, 0L); } + /// {@return `renderSubmitStartTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long renderSubmitStartTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_renderSubmitStartTimeUs(this.segment(), index); } + /// {@return `renderSubmitStartTimeUs`} + public @CType("uint64_t") long renderSubmitStartTimeUs() { return VkLatencyTimingsFrameReportNV.get_renderSubmitStartTimeUs(this.segment()); } + /// Sets `renderSubmitStartTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderSubmitStartTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_renderSubmitStartTimeUs.set(segment, 0L, index, value); } + /// Sets `renderSubmitStartTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderSubmitStartTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_renderSubmitStartTimeUs(segment, 0L, value); } + /// Sets `renderSubmitStartTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV renderSubmitStartTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_renderSubmitStartTimeUs(this.segment(), index, value); return this; } + /// Sets `renderSubmitStartTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV renderSubmitStartTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_renderSubmitStartTimeUs(this.segment(), value); return this; } + + /// {@return `renderSubmitEndTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_renderSubmitEndTimeUs(MemorySegment segment, long index) { return (long) VH_renderSubmitEndTimeUs.get(segment, 0L, index); } + /// {@return `renderSubmitEndTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_renderSubmitEndTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_renderSubmitEndTimeUs(segment, 0L); } + /// {@return `renderSubmitEndTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long renderSubmitEndTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_renderSubmitEndTimeUs(this.segment(), index); } + /// {@return `renderSubmitEndTimeUs`} + public @CType("uint64_t") long renderSubmitEndTimeUs() { return VkLatencyTimingsFrameReportNV.get_renderSubmitEndTimeUs(this.segment()); } + /// Sets `renderSubmitEndTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderSubmitEndTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_renderSubmitEndTimeUs.set(segment, 0L, index, value); } + /// Sets `renderSubmitEndTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderSubmitEndTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_renderSubmitEndTimeUs(segment, 0L, value); } + /// Sets `renderSubmitEndTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV renderSubmitEndTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_renderSubmitEndTimeUs(this.segment(), index, value); return this; } + /// Sets `renderSubmitEndTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV renderSubmitEndTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_renderSubmitEndTimeUs(this.segment(), value); return this; } + + /// {@return `presentStartTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_presentStartTimeUs(MemorySegment segment, long index) { return (long) VH_presentStartTimeUs.get(segment, 0L, index); } + /// {@return `presentStartTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_presentStartTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_presentStartTimeUs(segment, 0L); } + /// {@return `presentStartTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long presentStartTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_presentStartTimeUs(this.segment(), index); } + /// {@return `presentStartTimeUs`} + public @CType("uint64_t") long presentStartTimeUs() { return VkLatencyTimingsFrameReportNV.get_presentStartTimeUs(this.segment()); } + /// Sets `presentStartTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentStartTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_presentStartTimeUs.set(segment, 0L, index, value); } + /// Sets `presentStartTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentStartTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_presentStartTimeUs(segment, 0L, value); } + /// Sets `presentStartTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV presentStartTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_presentStartTimeUs(this.segment(), index, value); return this; } + /// Sets `presentStartTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV presentStartTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_presentStartTimeUs(this.segment(), value); return this; } + + /// {@return `presentEndTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_presentEndTimeUs(MemorySegment segment, long index) { return (long) VH_presentEndTimeUs.get(segment, 0L, index); } + /// {@return `presentEndTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_presentEndTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_presentEndTimeUs(segment, 0L); } + /// {@return `presentEndTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long presentEndTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_presentEndTimeUs(this.segment(), index); } + /// {@return `presentEndTimeUs`} + public @CType("uint64_t") long presentEndTimeUs() { return VkLatencyTimingsFrameReportNV.get_presentEndTimeUs(this.segment()); } + /// Sets `presentEndTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentEndTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_presentEndTimeUs.set(segment, 0L, index, value); } + /// Sets `presentEndTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentEndTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_presentEndTimeUs(segment, 0L, value); } + /// Sets `presentEndTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV presentEndTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_presentEndTimeUs(this.segment(), index, value); return this; } + /// Sets `presentEndTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV presentEndTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_presentEndTimeUs(this.segment(), value); return this; } + + /// {@return `driverStartTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_driverStartTimeUs(MemorySegment segment, long index) { return (long) VH_driverStartTimeUs.get(segment, 0L, index); } + /// {@return `driverStartTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_driverStartTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_driverStartTimeUs(segment, 0L); } + /// {@return `driverStartTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long driverStartTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_driverStartTimeUs(this.segment(), index); } + /// {@return `driverStartTimeUs`} + public @CType("uint64_t") long driverStartTimeUs() { return VkLatencyTimingsFrameReportNV.get_driverStartTimeUs(this.segment()); } + /// Sets `driverStartTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_driverStartTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_driverStartTimeUs.set(segment, 0L, index, value); } + /// Sets `driverStartTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_driverStartTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_driverStartTimeUs(segment, 0L, value); } + /// Sets `driverStartTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV driverStartTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_driverStartTimeUs(this.segment(), index, value); return this; } + /// Sets `driverStartTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV driverStartTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_driverStartTimeUs(this.segment(), value); return this; } + + /// {@return `driverEndTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_driverEndTimeUs(MemorySegment segment, long index) { return (long) VH_driverEndTimeUs.get(segment, 0L, index); } + /// {@return `driverEndTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_driverEndTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_driverEndTimeUs(segment, 0L); } + /// {@return `driverEndTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long driverEndTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_driverEndTimeUs(this.segment(), index); } + /// {@return `driverEndTimeUs`} + public @CType("uint64_t") long driverEndTimeUs() { return VkLatencyTimingsFrameReportNV.get_driverEndTimeUs(this.segment()); } + /// Sets `driverEndTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_driverEndTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_driverEndTimeUs.set(segment, 0L, index, value); } + /// Sets `driverEndTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_driverEndTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_driverEndTimeUs(segment, 0L, value); } + /// Sets `driverEndTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV driverEndTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_driverEndTimeUs(this.segment(), index, value); return this; } + /// Sets `driverEndTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV driverEndTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_driverEndTimeUs(this.segment(), value); return this; } + + /// {@return `osRenderQueueStartTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_osRenderQueueStartTimeUs(MemorySegment segment, long index) { return (long) VH_osRenderQueueStartTimeUs.get(segment, 0L, index); } + /// {@return `osRenderQueueStartTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_osRenderQueueStartTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_osRenderQueueStartTimeUs(segment, 0L); } + /// {@return `osRenderQueueStartTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long osRenderQueueStartTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_osRenderQueueStartTimeUs(this.segment(), index); } + /// {@return `osRenderQueueStartTimeUs`} + public @CType("uint64_t") long osRenderQueueStartTimeUs() { return VkLatencyTimingsFrameReportNV.get_osRenderQueueStartTimeUs(this.segment()); } + /// Sets `osRenderQueueStartTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_osRenderQueueStartTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_osRenderQueueStartTimeUs.set(segment, 0L, index, value); } + /// Sets `osRenderQueueStartTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_osRenderQueueStartTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_osRenderQueueStartTimeUs(segment, 0L, value); } + /// Sets `osRenderQueueStartTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV osRenderQueueStartTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_osRenderQueueStartTimeUs(this.segment(), index, value); return this; } + /// Sets `osRenderQueueStartTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV osRenderQueueStartTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_osRenderQueueStartTimeUs(this.segment(), value); return this; } + + /// {@return `osRenderQueueEndTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_osRenderQueueEndTimeUs(MemorySegment segment, long index) { return (long) VH_osRenderQueueEndTimeUs.get(segment, 0L, index); } + /// {@return `osRenderQueueEndTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_osRenderQueueEndTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_osRenderQueueEndTimeUs(segment, 0L); } + /// {@return `osRenderQueueEndTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long osRenderQueueEndTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_osRenderQueueEndTimeUs(this.segment(), index); } + /// {@return `osRenderQueueEndTimeUs`} + public @CType("uint64_t") long osRenderQueueEndTimeUs() { return VkLatencyTimingsFrameReportNV.get_osRenderQueueEndTimeUs(this.segment()); } + /// Sets `osRenderQueueEndTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_osRenderQueueEndTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_osRenderQueueEndTimeUs.set(segment, 0L, index, value); } + /// Sets `osRenderQueueEndTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_osRenderQueueEndTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_osRenderQueueEndTimeUs(segment, 0L, value); } + /// Sets `osRenderQueueEndTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV osRenderQueueEndTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_osRenderQueueEndTimeUs(this.segment(), index, value); return this; } + /// Sets `osRenderQueueEndTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV osRenderQueueEndTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_osRenderQueueEndTimeUs(this.segment(), value); return this; } + + /// {@return `gpuRenderStartTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_gpuRenderStartTimeUs(MemorySegment segment, long index) { return (long) VH_gpuRenderStartTimeUs.get(segment, 0L, index); } + /// {@return `gpuRenderStartTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_gpuRenderStartTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_gpuRenderStartTimeUs(segment, 0L); } + /// {@return `gpuRenderStartTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long gpuRenderStartTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_gpuRenderStartTimeUs(this.segment(), index); } + /// {@return `gpuRenderStartTimeUs`} + public @CType("uint64_t") long gpuRenderStartTimeUs() { return VkLatencyTimingsFrameReportNV.get_gpuRenderStartTimeUs(this.segment()); } + /// Sets `gpuRenderStartTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gpuRenderStartTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_gpuRenderStartTimeUs.set(segment, 0L, index, value); } + /// Sets `gpuRenderStartTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gpuRenderStartTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_gpuRenderStartTimeUs(segment, 0L, value); } + /// Sets `gpuRenderStartTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV gpuRenderStartTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_gpuRenderStartTimeUs(this.segment(), index, value); return this; } + /// Sets `gpuRenderStartTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV gpuRenderStartTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_gpuRenderStartTimeUs(this.segment(), value); return this; } + + /// {@return `gpuRenderEndTimeUs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_gpuRenderEndTimeUs(MemorySegment segment, long index) { return (long) VH_gpuRenderEndTimeUs.get(segment, 0L, index); } + /// {@return `gpuRenderEndTimeUs`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_gpuRenderEndTimeUs(MemorySegment segment) { return VkLatencyTimingsFrameReportNV.get_gpuRenderEndTimeUs(segment, 0L); } + /// {@return `gpuRenderEndTimeUs` at the given index} + /// @param index the index + public @CType("uint64_t") long gpuRenderEndTimeUsAt(long index) { return VkLatencyTimingsFrameReportNV.get_gpuRenderEndTimeUs(this.segment(), index); } + /// {@return `gpuRenderEndTimeUs`} + public @CType("uint64_t") long gpuRenderEndTimeUs() { return VkLatencyTimingsFrameReportNV.get_gpuRenderEndTimeUs(this.segment()); } + /// Sets `gpuRenderEndTimeUs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gpuRenderEndTimeUs(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_gpuRenderEndTimeUs.set(segment, 0L, index, value); } + /// Sets `gpuRenderEndTimeUs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gpuRenderEndTimeUs(MemorySegment segment, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_gpuRenderEndTimeUs(segment, 0L, value); } + /// Sets `gpuRenderEndTimeUs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV gpuRenderEndTimeUsAt(long index, @CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_gpuRenderEndTimeUs(this.segment(), index, value); return this; } + /// Sets `gpuRenderEndTimeUs` with the given value. + /// @param value the value + /// @return `this` + public VkLatencyTimingsFrameReportNV gpuRenderEndTimeUs(@CType("uint64_t") long value) { VkLatencyTimingsFrameReportNV.set_gpuRenderEndTimeUs(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkMemoryGetRemoteAddressInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkMemoryGetRemoteAddressInfoNV.java new file mode 100644 index 00000000..712812bf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkMemoryGetRemoteAddressInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryGetRemoteAddressInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceMemory memory; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// } VkMemoryGetRemoteAddressInfoNV; +/// ``` +public final class VkMemoryGetRemoteAddressInfoNV extends Struct { + /// The struct layout of `VkMemoryGetRemoteAddressInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkMemoryGetRemoteAddressInfoNV` with the given segment. + /// @param segment the memory segment + public VkMemoryGetRemoteAddressInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryGetRemoteAddressInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetRemoteAddressInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetRemoteAddressInfoNV(segment); } + + /// Creates `VkMemoryGetRemoteAddressInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetRemoteAddressInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetRemoteAddressInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryGetRemoteAddressInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetRemoteAddressInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetRemoteAddressInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryGetRemoteAddressInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryGetRemoteAddressInfoNV` + public static VkMemoryGetRemoteAddressInfoNV alloc(SegmentAllocator allocator) { return new VkMemoryGetRemoteAddressInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryGetRemoteAddressInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryGetRemoteAddressInfoNV` + public static VkMemoryGetRemoteAddressInfoNV alloc(SegmentAllocator allocator, long count) { return new VkMemoryGetRemoteAddressInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryGetRemoteAddressInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryGetRemoteAddressInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryGetRemoteAddressInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryGetRemoteAddressInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetRemoteAddressInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryGetRemoteAddressInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetRemoteAddressInfoNV sType(@CType("VkStructureType") int value) { VkMemoryGetRemoteAddressInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryGetRemoteAddressInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryGetRemoteAddressInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryGetRemoteAddressInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetRemoteAddressInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetRemoteAddressInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetRemoteAddressInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetRemoteAddressInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetRemoteAddressInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkMemoryGetRemoteAddressInfoNV.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkMemoryGetRemoteAddressInfoNV.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkMemoryGetRemoteAddressInfoNV.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetRemoteAddressInfoNV.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetRemoteAddressInfoNV memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetRemoteAddressInfoNV.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetRemoteAddressInfoNV memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetRemoteAddressInfoNV.set_memory(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkMemoryGetRemoteAddressInfoNV.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkMemoryGetRemoteAddressInfoNV.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkMemoryGetRemoteAddressInfoNV.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetRemoteAddressInfoNV.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetRemoteAddressInfoNV handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetRemoteAddressInfoNV.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetRemoteAddressInfoNV handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetRemoteAddressInfoNV.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkMemoryGetSciBufInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkMemoryGetSciBufInfoNV.java new file mode 100644 index 00000000..e16b9c77 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkMemoryGetSciBufInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryGetSciBufInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceMemory memory; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// } VkMemoryGetSciBufInfoNV; +/// ``` +public final class VkMemoryGetSciBufInfoNV extends Struct { + /// The struct layout of `VkMemoryGetSciBufInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkMemoryGetSciBufInfoNV` with the given segment. + /// @param segment the memory segment + public VkMemoryGetSciBufInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryGetSciBufInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetSciBufInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetSciBufInfoNV(segment); } + + /// Creates `VkMemoryGetSciBufInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetSciBufInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetSciBufInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryGetSciBufInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryGetSciBufInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryGetSciBufInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryGetSciBufInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryGetSciBufInfoNV` + public static VkMemoryGetSciBufInfoNV alloc(SegmentAllocator allocator) { return new VkMemoryGetSciBufInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryGetSciBufInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryGetSciBufInfoNV` + public static VkMemoryGetSciBufInfoNV alloc(SegmentAllocator allocator, long count) { return new VkMemoryGetSciBufInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryGetSciBufInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryGetSciBufInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryGetSciBufInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryGetSciBufInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetSciBufInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryGetSciBufInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetSciBufInfoNV sType(@CType("VkStructureType") int value) { VkMemoryGetSciBufInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryGetSciBufInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryGetSciBufInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryGetSciBufInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetSciBufInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetSciBufInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetSciBufInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetSciBufInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryGetSciBufInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkMemoryGetSciBufInfoNV.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkMemoryGetSciBufInfoNV.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkMemoryGetSciBufInfoNV.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetSciBufInfoNV.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetSciBufInfoNV memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetSciBufInfoNV.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetSciBufInfoNV memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryGetSciBufInfoNV.set_memory(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkMemoryGetSciBufInfoNV.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkMemoryGetSciBufInfoNV.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkMemoryGetSciBufInfoNV.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetSciBufInfoNV.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryGetSciBufInfoNV handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetSciBufInfoNV.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryGetSciBufInfoNV handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkMemoryGetSciBufInfoNV.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkMemorySciBufPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkMemorySciBufPropertiesNV.java new file mode 100644 index 00000000..f837f0fd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkMemorySciBufPropertiesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryTypeBits +/// [VarHandle][#VH_memoryTypeBits] - [Getter][#memoryTypeBits()] - [Setter][#memoryTypeBits(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemorySciBufPropertiesNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t memoryTypeBits; +/// } VkMemorySciBufPropertiesNV; +/// ``` +public final class VkMemorySciBufPropertiesNV extends Struct { + /// The struct layout of `VkMemorySciBufPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryTypeBits") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryTypeBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeBits")); + + /// Creates `VkMemorySciBufPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkMemorySciBufPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemorySciBufPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemorySciBufPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemorySciBufPropertiesNV(segment); } + + /// Creates `VkMemorySciBufPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemorySciBufPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemorySciBufPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemorySciBufPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemorySciBufPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemorySciBufPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemorySciBufPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemorySciBufPropertiesNV` + public static VkMemorySciBufPropertiesNV alloc(SegmentAllocator allocator) { return new VkMemorySciBufPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemorySciBufPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemorySciBufPropertiesNV` + public static VkMemorySciBufPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkMemorySciBufPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemorySciBufPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemorySciBufPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemorySciBufPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemorySciBufPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemorySciBufPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkMemorySciBufPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemorySciBufPropertiesNV sType(@CType("VkStructureType") int value) { VkMemorySciBufPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemorySciBufPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemorySciBufPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemorySciBufPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemorySciBufPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemorySciBufPropertiesNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemorySciBufPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemorySciBufPropertiesNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemorySciBufPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryTypeBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment, long index) { return (int) VH_memoryTypeBits.get(segment, 0L, index); } + /// {@return `memoryTypeBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment) { return VkMemorySciBufPropertiesNV.get_memoryTypeBits(segment, 0L); } + /// {@return `memoryTypeBits` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeBitsAt(long index) { return VkMemorySciBufPropertiesNV.get_memoryTypeBits(this.segment(), index); } + /// {@return `memoryTypeBits`} + public @CType("uint32_t") int memoryTypeBits() { return VkMemorySciBufPropertiesNV.get_memoryTypeBits(this.segment()); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeBits.set(segment, 0L, index, value); } + /// Sets `memoryTypeBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, @CType("uint32_t") int value) { VkMemorySciBufPropertiesNV.set_memoryTypeBits(segment, 0L, value); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemorySciBufPropertiesNV memoryTypeBitsAt(long index, @CType("uint32_t") int value) { VkMemorySciBufPropertiesNV.set_memoryTypeBits(this.segment(), index, value); return this; } + /// Sets `memoryTypeBits` with the given value. + /// @param value the value + /// @return `this` + public VkMemorySciBufPropertiesNV memoryTypeBits(@CType("uint32_t") int value) { VkMemorySciBufPropertiesNV.set_memoryTypeBits(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowExecuteInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowExecuteInfoNV.java new file mode 100644 index 00000000..26d50129 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowExecuteInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### regionCount +/// [VarHandle][#VH_regionCount] - [Getter][#regionCount()] - [Setter][#regionCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkOpticalFlowExecuteInfoNV { +/// VkStructureType sType; +/// void * pNext; +/// VkOpticalFlowExecuteFlagsNV flags; +/// uint32_t regionCount; +/// const VkRect2D * pRegions; +/// } VkOpticalFlowExecuteInfoNV; +/// ``` +public final class VkOpticalFlowExecuteInfoNV extends Struct { + /// The struct layout of `VkOpticalFlowExecuteInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("regionCount"), + ValueLayout.ADDRESS.withName("pRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `regionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_regionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("regionCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + + /// Creates `VkOpticalFlowExecuteInfoNV` with the given segment. + /// @param segment the memory segment + public VkOpticalFlowExecuteInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkOpticalFlowExecuteInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowExecuteInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowExecuteInfoNV(segment); } + + /// Creates `VkOpticalFlowExecuteInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowExecuteInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowExecuteInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkOpticalFlowExecuteInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowExecuteInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowExecuteInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkOpticalFlowExecuteInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkOpticalFlowExecuteInfoNV` + public static VkOpticalFlowExecuteInfoNV alloc(SegmentAllocator allocator) { return new VkOpticalFlowExecuteInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkOpticalFlowExecuteInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkOpticalFlowExecuteInfoNV` + public static VkOpticalFlowExecuteInfoNV alloc(SegmentAllocator allocator, long count) { return new VkOpticalFlowExecuteInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkOpticalFlowExecuteInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkOpticalFlowExecuteInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkOpticalFlowExecuteInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkOpticalFlowExecuteInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowExecuteInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkOpticalFlowExecuteInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowExecuteInfoNV sType(@CType("VkStructureType") int value) { VkOpticalFlowExecuteInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkOpticalFlowExecuteInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkOpticalFlowExecuteInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkOpticalFlowExecuteInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowExecuteInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowExecuteInfoNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowExecuteInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowExecuteInfoNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowExecuteInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOpticalFlowExecuteFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkOpticalFlowExecuteFlagsNV") int get_flags(MemorySegment segment) { return VkOpticalFlowExecuteInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkOpticalFlowExecuteFlagsNV") int flagsAt(long index) { return VkOpticalFlowExecuteInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkOpticalFlowExecuteFlagsNV") int flags() { return VkOpticalFlowExecuteInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkOpticalFlowExecuteFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkOpticalFlowExecuteFlagsNV") int value) { VkOpticalFlowExecuteInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowExecuteInfoNV flagsAt(long index, @CType("VkOpticalFlowExecuteFlagsNV") int value) { VkOpticalFlowExecuteInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowExecuteInfoNV flags(@CType("VkOpticalFlowExecuteFlagsNV") int value) { VkOpticalFlowExecuteInfoNV.set_flags(this.segment(), value); return this; } + + /// {@return `regionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_regionCount(MemorySegment segment, long index) { return (int) VH_regionCount.get(segment, 0L, index); } + /// {@return `regionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_regionCount(MemorySegment segment) { return VkOpticalFlowExecuteInfoNV.get_regionCount(segment, 0L); } + /// {@return `regionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int regionCountAt(long index) { return VkOpticalFlowExecuteInfoNV.get_regionCount(this.segment(), index); } + /// {@return `regionCount`} + public @CType("uint32_t") int regionCount() { return VkOpticalFlowExecuteInfoNV.get_regionCount(this.segment()); } + /// Sets `regionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_regionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_regionCount.set(segment, 0L, index, value); } + /// Sets `regionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_regionCount(MemorySegment segment, @CType("uint32_t") int value) { VkOpticalFlowExecuteInfoNV.set_regionCount(segment, 0L, value); } + /// Sets `regionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowExecuteInfoNV regionCountAt(long index, @CType("uint32_t") int value) { VkOpticalFlowExecuteInfoNV.set_regionCount(this.segment(), index, value); return this; } + /// Sets `regionCount` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowExecuteInfoNV regionCount(@CType("uint32_t") int value) { VkOpticalFlowExecuteInfoNV.set_regionCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkOpticalFlowExecuteInfoNV.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkOpticalFlowExecuteInfoNV.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pRegions() { return VkOpticalFlowExecuteInfoNV.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkOpticalFlowExecuteInfoNV.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowExecuteInfoNV pRegionsAt(long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkOpticalFlowExecuteInfoNV.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowExecuteInfoNV pRegions(@CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkOpticalFlowExecuteInfoNV.set_pRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowImageFormatInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowImageFormatInfoNV.java new file mode 100644 index 00000000..dda323d7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowImageFormatInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkOpticalFlowImageFormatInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkOpticalFlowUsageFlagsNV usage; +/// } VkOpticalFlowImageFormatInfoNV; +/// ``` +public final class VkOpticalFlowImageFormatInfoNV extends Struct { + /// The struct layout of `VkOpticalFlowImageFormatInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("usage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + + /// Creates `VkOpticalFlowImageFormatInfoNV` with the given segment. + /// @param segment the memory segment + public VkOpticalFlowImageFormatInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkOpticalFlowImageFormatInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowImageFormatInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowImageFormatInfoNV(segment); } + + /// Creates `VkOpticalFlowImageFormatInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowImageFormatInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowImageFormatInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkOpticalFlowImageFormatInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowImageFormatInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowImageFormatInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkOpticalFlowImageFormatInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkOpticalFlowImageFormatInfoNV` + public static VkOpticalFlowImageFormatInfoNV alloc(SegmentAllocator allocator) { return new VkOpticalFlowImageFormatInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkOpticalFlowImageFormatInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkOpticalFlowImageFormatInfoNV` + public static VkOpticalFlowImageFormatInfoNV alloc(SegmentAllocator allocator, long count) { return new VkOpticalFlowImageFormatInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkOpticalFlowImageFormatInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkOpticalFlowImageFormatInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkOpticalFlowImageFormatInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkOpticalFlowImageFormatInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkOpticalFlowImageFormatInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatInfoNV sType(@CType("VkStructureType") int value) { VkOpticalFlowImageFormatInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkOpticalFlowImageFormatInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkOpticalFlowImageFormatInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkOpticalFlowImageFormatInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowImageFormatInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowImageFormatInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowImageFormatInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOpticalFlowUsageFlagsNV") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkOpticalFlowUsageFlagsNV") int get_usage(MemorySegment segment) { return VkOpticalFlowImageFormatInfoNV.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkOpticalFlowUsageFlagsNV") int usageAt(long index) { return VkOpticalFlowImageFormatInfoNV.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkOpticalFlowUsageFlagsNV") int usage() { return VkOpticalFlowImageFormatInfoNV.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkOpticalFlowUsageFlagsNV") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkOpticalFlowUsageFlagsNV") int value) { VkOpticalFlowImageFormatInfoNV.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatInfoNV usageAt(long index, @CType("VkOpticalFlowUsageFlagsNV") int value) { VkOpticalFlowImageFormatInfoNV.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatInfoNV usage(@CType("VkOpticalFlowUsageFlagsNV") int value) { VkOpticalFlowImageFormatInfoNV.set_usage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowImageFormatPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowImageFormatPropertiesNV.java new file mode 100644 index 00000000..c565d837 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowImageFormatPropertiesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkOpticalFlowImageFormatPropertiesNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkFormat format; +/// } VkOpticalFlowImageFormatPropertiesNV; +/// ``` +public final class VkOpticalFlowImageFormatPropertiesNV extends Struct { + /// The struct layout of `VkOpticalFlowImageFormatPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("format") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + + /// Creates `VkOpticalFlowImageFormatPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkOpticalFlowImageFormatPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkOpticalFlowImageFormatPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowImageFormatPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowImageFormatPropertiesNV(segment); } + + /// Creates `VkOpticalFlowImageFormatPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowImageFormatPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowImageFormatPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkOpticalFlowImageFormatPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowImageFormatPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowImageFormatPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkOpticalFlowImageFormatPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkOpticalFlowImageFormatPropertiesNV` + public static VkOpticalFlowImageFormatPropertiesNV alloc(SegmentAllocator allocator) { return new VkOpticalFlowImageFormatPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkOpticalFlowImageFormatPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkOpticalFlowImageFormatPropertiesNV` + public static VkOpticalFlowImageFormatPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkOpticalFlowImageFormatPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkOpticalFlowImageFormatPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkOpticalFlowImageFormatPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkOpticalFlowImageFormatPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkOpticalFlowImageFormatPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkOpticalFlowImageFormatPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatPropertiesNV sType(@CType("VkStructureType") int value) { VkOpticalFlowImageFormatPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkOpticalFlowImageFormatPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkOpticalFlowImageFormatPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkOpticalFlowImageFormatPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowImageFormatPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatPropertiesNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowImageFormatPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatPropertiesNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowImageFormatPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkOpticalFlowImageFormatPropertiesNV.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkOpticalFlowImageFormatPropertiesNV.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkOpticalFlowImageFormatPropertiesNV.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkOpticalFlowImageFormatPropertiesNV.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatPropertiesNV formatAt(long index, @CType("VkFormat") int value) { VkOpticalFlowImageFormatPropertiesNV.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowImageFormatPropertiesNV format(@CType("VkFormat") int value) { VkOpticalFlowImageFormatPropertiesNV.set_format(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowSessionCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowSessionCreateInfoNV.java new file mode 100644 index 00000000..eb70f1ec --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowSessionCreateInfoNV.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### width +/// [VarHandle][#VH_width] - [Getter][#width()] - [Setter][#width(int)] +/// ### height +/// [VarHandle][#VH_height] - [Getter][#height()] - [Setter][#height(int)] +/// ### imageFormat +/// [VarHandle][#VH_imageFormat] - [Getter][#imageFormat()] - [Setter][#imageFormat(int)] +/// ### flowVectorFormat +/// [VarHandle][#VH_flowVectorFormat] - [Getter][#flowVectorFormat()] - [Setter][#flowVectorFormat(int)] +/// ### costFormat +/// [VarHandle][#VH_costFormat] - [Getter][#costFormat()] - [Setter][#costFormat(int)] +/// ### outputGridSize +/// [VarHandle][#VH_outputGridSize] - [Getter][#outputGridSize()] - [Setter][#outputGridSize(int)] +/// ### hintGridSize +/// [VarHandle][#VH_hintGridSize] - [Getter][#hintGridSize()] - [Setter][#hintGridSize(int)] +/// ### performanceLevel +/// [VarHandle][#VH_performanceLevel] - [Getter][#performanceLevel()] - [Setter][#performanceLevel(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkOpticalFlowSessionCreateInfoNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t width; +/// uint32_t height; +/// VkFormat imageFormat; +/// VkFormat flowVectorFormat; +/// VkFormat costFormat; +/// VkOpticalFlowGridSizeFlagsNV outputGridSize; +/// VkOpticalFlowGridSizeFlagsNV hintGridSize; +/// VkOpticalFlowPerformanceLevelNV performanceLevel; +/// VkOpticalFlowSessionCreateFlagsNV flags; +/// } VkOpticalFlowSessionCreateInfoNV; +/// ``` +public final class VkOpticalFlowSessionCreateInfoNV extends Struct { + /// The struct layout of `VkOpticalFlowSessionCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("width"), + ValueLayout.JAVA_INT.withName("height"), + ValueLayout.JAVA_INT.withName("imageFormat"), + ValueLayout.JAVA_INT.withName("flowVectorFormat"), + ValueLayout.JAVA_INT.withName("costFormat"), + ValueLayout.JAVA_INT.withName("outputGridSize"), + ValueLayout.JAVA_INT.withName("hintGridSize"), + ValueLayout.JAVA_INT.withName("performanceLevel"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `width` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_width = LAYOUT.arrayElementVarHandle(PathElement.groupElement("width")); + /// The [VarHandle] of `height` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_height = LAYOUT.arrayElementVarHandle(PathElement.groupElement("height")); + /// The [VarHandle] of `imageFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageFormat")); + /// The [VarHandle] of `flowVectorFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flowVectorFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flowVectorFormat")); + /// The [VarHandle] of `costFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_costFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("costFormat")); + /// The [VarHandle] of `outputGridSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_outputGridSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("outputGridSize")); + /// The [VarHandle] of `hintGridSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hintGridSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hintGridSize")); + /// The [VarHandle] of `performanceLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_performanceLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("performanceLevel")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkOpticalFlowSessionCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkOpticalFlowSessionCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkOpticalFlowSessionCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowSessionCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowSessionCreateInfoNV(segment); } + + /// Creates `VkOpticalFlowSessionCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowSessionCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowSessionCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkOpticalFlowSessionCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowSessionCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowSessionCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkOpticalFlowSessionCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkOpticalFlowSessionCreateInfoNV` + public static VkOpticalFlowSessionCreateInfoNV alloc(SegmentAllocator allocator) { return new VkOpticalFlowSessionCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkOpticalFlowSessionCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkOpticalFlowSessionCreateInfoNV` + public static VkOpticalFlowSessionCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkOpticalFlowSessionCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkOpticalFlowSessionCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkOpticalFlowSessionCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkOpticalFlowSessionCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV sType(@CType("VkStructureType") int value) { VkOpticalFlowSessionCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkOpticalFlowSessionCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowSessionCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowSessionCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowSessionCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `width` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_width(MemorySegment segment, long index) { return (int) VH_width.get(segment, 0L, index); } + /// {@return `width`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_width(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_width(segment, 0L); } + /// {@return `width` at the given index} + /// @param index the index + public @CType("uint32_t") int widthAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_width(this.segment(), index); } + /// {@return `width`} + public @CType("uint32_t") int width() { return VkOpticalFlowSessionCreateInfoNV.get_width(this.segment()); } + /// Sets `width` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_width(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_width.set(segment, 0L, index, value); } + /// Sets `width` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_width(MemorySegment segment, @CType("uint32_t") int value) { VkOpticalFlowSessionCreateInfoNV.set_width(segment, 0L, value); } + /// Sets `width` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV widthAt(long index, @CType("uint32_t") int value) { VkOpticalFlowSessionCreateInfoNV.set_width(this.segment(), index, value); return this; } + /// Sets `width` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV width(@CType("uint32_t") int value) { VkOpticalFlowSessionCreateInfoNV.set_width(this.segment(), value); return this; } + + /// {@return `height` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_height(MemorySegment segment, long index) { return (int) VH_height.get(segment, 0L, index); } + /// {@return `height`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_height(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_height(segment, 0L); } + /// {@return `height` at the given index} + /// @param index the index + public @CType("uint32_t") int heightAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_height(this.segment(), index); } + /// {@return `height`} + public @CType("uint32_t") int height() { return VkOpticalFlowSessionCreateInfoNV.get_height(this.segment()); } + /// Sets `height` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_height(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_height.set(segment, 0L, index, value); } + /// Sets `height` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_height(MemorySegment segment, @CType("uint32_t") int value) { VkOpticalFlowSessionCreateInfoNV.set_height(segment, 0L, value); } + /// Sets `height` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV heightAt(long index, @CType("uint32_t") int value) { VkOpticalFlowSessionCreateInfoNV.set_height(this.segment(), index, value); return this; } + /// Sets `height` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV height(@CType("uint32_t") int value) { VkOpticalFlowSessionCreateInfoNV.set_height(this.segment(), value); return this; } + + /// {@return `imageFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_imageFormat(MemorySegment segment, long index) { return (int) VH_imageFormat.get(segment, 0L, index); } + /// {@return `imageFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_imageFormat(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_imageFormat(segment, 0L); } + /// {@return `imageFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int imageFormatAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_imageFormat(this.segment(), index); } + /// {@return `imageFormat`} + public @CType("VkFormat") int imageFormat() { return VkOpticalFlowSessionCreateInfoNV.get_imageFormat(this.segment()); } + /// Sets `imageFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_imageFormat.set(segment, 0L, index, value); } + /// Sets `imageFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageFormat(MemorySegment segment, @CType("VkFormat") int value) { VkOpticalFlowSessionCreateInfoNV.set_imageFormat(segment, 0L, value); } + /// Sets `imageFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV imageFormatAt(long index, @CType("VkFormat") int value) { VkOpticalFlowSessionCreateInfoNV.set_imageFormat(this.segment(), index, value); return this; } + /// Sets `imageFormat` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV imageFormat(@CType("VkFormat") int value) { VkOpticalFlowSessionCreateInfoNV.set_imageFormat(this.segment(), value); return this; } + + /// {@return `flowVectorFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_flowVectorFormat(MemorySegment segment, long index) { return (int) VH_flowVectorFormat.get(segment, 0L, index); } + /// {@return `flowVectorFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_flowVectorFormat(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_flowVectorFormat(segment, 0L); } + /// {@return `flowVectorFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int flowVectorFormatAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_flowVectorFormat(this.segment(), index); } + /// {@return `flowVectorFormat`} + public @CType("VkFormat") int flowVectorFormat() { return VkOpticalFlowSessionCreateInfoNV.get_flowVectorFormat(this.segment()); } + /// Sets `flowVectorFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flowVectorFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_flowVectorFormat.set(segment, 0L, index, value); } + /// Sets `flowVectorFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flowVectorFormat(MemorySegment segment, @CType("VkFormat") int value) { VkOpticalFlowSessionCreateInfoNV.set_flowVectorFormat(segment, 0L, value); } + /// Sets `flowVectorFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV flowVectorFormatAt(long index, @CType("VkFormat") int value) { VkOpticalFlowSessionCreateInfoNV.set_flowVectorFormat(this.segment(), index, value); return this; } + /// Sets `flowVectorFormat` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV flowVectorFormat(@CType("VkFormat") int value) { VkOpticalFlowSessionCreateInfoNV.set_flowVectorFormat(this.segment(), value); return this; } + + /// {@return `costFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_costFormat(MemorySegment segment, long index) { return (int) VH_costFormat.get(segment, 0L, index); } + /// {@return `costFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_costFormat(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_costFormat(segment, 0L); } + /// {@return `costFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int costFormatAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_costFormat(this.segment(), index); } + /// {@return `costFormat`} + public @CType("VkFormat") int costFormat() { return VkOpticalFlowSessionCreateInfoNV.get_costFormat(this.segment()); } + /// Sets `costFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_costFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_costFormat.set(segment, 0L, index, value); } + /// Sets `costFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_costFormat(MemorySegment segment, @CType("VkFormat") int value) { VkOpticalFlowSessionCreateInfoNV.set_costFormat(segment, 0L, value); } + /// Sets `costFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV costFormatAt(long index, @CType("VkFormat") int value) { VkOpticalFlowSessionCreateInfoNV.set_costFormat(this.segment(), index, value); return this; } + /// Sets `costFormat` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV costFormat(@CType("VkFormat") int value) { VkOpticalFlowSessionCreateInfoNV.set_costFormat(this.segment(), value); return this; } + + /// {@return `outputGridSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOpticalFlowGridSizeFlagsNV") int get_outputGridSize(MemorySegment segment, long index) { return (int) VH_outputGridSize.get(segment, 0L, index); } + /// {@return `outputGridSize`} + /// @param segment the segment of the struct + public static @CType("VkOpticalFlowGridSizeFlagsNV") int get_outputGridSize(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_outputGridSize(segment, 0L); } + /// {@return `outputGridSize` at the given index} + /// @param index the index + public @CType("VkOpticalFlowGridSizeFlagsNV") int outputGridSizeAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_outputGridSize(this.segment(), index); } + /// {@return `outputGridSize`} + public @CType("VkOpticalFlowGridSizeFlagsNV") int outputGridSize() { return VkOpticalFlowSessionCreateInfoNV.get_outputGridSize(this.segment()); } + /// Sets `outputGridSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_outputGridSize(MemorySegment segment, long index, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VH_outputGridSize.set(segment, 0L, index, value); } + /// Sets `outputGridSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_outputGridSize(MemorySegment segment, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_outputGridSize(segment, 0L, value); } + /// Sets `outputGridSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV outputGridSizeAt(long index, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_outputGridSize(this.segment(), index, value); return this; } + /// Sets `outputGridSize` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV outputGridSize(@CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_outputGridSize(this.segment(), value); return this; } + + /// {@return `hintGridSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOpticalFlowGridSizeFlagsNV") int get_hintGridSize(MemorySegment segment, long index) { return (int) VH_hintGridSize.get(segment, 0L, index); } + /// {@return `hintGridSize`} + /// @param segment the segment of the struct + public static @CType("VkOpticalFlowGridSizeFlagsNV") int get_hintGridSize(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_hintGridSize(segment, 0L); } + /// {@return `hintGridSize` at the given index} + /// @param index the index + public @CType("VkOpticalFlowGridSizeFlagsNV") int hintGridSizeAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_hintGridSize(this.segment(), index); } + /// {@return `hintGridSize`} + public @CType("VkOpticalFlowGridSizeFlagsNV") int hintGridSize() { return VkOpticalFlowSessionCreateInfoNV.get_hintGridSize(this.segment()); } + /// Sets `hintGridSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hintGridSize(MemorySegment segment, long index, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VH_hintGridSize.set(segment, 0L, index, value); } + /// Sets `hintGridSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hintGridSize(MemorySegment segment, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_hintGridSize(segment, 0L, value); } + /// Sets `hintGridSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV hintGridSizeAt(long index, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_hintGridSize(this.segment(), index, value); return this; } + /// Sets `hintGridSize` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV hintGridSize(@CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_hintGridSize(this.segment(), value); return this; } + + /// {@return `performanceLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOpticalFlowPerformanceLevelNV") int get_performanceLevel(MemorySegment segment, long index) { return (int) VH_performanceLevel.get(segment, 0L, index); } + /// {@return `performanceLevel`} + /// @param segment the segment of the struct + public static @CType("VkOpticalFlowPerformanceLevelNV") int get_performanceLevel(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_performanceLevel(segment, 0L); } + /// {@return `performanceLevel` at the given index} + /// @param index the index + public @CType("VkOpticalFlowPerformanceLevelNV") int performanceLevelAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_performanceLevel(this.segment(), index); } + /// {@return `performanceLevel`} + public @CType("VkOpticalFlowPerformanceLevelNV") int performanceLevel() { return VkOpticalFlowSessionCreateInfoNV.get_performanceLevel(this.segment()); } + /// Sets `performanceLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_performanceLevel(MemorySegment segment, long index, @CType("VkOpticalFlowPerformanceLevelNV") int value) { VH_performanceLevel.set(segment, 0L, index, value); } + /// Sets `performanceLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_performanceLevel(MemorySegment segment, @CType("VkOpticalFlowPerformanceLevelNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_performanceLevel(segment, 0L, value); } + /// Sets `performanceLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV performanceLevelAt(long index, @CType("VkOpticalFlowPerformanceLevelNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_performanceLevel(this.segment(), index, value); return this; } + /// Sets `performanceLevel` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV performanceLevel(@CType("VkOpticalFlowPerformanceLevelNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_performanceLevel(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOpticalFlowSessionCreateFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkOpticalFlowSessionCreateFlagsNV") int get_flags(MemorySegment segment) { return VkOpticalFlowSessionCreateInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkOpticalFlowSessionCreateFlagsNV") int flagsAt(long index) { return VkOpticalFlowSessionCreateInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkOpticalFlowSessionCreateFlagsNV") int flags() { return VkOpticalFlowSessionCreateInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkOpticalFlowSessionCreateFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkOpticalFlowSessionCreateFlagsNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV flagsAt(long index, @CType("VkOpticalFlowSessionCreateFlagsNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreateInfoNV flags(@CType("VkOpticalFlowSessionCreateFlagsNV") int value) { VkOpticalFlowSessionCreateInfoNV.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowSessionCreatePrivateDataInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowSessionCreatePrivateDataInfoNV.java new file mode 100644 index 00000000..ebc0a300 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOpticalFlowSessionCreatePrivateDataInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### id +/// [VarHandle][#VH_id] - [Getter][#id()] - [Setter][#id(int)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(int)] +/// ### pPrivateData +/// [VarHandle][#VH_pPrivateData] - [Getter][#pPrivateData()] - [Setter][#pPrivateData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkOpticalFlowSessionCreatePrivateDataInfoNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t id; +/// uint32_t size; +/// const void * pPrivateData; +/// } VkOpticalFlowSessionCreatePrivateDataInfoNV; +/// ``` +public final class VkOpticalFlowSessionCreatePrivateDataInfoNV extends Struct { + /// The struct layout of `VkOpticalFlowSessionCreatePrivateDataInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("id"), + ValueLayout.JAVA_INT.withName("size"), + ValueLayout.ADDRESS.withName("pPrivateData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `id` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("id")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `pPrivateData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPrivateData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPrivateData")); + + /// Creates `VkOpticalFlowSessionCreatePrivateDataInfoNV` with the given segment. + /// @param segment the memory segment + public VkOpticalFlowSessionCreatePrivateDataInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkOpticalFlowSessionCreatePrivateDataInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowSessionCreatePrivateDataInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowSessionCreatePrivateDataInfoNV(segment); } + + /// Creates `VkOpticalFlowSessionCreatePrivateDataInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowSessionCreatePrivateDataInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowSessionCreatePrivateDataInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkOpticalFlowSessionCreatePrivateDataInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkOpticalFlowSessionCreatePrivateDataInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkOpticalFlowSessionCreatePrivateDataInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkOpticalFlowSessionCreatePrivateDataInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkOpticalFlowSessionCreatePrivateDataInfoNV` + public static VkOpticalFlowSessionCreatePrivateDataInfoNV alloc(SegmentAllocator allocator) { return new VkOpticalFlowSessionCreatePrivateDataInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkOpticalFlowSessionCreatePrivateDataInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkOpticalFlowSessionCreatePrivateDataInfoNV` + public static VkOpticalFlowSessionCreatePrivateDataInfoNV alloc(SegmentAllocator allocator, long count) { return new VkOpticalFlowSessionCreatePrivateDataInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreatePrivateDataInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreatePrivateDataInfoNV sType(@CType("VkStructureType") int value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreatePrivateDataInfoNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreatePrivateDataInfoNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_id(MemorySegment segment, long index) { return (int) VH_id.get(segment, 0L, index); } + /// {@return `id`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_id(MemorySegment segment) { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_id(segment, 0L); } + /// {@return `id` at the given index} + /// @param index the index + public @CType("uint32_t") int idAt(long index) { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_id(this.segment(), index); } + /// {@return `id`} + public @CType("uint32_t") int id() { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_id(this.segment()); } + /// Sets `id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_id(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_id.set(segment, 0L, index, value); } + /// Sets `id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_id(MemorySegment segment, @CType("uint32_t") int value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_id(segment, 0L, value); } + /// Sets `id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreatePrivateDataInfoNV idAt(long index, @CType("uint32_t") int value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_id(this.segment(), index, value); return this; } + /// Sets `id` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreatePrivateDataInfoNV id(@CType("uint32_t") int value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_id(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_size(MemorySegment segment, long index) { return (int) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_size(MemorySegment segment) { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("uint32_t") int sizeAt(long index) { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("uint32_t") int size() { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("uint32_t") int value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreatePrivateDataInfoNV sizeAt(long index, @CType("uint32_t") int value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreatePrivateDataInfoNV size(@CType("uint32_t") int value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_size(this.segment(), value); return this; } + + /// {@return `pPrivateData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pPrivateData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPrivateData.get(segment, 0L, index); } + /// {@return `pPrivateData`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pPrivateData(MemorySegment segment) { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_pPrivateData(segment, 0L); } + /// {@return `pPrivateData` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pPrivateDataAt(long index) { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_pPrivateData(this.segment(), index); } + /// {@return `pPrivateData`} + public @CType("const void *") java.lang.foreign.MemorySegment pPrivateData() { return VkOpticalFlowSessionCreatePrivateDataInfoNV.get_pPrivateData(this.segment()); } + /// Sets `pPrivateData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPrivateData(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pPrivateData.set(segment, 0L, index, value); } + /// Sets `pPrivateData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPrivateData(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_pPrivateData(segment, 0L, value); } + /// Sets `pPrivateData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreatePrivateDataInfoNV pPrivateDataAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_pPrivateData(this.segment(), index, value); return this; } + /// Sets `pPrivateData` with the given value. + /// @param value the value + /// @return `this` + public VkOpticalFlowSessionCreatePrivateDataInfoNV pPrivateData(@CType("const void *") java.lang.foreign.MemorySegment value) { VkOpticalFlowSessionCreatePrivateDataInfoNV.set_pPrivateData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOutOfBandQueueTypeInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOutOfBandQueueTypeInfoNV.java new file mode 100644 index 00000000..19b6de27 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkOutOfBandQueueTypeInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### queueType +/// [VarHandle][#VH_queueType] - [Getter][#queueType()] - [Setter][#queueType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkOutOfBandQueueTypeInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkOutOfBandQueueTypeNV queueType; +/// } VkOutOfBandQueueTypeInfoNV; +/// ``` +public final class VkOutOfBandQueueTypeInfoNV extends Struct { + /// The struct layout of `VkOutOfBandQueueTypeInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("queueType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `queueType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueType")); + + /// Creates `VkOutOfBandQueueTypeInfoNV` with the given segment. + /// @param segment the memory segment + public VkOutOfBandQueueTypeInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkOutOfBandQueueTypeInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOutOfBandQueueTypeInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOutOfBandQueueTypeInfoNV(segment); } + + /// Creates `VkOutOfBandQueueTypeInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOutOfBandQueueTypeInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOutOfBandQueueTypeInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkOutOfBandQueueTypeInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkOutOfBandQueueTypeInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkOutOfBandQueueTypeInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkOutOfBandQueueTypeInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkOutOfBandQueueTypeInfoNV` + public static VkOutOfBandQueueTypeInfoNV alloc(SegmentAllocator allocator) { return new VkOutOfBandQueueTypeInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkOutOfBandQueueTypeInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkOutOfBandQueueTypeInfoNV` + public static VkOutOfBandQueueTypeInfoNV alloc(SegmentAllocator allocator, long count) { return new VkOutOfBandQueueTypeInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkOutOfBandQueueTypeInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkOutOfBandQueueTypeInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkOutOfBandQueueTypeInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkOutOfBandQueueTypeInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOutOfBandQueueTypeInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkOutOfBandQueueTypeInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkOutOfBandQueueTypeInfoNV sType(@CType("VkStructureType") int value) { VkOutOfBandQueueTypeInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkOutOfBandQueueTypeInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkOutOfBandQueueTypeInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkOutOfBandQueueTypeInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOutOfBandQueueTypeInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOutOfBandQueueTypeInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkOutOfBandQueueTypeInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkOutOfBandQueueTypeInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkOutOfBandQueueTypeInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `queueType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOutOfBandQueueTypeNV") int get_queueType(MemorySegment segment, long index) { return (int) VH_queueType.get(segment, 0L, index); } + /// {@return `queueType`} + /// @param segment the segment of the struct + public static @CType("VkOutOfBandQueueTypeNV") int get_queueType(MemorySegment segment) { return VkOutOfBandQueueTypeInfoNV.get_queueType(segment, 0L); } + /// {@return `queueType` at the given index} + /// @param index the index + public @CType("VkOutOfBandQueueTypeNV") int queueTypeAt(long index) { return VkOutOfBandQueueTypeInfoNV.get_queueType(this.segment(), index); } + /// {@return `queueType`} + public @CType("VkOutOfBandQueueTypeNV") int queueType() { return VkOutOfBandQueueTypeInfoNV.get_queueType(this.segment()); } + /// Sets `queueType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueType(MemorySegment segment, long index, @CType("VkOutOfBandQueueTypeNV") int value) { VH_queueType.set(segment, 0L, index, value); } + /// Sets `queueType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueType(MemorySegment segment, @CType("VkOutOfBandQueueTypeNV") int value) { VkOutOfBandQueueTypeInfoNV.set_queueType(segment, 0L, value); } + /// Sets `queueType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOutOfBandQueueTypeInfoNV queueTypeAt(long index, @CType("VkOutOfBandQueueTypeNV") int value) { VkOutOfBandQueueTypeInfoNV.set_queueType(this.segment(), index, value); return this; } + /// Sets `queueType` with the given value. + /// @param value the value + /// @return `this` + public VkOutOfBandQueueTypeInfoNV queueType(@CType("VkOutOfBandQueueTypeNV") int value) { VkOutOfBandQueueTypeInfoNV.set_queueType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.java new file mode 100644 index 00000000..f3cb4547 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### commandBufferInheritance +/// [VarHandle][#VH_commandBufferInheritance] - [Getter][#commandBufferInheritance()] - [Setter][#commandBufferInheritance(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCommandBufferInheritanceFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 commandBufferInheritance; +/// } VkPhysicalDeviceCommandBufferInheritanceFeaturesNV; +/// ``` +public final class VkPhysicalDeviceCommandBufferInheritanceFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCommandBufferInheritanceFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("commandBufferInheritance") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `commandBufferInheritance` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandBufferInheritance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandBufferInheritance")); + + /// Creates `VkPhysicalDeviceCommandBufferInheritanceFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCommandBufferInheritanceFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCommandBufferInheritanceFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCommandBufferInheritanceFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCommandBufferInheritanceFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceCommandBufferInheritanceFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCommandBufferInheritanceFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCommandBufferInheritanceFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCommandBufferInheritanceFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCommandBufferInheritanceFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCommandBufferInheritanceFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCommandBufferInheritanceFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCommandBufferInheritanceFeaturesNV` + public static VkPhysicalDeviceCommandBufferInheritanceFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCommandBufferInheritanceFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCommandBufferInheritanceFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCommandBufferInheritanceFeaturesNV` + public static VkPhysicalDeviceCommandBufferInheritanceFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCommandBufferInheritanceFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCommandBufferInheritanceFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCommandBufferInheritanceFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCommandBufferInheritanceFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCommandBufferInheritanceFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `commandBufferInheritance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_commandBufferInheritance(MemorySegment segment, long index) { return (int) VH_commandBufferInheritance.get(segment, 0L, index); } + /// {@return `commandBufferInheritance`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_commandBufferInheritance(MemorySegment segment) { return VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.get_commandBufferInheritance(segment, 0L); } + /// {@return `commandBufferInheritance` at the given index} + /// @param index the index + public @CType("VkBool32") int commandBufferInheritanceAt(long index) { return VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.get_commandBufferInheritance(this.segment(), index); } + /// {@return `commandBufferInheritance`} + public @CType("VkBool32") int commandBufferInheritance() { return VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.get_commandBufferInheritance(this.segment()); } + /// Sets `commandBufferInheritance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandBufferInheritance(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_commandBufferInheritance.set(segment, 0L, index, value); } + /// Sets `commandBufferInheritance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandBufferInheritance(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.set_commandBufferInheritance(segment, 0L, value); } + /// Sets `commandBufferInheritance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCommandBufferInheritanceFeaturesNV commandBufferInheritanceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.set_commandBufferInheritance(this.segment(), index, value); return this; } + /// Sets `commandBufferInheritance` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCommandBufferInheritanceFeaturesNV commandBufferInheritance(@CType("VkBool32") int value) { VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.set_commandBufferInheritance(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrix2FeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrix2FeaturesNV.java new file mode 100644 index 00000000..bfe839cc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrix2FeaturesNV.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cooperativeMatrixWorkgroupScope +/// [VarHandle][#VH_cooperativeMatrixWorkgroupScope] - [Getter][#cooperativeMatrixWorkgroupScope()] - [Setter][#cooperativeMatrixWorkgroupScope(int)] +/// ### cooperativeMatrixFlexibleDimensions +/// [VarHandle][#VH_cooperativeMatrixFlexibleDimensions] - [Getter][#cooperativeMatrixFlexibleDimensions()] - [Setter][#cooperativeMatrixFlexibleDimensions(int)] +/// ### cooperativeMatrixReductions +/// [VarHandle][#VH_cooperativeMatrixReductions] - [Getter][#cooperativeMatrixReductions()] - [Setter][#cooperativeMatrixReductions(int)] +/// ### cooperativeMatrixConversions +/// [VarHandle][#VH_cooperativeMatrixConversions] - [Getter][#cooperativeMatrixConversions()] - [Setter][#cooperativeMatrixConversions(int)] +/// ### cooperativeMatrixPerElementOperations +/// [VarHandle][#VH_cooperativeMatrixPerElementOperations] - [Getter][#cooperativeMatrixPerElementOperations()] - [Setter][#cooperativeMatrixPerElementOperations(int)] +/// ### cooperativeMatrixTensorAddressing +/// [VarHandle][#VH_cooperativeMatrixTensorAddressing] - [Getter][#cooperativeMatrixTensorAddressing()] - [Setter][#cooperativeMatrixTensorAddressing(int)] +/// ### cooperativeMatrixBlockLoads +/// [VarHandle][#VH_cooperativeMatrixBlockLoads] - [Getter][#cooperativeMatrixBlockLoads()] - [Setter][#cooperativeMatrixBlockLoads(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCooperativeMatrix2FeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 cooperativeMatrixWorkgroupScope; +/// VkBool32 cooperativeMatrixFlexibleDimensions; +/// VkBool32 cooperativeMatrixReductions; +/// VkBool32 cooperativeMatrixConversions; +/// VkBool32 cooperativeMatrixPerElementOperations; +/// VkBool32 cooperativeMatrixTensorAddressing; +/// VkBool32 cooperativeMatrixBlockLoads; +/// } VkPhysicalDeviceCooperativeMatrix2FeaturesNV; +/// ``` +public final class VkPhysicalDeviceCooperativeMatrix2FeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCooperativeMatrix2FeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixWorkgroupScope"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixFlexibleDimensions"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixReductions"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixConversions"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixPerElementOperations"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixTensorAddressing"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixBlockLoads") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cooperativeMatrixWorkgroupScope` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixWorkgroupScope = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixWorkgroupScope")); + /// The [VarHandle] of `cooperativeMatrixFlexibleDimensions` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixFlexibleDimensions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixFlexibleDimensions")); + /// The [VarHandle] of `cooperativeMatrixReductions` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixReductions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixReductions")); + /// The [VarHandle] of `cooperativeMatrixConversions` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixConversions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixConversions")); + /// The [VarHandle] of `cooperativeMatrixPerElementOperations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixPerElementOperations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixPerElementOperations")); + /// The [VarHandle] of `cooperativeMatrixTensorAddressing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixTensorAddressing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixTensorAddressing")); + /// The [VarHandle] of `cooperativeMatrixBlockLoads` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixBlockLoads = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixBlockLoads")); + + /// Creates `VkPhysicalDeviceCooperativeMatrix2FeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCooperativeMatrix2FeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrix2FeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrix2FeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrix2FeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrix2FeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrix2FeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrix2FeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrix2FeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrix2FeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrix2FeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCooperativeMatrix2FeaturesNV` + public static VkPhysicalDeviceCooperativeMatrix2FeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCooperativeMatrix2FeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrix2FeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCooperativeMatrix2FeaturesNV` + public static VkPhysicalDeviceCooperativeMatrix2FeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCooperativeMatrix2FeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixWorkgroupScope` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrixWorkgroupScope(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixWorkgroupScope.get(segment, 0L, index); } + /// {@return `cooperativeMatrixWorkgroupScope`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrixWorkgroupScope(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixWorkgroupScope(segment, 0L); } + /// {@return `cooperativeMatrixWorkgroupScope` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixWorkgroupScopeAt(long index) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixWorkgroupScope(this.segment(), index); } + /// {@return `cooperativeMatrixWorkgroupScope`} + public @CType("VkBool32") int cooperativeMatrixWorkgroupScope() { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixWorkgroupScope(this.segment()); } + /// Sets `cooperativeMatrixWorkgroupScope` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixWorkgroupScope(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrixWorkgroupScope.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixWorkgroupScope` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixWorkgroupScope(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixWorkgroupScope(segment, 0L, value); } + /// Sets `cooperativeMatrixWorkgroupScope` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixWorkgroupScopeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixWorkgroupScope(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixWorkgroupScope` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixWorkgroupScope(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixWorkgroupScope(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixFlexibleDimensions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrixFlexibleDimensions(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixFlexibleDimensions.get(segment, 0L, index); } + /// {@return `cooperativeMatrixFlexibleDimensions`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrixFlexibleDimensions(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixFlexibleDimensions(segment, 0L); } + /// {@return `cooperativeMatrixFlexibleDimensions` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixFlexibleDimensionsAt(long index) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixFlexibleDimensions(this.segment(), index); } + /// {@return `cooperativeMatrixFlexibleDimensions`} + public @CType("VkBool32") int cooperativeMatrixFlexibleDimensions() { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixFlexibleDimensions(this.segment()); } + /// Sets `cooperativeMatrixFlexibleDimensions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixFlexibleDimensions(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrixFlexibleDimensions.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixFlexibleDimensions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixFlexibleDimensions(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixFlexibleDimensions(segment, 0L, value); } + /// Sets `cooperativeMatrixFlexibleDimensions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixFlexibleDimensionsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixFlexibleDimensions(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixFlexibleDimensions` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixFlexibleDimensions(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixFlexibleDimensions(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixReductions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrixReductions(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixReductions.get(segment, 0L, index); } + /// {@return `cooperativeMatrixReductions`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrixReductions(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixReductions(segment, 0L); } + /// {@return `cooperativeMatrixReductions` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixReductionsAt(long index) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixReductions(this.segment(), index); } + /// {@return `cooperativeMatrixReductions`} + public @CType("VkBool32") int cooperativeMatrixReductions() { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixReductions(this.segment()); } + /// Sets `cooperativeMatrixReductions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixReductions(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrixReductions.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixReductions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixReductions(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixReductions(segment, 0L, value); } + /// Sets `cooperativeMatrixReductions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixReductionsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixReductions(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixReductions` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixReductions(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixReductions(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixConversions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrixConversions(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixConversions.get(segment, 0L, index); } + /// {@return `cooperativeMatrixConversions`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrixConversions(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixConversions(segment, 0L); } + /// {@return `cooperativeMatrixConversions` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixConversionsAt(long index) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixConversions(this.segment(), index); } + /// {@return `cooperativeMatrixConversions`} + public @CType("VkBool32") int cooperativeMatrixConversions() { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixConversions(this.segment()); } + /// Sets `cooperativeMatrixConversions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixConversions(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrixConversions.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixConversions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixConversions(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixConversions(segment, 0L, value); } + /// Sets `cooperativeMatrixConversions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixConversionsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixConversions(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixConversions` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixConversions(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixConversions(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixPerElementOperations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrixPerElementOperations(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixPerElementOperations.get(segment, 0L, index); } + /// {@return `cooperativeMatrixPerElementOperations`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrixPerElementOperations(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixPerElementOperations(segment, 0L); } + /// {@return `cooperativeMatrixPerElementOperations` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixPerElementOperationsAt(long index) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixPerElementOperations(this.segment(), index); } + /// {@return `cooperativeMatrixPerElementOperations`} + public @CType("VkBool32") int cooperativeMatrixPerElementOperations() { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixPerElementOperations(this.segment()); } + /// Sets `cooperativeMatrixPerElementOperations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixPerElementOperations(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrixPerElementOperations.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixPerElementOperations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixPerElementOperations(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixPerElementOperations(segment, 0L, value); } + /// Sets `cooperativeMatrixPerElementOperations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixPerElementOperationsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixPerElementOperations(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixPerElementOperations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixPerElementOperations(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixPerElementOperations(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixTensorAddressing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrixTensorAddressing(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixTensorAddressing.get(segment, 0L, index); } + /// {@return `cooperativeMatrixTensorAddressing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrixTensorAddressing(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixTensorAddressing(segment, 0L); } + /// {@return `cooperativeMatrixTensorAddressing` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixTensorAddressingAt(long index) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixTensorAddressing(this.segment(), index); } + /// {@return `cooperativeMatrixTensorAddressing`} + public @CType("VkBool32") int cooperativeMatrixTensorAddressing() { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixTensorAddressing(this.segment()); } + /// Sets `cooperativeMatrixTensorAddressing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixTensorAddressing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrixTensorAddressing.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixTensorAddressing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixTensorAddressing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixTensorAddressing(segment, 0L, value); } + /// Sets `cooperativeMatrixTensorAddressing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixTensorAddressingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixTensorAddressing(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixTensorAddressing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixTensorAddressing(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixTensorAddressing(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixBlockLoads` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrixBlockLoads(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixBlockLoads.get(segment, 0L, index); } + /// {@return `cooperativeMatrixBlockLoads`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrixBlockLoads(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixBlockLoads(segment, 0L); } + /// {@return `cooperativeMatrixBlockLoads` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixBlockLoadsAt(long index) { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixBlockLoads(this.segment(), index); } + /// {@return `cooperativeMatrixBlockLoads`} + public @CType("VkBool32") int cooperativeMatrixBlockLoads() { return VkPhysicalDeviceCooperativeMatrix2FeaturesNV.get_cooperativeMatrixBlockLoads(this.segment()); } + /// Sets `cooperativeMatrixBlockLoads` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixBlockLoads(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrixBlockLoads.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixBlockLoads` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixBlockLoads(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixBlockLoads(segment, 0L, value); } + /// Sets `cooperativeMatrixBlockLoads` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixBlockLoadsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixBlockLoads(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixBlockLoads` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2FeaturesNV cooperativeMatrixBlockLoads(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrix2FeaturesNV.set_cooperativeMatrixBlockLoads(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrix2PropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrix2PropertiesNV.java new file mode 100644 index 00000000..9af29920 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrix2PropertiesNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cooperativeMatrixWorkgroupScopeMaxWorkgroupSize +/// [VarHandle][#VH_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize] - [Getter][#cooperativeMatrixWorkgroupScopeMaxWorkgroupSize()] - [Setter][#cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(int)] +/// ### cooperativeMatrixFlexibleDimensionsMaxDimension +/// [VarHandle][#VH_cooperativeMatrixFlexibleDimensionsMaxDimension] - [Getter][#cooperativeMatrixFlexibleDimensionsMaxDimension()] - [Setter][#cooperativeMatrixFlexibleDimensionsMaxDimension(int)] +/// ### cooperativeMatrixWorkgroupScopeReservedSharedMemory +/// [VarHandle][#VH_cooperativeMatrixWorkgroupScopeReservedSharedMemory] - [Getter][#cooperativeMatrixWorkgroupScopeReservedSharedMemory()] - [Setter][#cooperativeMatrixWorkgroupScopeReservedSharedMemory(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCooperativeMatrix2PropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t cooperativeMatrixWorkgroupScopeMaxWorkgroupSize; +/// uint32_t cooperativeMatrixFlexibleDimensionsMaxDimension; +/// uint32_t cooperativeMatrixWorkgroupScopeReservedSharedMemory; +/// } VkPhysicalDeviceCooperativeMatrix2PropertiesNV; +/// ``` +public final class VkPhysicalDeviceCooperativeMatrix2PropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCooperativeMatrix2PropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixWorkgroupScopeMaxWorkgroupSize"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixFlexibleDimensionsMaxDimension"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixWorkgroupScopeReservedSharedMemory") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cooperativeMatrixWorkgroupScopeMaxWorkgroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixWorkgroupScopeMaxWorkgroupSize")); + /// The [VarHandle] of `cooperativeMatrixFlexibleDimensionsMaxDimension` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixFlexibleDimensionsMaxDimension = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixFlexibleDimensionsMaxDimension")); + /// The [VarHandle] of `cooperativeMatrixWorkgroupScopeReservedSharedMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixWorkgroupScopeReservedSharedMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixWorkgroupScopeReservedSharedMemory")); + + /// Creates `VkPhysicalDeviceCooperativeMatrix2PropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCooperativeMatrix2PropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrix2PropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrix2PropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrix2PropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrix2PropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrix2PropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrix2PropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrix2PropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrix2PropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrix2PropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCooperativeMatrix2PropertiesNV` + public static VkPhysicalDeviceCooperativeMatrix2PropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCooperativeMatrix2PropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrix2PropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCooperativeMatrix2PropertiesNV` + public static VkPhysicalDeviceCooperativeMatrix2PropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCooperativeMatrix2PropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixWorkgroupScopeMaxWorkgroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize.get(segment, 0L, index); } + /// {@return `cooperativeMatrixWorkgroupScopeMaxWorkgroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(segment, 0L); } + /// {@return `cooperativeMatrixWorkgroupScopeMaxWorkgroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int cooperativeMatrixWorkgroupScopeMaxWorkgroupSizeAt(long index) { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(this.segment(), index); } + /// {@return `cooperativeMatrixWorkgroupScopeMaxWorkgroupSize`} + public @CType("uint32_t") int cooperativeMatrixWorkgroupScopeMaxWorkgroupSize() { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(this.segment()); } + /// Sets `cooperativeMatrixWorkgroupScopeMaxWorkgroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixWorkgroupScopeMaxWorkgroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(segment, 0L, value); } + /// Sets `cooperativeMatrixWorkgroupScopeMaxWorkgroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV cooperativeMatrixWorkgroupScopeMaxWorkgroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixWorkgroupScopeMaxWorkgroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_cooperativeMatrixWorkgroupScopeMaxWorkgroupSize(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixFlexibleDimensionsMaxDimension` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_cooperativeMatrixFlexibleDimensionsMaxDimension(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixFlexibleDimensionsMaxDimension.get(segment, 0L, index); } + /// {@return `cooperativeMatrixFlexibleDimensionsMaxDimension`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_cooperativeMatrixFlexibleDimensionsMaxDimension(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_cooperativeMatrixFlexibleDimensionsMaxDimension(segment, 0L); } + /// {@return `cooperativeMatrixFlexibleDimensionsMaxDimension` at the given index} + /// @param index the index + public @CType("uint32_t") int cooperativeMatrixFlexibleDimensionsMaxDimensionAt(long index) { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_cooperativeMatrixFlexibleDimensionsMaxDimension(this.segment(), index); } + /// {@return `cooperativeMatrixFlexibleDimensionsMaxDimension`} + public @CType("uint32_t") int cooperativeMatrixFlexibleDimensionsMaxDimension() { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_cooperativeMatrixFlexibleDimensionsMaxDimension(this.segment()); } + /// Sets `cooperativeMatrixFlexibleDimensionsMaxDimension` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixFlexibleDimensionsMaxDimension(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_cooperativeMatrixFlexibleDimensionsMaxDimension.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixFlexibleDimensionsMaxDimension` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixFlexibleDimensionsMaxDimension(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_cooperativeMatrixFlexibleDimensionsMaxDimension(segment, 0L, value); } + /// Sets `cooperativeMatrixFlexibleDimensionsMaxDimension` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV cooperativeMatrixFlexibleDimensionsMaxDimensionAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_cooperativeMatrixFlexibleDimensionsMaxDimension(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixFlexibleDimensionsMaxDimension` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV cooperativeMatrixFlexibleDimensionsMaxDimension(@CType("uint32_t") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_cooperativeMatrixFlexibleDimensionsMaxDimension(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixWorkgroupScopeReservedSharedMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_cooperativeMatrixWorkgroupScopeReservedSharedMemory(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixWorkgroupScopeReservedSharedMemory.get(segment, 0L, index); } + /// {@return `cooperativeMatrixWorkgroupScopeReservedSharedMemory`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_cooperativeMatrixWorkgroupScopeReservedSharedMemory(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_cooperativeMatrixWorkgroupScopeReservedSharedMemory(segment, 0L); } + /// {@return `cooperativeMatrixWorkgroupScopeReservedSharedMemory` at the given index} + /// @param index the index + public @CType("uint32_t") int cooperativeMatrixWorkgroupScopeReservedSharedMemoryAt(long index) { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_cooperativeMatrixWorkgroupScopeReservedSharedMemory(this.segment(), index); } + /// {@return `cooperativeMatrixWorkgroupScopeReservedSharedMemory`} + public @CType("uint32_t") int cooperativeMatrixWorkgroupScopeReservedSharedMemory() { return VkPhysicalDeviceCooperativeMatrix2PropertiesNV.get_cooperativeMatrixWorkgroupScopeReservedSharedMemory(this.segment()); } + /// Sets `cooperativeMatrixWorkgroupScopeReservedSharedMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixWorkgroupScopeReservedSharedMemory(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_cooperativeMatrixWorkgroupScopeReservedSharedMemory.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixWorkgroupScopeReservedSharedMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixWorkgroupScopeReservedSharedMemory(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_cooperativeMatrixWorkgroupScopeReservedSharedMemory(segment, 0L, value); } + /// Sets `cooperativeMatrixWorkgroupScopeReservedSharedMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV cooperativeMatrixWorkgroupScopeReservedSharedMemoryAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_cooperativeMatrixWorkgroupScopeReservedSharedMemory(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixWorkgroupScopeReservedSharedMemory` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrix2PropertiesNV cooperativeMatrixWorkgroupScopeReservedSharedMemory(@CType("uint32_t") int value) { VkPhysicalDeviceCooperativeMatrix2PropertiesNV.set_cooperativeMatrixWorkgroupScopeReservedSharedMemory(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrixFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrixFeaturesNV.java new file mode 100644 index 00000000..9cb6e964 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrixFeaturesNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cooperativeMatrix +/// [VarHandle][#VH_cooperativeMatrix] - [Getter][#cooperativeMatrix()] - [Setter][#cooperativeMatrix(int)] +/// ### cooperativeMatrixRobustBufferAccess +/// [VarHandle][#VH_cooperativeMatrixRobustBufferAccess] - [Getter][#cooperativeMatrixRobustBufferAccess()] - [Setter][#cooperativeMatrixRobustBufferAccess(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCooperativeMatrixFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 cooperativeMatrix; +/// VkBool32 cooperativeMatrixRobustBufferAccess; +/// } VkPhysicalDeviceCooperativeMatrixFeaturesNV; +/// ``` +public final class VkPhysicalDeviceCooperativeMatrixFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCooperativeMatrixFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cooperativeMatrix"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixRobustBufferAccess") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cooperativeMatrix` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrix = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrix")); + /// The [VarHandle] of `cooperativeMatrixRobustBufferAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixRobustBufferAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixRobustBufferAccess")); + + /// Creates `VkPhysicalDeviceCooperativeMatrixFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCooperativeMatrixFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrixFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCooperativeMatrixFeaturesNV` + public static VkPhysicalDeviceCooperativeMatrixFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCooperativeMatrixFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrixFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCooperativeMatrixFeaturesNV` + public static VkPhysicalDeviceCooperativeMatrixFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCooperativeMatrixFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `cooperativeMatrix` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrix(MemorySegment segment, long index) { return (int) VH_cooperativeMatrix.get(segment, 0L, index); } + /// {@return `cooperativeMatrix`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrix(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_cooperativeMatrix(segment, 0L); } + /// {@return `cooperativeMatrix` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixAt(long index) { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_cooperativeMatrix(this.segment(), index); } + /// {@return `cooperativeMatrix`} + public @CType("VkBool32") int cooperativeMatrix() { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_cooperativeMatrix(this.segment()); } + /// Sets `cooperativeMatrix` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrix(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrix.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrix` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrix(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_cooperativeMatrix(segment, 0L, value); } + /// Sets `cooperativeMatrix` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesNV cooperativeMatrixAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_cooperativeMatrix(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrix` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesNV cooperativeMatrix(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_cooperativeMatrix(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixRobustBufferAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cooperativeMatrixRobustBufferAccess(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixRobustBufferAccess.get(segment, 0L, index); } + /// {@return `cooperativeMatrixRobustBufferAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cooperativeMatrixRobustBufferAccess(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_cooperativeMatrixRobustBufferAccess(segment, 0L); } + /// {@return `cooperativeMatrixRobustBufferAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int cooperativeMatrixRobustBufferAccessAt(long index) { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_cooperativeMatrixRobustBufferAccess(this.segment(), index); } + /// {@return `cooperativeMatrixRobustBufferAccess`} + public @CType("VkBool32") int cooperativeMatrixRobustBufferAccess() { return VkPhysicalDeviceCooperativeMatrixFeaturesNV.get_cooperativeMatrixRobustBufferAccess(this.segment()); } + /// Sets `cooperativeMatrixRobustBufferAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixRobustBufferAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cooperativeMatrixRobustBufferAccess.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixRobustBufferAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixRobustBufferAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_cooperativeMatrixRobustBufferAccess(segment, 0L, value); } + /// Sets `cooperativeMatrixRobustBufferAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesNV cooperativeMatrixRobustBufferAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_cooperativeMatrixRobustBufferAccess(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixRobustBufferAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixFeaturesNV cooperativeMatrixRobustBufferAccess(@CType("VkBool32") int value) { VkPhysicalDeviceCooperativeMatrixFeaturesNV.set_cooperativeMatrixRobustBufferAccess(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrixPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrixPropertiesNV.java new file mode 100644 index 00000000..a82d7d8d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCooperativeMatrixPropertiesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cooperativeMatrixSupportedStages +/// [VarHandle][#VH_cooperativeMatrixSupportedStages] - [Getter][#cooperativeMatrixSupportedStages()] - [Setter][#cooperativeMatrixSupportedStages(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCooperativeMatrixPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkShaderStageFlags cooperativeMatrixSupportedStages; +/// } VkPhysicalDeviceCooperativeMatrixPropertiesNV; +/// ``` +public final class VkPhysicalDeviceCooperativeMatrixPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCooperativeMatrixPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cooperativeMatrixSupportedStages") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cooperativeMatrixSupportedStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cooperativeMatrixSupportedStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cooperativeMatrixSupportedStages")); + + /// Creates `VkPhysicalDeviceCooperativeMatrixPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCooperativeMatrixPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCooperativeMatrixPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCooperativeMatrixPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCooperativeMatrixPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrixPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCooperativeMatrixPropertiesNV` + public static VkPhysicalDeviceCooperativeMatrixPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCooperativeMatrixPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCooperativeMatrixPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCooperativeMatrixPropertiesNV` + public static VkPhysicalDeviceCooperativeMatrixPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCooperativeMatrixPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCooperativeMatrixPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCooperativeMatrixPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCooperativeMatrixPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCooperativeMatrixPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCooperativeMatrixPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `cooperativeMatrixSupportedStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_cooperativeMatrixSupportedStages(MemorySegment segment, long index) { return (int) VH_cooperativeMatrixSupportedStages.get(segment, 0L, index); } + /// {@return `cooperativeMatrixSupportedStages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_cooperativeMatrixSupportedStages(MemorySegment segment) { return VkPhysicalDeviceCooperativeMatrixPropertiesNV.get_cooperativeMatrixSupportedStages(segment, 0L); } + /// {@return `cooperativeMatrixSupportedStages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int cooperativeMatrixSupportedStagesAt(long index) { return VkPhysicalDeviceCooperativeMatrixPropertiesNV.get_cooperativeMatrixSupportedStages(this.segment(), index); } + /// {@return `cooperativeMatrixSupportedStages`} + public @CType("VkShaderStageFlags") int cooperativeMatrixSupportedStages() { return VkPhysicalDeviceCooperativeMatrixPropertiesNV.get_cooperativeMatrixSupportedStages(this.segment()); } + /// Sets `cooperativeMatrixSupportedStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cooperativeMatrixSupportedStages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_cooperativeMatrixSupportedStages.set(segment, 0L, index, value); } + /// Sets `cooperativeMatrixSupportedStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cooperativeMatrixSupportedStages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesNV.set_cooperativeMatrixSupportedStages(segment, 0L, value); } + /// Sets `cooperativeMatrixSupportedStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesNV cooperativeMatrixSupportedStagesAt(long index, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesNV.set_cooperativeMatrixSupportedStages(this.segment(), index, value); return this; } + /// Sets `cooperativeMatrixSupportedStages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCooperativeMatrixPropertiesNV cooperativeMatrixSupportedStages(@CType("VkShaderStageFlags") int value) { VkPhysicalDeviceCooperativeMatrixPropertiesNV.set_cooperativeMatrixSupportedStages(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.java new file mode 100644 index 00000000..2f3ce6d6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### indirectCopy +/// [VarHandle][#VH_indirectCopy] - [Getter][#indirectCopy()] - [Setter][#indirectCopy(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCopyMemoryIndirectFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 indirectCopy; +/// } VkPhysicalDeviceCopyMemoryIndirectFeaturesNV; +/// ``` +public final class VkPhysicalDeviceCopyMemoryIndirectFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("indirectCopy") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `indirectCopy` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indirectCopy = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indirectCopy")); + + /// Creates `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCopyMemoryIndirectFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCopyMemoryIndirectFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCopyMemoryIndirectFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCopyMemoryIndirectFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCopyMemoryIndirectFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCopyMemoryIndirectFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCopyMemoryIndirectFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV` + public static VkPhysicalDeviceCopyMemoryIndirectFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCopyMemoryIndirectFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCopyMemoryIndirectFeaturesNV` + public static VkPhysicalDeviceCopyMemoryIndirectFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCopyMemoryIndirectFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `indirectCopy` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_indirectCopy(MemorySegment segment, long index) { return (int) VH_indirectCopy.get(segment, 0L, index); } + /// {@return `indirectCopy`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_indirectCopy(MemorySegment segment) { return VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.get_indirectCopy(segment, 0L); } + /// {@return `indirectCopy` at the given index} + /// @param index the index + public @CType("VkBool32") int indirectCopyAt(long index) { return VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.get_indirectCopy(this.segment(), index); } + /// {@return `indirectCopy`} + public @CType("VkBool32") int indirectCopy() { return VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.get_indirectCopy(this.segment()); } + /// Sets `indirectCopy` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indirectCopy(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_indirectCopy.set(segment, 0L, index, value); } + /// Sets `indirectCopy` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indirectCopy(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.set_indirectCopy(segment, 0L, value); } + /// Sets `indirectCopy` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectFeaturesNV indirectCopyAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.set_indirectCopy(this.segment(), index, value); return this; } + /// Sets `indirectCopy` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectFeaturesNV indirectCopy(@CType("VkBool32") int value) { VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.set_indirectCopy(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.java new file mode 100644 index 00000000..03c8eb5d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### supportedQueues +/// [VarHandle][#VH_supportedQueues] - [Getter][#supportedQueues()] - [Setter][#supportedQueues(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCopyMemoryIndirectPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkQueueFlags supportedQueues; +/// } VkPhysicalDeviceCopyMemoryIndirectPropertiesNV; +/// ``` +public final class VkPhysicalDeviceCopyMemoryIndirectPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCopyMemoryIndirectPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("supportedQueues") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `supportedQueues` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedQueues = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedQueues")); + + /// Creates `VkPhysicalDeviceCopyMemoryIndirectPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCopyMemoryIndirectPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCopyMemoryIndirectPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCopyMemoryIndirectPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCopyMemoryIndirectPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceCopyMemoryIndirectPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCopyMemoryIndirectPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCopyMemoryIndirectPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCopyMemoryIndirectPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCopyMemoryIndirectPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCopyMemoryIndirectPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCopyMemoryIndirectPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCopyMemoryIndirectPropertiesNV` + public static VkPhysicalDeviceCopyMemoryIndirectPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCopyMemoryIndirectPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCopyMemoryIndirectPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCopyMemoryIndirectPropertiesNV` + public static VkPhysicalDeviceCopyMemoryIndirectPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCopyMemoryIndirectPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `supportedQueues` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueueFlags") int get_supportedQueues(MemorySegment segment, long index) { return (int) VH_supportedQueues.get(segment, 0L, index); } + /// {@return `supportedQueues`} + /// @param segment the segment of the struct + public static @CType("VkQueueFlags") int get_supportedQueues(MemorySegment segment) { return VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.get_supportedQueues(segment, 0L); } + /// {@return `supportedQueues` at the given index} + /// @param index the index + public @CType("VkQueueFlags") int supportedQueuesAt(long index) { return VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.get_supportedQueues(this.segment(), index); } + /// {@return `supportedQueues`} + public @CType("VkQueueFlags") int supportedQueues() { return VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.get_supportedQueues(this.segment()); } + /// Sets `supportedQueues` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedQueues(MemorySegment segment, long index, @CType("VkQueueFlags") int value) { VH_supportedQueues.set(segment, 0L, index, value); } + /// Sets `supportedQueues` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedQueues(MemorySegment segment, @CType("VkQueueFlags") int value) { VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.set_supportedQueues(segment, 0L, value); } + /// Sets `supportedQueues` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectPropertiesNV supportedQueuesAt(long index, @CType("VkQueueFlags") int value) { VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.set_supportedQueues(this.segment(), index, value); return this; } + /// Sets `supportedQueues` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCopyMemoryIndirectPropertiesNV supportedQueues(@CType("VkQueueFlags") int value) { VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.set_supportedQueues(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCornerSampledImageFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCornerSampledImageFeaturesNV.java new file mode 100644 index 00000000..7b23f644 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCornerSampledImageFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cornerSampledImage +/// [VarHandle][#VH_cornerSampledImage] - [Getter][#cornerSampledImage()] - [Setter][#cornerSampledImage(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCornerSampledImageFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 cornerSampledImage; +/// } VkPhysicalDeviceCornerSampledImageFeaturesNV; +/// ``` +public final class VkPhysicalDeviceCornerSampledImageFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCornerSampledImageFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cornerSampledImage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cornerSampledImage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cornerSampledImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cornerSampledImage")); + + /// Creates `VkPhysicalDeviceCornerSampledImageFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCornerSampledImageFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCornerSampledImageFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCornerSampledImageFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCornerSampledImageFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceCornerSampledImageFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCornerSampledImageFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCornerSampledImageFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCornerSampledImageFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCornerSampledImageFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCornerSampledImageFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCornerSampledImageFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCornerSampledImageFeaturesNV` + public static VkPhysicalDeviceCornerSampledImageFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCornerSampledImageFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCornerSampledImageFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCornerSampledImageFeaturesNV` + public static VkPhysicalDeviceCornerSampledImageFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCornerSampledImageFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCornerSampledImageFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCornerSampledImageFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCornerSampledImageFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCornerSampledImageFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCornerSampledImageFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCornerSampledImageFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCornerSampledImageFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCornerSampledImageFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCornerSampledImageFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCornerSampledImageFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCornerSampledImageFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCornerSampledImageFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCornerSampledImageFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCornerSampledImageFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCornerSampledImageFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCornerSampledImageFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `cornerSampledImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cornerSampledImage(MemorySegment segment, long index) { return (int) VH_cornerSampledImage.get(segment, 0L, index); } + /// {@return `cornerSampledImage`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cornerSampledImage(MemorySegment segment) { return VkPhysicalDeviceCornerSampledImageFeaturesNV.get_cornerSampledImage(segment, 0L); } + /// {@return `cornerSampledImage` at the given index} + /// @param index the index + public @CType("VkBool32") int cornerSampledImageAt(long index) { return VkPhysicalDeviceCornerSampledImageFeaturesNV.get_cornerSampledImage(this.segment(), index); } + /// {@return `cornerSampledImage`} + public @CType("VkBool32") int cornerSampledImage() { return VkPhysicalDeviceCornerSampledImageFeaturesNV.get_cornerSampledImage(this.segment()); } + /// Sets `cornerSampledImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cornerSampledImage(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cornerSampledImage.set(segment, 0L, index, value); } + /// Sets `cornerSampledImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cornerSampledImage(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCornerSampledImageFeaturesNV.set_cornerSampledImage(segment, 0L, value); } + /// Sets `cornerSampledImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCornerSampledImageFeaturesNV cornerSampledImageAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCornerSampledImageFeaturesNV.set_cornerSampledImage(this.segment(), index, value); return this; } + /// Sets `cornerSampledImage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCornerSampledImageFeaturesNV cornerSampledImage(@CType("VkBool32") int value) { VkPhysicalDeviceCornerSampledImageFeaturesNV.set_cornerSampledImage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCoverageReductionModeFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCoverageReductionModeFeaturesNV.java new file mode 100644 index 00000000..9b01cba9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCoverageReductionModeFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### coverageReductionMode +/// [VarHandle][#VH_coverageReductionMode] - [Getter][#coverageReductionMode()] - [Setter][#coverageReductionMode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCoverageReductionModeFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 coverageReductionMode; +/// } VkPhysicalDeviceCoverageReductionModeFeaturesNV; +/// ``` +public final class VkPhysicalDeviceCoverageReductionModeFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCoverageReductionModeFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("coverageReductionMode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `coverageReductionMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_coverageReductionMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("coverageReductionMode")); + + /// Creates `VkPhysicalDeviceCoverageReductionModeFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCoverageReductionModeFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCoverageReductionModeFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCoverageReductionModeFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCoverageReductionModeFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceCoverageReductionModeFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCoverageReductionModeFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCoverageReductionModeFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCoverageReductionModeFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCoverageReductionModeFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCoverageReductionModeFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCoverageReductionModeFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCoverageReductionModeFeaturesNV` + public static VkPhysicalDeviceCoverageReductionModeFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCoverageReductionModeFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCoverageReductionModeFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCoverageReductionModeFeaturesNV` + public static VkPhysicalDeviceCoverageReductionModeFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCoverageReductionModeFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCoverageReductionModeFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCoverageReductionModeFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCoverageReductionModeFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCoverageReductionModeFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoverageReductionModeFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCoverageReductionModeFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoverageReductionModeFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCoverageReductionModeFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCoverageReductionModeFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCoverageReductionModeFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCoverageReductionModeFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCoverageReductionModeFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoverageReductionModeFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCoverageReductionModeFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoverageReductionModeFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCoverageReductionModeFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `coverageReductionMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_coverageReductionMode(MemorySegment segment, long index) { return (int) VH_coverageReductionMode.get(segment, 0L, index); } + /// {@return `coverageReductionMode`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_coverageReductionMode(MemorySegment segment) { return VkPhysicalDeviceCoverageReductionModeFeaturesNV.get_coverageReductionMode(segment, 0L); } + /// {@return `coverageReductionMode` at the given index} + /// @param index the index + public @CType("VkBool32") int coverageReductionModeAt(long index) { return VkPhysicalDeviceCoverageReductionModeFeaturesNV.get_coverageReductionMode(this.segment(), index); } + /// {@return `coverageReductionMode`} + public @CType("VkBool32") int coverageReductionMode() { return VkPhysicalDeviceCoverageReductionModeFeaturesNV.get_coverageReductionMode(this.segment()); } + /// Sets `coverageReductionMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_coverageReductionMode(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_coverageReductionMode.set(segment, 0L, index, value); } + /// Sets `coverageReductionMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_coverageReductionMode(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCoverageReductionModeFeaturesNV.set_coverageReductionMode(segment, 0L, value); } + /// Sets `coverageReductionMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoverageReductionModeFeaturesNV coverageReductionModeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCoverageReductionModeFeaturesNV.set_coverageReductionMode(this.segment(), index, value); return this; } + /// Sets `coverageReductionMode` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCoverageReductionModeFeaturesNV coverageReductionMode(@CType("VkBool32") int value) { VkPhysicalDeviceCoverageReductionModeFeaturesNV.set_coverageReductionMode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCudaKernelLaunchFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCudaKernelLaunchFeaturesNV.java new file mode 100644 index 00000000..f638edfc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCudaKernelLaunchFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cudaKernelLaunchFeatures +/// [VarHandle][#VH_cudaKernelLaunchFeatures] - [Getter][#cudaKernelLaunchFeatures()] - [Setter][#cudaKernelLaunchFeatures(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCudaKernelLaunchFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 cudaKernelLaunchFeatures; +/// } VkPhysicalDeviceCudaKernelLaunchFeaturesNV; +/// ``` +public final class VkPhysicalDeviceCudaKernelLaunchFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCudaKernelLaunchFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cudaKernelLaunchFeatures") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cudaKernelLaunchFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cudaKernelLaunchFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cudaKernelLaunchFeatures")); + + /// Creates `VkPhysicalDeviceCudaKernelLaunchFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCudaKernelLaunchFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCudaKernelLaunchFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCudaKernelLaunchFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCudaKernelLaunchFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceCudaKernelLaunchFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCudaKernelLaunchFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCudaKernelLaunchFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCudaKernelLaunchFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCudaKernelLaunchFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCudaKernelLaunchFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCudaKernelLaunchFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCudaKernelLaunchFeaturesNV` + public static VkPhysicalDeviceCudaKernelLaunchFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCudaKernelLaunchFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCudaKernelLaunchFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCudaKernelLaunchFeaturesNV` + public static VkPhysicalDeviceCudaKernelLaunchFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCudaKernelLaunchFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCudaKernelLaunchFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCudaKernelLaunchFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCudaKernelLaunchFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCudaKernelLaunchFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCudaKernelLaunchFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCudaKernelLaunchFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCudaKernelLaunchFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCudaKernelLaunchFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCudaKernelLaunchFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCudaKernelLaunchFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCudaKernelLaunchFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCudaKernelLaunchFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `cudaKernelLaunchFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cudaKernelLaunchFeatures(MemorySegment segment, long index) { return (int) VH_cudaKernelLaunchFeatures.get(segment, 0L, index); } + /// {@return `cudaKernelLaunchFeatures`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cudaKernelLaunchFeatures(MemorySegment segment) { return VkPhysicalDeviceCudaKernelLaunchFeaturesNV.get_cudaKernelLaunchFeatures(segment, 0L); } + /// {@return `cudaKernelLaunchFeatures` at the given index} + /// @param index the index + public @CType("VkBool32") int cudaKernelLaunchFeaturesAt(long index) { return VkPhysicalDeviceCudaKernelLaunchFeaturesNV.get_cudaKernelLaunchFeatures(this.segment(), index); } + /// {@return `cudaKernelLaunchFeatures`} + public @CType("VkBool32") int cudaKernelLaunchFeatures() { return VkPhysicalDeviceCudaKernelLaunchFeaturesNV.get_cudaKernelLaunchFeatures(this.segment()); } + /// Sets `cudaKernelLaunchFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cudaKernelLaunchFeatures(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cudaKernelLaunchFeatures.set(segment, 0L, index, value); } + /// Sets `cudaKernelLaunchFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cudaKernelLaunchFeatures(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCudaKernelLaunchFeaturesNV.set_cudaKernelLaunchFeatures(segment, 0L, value); } + /// Sets `cudaKernelLaunchFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchFeaturesNV cudaKernelLaunchFeaturesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCudaKernelLaunchFeaturesNV.set_cudaKernelLaunchFeatures(this.segment(), index, value); return this; } + /// Sets `cudaKernelLaunchFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchFeaturesNV cudaKernelLaunchFeatures(@CType("VkBool32") int value) { VkPhysicalDeviceCudaKernelLaunchFeaturesNV.set_cudaKernelLaunchFeatures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCudaKernelLaunchPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCudaKernelLaunchPropertiesNV.java new file mode 100644 index 00000000..96da9fec --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceCudaKernelLaunchPropertiesNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### computeCapabilityMinor +/// [VarHandle][#VH_computeCapabilityMinor] - [Getter][#computeCapabilityMinor()] - [Setter][#computeCapabilityMinor(int)] +/// ### computeCapabilityMajor +/// [VarHandle][#VH_computeCapabilityMajor] - [Getter][#computeCapabilityMajor()] - [Setter][#computeCapabilityMajor(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCudaKernelLaunchPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t computeCapabilityMinor; +/// uint32_t computeCapabilityMajor; +/// } VkPhysicalDeviceCudaKernelLaunchPropertiesNV; +/// ``` +public final class VkPhysicalDeviceCudaKernelLaunchPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceCudaKernelLaunchPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("computeCapabilityMinor"), + ValueLayout.JAVA_INT.withName("computeCapabilityMajor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `computeCapabilityMinor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_computeCapabilityMinor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("computeCapabilityMinor")); + /// The [VarHandle] of `computeCapabilityMajor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_computeCapabilityMajor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("computeCapabilityMajor")); + + /// Creates `VkPhysicalDeviceCudaKernelLaunchPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCudaKernelLaunchPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCudaKernelLaunchPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCudaKernelLaunchPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCudaKernelLaunchPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceCudaKernelLaunchPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCudaKernelLaunchPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCudaKernelLaunchPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCudaKernelLaunchPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCudaKernelLaunchPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCudaKernelLaunchPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCudaKernelLaunchPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCudaKernelLaunchPropertiesNV` + public static VkPhysicalDeviceCudaKernelLaunchPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCudaKernelLaunchPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCudaKernelLaunchPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCudaKernelLaunchPropertiesNV` + public static VkPhysicalDeviceCudaKernelLaunchPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCudaKernelLaunchPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `computeCapabilityMinor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_computeCapabilityMinor(MemorySegment segment, long index) { return (int) VH_computeCapabilityMinor.get(segment, 0L, index); } + /// {@return `computeCapabilityMinor`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_computeCapabilityMinor(MemorySegment segment) { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_computeCapabilityMinor(segment, 0L); } + /// {@return `computeCapabilityMinor` at the given index} + /// @param index the index + public @CType("uint32_t") int computeCapabilityMinorAt(long index) { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_computeCapabilityMinor(this.segment(), index); } + /// {@return `computeCapabilityMinor`} + public @CType("uint32_t") int computeCapabilityMinor() { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_computeCapabilityMinor(this.segment()); } + /// Sets `computeCapabilityMinor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_computeCapabilityMinor(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_computeCapabilityMinor.set(segment, 0L, index, value); } + /// Sets `computeCapabilityMinor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_computeCapabilityMinor(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_computeCapabilityMinor(segment, 0L, value); } + /// Sets `computeCapabilityMinor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchPropertiesNV computeCapabilityMinorAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_computeCapabilityMinor(this.segment(), index, value); return this; } + /// Sets `computeCapabilityMinor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchPropertiesNV computeCapabilityMinor(@CType("uint32_t") int value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_computeCapabilityMinor(this.segment(), value); return this; } + + /// {@return `computeCapabilityMajor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_computeCapabilityMajor(MemorySegment segment, long index) { return (int) VH_computeCapabilityMajor.get(segment, 0L, index); } + /// {@return `computeCapabilityMajor`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_computeCapabilityMajor(MemorySegment segment) { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_computeCapabilityMajor(segment, 0L); } + /// {@return `computeCapabilityMajor` at the given index} + /// @param index the index + public @CType("uint32_t") int computeCapabilityMajorAt(long index) { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_computeCapabilityMajor(this.segment(), index); } + /// {@return `computeCapabilityMajor`} + public @CType("uint32_t") int computeCapabilityMajor() { return VkPhysicalDeviceCudaKernelLaunchPropertiesNV.get_computeCapabilityMajor(this.segment()); } + /// Sets `computeCapabilityMajor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_computeCapabilityMajor(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_computeCapabilityMajor.set(segment, 0L, index, value); } + /// Sets `computeCapabilityMajor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_computeCapabilityMajor(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_computeCapabilityMajor(segment, 0L, value); } + /// Sets `computeCapabilityMajor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchPropertiesNV computeCapabilityMajorAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_computeCapabilityMajor(this.segment(), index, value); return this; } + /// Sets `computeCapabilityMajor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCudaKernelLaunchPropertiesNV computeCapabilityMajor(@CType("uint32_t") int value) { VkPhysicalDeviceCudaKernelLaunchPropertiesNV.set_computeCapabilityMajor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.java new file mode 100644 index 00000000..332d77d8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dedicatedAllocationImageAliasing +/// [VarHandle][#VH_dedicatedAllocationImageAliasing] - [Getter][#dedicatedAllocationImageAliasing()] - [Setter][#dedicatedAllocationImageAliasing(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 dedicatedAllocationImageAliasing; +/// } VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; +/// ``` +public final class VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("dedicatedAllocationImageAliasing") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dedicatedAllocationImageAliasing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dedicatedAllocationImageAliasing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dedicatedAllocationImageAliasing")); + + /// Creates `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV` + public static VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV` + public static VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `dedicatedAllocationImageAliasing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dedicatedAllocationImageAliasing(MemorySegment segment, long index) { return (int) VH_dedicatedAllocationImageAliasing.get(segment, 0L, index); } + /// {@return `dedicatedAllocationImageAliasing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dedicatedAllocationImageAliasing(MemorySegment segment) { return VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.get_dedicatedAllocationImageAliasing(segment, 0L); } + /// {@return `dedicatedAllocationImageAliasing` at the given index} + /// @param index the index + public @CType("VkBool32") int dedicatedAllocationImageAliasingAt(long index) { return VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.get_dedicatedAllocationImageAliasing(this.segment(), index); } + /// {@return `dedicatedAllocationImageAliasing`} + public @CType("VkBool32") int dedicatedAllocationImageAliasing() { return VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.get_dedicatedAllocationImageAliasing(this.segment()); } + /// Sets `dedicatedAllocationImageAliasing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dedicatedAllocationImageAliasing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dedicatedAllocationImageAliasing.set(segment, 0L, index, value); } + /// Sets `dedicatedAllocationImageAliasing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dedicatedAllocationImageAliasing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.set_dedicatedAllocationImageAliasing(segment, 0L, value); } + /// Sets `dedicatedAllocationImageAliasing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV dedicatedAllocationImageAliasingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.set_dedicatedAllocationImageAliasing(this.segment(), index, value); return this; } + /// Sets `dedicatedAllocationImageAliasing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV dedicatedAllocationImageAliasing(@CType("VkBool32") int value) { VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.set_dedicatedAllocationImageAliasing(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.java new file mode 100644 index 00000000..1f70d67f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### descriptorPoolOverallocation +/// [VarHandle][#VH_descriptorPoolOverallocation] - [Getter][#descriptorPoolOverallocation()] - [Setter][#descriptorPoolOverallocation(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 descriptorPoolOverallocation; +/// } VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV; +/// ``` +public final class VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("descriptorPoolOverallocation") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `descriptorPoolOverallocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorPoolOverallocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorPoolOverallocation")); + + /// Creates `VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV` + public static VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV` + public static VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `descriptorPoolOverallocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorPoolOverallocation(MemorySegment segment, long index) { return (int) VH_descriptorPoolOverallocation.get(segment, 0L, index); } + /// {@return `descriptorPoolOverallocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorPoolOverallocation(MemorySegment segment) { return VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.get_descriptorPoolOverallocation(segment, 0L); } + /// {@return `descriptorPoolOverallocation` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorPoolOverallocationAt(long index) { return VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.get_descriptorPoolOverallocation(this.segment(), index); } + /// {@return `descriptorPoolOverallocation`} + public @CType("VkBool32") int descriptorPoolOverallocation() { return VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.get_descriptorPoolOverallocation(this.segment()); } + /// Sets `descriptorPoolOverallocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorPoolOverallocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorPoolOverallocation.set(segment, 0L, index, value); } + /// Sets `descriptorPoolOverallocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorPoolOverallocation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.set_descriptorPoolOverallocation(segment, 0L, value); } + /// Sets `descriptorPoolOverallocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV descriptorPoolOverallocationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.set_descriptorPoolOverallocation(this.segment(), index, value); return this; } + /// Sets `descriptorPoolOverallocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV descriptorPoolOverallocation(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.set_descriptorPoolOverallocation(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.java new file mode 100644 index 00000000..e91cfecb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceGeneratedCompute +/// [VarHandle][#VH_deviceGeneratedCompute] - [Getter][#deviceGeneratedCompute()] - [Setter][#deviceGeneratedCompute(int)] +/// ### deviceGeneratedComputePipelines +/// [VarHandle][#VH_deviceGeneratedComputePipelines] - [Getter][#deviceGeneratedComputePipelines()] - [Setter][#deviceGeneratedComputePipelines(int)] +/// ### deviceGeneratedComputeCaptureReplay +/// [VarHandle][#VH_deviceGeneratedComputeCaptureReplay] - [Getter][#deviceGeneratedComputeCaptureReplay()] - [Setter][#deviceGeneratedComputeCaptureReplay(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 deviceGeneratedCompute; +/// VkBool32 deviceGeneratedComputePipelines; +/// VkBool32 deviceGeneratedComputeCaptureReplay; +/// } VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV; +/// ``` +public final class VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceGeneratedCompute"), + ValueLayout.JAVA_INT.withName("deviceGeneratedComputePipelines"), + ValueLayout.JAVA_INT.withName("deviceGeneratedComputeCaptureReplay") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceGeneratedCompute` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceGeneratedCompute = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceGeneratedCompute")); + /// The [VarHandle] of `deviceGeneratedComputePipelines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceGeneratedComputePipelines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceGeneratedComputePipelines")); + /// The [VarHandle] of `deviceGeneratedComputeCaptureReplay` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceGeneratedComputeCaptureReplay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceGeneratedComputeCaptureReplay")); + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV` + public static VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV` + public static VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceGeneratedCompute` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceGeneratedCompute(MemorySegment segment, long index) { return (int) VH_deviceGeneratedCompute.get(segment, 0L, index); } + /// {@return `deviceGeneratedCompute`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceGeneratedCompute(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_deviceGeneratedCompute(segment, 0L); } + /// {@return `deviceGeneratedCompute` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceGeneratedComputeAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_deviceGeneratedCompute(this.segment(), index); } + /// {@return `deviceGeneratedCompute`} + public @CType("VkBool32") int deviceGeneratedCompute() { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_deviceGeneratedCompute(this.segment()); } + /// Sets `deviceGeneratedCompute` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceGeneratedCompute(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceGeneratedCompute.set(segment, 0L, index, value); } + /// Sets `deviceGeneratedCompute` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceGeneratedCompute(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_deviceGeneratedCompute(segment, 0L, value); } + /// Sets `deviceGeneratedCompute` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV deviceGeneratedComputeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_deviceGeneratedCompute(this.segment(), index, value); return this; } + /// Sets `deviceGeneratedCompute` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV deviceGeneratedCompute(@CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_deviceGeneratedCompute(this.segment(), value); return this; } + + /// {@return `deviceGeneratedComputePipelines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceGeneratedComputePipelines(MemorySegment segment, long index) { return (int) VH_deviceGeneratedComputePipelines.get(segment, 0L, index); } + /// {@return `deviceGeneratedComputePipelines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceGeneratedComputePipelines(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_deviceGeneratedComputePipelines(segment, 0L); } + /// {@return `deviceGeneratedComputePipelines` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceGeneratedComputePipelinesAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_deviceGeneratedComputePipelines(this.segment(), index); } + /// {@return `deviceGeneratedComputePipelines`} + public @CType("VkBool32") int deviceGeneratedComputePipelines() { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_deviceGeneratedComputePipelines(this.segment()); } + /// Sets `deviceGeneratedComputePipelines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceGeneratedComputePipelines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceGeneratedComputePipelines.set(segment, 0L, index, value); } + /// Sets `deviceGeneratedComputePipelines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceGeneratedComputePipelines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_deviceGeneratedComputePipelines(segment, 0L, value); } + /// Sets `deviceGeneratedComputePipelines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV deviceGeneratedComputePipelinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_deviceGeneratedComputePipelines(this.segment(), index, value); return this; } + /// Sets `deviceGeneratedComputePipelines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV deviceGeneratedComputePipelines(@CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_deviceGeneratedComputePipelines(this.segment(), value); return this; } + + /// {@return `deviceGeneratedComputeCaptureReplay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceGeneratedComputeCaptureReplay(MemorySegment segment, long index) { return (int) VH_deviceGeneratedComputeCaptureReplay.get(segment, 0L, index); } + /// {@return `deviceGeneratedComputeCaptureReplay`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceGeneratedComputeCaptureReplay(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_deviceGeneratedComputeCaptureReplay(segment, 0L); } + /// {@return `deviceGeneratedComputeCaptureReplay` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceGeneratedComputeCaptureReplayAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_deviceGeneratedComputeCaptureReplay(this.segment(), index); } + /// {@return `deviceGeneratedComputeCaptureReplay`} + public @CType("VkBool32") int deviceGeneratedComputeCaptureReplay() { return VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.get_deviceGeneratedComputeCaptureReplay(this.segment()); } + /// Sets `deviceGeneratedComputeCaptureReplay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceGeneratedComputeCaptureReplay(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceGeneratedComputeCaptureReplay.set(segment, 0L, index, value); } + /// Sets `deviceGeneratedComputeCaptureReplay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceGeneratedComputeCaptureReplay(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_deviceGeneratedComputeCaptureReplay(segment, 0L, value); } + /// Sets `deviceGeneratedComputeCaptureReplay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV deviceGeneratedComputeCaptureReplayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_deviceGeneratedComputeCaptureReplay(this.segment(), index, value); return this; } + /// Sets `deviceGeneratedComputeCaptureReplay` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV deviceGeneratedComputeCaptureReplay(@CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.set_deviceGeneratedComputeCaptureReplay(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.java new file mode 100644 index 00000000..5cd446c0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceGeneratedCommands +/// [VarHandle][#VH_deviceGeneratedCommands] - [Getter][#deviceGeneratedCommands()] - [Setter][#deviceGeneratedCommands(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 deviceGeneratedCommands; +/// } VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV; +/// ``` +public final class VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceGeneratedCommands") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceGeneratedCommands` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceGeneratedCommands = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceGeneratedCommands")); + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV` + public static VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV` + public static VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceGeneratedCommands` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceGeneratedCommands(MemorySegment segment, long index) { return (int) VH_deviceGeneratedCommands.get(segment, 0L, index); } + /// {@return `deviceGeneratedCommands`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceGeneratedCommands(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.get_deviceGeneratedCommands(segment, 0L); } + /// {@return `deviceGeneratedCommands` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceGeneratedCommandsAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.get_deviceGeneratedCommands(this.segment(), index); } + /// {@return `deviceGeneratedCommands`} + public @CType("VkBool32") int deviceGeneratedCommands() { return VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.get_deviceGeneratedCommands(this.segment()); } + /// Sets `deviceGeneratedCommands` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceGeneratedCommands(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceGeneratedCommands.set(segment, 0L, index, value); } + /// Sets `deviceGeneratedCommands` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceGeneratedCommands(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.set_deviceGeneratedCommands(segment, 0L, value); } + /// Sets `deviceGeneratedCommands` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV deviceGeneratedCommandsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.set_deviceGeneratedCommands(this.segment(), index, value); return this; } + /// Sets `deviceGeneratedCommands` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV deviceGeneratedCommands(@CType("VkBool32") int value) { VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.set_deviceGeneratedCommands(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.java new file mode 100644 index 00000000..995572d4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxGraphicsShaderGroupCount +/// [VarHandle][#VH_maxGraphicsShaderGroupCount] - [Getter][#maxGraphicsShaderGroupCount()] - [Setter][#maxGraphicsShaderGroupCount(int)] +/// ### maxIndirectSequenceCount +/// [VarHandle][#VH_maxIndirectSequenceCount] - [Getter][#maxIndirectSequenceCount()] - [Setter][#maxIndirectSequenceCount(int)] +/// ### maxIndirectCommandsTokenCount +/// [VarHandle][#VH_maxIndirectCommandsTokenCount] - [Getter][#maxIndirectCommandsTokenCount()] - [Setter][#maxIndirectCommandsTokenCount(int)] +/// ### maxIndirectCommandsStreamCount +/// [VarHandle][#VH_maxIndirectCommandsStreamCount] - [Getter][#maxIndirectCommandsStreamCount()] - [Setter][#maxIndirectCommandsStreamCount(int)] +/// ### maxIndirectCommandsTokenOffset +/// [VarHandle][#VH_maxIndirectCommandsTokenOffset] - [Getter][#maxIndirectCommandsTokenOffset()] - [Setter][#maxIndirectCommandsTokenOffset(int)] +/// ### maxIndirectCommandsStreamStride +/// [VarHandle][#VH_maxIndirectCommandsStreamStride] - [Getter][#maxIndirectCommandsStreamStride()] - [Setter][#maxIndirectCommandsStreamStride(int)] +/// ### minSequencesCountBufferOffsetAlignment +/// [VarHandle][#VH_minSequencesCountBufferOffsetAlignment] - [Getter][#minSequencesCountBufferOffsetAlignment()] - [Setter][#minSequencesCountBufferOffsetAlignment(int)] +/// ### minSequencesIndexBufferOffsetAlignment +/// [VarHandle][#VH_minSequencesIndexBufferOffsetAlignment] - [Getter][#minSequencesIndexBufferOffsetAlignment()] - [Setter][#minSequencesIndexBufferOffsetAlignment(int)] +/// ### minIndirectCommandsBufferOffsetAlignment +/// [VarHandle][#VH_minIndirectCommandsBufferOffsetAlignment] - [Getter][#minIndirectCommandsBufferOffsetAlignment()] - [Setter][#minIndirectCommandsBufferOffsetAlignment(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxGraphicsShaderGroupCount; +/// uint32_t maxIndirectSequenceCount; +/// uint32_t maxIndirectCommandsTokenCount; +/// uint32_t maxIndirectCommandsStreamCount; +/// uint32_t maxIndirectCommandsTokenOffset; +/// uint32_t maxIndirectCommandsStreamStride; +/// uint32_t minSequencesCountBufferOffsetAlignment; +/// uint32_t minSequencesIndexBufferOffsetAlignment; +/// uint32_t minIndirectCommandsBufferOffsetAlignment; +/// } VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV; +/// ``` +public final class VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxGraphicsShaderGroupCount"), + ValueLayout.JAVA_INT.withName("maxIndirectSequenceCount"), + ValueLayout.JAVA_INT.withName("maxIndirectCommandsTokenCount"), + ValueLayout.JAVA_INT.withName("maxIndirectCommandsStreamCount"), + ValueLayout.JAVA_INT.withName("maxIndirectCommandsTokenOffset"), + ValueLayout.JAVA_INT.withName("maxIndirectCommandsStreamStride"), + ValueLayout.JAVA_INT.withName("minSequencesCountBufferOffsetAlignment"), + ValueLayout.JAVA_INT.withName("minSequencesIndexBufferOffsetAlignment"), + ValueLayout.JAVA_INT.withName("minIndirectCommandsBufferOffsetAlignment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxGraphicsShaderGroupCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxGraphicsShaderGroupCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxGraphicsShaderGroupCount")); + /// The [VarHandle] of `maxIndirectSequenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectSequenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectSequenceCount")); + /// The [VarHandle] of `maxIndirectCommandsTokenCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectCommandsTokenCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectCommandsTokenCount")); + /// The [VarHandle] of `maxIndirectCommandsStreamCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectCommandsStreamCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectCommandsStreamCount")); + /// The [VarHandle] of `maxIndirectCommandsTokenOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectCommandsTokenOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectCommandsTokenOffset")); + /// The [VarHandle] of `maxIndirectCommandsStreamStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxIndirectCommandsStreamStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxIndirectCommandsStreamStride")); + /// The [VarHandle] of `minSequencesCountBufferOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minSequencesCountBufferOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minSequencesCountBufferOffsetAlignment")); + /// The [VarHandle] of `minSequencesIndexBufferOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minSequencesIndexBufferOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minSequencesIndexBufferOffsetAlignment")); + /// The [VarHandle] of `minIndirectCommandsBufferOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minIndirectCommandsBufferOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minIndirectCommandsBufferOffsetAlignment")); + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV` + public static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV` + public static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `maxGraphicsShaderGroupCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxGraphicsShaderGroupCount(MemorySegment segment, long index) { return (int) VH_maxGraphicsShaderGroupCount.get(segment, 0L, index); } + /// {@return `maxGraphicsShaderGroupCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxGraphicsShaderGroupCount(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxGraphicsShaderGroupCount(segment, 0L); } + /// {@return `maxGraphicsShaderGroupCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxGraphicsShaderGroupCountAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxGraphicsShaderGroupCount(this.segment(), index); } + /// {@return `maxGraphicsShaderGroupCount`} + public @CType("uint32_t") int maxGraphicsShaderGroupCount() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxGraphicsShaderGroupCount(this.segment()); } + /// Sets `maxGraphicsShaderGroupCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxGraphicsShaderGroupCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxGraphicsShaderGroupCount.set(segment, 0L, index, value); } + /// Sets `maxGraphicsShaderGroupCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxGraphicsShaderGroupCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxGraphicsShaderGroupCount(segment, 0L, value); } + /// Sets `maxGraphicsShaderGroupCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxGraphicsShaderGroupCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxGraphicsShaderGroupCount(this.segment(), index, value); return this; } + /// Sets `maxGraphicsShaderGroupCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxGraphicsShaderGroupCount(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxGraphicsShaderGroupCount(this.segment(), value); return this; } + + /// {@return `maxIndirectSequenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectSequenceCount(MemorySegment segment, long index) { return (int) VH_maxIndirectSequenceCount.get(segment, 0L, index); } + /// {@return `maxIndirectSequenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectSequenceCount(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectSequenceCount(segment, 0L); } + /// {@return `maxIndirectSequenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectSequenceCountAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectSequenceCount(this.segment(), index); } + /// {@return `maxIndirectSequenceCount`} + public @CType("uint32_t") int maxIndirectSequenceCount() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectSequenceCount(this.segment()); } + /// Sets `maxIndirectSequenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectSequenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectSequenceCount.set(segment, 0L, index, value); } + /// Sets `maxIndirectSequenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectSequenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectSequenceCount(segment, 0L, value); } + /// Sets `maxIndirectSequenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxIndirectSequenceCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectSequenceCount(this.segment(), index, value); return this; } + /// Sets `maxIndirectSequenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxIndirectSequenceCount(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectSequenceCount(this.segment(), value); return this; } + + /// {@return `maxIndirectCommandsTokenCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectCommandsTokenCount(MemorySegment segment, long index) { return (int) VH_maxIndirectCommandsTokenCount.get(segment, 0L, index); } + /// {@return `maxIndirectCommandsTokenCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectCommandsTokenCount(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsTokenCount(segment, 0L); } + /// {@return `maxIndirectCommandsTokenCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectCommandsTokenCountAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsTokenCount(this.segment(), index); } + /// {@return `maxIndirectCommandsTokenCount`} + public @CType("uint32_t") int maxIndirectCommandsTokenCount() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsTokenCount(this.segment()); } + /// Sets `maxIndirectCommandsTokenCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectCommandsTokenCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectCommandsTokenCount.set(segment, 0L, index, value); } + /// Sets `maxIndirectCommandsTokenCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectCommandsTokenCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsTokenCount(segment, 0L, value); } + /// Sets `maxIndirectCommandsTokenCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxIndirectCommandsTokenCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsTokenCount(this.segment(), index, value); return this; } + /// Sets `maxIndirectCommandsTokenCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxIndirectCommandsTokenCount(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsTokenCount(this.segment(), value); return this; } + + /// {@return `maxIndirectCommandsStreamCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectCommandsStreamCount(MemorySegment segment, long index) { return (int) VH_maxIndirectCommandsStreamCount.get(segment, 0L, index); } + /// {@return `maxIndirectCommandsStreamCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectCommandsStreamCount(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsStreamCount(segment, 0L); } + /// {@return `maxIndirectCommandsStreamCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectCommandsStreamCountAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsStreamCount(this.segment(), index); } + /// {@return `maxIndirectCommandsStreamCount`} + public @CType("uint32_t") int maxIndirectCommandsStreamCount() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsStreamCount(this.segment()); } + /// Sets `maxIndirectCommandsStreamCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectCommandsStreamCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectCommandsStreamCount.set(segment, 0L, index, value); } + /// Sets `maxIndirectCommandsStreamCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectCommandsStreamCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsStreamCount(segment, 0L, value); } + /// Sets `maxIndirectCommandsStreamCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxIndirectCommandsStreamCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsStreamCount(this.segment(), index, value); return this; } + /// Sets `maxIndirectCommandsStreamCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxIndirectCommandsStreamCount(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsStreamCount(this.segment(), value); return this; } + + /// {@return `maxIndirectCommandsTokenOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectCommandsTokenOffset(MemorySegment segment, long index) { return (int) VH_maxIndirectCommandsTokenOffset.get(segment, 0L, index); } + /// {@return `maxIndirectCommandsTokenOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectCommandsTokenOffset(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsTokenOffset(segment, 0L); } + /// {@return `maxIndirectCommandsTokenOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectCommandsTokenOffsetAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsTokenOffset(this.segment(), index); } + /// {@return `maxIndirectCommandsTokenOffset`} + public @CType("uint32_t") int maxIndirectCommandsTokenOffset() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsTokenOffset(this.segment()); } + /// Sets `maxIndirectCommandsTokenOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectCommandsTokenOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectCommandsTokenOffset.set(segment, 0L, index, value); } + /// Sets `maxIndirectCommandsTokenOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectCommandsTokenOffset(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsTokenOffset(segment, 0L, value); } + /// Sets `maxIndirectCommandsTokenOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxIndirectCommandsTokenOffsetAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsTokenOffset(this.segment(), index, value); return this; } + /// Sets `maxIndirectCommandsTokenOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxIndirectCommandsTokenOffset(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsTokenOffset(this.segment(), value); return this; } + + /// {@return `maxIndirectCommandsStreamStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxIndirectCommandsStreamStride(MemorySegment segment, long index) { return (int) VH_maxIndirectCommandsStreamStride.get(segment, 0L, index); } + /// {@return `maxIndirectCommandsStreamStride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxIndirectCommandsStreamStride(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsStreamStride(segment, 0L); } + /// {@return `maxIndirectCommandsStreamStride` at the given index} + /// @param index the index + public @CType("uint32_t") int maxIndirectCommandsStreamStrideAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsStreamStride(this.segment(), index); } + /// {@return `maxIndirectCommandsStreamStride`} + public @CType("uint32_t") int maxIndirectCommandsStreamStride() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_maxIndirectCommandsStreamStride(this.segment()); } + /// Sets `maxIndirectCommandsStreamStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxIndirectCommandsStreamStride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxIndirectCommandsStreamStride.set(segment, 0L, index, value); } + /// Sets `maxIndirectCommandsStreamStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxIndirectCommandsStreamStride(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsStreamStride(segment, 0L, value); } + /// Sets `maxIndirectCommandsStreamStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxIndirectCommandsStreamStrideAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsStreamStride(this.segment(), index, value); return this; } + /// Sets `maxIndirectCommandsStreamStride` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV maxIndirectCommandsStreamStride(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_maxIndirectCommandsStreamStride(this.segment(), value); return this; } + + /// {@return `minSequencesCountBufferOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minSequencesCountBufferOffsetAlignment(MemorySegment segment, long index) { return (int) VH_minSequencesCountBufferOffsetAlignment.get(segment, 0L, index); } + /// {@return `minSequencesCountBufferOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minSequencesCountBufferOffsetAlignment(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_minSequencesCountBufferOffsetAlignment(segment, 0L); } + /// {@return `minSequencesCountBufferOffsetAlignment` at the given index} + /// @param index the index + public @CType("uint32_t") int minSequencesCountBufferOffsetAlignmentAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_minSequencesCountBufferOffsetAlignment(this.segment(), index); } + /// {@return `minSequencesCountBufferOffsetAlignment`} + public @CType("uint32_t") int minSequencesCountBufferOffsetAlignment() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_minSequencesCountBufferOffsetAlignment(this.segment()); } + /// Sets `minSequencesCountBufferOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minSequencesCountBufferOffsetAlignment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minSequencesCountBufferOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `minSequencesCountBufferOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minSequencesCountBufferOffsetAlignment(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_minSequencesCountBufferOffsetAlignment(segment, 0L, value); } + /// Sets `minSequencesCountBufferOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV minSequencesCountBufferOffsetAlignmentAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_minSequencesCountBufferOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `minSequencesCountBufferOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV minSequencesCountBufferOffsetAlignment(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_minSequencesCountBufferOffsetAlignment(this.segment(), value); return this; } + + /// {@return `minSequencesIndexBufferOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minSequencesIndexBufferOffsetAlignment(MemorySegment segment, long index) { return (int) VH_minSequencesIndexBufferOffsetAlignment.get(segment, 0L, index); } + /// {@return `minSequencesIndexBufferOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minSequencesIndexBufferOffsetAlignment(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_minSequencesIndexBufferOffsetAlignment(segment, 0L); } + /// {@return `minSequencesIndexBufferOffsetAlignment` at the given index} + /// @param index the index + public @CType("uint32_t") int minSequencesIndexBufferOffsetAlignmentAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_minSequencesIndexBufferOffsetAlignment(this.segment(), index); } + /// {@return `minSequencesIndexBufferOffsetAlignment`} + public @CType("uint32_t") int minSequencesIndexBufferOffsetAlignment() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_minSequencesIndexBufferOffsetAlignment(this.segment()); } + /// Sets `minSequencesIndexBufferOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minSequencesIndexBufferOffsetAlignment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minSequencesIndexBufferOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `minSequencesIndexBufferOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minSequencesIndexBufferOffsetAlignment(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_minSequencesIndexBufferOffsetAlignment(segment, 0L, value); } + /// Sets `minSequencesIndexBufferOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV minSequencesIndexBufferOffsetAlignmentAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_minSequencesIndexBufferOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `minSequencesIndexBufferOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV minSequencesIndexBufferOffsetAlignment(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_minSequencesIndexBufferOffsetAlignment(this.segment(), value); return this; } + + /// {@return `minIndirectCommandsBufferOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minIndirectCommandsBufferOffsetAlignment(MemorySegment segment, long index) { return (int) VH_minIndirectCommandsBufferOffsetAlignment.get(segment, 0L, index); } + /// {@return `minIndirectCommandsBufferOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minIndirectCommandsBufferOffsetAlignment(MemorySegment segment) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_minIndirectCommandsBufferOffsetAlignment(segment, 0L); } + /// {@return `minIndirectCommandsBufferOffsetAlignment` at the given index} + /// @param index the index + public @CType("uint32_t") int minIndirectCommandsBufferOffsetAlignmentAt(long index) { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_minIndirectCommandsBufferOffsetAlignment(this.segment(), index); } + /// {@return `minIndirectCommandsBufferOffsetAlignment`} + public @CType("uint32_t") int minIndirectCommandsBufferOffsetAlignment() { return VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.get_minIndirectCommandsBufferOffsetAlignment(this.segment()); } + /// Sets `minIndirectCommandsBufferOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minIndirectCommandsBufferOffsetAlignment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minIndirectCommandsBufferOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `minIndirectCommandsBufferOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minIndirectCommandsBufferOffsetAlignment(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_minIndirectCommandsBufferOffsetAlignment(segment, 0L, value); } + /// Sets `minIndirectCommandsBufferOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV minIndirectCommandsBufferOffsetAlignmentAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_minIndirectCommandsBufferOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `minIndirectCommandsBufferOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV minIndirectCommandsBufferOffsetAlignment(@CType("uint32_t") int value) { VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.set_minIndirectCommandsBufferOffsetAlignment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDiagnosticsConfigFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDiagnosticsConfigFeaturesNV.java new file mode 100644 index 00000000..3e590e85 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDiagnosticsConfigFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### diagnosticsConfig +/// [VarHandle][#VH_diagnosticsConfig] - [Getter][#diagnosticsConfig()] - [Setter][#diagnosticsConfig(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDiagnosticsConfigFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 diagnosticsConfig; +/// } VkPhysicalDeviceDiagnosticsConfigFeaturesNV; +/// ``` +public final class VkPhysicalDeviceDiagnosticsConfigFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceDiagnosticsConfigFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("diagnosticsConfig") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `diagnosticsConfig` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_diagnosticsConfig = LAYOUT.arrayElementVarHandle(PathElement.groupElement("diagnosticsConfig")); + + /// Creates `VkPhysicalDeviceDiagnosticsConfigFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDiagnosticsConfigFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDiagnosticsConfigFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDiagnosticsConfigFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDiagnosticsConfigFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceDiagnosticsConfigFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDiagnosticsConfigFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDiagnosticsConfigFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDiagnosticsConfigFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDiagnosticsConfigFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDiagnosticsConfigFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDiagnosticsConfigFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDiagnosticsConfigFeaturesNV` + public static VkPhysicalDeviceDiagnosticsConfigFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDiagnosticsConfigFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDiagnosticsConfigFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDiagnosticsConfigFeaturesNV` + public static VkPhysicalDeviceDiagnosticsConfigFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDiagnosticsConfigFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDiagnosticsConfigFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDiagnosticsConfigFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDiagnosticsConfigFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDiagnosticsConfigFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiagnosticsConfigFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDiagnosticsConfigFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiagnosticsConfigFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDiagnosticsConfigFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDiagnosticsConfigFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDiagnosticsConfigFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDiagnosticsConfigFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDiagnosticsConfigFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiagnosticsConfigFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDiagnosticsConfigFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiagnosticsConfigFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDiagnosticsConfigFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `diagnosticsConfig` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_diagnosticsConfig(MemorySegment segment, long index) { return (int) VH_diagnosticsConfig.get(segment, 0L, index); } + /// {@return `diagnosticsConfig`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_diagnosticsConfig(MemorySegment segment) { return VkPhysicalDeviceDiagnosticsConfigFeaturesNV.get_diagnosticsConfig(segment, 0L); } + /// {@return `diagnosticsConfig` at the given index} + /// @param index the index + public @CType("VkBool32") int diagnosticsConfigAt(long index) { return VkPhysicalDeviceDiagnosticsConfigFeaturesNV.get_diagnosticsConfig(this.segment(), index); } + /// {@return `diagnosticsConfig`} + public @CType("VkBool32") int diagnosticsConfig() { return VkPhysicalDeviceDiagnosticsConfigFeaturesNV.get_diagnosticsConfig(this.segment()); } + /// Sets `diagnosticsConfig` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_diagnosticsConfig(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_diagnosticsConfig.set(segment, 0L, index, value); } + /// Sets `diagnosticsConfig` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_diagnosticsConfig(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDiagnosticsConfigFeaturesNV.set_diagnosticsConfig(segment, 0L, value); } + /// Sets `diagnosticsConfig` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiagnosticsConfigFeaturesNV diagnosticsConfigAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDiagnosticsConfigFeaturesNV.set_diagnosticsConfig(this.segment(), index, value); return this; } + /// Sets `diagnosticsConfig` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDiagnosticsConfigFeaturesNV diagnosticsConfig(@CType("VkBool32") int value) { VkPhysicalDeviceDiagnosticsConfigFeaturesNV.set_diagnosticsConfig(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDisplacementMicromapFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDisplacementMicromapFeaturesNV.java new file mode 100644 index 00000000..015112d7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDisplacementMicromapFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### displacementMicromap +/// [VarHandle][#VH_displacementMicromap] - [Getter][#displacementMicromap()] - [Setter][#displacementMicromap(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDisplacementMicromapFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 displacementMicromap; +/// } VkPhysicalDeviceDisplacementMicromapFeaturesNV; +/// ``` +public final class VkPhysicalDeviceDisplacementMicromapFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceDisplacementMicromapFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("displacementMicromap") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `displacementMicromap` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_displacementMicromap = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displacementMicromap")); + + /// Creates `VkPhysicalDeviceDisplacementMicromapFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDisplacementMicromapFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDisplacementMicromapFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDisplacementMicromapFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDisplacementMicromapFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceDisplacementMicromapFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDisplacementMicromapFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDisplacementMicromapFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDisplacementMicromapFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDisplacementMicromapFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDisplacementMicromapFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDisplacementMicromapFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDisplacementMicromapFeaturesNV` + public static VkPhysicalDeviceDisplacementMicromapFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDisplacementMicromapFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDisplacementMicromapFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDisplacementMicromapFeaturesNV` + public static VkPhysicalDeviceDisplacementMicromapFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDisplacementMicromapFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDisplacementMicromapFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDisplacementMicromapFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDisplacementMicromapFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDisplacementMicromapFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDisplacementMicromapFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDisplacementMicromapFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDisplacementMicromapFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDisplacementMicromapFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDisplacementMicromapFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDisplacementMicromapFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDisplacementMicromapFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDisplacementMicromapFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `displacementMicromap` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_displacementMicromap(MemorySegment segment, long index) { return (int) VH_displacementMicromap.get(segment, 0L, index); } + /// {@return `displacementMicromap`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_displacementMicromap(MemorySegment segment) { return VkPhysicalDeviceDisplacementMicromapFeaturesNV.get_displacementMicromap(segment, 0L); } + /// {@return `displacementMicromap` at the given index} + /// @param index the index + public @CType("VkBool32") int displacementMicromapAt(long index) { return VkPhysicalDeviceDisplacementMicromapFeaturesNV.get_displacementMicromap(this.segment(), index); } + /// {@return `displacementMicromap`} + public @CType("VkBool32") int displacementMicromap() { return VkPhysicalDeviceDisplacementMicromapFeaturesNV.get_displacementMicromap(this.segment()); } + /// Sets `displacementMicromap` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displacementMicromap(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_displacementMicromap.set(segment, 0L, index, value); } + /// Sets `displacementMicromap` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displacementMicromap(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDisplacementMicromapFeaturesNV.set_displacementMicromap(segment, 0L, value); } + /// Sets `displacementMicromap` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapFeaturesNV displacementMicromapAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDisplacementMicromapFeaturesNV.set_displacementMicromap(this.segment(), index, value); return this; } + /// Sets `displacementMicromap` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapFeaturesNV displacementMicromap(@CType("VkBool32") int value) { VkPhysicalDeviceDisplacementMicromapFeaturesNV.set_displacementMicromap(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDisplacementMicromapPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDisplacementMicromapPropertiesNV.java new file mode 100644 index 00000000..cac2d673 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceDisplacementMicromapPropertiesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxDisplacementMicromapSubdivisionLevel +/// [VarHandle][#VH_maxDisplacementMicromapSubdivisionLevel] - [Getter][#maxDisplacementMicromapSubdivisionLevel()] - [Setter][#maxDisplacementMicromapSubdivisionLevel(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDisplacementMicromapPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxDisplacementMicromapSubdivisionLevel; +/// } VkPhysicalDeviceDisplacementMicromapPropertiesNV; +/// ``` +public final class VkPhysicalDeviceDisplacementMicromapPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceDisplacementMicromapPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxDisplacementMicromapSubdivisionLevel") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxDisplacementMicromapSubdivisionLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDisplacementMicromapSubdivisionLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDisplacementMicromapSubdivisionLevel")); + + /// Creates `VkPhysicalDeviceDisplacementMicromapPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDisplacementMicromapPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDisplacementMicromapPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDisplacementMicromapPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDisplacementMicromapPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceDisplacementMicromapPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDisplacementMicromapPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDisplacementMicromapPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDisplacementMicromapPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDisplacementMicromapPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDisplacementMicromapPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDisplacementMicromapPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDisplacementMicromapPropertiesNV` + public static VkPhysicalDeviceDisplacementMicromapPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDisplacementMicromapPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDisplacementMicromapPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDisplacementMicromapPropertiesNV` + public static VkPhysicalDeviceDisplacementMicromapPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDisplacementMicromapPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDisplacementMicromapPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDisplacementMicromapPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDisplacementMicromapPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDisplacementMicromapPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDisplacementMicromapPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDisplacementMicromapPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDisplacementMicromapPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDisplacementMicromapPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDisplacementMicromapPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDisplacementMicromapPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDisplacementMicromapPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDisplacementMicromapPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `maxDisplacementMicromapSubdivisionLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDisplacementMicromapSubdivisionLevel(MemorySegment segment, long index) { return (int) VH_maxDisplacementMicromapSubdivisionLevel.get(segment, 0L, index); } + /// {@return `maxDisplacementMicromapSubdivisionLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDisplacementMicromapSubdivisionLevel(MemorySegment segment) { return VkPhysicalDeviceDisplacementMicromapPropertiesNV.get_maxDisplacementMicromapSubdivisionLevel(segment, 0L); } + /// {@return `maxDisplacementMicromapSubdivisionLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDisplacementMicromapSubdivisionLevelAt(long index) { return VkPhysicalDeviceDisplacementMicromapPropertiesNV.get_maxDisplacementMicromapSubdivisionLevel(this.segment(), index); } + /// {@return `maxDisplacementMicromapSubdivisionLevel`} + public @CType("uint32_t") int maxDisplacementMicromapSubdivisionLevel() { return VkPhysicalDeviceDisplacementMicromapPropertiesNV.get_maxDisplacementMicromapSubdivisionLevel(this.segment()); } + /// Sets `maxDisplacementMicromapSubdivisionLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDisplacementMicromapSubdivisionLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDisplacementMicromapSubdivisionLevel.set(segment, 0L, index, value); } + /// Sets `maxDisplacementMicromapSubdivisionLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDisplacementMicromapSubdivisionLevel(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDisplacementMicromapPropertiesNV.set_maxDisplacementMicromapSubdivisionLevel(segment, 0L, value); } + /// Sets `maxDisplacementMicromapSubdivisionLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapPropertiesNV maxDisplacementMicromapSubdivisionLevelAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDisplacementMicromapPropertiesNV.set_maxDisplacementMicromapSubdivisionLevel(this.segment(), index, value); return this; } + /// Sets `maxDisplacementMicromapSubdivisionLevel` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDisplacementMicromapPropertiesNV maxDisplacementMicromapSubdivisionLevel(@CType("uint32_t") int value) { VkPhysicalDeviceDisplacementMicromapPropertiesNV.set_maxDisplacementMicromapSubdivisionLevel(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExclusiveScissorFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExclusiveScissorFeaturesNV.java new file mode 100644 index 00000000..b78f0f01 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExclusiveScissorFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### exclusiveScissor +/// [VarHandle][#VH_exclusiveScissor] - [Getter][#exclusiveScissor()] - [Setter][#exclusiveScissor(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExclusiveScissorFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 exclusiveScissor; +/// } VkPhysicalDeviceExclusiveScissorFeaturesNV; +/// ``` +public final class VkPhysicalDeviceExclusiveScissorFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceExclusiveScissorFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("exclusiveScissor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `exclusiveScissor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_exclusiveScissor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("exclusiveScissor")); + + /// Creates `VkPhysicalDeviceExclusiveScissorFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExclusiveScissorFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExclusiveScissorFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExclusiveScissorFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExclusiveScissorFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceExclusiveScissorFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExclusiveScissorFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExclusiveScissorFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExclusiveScissorFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExclusiveScissorFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExclusiveScissorFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExclusiveScissorFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExclusiveScissorFeaturesNV` + public static VkPhysicalDeviceExclusiveScissorFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExclusiveScissorFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExclusiveScissorFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExclusiveScissorFeaturesNV` + public static VkPhysicalDeviceExclusiveScissorFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExclusiveScissorFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExclusiveScissorFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExclusiveScissorFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExclusiveScissorFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExclusiveScissorFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExclusiveScissorFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExclusiveScissorFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExclusiveScissorFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExclusiveScissorFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExclusiveScissorFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExclusiveScissorFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExclusiveScissorFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExclusiveScissorFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExclusiveScissorFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExclusiveScissorFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExclusiveScissorFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExclusiveScissorFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `exclusiveScissor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_exclusiveScissor(MemorySegment segment, long index) { return (int) VH_exclusiveScissor.get(segment, 0L, index); } + /// {@return `exclusiveScissor`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_exclusiveScissor(MemorySegment segment) { return VkPhysicalDeviceExclusiveScissorFeaturesNV.get_exclusiveScissor(segment, 0L); } + /// {@return `exclusiveScissor` at the given index} + /// @param index the index + public @CType("VkBool32") int exclusiveScissorAt(long index) { return VkPhysicalDeviceExclusiveScissorFeaturesNV.get_exclusiveScissor(this.segment(), index); } + /// {@return `exclusiveScissor`} + public @CType("VkBool32") int exclusiveScissor() { return VkPhysicalDeviceExclusiveScissorFeaturesNV.get_exclusiveScissor(this.segment()); } + /// Sets `exclusiveScissor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_exclusiveScissor(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_exclusiveScissor.set(segment, 0L, index, value); } + /// Sets `exclusiveScissor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_exclusiveScissor(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExclusiveScissorFeaturesNV.set_exclusiveScissor(segment, 0L, value); } + /// Sets `exclusiveScissor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExclusiveScissorFeaturesNV exclusiveScissorAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExclusiveScissorFeaturesNV.set_exclusiveScissor(this.segment(), index, value); return this; } + /// Sets `exclusiveScissor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExclusiveScissorFeaturesNV exclusiveScissor(@CType("VkBool32") int value) { VkPhysicalDeviceExclusiveScissorFeaturesNV.set_exclusiveScissor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.java new file mode 100644 index 00000000..e001cda1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### extendedSparseAddressSpace +/// [VarHandle][#VH_extendedSparseAddressSpace] - [Getter][#extendedSparseAddressSpace()] - [Setter][#extendedSparseAddressSpace(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 extendedSparseAddressSpace; +/// } VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV; +/// ``` +public final class VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("extendedSparseAddressSpace") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `extendedSparseAddressSpace` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedSparseAddressSpace = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedSparseAddressSpace")); + + /// Creates `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV` + public static VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV` + public static VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `extendedSparseAddressSpace` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_extendedSparseAddressSpace(MemorySegment segment, long index) { return (int) VH_extendedSparseAddressSpace.get(segment, 0L, index); } + /// {@return `extendedSparseAddressSpace`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_extendedSparseAddressSpace(MemorySegment segment) { return VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.get_extendedSparseAddressSpace(segment, 0L); } + /// {@return `extendedSparseAddressSpace` at the given index} + /// @param index the index + public @CType("VkBool32") int extendedSparseAddressSpaceAt(long index) { return VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.get_extendedSparseAddressSpace(this.segment(), index); } + /// {@return `extendedSparseAddressSpace`} + public @CType("VkBool32") int extendedSparseAddressSpace() { return VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.get_extendedSparseAddressSpace(this.segment()); } + /// Sets `extendedSparseAddressSpace` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedSparseAddressSpace(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_extendedSparseAddressSpace.set(segment, 0L, index, value); } + /// Sets `extendedSparseAddressSpace` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedSparseAddressSpace(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.set_extendedSparseAddressSpace(segment, 0L, value); } + /// Sets `extendedSparseAddressSpace` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV extendedSparseAddressSpaceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.set_extendedSparseAddressSpace(this.segment(), index, value); return this; } + /// Sets `extendedSparseAddressSpace` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV extendedSparseAddressSpace(@CType("VkBool32") int value) { VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.set_extendedSparseAddressSpace(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.java new file mode 100644 index 00000000..39d578d6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### extendedSparseAddressSpaceSize +/// [VarHandle][#VH_extendedSparseAddressSpaceSize] - [Getter][#extendedSparseAddressSpaceSize()] - [Setter][#extendedSparseAddressSpaceSize(long)] +/// ### extendedSparseImageUsageFlags +/// [VarHandle][#VH_extendedSparseImageUsageFlags] - [Getter][#extendedSparseImageUsageFlags()] - [Setter][#extendedSparseImageUsageFlags(int)] +/// ### extendedSparseBufferUsageFlags +/// [VarHandle][#VH_extendedSparseBufferUsageFlags] - [Getter][#extendedSparseBufferUsageFlags()] - [Setter][#extendedSparseBufferUsageFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize extendedSparseAddressSpaceSize; +/// VkImageUsageFlags extendedSparseImageUsageFlags; +/// VkBufferUsageFlags extendedSparseBufferUsageFlags; +/// } VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV; +/// ``` +public final class VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("extendedSparseAddressSpaceSize"), + ValueLayout.JAVA_INT.withName("extendedSparseImageUsageFlags"), + ValueLayout.JAVA_INT.withName("extendedSparseBufferUsageFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `extendedSparseAddressSpaceSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_extendedSparseAddressSpaceSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedSparseAddressSpaceSize")); + /// The [VarHandle] of `extendedSparseImageUsageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedSparseImageUsageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedSparseImageUsageFlags")); + /// The [VarHandle] of `extendedSparseBufferUsageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extendedSparseBufferUsageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extendedSparseBufferUsageFlags")); + + /// Creates `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV` + public static VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV` + public static VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `extendedSparseAddressSpaceSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_extendedSparseAddressSpaceSize(MemorySegment segment, long index) { return (long) VH_extendedSparseAddressSpaceSize.get(segment, 0L, index); } + /// {@return `extendedSparseAddressSpaceSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_extendedSparseAddressSpaceSize(MemorySegment segment) { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_extendedSparseAddressSpaceSize(segment, 0L); } + /// {@return `extendedSparseAddressSpaceSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long extendedSparseAddressSpaceSizeAt(long index) { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_extendedSparseAddressSpaceSize(this.segment(), index); } + /// {@return `extendedSparseAddressSpaceSize`} + public @CType("VkDeviceSize") long extendedSparseAddressSpaceSize() { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_extendedSparseAddressSpaceSize(this.segment()); } + /// Sets `extendedSparseAddressSpaceSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedSparseAddressSpaceSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_extendedSparseAddressSpaceSize.set(segment, 0L, index, value); } + /// Sets `extendedSparseAddressSpaceSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedSparseAddressSpaceSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_extendedSparseAddressSpaceSize(segment, 0L, value); } + /// Sets `extendedSparseAddressSpaceSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV extendedSparseAddressSpaceSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_extendedSparseAddressSpaceSize(this.segment(), index, value); return this; } + /// Sets `extendedSparseAddressSpaceSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV extendedSparseAddressSpaceSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_extendedSparseAddressSpaceSize(this.segment(), value); return this; } + + /// {@return `extendedSparseImageUsageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_extendedSparseImageUsageFlags(MemorySegment segment, long index) { return (int) VH_extendedSparseImageUsageFlags.get(segment, 0L, index); } + /// {@return `extendedSparseImageUsageFlags`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_extendedSparseImageUsageFlags(MemorySegment segment) { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_extendedSparseImageUsageFlags(segment, 0L); } + /// {@return `extendedSparseImageUsageFlags` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int extendedSparseImageUsageFlagsAt(long index) { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_extendedSparseImageUsageFlags(this.segment(), index); } + /// {@return `extendedSparseImageUsageFlags`} + public @CType("VkImageUsageFlags") int extendedSparseImageUsageFlags() { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_extendedSparseImageUsageFlags(this.segment()); } + /// Sets `extendedSparseImageUsageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedSparseImageUsageFlags(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_extendedSparseImageUsageFlags.set(segment, 0L, index, value); } + /// Sets `extendedSparseImageUsageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedSparseImageUsageFlags(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_extendedSparseImageUsageFlags(segment, 0L, value); } + /// Sets `extendedSparseImageUsageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV extendedSparseImageUsageFlagsAt(long index, @CType("VkImageUsageFlags") int value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_extendedSparseImageUsageFlags(this.segment(), index, value); return this; } + /// Sets `extendedSparseImageUsageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV extendedSparseImageUsageFlags(@CType("VkImageUsageFlags") int value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_extendedSparseImageUsageFlags(this.segment(), value); return this; } + + /// {@return `extendedSparseBufferUsageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferUsageFlags") int get_extendedSparseBufferUsageFlags(MemorySegment segment, long index) { return (int) VH_extendedSparseBufferUsageFlags.get(segment, 0L, index); } + /// {@return `extendedSparseBufferUsageFlags`} + /// @param segment the segment of the struct + public static @CType("VkBufferUsageFlags") int get_extendedSparseBufferUsageFlags(MemorySegment segment) { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_extendedSparseBufferUsageFlags(segment, 0L); } + /// {@return `extendedSparseBufferUsageFlags` at the given index} + /// @param index the index + public @CType("VkBufferUsageFlags") int extendedSparseBufferUsageFlagsAt(long index) { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_extendedSparseBufferUsageFlags(this.segment(), index); } + /// {@return `extendedSparseBufferUsageFlags`} + public @CType("VkBufferUsageFlags") int extendedSparseBufferUsageFlags() { return VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.get_extendedSparseBufferUsageFlags(this.segment()); } + /// Sets `extendedSparseBufferUsageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extendedSparseBufferUsageFlags(MemorySegment segment, long index, @CType("VkBufferUsageFlags") int value) { VH_extendedSparseBufferUsageFlags.set(segment, 0L, index, value); } + /// Sets `extendedSparseBufferUsageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extendedSparseBufferUsageFlags(MemorySegment segment, @CType("VkBufferUsageFlags") int value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_extendedSparseBufferUsageFlags(segment, 0L, value); } + /// Sets `extendedSparseBufferUsageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV extendedSparseBufferUsageFlagsAt(long index, @CType("VkBufferUsageFlags") int value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_extendedSparseBufferUsageFlags(this.segment(), index, value); return this; } + /// Sets `extendedSparseBufferUsageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV extendedSparseBufferUsageFlags(@CType("VkBufferUsageFlags") int value) { VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.set_extendedSparseBufferUsageFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.java new file mode 100644 index 00000000..0ef042c2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### externalMemoryRDMA +/// [VarHandle][#VH_externalMemoryRDMA] - [Getter][#externalMemoryRDMA()] - [Setter][#externalMemoryRDMA(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalMemoryRDMAFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 externalMemoryRDMA; +/// } VkPhysicalDeviceExternalMemoryRDMAFeaturesNV; +/// ``` +public final class VkPhysicalDeviceExternalMemoryRDMAFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("externalMemoryRDMA") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `externalMemoryRDMA` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_externalMemoryRDMA = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalMemoryRDMA")); + + /// Creates `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalMemoryRDMAFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemoryRDMAFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemoryRDMAFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemoryRDMAFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemoryRDMAFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemoryRDMAFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemoryRDMAFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV` + public static VkPhysicalDeviceExternalMemoryRDMAFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalMemoryRDMAFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalMemoryRDMAFeaturesNV` + public static VkPhysicalDeviceExternalMemoryRDMAFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalMemoryRDMAFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryRDMAFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryRDMAFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryRDMAFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryRDMAFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `externalMemoryRDMA` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_externalMemoryRDMA(MemorySegment segment, long index) { return (int) VH_externalMemoryRDMA.get(segment, 0L, index); } + /// {@return `externalMemoryRDMA`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_externalMemoryRDMA(MemorySegment segment) { return VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.get_externalMemoryRDMA(segment, 0L); } + /// {@return `externalMemoryRDMA` at the given index} + /// @param index the index + public @CType("VkBool32") int externalMemoryRDMAAt(long index) { return VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.get_externalMemoryRDMA(this.segment(), index); } + /// {@return `externalMemoryRDMA`} + public @CType("VkBool32") int externalMemoryRDMA() { return VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.get_externalMemoryRDMA(this.segment()); } + /// Sets `externalMemoryRDMA` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalMemoryRDMA(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_externalMemoryRDMA.set(segment, 0L, index, value); } + /// Sets `externalMemoryRDMA` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalMemoryRDMA(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.set_externalMemoryRDMA(segment, 0L, value); } + /// Sets `externalMemoryRDMA` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryRDMAFeaturesNV externalMemoryRDMAAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.set_externalMemoryRDMA(this.segment(), index, value); return this; } + /// Sets `externalMemoryRDMA` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryRDMAFeaturesNV externalMemoryRDMA(@CType("VkBool32") int value) { VkPhysicalDeviceExternalMemoryRDMAFeaturesNV.set_externalMemoryRDMA(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalMemorySciBufFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalMemorySciBufFeaturesNV.java new file mode 100644 index 00000000..d39dccd2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalMemorySciBufFeaturesNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sciBufImport +/// [VarHandle][#VH_sciBufImport] - [Getter][#sciBufImport()] - [Setter][#sciBufImport(int)] +/// ### sciBufExport +/// [VarHandle][#VH_sciBufExport] - [Getter][#sciBufExport()] - [Setter][#sciBufExport(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalMemorySciBufFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 sciBufImport; +/// VkBool32 sciBufExport; +/// } VkPhysicalDeviceExternalMemorySciBufFeaturesNV; +/// ``` +public final class VkPhysicalDeviceExternalMemorySciBufFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalMemorySciBufFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sciBufImport"), + ValueLayout.JAVA_INT.withName("sciBufExport") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sciBufImport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sciBufImport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sciBufImport")); + /// The [VarHandle] of `sciBufExport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sciBufExport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sciBufExport")); + + /// Creates `VkPhysicalDeviceExternalMemorySciBufFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalMemorySciBufFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalMemorySciBufFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemorySciBufFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemorySciBufFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceExternalMemorySciBufFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemorySciBufFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemorySciBufFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalMemorySciBufFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemorySciBufFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemorySciBufFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalMemorySciBufFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalMemorySciBufFeaturesNV` + public static VkPhysicalDeviceExternalMemorySciBufFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalMemorySciBufFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalMemorySciBufFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalMemorySciBufFeaturesNV` + public static VkPhysicalDeviceExternalMemorySciBufFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalMemorySciBufFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemorySciBufFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemorySciBufFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemorySciBufFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemorySciBufFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `sciBufImport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sciBufImport(MemorySegment segment, long index) { return (int) VH_sciBufImport.get(segment, 0L, index); } + /// {@return `sciBufImport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sciBufImport(MemorySegment segment) { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_sciBufImport(segment, 0L); } + /// {@return `sciBufImport` at the given index} + /// @param index the index + public @CType("VkBool32") int sciBufImportAt(long index) { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_sciBufImport(this.segment(), index); } + /// {@return `sciBufImport`} + public @CType("VkBool32") int sciBufImport() { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_sciBufImport(this.segment()); } + /// Sets `sciBufImport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sciBufImport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sciBufImport.set(segment, 0L, index, value); } + /// Sets `sciBufImport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sciBufImport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_sciBufImport(segment, 0L, value); } + /// Sets `sciBufImport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemorySciBufFeaturesNV sciBufImportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_sciBufImport(this.segment(), index, value); return this; } + /// Sets `sciBufImport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemorySciBufFeaturesNV sciBufImport(@CType("VkBool32") int value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_sciBufImport(this.segment(), value); return this; } + + /// {@return `sciBufExport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sciBufExport(MemorySegment segment, long index) { return (int) VH_sciBufExport.get(segment, 0L, index); } + /// {@return `sciBufExport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sciBufExport(MemorySegment segment) { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_sciBufExport(segment, 0L); } + /// {@return `sciBufExport` at the given index} + /// @param index the index + public @CType("VkBool32") int sciBufExportAt(long index) { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_sciBufExport(this.segment(), index); } + /// {@return `sciBufExport`} + public @CType("VkBool32") int sciBufExport() { return VkPhysicalDeviceExternalMemorySciBufFeaturesNV.get_sciBufExport(this.segment()); } + /// Sets `sciBufExport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sciBufExport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sciBufExport.set(segment, 0L, index, value); } + /// Sets `sciBufExport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sciBufExport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_sciBufExport(segment, 0L, value); } + /// Sets `sciBufExport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemorySciBufFeaturesNV sciBufExportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_sciBufExport(this.segment(), index, value); return this; } + /// Sets `sciBufExport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemorySciBufFeaturesNV sciBufExport(@CType("VkBool32") int value) { VkPhysicalDeviceExternalMemorySciBufFeaturesNV.set_sciBufExport(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalSciSync2FeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalSciSync2FeaturesNV.java new file mode 100644 index 00000000..203910ad --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalSciSync2FeaturesNV.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sciSyncFence +/// [VarHandle][#VH_sciSyncFence] - [Getter][#sciSyncFence()] - [Setter][#sciSyncFence(int)] +/// ### sciSyncSemaphore2 +/// [VarHandle][#VH_sciSyncSemaphore2] - [Getter][#sciSyncSemaphore2()] - [Setter][#sciSyncSemaphore2(int)] +/// ### sciSyncImport +/// [VarHandle][#VH_sciSyncImport] - [Getter][#sciSyncImport()] - [Setter][#sciSyncImport(int)] +/// ### sciSyncExport +/// [VarHandle][#VH_sciSyncExport] - [Getter][#sciSyncExport()] - [Setter][#sciSyncExport(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalSciSync2FeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 sciSyncFence; +/// VkBool32 sciSyncSemaphore2; +/// VkBool32 sciSyncImport; +/// VkBool32 sciSyncExport; +/// } VkPhysicalDeviceExternalSciSync2FeaturesNV; +/// ``` +public final class VkPhysicalDeviceExternalSciSync2FeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalSciSync2FeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sciSyncFence"), + ValueLayout.JAVA_INT.withName("sciSyncSemaphore2"), + ValueLayout.JAVA_INT.withName("sciSyncImport"), + ValueLayout.JAVA_INT.withName("sciSyncExport") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sciSyncFence` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sciSyncFence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sciSyncFence")); + /// The [VarHandle] of `sciSyncSemaphore2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sciSyncSemaphore2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sciSyncSemaphore2")); + /// The [VarHandle] of `sciSyncImport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sciSyncImport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sciSyncImport")); + /// The [VarHandle] of `sciSyncExport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sciSyncExport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sciSyncExport")); + + /// Creates `VkPhysicalDeviceExternalSciSync2FeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalSciSync2FeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalSciSync2FeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalSciSync2FeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalSciSync2FeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceExternalSciSync2FeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalSciSync2FeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalSciSync2FeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalSciSync2FeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalSciSync2FeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalSciSync2FeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalSciSync2FeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalSciSync2FeaturesNV` + public static VkPhysicalDeviceExternalSciSync2FeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalSciSync2FeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalSciSync2FeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalSciSync2FeaturesNV` + public static VkPhysicalDeviceExternalSciSync2FeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalSciSync2FeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `sciSyncFence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sciSyncFence(MemorySegment segment, long index) { return (int) VH_sciSyncFence.get(segment, 0L, index); } + /// {@return `sciSyncFence`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sciSyncFence(MemorySegment segment) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncFence(segment, 0L); } + /// {@return `sciSyncFence` at the given index} + /// @param index the index + public @CType("VkBool32") int sciSyncFenceAt(long index) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncFence(this.segment(), index); } + /// {@return `sciSyncFence`} + public @CType("VkBool32") int sciSyncFence() { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncFence(this.segment()); } + /// Sets `sciSyncFence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sciSyncFence(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sciSyncFence.set(segment, 0L, index, value); } + /// Sets `sciSyncFence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sciSyncFence(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncFence(segment, 0L, value); } + /// Sets `sciSyncFence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV sciSyncFenceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncFence(this.segment(), index, value); return this; } + /// Sets `sciSyncFence` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV sciSyncFence(@CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncFence(this.segment(), value); return this; } + + /// {@return `sciSyncSemaphore2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sciSyncSemaphore2(MemorySegment segment, long index) { return (int) VH_sciSyncSemaphore2.get(segment, 0L, index); } + /// {@return `sciSyncSemaphore2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sciSyncSemaphore2(MemorySegment segment) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncSemaphore2(segment, 0L); } + /// {@return `sciSyncSemaphore2` at the given index} + /// @param index the index + public @CType("VkBool32") int sciSyncSemaphore2At(long index) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncSemaphore2(this.segment(), index); } + /// {@return `sciSyncSemaphore2`} + public @CType("VkBool32") int sciSyncSemaphore2() { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncSemaphore2(this.segment()); } + /// Sets `sciSyncSemaphore2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sciSyncSemaphore2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sciSyncSemaphore2.set(segment, 0L, index, value); } + /// Sets `sciSyncSemaphore2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sciSyncSemaphore2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncSemaphore2(segment, 0L, value); } + /// Sets `sciSyncSemaphore2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV sciSyncSemaphore2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncSemaphore2(this.segment(), index, value); return this; } + /// Sets `sciSyncSemaphore2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV sciSyncSemaphore2(@CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncSemaphore2(this.segment(), value); return this; } + + /// {@return `sciSyncImport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sciSyncImport(MemorySegment segment, long index) { return (int) VH_sciSyncImport.get(segment, 0L, index); } + /// {@return `sciSyncImport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sciSyncImport(MemorySegment segment) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncImport(segment, 0L); } + /// {@return `sciSyncImport` at the given index} + /// @param index the index + public @CType("VkBool32") int sciSyncImportAt(long index) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncImport(this.segment(), index); } + /// {@return `sciSyncImport`} + public @CType("VkBool32") int sciSyncImport() { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncImport(this.segment()); } + /// Sets `sciSyncImport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sciSyncImport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sciSyncImport.set(segment, 0L, index, value); } + /// Sets `sciSyncImport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sciSyncImport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncImport(segment, 0L, value); } + /// Sets `sciSyncImport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV sciSyncImportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncImport(this.segment(), index, value); return this; } + /// Sets `sciSyncImport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV sciSyncImport(@CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncImport(this.segment(), value); return this; } + + /// {@return `sciSyncExport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sciSyncExport(MemorySegment segment, long index) { return (int) VH_sciSyncExport.get(segment, 0L, index); } + /// {@return `sciSyncExport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sciSyncExport(MemorySegment segment) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncExport(segment, 0L); } + /// {@return `sciSyncExport` at the given index} + /// @param index the index + public @CType("VkBool32") int sciSyncExportAt(long index) { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncExport(this.segment(), index); } + /// {@return `sciSyncExport`} + public @CType("VkBool32") int sciSyncExport() { return VkPhysicalDeviceExternalSciSync2FeaturesNV.get_sciSyncExport(this.segment()); } + /// Sets `sciSyncExport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sciSyncExport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sciSyncExport.set(segment, 0L, index, value); } + /// Sets `sciSyncExport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sciSyncExport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncExport(segment, 0L, value); } + /// Sets `sciSyncExport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV sciSyncExportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncExport(this.segment(), index, value); return this; } + /// Sets `sciSyncExport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSync2FeaturesNV sciSyncExport(@CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSync2FeaturesNV.set_sciSyncExport(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalSciSyncFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalSciSyncFeaturesNV.java new file mode 100644 index 00000000..8af6e660 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceExternalSciSyncFeaturesNV.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sciSyncFence +/// [VarHandle][#VH_sciSyncFence] - [Getter][#sciSyncFence()] - [Setter][#sciSyncFence(int)] +/// ### sciSyncSemaphore +/// [VarHandle][#VH_sciSyncSemaphore] - [Getter][#sciSyncSemaphore()] - [Setter][#sciSyncSemaphore(int)] +/// ### sciSyncImport +/// [VarHandle][#VH_sciSyncImport] - [Getter][#sciSyncImport()] - [Setter][#sciSyncImport(int)] +/// ### sciSyncExport +/// [VarHandle][#VH_sciSyncExport] - [Getter][#sciSyncExport()] - [Setter][#sciSyncExport(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalSciSyncFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 sciSyncFence; +/// VkBool32 sciSyncSemaphore; +/// VkBool32 sciSyncImport; +/// VkBool32 sciSyncExport; +/// } VkPhysicalDeviceExternalSciSyncFeaturesNV; +/// ``` +public final class VkPhysicalDeviceExternalSciSyncFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalSciSyncFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sciSyncFence"), + ValueLayout.JAVA_INT.withName("sciSyncSemaphore"), + ValueLayout.JAVA_INT.withName("sciSyncImport"), + ValueLayout.JAVA_INT.withName("sciSyncExport") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sciSyncFence` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sciSyncFence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sciSyncFence")); + /// The [VarHandle] of `sciSyncSemaphore` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sciSyncSemaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sciSyncSemaphore")); + /// The [VarHandle] of `sciSyncImport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sciSyncImport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sciSyncImport")); + /// The [VarHandle] of `sciSyncExport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sciSyncExport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sciSyncExport")); + + /// Creates `VkPhysicalDeviceExternalSciSyncFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalSciSyncFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalSciSyncFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalSciSyncFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalSciSyncFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceExternalSciSyncFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalSciSyncFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalSciSyncFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalSciSyncFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalSciSyncFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalSciSyncFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalSciSyncFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalSciSyncFeaturesNV` + public static VkPhysicalDeviceExternalSciSyncFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalSciSyncFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalSciSyncFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalSciSyncFeaturesNV` + public static VkPhysicalDeviceExternalSciSyncFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalSciSyncFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `sciSyncFence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sciSyncFence(MemorySegment segment, long index) { return (int) VH_sciSyncFence.get(segment, 0L, index); } + /// {@return `sciSyncFence`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sciSyncFence(MemorySegment segment) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncFence(segment, 0L); } + /// {@return `sciSyncFence` at the given index} + /// @param index the index + public @CType("VkBool32") int sciSyncFenceAt(long index) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncFence(this.segment(), index); } + /// {@return `sciSyncFence`} + public @CType("VkBool32") int sciSyncFence() { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncFence(this.segment()); } + /// Sets `sciSyncFence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sciSyncFence(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sciSyncFence.set(segment, 0L, index, value); } + /// Sets `sciSyncFence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sciSyncFence(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncFence(segment, 0L, value); } + /// Sets `sciSyncFence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV sciSyncFenceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncFence(this.segment(), index, value); return this; } + /// Sets `sciSyncFence` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV sciSyncFence(@CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncFence(this.segment(), value); return this; } + + /// {@return `sciSyncSemaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sciSyncSemaphore(MemorySegment segment, long index) { return (int) VH_sciSyncSemaphore.get(segment, 0L, index); } + /// {@return `sciSyncSemaphore`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sciSyncSemaphore(MemorySegment segment) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncSemaphore(segment, 0L); } + /// {@return `sciSyncSemaphore` at the given index} + /// @param index the index + public @CType("VkBool32") int sciSyncSemaphoreAt(long index) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncSemaphore(this.segment(), index); } + /// {@return `sciSyncSemaphore`} + public @CType("VkBool32") int sciSyncSemaphore() { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncSemaphore(this.segment()); } + /// Sets `sciSyncSemaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sciSyncSemaphore(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sciSyncSemaphore.set(segment, 0L, index, value); } + /// Sets `sciSyncSemaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sciSyncSemaphore(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncSemaphore(segment, 0L, value); } + /// Sets `sciSyncSemaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV sciSyncSemaphoreAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncSemaphore(this.segment(), index, value); return this; } + /// Sets `sciSyncSemaphore` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV sciSyncSemaphore(@CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncSemaphore(this.segment(), value); return this; } + + /// {@return `sciSyncImport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sciSyncImport(MemorySegment segment, long index) { return (int) VH_sciSyncImport.get(segment, 0L, index); } + /// {@return `sciSyncImport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sciSyncImport(MemorySegment segment) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncImport(segment, 0L); } + /// {@return `sciSyncImport` at the given index} + /// @param index the index + public @CType("VkBool32") int sciSyncImportAt(long index) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncImport(this.segment(), index); } + /// {@return `sciSyncImport`} + public @CType("VkBool32") int sciSyncImport() { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncImport(this.segment()); } + /// Sets `sciSyncImport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sciSyncImport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sciSyncImport.set(segment, 0L, index, value); } + /// Sets `sciSyncImport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sciSyncImport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncImport(segment, 0L, value); } + /// Sets `sciSyncImport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV sciSyncImportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncImport(this.segment(), index, value); return this; } + /// Sets `sciSyncImport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV sciSyncImport(@CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncImport(this.segment(), value); return this; } + + /// {@return `sciSyncExport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sciSyncExport(MemorySegment segment, long index) { return (int) VH_sciSyncExport.get(segment, 0L, index); } + /// {@return `sciSyncExport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sciSyncExport(MemorySegment segment) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncExport(segment, 0L); } + /// {@return `sciSyncExport` at the given index} + /// @param index the index + public @CType("VkBool32") int sciSyncExportAt(long index) { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncExport(this.segment(), index); } + /// {@return `sciSyncExport`} + public @CType("VkBool32") int sciSyncExport() { return VkPhysicalDeviceExternalSciSyncFeaturesNV.get_sciSyncExport(this.segment()); } + /// Sets `sciSyncExport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sciSyncExport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sciSyncExport.set(segment, 0L, index, value); } + /// Sets `sciSyncExport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sciSyncExport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncExport(segment, 0L, value); } + /// Sets `sciSyncExport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV sciSyncExportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncExport(this.segment(), index, value); return this; } + /// Sets `sciSyncExport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSciSyncFeaturesNV sciSyncExport(@CType("VkBool32") int value) { VkPhysicalDeviceExternalSciSyncFeaturesNV.set_sciSyncExport(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.java new file mode 100644 index 00000000..88a9b1aa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fragmentShadingRateEnums +/// [VarHandle][#VH_fragmentShadingRateEnums] - [Getter][#fragmentShadingRateEnums()] - [Setter][#fragmentShadingRateEnums(int)] +/// ### supersampleFragmentShadingRates +/// [VarHandle][#VH_supersampleFragmentShadingRates] - [Getter][#supersampleFragmentShadingRates()] - [Setter][#supersampleFragmentShadingRates(int)] +/// ### noInvocationFragmentShadingRates +/// [VarHandle][#VH_noInvocationFragmentShadingRates] - [Getter][#noInvocationFragmentShadingRates()] - [Setter][#noInvocationFragmentShadingRates(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 fragmentShadingRateEnums; +/// VkBool32 supersampleFragmentShadingRates; +/// VkBool32 noInvocationFragmentShadingRates; +/// } VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV; +/// ``` +public final class VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateEnums"), + ValueLayout.JAVA_INT.withName("supersampleFragmentShadingRates"), + ValueLayout.JAVA_INT.withName("noInvocationFragmentShadingRates") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fragmentShadingRateEnums` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateEnums = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateEnums")); + /// The [VarHandle] of `supersampleFragmentShadingRates` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supersampleFragmentShadingRates = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supersampleFragmentShadingRates")); + /// The [VarHandle] of `noInvocationFragmentShadingRates` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_noInvocationFragmentShadingRates = LAYOUT.arrayElementVarHandle(PathElement.groupElement("noInvocationFragmentShadingRates")); + + /// Creates `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV` + public static VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV` + public static VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateEnums` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateEnums(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateEnums.get(segment, 0L, index); } + /// {@return `fragmentShadingRateEnums`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateEnums(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_fragmentShadingRateEnums(segment, 0L); } + /// {@return `fragmentShadingRateEnums` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateEnumsAt(long index) { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_fragmentShadingRateEnums(this.segment(), index); } + /// {@return `fragmentShadingRateEnums`} + public @CType("VkBool32") int fragmentShadingRateEnums() { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_fragmentShadingRateEnums(this.segment()); } + /// Sets `fragmentShadingRateEnums` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateEnums(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateEnums.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateEnums` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateEnums(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_fragmentShadingRateEnums(segment, 0L, value); } + /// Sets `fragmentShadingRateEnums` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV fragmentShadingRateEnumsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_fragmentShadingRateEnums(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateEnums` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV fragmentShadingRateEnums(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_fragmentShadingRateEnums(this.segment(), value); return this; } + + /// {@return `supersampleFragmentShadingRates` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_supersampleFragmentShadingRates(MemorySegment segment, long index) { return (int) VH_supersampleFragmentShadingRates.get(segment, 0L, index); } + /// {@return `supersampleFragmentShadingRates`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_supersampleFragmentShadingRates(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_supersampleFragmentShadingRates(segment, 0L); } + /// {@return `supersampleFragmentShadingRates` at the given index} + /// @param index the index + public @CType("VkBool32") int supersampleFragmentShadingRatesAt(long index) { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_supersampleFragmentShadingRates(this.segment(), index); } + /// {@return `supersampleFragmentShadingRates`} + public @CType("VkBool32") int supersampleFragmentShadingRates() { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_supersampleFragmentShadingRates(this.segment()); } + /// Sets `supersampleFragmentShadingRates` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supersampleFragmentShadingRates(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_supersampleFragmentShadingRates.set(segment, 0L, index, value); } + /// Sets `supersampleFragmentShadingRates` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supersampleFragmentShadingRates(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_supersampleFragmentShadingRates(segment, 0L, value); } + /// Sets `supersampleFragmentShadingRates` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV supersampleFragmentShadingRatesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_supersampleFragmentShadingRates(this.segment(), index, value); return this; } + /// Sets `supersampleFragmentShadingRates` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV supersampleFragmentShadingRates(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_supersampleFragmentShadingRates(this.segment(), value); return this; } + + /// {@return `noInvocationFragmentShadingRates` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_noInvocationFragmentShadingRates(MemorySegment segment, long index) { return (int) VH_noInvocationFragmentShadingRates.get(segment, 0L, index); } + /// {@return `noInvocationFragmentShadingRates`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_noInvocationFragmentShadingRates(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_noInvocationFragmentShadingRates(segment, 0L); } + /// {@return `noInvocationFragmentShadingRates` at the given index} + /// @param index the index + public @CType("VkBool32") int noInvocationFragmentShadingRatesAt(long index) { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_noInvocationFragmentShadingRates(this.segment(), index); } + /// {@return `noInvocationFragmentShadingRates`} + public @CType("VkBool32") int noInvocationFragmentShadingRates() { return VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.get_noInvocationFragmentShadingRates(this.segment()); } + /// Sets `noInvocationFragmentShadingRates` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_noInvocationFragmentShadingRates(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_noInvocationFragmentShadingRates.set(segment, 0L, index, value); } + /// Sets `noInvocationFragmentShadingRates` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_noInvocationFragmentShadingRates(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_noInvocationFragmentShadingRates(segment, 0L, value); } + /// Sets `noInvocationFragmentShadingRates` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV noInvocationFragmentShadingRatesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_noInvocationFragmentShadingRates(this.segment(), index, value); return this; } + /// Sets `noInvocationFragmentShadingRates` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV noInvocationFragmentShadingRates(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.set_noInvocationFragmentShadingRates(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.java new file mode 100644 index 00000000..6623c03e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxFragmentShadingRateInvocationCount +/// [VarHandle][#VH_maxFragmentShadingRateInvocationCount] - [Getter][#maxFragmentShadingRateInvocationCount()] - [Setter][#maxFragmentShadingRateInvocationCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkSampleCountFlagBits maxFragmentShadingRateInvocationCount; +/// } VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV; +/// ``` +public final class VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxFragmentShadingRateInvocationCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxFragmentShadingRateInvocationCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFragmentShadingRateInvocationCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFragmentShadingRateInvocationCount")); + + /// Creates `VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV` + public static VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV` + public static VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `maxFragmentShadingRateInvocationCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_maxFragmentShadingRateInvocationCount(MemorySegment segment, long index) { return (int) VH_maxFragmentShadingRateInvocationCount.get(segment, 0L, index); } + /// {@return `maxFragmentShadingRateInvocationCount`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_maxFragmentShadingRateInvocationCount(MemorySegment segment) { return VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.get_maxFragmentShadingRateInvocationCount(segment, 0L); } + /// {@return `maxFragmentShadingRateInvocationCount` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int maxFragmentShadingRateInvocationCountAt(long index) { return VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.get_maxFragmentShadingRateInvocationCount(this.segment(), index); } + /// {@return `maxFragmentShadingRateInvocationCount`} + public @CType("VkSampleCountFlagBits") int maxFragmentShadingRateInvocationCount() { return VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.get_maxFragmentShadingRateInvocationCount(this.segment()); } + /// Sets `maxFragmentShadingRateInvocationCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentShadingRateInvocationCount(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_maxFragmentShadingRateInvocationCount.set(segment, 0L, index, value); } + /// Sets `maxFragmentShadingRateInvocationCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentShadingRateInvocationCount(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.set_maxFragmentShadingRateInvocationCount(segment, 0L, value); } + /// Sets `maxFragmentShadingRateInvocationCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV maxFragmentShadingRateInvocationCountAt(long index, @CType("VkSampleCountFlagBits") int value) { VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.set_maxFragmentShadingRateInvocationCount(this.segment(), index, value); return this; } + /// Sets `maxFragmentShadingRateInvocationCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV maxFragmentShadingRateInvocationCount(@CType("VkSampleCountFlagBits") int value) { VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.set_maxFragmentShadingRateInvocationCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceInheritedViewportScissorFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceInheritedViewportScissorFeaturesNV.java new file mode 100644 index 00000000..940e870a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceInheritedViewportScissorFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### inheritedViewportScissor2D +/// [VarHandle][#VH_inheritedViewportScissor2D] - [Getter][#inheritedViewportScissor2D()] - [Setter][#inheritedViewportScissor2D(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceInheritedViewportScissorFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 inheritedViewportScissor2D; +/// } VkPhysicalDeviceInheritedViewportScissorFeaturesNV; +/// ``` +public final class VkPhysicalDeviceInheritedViewportScissorFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceInheritedViewportScissorFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("inheritedViewportScissor2D") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `inheritedViewportScissor2D` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inheritedViewportScissor2D = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inheritedViewportScissor2D")); + + /// Creates `VkPhysicalDeviceInheritedViewportScissorFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceInheritedViewportScissorFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceInheritedViewportScissorFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInheritedViewportScissorFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInheritedViewportScissorFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceInheritedViewportScissorFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInheritedViewportScissorFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInheritedViewportScissorFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceInheritedViewportScissorFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInheritedViewportScissorFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInheritedViewportScissorFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceInheritedViewportScissorFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceInheritedViewportScissorFeaturesNV` + public static VkPhysicalDeviceInheritedViewportScissorFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceInheritedViewportScissorFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceInheritedViewportScissorFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceInheritedViewportScissorFeaturesNV` + public static VkPhysicalDeviceInheritedViewportScissorFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceInheritedViewportScissorFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceInheritedViewportScissorFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceInheritedViewportScissorFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceInheritedViewportScissorFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceInheritedViewportScissorFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInheritedViewportScissorFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceInheritedViewportScissorFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInheritedViewportScissorFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceInheritedViewportScissorFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceInheritedViewportScissorFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceInheritedViewportScissorFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceInheritedViewportScissorFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInheritedViewportScissorFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInheritedViewportScissorFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInheritedViewportScissorFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInheritedViewportScissorFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInheritedViewportScissorFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `inheritedViewportScissor2D` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_inheritedViewportScissor2D(MemorySegment segment, long index) { return (int) VH_inheritedViewportScissor2D.get(segment, 0L, index); } + /// {@return `inheritedViewportScissor2D`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_inheritedViewportScissor2D(MemorySegment segment) { return VkPhysicalDeviceInheritedViewportScissorFeaturesNV.get_inheritedViewportScissor2D(segment, 0L); } + /// {@return `inheritedViewportScissor2D` at the given index} + /// @param index the index + public @CType("VkBool32") int inheritedViewportScissor2DAt(long index) { return VkPhysicalDeviceInheritedViewportScissorFeaturesNV.get_inheritedViewportScissor2D(this.segment(), index); } + /// {@return `inheritedViewportScissor2D`} + public @CType("VkBool32") int inheritedViewportScissor2D() { return VkPhysicalDeviceInheritedViewportScissorFeaturesNV.get_inheritedViewportScissor2D(this.segment()); } + /// Sets `inheritedViewportScissor2D` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inheritedViewportScissor2D(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_inheritedViewportScissor2D.set(segment, 0L, index, value); } + /// Sets `inheritedViewportScissor2D` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inheritedViewportScissor2D(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceInheritedViewportScissorFeaturesNV.set_inheritedViewportScissor2D(segment, 0L, value); } + /// Sets `inheritedViewportScissor2D` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInheritedViewportScissorFeaturesNV inheritedViewportScissor2DAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceInheritedViewportScissorFeaturesNV.set_inheritedViewportScissor2D(this.segment(), index, value); return this; } + /// Sets `inheritedViewportScissor2D` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInheritedViewportScissorFeaturesNV inheritedViewportScissor2D(@CType("VkBool32") int value) { VkPhysicalDeviceInheritedViewportScissorFeaturesNV.set_inheritedViewportScissor2D(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceLinearColorAttachmentFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceLinearColorAttachmentFeaturesNV.java new file mode 100644 index 00000000..57103edd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceLinearColorAttachmentFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### linearColorAttachment +/// [VarHandle][#VH_linearColorAttachment] - [Getter][#linearColorAttachment()] - [Setter][#linearColorAttachment(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLinearColorAttachmentFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 linearColorAttachment; +/// } VkPhysicalDeviceLinearColorAttachmentFeaturesNV; +/// ``` +public final class VkPhysicalDeviceLinearColorAttachmentFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceLinearColorAttachmentFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("linearColorAttachment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `linearColorAttachment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_linearColorAttachment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("linearColorAttachment")); + + /// Creates `VkPhysicalDeviceLinearColorAttachmentFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLinearColorAttachmentFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLinearColorAttachmentFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLinearColorAttachmentFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLinearColorAttachmentFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceLinearColorAttachmentFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLinearColorAttachmentFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLinearColorAttachmentFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLinearColorAttachmentFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLinearColorAttachmentFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLinearColorAttachmentFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLinearColorAttachmentFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLinearColorAttachmentFeaturesNV` + public static VkPhysicalDeviceLinearColorAttachmentFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLinearColorAttachmentFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLinearColorAttachmentFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLinearColorAttachmentFeaturesNV` + public static VkPhysicalDeviceLinearColorAttachmentFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLinearColorAttachmentFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceLinearColorAttachmentFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceLinearColorAttachmentFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceLinearColorAttachmentFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceLinearColorAttachmentFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLinearColorAttachmentFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceLinearColorAttachmentFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLinearColorAttachmentFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceLinearColorAttachmentFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceLinearColorAttachmentFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceLinearColorAttachmentFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceLinearColorAttachmentFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLinearColorAttachmentFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLinearColorAttachmentFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLinearColorAttachmentFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLinearColorAttachmentFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLinearColorAttachmentFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `linearColorAttachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_linearColorAttachment(MemorySegment segment, long index) { return (int) VH_linearColorAttachment.get(segment, 0L, index); } + /// {@return `linearColorAttachment`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_linearColorAttachment(MemorySegment segment) { return VkPhysicalDeviceLinearColorAttachmentFeaturesNV.get_linearColorAttachment(segment, 0L); } + /// {@return `linearColorAttachment` at the given index} + /// @param index the index + public @CType("VkBool32") int linearColorAttachmentAt(long index) { return VkPhysicalDeviceLinearColorAttachmentFeaturesNV.get_linearColorAttachment(this.segment(), index); } + /// {@return `linearColorAttachment`} + public @CType("VkBool32") int linearColorAttachment() { return VkPhysicalDeviceLinearColorAttachmentFeaturesNV.get_linearColorAttachment(this.segment()); } + /// Sets `linearColorAttachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_linearColorAttachment(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_linearColorAttachment.set(segment, 0L, index, value); } + /// Sets `linearColorAttachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_linearColorAttachment(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLinearColorAttachmentFeaturesNV.set_linearColorAttachment(segment, 0L, value); } + /// Sets `linearColorAttachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLinearColorAttachmentFeaturesNV linearColorAttachmentAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLinearColorAttachmentFeaturesNV.set_linearColorAttachment(this.segment(), index, value); return this; } + /// Sets `linearColorAttachment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLinearColorAttachmentFeaturesNV linearColorAttachment(@CType("VkBool32") int value) { VkPhysicalDeviceLinearColorAttachmentFeaturesNV.set_linearColorAttachment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMemoryDecompressionFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMemoryDecompressionFeaturesNV.java new file mode 100644 index 00000000..751f5ace --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMemoryDecompressionFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryDecompression +/// [VarHandle][#VH_memoryDecompression] - [Getter][#memoryDecompression()] - [Setter][#memoryDecompression(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMemoryDecompressionFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 memoryDecompression; +/// } VkPhysicalDeviceMemoryDecompressionFeaturesNV; +/// ``` +public final class VkPhysicalDeviceMemoryDecompressionFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceMemoryDecompressionFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("memoryDecompression") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memoryDecompression` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryDecompression = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryDecompression")); + + /// Creates `VkPhysicalDeviceMemoryDecompressionFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMemoryDecompressionFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMemoryDecompressionFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryDecompressionFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryDecompressionFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceMemoryDecompressionFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryDecompressionFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryDecompressionFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMemoryDecompressionFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryDecompressionFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryDecompressionFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMemoryDecompressionFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMemoryDecompressionFeaturesNV` + public static VkPhysicalDeviceMemoryDecompressionFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMemoryDecompressionFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMemoryDecompressionFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMemoryDecompressionFeaturesNV` + public static VkPhysicalDeviceMemoryDecompressionFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMemoryDecompressionFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMemoryDecompressionFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMemoryDecompressionFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMemoryDecompressionFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMemoryDecompressionFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMemoryDecompressionFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMemoryDecompressionFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMemoryDecompressionFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMemoryDecompressionFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMemoryDecompressionFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryDecompressionFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryDecompressionFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryDecompressionFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryDecompression` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_memoryDecompression(MemorySegment segment, long index) { return (int) VH_memoryDecompression.get(segment, 0L, index); } + /// {@return `memoryDecompression`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_memoryDecompression(MemorySegment segment) { return VkPhysicalDeviceMemoryDecompressionFeaturesNV.get_memoryDecompression(segment, 0L); } + /// {@return `memoryDecompression` at the given index} + /// @param index the index + public @CType("VkBool32") int memoryDecompressionAt(long index) { return VkPhysicalDeviceMemoryDecompressionFeaturesNV.get_memoryDecompression(this.segment(), index); } + /// {@return `memoryDecompression`} + public @CType("VkBool32") int memoryDecompression() { return VkPhysicalDeviceMemoryDecompressionFeaturesNV.get_memoryDecompression(this.segment()); } + /// Sets `memoryDecompression` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryDecompression(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_memoryDecompression.set(segment, 0L, index, value); } + /// Sets `memoryDecompression` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryDecompression(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMemoryDecompressionFeaturesNV.set_memoryDecompression(segment, 0L, value); } + /// Sets `memoryDecompression` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionFeaturesNV memoryDecompressionAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMemoryDecompressionFeaturesNV.set_memoryDecompression(this.segment(), index, value); return this; } + /// Sets `memoryDecompression` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionFeaturesNV memoryDecompression(@CType("VkBool32") int value) { VkPhysicalDeviceMemoryDecompressionFeaturesNV.set_memoryDecompression(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMemoryDecompressionPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMemoryDecompressionPropertiesNV.java new file mode 100644 index 00000000..98eed46c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMemoryDecompressionPropertiesNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### decompressionMethods +/// [VarHandle][#VH_decompressionMethods] - [Getter][#decompressionMethods()] - [Setter][#decompressionMethods(long)] +/// ### maxDecompressionIndirectCount +/// [VarHandle][#VH_maxDecompressionIndirectCount] - [Getter][#maxDecompressionIndirectCount()] - [Setter][#maxDecompressionIndirectCount(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMemoryDecompressionPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkMemoryDecompressionMethodFlagsNV decompressionMethods; +/// uint64_t maxDecompressionIndirectCount; +/// } VkPhysicalDeviceMemoryDecompressionPropertiesNV; +/// ``` +public final class VkPhysicalDeviceMemoryDecompressionPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceMemoryDecompressionPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("decompressionMethods"), + ValueLayout.JAVA_LONG.withName("maxDecompressionIndirectCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `decompressionMethods` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_decompressionMethods = LAYOUT.arrayElementVarHandle(PathElement.groupElement("decompressionMethods")); + /// The [VarHandle] of `maxDecompressionIndirectCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxDecompressionIndirectCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDecompressionIndirectCount")); + + /// Creates `VkPhysicalDeviceMemoryDecompressionPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMemoryDecompressionPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMemoryDecompressionPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryDecompressionPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryDecompressionPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceMemoryDecompressionPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryDecompressionPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryDecompressionPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMemoryDecompressionPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryDecompressionPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryDecompressionPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMemoryDecompressionPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMemoryDecompressionPropertiesNV` + public static VkPhysicalDeviceMemoryDecompressionPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMemoryDecompressionPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMemoryDecompressionPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMemoryDecompressionPropertiesNV` + public static VkPhysicalDeviceMemoryDecompressionPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMemoryDecompressionPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `decompressionMethods` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMemoryDecompressionMethodFlagsNV") long get_decompressionMethods(MemorySegment segment, long index) { return (long) VH_decompressionMethods.get(segment, 0L, index); } + /// {@return `decompressionMethods`} + /// @param segment the segment of the struct + public static @CType("VkMemoryDecompressionMethodFlagsNV") long get_decompressionMethods(MemorySegment segment) { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_decompressionMethods(segment, 0L); } + /// {@return `decompressionMethods` at the given index} + /// @param index the index + public @CType("VkMemoryDecompressionMethodFlagsNV") long decompressionMethodsAt(long index) { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_decompressionMethods(this.segment(), index); } + /// {@return `decompressionMethods`} + public @CType("VkMemoryDecompressionMethodFlagsNV") long decompressionMethods() { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_decompressionMethods(this.segment()); } + /// Sets `decompressionMethods` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_decompressionMethods(MemorySegment segment, long index, @CType("VkMemoryDecompressionMethodFlagsNV") long value) { VH_decompressionMethods.set(segment, 0L, index, value); } + /// Sets `decompressionMethods` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_decompressionMethods(MemorySegment segment, @CType("VkMemoryDecompressionMethodFlagsNV") long value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_decompressionMethods(segment, 0L, value); } + /// Sets `decompressionMethods` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionPropertiesNV decompressionMethodsAt(long index, @CType("VkMemoryDecompressionMethodFlagsNV") long value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_decompressionMethods(this.segment(), index, value); return this; } + /// Sets `decompressionMethods` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionPropertiesNV decompressionMethods(@CType("VkMemoryDecompressionMethodFlagsNV") long value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_decompressionMethods(this.segment(), value); return this; } + + /// {@return `maxDecompressionIndirectCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxDecompressionIndirectCount(MemorySegment segment, long index) { return (long) VH_maxDecompressionIndirectCount.get(segment, 0L, index); } + /// {@return `maxDecompressionIndirectCount`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxDecompressionIndirectCount(MemorySegment segment) { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_maxDecompressionIndirectCount(segment, 0L); } + /// {@return `maxDecompressionIndirectCount` at the given index} + /// @param index the index + public @CType("uint64_t") long maxDecompressionIndirectCountAt(long index) { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_maxDecompressionIndirectCount(this.segment(), index); } + /// {@return `maxDecompressionIndirectCount`} + public @CType("uint64_t") long maxDecompressionIndirectCount() { return VkPhysicalDeviceMemoryDecompressionPropertiesNV.get_maxDecompressionIndirectCount(this.segment()); } + /// Sets `maxDecompressionIndirectCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDecompressionIndirectCount(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxDecompressionIndirectCount.set(segment, 0L, index, value); } + /// Sets `maxDecompressionIndirectCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDecompressionIndirectCount(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_maxDecompressionIndirectCount(segment, 0L, value); } + /// Sets `maxDecompressionIndirectCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionPropertiesNV maxDecompressionIndirectCountAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_maxDecompressionIndirectCount(this.segment(), index, value); return this; } + /// Sets `maxDecompressionIndirectCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryDecompressionPropertiesNV maxDecompressionIndirectCount(@CType("uint64_t") long value) { VkPhysicalDeviceMemoryDecompressionPropertiesNV.set_maxDecompressionIndirectCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMeshShaderFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMeshShaderFeaturesNV.java new file mode 100644 index 00000000..4b54acf3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMeshShaderFeaturesNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### taskShader +/// [VarHandle][#VH_taskShader] - [Getter][#taskShader()] - [Setter][#taskShader(int)] +/// ### meshShader +/// [VarHandle][#VH_meshShader] - [Getter][#meshShader()] - [Setter][#meshShader(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMeshShaderFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 taskShader; +/// VkBool32 meshShader; +/// } VkPhysicalDeviceMeshShaderFeaturesNV; +/// ``` +public final class VkPhysicalDeviceMeshShaderFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceMeshShaderFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("taskShader"), + ValueLayout.JAVA_INT.withName("meshShader") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `taskShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_taskShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("taskShader")); + /// The [VarHandle] of `meshShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_meshShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("meshShader")); + + /// Creates `VkPhysicalDeviceMeshShaderFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMeshShaderFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMeshShaderFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceMeshShaderFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMeshShaderFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMeshShaderFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMeshShaderFeaturesNV` + public static VkPhysicalDeviceMeshShaderFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMeshShaderFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMeshShaderFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMeshShaderFeaturesNV` + public static VkPhysicalDeviceMeshShaderFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMeshShaderFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMeshShaderFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMeshShaderFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `taskShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_taskShader(MemorySegment segment, long index) { return (int) VH_taskShader.get(segment, 0L, index); } + /// {@return `taskShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_taskShader(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesNV.get_taskShader(segment, 0L); } + /// {@return `taskShader` at the given index} + /// @param index the index + public @CType("VkBool32") int taskShaderAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesNV.get_taskShader(this.segment(), index); } + /// {@return `taskShader`} + public @CType("VkBool32") int taskShader() { return VkPhysicalDeviceMeshShaderFeaturesNV.get_taskShader(this.segment()); } + /// Sets `taskShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_taskShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_taskShader.set(segment, 0L, index, value); } + /// Sets `taskShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_taskShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_taskShader(segment, 0L, value); } + /// Sets `taskShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesNV taskShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_taskShader(this.segment(), index, value); return this; } + /// Sets `taskShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesNV taskShader(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_taskShader(this.segment(), value); return this; } + + /// {@return `meshShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_meshShader(MemorySegment segment, long index) { return (int) VH_meshShader.get(segment, 0L, index); } + /// {@return `meshShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_meshShader(MemorySegment segment) { return VkPhysicalDeviceMeshShaderFeaturesNV.get_meshShader(segment, 0L); } + /// {@return `meshShader` at the given index} + /// @param index the index + public @CType("VkBool32") int meshShaderAt(long index) { return VkPhysicalDeviceMeshShaderFeaturesNV.get_meshShader(this.segment(), index); } + /// {@return `meshShader`} + public @CType("VkBool32") int meshShader() { return VkPhysicalDeviceMeshShaderFeaturesNV.get_meshShader(this.segment()); } + /// Sets `meshShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_meshShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_meshShader.set(segment, 0L, index, value); } + /// Sets `meshShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_meshShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_meshShader(segment, 0L, value); } + /// Sets `meshShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesNV meshShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_meshShader(this.segment(), index, value); return this; } + /// Sets `meshShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderFeaturesNV meshShader(@CType("VkBool32") int value) { VkPhysicalDeviceMeshShaderFeaturesNV.set_meshShader(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMeshShaderPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMeshShaderPropertiesNV.java new file mode 100644 index 00000000..2a88fa90 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceMeshShaderPropertiesNV.java @@ -0,0 +1,629 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxDrawMeshTasksCount +/// [VarHandle][#VH_maxDrawMeshTasksCount] - [Getter][#maxDrawMeshTasksCount()] - [Setter][#maxDrawMeshTasksCount(int)] +/// ### maxTaskWorkGroupInvocations +/// [VarHandle][#VH_maxTaskWorkGroupInvocations] - [Getter][#maxTaskWorkGroupInvocations()] - [Setter][#maxTaskWorkGroupInvocations(int)] +/// ### maxTaskWorkGroupSize +/// [VarHandle][#VH_maxTaskWorkGroupSize] - [Getter][#maxTaskWorkGroupSize()] - [Setter][#maxTaskWorkGroupSize(int)] +/// ### maxTaskTotalMemorySize +/// [VarHandle][#VH_maxTaskTotalMemorySize] - [Getter][#maxTaskTotalMemorySize()] - [Setter][#maxTaskTotalMemorySize(int)] +/// ### maxTaskOutputCount +/// [VarHandle][#VH_maxTaskOutputCount] - [Getter][#maxTaskOutputCount()] - [Setter][#maxTaskOutputCount(int)] +/// ### maxMeshWorkGroupInvocations +/// [VarHandle][#VH_maxMeshWorkGroupInvocations] - [Getter][#maxMeshWorkGroupInvocations()] - [Setter][#maxMeshWorkGroupInvocations(int)] +/// ### maxMeshWorkGroupSize +/// [VarHandle][#VH_maxMeshWorkGroupSize] - [Getter][#maxMeshWorkGroupSize()] - [Setter][#maxMeshWorkGroupSize(int)] +/// ### maxMeshTotalMemorySize +/// [VarHandle][#VH_maxMeshTotalMemorySize] - [Getter][#maxMeshTotalMemorySize()] - [Setter][#maxMeshTotalMemorySize(int)] +/// ### maxMeshOutputVertices +/// [VarHandle][#VH_maxMeshOutputVertices] - [Getter][#maxMeshOutputVertices()] - [Setter][#maxMeshOutputVertices(int)] +/// ### maxMeshOutputPrimitives +/// [VarHandle][#VH_maxMeshOutputPrimitives] - [Getter][#maxMeshOutputPrimitives()] - [Setter][#maxMeshOutputPrimitives(int)] +/// ### maxMeshMultiviewViewCount +/// [VarHandle][#VH_maxMeshMultiviewViewCount] - [Getter][#maxMeshMultiviewViewCount()] - [Setter][#maxMeshMultiviewViewCount(int)] +/// ### meshOutputPerVertexGranularity +/// [VarHandle][#VH_meshOutputPerVertexGranularity] - [Getter][#meshOutputPerVertexGranularity()] - [Setter][#meshOutputPerVertexGranularity(int)] +/// ### meshOutputPerPrimitiveGranularity +/// [VarHandle][#VH_meshOutputPerPrimitiveGranularity] - [Getter][#meshOutputPerPrimitiveGranularity()] - [Setter][#meshOutputPerPrimitiveGranularity(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMeshShaderPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxDrawMeshTasksCount; +/// uint32_t maxTaskWorkGroupInvocations; +/// uint32_t maxTaskWorkGroupSize; +/// uint32_t maxTaskTotalMemorySize; +/// uint32_t maxTaskOutputCount; +/// uint32_t maxMeshWorkGroupInvocations; +/// uint32_t maxMeshWorkGroupSize; +/// uint32_t maxMeshTotalMemorySize; +/// uint32_t maxMeshOutputVertices; +/// uint32_t maxMeshOutputPrimitives; +/// uint32_t maxMeshMultiviewViewCount; +/// uint32_t meshOutputPerVertexGranularity; +/// uint32_t meshOutputPerPrimitiveGranularity; +/// } VkPhysicalDeviceMeshShaderPropertiesNV; +/// ``` +public final class VkPhysicalDeviceMeshShaderPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceMeshShaderPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxDrawMeshTasksCount"), + ValueLayout.JAVA_INT.withName("maxTaskWorkGroupInvocations"), + ValueLayout.JAVA_INT.withName("maxTaskWorkGroupSize"), + ValueLayout.JAVA_INT.withName("maxTaskTotalMemorySize"), + ValueLayout.JAVA_INT.withName("maxTaskOutputCount"), + ValueLayout.JAVA_INT.withName("maxMeshWorkGroupInvocations"), + ValueLayout.JAVA_INT.withName("maxMeshWorkGroupSize"), + ValueLayout.JAVA_INT.withName("maxMeshTotalMemorySize"), + ValueLayout.JAVA_INT.withName("maxMeshOutputVertices"), + ValueLayout.JAVA_INT.withName("maxMeshOutputPrimitives"), + ValueLayout.JAVA_INT.withName("maxMeshMultiviewViewCount"), + ValueLayout.JAVA_INT.withName("meshOutputPerVertexGranularity"), + ValueLayout.JAVA_INT.withName("meshOutputPerPrimitiveGranularity") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxDrawMeshTasksCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDrawMeshTasksCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDrawMeshTasksCount")); + /// The [VarHandle] of `maxTaskWorkGroupInvocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskWorkGroupInvocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskWorkGroupInvocations")); + /// The [VarHandle] of `maxTaskWorkGroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskWorkGroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskWorkGroupSize")); + /// The [VarHandle] of `maxTaskTotalMemorySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskTotalMemorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskTotalMemorySize")); + /// The [VarHandle] of `maxTaskOutputCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTaskOutputCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTaskOutputCount")); + /// The [VarHandle] of `maxMeshWorkGroupInvocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshWorkGroupInvocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshWorkGroupInvocations")); + /// The [VarHandle] of `maxMeshWorkGroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshWorkGroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshWorkGroupSize")); + /// The [VarHandle] of `maxMeshTotalMemorySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshTotalMemorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshTotalMemorySize")); + /// The [VarHandle] of `maxMeshOutputVertices` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshOutputVertices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshOutputVertices")); + /// The [VarHandle] of `maxMeshOutputPrimitives` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshOutputPrimitives = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshOutputPrimitives")); + /// The [VarHandle] of `maxMeshMultiviewViewCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMeshMultiviewViewCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMeshMultiviewViewCount")); + /// The [VarHandle] of `meshOutputPerVertexGranularity` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_meshOutputPerVertexGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("meshOutputPerVertexGranularity")); + /// The [VarHandle] of `meshOutputPerPrimitiveGranularity` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_meshOutputPerPrimitiveGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("meshOutputPerPrimitiveGranularity")); + + /// Creates `VkPhysicalDeviceMeshShaderPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMeshShaderPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMeshShaderPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceMeshShaderPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMeshShaderPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMeshShaderPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMeshShaderPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMeshShaderPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMeshShaderPropertiesNV` + public static VkPhysicalDeviceMeshShaderPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMeshShaderPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMeshShaderPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMeshShaderPropertiesNV` + public static VkPhysicalDeviceMeshShaderPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMeshShaderPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `maxDrawMeshTasksCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDrawMeshTasksCount(MemorySegment segment, long index) { return (int) VH_maxDrawMeshTasksCount.get(segment, 0L, index); } + /// {@return `maxDrawMeshTasksCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDrawMeshTasksCount(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxDrawMeshTasksCount(segment, 0L); } + /// {@return `maxDrawMeshTasksCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDrawMeshTasksCountAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxDrawMeshTasksCount(this.segment(), index); } + /// {@return `maxDrawMeshTasksCount`} + public @CType("uint32_t") int maxDrawMeshTasksCount() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxDrawMeshTasksCount(this.segment()); } + /// Sets `maxDrawMeshTasksCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDrawMeshTasksCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDrawMeshTasksCount.set(segment, 0L, index, value); } + /// Sets `maxDrawMeshTasksCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDrawMeshTasksCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxDrawMeshTasksCount(segment, 0L, value); } + /// Sets `maxDrawMeshTasksCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxDrawMeshTasksCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxDrawMeshTasksCount(this.segment(), index, value); return this; } + /// Sets `maxDrawMeshTasksCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxDrawMeshTasksCount(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxDrawMeshTasksCount(this.segment(), value); return this; } + + /// {@return `maxTaskWorkGroupInvocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskWorkGroupInvocations(MemorySegment segment, long index) { return (int) VH_maxTaskWorkGroupInvocations.get(segment, 0L, index); } + /// {@return `maxTaskWorkGroupInvocations`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskWorkGroupInvocations(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskWorkGroupInvocations(segment, 0L); } + /// {@return `maxTaskWorkGroupInvocations` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskWorkGroupInvocationsAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskWorkGroupInvocations(this.segment(), index); } + /// {@return `maxTaskWorkGroupInvocations`} + public @CType("uint32_t") int maxTaskWorkGroupInvocations() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskWorkGroupInvocations(this.segment()); } + /// Sets `maxTaskWorkGroupInvocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskWorkGroupInvocations(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskWorkGroupInvocations.set(segment, 0L, index, value); } + /// Sets `maxTaskWorkGroupInvocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskWorkGroupInvocations(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskWorkGroupInvocations(segment, 0L, value); } + /// Sets `maxTaskWorkGroupInvocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxTaskWorkGroupInvocationsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskWorkGroupInvocations(this.segment(), index, value); return this; } + /// Sets `maxTaskWorkGroupInvocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxTaskWorkGroupInvocations(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskWorkGroupInvocations(this.segment(), value); return this; } + + /// {@return `maxTaskWorkGroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskWorkGroupSize(MemorySegment segment, long index) { return (int) VH_maxTaskWorkGroupSize.get(segment, 0L, index); } + /// {@return `maxTaskWorkGroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskWorkGroupSize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskWorkGroupSize(segment, 0L); } + /// {@return `maxTaskWorkGroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskWorkGroupSizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskWorkGroupSize(this.segment(), index); } + /// {@return `maxTaskWorkGroupSize`} + public @CType("uint32_t") int maxTaskWorkGroupSize() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskWorkGroupSize(this.segment()); } + /// Sets `maxTaskWorkGroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskWorkGroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskWorkGroupSize.set(segment, 0L, index, value); } + /// Sets `maxTaskWorkGroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskWorkGroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskWorkGroupSize(segment, 0L, value); } + /// Sets `maxTaskWorkGroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxTaskWorkGroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskWorkGroupSize(this.segment(), index, value); return this; } + /// Sets `maxTaskWorkGroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxTaskWorkGroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskWorkGroupSize(this.segment(), value); return this; } + + /// {@return `maxTaskTotalMemorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskTotalMemorySize(MemorySegment segment, long index) { return (int) VH_maxTaskTotalMemorySize.get(segment, 0L, index); } + /// {@return `maxTaskTotalMemorySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskTotalMemorySize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskTotalMemorySize(segment, 0L); } + /// {@return `maxTaskTotalMemorySize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskTotalMemorySizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskTotalMemorySize(this.segment(), index); } + /// {@return `maxTaskTotalMemorySize`} + public @CType("uint32_t") int maxTaskTotalMemorySize() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskTotalMemorySize(this.segment()); } + /// Sets `maxTaskTotalMemorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskTotalMemorySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskTotalMemorySize.set(segment, 0L, index, value); } + /// Sets `maxTaskTotalMemorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskTotalMemorySize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskTotalMemorySize(segment, 0L, value); } + /// Sets `maxTaskTotalMemorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxTaskTotalMemorySizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskTotalMemorySize(this.segment(), index, value); return this; } + /// Sets `maxTaskTotalMemorySize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxTaskTotalMemorySize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskTotalMemorySize(this.segment(), value); return this; } + + /// {@return `maxTaskOutputCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTaskOutputCount(MemorySegment segment, long index) { return (int) VH_maxTaskOutputCount.get(segment, 0L, index); } + /// {@return `maxTaskOutputCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTaskOutputCount(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskOutputCount(segment, 0L); } + /// {@return `maxTaskOutputCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTaskOutputCountAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskOutputCount(this.segment(), index); } + /// {@return `maxTaskOutputCount`} + public @CType("uint32_t") int maxTaskOutputCount() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxTaskOutputCount(this.segment()); } + /// Sets `maxTaskOutputCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTaskOutputCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTaskOutputCount.set(segment, 0L, index, value); } + /// Sets `maxTaskOutputCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTaskOutputCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskOutputCount(segment, 0L, value); } + /// Sets `maxTaskOutputCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxTaskOutputCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskOutputCount(this.segment(), index, value); return this; } + /// Sets `maxTaskOutputCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxTaskOutputCount(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxTaskOutputCount(this.segment(), value); return this; } + + /// {@return `maxMeshWorkGroupInvocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshWorkGroupInvocations(MemorySegment segment, long index) { return (int) VH_maxMeshWorkGroupInvocations.get(segment, 0L, index); } + /// {@return `maxMeshWorkGroupInvocations`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshWorkGroupInvocations(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshWorkGroupInvocations(segment, 0L); } + /// {@return `maxMeshWorkGroupInvocations` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshWorkGroupInvocationsAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshWorkGroupInvocations(this.segment(), index); } + /// {@return `maxMeshWorkGroupInvocations`} + public @CType("uint32_t") int maxMeshWorkGroupInvocations() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshWorkGroupInvocations(this.segment()); } + /// Sets `maxMeshWorkGroupInvocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshWorkGroupInvocations(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshWorkGroupInvocations.set(segment, 0L, index, value); } + /// Sets `maxMeshWorkGroupInvocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshWorkGroupInvocations(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshWorkGroupInvocations(segment, 0L, value); } + /// Sets `maxMeshWorkGroupInvocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshWorkGroupInvocationsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshWorkGroupInvocations(this.segment(), index, value); return this; } + /// Sets `maxMeshWorkGroupInvocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshWorkGroupInvocations(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshWorkGroupInvocations(this.segment(), value); return this; } + + /// {@return `maxMeshWorkGroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshWorkGroupSize(MemorySegment segment, long index) { return (int) VH_maxMeshWorkGroupSize.get(segment, 0L, index); } + /// {@return `maxMeshWorkGroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshWorkGroupSize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshWorkGroupSize(segment, 0L); } + /// {@return `maxMeshWorkGroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshWorkGroupSizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshWorkGroupSize(this.segment(), index); } + /// {@return `maxMeshWorkGroupSize`} + public @CType("uint32_t") int maxMeshWorkGroupSize() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshWorkGroupSize(this.segment()); } + /// Sets `maxMeshWorkGroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshWorkGroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshWorkGroupSize.set(segment, 0L, index, value); } + /// Sets `maxMeshWorkGroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshWorkGroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshWorkGroupSize(segment, 0L, value); } + /// Sets `maxMeshWorkGroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshWorkGroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshWorkGroupSize(this.segment(), index, value); return this; } + /// Sets `maxMeshWorkGroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshWorkGroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshWorkGroupSize(this.segment(), value); return this; } + + /// {@return `maxMeshTotalMemorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshTotalMemorySize(MemorySegment segment, long index) { return (int) VH_maxMeshTotalMemorySize.get(segment, 0L, index); } + /// {@return `maxMeshTotalMemorySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshTotalMemorySize(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshTotalMemorySize(segment, 0L); } + /// {@return `maxMeshTotalMemorySize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshTotalMemorySizeAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshTotalMemorySize(this.segment(), index); } + /// {@return `maxMeshTotalMemorySize`} + public @CType("uint32_t") int maxMeshTotalMemorySize() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshTotalMemorySize(this.segment()); } + /// Sets `maxMeshTotalMemorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshTotalMemorySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshTotalMemorySize.set(segment, 0L, index, value); } + /// Sets `maxMeshTotalMemorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshTotalMemorySize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshTotalMemorySize(segment, 0L, value); } + /// Sets `maxMeshTotalMemorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshTotalMemorySizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshTotalMemorySize(this.segment(), index, value); return this; } + /// Sets `maxMeshTotalMemorySize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshTotalMemorySize(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshTotalMemorySize(this.segment(), value); return this; } + + /// {@return `maxMeshOutputVertices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshOutputVertices(MemorySegment segment, long index) { return (int) VH_maxMeshOutputVertices.get(segment, 0L, index); } + /// {@return `maxMeshOutputVertices`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshOutputVertices(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshOutputVertices(segment, 0L); } + /// {@return `maxMeshOutputVertices` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshOutputVerticesAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshOutputVertices(this.segment(), index); } + /// {@return `maxMeshOutputVertices`} + public @CType("uint32_t") int maxMeshOutputVertices() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshOutputVertices(this.segment()); } + /// Sets `maxMeshOutputVertices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshOutputVertices(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshOutputVertices.set(segment, 0L, index, value); } + /// Sets `maxMeshOutputVertices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshOutputVertices(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshOutputVertices(segment, 0L, value); } + /// Sets `maxMeshOutputVertices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshOutputVerticesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshOutputVertices(this.segment(), index, value); return this; } + /// Sets `maxMeshOutputVertices` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshOutputVertices(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshOutputVertices(this.segment(), value); return this; } + + /// {@return `maxMeshOutputPrimitives` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshOutputPrimitives(MemorySegment segment, long index) { return (int) VH_maxMeshOutputPrimitives.get(segment, 0L, index); } + /// {@return `maxMeshOutputPrimitives`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshOutputPrimitives(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshOutputPrimitives(segment, 0L); } + /// {@return `maxMeshOutputPrimitives` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshOutputPrimitivesAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshOutputPrimitives(this.segment(), index); } + /// {@return `maxMeshOutputPrimitives`} + public @CType("uint32_t") int maxMeshOutputPrimitives() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshOutputPrimitives(this.segment()); } + /// Sets `maxMeshOutputPrimitives` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshOutputPrimitives(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshOutputPrimitives.set(segment, 0L, index, value); } + /// Sets `maxMeshOutputPrimitives` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshOutputPrimitives(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshOutputPrimitives(segment, 0L, value); } + /// Sets `maxMeshOutputPrimitives` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshOutputPrimitivesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshOutputPrimitives(this.segment(), index, value); return this; } + /// Sets `maxMeshOutputPrimitives` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshOutputPrimitives(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshOutputPrimitives(this.segment(), value); return this; } + + /// {@return `maxMeshMultiviewViewCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMeshMultiviewViewCount(MemorySegment segment, long index) { return (int) VH_maxMeshMultiviewViewCount.get(segment, 0L, index); } + /// {@return `maxMeshMultiviewViewCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMeshMultiviewViewCount(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshMultiviewViewCount(segment, 0L); } + /// {@return `maxMeshMultiviewViewCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMeshMultiviewViewCountAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshMultiviewViewCount(this.segment(), index); } + /// {@return `maxMeshMultiviewViewCount`} + public @CType("uint32_t") int maxMeshMultiviewViewCount() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_maxMeshMultiviewViewCount(this.segment()); } + /// Sets `maxMeshMultiviewViewCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMeshMultiviewViewCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMeshMultiviewViewCount.set(segment, 0L, index, value); } + /// Sets `maxMeshMultiviewViewCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMeshMultiviewViewCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshMultiviewViewCount(segment, 0L, value); } + /// Sets `maxMeshMultiviewViewCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshMultiviewViewCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshMultiviewViewCount(this.segment(), index, value); return this; } + /// Sets `maxMeshMultiviewViewCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV maxMeshMultiviewViewCount(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_maxMeshMultiviewViewCount(this.segment(), value); return this; } + + /// {@return `meshOutputPerVertexGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_meshOutputPerVertexGranularity(MemorySegment segment, long index) { return (int) VH_meshOutputPerVertexGranularity.get(segment, 0L, index); } + /// {@return `meshOutputPerVertexGranularity`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_meshOutputPerVertexGranularity(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_meshOutputPerVertexGranularity(segment, 0L); } + /// {@return `meshOutputPerVertexGranularity` at the given index} + /// @param index the index + public @CType("uint32_t") int meshOutputPerVertexGranularityAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_meshOutputPerVertexGranularity(this.segment(), index); } + /// {@return `meshOutputPerVertexGranularity`} + public @CType("uint32_t") int meshOutputPerVertexGranularity() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_meshOutputPerVertexGranularity(this.segment()); } + /// Sets `meshOutputPerVertexGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_meshOutputPerVertexGranularity(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_meshOutputPerVertexGranularity.set(segment, 0L, index, value); } + /// Sets `meshOutputPerVertexGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_meshOutputPerVertexGranularity(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_meshOutputPerVertexGranularity(segment, 0L, value); } + /// Sets `meshOutputPerVertexGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV meshOutputPerVertexGranularityAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_meshOutputPerVertexGranularity(this.segment(), index, value); return this; } + /// Sets `meshOutputPerVertexGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV meshOutputPerVertexGranularity(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_meshOutputPerVertexGranularity(this.segment(), value); return this; } + + /// {@return `meshOutputPerPrimitiveGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_meshOutputPerPrimitiveGranularity(MemorySegment segment, long index) { return (int) VH_meshOutputPerPrimitiveGranularity.get(segment, 0L, index); } + /// {@return `meshOutputPerPrimitiveGranularity`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_meshOutputPerPrimitiveGranularity(MemorySegment segment) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_meshOutputPerPrimitiveGranularity(segment, 0L); } + /// {@return `meshOutputPerPrimitiveGranularity` at the given index} + /// @param index the index + public @CType("uint32_t") int meshOutputPerPrimitiveGranularityAt(long index) { return VkPhysicalDeviceMeshShaderPropertiesNV.get_meshOutputPerPrimitiveGranularity(this.segment(), index); } + /// {@return `meshOutputPerPrimitiveGranularity`} + public @CType("uint32_t") int meshOutputPerPrimitiveGranularity() { return VkPhysicalDeviceMeshShaderPropertiesNV.get_meshOutputPerPrimitiveGranularity(this.segment()); } + /// Sets `meshOutputPerPrimitiveGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_meshOutputPerPrimitiveGranularity(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_meshOutputPerPrimitiveGranularity.set(segment, 0L, index, value); } + /// Sets `meshOutputPerPrimitiveGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_meshOutputPerPrimitiveGranularity(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_meshOutputPerPrimitiveGranularity(segment, 0L, value); } + /// Sets `meshOutputPerPrimitiveGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV meshOutputPerPrimitiveGranularityAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_meshOutputPerPrimitiveGranularity(this.segment(), index, value); return this; } + /// Sets `meshOutputPerPrimitiveGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMeshShaderPropertiesNV meshOutputPerPrimitiveGranularity(@CType("uint32_t") int value) { VkPhysicalDeviceMeshShaderPropertiesNV.set_meshOutputPerPrimitiveGranularity(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceOpticalFlowFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceOpticalFlowFeaturesNV.java new file mode 100644 index 00000000..42173fa1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceOpticalFlowFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### opticalFlow +/// [VarHandle][#VH_opticalFlow] - [Getter][#opticalFlow()] - [Setter][#opticalFlow(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceOpticalFlowFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 opticalFlow; +/// } VkPhysicalDeviceOpticalFlowFeaturesNV; +/// ``` +public final class VkPhysicalDeviceOpticalFlowFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceOpticalFlowFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("opticalFlow") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `opticalFlow` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_opticalFlow = LAYOUT.arrayElementVarHandle(PathElement.groupElement("opticalFlow")); + + /// Creates `VkPhysicalDeviceOpticalFlowFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceOpticalFlowFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceOpticalFlowFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpticalFlowFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpticalFlowFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceOpticalFlowFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpticalFlowFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpticalFlowFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceOpticalFlowFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpticalFlowFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpticalFlowFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceOpticalFlowFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceOpticalFlowFeaturesNV` + public static VkPhysicalDeviceOpticalFlowFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceOpticalFlowFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceOpticalFlowFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceOpticalFlowFeaturesNV` + public static VkPhysicalDeviceOpticalFlowFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceOpticalFlowFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceOpticalFlowFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceOpticalFlowFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceOpticalFlowFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceOpticalFlowFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceOpticalFlowFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceOpticalFlowFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceOpticalFlowFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpticalFlowFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpticalFlowFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpticalFlowFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `opticalFlow` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_opticalFlow(MemorySegment segment, long index) { return (int) VH_opticalFlow.get(segment, 0L, index); } + /// {@return `opticalFlow`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_opticalFlow(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowFeaturesNV.get_opticalFlow(segment, 0L); } + /// {@return `opticalFlow` at the given index} + /// @param index the index + public @CType("VkBool32") int opticalFlowAt(long index) { return VkPhysicalDeviceOpticalFlowFeaturesNV.get_opticalFlow(this.segment(), index); } + /// {@return `opticalFlow`} + public @CType("VkBool32") int opticalFlow() { return VkPhysicalDeviceOpticalFlowFeaturesNV.get_opticalFlow(this.segment()); } + /// Sets `opticalFlow` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_opticalFlow(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_opticalFlow.set(segment, 0L, index, value); } + /// Sets `opticalFlow` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_opticalFlow(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowFeaturesNV.set_opticalFlow(segment, 0L, value); } + /// Sets `opticalFlow` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowFeaturesNV opticalFlowAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowFeaturesNV.set_opticalFlow(this.segment(), index, value); return this; } + /// Sets `opticalFlow` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowFeaturesNV opticalFlow(@CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowFeaturesNV.set_opticalFlow(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceOpticalFlowPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceOpticalFlowPropertiesNV.java new file mode 100644 index 00000000..219863f4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceOpticalFlowPropertiesNV.java @@ -0,0 +1,555 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### supportedOutputGridSizes +/// [VarHandle][#VH_supportedOutputGridSizes] - [Getter][#supportedOutputGridSizes()] - [Setter][#supportedOutputGridSizes(int)] +/// ### supportedHintGridSizes +/// [VarHandle][#VH_supportedHintGridSizes] - [Getter][#supportedHintGridSizes()] - [Setter][#supportedHintGridSizes(int)] +/// ### hintSupported +/// [VarHandle][#VH_hintSupported] - [Getter][#hintSupported()] - [Setter][#hintSupported(int)] +/// ### costSupported +/// [VarHandle][#VH_costSupported] - [Getter][#costSupported()] - [Setter][#costSupported(int)] +/// ### bidirectionalFlowSupported +/// [VarHandle][#VH_bidirectionalFlowSupported] - [Getter][#bidirectionalFlowSupported()] - [Setter][#bidirectionalFlowSupported(int)] +/// ### globalFlowSupported +/// [VarHandle][#VH_globalFlowSupported] - [Getter][#globalFlowSupported()] - [Setter][#globalFlowSupported(int)] +/// ### minWidth +/// [VarHandle][#VH_minWidth] - [Getter][#minWidth()] - [Setter][#minWidth(int)] +/// ### minHeight +/// [VarHandle][#VH_minHeight] - [Getter][#minHeight()] - [Setter][#minHeight(int)] +/// ### maxWidth +/// [VarHandle][#VH_maxWidth] - [Getter][#maxWidth()] - [Setter][#maxWidth(int)] +/// ### maxHeight +/// [VarHandle][#VH_maxHeight] - [Getter][#maxHeight()] - [Setter][#maxHeight(int)] +/// ### maxNumRegionsOfInterest +/// [VarHandle][#VH_maxNumRegionsOfInterest] - [Getter][#maxNumRegionsOfInterest()] - [Setter][#maxNumRegionsOfInterest(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceOpticalFlowPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkOpticalFlowGridSizeFlagsNV supportedOutputGridSizes; +/// VkOpticalFlowGridSizeFlagsNV supportedHintGridSizes; +/// VkBool32 hintSupported; +/// VkBool32 costSupported; +/// VkBool32 bidirectionalFlowSupported; +/// VkBool32 globalFlowSupported; +/// uint32_t minWidth; +/// uint32_t minHeight; +/// uint32_t maxWidth; +/// uint32_t maxHeight; +/// uint32_t maxNumRegionsOfInterest; +/// } VkPhysicalDeviceOpticalFlowPropertiesNV; +/// ``` +public final class VkPhysicalDeviceOpticalFlowPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceOpticalFlowPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("supportedOutputGridSizes"), + ValueLayout.JAVA_INT.withName("supportedHintGridSizes"), + ValueLayout.JAVA_INT.withName("hintSupported"), + ValueLayout.JAVA_INT.withName("costSupported"), + ValueLayout.JAVA_INT.withName("bidirectionalFlowSupported"), + ValueLayout.JAVA_INT.withName("globalFlowSupported"), + ValueLayout.JAVA_INT.withName("minWidth"), + ValueLayout.JAVA_INT.withName("minHeight"), + ValueLayout.JAVA_INT.withName("maxWidth"), + ValueLayout.JAVA_INT.withName("maxHeight"), + ValueLayout.JAVA_INT.withName("maxNumRegionsOfInterest") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `supportedOutputGridSizes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedOutputGridSizes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedOutputGridSizes")); + /// The [VarHandle] of `supportedHintGridSizes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedHintGridSizes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedHintGridSizes")); + /// The [VarHandle] of `hintSupported` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hintSupported = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hintSupported")); + /// The [VarHandle] of `costSupported` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_costSupported = LAYOUT.arrayElementVarHandle(PathElement.groupElement("costSupported")); + /// The [VarHandle] of `bidirectionalFlowSupported` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bidirectionalFlowSupported = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bidirectionalFlowSupported")); + /// The [VarHandle] of `globalFlowSupported` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_globalFlowSupported = LAYOUT.arrayElementVarHandle(PathElement.groupElement("globalFlowSupported")); + /// The [VarHandle] of `minWidth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minWidth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minWidth")); + /// The [VarHandle] of `minHeight` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minHeight = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minHeight")); + /// The [VarHandle] of `maxWidth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxWidth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxWidth")); + /// The [VarHandle] of `maxHeight` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxHeight = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxHeight")); + /// The [VarHandle] of `maxNumRegionsOfInterest` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxNumRegionsOfInterest = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxNumRegionsOfInterest")); + + /// Creates `VkPhysicalDeviceOpticalFlowPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceOpticalFlowPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceOpticalFlowPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpticalFlowPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpticalFlowPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceOpticalFlowPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpticalFlowPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpticalFlowPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceOpticalFlowPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceOpticalFlowPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceOpticalFlowPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceOpticalFlowPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceOpticalFlowPropertiesNV` + public static VkPhysicalDeviceOpticalFlowPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceOpticalFlowPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceOpticalFlowPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceOpticalFlowPropertiesNV` + public static VkPhysicalDeviceOpticalFlowPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceOpticalFlowPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `supportedOutputGridSizes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOpticalFlowGridSizeFlagsNV") int get_supportedOutputGridSizes(MemorySegment segment, long index) { return (int) VH_supportedOutputGridSizes.get(segment, 0L, index); } + /// {@return `supportedOutputGridSizes`} + /// @param segment the segment of the struct + public static @CType("VkOpticalFlowGridSizeFlagsNV") int get_supportedOutputGridSizes(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_supportedOutputGridSizes(segment, 0L); } + /// {@return `supportedOutputGridSizes` at the given index} + /// @param index the index + public @CType("VkOpticalFlowGridSizeFlagsNV") int supportedOutputGridSizesAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_supportedOutputGridSizes(this.segment(), index); } + /// {@return `supportedOutputGridSizes`} + public @CType("VkOpticalFlowGridSizeFlagsNV") int supportedOutputGridSizes() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_supportedOutputGridSizes(this.segment()); } + /// Sets `supportedOutputGridSizes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedOutputGridSizes(MemorySegment segment, long index, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VH_supportedOutputGridSizes.set(segment, 0L, index, value); } + /// Sets `supportedOutputGridSizes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedOutputGridSizes(MemorySegment segment, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_supportedOutputGridSizes(segment, 0L, value); } + /// Sets `supportedOutputGridSizes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV supportedOutputGridSizesAt(long index, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_supportedOutputGridSizes(this.segment(), index, value); return this; } + /// Sets `supportedOutputGridSizes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV supportedOutputGridSizes(@CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_supportedOutputGridSizes(this.segment(), value); return this; } + + /// {@return `supportedHintGridSizes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOpticalFlowGridSizeFlagsNV") int get_supportedHintGridSizes(MemorySegment segment, long index) { return (int) VH_supportedHintGridSizes.get(segment, 0L, index); } + /// {@return `supportedHintGridSizes`} + /// @param segment the segment of the struct + public static @CType("VkOpticalFlowGridSizeFlagsNV") int get_supportedHintGridSizes(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_supportedHintGridSizes(segment, 0L); } + /// {@return `supportedHintGridSizes` at the given index} + /// @param index the index + public @CType("VkOpticalFlowGridSizeFlagsNV") int supportedHintGridSizesAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_supportedHintGridSizes(this.segment(), index); } + /// {@return `supportedHintGridSizes`} + public @CType("VkOpticalFlowGridSizeFlagsNV") int supportedHintGridSizes() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_supportedHintGridSizes(this.segment()); } + /// Sets `supportedHintGridSizes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedHintGridSizes(MemorySegment segment, long index, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VH_supportedHintGridSizes.set(segment, 0L, index, value); } + /// Sets `supportedHintGridSizes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedHintGridSizes(MemorySegment segment, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_supportedHintGridSizes(segment, 0L, value); } + /// Sets `supportedHintGridSizes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV supportedHintGridSizesAt(long index, @CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_supportedHintGridSizes(this.segment(), index, value); return this; } + /// Sets `supportedHintGridSizes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV supportedHintGridSizes(@CType("VkOpticalFlowGridSizeFlagsNV") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_supportedHintGridSizes(this.segment(), value); return this; } + + /// {@return `hintSupported` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hintSupported(MemorySegment segment, long index) { return (int) VH_hintSupported.get(segment, 0L, index); } + /// {@return `hintSupported`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hintSupported(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_hintSupported(segment, 0L); } + /// {@return `hintSupported` at the given index} + /// @param index the index + public @CType("VkBool32") int hintSupportedAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_hintSupported(this.segment(), index); } + /// {@return `hintSupported`} + public @CType("VkBool32") int hintSupported() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_hintSupported(this.segment()); } + /// Sets `hintSupported` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hintSupported(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hintSupported.set(segment, 0L, index, value); } + /// Sets `hintSupported` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hintSupported(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_hintSupported(segment, 0L, value); } + /// Sets `hintSupported` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV hintSupportedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_hintSupported(this.segment(), index, value); return this; } + /// Sets `hintSupported` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV hintSupported(@CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_hintSupported(this.segment(), value); return this; } + + /// {@return `costSupported` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_costSupported(MemorySegment segment, long index) { return (int) VH_costSupported.get(segment, 0L, index); } + /// {@return `costSupported`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_costSupported(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_costSupported(segment, 0L); } + /// {@return `costSupported` at the given index} + /// @param index the index + public @CType("VkBool32") int costSupportedAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_costSupported(this.segment(), index); } + /// {@return `costSupported`} + public @CType("VkBool32") int costSupported() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_costSupported(this.segment()); } + /// Sets `costSupported` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_costSupported(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_costSupported.set(segment, 0L, index, value); } + /// Sets `costSupported` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_costSupported(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_costSupported(segment, 0L, value); } + /// Sets `costSupported` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV costSupportedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_costSupported(this.segment(), index, value); return this; } + /// Sets `costSupported` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV costSupported(@CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_costSupported(this.segment(), value); return this; } + + /// {@return `bidirectionalFlowSupported` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bidirectionalFlowSupported(MemorySegment segment, long index) { return (int) VH_bidirectionalFlowSupported.get(segment, 0L, index); } + /// {@return `bidirectionalFlowSupported`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bidirectionalFlowSupported(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_bidirectionalFlowSupported(segment, 0L); } + /// {@return `bidirectionalFlowSupported` at the given index} + /// @param index the index + public @CType("VkBool32") int bidirectionalFlowSupportedAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_bidirectionalFlowSupported(this.segment(), index); } + /// {@return `bidirectionalFlowSupported`} + public @CType("VkBool32") int bidirectionalFlowSupported() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_bidirectionalFlowSupported(this.segment()); } + /// Sets `bidirectionalFlowSupported` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bidirectionalFlowSupported(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bidirectionalFlowSupported.set(segment, 0L, index, value); } + /// Sets `bidirectionalFlowSupported` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bidirectionalFlowSupported(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_bidirectionalFlowSupported(segment, 0L, value); } + /// Sets `bidirectionalFlowSupported` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV bidirectionalFlowSupportedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_bidirectionalFlowSupported(this.segment(), index, value); return this; } + /// Sets `bidirectionalFlowSupported` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV bidirectionalFlowSupported(@CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_bidirectionalFlowSupported(this.segment(), value); return this; } + + /// {@return `globalFlowSupported` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_globalFlowSupported(MemorySegment segment, long index) { return (int) VH_globalFlowSupported.get(segment, 0L, index); } + /// {@return `globalFlowSupported`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_globalFlowSupported(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_globalFlowSupported(segment, 0L); } + /// {@return `globalFlowSupported` at the given index} + /// @param index the index + public @CType("VkBool32") int globalFlowSupportedAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_globalFlowSupported(this.segment(), index); } + /// {@return `globalFlowSupported`} + public @CType("VkBool32") int globalFlowSupported() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_globalFlowSupported(this.segment()); } + /// Sets `globalFlowSupported` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_globalFlowSupported(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_globalFlowSupported.set(segment, 0L, index, value); } + /// Sets `globalFlowSupported` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_globalFlowSupported(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_globalFlowSupported(segment, 0L, value); } + /// Sets `globalFlowSupported` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV globalFlowSupportedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_globalFlowSupported(this.segment(), index, value); return this; } + /// Sets `globalFlowSupported` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV globalFlowSupported(@CType("VkBool32") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_globalFlowSupported(this.segment(), value); return this; } + + /// {@return `minWidth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minWidth(MemorySegment segment, long index) { return (int) VH_minWidth.get(segment, 0L, index); } + /// {@return `minWidth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minWidth(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_minWidth(segment, 0L); } + /// {@return `minWidth` at the given index} + /// @param index the index + public @CType("uint32_t") int minWidthAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_minWidth(this.segment(), index); } + /// {@return `minWidth`} + public @CType("uint32_t") int minWidth() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_minWidth(this.segment()); } + /// Sets `minWidth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minWidth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minWidth.set(segment, 0L, index, value); } + /// Sets `minWidth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minWidth(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_minWidth(segment, 0L, value); } + /// Sets `minWidth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV minWidthAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_minWidth(this.segment(), index, value); return this; } + /// Sets `minWidth` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV minWidth(@CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_minWidth(this.segment(), value); return this; } + + /// {@return `minHeight` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minHeight(MemorySegment segment, long index) { return (int) VH_minHeight.get(segment, 0L, index); } + /// {@return `minHeight`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minHeight(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_minHeight(segment, 0L); } + /// {@return `minHeight` at the given index} + /// @param index the index + public @CType("uint32_t") int minHeightAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_minHeight(this.segment(), index); } + /// {@return `minHeight`} + public @CType("uint32_t") int minHeight() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_minHeight(this.segment()); } + /// Sets `minHeight` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minHeight(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minHeight.set(segment, 0L, index, value); } + /// Sets `minHeight` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minHeight(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_minHeight(segment, 0L, value); } + /// Sets `minHeight` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV minHeightAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_minHeight(this.segment(), index, value); return this; } + /// Sets `minHeight` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV minHeight(@CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_minHeight(this.segment(), value); return this; } + + /// {@return `maxWidth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxWidth(MemorySegment segment, long index) { return (int) VH_maxWidth.get(segment, 0L, index); } + /// {@return `maxWidth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxWidth(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_maxWidth(segment, 0L); } + /// {@return `maxWidth` at the given index} + /// @param index the index + public @CType("uint32_t") int maxWidthAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_maxWidth(this.segment(), index); } + /// {@return `maxWidth`} + public @CType("uint32_t") int maxWidth() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_maxWidth(this.segment()); } + /// Sets `maxWidth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxWidth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxWidth.set(segment, 0L, index, value); } + /// Sets `maxWidth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxWidth(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_maxWidth(segment, 0L, value); } + /// Sets `maxWidth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV maxWidthAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_maxWidth(this.segment(), index, value); return this; } + /// Sets `maxWidth` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV maxWidth(@CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_maxWidth(this.segment(), value); return this; } + + /// {@return `maxHeight` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxHeight(MemorySegment segment, long index) { return (int) VH_maxHeight.get(segment, 0L, index); } + /// {@return `maxHeight`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxHeight(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_maxHeight(segment, 0L); } + /// {@return `maxHeight` at the given index} + /// @param index the index + public @CType("uint32_t") int maxHeightAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_maxHeight(this.segment(), index); } + /// {@return `maxHeight`} + public @CType("uint32_t") int maxHeight() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_maxHeight(this.segment()); } + /// Sets `maxHeight` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxHeight(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxHeight.set(segment, 0L, index, value); } + /// Sets `maxHeight` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxHeight(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_maxHeight(segment, 0L, value); } + /// Sets `maxHeight` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV maxHeightAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_maxHeight(this.segment(), index, value); return this; } + /// Sets `maxHeight` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV maxHeight(@CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_maxHeight(this.segment(), value); return this; } + + /// {@return `maxNumRegionsOfInterest` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxNumRegionsOfInterest(MemorySegment segment, long index) { return (int) VH_maxNumRegionsOfInterest.get(segment, 0L, index); } + /// {@return `maxNumRegionsOfInterest`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxNumRegionsOfInterest(MemorySegment segment) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_maxNumRegionsOfInterest(segment, 0L); } + /// {@return `maxNumRegionsOfInterest` at the given index} + /// @param index the index + public @CType("uint32_t") int maxNumRegionsOfInterestAt(long index) { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_maxNumRegionsOfInterest(this.segment(), index); } + /// {@return `maxNumRegionsOfInterest`} + public @CType("uint32_t") int maxNumRegionsOfInterest() { return VkPhysicalDeviceOpticalFlowPropertiesNV.get_maxNumRegionsOfInterest(this.segment()); } + /// Sets `maxNumRegionsOfInterest` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxNumRegionsOfInterest(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxNumRegionsOfInterest.set(segment, 0L, index, value); } + /// Sets `maxNumRegionsOfInterest` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxNumRegionsOfInterest(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_maxNumRegionsOfInterest(segment, 0L, value); } + /// Sets `maxNumRegionsOfInterest` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV maxNumRegionsOfInterestAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_maxNumRegionsOfInterest(this.segment(), index, value); return this; } + /// Sets `maxNumRegionsOfInterest` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceOpticalFlowPropertiesNV maxNumRegionsOfInterest(@CType("uint32_t") int value) { VkPhysicalDeviceOpticalFlowPropertiesNV.set_maxNumRegionsOfInterest(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDevicePerStageDescriptorSetFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDevicePerStageDescriptorSetFeaturesNV.java new file mode 100644 index 00000000..a1c3af5d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDevicePerStageDescriptorSetFeaturesNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### perStageDescriptorSet +/// [VarHandle][#VH_perStageDescriptorSet] - [Getter][#perStageDescriptorSet()] - [Setter][#perStageDescriptorSet(int)] +/// ### dynamicPipelineLayout +/// [VarHandle][#VH_dynamicPipelineLayout] - [Getter][#dynamicPipelineLayout()] - [Setter][#dynamicPipelineLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePerStageDescriptorSetFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 perStageDescriptorSet; +/// VkBool32 dynamicPipelineLayout; +/// } VkPhysicalDevicePerStageDescriptorSetFeaturesNV; +/// ``` +public final class VkPhysicalDevicePerStageDescriptorSetFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDevicePerStageDescriptorSetFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("perStageDescriptorSet"), + ValueLayout.JAVA_INT.withName("dynamicPipelineLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `perStageDescriptorSet` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_perStageDescriptorSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("perStageDescriptorSet")); + /// The [VarHandle] of `dynamicPipelineLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicPipelineLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicPipelineLayout")); + + /// Creates `VkPhysicalDevicePerStageDescriptorSetFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePerStageDescriptorSetFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePerStageDescriptorSetFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePerStageDescriptorSetFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePerStageDescriptorSetFeaturesNV(segment); } + + /// Creates `VkPhysicalDevicePerStageDescriptorSetFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePerStageDescriptorSetFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePerStageDescriptorSetFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePerStageDescriptorSetFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePerStageDescriptorSetFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePerStageDescriptorSetFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePerStageDescriptorSetFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePerStageDescriptorSetFeaturesNV` + public static VkPhysicalDevicePerStageDescriptorSetFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePerStageDescriptorSetFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePerStageDescriptorSetFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePerStageDescriptorSetFeaturesNV` + public static VkPhysicalDevicePerStageDescriptorSetFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePerStageDescriptorSetFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerStageDescriptorSetFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerStageDescriptorSetFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerStageDescriptorSetFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerStageDescriptorSetFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `perStageDescriptorSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_perStageDescriptorSet(MemorySegment segment, long index) { return (int) VH_perStageDescriptorSet.get(segment, 0L, index); } + /// {@return `perStageDescriptorSet`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_perStageDescriptorSet(MemorySegment segment) { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_perStageDescriptorSet(segment, 0L); } + /// {@return `perStageDescriptorSet` at the given index} + /// @param index the index + public @CType("VkBool32") int perStageDescriptorSetAt(long index) { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_perStageDescriptorSet(this.segment(), index); } + /// {@return `perStageDescriptorSet`} + public @CType("VkBool32") int perStageDescriptorSet() { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_perStageDescriptorSet(this.segment()); } + /// Sets `perStageDescriptorSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_perStageDescriptorSet(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_perStageDescriptorSet.set(segment, 0L, index, value); } + /// Sets `perStageDescriptorSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_perStageDescriptorSet(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_perStageDescriptorSet(segment, 0L, value); } + /// Sets `perStageDescriptorSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerStageDescriptorSetFeaturesNV perStageDescriptorSetAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_perStageDescriptorSet(this.segment(), index, value); return this; } + /// Sets `perStageDescriptorSet` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerStageDescriptorSetFeaturesNV perStageDescriptorSet(@CType("VkBool32") int value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_perStageDescriptorSet(this.segment(), value); return this; } + + /// {@return `dynamicPipelineLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dynamicPipelineLayout(MemorySegment segment, long index) { return (int) VH_dynamicPipelineLayout.get(segment, 0L, index); } + /// {@return `dynamicPipelineLayout`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dynamicPipelineLayout(MemorySegment segment) { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_dynamicPipelineLayout(segment, 0L); } + /// {@return `dynamicPipelineLayout` at the given index} + /// @param index the index + public @CType("VkBool32") int dynamicPipelineLayoutAt(long index) { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_dynamicPipelineLayout(this.segment(), index); } + /// {@return `dynamicPipelineLayout`} + public @CType("VkBool32") int dynamicPipelineLayout() { return VkPhysicalDevicePerStageDescriptorSetFeaturesNV.get_dynamicPipelineLayout(this.segment()); } + /// Sets `dynamicPipelineLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicPipelineLayout(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dynamicPipelineLayout.set(segment, 0L, index, value); } + /// Sets `dynamicPipelineLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicPipelineLayout(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_dynamicPipelineLayout(segment, 0L, value); } + /// Sets `dynamicPipelineLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerStageDescriptorSetFeaturesNV dynamicPipelineLayoutAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_dynamicPipelineLayout(this.segment(), index, value); return this; } + /// Sets `dynamicPipelineLayout` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePerStageDescriptorSetFeaturesNV dynamicPipelineLayout(@CType("VkBool32") int value) { VkPhysicalDevicePerStageDescriptorSetFeaturesNV.set_dynamicPipelineLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDevicePresentBarrierFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDevicePresentBarrierFeaturesNV.java new file mode 100644 index 00000000..09b66f97 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDevicePresentBarrierFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentBarrier +/// [VarHandle][#VH_presentBarrier] - [Getter][#presentBarrier()] - [Setter][#presentBarrier(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePresentBarrierFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 presentBarrier; +/// } VkPhysicalDevicePresentBarrierFeaturesNV; +/// ``` +public final class VkPhysicalDevicePresentBarrierFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDevicePresentBarrierFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("presentBarrier") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentBarrier` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentBarrier = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentBarrier")); + + /// Creates `VkPhysicalDevicePresentBarrierFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePresentBarrierFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePresentBarrierFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentBarrierFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentBarrierFeaturesNV(segment); } + + /// Creates `VkPhysicalDevicePresentBarrierFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentBarrierFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentBarrierFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePresentBarrierFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePresentBarrierFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePresentBarrierFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePresentBarrierFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePresentBarrierFeaturesNV` + public static VkPhysicalDevicePresentBarrierFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePresentBarrierFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePresentBarrierFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePresentBarrierFeaturesNV` + public static VkPhysicalDevicePresentBarrierFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePresentBarrierFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePresentBarrierFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePresentBarrierFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePresentBarrierFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePresentBarrierFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentBarrierFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePresentBarrierFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentBarrierFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDevicePresentBarrierFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePresentBarrierFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePresentBarrierFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePresentBarrierFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentBarrierFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentBarrierFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentBarrierFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentBarrierFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePresentBarrierFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `presentBarrier` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_presentBarrier(MemorySegment segment, long index) { return (int) VH_presentBarrier.get(segment, 0L, index); } + /// {@return `presentBarrier`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_presentBarrier(MemorySegment segment) { return VkPhysicalDevicePresentBarrierFeaturesNV.get_presentBarrier(segment, 0L); } + /// {@return `presentBarrier` at the given index} + /// @param index the index + public @CType("VkBool32") int presentBarrierAt(long index) { return VkPhysicalDevicePresentBarrierFeaturesNV.get_presentBarrier(this.segment(), index); } + /// {@return `presentBarrier`} + public @CType("VkBool32") int presentBarrier() { return VkPhysicalDevicePresentBarrierFeaturesNV.get_presentBarrier(this.segment()); } + /// Sets `presentBarrier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentBarrier(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_presentBarrier.set(segment, 0L, index, value); } + /// Sets `presentBarrier` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentBarrier(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePresentBarrierFeaturesNV.set_presentBarrier(segment, 0L, value); } + /// Sets `presentBarrier` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentBarrierFeaturesNV presentBarrierAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePresentBarrierFeaturesNV.set_presentBarrier(this.segment(), index, value); return this; } + /// Sets `presentBarrier` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePresentBarrierFeaturesNV presentBarrier(@CType("VkBool32") int value) { VkPhysicalDevicePresentBarrierFeaturesNV.set_presentBarrier(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRawAccessChainsFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRawAccessChainsFeaturesNV.java new file mode 100644 index 00000000..784af04b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRawAccessChainsFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderRawAccessChains +/// [VarHandle][#VH_shaderRawAccessChains] - [Getter][#shaderRawAccessChains()] - [Setter][#shaderRawAccessChains(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRawAccessChainsFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderRawAccessChains; +/// } VkPhysicalDeviceRawAccessChainsFeaturesNV; +/// ``` +public final class VkPhysicalDeviceRawAccessChainsFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceRawAccessChainsFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderRawAccessChains") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderRawAccessChains` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRawAccessChains = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRawAccessChains")); + + /// Creates `VkPhysicalDeviceRawAccessChainsFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRawAccessChainsFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRawAccessChainsFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRawAccessChainsFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRawAccessChainsFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceRawAccessChainsFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRawAccessChainsFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRawAccessChainsFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRawAccessChainsFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRawAccessChainsFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRawAccessChainsFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRawAccessChainsFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRawAccessChainsFeaturesNV` + public static VkPhysicalDeviceRawAccessChainsFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRawAccessChainsFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRawAccessChainsFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRawAccessChainsFeaturesNV` + public static VkPhysicalDeviceRawAccessChainsFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRawAccessChainsFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRawAccessChainsFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRawAccessChainsFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRawAccessChainsFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRawAccessChainsFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRawAccessChainsFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRawAccessChainsFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRawAccessChainsFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRawAccessChainsFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRawAccessChainsFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRawAccessChainsFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRawAccessChainsFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRawAccessChainsFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRawAccessChainsFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRawAccessChainsFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRawAccessChainsFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRawAccessChainsFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderRawAccessChains` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRawAccessChains(MemorySegment segment, long index) { return (int) VH_shaderRawAccessChains.get(segment, 0L, index); } + /// {@return `shaderRawAccessChains`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRawAccessChains(MemorySegment segment) { return VkPhysicalDeviceRawAccessChainsFeaturesNV.get_shaderRawAccessChains(segment, 0L); } + /// {@return `shaderRawAccessChains` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRawAccessChainsAt(long index) { return VkPhysicalDeviceRawAccessChainsFeaturesNV.get_shaderRawAccessChains(this.segment(), index); } + /// {@return `shaderRawAccessChains`} + public @CType("VkBool32") int shaderRawAccessChains() { return VkPhysicalDeviceRawAccessChainsFeaturesNV.get_shaderRawAccessChains(this.segment()); } + /// Sets `shaderRawAccessChains` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRawAccessChains(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRawAccessChains.set(segment, 0L, index, value); } + /// Sets `shaderRawAccessChains` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRawAccessChains(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRawAccessChainsFeaturesNV.set_shaderRawAccessChains(segment, 0L, value); } + /// Sets `shaderRawAccessChains` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRawAccessChainsFeaturesNV shaderRawAccessChainsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRawAccessChainsFeaturesNV.set_shaderRawAccessChains(this.segment(), index, value); return this; } + /// Sets `shaderRawAccessChains` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRawAccessChainsFeaturesNV shaderRawAccessChains(@CType("VkBool32") int value) { VkPhysicalDeviceRawAccessChainsFeaturesNV.set_shaderRawAccessChains(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.java new file mode 100644 index 00000000..72b20f32 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rayTracingInvocationReorder +/// [VarHandle][#VH_rayTracingInvocationReorder] - [Getter][#rayTracingInvocationReorder()] - [Setter][#rayTracingInvocationReorder(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 rayTracingInvocationReorder; +/// } VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV; +/// ``` +public final class VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rayTracingInvocationReorder") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rayTracingInvocationReorder` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingInvocationReorder = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingInvocationReorder")); + + /// Creates `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV` + public static VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV` + public static VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `rayTracingInvocationReorder` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingInvocationReorder(MemorySegment segment, long index) { return (int) VH_rayTracingInvocationReorder.get(segment, 0L, index); } + /// {@return `rayTracingInvocationReorder`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingInvocationReorder(MemorySegment segment) { return VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.get_rayTracingInvocationReorder(segment, 0L); } + /// {@return `rayTracingInvocationReorder` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingInvocationReorderAt(long index) { return VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.get_rayTracingInvocationReorder(this.segment(), index); } + /// {@return `rayTracingInvocationReorder`} + public @CType("VkBool32") int rayTracingInvocationReorder() { return VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.get_rayTracingInvocationReorder(this.segment()); } + /// Sets `rayTracingInvocationReorder` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingInvocationReorder(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingInvocationReorder.set(segment, 0L, index, value); } + /// Sets `rayTracingInvocationReorder` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingInvocationReorder(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.set_rayTracingInvocationReorder(segment, 0L, value); } + /// Sets `rayTracingInvocationReorder` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV rayTracingInvocationReorderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.set_rayTracingInvocationReorder(this.segment(), index, value); return this; } + /// Sets `rayTracingInvocationReorder` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV rayTracingInvocationReorder(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.set_rayTracingInvocationReorder(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.java new file mode 100644 index 00000000..fbc733e9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rayTracingInvocationReorderReorderingHint +/// [VarHandle][#VH_rayTracingInvocationReorderReorderingHint] - [Getter][#rayTracingInvocationReorderReorderingHint()] - [Setter][#rayTracingInvocationReorderReorderingHint(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkRayTracingInvocationReorderModeNV rayTracingInvocationReorderReorderingHint; +/// } VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV; +/// ``` +public final class VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rayTracingInvocationReorderReorderingHint") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rayTracingInvocationReorderReorderingHint` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingInvocationReorderReorderingHint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingInvocationReorderReorderingHint")); + + /// Creates `VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV` + public static VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV` + public static VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `rayTracingInvocationReorderReorderingHint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRayTracingInvocationReorderModeNV") int get_rayTracingInvocationReorderReorderingHint(MemorySegment segment, long index) { return (int) VH_rayTracingInvocationReorderReorderingHint.get(segment, 0L, index); } + /// {@return `rayTracingInvocationReorderReorderingHint`} + /// @param segment the segment of the struct + public static @CType("VkRayTracingInvocationReorderModeNV") int get_rayTracingInvocationReorderReorderingHint(MemorySegment segment) { return VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.get_rayTracingInvocationReorderReorderingHint(segment, 0L); } + /// {@return `rayTracingInvocationReorderReorderingHint` at the given index} + /// @param index the index + public @CType("VkRayTracingInvocationReorderModeNV") int rayTracingInvocationReorderReorderingHintAt(long index) { return VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.get_rayTracingInvocationReorderReorderingHint(this.segment(), index); } + /// {@return `rayTracingInvocationReorderReorderingHint`} + public @CType("VkRayTracingInvocationReorderModeNV") int rayTracingInvocationReorderReorderingHint() { return VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.get_rayTracingInvocationReorderReorderingHint(this.segment()); } + /// Sets `rayTracingInvocationReorderReorderingHint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingInvocationReorderReorderingHint(MemorySegment segment, long index, @CType("VkRayTracingInvocationReorderModeNV") int value) { VH_rayTracingInvocationReorderReorderingHint.set(segment, 0L, index, value); } + /// Sets `rayTracingInvocationReorderReorderingHint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingInvocationReorderReorderingHint(MemorySegment segment, @CType("VkRayTracingInvocationReorderModeNV") int value) { VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.set_rayTracingInvocationReorderReorderingHint(segment, 0L, value); } + /// Sets `rayTracingInvocationReorderReorderingHint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV rayTracingInvocationReorderReorderingHintAt(long index, @CType("VkRayTracingInvocationReorderModeNV") int value) { VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.set_rayTracingInvocationReorderReorderingHint(this.segment(), index, value); return this; } + /// Sets `rayTracingInvocationReorderReorderingHint` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV rayTracingInvocationReorderReorderingHint(@CType("VkRayTracingInvocationReorderModeNV") int value) { VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.set_rayTracingInvocationReorderReorderingHint(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.java new file mode 100644 index 00000000..84416a42 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rayTracingMotionBlur +/// [VarHandle][#VH_rayTracingMotionBlur] - [Getter][#rayTracingMotionBlur()] - [Setter][#rayTracingMotionBlur(int)] +/// ### rayTracingMotionBlurPipelineTraceRaysIndirect +/// [VarHandle][#VH_rayTracingMotionBlurPipelineTraceRaysIndirect] - [Getter][#rayTracingMotionBlurPipelineTraceRaysIndirect()] - [Setter][#rayTracingMotionBlurPipelineTraceRaysIndirect(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRayTracingMotionBlurFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 rayTracingMotionBlur; +/// VkBool32 rayTracingMotionBlurPipelineTraceRaysIndirect; +/// } VkPhysicalDeviceRayTracingMotionBlurFeaturesNV; +/// ``` +public final class VkPhysicalDeviceRayTracingMotionBlurFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rayTracingMotionBlur"), + ValueLayout.JAVA_INT.withName("rayTracingMotionBlurPipelineTraceRaysIndirect") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rayTracingMotionBlur` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingMotionBlur = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingMotionBlur")); + /// The [VarHandle] of `rayTracingMotionBlurPipelineTraceRaysIndirect` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingMotionBlurPipelineTraceRaysIndirect = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingMotionBlurPipelineTraceRaysIndirect")); + + /// Creates `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRayTracingMotionBlurFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingMotionBlurFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingMotionBlurFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingMotionBlurFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingMotionBlurFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingMotionBlurFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingMotionBlurFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV` + public static VkPhysicalDeviceRayTracingMotionBlurFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRayTracingMotionBlurFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRayTracingMotionBlurFeaturesNV` + public static VkPhysicalDeviceRayTracingMotionBlurFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRayTracingMotionBlurFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMotionBlurFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMotionBlurFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMotionBlurFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMotionBlurFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `rayTracingMotionBlur` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingMotionBlur(MemorySegment segment, long index) { return (int) VH_rayTracingMotionBlur.get(segment, 0L, index); } + /// {@return `rayTracingMotionBlur`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingMotionBlur(MemorySegment segment) { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_rayTracingMotionBlur(segment, 0L); } + /// {@return `rayTracingMotionBlur` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingMotionBlurAt(long index) { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_rayTracingMotionBlur(this.segment(), index); } + /// {@return `rayTracingMotionBlur`} + public @CType("VkBool32") int rayTracingMotionBlur() { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_rayTracingMotionBlur(this.segment()); } + /// Sets `rayTracingMotionBlur` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingMotionBlur(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingMotionBlur.set(segment, 0L, index, value); } + /// Sets `rayTracingMotionBlur` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingMotionBlur(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_rayTracingMotionBlur(segment, 0L, value); } + /// Sets `rayTracingMotionBlur` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMotionBlurFeaturesNV rayTracingMotionBlurAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_rayTracingMotionBlur(this.segment(), index, value); return this; } + /// Sets `rayTracingMotionBlur` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMotionBlurFeaturesNV rayTracingMotionBlur(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_rayTracingMotionBlur(this.segment(), value); return this; } + + /// {@return `rayTracingMotionBlurPipelineTraceRaysIndirect` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingMotionBlurPipelineTraceRaysIndirect(MemorySegment segment, long index) { return (int) VH_rayTracingMotionBlurPipelineTraceRaysIndirect.get(segment, 0L, index); } + /// {@return `rayTracingMotionBlurPipelineTraceRaysIndirect`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingMotionBlurPipelineTraceRaysIndirect(MemorySegment segment) { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_rayTracingMotionBlurPipelineTraceRaysIndirect(segment, 0L); } + /// {@return `rayTracingMotionBlurPipelineTraceRaysIndirect` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingMotionBlurPipelineTraceRaysIndirectAt(long index) { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_rayTracingMotionBlurPipelineTraceRaysIndirect(this.segment(), index); } + /// {@return `rayTracingMotionBlurPipelineTraceRaysIndirect`} + public @CType("VkBool32") int rayTracingMotionBlurPipelineTraceRaysIndirect() { return VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.get_rayTracingMotionBlurPipelineTraceRaysIndirect(this.segment()); } + /// Sets `rayTracingMotionBlurPipelineTraceRaysIndirect` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingMotionBlurPipelineTraceRaysIndirect(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingMotionBlurPipelineTraceRaysIndirect.set(segment, 0L, index, value); } + /// Sets `rayTracingMotionBlurPipelineTraceRaysIndirect` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingMotionBlurPipelineTraceRaysIndirect(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_rayTracingMotionBlurPipelineTraceRaysIndirect(segment, 0L, value); } + /// Sets `rayTracingMotionBlurPipelineTraceRaysIndirect` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMotionBlurFeaturesNV rayTracingMotionBlurPipelineTraceRaysIndirectAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_rayTracingMotionBlurPipelineTraceRaysIndirect(this.segment(), index, value); return this; } + /// Sets `rayTracingMotionBlurPipelineTraceRaysIndirect` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingMotionBlurFeaturesNV rayTracingMotionBlurPipelineTraceRaysIndirect(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.set_rayTracingMotionBlurPipelineTraceRaysIndirect(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingPropertiesNV.java new file mode 100644 index 00000000..aa738567 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingPropertiesNV.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderGroupHandleSize +/// [VarHandle][#VH_shaderGroupHandleSize] - [Getter][#shaderGroupHandleSize()] - [Setter][#shaderGroupHandleSize(int)] +/// ### maxRecursionDepth +/// [VarHandle][#VH_maxRecursionDepth] - [Getter][#maxRecursionDepth()] - [Setter][#maxRecursionDepth(int)] +/// ### maxShaderGroupStride +/// [VarHandle][#VH_maxShaderGroupStride] - [Getter][#maxShaderGroupStride()] - [Setter][#maxShaderGroupStride(int)] +/// ### shaderGroupBaseAlignment +/// [VarHandle][#VH_shaderGroupBaseAlignment] - [Getter][#shaderGroupBaseAlignment()] - [Setter][#shaderGroupBaseAlignment(int)] +/// ### maxGeometryCount +/// [VarHandle][#VH_maxGeometryCount] - [Getter][#maxGeometryCount()] - [Setter][#maxGeometryCount(long)] +/// ### maxInstanceCount +/// [VarHandle][#VH_maxInstanceCount] - [Getter][#maxInstanceCount()] - [Setter][#maxInstanceCount(long)] +/// ### maxTriangleCount +/// [VarHandle][#VH_maxTriangleCount] - [Getter][#maxTriangleCount()] - [Setter][#maxTriangleCount(long)] +/// ### maxDescriptorSetAccelerationStructures +/// [VarHandle][#VH_maxDescriptorSetAccelerationStructures] - [Getter][#maxDescriptorSetAccelerationStructures()] - [Setter][#maxDescriptorSetAccelerationStructures(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRayTracingPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t shaderGroupHandleSize; +/// uint32_t maxRecursionDepth; +/// uint32_t maxShaderGroupStride; +/// uint32_t shaderGroupBaseAlignment; +/// uint64_t maxGeometryCount; +/// uint64_t maxInstanceCount; +/// uint64_t maxTriangleCount; +/// uint32_t maxDescriptorSetAccelerationStructures; +/// } VkPhysicalDeviceRayTracingPropertiesNV; +/// ``` +public final class VkPhysicalDeviceRayTracingPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceRayTracingPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderGroupHandleSize"), + ValueLayout.JAVA_INT.withName("maxRecursionDepth"), + ValueLayout.JAVA_INT.withName("maxShaderGroupStride"), + ValueLayout.JAVA_INT.withName("shaderGroupBaseAlignment"), + ValueLayout.JAVA_LONG.withName("maxGeometryCount"), + ValueLayout.JAVA_LONG.withName("maxInstanceCount"), + ValueLayout.JAVA_LONG.withName("maxTriangleCount"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetAccelerationStructures") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderGroupHandleSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderGroupHandleSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderGroupHandleSize")); + /// The [VarHandle] of `maxRecursionDepth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxRecursionDepth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxRecursionDepth")); + /// The [VarHandle] of `maxShaderGroupStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxShaderGroupStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxShaderGroupStride")); + /// The [VarHandle] of `shaderGroupBaseAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderGroupBaseAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderGroupBaseAlignment")); + /// The [VarHandle] of `maxGeometryCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxGeometryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxGeometryCount")); + /// The [VarHandle] of `maxInstanceCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxInstanceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxInstanceCount")); + /// The [VarHandle] of `maxTriangleCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxTriangleCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTriangleCount")); + /// The [VarHandle] of `maxDescriptorSetAccelerationStructures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetAccelerationStructures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetAccelerationStructures")); + + /// Creates `VkPhysicalDeviceRayTracingPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRayTracingPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRayTracingPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceRayTracingPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRayTracingPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRayTracingPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRayTracingPropertiesNV` + public static VkPhysicalDeviceRayTracingPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRayTracingPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRayTracingPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRayTracingPropertiesNV` + public static VkPhysicalDeviceRayTracingPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRayTracingPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRayTracingPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRayTracingPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRayTracingPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRayTracingPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRayTracingPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRayTracingPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderGroupHandleSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderGroupHandleSize(MemorySegment segment, long index) { return (int) VH_shaderGroupHandleSize.get(segment, 0L, index); } + /// {@return `shaderGroupHandleSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderGroupHandleSize(MemorySegment segment) { return VkPhysicalDeviceRayTracingPropertiesNV.get_shaderGroupHandleSize(segment, 0L); } + /// {@return `shaderGroupHandleSize` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderGroupHandleSizeAt(long index) { return VkPhysicalDeviceRayTracingPropertiesNV.get_shaderGroupHandleSize(this.segment(), index); } + /// {@return `shaderGroupHandleSize`} + public @CType("uint32_t") int shaderGroupHandleSize() { return VkPhysicalDeviceRayTracingPropertiesNV.get_shaderGroupHandleSize(this.segment()); } + /// Sets `shaderGroupHandleSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderGroupHandleSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderGroupHandleSize.set(segment, 0L, index, value); } + /// Sets `shaderGroupHandleSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderGroupHandleSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_shaderGroupHandleSize(segment, 0L, value); } + /// Sets `shaderGroupHandleSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV shaderGroupHandleSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_shaderGroupHandleSize(this.segment(), index, value); return this; } + /// Sets `shaderGroupHandleSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV shaderGroupHandleSize(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_shaderGroupHandleSize(this.segment(), value); return this; } + + /// {@return `maxRecursionDepth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxRecursionDepth(MemorySegment segment, long index) { return (int) VH_maxRecursionDepth.get(segment, 0L, index); } + /// {@return `maxRecursionDepth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxRecursionDepth(MemorySegment segment) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxRecursionDepth(segment, 0L); } + /// {@return `maxRecursionDepth` at the given index} + /// @param index the index + public @CType("uint32_t") int maxRecursionDepthAt(long index) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxRecursionDepth(this.segment(), index); } + /// {@return `maxRecursionDepth`} + public @CType("uint32_t") int maxRecursionDepth() { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxRecursionDepth(this.segment()); } + /// Sets `maxRecursionDepth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxRecursionDepth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxRecursionDepth.set(segment, 0L, index, value); } + /// Sets `maxRecursionDepth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxRecursionDepth(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxRecursionDepth(segment, 0L, value); } + /// Sets `maxRecursionDepth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxRecursionDepthAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxRecursionDepth(this.segment(), index, value); return this; } + /// Sets `maxRecursionDepth` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxRecursionDepth(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxRecursionDepth(this.segment(), value); return this; } + + /// {@return `maxShaderGroupStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxShaderGroupStride(MemorySegment segment, long index) { return (int) VH_maxShaderGroupStride.get(segment, 0L, index); } + /// {@return `maxShaderGroupStride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxShaderGroupStride(MemorySegment segment) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxShaderGroupStride(segment, 0L); } + /// {@return `maxShaderGroupStride` at the given index} + /// @param index the index + public @CType("uint32_t") int maxShaderGroupStrideAt(long index) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxShaderGroupStride(this.segment(), index); } + /// {@return `maxShaderGroupStride`} + public @CType("uint32_t") int maxShaderGroupStride() { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxShaderGroupStride(this.segment()); } + /// Sets `maxShaderGroupStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxShaderGroupStride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxShaderGroupStride.set(segment, 0L, index, value); } + /// Sets `maxShaderGroupStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxShaderGroupStride(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxShaderGroupStride(segment, 0L, value); } + /// Sets `maxShaderGroupStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxShaderGroupStrideAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxShaderGroupStride(this.segment(), index, value); return this; } + /// Sets `maxShaderGroupStride` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxShaderGroupStride(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxShaderGroupStride(this.segment(), value); return this; } + + /// {@return `shaderGroupBaseAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderGroupBaseAlignment(MemorySegment segment, long index) { return (int) VH_shaderGroupBaseAlignment.get(segment, 0L, index); } + /// {@return `shaderGroupBaseAlignment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderGroupBaseAlignment(MemorySegment segment) { return VkPhysicalDeviceRayTracingPropertiesNV.get_shaderGroupBaseAlignment(segment, 0L); } + /// {@return `shaderGroupBaseAlignment` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderGroupBaseAlignmentAt(long index) { return VkPhysicalDeviceRayTracingPropertiesNV.get_shaderGroupBaseAlignment(this.segment(), index); } + /// {@return `shaderGroupBaseAlignment`} + public @CType("uint32_t") int shaderGroupBaseAlignment() { return VkPhysicalDeviceRayTracingPropertiesNV.get_shaderGroupBaseAlignment(this.segment()); } + /// Sets `shaderGroupBaseAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderGroupBaseAlignment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderGroupBaseAlignment.set(segment, 0L, index, value); } + /// Sets `shaderGroupBaseAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderGroupBaseAlignment(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_shaderGroupBaseAlignment(segment, 0L, value); } + /// Sets `shaderGroupBaseAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV shaderGroupBaseAlignmentAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_shaderGroupBaseAlignment(this.segment(), index, value); return this; } + /// Sets `shaderGroupBaseAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV shaderGroupBaseAlignment(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_shaderGroupBaseAlignment(this.segment(), value); return this; } + + /// {@return `maxGeometryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxGeometryCount(MemorySegment segment, long index) { return (long) VH_maxGeometryCount.get(segment, 0L, index); } + /// {@return `maxGeometryCount`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxGeometryCount(MemorySegment segment) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxGeometryCount(segment, 0L); } + /// {@return `maxGeometryCount` at the given index} + /// @param index the index + public @CType("uint64_t") long maxGeometryCountAt(long index) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxGeometryCount(this.segment(), index); } + /// {@return `maxGeometryCount`} + public @CType("uint64_t") long maxGeometryCount() { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxGeometryCount(this.segment()); } + /// Sets `maxGeometryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxGeometryCount(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxGeometryCount.set(segment, 0L, index, value); } + /// Sets `maxGeometryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxGeometryCount(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxGeometryCount(segment, 0L, value); } + /// Sets `maxGeometryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxGeometryCountAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxGeometryCount(this.segment(), index, value); return this; } + /// Sets `maxGeometryCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxGeometryCount(@CType("uint64_t") long value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxGeometryCount(this.segment(), value); return this; } + + /// {@return `maxInstanceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxInstanceCount(MemorySegment segment, long index) { return (long) VH_maxInstanceCount.get(segment, 0L, index); } + /// {@return `maxInstanceCount`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxInstanceCount(MemorySegment segment) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxInstanceCount(segment, 0L); } + /// {@return `maxInstanceCount` at the given index} + /// @param index the index + public @CType("uint64_t") long maxInstanceCountAt(long index) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxInstanceCount(this.segment(), index); } + /// {@return `maxInstanceCount`} + public @CType("uint64_t") long maxInstanceCount() { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxInstanceCount(this.segment()); } + /// Sets `maxInstanceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxInstanceCount(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxInstanceCount.set(segment, 0L, index, value); } + /// Sets `maxInstanceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxInstanceCount(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxInstanceCount(segment, 0L, value); } + /// Sets `maxInstanceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxInstanceCountAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxInstanceCount(this.segment(), index, value); return this; } + /// Sets `maxInstanceCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxInstanceCount(@CType("uint64_t") long value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxInstanceCount(this.segment(), value); return this; } + + /// {@return `maxTriangleCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxTriangleCount(MemorySegment segment, long index) { return (long) VH_maxTriangleCount.get(segment, 0L, index); } + /// {@return `maxTriangleCount`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxTriangleCount(MemorySegment segment) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxTriangleCount(segment, 0L); } + /// {@return `maxTriangleCount` at the given index} + /// @param index the index + public @CType("uint64_t") long maxTriangleCountAt(long index) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxTriangleCount(this.segment(), index); } + /// {@return `maxTriangleCount`} + public @CType("uint64_t") long maxTriangleCount() { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxTriangleCount(this.segment()); } + /// Sets `maxTriangleCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTriangleCount(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxTriangleCount.set(segment, 0L, index, value); } + /// Sets `maxTriangleCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTriangleCount(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxTriangleCount(segment, 0L, value); } + /// Sets `maxTriangleCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxTriangleCountAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxTriangleCount(this.segment(), index, value); return this; } + /// Sets `maxTriangleCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxTriangleCount(@CType("uint64_t") long value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxTriangleCount(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetAccelerationStructures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetAccelerationStructures(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetAccelerationStructures.get(segment, 0L, index); } + /// {@return `maxDescriptorSetAccelerationStructures`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetAccelerationStructures(MemorySegment segment) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxDescriptorSetAccelerationStructures(segment, 0L); } + /// {@return `maxDescriptorSetAccelerationStructures` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetAccelerationStructuresAt(long index) { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxDescriptorSetAccelerationStructures(this.segment(), index); } + /// {@return `maxDescriptorSetAccelerationStructures`} + public @CType("uint32_t") int maxDescriptorSetAccelerationStructures() { return VkPhysicalDeviceRayTracingPropertiesNV.get_maxDescriptorSetAccelerationStructures(this.segment()); } + /// Sets `maxDescriptorSetAccelerationStructures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetAccelerationStructures(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetAccelerationStructures.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetAccelerationStructures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetAccelerationStructures(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxDescriptorSetAccelerationStructures(segment, 0L, value); } + /// Sets `maxDescriptorSetAccelerationStructures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxDescriptorSetAccelerationStructuresAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxDescriptorSetAccelerationStructures(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetAccelerationStructures` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingPropertiesNV maxDescriptorSetAccelerationStructures(@CType("uint32_t") int value) { VkPhysicalDeviceRayTracingPropertiesNV.set_maxDescriptorSetAccelerationStructures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingValidationFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingValidationFeaturesNV.java new file mode 100644 index 00000000..84f0f6e8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRayTracingValidationFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rayTracingValidation +/// [VarHandle][#VH_rayTracingValidation] - [Getter][#rayTracingValidation()] - [Setter][#rayTracingValidation(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRayTracingValidationFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 rayTracingValidation; +/// } VkPhysicalDeviceRayTracingValidationFeaturesNV; +/// ``` +public final class VkPhysicalDeviceRayTracingValidationFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceRayTracingValidationFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rayTracingValidation") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rayTracingValidation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rayTracingValidation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rayTracingValidation")); + + /// Creates `VkPhysicalDeviceRayTracingValidationFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRayTracingValidationFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRayTracingValidationFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingValidationFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingValidationFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceRayTracingValidationFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingValidationFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingValidationFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRayTracingValidationFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRayTracingValidationFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRayTracingValidationFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRayTracingValidationFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRayTracingValidationFeaturesNV` + public static VkPhysicalDeviceRayTracingValidationFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRayTracingValidationFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRayTracingValidationFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRayTracingValidationFeaturesNV` + public static VkPhysicalDeviceRayTracingValidationFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRayTracingValidationFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRayTracingValidationFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRayTracingValidationFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRayTracingValidationFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingValidationFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingValidationFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingValidationFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingValidationFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRayTracingValidationFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRayTracingValidationFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRayTracingValidationFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRayTracingValidationFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingValidationFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingValidationFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingValidationFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingValidationFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRayTracingValidationFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `rayTracingValidation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rayTracingValidation(MemorySegment segment, long index) { return (int) VH_rayTracingValidation.get(segment, 0L, index); } + /// {@return `rayTracingValidation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rayTracingValidation(MemorySegment segment) { return VkPhysicalDeviceRayTracingValidationFeaturesNV.get_rayTracingValidation(segment, 0L); } + /// {@return `rayTracingValidation` at the given index} + /// @param index the index + public @CType("VkBool32") int rayTracingValidationAt(long index) { return VkPhysicalDeviceRayTracingValidationFeaturesNV.get_rayTracingValidation(this.segment(), index); } + /// {@return `rayTracingValidation`} + public @CType("VkBool32") int rayTracingValidation() { return VkPhysicalDeviceRayTracingValidationFeaturesNV.get_rayTracingValidation(this.segment()); } + /// Sets `rayTracingValidation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rayTracingValidation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rayTracingValidation.set(segment, 0L, index, value); } + /// Sets `rayTracingValidation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rayTracingValidation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingValidationFeaturesNV.set_rayTracingValidation(segment, 0L, value); } + /// Sets `rayTracingValidation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingValidationFeaturesNV rayTracingValidationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRayTracingValidationFeaturesNV.set_rayTracingValidation(this.segment(), index, value); return this; } + /// Sets `rayTracingValidation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRayTracingValidationFeaturesNV rayTracingValidation(@CType("VkBool32") int value) { VkPhysicalDeviceRayTracingValidationFeaturesNV.set_rayTracingValidation(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.java new file mode 100644 index 00000000..2f77fcb0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### representativeFragmentTest +/// [VarHandle][#VH_representativeFragmentTest] - [Getter][#representativeFragmentTest()] - [Setter][#representativeFragmentTest(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 representativeFragmentTest; +/// } VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV; +/// ``` +public final class VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("representativeFragmentTest") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `representativeFragmentTest` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_representativeFragmentTest = LAYOUT.arrayElementVarHandle(PathElement.groupElement("representativeFragmentTest")); + + /// Creates `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV` + public static VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV` + public static VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `representativeFragmentTest` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_representativeFragmentTest(MemorySegment segment, long index) { return (int) VH_representativeFragmentTest.get(segment, 0L, index); } + /// {@return `representativeFragmentTest`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_representativeFragmentTest(MemorySegment segment) { return VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.get_representativeFragmentTest(segment, 0L); } + /// {@return `representativeFragmentTest` at the given index} + /// @param index the index + public @CType("VkBool32") int representativeFragmentTestAt(long index) { return VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.get_representativeFragmentTest(this.segment(), index); } + /// {@return `representativeFragmentTest`} + public @CType("VkBool32") int representativeFragmentTest() { return VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.get_representativeFragmentTest(this.segment()); } + /// Sets `representativeFragmentTest` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_representativeFragmentTest(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_representativeFragmentTest.set(segment, 0L, index, value); } + /// Sets `representativeFragmentTest` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_representativeFragmentTest(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.set_representativeFragmentTest(segment, 0L, value); } + /// Sets `representativeFragmentTest` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV representativeFragmentTestAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.set_representativeFragmentTest(this.segment(), index, value); return this; } + /// Sets `representativeFragmentTest` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV representativeFragmentTest(@CType("VkBool32") int value) { VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.set_representativeFragmentTest(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.java new file mode 100644 index 00000000..62760a2a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderFloat16VectorAtomics +/// [VarHandle][#VH_shaderFloat16VectorAtomics] - [Getter][#shaderFloat16VectorAtomics()] - [Setter][#shaderFloat16VectorAtomics(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderFloat16VectorAtomics; +/// } VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV; +/// ``` +public final class VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderFloat16VectorAtomics") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderFloat16VectorAtomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderFloat16VectorAtomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderFloat16VectorAtomics")); + + /// Creates `VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV` + public static VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV` + public static VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderFloat16VectorAtomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderFloat16VectorAtomics(MemorySegment segment, long index) { return (int) VH_shaderFloat16VectorAtomics.get(segment, 0L, index); } + /// {@return `shaderFloat16VectorAtomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderFloat16VectorAtomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.get_shaderFloat16VectorAtomics(segment, 0L); } + /// {@return `shaderFloat16VectorAtomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderFloat16VectorAtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.get_shaderFloat16VectorAtomics(this.segment(), index); } + /// {@return `shaderFloat16VectorAtomics`} + public @CType("VkBool32") int shaderFloat16VectorAtomics() { return VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.get_shaderFloat16VectorAtomics(this.segment()); } + /// Sets `shaderFloat16VectorAtomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderFloat16VectorAtomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderFloat16VectorAtomics.set(segment, 0L, index, value); } + /// Sets `shaderFloat16VectorAtomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderFloat16VectorAtomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.set_shaderFloat16VectorAtomics(segment, 0L, value); } + /// Sets `shaderFloat16VectorAtomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV shaderFloat16VectorAtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.set_shaderFloat16VectorAtomics(this.segment(), index, value); return this; } + /// Sets `shaderFloat16VectorAtomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV shaderFloat16VectorAtomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.set_shaderFloat16VectorAtomics(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderImageFootprintFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderImageFootprintFeaturesNV.java new file mode 100644 index 00000000..e4ebb584 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderImageFootprintFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageFootprint +/// [VarHandle][#VH_imageFootprint] - [Getter][#imageFootprint()] - [Setter][#imageFootprint(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderImageFootprintFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 imageFootprint; +/// } VkPhysicalDeviceShaderImageFootprintFeaturesNV; +/// ``` +public final class VkPhysicalDeviceShaderImageFootprintFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderImageFootprintFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("imageFootprint") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageFootprint` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageFootprint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageFootprint")); + + /// Creates `VkPhysicalDeviceShaderImageFootprintFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderImageFootprintFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderImageFootprintFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderImageFootprintFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderImageFootprintFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceShaderImageFootprintFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderImageFootprintFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderImageFootprintFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderImageFootprintFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderImageFootprintFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderImageFootprintFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderImageFootprintFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderImageFootprintFeaturesNV` + public static VkPhysicalDeviceShaderImageFootprintFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderImageFootprintFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderImageFootprintFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderImageFootprintFeaturesNV` + public static VkPhysicalDeviceShaderImageFootprintFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderImageFootprintFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderImageFootprintFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderImageFootprintFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderImageFootprintFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderImageFootprintFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageFootprintFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderImageFootprintFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageFootprintFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderImageFootprintFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderImageFootprintFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderImageFootprintFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderImageFootprintFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderImageFootprintFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageFootprintFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderImageFootprintFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageFootprintFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderImageFootprintFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `imageFootprint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imageFootprint(MemorySegment segment, long index) { return (int) VH_imageFootprint.get(segment, 0L, index); } + /// {@return `imageFootprint`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imageFootprint(MemorySegment segment) { return VkPhysicalDeviceShaderImageFootprintFeaturesNV.get_imageFootprint(segment, 0L); } + /// {@return `imageFootprint` at the given index} + /// @param index the index + public @CType("VkBool32") int imageFootprintAt(long index) { return VkPhysicalDeviceShaderImageFootprintFeaturesNV.get_imageFootprint(this.segment(), index); } + /// {@return `imageFootprint`} + public @CType("VkBool32") int imageFootprint() { return VkPhysicalDeviceShaderImageFootprintFeaturesNV.get_imageFootprint(this.segment()); } + /// Sets `imageFootprint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageFootprint(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imageFootprint.set(segment, 0L, index, value); } + /// Sets `imageFootprint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageFootprint(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderImageFootprintFeaturesNV.set_imageFootprint(segment, 0L, value); } + /// Sets `imageFootprint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageFootprintFeaturesNV imageFootprintAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderImageFootprintFeaturesNV.set_imageFootprint(this.segment(), index, value); return this; } + /// Sets `imageFootprint` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderImageFootprintFeaturesNV imageFootprint(@CType("VkBool32") int value) { VkPhysicalDeviceShaderImageFootprintFeaturesNV.set_imageFootprint(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.java new file mode 100644 index 00000000..82489bc3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderSMBuiltins +/// [VarHandle][#VH_shaderSMBuiltins] - [Getter][#shaderSMBuiltins()] - [Setter][#shaderSMBuiltins(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderSMBuiltinsFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderSMBuiltins; +/// } VkPhysicalDeviceShaderSMBuiltinsFeaturesNV; +/// ``` +public final class VkPhysicalDeviceShaderSMBuiltinsFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderSMBuiltins") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderSMBuiltins` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSMBuiltins = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSMBuiltins")); + + /// Creates `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderSMBuiltinsFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSMBuiltinsFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSMBuiltinsFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSMBuiltinsFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSMBuiltinsFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSMBuiltinsFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSMBuiltinsFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV` + public static VkPhysicalDeviceShaderSMBuiltinsFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderSMBuiltinsFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderSMBuiltinsFeaturesNV` + public static VkPhysicalDeviceShaderSMBuiltinsFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderSMBuiltinsFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderSMBuiltins` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSMBuiltins(MemorySegment segment, long index) { return (int) VH_shaderSMBuiltins.get(segment, 0L, index); } + /// {@return `shaderSMBuiltins`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSMBuiltins(MemorySegment segment) { return VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.get_shaderSMBuiltins(segment, 0L); } + /// {@return `shaderSMBuiltins` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSMBuiltinsAt(long index) { return VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.get_shaderSMBuiltins(this.segment(), index); } + /// {@return `shaderSMBuiltins`} + public @CType("VkBool32") int shaderSMBuiltins() { return VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.get_shaderSMBuiltins(this.segment()); } + /// Sets `shaderSMBuiltins` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSMBuiltins(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSMBuiltins.set(segment, 0L, index, value); } + /// Sets `shaderSMBuiltins` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSMBuiltins(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.set_shaderSMBuiltins(segment, 0L, value); } + /// Sets `shaderSMBuiltins` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsFeaturesNV shaderSMBuiltinsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.set_shaderSMBuiltins(this.segment(), index, value); return this; } + /// Sets `shaderSMBuiltins` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsFeaturesNV shaderSMBuiltins(@CType("VkBool32") int value) { VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.set_shaderSMBuiltins(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.java new file mode 100644 index 00000000..ff2d2d52 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderSMCount +/// [VarHandle][#VH_shaderSMCount] - [Getter][#shaderSMCount()] - [Setter][#shaderSMCount(int)] +/// ### shaderWarpsPerSM +/// [VarHandle][#VH_shaderWarpsPerSM] - [Getter][#shaderWarpsPerSM()] - [Setter][#shaderWarpsPerSM(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderSMBuiltinsPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t shaderSMCount; +/// uint32_t shaderWarpsPerSM; +/// } VkPhysicalDeviceShaderSMBuiltinsPropertiesNV; +/// ``` +public final class VkPhysicalDeviceShaderSMBuiltinsPropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderSMBuiltinsPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderSMCount"), + ValueLayout.JAVA_INT.withName("shaderWarpsPerSM") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderSMCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSMCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSMCount")); + /// The [VarHandle] of `shaderWarpsPerSM` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderWarpsPerSM = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderWarpsPerSM")); + + /// Creates `VkPhysicalDeviceShaderSMBuiltinsPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderSMBuiltinsPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderSMBuiltinsPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSMBuiltinsPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSMBuiltinsPropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceShaderSMBuiltinsPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSMBuiltinsPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSMBuiltinsPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderSMBuiltinsPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSMBuiltinsPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSMBuiltinsPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderSMBuiltinsPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderSMBuiltinsPropertiesNV` + public static VkPhysicalDeviceShaderSMBuiltinsPropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderSMBuiltinsPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderSMBuiltinsPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderSMBuiltinsPropertiesNV` + public static VkPhysicalDeviceShaderSMBuiltinsPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderSMBuiltinsPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsPropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderSMCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderSMCount(MemorySegment segment, long index) { return (int) VH_shaderSMCount.get(segment, 0L, index); } + /// {@return `shaderSMCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderSMCount(MemorySegment segment) { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_shaderSMCount(segment, 0L); } + /// {@return `shaderSMCount` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderSMCountAt(long index) { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_shaderSMCount(this.segment(), index); } + /// {@return `shaderSMCount`} + public @CType("uint32_t") int shaderSMCount() { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_shaderSMCount(this.segment()); } + /// Sets `shaderSMCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSMCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderSMCount.set(segment, 0L, index, value); } + /// Sets `shaderSMCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSMCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_shaderSMCount(segment, 0L, value); } + /// Sets `shaderSMCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsPropertiesNV shaderSMCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_shaderSMCount(this.segment(), index, value); return this; } + /// Sets `shaderSMCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsPropertiesNV shaderSMCount(@CType("uint32_t") int value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_shaderSMCount(this.segment(), value); return this; } + + /// {@return `shaderWarpsPerSM` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shaderWarpsPerSM(MemorySegment segment, long index) { return (int) VH_shaderWarpsPerSM.get(segment, 0L, index); } + /// {@return `shaderWarpsPerSM`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shaderWarpsPerSM(MemorySegment segment) { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_shaderWarpsPerSM(segment, 0L); } + /// {@return `shaderWarpsPerSM` at the given index} + /// @param index the index + public @CType("uint32_t") int shaderWarpsPerSMAt(long index) { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_shaderWarpsPerSM(this.segment(), index); } + /// {@return `shaderWarpsPerSM`} + public @CType("uint32_t") int shaderWarpsPerSM() { return VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.get_shaderWarpsPerSM(this.segment()); } + /// Sets `shaderWarpsPerSM` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderWarpsPerSM(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shaderWarpsPerSM.set(segment, 0L, index, value); } + /// Sets `shaderWarpsPerSM` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderWarpsPerSM(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_shaderWarpsPerSM(segment, 0L, value); } + /// Sets `shaderWarpsPerSM` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsPropertiesNV shaderWarpsPerSMAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_shaderWarpsPerSM(this.segment(), index, value); return this; } + /// Sets `shaderWarpsPerSM` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSMBuiltinsPropertiesNV shaderWarpsPerSM(@CType("uint32_t") int value) { VkPhysicalDeviceShaderSMBuiltinsPropertiesNV.set_shaderWarpsPerSM(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShadingRateImageFeaturesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShadingRateImageFeaturesNV.java new file mode 100644 index 00000000..a82796d5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShadingRateImageFeaturesNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shadingRateImage +/// [VarHandle][#VH_shadingRateImage] - [Getter][#shadingRateImage()] - [Setter][#shadingRateImage(int)] +/// ### shadingRateCoarseSampleOrder +/// [VarHandle][#VH_shadingRateCoarseSampleOrder] - [Getter][#shadingRateCoarseSampleOrder()] - [Setter][#shadingRateCoarseSampleOrder(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShadingRateImageFeaturesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shadingRateImage; +/// VkBool32 shadingRateCoarseSampleOrder; +/// } VkPhysicalDeviceShadingRateImageFeaturesNV; +/// ``` +public final class VkPhysicalDeviceShadingRateImageFeaturesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceShadingRateImageFeaturesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shadingRateImage"), + ValueLayout.JAVA_INT.withName("shadingRateCoarseSampleOrder") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shadingRateImage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shadingRateImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shadingRateImage")); + /// The [VarHandle] of `shadingRateCoarseSampleOrder` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shadingRateCoarseSampleOrder = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shadingRateCoarseSampleOrder")); + + /// Creates `VkPhysicalDeviceShadingRateImageFeaturesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShadingRateImageFeaturesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShadingRateImageFeaturesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShadingRateImageFeaturesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShadingRateImageFeaturesNV(segment); } + + /// Creates `VkPhysicalDeviceShadingRateImageFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShadingRateImageFeaturesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShadingRateImageFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShadingRateImageFeaturesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShadingRateImageFeaturesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShadingRateImageFeaturesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShadingRateImageFeaturesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShadingRateImageFeaturesNV` + public static VkPhysicalDeviceShadingRateImageFeaturesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShadingRateImageFeaturesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShadingRateImageFeaturesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShadingRateImageFeaturesNV` + public static VkPhysicalDeviceShadingRateImageFeaturesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShadingRateImageFeaturesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImageFeaturesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImageFeaturesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImageFeaturesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImageFeaturesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `shadingRateImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shadingRateImage(MemorySegment segment, long index) { return (int) VH_shadingRateImage.get(segment, 0L, index); } + /// {@return `shadingRateImage`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shadingRateImage(MemorySegment segment) { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_shadingRateImage(segment, 0L); } + /// {@return `shadingRateImage` at the given index} + /// @param index the index + public @CType("VkBool32") int shadingRateImageAt(long index) { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_shadingRateImage(this.segment(), index); } + /// {@return `shadingRateImage`} + public @CType("VkBool32") int shadingRateImage() { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_shadingRateImage(this.segment()); } + /// Sets `shadingRateImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRateImage(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shadingRateImage.set(segment, 0L, index, value); } + /// Sets `shadingRateImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRateImage(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_shadingRateImage(segment, 0L, value); } + /// Sets `shadingRateImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImageFeaturesNV shadingRateImageAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_shadingRateImage(this.segment(), index, value); return this; } + /// Sets `shadingRateImage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImageFeaturesNV shadingRateImage(@CType("VkBool32") int value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_shadingRateImage(this.segment(), value); return this; } + + /// {@return `shadingRateCoarseSampleOrder` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shadingRateCoarseSampleOrder(MemorySegment segment, long index) { return (int) VH_shadingRateCoarseSampleOrder.get(segment, 0L, index); } + /// {@return `shadingRateCoarseSampleOrder`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shadingRateCoarseSampleOrder(MemorySegment segment) { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_shadingRateCoarseSampleOrder(segment, 0L); } + /// {@return `shadingRateCoarseSampleOrder` at the given index} + /// @param index the index + public @CType("VkBool32") int shadingRateCoarseSampleOrderAt(long index) { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_shadingRateCoarseSampleOrder(this.segment(), index); } + /// {@return `shadingRateCoarseSampleOrder`} + public @CType("VkBool32") int shadingRateCoarseSampleOrder() { return VkPhysicalDeviceShadingRateImageFeaturesNV.get_shadingRateCoarseSampleOrder(this.segment()); } + /// Sets `shadingRateCoarseSampleOrder` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRateCoarseSampleOrder(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shadingRateCoarseSampleOrder.set(segment, 0L, index, value); } + /// Sets `shadingRateCoarseSampleOrder` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRateCoarseSampleOrder(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_shadingRateCoarseSampleOrder(segment, 0L, value); } + /// Sets `shadingRateCoarseSampleOrder` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImageFeaturesNV shadingRateCoarseSampleOrderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_shadingRateCoarseSampleOrder(this.segment(), index, value); return this; } + /// Sets `shadingRateCoarseSampleOrder` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImageFeaturesNV shadingRateCoarseSampleOrder(@CType("VkBool32") int value) { VkPhysicalDeviceShadingRateImageFeaturesNV.set_shadingRateCoarseSampleOrder(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShadingRateImagePropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShadingRateImagePropertiesNV.java new file mode 100644 index 00000000..9798bed1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPhysicalDeviceShadingRateImagePropertiesNV.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shadingRateTexelSize +/// [Byte offset][#OFFSET_shadingRateTexelSize] - [Memory layout][#ML_shadingRateTexelSize] - [Getter][#shadingRateTexelSize()] - [Setter][#shadingRateTexelSize(java.lang.foreign.MemorySegment)] +/// ### shadingRatePaletteSize +/// [VarHandle][#VH_shadingRatePaletteSize] - [Getter][#shadingRatePaletteSize()] - [Setter][#shadingRatePaletteSize(int)] +/// ### shadingRateMaxCoarseSamples +/// [VarHandle][#VH_shadingRateMaxCoarseSamples] - [Getter][#shadingRateMaxCoarseSamples()] - [Setter][#shadingRateMaxCoarseSamples(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShadingRateImagePropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkExtent2D shadingRateTexelSize; +/// uint32_t shadingRatePaletteSize; +/// uint32_t shadingRateMaxCoarseSamples; +/// } VkPhysicalDeviceShadingRateImagePropertiesNV; +/// ``` +public final class VkPhysicalDeviceShadingRateImagePropertiesNV extends Struct { + /// The struct layout of `VkPhysicalDeviceShadingRateImagePropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("shadingRateTexelSize"), + ValueLayout.JAVA_INT.withName("shadingRatePaletteSize"), + ValueLayout.JAVA_INT.withName("shadingRateMaxCoarseSamples") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `shadingRateTexelSize`. + public static final long OFFSET_shadingRateTexelSize = LAYOUT.byteOffset(PathElement.groupElement("shadingRateTexelSize")); + /// The memory layout of `shadingRateTexelSize`. + public static final MemoryLayout ML_shadingRateTexelSize = LAYOUT.select(PathElement.groupElement("shadingRateTexelSize")); + /// The [VarHandle] of `shadingRatePaletteSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shadingRatePaletteSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shadingRatePaletteSize")); + /// The [VarHandle] of `shadingRateMaxCoarseSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shadingRateMaxCoarseSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shadingRateMaxCoarseSamples")); + + /// Creates `VkPhysicalDeviceShadingRateImagePropertiesNV` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShadingRateImagePropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShadingRateImagePropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShadingRateImagePropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShadingRateImagePropertiesNV(segment); } + + /// Creates `VkPhysicalDeviceShadingRateImagePropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShadingRateImagePropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShadingRateImagePropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShadingRateImagePropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShadingRateImagePropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShadingRateImagePropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShadingRateImagePropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShadingRateImagePropertiesNV` + public static VkPhysicalDeviceShadingRateImagePropertiesNV alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShadingRateImagePropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShadingRateImagePropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShadingRateImagePropertiesNV` + public static VkPhysicalDeviceShadingRateImagePropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShadingRateImagePropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImagePropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImagePropertiesNV sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImagePropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImagePropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `shadingRateTexelSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_shadingRateTexelSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_shadingRateTexelSize, index), ML_shadingRateTexelSize); } + /// {@return `shadingRateTexelSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_shadingRateTexelSize(MemorySegment segment) { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_shadingRateTexelSize(segment, 0L); } + /// {@return `shadingRateTexelSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment shadingRateTexelSizeAt(long index) { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_shadingRateTexelSize(this.segment(), index); } + /// {@return `shadingRateTexelSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment shadingRateTexelSize() { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_shadingRateTexelSize(this.segment()); } + /// Sets `shadingRateTexelSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRateTexelSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_shadingRateTexelSize, index), ML_shadingRateTexelSize.byteSize()); } + /// Sets `shadingRateTexelSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRateTexelSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_shadingRateTexelSize(segment, 0L, value); } + /// Sets `shadingRateTexelSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImagePropertiesNV shadingRateTexelSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_shadingRateTexelSize(this.segment(), index, value); return this; } + /// Sets `shadingRateTexelSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImagePropertiesNV shadingRateTexelSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_shadingRateTexelSize(this.segment(), value); return this; } + + /// {@return `shadingRatePaletteSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shadingRatePaletteSize(MemorySegment segment, long index) { return (int) VH_shadingRatePaletteSize.get(segment, 0L, index); } + /// {@return `shadingRatePaletteSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shadingRatePaletteSize(MemorySegment segment) { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_shadingRatePaletteSize(segment, 0L); } + /// {@return `shadingRatePaletteSize` at the given index} + /// @param index the index + public @CType("uint32_t") int shadingRatePaletteSizeAt(long index) { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_shadingRatePaletteSize(this.segment(), index); } + /// {@return `shadingRatePaletteSize`} + public @CType("uint32_t") int shadingRatePaletteSize() { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_shadingRatePaletteSize(this.segment()); } + /// Sets `shadingRatePaletteSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRatePaletteSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shadingRatePaletteSize.set(segment, 0L, index, value); } + /// Sets `shadingRatePaletteSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRatePaletteSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_shadingRatePaletteSize(segment, 0L, value); } + /// Sets `shadingRatePaletteSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImagePropertiesNV shadingRatePaletteSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_shadingRatePaletteSize(this.segment(), index, value); return this; } + /// Sets `shadingRatePaletteSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImagePropertiesNV shadingRatePaletteSize(@CType("uint32_t") int value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_shadingRatePaletteSize(this.segment(), value); return this; } + + /// {@return `shadingRateMaxCoarseSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shadingRateMaxCoarseSamples(MemorySegment segment, long index) { return (int) VH_shadingRateMaxCoarseSamples.get(segment, 0L, index); } + /// {@return `shadingRateMaxCoarseSamples`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shadingRateMaxCoarseSamples(MemorySegment segment) { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_shadingRateMaxCoarseSamples(segment, 0L); } + /// {@return `shadingRateMaxCoarseSamples` at the given index} + /// @param index the index + public @CType("uint32_t") int shadingRateMaxCoarseSamplesAt(long index) { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_shadingRateMaxCoarseSamples(this.segment(), index); } + /// {@return `shadingRateMaxCoarseSamples`} + public @CType("uint32_t") int shadingRateMaxCoarseSamples() { return VkPhysicalDeviceShadingRateImagePropertiesNV.get_shadingRateMaxCoarseSamples(this.segment()); } + /// Sets `shadingRateMaxCoarseSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRateMaxCoarseSamples(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shadingRateMaxCoarseSamples.set(segment, 0L, index, value); } + /// Sets `shadingRateMaxCoarseSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRateMaxCoarseSamples(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_shadingRateMaxCoarseSamples(segment, 0L, value); } + /// Sets `shadingRateMaxCoarseSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImagePropertiesNV shadingRateMaxCoarseSamplesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_shadingRateMaxCoarseSamples(this.segment(), index, value); return this; } + /// Sets `shadingRateMaxCoarseSamples` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShadingRateImagePropertiesNV shadingRateMaxCoarseSamples(@CType("uint32_t") int value) { VkPhysicalDeviceShadingRateImagePropertiesNV.set_shadingRateMaxCoarseSamples(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineCoverageModulationStateCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineCoverageModulationStateCreateInfoNV.java new file mode 100644 index 00000000..1c1a8cbc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineCoverageModulationStateCreateInfoNV.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### coverageModulationMode +/// [VarHandle][#VH_coverageModulationMode] - [Getter][#coverageModulationMode()] - [Setter][#coverageModulationMode(int)] +/// ### coverageModulationTableEnable +/// [VarHandle][#VH_coverageModulationTableEnable] - [Getter][#coverageModulationTableEnable()] - [Setter][#coverageModulationTableEnable(int)] +/// ### coverageModulationTableCount +/// [VarHandle][#VH_coverageModulationTableCount] - [Getter][#coverageModulationTableCount()] - [Setter][#coverageModulationTableCount(int)] +/// ### pCoverageModulationTable +/// [VarHandle][#VH_pCoverageModulationTable] - [Getter][#pCoverageModulationTable()] - [Setter][#pCoverageModulationTable(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCoverageModulationStateCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCoverageModulationStateCreateFlagsNV flags; +/// VkCoverageModulationModeNV coverageModulationMode; +/// VkBool32 coverageModulationTableEnable; +/// uint32_t coverageModulationTableCount; +/// const float * pCoverageModulationTable; +/// } VkPipelineCoverageModulationStateCreateInfoNV; +/// ``` +public final class VkPipelineCoverageModulationStateCreateInfoNV extends Struct { + /// The struct layout of `VkPipelineCoverageModulationStateCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("coverageModulationMode"), + ValueLayout.JAVA_INT.withName("coverageModulationTableEnable"), + ValueLayout.JAVA_INT.withName("coverageModulationTableCount"), + ValueLayout.ADDRESS.withName("pCoverageModulationTable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `coverageModulationMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_coverageModulationMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("coverageModulationMode")); + /// The [VarHandle] of `coverageModulationTableEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_coverageModulationTableEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("coverageModulationTableEnable")); + /// The [VarHandle] of `coverageModulationTableCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_coverageModulationTableCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("coverageModulationTableCount")); + /// The [VarHandle] of `pCoverageModulationTable` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCoverageModulationTable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCoverageModulationTable")); + + /// Creates `VkPipelineCoverageModulationStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineCoverageModulationStateCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCoverageModulationStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCoverageModulationStateCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCoverageModulationStateCreateInfoNV(segment); } + + /// Creates `VkPipelineCoverageModulationStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCoverageModulationStateCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCoverageModulationStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCoverageModulationStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCoverageModulationStateCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCoverageModulationStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCoverageModulationStateCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCoverageModulationStateCreateInfoNV` + public static VkPipelineCoverageModulationStateCreateInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineCoverageModulationStateCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCoverageModulationStateCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCoverageModulationStateCreateInfoNV` + public static VkPipelineCoverageModulationStateCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineCoverageModulationStateCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineCoverageModulationStateCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineCoverageModulationStateCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineCoverageModulationStateCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV sType(@CType("VkStructureType") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineCoverageModulationStateCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineCoverageModulationStateCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineCoverageModulationStateCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageModulationStateCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageModulationStateCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageModulationStateCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCoverageModulationStateCreateFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCoverageModulationStateCreateFlagsNV") int get_flags(MemorySegment segment) { return VkPipelineCoverageModulationStateCreateInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCoverageModulationStateCreateFlagsNV") int flagsAt(long index) { return VkPipelineCoverageModulationStateCreateInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCoverageModulationStateCreateFlagsNV") int flags() { return VkPipelineCoverageModulationStateCreateInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCoverageModulationStateCreateFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCoverageModulationStateCreateFlagsNV") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV flagsAt(long index, @CType("VkPipelineCoverageModulationStateCreateFlagsNV") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV flags(@CType("VkPipelineCoverageModulationStateCreateFlagsNV") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_flags(this.segment(), value); return this; } + + /// {@return `coverageModulationMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCoverageModulationModeNV") int get_coverageModulationMode(MemorySegment segment, long index) { return (int) VH_coverageModulationMode.get(segment, 0L, index); } + /// {@return `coverageModulationMode`} + /// @param segment the segment of the struct + public static @CType("VkCoverageModulationModeNV") int get_coverageModulationMode(MemorySegment segment) { return VkPipelineCoverageModulationStateCreateInfoNV.get_coverageModulationMode(segment, 0L); } + /// {@return `coverageModulationMode` at the given index} + /// @param index the index + public @CType("VkCoverageModulationModeNV") int coverageModulationModeAt(long index) { return VkPipelineCoverageModulationStateCreateInfoNV.get_coverageModulationMode(this.segment(), index); } + /// {@return `coverageModulationMode`} + public @CType("VkCoverageModulationModeNV") int coverageModulationMode() { return VkPipelineCoverageModulationStateCreateInfoNV.get_coverageModulationMode(this.segment()); } + /// Sets `coverageModulationMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_coverageModulationMode(MemorySegment segment, long index, @CType("VkCoverageModulationModeNV") int value) { VH_coverageModulationMode.set(segment, 0L, index, value); } + /// Sets `coverageModulationMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_coverageModulationMode(MemorySegment segment, @CType("VkCoverageModulationModeNV") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_coverageModulationMode(segment, 0L, value); } + /// Sets `coverageModulationMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationModeAt(long index, @CType("VkCoverageModulationModeNV") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_coverageModulationMode(this.segment(), index, value); return this; } + /// Sets `coverageModulationMode` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationMode(@CType("VkCoverageModulationModeNV") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_coverageModulationMode(this.segment(), value); return this; } + + /// {@return `coverageModulationTableEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_coverageModulationTableEnable(MemorySegment segment, long index) { return (int) VH_coverageModulationTableEnable.get(segment, 0L, index); } + /// {@return `coverageModulationTableEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_coverageModulationTableEnable(MemorySegment segment) { return VkPipelineCoverageModulationStateCreateInfoNV.get_coverageModulationTableEnable(segment, 0L); } + /// {@return `coverageModulationTableEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int coverageModulationTableEnableAt(long index) { return VkPipelineCoverageModulationStateCreateInfoNV.get_coverageModulationTableEnable(this.segment(), index); } + /// {@return `coverageModulationTableEnable`} + public @CType("VkBool32") int coverageModulationTableEnable() { return VkPipelineCoverageModulationStateCreateInfoNV.get_coverageModulationTableEnable(this.segment()); } + /// Sets `coverageModulationTableEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_coverageModulationTableEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_coverageModulationTableEnable.set(segment, 0L, index, value); } + /// Sets `coverageModulationTableEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_coverageModulationTableEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_coverageModulationTableEnable(segment, 0L, value); } + /// Sets `coverageModulationTableEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationTableEnableAt(long index, @CType("VkBool32") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_coverageModulationTableEnable(this.segment(), index, value); return this; } + /// Sets `coverageModulationTableEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationTableEnable(@CType("VkBool32") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_coverageModulationTableEnable(this.segment(), value); return this; } + + /// {@return `coverageModulationTableCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_coverageModulationTableCount(MemorySegment segment, long index) { return (int) VH_coverageModulationTableCount.get(segment, 0L, index); } + /// {@return `coverageModulationTableCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_coverageModulationTableCount(MemorySegment segment) { return VkPipelineCoverageModulationStateCreateInfoNV.get_coverageModulationTableCount(segment, 0L); } + /// {@return `coverageModulationTableCount` at the given index} + /// @param index the index + public @CType("uint32_t") int coverageModulationTableCountAt(long index) { return VkPipelineCoverageModulationStateCreateInfoNV.get_coverageModulationTableCount(this.segment(), index); } + /// {@return `coverageModulationTableCount`} + public @CType("uint32_t") int coverageModulationTableCount() { return VkPipelineCoverageModulationStateCreateInfoNV.get_coverageModulationTableCount(this.segment()); } + /// Sets `coverageModulationTableCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_coverageModulationTableCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_coverageModulationTableCount.set(segment, 0L, index, value); } + /// Sets `coverageModulationTableCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_coverageModulationTableCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_coverageModulationTableCount(segment, 0L, value); } + /// Sets `coverageModulationTableCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationTableCountAt(long index, @CType("uint32_t") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_coverageModulationTableCount(this.segment(), index, value); return this; } + /// Sets `coverageModulationTableCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationTableCount(@CType("uint32_t") int value) { VkPipelineCoverageModulationStateCreateInfoNV.set_coverageModulationTableCount(this.segment(), value); return this; } + + /// {@return `pCoverageModulationTable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const float *") java.lang.foreign.MemorySegment get_pCoverageModulationTable(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCoverageModulationTable.get(segment, 0L, index); } + /// {@return `pCoverageModulationTable`} + /// @param segment the segment of the struct + public static @CType("const float *") java.lang.foreign.MemorySegment get_pCoverageModulationTable(MemorySegment segment) { return VkPipelineCoverageModulationStateCreateInfoNV.get_pCoverageModulationTable(segment, 0L); } + /// {@return `pCoverageModulationTable` at the given index} + /// @param index the index + public @CType("const float *") java.lang.foreign.MemorySegment pCoverageModulationTableAt(long index) { return VkPipelineCoverageModulationStateCreateInfoNV.get_pCoverageModulationTable(this.segment(), index); } + /// {@return `pCoverageModulationTable`} + public @CType("const float *") java.lang.foreign.MemorySegment pCoverageModulationTable() { return VkPipelineCoverageModulationStateCreateInfoNV.get_pCoverageModulationTable(this.segment()); } + /// Sets `pCoverageModulationTable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCoverageModulationTable(MemorySegment segment, long index, @CType("const float *") java.lang.foreign.MemorySegment value) { VH_pCoverageModulationTable.set(segment, 0L, index, value); } + /// Sets `pCoverageModulationTable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCoverageModulationTable(MemorySegment segment, @CType("const float *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageModulationStateCreateInfoNV.set_pCoverageModulationTable(segment, 0L, value); } + /// Sets `pCoverageModulationTable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV pCoverageModulationTableAt(long index, @CType("const float *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageModulationStateCreateInfoNV.set_pCoverageModulationTable(this.segment(), index, value); return this; } + /// Sets `pCoverageModulationTable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageModulationStateCreateInfoNV pCoverageModulationTable(@CType("const float *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageModulationStateCreateInfoNV.set_pCoverageModulationTable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineCoverageReductionStateCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineCoverageReductionStateCreateInfoNV.java new file mode 100644 index 00000000..096b07ea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineCoverageReductionStateCreateInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### coverageReductionMode +/// [VarHandle][#VH_coverageReductionMode] - [Getter][#coverageReductionMode()] - [Setter][#coverageReductionMode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCoverageReductionStateCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCoverageReductionStateCreateFlagsNV flags; +/// VkCoverageReductionModeNV coverageReductionMode; +/// } VkPipelineCoverageReductionStateCreateInfoNV; +/// ``` +public final class VkPipelineCoverageReductionStateCreateInfoNV extends Struct { + /// The struct layout of `VkPipelineCoverageReductionStateCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("coverageReductionMode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `coverageReductionMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_coverageReductionMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("coverageReductionMode")); + + /// Creates `VkPipelineCoverageReductionStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineCoverageReductionStateCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCoverageReductionStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCoverageReductionStateCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCoverageReductionStateCreateInfoNV(segment); } + + /// Creates `VkPipelineCoverageReductionStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCoverageReductionStateCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCoverageReductionStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCoverageReductionStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCoverageReductionStateCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCoverageReductionStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCoverageReductionStateCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCoverageReductionStateCreateInfoNV` + public static VkPipelineCoverageReductionStateCreateInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineCoverageReductionStateCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCoverageReductionStateCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCoverageReductionStateCreateInfoNV` + public static VkPipelineCoverageReductionStateCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineCoverageReductionStateCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineCoverageReductionStateCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineCoverageReductionStateCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineCoverageReductionStateCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineCoverageReductionStateCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageReductionStateCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineCoverageReductionStateCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageReductionStateCreateInfoNV sType(@CType("VkStructureType") int value) { VkPipelineCoverageReductionStateCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineCoverageReductionStateCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineCoverageReductionStateCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineCoverageReductionStateCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageReductionStateCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageReductionStateCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageReductionStateCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageReductionStateCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageReductionStateCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCoverageReductionStateCreateFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCoverageReductionStateCreateFlagsNV") int get_flags(MemorySegment segment) { return VkPipelineCoverageReductionStateCreateInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCoverageReductionStateCreateFlagsNV") int flagsAt(long index) { return VkPipelineCoverageReductionStateCreateInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCoverageReductionStateCreateFlagsNV") int flags() { return VkPipelineCoverageReductionStateCreateInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCoverageReductionStateCreateFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCoverageReductionStateCreateFlagsNV") int value) { VkPipelineCoverageReductionStateCreateInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageReductionStateCreateInfoNV flagsAt(long index, @CType("VkPipelineCoverageReductionStateCreateFlagsNV") int value) { VkPipelineCoverageReductionStateCreateInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageReductionStateCreateInfoNV flags(@CType("VkPipelineCoverageReductionStateCreateFlagsNV") int value) { VkPipelineCoverageReductionStateCreateInfoNV.set_flags(this.segment(), value); return this; } + + /// {@return `coverageReductionMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCoverageReductionModeNV") int get_coverageReductionMode(MemorySegment segment, long index) { return (int) VH_coverageReductionMode.get(segment, 0L, index); } + /// {@return `coverageReductionMode`} + /// @param segment the segment of the struct + public static @CType("VkCoverageReductionModeNV") int get_coverageReductionMode(MemorySegment segment) { return VkPipelineCoverageReductionStateCreateInfoNV.get_coverageReductionMode(segment, 0L); } + /// {@return `coverageReductionMode` at the given index} + /// @param index the index + public @CType("VkCoverageReductionModeNV") int coverageReductionModeAt(long index) { return VkPipelineCoverageReductionStateCreateInfoNV.get_coverageReductionMode(this.segment(), index); } + /// {@return `coverageReductionMode`} + public @CType("VkCoverageReductionModeNV") int coverageReductionMode() { return VkPipelineCoverageReductionStateCreateInfoNV.get_coverageReductionMode(this.segment()); } + /// Sets `coverageReductionMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_coverageReductionMode(MemorySegment segment, long index, @CType("VkCoverageReductionModeNV") int value) { VH_coverageReductionMode.set(segment, 0L, index, value); } + /// Sets `coverageReductionMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_coverageReductionMode(MemorySegment segment, @CType("VkCoverageReductionModeNV") int value) { VkPipelineCoverageReductionStateCreateInfoNV.set_coverageReductionMode(segment, 0L, value); } + /// Sets `coverageReductionMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageReductionStateCreateInfoNV coverageReductionModeAt(long index, @CType("VkCoverageReductionModeNV") int value) { VkPipelineCoverageReductionStateCreateInfoNV.set_coverageReductionMode(this.segment(), index, value); return this; } + /// Sets `coverageReductionMode` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageReductionStateCreateInfoNV coverageReductionMode(@CType("VkCoverageReductionModeNV") int value) { VkPipelineCoverageReductionStateCreateInfoNV.set_coverageReductionMode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineCoverageToColorStateCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineCoverageToColorStateCreateInfoNV.java new file mode 100644 index 00000000..4267de93 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineCoverageToColorStateCreateInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### coverageToColorEnable +/// [VarHandle][#VH_coverageToColorEnable] - [Getter][#coverageToColorEnable()] - [Setter][#coverageToColorEnable(int)] +/// ### coverageToColorLocation +/// [VarHandle][#VH_coverageToColorLocation] - [Getter][#coverageToColorLocation()] - [Setter][#coverageToColorLocation(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCoverageToColorStateCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCoverageToColorStateCreateFlagsNV flags; +/// VkBool32 coverageToColorEnable; +/// uint32_t coverageToColorLocation; +/// } VkPipelineCoverageToColorStateCreateInfoNV; +/// ``` +public final class VkPipelineCoverageToColorStateCreateInfoNV extends Struct { + /// The struct layout of `VkPipelineCoverageToColorStateCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("coverageToColorEnable"), + ValueLayout.JAVA_INT.withName("coverageToColorLocation") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `coverageToColorEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_coverageToColorEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("coverageToColorEnable")); + /// The [VarHandle] of `coverageToColorLocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_coverageToColorLocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("coverageToColorLocation")); + + /// Creates `VkPipelineCoverageToColorStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineCoverageToColorStateCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCoverageToColorStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCoverageToColorStateCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCoverageToColorStateCreateInfoNV(segment); } + + /// Creates `VkPipelineCoverageToColorStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCoverageToColorStateCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCoverageToColorStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCoverageToColorStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCoverageToColorStateCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCoverageToColorStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCoverageToColorStateCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCoverageToColorStateCreateInfoNV` + public static VkPipelineCoverageToColorStateCreateInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineCoverageToColorStateCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCoverageToColorStateCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCoverageToColorStateCreateInfoNV` + public static VkPipelineCoverageToColorStateCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineCoverageToColorStateCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineCoverageToColorStateCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineCoverageToColorStateCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineCoverageToColorStateCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageToColorStateCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageToColorStateCreateInfoNV sType(@CType("VkStructureType") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineCoverageToColorStateCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineCoverageToColorStateCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineCoverageToColorStateCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageToColorStateCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageToColorStateCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageToColorStateCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageToColorStateCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCoverageToColorStateCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCoverageToColorStateCreateFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCoverageToColorStateCreateFlagsNV") int get_flags(MemorySegment segment) { return VkPipelineCoverageToColorStateCreateInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCoverageToColorStateCreateFlagsNV") int flagsAt(long index) { return VkPipelineCoverageToColorStateCreateInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCoverageToColorStateCreateFlagsNV") int flags() { return VkPipelineCoverageToColorStateCreateInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCoverageToColorStateCreateFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCoverageToColorStateCreateFlagsNV") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageToColorStateCreateInfoNV flagsAt(long index, @CType("VkPipelineCoverageToColorStateCreateFlagsNV") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageToColorStateCreateInfoNV flags(@CType("VkPipelineCoverageToColorStateCreateFlagsNV") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_flags(this.segment(), value); return this; } + + /// {@return `coverageToColorEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_coverageToColorEnable(MemorySegment segment, long index) { return (int) VH_coverageToColorEnable.get(segment, 0L, index); } + /// {@return `coverageToColorEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_coverageToColorEnable(MemorySegment segment) { return VkPipelineCoverageToColorStateCreateInfoNV.get_coverageToColorEnable(segment, 0L); } + /// {@return `coverageToColorEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int coverageToColorEnableAt(long index) { return VkPipelineCoverageToColorStateCreateInfoNV.get_coverageToColorEnable(this.segment(), index); } + /// {@return `coverageToColorEnable`} + public @CType("VkBool32") int coverageToColorEnable() { return VkPipelineCoverageToColorStateCreateInfoNV.get_coverageToColorEnable(this.segment()); } + /// Sets `coverageToColorEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_coverageToColorEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_coverageToColorEnable.set(segment, 0L, index, value); } + /// Sets `coverageToColorEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_coverageToColorEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_coverageToColorEnable(segment, 0L, value); } + /// Sets `coverageToColorEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageToColorStateCreateInfoNV coverageToColorEnableAt(long index, @CType("VkBool32") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_coverageToColorEnable(this.segment(), index, value); return this; } + /// Sets `coverageToColorEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageToColorStateCreateInfoNV coverageToColorEnable(@CType("VkBool32") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_coverageToColorEnable(this.segment(), value); return this; } + + /// {@return `coverageToColorLocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_coverageToColorLocation(MemorySegment segment, long index) { return (int) VH_coverageToColorLocation.get(segment, 0L, index); } + /// {@return `coverageToColorLocation`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_coverageToColorLocation(MemorySegment segment) { return VkPipelineCoverageToColorStateCreateInfoNV.get_coverageToColorLocation(segment, 0L); } + /// {@return `coverageToColorLocation` at the given index} + /// @param index the index + public @CType("uint32_t") int coverageToColorLocationAt(long index) { return VkPipelineCoverageToColorStateCreateInfoNV.get_coverageToColorLocation(this.segment(), index); } + /// {@return `coverageToColorLocation`} + public @CType("uint32_t") int coverageToColorLocation() { return VkPipelineCoverageToColorStateCreateInfoNV.get_coverageToColorLocation(this.segment()); } + /// Sets `coverageToColorLocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_coverageToColorLocation(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_coverageToColorLocation.set(segment, 0L, index, value); } + /// Sets `coverageToColorLocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_coverageToColorLocation(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_coverageToColorLocation(segment, 0L, value); } + /// Sets `coverageToColorLocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCoverageToColorStateCreateInfoNV coverageToColorLocationAt(long index, @CType("uint32_t") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_coverageToColorLocation(this.segment(), index, value); return this; } + /// Sets `coverageToColorLocation` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCoverageToColorStateCreateInfoNV coverageToColorLocation(@CType("uint32_t") int value) { VkPipelineCoverageToColorStateCreateInfoNV.set_coverageToColorLocation(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineFragmentShadingRateEnumStateCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineFragmentShadingRateEnumStateCreateInfoNV.java new file mode 100644 index 00000000..3247f143 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineFragmentShadingRateEnumStateCreateInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shadingRateType +/// [VarHandle][#VH_shadingRateType] - [Getter][#shadingRateType()] - [Setter][#shadingRateType(int)] +/// ### shadingRate +/// [VarHandle][#VH_shadingRate] - [Getter][#shadingRate()] - [Setter][#shadingRate(int)] +/// ### combinerOps +/// [VarHandle][#VH_combinerOps] - [Getter][#combinerOps()] - [Setter][#combinerOps(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineFragmentShadingRateEnumStateCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkFragmentShadingRateTypeNV shadingRateType; +/// VkFragmentShadingRateNV shadingRate; +/// VkFragmentShadingRateCombinerOpKHR combinerOps; +/// } VkPipelineFragmentShadingRateEnumStateCreateInfoNV; +/// ``` +public final class VkPipelineFragmentShadingRateEnumStateCreateInfoNV extends Struct { + /// The struct layout of `VkPipelineFragmentShadingRateEnumStateCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shadingRateType"), + ValueLayout.JAVA_INT.withName("shadingRate"), + ValueLayout.JAVA_INT.withName("combinerOps") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shadingRateType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shadingRateType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shadingRateType")); + /// The [VarHandle] of `shadingRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shadingRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shadingRate")); + /// The [VarHandle] of `combinerOps` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_combinerOps = LAYOUT.arrayElementVarHandle(PathElement.groupElement("combinerOps")); + + /// Creates `VkPipelineFragmentShadingRateEnumStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineFragmentShadingRateEnumStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineFragmentShadingRateEnumStateCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineFragmentShadingRateEnumStateCreateInfoNV(segment); } + + /// Creates `VkPipelineFragmentShadingRateEnumStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineFragmentShadingRateEnumStateCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineFragmentShadingRateEnumStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineFragmentShadingRateEnumStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineFragmentShadingRateEnumStateCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineFragmentShadingRateEnumStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineFragmentShadingRateEnumStateCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineFragmentShadingRateEnumStateCreateInfoNV` + public static VkPipelineFragmentShadingRateEnumStateCreateInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineFragmentShadingRateEnumStateCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineFragmentShadingRateEnumStateCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineFragmentShadingRateEnumStateCreateInfoNV` + public static VkPipelineFragmentShadingRateEnumStateCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineFragmentShadingRateEnumStateCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV sType(@CType("VkStructureType") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `shadingRateType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFragmentShadingRateTypeNV") int get_shadingRateType(MemorySegment segment, long index) { return (int) VH_shadingRateType.get(segment, 0L, index); } + /// {@return `shadingRateType`} + /// @param segment the segment of the struct + public static @CType("VkFragmentShadingRateTypeNV") int get_shadingRateType(MemorySegment segment) { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_shadingRateType(segment, 0L); } + /// {@return `shadingRateType` at the given index} + /// @param index the index + public @CType("VkFragmentShadingRateTypeNV") int shadingRateTypeAt(long index) { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_shadingRateType(this.segment(), index); } + /// {@return `shadingRateType`} + public @CType("VkFragmentShadingRateTypeNV") int shadingRateType() { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_shadingRateType(this.segment()); } + /// Sets `shadingRateType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRateType(MemorySegment segment, long index, @CType("VkFragmentShadingRateTypeNV") int value) { VH_shadingRateType.set(segment, 0L, index, value); } + /// Sets `shadingRateType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRateType(MemorySegment segment, @CType("VkFragmentShadingRateTypeNV") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_shadingRateType(segment, 0L, value); } + /// Sets `shadingRateType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV shadingRateTypeAt(long index, @CType("VkFragmentShadingRateTypeNV") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_shadingRateType(this.segment(), index, value); return this; } + /// Sets `shadingRateType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV shadingRateType(@CType("VkFragmentShadingRateTypeNV") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_shadingRateType(this.segment(), value); return this; } + + /// {@return `shadingRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFragmentShadingRateNV") int get_shadingRate(MemorySegment segment, long index) { return (int) VH_shadingRate.get(segment, 0L, index); } + /// {@return `shadingRate`} + /// @param segment the segment of the struct + public static @CType("VkFragmentShadingRateNV") int get_shadingRate(MemorySegment segment) { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_shadingRate(segment, 0L); } + /// {@return `shadingRate` at the given index} + /// @param index the index + public @CType("VkFragmentShadingRateNV") int shadingRateAt(long index) { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_shadingRate(this.segment(), index); } + /// {@return `shadingRate`} + public @CType("VkFragmentShadingRateNV") int shadingRate() { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_shadingRate(this.segment()); } + /// Sets `shadingRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRate(MemorySegment segment, long index, @CType("VkFragmentShadingRateNV") int value) { VH_shadingRate.set(segment, 0L, index, value); } + /// Sets `shadingRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRate(MemorySegment segment, @CType("VkFragmentShadingRateNV") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_shadingRate(segment, 0L, value); } + /// Sets `shadingRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV shadingRateAt(long index, @CType("VkFragmentShadingRateNV") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_shadingRate(this.segment(), index, value); return this; } + /// Sets `shadingRate` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV shadingRate(@CType("VkFragmentShadingRateNV") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_shadingRate(this.segment(), value); return this; } + + /// {@return `combinerOps` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFragmentShadingRateCombinerOpKHR") int get_combinerOps(MemorySegment segment, long index) { return (int) VH_combinerOps.get(segment, 0L, index); } + /// {@return `combinerOps`} + /// @param segment the segment of the struct + public static @CType("VkFragmentShadingRateCombinerOpKHR") int get_combinerOps(MemorySegment segment) { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_combinerOps(segment, 0L); } + /// {@return `combinerOps` at the given index} + /// @param index the index + public @CType("VkFragmentShadingRateCombinerOpKHR") int combinerOpsAt(long index) { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_combinerOps(this.segment(), index); } + /// {@return `combinerOps`} + public @CType("VkFragmentShadingRateCombinerOpKHR") int combinerOps() { return VkPipelineFragmentShadingRateEnumStateCreateInfoNV.get_combinerOps(this.segment()); } + /// Sets `combinerOps` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_combinerOps(MemorySegment segment, long index, @CType("VkFragmentShadingRateCombinerOpKHR") int value) { VH_combinerOps.set(segment, 0L, index, value); } + /// Sets `combinerOps` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_combinerOps(MemorySegment segment, @CType("VkFragmentShadingRateCombinerOpKHR") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_combinerOps(segment, 0L, value); } + /// Sets `combinerOps` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV combinerOpsAt(long index, @CType("VkFragmentShadingRateCombinerOpKHR") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_combinerOps(this.segment(), index, value); return this; } + /// Sets `combinerOps` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineFragmentShadingRateEnumStateCreateInfoNV combinerOps(@CType("VkFragmentShadingRateCombinerOpKHR") int value) { VkPipelineFragmentShadingRateEnumStateCreateInfoNV.set_combinerOps(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineIndirectDeviceAddressInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineIndirectDeviceAddressInfoNV.java new file mode 100644 index 00000000..e6c4f437 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineIndirectDeviceAddressInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineBindPoint +/// [VarHandle][#VH_pipelineBindPoint] - [Getter][#pipelineBindPoint()] - [Setter][#pipelineBindPoint(int)] +/// ### pipeline +/// [VarHandle][#VH_pipeline] - [Getter][#pipeline()] - [Setter][#pipeline(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineIndirectDeviceAddressInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineBindPoint pipelineBindPoint; +/// VkPipeline pipeline; +/// } VkPipelineIndirectDeviceAddressInfoNV; +/// ``` +public final class VkPipelineIndirectDeviceAddressInfoNV extends Struct { + /// The struct layout of `VkPipelineIndirectDeviceAddressInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineBindPoint"), + ValueLayout.ADDRESS.withName("pipeline") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineBindPoint` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBindPoint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBindPoint")); + /// The [VarHandle] of `pipeline` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipeline = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipeline")); + + /// Creates `VkPipelineIndirectDeviceAddressInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineIndirectDeviceAddressInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineIndirectDeviceAddressInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineIndirectDeviceAddressInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineIndirectDeviceAddressInfoNV(segment); } + + /// Creates `VkPipelineIndirectDeviceAddressInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineIndirectDeviceAddressInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineIndirectDeviceAddressInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineIndirectDeviceAddressInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineIndirectDeviceAddressInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineIndirectDeviceAddressInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineIndirectDeviceAddressInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineIndirectDeviceAddressInfoNV` + public static VkPipelineIndirectDeviceAddressInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineIndirectDeviceAddressInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineIndirectDeviceAddressInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineIndirectDeviceAddressInfoNV` + public static VkPipelineIndirectDeviceAddressInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineIndirectDeviceAddressInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineIndirectDeviceAddressInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineIndirectDeviceAddressInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineIndirectDeviceAddressInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineIndirectDeviceAddressInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineIndirectDeviceAddressInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineIndirectDeviceAddressInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineIndirectDeviceAddressInfoNV sType(@CType("VkStructureType") int value) { VkPipelineIndirectDeviceAddressInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineIndirectDeviceAddressInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineIndirectDeviceAddressInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineIndirectDeviceAddressInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineIndirectDeviceAddressInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineIndirectDeviceAddressInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineIndirectDeviceAddressInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineIndirectDeviceAddressInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineIndirectDeviceAddressInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineBindPoint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment, long index) { return (int) VH_pipelineBindPoint.get(segment, 0L, index); } + /// {@return `pipelineBindPoint`} + /// @param segment the segment of the struct + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment) { return VkPipelineIndirectDeviceAddressInfoNV.get_pipelineBindPoint(segment, 0L); } + /// {@return `pipelineBindPoint` at the given index} + /// @param index the index + public @CType("VkPipelineBindPoint") int pipelineBindPointAt(long index) { return VkPipelineIndirectDeviceAddressInfoNV.get_pipelineBindPoint(this.segment(), index); } + /// {@return `pipelineBindPoint`} + public @CType("VkPipelineBindPoint") int pipelineBindPoint() { return VkPipelineIndirectDeviceAddressInfoNV.get_pipelineBindPoint(this.segment()); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, long index, @CType("VkPipelineBindPoint") int value) { VH_pipelineBindPoint.set(segment, 0L, index, value); } + /// Sets `pipelineBindPoint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, @CType("VkPipelineBindPoint") int value) { VkPipelineIndirectDeviceAddressInfoNV.set_pipelineBindPoint(segment, 0L, value); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineIndirectDeviceAddressInfoNV pipelineBindPointAt(long index, @CType("VkPipelineBindPoint") int value) { VkPipelineIndirectDeviceAddressInfoNV.set_pipelineBindPoint(this.segment(), index, value); return this; } + /// Sets `pipelineBindPoint` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineIndirectDeviceAddressInfoNV pipelineBindPoint(@CType("VkPipelineBindPoint") int value) { VkPipelineIndirectDeviceAddressInfoNV.set_pipelineBindPoint(this.segment(), value); return this; } + + /// {@return `pipeline` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipeline.get(segment, 0L, index); } + /// {@return `pipeline`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_pipeline(MemorySegment segment) { return VkPipelineIndirectDeviceAddressInfoNV.get_pipeline(segment, 0L); } + /// {@return `pipeline` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipelineAt(long index) { return VkPipelineIndirectDeviceAddressInfoNV.get_pipeline(this.segment(), index); } + /// {@return `pipeline`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment pipeline() { return VkPipelineIndirectDeviceAddressInfoNV.get_pipeline(this.segment()); } + /// Sets `pipeline` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipeline(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_pipeline.set(segment, 0L, index, value); } + /// Sets `pipeline` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipeline(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineIndirectDeviceAddressInfoNV.set_pipeline(segment, 0L, value); } + /// Sets `pipeline` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineIndirectDeviceAddressInfoNV pipelineAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineIndirectDeviceAddressInfoNV.set_pipeline(this.segment(), index, value); return this; } + /// Sets `pipeline` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineIndirectDeviceAddressInfoNV pipeline(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkPipelineIndirectDeviceAddressInfoNV.set_pipeline(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineRepresentativeFragmentTestStateCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineRepresentativeFragmentTestStateCreateInfoNV.java new file mode 100644 index 00000000..f469ad7c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineRepresentativeFragmentTestStateCreateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### representativeFragmentTestEnable +/// [VarHandle][#VH_representativeFragmentTestEnable] - [Getter][#representativeFragmentTestEnable()] - [Setter][#representativeFragmentTestEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineRepresentativeFragmentTestStateCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 representativeFragmentTestEnable; +/// } VkPipelineRepresentativeFragmentTestStateCreateInfoNV; +/// ``` +public final class VkPipelineRepresentativeFragmentTestStateCreateInfoNV extends Struct { + /// The struct layout of `VkPipelineRepresentativeFragmentTestStateCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("representativeFragmentTestEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `representativeFragmentTestEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_representativeFragmentTestEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("representativeFragmentTestEnable")); + + /// Creates `VkPipelineRepresentativeFragmentTestStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineRepresentativeFragmentTestStateCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineRepresentativeFragmentTestStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRepresentativeFragmentTestStateCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRepresentativeFragmentTestStateCreateInfoNV(segment); } + + /// Creates `VkPipelineRepresentativeFragmentTestStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRepresentativeFragmentTestStateCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRepresentativeFragmentTestStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineRepresentativeFragmentTestStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRepresentativeFragmentTestStateCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRepresentativeFragmentTestStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineRepresentativeFragmentTestStateCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineRepresentativeFragmentTestStateCreateInfoNV` + public static VkPipelineRepresentativeFragmentTestStateCreateInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineRepresentativeFragmentTestStateCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineRepresentativeFragmentTestStateCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineRepresentativeFragmentTestStateCreateInfoNV` + public static VkPipelineRepresentativeFragmentTestStateCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineRepresentativeFragmentTestStateCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineRepresentativeFragmentTestStateCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineRepresentativeFragmentTestStateCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineRepresentativeFragmentTestStateCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineRepresentativeFragmentTestStateCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRepresentativeFragmentTestStateCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineRepresentativeFragmentTestStateCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRepresentativeFragmentTestStateCreateInfoNV sType(@CType("VkStructureType") int value) { VkPipelineRepresentativeFragmentTestStateCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineRepresentativeFragmentTestStateCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineRepresentativeFragmentTestStateCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineRepresentativeFragmentTestStateCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRepresentativeFragmentTestStateCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRepresentativeFragmentTestStateCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRepresentativeFragmentTestStateCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRepresentativeFragmentTestStateCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRepresentativeFragmentTestStateCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `representativeFragmentTestEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_representativeFragmentTestEnable(MemorySegment segment, long index) { return (int) VH_representativeFragmentTestEnable.get(segment, 0L, index); } + /// {@return `representativeFragmentTestEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_representativeFragmentTestEnable(MemorySegment segment) { return VkPipelineRepresentativeFragmentTestStateCreateInfoNV.get_representativeFragmentTestEnable(segment, 0L); } + /// {@return `representativeFragmentTestEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int representativeFragmentTestEnableAt(long index) { return VkPipelineRepresentativeFragmentTestStateCreateInfoNV.get_representativeFragmentTestEnable(this.segment(), index); } + /// {@return `representativeFragmentTestEnable`} + public @CType("VkBool32") int representativeFragmentTestEnable() { return VkPipelineRepresentativeFragmentTestStateCreateInfoNV.get_representativeFragmentTestEnable(this.segment()); } + /// Sets `representativeFragmentTestEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_representativeFragmentTestEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_representativeFragmentTestEnable.set(segment, 0L, index, value); } + /// Sets `representativeFragmentTestEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_representativeFragmentTestEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineRepresentativeFragmentTestStateCreateInfoNV.set_representativeFragmentTestEnable(segment, 0L, value); } + /// Sets `representativeFragmentTestEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRepresentativeFragmentTestStateCreateInfoNV representativeFragmentTestEnableAt(long index, @CType("VkBool32") int value) { VkPipelineRepresentativeFragmentTestStateCreateInfoNV.set_representativeFragmentTestEnable(this.segment(), index, value); return this; } + /// Sets `representativeFragmentTestEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRepresentativeFragmentTestStateCreateInfoNV representativeFragmentTestEnable(@CType("VkBool32") int value) { VkPipelineRepresentativeFragmentTestStateCreateInfoNV.set_representativeFragmentTestEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.java new file mode 100644 index 00000000..bafb6e41 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### sampleOrderType +/// [VarHandle][#VH_sampleOrderType] - [Getter][#sampleOrderType()] - [Setter][#sampleOrderType(int)] +/// ### customSampleOrderCount +/// [VarHandle][#VH_customSampleOrderCount] - [Getter][#customSampleOrderCount()] - [Setter][#customSampleOrderCount(int)] +/// ### pCustomSampleOrders +/// [VarHandle][#VH_pCustomSampleOrders] - [Getter][#pCustomSampleOrders()] - [Setter][#pCustomSampleOrders(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineViewportCoarseSampleOrderStateCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkCoarseSampleOrderTypeNV sampleOrderType; +/// uint32_t customSampleOrderCount; +/// const VkCoarseSampleOrderCustomNV * pCustomSampleOrders; +/// } VkPipelineViewportCoarseSampleOrderStateCreateInfoNV; +/// ``` +public final class VkPipelineViewportCoarseSampleOrderStateCreateInfoNV extends Struct { + /// The struct layout of `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("sampleOrderType"), + ValueLayout.JAVA_INT.withName("customSampleOrderCount"), + ValueLayout.ADDRESS.withName("pCustomSampleOrders") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `sampleOrderType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleOrderType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleOrderType")); + /// The [VarHandle] of `customSampleOrderCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_customSampleOrderCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("customSampleOrderCount")); + /// The [VarHandle] of `pCustomSampleOrders` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCustomSampleOrders = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCustomSampleOrders")); + + /// Creates `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportCoarseSampleOrderStateCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportCoarseSampleOrderStateCreateInfoNV(segment); } + + /// Creates `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportCoarseSampleOrderStateCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportCoarseSampleOrderStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportCoarseSampleOrderStateCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportCoarseSampleOrderStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` + public static VkPipelineViewportCoarseSampleOrderStateCreateInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineViewportCoarseSampleOrderStateCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineViewportCoarseSampleOrderStateCreateInfoNV` + public static VkPipelineViewportCoarseSampleOrderStateCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineViewportCoarseSampleOrderStateCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV sType(@CType("VkStructureType") int value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `sampleOrderType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCoarseSampleOrderTypeNV") int get_sampleOrderType(MemorySegment segment, long index) { return (int) VH_sampleOrderType.get(segment, 0L, index); } + /// {@return `sampleOrderType`} + /// @param segment the segment of the struct + public static @CType("VkCoarseSampleOrderTypeNV") int get_sampleOrderType(MemorySegment segment) { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_sampleOrderType(segment, 0L); } + /// {@return `sampleOrderType` at the given index} + /// @param index the index + public @CType("VkCoarseSampleOrderTypeNV") int sampleOrderTypeAt(long index) { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_sampleOrderType(this.segment(), index); } + /// {@return `sampleOrderType`} + public @CType("VkCoarseSampleOrderTypeNV") int sampleOrderType() { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_sampleOrderType(this.segment()); } + /// Sets `sampleOrderType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleOrderType(MemorySegment segment, long index, @CType("VkCoarseSampleOrderTypeNV") int value) { VH_sampleOrderType.set(segment, 0L, index, value); } + /// Sets `sampleOrderType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleOrderType(MemorySegment segment, @CType("VkCoarseSampleOrderTypeNV") int value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_sampleOrderType(segment, 0L, value); } + /// Sets `sampleOrderType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV sampleOrderTypeAt(long index, @CType("VkCoarseSampleOrderTypeNV") int value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_sampleOrderType(this.segment(), index, value); return this; } + /// Sets `sampleOrderType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV sampleOrderType(@CType("VkCoarseSampleOrderTypeNV") int value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_sampleOrderType(this.segment(), value); return this; } + + /// {@return `customSampleOrderCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_customSampleOrderCount(MemorySegment segment, long index) { return (int) VH_customSampleOrderCount.get(segment, 0L, index); } + /// {@return `customSampleOrderCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_customSampleOrderCount(MemorySegment segment) { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_customSampleOrderCount(segment, 0L); } + /// {@return `customSampleOrderCount` at the given index} + /// @param index the index + public @CType("uint32_t") int customSampleOrderCountAt(long index) { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_customSampleOrderCount(this.segment(), index); } + /// {@return `customSampleOrderCount`} + public @CType("uint32_t") int customSampleOrderCount() { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_customSampleOrderCount(this.segment()); } + /// Sets `customSampleOrderCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_customSampleOrderCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_customSampleOrderCount.set(segment, 0L, index, value); } + /// Sets `customSampleOrderCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_customSampleOrderCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_customSampleOrderCount(segment, 0L, value); } + /// Sets `customSampleOrderCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV customSampleOrderCountAt(long index, @CType("uint32_t") int value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_customSampleOrderCount(this.segment(), index, value); return this; } + /// Sets `customSampleOrderCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV customSampleOrderCount(@CType("uint32_t") int value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_customSampleOrderCount(this.segment(), value); return this; } + + /// {@return `pCustomSampleOrders` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkCoarseSampleOrderCustomNV *") java.lang.foreign.MemorySegment get_pCustomSampleOrders(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCustomSampleOrders.get(segment, 0L, index); } + /// {@return `pCustomSampleOrders`} + /// @param segment the segment of the struct + public static @CType("const VkCoarseSampleOrderCustomNV *") java.lang.foreign.MemorySegment get_pCustomSampleOrders(MemorySegment segment) { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_pCustomSampleOrders(segment, 0L); } + /// {@return `pCustomSampleOrders` at the given index} + /// @param index the index + public @CType("const VkCoarseSampleOrderCustomNV *") java.lang.foreign.MemorySegment pCustomSampleOrdersAt(long index) { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_pCustomSampleOrders(this.segment(), index); } + /// {@return `pCustomSampleOrders`} + public @CType("const VkCoarseSampleOrderCustomNV *") java.lang.foreign.MemorySegment pCustomSampleOrders() { return VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.get_pCustomSampleOrders(this.segment()); } + /// Sets `pCustomSampleOrders` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCustomSampleOrders(MemorySegment segment, long index, @CType("const VkCoarseSampleOrderCustomNV *") java.lang.foreign.MemorySegment value) { VH_pCustomSampleOrders.set(segment, 0L, index, value); } + /// Sets `pCustomSampleOrders` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCustomSampleOrders(MemorySegment segment, @CType("const VkCoarseSampleOrderCustomNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_pCustomSampleOrders(segment, 0L, value); } + /// Sets `pCustomSampleOrders` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV pCustomSampleOrdersAt(long index, @CType("const VkCoarseSampleOrderCustomNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_pCustomSampleOrders(this.segment(), index, value); return this; } + /// Sets `pCustomSampleOrders` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportCoarseSampleOrderStateCreateInfoNV pCustomSampleOrders(@CType("const VkCoarseSampleOrderCustomNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.set_pCustomSampleOrders(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportExclusiveScissorStateCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportExclusiveScissorStateCreateInfoNV.java new file mode 100644 index 00000000..8bb0b9e9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportExclusiveScissorStateCreateInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### exclusiveScissorCount +/// [VarHandle][#VH_exclusiveScissorCount] - [Getter][#exclusiveScissorCount()] - [Setter][#exclusiveScissorCount(int)] +/// ### pExclusiveScissors +/// [VarHandle][#VH_pExclusiveScissors] - [Getter][#pExclusiveScissors()] - [Setter][#pExclusiveScissors(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineViewportExclusiveScissorStateCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t exclusiveScissorCount; +/// const VkRect2D * pExclusiveScissors; +/// } VkPipelineViewportExclusiveScissorStateCreateInfoNV; +/// ``` +public final class VkPipelineViewportExclusiveScissorStateCreateInfoNV extends Struct { + /// The struct layout of `VkPipelineViewportExclusiveScissorStateCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("exclusiveScissorCount"), + ValueLayout.ADDRESS.withName("pExclusiveScissors") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `exclusiveScissorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_exclusiveScissorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("exclusiveScissorCount")); + /// The [VarHandle] of `pExclusiveScissors` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pExclusiveScissors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pExclusiveScissors")); + + /// Creates `VkPipelineViewportExclusiveScissorStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineViewportExclusiveScissorStateCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineViewportExclusiveScissorStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportExclusiveScissorStateCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportExclusiveScissorStateCreateInfoNV(segment); } + + /// Creates `VkPipelineViewportExclusiveScissorStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportExclusiveScissorStateCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportExclusiveScissorStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineViewportExclusiveScissorStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportExclusiveScissorStateCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportExclusiveScissorStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineViewportExclusiveScissorStateCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineViewportExclusiveScissorStateCreateInfoNV` + public static VkPipelineViewportExclusiveScissorStateCreateInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineViewportExclusiveScissorStateCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineViewportExclusiveScissorStateCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineViewportExclusiveScissorStateCreateInfoNV` + public static VkPipelineViewportExclusiveScissorStateCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineViewportExclusiveScissorStateCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportExclusiveScissorStateCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportExclusiveScissorStateCreateInfoNV sType(@CType("VkStructureType") int value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportExclusiveScissorStateCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportExclusiveScissorStateCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `exclusiveScissorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_exclusiveScissorCount(MemorySegment segment, long index) { return (int) VH_exclusiveScissorCount.get(segment, 0L, index); } + /// {@return `exclusiveScissorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_exclusiveScissorCount(MemorySegment segment) { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_exclusiveScissorCount(segment, 0L); } + /// {@return `exclusiveScissorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int exclusiveScissorCountAt(long index) { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_exclusiveScissorCount(this.segment(), index); } + /// {@return `exclusiveScissorCount`} + public @CType("uint32_t") int exclusiveScissorCount() { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_exclusiveScissorCount(this.segment()); } + /// Sets `exclusiveScissorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_exclusiveScissorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_exclusiveScissorCount.set(segment, 0L, index, value); } + /// Sets `exclusiveScissorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_exclusiveScissorCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_exclusiveScissorCount(segment, 0L, value); } + /// Sets `exclusiveScissorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportExclusiveScissorStateCreateInfoNV exclusiveScissorCountAt(long index, @CType("uint32_t") int value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_exclusiveScissorCount(this.segment(), index, value); return this; } + /// Sets `exclusiveScissorCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportExclusiveScissorStateCreateInfoNV exclusiveScissorCount(@CType("uint32_t") int value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_exclusiveScissorCount(this.segment(), value); return this; } + + /// {@return `pExclusiveScissors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pExclusiveScissors(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pExclusiveScissors.get(segment, 0L, index); } + /// {@return `pExclusiveScissors`} + /// @param segment the segment of the struct + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pExclusiveScissors(MemorySegment segment) { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_pExclusiveScissors(segment, 0L); } + /// {@return `pExclusiveScissors` at the given index} + /// @param index the index + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pExclusiveScissorsAt(long index) { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_pExclusiveScissors(this.segment(), index); } + /// {@return `pExclusiveScissors`} + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pExclusiveScissors() { return VkPipelineViewportExclusiveScissorStateCreateInfoNV.get_pExclusiveScissors(this.segment()); } + /// Sets `pExclusiveScissors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pExclusiveScissors(MemorySegment segment, long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VH_pExclusiveScissors.set(segment, 0L, index, value); } + /// Sets `pExclusiveScissors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pExclusiveScissors(MemorySegment segment, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_pExclusiveScissors(segment, 0L, value); } + /// Sets `pExclusiveScissors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportExclusiveScissorStateCreateInfoNV pExclusiveScissorsAt(long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_pExclusiveScissors(this.segment(), index, value); return this; } + /// Sets `pExclusiveScissors` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportExclusiveScissorStateCreateInfoNV pExclusiveScissors(@CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkPipelineViewportExclusiveScissorStateCreateInfoNV.set_pExclusiveScissors(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportShadingRateImageStateCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportShadingRateImageStateCreateInfoNV.java new file mode 100644 index 00000000..1827c45e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportShadingRateImageStateCreateInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shadingRateImageEnable +/// [VarHandle][#VH_shadingRateImageEnable] - [Getter][#shadingRateImageEnable()] - [Setter][#shadingRateImageEnable(int)] +/// ### viewportCount +/// [VarHandle][#VH_viewportCount] - [Getter][#viewportCount()] - [Setter][#viewportCount(int)] +/// ### pShadingRatePalettes +/// [VarHandle][#VH_pShadingRatePalettes] - [Getter][#pShadingRatePalettes()] - [Setter][#pShadingRatePalettes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineViewportShadingRateImageStateCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 shadingRateImageEnable; +/// uint32_t viewportCount; +/// const VkShadingRatePaletteNV * pShadingRatePalettes; +/// } VkPipelineViewportShadingRateImageStateCreateInfoNV; +/// ``` +public final class VkPipelineViewportShadingRateImageStateCreateInfoNV extends Struct { + /// The struct layout of `VkPipelineViewportShadingRateImageStateCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shadingRateImageEnable"), + ValueLayout.JAVA_INT.withName("viewportCount"), + ValueLayout.ADDRESS.withName("pShadingRatePalettes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shadingRateImageEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shadingRateImageEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shadingRateImageEnable")); + /// The [VarHandle] of `viewportCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewportCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewportCount")); + /// The [VarHandle] of `pShadingRatePalettes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pShadingRatePalettes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pShadingRatePalettes")); + + /// Creates `VkPipelineViewportShadingRateImageStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineViewportShadingRateImageStateCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineViewportShadingRateImageStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportShadingRateImageStateCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportShadingRateImageStateCreateInfoNV(segment); } + + /// Creates `VkPipelineViewportShadingRateImageStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportShadingRateImageStateCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportShadingRateImageStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineViewportShadingRateImageStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportShadingRateImageStateCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportShadingRateImageStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineViewportShadingRateImageStateCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineViewportShadingRateImageStateCreateInfoNV` + public static VkPipelineViewportShadingRateImageStateCreateInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineViewportShadingRateImageStateCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineViewportShadingRateImageStateCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineViewportShadingRateImageStateCreateInfoNV` + public static VkPipelineViewportShadingRateImageStateCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineViewportShadingRateImageStateCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportShadingRateImageStateCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportShadingRateImageStateCreateInfoNV sType(@CType("VkStructureType") int value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportShadingRateImageStateCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportShadingRateImageStateCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `shadingRateImageEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shadingRateImageEnable(MemorySegment segment, long index) { return (int) VH_shadingRateImageEnable.get(segment, 0L, index); } + /// {@return `shadingRateImageEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shadingRateImageEnable(MemorySegment segment) { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_shadingRateImageEnable(segment, 0L); } + /// {@return `shadingRateImageEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int shadingRateImageEnableAt(long index) { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_shadingRateImageEnable(this.segment(), index); } + /// {@return `shadingRateImageEnable`} + public @CType("VkBool32") int shadingRateImageEnable() { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_shadingRateImageEnable(this.segment()); } + /// Sets `shadingRateImageEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRateImageEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shadingRateImageEnable.set(segment, 0L, index, value); } + /// Sets `shadingRateImageEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRateImageEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_shadingRateImageEnable(segment, 0L, value); } + /// Sets `shadingRateImageEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportShadingRateImageStateCreateInfoNV shadingRateImageEnableAt(long index, @CType("VkBool32") int value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_shadingRateImageEnable(this.segment(), index, value); return this; } + /// Sets `shadingRateImageEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportShadingRateImageStateCreateInfoNV shadingRateImageEnable(@CType("VkBool32") int value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_shadingRateImageEnable(this.segment(), value); return this; } + + /// {@return `viewportCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewportCount(MemorySegment segment, long index) { return (int) VH_viewportCount.get(segment, 0L, index); } + /// {@return `viewportCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewportCount(MemorySegment segment) { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_viewportCount(segment, 0L); } + /// {@return `viewportCount` at the given index} + /// @param index the index + public @CType("uint32_t") int viewportCountAt(long index) { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_viewportCount(this.segment(), index); } + /// {@return `viewportCount`} + public @CType("uint32_t") int viewportCount() { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_viewportCount(this.segment()); } + /// Sets `viewportCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewportCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewportCount.set(segment, 0L, index, value); } + /// Sets `viewportCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewportCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_viewportCount(segment, 0L, value); } + /// Sets `viewportCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportShadingRateImageStateCreateInfoNV viewportCountAt(long index, @CType("uint32_t") int value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_viewportCount(this.segment(), index, value); return this; } + /// Sets `viewportCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportShadingRateImageStateCreateInfoNV viewportCount(@CType("uint32_t") int value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_viewportCount(this.segment(), value); return this; } + + /// {@return `pShadingRatePalettes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkShadingRatePaletteNV *") java.lang.foreign.MemorySegment get_pShadingRatePalettes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pShadingRatePalettes.get(segment, 0L, index); } + /// {@return `pShadingRatePalettes`} + /// @param segment the segment of the struct + public static @CType("const VkShadingRatePaletteNV *") java.lang.foreign.MemorySegment get_pShadingRatePalettes(MemorySegment segment) { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_pShadingRatePalettes(segment, 0L); } + /// {@return `pShadingRatePalettes` at the given index} + /// @param index the index + public @CType("const VkShadingRatePaletteNV *") java.lang.foreign.MemorySegment pShadingRatePalettesAt(long index) { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_pShadingRatePalettes(this.segment(), index); } + /// {@return `pShadingRatePalettes`} + public @CType("const VkShadingRatePaletteNV *") java.lang.foreign.MemorySegment pShadingRatePalettes() { return VkPipelineViewportShadingRateImageStateCreateInfoNV.get_pShadingRatePalettes(this.segment()); } + /// Sets `pShadingRatePalettes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pShadingRatePalettes(MemorySegment segment, long index, @CType("const VkShadingRatePaletteNV *") java.lang.foreign.MemorySegment value) { VH_pShadingRatePalettes.set(segment, 0L, index, value); } + /// Sets `pShadingRatePalettes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pShadingRatePalettes(MemorySegment segment, @CType("const VkShadingRatePaletteNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_pShadingRatePalettes(segment, 0L, value); } + /// Sets `pShadingRatePalettes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportShadingRateImageStateCreateInfoNV pShadingRatePalettesAt(long index, @CType("const VkShadingRatePaletteNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_pShadingRatePalettes(this.segment(), index, value); return this; } + /// Sets `pShadingRatePalettes` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportShadingRateImageStateCreateInfoNV pShadingRatePalettes(@CType("const VkShadingRatePaletteNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportShadingRateImageStateCreateInfoNV.set_pShadingRatePalettes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportSwizzleStateCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportSwizzleStateCreateInfoNV.java new file mode 100644 index 00000000..3f7ed126 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportSwizzleStateCreateInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### viewportCount +/// [VarHandle][#VH_viewportCount] - [Getter][#viewportCount()] - [Setter][#viewportCount(int)] +/// ### pViewportSwizzles +/// [VarHandle][#VH_pViewportSwizzles] - [Getter][#pViewportSwizzles()] - [Setter][#pViewportSwizzles(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineViewportSwizzleStateCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineViewportSwizzleStateCreateFlagsNV flags; +/// uint32_t viewportCount; +/// const VkViewportSwizzleNV * pViewportSwizzles; +/// } VkPipelineViewportSwizzleStateCreateInfoNV; +/// ``` +public final class VkPipelineViewportSwizzleStateCreateInfoNV extends Struct { + /// The struct layout of `VkPipelineViewportSwizzleStateCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("viewportCount"), + ValueLayout.ADDRESS.withName("pViewportSwizzles") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `viewportCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewportCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewportCount")); + /// The [VarHandle] of `pViewportSwizzles` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pViewportSwizzles = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pViewportSwizzles")); + + /// Creates `VkPipelineViewportSwizzleStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineViewportSwizzleStateCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineViewportSwizzleStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportSwizzleStateCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportSwizzleStateCreateInfoNV(segment); } + + /// Creates `VkPipelineViewportSwizzleStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportSwizzleStateCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportSwizzleStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineViewportSwizzleStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportSwizzleStateCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportSwizzleStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineViewportSwizzleStateCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineViewportSwizzleStateCreateInfoNV` + public static VkPipelineViewportSwizzleStateCreateInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineViewportSwizzleStateCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineViewportSwizzleStateCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineViewportSwizzleStateCreateInfoNV` + public static VkPipelineViewportSwizzleStateCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineViewportSwizzleStateCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineViewportSwizzleStateCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineViewportSwizzleStateCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineViewportSwizzleStateCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportSwizzleStateCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportSwizzleStateCreateInfoNV sType(@CType("VkStructureType") int value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineViewportSwizzleStateCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineViewportSwizzleStateCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineViewportSwizzleStateCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportSwizzleStateCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportSwizzleStateCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineViewportSwizzleStateCreateFlagsNV") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineViewportSwizzleStateCreateFlagsNV") int get_flags(MemorySegment segment) { return VkPipelineViewportSwizzleStateCreateInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineViewportSwizzleStateCreateFlagsNV") int flagsAt(long index) { return VkPipelineViewportSwizzleStateCreateInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineViewportSwizzleStateCreateFlagsNV") int flags() { return VkPipelineViewportSwizzleStateCreateInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineViewportSwizzleStateCreateFlagsNV") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineViewportSwizzleStateCreateFlagsNV") int value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportSwizzleStateCreateInfoNV flagsAt(long index, @CType("VkPipelineViewportSwizzleStateCreateFlagsNV") int value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportSwizzleStateCreateInfoNV flags(@CType("VkPipelineViewportSwizzleStateCreateFlagsNV") int value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_flags(this.segment(), value); return this; } + + /// {@return `viewportCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewportCount(MemorySegment segment, long index) { return (int) VH_viewportCount.get(segment, 0L, index); } + /// {@return `viewportCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewportCount(MemorySegment segment) { return VkPipelineViewportSwizzleStateCreateInfoNV.get_viewportCount(segment, 0L); } + /// {@return `viewportCount` at the given index} + /// @param index the index + public @CType("uint32_t") int viewportCountAt(long index) { return VkPipelineViewportSwizzleStateCreateInfoNV.get_viewportCount(this.segment(), index); } + /// {@return `viewportCount`} + public @CType("uint32_t") int viewportCount() { return VkPipelineViewportSwizzleStateCreateInfoNV.get_viewportCount(this.segment()); } + /// Sets `viewportCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewportCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewportCount.set(segment, 0L, index, value); } + /// Sets `viewportCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewportCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_viewportCount(segment, 0L, value); } + /// Sets `viewportCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportSwizzleStateCreateInfoNV viewportCountAt(long index, @CType("uint32_t") int value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_viewportCount(this.segment(), index, value); return this; } + /// Sets `viewportCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportSwizzleStateCreateInfoNV viewportCount(@CType("uint32_t") int value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_viewportCount(this.segment(), value); return this; } + + /// {@return `pViewportSwizzles` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkViewportSwizzleNV *") java.lang.foreign.MemorySegment get_pViewportSwizzles(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pViewportSwizzles.get(segment, 0L, index); } + /// {@return `pViewportSwizzles`} + /// @param segment the segment of the struct + public static @CType("const VkViewportSwizzleNV *") java.lang.foreign.MemorySegment get_pViewportSwizzles(MemorySegment segment) { return VkPipelineViewportSwizzleStateCreateInfoNV.get_pViewportSwizzles(segment, 0L); } + /// {@return `pViewportSwizzles` at the given index} + /// @param index the index + public @CType("const VkViewportSwizzleNV *") java.lang.foreign.MemorySegment pViewportSwizzlesAt(long index) { return VkPipelineViewportSwizzleStateCreateInfoNV.get_pViewportSwizzles(this.segment(), index); } + /// {@return `pViewportSwizzles`} + public @CType("const VkViewportSwizzleNV *") java.lang.foreign.MemorySegment pViewportSwizzles() { return VkPipelineViewportSwizzleStateCreateInfoNV.get_pViewportSwizzles(this.segment()); } + /// Sets `pViewportSwizzles` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pViewportSwizzles(MemorySegment segment, long index, @CType("const VkViewportSwizzleNV *") java.lang.foreign.MemorySegment value) { VH_pViewportSwizzles.set(segment, 0L, index, value); } + /// Sets `pViewportSwizzles` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pViewportSwizzles(MemorySegment segment, @CType("const VkViewportSwizzleNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_pViewportSwizzles(segment, 0L, value); } + /// Sets `pViewportSwizzles` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportSwizzleStateCreateInfoNV pViewportSwizzlesAt(long index, @CType("const VkViewportSwizzleNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_pViewportSwizzles(this.segment(), index, value); return this; } + /// Sets `pViewportSwizzles` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportSwizzleStateCreateInfoNV pViewportSwizzles(@CType("const VkViewportSwizzleNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportSwizzleStateCreateInfoNV.set_pViewportSwizzles(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportWScalingStateCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportWScalingStateCreateInfoNV.java new file mode 100644 index 00000000..a39f7512 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkPipelineViewportWScalingStateCreateInfoNV.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### viewportWScalingEnable +/// [VarHandle][#VH_viewportWScalingEnable] - [Getter][#viewportWScalingEnable()] - [Setter][#viewportWScalingEnable(int)] +/// ### viewportCount +/// [VarHandle][#VH_viewportCount] - [Getter][#viewportCount()] - [Setter][#viewportCount(int)] +/// ### pViewportWScalings +/// [VarHandle][#VH_pViewportWScalings] - [Getter][#pViewportWScalings()] - [Setter][#pViewportWScalings(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineViewportWScalingStateCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 viewportWScalingEnable; +/// uint32_t viewportCount; +/// const VkViewportWScalingNV * pViewportWScalings; +/// } VkPipelineViewportWScalingStateCreateInfoNV; +/// ``` +public final class VkPipelineViewportWScalingStateCreateInfoNV extends Struct { + /// The struct layout of `VkPipelineViewportWScalingStateCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("viewportWScalingEnable"), + ValueLayout.JAVA_INT.withName("viewportCount"), + ValueLayout.ADDRESS.withName("pViewportWScalings") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `viewportWScalingEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewportWScalingEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewportWScalingEnable")); + /// The [VarHandle] of `viewportCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewportCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewportCount")); + /// The [VarHandle] of `pViewportWScalings` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pViewportWScalings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pViewportWScalings")); + + /// Creates `VkPipelineViewportWScalingStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkPipelineViewportWScalingStateCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineViewportWScalingStateCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportWScalingStateCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportWScalingStateCreateInfoNV(segment); } + + /// Creates `VkPipelineViewportWScalingStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportWScalingStateCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportWScalingStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineViewportWScalingStateCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportWScalingStateCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportWScalingStateCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineViewportWScalingStateCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineViewportWScalingStateCreateInfoNV` + public static VkPipelineViewportWScalingStateCreateInfoNV alloc(SegmentAllocator allocator) { return new VkPipelineViewportWScalingStateCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineViewportWScalingStateCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineViewportWScalingStateCreateInfoNV` + public static VkPipelineViewportWScalingStateCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkPipelineViewportWScalingStateCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineViewportWScalingStateCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineViewportWScalingStateCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineViewportWScalingStateCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineViewportWScalingStateCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportWScalingStateCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineViewportWScalingStateCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportWScalingStateCreateInfoNV sType(@CType("VkStructureType") int value) { VkPipelineViewportWScalingStateCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineViewportWScalingStateCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineViewportWScalingStateCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineViewportWScalingStateCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportWScalingStateCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportWScalingStateCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportWScalingStateCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportWScalingStateCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportWScalingStateCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `viewportWScalingEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_viewportWScalingEnable(MemorySegment segment, long index) { return (int) VH_viewportWScalingEnable.get(segment, 0L, index); } + /// {@return `viewportWScalingEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_viewportWScalingEnable(MemorySegment segment) { return VkPipelineViewportWScalingStateCreateInfoNV.get_viewportWScalingEnable(segment, 0L); } + /// {@return `viewportWScalingEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int viewportWScalingEnableAt(long index) { return VkPipelineViewportWScalingStateCreateInfoNV.get_viewportWScalingEnable(this.segment(), index); } + /// {@return `viewportWScalingEnable`} + public @CType("VkBool32") int viewportWScalingEnable() { return VkPipelineViewportWScalingStateCreateInfoNV.get_viewportWScalingEnable(this.segment()); } + /// Sets `viewportWScalingEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewportWScalingEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_viewportWScalingEnable.set(segment, 0L, index, value); } + /// Sets `viewportWScalingEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewportWScalingEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineViewportWScalingStateCreateInfoNV.set_viewportWScalingEnable(segment, 0L, value); } + /// Sets `viewportWScalingEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportWScalingStateCreateInfoNV viewportWScalingEnableAt(long index, @CType("VkBool32") int value) { VkPipelineViewportWScalingStateCreateInfoNV.set_viewportWScalingEnable(this.segment(), index, value); return this; } + /// Sets `viewportWScalingEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportWScalingStateCreateInfoNV viewportWScalingEnable(@CType("VkBool32") int value) { VkPipelineViewportWScalingStateCreateInfoNV.set_viewportWScalingEnable(this.segment(), value); return this; } + + /// {@return `viewportCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewportCount(MemorySegment segment, long index) { return (int) VH_viewportCount.get(segment, 0L, index); } + /// {@return `viewportCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewportCount(MemorySegment segment) { return VkPipelineViewportWScalingStateCreateInfoNV.get_viewportCount(segment, 0L); } + /// {@return `viewportCount` at the given index} + /// @param index the index + public @CType("uint32_t") int viewportCountAt(long index) { return VkPipelineViewportWScalingStateCreateInfoNV.get_viewportCount(this.segment(), index); } + /// {@return `viewportCount`} + public @CType("uint32_t") int viewportCount() { return VkPipelineViewportWScalingStateCreateInfoNV.get_viewportCount(this.segment()); } + /// Sets `viewportCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewportCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewportCount.set(segment, 0L, index, value); } + /// Sets `viewportCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewportCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineViewportWScalingStateCreateInfoNV.set_viewportCount(segment, 0L, value); } + /// Sets `viewportCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportWScalingStateCreateInfoNV viewportCountAt(long index, @CType("uint32_t") int value) { VkPipelineViewportWScalingStateCreateInfoNV.set_viewportCount(this.segment(), index, value); return this; } + /// Sets `viewportCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportWScalingStateCreateInfoNV viewportCount(@CType("uint32_t") int value) { VkPipelineViewportWScalingStateCreateInfoNV.set_viewportCount(this.segment(), value); return this; } + + /// {@return `pViewportWScalings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkViewportWScalingNV *") java.lang.foreign.MemorySegment get_pViewportWScalings(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pViewportWScalings.get(segment, 0L, index); } + /// {@return `pViewportWScalings`} + /// @param segment the segment of the struct + public static @CType("const VkViewportWScalingNV *") java.lang.foreign.MemorySegment get_pViewportWScalings(MemorySegment segment) { return VkPipelineViewportWScalingStateCreateInfoNV.get_pViewportWScalings(segment, 0L); } + /// {@return `pViewportWScalings` at the given index} + /// @param index the index + public @CType("const VkViewportWScalingNV *") java.lang.foreign.MemorySegment pViewportWScalingsAt(long index) { return VkPipelineViewportWScalingStateCreateInfoNV.get_pViewportWScalings(this.segment(), index); } + /// {@return `pViewportWScalings`} + public @CType("const VkViewportWScalingNV *") java.lang.foreign.MemorySegment pViewportWScalings() { return VkPipelineViewportWScalingStateCreateInfoNV.get_pViewportWScalings(this.segment()); } + /// Sets `pViewportWScalings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pViewportWScalings(MemorySegment segment, long index, @CType("const VkViewportWScalingNV *") java.lang.foreign.MemorySegment value) { VH_pViewportWScalings.set(segment, 0L, index, value); } + /// Sets `pViewportWScalings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pViewportWScalings(MemorySegment segment, @CType("const VkViewportWScalingNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportWScalingStateCreateInfoNV.set_pViewportWScalings(segment, 0L, value); } + /// Sets `pViewportWScalings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportWScalingStateCreateInfoNV pViewportWScalingsAt(long index, @CType("const VkViewportWScalingNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportWScalingStateCreateInfoNV.set_pViewportWScalings(this.segment(), index, value); return this; } + /// Sets `pViewportWScalings` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportWScalingStateCreateInfoNV pViewportWScalings(@CType("const VkViewportWScalingNV *") java.lang.foreign.MemorySegment value) { VkPipelineViewportWScalingStateCreateInfoNV.set_pViewportWScalings(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkQueryLowLatencySupportNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkQueryLowLatencySupportNV.java new file mode 100644 index 00000000..fa9636c3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkQueryLowLatencySupportNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pQueriedLowLatencyData +/// [VarHandle][#VH_pQueriedLowLatencyData] - [Getter][#pQueriedLowLatencyData()] - [Setter][#pQueriedLowLatencyData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueryLowLatencySupportNV { +/// VkStructureType sType; +/// const void * pNext; +/// void * pQueriedLowLatencyData; +/// } VkQueryLowLatencySupportNV; +/// ``` +public final class VkQueryLowLatencySupportNV extends Struct { + /// The struct layout of `VkQueryLowLatencySupportNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pQueriedLowLatencyData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pQueriedLowLatencyData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pQueriedLowLatencyData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pQueriedLowLatencyData")); + + /// Creates `VkQueryLowLatencySupportNV` with the given segment. + /// @param segment the memory segment + public VkQueryLowLatencySupportNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueryLowLatencySupportNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryLowLatencySupportNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryLowLatencySupportNV(segment); } + + /// Creates `VkQueryLowLatencySupportNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryLowLatencySupportNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryLowLatencySupportNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueryLowLatencySupportNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryLowLatencySupportNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryLowLatencySupportNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueryLowLatencySupportNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueryLowLatencySupportNV` + public static VkQueryLowLatencySupportNV alloc(SegmentAllocator allocator) { return new VkQueryLowLatencySupportNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueryLowLatencySupportNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueryLowLatencySupportNV` + public static VkQueryLowLatencySupportNV alloc(SegmentAllocator allocator, long count) { return new VkQueryLowLatencySupportNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueryLowLatencySupportNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueryLowLatencySupportNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueryLowLatencySupportNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueryLowLatencySupportNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryLowLatencySupportNV sTypeAt(long index, @CType("VkStructureType") int value) { VkQueryLowLatencySupportNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueryLowLatencySupportNV sType(@CType("VkStructureType") int value) { VkQueryLowLatencySupportNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueryLowLatencySupportNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueryLowLatencySupportNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkQueryLowLatencySupportNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryLowLatencySupportNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryLowLatencySupportNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryLowLatencySupportNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueryLowLatencySupportNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryLowLatencySupportNV.set_pNext(this.segment(), value); return this; } + + /// {@return `pQueriedLowLatencyData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pQueriedLowLatencyData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pQueriedLowLatencyData.get(segment, 0L, index); } + /// {@return `pQueriedLowLatencyData`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pQueriedLowLatencyData(MemorySegment segment) { return VkQueryLowLatencySupportNV.get_pQueriedLowLatencyData(segment, 0L); } + /// {@return `pQueriedLowLatencyData` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pQueriedLowLatencyDataAt(long index) { return VkQueryLowLatencySupportNV.get_pQueriedLowLatencyData(this.segment(), index); } + /// {@return `pQueriedLowLatencyData`} + public @CType("void *") java.lang.foreign.MemorySegment pQueriedLowLatencyData() { return VkQueryLowLatencySupportNV.get_pQueriedLowLatencyData(this.segment()); } + /// Sets `pQueriedLowLatencyData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pQueriedLowLatencyData(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pQueriedLowLatencyData.set(segment, 0L, index, value); } + /// Sets `pQueriedLowLatencyData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pQueriedLowLatencyData(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueryLowLatencySupportNV.set_pQueriedLowLatencyData(segment, 0L, value); } + /// Sets `pQueriedLowLatencyData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryLowLatencySupportNV pQueriedLowLatencyDataAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueryLowLatencySupportNV.set_pQueriedLowLatencyData(this.segment(), index, value); return this; } + /// Sets `pQueriedLowLatencyData` with the given value. + /// @param value the value + /// @return `this` + public VkQueryLowLatencySupportNV pQueriedLowLatencyData(@CType("void *") java.lang.foreign.MemorySegment value) { VkQueryLowLatencySupportNV.set_pQueriedLowLatencyData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkQueueFamilyCheckpointProperties2NV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkQueueFamilyCheckpointProperties2NV.java new file mode 100644 index 00000000..26726fe7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkQueueFamilyCheckpointProperties2NV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### checkpointExecutionStageMask +/// [VarHandle][#VH_checkpointExecutionStageMask] - [Getter][#checkpointExecutionStageMask()] - [Setter][#checkpointExecutionStageMask(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueueFamilyCheckpointProperties2NV { +/// VkStructureType sType; +/// void * pNext; +/// VkPipelineStageFlags2 checkpointExecutionStageMask; +/// } VkQueueFamilyCheckpointProperties2NV; +/// ``` +public final class VkQueueFamilyCheckpointProperties2NV extends Struct { + /// The struct layout of `VkQueueFamilyCheckpointProperties2NV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("checkpointExecutionStageMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `checkpointExecutionStageMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_checkpointExecutionStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("checkpointExecutionStageMask")); + + /// Creates `VkQueueFamilyCheckpointProperties2NV` with the given segment. + /// @param segment the memory segment + public VkQueueFamilyCheckpointProperties2NV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueueFamilyCheckpointProperties2NV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyCheckpointProperties2NV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyCheckpointProperties2NV(segment); } + + /// Creates `VkQueueFamilyCheckpointProperties2NV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyCheckpointProperties2NV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyCheckpointProperties2NV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueueFamilyCheckpointProperties2NV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyCheckpointProperties2NV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyCheckpointProperties2NV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueueFamilyCheckpointProperties2NV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueueFamilyCheckpointProperties2NV` + public static VkQueueFamilyCheckpointProperties2NV alloc(SegmentAllocator allocator) { return new VkQueueFamilyCheckpointProperties2NV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueueFamilyCheckpointProperties2NV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueueFamilyCheckpointProperties2NV` + public static VkQueueFamilyCheckpointProperties2NV alloc(SegmentAllocator allocator, long count) { return new VkQueueFamilyCheckpointProperties2NV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueueFamilyCheckpointProperties2NV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueueFamilyCheckpointProperties2NV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueueFamilyCheckpointProperties2NV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueueFamilyCheckpointProperties2NV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointProperties2NV sTypeAt(long index, @CType("VkStructureType") int value) { VkQueueFamilyCheckpointProperties2NV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointProperties2NV sType(@CType("VkStructureType") int value) { VkQueueFamilyCheckpointProperties2NV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueueFamilyCheckpointProperties2NV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueueFamilyCheckpointProperties2NV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkQueueFamilyCheckpointProperties2NV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyCheckpointProperties2NV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointProperties2NV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyCheckpointProperties2NV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointProperties2NV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyCheckpointProperties2NV.set_pNext(this.segment(), value); return this; } + + /// {@return `checkpointExecutionStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags2") long get_checkpointExecutionStageMask(MemorySegment segment, long index) { return (long) VH_checkpointExecutionStageMask.get(segment, 0L, index); } + /// {@return `checkpointExecutionStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags2") long get_checkpointExecutionStageMask(MemorySegment segment) { return VkQueueFamilyCheckpointProperties2NV.get_checkpointExecutionStageMask(segment, 0L); } + /// {@return `checkpointExecutionStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags2") long checkpointExecutionStageMaskAt(long index) { return VkQueueFamilyCheckpointProperties2NV.get_checkpointExecutionStageMask(this.segment(), index); } + /// {@return `checkpointExecutionStageMask`} + public @CType("VkPipelineStageFlags2") long checkpointExecutionStageMask() { return VkQueueFamilyCheckpointProperties2NV.get_checkpointExecutionStageMask(this.segment()); } + /// Sets `checkpointExecutionStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_checkpointExecutionStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags2") long value) { VH_checkpointExecutionStageMask.set(segment, 0L, index, value); } + /// Sets `checkpointExecutionStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_checkpointExecutionStageMask(MemorySegment segment, @CType("VkPipelineStageFlags2") long value) { VkQueueFamilyCheckpointProperties2NV.set_checkpointExecutionStageMask(segment, 0L, value); } + /// Sets `checkpointExecutionStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointProperties2NV checkpointExecutionStageMaskAt(long index, @CType("VkPipelineStageFlags2") long value) { VkQueueFamilyCheckpointProperties2NV.set_checkpointExecutionStageMask(this.segment(), index, value); return this; } + /// Sets `checkpointExecutionStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointProperties2NV checkpointExecutionStageMask(@CType("VkPipelineStageFlags2") long value) { VkQueueFamilyCheckpointProperties2NV.set_checkpointExecutionStageMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkQueueFamilyCheckpointPropertiesNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkQueueFamilyCheckpointPropertiesNV.java new file mode 100644 index 00000000..b8ef3732 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkQueueFamilyCheckpointPropertiesNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### checkpointExecutionStageMask +/// [VarHandle][#VH_checkpointExecutionStageMask] - [Getter][#checkpointExecutionStageMask()] - [Setter][#checkpointExecutionStageMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueueFamilyCheckpointPropertiesNV { +/// VkStructureType sType; +/// void * pNext; +/// VkPipelineStageFlags checkpointExecutionStageMask; +/// } VkQueueFamilyCheckpointPropertiesNV; +/// ``` +public final class VkQueueFamilyCheckpointPropertiesNV extends Struct { + /// The struct layout of `VkQueueFamilyCheckpointPropertiesNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("checkpointExecutionStageMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `checkpointExecutionStageMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_checkpointExecutionStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("checkpointExecutionStageMask")); + + /// Creates `VkQueueFamilyCheckpointPropertiesNV` with the given segment. + /// @param segment the memory segment + public VkQueueFamilyCheckpointPropertiesNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueueFamilyCheckpointPropertiesNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyCheckpointPropertiesNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyCheckpointPropertiesNV(segment); } + + /// Creates `VkQueueFamilyCheckpointPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyCheckpointPropertiesNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyCheckpointPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueueFamilyCheckpointPropertiesNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyCheckpointPropertiesNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyCheckpointPropertiesNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueueFamilyCheckpointPropertiesNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueueFamilyCheckpointPropertiesNV` + public static VkQueueFamilyCheckpointPropertiesNV alloc(SegmentAllocator allocator) { return new VkQueueFamilyCheckpointPropertiesNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueueFamilyCheckpointPropertiesNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueueFamilyCheckpointPropertiesNV` + public static VkQueueFamilyCheckpointPropertiesNV alloc(SegmentAllocator allocator, long count) { return new VkQueueFamilyCheckpointPropertiesNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueueFamilyCheckpointPropertiesNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueueFamilyCheckpointPropertiesNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueueFamilyCheckpointPropertiesNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueueFamilyCheckpointPropertiesNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointPropertiesNV sTypeAt(long index, @CType("VkStructureType") int value) { VkQueueFamilyCheckpointPropertiesNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointPropertiesNV sType(@CType("VkStructureType") int value) { VkQueueFamilyCheckpointPropertiesNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueueFamilyCheckpointPropertiesNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueueFamilyCheckpointPropertiesNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkQueueFamilyCheckpointPropertiesNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyCheckpointPropertiesNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointPropertiesNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyCheckpointPropertiesNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointPropertiesNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyCheckpointPropertiesNV.set_pNext(this.segment(), value); return this; } + + /// {@return `checkpointExecutionStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags") int get_checkpointExecutionStageMask(MemorySegment segment, long index) { return (int) VH_checkpointExecutionStageMask.get(segment, 0L, index); } + /// {@return `checkpointExecutionStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags") int get_checkpointExecutionStageMask(MemorySegment segment) { return VkQueueFamilyCheckpointPropertiesNV.get_checkpointExecutionStageMask(segment, 0L); } + /// {@return `checkpointExecutionStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags") int checkpointExecutionStageMaskAt(long index) { return VkQueueFamilyCheckpointPropertiesNV.get_checkpointExecutionStageMask(this.segment(), index); } + /// {@return `checkpointExecutionStageMask`} + public @CType("VkPipelineStageFlags") int checkpointExecutionStageMask() { return VkQueueFamilyCheckpointPropertiesNV.get_checkpointExecutionStageMask(this.segment()); } + /// Sets `checkpointExecutionStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_checkpointExecutionStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags") int value) { VH_checkpointExecutionStageMask.set(segment, 0L, index, value); } + /// Sets `checkpointExecutionStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_checkpointExecutionStageMask(MemorySegment segment, @CType("VkPipelineStageFlags") int value) { VkQueueFamilyCheckpointPropertiesNV.set_checkpointExecutionStageMask(segment, 0L, value); } + /// Sets `checkpointExecutionStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointPropertiesNV checkpointExecutionStageMaskAt(long index, @CType("VkPipelineStageFlags") int value) { VkQueueFamilyCheckpointPropertiesNV.set_checkpointExecutionStageMask(this.segment(), index, value); return this; } + /// Sets `checkpointExecutionStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyCheckpointPropertiesNV checkpointExecutionStageMask(@CType("VkPipelineStageFlags") int value) { VkQueueFamilyCheckpointPropertiesNV.set_checkpointExecutionStageMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkRayTracingPipelineCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkRayTracingPipelineCreateInfoNV.java new file mode 100644 index 00000000..10bf7b93 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkRayTracingPipelineCreateInfoNV.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### stageCount +/// [VarHandle][#VH_stageCount] - [Getter][#stageCount()] - [Setter][#stageCount(int)] +/// ### pStages +/// [VarHandle][#VH_pStages] - [Getter][#pStages()] - [Setter][#pStages(java.lang.foreign.MemorySegment)] +/// ### groupCount +/// [VarHandle][#VH_groupCount] - [Getter][#groupCount()] - [Setter][#groupCount(int)] +/// ### pGroups +/// [VarHandle][#VH_pGroups] - [Getter][#pGroups()] - [Setter][#pGroups(java.lang.foreign.MemorySegment)] +/// ### maxRecursionDepth +/// [VarHandle][#VH_maxRecursionDepth] - [Getter][#maxRecursionDepth()] - [Setter][#maxRecursionDepth(int)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### basePipelineHandle +/// [VarHandle][#VH_basePipelineHandle] - [Getter][#basePipelineHandle()] - [Setter][#basePipelineHandle(java.lang.foreign.MemorySegment)] +/// ### basePipelineIndex +/// [VarHandle][#VH_basePipelineIndex] - [Getter][#basePipelineIndex()] - [Setter][#basePipelineIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRayTracingPipelineCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCreateFlags flags; +/// uint32_t stageCount; +/// const VkPipelineShaderStageCreateInfo * pStages; +/// uint32_t groupCount; +/// const VkRayTracingShaderGroupCreateInfoNV * pGroups; +/// uint32_t maxRecursionDepth; +/// VkPipelineLayout layout; +/// VkPipeline basePipelineHandle; +/// int32_t basePipelineIndex; +/// } VkRayTracingPipelineCreateInfoNV; +/// ``` +public final class VkRayTracingPipelineCreateInfoNV extends Struct { + /// The struct layout of `VkRayTracingPipelineCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("stageCount"), + ValueLayout.ADDRESS.withName("pStages"), + ValueLayout.JAVA_INT.withName("groupCount"), + ValueLayout.ADDRESS.withName("pGroups"), + ValueLayout.JAVA_INT.withName("maxRecursionDepth"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.ADDRESS.withName("basePipelineHandle"), + ValueLayout.JAVA_INT.withName("basePipelineIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `stageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageCount")); + /// The [VarHandle] of `pStages` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStages")); + /// The [VarHandle] of `groupCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_groupCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("groupCount")); + /// The [VarHandle] of `pGroups` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pGroups = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pGroups")); + /// The [VarHandle] of `maxRecursionDepth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxRecursionDepth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxRecursionDepth")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `basePipelineHandle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_basePipelineHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("basePipelineHandle")); + /// The [VarHandle] of `basePipelineIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_basePipelineIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("basePipelineIndex")); + + /// Creates `VkRayTracingPipelineCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkRayTracingPipelineCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRayTracingPipelineCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingPipelineCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingPipelineCreateInfoNV(segment); } + + /// Creates `VkRayTracingPipelineCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingPipelineCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingPipelineCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRayTracingPipelineCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingPipelineCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingPipelineCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRayTracingPipelineCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRayTracingPipelineCreateInfoNV` + public static VkRayTracingPipelineCreateInfoNV alloc(SegmentAllocator allocator) { return new VkRayTracingPipelineCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRayTracingPipelineCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRayTracingPipelineCreateInfoNV` + public static VkRayTracingPipelineCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkRayTracingPipelineCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRayTracingPipelineCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRayTracingPipelineCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkRayTracingPipelineCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV sType(@CType("VkStructureType") int value) { VkRayTracingPipelineCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRayTracingPipelineCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCreateFlags") int get_flags(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCreateFlags") int flagsAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCreateFlags") int flags() { return VkRayTracingPipelineCreateInfoNV.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCreateFlags") int value) { VkRayTracingPipelineCreateInfoNV.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV flagsAt(long index, @CType("VkPipelineCreateFlags") int value) { VkRayTracingPipelineCreateInfoNV.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV flags(@CType("VkPipelineCreateFlags") int value) { VkRayTracingPipelineCreateInfoNV.set_flags(this.segment(), value); return this; } + + /// {@return `stageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stageCount(MemorySegment segment, long index) { return (int) VH_stageCount.get(segment, 0L, index); } + /// {@return `stageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stageCount(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_stageCount(segment, 0L); } + /// {@return `stageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stageCountAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_stageCount(this.segment(), index); } + /// {@return `stageCount`} + public @CType("uint32_t") int stageCount() { return VkRayTracingPipelineCreateInfoNV.get_stageCount(this.segment()); } + /// Sets `stageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stageCount.set(segment, 0L, index, value); } + /// Sets `stageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageCount(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_stageCount(segment, 0L, value); } + /// Sets `stageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV stageCountAt(long index, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_stageCount(this.segment(), index, value); return this; } + /// Sets `stageCount` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV stageCount(@CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_stageCount(this.segment(), value); return this; } + + /// {@return `pStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment get_pStages(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStages.get(segment, 0L, index); } + /// {@return `pStages`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment get_pStages(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_pStages(segment, 0L); } + /// {@return `pStages` at the given index} + /// @param index the index + public @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment pStagesAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_pStages(this.segment(), index); } + /// {@return `pStages`} + public @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment pStages() { return VkRayTracingPipelineCreateInfoNV.get_pStages(this.segment()); } + /// Sets `pStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStages(MemorySegment segment, long index, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pStages.set(segment, 0L, index, value); } + /// Sets `pStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStages(MemorySegment segment, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_pStages(segment, 0L, value); } + /// Sets `pStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV pStagesAt(long index, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_pStages(this.segment(), index, value); return this; } + /// Sets `pStages` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV pStages(@CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_pStages(this.segment(), value); return this; } + + /// {@return `groupCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_groupCount(MemorySegment segment, long index) { return (int) VH_groupCount.get(segment, 0L, index); } + /// {@return `groupCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_groupCount(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_groupCount(segment, 0L); } + /// {@return `groupCount` at the given index} + /// @param index the index + public @CType("uint32_t") int groupCountAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_groupCount(this.segment(), index); } + /// {@return `groupCount`} + public @CType("uint32_t") int groupCount() { return VkRayTracingPipelineCreateInfoNV.get_groupCount(this.segment()); } + /// Sets `groupCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_groupCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_groupCount.set(segment, 0L, index, value); } + /// Sets `groupCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_groupCount(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_groupCount(segment, 0L, value); } + /// Sets `groupCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV groupCountAt(long index, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_groupCount(this.segment(), index, value); return this; } + /// Sets `groupCount` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV groupCount(@CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_groupCount(this.segment(), value); return this; } + + /// {@return `pGroups` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRayTracingShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment get_pGroups(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pGroups.get(segment, 0L, index); } + /// {@return `pGroups`} + /// @param segment the segment of the struct + public static @CType("const VkRayTracingShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment get_pGroups(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_pGroups(segment, 0L); } + /// {@return `pGroups` at the given index} + /// @param index the index + public @CType("const VkRayTracingShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment pGroupsAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_pGroups(this.segment(), index); } + /// {@return `pGroups`} + public @CType("const VkRayTracingShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment pGroups() { return VkRayTracingPipelineCreateInfoNV.get_pGroups(this.segment()); } + /// Sets `pGroups` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pGroups(MemorySegment segment, long index, @CType("const VkRayTracingShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment value) { VH_pGroups.set(segment, 0L, index, value); } + /// Sets `pGroups` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pGroups(MemorySegment segment, @CType("const VkRayTracingShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_pGroups(segment, 0L, value); } + /// Sets `pGroups` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV pGroupsAt(long index, @CType("const VkRayTracingShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_pGroups(this.segment(), index, value); return this; } + /// Sets `pGroups` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV pGroups(@CType("const VkRayTracingShaderGroupCreateInfoNV *") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_pGroups(this.segment(), value); return this; } + + /// {@return `maxRecursionDepth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxRecursionDepth(MemorySegment segment, long index) { return (int) VH_maxRecursionDepth.get(segment, 0L, index); } + /// {@return `maxRecursionDepth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxRecursionDepth(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_maxRecursionDepth(segment, 0L); } + /// {@return `maxRecursionDepth` at the given index} + /// @param index the index + public @CType("uint32_t") int maxRecursionDepthAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_maxRecursionDepth(this.segment(), index); } + /// {@return `maxRecursionDepth`} + public @CType("uint32_t") int maxRecursionDepth() { return VkRayTracingPipelineCreateInfoNV.get_maxRecursionDepth(this.segment()); } + /// Sets `maxRecursionDepth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxRecursionDepth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxRecursionDepth.set(segment, 0L, index, value); } + /// Sets `maxRecursionDepth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxRecursionDepth(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_maxRecursionDepth(segment, 0L, value); } + /// Sets `maxRecursionDepth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV maxRecursionDepthAt(long index, @CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_maxRecursionDepth(this.segment(), index, value); return this; } + /// Sets `maxRecursionDepth` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV maxRecursionDepth(@CType("uint32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_maxRecursionDepth(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkRayTracingPipelineCreateInfoNV.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_layout(this.segment(), value); return this; } + + /// {@return `basePipelineHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_basePipelineHandle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_basePipelineHandle.get(segment, 0L, index); } + /// {@return `basePipelineHandle`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_basePipelineHandle(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_basePipelineHandle(segment, 0L); } + /// {@return `basePipelineHandle` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment basePipelineHandleAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_basePipelineHandle(this.segment(), index); } + /// {@return `basePipelineHandle`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment basePipelineHandle() { return VkRayTracingPipelineCreateInfoNV.get_basePipelineHandle(this.segment()); } + /// Sets `basePipelineHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_basePipelineHandle(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_basePipelineHandle.set(segment, 0L, index, value); } + /// Sets `basePipelineHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_basePipelineHandle(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_basePipelineHandle(segment, 0L, value); } + /// Sets `basePipelineHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV basePipelineHandleAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_basePipelineHandle(this.segment(), index, value); return this; } + /// Sets `basePipelineHandle` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV basePipelineHandle(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkRayTracingPipelineCreateInfoNV.set_basePipelineHandle(this.segment(), value); return this; } + + /// {@return `basePipelineIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_basePipelineIndex(MemorySegment segment, long index) { return (int) VH_basePipelineIndex.get(segment, 0L, index); } + /// {@return `basePipelineIndex`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_basePipelineIndex(MemorySegment segment) { return VkRayTracingPipelineCreateInfoNV.get_basePipelineIndex(segment, 0L); } + /// {@return `basePipelineIndex` at the given index} + /// @param index the index + public @CType("int32_t") int basePipelineIndexAt(long index) { return VkRayTracingPipelineCreateInfoNV.get_basePipelineIndex(this.segment(), index); } + /// {@return `basePipelineIndex`} + public @CType("int32_t") int basePipelineIndex() { return VkRayTracingPipelineCreateInfoNV.get_basePipelineIndex(this.segment()); } + /// Sets `basePipelineIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_basePipelineIndex(MemorySegment segment, long index, @CType("int32_t") int value) { VH_basePipelineIndex.set(segment, 0L, index, value); } + /// Sets `basePipelineIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_basePipelineIndex(MemorySegment segment, @CType("int32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_basePipelineIndex(segment, 0L, value); } + /// Sets `basePipelineIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV basePipelineIndexAt(long index, @CType("int32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_basePipelineIndex(this.segment(), index, value); return this; } + /// Sets `basePipelineIndex` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingPipelineCreateInfoNV basePipelineIndex(@CType("int32_t") int value) { VkRayTracingPipelineCreateInfoNV.set_basePipelineIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkRayTracingShaderGroupCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkRayTracingShaderGroupCreateInfoNV.java new file mode 100644 index 00000000..1ef8c050 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkRayTracingShaderGroupCreateInfoNV.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### generalShader +/// [VarHandle][#VH_generalShader] - [Getter][#generalShader()] - [Setter][#generalShader(int)] +/// ### closestHitShader +/// [VarHandle][#VH_closestHitShader] - [Getter][#closestHitShader()] - [Setter][#closestHitShader(int)] +/// ### anyHitShader +/// [VarHandle][#VH_anyHitShader] - [Getter][#anyHitShader()] - [Setter][#anyHitShader(int)] +/// ### intersectionShader +/// [VarHandle][#VH_intersectionShader] - [Getter][#intersectionShader()] - [Setter][#intersectionShader(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRayTracingShaderGroupCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkRayTracingShaderGroupTypeKHR type; +/// uint32_t generalShader; +/// uint32_t closestHitShader; +/// uint32_t anyHitShader; +/// uint32_t intersectionShader; +/// } VkRayTracingShaderGroupCreateInfoNV; +/// ``` +public final class VkRayTracingShaderGroupCreateInfoNV extends Struct { + /// The struct layout of `VkRayTracingShaderGroupCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("generalShader"), + ValueLayout.JAVA_INT.withName("closestHitShader"), + ValueLayout.JAVA_INT.withName("anyHitShader"), + ValueLayout.JAVA_INT.withName("intersectionShader") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `generalShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_generalShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("generalShader")); + /// The [VarHandle] of `closestHitShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_closestHitShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("closestHitShader")); + /// The [VarHandle] of `anyHitShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_anyHitShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("anyHitShader")); + /// The [VarHandle] of `intersectionShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_intersectionShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("intersectionShader")); + + /// Creates `VkRayTracingShaderGroupCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkRayTracingShaderGroupCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRayTracingShaderGroupCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingShaderGroupCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingShaderGroupCreateInfoNV(segment); } + + /// Creates `VkRayTracingShaderGroupCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingShaderGroupCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingShaderGroupCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRayTracingShaderGroupCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRayTracingShaderGroupCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRayTracingShaderGroupCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRayTracingShaderGroupCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRayTracingShaderGroupCreateInfoNV` + public static VkRayTracingShaderGroupCreateInfoNV alloc(SegmentAllocator allocator) { return new VkRayTracingShaderGroupCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRayTracingShaderGroupCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRayTracingShaderGroupCreateInfoNV` + public static VkRayTracingShaderGroupCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkRayTracingShaderGroupCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRayTracingShaderGroupCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRayTracingShaderGroupCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRayTracingShaderGroupCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkRayTracingShaderGroupCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV sType(@CType("VkStructureType") int value) { VkRayTracingShaderGroupCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRayTracingShaderGroupCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRayTracingShaderGroupCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingShaderGroupCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingShaderGroupCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRayTracingShaderGroupCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRayTracingShaderGroupTypeKHR") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkRayTracingShaderGroupTypeKHR") int get_type(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoNV.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkRayTracingShaderGroupTypeKHR") int typeAt(long index) { return VkRayTracingShaderGroupCreateInfoNV.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkRayTracingShaderGroupTypeKHR") int type() { return VkRayTracingShaderGroupCreateInfoNV.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkRayTracingShaderGroupTypeKHR") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkRayTracingShaderGroupTypeKHR") int value) { VkRayTracingShaderGroupCreateInfoNV.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV typeAt(long index, @CType("VkRayTracingShaderGroupTypeKHR") int value) { VkRayTracingShaderGroupCreateInfoNV.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV type(@CType("VkRayTracingShaderGroupTypeKHR") int value) { VkRayTracingShaderGroupCreateInfoNV.set_type(this.segment(), value); return this; } + + /// {@return `generalShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_generalShader(MemorySegment segment, long index) { return (int) VH_generalShader.get(segment, 0L, index); } + /// {@return `generalShader`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_generalShader(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoNV.get_generalShader(segment, 0L); } + /// {@return `generalShader` at the given index} + /// @param index the index + public @CType("uint32_t") int generalShaderAt(long index) { return VkRayTracingShaderGroupCreateInfoNV.get_generalShader(this.segment(), index); } + /// {@return `generalShader`} + public @CType("uint32_t") int generalShader() { return VkRayTracingShaderGroupCreateInfoNV.get_generalShader(this.segment()); } + /// Sets `generalShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_generalShader(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_generalShader.set(segment, 0L, index, value); } + /// Sets `generalShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_generalShader(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_generalShader(segment, 0L, value); } + /// Sets `generalShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV generalShaderAt(long index, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_generalShader(this.segment(), index, value); return this; } + /// Sets `generalShader` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV generalShader(@CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_generalShader(this.segment(), value); return this; } + + /// {@return `closestHitShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_closestHitShader(MemorySegment segment, long index) { return (int) VH_closestHitShader.get(segment, 0L, index); } + /// {@return `closestHitShader`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_closestHitShader(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoNV.get_closestHitShader(segment, 0L); } + /// {@return `closestHitShader` at the given index} + /// @param index the index + public @CType("uint32_t") int closestHitShaderAt(long index) { return VkRayTracingShaderGroupCreateInfoNV.get_closestHitShader(this.segment(), index); } + /// {@return `closestHitShader`} + public @CType("uint32_t") int closestHitShader() { return VkRayTracingShaderGroupCreateInfoNV.get_closestHitShader(this.segment()); } + /// Sets `closestHitShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_closestHitShader(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_closestHitShader.set(segment, 0L, index, value); } + /// Sets `closestHitShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_closestHitShader(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_closestHitShader(segment, 0L, value); } + /// Sets `closestHitShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV closestHitShaderAt(long index, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_closestHitShader(this.segment(), index, value); return this; } + /// Sets `closestHitShader` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV closestHitShader(@CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_closestHitShader(this.segment(), value); return this; } + + /// {@return `anyHitShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_anyHitShader(MemorySegment segment, long index) { return (int) VH_anyHitShader.get(segment, 0L, index); } + /// {@return `anyHitShader`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_anyHitShader(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoNV.get_anyHitShader(segment, 0L); } + /// {@return `anyHitShader` at the given index} + /// @param index the index + public @CType("uint32_t") int anyHitShaderAt(long index) { return VkRayTracingShaderGroupCreateInfoNV.get_anyHitShader(this.segment(), index); } + /// {@return `anyHitShader`} + public @CType("uint32_t") int anyHitShader() { return VkRayTracingShaderGroupCreateInfoNV.get_anyHitShader(this.segment()); } + /// Sets `anyHitShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_anyHitShader(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_anyHitShader.set(segment, 0L, index, value); } + /// Sets `anyHitShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_anyHitShader(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_anyHitShader(segment, 0L, value); } + /// Sets `anyHitShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV anyHitShaderAt(long index, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_anyHitShader(this.segment(), index, value); return this; } + /// Sets `anyHitShader` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV anyHitShader(@CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_anyHitShader(this.segment(), value); return this; } + + /// {@return `intersectionShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_intersectionShader(MemorySegment segment, long index) { return (int) VH_intersectionShader.get(segment, 0L, index); } + /// {@return `intersectionShader`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_intersectionShader(MemorySegment segment) { return VkRayTracingShaderGroupCreateInfoNV.get_intersectionShader(segment, 0L); } + /// {@return `intersectionShader` at the given index} + /// @param index the index + public @CType("uint32_t") int intersectionShaderAt(long index) { return VkRayTracingShaderGroupCreateInfoNV.get_intersectionShader(this.segment(), index); } + /// {@return `intersectionShader`} + public @CType("uint32_t") int intersectionShader() { return VkRayTracingShaderGroupCreateInfoNV.get_intersectionShader(this.segment()); } + /// Sets `intersectionShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_intersectionShader(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_intersectionShader.set(segment, 0L, index, value); } + /// Sets `intersectionShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_intersectionShader(MemorySegment segment, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_intersectionShader(segment, 0L, value); } + /// Sets `intersectionShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV intersectionShaderAt(long index, @CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_intersectionShader(this.segment(), index, value); return this; } + /// Sets `intersectionShader` with the given value. + /// @param value the value + /// @return `this` + public VkRayTracingShaderGroupCreateInfoNV intersectionShader(@CType("uint32_t") int value) { VkRayTracingShaderGroupCreateInfoNV.set_intersectionShader(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSRTDataNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSRTDataNV.java new file mode 100644 index 00000000..3149254e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSRTDataNV.java @@ -0,0 +1,666 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sx +/// [VarHandle][#VH_sx] - [Getter][#sx()] - [Setter][#sx(float)] +/// ### a +/// [VarHandle][#VH_a] - [Getter][#a()] - [Setter][#a(float)] +/// ### b +/// [VarHandle][#VH_b] - [Getter][#b()] - [Setter][#b(float)] +/// ### pvx +/// [VarHandle][#VH_pvx] - [Getter][#pvx()] - [Setter][#pvx(float)] +/// ### sy +/// [VarHandle][#VH_sy] - [Getter][#sy()] - [Setter][#sy(float)] +/// ### c +/// [VarHandle][#VH_c] - [Getter][#c()] - [Setter][#c(float)] +/// ### pvy +/// [VarHandle][#VH_pvy] - [Getter][#pvy()] - [Setter][#pvy(float)] +/// ### sz +/// [VarHandle][#VH_sz] - [Getter][#sz()] - [Setter][#sz(float)] +/// ### pvz +/// [VarHandle][#VH_pvz] - [Getter][#pvz()] - [Setter][#pvz(float)] +/// ### qx +/// [VarHandle][#VH_qx] - [Getter][#qx()] - [Setter][#qx(float)] +/// ### qy +/// [VarHandle][#VH_qy] - [Getter][#qy()] - [Setter][#qy(float)] +/// ### qz +/// [VarHandle][#VH_qz] - [Getter][#qz()] - [Setter][#qz(float)] +/// ### qw +/// [VarHandle][#VH_qw] - [Getter][#qw()] - [Setter][#qw(float)] +/// ### tx +/// [VarHandle][#VH_tx] - [Getter][#tx()] - [Setter][#tx(float)] +/// ### ty +/// [VarHandle][#VH_ty] - [Getter][#ty()] - [Setter][#ty(float)] +/// ### tz +/// [VarHandle][#VH_tz] - [Getter][#tz()] - [Setter][#tz(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSRTDataNV { +/// float sx; +/// float a; +/// float b; +/// float pvx; +/// float sy; +/// float c; +/// float pvy; +/// float sz; +/// float pvz; +/// float qx; +/// float qy; +/// float qz; +/// float qw; +/// float tx; +/// float ty; +/// float tz; +/// } VkSRTDataNV; +/// ``` +public final class VkSRTDataNV extends Struct { + /// The struct layout of `VkSRTDataNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_FLOAT.withName("sx"), + ValueLayout.JAVA_FLOAT.withName("a"), + ValueLayout.JAVA_FLOAT.withName("b"), + ValueLayout.JAVA_FLOAT.withName("pvx"), + ValueLayout.JAVA_FLOAT.withName("sy"), + ValueLayout.JAVA_FLOAT.withName("c"), + ValueLayout.JAVA_FLOAT.withName("pvy"), + ValueLayout.JAVA_FLOAT.withName("sz"), + ValueLayout.JAVA_FLOAT.withName("pvz"), + ValueLayout.JAVA_FLOAT.withName("qx"), + ValueLayout.JAVA_FLOAT.withName("qy"), + ValueLayout.JAVA_FLOAT.withName("qz"), + ValueLayout.JAVA_FLOAT.withName("qw"), + ValueLayout.JAVA_FLOAT.withName("tx"), + ValueLayout.JAVA_FLOAT.withName("ty"), + ValueLayout.JAVA_FLOAT.withName("tz") + ); + /// The [VarHandle] of `sx` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_sx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sx")); + /// The [VarHandle] of `a` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_a = LAYOUT.arrayElementVarHandle(PathElement.groupElement("a")); + /// The [VarHandle] of `b` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_b = LAYOUT.arrayElementVarHandle(PathElement.groupElement("b")); + /// The [VarHandle] of `pvx` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_pvx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pvx")); + /// The [VarHandle] of `sy` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_sy = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sy")); + /// The [VarHandle] of `c` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_c = LAYOUT.arrayElementVarHandle(PathElement.groupElement("c")); + /// The [VarHandle] of `pvy` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_pvy = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pvy")); + /// The [VarHandle] of `sz` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_sz = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sz")); + /// The [VarHandle] of `pvz` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_pvz = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pvz")); + /// The [VarHandle] of `qx` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_qx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qx")); + /// The [VarHandle] of `qy` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_qy = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qy")); + /// The [VarHandle] of `qz` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_qz = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qz")); + /// The [VarHandle] of `qw` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_qw = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qw")); + /// The [VarHandle] of `tx` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_tx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tx")); + /// The [VarHandle] of `ty` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_ty = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ty")); + /// The [VarHandle] of `tz` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_tz = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tz")); + + /// Creates `VkSRTDataNV` with the given segment. + /// @param segment the memory segment + public VkSRTDataNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSRTDataNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSRTDataNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSRTDataNV(segment); } + + /// Creates `VkSRTDataNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSRTDataNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSRTDataNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSRTDataNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSRTDataNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSRTDataNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSRTDataNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSRTDataNV` + public static VkSRTDataNV alloc(SegmentAllocator allocator) { return new VkSRTDataNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSRTDataNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSRTDataNV` + public static VkSRTDataNV alloc(SegmentAllocator allocator, long count) { return new VkSRTDataNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_sx(MemorySegment segment, long index) { return (float) VH_sx.get(segment, 0L, index); } + /// {@return `sx`} + /// @param segment the segment of the struct + public static @CType("float") float get_sx(MemorySegment segment) { return VkSRTDataNV.get_sx(segment, 0L); } + /// {@return `sx` at the given index} + /// @param index the index + public @CType("float") float sxAt(long index) { return VkSRTDataNV.get_sx(this.segment(), index); } + /// {@return `sx`} + public @CType("float") float sx() { return VkSRTDataNV.get_sx(this.segment()); } + /// Sets `sx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sx(MemorySegment segment, long index, @CType("float") float value) { VH_sx.set(segment, 0L, index, value); } + /// Sets `sx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sx(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_sx(segment, 0L, value); } + /// Sets `sx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV sxAt(long index, @CType("float") float value) { VkSRTDataNV.set_sx(this.segment(), index, value); return this; } + /// Sets `sx` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV sx(@CType("float") float value) { VkSRTDataNV.set_sx(this.segment(), value); return this; } + + /// {@return `a` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_a(MemorySegment segment, long index) { return (float) VH_a.get(segment, 0L, index); } + /// {@return `a`} + /// @param segment the segment of the struct + public static @CType("float") float get_a(MemorySegment segment) { return VkSRTDataNV.get_a(segment, 0L); } + /// {@return `a` at the given index} + /// @param index the index + public @CType("float") float aAt(long index) { return VkSRTDataNV.get_a(this.segment(), index); } + /// {@return `a`} + public @CType("float") float a() { return VkSRTDataNV.get_a(this.segment()); } + /// Sets `a` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_a(MemorySegment segment, long index, @CType("float") float value) { VH_a.set(segment, 0L, index, value); } + /// Sets `a` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_a(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_a(segment, 0L, value); } + /// Sets `a` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV aAt(long index, @CType("float") float value) { VkSRTDataNV.set_a(this.segment(), index, value); return this; } + /// Sets `a` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV a(@CType("float") float value) { VkSRTDataNV.set_a(this.segment(), value); return this; } + + /// {@return `b` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_b(MemorySegment segment, long index) { return (float) VH_b.get(segment, 0L, index); } + /// {@return `b`} + /// @param segment the segment of the struct + public static @CType("float") float get_b(MemorySegment segment) { return VkSRTDataNV.get_b(segment, 0L); } + /// {@return `b` at the given index} + /// @param index the index + public @CType("float") float bAt(long index) { return VkSRTDataNV.get_b(this.segment(), index); } + /// {@return `b`} + public @CType("float") float b() { return VkSRTDataNV.get_b(this.segment()); } + /// Sets `b` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_b(MemorySegment segment, long index, @CType("float") float value) { VH_b.set(segment, 0L, index, value); } + /// Sets `b` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_b(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_b(segment, 0L, value); } + /// Sets `b` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV bAt(long index, @CType("float") float value) { VkSRTDataNV.set_b(this.segment(), index, value); return this; } + /// Sets `b` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV b(@CType("float") float value) { VkSRTDataNV.set_b(this.segment(), value); return this; } + + /// {@return `pvx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_pvx(MemorySegment segment, long index) { return (float) VH_pvx.get(segment, 0L, index); } + /// {@return `pvx`} + /// @param segment the segment of the struct + public static @CType("float") float get_pvx(MemorySegment segment) { return VkSRTDataNV.get_pvx(segment, 0L); } + /// {@return `pvx` at the given index} + /// @param index the index + public @CType("float") float pvxAt(long index) { return VkSRTDataNV.get_pvx(this.segment(), index); } + /// {@return `pvx`} + public @CType("float") float pvx() { return VkSRTDataNV.get_pvx(this.segment()); } + /// Sets `pvx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pvx(MemorySegment segment, long index, @CType("float") float value) { VH_pvx.set(segment, 0L, index, value); } + /// Sets `pvx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pvx(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_pvx(segment, 0L, value); } + /// Sets `pvx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV pvxAt(long index, @CType("float") float value) { VkSRTDataNV.set_pvx(this.segment(), index, value); return this; } + /// Sets `pvx` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV pvx(@CType("float") float value) { VkSRTDataNV.set_pvx(this.segment(), value); return this; } + + /// {@return `sy` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_sy(MemorySegment segment, long index) { return (float) VH_sy.get(segment, 0L, index); } + /// {@return `sy`} + /// @param segment the segment of the struct + public static @CType("float") float get_sy(MemorySegment segment) { return VkSRTDataNV.get_sy(segment, 0L); } + /// {@return `sy` at the given index} + /// @param index the index + public @CType("float") float syAt(long index) { return VkSRTDataNV.get_sy(this.segment(), index); } + /// {@return `sy`} + public @CType("float") float sy() { return VkSRTDataNV.get_sy(this.segment()); } + /// Sets `sy` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sy(MemorySegment segment, long index, @CType("float") float value) { VH_sy.set(segment, 0L, index, value); } + /// Sets `sy` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sy(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_sy(segment, 0L, value); } + /// Sets `sy` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV syAt(long index, @CType("float") float value) { VkSRTDataNV.set_sy(this.segment(), index, value); return this; } + /// Sets `sy` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV sy(@CType("float") float value) { VkSRTDataNV.set_sy(this.segment(), value); return this; } + + /// {@return `c` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_c(MemorySegment segment, long index) { return (float) VH_c.get(segment, 0L, index); } + /// {@return `c`} + /// @param segment the segment of the struct + public static @CType("float") float get_c(MemorySegment segment) { return VkSRTDataNV.get_c(segment, 0L); } + /// {@return `c` at the given index} + /// @param index the index + public @CType("float") float cAt(long index) { return VkSRTDataNV.get_c(this.segment(), index); } + /// {@return `c`} + public @CType("float") float c() { return VkSRTDataNV.get_c(this.segment()); } + /// Sets `c` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_c(MemorySegment segment, long index, @CType("float") float value) { VH_c.set(segment, 0L, index, value); } + /// Sets `c` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_c(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_c(segment, 0L, value); } + /// Sets `c` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV cAt(long index, @CType("float") float value) { VkSRTDataNV.set_c(this.segment(), index, value); return this; } + /// Sets `c` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV c(@CType("float") float value) { VkSRTDataNV.set_c(this.segment(), value); return this; } + + /// {@return `pvy` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_pvy(MemorySegment segment, long index) { return (float) VH_pvy.get(segment, 0L, index); } + /// {@return `pvy`} + /// @param segment the segment of the struct + public static @CType("float") float get_pvy(MemorySegment segment) { return VkSRTDataNV.get_pvy(segment, 0L); } + /// {@return `pvy` at the given index} + /// @param index the index + public @CType("float") float pvyAt(long index) { return VkSRTDataNV.get_pvy(this.segment(), index); } + /// {@return `pvy`} + public @CType("float") float pvy() { return VkSRTDataNV.get_pvy(this.segment()); } + /// Sets `pvy` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pvy(MemorySegment segment, long index, @CType("float") float value) { VH_pvy.set(segment, 0L, index, value); } + /// Sets `pvy` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pvy(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_pvy(segment, 0L, value); } + /// Sets `pvy` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV pvyAt(long index, @CType("float") float value) { VkSRTDataNV.set_pvy(this.segment(), index, value); return this; } + /// Sets `pvy` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV pvy(@CType("float") float value) { VkSRTDataNV.set_pvy(this.segment(), value); return this; } + + /// {@return `sz` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_sz(MemorySegment segment, long index) { return (float) VH_sz.get(segment, 0L, index); } + /// {@return `sz`} + /// @param segment the segment of the struct + public static @CType("float") float get_sz(MemorySegment segment) { return VkSRTDataNV.get_sz(segment, 0L); } + /// {@return `sz` at the given index} + /// @param index the index + public @CType("float") float szAt(long index) { return VkSRTDataNV.get_sz(this.segment(), index); } + /// {@return `sz`} + public @CType("float") float sz() { return VkSRTDataNV.get_sz(this.segment()); } + /// Sets `sz` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sz(MemorySegment segment, long index, @CType("float") float value) { VH_sz.set(segment, 0L, index, value); } + /// Sets `sz` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sz(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_sz(segment, 0L, value); } + /// Sets `sz` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV szAt(long index, @CType("float") float value) { VkSRTDataNV.set_sz(this.segment(), index, value); return this; } + /// Sets `sz` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV sz(@CType("float") float value) { VkSRTDataNV.set_sz(this.segment(), value); return this; } + + /// {@return `pvz` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_pvz(MemorySegment segment, long index) { return (float) VH_pvz.get(segment, 0L, index); } + /// {@return `pvz`} + /// @param segment the segment of the struct + public static @CType("float") float get_pvz(MemorySegment segment) { return VkSRTDataNV.get_pvz(segment, 0L); } + /// {@return `pvz` at the given index} + /// @param index the index + public @CType("float") float pvzAt(long index) { return VkSRTDataNV.get_pvz(this.segment(), index); } + /// {@return `pvz`} + public @CType("float") float pvz() { return VkSRTDataNV.get_pvz(this.segment()); } + /// Sets `pvz` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pvz(MemorySegment segment, long index, @CType("float") float value) { VH_pvz.set(segment, 0L, index, value); } + /// Sets `pvz` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pvz(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_pvz(segment, 0L, value); } + /// Sets `pvz` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV pvzAt(long index, @CType("float") float value) { VkSRTDataNV.set_pvz(this.segment(), index, value); return this; } + /// Sets `pvz` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV pvz(@CType("float") float value) { VkSRTDataNV.set_pvz(this.segment(), value); return this; } + + /// {@return `qx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_qx(MemorySegment segment, long index) { return (float) VH_qx.get(segment, 0L, index); } + /// {@return `qx`} + /// @param segment the segment of the struct + public static @CType("float") float get_qx(MemorySegment segment) { return VkSRTDataNV.get_qx(segment, 0L); } + /// {@return `qx` at the given index} + /// @param index the index + public @CType("float") float qxAt(long index) { return VkSRTDataNV.get_qx(this.segment(), index); } + /// {@return `qx`} + public @CType("float") float qx() { return VkSRTDataNV.get_qx(this.segment()); } + /// Sets `qx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qx(MemorySegment segment, long index, @CType("float") float value) { VH_qx.set(segment, 0L, index, value); } + /// Sets `qx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qx(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_qx(segment, 0L, value); } + /// Sets `qx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV qxAt(long index, @CType("float") float value) { VkSRTDataNV.set_qx(this.segment(), index, value); return this; } + /// Sets `qx` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV qx(@CType("float") float value) { VkSRTDataNV.set_qx(this.segment(), value); return this; } + + /// {@return `qy` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_qy(MemorySegment segment, long index) { return (float) VH_qy.get(segment, 0L, index); } + /// {@return `qy`} + /// @param segment the segment of the struct + public static @CType("float") float get_qy(MemorySegment segment) { return VkSRTDataNV.get_qy(segment, 0L); } + /// {@return `qy` at the given index} + /// @param index the index + public @CType("float") float qyAt(long index) { return VkSRTDataNV.get_qy(this.segment(), index); } + /// {@return `qy`} + public @CType("float") float qy() { return VkSRTDataNV.get_qy(this.segment()); } + /// Sets `qy` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qy(MemorySegment segment, long index, @CType("float") float value) { VH_qy.set(segment, 0L, index, value); } + /// Sets `qy` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qy(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_qy(segment, 0L, value); } + /// Sets `qy` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV qyAt(long index, @CType("float") float value) { VkSRTDataNV.set_qy(this.segment(), index, value); return this; } + /// Sets `qy` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV qy(@CType("float") float value) { VkSRTDataNV.set_qy(this.segment(), value); return this; } + + /// {@return `qz` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_qz(MemorySegment segment, long index) { return (float) VH_qz.get(segment, 0L, index); } + /// {@return `qz`} + /// @param segment the segment of the struct + public static @CType("float") float get_qz(MemorySegment segment) { return VkSRTDataNV.get_qz(segment, 0L); } + /// {@return `qz` at the given index} + /// @param index the index + public @CType("float") float qzAt(long index) { return VkSRTDataNV.get_qz(this.segment(), index); } + /// {@return `qz`} + public @CType("float") float qz() { return VkSRTDataNV.get_qz(this.segment()); } + /// Sets `qz` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qz(MemorySegment segment, long index, @CType("float") float value) { VH_qz.set(segment, 0L, index, value); } + /// Sets `qz` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qz(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_qz(segment, 0L, value); } + /// Sets `qz` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV qzAt(long index, @CType("float") float value) { VkSRTDataNV.set_qz(this.segment(), index, value); return this; } + /// Sets `qz` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV qz(@CType("float") float value) { VkSRTDataNV.set_qz(this.segment(), value); return this; } + + /// {@return `qw` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_qw(MemorySegment segment, long index) { return (float) VH_qw.get(segment, 0L, index); } + /// {@return `qw`} + /// @param segment the segment of the struct + public static @CType("float") float get_qw(MemorySegment segment) { return VkSRTDataNV.get_qw(segment, 0L); } + /// {@return `qw` at the given index} + /// @param index the index + public @CType("float") float qwAt(long index) { return VkSRTDataNV.get_qw(this.segment(), index); } + /// {@return `qw`} + public @CType("float") float qw() { return VkSRTDataNV.get_qw(this.segment()); } + /// Sets `qw` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qw(MemorySegment segment, long index, @CType("float") float value) { VH_qw.set(segment, 0L, index, value); } + /// Sets `qw` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qw(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_qw(segment, 0L, value); } + /// Sets `qw` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV qwAt(long index, @CType("float") float value) { VkSRTDataNV.set_qw(this.segment(), index, value); return this; } + /// Sets `qw` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV qw(@CType("float") float value) { VkSRTDataNV.set_qw(this.segment(), value); return this; } + + /// {@return `tx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_tx(MemorySegment segment, long index) { return (float) VH_tx.get(segment, 0L, index); } + /// {@return `tx`} + /// @param segment the segment of the struct + public static @CType("float") float get_tx(MemorySegment segment) { return VkSRTDataNV.get_tx(segment, 0L); } + /// {@return `tx` at the given index} + /// @param index the index + public @CType("float") float txAt(long index) { return VkSRTDataNV.get_tx(this.segment(), index); } + /// {@return `tx`} + public @CType("float") float tx() { return VkSRTDataNV.get_tx(this.segment()); } + /// Sets `tx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tx(MemorySegment segment, long index, @CType("float") float value) { VH_tx.set(segment, 0L, index, value); } + /// Sets `tx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tx(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_tx(segment, 0L, value); } + /// Sets `tx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV txAt(long index, @CType("float") float value) { VkSRTDataNV.set_tx(this.segment(), index, value); return this; } + /// Sets `tx` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV tx(@CType("float") float value) { VkSRTDataNV.set_tx(this.segment(), value); return this; } + + /// {@return `ty` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_ty(MemorySegment segment, long index) { return (float) VH_ty.get(segment, 0L, index); } + /// {@return `ty`} + /// @param segment the segment of the struct + public static @CType("float") float get_ty(MemorySegment segment) { return VkSRTDataNV.get_ty(segment, 0L); } + /// {@return `ty` at the given index} + /// @param index the index + public @CType("float") float tyAt(long index) { return VkSRTDataNV.get_ty(this.segment(), index); } + /// {@return `ty`} + public @CType("float") float ty() { return VkSRTDataNV.get_ty(this.segment()); } + /// Sets `ty` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ty(MemorySegment segment, long index, @CType("float") float value) { VH_ty.set(segment, 0L, index, value); } + /// Sets `ty` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ty(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_ty(segment, 0L, value); } + /// Sets `ty` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV tyAt(long index, @CType("float") float value) { VkSRTDataNV.set_ty(this.segment(), index, value); return this; } + /// Sets `ty` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV ty(@CType("float") float value) { VkSRTDataNV.set_ty(this.segment(), value); return this; } + + /// {@return `tz` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_tz(MemorySegment segment, long index) { return (float) VH_tz.get(segment, 0L, index); } + /// {@return `tz`} + /// @param segment the segment of the struct + public static @CType("float") float get_tz(MemorySegment segment) { return VkSRTDataNV.get_tz(segment, 0L); } + /// {@return `tz` at the given index} + /// @param index the index + public @CType("float") float tzAt(long index) { return VkSRTDataNV.get_tz(this.segment(), index); } + /// {@return `tz`} + public @CType("float") float tz() { return VkSRTDataNV.get_tz(this.segment()); } + /// Sets `tz` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tz(MemorySegment segment, long index, @CType("float") float value) { VH_tz.set(segment, 0L, index, value); } + /// Sets `tz` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tz(MemorySegment segment, @CType("float") float value) { VkSRTDataNV.set_tz(segment, 0L, value); } + /// Sets `tz` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSRTDataNV tzAt(long index, @CType("float") float value) { VkSRTDataNV.set_tz(this.segment(), index, value); return this; } + /// Sets `tz` with the given value. + /// @param value the value + /// @return `this` + public VkSRTDataNV tz(@CType("float") float value) { VkSRTDataNV.set_tz(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSciSyncAttributesInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSciSyncAttributesInfoNV.java new file mode 100644 index 00000000..d527bb4d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSciSyncAttributesInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### clientType +/// [VarHandle][#VH_clientType] - [Getter][#clientType()] - [Setter][#clientType(int)] +/// ### primitiveType +/// [VarHandle][#VH_primitiveType] - [Getter][#primitiveType()] - [Setter][#primitiveType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSciSyncAttributesInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkSciSyncClientTypeNV clientType; +/// VkSciSyncPrimitiveTypeNV primitiveType; +/// } VkSciSyncAttributesInfoNV; +/// ``` +public final class VkSciSyncAttributesInfoNV extends Struct { + /// The struct layout of `VkSciSyncAttributesInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("clientType"), + ValueLayout.JAVA_INT.withName("primitiveType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `clientType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_clientType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("clientType")); + /// The [VarHandle] of `primitiveType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitiveType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveType")); + + /// Creates `VkSciSyncAttributesInfoNV` with the given segment. + /// @param segment the memory segment + public VkSciSyncAttributesInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSciSyncAttributesInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSciSyncAttributesInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSciSyncAttributesInfoNV(segment); } + + /// Creates `VkSciSyncAttributesInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSciSyncAttributesInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSciSyncAttributesInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSciSyncAttributesInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSciSyncAttributesInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSciSyncAttributesInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSciSyncAttributesInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSciSyncAttributesInfoNV` + public static VkSciSyncAttributesInfoNV alloc(SegmentAllocator allocator) { return new VkSciSyncAttributesInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSciSyncAttributesInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSciSyncAttributesInfoNV` + public static VkSciSyncAttributesInfoNV alloc(SegmentAllocator allocator, long count) { return new VkSciSyncAttributesInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSciSyncAttributesInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSciSyncAttributesInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSciSyncAttributesInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSciSyncAttributesInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSciSyncAttributesInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkSciSyncAttributesInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSciSyncAttributesInfoNV sType(@CType("VkStructureType") int value) { VkSciSyncAttributesInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSciSyncAttributesInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSciSyncAttributesInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSciSyncAttributesInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSciSyncAttributesInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSciSyncAttributesInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSciSyncAttributesInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSciSyncAttributesInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSciSyncAttributesInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `clientType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSciSyncClientTypeNV") int get_clientType(MemorySegment segment, long index) { return (int) VH_clientType.get(segment, 0L, index); } + /// {@return `clientType`} + /// @param segment the segment of the struct + public static @CType("VkSciSyncClientTypeNV") int get_clientType(MemorySegment segment) { return VkSciSyncAttributesInfoNV.get_clientType(segment, 0L); } + /// {@return `clientType` at the given index} + /// @param index the index + public @CType("VkSciSyncClientTypeNV") int clientTypeAt(long index) { return VkSciSyncAttributesInfoNV.get_clientType(this.segment(), index); } + /// {@return `clientType`} + public @CType("VkSciSyncClientTypeNV") int clientType() { return VkSciSyncAttributesInfoNV.get_clientType(this.segment()); } + /// Sets `clientType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_clientType(MemorySegment segment, long index, @CType("VkSciSyncClientTypeNV") int value) { VH_clientType.set(segment, 0L, index, value); } + /// Sets `clientType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_clientType(MemorySegment segment, @CType("VkSciSyncClientTypeNV") int value) { VkSciSyncAttributesInfoNV.set_clientType(segment, 0L, value); } + /// Sets `clientType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSciSyncAttributesInfoNV clientTypeAt(long index, @CType("VkSciSyncClientTypeNV") int value) { VkSciSyncAttributesInfoNV.set_clientType(this.segment(), index, value); return this; } + /// Sets `clientType` with the given value. + /// @param value the value + /// @return `this` + public VkSciSyncAttributesInfoNV clientType(@CType("VkSciSyncClientTypeNV") int value) { VkSciSyncAttributesInfoNV.set_clientType(this.segment(), value); return this; } + + /// {@return `primitiveType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSciSyncPrimitiveTypeNV") int get_primitiveType(MemorySegment segment, long index) { return (int) VH_primitiveType.get(segment, 0L, index); } + /// {@return `primitiveType`} + /// @param segment the segment of the struct + public static @CType("VkSciSyncPrimitiveTypeNV") int get_primitiveType(MemorySegment segment) { return VkSciSyncAttributesInfoNV.get_primitiveType(segment, 0L); } + /// {@return `primitiveType` at the given index} + /// @param index the index + public @CType("VkSciSyncPrimitiveTypeNV") int primitiveTypeAt(long index) { return VkSciSyncAttributesInfoNV.get_primitiveType(this.segment(), index); } + /// {@return `primitiveType`} + public @CType("VkSciSyncPrimitiveTypeNV") int primitiveType() { return VkSciSyncAttributesInfoNV.get_primitiveType(this.segment()); } + /// Sets `primitiveType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveType(MemorySegment segment, long index, @CType("VkSciSyncPrimitiveTypeNV") int value) { VH_primitiveType.set(segment, 0L, index, value); } + /// Sets `primitiveType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveType(MemorySegment segment, @CType("VkSciSyncPrimitiveTypeNV") int value) { VkSciSyncAttributesInfoNV.set_primitiveType(segment, 0L, value); } + /// Sets `primitiveType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSciSyncAttributesInfoNV primitiveTypeAt(long index, @CType("VkSciSyncPrimitiveTypeNV") int value) { VkSciSyncAttributesInfoNV.set_primitiveType(this.segment(), index, value); return this; } + /// Sets `primitiveType` with the given value. + /// @param value the value + /// @return `this` + public VkSciSyncAttributesInfoNV primitiveType(@CType("VkSciSyncPrimitiveTypeNV") int value) { VkSciSyncAttributesInfoNV.set_primitiveType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSemaphoreGetSciSyncInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSemaphoreGetSciSyncInfoNV.java new file mode 100644 index 00000000..9d5f3a25 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSemaphoreGetSciSyncInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreGetSciSyncInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// VkExternalSemaphoreHandleTypeFlagBits handleType; +/// } VkSemaphoreGetSciSyncInfoNV; +/// ``` +public final class VkSemaphoreGetSciSyncInfoNV extends Struct { + /// The struct layout of `VkSemaphoreGetSciSyncInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkSemaphoreGetSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + public VkSemaphoreGetSciSyncInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreGetSciSyncInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetSciSyncInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetSciSyncInfoNV(segment); } + + /// Creates `VkSemaphoreGetSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetSciSyncInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreGetSciSyncInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreGetSciSyncInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreGetSciSyncInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreGetSciSyncInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreGetSciSyncInfoNV` + public static VkSemaphoreGetSciSyncInfoNV alloc(SegmentAllocator allocator) { return new VkSemaphoreGetSciSyncInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreGetSciSyncInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreGetSciSyncInfoNV` + public static VkSemaphoreGetSciSyncInfoNV alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreGetSciSyncInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreGetSciSyncInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreGetSciSyncInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreGetSciSyncInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreGetSciSyncInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetSciSyncInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreGetSciSyncInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetSciSyncInfoNV sType(@CType("VkStructureType") int value) { VkSemaphoreGetSciSyncInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreGetSciSyncInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreGetSciSyncInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreGetSciSyncInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetSciSyncInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetSciSyncInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetSciSyncInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetSciSyncInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreGetSciSyncInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkSemaphoreGetSciSyncInfoNV.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkSemaphoreGetSciSyncInfoNV.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkSemaphoreGetSciSyncInfoNV.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetSciSyncInfoNV.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetSciSyncInfoNV semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetSciSyncInfoNV.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetSciSyncInfoNV semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreGetSciSyncInfoNV.set_semaphore(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkSemaphoreGetSciSyncInfoNV.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleTypeAt(long index) { return VkSemaphoreGetSciSyncInfoNV.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleType() { return VkSemaphoreGetSciSyncInfoNV.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetSciSyncInfoNV.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreGetSciSyncInfoNV handleTypeAt(long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetSciSyncInfoNV.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreGetSciSyncInfoNV handleType(@CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkSemaphoreGetSciSyncInfoNV.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSemaphoreSciSyncCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSemaphoreSciSyncCreateInfoNV.java new file mode 100644 index 00000000..191820ad --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSemaphoreSciSyncCreateInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphorePool +/// [VarHandle][#VH_semaphorePool] - [Getter][#semaphorePool()] - [Setter][#semaphorePool(java.lang.foreign.MemorySegment)] +/// ### pFence +/// [VarHandle][#VH_pFence] - [Getter][#pFence()] - [Setter][#pFence(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreSciSyncCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphoreSciSyncPoolNV semaphorePool; +/// const NvSciSyncFence * pFence; +/// } VkSemaphoreSciSyncCreateInfoNV; +/// ``` +public final class VkSemaphoreSciSyncCreateInfoNV extends Struct { + /// The struct layout of `VkSemaphoreSciSyncCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphorePool"), + ValueLayout.ADDRESS.withName("pFence") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphorePool` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphorePool = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphorePool")); + /// The [VarHandle] of `pFence` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pFence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pFence")); + + /// Creates `VkSemaphoreSciSyncCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkSemaphoreSciSyncCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreSciSyncCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSciSyncCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSciSyncCreateInfoNV(segment); } + + /// Creates `VkSemaphoreSciSyncCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSciSyncCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSciSyncCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreSciSyncCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSciSyncCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSciSyncCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreSciSyncCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreSciSyncCreateInfoNV` + public static VkSemaphoreSciSyncCreateInfoNV alloc(SegmentAllocator allocator) { return new VkSemaphoreSciSyncCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreSciSyncCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreSciSyncCreateInfoNV` + public static VkSemaphoreSciSyncCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreSciSyncCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreSciSyncCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreSciSyncCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreSciSyncCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreSciSyncCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreSciSyncCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncCreateInfoNV sType(@CType("VkStructureType") int value) { VkSemaphoreSciSyncCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreSciSyncCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreSciSyncCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreSciSyncCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphorePool` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphoreSciSyncPoolNV") java.lang.foreign.MemorySegment get_semaphorePool(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphorePool.get(segment, 0L, index); } + /// {@return `semaphorePool`} + /// @param segment the segment of the struct + public static @CType("VkSemaphoreSciSyncPoolNV") java.lang.foreign.MemorySegment get_semaphorePool(MemorySegment segment) { return VkSemaphoreSciSyncCreateInfoNV.get_semaphorePool(segment, 0L); } + /// {@return `semaphorePool` at the given index} + /// @param index the index + public @CType("VkSemaphoreSciSyncPoolNV") java.lang.foreign.MemorySegment semaphorePoolAt(long index) { return VkSemaphoreSciSyncCreateInfoNV.get_semaphorePool(this.segment(), index); } + /// {@return `semaphorePool`} + public @CType("VkSemaphoreSciSyncPoolNV") java.lang.foreign.MemorySegment semaphorePool() { return VkSemaphoreSciSyncCreateInfoNV.get_semaphorePool(this.segment()); } + /// Sets `semaphorePool` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphorePool(MemorySegment segment, long index, @CType("VkSemaphoreSciSyncPoolNV") java.lang.foreign.MemorySegment value) { VH_semaphorePool.set(segment, 0L, index, value); } + /// Sets `semaphorePool` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphorePool(MemorySegment segment, @CType("VkSemaphoreSciSyncPoolNV") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncCreateInfoNV.set_semaphorePool(segment, 0L, value); } + /// Sets `semaphorePool` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncCreateInfoNV semaphorePoolAt(long index, @CType("VkSemaphoreSciSyncPoolNV") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncCreateInfoNV.set_semaphorePool(this.segment(), index, value); return this; } + /// Sets `semaphorePool` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncCreateInfoNV semaphorePool(@CType("VkSemaphoreSciSyncPoolNV") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncCreateInfoNV.set_semaphorePool(this.segment(), value); return this; } + + /// {@return `pFence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const NvSciSyncFence *") java.lang.foreign.MemorySegment get_pFence(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pFence.get(segment, 0L, index); } + /// {@return `pFence`} + /// @param segment the segment of the struct + public static @CType("const NvSciSyncFence *") java.lang.foreign.MemorySegment get_pFence(MemorySegment segment) { return VkSemaphoreSciSyncCreateInfoNV.get_pFence(segment, 0L); } + /// {@return `pFence` at the given index} + /// @param index the index + public @CType("const NvSciSyncFence *") java.lang.foreign.MemorySegment pFenceAt(long index) { return VkSemaphoreSciSyncCreateInfoNV.get_pFence(this.segment(), index); } + /// {@return `pFence`} + public @CType("const NvSciSyncFence *") java.lang.foreign.MemorySegment pFence() { return VkSemaphoreSciSyncCreateInfoNV.get_pFence(this.segment()); } + /// Sets `pFence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pFence(MemorySegment segment, long index, @CType("const NvSciSyncFence *") java.lang.foreign.MemorySegment value) { VH_pFence.set(segment, 0L, index, value); } + /// Sets `pFence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pFence(MemorySegment segment, @CType("const NvSciSyncFence *") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncCreateInfoNV.set_pFence(segment, 0L, value); } + /// Sets `pFence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncCreateInfoNV pFenceAt(long index, @CType("const NvSciSyncFence *") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncCreateInfoNV.set_pFence(this.segment(), index, value); return this; } + /// Sets `pFence` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncCreateInfoNV pFence(@CType("const NvSciSyncFence *") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncCreateInfoNV.set_pFence(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSemaphoreSciSyncPoolCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSemaphoreSciSyncPoolCreateInfoNV.java new file mode 100644 index 00000000..07562971 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSemaphoreSciSyncPoolCreateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handle +/// [VarHandle][#VH_handle] - [Getter][#handle()] - [Setter][#handle(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreSciSyncPoolCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// NvSciSyncObj handle; +/// } VkSemaphoreSciSyncPoolCreateInfoNV; +/// ``` +public final class VkSemaphoreSciSyncPoolCreateInfoNV extends Struct { + /// The struct layout of `VkSemaphoreSciSyncPoolCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("handle") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_handle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handle")); + + /// Creates `VkSemaphoreSciSyncPoolCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkSemaphoreSciSyncPoolCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreSciSyncPoolCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSciSyncPoolCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSciSyncPoolCreateInfoNV(segment); } + + /// Creates `VkSemaphoreSciSyncPoolCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSciSyncPoolCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSciSyncPoolCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreSciSyncPoolCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSciSyncPoolCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSciSyncPoolCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreSciSyncPoolCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreSciSyncPoolCreateInfoNV` + public static VkSemaphoreSciSyncPoolCreateInfoNV alloc(SegmentAllocator allocator) { return new VkSemaphoreSciSyncPoolCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreSciSyncPoolCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreSciSyncPoolCreateInfoNV` + public static VkSemaphoreSciSyncPoolCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreSciSyncPoolCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreSciSyncPoolCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreSciSyncPoolCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreSciSyncPoolCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreSciSyncPoolCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncPoolCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreSciSyncPoolCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncPoolCreateInfoNV sType(@CType("VkStructureType") int value) { VkSemaphoreSciSyncPoolCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreSciSyncPoolCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreSciSyncPoolCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreSciSyncPoolCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncPoolCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncPoolCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncPoolCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncPoolCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncPoolCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `handle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("NvSciSyncObj") java.lang.foreign.MemorySegment get_handle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_handle.get(segment, 0L, index); } + /// {@return `handle`} + /// @param segment the segment of the struct + public static @CType("NvSciSyncObj") java.lang.foreign.MemorySegment get_handle(MemorySegment segment) { return VkSemaphoreSciSyncPoolCreateInfoNV.get_handle(segment, 0L); } + /// {@return `handle` at the given index} + /// @param index the index + public @CType("NvSciSyncObj") java.lang.foreign.MemorySegment handleAt(long index) { return VkSemaphoreSciSyncPoolCreateInfoNV.get_handle(this.segment(), index); } + /// {@return `handle`} + public @CType("NvSciSyncObj") java.lang.foreign.MemorySegment handle() { return VkSemaphoreSciSyncPoolCreateInfoNV.get_handle(this.segment()); } + /// Sets `handle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handle(MemorySegment segment, long index, @CType("NvSciSyncObj") java.lang.foreign.MemorySegment value) { VH_handle.set(segment, 0L, index, value); } + /// Sets `handle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handle(MemorySegment segment, @CType("NvSciSyncObj") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncPoolCreateInfoNV.set_handle(segment, 0L, value); } + /// Sets `handle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncPoolCreateInfoNV handleAt(long index, @CType("NvSciSyncObj") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncPoolCreateInfoNV.set_handle(this.segment(), index, value); return this; } + /// Sets `handle` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSciSyncPoolCreateInfoNV handle(@CType("NvSciSyncObj") java.lang.foreign.MemorySegment value) { VkSemaphoreSciSyncPoolCreateInfoNV.set_handle(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSetLatencyMarkerInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSetLatencyMarkerInfoNV.java new file mode 100644 index 00000000..2926d0df --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSetLatencyMarkerInfoNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentID +/// [VarHandle][#VH_presentID] - [Getter][#presentID()] - [Setter][#presentID(long)] +/// ### marker +/// [VarHandle][#VH_marker] - [Getter][#marker()] - [Setter][#marker(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSetLatencyMarkerInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint64_t presentID; +/// VkLatencyMarkerNV marker; +/// } VkSetLatencyMarkerInfoNV; +/// ``` +public final class VkSetLatencyMarkerInfoNV extends Struct { + /// The struct layout of `VkSetLatencyMarkerInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("presentID"), + ValueLayout.JAVA_INT.withName("marker") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentID` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_presentID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentID")); + /// The [VarHandle] of `marker` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_marker = LAYOUT.arrayElementVarHandle(PathElement.groupElement("marker")); + + /// Creates `VkSetLatencyMarkerInfoNV` with the given segment. + /// @param segment the memory segment + public VkSetLatencyMarkerInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSetLatencyMarkerInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSetLatencyMarkerInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSetLatencyMarkerInfoNV(segment); } + + /// Creates `VkSetLatencyMarkerInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSetLatencyMarkerInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSetLatencyMarkerInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSetLatencyMarkerInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSetLatencyMarkerInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSetLatencyMarkerInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSetLatencyMarkerInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSetLatencyMarkerInfoNV` + public static VkSetLatencyMarkerInfoNV alloc(SegmentAllocator allocator) { return new VkSetLatencyMarkerInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSetLatencyMarkerInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSetLatencyMarkerInfoNV` + public static VkSetLatencyMarkerInfoNV alloc(SegmentAllocator allocator, long count) { return new VkSetLatencyMarkerInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSetLatencyMarkerInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSetLatencyMarkerInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSetLatencyMarkerInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSetLatencyMarkerInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetLatencyMarkerInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkSetLatencyMarkerInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSetLatencyMarkerInfoNV sType(@CType("VkStructureType") int value) { VkSetLatencyMarkerInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSetLatencyMarkerInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSetLatencyMarkerInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSetLatencyMarkerInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSetLatencyMarkerInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetLatencyMarkerInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSetLatencyMarkerInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSetLatencyMarkerInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSetLatencyMarkerInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `presentID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_presentID(MemorySegment segment, long index) { return (long) VH_presentID.get(segment, 0L, index); } + /// {@return `presentID`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_presentID(MemorySegment segment) { return VkSetLatencyMarkerInfoNV.get_presentID(segment, 0L); } + /// {@return `presentID` at the given index} + /// @param index the index + public @CType("uint64_t") long presentIDAt(long index) { return VkSetLatencyMarkerInfoNV.get_presentID(this.segment(), index); } + /// {@return `presentID`} + public @CType("uint64_t") long presentID() { return VkSetLatencyMarkerInfoNV.get_presentID(this.segment()); } + /// Sets `presentID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentID(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_presentID.set(segment, 0L, index, value); } + /// Sets `presentID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentID(MemorySegment segment, @CType("uint64_t") long value) { VkSetLatencyMarkerInfoNV.set_presentID(segment, 0L, value); } + /// Sets `presentID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetLatencyMarkerInfoNV presentIDAt(long index, @CType("uint64_t") long value) { VkSetLatencyMarkerInfoNV.set_presentID(this.segment(), index, value); return this; } + /// Sets `presentID` with the given value. + /// @param value the value + /// @return `this` + public VkSetLatencyMarkerInfoNV presentID(@CType("uint64_t") long value) { VkSetLatencyMarkerInfoNV.set_presentID(this.segment(), value); return this; } + + /// {@return `marker` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkLatencyMarkerNV") int get_marker(MemorySegment segment, long index) { return (int) VH_marker.get(segment, 0L, index); } + /// {@return `marker`} + /// @param segment the segment of the struct + public static @CType("VkLatencyMarkerNV") int get_marker(MemorySegment segment) { return VkSetLatencyMarkerInfoNV.get_marker(segment, 0L); } + /// {@return `marker` at the given index} + /// @param index the index + public @CType("VkLatencyMarkerNV") int markerAt(long index) { return VkSetLatencyMarkerInfoNV.get_marker(this.segment(), index); } + /// {@return `marker`} + public @CType("VkLatencyMarkerNV") int marker() { return VkSetLatencyMarkerInfoNV.get_marker(this.segment()); } + /// Sets `marker` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_marker(MemorySegment segment, long index, @CType("VkLatencyMarkerNV") int value) { VH_marker.set(segment, 0L, index, value); } + /// Sets `marker` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_marker(MemorySegment segment, @CType("VkLatencyMarkerNV") int value) { VkSetLatencyMarkerInfoNV.set_marker(segment, 0L, value); } + /// Sets `marker` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetLatencyMarkerInfoNV markerAt(long index, @CType("VkLatencyMarkerNV") int value) { VkSetLatencyMarkerInfoNV.set_marker(this.segment(), index, value); return this; } + /// Sets `marker` with the given value. + /// @param value the value + /// @return `this` + public VkSetLatencyMarkerInfoNV marker(@CType("VkLatencyMarkerNV") int value) { VkSetLatencyMarkerInfoNV.set_marker(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSetStateFlagsIndirectCommandNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSetStateFlagsIndirectCommandNV.java new file mode 100644 index 00000000..e12ec8bf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSetStateFlagsIndirectCommandNV.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### data +/// [VarHandle][#VH_data] - [Getter][#data()] - [Setter][#data(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSetStateFlagsIndirectCommandNV { +/// uint32_t data; +/// } VkSetStateFlagsIndirectCommandNV; +/// ``` +public final class VkSetStateFlagsIndirectCommandNV extends Struct { + /// The struct layout of `VkSetStateFlagsIndirectCommandNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("data") + ); + /// The [VarHandle] of `data` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_data = LAYOUT.arrayElementVarHandle(PathElement.groupElement("data")); + + /// Creates `VkSetStateFlagsIndirectCommandNV` with the given segment. + /// @param segment the memory segment + public VkSetStateFlagsIndirectCommandNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSetStateFlagsIndirectCommandNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSetStateFlagsIndirectCommandNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSetStateFlagsIndirectCommandNV(segment); } + + /// Creates `VkSetStateFlagsIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSetStateFlagsIndirectCommandNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSetStateFlagsIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSetStateFlagsIndirectCommandNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSetStateFlagsIndirectCommandNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSetStateFlagsIndirectCommandNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSetStateFlagsIndirectCommandNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSetStateFlagsIndirectCommandNV` + public static VkSetStateFlagsIndirectCommandNV alloc(SegmentAllocator allocator) { return new VkSetStateFlagsIndirectCommandNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSetStateFlagsIndirectCommandNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSetStateFlagsIndirectCommandNV` + public static VkSetStateFlagsIndirectCommandNV alloc(SegmentAllocator allocator, long count) { return new VkSetStateFlagsIndirectCommandNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `data` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_data(MemorySegment segment, long index) { return (int) VH_data.get(segment, 0L, index); } + /// {@return `data`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_data(MemorySegment segment) { return VkSetStateFlagsIndirectCommandNV.get_data(segment, 0L); } + /// {@return `data` at the given index} + /// @param index the index + public @CType("uint32_t") int dataAt(long index) { return VkSetStateFlagsIndirectCommandNV.get_data(this.segment(), index); } + /// {@return `data`} + public @CType("uint32_t") int data() { return VkSetStateFlagsIndirectCommandNV.get_data(this.segment()); } + /// Sets `data` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_data(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_data.set(segment, 0L, index, value); } + /// Sets `data` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_data(MemorySegment segment, @CType("uint32_t") int value) { VkSetStateFlagsIndirectCommandNV.set_data(segment, 0L, value); } + /// Sets `data` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSetStateFlagsIndirectCommandNV dataAt(long index, @CType("uint32_t") int value) { VkSetStateFlagsIndirectCommandNV.set_data(this.segment(), index, value); return this; } + /// Sets `data` with the given value. + /// @param value the value + /// @return `this` + public VkSetStateFlagsIndirectCommandNV data(@CType("uint32_t") int value) { VkSetStateFlagsIndirectCommandNV.set_data(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkShadingRatePaletteNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkShadingRatePaletteNV.java new file mode 100644 index 00000000..5f713a51 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkShadingRatePaletteNV.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### shadingRatePaletteEntryCount +/// [VarHandle][#VH_shadingRatePaletteEntryCount] - [Getter][#shadingRatePaletteEntryCount()] - [Setter][#shadingRatePaletteEntryCount(int)] +/// ### pShadingRatePaletteEntries +/// [VarHandle][#VH_pShadingRatePaletteEntries] - [Getter][#pShadingRatePaletteEntries()] - [Setter][#pShadingRatePaletteEntries(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkShadingRatePaletteNV { +/// uint32_t shadingRatePaletteEntryCount; +/// const VkShadingRatePaletteEntryNV * pShadingRatePaletteEntries; +/// } VkShadingRatePaletteNV; +/// ``` +public final class VkShadingRatePaletteNV extends Struct { + /// The struct layout of `VkShadingRatePaletteNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("shadingRatePaletteEntryCount"), + ValueLayout.ADDRESS.withName("pShadingRatePaletteEntries") + ); + /// The [VarHandle] of `shadingRatePaletteEntryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shadingRatePaletteEntryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shadingRatePaletteEntryCount")); + /// The [VarHandle] of `pShadingRatePaletteEntries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pShadingRatePaletteEntries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pShadingRatePaletteEntries")); + + /// Creates `VkShadingRatePaletteNV` with the given segment. + /// @param segment the memory segment + public VkShadingRatePaletteNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkShadingRatePaletteNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShadingRatePaletteNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShadingRatePaletteNV(segment); } + + /// Creates `VkShadingRatePaletteNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShadingRatePaletteNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShadingRatePaletteNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkShadingRatePaletteNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkShadingRatePaletteNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkShadingRatePaletteNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkShadingRatePaletteNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkShadingRatePaletteNV` + public static VkShadingRatePaletteNV alloc(SegmentAllocator allocator) { return new VkShadingRatePaletteNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkShadingRatePaletteNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkShadingRatePaletteNV` + public static VkShadingRatePaletteNV alloc(SegmentAllocator allocator, long count) { return new VkShadingRatePaletteNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `shadingRatePaletteEntryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_shadingRatePaletteEntryCount(MemorySegment segment, long index) { return (int) VH_shadingRatePaletteEntryCount.get(segment, 0L, index); } + /// {@return `shadingRatePaletteEntryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_shadingRatePaletteEntryCount(MemorySegment segment) { return VkShadingRatePaletteNV.get_shadingRatePaletteEntryCount(segment, 0L); } + /// {@return `shadingRatePaletteEntryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int shadingRatePaletteEntryCountAt(long index) { return VkShadingRatePaletteNV.get_shadingRatePaletteEntryCount(this.segment(), index); } + /// {@return `shadingRatePaletteEntryCount`} + public @CType("uint32_t") int shadingRatePaletteEntryCount() { return VkShadingRatePaletteNV.get_shadingRatePaletteEntryCount(this.segment()); } + /// Sets `shadingRatePaletteEntryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shadingRatePaletteEntryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_shadingRatePaletteEntryCount.set(segment, 0L, index, value); } + /// Sets `shadingRatePaletteEntryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shadingRatePaletteEntryCount(MemorySegment segment, @CType("uint32_t") int value) { VkShadingRatePaletteNV.set_shadingRatePaletteEntryCount(segment, 0L, value); } + /// Sets `shadingRatePaletteEntryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShadingRatePaletteNV shadingRatePaletteEntryCountAt(long index, @CType("uint32_t") int value) { VkShadingRatePaletteNV.set_shadingRatePaletteEntryCount(this.segment(), index, value); return this; } + /// Sets `shadingRatePaletteEntryCount` with the given value. + /// @param value the value + /// @return `this` + public VkShadingRatePaletteNV shadingRatePaletteEntryCount(@CType("uint32_t") int value) { VkShadingRatePaletteNV.set_shadingRatePaletteEntryCount(this.segment(), value); return this; } + + /// {@return `pShadingRatePaletteEntries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkShadingRatePaletteEntryNV *") java.lang.foreign.MemorySegment get_pShadingRatePaletteEntries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pShadingRatePaletteEntries.get(segment, 0L, index); } + /// {@return `pShadingRatePaletteEntries`} + /// @param segment the segment of the struct + public static @CType("const VkShadingRatePaletteEntryNV *") java.lang.foreign.MemorySegment get_pShadingRatePaletteEntries(MemorySegment segment) { return VkShadingRatePaletteNV.get_pShadingRatePaletteEntries(segment, 0L); } + /// {@return `pShadingRatePaletteEntries` at the given index} + /// @param index the index + public @CType("const VkShadingRatePaletteEntryNV *") java.lang.foreign.MemorySegment pShadingRatePaletteEntriesAt(long index) { return VkShadingRatePaletteNV.get_pShadingRatePaletteEntries(this.segment(), index); } + /// {@return `pShadingRatePaletteEntries`} + public @CType("const VkShadingRatePaletteEntryNV *") java.lang.foreign.MemorySegment pShadingRatePaletteEntries() { return VkShadingRatePaletteNV.get_pShadingRatePaletteEntries(this.segment()); } + /// Sets `pShadingRatePaletteEntries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pShadingRatePaletteEntries(MemorySegment segment, long index, @CType("const VkShadingRatePaletteEntryNV *") java.lang.foreign.MemorySegment value) { VH_pShadingRatePaletteEntries.set(segment, 0L, index, value); } + /// Sets `pShadingRatePaletteEntries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pShadingRatePaletteEntries(MemorySegment segment, @CType("const VkShadingRatePaletteEntryNV *") java.lang.foreign.MemorySegment value) { VkShadingRatePaletteNV.set_pShadingRatePaletteEntries(segment, 0L, value); } + /// Sets `pShadingRatePaletteEntries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShadingRatePaletteNV pShadingRatePaletteEntriesAt(long index, @CType("const VkShadingRatePaletteEntryNV *") java.lang.foreign.MemorySegment value) { VkShadingRatePaletteNV.set_pShadingRatePaletteEntries(this.segment(), index, value); return this; } + /// Sets `pShadingRatePaletteEntries` with the given value. + /// @param value the value + /// @return `this` + public VkShadingRatePaletteNV pShadingRatePaletteEntries(@CType("const VkShadingRatePaletteEntryNV *") java.lang.foreign.MemorySegment value) { VkShadingRatePaletteNV.set_pShadingRatePaletteEntries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSurfaceCapabilitiesPresentBarrierNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSurfaceCapabilitiesPresentBarrierNV.java new file mode 100644 index 00000000..f473b159 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSurfaceCapabilitiesPresentBarrierNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentBarrierSupported +/// [VarHandle][#VH_presentBarrierSupported] - [Getter][#presentBarrierSupported()] - [Setter][#presentBarrierSupported(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSurfaceCapabilitiesPresentBarrierNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 presentBarrierSupported; +/// } VkSurfaceCapabilitiesPresentBarrierNV; +/// ``` +public final class VkSurfaceCapabilitiesPresentBarrierNV extends Struct { + /// The struct layout of `VkSurfaceCapabilitiesPresentBarrierNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("presentBarrierSupported") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentBarrierSupported` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentBarrierSupported = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentBarrierSupported")); + + /// Creates `VkSurfaceCapabilitiesPresentBarrierNV` with the given segment. + /// @param segment the memory segment + public VkSurfaceCapabilitiesPresentBarrierNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSurfaceCapabilitiesPresentBarrierNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilitiesPresentBarrierNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilitiesPresentBarrierNV(segment); } + + /// Creates `VkSurfaceCapabilitiesPresentBarrierNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilitiesPresentBarrierNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilitiesPresentBarrierNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSurfaceCapabilitiesPresentBarrierNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSurfaceCapabilitiesPresentBarrierNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSurfaceCapabilitiesPresentBarrierNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSurfaceCapabilitiesPresentBarrierNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSurfaceCapabilitiesPresentBarrierNV` + public static VkSurfaceCapabilitiesPresentBarrierNV alloc(SegmentAllocator allocator) { return new VkSurfaceCapabilitiesPresentBarrierNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSurfaceCapabilitiesPresentBarrierNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSurfaceCapabilitiesPresentBarrierNV` + public static VkSurfaceCapabilitiesPresentBarrierNV alloc(SegmentAllocator allocator, long count) { return new VkSurfaceCapabilitiesPresentBarrierNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSurfaceCapabilitiesPresentBarrierNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSurfaceCapabilitiesPresentBarrierNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSurfaceCapabilitiesPresentBarrierNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSurfaceCapabilitiesPresentBarrierNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesPresentBarrierNV sTypeAt(long index, @CType("VkStructureType") int value) { VkSurfaceCapabilitiesPresentBarrierNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesPresentBarrierNV sType(@CType("VkStructureType") int value) { VkSurfaceCapabilitiesPresentBarrierNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSurfaceCapabilitiesPresentBarrierNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSurfaceCapabilitiesPresentBarrierNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSurfaceCapabilitiesPresentBarrierNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesPresentBarrierNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesPresentBarrierNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesPresentBarrierNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesPresentBarrierNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSurfaceCapabilitiesPresentBarrierNV.set_pNext(this.segment(), value); return this; } + + /// {@return `presentBarrierSupported` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_presentBarrierSupported(MemorySegment segment, long index) { return (int) VH_presentBarrierSupported.get(segment, 0L, index); } + /// {@return `presentBarrierSupported`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_presentBarrierSupported(MemorySegment segment) { return VkSurfaceCapabilitiesPresentBarrierNV.get_presentBarrierSupported(segment, 0L); } + /// {@return `presentBarrierSupported` at the given index} + /// @param index the index + public @CType("VkBool32") int presentBarrierSupportedAt(long index) { return VkSurfaceCapabilitiesPresentBarrierNV.get_presentBarrierSupported(this.segment(), index); } + /// {@return `presentBarrierSupported`} + public @CType("VkBool32") int presentBarrierSupported() { return VkSurfaceCapabilitiesPresentBarrierNV.get_presentBarrierSupported(this.segment()); } + /// Sets `presentBarrierSupported` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentBarrierSupported(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_presentBarrierSupported.set(segment, 0L, index, value); } + /// Sets `presentBarrierSupported` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentBarrierSupported(MemorySegment segment, @CType("VkBool32") int value) { VkSurfaceCapabilitiesPresentBarrierNV.set_presentBarrierSupported(segment, 0L, value); } + /// Sets `presentBarrierSupported` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesPresentBarrierNV presentBarrierSupportedAt(long index, @CType("VkBool32") int value) { VkSurfaceCapabilitiesPresentBarrierNV.set_presentBarrierSupported(this.segment(), index, value); return this; } + /// Sets `presentBarrierSupported` with the given value. + /// @param value the value + /// @return `this` + public VkSurfaceCapabilitiesPresentBarrierNV presentBarrierSupported(@CType("VkBool32") int value) { VkSurfaceCapabilitiesPresentBarrierNV.set_presentBarrierSupported(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSwapchainLatencyCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSwapchainLatencyCreateInfoNV.java new file mode 100644 index 00000000..0ccaca06 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSwapchainLatencyCreateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### latencyModeEnable +/// [VarHandle][#VH_latencyModeEnable] - [Getter][#latencyModeEnable()] - [Setter][#latencyModeEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSwapchainLatencyCreateInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 latencyModeEnable; +/// } VkSwapchainLatencyCreateInfoNV; +/// ``` +public final class VkSwapchainLatencyCreateInfoNV extends Struct { + /// The struct layout of `VkSwapchainLatencyCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("latencyModeEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `latencyModeEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_latencyModeEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("latencyModeEnable")); + + /// Creates `VkSwapchainLatencyCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkSwapchainLatencyCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSwapchainLatencyCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainLatencyCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainLatencyCreateInfoNV(segment); } + + /// Creates `VkSwapchainLatencyCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainLatencyCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainLatencyCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSwapchainLatencyCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainLatencyCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainLatencyCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSwapchainLatencyCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSwapchainLatencyCreateInfoNV` + public static VkSwapchainLatencyCreateInfoNV alloc(SegmentAllocator allocator) { return new VkSwapchainLatencyCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSwapchainLatencyCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSwapchainLatencyCreateInfoNV` + public static VkSwapchainLatencyCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkSwapchainLatencyCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSwapchainLatencyCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSwapchainLatencyCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSwapchainLatencyCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSwapchainLatencyCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainLatencyCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkSwapchainLatencyCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainLatencyCreateInfoNV sType(@CType("VkStructureType") int value) { VkSwapchainLatencyCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSwapchainLatencyCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSwapchainLatencyCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSwapchainLatencyCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainLatencyCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainLatencyCreateInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainLatencyCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainLatencyCreateInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSwapchainLatencyCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `latencyModeEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_latencyModeEnable(MemorySegment segment, long index) { return (int) VH_latencyModeEnable.get(segment, 0L, index); } + /// {@return `latencyModeEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_latencyModeEnable(MemorySegment segment) { return VkSwapchainLatencyCreateInfoNV.get_latencyModeEnable(segment, 0L); } + /// {@return `latencyModeEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int latencyModeEnableAt(long index) { return VkSwapchainLatencyCreateInfoNV.get_latencyModeEnable(this.segment(), index); } + /// {@return `latencyModeEnable`} + public @CType("VkBool32") int latencyModeEnable() { return VkSwapchainLatencyCreateInfoNV.get_latencyModeEnable(this.segment()); } + /// Sets `latencyModeEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_latencyModeEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_latencyModeEnable.set(segment, 0L, index, value); } + /// Sets `latencyModeEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_latencyModeEnable(MemorySegment segment, @CType("VkBool32") int value) { VkSwapchainLatencyCreateInfoNV.set_latencyModeEnable(segment, 0L, value); } + /// Sets `latencyModeEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainLatencyCreateInfoNV latencyModeEnableAt(long index, @CType("VkBool32") int value) { VkSwapchainLatencyCreateInfoNV.set_latencyModeEnable(this.segment(), index, value); return this; } + /// Sets `latencyModeEnable` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainLatencyCreateInfoNV latencyModeEnable(@CType("VkBool32") int value) { VkSwapchainLatencyCreateInfoNV.set_latencyModeEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSwapchainPresentBarrierCreateInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSwapchainPresentBarrierCreateInfoNV.java new file mode 100644 index 00000000..75bb9038 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkSwapchainPresentBarrierCreateInfoNV.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### presentBarrierEnable +/// [VarHandle][#VH_presentBarrierEnable] - [Getter][#presentBarrierEnable()] - [Setter][#presentBarrierEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSwapchainPresentBarrierCreateInfoNV { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 presentBarrierEnable; +/// } VkSwapchainPresentBarrierCreateInfoNV; +/// ``` +public final class VkSwapchainPresentBarrierCreateInfoNV extends Struct { + /// The struct layout of `VkSwapchainPresentBarrierCreateInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("presentBarrierEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `presentBarrierEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_presentBarrierEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("presentBarrierEnable")); + + /// Creates `VkSwapchainPresentBarrierCreateInfoNV` with the given segment. + /// @param segment the memory segment + public VkSwapchainPresentBarrierCreateInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSwapchainPresentBarrierCreateInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentBarrierCreateInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentBarrierCreateInfoNV(segment); } + + /// Creates `VkSwapchainPresentBarrierCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentBarrierCreateInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentBarrierCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSwapchainPresentBarrierCreateInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSwapchainPresentBarrierCreateInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSwapchainPresentBarrierCreateInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSwapchainPresentBarrierCreateInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSwapchainPresentBarrierCreateInfoNV` + public static VkSwapchainPresentBarrierCreateInfoNV alloc(SegmentAllocator allocator) { return new VkSwapchainPresentBarrierCreateInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSwapchainPresentBarrierCreateInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSwapchainPresentBarrierCreateInfoNV` + public static VkSwapchainPresentBarrierCreateInfoNV alloc(SegmentAllocator allocator, long count) { return new VkSwapchainPresentBarrierCreateInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSwapchainPresentBarrierCreateInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSwapchainPresentBarrierCreateInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSwapchainPresentBarrierCreateInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSwapchainPresentBarrierCreateInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentBarrierCreateInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkSwapchainPresentBarrierCreateInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentBarrierCreateInfoNV sType(@CType("VkStructureType") int value) { VkSwapchainPresentBarrierCreateInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSwapchainPresentBarrierCreateInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSwapchainPresentBarrierCreateInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSwapchainPresentBarrierCreateInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentBarrierCreateInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentBarrierCreateInfoNV pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentBarrierCreateInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentBarrierCreateInfoNV pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSwapchainPresentBarrierCreateInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `presentBarrierEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_presentBarrierEnable(MemorySegment segment, long index) { return (int) VH_presentBarrierEnable.get(segment, 0L, index); } + /// {@return `presentBarrierEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_presentBarrierEnable(MemorySegment segment) { return VkSwapchainPresentBarrierCreateInfoNV.get_presentBarrierEnable(segment, 0L); } + /// {@return `presentBarrierEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int presentBarrierEnableAt(long index) { return VkSwapchainPresentBarrierCreateInfoNV.get_presentBarrierEnable(this.segment(), index); } + /// {@return `presentBarrierEnable`} + public @CType("VkBool32") int presentBarrierEnable() { return VkSwapchainPresentBarrierCreateInfoNV.get_presentBarrierEnable(this.segment()); } + /// Sets `presentBarrierEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_presentBarrierEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_presentBarrierEnable.set(segment, 0L, index, value); } + /// Sets `presentBarrierEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_presentBarrierEnable(MemorySegment segment, @CType("VkBool32") int value) { VkSwapchainPresentBarrierCreateInfoNV.set_presentBarrierEnable(segment, 0L, value); } + /// Sets `presentBarrierEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSwapchainPresentBarrierCreateInfoNV presentBarrierEnableAt(long index, @CType("VkBool32") int value) { VkSwapchainPresentBarrierCreateInfoNV.set_presentBarrierEnable(this.segment(), index, value); return this; } + /// Sets `presentBarrierEnable` with the given value. + /// @param value the value + /// @return `this` + public VkSwapchainPresentBarrierCreateInfoNV presentBarrierEnable(@CType("VkBool32") int value) { VkSwapchainPresentBarrierCreateInfoNV.set_presentBarrierEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkViewportSwizzleNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkViewportSwizzleNV.java new file mode 100644 index 00000000..c95cecf0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkViewportSwizzleNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### x +/// [VarHandle][#VH_x] - [Getter][#x()] - [Setter][#x(int)] +/// ### y +/// [VarHandle][#VH_y] - [Getter][#y()] - [Setter][#y(int)] +/// ### z +/// [VarHandle][#VH_z] - [Getter][#z()] - [Setter][#z(int)] +/// ### w +/// [VarHandle][#VH_w] - [Getter][#w()] - [Setter][#w(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkViewportSwizzleNV { +/// VkViewportCoordinateSwizzleNV x; +/// VkViewportCoordinateSwizzleNV y; +/// VkViewportCoordinateSwizzleNV z; +/// VkViewportCoordinateSwizzleNV w; +/// } VkViewportSwizzleNV; +/// ``` +public final class VkViewportSwizzleNV extends Struct { + /// The struct layout of `VkViewportSwizzleNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("x"), + ValueLayout.JAVA_INT.withName("y"), + ValueLayout.JAVA_INT.withName("z"), + ValueLayout.JAVA_INT.withName("w") + ); + /// The [VarHandle] of `x` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_x = LAYOUT.arrayElementVarHandle(PathElement.groupElement("x")); + /// The [VarHandle] of `y` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_y = LAYOUT.arrayElementVarHandle(PathElement.groupElement("y")); + /// The [VarHandle] of `z` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_z = LAYOUT.arrayElementVarHandle(PathElement.groupElement("z")); + /// The [VarHandle] of `w` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_w = LAYOUT.arrayElementVarHandle(PathElement.groupElement("w")); + + /// Creates `VkViewportSwizzleNV` with the given segment. + /// @param segment the memory segment + public VkViewportSwizzleNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkViewportSwizzleNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkViewportSwizzleNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkViewportSwizzleNV(segment); } + + /// Creates `VkViewportSwizzleNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkViewportSwizzleNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkViewportSwizzleNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkViewportSwizzleNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkViewportSwizzleNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkViewportSwizzleNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkViewportSwizzleNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkViewportSwizzleNV` + public static VkViewportSwizzleNV alloc(SegmentAllocator allocator) { return new VkViewportSwizzleNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkViewportSwizzleNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkViewportSwizzleNV` + public static VkViewportSwizzleNV alloc(SegmentAllocator allocator, long count) { return new VkViewportSwizzleNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `x` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkViewportCoordinateSwizzleNV") int get_x(MemorySegment segment, long index) { return (int) VH_x.get(segment, 0L, index); } + /// {@return `x`} + /// @param segment the segment of the struct + public static @CType("VkViewportCoordinateSwizzleNV") int get_x(MemorySegment segment) { return VkViewportSwizzleNV.get_x(segment, 0L); } + /// {@return `x` at the given index} + /// @param index the index + public @CType("VkViewportCoordinateSwizzleNV") int xAt(long index) { return VkViewportSwizzleNV.get_x(this.segment(), index); } + /// {@return `x`} + public @CType("VkViewportCoordinateSwizzleNV") int x() { return VkViewportSwizzleNV.get_x(this.segment()); } + /// Sets `x` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_x(MemorySegment segment, long index, @CType("VkViewportCoordinateSwizzleNV") int value) { VH_x.set(segment, 0L, index, value); } + /// Sets `x` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_x(MemorySegment segment, @CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_x(segment, 0L, value); } + /// Sets `x` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewportSwizzleNV xAt(long index, @CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_x(this.segment(), index, value); return this; } + /// Sets `x` with the given value. + /// @param value the value + /// @return `this` + public VkViewportSwizzleNV x(@CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_x(this.segment(), value); return this; } + + /// {@return `y` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkViewportCoordinateSwizzleNV") int get_y(MemorySegment segment, long index) { return (int) VH_y.get(segment, 0L, index); } + /// {@return `y`} + /// @param segment the segment of the struct + public static @CType("VkViewportCoordinateSwizzleNV") int get_y(MemorySegment segment) { return VkViewportSwizzleNV.get_y(segment, 0L); } + /// {@return `y` at the given index} + /// @param index the index + public @CType("VkViewportCoordinateSwizzleNV") int yAt(long index) { return VkViewportSwizzleNV.get_y(this.segment(), index); } + /// {@return `y`} + public @CType("VkViewportCoordinateSwizzleNV") int y() { return VkViewportSwizzleNV.get_y(this.segment()); } + /// Sets `y` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_y(MemorySegment segment, long index, @CType("VkViewportCoordinateSwizzleNV") int value) { VH_y.set(segment, 0L, index, value); } + /// Sets `y` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_y(MemorySegment segment, @CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_y(segment, 0L, value); } + /// Sets `y` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewportSwizzleNV yAt(long index, @CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_y(this.segment(), index, value); return this; } + /// Sets `y` with the given value. + /// @param value the value + /// @return `this` + public VkViewportSwizzleNV y(@CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_y(this.segment(), value); return this; } + + /// {@return `z` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkViewportCoordinateSwizzleNV") int get_z(MemorySegment segment, long index) { return (int) VH_z.get(segment, 0L, index); } + /// {@return `z`} + /// @param segment the segment of the struct + public static @CType("VkViewportCoordinateSwizzleNV") int get_z(MemorySegment segment) { return VkViewportSwizzleNV.get_z(segment, 0L); } + /// {@return `z` at the given index} + /// @param index the index + public @CType("VkViewportCoordinateSwizzleNV") int zAt(long index) { return VkViewportSwizzleNV.get_z(this.segment(), index); } + /// {@return `z`} + public @CType("VkViewportCoordinateSwizzleNV") int z() { return VkViewportSwizzleNV.get_z(this.segment()); } + /// Sets `z` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_z(MemorySegment segment, long index, @CType("VkViewportCoordinateSwizzleNV") int value) { VH_z.set(segment, 0L, index, value); } + /// Sets `z` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_z(MemorySegment segment, @CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_z(segment, 0L, value); } + /// Sets `z` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewportSwizzleNV zAt(long index, @CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_z(this.segment(), index, value); return this; } + /// Sets `z` with the given value. + /// @param value the value + /// @return `this` + public VkViewportSwizzleNV z(@CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_z(this.segment(), value); return this; } + + /// {@return `w` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkViewportCoordinateSwizzleNV") int get_w(MemorySegment segment, long index) { return (int) VH_w.get(segment, 0L, index); } + /// {@return `w`} + /// @param segment the segment of the struct + public static @CType("VkViewportCoordinateSwizzleNV") int get_w(MemorySegment segment) { return VkViewportSwizzleNV.get_w(segment, 0L); } + /// {@return `w` at the given index} + /// @param index the index + public @CType("VkViewportCoordinateSwizzleNV") int wAt(long index) { return VkViewportSwizzleNV.get_w(this.segment(), index); } + /// {@return `w`} + public @CType("VkViewportCoordinateSwizzleNV") int w() { return VkViewportSwizzleNV.get_w(this.segment()); } + /// Sets `w` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_w(MemorySegment segment, long index, @CType("VkViewportCoordinateSwizzleNV") int value) { VH_w.set(segment, 0L, index, value); } + /// Sets `w` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_w(MemorySegment segment, @CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_w(segment, 0L, value); } + /// Sets `w` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewportSwizzleNV wAt(long index, @CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_w(this.segment(), index, value); return this; } + /// Sets `w` with the given value. + /// @param value the value + /// @return `this` + public VkViewportSwizzleNV w(@CType("VkViewportCoordinateSwizzleNV") int value) { VkViewportSwizzleNV.set_w(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkViewportWScalingNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkViewportWScalingNV.java new file mode 100644 index 00000000..2c27a17a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkViewportWScalingNV.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### xcoeff +/// [VarHandle][#VH_xcoeff] - [Getter][#xcoeff()] - [Setter][#xcoeff(float)] +/// ### ycoeff +/// [VarHandle][#VH_ycoeff] - [Getter][#ycoeff()] - [Setter][#ycoeff(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkViewportWScalingNV { +/// float xcoeff; +/// float ycoeff; +/// } VkViewportWScalingNV; +/// ``` +public final class VkViewportWScalingNV extends Struct { + /// The struct layout of `VkViewportWScalingNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_FLOAT.withName("xcoeff"), + ValueLayout.JAVA_FLOAT.withName("ycoeff") + ); + /// The [VarHandle] of `xcoeff` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_xcoeff = LAYOUT.arrayElementVarHandle(PathElement.groupElement("xcoeff")); + /// The [VarHandle] of `ycoeff` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_ycoeff = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ycoeff")); + + /// Creates `VkViewportWScalingNV` with the given segment. + /// @param segment the memory segment + public VkViewportWScalingNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkViewportWScalingNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkViewportWScalingNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkViewportWScalingNV(segment); } + + /// Creates `VkViewportWScalingNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkViewportWScalingNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkViewportWScalingNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkViewportWScalingNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkViewportWScalingNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkViewportWScalingNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkViewportWScalingNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkViewportWScalingNV` + public static VkViewportWScalingNV alloc(SegmentAllocator allocator) { return new VkViewportWScalingNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkViewportWScalingNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkViewportWScalingNV` + public static VkViewportWScalingNV alloc(SegmentAllocator allocator, long count) { return new VkViewportWScalingNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `xcoeff` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_xcoeff(MemorySegment segment, long index) { return (float) VH_xcoeff.get(segment, 0L, index); } + /// {@return `xcoeff`} + /// @param segment the segment of the struct + public static @CType("float") float get_xcoeff(MemorySegment segment) { return VkViewportWScalingNV.get_xcoeff(segment, 0L); } + /// {@return `xcoeff` at the given index} + /// @param index the index + public @CType("float") float xcoeffAt(long index) { return VkViewportWScalingNV.get_xcoeff(this.segment(), index); } + /// {@return `xcoeff`} + public @CType("float") float xcoeff() { return VkViewportWScalingNV.get_xcoeff(this.segment()); } + /// Sets `xcoeff` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_xcoeff(MemorySegment segment, long index, @CType("float") float value) { VH_xcoeff.set(segment, 0L, index, value); } + /// Sets `xcoeff` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_xcoeff(MemorySegment segment, @CType("float") float value) { VkViewportWScalingNV.set_xcoeff(segment, 0L, value); } + /// Sets `xcoeff` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewportWScalingNV xcoeffAt(long index, @CType("float") float value) { VkViewportWScalingNV.set_xcoeff(this.segment(), index, value); return this; } + /// Sets `xcoeff` with the given value. + /// @param value the value + /// @return `this` + public VkViewportWScalingNV xcoeff(@CType("float") float value) { VkViewportWScalingNV.set_xcoeff(this.segment(), value); return this; } + + /// {@return `ycoeff` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_ycoeff(MemorySegment segment, long index) { return (float) VH_ycoeff.get(segment, 0L, index); } + /// {@return `ycoeff`} + /// @param segment the segment of the struct + public static @CType("float") float get_ycoeff(MemorySegment segment) { return VkViewportWScalingNV.get_ycoeff(segment, 0L); } + /// {@return `ycoeff` at the given index} + /// @param index the index + public @CType("float") float ycoeffAt(long index) { return VkViewportWScalingNV.get_ycoeff(this.segment(), index); } + /// {@return `ycoeff`} + public @CType("float") float ycoeff() { return VkViewportWScalingNV.get_ycoeff(this.segment()); } + /// Sets `ycoeff` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ycoeff(MemorySegment segment, long index, @CType("float") float value) { VH_ycoeff.set(segment, 0L, index, value); } + /// Sets `ycoeff` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ycoeff(MemorySegment segment, @CType("float") float value) { VkViewportWScalingNV.set_ycoeff(segment, 0L, value); } + /// Sets `ycoeff` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewportWScalingNV ycoeffAt(long index, @CType("float") float value) { VkViewportWScalingNV.set_ycoeff(this.segment(), index, value); return this; } + /// Sets `ycoeff` with the given value. + /// @param value the value + /// @return `this` + public VkViewportWScalingNV ycoeff(@CType("float") float value) { VkViewportWScalingNV.set_ycoeff(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkWin32KeyedMutexAcquireReleaseInfoNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkWin32KeyedMutexAcquireReleaseInfoNV.java new file mode 100644 index 00000000..cc0d02c4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkWin32KeyedMutexAcquireReleaseInfoNV.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### acquireCount +/// [VarHandle][#VH_acquireCount] - [Getter][#acquireCount()] - [Setter][#acquireCount(int)] +/// ### pAcquireSyncs +/// [VarHandle][#VH_pAcquireSyncs] - [Getter][#pAcquireSyncs()] - [Setter][#pAcquireSyncs(java.lang.foreign.MemorySegment)] +/// ### pAcquireKeys +/// [VarHandle][#VH_pAcquireKeys] - [Getter][#pAcquireKeys()] - [Setter][#pAcquireKeys(java.lang.foreign.MemorySegment)] +/// ### pAcquireTimeoutMilliseconds +/// [VarHandle][#VH_pAcquireTimeoutMilliseconds] - [Getter][#pAcquireTimeoutMilliseconds()] - [Setter][#pAcquireTimeoutMilliseconds(java.lang.foreign.MemorySegment)] +/// ### releaseCount +/// [VarHandle][#VH_releaseCount] - [Getter][#releaseCount()] - [Setter][#releaseCount(int)] +/// ### pReleaseSyncs +/// [VarHandle][#VH_pReleaseSyncs] - [Getter][#pReleaseSyncs()] - [Setter][#pReleaseSyncs(java.lang.foreign.MemorySegment)] +/// ### pReleaseKeys +/// [VarHandle][#VH_pReleaseKeys] - [Getter][#pReleaseKeys()] - [Setter][#pReleaseKeys(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t acquireCount; +/// const VkDeviceMemory * pAcquireSyncs; +/// const uint64_t * pAcquireKeys; +/// const uint32_t * pAcquireTimeoutMilliseconds; +/// uint32_t releaseCount; +/// const VkDeviceMemory * pReleaseSyncs; +/// const uint64_t * pReleaseKeys; +/// } VkWin32KeyedMutexAcquireReleaseInfoNV; +/// ``` +public final class VkWin32KeyedMutexAcquireReleaseInfoNV extends Struct { + /// The struct layout of `VkWin32KeyedMutexAcquireReleaseInfoNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("acquireCount"), + ValueLayout.ADDRESS.withName("pAcquireSyncs"), + ValueLayout.ADDRESS.withName("pAcquireKeys"), + ValueLayout.ADDRESS.withName("pAcquireTimeoutMilliseconds"), + ValueLayout.JAVA_INT.withName("releaseCount"), + ValueLayout.ADDRESS.withName("pReleaseSyncs"), + ValueLayout.ADDRESS.withName("pReleaseKeys") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `acquireCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_acquireCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("acquireCount")); + /// The [VarHandle] of `pAcquireSyncs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAcquireSyncs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAcquireSyncs")); + /// The [VarHandle] of `pAcquireKeys` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAcquireKeys = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAcquireKeys")); + /// The [VarHandle] of `pAcquireTimeoutMilliseconds` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAcquireTimeoutMilliseconds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAcquireTimeoutMilliseconds")); + /// The [VarHandle] of `releaseCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_releaseCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("releaseCount")); + /// The [VarHandle] of `pReleaseSyncs` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pReleaseSyncs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pReleaseSyncs")); + /// The [VarHandle] of `pReleaseKeys` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pReleaseKeys = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pReleaseKeys")); + + /// Creates `VkWin32KeyedMutexAcquireReleaseInfoNV` with the given segment. + /// @param segment the memory segment + public VkWin32KeyedMutexAcquireReleaseInfoNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkWin32KeyedMutexAcquireReleaseInfoNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWin32KeyedMutexAcquireReleaseInfoNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWin32KeyedMutexAcquireReleaseInfoNV(segment); } + + /// Creates `VkWin32KeyedMutexAcquireReleaseInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWin32KeyedMutexAcquireReleaseInfoNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWin32KeyedMutexAcquireReleaseInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkWin32KeyedMutexAcquireReleaseInfoNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkWin32KeyedMutexAcquireReleaseInfoNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkWin32KeyedMutexAcquireReleaseInfoNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkWin32KeyedMutexAcquireReleaseInfoNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkWin32KeyedMutexAcquireReleaseInfoNV` + public static VkWin32KeyedMutexAcquireReleaseInfoNV alloc(SegmentAllocator allocator) { return new VkWin32KeyedMutexAcquireReleaseInfoNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkWin32KeyedMutexAcquireReleaseInfoNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkWin32KeyedMutexAcquireReleaseInfoNV` + public static VkWin32KeyedMutexAcquireReleaseInfoNV alloc(SegmentAllocator allocator, long count) { return new VkWin32KeyedMutexAcquireReleaseInfoNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV sTypeAt(long index, @CType("VkStructureType") int value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV sType(@CType("VkStructureType") int value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pNext(this.segment(), value); return this; } + + /// {@return `acquireCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_acquireCount(MemorySegment segment, long index) { return (int) VH_acquireCount.get(segment, 0L, index); } + /// {@return `acquireCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_acquireCount(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_acquireCount(segment, 0L); } + /// {@return `acquireCount` at the given index} + /// @param index the index + public @CType("uint32_t") int acquireCountAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_acquireCount(this.segment(), index); } + /// {@return `acquireCount`} + public @CType("uint32_t") int acquireCount() { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_acquireCount(this.segment()); } + /// Sets `acquireCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_acquireCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_acquireCount.set(segment, 0L, index, value); } + /// Sets `acquireCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_acquireCount(MemorySegment segment, @CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_acquireCount(segment, 0L, value); } + /// Sets `acquireCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV acquireCountAt(long index, @CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_acquireCount(this.segment(), index, value); return this; } + /// Sets `acquireCount` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV acquireCount(@CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_acquireCount(this.segment(), value); return this; } + + /// {@return `pAcquireSyncs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment get_pAcquireSyncs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAcquireSyncs.get(segment, 0L, index); } + /// {@return `pAcquireSyncs`} + /// @param segment the segment of the struct + public static @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment get_pAcquireSyncs(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pAcquireSyncs(segment, 0L); } + /// {@return `pAcquireSyncs` at the given index} + /// @param index the index + public @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment pAcquireSyncsAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pAcquireSyncs(this.segment(), index); } + /// {@return `pAcquireSyncs`} + public @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment pAcquireSyncs() { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pAcquireSyncs(this.segment()); } + /// Sets `pAcquireSyncs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAcquireSyncs(MemorySegment segment, long index, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VH_pAcquireSyncs.set(segment, 0L, index, value); } + /// Sets `pAcquireSyncs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAcquireSyncs(MemorySegment segment, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pAcquireSyncs(segment, 0L, value); } + /// Sets `pAcquireSyncs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pAcquireSyncsAt(long index, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pAcquireSyncs(this.segment(), index, value); return this; } + /// Sets `pAcquireSyncs` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pAcquireSyncs(@CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pAcquireSyncs(this.segment(), value); return this; } + + /// {@return `pAcquireKeys` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pAcquireKeys(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAcquireKeys.get(segment, 0L, index); } + /// {@return `pAcquireKeys`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pAcquireKeys(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pAcquireKeys(segment, 0L); } + /// {@return `pAcquireKeys` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pAcquireKeysAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pAcquireKeys(this.segment(), index); } + /// {@return `pAcquireKeys`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pAcquireKeys() { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pAcquireKeys(this.segment()); } + /// Sets `pAcquireKeys` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAcquireKeys(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pAcquireKeys.set(segment, 0L, index, value); } + /// Sets `pAcquireKeys` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAcquireKeys(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pAcquireKeys(segment, 0L, value); } + /// Sets `pAcquireKeys` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pAcquireKeysAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pAcquireKeys(this.segment(), index, value); return this; } + /// Sets `pAcquireKeys` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pAcquireKeys(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pAcquireKeys(this.segment(), value); return this; } + + /// {@return `pAcquireTimeoutMilliseconds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pAcquireTimeoutMilliseconds(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAcquireTimeoutMilliseconds.get(segment, 0L, index); } + /// {@return `pAcquireTimeoutMilliseconds`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pAcquireTimeoutMilliseconds(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pAcquireTimeoutMilliseconds(segment, 0L); } + /// {@return `pAcquireTimeoutMilliseconds` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pAcquireTimeoutMillisecondsAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pAcquireTimeoutMilliseconds(this.segment(), index); } + /// {@return `pAcquireTimeoutMilliseconds`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pAcquireTimeoutMilliseconds() { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pAcquireTimeoutMilliseconds(this.segment()); } + /// Sets `pAcquireTimeoutMilliseconds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAcquireTimeoutMilliseconds(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pAcquireTimeoutMilliseconds.set(segment, 0L, index, value); } + /// Sets `pAcquireTimeoutMilliseconds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAcquireTimeoutMilliseconds(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pAcquireTimeoutMilliseconds(segment, 0L, value); } + /// Sets `pAcquireTimeoutMilliseconds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pAcquireTimeoutMillisecondsAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pAcquireTimeoutMilliseconds(this.segment(), index, value); return this; } + /// Sets `pAcquireTimeoutMilliseconds` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pAcquireTimeoutMilliseconds(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pAcquireTimeoutMilliseconds(this.segment(), value); return this; } + + /// {@return `releaseCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_releaseCount(MemorySegment segment, long index) { return (int) VH_releaseCount.get(segment, 0L, index); } + /// {@return `releaseCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_releaseCount(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_releaseCount(segment, 0L); } + /// {@return `releaseCount` at the given index} + /// @param index the index + public @CType("uint32_t") int releaseCountAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_releaseCount(this.segment(), index); } + /// {@return `releaseCount`} + public @CType("uint32_t") int releaseCount() { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_releaseCount(this.segment()); } + /// Sets `releaseCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_releaseCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_releaseCount.set(segment, 0L, index, value); } + /// Sets `releaseCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_releaseCount(MemorySegment segment, @CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_releaseCount(segment, 0L, value); } + /// Sets `releaseCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV releaseCountAt(long index, @CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_releaseCount(this.segment(), index, value); return this; } + /// Sets `releaseCount` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV releaseCount(@CType("uint32_t") int value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_releaseCount(this.segment(), value); return this; } + + /// {@return `pReleaseSyncs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment get_pReleaseSyncs(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pReleaseSyncs.get(segment, 0L, index); } + /// {@return `pReleaseSyncs`} + /// @param segment the segment of the struct + public static @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment get_pReleaseSyncs(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pReleaseSyncs(segment, 0L); } + /// {@return `pReleaseSyncs` at the given index} + /// @param index the index + public @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment pReleaseSyncsAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pReleaseSyncs(this.segment(), index); } + /// {@return `pReleaseSyncs`} + public @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment pReleaseSyncs() { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pReleaseSyncs(this.segment()); } + /// Sets `pReleaseSyncs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pReleaseSyncs(MemorySegment segment, long index, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VH_pReleaseSyncs.set(segment, 0L, index, value); } + /// Sets `pReleaseSyncs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pReleaseSyncs(MemorySegment segment, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pReleaseSyncs(segment, 0L, value); } + /// Sets `pReleaseSyncs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pReleaseSyncsAt(long index, @CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pReleaseSyncs(this.segment(), index, value); return this; } + /// Sets `pReleaseSyncs` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pReleaseSyncs(@CType("const VkDeviceMemory *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pReleaseSyncs(this.segment(), value); return this; } + + /// {@return `pReleaseKeys` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pReleaseKeys(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pReleaseKeys.get(segment, 0L, index); } + /// {@return `pReleaseKeys`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pReleaseKeys(MemorySegment segment) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pReleaseKeys(segment, 0L); } + /// {@return `pReleaseKeys` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pReleaseKeysAt(long index) { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pReleaseKeys(this.segment(), index); } + /// {@return `pReleaseKeys`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pReleaseKeys() { return VkWin32KeyedMutexAcquireReleaseInfoNV.get_pReleaseKeys(this.segment()); } + /// Sets `pReleaseKeys` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pReleaseKeys(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pReleaseKeys.set(segment, 0L, index, value); } + /// Sets `pReleaseKeys` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pReleaseKeys(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pReleaseKeys(segment, 0L, value); } + /// Sets `pReleaseKeys` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pReleaseKeysAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pReleaseKeys(this.segment(), index, value); return this; } + /// Sets `pReleaseKeys` with the given value. + /// @param value the value + /// @return `this` + public VkWin32KeyedMutexAcquireReleaseInfoNV pReleaseKeys(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkWin32KeyedMutexAcquireReleaseInfoNV.set_pReleaseKeys(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkWriteDescriptorSetAccelerationStructureNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkWriteDescriptorSetAccelerationStructureNV.java new file mode 100644 index 00000000..cc4e8826 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/struct/VkWriteDescriptorSetAccelerationStructureNV.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### accelerationStructureCount +/// [VarHandle][#VH_accelerationStructureCount] - [Getter][#accelerationStructureCount()] - [Setter][#accelerationStructureCount(int)] +/// ### pAccelerationStructures +/// [VarHandle][#VH_pAccelerationStructures] - [Getter][#pAccelerationStructures()] - [Setter][#pAccelerationStructures(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkWriteDescriptorSetAccelerationStructureNV { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t accelerationStructureCount; +/// const VkAccelerationStructureNV * pAccelerationStructures; +/// } VkWriteDescriptorSetAccelerationStructureNV; +/// ``` +public final class VkWriteDescriptorSetAccelerationStructureNV extends Struct { + /// The struct layout of `VkWriteDescriptorSetAccelerationStructureNV`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("accelerationStructureCount"), + ValueLayout.ADDRESS.withName("pAccelerationStructures") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `accelerationStructureCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_accelerationStructureCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("accelerationStructureCount")); + /// The [VarHandle] of `pAccelerationStructures` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAccelerationStructures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAccelerationStructures")); + + /// Creates `VkWriteDescriptorSetAccelerationStructureNV` with the given segment. + /// @param segment the memory segment + public VkWriteDescriptorSetAccelerationStructureNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkWriteDescriptorSetAccelerationStructureNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSetAccelerationStructureNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSetAccelerationStructureNV(segment); } + + /// Creates `VkWriteDescriptorSetAccelerationStructureNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSetAccelerationStructureNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSetAccelerationStructureNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkWriteDescriptorSetAccelerationStructureNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSetAccelerationStructureNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSetAccelerationStructureNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkWriteDescriptorSetAccelerationStructureNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkWriteDescriptorSetAccelerationStructureNV` + public static VkWriteDescriptorSetAccelerationStructureNV alloc(SegmentAllocator allocator) { return new VkWriteDescriptorSetAccelerationStructureNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkWriteDescriptorSetAccelerationStructureNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkWriteDescriptorSetAccelerationStructureNV` + public static VkWriteDescriptorSetAccelerationStructureNV alloc(SegmentAllocator allocator, long count) { return new VkWriteDescriptorSetAccelerationStructureNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkWriteDescriptorSetAccelerationStructureNV.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkWriteDescriptorSetAccelerationStructureNV.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkWriteDescriptorSetAccelerationStructureNV.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkWriteDescriptorSetAccelerationStructureNV.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureNV sTypeAt(long index, @CType("VkStructureType") int value) { VkWriteDescriptorSetAccelerationStructureNV.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureNV sType(@CType("VkStructureType") int value) { VkWriteDescriptorSetAccelerationStructureNV.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkWriteDescriptorSetAccelerationStructureNV.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkWriteDescriptorSetAccelerationStructureNV.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkWriteDescriptorSetAccelerationStructureNV.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureNV.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureNV pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureNV.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureNV pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureNV.set_pNext(this.segment(), value); return this; } + + /// {@return `accelerationStructureCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_accelerationStructureCount(MemorySegment segment, long index) { return (int) VH_accelerationStructureCount.get(segment, 0L, index); } + /// {@return `accelerationStructureCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_accelerationStructureCount(MemorySegment segment) { return VkWriteDescriptorSetAccelerationStructureNV.get_accelerationStructureCount(segment, 0L); } + /// {@return `accelerationStructureCount` at the given index} + /// @param index the index + public @CType("uint32_t") int accelerationStructureCountAt(long index) { return VkWriteDescriptorSetAccelerationStructureNV.get_accelerationStructureCount(this.segment(), index); } + /// {@return `accelerationStructureCount`} + public @CType("uint32_t") int accelerationStructureCount() { return VkWriteDescriptorSetAccelerationStructureNV.get_accelerationStructureCount(this.segment()); } + /// Sets `accelerationStructureCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_accelerationStructureCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_accelerationStructureCount.set(segment, 0L, index, value); } + /// Sets `accelerationStructureCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_accelerationStructureCount(MemorySegment segment, @CType("uint32_t") int value) { VkWriteDescriptorSetAccelerationStructureNV.set_accelerationStructureCount(segment, 0L, value); } + /// Sets `accelerationStructureCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureNV accelerationStructureCountAt(long index, @CType("uint32_t") int value) { VkWriteDescriptorSetAccelerationStructureNV.set_accelerationStructureCount(this.segment(), index, value); return this; } + /// Sets `accelerationStructureCount` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureNV accelerationStructureCount(@CType("uint32_t") int value) { VkWriteDescriptorSetAccelerationStructureNV.set_accelerationStructureCount(this.segment(), value); return this; } + + /// {@return `pAccelerationStructures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAccelerationStructureNV *") java.lang.foreign.MemorySegment get_pAccelerationStructures(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAccelerationStructures.get(segment, 0L, index); } + /// {@return `pAccelerationStructures`} + /// @param segment the segment of the struct + public static @CType("const VkAccelerationStructureNV *") java.lang.foreign.MemorySegment get_pAccelerationStructures(MemorySegment segment) { return VkWriteDescriptorSetAccelerationStructureNV.get_pAccelerationStructures(segment, 0L); } + /// {@return `pAccelerationStructures` at the given index} + /// @param index the index + public @CType("const VkAccelerationStructureNV *") java.lang.foreign.MemorySegment pAccelerationStructuresAt(long index) { return VkWriteDescriptorSetAccelerationStructureNV.get_pAccelerationStructures(this.segment(), index); } + /// {@return `pAccelerationStructures`} + public @CType("const VkAccelerationStructureNV *") java.lang.foreign.MemorySegment pAccelerationStructures() { return VkWriteDescriptorSetAccelerationStructureNV.get_pAccelerationStructures(this.segment()); } + /// Sets `pAccelerationStructures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAccelerationStructures(MemorySegment segment, long index, @CType("const VkAccelerationStructureNV *") java.lang.foreign.MemorySegment value) { VH_pAccelerationStructures.set(segment, 0L, index, value); } + /// Sets `pAccelerationStructures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAccelerationStructures(MemorySegment segment, @CType("const VkAccelerationStructureNV *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureNV.set_pAccelerationStructures(segment, 0L, value); } + /// Sets `pAccelerationStructures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureNV pAccelerationStructuresAt(long index, @CType("const VkAccelerationStructureNV *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureNV.set_pAccelerationStructures(this.segment(), index, value); return this; } + /// Sets `pAccelerationStructures` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetAccelerationStructureNV pAccelerationStructures(@CType("const VkAccelerationStructureNV *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetAccelerationStructureNV.set_pAccelerationStructures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/union/VkAccelerationStructureMotionInstanceDataNV.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/union/VkAccelerationStructureMotionInstanceDataNV.java new file mode 100644 index 00000000..5b6b080f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nv/union/VkAccelerationStructureMotionInstanceDataNV.java @@ -0,0 +1,191 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nv.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### staticInstance +/// [Byte offset][#OFFSET_staticInstance] - [Memory layout][#ML_staticInstance] - [Getter][#staticInstance()] - [Setter][#staticInstance(java.lang.foreign.MemorySegment)] +/// ### matrixMotionInstance +/// [Byte offset][#OFFSET_matrixMotionInstance] - [Memory layout][#ML_matrixMotionInstance] - [Getter][#matrixMotionInstance()] - [Setter][#matrixMotionInstance(java.lang.foreign.MemorySegment)] +/// ### srtMotionInstance +/// [Byte offset][#OFFSET_srtMotionInstance] - [Memory layout][#ML_srtMotionInstance] - [Getter][#srtMotionInstance()] - [Setter][#srtMotionInstance(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkAccelerationStructureMotionInstanceDataNV { +/// VkAccelerationStructureInstanceKHR staticInstance; +/// VkAccelerationStructureMatrixMotionInstanceNV matrixMotionInstance; +/// VkAccelerationStructureSRTMotionInstanceNV srtMotionInstance; +/// } VkAccelerationStructureMotionInstanceDataNV; +/// ``` +public final class VkAccelerationStructureMotionInstanceDataNV extends Union { + /// The union layout of `VkAccelerationStructureMotionInstanceDataNV`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + overrungl.vulkan.khr.struct.VkAccelerationStructureInstanceKHR.LAYOUT.withName("staticInstance"), + overrungl.vulkan.nv.struct.VkAccelerationStructureMatrixMotionInstanceNV.LAYOUT.withName("matrixMotionInstance"), + overrungl.vulkan.nv.struct.VkAccelerationStructureSRTMotionInstanceNV.LAYOUT.withName("srtMotionInstance") + ); + /// The byte offset of `staticInstance`. + public static final long OFFSET_staticInstance = LAYOUT.byteOffset(PathElement.groupElement("staticInstance")); + /// The memory layout of `staticInstance`. + public static final MemoryLayout ML_staticInstance = LAYOUT.select(PathElement.groupElement("staticInstance")); + /// The byte offset of `matrixMotionInstance`. + public static final long OFFSET_matrixMotionInstance = LAYOUT.byteOffset(PathElement.groupElement("matrixMotionInstance")); + /// The memory layout of `matrixMotionInstance`. + public static final MemoryLayout ML_matrixMotionInstance = LAYOUT.select(PathElement.groupElement("matrixMotionInstance")); + /// The byte offset of `srtMotionInstance`. + public static final long OFFSET_srtMotionInstance = LAYOUT.byteOffset(PathElement.groupElement("srtMotionInstance")); + /// The memory layout of `srtMotionInstance`. + public static final MemoryLayout ML_srtMotionInstance = LAYOUT.select(PathElement.groupElement("srtMotionInstance")); + + /// Creates `VkAccelerationStructureMotionInstanceDataNV` with the given segment. + /// @param segment the memory segment + public VkAccelerationStructureMotionInstanceDataNV(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAccelerationStructureMotionInstanceDataNV` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMotionInstanceDataNV of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMotionInstanceDataNV(segment); } + + /// Creates `VkAccelerationStructureMotionInstanceDataNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMotionInstanceDataNV ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMotionInstanceDataNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAccelerationStructureMotionInstanceDataNV` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAccelerationStructureMotionInstanceDataNV ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAccelerationStructureMotionInstanceDataNV(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAccelerationStructureMotionInstanceDataNV` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAccelerationStructureMotionInstanceDataNV` + public static VkAccelerationStructureMotionInstanceDataNV alloc(SegmentAllocator allocator) { return new VkAccelerationStructureMotionInstanceDataNV(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAccelerationStructureMotionInstanceDataNV` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAccelerationStructureMotionInstanceDataNV` + public static VkAccelerationStructureMotionInstanceDataNV alloc(SegmentAllocator allocator, long count) { return new VkAccelerationStructureMotionInstanceDataNV(allocator.allocate(LAYOUT, count)); } + + /// {@return `staticInstance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureInstanceKHR") java.lang.foreign.MemorySegment get_staticInstance(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_staticInstance, index), ML_staticInstance); } + /// {@return `staticInstance`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureInstanceKHR") java.lang.foreign.MemorySegment get_staticInstance(MemorySegment segment) { return VkAccelerationStructureMotionInstanceDataNV.get_staticInstance(segment, 0L); } + /// {@return `staticInstance` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureInstanceKHR") java.lang.foreign.MemorySegment staticInstanceAt(long index) { return VkAccelerationStructureMotionInstanceDataNV.get_staticInstance(this.segment(), index); } + /// {@return `staticInstance`} + public @CType("VkAccelerationStructureInstanceKHR") java.lang.foreign.MemorySegment staticInstance() { return VkAccelerationStructureMotionInstanceDataNV.get_staticInstance(this.segment()); } + /// Sets `staticInstance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_staticInstance(MemorySegment segment, long index, @CType("VkAccelerationStructureInstanceKHR") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_staticInstance, index), ML_staticInstance.byteSize()); } + /// Sets `staticInstance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_staticInstance(MemorySegment segment, @CType("VkAccelerationStructureInstanceKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceDataNV.set_staticInstance(segment, 0L, value); } + /// Sets `staticInstance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceDataNV staticInstanceAt(long index, @CType("VkAccelerationStructureInstanceKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceDataNV.set_staticInstance(this.segment(), index, value); return this; } + /// Sets `staticInstance` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceDataNV staticInstance(@CType("VkAccelerationStructureInstanceKHR") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceDataNV.set_staticInstance(this.segment(), value); return this; } + + /// {@return `matrixMotionInstance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureMatrixMotionInstanceNV") java.lang.foreign.MemorySegment get_matrixMotionInstance(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_matrixMotionInstance, index), ML_matrixMotionInstance); } + /// {@return `matrixMotionInstance`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureMatrixMotionInstanceNV") java.lang.foreign.MemorySegment get_matrixMotionInstance(MemorySegment segment) { return VkAccelerationStructureMotionInstanceDataNV.get_matrixMotionInstance(segment, 0L); } + /// {@return `matrixMotionInstance` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureMatrixMotionInstanceNV") java.lang.foreign.MemorySegment matrixMotionInstanceAt(long index) { return VkAccelerationStructureMotionInstanceDataNV.get_matrixMotionInstance(this.segment(), index); } + /// {@return `matrixMotionInstance`} + public @CType("VkAccelerationStructureMatrixMotionInstanceNV") java.lang.foreign.MemorySegment matrixMotionInstance() { return VkAccelerationStructureMotionInstanceDataNV.get_matrixMotionInstance(this.segment()); } + /// Sets `matrixMotionInstance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_matrixMotionInstance(MemorySegment segment, long index, @CType("VkAccelerationStructureMatrixMotionInstanceNV") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_matrixMotionInstance, index), ML_matrixMotionInstance.byteSize()); } + /// Sets `matrixMotionInstance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_matrixMotionInstance(MemorySegment segment, @CType("VkAccelerationStructureMatrixMotionInstanceNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceDataNV.set_matrixMotionInstance(segment, 0L, value); } + /// Sets `matrixMotionInstance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceDataNV matrixMotionInstanceAt(long index, @CType("VkAccelerationStructureMatrixMotionInstanceNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceDataNV.set_matrixMotionInstance(this.segment(), index, value); return this; } + /// Sets `matrixMotionInstance` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceDataNV matrixMotionInstance(@CType("VkAccelerationStructureMatrixMotionInstanceNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceDataNV.set_matrixMotionInstance(this.segment(), value); return this; } + + /// {@return `srtMotionInstance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccelerationStructureSRTMotionInstanceNV") java.lang.foreign.MemorySegment get_srtMotionInstance(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srtMotionInstance, index), ML_srtMotionInstance); } + /// {@return `srtMotionInstance`} + /// @param segment the segment of the struct + public static @CType("VkAccelerationStructureSRTMotionInstanceNV") java.lang.foreign.MemorySegment get_srtMotionInstance(MemorySegment segment) { return VkAccelerationStructureMotionInstanceDataNV.get_srtMotionInstance(segment, 0L); } + /// {@return `srtMotionInstance` at the given index} + /// @param index the index + public @CType("VkAccelerationStructureSRTMotionInstanceNV") java.lang.foreign.MemorySegment srtMotionInstanceAt(long index) { return VkAccelerationStructureMotionInstanceDataNV.get_srtMotionInstance(this.segment(), index); } + /// {@return `srtMotionInstance`} + public @CType("VkAccelerationStructureSRTMotionInstanceNV") java.lang.foreign.MemorySegment srtMotionInstance() { return VkAccelerationStructureMotionInstanceDataNV.get_srtMotionInstance(this.segment()); } + /// Sets `srtMotionInstance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srtMotionInstance(MemorySegment segment, long index, @CType("VkAccelerationStructureSRTMotionInstanceNV") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srtMotionInstance, index), ML_srtMotionInstance.byteSize()); } + /// Sets `srtMotionInstance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srtMotionInstance(MemorySegment segment, @CType("VkAccelerationStructureSRTMotionInstanceNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceDataNV.set_srtMotionInstance(segment, 0L, value); } + /// Sets `srtMotionInstance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceDataNV srtMotionInstanceAt(long index, @CType("VkAccelerationStructureSRTMotionInstanceNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceDataNV.set_srtMotionInstance(this.segment(), index, value); return this; } + /// Sets `srtMotionInstance` with the given value. + /// @param value the value + /// @return `this` + public VkAccelerationStructureMotionInstanceDataNV srtMotionInstance(@CType("VkAccelerationStructureSRTMotionInstanceNV") java.lang.foreign.MemorySegment value) { VkAccelerationStructureMotionInstanceDataNV.set_srtMotionInstance(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/VKNVXBinaryImport.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/VKNVXBinaryImport.java new file mode 100644 index 00000000..720fcf7f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/VKNVXBinaryImport.java @@ -0,0 +1,85 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVXBinaryImport { + public static final int VK_NVX_BINARY_IMPORT_SPEC_VERSION = 2; + public static final String VK_NVX_BINARY_IMPORT_EXTENSION_NAME = "VK_NVX_binary_import"; + public static final int VK_STRUCTURE_TYPE_CU_MODULE_CREATE_INFO_NVX = 1000029000; + public static final int VK_STRUCTURE_TYPE_CU_FUNCTION_CREATE_INFO_NVX = 1000029001; + public static final int VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX = 1000029002; + public static final int VK_STRUCTURE_TYPE_CU_MODULE_TEXTURING_MODE_CREATE_INFO_NVX = 1000029004; + public static final int VK_OBJECT_TYPE_CU_MODULE_NVX = 1000029000; + public static final int VK_OBJECT_TYPE_CU_FUNCTION_NVX = 1000029001; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT = 1000029000; + public static final int VK_DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT = 1000029001; + public static final MethodHandle MH_vkCreateCuModuleNVX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCreateCuFunctionNVX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyCuModuleNVX = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkDestroyCuFunctionNVX = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkCmdCuLaunchKernelNVX = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateCuModuleNVX; + public final MemorySegment PFN_vkCreateCuFunctionNVX; + public final MemorySegment PFN_vkDestroyCuModuleNVX; + public final MemorySegment PFN_vkDestroyCuFunctionNVX; + public final MemorySegment PFN_vkCmdCuLaunchKernelNVX; + + public VKNVXBinaryImport(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkCreateCuModuleNVX = func.invoke(device, "vkCreateCuModuleNVX"); + PFN_vkCreateCuFunctionNVX = func.invoke(device, "vkCreateCuFunctionNVX"); + PFN_vkDestroyCuModuleNVX = func.invoke(device, "vkDestroyCuModuleNVX"); + PFN_vkDestroyCuFunctionNVX = func.invoke(device, "vkDestroyCuFunctionNVX"); + PFN_vkCmdCuLaunchKernelNVX = func.invoke(device, "vkCmdCuLaunchKernelNVX"); + } + + public @CType("VkResult") int CreateCuModuleNVX(@CType("VkDevice") MemorySegment device, @CType("const VkCuModuleCreateInfoNVX *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkCuModuleNVX *") MemorySegment pModule) { + if (Unmarshal.isNullPointer(PFN_vkCreateCuModuleNVX)) throw new SymbolNotFoundError("Symbol not found: vkCreateCuModuleNVX"); + try { return (int) MH_vkCreateCuModuleNVX.invokeExact(PFN_vkCreateCuModuleNVX, device, pCreateInfo, pAllocator, pModule); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateCuModuleNVX", e); } + } + + public @CType("VkResult") int CreateCuFunctionNVX(@CType("VkDevice") MemorySegment device, @CType("const VkCuFunctionCreateInfoNVX *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkCuFunctionNVX *") MemorySegment pFunction) { + if (Unmarshal.isNullPointer(PFN_vkCreateCuFunctionNVX)) throw new SymbolNotFoundError("Symbol not found: vkCreateCuFunctionNVX"); + try { return (int) MH_vkCreateCuFunctionNVX.invokeExact(PFN_vkCreateCuFunctionNVX, device, pCreateInfo, pAllocator, pFunction); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateCuFunctionNVX", e); } + } + + public void DestroyCuModuleNVX(@CType("VkDevice") MemorySegment device, @CType("VkCuModuleNVX") MemorySegment module, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyCuModuleNVX)) throw new SymbolNotFoundError("Symbol not found: vkDestroyCuModuleNVX"); + try { MH_vkDestroyCuModuleNVX.invokeExact(PFN_vkDestroyCuModuleNVX, device, module, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyCuModuleNVX", e); } + } + + public void DestroyCuFunctionNVX(@CType("VkDevice") MemorySegment device, @CType("VkCuFunctionNVX") MemorySegment function, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator) { + if (Unmarshal.isNullPointer(PFN_vkDestroyCuFunctionNVX)) throw new SymbolNotFoundError("Symbol not found: vkDestroyCuFunctionNVX"); + try { MH_vkDestroyCuFunctionNVX.invokeExact(PFN_vkDestroyCuFunctionNVX, device, function, pAllocator); } + catch (Throwable e) { throw new RuntimeException("error in vkDestroyCuFunctionNVX", e); } + } + + public void CmdCuLaunchKernelNVX(@CType("VkCommandBuffer") MemorySegment commandBuffer, @CType("const VkCuLaunchInfoNVX *") MemorySegment pLaunchInfo) { + if (Unmarshal.isNullPointer(PFN_vkCmdCuLaunchKernelNVX)) throw new SymbolNotFoundError("Symbol not found: vkCmdCuLaunchKernelNVX"); + try { MH_vkCmdCuLaunchKernelNVX.invokeExact(PFN_vkCmdCuLaunchKernelNVX, commandBuffer, pLaunchInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkCmdCuLaunchKernelNVX", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/VKNVXImageViewHandle.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/VKNVXImageViewHandle.java new file mode 100644 index 00000000..9bb53998 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/VKNVXImageViewHandle.java @@ -0,0 +1,61 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVXImageViewHandle { + public static final int VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION = 3; + public static final String VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME = "VK_NVX_image_view_handle"; + public static final int VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000; + public static final int VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001; + public static final MethodHandle MH_vkGetImageViewHandleNVX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageViewHandle64NVX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetImageViewAddressNVX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetImageViewHandleNVX; + public final MemorySegment PFN_vkGetImageViewHandle64NVX; + public final MemorySegment PFN_vkGetImageViewAddressNVX; + + public VKNVXImageViewHandle(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetImageViewHandleNVX = func.invoke(device, "vkGetImageViewHandleNVX"); + PFN_vkGetImageViewHandle64NVX = func.invoke(device, "vkGetImageViewHandle64NVX"); + PFN_vkGetImageViewAddressNVX = func.invoke(device, "vkGetImageViewAddressNVX"); + } + + public @CType("uint32_t") int GetImageViewHandleNVX(@CType("VkDevice") MemorySegment device, @CType("const VkImageViewHandleInfoNVX *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetImageViewHandleNVX)) throw new SymbolNotFoundError("Symbol not found: vkGetImageViewHandleNVX"); + try { return (int) MH_vkGetImageViewHandleNVX.invokeExact(PFN_vkGetImageViewHandleNVX, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageViewHandleNVX", e); } + } + + public @CType("uint64_t") long GetImageViewHandle64NVX(@CType("VkDevice") MemorySegment device, @CType("const VkImageViewHandleInfoNVX *") MemorySegment pInfo) { + if (Unmarshal.isNullPointer(PFN_vkGetImageViewHandle64NVX)) throw new SymbolNotFoundError("Symbol not found: vkGetImageViewHandle64NVX"); + try { return (long) MH_vkGetImageViewHandle64NVX.invokeExact(PFN_vkGetImageViewHandle64NVX, device, pInfo); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageViewHandle64NVX", e); } + } + + public @CType("VkResult") int GetImageViewAddressNVX(@CType("VkDevice") MemorySegment device, @CType("VkImageView") MemorySegment imageView, @CType("VkImageViewAddressPropertiesNVX *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetImageViewAddressNVX)) throw new SymbolNotFoundError("Symbol not found: vkGetImageViewAddressNVX"); + try { return (int) MH_vkGetImageViewAddressNVX.invokeExact(PFN_vkGetImageViewAddressNVX, device, imageView, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetImageViewAddressNVX", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/VKNVXMultiviewPerViewAttributes.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/VKNVXMultiviewPerViewAttributes.java new file mode 100644 index 00000000..ab7a95a2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/VKNVXMultiviewPerViewAttributes.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKNVXMultiviewPerViewAttributes { + public static final int VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION = 1; + public static final String VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME = "VK_NVX_multiview_per_view_attributes"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000; + public static final int VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001; + public static final int VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002; + public static final int VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX = 1000097009; + + public VKNVXMultiviewPerViewAttributes(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuFunctionCreateInfoNVX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuFunctionCreateInfoNVX.java new file mode 100644 index 00000000..50eba35f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuFunctionCreateInfoNVX.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### module +/// [VarHandle][#VH_module] - [Getter][#module()] - [Setter][#module(java.lang.foreign.MemorySegment)] +/// ### pName +/// [VarHandle][#VH_pName] - [Getter][#pName()] - [Setter][#pName(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCuFunctionCreateInfoNVX { +/// VkStructureType sType; +/// const void * pNext; +/// VkCuModuleNVX module; +/// const char * pName; +/// } VkCuFunctionCreateInfoNVX; +/// ``` +public final class VkCuFunctionCreateInfoNVX extends Struct { + /// The struct layout of `VkCuFunctionCreateInfoNVX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("module"), + ValueLayout.ADDRESS.withName("pName") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `module` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_module = LAYOUT.arrayElementVarHandle(PathElement.groupElement("module")); + /// The [VarHandle] of `pName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pName")); + + /// Creates `VkCuFunctionCreateInfoNVX` with the given segment. + /// @param segment the memory segment + public VkCuFunctionCreateInfoNVX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCuFunctionCreateInfoNVX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuFunctionCreateInfoNVX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCuFunctionCreateInfoNVX(segment); } + + /// Creates `VkCuFunctionCreateInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuFunctionCreateInfoNVX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCuFunctionCreateInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCuFunctionCreateInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuFunctionCreateInfoNVX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCuFunctionCreateInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCuFunctionCreateInfoNVX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCuFunctionCreateInfoNVX` + public static VkCuFunctionCreateInfoNVX alloc(SegmentAllocator allocator) { return new VkCuFunctionCreateInfoNVX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCuFunctionCreateInfoNVX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCuFunctionCreateInfoNVX` + public static VkCuFunctionCreateInfoNVX alloc(SegmentAllocator allocator, long count) { return new VkCuFunctionCreateInfoNVX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCuFunctionCreateInfoNVX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCuFunctionCreateInfoNVX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCuFunctionCreateInfoNVX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCuFunctionCreateInfoNVX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuFunctionCreateInfoNVX sTypeAt(long index, @CType("VkStructureType") int value) { VkCuFunctionCreateInfoNVX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCuFunctionCreateInfoNVX sType(@CType("VkStructureType") int value) { VkCuFunctionCreateInfoNVX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCuFunctionCreateInfoNVX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCuFunctionCreateInfoNVX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCuFunctionCreateInfoNVX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCuFunctionCreateInfoNVX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuFunctionCreateInfoNVX pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCuFunctionCreateInfoNVX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCuFunctionCreateInfoNVX pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCuFunctionCreateInfoNVX.set_pNext(this.segment(), value); return this; } + + /// {@return `module` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCuModuleNVX") java.lang.foreign.MemorySegment get_module(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_module.get(segment, 0L, index); } + /// {@return `module`} + /// @param segment the segment of the struct + public static @CType("VkCuModuleNVX") java.lang.foreign.MemorySegment get_module(MemorySegment segment) { return VkCuFunctionCreateInfoNVX.get_module(segment, 0L); } + /// {@return `module` at the given index} + /// @param index the index + public @CType("VkCuModuleNVX") java.lang.foreign.MemorySegment moduleAt(long index) { return VkCuFunctionCreateInfoNVX.get_module(this.segment(), index); } + /// {@return `module`} + public @CType("VkCuModuleNVX") java.lang.foreign.MemorySegment module() { return VkCuFunctionCreateInfoNVX.get_module(this.segment()); } + /// Sets `module` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_module(MemorySegment segment, long index, @CType("VkCuModuleNVX") java.lang.foreign.MemorySegment value) { VH_module.set(segment, 0L, index, value); } + /// Sets `module` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_module(MemorySegment segment, @CType("VkCuModuleNVX") java.lang.foreign.MemorySegment value) { VkCuFunctionCreateInfoNVX.set_module(segment, 0L, value); } + /// Sets `module` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuFunctionCreateInfoNVX moduleAt(long index, @CType("VkCuModuleNVX") java.lang.foreign.MemorySegment value) { VkCuFunctionCreateInfoNVX.set_module(this.segment(), index, value); return this; } + /// Sets `module` with the given value. + /// @param value the value + /// @return `this` + public VkCuFunctionCreateInfoNVX module(@CType("VkCuModuleNVX") java.lang.foreign.MemorySegment value) { VkCuFunctionCreateInfoNVX.set_module(this.segment(), value); return this; } + + /// {@return `pName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pName.get(segment, 0L, index); } + /// {@return `pName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pName(MemorySegment segment) { return VkCuFunctionCreateInfoNVX.get_pName(segment, 0L); } + /// {@return `pName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pNameAt(long index) { return VkCuFunctionCreateInfoNVX.get_pName(this.segment(), index); } + /// {@return `pName`} + public @CType("const char *") java.lang.foreign.MemorySegment pName() { return VkCuFunctionCreateInfoNVX.get_pName(this.segment()); } + /// Sets `pName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pName.set(segment, 0L, index, value); } + /// Sets `pName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkCuFunctionCreateInfoNVX.set_pName(segment, 0L, value); } + /// Sets `pName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuFunctionCreateInfoNVX pNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkCuFunctionCreateInfoNVX.set_pName(this.segment(), index, value); return this; } + /// Sets `pName` with the given value. + /// @param value the value + /// @return `this` + public VkCuFunctionCreateInfoNVX pName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkCuFunctionCreateInfoNVX.set_pName(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuLaunchInfoNVX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuLaunchInfoNVX.java new file mode 100644 index 00000000..a443f8be --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuLaunchInfoNVX.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### function +/// [VarHandle][#VH_function] - [Getter][#function()] - [Setter][#function(java.lang.foreign.MemorySegment)] +/// ### gridDimX +/// [VarHandle][#VH_gridDimX] - [Getter][#gridDimX()] - [Setter][#gridDimX(int)] +/// ### gridDimY +/// [VarHandle][#VH_gridDimY] - [Getter][#gridDimY()] - [Setter][#gridDimY(int)] +/// ### gridDimZ +/// [VarHandle][#VH_gridDimZ] - [Getter][#gridDimZ()] - [Setter][#gridDimZ(int)] +/// ### blockDimX +/// [VarHandle][#VH_blockDimX] - [Getter][#blockDimX()] - [Setter][#blockDimX(int)] +/// ### blockDimY +/// [VarHandle][#VH_blockDimY] - [Getter][#blockDimY()] - [Setter][#blockDimY(int)] +/// ### blockDimZ +/// [VarHandle][#VH_blockDimZ] - [Getter][#blockDimZ()] - [Setter][#blockDimZ(int)] +/// ### sharedMemBytes +/// [VarHandle][#VH_sharedMemBytes] - [Getter][#sharedMemBytes()] - [Setter][#sharedMemBytes(int)] +/// ### paramCount +/// [VarHandle][#VH_paramCount] - [Getter][#paramCount()] - [Setter][#paramCount(long)] +/// ### pParams +/// [VarHandle][#VH_pParams] - [Getter][#pParams()] - [Setter][#pParams(java.lang.foreign.MemorySegment)] +/// ### extraCount +/// [VarHandle][#VH_extraCount] - [Getter][#extraCount()] - [Setter][#extraCount(long)] +/// ### pExtras +/// [VarHandle][#VH_pExtras] - [Getter][#pExtras()] - [Setter][#pExtras(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCuLaunchInfoNVX { +/// VkStructureType sType; +/// const void * pNext; +/// VkCuFunctionNVX function; +/// uint32_t gridDimX; +/// uint32_t gridDimY; +/// uint32_t gridDimZ; +/// uint32_t blockDimX; +/// uint32_t blockDimY; +/// uint32_t blockDimZ; +/// uint32_t sharedMemBytes; +/// size_t paramCount; +/// const void * const * pParams; +/// size_t extraCount; +/// const void * const * pExtras; +/// } VkCuLaunchInfoNVX; +/// ``` +public final class VkCuLaunchInfoNVX extends Struct { + /// The struct layout of `VkCuLaunchInfoNVX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("function"), + ValueLayout.JAVA_INT.withName("gridDimX"), + ValueLayout.JAVA_INT.withName("gridDimY"), + ValueLayout.JAVA_INT.withName("gridDimZ"), + ValueLayout.JAVA_INT.withName("blockDimX"), + ValueLayout.JAVA_INT.withName("blockDimY"), + ValueLayout.JAVA_INT.withName("blockDimZ"), + ValueLayout.JAVA_INT.withName("sharedMemBytes"), + ValueLayout.JAVA_LONG.withName("paramCount"), + ValueLayout.ADDRESS.withName("pParams"), + ValueLayout.JAVA_LONG.withName("extraCount"), + ValueLayout.ADDRESS.withName("pExtras") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `function` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_function = LAYOUT.arrayElementVarHandle(PathElement.groupElement("function")); + /// The [VarHandle] of `gridDimX` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gridDimX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gridDimX")); + /// The [VarHandle] of `gridDimY` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gridDimY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gridDimY")); + /// The [VarHandle] of `gridDimZ` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gridDimZ = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gridDimZ")); + /// The [VarHandle] of `blockDimX` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blockDimX = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blockDimX")); + /// The [VarHandle] of `blockDimY` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blockDimY = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blockDimY")); + /// The [VarHandle] of `blockDimZ` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blockDimZ = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blockDimZ")); + /// The [VarHandle] of `sharedMemBytes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sharedMemBytes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sharedMemBytes")); + /// The [VarHandle] of `paramCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_paramCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("paramCount")); + /// The [VarHandle] of `pParams` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pParams = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pParams")); + /// The [VarHandle] of `extraCount` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_extraCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extraCount")); + /// The [VarHandle] of `pExtras` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pExtras = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pExtras")); + + /// Creates `VkCuLaunchInfoNVX` with the given segment. + /// @param segment the memory segment + public VkCuLaunchInfoNVX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCuLaunchInfoNVX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuLaunchInfoNVX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCuLaunchInfoNVX(segment); } + + /// Creates `VkCuLaunchInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuLaunchInfoNVX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCuLaunchInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCuLaunchInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuLaunchInfoNVX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCuLaunchInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCuLaunchInfoNVX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCuLaunchInfoNVX` + public static VkCuLaunchInfoNVX alloc(SegmentAllocator allocator) { return new VkCuLaunchInfoNVX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCuLaunchInfoNVX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCuLaunchInfoNVX` + public static VkCuLaunchInfoNVX alloc(SegmentAllocator allocator, long count) { return new VkCuLaunchInfoNVX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCuLaunchInfoNVX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCuLaunchInfoNVX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCuLaunchInfoNVX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCuLaunchInfoNVX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX sTypeAt(long index, @CType("VkStructureType") int value) { VkCuLaunchInfoNVX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX sType(@CType("VkStructureType") int value) { VkCuLaunchInfoNVX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCuLaunchInfoNVX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCuLaunchInfoNVX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCuLaunchInfoNVX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_pNext(this.segment(), value); return this; } + + /// {@return `function` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCuFunctionNVX") java.lang.foreign.MemorySegment get_function(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_function.get(segment, 0L, index); } + /// {@return `function`} + /// @param segment the segment of the struct + public static @CType("VkCuFunctionNVX") java.lang.foreign.MemorySegment get_function(MemorySegment segment) { return VkCuLaunchInfoNVX.get_function(segment, 0L); } + /// {@return `function` at the given index} + /// @param index the index + public @CType("VkCuFunctionNVX") java.lang.foreign.MemorySegment functionAt(long index) { return VkCuLaunchInfoNVX.get_function(this.segment(), index); } + /// {@return `function`} + public @CType("VkCuFunctionNVX") java.lang.foreign.MemorySegment function() { return VkCuLaunchInfoNVX.get_function(this.segment()); } + /// Sets `function` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_function(MemorySegment segment, long index, @CType("VkCuFunctionNVX") java.lang.foreign.MemorySegment value) { VH_function.set(segment, 0L, index, value); } + /// Sets `function` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_function(MemorySegment segment, @CType("VkCuFunctionNVX") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_function(segment, 0L, value); } + /// Sets `function` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX functionAt(long index, @CType("VkCuFunctionNVX") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_function(this.segment(), index, value); return this; } + /// Sets `function` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX function(@CType("VkCuFunctionNVX") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_function(this.segment(), value); return this; } + + /// {@return `gridDimX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gridDimX(MemorySegment segment, long index) { return (int) VH_gridDimX.get(segment, 0L, index); } + /// {@return `gridDimX`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gridDimX(MemorySegment segment) { return VkCuLaunchInfoNVX.get_gridDimX(segment, 0L); } + /// {@return `gridDimX` at the given index} + /// @param index the index + public @CType("uint32_t") int gridDimXAt(long index) { return VkCuLaunchInfoNVX.get_gridDimX(this.segment(), index); } + /// {@return `gridDimX`} + public @CType("uint32_t") int gridDimX() { return VkCuLaunchInfoNVX.get_gridDimX(this.segment()); } + /// Sets `gridDimX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gridDimX(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gridDimX.set(segment, 0L, index, value); } + /// Sets `gridDimX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gridDimX(MemorySegment segment, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_gridDimX(segment, 0L, value); } + /// Sets `gridDimX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX gridDimXAt(long index, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_gridDimX(this.segment(), index, value); return this; } + /// Sets `gridDimX` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX gridDimX(@CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_gridDimX(this.segment(), value); return this; } + + /// {@return `gridDimY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gridDimY(MemorySegment segment, long index) { return (int) VH_gridDimY.get(segment, 0L, index); } + /// {@return `gridDimY`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gridDimY(MemorySegment segment) { return VkCuLaunchInfoNVX.get_gridDimY(segment, 0L); } + /// {@return `gridDimY` at the given index} + /// @param index the index + public @CType("uint32_t") int gridDimYAt(long index) { return VkCuLaunchInfoNVX.get_gridDimY(this.segment(), index); } + /// {@return `gridDimY`} + public @CType("uint32_t") int gridDimY() { return VkCuLaunchInfoNVX.get_gridDimY(this.segment()); } + /// Sets `gridDimY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gridDimY(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gridDimY.set(segment, 0L, index, value); } + /// Sets `gridDimY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gridDimY(MemorySegment segment, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_gridDimY(segment, 0L, value); } + /// Sets `gridDimY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX gridDimYAt(long index, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_gridDimY(this.segment(), index, value); return this; } + /// Sets `gridDimY` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX gridDimY(@CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_gridDimY(this.segment(), value); return this; } + + /// {@return `gridDimZ` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_gridDimZ(MemorySegment segment, long index) { return (int) VH_gridDimZ.get(segment, 0L, index); } + /// {@return `gridDimZ`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_gridDimZ(MemorySegment segment) { return VkCuLaunchInfoNVX.get_gridDimZ(segment, 0L); } + /// {@return `gridDimZ` at the given index} + /// @param index the index + public @CType("uint32_t") int gridDimZAt(long index) { return VkCuLaunchInfoNVX.get_gridDimZ(this.segment(), index); } + /// {@return `gridDimZ`} + public @CType("uint32_t") int gridDimZ() { return VkCuLaunchInfoNVX.get_gridDimZ(this.segment()); } + /// Sets `gridDimZ` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gridDimZ(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_gridDimZ.set(segment, 0L, index, value); } + /// Sets `gridDimZ` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gridDimZ(MemorySegment segment, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_gridDimZ(segment, 0L, value); } + /// Sets `gridDimZ` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX gridDimZAt(long index, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_gridDimZ(this.segment(), index, value); return this; } + /// Sets `gridDimZ` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX gridDimZ(@CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_gridDimZ(this.segment(), value); return this; } + + /// {@return `blockDimX` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_blockDimX(MemorySegment segment, long index) { return (int) VH_blockDimX.get(segment, 0L, index); } + /// {@return `blockDimX`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_blockDimX(MemorySegment segment) { return VkCuLaunchInfoNVX.get_blockDimX(segment, 0L); } + /// {@return `blockDimX` at the given index} + /// @param index the index + public @CType("uint32_t") int blockDimXAt(long index) { return VkCuLaunchInfoNVX.get_blockDimX(this.segment(), index); } + /// {@return `blockDimX`} + public @CType("uint32_t") int blockDimX() { return VkCuLaunchInfoNVX.get_blockDimX(this.segment()); } + /// Sets `blockDimX` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blockDimX(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_blockDimX.set(segment, 0L, index, value); } + /// Sets `blockDimX` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blockDimX(MemorySegment segment, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_blockDimX(segment, 0L, value); } + /// Sets `blockDimX` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX blockDimXAt(long index, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_blockDimX(this.segment(), index, value); return this; } + /// Sets `blockDimX` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX blockDimX(@CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_blockDimX(this.segment(), value); return this; } + + /// {@return `blockDimY` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_blockDimY(MemorySegment segment, long index) { return (int) VH_blockDimY.get(segment, 0L, index); } + /// {@return `blockDimY`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_blockDimY(MemorySegment segment) { return VkCuLaunchInfoNVX.get_blockDimY(segment, 0L); } + /// {@return `blockDimY` at the given index} + /// @param index the index + public @CType("uint32_t") int blockDimYAt(long index) { return VkCuLaunchInfoNVX.get_blockDimY(this.segment(), index); } + /// {@return `blockDimY`} + public @CType("uint32_t") int blockDimY() { return VkCuLaunchInfoNVX.get_blockDimY(this.segment()); } + /// Sets `blockDimY` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blockDimY(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_blockDimY.set(segment, 0L, index, value); } + /// Sets `blockDimY` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blockDimY(MemorySegment segment, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_blockDimY(segment, 0L, value); } + /// Sets `blockDimY` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX blockDimYAt(long index, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_blockDimY(this.segment(), index, value); return this; } + /// Sets `blockDimY` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX blockDimY(@CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_blockDimY(this.segment(), value); return this; } + + /// {@return `blockDimZ` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_blockDimZ(MemorySegment segment, long index) { return (int) VH_blockDimZ.get(segment, 0L, index); } + /// {@return `blockDimZ`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_blockDimZ(MemorySegment segment) { return VkCuLaunchInfoNVX.get_blockDimZ(segment, 0L); } + /// {@return `blockDimZ` at the given index} + /// @param index the index + public @CType("uint32_t") int blockDimZAt(long index) { return VkCuLaunchInfoNVX.get_blockDimZ(this.segment(), index); } + /// {@return `blockDimZ`} + public @CType("uint32_t") int blockDimZ() { return VkCuLaunchInfoNVX.get_blockDimZ(this.segment()); } + /// Sets `blockDimZ` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blockDimZ(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_blockDimZ.set(segment, 0L, index, value); } + /// Sets `blockDimZ` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blockDimZ(MemorySegment segment, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_blockDimZ(segment, 0L, value); } + /// Sets `blockDimZ` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX blockDimZAt(long index, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_blockDimZ(this.segment(), index, value); return this; } + /// Sets `blockDimZ` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX blockDimZ(@CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_blockDimZ(this.segment(), value); return this; } + + /// {@return `sharedMemBytes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_sharedMemBytes(MemorySegment segment, long index) { return (int) VH_sharedMemBytes.get(segment, 0L, index); } + /// {@return `sharedMemBytes`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_sharedMemBytes(MemorySegment segment) { return VkCuLaunchInfoNVX.get_sharedMemBytes(segment, 0L); } + /// {@return `sharedMemBytes` at the given index} + /// @param index the index + public @CType("uint32_t") int sharedMemBytesAt(long index) { return VkCuLaunchInfoNVX.get_sharedMemBytes(this.segment(), index); } + /// {@return `sharedMemBytes`} + public @CType("uint32_t") int sharedMemBytes() { return VkCuLaunchInfoNVX.get_sharedMemBytes(this.segment()); } + /// Sets `sharedMemBytes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sharedMemBytes(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_sharedMemBytes.set(segment, 0L, index, value); } + /// Sets `sharedMemBytes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sharedMemBytes(MemorySegment segment, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_sharedMemBytes(segment, 0L, value); } + /// Sets `sharedMemBytes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX sharedMemBytesAt(long index, @CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_sharedMemBytes(this.segment(), index, value); return this; } + /// Sets `sharedMemBytes` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX sharedMemBytes(@CType("uint32_t") int value) { VkCuLaunchInfoNVX.set_sharedMemBytes(this.segment(), value); return this; } + + /// {@return `paramCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_paramCount(MemorySegment segment, long index) { return (long) VH_paramCount.get(segment, 0L, index); } + /// {@return `paramCount`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_paramCount(MemorySegment segment) { return VkCuLaunchInfoNVX.get_paramCount(segment, 0L); } + /// {@return `paramCount` at the given index} + /// @param index the index + public @CType("size_t") long paramCountAt(long index) { return VkCuLaunchInfoNVX.get_paramCount(this.segment(), index); } + /// {@return `paramCount`} + public @CType("size_t") long paramCount() { return VkCuLaunchInfoNVX.get_paramCount(this.segment()); } + /// Sets `paramCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_paramCount(MemorySegment segment, long index, @CType("size_t") long value) { VH_paramCount.set(segment, 0L, index, value); } + /// Sets `paramCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_paramCount(MemorySegment segment, @CType("size_t") long value) { VkCuLaunchInfoNVX.set_paramCount(segment, 0L, value); } + /// Sets `paramCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX paramCountAt(long index, @CType("size_t") long value) { VkCuLaunchInfoNVX.set_paramCount(this.segment(), index, value); return this; } + /// Sets `paramCount` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX paramCount(@CType("size_t") long value) { VkCuLaunchInfoNVX.set_paramCount(this.segment(), value); return this; } + + /// {@return `pParams` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void * const *") java.lang.foreign.MemorySegment get_pParams(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pParams.get(segment, 0L, index); } + /// {@return `pParams`} + /// @param segment the segment of the struct + public static @CType("const void * const *") java.lang.foreign.MemorySegment get_pParams(MemorySegment segment) { return VkCuLaunchInfoNVX.get_pParams(segment, 0L); } + /// {@return `pParams` at the given index} + /// @param index the index + public @CType("const void * const *") java.lang.foreign.MemorySegment pParamsAt(long index) { return VkCuLaunchInfoNVX.get_pParams(this.segment(), index); } + /// {@return `pParams`} + public @CType("const void * const *") java.lang.foreign.MemorySegment pParams() { return VkCuLaunchInfoNVX.get_pParams(this.segment()); } + /// Sets `pParams` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pParams(MemorySegment segment, long index, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VH_pParams.set(segment, 0L, index, value); } + /// Sets `pParams` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pParams(MemorySegment segment, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_pParams(segment, 0L, value); } + /// Sets `pParams` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX pParamsAt(long index, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_pParams(this.segment(), index, value); return this; } + /// Sets `pParams` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX pParams(@CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_pParams(this.segment(), value); return this; } + + /// {@return `extraCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_extraCount(MemorySegment segment, long index) { return (long) VH_extraCount.get(segment, 0L, index); } + /// {@return `extraCount`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_extraCount(MemorySegment segment) { return VkCuLaunchInfoNVX.get_extraCount(segment, 0L); } + /// {@return `extraCount` at the given index} + /// @param index the index + public @CType("size_t") long extraCountAt(long index) { return VkCuLaunchInfoNVX.get_extraCount(this.segment(), index); } + /// {@return `extraCount`} + public @CType("size_t") long extraCount() { return VkCuLaunchInfoNVX.get_extraCount(this.segment()); } + /// Sets `extraCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extraCount(MemorySegment segment, long index, @CType("size_t") long value) { VH_extraCount.set(segment, 0L, index, value); } + /// Sets `extraCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extraCount(MemorySegment segment, @CType("size_t") long value) { VkCuLaunchInfoNVX.set_extraCount(segment, 0L, value); } + /// Sets `extraCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX extraCountAt(long index, @CType("size_t") long value) { VkCuLaunchInfoNVX.set_extraCount(this.segment(), index, value); return this; } + /// Sets `extraCount` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX extraCount(@CType("size_t") long value) { VkCuLaunchInfoNVX.set_extraCount(this.segment(), value); return this; } + + /// {@return `pExtras` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void * const *") java.lang.foreign.MemorySegment get_pExtras(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pExtras.get(segment, 0L, index); } + /// {@return `pExtras`} + /// @param segment the segment of the struct + public static @CType("const void * const *") java.lang.foreign.MemorySegment get_pExtras(MemorySegment segment) { return VkCuLaunchInfoNVX.get_pExtras(segment, 0L); } + /// {@return `pExtras` at the given index} + /// @param index the index + public @CType("const void * const *") java.lang.foreign.MemorySegment pExtrasAt(long index) { return VkCuLaunchInfoNVX.get_pExtras(this.segment(), index); } + /// {@return `pExtras`} + public @CType("const void * const *") java.lang.foreign.MemorySegment pExtras() { return VkCuLaunchInfoNVX.get_pExtras(this.segment()); } + /// Sets `pExtras` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pExtras(MemorySegment segment, long index, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VH_pExtras.set(segment, 0L, index, value); } + /// Sets `pExtras` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pExtras(MemorySegment segment, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_pExtras(segment, 0L, value); } + /// Sets `pExtras` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX pExtrasAt(long index, @CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_pExtras(this.segment(), index, value); return this; } + /// Sets `pExtras` with the given value. + /// @param value the value + /// @return `this` + public VkCuLaunchInfoNVX pExtras(@CType("const void * const *") java.lang.foreign.MemorySegment value) { VkCuLaunchInfoNVX.set_pExtras(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuModuleCreateInfoNVX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuModuleCreateInfoNVX.java new file mode 100644 index 00000000..205d2920 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuModuleCreateInfoNVX.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dataSize +/// [VarHandle][#VH_dataSize] - [Getter][#dataSize()] - [Setter][#dataSize(long)] +/// ### pData +/// [VarHandle][#VH_pData] - [Getter][#pData()] - [Setter][#pData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCuModuleCreateInfoNVX { +/// VkStructureType sType; +/// const void * pNext; +/// size_t dataSize; +/// const void * pData; +/// } VkCuModuleCreateInfoNVX; +/// ``` +public final class VkCuModuleCreateInfoNVX extends Struct { + /// The struct layout of `VkCuModuleCreateInfoNVX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("dataSize"), + ValueLayout.ADDRESS.withName("pData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dataSize")); + /// The [VarHandle] of `pData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pData")); + + /// Creates `VkCuModuleCreateInfoNVX` with the given segment. + /// @param segment the memory segment + public VkCuModuleCreateInfoNVX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCuModuleCreateInfoNVX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuModuleCreateInfoNVX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCuModuleCreateInfoNVX(segment); } + + /// Creates `VkCuModuleCreateInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuModuleCreateInfoNVX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCuModuleCreateInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCuModuleCreateInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuModuleCreateInfoNVX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCuModuleCreateInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCuModuleCreateInfoNVX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCuModuleCreateInfoNVX` + public static VkCuModuleCreateInfoNVX alloc(SegmentAllocator allocator) { return new VkCuModuleCreateInfoNVX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCuModuleCreateInfoNVX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCuModuleCreateInfoNVX` + public static VkCuModuleCreateInfoNVX alloc(SegmentAllocator allocator, long count) { return new VkCuModuleCreateInfoNVX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCuModuleCreateInfoNVX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCuModuleCreateInfoNVX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCuModuleCreateInfoNVX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCuModuleCreateInfoNVX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuModuleCreateInfoNVX sTypeAt(long index, @CType("VkStructureType") int value) { VkCuModuleCreateInfoNVX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCuModuleCreateInfoNVX sType(@CType("VkStructureType") int value) { VkCuModuleCreateInfoNVX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCuModuleCreateInfoNVX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCuModuleCreateInfoNVX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCuModuleCreateInfoNVX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCuModuleCreateInfoNVX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuModuleCreateInfoNVX pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCuModuleCreateInfoNVX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCuModuleCreateInfoNVX pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCuModuleCreateInfoNVX.set_pNext(this.segment(), value); return this; } + + /// {@return `dataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_dataSize(MemorySegment segment, long index) { return (long) VH_dataSize.get(segment, 0L, index); } + /// {@return `dataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_dataSize(MemorySegment segment) { return VkCuModuleCreateInfoNVX.get_dataSize(segment, 0L); } + /// {@return `dataSize` at the given index} + /// @param index the index + public @CType("size_t") long dataSizeAt(long index) { return VkCuModuleCreateInfoNVX.get_dataSize(this.segment(), index); } + /// {@return `dataSize`} + public @CType("size_t") long dataSize() { return VkCuModuleCreateInfoNVX.get_dataSize(this.segment()); } + /// Sets `dataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_dataSize.set(segment, 0L, index, value); } + /// Sets `dataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dataSize(MemorySegment segment, @CType("size_t") long value) { VkCuModuleCreateInfoNVX.set_dataSize(segment, 0L, value); } + /// Sets `dataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuModuleCreateInfoNVX dataSizeAt(long index, @CType("size_t") long value) { VkCuModuleCreateInfoNVX.set_dataSize(this.segment(), index, value); return this; } + /// Sets `dataSize` with the given value. + /// @param value the value + /// @return `this` + public VkCuModuleCreateInfoNVX dataSize(@CType("size_t") long value) { VkCuModuleCreateInfoNVX.set_dataSize(this.segment(), value); return this; } + + /// {@return `pData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pData.get(segment, 0L, index); } + /// {@return `pData`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment) { return VkCuModuleCreateInfoNVX.get_pData(segment, 0L); } + /// {@return `pData` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pDataAt(long index) { return VkCuModuleCreateInfoNVX.get_pData(this.segment(), index); } + /// {@return `pData`} + public @CType("const void *") java.lang.foreign.MemorySegment pData() { return VkCuModuleCreateInfoNVX.get_pData(this.segment()); } + /// Sets `pData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pData(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pData.set(segment, 0L, index, value); } + /// Sets `pData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pData(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCuModuleCreateInfoNVX.set_pData(segment, 0L, value); } + /// Sets `pData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuModuleCreateInfoNVX pDataAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCuModuleCreateInfoNVX.set_pData(this.segment(), index, value); return this; } + /// Sets `pData` with the given value. + /// @param value the value + /// @return `this` + public VkCuModuleCreateInfoNVX pData(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCuModuleCreateInfoNVX.set_pData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuModuleTexturingModeCreateInfoNVX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuModuleTexturingModeCreateInfoNVX.java new file mode 100644 index 00000000..ec71f6c7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkCuModuleTexturingModeCreateInfoNVX.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### use64bitTexturing +/// [VarHandle][#VH_use64bitTexturing] - [Getter][#use64bitTexturing()] - [Setter][#use64bitTexturing(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCuModuleTexturingModeCreateInfoNVX { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 use64bitTexturing; +/// } VkCuModuleTexturingModeCreateInfoNVX; +/// ``` +public final class VkCuModuleTexturingModeCreateInfoNVX extends Struct { + /// The struct layout of `VkCuModuleTexturingModeCreateInfoNVX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("use64bitTexturing") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `use64bitTexturing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_use64bitTexturing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("use64bitTexturing")); + + /// Creates `VkCuModuleTexturingModeCreateInfoNVX` with the given segment. + /// @param segment the memory segment + public VkCuModuleTexturingModeCreateInfoNVX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCuModuleTexturingModeCreateInfoNVX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuModuleTexturingModeCreateInfoNVX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCuModuleTexturingModeCreateInfoNVX(segment); } + + /// Creates `VkCuModuleTexturingModeCreateInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuModuleTexturingModeCreateInfoNVX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCuModuleTexturingModeCreateInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCuModuleTexturingModeCreateInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCuModuleTexturingModeCreateInfoNVX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCuModuleTexturingModeCreateInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCuModuleTexturingModeCreateInfoNVX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCuModuleTexturingModeCreateInfoNVX` + public static VkCuModuleTexturingModeCreateInfoNVX alloc(SegmentAllocator allocator) { return new VkCuModuleTexturingModeCreateInfoNVX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCuModuleTexturingModeCreateInfoNVX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCuModuleTexturingModeCreateInfoNVX` + public static VkCuModuleTexturingModeCreateInfoNVX alloc(SegmentAllocator allocator, long count) { return new VkCuModuleTexturingModeCreateInfoNVX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCuModuleTexturingModeCreateInfoNVX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCuModuleTexturingModeCreateInfoNVX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCuModuleTexturingModeCreateInfoNVX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCuModuleTexturingModeCreateInfoNVX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuModuleTexturingModeCreateInfoNVX sTypeAt(long index, @CType("VkStructureType") int value) { VkCuModuleTexturingModeCreateInfoNVX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCuModuleTexturingModeCreateInfoNVX sType(@CType("VkStructureType") int value) { VkCuModuleTexturingModeCreateInfoNVX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCuModuleTexturingModeCreateInfoNVX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCuModuleTexturingModeCreateInfoNVX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCuModuleTexturingModeCreateInfoNVX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCuModuleTexturingModeCreateInfoNVX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuModuleTexturingModeCreateInfoNVX pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCuModuleTexturingModeCreateInfoNVX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCuModuleTexturingModeCreateInfoNVX pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCuModuleTexturingModeCreateInfoNVX.set_pNext(this.segment(), value); return this; } + + /// {@return `use64bitTexturing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_use64bitTexturing(MemorySegment segment, long index) { return (int) VH_use64bitTexturing.get(segment, 0L, index); } + /// {@return `use64bitTexturing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_use64bitTexturing(MemorySegment segment) { return VkCuModuleTexturingModeCreateInfoNVX.get_use64bitTexturing(segment, 0L); } + /// {@return `use64bitTexturing` at the given index} + /// @param index the index + public @CType("VkBool32") int use64bitTexturingAt(long index) { return VkCuModuleTexturingModeCreateInfoNVX.get_use64bitTexturing(this.segment(), index); } + /// {@return `use64bitTexturing`} + public @CType("VkBool32") int use64bitTexturing() { return VkCuModuleTexturingModeCreateInfoNVX.get_use64bitTexturing(this.segment()); } + /// Sets `use64bitTexturing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_use64bitTexturing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_use64bitTexturing.set(segment, 0L, index, value); } + /// Sets `use64bitTexturing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_use64bitTexturing(MemorySegment segment, @CType("VkBool32") int value) { VkCuModuleTexturingModeCreateInfoNVX.set_use64bitTexturing(segment, 0L, value); } + /// Sets `use64bitTexturing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCuModuleTexturingModeCreateInfoNVX use64bitTexturingAt(long index, @CType("VkBool32") int value) { VkCuModuleTexturingModeCreateInfoNVX.set_use64bitTexturing(this.segment(), index, value); return this; } + /// Sets `use64bitTexturing` with the given value. + /// @param value the value + /// @return `this` + public VkCuModuleTexturingModeCreateInfoNVX use64bitTexturing(@CType("VkBool32") int value) { VkCuModuleTexturingModeCreateInfoNVX.set_use64bitTexturing(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkImageViewAddressPropertiesNVX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkImageViewAddressPropertiesNVX.java new file mode 100644 index 00000000..8f501c19 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkImageViewAddressPropertiesNVX.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceAddress +/// [VarHandle][#VH_deviceAddress] - [Getter][#deviceAddress()] - [Setter][#deviceAddress(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageViewAddressPropertiesNVX { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceAddress deviceAddress; +/// VkDeviceSize size; +/// } VkImageViewAddressPropertiesNVX; +/// ``` +public final class VkImageViewAddressPropertiesNVX extends Struct { + /// The struct layout of `VkImageViewAddressPropertiesNVX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("deviceAddress"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_deviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceAddress")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkImageViewAddressPropertiesNVX` with the given segment. + /// @param segment the memory segment + public VkImageViewAddressPropertiesNVX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageViewAddressPropertiesNVX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewAddressPropertiesNVX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewAddressPropertiesNVX(segment); } + + /// Creates `VkImageViewAddressPropertiesNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewAddressPropertiesNVX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewAddressPropertiesNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageViewAddressPropertiesNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewAddressPropertiesNVX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewAddressPropertiesNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageViewAddressPropertiesNVX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageViewAddressPropertiesNVX` + public static VkImageViewAddressPropertiesNVX alloc(SegmentAllocator allocator) { return new VkImageViewAddressPropertiesNVX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageViewAddressPropertiesNVX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageViewAddressPropertiesNVX` + public static VkImageViewAddressPropertiesNVX alloc(SegmentAllocator allocator, long count) { return new VkImageViewAddressPropertiesNVX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageViewAddressPropertiesNVX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageViewAddressPropertiesNVX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageViewAddressPropertiesNVX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageViewAddressPropertiesNVX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewAddressPropertiesNVX sTypeAt(long index, @CType("VkStructureType") int value) { VkImageViewAddressPropertiesNVX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewAddressPropertiesNVX sType(@CType("VkStructureType") int value) { VkImageViewAddressPropertiesNVX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageViewAddressPropertiesNVX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageViewAddressPropertiesNVX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkImageViewAddressPropertiesNVX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageViewAddressPropertiesNVX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewAddressPropertiesNVX pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageViewAddressPropertiesNVX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewAddressPropertiesNVX pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkImageViewAddressPropertiesNVX.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment, long index) { return (long) VH_deviceAddress.get(segment, 0L, index); } + /// {@return `deviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkDeviceAddress") long get_deviceAddress(MemorySegment segment) { return VkImageViewAddressPropertiesNVX.get_deviceAddress(segment, 0L); } + /// {@return `deviceAddress` at the given index} + /// @param index the index + public @CType("VkDeviceAddress") long deviceAddressAt(long index) { return VkImageViewAddressPropertiesNVX.get_deviceAddress(this.segment(), index); } + /// {@return `deviceAddress`} + public @CType("VkDeviceAddress") long deviceAddress() { return VkImageViewAddressPropertiesNVX.get_deviceAddress(this.segment()); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, long index, @CType("VkDeviceAddress") long value) { VH_deviceAddress.set(segment, 0L, index, value); } + /// Sets `deviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceAddress(MemorySegment segment, @CType("VkDeviceAddress") long value) { VkImageViewAddressPropertiesNVX.set_deviceAddress(segment, 0L, value); } + /// Sets `deviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewAddressPropertiesNVX deviceAddressAt(long index, @CType("VkDeviceAddress") long value) { VkImageViewAddressPropertiesNVX.set_deviceAddress(this.segment(), index, value); return this; } + /// Sets `deviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewAddressPropertiesNVX deviceAddress(@CType("VkDeviceAddress") long value) { VkImageViewAddressPropertiesNVX.set_deviceAddress(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkImageViewAddressPropertiesNVX.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkImageViewAddressPropertiesNVX.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkImageViewAddressPropertiesNVX.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkImageViewAddressPropertiesNVX.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewAddressPropertiesNVX sizeAt(long index, @CType("VkDeviceSize") long value) { VkImageViewAddressPropertiesNVX.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewAddressPropertiesNVX size(@CType("VkDeviceSize") long value) { VkImageViewAddressPropertiesNVX.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkImageViewHandleInfoNVX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkImageViewHandleInfoNVX.java new file mode 100644 index 00000000..acb0d9f0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkImageViewHandleInfoNVX.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageView +/// [VarHandle][#VH_imageView] - [Getter][#imageView()] - [Setter][#imageView(java.lang.foreign.MemorySegment)] +/// ### descriptorType +/// [VarHandle][#VH_descriptorType] - [Getter][#descriptorType()] - [Setter][#descriptorType(int)] +/// ### sampler +/// [VarHandle][#VH_sampler] - [Getter][#sampler()] - [Setter][#sampler(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageViewHandleInfoNVX { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageView imageView; +/// VkDescriptorType descriptorType; +/// VkSampler sampler; +/// } VkImageViewHandleInfoNVX; +/// ``` +public final class VkImageViewHandleInfoNVX extends Struct { + /// The struct layout of `VkImageViewHandleInfoNVX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("imageView"), + ValueLayout.JAVA_INT.withName("descriptorType"), + ValueLayout.ADDRESS.withName("sampler") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_imageView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageView")); + /// The [VarHandle] of `descriptorType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorType")); + /// The [VarHandle] of `sampler` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_sampler = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampler")); + + /// Creates `VkImageViewHandleInfoNVX` with the given segment. + /// @param segment the memory segment + public VkImageViewHandleInfoNVX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageViewHandleInfoNVX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewHandleInfoNVX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewHandleInfoNVX(segment); } + + /// Creates `VkImageViewHandleInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewHandleInfoNVX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewHandleInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageViewHandleInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewHandleInfoNVX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewHandleInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageViewHandleInfoNVX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageViewHandleInfoNVX` + public static VkImageViewHandleInfoNVX alloc(SegmentAllocator allocator) { return new VkImageViewHandleInfoNVX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageViewHandleInfoNVX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageViewHandleInfoNVX` + public static VkImageViewHandleInfoNVX alloc(SegmentAllocator allocator, long count) { return new VkImageViewHandleInfoNVX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageViewHandleInfoNVX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageViewHandleInfoNVX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageViewHandleInfoNVX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageViewHandleInfoNVX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewHandleInfoNVX sTypeAt(long index, @CType("VkStructureType") int value) { VkImageViewHandleInfoNVX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewHandleInfoNVX sType(@CType("VkStructureType") int value) { VkImageViewHandleInfoNVX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageViewHandleInfoNVX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageViewHandleInfoNVX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageViewHandleInfoNVX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewHandleInfoNVX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewHandleInfoNVX pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewHandleInfoNVX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewHandleInfoNVX pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewHandleInfoNVX.set_pNext(this.segment(), value); return this; } + + /// {@return `imageView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_imageView.get(segment, 0L, index); } + /// {@return `imageView`} + /// @param segment the segment of the struct + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment) { return VkImageViewHandleInfoNVX.get_imageView(segment, 0L); } + /// {@return `imageView` at the given index} + /// @param index the index + public @CType("VkImageView") java.lang.foreign.MemorySegment imageViewAt(long index) { return VkImageViewHandleInfoNVX.get_imageView(this.segment(), index); } + /// {@return `imageView`} + public @CType("VkImageView") java.lang.foreign.MemorySegment imageView() { return VkImageViewHandleInfoNVX.get_imageView(this.segment()); } + /// Sets `imageView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageView(MemorySegment segment, long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VH_imageView.set(segment, 0L, index, value); } + /// Sets `imageView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageView(MemorySegment segment, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkImageViewHandleInfoNVX.set_imageView(segment, 0L, value); } + /// Sets `imageView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewHandleInfoNVX imageViewAt(long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkImageViewHandleInfoNVX.set_imageView(this.segment(), index, value); return this; } + /// Sets `imageView` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewHandleInfoNVX imageView(@CType("VkImageView") java.lang.foreign.MemorySegment value) { VkImageViewHandleInfoNVX.set_imageView(this.segment(), value); return this; } + + /// {@return `descriptorType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorType") int get_descriptorType(MemorySegment segment, long index) { return (int) VH_descriptorType.get(segment, 0L, index); } + /// {@return `descriptorType`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorType") int get_descriptorType(MemorySegment segment) { return VkImageViewHandleInfoNVX.get_descriptorType(segment, 0L); } + /// {@return `descriptorType` at the given index} + /// @param index the index + public @CType("VkDescriptorType") int descriptorTypeAt(long index) { return VkImageViewHandleInfoNVX.get_descriptorType(this.segment(), index); } + /// {@return `descriptorType`} + public @CType("VkDescriptorType") int descriptorType() { return VkImageViewHandleInfoNVX.get_descriptorType(this.segment()); } + /// Sets `descriptorType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorType(MemorySegment segment, long index, @CType("VkDescriptorType") int value) { VH_descriptorType.set(segment, 0L, index, value); } + /// Sets `descriptorType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorType(MemorySegment segment, @CType("VkDescriptorType") int value) { VkImageViewHandleInfoNVX.set_descriptorType(segment, 0L, value); } + /// Sets `descriptorType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewHandleInfoNVX descriptorTypeAt(long index, @CType("VkDescriptorType") int value) { VkImageViewHandleInfoNVX.set_descriptorType(this.segment(), index, value); return this; } + /// Sets `descriptorType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewHandleInfoNVX descriptorType(@CType("VkDescriptorType") int value) { VkImageViewHandleInfoNVX.set_descriptorType(this.segment(), value); return this; } + + /// {@return `sampler` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampler") java.lang.foreign.MemorySegment get_sampler(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_sampler.get(segment, 0L, index); } + /// {@return `sampler`} + /// @param segment the segment of the struct + public static @CType("VkSampler") java.lang.foreign.MemorySegment get_sampler(MemorySegment segment) { return VkImageViewHandleInfoNVX.get_sampler(segment, 0L); } + /// {@return `sampler` at the given index} + /// @param index the index + public @CType("VkSampler") java.lang.foreign.MemorySegment samplerAt(long index) { return VkImageViewHandleInfoNVX.get_sampler(this.segment(), index); } + /// {@return `sampler`} + public @CType("VkSampler") java.lang.foreign.MemorySegment sampler() { return VkImageViewHandleInfoNVX.get_sampler(this.segment()); } + /// Sets `sampler` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampler(MemorySegment segment, long index, @CType("VkSampler") java.lang.foreign.MemorySegment value) { VH_sampler.set(segment, 0L, index, value); } + /// Sets `sampler` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampler(MemorySegment segment, @CType("VkSampler") java.lang.foreign.MemorySegment value) { VkImageViewHandleInfoNVX.set_sampler(segment, 0L, value); } + /// Sets `sampler` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewHandleInfoNVX samplerAt(long index, @CType("VkSampler") java.lang.foreign.MemorySegment value) { VkImageViewHandleInfoNVX.set_sampler(this.segment(), index, value); return this; } + /// Sets `sampler` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewHandleInfoNVX sampler(@CType("VkSampler") java.lang.foreign.MemorySegment value) { VkImageViewHandleInfoNVX.set_sampler(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkMultiviewPerViewAttributesInfoNVX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkMultiviewPerViewAttributesInfoNVX.java new file mode 100644 index 00000000..2496ed5a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkMultiviewPerViewAttributesInfoNVX.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### perViewAttributes +/// [VarHandle][#VH_perViewAttributes] - [Getter][#perViewAttributes()] - [Setter][#perViewAttributes(int)] +/// ### perViewAttributesPositionXOnly +/// [VarHandle][#VH_perViewAttributesPositionXOnly] - [Getter][#perViewAttributesPositionXOnly()] - [Setter][#perViewAttributesPositionXOnly(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMultiviewPerViewAttributesInfoNVX { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 perViewAttributes; +/// VkBool32 perViewAttributesPositionXOnly; +/// } VkMultiviewPerViewAttributesInfoNVX; +/// ``` +public final class VkMultiviewPerViewAttributesInfoNVX extends Struct { + /// The struct layout of `VkMultiviewPerViewAttributesInfoNVX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("perViewAttributes"), + ValueLayout.JAVA_INT.withName("perViewAttributesPositionXOnly") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `perViewAttributes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_perViewAttributes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("perViewAttributes")); + /// The [VarHandle] of `perViewAttributesPositionXOnly` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_perViewAttributesPositionXOnly = LAYOUT.arrayElementVarHandle(PathElement.groupElement("perViewAttributesPositionXOnly")); + + /// Creates `VkMultiviewPerViewAttributesInfoNVX` with the given segment. + /// @param segment the memory segment + public VkMultiviewPerViewAttributesInfoNVX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMultiviewPerViewAttributesInfoNVX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiviewPerViewAttributesInfoNVX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiviewPerViewAttributesInfoNVX(segment); } + + /// Creates `VkMultiviewPerViewAttributesInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiviewPerViewAttributesInfoNVX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiviewPerViewAttributesInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMultiviewPerViewAttributesInfoNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiviewPerViewAttributesInfoNVX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiviewPerViewAttributesInfoNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMultiviewPerViewAttributesInfoNVX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMultiviewPerViewAttributesInfoNVX` + public static VkMultiviewPerViewAttributesInfoNVX alloc(SegmentAllocator allocator) { return new VkMultiviewPerViewAttributesInfoNVX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMultiviewPerViewAttributesInfoNVX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMultiviewPerViewAttributesInfoNVX` + public static VkMultiviewPerViewAttributesInfoNVX alloc(SegmentAllocator allocator, long count) { return new VkMultiviewPerViewAttributesInfoNVX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMultiviewPerViewAttributesInfoNVX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMultiviewPerViewAttributesInfoNVX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMultiviewPerViewAttributesInfoNVX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMultiviewPerViewAttributesInfoNVX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiviewPerViewAttributesInfoNVX sTypeAt(long index, @CType("VkStructureType") int value) { VkMultiviewPerViewAttributesInfoNVX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMultiviewPerViewAttributesInfoNVX sType(@CType("VkStructureType") int value) { VkMultiviewPerViewAttributesInfoNVX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMultiviewPerViewAttributesInfoNVX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMultiviewPerViewAttributesInfoNVX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMultiviewPerViewAttributesInfoNVX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMultiviewPerViewAttributesInfoNVX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiviewPerViewAttributesInfoNVX pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMultiviewPerViewAttributesInfoNVX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMultiviewPerViewAttributesInfoNVX pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMultiviewPerViewAttributesInfoNVX.set_pNext(this.segment(), value); return this; } + + /// {@return `perViewAttributes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_perViewAttributes(MemorySegment segment, long index) { return (int) VH_perViewAttributes.get(segment, 0L, index); } + /// {@return `perViewAttributes`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_perViewAttributes(MemorySegment segment) { return VkMultiviewPerViewAttributesInfoNVX.get_perViewAttributes(segment, 0L); } + /// {@return `perViewAttributes` at the given index} + /// @param index the index + public @CType("VkBool32") int perViewAttributesAt(long index) { return VkMultiviewPerViewAttributesInfoNVX.get_perViewAttributes(this.segment(), index); } + /// {@return `perViewAttributes`} + public @CType("VkBool32") int perViewAttributes() { return VkMultiviewPerViewAttributesInfoNVX.get_perViewAttributes(this.segment()); } + /// Sets `perViewAttributes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_perViewAttributes(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_perViewAttributes.set(segment, 0L, index, value); } + /// Sets `perViewAttributes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_perViewAttributes(MemorySegment segment, @CType("VkBool32") int value) { VkMultiviewPerViewAttributesInfoNVX.set_perViewAttributes(segment, 0L, value); } + /// Sets `perViewAttributes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiviewPerViewAttributesInfoNVX perViewAttributesAt(long index, @CType("VkBool32") int value) { VkMultiviewPerViewAttributesInfoNVX.set_perViewAttributes(this.segment(), index, value); return this; } + /// Sets `perViewAttributes` with the given value. + /// @param value the value + /// @return `this` + public VkMultiviewPerViewAttributesInfoNVX perViewAttributes(@CType("VkBool32") int value) { VkMultiviewPerViewAttributesInfoNVX.set_perViewAttributes(this.segment(), value); return this; } + + /// {@return `perViewAttributesPositionXOnly` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_perViewAttributesPositionXOnly(MemorySegment segment, long index) { return (int) VH_perViewAttributesPositionXOnly.get(segment, 0L, index); } + /// {@return `perViewAttributesPositionXOnly`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_perViewAttributesPositionXOnly(MemorySegment segment) { return VkMultiviewPerViewAttributesInfoNVX.get_perViewAttributesPositionXOnly(segment, 0L); } + /// {@return `perViewAttributesPositionXOnly` at the given index} + /// @param index the index + public @CType("VkBool32") int perViewAttributesPositionXOnlyAt(long index) { return VkMultiviewPerViewAttributesInfoNVX.get_perViewAttributesPositionXOnly(this.segment(), index); } + /// {@return `perViewAttributesPositionXOnly`} + public @CType("VkBool32") int perViewAttributesPositionXOnly() { return VkMultiviewPerViewAttributesInfoNVX.get_perViewAttributesPositionXOnly(this.segment()); } + /// Sets `perViewAttributesPositionXOnly` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_perViewAttributesPositionXOnly(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_perViewAttributesPositionXOnly.set(segment, 0L, index, value); } + /// Sets `perViewAttributesPositionXOnly` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_perViewAttributesPositionXOnly(MemorySegment segment, @CType("VkBool32") int value) { VkMultiviewPerViewAttributesInfoNVX.set_perViewAttributesPositionXOnly(segment, 0L, value); } + /// Sets `perViewAttributesPositionXOnly` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiviewPerViewAttributesInfoNVX perViewAttributesPositionXOnlyAt(long index, @CType("VkBool32") int value) { VkMultiviewPerViewAttributesInfoNVX.set_perViewAttributesPositionXOnly(this.segment(), index, value); return this; } + /// Sets `perViewAttributesPositionXOnly` with the given value. + /// @param value the value + /// @return `this` + public VkMultiviewPerViewAttributesInfoNVX perViewAttributesPositionXOnly(@CType("VkBool32") int value) { VkMultiviewPerViewAttributesInfoNVX.set_perViewAttributesPositionXOnly(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.java new file mode 100644 index 00000000..54515b2a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/nvx/struct/VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.nvx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### perViewPositionAllComponents +/// [VarHandle][#VH_perViewPositionAllComponents] - [Getter][#perViewPositionAllComponents()] - [Setter][#perViewPositionAllComponents(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 perViewPositionAllComponents; +/// } VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; +/// ``` +public final class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX extends Struct { + /// The struct layout of `VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("perViewPositionAllComponents") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `perViewPositionAllComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_perViewPositionAllComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("perViewPositionAllComponents")); + + /// Creates `VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(segment); } + + /// Creates `VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX` + public static VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX` + public static VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.set_pNext(this.segment(), value); return this; } + + /// {@return `perViewPositionAllComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_perViewPositionAllComponents(MemorySegment segment, long index) { return (int) VH_perViewPositionAllComponents.get(segment, 0L, index); } + /// {@return `perViewPositionAllComponents`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_perViewPositionAllComponents(MemorySegment segment) { return VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.get_perViewPositionAllComponents(segment, 0L); } + /// {@return `perViewPositionAllComponents` at the given index} + /// @param index the index + public @CType("VkBool32") int perViewPositionAllComponentsAt(long index) { return VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.get_perViewPositionAllComponents(this.segment(), index); } + /// {@return `perViewPositionAllComponents`} + public @CType("VkBool32") int perViewPositionAllComponents() { return VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.get_perViewPositionAllComponents(this.segment()); } + /// Sets `perViewPositionAllComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_perViewPositionAllComponents(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_perViewPositionAllComponents.set(segment, 0L, index, value); } + /// Sets `perViewPositionAllComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_perViewPositionAllComponents(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.set_perViewPositionAllComponents(segment, 0L, value); } + /// Sets `perViewPositionAllComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX perViewPositionAllComponentsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.set_perViewPositionAllComponents(this.segment(), index, value); return this; } + /// Sets `perViewPositionAllComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX perViewPositionAllComponents(@CType("VkBool32") int value) { VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.set_perViewPositionAllComponents(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/package-info.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/package-info.java new file mode 100644 index 00000000..8428a3d1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/package-info.java @@ -0,0 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +/// The Vulkan binding. +/// +/// - [Website](https://www.vulkan.org) +/// - [LunarG](https://vulkan.lunarg.com/) +/// - [References](https://registry.khronos.org/vulkan/specs/latest/man/html/) +/// - [Specification](https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html) +/// - [Vulkan-Docs](https://github.com/KhronosGroup/Vulkan-Docs) +/// +/// @author squid233 +/// @since 0.1.0 +package overrungl.vulkan; diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMFilterCubicClamp.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMFilterCubicClamp.java new file mode 100644 index 00000000..cf129033 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMFilterCubicClamp.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMFilterCubicClamp { + public static final int VK_QCOM_FILTER_CUBIC_CLAMP_SPEC_VERSION = 1; + public static final String VK_QCOM_FILTER_CUBIC_CLAMP_EXTENSION_NAME = "VK_QCOM_filter_cubic_clamp"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM = 1000521000; + public static final int VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM = 1000521000; + + public VKQCOMFilterCubicClamp(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMFilterCubicWeights.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMFilterCubicWeights.java new file mode 100644 index 00000000..e58a9947 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMFilterCubicWeights.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMFilterCubicWeights { + public static final int VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM = 0; + public static final int VK_CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM = 1; + public static final int VK_CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM = 2; + public static final int VK_CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM = 3; + public static final int VK_QCOM_FILTER_CUBIC_WEIGHTS_SPEC_VERSION = 1; + public static final String VK_QCOM_FILTER_CUBIC_WEIGHTS_EXTENSION_NAME = "VK_QCOM_filter_cubic_weights"; + public static final int VK_STRUCTURE_TYPE_SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM = 1000519000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM = 1000519001; + public static final int VK_STRUCTURE_TYPE_BLIT_IMAGE_CUBIC_WEIGHTS_INFO_QCOM = 1000519002; + + public VKQCOMFilterCubicWeights(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMFragmentDensityMapOffset.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMFragmentDensityMapOffset.java new file mode 100644 index 00000000..ac3a6d33 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMFragmentDensityMapOffset.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMFragmentDensityMapOffset { + public static final int VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_SPEC_VERSION = 2; + public static final String VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_EXTENSION_NAME = "VK_QCOM_fragment_density_map_offset"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM = 1000425000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM = 1000425001; + public static final int VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM = 1000425002; + public static final int VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = 0x00008000; + + public VKQCOMFragmentDensityMapOffset(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMImageProcessing.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMImageProcessing.java new file mode 100644 index 00000000..638dc334 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMImageProcessing.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMImageProcessing { + public static final int VK_QCOM_IMAGE_PROCESSING_SPEC_VERSION = 1; + public static final String VK_QCOM_IMAGE_PROCESSING_EXTENSION_NAME = "VK_QCOM_image_processing"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM = 1000440000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM = 1000440001; + public static final int VK_STRUCTURE_TYPE_IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM = 1000440002; + public static final int VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM = 0x00000010; + public static final int VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000; + public static final int VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM = 0x00200000; + public static final int VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM = 1000440000; + public static final int VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM = 1000440001; + public static final long VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM = 0x400000000L; + public static final long VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM = 0x800000000L; + public static final long VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM = 0x1000000000L; + public static final long VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM = 0x2000000000L; + + public VKQCOMImageProcessing(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMImageProcessing2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMImageProcessing2.java new file mode 100644 index 00000000..bdb31e20 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMImageProcessing2.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMImageProcessing2 { + public static final int VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOM = 0; + public static final int VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOM = 1; + public static final int VK_QCOM_IMAGE_PROCESSING_2_SPEC_VERSION = 1; + public static final String VK_QCOM_IMAGE_PROCESSING_2_EXTENSION_NAME = "VK_QCOM_image_processing2"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM = 1000518000; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM = 1000518001; + public static final int VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM = 1000518002; + + public VKQCOMImageProcessing2(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMMultiviewPerViewRenderAreas.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMMultiviewPerViewRenderAreas.java new file mode 100644 index 00000000..98a5af51 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMMultiviewPerViewRenderAreas.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMMultiviewPerViewRenderAreas { + public static final int VK_QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_SPEC_VERSION = 1; + public static final String VK_QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_EXTENSION_NAME = "VK_QCOM_multiview_per_view_render_areas"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM = 1000510000; + public static final int VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM = 1000510001; + + public VKQCOMMultiviewPerViewRenderAreas(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMMultiviewPerViewViewports.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMMultiviewPerViewViewports.java new file mode 100644 index 00000000..128d1e49 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMMultiviewPerViewViewports.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMMultiviewPerViewViewports { + public static final int VK_QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_SPEC_VERSION = 1; + public static final String VK_QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_EXTENSION_NAME = "VK_QCOM_multiview_per_view_viewports"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM = 1000488000; + + public VKQCOMMultiviewPerViewViewports(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRenderPassShaderResolve.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRenderPassShaderResolve.java new file mode 100644 index 00000000..a4614603 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRenderPassShaderResolve.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMRenderPassShaderResolve { + public static final int VK_QCOM_RENDER_PASS_SHADER_RESOLVE_SPEC_VERSION = 4; + public static final String VK_QCOM_RENDER_PASS_SHADER_RESOLVE_EXTENSION_NAME = "VK_QCOM_render_pass_shader_resolve"; + public static final int VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM = 0x00000004; + public static final int VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM = 0x00000008; + + public VKQCOMRenderPassShaderResolve(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRenderPassStoreOps.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRenderPassStoreOps.java new file mode 100644 index 00000000..f9bbea9a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRenderPassStoreOps.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.VK13.*; +public class VKQCOMRenderPassStoreOps { + public static final int VK_QCOM_RENDER_PASS_STORE_OPS_SPEC_VERSION = 2; + public static final String VK_QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME = "VK_QCOM_render_pass_store_ops"; + public static final int VK_ATTACHMENT_STORE_OP_NONE_QCOM = VK_ATTACHMENT_STORE_OP_NONE; + + public VKQCOMRenderPassStoreOps(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRenderPassTransform.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRenderPassTransform.java new file mode 100644 index 00000000..2fdcd895 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRenderPassTransform.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMRenderPassTransform { + public static final int VK_QCOM_RENDER_PASS_TRANSFORM_SPEC_VERSION = 4; + public static final String VK_QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME = "VK_QCOM_render_pass_transform"; + public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000; + public static final int VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM = 1000282001; + public static final int VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM = 0x00000002; + + public VKQCOMRenderPassTransform(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRotatedCopyCommands.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRotatedCopyCommands.java new file mode 100644 index 00000000..37c2a78b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMRotatedCopyCommands.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMRotatedCopyCommands { + public static final int VK_QCOM_ROTATED_COPY_COMMANDS_SPEC_VERSION = 2; + public static final String VK_QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME = "VK_QCOM_rotated_copy_commands"; + public static final int VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM = 1000333000; + + public VKQCOMRotatedCopyCommands(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMTileProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMTileProperties.java new file mode 100644 index 00000000..3703072b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMTileProperties.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMTileProperties { + public static final int VK_QCOM_TILE_PROPERTIES_SPEC_VERSION = 1; + public static final String VK_QCOM_TILE_PROPERTIES_EXTENSION_NAME = "VK_QCOM_tile_properties"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM = 1000484000; + public static final int VK_STRUCTURE_TYPE_TILE_PROPERTIES_QCOM = 1000484001; + public static final MethodHandle MH_vkGetFramebufferTilePropertiesQCOM = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDynamicRenderingTilePropertiesQCOM = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetFramebufferTilePropertiesQCOM; + public final MemorySegment PFN_vkGetDynamicRenderingTilePropertiesQCOM; + + public VKQCOMTileProperties(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetFramebufferTilePropertiesQCOM = func.invoke(device, "vkGetFramebufferTilePropertiesQCOM"); + PFN_vkGetDynamicRenderingTilePropertiesQCOM = func.invoke(device, "vkGetDynamicRenderingTilePropertiesQCOM"); + } + + public @CType("VkResult") int GetFramebufferTilePropertiesQCOM(@CType("VkDevice") MemorySegment device, @CType("VkFramebuffer") MemorySegment framebuffer, @CType("uint32_t *") MemorySegment pPropertiesCount, @CType("VkTilePropertiesQCOM *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetFramebufferTilePropertiesQCOM)) throw new SymbolNotFoundError("Symbol not found: vkGetFramebufferTilePropertiesQCOM"); + try { return (int) MH_vkGetFramebufferTilePropertiesQCOM.invokeExact(PFN_vkGetFramebufferTilePropertiesQCOM, device, framebuffer, pPropertiesCount, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetFramebufferTilePropertiesQCOM", e); } + } + + public @CType("VkResult") int GetDynamicRenderingTilePropertiesQCOM(@CType("VkDevice") MemorySegment device, @CType("const VkRenderingInfo *") MemorySegment pRenderingInfo, @CType("VkTilePropertiesQCOM *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetDynamicRenderingTilePropertiesQCOM)) throw new SymbolNotFoundError("Symbol not found: vkGetDynamicRenderingTilePropertiesQCOM"); + try { return (int) MH_vkGetDynamicRenderingTilePropertiesQCOM.invokeExact(PFN_vkGetDynamicRenderingTilePropertiesQCOM, device, pRenderingInfo, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDynamicRenderingTilePropertiesQCOM", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMYcbcrDegamma.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMYcbcrDegamma.java new file mode 100644 index 00000000..cfb1617f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/VKQCOMYcbcrDegamma.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQCOMYcbcrDegamma { + public static final int VK_QCOM_YCBCR_DEGAMMA_SPEC_VERSION = 1; + public static final String VK_QCOM_YCBCR_DEGAMMA_EXTENSION_NAME = "VK_QCOM_ycbcr_degamma"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM = 1000520000; + public static final int VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM = 1000520001; + + public VKQCOMYcbcrDegamma(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkBlitImageCubicWeightsInfoQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkBlitImageCubicWeightsInfoQCOM.java new file mode 100644 index 00000000..cd11b691 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkBlitImageCubicWeightsInfoQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cubicWeights +/// [VarHandle][#VH_cubicWeights] - [Getter][#cubicWeights()] - [Setter][#cubicWeights(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBlitImageCubicWeightsInfoQCOM { +/// VkStructureType sType; +/// const void * pNext; +/// VkCubicFilterWeightsQCOM cubicWeights; +/// } VkBlitImageCubicWeightsInfoQCOM; +/// ``` +public final class VkBlitImageCubicWeightsInfoQCOM extends Struct { + /// The struct layout of `VkBlitImageCubicWeightsInfoQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cubicWeights") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cubicWeights` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cubicWeights = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cubicWeights")); + + /// Creates `VkBlitImageCubicWeightsInfoQCOM` with the given segment. + /// @param segment the memory segment + public VkBlitImageCubicWeightsInfoQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBlitImageCubicWeightsInfoQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBlitImageCubicWeightsInfoQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBlitImageCubicWeightsInfoQCOM(segment); } + + /// Creates `VkBlitImageCubicWeightsInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBlitImageCubicWeightsInfoQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBlitImageCubicWeightsInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBlitImageCubicWeightsInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBlitImageCubicWeightsInfoQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBlitImageCubicWeightsInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBlitImageCubicWeightsInfoQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBlitImageCubicWeightsInfoQCOM` + public static VkBlitImageCubicWeightsInfoQCOM alloc(SegmentAllocator allocator) { return new VkBlitImageCubicWeightsInfoQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBlitImageCubicWeightsInfoQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBlitImageCubicWeightsInfoQCOM` + public static VkBlitImageCubicWeightsInfoQCOM alloc(SegmentAllocator allocator, long count) { return new VkBlitImageCubicWeightsInfoQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBlitImageCubicWeightsInfoQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBlitImageCubicWeightsInfoQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBlitImageCubicWeightsInfoQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBlitImageCubicWeightsInfoQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageCubicWeightsInfoQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkBlitImageCubicWeightsInfoQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageCubicWeightsInfoQCOM sType(@CType("VkStructureType") int value) { VkBlitImageCubicWeightsInfoQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBlitImageCubicWeightsInfoQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBlitImageCubicWeightsInfoQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBlitImageCubicWeightsInfoQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBlitImageCubicWeightsInfoQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageCubicWeightsInfoQCOM pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBlitImageCubicWeightsInfoQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageCubicWeightsInfoQCOM pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBlitImageCubicWeightsInfoQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `cubicWeights` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCubicFilterWeightsQCOM") int get_cubicWeights(MemorySegment segment, long index) { return (int) VH_cubicWeights.get(segment, 0L, index); } + /// {@return `cubicWeights`} + /// @param segment the segment of the struct + public static @CType("VkCubicFilterWeightsQCOM") int get_cubicWeights(MemorySegment segment) { return VkBlitImageCubicWeightsInfoQCOM.get_cubicWeights(segment, 0L); } + /// {@return `cubicWeights` at the given index} + /// @param index the index + public @CType("VkCubicFilterWeightsQCOM") int cubicWeightsAt(long index) { return VkBlitImageCubicWeightsInfoQCOM.get_cubicWeights(this.segment(), index); } + /// {@return `cubicWeights`} + public @CType("VkCubicFilterWeightsQCOM") int cubicWeights() { return VkBlitImageCubicWeightsInfoQCOM.get_cubicWeights(this.segment()); } + /// Sets `cubicWeights` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cubicWeights(MemorySegment segment, long index, @CType("VkCubicFilterWeightsQCOM") int value) { VH_cubicWeights.set(segment, 0L, index, value); } + /// Sets `cubicWeights` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cubicWeights(MemorySegment segment, @CType("VkCubicFilterWeightsQCOM") int value) { VkBlitImageCubicWeightsInfoQCOM.set_cubicWeights(segment, 0L, value); } + /// Sets `cubicWeights` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageCubicWeightsInfoQCOM cubicWeightsAt(long index, @CType("VkCubicFilterWeightsQCOM") int value) { VkBlitImageCubicWeightsInfoQCOM.set_cubicWeights(this.segment(), index, value); return this; } + /// Sets `cubicWeights` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageCubicWeightsInfoQCOM cubicWeights(@CType("VkCubicFilterWeightsQCOM") int value) { VkBlitImageCubicWeightsInfoQCOM.set_cubicWeights(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkCommandBufferInheritanceRenderPassTransformInfoQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkCommandBufferInheritanceRenderPassTransformInfoQCOM.java new file mode 100644 index 00000000..36ac74eb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkCommandBufferInheritanceRenderPassTransformInfoQCOM.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### transform +/// [VarHandle][#VH_transform] - [Getter][#transform()] - [Setter][#transform(int)] +/// ### renderArea +/// [Byte offset][#OFFSET_renderArea] - [Memory layout][#ML_renderArea] - [Getter][#renderArea()] - [Setter][#renderArea(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandBufferInheritanceRenderPassTransformInfoQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkSurfaceTransformFlagBitsKHR transform; +/// VkRect2D renderArea; +/// } VkCommandBufferInheritanceRenderPassTransformInfoQCOM; +/// ``` +public final class VkCommandBufferInheritanceRenderPassTransformInfoQCOM extends Struct { + /// The struct layout of `VkCommandBufferInheritanceRenderPassTransformInfoQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("transform"), + overrungl.vulkan.struct.VkRect2D.LAYOUT.withName("renderArea") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `transform` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transform = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transform")); + /// The byte offset of `renderArea`. + public static final long OFFSET_renderArea = LAYOUT.byteOffset(PathElement.groupElement("renderArea")); + /// The memory layout of `renderArea`. + public static final MemoryLayout ML_renderArea = LAYOUT.select(PathElement.groupElement("renderArea")); + + /// Creates `VkCommandBufferInheritanceRenderPassTransformInfoQCOM` with the given segment. + /// @param segment the memory segment + public VkCommandBufferInheritanceRenderPassTransformInfoQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandBufferInheritanceRenderPassTransformInfoQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceRenderPassTransformInfoQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceRenderPassTransformInfoQCOM(segment); } + + /// Creates `VkCommandBufferInheritanceRenderPassTransformInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceRenderPassTransformInfoQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceRenderPassTransformInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandBufferInheritanceRenderPassTransformInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceRenderPassTransformInfoQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceRenderPassTransformInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandBufferInheritanceRenderPassTransformInfoQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandBufferInheritanceRenderPassTransformInfoQCOM` + public static VkCommandBufferInheritanceRenderPassTransformInfoQCOM alloc(SegmentAllocator allocator) { return new VkCommandBufferInheritanceRenderPassTransformInfoQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandBufferInheritanceRenderPassTransformInfoQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandBufferInheritanceRenderPassTransformInfoQCOM` + public static VkCommandBufferInheritanceRenderPassTransformInfoQCOM alloc(SegmentAllocator allocator, long count) { return new VkCommandBufferInheritanceRenderPassTransformInfoQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderPassTransformInfoQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderPassTransformInfoQCOM sType(@CType("VkStructureType") int value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderPassTransformInfoQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderPassTransformInfoQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `transform` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_transform(MemorySegment segment, long index) { return (int) VH_transform.get(segment, 0L, index); } + /// {@return `transform`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_transform(MemorySegment segment) { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_transform(segment, 0L); } + /// {@return `transform` at the given index} + /// @param index the index + public @CType("VkSurfaceTransformFlagBitsKHR") int transformAt(long index) { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_transform(this.segment(), index); } + /// {@return `transform`} + public @CType("VkSurfaceTransformFlagBitsKHR") int transform() { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_transform(this.segment()); } + /// Sets `transform` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transform(MemorySegment segment, long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VH_transform.set(segment, 0L, index, value); } + /// Sets `transform` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transform(MemorySegment segment, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_transform(segment, 0L, value); } + /// Sets `transform` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderPassTransformInfoQCOM transformAt(long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_transform(this.segment(), index, value); return this; } + /// Sets `transform` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderPassTransformInfoQCOM transform(@CType("VkSurfaceTransformFlagBitsKHR") int value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_transform(this.segment(), value); return this; } + + /// {@return `renderArea` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_renderArea(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_renderArea, index), ML_renderArea); } + /// {@return `renderArea`} + /// @param segment the segment of the struct + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_renderArea(MemorySegment segment) { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_renderArea(segment, 0L); } + /// {@return `renderArea` at the given index} + /// @param index the index + public @CType("VkRect2D") java.lang.foreign.MemorySegment renderAreaAt(long index) { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_renderArea(this.segment(), index); } + /// {@return `renderArea`} + public @CType("VkRect2D") java.lang.foreign.MemorySegment renderArea() { return VkCommandBufferInheritanceRenderPassTransformInfoQCOM.get_renderArea(this.segment()); } + /// Sets `renderArea` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderArea(MemorySegment segment, long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_renderArea, index), ML_renderArea.byteSize()); } + /// Sets `renderArea` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderArea(MemorySegment segment, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_renderArea(segment, 0L, value); } + /// Sets `renderArea` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderPassTransformInfoQCOM renderAreaAt(long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_renderArea(this.segment(), index, value); return this; } + /// Sets `renderArea` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderPassTransformInfoQCOM renderArea(@CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderPassTransformInfoQCOM.set_renderArea(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkCopyCommandTransformInfoQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkCopyCommandTransformInfoQCOM.java new file mode 100644 index 00000000..9ddf76d5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkCopyCommandTransformInfoQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### transform +/// [VarHandle][#VH_transform] - [Getter][#transform()] - [Setter][#transform(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyCommandTransformInfoQCOM { +/// VkStructureType sType; +/// const void * pNext; +/// VkSurfaceTransformFlagBitsKHR transform; +/// } VkCopyCommandTransformInfoQCOM; +/// ``` +public final class VkCopyCommandTransformInfoQCOM extends Struct { + /// The struct layout of `VkCopyCommandTransformInfoQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("transform") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `transform` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transform = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transform")); + + /// Creates `VkCopyCommandTransformInfoQCOM` with the given segment. + /// @param segment the memory segment + public VkCopyCommandTransformInfoQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyCommandTransformInfoQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyCommandTransformInfoQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyCommandTransformInfoQCOM(segment); } + + /// Creates `VkCopyCommandTransformInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyCommandTransformInfoQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyCommandTransformInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyCommandTransformInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyCommandTransformInfoQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyCommandTransformInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyCommandTransformInfoQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyCommandTransformInfoQCOM` + public static VkCopyCommandTransformInfoQCOM alloc(SegmentAllocator allocator) { return new VkCopyCommandTransformInfoQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyCommandTransformInfoQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyCommandTransformInfoQCOM` + public static VkCopyCommandTransformInfoQCOM alloc(SegmentAllocator allocator, long count) { return new VkCopyCommandTransformInfoQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyCommandTransformInfoQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyCommandTransformInfoQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyCommandTransformInfoQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyCommandTransformInfoQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyCommandTransformInfoQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyCommandTransformInfoQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyCommandTransformInfoQCOM sType(@CType("VkStructureType") int value) { VkCopyCommandTransformInfoQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyCommandTransformInfoQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyCommandTransformInfoQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyCommandTransformInfoQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyCommandTransformInfoQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyCommandTransformInfoQCOM pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyCommandTransformInfoQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyCommandTransformInfoQCOM pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyCommandTransformInfoQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `transform` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_transform(MemorySegment segment, long index) { return (int) VH_transform.get(segment, 0L, index); } + /// {@return `transform`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_transform(MemorySegment segment) { return VkCopyCommandTransformInfoQCOM.get_transform(segment, 0L); } + /// {@return `transform` at the given index} + /// @param index the index + public @CType("VkSurfaceTransformFlagBitsKHR") int transformAt(long index) { return VkCopyCommandTransformInfoQCOM.get_transform(this.segment(), index); } + /// {@return `transform`} + public @CType("VkSurfaceTransformFlagBitsKHR") int transform() { return VkCopyCommandTransformInfoQCOM.get_transform(this.segment()); } + /// Sets `transform` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transform(MemorySegment segment, long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VH_transform.set(segment, 0L, index, value); } + /// Sets `transform` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transform(MemorySegment segment, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkCopyCommandTransformInfoQCOM.set_transform(segment, 0L, value); } + /// Sets `transform` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyCommandTransformInfoQCOM transformAt(long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkCopyCommandTransformInfoQCOM.set_transform(this.segment(), index, value); return this; } + /// Sets `transform` with the given value. + /// @param value the value + /// @return `this` + public VkCopyCommandTransformInfoQCOM transform(@CType("VkSurfaceTransformFlagBitsKHR") int value) { VkCopyCommandTransformInfoQCOM.set_transform(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkImageViewSampleWeightCreateInfoQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkImageViewSampleWeightCreateInfoQCOM.java new file mode 100644 index 00000000..858b51a9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkImageViewSampleWeightCreateInfoQCOM.java @@ -0,0 +1,263 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### filterCenter +/// [Byte offset][#OFFSET_filterCenter] - [Memory layout][#ML_filterCenter] - [Getter][#filterCenter()] - [Setter][#filterCenter(java.lang.foreign.MemorySegment)] +/// ### filterSize +/// [Byte offset][#OFFSET_filterSize] - [Memory layout][#ML_filterSize] - [Getter][#filterSize()] - [Setter][#filterSize(java.lang.foreign.MemorySegment)] +/// ### numPhases +/// [VarHandle][#VH_numPhases] - [Getter][#numPhases()] - [Setter][#numPhases(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageViewSampleWeightCreateInfoQCOM { +/// VkStructureType sType; +/// const void * pNext; +/// VkOffset2D filterCenter; +/// VkExtent2D filterSize; +/// uint32_t numPhases; +/// } VkImageViewSampleWeightCreateInfoQCOM; +/// ``` +public final class VkImageViewSampleWeightCreateInfoQCOM extends Struct { + /// The struct layout of `VkImageViewSampleWeightCreateInfoQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkOffset2D.LAYOUT.withName("filterCenter"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("filterSize"), + ValueLayout.JAVA_INT.withName("numPhases") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `filterCenter`. + public static final long OFFSET_filterCenter = LAYOUT.byteOffset(PathElement.groupElement("filterCenter")); + /// The memory layout of `filterCenter`. + public static final MemoryLayout ML_filterCenter = LAYOUT.select(PathElement.groupElement("filterCenter")); + /// The byte offset of `filterSize`. + public static final long OFFSET_filterSize = LAYOUT.byteOffset(PathElement.groupElement("filterSize")); + /// The memory layout of `filterSize`. + public static final MemoryLayout ML_filterSize = LAYOUT.select(PathElement.groupElement("filterSize")); + /// The [VarHandle] of `numPhases` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_numPhases = LAYOUT.arrayElementVarHandle(PathElement.groupElement("numPhases")); + + /// Creates `VkImageViewSampleWeightCreateInfoQCOM` with the given segment. + /// @param segment the memory segment + public VkImageViewSampleWeightCreateInfoQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageViewSampleWeightCreateInfoQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewSampleWeightCreateInfoQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewSampleWeightCreateInfoQCOM(segment); } + + /// Creates `VkImageViewSampleWeightCreateInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewSampleWeightCreateInfoQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewSampleWeightCreateInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageViewSampleWeightCreateInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewSampleWeightCreateInfoQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewSampleWeightCreateInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageViewSampleWeightCreateInfoQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageViewSampleWeightCreateInfoQCOM` + public static VkImageViewSampleWeightCreateInfoQCOM alloc(SegmentAllocator allocator) { return new VkImageViewSampleWeightCreateInfoQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageViewSampleWeightCreateInfoQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageViewSampleWeightCreateInfoQCOM` + public static VkImageViewSampleWeightCreateInfoQCOM alloc(SegmentAllocator allocator, long count) { return new VkImageViewSampleWeightCreateInfoQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageViewSampleWeightCreateInfoQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageViewSampleWeightCreateInfoQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageViewSampleWeightCreateInfoQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageViewSampleWeightCreateInfoQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewSampleWeightCreateInfoQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkImageViewSampleWeightCreateInfoQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewSampleWeightCreateInfoQCOM sType(@CType("VkStructureType") int value) { VkImageViewSampleWeightCreateInfoQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageViewSampleWeightCreateInfoQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageViewSampleWeightCreateInfoQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageViewSampleWeightCreateInfoQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewSampleWeightCreateInfoQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewSampleWeightCreateInfoQCOM pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewSampleWeightCreateInfoQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewSampleWeightCreateInfoQCOM pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewSampleWeightCreateInfoQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `filterCenter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_filterCenter(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_filterCenter, index), ML_filterCenter); } + /// {@return `filterCenter`} + /// @param segment the segment of the struct + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_filterCenter(MemorySegment segment) { return VkImageViewSampleWeightCreateInfoQCOM.get_filterCenter(segment, 0L); } + /// {@return `filterCenter` at the given index} + /// @param index the index + public @CType("VkOffset2D") java.lang.foreign.MemorySegment filterCenterAt(long index) { return VkImageViewSampleWeightCreateInfoQCOM.get_filterCenter(this.segment(), index); } + /// {@return `filterCenter`} + public @CType("VkOffset2D") java.lang.foreign.MemorySegment filterCenter() { return VkImageViewSampleWeightCreateInfoQCOM.get_filterCenter(this.segment()); } + /// Sets `filterCenter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_filterCenter(MemorySegment segment, long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_filterCenter, index), ML_filterCenter.byteSize()); } + /// Sets `filterCenter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_filterCenter(MemorySegment segment, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkImageViewSampleWeightCreateInfoQCOM.set_filterCenter(segment, 0L, value); } + /// Sets `filterCenter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewSampleWeightCreateInfoQCOM filterCenterAt(long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkImageViewSampleWeightCreateInfoQCOM.set_filterCenter(this.segment(), index, value); return this; } + /// Sets `filterCenter` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewSampleWeightCreateInfoQCOM filterCenter(@CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkImageViewSampleWeightCreateInfoQCOM.set_filterCenter(this.segment(), value); return this; } + + /// {@return `filterSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_filterSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_filterSize, index), ML_filterSize); } + /// {@return `filterSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_filterSize(MemorySegment segment) { return VkImageViewSampleWeightCreateInfoQCOM.get_filterSize(segment, 0L); } + /// {@return `filterSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment filterSizeAt(long index) { return VkImageViewSampleWeightCreateInfoQCOM.get_filterSize(this.segment(), index); } + /// {@return `filterSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment filterSize() { return VkImageViewSampleWeightCreateInfoQCOM.get_filterSize(this.segment()); } + /// Sets `filterSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_filterSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_filterSize, index), ML_filterSize.byteSize()); } + /// Sets `filterSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_filterSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkImageViewSampleWeightCreateInfoQCOM.set_filterSize(segment, 0L, value); } + /// Sets `filterSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewSampleWeightCreateInfoQCOM filterSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkImageViewSampleWeightCreateInfoQCOM.set_filterSize(this.segment(), index, value); return this; } + /// Sets `filterSize` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewSampleWeightCreateInfoQCOM filterSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkImageViewSampleWeightCreateInfoQCOM.set_filterSize(this.segment(), value); return this; } + + /// {@return `numPhases` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_numPhases(MemorySegment segment, long index) { return (int) VH_numPhases.get(segment, 0L, index); } + /// {@return `numPhases`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_numPhases(MemorySegment segment) { return VkImageViewSampleWeightCreateInfoQCOM.get_numPhases(segment, 0L); } + /// {@return `numPhases` at the given index} + /// @param index the index + public @CType("uint32_t") int numPhasesAt(long index) { return VkImageViewSampleWeightCreateInfoQCOM.get_numPhases(this.segment(), index); } + /// {@return `numPhases`} + public @CType("uint32_t") int numPhases() { return VkImageViewSampleWeightCreateInfoQCOM.get_numPhases(this.segment()); } + /// Sets `numPhases` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_numPhases(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_numPhases.set(segment, 0L, index, value); } + /// Sets `numPhases` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_numPhases(MemorySegment segment, @CType("uint32_t") int value) { VkImageViewSampleWeightCreateInfoQCOM.set_numPhases(segment, 0L, value); } + /// Sets `numPhases` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewSampleWeightCreateInfoQCOM numPhasesAt(long index, @CType("uint32_t") int value) { VkImageViewSampleWeightCreateInfoQCOM.set_numPhases(this.segment(), index, value); return this; } + /// Sets `numPhases` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewSampleWeightCreateInfoQCOM numPhases(@CType("uint32_t") int value) { VkImageViewSampleWeightCreateInfoQCOM.set_numPhases(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.java new file mode 100644 index 00000000..32edaca1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### perViewRenderAreaCount +/// [VarHandle][#VH_perViewRenderAreaCount] - [Getter][#perViewRenderAreaCount()] - [Setter][#perViewRenderAreaCount(int)] +/// ### pPerViewRenderAreas +/// [VarHandle][#VH_pPerViewRenderAreas] - [Getter][#pPerViewRenderAreas()] - [Setter][#pPerViewRenderAreas(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t perViewRenderAreaCount; +/// const VkRect2D * pPerViewRenderAreas; +/// } VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM; +/// ``` +public final class VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM extends Struct { + /// The struct layout of `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("perViewRenderAreaCount"), + ValueLayout.ADDRESS.withName("pPerViewRenderAreas") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `perViewRenderAreaCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_perViewRenderAreaCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("perViewRenderAreaCount")); + /// The [VarHandle] of `pPerViewRenderAreas` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPerViewRenderAreas = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPerViewRenderAreas")); + + /// Creates `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM` with the given segment. + /// @param segment the memory segment + public VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM(segment); } + + /// Creates `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM` + public static VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM alloc(SegmentAllocator allocator) { return new VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM` + public static VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM alloc(SegmentAllocator allocator, long count) { return new VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM sType(@CType("VkStructureType") int value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `perViewRenderAreaCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_perViewRenderAreaCount(MemorySegment segment, long index) { return (int) VH_perViewRenderAreaCount.get(segment, 0L, index); } + /// {@return `perViewRenderAreaCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_perViewRenderAreaCount(MemorySegment segment) { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_perViewRenderAreaCount(segment, 0L); } + /// {@return `perViewRenderAreaCount` at the given index} + /// @param index the index + public @CType("uint32_t") int perViewRenderAreaCountAt(long index) { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_perViewRenderAreaCount(this.segment(), index); } + /// {@return `perViewRenderAreaCount`} + public @CType("uint32_t") int perViewRenderAreaCount() { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_perViewRenderAreaCount(this.segment()); } + /// Sets `perViewRenderAreaCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_perViewRenderAreaCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_perViewRenderAreaCount.set(segment, 0L, index, value); } + /// Sets `perViewRenderAreaCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_perViewRenderAreaCount(MemorySegment segment, @CType("uint32_t") int value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_perViewRenderAreaCount(segment, 0L, value); } + /// Sets `perViewRenderAreaCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM perViewRenderAreaCountAt(long index, @CType("uint32_t") int value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_perViewRenderAreaCount(this.segment(), index, value); return this; } + /// Sets `perViewRenderAreaCount` with the given value. + /// @param value the value + /// @return `this` + public VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM perViewRenderAreaCount(@CType("uint32_t") int value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_perViewRenderAreaCount(this.segment(), value); return this; } + + /// {@return `pPerViewRenderAreas` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pPerViewRenderAreas(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPerViewRenderAreas.get(segment, 0L, index); } + /// {@return `pPerViewRenderAreas`} + /// @param segment the segment of the struct + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pPerViewRenderAreas(MemorySegment segment) { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_pPerViewRenderAreas(segment, 0L); } + /// {@return `pPerViewRenderAreas` at the given index} + /// @param index the index + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pPerViewRenderAreasAt(long index) { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_pPerViewRenderAreas(this.segment(), index); } + /// {@return `pPerViewRenderAreas`} + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pPerViewRenderAreas() { return VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.get_pPerViewRenderAreas(this.segment()); } + /// Sets `pPerViewRenderAreas` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPerViewRenderAreas(MemorySegment segment, long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VH_pPerViewRenderAreas.set(segment, 0L, index, value); } + /// Sets `pPerViewRenderAreas` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPerViewRenderAreas(MemorySegment segment, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_pPerViewRenderAreas(segment, 0L, value); } + /// Sets `pPerViewRenderAreas` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM pPerViewRenderAreasAt(long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_pPerViewRenderAreas(this.segment(), index, value); return this; } + /// Sets `pPerViewRenderAreas` with the given value. + /// @param value the value + /// @return `this` + public VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM pPerViewRenderAreas(@CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.set_pPerViewRenderAreas(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceCubicClampFeaturesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceCubicClampFeaturesQCOM.java new file mode 100644 index 00000000..775c10ae --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceCubicClampFeaturesQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cubicRangeClamp +/// [VarHandle][#VH_cubicRangeClamp] - [Getter][#cubicRangeClamp()] - [Setter][#cubicRangeClamp(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCubicClampFeaturesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 cubicRangeClamp; +/// } VkPhysicalDeviceCubicClampFeaturesQCOM; +/// ``` +public final class VkPhysicalDeviceCubicClampFeaturesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceCubicClampFeaturesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cubicRangeClamp") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cubicRangeClamp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cubicRangeClamp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cubicRangeClamp")); + + /// Creates `VkPhysicalDeviceCubicClampFeaturesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCubicClampFeaturesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCubicClampFeaturesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCubicClampFeaturesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCubicClampFeaturesQCOM(segment); } + + /// Creates `VkPhysicalDeviceCubicClampFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCubicClampFeaturesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCubicClampFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCubicClampFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCubicClampFeaturesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCubicClampFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCubicClampFeaturesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCubicClampFeaturesQCOM` + public static VkPhysicalDeviceCubicClampFeaturesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCubicClampFeaturesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCubicClampFeaturesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCubicClampFeaturesQCOM` + public static VkPhysicalDeviceCubicClampFeaturesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCubicClampFeaturesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCubicClampFeaturesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCubicClampFeaturesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCubicClampFeaturesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCubicClampFeaturesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicClampFeaturesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCubicClampFeaturesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicClampFeaturesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCubicClampFeaturesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCubicClampFeaturesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCubicClampFeaturesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCubicClampFeaturesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCubicClampFeaturesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicClampFeaturesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCubicClampFeaturesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicClampFeaturesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCubicClampFeaturesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `cubicRangeClamp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_cubicRangeClamp(MemorySegment segment, long index) { return (int) VH_cubicRangeClamp.get(segment, 0L, index); } + /// {@return `cubicRangeClamp`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_cubicRangeClamp(MemorySegment segment) { return VkPhysicalDeviceCubicClampFeaturesQCOM.get_cubicRangeClamp(segment, 0L); } + /// {@return `cubicRangeClamp` at the given index} + /// @param index the index + public @CType("VkBool32") int cubicRangeClampAt(long index) { return VkPhysicalDeviceCubicClampFeaturesQCOM.get_cubicRangeClamp(this.segment(), index); } + /// {@return `cubicRangeClamp`} + public @CType("VkBool32") int cubicRangeClamp() { return VkPhysicalDeviceCubicClampFeaturesQCOM.get_cubicRangeClamp(this.segment()); } + /// Sets `cubicRangeClamp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cubicRangeClamp(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_cubicRangeClamp.set(segment, 0L, index, value); } + /// Sets `cubicRangeClamp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cubicRangeClamp(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCubicClampFeaturesQCOM.set_cubicRangeClamp(segment, 0L, value); } + /// Sets `cubicRangeClamp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicClampFeaturesQCOM cubicRangeClampAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCubicClampFeaturesQCOM.set_cubicRangeClamp(this.segment(), index, value); return this; } + /// Sets `cubicRangeClamp` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicClampFeaturesQCOM cubicRangeClamp(@CType("VkBool32") int value) { VkPhysicalDeviceCubicClampFeaturesQCOM.set_cubicRangeClamp(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceCubicWeightsFeaturesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceCubicWeightsFeaturesQCOM.java new file mode 100644 index 00000000..ae5bafaa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceCubicWeightsFeaturesQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### selectableCubicWeights +/// [VarHandle][#VH_selectableCubicWeights] - [Getter][#selectableCubicWeights()] - [Setter][#selectableCubicWeights(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceCubicWeightsFeaturesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 selectableCubicWeights; +/// } VkPhysicalDeviceCubicWeightsFeaturesQCOM; +/// ``` +public final class VkPhysicalDeviceCubicWeightsFeaturesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceCubicWeightsFeaturesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("selectableCubicWeights") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `selectableCubicWeights` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_selectableCubicWeights = LAYOUT.arrayElementVarHandle(PathElement.groupElement("selectableCubicWeights")); + + /// Creates `VkPhysicalDeviceCubicWeightsFeaturesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceCubicWeightsFeaturesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceCubicWeightsFeaturesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCubicWeightsFeaturesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCubicWeightsFeaturesQCOM(segment); } + + /// Creates `VkPhysicalDeviceCubicWeightsFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCubicWeightsFeaturesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCubicWeightsFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceCubicWeightsFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceCubicWeightsFeaturesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceCubicWeightsFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceCubicWeightsFeaturesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceCubicWeightsFeaturesQCOM` + public static VkPhysicalDeviceCubicWeightsFeaturesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceCubicWeightsFeaturesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceCubicWeightsFeaturesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceCubicWeightsFeaturesQCOM` + public static VkPhysicalDeviceCubicWeightsFeaturesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceCubicWeightsFeaturesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceCubicWeightsFeaturesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceCubicWeightsFeaturesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceCubicWeightsFeaturesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceCubicWeightsFeaturesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicWeightsFeaturesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceCubicWeightsFeaturesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicWeightsFeaturesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceCubicWeightsFeaturesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceCubicWeightsFeaturesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceCubicWeightsFeaturesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceCubicWeightsFeaturesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCubicWeightsFeaturesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicWeightsFeaturesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCubicWeightsFeaturesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicWeightsFeaturesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceCubicWeightsFeaturesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `selectableCubicWeights` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_selectableCubicWeights(MemorySegment segment, long index) { return (int) VH_selectableCubicWeights.get(segment, 0L, index); } + /// {@return `selectableCubicWeights`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_selectableCubicWeights(MemorySegment segment) { return VkPhysicalDeviceCubicWeightsFeaturesQCOM.get_selectableCubicWeights(segment, 0L); } + /// {@return `selectableCubicWeights` at the given index} + /// @param index the index + public @CType("VkBool32") int selectableCubicWeightsAt(long index) { return VkPhysicalDeviceCubicWeightsFeaturesQCOM.get_selectableCubicWeights(this.segment(), index); } + /// {@return `selectableCubicWeights`} + public @CType("VkBool32") int selectableCubicWeights() { return VkPhysicalDeviceCubicWeightsFeaturesQCOM.get_selectableCubicWeights(this.segment()); } + /// Sets `selectableCubicWeights` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_selectableCubicWeights(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_selectableCubicWeights.set(segment, 0L, index, value); } + /// Sets `selectableCubicWeights` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_selectableCubicWeights(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceCubicWeightsFeaturesQCOM.set_selectableCubicWeights(segment, 0L, value); } + /// Sets `selectableCubicWeights` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicWeightsFeaturesQCOM selectableCubicWeightsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceCubicWeightsFeaturesQCOM.set_selectableCubicWeights(this.segment(), index, value); return this; } + /// Sets `selectableCubicWeights` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceCubicWeightsFeaturesQCOM selectableCubicWeights(@CType("VkBool32") int value) { VkPhysicalDeviceCubicWeightsFeaturesQCOM.set_selectableCubicWeights(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.java new file mode 100644 index 00000000..f74691f9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fragmentDensityMapOffset +/// [VarHandle][#VH_fragmentDensityMapOffset] - [Getter][#fragmentDensityMapOffset()] - [Setter][#fragmentDensityMapOffset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 fragmentDensityMapOffset; +/// } VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; +/// ``` +public final class VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("fragmentDensityMapOffset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fragmentDensityMapOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentDensityMapOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentDensityMapOffset")); + + /// Creates `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM(segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM` + public static VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM` + public static VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `fragmentDensityMapOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentDensityMapOffset(MemorySegment segment, long index) { return (int) VH_fragmentDensityMapOffset.get(segment, 0L, index); } + /// {@return `fragmentDensityMapOffset`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentDensityMapOffset(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.get_fragmentDensityMapOffset(segment, 0L); } + /// {@return `fragmentDensityMapOffset` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentDensityMapOffsetAt(long index) { return VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.get_fragmentDensityMapOffset(this.segment(), index); } + /// {@return `fragmentDensityMapOffset`} + public @CType("VkBool32") int fragmentDensityMapOffset() { return VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.get_fragmentDensityMapOffset(this.segment()); } + /// Sets `fragmentDensityMapOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentDensityMapOffset(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentDensityMapOffset.set(segment, 0L, index, value); } + /// Sets `fragmentDensityMapOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentDensityMapOffset(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.set_fragmentDensityMapOffset(segment, 0L, value); } + /// Sets `fragmentDensityMapOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM fragmentDensityMapOffsetAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.set_fragmentDensityMapOffset(this.segment(), index, value); return this; } + /// Sets `fragmentDensityMapOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM fragmentDensityMapOffset(@CType("VkBool32") int value) { VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.set_fragmentDensityMapOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.java new file mode 100644 index 00000000..1c6028ef --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fragmentDensityOffsetGranularity +/// [Byte offset][#OFFSET_fragmentDensityOffsetGranularity] - [Memory layout][#ML_fragmentDensityOffsetGranularity] - [Getter][#fragmentDensityOffsetGranularity()] - [Setter][#fragmentDensityOffsetGranularity(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkExtent2D fragmentDensityOffsetGranularity; +/// } VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; +/// ``` +public final class VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("fragmentDensityOffsetGranularity") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `fragmentDensityOffsetGranularity`. + public static final long OFFSET_fragmentDensityOffsetGranularity = LAYOUT.byteOffset(PathElement.groupElement("fragmentDensityOffsetGranularity")); + /// The memory layout of `fragmentDensityOffsetGranularity`. + public static final MemoryLayout ML_fragmentDensityOffsetGranularity = LAYOUT.select(PathElement.groupElement("fragmentDensityOffsetGranularity")); + + /// Creates `VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM(segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM` + public static VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM` + public static VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `fragmentDensityOffsetGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_fragmentDensityOffsetGranularity(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_fragmentDensityOffsetGranularity, index), ML_fragmentDensityOffsetGranularity); } + /// {@return `fragmentDensityOffsetGranularity`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_fragmentDensityOffsetGranularity(MemorySegment segment) { return VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.get_fragmentDensityOffsetGranularity(segment, 0L); } + /// {@return `fragmentDensityOffsetGranularity` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment fragmentDensityOffsetGranularityAt(long index) { return VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.get_fragmentDensityOffsetGranularity(this.segment(), index); } + /// {@return `fragmentDensityOffsetGranularity`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment fragmentDensityOffsetGranularity() { return VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.get_fragmentDensityOffsetGranularity(this.segment()); } + /// Sets `fragmentDensityOffsetGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentDensityOffsetGranularity(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_fragmentDensityOffsetGranularity, index), ML_fragmentDensityOffsetGranularity.byteSize()); } + /// Sets `fragmentDensityOffsetGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentDensityOffsetGranularity(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.set_fragmentDensityOffsetGranularity(segment, 0L, value); } + /// Sets `fragmentDensityOffsetGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM fragmentDensityOffsetGranularityAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.set_fragmentDensityOffsetGranularity(this.segment(), index, value); return this; } + /// Sets `fragmentDensityOffsetGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM fragmentDensityOffsetGranularity(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.set_fragmentDensityOffsetGranularity(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessing2FeaturesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessing2FeaturesQCOM.java new file mode 100644 index 00000000..239a0214 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessing2FeaturesQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### textureBlockMatch2 +/// [VarHandle][#VH_textureBlockMatch2] - [Getter][#textureBlockMatch2()] - [Setter][#textureBlockMatch2(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageProcessing2FeaturesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 textureBlockMatch2; +/// } VkPhysicalDeviceImageProcessing2FeaturesQCOM; +/// ``` +public final class VkPhysicalDeviceImageProcessing2FeaturesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceImageProcessing2FeaturesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("textureBlockMatch2") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `textureBlockMatch2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_textureBlockMatch2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("textureBlockMatch2")); + + /// Creates `VkPhysicalDeviceImageProcessing2FeaturesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageProcessing2FeaturesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageProcessing2FeaturesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessing2FeaturesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessing2FeaturesQCOM(segment); } + + /// Creates `VkPhysicalDeviceImageProcessing2FeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessing2FeaturesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessing2FeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageProcessing2FeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessing2FeaturesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessing2FeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageProcessing2FeaturesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageProcessing2FeaturesQCOM` + public static VkPhysicalDeviceImageProcessing2FeaturesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageProcessing2FeaturesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageProcessing2FeaturesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageProcessing2FeaturesQCOM` + public static VkPhysicalDeviceImageProcessing2FeaturesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageProcessing2FeaturesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageProcessing2FeaturesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageProcessing2FeaturesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageProcessing2FeaturesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessing2FeaturesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2FeaturesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessing2FeaturesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2FeaturesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessing2FeaturesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageProcessing2FeaturesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageProcessing2FeaturesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageProcessing2FeaturesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessing2FeaturesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2FeaturesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessing2FeaturesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2FeaturesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessing2FeaturesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `textureBlockMatch2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_textureBlockMatch2(MemorySegment segment, long index) { return (int) VH_textureBlockMatch2.get(segment, 0L, index); } + /// {@return `textureBlockMatch2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_textureBlockMatch2(MemorySegment segment) { return VkPhysicalDeviceImageProcessing2FeaturesQCOM.get_textureBlockMatch2(segment, 0L); } + /// {@return `textureBlockMatch2` at the given index} + /// @param index the index + public @CType("VkBool32") int textureBlockMatch2At(long index) { return VkPhysicalDeviceImageProcessing2FeaturesQCOM.get_textureBlockMatch2(this.segment(), index); } + /// {@return `textureBlockMatch2`} + public @CType("VkBool32") int textureBlockMatch2() { return VkPhysicalDeviceImageProcessing2FeaturesQCOM.get_textureBlockMatch2(this.segment()); } + /// Sets `textureBlockMatch2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_textureBlockMatch2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_textureBlockMatch2.set(segment, 0L, index, value); } + /// Sets `textureBlockMatch2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_textureBlockMatch2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImageProcessing2FeaturesQCOM.set_textureBlockMatch2(segment, 0L, value); } + /// Sets `textureBlockMatch2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2FeaturesQCOM textureBlockMatch2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImageProcessing2FeaturesQCOM.set_textureBlockMatch2(this.segment(), index, value); return this; } + /// Sets `textureBlockMatch2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2FeaturesQCOM textureBlockMatch2(@CType("VkBool32") int value) { VkPhysicalDeviceImageProcessing2FeaturesQCOM.set_textureBlockMatch2(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessing2PropertiesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessing2PropertiesQCOM.java new file mode 100644 index 00000000..e3f7bc04 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessing2PropertiesQCOM.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxBlockMatchWindow +/// [Byte offset][#OFFSET_maxBlockMatchWindow] - [Memory layout][#ML_maxBlockMatchWindow] - [Getter][#maxBlockMatchWindow()] - [Setter][#maxBlockMatchWindow(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageProcessing2PropertiesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkExtent2D maxBlockMatchWindow; +/// } VkPhysicalDeviceImageProcessing2PropertiesQCOM; +/// ``` +public final class VkPhysicalDeviceImageProcessing2PropertiesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceImageProcessing2PropertiesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxBlockMatchWindow") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `maxBlockMatchWindow`. + public static final long OFFSET_maxBlockMatchWindow = LAYOUT.byteOffset(PathElement.groupElement("maxBlockMatchWindow")); + /// The memory layout of `maxBlockMatchWindow`. + public static final MemoryLayout ML_maxBlockMatchWindow = LAYOUT.select(PathElement.groupElement("maxBlockMatchWindow")); + + /// Creates `VkPhysicalDeviceImageProcessing2PropertiesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageProcessing2PropertiesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageProcessing2PropertiesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessing2PropertiesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessing2PropertiesQCOM(segment); } + + /// Creates `VkPhysicalDeviceImageProcessing2PropertiesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessing2PropertiesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessing2PropertiesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageProcessing2PropertiesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessing2PropertiesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessing2PropertiesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageProcessing2PropertiesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageProcessing2PropertiesQCOM` + public static VkPhysicalDeviceImageProcessing2PropertiesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageProcessing2PropertiesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageProcessing2PropertiesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageProcessing2PropertiesQCOM` + public static VkPhysicalDeviceImageProcessing2PropertiesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageProcessing2PropertiesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageProcessing2PropertiesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageProcessing2PropertiesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageProcessing2PropertiesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessing2PropertiesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2PropertiesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessing2PropertiesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2PropertiesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessing2PropertiesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageProcessing2PropertiesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageProcessing2PropertiesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageProcessing2PropertiesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessing2PropertiesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2PropertiesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessing2PropertiesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2PropertiesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessing2PropertiesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `maxBlockMatchWindow` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxBlockMatchWindow(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxBlockMatchWindow, index), ML_maxBlockMatchWindow); } + /// {@return `maxBlockMatchWindow`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxBlockMatchWindow(MemorySegment segment) { return VkPhysicalDeviceImageProcessing2PropertiesQCOM.get_maxBlockMatchWindow(segment, 0L); } + /// {@return `maxBlockMatchWindow` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxBlockMatchWindowAt(long index) { return VkPhysicalDeviceImageProcessing2PropertiesQCOM.get_maxBlockMatchWindow(this.segment(), index); } + /// {@return `maxBlockMatchWindow`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxBlockMatchWindow() { return VkPhysicalDeviceImageProcessing2PropertiesQCOM.get_maxBlockMatchWindow(this.segment()); } + /// Sets `maxBlockMatchWindow` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBlockMatchWindow(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxBlockMatchWindow, index), ML_maxBlockMatchWindow.byteSize()); } + /// Sets `maxBlockMatchWindow` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBlockMatchWindow(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessing2PropertiesQCOM.set_maxBlockMatchWindow(segment, 0L, value); } + /// Sets `maxBlockMatchWindow` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2PropertiesQCOM maxBlockMatchWindowAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessing2PropertiesQCOM.set_maxBlockMatchWindow(this.segment(), index, value); return this; } + /// Sets `maxBlockMatchWindow` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessing2PropertiesQCOM maxBlockMatchWindow(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessing2PropertiesQCOM.set_maxBlockMatchWindow(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessingFeaturesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessingFeaturesQCOM.java new file mode 100644 index 00000000..e3493a43 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessingFeaturesQCOM.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### textureSampleWeighted +/// [VarHandle][#VH_textureSampleWeighted] - [Getter][#textureSampleWeighted()] - [Setter][#textureSampleWeighted(int)] +/// ### textureBoxFilter +/// [VarHandle][#VH_textureBoxFilter] - [Getter][#textureBoxFilter()] - [Setter][#textureBoxFilter(int)] +/// ### textureBlockMatch +/// [VarHandle][#VH_textureBlockMatch] - [Getter][#textureBlockMatch()] - [Setter][#textureBlockMatch(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageProcessingFeaturesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 textureSampleWeighted; +/// VkBool32 textureBoxFilter; +/// VkBool32 textureBlockMatch; +/// } VkPhysicalDeviceImageProcessingFeaturesQCOM; +/// ``` +public final class VkPhysicalDeviceImageProcessingFeaturesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceImageProcessingFeaturesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("textureSampleWeighted"), + ValueLayout.JAVA_INT.withName("textureBoxFilter"), + ValueLayout.JAVA_INT.withName("textureBlockMatch") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `textureSampleWeighted` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_textureSampleWeighted = LAYOUT.arrayElementVarHandle(PathElement.groupElement("textureSampleWeighted")); + /// The [VarHandle] of `textureBoxFilter` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_textureBoxFilter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("textureBoxFilter")); + /// The [VarHandle] of `textureBlockMatch` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_textureBlockMatch = LAYOUT.arrayElementVarHandle(PathElement.groupElement("textureBlockMatch")); + + /// Creates `VkPhysicalDeviceImageProcessingFeaturesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageProcessingFeaturesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageProcessingFeaturesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessingFeaturesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessingFeaturesQCOM(segment); } + + /// Creates `VkPhysicalDeviceImageProcessingFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessingFeaturesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessingFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageProcessingFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessingFeaturesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessingFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageProcessingFeaturesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageProcessingFeaturesQCOM` + public static VkPhysicalDeviceImageProcessingFeaturesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageProcessingFeaturesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageProcessingFeaturesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageProcessingFeaturesQCOM` + public static VkPhysicalDeviceImageProcessingFeaturesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageProcessingFeaturesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingFeaturesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingFeaturesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingFeaturesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingFeaturesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `textureSampleWeighted` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_textureSampleWeighted(MemorySegment segment, long index) { return (int) VH_textureSampleWeighted.get(segment, 0L, index); } + /// {@return `textureSampleWeighted`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_textureSampleWeighted(MemorySegment segment) { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_textureSampleWeighted(segment, 0L); } + /// {@return `textureSampleWeighted` at the given index} + /// @param index the index + public @CType("VkBool32") int textureSampleWeightedAt(long index) { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_textureSampleWeighted(this.segment(), index); } + /// {@return `textureSampleWeighted`} + public @CType("VkBool32") int textureSampleWeighted() { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_textureSampleWeighted(this.segment()); } + /// Sets `textureSampleWeighted` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_textureSampleWeighted(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_textureSampleWeighted.set(segment, 0L, index, value); } + /// Sets `textureSampleWeighted` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_textureSampleWeighted(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_textureSampleWeighted(segment, 0L, value); } + /// Sets `textureSampleWeighted` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingFeaturesQCOM textureSampleWeightedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_textureSampleWeighted(this.segment(), index, value); return this; } + /// Sets `textureSampleWeighted` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingFeaturesQCOM textureSampleWeighted(@CType("VkBool32") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_textureSampleWeighted(this.segment(), value); return this; } + + /// {@return `textureBoxFilter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_textureBoxFilter(MemorySegment segment, long index) { return (int) VH_textureBoxFilter.get(segment, 0L, index); } + /// {@return `textureBoxFilter`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_textureBoxFilter(MemorySegment segment) { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_textureBoxFilter(segment, 0L); } + /// {@return `textureBoxFilter` at the given index} + /// @param index the index + public @CType("VkBool32") int textureBoxFilterAt(long index) { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_textureBoxFilter(this.segment(), index); } + /// {@return `textureBoxFilter`} + public @CType("VkBool32") int textureBoxFilter() { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_textureBoxFilter(this.segment()); } + /// Sets `textureBoxFilter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_textureBoxFilter(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_textureBoxFilter.set(segment, 0L, index, value); } + /// Sets `textureBoxFilter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_textureBoxFilter(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_textureBoxFilter(segment, 0L, value); } + /// Sets `textureBoxFilter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingFeaturesQCOM textureBoxFilterAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_textureBoxFilter(this.segment(), index, value); return this; } + /// Sets `textureBoxFilter` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingFeaturesQCOM textureBoxFilter(@CType("VkBool32") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_textureBoxFilter(this.segment(), value); return this; } + + /// {@return `textureBlockMatch` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_textureBlockMatch(MemorySegment segment, long index) { return (int) VH_textureBlockMatch.get(segment, 0L, index); } + /// {@return `textureBlockMatch`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_textureBlockMatch(MemorySegment segment) { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_textureBlockMatch(segment, 0L); } + /// {@return `textureBlockMatch` at the given index} + /// @param index the index + public @CType("VkBool32") int textureBlockMatchAt(long index) { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_textureBlockMatch(this.segment(), index); } + /// {@return `textureBlockMatch`} + public @CType("VkBool32") int textureBlockMatch() { return VkPhysicalDeviceImageProcessingFeaturesQCOM.get_textureBlockMatch(this.segment()); } + /// Sets `textureBlockMatch` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_textureBlockMatch(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_textureBlockMatch.set(segment, 0L, index, value); } + /// Sets `textureBlockMatch` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_textureBlockMatch(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_textureBlockMatch(segment, 0L, value); } + /// Sets `textureBlockMatch` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingFeaturesQCOM textureBlockMatchAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_textureBlockMatch(this.segment(), index, value); return this; } + /// Sets `textureBlockMatch` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingFeaturesQCOM textureBlockMatch(@CType("VkBool32") int value) { VkPhysicalDeviceImageProcessingFeaturesQCOM.set_textureBlockMatch(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessingPropertiesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessingPropertiesQCOM.java new file mode 100644 index 00000000..445adc92 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceImageProcessingPropertiesQCOM.java @@ -0,0 +1,302 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxWeightFilterPhases +/// [VarHandle][#VH_maxWeightFilterPhases] - [Getter][#maxWeightFilterPhases()] - [Setter][#maxWeightFilterPhases(int)] +/// ### maxWeightFilterDimension +/// [Byte offset][#OFFSET_maxWeightFilterDimension] - [Memory layout][#ML_maxWeightFilterDimension] - [Getter][#maxWeightFilterDimension()] - [Setter][#maxWeightFilterDimension(java.lang.foreign.MemorySegment)] +/// ### maxBlockMatchRegion +/// [Byte offset][#OFFSET_maxBlockMatchRegion] - [Memory layout][#ML_maxBlockMatchRegion] - [Getter][#maxBlockMatchRegion()] - [Setter][#maxBlockMatchRegion(java.lang.foreign.MemorySegment)] +/// ### maxBoxFilterBlockSize +/// [Byte offset][#OFFSET_maxBoxFilterBlockSize] - [Memory layout][#ML_maxBoxFilterBlockSize] - [Getter][#maxBoxFilterBlockSize()] - [Setter][#maxBoxFilterBlockSize(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageProcessingPropertiesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxWeightFilterPhases; +/// VkExtent2D maxWeightFilterDimension; +/// VkExtent2D maxBlockMatchRegion; +/// VkExtent2D maxBoxFilterBlockSize; +/// } VkPhysicalDeviceImageProcessingPropertiesQCOM; +/// ``` +public final class VkPhysicalDeviceImageProcessingPropertiesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceImageProcessingPropertiesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxWeightFilterPhases"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxWeightFilterDimension"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxBlockMatchRegion"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("maxBoxFilterBlockSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxWeightFilterPhases` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxWeightFilterPhases = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxWeightFilterPhases")); + /// The byte offset of `maxWeightFilterDimension`. + public static final long OFFSET_maxWeightFilterDimension = LAYOUT.byteOffset(PathElement.groupElement("maxWeightFilterDimension")); + /// The memory layout of `maxWeightFilterDimension`. + public static final MemoryLayout ML_maxWeightFilterDimension = LAYOUT.select(PathElement.groupElement("maxWeightFilterDimension")); + /// The byte offset of `maxBlockMatchRegion`. + public static final long OFFSET_maxBlockMatchRegion = LAYOUT.byteOffset(PathElement.groupElement("maxBlockMatchRegion")); + /// The memory layout of `maxBlockMatchRegion`. + public static final MemoryLayout ML_maxBlockMatchRegion = LAYOUT.select(PathElement.groupElement("maxBlockMatchRegion")); + /// The byte offset of `maxBoxFilterBlockSize`. + public static final long OFFSET_maxBoxFilterBlockSize = LAYOUT.byteOffset(PathElement.groupElement("maxBoxFilterBlockSize")); + /// The memory layout of `maxBoxFilterBlockSize`. + public static final MemoryLayout ML_maxBoxFilterBlockSize = LAYOUT.select(PathElement.groupElement("maxBoxFilterBlockSize")); + + /// Creates `VkPhysicalDeviceImageProcessingPropertiesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageProcessingPropertiesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageProcessingPropertiesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessingPropertiesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessingPropertiesQCOM(segment); } + + /// Creates `VkPhysicalDeviceImageProcessingPropertiesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessingPropertiesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessingPropertiesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageProcessingPropertiesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageProcessingPropertiesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageProcessingPropertiesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageProcessingPropertiesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageProcessingPropertiesQCOM` + public static VkPhysicalDeviceImageProcessingPropertiesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageProcessingPropertiesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageProcessingPropertiesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageProcessingPropertiesQCOM` + public static VkPhysicalDeviceImageProcessingPropertiesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageProcessingPropertiesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `maxWeightFilterPhases` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxWeightFilterPhases(MemorySegment segment, long index) { return (int) VH_maxWeightFilterPhases.get(segment, 0L, index); } + /// {@return `maxWeightFilterPhases`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxWeightFilterPhases(MemorySegment segment) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxWeightFilterPhases(segment, 0L); } + /// {@return `maxWeightFilterPhases` at the given index} + /// @param index the index + public @CType("uint32_t") int maxWeightFilterPhasesAt(long index) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxWeightFilterPhases(this.segment(), index); } + /// {@return `maxWeightFilterPhases`} + public @CType("uint32_t") int maxWeightFilterPhases() { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxWeightFilterPhases(this.segment()); } + /// Sets `maxWeightFilterPhases` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxWeightFilterPhases(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxWeightFilterPhases.set(segment, 0L, index, value); } + /// Sets `maxWeightFilterPhases` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxWeightFilterPhases(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxWeightFilterPhases(segment, 0L, value); } + /// Sets `maxWeightFilterPhases` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM maxWeightFilterPhasesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxWeightFilterPhases(this.segment(), index, value); return this; } + /// Sets `maxWeightFilterPhases` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM maxWeightFilterPhases(@CType("uint32_t") int value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxWeightFilterPhases(this.segment(), value); return this; } + + /// {@return `maxWeightFilterDimension` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxWeightFilterDimension(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxWeightFilterDimension, index), ML_maxWeightFilterDimension); } + /// {@return `maxWeightFilterDimension`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxWeightFilterDimension(MemorySegment segment) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxWeightFilterDimension(segment, 0L); } + /// {@return `maxWeightFilterDimension` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxWeightFilterDimensionAt(long index) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxWeightFilterDimension(this.segment(), index); } + /// {@return `maxWeightFilterDimension`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxWeightFilterDimension() { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxWeightFilterDimension(this.segment()); } + /// Sets `maxWeightFilterDimension` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxWeightFilterDimension(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxWeightFilterDimension, index), ML_maxWeightFilterDimension.byteSize()); } + /// Sets `maxWeightFilterDimension` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxWeightFilterDimension(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxWeightFilterDimension(segment, 0L, value); } + /// Sets `maxWeightFilterDimension` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM maxWeightFilterDimensionAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxWeightFilterDimension(this.segment(), index, value); return this; } + /// Sets `maxWeightFilterDimension` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM maxWeightFilterDimension(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxWeightFilterDimension(this.segment(), value); return this; } + + /// {@return `maxBlockMatchRegion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxBlockMatchRegion(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxBlockMatchRegion, index), ML_maxBlockMatchRegion); } + /// {@return `maxBlockMatchRegion`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxBlockMatchRegion(MemorySegment segment) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxBlockMatchRegion(segment, 0L); } + /// {@return `maxBlockMatchRegion` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxBlockMatchRegionAt(long index) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxBlockMatchRegion(this.segment(), index); } + /// {@return `maxBlockMatchRegion`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxBlockMatchRegion() { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxBlockMatchRegion(this.segment()); } + /// Sets `maxBlockMatchRegion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBlockMatchRegion(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxBlockMatchRegion, index), ML_maxBlockMatchRegion.byteSize()); } + /// Sets `maxBlockMatchRegion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBlockMatchRegion(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxBlockMatchRegion(segment, 0L, value); } + /// Sets `maxBlockMatchRegion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM maxBlockMatchRegionAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxBlockMatchRegion(this.segment(), index, value); return this; } + /// Sets `maxBlockMatchRegion` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM maxBlockMatchRegion(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxBlockMatchRegion(this.segment(), value); return this; } + + /// {@return `maxBoxFilterBlockSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxBoxFilterBlockSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxBoxFilterBlockSize, index), ML_maxBoxFilterBlockSize); } + /// {@return `maxBoxFilterBlockSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_maxBoxFilterBlockSize(MemorySegment segment) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxBoxFilterBlockSize(segment, 0L); } + /// {@return `maxBoxFilterBlockSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxBoxFilterBlockSizeAt(long index) { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxBoxFilterBlockSize(this.segment(), index); } + /// {@return `maxBoxFilterBlockSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment maxBoxFilterBlockSize() { return VkPhysicalDeviceImageProcessingPropertiesQCOM.get_maxBoxFilterBlockSize(this.segment()); } + /// Sets `maxBoxFilterBlockSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBoxFilterBlockSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxBoxFilterBlockSize, index), ML_maxBoxFilterBlockSize.byteSize()); } + /// Sets `maxBoxFilterBlockSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBoxFilterBlockSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxBoxFilterBlockSize(segment, 0L, value); } + /// Sets `maxBoxFilterBlockSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM maxBoxFilterBlockSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxBoxFilterBlockSize(this.segment(), index, value); return this; } + /// Sets `maxBoxFilterBlockSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageProcessingPropertiesQCOM maxBoxFilterBlockSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageProcessingPropertiesQCOM.set_maxBoxFilterBlockSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.java new file mode 100644 index 00000000..eabe9274 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### multiviewPerViewRenderAreas +/// [VarHandle][#VH_multiviewPerViewRenderAreas] - [Getter][#multiviewPerViewRenderAreas()] - [Setter][#multiviewPerViewRenderAreas(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 multiviewPerViewRenderAreas; +/// } VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM; +/// ``` +public final class VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("multiviewPerViewRenderAreas") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `multiviewPerViewRenderAreas` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiviewPerViewRenderAreas = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiviewPerViewRenderAreas")); + + /// Creates `VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM(segment); } + + /// Creates `VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM` + public static VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM` + public static VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `multiviewPerViewRenderAreas` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiviewPerViewRenderAreas(MemorySegment segment, long index) { return (int) VH_multiviewPerViewRenderAreas.get(segment, 0L, index); } + /// {@return `multiviewPerViewRenderAreas`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiviewPerViewRenderAreas(MemorySegment segment) { return VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.get_multiviewPerViewRenderAreas(segment, 0L); } + /// {@return `multiviewPerViewRenderAreas` at the given index} + /// @param index the index + public @CType("VkBool32") int multiviewPerViewRenderAreasAt(long index) { return VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.get_multiviewPerViewRenderAreas(this.segment(), index); } + /// {@return `multiviewPerViewRenderAreas`} + public @CType("VkBool32") int multiviewPerViewRenderAreas() { return VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.get_multiviewPerViewRenderAreas(this.segment()); } + /// Sets `multiviewPerViewRenderAreas` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiviewPerViewRenderAreas(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiviewPerViewRenderAreas.set(segment, 0L, index, value); } + /// Sets `multiviewPerViewRenderAreas` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiviewPerViewRenderAreas(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.set_multiviewPerViewRenderAreas(segment, 0L, value); } + /// Sets `multiviewPerViewRenderAreas` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM multiviewPerViewRenderAreasAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.set_multiviewPerViewRenderAreas(this.segment(), index, value); return this; } + /// Sets `multiviewPerViewRenderAreas` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM multiviewPerViewRenderAreas(@CType("VkBool32") int value) { VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.set_multiviewPerViewRenderAreas(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.java new file mode 100644 index 00000000..82cd5515 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### multiviewPerViewViewports +/// [VarHandle][#VH_multiviewPerViewViewports] - [Getter][#multiviewPerViewViewports()] - [Setter][#multiviewPerViewViewports(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 multiviewPerViewViewports; +/// } VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM; +/// ``` +public final class VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("multiviewPerViewViewports") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `multiviewPerViewViewports` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiviewPerViewViewports = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiviewPerViewViewports")); + + /// Creates `VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM(segment); } + + /// Creates `VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM` + public static VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM` + public static VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `multiviewPerViewViewports` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiviewPerViewViewports(MemorySegment segment, long index) { return (int) VH_multiviewPerViewViewports.get(segment, 0L, index); } + /// {@return `multiviewPerViewViewports`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiviewPerViewViewports(MemorySegment segment) { return VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.get_multiviewPerViewViewports(segment, 0L); } + /// {@return `multiviewPerViewViewports` at the given index} + /// @param index the index + public @CType("VkBool32") int multiviewPerViewViewportsAt(long index) { return VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.get_multiviewPerViewViewports(this.segment(), index); } + /// {@return `multiviewPerViewViewports`} + public @CType("VkBool32") int multiviewPerViewViewports() { return VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.get_multiviewPerViewViewports(this.segment()); } + /// Sets `multiviewPerViewViewports` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiviewPerViewViewports(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiviewPerViewViewports.set(segment, 0L, index, value); } + /// Sets `multiviewPerViewViewports` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiviewPerViewViewports(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.set_multiviewPerViewViewports(segment, 0L, value); } + /// Sets `multiviewPerViewViewports` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM multiviewPerViewViewportsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.set_multiviewPerViewViewports(this.segment(), index, value); return this; } + /// Sets `multiviewPerViewViewports` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM multiviewPerViewViewports(@CType("VkBool32") int value) { VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.set_multiviewPerViewViewports(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceTilePropertiesFeaturesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceTilePropertiesFeaturesQCOM.java new file mode 100644 index 00000000..cda48505 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceTilePropertiesFeaturesQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### tileProperties +/// [VarHandle][#VH_tileProperties] - [Getter][#tileProperties()] - [Setter][#tileProperties(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceTilePropertiesFeaturesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 tileProperties; +/// } VkPhysicalDeviceTilePropertiesFeaturesQCOM; +/// ``` +public final class VkPhysicalDeviceTilePropertiesFeaturesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceTilePropertiesFeaturesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("tileProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `tileProperties` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tileProperties = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tileProperties")); + + /// Creates `VkPhysicalDeviceTilePropertiesFeaturesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceTilePropertiesFeaturesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceTilePropertiesFeaturesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTilePropertiesFeaturesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTilePropertiesFeaturesQCOM(segment); } + + /// Creates `VkPhysicalDeviceTilePropertiesFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTilePropertiesFeaturesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTilePropertiesFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceTilePropertiesFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTilePropertiesFeaturesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTilePropertiesFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceTilePropertiesFeaturesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceTilePropertiesFeaturesQCOM` + public static VkPhysicalDeviceTilePropertiesFeaturesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceTilePropertiesFeaturesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceTilePropertiesFeaturesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceTilePropertiesFeaturesQCOM` + public static VkPhysicalDeviceTilePropertiesFeaturesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceTilePropertiesFeaturesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceTilePropertiesFeaturesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceTilePropertiesFeaturesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceTilePropertiesFeaturesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceTilePropertiesFeaturesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTilePropertiesFeaturesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceTilePropertiesFeaturesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTilePropertiesFeaturesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceTilePropertiesFeaturesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceTilePropertiesFeaturesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceTilePropertiesFeaturesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceTilePropertiesFeaturesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTilePropertiesFeaturesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTilePropertiesFeaturesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTilePropertiesFeaturesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTilePropertiesFeaturesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTilePropertiesFeaturesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `tileProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_tileProperties(MemorySegment segment, long index) { return (int) VH_tileProperties.get(segment, 0L, index); } + /// {@return `tileProperties`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_tileProperties(MemorySegment segment) { return VkPhysicalDeviceTilePropertiesFeaturesQCOM.get_tileProperties(segment, 0L); } + /// {@return `tileProperties` at the given index} + /// @param index the index + public @CType("VkBool32") int tilePropertiesAt(long index) { return VkPhysicalDeviceTilePropertiesFeaturesQCOM.get_tileProperties(this.segment(), index); } + /// {@return `tileProperties`} + public @CType("VkBool32") int tileProperties() { return VkPhysicalDeviceTilePropertiesFeaturesQCOM.get_tileProperties(this.segment()); } + /// Sets `tileProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tileProperties(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_tileProperties.set(segment, 0L, index, value); } + /// Sets `tileProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tileProperties(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTilePropertiesFeaturesQCOM.set_tileProperties(segment, 0L, value); } + /// Sets `tileProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTilePropertiesFeaturesQCOM tilePropertiesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTilePropertiesFeaturesQCOM.set_tileProperties(this.segment(), index, value); return this; } + /// Sets `tileProperties` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTilePropertiesFeaturesQCOM tileProperties(@CType("VkBool32") int value) { VkPhysicalDeviceTilePropertiesFeaturesQCOM.set_tileProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.java new file mode 100644 index 00000000..d1e08904 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### ycbcrDegamma +/// [VarHandle][#VH_ycbcrDegamma] - [Getter][#ycbcrDegamma()] - [Setter][#ycbcrDegamma(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceYcbcrDegammaFeaturesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 ycbcrDegamma; +/// } VkPhysicalDeviceYcbcrDegammaFeaturesQCOM; +/// ``` +public final class VkPhysicalDeviceYcbcrDegammaFeaturesQCOM extends Struct { + /// The struct layout of `VkPhysicalDeviceYcbcrDegammaFeaturesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("ycbcrDegamma") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `ycbcrDegamma` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ycbcrDegamma = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ycbcrDegamma")); + + /// Creates `VkPhysicalDeviceYcbcrDegammaFeaturesQCOM` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceYcbcrDegammaFeaturesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceYcbcrDegammaFeaturesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceYcbcrDegammaFeaturesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceYcbcrDegammaFeaturesQCOM(segment); } + + /// Creates `VkPhysicalDeviceYcbcrDegammaFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceYcbcrDegammaFeaturesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceYcbcrDegammaFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceYcbcrDegammaFeaturesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceYcbcrDegammaFeaturesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceYcbcrDegammaFeaturesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceYcbcrDegammaFeaturesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceYcbcrDegammaFeaturesQCOM` + public static VkPhysicalDeviceYcbcrDegammaFeaturesQCOM alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceYcbcrDegammaFeaturesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceYcbcrDegammaFeaturesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceYcbcrDegammaFeaturesQCOM` + public static VkPhysicalDeviceYcbcrDegammaFeaturesQCOM alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceYcbcrDegammaFeaturesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrDegammaFeaturesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrDegammaFeaturesQCOM sType(@CType("VkStructureType") int value) { VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrDegammaFeaturesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrDegammaFeaturesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `ycbcrDegamma` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_ycbcrDegamma(MemorySegment segment, long index) { return (int) VH_ycbcrDegamma.get(segment, 0L, index); } + /// {@return `ycbcrDegamma`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_ycbcrDegamma(MemorySegment segment) { return VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.get_ycbcrDegamma(segment, 0L); } + /// {@return `ycbcrDegamma` at the given index} + /// @param index the index + public @CType("VkBool32") int ycbcrDegammaAt(long index) { return VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.get_ycbcrDegamma(this.segment(), index); } + /// {@return `ycbcrDegamma`} + public @CType("VkBool32") int ycbcrDegamma() { return VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.get_ycbcrDegamma(this.segment()); } + /// Sets `ycbcrDegamma` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ycbcrDegamma(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_ycbcrDegamma.set(segment, 0L, index, value); } + /// Sets `ycbcrDegamma` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ycbcrDegamma(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.set_ycbcrDegamma(segment, 0L, value); } + /// Sets `ycbcrDegamma` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrDegammaFeaturesQCOM ycbcrDegammaAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.set_ycbcrDegamma(this.segment(), index, value); return this; } + /// Sets `ycbcrDegamma` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceYcbcrDegammaFeaturesQCOM ycbcrDegamma(@CType("VkBool32") int value) { VkPhysicalDeviceYcbcrDegammaFeaturesQCOM.set_ycbcrDegamma(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkRenderPassTransformBeginInfoQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkRenderPassTransformBeginInfoQCOM.java new file mode 100644 index 00000000..891f01c8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkRenderPassTransformBeginInfoQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### transform +/// [VarHandle][#VH_transform] - [Getter][#transform()] - [Setter][#transform(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassTransformBeginInfoQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkSurfaceTransformFlagBitsKHR transform; +/// } VkRenderPassTransformBeginInfoQCOM; +/// ``` +public final class VkRenderPassTransformBeginInfoQCOM extends Struct { + /// The struct layout of `VkRenderPassTransformBeginInfoQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("transform") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `transform` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transform = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transform")); + + /// Creates `VkRenderPassTransformBeginInfoQCOM` with the given segment. + /// @param segment the memory segment + public VkRenderPassTransformBeginInfoQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassTransformBeginInfoQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassTransformBeginInfoQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassTransformBeginInfoQCOM(segment); } + + /// Creates `VkRenderPassTransformBeginInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassTransformBeginInfoQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassTransformBeginInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassTransformBeginInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassTransformBeginInfoQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassTransformBeginInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassTransformBeginInfoQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassTransformBeginInfoQCOM` + public static VkRenderPassTransformBeginInfoQCOM alloc(SegmentAllocator allocator) { return new VkRenderPassTransformBeginInfoQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassTransformBeginInfoQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassTransformBeginInfoQCOM` + public static VkRenderPassTransformBeginInfoQCOM alloc(SegmentAllocator allocator, long count) { return new VkRenderPassTransformBeginInfoQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassTransformBeginInfoQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassTransformBeginInfoQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassTransformBeginInfoQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassTransformBeginInfoQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassTransformBeginInfoQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassTransformBeginInfoQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassTransformBeginInfoQCOM sType(@CType("VkStructureType") int value) { VkRenderPassTransformBeginInfoQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassTransformBeginInfoQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassTransformBeginInfoQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassTransformBeginInfoQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkRenderPassTransformBeginInfoQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassTransformBeginInfoQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkRenderPassTransformBeginInfoQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassTransformBeginInfoQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkRenderPassTransformBeginInfoQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `transform` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_transform(MemorySegment segment, long index) { return (int) VH_transform.get(segment, 0L, index); } + /// {@return `transform`} + /// @param segment the segment of the struct + public static @CType("VkSurfaceTransformFlagBitsKHR") int get_transform(MemorySegment segment) { return VkRenderPassTransformBeginInfoQCOM.get_transform(segment, 0L); } + /// {@return `transform` at the given index} + /// @param index the index + public @CType("VkSurfaceTransformFlagBitsKHR") int transformAt(long index) { return VkRenderPassTransformBeginInfoQCOM.get_transform(this.segment(), index); } + /// {@return `transform`} + public @CType("VkSurfaceTransformFlagBitsKHR") int transform() { return VkRenderPassTransformBeginInfoQCOM.get_transform(this.segment()); } + /// Sets `transform` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transform(MemorySegment segment, long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VH_transform.set(segment, 0L, index, value); } + /// Sets `transform` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transform(MemorySegment segment, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkRenderPassTransformBeginInfoQCOM.set_transform(segment, 0L, value); } + /// Sets `transform` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassTransformBeginInfoQCOM transformAt(long index, @CType("VkSurfaceTransformFlagBitsKHR") int value) { VkRenderPassTransformBeginInfoQCOM.set_transform(this.segment(), index, value); return this; } + /// Sets `transform` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassTransformBeginInfoQCOM transform(@CType("VkSurfaceTransformFlagBitsKHR") int value) { VkRenderPassTransformBeginInfoQCOM.set_transform(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSamplerBlockMatchWindowCreateInfoQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSamplerBlockMatchWindowCreateInfoQCOM.java new file mode 100644 index 00000000..50ea4c1f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSamplerBlockMatchWindowCreateInfoQCOM.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### windowExtent +/// [Byte offset][#OFFSET_windowExtent] - [Memory layout][#ML_windowExtent] - [Getter][#windowExtent()] - [Setter][#windowExtent(java.lang.foreign.MemorySegment)] +/// ### windowCompareMode +/// [VarHandle][#VH_windowCompareMode] - [Getter][#windowCompareMode()] - [Setter][#windowCompareMode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerBlockMatchWindowCreateInfoQCOM { +/// VkStructureType sType; +/// const void * pNext; +/// VkExtent2D windowExtent; +/// VkBlockMatchWindowCompareModeQCOM windowCompareMode; +/// } VkSamplerBlockMatchWindowCreateInfoQCOM; +/// ``` +public final class VkSamplerBlockMatchWindowCreateInfoQCOM extends Struct { + /// The struct layout of `VkSamplerBlockMatchWindowCreateInfoQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("windowExtent"), + ValueLayout.JAVA_INT.withName("windowCompareMode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `windowExtent`. + public static final long OFFSET_windowExtent = LAYOUT.byteOffset(PathElement.groupElement("windowExtent")); + /// The memory layout of `windowExtent`. + public static final MemoryLayout ML_windowExtent = LAYOUT.select(PathElement.groupElement("windowExtent")); + /// The [VarHandle] of `windowCompareMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_windowCompareMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("windowCompareMode")); + + /// Creates `VkSamplerBlockMatchWindowCreateInfoQCOM` with the given segment. + /// @param segment the memory segment + public VkSamplerBlockMatchWindowCreateInfoQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerBlockMatchWindowCreateInfoQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerBlockMatchWindowCreateInfoQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerBlockMatchWindowCreateInfoQCOM(segment); } + + /// Creates `VkSamplerBlockMatchWindowCreateInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerBlockMatchWindowCreateInfoQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerBlockMatchWindowCreateInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerBlockMatchWindowCreateInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerBlockMatchWindowCreateInfoQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerBlockMatchWindowCreateInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerBlockMatchWindowCreateInfoQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerBlockMatchWindowCreateInfoQCOM` + public static VkSamplerBlockMatchWindowCreateInfoQCOM alloc(SegmentAllocator allocator) { return new VkSamplerBlockMatchWindowCreateInfoQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerBlockMatchWindowCreateInfoQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerBlockMatchWindowCreateInfoQCOM` + public static VkSamplerBlockMatchWindowCreateInfoQCOM alloc(SegmentAllocator allocator, long count) { return new VkSamplerBlockMatchWindowCreateInfoQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerBlockMatchWindowCreateInfoQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerBlockMatchWindowCreateInfoQCOM sType(@CType("VkStructureType") int value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerBlockMatchWindowCreateInfoQCOM pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerBlockMatchWindowCreateInfoQCOM pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `windowExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_windowExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_windowExtent, index), ML_windowExtent); } + /// {@return `windowExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_windowExtent(MemorySegment segment) { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_windowExtent(segment, 0L); } + /// {@return `windowExtent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment windowExtentAt(long index) { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_windowExtent(this.segment(), index); } + /// {@return `windowExtent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment windowExtent() { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_windowExtent(this.segment()); } + /// Sets `windowExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_windowExtent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_windowExtent, index), ML_windowExtent.byteSize()); } + /// Sets `windowExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_windowExtent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_windowExtent(segment, 0L, value); } + /// Sets `windowExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerBlockMatchWindowCreateInfoQCOM windowExtentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_windowExtent(this.segment(), index, value); return this; } + /// Sets `windowExtent` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerBlockMatchWindowCreateInfoQCOM windowExtent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_windowExtent(this.segment(), value); return this; } + + /// {@return `windowCompareMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlockMatchWindowCompareModeQCOM") int get_windowCompareMode(MemorySegment segment, long index) { return (int) VH_windowCompareMode.get(segment, 0L, index); } + /// {@return `windowCompareMode`} + /// @param segment the segment of the struct + public static @CType("VkBlockMatchWindowCompareModeQCOM") int get_windowCompareMode(MemorySegment segment) { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_windowCompareMode(segment, 0L); } + /// {@return `windowCompareMode` at the given index} + /// @param index the index + public @CType("VkBlockMatchWindowCompareModeQCOM") int windowCompareModeAt(long index) { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_windowCompareMode(this.segment(), index); } + /// {@return `windowCompareMode`} + public @CType("VkBlockMatchWindowCompareModeQCOM") int windowCompareMode() { return VkSamplerBlockMatchWindowCreateInfoQCOM.get_windowCompareMode(this.segment()); } + /// Sets `windowCompareMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_windowCompareMode(MemorySegment segment, long index, @CType("VkBlockMatchWindowCompareModeQCOM") int value) { VH_windowCompareMode.set(segment, 0L, index, value); } + /// Sets `windowCompareMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_windowCompareMode(MemorySegment segment, @CType("VkBlockMatchWindowCompareModeQCOM") int value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_windowCompareMode(segment, 0L, value); } + /// Sets `windowCompareMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerBlockMatchWindowCreateInfoQCOM windowCompareModeAt(long index, @CType("VkBlockMatchWindowCompareModeQCOM") int value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_windowCompareMode(this.segment(), index, value); return this; } + /// Sets `windowCompareMode` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerBlockMatchWindowCreateInfoQCOM windowCompareMode(@CType("VkBlockMatchWindowCompareModeQCOM") int value) { VkSamplerBlockMatchWindowCreateInfoQCOM.set_windowCompareMode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSamplerCubicWeightsCreateInfoQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSamplerCubicWeightsCreateInfoQCOM.java new file mode 100644 index 00000000..d6ac4f12 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSamplerCubicWeightsCreateInfoQCOM.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### cubicWeights +/// [VarHandle][#VH_cubicWeights] - [Getter][#cubicWeights()] - [Setter][#cubicWeights(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerCubicWeightsCreateInfoQCOM { +/// VkStructureType sType; +/// const void * pNext; +/// VkCubicFilterWeightsQCOM cubicWeights; +/// } VkSamplerCubicWeightsCreateInfoQCOM; +/// ``` +public final class VkSamplerCubicWeightsCreateInfoQCOM extends Struct { + /// The struct layout of `VkSamplerCubicWeightsCreateInfoQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("cubicWeights") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `cubicWeights` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cubicWeights = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cubicWeights")); + + /// Creates `VkSamplerCubicWeightsCreateInfoQCOM` with the given segment. + /// @param segment the memory segment + public VkSamplerCubicWeightsCreateInfoQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerCubicWeightsCreateInfoQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCubicWeightsCreateInfoQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCubicWeightsCreateInfoQCOM(segment); } + + /// Creates `VkSamplerCubicWeightsCreateInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCubicWeightsCreateInfoQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCubicWeightsCreateInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerCubicWeightsCreateInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCubicWeightsCreateInfoQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCubicWeightsCreateInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerCubicWeightsCreateInfoQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerCubicWeightsCreateInfoQCOM` + public static VkSamplerCubicWeightsCreateInfoQCOM alloc(SegmentAllocator allocator) { return new VkSamplerCubicWeightsCreateInfoQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerCubicWeightsCreateInfoQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerCubicWeightsCreateInfoQCOM` + public static VkSamplerCubicWeightsCreateInfoQCOM alloc(SegmentAllocator allocator, long count) { return new VkSamplerCubicWeightsCreateInfoQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerCubicWeightsCreateInfoQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerCubicWeightsCreateInfoQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerCubicWeightsCreateInfoQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerCubicWeightsCreateInfoQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCubicWeightsCreateInfoQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerCubicWeightsCreateInfoQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCubicWeightsCreateInfoQCOM sType(@CType("VkStructureType") int value) { VkSamplerCubicWeightsCreateInfoQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerCubicWeightsCreateInfoQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerCubicWeightsCreateInfoQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerCubicWeightsCreateInfoQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCubicWeightsCreateInfoQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCubicWeightsCreateInfoQCOM pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCubicWeightsCreateInfoQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCubicWeightsCreateInfoQCOM pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCubicWeightsCreateInfoQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `cubicWeights` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCubicFilterWeightsQCOM") int get_cubicWeights(MemorySegment segment, long index) { return (int) VH_cubicWeights.get(segment, 0L, index); } + /// {@return `cubicWeights`} + /// @param segment the segment of the struct + public static @CType("VkCubicFilterWeightsQCOM") int get_cubicWeights(MemorySegment segment) { return VkSamplerCubicWeightsCreateInfoQCOM.get_cubicWeights(segment, 0L); } + /// {@return `cubicWeights` at the given index} + /// @param index the index + public @CType("VkCubicFilterWeightsQCOM") int cubicWeightsAt(long index) { return VkSamplerCubicWeightsCreateInfoQCOM.get_cubicWeights(this.segment(), index); } + /// {@return `cubicWeights`} + public @CType("VkCubicFilterWeightsQCOM") int cubicWeights() { return VkSamplerCubicWeightsCreateInfoQCOM.get_cubicWeights(this.segment()); } + /// Sets `cubicWeights` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cubicWeights(MemorySegment segment, long index, @CType("VkCubicFilterWeightsQCOM") int value) { VH_cubicWeights.set(segment, 0L, index, value); } + /// Sets `cubicWeights` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cubicWeights(MemorySegment segment, @CType("VkCubicFilterWeightsQCOM") int value) { VkSamplerCubicWeightsCreateInfoQCOM.set_cubicWeights(segment, 0L, value); } + /// Sets `cubicWeights` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCubicWeightsCreateInfoQCOM cubicWeightsAt(long index, @CType("VkCubicFilterWeightsQCOM") int value) { VkSamplerCubicWeightsCreateInfoQCOM.set_cubicWeights(this.segment(), index, value); return this; } + /// Sets `cubicWeights` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCubicWeightsCreateInfoQCOM cubicWeights(@CType("VkCubicFilterWeightsQCOM") int value) { VkSamplerCubicWeightsCreateInfoQCOM.set_cubicWeights(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.java new file mode 100644 index 00000000..41e6191c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### enableYDegamma +/// [VarHandle][#VH_enableYDegamma] - [Getter][#enableYDegamma()] - [Setter][#enableYDegamma(int)] +/// ### enableCbCrDegamma +/// [VarHandle][#VH_enableCbCrDegamma] - [Getter][#enableCbCrDegamma()] - [Setter][#enableCbCrDegamma(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 enableYDegamma; +/// VkBool32 enableCbCrDegamma; +/// } VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM; +/// ``` +public final class VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM extends Struct { + /// The struct layout of `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("enableYDegamma"), + ValueLayout.JAVA_INT.withName("enableCbCrDegamma") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `enableYDegamma` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enableYDegamma = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enableYDegamma")); + /// The [VarHandle] of `enableCbCrDegamma` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enableCbCrDegamma = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enableCbCrDegamma")); + + /// Creates `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM` with the given segment. + /// @param segment the memory segment + public VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM(segment); } + + /// Creates `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM` + public static VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM alloc(SegmentAllocator allocator) { return new VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM` + public static VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM alloc(SegmentAllocator allocator, long count) { return new VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM sType(@CType("VkStructureType") int value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `enableYDegamma` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_enableYDegamma(MemorySegment segment, long index) { return (int) VH_enableYDegamma.get(segment, 0L, index); } + /// {@return `enableYDegamma`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_enableYDegamma(MemorySegment segment) { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_enableYDegamma(segment, 0L); } + /// {@return `enableYDegamma` at the given index} + /// @param index the index + public @CType("VkBool32") int enableYDegammaAt(long index) { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_enableYDegamma(this.segment(), index); } + /// {@return `enableYDegamma`} + public @CType("VkBool32") int enableYDegamma() { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_enableYDegamma(this.segment()); } + /// Sets `enableYDegamma` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enableYDegamma(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_enableYDegamma.set(segment, 0L, index, value); } + /// Sets `enableYDegamma` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enableYDegamma(MemorySegment segment, @CType("VkBool32") int value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_enableYDegamma(segment, 0L, value); } + /// Sets `enableYDegamma` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM enableYDegammaAt(long index, @CType("VkBool32") int value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_enableYDegamma(this.segment(), index, value); return this; } + /// Sets `enableYDegamma` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM enableYDegamma(@CType("VkBool32") int value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_enableYDegamma(this.segment(), value); return this; } + + /// {@return `enableCbCrDegamma` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_enableCbCrDegamma(MemorySegment segment, long index) { return (int) VH_enableCbCrDegamma.get(segment, 0L, index); } + /// {@return `enableCbCrDegamma`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_enableCbCrDegamma(MemorySegment segment) { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_enableCbCrDegamma(segment, 0L); } + /// {@return `enableCbCrDegamma` at the given index} + /// @param index the index + public @CType("VkBool32") int enableCbCrDegammaAt(long index) { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_enableCbCrDegamma(this.segment(), index); } + /// {@return `enableCbCrDegamma`} + public @CType("VkBool32") int enableCbCrDegamma() { return VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.get_enableCbCrDegamma(this.segment()); } + /// Sets `enableCbCrDegamma` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enableCbCrDegamma(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_enableCbCrDegamma.set(segment, 0L, index, value); } + /// Sets `enableCbCrDegamma` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enableCbCrDegamma(MemorySegment segment, @CType("VkBool32") int value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_enableCbCrDegamma(segment, 0L, value); } + /// Sets `enableCbCrDegamma` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM enableCbCrDegammaAt(long index, @CType("VkBool32") int value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_enableCbCrDegamma(this.segment(), index, value); return this; } + /// Sets `enableCbCrDegamma` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM enableCbCrDegamma(@CType("VkBool32") int value) { VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.set_enableCbCrDegamma(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSubpassFragmentDensityMapOffsetEndInfoQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSubpassFragmentDensityMapOffsetEndInfoQCOM.java new file mode 100644 index 00000000..7880745d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkSubpassFragmentDensityMapOffsetEndInfoQCOM.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### fragmentDensityOffsetCount +/// [VarHandle][#VH_fragmentDensityOffsetCount] - [Getter][#fragmentDensityOffsetCount()] - [Setter][#fragmentDensityOffsetCount(int)] +/// ### pFragmentDensityOffsets +/// [VarHandle][#VH_pFragmentDensityOffsets] - [Getter][#pFragmentDensityOffsets()] - [Setter][#pFragmentDensityOffsets(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassFragmentDensityMapOffsetEndInfoQCOM { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t fragmentDensityOffsetCount; +/// const VkOffset2D * pFragmentDensityOffsets; +/// } VkSubpassFragmentDensityMapOffsetEndInfoQCOM; +/// ``` +public final class VkSubpassFragmentDensityMapOffsetEndInfoQCOM extends Struct { + /// The struct layout of `VkSubpassFragmentDensityMapOffsetEndInfoQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("fragmentDensityOffsetCount"), + ValueLayout.ADDRESS.withName("pFragmentDensityOffsets") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `fragmentDensityOffsetCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentDensityOffsetCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentDensityOffsetCount")); + /// The [VarHandle] of `pFragmentDensityOffsets` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pFragmentDensityOffsets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pFragmentDensityOffsets")); + + /// Creates `VkSubpassFragmentDensityMapOffsetEndInfoQCOM` with the given segment. + /// @param segment the memory segment + public VkSubpassFragmentDensityMapOffsetEndInfoQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassFragmentDensityMapOffsetEndInfoQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassFragmentDensityMapOffsetEndInfoQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassFragmentDensityMapOffsetEndInfoQCOM(segment); } + + /// Creates `VkSubpassFragmentDensityMapOffsetEndInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassFragmentDensityMapOffsetEndInfoQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassFragmentDensityMapOffsetEndInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassFragmentDensityMapOffsetEndInfoQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassFragmentDensityMapOffsetEndInfoQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassFragmentDensityMapOffsetEndInfoQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassFragmentDensityMapOffsetEndInfoQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassFragmentDensityMapOffsetEndInfoQCOM` + public static VkSubpassFragmentDensityMapOffsetEndInfoQCOM alloc(SegmentAllocator allocator) { return new VkSubpassFragmentDensityMapOffsetEndInfoQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassFragmentDensityMapOffsetEndInfoQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassFragmentDensityMapOffsetEndInfoQCOM` + public static VkSubpassFragmentDensityMapOffsetEndInfoQCOM alloc(SegmentAllocator allocator, long count) { return new VkSubpassFragmentDensityMapOffsetEndInfoQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassFragmentDensityMapOffsetEndInfoQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassFragmentDensityMapOffsetEndInfoQCOM sType(@CType("VkStructureType") int value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassFragmentDensityMapOffsetEndInfoQCOM pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassFragmentDensityMapOffsetEndInfoQCOM pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `fragmentDensityOffsetCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_fragmentDensityOffsetCount(MemorySegment segment, long index) { return (int) VH_fragmentDensityOffsetCount.get(segment, 0L, index); } + /// {@return `fragmentDensityOffsetCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_fragmentDensityOffsetCount(MemorySegment segment) { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_fragmentDensityOffsetCount(segment, 0L); } + /// {@return `fragmentDensityOffsetCount` at the given index} + /// @param index the index + public @CType("uint32_t") int fragmentDensityOffsetCountAt(long index) { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_fragmentDensityOffsetCount(this.segment(), index); } + /// {@return `fragmentDensityOffsetCount`} + public @CType("uint32_t") int fragmentDensityOffsetCount() { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_fragmentDensityOffsetCount(this.segment()); } + /// Sets `fragmentDensityOffsetCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentDensityOffsetCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_fragmentDensityOffsetCount.set(segment, 0L, index, value); } + /// Sets `fragmentDensityOffsetCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentDensityOffsetCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_fragmentDensityOffsetCount(segment, 0L, value); } + /// Sets `fragmentDensityOffsetCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassFragmentDensityMapOffsetEndInfoQCOM fragmentDensityOffsetCountAt(long index, @CType("uint32_t") int value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_fragmentDensityOffsetCount(this.segment(), index, value); return this; } + /// Sets `fragmentDensityOffsetCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassFragmentDensityMapOffsetEndInfoQCOM fragmentDensityOffsetCount(@CType("uint32_t") int value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_fragmentDensityOffsetCount(this.segment(), value); return this; } + + /// {@return `pFragmentDensityOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkOffset2D *") java.lang.foreign.MemorySegment get_pFragmentDensityOffsets(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pFragmentDensityOffsets.get(segment, 0L, index); } + /// {@return `pFragmentDensityOffsets`} + /// @param segment the segment of the struct + public static @CType("const VkOffset2D *") java.lang.foreign.MemorySegment get_pFragmentDensityOffsets(MemorySegment segment) { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_pFragmentDensityOffsets(segment, 0L); } + /// {@return `pFragmentDensityOffsets` at the given index} + /// @param index the index + public @CType("const VkOffset2D *") java.lang.foreign.MemorySegment pFragmentDensityOffsetsAt(long index) { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_pFragmentDensityOffsets(this.segment(), index); } + /// {@return `pFragmentDensityOffsets`} + public @CType("const VkOffset2D *") java.lang.foreign.MemorySegment pFragmentDensityOffsets() { return VkSubpassFragmentDensityMapOffsetEndInfoQCOM.get_pFragmentDensityOffsets(this.segment()); } + /// Sets `pFragmentDensityOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pFragmentDensityOffsets(MemorySegment segment, long index, @CType("const VkOffset2D *") java.lang.foreign.MemorySegment value) { VH_pFragmentDensityOffsets.set(segment, 0L, index, value); } + /// Sets `pFragmentDensityOffsets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pFragmentDensityOffsets(MemorySegment segment, @CType("const VkOffset2D *") java.lang.foreign.MemorySegment value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_pFragmentDensityOffsets(segment, 0L, value); } + /// Sets `pFragmentDensityOffsets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassFragmentDensityMapOffsetEndInfoQCOM pFragmentDensityOffsetsAt(long index, @CType("const VkOffset2D *") java.lang.foreign.MemorySegment value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_pFragmentDensityOffsets(this.segment(), index, value); return this; } + /// Sets `pFragmentDensityOffsets` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassFragmentDensityMapOffsetEndInfoQCOM pFragmentDensityOffsets(@CType("const VkOffset2D *") java.lang.foreign.MemorySegment value) { VkSubpassFragmentDensityMapOffsetEndInfoQCOM.set_pFragmentDensityOffsets(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkTilePropertiesQCOM.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkTilePropertiesQCOM.java new file mode 100644 index 00000000..8cca8d0f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qcom/struct/VkTilePropertiesQCOM.java @@ -0,0 +1,265 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qcom.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### tileSize +/// [Byte offset][#OFFSET_tileSize] - [Memory layout][#ML_tileSize] - [Getter][#tileSize()] - [Setter][#tileSize(java.lang.foreign.MemorySegment)] +/// ### apronSize +/// [Byte offset][#OFFSET_apronSize] - [Memory layout][#ML_apronSize] - [Getter][#apronSize()] - [Setter][#apronSize(java.lang.foreign.MemorySegment)] +/// ### origin +/// [Byte offset][#OFFSET_origin] - [Memory layout][#ML_origin] - [Getter][#origin()] - [Setter][#origin(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkTilePropertiesQCOM { +/// VkStructureType sType; +/// void * pNext; +/// VkExtent3D tileSize; +/// VkExtent2D apronSize; +/// VkOffset2D origin; +/// } VkTilePropertiesQCOM; +/// ``` +public final class VkTilePropertiesQCOM extends Struct { + /// The struct layout of `VkTilePropertiesQCOM`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("tileSize"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("apronSize"), + overrungl.vulkan.struct.VkOffset2D.LAYOUT.withName("origin") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `tileSize`. + public static final long OFFSET_tileSize = LAYOUT.byteOffset(PathElement.groupElement("tileSize")); + /// The memory layout of `tileSize`. + public static final MemoryLayout ML_tileSize = LAYOUT.select(PathElement.groupElement("tileSize")); + /// The byte offset of `apronSize`. + public static final long OFFSET_apronSize = LAYOUT.byteOffset(PathElement.groupElement("apronSize")); + /// The memory layout of `apronSize`. + public static final MemoryLayout ML_apronSize = LAYOUT.select(PathElement.groupElement("apronSize")); + /// The byte offset of `origin`. + public static final long OFFSET_origin = LAYOUT.byteOffset(PathElement.groupElement("origin")); + /// The memory layout of `origin`. + public static final MemoryLayout ML_origin = LAYOUT.select(PathElement.groupElement("origin")); + + /// Creates `VkTilePropertiesQCOM` with the given segment. + /// @param segment the memory segment + public VkTilePropertiesQCOM(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkTilePropertiesQCOM` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTilePropertiesQCOM of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTilePropertiesQCOM(segment); } + + /// Creates `VkTilePropertiesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTilePropertiesQCOM ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTilePropertiesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkTilePropertiesQCOM` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkTilePropertiesQCOM ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkTilePropertiesQCOM(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkTilePropertiesQCOM` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkTilePropertiesQCOM` + public static VkTilePropertiesQCOM alloc(SegmentAllocator allocator) { return new VkTilePropertiesQCOM(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkTilePropertiesQCOM` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkTilePropertiesQCOM` + public static VkTilePropertiesQCOM alloc(SegmentAllocator allocator, long count) { return new VkTilePropertiesQCOM(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkTilePropertiesQCOM.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkTilePropertiesQCOM.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkTilePropertiesQCOM.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkTilePropertiesQCOM.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTilePropertiesQCOM sTypeAt(long index, @CType("VkStructureType") int value) { VkTilePropertiesQCOM.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkTilePropertiesQCOM sType(@CType("VkStructureType") int value) { VkTilePropertiesQCOM.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkTilePropertiesQCOM.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkTilePropertiesQCOM.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkTilePropertiesQCOM.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTilePropertiesQCOM pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkTilePropertiesQCOM pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_pNext(this.segment(), value); return this; } + + /// {@return `tileSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_tileSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_tileSize, index), ML_tileSize); } + /// {@return `tileSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_tileSize(MemorySegment segment) { return VkTilePropertiesQCOM.get_tileSize(segment, 0L); } + /// {@return `tileSize` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment tileSizeAt(long index) { return VkTilePropertiesQCOM.get_tileSize(this.segment(), index); } + /// {@return `tileSize`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment tileSize() { return VkTilePropertiesQCOM.get_tileSize(this.segment()); } + /// Sets `tileSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tileSize(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_tileSize, index), ML_tileSize.byteSize()); } + /// Sets `tileSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tileSize(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_tileSize(segment, 0L, value); } + /// Sets `tileSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTilePropertiesQCOM tileSizeAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_tileSize(this.segment(), index, value); return this; } + /// Sets `tileSize` with the given value. + /// @param value the value + /// @return `this` + public VkTilePropertiesQCOM tileSize(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_tileSize(this.segment(), value); return this; } + + /// {@return `apronSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_apronSize(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_apronSize, index), ML_apronSize); } + /// {@return `apronSize`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_apronSize(MemorySegment segment) { return VkTilePropertiesQCOM.get_apronSize(segment, 0L); } + /// {@return `apronSize` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment apronSizeAt(long index) { return VkTilePropertiesQCOM.get_apronSize(this.segment(), index); } + /// {@return `apronSize`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment apronSize() { return VkTilePropertiesQCOM.get_apronSize(this.segment()); } + /// Sets `apronSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_apronSize(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_apronSize, index), ML_apronSize.byteSize()); } + /// Sets `apronSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_apronSize(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_apronSize(segment, 0L, value); } + /// Sets `apronSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTilePropertiesQCOM apronSizeAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_apronSize(this.segment(), index, value); return this; } + /// Sets `apronSize` with the given value. + /// @param value the value + /// @return `this` + public VkTilePropertiesQCOM apronSize(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_apronSize(this.segment(), value); return this; } + + /// {@return `origin` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_origin(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_origin, index), ML_origin); } + /// {@return `origin`} + /// @param segment the segment of the struct + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_origin(MemorySegment segment) { return VkTilePropertiesQCOM.get_origin(segment, 0L); } + /// {@return `origin` at the given index} + /// @param index the index + public @CType("VkOffset2D") java.lang.foreign.MemorySegment originAt(long index) { return VkTilePropertiesQCOM.get_origin(this.segment(), index); } + /// {@return `origin`} + public @CType("VkOffset2D") java.lang.foreign.MemorySegment origin() { return VkTilePropertiesQCOM.get_origin(this.segment()); } + /// Sets `origin` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_origin(MemorySegment segment, long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_origin, index), ML_origin.byteSize()); } + /// Sets `origin` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_origin(MemorySegment segment, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_origin(segment, 0L, value); } + /// Sets `origin` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTilePropertiesQCOM originAt(long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_origin(this.segment(), index, value); return this; } + /// Sets `origin` with the given value. + /// @param value the value + /// @return `this` + public VkTilePropertiesQCOM origin(@CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkTilePropertiesQCOM.set_origin(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/VKQNXExternalMemoryScreenBuffer.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/VKQNXExternalMemoryScreenBuffer.java new file mode 100644 index 00000000..e82d8593 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/VKQNXExternalMemoryScreenBuffer.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qnx; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQNXExternalMemoryScreenBuffer { + public static final int VK_QNX_EXTERNAL_MEMORY_SCREEN_BUFFER_SPEC_VERSION = 1; + public static final String VK_QNX_EXTERNAL_MEMORY_SCREEN_BUFFER_EXTENSION_NAME = "VK_QNX_external_memory_screen_buffer"; + public static final int VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX = 0x00004000; + public static final int VK_STRUCTURE_TYPE_SCREEN_BUFFER_PROPERTIES_QNX = 1000529000; + public static final int VK_STRUCTURE_TYPE_SCREEN_BUFFER_FORMAT_PROPERTIES_QNX = 1000529001; + public static final int VK_STRUCTURE_TYPE_IMPORT_SCREEN_BUFFER_INFO_QNX = 1000529002; + public static final int VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_QNX = 1000529003; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX = 1000529004; + public static final MethodHandle MH_vkGetScreenBufferPropertiesQNX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetScreenBufferPropertiesQNX; + + public VKQNXExternalMemoryScreenBuffer(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetScreenBufferPropertiesQNX = func.invoke(device, "vkGetScreenBufferPropertiesQNX"); + } + + public @CType("VkResult") int GetScreenBufferPropertiesQNX(@CType("VkDevice") MemorySegment device, @CType("const struct _screen_buffer *") MemorySegment buffer, @CType("VkScreenBufferPropertiesQNX *") MemorySegment pProperties) { + if (Unmarshal.isNullPointer(PFN_vkGetScreenBufferPropertiesQNX)) throw new SymbolNotFoundError("Symbol not found: vkGetScreenBufferPropertiesQNX"); + try { return (int) MH_vkGetScreenBufferPropertiesQNX.invokeExact(PFN_vkGetScreenBufferPropertiesQNX, device, buffer, pProperties); } + catch (Throwable e) { throw new RuntimeException("error in vkGetScreenBufferPropertiesQNX", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/VKQNXScreenSurface.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/VKQNXScreenSurface.java new file mode 100644 index 00000000..f75617fd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/VKQNXScreenSurface.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qnx; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKQNXScreenSurface { + public static final int VK_QNX_SCREEN_SURFACE_SPEC_VERSION = 1; + public static final String VK_QNX_SCREEN_SURFACE_EXTENSION_NAME = "VK_QNX_screen_surface"; + public static final int VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX = 1000378000; + public static final MethodHandle MH_vkCreateScreenSurfaceQNX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetPhysicalDeviceScreenPresentationSupportQNX = RuntimeHelper.downcall(FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkCreateScreenSurfaceQNX; + public final MemorySegment PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX; + + public VKQNXScreenSurface(@CType("VkInstance") MemorySegment instance, VKLoadFunc func) { + PFN_vkCreateScreenSurfaceQNX = func.invoke(instance, "vkCreateScreenSurfaceQNX"); + PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX = func.invoke(instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX"); + } + + public @CType("VkResult") int CreateScreenSurfaceQNX(@CType("VkInstance") MemorySegment instance, @CType("const VkScreenSurfaceCreateInfoQNX *") MemorySegment pCreateInfo, @CType("const VkAllocationCallbacks *") MemorySegment pAllocator, @CType("VkSurfaceKHR *") MemorySegment pSurface) { + if (Unmarshal.isNullPointer(PFN_vkCreateScreenSurfaceQNX)) throw new SymbolNotFoundError("Symbol not found: vkCreateScreenSurfaceQNX"); + try { return (int) MH_vkCreateScreenSurfaceQNX.invokeExact(PFN_vkCreateScreenSurfaceQNX, instance, pCreateInfo, pAllocator, pSurface); } + catch (Throwable e) { throw new RuntimeException("error in vkCreateScreenSurfaceQNX", e); } + } + + public @CType("VkBool32") int GetPhysicalDeviceScreenPresentationSupportQNX(@CType("VkPhysicalDevice") MemorySegment physicalDevice, @CType("uint32_t") int queueFamilyIndex, @CType("struct _screen_window *") MemorySegment window) { + if (Unmarshal.isNullPointer(PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX)) throw new SymbolNotFoundError("Symbol not found: vkGetPhysicalDeviceScreenPresentationSupportQNX"); + try { return (int) MH_vkGetPhysicalDeviceScreenPresentationSupportQNX.invokeExact(PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX, physicalDevice, queueFamilyIndex, window); } + catch (Throwable e) { throw new RuntimeException("error in vkGetPhysicalDeviceScreenPresentationSupportQNX", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkExternalFormatQNX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkExternalFormatQNX.java new file mode 100644 index 00000000..7093e3e1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkExternalFormatQNX.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qnx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### externalFormat +/// [VarHandle][#VH_externalFormat] - [Getter][#externalFormat()] - [Setter][#externalFormat(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalFormatQNX { +/// VkStructureType sType; +/// void * pNext; +/// uint64_t externalFormat; +/// } VkExternalFormatQNX; +/// ``` +public final class VkExternalFormatQNX extends Struct { + /// The struct layout of `VkExternalFormatQNX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("externalFormat") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `externalFormat` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_externalFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalFormat")); + + /// Creates `VkExternalFormatQNX` with the given segment. + /// @param segment the memory segment + public VkExternalFormatQNX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalFormatQNX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalFormatQNX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalFormatQNX(segment); } + + /// Creates `VkExternalFormatQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalFormatQNX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalFormatQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalFormatQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalFormatQNX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalFormatQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalFormatQNX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalFormatQNX` + public static VkExternalFormatQNX alloc(SegmentAllocator allocator) { return new VkExternalFormatQNX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalFormatQNX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalFormatQNX` + public static VkExternalFormatQNX alloc(SegmentAllocator allocator, long count) { return new VkExternalFormatQNX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExternalFormatQNX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExternalFormatQNX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExternalFormatQNX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExternalFormatQNX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFormatQNX sTypeAt(long index, @CType("VkStructureType") int value) { VkExternalFormatQNX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFormatQNX sType(@CType("VkStructureType") int value) { VkExternalFormatQNX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExternalFormatQNX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExternalFormatQNX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkExternalFormatQNX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalFormatQNX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFormatQNX pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalFormatQNX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFormatQNX pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkExternalFormatQNX.set_pNext(this.segment(), value); return this; } + + /// {@return `externalFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_externalFormat(MemorySegment segment, long index) { return (long) VH_externalFormat.get(segment, 0L, index); } + /// {@return `externalFormat`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_externalFormat(MemorySegment segment) { return VkExternalFormatQNX.get_externalFormat(segment, 0L); } + /// {@return `externalFormat` at the given index} + /// @param index the index + public @CType("uint64_t") long externalFormatAt(long index) { return VkExternalFormatQNX.get_externalFormat(this.segment(), index); } + /// {@return `externalFormat`} + public @CType("uint64_t") long externalFormat() { return VkExternalFormatQNX.get_externalFormat(this.segment()); } + /// Sets `externalFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalFormat(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_externalFormat.set(segment, 0L, index, value); } + /// Sets `externalFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalFormat(MemorySegment segment, @CType("uint64_t") long value) { VkExternalFormatQNX.set_externalFormat(segment, 0L, value); } + /// Sets `externalFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFormatQNX externalFormatAt(long index, @CType("uint64_t") long value) { VkExternalFormatQNX.set_externalFormat(this.segment(), index, value); return this; } + /// Sets `externalFormat` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFormatQNX externalFormat(@CType("uint64_t") long value) { VkExternalFormatQNX.set_externalFormat(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkImportScreenBufferInfoQNX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkImportScreenBufferInfoQNX.java new file mode 100644 index 00000000..b8310506 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkImportScreenBufferInfoQNX.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qnx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImportScreenBufferInfoQNX { +/// VkStructureType sType; +/// const void * pNext; +/// struct _screen_buffer * buffer; +/// } VkImportScreenBufferInfoQNX; +/// ``` +public final class VkImportScreenBufferInfoQNX extends Struct { + /// The struct layout of `VkImportScreenBufferInfoQNX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("buffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + + /// Creates `VkImportScreenBufferInfoQNX` with the given segment. + /// @param segment the memory segment + public VkImportScreenBufferInfoQNX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImportScreenBufferInfoQNX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportScreenBufferInfoQNX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportScreenBufferInfoQNX(segment); } + + /// Creates `VkImportScreenBufferInfoQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportScreenBufferInfoQNX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImportScreenBufferInfoQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImportScreenBufferInfoQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImportScreenBufferInfoQNX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImportScreenBufferInfoQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImportScreenBufferInfoQNX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImportScreenBufferInfoQNX` + public static VkImportScreenBufferInfoQNX alloc(SegmentAllocator allocator) { return new VkImportScreenBufferInfoQNX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImportScreenBufferInfoQNX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImportScreenBufferInfoQNX` + public static VkImportScreenBufferInfoQNX alloc(SegmentAllocator allocator, long count) { return new VkImportScreenBufferInfoQNX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImportScreenBufferInfoQNX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImportScreenBufferInfoQNX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImportScreenBufferInfoQNX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImportScreenBufferInfoQNX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportScreenBufferInfoQNX sTypeAt(long index, @CType("VkStructureType") int value) { VkImportScreenBufferInfoQNX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImportScreenBufferInfoQNX sType(@CType("VkStructureType") int value) { VkImportScreenBufferInfoQNX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImportScreenBufferInfoQNX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImportScreenBufferInfoQNX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImportScreenBufferInfoQNX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportScreenBufferInfoQNX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportScreenBufferInfoQNX pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImportScreenBufferInfoQNX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImportScreenBufferInfoQNX pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImportScreenBufferInfoQNX.set_pNext(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("struct _screen_buffer *") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("struct _screen_buffer *") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkImportScreenBufferInfoQNX.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("struct _screen_buffer *") java.lang.foreign.MemorySegment bufferAt(long index) { return VkImportScreenBufferInfoQNX.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("struct _screen_buffer *") java.lang.foreign.MemorySegment buffer() { return VkImportScreenBufferInfoQNX.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("struct _screen_buffer *") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("struct _screen_buffer *") java.lang.foreign.MemorySegment value) { VkImportScreenBufferInfoQNX.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImportScreenBufferInfoQNX bufferAt(long index, @CType("struct _screen_buffer *") java.lang.foreign.MemorySegment value) { VkImportScreenBufferInfoQNX.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkImportScreenBufferInfoQNX buffer(@CType("struct _screen_buffer *") java.lang.foreign.MemorySegment value) { VkImportScreenBufferInfoQNX.set_buffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.java new file mode 100644 index 00000000..7ea4acd7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qnx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### screenBufferImport +/// [VarHandle][#VH_screenBufferImport] - [Getter][#screenBufferImport()] - [Setter][#screenBufferImport(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 screenBufferImport; +/// } VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX; +/// ``` +public final class VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("screenBufferImport") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `screenBufferImport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_screenBufferImport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("screenBufferImport")); + + /// Creates `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX(segment); } + + /// Creates `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` + public static VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX` + public static VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.set_pNext(this.segment(), value); return this; } + + /// {@return `screenBufferImport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_screenBufferImport(MemorySegment segment, long index) { return (int) VH_screenBufferImport.get(segment, 0L, index); } + /// {@return `screenBufferImport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_screenBufferImport(MemorySegment segment) { return VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.get_screenBufferImport(segment, 0L); } + /// {@return `screenBufferImport` at the given index} + /// @param index the index + public @CType("VkBool32") int screenBufferImportAt(long index) { return VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.get_screenBufferImport(this.segment(), index); } + /// {@return `screenBufferImport`} + public @CType("VkBool32") int screenBufferImport() { return VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.get_screenBufferImport(this.segment()); } + /// Sets `screenBufferImport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_screenBufferImport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_screenBufferImport.set(segment, 0L, index, value); } + /// Sets `screenBufferImport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_screenBufferImport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.set_screenBufferImport(segment, 0L, value); } + /// Sets `screenBufferImport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX screenBufferImportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.set_screenBufferImport(this.segment(), index, value); return this; } + /// Sets `screenBufferImport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX screenBufferImport(@CType("VkBool32") int value) { VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX.set_screenBufferImport(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkScreenBufferFormatPropertiesQNX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkScreenBufferFormatPropertiesQNX.java new file mode 100644 index 00000000..5866243e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkScreenBufferFormatPropertiesQNX.java @@ -0,0 +1,483 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qnx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### externalFormat +/// [VarHandle][#VH_externalFormat] - [Getter][#externalFormat()] - [Setter][#externalFormat(long)] +/// ### screenUsage +/// [VarHandle][#VH_screenUsage] - [Getter][#screenUsage()] - [Setter][#screenUsage(long)] +/// ### formatFeatures +/// [VarHandle][#VH_formatFeatures] - [Getter][#formatFeatures()] - [Setter][#formatFeatures(int)] +/// ### samplerYcbcrConversionComponents +/// [Byte offset][#OFFSET_samplerYcbcrConversionComponents] - [Memory layout][#ML_samplerYcbcrConversionComponents] - [Getter][#samplerYcbcrConversionComponents()] - [Setter][#samplerYcbcrConversionComponents(java.lang.foreign.MemorySegment)] +/// ### suggestedYcbcrModel +/// [VarHandle][#VH_suggestedYcbcrModel] - [Getter][#suggestedYcbcrModel()] - [Setter][#suggestedYcbcrModel(int)] +/// ### suggestedYcbcrRange +/// [VarHandle][#VH_suggestedYcbcrRange] - [Getter][#suggestedYcbcrRange()] - [Setter][#suggestedYcbcrRange(int)] +/// ### suggestedXChromaOffset +/// [VarHandle][#VH_suggestedXChromaOffset] - [Getter][#suggestedXChromaOffset()] - [Setter][#suggestedXChromaOffset(int)] +/// ### suggestedYChromaOffset +/// [VarHandle][#VH_suggestedYChromaOffset] - [Getter][#suggestedYChromaOffset()] - [Setter][#suggestedYChromaOffset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkScreenBufferFormatPropertiesQNX { +/// VkStructureType sType; +/// void * pNext; +/// VkFormat format; +/// uint64_t externalFormat; +/// uint64_t screenUsage; +/// VkFormatFeatureFlags formatFeatures; +/// VkComponentMapping samplerYcbcrConversionComponents; +/// VkSamplerYcbcrModelConversion suggestedYcbcrModel; +/// VkSamplerYcbcrRange suggestedYcbcrRange; +/// VkChromaLocation suggestedXChromaOffset; +/// VkChromaLocation suggestedYChromaOffset; +/// } VkScreenBufferFormatPropertiesQNX; +/// ``` +public final class VkScreenBufferFormatPropertiesQNX extends Struct { + /// The struct layout of `VkScreenBufferFormatPropertiesQNX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_LONG.withName("externalFormat"), + ValueLayout.JAVA_LONG.withName("screenUsage"), + ValueLayout.JAVA_INT.withName("formatFeatures"), + overrungl.vulkan.struct.VkComponentMapping.LAYOUT.withName("samplerYcbcrConversionComponents"), + ValueLayout.JAVA_INT.withName("suggestedYcbcrModel"), + ValueLayout.JAVA_INT.withName("suggestedYcbcrRange"), + ValueLayout.JAVA_INT.withName("suggestedXChromaOffset"), + ValueLayout.JAVA_INT.withName("suggestedYChromaOffset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `externalFormat` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_externalFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalFormat")); + /// The [VarHandle] of `screenUsage` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_screenUsage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("screenUsage")); + /// The [VarHandle] of `formatFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_formatFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("formatFeatures")); + /// The byte offset of `samplerYcbcrConversionComponents`. + public static final long OFFSET_samplerYcbcrConversionComponents = LAYOUT.byteOffset(PathElement.groupElement("samplerYcbcrConversionComponents")); + /// The memory layout of `samplerYcbcrConversionComponents`. + public static final MemoryLayout ML_samplerYcbcrConversionComponents = LAYOUT.select(PathElement.groupElement("samplerYcbcrConversionComponents")); + /// The [VarHandle] of `suggestedYcbcrModel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYcbcrModel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYcbcrModel")); + /// The [VarHandle] of `suggestedYcbcrRange` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYcbcrRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYcbcrRange")); + /// The [VarHandle] of `suggestedXChromaOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedXChromaOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedXChromaOffset")); + /// The [VarHandle] of `suggestedYChromaOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_suggestedYChromaOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("suggestedYChromaOffset")); + + /// Creates `VkScreenBufferFormatPropertiesQNX` with the given segment. + /// @param segment the memory segment + public VkScreenBufferFormatPropertiesQNX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkScreenBufferFormatPropertiesQNX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkScreenBufferFormatPropertiesQNX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkScreenBufferFormatPropertiesQNX(segment); } + + /// Creates `VkScreenBufferFormatPropertiesQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkScreenBufferFormatPropertiesQNX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkScreenBufferFormatPropertiesQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkScreenBufferFormatPropertiesQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkScreenBufferFormatPropertiesQNX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkScreenBufferFormatPropertiesQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkScreenBufferFormatPropertiesQNX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkScreenBufferFormatPropertiesQNX` + public static VkScreenBufferFormatPropertiesQNX alloc(SegmentAllocator allocator) { return new VkScreenBufferFormatPropertiesQNX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkScreenBufferFormatPropertiesQNX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkScreenBufferFormatPropertiesQNX` + public static VkScreenBufferFormatPropertiesQNX alloc(SegmentAllocator allocator, long count) { return new VkScreenBufferFormatPropertiesQNX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkScreenBufferFormatPropertiesQNX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkScreenBufferFormatPropertiesQNX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX sTypeAt(long index, @CType("VkStructureType") int value) { VkScreenBufferFormatPropertiesQNX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX sType(@CType("VkStructureType") int value) { VkScreenBufferFormatPropertiesQNX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkScreenBufferFormatPropertiesQNX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkScreenBufferFormatPropertiesQNX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkScreenBufferFormatPropertiesQNX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkScreenBufferFormatPropertiesQNX.set_pNext(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkScreenBufferFormatPropertiesQNX.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkScreenBufferFormatPropertiesQNX.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX formatAt(long index, @CType("VkFormat") int value) { VkScreenBufferFormatPropertiesQNX.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX format(@CType("VkFormat") int value) { VkScreenBufferFormatPropertiesQNX.set_format(this.segment(), value); return this; } + + /// {@return `externalFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_externalFormat(MemorySegment segment, long index) { return (long) VH_externalFormat.get(segment, 0L, index); } + /// {@return `externalFormat`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_externalFormat(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_externalFormat(segment, 0L); } + /// {@return `externalFormat` at the given index} + /// @param index the index + public @CType("uint64_t") long externalFormatAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_externalFormat(this.segment(), index); } + /// {@return `externalFormat`} + public @CType("uint64_t") long externalFormat() { return VkScreenBufferFormatPropertiesQNX.get_externalFormat(this.segment()); } + /// Sets `externalFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalFormat(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_externalFormat.set(segment, 0L, index, value); } + /// Sets `externalFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalFormat(MemorySegment segment, @CType("uint64_t") long value) { VkScreenBufferFormatPropertiesQNX.set_externalFormat(segment, 0L, value); } + /// Sets `externalFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX externalFormatAt(long index, @CType("uint64_t") long value) { VkScreenBufferFormatPropertiesQNX.set_externalFormat(this.segment(), index, value); return this; } + /// Sets `externalFormat` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX externalFormat(@CType("uint64_t") long value) { VkScreenBufferFormatPropertiesQNX.set_externalFormat(this.segment(), value); return this; } + + /// {@return `screenUsage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_screenUsage(MemorySegment segment, long index) { return (long) VH_screenUsage.get(segment, 0L, index); } + /// {@return `screenUsage`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_screenUsage(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_screenUsage(segment, 0L); } + /// {@return `screenUsage` at the given index} + /// @param index the index + public @CType("uint64_t") long screenUsageAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_screenUsage(this.segment(), index); } + /// {@return `screenUsage`} + public @CType("uint64_t") long screenUsage() { return VkScreenBufferFormatPropertiesQNX.get_screenUsage(this.segment()); } + /// Sets `screenUsage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_screenUsage(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_screenUsage.set(segment, 0L, index, value); } + /// Sets `screenUsage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_screenUsage(MemorySegment segment, @CType("uint64_t") long value) { VkScreenBufferFormatPropertiesQNX.set_screenUsage(segment, 0L, value); } + /// Sets `screenUsage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX screenUsageAt(long index, @CType("uint64_t") long value) { VkScreenBufferFormatPropertiesQNX.set_screenUsage(this.segment(), index, value); return this; } + /// Sets `screenUsage` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX screenUsage(@CType("uint64_t") long value) { VkScreenBufferFormatPropertiesQNX.set_screenUsage(this.segment(), value); return this; } + + /// {@return `formatFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags") int get_formatFeatures(MemorySegment segment, long index) { return (int) VH_formatFeatures.get(segment, 0L, index); } + /// {@return `formatFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags") int get_formatFeatures(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_formatFeatures(segment, 0L); } + /// {@return `formatFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags") int formatFeaturesAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_formatFeatures(this.segment(), index); } + /// {@return `formatFeatures`} + public @CType("VkFormatFeatureFlags") int formatFeatures() { return VkScreenBufferFormatPropertiesQNX.get_formatFeatures(this.segment()); } + /// Sets `formatFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_formatFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags") int value) { VH_formatFeatures.set(segment, 0L, index, value); } + /// Sets `formatFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_formatFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags") int value) { VkScreenBufferFormatPropertiesQNX.set_formatFeatures(segment, 0L, value); } + /// Sets `formatFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX formatFeaturesAt(long index, @CType("VkFormatFeatureFlags") int value) { VkScreenBufferFormatPropertiesQNX.set_formatFeatures(this.segment(), index, value); return this; } + /// Sets `formatFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX formatFeatures(@CType("VkFormatFeatureFlags") int value) { VkScreenBufferFormatPropertiesQNX.set_formatFeatures(this.segment(), value); return this; } + + /// {@return `samplerYcbcrConversionComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_samplerYcbcrConversionComponents(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_samplerYcbcrConversionComponents, index), ML_samplerYcbcrConversionComponents); } + /// {@return `samplerYcbcrConversionComponents`} + /// @param segment the segment of the struct + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_samplerYcbcrConversionComponents(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_samplerYcbcrConversionComponents(segment, 0L); } + /// {@return `samplerYcbcrConversionComponents` at the given index} + /// @param index the index + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment samplerYcbcrConversionComponentsAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_samplerYcbcrConversionComponents(this.segment(), index); } + /// {@return `samplerYcbcrConversionComponents`} + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment samplerYcbcrConversionComponents() { return VkScreenBufferFormatPropertiesQNX.get_samplerYcbcrConversionComponents(this.segment()); } + /// Sets `samplerYcbcrConversionComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerYcbcrConversionComponents(MemorySegment segment, long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_samplerYcbcrConversionComponents, index), ML_samplerYcbcrConversionComponents.byteSize()); } + /// Sets `samplerYcbcrConversionComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerYcbcrConversionComponents(MemorySegment segment, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkScreenBufferFormatPropertiesQNX.set_samplerYcbcrConversionComponents(segment, 0L, value); } + /// Sets `samplerYcbcrConversionComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX samplerYcbcrConversionComponentsAt(long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkScreenBufferFormatPropertiesQNX.set_samplerYcbcrConversionComponents(this.segment(), index, value); return this; } + /// Sets `samplerYcbcrConversionComponents` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX samplerYcbcrConversionComponents(@CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkScreenBufferFormatPropertiesQNX.set_samplerYcbcrConversionComponents(this.segment(), value); return this; } + + /// {@return `suggestedYcbcrModel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrModelConversion") int get_suggestedYcbcrModel(MemorySegment segment, long index) { return (int) VH_suggestedYcbcrModel.get(segment, 0L, index); } + /// {@return `suggestedYcbcrModel`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrModelConversion") int get_suggestedYcbcrModel(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_suggestedYcbcrModel(segment, 0L); } + /// {@return `suggestedYcbcrModel` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrModelConversion") int suggestedYcbcrModelAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_suggestedYcbcrModel(this.segment(), index); } + /// {@return `suggestedYcbcrModel`} + public @CType("VkSamplerYcbcrModelConversion") int suggestedYcbcrModel() { return VkScreenBufferFormatPropertiesQNX.get_suggestedYcbcrModel(this.segment()); } + /// Sets `suggestedYcbcrModel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYcbcrModel(MemorySegment segment, long index, @CType("VkSamplerYcbcrModelConversion") int value) { VH_suggestedYcbcrModel.set(segment, 0L, index, value); } + /// Sets `suggestedYcbcrModel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYcbcrModel(MemorySegment segment, @CType("VkSamplerYcbcrModelConversion") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedYcbcrModel(segment, 0L, value); } + /// Sets `suggestedYcbcrModel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX suggestedYcbcrModelAt(long index, @CType("VkSamplerYcbcrModelConversion") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedYcbcrModel(this.segment(), index, value); return this; } + /// Sets `suggestedYcbcrModel` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX suggestedYcbcrModel(@CType("VkSamplerYcbcrModelConversion") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedYcbcrModel(this.segment(), value); return this; } + + /// {@return `suggestedYcbcrRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrRange") int get_suggestedYcbcrRange(MemorySegment segment, long index) { return (int) VH_suggestedYcbcrRange.get(segment, 0L, index); } + /// {@return `suggestedYcbcrRange`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrRange") int get_suggestedYcbcrRange(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_suggestedYcbcrRange(segment, 0L); } + /// {@return `suggestedYcbcrRange` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrRange") int suggestedYcbcrRangeAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_suggestedYcbcrRange(this.segment(), index); } + /// {@return `suggestedYcbcrRange`} + public @CType("VkSamplerYcbcrRange") int suggestedYcbcrRange() { return VkScreenBufferFormatPropertiesQNX.get_suggestedYcbcrRange(this.segment()); } + /// Sets `suggestedYcbcrRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYcbcrRange(MemorySegment segment, long index, @CType("VkSamplerYcbcrRange") int value) { VH_suggestedYcbcrRange.set(segment, 0L, index, value); } + /// Sets `suggestedYcbcrRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYcbcrRange(MemorySegment segment, @CType("VkSamplerYcbcrRange") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedYcbcrRange(segment, 0L, value); } + /// Sets `suggestedYcbcrRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX suggestedYcbcrRangeAt(long index, @CType("VkSamplerYcbcrRange") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedYcbcrRange(this.segment(), index, value); return this; } + /// Sets `suggestedYcbcrRange` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX suggestedYcbcrRange(@CType("VkSamplerYcbcrRange") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedYcbcrRange(this.segment(), value); return this; } + + /// {@return `suggestedXChromaOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_suggestedXChromaOffset(MemorySegment segment, long index) { return (int) VH_suggestedXChromaOffset.get(segment, 0L, index); } + /// {@return `suggestedXChromaOffset`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_suggestedXChromaOffset(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_suggestedXChromaOffset(segment, 0L); } + /// {@return `suggestedXChromaOffset` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int suggestedXChromaOffsetAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_suggestedXChromaOffset(this.segment(), index); } + /// {@return `suggestedXChromaOffset`} + public @CType("VkChromaLocation") int suggestedXChromaOffset() { return VkScreenBufferFormatPropertiesQNX.get_suggestedXChromaOffset(this.segment()); } + /// Sets `suggestedXChromaOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedXChromaOffset(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_suggestedXChromaOffset.set(segment, 0L, index, value); } + /// Sets `suggestedXChromaOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedXChromaOffset(MemorySegment segment, @CType("VkChromaLocation") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedXChromaOffset(segment, 0L, value); } + /// Sets `suggestedXChromaOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX suggestedXChromaOffsetAt(long index, @CType("VkChromaLocation") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedXChromaOffset(this.segment(), index, value); return this; } + /// Sets `suggestedXChromaOffset` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX suggestedXChromaOffset(@CType("VkChromaLocation") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedXChromaOffset(this.segment(), value); return this; } + + /// {@return `suggestedYChromaOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_suggestedYChromaOffset(MemorySegment segment, long index) { return (int) VH_suggestedYChromaOffset.get(segment, 0L, index); } + /// {@return `suggestedYChromaOffset`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_suggestedYChromaOffset(MemorySegment segment) { return VkScreenBufferFormatPropertiesQNX.get_suggestedYChromaOffset(segment, 0L); } + /// {@return `suggestedYChromaOffset` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int suggestedYChromaOffsetAt(long index) { return VkScreenBufferFormatPropertiesQNX.get_suggestedYChromaOffset(this.segment(), index); } + /// {@return `suggestedYChromaOffset`} + public @CType("VkChromaLocation") int suggestedYChromaOffset() { return VkScreenBufferFormatPropertiesQNX.get_suggestedYChromaOffset(this.segment()); } + /// Sets `suggestedYChromaOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_suggestedYChromaOffset(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_suggestedYChromaOffset.set(segment, 0L, index, value); } + /// Sets `suggestedYChromaOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_suggestedYChromaOffset(MemorySegment segment, @CType("VkChromaLocation") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedYChromaOffset(segment, 0L, value); } + /// Sets `suggestedYChromaOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX suggestedYChromaOffsetAt(long index, @CType("VkChromaLocation") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedYChromaOffset(this.segment(), index, value); return this; } + /// Sets `suggestedYChromaOffset` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferFormatPropertiesQNX suggestedYChromaOffset(@CType("VkChromaLocation") int value) { VkScreenBufferFormatPropertiesQNX.set_suggestedYChromaOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkScreenBufferPropertiesQNX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkScreenBufferPropertiesQNX.java new file mode 100644 index 00000000..b15b61f2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkScreenBufferPropertiesQNX.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qnx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### allocationSize +/// [VarHandle][#VH_allocationSize] - [Getter][#allocationSize()] - [Setter][#allocationSize(long)] +/// ### memoryTypeBits +/// [VarHandle][#VH_memoryTypeBits] - [Getter][#memoryTypeBits()] - [Setter][#memoryTypeBits(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkScreenBufferPropertiesQNX { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize allocationSize; +/// uint32_t memoryTypeBits; +/// } VkScreenBufferPropertiesQNX; +/// ``` +public final class VkScreenBufferPropertiesQNX extends Struct { + /// The struct layout of `VkScreenBufferPropertiesQNX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("allocationSize"), + ValueLayout.JAVA_INT.withName("memoryTypeBits") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `allocationSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_allocationSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allocationSize")); + /// The [VarHandle] of `memoryTypeBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeBits")); + + /// Creates `VkScreenBufferPropertiesQNX` with the given segment. + /// @param segment the memory segment + public VkScreenBufferPropertiesQNX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkScreenBufferPropertiesQNX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkScreenBufferPropertiesQNX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkScreenBufferPropertiesQNX(segment); } + + /// Creates `VkScreenBufferPropertiesQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkScreenBufferPropertiesQNX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkScreenBufferPropertiesQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkScreenBufferPropertiesQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkScreenBufferPropertiesQNX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkScreenBufferPropertiesQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkScreenBufferPropertiesQNX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkScreenBufferPropertiesQNX` + public static VkScreenBufferPropertiesQNX alloc(SegmentAllocator allocator) { return new VkScreenBufferPropertiesQNX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkScreenBufferPropertiesQNX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkScreenBufferPropertiesQNX` + public static VkScreenBufferPropertiesQNX alloc(SegmentAllocator allocator, long count) { return new VkScreenBufferPropertiesQNX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkScreenBufferPropertiesQNX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkScreenBufferPropertiesQNX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkScreenBufferPropertiesQNX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkScreenBufferPropertiesQNX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferPropertiesQNX sTypeAt(long index, @CType("VkStructureType") int value) { VkScreenBufferPropertiesQNX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferPropertiesQNX sType(@CType("VkStructureType") int value) { VkScreenBufferPropertiesQNX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkScreenBufferPropertiesQNX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkScreenBufferPropertiesQNX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkScreenBufferPropertiesQNX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkScreenBufferPropertiesQNX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferPropertiesQNX pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkScreenBufferPropertiesQNX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferPropertiesQNX pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkScreenBufferPropertiesQNX.set_pNext(this.segment(), value); return this; } + + /// {@return `allocationSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_allocationSize(MemorySegment segment, long index) { return (long) VH_allocationSize.get(segment, 0L, index); } + /// {@return `allocationSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_allocationSize(MemorySegment segment) { return VkScreenBufferPropertiesQNX.get_allocationSize(segment, 0L); } + /// {@return `allocationSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long allocationSizeAt(long index) { return VkScreenBufferPropertiesQNX.get_allocationSize(this.segment(), index); } + /// {@return `allocationSize`} + public @CType("VkDeviceSize") long allocationSize() { return VkScreenBufferPropertiesQNX.get_allocationSize(this.segment()); } + /// Sets `allocationSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allocationSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_allocationSize.set(segment, 0L, index, value); } + /// Sets `allocationSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allocationSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkScreenBufferPropertiesQNX.set_allocationSize(segment, 0L, value); } + /// Sets `allocationSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferPropertiesQNX allocationSizeAt(long index, @CType("VkDeviceSize") long value) { VkScreenBufferPropertiesQNX.set_allocationSize(this.segment(), index, value); return this; } + /// Sets `allocationSize` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferPropertiesQNX allocationSize(@CType("VkDeviceSize") long value) { VkScreenBufferPropertiesQNX.set_allocationSize(this.segment(), value); return this; } + + /// {@return `memoryTypeBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment, long index) { return (int) VH_memoryTypeBits.get(segment, 0L, index); } + /// {@return `memoryTypeBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment) { return VkScreenBufferPropertiesQNX.get_memoryTypeBits(segment, 0L); } + /// {@return `memoryTypeBits` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeBitsAt(long index) { return VkScreenBufferPropertiesQNX.get_memoryTypeBits(this.segment(), index); } + /// {@return `memoryTypeBits`} + public @CType("uint32_t") int memoryTypeBits() { return VkScreenBufferPropertiesQNX.get_memoryTypeBits(this.segment()); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeBits.set(segment, 0L, index, value); } + /// Sets `memoryTypeBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, @CType("uint32_t") int value) { VkScreenBufferPropertiesQNX.set_memoryTypeBits(segment, 0L, value); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenBufferPropertiesQNX memoryTypeBitsAt(long index, @CType("uint32_t") int value) { VkScreenBufferPropertiesQNX.set_memoryTypeBits(this.segment(), index, value); return this; } + /// Sets `memoryTypeBits` with the given value. + /// @param value the value + /// @return `this` + public VkScreenBufferPropertiesQNX memoryTypeBits(@CType("uint32_t") int value) { VkScreenBufferPropertiesQNX.set_memoryTypeBits(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkScreenSurfaceCreateInfoQNX.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkScreenSurfaceCreateInfoQNX.java new file mode 100644 index 00000000..5993fa3b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/qnx/struct/VkScreenSurfaceCreateInfoQNX.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.qnx.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### context +/// [VarHandle][#VH_context] - [Getter][#context()] - [Setter][#context(java.lang.foreign.MemorySegment)] +/// ### window +/// [VarHandle][#VH_window] - [Getter][#window()] - [Setter][#window(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkScreenSurfaceCreateInfoQNX { +/// VkStructureType sType; +/// const void * pNext; +/// VkScreenSurfaceCreateFlagsQNX flags; +/// struct _screen_context * context; +/// struct _screen_window * window; +/// } VkScreenSurfaceCreateInfoQNX; +/// ``` +public final class VkScreenSurfaceCreateInfoQNX extends Struct { + /// The struct layout of `VkScreenSurfaceCreateInfoQNX`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("context"), + ValueLayout.ADDRESS.withName("window") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `context` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_context = LAYOUT.arrayElementVarHandle(PathElement.groupElement("context")); + /// The [VarHandle] of `window` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_window = LAYOUT.arrayElementVarHandle(PathElement.groupElement("window")); + + /// Creates `VkScreenSurfaceCreateInfoQNX` with the given segment. + /// @param segment the memory segment + public VkScreenSurfaceCreateInfoQNX(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkScreenSurfaceCreateInfoQNX` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkScreenSurfaceCreateInfoQNX of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkScreenSurfaceCreateInfoQNX(segment); } + + /// Creates `VkScreenSurfaceCreateInfoQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkScreenSurfaceCreateInfoQNX ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkScreenSurfaceCreateInfoQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkScreenSurfaceCreateInfoQNX` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkScreenSurfaceCreateInfoQNX ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkScreenSurfaceCreateInfoQNX(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkScreenSurfaceCreateInfoQNX` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkScreenSurfaceCreateInfoQNX` + public static VkScreenSurfaceCreateInfoQNX alloc(SegmentAllocator allocator) { return new VkScreenSurfaceCreateInfoQNX(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkScreenSurfaceCreateInfoQNX` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkScreenSurfaceCreateInfoQNX` + public static VkScreenSurfaceCreateInfoQNX alloc(SegmentAllocator allocator, long count) { return new VkScreenSurfaceCreateInfoQNX(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkScreenSurfaceCreateInfoQNX.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkScreenSurfaceCreateInfoQNX.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkScreenSurfaceCreateInfoQNX.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkScreenSurfaceCreateInfoQNX.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenSurfaceCreateInfoQNX sTypeAt(long index, @CType("VkStructureType") int value) { VkScreenSurfaceCreateInfoQNX.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkScreenSurfaceCreateInfoQNX sType(@CType("VkStructureType") int value) { VkScreenSurfaceCreateInfoQNX.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkScreenSurfaceCreateInfoQNX.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkScreenSurfaceCreateInfoQNX.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkScreenSurfaceCreateInfoQNX.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkScreenSurfaceCreateInfoQNX.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenSurfaceCreateInfoQNX pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkScreenSurfaceCreateInfoQNX.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkScreenSurfaceCreateInfoQNX pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkScreenSurfaceCreateInfoQNX.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkScreenSurfaceCreateFlagsQNX") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkScreenSurfaceCreateFlagsQNX") int get_flags(MemorySegment segment) { return VkScreenSurfaceCreateInfoQNX.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkScreenSurfaceCreateFlagsQNX") int flagsAt(long index) { return VkScreenSurfaceCreateInfoQNX.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkScreenSurfaceCreateFlagsQNX") int flags() { return VkScreenSurfaceCreateInfoQNX.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkScreenSurfaceCreateFlagsQNX") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkScreenSurfaceCreateFlagsQNX") int value) { VkScreenSurfaceCreateInfoQNX.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenSurfaceCreateInfoQNX flagsAt(long index, @CType("VkScreenSurfaceCreateFlagsQNX") int value) { VkScreenSurfaceCreateInfoQNX.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkScreenSurfaceCreateInfoQNX flags(@CType("VkScreenSurfaceCreateFlagsQNX") int value) { VkScreenSurfaceCreateInfoQNX.set_flags(this.segment(), value); return this; } + + /// {@return `context` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("struct _screen_context *") java.lang.foreign.MemorySegment get_context(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_context.get(segment, 0L, index); } + /// {@return `context`} + /// @param segment the segment of the struct + public static @CType("struct _screen_context *") java.lang.foreign.MemorySegment get_context(MemorySegment segment) { return VkScreenSurfaceCreateInfoQNX.get_context(segment, 0L); } + /// {@return `context` at the given index} + /// @param index the index + public @CType("struct _screen_context *") java.lang.foreign.MemorySegment contextAt(long index) { return VkScreenSurfaceCreateInfoQNX.get_context(this.segment(), index); } + /// {@return `context`} + public @CType("struct _screen_context *") java.lang.foreign.MemorySegment context() { return VkScreenSurfaceCreateInfoQNX.get_context(this.segment()); } + /// Sets `context` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_context(MemorySegment segment, long index, @CType("struct _screen_context *") java.lang.foreign.MemorySegment value) { VH_context.set(segment, 0L, index, value); } + /// Sets `context` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_context(MemorySegment segment, @CType("struct _screen_context *") java.lang.foreign.MemorySegment value) { VkScreenSurfaceCreateInfoQNX.set_context(segment, 0L, value); } + /// Sets `context` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenSurfaceCreateInfoQNX contextAt(long index, @CType("struct _screen_context *") java.lang.foreign.MemorySegment value) { VkScreenSurfaceCreateInfoQNX.set_context(this.segment(), index, value); return this; } + /// Sets `context` with the given value. + /// @param value the value + /// @return `this` + public VkScreenSurfaceCreateInfoQNX context(@CType("struct _screen_context *") java.lang.foreign.MemorySegment value) { VkScreenSurfaceCreateInfoQNX.set_context(this.segment(), value); return this; } + + /// {@return `window` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("struct _screen_window *") java.lang.foreign.MemorySegment get_window(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_window.get(segment, 0L, index); } + /// {@return `window`} + /// @param segment the segment of the struct + public static @CType("struct _screen_window *") java.lang.foreign.MemorySegment get_window(MemorySegment segment) { return VkScreenSurfaceCreateInfoQNX.get_window(segment, 0L); } + /// {@return `window` at the given index} + /// @param index the index + public @CType("struct _screen_window *") java.lang.foreign.MemorySegment windowAt(long index) { return VkScreenSurfaceCreateInfoQNX.get_window(this.segment(), index); } + /// {@return `window`} + public @CType("struct _screen_window *") java.lang.foreign.MemorySegment window() { return VkScreenSurfaceCreateInfoQNX.get_window(this.segment()); } + /// Sets `window` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_window(MemorySegment segment, long index, @CType("struct _screen_window *") java.lang.foreign.MemorySegment value) { VH_window.set(segment, 0L, index, value); } + /// Sets `window` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_window(MemorySegment segment, @CType("struct _screen_window *") java.lang.foreign.MemorySegment value) { VkScreenSurfaceCreateInfoQNX.set_window(segment, 0L, value); } + /// Sets `window` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkScreenSurfaceCreateInfoQNX windowAt(long index, @CType("struct _screen_window *") java.lang.foreign.MemorySegment value) { VkScreenSurfaceCreateInfoQNX.set_window(this.segment(), index, value); return this; } + /// Sets `window` with the given value. + /// @param value the value + /// @return `this` + public VkScreenSurfaceCreateInfoQNX window(@CType("struct _screen_window *") java.lang.foreign.MemorySegment value) { VkScreenSurfaceCreateInfoQNX.set_window(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/sec/VKSECAmigoProfiling.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/sec/VKSECAmigoProfiling.java new file mode 100644 index 00000000..ebb6199e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/sec/VKSECAmigoProfiling.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.sec; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKSECAmigoProfiling { + public static final int VK_SEC_AMIGO_PROFILING_SPEC_VERSION = 1; + public static final String VK_SEC_AMIGO_PROFILING_EXTENSION_NAME = "VK_SEC_amigo_profiling"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC = 1000485000; + public static final int VK_STRUCTURE_TYPE_AMIGO_PROFILING_SUBMIT_INFO_SEC = 1000485001; + + public VKSECAmigoProfiling(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/sec/struct/VkAmigoProfilingSubmitInfoSEC.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/sec/struct/VkAmigoProfilingSubmitInfoSEC.java new file mode 100644 index 00000000..3bd9ace9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/sec/struct/VkAmigoProfilingSubmitInfoSEC.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.sec.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### firstDrawTimestamp +/// [VarHandle][#VH_firstDrawTimestamp] - [Getter][#firstDrawTimestamp()] - [Setter][#firstDrawTimestamp(long)] +/// ### swapBufferTimestamp +/// [VarHandle][#VH_swapBufferTimestamp] - [Getter][#swapBufferTimestamp()] - [Setter][#swapBufferTimestamp(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAmigoProfilingSubmitInfoSEC { +/// VkStructureType sType; +/// const void * pNext; +/// uint64_t firstDrawTimestamp; +/// uint64_t swapBufferTimestamp; +/// } VkAmigoProfilingSubmitInfoSEC; +/// ``` +public final class VkAmigoProfilingSubmitInfoSEC extends Struct { + /// The struct layout of `VkAmigoProfilingSubmitInfoSEC`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("firstDrawTimestamp"), + ValueLayout.JAVA_LONG.withName("swapBufferTimestamp") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `firstDrawTimestamp` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_firstDrawTimestamp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstDrawTimestamp")); + /// The [VarHandle] of `swapBufferTimestamp` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_swapBufferTimestamp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapBufferTimestamp")); + + /// Creates `VkAmigoProfilingSubmitInfoSEC` with the given segment. + /// @param segment the memory segment + public VkAmigoProfilingSubmitInfoSEC(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAmigoProfilingSubmitInfoSEC` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAmigoProfilingSubmitInfoSEC of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAmigoProfilingSubmitInfoSEC(segment); } + + /// Creates `VkAmigoProfilingSubmitInfoSEC` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAmigoProfilingSubmitInfoSEC ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAmigoProfilingSubmitInfoSEC(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAmigoProfilingSubmitInfoSEC` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAmigoProfilingSubmitInfoSEC ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAmigoProfilingSubmitInfoSEC(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAmigoProfilingSubmitInfoSEC` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAmigoProfilingSubmitInfoSEC` + public static VkAmigoProfilingSubmitInfoSEC alloc(SegmentAllocator allocator) { return new VkAmigoProfilingSubmitInfoSEC(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAmigoProfilingSubmitInfoSEC` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAmigoProfilingSubmitInfoSEC` + public static VkAmigoProfilingSubmitInfoSEC alloc(SegmentAllocator allocator, long count) { return new VkAmigoProfilingSubmitInfoSEC(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAmigoProfilingSubmitInfoSEC.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAmigoProfilingSubmitInfoSEC.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAmigoProfilingSubmitInfoSEC.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAmigoProfilingSubmitInfoSEC.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAmigoProfilingSubmitInfoSEC sTypeAt(long index, @CType("VkStructureType") int value) { VkAmigoProfilingSubmitInfoSEC.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAmigoProfilingSubmitInfoSEC sType(@CType("VkStructureType") int value) { VkAmigoProfilingSubmitInfoSEC.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAmigoProfilingSubmitInfoSEC.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAmigoProfilingSubmitInfoSEC.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAmigoProfilingSubmitInfoSEC.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAmigoProfilingSubmitInfoSEC.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAmigoProfilingSubmitInfoSEC pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAmigoProfilingSubmitInfoSEC.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAmigoProfilingSubmitInfoSEC pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAmigoProfilingSubmitInfoSEC.set_pNext(this.segment(), value); return this; } + + /// {@return `firstDrawTimestamp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_firstDrawTimestamp(MemorySegment segment, long index) { return (long) VH_firstDrawTimestamp.get(segment, 0L, index); } + /// {@return `firstDrawTimestamp`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_firstDrawTimestamp(MemorySegment segment) { return VkAmigoProfilingSubmitInfoSEC.get_firstDrawTimestamp(segment, 0L); } + /// {@return `firstDrawTimestamp` at the given index} + /// @param index the index + public @CType("uint64_t") long firstDrawTimestampAt(long index) { return VkAmigoProfilingSubmitInfoSEC.get_firstDrawTimestamp(this.segment(), index); } + /// {@return `firstDrawTimestamp`} + public @CType("uint64_t") long firstDrawTimestamp() { return VkAmigoProfilingSubmitInfoSEC.get_firstDrawTimestamp(this.segment()); } + /// Sets `firstDrawTimestamp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstDrawTimestamp(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_firstDrawTimestamp.set(segment, 0L, index, value); } + /// Sets `firstDrawTimestamp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstDrawTimestamp(MemorySegment segment, @CType("uint64_t") long value) { VkAmigoProfilingSubmitInfoSEC.set_firstDrawTimestamp(segment, 0L, value); } + /// Sets `firstDrawTimestamp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAmigoProfilingSubmitInfoSEC firstDrawTimestampAt(long index, @CType("uint64_t") long value) { VkAmigoProfilingSubmitInfoSEC.set_firstDrawTimestamp(this.segment(), index, value); return this; } + /// Sets `firstDrawTimestamp` with the given value. + /// @param value the value + /// @return `this` + public VkAmigoProfilingSubmitInfoSEC firstDrawTimestamp(@CType("uint64_t") long value) { VkAmigoProfilingSubmitInfoSEC.set_firstDrawTimestamp(this.segment(), value); return this; } + + /// {@return `swapBufferTimestamp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_swapBufferTimestamp(MemorySegment segment, long index) { return (long) VH_swapBufferTimestamp.get(segment, 0L, index); } + /// {@return `swapBufferTimestamp`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_swapBufferTimestamp(MemorySegment segment) { return VkAmigoProfilingSubmitInfoSEC.get_swapBufferTimestamp(segment, 0L); } + /// {@return `swapBufferTimestamp` at the given index} + /// @param index the index + public @CType("uint64_t") long swapBufferTimestampAt(long index) { return VkAmigoProfilingSubmitInfoSEC.get_swapBufferTimestamp(this.segment(), index); } + /// {@return `swapBufferTimestamp`} + public @CType("uint64_t") long swapBufferTimestamp() { return VkAmigoProfilingSubmitInfoSEC.get_swapBufferTimestamp(this.segment()); } + /// Sets `swapBufferTimestamp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapBufferTimestamp(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_swapBufferTimestamp.set(segment, 0L, index, value); } + /// Sets `swapBufferTimestamp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapBufferTimestamp(MemorySegment segment, @CType("uint64_t") long value) { VkAmigoProfilingSubmitInfoSEC.set_swapBufferTimestamp(segment, 0L, value); } + /// Sets `swapBufferTimestamp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAmigoProfilingSubmitInfoSEC swapBufferTimestampAt(long index, @CType("uint64_t") long value) { VkAmigoProfilingSubmitInfoSEC.set_swapBufferTimestamp(this.segment(), index, value); return this; } + /// Sets `swapBufferTimestamp` with the given value. + /// @param value the value + /// @return `this` + public VkAmigoProfilingSubmitInfoSEC swapBufferTimestamp(@CType("uint64_t") long value) { VkAmigoProfilingSubmitInfoSEC.set_swapBufferTimestamp(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/sec/struct/VkPhysicalDeviceAmigoProfilingFeaturesSEC.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/sec/struct/VkPhysicalDeviceAmigoProfilingFeaturesSEC.java new file mode 100644 index 00000000..10b0e298 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/sec/struct/VkPhysicalDeviceAmigoProfilingFeaturesSEC.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.sec.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### amigoProfiling +/// [VarHandle][#VH_amigoProfiling] - [Getter][#amigoProfiling()] - [Setter][#amigoProfiling(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceAmigoProfilingFeaturesSEC { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 amigoProfiling; +/// } VkPhysicalDeviceAmigoProfilingFeaturesSEC; +/// ``` +public final class VkPhysicalDeviceAmigoProfilingFeaturesSEC extends Struct { + /// The struct layout of `VkPhysicalDeviceAmigoProfilingFeaturesSEC`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("amigoProfiling") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `amigoProfiling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_amigoProfiling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("amigoProfiling")); + + /// Creates `VkPhysicalDeviceAmigoProfilingFeaturesSEC` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceAmigoProfilingFeaturesSEC(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceAmigoProfilingFeaturesSEC` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAmigoProfilingFeaturesSEC of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAmigoProfilingFeaturesSEC(segment); } + + /// Creates `VkPhysicalDeviceAmigoProfilingFeaturesSEC` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAmigoProfilingFeaturesSEC ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAmigoProfilingFeaturesSEC(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceAmigoProfilingFeaturesSEC` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceAmigoProfilingFeaturesSEC ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceAmigoProfilingFeaturesSEC(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceAmigoProfilingFeaturesSEC` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceAmigoProfilingFeaturesSEC` + public static VkPhysicalDeviceAmigoProfilingFeaturesSEC alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceAmigoProfilingFeaturesSEC(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceAmigoProfilingFeaturesSEC` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceAmigoProfilingFeaturesSEC` + public static VkPhysicalDeviceAmigoProfilingFeaturesSEC alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceAmigoProfilingFeaturesSEC(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceAmigoProfilingFeaturesSEC.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceAmigoProfilingFeaturesSEC.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceAmigoProfilingFeaturesSEC.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceAmigoProfilingFeaturesSEC.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAmigoProfilingFeaturesSEC sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceAmigoProfilingFeaturesSEC.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAmigoProfilingFeaturesSEC sType(@CType("VkStructureType") int value) { VkPhysicalDeviceAmigoProfilingFeaturesSEC.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceAmigoProfilingFeaturesSEC.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceAmigoProfilingFeaturesSEC.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceAmigoProfilingFeaturesSEC.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAmigoProfilingFeaturesSEC.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAmigoProfilingFeaturesSEC pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAmigoProfilingFeaturesSEC.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAmigoProfilingFeaturesSEC pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceAmigoProfilingFeaturesSEC.set_pNext(this.segment(), value); return this; } + + /// {@return `amigoProfiling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_amigoProfiling(MemorySegment segment, long index) { return (int) VH_amigoProfiling.get(segment, 0L, index); } + /// {@return `amigoProfiling`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_amigoProfiling(MemorySegment segment) { return VkPhysicalDeviceAmigoProfilingFeaturesSEC.get_amigoProfiling(segment, 0L); } + /// {@return `amigoProfiling` at the given index} + /// @param index the index + public @CType("VkBool32") int amigoProfilingAt(long index) { return VkPhysicalDeviceAmigoProfilingFeaturesSEC.get_amigoProfiling(this.segment(), index); } + /// {@return `amigoProfiling`} + public @CType("VkBool32") int amigoProfiling() { return VkPhysicalDeviceAmigoProfilingFeaturesSEC.get_amigoProfiling(this.segment()); } + /// Sets `amigoProfiling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_amigoProfiling(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_amigoProfiling.set(segment, 0L, index, value); } + /// Sets `amigoProfiling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_amigoProfiling(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceAmigoProfilingFeaturesSEC.set_amigoProfiling(segment, 0L, value); } + /// Sets `amigoProfiling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAmigoProfilingFeaturesSEC amigoProfilingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceAmigoProfilingFeaturesSEC.set_amigoProfiling(this.segment(), index, value); return this; } + /// Sets `amigoProfiling` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceAmigoProfilingFeaturesSEC amigoProfiling(@CType("VkBool32") int value) { VkPhysicalDeviceAmigoProfilingFeaturesSEC.set_amigoProfiling(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAllocationCallbacks.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAllocationCallbacks.java new file mode 100644 index 00000000..e2f2ab9a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAllocationCallbacks.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### pUserData +/// [VarHandle][#VH_pUserData] - [Getter][#pUserData()] - [Setter][#pUserData(java.lang.foreign.MemorySegment)] +/// ### pfnAllocation +/// [VarHandle][#VH_pfnAllocation] - [Getter][#pfnAllocation()] - [Setter][#pfnAllocation(java.lang.foreign.MemorySegment)] +/// ### pfnReallocation +/// [VarHandle][#VH_pfnReallocation] - [Getter][#pfnReallocation()] - [Setter][#pfnReallocation(java.lang.foreign.MemorySegment)] +/// ### pfnFree +/// [VarHandle][#VH_pfnFree] - [Getter][#pfnFree()] - [Setter][#pfnFree(java.lang.foreign.MemorySegment)] +/// ### pfnInternalAllocation +/// [VarHandle][#VH_pfnInternalAllocation] - [Getter][#pfnInternalAllocation()] - [Setter][#pfnInternalAllocation(java.lang.foreign.MemorySegment)] +/// ### pfnInternalFree +/// [VarHandle][#VH_pfnInternalFree] - [Getter][#pfnInternalFree()] - [Setter][#pfnInternalFree(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAllocationCallbacks { +/// void * pUserData; +/// PFN_vkAllocationFunction pfnAllocation; +/// PFN_vkReallocationFunction pfnReallocation; +/// PFN_vkFreeFunction pfnFree; +/// PFN_vkInternalAllocationNotification pfnInternalAllocation; +/// PFN_vkInternalFreeNotification pfnInternalFree; +/// } VkAllocationCallbacks; +/// ``` +public final class VkAllocationCallbacks extends Struct { + /// The struct layout of `VkAllocationCallbacks`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("pUserData"), + ValueLayout.ADDRESS.withName("pfnAllocation"), + ValueLayout.ADDRESS.withName("pfnReallocation"), + ValueLayout.ADDRESS.withName("pfnFree"), + ValueLayout.ADDRESS.withName("pfnInternalAllocation"), + ValueLayout.ADDRESS.withName("pfnInternalFree") + ); + /// The [VarHandle] of `pUserData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pUserData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pUserData")); + /// The [VarHandle] of `pfnAllocation` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pfnAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pfnAllocation")); + /// The [VarHandle] of `pfnReallocation` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pfnReallocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pfnReallocation")); + /// The [VarHandle] of `pfnFree` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pfnFree = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pfnFree")); + /// The [VarHandle] of `pfnInternalAllocation` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pfnInternalAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pfnInternalAllocation")); + /// The [VarHandle] of `pfnInternalFree` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pfnInternalFree = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pfnInternalFree")); + + /// Creates `VkAllocationCallbacks` with the given segment. + /// @param segment the memory segment + public VkAllocationCallbacks(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAllocationCallbacks` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAllocationCallbacks of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAllocationCallbacks(segment); } + + /// Creates `VkAllocationCallbacks` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAllocationCallbacks ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAllocationCallbacks(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAllocationCallbacks` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAllocationCallbacks ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAllocationCallbacks(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAllocationCallbacks` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAllocationCallbacks` + public static VkAllocationCallbacks alloc(SegmentAllocator allocator) { return new VkAllocationCallbacks(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAllocationCallbacks` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAllocationCallbacks` + public static VkAllocationCallbacks alloc(SegmentAllocator allocator, long count) { return new VkAllocationCallbacks(allocator.allocate(LAYOUT, count)); } + + /// {@return `pUserData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pUserData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pUserData.get(segment, 0L, index); } + /// {@return `pUserData`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pUserData(MemorySegment segment) { return VkAllocationCallbacks.get_pUserData(segment, 0L); } + /// {@return `pUserData` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pUserDataAt(long index) { return VkAllocationCallbacks.get_pUserData(this.segment(), index); } + /// {@return `pUserData`} + public @CType("void *") java.lang.foreign.MemorySegment pUserData() { return VkAllocationCallbacks.get_pUserData(this.segment()); } + /// Sets `pUserData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pUserData(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pUserData.set(segment, 0L, index, value); } + /// Sets `pUserData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pUserData(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pUserData(segment, 0L, value); } + /// Sets `pUserData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pUserDataAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pUserData(this.segment(), index, value); return this; } + /// Sets `pUserData` with the given value. + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pUserData(@CType("void *") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pUserData(this.segment(), value); return this; } + + /// {@return `pfnAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("PFN_vkAllocationFunction") java.lang.foreign.MemorySegment get_pfnAllocation(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pfnAllocation.get(segment, 0L, index); } + /// {@return `pfnAllocation`} + /// @param segment the segment of the struct + public static @CType("PFN_vkAllocationFunction") java.lang.foreign.MemorySegment get_pfnAllocation(MemorySegment segment) { return VkAllocationCallbacks.get_pfnAllocation(segment, 0L); } + /// {@return `pfnAllocation` at the given index} + /// @param index the index + public @CType("PFN_vkAllocationFunction") java.lang.foreign.MemorySegment pfnAllocationAt(long index) { return VkAllocationCallbacks.get_pfnAllocation(this.segment(), index); } + /// {@return `pfnAllocation`} + public @CType("PFN_vkAllocationFunction") java.lang.foreign.MemorySegment pfnAllocation() { return VkAllocationCallbacks.get_pfnAllocation(this.segment()); } + /// Sets `pfnAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pfnAllocation(MemorySegment segment, long index, @CType("PFN_vkAllocationFunction") java.lang.foreign.MemorySegment value) { VH_pfnAllocation.set(segment, 0L, index, value); } + /// Sets `pfnAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pfnAllocation(MemorySegment segment, @CType("PFN_vkAllocationFunction") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnAllocation(segment, 0L, value); } + /// Sets `pfnAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pfnAllocationAt(long index, @CType("PFN_vkAllocationFunction") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnAllocation(this.segment(), index, value); return this; } + /// Sets `pfnAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pfnAllocation(@CType("PFN_vkAllocationFunction") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnAllocation(this.segment(), value); return this; } + + /// {@return `pfnReallocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("PFN_vkReallocationFunction") java.lang.foreign.MemorySegment get_pfnReallocation(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pfnReallocation.get(segment, 0L, index); } + /// {@return `pfnReallocation`} + /// @param segment the segment of the struct + public static @CType("PFN_vkReallocationFunction") java.lang.foreign.MemorySegment get_pfnReallocation(MemorySegment segment) { return VkAllocationCallbacks.get_pfnReallocation(segment, 0L); } + /// {@return `pfnReallocation` at the given index} + /// @param index the index + public @CType("PFN_vkReallocationFunction") java.lang.foreign.MemorySegment pfnReallocationAt(long index) { return VkAllocationCallbacks.get_pfnReallocation(this.segment(), index); } + /// {@return `pfnReallocation`} + public @CType("PFN_vkReallocationFunction") java.lang.foreign.MemorySegment pfnReallocation() { return VkAllocationCallbacks.get_pfnReallocation(this.segment()); } + /// Sets `pfnReallocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pfnReallocation(MemorySegment segment, long index, @CType("PFN_vkReallocationFunction") java.lang.foreign.MemorySegment value) { VH_pfnReallocation.set(segment, 0L, index, value); } + /// Sets `pfnReallocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pfnReallocation(MemorySegment segment, @CType("PFN_vkReallocationFunction") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnReallocation(segment, 0L, value); } + /// Sets `pfnReallocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pfnReallocationAt(long index, @CType("PFN_vkReallocationFunction") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnReallocation(this.segment(), index, value); return this; } + /// Sets `pfnReallocation` with the given value. + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pfnReallocation(@CType("PFN_vkReallocationFunction") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnReallocation(this.segment(), value); return this; } + + /// {@return `pfnFree` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("PFN_vkFreeFunction") java.lang.foreign.MemorySegment get_pfnFree(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pfnFree.get(segment, 0L, index); } + /// {@return `pfnFree`} + /// @param segment the segment of the struct + public static @CType("PFN_vkFreeFunction") java.lang.foreign.MemorySegment get_pfnFree(MemorySegment segment) { return VkAllocationCallbacks.get_pfnFree(segment, 0L); } + /// {@return `pfnFree` at the given index} + /// @param index the index + public @CType("PFN_vkFreeFunction") java.lang.foreign.MemorySegment pfnFreeAt(long index) { return VkAllocationCallbacks.get_pfnFree(this.segment(), index); } + /// {@return `pfnFree`} + public @CType("PFN_vkFreeFunction") java.lang.foreign.MemorySegment pfnFree() { return VkAllocationCallbacks.get_pfnFree(this.segment()); } + /// Sets `pfnFree` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pfnFree(MemorySegment segment, long index, @CType("PFN_vkFreeFunction") java.lang.foreign.MemorySegment value) { VH_pfnFree.set(segment, 0L, index, value); } + /// Sets `pfnFree` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pfnFree(MemorySegment segment, @CType("PFN_vkFreeFunction") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnFree(segment, 0L, value); } + /// Sets `pfnFree` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pfnFreeAt(long index, @CType("PFN_vkFreeFunction") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnFree(this.segment(), index, value); return this; } + /// Sets `pfnFree` with the given value. + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pfnFree(@CType("PFN_vkFreeFunction") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnFree(this.segment(), value); return this; } + + /// {@return `pfnInternalAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("PFN_vkInternalAllocationNotification") java.lang.foreign.MemorySegment get_pfnInternalAllocation(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pfnInternalAllocation.get(segment, 0L, index); } + /// {@return `pfnInternalAllocation`} + /// @param segment the segment of the struct + public static @CType("PFN_vkInternalAllocationNotification") java.lang.foreign.MemorySegment get_pfnInternalAllocation(MemorySegment segment) { return VkAllocationCallbacks.get_pfnInternalAllocation(segment, 0L); } + /// {@return `pfnInternalAllocation` at the given index} + /// @param index the index + public @CType("PFN_vkInternalAllocationNotification") java.lang.foreign.MemorySegment pfnInternalAllocationAt(long index) { return VkAllocationCallbacks.get_pfnInternalAllocation(this.segment(), index); } + /// {@return `pfnInternalAllocation`} + public @CType("PFN_vkInternalAllocationNotification") java.lang.foreign.MemorySegment pfnInternalAllocation() { return VkAllocationCallbacks.get_pfnInternalAllocation(this.segment()); } + /// Sets `pfnInternalAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pfnInternalAllocation(MemorySegment segment, long index, @CType("PFN_vkInternalAllocationNotification") java.lang.foreign.MemorySegment value) { VH_pfnInternalAllocation.set(segment, 0L, index, value); } + /// Sets `pfnInternalAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pfnInternalAllocation(MemorySegment segment, @CType("PFN_vkInternalAllocationNotification") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnInternalAllocation(segment, 0L, value); } + /// Sets `pfnInternalAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pfnInternalAllocationAt(long index, @CType("PFN_vkInternalAllocationNotification") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnInternalAllocation(this.segment(), index, value); return this; } + /// Sets `pfnInternalAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pfnInternalAllocation(@CType("PFN_vkInternalAllocationNotification") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnInternalAllocation(this.segment(), value); return this; } + + /// {@return `pfnInternalFree` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("PFN_vkInternalFreeNotification") java.lang.foreign.MemorySegment get_pfnInternalFree(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pfnInternalFree.get(segment, 0L, index); } + /// {@return `pfnInternalFree`} + /// @param segment the segment of the struct + public static @CType("PFN_vkInternalFreeNotification") java.lang.foreign.MemorySegment get_pfnInternalFree(MemorySegment segment) { return VkAllocationCallbacks.get_pfnInternalFree(segment, 0L); } + /// {@return `pfnInternalFree` at the given index} + /// @param index the index + public @CType("PFN_vkInternalFreeNotification") java.lang.foreign.MemorySegment pfnInternalFreeAt(long index) { return VkAllocationCallbacks.get_pfnInternalFree(this.segment(), index); } + /// {@return `pfnInternalFree`} + public @CType("PFN_vkInternalFreeNotification") java.lang.foreign.MemorySegment pfnInternalFree() { return VkAllocationCallbacks.get_pfnInternalFree(this.segment()); } + /// Sets `pfnInternalFree` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pfnInternalFree(MemorySegment segment, long index, @CType("PFN_vkInternalFreeNotification") java.lang.foreign.MemorySegment value) { VH_pfnInternalFree.set(segment, 0L, index, value); } + /// Sets `pfnInternalFree` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pfnInternalFree(MemorySegment segment, @CType("PFN_vkInternalFreeNotification") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnInternalFree(segment, 0L, value); } + /// Sets `pfnInternalFree` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pfnInternalFreeAt(long index, @CType("PFN_vkInternalFreeNotification") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnInternalFree(this.segment(), index, value); return this; } + /// Sets `pfnInternalFree` with the given value. + /// @param value the value + /// @return `this` + public VkAllocationCallbacks pfnInternalFree(@CType("PFN_vkInternalFreeNotification") java.lang.foreign.MemorySegment value) { VkAllocationCallbacks.set_pfnInternalFree(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkApplicationInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkApplicationInfo.java new file mode 100644 index 00000000..16461e9a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkApplicationInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pApplicationName +/// [VarHandle][#VH_pApplicationName] - [Getter][#pApplicationName()] - [Setter][#pApplicationName(java.lang.foreign.MemorySegment)] +/// ### applicationVersion +/// [VarHandle][#VH_applicationVersion] - [Getter][#applicationVersion()] - [Setter][#applicationVersion(int)] +/// ### pEngineName +/// [VarHandle][#VH_pEngineName] - [Getter][#pEngineName()] - [Setter][#pEngineName(java.lang.foreign.MemorySegment)] +/// ### engineVersion +/// [VarHandle][#VH_engineVersion] - [Getter][#engineVersion()] - [Setter][#engineVersion(int)] +/// ### apiVersion +/// [VarHandle][#VH_apiVersion] - [Getter][#apiVersion()] - [Setter][#apiVersion(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkApplicationInfo { +/// VkStructureType sType; +/// const void * pNext; +/// const char * pApplicationName; +/// uint32_t applicationVersion; +/// const char * pEngineName; +/// uint32_t engineVersion; +/// uint32_t apiVersion; +/// } VkApplicationInfo; +/// ``` +public final class VkApplicationInfo extends Struct { + /// The struct layout of `VkApplicationInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pApplicationName"), + ValueLayout.JAVA_INT.withName("applicationVersion"), + ValueLayout.ADDRESS.withName("pEngineName"), + ValueLayout.JAVA_INT.withName("engineVersion"), + ValueLayout.JAVA_INT.withName("apiVersion") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pApplicationName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pApplicationName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pApplicationName")); + /// The [VarHandle] of `applicationVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_applicationVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("applicationVersion")); + /// The [VarHandle] of `pEngineName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pEngineName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pEngineName")); + /// The [VarHandle] of `engineVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_engineVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("engineVersion")); + /// The [VarHandle] of `apiVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_apiVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("apiVersion")); + + /// Creates `VkApplicationInfo` with the given segment. + /// @param segment the memory segment + public VkApplicationInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkApplicationInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkApplicationInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkApplicationInfo(segment); } + + /// Creates `VkApplicationInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkApplicationInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkApplicationInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkApplicationInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkApplicationInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkApplicationInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkApplicationInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkApplicationInfo` + public static VkApplicationInfo alloc(SegmentAllocator allocator) { return new VkApplicationInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkApplicationInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkApplicationInfo` + public static VkApplicationInfo alloc(SegmentAllocator allocator, long count) { return new VkApplicationInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkApplicationInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkApplicationInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkApplicationInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkApplicationInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkApplicationInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationInfo sType(@CType("VkStructureType") int value) { VkApplicationInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkApplicationInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkApplicationInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkApplicationInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkApplicationInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkApplicationInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkApplicationInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `pApplicationName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pApplicationName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pApplicationName.get(segment, 0L, index); } + /// {@return `pApplicationName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pApplicationName(MemorySegment segment) { return VkApplicationInfo.get_pApplicationName(segment, 0L); } + /// {@return `pApplicationName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pApplicationNameAt(long index) { return VkApplicationInfo.get_pApplicationName(this.segment(), index); } + /// {@return `pApplicationName`} + public @CType("const char *") java.lang.foreign.MemorySegment pApplicationName() { return VkApplicationInfo.get_pApplicationName(this.segment()); } + /// Sets `pApplicationName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pApplicationName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pApplicationName.set(segment, 0L, index, value); } + /// Sets `pApplicationName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pApplicationName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkApplicationInfo.set_pApplicationName(segment, 0L, value); } + /// Sets `pApplicationName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationInfo pApplicationNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkApplicationInfo.set_pApplicationName(this.segment(), index, value); return this; } + /// Sets `pApplicationName` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationInfo pApplicationName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkApplicationInfo.set_pApplicationName(this.segment(), value); return this; } + + /// {@return `applicationVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_applicationVersion(MemorySegment segment, long index) { return (int) VH_applicationVersion.get(segment, 0L, index); } + /// {@return `applicationVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_applicationVersion(MemorySegment segment) { return VkApplicationInfo.get_applicationVersion(segment, 0L); } + /// {@return `applicationVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int applicationVersionAt(long index) { return VkApplicationInfo.get_applicationVersion(this.segment(), index); } + /// {@return `applicationVersion`} + public @CType("uint32_t") int applicationVersion() { return VkApplicationInfo.get_applicationVersion(this.segment()); } + /// Sets `applicationVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_applicationVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_applicationVersion.set(segment, 0L, index, value); } + /// Sets `applicationVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_applicationVersion(MemorySegment segment, @CType("uint32_t") int value) { VkApplicationInfo.set_applicationVersion(segment, 0L, value); } + /// Sets `applicationVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationInfo applicationVersionAt(long index, @CType("uint32_t") int value) { VkApplicationInfo.set_applicationVersion(this.segment(), index, value); return this; } + /// Sets `applicationVersion` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationInfo applicationVersion(@CType("uint32_t") int value) { VkApplicationInfo.set_applicationVersion(this.segment(), value); return this; } + + /// {@return `pEngineName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pEngineName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pEngineName.get(segment, 0L, index); } + /// {@return `pEngineName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pEngineName(MemorySegment segment) { return VkApplicationInfo.get_pEngineName(segment, 0L); } + /// {@return `pEngineName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pEngineNameAt(long index) { return VkApplicationInfo.get_pEngineName(this.segment(), index); } + /// {@return `pEngineName`} + public @CType("const char *") java.lang.foreign.MemorySegment pEngineName() { return VkApplicationInfo.get_pEngineName(this.segment()); } + /// Sets `pEngineName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pEngineName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pEngineName.set(segment, 0L, index, value); } + /// Sets `pEngineName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pEngineName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkApplicationInfo.set_pEngineName(segment, 0L, value); } + /// Sets `pEngineName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationInfo pEngineNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkApplicationInfo.set_pEngineName(this.segment(), index, value); return this; } + /// Sets `pEngineName` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationInfo pEngineName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkApplicationInfo.set_pEngineName(this.segment(), value); return this; } + + /// {@return `engineVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_engineVersion(MemorySegment segment, long index) { return (int) VH_engineVersion.get(segment, 0L, index); } + /// {@return `engineVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_engineVersion(MemorySegment segment) { return VkApplicationInfo.get_engineVersion(segment, 0L); } + /// {@return `engineVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int engineVersionAt(long index) { return VkApplicationInfo.get_engineVersion(this.segment(), index); } + /// {@return `engineVersion`} + public @CType("uint32_t") int engineVersion() { return VkApplicationInfo.get_engineVersion(this.segment()); } + /// Sets `engineVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_engineVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_engineVersion.set(segment, 0L, index, value); } + /// Sets `engineVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_engineVersion(MemorySegment segment, @CType("uint32_t") int value) { VkApplicationInfo.set_engineVersion(segment, 0L, value); } + /// Sets `engineVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationInfo engineVersionAt(long index, @CType("uint32_t") int value) { VkApplicationInfo.set_engineVersion(this.segment(), index, value); return this; } + /// Sets `engineVersion` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationInfo engineVersion(@CType("uint32_t") int value) { VkApplicationInfo.set_engineVersion(this.segment(), value); return this; } + + /// {@return `apiVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_apiVersion(MemorySegment segment, long index) { return (int) VH_apiVersion.get(segment, 0L, index); } + /// {@return `apiVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_apiVersion(MemorySegment segment) { return VkApplicationInfo.get_apiVersion(segment, 0L); } + /// {@return `apiVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int apiVersionAt(long index) { return VkApplicationInfo.get_apiVersion(this.segment(), index); } + /// {@return `apiVersion`} + public @CType("uint32_t") int apiVersion() { return VkApplicationInfo.get_apiVersion(this.segment()); } + /// Sets `apiVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_apiVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_apiVersion.set(segment, 0L, index, value); } + /// Sets `apiVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_apiVersion(MemorySegment segment, @CType("uint32_t") int value) { VkApplicationInfo.set_apiVersion(segment, 0L, value); } + /// Sets `apiVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkApplicationInfo apiVersionAt(long index, @CType("uint32_t") int value) { VkApplicationInfo.set_apiVersion(this.segment(), index, value); return this; } + /// Sets `apiVersion` with the given value. + /// @param value the value + /// @return `this` + public VkApplicationInfo apiVersion(@CType("uint32_t") int value) { VkApplicationInfo.set_apiVersion(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentDescription.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentDescription.java new file mode 100644 index 00000000..d9e278b9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentDescription.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### samples +/// [VarHandle][#VH_samples] - [Getter][#samples()] - [Setter][#samples(int)] +/// ### loadOp +/// [VarHandle][#VH_loadOp] - [Getter][#loadOp()] - [Setter][#loadOp(int)] +/// ### storeOp +/// [VarHandle][#VH_storeOp] - [Getter][#storeOp()] - [Setter][#storeOp(int)] +/// ### stencilLoadOp +/// [VarHandle][#VH_stencilLoadOp] - [Getter][#stencilLoadOp()] - [Setter][#stencilLoadOp(int)] +/// ### stencilStoreOp +/// [VarHandle][#VH_stencilStoreOp] - [Getter][#stencilStoreOp()] - [Setter][#stencilStoreOp(int)] +/// ### initialLayout +/// [VarHandle][#VH_initialLayout] - [Getter][#initialLayout()] - [Setter][#initialLayout(int)] +/// ### finalLayout +/// [VarHandle][#VH_finalLayout] - [Getter][#finalLayout()] - [Setter][#finalLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAttachmentDescription { +/// VkAttachmentDescriptionFlags flags; +/// VkFormat format; +/// VkSampleCountFlagBits samples; +/// VkAttachmentLoadOp loadOp; +/// VkAttachmentStoreOp storeOp; +/// VkAttachmentLoadOp stencilLoadOp; +/// VkAttachmentStoreOp stencilStoreOp; +/// VkImageLayout initialLayout; +/// VkImageLayout finalLayout; +/// } VkAttachmentDescription; +/// ``` +public final class VkAttachmentDescription extends Struct { + /// The struct layout of `VkAttachmentDescription`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_INT.withName("samples"), + ValueLayout.JAVA_INT.withName("loadOp"), + ValueLayout.JAVA_INT.withName("storeOp"), + ValueLayout.JAVA_INT.withName("stencilLoadOp"), + ValueLayout.JAVA_INT.withName("stencilStoreOp"), + ValueLayout.JAVA_INT.withName("initialLayout"), + ValueLayout.JAVA_INT.withName("finalLayout") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `samples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samples")); + /// The [VarHandle] of `loadOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_loadOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("loadOp")); + /// The [VarHandle] of `storeOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storeOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storeOp")); + /// The [VarHandle] of `stencilLoadOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilLoadOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilLoadOp")); + /// The [VarHandle] of `stencilStoreOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilStoreOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilStoreOp")); + /// The [VarHandle] of `initialLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_initialLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initialLayout")); + /// The [VarHandle] of `finalLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_finalLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("finalLayout")); + + /// Creates `VkAttachmentDescription` with the given segment. + /// @param segment the memory segment + public VkAttachmentDescription(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAttachmentDescription` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentDescription of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentDescription(segment); } + + /// Creates `VkAttachmentDescription` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentDescription ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentDescription(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAttachmentDescription` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentDescription ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentDescription(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAttachmentDescription` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAttachmentDescription` + public static VkAttachmentDescription alloc(SegmentAllocator allocator) { return new VkAttachmentDescription(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAttachmentDescription` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAttachmentDescription` + public static VkAttachmentDescription alloc(SegmentAllocator allocator, long count) { return new VkAttachmentDescription(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentDescriptionFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentDescriptionFlags") int get_flags(MemorySegment segment) { return VkAttachmentDescription.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkAttachmentDescriptionFlags") int flagsAt(long index) { return VkAttachmentDescription.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkAttachmentDescriptionFlags") int flags() { return VkAttachmentDescription.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkAttachmentDescriptionFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkAttachmentDescriptionFlags") int value) { VkAttachmentDescription.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription flagsAt(long index, @CType("VkAttachmentDescriptionFlags") int value) { VkAttachmentDescription.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription flags(@CType("VkAttachmentDescriptionFlags") int value) { VkAttachmentDescription.set_flags(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkAttachmentDescription.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkAttachmentDescription.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkAttachmentDescription.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkAttachmentDescription.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription formatAt(long index, @CType("VkFormat") int value) { VkAttachmentDescription.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription format(@CType("VkFormat") int value) { VkAttachmentDescription.set_format(this.segment(), value); return this; } + + /// {@return `samples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_samples(MemorySegment segment, long index) { return (int) VH_samples.get(segment, 0L, index); } + /// {@return `samples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_samples(MemorySegment segment) { return VkAttachmentDescription.get_samples(segment, 0L); } + /// {@return `samples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int samplesAt(long index) { return VkAttachmentDescription.get_samples(this.segment(), index); } + /// {@return `samples`} + public @CType("VkSampleCountFlagBits") int samples() { return VkAttachmentDescription.get_samples(this.segment()); } + /// Sets `samples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samples(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_samples.set(segment, 0L, index, value); } + /// Sets `samples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samples(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkAttachmentDescription.set_samples(segment, 0L, value); } + /// Sets `samples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription samplesAt(long index, @CType("VkSampleCountFlagBits") int value) { VkAttachmentDescription.set_samples(this.segment(), index, value); return this; } + /// Sets `samples` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription samples(@CType("VkSampleCountFlagBits") int value) { VkAttachmentDescription.set_samples(this.segment(), value); return this; } + + /// {@return `loadOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentLoadOp") int get_loadOp(MemorySegment segment, long index) { return (int) VH_loadOp.get(segment, 0L, index); } + /// {@return `loadOp`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentLoadOp") int get_loadOp(MemorySegment segment) { return VkAttachmentDescription.get_loadOp(segment, 0L); } + /// {@return `loadOp` at the given index} + /// @param index the index + public @CType("VkAttachmentLoadOp") int loadOpAt(long index) { return VkAttachmentDescription.get_loadOp(this.segment(), index); } + /// {@return `loadOp`} + public @CType("VkAttachmentLoadOp") int loadOp() { return VkAttachmentDescription.get_loadOp(this.segment()); } + /// Sets `loadOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_loadOp(MemorySegment segment, long index, @CType("VkAttachmentLoadOp") int value) { VH_loadOp.set(segment, 0L, index, value); } + /// Sets `loadOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_loadOp(MemorySegment segment, @CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription.set_loadOp(segment, 0L, value); } + /// Sets `loadOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription loadOpAt(long index, @CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription.set_loadOp(this.segment(), index, value); return this; } + /// Sets `loadOp` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription loadOp(@CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription.set_loadOp(this.segment(), value); return this; } + + /// {@return `storeOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentStoreOp") int get_storeOp(MemorySegment segment, long index) { return (int) VH_storeOp.get(segment, 0L, index); } + /// {@return `storeOp`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentStoreOp") int get_storeOp(MemorySegment segment) { return VkAttachmentDescription.get_storeOp(segment, 0L); } + /// {@return `storeOp` at the given index} + /// @param index the index + public @CType("VkAttachmentStoreOp") int storeOpAt(long index) { return VkAttachmentDescription.get_storeOp(this.segment(), index); } + /// {@return `storeOp`} + public @CType("VkAttachmentStoreOp") int storeOp() { return VkAttachmentDescription.get_storeOp(this.segment()); } + /// Sets `storeOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storeOp(MemorySegment segment, long index, @CType("VkAttachmentStoreOp") int value) { VH_storeOp.set(segment, 0L, index, value); } + /// Sets `storeOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storeOp(MemorySegment segment, @CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription.set_storeOp(segment, 0L, value); } + /// Sets `storeOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription storeOpAt(long index, @CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription.set_storeOp(this.segment(), index, value); return this; } + /// Sets `storeOp` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription storeOp(@CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription.set_storeOp(this.segment(), value); return this; } + + /// {@return `stencilLoadOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentLoadOp") int get_stencilLoadOp(MemorySegment segment, long index) { return (int) VH_stencilLoadOp.get(segment, 0L, index); } + /// {@return `stencilLoadOp`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentLoadOp") int get_stencilLoadOp(MemorySegment segment) { return VkAttachmentDescription.get_stencilLoadOp(segment, 0L); } + /// {@return `stencilLoadOp` at the given index} + /// @param index the index + public @CType("VkAttachmentLoadOp") int stencilLoadOpAt(long index) { return VkAttachmentDescription.get_stencilLoadOp(this.segment(), index); } + /// {@return `stencilLoadOp`} + public @CType("VkAttachmentLoadOp") int stencilLoadOp() { return VkAttachmentDescription.get_stencilLoadOp(this.segment()); } + /// Sets `stencilLoadOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilLoadOp(MemorySegment segment, long index, @CType("VkAttachmentLoadOp") int value) { VH_stencilLoadOp.set(segment, 0L, index, value); } + /// Sets `stencilLoadOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilLoadOp(MemorySegment segment, @CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription.set_stencilLoadOp(segment, 0L, value); } + /// Sets `stencilLoadOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription stencilLoadOpAt(long index, @CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription.set_stencilLoadOp(this.segment(), index, value); return this; } + /// Sets `stencilLoadOp` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription stencilLoadOp(@CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription.set_stencilLoadOp(this.segment(), value); return this; } + + /// {@return `stencilStoreOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentStoreOp") int get_stencilStoreOp(MemorySegment segment, long index) { return (int) VH_stencilStoreOp.get(segment, 0L, index); } + /// {@return `stencilStoreOp`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentStoreOp") int get_stencilStoreOp(MemorySegment segment) { return VkAttachmentDescription.get_stencilStoreOp(segment, 0L); } + /// {@return `stencilStoreOp` at the given index} + /// @param index the index + public @CType("VkAttachmentStoreOp") int stencilStoreOpAt(long index) { return VkAttachmentDescription.get_stencilStoreOp(this.segment(), index); } + /// {@return `stencilStoreOp`} + public @CType("VkAttachmentStoreOp") int stencilStoreOp() { return VkAttachmentDescription.get_stencilStoreOp(this.segment()); } + /// Sets `stencilStoreOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilStoreOp(MemorySegment segment, long index, @CType("VkAttachmentStoreOp") int value) { VH_stencilStoreOp.set(segment, 0L, index, value); } + /// Sets `stencilStoreOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilStoreOp(MemorySegment segment, @CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription.set_stencilStoreOp(segment, 0L, value); } + /// Sets `stencilStoreOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription stencilStoreOpAt(long index, @CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription.set_stencilStoreOp(this.segment(), index, value); return this; } + /// Sets `stencilStoreOp` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription stencilStoreOp(@CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription.set_stencilStoreOp(this.segment(), value); return this; } + + /// {@return `initialLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_initialLayout(MemorySegment segment, long index) { return (int) VH_initialLayout.get(segment, 0L, index); } + /// {@return `initialLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_initialLayout(MemorySegment segment) { return VkAttachmentDescription.get_initialLayout(segment, 0L); } + /// {@return `initialLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int initialLayoutAt(long index) { return VkAttachmentDescription.get_initialLayout(this.segment(), index); } + /// {@return `initialLayout`} + public @CType("VkImageLayout") int initialLayout() { return VkAttachmentDescription.get_initialLayout(this.segment()); } + /// Sets `initialLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initialLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_initialLayout.set(segment, 0L, index, value); } + /// Sets `initialLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initialLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkAttachmentDescription.set_initialLayout(segment, 0L, value); } + /// Sets `initialLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription initialLayoutAt(long index, @CType("VkImageLayout") int value) { VkAttachmentDescription.set_initialLayout(this.segment(), index, value); return this; } + /// Sets `initialLayout` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription initialLayout(@CType("VkImageLayout") int value) { VkAttachmentDescription.set_initialLayout(this.segment(), value); return this; } + + /// {@return `finalLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_finalLayout(MemorySegment segment, long index) { return (int) VH_finalLayout.get(segment, 0L, index); } + /// {@return `finalLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_finalLayout(MemorySegment segment) { return VkAttachmentDescription.get_finalLayout(segment, 0L); } + /// {@return `finalLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int finalLayoutAt(long index) { return VkAttachmentDescription.get_finalLayout(this.segment(), index); } + /// {@return `finalLayout`} + public @CType("VkImageLayout") int finalLayout() { return VkAttachmentDescription.get_finalLayout(this.segment()); } + /// Sets `finalLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_finalLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_finalLayout.set(segment, 0L, index, value); } + /// Sets `finalLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_finalLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkAttachmentDescription.set_finalLayout(segment, 0L, value); } + /// Sets `finalLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription finalLayoutAt(long index, @CType("VkImageLayout") int value) { VkAttachmentDescription.set_finalLayout(this.segment(), index, value); return this; } + /// Sets `finalLayout` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription finalLayout(@CType("VkImageLayout") int value) { VkAttachmentDescription.set_finalLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentDescription2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentDescription2.java new file mode 100644 index 00000000..03f9f8d0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentDescription2.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### samples +/// [VarHandle][#VH_samples] - [Getter][#samples()] - [Setter][#samples(int)] +/// ### loadOp +/// [VarHandle][#VH_loadOp] - [Getter][#loadOp()] - [Setter][#loadOp(int)] +/// ### storeOp +/// [VarHandle][#VH_storeOp] - [Getter][#storeOp()] - [Setter][#storeOp(int)] +/// ### stencilLoadOp +/// [VarHandle][#VH_stencilLoadOp] - [Getter][#stencilLoadOp()] - [Setter][#stencilLoadOp(int)] +/// ### stencilStoreOp +/// [VarHandle][#VH_stencilStoreOp] - [Getter][#stencilStoreOp()] - [Setter][#stencilStoreOp(int)] +/// ### initialLayout +/// [VarHandle][#VH_initialLayout] - [Getter][#initialLayout()] - [Setter][#initialLayout(int)] +/// ### finalLayout +/// [VarHandle][#VH_finalLayout] - [Getter][#finalLayout()] - [Setter][#finalLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAttachmentDescription2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkAttachmentDescriptionFlags flags; +/// VkFormat format; +/// VkSampleCountFlagBits samples; +/// VkAttachmentLoadOp loadOp; +/// VkAttachmentStoreOp storeOp; +/// VkAttachmentLoadOp stencilLoadOp; +/// VkAttachmentStoreOp stencilStoreOp; +/// VkImageLayout initialLayout; +/// VkImageLayout finalLayout; +/// } VkAttachmentDescription2; +/// ``` +public final class VkAttachmentDescription2 extends Struct { + /// The struct layout of `VkAttachmentDescription2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_INT.withName("samples"), + ValueLayout.JAVA_INT.withName("loadOp"), + ValueLayout.JAVA_INT.withName("storeOp"), + ValueLayout.JAVA_INT.withName("stencilLoadOp"), + ValueLayout.JAVA_INT.withName("stencilStoreOp"), + ValueLayout.JAVA_INT.withName("initialLayout"), + ValueLayout.JAVA_INT.withName("finalLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `samples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samples")); + /// The [VarHandle] of `loadOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_loadOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("loadOp")); + /// The [VarHandle] of `storeOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storeOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storeOp")); + /// The [VarHandle] of `stencilLoadOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilLoadOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilLoadOp")); + /// The [VarHandle] of `stencilStoreOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilStoreOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilStoreOp")); + /// The [VarHandle] of `initialLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_initialLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initialLayout")); + /// The [VarHandle] of `finalLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_finalLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("finalLayout")); + + /// Creates `VkAttachmentDescription2` with the given segment. + /// @param segment the memory segment + public VkAttachmentDescription2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAttachmentDescription2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentDescription2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentDescription2(segment); } + + /// Creates `VkAttachmentDescription2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentDescription2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentDescription2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAttachmentDescription2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentDescription2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentDescription2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAttachmentDescription2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAttachmentDescription2` + public static VkAttachmentDescription2 alloc(SegmentAllocator allocator) { return new VkAttachmentDescription2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAttachmentDescription2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAttachmentDescription2` + public static VkAttachmentDescription2 alloc(SegmentAllocator allocator, long count) { return new VkAttachmentDescription2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAttachmentDescription2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAttachmentDescription2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAttachmentDescription2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAttachmentDescription2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 sTypeAt(long index, @CType("VkStructureType") int value) { VkAttachmentDescription2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 sType(@CType("VkStructureType") int value) { VkAttachmentDescription2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAttachmentDescription2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAttachmentDescription2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAttachmentDescription2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAttachmentDescription2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAttachmentDescription2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAttachmentDescription2.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentDescriptionFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentDescriptionFlags") int get_flags(MemorySegment segment) { return VkAttachmentDescription2.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkAttachmentDescriptionFlags") int flagsAt(long index) { return VkAttachmentDescription2.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkAttachmentDescriptionFlags") int flags() { return VkAttachmentDescription2.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkAttachmentDescriptionFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkAttachmentDescriptionFlags") int value) { VkAttachmentDescription2.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 flagsAt(long index, @CType("VkAttachmentDescriptionFlags") int value) { VkAttachmentDescription2.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 flags(@CType("VkAttachmentDescriptionFlags") int value) { VkAttachmentDescription2.set_flags(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkAttachmentDescription2.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkAttachmentDescription2.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkAttachmentDescription2.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkAttachmentDescription2.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 formatAt(long index, @CType("VkFormat") int value) { VkAttachmentDescription2.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 format(@CType("VkFormat") int value) { VkAttachmentDescription2.set_format(this.segment(), value); return this; } + + /// {@return `samples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_samples(MemorySegment segment, long index) { return (int) VH_samples.get(segment, 0L, index); } + /// {@return `samples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_samples(MemorySegment segment) { return VkAttachmentDescription2.get_samples(segment, 0L); } + /// {@return `samples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int samplesAt(long index) { return VkAttachmentDescription2.get_samples(this.segment(), index); } + /// {@return `samples`} + public @CType("VkSampleCountFlagBits") int samples() { return VkAttachmentDescription2.get_samples(this.segment()); } + /// Sets `samples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samples(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_samples.set(segment, 0L, index, value); } + /// Sets `samples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samples(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkAttachmentDescription2.set_samples(segment, 0L, value); } + /// Sets `samples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 samplesAt(long index, @CType("VkSampleCountFlagBits") int value) { VkAttachmentDescription2.set_samples(this.segment(), index, value); return this; } + /// Sets `samples` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 samples(@CType("VkSampleCountFlagBits") int value) { VkAttachmentDescription2.set_samples(this.segment(), value); return this; } + + /// {@return `loadOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentLoadOp") int get_loadOp(MemorySegment segment, long index) { return (int) VH_loadOp.get(segment, 0L, index); } + /// {@return `loadOp`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentLoadOp") int get_loadOp(MemorySegment segment) { return VkAttachmentDescription2.get_loadOp(segment, 0L); } + /// {@return `loadOp` at the given index} + /// @param index the index + public @CType("VkAttachmentLoadOp") int loadOpAt(long index) { return VkAttachmentDescription2.get_loadOp(this.segment(), index); } + /// {@return `loadOp`} + public @CType("VkAttachmentLoadOp") int loadOp() { return VkAttachmentDescription2.get_loadOp(this.segment()); } + /// Sets `loadOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_loadOp(MemorySegment segment, long index, @CType("VkAttachmentLoadOp") int value) { VH_loadOp.set(segment, 0L, index, value); } + /// Sets `loadOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_loadOp(MemorySegment segment, @CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription2.set_loadOp(segment, 0L, value); } + /// Sets `loadOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 loadOpAt(long index, @CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription2.set_loadOp(this.segment(), index, value); return this; } + /// Sets `loadOp` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 loadOp(@CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription2.set_loadOp(this.segment(), value); return this; } + + /// {@return `storeOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentStoreOp") int get_storeOp(MemorySegment segment, long index) { return (int) VH_storeOp.get(segment, 0L, index); } + /// {@return `storeOp`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentStoreOp") int get_storeOp(MemorySegment segment) { return VkAttachmentDescription2.get_storeOp(segment, 0L); } + /// {@return `storeOp` at the given index} + /// @param index the index + public @CType("VkAttachmentStoreOp") int storeOpAt(long index) { return VkAttachmentDescription2.get_storeOp(this.segment(), index); } + /// {@return `storeOp`} + public @CType("VkAttachmentStoreOp") int storeOp() { return VkAttachmentDescription2.get_storeOp(this.segment()); } + /// Sets `storeOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storeOp(MemorySegment segment, long index, @CType("VkAttachmentStoreOp") int value) { VH_storeOp.set(segment, 0L, index, value); } + /// Sets `storeOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storeOp(MemorySegment segment, @CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription2.set_storeOp(segment, 0L, value); } + /// Sets `storeOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 storeOpAt(long index, @CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription2.set_storeOp(this.segment(), index, value); return this; } + /// Sets `storeOp` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 storeOp(@CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription2.set_storeOp(this.segment(), value); return this; } + + /// {@return `stencilLoadOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentLoadOp") int get_stencilLoadOp(MemorySegment segment, long index) { return (int) VH_stencilLoadOp.get(segment, 0L, index); } + /// {@return `stencilLoadOp`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentLoadOp") int get_stencilLoadOp(MemorySegment segment) { return VkAttachmentDescription2.get_stencilLoadOp(segment, 0L); } + /// {@return `stencilLoadOp` at the given index} + /// @param index the index + public @CType("VkAttachmentLoadOp") int stencilLoadOpAt(long index) { return VkAttachmentDescription2.get_stencilLoadOp(this.segment(), index); } + /// {@return `stencilLoadOp`} + public @CType("VkAttachmentLoadOp") int stencilLoadOp() { return VkAttachmentDescription2.get_stencilLoadOp(this.segment()); } + /// Sets `stencilLoadOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilLoadOp(MemorySegment segment, long index, @CType("VkAttachmentLoadOp") int value) { VH_stencilLoadOp.set(segment, 0L, index, value); } + /// Sets `stencilLoadOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilLoadOp(MemorySegment segment, @CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription2.set_stencilLoadOp(segment, 0L, value); } + /// Sets `stencilLoadOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 stencilLoadOpAt(long index, @CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription2.set_stencilLoadOp(this.segment(), index, value); return this; } + /// Sets `stencilLoadOp` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 stencilLoadOp(@CType("VkAttachmentLoadOp") int value) { VkAttachmentDescription2.set_stencilLoadOp(this.segment(), value); return this; } + + /// {@return `stencilStoreOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentStoreOp") int get_stencilStoreOp(MemorySegment segment, long index) { return (int) VH_stencilStoreOp.get(segment, 0L, index); } + /// {@return `stencilStoreOp`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentStoreOp") int get_stencilStoreOp(MemorySegment segment) { return VkAttachmentDescription2.get_stencilStoreOp(segment, 0L); } + /// {@return `stencilStoreOp` at the given index} + /// @param index the index + public @CType("VkAttachmentStoreOp") int stencilStoreOpAt(long index) { return VkAttachmentDescription2.get_stencilStoreOp(this.segment(), index); } + /// {@return `stencilStoreOp`} + public @CType("VkAttachmentStoreOp") int stencilStoreOp() { return VkAttachmentDescription2.get_stencilStoreOp(this.segment()); } + /// Sets `stencilStoreOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilStoreOp(MemorySegment segment, long index, @CType("VkAttachmentStoreOp") int value) { VH_stencilStoreOp.set(segment, 0L, index, value); } + /// Sets `stencilStoreOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilStoreOp(MemorySegment segment, @CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription2.set_stencilStoreOp(segment, 0L, value); } + /// Sets `stencilStoreOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 stencilStoreOpAt(long index, @CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription2.set_stencilStoreOp(this.segment(), index, value); return this; } + /// Sets `stencilStoreOp` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 stencilStoreOp(@CType("VkAttachmentStoreOp") int value) { VkAttachmentDescription2.set_stencilStoreOp(this.segment(), value); return this; } + + /// {@return `initialLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_initialLayout(MemorySegment segment, long index) { return (int) VH_initialLayout.get(segment, 0L, index); } + /// {@return `initialLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_initialLayout(MemorySegment segment) { return VkAttachmentDescription2.get_initialLayout(segment, 0L); } + /// {@return `initialLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int initialLayoutAt(long index) { return VkAttachmentDescription2.get_initialLayout(this.segment(), index); } + /// {@return `initialLayout`} + public @CType("VkImageLayout") int initialLayout() { return VkAttachmentDescription2.get_initialLayout(this.segment()); } + /// Sets `initialLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initialLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_initialLayout.set(segment, 0L, index, value); } + /// Sets `initialLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initialLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkAttachmentDescription2.set_initialLayout(segment, 0L, value); } + /// Sets `initialLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 initialLayoutAt(long index, @CType("VkImageLayout") int value) { VkAttachmentDescription2.set_initialLayout(this.segment(), index, value); return this; } + /// Sets `initialLayout` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 initialLayout(@CType("VkImageLayout") int value) { VkAttachmentDescription2.set_initialLayout(this.segment(), value); return this; } + + /// {@return `finalLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_finalLayout(MemorySegment segment, long index) { return (int) VH_finalLayout.get(segment, 0L, index); } + /// {@return `finalLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_finalLayout(MemorySegment segment) { return VkAttachmentDescription2.get_finalLayout(segment, 0L); } + /// {@return `finalLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int finalLayoutAt(long index) { return VkAttachmentDescription2.get_finalLayout(this.segment(), index); } + /// {@return `finalLayout`} + public @CType("VkImageLayout") int finalLayout() { return VkAttachmentDescription2.get_finalLayout(this.segment()); } + /// Sets `finalLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_finalLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_finalLayout.set(segment, 0L, index, value); } + /// Sets `finalLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_finalLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkAttachmentDescription2.set_finalLayout(segment, 0L, value); } + /// Sets `finalLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 finalLayoutAt(long index, @CType("VkImageLayout") int value) { VkAttachmentDescription2.set_finalLayout(this.segment(), index, value); return this; } + /// Sets `finalLayout` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescription2 finalLayout(@CType("VkImageLayout") int value) { VkAttachmentDescription2.set_finalLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentDescriptionStencilLayout.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentDescriptionStencilLayout.java new file mode 100644 index 00000000..5a4ed7ec --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentDescriptionStencilLayout.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stencilInitialLayout +/// [VarHandle][#VH_stencilInitialLayout] - [Getter][#stencilInitialLayout()] - [Setter][#stencilInitialLayout(int)] +/// ### stencilFinalLayout +/// [VarHandle][#VH_stencilFinalLayout] - [Getter][#stencilFinalLayout()] - [Setter][#stencilFinalLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAttachmentDescriptionStencilLayout { +/// VkStructureType sType; +/// void * pNext; +/// VkImageLayout stencilInitialLayout; +/// VkImageLayout stencilFinalLayout; +/// } VkAttachmentDescriptionStencilLayout; +/// ``` +public final class VkAttachmentDescriptionStencilLayout extends Struct { + /// The struct layout of `VkAttachmentDescriptionStencilLayout`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stencilInitialLayout"), + ValueLayout.JAVA_INT.withName("stencilFinalLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stencilInitialLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilInitialLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilInitialLayout")); + /// The [VarHandle] of `stencilFinalLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilFinalLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilFinalLayout")); + + /// Creates `VkAttachmentDescriptionStencilLayout` with the given segment. + /// @param segment the memory segment + public VkAttachmentDescriptionStencilLayout(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAttachmentDescriptionStencilLayout` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentDescriptionStencilLayout of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentDescriptionStencilLayout(segment); } + + /// Creates `VkAttachmentDescriptionStencilLayout` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentDescriptionStencilLayout ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentDescriptionStencilLayout(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAttachmentDescriptionStencilLayout` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentDescriptionStencilLayout ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentDescriptionStencilLayout(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAttachmentDescriptionStencilLayout` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAttachmentDescriptionStencilLayout` + public static VkAttachmentDescriptionStencilLayout alloc(SegmentAllocator allocator) { return new VkAttachmentDescriptionStencilLayout(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAttachmentDescriptionStencilLayout` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAttachmentDescriptionStencilLayout` + public static VkAttachmentDescriptionStencilLayout alloc(SegmentAllocator allocator, long count) { return new VkAttachmentDescriptionStencilLayout(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAttachmentDescriptionStencilLayout.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAttachmentDescriptionStencilLayout.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAttachmentDescriptionStencilLayout.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAttachmentDescriptionStencilLayout.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescriptionStencilLayout sTypeAt(long index, @CType("VkStructureType") int value) { VkAttachmentDescriptionStencilLayout.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescriptionStencilLayout sType(@CType("VkStructureType") int value) { VkAttachmentDescriptionStencilLayout.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAttachmentDescriptionStencilLayout.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAttachmentDescriptionStencilLayout.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkAttachmentDescriptionStencilLayout.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAttachmentDescriptionStencilLayout.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescriptionStencilLayout pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAttachmentDescriptionStencilLayout.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescriptionStencilLayout pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkAttachmentDescriptionStencilLayout.set_pNext(this.segment(), value); return this; } + + /// {@return `stencilInitialLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_stencilInitialLayout(MemorySegment segment, long index) { return (int) VH_stencilInitialLayout.get(segment, 0L, index); } + /// {@return `stencilInitialLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_stencilInitialLayout(MemorySegment segment) { return VkAttachmentDescriptionStencilLayout.get_stencilInitialLayout(segment, 0L); } + /// {@return `stencilInitialLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int stencilInitialLayoutAt(long index) { return VkAttachmentDescriptionStencilLayout.get_stencilInitialLayout(this.segment(), index); } + /// {@return `stencilInitialLayout`} + public @CType("VkImageLayout") int stencilInitialLayout() { return VkAttachmentDescriptionStencilLayout.get_stencilInitialLayout(this.segment()); } + /// Sets `stencilInitialLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilInitialLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_stencilInitialLayout.set(segment, 0L, index, value); } + /// Sets `stencilInitialLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilInitialLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkAttachmentDescriptionStencilLayout.set_stencilInitialLayout(segment, 0L, value); } + /// Sets `stencilInitialLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescriptionStencilLayout stencilInitialLayoutAt(long index, @CType("VkImageLayout") int value) { VkAttachmentDescriptionStencilLayout.set_stencilInitialLayout(this.segment(), index, value); return this; } + /// Sets `stencilInitialLayout` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescriptionStencilLayout stencilInitialLayout(@CType("VkImageLayout") int value) { VkAttachmentDescriptionStencilLayout.set_stencilInitialLayout(this.segment(), value); return this; } + + /// {@return `stencilFinalLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_stencilFinalLayout(MemorySegment segment, long index) { return (int) VH_stencilFinalLayout.get(segment, 0L, index); } + /// {@return `stencilFinalLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_stencilFinalLayout(MemorySegment segment) { return VkAttachmentDescriptionStencilLayout.get_stencilFinalLayout(segment, 0L); } + /// {@return `stencilFinalLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int stencilFinalLayoutAt(long index) { return VkAttachmentDescriptionStencilLayout.get_stencilFinalLayout(this.segment(), index); } + /// {@return `stencilFinalLayout`} + public @CType("VkImageLayout") int stencilFinalLayout() { return VkAttachmentDescriptionStencilLayout.get_stencilFinalLayout(this.segment()); } + /// Sets `stencilFinalLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilFinalLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_stencilFinalLayout.set(segment, 0L, index, value); } + /// Sets `stencilFinalLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilFinalLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkAttachmentDescriptionStencilLayout.set_stencilFinalLayout(segment, 0L, value); } + /// Sets `stencilFinalLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentDescriptionStencilLayout stencilFinalLayoutAt(long index, @CType("VkImageLayout") int value) { VkAttachmentDescriptionStencilLayout.set_stencilFinalLayout(this.segment(), index, value); return this; } + /// Sets `stencilFinalLayout` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentDescriptionStencilLayout stencilFinalLayout(@CType("VkImageLayout") int value) { VkAttachmentDescriptionStencilLayout.set_stencilFinalLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentReference.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentReference.java new file mode 100644 index 00000000..b704d3f7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentReference.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### attachment +/// [VarHandle][#VH_attachment] - [Getter][#attachment()] - [Setter][#attachment(int)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAttachmentReference { +/// uint32_t attachment; +/// VkImageLayout layout; +/// } VkAttachmentReference; +/// ``` +public final class VkAttachmentReference extends Struct { + /// The struct layout of `VkAttachmentReference`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("attachment"), + ValueLayout.JAVA_INT.withName("layout") + ); + /// The [VarHandle] of `attachment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachment")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + + /// Creates `VkAttachmentReference` with the given segment. + /// @param segment the memory segment + public VkAttachmentReference(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAttachmentReference` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentReference of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentReference(segment); } + + /// Creates `VkAttachmentReference` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentReference ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentReference(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAttachmentReference` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentReference ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentReference(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAttachmentReference` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAttachmentReference` + public static VkAttachmentReference alloc(SegmentAllocator allocator) { return new VkAttachmentReference(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAttachmentReference` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAttachmentReference` + public static VkAttachmentReference alloc(SegmentAllocator allocator, long count) { return new VkAttachmentReference(allocator.allocate(LAYOUT, count)); } + + /// {@return `attachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachment(MemorySegment segment, long index) { return (int) VH_attachment.get(segment, 0L, index); } + /// {@return `attachment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachment(MemorySegment segment) { return VkAttachmentReference.get_attachment(segment, 0L); } + /// {@return `attachment` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentAt(long index) { return VkAttachmentReference.get_attachment(this.segment(), index); } + /// {@return `attachment`} + public @CType("uint32_t") int attachment() { return VkAttachmentReference.get_attachment(this.segment()); } + /// Sets `attachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachment.set(segment, 0L, index, value); } + /// Sets `attachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachment(MemorySegment segment, @CType("uint32_t") int value) { VkAttachmentReference.set_attachment(segment, 0L, value); } + /// Sets `attachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentReference attachmentAt(long index, @CType("uint32_t") int value) { VkAttachmentReference.set_attachment(this.segment(), index, value); return this; } + /// Sets `attachment` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentReference attachment(@CType("uint32_t") int value) { VkAttachmentReference.set_attachment(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_layout(MemorySegment segment, long index) { return (int) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_layout(MemorySegment segment) { return VkAttachmentReference.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int layoutAt(long index) { return VkAttachmentReference.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkImageLayout") int layout() { return VkAttachmentReference.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkImageLayout") int value) { VkAttachmentReference.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentReference layoutAt(long index, @CType("VkImageLayout") int value) { VkAttachmentReference.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentReference layout(@CType("VkImageLayout") int value) { VkAttachmentReference.set_layout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentReference2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentReference2.java new file mode 100644 index 00000000..3083f11c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentReference2.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### attachment +/// [VarHandle][#VH_attachment] - [Getter][#attachment()] - [Setter][#attachment(int)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(int)] +/// ### aspectMask +/// [VarHandle][#VH_aspectMask] - [Getter][#aspectMask()] - [Setter][#aspectMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAttachmentReference2 { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t attachment; +/// VkImageLayout layout; +/// VkImageAspectFlags aspectMask; +/// } VkAttachmentReference2; +/// ``` +public final class VkAttachmentReference2 extends Struct { + /// The struct layout of `VkAttachmentReference2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("attachment"), + ValueLayout.JAVA_INT.withName("layout"), + ValueLayout.JAVA_INT.withName("aspectMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `attachment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachment")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `aspectMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspectMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspectMask")); + + /// Creates `VkAttachmentReference2` with the given segment. + /// @param segment the memory segment + public VkAttachmentReference2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAttachmentReference2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentReference2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentReference2(segment); } + + /// Creates `VkAttachmentReference2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentReference2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentReference2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAttachmentReference2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentReference2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentReference2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAttachmentReference2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAttachmentReference2` + public static VkAttachmentReference2 alloc(SegmentAllocator allocator) { return new VkAttachmentReference2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAttachmentReference2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAttachmentReference2` + public static VkAttachmentReference2 alloc(SegmentAllocator allocator, long count) { return new VkAttachmentReference2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAttachmentReference2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAttachmentReference2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAttachmentReference2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAttachmentReference2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentReference2 sTypeAt(long index, @CType("VkStructureType") int value) { VkAttachmentReference2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentReference2 sType(@CType("VkStructureType") int value) { VkAttachmentReference2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAttachmentReference2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAttachmentReference2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkAttachmentReference2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAttachmentReference2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentReference2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkAttachmentReference2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentReference2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkAttachmentReference2.set_pNext(this.segment(), value); return this; } + + /// {@return `attachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachment(MemorySegment segment, long index) { return (int) VH_attachment.get(segment, 0L, index); } + /// {@return `attachment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachment(MemorySegment segment) { return VkAttachmentReference2.get_attachment(segment, 0L); } + /// {@return `attachment` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentAt(long index) { return VkAttachmentReference2.get_attachment(this.segment(), index); } + /// {@return `attachment`} + public @CType("uint32_t") int attachment() { return VkAttachmentReference2.get_attachment(this.segment()); } + /// Sets `attachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachment.set(segment, 0L, index, value); } + /// Sets `attachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachment(MemorySegment segment, @CType("uint32_t") int value) { VkAttachmentReference2.set_attachment(segment, 0L, value); } + /// Sets `attachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentReference2 attachmentAt(long index, @CType("uint32_t") int value) { VkAttachmentReference2.set_attachment(this.segment(), index, value); return this; } + /// Sets `attachment` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentReference2 attachment(@CType("uint32_t") int value) { VkAttachmentReference2.set_attachment(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_layout(MemorySegment segment, long index) { return (int) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_layout(MemorySegment segment) { return VkAttachmentReference2.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int layoutAt(long index) { return VkAttachmentReference2.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkImageLayout") int layout() { return VkAttachmentReference2.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkImageLayout") int value) { VkAttachmentReference2.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentReference2 layoutAt(long index, @CType("VkImageLayout") int value) { VkAttachmentReference2.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentReference2 layout(@CType("VkImageLayout") int value) { VkAttachmentReference2.set_layout(this.segment(), value); return this; } + + /// {@return `aspectMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment, long index) { return (int) VH_aspectMask.get(segment, 0L, index); } + /// {@return `aspectMask`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment) { return VkAttachmentReference2.get_aspectMask(segment, 0L); } + /// {@return `aspectMask` at the given index} + /// @param index the index + public @CType("VkImageAspectFlags") int aspectMaskAt(long index) { return VkAttachmentReference2.get_aspectMask(this.segment(), index); } + /// {@return `aspectMask`} + public @CType("VkImageAspectFlags") int aspectMask() { return VkAttachmentReference2.get_aspectMask(this.segment()); } + /// Sets `aspectMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspectMask(MemorySegment segment, long index, @CType("VkImageAspectFlags") int value) { VH_aspectMask.set(segment, 0L, index, value); } + /// Sets `aspectMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspectMask(MemorySegment segment, @CType("VkImageAspectFlags") int value) { VkAttachmentReference2.set_aspectMask(segment, 0L, value); } + /// Sets `aspectMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentReference2 aspectMaskAt(long index, @CType("VkImageAspectFlags") int value) { VkAttachmentReference2.set_aspectMask(this.segment(), index, value); return this; } + /// Sets `aspectMask` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentReference2 aspectMask(@CType("VkImageAspectFlags") int value) { VkAttachmentReference2.set_aspectMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentReferenceStencilLayout.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentReferenceStencilLayout.java new file mode 100644 index 00000000..5da68c13 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkAttachmentReferenceStencilLayout.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stencilLayout +/// [VarHandle][#VH_stencilLayout] - [Getter][#stencilLayout()] - [Setter][#stencilLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkAttachmentReferenceStencilLayout { +/// VkStructureType sType; +/// void * pNext; +/// VkImageLayout stencilLayout; +/// } VkAttachmentReferenceStencilLayout; +/// ``` +public final class VkAttachmentReferenceStencilLayout extends Struct { + /// The struct layout of `VkAttachmentReferenceStencilLayout`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stencilLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stencilLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilLayout")); + + /// Creates `VkAttachmentReferenceStencilLayout` with the given segment. + /// @param segment the memory segment + public VkAttachmentReferenceStencilLayout(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkAttachmentReferenceStencilLayout` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentReferenceStencilLayout of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentReferenceStencilLayout(segment); } + + /// Creates `VkAttachmentReferenceStencilLayout` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentReferenceStencilLayout ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentReferenceStencilLayout(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkAttachmentReferenceStencilLayout` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkAttachmentReferenceStencilLayout ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkAttachmentReferenceStencilLayout(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkAttachmentReferenceStencilLayout` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkAttachmentReferenceStencilLayout` + public static VkAttachmentReferenceStencilLayout alloc(SegmentAllocator allocator) { return new VkAttachmentReferenceStencilLayout(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkAttachmentReferenceStencilLayout` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkAttachmentReferenceStencilLayout` + public static VkAttachmentReferenceStencilLayout alloc(SegmentAllocator allocator, long count) { return new VkAttachmentReferenceStencilLayout(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkAttachmentReferenceStencilLayout.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkAttachmentReferenceStencilLayout.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkAttachmentReferenceStencilLayout.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkAttachmentReferenceStencilLayout.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentReferenceStencilLayout sTypeAt(long index, @CType("VkStructureType") int value) { VkAttachmentReferenceStencilLayout.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentReferenceStencilLayout sType(@CType("VkStructureType") int value) { VkAttachmentReferenceStencilLayout.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkAttachmentReferenceStencilLayout.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkAttachmentReferenceStencilLayout.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkAttachmentReferenceStencilLayout.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkAttachmentReferenceStencilLayout.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentReferenceStencilLayout pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkAttachmentReferenceStencilLayout.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentReferenceStencilLayout pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkAttachmentReferenceStencilLayout.set_pNext(this.segment(), value); return this; } + + /// {@return `stencilLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_stencilLayout(MemorySegment segment, long index) { return (int) VH_stencilLayout.get(segment, 0L, index); } + /// {@return `stencilLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_stencilLayout(MemorySegment segment) { return VkAttachmentReferenceStencilLayout.get_stencilLayout(segment, 0L); } + /// {@return `stencilLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int stencilLayoutAt(long index) { return VkAttachmentReferenceStencilLayout.get_stencilLayout(this.segment(), index); } + /// {@return `stencilLayout`} + public @CType("VkImageLayout") int stencilLayout() { return VkAttachmentReferenceStencilLayout.get_stencilLayout(this.segment()); } + /// Sets `stencilLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_stencilLayout.set(segment, 0L, index, value); } + /// Sets `stencilLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkAttachmentReferenceStencilLayout.set_stencilLayout(segment, 0L, value); } + /// Sets `stencilLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkAttachmentReferenceStencilLayout stencilLayoutAt(long index, @CType("VkImageLayout") int value) { VkAttachmentReferenceStencilLayout.set_stencilLayout(this.segment(), index, value); return this; } + /// Sets `stencilLayout` with the given value. + /// @param value the value + /// @return `this` + public VkAttachmentReferenceStencilLayout stencilLayout(@CType("VkImageLayout") int value) { VkAttachmentReferenceStencilLayout.set_stencilLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBaseInStructure.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBaseInStructure.java new file mode 100644 index 00000000..c5e506e4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBaseInStructure.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBaseInStructure { +/// VkStructureType sType; +/// const struct VkBaseInStructure * pNext; +/// } VkBaseInStructure; +/// ``` +public final class VkBaseInStructure extends Struct { + /// The struct layout of `VkBaseInStructure`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + + /// Creates `VkBaseInStructure` with the given segment. + /// @param segment the memory segment + public VkBaseInStructure(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBaseInStructure` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBaseInStructure of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBaseInStructure(segment); } + + /// Creates `VkBaseInStructure` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBaseInStructure ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBaseInStructure(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBaseInStructure` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBaseInStructure ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBaseInStructure(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBaseInStructure` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBaseInStructure` + public static VkBaseInStructure alloc(SegmentAllocator allocator) { return new VkBaseInStructure(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBaseInStructure` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBaseInStructure` + public static VkBaseInStructure alloc(SegmentAllocator allocator, long count) { return new VkBaseInStructure(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBaseInStructure.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBaseInStructure.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBaseInStructure.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBaseInStructure.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBaseInStructure sTypeAt(long index, @CType("VkStructureType") int value) { VkBaseInStructure.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBaseInStructure sType(@CType("VkStructureType") int value) { VkBaseInStructure.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const struct VkBaseInStructure *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const struct VkBaseInStructure *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBaseInStructure.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const struct VkBaseInStructure *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBaseInStructure.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const struct VkBaseInStructure *") java.lang.foreign.MemorySegment pNext() { return VkBaseInStructure.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const struct VkBaseInStructure *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const struct VkBaseInStructure *") java.lang.foreign.MemorySegment value) { VkBaseInStructure.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBaseInStructure pNextAt(long index, @CType("const struct VkBaseInStructure *") java.lang.foreign.MemorySegment value) { VkBaseInStructure.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBaseInStructure pNext(@CType("const struct VkBaseInStructure *") java.lang.foreign.MemorySegment value) { VkBaseInStructure.set_pNext(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBaseOutStructure.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBaseOutStructure.java new file mode 100644 index 00000000..98bbd95e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBaseOutStructure.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBaseOutStructure { +/// VkStructureType sType; +/// struct VkBaseOutStructure * pNext; +/// } VkBaseOutStructure; +/// ``` +public final class VkBaseOutStructure extends Struct { + /// The struct layout of `VkBaseOutStructure`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + + /// Creates `VkBaseOutStructure` with the given segment. + /// @param segment the memory segment + public VkBaseOutStructure(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBaseOutStructure` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBaseOutStructure of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBaseOutStructure(segment); } + + /// Creates `VkBaseOutStructure` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBaseOutStructure ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBaseOutStructure(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBaseOutStructure` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBaseOutStructure ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBaseOutStructure(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBaseOutStructure` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBaseOutStructure` + public static VkBaseOutStructure alloc(SegmentAllocator allocator) { return new VkBaseOutStructure(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBaseOutStructure` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBaseOutStructure` + public static VkBaseOutStructure alloc(SegmentAllocator allocator, long count) { return new VkBaseOutStructure(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBaseOutStructure.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBaseOutStructure.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBaseOutStructure.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBaseOutStructure.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBaseOutStructure sTypeAt(long index, @CType("VkStructureType") int value) { VkBaseOutStructure.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBaseOutStructure sType(@CType("VkStructureType") int value) { VkBaseOutStructure.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("struct VkBaseOutStructure *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("struct VkBaseOutStructure *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBaseOutStructure.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("struct VkBaseOutStructure *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBaseOutStructure.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("struct VkBaseOutStructure *") java.lang.foreign.MemorySegment pNext() { return VkBaseOutStructure.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("struct VkBaseOutStructure *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("struct VkBaseOutStructure *") java.lang.foreign.MemorySegment value) { VkBaseOutStructure.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBaseOutStructure pNextAt(long index, @CType("struct VkBaseOutStructure *") java.lang.foreign.MemorySegment value) { VkBaseOutStructure.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBaseOutStructure pNext(@CType("struct VkBaseOutStructure *") java.lang.foreign.MemorySegment value) { VkBaseOutStructure.set_pNext(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindBufferMemoryDeviceGroupInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindBufferMemoryDeviceGroupInfo.java new file mode 100644 index 00000000..37fcab8e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindBufferMemoryDeviceGroupInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceIndexCount +/// [VarHandle][#VH_deviceIndexCount] - [Getter][#deviceIndexCount()] - [Setter][#deviceIndexCount(int)] +/// ### pDeviceIndices +/// [VarHandle][#VH_pDeviceIndices] - [Getter][#pDeviceIndices()] - [Setter][#pDeviceIndices(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindBufferMemoryDeviceGroupInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t deviceIndexCount; +/// const uint32_t * pDeviceIndices; +/// } VkBindBufferMemoryDeviceGroupInfo; +/// ``` +public final class VkBindBufferMemoryDeviceGroupInfo extends Struct { + /// The struct layout of `VkBindBufferMemoryDeviceGroupInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceIndexCount"), + ValueLayout.ADDRESS.withName("pDeviceIndices") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceIndexCount")); + /// The [VarHandle] of `pDeviceIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDeviceIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDeviceIndices")); + + /// Creates `VkBindBufferMemoryDeviceGroupInfo` with the given segment. + /// @param segment the memory segment + public VkBindBufferMemoryDeviceGroupInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindBufferMemoryDeviceGroupInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindBufferMemoryDeviceGroupInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindBufferMemoryDeviceGroupInfo(segment); } + + /// Creates `VkBindBufferMemoryDeviceGroupInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindBufferMemoryDeviceGroupInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindBufferMemoryDeviceGroupInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindBufferMemoryDeviceGroupInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindBufferMemoryDeviceGroupInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindBufferMemoryDeviceGroupInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindBufferMemoryDeviceGroupInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindBufferMemoryDeviceGroupInfo` + public static VkBindBufferMemoryDeviceGroupInfo alloc(SegmentAllocator allocator) { return new VkBindBufferMemoryDeviceGroupInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindBufferMemoryDeviceGroupInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindBufferMemoryDeviceGroupInfo` + public static VkBindBufferMemoryDeviceGroupInfo alloc(SegmentAllocator allocator, long count) { return new VkBindBufferMemoryDeviceGroupInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindBufferMemoryDeviceGroupInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindBufferMemoryDeviceGroupInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindBufferMemoryDeviceGroupInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindBufferMemoryDeviceGroupInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindBufferMemoryDeviceGroupInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBindBufferMemoryDeviceGroupInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindBufferMemoryDeviceGroupInfo sType(@CType("VkStructureType") int value) { VkBindBufferMemoryDeviceGroupInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindBufferMemoryDeviceGroupInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindBufferMemoryDeviceGroupInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindBufferMemoryDeviceGroupInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryDeviceGroupInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindBufferMemoryDeviceGroupInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryDeviceGroupInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindBufferMemoryDeviceGroupInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryDeviceGroupInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceIndexCount(MemorySegment segment, long index) { return (int) VH_deviceIndexCount.get(segment, 0L, index); } + /// {@return `deviceIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceIndexCount(MemorySegment segment) { return VkBindBufferMemoryDeviceGroupInfo.get_deviceIndexCount(segment, 0L); } + /// {@return `deviceIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceIndexCountAt(long index) { return VkBindBufferMemoryDeviceGroupInfo.get_deviceIndexCount(this.segment(), index); } + /// {@return `deviceIndexCount`} + public @CType("uint32_t") int deviceIndexCount() { return VkBindBufferMemoryDeviceGroupInfo.get_deviceIndexCount(this.segment()); } + /// Sets `deviceIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceIndexCount.set(segment, 0L, index, value); } + /// Sets `deviceIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindBufferMemoryDeviceGroupInfo.set_deviceIndexCount(segment, 0L, value); } + /// Sets `deviceIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindBufferMemoryDeviceGroupInfo deviceIndexCountAt(long index, @CType("uint32_t") int value) { VkBindBufferMemoryDeviceGroupInfo.set_deviceIndexCount(this.segment(), index, value); return this; } + /// Sets `deviceIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindBufferMemoryDeviceGroupInfo deviceIndexCount(@CType("uint32_t") int value) { VkBindBufferMemoryDeviceGroupInfo.set_deviceIndexCount(this.segment(), value); return this; } + + /// {@return `pDeviceIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDeviceIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDeviceIndices.get(segment, 0L, index); } + /// {@return `pDeviceIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDeviceIndices(MemorySegment segment) { return VkBindBufferMemoryDeviceGroupInfo.get_pDeviceIndices(segment, 0L); } + /// {@return `pDeviceIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDeviceIndicesAt(long index) { return VkBindBufferMemoryDeviceGroupInfo.get_pDeviceIndices(this.segment(), index); } + /// {@return `pDeviceIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDeviceIndices() { return VkBindBufferMemoryDeviceGroupInfo.get_pDeviceIndices(this.segment()); } + /// Sets `pDeviceIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDeviceIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pDeviceIndices.set(segment, 0L, index, value); } + /// Sets `pDeviceIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDeviceIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryDeviceGroupInfo.set_pDeviceIndices(segment, 0L, value); } + /// Sets `pDeviceIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindBufferMemoryDeviceGroupInfo pDeviceIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryDeviceGroupInfo.set_pDeviceIndices(this.segment(), index, value); return this; } + /// Sets `pDeviceIndices` with the given value. + /// @param value the value + /// @return `this` + public VkBindBufferMemoryDeviceGroupInfo pDeviceIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryDeviceGroupInfo.set_pDeviceIndices(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindBufferMemoryInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindBufferMemoryInfo.java new file mode 100644 index 00000000..e8aeb497 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindBufferMemoryInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### memoryOffset +/// [VarHandle][#VH_memoryOffset] - [Getter][#memoryOffset()] - [Setter][#memoryOffset(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindBufferMemoryInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkBuffer buffer; +/// VkDeviceMemory memory; +/// VkDeviceSize memoryOffset; +/// } VkBindBufferMemoryInfo; +/// ``` +public final class VkBindBufferMemoryInfo extends Struct { + /// The struct layout of `VkBindBufferMemoryInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("buffer"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_LONG.withName("memoryOffset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `memoryOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_memoryOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryOffset")); + + /// Creates `VkBindBufferMemoryInfo` with the given segment. + /// @param segment the memory segment + public VkBindBufferMemoryInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindBufferMemoryInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindBufferMemoryInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindBufferMemoryInfo(segment); } + + /// Creates `VkBindBufferMemoryInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindBufferMemoryInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindBufferMemoryInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindBufferMemoryInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindBufferMemoryInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindBufferMemoryInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindBufferMemoryInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindBufferMemoryInfo` + public static VkBindBufferMemoryInfo alloc(SegmentAllocator allocator) { return new VkBindBufferMemoryInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindBufferMemoryInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindBufferMemoryInfo` + public static VkBindBufferMemoryInfo alloc(SegmentAllocator allocator, long count) { return new VkBindBufferMemoryInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindBufferMemoryInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindBufferMemoryInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindBufferMemoryInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindBufferMemoryInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindBufferMemoryInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBindBufferMemoryInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindBufferMemoryInfo sType(@CType("VkStructureType") int value) { VkBindBufferMemoryInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindBufferMemoryInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindBufferMemoryInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindBufferMemoryInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindBufferMemoryInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindBufferMemoryInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkBindBufferMemoryInfo.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkBindBufferMemoryInfo.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkBindBufferMemoryInfo.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryInfo.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindBufferMemoryInfo bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryInfo.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkBindBufferMemoryInfo buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryInfo.set_buffer(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkBindBufferMemoryInfo.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkBindBufferMemoryInfo.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkBindBufferMemoryInfo.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryInfo.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindBufferMemoryInfo memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryInfo.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkBindBufferMemoryInfo memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindBufferMemoryInfo.set_memory(this.segment(), value); return this; } + + /// {@return `memoryOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment, long index) { return (long) VH_memoryOffset.get(segment, 0L, index); } + /// {@return `memoryOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment) { return VkBindBufferMemoryInfo.get_memoryOffset(segment, 0L); } + /// {@return `memoryOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long memoryOffsetAt(long index) { return VkBindBufferMemoryInfo.get_memoryOffset(this.segment(), index); } + /// {@return `memoryOffset`} + public @CType("VkDeviceSize") long memoryOffset() { return VkBindBufferMemoryInfo.get_memoryOffset(this.segment()); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_memoryOffset.set(segment, 0L, index, value); } + /// Sets `memoryOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBindBufferMemoryInfo.set_memoryOffset(segment, 0L, value); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindBufferMemoryInfo memoryOffsetAt(long index, @CType("VkDeviceSize") long value) { VkBindBufferMemoryInfo.set_memoryOffset(this.segment(), index, value); return this; } + /// Sets `memoryOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBindBufferMemoryInfo memoryOffset(@CType("VkDeviceSize") long value) { VkBindBufferMemoryInfo.set_memoryOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindDescriptorSetsInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindDescriptorSetsInfo.java new file mode 100644 index 00000000..eb80ab38 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindDescriptorSetsInfo.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stageFlags +/// [VarHandle][#VH_stageFlags] - [Getter][#stageFlags()] - [Setter][#stageFlags(int)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### firstSet +/// [VarHandle][#VH_firstSet] - [Getter][#firstSet()] - [Setter][#firstSet(int)] +/// ### descriptorSetCount +/// [VarHandle][#VH_descriptorSetCount] - [Getter][#descriptorSetCount()] - [Setter][#descriptorSetCount(int)] +/// ### pDescriptorSets +/// [VarHandle][#VH_pDescriptorSets] - [Getter][#pDescriptorSets()] - [Setter][#pDescriptorSets(java.lang.foreign.MemorySegment)] +/// ### dynamicOffsetCount +/// [VarHandle][#VH_dynamicOffsetCount] - [Getter][#dynamicOffsetCount()] - [Setter][#dynamicOffsetCount(int)] +/// ### pDynamicOffsets +/// [VarHandle][#VH_pDynamicOffsets] - [Getter][#pDynamicOffsets()] - [Setter][#pDynamicOffsets(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindDescriptorSetsInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkShaderStageFlags stageFlags; +/// VkPipelineLayout layout; +/// uint32_t firstSet; +/// uint32_t descriptorSetCount; +/// const VkDescriptorSet * pDescriptorSets; +/// uint32_t dynamicOffsetCount; +/// const uint32_t * pDynamicOffsets; +/// } VkBindDescriptorSetsInfo; +/// ``` +public final class VkBindDescriptorSetsInfo extends Struct { + /// The struct layout of `VkBindDescriptorSetsInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stageFlags"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.JAVA_INT.withName("firstSet"), + ValueLayout.JAVA_INT.withName("descriptorSetCount"), + ValueLayout.ADDRESS.withName("pDescriptorSets"), + ValueLayout.JAVA_INT.withName("dynamicOffsetCount"), + ValueLayout.ADDRESS.withName("pDynamicOffsets") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageFlags")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `firstSet` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstSet")); + /// The [VarHandle] of `descriptorSetCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorSetCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSetCount")); + /// The [VarHandle] of `pDescriptorSets` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDescriptorSets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDescriptorSets")); + /// The [VarHandle] of `dynamicOffsetCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicOffsetCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicOffsetCount")); + /// The [VarHandle] of `pDynamicOffsets` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDynamicOffsets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDynamicOffsets")); + + /// Creates `VkBindDescriptorSetsInfo` with the given segment. + /// @param segment the memory segment + public VkBindDescriptorSetsInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindDescriptorSetsInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindDescriptorSetsInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindDescriptorSetsInfo(segment); } + + /// Creates `VkBindDescriptorSetsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindDescriptorSetsInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindDescriptorSetsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindDescriptorSetsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindDescriptorSetsInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindDescriptorSetsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindDescriptorSetsInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindDescriptorSetsInfo` + public static VkBindDescriptorSetsInfo alloc(SegmentAllocator allocator) { return new VkBindDescriptorSetsInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindDescriptorSetsInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindDescriptorSetsInfo` + public static VkBindDescriptorSetsInfo alloc(SegmentAllocator allocator, long count) { return new VkBindDescriptorSetsInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindDescriptorSetsInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindDescriptorSetsInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindDescriptorSetsInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindDescriptorSetsInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBindDescriptorSetsInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo sType(@CType("VkStructureType") int value) { VkBindDescriptorSetsInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindDescriptorSetsInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindDescriptorSetsInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindDescriptorSetsInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `stageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment, long index) { return (int) VH_stageFlags.get(segment, 0L, index); } + /// {@return `stageFlags`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment) { return VkBindDescriptorSetsInfo.get_stageFlags(segment, 0L); } + /// {@return `stageFlags` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int stageFlagsAt(long index) { return VkBindDescriptorSetsInfo.get_stageFlags(this.segment(), index); } + /// {@return `stageFlags`} + public @CType("VkShaderStageFlags") int stageFlags() { return VkBindDescriptorSetsInfo.get_stageFlags(this.segment()); } + /// Sets `stageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageFlags(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_stageFlags.set(segment, 0L, index, value); } + /// Sets `stageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageFlags(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkBindDescriptorSetsInfo.set_stageFlags(segment, 0L, value); } + /// Sets `stageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo stageFlagsAt(long index, @CType("VkShaderStageFlags") int value) { VkBindDescriptorSetsInfo.set_stageFlags(this.segment(), index, value); return this; } + /// Sets `stageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo stageFlags(@CType("VkShaderStageFlags") int value) { VkBindDescriptorSetsInfo.set_stageFlags(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkBindDescriptorSetsInfo.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkBindDescriptorSetsInfo.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkBindDescriptorSetsInfo.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_layout(this.segment(), value); return this; } + + /// {@return `firstSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstSet(MemorySegment segment, long index) { return (int) VH_firstSet.get(segment, 0L, index); } + /// {@return `firstSet`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstSet(MemorySegment segment) { return VkBindDescriptorSetsInfo.get_firstSet(segment, 0L); } + /// {@return `firstSet` at the given index} + /// @param index the index + public @CType("uint32_t") int firstSetAt(long index) { return VkBindDescriptorSetsInfo.get_firstSet(this.segment(), index); } + /// {@return `firstSet`} + public @CType("uint32_t") int firstSet() { return VkBindDescriptorSetsInfo.get_firstSet(this.segment()); } + /// Sets `firstSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstSet(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstSet.set(segment, 0L, index, value); } + /// Sets `firstSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstSet(MemorySegment segment, @CType("uint32_t") int value) { VkBindDescriptorSetsInfo.set_firstSet(segment, 0L, value); } + /// Sets `firstSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo firstSetAt(long index, @CType("uint32_t") int value) { VkBindDescriptorSetsInfo.set_firstSet(this.segment(), index, value); return this; } + /// Sets `firstSet` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo firstSet(@CType("uint32_t") int value) { VkBindDescriptorSetsInfo.set_firstSet(this.segment(), value); return this; } + + /// {@return `descriptorSetCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorSetCount(MemorySegment segment, long index) { return (int) VH_descriptorSetCount.get(segment, 0L, index); } + /// {@return `descriptorSetCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorSetCount(MemorySegment segment) { return VkBindDescriptorSetsInfo.get_descriptorSetCount(segment, 0L); } + /// {@return `descriptorSetCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorSetCountAt(long index) { return VkBindDescriptorSetsInfo.get_descriptorSetCount(this.segment(), index); } + /// {@return `descriptorSetCount`} + public @CType("uint32_t") int descriptorSetCount() { return VkBindDescriptorSetsInfo.get_descriptorSetCount(this.segment()); } + /// Sets `descriptorSetCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSetCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorSetCount.set(segment, 0L, index, value); } + /// Sets `descriptorSetCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSetCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindDescriptorSetsInfo.set_descriptorSetCount(segment, 0L, value); } + /// Sets `descriptorSetCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo descriptorSetCountAt(long index, @CType("uint32_t") int value) { VkBindDescriptorSetsInfo.set_descriptorSetCount(this.segment(), index, value); return this; } + /// Sets `descriptorSetCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo descriptorSetCount(@CType("uint32_t") int value) { VkBindDescriptorSetsInfo.set_descriptorSetCount(this.segment(), value); return this; } + + /// {@return `pDescriptorSets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorSet *") java.lang.foreign.MemorySegment get_pDescriptorSets(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDescriptorSets.get(segment, 0L, index); } + /// {@return `pDescriptorSets`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorSet *") java.lang.foreign.MemorySegment get_pDescriptorSets(MemorySegment segment) { return VkBindDescriptorSetsInfo.get_pDescriptorSets(segment, 0L); } + /// {@return `pDescriptorSets` at the given index} + /// @param index the index + public @CType("const VkDescriptorSet *") java.lang.foreign.MemorySegment pDescriptorSetsAt(long index) { return VkBindDescriptorSetsInfo.get_pDescriptorSets(this.segment(), index); } + /// {@return `pDescriptorSets`} + public @CType("const VkDescriptorSet *") java.lang.foreign.MemorySegment pDescriptorSets() { return VkBindDescriptorSetsInfo.get_pDescriptorSets(this.segment()); } + /// Sets `pDescriptorSets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDescriptorSets(MemorySegment segment, long index, @CType("const VkDescriptorSet *") java.lang.foreign.MemorySegment value) { VH_pDescriptorSets.set(segment, 0L, index, value); } + /// Sets `pDescriptorSets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDescriptorSets(MemorySegment segment, @CType("const VkDescriptorSet *") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_pDescriptorSets(segment, 0L, value); } + /// Sets `pDescriptorSets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo pDescriptorSetsAt(long index, @CType("const VkDescriptorSet *") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_pDescriptorSets(this.segment(), index, value); return this; } + /// Sets `pDescriptorSets` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo pDescriptorSets(@CType("const VkDescriptorSet *") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_pDescriptorSets(this.segment(), value); return this; } + + /// {@return `dynamicOffsetCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dynamicOffsetCount(MemorySegment segment, long index) { return (int) VH_dynamicOffsetCount.get(segment, 0L, index); } + /// {@return `dynamicOffsetCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dynamicOffsetCount(MemorySegment segment) { return VkBindDescriptorSetsInfo.get_dynamicOffsetCount(segment, 0L); } + /// {@return `dynamicOffsetCount` at the given index} + /// @param index the index + public @CType("uint32_t") int dynamicOffsetCountAt(long index) { return VkBindDescriptorSetsInfo.get_dynamicOffsetCount(this.segment(), index); } + /// {@return `dynamicOffsetCount`} + public @CType("uint32_t") int dynamicOffsetCount() { return VkBindDescriptorSetsInfo.get_dynamicOffsetCount(this.segment()); } + /// Sets `dynamicOffsetCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicOffsetCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dynamicOffsetCount.set(segment, 0L, index, value); } + /// Sets `dynamicOffsetCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicOffsetCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindDescriptorSetsInfo.set_dynamicOffsetCount(segment, 0L, value); } + /// Sets `dynamicOffsetCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo dynamicOffsetCountAt(long index, @CType("uint32_t") int value) { VkBindDescriptorSetsInfo.set_dynamicOffsetCount(this.segment(), index, value); return this; } + /// Sets `dynamicOffsetCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo dynamicOffsetCount(@CType("uint32_t") int value) { VkBindDescriptorSetsInfo.set_dynamicOffsetCount(this.segment(), value); return this; } + + /// {@return `pDynamicOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDynamicOffsets(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDynamicOffsets.get(segment, 0L, index); } + /// {@return `pDynamicOffsets`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDynamicOffsets(MemorySegment segment) { return VkBindDescriptorSetsInfo.get_pDynamicOffsets(segment, 0L); } + /// {@return `pDynamicOffsets` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDynamicOffsetsAt(long index) { return VkBindDescriptorSetsInfo.get_pDynamicOffsets(this.segment(), index); } + /// {@return `pDynamicOffsets`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDynamicOffsets() { return VkBindDescriptorSetsInfo.get_pDynamicOffsets(this.segment()); } + /// Sets `pDynamicOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDynamicOffsets(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pDynamicOffsets.set(segment, 0L, index, value); } + /// Sets `pDynamicOffsets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDynamicOffsets(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_pDynamicOffsets(segment, 0L, value); } + /// Sets `pDynamicOffsets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo pDynamicOffsetsAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_pDynamicOffsets(this.segment(), index, value); return this; } + /// Sets `pDynamicOffsets` with the given value. + /// @param value the value + /// @return `this` + public VkBindDescriptorSetsInfo pDynamicOffsets(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindDescriptorSetsInfo.set_pDynamicOffsets(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindImageMemoryDeviceGroupInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindImageMemoryDeviceGroupInfo.java new file mode 100644 index 00000000..9fbe9e02 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindImageMemoryDeviceGroupInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceIndexCount +/// [VarHandle][#VH_deviceIndexCount] - [Getter][#deviceIndexCount()] - [Setter][#deviceIndexCount(int)] +/// ### pDeviceIndices +/// [VarHandle][#VH_pDeviceIndices] - [Getter][#pDeviceIndices()] - [Setter][#pDeviceIndices(java.lang.foreign.MemorySegment)] +/// ### splitInstanceBindRegionCount +/// [VarHandle][#VH_splitInstanceBindRegionCount] - [Getter][#splitInstanceBindRegionCount()] - [Setter][#splitInstanceBindRegionCount(int)] +/// ### pSplitInstanceBindRegions +/// [VarHandle][#VH_pSplitInstanceBindRegions] - [Getter][#pSplitInstanceBindRegions()] - [Setter][#pSplitInstanceBindRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindImageMemoryDeviceGroupInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t deviceIndexCount; +/// const uint32_t * pDeviceIndices; +/// uint32_t splitInstanceBindRegionCount; +/// const VkRect2D * pSplitInstanceBindRegions; +/// } VkBindImageMemoryDeviceGroupInfo; +/// ``` +public final class VkBindImageMemoryDeviceGroupInfo extends Struct { + /// The struct layout of `VkBindImageMemoryDeviceGroupInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceIndexCount"), + ValueLayout.ADDRESS.withName("pDeviceIndices"), + ValueLayout.JAVA_INT.withName("splitInstanceBindRegionCount"), + ValueLayout.ADDRESS.withName("pSplitInstanceBindRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceIndexCount")); + /// The [VarHandle] of `pDeviceIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDeviceIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDeviceIndices")); + /// The [VarHandle] of `splitInstanceBindRegionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_splitInstanceBindRegionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("splitInstanceBindRegionCount")); + /// The [VarHandle] of `pSplitInstanceBindRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSplitInstanceBindRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSplitInstanceBindRegions")); + + /// Creates `VkBindImageMemoryDeviceGroupInfo` with the given segment. + /// @param segment the memory segment + public VkBindImageMemoryDeviceGroupInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindImageMemoryDeviceGroupInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImageMemoryDeviceGroupInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImageMemoryDeviceGroupInfo(segment); } + + /// Creates `VkBindImageMemoryDeviceGroupInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImageMemoryDeviceGroupInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImageMemoryDeviceGroupInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindImageMemoryDeviceGroupInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImageMemoryDeviceGroupInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImageMemoryDeviceGroupInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindImageMemoryDeviceGroupInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindImageMemoryDeviceGroupInfo` + public static VkBindImageMemoryDeviceGroupInfo alloc(SegmentAllocator allocator) { return new VkBindImageMemoryDeviceGroupInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindImageMemoryDeviceGroupInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindImageMemoryDeviceGroupInfo` + public static VkBindImageMemoryDeviceGroupInfo alloc(SegmentAllocator allocator, long count) { return new VkBindImageMemoryDeviceGroupInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindImageMemoryDeviceGroupInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindImageMemoryDeviceGroupInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindImageMemoryDeviceGroupInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindImageMemoryDeviceGroupInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBindImageMemoryDeviceGroupInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo sType(@CType("VkStructureType") int value) { VkBindImageMemoryDeviceGroupInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindImageMemoryDeviceGroupInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindImageMemoryDeviceGroupInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindImageMemoryDeviceGroupInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryDeviceGroupInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryDeviceGroupInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryDeviceGroupInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceIndexCount(MemorySegment segment, long index) { return (int) VH_deviceIndexCount.get(segment, 0L, index); } + /// {@return `deviceIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceIndexCount(MemorySegment segment) { return VkBindImageMemoryDeviceGroupInfo.get_deviceIndexCount(segment, 0L); } + /// {@return `deviceIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceIndexCountAt(long index) { return VkBindImageMemoryDeviceGroupInfo.get_deviceIndexCount(this.segment(), index); } + /// {@return `deviceIndexCount`} + public @CType("uint32_t") int deviceIndexCount() { return VkBindImageMemoryDeviceGroupInfo.get_deviceIndexCount(this.segment()); } + /// Sets `deviceIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceIndexCount.set(segment, 0L, index, value); } + /// Sets `deviceIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindImageMemoryDeviceGroupInfo.set_deviceIndexCount(segment, 0L, value); } + /// Sets `deviceIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo deviceIndexCountAt(long index, @CType("uint32_t") int value) { VkBindImageMemoryDeviceGroupInfo.set_deviceIndexCount(this.segment(), index, value); return this; } + /// Sets `deviceIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo deviceIndexCount(@CType("uint32_t") int value) { VkBindImageMemoryDeviceGroupInfo.set_deviceIndexCount(this.segment(), value); return this; } + + /// {@return `pDeviceIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDeviceIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDeviceIndices.get(segment, 0L, index); } + /// {@return `pDeviceIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDeviceIndices(MemorySegment segment) { return VkBindImageMemoryDeviceGroupInfo.get_pDeviceIndices(segment, 0L); } + /// {@return `pDeviceIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDeviceIndicesAt(long index) { return VkBindImageMemoryDeviceGroupInfo.get_pDeviceIndices(this.segment(), index); } + /// {@return `pDeviceIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDeviceIndices() { return VkBindImageMemoryDeviceGroupInfo.get_pDeviceIndices(this.segment()); } + /// Sets `pDeviceIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDeviceIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pDeviceIndices.set(segment, 0L, index, value); } + /// Sets `pDeviceIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDeviceIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryDeviceGroupInfo.set_pDeviceIndices(segment, 0L, value); } + /// Sets `pDeviceIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo pDeviceIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryDeviceGroupInfo.set_pDeviceIndices(this.segment(), index, value); return this; } + /// Sets `pDeviceIndices` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo pDeviceIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryDeviceGroupInfo.set_pDeviceIndices(this.segment(), value); return this; } + + /// {@return `splitInstanceBindRegionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_splitInstanceBindRegionCount(MemorySegment segment, long index) { return (int) VH_splitInstanceBindRegionCount.get(segment, 0L, index); } + /// {@return `splitInstanceBindRegionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_splitInstanceBindRegionCount(MemorySegment segment) { return VkBindImageMemoryDeviceGroupInfo.get_splitInstanceBindRegionCount(segment, 0L); } + /// {@return `splitInstanceBindRegionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int splitInstanceBindRegionCountAt(long index) { return VkBindImageMemoryDeviceGroupInfo.get_splitInstanceBindRegionCount(this.segment(), index); } + /// {@return `splitInstanceBindRegionCount`} + public @CType("uint32_t") int splitInstanceBindRegionCount() { return VkBindImageMemoryDeviceGroupInfo.get_splitInstanceBindRegionCount(this.segment()); } + /// Sets `splitInstanceBindRegionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_splitInstanceBindRegionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_splitInstanceBindRegionCount.set(segment, 0L, index, value); } + /// Sets `splitInstanceBindRegionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_splitInstanceBindRegionCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindImageMemoryDeviceGroupInfo.set_splitInstanceBindRegionCount(segment, 0L, value); } + /// Sets `splitInstanceBindRegionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo splitInstanceBindRegionCountAt(long index, @CType("uint32_t") int value) { VkBindImageMemoryDeviceGroupInfo.set_splitInstanceBindRegionCount(this.segment(), index, value); return this; } + /// Sets `splitInstanceBindRegionCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo splitInstanceBindRegionCount(@CType("uint32_t") int value) { VkBindImageMemoryDeviceGroupInfo.set_splitInstanceBindRegionCount(this.segment(), value); return this; } + + /// {@return `pSplitInstanceBindRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pSplitInstanceBindRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSplitInstanceBindRegions.get(segment, 0L, index); } + /// {@return `pSplitInstanceBindRegions`} + /// @param segment the segment of the struct + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pSplitInstanceBindRegions(MemorySegment segment) { return VkBindImageMemoryDeviceGroupInfo.get_pSplitInstanceBindRegions(segment, 0L); } + /// {@return `pSplitInstanceBindRegions` at the given index} + /// @param index the index + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pSplitInstanceBindRegionsAt(long index) { return VkBindImageMemoryDeviceGroupInfo.get_pSplitInstanceBindRegions(this.segment(), index); } + /// {@return `pSplitInstanceBindRegions`} + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pSplitInstanceBindRegions() { return VkBindImageMemoryDeviceGroupInfo.get_pSplitInstanceBindRegions(this.segment()); } + /// Sets `pSplitInstanceBindRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSplitInstanceBindRegions(MemorySegment segment, long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VH_pSplitInstanceBindRegions.set(segment, 0L, index, value); } + /// Sets `pSplitInstanceBindRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSplitInstanceBindRegions(MemorySegment segment, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryDeviceGroupInfo.set_pSplitInstanceBindRegions(segment, 0L, value); } + /// Sets `pSplitInstanceBindRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo pSplitInstanceBindRegionsAt(long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryDeviceGroupInfo.set_pSplitInstanceBindRegions(this.segment(), index, value); return this; } + /// Sets `pSplitInstanceBindRegions` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryDeviceGroupInfo pSplitInstanceBindRegions(@CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryDeviceGroupInfo.set_pSplitInstanceBindRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindImageMemoryInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindImageMemoryInfo.java new file mode 100644 index 00000000..0726e175 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindImageMemoryInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### memoryOffset +/// [VarHandle][#VH_memoryOffset] - [Getter][#memoryOffset()] - [Setter][#memoryOffset(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindImageMemoryInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage image; +/// VkDeviceMemory memory; +/// VkDeviceSize memoryOffset; +/// } VkBindImageMemoryInfo; +/// ``` +public final class VkBindImageMemoryInfo extends Struct { + /// The struct layout of `VkBindImageMemoryInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("image"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_LONG.withName("memoryOffset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `memoryOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_memoryOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryOffset")); + + /// Creates `VkBindImageMemoryInfo` with the given segment. + /// @param segment the memory segment + public VkBindImageMemoryInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindImageMemoryInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImageMemoryInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImageMemoryInfo(segment); } + + /// Creates `VkBindImageMemoryInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImageMemoryInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImageMemoryInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindImageMemoryInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImageMemoryInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImageMemoryInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindImageMemoryInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindImageMemoryInfo` + public static VkBindImageMemoryInfo alloc(SegmentAllocator allocator) { return new VkBindImageMemoryInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindImageMemoryInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindImageMemoryInfo` + public static VkBindImageMemoryInfo alloc(SegmentAllocator allocator, long count) { return new VkBindImageMemoryInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindImageMemoryInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindImageMemoryInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindImageMemoryInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindImageMemoryInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBindImageMemoryInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryInfo sType(@CType("VkStructureType") int value) { VkBindImageMemoryInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindImageMemoryInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindImageMemoryInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindImageMemoryInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImageMemoryInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkBindImageMemoryInfo.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkBindImageMemoryInfo.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkBindImageMemoryInfo.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkBindImageMemoryInfo.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryInfo imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkBindImageMemoryInfo.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryInfo image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkBindImageMemoryInfo.set_image(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkBindImageMemoryInfo.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkBindImageMemoryInfo.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkBindImageMemoryInfo.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindImageMemoryInfo.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryInfo memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindImageMemoryInfo.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryInfo memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkBindImageMemoryInfo.set_memory(this.segment(), value); return this; } + + /// {@return `memoryOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment, long index) { return (long) VH_memoryOffset.get(segment, 0L, index); } + /// {@return `memoryOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment) { return VkBindImageMemoryInfo.get_memoryOffset(segment, 0L); } + /// {@return `memoryOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long memoryOffsetAt(long index) { return VkBindImageMemoryInfo.get_memoryOffset(this.segment(), index); } + /// {@return `memoryOffset`} + public @CType("VkDeviceSize") long memoryOffset() { return VkBindImageMemoryInfo.get_memoryOffset(this.segment()); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_memoryOffset.set(segment, 0L, index, value); } + /// Sets `memoryOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBindImageMemoryInfo.set_memoryOffset(segment, 0L, value); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImageMemoryInfo memoryOffsetAt(long index, @CType("VkDeviceSize") long value) { VkBindImageMemoryInfo.set_memoryOffset(this.segment(), index, value); return this; } + /// Sets `memoryOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBindImageMemoryInfo memoryOffset(@CType("VkDeviceSize") long value) { VkBindImageMemoryInfo.set_memoryOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindImagePlaneMemoryInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindImagePlaneMemoryInfo.java new file mode 100644 index 00000000..a686a2f9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindImagePlaneMemoryInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### planeAspect +/// [VarHandle][#VH_planeAspect] - [Getter][#planeAspect()] - [Setter][#planeAspect(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindImagePlaneMemoryInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageAspectFlagBits planeAspect; +/// } VkBindImagePlaneMemoryInfo; +/// ``` +public final class VkBindImagePlaneMemoryInfo extends Struct { + /// The struct layout of `VkBindImagePlaneMemoryInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("planeAspect") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `planeAspect` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_planeAspect = LAYOUT.arrayElementVarHandle(PathElement.groupElement("planeAspect")); + + /// Creates `VkBindImagePlaneMemoryInfo` with the given segment. + /// @param segment the memory segment + public VkBindImagePlaneMemoryInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindImagePlaneMemoryInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImagePlaneMemoryInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImagePlaneMemoryInfo(segment); } + + /// Creates `VkBindImagePlaneMemoryInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImagePlaneMemoryInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImagePlaneMemoryInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindImagePlaneMemoryInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindImagePlaneMemoryInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindImagePlaneMemoryInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindImagePlaneMemoryInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindImagePlaneMemoryInfo` + public static VkBindImagePlaneMemoryInfo alloc(SegmentAllocator allocator) { return new VkBindImagePlaneMemoryInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindImagePlaneMemoryInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindImagePlaneMemoryInfo` + public static VkBindImagePlaneMemoryInfo alloc(SegmentAllocator allocator, long count) { return new VkBindImagePlaneMemoryInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindImagePlaneMemoryInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindImagePlaneMemoryInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindImagePlaneMemoryInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindImagePlaneMemoryInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImagePlaneMemoryInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBindImagePlaneMemoryInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindImagePlaneMemoryInfo sType(@CType("VkStructureType") int value) { VkBindImagePlaneMemoryInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindImagePlaneMemoryInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindImagePlaneMemoryInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindImagePlaneMemoryInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImagePlaneMemoryInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImagePlaneMemoryInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImagePlaneMemoryInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindImagePlaneMemoryInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindImagePlaneMemoryInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `planeAspect` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlagBits") int get_planeAspect(MemorySegment segment, long index) { return (int) VH_planeAspect.get(segment, 0L, index); } + /// {@return `planeAspect`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlagBits") int get_planeAspect(MemorySegment segment) { return VkBindImagePlaneMemoryInfo.get_planeAspect(segment, 0L); } + /// {@return `planeAspect` at the given index} + /// @param index the index + public @CType("VkImageAspectFlagBits") int planeAspectAt(long index) { return VkBindImagePlaneMemoryInfo.get_planeAspect(this.segment(), index); } + /// {@return `planeAspect`} + public @CType("VkImageAspectFlagBits") int planeAspect() { return VkBindImagePlaneMemoryInfo.get_planeAspect(this.segment()); } + /// Sets `planeAspect` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_planeAspect(MemorySegment segment, long index, @CType("VkImageAspectFlagBits") int value) { VH_planeAspect.set(segment, 0L, index, value); } + /// Sets `planeAspect` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_planeAspect(MemorySegment segment, @CType("VkImageAspectFlagBits") int value) { VkBindImagePlaneMemoryInfo.set_planeAspect(segment, 0L, value); } + /// Sets `planeAspect` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindImagePlaneMemoryInfo planeAspectAt(long index, @CType("VkImageAspectFlagBits") int value) { VkBindImagePlaneMemoryInfo.set_planeAspect(this.segment(), index, value); return this; } + /// Sets `planeAspect` with the given value. + /// @param value the value + /// @return `this` + public VkBindImagePlaneMemoryInfo planeAspect(@CType("VkImageAspectFlagBits") int value) { VkBindImagePlaneMemoryInfo.set_planeAspect(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindMemoryStatus.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindMemoryStatus.java new file mode 100644 index 00000000..88704719 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindMemoryStatus.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pResult +/// [VarHandle][#VH_pResult] - [Getter][#pResult()] - [Setter][#pResult(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindMemoryStatus { +/// VkStructureType sType; +/// const void * pNext; +/// VkResult * pResult; +/// } VkBindMemoryStatus; +/// ``` +public final class VkBindMemoryStatus extends Struct { + /// The struct layout of `VkBindMemoryStatus`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pResult") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pResult` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pResult = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pResult")); + + /// Creates `VkBindMemoryStatus` with the given segment. + /// @param segment the memory segment + public VkBindMemoryStatus(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindMemoryStatus` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindMemoryStatus of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindMemoryStatus(segment); } + + /// Creates `VkBindMemoryStatus` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindMemoryStatus ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindMemoryStatus(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindMemoryStatus` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindMemoryStatus ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindMemoryStatus(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindMemoryStatus` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindMemoryStatus` + public static VkBindMemoryStatus alloc(SegmentAllocator allocator) { return new VkBindMemoryStatus(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindMemoryStatus` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindMemoryStatus` + public static VkBindMemoryStatus alloc(SegmentAllocator allocator, long count) { return new VkBindMemoryStatus(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindMemoryStatus.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindMemoryStatus.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindMemoryStatus.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindMemoryStatus.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindMemoryStatus sTypeAt(long index, @CType("VkStructureType") int value) { VkBindMemoryStatus.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindMemoryStatus sType(@CType("VkStructureType") int value) { VkBindMemoryStatus.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindMemoryStatus.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindMemoryStatus.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindMemoryStatus.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindMemoryStatus.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindMemoryStatus pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindMemoryStatus.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindMemoryStatus pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindMemoryStatus.set_pNext(this.segment(), value); return this; } + + /// {@return `pResult` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkResult *") java.lang.foreign.MemorySegment get_pResult(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pResult.get(segment, 0L, index); } + /// {@return `pResult`} + /// @param segment the segment of the struct + public static @CType("VkResult *") java.lang.foreign.MemorySegment get_pResult(MemorySegment segment) { return VkBindMemoryStatus.get_pResult(segment, 0L); } + /// {@return `pResult` at the given index} + /// @param index the index + public @CType("VkResult *") java.lang.foreign.MemorySegment pResultAt(long index) { return VkBindMemoryStatus.get_pResult(this.segment(), index); } + /// {@return `pResult`} + public @CType("VkResult *") java.lang.foreign.MemorySegment pResult() { return VkBindMemoryStatus.get_pResult(this.segment()); } + /// Sets `pResult` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pResult(MemorySegment segment, long index, @CType("VkResult *") java.lang.foreign.MemorySegment value) { VH_pResult.set(segment, 0L, index, value); } + /// Sets `pResult` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pResult(MemorySegment segment, @CType("VkResult *") java.lang.foreign.MemorySegment value) { VkBindMemoryStatus.set_pResult(segment, 0L, value); } + /// Sets `pResult` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindMemoryStatus pResultAt(long index, @CType("VkResult *") java.lang.foreign.MemorySegment value) { VkBindMemoryStatus.set_pResult(this.segment(), index, value); return this; } + /// Sets `pResult` with the given value. + /// @param value the value + /// @return `this` + public VkBindMemoryStatus pResult(@CType("VkResult *") java.lang.foreign.MemorySegment value) { VkBindMemoryStatus.set_pResult(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindSparseInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindSparseInfo.java new file mode 100644 index 00000000..226ebadf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBindSparseInfo.java @@ -0,0 +1,518 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### waitSemaphoreCount +/// [VarHandle][#VH_waitSemaphoreCount] - [Getter][#waitSemaphoreCount()] - [Setter][#waitSemaphoreCount(int)] +/// ### pWaitSemaphores +/// [VarHandle][#VH_pWaitSemaphores] - [Getter][#pWaitSemaphores()] - [Setter][#pWaitSemaphores(java.lang.foreign.MemorySegment)] +/// ### bufferBindCount +/// [VarHandle][#VH_bufferBindCount] - [Getter][#bufferBindCount()] - [Setter][#bufferBindCount(int)] +/// ### pBufferBinds +/// [VarHandle][#VH_pBufferBinds] - [Getter][#pBufferBinds()] - [Setter][#pBufferBinds(java.lang.foreign.MemorySegment)] +/// ### imageOpaqueBindCount +/// [VarHandle][#VH_imageOpaqueBindCount] - [Getter][#imageOpaqueBindCount()] - [Setter][#imageOpaqueBindCount(int)] +/// ### pImageOpaqueBinds +/// [VarHandle][#VH_pImageOpaqueBinds] - [Getter][#pImageOpaqueBinds()] - [Setter][#pImageOpaqueBinds(java.lang.foreign.MemorySegment)] +/// ### imageBindCount +/// [VarHandle][#VH_imageBindCount] - [Getter][#imageBindCount()] - [Setter][#imageBindCount(int)] +/// ### pImageBinds +/// [VarHandle][#VH_pImageBinds] - [Getter][#pImageBinds()] - [Setter][#pImageBinds(java.lang.foreign.MemorySegment)] +/// ### signalSemaphoreCount +/// [VarHandle][#VH_signalSemaphoreCount] - [Getter][#signalSemaphoreCount()] - [Setter][#signalSemaphoreCount(int)] +/// ### pSignalSemaphores +/// [VarHandle][#VH_pSignalSemaphores] - [Getter][#pSignalSemaphores()] - [Setter][#pSignalSemaphores(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBindSparseInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t waitSemaphoreCount; +/// const VkSemaphore * pWaitSemaphores; +/// uint32_t bufferBindCount; +/// const VkSparseBufferMemoryBindInfo * pBufferBinds; +/// uint32_t imageOpaqueBindCount; +/// const VkSparseImageOpaqueMemoryBindInfo * pImageOpaqueBinds; +/// uint32_t imageBindCount; +/// const VkSparseImageMemoryBindInfo * pImageBinds; +/// uint32_t signalSemaphoreCount; +/// const VkSemaphore * pSignalSemaphores; +/// } VkBindSparseInfo; +/// ``` +public final class VkBindSparseInfo extends Struct { + /// The struct layout of `VkBindSparseInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("waitSemaphoreCount"), + ValueLayout.ADDRESS.withName("pWaitSemaphores"), + ValueLayout.JAVA_INT.withName("bufferBindCount"), + ValueLayout.ADDRESS.withName("pBufferBinds"), + ValueLayout.JAVA_INT.withName("imageOpaqueBindCount"), + ValueLayout.ADDRESS.withName("pImageOpaqueBinds"), + ValueLayout.JAVA_INT.withName("imageBindCount"), + ValueLayout.ADDRESS.withName("pImageBinds"), + ValueLayout.JAVA_INT.withName("signalSemaphoreCount"), + ValueLayout.ADDRESS.withName("pSignalSemaphores") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `waitSemaphoreCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_waitSemaphoreCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("waitSemaphoreCount")); + /// The [VarHandle] of `pWaitSemaphores` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWaitSemaphores = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWaitSemaphores")); + /// The [VarHandle] of `bufferBindCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferBindCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferBindCount")); + /// The [VarHandle] of `pBufferBinds` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBufferBinds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBufferBinds")); + /// The [VarHandle] of `imageOpaqueBindCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageOpaqueBindCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageOpaqueBindCount")); + /// The [VarHandle] of `pImageOpaqueBinds` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pImageOpaqueBinds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pImageOpaqueBinds")); + /// The [VarHandle] of `imageBindCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageBindCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageBindCount")); + /// The [VarHandle] of `pImageBinds` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pImageBinds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pImageBinds")); + /// The [VarHandle] of `signalSemaphoreCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_signalSemaphoreCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("signalSemaphoreCount")); + /// The [VarHandle] of `pSignalSemaphores` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSignalSemaphores = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSignalSemaphores")); + + /// Creates `VkBindSparseInfo` with the given segment. + /// @param segment the memory segment + public VkBindSparseInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBindSparseInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindSparseInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindSparseInfo(segment); } + + /// Creates `VkBindSparseInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindSparseInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBindSparseInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBindSparseInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBindSparseInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBindSparseInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBindSparseInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBindSparseInfo` + public static VkBindSparseInfo alloc(SegmentAllocator allocator) { return new VkBindSparseInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBindSparseInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBindSparseInfo` + public static VkBindSparseInfo alloc(SegmentAllocator allocator, long count) { return new VkBindSparseInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBindSparseInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBindSparseInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBindSparseInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBindSparseInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBindSparseInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo sType(@CType("VkStructureType") int value) { VkBindSparseInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBindSparseInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBindSparseInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBindSparseInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `waitSemaphoreCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_waitSemaphoreCount(MemorySegment segment, long index) { return (int) VH_waitSemaphoreCount.get(segment, 0L, index); } + /// {@return `waitSemaphoreCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_waitSemaphoreCount(MemorySegment segment) { return VkBindSparseInfo.get_waitSemaphoreCount(segment, 0L); } + /// {@return `waitSemaphoreCount` at the given index} + /// @param index the index + public @CType("uint32_t") int waitSemaphoreCountAt(long index) { return VkBindSparseInfo.get_waitSemaphoreCount(this.segment(), index); } + /// {@return `waitSemaphoreCount`} + public @CType("uint32_t") int waitSemaphoreCount() { return VkBindSparseInfo.get_waitSemaphoreCount(this.segment()); } + /// Sets `waitSemaphoreCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_waitSemaphoreCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_waitSemaphoreCount.set(segment, 0L, index, value); } + /// Sets `waitSemaphoreCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_waitSemaphoreCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindSparseInfo.set_waitSemaphoreCount(segment, 0L, value); } + /// Sets `waitSemaphoreCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo waitSemaphoreCountAt(long index, @CType("uint32_t") int value) { VkBindSparseInfo.set_waitSemaphoreCount(this.segment(), index, value); return this; } + /// Sets `waitSemaphoreCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo waitSemaphoreCount(@CType("uint32_t") int value) { VkBindSparseInfo.set_waitSemaphoreCount(this.segment(), value); return this; } + + /// {@return `pWaitSemaphores` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pWaitSemaphores(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWaitSemaphores.get(segment, 0L, index); } + /// {@return `pWaitSemaphores`} + /// @param segment the segment of the struct + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pWaitSemaphores(MemorySegment segment) { return VkBindSparseInfo.get_pWaitSemaphores(segment, 0L); } + /// {@return `pWaitSemaphores` at the given index} + /// @param index the index + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pWaitSemaphoresAt(long index) { return VkBindSparseInfo.get_pWaitSemaphores(this.segment(), index); } + /// {@return `pWaitSemaphores`} + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pWaitSemaphores() { return VkBindSparseInfo.get_pWaitSemaphores(this.segment()); } + /// Sets `pWaitSemaphores` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWaitSemaphores(MemorySegment segment, long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VH_pWaitSemaphores.set(segment, 0L, index, value); } + /// Sets `pWaitSemaphores` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWaitSemaphores(MemorySegment segment, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pWaitSemaphores(segment, 0L, value); } + /// Sets `pWaitSemaphores` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo pWaitSemaphoresAt(long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pWaitSemaphores(this.segment(), index, value); return this; } + /// Sets `pWaitSemaphores` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo pWaitSemaphores(@CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pWaitSemaphores(this.segment(), value); return this; } + + /// {@return `bufferBindCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferBindCount(MemorySegment segment, long index) { return (int) VH_bufferBindCount.get(segment, 0L, index); } + /// {@return `bufferBindCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferBindCount(MemorySegment segment) { return VkBindSparseInfo.get_bufferBindCount(segment, 0L); } + /// {@return `bufferBindCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferBindCountAt(long index) { return VkBindSparseInfo.get_bufferBindCount(this.segment(), index); } + /// {@return `bufferBindCount`} + public @CType("uint32_t") int bufferBindCount() { return VkBindSparseInfo.get_bufferBindCount(this.segment()); } + /// Sets `bufferBindCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferBindCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferBindCount.set(segment, 0L, index, value); } + /// Sets `bufferBindCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferBindCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindSparseInfo.set_bufferBindCount(segment, 0L, value); } + /// Sets `bufferBindCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo bufferBindCountAt(long index, @CType("uint32_t") int value) { VkBindSparseInfo.set_bufferBindCount(this.segment(), index, value); return this; } + /// Sets `bufferBindCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo bufferBindCount(@CType("uint32_t") int value) { VkBindSparseInfo.set_bufferBindCount(this.segment(), value); return this; } + + /// {@return `pBufferBinds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSparseBufferMemoryBindInfo *") java.lang.foreign.MemorySegment get_pBufferBinds(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBufferBinds.get(segment, 0L, index); } + /// {@return `pBufferBinds`} + /// @param segment the segment of the struct + public static @CType("const VkSparseBufferMemoryBindInfo *") java.lang.foreign.MemorySegment get_pBufferBinds(MemorySegment segment) { return VkBindSparseInfo.get_pBufferBinds(segment, 0L); } + /// {@return `pBufferBinds` at the given index} + /// @param index the index + public @CType("const VkSparseBufferMemoryBindInfo *") java.lang.foreign.MemorySegment pBufferBindsAt(long index) { return VkBindSparseInfo.get_pBufferBinds(this.segment(), index); } + /// {@return `pBufferBinds`} + public @CType("const VkSparseBufferMemoryBindInfo *") java.lang.foreign.MemorySegment pBufferBinds() { return VkBindSparseInfo.get_pBufferBinds(this.segment()); } + /// Sets `pBufferBinds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBufferBinds(MemorySegment segment, long index, @CType("const VkSparseBufferMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VH_pBufferBinds.set(segment, 0L, index, value); } + /// Sets `pBufferBinds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBufferBinds(MemorySegment segment, @CType("const VkSparseBufferMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pBufferBinds(segment, 0L, value); } + /// Sets `pBufferBinds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo pBufferBindsAt(long index, @CType("const VkSparseBufferMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pBufferBinds(this.segment(), index, value); return this; } + /// Sets `pBufferBinds` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo pBufferBinds(@CType("const VkSparseBufferMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pBufferBinds(this.segment(), value); return this; } + + /// {@return `imageOpaqueBindCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_imageOpaqueBindCount(MemorySegment segment, long index) { return (int) VH_imageOpaqueBindCount.get(segment, 0L, index); } + /// {@return `imageOpaqueBindCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_imageOpaqueBindCount(MemorySegment segment) { return VkBindSparseInfo.get_imageOpaqueBindCount(segment, 0L); } + /// {@return `imageOpaqueBindCount` at the given index} + /// @param index the index + public @CType("uint32_t") int imageOpaqueBindCountAt(long index) { return VkBindSparseInfo.get_imageOpaqueBindCount(this.segment(), index); } + /// {@return `imageOpaqueBindCount`} + public @CType("uint32_t") int imageOpaqueBindCount() { return VkBindSparseInfo.get_imageOpaqueBindCount(this.segment()); } + /// Sets `imageOpaqueBindCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageOpaqueBindCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_imageOpaqueBindCount.set(segment, 0L, index, value); } + /// Sets `imageOpaqueBindCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageOpaqueBindCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindSparseInfo.set_imageOpaqueBindCount(segment, 0L, value); } + /// Sets `imageOpaqueBindCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo imageOpaqueBindCountAt(long index, @CType("uint32_t") int value) { VkBindSparseInfo.set_imageOpaqueBindCount(this.segment(), index, value); return this; } + /// Sets `imageOpaqueBindCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo imageOpaqueBindCount(@CType("uint32_t") int value) { VkBindSparseInfo.set_imageOpaqueBindCount(this.segment(), value); return this; } + + /// {@return `pImageOpaqueBinds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSparseImageOpaqueMemoryBindInfo *") java.lang.foreign.MemorySegment get_pImageOpaqueBinds(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pImageOpaqueBinds.get(segment, 0L, index); } + /// {@return `pImageOpaqueBinds`} + /// @param segment the segment of the struct + public static @CType("const VkSparseImageOpaqueMemoryBindInfo *") java.lang.foreign.MemorySegment get_pImageOpaqueBinds(MemorySegment segment) { return VkBindSparseInfo.get_pImageOpaqueBinds(segment, 0L); } + /// {@return `pImageOpaqueBinds` at the given index} + /// @param index the index + public @CType("const VkSparseImageOpaqueMemoryBindInfo *") java.lang.foreign.MemorySegment pImageOpaqueBindsAt(long index) { return VkBindSparseInfo.get_pImageOpaqueBinds(this.segment(), index); } + /// {@return `pImageOpaqueBinds`} + public @CType("const VkSparseImageOpaqueMemoryBindInfo *") java.lang.foreign.MemorySegment pImageOpaqueBinds() { return VkBindSparseInfo.get_pImageOpaqueBinds(this.segment()); } + /// Sets `pImageOpaqueBinds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pImageOpaqueBinds(MemorySegment segment, long index, @CType("const VkSparseImageOpaqueMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VH_pImageOpaqueBinds.set(segment, 0L, index, value); } + /// Sets `pImageOpaqueBinds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pImageOpaqueBinds(MemorySegment segment, @CType("const VkSparseImageOpaqueMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pImageOpaqueBinds(segment, 0L, value); } + /// Sets `pImageOpaqueBinds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo pImageOpaqueBindsAt(long index, @CType("const VkSparseImageOpaqueMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pImageOpaqueBinds(this.segment(), index, value); return this; } + /// Sets `pImageOpaqueBinds` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo pImageOpaqueBinds(@CType("const VkSparseImageOpaqueMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pImageOpaqueBinds(this.segment(), value); return this; } + + /// {@return `imageBindCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_imageBindCount(MemorySegment segment, long index) { return (int) VH_imageBindCount.get(segment, 0L, index); } + /// {@return `imageBindCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_imageBindCount(MemorySegment segment) { return VkBindSparseInfo.get_imageBindCount(segment, 0L); } + /// {@return `imageBindCount` at the given index} + /// @param index the index + public @CType("uint32_t") int imageBindCountAt(long index) { return VkBindSparseInfo.get_imageBindCount(this.segment(), index); } + /// {@return `imageBindCount`} + public @CType("uint32_t") int imageBindCount() { return VkBindSparseInfo.get_imageBindCount(this.segment()); } + /// Sets `imageBindCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageBindCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_imageBindCount.set(segment, 0L, index, value); } + /// Sets `imageBindCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageBindCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindSparseInfo.set_imageBindCount(segment, 0L, value); } + /// Sets `imageBindCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo imageBindCountAt(long index, @CType("uint32_t") int value) { VkBindSparseInfo.set_imageBindCount(this.segment(), index, value); return this; } + /// Sets `imageBindCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo imageBindCount(@CType("uint32_t") int value) { VkBindSparseInfo.set_imageBindCount(this.segment(), value); return this; } + + /// {@return `pImageBinds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSparseImageMemoryBindInfo *") java.lang.foreign.MemorySegment get_pImageBinds(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pImageBinds.get(segment, 0L, index); } + /// {@return `pImageBinds`} + /// @param segment the segment of the struct + public static @CType("const VkSparseImageMemoryBindInfo *") java.lang.foreign.MemorySegment get_pImageBinds(MemorySegment segment) { return VkBindSparseInfo.get_pImageBinds(segment, 0L); } + /// {@return `pImageBinds` at the given index} + /// @param index the index + public @CType("const VkSparseImageMemoryBindInfo *") java.lang.foreign.MemorySegment pImageBindsAt(long index) { return VkBindSparseInfo.get_pImageBinds(this.segment(), index); } + /// {@return `pImageBinds`} + public @CType("const VkSparseImageMemoryBindInfo *") java.lang.foreign.MemorySegment pImageBinds() { return VkBindSparseInfo.get_pImageBinds(this.segment()); } + /// Sets `pImageBinds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pImageBinds(MemorySegment segment, long index, @CType("const VkSparseImageMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VH_pImageBinds.set(segment, 0L, index, value); } + /// Sets `pImageBinds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pImageBinds(MemorySegment segment, @CType("const VkSparseImageMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pImageBinds(segment, 0L, value); } + /// Sets `pImageBinds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo pImageBindsAt(long index, @CType("const VkSparseImageMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pImageBinds(this.segment(), index, value); return this; } + /// Sets `pImageBinds` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo pImageBinds(@CType("const VkSparseImageMemoryBindInfo *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pImageBinds(this.segment(), value); return this; } + + /// {@return `signalSemaphoreCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_signalSemaphoreCount(MemorySegment segment, long index) { return (int) VH_signalSemaphoreCount.get(segment, 0L, index); } + /// {@return `signalSemaphoreCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_signalSemaphoreCount(MemorySegment segment) { return VkBindSparseInfo.get_signalSemaphoreCount(segment, 0L); } + /// {@return `signalSemaphoreCount` at the given index} + /// @param index the index + public @CType("uint32_t") int signalSemaphoreCountAt(long index) { return VkBindSparseInfo.get_signalSemaphoreCount(this.segment(), index); } + /// {@return `signalSemaphoreCount`} + public @CType("uint32_t") int signalSemaphoreCount() { return VkBindSparseInfo.get_signalSemaphoreCount(this.segment()); } + /// Sets `signalSemaphoreCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_signalSemaphoreCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_signalSemaphoreCount.set(segment, 0L, index, value); } + /// Sets `signalSemaphoreCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_signalSemaphoreCount(MemorySegment segment, @CType("uint32_t") int value) { VkBindSparseInfo.set_signalSemaphoreCount(segment, 0L, value); } + /// Sets `signalSemaphoreCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo signalSemaphoreCountAt(long index, @CType("uint32_t") int value) { VkBindSparseInfo.set_signalSemaphoreCount(this.segment(), index, value); return this; } + /// Sets `signalSemaphoreCount` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo signalSemaphoreCount(@CType("uint32_t") int value) { VkBindSparseInfo.set_signalSemaphoreCount(this.segment(), value); return this; } + + /// {@return `pSignalSemaphores` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pSignalSemaphores(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSignalSemaphores.get(segment, 0L, index); } + /// {@return `pSignalSemaphores`} + /// @param segment the segment of the struct + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pSignalSemaphores(MemorySegment segment) { return VkBindSparseInfo.get_pSignalSemaphores(segment, 0L); } + /// {@return `pSignalSemaphores` at the given index} + /// @param index the index + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pSignalSemaphoresAt(long index) { return VkBindSparseInfo.get_pSignalSemaphores(this.segment(), index); } + /// {@return `pSignalSemaphores`} + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pSignalSemaphores() { return VkBindSparseInfo.get_pSignalSemaphores(this.segment()); } + /// Sets `pSignalSemaphores` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSignalSemaphores(MemorySegment segment, long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VH_pSignalSemaphores.set(segment, 0L, index, value); } + /// Sets `pSignalSemaphores` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSignalSemaphores(MemorySegment segment, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pSignalSemaphores(segment, 0L, value); } + /// Sets `pSignalSemaphores` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBindSparseInfo pSignalSemaphoresAt(long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pSignalSemaphores(this.segment(), index, value); return this; } + /// Sets `pSignalSemaphores` with the given value. + /// @param value the value + /// @return `this` + public VkBindSparseInfo pSignalSemaphores(@CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkBindSparseInfo.set_pSignalSemaphores(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBlitImageInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBlitImageInfo2.java new file mode 100644 index 00000000..2e605c5c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBlitImageInfo2.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcImage +/// [VarHandle][#VH_srcImage] - [Getter][#srcImage()] - [Setter][#srcImage(java.lang.foreign.MemorySegment)] +/// ### srcImageLayout +/// [VarHandle][#VH_srcImageLayout] - [Getter][#srcImageLayout()] - [Setter][#srcImageLayout(int)] +/// ### dstImage +/// [VarHandle][#VH_dstImage] - [Getter][#dstImage()] - [Setter][#dstImage(java.lang.foreign.MemorySegment)] +/// ### dstImageLayout +/// [VarHandle][#VH_dstImageLayout] - [Getter][#dstImageLayout()] - [Setter][#dstImageLayout(int)] +/// ### regionCount +/// [VarHandle][#VH_regionCount] - [Getter][#regionCount()] - [Setter][#regionCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ### filter +/// [VarHandle][#VH_filter] - [Getter][#filter()] - [Setter][#filter(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBlitImageInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage srcImage; +/// VkImageLayout srcImageLayout; +/// VkImage dstImage; +/// VkImageLayout dstImageLayout; +/// uint32_t regionCount; +/// const VkImageBlit2 * pRegions; +/// VkFilter filter; +/// } VkBlitImageInfo2; +/// ``` +public final class VkBlitImageInfo2 extends Struct { + /// The struct layout of `VkBlitImageInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("srcImage"), + ValueLayout.JAVA_INT.withName("srcImageLayout"), + ValueLayout.ADDRESS.withName("dstImage"), + ValueLayout.JAVA_INT.withName("dstImageLayout"), + ValueLayout.JAVA_INT.withName("regionCount"), + ValueLayout.ADDRESS.withName("pRegions"), + ValueLayout.JAVA_INT.withName("filter") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImage")); + /// The [VarHandle] of `srcImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImageLayout")); + /// The [VarHandle] of `dstImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImage")); + /// The [VarHandle] of `dstImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImageLayout")); + /// The [VarHandle] of `regionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_regionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("regionCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + /// The [VarHandle] of `filter` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_filter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("filter")); + + /// Creates `VkBlitImageInfo2` with the given segment. + /// @param segment the memory segment + public VkBlitImageInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBlitImageInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBlitImageInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBlitImageInfo2(segment); } + + /// Creates `VkBlitImageInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBlitImageInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBlitImageInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBlitImageInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBlitImageInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBlitImageInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBlitImageInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBlitImageInfo2` + public static VkBlitImageInfo2 alloc(SegmentAllocator allocator) { return new VkBlitImageInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBlitImageInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBlitImageInfo2` + public static VkBlitImageInfo2 alloc(SegmentAllocator allocator, long count) { return new VkBlitImageInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBlitImageInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBlitImageInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBlitImageInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBlitImageInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkBlitImageInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 sType(@CType("VkStructureType") int value) { VkBlitImageInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBlitImageInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBlitImageInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBlitImageInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcImage.get(segment, 0L, index); } + /// {@return `srcImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment) { return VkBlitImageInfo2.get_srcImage(segment, 0L); } + /// {@return `srcImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment srcImageAt(long index) { return VkBlitImageInfo2.get_srcImage(this.segment(), index); } + /// {@return `srcImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment srcImage() { return VkBlitImageInfo2.get_srcImage(this.segment()); } + /// Sets `srcImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_srcImage.set(segment, 0L, index, value); } + /// Sets `srcImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_srcImage(segment, 0L, value); } + /// Sets `srcImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 srcImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_srcImage(this.segment(), index, value); return this; } + /// Sets `srcImage` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 srcImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_srcImage(this.segment(), value); return this; } + + /// {@return `srcImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment, long index) { return (int) VH_srcImageLayout.get(segment, 0L, index); } + /// {@return `srcImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment) { return VkBlitImageInfo2.get_srcImageLayout(segment, 0L); } + /// {@return `srcImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int srcImageLayoutAt(long index) { return VkBlitImageInfo2.get_srcImageLayout(this.segment(), index); } + /// {@return `srcImageLayout`} + public @CType("VkImageLayout") int srcImageLayout() { return VkBlitImageInfo2.get_srcImageLayout(this.segment()); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_srcImageLayout.set(segment, 0L, index, value); } + /// Sets `srcImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkBlitImageInfo2.set_srcImageLayout(segment, 0L, value); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 srcImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkBlitImageInfo2.set_srcImageLayout(this.segment(), index, value); return this; } + /// Sets `srcImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 srcImageLayout(@CType("VkImageLayout") int value) { VkBlitImageInfo2.set_srcImageLayout(this.segment(), value); return this; } + + /// {@return `dstImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstImage.get(segment, 0L, index); } + /// {@return `dstImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment) { return VkBlitImageInfo2.get_dstImage(segment, 0L); } + /// {@return `dstImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment dstImageAt(long index) { return VkBlitImageInfo2.get_dstImage(this.segment(), index); } + /// {@return `dstImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment dstImage() { return VkBlitImageInfo2.get_dstImage(this.segment()); } + /// Sets `dstImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_dstImage.set(segment, 0L, index, value); } + /// Sets `dstImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_dstImage(segment, 0L, value); } + /// Sets `dstImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 dstImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_dstImage(this.segment(), index, value); return this; } + /// Sets `dstImage` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 dstImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_dstImage(this.segment(), value); return this; } + + /// {@return `dstImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment, long index) { return (int) VH_dstImageLayout.get(segment, 0L, index); } + /// {@return `dstImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment) { return VkBlitImageInfo2.get_dstImageLayout(segment, 0L); } + /// {@return `dstImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int dstImageLayoutAt(long index) { return VkBlitImageInfo2.get_dstImageLayout(this.segment(), index); } + /// {@return `dstImageLayout`} + public @CType("VkImageLayout") int dstImageLayout() { return VkBlitImageInfo2.get_dstImageLayout(this.segment()); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_dstImageLayout.set(segment, 0L, index, value); } + /// Sets `dstImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkBlitImageInfo2.set_dstImageLayout(segment, 0L, value); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 dstImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkBlitImageInfo2.set_dstImageLayout(this.segment(), index, value); return this; } + /// Sets `dstImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 dstImageLayout(@CType("VkImageLayout") int value) { VkBlitImageInfo2.set_dstImageLayout(this.segment(), value); return this; } + + /// {@return `regionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_regionCount(MemorySegment segment, long index) { return (int) VH_regionCount.get(segment, 0L, index); } + /// {@return `regionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_regionCount(MemorySegment segment) { return VkBlitImageInfo2.get_regionCount(segment, 0L); } + /// {@return `regionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int regionCountAt(long index) { return VkBlitImageInfo2.get_regionCount(this.segment(), index); } + /// {@return `regionCount`} + public @CType("uint32_t") int regionCount() { return VkBlitImageInfo2.get_regionCount(this.segment()); } + /// Sets `regionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_regionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_regionCount.set(segment, 0L, index, value); } + /// Sets `regionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_regionCount(MemorySegment segment, @CType("uint32_t") int value) { VkBlitImageInfo2.set_regionCount(segment, 0L, value); } + /// Sets `regionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 regionCountAt(long index, @CType("uint32_t") int value) { VkBlitImageInfo2.set_regionCount(this.segment(), index, value); return this; } + /// Sets `regionCount` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 regionCount(@CType("uint32_t") int value) { VkBlitImageInfo2.set_regionCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageBlit2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkImageBlit2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkBlitImageInfo2.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkImageBlit2 *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkBlitImageInfo2.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkImageBlit2 *") java.lang.foreign.MemorySegment pRegions() { return VkBlitImageInfo2.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkImageBlit2 *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkImageBlit2 *") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 pRegionsAt(long index, @CType("const VkImageBlit2 *") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 pRegions(@CType("const VkImageBlit2 *") java.lang.foreign.MemorySegment value) { VkBlitImageInfo2.set_pRegions(this.segment(), value); return this; } + + /// {@return `filter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFilter") int get_filter(MemorySegment segment, long index) { return (int) VH_filter.get(segment, 0L, index); } + /// {@return `filter`} + /// @param segment the segment of the struct + public static @CType("VkFilter") int get_filter(MemorySegment segment) { return VkBlitImageInfo2.get_filter(segment, 0L); } + /// {@return `filter` at the given index} + /// @param index the index + public @CType("VkFilter") int filterAt(long index) { return VkBlitImageInfo2.get_filter(this.segment(), index); } + /// {@return `filter`} + public @CType("VkFilter") int filter() { return VkBlitImageInfo2.get_filter(this.segment()); } + /// Sets `filter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_filter(MemorySegment segment, long index, @CType("VkFilter") int value) { VH_filter.set(segment, 0L, index, value); } + /// Sets `filter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_filter(MemorySegment segment, @CType("VkFilter") int value) { VkBlitImageInfo2.set_filter(segment, 0L, value); } + /// Sets `filter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 filterAt(long index, @CType("VkFilter") int value) { VkBlitImageInfo2.set_filter(this.segment(), index, value); return this; } + /// Sets `filter` with the given value. + /// @param value the value + /// @return `this` + public VkBlitImageInfo2 filter(@CType("VkFilter") int value) { VkBlitImageInfo2.set_filter(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferCopy.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferCopy.java new file mode 100644 index 00000000..d7a0c302 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferCopy.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### srcOffset +/// [VarHandle][#VH_srcOffset] - [Getter][#srcOffset()] - [Setter][#srcOffset(long)] +/// ### dstOffset +/// [VarHandle][#VH_dstOffset] - [Getter][#dstOffset()] - [Setter][#dstOffset(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferCopy { +/// VkDeviceSize srcOffset; +/// VkDeviceSize dstOffset; +/// VkDeviceSize size; +/// } VkBufferCopy; +/// ``` +public final class VkBufferCopy extends Struct { + /// The struct layout of `VkBufferCopy`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("srcOffset"), + ValueLayout.JAVA_LONG.withName("dstOffset"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `srcOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcOffset")); + /// The [VarHandle] of `dstOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstOffset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkBufferCopy` with the given segment. + /// @param segment the memory segment + public VkBufferCopy(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferCopy` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCopy of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCopy(segment); } + + /// Creates `VkBufferCopy` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCopy ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCopy(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferCopy` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCopy ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCopy(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferCopy` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferCopy` + public static VkBufferCopy alloc(SegmentAllocator allocator) { return new VkBufferCopy(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferCopy` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferCopy` + public static VkBufferCopy alloc(SegmentAllocator allocator, long count) { return new VkBufferCopy(allocator.allocate(LAYOUT, count)); } + + /// {@return `srcOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_srcOffset(MemorySegment segment, long index) { return (long) VH_srcOffset.get(segment, 0L, index); } + /// {@return `srcOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_srcOffset(MemorySegment segment) { return VkBufferCopy.get_srcOffset(segment, 0L); } + /// {@return `srcOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long srcOffsetAt(long index) { return VkBufferCopy.get_srcOffset(this.segment(), index); } + /// {@return `srcOffset`} + public @CType("VkDeviceSize") long srcOffset() { return VkBufferCopy.get_srcOffset(this.segment()); } + /// Sets `srcOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_srcOffset.set(segment, 0L, index, value); } + /// Sets `srcOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferCopy.set_srcOffset(segment, 0L, value); } + /// Sets `srcOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCopy srcOffsetAt(long index, @CType("VkDeviceSize") long value) { VkBufferCopy.set_srcOffset(this.segment(), index, value); return this; } + /// Sets `srcOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCopy srcOffset(@CType("VkDeviceSize") long value) { VkBufferCopy.set_srcOffset(this.segment(), value); return this; } + + /// {@return `dstOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_dstOffset(MemorySegment segment, long index) { return (long) VH_dstOffset.get(segment, 0L, index); } + /// {@return `dstOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_dstOffset(MemorySegment segment) { return VkBufferCopy.get_dstOffset(segment, 0L); } + /// {@return `dstOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long dstOffsetAt(long index) { return VkBufferCopy.get_dstOffset(this.segment(), index); } + /// {@return `dstOffset`} + public @CType("VkDeviceSize") long dstOffset() { return VkBufferCopy.get_dstOffset(this.segment()); } + /// Sets `dstOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_dstOffset.set(segment, 0L, index, value); } + /// Sets `dstOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferCopy.set_dstOffset(segment, 0L, value); } + /// Sets `dstOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCopy dstOffsetAt(long index, @CType("VkDeviceSize") long value) { VkBufferCopy.set_dstOffset(this.segment(), index, value); return this; } + /// Sets `dstOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCopy dstOffset(@CType("VkDeviceSize") long value) { VkBufferCopy.set_dstOffset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkBufferCopy.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkBufferCopy.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkBufferCopy.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferCopy.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCopy sizeAt(long index, @CType("VkDeviceSize") long value) { VkBufferCopy.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCopy size(@CType("VkDeviceSize") long value) { VkBufferCopy.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferCopy2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferCopy2.java new file mode 100644 index 00000000..a40ede7b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferCopy2.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcOffset +/// [VarHandle][#VH_srcOffset] - [Getter][#srcOffset()] - [Setter][#srcOffset(long)] +/// ### dstOffset +/// [VarHandle][#VH_dstOffset] - [Getter][#dstOffset()] - [Setter][#dstOffset(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferCopy2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceSize srcOffset; +/// VkDeviceSize dstOffset; +/// VkDeviceSize size; +/// } VkBufferCopy2; +/// ``` +public final class VkBufferCopy2 extends Struct { + /// The struct layout of `VkBufferCopy2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("srcOffset"), + ValueLayout.JAVA_LONG.withName("dstOffset"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcOffset")); + /// The [VarHandle] of `dstOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstOffset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkBufferCopy2` with the given segment. + /// @param segment the memory segment + public VkBufferCopy2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferCopy2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCopy2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCopy2(segment); } + + /// Creates `VkBufferCopy2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCopy2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCopy2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferCopy2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCopy2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCopy2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferCopy2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferCopy2` + public static VkBufferCopy2 alloc(SegmentAllocator allocator) { return new VkBufferCopy2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferCopy2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferCopy2` + public static VkBufferCopy2 alloc(SegmentAllocator allocator, long count) { return new VkBufferCopy2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferCopy2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferCopy2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferCopy2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferCopy2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCopy2 sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferCopy2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCopy2 sType(@CType("VkStructureType") int value) { VkBufferCopy2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferCopy2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferCopy2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferCopy2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCopy2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCopy2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCopy2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCopy2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCopy2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_srcOffset(MemorySegment segment, long index) { return (long) VH_srcOffset.get(segment, 0L, index); } + /// {@return `srcOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_srcOffset(MemorySegment segment) { return VkBufferCopy2.get_srcOffset(segment, 0L); } + /// {@return `srcOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long srcOffsetAt(long index) { return VkBufferCopy2.get_srcOffset(this.segment(), index); } + /// {@return `srcOffset`} + public @CType("VkDeviceSize") long srcOffset() { return VkBufferCopy2.get_srcOffset(this.segment()); } + /// Sets `srcOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_srcOffset.set(segment, 0L, index, value); } + /// Sets `srcOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferCopy2.set_srcOffset(segment, 0L, value); } + /// Sets `srcOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCopy2 srcOffsetAt(long index, @CType("VkDeviceSize") long value) { VkBufferCopy2.set_srcOffset(this.segment(), index, value); return this; } + /// Sets `srcOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCopy2 srcOffset(@CType("VkDeviceSize") long value) { VkBufferCopy2.set_srcOffset(this.segment(), value); return this; } + + /// {@return `dstOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_dstOffset(MemorySegment segment, long index) { return (long) VH_dstOffset.get(segment, 0L, index); } + /// {@return `dstOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_dstOffset(MemorySegment segment) { return VkBufferCopy2.get_dstOffset(segment, 0L); } + /// {@return `dstOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long dstOffsetAt(long index) { return VkBufferCopy2.get_dstOffset(this.segment(), index); } + /// {@return `dstOffset`} + public @CType("VkDeviceSize") long dstOffset() { return VkBufferCopy2.get_dstOffset(this.segment()); } + /// Sets `dstOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_dstOffset.set(segment, 0L, index, value); } + /// Sets `dstOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferCopy2.set_dstOffset(segment, 0L, value); } + /// Sets `dstOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCopy2 dstOffsetAt(long index, @CType("VkDeviceSize") long value) { VkBufferCopy2.set_dstOffset(this.segment(), index, value); return this; } + /// Sets `dstOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCopy2 dstOffset(@CType("VkDeviceSize") long value) { VkBufferCopy2.set_dstOffset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkBufferCopy2.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkBufferCopy2.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkBufferCopy2.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferCopy2.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCopy2 sizeAt(long index, @CType("VkDeviceSize") long value) { VkBufferCopy2.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCopy2 size(@CType("VkDeviceSize") long value) { VkBufferCopy2.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferCreateInfo.java new file mode 100644 index 00000000..ec95fd2c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferCreateInfo.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ### sharingMode +/// [VarHandle][#VH_sharingMode] - [Getter][#sharingMode()] - [Setter][#sharingMode(int)] +/// ### queueFamilyIndexCount +/// [VarHandle][#VH_queueFamilyIndexCount] - [Getter][#queueFamilyIndexCount()] - [Setter][#queueFamilyIndexCount(int)] +/// ### pQueueFamilyIndices +/// [VarHandle][#VH_pQueueFamilyIndices] - [Getter][#pQueueFamilyIndices()] - [Setter][#pQueueFamilyIndices(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkBufferCreateFlags flags; +/// VkDeviceSize size; +/// VkBufferUsageFlags usage; +/// VkSharingMode sharingMode; +/// uint32_t queueFamilyIndexCount; +/// const uint32_t * pQueueFamilyIndices; +/// } VkBufferCreateInfo; +/// ``` +public final class VkBufferCreateInfo extends Struct { + /// The struct layout of `VkBufferCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("size"), + ValueLayout.JAVA_INT.withName("usage"), + ValueLayout.JAVA_INT.withName("sharingMode"), + ValueLayout.JAVA_INT.withName("queueFamilyIndexCount"), + ValueLayout.ADDRESS.withName("pQueueFamilyIndices") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + /// The [VarHandle] of `sharingMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sharingMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sharingMode")); + /// The [VarHandle] of `queueFamilyIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueFamilyIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueFamilyIndexCount")); + /// The [VarHandle] of `pQueueFamilyIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pQueueFamilyIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pQueueFamilyIndices")); + + /// Creates `VkBufferCreateInfo` with the given segment. + /// @param segment the memory segment + public VkBufferCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCreateInfo(segment); } + + /// Creates `VkBufferCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferCreateInfo` + public static VkBufferCreateInfo alloc(SegmentAllocator allocator) { return new VkBufferCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferCreateInfo` + public static VkBufferCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkBufferCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCreateInfo sType(@CType("VkStructureType") int value) { VkBufferCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkBufferCreateFlags") int get_flags(MemorySegment segment) { return VkBufferCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkBufferCreateFlags") int flagsAt(long index) { return VkBufferCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkBufferCreateFlags") int flags() { return VkBufferCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkBufferCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkBufferCreateFlags") int value) { VkBufferCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCreateInfo flagsAt(long index, @CType("VkBufferCreateFlags") int value) { VkBufferCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCreateInfo flags(@CType("VkBufferCreateFlags") int value) { VkBufferCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkBufferCreateInfo.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkBufferCreateInfo.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkBufferCreateInfo.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferCreateInfo.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCreateInfo sizeAt(long index, @CType("VkDeviceSize") long value) { VkBufferCreateInfo.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCreateInfo size(@CType("VkDeviceSize") long value) { VkBufferCreateInfo.set_size(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferUsageFlags") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkBufferUsageFlags") int get_usage(MemorySegment segment) { return VkBufferCreateInfo.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkBufferUsageFlags") int usageAt(long index) { return VkBufferCreateInfo.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkBufferUsageFlags") int usage() { return VkBufferCreateInfo.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkBufferUsageFlags") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkBufferUsageFlags") int value) { VkBufferCreateInfo.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCreateInfo usageAt(long index, @CType("VkBufferUsageFlags") int value) { VkBufferCreateInfo.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCreateInfo usage(@CType("VkBufferUsageFlags") int value) { VkBufferCreateInfo.set_usage(this.segment(), value); return this; } + + /// {@return `sharingMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSharingMode") int get_sharingMode(MemorySegment segment, long index) { return (int) VH_sharingMode.get(segment, 0L, index); } + /// {@return `sharingMode`} + /// @param segment the segment of the struct + public static @CType("VkSharingMode") int get_sharingMode(MemorySegment segment) { return VkBufferCreateInfo.get_sharingMode(segment, 0L); } + /// {@return `sharingMode` at the given index} + /// @param index the index + public @CType("VkSharingMode") int sharingModeAt(long index) { return VkBufferCreateInfo.get_sharingMode(this.segment(), index); } + /// {@return `sharingMode`} + public @CType("VkSharingMode") int sharingMode() { return VkBufferCreateInfo.get_sharingMode(this.segment()); } + /// Sets `sharingMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sharingMode(MemorySegment segment, long index, @CType("VkSharingMode") int value) { VH_sharingMode.set(segment, 0L, index, value); } + /// Sets `sharingMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sharingMode(MemorySegment segment, @CType("VkSharingMode") int value) { VkBufferCreateInfo.set_sharingMode(segment, 0L, value); } + /// Sets `sharingMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCreateInfo sharingModeAt(long index, @CType("VkSharingMode") int value) { VkBufferCreateInfo.set_sharingMode(this.segment(), index, value); return this; } + /// Sets `sharingMode` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCreateInfo sharingMode(@CType("VkSharingMode") int value) { VkBufferCreateInfo.set_sharingMode(this.segment(), value); return this; } + + /// {@return `queueFamilyIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueFamilyIndexCount(MemorySegment segment, long index) { return (int) VH_queueFamilyIndexCount.get(segment, 0L, index); } + /// {@return `queueFamilyIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueFamilyIndexCount(MemorySegment segment) { return VkBufferCreateInfo.get_queueFamilyIndexCount(segment, 0L); } + /// {@return `queueFamilyIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queueFamilyIndexCountAt(long index) { return VkBufferCreateInfo.get_queueFamilyIndexCount(this.segment(), index); } + /// {@return `queueFamilyIndexCount`} + public @CType("uint32_t") int queueFamilyIndexCount() { return VkBufferCreateInfo.get_queueFamilyIndexCount(this.segment()); } + /// Sets `queueFamilyIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFamilyIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueFamilyIndexCount.set(segment, 0L, index, value); } + /// Sets `queueFamilyIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFamilyIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkBufferCreateInfo.set_queueFamilyIndexCount(segment, 0L, value); } + /// Sets `queueFamilyIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCreateInfo queueFamilyIndexCountAt(long index, @CType("uint32_t") int value) { VkBufferCreateInfo.set_queueFamilyIndexCount(this.segment(), index, value); return this; } + /// Sets `queueFamilyIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCreateInfo queueFamilyIndexCount(@CType("uint32_t") int value) { VkBufferCreateInfo.set_queueFamilyIndexCount(this.segment(), value); return this; } + + /// {@return `pQueueFamilyIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pQueueFamilyIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pQueueFamilyIndices.get(segment, 0L, index); } + /// {@return `pQueueFamilyIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pQueueFamilyIndices(MemorySegment segment) { return VkBufferCreateInfo.get_pQueueFamilyIndices(segment, 0L); } + /// {@return `pQueueFamilyIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pQueueFamilyIndicesAt(long index) { return VkBufferCreateInfo.get_pQueueFamilyIndices(this.segment(), index); } + /// {@return `pQueueFamilyIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pQueueFamilyIndices() { return VkBufferCreateInfo.get_pQueueFamilyIndices(this.segment()); } + /// Sets `pQueueFamilyIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pQueueFamilyIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pQueueFamilyIndices.set(segment, 0L, index, value); } + /// Sets `pQueueFamilyIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pQueueFamilyIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBufferCreateInfo.set_pQueueFamilyIndices(segment, 0L, value); } + /// Sets `pQueueFamilyIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferCreateInfo pQueueFamilyIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBufferCreateInfo.set_pQueueFamilyIndices(this.segment(), index, value); return this; } + /// Sets `pQueueFamilyIndices` with the given value. + /// @param value the value + /// @return `this` + public VkBufferCreateInfo pQueueFamilyIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkBufferCreateInfo.set_pQueueFamilyIndices(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferDeviceAddressInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferDeviceAddressInfo.java new file mode 100644 index 00000000..d300b32d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferDeviceAddressInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferDeviceAddressInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkBuffer buffer; +/// } VkBufferDeviceAddressInfo; +/// ``` +public final class VkBufferDeviceAddressInfo extends Struct { + /// The struct layout of `VkBufferDeviceAddressInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("buffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + + /// Creates `VkBufferDeviceAddressInfo` with the given segment. + /// @param segment the memory segment + public VkBufferDeviceAddressInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferDeviceAddressInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferDeviceAddressInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferDeviceAddressInfo(segment); } + + /// Creates `VkBufferDeviceAddressInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferDeviceAddressInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferDeviceAddressInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferDeviceAddressInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferDeviceAddressInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferDeviceAddressInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferDeviceAddressInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferDeviceAddressInfo` + public static VkBufferDeviceAddressInfo alloc(SegmentAllocator allocator) { return new VkBufferDeviceAddressInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferDeviceAddressInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferDeviceAddressInfo` + public static VkBufferDeviceAddressInfo alloc(SegmentAllocator allocator, long count) { return new VkBufferDeviceAddressInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferDeviceAddressInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferDeviceAddressInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferDeviceAddressInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferDeviceAddressInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferDeviceAddressInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressInfo sType(@CType("VkStructureType") int value) { VkBufferDeviceAddressInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferDeviceAddressInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferDeviceAddressInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferDeviceAddressInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferDeviceAddressInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferDeviceAddressInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferDeviceAddressInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkBufferDeviceAddressInfo.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkBufferDeviceAddressInfo.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkBufferDeviceAddressInfo.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferDeviceAddressInfo.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressInfo bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferDeviceAddressInfo.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkBufferDeviceAddressInfo buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferDeviceAddressInfo.set_buffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferImageCopy.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferImageCopy.java new file mode 100644 index 00000000..7efb6c0d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferImageCopy.java @@ -0,0 +1,302 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### bufferOffset +/// [VarHandle][#VH_bufferOffset] - [Getter][#bufferOffset()] - [Setter][#bufferOffset(long)] +/// ### bufferRowLength +/// [VarHandle][#VH_bufferRowLength] - [Getter][#bufferRowLength()] - [Setter][#bufferRowLength(int)] +/// ### bufferImageHeight +/// [VarHandle][#VH_bufferImageHeight] - [Getter][#bufferImageHeight()] - [Setter][#bufferImageHeight(int)] +/// ### imageSubresource +/// [Byte offset][#OFFSET_imageSubresource] - [Memory layout][#ML_imageSubresource] - [Getter][#imageSubresource()] - [Setter][#imageSubresource(java.lang.foreign.MemorySegment)] +/// ### imageOffset +/// [Byte offset][#OFFSET_imageOffset] - [Memory layout][#ML_imageOffset] - [Getter][#imageOffset()] - [Setter][#imageOffset(java.lang.foreign.MemorySegment)] +/// ### imageExtent +/// [Byte offset][#OFFSET_imageExtent] - [Memory layout][#ML_imageExtent] - [Getter][#imageExtent()] - [Setter][#imageExtent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferImageCopy { +/// VkDeviceSize bufferOffset; +/// uint32_t bufferRowLength; +/// uint32_t bufferImageHeight; +/// VkImageSubresourceLayers imageSubresource; +/// VkOffset3D imageOffset; +/// VkExtent3D imageExtent; +/// } VkBufferImageCopy; +/// ``` +public final class VkBufferImageCopy extends Struct { + /// The struct layout of `VkBufferImageCopy`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("bufferOffset"), + ValueLayout.JAVA_INT.withName("bufferRowLength"), + ValueLayout.JAVA_INT.withName("bufferImageHeight"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("imageSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("imageOffset"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("imageExtent") + ); + /// The [VarHandle] of `bufferOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_bufferOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferOffset")); + /// The [VarHandle] of `bufferRowLength` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferRowLength = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferRowLength")); + /// The [VarHandle] of `bufferImageHeight` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferImageHeight = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferImageHeight")); + /// The byte offset of `imageSubresource`. + public static final long OFFSET_imageSubresource = LAYOUT.byteOffset(PathElement.groupElement("imageSubresource")); + /// The memory layout of `imageSubresource`. + public static final MemoryLayout ML_imageSubresource = LAYOUT.select(PathElement.groupElement("imageSubresource")); + /// The byte offset of `imageOffset`. + public static final long OFFSET_imageOffset = LAYOUT.byteOffset(PathElement.groupElement("imageOffset")); + /// The memory layout of `imageOffset`. + public static final MemoryLayout ML_imageOffset = LAYOUT.select(PathElement.groupElement("imageOffset")); + /// The byte offset of `imageExtent`. + public static final long OFFSET_imageExtent = LAYOUT.byteOffset(PathElement.groupElement("imageExtent")); + /// The memory layout of `imageExtent`. + public static final MemoryLayout ML_imageExtent = LAYOUT.select(PathElement.groupElement("imageExtent")); + + /// Creates `VkBufferImageCopy` with the given segment. + /// @param segment the memory segment + public VkBufferImageCopy(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferImageCopy` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferImageCopy of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferImageCopy(segment); } + + /// Creates `VkBufferImageCopy` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferImageCopy ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferImageCopy(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferImageCopy` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferImageCopy ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferImageCopy(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferImageCopy` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferImageCopy` + public static VkBufferImageCopy alloc(SegmentAllocator allocator) { return new VkBufferImageCopy(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferImageCopy` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferImageCopy` + public static VkBufferImageCopy alloc(SegmentAllocator allocator, long count) { return new VkBufferImageCopy(allocator.allocate(LAYOUT, count)); } + + /// {@return `bufferOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_bufferOffset(MemorySegment segment, long index) { return (long) VH_bufferOffset.get(segment, 0L, index); } + /// {@return `bufferOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_bufferOffset(MemorySegment segment) { return VkBufferImageCopy.get_bufferOffset(segment, 0L); } + /// {@return `bufferOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long bufferOffsetAt(long index) { return VkBufferImageCopy.get_bufferOffset(this.segment(), index); } + /// {@return `bufferOffset`} + public @CType("VkDeviceSize") long bufferOffset() { return VkBufferImageCopy.get_bufferOffset(this.segment()); } + /// Sets `bufferOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_bufferOffset.set(segment, 0L, index, value); } + /// Sets `bufferOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferImageCopy.set_bufferOffset(segment, 0L, value); } + /// Sets `bufferOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy bufferOffsetAt(long index, @CType("VkDeviceSize") long value) { VkBufferImageCopy.set_bufferOffset(this.segment(), index, value); return this; } + /// Sets `bufferOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy bufferOffset(@CType("VkDeviceSize") long value) { VkBufferImageCopy.set_bufferOffset(this.segment(), value); return this; } + + /// {@return `bufferRowLength` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferRowLength(MemorySegment segment, long index) { return (int) VH_bufferRowLength.get(segment, 0L, index); } + /// {@return `bufferRowLength`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferRowLength(MemorySegment segment) { return VkBufferImageCopy.get_bufferRowLength(segment, 0L); } + /// {@return `bufferRowLength` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferRowLengthAt(long index) { return VkBufferImageCopy.get_bufferRowLength(this.segment(), index); } + /// {@return `bufferRowLength`} + public @CType("uint32_t") int bufferRowLength() { return VkBufferImageCopy.get_bufferRowLength(this.segment()); } + /// Sets `bufferRowLength` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferRowLength(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferRowLength.set(segment, 0L, index, value); } + /// Sets `bufferRowLength` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferRowLength(MemorySegment segment, @CType("uint32_t") int value) { VkBufferImageCopy.set_bufferRowLength(segment, 0L, value); } + /// Sets `bufferRowLength` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy bufferRowLengthAt(long index, @CType("uint32_t") int value) { VkBufferImageCopy.set_bufferRowLength(this.segment(), index, value); return this; } + /// Sets `bufferRowLength` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy bufferRowLength(@CType("uint32_t") int value) { VkBufferImageCopy.set_bufferRowLength(this.segment(), value); return this; } + + /// {@return `bufferImageHeight` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferImageHeight(MemorySegment segment, long index) { return (int) VH_bufferImageHeight.get(segment, 0L, index); } + /// {@return `bufferImageHeight`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferImageHeight(MemorySegment segment) { return VkBufferImageCopy.get_bufferImageHeight(segment, 0L); } + /// {@return `bufferImageHeight` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferImageHeightAt(long index) { return VkBufferImageCopy.get_bufferImageHeight(this.segment(), index); } + /// {@return `bufferImageHeight`} + public @CType("uint32_t") int bufferImageHeight() { return VkBufferImageCopy.get_bufferImageHeight(this.segment()); } + /// Sets `bufferImageHeight` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferImageHeight(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferImageHeight.set(segment, 0L, index, value); } + /// Sets `bufferImageHeight` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferImageHeight(MemorySegment segment, @CType("uint32_t") int value) { VkBufferImageCopy.set_bufferImageHeight(segment, 0L, value); } + /// Sets `bufferImageHeight` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy bufferImageHeightAt(long index, @CType("uint32_t") int value) { VkBufferImageCopy.set_bufferImageHeight(this.segment(), index, value); return this; } + /// Sets `bufferImageHeight` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy bufferImageHeight(@CType("uint32_t") int value) { VkBufferImageCopy.set_bufferImageHeight(this.segment(), value); return this; } + + /// {@return `imageSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource); } + /// {@return `imageSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment) { return VkBufferImageCopy.get_imageSubresource(segment, 0L); } + /// {@return `imageSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment imageSubresourceAt(long index) { return VkBufferImageCopy.get_imageSubresource(this.segment(), index); } + /// {@return `imageSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment imageSubresource() { return VkBufferImageCopy.get_imageSubresource(this.segment()); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource.byteSize()); } + /// Sets `imageSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkBufferImageCopy.set_imageSubresource(segment, 0L, value); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy imageSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkBufferImageCopy.set_imageSubresource(this.segment(), index, value); return this; } + /// Sets `imageSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy imageSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkBufferImageCopy.set_imageSubresource(this.segment(), value); return this; } + + /// {@return `imageOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_imageOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageOffset, index), ML_imageOffset); } + /// {@return `imageOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_imageOffset(MemorySegment segment) { return VkBufferImageCopy.get_imageOffset(segment, 0L); } + /// {@return `imageOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment imageOffsetAt(long index) { return VkBufferImageCopy.get_imageOffset(this.segment(), index); } + /// {@return `imageOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment imageOffset() { return VkBufferImageCopy.get_imageOffset(this.segment()); } + /// Sets `imageOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageOffset, index), ML_imageOffset.byteSize()); } + /// Sets `imageOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy.set_imageOffset(segment, 0L, value); } + /// Sets `imageOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy imageOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy.set_imageOffset(this.segment(), index, value); return this; } + /// Sets `imageOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy imageOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy.set_imageOffset(this.segment(), value); return this; } + + /// {@return `imageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent); } + /// {@return `imageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment) { return VkBufferImageCopy.get_imageExtent(segment, 0L); } + /// {@return `imageExtent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageExtentAt(long index) { return VkBufferImageCopy.get_imageExtent(this.segment(), index); } + /// {@return `imageExtent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageExtent() { return VkBufferImageCopy.get_imageExtent(this.segment()); } + /// Sets `imageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageExtent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent.byteSize()); } + /// Sets `imageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageExtent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy.set_imageExtent(segment, 0L, value); } + /// Sets `imageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy imageExtentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy.set_imageExtent(this.segment(), index, value); return this; } + /// Sets `imageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy imageExtent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy.set_imageExtent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferImageCopy2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferImageCopy2.java new file mode 100644 index 00000000..28e2e0c1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferImageCopy2.java @@ -0,0 +1,376 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### bufferOffset +/// [VarHandle][#VH_bufferOffset] - [Getter][#bufferOffset()] - [Setter][#bufferOffset(long)] +/// ### bufferRowLength +/// [VarHandle][#VH_bufferRowLength] - [Getter][#bufferRowLength()] - [Setter][#bufferRowLength(int)] +/// ### bufferImageHeight +/// [VarHandle][#VH_bufferImageHeight] - [Getter][#bufferImageHeight()] - [Setter][#bufferImageHeight(int)] +/// ### imageSubresource +/// [Byte offset][#OFFSET_imageSubresource] - [Memory layout][#ML_imageSubresource] - [Getter][#imageSubresource()] - [Setter][#imageSubresource(java.lang.foreign.MemorySegment)] +/// ### imageOffset +/// [Byte offset][#OFFSET_imageOffset] - [Memory layout][#ML_imageOffset] - [Getter][#imageOffset()] - [Setter][#imageOffset(java.lang.foreign.MemorySegment)] +/// ### imageExtent +/// [Byte offset][#OFFSET_imageExtent] - [Memory layout][#ML_imageExtent] - [Getter][#imageExtent()] - [Setter][#imageExtent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferImageCopy2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceSize bufferOffset; +/// uint32_t bufferRowLength; +/// uint32_t bufferImageHeight; +/// VkImageSubresourceLayers imageSubresource; +/// VkOffset3D imageOffset; +/// VkExtent3D imageExtent; +/// } VkBufferImageCopy2; +/// ``` +public final class VkBufferImageCopy2 extends Struct { + /// The struct layout of `VkBufferImageCopy2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("bufferOffset"), + ValueLayout.JAVA_INT.withName("bufferRowLength"), + ValueLayout.JAVA_INT.withName("bufferImageHeight"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("imageSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("imageOffset"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("imageExtent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `bufferOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_bufferOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferOffset")); + /// The [VarHandle] of `bufferRowLength` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferRowLength = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferRowLength")); + /// The [VarHandle] of `bufferImageHeight` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferImageHeight = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferImageHeight")); + /// The byte offset of `imageSubresource`. + public static final long OFFSET_imageSubresource = LAYOUT.byteOffset(PathElement.groupElement("imageSubresource")); + /// The memory layout of `imageSubresource`. + public static final MemoryLayout ML_imageSubresource = LAYOUT.select(PathElement.groupElement("imageSubresource")); + /// The byte offset of `imageOffset`. + public static final long OFFSET_imageOffset = LAYOUT.byteOffset(PathElement.groupElement("imageOffset")); + /// The memory layout of `imageOffset`. + public static final MemoryLayout ML_imageOffset = LAYOUT.select(PathElement.groupElement("imageOffset")); + /// The byte offset of `imageExtent`. + public static final long OFFSET_imageExtent = LAYOUT.byteOffset(PathElement.groupElement("imageExtent")); + /// The memory layout of `imageExtent`. + public static final MemoryLayout ML_imageExtent = LAYOUT.select(PathElement.groupElement("imageExtent")); + + /// Creates `VkBufferImageCopy2` with the given segment. + /// @param segment the memory segment + public VkBufferImageCopy2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferImageCopy2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferImageCopy2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferImageCopy2(segment); } + + /// Creates `VkBufferImageCopy2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferImageCopy2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferImageCopy2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferImageCopy2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferImageCopy2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferImageCopy2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferImageCopy2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferImageCopy2` + public static VkBufferImageCopy2 alloc(SegmentAllocator allocator) { return new VkBufferImageCopy2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferImageCopy2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferImageCopy2` + public static VkBufferImageCopy2 alloc(SegmentAllocator allocator, long count) { return new VkBufferImageCopy2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferImageCopy2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferImageCopy2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferImageCopy2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferImageCopy2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferImageCopy2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 sType(@CType("VkStructureType") int value) { VkBufferImageCopy2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferImageCopy2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferImageCopy2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferImageCopy2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_pNext(this.segment(), value); return this; } + + /// {@return `bufferOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_bufferOffset(MemorySegment segment, long index) { return (long) VH_bufferOffset.get(segment, 0L, index); } + /// {@return `bufferOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_bufferOffset(MemorySegment segment) { return VkBufferImageCopy2.get_bufferOffset(segment, 0L); } + /// {@return `bufferOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long bufferOffsetAt(long index) { return VkBufferImageCopy2.get_bufferOffset(this.segment(), index); } + /// {@return `bufferOffset`} + public @CType("VkDeviceSize") long bufferOffset() { return VkBufferImageCopy2.get_bufferOffset(this.segment()); } + /// Sets `bufferOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_bufferOffset.set(segment, 0L, index, value); } + /// Sets `bufferOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferImageCopy2.set_bufferOffset(segment, 0L, value); } + /// Sets `bufferOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 bufferOffsetAt(long index, @CType("VkDeviceSize") long value) { VkBufferImageCopy2.set_bufferOffset(this.segment(), index, value); return this; } + /// Sets `bufferOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 bufferOffset(@CType("VkDeviceSize") long value) { VkBufferImageCopy2.set_bufferOffset(this.segment(), value); return this; } + + /// {@return `bufferRowLength` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferRowLength(MemorySegment segment, long index) { return (int) VH_bufferRowLength.get(segment, 0L, index); } + /// {@return `bufferRowLength`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferRowLength(MemorySegment segment) { return VkBufferImageCopy2.get_bufferRowLength(segment, 0L); } + /// {@return `bufferRowLength` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferRowLengthAt(long index) { return VkBufferImageCopy2.get_bufferRowLength(this.segment(), index); } + /// {@return `bufferRowLength`} + public @CType("uint32_t") int bufferRowLength() { return VkBufferImageCopy2.get_bufferRowLength(this.segment()); } + /// Sets `bufferRowLength` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferRowLength(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferRowLength.set(segment, 0L, index, value); } + /// Sets `bufferRowLength` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferRowLength(MemorySegment segment, @CType("uint32_t") int value) { VkBufferImageCopy2.set_bufferRowLength(segment, 0L, value); } + /// Sets `bufferRowLength` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 bufferRowLengthAt(long index, @CType("uint32_t") int value) { VkBufferImageCopy2.set_bufferRowLength(this.segment(), index, value); return this; } + /// Sets `bufferRowLength` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 bufferRowLength(@CType("uint32_t") int value) { VkBufferImageCopy2.set_bufferRowLength(this.segment(), value); return this; } + + /// {@return `bufferImageHeight` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferImageHeight(MemorySegment segment, long index) { return (int) VH_bufferImageHeight.get(segment, 0L, index); } + /// {@return `bufferImageHeight`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferImageHeight(MemorySegment segment) { return VkBufferImageCopy2.get_bufferImageHeight(segment, 0L); } + /// {@return `bufferImageHeight` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferImageHeightAt(long index) { return VkBufferImageCopy2.get_bufferImageHeight(this.segment(), index); } + /// {@return `bufferImageHeight`} + public @CType("uint32_t") int bufferImageHeight() { return VkBufferImageCopy2.get_bufferImageHeight(this.segment()); } + /// Sets `bufferImageHeight` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferImageHeight(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferImageHeight.set(segment, 0L, index, value); } + /// Sets `bufferImageHeight` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferImageHeight(MemorySegment segment, @CType("uint32_t") int value) { VkBufferImageCopy2.set_bufferImageHeight(segment, 0L, value); } + /// Sets `bufferImageHeight` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 bufferImageHeightAt(long index, @CType("uint32_t") int value) { VkBufferImageCopy2.set_bufferImageHeight(this.segment(), index, value); return this; } + /// Sets `bufferImageHeight` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 bufferImageHeight(@CType("uint32_t") int value) { VkBufferImageCopy2.set_bufferImageHeight(this.segment(), value); return this; } + + /// {@return `imageSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource); } + /// {@return `imageSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment) { return VkBufferImageCopy2.get_imageSubresource(segment, 0L); } + /// {@return `imageSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment imageSubresourceAt(long index) { return VkBufferImageCopy2.get_imageSubresource(this.segment(), index); } + /// {@return `imageSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment imageSubresource() { return VkBufferImageCopy2.get_imageSubresource(this.segment()); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource.byteSize()); } + /// Sets `imageSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_imageSubresource(segment, 0L, value); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 imageSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_imageSubresource(this.segment(), index, value); return this; } + /// Sets `imageSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 imageSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_imageSubresource(this.segment(), value); return this; } + + /// {@return `imageOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_imageOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageOffset, index), ML_imageOffset); } + /// {@return `imageOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_imageOffset(MemorySegment segment) { return VkBufferImageCopy2.get_imageOffset(segment, 0L); } + /// {@return `imageOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment imageOffsetAt(long index) { return VkBufferImageCopy2.get_imageOffset(this.segment(), index); } + /// {@return `imageOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment imageOffset() { return VkBufferImageCopy2.get_imageOffset(this.segment()); } + /// Sets `imageOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageOffset, index), ML_imageOffset.byteSize()); } + /// Sets `imageOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_imageOffset(segment, 0L, value); } + /// Sets `imageOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 imageOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_imageOffset(this.segment(), index, value); return this; } + /// Sets `imageOffset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 imageOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_imageOffset(this.segment(), value); return this; } + + /// {@return `imageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent); } + /// {@return `imageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment) { return VkBufferImageCopy2.get_imageExtent(segment, 0L); } + /// {@return `imageExtent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageExtentAt(long index) { return VkBufferImageCopy2.get_imageExtent(this.segment(), index); } + /// {@return `imageExtent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageExtent() { return VkBufferImageCopy2.get_imageExtent(this.segment()); } + /// Sets `imageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageExtent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent.byteSize()); } + /// Sets `imageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageExtent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_imageExtent(segment, 0L, value); } + /// Sets `imageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 imageExtentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_imageExtent(this.segment(), index, value); return this; } + /// Sets `imageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkBufferImageCopy2 imageExtent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkBufferImageCopy2.set_imageExtent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferMemoryBarrier.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferMemoryBarrier.java new file mode 100644 index 00000000..7afc78b1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferMemoryBarrier.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcAccessMask +/// [VarHandle][#VH_srcAccessMask] - [Getter][#srcAccessMask()] - [Setter][#srcAccessMask(int)] +/// ### dstAccessMask +/// [VarHandle][#VH_dstAccessMask] - [Getter][#dstAccessMask()] - [Setter][#dstAccessMask(int)] +/// ### srcQueueFamilyIndex +/// [VarHandle][#VH_srcQueueFamilyIndex] - [Getter][#srcQueueFamilyIndex()] - [Setter][#srcQueueFamilyIndex(int)] +/// ### dstQueueFamilyIndex +/// [VarHandle][#VH_dstQueueFamilyIndex] - [Getter][#dstQueueFamilyIndex()] - [Setter][#dstQueueFamilyIndex(int)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferMemoryBarrier { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccessFlags srcAccessMask; +/// VkAccessFlags dstAccessMask; +/// uint32_t srcQueueFamilyIndex; +/// uint32_t dstQueueFamilyIndex; +/// VkBuffer buffer; +/// VkDeviceSize offset; +/// VkDeviceSize size; +/// } VkBufferMemoryBarrier; +/// ``` +public final class VkBufferMemoryBarrier extends Struct { + /// The struct layout of `VkBufferMemoryBarrier`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("srcAccessMask"), + ValueLayout.JAVA_INT.withName("dstAccessMask"), + ValueLayout.JAVA_INT.withName("srcQueueFamilyIndex"), + ValueLayout.JAVA_INT.withName("dstQueueFamilyIndex"), + ValueLayout.ADDRESS.withName("buffer"), + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcAccessMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAccessMask")); + /// The [VarHandle] of `dstAccessMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAccessMask")); + /// The [VarHandle] of `srcQueueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcQueueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcQueueFamilyIndex")); + /// The [VarHandle] of `dstQueueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstQueueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstQueueFamilyIndex")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkBufferMemoryBarrier` with the given segment. + /// @param segment the memory segment + public VkBufferMemoryBarrier(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferMemoryBarrier` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferMemoryBarrier of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferMemoryBarrier(segment); } + + /// Creates `VkBufferMemoryBarrier` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferMemoryBarrier ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferMemoryBarrier(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferMemoryBarrier` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferMemoryBarrier ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferMemoryBarrier(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferMemoryBarrier` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferMemoryBarrier` + public static VkBufferMemoryBarrier alloc(SegmentAllocator allocator) { return new VkBufferMemoryBarrier(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferMemoryBarrier` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferMemoryBarrier` + public static VkBufferMemoryBarrier alloc(SegmentAllocator allocator, long count) { return new VkBufferMemoryBarrier(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferMemoryBarrier.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferMemoryBarrier.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferMemoryBarrier.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferMemoryBarrier.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferMemoryBarrier.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier sType(@CType("VkStructureType") int value) { VkBufferMemoryBarrier.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferMemoryBarrier.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferMemoryBarrier.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferMemoryBarrier.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier.set_pNext(this.segment(), value); return this; } + + /// {@return `srcAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags") int get_srcAccessMask(MemorySegment segment, long index) { return (int) VH_srcAccessMask.get(segment, 0L, index); } + /// {@return `srcAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags") int get_srcAccessMask(MemorySegment segment) { return VkBufferMemoryBarrier.get_srcAccessMask(segment, 0L); } + /// {@return `srcAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags") int srcAccessMaskAt(long index) { return VkBufferMemoryBarrier.get_srcAccessMask(this.segment(), index); } + /// {@return `srcAccessMask`} + public @CType("VkAccessFlags") int srcAccessMask() { return VkBufferMemoryBarrier.get_srcAccessMask(this.segment()); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags") int value) { VH_srcAccessMask.set(segment, 0L, index, value); } + /// Sets `srcAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, @CType("VkAccessFlags") int value) { VkBufferMemoryBarrier.set_srcAccessMask(segment, 0L, value); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier srcAccessMaskAt(long index, @CType("VkAccessFlags") int value) { VkBufferMemoryBarrier.set_srcAccessMask(this.segment(), index, value); return this; } + /// Sets `srcAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier srcAccessMask(@CType("VkAccessFlags") int value) { VkBufferMemoryBarrier.set_srcAccessMask(this.segment(), value); return this; } + + /// {@return `dstAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags") int get_dstAccessMask(MemorySegment segment, long index) { return (int) VH_dstAccessMask.get(segment, 0L, index); } + /// {@return `dstAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags") int get_dstAccessMask(MemorySegment segment) { return VkBufferMemoryBarrier.get_dstAccessMask(segment, 0L); } + /// {@return `dstAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags") int dstAccessMaskAt(long index) { return VkBufferMemoryBarrier.get_dstAccessMask(this.segment(), index); } + /// {@return `dstAccessMask`} + public @CType("VkAccessFlags") int dstAccessMask() { return VkBufferMemoryBarrier.get_dstAccessMask(this.segment()); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags") int value) { VH_dstAccessMask.set(segment, 0L, index, value); } + /// Sets `dstAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, @CType("VkAccessFlags") int value) { VkBufferMemoryBarrier.set_dstAccessMask(segment, 0L, value); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier dstAccessMaskAt(long index, @CType("VkAccessFlags") int value) { VkBufferMemoryBarrier.set_dstAccessMask(this.segment(), index, value); return this; } + /// Sets `dstAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier dstAccessMask(@CType("VkAccessFlags") int value) { VkBufferMemoryBarrier.set_dstAccessMask(this.segment(), value); return this; } + + /// {@return `srcQueueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_srcQueueFamilyIndex(MemorySegment segment, long index) { return (int) VH_srcQueueFamilyIndex.get(segment, 0L, index); } + /// {@return `srcQueueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_srcQueueFamilyIndex(MemorySegment segment) { return VkBufferMemoryBarrier.get_srcQueueFamilyIndex(segment, 0L); } + /// {@return `srcQueueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int srcQueueFamilyIndexAt(long index) { return VkBufferMemoryBarrier.get_srcQueueFamilyIndex(this.segment(), index); } + /// {@return `srcQueueFamilyIndex`} + public @CType("uint32_t") int srcQueueFamilyIndex() { return VkBufferMemoryBarrier.get_srcQueueFamilyIndex(this.segment()); } + /// Sets `srcQueueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcQueueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_srcQueueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `srcQueueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcQueueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkBufferMemoryBarrier.set_srcQueueFamilyIndex(segment, 0L, value); } + /// Sets `srcQueueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier srcQueueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkBufferMemoryBarrier.set_srcQueueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `srcQueueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier srcQueueFamilyIndex(@CType("uint32_t") int value) { VkBufferMemoryBarrier.set_srcQueueFamilyIndex(this.segment(), value); return this; } + + /// {@return `dstQueueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstQueueFamilyIndex(MemorySegment segment, long index) { return (int) VH_dstQueueFamilyIndex.get(segment, 0L, index); } + /// {@return `dstQueueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstQueueFamilyIndex(MemorySegment segment) { return VkBufferMemoryBarrier.get_dstQueueFamilyIndex(segment, 0L); } + /// {@return `dstQueueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int dstQueueFamilyIndexAt(long index) { return VkBufferMemoryBarrier.get_dstQueueFamilyIndex(this.segment(), index); } + /// {@return `dstQueueFamilyIndex`} + public @CType("uint32_t") int dstQueueFamilyIndex() { return VkBufferMemoryBarrier.get_dstQueueFamilyIndex(this.segment()); } + /// Sets `dstQueueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstQueueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstQueueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `dstQueueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstQueueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkBufferMemoryBarrier.set_dstQueueFamilyIndex(segment, 0L, value); } + /// Sets `dstQueueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier dstQueueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkBufferMemoryBarrier.set_dstQueueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `dstQueueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier dstQueueFamilyIndex(@CType("uint32_t") int value) { VkBufferMemoryBarrier.set_dstQueueFamilyIndex(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkBufferMemoryBarrier.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkBufferMemoryBarrier.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkBufferMemoryBarrier.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier.set_buffer(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkBufferMemoryBarrier.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkBufferMemoryBarrier.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkBufferMemoryBarrier.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferMemoryBarrier.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier offsetAt(long index, @CType("VkDeviceSize") long value) { VkBufferMemoryBarrier.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier offset(@CType("VkDeviceSize") long value) { VkBufferMemoryBarrier.set_offset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkBufferMemoryBarrier.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkBufferMemoryBarrier.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkBufferMemoryBarrier.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferMemoryBarrier.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier sizeAt(long index, @CType("VkDeviceSize") long value) { VkBufferMemoryBarrier.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier size(@CType("VkDeviceSize") long value) { VkBufferMemoryBarrier.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferMemoryBarrier2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferMemoryBarrier2.java new file mode 100644 index 00000000..19846f97 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferMemoryBarrier2.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcStageMask +/// [VarHandle][#VH_srcStageMask] - [Getter][#srcStageMask()] - [Setter][#srcStageMask(long)] +/// ### srcAccessMask +/// [VarHandle][#VH_srcAccessMask] - [Getter][#srcAccessMask()] - [Setter][#srcAccessMask(long)] +/// ### dstStageMask +/// [VarHandle][#VH_dstStageMask] - [Getter][#dstStageMask()] - [Setter][#dstStageMask(long)] +/// ### dstAccessMask +/// [VarHandle][#VH_dstAccessMask] - [Getter][#dstAccessMask()] - [Setter][#dstAccessMask(long)] +/// ### srcQueueFamilyIndex +/// [VarHandle][#VH_srcQueueFamilyIndex] - [Getter][#srcQueueFamilyIndex()] - [Setter][#srcQueueFamilyIndex(int)] +/// ### dstQueueFamilyIndex +/// [VarHandle][#VH_dstQueueFamilyIndex] - [Getter][#dstQueueFamilyIndex()] - [Setter][#dstQueueFamilyIndex(int)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferMemoryBarrier2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineStageFlags2 srcStageMask; +/// VkAccessFlags2 srcAccessMask; +/// VkPipelineStageFlags2 dstStageMask; +/// VkAccessFlags2 dstAccessMask; +/// uint32_t srcQueueFamilyIndex; +/// uint32_t dstQueueFamilyIndex; +/// VkBuffer buffer; +/// VkDeviceSize offset; +/// VkDeviceSize size; +/// } VkBufferMemoryBarrier2; +/// ``` +public final class VkBufferMemoryBarrier2 extends Struct { + /// The struct layout of `VkBufferMemoryBarrier2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("srcStageMask"), + ValueLayout.JAVA_LONG.withName("srcAccessMask"), + ValueLayout.JAVA_LONG.withName("dstStageMask"), + ValueLayout.JAVA_LONG.withName("dstAccessMask"), + ValueLayout.JAVA_INT.withName("srcQueueFamilyIndex"), + ValueLayout.JAVA_INT.withName("dstQueueFamilyIndex"), + ValueLayout.ADDRESS.withName("buffer"), + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcStageMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcStageMask")); + /// The [VarHandle] of `srcAccessMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAccessMask")); + /// The [VarHandle] of `dstStageMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstStageMask")); + /// The [VarHandle] of `dstAccessMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAccessMask")); + /// The [VarHandle] of `srcQueueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcQueueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcQueueFamilyIndex")); + /// The [VarHandle] of `dstQueueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstQueueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstQueueFamilyIndex")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkBufferMemoryBarrier2` with the given segment. + /// @param segment the memory segment + public VkBufferMemoryBarrier2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferMemoryBarrier2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferMemoryBarrier2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferMemoryBarrier2(segment); } + + /// Creates `VkBufferMemoryBarrier2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferMemoryBarrier2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferMemoryBarrier2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferMemoryBarrier2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferMemoryBarrier2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferMemoryBarrier2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferMemoryBarrier2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferMemoryBarrier2` + public static VkBufferMemoryBarrier2 alloc(SegmentAllocator allocator) { return new VkBufferMemoryBarrier2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferMemoryBarrier2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferMemoryBarrier2` + public static VkBufferMemoryBarrier2 alloc(SegmentAllocator allocator, long count) { return new VkBufferMemoryBarrier2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferMemoryBarrier2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferMemoryBarrier2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferMemoryBarrier2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferMemoryBarrier2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferMemoryBarrier2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 sType(@CType("VkStructureType") int value) { VkBufferMemoryBarrier2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferMemoryBarrier2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferMemoryBarrier2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferMemoryBarrier2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags2") long get_srcStageMask(MemorySegment segment, long index) { return (long) VH_srcStageMask.get(segment, 0L, index); } + /// {@return `srcStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags2") long get_srcStageMask(MemorySegment segment) { return VkBufferMemoryBarrier2.get_srcStageMask(segment, 0L); } + /// {@return `srcStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags2") long srcStageMaskAt(long index) { return VkBufferMemoryBarrier2.get_srcStageMask(this.segment(), index); } + /// {@return `srcStageMask`} + public @CType("VkPipelineStageFlags2") long srcStageMask() { return VkBufferMemoryBarrier2.get_srcStageMask(this.segment()); } + /// Sets `srcStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags2") long value) { VH_srcStageMask.set(segment, 0L, index, value); } + /// Sets `srcStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcStageMask(MemorySegment segment, @CType("VkPipelineStageFlags2") long value) { VkBufferMemoryBarrier2.set_srcStageMask(segment, 0L, value); } + /// Sets `srcStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 srcStageMaskAt(long index, @CType("VkPipelineStageFlags2") long value) { VkBufferMemoryBarrier2.set_srcStageMask(this.segment(), index, value); return this; } + /// Sets `srcStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 srcStageMask(@CType("VkPipelineStageFlags2") long value) { VkBufferMemoryBarrier2.set_srcStageMask(this.segment(), value); return this; } + + /// {@return `srcAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags2") long get_srcAccessMask(MemorySegment segment, long index) { return (long) VH_srcAccessMask.get(segment, 0L, index); } + /// {@return `srcAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags2") long get_srcAccessMask(MemorySegment segment) { return VkBufferMemoryBarrier2.get_srcAccessMask(segment, 0L); } + /// {@return `srcAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags2") long srcAccessMaskAt(long index) { return VkBufferMemoryBarrier2.get_srcAccessMask(this.segment(), index); } + /// {@return `srcAccessMask`} + public @CType("VkAccessFlags2") long srcAccessMask() { return VkBufferMemoryBarrier2.get_srcAccessMask(this.segment()); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags2") long value) { VH_srcAccessMask.set(segment, 0L, index, value); } + /// Sets `srcAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, @CType("VkAccessFlags2") long value) { VkBufferMemoryBarrier2.set_srcAccessMask(segment, 0L, value); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 srcAccessMaskAt(long index, @CType("VkAccessFlags2") long value) { VkBufferMemoryBarrier2.set_srcAccessMask(this.segment(), index, value); return this; } + /// Sets `srcAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 srcAccessMask(@CType("VkAccessFlags2") long value) { VkBufferMemoryBarrier2.set_srcAccessMask(this.segment(), value); return this; } + + /// {@return `dstStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags2") long get_dstStageMask(MemorySegment segment, long index) { return (long) VH_dstStageMask.get(segment, 0L, index); } + /// {@return `dstStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags2") long get_dstStageMask(MemorySegment segment) { return VkBufferMemoryBarrier2.get_dstStageMask(segment, 0L); } + /// {@return `dstStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags2") long dstStageMaskAt(long index) { return VkBufferMemoryBarrier2.get_dstStageMask(this.segment(), index); } + /// {@return `dstStageMask`} + public @CType("VkPipelineStageFlags2") long dstStageMask() { return VkBufferMemoryBarrier2.get_dstStageMask(this.segment()); } + /// Sets `dstStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags2") long value) { VH_dstStageMask.set(segment, 0L, index, value); } + /// Sets `dstStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstStageMask(MemorySegment segment, @CType("VkPipelineStageFlags2") long value) { VkBufferMemoryBarrier2.set_dstStageMask(segment, 0L, value); } + /// Sets `dstStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 dstStageMaskAt(long index, @CType("VkPipelineStageFlags2") long value) { VkBufferMemoryBarrier2.set_dstStageMask(this.segment(), index, value); return this; } + /// Sets `dstStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 dstStageMask(@CType("VkPipelineStageFlags2") long value) { VkBufferMemoryBarrier2.set_dstStageMask(this.segment(), value); return this; } + + /// {@return `dstAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags2") long get_dstAccessMask(MemorySegment segment, long index) { return (long) VH_dstAccessMask.get(segment, 0L, index); } + /// {@return `dstAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags2") long get_dstAccessMask(MemorySegment segment) { return VkBufferMemoryBarrier2.get_dstAccessMask(segment, 0L); } + /// {@return `dstAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags2") long dstAccessMaskAt(long index) { return VkBufferMemoryBarrier2.get_dstAccessMask(this.segment(), index); } + /// {@return `dstAccessMask`} + public @CType("VkAccessFlags2") long dstAccessMask() { return VkBufferMemoryBarrier2.get_dstAccessMask(this.segment()); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags2") long value) { VH_dstAccessMask.set(segment, 0L, index, value); } + /// Sets `dstAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, @CType("VkAccessFlags2") long value) { VkBufferMemoryBarrier2.set_dstAccessMask(segment, 0L, value); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 dstAccessMaskAt(long index, @CType("VkAccessFlags2") long value) { VkBufferMemoryBarrier2.set_dstAccessMask(this.segment(), index, value); return this; } + /// Sets `dstAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 dstAccessMask(@CType("VkAccessFlags2") long value) { VkBufferMemoryBarrier2.set_dstAccessMask(this.segment(), value); return this; } + + /// {@return `srcQueueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_srcQueueFamilyIndex(MemorySegment segment, long index) { return (int) VH_srcQueueFamilyIndex.get(segment, 0L, index); } + /// {@return `srcQueueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_srcQueueFamilyIndex(MemorySegment segment) { return VkBufferMemoryBarrier2.get_srcQueueFamilyIndex(segment, 0L); } + /// {@return `srcQueueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int srcQueueFamilyIndexAt(long index) { return VkBufferMemoryBarrier2.get_srcQueueFamilyIndex(this.segment(), index); } + /// {@return `srcQueueFamilyIndex`} + public @CType("uint32_t") int srcQueueFamilyIndex() { return VkBufferMemoryBarrier2.get_srcQueueFamilyIndex(this.segment()); } + /// Sets `srcQueueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcQueueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_srcQueueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `srcQueueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcQueueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkBufferMemoryBarrier2.set_srcQueueFamilyIndex(segment, 0L, value); } + /// Sets `srcQueueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 srcQueueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkBufferMemoryBarrier2.set_srcQueueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `srcQueueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 srcQueueFamilyIndex(@CType("uint32_t") int value) { VkBufferMemoryBarrier2.set_srcQueueFamilyIndex(this.segment(), value); return this; } + + /// {@return `dstQueueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstQueueFamilyIndex(MemorySegment segment, long index) { return (int) VH_dstQueueFamilyIndex.get(segment, 0L, index); } + /// {@return `dstQueueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstQueueFamilyIndex(MemorySegment segment) { return VkBufferMemoryBarrier2.get_dstQueueFamilyIndex(segment, 0L); } + /// {@return `dstQueueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int dstQueueFamilyIndexAt(long index) { return VkBufferMemoryBarrier2.get_dstQueueFamilyIndex(this.segment(), index); } + /// {@return `dstQueueFamilyIndex`} + public @CType("uint32_t") int dstQueueFamilyIndex() { return VkBufferMemoryBarrier2.get_dstQueueFamilyIndex(this.segment()); } + /// Sets `dstQueueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstQueueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstQueueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `dstQueueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstQueueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkBufferMemoryBarrier2.set_dstQueueFamilyIndex(segment, 0L, value); } + /// Sets `dstQueueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 dstQueueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkBufferMemoryBarrier2.set_dstQueueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `dstQueueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 dstQueueFamilyIndex(@CType("uint32_t") int value) { VkBufferMemoryBarrier2.set_dstQueueFamilyIndex(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkBufferMemoryBarrier2.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkBufferMemoryBarrier2.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkBufferMemoryBarrier2.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier2.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier2.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferMemoryBarrier2.set_buffer(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkBufferMemoryBarrier2.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkBufferMemoryBarrier2.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkBufferMemoryBarrier2.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferMemoryBarrier2.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 offsetAt(long index, @CType("VkDeviceSize") long value) { VkBufferMemoryBarrier2.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 offset(@CType("VkDeviceSize") long value) { VkBufferMemoryBarrier2.set_offset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkBufferMemoryBarrier2.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkBufferMemoryBarrier2.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkBufferMemoryBarrier2.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferMemoryBarrier2.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 sizeAt(long index, @CType("VkDeviceSize") long value) { VkBufferMemoryBarrier2.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryBarrier2 size(@CType("VkDeviceSize") long value) { VkBufferMemoryBarrier2.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferMemoryRequirementsInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferMemoryRequirementsInfo2.java new file mode 100644 index 00000000..e2c8f916 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferMemoryRequirementsInfo2.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferMemoryRequirementsInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkBuffer buffer; +/// } VkBufferMemoryRequirementsInfo2; +/// ``` +public final class VkBufferMemoryRequirementsInfo2 extends Struct { + /// The struct layout of `VkBufferMemoryRequirementsInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("buffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + + /// Creates `VkBufferMemoryRequirementsInfo2` with the given segment. + /// @param segment the memory segment + public VkBufferMemoryRequirementsInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferMemoryRequirementsInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferMemoryRequirementsInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferMemoryRequirementsInfo2(segment); } + + /// Creates `VkBufferMemoryRequirementsInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferMemoryRequirementsInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferMemoryRequirementsInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferMemoryRequirementsInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferMemoryRequirementsInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferMemoryRequirementsInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferMemoryRequirementsInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferMemoryRequirementsInfo2` + public static VkBufferMemoryRequirementsInfo2 alloc(SegmentAllocator allocator) { return new VkBufferMemoryRequirementsInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferMemoryRequirementsInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferMemoryRequirementsInfo2` + public static VkBufferMemoryRequirementsInfo2 alloc(SegmentAllocator allocator, long count) { return new VkBufferMemoryRequirementsInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferMemoryRequirementsInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferMemoryRequirementsInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferMemoryRequirementsInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferMemoryRequirementsInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryRequirementsInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferMemoryRequirementsInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryRequirementsInfo2 sType(@CType("VkStructureType") int value) { VkBufferMemoryRequirementsInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferMemoryRequirementsInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferMemoryRequirementsInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferMemoryRequirementsInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferMemoryRequirementsInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryRequirementsInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferMemoryRequirementsInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryRequirementsInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferMemoryRequirementsInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkBufferMemoryRequirementsInfo2.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkBufferMemoryRequirementsInfo2.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkBufferMemoryRequirementsInfo2.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferMemoryRequirementsInfo2.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferMemoryRequirementsInfo2 bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferMemoryRequirementsInfo2.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkBufferMemoryRequirementsInfo2 buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferMemoryRequirementsInfo2.set_buffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferOpaqueCaptureAddressCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferOpaqueCaptureAddressCreateInfo.java new file mode 100644 index 00000000..f44f2293 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferOpaqueCaptureAddressCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### opaqueCaptureAddress +/// [VarHandle][#VH_opaqueCaptureAddress] - [Getter][#opaqueCaptureAddress()] - [Setter][#opaqueCaptureAddress(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferOpaqueCaptureAddressCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint64_t opaqueCaptureAddress; +/// } VkBufferOpaqueCaptureAddressCreateInfo; +/// ``` +public final class VkBufferOpaqueCaptureAddressCreateInfo extends Struct { + /// The struct layout of `VkBufferOpaqueCaptureAddressCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("opaqueCaptureAddress") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `opaqueCaptureAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_opaqueCaptureAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("opaqueCaptureAddress")); + + /// Creates `VkBufferOpaqueCaptureAddressCreateInfo` with the given segment. + /// @param segment the memory segment + public VkBufferOpaqueCaptureAddressCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferOpaqueCaptureAddressCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferOpaqueCaptureAddressCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferOpaqueCaptureAddressCreateInfo(segment); } + + /// Creates `VkBufferOpaqueCaptureAddressCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferOpaqueCaptureAddressCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferOpaqueCaptureAddressCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferOpaqueCaptureAddressCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferOpaqueCaptureAddressCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferOpaqueCaptureAddressCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferOpaqueCaptureAddressCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferOpaqueCaptureAddressCreateInfo` + public static VkBufferOpaqueCaptureAddressCreateInfo alloc(SegmentAllocator allocator) { return new VkBufferOpaqueCaptureAddressCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferOpaqueCaptureAddressCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferOpaqueCaptureAddressCreateInfo` + public static VkBufferOpaqueCaptureAddressCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkBufferOpaqueCaptureAddressCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferOpaqueCaptureAddressCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferOpaqueCaptureAddressCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferOpaqueCaptureAddressCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferOpaqueCaptureAddressCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferOpaqueCaptureAddressCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferOpaqueCaptureAddressCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferOpaqueCaptureAddressCreateInfo sType(@CType("VkStructureType") int value) { VkBufferOpaqueCaptureAddressCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferOpaqueCaptureAddressCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferOpaqueCaptureAddressCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferOpaqueCaptureAddressCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferOpaqueCaptureAddressCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferOpaqueCaptureAddressCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferOpaqueCaptureAddressCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferOpaqueCaptureAddressCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferOpaqueCaptureAddressCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `opaqueCaptureAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_opaqueCaptureAddress(MemorySegment segment, long index) { return (long) VH_opaqueCaptureAddress.get(segment, 0L, index); } + /// {@return `opaqueCaptureAddress`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_opaqueCaptureAddress(MemorySegment segment) { return VkBufferOpaqueCaptureAddressCreateInfo.get_opaqueCaptureAddress(segment, 0L); } + /// {@return `opaqueCaptureAddress` at the given index} + /// @param index the index + public @CType("uint64_t") long opaqueCaptureAddressAt(long index) { return VkBufferOpaqueCaptureAddressCreateInfo.get_opaqueCaptureAddress(this.segment(), index); } + /// {@return `opaqueCaptureAddress`} + public @CType("uint64_t") long opaqueCaptureAddress() { return VkBufferOpaqueCaptureAddressCreateInfo.get_opaqueCaptureAddress(this.segment()); } + /// Sets `opaqueCaptureAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_opaqueCaptureAddress(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_opaqueCaptureAddress.set(segment, 0L, index, value); } + /// Sets `opaqueCaptureAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_opaqueCaptureAddress(MemorySegment segment, @CType("uint64_t") long value) { VkBufferOpaqueCaptureAddressCreateInfo.set_opaqueCaptureAddress(segment, 0L, value); } + /// Sets `opaqueCaptureAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferOpaqueCaptureAddressCreateInfo opaqueCaptureAddressAt(long index, @CType("uint64_t") long value) { VkBufferOpaqueCaptureAddressCreateInfo.set_opaqueCaptureAddress(this.segment(), index, value); return this; } + /// Sets `opaqueCaptureAddress` with the given value. + /// @param value the value + /// @return `this` + public VkBufferOpaqueCaptureAddressCreateInfo opaqueCaptureAddress(@CType("uint64_t") long value) { VkBufferOpaqueCaptureAddressCreateInfo.set_opaqueCaptureAddress(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferUsageFlags2CreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferUsageFlags2CreateInfo.java new file mode 100644 index 00000000..188b3fa9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferUsageFlags2CreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferUsageFlags2CreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkBufferUsageFlags2 usage; +/// } VkBufferUsageFlags2CreateInfo; +/// ``` +public final class VkBufferUsageFlags2CreateInfo extends Struct { + /// The struct layout of `VkBufferUsageFlags2CreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("usage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + + /// Creates `VkBufferUsageFlags2CreateInfo` with the given segment. + /// @param segment the memory segment + public VkBufferUsageFlags2CreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferUsageFlags2CreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferUsageFlags2CreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferUsageFlags2CreateInfo(segment); } + + /// Creates `VkBufferUsageFlags2CreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferUsageFlags2CreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferUsageFlags2CreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferUsageFlags2CreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferUsageFlags2CreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferUsageFlags2CreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferUsageFlags2CreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferUsageFlags2CreateInfo` + public static VkBufferUsageFlags2CreateInfo alloc(SegmentAllocator allocator) { return new VkBufferUsageFlags2CreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferUsageFlags2CreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferUsageFlags2CreateInfo` + public static VkBufferUsageFlags2CreateInfo alloc(SegmentAllocator allocator, long count) { return new VkBufferUsageFlags2CreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferUsageFlags2CreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferUsageFlags2CreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferUsageFlags2CreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferUsageFlags2CreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferUsageFlags2CreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferUsageFlags2CreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferUsageFlags2CreateInfo sType(@CType("VkStructureType") int value) { VkBufferUsageFlags2CreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferUsageFlags2CreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferUsageFlags2CreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferUsageFlags2CreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferUsageFlags2CreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferUsageFlags2CreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferUsageFlags2CreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferUsageFlags2CreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferUsageFlags2CreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferUsageFlags2") long get_usage(MemorySegment segment, long index) { return (long) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkBufferUsageFlags2") long get_usage(MemorySegment segment) { return VkBufferUsageFlags2CreateInfo.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkBufferUsageFlags2") long usageAt(long index) { return VkBufferUsageFlags2CreateInfo.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkBufferUsageFlags2") long usage() { return VkBufferUsageFlags2CreateInfo.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkBufferUsageFlags2") long value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkBufferUsageFlags2") long value) { VkBufferUsageFlags2CreateInfo.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferUsageFlags2CreateInfo usageAt(long index, @CType("VkBufferUsageFlags2") long value) { VkBufferUsageFlags2CreateInfo.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkBufferUsageFlags2CreateInfo usage(@CType("VkBufferUsageFlags2") long value) { VkBufferUsageFlags2CreateInfo.set_usage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferViewCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferViewCreateInfo.java new file mode 100644 index 00000000..5b93efe1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkBufferViewCreateInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### range +/// [VarHandle][#VH_range] - [Getter][#range()] - [Setter][#range(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkBufferViewCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkBufferViewCreateFlags flags; +/// VkBuffer buffer; +/// VkFormat format; +/// VkDeviceSize offset; +/// VkDeviceSize range; +/// } VkBufferViewCreateInfo; +/// ``` +public final class VkBufferViewCreateInfo extends Struct { + /// The struct layout of `VkBufferViewCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("buffer"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_LONG.withName("range") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `range` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_range = LAYOUT.arrayElementVarHandle(PathElement.groupElement("range")); + + /// Creates `VkBufferViewCreateInfo` with the given segment. + /// @param segment the memory segment + public VkBufferViewCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkBufferViewCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferViewCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferViewCreateInfo(segment); } + + /// Creates `VkBufferViewCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferViewCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferViewCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkBufferViewCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkBufferViewCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkBufferViewCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkBufferViewCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkBufferViewCreateInfo` + public static VkBufferViewCreateInfo alloc(SegmentAllocator allocator) { return new VkBufferViewCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkBufferViewCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkBufferViewCreateInfo` + public static VkBufferViewCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkBufferViewCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkBufferViewCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkBufferViewCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkBufferViewCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkBufferViewCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkBufferViewCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo sType(@CType("VkStructureType") int value) { VkBufferViewCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkBufferViewCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkBufferViewCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkBufferViewCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferViewCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferViewCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkBufferViewCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferViewCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkBufferViewCreateFlags") int get_flags(MemorySegment segment) { return VkBufferViewCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkBufferViewCreateFlags") int flagsAt(long index) { return VkBufferViewCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkBufferViewCreateFlags") int flags() { return VkBufferViewCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkBufferViewCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkBufferViewCreateFlags") int value) { VkBufferViewCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo flagsAt(long index, @CType("VkBufferViewCreateFlags") int value) { VkBufferViewCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo flags(@CType("VkBufferViewCreateFlags") int value) { VkBufferViewCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkBufferViewCreateInfo.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkBufferViewCreateInfo.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkBufferViewCreateInfo.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferViewCreateInfo.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferViewCreateInfo.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkBufferViewCreateInfo.set_buffer(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkBufferViewCreateInfo.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkBufferViewCreateInfo.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkBufferViewCreateInfo.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkBufferViewCreateInfo.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo formatAt(long index, @CType("VkFormat") int value) { VkBufferViewCreateInfo.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo format(@CType("VkFormat") int value) { VkBufferViewCreateInfo.set_format(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkBufferViewCreateInfo.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkBufferViewCreateInfo.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkBufferViewCreateInfo.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferViewCreateInfo.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo offsetAt(long index, @CType("VkDeviceSize") long value) { VkBufferViewCreateInfo.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo offset(@CType("VkDeviceSize") long value) { VkBufferViewCreateInfo.set_offset(this.segment(), value); return this; } + + /// {@return `range` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_range(MemorySegment segment, long index) { return (long) VH_range.get(segment, 0L, index); } + /// {@return `range`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_range(MemorySegment segment) { return VkBufferViewCreateInfo.get_range(segment, 0L); } + /// {@return `range` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long rangeAt(long index) { return VkBufferViewCreateInfo.get_range(this.segment(), index); } + /// {@return `range`} + public @CType("VkDeviceSize") long range() { return VkBufferViewCreateInfo.get_range(this.segment()); } + /// Sets `range` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_range(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_range.set(segment, 0L, index, value); } + /// Sets `range` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_range(MemorySegment segment, @CType("VkDeviceSize") long value) { VkBufferViewCreateInfo.set_range(segment, 0L, value); } + /// Sets `range` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo rangeAt(long index, @CType("VkDeviceSize") long value) { VkBufferViewCreateInfo.set_range(this.segment(), index, value); return this; } + /// Sets `range` with the given value. + /// @param value the value + /// @return `this` + public VkBufferViewCreateInfo range(@CType("VkDeviceSize") long value) { VkBufferViewCreateInfo.set_range(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkClearAttachment.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkClearAttachment.java new file mode 100644 index 00000000..bbdb2a83 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkClearAttachment.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### aspectMask +/// [VarHandle][#VH_aspectMask] - [Getter][#aspectMask()] - [Setter][#aspectMask(int)] +/// ### colorAttachment +/// [VarHandle][#VH_colorAttachment] - [Getter][#colorAttachment()] - [Setter][#colorAttachment(int)] +/// ### clearValue +/// [Byte offset][#OFFSET_clearValue] - [Memory layout][#ML_clearValue] - [Getter][#clearValue()] - [Setter][#clearValue(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkClearAttachment { +/// VkImageAspectFlags aspectMask; +/// uint32_t colorAttachment; +/// VkClearValue clearValue; +/// } VkClearAttachment; +/// ``` +public final class VkClearAttachment extends Struct { + /// The struct layout of `VkClearAttachment`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("aspectMask"), + ValueLayout.JAVA_INT.withName("colorAttachment"), + overrungl.vulkan.union.VkClearValue.LAYOUT.withName("clearValue") + ); + /// The [VarHandle] of `aspectMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspectMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspectMask")); + /// The [VarHandle] of `colorAttachment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachment")); + /// The byte offset of `clearValue`. + public static final long OFFSET_clearValue = LAYOUT.byteOffset(PathElement.groupElement("clearValue")); + /// The memory layout of `clearValue`. + public static final MemoryLayout ML_clearValue = LAYOUT.select(PathElement.groupElement("clearValue")); + + /// Creates `VkClearAttachment` with the given segment. + /// @param segment the memory segment + public VkClearAttachment(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkClearAttachment` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearAttachment of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkClearAttachment(segment); } + + /// Creates `VkClearAttachment` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearAttachment ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkClearAttachment(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkClearAttachment` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearAttachment ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkClearAttachment(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkClearAttachment` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkClearAttachment` + public static VkClearAttachment alloc(SegmentAllocator allocator) { return new VkClearAttachment(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkClearAttachment` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkClearAttachment` + public static VkClearAttachment alloc(SegmentAllocator allocator, long count) { return new VkClearAttachment(allocator.allocate(LAYOUT, count)); } + + /// {@return `aspectMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment, long index) { return (int) VH_aspectMask.get(segment, 0L, index); } + /// {@return `aspectMask`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment) { return VkClearAttachment.get_aspectMask(segment, 0L); } + /// {@return `aspectMask` at the given index} + /// @param index the index + public @CType("VkImageAspectFlags") int aspectMaskAt(long index) { return VkClearAttachment.get_aspectMask(this.segment(), index); } + /// {@return `aspectMask`} + public @CType("VkImageAspectFlags") int aspectMask() { return VkClearAttachment.get_aspectMask(this.segment()); } + /// Sets `aspectMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspectMask(MemorySegment segment, long index, @CType("VkImageAspectFlags") int value) { VH_aspectMask.set(segment, 0L, index, value); } + /// Sets `aspectMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspectMask(MemorySegment segment, @CType("VkImageAspectFlags") int value) { VkClearAttachment.set_aspectMask(segment, 0L, value); } + /// Sets `aspectMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearAttachment aspectMaskAt(long index, @CType("VkImageAspectFlags") int value) { VkClearAttachment.set_aspectMask(this.segment(), index, value); return this; } + /// Sets `aspectMask` with the given value. + /// @param value the value + /// @return `this` + public VkClearAttachment aspectMask(@CType("VkImageAspectFlags") int value) { VkClearAttachment.set_aspectMask(this.segment(), value); return this; } + + /// {@return `colorAttachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorAttachment(MemorySegment segment, long index) { return (int) VH_colorAttachment.get(segment, 0L, index); } + /// {@return `colorAttachment`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorAttachment(MemorySegment segment) { return VkClearAttachment.get_colorAttachment(segment, 0L); } + /// {@return `colorAttachment` at the given index} + /// @param index the index + public @CType("uint32_t") int colorAttachmentAt(long index) { return VkClearAttachment.get_colorAttachment(this.segment(), index); } + /// {@return `colorAttachment`} + public @CType("uint32_t") int colorAttachment() { return VkClearAttachment.get_colorAttachment(this.segment()); } + /// Sets `colorAttachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachment(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorAttachment.set(segment, 0L, index, value); } + /// Sets `colorAttachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachment(MemorySegment segment, @CType("uint32_t") int value) { VkClearAttachment.set_colorAttachment(segment, 0L, value); } + /// Sets `colorAttachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearAttachment colorAttachmentAt(long index, @CType("uint32_t") int value) { VkClearAttachment.set_colorAttachment(this.segment(), index, value); return this; } + /// Sets `colorAttachment` with the given value. + /// @param value the value + /// @return `this` + public VkClearAttachment colorAttachment(@CType("uint32_t") int value) { VkClearAttachment.set_colorAttachment(this.segment(), value); return this; } + + /// {@return `clearValue` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkClearValue") java.lang.foreign.MemorySegment get_clearValue(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_clearValue, index), ML_clearValue); } + /// {@return `clearValue`} + /// @param segment the segment of the struct + public static @CType("VkClearValue") java.lang.foreign.MemorySegment get_clearValue(MemorySegment segment) { return VkClearAttachment.get_clearValue(segment, 0L); } + /// {@return `clearValue` at the given index} + /// @param index the index + public @CType("VkClearValue") java.lang.foreign.MemorySegment clearValueAt(long index) { return VkClearAttachment.get_clearValue(this.segment(), index); } + /// {@return `clearValue`} + public @CType("VkClearValue") java.lang.foreign.MemorySegment clearValue() { return VkClearAttachment.get_clearValue(this.segment()); } + /// Sets `clearValue` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_clearValue(MemorySegment segment, long index, @CType("VkClearValue") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_clearValue, index), ML_clearValue.byteSize()); } + /// Sets `clearValue` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_clearValue(MemorySegment segment, @CType("VkClearValue") java.lang.foreign.MemorySegment value) { VkClearAttachment.set_clearValue(segment, 0L, value); } + /// Sets `clearValue` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearAttachment clearValueAt(long index, @CType("VkClearValue") java.lang.foreign.MemorySegment value) { VkClearAttachment.set_clearValue(this.segment(), index, value); return this; } + /// Sets `clearValue` with the given value. + /// @param value the value + /// @return `this` + public VkClearAttachment clearValue(@CType("VkClearValue") java.lang.foreign.MemorySegment value) { VkClearAttachment.set_clearValue(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkClearDepthStencilValue.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkClearDepthStencilValue.java new file mode 100644 index 00000000..fa50a973 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkClearDepthStencilValue.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### depth +/// [VarHandle][#VH_depth] - [Getter][#depth()] - [Setter][#depth(float)] +/// ### stencil +/// [VarHandle][#VH_stencil] - [Getter][#stencil()] - [Setter][#stencil(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkClearDepthStencilValue { +/// float depth; +/// uint32_t stencil; +/// } VkClearDepthStencilValue; +/// ``` +public final class VkClearDepthStencilValue extends Struct { + /// The struct layout of `VkClearDepthStencilValue`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_FLOAT.withName("depth"), + ValueLayout.JAVA_INT.withName("stencil") + ); + /// The [VarHandle] of `depth` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_depth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depth")); + /// The [VarHandle] of `stencil` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencil = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencil")); + + /// Creates `VkClearDepthStencilValue` with the given segment. + /// @param segment the memory segment + public VkClearDepthStencilValue(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkClearDepthStencilValue` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearDepthStencilValue of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkClearDepthStencilValue(segment); } + + /// Creates `VkClearDepthStencilValue` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearDepthStencilValue ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkClearDepthStencilValue(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkClearDepthStencilValue` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearDepthStencilValue ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkClearDepthStencilValue(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkClearDepthStencilValue` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkClearDepthStencilValue` + public static VkClearDepthStencilValue alloc(SegmentAllocator allocator) { return new VkClearDepthStencilValue(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkClearDepthStencilValue` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkClearDepthStencilValue` + public static VkClearDepthStencilValue alloc(SegmentAllocator allocator, long count) { return new VkClearDepthStencilValue(allocator.allocate(LAYOUT, count)); } + + /// {@return `depth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_depth(MemorySegment segment, long index) { return (float) VH_depth.get(segment, 0L, index); } + /// {@return `depth`} + /// @param segment the segment of the struct + public static @CType("float") float get_depth(MemorySegment segment) { return VkClearDepthStencilValue.get_depth(segment, 0L); } + /// {@return `depth` at the given index} + /// @param index the index + public @CType("float") float depthAt(long index) { return VkClearDepthStencilValue.get_depth(this.segment(), index); } + /// {@return `depth`} + public @CType("float") float depth() { return VkClearDepthStencilValue.get_depth(this.segment()); } + /// Sets `depth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depth(MemorySegment segment, long index, @CType("float") float value) { VH_depth.set(segment, 0L, index, value); } + /// Sets `depth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depth(MemorySegment segment, @CType("float") float value) { VkClearDepthStencilValue.set_depth(segment, 0L, value); } + /// Sets `depth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearDepthStencilValue depthAt(long index, @CType("float") float value) { VkClearDepthStencilValue.set_depth(this.segment(), index, value); return this; } + /// Sets `depth` with the given value. + /// @param value the value + /// @return `this` + public VkClearDepthStencilValue depth(@CType("float") float value) { VkClearDepthStencilValue.set_depth(this.segment(), value); return this; } + + /// {@return `stencil` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stencil(MemorySegment segment, long index) { return (int) VH_stencil.get(segment, 0L, index); } + /// {@return `stencil`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stencil(MemorySegment segment) { return VkClearDepthStencilValue.get_stencil(segment, 0L); } + /// {@return `stencil` at the given index} + /// @param index the index + public @CType("uint32_t") int stencilAt(long index) { return VkClearDepthStencilValue.get_stencil(this.segment(), index); } + /// {@return `stencil`} + public @CType("uint32_t") int stencil() { return VkClearDepthStencilValue.get_stencil(this.segment()); } + /// Sets `stencil` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencil(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stencil.set(segment, 0L, index, value); } + /// Sets `stencil` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencil(MemorySegment segment, @CType("uint32_t") int value) { VkClearDepthStencilValue.set_stencil(segment, 0L, value); } + /// Sets `stencil` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearDepthStencilValue stencilAt(long index, @CType("uint32_t") int value) { VkClearDepthStencilValue.set_stencil(this.segment(), index, value); return this; } + /// Sets `stencil` with the given value. + /// @param value the value + /// @return `this` + public VkClearDepthStencilValue stencil(@CType("uint32_t") int value) { VkClearDepthStencilValue.set_stencil(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkClearRect.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkClearRect.java new file mode 100644 index 00000000..d5eb6c4b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkClearRect.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### rect +/// [Byte offset][#OFFSET_rect] - [Memory layout][#ML_rect] - [Getter][#rect()] - [Setter][#rect(java.lang.foreign.MemorySegment)] +/// ### baseArrayLayer +/// [VarHandle][#VH_baseArrayLayer] - [Getter][#baseArrayLayer()] - [Setter][#baseArrayLayer(int)] +/// ### layerCount +/// [VarHandle][#VH_layerCount] - [Getter][#layerCount()] - [Setter][#layerCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkClearRect { +/// VkRect2D rect; +/// uint32_t baseArrayLayer; +/// uint32_t layerCount; +/// } VkClearRect; +/// ``` +public final class VkClearRect extends Struct { + /// The struct layout of `VkClearRect`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkRect2D.LAYOUT.withName("rect"), + ValueLayout.JAVA_INT.withName("baseArrayLayer"), + ValueLayout.JAVA_INT.withName("layerCount") + ); + /// The byte offset of `rect`. + public static final long OFFSET_rect = LAYOUT.byteOffset(PathElement.groupElement("rect")); + /// The memory layout of `rect`. + public static final MemoryLayout ML_rect = LAYOUT.select(PathElement.groupElement("rect")); + /// The [VarHandle] of `baseArrayLayer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_baseArrayLayer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("baseArrayLayer")); + /// The [VarHandle] of `layerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layerCount")); + + /// Creates `VkClearRect` with the given segment. + /// @param segment the memory segment + public VkClearRect(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkClearRect` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearRect of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkClearRect(segment); } + + /// Creates `VkClearRect` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearRect ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkClearRect(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkClearRect` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearRect ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkClearRect(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkClearRect` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkClearRect` + public static VkClearRect alloc(SegmentAllocator allocator) { return new VkClearRect(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkClearRect` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkClearRect` + public static VkClearRect alloc(SegmentAllocator allocator, long count) { return new VkClearRect(allocator.allocate(LAYOUT, count)); } + + /// {@return `rect` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_rect(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_rect, index), ML_rect); } + /// {@return `rect`} + /// @param segment the segment of the struct + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_rect(MemorySegment segment) { return VkClearRect.get_rect(segment, 0L); } + /// {@return `rect` at the given index} + /// @param index the index + public @CType("VkRect2D") java.lang.foreign.MemorySegment rectAt(long index) { return VkClearRect.get_rect(this.segment(), index); } + /// {@return `rect`} + public @CType("VkRect2D") java.lang.foreign.MemorySegment rect() { return VkClearRect.get_rect(this.segment()); } + /// Sets `rect` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rect(MemorySegment segment, long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_rect, index), ML_rect.byteSize()); } + /// Sets `rect` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rect(MemorySegment segment, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkClearRect.set_rect(segment, 0L, value); } + /// Sets `rect` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearRect rectAt(long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkClearRect.set_rect(this.segment(), index, value); return this; } + /// Sets `rect` with the given value. + /// @param value the value + /// @return `this` + public VkClearRect rect(@CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkClearRect.set_rect(this.segment(), value); return this; } + + /// {@return `baseArrayLayer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_baseArrayLayer(MemorySegment segment, long index) { return (int) VH_baseArrayLayer.get(segment, 0L, index); } + /// {@return `baseArrayLayer`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_baseArrayLayer(MemorySegment segment) { return VkClearRect.get_baseArrayLayer(segment, 0L); } + /// {@return `baseArrayLayer` at the given index} + /// @param index the index + public @CType("uint32_t") int baseArrayLayerAt(long index) { return VkClearRect.get_baseArrayLayer(this.segment(), index); } + /// {@return `baseArrayLayer`} + public @CType("uint32_t") int baseArrayLayer() { return VkClearRect.get_baseArrayLayer(this.segment()); } + /// Sets `baseArrayLayer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_baseArrayLayer(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_baseArrayLayer.set(segment, 0L, index, value); } + /// Sets `baseArrayLayer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_baseArrayLayer(MemorySegment segment, @CType("uint32_t") int value) { VkClearRect.set_baseArrayLayer(segment, 0L, value); } + /// Sets `baseArrayLayer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearRect baseArrayLayerAt(long index, @CType("uint32_t") int value) { VkClearRect.set_baseArrayLayer(this.segment(), index, value); return this; } + /// Sets `baseArrayLayer` with the given value. + /// @param value the value + /// @return `this` + public VkClearRect baseArrayLayer(@CType("uint32_t") int value) { VkClearRect.set_baseArrayLayer(this.segment(), value); return this; } + + /// {@return `layerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_layerCount(MemorySegment segment, long index) { return (int) VH_layerCount.get(segment, 0L, index); } + /// {@return `layerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_layerCount(MemorySegment segment) { return VkClearRect.get_layerCount(segment, 0L); } + /// {@return `layerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int layerCountAt(long index) { return VkClearRect.get_layerCount(this.segment(), index); } + /// {@return `layerCount`} + public @CType("uint32_t") int layerCount() { return VkClearRect.get_layerCount(this.segment()); } + /// Sets `layerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_layerCount.set(segment, 0L, index, value); } + /// Sets `layerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layerCount(MemorySegment segment, @CType("uint32_t") int value) { VkClearRect.set_layerCount(segment, 0L, value); } + /// Sets `layerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearRect layerCountAt(long index, @CType("uint32_t") int value) { VkClearRect.set_layerCount(this.segment(), index, value); return this; } + /// Sets `layerCount` with the given value. + /// @param value the value + /// @return `this` + public VkClearRect layerCount(@CType("uint32_t") int value) { VkClearRect.set_layerCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferAllocateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferAllocateInfo.java new file mode 100644 index 00000000..4f5ff952 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferAllocateInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### commandPool +/// [VarHandle][#VH_commandPool] - [Getter][#commandPool()] - [Setter][#commandPool(java.lang.foreign.MemorySegment)] +/// ### level +/// [VarHandle][#VH_level] - [Getter][#level()] - [Setter][#level(int)] +/// ### commandBufferCount +/// [VarHandle][#VH_commandBufferCount] - [Getter][#commandBufferCount()] - [Setter][#commandBufferCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandBufferAllocateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkCommandPool commandPool; +/// VkCommandBufferLevel level; +/// uint32_t commandBufferCount; +/// } VkCommandBufferAllocateInfo; +/// ``` +public final class VkCommandBufferAllocateInfo extends Struct { + /// The struct layout of `VkCommandBufferAllocateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("commandPool"), + ValueLayout.JAVA_INT.withName("level"), + ValueLayout.JAVA_INT.withName("commandBufferCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `commandPool` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_commandPool = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandPool")); + /// The [VarHandle] of `level` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_level = LAYOUT.arrayElementVarHandle(PathElement.groupElement("level")); + /// The [VarHandle] of `commandBufferCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandBufferCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandBufferCount")); + + /// Creates `VkCommandBufferAllocateInfo` with the given segment. + /// @param segment the memory segment + public VkCommandBufferAllocateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandBufferAllocateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferAllocateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferAllocateInfo(segment); } + + /// Creates `VkCommandBufferAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferAllocateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandBufferAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferAllocateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandBufferAllocateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandBufferAllocateInfo` + public static VkCommandBufferAllocateInfo alloc(SegmentAllocator allocator) { return new VkCommandBufferAllocateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandBufferAllocateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandBufferAllocateInfo` + public static VkCommandBufferAllocateInfo alloc(SegmentAllocator allocator, long count) { return new VkCommandBufferAllocateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandBufferAllocateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandBufferAllocateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandBufferAllocateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandBufferAllocateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferAllocateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandBufferAllocateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferAllocateInfo sType(@CType("VkStructureType") int value) { VkCommandBufferAllocateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandBufferAllocateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandBufferAllocateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCommandBufferAllocateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferAllocateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferAllocateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferAllocateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferAllocateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferAllocateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `commandPool` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCommandPool") java.lang.foreign.MemorySegment get_commandPool(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_commandPool.get(segment, 0L, index); } + /// {@return `commandPool`} + /// @param segment the segment of the struct + public static @CType("VkCommandPool") java.lang.foreign.MemorySegment get_commandPool(MemorySegment segment) { return VkCommandBufferAllocateInfo.get_commandPool(segment, 0L); } + /// {@return `commandPool` at the given index} + /// @param index the index + public @CType("VkCommandPool") java.lang.foreign.MemorySegment commandPoolAt(long index) { return VkCommandBufferAllocateInfo.get_commandPool(this.segment(), index); } + /// {@return `commandPool`} + public @CType("VkCommandPool") java.lang.foreign.MemorySegment commandPool() { return VkCommandBufferAllocateInfo.get_commandPool(this.segment()); } + /// Sets `commandPool` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandPool(MemorySegment segment, long index, @CType("VkCommandPool") java.lang.foreign.MemorySegment value) { VH_commandPool.set(segment, 0L, index, value); } + /// Sets `commandPool` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandPool(MemorySegment segment, @CType("VkCommandPool") java.lang.foreign.MemorySegment value) { VkCommandBufferAllocateInfo.set_commandPool(segment, 0L, value); } + /// Sets `commandPool` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferAllocateInfo commandPoolAt(long index, @CType("VkCommandPool") java.lang.foreign.MemorySegment value) { VkCommandBufferAllocateInfo.set_commandPool(this.segment(), index, value); return this; } + /// Sets `commandPool` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferAllocateInfo commandPool(@CType("VkCommandPool") java.lang.foreign.MemorySegment value) { VkCommandBufferAllocateInfo.set_commandPool(this.segment(), value); return this; } + + /// {@return `level` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCommandBufferLevel") int get_level(MemorySegment segment, long index) { return (int) VH_level.get(segment, 0L, index); } + /// {@return `level`} + /// @param segment the segment of the struct + public static @CType("VkCommandBufferLevel") int get_level(MemorySegment segment) { return VkCommandBufferAllocateInfo.get_level(segment, 0L); } + /// {@return `level` at the given index} + /// @param index the index + public @CType("VkCommandBufferLevel") int levelAt(long index) { return VkCommandBufferAllocateInfo.get_level(this.segment(), index); } + /// {@return `level`} + public @CType("VkCommandBufferLevel") int level() { return VkCommandBufferAllocateInfo.get_level(this.segment()); } + /// Sets `level` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_level(MemorySegment segment, long index, @CType("VkCommandBufferLevel") int value) { VH_level.set(segment, 0L, index, value); } + /// Sets `level` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_level(MemorySegment segment, @CType("VkCommandBufferLevel") int value) { VkCommandBufferAllocateInfo.set_level(segment, 0L, value); } + /// Sets `level` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferAllocateInfo levelAt(long index, @CType("VkCommandBufferLevel") int value) { VkCommandBufferAllocateInfo.set_level(this.segment(), index, value); return this; } + /// Sets `level` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferAllocateInfo level(@CType("VkCommandBufferLevel") int value) { VkCommandBufferAllocateInfo.set_level(this.segment(), value); return this; } + + /// {@return `commandBufferCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_commandBufferCount(MemorySegment segment, long index) { return (int) VH_commandBufferCount.get(segment, 0L, index); } + /// {@return `commandBufferCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_commandBufferCount(MemorySegment segment) { return VkCommandBufferAllocateInfo.get_commandBufferCount(segment, 0L); } + /// {@return `commandBufferCount` at the given index} + /// @param index the index + public @CType("uint32_t") int commandBufferCountAt(long index) { return VkCommandBufferAllocateInfo.get_commandBufferCount(this.segment(), index); } + /// {@return `commandBufferCount`} + public @CType("uint32_t") int commandBufferCount() { return VkCommandBufferAllocateInfo.get_commandBufferCount(this.segment()); } + /// Sets `commandBufferCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandBufferCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_commandBufferCount.set(segment, 0L, index, value); } + /// Sets `commandBufferCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandBufferCount(MemorySegment segment, @CType("uint32_t") int value) { VkCommandBufferAllocateInfo.set_commandBufferCount(segment, 0L, value); } + /// Sets `commandBufferCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferAllocateInfo commandBufferCountAt(long index, @CType("uint32_t") int value) { VkCommandBufferAllocateInfo.set_commandBufferCount(this.segment(), index, value); return this; } + /// Sets `commandBufferCount` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferAllocateInfo commandBufferCount(@CType("uint32_t") int value) { VkCommandBufferAllocateInfo.set_commandBufferCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferBeginInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferBeginInfo.java new file mode 100644 index 00000000..f32525bb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferBeginInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pInheritanceInfo +/// [VarHandle][#VH_pInheritanceInfo] - [Getter][#pInheritanceInfo()] - [Setter][#pInheritanceInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandBufferBeginInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkCommandBufferUsageFlags flags; +/// const VkCommandBufferInheritanceInfo * pInheritanceInfo; +/// } VkCommandBufferBeginInfo; +/// ``` +public final class VkCommandBufferBeginInfo extends Struct { + /// The struct layout of `VkCommandBufferBeginInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("pInheritanceInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pInheritanceInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pInheritanceInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pInheritanceInfo")); + + /// Creates `VkCommandBufferBeginInfo` with the given segment. + /// @param segment the memory segment + public VkCommandBufferBeginInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandBufferBeginInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferBeginInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferBeginInfo(segment); } + + /// Creates `VkCommandBufferBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferBeginInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandBufferBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferBeginInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandBufferBeginInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandBufferBeginInfo` + public static VkCommandBufferBeginInfo alloc(SegmentAllocator allocator) { return new VkCommandBufferBeginInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandBufferBeginInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandBufferBeginInfo` + public static VkCommandBufferBeginInfo alloc(SegmentAllocator allocator, long count) { return new VkCommandBufferBeginInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandBufferBeginInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandBufferBeginInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandBufferBeginInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandBufferBeginInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferBeginInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandBufferBeginInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferBeginInfo sType(@CType("VkStructureType") int value) { VkCommandBufferBeginInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandBufferBeginInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandBufferBeginInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCommandBufferBeginInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferBeginInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferBeginInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferBeginInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferBeginInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferBeginInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCommandBufferUsageFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkCommandBufferUsageFlags") int get_flags(MemorySegment segment) { return VkCommandBufferBeginInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkCommandBufferUsageFlags") int flagsAt(long index) { return VkCommandBufferBeginInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkCommandBufferUsageFlags") int flags() { return VkCommandBufferBeginInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkCommandBufferUsageFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkCommandBufferUsageFlags") int value) { VkCommandBufferBeginInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferBeginInfo flagsAt(long index, @CType("VkCommandBufferUsageFlags") int value) { VkCommandBufferBeginInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferBeginInfo flags(@CType("VkCommandBufferUsageFlags") int value) { VkCommandBufferBeginInfo.set_flags(this.segment(), value); return this; } + + /// {@return `pInheritanceInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkCommandBufferInheritanceInfo *") java.lang.foreign.MemorySegment get_pInheritanceInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pInheritanceInfo.get(segment, 0L, index); } + /// {@return `pInheritanceInfo`} + /// @param segment the segment of the struct + public static @CType("const VkCommandBufferInheritanceInfo *") java.lang.foreign.MemorySegment get_pInheritanceInfo(MemorySegment segment) { return VkCommandBufferBeginInfo.get_pInheritanceInfo(segment, 0L); } + /// {@return `pInheritanceInfo` at the given index} + /// @param index the index + public @CType("const VkCommandBufferInheritanceInfo *") java.lang.foreign.MemorySegment pInheritanceInfoAt(long index) { return VkCommandBufferBeginInfo.get_pInheritanceInfo(this.segment(), index); } + /// {@return `pInheritanceInfo`} + public @CType("const VkCommandBufferInheritanceInfo *") java.lang.foreign.MemorySegment pInheritanceInfo() { return VkCommandBufferBeginInfo.get_pInheritanceInfo(this.segment()); } + /// Sets `pInheritanceInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pInheritanceInfo(MemorySegment segment, long index, @CType("const VkCommandBufferInheritanceInfo *") java.lang.foreign.MemorySegment value) { VH_pInheritanceInfo.set(segment, 0L, index, value); } + /// Sets `pInheritanceInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pInheritanceInfo(MemorySegment segment, @CType("const VkCommandBufferInheritanceInfo *") java.lang.foreign.MemorySegment value) { VkCommandBufferBeginInfo.set_pInheritanceInfo(segment, 0L, value); } + /// Sets `pInheritanceInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferBeginInfo pInheritanceInfoAt(long index, @CType("const VkCommandBufferInheritanceInfo *") java.lang.foreign.MemorySegment value) { VkCommandBufferBeginInfo.set_pInheritanceInfo(this.segment(), index, value); return this; } + /// Sets `pInheritanceInfo` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferBeginInfo pInheritanceInfo(@CType("const VkCommandBufferInheritanceInfo *") java.lang.foreign.MemorySegment value) { VkCommandBufferBeginInfo.set_pInheritanceInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferInheritanceInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferInheritanceInfo.java new file mode 100644 index 00000000..3246ac8f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferInheritanceInfo.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### renderPass +/// [VarHandle][#VH_renderPass] - [Getter][#renderPass()] - [Setter][#renderPass(java.lang.foreign.MemorySegment)] +/// ### subpass +/// [VarHandle][#VH_subpass] - [Getter][#subpass()] - [Setter][#subpass(int)] +/// ### framebuffer +/// [VarHandle][#VH_framebuffer] - [Getter][#framebuffer()] - [Setter][#framebuffer(java.lang.foreign.MemorySegment)] +/// ### occlusionQueryEnable +/// [VarHandle][#VH_occlusionQueryEnable] - [Getter][#occlusionQueryEnable()] - [Setter][#occlusionQueryEnable(int)] +/// ### queryFlags +/// [VarHandle][#VH_queryFlags] - [Getter][#queryFlags()] - [Setter][#queryFlags(int)] +/// ### pipelineStatistics +/// [VarHandle][#VH_pipelineStatistics] - [Getter][#pipelineStatistics()] - [Setter][#pipelineStatistics(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandBufferInheritanceInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkRenderPass renderPass; +/// uint32_t subpass; +/// VkFramebuffer framebuffer; +/// VkBool32 occlusionQueryEnable; +/// VkQueryControlFlags queryFlags; +/// VkQueryPipelineStatisticFlags pipelineStatistics; +/// } VkCommandBufferInheritanceInfo; +/// ``` +public final class VkCommandBufferInheritanceInfo extends Struct { + /// The struct layout of `VkCommandBufferInheritanceInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("renderPass"), + ValueLayout.JAVA_INT.withName("subpass"), + ValueLayout.ADDRESS.withName("framebuffer"), + ValueLayout.JAVA_INT.withName("occlusionQueryEnable"), + ValueLayout.JAVA_INT.withName("queryFlags"), + ValueLayout.JAVA_INT.withName("pipelineStatistics") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `renderPass` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_renderPass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderPass")); + /// The [VarHandle] of `subpass` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpass")); + /// The [VarHandle] of `framebuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_framebuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("framebuffer")); + /// The [VarHandle] of `occlusionQueryEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_occlusionQueryEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("occlusionQueryEnable")); + /// The [VarHandle] of `queryFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queryFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queryFlags")); + /// The [VarHandle] of `pipelineStatistics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineStatistics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineStatistics")); + + /// Creates `VkCommandBufferInheritanceInfo` with the given segment. + /// @param segment the memory segment + public VkCommandBufferInheritanceInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandBufferInheritanceInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceInfo(segment); } + + /// Creates `VkCommandBufferInheritanceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandBufferInheritanceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandBufferInheritanceInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandBufferInheritanceInfo` + public static VkCommandBufferInheritanceInfo alloc(SegmentAllocator allocator) { return new VkCommandBufferInheritanceInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandBufferInheritanceInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandBufferInheritanceInfo` + public static VkCommandBufferInheritanceInfo alloc(SegmentAllocator allocator, long count) { return new VkCommandBufferInheritanceInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandBufferInheritanceInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandBufferInheritanceInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandBufferInheritanceInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandBufferInheritanceInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandBufferInheritanceInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo sType(@CType("VkStructureType") int value) { VkCommandBufferInheritanceInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandBufferInheritanceInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandBufferInheritanceInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCommandBufferInheritanceInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `renderPass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderPass") java.lang.foreign.MemorySegment get_renderPass(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_renderPass.get(segment, 0L, index); } + /// {@return `renderPass`} + /// @param segment the segment of the struct + public static @CType("VkRenderPass") java.lang.foreign.MemorySegment get_renderPass(MemorySegment segment) { return VkCommandBufferInheritanceInfo.get_renderPass(segment, 0L); } + /// {@return `renderPass` at the given index} + /// @param index the index + public @CType("VkRenderPass") java.lang.foreign.MemorySegment renderPassAt(long index) { return VkCommandBufferInheritanceInfo.get_renderPass(this.segment(), index); } + /// {@return `renderPass`} + public @CType("VkRenderPass") java.lang.foreign.MemorySegment renderPass() { return VkCommandBufferInheritanceInfo.get_renderPass(this.segment()); } + /// Sets `renderPass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderPass(MemorySegment segment, long index, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VH_renderPass.set(segment, 0L, index, value); } + /// Sets `renderPass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderPass(MemorySegment segment, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceInfo.set_renderPass(segment, 0L, value); } + /// Sets `renderPass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo renderPassAt(long index, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceInfo.set_renderPass(this.segment(), index, value); return this; } + /// Sets `renderPass` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo renderPass(@CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceInfo.set_renderPass(this.segment(), value); return this; } + + /// {@return `subpass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subpass(MemorySegment segment, long index) { return (int) VH_subpass.get(segment, 0L, index); } + /// {@return `subpass`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subpass(MemorySegment segment) { return VkCommandBufferInheritanceInfo.get_subpass(segment, 0L); } + /// {@return `subpass` at the given index} + /// @param index the index + public @CType("uint32_t") int subpassAt(long index) { return VkCommandBufferInheritanceInfo.get_subpass(this.segment(), index); } + /// {@return `subpass`} + public @CType("uint32_t") int subpass() { return VkCommandBufferInheritanceInfo.get_subpass(this.segment()); } + /// Sets `subpass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpass(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subpass.set(segment, 0L, index, value); } + /// Sets `subpass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpass(MemorySegment segment, @CType("uint32_t") int value) { VkCommandBufferInheritanceInfo.set_subpass(segment, 0L, value); } + /// Sets `subpass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo subpassAt(long index, @CType("uint32_t") int value) { VkCommandBufferInheritanceInfo.set_subpass(this.segment(), index, value); return this; } + /// Sets `subpass` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo subpass(@CType("uint32_t") int value) { VkCommandBufferInheritanceInfo.set_subpass(this.segment(), value); return this; } + + /// {@return `framebuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFramebuffer") java.lang.foreign.MemorySegment get_framebuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_framebuffer.get(segment, 0L, index); } + /// {@return `framebuffer`} + /// @param segment the segment of the struct + public static @CType("VkFramebuffer") java.lang.foreign.MemorySegment get_framebuffer(MemorySegment segment) { return VkCommandBufferInheritanceInfo.get_framebuffer(segment, 0L); } + /// {@return `framebuffer` at the given index} + /// @param index the index + public @CType("VkFramebuffer") java.lang.foreign.MemorySegment framebufferAt(long index) { return VkCommandBufferInheritanceInfo.get_framebuffer(this.segment(), index); } + /// {@return `framebuffer`} + public @CType("VkFramebuffer") java.lang.foreign.MemorySegment framebuffer() { return VkCommandBufferInheritanceInfo.get_framebuffer(this.segment()); } + /// Sets `framebuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_framebuffer(MemorySegment segment, long index, @CType("VkFramebuffer") java.lang.foreign.MemorySegment value) { VH_framebuffer.set(segment, 0L, index, value); } + /// Sets `framebuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_framebuffer(MemorySegment segment, @CType("VkFramebuffer") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceInfo.set_framebuffer(segment, 0L, value); } + /// Sets `framebuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo framebufferAt(long index, @CType("VkFramebuffer") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceInfo.set_framebuffer(this.segment(), index, value); return this; } + /// Sets `framebuffer` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo framebuffer(@CType("VkFramebuffer") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceInfo.set_framebuffer(this.segment(), value); return this; } + + /// {@return `occlusionQueryEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_occlusionQueryEnable(MemorySegment segment, long index) { return (int) VH_occlusionQueryEnable.get(segment, 0L, index); } + /// {@return `occlusionQueryEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_occlusionQueryEnable(MemorySegment segment) { return VkCommandBufferInheritanceInfo.get_occlusionQueryEnable(segment, 0L); } + /// {@return `occlusionQueryEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int occlusionQueryEnableAt(long index) { return VkCommandBufferInheritanceInfo.get_occlusionQueryEnable(this.segment(), index); } + /// {@return `occlusionQueryEnable`} + public @CType("VkBool32") int occlusionQueryEnable() { return VkCommandBufferInheritanceInfo.get_occlusionQueryEnable(this.segment()); } + /// Sets `occlusionQueryEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_occlusionQueryEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_occlusionQueryEnable.set(segment, 0L, index, value); } + /// Sets `occlusionQueryEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_occlusionQueryEnable(MemorySegment segment, @CType("VkBool32") int value) { VkCommandBufferInheritanceInfo.set_occlusionQueryEnable(segment, 0L, value); } + /// Sets `occlusionQueryEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo occlusionQueryEnableAt(long index, @CType("VkBool32") int value) { VkCommandBufferInheritanceInfo.set_occlusionQueryEnable(this.segment(), index, value); return this; } + /// Sets `occlusionQueryEnable` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo occlusionQueryEnable(@CType("VkBool32") int value) { VkCommandBufferInheritanceInfo.set_occlusionQueryEnable(this.segment(), value); return this; } + + /// {@return `queryFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueryControlFlags") int get_queryFlags(MemorySegment segment, long index) { return (int) VH_queryFlags.get(segment, 0L, index); } + /// {@return `queryFlags`} + /// @param segment the segment of the struct + public static @CType("VkQueryControlFlags") int get_queryFlags(MemorySegment segment) { return VkCommandBufferInheritanceInfo.get_queryFlags(segment, 0L); } + /// {@return `queryFlags` at the given index} + /// @param index the index + public @CType("VkQueryControlFlags") int queryFlagsAt(long index) { return VkCommandBufferInheritanceInfo.get_queryFlags(this.segment(), index); } + /// {@return `queryFlags`} + public @CType("VkQueryControlFlags") int queryFlags() { return VkCommandBufferInheritanceInfo.get_queryFlags(this.segment()); } + /// Sets `queryFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queryFlags(MemorySegment segment, long index, @CType("VkQueryControlFlags") int value) { VH_queryFlags.set(segment, 0L, index, value); } + /// Sets `queryFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queryFlags(MemorySegment segment, @CType("VkQueryControlFlags") int value) { VkCommandBufferInheritanceInfo.set_queryFlags(segment, 0L, value); } + /// Sets `queryFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo queryFlagsAt(long index, @CType("VkQueryControlFlags") int value) { VkCommandBufferInheritanceInfo.set_queryFlags(this.segment(), index, value); return this; } + /// Sets `queryFlags` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo queryFlags(@CType("VkQueryControlFlags") int value) { VkCommandBufferInheritanceInfo.set_queryFlags(this.segment(), value); return this; } + + /// {@return `pipelineStatistics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueryPipelineStatisticFlags") int get_pipelineStatistics(MemorySegment segment, long index) { return (int) VH_pipelineStatistics.get(segment, 0L, index); } + /// {@return `pipelineStatistics`} + /// @param segment the segment of the struct + public static @CType("VkQueryPipelineStatisticFlags") int get_pipelineStatistics(MemorySegment segment) { return VkCommandBufferInheritanceInfo.get_pipelineStatistics(segment, 0L); } + /// {@return `pipelineStatistics` at the given index} + /// @param index the index + public @CType("VkQueryPipelineStatisticFlags") int pipelineStatisticsAt(long index) { return VkCommandBufferInheritanceInfo.get_pipelineStatistics(this.segment(), index); } + /// {@return `pipelineStatistics`} + public @CType("VkQueryPipelineStatisticFlags") int pipelineStatistics() { return VkCommandBufferInheritanceInfo.get_pipelineStatistics(this.segment()); } + /// Sets `pipelineStatistics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineStatistics(MemorySegment segment, long index, @CType("VkQueryPipelineStatisticFlags") int value) { VH_pipelineStatistics.set(segment, 0L, index, value); } + /// Sets `pipelineStatistics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineStatistics(MemorySegment segment, @CType("VkQueryPipelineStatisticFlags") int value) { VkCommandBufferInheritanceInfo.set_pipelineStatistics(segment, 0L, value); } + /// Sets `pipelineStatistics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo pipelineStatisticsAt(long index, @CType("VkQueryPipelineStatisticFlags") int value) { VkCommandBufferInheritanceInfo.set_pipelineStatistics(this.segment(), index, value); return this; } + /// Sets `pipelineStatistics` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceInfo pipelineStatistics(@CType("VkQueryPipelineStatisticFlags") int value) { VkCommandBufferInheritanceInfo.set_pipelineStatistics(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferInheritanceRenderingInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferInheritanceRenderingInfo.java new file mode 100644 index 00000000..71d41ae2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferInheritanceRenderingInfo.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### viewMask +/// [VarHandle][#VH_viewMask] - [Getter][#viewMask()] - [Setter][#viewMask(int)] +/// ### colorAttachmentCount +/// [VarHandle][#VH_colorAttachmentCount] - [Getter][#colorAttachmentCount()] - [Setter][#colorAttachmentCount(int)] +/// ### pColorAttachmentFormats +/// [VarHandle][#VH_pColorAttachmentFormats] - [Getter][#pColorAttachmentFormats()] - [Setter][#pColorAttachmentFormats(java.lang.foreign.MemorySegment)] +/// ### depthAttachmentFormat +/// [VarHandle][#VH_depthAttachmentFormat] - [Getter][#depthAttachmentFormat()] - [Setter][#depthAttachmentFormat(int)] +/// ### stencilAttachmentFormat +/// [VarHandle][#VH_stencilAttachmentFormat] - [Getter][#stencilAttachmentFormat()] - [Setter][#stencilAttachmentFormat(int)] +/// ### rasterizationSamples +/// [VarHandle][#VH_rasterizationSamples] - [Getter][#rasterizationSamples()] - [Setter][#rasterizationSamples(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandBufferInheritanceRenderingInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkRenderingFlags flags; +/// uint32_t viewMask; +/// uint32_t colorAttachmentCount; +/// const VkFormat * pColorAttachmentFormats; +/// VkFormat depthAttachmentFormat; +/// VkFormat stencilAttachmentFormat; +/// VkSampleCountFlagBits rasterizationSamples; +/// } VkCommandBufferInheritanceRenderingInfo; +/// ``` +public final class VkCommandBufferInheritanceRenderingInfo extends Struct { + /// The struct layout of `VkCommandBufferInheritanceRenderingInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("viewMask"), + ValueLayout.JAVA_INT.withName("colorAttachmentCount"), + ValueLayout.ADDRESS.withName("pColorAttachmentFormats"), + ValueLayout.JAVA_INT.withName("depthAttachmentFormat"), + ValueLayout.JAVA_INT.withName("stencilAttachmentFormat"), + ValueLayout.JAVA_INT.withName("rasterizationSamples") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `viewMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewMask")); + /// The [VarHandle] of `colorAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachmentCount")); + /// The [VarHandle] of `pColorAttachmentFormats` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorAttachmentFormats = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorAttachmentFormats")); + /// The [VarHandle] of `depthAttachmentFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthAttachmentFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthAttachmentFormat")); + /// The [VarHandle] of `stencilAttachmentFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilAttachmentFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilAttachmentFormat")); + /// The [VarHandle] of `rasterizationSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rasterizationSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rasterizationSamples")); + + /// Creates `VkCommandBufferInheritanceRenderingInfo` with the given segment. + /// @param segment the memory segment + public VkCommandBufferInheritanceRenderingInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandBufferInheritanceRenderingInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceRenderingInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceRenderingInfo(segment); } + + /// Creates `VkCommandBufferInheritanceRenderingInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceRenderingInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceRenderingInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandBufferInheritanceRenderingInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferInheritanceRenderingInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferInheritanceRenderingInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandBufferInheritanceRenderingInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandBufferInheritanceRenderingInfo` + public static VkCommandBufferInheritanceRenderingInfo alloc(SegmentAllocator allocator) { return new VkCommandBufferInheritanceRenderingInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandBufferInheritanceRenderingInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandBufferInheritanceRenderingInfo` + public static VkCommandBufferInheritanceRenderingInfo alloc(SegmentAllocator allocator, long count) { return new VkCommandBufferInheritanceRenderingInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandBufferInheritanceRenderingInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandBufferInheritanceRenderingInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandBufferInheritanceRenderingInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandBufferInheritanceRenderingInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandBufferInheritanceRenderingInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo sType(@CType("VkStructureType") int value) { VkCommandBufferInheritanceRenderingInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandBufferInheritanceRenderingInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandBufferInheritanceRenderingInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCommandBufferInheritanceRenderingInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderingInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderingInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderingInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderingFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkRenderingFlags") int get_flags(MemorySegment segment) { return VkCommandBufferInheritanceRenderingInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkRenderingFlags") int flagsAt(long index) { return VkCommandBufferInheritanceRenderingInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkRenderingFlags") int flags() { return VkCommandBufferInheritanceRenderingInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkRenderingFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkRenderingFlags") int value) { VkCommandBufferInheritanceRenderingInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo flagsAt(long index, @CType("VkRenderingFlags") int value) { VkCommandBufferInheritanceRenderingInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo flags(@CType("VkRenderingFlags") int value) { VkCommandBufferInheritanceRenderingInfo.set_flags(this.segment(), value); return this; } + + /// {@return `viewMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewMask(MemorySegment segment, long index) { return (int) VH_viewMask.get(segment, 0L, index); } + /// {@return `viewMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewMask(MemorySegment segment) { return VkCommandBufferInheritanceRenderingInfo.get_viewMask(segment, 0L); } + /// {@return `viewMask` at the given index} + /// @param index the index + public @CType("uint32_t") int viewMaskAt(long index) { return VkCommandBufferInheritanceRenderingInfo.get_viewMask(this.segment(), index); } + /// {@return `viewMask`} + public @CType("uint32_t") int viewMask() { return VkCommandBufferInheritanceRenderingInfo.get_viewMask(this.segment()); } + /// Sets `viewMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewMask.set(segment, 0L, index, value); } + /// Sets `viewMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewMask(MemorySegment segment, @CType("uint32_t") int value) { VkCommandBufferInheritanceRenderingInfo.set_viewMask(segment, 0L, value); } + /// Sets `viewMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo viewMaskAt(long index, @CType("uint32_t") int value) { VkCommandBufferInheritanceRenderingInfo.set_viewMask(this.segment(), index, value); return this; } + /// Sets `viewMask` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo viewMask(@CType("uint32_t") int value) { VkCommandBufferInheritanceRenderingInfo.set_viewMask(this.segment(), value); return this; } + + /// {@return `colorAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment, long index) { return (int) VH_colorAttachmentCount.get(segment, 0L, index); } + /// {@return `colorAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment) { return VkCommandBufferInheritanceRenderingInfo.get_colorAttachmentCount(segment, 0L); } + /// {@return `colorAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int colorAttachmentCountAt(long index) { return VkCommandBufferInheritanceRenderingInfo.get_colorAttachmentCount(this.segment(), index); } + /// {@return `colorAttachmentCount`} + public @CType("uint32_t") int colorAttachmentCount() { return VkCommandBufferInheritanceRenderingInfo.get_colorAttachmentCount(this.segment()); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorAttachmentCount.set(segment, 0L, index, value); } + /// Sets `colorAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkCommandBufferInheritanceRenderingInfo.set_colorAttachmentCount(segment, 0L, value); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo colorAttachmentCountAt(long index, @CType("uint32_t") int value) { VkCommandBufferInheritanceRenderingInfo.set_colorAttachmentCount(this.segment(), index, value); return this; } + /// Sets `colorAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo colorAttachmentCount(@CType("uint32_t") int value) { VkCommandBufferInheritanceRenderingInfo.set_colorAttachmentCount(this.segment(), value); return this; } + + /// {@return `pColorAttachmentFormats` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkFormat *") java.lang.foreign.MemorySegment get_pColorAttachmentFormats(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorAttachmentFormats.get(segment, 0L, index); } + /// {@return `pColorAttachmentFormats`} + /// @param segment the segment of the struct + public static @CType("const VkFormat *") java.lang.foreign.MemorySegment get_pColorAttachmentFormats(MemorySegment segment) { return VkCommandBufferInheritanceRenderingInfo.get_pColorAttachmentFormats(segment, 0L); } + /// {@return `pColorAttachmentFormats` at the given index} + /// @param index the index + public @CType("const VkFormat *") java.lang.foreign.MemorySegment pColorAttachmentFormatsAt(long index) { return VkCommandBufferInheritanceRenderingInfo.get_pColorAttachmentFormats(this.segment(), index); } + /// {@return `pColorAttachmentFormats`} + public @CType("const VkFormat *") java.lang.foreign.MemorySegment pColorAttachmentFormats() { return VkCommandBufferInheritanceRenderingInfo.get_pColorAttachmentFormats(this.segment()); } + /// Sets `pColorAttachmentFormats` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorAttachmentFormats(MemorySegment segment, long index, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VH_pColorAttachmentFormats.set(segment, 0L, index, value); } + /// Sets `pColorAttachmentFormats` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorAttachmentFormats(MemorySegment segment, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderingInfo.set_pColorAttachmentFormats(segment, 0L, value); } + /// Sets `pColorAttachmentFormats` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo pColorAttachmentFormatsAt(long index, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderingInfo.set_pColorAttachmentFormats(this.segment(), index, value); return this; } + /// Sets `pColorAttachmentFormats` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo pColorAttachmentFormats(@CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkCommandBufferInheritanceRenderingInfo.set_pColorAttachmentFormats(this.segment(), value); return this; } + + /// {@return `depthAttachmentFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_depthAttachmentFormat(MemorySegment segment, long index) { return (int) VH_depthAttachmentFormat.get(segment, 0L, index); } + /// {@return `depthAttachmentFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_depthAttachmentFormat(MemorySegment segment) { return VkCommandBufferInheritanceRenderingInfo.get_depthAttachmentFormat(segment, 0L); } + /// {@return `depthAttachmentFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int depthAttachmentFormatAt(long index) { return VkCommandBufferInheritanceRenderingInfo.get_depthAttachmentFormat(this.segment(), index); } + /// {@return `depthAttachmentFormat`} + public @CType("VkFormat") int depthAttachmentFormat() { return VkCommandBufferInheritanceRenderingInfo.get_depthAttachmentFormat(this.segment()); } + /// Sets `depthAttachmentFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthAttachmentFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_depthAttachmentFormat.set(segment, 0L, index, value); } + /// Sets `depthAttachmentFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthAttachmentFormat(MemorySegment segment, @CType("VkFormat") int value) { VkCommandBufferInheritanceRenderingInfo.set_depthAttachmentFormat(segment, 0L, value); } + /// Sets `depthAttachmentFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo depthAttachmentFormatAt(long index, @CType("VkFormat") int value) { VkCommandBufferInheritanceRenderingInfo.set_depthAttachmentFormat(this.segment(), index, value); return this; } + /// Sets `depthAttachmentFormat` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo depthAttachmentFormat(@CType("VkFormat") int value) { VkCommandBufferInheritanceRenderingInfo.set_depthAttachmentFormat(this.segment(), value); return this; } + + /// {@return `stencilAttachmentFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_stencilAttachmentFormat(MemorySegment segment, long index) { return (int) VH_stencilAttachmentFormat.get(segment, 0L, index); } + /// {@return `stencilAttachmentFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_stencilAttachmentFormat(MemorySegment segment) { return VkCommandBufferInheritanceRenderingInfo.get_stencilAttachmentFormat(segment, 0L); } + /// {@return `stencilAttachmentFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int stencilAttachmentFormatAt(long index) { return VkCommandBufferInheritanceRenderingInfo.get_stencilAttachmentFormat(this.segment(), index); } + /// {@return `stencilAttachmentFormat`} + public @CType("VkFormat") int stencilAttachmentFormat() { return VkCommandBufferInheritanceRenderingInfo.get_stencilAttachmentFormat(this.segment()); } + /// Sets `stencilAttachmentFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilAttachmentFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_stencilAttachmentFormat.set(segment, 0L, index, value); } + /// Sets `stencilAttachmentFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilAttachmentFormat(MemorySegment segment, @CType("VkFormat") int value) { VkCommandBufferInheritanceRenderingInfo.set_stencilAttachmentFormat(segment, 0L, value); } + /// Sets `stencilAttachmentFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo stencilAttachmentFormatAt(long index, @CType("VkFormat") int value) { VkCommandBufferInheritanceRenderingInfo.set_stencilAttachmentFormat(this.segment(), index, value); return this; } + /// Sets `stencilAttachmentFormat` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo stencilAttachmentFormat(@CType("VkFormat") int value) { VkCommandBufferInheritanceRenderingInfo.set_stencilAttachmentFormat(this.segment(), value); return this; } + + /// {@return `rasterizationSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_rasterizationSamples(MemorySegment segment, long index) { return (int) VH_rasterizationSamples.get(segment, 0L, index); } + /// {@return `rasterizationSamples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_rasterizationSamples(MemorySegment segment) { return VkCommandBufferInheritanceRenderingInfo.get_rasterizationSamples(segment, 0L); } + /// {@return `rasterizationSamples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int rasterizationSamplesAt(long index) { return VkCommandBufferInheritanceRenderingInfo.get_rasterizationSamples(this.segment(), index); } + /// {@return `rasterizationSamples`} + public @CType("VkSampleCountFlagBits") int rasterizationSamples() { return VkCommandBufferInheritanceRenderingInfo.get_rasterizationSamples(this.segment()); } + /// Sets `rasterizationSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rasterizationSamples(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_rasterizationSamples.set(segment, 0L, index, value); } + /// Sets `rasterizationSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rasterizationSamples(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkCommandBufferInheritanceRenderingInfo.set_rasterizationSamples(segment, 0L, value); } + /// Sets `rasterizationSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo rasterizationSamplesAt(long index, @CType("VkSampleCountFlagBits") int value) { VkCommandBufferInheritanceRenderingInfo.set_rasterizationSamples(this.segment(), index, value); return this; } + /// Sets `rasterizationSamples` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferInheritanceRenderingInfo rasterizationSamples(@CType("VkSampleCountFlagBits") int value) { VkCommandBufferInheritanceRenderingInfo.set_rasterizationSamples(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferSubmitInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferSubmitInfo.java new file mode 100644 index 00000000..9e78eef3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandBufferSubmitInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### commandBuffer +/// [VarHandle][#VH_commandBuffer] - [Getter][#commandBuffer()] - [Setter][#commandBuffer(java.lang.foreign.MemorySegment)] +/// ### deviceMask +/// [VarHandle][#VH_deviceMask] - [Getter][#deviceMask()] - [Setter][#deviceMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandBufferSubmitInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkCommandBuffer commandBuffer; +/// uint32_t deviceMask; +/// } VkCommandBufferSubmitInfo; +/// ``` +public final class VkCommandBufferSubmitInfo extends Struct { + /// The struct layout of `VkCommandBufferSubmitInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("commandBuffer"), + ValueLayout.JAVA_INT.withName("deviceMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `commandBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_commandBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandBuffer")); + /// The [VarHandle] of `deviceMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceMask")); + + /// Creates `VkCommandBufferSubmitInfo` with the given segment. + /// @param segment the memory segment + public VkCommandBufferSubmitInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandBufferSubmitInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferSubmitInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferSubmitInfo(segment); } + + /// Creates `VkCommandBufferSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferSubmitInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandBufferSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandBufferSubmitInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandBufferSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandBufferSubmitInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandBufferSubmitInfo` + public static VkCommandBufferSubmitInfo alloc(SegmentAllocator allocator) { return new VkCommandBufferSubmitInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandBufferSubmitInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandBufferSubmitInfo` + public static VkCommandBufferSubmitInfo alloc(SegmentAllocator allocator, long count) { return new VkCommandBufferSubmitInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandBufferSubmitInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandBufferSubmitInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandBufferSubmitInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandBufferSubmitInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferSubmitInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandBufferSubmitInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferSubmitInfo sType(@CType("VkStructureType") int value) { VkCommandBufferSubmitInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandBufferSubmitInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandBufferSubmitInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCommandBufferSubmitInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferSubmitInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferSubmitInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferSubmitInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferSubmitInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandBufferSubmitInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `commandBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCommandBuffer") java.lang.foreign.MemorySegment get_commandBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_commandBuffer.get(segment, 0L, index); } + /// {@return `commandBuffer`} + /// @param segment the segment of the struct + public static @CType("VkCommandBuffer") java.lang.foreign.MemorySegment get_commandBuffer(MemorySegment segment) { return VkCommandBufferSubmitInfo.get_commandBuffer(segment, 0L); } + /// {@return `commandBuffer` at the given index} + /// @param index the index + public @CType("VkCommandBuffer") java.lang.foreign.MemorySegment commandBufferAt(long index) { return VkCommandBufferSubmitInfo.get_commandBuffer(this.segment(), index); } + /// {@return `commandBuffer`} + public @CType("VkCommandBuffer") java.lang.foreign.MemorySegment commandBuffer() { return VkCommandBufferSubmitInfo.get_commandBuffer(this.segment()); } + /// Sets `commandBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandBuffer(MemorySegment segment, long index, @CType("VkCommandBuffer") java.lang.foreign.MemorySegment value) { VH_commandBuffer.set(segment, 0L, index, value); } + /// Sets `commandBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandBuffer(MemorySegment segment, @CType("VkCommandBuffer") java.lang.foreign.MemorySegment value) { VkCommandBufferSubmitInfo.set_commandBuffer(segment, 0L, value); } + /// Sets `commandBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferSubmitInfo commandBufferAt(long index, @CType("VkCommandBuffer") java.lang.foreign.MemorySegment value) { VkCommandBufferSubmitInfo.set_commandBuffer(this.segment(), index, value); return this; } + /// Sets `commandBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferSubmitInfo commandBuffer(@CType("VkCommandBuffer") java.lang.foreign.MemorySegment value) { VkCommandBufferSubmitInfo.set_commandBuffer(this.segment(), value); return this; } + + /// {@return `deviceMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceMask(MemorySegment segment, long index) { return (int) VH_deviceMask.get(segment, 0L, index); } + /// {@return `deviceMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceMask(MemorySegment segment) { return VkCommandBufferSubmitInfo.get_deviceMask(segment, 0L); } + /// {@return `deviceMask` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceMaskAt(long index) { return VkCommandBufferSubmitInfo.get_deviceMask(this.segment(), index); } + /// {@return `deviceMask`} + public @CType("uint32_t") int deviceMask() { return VkCommandBufferSubmitInfo.get_deviceMask(this.segment()); } + /// Sets `deviceMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceMask.set(segment, 0L, index, value); } + /// Sets `deviceMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceMask(MemorySegment segment, @CType("uint32_t") int value) { VkCommandBufferSubmitInfo.set_deviceMask(segment, 0L, value); } + /// Sets `deviceMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandBufferSubmitInfo deviceMaskAt(long index, @CType("uint32_t") int value) { VkCommandBufferSubmitInfo.set_deviceMask(this.segment(), index, value); return this; } + /// Sets `deviceMask` with the given value. + /// @param value the value + /// @return `this` + public VkCommandBufferSubmitInfo deviceMask(@CType("uint32_t") int value) { VkCommandBufferSubmitInfo.set_deviceMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandPoolCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandPoolCreateInfo.java new file mode 100644 index 00000000..10be9653 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandPoolCreateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### queueFamilyIndex +/// [VarHandle][#VH_queueFamilyIndex] - [Getter][#queueFamilyIndex()] - [Setter][#queueFamilyIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandPoolCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkCommandPoolCreateFlags flags; +/// uint32_t queueFamilyIndex; +/// } VkCommandPoolCreateInfo; +/// ``` +public final class VkCommandPoolCreateInfo extends Struct { + /// The struct layout of `VkCommandPoolCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("queueFamilyIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `queueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueFamilyIndex")); + + /// Creates `VkCommandPoolCreateInfo` with the given segment. + /// @param segment the memory segment + public VkCommandPoolCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandPoolCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandPoolCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandPoolCreateInfo(segment); } + + /// Creates `VkCommandPoolCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandPoolCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandPoolCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandPoolCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandPoolCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandPoolCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandPoolCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandPoolCreateInfo` + public static VkCommandPoolCreateInfo alloc(SegmentAllocator allocator) { return new VkCommandPoolCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandPoolCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandPoolCreateInfo` + public static VkCommandPoolCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkCommandPoolCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandPoolCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandPoolCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandPoolCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandPoolCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandPoolCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolCreateInfo sType(@CType("VkStructureType") int value) { VkCommandPoolCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandPoolCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandPoolCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCommandPoolCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandPoolCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandPoolCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandPoolCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCommandPoolCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkCommandPoolCreateFlags") int get_flags(MemorySegment segment) { return VkCommandPoolCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkCommandPoolCreateFlags") int flagsAt(long index) { return VkCommandPoolCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkCommandPoolCreateFlags") int flags() { return VkCommandPoolCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkCommandPoolCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkCommandPoolCreateFlags") int value) { VkCommandPoolCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolCreateInfo flagsAt(long index, @CType("VkCommandPoolCreateFlags") int value) { VkCommandPoolCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolCreateInfo flags(@CType("VkCommandPoolCreateFlags") int value) { VkCommandPoolCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `queueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueFamilyIndex(MemorySegment segment, long index) { return (int) VH_queueFamilyIndex.get(segment, 0L, index); } + /// {@return `queueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueFamilyIndex(MemorySegment segment) { return VkCommandPoolCreateInfo.get_queueFamilyIndex(segment, 0L); } + /// {@return `queueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int queueFamilyIndexAt(long index) { return VkCommandPoolCreateInfo.get_queueFamilyIndex(this.segment(), index); } + /// {@return `queueFamilyIndex`} + public @CType("uint32_t") int queueFamilyIndex() { return VkCommandPoolCreateInfo.get_queueFamilyIndex(this.segment()); } + /// Sets `queueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `queueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkCommandPoolCreateInfo.set_queueFamilyIndex(segment, 0L, value); } + /// Sets `queueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolCreateInfo queueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkCommandPoolCreateInfo.set_queueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `queueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolCreateInfo queueFamilyIndex(@CType("uint32_t") int value) { VkCommandPoolCreateInfo.set_queueFamilyIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandPoolMemoryConsumption.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandPoolMemoryConsumption.java new file mode 100644 index 00000000..b1122d4e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandPoolMemoryConsumption.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### commandPoolAllocated +/// [VarHandle][#VH_commandPoolAllocated] - [Getter][#commandPoolAllocated()] - [Setter][#commandPoolAllocated(long)] +/// ### commandPoolReservedSize +/// [VarHandle][#VH_commandPoolReservedSize] - [Getter][#commandPoolReservedSize()] - [Setter][#commandPoolReservedSize(long)] +/// ### commandBufferAllocated +/// [VarHandle][#VH_commandBufferAllocated] - [Getter][#commandBufferAllocated()] - [Setter][#commandBufferAllocated(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandPoolMemoryConsumption { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize commandPoolAllocated; +/// VkDeviceSize commandPoolReservedSize; +/// VkDeviceSize commandBufferAllocated; +/// } VkCommandPoolMemoryConsumption; +/// ``` +public final class VkCommandPoolMemoryConsumption extends Struct { + /// The struct layout of `VkCommandPoolMemoryConsumption`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("commandPoolAllocated"), + ValueLayout.JAVA_LONG.withName("commandPoolReservedSize"), + ValueLayout.JAVA_LONG.withName("commandBufferAllocated") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `commandPoolAllocated` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_commandPoolAllocated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandPoolAllocated")); + /// The [VarHandle] of `commandPoolReservedSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_commandPoolReservedSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandPoolReservedSize")); + /// The [VarHandle] of `commandBufferAllocated` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_commandBufferAllocated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandBufferAllocated")); + + /// Creates `VkCommandPoolMemoryConsumption` with the given segment. + /// @param segment the memory segment + public VkCommandPoolMemoryConsumption(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandPoolMemoryConsumption` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandPoolMemoryConsumption of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandPoolMemoryConsumption(segment); } + + /// Creates `VkCommandPoolMemoryConsumption` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandPoolMemoryConsumption ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandPoolMemoryConsumption(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandPoolMemoryConsumption` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandPoolMemoryConsumption ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandPoolMemoryConsumption(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandPoolMemoryConsumption` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandPoolMemoryConsumption` + public static VkCommandPoolMemoryConsumption alloc(SegmentAllocator allocator) { return new VkCommandPoolMemoryConsumption(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandPoolMemoryConsumption` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandPoolMemoryConsumption` + public static VkCommandPoolMemoryConsumption alloc(SegmentAllocator allocator, long count) { return new VkCommandPoolMemoryConsumption(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandPoolMemoryConsumption.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandPoolMemoryConsumption.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandPoolMemoryConsumption.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandPoolMemoryConsumption.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryConsumption sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandPoolMemoryConsumption.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryConsumption sType(@CType("VkStructureType") int value) { VkCommandPoolMemoryConsumption.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandPoolMemoryConsumption.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandPoolMemoryConsumption.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkCommandPoolMemoryConsumption.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkCommandPoolMemoryConsumption.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryConsumption pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkCommandPoolMemoryConsumption.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryConsumption pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkCommandPoolMemoryConsumption.set_pNext(this.segment(), value); return this; } + + /// {@return `commandPoolAllocated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_commandPoolAllocated(MemorySegment segment, long index) { return (long) VH_commandPoolAllocated.get(segment, 0L, index); } + /// {@return `commandPoolAllocated`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_commandPoolAllocated(MemorySegment segment) { return VkCommandPoolMemoryConsumption.get_commandPoolAllocated(segment, 0L); } + /// {@return `commandPoolAllocated` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long commandPoolAllocatedAt(long index) { return VkCommandPoolMemoryConsumption.get_commandPoolAllocated(this.segment(), index); } + /// {@return `commandPoolAllocated`} + public @CType("VkDeviceSize") long commandPoolAllocated() { return VkCommandPoolMemoryConsumption.get_commandPoolAllocated(this.segment()); } + /// Sets `commandPoolAllocated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandPoolAllocated(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_commandPoolAllocated.set(segment, 0L, index, value); } + /// Sets `commandPoolAllocated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandPoolAllocated(MemorySegment segment, @CType("VkDeviceSize") long value) { VkCommandPoolMemoryConsumption.set_commandPoolAllocated(segment, 0L, value); } + /// Sets `commandPoolAllocated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryConsumption commandPoolAllocatedAt(long index, @CType("VkDeviceSize") long value) { VkCommandPoolMemoryConsumption.set_commandPoolAllocated(this.segment(), index, value); return this; } + /// Sets `commandPoolAllocated` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryConsumption commandPoolAllocated(@CType("VkDeviceSize") long value) { VkCommandPoolMemoryConsumption.set_commandPoolAllocated(this.segment(), value); return this; } + + /// {@return `commandPoolReservedSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_commandPoolReservedSize(MemorySegment segment, long index) { return (long) VH_commandPoolReservedSize.get(segment, 0L, index); } + /// {@return `commandPoolReservedSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_commandPoolReservedSize(MemorySegment segment) { return VkCommandPoolMemoryConsumption.get_commandPoolReservedSize(segment, 0L); } + /// {@return `commandPoolReservedSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long commandPoolReservedSizeAt(long index) { return VkCommandPoolMemoryConsumption.get_commandPoolReservedSize(this.segment(), index); } + /// {@return `commandPoolReservedSize`} + public @CType("VkDeviceSize") long commandPoolReservedSize() { return VkCommandPoolMemoryConsumption.get_commandPoolReservedSize(this.segment()); } + /// Sets `commandPoolReservedSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandPoolReservedSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_commandPoolReservedSize.set(segment, 0L, index, value); } + /// Sets `commandPoolReservedSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandPoolReservedSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkCommandPoolMemoryConsumption.set_commandPoolReservedSize(segment, 0L, value); } + /// Sets `commandPoolReservedSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryConsumption commandPoolReservedSizeAt(long index, @CType("VkDeviceSize") long value) { VkCommandPoolMemoryConsumption.set_commandPoolReservedSize(this.segment(), index, value); return this; } + /// Sets `commandPoolReservedSize` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryConsumption commandPoolReservedSize(@CType("VkDeviceSize") long value) { VkCommandPoolMemoryConsumption.set_commandPoolReservedSize(this.segment(), value); return this; } + + /// {@return `commandBufferAllocated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_commandBufferAllocated(MemorySegment segment, long index) { return (long) VH_commandBufferAllocated.get(segment, 0L, index); } + /// {@return `commandBufferAllocated`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_commandBufferAllocated(MemorySegment segment) { return VkCommandPoolMemoryConsumption.get_commandBufferAllocated(segment, 0L); } + /// {@return `commandBufferAllocated` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long commandBufferAllocatedAt(long index) { return VkCommandPoolMemoryConsumption.get_commandBufferAllocated(this.segment(), index); } + /// {@return `commandBufferAllocated`} + public @CType("VkDeviceSize") long commandBufferAllocated() { return VkCommandPoolMemoryConsumption.get_commandBufferAllocated(this.segment()); } + /// Sets `commandBufferAllocated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandBufferAllocated(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_commandBufferAllocated.set(segment, 0L, index, value); } + /// Sets `commandBufferAllocated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandBufferAllocated(MemorySegment segment, @CType("VkDeviceSize") long value) { VkCommandPoolMemoryConsumption.set_commandBufferAllocated(segment, 0L, value); } + /// Sets `commandBufferAllocated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryConsumption commandBufferAllocatedAt(long index, @CType("VkDeviceSize") long value) { VkCommandPoolMemoryConsumption.set_commandBufferAllocated(this.segment(), index, value); return this; } + /// Sets `commandBufferAllocated` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryConsumption commandBufferAllocated(@CType("VkDeviceSize") long value) { VkCommandPoolMemoryConsumption.set_commandBufferAllocated(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandPoolMemoryReservationCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandPoolMemoryReservationCreateInfo.java new file mode 100644 index 00000000..9b73d08f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCommandPoolMemoryReservationCreateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### commandPoolReservedSize +/// [VarHandle][#VH_commandPoolReservedSize] - [Getter][#commandPoolReservedSize()] - [Setter][#commandPoolReservedSize(long)] +/// ### commandPoolMaxCommandBuffers +/// [VarHandle][#VH_commandPoolMaxCommandBuffers] - [Getter][#commandPoolMaxCommandBuffers()] - [Setter][#commandPoolMaxCommandBuffers(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCommandPoolMemoryReservationCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceSize commandPoolReservedSize; +/// uint32_t commandPoolMaxCommandBuffers; +/// } VkCommandPoolMemoryReservationCreateInfo; +/// ``` +public final class VkCommandPoolMemoryReservationCreateInfo extends Struct { + /// The struct layout of `VkCommandPoolMemoryReservationCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("commandPoolReservedSize"), + ValueLayout.JAVA_INT.withName("commandPoolMaxCommandBuffers") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `commandPoolReservedSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_commandPoolReservedSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandPoolReservedSize")); + /// The [VarHandle] of `commandPoolMaxCommandBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandPoolMaxCommandBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandPoolMaxCommandBuffers")); + + /// Creates `VkCommandPoolMemoryReservationCreateInfo` with the given segment. + /// @param segment the memory segment + public VkCommandPoolMemoryReservationCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCommandPoolMemoryReservationCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandPoolMemoryReservationCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandPoolMemoryReservationCreateInfo(segment); } + + /// Creates `VkCommandPoolMemoryReservationCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandPoolMemoryReservationCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandPoolMemoryReservationCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCommandPoolMemoryReservationCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCommandPoolMemoryReservationCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCommandPoolMemoryReservationCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCommandPoolMemoryReservationCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCommandPoolMemoryReservationCreateInfo` + public static VkCommandPoolMemoryReservationCreateInfo alloc(SegmentAllocator allocator) { return new VkCommandPoolMemoryReservationCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCommandPoolMemoryReservationCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCommandPoolMemoryReservationCreateInfo` + public static VkCommandPoolMemoryReservationCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkCommandPoolMemoryReservationCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCommandPoolMemoryReservationCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCommandPoolMemoryReservationCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCommandPoolMemoryReservationCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCommandPoolMemoryReservationCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryReservationCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkCommandPoolMemoryReservationCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryReservationCreateInfo sType(@CType("VkStructureType") int value) { VkCommandPoolMemoryReservationCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCommandPoolMemoryReservationCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCommandPoolMemoryReservationCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCommandPoolMemoryReservationCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandPoolMemoryReservationCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryReservationCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandPoolMemoryReservationCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryReservationCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCommandPoolMemoryReservationCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `commandPoolReservedSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_commandPoolReservedSize(MemorySegment segment, long index) { return (long) VH_commandPoolReservedSize.get(segment, 0L, index); } + /// {@return `commandPoolReservedSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_commandPoolReservedSize(MemorySegment segment) { return VkCommandPoolMemoryReservationCreateInfo.get_commandPoolReservedSize(segment, 0L); } + /// {@return `commandPoolReservedSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long commandPoolReservedSizeAt(long index) { return VkCommandPoolMemoryReservationCreateInfo.get_commandPoolReservedSize(this.segment(), index); } + /// {@return `commandPoolReservedSize`} + public @CType("VkDeviceSize") long commandPoolReservedSize() { return VkCommandPoolMemoryReservationCreateInfo.get_commandPoolReservedSize(this.segment()); } + /// Sets `commandPoolReservedSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandPoolReservedSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_commandPoolReservedSize.set(segment, 0L, index, value); } + /// Sets `commandPoolReservedSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandPoolReservedSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkCommandPoolMemoryReservationCreateInfo.set_commandPoolReservedSize(segment, 0L, value); } + /// Sets `commandPoolReservedSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryReservationCreateInfo commandPoolReservedSizeAt(long index, @CType("VkDeviceSize") long value) { VkCommandPoolMemoryReservationCreateInfo.set_commandPoolReservedSize(this.segment(), index, value); return this; } + /// Sets `commandPoolReservedSize` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryReservationCreateInfo commandPoolReservedSize(@CType("VkDeviceSize") long value) { VkCommandPoolMemoryReservationCreateInfo.set_commandPoolReservedSize(this.segment(), value); return this; } + + /// {@return `commandPoolMaxCommandBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_commandPoolMaxCommandBuffers(MemorySegment segment, long index) { return (int) VH_commandPoolMaxCommandBuffers.get(segment, 0L, index); } + /// {@return `commandPoolMaxCommandBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_commandPoolMaxCommandBuffers(MemorySegment segment) { return VkCommandPoolMemoryReservationCreateInfo.get_commandPoolMaxCommandBuffers(segment, 0L); } + /// {@return `commandPoolMaxCommandBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int commandPoolMaxCommandBuffersAt(long index) { return VkCommandPoolMemoryReservationCreateInfo.get_commandPoolMaxCommandBuffers(this.segment(), index); } + /// {@return `commandPoolMaxCommandBuffers`} + public @CType("uint32_t") int commandPoolMaxCommandBuffers() { return VkCommandPoolMemoryReservationCreateInfo.get_commandPoolMaxCommandBuffers(this.segment()); } + /// Sets `commandPoolMaxCommandBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandPoolMaxCommandBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_commandPoolMaxCommandBuffers.set(segment, 0L, index, value); } + /// Sets `commandPoolMaxCommandBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandPoolMaxCommandBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkCommandPoolMemoryReservationCreateInfo.set_commandPoolMaxCommandBuffers(segment, 0L, value); } + /// Sets `commandPoolMaxCommandBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryReservationCreateInfo commandPoolMaxCommandBuffersAt(long index, @CType("uint32_t") int value) { VkCommandPoolMemoryReservationCreateInfo.set_commandPoolMaxCommandBuffers(this.segment(), index, value); return this; } + /// Sets `commandPoolMaxCommandBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkCommandPoolMemoryReservationCreateInfo commandPoolMaxCommandBuffers(@CType("uint32_t") int value) { VkCommandPoolMemoryReservationCreateInfo.set_commandPoolMaxCommandBuffers(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkComponentMapping.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkComponentMapping.java new file mode 100644 index 00000000..71ff7ec9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkComponentMapping.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### r +/// [VarHandle][#VH_r] - [Getter][#r()] - [Setter][#r(int)] +/// ### g +/// [VarHandle][#VH_g] - [Getter][#g()] - [Setter][#g(int)] +/// ### b +/// [VarHandle][#VH_b] - [Getter][#b()] - [Setter][#b(int)] +/// ### a +/// [VarHandle][#VH_a] - [Getter][#a()] - [Setter][#a(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkComponentMapping { +/// VkComponentSwizzle r; +/// VkComponentSwizzle g; +/// VkComponentSwizzle b; +/// VkComponentSwizzle a; +/// } VkComponentMapping; +/// ``` +public final class VkComponentMapping extends Struct { + /// The struct layout of `VkComponentMapping`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("r"), + ValueLayout.JAVA_INT.withName("g"), + ValueLayout.JAVA_INT.withName("b"), + ValueLayout.JAVA_INT.withName("a") + ); + /// The [VarHandle] of `r` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_r = LAYOUT.arrayElementVarHandle(PathElement.groupElement("r")); + /// The [VarHandle] of `g` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_g = LAYOUT.arrayElementVarHandle(PathElement.groupElement("g")); + /// The [VarHandle] of `b` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_b = LAYOUT.arrayElementVarHandle(PathElement.groupElement("b")); + /// The [VarHandle] of `a` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_a = LAYOUT.arrayElementVarHandle(PathElement.groupElement("a")); + + /// Creates `VkComponentMapping` with the given segment. + /// @param segment the memory segment + public VkComponentMapping(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkComponentMapping` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkComponentMapping of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkComponentMapping(segment); } + + /// Creates `VkComponentMapping` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkComponentMapping ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkComponentMapping(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkComponentMapping` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkComponentMapping ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkComponentMapping(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkComponentMapping` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkComponentMapping` + public static VkComponentMapping alloc(SegmentAllocator allocator) { return new VkComponentMapping(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkComponentMapping` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkComponentMapping` + public static VkComponentMapping alloc(SegmentAllocator allocator, long count) { return new VkComponentMapping(allocator.allocate(LAYOUT, count)); } + + /// {@return `r` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentSwizzle") int get_r(MemorySegment segment, long index) { return (int) VH_r.get(segment, 0L, index); } + /// {@return `r`} + /// @param segment the segment of the struct + public static @CType("VkComponentSwizzle") int get_r(MemorySegment segment) { return VkComponentMapping.get_r(segment, 0L); } + /// {@return `r` at the given index} + /// @param index the index + public @CType("VkComponentSwizzle") int rAt(long index) { return VkComponentMapping.get_r(this.segment(), index); } + /// {@return `r`} + public @CType("VkComponentSwizzle") int r() { return VkComponentMapping.get_r(this.segment()); } + /// Sets `r` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_r(MemorySegment segment, long index, @CType("VkComponentSwizzle") int value) { VH_r.set(segment, 0L, index, value); } + /// Sets `r` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_r(MemorySegment segment, @CType("VkComponentSwizzle") int value) { VkComponentMapping.set_r(segment, 0L, value); } + /// Sets `r` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComponentMapping rAt(long index, @CType("VkComponentSwizzle") int value) { VkComponentMapping.set_r(this.segment(), index, value); return this; } + /// Sets `r` with the given value. + /// @param value the value + /// @return `this` + public VkComponentMapping r(@CType("VkComponentSwizzle") int value) { VkComponentMapping.set_r(this.segment(), value); return this; } + + /// {@return `g` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentSwizzle") int get_g(MemorySegment segment, long index) { return (int) VH_g.get(segment, 0L, index); } + /// {@return `g`} + /// @param segment the segment of the struct + public static @CType("VkComponentSwizzle") int get_g(MemorySegment segment) { return VkComponentMapping.get_g(segment, 0L); } + /// {@return `g` at the given index} + /// @param index the index + public @CType("VkComponentSwizzle") int gAt(long index) { return VkComponentMapping.get_g(this.segment(), index); } + /// {@return `g`} + public @CType("VkComponentSwizzle") int g() { return VkComponentMapping.get_g(this.segment()); } + /// Sets `g` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_g(MemorySegment segment, long index, @CType("VkComponentSwizzle") int value) { VH_g.set(segment, 0L, index, value); } + /// Sets `g` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_g(MemorySegment segment, @CType("VkComponentSwizzle") int value) { VkComponentMapping.set_g(segment, 0L, value); } + /// Sets `g` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComponentMapping gAt(long index, @CType("VkComponentSwizzle") int value) { VkComponentMapping.set_g(this.segment(), index, value); return this; } + /// Sets `g` with the given value. + /// @param value the value + /// @return `this` + public VkComponentMapping g(@CType("VkComponentSwizzle") int value) { VkComponentMapping.set_g(this.segment(), value); return this; } + + /// {@return `b` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentSwizzle") int get_b(MemorySegment segment, long index) { return (int) VH_b.get(segment, 0L, index); } + /// {@return `b`} + /// @param segment the segment of the struct + public static @CType("VkComponentSwizzle") int get_b(MemorySegment segment) { return VkComponentMapping.get_b(segment, 0L); } + /// {@return `b` at the given index} + /// @param index the index + public @CType("VkComponentSwizzle") int bAt(long index) { return VkComponentMapping.get_b(this.segment(), index); } + /// {@return `b`} + public @CType("VkComponentSwizzle") int b() { return VkComponentMapping.get_b(this.segment()); } + /// Sets `b` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_b(MemorySegment segment, long index, @CType("VkComponentSwizzle") int value) { VH_b.set(segment, 0L, index, value); } + /// Sets `b` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_b(MemorySegment segment, @CType("VkComponentSwizzle") int value) { VkComponentMapping.set_b(segment, 0L, value); } + /// Sets `b` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComponentMapping bAt(long index, @CType("VkComponentSwizzle") int value) { VkComponentMapping.set_b(this.segment(), index, value); return this; } + /// Sets `b` with the given value. + /// @param value the value + /// @return `this` + public VkComponentMapping b(@CType("VkComponentSwizzle") int value) { VkComponentMapping.set_b(this.segment(), value); return this; } + + /// {@return `a` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentSwizzle") int get_a(MemorySegment segment, long index) { return (int) VH_a.get(segment, 0L, index); } + /// {@return `a`} + /// @param segment the segment of the struct + public static @CType("VkComponentSwizzle") int get_a(MemorySegment segment) { return VkComponentMapping.get_a(segment, 0L); } + /// {@return `a` at the given index} + /// @param index the index + public @CType("VkComponentSwizzle") int aAt(long index) { return VkComponentMapping.get_a(this.segment(), index); } + /// {@return `a`} + public @CType("VkComponentSwizzle") int a() { return VkComponentMapping.get_a(this.segment()); } + /// Sets `a` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_a(MemorySegment segment, long index, @CType("VkComponentSwizzle") int value) { VH_a.set(segment, 0L, index, value); } + /// Sets `a` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_a(MemorySegment segment, @CType("VkComponentSwizzle") int value) { VkComponentMapping.set_a(segment, 0L, value); } + /// Sets `a` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComponentMapping aAt(long index, @CType("VkComponentSwizzle") int value) { VkComponentMapping.set_a(this.segment(), index, value); return this; } + /// Sets `a` with the given value. + /// @param value the value + /// @return `this` + public VkComponentMapping a(@CType("VkComponentSwizzle") int value) { VkComponentMapping.set_a(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkComputePipelineCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkComputePipelineCreateInfo.java new file mode 100644 index 00000000..31c646d3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkComputePipelineCreateInfo.java @@ -0,0 +1,335 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### stage +/// [Byte offset][#OFFSET_stage] - [Memory layout][#ML_stage] - [Getter][#stage()] - [Setter][#stage(java.lang.foreign.MemorySegment)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### basePipelineHandle +/// [VarHandle][#VH_basePipelineHandle] - [Getter][#basePipelineHandle()] - [Setter][#basePipelineHandle(java.lang.foreign.MemorySegment)] +/// ### basePipelineIndex +/// [VarHandle][#VH_basePipelineIndex] - [Getter][#basePipelineIndex()] - [Setter][#basePipelineIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkComputePipelineCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCreateFlags flags; +/// VkPipelineShaderStageCreateInfo stage; +/// VkPipelineLayout layout; +/// VkPipeline basePipelineHandle; +/// int32_t basePipelineIndex; +/// } VkComputePipelineCreateInfo; +/// ``` +public final class VkComputePipelineCreateInfo extends Struct { + /// The struct layout of `VkComputePipelineCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + overrungl.vulkan.struct.VkPipelineShaderStageCreateInfo.LAYOUT.withName("stage"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.ADDRESS.withName("basePipelineHandle"), + ValueLayout.JAVA_INT.withName("basePipelineIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The byte offset of `stage`. + public static final long OFFSET_stage = LAYOUT.byteOffset(PathElement.groupElement("stage")); + /// The memory layout of `stage`. + public static final MemoryLayout ML_stage = LAYOUT.select(PathElement.groupElement("stage")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `basePipelineHandle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_basePipelineHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("basePipelineHandle")); + /// The [VarHandle] of `basePipelineIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_basePipelineIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("basePipelineIndex")); + + /// Creates `VkComputePipelineCreateInfo` with the given segment. + /// @param segment the memory segment + public VkComputePipelineCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkComputePipelineCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkComputePipelineCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkComputePipelineCreateInfo(segment); } + + /// Creates `VkComputePipelineCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkComputePipelineCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkComputePipelineCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkComputePipelineCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkComputePipelineCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkComputePipelineCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkComputePipelineCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkComputePipelineCreateInfo` + public static VkComputePipelineCreateInfo alloc(SegmentAllocator allocator) { return new VkComputePipelineCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkComputePipelineCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkComputePipelineCreateInfo` + public static VkComputePipelineCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkComputePipelineCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkComputePipelineCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkComputePipelineCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkComputePipelineCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkComputePipelineCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkComputePipelineCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo sType(@CType("VkStructureType") int value) { VkComputePipelineCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkComputePipelineCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkComputePipelineCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkComputePipelineCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCreateFlags") int get_flags(MemorySegment segment) { return VkComputePipelineCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCreateFlags") int flagsAt(long index) { return VkComputePipelineCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCreateFlags") int flags() { return VkComputePipelineCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCreateFlags") int value) { VkComputePipelineCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo flagsAt(long index, @CType("VkPipelineCreateFlags") int value) { VkComputePipelineCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo flags(@CType("VkPipelineCreateFlags") int value) { VkComputePipelineCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `stage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineShaderStageCreateInfo") java.lang.foreign.MemorySegment get_stage(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_stage, index), ML_stage); } + /// {@return `stage`} + /// @param segment the segment of the struct + public static @CType("VkPipelineShaderStageCreateInfo") java.lang.foreign.MemorySegment get_stage(MemorySegment segment) { return VkComputePipelineCreateInfo.get_stage(segment, 0L); } + /// {@return `stage` at the given index} + /// @param index the index + public @CType("VkPipelineShaderStageCreateInfo") java.lang.foreign.MemorySegment stageAt(long index) { return VkComputePipelineCreateInfo.get_stage(this.segment(), index); } + /// {@return `stage`} + public @CType("VkPipelineShaderStageCreateInfo") java.lang.foreign.MemorySegment stage() { return VkComputePipelineCreateInfo.get_stage(this.segment()); } + /// Sets `stage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stage(MemorySegment segment, long index, @CType("VkPipelineShaderStageCreateInfo") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_stage, index), ML_stage.byteSize()); } + /// Sets `stage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stage(MemorySegment segment, @CType("VkPipelineShaderStageCreateInfo") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_stage(segment, 0L, value); } + /// Sets `stage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo stageAt(long index, @CType("VkPipelineShaderStageCreateInfo") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_stage(this.segment(), index, value); return this; } + /// Sets `stage` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo stage(@CType("VkPipelineShaderStageCreateInfo") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_stage(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkComputePipelineCreateInfo.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkComputePipelineCreateInfo.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkComputePipelineCreateInfo.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_layout(this.segment(), value); return this; } + + /// {@return `basePipelineHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_basePipelineHandle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_basePipelineHandle.get(segment, 0L, index); } + /// {@return `basePipelineHandle`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_basePipelineHandle(MemorySegment segment) { return VkComputePipelineCreateInfo.get_basePipelineHandle(segment, 0L); } + /// {@return `basePipelineHandle` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment basePipelineHandleAt(long index) { return VkComputePipelineCreateInfo.get_basePipelineHandle(this.segment(), index); } + /// {@return `basePipelineHandle`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment basePipelineHandle() { return VkComputePipelineCreateInfo.get_basePipelineHandle(this.segment()); } + /// Sets `basePipelineHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_basePipelineHandle(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_basePipelineHandle.set(segment, 0L, index, value); } + /// Sets `basePipelineHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_basePipelineHandle(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_basePipelineHandle(segment, 0L, value); } + /// Sets `basePipelineHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo basePipelineHandleAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_basePipelineHandle(this.segment(), index, value); return this; } + /// Sets `basePipelineHandle` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo basePipelineHandle(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkComputePipelineCreateInfo.set_basePipelineHandle(this.segment(), value); return this; } + + /// {@return `basePipelineIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_basePipelineIndex(MemorySegment segment, long index) { return (int) VH_basePipelineIndex.get(segment, 0L, index); } + /// {@return `basePipelineIndex`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_basePipelineIndex(MemorySegment segment) { return VkComputePipelineCreateInfo.get_basePipelineIndex(segment, 0L); } + /// {@return `basePipelineIndex` at the given index} + /// @param index the index + public @CType("int32_t") int basePipelineIndexAt(long index) { return VkComputePipelineCreateInfo.get_basePipelineIndex(this.segment(), index); } + /// {@return `basePipelineIndex`} + public @CType("int32_t") int basePipelineIndex() { return VkComputePipelineCreateInfo.get_basePipelineIndex(this.segment()); } + /// Sets `basePipelineIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_basePipelineIndex(MemorySegment segment, long index, @CType("int32_t") int value) { VH_basePipelineIndex.set(segment, 0L, index, value); } + /// Sets `basePipelineIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_basePipelineIndex(MemorySegment segment, @CType("int32_t") int value) { VkComputePipelineCreateInfo.set_basePipelineIndex(segment, 0L, value); } + /// Sets `basePipelineIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo basePipelineIndexAt(long index, @CType("int32_t") int value) { VkComputePipelineCreateInfo.set_basePipelineIndex(this.segment(), index, value); return this; } + /// Sets `basePipelineIndex` with the given value. + /// @param value the value + /// @return `this` + public VkComputePipelineCreateInfo basePipelineIndex(@CType("int32_t") int value) { VkComputePipelineCreateInfo.set_basePipelineIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkConformanceVersion.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkConformanceVersion.java new file mode 100644 index 00000000..0cfdd2ee --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkConformanceVersion.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### major +/// [VarHandle][#VH_major] - [Getter][#major()] - [Setter][#major(byte)] +/// ### minor +/// [VarHandle][#VH_minor] - [Getter][#minor()] - [Setter][#minor(byte)] +/// ### subminor +/// [VarHandle][#VH_subminor] - [Getter][#subminor()] - [Setter][#subminor(byte)] +/// ### patch +/// [VarHandle][#VH_patch] - [Getter][#patch()] - [Setter][#patch(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkConformanceVersion { +/// uint8_t major; +/// uint8_t minor; +/// uint8_t subminor; +/// uint8_t patch; +/// } VkConformanceVersion; +/// ``` +public final class VkConformanceVersion extends Struct { + /// The struct layout of `VkConformanceVersion`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_BYTE.withName("major"), + ValueLayout.JAVA_BYTE.withName("minor"), + ValueLayout.JAVA_BYTE.withName("subminor"), + ValueLayout.JAVA_BYTE.withName("patch") + ); + /// The [VarHandle] of `major` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_major = LAYOUT.arrayElementVarHandle(PathElement.groupElement("major")); + /// The [VarHandle] of `minor` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_minor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minor")); + /// The [VarHandle] of `subminor` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_subminor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subminor")); + /// The [VarHandle] of `patch` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_patch = LAYOUT.arrayElementVarHandle(PathElement.groupElement("patch")); + + /// Creates `VkConformanceVersion` with the given segment. + /// @param segment the memory segment + public VkConformanceVersion(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkConformanceVersion` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkConformanceVersion of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkConformanceVersion(segment); } + + /// Creates `VkConformanceVersion` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkConformanceVersion ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkConformanceVersion(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkConformanceVersion` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkConformanceVersion ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkConformanceVersion(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkConformanceVersion` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkConformanceVersion` + public static VkConformanceVersion alloc(SegmentAllocator allocator) { return new VkConformanceVersion(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkConformanceVersion` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkConformanceVersion` + public static VkConformanceVersion alloc(SegmentAllocator allocator, long count) { return new VkConformanceVersion(allocator.allocate(LAYOUT, count)); } + + /// {@return `major` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_major(MemorySegment segment, long index) { return (byte) VH_major.get(segment, 0L, index); } + /// {@return `major`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_major(MemorySegment segment) { return VkConformanceVersion.get_major(segment, 0L); } + /// {@return `major` at the given index} + /// @param index the index + public @CType("uint8_t") byte majorAt(long index) { return VkConformanceVersion.get_major(this.segment(), index); } + /// {@return `major`} + public @CType("uint8_t") byte major() { return VkConformanceVersion.get_major(this.segment()); } + /// Sets `major` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_major(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_major.set(segment, 0L, index, value); } + /// Sets `major` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_major(MemorySegment segment, @CType("uint8_t") byte value) { VkConformanceVersion.set_major(segment, 0L, value); } + /// Sets `major` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkConformanceVersion majorAt(long index, @CType("uint8_t") byte value) { VkConformanceVersion.set_major(this.segment(), index, value); return this; } + /// Sets `major` with the given value. + /// @param value the value + /// @return `this` + public VkConformanceVersion major(@CType("uint8_t") byte value) { VkConformanceVersion.set_major(this.segment(), value); return this; } + + /// {@return `minor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_minor(MemorySegment segment, long index) { return (byte) VH_minor.get(segment, 0L, index); } + /// {@return `minor`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_minor(MemorySegment segment) { return VkConformanceVersion.get_minor(segment, 0L); } + /// {@return `minor` at the given index} + /// @param index the index + public @CType("uint8_t") byte minorAt(long index) { return VkConformanceVersion.get_minor(this.segment(), index); } + /// {@return `minor`} + public @CType("uint8_t") byte minor() { return VkConformanceVersion.get_minor(this.segment()); } + /// Sets `minor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minor(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_minor.set(segment, 0L, index, value); } + /// Sets `minor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minor(MemorySegment segment, @CType("uint8_t") byte value) { VkConformanceVersion.set_minor(segment, 0L, value); } + /// Sets `minor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkConformanceVersion minorAt(long index, @CType("uint8_t") byte value) { VkConformanceVersion.set_minor(this.segment(), index, value); return this; } + /// Sets `minor` with the given value. + /// @param value the value + /// @return `this` + public VkConformanceVersion minor(@CType("uint8_t") byte value) { VkConformanceVersion.set_minor(this.segment(), value); return this; } + + /// {@return `subminor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_subminor(MemorySegment segment, long index) { return (byte) VH_subminor.get(segment, 0L, index); } + /// {@return `subminor`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_subminor(MemorySegment segment) { return VkConformanceVersion.get_subminor(segment, 0L); } + /// {@return `subminor` at the given index} + /// @param index the index + public @CType("uint8_t") byte subminorAt(long index) { return VkConformanceVersion.get_subminor(this.segment(), index); } + /// {@return `subminor`} + public @CType("uint8_t") byte subminor() { return VkConformanceVersion.get_subminor(this.segment()); } + /// Sets `subminor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subminor(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_subminor.set(segment, 0L, index, value); } + /// Sets `subminor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subminor(MemorySegment segment, @CType("uint8_t") byte value) { VkConformanceVersion.set_subminor(segment, 0L, value); } + /// Sets `subminor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkConformanceVersion subminorAt(long index, @CType("uint8_t") byte value) { VkConformanceVersion.set_subminor(this.segment(), index, value); return this; } + /// Sets `subminor` with the given value. + /// @param value the value + /// @return `this` + public VkConformanceVersion subminor(@CType("uint8_t") byte value) { VkConformanceVersion.set_subminor(this.segment(), value); return this; } + + /// {@return `patch` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_patch(MemorySegment segment, long index) { return (byte) VH_patch.get(segment, 0L, index); } + /// {@return `patch`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_patch(MemorySegment segment) { return VkConformanceVersion.get_patch(segment, 0L); } + /// {@return `patch` at the given index} + /// @param index the index + public @CType("uint8_t") byte patchAt(long index) { return VkConformanceVersion.get_patch(this.segment(), index); } + /// {@return `patch`} + public @CType("uint8_t") byte patch() { return VkConformanceVersion.get_patch(this.segment()); } + /// Sets `patch` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_patch(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_patch.set(segment, 0L, index, value); } + /// Sets `patch` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_patch(MemorySegment segment, @CType("uint8_t") byte value) { VkConformanceVersion.set_patch(segment, 0L, value); } + /// Sets `patch` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkConformanceVersion patchAt(long index, @CType("uint8_t") byte value) { VkConformanceVersion.set_patch(this.segment(), index, value); return this; } + /// Sets `patch` with the given value. + /// @param value the value + /// @return `this` + public VkConformanceVersion patch(@CType("uint8_t") byte value) { VkConformanceVersion.set_patch(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyBufferInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyBufferInfo2.java new file mode 100644 index 00000000..e0200be4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyBufferInfo2.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcBuffer +/// [VarHandle][#VH_srcBuffer] - [Getter][#srcBuffer()] - [Setter][#srcBuffer(java.lang.foreign.MemorySegment)] +/// ### dstBuffer +/// [VarHandle][#VH_dstBuffer] - [Getter][#dstBuffer()] - [Setter][#dstBuffer(java.lang.foreign.MemorySegment)] +/// ### regionCount +/// [VarHandle][#VH_regionCount] - [Getter][#regionCount()] - [Setter][#regionCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyBufferInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkBuffer srcBuffer; +/// VkBuffer dstBuffer; +/// uint32_t regionCount; +/// const VkBufferCopy2 * pRegions; +/// } VkCopyBufferInfo2; +/// ``` +public final class VkCopyBufferInfo2 extends Struct { + /// The struct layout of `VkCopyBufferInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("srcBuffer"), + ValueLayout.ADDRESS.withName("dstBuffer"), + ValueLayout.JAVA_INT.withName("regionCount"), + ValueLayout.ADDRESS.withName("pRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcBuffer")); + /// The [VarHandle] of `dstBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstBuffer")); + /// The [VarHandle] of `regionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_regionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("regionCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + + /// Creates `VkCopyBufferInfo2` with the given segment. + /// @param segment the memory segment + public VkCopyBufferInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyBufferInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyBufferInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyBufferInfo2(segment); } + + /// Creates `VkCopyBufferInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyBufferInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyBufferInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyBufferInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyBufferInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyBufferInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyBufferInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyBufferInfo2` + public static VkCopyBufferInfo2 alloc(SegmentAllocator allocator) { return new VkCopyBufferInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyBufferInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyBufferInfo2` + public static VkCopyBufferInfo2 alloc(SegmentAllocator allocator, long count) { return new VkCopyBufferInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyBufferInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyBufferInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyBufferInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyBufferInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyBufferInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 sType(@CType("VkStructureType") int value) { VkCopyBufferInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyBufferInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyBufferInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyBufferInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_srcBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcBuffer.get(segment, 0L, index); } + /// {@return `srcBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_srcBuffer(MemorySegment segment) { return VkCopyBufferInfo2.get_srcBuffer(segment, 0L); } + /// {@return `srcBuffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment srcBufferAt(long index) { return VkCopyBufferInfo2.get_srcBuffer(this.segment(), index); } + /// {@return `srcBuffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment srcBuffer() { return VkCopyBufferInfo2.get_srcBuffer(this.segment()); } + /// Sets `srcBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcBuffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_srcBuffer.set(segment, 0L, index, value); } + /// Sets `srcBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcBuffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_srcBuffer(segment, 0L, value); } + /// Sets `srcBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 srcBufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_srcBuffer(this.segment(), index, value); return this; } + /// Sets `srcBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 srcBuffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_srcBuffer(this.segment(), value); return this; } + + /// {@return `dstBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_dstBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstBuffer.get(segment, 0L, index); } + /// {@return `dstBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_dstBuffer(MemorySegment segment) { return VkCopyBufferInfo2.get_dstBuffer(segment, 0L); } + /// {@return `dstBuffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment dstBufferAt(long index) { return VkCopyBufferInfo2.get_dstBuffer(this.segment(), index); } + /// {@return `dstBuffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment dstBuffer() { return VkCopyBufferInfo2.get_dstBuffer(this.segment()); } + /// Sets `dstBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstBuffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_dstBuffer.set(segment, 0L, index, value); } + /// Sets `dstBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstBuffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_dstBuffer(segment, 0L, value); } + /// Sets `dstBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 dstBufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_dstBuffer(this.segment(), index, value); return this; } + /// Sets `dstBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 dstBuffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_dstBuffer(this.segment(), value); return this; } + + /// {@return `regionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_regionCount(MemorySegment segment, long index) { return (int) VH_regionCount.get(segment, 0L, index); } + /// {@return `regionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_regionCount(MemorySegment segment) { return VkCopyBufferInfo2.get_regionCount(segment, 0L); } + /// {@return `regionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int regionCountAt(long index) { return VkCopyBufferInfo2.get_regionCount(this.segment(), index); } + /// {@return `regionCount`} + public @CType("uint32_t") int regionCount() { return VkCopyBufferInfo2.get_regionCount(this.segment()); } + /// Sets `regionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_regionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_regionCount.set(segment, 0L, index, value); } + /// Sets `regionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_regionCount(MemorySegment segment, @CType("uint32_t") int value) { VkCopyBufferInfo2.set_regionCount(segment, 0L, value); } + /// Sets `regionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 regionCountAt(long index, @CType("uint32_t") int value) { VkCopyBufferInfo2.set_regionCount(this.segment(), index, value); return this; } + /// Sets `regionCount` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 regionCount(@CType("uint32_t") int value) { VkCopyBufferInfo2.set_regionCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkBufferCopy2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkBufferCopy2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkCopyBufferInfo2.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkBufferCopy2 *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkCopyBufferInfo2.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkBufferCopy2 *") java.lang.foreign.MemorySegment pRegions() { return VkCopyBufferInfo2.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkBufferCopy2 *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkBufferCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 pRegionsAt(long index, @CType("const VkBufferCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferInfo2 pRegions(@CType("const VkBufferCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyBufferInfo2.set_pRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyBufferToImageInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyBufferToImageInfo2.java new file mode 100644 index 00000000..62f45ac7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyBufferToImageInfo2.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcBuffer +/// [VarHandle][#VH_srcBuffer] - [Getter][#srcBuffer()] - [Setter][#srcBuffer(java.lang.foreign.MemorySegment)] +/// ### dstImage +/// [VarHandle][#VH_dstImage] - [Getter][#dstImage()] - [Setter][#dstImage(java.lang.foreign.MemorySegment)] +/// ### dstImageLayout +/// [VarHandle][#VH_dstImageLayout] - [Getter][#dstImageLayout()] - [Setter][#dstImageLayout(int)] +/// ### regionCount +/// [VarHandle][#VH_regionCount] - [Getter][#regionCount()] - [Setter][#regionCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyBufferToImageInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkBuffer srcBuffer; +/// VkImage dstImage; +/// VkImageLayout dstImageLayout; +/// uint32_t regionCount; +/// const VkBufferImageCopy2 * pRegions; +/// } VkCopyBufferToImageInfo2; +/// ``` +public final class VkCopyBufferToImageInfo2 extends Struct { + /// The struct layout of `VkCopyBufferToImageInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("srcBuffer"), + ValueLayout.ADDRESS.withName("dstImage"), + ValueLayout.JAVA_INT.withName("dstImageLayout"), + ValueLayout.JAVA_INT.withName("regionCount"), + ValueLayout.ADDRESS.withName("pRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcBuffer")); + /// The [VarHandle] of `dstImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImage")); + /// The [VarHandle] of `dstImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImageLayout")); + /// The [VarHandle] of `regionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_regionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("regionCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + + /// Creates `VkCopyBufferToImageInfo2` with the given segment. + /// @param segment the memory segment + public VkCopyBufferToImageInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyBufferToImageInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyBufferToImageInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyBufferToImageInfo2(segment); } + + /// Creates `VkCopyBufferToImageInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyBufferToImageInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyBufferToImageInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyBufferToImageInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyBufferToImageInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyBufferToImageInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyBufferToImageInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyBufferToImageInfo2` + public static VkCopyBufferToImageInfo2 alloc(SegmentAllocator allocator) { return new VkCopyBufferToImageInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyBufferToImageInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyBufferToImageInfo2` + public static VkCopyBufferToImageInfo2 alloc(SegmentAllocator allocator, long count) { return new VkCopyBufferToImageInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyBufferToImageInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyBufferToImageInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyBufferToImageInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyBufferToImageInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyBufferToImageInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 sType(@CType("VkStructureType") int value) { VkCopyBufferToImageInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyBufferToImageInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyBufferToImageInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyBufferToImageInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_srcBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcBuffer.get(segment, 0L, index); } + /// {@return `srcBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_srcBuffer(MemorySegment segment) { return VkCopyBufferToImageInfo2.get_srcBuffer(segment, 0L); } + /// {@return `srcBuffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment srcBufferAt(long index) { return VkCopyBufferToImageInfo2.get_srcBuffer(this.segment(), index); } + /// {@return `srcBuffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment srcBuffer() { return VkCopyBufferToImageInfo2.get_srcBuffer(this.segment()); } + /// Sets `srcBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcBuffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_srcBuffer.set(segment, 0L, index, value); } + /// Sets `srcBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcBuffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_srcBuffer(segment, 0L, value); } + /// Sets `srcBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 srcBufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_srcBuffer(this.segment(), index, value); return this; } + /// Sets `srcBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 srcBuffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_srcBuffer(this.segment(), value); return this; } + + /// {@return `dstImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstImage.get(segment, 0L, index); } + /// {@return `dstImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment) { return VkCopyBufferToImageInfo2.get_dstImage(segment, 0L); } + /// {@return `dstImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment dstImageAt(long index) { return VkCopyBufferToImageInfo2.get_dstImage(this.segment(), index); } + /// {@return `dstImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment dstImage() { return VkCopyBufferToImageInfo2.get_dstImage(this.segment()); } + /// Sets `dstImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_dstImage.set(segment, 0L, index, value); } + /// Sets `dstImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_dstImage(segment, 0L, value); } + /// Sets `dstImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 dstImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_dstImage(this.segment(), index, value); return this; } + /// Sets `dstImage` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 dstImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_dstImage(this.segment(), value); return this; } + + /// {@return `dstImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment, long index) { return (int) VH_dstImageLayout.get(segment, 0L, index); } + /// {@return `dstImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment) { return VkCopyBufferToImageInfo2.get_dstImageLayout(segment, 0L); } + /// {@return `dstImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int dstImageLayoutAt(long index) { return VkCopyBufferToImageInfo2.get_dstImageLayout(this.segment(), index); } + /// {@return `dstImageLayout`} + public @CType("VkImageLayout") int dstImageLayout() { return VkCopyBufferToImageInfo2.get_dstImageLayout(this.segment()); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_dstImageLayout.set(segment, 0L, index, value); } + /// Sets `dstImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkCopyBufferToImageInfo2.set_dstImageLayout(segment, 0L, value); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 dstImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkCopyBufferToImageInfo2.set_dstImageLayout(this.segment(), index, value); return this; } + /// Sets `dstImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 dstImageLayout(@CType("VkImageLayout") int value) { VkCopyBufferToImageInfo2.set_dstImageLayout(this.segment(), value); return this; } + + /// {@return `regionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_regionCount(MemorySegment segment, long index) { return (int) VH_regionCount.get(segment, 0L, index); } + /// {@return `regionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_regionCount(MemorySegment segment) { return VkCopyBufferToImageInfo2.get_regionCount(segment, 0L); } + /// {@return `regionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int regionCountAt(long index) { return VkCopyBufferToImageInfo2.get_regionCount(this.segment(), index); } + /// {@return `regionCount`} + public @CType("uint32_t") int regionCount() { return VkCopyBufferToImageInfo2.get_regionCount(this.segment()); } + /// Sets `regionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_regionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_regionCount.set(segment, 0L, index, value); } + /// Sets `regionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_regionCount(MemorySegment segment, @CType("uint32_t") int value) { VkCopyBufferToImageInfo2.set_regionCount(segment, 0L, value); } + /// Sets `regionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 regionCountAt(long index, @CType("uint32_t") int value) { VkCopyBufferToImageInfo2.set_regionCount(this.segment(), index, value); return this; } + /// Sets `regionCount` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 regionCount(@CType("uint32_t") int value) { VkCopyBufferToImageInfo2.set_regionCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkCopyBufferToImageInfo2.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkCopyBufferToImageInfo2.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment pRegions() { return VkCopyBufferToImageInfo2.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 pRegionsAt(long index, @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkCopyBufferToImageInfo2 pRegions(@CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyBufferToImageInfo2.set_pRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyDescriptorSet.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyDescriptorSet.java new file mode 100644 index 00000000..83bc628d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyDescriptorSet.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcSet +/// [VarHandle][#VH_srcSet] - [Getter][#srcSet()] - [Setter][#srcSet(java.lang.foreign.MemorySegment)] +/// ### srcBinding +/// [VarHandle][#VH_srcBinding] - [Getter][#srcBinding()] - [Setter][#srcBinding(int)] +/// ### srcArrayElement +/// [VarHandle][#VH_srcArrayElement] - [Getter][#srcArrayElement()] - [Setter][#srcArrayElement(int)] +/// ### dstSet +/// [VarHandle][#VH_dstSet] - [Getter][#dstSet()] - [Setter][#dstSet(java.lang.foreign.MemorySegment)] +/// ### dstBinding +/// [VarHandle][#VH_dstBinding] - [Getter][#dstBinding()] - [Setter][#dstBinding(int)] +/// ### dstArrayElement +/// [VarHandle][#VH_dstArrayElement] - [Getter][#dstArrayElement()] - [Setter][#dstArrayElement(int)] +/// ### descriptorCount +/// [VarHandle][#VH_descriptorCount] - [Getter][#descriptorCount()] - [Setter][#descriptorCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyDescriptorSet { +/// VkStructureType sType; +/// const void * pNext; +/// VkDescriptorSet srcSet; +/// uint32_t srcBinding; +/// uint32_t srcArrayElement; +/// VkDescriptorSet dstSet; +/// uint32_t dstBinding; +/// uint32_t dstArrayElement; +/// uint32_t descriptorCount; +/// } VkCopyDescriptorSet; +/// ``` +public final class VkCopyDescriptorSet extends Struct { + /// The struct layout of `VkCopyDescriptorSet`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("srcSet"), + ValueLayout.JAVA_INT.withName("srcBinding"), + ValueLayout.JAVA_INT.withName("srcArrayElement"), + ValueLayout.ADDRESS.withName("dstSet"), + ValueLayout.JAVA_INT.withName("dstBinding"), + ValueLayout.JAVA_INT.withName("dstArrayElement"), + ValueLayout.JAVA_INT.withName("descriptorCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcSet` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcSet")); + /// The [VarHandle] of `srcBinding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcBinding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcBinding")); + /// The [VarHandle] of `srcArrayElement` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcArrayElement = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcArrayElement")); + /// The [VarHandle] of `dstSet` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstSet")); + /// The [VarHandle] of `dstBinding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstBinding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstBinding")); + /// The [VarHandle] of `dstArrayElement` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstArrayElement = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstArrayElement")); + /// The [VarHandle] of `descriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorCount")); + + /// Creates `VkCopyDescriptorSet` with the given segment. + /// @param segment the memory segment + public VkCopyDescriptorSet(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyDescriptorSet` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyDescriptorSet of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyDescriptorSet(segment); } + + /// Creates `VkCopyDescriptorSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyDescriptorSet ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyDescriptorSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyDescriptorSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyDescriptorSet ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyDescriptorSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyDescriptorSet` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyDescriptorSet` + public static VkCopyDescriptorSet alloc(SegmentAllocator allocator) { return new VkCopyDescriptorSet(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyDescriptorSet` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyDescriptorSet` + public static VkCopyDescriptorSet alloc(SegmentAllocator allocator, long count) { return new VkCopyDescriptorSet(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyDescriptorSet.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyDescriptorSet.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyDescriptorSet.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyDescriptorSet.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyDescriptorSet.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet sType(@CType("VkStructureType") int value) { VkCopyDescriptorSet.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyDescriptorSet.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyDescriptorSet.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyDescriptorSet.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyDescriptorSet.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyDescriptorSet.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyDescriptorSet.set_pNext(this.segment(), value); return this; } + + /// {@return `srcSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorSet") java.lang.foreign.MemorySegment get_srcSet(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcSet.get(segment, 0L, index); } + /// {@return `srcSet`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorSet") java.lang.foreign.MemorySegment get_srcSet(MemorySegment segment) { return VkCopyDescriptorSet.get_srcSet(segment, 0L); } + /// {@return `srcSet` at the given index} + /// @param index the index + public @CType("VkDescriptorSet") java.lang.foreign.MemorySegment srcSetAt(long index) { return VkCopyDescriptorSet.get_srcSet(this.segment(), index); } + /// {@return `srcSet`} + public @CType("VkDescriptorSet") java.lang.foreign.MemorySegment srcSet() { return VkCopyDescriptorSet.get_srcSet(this.segment()); } + /// Sets `srcSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcSet(MemorySegment segment, long index, @CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VH_srcSet.set(segment, 0L, index, value); } + /// Sets `srcSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcSet(MemorySegment segment, @CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VkCopyDescriptorSet.set_srcSet(segment, 0L, value); } + /// Sets `srcSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet srcSetAt(long index, @CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VkCopyDescriptorSet.set_srcSet(this.segment(), index, value); return this; } + /// Sets `srcSet` with the given value. + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet srcSet(@CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VkCopyDescriptorSet.set_srcSet(this.segment(), value); return this; } + + /// {@return `srcBinding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_srcBinding(MemorySegment segment, long index) { return (int) VH_srcBinding.get(segment, 0L, index); } + /// {@return `srcBinding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_srcBinding(MemorySegment segment) { return VkCopyDescriptorSet.get_srcBinding(segment, 0L); } + /// {@return `srcBinding` at the given index} + /// @param index the index + public @CType("uint32_t") int srcBindingAt(long index) { return VkCopyDescriptorSet.get_srcBinding(this.segment(), index); } + /// {@return `srcBinding`} + public @CType("uint32_t") int srcBinding() { return VkCopyDescriptorSet.get_srcBinding(this.segment()); } + /// Sets `srcBinding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcBinding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_srcBinding.set(segment, 0L, index, value); } + /// Sets `srcBinding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcBinding(MemorySegment segment, @CType("uint32_t") int value) { VkCopyDescriptorSet.set_srcBinding(segment, 0L, value); } + /// Sets `srcBinding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet srcBindingAt(long index, @CType("uint32_t") int value) { VkCopyDescriptorSet.set_srcBinding(this.segment(), index, value); return this; } + /// Sets `srcBinding` with the given value. + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet srcBinding(@CType("uint32_t") int value) { VkCopyDescriptorSet.set_srcBinding(this.segment(), value); return this; } + + /// {@return `srcArrayElement` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_srcArrayElement(MemorySegment segment, long index) { return (int) VH_srcArrayElement.get(segment, 0L, index); } + /// {@return `srcArrayElement`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_srcArrayElement(MemorySegment segment) { return VkCopyDescriptorSet.get_srcArrayElement(segment, 0L); } + /// {@return `srcArrayElement` at the given index} + /// @param index the index + public @CType("uint32_t") int srcArrayElementAt(long index) { return VkCopyDescriptorSet.get_srcArrayElement(this.segment(), index); } + /// {@return `srcArrayElement`} + public @CType("uint32_t") int srcArrayElement() { return VkCopyDescriptorSet.get_srcArrayElement(this.segment()); } + /// Sets `srcArrayElement` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcArrayElement(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_srcArrayElement.set(segment, 0L, index, value); } + /// Sets `srcArrayElement` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcArrayElement(MemorySegment segment, @CType("uint32_t") int value) { VkCopyDescriptorSet.set_srcArrayElement(segment, 0L, value); } + /// Sets `srcArrayElement` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet srcArrayElementAt(long index, @CType("uint32_t") int value) { VkCopyDescriptorSet.set_srcArrayElement(this.segment(), index, value); return this; } + /// Sets `srcArrayElement` with the given value. + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet srcArrayElement(@CType("uint32_t") int value) { VkCopyDescriptorSet.set_srcArrayElement(this.segment(), value); return this; } + + /// {@return `dstSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorSet") java.lang.foreign.MemorySegment get_dstSet(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstSet.get(segment, 0L, index); } + /// {@return `dstSet`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorSet") java.lang.foreign.MemorySegment get_dstSet(MemorySegment segment) { return VkCopyDescriptorSet.get_dstSet(segment, 0L); } + /// {@return `dstSet` at the given index} + /// @param index the index + public @CType("VkDescriptorSet") java.lang.foreign.MemorySegment dstSetAt(long index) { return VkCopyDescriptorSet.get_dstSet(this.segment(), index); } + /// {@return `dstSet`} + public @CType("VkDescriptorSet") java.lang.foreign.MemorySegment dstSet() { return VkCopyDescriptorSet.get_dstSet(this.segment()); } + /// Sets `dstSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstSet(MemorySegment segment, long index, @CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VH_dstSet.set(segment, 0L, index, value); } + /// Sets `dstSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstSet(MemorySegment segment, @CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VkCopyDescriptorSet.set_dstSet(segment, 0L, value); } + /// Sets `dstSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet dstSetAt(long index, @CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VkCopyDescriptorSet.set_dstSet(this.segment(), index, value); return this; } + /// Sets `dstSet` with the given value. + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet dstSet(@CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VkCopyDescriptorSet.set_dstSet(this.segment(), value); return this; } + + /// {@return `dstBinding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstBinding(MemorySegment segment, long index) { return (int) VH_dstBinding.get(segment, 0L, index); } + /// {@return `dstBinding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstBinding(MemorySegment segment) { return VkCopyDescriptorSet.get_dstBinding(segment, 0L); } + /// {@return `dstBinding` at the given index} + /// @param index the index + public @CType("uint32_t") int dstBindingAt(long index) { return VkCopyDescriptorSet.get_dstBinding(this.segment(), index); } + /// {@return `dstBinding`} + public @CType("uint32_t") int dstBinding() { return VkCopyDescriptorSet.get_dstBinding(this.segment()); } + /// Sets `dstBinding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstBinding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstBinding.set(segment, 0L, index, value); } + /// Sets `dstBinding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstBinding(MemorySegment segment, @CType("uint32_t") int value) { VkCopyDescriptorSet.set_dstBinding(segment, 0L, value); } + /// Sets `dstBinding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet dstBindingAt(long index, @CType("uint32_t") int value) { VkCopyDescriptorSet.set_dstBinding(this.segment(), index, value); return this; } + /// Sets `dstBinding` with the given value. + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet dstBinding(@CType("uint32_t") int value) { VkCopyDescriptorSet.set_dstBinding(this.segment(), value); return this; } + + /// {@return `dstArrayElement` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstArrayElement(MemorySegment segment, long index) { return (int) VH_dstArrayElement.get(segment, 0L, index); } + /// {@return `dstArrayElement`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstArrayElement(MemorySegment segment) { return VkCopyDescriptorSet.get_dstArrayElement(segment, 0L); } + /// {@return `dstArrayElement` at the given index} + /// @param index the index + public @CType("uint32_t") int dstArrayElementAt(long index) { return VkCopyDescriptorSet.get_dstArrayElement(this.segment(), index); } + /// {@return `dstArrayElement`} + public @CType("uint32_t") int dstArrayElement() { return VkCopyDescriptorSet.get_dstArrayElement(this.segment()); } + /// Sets `dstArrayElement` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstArrayElement(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstArrayElement.set(segment, 0L, index, value); } + /// Sets `dstArrayElement` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstArrayElement(MemorySegment segment, @CType("uint32_t") int value) { VkCopyDescriptorSet.set_dstArrayElement(segment, 0L, value); } + /// Sets `dstArrayElement` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet dstArrayElementAt(long index, @CType("uint32_t") int value) { VkCopyDescriptorSet.set_dstArrayElement(this.segment(), index, value); return this; } + /// Sets `dstArrayElement` with the given value. + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet dstArrayElement(@CType("uint32_t") int value) { VkCopyDescriptorSet.set_dstArrayElement(this.segment(), value); return this; } + + /// {@return `descriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorCount(MemorySegment segment, long index) { return (int) VH_descriptorCount.get(segment, 0L, index); } + /// {@return `descriptorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorCount(MemorySegment segment) { return VkCopyDescriptorSet.get_descriptorCount(segment, 0L); } + /// {@return `descriptorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorCountAt(long index) { return VkCopyDescriptorSet.get_descriptorCount(this.segment(), index); } + /// {@return `descriptorCount`} + public @CType("uint32_t") int descriptorCount() { return VkCopyDescriptorSet.get_descriptorCount(this.segment()); } + /// Sets `descriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorCount.set(segment, 0L, index, value); } + /// Sets `descriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorCount(MemorySegment segment, @CType("uint32_t") int value) { VkCopyDescriptorSet.set_descriptorCount(segment, 0L, value); } + /// Sets `descriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet descriptorCountAt(long index, @CType("uint32_t") int value) { VkCopyDescriptorSet.set_descriptorCount(this.segment(), index, value); return this; } + /// Sets `descriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkCopyDescriptorSet descriptorCount(@CType("uint32_t") int value) { VkCopyDescriptorSet.set_descriptorCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageInfo2.java new file mode 100644 index 00000000..ceb66650 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageInfo2.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcImage +/// [VarHandle][#VH_srcImage] - [Getter][#srcImage()] - [Setter][#srcImage(java.lang.foreign.MemorySegment)] +/// ### srcImageLayout +/// [VarHandle][#VH_srcImageLayout] - [Getter][#srcImageLayout()] - [Setter][#srcImageLayout(int)] +/// ### dstImage +/// [VarHandle][#VH_dstImage] - [Getter][#dstImage()] - [Setter][#dstImage(java.lang.foreign.MemorySegment)] +/// ### dstImageLayout +/// [VarHandle][#VH_dstImageLayout] - [Getter][#dstImageLayout()] - [Setter][#dstImageLayout(int)] +/// ### regionCount +/// [VarHandle][#VH_regionCount] - [Getter][#regionCount()] - [Setter][#regionCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyImageInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage srcImage; +/// VkImageLayout srcImageLayout; +/// VkImage dstImage; +/// VkImageLayout dstImageLayout; +/// uint32_t regionCount; +/// const VkImageCopy2 * pRegions; +/// } VkCopyImageInfo2; +/// ``` +public final class VkCopyImageInfo2 extends Struct { + /// The struct layout of `VkCopyImageInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("srcImage"), + ValueLayout.JAVA_INT.withName("srcImageLayout"), + ValueLayout.ADDRESS.withName("dstImage"), + ValueLayout.JAVA_INT.withName("dstImageLayout"), + ValueLayout.JAVA_INT.withName("regionCount"), + ValueLayout.ADDRESS.withName("pRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImage")); + /// The [VarHandle] of `srcImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImageLayout")); + /// The [VarHandle] of `dstImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImage")); + /// The [VarHandle] of `dstImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImageLayout")); + /// The [VarHandle] of `regionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_regionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("regionCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + + /// Creates `VkCopyImageInfo2` with the given segment. + /// @param segment the memory segment + public VkCopyImageInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyImageInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageInfo2(segment); } + + /// Creates `VkCopyImageInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyImageInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyImageInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyImageInfo2` + public static VkCopyImageInfo2 alloc(SegmentAllocator allocator) { return new VkCopyImageInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyImageInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyImageInfo2` + public static VkCopyImageInfo2 alloc(SegmentAllocator allocator, long count) { return new VkCopyImageInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyImageInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyImageInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyImageInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyImageInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyImageInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 sType(@CType("VkStructureType") int value) { VkCopyImageInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyImageInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyImageInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyImageInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcImage.get(segment, 0L, index); } + /// {@return `srcImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment) { return VkCopyImageInfo2.get_srcImage(segment, 0L); } + /// {@return `srcImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment srcImageAt(long index) { return VkCopyImageInfo2.get_srcImage(this.segment(), index); } + /// {@return `srcImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment srcImage() { return VkCopyImageInfo2.get_srcImage(this.segment()); } + /// Sets `srcImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_srcImage.set(segment, 0L, index, value); } + /// Sets `srcImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_srcImage(segment, 0L, value); } + /// Sets `srcImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 srcImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_srcImage(this.segment(), index, value); return this; } + /// Sets `srcImage` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 srcImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_srcImage(this.segment(), value); return this; } + + /// {@return `srcImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment, long index) { return (int) VH_srcImageLayout.get(segment, 0L, index); } + /// {@return `srcImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment) { return VkCopyImageInfo2.get_srcImageLayout(segment, 0L); } + /// {@return `srcImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int srcImageLayoutAt(long index) { return VkCopyImageInfo2.get_srcImageLayout(this.segment(), index); } + /// {@return `srcImageLayout`} + public @CType("VkImageLayout") int srcImageLayout() { return VkCopyImageInfo2.get_srcImageLayout(this.segment()); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_srcImageLayout.set(segment, 0L, index, value); } + /// Sets `srcImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkCopyImageInfo2.set_srcImageLayout(segment, 0L, value); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 srcImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkCopyImageInfo2.set_srcImageLayout(this.segment(), index, value); return this; } + /// Sets `srcImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 srcImageLayout(@CType("VkImageLayout") int value) { VkCopyImageInfo2.set_srcImageLayout(this.segment(), value); return this; } + + /// {@return `dstImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstImage.get(segment, 0L, index); } + /// {@return `dstImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment) { return VkCopyImageInfo2.get_dstImage(segment, 0L); } + /// {@return `dstImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment dstImageAt(long index) { return VkCopyImageInfo2.get_dstImage(this.segment(), index); } + /// {@return `dstImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment dstImage() { return VkCopyImageInfo2.get_dstImage(this.segment()); } + /// Sets `dstImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_dstImage.set(segment, 0L, index, value); } + /// Sets `dstImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_dstImage(segment, 0L, value); } + /// Sets `dstImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 dstImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_dstImage(this.segment(), index, value); return this; } + /// Sets `dstImage` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 dstImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_dstImage(this.segment(), value); return this; } + + /// {@return `dstImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment, long index) { return (int) VH_dstImageLayout.get(segment, 0L, index); } + /// {@return `dstImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment) { return VkCopyImageInfo2.get_dstImageLayout(segment, 0L); } + /// {@return `dstImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int dstImageLayoutAt(long index) { return VkCopyImageInfo2.get_dstImageLayout(this.segment(), index); } + /// {@return `dstImageLayout`} + public @CType("VkImageLayout") int dstImageLayout() { return VkCopyImageInfo2.get_dstImageLayout(this.segment()); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_dstImageLayout.set(segment, 0L, index, value); } + /// Sets `dstImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkCopyImageInfo2.set_dstImageLayout(segment, 0L, value); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 dstImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkCopyImageInfo2.set_dstImageLayout(this.segment(), index, value); return this; } + /// Sets `dstImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 dstImageLayout(@CType("VkImageLayout") int value) { VkCopyImageInfo2.set_dstImageLayout(this.segment(), value); return this; } + + /// {@return `regionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_regionCount(MemorySegment segment, long index) { return (int) VH_regionCount.get(segment, 0L, index); } + /// {@return `regionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_regionCount(MemorySegment segment) { return VkCopyImageInfo2.get_regionCount(segment, 0L); } + /// {@return `regionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int regionCountAt(long index) { return VkCopyImageInfo2.get_regionCount(this.segment(), index); } + /// {@return `regionCount`} + public @CType("uint32_t") int regionCount() { return VkCopyImageInfo2.get_regionCount(this.segment()); } + /// Sets `regionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_regionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_regionCount.set(segment, 0L, index, value); } + /// Sets `regionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_regionCount(MemorySegment segment, @CType("uint32_t") int value) { VkCopyImageInfo2.set_regionCount(segment, 0L, value); } + /// Sets `regionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 regionCountAt(long index, @CType("uint32_t") int value) { VkCopyImageInfo2.set_regionCount(this.segment(), index, value); return this; } + /// Sets `regionCount` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 regionCount(@CType("uint32_t") int value) { VkCopyImageInfo2.set_regionCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkCopyImageInfo2.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkCopyImageInfo2.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment pRegions() { return VkCopyImageInfo2.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 pRegionsAt(long index, @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageInfo2 pRegions(@CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyImageInfo2.set_pRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageToBufferInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageToBufferInfo2.java new file mode 100644 index 00000000..0204ab42 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageToBufferInfo2.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcImage +/// [VarHandle][#VH_srcImage] - [Getter][#srcImage()] - [Setter][#srcImage(java.lang.foreign.MemorySegment)] +/// ### srcImageLayout +/// [VarHandle][#VH_srcImageLayout] - [Getter][#srcImageLayout()] - [Setter][#srcImageLayout(int)] +/// ### dstBuffer +/// [VarHandle][#VH_dstBuffer] - [Getter][#dstBuffer()] - [Setter][#dstBuffer(java.lang.foreign.MemorySegment)] +/// ### regionCount +/// [VarHandle][#VH_regionCount] - [Getter][#regionCount()] - [Setter][#regionCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyImageToBufferInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage srcImage; +/// VkImageLayout srcImageLayout; +/// VkBuffer dstBuffer; +/// uint32_t regionCount; +/// const VkBufferImageCopy2 * pRegions; +/// } VkCopyImageToBufferInfo2; +/// ``` +public final class VkCopyImageToBufferInfo2 extends Struct { + /// The struct layout of `VkCopyImageToBufferInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("srcImage"), + ValueLayout.JAVA_INT.withName("srcImageLayout"), + ValueLayout.ADDRESS.withName("dstBuffer"), + ValueLayout.JAVA_INT.withName("regionCount"), + ValueLayout.ADDRESS.withName("pRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImage")); + /// The [VarHandle] of `srcImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImageLayout")); + /// The [VarHandle] of `dstBuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstBuffer")); + /// The [VarHandle] of `regionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_regionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("regionCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + + /// Creates `VkCopyImageToBufferInfo2` with the given segment. + /// @param segment the memory segment + public VkCopyImageToBufferInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyImageToBufferInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageToBufferInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageToBufferInfo2(segment); } + + /// Creates `VkCopyImageToBufferInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageToBufferInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageToBufferInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyImageToBufferInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageToBufferInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageToBufferInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyImageToBufferInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyImageToBufferInfo2` + public static VkCopyImageToBufferInfo2 alloc(SegmentAllocator allocator) { return new VkCopyImageToBufferInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyImageToBufferInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyImageToBufferInfo2` + public static VkCopyImageToBufferInfo2 alloc(SegmentAllocator allocator, long count) { return new VkCopyImageToBufferInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyImageToBufferInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyImageToBufferInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyImageToBufferInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyImageToBufferInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyImageToBufferInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 sType(@CType("VkStructureType") int value) { VkCopyImageToBufferInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyImageToBufferInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyImageToBufferInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyImageToBufferInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcImage.get(segment, 0L, index); } + /// {@return `srcImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment) { return VkCopyImageToBufferInfo2.get_srcImage(segment, 0L); } + /// {@return `srcImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment srcImageAt(long index) { return VkCopyImageToBufferInfo2.get_srcImage(this.segment(), index); } + /// {@return `srcImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment srcImage() { return VkCopyImageToBufferInfo2.get_srcImage(this.segment()); } + /// Sets `srcImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_srcImage.set(segment, 0L, index, value); } + /// Sets `srcImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_srcImage(segment, 0L, value); } + /// Sets `srcImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 srcImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_srcImage(this.segment(), index, value); return this; } + /// Sets `srcImage` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 srcImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_srcImage(this.segment(), value); return this; } + + /// {@return `srcImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment, long index) { return (int) VH_srcImageLayout.get(segment, 0L, index); } + /// {@return `srcImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment) { return VkCopyImageToBufferInfo2.get_srcImageLayout(segment, 0L); } + /// {@return `srcImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int srcImageLayoutAt(long index) { return VkCopyImageToBufferInfo2.get_srcImageLayout(this.segment(), index); } + /// {@return `srcImageLayout`} + public @CType("VkImageLayout") int srcImageLayout() { return VkCopyImageToBufferInfo2.get_srcImageLayout(this.segment()); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_srcImageLayout.set(segment, 0L, index, value); } + /// Sets `srcImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkCopyImageToBufferInfo2.set_srcImageLayout(segment, 0L, value); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 srcImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkCopyImageToBufferInfo2.set_srcImageLayout(this.segment(), index, value); return this; } + /// Sets `srcImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 srcImageLayout(@CType("VkImageLayout") int value) { VkCopyImageToBufferInfo2.set_srcImageLayout(this.segment(), value); return this; } + + /// {@return `dstBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_dstBuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstBuffer.get(segment, 0L, index); } + /// {@return `dstBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_dstBuffer(MemorySegment segment) { return VkCopyImageToBufferInfo2.get_dstBuffer(segment, 0L); } + /// {@return `dstBuffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment dstBufferAt(long index) { return VkCopyImageToBufferInfo2.get_dstBuffer(this.segment(), index); } + /// {@return `dstBuffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment dstBuffer() { return VkCopyImageToBufferInfo2.get_dstBuffer(this.segment()); } + /// Sets `dstBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstBuffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_dstBuffer.set(segment, 0L, index, value); } + /// Sets `dstBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstBuffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_dstBuffer(segment, 0L, value); } + /// Sets `dstBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 dstBufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_dstBuffer(this.segment(), index, value); return this; } + /// Sets `dstBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 dstBuffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_dstBuffer(this.segment(), value); return this; } + + /// {@return `regionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_regionCount(MemorySegment segment, long index) { return (int) VH_regionCount.get(segment, 0L, index); } + /// {@return `regionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_regionCount(MemorySegment segment) { return VkCopyImageToBufferInfo2.get_regionCount(segment, 0L); } + /// {@return `regionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int regionCountAt(long index) { return VkCopyImageToBufferInfo2.get_regionCount(this.segment(), index); } + /// {@return `regionCount`} + public @CType("uint32_t") int regionCount() { return VkCopyImageToBufferInfo2.get_regionCount(this.segment()); } + /// Sets `regionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_regionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_regionCount.set(segment, 0L, index, value); } + /// Sets `regionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_regionCount(MemorySegment segment, @CType("uint32_t") int value) { VkCopyImageToBufferInfo2.set_regionCount(segment, 0L, value); } + /// Sets `regionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 regionCountAt(long index, @CType("uint32_t") int value) { VkCopyImageToBufferInfo2.set_regionCount(this.segment(), index, value); return this; } + /// Sets `regionCount` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 regionCount(@CType("uint32_t") int value) { VkCopyImageToBufferInfo2.set_regionCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkCopyImageToBufferInfo2.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkCopyImageToBufferInfo2.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment pRegions() { return VkCopyImageToBufferInfo2.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 pRegionsAt(long index, @CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToBufferInfo2 pRegions(@CType("const VkBufferImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyImageToBufferInfo2.set_pRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageToImageInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageToImageInfo.java new file mode 100644 index 00000000..cf0c8cd9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageToImageInfo.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### srcImage +/// [VarHandle][#VH_srcImage] - [Getter][#srcImage()] - [Setter][#srcImage(java.lang.foreign.MemorySegment)] +/// ### srcImageLayout +/// [VarHandle][#VH_srcImageLayout] - [Getter][#srcImageLayout()] - [Setter][#srcImageLayout(int)] +/// ### dstImage +/// [VarHandle][#VH_dstImage] - [Getter][#dstImage()] - [Setter][#dstImage(java.lang.foreign.MemorySegment)] +/// ### dstImageLayout +/// [VarHandle][#VH_dstImageLayout] - [Getter][#dstImageLayout()] - [Setter][#dstImageLayout(int)] +/// ### regionCount +/// [VarHandle][#VH_regionCount] - [Getter][#regionCount()] - [Setter][#regionCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyImageToImageInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkHostImageCopyFlags flags; +/// VkImage srcImage; +/// VkImageLayout srcImageLayout; +/// VkImage dstImage; +/// VkImageLayout dstImageLayout; +/// uint32_t regionCount; +/// const VkImageCopy2 * pRegions; +/// } VkCopyImageToImageInfo; +/// ``` +public final class VkCopyImageToImageInfo extends Struct { + /// The struct layout of `VkCopyImageToImageInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("srcImage"), + ValueLayout.JAVA_INT.withName("srcImageLayout"), + ValueLayout.ADDRESS.withName("dstImage"), + ValueLayout.JAVA_INT.withName("dstImageLayout"), + ValueLayout.JAVA_INT.withName("regionCount"), + ValueLayout.ADDRESS.withName("pRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `srcImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImage")); + /// The [VarHandle] of `srcImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImageLayout")); + /// The [VarHandle] of `dstImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImage")); + /// The [VarHandle] of `dstImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImageLayout")); + /// The [VarHandle] of `regionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_regionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("regionCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + + /// Creates `VkCopyImageToImageInfo` with the given segment. + /// @param segment the memory segment + public VkCopyImageToImageInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyImageToImageInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageToImageInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageToImageInfo(segment); } + + /// Creates `VkCopyImageToImageInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageToImageInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageToImageInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyImageToImageInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageToImageInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageToImageInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyImageToImageInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyImageToImageInfo` + public static VkCopyImageToImageInfo alloc(SegmentAllocator allocator) { return new VkCopyImageToImageInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyImageToImageInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyImageToImageInfo` + public static VkCopyImageToImageInfo alloc(SegmentAllocator allocator, long count) { return new VkCopyImageToImageInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyImageToImageInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyImageToImageInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyImageToImageInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyImageToImageInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyImageToImageInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo sType(@CType("VkStructureType") int value) { VkCopyImageToImageInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyImageToImageInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyImageToImageInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyImageToImageInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkHostImageCopyFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkHostImageCopyFlags") int get_flags(MemorySegment segment) { return VkCopyImageToImageInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkHostImageCopyFlags") int flagsAt(long index) { return VkCopyImageToImageInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkHostImageCopyFlags") int flags() { return VkCopyImageToImageInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkHostImageCopyFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkHostImageCopyFlags") int value) { VkCopyImageToImageInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo flagsAt(long index, @CType("VkHostImageCopyFlags") int value) { VkCopyImageToImageInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo flags(@CType("VkHostImageCopyFlags") int value) { VkCopyImageToImageInfo.set_flags(this.segment(), value); return this; } + + /// {@return `srcImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcImage.get(segment, 0L, index); } + /// {@return `srcImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment) { return VkCopyImageToImageInfo.get_srcImage(segment, 0L); } + /// {@return `srcImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment srcImageAt(long index) { return VkCopyImageToImageInfo.get_srcImage(this.segment(), index); } + /// {@return `srcImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment srcImage() { return VkCopyImageToImageInfo.get_srcImage(this.segment()); } + /// Sets `srcImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_srcImage.set(segment, 0L, index, value); } + /// Sets `srcImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_srcImage(segment, 0L, value); } + /// Sets `srcImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo srcImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_srcImage(this.segment(), index, value); return this; } + /// Sets `srcImage` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo srcImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_srcImage(this.segment(), value); return this; } + + /// {@return `srcImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment, long index) { return (int) VH_srcImageLayout.get(segment, 0L, index); } + /// {@return `srcImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment) { return VkCopyImageToImageInfo.get_srcImageLayout(segment, 0L); } + /// {@return `srcImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int srcImageLayoutAt(long index) { return VkCopyImageToImageInfo.get_srcImageLayout(this.segment(), index); } + /// {@return `srcImageLayout`} + public @CType("VkImageLayout") int srcImageLayout() { return VkCopyImageToImageInfo.get_srcImageLayout(this.segment()); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_srcImageLayout.set(segment, 0L, index, value); } + /// Sets `srcImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkCopyImageToImageInfo.set_srcImageLayout(segment, 0L, value); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo srcImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkCopyImageToImageInfo.set_srcImageLayout(this.segment(), index, value); return this; } + /// Sets `srcImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo srcImageLayout(@CType("VkImageLayout") int value) { VkCopyImageToImageInfo.set_srcImageLayout(this.segment(), value); return this; } + + /// {@return `dstImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstImage.get(segment, 0L, index); } + /// {@return `dstImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment) { return VkCopyImageToImageInfo.get_dstImage(segment, 0L); } + /// {@return `dstImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment dstImageAt(long index) { return VkCopyImageToImageInfo.get_dstImage(this.segment(), index); } + /// {@return `dstImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment dstImage() { return VkCopyImageToImageInfo.get_dstImage(this.segment()); } + /// Sets `dstImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_dstImage.set(segment, 0L, index, value); } + /// Sets `dstImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_dstImage(segment, 0L, value); } + /// Sets `dstImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo dstImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_dstImage(this.segment(), index, value); return this; } + /// Sets `dstImage` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo dstImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_dstImage(this.segment(), value); return this; } + + /// {@return `dstImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment, long index) { return (int) VH_dstImageLayout.get(segment, 0L, index); } + /// {@return `dstImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment) { return VkCopyImageToImageInfo.get_dstImageLayout(segment, 0L); } + /// {@return `dstImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int dstImageLayoutAt(long index) { return VkCopyImageToImageInfo.get_dstImageLayout(this.segment(), index); } + /// {@return `dstImageLayout`} + public @CType("VkImageLayout") int dstImageLayout() { return VkCopyImageToImageInfo.get_dstImageLayout(this.segment()); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_dstImageLayout.set(segment, 0L, index, value); } + /// Sets `dstImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkCopyImageToImageInfo.set_dstImageLayout(segment, 0L, value); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo dstImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkCopyImageToImageInfo.set_dstImageLayout(this.segment(), index, value); return this; } + /// Sets `dstImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo dstImageLayout(@CType("VkImageLayout") int value) { VkCopyImageToImageInfo.set_dstImageLayout(this.segment(), value); return this; } + + /// {@return `regionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_regionCount(MemorySegment segment, long index) { return (int) VH_regionCount.get(segment, 0L, index); } + /// {@return `regionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_regionCount(MemorySegment segment) { return VkCopyImageToImageInfo.get_regionCount(segment, 0L); } + /// {@return `regionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int regionCountAt(long index) { return VkCopyImageToImageInfo.get_regionCount(this.segment(), index); } + /// {@return `regionCount`} + public @CType("uint32_t") int regionCount() { return VkCopyImageToImageInfo.get_regionCount(this.segment()); } + /// Sets `regionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_regionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_regionCount.set(segment, 0L, index, value); } + /// Sets `regionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_regionCount(MemorySegment segment, @CType("uint32_t") int value) { VkCopyImageToImageInfo.set_regionCount(segment, 0L, value); } + /// Sets `regionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo regionCountAt(long index, @CType("uint32_t") int value) { VkCopyImageToImageInfo.set_regionCount(this.segment(), index, value); return this; } + /// Sets `regionCount` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo regionCount(@CType("uint32_t") int value) { VkCopyImageToImageInfo.set_regionCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkCopyImageToImageInfo.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkCopyImageToImageInfo.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment pRegions() { return VkCopyImageToImageInfo.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo pRegionsAt(long index, @CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToImageInfo pRegions(@CType("const VkImageCopy2 *") java.lang.foreign.MemorySegment value) { VkCopyImageToImageInfo.set_pRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageToMemoryInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageToMemoryInfo.java new file mode 100644 index 00000000..54ab0bff --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyImageToMemoryInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### srcImage +/// [VarHandle][#VH_srcImage] - [Getter][#srcImage()] - [Setter][#srcImage(java.lang.foreign.MemorySegment)] +/// ### srcImageLayout +/// [VarHandle][#VH_srcImageLayout] - [Getter][#srcImageLayout()] - [Setter][#srcImageLayout(int)] +/// ### regionCount +/// [VarHandle][#VH_regionCount] - [Getter][#regionCount()] - [Setter][#regionCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyImageToMemoryInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkHostImageCopyFlags flags; +/// VkImage srcImage; +/// VkImageLayout srcImageLayout; +/// uint32_t regionCount; +/// const VkImageToMemoryCopy * pRegions; +/// } VkCopyImageToMemoryInfo; +/// ``` +public final class VkCopyImageToMemoryInfo extends Struct { + /// The struct layout of `VkCopyImageToMemoryInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("srcImage"), + ValueLayout.JAVA_INT.withName("srcImageLayout"), + ValueLayout.JAVA_INT.withName("regionCount"), + ValueLayout.ADDRESS.withName("pRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `srcImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImage")); + /// The [VarHandle] of `srcImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImageLayout")); + /// The [VarHandle] of `regionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_regionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("regionCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + + /// Creates `VkCopyImageToMemoryInfo` with the given segment. + /// @param segment the memory segment + public VkCopyImageToMemoryInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyImageToMemoryInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageToMemoryInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageToMemoryInfo(segment); } + + /// Creates `VkCopyImageToMemoryInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageToMemoryInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageToMemoryInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyImageToMemoryInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyImageToMemoryInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyImageToMemoryInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyImageToMemoryInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyImageToMemoryInfo` + public static VkCopyImageToMemoryInfo alloc(SegmentAllocator allocator) { return new VkCopyImageToMemoryInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyImageToMemoryInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyImageToMemoryInfo` + public static VkCopyImageToMemoryInfo alloc(SegmentAllocator allocator, long count) { return new VkCopyImageToMemoryInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyImageToMemoryInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyImageToMemoryInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyImageToMemoryInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyImageToMemoryInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyImageToMemoryInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo sType(@CType("VkStructureType") int value) { VkCopyImageToMemoryInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyImageToMemoryInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyImageToMemoryInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyImageToMemoryInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageToMemoryInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageToMemoryInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyImageToMemoryInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkHostImageCopyFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkHostImageCopyFlags") int get_flags(MemorySegment segment) { return VkCopyImageToMemoryInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkHostImageCopyFlags") int flagsAt(long index) { return VkCopyImageToMemoryInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkHostImageCopyFlags") int flags() { return VkCopyImageToMemoryInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkHostImageCopyFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkHostImageCopyFlags") int value) { VkCopyImageToMemoryInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo flagsAt(long index, @CType("VkHostImageCopyFlags") int value) { VkCopyImageToMemoryInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo flags(@CType("VkHostImageCopyFlags") int value) { VkCopyImageToMemoryInfo.set_flags(this.segment(), value); return this; } + + /// {@return `srcImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcImage.get(segment, 0L, index); } + /// {@return `srcImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment) { return VkCopyImageToMemoryInfo.get_srcImage(segment, 0L); } + /// {@return `srcImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment srcImageAt(long index) { return VkCopyImageToMemoryInfo.get_srcImage(this.segment(), index); } + /// {@return `srcImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment srcImage() { return VkCopyImageToMemoryInfo.get_srcImage(this.segment()); } + /// Sets `srcImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_srcImage.set(segment, 0L, index, value); } + /// Sets `srcImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToMemoryInfo.set_srcImage(segment, 0L, value); } + /// Sets `srcImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo srcImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToMemoryInfo.set_srcImage(this.segment(), index, value); return this; } + /// Sets `srcImage` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo srcImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyImageToMemoryInfo.set_srcImage(this.segment(), value); return this; } + + /// {@return `srcImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment, long index) { return (int) VH_srcImageLayout.get(segment, 0L, index); } + /// {@return `srcImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment) { return VkCopyImageToMemoryInfo.get_srcImageLayout(segment, 0L); } + /// {@return `srcImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int srcImageLayoutAt(long index) { return VkCopyImageToMemoryInfo.get_srcImageLayout(this.segment(), index); } + /// {@return `srcImageLayout`} + public @CType("VkImageLayout") int srcImageLayout() { return VkCopyImageToMemoryInfo.get_srcImageLayout(this.segment()); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_srcImageLayout.set(segment, 0L, index, value); } + /// Sets `srcImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkCopyImageToMemoryInfo.set_srcImageLayout(segment, 0L, value); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo srcImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkCopyImageToMemoryInfo.set_srcImageLayout(this.segment(), index, value); return this; } + /// Sets `srcImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo srcImageLayout(@CType("VkImageLayout") int value) { VkCopyImageToMemoryInfo.set_srcImageLayout(this.segment(), value); return this; } + + /// {@return `regionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_regionCount(MemorySegment segment, long index) { return (int) VH_regionCount.get(segment, 0L, index); } + /// {@return `regionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_regionCount(MemorySegment segment) { return VkCopyImageToMemoryInfo.get_regionCount(segment, 0L); } + /// {@return `regionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int regionCountAt(long index) { return VkCopyImageToMemoryInfo.get_regionCount(this.segment(), index); } + /// {@return `regionCount`} + public @CType("uint32_t") int regionCount() { return VkCopyImageToMemoryInfo.get_regionCount(this.segment()); } + /// Sets `regionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_regionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_regionCount.set(segment, 0L, index, value); } + /// Sets `regionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_regionCount(MemorySegment segment, @CType("uint32_t") int value) { VkCopyImageToMemoryInfo.set_regionCount(segment, 0L, value); } + /// Sets `regionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo regionCountAt(long index, @CType("uint32_t") int value) { VkCopyImageToMemoryInfo.set_regionCount(this.segment(), index, value); return this; } + /// Sets `regionCount` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo regionCount(@CType("uint32_t") int value) { VkCopyImageToMemoryInfo.set_regionCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageToMemoryCopy *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkImageToMemoryCopy *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkCopyImageToMemoryInfo.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkImageToMemoryCopy *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkCopyImageToMemoryInfo.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkImageToMemoryCopy *") java.lang.foreign.MemorySegment pRegions() { return VkCopyImageToMemoryInfo.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkImageToMemoryCopy *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkImageToMemoryCopy *") java.lang.foreign.MemorySegment value) { VkCopyImageToMemoryInfo.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo pRegionsAt(long index, @CType("const VkImageToMemoryCopy *") java.lang.foreign.MemorySegment value) { VkCopyImageToMemoryInfo.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkCopyImageToMemoryInfo pRegions(@CType("const VkImageToMemoryCopy *") java.lang.foreign.MemorySegment value) { VkCopyImageToMemoryInfo.set_pRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyMemoryToImageInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyMemoryToImageInfo.java new file mode 100644 index 00000000..0a5703f7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkCopyMemoryToImageInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### dstImage +/// [VarHandle][#VH_dstImage] - [Getter][#dstImage()] - [Setter][#dstImage(java.lang.foreign.MemorySegment)] +/// ### dstImageLayout +/// [VarHandle][#VH_dstImageLayout] - [Getter][#dstImageLayout()] - [Setter][#dstImageLayout(int)] +/// ### regionCount +/// [VarHandle][#VH_regionCount] - [Getter][#regionCount()] - [Setter][#regionCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkCopyMemoryToImageInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkHostImageCopyFlags flags; +/// VkImage dstImage; +/// VkImageLayout dstImageLayout; +/// uint32_t regionCount; +/// const VkMemoryToImageCopy * pRegions; +/// } VkCopyMemoryToImageInfo; +/// ``` +public final class VkCopyMemoryToImageInfo extends Struct { + /// The struct layout of `VkCopyMemoryToImageInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("dstImage"), + ValueLayout.JAVA_INT.withName("dstImageLayout"), + ValueLayout.JAVA_INT.withName("regionCount"), + ValueLayout.ADDRESS.withName("pRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `dstImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImage")); + /// The [VarHandle] of `dstImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImageLayout")); + /// The [VarHandle] of `regionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_regionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("regionCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + + /// Creates `VkCopyMemoryToImageInfo` with the given segment. + /// @param segment the memory segment + public VkCopyMemoryToImageInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkCopyMemoryToImageInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToImageInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToImageInfo(segment); } + + /// Creates `VkCopyMemoryToImageInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToImageInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToImageInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkCopyMemoryToImageInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkCopyMemoryToImageInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkCopyMemoryToImageInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkCopyMemoryToImageInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkCopyMemoryToImageInfo` + public static VkCopyMemoryToImageInfo alloc(SegmentAllocator allocator) { return new VkCopyMemoryToImageInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkCopyMemoryToImageInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkCopyMemoryToImageInfo` + public static VkCopyMemoryToImageInfo alloc(SegmentAllocator allocator, long count) { return new VkCopyMemoryToImageInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkCopyMemoryToImageInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkCopyMemoryToImageInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkCopyMemoryToImageInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkCopyMemoryToImageInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkCopyMemoryToImageInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo sType(@CType("VkStructureType") int value) { VkCopyMemoryToImageInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkCopyMemoryToImageInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkCopyMemoryToImageInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkCopyMemoryToImageInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkHostImageCopyFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkHostImageCopyFlags") int get_flags(MemorySegment segment) { return VkCopyMemoryToImageInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkHostImageCopyFlags") int flagsAt(long index) { return VkCopyMemoryToImageInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkHostImageCopyFlags") int flags() { return VkCopyMemoryToImageInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkHostImageCopyFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkHostImageCopyFlags") int value) { VkCopyMemoryToImageInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo flagsAt(long index, @CType("VkHostImageCopyFlags") int value) { VkCopyMemoryToImageInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo flags(@CType("VkHostImageCopyFlags") int value) { VkCopyMemoryToImageInfo.set_flags(this.segment(), value); return this; } + + /// {@return `dstImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstImage.get(segment, 0L, index); } + /// {@return `dstImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment) { return VkCopyMemoryToImageInfo.get_dstImage(segment, 0L); } + /// {@return `dstImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment dstImageAt(long index) { return VkCopyMemoryToImageInfo.get_dstImage(this.segment(), index); } + /// {@return `dstImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment dstImage() { return VkCopyMemoryToImageInfo.get_dstImage(this.segment()); } + /// Sets `dstImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_dstImage.set(segment, 0L, index, value); } + /// Sets `dstImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageInfo.set_dstImage(segment, 0L, value); } + /// Sets `dstImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo dstImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageInfo.set_dstImage(this.segment(), index, value); return this; } + /// Sets `dstImage` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo dstImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageInfo.set_dstImage(this.segment(), value); return this; } + + /// {@return `dstImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment, long index) { return (int) VH_dstImageLayout.get(segment, 0L, index); } + /// {@return `dstImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment) { return VkCopyMemoryToImageInfo.get_dstImageLayout(segment, 0L); } + /// {@return `dstImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int dstImageLayoutAt(long index) { return VkCopyMemoryToImageInfo.get_dstImageLayout(this.segment(), index); } + /// {@return `dstImageLayout`} + public @CType("VkImageLayout") int dstImageLayout() { return VkCopyMemoryToImageInfo.get_dstImageLayout(this.segment()); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_dstImageLayout.set(segment, 0L, index, value); } + /// Sets `dstImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkCopyMemoryToImageInfo.set_dstImageLayout(segment, 0L, value); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo dstImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkCopyMemoryToImageInfo.set_dstImageLayout(this.segment(), index, value); return this; } + /// Sets `dstImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo dstImageLayout(@CType("VkImageLayout") int value) { VkCopyMemoryToImageInfo.set_dstImageLayout(this.segment(), value); return this; } + + /// {@return `regionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_regionCount(MemorySegment segment, long index) { return (int) VH_regionCount.get(segment, 0L, index); } + /// {@return `regionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_regionCount(MemorySegment segment) { return VkCopyMemoryToImageInfo.get_regionCount(segment, 0L); } + /// {@return `regionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int regionCountAt(long index) { return VkCopyMemoryToImageInfo.get_regionCount(this.segment(), index); } + /// {@return `regionCount`} + public @CType("uint32_t") int regionCount() { return VkCopyMemoryToImageInfo.get_regionCount(this.segment()); } + /// Sets `regionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_regionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_regionCount.set(segment, 0L, index, value); } + /// Sets `regionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_regionCount(MemorySegment segment, @CType("uint32_t") int value) { VkCopyMemoryToImageInfo.set_regionCount(segment, 0L, value); } + /// Sets `regionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo regionCountAt(long index, @CType("uint32_t") int value) { VkCopyMemoryToImageInfo.set_regionCount(this.segment(), index, value); return this; } + /// Sets `regionCount` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo regionCount(@CType("uint32_t") int value) { VkCopyMemoryToImageInfo.set_regionCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkMemoryToImageCopy *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkMemoryToImageCopy *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkCopyMemoryToImageInfo.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkMemoryToImageCopy *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkCopyMemoryToImageInfo.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkMemoryToImageCopy *") java.lang.foreign.MemorySegment pRegions() { return VkCopyMemoryToImageInfo.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkMemoryToImageCopy *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkMemoryToImageCopy *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageInfo.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo pRegionsAt(long index, @CType("const VkMemoryToImageCopy *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageInfo.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkCopyMemoryToImageInfo pRegions(@CType("const VkMemoryToImageCopy *") java.lang.foreign.MemorySegment value) { VkCopyMemoryToImageInfo.set_pRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDependencyInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDependencyInfo.java new file mode 100644 index 00000000..a9a9779b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDependencyInfo.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dependencyFlags +/// [VarHandle][#VH_dependencyFlags] - [Getter][#dependencyFlags()] - [Setter][#dependencyFlags(int)] +/// ### memoryBarrierCount +/// [VarHandle][#VH_memoryBarrierCount] - [Getter][#memoryBarrierCount()] - [Setter][#memoryBarrierCount(int)] +/// ### pMemoryBarriers +/// [VarHandle][#VH_pMemoryBarriers] - [Getter][#pMemoryBarriers()] - [Setter][#pMemoryBarriers(java.lang.foreign.MemorySegment)] +/// ### bufferMemoryBarrierCount +/// [VarHandle][#VH_bufferMemoryBarrierCount] - [Getter][#bufferMemoryBarrierCount()] - [Setter][#bufferMemoryBarrierCount(int)] +/// ### pBufferMemoryBarriers +/// [VarHandle][#VH_pBufferMemoryBarriers] - [Getter][#pBufferMemoryBarriers()] - [Setter][#pBufferMemoryBarriers(java.lang.foreign.MemorySegment)] +/// ### imageMemoryBarrierCount +/// [VarHandle][#VH_imageMemoryBarrierCount] - [Getter][#imageMemoryBarrierCount()] - [Setter][#imageMemoryBarrierCount(int)] +/// ### pImageMemoryBarriers +/// [VarHandle][#VH_pImageMemoryBarriers] - [Getter][#pImageMemoryBarriers()] - [Setter][#pImageMemoryBarriers(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDependencyInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDependencyFlags dependencyFlags; +/// uint32_t memoryBarrierCount; +/// const VkMemoryBarrier2 * pMemoryBarriers; +/// uint32_t bufferMemoryBarrierCount; +/// const VkBufferMemoryBarrier2 * pBufferMemoryBarriers; +/// uint32_t imageMemoryBarrierCount; +/// const VkImageMemoryBarrier2 * pImageMemoryBarriers; +/// } VkDependencyInfo; +/// ``` +public final class VkDependencyInfo extends Struct { + /// The struct layout of `VkDependencyInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("dependencyFlags"), + ValueLayout.JAVA_INT.withName("memoryBarrierCount"), + ValueLayout.ADDRESS.withName("pMemoryBarriers"), + ValueLayout.JAVA_INT.withName("bufferMemoryBarrierCount"), + ValueLayout.ADDRESS.withName("pBufferMemoryBarriers"), + ValueLayout.JAVA_INT.withName("imageMemoryBarrierCount"), + ValueLayout.ADDRESS.withName("pImageMemoryBarriers") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dependencyFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dependencyFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dependencyFlags")); + /// The [VarHandle] of `memoryBarrierCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryBarrierCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryBarrierCount")); + /// The [VarHandle] of `pMemoryBarriers` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pMemoryBarriers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pMemoryBarriers")); + /// The [VarHandle] of `bufferMemoryBarrierCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferMemoryBarrierCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferMemoryBarrierCount")); + /// The [VarHandle] of `pBufferMemoryBarriers` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBufferMemoryBarriers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBufferMemoryBarriers")); + /// The [VarHandle] of `imageMemoryBarrierCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageMemoryBarrierCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageMemoryBarrierCount")); + /// The [VarHandle] of `pImageMemoryBarriers` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pImageMemoryBarriers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pImageMemoryBarriers")); + + /// Creates `VkDependencyInfo` with the given segment. + /// @param segment the memory segment + public VkDependencyInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDependencyInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDependencyInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDependencyInfo(segment); } + + /// Creates `VkDependencyInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDependencyInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDependencyInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDependencyInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDependencyInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDependencyInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDependencyInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDependencyInfo` + public static VkDependencyInfo alloc(SegmentAllocator allocator) { return new VkDependencyInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDependencyInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDependencyInfo` + public static VkDependencyInfo alloc(SegmentAllocator allocator, long count) { return new VkDependencyInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDependencyInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDependencyInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDependencyInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDependencyInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDependencyInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDependencyInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDependencyInfo sType(@CType("VkStructureType") int value) { VkDependencyInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDependencyInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDependencyInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDependencyInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDependencyInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDependencyInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `dependencyFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDependencyFlags") int get_dependencyFlags(MemorySegment segment, long index) { return (int) VH_dependencyFlags.get(segment, 0L, index); } + /// {@return `dependencyFlags`} + /// @param segment the segment of the struct + public static @CType("VkDependencyFlags") int get_dependencyFlags(MemorySegment segment) { return VkDependencyInfo.get_dependencyFlags(segment, 0L); } + /// {@return `dependencyFlags` at the given index} + /// @param index the index + public @CType("VkDependencyFlags") int dependencyFlagsAt(long index) { return VkDependencyInfo.get_dependencyFlags(this.segment(), index); } + /// {@return `dependencyFlags`} + public @CType("VkDependencyFlags") int dependencyFlags() { return VkDependencyInfo.get_dependencyFlags(this.segment()); } + /// Sets `dependencyFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dependencyFlags(MemorySegment segment, long index, @CType("VkDependencyFlags") int value) { VH_dependencyFlags.set(segment, 0L, index, value); } + /// Sets `dependencyFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dependencyFlags(MemorySegment segment, @CType("VkDependencyFlags") int value) { VkDependencyInfo.set_dependencyFlags(segment, 0L, value); } + /// Sets `dependencyFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDependencyInfo dependencyFlagsAt(long index, @CType("VkDependencyFlags") int value) { VkDependencyInfo.set_dependencyFlags(this.segment(), index, value); return this; } + /// Sets `dependencyFlags` with the given value. + /// @param value the value + /// @return `this` + public VkDependencyInfo dependencyFlags(@CType("VkDependencyFlags") int value) { VkDependencyInfo.set_dependencyFlags(this.segment(), value); return this; } + + /// {@return `memoryBarrierCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryBarrierCount(MemorySegment segment, long index) { return (int) VH_memoryBarrierCount.get(segment, 0L, index); } + /// {@return `memoryBarrierCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryBarrierCount(MemorySegment segment) { return VkDependencyInfo.get_memoryBarrierCount(segment, 0L); } + /// {@return `memoryBarrierCount` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryBarrierCountAt(long index) { return VkDependencyInfo.get_memoryBarrierCount(this.segment(), index); } + /// {@return `memoryBarrierCount`} + public @CType("uint32_t") int memoryBarrierCount() { return VkDependencyInfo.get_memoryBarrierCount(this.segment()); } + /// Sets `memoryBarrierCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryBarrierCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryBarrierCount.set(segment, 0L, index, value); } + /// Sets `memoryBarrierCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryBarrierCount(MemorySegment segment, @CType("uint32_t") int value) { VkDependencyInfo.set_memoryBarrierCount(segment, 0L, value); } + /// Sets `memoryBarrierCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDependencyInfo memoryBarrierCountAt(long index, @CType("uint32_t") int value) { VkDependencyInfo.set_memoryBarrierCount(this.segment(), index, value); return this; } + /// Sets `memoryBarrierCount` with the given value. + /// @param value the value + /// @return `this` + public VkDependencyInfo memoryBarrierCount(@CType("uint32_t") int value) { VkDependencyInfo.set_memoryBarrierCount(this.segment(), value); return this; } + + /// {@return `pMemoryBarriers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkMemoryBarrier2 *") java.lang.foreign.MemorySegment get_pMemoryBarriers(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pMemoryBarriers.get(segment, 0L, index); } + /// {@return `pMemoryBarriers`} + /// @param segment the segment of the struct + public static @CType("const VkMemoryBarrier2 *") java.lang.foreign.MemorySegment get_pMemoryBarriers(MemorySegment segment) { return VkDependencyInfo.get_pMemoryBarriers(segment, 0L); } + /// {@return `pMemoryBarriers` at the given index} + /// @param index the index + public @CType("const VkMemoryBarrier2 *") java.lang.foreign.MemorySegment pMemoryBarriersAt(long index) { return VkDependencyInfo.get_pMemoryBarriers(this.segment(), index); } + /// {@return `pMemoryBarriers`} + public @CType("const VkMemoryBarrier2 *") java.lang.foreign.MemorySegment pMemoryBarriers() { return VkDependencyInfo.get_pMemoryBarriers(this.segment()); } + /// Sets `pMemoryBarriers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pMemoryBarriers(MemorySegment segment, long index, @CType("const VkMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VH_pMemoryBarriers.set(segment, 0L, index, value); } + /// Sets `pMemoryBarriers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pMemoryBarriers(MemorySegment segment, @CType("const VkMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pMemoryBarriers(segment, 0L, value); } + /// Sets `pMemoryBarriers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDependencyInfo pMemoryBarriersAt(long index, @CType("const VkMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pMemoryBarriers(this.segment(), index, value); return this; } + /// Sets `pMemoryBarriers` with the given value. + /// @param value the value + /// @return `this` + public VkDependencyInfo pMemoryBarriers(@CType("const VkMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pMemoryBarriers(this.segment(), value); return this; } + + /// {@return `bufferMemoryBarrierCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferMemoryBarrierCount(MemorySegment segment, long index) { return (int) VH_bufferMemoryBarrierCount.get(segment, 0L, index); } + /// {@return `bufferMemoryBarrierCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferMemoryBarrierCount(MemorySegment segment) { return VkDependencyInfo.get_bufferMemoryBarrierCount(segment, 0L); } + /// {@return `bufferMemoryBarrierCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferMemoryBarrierCountAt(long index) { return VkDependencyInfo.get_bufferMemoryBarrierCount(this.segment(), index); } + /// {@return `bufferMemoryBarrierCount`} + public @CType("uint32_t") int bufferMemoryBarrierCount() { return VkDependencyInfo.get_bufferMemoryBarrierCount(this.segment()); } + /// Sets `bufferMemoryBarrierCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferMemoryBarrierCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferMemoryBarrierCount.set(segment, 0L, index, value); } + /// Sets `bufferMemoryBarrierCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferMemoryBarrierCount(MemorySegment segment, @CType("uint32_t") int value) { VkDependencyInfo.set_bufferMemoryBarrierCount(segment, 0L, value); } + /// Sets `bufferMemoryBarrierCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDependencyInfo bufferMemoryBarrierCountAt(long index, @CType("uint32_t") int value) { VkDependencyInfo.set_bufferMemoryBarrierCount(this.segment(), index, value); return this; } + /// Sets `bufferMemoryBarrierCount` with the given value. + /// @param value the value + /// @return `this` + public VkDependencyInfo bufferMemoryBarrierCount(@CType("uint32_t") int value) { VkDependencyInfo.set_bufferMemoryBarrierCount(this.segment(), value); return this; } + + /// {@return `pBufferMemoryBarriers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkBufferMemoryBarrier2 *") java.lang.foreign.MemorySegment get_pBufferMemoryBarriers(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBufferMemoryBarriers.get(segment, 0L, index); } + /// {@return `pBufferMemoryBarriers`} + /// @param segment the segment of the struct + public static @CType("const VkBufferMemoryBarrier2 *") java.lang.foreign.MemorySegment get_pBufferMemoryBarriers(MemorySegment segment) { return VkDependencyInfo.get_pBufferMemoryBarriers(segment, 0L); } + /// {@return `pBufferMemoryBarriers` at the given index} + /// @param index the index + public @CType("const VkBufferMemoryBarrier2 *") java.lang.foreign.MemorySegment pBufferMemoryBarriersAt(long index) { return VkDependencyInfo.get_pBufferMemoryBarriers(this.segment(), index); } + /// {@return `pBufferMemoryBarriers`} + public @CType("const VkBufferMemoryBarrier2 *") java.lang.foreign.MemorySegment pBufferMemoryBarriers() { return VkDependencyInfo.get_pBufferMemoryBarriers(this.segment()); } + /// Sets `pBufferMemoryBarriers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBufferMemoryBarriers(MemorySegment segment, long index, @CType("const VkBufferMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VH_pBufferMemoryBarriers.set(segment, 0L, index, value); } + /// Sets `pBufferMemoryBarriers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBufferMemoryBarriers(MemorySegment segment, @CType("const VkBufferMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pBufferMemoryBarriers(segment, 0L, value); } + /// Sets `pBufferMemoryBarriers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDependencyInfo pBufferMemoryBarriersAt(long index, @CType("const VkBufferMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pBufferMemoryBarriers(this.segment(), index, value); return this; } + /// Sets `pBufferMemoryBarriers` with the given value. + /// @param value the value + /// @return `this` + public VkDependencyInfo pBufferMemoryBarriers(@CType("const VkBufferMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pBufferMemoryBarriers(this.segment(), value); return this; } + + /// {@return `imageMemoryBarrierCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_imageMemoryBarrierCount(MemorySegment segment, long index) { return (int) VH_imageMemoryBarrierCount.get(segment, 0L, index); } + /// {@return `imageMemoryBarrierCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_imageMemoryBarrierCount(MemorySegment segment) { return VkDependencyInfo.get_imageMemoryBarrierCount(segment, 0L); } + /// {@return `imageMemoryBarrierCount` at the given index} + /// @param index the index + public @CType("uint32_t") int imageMemoryBarrierCountAt(long index) { return VkDependencyInfo.get_imageMemoryBarrierCount(this.segment(), index); } + /// {@return `imageMemoryBarrierCount`} + public @CType("uint32_t") int imageMemoryBarrierCount() { return VkDependencyInfo.get_imageMemoryBarrierCount(this.segment()); } + /// Sets `imageMemoryBarrierCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageMemoryBarrierCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_imageMemoryBarrierCount.set(segment, 0L, index, value); } + /// Sets `imageMemoryBarrierCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageMemoryBarrierCount(MemorySegment segment, @CType("uint32_t") int value) { VkDependencyInfo.set_imageMemoryBarrierCount(segment, 0L, value); } + /// Sets `imageMemoryBarrierCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDependencyInfo imageMemoryBarrierCountAt(long index, @CType("uint32_t") int value) { VkDependencyInfo.set_imageMemoryBarrierCount(this.segment(), index, value); return this; } + /// Sets `imageMemoryBarrierCount` with the given value. + /// @param value the value + /// @return `this` + public VkDependencyInfo imageMemoryBarrierCount(@CType("uint32_t") int value) { VkDependencyInfo.set_imageMemoryBarrierCount(this.segment(), value); return this; } + + /// {@return `pImageMemoryBarriers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageMemoryBarrier2 *") java.lang.foreign.MemorySegment get_pImageMemoryBarriers(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pImageMemoryBarriers.get(segment, 0L, index); } + /// {@return `pImageMemoryBarriers`} + /// @param segment the segment of the struct + public static @CType("const VkImageMemoryBarrier2 *") java.lang.foreign.MemorySegment get_pImageMemoryBarriers(MemorySegment segment) { return VkDependencyInfo.get_pImageMemoryBarriers(segment, 0L); } + /// {@return `pImageMemoryBarriers` at the given index} + /// @param index the index + public @CType("const VkImageMemoryBarrier2 *") java.lang.foreign.MemorySegment pImageMemoryBarriersAt(long index) { return VkDependencyInfo.get_pImageMemoryBarriers(this.segment(), index); } + /// {@return `pImageMemoryBarriers`} + public @CType("const VkImageMemoryBarrier2 *") java.lang.foreign.MemorySegment pImageMemoryBarriers() { return VkDependencyInfo.get_pImageMemoryBarriers(this.segment()); } + /// Sets `pImageMemoryBarriers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pImageMemoryBarriers(MemorySegment segment, long index, @CType("const VkImageMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VH_pImageMemoryBarriers.set(segment, 0L, index, value); } + /// Sets `pImageMemoryBarriers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pImageMemoryBarriers(MemorySegment segment, @CType("const VkImageMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pImageMemoryBarriers(segment, 0L, value); } + /// Sets `pImageMemoryBarriers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDependencyInfo pImageMemoryBarriersAt(long index, @CType("const VkImageMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pImageMemoryBarriers(this.segment(), index, value); return this; } + /// Sets `pImageMemoryBarriers` with the given value. + /// @param value the value + /// @return `this` + public VkDependencyInfo pImageMemoryBarriers(@CType("const VkImageMemoryBarrier2 *") java.lang.foreign.MemorySegment value) { VkDependencyInfo.set_pImageMemoryBarriers(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorBufferInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorBufferInfo.java new file mode 100644 index 00000000..d1bd5b99 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorBufferInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### range +/// [VarHandle][#VH_range] - [Getter][#range()] - [Setter][#range(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorBufferInfo { +/// VkBuffer buffer; +/// VkDeviceSize offset; +/// VkDeviceSize range; +/// } VkDescriptorBufferInfo; +/// ``` +public final class VkDescriptorBufferInfo extends Struct { + /// The struct layout of `VkDescriptorBufferInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("buffer"), + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_LONG.withName("range") + ); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `range` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_range = LAYOUT.arrayElementVarHandle(PathElement.groupElement("range")); + + /// Creates `VkDescriptorBufferInfo` with the given segment. + /// @param segment the memory segment + public VkDescriptorBufferInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorBufferInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorBufferInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorBufferInfo(segment); } + + /// Creates `VkDescriptorBufferInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorBufferInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorBufferInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorBufferInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorBufferInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorBufferInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorBufferInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorBufferInfo` + public static VkDescriptorBufferInfo alloc(SegmentAllocator allocator) { return new VkDescriptorBufferInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorBufferInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorBufferInfo` + public static VkDescriptorBufferInfo alloc(SegmentAllocator allocator, long count) { return new VkDescriptorBufferInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkDescriptorBufferInfo.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkDescriptorBufferInfo.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkDescriptorBufferInfo.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkDescriptorBufferInfo.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorBufferInfo bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkDescriptorBufferInfo.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorBufferInfo buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkDescriptorBufferInfo.set_buffer(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkDescriptorBufferInfo.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkDescriptorBufferInfo.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkDescriptorBufferInfo.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkDescriptorBufferInfo.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorBufferInfo offsetAt(long index, @CType("VkDeviceSize") long value) { VkDescriptorBufferInfo.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorBufferInfo offset(@CType("VkDeviceSize") long value) { VkDescriptorBufferInfo.set_offset(this.segment(), value); return this; } + + /// {@return `range` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_range(MemorySegment segment, long index) { return (long) VH_range.get(segment, 0L, index); } + /// {@return `range`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_range(MemorySegment segment) { return VkDescriptorBufferInfo.get_range(segment, 0L); } + /// {@return `range` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long rangeAt(long index) { return VkDescriptorBufferInfo.get_range(this.segment(), index); } + /// {@return `range`} + public @CType("VkDeviceSize") long range() { return VkDescriptorBufferInfo.get_range(this.segment()); } + /// Sets `range` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_range(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_range.set(segment, 0L, index, value); } + /// Sets `range` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_range(MemorySegment segment, @CType("VkDeviceSize") long value) { VkDescriptorBufferInfo.set_range(segment, 0L, value); } + /// Sets `range` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorBufferInfo rangeAt(long index, @CType("VkDeviceSize") long value) { VkDescriptorBufferInfo.set_range(this.segment(), index, value); return this; } + /// Sets `range` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorBufferInfo range(@CType("VkDeviceSize") long value) { VkDescriptorBufferInfo.set_range(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorImageInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorImageInfo.java new file mode 100644 index 00000000..e7081de9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorImageInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sampler +/// [VarHandle][#VH_sampler] - [Getter][#sampler()] - [Setter][#sampler(java.lang.foreign.MemorySegment)] +/// ### imageView +/// [VarHandle][#VH_imageView] - [Getter][#imageView()] - [Setter][#imageView(java.lang.foreign.MemorySegment)] +/// ### imageLayout +/// [VarHandle][#VH_imageLayout] - [Getter][#imageLayout()] - [Setter][#imageLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorImageInfo { +/// VkSampler sampler; +/// VkImageView imageView; +/// VkImageLayout imageLayout; +/// } VkDescriptorImageInfo; +/// ``` +public final class VkDescriptorImageInfo extends Struct { + /// The struct layout of `VkDescriptorImageInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("sampler"), + ValueLayout.ADDRESS.withName("imageView"), + ValueLayout.JAVA_INT.withName("imageLayout") + ); + /// The [VarHandle] of `sampler` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_sampler = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampler")); + /// The [VarHandle] of `imageView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_imageView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageView")); + /// The [VarHandle] of `imageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageLayout")); + + /// Creates `VkDescriptorImageInfo` with the given segment. + /// @param segment the memory segment + public VkDescriptorImageInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorImageInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorImageInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorImageInfo(segment); } + + /// Creates `VkDescriptorImageInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorImageInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorImageInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorImageInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorImageInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorImageInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorImageInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorImageInfo` + public static VkDescriptorImageInfo alloc(SegmentAllocator allocator) { return new VkDescriptorImageInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorImageInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorImageInfo` + public static VkDescriptorImageInfo alloc(SegmentAllocator allocator, long count) { return new VkDescriptorImageInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sampler` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampler") java.lang.foreign.MemorySegment get_sampler(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_sampler.get(segment, 0L, index); } + /// {@return `sampler`} + /// @param segment the segment of the struct + public static @CType("VkSampler") java.lang.foreign.MemorySegment get_sampler(MemorySegment segment) { return VkDescriptorImageInfo.get_sampler(segment, 0L); } + /// {@return `sampler` at the given index} + /// @param index the index + public @CType("VkSampler") java.lang.foreign.MemorySegment samplerAt(long index) { return VkDescriptorImageInfo.get_sampler(this.segment(), index); } + /// {@return `sampler`} + public @CType("VkSampler") java.lang.foreign.MemorySegment sampler() { return VkDescriptorImageInfo.get_sampler(this.segment()); } + /// Sets `sampler` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampler(MemorySegment segment, long index, @CType("VkSampler") java.lang.foreign.MemorySegment value) { VH_sampler.set(segment, 0L, index, value); } + /// Sets `sampler` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampler(MemorySegment segment, @CType("VkSampler") java.lang.foreign.MemorySegment value) { VkDescriptorImageInfo.set_sampler(segment, 0L, value); } + /// Sets `sampler` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorImageInfo samplerAt(long index, @CType("VkSampler") java.lang.foreign.MemorySegment value) { VkDescriptorImageInfo.set_sampler(this.segment(), index, value); return this; } + /// Sets `sampler` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorImageInfo sampler(@CType("VkSampler") java.lang.foreign.MemorySegment value) { VkDescriptorImageInfo.set_sampler(this.segment(), value); return this; } + + /// {@return `imageView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_imageView.get(segment, 0L, index); } + /// {@return `imageView`} + /// @param segment the segment of the struct + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment) { return VkDescriptorImageInfo.get_imageView(segment, 0L); } + /// {@return `imageView` at the given index} + /// @param index the index + public @CType("VkImageView") java.lang.foreign.MemorySegment imageViewAt(long index) { return VkDescriptorImageInfo.get_imageView(this.segment(), index); } + /// {@return `imageView`} + public @CType("VkImageView") java.lang.foreign.MemorySegment imageView() { return VkDescriptorImageInfo.get_imageView(this.segment()); } + /// Sets `imageView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageView(MemorySegment segment, long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VH_imageView.set(segment, 0L, index, value); } + /// Sets `imageView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageView(MemorySegment segment, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkDescriptorImageInfo.set_imageView(segment, 0L, value); } + /// Sets `imageView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorImageInfo imageViewAt(long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkDescriptorImageInfo.set_imageView(this.segment(), index, value); return this; } + /// Sets `imageView` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorImageInfo imageView(@CType("VkImageView") java.lang.foreign.MemorySegment value) { VkDescriptorImageInfo.set_imageView(this.segment(), value); return this; } + + /// {@return `imageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_imageLayout(MemorySegment segment, long index) { return (int) VH_imageLayout.get(segment, 0L, index); } + /// {@return `imageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_imageLayout(MemorySegment segment) { return VkDescriptorImageInfo.get_imageLayout(segment, 0L); } + /// {@return `imageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int imageLayoutAt(long index) { return VkDescriptorImageInfo.get_imageLayout(this.segment(), index); } + /// {@return `imageLayout`} + public @CType("VkImageLayout") int imageLayout() { return VkDescriptorImageInfo.get_imageLayout(this.segment()); } + /// Sets `imageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_imageLayout.set(segment, 0L, index, value); } + /// Sets `imageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkDescriptorImageInfo.set_imageLayout(segment, 0L, value); } + /// Sets `imageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorImageInfo imageLayoutAt(long index, @CType("VkImageLayout") int value) { VkDescriptorImageInfo.set_imageLayout(this.segment(), index, value); return this; } + /// Sets `imageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorImageInfo imageLayout(@CType("VkImageLayout") int value) { VkDescriptorImageInfo.set_imageLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorPoolCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorPoolCreateInfo.java new file mode 100644 index 00000000..94b0a676 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorPoolCreateInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### maxSets +/// [VarHandle][#VH_maxSets] - [Getter][#maxSets()] - [Setter][#maxSets(int)] +/// ### poolSizeCount +/// [VarHandle][#VH_poolSizeCount] - [Getter][#poolSizeCount()] - [Setter][#poolSizeCount(int)] +/// ### pPoolSizes +/// [VarHandle][#VH_pPoolSizes] - [Getter][#pPoolSizes()] - [Setter][#pPoolSizes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorPoolCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDescriptorPoolCreateFlags flags; +/// uint32_t maxSets; +/// uint32_t poolSizeCount; +/// const VkDescriptorPoolSize * pPoolSizes; +/// } VkDescriptorPoolCreateInfo; +/// ``` +public final class VkDescriptorPoolCreateInfo extends Struct { + /// The struct layout of `VkDescriptorPoolCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("maxSets"), + ValueLayout.JAVA_INT.withName("poolSizeCount"), + ValueLayout.ADDRESS.withName("pPoolSizes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `maxSets` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSets")); + /// The [VarHandle] of `poolSizeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_poolSizeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("poolSizeCount")); + /// The [VarHandle] of `pPoolSizes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPoolSizes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPoolSizes")); + + /// Creates `VkDescriptorPoolCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDescriptorPoolCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorPoolCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorPoolCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorPoolCreateInfo(segment); } + + /// Creates `VkDescriptorPoolCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorPoolCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorPoolCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorPoolCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorPoolCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorPoolCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorPoolCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorPoolCreateInfo` + public static VkDescriptorPoolCreateInfo alloc(SegmentAllocator allocator) { return new VkDescriptorPoolCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorPoolCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorPoolCreateInfo` + public static VkDescriptorPoolCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDescriptorPoolCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorPoolCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorPoolCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorPoolCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorPoolCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorPoolCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo sType(@CType("VkStructureType") int value) { VkDescriptorPoolCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorPoolCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorPoolCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorPoolCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorPoolCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorPoolCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorPoolCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorPoolCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorPoolCreateFlags") int get_flags(MemorySegment segment) { return VkDescriptorPoolCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDescriptorPoolCreateFlags") int flagsAt(long index) { return VkDescriptorPoolCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDescriptorPoolCreateFlags") int flags() { return VkDescriptorPoolCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDescriptorPoolCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDescriptorPoolCreateFlags") int value) { VkDescriptorPoolCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo flagsAt(long index, @CType("VkDescriptorPoolCreateFlags") int value) { VkDescriptorPoolCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo flags(@CType("VkDescriptorPoolCreateFlags") int value) { VkDescriptorPoolCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `maxSets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSets(MemorySegment segment, long index) { return (int) VH_maxSets.get(segment, 0L, index); } + /// {@return `maxSets`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSets(MemorySegment segment) { return VkDescriptorPoolCreateInfo.get_maxSets(segment, 0L); } + /// {@return `maxSets` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSetsAt(long index) { return VkDescriptorPoolCreateInfo.get_maxSets(this.segment(), index); } + /// {@return `maxSets`} + public @CType("uint32_t") int maxSets() { return VkDescriptorPoolCreateInfo.get_maxSets(this.segment()); } + /// Sets `maxSets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSets(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSets.set(segment, 0L, index, value); } + /// Sets `maxSets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSets(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorPoolCreateInfo.set_maxSets(segment, 0L, value); } + /// Sets `maxSets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo maxSetsAt(long index, @CType("uint32_t") int value) { VkDescriptorPoolCreateInfo.set_maxSets(this.segment(), index, value); return this; } + /// Sets `maxSets` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo maxSets(@CType("uint32_t") int value) { VkDescriptorPoolCreateInfo.set_maxSets(this.segment(), value); return this; } + + /// {@return `poolSizeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_poolSizeCount(MemorySegment segment, long index) { return (int) VH_poolSizeCount.get(segment, 0L, index); } + /// {@return `poolSizeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_poolSizeCount(MemorySegment segment) { return VkDescriptorPoolCreateInfo.get_poolSizeCount(segment, 0L); } + /// {@return `poolSizeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int poolSizeCountAt(long index) { return VkDescriptorPoolCreateInfo.get_poolSizeCount(this.segment(), index); } + /// {@return `poolSizeCount`} + public @CType("uint32_t") int poolSizeCount() { return VkDescriptorPoolCreateInfo.get_poolSizeCount(this.segment()); } + /// Sets `poolSizeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_poolSizeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_poolSizeCount.set(segment, 0L, index, value); } + /// Sets `poolSizeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_poolSizeCount(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorPoolCreateInfo.set_poolSizeCount(segment, 0L, value); } + /// Sets `poolSizeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo poolSizeCountAt(long index, @CType("uint32_t") int value) { VkDescriptorPoolCreateInfo.set_poolSizeCount(this.segment(), index, value); return this; } + /// Sets `poolSizeCount` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo poolSizeCount(@CType("uint32_t") int value) { VkDescriptorPoolCreateInfo.set_poolSizeCount(this.segment(), value); return this; } + + /// {@return `pPoolSizes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorPoolSize *") java.lang.foreign.MemorySegment get_pPoolSizes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPoolSizes.get(segment, 0L, index); } + /// {@return `pPoolSizes`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorPoolSize *") java.lang.foreign.MemorySegment get_pPoolSizes(MemorySegment segment) { return VkDescriptorPoolCreateInfo.get_pPoolSizes(segment, 0L); } + /// {@return `pPoolSizes` at the given index} + /// @param index the index + public @CType("const VkDescriptorPoolSize *") java.lang.foreign.MemorySegment pPoolSizesAt(long index) { return VkDescriptorPoolCreateInfo.get_pPoolSizes(this.segment(), index); } + /// {@return `pPoolSizes`} + public @CType("const VkDescriptorPoolSize *") java.lang.foreign.MemorySegment pPoolSizes() { return VkDescriptorPoolCreateInfo.get_pPoolSizes(this.segment()); } + /// Sets `pPoolSizes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPoolSizes(MemorySegment segment, long index, @CType("const VkDescriptorPoolSize *") java.lang.foreign.MemorySegment value) { VH_pPoolSizes.set(segment, 0L, index, value); } + /// Sets `pPoolSizes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPoolSizes(MemorySegment segment, @CType("const VkDescriptorPoolSize *") java.lang.foreign.MemorySegment value) { VkDescriptorPoolCreateInfo.set_pPoolSizes(segment, 0L, value); } + /// Sets `pPoolSizes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo pPoolSizesAt(long index, @CType("const VkDescriptorPoolSize *") java.lang.foreign.MemorySegment value) { VkDescriptorPoolCreateInfo.set_pPoolSizes(this.segment(), index, value); return this; } + /// Sets `pPoolSizes` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolCreateInfo pPoolSizes(@CType("const VkDescriptorPoolSize *") java.lang.foreign.MemorySegment value) { VkDescriptorPoolCreateInfo.set_pPoolSizes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorPoolInlineUniformBlockCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorPoolInlineUniformBlockCreateInfo.java new file mode 100644 index 00000000..7a9fe159 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorPoolInlineUniformBlockCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxInlineUniformBlockBindings +/// [VarHandle][#VH_maxInlineUniformBlockBindings] - [Getter][#maxInlineUniformBlockBindings()] - [Setter][#maxInlineUniformBlockBindings(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorPoolInlineUniformBlockCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t maxInlineUniformBlockBindings; +/// } VkDescriptorPoolInlineUniformBlockCreateInfo; +/// ``` +public final class VkDescriptorPoolInlineUniformBlockCreateInfo extends Struct { + /// The struct layout of `VkDescriptorPoolInlineUniformBlockCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxInlineUniformBlockBindings") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxInlineUniformBlockBindings` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxInlineUniformBlockBindings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxInlineUniformBlockBindings")); + + /// Creates `VkDescriptorPoolInlineUniformBlockCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDescriptorPoolInlineUniformBlockCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorPoolInlineUniformBlockCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorPoolInlineUniformBlockCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorPoolInlineUniformBlockCreateInfo(segment); } + + /// Creates `VkDescriptorPoolInlineUniformBlockCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorPoolInlineUniformBlockCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorPoolInlineUniformBlockCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorPoolInlineUniformBlockCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorPoolInlineUniformBlockCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorPoolInlineUniformBlockCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorPoolInlineUniformBlockCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorPoolInlineUniformBlockCreateInfo` + public static VkDescriptorPoolInlineUniformBlockCreateInfo alloc(SegmentAllocator allocator) { return new VkDescriptorPoolInlineUniformBlockCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorPoolInlineUniformBlockCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorPoolInlineUniformBlockCreateInfo` + public static VkDescriptorPoolInlineUniformBlockCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDescriptorPoolInlineUniformBlockCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorPoolInlineUniformBlockCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorPoolInlineUniformBlockCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorPoolInlineUniformBlockCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorPoolInlineUniformBlockCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolInlineUniformBlockCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorPoolInlineUniformBlockCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolInlineUniformBlockCreateInfo sType(@CType("VkStructureType") int value) { VkDescriptorPoolInlineUniformBlockCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorPoolInlineUniformBlockCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorPoolInlineUniformBlockCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorPoolInlineUniformBlockCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorPoolInlineUniformBlockCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolInlineUniformBlockCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorPoolInlineUniformBlockCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolInlineUniformBlockCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorPoolInlineUniformBlockCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `maxInlineUniformBlockBindings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxInlineUniformBlockBindings(MemorySegment segment, long index) { return (int) VH_maxInlineUniformBlockBindings.get(segment, 0L, index); } + /// {@return `maxInlineUniformBlockBindings`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxInlineUniformBlockBindings(MemorySegment segment) { return VkDescriptorPoolInlineUniformBlockCreateInfo.get_maxInlineUniformBlockBindings(segment, 0L); } + /// {@return `maxInlineUniformBlockBindings` at the given index} + /// @param index the index + public @CType("uint32_t") int maxInlineUniformBlockBindingsAt(long index) { return VkDescriptorPoolInlineUniformBlockCreateInfo.get_maxInlineUniformBlockBindings(this.segment(), index); } + /// {@return `maxInlineUniformBlockBindings`} + public @CType("uint32_t") int maxInlineUniformBlockBindings() { return VkDescriptorPoolInlineUniformBlockCreateInfo.get_maxInlineUniformBlockBindings(this.segment()); } + /// Sets `maxInlineUniformBlockBindings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxInlineUniformBlockBindings(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxInlineUniformBlockBindings.set(segment, 0L, index, value); } + /// Sets `maxInlineUniformBlockBindings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxInlineUniformBlockBindings(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorPoolInlineUniformBlockCreateInfo.set_maxInlineUniformBlockBindings(segment, 0L, value); } + /// Sets `maxInlineUniformBlockBindings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolInlineUniformBlockCreateInfo maxInlineUniformBlockBindingsAt(long index, @CType("uint32_t") int value) { VkDescriptorPoolInlineUniformBlockCreateInfo.set_maxInlineUniformBlockBindings(this.segment(), index, value); return this; } + /// Sets `maxInlineUniformBlockBindings` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolInlineUniformBlockCreateInfo maxInlineUniformBlockBindings(@CType("uint32_t") int value) { VkDescriptorPoolInlineUniformBlockCreateInfo.set_maxInlineUniformBlockBindings(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorPoolSize.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorPoolSize.java new file mode 100644 index 00000000..9733aeea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorPoolSize.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### descriptorCount +/// [VarHandle][#VH_descriptorCount] - [Getter][#descriptorCount()] - [Setter][#descriptorCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorPoolSize { +/// VkDescriptorType type; +/// uint32_t descriptorCount; +/// } VkDescriptorPoolSize; +/// ``` +public final class VkDescriptorPoolSize extends Struct { + /// The struct layout of `VkDescriptorPoolSize`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("descriptorCount") + ); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `descriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorCount")); + + /// Creates `VkDescriptorPoolSize` with the given segment. + /// @param segment the memory segment + public VkDescriptorPoolSize(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorPoolSize` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorPoolSize of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorPoolSize(segment); } + + /// Creates `VkDescriptorPoolSize` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorPoolSize ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorPoolSize(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorPoolSize` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorPoolSize ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorPoolSize(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorPoolSize` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorPoolSize` + public static VkDescriptorPoolSize alloc(SegmentAllocator allocator) { return new VkDescriptorPoolSize(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorPoolSize` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorPoolSize` + public static VkDescriptorPoolSize alloc(SegmentAllocator allocator, long count) { return new VkDescriptorPoolSize(allocator.allocate(LAYOUT, count)); } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorType") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorType") int get_type(MemorySegment segment) { return VkDescriptorPoolSize.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkDescriptorType") int typeAt(long index) { return VkDescriptorPoolSize.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkDescriptorType") int type() { return VkDescriptorPoolSize.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkDescriptorType") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkDescriptorType") int value) { VkDescriptorPoolSize.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolSize typeAt(long index, @CType("VkDescriptorType") int value) { VkDescriptorPoolSize.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolSize type(@CType("VkDescriptorType") int value) { VkDescriptorPoolSize.set_type(this.segment(), value); return this; } + + /// {@return `descriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorCount(MemorySegment segment, long index) { return (int) VH_descriptorCount.get(segment, 0L, index); } + /// {@return `descriptorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorCount(MemorySegment segment) { return VkDescriptorPoolSize.get_descriptorCount(segment, 0L); } + /// {@return `descriptorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorCountAt(long index) { return VkDescriptorPoolSize.get_descriptorCount(this.segment(), index); } + /// {@return `descriptorCount`} + public @CType("uint32_t") int descriptorCount() { return VkDescriptorPoolSize.get_descriptorCount(this.segment()); } + /// Sets `descriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorCount.set(segment, 0L, index, value); } + /// Sets `descriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorCount(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorPoolSize.set_descriptorCount(segment, 0L, value); } + /// Sets `descriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorPoolSize descriptorCountAt(long index, @CType("uint32_t") int value) { VkDescriptorPoolSize.set_descriptorCount(this.segment(), index, value); return this; } + /// Sets `descriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorPoolSize descriptorCount(@CType("uint32_t") int value) { VkDescriptorPoolSize.set_descriptorCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetAllocateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetAllocateInfo.java new file mode 100644 index 00000000..d1bfd4b0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetAllocateInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### descriptorPool +/// [VarHandle][#VH_descriptorPool] - [Getter][#descriptorPool()] - [Setter][#descriptorPool(java.lang.foreign.MemorySegment)] +/// ### descriptorSetCount +/// [VarHandle][#VH_descriptorSetCount] - [Getter][#descriptorSetCount()] - [Setter][#descriptorSetCount(int)] +/// ### pSetLayouts +/// [VarHandle][#VH_pSetLayouts] - [Getter][#pSetLayouts()] - [Setter][#pSetLayouts(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorSetAllocateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDescriptorPool descriptorPool; +/// uint32_t descriptorSetCount; +/// const VkDescriptorSetLayout * pSetLayouts; +/// } VkDescriptorSetAllocateInfo; +/// ``` +public final class VkDescriptorSetAllocateInfo extends Struct { + /// The struct layout of `VkDescriptorSetAllocateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("descriptorPool"), + ValueLayout.JAVA_INT.withName("descriptorSetCount"), + ValueLayout.ADDRESS.withName("pSetLayouts") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `descriptorPool` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_descriptorPool = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorPool")); + /// The [VarHandle] of `descriptorSetCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorSetCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSetCount")); + /// The [VarHandle] of `pSetLayouts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSetLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSetLayouts")); + + /// Creates `VkDescriptorSetAllocateInfo` with the given segment. + /// @param segment the memory segment + public VkDescriptorSetAllocateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorSetAllocateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetAllocateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetAllocateInfo(segment); } + + /// Creates `VkDescriptorSetAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetAllocateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorSetAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetAllocateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorSetAllocateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorSetAllocateInfo` + public static VkDescriptorSetAllocateInfo alloc(SegmentAllocator allocator) { return new VkDescriptorSetAllocateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorSetAllocateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorSetAllocateInfo` + public static VkDescriptorSetAllocateInfo alloc(SegmentAllocator allocator, long count) { return new VkDescriptorSetAllocateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorSetAllocateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorSetAllocateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorSetAllocateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorSetAllocateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetAllocateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorSetAllocateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetAllocateInfo sType(@CType("VkStructureType") int value) { VkDescriptorSetAllocateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorSetAllocateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorSetAllocateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorSetAllocateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetAllocateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetAllocateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetAllocateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetAllocateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetAllocateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `descriptorPool` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorPool") java.lang.foreign.MemorySegment get_descriptorPool(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_descriptorPool.get(segment, 0L, index); } + /// {@return `descriptorPool`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorPool") java.lang.foreign.MemorySegment get_descriptorPool(MemorySegment segment) { return VkDescriptorSetAllocateInfo.get_descriptorPool(segment, 0L); } + /// {@return `descriptorPool` at the given index} + /// @param index the index + public @CType("VkDescriptorPool") java.lang.foreign.MemorySegment descriptorPoolAt(long index) { return VkDescriptorSetAllocateInfo.get_descriptorPool(this.segment(), index); } + /// {@return `descriptorPool`} + public @CType("VkDescriptorPool") java.lang.foreign.MemorySegment descriptorPool() { return VkDescriptorSetAllocateInfo.get_descriptorPool(this.segment()); } + /// Sets `descriptorPool` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorPool(MemorySegment segment, long index, @CType("VkDescriptorPool") java.lang.foreign.MemorySegment value) { VH_descriptorPool.set(segment, 0L, index, value); } + /// Sets `descriptorPool` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorPool(MemorySegment segment, @CType("VkDescriptorPool") java.lang.foreign.MemorySegment value) { VkDescriptorSetAllocateInfo.set_descriptorPool(segment, 0L, value); } + /// Sets `descriptorPool` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetAllocateInfo descriptorPoolAt(long index, @CType("VkDescriptorPool") java.lang.foreign.MemorySegment value) { VkDescriptorSetAllocateInfo.set_descriptorPool(this.segment(), index, value); return this; } + /// Sets `descriptorPool` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetAllocateInfo descriptorPool(@CType("VkDescriptorPool") java.lang.foreign.MemorySegment value) { VkDescriptorSetAllocateInfo.set_descriptorPool(this.segment(), value); return this; } + + /// {@return `descriptorSetCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorSetCount(MemorySegment segment, long index) { return (int) VH_descriptorSetCount.get(segment, 0L, index); } + /// {@return `descriptorSetCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorSetCount(MemorySegment segment) { return VkDescriptorSetAllocateInfo.get_descriptorSetCount(segment, 0L); } + /// {@return `descriptorSetCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorSetCountAt(long index) { return VkDescriptorSetAllocateInfo.get_descriptorSetCount(this.segment(), index); } + /// {@return `descriptorSetCount`} + public @CType("uint32_t") int descriptorSetCount() { return VkDescriptorSetAllocateInfo.get_descriptorSetCount(this.segment()); } + /// Sets `descriptorSetCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSetCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorSetCount.set(segment, 0L, index, value); } + /// Sets `descriptorSetCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSetCount(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorSetAllocateInfo.set_descriptorSetCount(segment, 0L, value); } + /// Sets `descriptorSetCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetAllocateInfo descriptorSetCountAt(long index, @CType("uint32_t") int value) { VkDescriptorSetAllocateInfo.set_descriptorSetCount(this.segment(), index, value); return this; } + /// Sets `descriptorSetCount` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetAllocateInfo descriptorSetCount(@CType("uint32_t") int value) { VkDescriptorSetAllocateInfo.set_descriptorSetCount(this.segment(), value); return this; } + + /// {@return `pSetLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment get_pSetLayouts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSetLayouts.get(segment, 0L, index); } + /// {@return `pSetLayouts`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment get_pSetLayouts(MemorySegment segment) { return VkDescriptorSetAllocateInfo.get_pSetLayouts(segment, 0L); } + /// {@return `pSetLayouts` at the given index} + /// @param index the index + public @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment pSetLayoutsAt(long index) { return VkDescriptorSetAllocateInfo.get_pSetLayouts(this.segment(), index); } + /// {@return `pSetLayouts`} + public @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment pSetLayouts() { return VkDescriptorSetAllocateInfo.get_pSetLayouts(this.segment()); } + /// Sets `pSetLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSetLayouts(MemorySegment segment, long index, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VH_pSetLayouts.set(segment, 0L, index, value); } + /// Sets `pSetLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSetLayouts(MemorySegment segment, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkDescriptorSetAllocateInfo.set_pSetLayouts(segment, 0L, value); } + /// Sets `pSetLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetAllocateInfo pSetLayoutsAt(long index, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkDescriptorSetAllocateInfo.set_pSetLayouts(this.segment(), index, value); return this; } + /// Sets `pSetLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetAllocateInfo pSetLayouts(@CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkDescriptorSetAllocateInfo.set_pSetLayouts(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutBinding.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutBinding.java new file mode 100644 index 00000000..444dee1c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutBinding.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### binding +/// [VarHandle][#VH_binding] - [Getter][#binding()] - [Setter][#binding(int)] +/// ### descriptorType +/// [VarHandle][#VH_descriptorType] - [Getter][#descriptorType()] - [Setter][#descriptorType(int)] +/// ### descriptorCount +/// [VarHandle][#VH_descriptorCount] - [Getter][#descriptorCount()] - [Setter][#descriptorCount(int)] +/// ### stageFlags +/// [VarHandle][#VH_stageFlags] - [Getter][#stageFlags()] - [Setter][#stageFlags(int)] +/// ### pImmutableSamplers +/// [VarHandle][#VH_pImmutableSamplers] - [Getter][#pImmutableSamplers()] - [Setter][#pImmutableSamplers(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorSetLayoutBinding { +/// uint32_t binding; +/// VkDescriptorType descriptorType; +/// uint32_t descriptorCount; +/// VkShaderStageFlags stageFlags; +/// const VkSampler * pImmutableSamplers; +/// } VkDescriptorSetLayoutBinding; +/// ``` +public final class VkDescriptorSetLayoutBinding extends Struct { + /// The struct layout of `VkDescriptorSetLayoutBinding`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("binding"), + ValueLayout.JAVA_INT.withName("descriptorType"), + ValueLayout.JAVA_INT.withName("descriptorCount"), + ValueLayout.JAVA_INT.withName("stageFlags"), + ValueLayout.ADDRESS.withName("pImmutableSamplers") + ); + /// The [VarHandle] of `binding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_binding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("binding")); + /// The [VarHandle] of `descriptorType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorType")); + /// The [VarHandle] of `descriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorCount")); + /// The [VarHandle] of `stageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageFlags")); + /// The [VarHandle] of `pImmutableSamplers` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pImmutableSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pImmutableSamplers")); + + /// Creates `VkDescriptorSetLayoutBinding` with the given segment. + /// @param segment the memory segment + public VkDescriptorSetLayoutBinding(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorSetLayoutBinding` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutBinding of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutBinding(segment); } + + /// Creates `VkDescriptorSetLayoutBinding` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutBinding ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutBinding(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorSetLayoutBinding` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutBinding ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutBinding(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorSetLayoutBinding` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorSetLayoutBinding` + public static VkDescriptorSetLayoutBinding alloc(SegmentAllocator allocator) { return new VkDescriptorSetLayoutBinding(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorSetLayoutBinding` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorSetLayoutBinding` + public static VkDescriptorSetLayoutBinding alloc(SegmentAllocator allocator, long count) { return new VkDescriptorSetLayoutBinding(allocator.allocate(LAYOUT, count)); } + + /// {@return `binding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_binding(MemorySegment segment, long index) { return (int) VH_binding.get(segment, 0L, index); } + /// {@return `binding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_binding(MemorySegment segment) { return VkDescriptorSetLayoutBinding.get_binding(segment, 0L); } + /// {@return `binding` at the given index} + /// @param index the index + public @CType("uint32_t") int bindingAt(long index) { return VkDescriptorSetLayoutBinding.get_binding(this.segment(), index); } + /// {@return `binding`} + public @CType("uint32_t") int binding() { return VkDescriptorSetLayoutBinding.get_binding(this.segment()); } + /// Sets `binding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_binding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_binding.set(segment, 0L, index, value); } + /// Sets `binding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_binding(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorSetLayoutBinding.set_binding(segment, 0L, value); } + /// Sets `binding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBinding bindingAt(long index, @CType("uint32_t") int value) { VkDescriptorSetLayoutBinding.set_binding(this.segment(), index, value); return this; } + /// Sets `binding` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBinding binding(@CType("uint32_t") int value) { VkDescriptorSetLayoutBinding.set_binding(this.segment(), value); return this; } + + /// {@return `descriptorType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorType") int get_descriptorType(MemorySegment segment, long index) { return (int) VH_descriptorType.get(segment, 0L, index); } + /// {@return `descriptorType`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorType") int get_descriptorType(MemorySegment segment) { return VkDescriptorSetLayoutBinding.get_descriptorType(segment, 0L); } + /// {@return `descriptorType` at the given index} + /// @param index the index + public @CType("VkDescriptorType") int descriptorTypeAt(long index) { return VkDescriptorSetLayoutBinding.get_descriptorType(this.segment(), index); } + /// {@return `descriptorType`} + public @CType("VkDescriptorType") int descriptorType() { return VkDescriptorSetLayoutBinding.get_descriptorType(this.segment()); } + /// Sets `descriptorType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorType(MemorySegment segment, long index, @CType("VkDescriptorType") int value) { VH_descriptorType.set(segment, 0L, index, value); } + /// Sets `descriptorType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorType(MemorySegment segment, @CType("VkDescriptorType") int value) { VkDescriptorSetLayoutBinding.set_descriptorType(segment, 0L, value); } + /// Sets `descriptorType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBinding descriptorTypeAt(long index, @CType("VkDescriptorType") int value) { VkDescriptorSetLayoutBinding.set_descriptorType(this.segment(), index, value); return this; } + /// Sets `descriptorType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBinding descriptorType(@CType("VkDescriptorType") int value) { VkDescriptorSetLayoutBinding.set_descriptorType(this.segment(), value); return this; } + + /// {@return `descriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorCount(MemorySegment segment, long index) { return (int) VH_descriptorCount.get(segment, 0L, index); } + /// {@return `descriptorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorCount(MemorySegment segment) { return VkDescriptorSetLayoutBinding.get_descriptorCount(segment, 0L); } + /// {@return `descriptorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorCountAt(long index) { return VkDescriptorSetLayoutBinding.get_descriptorCount(this.segment(), index); } + /// {@return `descriptorCount`} + public @CType("uint32_t") int descriptorCount() { return VkDescriptorSetLayoutBinding.get_descriptorCount(this.segment()); } + /// Sets `descriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorCount.set(segment, 0L, index, value); } + /// Sets `descriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorCount(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorSetLayoutBinding.set_descriptorCount(segment, 0L, value); } + /// Sets `descriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBinding descriptorCountAt(long index, @CType("uint32_t") int value) { VkDescriptorSetLayoutBinding.set_descriptorCount(this.segment(), index, value); return this; } + /// Sets `descriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBinding descriptorCount(@CType("uint32_t") int value) { VkDescriptorSetLayoutBinding.set_descriptorCount(this.segment(), value); return this; } + + /// {@return `stageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment, long index) { return (int) VH_stageFlags.get(segment, 0L, index); } + /// {@return `stageFlags`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment) { return VkDescriptorSetLayoutBinding.get_stageFlags(segment, 0L); } + /// {@return `stageFlags` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int stageFlagsAt(long index) { return VkDescriptorSetLayoutBinding.get_stageFlags(this.segment(), index); } + /// {@return `stageFlags`} + public @CType("VkShaderStageFlags") int stageFlags() { return VkDescriptorSetLayoutBinding.get_stageFlags(this.segment()); } + /// Sets `stageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageFlags(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_stageFlags.set(segment, 0L, index, value); } + /// Sets `stageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageFlags(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkDescriptorSetLayoutBinding.set_stageFlags(segment, 0L, value); } + /// Sets `stageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBinding stageFlagsAt(long index, @CType("VkShaderStageFlags") int value) { VkDescriptorSetLayoutBinding.set_stageFlags(this.segment(), index, value); return this; } + /// Sets `stageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBinding stageFlags(@CType("VkShaderStageFlags") int value) { VkDescriptorSetLayoutBinding.set_stageFlags(this.segment(), value); return this; } + + /// {@return `pImmutableSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSampler *") java.lang.foreign.MemorySegment get_pImmutableSamplers(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pImmutableSamplers.get(segment, 0L, index); } + /// {@return `pImmutableSamplers`} + /// @param segment the segment of the struct + public static @CType("const VkSampler *") java.lang.foreign.MemorySegment get_pImmutableSamplers(MemorySegment segment) { return VkDescriptorSetLayoutBinding.get_pImmutableSamplers(segment, 0L); } + /// {@return `pImmutableSamplers` at the given index} + /// @param index the index + public @CType("const VkSampler *") java.lang.foreign.MemorySegment pImmutableSamplersAt(long index) { return VkDescriptorSetLayoutBinding.get_pImmutableSamplers(this.segment(), index); } + /// {@return `pImmutableSamplers`} + public @CType("const VkSampler *") java.lang.foreign.MemorySegment pImmutableSamplers() { return VkDescriptorSetLayoutBinding.get_pImmutableSamplers(this.segment()); } + /// Sets `pImmutableSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pImmutableSamplers(MemorySegment segment, long index, @CType("const VkSampler *") java.lang.foreign.MemorySegment value) { VH_pImmutableSamplers.set(segment, 0L, index, value); } + /// Sets `pImmutableSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pImmutableSamplers(MemorySegment segment, @CType("const VkSampler *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutBinding.set_pImmutableSamplers(segment, 0L, value); } + /// Sets `pImmutableSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBinding pImmutableSamplersAt(long index, @CType("const VkSampler *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutBinding.set_pImmutableSamplers(this.segment(), index, value); return this; } + /// Sets `pImmutableSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBinding pImmutableSamplers(@CType("const VkSampler *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutBinding.set_pImmutableSamplers(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutBindingFlagsCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutBindingFlagsCreateInfo.java new file mode 100644 index 00000000..a289e419 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutBindingFlagsCreateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### bindingCount +/// [VarHandle][#VH_bindingCount] - [Getter][#bindingCount()] - [Setter][#bindingCount(int)] +/// ### pBindingFlags +/// [VarHandle][#VH_pBindingFlags] - [Getter][#pBindingFlags()] - [Setter][#pBindingFlags(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorSetLayoutBindingFlagsCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t bindingCount; +/// const VkDescriptorBindingFlags * pBindingFlags; +/// } VkDescriptorSetLayoutBindingFlagsCreateInfo; +/// ``` +public final class VkDescriptorSetLayoutBindingFlagsCreateInfo extends Struct { + /// The struct layout of `VkDescriptorSetLayoutBindingFlagsCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("bindingCount"), + ValueLayout.ADDRESS.withName("pBindingFlags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `bindingCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bindingCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bindingCount")); + /// The [VarHandle] of `pBindingFlags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBindingFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBindingFlags")); + + /// Creates `VkDescriptorSetLayoutBindingFlagsCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDescriptorSetLayoutBindingFlagsCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorSetLayoutBindingFlagsCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutBindingFlagsCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutBindingFlagsCreateInfo(segment); } + + /// Creates `VkDescriptorSetLayoutBindingFlagsCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutBindingFlagsCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutBindingFlagsCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorSetLayoutBindingFlagsCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutBindingFlagsCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutBindingFlagsCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorSetLayoutBindingFlagsCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorSetLayoutBindingFlagsCreateInfo` + public static VkDescriptorSetLayoutBindingFlagsCreateInfo alloc(SegmentAllocator allocator) { return new VkDescriptorSetLayoutBindingFlagsCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorSetLayoutBindingFlagsCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorSetLayoutBindingFlagsCreateInfo` + public static VkDescriptorSetLayoutBindingFlagsCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDescriptorSetLayoutBindingFlagsCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBindingFlagsCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBindingFlagsCreateInfo sType(@CType("VkStructureType") int value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBindingFlagsCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBindingFlagsCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `bindingCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bindingCount(MemorySegment segment, long index) { return (int) VH_bindingCount.get(segment, 0L, index); } + /// {@return `bindingCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bindingCount(MemorySegment segment) { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_bindingCount(segment, 0L); } + /// {@return `bindingCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bindingCountAt(long index) { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_bindingCount(this.segment(), index); } + /// {@return `bindingCount`} + public @CType("uint32_t") int bindingCount() { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_bindingCount(this.segment()); } + /// Sets `bindingCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bindingCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bindingCount.set(segment, 0L, index, value); } + /// Sets `bindingCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bindingCount(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_bindingCount(segment, 0L, value); } + /// Sets `bindingCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBindingFlagsCreateInfo bindingCountAt(long index, @CType("uint32_t") int value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_bindingCount(this.segment(), index, value); return this; } + /// Sets `bindingCount` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBindingFlagsCreateInfo bindingCount(@CType("uint32_t") int value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_bindingCount(this.segment(), value); return this; } + + /// {@return `pBindingFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorBindingFlags *") java.lang.foreign.MemorySegment get_pBindingFlags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBindingFlags.get(segment, 0L, index); } + /// {@return `pBindingFlags`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorBindingFlags *") java.lang.foreign.MemorySegment get_pBindingFlags(MemorySegment segment) { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_pBindingFlags(segment, 0L); } + /// {@return `pBindingFlags` at the given index} + /// @param index the index + public @CType("const VkDescriptorBindingFlags *") java.lang.foreign.MemorySegment pBindingFlagsAt(long index) { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_pBindingFlags(this.segment(), index); } + /// {@return `pBindingFlags`} + public @CType("const VkDescriptorBindingFlags *") java.lang.foreign.MemorySegment pBindingFlags() { return VkDescriptorSetLayoutBindingFlagsCreateInfo.get_pBindingFlags(this.segment()); } + /// Sets `pBindingFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBindingFlags(MemorySegment segment, long index, @CType("const VkDescriptorBindingFlags *") java.lang.foreign.MemorySegment value) { VH_pBindingFlags.set(segment, 0L, index, value); } + /// Sets `pBindingFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBindingFlags(MemorySegment segment, @CType("const VkDescriptorBindingFlags *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_pBindingFlags(segment, 0L, value); } + /// Sets `pBindingFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBindingFlagsCreateInfo pBindingFlagsAt(long index, @CType("const VkDescriptorBindingFlags *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_pBindingFlags(this.segment(), index, value); return this; } + /// Sets `pBindingFlags` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutBindingFlagsCreateInfo pBindingFlags(@CType("const VkDescriptorBindingFlags *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutBindingFlagsCreateInfo.set_pBindingFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutCreateInfo.java new file mode 100644 index 00000000..2542c919 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutCreateInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### bindingCount +/// [VarHandle][#VH_bindingCount] - [Getter][#bindingCount()] - [Setter][#bindingCount(int)] +/// ### pBindings +/// [VarHandle][#VH_pBindings] - [Getter][#pBindings()] - [Setter][#pBindings(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorSetLayoutCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDescriptorSetLayoutCreateFlags flags; +/// uint32_t bindingCount; +/// const VkDescriptorSetLayoutBinding * pBindings; +/// } VkDescriptorSetLayoutCreateInfo; +/// ``` +public final class VkDescriptorSetLayoutCreateInfo extends Struct { + /// The struct layout of `VkDescriptorSetLayoutCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("bindingCount"), + ValueLayout.ADDRESS.withName("pBindings") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `bindingCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bindingCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bindingCount")); + /// The [VarHandle] of `pBindings` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBindings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBindings")); + + /// Creates `VkDescriptorSetLayoutCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDescriptorSetLayoutCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorSetLayoutCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutCreateInfo(segment); } + + /// Creates `VkDescriptorSetLayoutCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorSetLayoutCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorSetLayoutCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorSetLayoutCreateInfo` + public static VkDescriptorSetLayoutCreateInfo alloc(SegmentAllocator allocator) { return new VkDescriptorSetLayoutCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorSetLayoutCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorSetLayoutCreateInfo` + public static VkDescriptorSetLayoutCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDescriptorSetLayoutCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorSetLayoutCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorSetLayoutCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorSetLayoutCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorSetLayoutCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorSetLayoutCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutCreateInfo sType(@CType("VkStructureType") int value) { VkDescriptorSetLayoutCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorSetLayoutCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorSetLayoutCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorSetLayoutCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorSetLayoutCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorSetLayoutCreateFlags") int get_flags(MemorySegment segment) { return VkDescriptorSetLayoutCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDescriptorSetLayoutCreateFlags") int flagsAt(long index) { return VkDescriptorSetLayoutCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDescriptorSetLayoutCreateFlags") int flags() { return VkDescriptorSetLayoutCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDescriptorSetLayoutCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDescriptorSetLayoutCreateFlags") int value) { VkDescriptorSetLayoutCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutCreateInfo flagsAt(long index, @CType("VkDescriptorSetLayoutCreateFlags") int value) { VkDescriptorSetLayoutCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutCreateInfo flags(@CType("VkDescriptorSetLayoutCreateFlags") int value) { VkDescriptorSetLayoutCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `bindingCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bindingCount(MemorySegment segment, long index) { return (int) VH_bindingCount.get(segment, 0L, index); } + /// {@return `bindingCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bindingCount(MemorySegment segment) { return VkDescriptorSetLayoutCreateInfo.get_bindingCount(segment, 0L); } + /// {@return `bindingCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bindingCountAt(long index) { return VkDescriptorSetLayoutCreateInfo.get_bindingCount(this.segment(), index); } + /// {@return `bindingCount`} + public @CType("uint32_t") int bindingCount() { return VkDescriptorSetLayoutCreateInfo.get_bindingCount(this.segment()); } + /// Sets `bindingCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bindingCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bindingCount.set(segment, 0L, index, value); } + /// Sets `bindingCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bindingCount(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorSetLayoutCreateInfo.set_bindingCount(segment, 0L, value); } + /// Sets `bindingCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutCreateInfo bindingCountAt(long index, @CType("uint32_t") int value) { VkDescriptorSetLayoutCreateInfo.set_bindingCount(this.segment(), index, value); return this; } + /// Sets `bindingCount` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutCreateInfo bindingCount(@CType("uint32_t") int value) { VkDescriptorSetLayoutCreateInfo.set_bindingCount(this.segment(), value); return this; } + + /// {@return `pBindings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorSetLayoutBinding *") java.lang.foreign.MemorySegment get_pBindings(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBindings.get(segment, 0L, index); } + /// {@return `pBindings`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorSetLayoutBinding *") java.lang.foreign.MemorySegment get_pBindings(MemorySegment segment) { return VkDescriptorSetLayoutCreateInfo.get_pBindings(segment, 0L); } + /// {@return `pBindings` at the given index} + /// @param index the index + public @CType("const VkDescriptorSetLayoutBinding *") java.lang.foreign.MemorySegment pBindingsAt(long index) { return VkDescriptorSetLayoutCreateInfo.get_pBindings(this.segment(), index); } + /// {@return `pBindings`} + public @CType("const VkDescriptorSetLayoutBinding *") java.lang.foreign.MemorySegment pBindings() { return VkDescriptorSetLayoutCreateInfo.get_pBindings(this.segment()); } + /// Sets `pBindings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBindings(MemorySegment segment, long index, @CType("const VkDescriptorSetLayoutBinding *") java.lang.foreign.MemorySegment value) { VH_pBindings.set(segment, 0L, index, value); } + /// Sets `pBindings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBindings(MemorySegment segment, @CType("const VkDescriptorSetLayoutBinding *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutCreateInfo.set_pBindings(segment, 0L, value); } + /// Sets `pBindings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutCreateInfo pBindingsAt(long index, @CType("const VkDescriptorSetLayoutBinding *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutCreateInfo.set_pBindings(this.segment(), index, value); return this; } + /// Sets `pBindings` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutCreateInfo pBindings(@CType("const VkDescriptorSetLayoutBinding *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutCreateInfo.set_pBindings(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutSupport.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutSupport.java new file mode 100644 index 00000000..90482133 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetLayoutSupport.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### supported +/// [VarHandle][#VH_supported] - [Getter][#supported()] - [Setter][#supported(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorSetLayoutSupport { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 supported; +/// } VkDescriptorSetLayoutSupport; +/// ``` +public final class VkDescriptorSetLayoutSupport extends Struct { + /// The struct layout of `VkDescriptorSetLayoutSupport`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("supported") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `supported` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supported = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supported")); + + /// Creates `VkDescriptorSetLayoutSupport` with the given segment. + /// @param segment the memory segment + public VkDescriptorSetLayoutSupport(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorSetLayoutSupport` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutSupport of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutSupport(segment); } + + /// Creates `VkDescriptorSetLayoutSupport` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutSupport ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutSupport(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorSetLayoutSupport` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutSupport ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutSupport(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorSetLayoutSupport` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorSetLayoutSupport` + public static VkDescriptorSetLayoutSupport alloc(SegmentAllocator allocator) { return new VkDescriptorSetLayoutSupport(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorSetLayoutSupport` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorSetLayoutSupport` + public static VkDescriptorSetLayoutSupport alloc(SegmentAllocator allocator, long count) { return new VkDescriptorSetLayoutSupport(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorSetLayoutSupport.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorSetLayoutSupport.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorSetLayoutSupport.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorSetLayoutSupport.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutSupport sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorSetLayoutSupport.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutSupport sType(@CType("VkStructureType") int value) { VkDescriptorSetLayoutSupport.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorSetLayoutSupport.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorSetLayoutSupport.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorSetLayoutSupport.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutSupport.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutSupport pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutSupport.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutSupport pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutSupport.set_pNext(this.segment(), value); return this; } + + /// {@return `supported` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_supported(MemorySegment segment, long index) { return (int) VH_supported.get(segment, 0L, index); } + /// {@return `supported`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_supported(MemorySegment segment) { return VkDescriptorSetLayoutSupport.get_supported(segment, 0L); } + /// {@return `supported` at the given index} + /// @param index the index + public @CType("VkBool32") int supportedAt(long index) { return VkDescriptorSetLayoutSupport.get_supported(this.segment(), index); } + /// {@return `supported`} + public @CType("VkBool32") int supported() { return VkDescriptorSetLayoutSupport.get_supported(this.segment()); } + /// Sets `supported` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supported(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_supported.set(segment, 0L, index, value); } + /// Sets `supported` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supported(MemorySegment segment, @CType("VkBool32") int value) { VkDescriptorSetLayoutSupport.set_supported(segment, 0L, value); } + /// Sets `supported` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutSupport supportedAt(long index, @CType("VkBool32") int value) { VkDescriptorSetLayoutSupport.set_supported(this.segment(), index, value); return this; } + /// Sets `supported` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutSupport supported(@CType("VkBool32") int value) { VkDescriptorSetLayoutSupport.set_supported(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetVariableDescriptorCountAllocateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetVariableDescriptorCountAllocateInfo.java new file mode 100644 index 00000000..53a3a7dc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetVariableDescriptorCountAllocateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### descriptorSetCount +/// [VarHandle][#VH_descriptorSetCount] - [Getter][#descriptorSetCount()] - [Setter][#descriptorSetCount(int)] +/// ### pDescriptorCounts +/// [VarHandle][#VH_pDescriptorCounts] - [Getter][#pDescriptorCounts()] - [Setter][#pDescriptorCounts(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorSetVariableDescriptorCountAllocateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t descriptorSetCount; +/// const uint32_t * pDescriptorCounts; +/// } VkDescriptorSetVariableDescriptorCountAllocateInfo; +/// ``` +public final class VkDescriptorSetVariableDescriptorCountAllocateInfo extends Struct { + /// The struct layout of `VkDescriptorSetVariableDescriptorCountAllocateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("descriptorSetCount"), + ValueLayout.ADDRESS.withName("pDescriptorCounts") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `descriptorSetCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorSetCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSetCount")); + /// The [VarHandle] of `pDescriptorCounts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDescriptorCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDescriptorCounts")); + + /// Creates `VkDescriptorSetVariableDescriptorCountAllocateInfo` with the given segment. + /// @param segment the memory segment + public VkDescriptorSetVariableDescriptorCountAllocateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorSetVariableDescriptorCountAllocateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetVariableDescriptorCountAllocateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetVariableDescriptorCountAllocateInfo(segment); } + + /// Creates `VkDescriptorSetVariableDescriptorCountAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetVariableDescriptorCountAllocateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetVariableDescriptorCountAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorSetVariableDescriptorCountAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetVariableDescriptorCountAllocateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetVariableDescriptorCountAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorSetVariableDescriptorCountAllocateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorSetVariableDescriptorCountAllocateInfo` + public static VkDescriptorSetVariableDescriptorCountAllocateInfo alloc(SegmentAllocator allocator) { return new VkDescriptorSetVariableDescriptorCountAllocateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorSetVariableDescriptorCountAllocateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorSetVariableDescriptorCountAllocateInfo` + public static VkDescriptorSetVariableDescriptorCountAllocateInfo alloc(SegmentAllocator allocator, long count) { return new VkDescriptorSetVariableDescriptorCountAllocateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountAllocateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountAllocateInfo sType(@CType("VkStructureType") int value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountAllocateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountAllocateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `descriptorSetCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorSetCount(MemorySegment segment, long index) { return (int) VH_descriptorSetCount.get(segment, 0L, index); } + /// {@return `descriptorSetCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorSetCount(MemorySegment segment) { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_descriptorSetCount(segment, 0L); } + /// {@return `descriptorSetCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorSetCountAt(long index) { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_descriptorSetCount(this.segment(), index); } + /// {@return `descriptorSetCount`} + public @CType("uint32_t") int descriptorSetCount() { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_descriptorSetCount(this.segment()); } + /// Sets `descriptorSetCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSetCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorSetCount.set(segment, 0L, index, value); } + /// Sets `descriptorSetCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSetCount(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_descriptorSetCount(segment, 0L, value); } + /// Sets `descriptorSetCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountAllocateInfo descriptorSetCountAt(long index, @CType("uint32_t") int value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_descriptorSetCount(this.segment(), index, value); return this; } + /// Sets `descriptorSetCount` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountAllocateInfo descriptorSetCount(@CType("uint32_t") int value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_descriptorSetCount(this.segment(), value); return this; } + + /// {@return `pDescriptorCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDescriptorCounts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDescriptorCounts.get(segment, 0L, index); } + /// {@return `pDescriptorCounts`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDescriptorCounts(MemorySegment segment) { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_pDescriptorCounts(segment, 0L); } + /// {@return `pDescriptorCounts` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDescriptorCountsAt(long index) { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_pDescriptorCounts(this.segment(), index); } + /// {@return `pDescriptorCounts`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDescriptorCounts() { return VkDescriptorSetVariableDescriptorCountAllocateInfo.get_pDescriptorCounts(this.segment()); } + /// Sets `pDescriptorCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDescriptorCounts(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pDescriptorCounts.set(segment, 0L, index, value); } + /// Sets `pDescriptorCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDescriptorCounts(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_pDescriptorCounts(segment, 0L, value); } + /// Sets `pDescriptorCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountAllocateInfo pDescriptorCountsAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_pDescriptorCounts(this.segment(), index, value); return this; } + /// Sets `pDescriptorCounts` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountAllocateInfo pDescriptorCounts(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDescriptorSetVariableDescriptorCountAllocateInfo.set_pDescriptorCounts(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetVariableDescriptorCountLayoutSupport.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetVariableDescriptorCountLayoutSupport.java new file mode 100644 index 00000000..68b95a81 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorSetVariableDescriptorCountLayoutSupport.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxVariableDescriptorCount +/// [VarHandle][#VH_maxVariableDescriptorCount] - [Getter][#maxVariableDescriptorCount()] - [Setter][#maxVariableDescriptorCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorSetVariableDescriptorCountLayoutSupport { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxVariableDescriptorCount; +/// } VkDescriptorSetVariableDescriptorCountLayoutSupport; +/// ``` +public final class VkDescriptorSetVariableDescriptorCountLayoutSupport extends Struct { + /// The struct layout of `VkDescriptorSetVariableDescriptorCountLayoutSupport`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxVariableDescriptorCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxVariableDescriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVariableDescriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVariableDescriptorCount")); + + /// Creates `VkDescriptorSetVariableDescriptorCountLayoutSupport` with the given segment. + /// @param segment the memory segment + public VkDescriptorSetVariableDescriptorCountLayoutSupport(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorSetVariableDescriptorCountLayoutSupport` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetVariableDescriptorCountLayoutSupport of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetVariableDescriptorCountLayoutSupport(segment); } + + /// Creates `VkDescriptorSetVariableDescriptorCountLayoutSupport` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetVariableDescriptorCountLayoutSupport ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetVariableDescriptorCountLayoutSupport(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorSetVariableDescriptorCountLayoutSupport` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetVariableDescriptorCountLayoutSupport ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetVariableDescriptorCountLayoutSupport(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorSetVariableDescriptorCountLayoutSupport` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorSetVariableDescriptorCountLayoutSupport` + public static VkDescriptorSetVariableDescriptorCountLayoutSupport alloc(SegmentAllocator allocator) { return new VkDescriptorSetVariableDescriptorCountLayoutSupport(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorSetVariableDescriptorCountLayoutSupport` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorSetVariableDescriptorCountLayoutSupport` + public static VkDescriptorSetVariableDescriptorCountLayoutSupport alloc(SegmentAllocator allocator, long count) { return new VkDescriptorSetVariableDescriptorCountLayoutSupport(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorSetVariableDescriptorCountLayoutSupport.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorSetVariableDescriptorCountLayoutSupport.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorSetVariableDescriptorCountLayoutSupport.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorSetVariableDescriptorCountLayoutSupport.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountLayoutSupport sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorSetVariableDescriptorCountLayoutSupport.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountLayoutSupport sType(@CType("VkStructureType") int value) { VkDescriptorSetVariableDescriptorCountLayoutSupport.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorSetVariableDescriptorCountLayoutSupport.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorSetVariableDescriptorCountLayoutSupport.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorSetVariableDescriptorCountLayoutSupport.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetVariableDescriptorCountLayoutSupport.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountLayoutSupport pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetVariableDescriptorCountLayoutSupport.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountLayoutSupport pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetVariableDescriptorCountLayoutSupport.set_pNext(this.segment(), value); return this; } + + /// {@return `maxVariableDescriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVariableDescriptorCount(MemorySegment segment, long index) { return (int) VH_maxVariableDescriptorCount.get(segment, 0L, index); } + /// {@return `maxVariableDescriptorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVariableDescriptorCount(MemorySegment segment) { return VkDescriptorSetVariableDescriptorCountLayoutSupport.get_maxVariableDescriptorCount(segment, 0L); } + /// {@return `maxVariableDescriptorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVariableDescriptorCountAt(long index) { return VkDescriptorSetVariableDescriptorCountLayoutSupport.get_maxVariableDescriptorCount(this.segment(), index); } + /// {@return `maxVariableDescriptorCount`} + public @CType("uint32_t") int maxVariableDescriptorCount() { return VkDescriptorSetVariableDescriptorCountLayoutSupport.get_maxVariableDescriptorCount(this.segment()); } + /// Sets `maxVariableDescriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVariableDescriptorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVariableDescriptorCount.set(segment, 0L, index, value); } + /// Sets `maxVariableDescriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVariableDescriptorCount(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorSetVariableDescriptorCountLayoutSupport.set_maxVariableDescriptorCount(segment, 0L, value); } + /// Sets `maxVariableDescriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountLayoutSupport maxVariableDescriptorCountAt(long index, @CType("uint32_t") int value) { VkDescriptorSetVariableDescriptorCountLayoutSupport.set_maxVariableDescriptorCount(this.segment(), index, value); return this; } + /// Sets `maxVariableDescriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetVariableDescriptorCountLayoutSupport maxVariableDescriptorCount(@CType("uint32_t") int value) { VkDescriptorSetVariableDescriptorCountLayoutSupport.set_maxVariableDescriptorCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorUpdateTemplateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorUpdateTemplateCreateInfo.java new file mode 100644 index 00000000..919e24af --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorUpdateTemplateCreateInfo.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### descriptorUpdateEntryCount +/// [VarHandle][#VH_descriptorUpdateEntryCount] - [Getter][#descriptorUpdateEntryCount()] - [Setter][#descriptorUpdateEntryCount(int)] +/// ### pDescriptorUpdateEntries +/// [VarHandle][#VH_pDescriptorUpdateEntries] - [Getter][#pDescriptorUpdateEntries()] - [Setter][#pDescriptorUpdateEntries(java.lang.foreign.MemorySegment)] +/// ### templateType +/// [VarHandle][#VH_templateType] - [Getter][#templateType()] - [Setter][#templateType(int)] +/// ### descriptorSetLayout +/// [VarHandle][#VH_descriptorSetLayout] - [Getter][#descriptorSetLayout()] - [Setter][#descriptorSetLayout(java.lang.foreign.MemorySegment)] +/// ### pipelineBindPoint +/// [VarHandle][#VH_pipelineBindPoint] - [Getter][#pipelineBindPoint()] - [Setter][#pipelineBindPoint(int)] +/// ### pipelineLayout +/// [VarHandle][#VH_pipelineLayout] - [Getter][#pipelineLayout()] - [Setter][#pipelineLayout(java.lang.foreign.MemorySegment)] +/// ### set +/// [VarHandle][#VH_set] - [Getter][#set()] - [Setter][#set(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorUpdateTemplateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDescriptorUpdateTemplateCreateFlags flags; +/// uint32_t descriptorUpdateEntryCount; +/// const VkDescriptorUpdateTemplateEntry * pDescriptorUpdateEntries; +/// VkDescriptorUpdateTemplateType templateType; +/// VkDescriptorSetLayout descriptorSetLayout; +/// VkPipelineBindPoint pipelineBindPoint; +/// VkPipelineLayout pipelineLayout; +/// uint32_t set; +/// } VkDescriptorUpdateTemplateCreateInfo; +/// ``` +public final class VkDescriptorUpdateTemplateCreateInfo extends Struct { + /// The struct layout of `VkDescriptorUpdateTemplateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("descriptorUpdateEntryCount"), + ValueLayout.ADDRESS.withName("pDescriptorUpdateEntries"), + ValueLayout.JAVA_INT.withName("templateType"), + ValueLayout.ADDRESS.withName("descriptorSetLayout"), + ValueLayout.JAVA_INT.withName("pipelineBindPoint"), + ValueLayout.ADDRESS.withName("pipelineLayout"), + ValueLayout.JAVA_INT.withName("set") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `descriptorUpdateEntryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorUpdateEntryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorUpdateEntryCount")); + /// The [VarHandle] of `pDescriptorUpdateEntries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDescriptorUpdateEntries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDescriptorUpdateEntries")); + /// The [VarHandle] of `templateType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_templateType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("templateType")); + /// The [VarHandle] of `descriptorSetLayout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_descriptorSetLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSetLayout")); + /// The [VarHandle] of `pipelineBindPoint` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBindPoint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBindPoint")); + /// The [VarHandle] of `pipelineLayout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pipelineLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineLayout")); + /// The [VarHandle] of `set` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_set = LAYOUT.arrayElementVarHandle(PathElement.groupElement("set")); + + /// Creates `VkDescriptorUpdateTemplateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDescriptorUpdateTemplateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorUpdateTemplateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorUpdateTemplateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorUpdateTemplateCreateInfo(segment); } + + /// Creates `VkDescriptorUpdateTemplateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorUpdateTemplateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorUpdateTemplateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorUpdateTemplateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorUpdateTemplateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorUpdateTemplateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorUpdateTemplateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorUpdateTemplateCreateInfo` + public static VkDescriptorUpdateTemplateCreateInfo alloc(SegmentAllocator allocator) { return new VkDescriptorUpdateTemplateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorUpdateTemplateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorUpdateTemplateCreateInfo` + public static VkDescriptorUpdateTemplateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDescriptorUpdateTemplateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorUpdateTemplateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorUpdateTemplateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorUpdateTemplateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorUpdateTemplateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorUpdateTemplateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo sType(@CType("VkStructureType") int value) { VkDescriptorUpdateTemplateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorUpdateTemplateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorUpdateTemplateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorUpdateTemplateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorUpdateTemplateCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorUpdateTemplateCreateFlags") int get_flags(MemorySegment segment) { return VkDescriptorUpdateTemplateCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDescriptorUpdateTemplateCreateFlags") int flagsAt(long index) { return VkDescriptorUpdateTemplateCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDescriptorUpdateTemplateCreateFlags") int flags() { return VkDescriptorUpdateTemplateCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDescriptorUpdateTemplateCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDescriptorUpdateTemplateCreateFlags") int value) { VkDescriptorUpdateTemplateCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo flagsAt(long index, @CType("VkDescriptorUpdateTemplateCreateFlags") int value) { VkDescriptorUpdateTemplateCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo flags(@CType("VkDescriptorUpdateTemplateCreateFlags") int value) { VkDescriptorUpdateTemplateCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `descriptorUpdateEntryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorUpdateEntryCount(MemorySegment segment, long index) { return (int) VH_descriptorUpdateEntryCount.get(segment, 0L, index); } + /// {@return `descriptorUpdateEntryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorUpdateEntryCount(MemorySegment segment) { return VkDescriptorUpdateTemplateCreateInfo.get_descriptorUpdateEntryCount(segment, 0L); } + /// {@return `descriptorUpdateEntryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorUpdateEntryCountAt(long index) { return VkDescriptorUpdateTemplateCreateInfo.get_descriptorUpdateEntryCount(this.segment(), index); } + /// {@return `descriptorUpdateEntryCount`} + public @CType("uint32_t") int descriptorUpdateEntryCount() { return VkDescriptorUpdateTemplateCreateInfo.get_descriptorUpdateEntryCount(this.segment()); } + /// Sets `descriptorUpdateEntryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorUpdateEntryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorUpdateEntryCount.set(segment, 0L, index, value); } + /// Sets `descriptorUpdateEntryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorUpdateEntryCount(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorUpdateTemplateCreateInfo.set_descriptorUpdateEntryCount(segment, 0L, value); } + /// Sets `descriptorUpdateEntryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo descriptorUpdateEntryCountAt(long index, @CType("uint32_t") int value) { VkDescriptorUpdateTemplateCreateInfo.set_descriptorUpdateEntryCount(this.segment(), index, value); return this; } + /// Sets `descriptorUpdateEntryCount` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo descriptorUpdateEntryCount(@CType("uint32_t") int value) { VkDescriptorUpdateTemplateCreateInfo.set_descriptorUpdateEntryCount(this.segment(), value); return this; } + + /// {@return `pDescriptorUpdateEntries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorUpdateTemplateEntry *") java.lang.foreign.MemorySegment get_pDescriptorUpdateEntries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDescriptorUpdateEntries.get(segment, 0L, index); } + /// {@return `pDescriptorUpdateEntries`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorUpdateTemplateEntry *") java.lang.foreign.MemorySegment get_pDescriptorUpdateEntries(MemorySegment segment) { return VkDescriptorUpdateTemplateCreateInfo.get_pDescriptorUpdateEntries(segment, 0L); } + /// {@return `pDescriptorUpdateEntries` at the given index} + /// @param index the index + public @CType("const VkDescriptorUpdateTemplateEntry *") java.lang.foreign.MemorySegment pDescriptorUpdateEntriesAt(long index) { return VkDescriptorUpdateTemplateCreateInfo.get_pDescriptorUpdateEntries(this.segment(), index); } + /// {@return `pDescriptorUpdateEntries`} + public @CType("const VkDescriptorUpdateTemplateEntry *") java.lang.foreign.MemorySegment pDescriptorUpdateEntries() { return VkDescriptorUpdateTemplateCreateInfo.get_pDescriptorUpdateEntries(this.segment()); } + /// Sets `pDescriptorUpdateEntries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDescriptorUpdateEntries(MemorySegment segment, long index, @CType("const VkDescriptorUpdateTemplateEntry *") java.lang.foreign.MemorySegment value) { VH_pDescriptorUpdateEntries.set(segment, 0L, index, value); } + /// Sets `pDescriptorUpdateEntries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDescriptorUpdateEntries(MemorySegment segment, @CType("const VkDescriptorUpdateTemplateEntry *") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_pDescriptorUpdateEntries(segment, 0L, value); } + /// Sets `pDescriptorUpdateEntries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo pDescriptorUpdateEntriesAt(long index, @CType("const VkDescriptorUpdateTemplateEntry *") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_pDescriptorUpdateEntries(this.segment(), index, value); return this; } + /// Sets `pDescriptorUpdateEntries` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo pDescriptorUpdateEntries(@CType("const VkDescriptorUpdateTemplateEntry *") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_pDescriptorUpdateEntries(this.segment(), value); return this; } + + /// {@return `templateType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorUpdateTemplateType") int get_templateType(MemorySegment segment, long index) { return (int) VH_templateType.get(segment, 0L, index); } + /// {@return `templateType`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorUpdateTemplateType") int get_templateType(MemorySegment segment) { return VkDescriptorUpdateTemplateCreateInfo.get_templateType(segment, 0L); } + /// {@return `templateType` at the given index} + /// @param index the index + public @CType("VkDescriptorUpdateTemplateType") int templateTypeAt(long index) { return VkDescriptorUpdateTemplateCreateInfo.get_templateType(this.segment(), index); } + /// {@return `templateType`} + public @CType("VkDescriptorUpdateTemplateType") int templateType() { return VkDescriptorUpdateTemplateCreateInfo.get_templateType(this.segment()); } + /// Sets `templateType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_templateType(MemorySegment segment, long index, @CType("VkDescriptorUpdateTemplateType") int value) { VH_templateType.set(segment, 0L, index, value); } + /// Sets `templateType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_templateType(MemorySegment segment, @CType("VkDescriptorUpdateTemplateType") int value) { VkDescriptorUpdateTemplateCreateInfo.set_templateType(segment, 0L, value); } + /// Sets `templateType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo templateTypeAt(long index, @CType("VkDescriptorUpdateTemplateType") int value) { VkDescriptorUpdateTemplateCreateInfo.set_templateType(this.segment(), index, value); return this; } + /// Sets `templateType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo templateType(@CType("VkDescriptorUpdateTemplateType") int value) { VkDescriptorUpdateTemplateCreateInfo.set_templateType(this.segment(), value); return this; } + + /// {@return `descriptorSetLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment get_descriptorSetLayout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_descriptorSetLayout.get(segment, 0L, index); } + /// {@return `descriptorSetLayout`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment get_descriptorSetLayout(MemorySegment segment) { return VkDescriptorUpdateTemplateCreateInfo.get_descriptorSetLayout(segment, 0L); } + /// {@return `descriptorSetLayout` at the given index} + /// @param index the index + public @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment descriptorSetLayoutAt(long index) { return VkDescriptorUpdateTemplateCreateInfo.get_descriptorSetLayout(this.segment(), index); } + /// {@return `descriptorSetLayout`} + public @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment descriptorSetLayout() { return VkDescriptorUpdateTemplateCreateInfo.get_descriptorSetLayout(this.segment()); } + /// Sets `descriptorSetLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSetLayout(MemorySegment segment, long index, @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment value) { VH_descriptorSetLayout.set(segment, 0L, index, value); } + /// Sets `descriptorSetLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSetLayout(MemorySegment segment, @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_descriptorSetLayout(segment, 0L, value); } + /// Sets `descriptorSetLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo descriptorSetLayoutAt(long index, @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_descriptorSetLayout(this.segment(), index, value); return this; } + /// Sets `descriptorSetLayout` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo descriptorSetLayout(@CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_descriptorSetLayout(this.segment(), value); return this; } + + /// {@return `pipelineBindPoint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment, long index) { return (int) VH_pipelineBindPoint.get(segment, 0L, index); } + /// {@return `pipelineBindPoint`} + /// @param segment the segment of the struct + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment) { return VkDescriptorUpdateTemplateCreateInfo.get_pipelineBindPoint(segment, 0L); } + /// {@return `pipelineBindPoint` at the given index} + /// @param index the index + public @CType("VkPipelineBindPoint") int pipelineBindPointAt(long index) { return VkDescriptorUpdateTemplateCreateInfo.get_pipelineBindPoint(this.segment(), index); } + /// {@return `pipelineBindPoint`} + public @CType("VkPipelineBindPoint") int pipelineBindPoint() { return VkDescriptorUpdateTemplateCreateInfo.get_pipelineBindPoint(this.segment()); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, long index, @CType("VkPipelineBindPoint") int value) { VH_pipelineBindPoint.set(segment, 0L, index, value); } + /// Sets `pipelineBindPoint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, @CType("VkPipelineBindPoint") int value) { VkDescriptorUpdateTemplateCreateInfo.set_pipelineBindPoint(segment, 0L, value); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo pipelineBindPointAt(long index, @CType("VkPipelineBindPoint") int value) { VkDescriptorUpdateTemplateCreateInfo.set_pipelineBindPoint(this.segment(), index, value); return this; } + /// Sets `pipelineBindPoint` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo pipelineBindPoint(@CType("VkPipelineBindPoint") int value) { VkDescriptorUpdateTemplateCreateInfo.set_pipelineBindPoint(this.segment(), value); return this; } + + /// {@return `pipelineLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_pipelineLayout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pipelineLayout.get(segment, 0L, index); } + /// {@return `pipelineLayout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_pipelineLayout(MemorySegment segment) { return VkDescriptorUpdateTemplateCreateInfo.get_pipelineLayout(segment, 0L); } + /// {@return `pipelineLayout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment pipelineLayoutAt(long index) { return VkDescriptorUpdateTemplateCreateInfo.get_pipelineLayout(this.segment(), index); } + /// {@return `pipelineLayout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment pipelineLayout() { return VkDescriptorUpdateTemplateCreateInfo.get_pipelineLayout(this.segment()); } + /// Sets `pipelineLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineLayout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_pipelineLayout.set(segment, 0L, index, value); } + /// Sets `pipelineLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineLayout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_pipelineLayout(segment, 0L, value); } + /// Sets `pipelineLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo pipelineLayoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_pipelineLayout(this.segment(), index, value); return this; } + /// Sets `pipelineLayout` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo pipelineLayout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkDescriptorUpdateTemplateCreateInfo.set_pipelineLayout(this.segment(), value); return this; } + + /// {@return `set` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_set(MemorySegment segment, long index) { return (int) VH_set.get(segment, 0L, index); } + /// {@return `set`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_set(MemorySegment segment) { return VkDescriptorUpdateTemplateCreateInfo.get_set(segment, 0L); } + /// {@return `set` at the given index} + /// @param index the index + public @CType("uint32_t") int setAt(long index) { return VkDescriptorUpdateTemplateCreateInfo.get_set(this.segment(), index); } + /// {@return `set`} + public @CType("uint32_t") int set() { return VkDescriptorUpdateTemplateCreateInfo.get_set(this.segment()); } + /// Sets `set` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_set(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_set.set(segment, 0L, index, value); } + /// Sets `set` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_set(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorUpdateTemplateCreateInfo.set_set(segment, 0L, value); } + /// Sets `set` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo setAt(long index, @CType("uint32_t") int value) { VkDescriptorUpdateTemplateCreateInfo.set_set(this.segment(), index, value); return this; } + /// Sets `set` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateCreateInfo set(@CType("uint32_t") int value) { VkDescriptorUpdateTemplateCreateInfo.set_set(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorUpdateTemplateEntry.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorUpdateTemplateEntry.java new file mode 100644 index 00000000..54fbe3a1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDescriptorUpdateTemplateEntry.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### dstBinding +/// [VarHandle][#VH_dstBinding] - [Getter][#dstBinding()] - [Setter][#dstBinding(int)] +/// ### dstArrayElement +/// [VarHandle][#VH_dstArrayElement] - [Getter][#dstArrayElement()] - [Setter][#dstArrayElement(int)] +/// ### descriptorCount +/// [VarHandle][#VH_descriptorCount] - [Getter][#descriptorCount()] - [Setter][#descriptorCount(int)] +/// ### descriptorType +/// [VarHandle][#VH_descriptorType] - [Getter][#descriptorType()] - [Setter][#descriptorType(int)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorUpdateTemplateEntry { +/// uint32_t dstBinding; +/// uint32_t dstArrayElement; +/// uint32_t descriptorCount; +/// VkDescriptorType descriptorType; +/// size_t offset; +/// size_t stride; +/// } VkDescriptorUpdateTemplateEntry; +/// ``` +public final class VkDescriptorUpdateTemplateEntry extends Struct { + /// The struct layout of `VkDescriptorUpdateTemplateEntry`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("dstBinding"), + ValueLayout.JAVA_INT.withName("dstArrayElement"), + ValueLayout.JAVA_INT.withName("descriptorCount"), + ValueLayout.JAVA_INT.withName("descriptorType"), + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_LONG.withName("stride") + ); + /// The [VarHandle] of `dstBinding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstBinding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstBinding")); + /// The [VarHandle] of `dstArrayElement` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstArrayElement = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstArrayElement")); + /// The [VarHandle] of `descriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorCount")); + /// The [VarHandle] of `descriptorType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorType")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + + /// Creates `VkDescriptorUpdateTemplateEntry` with the given segment. + /// @param segment the memory segment + public VkDescriptorUpdateTemplateEntry(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorUpdateTemplateEntry` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorUpdateTemplateEntry of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorUpdateTemplateEntry(segment); } + + /// Creates `VkDescriptorUpdateTemplateEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorUpdateTemplateEntry ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorUpdateTemplateEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorUpdateTemplateEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorUpdateTemplateEntry ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorUpdateTemplateEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorUpdateTemplateEntry` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorUpdateTemplateEntry` + public static VkDescriptorUpdateTemplateEntry alloc(SegmentAllocator allocator) { return new VkDescriptorUpdateTemplateEntry(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorUpdateTemplateEntry` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorUpdateTemplateEntry` + public static VkDescriptorUpdateTemplateEntry alloc(SegmentAllocator allocator, long count) { return new VkDescriptorUpdateTemplateEntry(allocator.allocate(LAYOUT, count)); } + + /// {@return `dstBinding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstBinding(MemorySegment segment, long index) { return (int) VH_dstBinding.get(segment, 0L, index); } + /// {@return `dstBinding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstBinding(MemorySegment segment) { return VkDescriptorUpdateTemplateEntry.get_dstBinding(segment, 0L); } + /// {@return `dstBinding` at the given index} + /// @param index the index + public @CType("uint32_t") int dstBindingAt(long index) { return VkDescriptorUpdateTemplateEntry.get_dstBinding(this.segment(), index); } + /// {@return `dstBinding`} + public @CType("uint32_t") int dstBinding() { return VkDescriptorUpdateTemplateEntry.get_dstBinding(this.segment()); } + /// Sets `dstBinding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstBinding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstBinding.set(segment, 0L, index, value); } + /// Sets `dstBinding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstBinding(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorUpdateTemplateEntry.set_dstBinding(segment, 0L, value); } + /// Sets `dstBinding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry dstBindingAt(long index, @CType("uint32_t") int value) { VkDescriptorUpdateTemplateEntry.set_dstBinding(this.segment(), index, value); return this; } + /// Sets `dstBinding` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry dstBinding(@CType("uint32_t") int value) { VkDescriptorUpdateTemplateEntry.set_dstBinding(this.segment(), value); return this; } + + /// {@return `dstArrayElement` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstArrayElement(MemorySegment segment, long index) { return (int) VH_dstArrayElement.get(segment, 0L, index); } + /// {@return `dstArrayElement`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstArrayElement(MemorySegment segment) { return VkDescriptorUpdateTemplateEntry.get_dstArrayElement(segment, 0L); } + /// {@return `dstArrayElement` at the given index} + /// @param index the index + public @CType("uint32_t") int dstArrayElementAt(long index) { return VkDescriptorUpdateTemplateEntry.get_dstArrayElement(this.segment(), index); } + /// {@return `dstArrayElement`} + public @CType("uint32_t") int dstArrayElement() { return VkDescriptorUpdateTemplateEntry.get_dstArrayElement(this.segment()); } + /// Sets `dstArrayElement` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstArrayElement(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstArrayElement.set(segment, 0L, index, value); } + /// Sets `dstArrayElement` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstArrayElement(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorUpdateTemplateEntry.set_dstArrayElement(segment, 0L, value); } + /// Sets `dstArrayElement` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry dstArrayElementAt(long index, @CType("uint32_t") int value) { VkDescriptorUpdateTemplateEntry.set_dstArrayElement(this.segment(), index, value); return this; } + /// Sets `dstArrayElement` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry dstArrayElement(@CType("uint32_t") int value) { VkDescriptorUpdateTemplateEntry.set_dstArrayElement(this.segment(), value); return this; } + + /// {@return `descriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorCount(MemorySegment segment, long index) { return (int) VH_descriptorCount.get(segment, 0L, index); } + /// {@return `descriptorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorCount(MemorySegment segment) { return VkDescriptorUpdateTemplateEntry.get_descriptorCount(segment, 0L); } + /// {@return `descriptorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorCountAt(long index) { return VkDescriptorUpdateTemplateEntry.get_descriptorCount(this.segment(), index); } + /// {@return `descriptorCount`} + public @CType("uint32_t") int descriptorCount() { return VkDescriptorUpdateTemplateEntry.get_descriptorCount(this.segment()); } + /// Sets `descriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorCount.set(segment, 0L, index, value); } + /// Sets `descriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorCount(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorUpdateTemplateEntry.set_descriptorCount(segment, 0L, value); } + /// Sets `descriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry descriptorCountAt(long index, @CType("uint32_t") int value) { VkDescriptorUpdateTemplateEntry.set_descriptorCount(this.segment(), index, value); return this; } + /// Sets `descriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry descriptorCount(@CType("uint32_t") int value) { VkDescriptorUpdateTemplateEntry.set_descriptorCount(this.segment(), value); return this; } + + /// {@return `descriptorType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorType") int get_descriptorType(MemorySegment segment, long index) { return (int) VH_descriptorType.get(segment, 0L, index); } + /// {@return `descriptorType`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorType") int get_descriptorType(MemorySegment segment) { return VkDescriptorUpdateTemplateEntry.get_descriptorType(segment, 0L); } + /// {@return `descriptorType` at the given index} + /// @param index the index + public @CType("VkDescriptorType") int descriptorTypeAt(long index) { return VkDescriptorUpdateTemplateEntry.get_descriptorType(this.segment(), index); } + /// {@return `descriptorType`} + public @CType("VkDescriptorType") int descriptorType() { return VkDescriptorUpdateTemplateEntry.get_descriptorType(this.segment()); } + /// Sets `descriptorType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorType(MemorySegment segment, long index, @CType("VkDescriptorType") int value) { VH_descriptorType.set(segment, 0L, index, value); } + /// Sets `descriptorType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorType(MemorySegment segment, @CType("VkDescriptorType") int value) { VkDescriptorUpdateTemplateEntry.set_descriptorType(segment, 0L, value); } + /// Sets `descriptorType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry descriptorTypeAt(long index, @CType("VkDescriptorType") int value) { VkDescriptorUpdateTemplateEntry.set_descriptorType(this.segment(), index, value); return this; } + /// Sets `descriptorType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry descriptorType(@CType("VkDescriptorType") int value) { VkDescriptorUpdateTemplateEntry.set_descriptorType(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_offset(MemorySegment segment) { return VkDescriptorUpdateTemplateEntry.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("size_t") long offsetAt(long index) { return VkDescriptorUpdateTemplateEntry.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("size_t") long offset() { return VkDescriptorUpdateTemplateEntry.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("size_t") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("size_t") long value) { VkDescriptorUpdateTemplateEntry.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry offsetAt(long index, @CType("size_t") long value) { VkDescriptorUpdateTemplateEntry.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry offset(@CType("size_t") long value) { VkDescriptorUpdateTemplateEntry.set_offset(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_stride(MemorySegment segment, long index) { return (long) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_stride(MemorySegment segment) { return VkDescriptorUpdateTemplateEntry.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("size_t") long strideAt(long index) { return VkDescriptorUpdateTemplateEntry.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("size_t") long stride() { return VkDescriptorUpdateTemplateEntry.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("size_t") long value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("size_t") long value) { VkDescriptorUpdateTemplateEntry.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry strideAt(long index, @CType("size_t") long value) { VkDescriptorUpdateTemplateEntry.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorUpdateTemplateEntry stride(@CType("size_t") long value) { VkDescriptorUpdateTemplateEntry.set_stride(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceBufferMemoryRequirements.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceBufferMemoryRequirements.java new file mode 100644 index 00000000..7a56ac6f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceBufferMemoryRequirements.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pCreateInfo +/// [VarHandle][#VH_pCreateInfo] - [Getter][#pCreateInfo()] - [Setter][#pCreateInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceBufferMemoryRequirements { +/// VkStructureType sType; +/// const void * pNext; +/// const VkBufferCreateInfo * pCreateInfo; +/// } VkDeviceBufferMemoryRequirements; +/// ``` +public final class VkDeviceBufferMemoryRequirements extends Struct { + /// The struct layout of `VkDeviceBufferMemoryRequirements`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pCreateInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pCreateInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCreateInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCreateInfo")); + + /// Creates `VkDeviceBufferMemoryRequirements` with the given segment. + /// @param segment the memory segment + public VkDeviceBufferMemoryRequirements(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceBufferMemoryRequirements` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceBufferMemoryRequirements of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceBufferMemoryRequirements(segment); } + + /// Creates `VkDeviceBufferMemoryRequirements` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceBufferMemoryRequirements ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceBufferMemoryRequirements(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceBufferMemoryRequirements` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceBufferMemoryRequirements ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceBufferMemoryRequirements(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceBufferMemoryRequirements` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceBufferMemoryRequirements` + public static VkDeviceBufferMemoryRequirements alloc(SegmentAllocator allocator) { return new VkDeviceBufferMemoryRequirements(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceBufferMemoryRequirements` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceBufferMemoryRequirements` + public static VkDeviceBufferMemoryRequirements alloc(SegmentAllocator allocator, long count) { return new VkDeviceBufferMemoryRequirements(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceBufferMemoryRequirements.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceBufferMemoryRequirements.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceBufferMemoryRequirements.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceBufferMemoryRequirements.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceBufferMemoryRequirements sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceBufferMemoryRequirements.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceBufferMemoryRequirements sType(@CType("VkStructureType") int value) { VkDeviceBufferMemoryRequirements.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceBufferMemoryRequirements.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceBufferMemoryRequirements.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceBufferMemoryRequirements.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceBufferMemoryRequirements.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceBufferMemoryRequirements pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceBufferMemoryRequirements.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceBufferMemoryRequirements pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceBufferMemoryRequirements.set_pNext(this.segment(), value); return this; } + + /// {@return `pCreateInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkBufferCreateInfo *") java.lang.foreign.MemorySegment get_pCreateInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCreateInfo.get(segment, 0L, index); } + /// {@return `pCreateInfo`} + /// @param segment the segment of the struct + public static @CType("const VkBufferCreateInfo *") java.lang.foreign.MemorySegment get_pCreateInfo(MemorySegment segment) { return VkDeviceBufferMemoryRequirements.get_pCreateInfo(segment, 0L); } + /// {@return `pCreateInfo` at the given index} + /// @param index the index + public @CType("const VkBufferCreateInfo *") java.lang.foreign.MemorySegment pCreateInfoAt(long index) { return VkDeviceBufferMemoryRequirements.get_pCreateInfo(this.segment(), index); } + /// {@return `pCreateInfo`} + public @CType("const VkBufferCreateInfo *") java.lang.foreign.MemorySegment pCreateInfo() { return VkDeviceBufferMemoryRequirements.get_pCreateInfo(this.segment()); } + /// Sets `pCreateInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCreateInfo(MemorySegment segment, long index, @CType("const VkBufferCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pCreateInfo.set(segment, 0L, index, value); } + /// Sets `pCreateInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCreateInfo(MemorySegment segment, @CType("const VkBufferCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceBufferMemoryRequirements.set_pCreateInfo(segment, 0L, value); } + /// Sets `pCreateInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceBufferMemoryRequirements pCreateInfoAt(long index, @CType("const VkBufferCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceBufferMemoryRequirements.set_pCreateInfo(this.segment(), index, value); return this; } + /// Sets `pCreateInfo` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceBufferMemoryRequirements pCreateInfo(@CType("const VkBufferCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceBufferMemoryRequirements.set_pCreateInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceCreateInfo.java new file mode 100644 index 00000000..ae544fc5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceCreateInfo.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### queueCreateInfoCount +/// [VarHandle][#VH_queueCreateInfoCount] - [Getter][#queueCreateInfoCount()] - [Setter][#queueCreateInfoCount(int)] +/// ### pQueueCreateInfos +/// [VarHandle][#VH_pQueueCreateInfos] - [Getter][#pQueueCreateInfos()] - [Setter][#pQueueCreateInfos(java.lang.foreign.MemorySegment)] +/// ### enabledLayerCount +/// [VarHandle][#VH_enabledLayerCount] - [Getter][#enabledLayerCount()] - [Setter][#enabledLayerCount(int)] +/// ### ppEnabledLayerNames +/// [VarHandle][#VH_ppEnabledLayerNames] - [Getter][#ppEnabledLayerNames()] - [Setter][#ppEnabledLayerNames(java.lang.foreign.MemorySegment)] +/// ### enabledExtensionCount +/// [VarHandle][#VH_enabledExtensionCount] - [Getter][#enabledExtensionCount()] - [Setter][#enabledExtensionCount(int)] +/// ### ppEnabledExtensionNames +/// [VarHandle][#VH_ppEnabledExtensionNames] - [Getter][#ppEnabledExtensionNames()] - [Setter][#ppEnabledExtensionNames(java.lang.foreign.MemorySegment)] +/// ### pEnabledFeatures +/// [VarHandle][#VH_pEnabledFeatures] - [Getter][#pEnabledFeatures()] - [Setter][#pEnabledFeatures(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceCreateFlags flags; +/// uint32_t queueCreateInfoCount; +/// const VkDeviceQueueCreateInfo * pQueueCreateInfos; +/// uint32_t enabledLayerCount; +/// const char * const* ppEnabledLayerNames; +/// uint32_t enabledExtensionCount; +/// const char * const* ppEnabledExtensionNames; +/// const VkPhysicalDeviceFeatures * pEnabledFeatures; +/// } VkDeviceCreateInfo; +/// ``` +public final class VkDeviceCreateInfo extends Struct { + /// The struct layout of `VkDeviceCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("queueCreateInfoCount"), + ValueLayout.ADDRESS.withName("pQueueCreateInfos"), + ValueLayout.JAVA_INT.withName("enabledLayerCount"), + ValueLayout.ADDRESS.withName("ppEnabledLayerNames"), + ValueLayout.JAVA_INT.withName("enabledExtensionCount"), + ValueLayout.ADDRESS.withName("ppEnabledExtensionNames"), + ValueLayout.ADDRESS.withName("pEnabledFeatures") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `queueCreateInfoCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueCreateInfoCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueCreateInfoCount")); + /// The [VarHandle] of `pQueueCreateInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pQueueCreateInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pQueueCreateInfos")); + /// The [VarHandle] of `enabledLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enabledLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enabledLayerCount")); + /// The [VarHandle] of `ppEnabledLayerNames` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_ppEnabledLayerNames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ppEnabledLayerNames")); + /// The [VarHandle] of `enabledExtensionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enabledExtensionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enabledExtensionCount")); + /// The [VarHandle] of `ppEnabledExtensionNames` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_ppEnabledExtensionNames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ppEnabledExtensionNames")); + /// The [VarHandle] of `pEnabledFeatures` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pEnabledFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pEnabledFeatures")); + + /// Creates `VkDeviceCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceCreateInfo(segment); } + + /// Creates `VkDeviceCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceCreateInfo` + public static VkDeviceCreateInfo alloc(SegmentAllocator allocator) { return new VkDeviceCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceCreateInfo` + public static VkDeviceCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo sType(@CType("VkStructureType") int value) { VkDeviceCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDeviceCreateFlags") int get_flags(MemorySegment segment) { return VkDeviceCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDeviceCreateFlags") int flagsAt(long index) { return VkDeviceCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDeviceCreateFlags") int flags() { return VkDeviceCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDeviceCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDeviceCreateFlags") int value) { VkDeviceCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo flagsAt(long index, @CType("VkDeviceCreateFlags") int value) { VkDeviceCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo flags(@CType("VkDeviceCreateFlags") int value) { VkDeviceCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `queueCreateInfoCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueCreateInfoCount(MemorySegment segment, long index) { return (int) VH_queueCreateInfoCount.get(segment, 0L, index); } + /// {@return `queueCreateInfoCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueCreateInfoCount(MemorySegment segment) { return VkDeviceCreateInfo.get_queueCreateInfoCount(segment, 0L); } + /// {@return `queueCreateInfoCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queueCreateInfoCountAt(long index) { return VkDeviceCreateInfo.get_queueCreateInfoCount(this.segment(), index); } + /// {@return `queueCreateInfoCount`} + public @CType("uint32_t") int queueCreateInfoCount() { return VkDeviceCreateInfo.get_queueCreateInfoCount(this.segment()); } + /// Sets `queueCreateInfoCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueCreateInfoCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueCreateInfoCount.set(segment, 0L, index, value); } + /// Sets `queueCreateInfoCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueCreateInfoCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceCreateInfo.set_queueCreateInfoCount(segment, 0L, value); } + /// Sets `queueCreateInfoCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo queueCreateInfoCountAt(long index, @CType("uint32_t") int value) { VkDeviceCreateInfo.set_queueCreateInfoCount(this.segment(), index, value); return this; } + /// Sets `queueCreateInfoCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo queueCreateInfoCount(@CType("uint32_t") int value) { VkDeviceCreateInfo.set_queueCreateInfoCount(this.segment(), value); return this; } + + /// {@return `pQueueCreateInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDeviceQueueCreateInfo *") java.lang.foreign.MemorySegment get_pQueueCreateInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pQueueCreateInfos.get(segment, 0L, index); } + /// {@return `pQueueCreateInfos`} + /// @param segment the segment of the struct + public static @CType("const VkDeviceQueueCreateInfo *") java.lang.foreign.MemorySegment get_pQueueCreateInfos(MemorySegment segment) { return VkDeviceCreateInfo.get_pQueueCreateInfos(segment, 0L); } + /// {@return `pQueueCreateInfos` at the given index} + /// @param index the index + public @CType("const VkDeviceQueueCreateInfo *") java.lang.foreign.MemorySegment pQueueCreateInfosAt(long index) { return VkDeviceCreateInfo.get_pQueueCreateInfos(this.segment(), index); } + /// {@return `pQueueCreateInfos`} + public @CType("const VkDeviceQueueCreateInfo *") java.lang.foreign.MemorySegment pQueueCreateInfos() { return VkDeviceCreateInfo.get_pQueueCreateInfos(this.segment()); } + /// Sets `pQueueCreateInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pQueueCreateInfos(MemorySegment segment, long index, @CType("const VkDeviceQueueCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pQueueCreateInfos.set(segment, 0L, index, value); } + /// Sets `pQueueCreateInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pQueueCreateInfos(MemorySegment segment, @CType("const VkDeviceQueueCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_pQueueCreateInfos(segment, 0L, value); } + /// Sets `pQueueCreateInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo pQueueCreateInfosAt(long index, @CType("const VkDeviceQueueCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_pQueueCreateInfos(this.segment(), index, value); return this; } + /// Sets `pQueueCreateInfos` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo pQueueCreateInfos(@CType("const VkDeviceQueueCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_pQueueCreateInfos(this.segment(), value); return this; } + + /// {@return `enabledLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_enabledLayerCount(MemorySegment segment, long index) { return (int) VH_enabledLayerCount.get(segment, 0L, index); } + /// {@return `enabledLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_enabledLayerCount(MemorySegment segment) { return VkDeviceCreateInfo.get_enabledLayerCount(segment, 0L); } + /// {@return `enabledLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int enabledLayerCountAt(long index) { return VkDeviceCreateInfo.get_enabledLayerCount(this.segment(), index); } + /// {@return `enabledLayerCount`} + public @CType("uint32_t") int enabledLayerCount() { return VkDeviceCreateInfo.get_enabledLayerCount(this.segment()); } + /// Sets `enabledLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enabledLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_enabledLayerCount.set(segment, 0L, index, value); } + /// Sets `enabledLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enabledLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceCreateInfo.set_enabledLayerCount(segment, 0L, value); } + /// Sets `enabledLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo enabledLayerCountAt(long index, @CType("uint32_t") int value) { VkDeviceCreateInfo.set_enabledLayerCount(this.segment(), index, value); return this; } + /// Sets `enabledLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo enabledLayerCount(@CType("uint32_t") int value) { VkDeviceCreateInfo.set_enabledLayerCount(this.segment(), value); return this; } + + /// {@return `ppEnabledLayerNames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char * const*") java.lang.foreign.MemorySegment get_ppEnabledLayerNames(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_ppEnabledLayerNames.get(segment, 0L, index); } + /// {@return `ppEnabledLayerNames`} + /// @param segment the segment of the struct + public static @CType("const char * const*") java.lang.foreign.MemorySegment get_ppEnabledLayerNames(MemorySegment segment) { return VkDeviceCreateInfo.get_ppEnabledLayerNames(segment, 0L); } + /// {@return `ppEnabledLayerNames` at the given index} + /// @param index the index + public @CType("const char * const*") java.lang.foreign.MemorySegment ppEnabledLayerNamesAt(long index) { return VkDeviceCreateInfo.get_ppEnabledLayerNames(this.segment(), index); } + /// {@return `ppEnabledLayerNames`} + public @CType("const char * const*") java.lang.foreign.MemorySegment ppEnabledLayerNames() { return VkDeviceCreateInfo.get_ppEnabledLayerNames(this.segment()); } + /// Sets `ppEnabledLayerNames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ppEnabledLayerNames(MemorySegment segment, long index, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VH_ppEnabledLayerNames.set(segment, 0L, index, value); } + /// Sets `ppEnabledLayerNames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ppEnabledLayerNames(MemorySegment segment, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_ppEnabledLayerNames(segment, 0L, value); } + /// Sets `ppEnabledLayerNames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo ppEnabledLayerNamesAt(long index, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_ppEnabledLayerNames(this.segment(), index, value); return this; } + /// Sets `ppEnabledLayerNames` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo ppEnabledLayerNames(@CType("const char * const*") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_ppEnabledLayerNames(this.segment(), value); return this; } + + /// {@return `enabledExtensionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_enabledExtensionCount(MemorySegment segment, long index) { return (int) VH_enabledExtensionCount.get(segment, 0L, index); } + /// {@return `enabledExtensionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_enabledExtensionCount(MemorySegment segment) { return VkDeviceCreateInfo.get_enabledExtensionCount(segment, 0L); } + /// {@return `enabledExtensionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int enabledExtensionCountAt(long index) { return VkDeviceCreateInfo.get_enabledExtensionCount(this.segment(), index); } + /// {@return `enabledExtensionCount`} + public @CType("uint32_t") int enabledExtensionCount() { return VkDeviceCreateInfo.get_enabledExtensionCount(this.segment()); } + /// Sets `enabledExtensionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enabledExtensionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_enabledExtensionCount.set(segment, 0L, index, value); } + /// Sets `enabledExtensionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enabledExtensionCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceCreateInfo.set_enabledExtensionCount(segment, 0L, value); } + /// Sets `enabledExtensionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo enabledExtensionCountAt(long index, @CType("uint32_t") int value) { VkDeviceCreateInfo.set_enabledExtensionCount(this.segment(), index, value); return this; } + /// Sets `enabledExtensionCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo enabledExtensionCount(@CType("uint32_t") int value) { VkDeviceCreateInfo.set_enabledExtensionCount(this.segment(), value); return this; } + + /// {@return `ppEnabledExtensionNames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char * const*") java.lang.foreign.MemorySegment get_ppEnabledExtensionNames(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_ppEnabledExtensionNames.get(segment, 0L, index); } + /// {@return `ppEnabledExtensionNames`} + /// @param segment the segment of the struct + public static @CType("const char * const*") java.lang.foreign.MemorySegment get_ppEnabledExtensionNames(MemorySegment segment) { return VkDeviceCreateInfo.get_ppEnabledExtensionNames(segment, 0L); } + /// {@return `ppEnabledExtensionNames` at the given index} + /// @param index the index + public @CType("const char * const*") java.lang.foreign.MemorySegment ppEnabledExtensionNamesAt(long index) { return VkDeviceCreateInfo.get_ppEnabledExtensionNames(this.segment(), index); } + /// {@return `ppEnabledExtensionNames`} + public @CType("const char * const*") java.lang.foreign.MemorySegment ppEnabledExtensionNames() { return VkDeviceCreateInfo.get_ppEnabledExtensionNames(this.segment()); } + /// Sets `ppEnabledExtensionNames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ppEnabledExtensionNames(MemorySegment segment, long index, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VH_ppEnabledExtensionNames.set(segment, 0L, index, value); } + /// Sets `ppEnabledExtensionNames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ppEnabledExtensionNames(MemorySegment segment, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_ppEnabledExtensionNames(segment, 0L, value); } + /// Sets `ppEnabledExtensionNames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo ppEnabledExtensionNamesAt(long index, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_ppEnabledExtensionNames(this.segment(), index, value); return this; } + /// Sets `ppEnabledExtensionNames` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo ppEnabledExtensionNames(@CType("const char * const*") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_ppEnabledExtensionNames(this.segment(), value); return this; } + + /// {@return `pEnabledFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPhysicalDeviceFeatures *") java.lang.foreign.MemorySegment get_pEnabledFeatures(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pEnabledFeatures.get(segment, 0L, index); } + /// {@return `pEnabledFeatures`} + /// @param segment the segment of the struct + public static @CType("const VkPhysicalDeviceFeatures *") java.lang.foreign.MemorySegment get_pEnabledFeatures(MemorySegment segment) { return VkDeviceCreateInfo.get_pEnabledFeatures(segment, 0L); } + /// {@return `pEnabledFeatures` at the given index} + /// @param index the index + public @CType("const VkPhysicalDeviceFeatures *") java.lang.foreign.MemorySegment pEnabledFeaturesAt(long index) { return VkDeviceCreateInfo.get_pEnabledFeatures(this.segment(), index); } + /// {@return `pEnabledFeatures`} + public @CType("const VkPhysicalDeviceFeatures *") java.lang.foreign.MemorySegment pEnabledFeatures() { return VkDeviceCreateInfo.get_pEnabledFeatures(this.segment()); } + /// Sets `pEnabledFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pEnabledFeatures(MemorySegment segment, long index, @CType("const VkPhysicalDeviceFeatures *") java.lang.foreign.MemorySegment value) { VH_pEnabledFeatures.set(segment, 0L, index, value); } + /// Sets `pEnabledFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pEnabledFeatures(MemorySegment segment, @CType("const VkPhysicalDeviceFeatures *") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_pEnabledFeatures(segment, 0L, value); } + /// Sets `pEnabledFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo pEnabledFeaturesAt(long index, @CType("const VkPhysicalDeviceFeatures *") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_pEnabledFeatures(this.segment(), index, value); return this; } + /// Sets `pEnabledFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceCreateInfo pEnabledFeatures(@CType("const VkPhysicalDeviceFeatures *") java.lang.foreign.MemorySegment value) { VkDeviceCreateInfo.set_pEnabledFeatures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupBindSparseInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupBindSparseInfo.java new file mode 100644 index 00000000..230544b0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupBindSparseInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### resourceDeviceIndex +/// [VarHandle][#VH_resourceDeviceIndex] - [Getter][#resourceDeviceIndex()] - [Setter][#resourceDeviceIndex(int)] +/// ### memoryDeviceIndex +/// [VarHandle][#VH_memoryDeviceIndex] - [Getter][#memoryDeviceIndex()] - [Setter][#memoryDeviceIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceGroupBindSparseInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t resourceDeviceIndex; +/// uint32_t memoryDeviceIndex; +/// } VkDeviceGroupBindSparseInfo; +/// ``` +public final class VkDeviceGroupBindSparseInfo extends Struct { + /// The struct layout of `VkDeviceGroupBindSparseInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("resourceDeviceIndex"), + ValueLayout.JAVA_INT.withName("memoryDeviceIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `resourceDeviceIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_resourceDeviceIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("resourceDeviceIndex")); + /// The [VarHandle] of `memoryDeviceIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryDeviceIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryDeviceIndex")); + + /// Creates `VkDeviceGroupBindSparseInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceGroupBindSparseInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceGroupBindSparseInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupBindSparseInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupBindSparseInfo(segment); } + + /// Creates `VkDeviceGroupBindSparseInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupBindSparseInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupBindSparseInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceGroupBindSparseInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupBindSparseInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupBindSparseInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceGroupBindSparseInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceGroupBindSparseInfo` + public static VkDeviceGroupBindSparseInfo alloc(SegmentAllocator allocator) { return new VkDeviceGroupBindSparseInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceGroupBindSparseInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceGroupBindSparseInfo` + public static VkDeviceGroupBindSparseInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceGroupBindSparseInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceGroupBindSparseInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceGroupBindSparseInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceGroupBindSparseInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceGroupBindSparseInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupBindSparseInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceGroupBindSparseInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupBindSparseInfo sType(@CType("VkStructureType") int value) { VkDeviceGroupBindSparseInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceGroupBindSparseInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceGroupBindSparseInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceGroupBindSparseInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupBindSparseInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupBindSparseInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupBindSparseInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupBindSparseInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupBindSparseInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `resourceDeviceIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_resourceDeviceIndex(MemorySegment segment, long index) { return (int) VH_resourceDeviceIndex.get(segment, 0L, index); } + /// {@return `resourceDeviceIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_resourceDeviceIndex(MemorySegment segment) { return VkDeviceGroupBindSparseInfo.get_resourceDeviceIndex(segment, 0L); } + /// {@return `resourceDeviceIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int resourceDeviceIndexAt(long index) { return VkDeviceGroupBindSparseInfo.get_resourceDeviceIndex(this.segment(), index); } + /// {@return `resourceDeviceIndex`} + public @CType("uint32_t") int resourceDeviceIndex() { return VkDeviceGroupBindSparseInfo.get_resourceDeviceIndex(this.segment()); } + /// Sets `resourceDeviceIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_resourceDeviceIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_resourceDeviceIndex.set(segment, 0L, index, value); } + /// Sets `resourceDeviceIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_resourceDeviceIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceGroupBindSparseInfo.set_resourceDeviceIndex(segment, 0L, value); } + /// Sets `resourceDeviceIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupBindSparseInfo resourceDeviceIndexAt(long index, @CType("uint32_t") int value) { VkDeviceGroupBindSparseInfo.set_resourceDeviceIndex(this.segment(), index, value); return this; } + /// Sets `resourceDeviceIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupBindSparseInfo resourceDeviceIndex(@CType("uint32_t") int value) { VkDeviceGroupBindSparseInfo.set_resourceDeviceIndex(this.segment(), value); return this; } + + /// {@return `memoryDeviceIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryDeviceIndex(MemorySegment segment, long index) { return (int) VH_memoryDeviceIndex.get(segment, 0L, index); } + /// {@return `memoryDeviceIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryDeviceIndex(MemorySegment segment) { return VkDeviceGroupBindSparseInfo.get_memoryDeviceIndex(segment, 0L); } + /// {@return `memoryDeviceIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryDeviceIndexAt(long index) { return VkDeviceGroupBindSparseInfo.get_memoryDeviceIndex(this.segment(), index); } + /// {@return `memoryDeviceIndex`} + public @CType("uint32_t") int memoryDeviceIndex() { return VkDeviceGroupBindSparseInfo.get_memoryDeviceIndex(this.segment()); } + /// Sets `memoryDeviceIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryDeviceIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryDeviceIndex.set(segment, 0L, index, value); } + /// Sets `memoryDeviceIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryDeviceIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceGroupBindSparseInfo.set_memoryDeviceIndex(segment, 0L, value); } + /// Sets `memoryDeviceIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupBindSparseInfo memoryDeviceIndexAt(long index, @CType("uint32_t") int value) { VkDeviceGroupBindSparseInfo.set_memoryDeviceIndex(this.segment(), index, value); return this; } + /// Sets `memoryDeviceIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupBindSparseInfo memoryDeviceIndex(@CType("uint32_t") int value) { VkDeviceGroupBindSparseInfo.set_memoryDeviceIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupCommandBufferBeginInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupCommandBufferBeginInfo.java new file mode 100644 index 00000000..40d802c1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupCommandBufferBeginInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceMask +/// [VarHandle][#VH_deviceMask] - [Getter][#deviceMask()] - [Setter][#deviceMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceGroupCommandBufferBeginInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t deviceMask; +/// } VkDeviceGroupCommandBufferBeginInfo; +/// ``` +public final class VkDeviceGroupCommandBufferBeginInfo extends Struct { + /// The struct layout of `VkDeviceGroupCommandBufferBeginInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceMask")); + + /// Creates `VkDeviceGroupCommandBufferBeginInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceGroupCommandBufferBeginInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceGroupCommandBufferBeginInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupCommandBufferBeginInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupCommandBufferBeginInfo(segment); } + + /// Creates `VkDeviceGroupCommandBufferBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupCommandBufferBeginInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupCommandBufferBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceGroupCommandBufferBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupCommandBufferBeginInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupCommandBufferBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceGroupCommandBufferBeginInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceGroupCommandBufferBeginInfo` + public static VkDeviceGroupCommandBufferBeginInfo alloc(SegmentAllocator allocator) { return new VkDeviceGroupCommandBufferBeginInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceGroupCommandBufferBeginInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceGroupCommandBufferBeginInfo` + public static VkDeviceGroupCommandBufferBeginInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceGroupCommandBufferBeginInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceGroupCommandBufferBeginInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceGroupCommandBufferBeginInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceGroupCommandBufferBeginInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceGroupCommandBufferBeginInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupCommandBufferBeginInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceGroupCommandBufferBeginInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupCommandBufferBeginInfo sType(@CType("VkStructureType") int value) { VkDeviceGroupCommandBufferBeginInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceGroupCommandBufferBeginInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceGroupCommandBufferBeginInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceGroupCommandBufferBeginInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupCommandBufferBeginInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupCommandBufferBeginInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupCommandBufferBeginInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupCommandBufferBeginInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupCommandBufferBeginInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceMask(MemorySegment segment, long index) { return (int) VH_deviceMask.get(segment, 0L, index); } + /// {@return `deviceMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceMask(MemorySegment segment) { return VkDeviceGroupCommandBufferBeginInfo.get_deviceMask(segment, 0L); } + /// {@return `deviceMask` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceMaskAt(long index) { return VkDeviceGroupCommandBufferBeginInfo.get_deviceMask(this.segment(), index); } + /// {@return `deviceMask`} + public @CType("uint32_t") int deviceMask() { return VkDeviceGroupCommandBufferBeginInfo.get_deviceMask(this.segment()); } + /// Sets `deviceMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceMask.set(segment, 0L, index, value); } + /// Sets `deviceMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceMask(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceGroupCommandBufferBeginInfo.set_deviceMask(segment, 0L, value); } + /// Sets `deviceMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupCommandBufferBeginInfo deviceMaskAt(long index, @CType("uint32_t") int value) { VkDeviceGroupCommandBufferBeginInfo.set_deviceMask(this.segment(), index, value); return this; } + /// Sets `deviceMask` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupCommandBufferBeginInfo deviceMask(@CType("uint32_t") int value) { VkDeviceGroupCommandBufferBeginInfo.set_deviceMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupDeviceCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupDeviceCreateInfo.java new file mode 100644 index 00000000..bbbb566a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupDeviceCreateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### physicalDeviceCount +/// [VarHandle][#VH_physicalDeviceCount] - [Getter][#physicalDeviceCount()] - [Setter][#physicalDeviceCount(int)] +/// ### pPhysicalDevices +/// [VarHandle][#VH_pPhysicalDevices] - [Getter][#pPhysicalDevices()] - [Setter][#pPhysicalDevices(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceGroupDeviceCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t physicalDeviceCount; +/// const VkPhysicalDevice * pPhysicalDevices; +/// } VkDeviceGroupDeviceCreateInfo; +/// ``` +public final class VkDeviceGroupDeviceCreateInfo extends Struct { + /// The struct layout of `VkDeviceGroupDeviceCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("physicalDeviceCount"), + ValueLayout.ADDRESS.withName("pPhysicalDevices") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `physicalDeviceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_physicalDeviceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("physicalDeviceCount")); + /// The [VarHandle] of `pPhysicalDevices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPhysicalDevices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPhysicalDevices")); + + /// Creates `VkDeviceGroupDeviceCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceGroupDeviceCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceGroupDeviceCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupDeviceCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupDeviceCreateInfo(segment); } + + /// Creates `VkDeviceGroupDeviceCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupDeviceCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupDeviceCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceGroupDeviceCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupDeviceCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupDeviceCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceGroupDeviceCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceGroupDeviceCreateInfo` + public static VkDeviceGroupDeviceCreateInfo alloc(SegmentAllocator allocator) { return new VkDeviceGroupDeviceCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceGroupDeviceCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceGroupDeviceCreateInfo` + public static VkDeviceGroupDeviceCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceGroupDeviceCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceGroupDeviceCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceGroupDeviceCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceGroupDeviceCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceGroupDeviceCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupDeviceCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceGroupDeviceCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupDeviceCreateInfo sType(@CType("VkStructureType") int value) { VkDeviceGroupDeviceCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceGroupDeviceCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceGroupDeviceCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceGroupDeviceCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupDeviceCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupDeviceCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupDeviceCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupDeviceCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupDeviceCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `physicalDeviceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_physicalDeviceCount(MemorySegment segment, long index) { return (int) VH_physicalDeviceCount.get(segment, 0L, index); } + /// {@return `physicalDeviceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_physicalDeviceCount(MemorySegment segment) { return VkDeviceGroupDeviceCreateInfo.get_physicalDeviceCount(segment, 0L); } + /// {@return `physicalDeviceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int physicalDeviceCountAt(long index) { return VkDeviceGroupDeviceCreateInfo.get_physicalDeviceCount(this.segment(), index); } + /// {@return `physicalDeviceCount`} + public @CType("uint32_t") int physicalDeviceCount() { return VkDeviceGroupDeviceCreateInfo.get_physicalDeviceCount(this.segment()); } + /// Sets `physicalDeviceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_physicalDeviceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_physicalDeviceCount.set(segment, 0L, index, value); } + /// Sets `physicalDeviceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_physicalDeviceCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceGroupDeviceCreateInfo.set_physicalDeviceCount(segment, 0L, value); } + /// Sets `physicalDeviceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupDeviceCreateInfo physicalDeviceCountAt(long index, @CType("uint32_t") int value) { VkDeviceGroupDeviceCreateInfo.set_physicalDeviceCount(this.segment(), index, value); return this; } + /// Sets `physicalDeviceCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupDeviceCreateInfo physicalDeviceCount(@CType("uint32_t") int value) { VkDeviceGroupDeviceCreateInfo.set_physicalDeviceCount(this.segment(), value); return this; } + + /// {@return `pPhysicalDevices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPhysicalDevice *") java.lang.foreign.MemorySegment get_pPhysicalDevices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPhysicalDevices.get(segment, 0L, index); } + /// {@return `pPhysicalDevices`} + /// @param segment the segment of the struct + public static @CType("const VkPhysicalDevice *") java.lang.foreign.MemorySegment get_pPhysicalDevices(MemorySegment segment) { return VkDeviceGroupDeviceCreateInfo.get_pPhysicalDevices(segment, 0L); } + /// {@return `pPhysicalDevices` at the given index} + /// @param index the index + public @CType("const VkPhysicalDevice *") java.lang.foreign.MemorySegment pPhysicalDevicesAt(long index) { return VkDeviceGroupDeviceCreateInfo.get_pPhysicalDevices(this.segment(), index); } + /// {@return `pPhysicalDevices`} + public @CType("const VkPhysicalDevice *") java.lang.foreign.MemorySegment pPhysicalDevices() { return VkDeviceGroupDeviceCreateInfo.get_pPhysicalDevices(this.segment()); } + /// Sets `pPhysicalDevices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPhysicalDevices(MemorySegment segment, long index, @CType("const VkPhysicalDevice *") java.lang.foreign.MemorySegment value) { VH_pPhysicalDevices.set(segment, 0L, index, value); } + /// Sets `pPhysicalDevices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPhysicalDevices(MemorySegment segment, @CType("const VkPhysicalDevice *") java.lang.foreign.MemorySegment value) { VkDeviceGroupDeviceCreateInfo.set_pPhysicalDevices(segment, 0L, value); } + /// Sets `pPhysicalDevices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupDeviceCreateInfo pPhysicalDevicesAt(long index, @CType("const VkPhysicalDevice *") java.lang.foreign.MemorySegment value) { VkDeviceGroupDeviceCreateInfo.set_pPhysicalDevices(this.segment(), index, value); return this; } + /// Sets `pPhysicalDevices` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupDeviceCreateInfo pPhysicalDevices(@CType("const VkPhysicalDevice *") java.lang.foreign.MemorySegment value) { VkDeviceGroupDeviceCreateInfo.set_pPhysicalDevices(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupRenderPassBeginInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupRenderPassBeginInfo.java new file mode 100644 index 00000000..3d6095d9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupRenderPassBeginInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceMask +/// [VarHandle][#VH_deviceMask] - [Getter][#deviceMask()] - [Setter][#deviceMask(int)] +/// ### deviceRenderAreaCount +/// [VarHandle][#VH_deviceRenderAreaCount] - [Getter][#deviceRenderAreaCount()] - [Setter][#deviceRenderAreaCount(int)] +/// ### pDeviceRenderAreas +/// [VarHandle][#VH_pDeviceRenderAreas] - [Getter][#pDeviceRenderAreas()] - [Setter][#pDeviceRenderAreas(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceGroupRenderPassBeginInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t deviceMask; +/// uint32_t deviceRenderAreaCount; +/// const VkRect2D * pDeviceRenderAreas; +/// } VkDeviceGroupRenderPassBeginInfo; +/// ``` +public final class VkDeviceGroupRenderPassBeginInfo extends Struct { + /// The struct layout of `VkDeviceGroupRenderPassBeginInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceMask"), + ValueLayout.JAVA_INT.withName("deviceRenderAreaCount"), + ValueLayout.ADDRESS.withName("pDeviceRenderAreas") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceMask")); + /// The [VarHandle] of `deviceRenderAreaCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceRenderAreaCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceRenderAreaCount")); + /// The [VarHandle] of `pDeviceRenderAreas` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDeviceRenderAreas = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDeviceRenderAreas")); + + /// Creates `VkDeviceGroupRenderPassBeginInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceGroupRenderPassBeginInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceGroupRenderPassBeginInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupRenderPassBeginInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupRenderPassBeginInfo(segment); } + + /// Creates `VkDeviceGroupRenderPassBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupRenderPassBeginInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupRenderPassBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceGroupRenderPassBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupRenderPassBeginInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupRenderPassBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceGroupRenderPassBeginInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceGroupRenderPassBeginInfo` + public static VkDeviceGroupRenderPassBeginInfo alloc(SegmentAllocator allocator) { return new VkDeviceGroupRenderPassBeginInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceGroupRenderPassBeginInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceGroupRenderPassBeginInfo` + public static VkDeviceGroupRenderPassBeginInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceGroupRenderPassBeginInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceGroupRenderPassBeginInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceGroupRenderPassBeginInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceGroupRenderPassBeginInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceGroupRenderPassBeginInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupRenderPassBeginInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceGroupRenderPassBeginInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupRenderPassBeginInfo sType(@CType("VkStructureType") int value) { VkDeviceGroupRenderPassBeginInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceGroupRenderPassBeginInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceGroupRenderPassBeginInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceGroupRenderPassBeginInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupRenderPassBeginInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupRenderPassBeginInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupRenderPassBeginInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupRenderPassBeginInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupRenderPassBeginInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceMask(MemorySegment segment, long index) { return (int) VH_deviceMask.get(segment, 0L, index); } + /// {@return `deviceMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceMask(MemorySegment segment) { return VkDeviceGroupRenderPassBeginInfo.get_deviceMask(segment, 0L); } + /// {@return `deviceMask` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceMaskAt(long index) { return VkDeviceGroupRenderPassBeginInfo.get_deviceMask(this.segment(), index); } + /// {@return `deviceMask`} + public @CType("uint32_t") int deviceMask() { return VkDeviceGroupRenderPassBeginInfo.get_deviceMask(this.segment()); } + /// Sets `deviceMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceMask.set(segment, 0L, index, value); } + /// Sets `deviceMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceMask(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceGroupRenderPassBeginInfo.set_deviceMask(segment, 0L, value); } + /// Sets `deviceMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupRenderPassBeginInfo deviceMaskAt(long index, @CType("uint32_t") int value) { VkDeviceGroupRenderPassBeginInfo.set_deviceMask(this.segment(), index, value); return this; } + /// Sets `deviceMask` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupRenderPassBeginInfo deviceMask(@CType("uint32_t") int value) { VkDeviceGroupRenderPassBeginInfo.set_deviceMask(this.segment(), value); return this; } + + /// {@return `deviceRenderAreaCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceRenderAreaCount(MemorySegment segment, long index) { return (int) VH_deviceRenderAreaCount.get(segment, 0L, index); } + /// {@return `deviceRenderAreaCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceRenderAreaCount(MemorySegment segment) { return VkDeviceGroupRenderPassBeginInfo.get_deviceRenderAreaCount(segment, 0L); } + /// {@return `deviceRenderAreaCount` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceRenderAreaCountAt(long index) { return VkDeviceGroupRenderPassBeginInfo.get_deviceRenderAreaCount(this.segment(), index); } + /// {@return `deviceRenderAreaCount`} + public @CType("uint32_t") int deviceRenderAreaCount() { return VkDeviceGroupRenderPassBeginInfo.get_deviceRenderAreaCount(this.segment()); } + /// Sets `deviceRenderAreaCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceRenderAreaCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceRenderAreaCount.set(segment, 0L, index, value); } + /// Sets `deviceRenderAreaCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceRenderAreaCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceGroupRenderPassBeginInfo.set_deviceRenderAreaCount(segment, 0L, value); } + /// Sets `deviceRenderAreaCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupRenderPassBeginInfo deviceRenderAreaCountAt(long index, @CType("uint32_t") int value) { VkDeviceGroupRenderPassBeginInfo.set_deviceRenderAreaCount(this.segment(), index, value); return this; } + /// Sets `deviceRenderAreaCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupRenderPassBeginInfo deviceRenderAreaCount(@CType("uint32_t") int value) { VkDeviceGroupRenderPassBeginInfo.set_deviceRenderAreaCount(this.segment(), value); return this; } + + /// {@return `pDeviceRenderAreas` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pDeviceRenderAreas(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDeviceRenderAreas.get(segment, 0L, index); } + /// {@return `pDeviceRenderAreas`} + /// @param segment the segment of the struct + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pDeviceRenderAreas(MemorySegment segment) { return VkDeviceGroupRenderPassBeginInfo.get_pDeviceRenderAreas(segment, 0L); } + /// {@return `pDeviceRenderAreas` at the given index} + /// @param index the index + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pDeviceRenderAreasAt(long index) { return VkDeviceGroupRenderPassBeginInfo.get_pDeviceRenderAreas(this.segment(), index); } + /// {@return `pDeviceRenderAreas`} + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pDeviceRenderAreas() { return VkDeviceGroupRenderPassBeginInfo.get_pDeviceRenderAreas(this.segment()); } + /// Sets `pDeviceRenderAreas` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDeviceRenderAreas(MemorySegment segment, long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VH_pDeviceRenderAreas.set(segment, 0L, index, value); } + /// Sets `pDeviceRenderAreas` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDeviceRenderAreas(MemorySegment segment, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkDeviceGroupRenderPassBeginInfo.set_pDeviceRenderAreas(segment, 0L, value); } + /// Sets `pDeviceRenderAreas` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupRenderPassBeginInfo pDeviceRenderAreasAt(long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkDeviceGroupRenderPassBeginInfo.set_pDeviceRenderAreas(this.segment(), index, value); return this; } + /// Sets `pDeviceRenderAreas` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupRenderPassBeginInfo pDeviceRenderAreas(@CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkDeviceGroupRenderPassBeginInfo.set_pDeviceRenderAreas(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupSubmitInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupSubmitInfo.java new file mode 100644 index 00000000..b82b26cf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceGroupSubmitInfo.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### waitSemaphoreCount +/// [VarHandle][#VH_waitSemaphoreCount] - [Getter][#waitSemaphoreCount()] - [Setter][#waitSemaphoreCount(int)] +/// ### pWaitSemaphoreDeviceIndices +/// [VarHandle][#VH_pWaitSemaphoreDeviceIndices] - [Getter][#pWaitSemaphoreDeviceIndices()] - [Setter][#pWaitSemaphoreDeviceIndices(java.lang.foreign.MemorySegment)] +/// ### commandBufferCount +/// [VarHandle][#VH_commandBufferCount] - [Getter][#commandBufferCount()] - [Setter][#commandBufferCount(int)] +/// ### pCommandBufferDeviceMasks +/// [VarHandle][#VH_pCommandBufferDeviceMasks] - [Getter][#pCommandBufferDeviceMasks()] - [Setter][#pCommandBufferDeviceMasks(java.lang.foreign.MemorySegment)] +/// ### signalSemaphoreCount +/// [VarHandle][#VH_signalSemaphoreCount] - [Getter][#signalSemaphoreCount()] - [Setter][#signalSemaphoreCount(int)] +/// ### pSignalSemaphoreDeviceIndices +/// [VarHandle][#VH_pSignalSemaphoreDeviceIndices] - [Getter][#pSignalSemaphoreDeviceIndices()] - [Setter][#pSignalSemaphoreDeviceIndices(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceGroupSubmitInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t waitSemaphoreCount; +/// const uint32_t * pWaitSemaphoreDeviceIndices; +/// uint32_t commandBufferCount; +/// const uint32_t * pCommandBufferDeviceMasks; +/// uint32_t signalSemaphoreCount; +/// const uint32_t * pSignalSemaphoreDeviceIndices; +/// } VkDeviceGroupSubmitInfo; +/// ``` +public final class VkDeviceGroupSubmitInfo extends Struct { + /// The struct layout of `VkDeviceGroupSubmitInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("waitSemaphoreCount"), + ValueLayout.ADDRESS.withName("pWaitSemaphoreDeviceIndices"), + ValueLayout.JAVA_INT.withName("commandBufferCount"), + ValueLayout.ADDRESS.withName("pCommandBufferDeviceMasks"), + ValueLayout.JAVA_INT.withName("signalSemaphoreCount"), + ValueLayout.ADDRESS.withName("pSignalSemaphoreDeviceIndices") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `waitSemaphoreCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_waitSemaphoreCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("waitSemaphoreCount")); + /// The [VarHandle] of `pWaitSemaphoreDeviceIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWaitSemaphoreDeviceIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWaitSemaphoreDeviceIndices")); + /// The [VarHandle] of `commandBufferCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandBufferCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandBufferCount")); + /// The [VarHandle] of `pCommandBufferDeviceMasks` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCommandBufferDeviceMasks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCommandBufferDeviceMasks")); + /// The [VarHandle] of `signalSemaphoreCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_signalSemaphoreCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("signalSemaphoreCount")); + /// The [VarHandle] of `pSignalSemaphoreDeviceIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSignalSemaphoreDeviceIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSignalSemaphoreDeviceIndices")); + + /// Creates `VkDeviceGroupSubmitInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceGroupSubmitInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceGroupSubmitInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupSubmitInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupSubmitInfo(segment); } + + /// Creates `VkDeviceGroupSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupSubmitInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceGroupSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceGroupSubmitInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceGroupSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceGroupSubmitInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceGroupSubmitInfo` + public static VkDeviceGroupSubmitInfo alloc(SegmentAllocator allocator) { return new VkDeviceGroupSubmitInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceGroupSubmitInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceGroupSubmitInfo` + public static VkDeviceGroupSubmitInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceGroupSubmitInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceGroupSubmitInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceGroupSubmitInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceGroupSubmitInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceGroupSubmitInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceGroupSubmitInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo sType(@CType("VkStructureType") int value) { VkDeviceGroupSubmitInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceGroupSubmitInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceGroupSubmitInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceGroupSubmitInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `waitSemaphoreCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_waitSemaphoreCount(MemorySegment segment, long index) { return (int) VH_waitSemaphoreCount.get(segment, 0L, index); } + /// {@return `waitSemaphoreCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_waitSemaphoreCount(MemorySegment segment) { return VkDeviceGroupSubmitInfo.get_waitSemaphoreCount(segment, 0L); } + /// {@return `waitSemaphoreCount` at the given index} + /// @param index the index + public @CType("uint32_t") int waitSemaphoreCountAt(long index) { return VkDeviceGroupSubmitInfo.get_waitSemaphoreCount(this.segment(), index); } + /// {@return `waitSemaphoreCount`} + public @CType("uint32_t") int waitSemaphoreCount() { return VkDeviceGroupSubmitInfo.get_waitSemaphoreCount(this.segment()); } + /// Sets `waitSemaphoreCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_waitSemaphoreCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_waitSemaphoreCount.set(segment, 0L, index, value); } + /// Sets `waitSemaphoreCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_waitSemaphoreCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceGroupSubmitInfo.set_waitSemaphoreCount(segment, 0L, value); } + /// Sets `waitSemaphoreCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo waitSemaphoreCountAt(long index, @CType("uint32_t") int value) { VkDeviceGroupSubmitInfo.set_waitSemaphoreCount(this.segment(), index, value); return this; } + /// Sets `waitSemaphoreCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo waitSemaphoreCount(@CType("uint32_t") int value) { VkDeviceGroupSubmitInfo.set_waitSemaphoreCount(this.segment(), value); return this; } + + /// {@return `pWaitSemaphoreDeviceIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pWaitSemaphoreDeviceIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWaitSemaphoreDeviceIndices.get(segment, 0L, index); } + /// {@return `pWaitSemaphoreDeviceIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pWaitSemaphoreDeviceIndices(MemorySegment segment) { return VkDeviceGroupSubmitInfo.get_pWaitSemaphoreDeviceIndices(segment, 0L); } + /// {@return `pWaitSemaphoreDeviceIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pWaitSemaphoreDeviceIndicesAt(long index) { return VkDeviceGroupSubmitInfo.get_pWaitSemaphoreDeviceIndices(this.segment(), index); } + /// {@return `pWaitSemaphoreDeviceIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pWaitSemaphoreDeviceIndices() { return VkDeviceGroupSubmitInfo.get_pWaitSemaphoreDeviceIndices(this.segment()); } + /// Sets `pWaitSemaphoreDeviceIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWaitSemaphoreDeviceIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pWaitSemaphoreDeviceIndices.set(segment, 0L, index, value); } + /// Sets `pWaitSemaphoreDeviceIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWaitSemaphoreDeviceIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pWaitSemaphoreDeviceIndices(segment, 0L, value); } + /// Sets `pWaitSemaphoreDeviceIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo pWaitSemaphoreDeviceIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pWaitSemaphoreDeviceIndices(this.segment(), index, value); return this; } + /// Sets `pWaitSemaphoreDeviceIndices` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo pWaitSemaphoreDeviceIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pWaitSemaphoreDeviceIndices(this.segment(), value); return this; } + + /// {@return `commandBufferCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_commandBufferCount(MemorySegment segment, long index) { return (int) VH_commandBufferCount.get(segment, 0L, index); } + /// {@return `commandBufferCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_commandBufferCount(MemorySegment segment) { return VkDeviceGroupSubmitInfo.get_commandBufferCount(segment, 0L); } + /// {@return `commandBufferCount` at the given index} + /// @param index the index + public @CType("uint32_t") int commandBufferCountAt(long index) { return VkDeviceGroupSubmitInfo.get_commandBufferCount(this.segment(), index); } + /// {@return `commandBufferCount`} + public @CType("uint32_t") int commandBufferCount() { return VkDeviceGroupSubmitInfo.get_commandBufferCount(this.segment()); } + /// Sets `commandBufferCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandBufferCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_commandBufferCount.set(segment, 0L, index, value); } + /// Sets `commandBufferCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandBufferCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceGroupSubmitInfo.set_commandBufferCount(segment, 0L, value); } + /// Sets `commandBufferCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo commandBufferCountAt(long index, @CType("uint32_t") int value) { VkDeviceGroupSubmitInfo.set_commandBufferCount(this.segment(), index, value); return this; } + /// Sets `commandBufferCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo commandBufferCount(@CType("uint32_t") int value) { VkDeviceGroupSubmitInfo.set_commandBufferCount(this.segment(), value); return this; } + + /// {@return `pCommandBufferDeviceMasks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pCommandBufferDeviceMasks(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCommandBufferDeviceMasks.get(segment, 0L, index); } + /// {@return `pCommandBufferDeviceMasks`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pCommandBufferDeviceMasks(MemorySegment segment) { return VkDeviceGroupSubmitInfo.get_pCommandBufferDeviceMasks(segment, 0L); } + /// {@return `pCommandBufferDeviceMasks` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pCommandBufferDeviceMasksAt(long index) { return VkDeviceGroupSubmitInfo.get_pCommandBufferDeviceMasks(this.segment(), index); } + /// {@return `pCommandBufferDeviceMasks`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pCommandBufferDeviceMasks() { return VkDeviceGroupSubmitInfo.get_pCommandBufferDeviceMasks(this.segment()); } + /// Sets `pCommandBufferDeviceMasks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCommandBufferDeviceMasks(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pCommandBufferDeviceMasks.set(segment, 0L, index, value); } + /// Sets `pCommandBufferDeviceMasks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCommandBufferDeviceMasks(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pCommandBufferDeviceMasks(segment, 0L, value); } + /// Sets `pCommandBufferDeviceMasks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo pCommandBufferDeviceMasksAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pCommandBufferDeviceMasks(this.segment(), index, value); return this; } + /// Sets `pCommandBufferDeviceMasks` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo pCommandBufferDeviceMasks(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pCommandBufferDeviceMasks(this.segment(), value); return this; } + + /// {@return `signalSemaphoreCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_signalSemaphoreCount(MemorySegment segment, long index) { return (int) VH_signalSemaphoreCount.get(segment, 0L, index); } + /// {@return `signalSemaphoreCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_signalSemaphoreCount(MemorySegment segment) { return VkDeviceGroupSubmitInfo.get_signalSemaphoreCount(segment, 0L); } + /// {@return `signalSemaphoreCount` at the given index} + /// @param index the index + public @CType("uint32_t") int signalSemaphoreCountAt(long index) { return VkDeviceGroupSubmitInfo.get_signalSemaphoreCount(this.segment(), index); } + /// {@return `signalSemaphoreCount`} + public @CType("uint32_t") int signalSemaphoreCount() { return VkDeviceGroupSubmitInfo.get_signalSemaphoreCount(this.segment()); } + /// Sets `signalSemaphoreCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_signalSemaphoreCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_signalSemaphoreCount.set(segment, 0L, index, value); } + /// Sets `signalSemaphoreCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_signalSemaphoreCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceGroupSubmitInfo.set_signalSemaphoreCount(segment, 0L, value); } + /// Sets `signalSemaphoreCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo signalSemaphoreCountAt(long index, @CType("uint32_t") int value) { VkDeviceGroupSubmitInfo.set_signalSemaphoreCount(this.segment(), index, value); return this; } + /// Sets `signalSemaphoreCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo signalSemaphoreCount(@CType("uint32_t") int value) { VkDeviceGroupSubmitInfo.set_signalSemaphoreCount(this.segment(), value); return this; } + + /// {@return `pSignalSemaphoreDeviceIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pSignalSemaphoreDeviceIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSignalSemaphoreDeviceIndices.get(segment, 0L, index); } + /// {@return `pSignalSemaphoreDeviceIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pSignalSemaphoreDeviceIndices(MemorySegment segment) { return VkDeviceGroupSubmitInfo.get_pSignalSemaphoreDeviceIndices(segment, 0L); } + /// {@return `pSignalSemaphoreDeviceIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pSignalSemaphoreDeviceIndicesAt(long index) { return VkDeviceGroupSubmitInfo.get_pSignalSemaphoreDeviceIndices(this.segment(), index); } + /// {@return `pSignalSemaphoreDeviceIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pSignalSemaphoreDeviceIndices() { return VkDeviceGroupSubmitInfo.get_pSignalSemaphoreDeviceIndices(this.segment()); } + /// Sets `pSignalSemaphoreDeviceIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSignalSemaphoreDeviceIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pSignalSemaphoreDeviceIndices.set(segment, 0L, index, value); } + /// Sets `pSignalSemaphoreDeviceIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSignalSemaphoreDeviceIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pSignalSemaphoreDeviceIndices(segment, 0L, value); } + /// Sets `pSignalSemaphoreDeviceIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo pSignalSemaphoreDeviceIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pSignalSemaphoreDeviceIndices(this.segment(), index, value); return this; } + /// Sets `pSignalSemaphoreDeviceIndices` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceGroupSubmitInfo pSignalSemaphoreDeviceIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkDeviceGroupSubmitInfo.set_pSignalSemaphoreDeviceIndices(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceImageMemoryRequirements.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceImageMemoryRequirements.java new file mode 100644 index 00000000..bf0b3b98 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceImageMemoryRequirements.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pCreateInfo +/// [VarHandle][#VH_pCreateInfo] - [Getter][#pCreateInfo()] - [Setter][#pCreateInfo(java.lang.foreign.MemorySegment)] +/// ### planeAspect +/// [VarHandle][#VH_planeAspect] - [Getter][#planeAspect()] - [Setter][#planeAspect(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceImageMemoryRequirements { +/// VkStructureType sType; +/// const void * pNext; +/// const VkImageCreateInfo * pCreateInfo; +/// VkImageAspectFlagBits planeAspect; +/// } VkDeviceImageMemoryRequirements; +/// ``` +public final class VkDeviceImageMemoryRequirements extends Struct { + /// The struct layout of `VkDeviceImageMemoryRequirements`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pCreateInfo"), + ValueLayout.JAVA_INT.withName("planeAspect") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pCreateInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCreateInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCreateInfo")); + /// The [VarHandle] of `planeAspect` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_planeAspect = LAYOUT.arrayElementVarHandle(PathElement.groupElement("planeAspect")); + + /// Creates `VkDeviceImageMemoryRequirements` with the given segment. + /// @param segment the memory segment + public VkDeviceImageMemoryRequirements(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceImageMemoryRequirements` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceImageMemoryRequirements of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceImageMemoryRequirements(segment); } + + /// Creates `VkDeviceImageMemoryRequirements` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceImageMemoryRequirements ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceImageMemoryRequirements(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceImageMemoryRequirements` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceImageMemoryRequirements ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceImageMemoryRequirements(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceImageMemoryRequirements` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceImageMemoryRequirements` + public static VkDeviceImageMemoryRequirements alloc(SegmentAllocator allocator) { return new VkDeviceImageMemoryRequirements(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceImageMemoryRequirements` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceImageMemoryRequirements` + public static VkDeviceImageMemoryRequirements alloc(SegmentAllocator allocator, long count) { return new VkDeviceImageMemoryRequirements(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceImageMemoryRequirements.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceImageMemoryRequirements.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceImageMemoryRequirements.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceImageMemoryRequirements.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceImageMemoryRequirements sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceImageMemoryRequirements.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceImageMemoryRequirements sType(@CType("VkStructureType") int value) { VkDeviceImageMemoryRequirements.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceImageMemoryRequirements.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceImageMemoryRequirements.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceImageMemoryRequirements.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceImageMemoryRequirements.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceImageMemoryRequirements pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceImageMemoryRequirements.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceImageMemoryRequirements pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceImageMemoryRequirements.set_pNext(this.segment(), value); return this; } + + /// {@return `pCreateInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment get_pCreateInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCreateInfo.get(segment, 0L, index); } + /// {@return `pCreateInfo`} + /// @param segment the segment of the struct + public static @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment get_pCreateInfo(MemorySegment segment) { return VkDeviceImageMemoryRequirements.get_pCreateInfo(segment, 0L); } + /// {@return `pCreateInfo` at the given index} + /// @param index the index + public @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment pCreateInfoAt(long index) { return VkDeviceImageMemoryRequirements.get_pCreateInfo(this.segment(), index); } + /// {@return `pCreateInfo`} + public @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment pCreateInfo() { return VkDeviceImageMemoryRequirements.get_pCreateInfo(this.segment()); } + /// Sets `pCreateInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCreateInfo(MemorySegment segment, long index, @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pCreateInfo.set(segment, 0L, index, value); } + /// Sets `pCreateInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCreateInfo(MemorySegment segment, @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceImageMemoryRequirements.set_pCreateInfo(segment, 0L, value); } + /// Sets `pCreateInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceImageMemoryRequirements pCreateInfoAt(long index, @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceImageMemoryRequirements.set_pCreateInfo(this.segment(), index, value); return this; } + /// Sets `pCreateInfo` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceImageMemoryRequirements pCreateInfo(@CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceImageMemoryRequirements.set_pCreateInfo(this.segment(), value); return this; } + + /// {@return `planeAspect` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlagBits") int get_planeAspect(MemorySegment segment, long index) { return (int) VH_planeAspect.get(segment, 0L, index); } + /// {@return `planeAspect`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlagBits") int get_planeAspect(MemorySegment segment) { return VkDeviceImageMemoryRequirements.get_planeAspect(segment, 0L); } + /// {@return `planeAspect` at the given index} + /// @param index the index + public @CType("VkImageAspectFlagBits") int planeAspectAt(long index) { return VkDeviceImageMemoryRequirements.get_planeAspect(this.segment(), index); } + /// {@return `planeAspect`} + public @CType("VkImageAspectFlagBits") int planeAspect() { return VkDeviceImageMemoryRequirements.get_planeAspect(this.segment()); } + /// Sets `planeAspect` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_planeAspect(MemorySegment segment, long index, @CType("VkImageAspectFlagBits") int value) { VH_planeAspect.set(segment, 0L, index, value); } + /// Sets `planeAspect` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_planeAspect(MemorySegment segment, @CType("VkImageAspectFlagBits") int value) { VkDeviceImageMemoryRequirements.set_planeAspect(segment, 0L, value); } + /// Sets `planeAspect` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceImageMemoryRequirements planeAspectAt(long index, @CType("VkImageAspectFlagBits") int value) { VkDeviceImageMemoryRequirements.set_planeAspect(this.segment(), index, value); return this; } + /// Sets `planeAspect` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceImageMemoryRequirements planeAspect(@CType("VkImageAspectFlagBits") int value) { VkDeviceImageMemoryRequirements.set_planeAspect(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceImageSubresourceInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceImageSubresourceInfo.java new file mode 100644 index 00000000..792eed3a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceImageSubresourceInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pCreateInfo +/// [VarHandle][#VH_pCreateInfo] - [Getter][#pCreateInfo()] - [Setter][#pCreateInfo(java.lang.foreign.MemorySegment)] +/// ### pSubresource +/// [VarHandle][#VH_pSubresource] - [Getter][#pSubresource()] - [Setter][#pSubresource(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceImageSubresourceInfo { +/// VkStructureType sType; +/// const void * pNext; +/// const VkImageCreateInfo * pCreateInfo; +/// const VkImageSubresource2 * pSubresource; +/// } VkDeviceImageSubresourceInfo; +/// ``` +public final class VkDeviceImageSubresourceInfo extends Struct { + /// The struct layout of `VkDeviceImageSubresourceInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pCreateInfo"), + ValueLayout.ADDRESS.withName("pSubresource") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pCreateInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCreateInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCreateInfo")); + /// The [VarHandle] of `pSubresource` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSubresource = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSubresource")); + + /// Creates `VkDeviceImageSubresourceInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceImageSubresourceInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceImageSubresourceInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceImageSubresourceInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceImageSubresourceInfo(segment); } + + /// Creates `VkDeviceImageSubresourceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceImageSubresourceInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceImageSubresourceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceImageSubresourceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceImageSubresourceInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceImageSubresourceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceImageSubresourceInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceImageSubresourceInfo` + public static VkDeviceImageSubresourceInfo alloc(SegmentAllocator allocator) { return new VkDeviceImageSubresourceInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceImageSubresourceInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceImageSubresourceInfo` + public static VkDeviceImageSubresourceInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceImageSubresourceInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceImageSubresourceInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceImageSubresourceInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceImageSubresourceInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceImageSubresourceInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceImageSubresourceInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceImageSubresourceInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceImageSubresourceInfo sType(@CType("VkStructureType") int value) { VkDeviceImageSubresourceInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceImageSubresourceInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceImageSubresourceInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceImageSubresourceInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceImageSubresourceInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceImageSubresourceInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceImageSubresourceInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceImageSubresourceInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceImageSubresourceInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `pCreateInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment get_pCreateInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCreateInfo.get(segment, 0L, index); } + /// {@return `pCreateInfo`} + /// @param segment the segment of the struct + public static @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment get_pCreateInfo(MemorySegment segment) { return VkDeviceImageSubresourceInfo.get_pCreateInfo(segment, 0L); } + /// {@return `pCreateInfo` at the given index} + /// @param index the index + public @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment pCreateInfoAt(long index) { return VkDeviceImageSubresourceInfo.get_pCreateInfo(this.segment(), index); } + /// {@return `pCreateInfo`} + public @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment pCreateInfo() { return VkDeviceImageSubresourceInfo.get_pCreateInfo(this.segment()); } + /// Sets `pCreateInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCreateInfo(MemorySegment segment, long index, @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pCreateInfo.set(segment, 0L, index, value); } + /// Sets `pCreateInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCreateInfo(MemorySegment segment, @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceImageSubresourceInfo.set_pCreateInfo(segment, 0L, value); } + /// Sets `pCreateInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceImageSubresourceInfo pCreateInfoAt(long index, @CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceImageSubresourceInfo.set_pCreateInfo(this.segment(), index, value); return this; } + /// Sets `pCreateInfo` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceImageSubresourceInfo pCreateInfo(@CType("const VkImageCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceImageSubresourceInfo.set_pCreateInfo(this.segment(), value); return this; } + + /// {@return `pSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageSubresource2 *") java.lang.foreign.MemorySegment get_pSubresource(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSubresource.get(segment, 0L, index); } + /// {@return `pSubresource`} + /// @param segment the segment of the struct + public static @CType("const VkImageSubresource2 *") java.lang.foreign.MemorySegment get_pSubresource(MemorySegment segment) { return VkDeviceImageSubresourceInfo.get_pSubresource(segment, 0L); } + /// {@return `pSubresource` at the given index} + /// @param index the index + public @CType("const VkImageSubresource2 *") java.lang.foreign.MemorySegment pSubresourceAt(long index) { return VkDeviceImageSubresourceInfo.get_pSubresource(this.segment(), index); } + /// {@return `pSubresource`} + public @CType("const VkImageSubresource2 *") java.lang.foreign.MemorySegment pSubresource() { return VkDeviceImageSubresourceInfo.get_pSubresource(this.segment()); } + /// Sets `pSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSubresource(MemorySegment segment, long index, @CType("const VkImageSubresource2 *") java.lang.foreign.MemorySegment value) { VH_pSubresource.set(segment, 0L, index, value); } + /// Sets `pSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSubresource(MemorySegment segment, @CType("const VkImageSubresource2 *") java.lang.foreign.MemorySegment value) { VkDeviceImageSubresourceInfo.set_pSubresource(segment, 0L, value); } + /// Sets `pSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceImageSubresourceInfo pSubresourceAt(long index, @CType("const VkImageSubresource2 *") java.lang.foreign.MemorySegment value) { VkDeviceImageSubresourceInfo.set_pSubresource(this.segment(), index, value); return this; } + /// Sets `pSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceImageSubresourceInfo pSubresource(@CType("const VkImageSubresource2 *") java.lang.foreign.MemorySegment value) { VkDeviceImageSubresourceInfo.set_pSubresource(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceMemoryOpaqueCaptureAddressInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceMemoryOpaqueCaptureAddressInfo.java new file mode 100644 index 00000000..614384bd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceMemoryOpaqueCaptureAddressInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceMemoryOpaqueCaptureAddressInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceMemory memory; +/// } VkDeviceMemoryOpaqueCaptureAddressInfo; +/// ``` +public final class VkDeviceMemoryOpaqueCaptureAddressInfo extends Struct { + /// The struct layout of `VkDeviceMemoryOpaqueCaptureAddressInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("memory") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + + /// Creates `VkDeviceMemoryOpaqueCaptureAddressInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceMemoryOpaqueCaptureAddressInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceMemoryOpaqueCaptureAddressInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceMemoryOpaqueCaptureAddressInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceMemoryOpaqueCaptureAddressInfo(segment); } + + /// Creates `VkDeviceMemoryOpaqueCaptureAddressInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceMemoryOpaqueCaptureAddressInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceMemoryOpaqueCaptureAddressInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceMemoryOpaqueCaptureAddressInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceMemoryOpaqueCaptureAddressInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceMemoryOpaqueCaptureAddressInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceMemoryOpaqueCaptureAddressInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceMemoryOpaqueCaptureAddressInfo` + public static VkDeviceMemoryOpaqueCaptureAddressInfo alloc(SegmentAllocator allocator) { return new VkDeviceMemoryOpaqueCaptureAddressInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceMemoryOpaqueCaptureAddressInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceMemoryOpaqueCaptureAddressInfo` + public static VkDeviceMemoryOpaqueCaptureAddressInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceMemoryOpaqueCaptureAddressInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceMemoryOpaqueCaptureAddressInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceMemoryOpaqueCaptureAddressInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceMemoryOpaqueCaptureAddressInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceMemoryOpaqueCaptureAddressInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryOpaqueCaptureAddressInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceMemoryOpaqueCaptureAddressInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryOpaqueCaptureAddressInfo sType(@CType("VkStructureType") int value) { VkDeviceMemoryOpaqueCaptureAddressInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceMemoryOpaqueCaptureAddressInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceMemoryOpaqueCaptureAddressInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceMemoryOpaqueCaptureAddressInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceMemoryOpaqueCaptureAddressInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryOpaqueCaptureAddressInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceMemoryOpaqueCaptureAddressInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryOpaqueCaptureAddressInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceMemoryOpaqueCaptureAddressInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkDeviceMemoryOpaqueCaptureAddressInfo.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkDeviceMemoryOpaqueCaptureAddressInfo.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkDeviceMemoryOpaqueCaptureAddressInfo.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkDeviceMemoryOpaqueCaptureAddressInfo.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceMemoryOpaqueCaptureAddressInfo memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkDeviceMemoryOpaqueCaptureAddressInfo.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceMemoryOpaqueCaptureAddressInfo memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkDeviceMemoryOpaqueCaptureAddressInfo.set_memory(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceObjectReservationCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceObjectReservationCreateInfo.java new file mode 100644 index 00000000..3487bc17 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceObjectReservationCreateInfo.java @@ -0,0 +1,1665 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineCacheCreateInfoCount +/// [VarHandle][#VH_pipelineCacheCreateInfoCount] - [Getter][#pipelineCacheCreateInfoCount()] - [Setter][#pipelineCacheCreateInfoCount(int)] +/// ### pPipelineCacheCreateInfos +/// [VarHandle][#VH_pPipelineCacheCreateInfos] - [Getter][#pPipelineCacheCreateInfos()] - [Setter][#pPipelineCacheCreateInfos(java.lang.foreign.MemorySegment)] +/// ### pipelinePoolSizeCount +/// [VarHandle][#VH_pipelinePoolSizeCount] - [Getter][#pipelinePoolSizeCount()] - [Setter][#pipelinePoolSizeCount(int)] +/// ### pPipelinePoolSizes +/// [VarHandle][#VH_pPipelinePoolSizes] - [Getter][#pPipelinePoolSizes()] - [Setter][#pPipelinePoolSizes(java.lang.foreign.MemorySegment)] +/// ### semaphoreRequestCount +/// [VarHandle][#VH_semaphoreRequestCount] - [Getter][#semaphoreRequestCount()] - [Setter][#semaphoreRequestCount(int)] +/// ### commandBufferRequestCount +/// [VarHandle][#VH_commandBufferRequestCount] - [Getter][#commandBufferRequestCount()] - [Setter][#commandBufferRequestCount(int)] +/// ### fenceRequestCount +/// [VarHandle][#VH_fenceRequestCount] - [Getter][#fenceRequestCount()] - [Setter][#fenceRequestCount(int)] +/// ### deviceMemoryRequestCount +/// [VarHandle][#VH_deviceMemoryRequestCount] - [Getter][#deviceMemoryRequestCount()] - [Setter][#deviceMemoryRequestCount(int)] +/// ### bufferRequestCount +/// [VarHandle][#VH_bufferRequestCount] - [Getter][#bufferRequestCount()] - [Setter][#bufferRequestCount(int)] +/// ### imageRequestCount +/// [VarHandle][#VH_imageRequestCount] - [Getter][#imageRequestCount()] - [Setter][#imageRequestCount(int)] +/// ### eventRequestCount +/// [VarHandle][#VH_eventRequestCount] - [Getter][#eventRequestCount()] - [Setter][#eventRequestCount(int)] +/// ### queryPoolRequestCount +/// [VarHandle][#VH_queryPoolRequestCount] - [Getter][#queryPoolRequestCount()] - [Setter][#queryPoolRequestCount(int)] +/// ### bufferViewRequestCount +/// [VarHandle][#VH_bufferViewRequestCount] - [Getter][#bufferViewRequestCount()] - [Setter][#bufferViewRequestCount(int)] +/// ### imageViewRequestCount +/// [VarHandle][#VH_imageViewRequestCount] - [Getter][#imageViewRequestCount()] - [Setter][#imageViewRequestCount(int)] +/// ### layeredImageViewRequestCount +/// [VarHandle][#VH_layeredImageViewRequestCount] - [Getter][#layeredImageViewRequestCount()] - [Setter][#layeredImageViewRequestCount(int)] +/// ### pipelineCacheRequestCount +/// [VarHandle][#VH_pipelineCacheRequestCount] - [Getter][#pipelineCacheRequestCount()] - [Setter][#pipelineCacheRequestCount(int)] +/// ### pipelineLayoutRequestCount +/// [VarHandle][#VH_pipelineLayoutRequestCount] - [Getter][#pipelineLayoutRequestCount()] - [Setter][#pipelineLayoutRequestCount(int)] +/// ### renderPassRequestCount +/// [VarHandle][#VH_renderPassRequestCount] - [Getter][#renderPassRequestCount()] - [Setter][#renderPassRequestCount(int)] +/// ### graphicsPipelineRequestCount +/// [VarHandle][#VH_graphicsPipelineRequestCount] - [Getter][#graphicsPipelineRequestCount()] - [Setter][#graphicsPipelineRequestCount(int)] +/// ### computePipelineRequestCount +/// [VarHandle][#VH_computePipelineRequestCount] - [Getter][#computePipelineRequestCount()] - [Setter][#computePipelineRequestCount(int)] +/// ### descriptorSetLayoutRequestCount +/// [VarHandle][#VH_descriptorSetLayoutRequestCount] - [Getter][#descriptorSetLayoutRequestCount()] - [Setter][#descriptorSetLayoutRequestCount(int)] +/// ### samplerRequestCount +/// [VarHandle][#VH_samplerRequestCount] - [Getter][#samplerRequestCount()] - [Setter][#samplerRequestCount(int)] +/// ### descriptorPoolRequestCount +/// [VarHandle][#VH_descriptorPoolRequestCount] - [Getter][#descriptorPoolRequestCount()] - [Setter][#descriptorPoolRequestCount(int)] +/// ### descriptorSetRequestCount +/// [VarHandle][#VH_descriptorSetRequestCount] - [Getter][#descriptorSetRequestCount()] - [Setter][#descriptorSetRequestCount(int)] +/// ### framebufferRequestCount +/// [VarHandle][#VH_framebufferRequestCount] - [Getter][#framebufferRequestCount()] - [Setter][#framebufferRequestCount(int)] +/// ### commandPoolRequestCount +/// [VarHandle][#VH_commandPoolRequestCount] - [Getter][#commandPoolRequestCount()] - [Setter][#commandPoolRequestCount(int)] +/// ### samplerYcbcrConversionRequestCount +/// [VarHandle][#VH_samplerYcbcrConversionRequestCount] - [Getter][#samplerYcbcrConversionRequestCount()] - [Setter][#samplerYcbcrConversionRequestCount(int)] +/// ### surfaceRequestCount +/// [VarHandle][#VH_surfaceRequestCount] - [Getter][#surfaceRequestCount()] - [Setter][#surfaceRequestCount(int)] +/// ### swapchainRequestCount +/// [VarHandle][#VH_swapchainRequestCount] - [Getter][#swapchainRequestCount()] - [Setter][#swapchainRequestCount(int)] +/// ### displayModeRequestCount +/// [VarHandle][#VH_displayModeRequestCount] - [Getter][#displayModeRequestCount()] - [Setter][#displayModeRequestCount(int)] +/// ### subpassDescriptionRequestCount +/// [VarHandle][#VH_subpassDescriptionRequestCount] - [Getter][#subpassDescriptionRequestCount()] - [Setter][#subpassDescriptionRequestCount(int)] +/// ### attachmentDescriptionRequestCount +/// [VarHandle][#VH_attachmentDescriptionRequestCount] - [Getter][#attachmentDescriptionRequestCount()] - [Setter][#attachmentDescriptionRequestCount(int)] +/// ### descriptorSetLayoutBindingRequestCount +/// [VarHandle][#VH_descriptorSetLayoutBindingRequestCount] - [Getter][#descriptorSetLayoutBindingRequestCount()] - [Setter][#descriptorSetLayoutBindingRequestCount(int)] +/// ### descriptorSetLayoutBindingLimit +/// [VarHandle][#VH_descriptorSetLayoutBindingLimit] - [Getter][#descriptorSetLayoutBindingLimit()] - [Setter][#descriptorSetLayoutBindingLimit(int)] +/// ### maxImageViewMipLevels +/// [VarHandle][#VH_maxImageViewMipLevels] - [Getter][#maxImageViewMipLevels()] - [Setter][#maxImageViewMipLevels(int)] +/// ### maxImageViewArrayLayers +/// [VarHandle][#VH_maxImageViewArrayLayers] - [Getter][#maxImageViewArrayLayers()] - [Setter][#maxImageViewArrayLayers(int)] +/// ### maxLayeredImageViewMipLevels +/// [VarHandle][#VH_maxLayeredImageViewMipLevels] - [Getter][#maxLayeredImageViewMipLevels()] - [Setter][#maxLayeredImageViewMipLevels(int)] +/// ### maxOcclusionQueriesPerPool +/// [VarHandle][#VH_maxOcclusionQueriesPerPool] - [Getter][#maxOcclusionQueriesPerPool()] - [Setter][#maxOcclusionQueriesPerPool(int)] +/// ### maxPipelineStatisticsQueriesPerPool +/// [VarHandle][#VH_maxPipelineStatisticsQueriesPerPool] - [Getter][#maxPipelineStatisticsQueriesPerPool()] - [Setter][#maxPipelineStatisticsQueriesPerPool(int)] +/// ### maxTimestampQueriesPerPool +/// [VarHandle][#VH_maxTimestampQueriesPerPool] - [Getter][#maxTimestampQueriesPerPool()] - [Setter][#maxTimestampQueriesPerPool(int)] +/// ### maxImmutableSamplersPerDescriptorSetLayout +/// [VarHandle][#VH_maxImmutableSamplersPerDescriptorSetLayout] - [Getter][#maxImmutableSamplersPerDescriptorSetLayout()] - [Setter][#maxImmutableSamplersPerDescriptorSetLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceObjectReservationCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t pipelineCacheCreateInfoCount; +/// const VkPipelineCacheCreateInfo * pPipelineCacheCreateInfos; +/// uint32_t pipelinePoolSizeCount; +/// const VkPipelinePoolSize * pPipelinePoolSizes; +/// uint32_t semaphoreRequestCount; +/// uint32_t commandBufferRequestCount; +/// uint32_t fenceRequestCount; +/// uint32_t deviceMemoryRequestCount; +/// uint32_t bufferRequestCount; +/// uint32_t imageRequestCount; +/// uint32_t eventRequestCount; +/// uint32_t queryPoolRequestCount; +/// uint32_t bufferViewRequestCount; +/// uint32_t imageViewRequestCount; +/// uint32_t layeredImageViewRequestCount; +/// uint32_t pipelineCacheRequestCount; +/// uint32_t pipelineLayoutRequestCount; +/// uint32_t renderPassRequestCount; +/// uint32_t graphicsPipelineRequestCount; +/// uint32_t computePipelineRequestCount; +/// uint32_t descriptorSetLayoutRequestCount; +/// uint32_t samplerRequestCount; +/// uint32_t descriptorPoolRequestCount; +/// uint32_t descriptorSetRequestCount; +/// uint32_t framebufferRequestCount; +/// uint32_t commandPoolRequestCount; +/// uint32_t samplerYcbcrConversionRequestCount; +/// uint32_t surfaceRequestCount; +/// uint32_t swapchainRequestCount; +/// uint32_t displayModeRequestCount; +/// uint32_t subpassDescriptionRequestCount; +/// uint32_t attachmentDescriptionRequestCount; +/// uint32_t descriptorSetLayoutBindingRequestCount; +/// uint32_t descriptorSetLayoutBindingLimit; +/// uint32_t maxImageViewMipLevels; +/// uint32_t maxImageViewArrayLayers; +/// uint32_t maxLayeredImageViewMipLevels; +/// uint32_t maxOcclusionQueriesPerPool; +/// uint32_t maxPipelineStatisticsQueriesPerPool; +/// uint32_t maxTimestampQueriesPerPool; +/// uint32_t maxImmutableSamplersPerDescriptorSetLayout; +/// } VkDeviceObjectReservationCreateInfo; +/// ``` +public final class VkDeviceObjectReservationCreateInfo extends Struct { + /// The struct layout of `VkDeviceObjectReservationCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineCacheCreateInfoCount"), + ValueLayout.ADDRESS.withName("pPipelineCacheCreateInfos"), + ValueLayout.JAVA_INT.withName("pipelinePoolSizeCount"), + ValueLayout.ADDRESS.withName("pPipelinePoolSizes"), + ValueLayout.JAVA_INT.withName("semaphoreRequestCount"), + ValueLayout.JAVA_INT.withName("commandBufferRequestCount"), + ValueLayout.JAVA_INT.withName("fenceRequestCount"), + ValueLayout.JAVA_INT.withName("deviceMemoryRequestCount"), + ValueLayout.JAVA_INT.withName("bufferRequestCount"), + ValueLayout.JAVA_INT.withName("imageRequestCount"), + ValueLayout.JAVA_INT.withName("eventRequestCount"), + ValueLayout.JAVA_INT.withName("queryPoolRequestCount"), + ValueLayout.JAVA_INT.withName("bufferViewRequestCount"), + ValueLayout.JAVA_INT.withName("imageViewRequestCount"), + ValueLayout.JAVA_INT.withName("layeredImageViewRequestCount"), + ValueLayout.JAVA_INT.withName("pipelineCacheRequestCount"), + ValueLayout.JAVA_INT.withName("pipelineLayoutRequestCount"), + ValueLayout.JAVA_INT.withName("renderPassRequestCount"), + ValueLayout.JAVA_INT.withName("graphicsPipelineRequestCount"), + ValueLayout.JAVA_INT.withName("computePipelineRequestCount"), + ValueLayout.JAVA_INT.withName("descriptorSetLayoutRequestCount"), + ValueLayout.JAVA_INT.withName("samplerRequestCount"), + ValueLayout.JAVA_INT.withName("descriptorPoolRequestCount"), + ValueLayout.JAVA_INT.withName("descriptorSetRequestCount"), + ValueLayout.JAVA_INT.withName("framebufferRequestCount"), + ValueLayout.JAVA_INT.withName("commandPoolRequestCount"), + ValueLayout.JAVA_INT.withName("samplerYcbcrConversionRequestCount"), + ValueLayout.JAVA_INT.withName("surfaceRequestCount"), + ValueLayout.JAVA_INT.withName("swapchainRequestCount"), + ValueLayout.JAVA_INT.withName("displayModeRequestCount"), + ValueLayout.JAVA_INT.withName("subpassDescriptionRequestCount"), + ValueLayout.JAVA_INT.withName("attachmentDescriptionRequestCount"), + ValueLayout.JAVA_INT.withName("descriptorSetLayoutBindingRequestCount"), + ValueLayout.JAVA_INT.withName("descriptorSetLayoutBindingLimit"), + ValueLayout.JAVA_INT.withName("maxImageViewMipLevels"), + ValueLayout.JAVA_INT.withName("maxImageViewArrayLayers"), + ValueLayout.JAVA_INT.withName("maxLayeredImageViewMipLevels"), + ValueLayout.JAVA_INT.withName("maxOcclusionQueriesPerPool"), + ValueLayout.JAVA_INT.withName("maxPipelineStatisticsQueriesPerPool"), + ValueLayout.JAVA_INT.withName("maxTimestampQueriesPerPool"), + ValueLayout.JAVA_INT.withName("maxImmutableSamplersPerDescriptorSetLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineCacheCreateInfoCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineCacheCreateInfoCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineCacheCreateInfoCount")); + /// The [VarHandle] of `pPipelineCacheCreateInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelineCacheCreateInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelineCacheCreateInfos")); + /// The [VarHandle] of `pipelinePoolSizeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelinePoolSizeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelinePoolSizeCount")); + /// The [VarHandle] of `pPipelinePoolSizes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelinePoolSizes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelinePoolSizes")); + /// The [VarHandle] of `semaphoreRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_semaphoreRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphoreRequestCount")); + /// The [VarHandle] of `commandBufferRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandBufferRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandBufferRequestCount")); + /// The [VarHandle] of `fenceRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fenceRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fenceRequestCount")); + /// The [VarHandle] of `deviceMemoryRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceMemoryRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceMemoryRequestCount")); + /// The [VarHandle] of `bufferRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferRequestCount")); + /// The [VarHandle] of `imageRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageRequestCount")); + /// The [VarHandle] of `eventRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_eventRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("eventRequestCount")); + /// The [VarHandle] of `queryPoolRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queryPoolRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queryPoolRequestCount")); + /// The [VarHandle] of `bufferViewRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferViewRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferViewRequestCount")); + /// The [VarHandle] of `imageViewRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageViewRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageViewRequestCount")); + /// The [VarHandle] of `layeredImageViewRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layeredImageViewRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layeredImageViewRequestCount")); + /// The [VarHandle] of `pipelineCacheRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineCacheRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineCacheRequestCount")); + /// The [VarHandle] of `pipelineLayoutRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineLayoutRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineLayoutRequestCount")); + /// The [VarHandle] of `renderPassRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_renderPassRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderPassRequestCount")); + /// The [VarHandle] of `graphicsPipelineRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_graphicsPipelineRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("graphicsPipelineRequestCount")); + /// The [VarHandle] of `computePipelineRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_computePipelineRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("computePipelineRequestCount")); + /// The [VarHandle] of `descriptorSetLayoutRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorSetLayoutRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSetLayoutRequestCount")); + /// The [VarHandle] of `samplerRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samplerRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerRequestCount")); + /// The [VarHandle] of `descriptorPoolRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorPoolRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorPoolRequestCount")); + /// The [VarHandle] of `descriptorSetRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorSetRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSetRequestCount")); + /// The [VarHandle] of `framebufferRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_framebufferRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("framebufferRequestCount")); + /// The [VarHandle] of `commandPoolRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandPoolRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandPoolRequestCount")); + /// The [VarHandle] of `samplerYcbcrConversionRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samplerYcbcrConversionRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerYcbcrConversionRequestCount")); + /// The [VarHandle] of `surfaceRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_surfaceRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("surfaceRequestCount")); + /// The [VarHandle] of `swapchainRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_swapchainRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("swapchainRequestCount")); + /// The [VarHandle] of `displayModeRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_displayModeRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("displayModeRequestCount")); + /// The [VarHandle] of `subpassDescriptionRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpassDescriptionRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpassDescriptionRequestCount")); + /// The [VarHandle] of `attachmentDescriptionRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentDescriptionRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentDescriptionRequestCount")); + /// The [VarHandle] of `descriptorSetLayoutBindingRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorSetLayoutBindingRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSetLayoutBindingRequestCount")); + /// The [VarHandle] of `descriptorSetLayoutBindingLimit` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorSetLayoutBindingLimit = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSetLayoutBindingLimit")); + /// The [VarHandle] of `maxImageViewMipLevels` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageViewMipLevels = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageViewMipLevels")); + /// The [VarHandle] of `maxImageViewArrayLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageViewArrayLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageViewArrayLayers")); + /// The [VarHandle] of `maxLayeredImageViewMipLevels` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxLayeredImageViewMipLevels = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLayeredImageViewMipLevels")); + /// The [VarHandle] of `maxOcclusionQueriesPerPool` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxOcclusionQueriesPerPool = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxOcclusionQueriesPerPool")); + /// The [VarHandle] of `maxPipelineStatisticsQueriesPerPool` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPipelineStatisticsQueriesPerPool = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPipelineStatisticsQueriesPerPool")); + /// The [VarHandle] of `maxTimestampQueriesPerPool` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTimestampQueriesPerPool = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTimestampQueriesPerPool")); + /// The [VarHandle] of `maxImmutableSamplersPerDescriptorSetLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImmutableSamplersPerDescriptorSetLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImmutableSamplersPerDescriptorSetLayout")); + + /// Creates `VkDeviceObjectReservationCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceObjectReservationCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceObjectReservationCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceObjectReservationCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceObjectReservationCreateInfo(segment); } + + /// Creates `VkDeviceObjectReservationCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceObjectReservationCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceObjectReservationCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceObjectReservationCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceObjectReservationCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceObjectReservationCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceObjectReservationCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceObjectReservationCreateInfo` + public static VkDeviceObjectReservationCreateInfo alloc(SegmentAllocator allocator) { return new VkDeviceObjectReservationCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceObjectReservationCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceObjectReservationCreateInfo` + public static VkDeviceObjectReservationCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceObjectReservationCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceObjectReservationCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceObjectReservationCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceObjectReservationCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceObjectReservationCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo sType(@CType("VkStructureType") int value) { VkDeviceObjectReservationCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceObjectReservationCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceObjectReservationCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceObjectReservationCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceObjectReservationCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceObjectReservationCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineCacheCreateInfoCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pipelineCacheCreateInfoCount(MemorySegment segment, long index) { return (int) VH_pipelineCacheCreateInfoCount.get(segment, 0L, index); } + /// {@return `pipelineCacheCreateInfoCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pipelineCacheCreateInfoCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_pipelineCacheCreateInfoCount(segment, 0L); } + /// {@return `pipelineCacheCreateInfoCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pipelineCacheCreateInfoCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_pipelineCacheCreateInfoCount(this.segment(), index); } + /// {@return `pipelineCacheCreateInfoCount`} + public @CType("uint32_t") int pipelineCacheCreateInfoCount() { return VkDeviceObjectReservationCreateInfo.get_pipelineCacheCreateInfoCount(this.segment()); } + /// Sets `pipelineCacheCreateInfoCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineCacheCreateInfoCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pipelineCacheCreateInfoCount.set(segment, 0L, index, value); } + /// Sets `pipelineCacheCreateInfoCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineCacheCreateInfoCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelineCacheCreateInfoCount(segment, 0L, value); } + /// Sets `pipelineCacheCreateInfoCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pipelineCacheCreateInfoCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelineCacheCreateInfoCount(this.segment(), index, value); return this; } + /// Sets `pipelineCacheCreateInfoCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pipelineCacheCreateInfoCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelineCacheCreateInfoCount(this.segment(), value); return this; } + + /// {@return `pPipelineCacheCreateInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineCacheCreateInfo *") java.lang.foreign.MemorySegment get_pPipelineCacheCreateInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelineCacheCreateInfos.get(segment, 0L, index); } + /// {@return `pPipelineCacheCreateInfos`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineCacheCreateInfo *") java.lang.foreign.MemorySegment get_pPipelineCacheCreateInfos(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_pPipelineCacheCreateInfos(segment, 0L); } + /// {@return `pPipelineCacheCreateInfos` at the given index} + /// @param index the index + public @CType("const VkPipelineCacheCreateInfo *") java.lang.foreign.MemorySegment pPipelineCacheCreateInfosAt(long index) { return VkDeviceObjectReservationCreateInfo.get_pPipelineCacheCreateInfos(this.segment(), index); } + /// {@return `pPipelineCacheCreateInfos`} + public @CType("const VkPipelineCacheCreateInfo *") java.lang.foreign.MemorySegment pPipelineCacheCreateInfos() { return VkDeviceObjectReservationCreateInfo.get_pPipelineCacheCreateInfos(this.segment()); } + /// Sets `pPipelineCacheCreateInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelineCacheCreateInfos(MemorySegment segment, long index, @CType("const VkPipelineCacheCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pPipelineCacheCreateInfos.set(segment, 0L, index, value); } + /// Sets `pPipelineCacheCreateInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelineCacheCreateInfos(MemorySegment segment, @CType("const VkPipelineCacheCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceObjectReservationCreateInfo.set_pPipelineCacheCreateInfos(segment, 0L, value); } + /// Sets `pPipelineCacheCreateInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pPipelineCacheCreateInfosAt(long index, @CType("const VkPipelineCacheCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceObjectReservationCreateInfo.set_pPipelineCacheCreateInfos(this.segment(), index, value); return this; } + /// Sets `pPipelineCacheCreateInfos` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pPipelineCacheCreateInfos(@CType("const VkPipelineCacheCreateInfo *") java.lang.foreign.MemorySegment value) { VkDeviceObjectReservationCreateInfo.set_pPipelineCacheCreateInfos(this.segment(), value); return this; } + + /// {@return `pipelinePoolSizeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pipelinePoolSizeCount(MemorySegment segment, long index) { return (int) VH_pipelinePoolSizeCount.get(segment, 0L, index); } + /// {@return `pipelinePoolSizeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pipelinePoolSizeCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_pipelinePoolSizeCount(segment, 0L); } + /// {@return `pipelinePoolSizeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pipelinePoolSizeCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_pipelinePoolSizeCount(this.segment(), index); } + /// {@return `pipelinePoolSizeCount`} + public @CType("uint32_t") int pipelinePoolSizeCount() { return VkDeviceObjectReservationCreateInfo.get_pipelinePoolSizeCount(this.segment()); } + /// Sets `pipelinePoolSizeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelinePoolSizeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pipelinePoolSizeCount.set(segment, 0L, index, value); } + /// Sets `pipelinePoolSizeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelinePoolSizeCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelinePoolSizeCount(segment, 0L, value); } + /// Sets `pipelinePoolSizeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pipelinePoolSizeCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelinePoolSizeCount(this.segment(), index, value); return this; } + /// Sets `pipelinePoolSizeCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pipelinePoolSizeCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelinePoolSizeCount(this.segment(), value); return this; } + + /// {@return `pPipelinePoolSizes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelinePoolSize *") java.lang.foreign.MemorySegment get_pPipelinePoolSizes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelinePoolSizes.get(segment, 0L, index); } + /// {@return `pPipelinePoolSizes`} + /// @param segment the segment of the struct + public static @CType("const VkPipelinePoolSize *") java.lang.foreign.MemorySegment get_pPipelinePoolSizes(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_pPipelinePoolSizes(segment, 0L); } + /// {@return `pPipelinePoolSizes` at the given index} + /// @param index the index + public @CType("const VkPipelinePoolSize *") java.lang.foreign.MemorySegment pPipelinePoolSizesAt(long index) { return VkDeviceObjectReservationCreateInfo.get_pPipelinePoolSizes(this.segment(), index); } + /// {@return `pPipelinePoolSizes`} + public @CType("const VkPipelinePoolSize *") java.lang.foreign.MemorySegment pPipelinePoolSizes() { return VkDeviceObjectReservationCreateInfo.get_pPipelinePoolSizes(this.segment()); } + /// Sets `pPipelinePoolSizes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelinePoolSizes(MemorySegment segment, long index, @CType("const VkPipelinePoolSize *") java.lang.foreign.MemorySegment value) { VH_pPipelinePoolSizes.set(segment, 0L, index, value); } + /// Sets `pPipelinePoolSizes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelinePoolSizes(MemorySegment segment, @CType("const VkPipelinePoolSize *") java.lang.foreign.MemorySegment value) { VkDeviceObjectReservationCreateInfo.set_pPipelinePoolSizes(segment, 0L, value); } + /// Sets `pPipelinePoolSizes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pPipelinePoolSizesAt(long index, @CType("const VkPipelinePoolSize *") java.lang.foreign.MemorySegment value) { VkDeviceObjectReservationCreateInfo.set_pPipelinePoolSizes(this.segment(), index, value); return this; } + /// Sets `pPipelinePoolSizes` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pPipelinePoolSizes(@CType("const VkPipelinePoolSize *") java.lang.foreign.MemorySegment value) { VkDeviceObjectReservationCreateInfo.set_pPipelinePoolSizes(this.segment(), value); return this; } + + /// {@return `semaphoreRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_semaphoreRequestCount(MemorySegment segment, long index) { return (int) VH_semaphoreRequestCount.get(segment, 0L, index); } + /// {@return `semaphoreRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_semaphoreRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_semaphoreRequestCount(segment, 0L); } + /// {@return `semaphoreRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int semaphoreRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_semaphoreRequestCount(this.segment(), index); } + /// {@return `semaphoreRequestCount`} + public @CType("uint32_t") int semaphoreRequestCount() { return VkDeviceObjectReservationCreateInfo.get_semaphoreRequestCount(this.segment()); } + /// Sets `semaphoreRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphoreRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_semaphoreRequestCount.set(segment, 0L, index, value); } + /// Sets `semaphoreRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphoreRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_semaphoreRequestCount(segment, 0L, value); } + /// Sets `semaphoreRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo semaphoreRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_semaphoreRequestCount(this.segment(), index, value); return this; } + /// Sets `semaphoreRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo semaphoreRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_semaphoreRequestCount(this.segment(), value); return this; } + + /// {@return `commandBufferRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_commandBufferRequestCount(MemorySegment segment, long index) { return (int) VH_commandBufferRequestCount.get(segment, 0L, index); } + /// {@return `commandBufferRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_commandBufferRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_commandBufferRequestCount(segment, 0L); } + /// {@return `commandBufferRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int commandBufferRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_commandBufferRequestCount(this.segment(), index); } + /// {@return `commandBufferRequestCount`} + public @CType("uint32_t") int commandBufferRequestCount() { return VkDeviceObjectReservationCreateInfo.get_commandBufferRequestCount(this.segment()); } + /// Sets `commandBufferRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandBufferRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_commandBufferRequestCount.set(segment, 0L, index, value); } + /// Sets `commandBufferRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandBufferRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_commandBufferRequestCount(segment, 0L, value); } + /// Sets `commandBufferRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo commandBufferRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_commandBufferRequestCount(this.segment(), index, value); return this; } + /// Sets `commandBufferRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo commandBufferRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_commandBufferRequestCount(this.segment(), value); return this; } + + /// {@return `fenceRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_fenceRequestCount(MemorySegment segment, long index) { return (int) VH_fenceRequestCount.get(segment, 0L, index); } + /// {@return `fenceRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_fenceRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_fenceRequestCount(segment, 0L); } + /// {@return `fenceRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int fenceRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_fenceRequestCount(this.segment(), index); } + /// {@return `fenceRequestCount`} + public @CType("uint32_t") int fenceRequestCount() { return VkDeviceObjectReservationCreateInfo.get_fenceRequestCount(this.segment()); } + /// Sets `fenceRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fenceRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_fenceRequestCount.set(segment, 0L, index, value); } + /// Sets `fenceRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fenceRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_fenceRequestCount(segment, 0L, value); } + /// Sets `fenceRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo fenceRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_fenceRequestCount(this.segment(), index, value); return this; } + /// Sets `fenceRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo fenceRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_fenceRequestCount(this.segment(), value); return this; } + + /// {@return `deviceMemoryRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceMemoryRequestCount(MemorySegment segment, long index) { return (int) VH_deviceMemoryRequestCount.get(segment, 0L, index); } + /// {@return `deviceMemoryRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceMemoryRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_deviceMemoryRequestCount(segment, 0L); } + /// {@return `deviceMemoryRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceMemoryRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_deviceMemoryRequestCount(this.segment(), index); } + /// {@return `deviceMemoryRequestCount`} + public @CType("uint32_t") int deviceMemoryRequestCount() { return VkDeviceObjectReservationCreateInfo.get_deviceMemoryRequestCount(this.segment()); } + /// Sets `deviceMemoryRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceMemoryRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceMemoryRequestCount.set(segment, 0L, index, value); } + /// Sets `deviceMemoryRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceMemoryRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_deviceMemoryRequestCount(segment, 0L, value); } + /// Sets `deviceMemoryRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo deviceMemoryRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_deviceMemoryRequestCount(this.segment(), index, value); return this; } + /// Sets `deviceMemoryRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo deviceMemoryRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_deviceMemoryRequestCount(this.segment(), value); return this; } + + /// {@return `bufferRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferRequestCount(MemorySegment segment, long index) { return (int) VH_bufferRequestCount.get(segment, 0L, index); } + /// {@return `bufferRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_bufferRequestCount(segment, 0L); } + /// {@return `bufferRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_bufferRequestCount(this.segment(), index); } + /// {@return `bufferRequestCount`} + public @CType("uint32_t") int bufferRequestCount() { return VkDeviceObjectReservationCreateInfo.get_bufferRequestCount(this.segment()); } + /// Sets `bufferRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferRequestCount.set(segment, 0L, index, value); } + /// Sets `bufferRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_bufferRequestCount(segment, 0L, value); } + /// Sets `bufferRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo bufferRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_bufferRequestCount(this.segment(), index, value); return this; } + /// Sets `bufferRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo bufferRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_bufferRequestCount(this.segment(), value); return this; } + + /// {@return `imageRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_imageRequestCount(MemorySegment segment, long index) { return (int) VH_imageRequestCount.get(segment, 0L, index); } + /// {@return `imageRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_imageRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_imageRequestCount(segment, 0L); } + /// {@return `imageRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int imageRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_imageRequestCount(this.segment(), index); } + /// {@return `imageRequestCount`} + public @CType("uint32_t") int imageRequestCount() { return VkDeviceObjectReservationCreateInfo.get_imageRequestCount(this.segment()); } + /// Sets `imageRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_imageRequestCount.set(segment, 0L, index, value); } + /// Sets `imageRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_imageRequestCount(segment, 0L, value); } + /// Sets `imageRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo imageRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_imageRequestCount(this.segment(), index, value); return this; } + /// Sets `imageRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo imageRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_imageRequestCount(this.segment(), value); return this; } + + /// {@return `eventRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_eventRequestCount(MemorySegment segment, long index) { return (int) VH_eventRequestCount.get(segment, 0L, index); } + /// {@return `eventRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_eventRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_eventRequestCount(segment, 0L); } + /// {@return `eventRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int eventRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_eventRequestCount(this.segment(), index); } + /// {@return `eventRequestCount`} + public @CType("uint32_t") int eventRequestCount() { return VkDeviceObjectReservationCreateInfo.get_eventRequestCount(this.segment()); } + /// Sets `eventRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_eventRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_eventRequestCount.set(segment, 0L, index, value); } + /// Sets `eventRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_eventRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_eventRequestCount(segment, 0L, value); } + /// Sets `eventRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo eventRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_eventRequestCount(this.segment(), index, value); return this; } + /// Sets `eventRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo eventRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_eventRequestCount(this.segment(), value); return this; } + + /// {@return `queryPoolRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queryPoolRequestCount(MemorySegment segment, long index) { return (int) VH_queryPoolRequestCount.get(segment, 0L, index); } + /// {@return `queryPoolRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queryPoolRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_queryPoolRequestCount(segment, 0L); } + /// {@return `queryPoolRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queryPoolRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_queryPoolRequestCount(this.segment(), index); } + /// {@return `queryPoolRequestCount`} + public @CType("uint32_t") int queryPoolRequestCount() { return VkDeviceObjectReservationCreateInfo.get_queryPoolRequestCount(this.segment()); } + /// Sets `queryPoolRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queryPoolRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queryPoolRequestCount.set(segment, 0L, index, value); } + /// Sets `queryPoolRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queryPoolRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_queryPoolRequestCount(segment, 0L, value); } + /// Sets `queryPoolRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo queryPoolRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_queryPoolRequestCount(this.segment(), index, value); return this; } + /// Sets `queryPoolRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo queryPoolRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_queryPoolRequestCount(this.segment(), value); return this; } + + /// {@return `bufferViewRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bufferViewRequestCount(MemorySegment segment, long index) { return (int) VH_bufferViewRequestCount.get(segment, 0L, index); } + /// {@return `bufferViewRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bufferViewRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_bufferViewRequestCount(segment, 0L); } + /// {@return `bufferViewRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bufferViewRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_bufferViewRequestCount(this.segment(), index); } + /// {@return `bufferViewRequestCount`} + public @CType("uint32_t") int bufferViewRequestCount() { return VkDeviceObjectReservationCreateInfo.get_bufferViewRequestCount(this.segment()); } + /// Sets `bufferViewRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferViewRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bufferViewRequestCount.set(segment, 0L, index, value); } + /// Sets `bufferViewRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferViewRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_bufferViewRequestCount(segment, 0L, value); } + /// Sets `bufferViewRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo bufferViewRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_bufferViewRequestCount(this.segment(), index, value); return this; } + /// Sets `bufferViewRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo bufferViewRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_bufferViewRequestCount(this.segment(), value); return this; } + + /// {@return `imageViewRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_imageViewRequestCount(MemorySegment segment, long index) { return (int) VH_imageViewRequestCount.get(segment, 0L, index); } + /// {@return `imageViewRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_imageViewRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_imageViewRequestCount(segment, 0L); } + /// {@return `imageViewRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int imageViewRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_imageViewRequestCount(this.segment(), index); } + /// {@return `imageViewRequestCount`} + public @CType("uint32_t") int imageViewRequestCount() { return VkDeviceObjectReservationCreateInfo.get_imageViewRequestCount(this.segment()); } + /// Sets `imageViewRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageViewRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_imageViewRequestCount.set(segment, 0L, index, value); } + /// Sets `imageViewRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageViewRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_imageViewRequestCount(segment, 0L, value); } + /// Sets `imageViewRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo imageViewRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_imageViewRequestCount(this.segment(), index, value); return this; } + /// Sets `imageViewRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo imageViewRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_imageViewRequestCount(this.segment(), value); return this; } + + /// {@return `layeredImageViewRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_layeredImageViewRequestCount(MemorySegment segment, long index) { return (int) VH_layeredImageViewRequestCount.get(segment, 0L, index); } + /// {@return `layeredImageViewRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_layeredImageViewRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_layeredImageViewRequestCount(segment, 0L); } + /// {@return `layeredImageViewRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int layeredImageViewRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_layeredImageViewRequestCount(this.segment(), index); } + /// {@return `layeredImageViewRequestCount`} + public @CType("uint32_t") int layeredImageViewRequestCount() { return VkDeviceObjectReservationCreateInfo.get_layeredImageViewRequestCount(this.segment()); } + /// Sets `layeredImageViewRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layeredImageViewRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_layeredImageViewRequestCount.set(segment, 0L, index, value); } + /// Sets `layeredImageViewRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layeredImageViewRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_layeredImageViewRequestCount(segment, 0L, value); } + /// Sets `layeredImageViewRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo layeredImageViewRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_layeredImageViewRequestCount(this.segment(), index, value); return this; } + /// Sets `layeredImageViewRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo layeredImageViewRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_layeredImageViewRequestCount(this.segment(), value); return this; } + + /// {@return `pipelineCacheRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pipelineCacheRequestCount(MemorySegment segment, long index) { return (int) VH_pipelineCacheRequestCount.get(segment, 0L, index); } + /// {@return `pipelineCacheRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pipelineCacheRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_pipelineCacheRequestCount(segment, 0L); } + /// {@return `pipelineCacheRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pipelineCacheRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_pipelineCacheRequestCount(this.segment(), index); } + /// {@return `pipelineCacheRequestCount`} + public @CType("uint32_t") int pipelineCacheRequestCount() { return VkDeviceObjectReservationCreateInfo.get_pipelineCacheRequestCount(this.segment()); } + /// Sets `pipelineCacheRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineCacheRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pipelineCacheRequestCount.set(segment, 0L, index, value); } + /// Sets `pipelineCacheRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineCacheRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelineCacheRequestCount(segment, 0L, value); } + /// Sets `pipelineCacheRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pipelineCacheRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelineCacheRequestCount(this.segment(), index, value); return this; } + /// Sets `pipelineCacheRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pipelineCacheRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelineCacheRequestCount(this.segment(), value); return this; } + + /// {@return `pipelineLayoutRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pipelineLayoutRequestCount(MemorySegment segment, long index) { return (int) VH_pipelineLayoutRequestCount.get(segment, 0L, index); } + /// {@return `pipelineLayoutRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pipelineLayoutRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_pipelineLayoutRequestCount(segment, 0L); } + /// {@return `pipelineLayoutRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pipelineLayoutRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_pipelineLayoutRequestCount(this.segment(), index); } + /// {@return `pipelineLayoutRequestCount`} + public @CType("uint32_t") int pipelineLayoutRequestCount() { return VkDeviceObjectReservationCreateInfo.get_pipelineLayoutRequestCount(this.segment()); } + /// Sets `pipelineLayoutRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineLayoutRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pipelineLayoutRequestCount.set(segment, 0L, index, value); } + /// Sets `pipelineLayoutRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineLayoutRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelineLayoutRequestCount(segment, 0L, value); } + /// Sets `pipelineLayoutRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pipelineLayoutRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelineLayoutRequestCount(this.segment(), index, value); return this; } + /// Sets `pipelineLayoutRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo pipelineLayoutRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_pipelineLayoutRequestCount(this.segment(), value); return this; } + + /// {@return `renderPassRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_renderPassRequestCount(MemorySegment segment, long index) { return (int) VH_renderPassRequestCount.get(segment, 0L, index); } + /// {@return `renderPassRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_renderPassRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_renderPassRequestCount(segment, 0L); } + /// {@return `renderPassRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int renderPassRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_renderPassRequestCount(this.segment(), index); } + /// {@return `renderPassRequestCount`} + public @CType("uint32_t") int renderPassRequestCount() { return VkDeviceObjectReservationCreateInfo.get_renderPassRequestCount(this.segment()); } + /// Sets `renderPassRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderPassRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_renderPassRequestCount.set(segment, 0L, index, value); } + /// Sets `renderPassRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderPassRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_renderPassRequestCount(segment, 0L, value); } + /// Sets `renderPassRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo renderPassRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_renderPassRequestCount(this.segment(), index, value); return this; } + /// Sets `renderPassRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo renderPassRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_renderPassRequestCount(this.segment(), value); return this; } + + /// {@return `graphicsPipelineRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_graphicsPipelineRequestCount(MemorySegment segment, long index) { return (int) VH_graphicsPipelineRequestCount.get(segment, 0L, index); } + /// {@return `graphicsPipelineRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_graphicsPipelineRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_graphicsPipelineRequestCount(segment, 0L); } + /// {@return `graphicsPipelineRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int graphicsPipelineRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_graphicsPipelineRequestCount(this.segment(), index); } + /// {@return `graphicsPipelineRequestCount`} + public @CType("uint32_t") int graphicsPipelineRequestCount() { return VkDeviceObjectReservationCreateInfo.get_graphicsPipelineRequestCount(this.segment()); } + /// Sets `graphicsPipelineRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_graphicsPipelineRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_graphicsPipelineRequestCount.set(segment, 0L, index, value); } + /// Sets `graphicsPipelineRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_graphicsPipelineRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_graphicsPipelineRequestCount(segment, 0L, value); } + /// Sets `graphicsPipelineRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo graphicsPipelineRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_graphicsPipelineRequestCount(this.segment(), index, value); return this; } + /// Sets `graphicsPipelineRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo graphicsPipelineRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_graphicsPipelineRequestCount(this.segment(), value); return this; } + + /// {@return `computePipelineRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_computePipelineRequestCount(MemorySegment segment, long index) { return (int) VH_computePipelineRequestCount.get(segment, 0L, index); } + /// {@return `computePipelineRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_computePipelineRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_computePipelineRequestCount(segment, 0L); } + /// {@return `computePipelineRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int computePipelineRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_computePipelineRequestCount(this.segment(), index); } + /// {@return `computePipelineRequestCount`} + public @CType("uint32_t") int computePipelineRequestCount() { return VkDeviceObjectReservationCreateInfo.get_computePipelineRequestCount(this.segment()); } + /// Sets `computePipelineRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_computePipelineRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_computePipelineRequestCount.set(segment, 0L, index, value); } + /// Sets `computePipelineRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_computePipelineRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_computePipelineRequestCount(segment, 0L, value); } + /// Sets `computePipelineRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo computePipelineRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_computePipelineRequestCount(this.segment(), index, value); return this; } + /// Sets `computePipelineRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo computePipelineRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_computePipelineRequestCount(this.segment(), value); return this; } + + /// {@return `descriptorSetLayoutRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorSetLayoutRequestCount(MemorySegment segment, long index) { return (int) VH_descriptorSetLayoutRequestCount.get(segment, 0L, index); } + /// {@return `descriptorSetLayoutRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorSetLayoutRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_descriptorSetLayoutRequestCount(segment, 0L); } + /// {@return `descriptorSetLayoutRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorSetLayoutRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_descriptorSetLayoutRequestCount(this.segment(), index); } + /// {@return `descriptorSetLayoutRequestCount`} + public @CType("uint32_t") int descriptorSetLayoutRequestCount() { return VkDeviceObjectReservationCreateInfo.get_descriptorSetLayoutRequestCount(this.segment()); } + /// Sets `descriptorSetLayoutRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSetLayoutRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorSetLayoutRequestCount.set(segment, 0L, index, value); } + /// Sets `descriptorSetLayoutRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSetLayoutRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetLayoutRequestCount(segment, 0L, value); } + /// Sets `descriptorSetLayoutRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo descriptorSetLayoutRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetLayoutRequestCount(this.segment(), index, value); return this; } + /// Sets `descriptorSetLayoutRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo descriptorSetLayoutRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetLayoutRequestCount(this.segment(), value); return this; } + + /// {@return `samplerRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_samplerRequestCount(MemorySegment segment, long index) { return (int) VH_samplerRequestCount.get(segment, 0L, index); } + /// {@return `samplerRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_samplerRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_samplerRequestCount(segment, 0L); } + /// {@return `samplerRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int samplerRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_samplerRequestCount(this.segment(), index); } + /// {@return `samplerRequestCount`} + public @CType("uint32_t") int samplerRequestCount() { return VkDeviceObjectReservationCreateInfo.get_samplerRequestCount(this.segment()); } + /// Sets `samplerRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_samplerRequestCount.set(segment, 0L, index, value); } + /// Sets `samplerRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_samplerRequestCount(segment, 0L, value); } + /// Sets `samplerRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo samplerRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_samplerRequestCount(this.segment(), index, value); return this; } + /// Sets `samplerRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo samplerRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_samplerRequestCount(this.segment(), value); return this; } + + /// {@return `descriptorPoolRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorPoolRequestCount(MemorySegment segment, long index) { return (int) VH_descriptorPoolRequestCount.get(segment, 0L, index); } + /// {@return `descriptorPoolRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorPoolRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_descriptorPoolRequestCount(segment, 0L); } + /// {@return `descriptorPoolRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorPoolRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_descriptorPoolRequestCount(this.segment(), index); } + /// {@return `descriptorPoolRequestCount`} + public @CType("uint32_t") int descriptorPoolRequestCount() { return VkDeviceObjectReservationCreateInfo.get_descriptorPoolRequestCount(this.segment()); } + /// Sets `descriptorPoolRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorPoolRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorPoolRequestCount.set(segment, 0L, index, value); } + /// Sets `descriptorPoolRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorPoolRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorPoolRequestCount(segment, 0L, value); } + /// Sets `descriptorPoolRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo descriptorPoolRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorPoolRequestCount(this.segment(), index, value); return this; } + /// Sets `descriptorPoolRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo descriptorPoolRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorPoolRequestCount(this.segment(), value); return this; } + + /// {@return `descriptorSetRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorSetRequestCount(MemorySegment segment, long index) { return (int) VH_descriptorSetRequestCount.get(segment, 0L, index); } + /// {@return `descriptorSetRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorSetRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_descriptorSetRequestCount(segment, 0L); } + /// {@return `descriptorSetRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorSetRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_descriptorSetRequestCount(this.segment(), index); } + /// {@return `descriptorSetRequestCount`} + public @CType("uint32_t") int descriptorSetRequestCount() { return VkDeviceObjectReservationCreateInfo.get_descriptorSetRequestCount(this.segment()); } + /// Sets `descriptorSetRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSetRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorSetRequestCount.set(segment, 0L, index, value); } + /// Sets `descriptorSetRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSetRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetRequestCount(segment, 0L, value); } + /// Sets `descriptorSetRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo descriptorSetRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetRequestCount(this.segment(), index, value); return this; } + /// Sets `descriptorSetRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo descriptorSetRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetRequestCount(this.segment(), value); return this; } + + /// {@return `framebufferRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_framebufferRequestCount(MemorySegment segment, long index) { return (int) VH_framebufferRequestCount.get(segment, 0L, index); } + /// {@return `framebufferRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_framebufferRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_framebufferRequestCount(segment, 0L); } + /// {@return `framebufferRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int framebufferRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_framebufferRequestCount(this.segment(), index); } + /// {@return `framebufferRequestCount`} + public @CType("uint32_t") int framebufferRequestCount() { return VkDeviceObjectReservationCreateInfo.get_framebufferRequestCount(this.segment()); } + /// Sets `framebufferRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_framebufferRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_framebufferRequestCount.set(segment, 0L, index, value); } + /// Sets `framebufferRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_framebufferRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_framebufferRequestCount(segment, 0L, value); } + /// Sets `framebufferRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo framebufferRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_framebufferRequestCount(this.segment(), index, value); return this; } + /// Sets `framebufferRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo framebufferRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_framebufferRequestCount(this.segment(), value); return this; } + + /// {@return `commandPoolRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_commandPoolRequestCount(MemorySegment segment, long index) { return (int) VH_commandPoolRequestCount.get(segment, 0L, index); } + /// {@return `commandPoolRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_commandPoolRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_commandPoolRequestCount(segment, 0L); } + /// {@return `commandPoolRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int commandPoolRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_commandPoolRequestCount(this.segment(), index); } + /// {@return `commandPoolRequestCount`} + public @CType("uint32_t") int commandPoolRequestCount() { return VkDeviceObjectReservationCreateInfo.get_commandPoolRequestCount(this.segment()); } + /// Sets `commandPoolRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandPoolRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_commandPoolRequestCount.set(segment, 0L, index, value); } + /// Sets `commandPoolRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandPoolRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_commandPoolRequestCount(segment, 0L, value); } + /// Sets `commandPoolRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo commandPoolRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_commandPoolRequestCount(this.segment(), index, value); return this; } + /// Sets `commandPoolRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo commandPoolRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_commandPoolRequestCount(this.segment(), value); return this; } + + /// {@return `samplerYcbcrConversionRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_samplerYcbcrConversionRequestCount(MemorySegment segment, long index) { return (int) VH_samplerYcbcrConversionRequestCount.get(segment, 0L, index); } + /// {@return `samplerYcbcrConversionRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_samplerYcbcrConversionRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_samplerYcbcrConversionRequestCount(segment, 0L); } + /// {@return `samplerYcbcrConversionRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int samplerYcbcrConversionRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_samplerYcbcrConversionRequestCount(this.segment(), index); } + /// {@return `samplerYcbcrConversionRequestCount`} + public @CType("uint32_t") int samplerYcbcrConversionRequestCount() { return VkDeviceObjectReservationCreateInfo.get_samplerYcbcrConversionRequestCount(this.segment()); } + /// Sets `samplerYcbcrConversionRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerYcbcrConversionRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_samplerYcbcrConversionRequestCount.set(segment, 0L, index, value); } + /// Sets `samplerYcbcrConversionRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerYcbcrConversionRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_samplerYcbcrConversionRequestCount(segment, 0L, value); } + /// Sets `samplerYcbcrConversionRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo samplerYcbcrConversionRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_samplerYcbcrConversionRequestCount(this.segment(), index, value); return this; } + /// Sets `samplerYcbcrConversionRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo samplerYcbcrConversionRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_samplerYcbcrConversionRequestCount(this.segment(), value); return this; } + + /// {@return `surfaceRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_surfaceRequestCount(MemorySegment segment, long index) { return (int) VH_surfaceRequestCount.get(segment, 0L, index); } + /// {@return `surfaceRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_surfaceRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_surfaceRequestCount(segment, 0L); } + /// {@return `surfaceRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int surfaceRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_surfaceRequestCount(this.segment(), index); } + /// {@return `surfaceRequestCount`} + public @CType("uint32_t") int surfaceRequestCount() { return VkDeviceObjectReservationCreateInfo.get_surfaceRequestCount(this.segment()); } + /// Sets `surfaceRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_surfaceRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_surfaceRequestCount.set(segment, 0L, index, value); } + /// Sets `surfaceRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_surfaceRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_surfaceRequestCount(segment, 0L, value); } + /// Sets `surfaceRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo surfaceRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_surfaceRequestCount(this.segment(), index, value); return this; } + /// Sets `surfaceRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo surfaceRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_surfaceRequestCount(this.segment(), value); return this; } + + /// {@return `swapchainRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_swapchainRequestCount(MemorySegment segment, long index) { return (int) VH_swapchainRequestCount.get(segment, 0L, index); } + /// {@return `swapchainRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_swapchainRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_swapchainRequestCount(segment, 0L); } + /// {@return `swapchainRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int swapchainRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_swapchainRequestCount(this.segment(), index); } + /// {@return `swapchainRequestCount`} + public @CType("uint32_t") int swapchainRequestCount() { return VkDeviceObjectReservationCreateInfo.get_swapchainRequestCount(this.segment()); } + /// Sets `swapchainRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_swapchainRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_swapchainRequestCount.set(segment, 0L, index, value); } + /// Sets `swapchainRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_swapchainRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_swapchainRequestCount(segment, 0L, value); } + /// Sets `swapchainRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo swapchainRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_swapchainRequestCount(this.segment(), index, value); return this; } + /// Sets `swapchainRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo swapchainRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_swapchainRequestCount(this.segment(), value); return this; } + + /// {@return `displayModeRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_displayModeRequestCount(MemorySegment segment, long index) { return (int) VH_displayModeRequestCount.get(segment, 0L, index); } + /// {@return `displayModeRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_displayModeRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_displayModeRequestCount(segment, 0L); } + /// {@return `displayModeRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int displayModeRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_displayModeRequestCount(this.segment(), index); } + /// {@return `displayModeRequestCount`} + public @CType("uint32_t") int displayModeRequestCount() { return VkDeviceObjectReservationCreateInfo.get_displayModeRequestCount(this.segment()); } + /// Sets `displayModeRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_displayModeRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_displayModeRequestCount.set(segment, 0L, index, value); } + /// Sets `displayModeRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_displayModeRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_displayModeRequestCount(segment, 0L, value); } + /// Sets `displayModeRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo displayModeRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_displayModeRequestCount(this.segment(), index, value); return this; } + /// Sets `displayModeRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo displayModeRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_displayModeRequestCount(this.segment(), value); return this; } + + /// {@return `subpassDescriptionRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subpassDescriptionRequestCount(MemorySegment segment, long index) { return (int) VH_subpassDescriptionRequestCount.get(segment, 0L, index); } + /// {@return `subpassDescriptionRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subpassDescriptionRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_subpassDescriptionRequestCount(segment, 0L); } + /// {@return `subpassDescriptionRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int subpassDescriptionRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_subpassDescriptionRequestCount(this.segment(), index); } + /// {@return `subpassDescriptionRequestCount`} + public @CType("uint32_t") int subpassDescriptionRequestCount() { return VkDeviceObjectReservationCreateInfo.get_subpassDescriptionRequestCount(this.segment()); } + /// Sets `subpassDescriptionRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpassDescriptionRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subpassDescriptionRequestCount.set(segment, 0L, index, value); } + /// Sets `subpassDescriptionRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpassDescriptionRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_subpassDescriptionRequestCount(segment, 0L, value); } + /// Sets `subpassDescriptionRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo subpassDescriptionRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_subpassDescriptionRequestCount(this.segment(), index, value); return this; } + /// Sets `subpassDescriptionRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo subpassDescriptionRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_subpassDescriptionRequestCount(this.segment(), value); return this; } + + /// {@return `attachmentDescriptionRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachmentDescriptionRequestCount(MemorySegment segment, long index) { return (int) VH_attachmentDescriptionRequestCount.get(segment, 0L, index); } + /// {@return `attachmentDescriptionRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachmentDescriptionRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_attachmentDescriptionRequestCount(segment, 0L); } + /// {@return `attachmentDescriptionRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentDescriptionRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_attachmentDescriptionRequestCount(this.segment(), index); } + /// {@return `attachmentDescriptionRequestCount`} + public @CType("uint32_t") int attachmentDescriptionRequestCount() { return VkDeviceObjectReservationCreateInfo.get_attachmentDescriptionRequestCount(this.segment()); } + /// Sets `attachmentDescriptionRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentDescriptionRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachmentDescriptionRequestCount.set(segment, 0L, index, value); } + /// Sets `attachmentDescriptionRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentDescriptionRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_attachmentDescriptionRequestCount(segment, 0L, value); } + /// Sets `attachmentDescriptionRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo attachmentDescriptionRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_attachmentDescriptionRequestCount(this.segment(), index, value); return this; } + /// Sets `attachmentDescriptionRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo attachmentDescriptionRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_attachmentDescriptionRequestCount(this.segment(), value); return this; } + + /// {@return `descriptorSetLayoutBindingRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorSetLayoutBindingRequestCount(MemorySegment segment, long index) { return (int) VH_descriptorSetLayoutBindingRequestCount.get(segment, 0L, index); } + /// {@return `descriptorSetLayoutBindingRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorSetLayoutBindingRequestCount(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_descriptorSetLayoutBindingRequestCount(segment, 0L); } + /// {@return `descriptorSetLayoutBindingRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorSetLayoutBindingRequestCountAt(long index) { return VkDeviceObjectReservationCreateInfo.get_descriptorSetLayoutBindingRequestCount(this.segment(), index); } + /// {@return `descriptorSetLayoutBindingRequestCount`} + public @CType("uint32_t") int descriptorSetLayoutBindingRequestCount() { return VkDeviceObjectReservationCreateInfo.get_descriptorSetLayoutBindingRequestCount(this.segment()); } + /// Sets `descriptorSetLayoutBindingRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSetLayoutBindingRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorSetLayoutBindingRequestCount.set(segment, 0L, index, value); } + /// Sets `descriptorSetLayoutBindingRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSetLayoutBindingRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetLayoutBindingRequestCount(segment, 0L, value); } + /// Sets `descriptorSetLayoutBindingRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo descriptorSetLayoutBindingRequestCountAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetLayoutBindingRequestCount(this.segment(), index, value); return this; } + /// Sets `descriptorSetLayoutBindingRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo descriptorSetLayoutBindingRequestCount(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetLayoutBindingRequestCount(this.segment(), value); return this; } + + /// {@return `descriptorSetLayoutBindingLimit` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorSetLayoutBindingLimit(MemorySegment segment, long index) { return (int) VH_descriptorSetLayoutBindingLimit.get(segment, 0L, index); } + /// {@return `descriptorSetLayoutBindingLimit`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorSetLayoutBindingLimit(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_descriptorSetLayoutBindingLimit(segment, 0L); } + /// {@return `descriptorSetLayoutBindingLimit` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorSetLayoutBindingLimitAt(long index) { return VkDeviceObjectReservationCreateInfo.get_descriptorSetLayoutBindingLimit(this.segment(), index); } + /// {@return `descriptorSetLayoutBindingLimit`} + public @CType("uint32_t") int descriptorSetLayoutBindingLimit() { return VkDeviceObjectReservationCreateInfo.get_descriptorSetLayoutBindingLimit(this.segment()); } + /// Sets `descriptorSetLayoutBindingLimit` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSetLayoutBindingLimit(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorSetLayoutBindingLimit.set(segment, 0L, index, value); } + /// Sets `descriptorSetLayoutBindingLimit` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSetLayoutBindingLimit(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetLayoutBindingLimit(segment, 0L, value); } + /// Sets `descriptorSetLayoutBindingLimit` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo descriptorSetLayoutBindingLimitAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetLayoutBindingLimit(this.segment(), index, value); return this; } + /// Sets `descriptorSetLayoutBindingLimit` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo descriptorSetLayoutBindingLimit(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_descriptorSetLayoutBindingLimit(this.segment(), value); return this; } + + /// {@return `maxImageViewMipLevels` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageViewMipLevels(MemorySegment segment, long index) { return (int) VH_maxImageViewMipLevels.get(segment, 0L, index); } + /// {@return `maxImageViewMipLevels`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageViewMipLevels(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_maxImageViewMipLevels(segment, 0L); } + /// {@return `maxImageViewMipLevels` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageViewMipLevelsAt(long index) { return VkDeviceObjectReservationCreateInfo.get_maxImageViewMipLevels(this.segment(), index); } + /// {@return `maxImageViewMipLevels`} + public @CType("uint32_t") int maxImageViewMipLevels() { return VkDeviceObjectReservationCreateInfo.get_maxImageViewMipLevels(this.segment()); } + /// Sets `maxImageViewMipLevels` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageViewMipLevels(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageViewMipLevels.set(segment, 0L, index, value); } + /// Sets `maxImageViewMipLevels` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageViewMipLevels(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxImageViewMipLevels(segment, 0L, value); } + /// Sets `maxImageViewMipLevels` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxImageViewMipLevelsAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxImageViewMipLevels(this.segment(), index, value); return this; } + /// Sets `maxImageViewMipLevels` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxImageViewMipLevels(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxImageViewMipLevels(this.segment(), value); return this; } + + /// {@return `maxImageViewArrayLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageViewArrayLayers(MemorySegment segment, long index) { return (int) VH_maxImageViewArrayLayers.get(segment, 0L, index); } + /// {@return `maxImageViewArrayLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageViewArrayLayers(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_maxImageViewArrayLayers(segment, 0L); } + /// {@return `maxImageViewArrayLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageViewArrayLayersAt(long index) { return VkDeviceObjectReservationCreateInfo.get_maxImageViewArrayLayers(this.segment(), index); } + /// {@return `maxImageViewArrayLayers`} + public @CType("uint32_t") int maxImageViewArrayLayers() { return VkDeviceObjectReservationCreateInfo.get_maxImageViewArrayLayers(this.segment()); } + /// Sets `maxImageViewArrayLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageViewArrayLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageViewArrayLayers.set(segment, 0L, index, value); } + /// Sets `maxImageViewArrayLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageViewArrayLayers(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxImageViewArrayLayers(segment, 0L, value); } + /// Sets `maxImageViewArrayLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxImageViewArrayLayersAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxImageViewArrayLayers(this.segment(), index, value); return this; } + /// Sets `maxImageViewArrayLayers` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxImageViewArrayLayers(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxImageViewArrayLayers(this.segment(), value); return this; } + + /// {@return `maxLayeredImageViewMipLevels` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxLayeredImageViewMipLevels(MemorySegment segment, long index) { return (int) VH_maxLayeredImageViewMipLevels.get(segment, 0L, index); } + /// {@return `maxLayeredImageViewMipLevels`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxLayeredImageViewMipLevels(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_maxLayeredImageViewMipLevels(segment, 0L); } + /// {@return `maxLayeredImageViewMipLevels` at the given index} + /// @param index the index + public @CType("uint32_t") int maxLayeredImageViewMipLevelsAt(long index) { return VkDeviceObjectReservationCreateInfo.get_maxLayeredImageViewMipLevels(this.segment(), index); } + /// {@return `maxLayeredImageViewMipLevels`} + public @CType("uint32_t") int maxLayeredImageViewMipLevels() { return VkDeviceObjectReservationCreateInfo.get_maxLayeredImageViewMipLevels(this.segment()); } + /// Sets `maxLayeredImageViewMipLevels` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLayeredImageViewMipLevels(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxLayeredImageViewMipLevels.set(segment, 0L, index, value); } + /// Sets `maxLayeredImageViewMipLevels` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLayeredImageViewMipLevels(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxLayeredImageViewMipLevels(segment, 0L, value); } + /// Sets `maxLayeredImageViewMipLevels` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxLayeredImageViewMipLevelsAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxLayeredImageViewMipLevels(this.segment(), index, value); return this; } + /// Sets `maxLayeredImageViewMipLevels` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxLayeredImageViewMipLevels(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxLayeredImageViewMipLevels(this.segment(), value); return this; } + + /// {@return `maxOcclusionQueriesPerPool` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxOcclusionQueriesPerPool(MemorySegment segment, long index) { return (int) VH_maxOcclusionQueriesPerPool.get(segment, 0L, index); } + /// {@return `maxOcclusionQueriesPerPool`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxOcclusionQueriesPerPool(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_maxOcclusionQueriesPerPool(segment, 0L); } + /// {@return `maxOcclusionQueriesPerPool` at the given index} + /// @param index the index + public @CType("uint32_t") int maxOcclusionQueriesPerPoolAt(long index) { return VkDeviceObjectReservationCreateInfo.get_maxOcclusionQueriesPerPool(this.segment(), index); } + /// {@return `maxOcclusionQueriesPerPool`} + public @CType("uint32_t") int maxOcclusionQueriesPerPool() { return VkDeviceObjectReservationCreateInfo.get_maxOcclusionQueriesPerPool(this.segment()); } + /// Sets `maxOcclusionQueriesPerPool` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxOcclusionQueriesPerPool(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxOcclusionQueriesPerPool.set(segment, 0L, index, value); } + /// Sets `maxOcclusionQueriesPerPool` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxOcclusionQueriesPerPool(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxOcclusionQueriesPerPool(segment, 0L, value); } + /// Sets `maxOcclusionQueriesPerPool` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxOcclusionQueriesPerPoolAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxOcclusionQueriesPerPool(this.segment(), index, value); return this; } + /// Sets `maxOcclusionQueriesPerPool` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxOcclusionQueriesPerPool(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxOcclusionQueriesPerPool(this.segment(), value); return this; } + + /// {@return `maxPipelineStatisticsQueriesPerPool` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPipelineStatisticsQueriesPerPool(MemorySegment segment, long index) { return (int) VH_maxPipelineStatisticsQueriesPerPool.get(segment, 0L, index); } + /// {@return `maxPipelineStatisticsQueriesPerPool`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPipelineStatisticsQueriesPerPool(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_maxPipelineStatisticsQueriesPerPool(segment, 0L); } + /// {@return `maxPipelineStatisticsQueriesPerPool` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPipelineStatisticsQueriesPerPoolAt(long index) { return VkDeviceObjectReservationCreateInfo.get_maxPipelineStatisticsQueriesPerPool(this.segment(), index); } + /// {@return `maxPipelineStatisticsQueriesPerPool`} + public @CType("uint32_t") int maxPipelineStatisticsQueriesPerPool() { return VkDeviceObjectReservationCreateInfo.get_maxPipelineStatisticsQueriesPerPool(this.segment()); } + /// Sets `maxPipelineStatisticsQueriesPerPool` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPipelineStatisticsQueriesPerPool(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPipelineStatisticsQueriesPerPool.set(segment, 0L, index, value); } + /// Sets `maxPipelineStatisticsQueriesPerPool` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPipelineStatisticsQueriesPerPool(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxPipelineStatisticsQueriesPerPool(segment, 0L, value); } + /// Sets `maxPipelineStatisticsQueriesPerPool` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxPipelineStatisticsQueriesPerPoolAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxPipelineStatisticsQueriesPerPool(this.segment(), index, value); return this; } + /// Sets `maxPipelineStatisticsQueriesPerPool` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxPipelineStatisticsQueriesPerPool(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxPipelineStatisticsQueriesPerPool(this.segment(), value); return this; } + + /// {@return `maxTimestampQueriesPerPool` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTimestampQueriesPerPool(MemorySegment segment, long index) { return (int) VH_maxTimestampQueriesPerPool.get(segment, 0L, index); } + /// {@return `maxTimestampQueriesPerPool`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTimestampQueriesPerPool(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_maxTimestampQueriesPerPool(segment, 0L); } + /// {@return `maxTimestampQueriesPerPool` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTimestampQueriesPerPoolAt(long index) { return VkDeviceObjectReservationCreateInfo.get_maxTimestampQueriesPerPool(this.segment(), index); } + /// {@return `maxTimestampQueriesPerPool`} + public @CType("uint32_t") int maxTimestampQueriesPerPool() { return VkDeviceObjectReservationCreateInfo.get_maxTimestampQueriesPerPool(this.segment()); } + /// Sets `maxTimestampQueriesPerPool` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTimestampQueriesPerPool(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTimestampQueriesPerPool.set(segment, 0L, index, value); } + /// Sets `maxTimestampQueriesPerPool` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTimestampQueriesPerPool(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxTimestampQueriesPerPool(segment, 0L, value); } + /// Sets `maxTimestampQueriesPerPool` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxTimestampQueriesPerPoolAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxTimestampQueriesPerPool(this.segment(), index, value); return this; } + /// Sets `maxTimestampQueriesPerPool` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxTimestampQueriesPerPool(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxTimestampQueriesPerPool(this.segment(), value); return this; } + + /// {@return `maxImmutableSamplersPerDescriptorSetLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImmutableSamplersPerDescriptorSetLayout(MemorySegment segment, long index) { return (int) VH_maxImmutableSamplersPerDescriptorSetLayout.get(segment, 0L, index); } + /// {@return `maxImmutableSamplersPerDescriptorSetLayout`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImmutableSamplersPerDescriptorSetLayout(MemorySegment segment) { return VkDeviceObjectReservationCreateInfo.get_maxImmutableSamplersPerDescriptorSetLayout(segment, 0L); } + /// {@return `maxImmutableSamplersPerDescriptorSetLayout` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImmutableSamplersPerDescriptorSetLayoutAt(long index) { return VkDeviceObjectReservationCreateInfo.get_maxImmutableSamplersPerDescriptorSetLayout(this.segment(), index); } + /// {@return `maxImmutableSamplersPerDescriptorSetLayout`} + public @CType("uint32_t") int maxImmutableSamplersPerDescriptorSetLayout() { return VkDeviceObjectReservationCreateInfo.get_maxImmutableSamplersPerDescriptorSetLayout(this.segment()); } + /// Sets `maxImmutableSamplersPerDescriptorSetLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImmutableSamplersPerDescriptorSetLayout(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImmutableSamplersPerDescriptorSetLayout.set(segment, 0L, index, value); } + /// Sets `maxImmutableSamplersPerDescriptorSetLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImmutableSamplersPerDescriptorSetLayout(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxImmutableSamplersPerDescriptorSetLayout(segment, 0L, value); } + /// Sets `maxImmutableSamplersPerDescriptorSetLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxImmutableSamplersPerDescriptorSetLayoutAt(long index, @CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxImmutableSamplersPerDescriptorSetLayout(this.segment(), index, value); return this; } + /// Sets `maxImmutableSamplersPerDescriptorSetLayout` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceObjectReservationCreateInfo maxImmutableSamplersPerDescriptorSetLayout(@CType("uint32_t") int value) { VkDeviceObjectReservationCreateInfo.set_maxImmutableSamplersPerDescriptorSetLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDevicePrivateDataCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDevicePrivateDataCreateInfo.java new file mode 100644 index 00000000..61e98357 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDevicePrivateDataCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### privateDataSlotRequestCount +/// [VarHandle][#VH_privateDataSlotRequestCount] - [Getter][#privateDataSlotRequestCount()] - [Setter][#privateDataSlotRequestCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDevicePrivateDataCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t privateDataSlotRequestCount; +/// } VkDevicePrivateDataCreateInfo; +/// ``` +public final class VkDevicePrivateDataCreateInfo extends Struct { + /// The struct layout of `VkDevicePrivateDataCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("privateDataSlotRequestCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `privateDataSlotRequestCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_privateDataSlotRequestCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("privateDataSlotRequestCount")); + + /// Creates `VkDevicePrivateDataCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDevicePrivateDataCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDevicePrivateDataCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDevicePrivateDataCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDevicePrivateDataCreateInfo(segment); } + + /// Creates `VkDevicePrivateDataCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDevicePrivateDataCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDevicePrivateDataCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDevicePrivateDataCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDevicePrivateDataCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDevicePrivateDataCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDevicePrivateDataCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDevicePrivateDataCreateInfo` + public static VkDevicePrivateDataCreateInfo alloc(SegmentAllocator allocator) { return new VkDevicePrivateDataCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDevicePrivateDataCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDevicePrivateDataCreateInfo` + public static VkDevicePrivateDataCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDevicePrivateDataCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDevicePrivateDataCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDevicePrivateDataCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDevicePrivateDataCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDevicePrivateDataCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDevicePrivateDataCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDevicePrivateDataCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDevicePrivateDataCreateInfo sType(@CType("VkStructureType") int value) { VkDevicePrivateDataCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDevicePrivateDataCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDevicePrivateDataCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDevicePrivateDataCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDevicePrivateDataCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDevicePrivateDataCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDevicePrivateDataCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDevicePrivateDataCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDevicePrivateDataCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `privateDataSlotRequestCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_privateDataSlotRequestCount(MemorySegment segment, long index) { return (int) VH_privateDataSlotRequestCount.get(segment, 0L, index); } + /// {@return `privateDataSlotRequestCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_privateDataSlotRequestCount(MemorySegment segment) { return VkDevicePrivateDataCreateInfo.get_privateDataSlotRequestCount(segment, 0L); } + /// {@return `privateDataSlotRequestCount` at the given index} + /// @param index the index + public @CType("uint32_t") int privateDataSlotRequestCountAt(long index) { return VkDevicePrivateDataCreateInfo.get_privateDataSlotRequestCount(this.segment(), index); } + /// {@return `privateDataSlotRequestCount`} + public @CType("uint32_t") int privateDataSlotRequestCount() { return VkDevicePrivateDataCreateInfo.get_privateDataSlotRequestCount(this.segment()); } + /// Sets `privateDataSlotRequestCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_privateDataSlotRequestCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_privateDataSlotRequestCount.set(segment, 0L, index, value); } + /// Sets `privateDataSlotRequestCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_privateDataSlotRequestCount(MemorySegment segment, @CType("uint32_t") int value) { VkDevicePrivateDataCreateInfo.set_privateDataSlotRequestCount(segment, 0L, value); } + /// Sets `privateDataSlotRequestCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDevicePrivateDataCreateInfo privateDataSlotRequestCountAt(long index, @CType("uint32_t") int value) { VkDevicePrivateDataCreateInfo.set_privateDataSlotRequestCount(this.segment(), index, value); return this; } + /// Sets `privateDataSlotRequestCount` with the given value. + /// @param value the value + /// @return `this` + public VkDevicePrivateDataCreateInfo privateDataSlotRequestCount(@CType("uint32_t") int value) { VkDevicePrivateDataCreateInfo.set_privateDataSlotRequestCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceQueueCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceQueueCreateInfo.java new file mode 100644 index 00000000..036b95f2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceQueueCreateInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### queueFamilyIndex +/// [VarHandle][#VH_queueFamilyIndex] - [Getter][#queueFamilyIndex()] - [Setter][#queueFamilyIndex(int)] +/// ### queueCount +/// [VarHandle][#VH_queueCount] - [Getter][#queueCount()] - [Setter][#queueCount(int)] +/// ### pQueuePriorities +/// [VarHandle][#VH_pQueuePriorities] - [Getter][#pQueuePriorities()] - [Setter][#pQueuePriorities(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceQueueCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceQueueCreateFlags flags; +/// uint32_t queueFamilyIndex; +/// uint32_t queueCount; +/// const float * pQueuePriorities; +/// } VkDeviceQueueCreateInfo; +/// ``` +public final class VkDeviceQueueCreateInfo extends Struct { + /// The struct layout of `VkDeviceQueueCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("queueFamilyIndex"), + ValueLayout.JAVA_INT.withName("queueCount"), + ValueLayout.ADDRESS.withName("pQueuePriorities") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `queueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueFamilyIndex")); + /// The [VarHandle] of `queueCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueCount")); + /// The [VarHandle] of `pQueuePriorities` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pQueuePriorities = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pQueuePriorities")); + + /// Creates `VkDeviceQueueCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceQueueCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceQueueCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueCreateInfo(segment); } + + /// Creates `VkDeviceQueueCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceQueueCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceQueueCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceQueueCreateInfo` + public static VkDeviceQueueCreateInfo alloc(SegmentAllocator allocator) { return new VkDeviceQueueCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceQueueCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceQueueCreateInfo` + public static VkDeviceQueueCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceQueueCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceQueueCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceQueueCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceQueueCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceQueueCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceQueueCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo sType(@CType("VkStructureType") int value) { VkDeviceQueueCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceQueueCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceQueueCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceQueueCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceQueueCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDeviceQueueCreateFlags") int get_flags(MemorySegment segment) { return VkDeviceQueueCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDeviceQueueCreateFlags") int flagsAt(long index) { return VkDeviceQueueCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDeviceQueueCreateFlags") int flags() { return VkDeviceQueueCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDeviceQueueCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDeviceQueueCreateFlags") int value) { VkDeviceQueueCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo flagsAt(long index, @CType("VkDeviceQueueCreateFlags") int value) { VkDeviceQueueCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo flags(@CType("VkDeviceQueueCreateFlags") int value) { VkDeviceQueueCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `queueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueFamilyIndex(MemorySegment segment, long index) { return (int) VH_queueFamilyIndex.get(segment, 0L, index); } + /// {@return `queueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueFamilyIndex(MemorySegment segment) { return VkDeviceQueueCreateInfo.get_queueFamilyIndex(segment, 0L); } + /// {@return `queueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int queueFamilyIndexAt(long index) { return VkDeviceQueueCreateInfo.get_queueFamilyIndex(this.segment(), index); } + /// {@return `queueFamilyIndex`} + public @CType("uint32_t") int queueFamilyIndex() { return VkDeviceQueueCreateInfo.get_queueFamilyIndex(this.segment()); } + /// Sets `queueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `queueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceQueueCreateInfo.set_queueFamilyIndex(segment, 0L, value); } + /// Sets `queueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo queueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkDeviceQueueCreateInfo.set_queueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `queueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo queueFamilyIndex(@CType("uint32_t") int value) { VkDeviceQueueCreateInfo.set_queueFamilyIndex(this.segment(), value); return this; } + + /// {@return `queueCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueCount(MemorySegment segment, long index) { return (int) VH_queueCount.get(segment, 0L, index); } + /// {@return `queueCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueCount(MemorySegment segment) { return VkDeviceQueueCreateInfo.get_queueCount(segment, 0L); } + /// {@return `queueCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queueCountAt(long index) { return VkDeviceQueueCreateInfo.get_queueCount(this.segment(), index); } + /// {@return `queueCount`} + public @CType("uint32_t") int queueCount() { return VkDeviceQueueCreateInfo.get_queueCount(this.segment()); } + /// Sets `queueCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueCount.set(segment, 0L, index, value); } + /// Sets `queueCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueCount(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceQueueCreateInfo.set_queueCount(segment, 0L, value); } + /// Sets `queueCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo queueCountAt(long index, @CType("uint32_t") int value) { VkDeviceQueueCreateInfo.set_queueCount(this.segment(), index, value); return this; } + /// Sets `queueCount` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo queueCount(@CType("uint32_t") int value) { VkDeviceQueueCreateInfo.set_queueCount(this.segment(), value); return this; } + + /// {@return `pQueuePriorities` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const float *") java.lang.foreign.MemorySegment get_pQueuePriorities(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pQueuePriorities.get(segment, 0L, index); } + /// {@return `pQueuePriorities`} + /// @param segment the segment of the struct + public static @CType("const float *") java.lang.foreign.MemorySegment get_pQueuePriorities(MemorySegment segment) { return VkDeviceQueueCreateInfo.get_pQueuePriorities(segment, 0L); } + /// {@return `pQueuePriorities` at the given index} + /// @param index the index + public @CType("const float *") java.lang.foreign.MemorySegment pQueuePrioritiesAt(long index) { return VkDeviceQueueCreateInfo.get_pQueuePriorities(this.segment(), index); } + /// {@return `pQueuePriorities`} + public @CType("const float *") java.lang.foreign.MemorySegment pQueuePriorities() { return VkDeviceQueueCreateInfo.get_pQueuePriorities(this.segment()); } + /// Sets `pQueuePriorities` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pQueuePriorities(MemorySegment segment, long index, @CType("const float *") java.lang.foreign.MemorySegment value) { VH_pQueuePriorities.set(segment, 0L, index, value); } + /// Sets `pQueuePriorities` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pQueuePriorities(MemorySegment segment, @CType("const float *") java.lang.foreign.MemorySegment value) { VkDeviceQueueCreateInfo.set_pQueuePriorities(segment, 0L, value); } + /// Sets `pQueuePriorities` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo pQueuePrioritiesAt(long index, @CType("const float *") java.lang.foreign.MemorySegment value) { VkDeviceQueueCreateInfo.set_pQueuePriorities(this.segment(), index, value); return this; } + /// Sets `pQueuePriorities` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueCreateInfo pQueuePriorities(@CType("const float *") java.lang.foreign.MemorySegment value) { VkDeviceQueueCreateInfo.set_pQueuePriorities(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceQueueGlobalPriorityCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceQueueGlobalPriorityCreateInfo.java new file mode 100644 index 00000000..74e1e348 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceQueueGlobalPriorityCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### globalPriority +/// [VarHandle][#VH_globalPriority] - [Getter][#globalPriority()] - [Setter][#globalPriority(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceQueueGlobalPriorityCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkQueueGlobalPriority globalPriority; +/// } VkDeviceQueueGlobalPriorityCreateInfo; +/// ``` +public final class VkDeviceQueueGlobalPriorityCreateInfo extends Struct { + /// The struct layout of `VkDeviceQueueGlobalPriorityCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("globalPriority") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `globalPriority` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_globalPriority = LAYOUT.arrayElementVarHandle(PathElement.groupElement("globalPriority")); + + /// Creates `VkDeviceQueueGlobalPriorityCreateInfo` with the given segment. + /// @param segment the memory segment + public VkDeviceQueueGlobalPriorityCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceQueueGlobalPriorityCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueGlobalPriorityCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueGlobalPriorityCreateInfo(segment); } + + /// Creates `VkDeviceQueueGlobalPriorityCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueGlobalPriorityCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueGlobalPriorityCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceQueueGlobalPriorityCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueGlobalPriorityCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueGlobalPriorityCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceQueueGlobalPriorityCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceQueueGlobalPriorityCreateInfo` + public static VkDeviceQueueGlobalPriorityCreateInfo alloc(SegmentAllocator allocator) { return new VkDeviceQueueGlobalPriorityCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceQueueGlobalPriorityCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceQueueGlobalPriorityCreateInfo` + public static VkDeviceQueueGlobalPriorityCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkDeviceQueueGlobalPriorityCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceQueueGlobalPriorityCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceQueueGlobalPriorityCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceQueueGlobalPriorityCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceQueueGlobalPriorityCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueGlobalPriorityCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceQueueGlobalPriorityCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueGlobalPriorityCreateInfo sType(@CType("VkStructureType") int value) { VkDeviceQueueGlobalPriorityCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceQueueGlobalPriorityCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceQueueGlobalPriorityCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceQueueGlobalPriorityCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueGlobalPriorityCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueGlobalPriorityCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueGlobalPriorityCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueGlobalPriorityCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueGlobalPriorityCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `globalPriority` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueueGlobalPriority") int get_globalPriority(MemorySegment segment, long index) { return (int) VH_globalPriority.get(segment, 0L, index); } + /// {@return `globalPriority`} + /// @param segment the segment of the struct + public static @CType("VkQueueGlobalPriority") int get_globalPriority(MemorySegment segment) { return VkDeviceQueueGlobalPriorityCreateInfo.get_globalPriority(segment, 0L); } + /// {@return `globalPriority` at the given index} + /// @param index the index + public @CType("VkQueueGlobalPriority") int globalPriorityAt(long index) { return VkDeviceQueueGlobalPriorityCreateInfo.get_globalPriority(this.segment(), index); } + /// {@return `globalPriority`} + public @CType("VkQueueGlobalPriority") int globalPriority() { return VkDeviceQueueGlobalPriorityCreateInfo.get_globalPriority(this.segment()); } + /// Sets `globalPriority` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_globalPriority(MemorySegment segment, long index, @CType("VkQueueGlobalPriority") int value) { VH_globalPriority.set(segment, 0L, index, value); } + /// Sets `globalPriority` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_globalPriority(MemorySegment segment, @CType("VkQueueGlobalPriority") int value) { VkDeviceQueueGlobalPriorityCreateInfo.set_globalPriority(segment, 0L, value); } + /// Sets `globalPriority` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueGlobalPriorityCreateInfo globalPriorityAt(long index, @CType("VkQueueGlobalPriority") int value) { VkDeviceQueueGlobalPriorityCreateInfo.set_globalPriority(this.segment(), index, value); return this; } + /// Sets `globalPriority` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueGlobalPriorityCreateInfo globalPriority(@CType("VkQueueGlobalPriority") int value) { VkDeviceQueueGlobalPriorityCreateInfo.set_globalPriority(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceQueueInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceQueueInfo2.java new file mode 100644 index 00000000..eecec5e3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDeviceQueueInfo2.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### queueFamilyIndex +/// [VarHandle][#VH_queueFamilyIndex] - [Getter][#queueFamilyIndex()] - [Setter][#queueFamilyIndex(int)] +/// ### queueIndex +/// [VarHandle][#VH_queueIndex] - [Getter][#queueIndex()] - [Setter][#queueIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDeviceQueueInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceQueueCreateFlags flags; +/// uint32_t queueFamilyIndex; +/// uint32_t queueIndex; +/// } VkDeviceQueueInfo2; +/// ``` +public final class VkDeviceQueueInfo2 extends Struct { + /// The struct layout of `VkDeviceQueueInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("queueFamilyIndex"), + ValueLayout.JAVA_INT.withName("queueIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `queueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueFamilyIndex")); + /// The [VarHandle] of `queueIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueIndex")); + + /// Creates `VkDeviceQueueInfo2` with the given segment. + /// @param segment the memory segment + public VkDeviceQueueInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDeviceQueueInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueInfo2(segment); } + + /// Creates `VkDeviceQueueInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDeviceQueueInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDeviceQueueInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDeviceQueueInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDeviceQueueInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDeviceQueueInfo2` + public static VkDeviceQueueInfo2 alloc(SegmentAllocator allocator) { return new VkDeviceQueueInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDeviceQueueInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDeviceQueueInfo2` + public static VkDeviceQueueInfo2 alloc(SegmentAllocator allocator, long count) { return new VkDeviceQueueInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDeviceQueueInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDeviceQueueInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDeviceQueueInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDeviceQueueInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkDeviceQueueInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueInfo2 sType(@CType("VkStructureType") int value) { VkDeviceQueueInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDeviceQueueInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDeviceQueueInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDeviceQueueInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDeviceQueueInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceQueueCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkDeviceQueueCreateFlags") int get_flags(MemorySegment segment) { return VkDeviceQueueInfo2.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkDeviceQueueCreateFlags") int flagsAt(long index) { return VkDeviceQueueInfo2.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkDeviceQueueCreateFlags") int flags() { return VkDeviceQueueInfo2.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkDeviceQueueCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkDeviceQueueCreateFlags") int value) { VkDeviceQueueInfo2.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueInfo2 flagsAt(long index, @CType("VkDeviceQueueCreateFlags") int value) { VkDeviceQueueInfo2.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueInfo2 flags(@CType("VkDeviceQueueCreateFlags") int value) { VkDeviceQueueInfo2.set_flags(this.segment(), value); return this; } + + /// {@return `queueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueFamilyIndex(MemorySegment segment, long index) { return (int) VH_queueFamilyIndex.get(segment, 0L, index); } + /// {@return `queueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueFamilyIndex(MemorySegment segment) { return VkDeviceQueueInfo2.get_queueFamilyIndex(segment, 0L); } + /// {@return `queueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int queueFamilyIndexAt(long index) { return VkDeviceQueueInfo2.get_queueFamilyIndex(this.segment(), index); } + /// {@return `queueFamilyIndex`} + public @CType("uint32_t") int queueFamilyIndex() { return VkDeviceQueueInfo2.get_queueFamilyIndex(this.segment()); } + /// Sets `queueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `queueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceQueueInfo2.set_queueFamilyIndex(segment, 0L, value); } + /// Sets `queueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueInfo2 queueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkDeviceQueueInfo2.set_queueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `queueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueInfo2 queueFamilyIndex(@CType("uint32_t") int value) { VkDeviceQueueInfo2.set_queueFamilyIndex(this.segment(), value); return this; } + + /// {@return `queueIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueIndex(MemorySegment segment, long index) { return (int) VH_queueIndex.get(segment, 0L, index); } + /// {@return `queueIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueIndex(MemorySegment segment) { return VkDeviceQueueInfo2.get_queueIndex(segment, 0L); } + /// {@return `queueIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int queueIndexAt(long index) { return VkDeviceQueueInfo2.get_queueIndex(this.segment(), index); } + /// {@return `queueIndex`} + public @CType("uint32_t") int queueIndex() { return VkDeviceQueueInfo2.get_queueIndex(this.segment()); } + /// Sets `queueIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueIndex.set(segment, 0L, index, value); } + /// Sets `queueIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDeviceQueueInfo2.set_queueIndex(segment, 0L, value); } + /// Sets `queueIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDeviceQueueInfo2 queueIndexAt(long index, @CType("uint32_t") int value) { VkDeviceQueueInfo2.set_queueIndex(this.segment(), index, value); return this; } + /// Sets `queueIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDeviceQueueInfo2 queueIndex(@CType("uint32_t") int value) { VkDeviceQueueInfo2.set_queueIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDispatchIndirectCommand.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDispatchIndirectCommand.java new file mode 100644 index 00000000..0950f387 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDispatchIndirectCommand.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### x +/// [VarHandle][#VH_x] - [Getter][#x()] - [Setter][#x(int)] +/// ### y +/// [VarHandle][#VH_y] - [Getter][#y()] - [Setter][#y(int)] +/// ### z +/// [VarHandle][#VH_z] - [Getter][#z()] - [Setter][#z(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDispatchIndirectCommand { +/// uint32_t x; +/// uint32_t y; +/// uint32_t z; +/// } VkDispatchIndirectCommand; +/// ``` +public final class VkDispatchIndirectCommand extends Struct { + /// The struct layout of `VkDispatchIndirectCommand`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("x"), + ValueLayout.JAVA_INT.withName("y"), + ValueLayout.JAVA_INT.withName("z") + ); + /// The [VarHandle] of `x` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_x = LAYOUT.arrayElementVarHandle(PathElement.groupElement("x")); + /// The [VarHandle] of `y` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_y = LAYOUT.arrayElementVarHandle(PathElement.groupElement("y")); + /// The [VarHandle] of `z` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_z = LAYOUT.arrayElementVarHandle(PathElement.groupElement("z")); + + /// Creates `VkDispatchIndirectCommand` with the given segment. + /// @param segment the memory segment + public VkDispatchIndirectCommand(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDispatchIndirectCommand` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDispatchIndirectCommand of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDispatchIndirectCommand(segment); } + + /// Creates `VkDispatchIndirectCommand` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDispatchIndirectCommand ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDispatchIndirectCommand(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDispatchIndirectCommand` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDispatchIndirectCommand ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDispatchIndirectCommand(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDispatchIndirectCommand` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDispatchIndirectCommand` + public static VkDispatchIndirectCommand alloc(SegmentAllocator allocator) { return new VkDispatchIndirectCommand(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDispatchIndirectCommand` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDispatchIndirectCommand` + public static VkDispatchIndirectCommand alloc(SegmentAllocator allocator, long count) { return new VkDispatchIndirectCommand(allocator.allocate(LAYOUT, count)); } + + /// {@return `x` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_x(MemorySegment segment, long index) { return (int) VH_x.get(segment, 0L, index); } + /// {@return `x`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_x(MemorySegment segment) { return VkDispatchIndirectCommand.get_x(segment, 0L); } + /// {@return `x` at the given index} + /// @param index the index + public @CType("uint32_t") int xAt(long index) { return VkDispatchIndirectCommand.get_x(this.segment(), index); } + /// {@return `x`} + public @CType("uint32_t") int x() { return VkDispatchIndirectCommand.get_x(this.segment()); } + /// Sets `x` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_x(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_x.set(segment, 0L, index, value); } + /// Sets `x` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_x(MemorySegment segment, @CType("uint32_t") int value) { VkDispatchIndirectCommand.set_x(segment, 0L, value); } + /// Sets `x` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDispatchIndirectCommand xAt(long index, @CType("uint32_t") int value) { VkDispatchIndirectCommand.set_x(this.segment(), index, value); return this; } + /// Sets `x` with the given value. + /// @param value the value + /// @return `this` + public VkDispatchIndirectCommand x(@CType("uint32_t") int value) { VkDispatchIndirectCommand.set_x(this.segment(), value); return this; } + + /// {@return `y` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_y(MemorySegment segment, long index) { return (int) VH_y.get(segment, 0L, index); } + /// {@return `y`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_y(MemorySegment segment) { return VkDispatchIndirectCommand.get_y(segment, 0L); } + /// {@return `y` at the given index} + /// @param index the index + public @CType("uint32_t") int yAt(long index) { return VkDispatchIndirectCommand.get_y(this.segment(), index); } + /// {@return `y`} + public @CType("uint32_t") int y() { return VkDispatchIndirectCommand.get_y(this.segment()); } + /// Sets `y` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_y(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_y.set(segment, 0L, index, value); } + /// Sets `y` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_y(MemorySegment segment, @CType("uint32_t") int value) { VkDispatchIndirectCommand.set_y(segment, 0L, value); } + /// Sets `y` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDispatchIndirectCommand yAt(long index, @CType("uint32_t") int value) { VkDispatchIndirectCommand.set_y(this.segment(), index, value); return this; } + /// Sets `y` with the given value. + /// @param value the value + /// @return `this` + public VkDispatchIndirectCommand y(@CType("uint32_t") int value) { VkDispatchIndirectCommand.set_y(this.segment(), value); return this; } + + /// {@return `z` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_z(MemorySegment segment, long index) { return (int) VH_z.get(segment, 0L, index); } + /// {@return `z`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_z(MemorySegment segment) { return VkDispatchIndirectCommand.get_z(segment, 0L); } + /// {@return `z` at the given index} + /// @param index the index + public @CType("uint32_t") int zAt(long index) { return VkDispatchIndirectCommand.get_z(this.segment(), index); } + /// {@return `z`} + public @CType("uint32_t") int z() { return VkDispatchIndirectCommand.get_z(this.segment()); } + /// Sets `z` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_z(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_z.set(segment, 0L, index, value); } + /// Sets `z` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_z(MemorySegment segment, @CType("uint32_t") int value) { VkDispatchIndirectCommand.set_z(segment, 0L, value); } + /// Sets `z` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDispatchIndirectCommand zAt(long index, @CType("uint32_t") int value) { VkDispatchIndirectCommand.set_z(this.segment(), index, value); return this; } + /// Sets `z` with the given value. + /// @param value the value + /// @return `this` + public VkDispatchIndirectCommand z(@CType("uint32_t") int value) { VkDispatchIndirectCommand.set_z(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDrawIndexedIndirectCommand.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDrawIndexedIndirectCommand.java new file mode 100644 index 00000000..3a437e17 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDrawIndexedIndirectCommand.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### indexCount +/// [VarHandle][#VH_indexCount] - [Getter][#indexCount()] - [Setter][#indexCount(int)] +/// ### instanceCount +/// [VarHandle][#VH_instanceCount] - [Getter][#instanceCount()] - [Setter][#instanceCount(int)] +/// ### firstIndex +/// [VarHandle][#VH_firstIndex] - [Getter][#firstIndex()] - [Setter][#firstIndex(int)] +/// ### vertexOffset +/// [VarHandle][#VH_vertexOffset] - [Getter][#vertexOffset()] - [Setter][#vertexOffset(int)] +/// ### firstInstance +/// [VarHandle][#VH_firstInstance] - [Getter][#firstInstance()] - [Setter][#firstInstance(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDrawIndexedIndirectCommand { +/// uint32_t indexCount; +/// uint32_t instanceCount; +/// uint32_t firstIndex; +/// int32_t vertexOffset; +/// uint32_t firstInstance; +/// } VkDrawIndexedIndirectCommand; +/// ``` +public final class VkDrawIndexedIndirectCommand extends Struct { + /// The struct layout of `VkDrawIndexedIndirectCommand`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("indexCount"), + ValueLayout.JAVA_INT.withName("instanceCount"), + ValueLayout.JAVA_INT.withName("firstIndex"), + ValueLayout.JAVA_INT.withName("vertexOffset"), + ValueLayout.JAVA_INT.withName("firstInstance") + ); + /// The [VarHandle] of `indexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexCount")); + /// The [VarHandle] of `instanceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_instanceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("instanceCount")); + /// The [VarHandle] of `firstIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstIndex")); + /// The [VarHandle] of `vertexOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexOffset")); + /// The [VarHandle] of `firstInstance` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstInstance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstInstance")); + + /// Creates `VkDrawIndexedIndirectCommand` with the given segment. + /// @param segment the memory segment + public VkDrawIndexedIndirectCommand(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDrawIndexedIndirectCommand` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawIndexedIndirectCommand of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawIndexedIndirectCommand(segment); } + + /// Creates `VkDrawIndexedIndirectCommand` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawIndexedIndirectCommand ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawIndexedIndirectCommand(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDrawIndexedIndirectCommand` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawIndexedIndirectCommand ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawIndexedIndirectCommand(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDrawIndexedIndirectCommand` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDrawIndexedIndirectCommand` + public static VkDrawIndexedIndirectCommand alloc(SegmentAllocator allocator) { return new VkDrawIndexedIndirectCommand(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDrawIndexedIndirectCommand` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDrawIndexedIndirectCommand` + public static VkDrawIndexedIndirectCommand alloc(SegmentAllocator allocator, long count) { return new VkDrawIndexedIndirectCommand(allocator.allocate(LAYOUT, count)); } + + /// {@return `indexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_indexCount(MemorySegment segment, long index) { return (int) VH_indexCount.get(segment, 0L, index); } + /// {@return `indexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_indexCount(MemorySegment segment) { return VkDrawIndexedIndirectCommand.get_indexCount(segment, 0L); } + /// {@return `indexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int indexCountAt(long index) { return VkDrawIndexedIndirectCommand.get_indexCount(this.segment(), index); } + /// {@return `indexCount`} + public @CType("uint32_t") int indexCount() { return VkDrawIndexedIndirectCommand.get_indexCount(this.segment()); } + /// Sets `indexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_indexCount.set(segment, 0L, index, value); } + /// Sets `indexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexCount(MemorySegment segment, @CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_indexCount(segment, 0L, value); } + /// Sets `indexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndexedIndirectCommand indexCountAt(long index, @CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_indexCount(this.segment(), index, value); return this; } + /// Sets `indexCount` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndexedIndirectCommand indexCount(@CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_indexCount(this.segment(), value); return this; } + + /// {@return `instanceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_instanceCount(MemorySegment segment, long index) { return (int) VH_instanceCount.get(segment, 0L, index); } + /// {@return `instanceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_instanceCount(MemorySegment segment) { return VkDrawIndexedIndirectCommand.get_instanceCount(segment, 0L); } + /// {@return `instanceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int instanceCountAt(long index) { return VkDrawIndexedIndirectCommand.get_instanceCount(this.segment(), index); } + /// {@return `instanceCount`} + public @CType("uint32_t") int instanceCount() { return VkDrawIndexedIndirectCommand.get_instanceCount(this.segment()); } + /// Sets `instanceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_instanceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_instanceCount.set(segment, 0L, index, value); } + /// Sets `instanceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_instanceCount(MemorySegment segment, @CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_instanceCount(segment, 0L, value); } + /// Sets `instanceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndexedIndirectCommand instanceCountAt(long index, @CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_instanceCount(this.segment(), index, value); return this; } + /// Sets `instanceCount` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndexedIndirectCommand instanceCount(@CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_instanceCount(this.segment(), value); return this; } + + /// {@return `firstIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstIndex(MemorySegment segment, long index) { return (int) VH_firstIndex.get(segment, 0L, index); } + /// {@return `firstIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstIndex(MemorySegment segment) { return VkDrawIndexedIndirectCommand.get_firstIndex(segment, 0L); } + /// {@return `firstIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int firstIndexAt(long index) { return VkDrawIndexedIndirectCommand.get_firstIndex(this.segment(), index); } + /// {@return `firstIndex`} + public @CType("uint32_t") int firstIndex() { return VkDrawIndexedIndirectCommand.get_firstIndex(this.segment()); } + /// Sets `firstIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstIndex.set(segment, 0L, index, value); } + /// Sets `firstIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstIndex(MemorySegment segment, @CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_firstIndex(segment, 0L, value); } + /// Sets `firstIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndexedIndirectCommand firstIndexAt(long index, @CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_firstIndex(this.segment(), index, value); return this; } + /// Sets `firstIndex` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndexedIndirectCommand firstIndex(@CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_firstIndex(this.segment(), value); return this; } + + /// {@return `vertexOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_vertexOffset(MemorySegment segment, long index) { return (int) VH_vertexOffset.get(segment, 0L, index); } + /// {@return `vertexOffset`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_vertexOffset(MemorySegment segment) { return VkDrawIndexedIndirectCommand.get_vertexOffset(segment, 0L); } + /// {@return `vertexOffset` at the given index} + /// @param index the index + public @CType("int32_t") int vertexOffsetAt(long index) { return VkDrawIndexedIndirectCommand.get_vertexOffset(this.segment(), index); } + /// {@return `vertexOffset`} + public @CType("int32_t") int vertexOffset() { return VkDrawIndexedIndirectCommand.get_vertexOffset(this.segment()); } + /// Sets `vertexOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexOffset(MemorySegment segment, long index, @CType("int32_t") int value) { VH_vertexOffset.set(segment, 0L, index, value); } + /// Sets `vertexOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexOffset(MemorySegment segment, @CType("int32_t") int value) { VkDrawIndexedIndirectCommand.set_vertexOffset(segment, 0L, value); } + /// Sets `vertexOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndexedIndirectCommand vertexOffsetAt(long index, @CType("int32_t") int value) { VkDrawIndexedIndirectCommand.set_vertexOffset(this.segment(), index, value); return this; } + /// Sets `vertexOffset` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndexedIndirectCommand vertexOffset(@CType("int32_t") int value) { VkDrawIndexedIndirectCommand.set_vertexOffset(this.segment(), value); return this; } + + /// {@return `firstInstance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstInstance(MemorySegment segment, long index) { return (int) VH_firstInstance.get(segment, 0L, index); } + /// {@return `firstInstance`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstInstance(MemorySegment segment) { return VkDrawIndexedIndirectCommand.get_firstInstance(segment, 0L); } + /// {@return `firstInstance` at the given index} + /// @param index the index + public @CType("uint32_t") int firstInstanceAt(long index) { return VkDrawIndexedIndirectCommand.get_firstInstance(this.segment(), index); } + /// {@return `firstInstance`} + public @CType("uint32_t") int firstInstance() { return VkDrawIndexedIndirectCommand.get_firstInstance(this.segment()); } + /// Sets `firstInstance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstInstance(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstInstance.set(segment, 0L, index, value); } + /// Sets `firstInstance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstInstance(MemorySegment segment, @CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_firstInstance(segment, 0L, value); } + /// Sets `firstInstance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndexedIndirectCommand firstInstanceAt(long index, @CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_firstInstance(this.segment(), index, value); return this; } + /// Sets `firstInstance` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndexedIndirectCommand firstInstance(@CType("uint32_t") int value) { VkDrawIndexedIndirectCommand.set_firstInstance(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDrawIndirectCommand.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDrawIndirectCommand.java new file mode 100644 index 00000000..5e0c171a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkDrawIndirectCommand.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### vertexCount +/// [VarHandle][#VH_vertexCount] - [Getter][#vertexCount()] - [Setter][#vertexCount(int)] +/// ### instanceCount +/// [VarHandle][#VH_instanceCount] - [Getter][#instanceCount()] - [Setter][#instanceCount(int)] +/// ### firstVertex +/// [VarHandle][#VH_firstVertex] - [Getter][#firstVertex()] - [Setter][#firstVertex(int)] +/// ### firstInstance +/// [VarHandle][#VH_firstInstance] - [Getter][#firstInstance()] - [Setter][#firstInstance(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDrawIndirectCommand { +/// uint32_t vertexCount; +/// uint32_t instanceCount; +/// uint32_t firstVertex; +/// uint32_t firstInstance; +/// } VkDrawIndirectCommand; +/// ``` +public final class VkDrawIndirectCommand extends Struct { + /// The struct layout of `VkDrawIndirectCommand`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("vertexCount"), + ValueLayout.JAVA_INT.withName("instanceCount"), + ValueLayout.JAVA_INT.withName("firstVertex"), + ValueLayout.JAVA_INT.withName("firstInstance") + ); + /// The [VarHandle] of `vertexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexCount")); + /// The [VarHandle] of `instanceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_instanceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("instanceCount")); + /// The [VarHandle] of `firstVertex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstVertex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstVertex")); + /// The [VarHandle] of `firstInstance` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_firstInstance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("firstInstance")); + + /// Creates `VkDrawIndirectCommand` with the given segment. + /// @param segment the memory segment + public VkDrawIndirectCommand(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDrawIndirectCommand` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawIndirectCommand of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawIndirectCommand(segment); } + + /// Creates `VkDrawIndirectCommand` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawIndirectCommand ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawIndirectCommand(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDrawIndirectCommand` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDrawIndirectCommand ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDrawIndirectCommand(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDrawIndirectCommand` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDrawIndirectCommand` + public static VkDrawIndirectCommand alloc(SegmentAllocator allocator) { return new VkDrawIndirectCommand(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDrawIndirectCommand` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDrawIndirectCommand` + public static VkDrawIndirectCommand alloc(SegmentAllocator allocator, long count) { return new VkDrawIndirectCommand(allocator.allocate(LAYOUT, count)); } + + /// {@return `vertexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vertexCount(MemorySegment segment, long index) { return (int) VH_vertexCount.get(segment, 0L, index); } + /// {@return `vertexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vertexCount(MemorySegment segment) { return VkDrawIndirectCommand.get_vertexCount(segment, 0L); } + /// {@return `vertexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int vertexCountAt(long index) { return VkDrawIndirectCommand.get_vertexCount(this.segment(), index); } + /// {@return `vertexCount`} + public @CType("uint32_t") int vertexCount() { return VkDrawIndirectCommand.get_vertexCount(this.segment()); } + /// Sets `vertexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vertexCount.set(segment, 0L, index, value); } + /// Sets `vertexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexCount(MemorySegment segment, @CType("uint32_t") int value) { VkDrawIndirectCommand.set_vertexCount(segment, 0L, value); } + /// Sets `vertexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndirectCommand vertexCountAt(long index, @CType("uint32_t") int value) { VkDrawIndirectCommand.set_vertexCount(this.segment(), index, value); return this; } + /// Sets `vertexCount` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndirectCommand vertexCount(@CType("uint32_t") int value) { VkDrawIndirectCommand.set_vertexCount(this.segment(), value); return this; } + + /// {@return `instanceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_instanceCount(MemorySegment segment, long index) { return (int) VH_instanceCount.get(segment, 0L, index); } + /// {@return `instanceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_instanceCount(MemorySegment segment) { return VkDrawIndirectCommand.get_instanceCount(segment, 0L); } + /// {@return `instanceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int instanceCountAt(long index) { return VkDrawIndirectCommand.get_instanceCount(this.segment(), index); } + /// {@return `instanceCount`} + public @CType("uint32_t") int instanceCount() { return VkDrawIndirectCommand.get_instanceCount(this.segment()); } + /// Sets `instanceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_instanceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_instanceCount.set(segment, 0L, index, value); } + /// Sets `instanceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_instanceCount(MemorySegment segment, @CType("uint32_t") int value) { VkDrawIndirectCommand.set_instanceCount(segment, 0L, value); } + /// Sets `instanceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndirectCommand instanceCountAt(long index, @CType("uint32_t") int value) { VkDrawIndirectCommand.set_instanceCount(this.segment(), index, value); return this; } + /// Sets `instanceCount` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndirectCommand instanceCount(@CType("uint32_t") int value) { VkDrawIndirectCommand.set_instanceCount(this.segment(), value); return this; } + + /// {@return `firstVertex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstVertex(MemorySegment segment, long index) { return (int) VH_firstVertex.get(segment, 0L, index); } + /// {@return `firstVertex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstVertex(MemorySegment segment) { return VkDrawIndirectCommand.get_firstVertex(segment, 0L); } + /// {@return `firstVertex` at the given index} + /// @param index the index + public @CType("uint32_t") int firstVertexAt(long index) { return VkDrawIndirectCommand.get_firstVertex(this.segment(), index); } + /// {@return `firstVertex`} + public @CType("uint32_t") int firstVertex() { return VkDrawIndirectCommand.get_firstVertex(this.segment()); } + /// Sets `firstVertex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstVertex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstVertex.set(segment, 0L, index, value); } + /// Sets `firstVertex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstVertex(MemorySegment segment, @CType("uint32_t") int value) { VkDrawIndirectCommand.set_firstVertex(segment, 0L, value); } + /// Sets `firstVertex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndirectCommand firstVertexAt(long index, @CType("uint32_t") int value) { VkDrawIndirectCommand.set_firstVertex(this.segment(), index, value); return this; } + /// Sets `firstVertex` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndirectCommand firstVertex(@CType("uint32_t") int value) { VkDrawIndirectCommand.set_firstVertex(this.segment(), value); return this; } + + /// {@return `firstInstance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_firstInstance(MemorySegment segment, long index) { return (int) VH_firstInstance.get(segment, 0L, index); } + /// {@return `firstInstance`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_firstInstance(MemorySegment segment) { return VkDrawIndirectCommand.get_firstInstance(segment, 0L); } + /// {@return `firstInstance` at the given index} + /// @param index the index + public @CType("uint32_t") int firstInstanceAt(long index) { return VkDrawIndirectCommand.get_firstInstance(this.segment(), index); } + /// {@return `firstInstance`} + public @CType("uint32_t") int firstInstance() { return VkDrawIndirectCommand.get_firstInstance(this.segment()); } + /// Sets `firstInstance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_firstInstance(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_firstInstance.set(segment, 0L, index, value); } + /// Sets `firstInstance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_firstInstance(MemorySegment segment, @CType("uint32_t") int value) { VkDrawIndirectCommand.set_firstInstance(segment, 0L, value); } + /// Sets `firstInstance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDrawIndirectCommand firstInstanceAt(long index, @CType("uint32_t") int value) { VkDrawIndirectCommand.set_firstInstance(this.segment(), index, value); return this; } + /// Sets `firstInstance` with the given value. + /// @param value the value + /// @return `this` + public VkDrawIndirectCommand firstInstance(@CType("uint32_t") int value) { VkDrawIndirectCommand.set_firstInstance(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkEventCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkEventCreateInfo.java new file mode 100644 index 00000000..5ae1dc3e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkEventCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkEventCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkEventCreateFlags flags; +/// } VkEventCreateInfo; +/// ``` +public final class VkEventCreateInfo extends Struct { + /// The struct layout of `VkEventCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkEventCreateInfo` with the given segment. + /// @param segment the memory segment + public VkEventCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkEventCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkEventCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkEventCreateInfo(segment); } + + /// Creates `VkEventCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkEventCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkEventCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkEventCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkEventCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkEventCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkEventCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkEventCreateInfo` + public static VkEventCreateInfo alloc(SegmentAllocator allocator) { return new VkEventCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkEventCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkEventCreateInfo` + public static VkEventCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkEventCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkEventCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkEventCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkEventCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkEventCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkEventCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkEventCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkEventCreateInfo sType(@CType("VkStructureType") int value) { VkEventCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkEventCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkEventCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkEventCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkEventCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkEventCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkEventCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkEventCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkEventCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkEventCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkEventCreateFlags") int get_flags(MemorySegment segment) { return VkEventCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkEventCreateFlags") int flagsAt(long index) { return VkEventCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkEventCreateFlags") int flags() { return VkEventCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkEventCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkEventCreateFlags") int value) { VkEventCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkEventCreateInfo flagsAt(long index, @CType("VkEventCreateFlags") int value) { VkEventCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkEventCreateInfo flags(@CType("VkEventCreateFlags") int value) { VkEventCreateInfo.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExportFenceCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExportFenceCreateInfo.java new file mode 100644 index 00000000..3f8b3698 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExportFenceCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleTypes +/// [VarHandle][#VH_handleTypes] - [Getter][#handleTypes()] - [Setter][#handleTypes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportFenceCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalFenceHandleTypeFlags handleTypes; +/// } VkExportFenceCreateInfo; +/// ``` +public final class VkExportFenceCreateInfo extends Struct { + /// The struct layout of `VkExportFenceCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleTypes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleTypes")); + + /// Creates `VkExportFenceCreateInfo` with the given segment. + /// @param segment the memory segment + public VkExportFenceCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportFenceCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportFenceCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportFenceCreateInfo(segment); } + + /// Creates `VkExportFenceCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportFenceCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportFenceCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportFenceCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportFenceCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportFenceCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportFenceCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportFenceCreateInfo` + public static VkExportFenceCreateInfo alloc(SegmentAllocator allocator) { return new VkExportFenceCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportFenceCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportFenceCreateInfo` + public static VkExportFenceCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkExportFenceCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportFenceCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportFenceCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportFenceCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportFenceCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkExportFenceCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceCreateInfo sType(@CType("VkStructureType") int value) { VkExportFenceCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportFenceCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportFenceCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportFenceCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportFenceCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportFenceCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportFenceCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `handleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceHandleTypeFlags") int get_handleTypes(MemorySegment segment, long index) { return (int) VH_handleTypes.get(segment, 0L, index); } + /// {@return `handleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceHandleTypeFlags") int get_handleTypes(MemorySegment segment) { return VkExportFenceCreateInfo.get_handleTypes(segment, 0L); } + /// {@return `handleTypes` at the given index} + /// @param index the index + public @CType("VkExternalFenceHandleTypeFlags") int handleTypesAt(long index) { return VkExportFenceCreateInfo.get_handleTypes(this.segment(), index); } + /// {@return `handleTypes`} + public @CType("VkExternalFenceHandleTypeFlags") int handleTypes() { return VkExportFenceCreateInfo.get_handleTypes(this.segment()); } + /// Sets `handleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleTypes(MemorySegment segment, long index, @CType("VkExternalFenceHandleTypeFlags") int value) { VH_handleTypes.set(segment, 0L, index, value); } + /// Sets `handleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleTypes(MemorySegment segment, @CType("VkExternalFenceHandleTypeFlags") int value) { VkExportFenceCreateInfo.set_handleTypes(segment, 0L, value); } + /// Sets `handleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportFenceCreateInfo handleTypesAt(long index, @CType("VkExternalFenceHandleTypeFlags") int value) { VkExportFenceCreateInfo.set_handleTypes(this.segment(), index, value); return this; } + /// Sets `handleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExportFenceCreateInfo handleTypes(@CType("VkExternalFenceHandleTypeFlags") int value) { VkExportFenceCreateInfo.set_handleTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExportMemoryAllocateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExportMemoryAllocateInfo.java new file mode 100644 index 00000000..b539da89 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExportMemoryAllocateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleTypes +/// [VarHandle][#VH_handleTypes] - [Getter][#handleTypes()] - [Setter][#handleTypes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportMemoryAllocateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlags handleTypes; +/// } VkExportMemoryAllocateInfo; +/// ``` +public final class VkExportMemoryAllocateInfo extends Struct { + /// The struct layout of `VkExportMemoryAllocateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleTypes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleTypes")); + + /// Creates `VkExportMemoryAllocateInfo` with the given segment. + /// @param segment the memory segment + public VkExportMemoryAllocateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportMemoryAllocateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryAllocateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryAllocateInfo(segment); } + + /// Creates `VkExportMemoryAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryAllocateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportMemoryAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportMemoryAllocateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportMemoryAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportMemoryAllocateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportMemoryAllocateInfo` + public static VkExportMemoryAllocateInfo alloc(SegmentAllocator allocator) { return new VkExportMemoryAllocateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportMemoryAllocateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportMemoryAllocateInfo` + public static VkExportMemoryAllocateInfo alloc(SegmentAllocator allocator, long count) { return new VkExportMemoryAllocateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportMemoryAllocateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportMemoryAllocateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportMemoryAllocateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportMemoryAllocateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkExportMemoryAllocateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfo sType(@CType("VkStructureType") int value) { VkExportMemoryAllocateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportMemoryAllocateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportMemoryAllocateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportMemoryAllocateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryAllocateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryAllocateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportMemoryAllocateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `handleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlags") int get_handleTypes(MemorySegment segment, long index) { return (int) VH_handleTypes.get(segment, 0L, index); } + /// {@return `handleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlags") int get_handleTypes(MemorySegment segment) { return VkExportMemoryAllocateInfo.get_handleTypes(segment, 0L); } + /// {@return `handleTypes` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlags") int handleTypesAt(long index) { return VkExportMemoryAllocateInfo.get_handleTypes(this.segment(), index); } + /// {@return `handleTypes`} + public @CType("VkExternalMemoryHandleTypeFlags") int handleTypes() { return VkExportMemoryAllocateInfo.get_handleTypes(this.segment()); } + /// Sets `handleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleTypes(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlags") int value) { VH_handleTypes.set(segment, 0L, index, value); } + /// Sets `handleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleTypes(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlags") int value) { VkExportMemoryAllocateInfo.set_handleTypes(segment, 0L, value); } + /// Sets `handleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfo handleTypesAt(long index, @CType("VkExternalMemoryHandleTypeFlags") int value) { VkExportMemoryAllocateInfo.set_handleTypes(this.segment(), index, value); return this; } + /// Sets `handleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExportMemoryAllocateInfo handleTypes(@CType("VkExternalMemoryHandleTypeFlags") int value) { VkExportMemoryAllocateInfo.set_handleTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExportSemaphoreCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExportSemaphoreCreateInfo.java new file mode 100644 index 00000000..7689ec8a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExportSemaphoreCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleTypes +/// [VarHandle][#VH_handleTypes] - [Getter][#handleTypes()] - [Setter][#handleTypes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExportSemaphoreCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalSemaphoreHandleTypeFlags handleTypes; +/// } VkExportSemaphoreCreateInfo; +/// ``` +public final class VkExportSemaphoreCreateInfo extends Struct { + /// The struct layout of `VkExportSemaphoreCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleTypes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleTypes")); + + /// Creates `VkExportSemaphoreCreateInfo` with the given segment. + /// @param segment the memory segment + public VkExportSemaphoreCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExportSemaphoreCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportSemaphoreCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportSemaphoreCreateInfo(segment); } + + /// Creates `VkExportSemaphoreCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportSemaphoreCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExportSemaphoreCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExportSemaphoreCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExportSemaphoreCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExportSemaphoreCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExportSemaphoreCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExportSemaphoreCreateInfo` + public static VkExportSemaphoreCreateInfo alloc(SegmentAllocator allocator) { return new VkExportSemaphoreCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExportSemaphoreCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExportSemaphoreCreateInfo` + public static VkExportSemaphoreCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkExportSemaphoreCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExportSemaphoreCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExportSemaphoreCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExportSemaphoreCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExportSemaphoreCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkExportSemaphoreCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreCreateInfo sType(@CType("VkStructureType") int value) { VkExportSemaphoreCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExportSemaphoreCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExportSemaphoreCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExportSemaphoreCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExportSemaphoreCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `handleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlags") int get_handleTypes(MemorySegment segment, long index) { return (int) VH_handleTypes.get(segment, 0L, index); } + /// {@return `handleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlags") int get_handleTypes(MemorySegment segment) { return VkExportSemaphoreCreateInfo.get_handleTypes(segment, 0L); } + /// {@return `handleTypes` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlags") int handleTypesAt(long index) { return VkExportSemaphoreCreateInfo.get_handleTypes(this.segment(), index); } + /// {@return `handleTypes`} + public @CType("VkExternalSemaphoreHandleTypeFlags") int handleTypes() { return VkExportSemaphoreCreateInfo.get_handleTypes(this.segment()); } + /// Sets `handleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleTypes(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlags") int value) { VH_handleTypes.set(segment, 0L, index, value); } + /// Sets `handleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleTypes(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlags") int value) { VkExportSemaphoreCreateInfo.set_handleTypes(segment, 0L, value); } + /// Sets `handleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExportSemaphoreCreateInfo handleTypesAt(long index, @CType("VkExternalSemaphoreHandleTypeFlags") int value) { VkExportSemaphoreCreateInfo.set_handleTypes(this.segment(), index, value); return this; } + /// Sets `handleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExportSemaphoreCreateInfo handleTypes(@CType("VkExternalSemaphoreHandleTypeFlags") int value) { VkExportSemaphoreCreateInfo.set_handleTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExtensionProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExtensionProperties.java new file mode 100644 index 00000000..e4397be3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExtensionProperties.java @@ -0,0 +1,165 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### extensionName +/// [Byte offset handle][#MH_extensionName] - [Memory layout][#ML_extensionName] - [Getter][#extensionName(long)] - [Setter][#extensionName(long, java.lang.foreign.MemorySegment)] +/// ### specVersion +/// [VarHandle][#VH_specVersion] - [Getter][#specVersion()] - [Setter][#specVersion(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExtensionProperties { +/// char[VK_MAX_EXTENSION_NAME_SIZE] extensionName; +/// uint32_t specVersion; +/// } VkExtensionProperties; +/// ``` +public final class VkExtensionProperties extends Struct { + /// The struct layout of `VkExtensionProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + MemoryLayout.sequenceLayout(VK_MAX_EXTENSION_NAME_SIZE, ValueLayout.JAVA_BYTE).withName("extensionName"), + ValueLayout.JAVA_INT.withName("specVersion") + ); + /// The byte offset handle of `extensionName` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_extensionName = LAYOUT.byteOffsetHandle(PathElement.groupElement("extensionName"), PathElement.sequenceElement()); + /// The memory layout of `extensionName`. + public static final MemoryLayout ML_extensionName = LAYOUT.select(PathElement.groupElement("extensionName")); + /// The [VarHandle] of `specVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_specVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("specVersion")); + + /// Creates `VkExtensionProperties` with the given segment. + /// @param segment the memory segment + public VkExtensionProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExtensionProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExtensionProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExtensionProperties(segment); } + + /// Creates `VkExtensionProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExtensionProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExtensionProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExtensionProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExtensionProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExtensionProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExtensionProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExtensionProperties` + public static VkExtensionProperties alloc(SegmentAllocator allocator) { return new VkExtensionProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExtensionProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExtensionProperties` + public static VkExtensionProperties alloc(SegmentAllocator allocator, long count) { return new VkExtensionProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `extensionName` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment get_extensionName(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_extensionName.invokeExact(0L, elementIndex), index), ML_extensionName); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `extensionName`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment get_extensionName(MemorySegment segment, long elementIndex) { return VkExtensionProperties.get_extensionName(segment, 0L, elementIndex); } + /// {@return `extensionName` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment extensionNameAt(long index, long elementIndex) { return VkExtensionProperties.get_extensionName(this.segment(), index, elementIndex); } + /// {@return `extensionName`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment extensionName(long elementIndex) { return VkExtensionProperties.get_extensionName(this.segment(), elementIndex); } + /// Sets `extensionName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_extensionName(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_extensionName.invokeExact(0L, elementIndex), index), ML_extensionName.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `extensionName` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_extensionName(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkExtensionProperties.set_extensionName(segment, 0L, elementIndex, value); } + /// Sets `extensionName` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkExtensionProperties extensionNameAt(long index, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkExtensionProperties.set_extensionName(this.segment(), index, elementIndex, value); return this; } + /// Sets `extensionName` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkExtensionProperties extensionName(long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkExtensionProperties.set_extensionName(this.segment(), elementIndex, value); return this; } + + /// {@return `specVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_specVersion(MemorySegment segment, long index) { return (int) VH_specVersion.get(segment, 0L, index); } + /// {@return `specVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_specVersion(MemorySegment segment) { return VkExtensionProperties.get_specVersion(segment, 0L); } + /// {@return `specVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int specVersionAt(long index) { return VkExtensionProperties.get_specVersion(this.segment(), index); } + /// {@return `specVersion`} + public @CType("uint32_t") int specVersion() { return VkExtensionProperties.get_specVersion(this.segment()); } + /// Sets `specVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_specVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_specVersion.set(segment, 0L, index, value); } + /// Sets `specVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_specVersion(MemorySegment segment, @CType("uint32_t") int value) { VkExtensionProperties.set_specVersion(segment, 0L, value); } + /// Sets `specVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExtensionProperties specVersionAt(long index, @CType("uint32_t") int value) { VkExtensionProperties.set_specVersion(this.segment(), index, value); return this; } + /// Sets `specVersion` with the given value. + /// @param value the value + /// @return `this` + public VkExtensionProperties specVersion(@CType("uint32_t") int value) { VkExtensionProperties.set_specVersion(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExtent2D.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExtent2D.java new file mode 100644 index 00000000..e76b9c7b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExtent2D.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### width +/// [VarHandle][#VH_width] - [Getter][#width()] - [Setter][#width(int)] +/// ### height +/// [VarHandle][#VH_height] - [Getter][#height()] - [Setter][#height(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExtent2D { +/// uint32_t width; +/// uint32_t height; +/// } VkExtent2D; +/// ``` +public final class VkExtent2D extends Struct { + /// The struct layout of `VkExtent2D`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("width"), + ValueLayout.JAVA_INT.withName("height") + ); + /// The [VarHandle] of `width` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_width = LAYOUT.arrayElementVarHandle(PathElement.groupElement("width")); + /// The [VarHandle] of `height` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_height = LAYOUT.arrayElementVarHandle(PathElement.groupElement("height")); + + /// Creates `VkExtent2D` with the given segment. + /// @param segment the memory segment + public VkExtent2D(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExtent2D` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExtent2D of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExtent2D(segment); } + + /// Creates `VkExtent2D` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExtent2D ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExtent2D(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExtent2D` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExtent2D ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExtent2D(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExtent2D` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExtent2D` + public static VkExtent2D alloc(SegmentAllocator allocator) { return new VkExtent2D(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExtent2D` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExtent2D` + public static VkExtent2D alloc(SegmentAllocator allocator, long count) { return new VkExtent2D(allocator.allocate(LAYOUT, count)); } + + /// {@return `width` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_width(MemorySegment segment, long index) { return (int) VH_width.get(segment, 0L, index); } + /// {@return `width`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_width(MemorySegment segment) { return VkExtent2D.get_width(segment, 0L); } + /// {@return `width` at the given index} + /// @param index the index + public @CType("uint32_t") int widthAt(long index) { return VkExtent2D.get_width(this.segment(), index); } + /// {@return `width`} + public @CType("uint32_t") int width() { return VkExtent2D.get_width(this.segment()); } + /// Sets `width` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_width(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_width.set(segment, 0L, index, value); } + /// Sets `width` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_width(MemorySegment segment, @CType("uint32_t") int value) { VkExtent2D.set_width(segment, 0L, value); } + /// Sets `width` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExtent2D widthAt(long index, @CType("uint32_t") int value) { VkExtent2D.set_width(this.segment(), index, value); return this; } + /// Sets `width` with the given value. + /// @param value the value + /// @return `this` + public VkExtent2D width(@CType("uint32_t") int value) { VkExtent2D.set_width(this.segment(), value); return this; } + + /// {@return `height` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_height(MemorySegment segment, long index) { return (int) VH_height.get(segment, 0L, index); } + /// {@return `height`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_height(MemorySegment segment) { return VkExtent2D.get_height(segment, 0L); } + /// {@return `height` at the given index} + /// @param index the index + public @CType("uint32_t") int heightAt(long index) { return VkExtent2D.get_height(this.segment(), index); } + /// {@return `height`} + public @CType("uint32_t") int height() { return VkExtent2D.get_height(this.segment()); } + /// Sets `height` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_height(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_height.set(segment, 0L, index, value); } + /// Sets `height` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_height(MemorySegment segment, @CType("uint32_t") int value) { VkExtent2D.set_height(segment, 0L, value); } + /// Sets `height` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExtent2D heightAt(long index, @CType("uint32_t") int value) { VkExtent2D.set_height(this.segment(), index, value); return this; } + /// Sets `height` with the given value. + /// @param value the value + /// @return `this` + public VkExtent2D height(@CType("uint32_t") int value) { VkExtent2D.set_height(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExtent3D.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExtent3D.java new file mode 100644 index 00000000..4b466f56 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExtent3D.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### width +/// [VarHandle][#VH_width] - [Getter][#width()] - [Setter][#width(int)] +/// ### height +/// [VarHandle][#VH_height] - [Getter][#height()] - [Setter][#height(int)] +/// ### depth +/// [VarHandle][#VH_depth] - [Getter][#depth()] - [Setter][#depth(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExtent3D { +/// uint32_t width; +/// uint32_t height; +/// uint32_t depth; +/// } VkExtent3D; +/// ``` +public final class VkExtent3D extends Struct { + /// The struct layout of `VkExtent3D`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("width"), + ValueLayout.JAVA_INT.withName("height"), + ValueLayout.JAVA_INT.withName("depth") + ); + /// The [VarHandle] of `width` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_width = LAYOUT.arrayElementVarHandle(PathElement.groupElement("width")); + /// The [VarHandle] of `height` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_height = LAYOUT.arrayElementVarHandle(PathElement.groupElement("height")); + /// The [VarHandle] of `depth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depth")); + + /// Creates `VkExtent3D` with the given segment. + /// @param segment the memory segment + public VkExtent3D(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExtent3D` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExtent3D of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExtent3D(segment); } + + /// Creates `VkExtent3D` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExtent3D ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExtent3D(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExtent3D` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExtent3D ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExtent3D(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExtent3D` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExtent3D` + public static VkExtent3D alloc(SegmentAllocator allocator) { return new VkExtent3D(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExtent3D` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExtent3D` + public static VkExtent3D alloc(SegmentAllocator allocator, long count) { return new VkExtent3D(allocator.allocate(LAYOUT, count)); } + + /// {@return `width` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_width(MemorySegment segment, long index) { return (int) VH_width.get(segment, 0L, index); } + /// {@return `width`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_width(MemorySegment segment) { return VkExtent3D.get_width(segment, 0L); } + /// {@return `width` at the given index} + /// @param index the index + public @CType("uint32_t") int widthAt(long index) { return VkExtent3D.get_width(this.segment(), index); } + /// {@return `width`} + public @CType("uint32_t") int width() { return VkExtent3D.get_width(this.segment()); } + /// Sets `width` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_width(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_width.set(segment, 0L, index, value); } + /// Sets `width` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_width(MemorySegment segment, @CType("uint32_t") int value) { VkExtent3D.set_width(segment, 0L, value); } + /// Sets `width` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExtent3D widthAt(long index, @CType("uint32_t") int value) { VkExtent3D.set_width(this.segment(), index, value); return this; } + /// Sets `width` with the given value. + /// @param value the value + /// @return `this` + public VkExtent3D width(@CType("uint32_t") int value) { VkExtent3D.set_width(this.segment(), value); return this; } + + /// {@return `height` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_height(MemorySegment segment, long index) { return (int) VH_height.get(segment, 0L, index); } + /// {@return `height`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_height(MemorySegment segment) { return VkExtent3D.get_height(segment, 0L); } + /// {@return `height` at the given index} + /// @param index the index + public @CType("uint32_t") int heightAt(long index) { return VkExtent3D.get_height(this.segment(), index); } + /// {@return `height`} + public @CType("uint32_t") int height() { return VkExtent3D.get_height(this.segment()); } + /// Sets `height` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_height(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_height.set(segment, 0L, index, value); } + /// Sets `height` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_height(MemorySegment segment, @CType("uint32_t") int value) { VkExtent3D.set_height(segment, 0L, value); } + /// Sets `height` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExtent3D heightAt(long index, @CType("uint32_t") int value) { VkExtent3D.set_height(this.segment(), index, value); return this; } + /// Sets `height` with the given value. + /// @param value the value + /// @return `this` + public VkExtent3D height(@CType("uint32_t") int value) { VkExtent3D.set_height(this.segment(), value); return this; } + + /// {@return `depth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_depth(MemorySegment segment, long index) { return (int) VH_depth.get(segment, 0L, index); } + /// {@return `depth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_depth(MemorySegment segment) { return VkExtent3D.get_depth(segment, 0L); } + /// {@return `depth` at the given index} + /// @param index the index + public @CType("uint32_t") int depthAt(long index) { return VkExtent3D.get_depth(this.segment(), index); } + /// {@return `depth`} + public @CType("uint32_t") int depth() { return VkExtent3D.get_depth(this.segment()); } + /// Sets `depth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_depth.set(segment, 0L, index, value); } + /// Sets `depth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depth(MemorySegment segment, @CType("uint32_t") int value) { VkExtent3D.set_depth(segment, 0L, value); } + /// Sets `depth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExtent3D depthAt(long index, @CType("uint32_t") int value) { VkExtent3D.set_depth(this.segment(), index, value); return this; } + /// Sets `depth` with the given value. + /// @param value the value + /// @return `this` + public VkExtent3D depth(@CType("uint32_t") int value) { VkExtent3D.set_depth(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalBufferProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalBufferProperties.java new file mode 100644 index 00000000..ba1fa815 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalBufferProperties.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### externalMemoryProperties +/// [Byte offset][#OFFSET_externalMemoryProperties] - [Memory layout][#ML_externalMemoryProperties] - [Getter][#externalMemoryProperties()] - [Setter][#externalMemoryProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalBufferProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkExternalMemoryProperties externalMemoryProperties; +/// } VkExternalBufferProperties; +/// ``` +public final class VkExternalBufferProperties extends Struct { + /// The struct layout of `VkExternalBufferProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExternalMemoryProperties.LAYOUT.withName("externalMemoryProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `externalMemoryProperties`. + public static final long OFFSET_externalMemoryProperties = LAYOUT.byteOffset(PathElement.groupElement("externalMemoryProperties")); + /// The memory layout of `externalMemoryProperties`. + public static final MemoryLayout ML_externalMemoryProperties = LAYOUT.select(PathElement.groupElement("externalMemoryProperties")); + + /// Creates `VkExternalBufferProperties` with the given segment. + /// @param segment the memory segment + public VkExternalBufferProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalBufferProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalBufferProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalBufferProperties(segment); } + + /// Creates `VkExternalBufferProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalBufferProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalBufferProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalBufferProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalBufferProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalBufferProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalBufferProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalBufferProperties` + public static VkExternalBufferProperties alloc(SegmentAllocator allocator) { return new VkExternalBufferProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalBufferProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalBufferProperties` + public static VkExternalBufferProperties alloc(SegmentAllocator allocator, long count) { return new VkExternalBufferProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExternalBufferProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExternalBufferProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExternalBufferProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExternalBufferProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalBufferProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkExternalBufferProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExternalBufferProperties sType(@CType("VkStructureType") int value) { VkExternalBufferProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExternalBufferProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExternalBufferProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkExternalBufferProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalBufferProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalBufferProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalBufferProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExternalBufferProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkExternalBufferProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `externalMemoryProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment get_externalMemoryProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_externalMemoryProperties, index), ML_externalMemoryProperties); } + /// {@return `externalMemoryProperties`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment get_externalMemoryProperties(MemorySegment segment) { return VkExternalBufferProperties.get_externalMemoryProperties(segment, 0L); } + /// {@return `externalMemoryProperties` at the given index} + /// @param index the index + public @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment externalMemoryPropertiesAt(long index) { return VkExternalBufferProperties.get_externalMemoryProperties(this.segment(), index); } + /// {@return `externalMemoryProperties`} + public @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment externalMemoryProperties() { return VkExternalBufferProperties.get_externalMemoryProperties(this.segment()); } + /// Sets `externalMemoryProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalMemoryProperties(MemorySegment segment, long index, @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_externalMemoryProperties, index), ML_externalMemoryProperties.byteSize()); } + /// Sets `externalMemoryProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalMemoryProperties(MemorySegment segment, @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment value) { VkExternalBufferProperties.set_externalMemoryProperties(segment, 0L, value); } + /// Sets `externalMemoryProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalBufferProperties externalMemoryPropertiesAt(long index, @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment value) { VkExternalBufferProperties.set_externalMemoryProperties(this.segment(), index, value); return this; } + /// Sets `externalMemoryProperties` with the given value. + /// @param value the value + /// @return `this` + public VkExternalBufferProperties externalMemoryProperties(@CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment value) { VkExternalBufferProperties.set_externalMemoryProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalFenceProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalFenceProperties.java new file mode 100644 index 00000000..1776d3aa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalFenceProperties.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### exportFromImportedHandleTypes +/// [VarHandle][#VH_exportFromImportedHandleTypes] - [Getter][#exportFromImportedHandleTypes()] - [Setter][#exportFromImportedHandleTypes(int)] +/// ### compatibleHandleTypes +/// [VarHandle][#VH_compatibleHandleTypes] - [Getter][#compatibleHandleTypes()] - [Setter][#compatibleHandleTypes(int)] +/// ### externalFenceFeatures +/// [VarHandle][#VH_externalFenceFeatures] - [Getter][#externalFenceFeatures()] - [Setter][#externalFenceFeatures(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalFenceProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes; +/// VkExternalFenceHandleTypeFlags compatibleHandleTypes; +/// VkExternalFenceFeatureFlags externalFenceFeatures; +/// } VkExternalFenceProperties; +/// ``` +public final class VkExternalFenceProperties extends Struct { + /// The struct layout of `VkExternalFenceProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("exportFromImportedHandleTypes"), + ValueLayout.JAVA_INT.withName("compatibleHandleTypes"), + ValueLayout.JAVA_INT.withName("externalFenceFeatures") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `exportFromImportedHandleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_exportFromImportedHandleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("exportFromImportedHandleTypes")); + /// The [VarHandle] of `compatibleHandleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compatibleHandleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compatibleHandleTypes")); + /// The [VarHandle] of `externalFenceFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_externalFenceFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalFenceFeatures")); + + /// Creates `VkExternalFenceProperties` with the given segment. + /// @param segment the memory segment + public VkExternalFenceProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalFenceProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalFenceProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalFenceProperties(segment); } + + /// Creates `VkExternalFenceProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalFenceProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalFenceProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalFenceProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalFenceProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalFenceProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalFenceProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalFenceProperties` + public static VkExternalFenceProperties alloc(SegmentAllocator allocator) { return new VkExternalFenceProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalFenceProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalFenceProperties` + public static VkExternalFenceProperties alloc(SegmentAllocator allocator, long count) { return new VkExternalFenceProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExternalFenceProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExternalFenceProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExternalFenceProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExternalFenceProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFenceProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkExternalFenceProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFenceProperties sType(@CType("VkStructureType") int value) { VkExternalFenceProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExternalFenceProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExternalFenceProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkExternalFenceProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalFenceProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFenceProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalFenceProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFenceProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkExternalFenceProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `exportFromImportedHandleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceHandleTypeFlags") int get_exportFromImportedHandleTypes(MemorySegment segment, long index) { return (int) VH_exportFromImportedHandleTypes.get(segment, 0L, index); } + /// {@return `exportFromImportedHandleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceHandleTypeFlags") int get_exportFromImportedHandleTypes(MemorySegment segment) { return VkExternalFenceProperties.get_exportFromImportedHandleTypes(segment, 0L); } + /// {@return `exportFromImportedHandleTypes` at the given index} + /// @param index the index + public @CType("VkExternalFenceHandleTypeFlags") int exportFromImportedHandleTypesAt(long index) { return VkExternalFenceProperties.get_exportFromImportedHandleTypes(this.segment(), index); } + /// {@return `exportFromImportedHandleTypes`} + public @CType("VkExternalFenceHandleTypeFlags") int exportFromImportedHandleTypes() { return VkExternalFenceProperties.get_exportFromImportedHandleTypes(this.segment()); } + /// Sets `exportFromImportedHandleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_exportFromImportedHandleTypes(MemorySegment segment, long index, @CType("VkExternalFenceHandleTypeFlags") int value) { VH_exportFromImportedHandleTypes.set(segment, 0L, index, value); } + /// Sets `exportFromImportedHandleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_exportFromImportedHandleTypes(MemorySegment segment, @CType("VkExternalFenceHandleTypeFlags") int value) { VkExternalFenceProperties.set_exportFromImportedHandleTypes(segment, 0L, value); } + /// Sets `exportFromImportedHandleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFenceProperties exportFromImportedHandleTypesAt(long index, @CType("VkExternalFenceHandleTypeFlags") int value) { VkExternalFenceProperties.set_exportFromImportedHandleTypes(this.segment(), index, value); return this; } + /// Sets `exportFromImportedHandleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFenceProperties exportFromImportedHandleTypes(@CType("VkExternalFenceHandleTypeFlags") int value) { VkExternalFenceProperties.set_exportFromImportedHandleTypes(this.segment(), value); return this; } + + /// {@return `compatibleHandleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceHandleTypeFlags") int get_compatibleHandleTypes(MemorySegment segment, long index) { return (int) VH_compatibleHandleTypes.get(segment, 0L, index); } + /// {@return `compatibleHandleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceHandleTypeFlags") int get_compatibleHandleTypes(MemorySegment segment) { return VkExternalFenceProperties.get_compatibleHandleTypes(segment, 0L); } + /// {@return `compatibleHandleTypes` at the given index} + /// @param index the index + public @CType("VkExternalFenceHandleTypeFlags") int compatibleHandleTypesAt(long index) { return VkExternalFenceProperties.get_compatibleHandleTypes(this.segment(), index); } + /// {@return `compatibleHandleTypes`} + public @CType("VkExternalFenceHandleTypeFlags") int compatibleHandleTypes() { return VkExternalFenceProperties.get_compatibleHandleTypes(this.segment()); } + /// Sets `compatibleHandleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compatibleHandleTypes(MemorySegment segment, long index, @CType("VkExternalFenceHandleTypeFlags") int value) { VH_compatibleHandleTypes.set(segment, 0L, index, value); } + /// Sets `compatibleHandleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compatibleHandleTypes(MemorySegment segment, @CType("VkExternalFenceHandleTypeFlags") int value) { VkExternalFenceProperties.set_compatibleHandleTypes(segment, 0L, value); } + /// Sets `compatibleHandleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFenceProperties compatibleHandleTypesAt(long index, @CType("VkExternalFenceHandleTypeFlags") int value) { VkExternalFenceProperties.set_compatibleHandleTypes(this.segment(), index, value); return this; } + /// Sets `compatibleHandleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFenceProperties compatibleHandleTypes(@CType("VkExternalFenceHandleTypeFlags") int value) { VkExternalFenceProperties.set_compatibleHandleTypes(this.segment(), value); return this; } + + /// {@return `externalFenceFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceFeatureFlags") int get_externalFenceFeatures(MemorySegment segment, long index) { return (int) VH_externalFenceFeatures.get(segment, 0L, index); } + /// {@return `externalFenceFeatures`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceFeatureFlags") int get_externalFenceFeatures(MemorySegment segment) { return VkExternalFenceProperties.get_externalFenceFeatures(segment, 0L); } + /// {@return `externalFenceFeatures` at the given index} + /// @param index the index + public @CType("VkExternalFenceFeatureFlags") int externalFenceFeaturesAt(long index) { return VkExternalFenceProperties.get_externalFenceFeatures(this.segment(), index); } + /// {@return `externalFenceFeatures`} + public @CType("VkExternalFenceFeatureFlags") int externalFenceFeatures() { return VkExternalFenceProperties.get_externalFenceFeatures(this.segment()); } + /// Sets `externalFenceFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalFenceFeatures(MemorySegment segment, long index, @CType("VkExternalFenceFeatureFlags") int value) { VH_externalFenceFeatures.set(segment, 0L, index, value); } + /// Sets `externalFenceFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalFenceFeatures(MemorySegment segment, @CType("VkExternalFenceFeatureFlags") int value) { VkExternalFenceProperties.set_externalFenceFeatures(segment, 0L, value); } + /// Sets `externalFenceFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalFenceProperties externalFenceFeaturesAt(long index, @CType("VkExternalFenceFeatureFlags") int value) { VkExternalFenceProperties.set_externalFenceFeatures(this.segment(), index, value); return this; } + /// Sets `externalFenceFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkExternalFenceProperties externalFenceFeatures(@CType("VkExternalFenceFeatureFlags") int value) { VkExternalFenceProperties.set_externalFenceFeatures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalImageFormatProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalImageFormatProperties.java new file mode 100644 index 00000000..f8e97bc4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalImageFormatProperties.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### externalMemoryProperties +/// [Byte offset][#OFFSET_externalMemoryProperties] - [Memory layout][#ML_externalMemoryProperties] - [Getter][#externalMemoryProperties()] - [Setter][#externalMemoryProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalImageFormatProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkExternalMemoryProperties externalMemoryProperties; +/// } VkExternalImageFormatProperties; +/// ``` +public final class VkExternalImageFormatProperties extends Struct { + /// The struct layout of `VkExternalImageFormatProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkExternalMemoryProperties.LAYOUT.withName("externalMemoryProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `externalMemoryProperties`. + public static final long OFFSET_externalMemoryProperties = LAYOUT.byteOffset(PathElement.groupElement("externalMemoryProperties")); + /// The memory layout of `externalMemoryProperties`. + public static final MemoryLayout ML_externalMemoryProperties = LAYOUT.select(PathElement.groupElement("externalMemoryProperties")); + + /// Creates `VkExternalImageFormatProperties` with the given segment. + /// @param segment the memory segment + public VkExternalImageFormatProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalImageFormatProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalImageFormatProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalImageFormatProperties(segment); } + + /// Creates `VkExternalImageFormatProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalImageFormatProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalImageFormatProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalImageFormatProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalImageFormatProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalImageFormatProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalImageFormatProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalImageFormatProperties` + public static VkExternalImageFormatProperties alloc(SegmentAllocator allocator) { return new VkExternalImageFormatProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalImageFormatProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalImageFormatProperties` + public static VkExternalImageFormatProperties alloc(SegmentAllocator allocator, long count) { return new VkExternalImageFormatProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExternalImageFormatProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExternalImageFormatProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExternalImageFormatProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExternalImageFormatProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalImageFormatProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkExternalImageFormatProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExternalImageFormatProperties sType(@CType("VkStructureType") int value) { VkExternalImageFormatProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExternalImageFormatProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExternalImageFormatProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkExternalImageFormatProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalImageFormatProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalImageFormatProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalImageFormatProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExternalImageFormatProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkExternalImageFormatProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `externalMemoryProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment get_externalMemoryProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_externalMemoryProperties, index), ML_externalMemoryProperties); } + /// {@return `externalMemoryProperties`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment get_externalMemoryProperties(MemorySegment segment) { return VkExternalImageFormatProperties.get_externalMemoryProperties(segment, 0L); } + /// {@return `externalMemoryProperties` at the given index} + /// @param index the index + public @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment externalMemoryPropertiesAt(long index) { return VkExternalImageFormatProperties.get_externalMemoryProperties(this.segment(), index); } + /// {@return `externalMemoryProperties`} + public @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment externalMemoryProperties() { return VkExternalImageFormatProperties.get_externalMemoryProperties(this.segment()); } + /// Sets `externalMemoryProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalMemoryProperties(MemorySegment segment, long index, @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_externalMemoryProperties, index), ML_externalMemoryProperties.byteSize()); } + /// Sets `externalMemoryProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalMemoryProperties(MemorySegment segment, @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment value) { VkExternalImageFormatProperties.set_externalMemoryProperties(segment, 0L, value); } + /// Sets `externalMemoryProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalImageFormatProperties externalMemoryPropertiesAt(long index, @CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment value) { VkExternalImageFormatProperties.set_externalMemoryProperties(this.segment(), index, value); return this; } + /// Sets `externalMemoryProperties` with the given value. + /// @param value the value + /// @return `this` + public VkExternalImageFormatProperties externalMemoryProperties(@CType("VkExternalMemoryProperties") java.lang.foreign.MemorySegment value) { VkExternalImageFormatProperties.set_externalMemoryProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalMemoryBufferCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalMemoryBufferCreateInfo.java new file mode 100644 index 00000000..1c5bde17 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalMemoryBufferCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleTypes +/// [VarHandle][#VH_handleTypes] - [Getter][#handleTypes()] - [Setter][#handleTypes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalMemoryBufferCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlags handleTypes; +/// } VkExternalMemoryBufferCreateInfo; +/// ``` +public final class VkExternalMemoryBufferCreateInfo extends Struct { + /// The struct layout of `VkExternalMemoryBufferCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleTypes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleTypes")); + + /// Creates `VkExternalMemoryBufferCreateInfo` with the given segment. + /// @param segment the memory segment + public VkExternalMemoryBufferCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalMemoryBufferCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryBufferCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryBufferCreateInfo(segment); } + + /// Creates `VkExternalMemoryBufferCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryBufferCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryBufferCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalMemoryBufferCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryBufferCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryBufferCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalMemoryBufferCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalMemoryBufferCreateInfo` + public static VkExternalMemoryBufferCreateInfo alloc(SegmentAllocator allocator) { return new VkExternalMemoryBufferCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalMemoryBufferCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalMemoryBufferCreateInfo` + public static VkExternalMemoryBufferCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkExternalMemoryBufferCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExternalMemoryBufferCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExternalMemoryBufferCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExternalMemoryBufferCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExternalMemoryBufferCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryBufferCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkExternalMemoryBufferCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryBufferCreateInfo sType(@CType("VkStructureType") int value) { VkExternalMemoryBufferCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExternalMemoryBufferCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExternalMemoryBufferCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExternalMemoryBufferCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryBufferCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryBufferCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryBufferCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryBufferCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryBufferCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `handleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlags") int get_handleTypes(MemorySegment segment, long index) { return (int) VH_handleTypes.get(segment, 0L, index); } + /// {@return `handleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlags") int get_handleTypes(MemorySegment segment) { return VkExternalMemoryBufferCreateInfo.get_handleTypes(segment, 0L); } + /// {@return `handleTypes` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlags") int handleTypesAt(long index) { return VkExternalMemoryBufferCreateInfo.get_handleTypes(this.segment(), index); } + /// {@return `handleTypes`} + public @CType("VkExternalMemoryHandleTypeFlags") int handleTypes() { return VkExternalMemoryBufferCreateInfo.get_handleTypes(this.segment()); } + /// Sets `handleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleTypes(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlags") int value) { VH_handleTypes.set(segment, 0L, index, value); } + /// Sets `handleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleTypes(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryBufferCreateInfo.set_handleTypes(segment, 0L, value); } + /// Sets `handleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryBufferCreateInfo handleTypesAt(long index, @CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryBufferCreateInfo.set_handleTypes(this.segment(), index, value); return this; } + /// Sets `handleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryBufferCreateInfo handleTypes(@CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryBufferCreateInfo.set_handleTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalMemoryImageCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalMemoryImageCreateInfo.java new file mode 100644 index 00000000..63d54e2b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalMemoryImageCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleTypes +/// [VarHandle][#VH_handleTypes] - [Getter][#handleTypes()] - [Setter][#handleTypes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalMemoryImageCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlags handleTypes; +/// } VkExternalMemoryImageCreateInfo; +/// ``` +public final class VkExternalMemoryImageCreateInfo extends Struct { + /// The struct layout of `VkExternalMemoryImageCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleTypes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleTypes")); + + /// Creates `VkExternalMemoryImageCreateInfo` with the given segment. + /// @param segment the memory segment + public VkExternalMemoryImageCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalMemoryImageCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryImageCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryImageCreateInfo(segment); } + + /// Creates `VkExternalMemoryImageCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryImageCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryImageCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalMemoryImageCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryImageCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryImageCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalMemoryImageCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalMemoryImageCreateInfo` + public static VkExternalMemoryImageCreateInfo alloc(SegmentAllocator allocator) { return new VkExternalMemoryImageCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalMemoryImageCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalMemoryImageCreateInfo` + public static VkExternalMemoryImageCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkExternalMemoryImageCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExternalMemoryImageCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExternalMemoryImageCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExternalMemoryImageCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExternalMemoryImageCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkExternalMemoryImageCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfo sType(@CType("VkStructureType") int value) { VkExternalMemoryImageCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExternalMemoryImageCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExternalMemoryImageCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkExternalMemoryImageCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryImageCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryImageCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkExternalMemoryImageCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `handleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlags") int get_handleTypes(MemorySegment segment, long index) { return (int) VH_handleTypes.get(segment, 0L, index); } + /// {@return `handleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlags") int get_handleTypes(MemorySegment segment) { return VkExternalMemoryImageCreateInfo.get_handleTypes(segment, 0L); } + /// {@return `handleTypes` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlags") int handleTypesAt(long index) { return VkExternalMemoryImageCreateInfo.get_handleTypes(this.segment(), index); } + /// {@return `handleTypes`} + public @CType("VkExternalMemoryHandleTypeFlags") int handleTypes() { return VkExternalMemoryImageCreateInfo.get_handleTypes(this.segment()); } + /// Sets `handleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleTypes(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlags") int value) { VH_handleTypes.set(segment, 0L, index, value); } + /// Sets `handleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleTypes(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryImageCreateInfo.set_handleTypes(segment, 0L, value); } + /// Sets `handleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfo handleTypesAt(long index, @CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryImageCreateInfo.set_handleTypes(this.segment(), index, value); return this; } + /// Sets `handleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryImageCreateInfo handleTypes(@CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryImageCreateInfo.set_handleTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalMemoryProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalMemoryProperties.java new file mode 100644 index 00000000..665659c4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalMemoryProperties.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### externalMemoryFeatures +/// [VarHandle][#VH_externalMemoryFeatures] - [Getter][#externalMemoryFeatures()] - [Setter][#externalMemoryFeatures(int)] +/// ### exportFromImportedHandleTypes +/// [VarHandle][#VH_exportFromImportedHandleTypes] - [Getter][#exportFromImportedHandleTypes()] - [Setter][#exportFromImportedHandleTypes(int)] +/// ### compatibleHandleTypes +/// [VarHandle][#VH_compatibleHandleTypes] - [Getter][#compatibleHandleTypes()] - [Setter][#compatibleHandleTypes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalMemoryProperties { +/// VkExternalMemoryFeatureFlags externalMemoryFeatures; +/// VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes; +/// VkExternalMemoryHandleTypeFlags compatibleHandleTypes; +/// } VkExternalMemoryProperties; +/// ``` +public final class VkExternalMemoryProperties extends Struct { + /// The struct layout of `VkExternalMemoryProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("externalMemoryFeatures"), + ValueLayout.JAVA_INT.withName("exportFromImportedHandleTypes"), + ValueLayout.JAVA_INT.withName("compatibleHandleTypes") + ); + /// The [VarHandle] of `externalMemoryFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_externalMemoryFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalMemoryFeatures")); + /// The [VarHandle] of `exportFromImportedHandleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_exportFromImportedHandleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("exportFromImportedHandleTypes")); + /// The [VarHandle] of `compatibleHandleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compatibleHandleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compatibleHandleTypes")); + + /// Creates `VkExternalMemoryProperties` with the given segment. + /// @param segment the memory segment + public VkExternalMemoryProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalMemoryProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryProperties(segment); } + + /// Creates `VkExternalMemoryProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalMemoryProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalMemoryProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalMemoryProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalMemoryProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalMemoryProperties` + public static VkExternalMemoryProperties alloc(SegmentAllocator allocator) { return new VkExternalMemoryProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalMemoryProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalMemoryProperties` + public static VkExternalMemoryProperties alloc(SegmentAllocator allocator, long count) { return new VkExternalMemoryProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `externalMemoryFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryFeatureFlags") int get_externalMemoryFeatures(MemorySegment segment, long index) { return (int) VH_externalMemoryFeatures.get(segment, 0L, index); } + /// {@return `externalMemoryFeatures`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryFeatureFlags") int get_externalMemoryFeatures(MemorySegment segment) { return VkExternalMemoryProperties.get_externalMemoryFeatures(segment, 0L); } + /// {@return `externalMemoryFeatures` at the given index} + /// @param index the index + public @CType("VkExternalMemoryFeatureFlags") int externalMemoryFeaturesAt(long index) { return VkExternalMemoryProperties.get_externalMemoryFeatures(this.segment(), index); } + /// {@return `externalMemoryFeatures`} + public @CType("VkExternalMemoryFeatureFlags") int externalMemoryFeatures() { return VkExternalMemoryProperties.get_externalMemoryFeatures(this.segment()); } + /// Sets `externalMemoryFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalMemoryFeatures(MemorySegment segment, long index, @CType("VkExternalMemoryFeatureFlags") int value) { VH_externalMemoryFeatures.set(segment, 0L, index, value); } + /// Sets `externalMemoryFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalMemoryFeatures(MemorySegment segment, @CType("VkExternalMemoryFeatureFlags") int value) { VkExternalMemoryProperties.set_externalMemoryFeatures(segment, 0L, value); } + /// Sets `externalMemoryFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryProperties externalMemoryFeaturesAt(long index, @CType("VkExternalMemoryFeatureFlags") int value) { VkExternalMemoryProperties.set_externalMemoryFeatures(this.segment(), index, value); return this; } + /// Sets `externalMemoryFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryProperties externalMemoryFeatures(@CType("VkExternalMemoryFeatureFlags") int value) { VkExternalMemoryProperties.set_externalMemoryFeatures(this.segment(), value); return this; } + + /// {@return `exportFromImportedHandleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlags") int get_exportFromImportedHandleTypes(MemorySegment segment, long index) { return (int) VH_exportFromImportedHandleTypes.get(segment, 0L, index); } + /// {@return `exportFromImportedHandleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlags") int get_exportFromImportedHandleTypes(MemorySegment segment) { return VkExternalMemoryProperties.get_exportFromImportedHandleTypes(segment, 0L); } + /// {@return `exportFromImportedHandleTypes` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlags") int exportFromImportedHandleTypesAt(long index) { return VkExternalMemoryProperties.get_exportFromImportedHandleTypes(this.segment(), index); } + /// {@return `exportFromImportedHandleTypes`} + public @CType("VkExternalMemoryHandleTypeFlags") int exportFromImportedHandleTypes() { return VkExternalMemoryProperties.get_exportFromImportedHandleTypes(this.segment()); } + /// Sets `exportFromImportedHandleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_exportFromImportedHandleTypes(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlags") int value) { VH_exportFromImportedHandleTypes.set(segment, 0L, index, value); } + /// Sets `exportFromImportedHandleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_exportFromImportedHandleTypes(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryProperties.set_exportFromImportedHandleTypes(segment, 0L, value); } + /// Sets `exportFromImportedHandleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryProperties exportFromImportedHandleTypesAt(long index, @CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryProperties.set_exportFromImportedHandleTypes(this.segment(), index, value); return this; } + /// Sets `exportFromImportedHandleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryProperties exportFromImportedHandleTypes(@CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryProperties.set_exportFromImportedHandleTypes(this.segment(), value); return this; } + + /// {@return `compatibleHandleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlags") int get_compatibleHandleTypes(MemorySegment segment, long index) { return (int) VH_compatibleHandleTypes.get(segment, 0L, index); } + /// {@return `compatibleHandleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlags") int get_compatibleHandleTypes(MemorySegment segment) { return VkExternalMemoryProperties.get_compatibleHandleTypes(segment, 0L); } + /// {@return `compatibleHandleTypes` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlags") int compatibleHandleTypesAt(long index) { return VkExternalMemoryProperties.get_compatibleHandleTypes(this.segment(), index); } + /// {@return `compatibleHandleTypes`} + public @CType("VkExternalMemoryHandleTypeFlags") int compatibleHandleTypes() { return VkExternalMemoryProperties.get_compatibleHandleTypes(this.segment()); } + /// Sets `compatibleHandleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compatibleHandleTypes(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlags") int value) { VH_compatibleHandleTypes.set(segment, 0L, index, value); } + /// Sets `compatibleHandleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compatibleHandleTypes(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryProperties.set_compatibleHandleTypes(segment, 0L, value); } + /// Sets `compatibleHandleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalMemoryProperties compatibleHandleTypesAt(long index, @CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryProperties.set_compatibleHandleTypes(this.segment(), index, value); return this; } + /// Sets `compatibleHandleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalMemoryProperties compatibleHandleTypes(@CType("VkExternalMemoryHandleTypeFlags") int value) { VkExternalMemoryProperties.set_compatibleHandleTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalSemaphoreProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalSemaphoreProperties.java new file mode 100644 index 00000000..f2a40bb5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkExternalSemaphoreProperties.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### exportFromImportedHandleTypes +/// [VarHandle][#VH_exportFromImportedHandleTypes] - [Getter][#exportFromImportedHandleTypes()] - [Setter][#exportFromImportedHandleTypes(int)] +/// ### compatibleHandleTypes +/// [VarHandle][#VH_compatibleHandleTypes] - [Getter][#compatibleHandleTypes()] - [Setter][#compatibleHandleTypes(int)] +/// ### externalSemaphoreFeatures +/// [VarHandle][#VH_externalSemaphoreFeatures] - [Getter][#externalSemaphoreFeatures()] - [Setter][#externalSemaphoreFeatures(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkExternalSemaphoreProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes; +/// VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes; +/// VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures; +/// } VkExternalSemaphoreProperties; +/// ``` +public final class VkExternalSemaphoreProperties extends Struct { + /// The struct layout of `VkExternalSemaphoreProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("exportFromImportedHandleTypes"), + ValueLayout.JAVA_INT.withName("compatibleHandleTypes"), + ValueLayout.JAVA_INT.withName("externalSemaphoreFeatures") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `exportFromImportedHandleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_exportFromImportedHandleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("exportFromImportedHandleTypes")); + /// The [VarHandle] of `compatibleHandleTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compatibleHandleTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compatibleHandleTypes")); + /// The [VarHandle] of `externalSemaphoreFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_externalSemaphoreFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("externalSemaphoreFeatures")); + + /// Creates `VkExternalSemaphoreProperties` with the given segment. + /// @param segment the memory segment + public VkExternalSemaphoreProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkExternalSemaphoreProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalSemaphoreProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalSemaphoreProperties(segment); } + + /// Creates `VkExternalSemaphoreProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalSemaphoreProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalSemaphoreProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkExternalSemaphoreProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkExternalSemaphoreProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkExternalSemaphoreProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkExternalSemaphoreProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkExternalSemaphoreProperties` + public static VkExternalSemaphoreProperties alloc(SegmentAllocator allocator) { return new VkExternalSemaphoreProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkExternalSemaphoreProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkExternalSemaphoreProperties` + public static VkExternalSemaphoreProperties alloc(SegmentAllocator allocator, long count) { return new VkExternalSemaphoreProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkExternalSemaphoreProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkExternalSemaphoreProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkExternalSemaphoreProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkExternalSemaphoreProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalSemaphoreProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkExternalSemaphoreProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkExternalSemaphoreProperties sType(@CType("VkStructureType") int value) { VkExternalSemaphoreProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkExternalSemaphoreProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkExternalSemaphoreProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkExternalSemaphoreProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalSemaphoreProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalSemaphoreProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkExternalSemaphoreProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkExternalSemaphoreProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkExternalSemaphoreProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `exportFromImportedHandleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlags") int get_exportFromImportedHandleTypes(MemorySegment segment, long index) { return (int) VH_exportFromImportedHandleTypes.get(segment, 0L, index); } + /// {@return `exportFromImportedHandleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlags") int get_exportFromImportedHandleTypes(MemorySegment segment) { return VkExternalSemaphoreProperties.get_exportFromImportedHandleTypes(segment, 0L); } + /// {@return `exportFromImportedHandleTypes` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlags") int exportFromImportedHandleTypesAt(long index) { return VkExternalSemaphoreProperties.get_exportFromImportedHandleTypes(this.segment(), index); } + /// {@return `exportFromImportedHandleTypes`} + public @CType("VkExternalSemaphoreHandleTypeFlags") int exportFromImportedHandleTypes() { return VkExternalSemaphoreProperties.get_exportFromImportedHandleTypes(this.segment()); } + /// Sets `exportFromImportedHandleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_exportFromImportedHandleTypes(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlags") int value) { VH_exportFromImportedHandleTypes.set(segment, 0L, index, value); } + /// Sets `exportFromImportedHandleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_exportFromImportedHandleTypes(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlags") int value) { VkExternalSemaphoreProperties.set_exportFromImportedHandleTypes(segment, 0L, value); } + /// Sets `exportFromImportedHandleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalSemaphoreProperties exportFromImportedHandleTypesAt(long index, @CType("VkExternalSemaphoreHandleTypeFlags") int value) { VkExternalSemaphoreProperties.set_exportFromImportedHandleTypes(this.segment(), index, value); return this; } + /// Sets `exportFromImportedHandleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalSemaphoreProperties exportFromImportedHandleTypes(@CType("VkExternalSemaphoreHandleTypeFlags") int value) { VkExternalSemaphoreProperties.set_exportFromImportedHandleTypes(this.segment(), value); return this; } + + /// {@return `compatibleHandleTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlags") int get_compatibleHandleTypes(MemorySegment segment, long index) { return (int) VH_compatibleHandleTypes.get(segment, 0L, index); } + /// {@return `compatibleHandleTypes`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlags") int get_compatibleHandleTypes(MemorySegment segment) { return VkExternalSemaphoreProperties.get_compatibleHandleTypes(segment, 0L); } + /// {@return `compatibleHandleTypes` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlags") int compatibleHandleTypesAt(long index) { return VkExternalSemaphoreProperties.get_compatibleHandleTypes(this.segment(), index); } + /// {@return `compatibleHandleTypes`} + public @CType("VkExternalSemaphoreHandleTypeFlags") int compatibleHandleTypes() { return VkExternalSemaphoreProperties.get_compatibleHandleTypes(this.segment()); } + /// Sets `compatibleHandleTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compatibleHandleTypes(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlags") int value) { VH_compatibleHandleTypes.set(segment, 0L, index, value); } + /// Sets `compatibleHandleTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compatibleHandleTypes(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlags") int value) { VkExternalSemaphoreProperties.set_compatibleHandleTypes(segment, 0L, value); } + /// Sets `compatibleHandleTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalSemaphoreProperties compatibleHandleTypesAt(long index, @CType("VkExternalSemaphoreHandleTypeFlags") int value) { VkExternalSemaphoreProperties.set_compatibleHandleTypes(this.segment(), index, value); return this; } + /// Sets `compatibleHandleTypes` with the given value. + /// @param value the value + /// @return `this` + public VkExternalSemaphoreProperties compatibleHandleTypes(@CType("VkExternalSemaphoreHandleTypeFlags") int value) { VkExternalSemaphoreProperties.set_compatibleHandleTypes(this.segment(), value); return this; } + + /// {@return `externalSemaphoreFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreFeatureFlags") int get_externalSemaphoreFeatures(MemorySegment segment, long index) { return (int) VH_externalSemaphoreFeatures.get(segment, 0L, index); } + /// {@return `externalSemaphoreFeatures`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreFeatureFlags") int get_externalSemaphoreFeatures(MemorySegment segment) { return VkExternalSemaphoreProperties.get_externalSemaphoreFeatures(segment, 0L); } + /// {@return `externalSemaphoreFeatures` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreFeatureFlags") int externalSemaphoreFeaturesAt(long index) { return VkExternalSemaphoreProperties.get_externalSemaphoreFeatures(this.segment(), index); } + /// {@return `externalSemaphoreFeatures`} + public @CType("VkExternalSemaphoreFeatureFlags") int externalSemaphoreFeatures() { return VkExternalSemaphoreProperties.get_externalSemaphoreFeatures(this.segment()); } + /// Sets `externalSemaphoreFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_externalSemaphoreFeatures(MemorySegment segment, long index, @CType("VkExternalSemaphoreFeatureFlags") int value) { VH_externalSemaphoreFeatures.set(segment, 0L, index, value); } + /// Sets `externalSemaphoreFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_externalSemaphoreFeatures(MemorySegment segment, @CType("VkExternalSemaphoreFeatureFlags") int value) { VkExternalSemaphoreProperties.set_externalSemaphoreFeatures(segment, 0L, value); } + /// Sets `externalSemaphoreFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkExternalSemaphoreProperties externalSemaphoreFeaturesAt(long index, @CType("VkExternalSemaphoreFeatureFlags") int value) { VkExternalSemaphoreProperties.set_externalSemaphoreFeatures(this.segment(), index, value); return this; } + /// Sets `externalSemaphoreFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkExternalSemaphoreProperties externalSemaphoreFeatures(@CType("VkExternalSemaphoreFeatureFlags") int value) { VkExternalSemaphoreProperties.set_externalSemaphoreFeatures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFaultCallbackInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFaultCallbackInfo.java new file mode 100644 index 00000000..57a64ea2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFaultCallbackInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### faultCount +/// [VarHandle][#VH_faultCount] - [Getter][#faultCount()] - [Setter][#faultCount(int)] +/// ### pFaults +/// [VarHandle][#VH_pFaults] - [Getter][#pFaults()] - [Setter][#pFaults(java.lang.foreign.MemorySegment)] +/// ### pfnFaultCallback +/// [VarHandle][#VH_pfnFaultCallback] - [Getter][#pfnFaultCallback()] - [Setter][#pfnFaultCallback(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFaultCallbackInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t faultCount; +/// VkFaultData * pFaults; +/// PFN_vkFaultCallbackFunction pfnFaultCallback; +/// } VkFaultCallbackInfo; +/// ``` +public final class VkFaultCallbackInfo extends Struct { + /// The struct layout of `VkFaultCallbackInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("faultCount"), + ValueLayout.ADDRESS.withName("pFaults"), + ValueLayout.ADDRESS.withName("pfnFaultCallback") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `faultCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_faultCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("faultCount")); + /// The [VarHandle] of `pFaults` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pFaults = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pFaults")); + /// The [VarHandle] of `pfnFaultCallback` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pfnFaultCallback = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pfnFaultCallback")); + + /// Creates `VkFaultCallbackInfo` with the given segment. + /// @param segment the memory segment + public VkFaultCallbackInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFaultCallbackInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFaultCallbackInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFaultCallbackInfo(segment); } + + /// Creates `VkFaultCallbackInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFaultCallbackInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFaultCallbackInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFaultCallbackInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFaultCallbackInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFaultCallbackInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFaultCallbackInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFaultCallbackInfo` + public static VkFaultCallbackInfo alloc(SegmentAllocator allocator) { return new VkFaultCallbackInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFaultCallbackInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFaultCallbackInfo` + public static VkFaultCallbackInfo alloc(SegmentAllocator allocator, long count) { return new VkFaultCallbackInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFaultCallbackInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFaultCallbackInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFaultCallbackInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFaultCallbackInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFaultCallbackInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkFaultCallbackInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFaultCallbackInfo sType(@CType("VkStructureType") int value) { VkFaultCallbackInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFaultCallbackInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFaultCallbackInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkFaultCallbackInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFaultCallbackInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFaultCallbackInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFaultCallbackInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFaultCallbackInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFaultCallbackInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `faultCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_faultCount(MemorySegment segment, long index) { return (int) VH_faultCount.get(segment, 0L, index); } + /// {@return `faultCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_faultCount(MemorySegment segment) { return VkFaultCallbackInfo.get_faultCount(segment, 0L); } + /// {@return `faultCount` at the given index} + /// @param index the index + public @CType("uint32_t") int faultCountAt(long index) { return VkFaultCallbackInfo.get_faultCount(this.segment(), index); } + /// {@return `faultCount`} + public @CType("uint32_t") int faultCount() { return VkFaultCallbackInfo.get_faultCount(this.segment()); } + /// Sets `faultCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_faultCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_faultCount.set(segment, 0L, index, value); } + /// Sets `faultCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_faultCount(MemorySegment segment, @CType("uint32_t") int value) { VkFaultCallbackInfo.set_faultCount(segment, 0L, value); } + /// Sets `faultCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFaultCallbackInfo faultCountAt(long index, @CType("uint32_t") int value) { VkFaultCallbackInfo.set_faultCount(this.segment(), index, value); return this; } + /// Sets `faultCount` with the given value. + /// @param value the value + /// @return `this` + public VkFaultCallbackInfo faultCount(@CType("uint32_t") int value) { VkFaultCallbackInfo.set_faultCount(this.segment(), value); return this; } + + /// {@return `pFaults` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFaultData *") java.lang.foreign.MemorySegment get_pFaults(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pFaults.get(segment, 0L, index); } + /// {@return `pFaults`} + /// @param segment the segment of the struct + public static @CType("VkFaultData *") java.lang.foreign.MemorySegment get_pFaults(MemorySegment segment) { return VkFaultCallbackInfo.get_pFaults(segment, 0L); } + /// {@return `pFaults` at the given index} + /// @param index the index + public @CType("VkFaultData *") java.lang.foreign.MemorySegment pFaultsAt(long index) { return VkFaultCallbackInfo.get_pFaults(this.segment(), index); } + /// {@return `pFaults`} + public @CType("VkFaultData *") java.lang.foreign.MemorySegment pFaults() { return VkFaultCallbackInfo.get_pFaults(this.segment()); } + /// Sets `pFaults` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pFaults(MemorySegment segment, long index, @CType("VkFaultData *") java.lang.foreign.MemorySegment value) { VH_pFaults.set(segment, 0L, index, value); } + /// Sets `pFaults` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pFaults(MemorySegment segment, @CType("VkFaultData *") java.lang.foreign.MemorySegment value) { VkFaultCallbackInfo.set_pFaults(segment, 0L, value); } + /// Sets `pFaults` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFaultCallbackInfo pFaultsAt(long index, @CType("VkFaultData *") java.lang.foreign.MemorySegment value) { VkFaultCallbackInfo.set_pFaults(this.segment(), index, value); return this; } + /// Sets `pFaults` with the given value. + /// @param value the value + /// @return `this` + public VkFaultCallbackInfo pFaults(@CType("VkFaultData *") java.lang.foreign.MemorySegment value) { VkFaultCallbackInfo.set_pFaults(this.segment(), value); return this; } + + /// {@return `pfnFaultCallback` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("PFN_vkFaultCallbackFunction") java.lang.foreign.MemorySegment get_pfnFaultCallback(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pfnFaultCallback.get(segment, 0L, index); } + /// {@return `pfnFaultCallback`} + /// @param segment the segment of the struct + public static @CType("PFN_vkFaultCallbackFunction") java.lang.foreign.MemorySegment get_pfnFaultCallback(MemorySegment segment) { return VkFaultCallbackInfo.get_pfnFaultCallback(segment, 0L); } + /// {@return `pfnFaultCallback` at the given index} + /// @param index the index + public @CType("PFN_vkFaultCallbackFunction") java.lang.foreign.MemorySegment pfnFaultCallbackAt(long index) { return VkFaultCallbackInfo.get_pfnFaultCallback(this.segment(), index); } + /// {@return `pfnFaultCallback`} + public @CType("PFN_vkFaultCallbackFunction") java.lang.foreign.MemorySegment pfnFaultCallback() { return VkFaultCallbackInfo.get_pfnFaultCallback(this.segment()); } + /// Sets `pfnFaultCallback` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pfnFaultCallback(MemorySegment segment, long index, @CType("PFN_vkFaultCallbackFunction") java.lang.foreign.MemorySegment value) { VH_pfnFaultCallback.set(segment, 0L, index, value); } + /// Sets `pfnFaultCallback` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pfnFaultCallback(MemorySegment segment, @CType("PFN_vkFaultCallbackFunction") java.lang.foreign.MemorySegment value) { VkFaultCallbackInfo.set_pfnFaultCallback(segment, 0L, value); } + /// Sets `pfnFaultCallback` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFaultCallbackInfo pfnFaultCallbackAt(long index, @CType("PFN_vkFaultCallbackFunction") java.lang.foreign.MemorySegment value) { VkFaultCallbackInfo.set_pfnFaultCallback(this.segment(), index, value); return this; } + /// Sets `pfnFaultCallback` with the given value. + /// @param value the value + /// @return `this` + public VkFaultCallbackInfo pfnFaultCallback(@CType("PFN_vkFaultCallbackFunction") java.lang.foreign.MemorySegment value) { VkFaultCallbackInfo.set_pfnFaultCallback(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFaultData.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFaultData.java new file mode 100644 index 00000000..353d04e1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFaultData.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### faultLevel +/// [VarHandle][#VH_faultLevel] - [Getter][#faultLevel()] - [Setter][#faultLevel(int)] +/// ### faultType +/// [VarHandle][#VH_faultType] - [Getter][#faultType()] - [Setter][#faultType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFaultData { +/// VkStructureType sType; +/// void * pNext; +/// VkFaultLevel faultLevel; +/// VkFaultType faultType; +/// } VkFaultData; +/// ``` +public final class VkFaultData extends Struct { + /// The struct layout of `VkFaultData`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("faultLevel"), + ValueLayout.JAVA_INT.withName("faultType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `faultLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_faultLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("faultLevel")); + /// The [VarHandle] of `faultType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_faultType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("faultType")); + + /// Creates `VkFaultData` with the given segment. + /// @param segment the memory segment + public VkFaultData(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFaultData` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFaultData of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFaultData(segment); } + + /// Creates `VkFaultData` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFaultData ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFaultData(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFaultData` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFaultData ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFaultData(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFaultData` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFaultData` + public static VkFaultData alloc(SegmentAllocator allocator) { return new VkFaultData(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFaultData` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFaultData` + public static VkFaultData alloc(SegmentAllocator allocator, long count) { return new VkFaultData(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFaultData.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFaultData.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFaultData.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFaultData.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFaultData sTypeAt(long index, @CType("VkStructureType") int value) { VkFaultData.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFaultData sType(@CType("VkStructureType") int value) { VkFaultData.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFaultData.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFaultData.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkFaultData.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkFaultData.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFaultData pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkFaultData.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFaultData pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkFaultData.set_pNext(this.segment(), value); return this; } + + /// {@return `faultLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFaultLevel") int get_faultLevel(MemorySegment segment, long index) { return (int) VH_faultLevel.get(segment, 0L, index); } + /// {@return `faultLevel`} + /// @param segment the segment of the struct + public static @CType("VkFaultLevel") int get_faultLevel(MemorySegment segment) { return VkFaultData.get_faultLevel(segment, 0L); } + /// {@return `faultLevel` at the given index} + /// @param index the index + public @CType("VkFaultLevel") int faultLevelAt(long index) { return VkFaultData.get_faultLevel(this.segment(), index); } + /// {@return `faultLevel`} + public @CType("VkFaultLevel") int faultLevel() { return VkFaultData.get_faultLevel(this.segment()); } + /// Sets `faultLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_faultLevel(MemorySegment segment, long index, @CType("VkFaultLevel") int value) { VH_faultLevel.set(segment, 0L, index, value); } + /// Sets `faultLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_faultLevel(MemorySegment segment, @CType("VkFaultLevel") int value) { VkFaultData.set_faultLevel(segment, 0L, value); } + /// Sets `faultLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFaultData faultLevelAt(long index, @CType("VkFaultLevel") int value) { VkFaultData.set_faultLevel(this.segment(), index, value); return this; } + /// Sets `faultLevel` with the given value. + /// @param value the value + /// @return `this` + public VkFaultData faultLevel(@CType("VkFaultLevel") int value) { VkFaultData.set_faultLevel(this.segment(), value); return this; } + + /// {@return `faultType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFaultType") int get_faultType(MemorySegment segment, long index) { return (int) VH_faultType.get(segment, 0L, index); } + /// {@return `faultType`} + /// @param segment the segment of the struct + public static @CType("VkFaultType") int get_faultType(MemorySegment segment) { return VkFaultData.get_faultType(segment, 0L); } + /// {@return `faultType` at the given index} + /// @param index the index + public @CType("VkFaultType") int faultTypeAt(long index) { return VkFaultData.get_faultType(this.segment(), index); } + /// {@return `faultType`} + public @CType("VkFaultType") int faultType() { return VkFaultData.get_faultType(this.segment()); } + /// Sets `faultType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_faultType(MemorySegment segment, long index, @CType("VkFaultType") int value) { VH_faultType.set(segment, 0L, index, value); } + /// Sets `faultType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_faultType(MemorySegment segment, @CType("VkFaultType") int value) { VkFaultData.set_faultType(segment, 0L, value); } + /// Sets `faultType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFaultData faultTypeAt(long index, @CType("VkFaultType") int value) { VkFaultData.set_faultType(this.segment(), index, value); return this; } + /// Sets `faultType` with the given value. + /// @param value the value + /// @return `this` + public VkFaultData faultType(@CType("VkFaultType") int value) { VkFaultData.set_faultType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFenceCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFenceCreateInfo.java new file mode 100644 index 00000000..dde4351a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFenceCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFenceCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkFenceCreateFlags flags; +/// } VkFenceCreateInfo; +/// ``` +public final class VkFenceCreateInfo extends Struct { + /// The struct layout of `VkFenceCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkFenceCreateInfo` with the given segment. + /// @param segment the memory segment + public VkFenceCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFenceCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceCreateInfo(segment); } + + /// Creates `VkFenceCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFenceCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFenceCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFenceCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFenceCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFenceCreateInfo` + public static VkFenceCreateInfo alloc(SegmentAllocator allocator) { return new VkFenceCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFenceCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFenceCreateInfo` + public static VkFenceCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkFenceCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFenceCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFenceCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFenceCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFenceCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkFenceCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFenceCreateInfo sType(@CType("VkStructureType") int value) { VkFenceCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFenceCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFenceCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkFenceCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFenceCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFenceCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFenceCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkFenceCreateFlags") int get_flags(MemorySegment segment) { return VkFenceCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkFenceCreateFlags") int flagsAt(long index) { return VkFenceCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkFenceCreateFlags") int flags() { return VkFenceCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkFenceCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkFenceCreateFlags") int value) { VkFenceCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFenceCreateInfo flagsAt(long index, @CType("VkFenceCreateFlags") int value) { VkFenceCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkFenceCreateInfo flags(@CType("VkFenceCreateFlags") int value) { VkFenceCreateInfo.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFormatProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFormatProperties.java new file mode 100644 index 00000000..86ad6255 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFormatProperties.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### linearTilingFeatures +/// [VarHandle][#VH_linearTilingFeatures] - [Getter][#linearTilingFeatures()] - [Setter][#linearTilingFeatures(int)] +/// ### optimalTilingFeatures +/// [VarHandle][#VH_optimalTilingFeatures] - [Getter][#optimalTilingFeatures()] - [Setter][#optimalTilingFeatures(int)] +/// ### bufferFeatures +/// [VarHandle][#VH_bufferFeatures] - [Getter][#bufferFeatures()] - [Setter][#bufferFeatures(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFormatProperties { +/// VkFormatFeatureFlags linearTilingFeatures; +/// VkFormatFeatureFlags optimalTilingFeatures; +/// VkFormatFeatureFlags bufferFeatures; +/// } VkFormatProperties; +/// ``` +public final class VkFormatProperties extends Struct { + /// The struct layout of `VkFormatProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("linearTilingFeatures"), + ValueLayout.JAVA_INT.withName("optimalTilingFeatures"), + ValueLayout.JAVA_INT.withName("bufferFeatures") + ); + /// The [VarHandle] of `linearTilingFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_linearTilingFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("linearTilingFeatures")); + /// The [VarHandle] of `optimalTilingFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_optimalTilingFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("optimalTilingFeatures")); + /// The [VarHandle] of `bufferFeatures` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferFeatures")); + + /// Creates `VkFormatProperties` with the given segment. + /// @param segment the memory segment + public VkFormatProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFormatProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFormatProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFormatProperties(segment); } + + /// Creates `VkFormatProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFormatProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFormatProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFormatProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFormatProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFormatProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFormatProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFormatProperties` + public static VkFormatProperties alloc(SegmentAllocator allocator) { return new VkFormatProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFormatProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFormatProperties` + public static VkFormatProperties alloc(SegmentAllocator allocator, long count) { return new VkFormatProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `linearTilingFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags") int get_linearTilingFeatures(MemorySegment segment, long index) { return (int) VH_linearTilingFeatures.get(segment, 0L, index); } + /// {@return `linearTilingFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags") int get_linearTilingFeatures(MemorySegment segment) { return VkFormatProperties.get_linearTilingFeatures(segment, 0L); } + /// {@return `linearTilingFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags") int linearTilingFeaturesAt(long index) { return VkFormatProperties.get_linearTilingFeatures(this.segment(), index); } + /// {@return `linearTilingFeatures`} + public @CType("VkFormatFeatureFlags") int linearTilingFeatures() { return VkFormatProperties.get_linearTilingFeatures(this.segment()); } + /// Sets `linearTilingFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_linearTilingFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags") int value) { VH_linearTilingFeatures.set(segment, 0L, index, value); } + /// Sets `linearTilingFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_linearTilingFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags") int value) { VkFormatProperties.set_linearTilingFeatures(segment, 0L, value); } + /// Sets `linearTilingFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties linearTilingFeaturesAt(long index, @CType("VkFormatFeatureFlags") int value) { VkFormatProperties.set_linearTilingFeatures(this.segment(), index, value); return this; } + /// Sets `linearTilingFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties linearTilingFeatures(@CType("VkFormatFeatureFlags") int value) { VkFormatProperties.set_linearTilingFeatures(this.segment(), value); return this; } + + /// {@return `optimalTilingFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags") int get_optimalTilingFeatures(MemorySegment segment, long index) { return (int) VH_optimalTilingFeatures.get(segment, 0L, index); } + /// {@return `optimalTilingFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags") int get_optimalTilingFeatures(MemorySegment segment) { return VkFormatProperties.get_optimalTilingFeatures(segment, 0L); } + /// {@return `optimalTilingFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags") int optimalTilingFeaturesAt(long index) { return VkFormatProperties.get_optimalTilingFeatures(this.segment(), index); } + /// {@return `optimalTilingFeatures`} + public @CType("VkFormatFeatureFlags") int optimalTilingFeatures() { return VkFormatProperties.get_optimalTilingFeatures(this.segment()); } + /// Sets `optimalTilingFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_optimalTilingFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags") int value) { VH_optimalTilingFeatures.set(segment, 0L, index, value); } + /// Sets `optimalTilingFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_optimalTilingFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags") int value) { VkFormatProperties.set_optimalTilingFeatures(segment, 0L, value); } + /// Sets `optimalTilingFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties optimalTilingFeaturesAt(long index, @CType("VkFormatFeatureFlags") int value) { VkFormatProperties.set_optimalTilingFeatures(this.segment(), index, value); return this; } + /// Sets `optimalTilingFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties optimalTilingFeatures(@CType("VkFormatFeatureFlags") int value) { VkFormatProperties.set_optimalTilingFeatures(this.segment(), value); return this; } + + /// {@return `bufferFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags") int get_bufferFeatures(MemorySegment segment, long index) { return (int) VH_bufferFeatures.get(segment, 0L, index); } + /// {@return `bufferFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags") int get_bufferFeatures(MemorySegment segment) { return VkFormatProperties.get_bufferFeatures(segment, 0L); } + /// {@return `bufferFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags") int bufferFeaturesAt(long index) { return VkFormatProperties.get_bufferFeatures(this.segment(), index); } + /// {@return `bufferFeatures`} + public @CType("VkFormatFeatureFlags") int bufferFeatures() { return VkFormatProperties.get_bufferFeatures(this.segment()); } + /// Sets `bufferFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags") int value) { VH_bufferFeatures.set(segment, 0L, index, value); } + /// Sets `bufferFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags") int value) { VkFormatProperties.set_bufferFeatures(segment, 0L, value); } + /// Sets `bufferFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties bufferFeaturesAt(long index, @CType("VkFormatFeatureFlags") int value) { VkFormatProperties.set_bufferFeatures(this.segment(), index, value); return this; } + /// Sets `bufferFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties bufferFeatures(@CType("VkFormatFeatureFlags") int value) { VkFormatProperties.set_bufferFeatures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFormatProperties2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFormatProperties2.java new file mode 100644 index 00000000..646aed66 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFormatProperties2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### formatProperties +/// [Byte offset][#OFFSET_formatProperties] - [Memory layout][#ML_formatProperties] - [Getter][#formatProperties()] - [Setter][#formatProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFormatProperties2 { +/// VkStructureType sType; +/// void * pNext; +/// VkFormatProperties formatProperties; +/// } VkFormatProperties2; +/// ``` +public final class VkFormatProperties2 extends Struct { + /// The struct layout of `VkFormatProperties2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkFormatProperties.LAYOUT.withName("formatProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `formatProperties`. + public static final long OFFSET_formatProperties = LAYOUT.byteOffset(PathElement.groupElement("formatProperties")); + /// The memory layout of `formatProperties`. + public static final MemoryLayout ML_formatProperties = LAYOUT.select(PathElement.groupElement("formatProperties")); + + /// Creates `VkFormatProperties2` with the given segment. + /// @param segment the memory segment + public VkFormatProperties2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFormatProperties2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFormatProperties2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFormatProperties2(segment); } + + /// Creates `VkFormatProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFormatProperties2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFormatProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFormatProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFormatProperties2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFormatProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFormatProperties2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFormatProperties2` + public static VkFormatProperties2 alloc(SegmentAllocator allocator) { return new VkFormatProperties2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFormatProperties2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFormatProperties2` + public static VkFormatProperties2 alloc(SegmentAllocator allocator, long count) { return new VkFormatProperties2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFormatProperties2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFormatProperties2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFormatProperties2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFormatProperties2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties2 sTypeAt(long index, @CType("VkStructureType") int value) { VkFormatProperties2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties2 sType(@CType("VkStructureType") int value) { VkFormatProperties2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFormatProperties2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFormatProperties2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkFormatProperties2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkFormatProperties2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkFormatProperties2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkFormatProperties2.set_pNext(this.segment(), value); return this; } + + /// {@return `formatProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatProperties") java.lang.foreign.MemorySegment get_formatProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_formatProperties, index), ML_formatProperties); } + /// {@return `formatProperties`} + /// @param segment the segment of the struct + public static @CType("VkFormatProperties") java.lang.foreign.MemorySegment get_formatProperties(MemorySegment segment) { return VkFormatProperties2.get_formatProperties(segment, 0L); } + /// {@return `formatProperties` at the given index} + /// @param index the index + public @CType("VkFormatProperties") java.lang.foreign.MemorySegment formatPropertiesAt(long index) { return VkFormatProperties2.get_formatProperties(this.segment(), index); } + /// {@return `formatProperties`} + public @CType("VkFormatProperties") java.lang.foreign.MemorySegment formatProperties() { return VkFormatProperties2.get_formatProperties(this.segment()); } + /// Sets `formatProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_formatProperties(MemorySegment segment, long index, @CType("VkFormatProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_formatProperties, index), ML_formatProperties.byteSize()); } + /// Sets `formatProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_formatProperties(MemorySegment segment, @CType("VkFormatProperties") java.lang.foreign.MemorySegment value) { VkFormatProperties2.set_formatProperties(segment, 0L, value); } + /// Sets `formatProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties2 formatPropertiesAt(long index, @CType("VkFormatProperties") java.lang.foreign.MemorySegment value) { VkFormatProperties2.set_formatProperties(this.segment(), index, value); return this; } + /// Sets `formatProperties` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties2 formatProperties(@CType("VkFormatProperties") java.lang.foreign.MemorySegment value) { VkFormatProperties2.set_formatProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFormatProperties3.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFormatProperties3.java new file mode 100644 index 00000000..ba1a9743 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFormatProperties3.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### linearTilingFeatures +/// [VarHandle][#VH_linearTilingFeatures] - [Getter][#linearTilingFeatures()] - [Setter][#linearTilingFeatures(long)] +/// ### optimalTilingFeatures +/// [VarHandle][#VH_optimalTilingFeatures] - [Getter][#optimalTilingFeatures()] - [Setter][#optimalTilingFeatures(long)] +/// ### bufferFeatures +/// [VarHandle][#VH_bufferFeatures] - [Getter][#bufferFeatures()] - [Setter][#bufferFeatures(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFormatProperties3 { +/// VkStructureType sType; +/// void * pNext; +/// VkFormatFeatureFlags2 linearTilingFeatures; +/// VkFormatFeatureFlags2 optimalTilingFeatures; +/// VkFormatFeatureFlags2 bufferFeatures; +/// } VkFormatProperties3; +/// ``` +public final class VkFormatProperties3 extends Struct { + /// The struct layout of `VkFormatProperties3`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("linearTilingFeatures"), + ValueLayout.JAVA_LONG.withName("optimalTilingFeatures"), + ValueLayout.JAVA_LONG.withName("bufferFeatures") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `linearTilingFeatures` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_linearTilingFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("linearTilingFeatures")); + /// The [VarHandle] of `optimalTilingFeatures` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_optimalTilingFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("optimalTilingFeatures")); + /// The [VarHandle] of `bufferFeatures` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_bufferFeatures = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferFeatures")); + + /// Creates `VkFormatProperties3` with the given segment. + /// @param segment the memory segment + public VkFormatProperties3(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFormatProperties3` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFormatProperties3 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFormatProperties3(segment); } + + /// Creates `VkFormatProperties3` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFormatProperties3 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFormatProperties3(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFormatProperties3` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFormatProperties3 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFormatProperties3(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFormatProperties3` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFormatProperties3` + public static VkFormatProperties3 alloc(SegmentAllocator allocator) { return new VkFormatProperties3(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFormatProperties3` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFormatProperties3` + public static VkFormatProperties3 alloc(SegmentAllocator allocator, long count) { return new VkFormatProperties3(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFormatProperties3.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFormatProperties3.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFormatProperties3.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFormatProperties3.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties3 sTypeAt(long index, @CType("VkStructureType") int value) { VkFormatProperties3.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties3 sType(@CType("VkStructureType") int value) { VkFormatProperties3.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFormatProperties3.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFormatProperties3.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkFormatProperties3.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkFormatProperties3.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties3 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkFormatProperties3.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties3 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkFormatProperties3.set_pNext(this.segment(), value); return this; } + + /// {@return `linearTilingFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags2") long get_linearTilingFeatures(MemorySegment segment, long index) { return (long) VH_linearTilingFeatures.get(segment, 0L, index); } + /// {@return `linearTilingFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags2") long get_linearTilingFeatures(MemorySegment segment) { return VkFormatProperties3.get_linearTilingFeatures(segment, 0L); } + /// {@return `linearTilingFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags2") long linearTilingFeaturesAt(long index) { return VkFormatProperties3.get_linearTilingFeatures(this.segment(), index); } + /// {@return `linearTilingFeatures`} + public @CType("VkFormatFeatureFlags2") long linearTilingFeatures() { return VkFormatProperties3.get_linearTilingFeatures(this.segment()); } + /// Sets `linearTilingFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_linearTilingFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags2") long value) { VH_linearTilingFeatures.set(segment, 0L, index, value); } + /// Sets `linearTilingFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_linearTilingFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags2") long value) { VkFormatProperties3.set_linearTilingFeatures(segment, 0L, value); } + /// Sets `linearTilingFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties3 linearTilingFeaturesAt(long index, @CType("VkFormatFeatureFlags2") long value) { VkFormatProperties3.set_linearTilingFeatures(this.segment(), index, value); return this; } + /// Sets `linearTilingFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties3 linearTilingFeatures(@CType("VkFormatFeatureFlags2") long value) { VkFormatProperties3.set_linearTilingFeatures(this.segment(), value); return this; } + + /// {@return `optimalTilingFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags2") long get_optimalTilingFeatures(MemorySegment segment, long index) { return (long) VH_optimalTilingFeatures.get(segment, 0L, index); } + /// {@return `optimalTilingFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags2") long get_optimalTilingFeatures(MemorySegment segment) { return VkFormatProperties3.get_optimalTilingFeatures(segment, 0L); } + /// {@return `optimalTilingFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags2") long optimalTilingFeaturesAt(long index) { return VkFormatProperties3.get_optimalTilingFeatures(this.segment(), index); } + /// {@return `optimalTilingFeatures`} + public @CType("VkFormatFeatureFlags2") long optimalTilingFeatures() { return VkFormatProperties3.get_optimalTilingFeatures(this.segment()); } + /// Sets `optimalTilingFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_optimalTilingFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags2") long value) { VH_optimalTilingFeatures.set(segment, 0L, index, value); } + /// Sets `optimalTilingFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_optimalTilingFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags2") long value) { VkFormatProperties3.set_optimalTilingFeatures(segment, 0L, value); } + /// Sets `optimalTilingFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties3 optimalTilingFeaturesAt(long index, @CType("VkFormatFeatureFlags2") long value) { VkFormatProperties3.set_optimalTilingFeatures(this.segment(), index, value); return this; } + /// Sets `optimalTilingFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties3 optimalTilingFeatures(@CType("VkFormatFeatureFlags2") long value) { VkFormatProperties3.set_optimalTilingFeatures(this.segment(), value); return this; } + + /// {@return `bufferFeatures` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormatFeatureFlags2") long get_bufferFeatures(MemorySegment segment, long index) { return (long) VH_bufferFeatures.get(segment, 0L, index); } + /// {@return `bufferFeatures`} + /// @param segment the segment of the struct + public static @CType("VkFormatFeatureFlags2") long get_bufferFeatures(MemorySegment segment) { return VkFormatProperties3.get_bufferFeatures(segment, 0L); } + /// {@return `bufferFeatures` at the given index} + /// @param index the index + public @CType("VkFormatFeatureFlags2") long bufferFeaturesAt(long index) { return VkFormatProperties3.get_bufferFeatures(this.segment(), index); } + /// {@return `bufferFeatures`} + public @CType("VkFormatFeatureFlags2") long bufferFeatures() { return VkFormatProperties3.get_bufferFeatures(this.segment()); } + /// Sets `bufferFeatures` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferFeatures(MemorySegment segment, long index, @CType("VkFormatFeatureFlags2") long value) { VH_bufferFeatures.set(segment, 0L, index, value); } + /// Sets `bufferFeatures` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferFeatures(MemorySegment segment, @CType("VkFormatFeatureFlags2") long value) { VkFormatProperties3.set_bufferFeatures(segment, 0L, value); } + /// Sets `bufferFeatures` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFormatProperties3 bufferFeaturesAt(long index, @CType("VkFormatFeatureFlags2") long value) { VkFormatProperties3.set_bufferFeatures(this.segment(), index, value); return this; } + /// Sets `bufferFeatures` with the given value. + /// @param value the value + /// @return `this` + public VkFormatProperties3 bufferFeatures(@CType("VkFormatFeatureFlags2") long value) { VkFormatProperties3.set_bufferFeatures(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFramebufferAttachmentImageInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFramebufferAttachmentImageInfo.java new file mode 100644 index 00000000..99a549b4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFramebufferAttachmentImageInfo.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ### width +/// [VarHandle][#VH_width] - [Getter][#width()] - [Setter][#width(int)] +/// ### height +/// [VarHandle][#VH_height] - [Getter][#height()] - [Setter][#height(int)] +/// ### layerCount +/// [VarHandle][#VH_layerCount] - [Getter][#layerCount()] - [Setter][#layerCount(int)] +/// ### viewFormatCount +/// [VarHandle][#VH_viewFormatCount] - [Getter][#viewFormatCount()] - [Setter][#viewFormatCount(int)] +/// ### pViewFormats +/// [VarHandle][#VH_pViewFormats] - [Getter][#pViewFormats()] - [Setter][#pViewFormats(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFramebufferAttachmentImageInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageCreateFlags flags; +/// VkImageUsageFlags usage; +/// uint32_t width; +/// uint32_t height; +/// uint32_t layerCount; +/// uint32_t viewFormatCount; +/// const VkFormat * pViewFormats; +/// } VkFramebufferAttachmentImageInfo; +/// ``` +public final class VkFramebufferAttachmentImageInfo extends Struct { + /// The struct layout of `VkFramebufferAttachmentImageInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("usage"), + ValueLayout.JAVA_INT.withName("width"), + ValueLayout.JAVA_INT.withName("height"), + ValueLayout.JAVA_INT.withName("layerCount"), + ValueLayout.JAVA_INT.withName("viewFormatCount"), + ValueLayout.ADDRESS.withName("pViewFormats") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + /// The [VarHandle] of `width` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_width = LAYOUT.arrayElementVarHandle(PathElement.groupElement("width")); + /// The [VarHandle] of `height` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_height = LAYOUT.arrayElementVarHandle(PathElement.groupElement("height")); + /// The [VarHandle] of `layerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layerCount")); + /// The [VarHandle] of `viewFormatCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewFormatCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewFormatCount")); + /// The [VarHandle] of `pViewFormats` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pViewFormats = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pViewFormats")); + + /// Creates `VkFramebufferAttachmentImageInfo` with the given segment. + /// @param segment the memory segment + public VkFramebufferAttachmentImageInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFramebufferAttachmentImageInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferAttachmentImageInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferAttachmentImageInfo(segment); } + + /// Creates `VkFramebufferAttachmentImageInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferAttachmentImageInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferAttachmentImageInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFramebufferAttachmentImageInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferAttachmentImageInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferAttachmentImageInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFramebufferAttachmentImageInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFramebufferAttachmentImageInfo` + public static VkFramebufferAttachmentImageInfo alloc(SegmentAllocator allocator) { return new VkFramebufferAttachmentImageInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFramebufferAttachmentImageInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFramebufferAttachmentImageInfo` + public static VkFramebufferAttachmentImageInfo alloc(SegmentAllocator allocator, long count) { return new VkFramebufferAttachmentImageInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFramebufferAttachmentImageInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFramebufferAttachmentImageInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFramebufferAttachmentImageInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFramebufferAttachmentImageInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkFramebufferAttachmentImageInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo sType(@CType("VkStructureType") int value) { VkFramebufferAttachmentImageInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFramebufferAttachmentImageInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFramebufferAttachmentImageInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkFramebufferAttachmentImageInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentImageInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentImageInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentImageInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkImageCreateFlags") int get_flags(MemorySegment segment) { return VkFramebufferAttachmentImageInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkImageCreateFlags") int flagsAt(long index) { return VkFramebufferAttachmentImageInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkImageCreateFlags") int flags() { return VkFramebufferAttachmentImageInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkImageCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkImageCreateFlags") int value) { VkFramebufferAttachmentImageInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo flagsAt(long index, @CType("VkImageCreateFlags") int value) { VkFramebufferAttachmentImageInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo flags(@CType("VkImageCreateFlags") int value) { VkFramebufferAttachmentImageInfo.set_flags(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_usage(MemorySegment segment) { return VkFramebufferAttachmentImageInfo.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int usageAt(long index) { return VkFramebufferAttachmentImageInfo.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkImageUsageFlags") int usage() { return VkFramebufferAttachmentImageInfo.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkFramebufferAttachmentImageInfo.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo usageAt(long index, @CType("VkImageUsageFlags") int value) { VkFramebufferAttachmentImageInfo.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo usage(@CType("VkImageUsageFlags") int value) { VkFramebufferAttachmentImageInfo.set_usage(this.segment(), value); return this; } + + /// {@return `width` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_width(MemorySegment segment, long index) { return (int) VH_width.get(segment, 0L, index); } + /// {@return `width`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_width(MemorySegment segment) { return VkFramebufferAttachmentImageInfo.get_width(segment, 0L); } + /// {@return `width` at the given index} + /// @param index the index + public @CType("uint32_t") int widthAt(long index) { return VkFramebufferAttachmentImageInfo.get_width(this.segment(), index); } + /// {@return `width`} + public @CType("uint32_t") int width() { return VkFramebufferAttachmentImageInfo.get_width(this.segment()); } + /// Sets `width` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_width(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_width.set(segment, 0L, index, value); } + /// Sets `width` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_width(MemorySegment segment, @CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_width(segment, 0L, value); } + /// Sets `width` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo widthAt(long index, @CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_width(this.segment(), index, value); return this; } + /// Sets `width` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo width(@CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_width(this.segment(), value); return this; } + + /// {@return `height` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_height(MemorySegment segment, long index) { return (int) VH_height.get(segment, 0L, index); } + /// {@return `height`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_height(MemorySegment segment) { return VkFramebufferAttachmentImageInfo.get_height(segment, 0L); } + /// {@return `height` at the given index} + /// @param index the index + public @CType("uint32_t") int heightAt(long index) { return VkFramebufferAttachmentImageInfo.get_height(this.segment(), index); } + /// {@return `height`} + public @CType("uint32_t") int height() { return VkFramebufferAttachmentImageInfo.get_height(this.segment()); } + /// Sets `height` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_height(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_height.set(segment, 0L, index, value); } + /// Sets `height` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_height(MemorySegment segment, @CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_height(segment, 0L, value); } + /// Sets `height` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo heightAt(long index, @CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_height(this.segment(), index, value); return this; } + /// Sets `height` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo height(@CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_height(this.segment(), value); return this; } + + /// {@return `layerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_layerCount(MemorySegment segment, long index) { return (int) VH_layerCount.get(segment, 0L, index); } + /// {@return `layerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_layerCount(MemorySegment segment) { return VkFramebufferAttachmentImageInfo.get_layerCount(segment, 0L); } + /// {@return `layerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int layerCountAt(long index) { return VkFramebufferAttachmentImageInfo.get_layerCount(this.segment(), index); } + /// {@return `layerCount`} + public @CType("uint32_t") int layerCount() { return VkFramebufferAttachmentImageInfo.get_layerCount(this.segment()); } + /// Sets `layerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_layerCount.set(segment, 0L, index, value); } + /// Sets `layerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layerCount(MemorySegment segment, @CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_layerCount(segment, 0L, value); } + /// Sets `layerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo layerCountAt(long index, @CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_layerCount(this.segment(), index, value); return this; } + /// Sets `layerCount` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo layerCount(@CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_layerCount(this.segment(), value); return this; } + + /// {@return `viewFormatCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewFormatCount(MemorySegment segment, long index) { return (int) VH_viewFormatCount.get(segment, 0L, index); } + /// {@return `viewFormatCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewFormatCount(MemorySegment segment) { return VkFramebufferAttachmentImageInfo.get_viewFormatCount(segment, 0L); } + /// {@return `viewFormatCount` at the given index} + /// @param index the index + public @CType("uint32_t") int viewFormatCountAt(long index) { return VkFramebufferAttachmentImageInfo.get_viewFormatCount(this.segment(), index); } + /// {@return `viewFormatCount`} + public @CType("uint32_t") int viewFormatCount() { return VkFramebufferAttachmentImageInfo.get_viewFormatCount(this.segment()); } + /// Sets `viewFormatCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewFormatCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewFormatCount.set(segment, 0L, index, value); } + /// Sets `viewFormatCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewFormatCount(MemorySegment segment, @CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_viewFormatCount(segment, 0L, value); } + /// Sets `viewFormatCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo viewFormatCountAt(long index, @CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_viewFormatCount(this.segment(), index, value); return this; } + /// Sets `viewFormatCount` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo viewFormatCount(@CType("uint32_t") int value) { VkFramebufferAttachmentImageInfo.set_viewFormatCount(this.segment(), value); return this; } + + /// {@return `pViewFormats` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkFormat *") java.lang.foreign.MemorySegment get_pViewFormats(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pViewFormats.get(segment, 0L, index); } + /// {@return `pViewFormats`} + /// @param segment the segment of the struct + public static @CType("const VkFormat *") java.lang.foreign.MemorySegment get_pViewFormats(MemorySegment segment) { return VkFramebufferAttachmentImageInfo.get_pViewFormats(segment, 0L); } + /// {@return `pViewFormats` at the given index} + /// @param index the index + public @CType("const VkFormat *") java.lang.foreign.MemorySegment pViewFormatsAt(long index) { return VkFramebufferAttachmentImageInfo.get_pViewFormats(this.segment(), index); } + /// {@return `pViewFormats`} + public @CType("const VkFormat *") java.lang.foreign.MemorySegment pViewFormats() { return VkFramebufferAttachmentImageInfo.get_pViewFormats(this.segment()); } + /// Sets `pViewFormats` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pViewFormats(MemorySegment segment, long index, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VH_pViewFormats.set(segment, 0L, index, value); } + /// Sets `pViewFormats` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pViewFormats(MemorySegment segment, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentImageInfo.set_pViewFormats(segment, 0L, value); } + /// Sets `pViewFormats` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo pViewFormatsAt(long index, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentImageInfo.set_pViewFormats(this.segment(), index, value); return this; } + /// Sets `pViewFormats` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentImageInfo pViewFormats(@CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentImageInfo.set_pViewFormats(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFramebufferAttachmentsCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFramebufferAttachmentsCreateInfo.java new file mode 100644 index 00000000..f3cee343 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFramebufferAttachmentsCreateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### attachmentImageInfoCount +/// [VarHandle][#VH_attachmentImageInfoCount] - [Getter][#attachmentImageInfoCount()] - [Setter][#attachmentImageInfoCount(int)] +/// ### pAttachmentImageInfos +/// [VarHandle][#VH_pAttachmentImageInfos] - [Getter][#pAttachmentImageInfos()] - [Setter][#pAttachmentImageInfos(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFramebufferAttachmentsCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t attachmentImageInfoCount; +/// const VkFramebufferAttachmentImageInfo * pAttachmentImageInfos; +/// } VkFramebufferAttachmentsCreateInfo; +/// ``` +public final class VkFramebufferAttachmentsCreateInfo extends Struct { + /// The struct layout of `VkFramebufferAttachmentsCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("attachmentImageInfoCount"), + ValueLayout.ADDRESS.withName("pAttachmentImageInfos") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `attachmentImageInfoCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentImageInfoCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentImageInfoCount")); + /// The [VarHandle] of `pAttachmentImageInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttachmentImageInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttachmentImageInfos")); + + /// Creates `VkFramebufferAttachmentsCreateInfo` with the given segment. + /// @param segment the memory segment + public VkFramebufferAttachmentsCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFramebufferAttachmentsCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferAttachmentsCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferAttachmentsCreateInfo(segment); } + + /// Creates `VkFramebufferAttachmentsCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferAttachmentsCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferAttachmentsCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFramebufferAttachmentsCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferAttachmentsCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferAttachmentsCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFramebufferAttachmentsCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFramebufferAttachmentsCreateInfo` + public static VkFramebufferAttachmentsCreateInfo alloc(SegmentAllocator allocator) { return new VkFramebufferAttachmentsCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFramebufferAttachmentsCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFramebufferAttachmentsCreateInfo` + public static VkFramebufferAttachmentsCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkFramebufferAttachmentsCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFramebufferAttachmentsCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFramebufferAttachmentsCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFramebufferAttachmentsCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFramebufferAttachmentsCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentsCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkFramebufferAttachmentsCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentsCreateInfo sType(@CType("VkStructureType") int value) { VkFramebufferAttachmentsCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFramebufferAttachmentsCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFramebufferAttachmentsCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkFramebufferAttachmentsCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentsCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentsCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentsCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentsCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentsCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `attachmentImageInfoCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachmentImageInfoCount(MemorySegment segment, long index) { return (int) VH_attachmentImageInfoCount.get(segment, 0L, index); } + /// {@return `attachmentImageInfoCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachmentImageInfoCount(MemorySegment segment) { return VkFramebufferAttachmentsCreateInfo.get_attachmentImageInfoCount(segment, 0L); } + /// {@return `attachmentImageInfoCount` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentImageInfoCountAt(long index) { return VkFramebufferAttachmentsCreateInfo.get_attachmentImageInfoCount(this.segment(), index); } + /// {@return `attachmentImageInfoCount`} + public @CType("uint32_t") int attachmentImageInfoCount() { return VkFramebufferAttachmentsCreateInfo.get_attachmentImageInfoCount(this.segment()); } + /// Sets `attachmentImageInfoCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentImageInfoCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachmentImageInfoCount.set(segment, 0L, index, value); } + /// Sets `attachmentImageInfoCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentImageInfoCount(MemorySegment segment, @CType("uint32_t") int value) { VkFramebufferAttachmentsCreateInfo.set_attachmentImageInfoCount(segment, 0L, value); } + /// Sets `attachmentImageInfoCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentsCreateInfo attachmentImageInfoCountAt(long index, @CType("uint32_t") int value) { VkFramebufferAttachmentsCreateInfo.set_attachmentImageInfoCount(this.segment(), index, value); return this; } + /// Sets `attachmentImageInfoCount` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentsCreateInfo attachmentImageInfoCount(@CType("uint32_t") int value) { VkFramebufferAttachmentsCreateInfo.set_attachmentImageInfoCount(this.segment(), value); return this; } + + /// {@return `pAttachmentImageInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkFramebufferAttachmentImageInfo *") java.lang.foreign.MemorySegment get_pAttachmentImageInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttachmentImageInfos.get(segment, 0L, index); } + /// {@return `pAttachmentImageInfos`} + /// @param segment the segment of the struct + public static @CType("const VkFramebufferAttachmentImageInfo *") java.lang.foreign.MemorySegment get_pAttachmentImageInfos(MemorySegment segment) { return VkFramebufferAttachmentsCreateInfo.get_pAttachmentImageInfos(segment, 0L); } + /// {@return `pAttachmentImageInfos` at the given index} + /// @param index the index + public @CType("const VkFramebufferAttachmentImageInfo *") java.lang.foreign.MemorySegment pAttachmentImageInfosAt(long index) { return VkFramebufferAttachmentsCreateInfo.get_pAttachmentImageInfos(this.segment(), index); } + /// {@return `pAttachmentImageInfos`} + public @CType("const VkFramebufferAttachmentImageInfo *") java.lang.foreign.MemorySegment pAttachmentImageInfos() { return VkFramebufferAttachmentsCreateInfo.get_pAttachmentImageInfos(this.segment()); } + /// Sets `pAttachmentImageInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttachmentImageInfos(MemorySegment segment, long index, @CType("const VkFramebufferAttachmentImageInfo *") java.lang.foreign.MemorySegment value) { VH_pAttachmentImageInfos.set(segment, 0L, index, value); } + /// Sets `pAttachmentImageInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttachmentImageInfos(MemorySegment segment, @CType("const VkFramebufferAttachmentImageInfo *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentsCreateInfo.set_pAttachmentImageInfos(segment, 0L, value); } + /// Sets `pAttachmentImageInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentsCreateInfo pAttachmentImageInfosAt(long index, @CType("const VkFramebufferAttachmentImageInfo *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentsCreateInfo.set_pAttachmentImageInfos(this.segment(), index, value); return this; } + /// Sets `pAttachmentImageInfos` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferAttachmentsCreateInfo pAttachmentImageInfos(@CType("const VkFramebufferAttachmentImageInfo *") java.lang.foreign.MemorySegment value) { VkFramebufferAttachmentsCreateInfo.set_pAttachmentImageInfos(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFramebufferCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFramebufferCreateInfo.java new file mode 100644 index 00000000..7dbfc47b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkFramebufferCreateInfo.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### renderPass +/// [VarHandle][#VH_renderPass] - [Getter][#renderPass()] - [Setter][#renderPass(java.lang.foreign.MemorySegment)] +/// ### attachmentCount +/// [VarHandle][#VH_attachmentCount] - [Getter][#attachmentCount()] - [Setter][#attachmentCount(int)] +/// ### pAttachments +/// [VarHandle][#VH_pAttachments] - [Getter][#pAttachments()] - [Setter][#pAttachments(java.lang.foreign.MemorySegment)] +/// ### width +/// [VarHandle][#VH_width] - [Getter][#width()] - [Setter][#width(int)] +/// ### height +/// [VarHandle][#VH_height] - [Getter][#height()] - [Setter][#height(int)] +/// ### layers +/// [VarHandle][#VH_layers] - [Getter][#layers()] - [Setter][#layers(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkFramebufferCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkFramebufferCreateFlags flags; +/// VkRenderPass renderPass; +/// uint32_t attachmentCount; +/// const VkImageView * pAttachments; +/// uint32_t width; +/// uint32_t height; +/// uint32_t layers; +/// } VkFramebufferCreateInfo; +/// ``` +public final class VkFramebufferCreateInfo extends Struct { + /// The struct layout of `VkFramebufferCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("renderPass"), + ValueLayout.JAVA_INT.withName("attachmentCount"), + ValueLayout.ADDRESS.withName("pAttachments"), + ValueLayout.JAVA_INT.withName("width"), + ValueLayout.JAVA_INT.withName("height"), + ValueLayout.JAVA_INT.withName("layers") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `renderPass` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_renderPass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderPass")); + /// The [VarHandle] of `attachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentCount")); + /// The [VarHandle] of `pAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttachments")); + /// The [VarHandle] of `width` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_width = LAYOUT.arrayElementVarHandle(PathElement.groupElement("width")); + /// The [VarHandle] of `height` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_height = LAYOUT.arrayElementVarHandle(PathElement.groupElement("height")); + /// The [VarHandle] of `layers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layers")); + + /// Creates `VkFramebufferCreateInfo` with the given segment. + /// @param segment the memory segment + public VkFramebufferCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkFramebufferCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferCreateInfo(segment); } + + /// Creates `VkFramebufferCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkFramebufferCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkFramebufferCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkFramebufferCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkFramebufferCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkFramebufferCreateInfo` + public static VkFramebufferCreateInfo alloc(SegmentAllocator allocator) { return new VkFramebufferCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkFramebufferCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkFramebufferCreateInfo` + public static VkFramebufferCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkFramebufferCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkFramebufferCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkFramebufferCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkFramebufferCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkFramebufferCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkFramebufferCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo sType(@CType("VkStructureType") int value) { VkFramebufferCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkFramebufferCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkFramebufferCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkFramebufferCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFramebufferCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkFramebufferCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkFramebufferCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFramebufferCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkFramebufferCreateFlags") int get_flags(MemorySegment segment) { return VkFramebufferCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkFramebufferCreateFlags") int flagsAt(long index) { return VkFramebufferCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkFramebufferCreateFlags") int flags() { return VkFramebufferCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkFramebufferCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkFramebufferCreateFlags") int value) { VkFramebufferCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo flagsAt(long index, @CType("VkFramebufferCreateFlags") int value) { VkFramebufferCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo flags(@CType("VkFramebufferCreateFlags") int value) { VkFramebufferCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `renderPass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderPass") java.lang.foreign.MemorySegment get_renderPass(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_renderPass.get(segment, 0L, index); } + /// {@return `renderPass`} + /// @param segment the segment of the struct + public static @CType("VkRenderPass") java.lang.foreign.MemorySegment get_renderPass(MemorySegment segment) { return VkFramebufferCreateInfo.get_renderPass(segment, 0L); } + /// {@return `renderPass` at the given index} + /// @param index the index + public @CType("VkRenderPass") java.lang.foreign.MemorySegment renderPassAt(long index) { return VkFramebufferCreateInfo.get_renderPass(this.segment(), index); } + /// {@return `renderPass`} + public @CType("VkRenderPass") java.lang.foreign.MemorySegment renderPass() { return VkFramebufferCreateInfo.get_renderPass(this.segment()); } + /// Sets `renderPass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderPass(MemorySegment segment, long index, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VH_renderPass.set(segment, 0L, index, value); } + /// Sets `renderPass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderPass(MemorySegment segment, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkFramebufferCreateInfo.set_renderPass(segment, 0L, value); } + /// Sets `renderPass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo renderPassAt(long index, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkFramebufferCreateInfo.set_renderPass(this.segment(), index, value); return this; } + /// Sets `renderPass` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo renderPass(@CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkFramebufferCreateInfo.set_renderPass(this.segment(), value); return this; } + + /// {@return `attachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment, long index) { return (int) VH_attachmentCount.get(segment, 0L, index); } + /// {@return `attachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment) { return VkFramebufferCreateInfo.get_attachmentCount(segment, 0L); } + /// {@return `attachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentCountAt(long index) { return VkFramebufferCreateInfo.get_attachmentCount(this.segment(), index); } + /// {@return `attachmentCount`} + public @CType("uint32_t") int attachmentCount() { return VkFramebufferCreateInfo.get_attachmentCount(this.segment()); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachmentCount.set(segment, 0L, index, value); } + /// Sets `attachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkFramebufferCreateInfo.set_attachmentCount(segment, 0L, value); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo attachmentCountAt(long index, @CType("uint32_t") int value) { VkFramebufferCreateInfo.set_attachmentCount(this.segment(), index, value); return this; } + /// Sets `attachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo attachmentCount(@CType("uint32_t") int value) { VkFramebufferCreateInfo.set_attachmentCount(this.segment(), value); return this; } + + /// {@return `pAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageView *") java.lang.foreign.MemorySegment get_pAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttachments.get(segment, 0L, index); } + /// {@return `pAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkImageView *") java.lang.foreign.MemorySegment get_pAttachments(MemorySegment segment) { return VkFramebufferCreateInfo.get_pAttachments(segment, 0L); } + /// {@return `pAttachments` at the given index} + /// @param index the index + public @CType("const VkImageView *") java.lang.foreign.MemorySegment pAttachmentsAt(long index) { return VkFramebufferCreateInfo.get_pAttachments(this.segment(), index); } + /// {@return `pAttachments`} + public @CType("const VkImageView *") java.lang.foreign.MemorySegment pAttachments() { return VkFramebufferCreateInfo.get_pAttachments(this.segment()); } + /// Sets `pAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttachments(MemorySegment segment, long index, @CType("const VkImageView *") java.lang.foreign.MemorySegment value) { VH_pAttachments.set(segment, 0L, index, value); } + /// Sets `pAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttachments(MemorySegment segment, @CType("const VkImageView *") java.lang.foreign.MemorySegment value) { VkFramebufferCreateInfo.set_pAttachments(segment, 0L, value); } + /// Sets `pAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo pAttachmentsAt(long index, @CType("const VkImageView *") java.lang.foreign.MemorySegment value) { VkFramebufferCreateInfo.set_pAttachments(this.segment(), index, value); return this; } + /// Sets `pAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo pAttachments(@CType("const VkImageView *") java.lang.foreign.MemorySegment value) { VkFramebufferCreateInfo.set_pAttachments(this.segment(), value); return this; } + + /// {@return `width` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_width(MemorySegment segment, long index) { return (int) VH_width.get(segment, 0L, index); } + /// {@return `width`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_width(MemorySegment segment) { return VkFramebufferCreateInfo.get_width(segment, 0L); } + /// {@return `width` at the given index} + /// @param index the index + public @CType("uint32_t") int widthAt(long index) { return VkFramebufferCreateInfo.get_width(this.segment(), index); } + /// {@return `width`} + public @CType("uint32_t") int width() { return VkFramebufferCreateInfo.get_width(this.segment()); } + /// Sets `width` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_width(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_width.set(segment, 0L, index, value); } + /// Sets `width` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_width(MemorySegment segment, @CType("uint32_t") int value) { VkFramebufferCreateInfo.set_width(segment, 0L, value); } + /// Sets `width` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo widthAt(long index, @CType("uint32_t") int value) { VkFramebufferCreateInfo.set_width(this.segment(), index, value); return this; } + /// Sets `width` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo width(@CType("uint32_t") int value) { VkFramebufferCreateInfo.set_width(this.segment(), value); return this; } + + /// {@return `height` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_height(MemorySegment segment, long index) { return (int) VH_height.get(segment, 0L, index); } + /// {@return `height`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_height(MemorySegment segment) { return VkFramebufferCreateInfo.get_height(segment, 0L); } + /// {@return `height` at the given index} + /// @param index the index + public @CType("uint32_t") int heightAt(long index) { return VkFramebufferCreateInfo.get_height(this.segment(), index); } + /// {@return `height`} + public @CType("uint32_t") int height() { return VkFramebufferCreateInfo.get_height(this.segment()); } + /// Sets `height` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_height(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_height.set(segment, 0L, index, value); } + /// Sets `height` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_height(MemorySegment segment, @CType("uint32_t") int value) { VkFramebufferCreateInfo.set_height(segment, 0L, value); } + /// Sets `height` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo heightAt(long index, @CType("uint32_t") int value) { VkFramebufferCreateInfo.set_height(this.segment(), index, value); return this; } + /// Sets `height` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo height(@CType("uint32_t") int value) { VkFramebufferCreateInfo.set_height(this.segment(), value); return this; } + + /// {@return `layers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_layers(MemorySegment segment, long index) { return (int) VH_layers.get(segment, 0L, index); } + /// {@return `layers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_layers(MemorySegment segment) { return VkFramebufferCreateInfo.get_layers(segment, 0L); } + /// {@return `layers` at the given index} + /// @param index the index + public @CType("uint32_t") int layersAt(long index) { return VkFramebufferCreateInfo.get_layers(this.segment(), index); } + /// {@return `layers`} + public @CType("uint32_t") int layers() { return VkFramebufferCreateInfo.get_layers(this.segment()); } + /// Sets `layers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_layers.set(segment, 0L, index, value); } + /// Sets `layers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layers(MemorySegment segment, @CType("uint32_t") int value) { VkFramebufferCreateInfo.set_layers(segment, 0L, value); } + /// Sets `layers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo layersAt(long index, @CType("uint32_t") int value) { VkFramebufferCreateInfo.set_layers(this.segment(), index, value); return this; } + /// Sets `layers` with the given value. + /// @param value the value + /// @return `this` + public VkFramebufferCreateInfo layers(@CType("uint32_t") int value) { VkFramebufferCreateInfo.set_layers(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkGraphicsPipelineCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkGraphicsPipelineCreateInfo.java new file mode 100644 index 00000000..6073a296 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkGraphicsPipelineCreateInfo.java @@ -0,0 +1,777 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### stageCount +/// [VarHandle][#VH_stageCount] - [Getter][#stageCount()] - [Setter][#stageCount(int)] +/// ### pStages +/// [VarHandle][#VH_pStages] - [Getter][#pStages()] - [Setter][#pStages(java.lang.foreign.MemorySegment)] +/// ### pVertexInputState +/// [VarHandle][#VH_pVertexInputState] - [Getter][#pVertexInputState()] - [Setter][#pVertexInputState(java.lang.foreign.MemorySegment)] +/// ### pInputAssemblyState +/// [VarHandle][#VH_pInputAssemblyState] - [Getter][#pInputAssemblyState()] - [Setter][#pInputAssemblyState(java.lang.foreign.MemorySegment)] +/// ### pTessellationState +/// [VarHandle][#VH_pTessellationState] - [Getter][#pTessellationState()] - [Setter][#pTessellationState(java.lang.foreign.MemorySegment)] +/// ### pViewportState +/// [VarHandle][#VH_pViewportState] - [Getter][#pViewportState()] - [Setter][#pViewportState(java.lang.foreign.MemorySegment)] +/// ### pRasterizationState +/// [VarHandle][#VH_pRasterizationState] - [Getter][#pRasterizationState()] - [Setter][#pRasterizationState(java.lang.foreign.MemorySegment)] +/// ### pMultisampleState +/// [VarHandle][#VH_pMultisampleState] - [Getter][#pMultisampleState()] - [Setter][#pMultisampleState(java.lang.foreign.MemorySegment)] +/// ### pDepthStencilState +/// [VarHandle][#VH_pDepthStencilState] - [Getter][#pDepthStencilState()] - [Setter][#pDepthStencilState(java.lang.foreign.MemorySegment)] +/// ### pColorBlendState +/// [VarHandle][#VH_pColorBlendState] - [Getter][#pColorBlendState()] - [Setter][#pColorBlendState(java.lang.foreign.MemorySegment)] +/// ### pDynamicState +/// [VarHandle][#VH_pDynamicState] - [Getter][#pDynamicState()] - [Setter][#pDynamicState(java.lang.foreign.MemorySegment)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### renderPass +/// [VarHandle][#VH_renderPass] - [Getter][#renderPass()] - [Setter][#renderPass(java.lang.foreign.MemorySegment)] +/// ### subpass +/// [VarHandle][#VH_subpass] - [Getter][#subpass()] - [Setter][#subpass(int)] +/// ### basePipelineHandle +/// [VarHandle][#VH_basePipelineHandle] - [Getter][#basePipelineHandle()] - [Setter][#basePipelineHandle(java.lang.foreign.MemorySegment)] +/// ### basePipelineIndex +/// [VarHandle][#VH_basePipelineIndex] - [Getter][#basePipelineIndex()] - [Setter][#basePipelineIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkGraphicsPipelineCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCreateFlags flags; +/// uint32_t stageCount; +/// const VkPipelineShaderStageCreateInfo * pStages; +/// const VkPipelineVertexInputStateCreateInfo * pVertexInputState; +/// const VkPipelineInputAssemblyStateCreateInfo * pInputAssemblyState; +/// const VkPipelineTessellationStateCreateInfo * pTessellationState; +/// const VkPipelineViewportStateCreateInfo * pViewportState; +/// const VkPipelineRasterizationStateCreateInfo * pRasterizationState; +/// const VkPipelineMultisampleStateCreateInfo * pMultisampleState; +/// const VkPipelineDepthStencilStateCreateInfo * pDepthStencilState; +/// const VkPipelineColorBlendStateCreateInfo * pColorBlendState; +/// const VkPipelineDynamicStateCreateInfo * pDynamicState; +/// VkPipelineLayout layout; +/// VkRenderPass renderPass; +/// uint32_t subpass; +/// VkPipeline basePipelineHandle; +/// int32_t basePipelineIndex; +/// } VkGraphicsPipelineCreateInfo; +/// ``` +public final class VkGraphicsPipelineCreateInfo extends Struct { + /// The struct layout of `VkGraphicsPipelineCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("stageCount"), + ValueLayout.ADDRESS.withName("pStages"), + ValueLayout.ADDRESS.withName("pVertexInputState"), + ValueLayout.ADDRESS.withName("pInputAssemblyState"), + ValueLayout.ADDRESS.withName("pTessellationState"), + ValueLayout.ADDRESS.withName("pViewportState"), + ValueLayout.ADDRESS.withName("pRasterizationState"), + ValueLayout.ADDRESS.withName("pMultisampleState"), + ValueLayout.ADDRESS.withName("pDepthStencilState"), + ValueLayout.ADDRESS.withName("pColorBlendState"), + ValueLayout.ADDRESS.withName("pDynamicState"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.ADDRESS.withName("renderPass"), + ValueLayout.JAVA_INT.withName("subpass"), + ValueLayout.ADDRESS.withName("basePipelineHandle"), + ValueLayout.JAVA_INT.withName("basePipelineIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `stageCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageCount")); + /// The [VarHandle] of `pStages` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStages")); + /// The [VarHandle] of `pVertexInputState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVertexInputState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVertexInputState")); + /// The [VarHandle] of `pInputAssemblyState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pInputAssemblyState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pInputAssemblyState")); + /// The [VarHandle] of `pTessellationState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTessellationState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTessellationState")); + /// The [VarHandle] of `pViewportState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pViewportState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pViewportState")); + /// The [VarHandle] of `pRasterizationState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRasterizationState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRasterizationState")); + /// The [VarHandle] of `pMultisampleState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pMultisampleState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pMultisampleState")); + /// The [VarHandle] of `pDepthStencilState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDepthStencilState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDepthStencilState")); + /// The [VarHandle] of `pColorBlendState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorBlendState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorBlendState")); + /// The [VarHandle] of `pDynamicState` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDynamicState = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDynamicState")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `renderPass` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_renderPass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderPass")); + /// The [VarHandle] of `subpass` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpass")); + /// The [VarHandle] of `basePipelineHandle` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_basePipelineHandle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("basePipelineHandle")); + /// The [VarHandle] of `basePipelineIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_basePipelineIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("basePipelineIndex")); + + /// Creates `VkGraphicsPipelineCreateInfo` with the given segment. + /// @param segment the memory segment + public VkGraphicsPipelineCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkGraphicsPipelineCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsPipelineCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsPipelineCreateInfo(segment); } + + /// Creates `VkGraphicsPipelineCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsPipelineCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsPipelineCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkGraphicsPipelineCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkGraphicsPipelineCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkGraphicsPipelineCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkGraphicsPipelineCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkGraphicsPipelineCreateInfo` + public static VkGraphicsPipelineCreateInfo alloc(SegmentAllocator allocator) { return new VkGraphicsPipelineCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkGraphicsPipelineCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkGraphicsPipelineCreateInfo` + public static VkGraphicsPipelineCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkGraphicsPipelineCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkGraphicsPipelineCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkGraphicsPipelineCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkGraphicsPipelineCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkGraphicsPipelineCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo sType(@CType("VkStructureType") int value) { VkGraphicsPipelineCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkGraphicsPipelineCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkGraphicsPipelineCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCreateFlags") int get_flags(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCreateFlags") int flagsAt(long index) { return VkGraphicsPipelineCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCreateFlags") int flags() { return VkGraphicsPipelineCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCreateFlags") int value) { VkGraphicsPipelineCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo flagsAt(long index, @CType("VkPipelineCreateFlags") int value) { VkGraphicsPipelineCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo flags(@CType("VkPipelineCreateFlags") int value) { VkGraphicsPipelineCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `stageCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stageCount(MemorySegment segment, long index) { return (int) VH_stageCount.get(segment, 0L, index); } + /// {@return `stageCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stageCount(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_stageCount(segment, 0L); } + /// {@return `stageCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stageCountAt(long index) { return VkGraphicsPipelineCreateInfo.get_stageCount(this.segment(), index); } + /// {@return `stageCount`} + public @CType("uint32_t") int stageCount() { return VkGraphicsPipelineCreateInfo.get_stageCount(this.segment()); } + /// Sets `stageCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stageCount.set(segment, 0L, index, value); } + /// Sets `stageCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageCount(MemorySegment segment, @CType("uint32_t") int value) { VkGraphicsPipelineCreateInfo.set_stageCount(segment, 0L, value); } + /// Sets `stageCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo stageCountAt(long index, @CType("uint32_t") int value) { VkGraphicsPipelineCreateInfo.set_stageCount(this.segment(), index, value); return this; } + /// Sets `stageCount` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo stageCount(@CType("uint32_t") int value) { VkGraphicsPipelineCreateInfo.set_stageCount(this.segment(), value); return this; } + + /// {@return `pStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment get_pStages(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStages.get(segment, 0L, index); } + /// {@return `pStages`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment get_pStages(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pStages(segment, 0L); } + /// {@return `pStages` at the given index} + /// @param index the index + public @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment pStagesAt(long index) { return VkGraphicsPipelineCreateInfo.get_pStages(this.segment(), index); } + /// {@return `pStages`} + public @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment pStages() { return VkGraphicsPipelineCreateInfo.get_pStages(this.segment()); } + /// Sets `pStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStages(MemorySegment segment, long index, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pStages.set(segment, 0L, index, value); } + /// Sets `pStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStages(MemorySegment segment, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pStages(segment, 0L, value); } + /// Sets `pStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pStagesAt(long index, @CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pStages(this.segment(), index, value); return this; } + /// Sets `pStages` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pStages(@CType("const VkPipelineShaderStageCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pStages(this.segment(), value); return this; } + + /// {@return `pVertexInputState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment get_pVertexInputState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVertexInputState.get(segment, 0L, index); } + /// {@return `pVertexInputState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment get_pVertexInputState(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pVertexInputState(segment, 0L); } + /// {@return `pVertexInputState` at the given index} + /// @param index the index + public @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment pVertexInputStateAt(long index) { return VkGraphicsPipelineCreateInfo.get_pVertexInputState(this.segment(), index); } + /// {@return `pVertexInputState`} + public @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment pVertexInputState() { return VkGraphicsPipelineCreateInfo.get_pVertexInputState(this.segment()); } + /// Sets `pVertexInputState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVertexInputState(MemorySegment segment, long index, @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pVertexInputState.set(segment, 0L, index, value); } + /// Sets `pVertexInputState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVertexInputState(MemorySegment segment, @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pVertexInputState(segment, 0L, value); } + /// Sets `pVertexInputState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pVertexInputStateAt(long index, @CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pVertexInputState(this.segment(), index, value); return this; } + /// Sets `pVertexInputState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pVertexInputState(@CType("const VkPipelineVertexInputStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pVertexInputState(this.segment(), value); return this; } + + /// {@return `pInputAssemblyState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineInputAssemblyStateCreateInfo *") java.lang.foreign.MemorySegment get_pInputAssemblyState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pInputAssemblyState.get(segment, 0L, index); } + /// {@return `pInputAssemblyState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineInputAssemblyStateCreateInfo *") java.lang.foreign.MemorySegment get_pInputAssemblyState(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pInputAssemblyState(segment, 0L); } + /// {@return `pInputAssemblyState` at the given index} + /// @param index the index + public @CType("const VkPipelineInputAssemblyStateCreateInfo *") java.lang.foreign.MemorySegment pInputAssemblyStateAt(long index) { return VkGraphicsPipelineCreateInfo.get_pInputAssemblyState(this.segment(), index); } + /// {@return `pInputAssemblyState`} + public @CType("const VkPipelineInputAssemblyStateCreateInfo *") java.lang.foreign.MemorySegment pInputAssemblyState() { return VkGraphicsPipelineCreateInfo.get_pInputAssemblyState(this.segment()); } + /// Sets `pInputAssemblyState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pInputAssemblyState(MemorySegment segment, long index, @CType("const VkPipelineInputAssemblyStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pInputAssemblyState.set(segment, 0L, index, value); } + /// Sets `pInputAssemblyState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pInputAssemblyState(MemorySegment segment, @CType("const VkPipelineInputAssemblyStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pInputAssemblyState(segment, 0L, value); } + /// Sets `pInputAssemblyState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pInputAssemblyStateAt(long index, @CType("const VkPipelineInputAssemblyStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pInputAssemblyState(this.segment(), index, value); return this; } + /// Sets `pInputAssemblyState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pInputAssemblyState(@CType("const VkPipelineInputAssemblyStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pInputAssemblyState(this.segment(), value); return this; } + + /// {@return `pTessellationState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment get_pTessellationState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTessellationState.get(segment, 0L, index); } + /// {@return `pTessellationState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment get_pTessellationState(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pTessellationState(segment, 0L); } + /// {@return `pTessellationState` at the given index} + /// @param index the index + public @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment pTessellationStateAt(long index) { return VkGraphicsPipelineCreateInfo.get_pTessellationState(this.segment(), index); } + /// {@return `pTessellationState`} + public @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment pTessellationState() { return VkGraphicsPipelineCreateInfo.get_pTessellationState(this.segment()); } + /// Sets `pTessellationState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTessellationState(MemorySegment segment, long index, @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pTessellationState.set(segment, 0L, index, value); } + /// Sets `pTessellationState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTessellationState(MemorySegment segment, @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pTessellationState(segment, 0L, value); } + /// Sets `pTessellationState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pTessellationStateAt(long index, @CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pTessellationState(this.segment(), index, value); return this; } + /// Sets `pTessellationState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pTessellationState(@CType("const VkPipelineTessellationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pTessellationState(this.segment(), value); return this; } + + /// {@return `pViewportState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineViewportStateCreateInfo *") java.lang.foreign.MemorySegment get_pViewportState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pViewportState.get(segment, 0L, index); } + /// {@return `pViewportState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineViewportStateCreateInfo *") java.lang.foreign.MemorySegment get_pViewportState(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pViewportState(segment, 0L); } + /// {@return `pViewportState` at the given index} + /// @param index the index + public @CType("const VkPipelineViewportStateCreateInfo *") java.lang.foreign.MemorySegment pViewportStateAt(long index) { return VkGraphicsPipelineCreateInfo.get_pViewportState(this.segment(), index); } + /// {@return `pViewportState`} + public @CType("const VkPipelineViewportStateCreateInfo *") java.lang.foreign.MemorySegment pViewportState() { return VkGraphicsPipelineCreateInfo.get_pViewportState(this.segment()); } + /// Sets `pViewportState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pViewportState(MemorySegment segment, long index, @CType("const VkPipelineViewportStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pViewportState.set(segment, 0L, index, value); } + /// Sets `pViewportState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pViewportState(MemorySegment segment, @CType("const VkPipelineViewportStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pViewportState(segment, 0L, value); } + /// Sets `pViewportState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pViewportStateAt(long index, @CType("const VkPipelineViewportStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pViewportState(this.segment(), index, value); return this; } + /// Sets `pViewportState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pViewportState(@CType("const VkPipelineViewportStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pViewportState(this.segment(), value); return this; } + + /// {@return `pRasterizationState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineRasterizationStateCreateInfo *") java.lang.foreign.MemorySegment get_pRasterizationState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRasterizationState.get(segment, 0L, index); } + /// {@return `pRasterizationState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineRasterizationStateCreateInfo *") java.lang.foreign.MemorySegment get_pRasterizationState(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pRasterizationState(segment, 0L); } + /// {@return `pRasterizationState` at the given index} + /// @param index the index + public @CType("const VkPipelineRasterizationStateCreateInfo *") java.lang.foreign.MemorySegment pRasterizationStateAt(long index) { return VkGraphicsPipelineCreateInfo.get_pRasterizationState(this.segment(), index); } + /// {@return `pRasterizationState`} + public @CType("const VkPipelineRasterizationStateCreateInfo *") java.lang.foreign.MemorySegment pRasterizationState() { return VkGraphicsPipelineCreateInfo.get_pRasterizationState(this.segment()); } + /// Sets `pRasterizationState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRasterizationState(MemorySegment segment, long index, @CType("const VkPipelineRasterizationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pRasterizationState.set(segment, 0L, index, value); } + /// Sets `pRasterizationState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRasterizationState(MemorySegment segment, @CType("const VkPipelineRasterizationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pRasterizationState(segment, 0L, value); } + /// Sets `pRasterizationState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pRasterizationStateAt(long index, @CType("const VkPipelineRasterizationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pRasterizationState(this.segment(), index, value); return this; } + /// Sets `pRasterizationState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pRasterizationState(@CType("const VkPipelineRasterizationStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pRasterizationState(this.segment(), value); return this; } + + /// {@return `pMultisampleState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineMultisampleStateCreateInfo *") java.lang.foreign.MemorySegment get_pMultisampleState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pMultisampleState.get(segment, 0L, index); } + /// {@return `pMultisampleState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineMultisampleStateCreateInfo *") java.lang.foreign.MemorySegment get_pMultisampleState(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pMultisampleState(segment, 0L); } + /// {@return `pMultisampleState` at the given index} + /// @param index the index + public @CType("const VkPipelineMultisampleStateCreateInfo *") java.lang.foreign.MemorySegment pMultisampleStateAt(long index) { return VkGraphicsPipelineCreateInfo.get_pMultisampleState(this.segment(), index); } + /// {@return `pMultisampleState`} + public @CType("const VkPipelineMultisampleStateCreateInfo *") java.lang.foreign.MemorySegment pMultisampleState() { return VkGraphicsPipelineCreateInfo.get_pMultisampleState(this.segment()); } + /// Sets `pMultisampleState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pMultisampleState(MemorySegment segment, long index, @CType("const VkPipelineMultisampleStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pMultisampleState.set(segment, 0L, index, value); } + /// Sets `pMultisampleState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pMultisampleState(MemorySegment segment, @CType("const VkPipelineMultisampleStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pMultisampleState(segment, 0L, value); } + /// Sets `pMultisampleState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pMultisampleStateAt(long index, @CType("const VkPipelineMultisampleStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pMultisampleState(this.segment(), index, value); return this; } + /// Sets `pMultisampleState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pMultisampleState(@CType("const VkPipelineMultisampleStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pMultisampleState(this.segment(), value); return this; } + + /// {@return `pDepthStencilState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineDepthStencilStateCreateInfo *") java.lang.foreign.MemorySegment get_pDepthStencilState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDepthStencilState.get(segment, 0L, index); } + /// {@return `pDepthStencilState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineDepthStencilStateCreateInfo *") java.lang.foreign.MemorySegment get_pDepthStencilState(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pDepthStencilState(segment, 0L); } + /// {@return `pDepthStencilState` at the given index} + /// @param index the index + public @CType("const VkPipelineDepthStencilStateCreateInfo *") java.lang.foreign.MemorySegment pDepthStencilStateAt(long index) { return VkGraphicsPipelineCreateInfo.get_pDepthStencilState(this.segment(), index); } + /// {@return `pDepthStencilState`} + public @CType("const VkPipelineDepthStencilStateCreateInfo *") java.lang.foreign.MemorySegment pDepthStencilState() { return VkGraphicsPipelineCreateInfo.get_pDepthStencilState(this.segment()); } + /// Sets `pDepthStencilState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDepthStencilState(MemorySegment segment, long index, @CType("const VkPipelineDepthStencilStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pDepthStencilState.set(segment, 0L, index, value); } + /// Sets `pDepthStencilState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDepthStencilState(MemorySegment segment, @CType("const VkPipelineDepthStencilStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pDepthStencilState(segment, 0L, value); } + /// Sets `pDepthStencilState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pDepthStencilStateAt(long index, @CType("const VkPipelineDepthStencilStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pDepthStencilState(this.segment(), index, value); return this; } + /// Sets `pDepthStencilState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pDepthStencilState(@CType("const VkPipelineDepthStencilStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pDepthStencilState(this.segment(), value); return this; } + + /// {@return `pColorBlendState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineColorBlendStateCreateInfo *") java.lang.foreign.MemorySegment get_pColorBlendState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorBlendState.get(segment, 0L, index); } + /// {@return `pColorBlendState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineColorBlendStateCreateInfo *") java.lang.foreign.MemorySegment get_pColorBlendState(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pColorBlendState(segment, 0L); } + /// {@return `pColorBlendState` at the given index} + /// @param index the index + public @CType("const VkPipelineColorBlendStateCreateInfo *") java.lang.foreign.MemorySegment pColorBlendStateAt(long index) { return VkGraphicsPipelineCreateInfo.get_pColorBlendState(this.segment(), index); } + /// {@return `pColorBlendState`} + public @CType("const VkPipelineColorBlendStateCreateInfo *") java.lang.foreign.MemorySegment pColorBlendState() { return VkGraphicsPipelineCreateInfo.get_pColorBlendState(this.segment()); } + /// Sets `pColorBlendState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorBlendState(MemorySegment segment, long index, @CType("const VkPipelineColorBlendStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pColorBlendState.set(segment, 0L, index, value); } + /// Sets `pColorBlendState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorBlendState(MemorySegment segment, @CType("const VkPipelineColorBlendStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pColorBlendState(segment, 0L, value); } + /// Sets `pColorBlendState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pColorBlendStateAt(long index, @CType("const VkPipelineColorBlendStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pColorBlendState(this.segment(), index, value); return this; } + /// Sets `pColorBlendState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pColorBlendState(@CType("const VkPipelineColorBlendStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pColorBlendState(this.segment(), value); return this; } + + /// {@return `pDynamicState` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment get_pDynamicState(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDynamicState.get(segment, 0L, index); } + /// {@return `pDynamicState`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment get_pDynamicState(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_pDynamicState(segment, 0L); } + /// {@return `pDynamicState` at the given index} + /// @param index the index + public @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment pDynamicStateAt(long index) { return VkGraphicsPipelineCreateInfo.get_pDynamicState(this.segment(), index); } + /// {@return `pDynamicState`} + public @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment pDynamicState() { return VkGraphicsPipelineCreateInfo.get_pDynamicState(this.segment()); } + /// Sets `pDynamicState` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDynamicState(MemorySegment segment, long index, @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment value) { VH_pDynamicState.set(segment, 0L, index, value); } + /// Sets `pDynamicState` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDynamicState(MemorySegment segment, @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pDynamicState(segment, 0L, value); } + /// Sets `pDynamicState` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pDynamicStateAt(long index, @CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pDynamicState(this.segment(), index, value); return this; } + /// Sets `pDynamicState` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo pDynamicState(@CType("const VkPipelineDynamicStateCreateInfo *") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_pDynamicState(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkGraphicsPipelineCreateInfo.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkGraphicsPipelineCreateInfo.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_layout(this.segment(), value); return this; } + + /// {@return `renderPass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderPass") java.lang.foreign.MemorySegment get_renderPass(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_renderPass.get(segment, 0L, index); } + /// {@return `renderPass`} + /// @param segment the segment of the struct + public static @CType("VkRenderPass") java.lang.foreign.MemorySegment get_renderPass(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_renderPass(segment, 0L); } + /// {@return `renderPass` at the given index} + /// @param index the index + public @CType("VkRenderPass") java.lang.foreign.MemorySegment renderPassAt(long index) { return VkGraphicsPipelineCreateInfo.get_renderPass(this.segment(), index); } + /// {@return `renderPass`} + public @CType("VkRenderPass") java.lang.foreign.MemorySegment renderPass() { return VkGraphicsPipelineCreateInfo.get_renderPass(this.segment()); } + /// Sets `renderPass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderPass(MemorySegment segment, long index, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VH_renderPass.set(segment, 0L, index, value); } + /// Sets `renderPass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderPass(MemorySegment segment, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_renderPass(segment, 0L, value); } + /// Sets `renderPass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo renderPassAt(long index, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_renderPass(this.segment(), index, value); return this; } + /// Sets `renderPass` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo renderPass(@CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_renderPass(this.segment(), value); return this; } + + /// {@return `subpass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subpass(MemorySegment segment, long index) { return (int) VH_subpass.get(segment, 0L, index); } + /// {@return `subpass`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subpass(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_subpass(segment, 0L); } + /// {@return `subpass` at the given index} + /// @param index the index + public @CType("uint32_t") int subpassAt(long index) { return VkGraphicsPipelineCreateInfo.get_subpass(this.segment(), index); } + /// {@return `subpass`} + public @CType("uint32_t") int subpass() { return VkGraphicsPipelineCreateInfo.get_subpass(this.segment()); } + /// Sets `subpass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpass(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subpass.set(segment, 0L, index, value); } + /// Sets `subpass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpass(MemorySegment segment, @CType("uint32_t") int value) { VkGraphicsPipelineCreateInfo.set_subpass(segment, 0L, value); } + /// Sets `subpass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo subpassAt(long index, @CType("uint32_t") int value) { VkGraphicsPipelineCreateInfo.set_subpass(this.segment(), index, value); return this; } + /// Sets `subpass` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo subpass(@CType("uint32_t") int value) { VkGraphicsPipelineCreateInfo.set_subpass(this.segment(), value); return this; } + + /// {@return `basePipelineHandle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_basePipelineHandle(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_basePipelineHandle.get(segment, 0L, index); } + /// {@return `basePipelineHandle`} + /// @param segment the segment of the struct + public static @CType("VkPipeline") java.lang.foreign.MemorySegment get_basePipelineHandle(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_basePipelineHandle(segment, 0L); } + /// {@return `basePipelineHandle` at the given index} + /// @param index the index + public @CType("VkPipeline") java.lang.foreign.MemorySegment basePipelineHandleAt(long index) { return VkGraphicsPipelineCreateInfo.get_basePipelineHandle(this.segment(), index); } + /// {@return `basePipelineHandle`} + public @CType("VkPipeline") java.lang.foreign.MemorySegment basePipelineHandle() { return VkGraphicsPipelineCreateInfo.get_basePipelineHandle(this.segment()); } + /// Sets `basePipelineHandle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_basePipelineHandle(MemorySegment segment, long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VH_basePipelineHandle.set(segment, 0L, index, value); } + /// Sets `basePipelineHandle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_basePipelineHandle(MemorySegment segment, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_basePipelineHandle(segment, 0L, value); } + /// Sets `basePipelineHandle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo basePipelineHandleAt(long index, @CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_basePipelineHandle(this.segment(), index, value); return this; } + /// Sets `basePipelineHandle` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo basePipelineHandle(@CType("VkPipeline") java.lang.foreign.MemorySegment value) { VkGraphicsPipelineCreateInfo.set_basePipelineHandle(this.segment(), value); return this; } + + /// {@return `basePipelineIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_basePipelineIndex(MemorySegment segment, long index) { return (int) VH_basePipelineIndex.get(segment, 0L, index); } + /// {@return `basePipelineIndex`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_basePipelineIndex(MemorySegment segment) { return VkGraphicsPipelineCreateInfo.get_basePipelineIndex(segment, 0L); } + /// {@return `basePipelineIndex` at the given index} + /// @param index the index + public @CType("int32_t") int basePipelineIndexAt(long index) { return VkGraphicsPipelineCreateInfo.get_basePipelineIndex(this.segment(), index); } + /// {@return `basePipelineIndex`} + public @CType("int32_t") int basePipelineIndex() { return VkGraphicsPipelineCreateInfo.get_basePipelineIndex(this.segment()); } + /// Sets `basePipelineIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_basePipelineIndex(MemorySegment segment, long index, @CType("int32_t") int value) { VH_basePipelineIndex.set(segment, 0L, index, value); } + /// Sets `basePipelineIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_basePipelineIndex(MemorySegment segment, @CType("int32_t") int value) { VkGraphicsPipelineCreateInfo.set_basePipelineIndex(segment, 0L, value); } + /// Sets `basePipelineIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo basePipelineIndexAt(long index, @CType("int32_t") int value) { VkGraphicsPipelineCreateInfo.set_basePipelineIndex(this.segment(), index, value); return this; } + /// Sets `basePipelineIndex` with the given value. + /// @param value the value + /// @return `this` + public VkGraphicsPipelineCreateInfo basePipelineIndex(@CType("int32_t") int value) { VkGraphicsPipelineCreateInfo.set_basePipelineIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkHostImageCopyDevicePerformanceQuery.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkHostImageCopyDevicePerformanceQuery.java new file mode 100644 index 00000000..776019f0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkHostImageCopyDevicePerformanceQuery.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### optimalDeviceAccess +/// [VarHandle][#VH_optimalDeviceAccess] - [Getter][#optimalDeviceAccess()] - [Setter][#optimalDeviceAccess(int)] +/// ### identicalMemoryLayout +/// [VarHandle][#VH_identicalMemoryLayout] - [Getter][#identicalMemoryLayout()] - [Setter][#identicalMemoryLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkHostImageCopyDevicePerformanceQuery { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 optimalDeviceAccess; +/// VkBool32 identicalMemoryLayout; +/// } VkHostImageCopyDevicePerformanceQuery; +/// ``` +public final class VkHostImageCopyDevicePerformanceQuery extends Struct { + /// The struct layout of `VkHostImageCopyDevicePerformanceQuery`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("optimalDeviceAccess"), + ValueLayout.JAVA_INT.withName("identicalMemoryLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `optimalDeviceAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_optimalDeviceAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("optimalDeviceAccess")); + /// The [VarHandle] of `identicalMemoryLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_identicalMemoryLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("identicalMemoryLayout")); + + /// Creates `VkHostImageCopyDevicePerformanceQuery` with the given segment. + /// @param segment the memory segment + public VkHostImageCopyDevicePerformanceQuery(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkHostImageCopyDevicePerformanceQuery` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkHostImageCopyDevicePerformanceQuery of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkHostImageCopyDevicePerformanceQuery(segment); } + + /// Creates `VkHostImageCopyDevicePerformanceQuery` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkHostImageCopyDevicePerformanceQuery ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkHostImageCopyDevicePerformanceQuery(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkHostImageCopyDevicePerformanceQuery` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkHostImageCopyDevicePerformanceQuery ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkHostImageCopyDevicePerformanceQuery(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkHostImageCopyDevicePerformanceQuery` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkHostImageCopyDevicePerformanceQuery` + public static VkHostImageCopyDevicePerformanceQuery alloc(SegmentAllocator allocator) { return new VkHostImageCopyDevicePerformanceQuery(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkHostImageCopyDevicePerformanceQuery` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkHostImageCopyDevicePerformanceQuery` + public static VkHostImageCopyDevicePerformanceQuery alloc(SegmentAllocator allocator, long count) { return new VkHostImageCopyDevicePerformanceQuery(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkHostImageCopyDevicePerformanceQuery.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkHostImageCopyDevicePerformanceQuery.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkHostImageCopyDevicePerformanceQuery.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkHostImageCopyDevicePerformanceQuery.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHostImageCopyDevicePerformanceQuery sTypeAt(long index, @CType("VkStructureType") int value) { VkHostImageCopyDevicePerformanceQuery.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkHostImageCopyDevicePerformanceQuery sType(@CType("VkStructureType") int value) { VkHostImageCopyDevicePerformanceQuery.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkHostImageCopyDevicePerformanceQuery.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkHostImageCopyDevicePerformanceQuery.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkHostImageCopyDevicePerformanceQuery.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkHostImageCopyDevicePerformanceQuery.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHostImageCopyDevicePerformanceQuery pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkHostImageCopyDevicePerformanceQuery.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkHostImageCopyDevicePerformanceQuery pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkHostImageCopyDevicePerformanceQuery.set_pNext(this.segment(), value); return this; } + + /// {@return `optimalDeviceAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_optimalDeviceAccess(MemorySegment segment, long index) { return (int) VH_optimalDeviceAccess.get(segment, 0L, index); } + /// {@return `optimalDeviceAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_optimalDeviceAccess(MemorySegment segment) { return VkHostImageCopyDevicePerformanceQuery.get_optimalDeviceAccess(segment, 0L); } + /// {@return `optimalDeviceAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int optimalDeviceAccessAt(long index) { return VkHostImageCopyDevicePerformanceQuery.get_optimalDeviceAccess(this.segment(), index); } + /// {@return `optimalDeviceAccess`} + public @CType("VkBool32") int optimalDeviceAccess() { return VkHostImageCopyDevicePerformanceQuery.get_optimalDeviceAccess(this.segment()); } + /// Sets `optimalDeviceAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_optimalDeviceAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_optimalDeviceAccess.set(segment, 0L, index, value); } + /// Sets `optimalDeviceAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_optimalDeviceAccess(MemorySegment segment, @CType("VkBool32") int value) { VkHostImageCopyDevicePerformanceQuery.set_optimalDeviceAccess(segment, 0L, value); } + /// Sets `optimalDeviceAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHostImageCopyDevicePerformanceQuery optimalDeviceAccessAt(long index, @CType("VkBool32") int value) { VkHostImageCopyDevicePerformanceQuery.set_optimalDeviceAccess(this.segment(), index, value); return this; } + /// Sets `optimalDeviceAccess` with the given value. + /// @param value the value + /// @return `this` + public VkHostImageCopyDevicePerformanceQuery optimalDeviceAccess(@CType("VkBool32") int value) { VkHostImageCopyDevicePerformanceQuery.set_optimalDeviceAccess(this.segment(), value); return this; } + + /// {@return `identicalMemoryLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_identicalMemoryLayout(MemorySegment segment, long index) { return (int) VH_identicalMemoryLayout.get(segment, 0L, index); } + /// {@return `identicalMemoryLayout`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_identicalMemoryLayout(MemorySegment segment) { return VkHostImageCopyDevicePerformanceQuery.get_identicalMemoryLayout(segment, 0L); } + /// {@return `identicalMemoryLayout` at the given index} + /// @param index the index + public @CType("VkBool32") int identicalMemoryLayoutAt(long index) { return VkHostImageCopyDevicePerformanceQuery.get_identicalMemoryLayout(this.segment(), index); } + /// {@return `identicalMemoryLayout`} + public @CType("VkBool32") int identicalMemoryLayout() { return VkHostImageCopyDevicePerformanceQuery.get_identicalMemoryLayout(this.segment()); } + /// Sets `identicalMemoryLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_identicalMemoryLayout(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_identicalMemoryLayout.set(segment, 0L, index, value); } + /// Sets `identicalMemoryLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_identicalMemoryLayout(MemorySegment segment, @CType("VkBool32") int value) { VkHostImageCopyDevicePerformanceQuery.set_identicalMemoryLayout(segment, 0L, value); } + /// Sets `identicalMemoryLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHostImageCopyDevicePerformanceQuery identicalMemoryLayoutAt(long index, @CType("VkBool32") int value) { VkHostImageCopyDevicePerformanceQuery.set_identicalMemoryLayout(this.segment(), index, value); return this; } + /// Sets `identicalMemoryLayout` with the given value. + /// @param value the value + /// @return `this` + public VkHostImageCopyDevicePerformanceQuery identicalMemoryLayout(@CType("VkBool32") int value) { VkHostImageCopyDevicePerformanceQuery.set_identicalMemoryLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkHostImageLayoutTransitionInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkHostImageLayoutTransitionInfo.java new file mode 100644 index 00000000..5649a5e9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkHostImageLayoutTransitionInfo.java @@ -0,0 +1,298 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### oldLayout +/// [VarHandle][#VH_oldLayout] - [Getter][#oldLayout()] - [Setter][#oldLayout(int)] +/// ### newLayout +/// [VarHandle][#VH_newLayout] - [Getter][#newLayout()] - [Setter][#newLayout(int)] +/// ### subresourceRange +/// [Byte offset][#OFFSET_subresourceRange] - [Memory layout][#ML_subresourceRange] - [Getter][#subresourceRange()] - [Setter][#subresourceRange(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkHostImageLayoutTransitionInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage image; +/// VkImageLayout oldLayout; +/// VkImageLayout newLayout; +/// VkImageSubresourceRange subresourceRange; +/// } VkHostImageLayoutTransitionInfo; +/// ``` +public final class VkHostImageLayoutTransitionInfo extends Struct { + /// The struct layout of `VkHostImageLayoutTransitionInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("image"), + ValueLayout.JAVA_INT.withName("oldLayout"), + ValueLayout.JAVA_INT.withName("newLayout"), + overrungl.vulkan.struct.VkImageSubresourceRange.LAYOUT.withName("subresourceRange") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The [VarHandle] of `oldLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_oldLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("oldLayout")); + /// The [VarHandle] of `newLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_newLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("newLayout")); + /// The byte offset of `subresourceRange`. + public static final long OFFSET_subresourceRange = LAYOUT.byteOffset(PathElement.groupElement("subresourceRange")); + /// The memory layout of `subresourceRange`. + public static final MemoryLayout ML_subresourceRange = LAYOUT.select(PathElement.groupElement("subresourceRange")); + + /// Creates `VkHostImageLayoutTransitionInfo` with the given segment. + /// @param segment the memory segment + public VkHostImageLayoutTransitionInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkHostImageLayoutTransitionInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkHostImageLayoutTransitionInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkHostImageLayoutTransitionInfo(segment); } + + /// Creates `VkHostImageLayoutTransitionInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkHostImageLayoutTransitionInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkHostImageLayoutTransitionInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkHostImageLayoutTransitionInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkHostImageLayoutTransitionInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkHostImageLayoutTransitionInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkHostImageLayoutTransitionInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkHostImageLayoutTransitionInfo` + public static VkHostImageLayoutTransitionInfo alloc(SegmentAllocator allocator) { return new VkHostImageLayoutTransitionInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkHostImageLayoutTransitionInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkHostImageLayoutTransitionInfo` + public static VkHostImageLayoutTransitionInfo alloc(SegmentAllocator allocator, long count) { return new VkHostImageLayoutTransitionInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkHostImageLayoutTransitionInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkHostImageLayoutTransitionInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkHostImageLayoutTransitionInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkHostImageLayoutTransitionInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkHostImageLayoutTransitionInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo sType(@CType("VkStructureType") int value) { VkHostImageLayoutTransitionInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkHostImageLayoutTransitionInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkHostImageLayoutTransitionInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkHostImageLayoutTransitionInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkHostImageLayoutTransitionInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkHostImageLayoutTransitionInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkHostImageLayoutTransitionInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkHostImageLayoutTransitionInfo.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkHostImageLayoutTransitionInfo.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkHostImageLayoutTransitionInfo.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkHostImageLayoutTransitionInfo.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkHostImageLayoutTransitionInfo.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkHostImageLayoutTransitionInfo.set_image(this.segment(), value); return this; } + + /// {@return `oldLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_oldLayout(MemorySegment segment, long index) { return (int) VH_oldLayout.get(segment, 0L, index); } + /// {@return `oldLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_oldLayout(MemorySegment segment) { return VkHostImageLayoutTransitionInfo.get_oldLayout(segment, 0L); } + /// {@return `oldLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int oldLayoutAt(long index) { return VkHostImageLayoutTransitionInfo.get_oldLayout(this.segment(), index); } + /// {@return `oldLayout`} + public @CType("VkImageLayout") int oldLayout() { return VkHostImageLayoutTransitionInfo.get_oldLayout(this.segment()); } + /// Sets `oldLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_oldLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_oldLayout.set(segment, 0L, index, value); } + /// Sets `oldLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_oldLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkHostImageLayoutTransitionInfo.set_oldLayout(segment, 0L, value); } + /// Sets `oldLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo oldLayoutAt(long index, @CType("VkImageLayout") int value) { VkHostImageLayoutTransitionInfo.set_oldLayout(this.segment(), index, value); return this; } + /// Sets `oldLayout` with the given value. + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo oldLayout(@CType("VkImageLayout") int value) { VkHostImageLayoutTransitionInfo.set_oldLayout(this.segment(), value); return this; } + + /// {@return `newLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_newLayout(MemorySegment segment, long index) { return (int) VH_newLayout.get(segment, 0L, index); } + /// {@return `newLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_newLayout(MemorySegment segment) { return VkHostImageLayoutTransitionInfo.get_newLayout(segment, 0L); } + /// {@return `newLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int newLayoutAt(long index) { return VkHostImageLayoutTransitionInfo.get_newLayout(this.segment(), index); } + /// {@return `newLayout`} + public @CType("VkImageLayout") int newLayout() { return VkHostImageLayoutTransitionInfo.get_newLayout(this.segment()); } + /// Sets `newLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_newLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_newLayout.set(segment, 0L, index, value); } + /// Sets `newLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_newLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkHostImageLayoutTransitionInfo.set_newLayout(segment, 0L, value); } + /// Sets `newLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo newLayoutAt(long index, @CType("VkImageLayout") int value) { VkHostImageLayoutTransitionInfo.set_newLayout(this.segment(), index, value); return this; } + /// Sets `newLayout` with the given value. + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo newLayout(@CType("VkImageLayout") int value) { VkHostImageLayoutTransitionInfo.set_newLayout(this.segment(), value); return this; } + + /// {@return `subresourceRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment get_subresourceRange(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_subresourceRange, index), ML_subresourceRange); } + /// {@return `subresourceRange`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment get_subresourceRange(MemorySegment segment) { return VkHostImageLayoutTransitionInfo.get_subresourceRange(segment, 0L); } + /// {@return `subresourceRange` at the given index} + /// @param index the index + public @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment subresourceRangeAt(long index) { return VkHostImageLayoutTransitionInfo.get_subresourceRange(this.segment(), index); } + /// {@return `subresourceRange`} + public @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment subresourceRange() { return VkHostImageLayoutTransitionInfo.get_subresourceRange(this.segment()); } + /// Sets `subresourceRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subresourceRange(MemorySegment segment, long index, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_subresourceRange, index), ML_subresourceRange.byteSize()); } + /// Sets `subresourceRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subresourceRange(MemorySegment segment, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkHostImageLayoutTransitionInfo.set_subresourceRange(segment, 0L, value); } + /// Sets `subresourceRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo subresourceRangeAt(long index, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkHostImageLayoutTransitionInfo.set_subresourceRange(this.segment(), index, value); return this; } + /// Sets `subresourceRange` with the given value. + /// @param value the value + /// @return `this` + public VkHostImageLayoutTransitionInfo subresourceRange(@CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkHostImageLayoutTransitionInfo.set_subresourceRange(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageBlit.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageBlit.java new file mode 100644 index 00000000..4192d5f2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageBlit.java @@ -0,0 +1,258 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### srcSubresource +/// [Byte offset][#OFFSET_srcSubresource] - [Memory layout][#ML_srcSubresource] - [Getter][#srcSubresource()] - [Setter][#srcSubresource(java.lang.foreign.MemorySegment)] +/// ### srcOffsets +/// [Byte offset handle][#MH_srcOffsets] - [Memory layout][#ML_srcOffsets] - [Getter][#srcOffsets(long)] - [Setter][#srcOffsets(long, java.lang.foreign.MemorySegment)] +/// ### dstSubresource +/// [Byte offset][#OFFSET_dstSubresource] - [Memory layout][#ML_dstSubresource] - [Getter][#dstSubresource()] - [Setter][#dstSubresource(java.lang.foreign.MemorySegment)] +/// ### dstOffsets +/// [Byte offset handle][#MH_dstOffsets] - [Memory layout][#ML_dstOffsets] - [Getter][#dstOffsets(long)] - [Setter][#dstOffsets(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageBlit { +/// VkImageSubresourceLayers srcSubresource; +/// VkOffset3D[2] srcOffsets; +/// VkImageSubresourceLayers dstSubresource; +/// VkOffset3D[2] dstOffsets; +/// } VkImageBlit; +/// ``` +public final class VkImageBlit extends Struct { + /// The struct layout of `VkImageBlit`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("srcSubresource"), + MemoryLayout.sequenceLayout(2, VkOffset3D.LAYOUT).withName("srcOffsets"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("dstSubresource"), + MemoryLayout.sequenceLayout(2, VkOffset3D.LAYOUT).withName("dstOffsets") + ); + /// The byte offset of `srcSubresource`. + public static final long OFFSET_srcSubresource = LAYOUT.byteOffset(PathElement.groupElement("srcSubresource")); + /// The memory layout of `srcSubresource`. + public static final MemoryLayout ML_srcSubresource = LAYOUT.select(PathElement.groupElement("srcSubresource")); + /// The byte offset handle of `srcOffsets` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_srcOffsets = LAYOUT.byteOffsetHandle(PathElement.groupElement("srcOffsets"), PathElement.sequenceElement()); + /// The memory layout of `srcOffsets`. + public static final MemoryLayout ML_srcOffsets = LAYOUT.select(PathElement.groupElement("srcOffsets")); + /// The byte offset of `dstSubresource`. + public static final long OFFSET_dstSubresource = LAYOUT.byteOffset(PathElement.groupElement("dstSubresource")); + /// The memory layout of `dstSubresource`. + public static final MemoryLayout ML_dstSubresource = LAYOUT.select(PathElement.groupElement("dstSubresource")); + /// The byte offset handle of `dstOffsets` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_dstOffsets = LAYOUT.byteOffsetHandle(PathElement.groupElement("dstOffsets"), PathElement.sequenceElement()); + /// The memory layout of `dstOffsets`. + public static final MemoryLayout ML_dstOffsets = LAYOUT.select(PathElement.groupElement("dstOffsets")); + + /// Creates `VkImageBlit` with the given segment. + /// @param segment the memory segment + public VkImageBlit(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageBlit` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageBlit of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageBlit(segment); } + + /// Creates `VkImageBlit` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageBlit ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageBlit(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageBlit` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageBlit ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageBlit(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageBlit` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageBlit` + public static VkImageBlit alloc(SegmentAllocator allocator) { return new VkImageBlit(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageBlit` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageBlit` + public static VkImageBlit alloc(SegmentAllocator allocator, long count) { return new VkImageBlit(allocator.allocate(LAYOUT, count)); } + + /// {@return `srcSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource); } + /// {@return `srcSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment) { return VkImageBlit.get_srcSubresource(segment, 0L); } + /// {@return `srcSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresourceAt(long index) { return VkImageBlit.get_srcSubresource(this.segment(), index); } + /// {@return `srcSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresource() { return VkImageBlit.get_srcSubresource(this.segment()); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource.byteSize()); } + /// Sets `srcSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit.set_srcSubresource(segment, 0L, value); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageBlit srcSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit.set_srcSubresource(this.segment(), index, value); return this; } + /// Sets `srcSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageBlit srcSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit.set_srcSubresource(this.segment(), value); return this; } + + /// {@return `srcOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment get_srcOffsets(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_srcOffsets.invokeExact(0L, elementIndex), index), ML_srcOffsets); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `srcOffsets`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment get_srcOffsets(MemorySegment segment, long elementIndex) { return VkImageBlit.get_srcOffsets(segment, 0L, elementIndex); } + /// {@return `srcOffsets` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment srcOffsetsAt(long index, long elementIndex) { return VkImageBlit.get_srcOffsets(this.segment(), index, elementIndex); } + /// {@return `srcOffsets`} + /// @param elementIndex the index of the element + public @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment srcOffsets(long elementIndex) { return VkImageBlit.get_srcOffsets(this.segment(), elementIndex); } + /// Sets `srcOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_srcOffsets(MemorySegment segment, long index, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_srcOffsets.invokeExact(0L, elementIndex), index), ML_srcOffsets.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `srcOffsets` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_srcOffsets(MemorySegment segment, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit.set_srcOffsets(segment, 0L, elementIndex, value); } + /// Sets `srcOffsets` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkImageBlit srcOffsetsAt(long index, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit.set_srcOffsets(this.segment(), index, elementIndex, value); return this; } + /// Sets `srcOffsets` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkImageBlit srcOffsets(long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit.set_srcOffsets(this.segment(), elementIndex, value); return this; } + + /// {@return `dstSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource); } + /// {@return `dstSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment) { return VkImageBlit.get_dstSubresource(segment, 0L); } + /// {@return `dstSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresourceAt(long index) { return VkImageBlit.get_dstSubresource(this.segment(), index); } + /// {@return `dstSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresource() { return VkImageBlit.get_dstSubresource(this.segment()); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource.byteSize()); } + /// Sets `dstSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit.set_dstSubresource(segment, 0L, value); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageBlit dstSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit.set_dstSubresource(this.segment(), index, value); return this; } + /// Sets `dstSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageBlit dstSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit.set_dstSubresource(this.segment(), value); return this; } + + /// {@return `dstOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment get_dstOffsets(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_dstOffsets.invokeExact(0L, elementIndex), index), ML_dstOffsets); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `dstOffsets`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment get_dstOffsets(MemorySegment segment, long elementIndex) { return VkImageBlit.get_dstOffsets(segment, 0L, elementIndex); } + /// {@return `dstOffsets` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment dstOffsetsAt(long index, long elementIndex) { return VkImageBlit.get_dstOffsets(this.segment(), index, elementIndex); } + /// {@return `dstOffsets`} + /// @param elementIndex the index of the element + public @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment dstOffsets(long elementIndex) { return VkImageBlit.get_dstOffsets(this.segment(), elementIndex); } + /// Sets `dstOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_dstOffsets(MemorySegment segment, long index, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_dstOffsets.invokeExact(0L, elementIndex), index), ML_dstOffsets.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `dstOffsets` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_dstOffsets(MemorySegment segment, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit.set_dstOffsets(segment, 0L, elementIndex, value); } + /// Sets `dstOffsets` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkImageBlit dstOffsetsAt(long index, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit.set_dstOffsets(this.segment(), index, elementIndex, value); return this; } + /// Sets `dstOffsets` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkImageBlit dstOffsets(long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit.set_dstOffsets(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageBlit2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageBlit2.java new file mode 100644 index 00000000..d95539ee --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageBlit2.java @@ -0,0 +1,332 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcSubresource +/// [Byte offset][#OFFSET_srcSubresource] - [Memory layout][#ML_srcSubresource] - [Getter][#srcSubresource()] - [Setter][#srcSubresource(java.lang.foreign.MemorySegment)] +/// ### srcOffsets +/// [Byte offset handle][#MH_srcOffsets] - [Memory layout][#ML_srcOffsets] - [Getter][#srcOffsets(long)] - [Setter][#srcOffsets(long, java.lang.foreign.MemorySegment)] +/// ### dstSubresource +/// [Byte offset][#OFFSET_dstSubresource] - [Memory layout][#ML_dstSubresource] - [Getter][#dstSubresource()] - [Setter][#dstSubresource(java.lang.foreign.MemorySegment)] +/// ### dstOffsets +/// [Byte offset handle][#MH_dstOffsets] - [Memory layout][#ML_dstOffsets] - [Getter][#dstOffsets(long)] - [Setter][#dstOffsets(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageBlit2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageSubresourceLayers srcSubresource; +/// VkOffset3D[2] srcOffsets; +/// VkImageSubresourceLayers dstSubresource; +/// VkOffset3D[2] dstOffsets; +/// } VkImageBlit2; +/// ``` +public final class VkImageBlit2 extends Struct { + /// The struct layout of `VkImageBlit2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("srcSubresource"), + MemoryLayout.sequenceLayout(2, VkOffset3D.LAYOUT).withName("srcOffsets"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("dstSubresource"), + MemoryLayout.sequenceLayout(2, VkOffset3D.LAYOUT).withName("dstOffsets") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `srcSubresource`. + public static final long OFFSET_srcSubresource = LAYOUT.byteOffset(PathElement.groupElement("srcSubresource")); + /// The memory layout of `srcSubresource`. + public static final MemoryLayout ML_srcSubresource = LAYOUT.select(PathElement.groupElement("srcSubresource")); + /// The byte offset handle of `srcOffsets` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_srcOffsets = LAYOUT.byteOffsetHandle(PathElement.groupElement("srcOffsets"), PathElement.sequenceElement()); + /// The memory layout of `srcOffsets`. + public static final MemoryLayout ML_srcOffsets = LAYOUT.select(PathElement.groupElement("srcOffsets")); + /// The byte offset of `dstSubresource`. + public static final long OFFSET_dstSubresource = LAYOUT.byteOffset(PathElement.groupElement("dstSubresource")); + /// The memory layout of `dstSubresource`. + public static final MemoryLayout ML_dstSubresource = LAYOUT.select(PathElement.groupElement("dstSubresource")); + /// The byte offset handle of `dstOffsets` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_dstOffsets = LAYOUT.byteOffsetHandle(PathElement.groupElement("dstOffsets"), PathElement.sequenceElement()); + /// The memory layout of `dstOffsets`. + public static final MemoryLayout ML_dstOffsets = LAYOUT.select(PathElement.groupElement("dstOffsets")); + + /// Creates `VkImageBlit2` with the given segment. + /// @param segment the memory segment + public VkImageBlit2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageBlit2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageBlit2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageBlit2(segment); } + + /// Creates `VkImageBlit2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageBlit2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageBlit2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageBlit2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageBlit2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageBlit2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageBlit2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageBlit2` + public static VkImageBlit2 alloc(SegmentAllocator allocator) { return new VkImageBlit2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageBlit2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageBlit2` + public static VkImageBlit2 alloc(SegmentAllocator allocator, long count) { return new VkImageBlit2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageBlit2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageBlit2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageBlit2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageBlit2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageBlit2 sTypeAt(long index, @CType("VkStructureType") int value) { VkImageBlit2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageBlit2 sType(@CType("VkStructureType") int value) { VkImageBlit2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageBlit2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageBlit2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageBlit2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageBlit2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageBlit2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource); } + /// {@return `srcSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment) { return VkImageBlit2.get_srcSubresource(segment, 0L); } + /// {@return `srcSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresourceAt(long index) { return VkImageBlit2.get_srcSubresource(this.segment(), index); } + /// {@return `srcSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresource() { return VkImageBlit2.get_srcSubresource(this.segment()); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource.byteSize()); } + /// Sets `srcSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_srcSubresource(segment, 0L, value); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageBlit2 srcSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_srcSubresource(this.segment(), index, value); return this; } + /// Sets `srcSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageBlit2 srcSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_srcSubresource(this.segment(), value); return this; } + + /// {@return `srcOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment get_srcOffsets(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_srcOffsets.invokeExact(0L, elementIndex), index), ML_srcOffsets); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `srcOffsets`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment get_srcOffsets(MemorySegment segment, long elementIndex) { return VkImageBlit2.get_srcOffsets(segment, 0L, elementIndex); } + /// {@return `srcOffsets` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment srcOffsetsAt(long index, long elementIndex) { return VkImageBlit2.get_srcOffsets(this.segment(), index, elementIndex); } + /// {@return `srcOffsets`} + /// @param elementIndex the index of the element + public @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment srcOffsets(long elementIndex) { return VkImageBlit2.get_srcOffsets(this.segment(), elementIndex); } + /// Sets `srcOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_srcOffsets(MemorySegment segment, long index, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_srcOffsets.invokeExact(0L, elementIndex), index), ML_srcOffsets.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `srcOffsets` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_srcOffsets(MemorySegment segment, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_srcOffsets(segment, 0L, elementIndex, value); } + /// Sets `srcOffsets` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkImageBlit2 srcOffsetsAt(long index, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_srcOffsets(this.segment(), index, elementIndex, value); return this; } + /// Sets `srcOffsets` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkImageBlit2 srcOffsets(long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_srcOffsets(this.segment(), elementIndex, value); return this; } + + /// {@return `dstSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource); } + /// {@return `dstSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment) { return VkImageBlit2.get_dstSubresource(segment, 0L); } + /// {@return `dstSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresourceAt(long index) { return VkImageBlit2.get_dstSubresource(this.segment(), index); } + /// {@return `dstSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresource() { return VkImageBlit2.get_dstSubresource(this.segment()); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource.byteSize()); } + /// Sets `dstSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_dstSubresource(segment, 0L, value); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageBlit2 dstSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_dstSubresource(this.segment(), index, value); return this; } + /// Sets `dstSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageBlit2 dstSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_dstSubresource(this.segment(), value); return this; } + + /// {@return `dstOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment get_dstOffsets(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_dstOffsets.invokeExact(0L, elementIndex), index), ML_dstOffsets); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `dstOffsets`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment get_dstOffsets(MemorySegment segment, long elementIndex) { return VkImageBlit2.get_dstOffsets(segment, 0L, elementIndex); } + /// {@return `dstOffsets` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment dstOffsetsAt(long index, long elementIndex) { return VkImageBlit2.get_dstOffsets(this.segment(), index, elementIndex); } + /// {@return `dstOffsets`} + /// @param elementIndex the index of the element + public @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment dstOffsets(long elementIndex) { return VkImageBlit2.get_dstOffsets(this.segment(), elementIndex); } + /// Sets `dstOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_dstOffsets(MemorySegment segment, long index, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_dstOffsets.invokeExact(0L, elementIndex), index), ML_dstOffsets.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `dstOffsets` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_dstOffsets(MemorySegment segment, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_dstOffsets(segment, 0L, elementIndex, value); } + /// Sets `dstOffsets` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkImageBlit2 dstOffsetsAt(long index, long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_dstOffsets(this.segment(), index, elementIndex, value); return this; } + /// Sets `dstOffsets` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkImageBlit2 dstOffsets(long elementIndex, @CType("VkOffset3D[2]") java.lang.foreign.MemorySegment value) { VkImageBlit2.set_dstOffsets(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageCopy.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageCopy.java new file mode 100644 index 00000000..8654b6ec --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageCopy.java @@ -0,0 +1,269 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### srcSubresource +/// [Byte offset][#OFFSET_srcSubresource] - [Memory layout][#ML_srcSubresource] - [Getter][#srcSubresource()] - [Setter][#srcSubresource(java.lang.foreign.MemorySegment)] +/// ### srcOffset +/// [Byte offset][#OFFSET_srcOffset] - [Memory layout][#ML_srcOffset] - [Getter][#srcOffset()] - [Setter][#srcOffset(java.lang.foreign.MemorySegment)] +/// ### dstSubresource +/// [Byte offset][#OFFSET_dstSubresource] - [Memory layout][#ML_dstSubresource] - [Getter][#dstSubresource()] - [Setter][#dstSubresource(java.lang.foreign.MemorySegment)] +/// ### dstOffset +/// [Byte offset][#OFFSET_dstOffset] - [Memory layout][#ML_dstOffset] - [Getter][#dstOffset()] - [Setter][#dstOffset(java.lang.foreign.MemorySegment)] +/// ### extent +/// [Byte offset][#OFFSET_extent] - [Memory layout][#ML_extent] - [Getter][#extent()] - [Setter][#extent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageCopy { +/// VkImageSubresourceLayers srcSubresource; +/// VkOffset3D srcOffset; +/// VkImageSubresourceLayers dstSubresource; +/// VkOffset3D dstOffset; +/// VkExtent3D extent; +/// } VkImageCopy; +/// ``` +public final class VkImageCopy extends Struct { + /// The struct layout of `VkImageCopy`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("srcSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("srcOffset"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("dstSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("dstOffset"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("extent") + ); + /// The byte offset of `srcSubresource`. + public static final long OFFSET_srcSubresource = LAYOUT.byteOffset(PathElement.groupElement("srcSubresource")); + /// The memory layout of `srcSubresource`. + public static final MemoryLayout ML_srcSubresource = LAYOUT.select(PathElement.groupElement("srcSubresource")); + /// The byte offset of `srcOffset`. + public static final long OFFSET_srcOffset = LAYOUT.byteOffset(PathElement.groupElement("srcOffset")); + /// The memory layout of `srcOffset`. + public static final MemoryLayout ML_srcOffset = LAYOUT.select(PathElement.groupElement("srcOffset")); + /// The byte offset of `dstSubresource`. + public static final long OFFSET_dstSubresource = LAYOUT.byteOffset(PathElement.groupElement("dstSubresource")); + /// The memory layout of `dstSubresource`. + public static final MemoryLayout ML_dstSubresource = LAYOUT.select(PathElement.groupElement("dstSubresource")); + /// The byte offset of `dstOffset`. + public static final long OFFSET_dstOffset = LAYOUT.byteOffset(PathElement.groupElement("dstOffset")); + /// The memory layout of `dstOffset`. + public static final MemoryLayout ML_dstOffset = LAYOUT.select(PathElement.groupElement("dstOffset")); + /// The byte offset of `extent`. + public static final long OFFSET_extent = LAYOUT.byteOffset(PathElement.groupElement("extent")); + /// The memory layout of `extent`. + public static final MemoryLayout ML_extent = LAYOUT.select(PathElement.groupElement("extent")); + + /// Creates `VkImageCopy` with the given segment. + /// @param segment the memory segment + public VkImageCopy(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageCopy` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCopy of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCopy(segment); } + + /// Creates `VkImageCopy` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCopy ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCopy(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageCopy` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCopy ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCopy(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageCopy` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageCopy` + public static VkImageCopy alloc(SegmentAllocator allocator) { return new VkImageCopy(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageCopy` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageCopy` + public static VkImageCopy alloc(SegmentAllocator allocator, long count) { return new VkImageCopy(allocator.allocate(LAYOUT, count)); } + + /// {@return `srcSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource); } + /// {@return `srcSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment) { return VkImageCopy.get_srcSubresource(segment, 0L); } + /// {@return `srcSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresourceAt(long index) { return VkImageCopy.get_srcSubresource(this.segment(), index); } + /// {@return `srcSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresource() { return VkImageCopy.get_srcSubresource(this.segment()); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource.byteSize()); } + /// Sets `srcSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy.set_srcSubresource(segment, 0L, value); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy srcSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy.set_srcSubresource(this.segment(), index, value); return this; } + /// Sets `srcSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy srcSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy.set_srcSubresource(this.segment(), value); return this; } + + /// {@return `srcOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_srcOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcOffset, index), ML_srcOffset); } + /// {@return `srcOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_srcOffset(MemorySegment segment) { return VkImageCopy.get_srcOffset(segment, 0L); } + /// {@return `srcOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment srcOffsetAt(long index) { return VkImageCopy.get_srcOffset(this.segment(), index); } + /// {@return `srcOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment srcOffset() { return VkImageCopy.get_srcOffset(this.segment()); } + /// Sets `srcOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcOffset, index), ML_srcOffset.byteSize()); } + /// Sets `srcOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy.set_srcOffset(segment, 0L, value); } + /// Sets `srcOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy srcOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy.set_srcOffset(this.segment(), index, value); return this; } + /// Sets `srcOffset` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy srcOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy.set_srcOffset(this.segment(), value); return this; } + + /// {@return `dstSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource); } + /// {@return `dstSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment) { return VkImageCopy.get_dstSubresource(segment, 0L); } + /// {@return `dstSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresourceAt(long index) { return VkImageCopy.get_dstSubresource(this.segment(), index); } + /// {@return `dstSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresource() { return VkImageCopy.get_dstSubresource(this.segment()); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource.byteSize()); } + /// Sets `dstSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy.set_dstSubresource(segment, 0L, value); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy dstSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy.set_dstSubresource(this.segment(), index, value); return this; } + /// Sets `dstSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy dstSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy.set_dstSubresource(this.segment(), value); return this; } + + /// {@return `dstOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_dstOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstOffset, index), ML_dstOffset); } + /// {@return `dstOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_dstOffset(MemorySegment segment) { return VkImageCopy.get_dstOffset(segment, 0L); } + /// {@return `dstOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment dstOffsetAt(long index) { return VkImageCopy.get_dstOffset(this.segment(), index); } + /// {@return `dstOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment dstOffset() { return VkImageCopy.get_dstOffset(this.segment()); } + /// Sets `dstOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstOffset, index), ML_dstOffset.byteSize()); } + /// Sets `dstOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy.set_dstOffset(segment, 0L, value); } + /// Sets `dstOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy dstOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy.set_dstOffset(this.segment(), index, value); return this; } + /// Sets `dstOffset` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy dstOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy.set_dstOffset(this.segment(), value); return this; } + + /// {@return `extent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_extent, index), ML_extent); } + /// {@return `extent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment) { return VkImageCopy.get_extent(segment, 0L); } + /// {@return `extent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extentAt(long index) { return VkImageCopy.get_extent(this.segment(), index); } + /// {@return `extent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extent() { return VkImageCopy.get_extent(this.segment()); } + /// Sets `extent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_extent, index), ML_extent.byteSize()); } + /// Sets `extent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageCopy.set_extent(segment, 0L, value); } + /// Sets `extent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy extentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageCopy.set_extent(this.segment(), index, value); return this; } + /// Sets `extent` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy extent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageCopy.set_extent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageCopy2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageCopy2.java new file mode 100644 index 00000000..ecbabddc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageCopy2.java @@ -0,0 +1,343 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcSubresource +/// [Byte offset][#OFFSET_srcSubresource] - [Memory layout][#ML_srcSubresource] - [Getter][#srcSubresource()] - [Setter][#srcSubresource(java.lang.foreign.MemorySegment)] +/// ### srcOffset +/// [Byte offset][#OFFSET_srcOffset] - [Memory layout][#ML_srcOffset] - [Getter][#srcOffset()] - [Setter][#srcOffset(java.lang.foreign.MemorySegment)] +/// ### dstSubresource +/// [Byte offset][#OFFSET_dstSubresource] - [Memory layout][#ML_dstSubresource] - [Getter][#dstSubresource()] - [Setter][#dstSubresource(java.lang.foreign.MemorySegment)] +/// ### dstOffset +/// [Byte offset][#OFFSET_dstOffset] - [Memory layout][#ML_dstOffset] - [Getter][#dstOffset()] - [Setter][#dstOffset(java.lang.foreign.MemorySegment)] +/// ### extent +/// [Byte offset][#OFFSET_extent] - [Memory layout][#ML_extent] - [Getter][#extent()] - [Setter][#extent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageCopy2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageSubresourceLayers srcSubresource; +/// VkOffset3D srcOffset; +/// VkImageSubresourceLayers dstSubresource; +/// VkOffset3D dstOffset; +/// VkExtent3D extent; +/// } VkImageCopy2; +/// ``` +public final class VkImageCopy2 extends Struct { + /// The struct layout of `VkImageCopy2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("srcSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("srcOffset"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("dstSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("dstOffset"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("extent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `srcSubresource`. + public static final long OFFSET_srcSubresource = LAYOUT.byteOffset(PathElement.groupElement("srcSubresource")); + /// The memory layout of `srcSubresource`. + public static final MemoryLayout ML_srcSubresource = LAYOUT.select(PathElement.groupElement("srcSubresource")); + /// The byte offset of `srcOffset`. + public static final long OFFSET_srcOffset = LAYOUT.byteOffset(PathElement.groupElement("srcOffset")); + /// The memory layout of `srcOffset`. + public static final MemoryLayout ML_srcOffset = LAYOUT.select(PathElement.groupElement("srcOffset")); + /// The byte offset of `dstSubresource`. + public static final long OFFSET_dstSubresource = LAYOUT.byteOffset(PathElement.groupElement("dstSubresource")); + /// The memory layout of `dstSubresource`. + public static final MemoryLayout ML_dstSubresource = LAYOUT.select(PathElement.groupElement("dstSubresource")); + /// The byte offset of `dstOffset`. + public static final long OFFSET_dstOffset = LAYOUT.byteOffset(PathElement.groupElement("dstOffset")); + /// The memory layout of `dstOffset`. + public static final MemoryLayout ML_dstOffset = LAYOUT.select(PathElement.groupElement("dstOffset")); + /// The byte offset of `extent`. + public static final long OFFSET_extent = LAYOUT.byteOffset(PathElement.groupElement("extent")); + /// The memory layout of `extent`. + public static final MemoryLayout ML_extent = LAYOUT.select(PathElement.groupElement("extent")); + + /// Creates `VkImageCopy2` with the given segment. + /// @param segment the memory segment + public VkImageCopy2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageCopy2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCopy2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCopy2(segment); } + + /// Creates `VkImageCopy2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCopy2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCopy2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageCopy2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCopy2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCopy2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageCopy2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageCopy2` + public static VkImageCopy2 alloc(SegmentAllocator allocator) { return new VkImageCopy2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageCopy2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageCopy2` + public static VkImageCopy2 alloc(SegmentAllocator allocator, long count) { return new VkImageCopy2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageCopy2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageCopy2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageCopy2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageCopy2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy2 sTypeAt(long index, @CType("VkStructureType") int value) { VkImageCopy2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy2 sType(@CType("VkStructureType") int value) { VkImageCopy2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageCopy2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageCopy2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageCopy2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource); } + /// {@return `srcSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment) { return VkImageCopy2.get_srcSubresource(segment, 0L); } + /// {@return `srcSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresourceAt(long index) { return VkImageCopy2.get_srcSubresource(this.segment(), index); } + /// {@return `srcSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresource() { return VkImageCopy2.get_srcSubresource(this.segment()); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource.byteSize()); } + /// Sets `srcSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_srcSubresource(segment, 0L, value); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy2 srcSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_srcSubresource(this.segment(), index, value); return this; } + /// Sets `srcSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy2 srcSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_srcSubresource(this.segment(), value); return this; } + + /// {@return `srcOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_srcOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcOffset, index), ML_srcOffset); } + /// {@return `srcOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_srcOffset(MemorySegment segment) { return VkImageCopy2.get_srcOffset(segment, 0L); } + /// {@return `srcOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment srcOffsetAt(long index) { return VkImageCopy2.get_srcOffset(this.segment(), index); } + /// {@return `srcOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment srcOffset() { return VkImageCopy2.get_srcOffset(this.segment()); } + /// Sets `srcOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcOffset, index), ML_srcOffset.byteSize()); } + /// Sets `srcOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_srcOffset(segment, 0L, value); } + /// Sets `srcOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy2 srcOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_srcOffset(this.segment(), index, value); return this; } + /// Sets `srcOffset` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy2 srcOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_srcOffset(this.segment(), value); return this; } + + /// {@return `dstSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource); } + /// {@return `dstSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment) { return VkImageCopy2.get_dstSubresource(segment, 0L); } + /// {@return `dstSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresourceAt(long index) { return VkImageCopy2.get_dstSubresource(this.segment(), index); } + /// {@return `dstSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresource() { return VkImageCopy2.get_dstSubresource(this.segment()); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource.byteSize()); } + /// Sets `dstSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_dstSubresource(segment, 0L, value); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy2 dstSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_dstSubresource(this.segment(), index, value); return this; } + /// Sets `dstSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy2 dstSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_dstSubresource(this.segment(), value); return this; } + + /// {@return `dstOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_dstOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstOffset, index), ML_dstOffset); } + /// {@return `dstOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_dstOffset(MemorySegment segment) { return VkImageCopy2.get_dstOffset(segment, 0L); } + /// {@return `dstOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment dstOffsetAt(long index) { return VkImageCopy2.get_dstOffset(this.segment(), index); } + /// {@return `dstOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment dstOffset() { return VkImageCopy2.get_dstOffset(this.segment()); } + /// Sets `dstOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstOffset, index), ML_dstOffset.byteSize()); } + /// Sets `dstOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_dstOffset(segment, 0L, value); } + /// Sets `dstOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy2 dstOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_dstOffset(this.segment(), index, value); return this; } + /// Sets `dstOffset` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy2 dstOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_dstOffset(this.segment(), value); return this; } + + /// {@return `extent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_extent, index), ML_extent); } + /// {@return `extent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment) { return VkImageCopy2.get_extent(segment, 0L); } + /// {@return `extent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extentAt(long index) { return VkImageCopy2.get_extent(this.segment(), index); } + /// {@return `extent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extent() { return VkImageCopy2.get_extent(this.segment()); } + /// Sets `extent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_extent, index), ML_extent.byteSize()); } + /// Sets `extent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_extent(segment, 0L, value); } + /// Sets `extent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCopy2 extentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_extent(this.segment(), index, value); return this; } + /// Sets `extent` with the given value. + /// @param value the value + /// @return `this` + public VkImageCopy2 extent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageCopy2.set_extent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageCreateInfo.java new file mode 100644 index 00000000..15ffa4d3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageCreateInfo.java @@ -0,0 +1,631 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### imageType +/// [VarHandle][#VH_imageType] - [Getter][#imageType()] - [Setter][#imageType(int)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### extent +/// [Byte offset][#OFFSET_extent] - [Memory layout][#ML_extent] - [Getter][#extent()] - [Setter][#extent(java.lang.foreign.MemorySegment)] +/// ### mipLevels +/// [VarHandle][#VH_mipLevels] - [Getter][#mipLevels()] - [Setter][#mipLevels(int)] +/// ### arrayLayers +/// [VarHandle][#VH_arrayLayers] - [Getter][#arrayLayers()] - [Setter][#arrayLayers(int)] +/// ### samples +/// [VarHandle][#VH_samples] - [Getter][#samples()] - [Setter][#samples(int)] +/// ### tiling +/// [VarHandle][#VH_tiling] - [Getter][#tiling()] - [Setter][#tiling(int)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ### sharingMode +/// [VarHandle][#VH_sharingMode] - [Getter][#sharingMode()] - [Setter][#sharingMode(int)] +/// ### queueFamilyIndexCount +/// [VarHandle][#VH_queueFamilyIndexCount] - [Getter][#queueFamilyIndexCount()] - [Setter][#queueFamilyIndexCount(int)] +/// ### pQueueFamilyIndices +/// [VarHandle][#VH_pQueueFamilyIndices] - [Getter][#pQueueFamilyIndices()] - [Setter][#pQueueFamilyIndices(java.lang.foreign.MemorySegment)] +/// ### initialLayout +/// [VarHandle][#VH_initialLayout] - [Getter][#initialLayout()] - [Setter][#initialLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageCreateFlags flags; +/// VkImageType imageType; +/// VkFormat format; +/// VkExtent3D extent; +/// uint32_t mipLevels; +/// uint32_t arrayLayers; +/// VkSampleCountFlagBits samples; +/// VkImageTiling tiling; +/// VkImageUsageFlags usage; +/// VkSharingMode sharingMode; +/// uint32_t queueFamilyIndexCount; +/// const uint32_t * pQueueFamilyIndices; +/// VkImageLayout initialLayout; +/// } VkImageCreateInfo; +/// ``` +public final class VkImageCreateInfo extends Struct { + /// The struct layout of `VkImageCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("imageType"), + ValueLayout.JAVA_INT.withName("format"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("extent"), + ValueLayout.JAVA_INT.withName("mipLevels"), + ValueLayout.JAVA_INT.withName("arrayLayers"), + ValueLayout.JAVA_INT.withName("samples"), + ValueLayout.JAVA_INT.withName("tiling"), + ValueLayout.JAVA_INT.withName("usage"), + ValueLayout.JAVA_INT.withName("sharingMode"), + ValueLayout.JAVA_INT.withName("queueFamilyIndexCount"), + ValueLayout.ADDRESS.withName("pQueueFamilyIndices"), + ValueLayout.JAVA_INT.withName("initialLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `imageType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageType")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The byte offset of `extent`. + public static final long OFFSET_extent = LAYOUT.byteOffset(PathElement.groupElement("extent")); + /// The memory layout of `extent`. + public static final MemoryLayout ML_extent = LAYOUT.select(PathElement.groupElement("extent")); + /// The [VarHandle] of `mipLevels` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mipLevels = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mipLevels")); + /// The [VarHandle] of `arrayLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_arrayLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("arrayLayers")); + /// The [VarHandle] of `samples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samples")); + /// The [VarHandle] of `tiling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tiling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tiling")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + /// The [VarHandle] of `sharingMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sharingMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sharingMode")); + /// The [VarHandle] of `queueFamilyIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueFamilyIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueFamilyIndexCount")); + /// The [VarHandle] of `pQueueFamilyIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pQueueFamilyIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pQueueFamilyIndices")); + /// The [VarHandle] of `initialLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_initialLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initialLayout")); + + /// Creates `VkImageCreateInfo` with the given segment. + /// @param segment the memory segment + public VkImageCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCreateInfo(segment); } + + /// Creates `VkImageCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageCreateInfo` + public static VkImageCreateInfo alloc(SegmentAllocator allocator) { return new VkImageCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageCreateInfo` + public static VkImageCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkImageCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkImageCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo sType(@CType("VkStructureType") int value) { VkImageCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkImageCreateFlags") int get_flags(MemorySegment segment) { return VkImageCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkImageCreateFlags") int flagsAt(long index) { return VkImageCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkImageCreateFlags") int flags() { return VkImageCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkImageCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkImageCreateFlags") int value) { VkImageCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo flagsAt(long index, @CType("VkImageCreateFlags") int value) { VkImageCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo flags(@CType("VkImageCreateFlags") int value) { VkImageCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `imageType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageType") int get_imageType(MemorySegment segment, long index) { return (int) VH_imageType.get(segment, 0L, index); } + /// {@return `imageType`} + /// @param segment the segment of the struct + public static @CType("VkImageType") int get_imageType(MemorySegment segment) { return VkImageCreateInfo.get_imageType(segment, 0L); } + /// {@return `imageType` at the given index} + /// @param index the index + public @CType("VkImageType") int imageTypeAt(long index) { return VkImageCreateInfo.get_imageType(this.segment(), index); } + /// {@return `imageType`} + public @CType("VkImageType") int imageType() { return VkImageCreateInfo.get_imageType(this.segment()); } + /// Sets `imageType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageType(MemorySegment segment, long index, @CType("VkImageType") int value) { VH_imageType.set(segment, 0L, index, value); } + /// Sets `imageType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageType(MemorySegment segment, @CType("VkImageType") int value) { VkImageCreateInfo.set_imageType(segment, 0L, value); } + /// Sets `imageType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo imageTypeAt(long index, @CType("VkImageType") int value) { VkImageCreateInfo.set_imageType(this.segment(), index, value); return this; } + /// Sets `imageType` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo imageType(@CType("VkImageType") int value) { VkImageCreateInfo.set_imageType(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkImageCreateInfo.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkImageCreateInfo.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkImageCreateInfo.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkImageCreateInfo.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo formatAt(long index, @CType("VkFormat") int value) { VkImageCreateInfo.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo format(@CType("VkFormat") int value) { VkImageCreateInfo.set_format(this.segment(), value); return this; } + + /// {@return `extent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_extent, index), ML_extent); } + /// {@return `extent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment) { return VkImageCreateInfo.get_extent(segment, 0L); } + /// {@return `extent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extentAt(long index) { return VkImageCreateInfo.get_extent(this.segment(), index); } + /// {@return `extent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extent() { return VkImageCreateInfo.get_extent(this.segment()); } + /// Sets `extent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_extent, index), ML_extent.byteSize()); } + /// Sets `extent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageCreateInfo.set_extent(segment, 0L, value); } + /// Sets `extent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo extentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageCreateInfo.set_extent(this.segment(), index, value); return this; } + /// Sets `extent` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo extent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageCreateInfo.set_extent(this.segment(), value); return this; } + + /// {@return `mipLevels` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_mipLevels(MemorySegment segment, long index) { return (int) VH_mipLevels.get(segment, 0L, index); } + /// {@return `mipLevels`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_mipLevels(MemorySegment segment) { return VkImageCreateInfo.get_mipLevels(segment, 0L); } + /// {@return `mipLevels` at the given index} + /// @param index the index + public @CType("uint32_t") int mipLevelsAt(long index) { return VkImageCreateInfo.get_mipLevels(this.segment(), index); } + /// {@return `mipLevels`} + public @CType("uint32_t") int mipLevels() { return VkImageCreateInfo.get_mipLevels(this.segment()); } + /// Sets `mipLevels` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mipLevels(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_mipLevels.set(segment, 0L, index, value); } + /// Sets `mipLevels` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mipLevels(MemorySegment segment, @CType("uint32_t") int value) { VkImageCreateInfo.set_mipLevels(segment, 0L, value); } + /// Sets `mipLevels` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo mipLevelsAt(long index, @CType("uint32_t") int value) { VkImageCreateInfo.set_mipLevels(this.segment(), index, value); return this; } + /// Sets `mipLevels` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo mipLevels(@CType("uint32_t") int value) { VkImageCreateInfo.set_mipLevels(this.segment(), value); return this; } + + /// {@return `arrayLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_arrayLayers(MemorySegment segment, long index) { return (int) VH_arrayLayers.get(segment, 0L, index); } + /// {@return `arrayLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_arrayLayers(MemorySegment segment) { return VkImageCreateInfo.get_arrayLayers(segment, 0L); } + /// {@return `arrayLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int arrayLayersAt(long index) { return VkImageCreateInfo.get_arrayLayers(this.segment(), index); } + /// {@return `arrayLayers`} + public @CType("uint32_t") int arrayLayers() { return VkImageCreateInfo.get_arrayLayers(this.segment()); } + /// Sets `arrayLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_arrayLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_arrayLayers.set(segment, 0L, index, value); } + /// Sets `arrayLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_arrayLayers(MemorySegment segment, @CType("uint32_t") int value) { VkImageCreateInfo.set_arrayLayers(segment, 0L, value); } + /// Sets `arrayLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo arrayLayersAt(long index, @CType("uint32_t") int value) { VkImageCreateInfo.set_arrayLayers(this.segment(), index, value); return this; } + /// Sets `arrayLayers` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo arrayLayers(@CType("uint32_t") int value) { VkImageCreateInfo.set_arrayLayers(this.segment(), value); return this; } + + /// {@return `samples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_samples(MemorySegment segment, long index) { return (int) VH_samples.get(segment, 0L, index); } + /// {@return `samples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_samples(MemorySegment segment) { return VkImageCreateInfo.get_samples(segment, 0L); } + /// {@return `samples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int samplesAt(long index) { return VkImageCreateInfo.get_samples(this.segment(), index); } + /// {@return `samples`} + public @CType("VkSampleCountFlagBits") int samples() { return VkImageCreateInfo.get_samples(this.segment()); } + /// Sets `samples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samples(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_samples.set(segment, 0L, index, value); } + /// Sets `samples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samples(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkImageCreateInfo.set_samples(segment, 0L, value); } + /// Sets `samples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo samplesAt(long index, @CType("VkSampleCountFlagBits") int value) { VkImageCreateInfo.set_samples(this.segment(), index, value); return this; } + /// Sets `samples` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo samples(@CType("VkSampleCountFlagBits") int value) { VkImageCreateInfo.set_samples(this.segment(), value); return this; } + + /// {@return `tiling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageTiling") int get_tiling(MemorySegment segment, long index) { return (int) VH_tiling.get(segment, 0L, index); } + /// {@return `tiling`} + /// @param segment the segment of the struct + public static @CType("VkImageTiling") int get_tiling(MemorySegment segment) { return VkImageCreateInfo.get_tiling(segment, 0L); } + /// {@return `tiling` at the given index} + /// @param index the index + public @CType("VkImageTiling") int tilingAt(long index) { return VkImageCreateInfo.get_tiling(this.segment(), index); } + /// {@return `tiling`} + public @CType("VkImageTiling") int tiling() { return VkImageCreateInfo.get_tiling(this.segment()); } + /// Sets `tiling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tiling(MemorySegment segment, long index, @CType("VkImageTiling") int value) { VH_tiling.set(segment, 0L, index, value); } + /// Sets `tiling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tiling(MemorySegment segment, @CType("VkImageTiling") int value) { VkImageCreateInfo.set_tiling(segment, 0L, value); } + /// Sets `tiling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo tilingAt(long index, @CType("VkImageTiling") int value) { VkImageCreateInfo.set_tiling(this.segment(), index, value); return this; } + /// Sets `tiling` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo tiling(@CType("VkImageTiling") int value) { VkImageCreateInfo.set_tiling(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_usage(MemorySegment segment) { return VkImageCreateInfo.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int usageAt(long index) { return VkImageCreateInfo.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkImageUsageFlags") int usage() { return VkImageCreateInfo.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkImageCreateInfo.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo usageAt(long index, @CType("VkImageUsageFlags") int value) { VkImageCreateInfo.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo usage(@CType("VkImageUsageFlags") int value) { VkImageCreateInfo.set_usage(this.segment(), value); return this; } + + /// {@return `sharingMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSharingMode") int get_sharingMode(MemorySegment segment, long index) { return (int) VH_sharingMode.get(segment, 0L, index); } + /// {@return `sharingMode`} + /// @param segment the segment of the struct + public static @CType("VkSharingMode") int get_sharingMode(MemorySegment segment) { return VkImageCreateInfo.get_sharingMode(segment, 0L); } + /// {@return `sharingMode` at the given index} + /// @param index the index + public @CType("VkSharingMode") int sharingModeAt(long index) { return VkImageCreateInfo.get_sharingMode(this.segment(), index); } + /// {@return `sharingMode`} + public @CType("VkSharingMode") int sharingMode() { return VkImageCreateInfo.get_sharingMode(this.segment()); } + /// Sets `sharingMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sharingMode(MemorySegment segment, long index, @CType("VkSharingMode") int value) { VH_sharingMode.set(segment, 0L, index, value); } + /// Sets `sharingMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sharingMode(MemorySegment segment, @CType("VkSharingMode") int value) { VkImageCreateInfo.set_sharingMode(segment, 0L, value); } + /// Sets `sharingMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo sharingModeAt(long index, @CType("VkSharingMode") int value) { VkImageCreateInfo.set_sharingMode(this.segment(), index, value); return this; } + /// Sets `sharingMode` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo sharingMode(@CType("VkSharingMode") int value) { VkImageCreateInfo.set_sharingMode(this.segment(), value); return this; } + + /// {@return `queueFamilyIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueFamilyIndexCount(MemorySegment segment, long index) { return (int) VH_queueFamilyIndexCount.get(segment, 0L, index); } + /// {@return `queueFamilyIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueFamilyIndexCount(MemorySegment segment) { return VkImageCreateInfo.get_queueFamilyIndexCount(segment, 0L); } + /// {@return `queueFamilyIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queueFamilyIndexCountAt(long index) { return VkImageCreateInfo.get_queueFamilyIndexCount(this.segment(), index); } + /// {@return `queueFamilyIndexCount`} + public @CType("uint32_t") int queueFamilyIndexCount() { return VkImageCreateInfo.get_queueFamilyIndexCount(this.segment()); } + /// Sets `queueFamilyIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFamilyIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueFamilyIndexCount.set(segment, 0L, index, value); } + /// Sets `queueFamilyIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFamilyIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageCreateInfo.set_queueFamilyIndexCount(segment, 0L, value); } + /// Sets `queueFamilyIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo queueFamilyIndexCountAt(long index, @CType("uint32_t") int value) { VkImageCreateInfo.set_queueFamilyIndexCount(this.segment(), index, value); return this; } + /// Sets `queueFamilyIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo queueFamilyIndexCount(@CType("uint32_t") int value) { VkImageCreateInfo.set_queueFamilyIndexCount(this.segment(), value); return this; } + + /// {@return `pQueueFamilyIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pQueueFamilyIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pQueueFamilyIndices.get(segment, 0L, index); } + /// {@return `pQueueFamilyIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pQueueFamilyIndices(MemorySegment segment) { return VkImageCreateInfo.get_pQueueFamilyIndices(segment, 0L); } + /// {@return `pQueueFamilyIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pQueueFamilyIndicesAt(long index) { return VkImageCreateInfo.get_pQueueFamilyIndices(this.segment(), index); } + /// {@return `pQueueFamilyIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pQueueFamilyIndices() { return VkImageCreateInfo.get_pQueueFamilyIndices(this.segment()); } + /// Sets `pQueueFamilyIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pQueueFamilyIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pQueueFamilyIndices.set(segment, 0L, index, value); } + /// Sets `pQueueFamilyIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pQueueFamilyIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkImageCreateInfo.set_pQueueFamilyIndices(segment, 0L, value); } + /// Sets `pQueueFamilyIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo pQueueFamilyIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkImageCreateInfo.set_pQueueFamilyIndices(this.segment(), index, value); return this; } + /// Sets `pQueueFamilyIndices` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo pQueueFamilyIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkImageCreateInfo.set_pQueueFamilyIndices(this.segment(), value); return this; } + + /// {@return `initialLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_initialLayout(MemorySegment segment, long index) { return (int) VH_initialLayout.get(segment, 0L, index); } + /// {@return `initialLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_initialLayout(MemorySegment segment) { return VkImageCreateInfo.get_initialLayout(segment, 0L); } + /// {@return `initialLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int initialLayoutAt(long index) { return VkImageCreateInfo.get_initialLayout(this.segment(), index); } + /// {@return `initialLayout`} + public @CType("VkImageLayout") int initialLayout() { return VkImageCreateInfo.get_initialLayout(this.segment()); } + /// Sets `initialLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initialLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_initialLayout.set(segment, 0L, index, value); } + /// Sets `initialLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initialLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkImageCreateInfo.set_initialLayout(segment, 0L, value); } + /// Sets `initialLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageCreateInfo initialLayoutAt(long index, @CType("VkImageLayout") int value) { VkImageCreateInfo.set_initialLayout(this.segment(), index, value); return this; } + /// Sets `initialLayout` with the given value. + /// @param value the value + /// @return `this` + public VkImageCreateInfo initialLayout(@CType("VkImageLayout") int value) { VkImageCreateInfo.set_initialLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageFormatListCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageFormatListCreateInfo.java new file mode 100644 index 00000000..9bea1822 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageFormatListCreateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### viewFormatCount +/// [VarHandle][#VH_viewFormatCount] - [Getter][#viewFormatCount()] - [Setter][#viewFormatCount(int)] +/// ### pViewFormats +/// [VarHandle][#VH_pViewFormats] - [Getter][#pViewFormats()] - [Setter][#pViewFormats(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageFormatListCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t viewFormatCount; +/// const VkFormat * pViewFormats; +/// } VkImageFormatListCreateInfo; +/// ``` +public final class VkImageFormatListCreateInfo extends Struct { + /// The struct layout of `VkImageFormatListCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("viewFormatCount"), + ValueLayout.ADDRESS.withName("pViewFormats") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `viewFormatCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewFormatCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewFormatCount")); + /// The [VarHandle] of `pViewFormats` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pViewFormats = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pViewFormats")); + + /// Creates `VkImageFormatListCreateInfo` with the given segment. + /// @param segment the memory segment + public VkImageFormatListCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageFormatListCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatListCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatListCreateInfo(segment); } + + /// Creates `VkImageFormatListCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatListCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatListCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageFormatListCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatListCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatListCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageFormatListCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageFormatListCreateInfo` + public static VkImageFormatListCreateInfo alloc(SegmentAllocator allocator) { return new VkImageFormatListCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageFormatListCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageFormatListCreateInfo` + public static VkImageFormatListCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkImageFormatListCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageFormatListCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageFormatListCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageFormatListCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageFormatListCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatListCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkImageFormatListCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatListCreateInfo sType(@CType("VkStructureType") int value) { VkImageFormatListCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageFormatListCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageFormatListCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageFormatListCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageFormatListCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatListCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageFormatListCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatListCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageFormatListCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `viewFormatCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewFormatCount(MemorySegment segment, long index) { return (int) VH_viewFormatCount.get(segment, 0L, index); } + /// {@return `viewFormatCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewFormatCount(MemorySegment segment) { return VkImageFormatListCreateInfo.get_viewFormatCount(segment, 0L); } + /// {@return `viewFormatCount` at the given index} + /// @param index the index + public @CType("uint32_t") int viewFormatCountAt(long index) { return VkImageFormatListCreateInfo.get_viewFormatCount(this.segment(), index); } + /// {@return `viewFormatCount`} + public @CType("uint32_t") int viewFormatCount() { return VkImageFormatListCreateInfo.get_viewFormatCount(this.segment()); } + /// Sets `viewFormatCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewFormatCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewFormatCount.set(segment, 0L, index, value); } + /// Sets `viewFormatCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewFormatCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageFormatListCreateInfo.set_viewFormatCount(segment, 0L, value); } + /// Sets `viewFormatCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatListCreateInfo viewFormatCountAt(long index, @CType("uint32_t") int value) { VkImageFormatListCreateInfo.set_viewFormatCount(this.segment(), index, value); return this; } + /// Sets `viewFormatCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatListCreateInfo viewFormatCount(@CType("uint32_t") int value) { VkImageFormatListCreateInfo.set_viewFormatCount(this.segment(), value); return this; } + + /// {@return `pViewFormats` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkFormat *") java.lang.foreign.MemorySegment get_pViewFormats(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pViewFormats.get(segment, 0L, index); } + /// {@return `pViewFormats`} + /// @param segment the segment of the struct + public static @CType("const VkFormat *") java.lang.foreign.MemorySegment get_pViewFormats(MemorySegment segment) { return VkImageFormatListCreateInfo.get_pViewFormats(segment, 0L); } + /// {@return `pViewFormats` at the given index} + /// @param index the index + public @CType("const VkFormat *") java.lang.foreign.MemorySegment pViewFormatsAt(long index) { return VkImageFormatListCreateInfo.get_pViewFormats(this.segment(), index); } + /// {@return `pViewFormats`} + public @CType("const VkFormat *") java.lang.foreign.MemorySegment pViewFormats() { return VkImageFormatListCreateInfo.get_pViewFormats(this.segment()); } + /// Sets `pViewFormats` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pViewFormats(MemorySegment segment, long index, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VH_pViewFormats.set(segment, 0L, index, value); } + /// Sets `pViewFormats` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pViewFormats(MemorySegment segment, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkImageFormatListCreateInfo.set_pViewFormats(segment, 0L, value); } + /// Sets `pViewFormats` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatListCreateInfo pViewFormatsAt(long index, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkImageFormatListCreateInfo.set_pViewFormats(this.segment(), index, value); return this; } + /// Sets `pViewFormats` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatListCreateInfo pViewFormats(@CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkImageFormatListCreateInfo.set_pViewFormats(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageFormatProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageFormatProperties.java new file mode 100644 index 00000000..7c76c9ca --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageFormatProperties.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### maxExtent +/// [Byte offset][#OFFSET_maxExtent] - [Memory layout][#ML_maxExtent] - [Getter][#maxExtent()] - [Setter][#maxExtent(java.lang.foreign.MemorySegment)] +/// ### maxMipLevels +/// [VarHandle][#VH_maxMipLevels] - [Getter][#maxMipLevels()] - [Setter][#maxMipLevels(int)] +/// ### maxArrayLayers +/// [VarHandle][#VH_maxArrayLayers] - [Getter][#maxArrayLayers()] - [Setter][#maxArrayLayers(int)] +/// ### sampleCounts +/// [VarHandle][#VH_sampleCounts] - [Getter][#sampleCounts()] - [Setter][#sampleCounts(int)] +/// ### maxResourceSize +/// [VarHandle][#VH_maxResourceSize] - [Getter][#maxResourceSize()] - [Setter][#maxResourceSize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageFormatProperties { +/// VkExtent3D maxExtent; +/// uint32_t maxMipLevels; +/// uint32_t maxArrayLayers; +/// VkSampleCountFlags sampleCounts; +/// VkDeviceSize maxResourceSize; +/// } VkImageFormatProperties; +/// ``` +public final class VkImageFormatProperties extends Struct { + /// The struct layout of `VkImageFormatProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("maxExtent"), + ValueLayout.JAVA_INT.withName("maxMipLevels"), + ValueLayout.JAVA_INT.withName("maxArrayLayers"), + ValueLayout.JAVA_INT.withName("sampleCounts"), + ValueLayout.JAVA_LONG.withName("maxResourceSize") + ); + /// The byte offset of `maxExtent`. + public static final long OFFSET_maxExtent = LAYOUT.byteOffset(PathElement.groupElement("maxExtent")); + /// The memory layout of `maxExtent`. + public static final MemoryLayout ML_maxExtent = LAYOUT.select(PathElement.groupElement("maxExtent")); + /// The [VarHandle] of `maxMipLevels` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMipLevels = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMipLevels")); + /// The [VarHandle] of `maxArrayLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxArrayLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxArrayLayers")); + /// The [VarHandle] of `sampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleCounts")); + /// The [VarHandle] of `maxResourceSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxResourceSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxResourceSize")); + + /// Creates `VkImageFormatProperties` with the given segment. + /// @param segment the memory segment + public VkImageFormatProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageFormatProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatProperties(segment); } + + /// Creates `VkImageFormatProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageFormatProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageFormatProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageFormatProperties` + public static VkImageFormatProperties alloc(SegmentAllocator allocator) { return new VkImageFormatProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageFormatProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageFormatProperties` + public static VkImageFormatProperties alloc(SegmentAllocator allocator, long count) { return new VkImageFormatProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `maxExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_maxExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_maxExtent, index), ML_maxExtent); } + /// {@return `maxExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_maxExtent(MemorySegment segment) { return VkImageFormatProperties.get_maxExtent(segment, 0L); } + /// {@return `maxExtent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment maxExtentAt(long index) { return VkImageFormatProperties.get_maxExtent(this.segment(), index); } + /// {@return `maxExtent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment maxExtent() { return VkImageFormatProperties.get_maxExtent(this.segment()); } + /// Sets `maxExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxExtent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_maxExtent, index), ML_maxExtent.byteSize()); } + /// Sets `maxExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxExtent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageFormatProperties.set_maxExtent(segment, 0L, value); } + /// Sets `maxExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatProperties maxExtentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageFormatProperties.set_maxExtent(this.segment(), index, value); return this; } + /// Sets `maxExtent` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatProperties maxExtent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageFormatProperties.set_maxExtent(this.segment(), value); return this; } + + /// {@return `maxMipLevels` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMipLevels(MemorySegment segment, long index) { return (int) VH_maxMipLevels.get(segment, 0L, index); } + /// {@return `maxMipLevels`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMipLevels(MemorySegment segment) { return VkImageFormatProperties.get_maxMipLevels(segment, 0L); } + /// {@return `maxMipLevels` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMipLevelsAt(long index) { return VkImageFormatProperties.get_maxMipLevels(this.segment(), index); } + /// {@return `maxMipLevels`} + public @CType("uint32_t") int maxMipLevels() { return VkImageFormatProperties.get_maxMipLevels(this.segment()); } + /// Sets `maxMipLevels` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMipLevels(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMipLevels.set(segment, 0L, index, value); } + /// Sets `maxMipLevels` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMipLevels(MemorySegment segment, @CType("uint32_t") int value) { VkImageFormatProperties.set_maxMipLevels(segment, 0L, value); } + /// Sets `maxMipLevels` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatProperties maxMipLevelsAt(long index, @CType("uint32_t") int value) { VkImageFormatProperties.set_maxMipLevels(this.segment(), index, value); return this; } + /// Sets `maxMipLevels` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatProperties maxMipLevels(@CType("uint32_t") int value) { VkImageFormatProperties.set_maxMipLevels(this.segment(), value); return this; } + + /// {@return `maxArrayLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxArrayLayers(MemorySegment segment, long index) { return (int) VH_maxArrayLayers.get(segment, 0L, index); } + /// {@return `maxArrayLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxArrayLayers(MemorySegment segment) { return VkImageFormatProperties.get_maxArrayLayers(segment, 0L); } + /// {@return `maxArrayLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxArrayLayersAt(long index) { return VkImageFormatProperties.get_maxArrayLayers(this.segment(), index); } + /// {@return `maxArrayLayers`} + public @CType("uint32_t") int maxArrayLayers() { return VkImageFormatProperties.get_maxArrayLayers(this.segment()); } + /// Sets `maxArrayLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxArrayLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxArrayLayers.set(segment, 0L, index, value); } + /// Sets `maxArrayLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxArrayLayers(MemorySegment segment, @CType("uint32_t") int value) { VkImageFormatProperties.set_maxArrayLayers(segment, 0L, value); } + /// Sets `maxArrayLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatProperties maxArrayLayersAt(long index, @CType("uint32_t") int value) { VkImageFormatProperties.set_maxArrayLayers(this.segment(), index, value); return this; } + /// Sets `maxArrayLayers` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatProperties maxArrayLayers(@CType("uint32_t") int value) { VkImageFormatProperties.set_maxArrayLayers(this.segment(), value); return this; } + + /// {@return `sampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_sampleCounts(MemorySegment segment, long index) { return (int) VH_sampleCounts.get(segment, 0L, index); } + /// {@return `sampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_sampleCounts(MemorySegment segment) { return VkImageFormatProperties.get_sampleCounts(segment, 0L); } + /// {@return `sampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int sampleCountsAt(long index) { return VkImageFormatProperties.get_sampleCounts(this.segment(), index); } + /// {@return `sampleCounts`} + public @CType("VkSampleCountFlags") int sampleCounts() { return VkImageFormatProperties.get_sampleCounts(this.segment()); } + /// Sets `sampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_sampleCounts.set(segment, 0L, index, value); } + /// Sets `sampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkImageFormatProperties.set_sampleCounts(segment, 0L, value); } + /// Sets `sampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatProperties sampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkImageFormatProperties.set_sampleCounts(this.segment(), index, value); return this; } + /// Sets `sampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatProperties sampleCounts(@CType("VkSampleCountFlags") int value) { VkImageFormatProperties.set_sampleCounts(this.segment(), value); return this; } + + /// {@return `maxResourceSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_maxResourceSize(MemorySegment segment, long index) { return (long) VH_maxResourceSize.get(segment, 0L, index); } + /// {@return `maxResourceSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_maxResourceSize(MemorySegment segment) { return VkImageFormatProperties.get_maxResourceSize(segment, 0L); } + /// {@return `maxResourceSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long maxResourceSizeAt(long index) { return VkImageFormatProperties.get_maxResourceSize(this.segment(), index); } + /// {@return `maxResourceSize`} + public @CType("VkDeviceSize") long maxResourceSize() { return VkImageFormatProperties.get_maxResourceSize(this.segment()); } + /// Sets `maxResourceSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxResourceSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_maxResourceSize.set(segment, 0L, index, value); } + /// Sets `maxResourceSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxResourceSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkImageFormatProperties.set_maxResourceSize(segment, 0L, value); } + /// Sets `maxResourceSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatProperties maxResourceSizeAt(long index, @CType("VkDeviceSize") long value) { VkImageFormatProperties.set_maxResourceSize(this.segment(), index, value); return this; } + /// Sets `maxResourceSize` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatProperties maxResourceSize(@CType("VkDeviceSize") long value) { VkImageFormatProperties.set_maxResourceSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageFormatProperties2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageFormatProperties2.java new file mode 100644 index 00000000..6cee5c7e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageFormatProperties2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageFormatProperties +/// [Byte offset][#OFFSET_imageFormatProperties] - [Memory layout][#ML_imageFormatProperties] - [Getter][#imageFormatProperties()] - [Setter][#imageFormatProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageFormatProperties2 { +/// VkStructureType sType; +/// void * pNext; +/// VkImageFormatProperties imageFormatProperties; +/// } VkImageFormatProperties2; +/// ``` +public final class VkImageFormatProperties2 extends Struct { + /// The struct layout of `VkImageFormatProperties2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkImageFormatProperties.LAYOUT.withName("imageFormatProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `imageFormatProperties`. + public static final long OFFSET_imageFormatProperties = LAYOUT.byteOffset(PathElement.groupElement("imageFormatProperties")); + /// The memory layout of `imageFormatProperties`. + public static final MemoryLayout ML_imageFormatProperties = LAYOUT.select(PathElement.groupElement("imageFormatProperties")); + + /// Creates `VkImageFormatProperties2` with the given segment. + /// @param segment the memory segment + public VkImageFormatProperties2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageFormatProperties2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatProperties2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatProperties2(segment); } + + /// Creates `VkImageFormatProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatProperties2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageFormatProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageFormatProperties2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageFormatProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageFormatProperties2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageFormatProperties2` + public static VkImageFormatProperties2 alloc(SegmentAllocator allocator) { return new VkImageFormatProperties2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageFormatProperties2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageFormatProperties2` + public static VkImageFormatProperties2 alloc(SegmentAllocator allocator, long count) { return new VkImageFormatProperties2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageFormatProperties2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageFormatProperties2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageFormatProperties2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageFormatProperties2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatProperties2 sTypeAt(long index, @CType("VkStructureType") int value) { VkImageFormatProperties2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatProperties2 sType(@CType("VkStructureType") int value) { VkImageFormatProperties2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageFormatProperties2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageFormatProperties2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkImageFormatProperties2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageFormatProperties2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatProperties2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageFormatProperties2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatProperties2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkImageFormatProperties2.set_pNext(this.segment(), value); return this; } + + /// {@return `imageFormatProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment get_imageFormatProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageFormatProperties, index), ML_imageFormatProperties); } + /// {@return `imageFormatProperties`} + /// @param segment the segment of the struct + public static @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment get_imageFormatProperties(MemorySegment segment) { return VkImageFormatProperties2.get_imageFormatProperties(segment, 0L); } + /// {@return `imageFormatProperties` at the given index} + /// @param index the index + public @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment imageFormatPropertiesAt(long index) { return VkImageFormatProperties2.get_imageFormatProperties(this.segment(), index); } + /// {@return `imageFormatProperties`} + public @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment imageFormatProperties() { return VkImageFormatProperties2.get_imageFormatProperties(this.segment()); } + /// Sets `imageFormatProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageFormatProperties(MemorySegment segment, long index, @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageFormatProperties, index), ML_imageFormatProperties.byteSize()); } + /// Sets `imageFormatProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageFormatProperties(MemorySegment segment, @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment value) { VkImageFormatProperties2.set_imageFormatProperties(segment, 0L, value); } + /// Sets `imageFormatProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageFormatProperties2 imageFormatPropertiesAt(long index, @CType("VkImageFormatProperties") java.lang.foreign.MemorySegment value) { VkImageFormatProperties2.set_imageFormatProperties(this.segment(), index, value); return this; } + /// Sets `imageFormatProperties` with the given value. + /// @param value the value + /// @return `this` + public VkImageFormatProperties2 imageFormatProperties(@CType("VkImageFormatProperties") java.lang.foreign.MemorySegment value) { VkImageFormatProperties2.set_imageFormatProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageMemoryBarrier.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageMemoryBarrier.java new file mode 100644 index 00000000..c09d2f55 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageMemoryBarrier.java @@ -0,0 +1,446 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcAccessMask +/// [VarHandle][#VH_srcAccessMask] - [Getter][#srcAccessMask()] - [Setter][#srcAccessMask(int)] +/// ### dstAccessMask +/// [VarHandle][#VH_dstAccessMask] - [Getter][#dstAccessMask()] - [Setter][#dstAccessMask(int)] +/// ### oldLayout +/// [VarHandle][#VH_oldLayout] - [Getter][#oldLayout()] - [Setter][#oldLayout(int)] +/// ### newLayout +/// [VarHandle][#VH_newLayout] - [Getter][#newLayout()] - [Setter][#newLayout(int)] +/// ### srcQueueFamilyIndex +/// [VarHandle][#VH_srcQueueFamilyIndex] - [Getter][#srcQueueFamilyIndex()] - [Setter][#srcQueueFamilyIndex(int)] +/// ### dstQueueFamilyIndex +/// [VarHandle][#VH_dstQueueFamilyIndex] - [Getter][#dstQueueFamilyIndex()] - [Setter][#dstQueueFamilyIndex(int)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### subresourceRange +/// [Byte offset][#OFFSET_subresourceRange] - [Memory layout][#ML_subresourceRange] - [Getter][#subresourceRange()] - [Setter][#subresourceRange(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageMemoryBarrier { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccessFlags srcAccessMask; +/// VkAccessFlags dstAccessMask; +/// VkImageLayout oldLayout; +/// VkImageLayout newLayout; +/// uint32_t srcQueueFamilyIndex; +/// uint32_t dstQueueFamilyIndex; +/// VkImage image; +/// VkImageSubresourceRange subresourceRange; +/// } VkImageMemoryBarrier; +/// ``` +public final class VkImageMemoryBarrier extends Struct { + /// The struct layout of `VkImageMemoryBarrier`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("srcAccessMask"), + ValueLayout.JAVA_INT.withName("dstAccessMask"), + ValueLayout.JAVA_INT.withName("oldLayout"), + ValueLayout.JAVA_INT.withName("newLayout"), + ValueLayout.JAVA_INT.withName("srcQueueFamilyIndex"), + ValueLayout.JAVA_INT.withName("dstQueueFamilyIndex"), + ValueLayout.ADDRESS.withName("image"), + overrungl.vulkan.struct.VkImageSubresourceRange.LAYOUT.withName("subresourceRange") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcAccessMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAccessMask")); + /// The [VarHandle] of `dstAccessMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAccessMask")); + /// The [VarHandle] of `oldLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_oldLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("oldLayout")); + /// The [VarHandle] of `newLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_newLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("newLayout")); + /// The [VarHandle] of `srcQueueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcQueueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcQueueFamilyIndex")); + /// The [VarHandle] of `dstQueueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstQueueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstQueueFamilyIndex")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The byte offset of `subresourceRange`. + public static final long OFFSET_subresourceRange = LAYOUT.byteOffset(PathElement.groupElement("subresourceRange")); + /// The memory layout of `subresourceRange`. + public static final MemoryLayout ML_subresourceRange = LAYOUT.select(PathElement.groupElement("subresourceRange")); + + /// Creates `VkImageMemoryBarrier` with the given segment. + /// @param segment the memory segment + public VkImageMemoryBarrier(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageMemoryBarrier` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageMemoryBarrier of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageMemoryBarrier(segment); } + + /// Creates `VkImageMemoryBarrier` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageMemoryBarrier ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageMemoryBarrier(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageMemoryBarrier` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageMemoryBarrier ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageMemoryBarrier(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageMemoryBarrier` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageMemoryBarrier` + public static VkImageMemoryBarrier alloc(SegmentAllocator allocator) { return new VkImageMemoryBarrier(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageMemoryBarrier` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageMemoryBarrier` + public static VkImageMemoryBarrier alloc(SegmentAllocator allocator, long count) { return new VkImageMemoryBarrier(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageMemoryBarrier.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageMemoryBarrier.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageMemoryBarrier.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageMemoryBarrier.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier sTypeAt(long index, @CType("VkStructureType") int value) { VkImageMemoryBarrier.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier sType(@CType("VkStructureType") int value) { VkImageMemoryBarrier.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageMemoryBarrier.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageMemoryBarrier.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageMemoryBarrier.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier.set_pNext(this.segment(), value); return this; } + + /// {@return `srcAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags") int get_srcAccessMask(MemorySegment segment, long index) { return (int) VH_srcAccessMask.get(segment, 0L, index); } + /// {@return `srcAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags") int get_srcAccessMask(MemorySegment segment) { return VkImageMemoryBarrier.get_srcAccessMask(segment, 0L); } + /// {@return `srcAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags") int srcAccessMaskAt(long index) { return VkImageMemoryBarrier.get_srcAccessMask(this.segment(), index); } + /// {@return `srcAccessMask`} + public @CType("VkAccessFlags") int srcAccessMask() { return VkImageMemoryBarrier.get_srcAccessMask(this.segment()); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags") int value) { VH_srcAccessMask.set(segment, 0L, index, value); } + /// Sets `srcAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, @CType("VkAccessFlags") int value) { VkImageMemoryBarrier.set_srcAccessMask(segment, 0L, value); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier srcAccessMaskAt(long index, @CType("VkAccessFlags") int value) { VkImageMemoryBarrier.set_srcAccessMask(this.segment(), index, value); return this; } + /// Sets `srcAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier srcAccessMask(@CType("VkAccessFlags") int value) { VkImageMemoryBarrier.set_srcAccessMask(this.segment(), value); return this; } + + /// {@return `dstAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags") int get_dstAccessMask(MemorySegment segment, long index) { return (int) VH_dstAccessMask.get(segment, 0L, index); } + /// {@return `dstAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags") int get_dstAccessMask(MemorySegment segment) { return VkImageMemoryBarrier.get_dstAccessMask(segment, 0L); } + /// {@return `dstAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags") int dstAccessMaskAt(long index) { return VkImageMemoryBarrier.get_dstAccessMask(this.segment(), index); } + /// {@return `dstAccessMask`} + public @CType("VkAccessFlags") int dstAccessMask() { return VkImageMemoryBarrier.get_dstAccessMask(this.segment()); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags") int value) { VH_dstAccessMask.set(segment, 0L, index, value); } + /// Sets `dstAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, @CType("VkAccessFlags") int value) { VkImageMemoryBarrier.set_dstAccessMask(segment, 0L, value); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier dstAccessMaskAt(long index, @CType("VkAccessFlags") int value) { VkImageMemoryBarrier.set_dstAccessMask(this.segment(), index, value); return this; } + /// Sets `dstAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier dstAccessMask(@CType("VkAccessFlags") int value) { VkImageMemoryBarrier.set_dstAccessMask(this.segment(), value); return this; } + + /// {@return `oldLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_oldLayout(MemorySegment segment, long index) { return (int) VH_oldLayout.get(segment, 0L, index); } + /// {@return `oldLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_oldLayout(MemorySegment segment) { return VkImageMemoryBarrier.get_oldLayout(segment, 0L); } + /// {@return `oldLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int oldLayoutAt(long index) { return VkImageMemoryBarrier.get_oldLayout(this.segment(), index); } + /// {@return `oldLayout`} + public @CType("VkImageLayout") int oldLayout() { return VkImageMemoryBarrier.get_oldLayout(this.segment()); } + /// Sets `oldLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_oldLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_oldLayout.set(segment, 0L, index, value); } + /// Sets `oldLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_oldLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkImageMemoryBarrier.set_oldLayout(segment, 0L, value); } + /// Sets `oldLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier oldLayoutAt(long index, @CType("VkImageLayout") int value) { VkImageMemoryBarrier.set_oldLayout(this.segment(), index, value); return this; } + /// Sets `oldLayout` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier oldLayout(@CType("VkImageLayout") int value) { VkImageMemoryBarrier.set_oldLayout(this.segment(), value); return this; } + + /// {@return `newLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_newLayout(MemorySegment segment, long index) { return (int) VH_newLayout.get(segment, 0L, index); } + /// {@return `newLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_newLayout(MemorySegment segment) { return VkImageMemoryBarrier.get_newLayout(segment, 0L); } + /// {@return `newLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int newLayoutAt(long index) { return VkImageMemoryBarrier.get_newLayout(this.segment(), index); } + /// {@return `newLayout`} + public @CType("VkImageLayout") int newLayout() { return VkImageMemoryBarrier.get_newLayout(this.segment()); } + /// Sets `newLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_newLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_newLayout.set(segment, 0L, index, value); } + /// Sets `newLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_newLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkImageMemoryBarrier.set_newLayout(segment, 0L, value); } + /// Sets `newLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier newLayoutAt(long index, @CType("VkImageLayout") int value) { VkImageMemoryBarrier.set_newLayout(this.segment(), index, value); return this; } + /// Sets `newLayout` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier newLayout(@CType("VkImageLayout") int value) { VkImageMemoryBarrier.set_newLayout(this.segment(), value); return this; } + + /// {@return `srcQueueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_srcQueueFamilyIndex(MemorySegment segment, long index) { return (int) VH_srcQueueFamilyIndex.get(segment, 0L, index); } + /// {@return `srcQueueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_srcQueueFamilyIndex(MemorySegment segment) { return VkImageMemoryBarrier.get_srcQueueFamilyIndex(segment, 0L); } + /// {@return `srcQueueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int srcQueueFamilyIndexAt(long index) { return VkImageMemoryBarrier.get_srcQueueFamilyIndex(this.segment(), index); } + /// {@return `srcQueueFamilyIndex`} + public @CType("uint32_t") int srcQueueFamilyIndex() { return VkImageMemoryBarrier.get_srcQueueFamilyIndex(this.segment()); } + /// Sets `srcQueueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcQueueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_srcQueueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `srcQueueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcQueueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkImageMemoryBarrier.set_srcQueueFamilyIndex(segment, 0L, value); } + /// Sets `srcQueueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier srcQueueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkImageMemoryBarrier.set_srcQueueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `srcQueueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier srcQueueFamilyIndex(@CType("uint32_t") int value) { VkImageMemoryBarrier.set_srcQueueFamilyIndex(this.segment(), value); return this; } + + /// {@return `dstQueueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstQueueFamilyIndex(MemorySegment segment, long index) { return (int) VH_dstQueueFamilyIndex.get(segment, 0L, index); } + /// {@return `dstQueueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstQueueFamilyIndex(MemorySegment segment) { return VkImageMemoryBarrier.get_dstQueueFamilyIndex(segment, 0L); } + /// {@return `dstQueueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int dstQueueFamilyIndexAt(long index) { return VkImageMemoryBarrier.get_dstQueueFamilyIndex(this.segment(), index); } + /// {@return `dstQueueFamilyIndex`} + public @CType("uint32_t") int dstQueueFamilyIndex() { return VkImageMemoryBarrier.get_dstQueueFamilyIndex(this.segment()); } + /// Sets `dstQueueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstQueueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstQueueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `dstQueueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstQueueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkImageMemoryBarrier.set_dstQueueFamilyIndex(segment, 0L, value); } + /// Sets `dstQueueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier dstQueueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkImageMemoryBarrier.set_dstQueueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `dstQueueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier dstQueueFamilyIndex(@CType("uint32_t") int value) { VkImageMemoryBarrier.set_dstQueueFamilyIndex(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkImageMemoryBarrier.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkImageMemoryBarrier.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkImageMemoryBarrier.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier.set_image(this.segment(), value); return this; } + + /// {@return `subresourceRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment get_subresourceRange(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_subresourceRange, index), ML_subresourceRange); } + /// {@return `subresourceRange`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment get_subresourceRange(MemorySegment segment) { return VkImageMemoryBarrier.get_subresourceRange(segment, 0L); } + /// {@return `subresourceRange` at the given index} + /// @param index the index + public @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment subresourceRangeAt(long index) { return VkImageMemoryBarrier.get_subresourceRange(this.segment(), index); } + /// {@return `subresourceRange`} + public @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment subresourceRange() { return VkImageMemoryBarrier.get_subresourceRange(this.segment()); } + /// Sets `subresourceRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subresourceRange(MemorySegment segment, long index, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_subresourceRange, index), ML_subresourceRange.byteSize()); } + /// Sets `subresourceRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subresourceRange(MemorySegment segment, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier.set_subresourceRange(segment, 0L, value); } + /// Sets `subresourceRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier subresourceRangeAt(long index, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier.set_subresourceRange(this.segment(), index, value); return this; } + /// Sets `subresourceRange` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier subresourceRange(@CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier.set_subresourceRange(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageMemoryBarrier2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageMemoryBarrier2.java new file mode 100644 index 00000000..d2db94dd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageMemoryBarrier2.java @@ -0,0 +1,520 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcStageMask +/// [VarHandle][#VH_srcStageMask] - [Getter][#srcStageMask()] - [Setter][#srcStageMask(long)] +/// ### srcAccessMask +/// [VarHandle][#VH_srcAccessMask] - [Getter][#srcAccessMask()] - [Setter][#srcAccessMask(long)] +/// ### dstStageMask +/// [VarHandle][#VH_dstStageMask] - [Getter][#dstStageMask()] - [Setter][#dstStageMask(long)] +/// ### dstAccessMask +/// [VarHandle][#VH_dstAccessMask] - [Getter][#dstAccessMask()] - [Setter][#dstAccessMask(long)] +/// ### oldLayout +/// [VarHandle][#VH_oldLayout] - [Getter][#oldLayout()] - [Setter][#oldLayout(int)] +/// ### newLayout +/// [VarHandle][#VH_newLayout] - [Getter][#newLayout()] - [Setter][#newLayout(int)] +/// ### srcQueueFamilyIndex +/// [VarHandle][#VH_srcQueueFamilyIndex] - [Getter][#srcQueueFamilyIndex()] - [Setter][#srcQueueFamilyIndex(int)] +/// ### dstQueueFamilyIndex +/// [VarHandle][#VH_dstQueueFamilyIndex] - [Getter][#dstQueueFamilyIndex()] - [Setter][#dstQueueFamilyIndex(int)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### subresourceRange +/// [Byte offset][#OFFSET_subresourceRange] - [Memory layout][#ML_subresourceRange] - [Getter][#subresourceRange()] - [Setter][#subresourceRange(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageMemoryBarrier2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineStageFlags2 srcStageMask; +/// VkAccessFlags2 srcAccessMask; +/// VkPipelineStageFlags2 dstStageMask; +/// VkAccessFlags2 dstAccessMask; +/// VkImageLayout oldLayout; +/// VkImageLayout newLayout; +/// uint32_t srcQueueFamilyIndex; +/// uint32_t dstQueueFamilyIndex; +/// VkImage image; +/// VkImageSubresourceRange subresourceRange; +/// } VkImageMemoryBarrier2; +/// ``` +public final class VkImageMemoryBarrier2 extends Struct { + /// The struct layout of `VkImageMemoryBarrier2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("srcStageMask"), + ValueLayout.JAVA_LONG.withName("srcAccessMask"), + ValueLayout.JAVA_LONG.withName("dstStageMask"), + ValueLayout.JAVA_LONG.withName("dstAccessMask"), + ValueLayout.JAVA_INT.withName("oldLayout"), + ValueLayout.JAVA_INT.withName("newLayout"), + ValueLayout.JAVA_INT.withName("srcQueueFamilyIndex"), + ValueLayout.JAVA_INT.withName("dstQueueFamilyIndex"), + ValueLayout.ADDRESS.withName("image"), + overrungl.vulkan.struct.VkImageSubresourceRange.LAYOUT.withName("subresourceRange") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcStageMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcStageMask")); + /// The [VarHandle] of `srcAccessMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAccessMask")); + /// The [VarHandle] of `dstStageMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstStageMask")); + /// The [VarHandle] of `dstAccessMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAccessMask")); + /// The [VarHandle] of `oldLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_oldLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("oldLayout")); + /// The [VarHandle] of `newLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_newLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("newLayout")); + /// The [VarHandle] of `srcQueueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcQueueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcQueueFamilyIndex")); + /// The [VarHandle] of `dstQueueFamilyIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstQueueFamilyIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstQueueFamilyIndex")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The byte offset of `subresourceRange`. + public static final long OFFSET_subresourceRange = LAYOUT.byteOffset(PathElement.groupElement("subresourceRange")); + /// The memory layout of `subresourceRange`. + public static final MemoryLayout ML_subresourceRange = LAYOUT.select(PathElement.groupElement("subresourceRange")); + + /// Creates `VkImageMemoryBarrier2` with the given segment. + /// @param segment the memory segment + public VkImageMemoryBarrier2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageMemoryBarrier2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageMemoryBarrier2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageMemoryBarrier2(segment); } + + /// Creates `VkImageMemoryBarrier2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageMemoryBarrier2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageMemoryBarrier2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageMemoryBarrier2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageMemoryBarrier2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageMemoryBarrier2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageMemoryBarrier2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageMemoryBarrier2` + public static VkImageMemoryBarrier2 alloc(SegmentAllocator allocator) { return new VkImageMemoryBarrier2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageMemoryBarrier2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageMemoryBarrier2` + public static VkImageMemoryBarrier2 alloc(SegmentAllocator allocator, long count) { return new VkImageMemoryBarrier2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageMemoryBarrier2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageMemoryBarrier2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageMemoryBarrier2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageMemoryBarrier2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 sTypeAt(long index, @CType("VkStructureType") int value) { VkImageMemoryBarrier2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 sType(@CType("VkStructureType") int value) { VkImageMemoryBarrier2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageMemoryBarrier2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageMemoryBarrier2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageMemoryBarrier2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags2") long get_srcStageMask(MemorySegment segment, long index) { return (long) VH_srcStageMask.get(segment, 0L, index); } + /// {@return `srcStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags2") long get_srcStageMask(MemorySegment segment) { return VkImageMemoryBarrier2.get_srcStageMask(segment, 0L); } + /// {@return `srcStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags2") long srcStageMaskAt(long index) { return VkImageMemoryBarrier2.get_srcStageMask(this.segment(), index); } + /// {@return `srcStageMask`} + public @CType("VkPipelineStageFlags2") long srcStageMask() { return VkImageMemoryBarrier2.get_srcStageMask(this.segment()); } + /// Sets `srcStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags2") long value) { VH_srcStageMask.set(segment, 0L, index, value); } + /// Sets `srcStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcStageMask(MemorySegment segment, @CType("VkPipelineStageFlags2") long value) { VkImageMemoryBarrier2.set_srcStageMask(segment, 0L, value); } + /// Sets `srcStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 srcStageMaskAt(long index, @CType("VkPipelineStageFlags2") long value) { VkImageMemoryBarrier2.set_srcStageMask(this.segment(), index, value); return this; } + /// Sets `srcStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 srcStageMask(@CType("VkPipelineStageFlags2") long value) { VkImageMemoryBarrier2.set_srcStageMask(this.segment(), value); return this; } + + /// {@return `srcAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags2") long get_srcAccessMask(MemorySegment segment, long index) { return (long) VH_srcAccessMask.get(segment, 0L, index); } + /// {@return `srcAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags2") long get_srcAccessMask(MemorySegment segment) { return VkImageMemoryBarrier2.get_srcAccessMask(segment, 0L); } + /// {@return `srcAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags2") long srcAccessMaskAt(long index) { return VkImageMemoryBarrier2.get_srcAccessMask(this.segment(), index); } + /// {@return `srcAccessMask`} + public @CType("VkAccessFlags2") long srcAccessMask() { return VkImageMemoryBarrier2.get_srcAccessMask(this.segment()); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags2") long value) { VH_srcAccessMask.set(segment, 0L, index, value); } + /// Sets `srcAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, @CType("VkAccessFlags2") long value) { VkImageMemoryBarrier2.set_srcAccessMask(segment, 0L, value); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 srcAccessMaskAt(long index, @CType("VkAccessFlags2") long value) { VkImageMemoryBarrier2.set_srcAccessMask(this.segment(), index, value); return this; } + /// Sets `srcAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 srcAccessMask(@CType("VkAccessFlags2") long value) { VkImageMemoryBarrier2.set_srcAccessMask(this.segment(), value); return this; } + + /// {@return `dstStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags2") long get_dstStageMask(MemorySegment segment, long index) { return (long) VH_dstStageMask.get(segment, 0L, index); } + /// {@return `dstStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags2") long get_dstStageMask(MemorySegment segment) { return VkImageMemoryBarrier2.get_dstStageMask(segment, 0L); } + /// {@return `dstStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags2") long dstStageMaskAt(long index) { return VkImageMemoryBarrier2.get_dstStageMask(this.segment(), index); } + /// {@return `dstStageMask`} + public @CType("VkPipelineStageFlags2") long dstStageMask() { return VkImageMemoryBarrier2.get_dstStageMask(this.segment()); } + /// Sets `dstStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags2") long value) { VH_dstStageMask.set(segment, 0L, index, value); } + /// Sets `dstStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstStageMask(MemorySegment segment, @CType("VkPipelineStageFlags2") long value) { VkImageMemoryBarrier2.set_dstStageMask(segment, 0L, value); } + /// Sets `dstStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 dstStageMaskAt(long index, @CType("VkPipelineStageFlags2") long value) { VkImageMemoryBarrier2.set_dstStageMask(this.segment(), index, value); return this; } + /// Sets `dstStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 dstStageMask(@CType("VkPipelineStageFlags2") long value) { VkImageMemoryBarrier2.set_dstStageMask(this.segment(), value); return this; } + + /// {@return `dstAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags2") long get_dstAccessMask(MemorySegment segment, long index) { return (long) VH_dstAccessMask.get(segment, 0L, index); } + /// {@return `dstAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags2") long get_dstAccessMask(MemorySegment segment) { return VkImageMemoryBarrier2.get_dstAccessMask(segment, 0L); } + /// {@return `dstAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags2") long dstAccessMaskAt(long index) { return VkImageMemoryBarrier2.get_dstAccessMask(this.segment(), index); } + /// {@return `dstAccessMask`} + public @CType("VkAccessFlags2") long dstAccessMask() { return VkImageMemoryBarrier2.get_dstAccessMask(this.segment()); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags2") long value) { VH_dstAccessMask.set(segment, 0L, index, value); } + /// Sets `dstAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, @CType("VkAccessFlags2") long value) { VkImageMemoryBarrier2.set_dstAccessMask(segment, 0L, value); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 dstAccessMaskAt(long index, @CType("VkAccessFlags2") long value) { VkImageMemoryBarrier2.set_dstAccessMask(this.segment(), index, value); return this; } + /// Sets `dstAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 dstAccessMask(@CType("VkAccessFlags2") long value) { VkImageMemoryBarrier2.set_dstAccessMask(this.segment(), value); return this; } + + /// {@return `oldLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_oldLayout(MemorySegment segment, long index) { return (int) VH_oldLayout.get(segment, 0L, index); } + /// {@return `oldLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_oldLayout(MemorySegment segment) { return VkImageMemoryBarrier2.get_oldLayout(segment, 0L); } + /// {@return `oldLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int oldLayoutAt(long index) { return VkImageMemoryBarrier2.get_oldLayout(this.segment(), index); } + /// {@return `oldLayout`} + public @CType("VkImageLayout") int oldLayout() { return VkImageMemoryBarrier2.get_oldLayout(this.segment()); } + /// Sets `oldLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_oldLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_oldLayout.set(segment, 0L, index, value); } + /// Sets `oldLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_oldLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkImageMemoryBarrier2.set_oldLayout(segment, 0L, value); } + /// Sets `oldLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 oldLayoutAt(long index, @CType("VkImageLayout") int value) { VkImageMemoryBarrier2.set_oldLayout(this.segment(), index, value); return this; } + /// Sets `oldLayout` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 oldLayout(@CType("VkImageLayout") int value) { VkImageMemoryBarrier2.set_oldLayout(this.segment(), value); return this; } + + /// {@return `newLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_newLayout(MemorySegment segment, long index) { return (int) VH_newLayout.get(segment, 0L, index); } + /// {@return `newLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_newLayout(MemorySegment segment) { return VkImageMemoryBarrier2.get_newLayout(segment, 0L); } + /// {@return `newLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int newLayoutAt(long index) { return VkImageMemoryBarrier2.get_newLayout(this.segment(), index); } + /// {@return `newLayout`} + public @CType("VkImageLayout") int newLayout() { return VkImageMemoryBarrier2.get_newLayout(this.segment()); } + /// Sets `newLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_newLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_newLayout.set(segment, 0L, index, value); } + /// Sets `newLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_newLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkImageMemoryBarrier2.set_newLayout(segment, 0L, value); } + /// Sets `newLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 newLayoutAt(long index, @CType("VkImageLayout") int value) { VkImageMemoryBarrier2.set_newLayout(this.segment(), index, value); return this; } + /// Sets `newLayout` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 newLayout(@CType("VkImageLayout") int value) { VkImageMemoryBarrier2.set_newLayout(this.segment(), value); return this; } + + /// {@return `srcQueueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_srcQueueFamilyIndex(MemorySegment segment, long index) { return (int) VH_srcQueueFamilyIndex.get(segment, 0L, index); } + /// {@return `srcQueueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_srcQueueFamilyIndex(MemorySegment segment) { return VkImageMemoryBarrier2.get_srcQueueFamilyIndex(segment, 0L); } + /// {@return `srcQueueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int srcQueueFamilyIndexAt(long index) { return VkImageMemoryBarrier2.get_srcQueueFamilyIndex(this.segment(), index); } + /// {@return `srcQueueFamilyIndex`} + public @CType("uint32_t") int srcQueueFamilyIndex() { return VkImageMemoryBarrier2.get_srcQueueFamilyIndex(this.segment()); } + /// Sets `srcQueueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcQueueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_srcQueueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `srcQueueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcQueueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkImageMemoryBarrier2.set_srcQueueFamilyIndex(segment, 0L, value); } + /// Sets `srcQueueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 srcQueueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkImageMemoryBarrier2.set_srcQueueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `srcQueueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 srcQueueFamilyIndex(@CType("uint32_t") int value) { VkImageMemoryBarrier2.set_srcQueueFamilyIndex(this.segment(), value); return this; } + + /// {@return `dstQueueFamilyIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstQueueFamilyIndex(MemorySegment segment, long index) { return (int) VH_dstQueueFamilyIndex.get(segment, 0L, index); } + /// {@return `dstQueueFamilyIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstQueueFamilyIndex(MemorySegment segment) { return VkImageMemoryBarrier2.get_dstQueueFamilyIndex(segment, 0L); } + /// {@return `dstQueueFamilyIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int dstQueueFamilyIndexAt(long index) { return VkImageMemoryBarrier2.get_dstQueueFamilyIndex(this.segment(), index); } + /// {@return `dstQueueFamilyIndex`} + public @CType("uint32_t") int dstQueueFamilyIndex() { return VkImageMemoryBarrier2.get_dstQueueFamilyIndex(this.segment()); } + /// Sets `dstQueueFamilyIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstQueueFamilyIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstQueueFamilyIndex.set(segment, 0L, index, value); } + /// Sets `dstQueueFamilyIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstQueueFamilyIndex(MemorySegment segment, @CType("uint32_t") int value) { VkImageMemoryBarrier2.set_dstQueueFamilyIndex(segment, 0L, value); } + /// Sets `dstQueueFamilyIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 dstQueueFamilyIndexAt(long index, @CType("uint32_t") int value) { VkImageMemoryBarrier2.set_dstQueueFamilyIndex(this.segment(), index, value); return this; } + /// Sets `dstQueueFamilyIndex` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 dstQueueFamilyIndex(@CType("uint32_t") int value) { VkImageMemoryBarrier2.set_dstQueueFamilyIndex(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkImageMemoryBarrier2.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkImageMemoryBarrier2.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkImageMemoryBarrier2.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier2.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier2.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier2.set_image(this.segment(), value); return this; } + + /// {@return `subresourceRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment get_subresourceRange(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_subresourceRange, index), ML_subresourceRange); } + /// {@return `subresourceRange`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment get_subresourceRange(MemorySegment segment) { return VkImageMemoryBarrier2.get_subresourceRange(segment, 0L); } + /// {@return `subresourceRange` at the given index} + /// @param index the index + public @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment subresourceRangeAt(long index) { return VkImageMemoryBarrier2.get_subresourceRange(this.segment(), index); } + /// {@return `subresourceRange`} + public @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment subresourceRange() { return VkImageMemoryBarrier2.get_subresourceRange(this.segment()); } + /// Sets `subresourceRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subresourceRange(MemorySegment segment, long index, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_subresourceRange, index), ML_subresourceRange.byteSize()); } + /// Sets `subresourceRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subresourceRange(MemorySegment segment, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier2.set_subresourceRange(segment, 0L, value); } + /// Sets `subresourceRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 subresourceRangeAt(long index, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier2.set_subresourceRange(this.segment(), index, value); return this; } + /// Sets `subresourceRange` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryBarrier2 subresourceRange(@CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkImageMemoryBarrier2.set_subresourceRange(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageMemoryRequirementsInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageMemoryRequirementsInfo2.java new file mode 100644 index 00000000..7fb0527c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageMemoryRequirementsInfo2.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageMemoryRequirementsInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage image; +/// } VkImageMemoryRequirementsInfo2; +/// ``` +public final class VkImageMemoryRequirementsInfo2 extends Struct { + /// The struct layout of `VkImageMemoryRequirementsInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("image") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + + /// Creates `VkImageMemoryRequirementsInfo2` with the given segment. + /// @param segment the memory segment + public VkImageMemoryRequirementsInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageMemoryRequirementsInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageMemoryRequirementsInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageMemoryRequirementsInfo2(segment); } + + /// Creates `VkImageMemoryRequirementsInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageMemoryRequirementsInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageMemoryRequirementsInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageMemoryRequirementsInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageMemoryRequirementsInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageMemoryRequirementsInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageMemoryRequirementsInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageMemoryRequirementsInfo2` + public static VkImageMemoryRequirementsInfo2 alloc(SegmentAllocator allocator) { return new VkImageMemoryRequirementsInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageMemoryRequirementsInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageMemoryRequirementsInfo2` + public static VkImageMemoryRequirementsInfo2 alloc(SegmentAllocator allocator, long count) { return new VkImageMemoryRequirementsInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageMemoryRequirementsInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageMemoryRequirementsInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageMemoryRequirementsInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageMemoryRequirementsInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryRequirementsInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkImageMemoryRequirementsInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryRequirementsInfo2 sType(@CType("VkStructureType") int value) { VkImageMemoryRequirementsInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageMemoryRequirementsInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageMemoryRequirementsInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageMemoryRequirementsInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageMemoryRequirementsInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryRequirementsInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageMemoryRequirementsInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryRequirementsInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageMemoryRequirementsInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkImageMemoryRequirementsInfo2.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkImageMemoryRequirementsInfo2.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkImageMemoryRequirementsInfo2.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageMemoryRequirementsInfo2.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageMemoryRequirementsInfo2 imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageMemoryRequirementsInfo2.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkImageMemoryRequirementsInfo2 image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageMemoryRequirementsInfo2.set_image(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImagePlaneMemoryRequirementsInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImagePlaneMemoryRequirementsInfo.java new file mode 100644 index 00000000..546f15a1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImagePlaneMemoryRequirementsInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### planeAspect +/// [VarHandle][#VH_planeAspect] - [Getter][#planeAspect()] - [Setter][#planeAspect(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImagePlaneMemoryRequirementsInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageAspectFlagBits planeAspect; +/// } VkImagePlaneMemoryRequirementsInfo; +/// ``` +public final class VkImagePlaneMemoryRequirementsInfo extends Struct { + /// The struct layout of `VkImagePlaneMemoryRequirementsInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("planeAspect") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `planeAspect` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_planeAspect = LAYOUT.arrayElementVarHandle(PathElement.groupElement("planeAspect")); + + /// Creates `VkImagePlaneMemoryRequirementsInfo` with the given segment. + /// @param segment the memory segment + public VkImagePlaneMemoryRequirementsInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImagePlaneMemoryRequirementsInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImagePlaneMemoryRequirementsInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImagePlaneMemoryRequirementsInfo(segment); } + + /// Creates `VkImagePlaneMemoryRequirementsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImagePlaneMemoryRequirementsInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImagePlaneMemoryRequirementsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImagePlaneMemoryRequirementsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImagePlaneMemoryRequirementsInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImagePlaneMemoryRequirementsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImagePlaneMemoryRequirementsInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImagePlaneMemoryRequirementsInfo` + public static VkImagePlaneMemoryRequirementsInfo alloc(SegmentAllocator allocator) { return new VkImagePlaneMemoryRequirementsInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImagePlaneMemoryRequirementsInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImagePlaneMemoryRequirementsInfo` + public static VkImagePlaneMemoryRequirementsInfo alloc(SegmentAllocator allocator, long count) { return new VkImagePlaneMemoryRequirementsInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImagePlaneMemoryRequirementsInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImagePlaneMemoryRequirementsInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImagePlaneMemoryRequirementsInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImagePlaneMemoryRequirementsInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImagePlaneMemoryRequirementsInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkImagePlaneMemoryRequirementsInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImagePlaneMemoryRequirementsInfo sType(@CType("VkStructureType") int value) { VkImagePlaneMemoryRequirementsInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImagePlaneMemoryRequirementsInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImagePlaneMemoryRequirementsInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImagePlaneMemoryRequirementsInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImagePlaneMemoryRequirementsInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImagePlaneMemoryRequirementsInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImagePlaneMemoryRequirementsInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImagePlaneMemoryRequirementsInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImagePlaneMemoryRequirementsInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `planeAspect` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlagBits") int get_planeAspect(MemorySegment segment, long index) { return (int) VH_planeAspect.get(segment, 0L, index); } + /// {@return `planeAspect`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlagBits") int get_planeAspect(MemorySegment segment) { return VkImagePlaneMemoryRequirementsInfo.get_planeAspect(segment, 0L); } + /// {@return `planeAspect` at the given index} + /// @param index the index + public @CType("VkImageAspectFlagBits") int planeAspectAt(long index) { return VkImagePlaneMemoryRequirementsInfo.get_planeAspect(this.segment(), index); } + /// {@return `planeAspect`} + public @CType("VkImageAspectFlagBits") int planeAspect() { return VkImagePlaneMemoryRequirementsInfo.get_planeAspect(this.segment()); } + /// Sets `planeAspect` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_planeAspect(MemorySegment segment, long index, @CType("VkImageAspectFlagBits") int value) { VH_planeAspect.set(segment, 0L, index, value); } + /// Sets `planeAspect` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_planeAspect(MemorySegment segment, @CType("VkImageAspectFlagBits") int value) { VkImagePlaneMemoryRequirementsInfo.set_planeAspect(segment, 0L, value); } + /// Sets `planeAspect` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImagePlaneMemoryRequirementsInfo planeAspectAt(long index, @CType("VkImageAspectFlagBits") int value) { VkImagePlaneMemoryRequirementsInfo.set_planeAspect(this.segment(), index, value); return this; } + /// Sets `planeAspect` with the given value. + /// @param value the value + /// @return `this` + public VkImagePlaneMemoryRequirementsInfo planeAspect(@CType("VkImageAspectFlagBits") int value) { VkImagePlaneMemoryRequirementsInfo.set_planeAspect(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageResolve.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageResolve.java new file mode 100644 index 00000000..11f5fc56 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageResolve.java @@ -0,0 +1,269 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### srcSubresource +/// [Byte offset][#OFFSET_srcSubresource] - [Memory layout][#ML_srcSubresource] - [Getter][#srcSubresource()] - [Setter][#srcSubresource(java.lang.foreign.MemorySegment)] +/// ### srcOffset +/// [Byte offset][#OFFSET_srcOffset] - [Memory layout][#ML_srcOffset] - [Getter][#srcOffset()] - [Setter][#srcOffset(java.lang.foreign.MemorySegment)] +/// ### dstSubresource +/// [Byte offset][#OFFSET_dstSubresource] - [Memory layout][#ML_dstSubresource] - [Getter][#dstSubresource()] - [Setter][#dstSubresource(java.lang.foreign.MemorySegment)] +/// ### dstOffset +/// [Byte offset][#OFFSET_dstOffset] - [Memory layout][#ML_dstOffset] - [Getter][#dstOffset()] - [Setter][#dstOffset(java.lang.foreign.MemorySegment)] +/// ### extent +/// [Byte offset][#OFFSET_extent] - [Memory layout][#ML_extent] - [Getter][#extent()] - [Setter][#extent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageResolve { +/// VkImageSubresourceLayers srcSubresource; +/// VkOffset3D srcOffset; +/// VkImageSubresourceLayers dstSubresource; +/// VkOffset3D dstOffset; +/// VkExtent3D extent; +/// } VkImageResolve; +/// ``` +public final class VkImageResolve extends Struct { + /// The struct layout of `VkImageResolve`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("srcSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("srcOffset"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("dstSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("dstOffset"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("extent") + ); + /// The byte offset of `srcSubresource`. + public static final long OFFSET_srcSubresource = LAYOUT.byteOffset(PathElement.groupElement("srcSubresource")); + /// The memory layout of `srcSubresource`. + public static final MemoryLayout ML_srcSubresource = LAYOUT.select(PathElement.groupElement("srcSubresource")); + /// The byte offset of `srcOffset`. + public static final long OFFSET_srcOffset = LAYOUT.byteOffset(PathElement.groupElement("srcOffset")); + /// The memory layout of `srcOffset`. + public static final MemoryLayout ML_srcOffset = LAYOUT.select(PathElement.groupElement("srcOffset")); + /// The byte offset of `dstSubresource`. + public static final long OFFSET_dstSubresource = LAYOUT.byteOffset(PathElement.groupElement("dstSubresource")); + /// The memory layout of `dstSubresource`. + public static final MemoryLayout ML_dstSubresource = LAYOUT.select(PathElement.groupElement("dstSubresource")); + /// The byte offset of `dstOffset`. + public static final long OFFSET_dstOffset = LAYOUT.byteOffset(PathElement.groupElement("dstOffset")); + /// The memory layout of `dstOffset`. + public static final MemoryLayout ML_dstOffset = LAYOUT.select(PathElement.groupElement("dstOffset")); + /// The byte offset of `extent`. + public static final long OFFSET_extent = LAYOUT.byteOffset(PathElement.groupElement("extent")); + /// The memory layout of `extent`. + public static final MemoryLayout ML_extent = LAYOUT.select(PathElement.groupElement("extent")); + + /// Creates `VkImageResolve` with the given segment. + /// @param segment the memory segment + public VkImageResolve(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageResolve` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageResolve of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageResolve(segment); } + + /// Creates `VkImageResolve` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageResolve ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageResolve(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageResolve` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageResolve ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageResolve(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageResolve` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageResolve` + public static VkImageResolve alloc(SegmentAllocator allocator) { return new VkImageResolve(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageResolve` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageResolve` + public static VkImageResolve alloc(SegmentAllocator allocator, long count) { return new VkImageResolve(allocator.allocate(LAYOUT, count)); } + + /// {@return `srcSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource); } + /// {@return `srcSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment) { return VkImageResolve.get_srcSubresource(segment, 0L); } + /// {@return `srcSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresourceAt(long index) { return VkImageResolve.get_srcSubresource(this.segment(), index); } + /// {@return `srcSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresource() { return VkImageResolve.get_srcSubresource(this.segment()); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource.byteSize()); } + /// Sets `srcSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve.set_srcSubresource(segment, 0L, value); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve srcSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve.set_srcSubresource(this.segment(), index, value); return this; } + /// Sets `srcSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve srcSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve.set_srcSubresource(this.segment(), value); return this; } + + /// {@return `srcOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_srcOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcOffset, index), ML_srcOffset); } + /// {@return `srcOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_srcOffset(MemorySegment segment) { return VkImageResolve.get_srcOffset(segment, 0L); } + /// {@return `srcOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment srcOffsetAt(long index) { return VkImageResolve.get_srcOffset(this.segment(), index); } + /// {@return `srcOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment srcOffset() { return VkImageResolve.get_srcOffset(this.segment()); } + /// Sets `srcOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcOffset, index), ML_srcOffset.byteSize()); } + /// Sets `srcOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve.set_srcOffset(segment, 0L, value); } + /// Sets `srcOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve srcOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve.set_srcOffset(this.segment(), index, value); return this; } + /// Sets `srcOffset` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve srcOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve.set_srcOffset(this.segment(), value); return this; } + + /// {@return `dstSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource); } + /// {@return `dstSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment) { return VkImageResolve.get_dstSubresource(segment, 0L); } + /// {@return `dstSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresourceAt(long index) { return VkImageResolve.get_dstSubresource(this.segment(), index); } + /// {@return `dstSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresource() { return VkImageResolve.get_dstSubresource(this.segment()); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource.byteSize()); } + /// Sets `dstSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve.set_dstSubresource(segment, 0L, value); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve dstSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve.set_dstSubresource(this.segment(), index, value); return this; } + /// Sets `dstSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve dstSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve.set_dstSubresource(this.segment(), value); return this; } + + /// {@return `dstOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_dstOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstOffset, index), ML_dstOffset); } + /// {@return `dstOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_dstOffset(MemorySegment segment) { return VkImageResolve.get_dstOffset(segment, 0L); } + /// {@return `dstOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment dstOffsetAt(long index) { return VkImageResolve.get_dstOffset(this.segment(), index); } + /// {@return `dstOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment dstOffset() { return VkImageResolve.get_dstOffset(this.segment()); } + /// Sets `dstOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstOffset, index), ML_dstOffset.byteSize()); } + /// Sets `dstOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve.set_dstOffset(segment, 0L, value); } + /// Sets `dstOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve dstOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve.set_dstOffset(this.segment(), index, value); return this; } + /// Sets `dstOffset` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve dstOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve.set_dstOffset(this.segment(), value); return this; } + + /// {@return `extent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_extent, index), ML_extent); } + /// {@return `extent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment) { return VkImageResolve.get_extent(segment, 0L); } + /// {@return `extent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extentAt(long index) { return VkImageResolve.get_extent(this.segment(), index); } + /// {@return `extent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extent() { return VkImageResolve.get_extent(this.segment()); } + /// Sets `extent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_extent, index), ML_extent.byteSize()); } + /// Sets `extent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageResolve.set_extent(segment, 0L, value); } + /// Sets `extent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve extentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageResolve.set_extent(this.segment(), index, value); return this; } + /// Sets `extent` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve extent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageResolve.set_extent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageResolve2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageResolve2.java new file mode 100644 index 00000000..89c4635a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageResolve2.java @@ -0,0 +1,343 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcSubresource +/// [Byte offset][#OFFSET_srcSubresource] - [Memory layout][#ML_srcSubresource] - [Getter][#srcSubresource()] - [Setter][#srcSubresource(java.lang.foreign.MemorySegment)] +/// ### srcOffset +/// [Byte offset][#OFFSET_srcOffset] - [Memory layout][#ML_srcOffset] - [Getter][#srcOffset()] - [Setter][#srcOffset(java.lang.foreign.MemorySegment)] +/// ### dstSubresource +/// [Byte offset][#OFFSET_dstSubresource] - [Memory layout][#ML_dstSubresource] - [Getter][#dstSubresource()] - [Setter][#dstSubresource(java.lang.foreign.MemorySegment)] +/// ### dstOffset +/// [Byte offset][#OFFSET_dstOffset] - [Memory layout][#ML_dstOffset] - [Getter][#dstOffset()] - [Setter][#dstOffset(java.lang.foreign.MemorySegment)] +/// ### extent +/// [Byte offset][#OFFSET_extent] - [Memory layout][#ML_extent] - [Getter][#extent()] - [Setter][#extent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageResolve2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageSubresourceLayers srcSubresource; +/// VkOffset3D srcOffset; +/// VkImageSubresourceLayers dstSubresource; +/// VkOffset3D dstOffset; +/// VkExtent3D extent; +/// } VkImageResolve2; +/// ``` +public final class VkImageResolve2 extends Struct { + /// The struct layout of `VkImageResolve2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("srcSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("srcOffset"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("dstSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("dstOffset"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("extent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `srcSubresource`. + public static final long OFFSET_srcSubresource = LAYOUT.byteOffset(PathElement.groupElement("srcSubresource")); + /// The memory layout of `srcSubresource`. + public static final MemoryLayout ML_srcSubresource = LAYOUT.select(PathElement.groupElement("srcSubresource")); + /// The byte offset of `srcOffset`. + public static final long OFFSET_srcOffset = LAYOUT.byteOffset(PathElement.groupElement("srcOffset")); + /// The memory layout of `srcOffset`. + public static final MemoryLayout ML_srcOffset = LAYOUT.select(PathElement.groupElement("srcOffset")); + /// The byte offset of `dstSubresource`. + public static final long OFFSET_dstSubresource = LAYOUT.byteOffset(PathElement.groupElement("dstSubresource")); + /// The memory layout of `dstSubresource`. + public static final MemoryLayout ML_dstSubresource = LAYOUT.select(PathElement.groupElement("dstSubresource")); + /// The byte offset of `dstOffset`. + public static final long OFFSET_dstOffset = LAYOUT.byteOffset(PathElement.groupElement("dstOffset")); + /// The memory layout of `dstOffset`. + public static final MemoryLayout ML_dstOffset = LAYOUT.select(PathElement.groupElement("dstOffset")); + /// The byte offset of `extent`. + public static final long OFFSET_extent = LAYOUT.byteOffset(PathElement.groupElement("extent")); + /// The memory layout of `extent`. + public static final MemoryLayout ML_extent = LAYOUT.select(PathElement.groupElement("extent")); + + /// Creates `VkImageResolve2` with the given segment. + /// @param segment the memory segment + public VkImageResolve2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageResolve2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageResolve2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageResolve2(segment); } + + /// Creates `VkImageResolve2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageResolve2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageResolve2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageResolve2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageResolve2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageResolve2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageResolve2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageResolve2` + public static VkImageResolve2 alloc(SegmentAllocator allocator) { return new VkImageResolve2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageResolve2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageResolve2` + public static VkImageResolve2 alloc(SegmentAllocator allocator, long count) { return new VkImageResolve2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageResolve2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageResolve2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageResolve2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageResolve2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve2 sTypeAt(long index, @CType("VkStructureType") int value) { VkImageResolve2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve2 sType(@CType("VkStructureType") int value) { VkImageResolve2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageResolve2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageResolve2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageResolve2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource); } + /// {@return `srcSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_srcSubresource(MemorySegment segment) { return VkImageResolve2.get_srcSubresource(segment, 0L); } + /// {@return `srcSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresourceAt(long index) { return VkImageResolve2.get_srcSubresource(this.segment(), index); } + /// {@return `srcSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment srcSubresource() { return VkImageResolve2.get_srcSubresource(this.segment()); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcSubresource, index), ML_srcSubresource.byteSize()); } + /// Sets `srcSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_srcSubresource(segment, 0L, value); } + /// Sets `srcSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve2 srcSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_srcSubresource(this.segment(), index, value); return this; } + /// Sets `srcSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve2 srcSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_srcSubresource(this.segment(), value); return this; } + + /// {@return `srcOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_srcOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_srcOffset, index), ML_srcOffset); } + /// {@return `srcOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_srcOffset(MemorySegment segment) { return VkImageResolve2.get_srcOffset(segment, 0L); } + /// {@return `srcOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment srcOffsetAt(long index) { return VkImageResolve2.get_srcOffset(this.segment(), index); } + /// {@return `srcOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment srcOffset() { return VkImageResolve2.get_srcOffset(this.segment()); } + /// Sets `srcOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_srcOffset, index), ML_srcOffset.byteSize()); } + /// Sets `srcOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_srcOffset(segment, 0L, value); } + /// Sets `srcOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve2 srcOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_srcOffset(this.segment(), index, value); return this; } + /// Sets `srcOffset` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve2 srcOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_srcOffset(this.segment(), value); return this; } + + /// {@return `dstSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource); } + /// {@return `dstSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_dstSubresource(MemorySegment segment) { return VkImageResolve2.get_dstSubresource(segment, 0L); } + /// {@return `dstSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresourceAt(long index) { return VkImageResolve2.get_dstSubresource(this.segment(), index); } + /// {@return `dstSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment dstSubresource() { return VkImageResolve2.get_dstSubresource(this.segment()); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstSubresource, index), ML_dstSubresource.byteSize()); } + /// Sets `dstSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_dstSubresource(segment, 0L, value); } + /// Sets `dstSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve2 dstSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_dstSubresource(this.segment(), index, value); return this; } + /// Sets `dstSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve2 dstSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_dstSubresource(this.segment(), value); return this; } + + /// {@return `dstOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_dstOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_dstOffset, index), ML_dstOffset); } + /// {@return `dstOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_dstOffset(MemorySegment segment) { return VkImageResolve2.get_dstOffset(segment, 0L); } + /// {@return `dstOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment dstOffsetAt(long index) { return VkImageResolve2.get_dstOffset(this.segment(), index); } + /// {@return `dstOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment dstOffset() { return VkImageResolve2.get_dstOffset(this.segment()); } + /// Sets `dstOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_dstOffset, index), ML_dstOffset.byteSize()); } + /// Sets `dstOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_dstOffset(segment, 0L, value); } + /// Sets `dstOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve2 dstOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_dstOffset(this.segment(), index, value); return this; } + /// Sets `dstOffset` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve2 dstOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_dstOffset(this.segment(), value); return this; } + + /// {@return `extent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_extent, index), ML_extent); } + /// {@return `extent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment) { return VkImageResolve2.get_extent(segment, 0L); } + /// {@return `extent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extentAt(long index) { return VkImageResolve2.get_extent(this.segment(), index); } + /// {@return `extent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extent() { return VkImageResolve2.get_extent(this.segment()); } + /// Sets `extent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_extent, index), ML_extent.byteSize()); } + /// Sets `extent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_extent(segment, 0L, value); } + /// Sets `extent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageResolve2 extentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_extent(this.segment(), index, value); return this; } + /// Sets `extent` with the given value. + /// @param value the value + /// @return `this` + public VkImageResolve2 extent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageResolve2.set_extent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSparseMemoryRequirementsInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSparseMemoryRequirementsInfo2.java new file mode 100644 index 00000000..7f6f5c54 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSparseMemoryRequirementsInfo2.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageSparseMemoryRequirementsInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage image; +/// } VkImageSparseMemoryRequirementsInfo2; +/// ``` +public final class VkImageSparseMemoryRequirementsInfo2 extends Struct { + /// The struct layout of `VkImageSparseMemoryRequirementsInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("image") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + + /// Creates `VkImageSparseMemoryRequirementsInfo2` with the given segment. + /// @param segment the memory segment + public VkImageSparseMemoryRequirementsInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageSparseMemoryRequirementsInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSparseMemoryRequirementsInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSparseMemoryRequirementsInfo2(segment); } + + /// Creates `VkImageSparseMemoryRequirementsInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSparseMemoryRequirementsInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSparseMemoryRequirementsInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageSparseMemoryRequirementsInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSparseMemoryRequirementsInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSparseMemoryRequirementsInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageSparseMemoryRequirementsInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageSparseMemoryRequirementsInfo2` + public static VkImageSparseMemoryRequirementsInfo2 alloc(SegmentAllocator allocator) { return new VkImageSparseMemoryRequirementsInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageSparseMemoryRequirementsInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageSparseMemoryRequirementsInfo2` + public static VkImageSparseMemoryRequirementsInfo2 alloc(SegmentAllocator allocator, long count) { return new VkImageSparseMemoryRequirementsInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageSparseMemoryRequirementsInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageSparseMemoryRequirementsInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageSparseMemoryRequirementsInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageSparseMemoryRequirementsInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSparseMemoryRequirementsInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkImageSparseMemoryRequirementsInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageSparseMemoryRequirementsInfo2 sType(@CType("VkStructureType") int value) { VkImageSparseMemoryRequirementsInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageSparseMemoryRequirementsInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageSparseMemoryRequirementsInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageSparseMemoryRequirementsInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageSparseMemoryRequirementsInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSparseMemoryRequirementsInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageSparseMemoryRequirementsInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageSparseMemoryRequirementsInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageSparseMemoryRequirementsInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkImageSparseMemoryRequirementsInfo2.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkImageSparseMemoryRequirementsInfo2.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkImageSparseMemoryRequirementsInfo2.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageSparseMemoryRequirementsInfo2.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSparseMemoryRequirementsInfo2 imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageSparseMemoryRequirementsInfo2.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkImageSparseMemoryRequirementsInfo2 image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageSparseMemoryRequirementsInfo2.set_image(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageStencilUsageCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageStencilUsageCreateInfo.java new file mode 100644 index 00000000..155ffb31 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageStencilUsageCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stencilUsage +/// [VarHandle][#VH_stencilUsage] - [Getter][#stencilUsage()] - [Setter][#stencilUsage(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageStencilUsageCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageUsageFlags stencilUsage; +/// } VkImageStencilUsageCreateInfo; +/// ``` +public final class VkImageStencilUsageCreateInfo extends Struct { + /// The struct layout of `VkImageStencilUsageCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stencilUsage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stencilUsage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilUsage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilUsage")); + + /// Creates `VkImageStencilUsageCreateInfo` with the given segment. + /// @param segment the memory segment + public VkImageStencilUsageCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageStencilUsageCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageStencilUsageCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageStencilUsageCreateInfo(segment); } + + /// Creates `VkImageStencilUsageCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageStencilUsageCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageStencilUsageCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageStencilUsageCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageStencilUsageCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageStencilUsageCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageStencilUsageCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageStencilUsageCreateInfo` + public static VkImageStencilUsageCreateInfo alloc(SegmentAllocator allocator) { return new VkImageStencilUsageCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageStencilUsageCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageStencilUsageCreateInfo` + public static VkImageStencilUsageCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkImageStencilUsageCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageStencilUsageCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageStencilUsageCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageStencilUsageCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageStencilUsageCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageStencilUsageCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkImageStencilUsageCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageStencilUsageCreateInfo sType(@CType("VkStructureType") int value) { VkImageStencilUsageCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageStencilUsageCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageStencilUsageCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageStencilUsageCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageStencilUsageCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageStencilUsageCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageStencilUsageCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageStencilUsageCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageStencilUsageCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `stencilUsage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_stencilUsage(MemorySegment segment, long index) { return (int) VH_stencilUsage.get(segment, 0L, index); } + /// {@return `stencilUsage`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_stencilUsage(MemorySegment segment) { return VkImageStencilUsageCreateInfo.get_stencilUsage(segment, 0L); } + /// {@return `stencilUsage` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int stencilUsageAt(long index) { return VkImageStencilUsageCreateInfo.get_stencilUsage(this.segment(), index); } + /// {@return `stencilUsage`} + public @CType("VkImageUsageFlags") int stencilUsage() { return VkImageStencilUsageCreateInfo.get_stencilUsage(this.segment()); } + /// Sets `stencilUsage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilUsage(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_stencilUsage.set(segment, 0L, index, value); } + /// Sets `stencilUsage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilUsage(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkImageStencilUsageCreateInfo.set_stencilUsage(segment, 0L, value); } + /// Sets `stencilUsage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageStencilUsageCreateInfo stencilUsageAt(long index, @CType("VkImageUsageFlags") int value) { VkImageStencilUsageCreateInfo.set_stencilUsage(this.segment(), index, value); return this; } + /// Sets `stencilUsage` with the given value. + /// @param value the value + /// @return `this` + public VkImageStencilUsageCreateInfo stencilUsage(@CType("VkImageUsageFlags") int value) { VkImageStencilUsageCreateInfo.set_stencilUsage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresource.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresource.java new file mode 100644 index 00000000..5bb18eb4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresource.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### aspectMask +/// [VarHandle][#VH_aspectMask] - [Getter][#aspectMask()] - [Setter][#aspectMask(int)] +/// ### mipLevel +/// [VarHandle][#VH_mipLevel] - [Getter][#mipLevel()] - [Setter][#mipLevel(int)] +/// ### arrayLayer +/// [VarHandle][#VH_arrayLayer] - [Getter][#arrayLayer()] - [Setter][#arrayLayer(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageSubresource { +/// VkImageAspectFlags aspectMask; +/// uint32_t mipLevel; +/// uint32_t arrayLayer; +/// } VkImageSubresource; +/// ``` +public final class VkImageSubresource extends Struct { + /// The struct layout of `VkImageSubresource`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("aspectMask"), + ValueLayout.JAVA_INT.withName("mipLevel"), + ValueLayout.JAVA_INT.withName("arrayLayer") + ); + /// The [VarHandle] of `aspectMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspectMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspectMask")); + /// The [VarHandle] of `mipLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mipLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mipLevel")); + /// The [VarHandle] of `arrayLayer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_arrayLayer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("arrayLayer")); + + /// Creates `VkImageSubresource` with the given segment. + /// @param segment the memory segment + public VkImageSubresource(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageSubresource` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresource of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresource(segment); } + + /// Creates `VkImageSubresource` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresource ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresource(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageSubresource` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresource ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresource(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageSubresource` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageSubresource` + public static VkImageSubresource alloc(SegmentAllocator allocator) { return new VkImageSubresource(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageSubresource` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageSubresource` + public static VkImageSubresource alloc(SegmentAllocator allocator, long count) { return new VkImageSubresource(allocator.allocate(LAYOUT, count)); } + + /// {@return `aspectMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment, long index) { return (int) VH_aspectMask.get(segment, 0L, index); } + /// {@return `aspectMask`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment) { return VkImageSubresource.get_aspectMask(segment, 0L); } + /// {@return `aspectMask` at the given index} + /// @param index the index + public @CType("VkImageAspectFlags") int aspectMaskAt(long index) { return VkImageSubresource.get_aspectMask(this.segment(), index); } + /// {@return `aspectMask`} + public @CType("VkImageAspectFlags") int aspectMask() { return VkImageSubresource.get_aspectMask(this.segment()); } + /// Sets `aspectMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspectMask(MemorySegment segment, long index, @CType("VkImageAspectFlags") int value) { VH_aspectMask.set(segment, 0L, index, value); } + /// Sets `aspectMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspectMask(MemorySegment segment, @CType("VkImageAspectFlags") int value) { VkImageSubresource.set_aspectMask(segment, 0L, value); } + /// Sets `aspectMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresource aspectMaskAt(long index, @CType("VkImageAspectFlags") int value) { VkImageSubresource.set_aspectMask(this.segment(), index, value); return this; } + /// Sets `aspectMask` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresource aspectMask(@CType("VkImageAspectFlags") int value) { VkImageSubresource.set_aspectMask(this.segment(), value); return this; } + + /// {@return `mipLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_mipLevel(MemorySegment segment, long index) { return (int) VH_mipLevel.get(segment, 0L, index); } + /// {@return `mipLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_mipLevel(MemorySegment segment) { return VkImageSubresource.get_mipLevel(segment, 0L); } + /// {@return `mipLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int mipLevelAt(long index) { return VkImageSubresource.get_mipLevel(this.segment(), index); } + /// {@return `mipLevel`} + public @CType("uint32_t") int mipLevel() { return VkImageSubresource.get_mipLevel(this.segment()); } + /// Sets `mipLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mipLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_mipLevel.set(segment, 0L, index, value); } + /// Sets `mipLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mipLevel(MemorySegment segment, @CType("uint32_t") int value) { VkImageSubresource.set_mipLevel(segment, 0L, value); } + /// Sets `mipLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresource mipLevelAt(long index, @CType("uint32_t") int value) { VkImageSubresource.set_mipLevel(this.segment(), index, value); return this; } + /// Sets `mipLevel` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresource mipLevel(@CType("uint32_t") int value) { VkImageSubresource.set_mipLevel(this.segment(), value); return this; } + + /// {@return `arrayLayer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_arrayLayer(MemorySegment segment, long index) { return (int) VH_arrayLayer.get(segment, 0L, index); } + /// {@return `arrayLayer`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_arrayLayer(MemorySegment segment) { return VkImageSubresource.get_arrayLayer(segment, 0L); } + /// {@return `arrayLayer` at the given index} + /// @param index the index + public @CType("uint32_t") int arrayLayerAt(long index) { return VkImageSubresource.get_arrayLayer(this.segment(), index); } + /// {@return `arrayLayer`} + public @CType("uint32_t") int arrayLayer() { return VkImageSubresource.get_arrayLayer(this.segment()); } + /// Sets `arrayLayer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_arrayLayer(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_arrayLayer.set(segment, 0L, index, value); } + /// Sets `arrayLayer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_arrayLayer(MemorySegment segment, @CType("uint32_t") int value) { VkImageSubresource.set_arrayLayer(segment, 0L, value); } + /// Sets `arrayLayer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresource arrayLayerAt(long index, @CType("uint32_t") int value) { VkImageSubresource.set_arrayLayer(this.segment(), index, value); return this; } + /// Sets `arrayLayer` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresource arrayLayer(@CType("uint32_t") int value) { VkImageSubresource.set_arrayLayer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresource2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresource2.java new file mode 100644 index 00000000..95d9d54c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresource2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageSubresource +/// [Byte offset][#OFFSET_imageSubresource] - [Memory layout][#ML_imageSubresource] - [Getter][#imageSubresource()] - [Setter][#imageSubresource(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageSubresource2 { +/// VkStructureType sType; +/// void * pNext; +/// VkImageSubresource imageSubresource; +/// } VkImageSubresource2; +/// ``` +public final class VkImageSubresource2 extends Struct { + /// The struct layout of `VkImageSubresource2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkImageSubresource.LAYOUT.withName("imageSubresource") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `imageSubresource`. + public static final long OFFSET_imageSubresource = LAYOUT.byteOffset(PathElement.groupElement("imageSubresource")); + /// The memory layout of `imageSubresource`. + public static final MemoryLayout ML_imageSubresource = LAYOUT.select(PathElement.groupElement("imageSubresource")); + + /// Creates `VkImageSubresource2` with the given segment. + /// @param segment the memory segment + public VkImageSubresource2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageSubresource2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresource2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresource2(segment); } + + /// Creates `VkImageSubresource2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresource2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresource2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageSubresource2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresource2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresource2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageSubresource2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageSubresource2` + public static VkImageSubresource2 alloc(SegmentAllocator allocator) { return new VkImageSubresource2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageSubresource2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageSubresource2` + public static VkImageSubresource2 alloc(SegmentAllocator allocator, long count) { return new VkImageSubresource2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageSubresource2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageSubresource2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageSubresource2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageSubresource2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresource2 sTypeAt(long index, @CType("VkStructureType") int value) { VkImageSubresource2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresource2 sType(@CType("VkStructureType") int value) { VkImageSubresource2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageSubresource2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageSubresource2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkImageSubresource2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageSubresource2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresource2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageSubresource2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresource2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkImageSubresource2.set_pNext(this.segment(), value); return this; } + + /// {@return `imageSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresource") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource); } + /// {@return `imageSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresource") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment) { return VkImageSubresource2.get_imageSubresource(segment, 0L); } + /// {@return `imageSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresource") java.lang.foreign.MemorySegment imageSubresourceAt(long index) { return VkImageSubresource2.get_imageSubresource(this.segment(), index); } + /// {@return `imageSubresource`} + public @CType("VkImageSubresource") java.lang.foreign.MemorySegment imageSubresource() { return VkImageSubresource2.get_imageSubresource(this.segment()); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, long index, @CType("VkImageSubresource") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource.byteSize()); } + /// Sets `imageSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, @CType("VkImageSubresource") java.lang.foreign.MemorySegment value) { VkImageSubresource2.set_imageSubresource(segment, 0L, value); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresource2 imageSubresourceAt(long index, @CType("VkImageSubresource") java.lang.foreign.MemorySegment value) { VkImageSubresource2.set_imageSubresource(this.segment(), index, value); return this; } + /// Sets `imageSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresource2 imageSubresource(@CType("VkImageSubresource") java.lang.foreign.MemorySegment value) { VkImageSubresource2.set_imageSubresource(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresourceLayers.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresourceLayers.java new file mode 100644 index 00000000..163889ca --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresourceLayers.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### aspectMask +/// [VarHandle][#VH_aspectMask] - [Getter][#aspectMask()] - [Setter][#aspectMask(int)] +/// ### mipLevel +/// [VarHandle][#VH_mipLevel] - [Getter][#mipLevel()] - [Setter][#mipLevel(int)] +/// ### baseArrayLayer +/// [VarHandle][#VH_baseArrayLayer] - [Getter][#baseArrayLayer()] - [Setter][#baseArrayLayer(int)] +/// ### layerCount +/// [VarHandle][#VH_layerCount] - [Getter][#layerCount()] - [Setter][#layerCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageSubresourceLayers { +/// VkImageAspectFlags aspectMask; +/// uint32_t mipLevel; +/// uint32_t baseArrayLayer; +/// uint32_t layerCount; +/// } VkImageSubresourceLayers; +/// ``` +public final class VkImageSubresourceLayers extends Struct { + /// The struct layout of `VkImageSubresourceLayers`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("aspectMask"), + ValueLayout.JAVA_INT.withName("mipLevel"), + ValueLayout.JAVA_INT.withName("baseArrayLayer"), + ValueLayout.JAVA_INT.withName("layerCount") + ); + /// The [VarHandle] of `aspectMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspectMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspectMask")); + /// The [VarHandle] of `mipLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mipLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mipLevel")); + /// The [VarHandle] of `baseArrayLayer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_baseArrayLayer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("baseArrayLayer")); + /// The [VarHandle] of `layerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layerCount")); + + /// Creates `VkImageSubresourceLayers` with the given segment. + /// @param segment the memory segment + public VkImageSubresourceLayers(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageSubresourceLayers` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresourceLayers of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresourceLayers(segment); } + + /// Creates `VkImageSubresourceLayers` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresourceLayers ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresourceLayers(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageSubresourceLayers` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresourceLayers ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresourceLayers(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageSubresourceLayers` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageSubresourceLayers` + public static VkImageSubresourceLayers alloc(SegmentAllocator allocator) { return new VkImageSubresourceLayers(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageSubresourceLayers` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageSubresourceLayers` + public static VkImageSubresourceLayers alloc(SegmentAllocator allocator, long count) { return new VkImageSubresourceLayers(allocator.allocate(LAYOUT, count)); } + + /// {@return `aspectMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment, long index) { return (int) VH_aspectMask.get(segment, 0L, index); } + /// {@return `aspectMask`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment) { return VkImageSubresourceLayers.get_aspectMask(segment, 0L); } + /// {@return `aspectMask` at the given index} + /// @param index the index + public @CType("VkImageAspectFlags") int aspectMaskAt(long index) { return VkImageSubresourceLayers.get_aspectMask(this.segment(), index); } + /// {@return `aspectMask`} + public @CType("VkImageAspectFlags") int aspectMask() { return VkImageSubresourceLayers.get_aspectMask(this.segment()); } + /// Sets `aspectMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspectMask(MemorySegment segment, long index, @CType("VkImageAspectFlags") int value) { VH_aspectMask.set(segment, 0L, index, value); } + /// Sets `aspectMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspectMask(MemorySegment segment, @CType("VkImageAspectFlags") int value) { VkImageSubresourceLayers.set_aspectMask(segment, 0L, value); } + /// Sets `aspectMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresourceLayers aspectMaskAt(long index, @CType("VkImageAspectFlags") int value) { VkImageSubresourceLayers.set_aspectMask(this.segment(), index, value); return this; } + /// Sets `aspectMask` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresourceLayers aspectMask(@CType("VkImageAspectFlags") int value) { VkImageSubresourceLayers.set_aspectMask(this.segment(), value); return this; } + + /// {@return `mipLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_mipLevel(MemorySegment segment, long index) { return (int) VH_mipLevel.get(segment, 0L, index); } + /// {@return `mipLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_mipLevel(MemorySegment segment) { return VkImageSubresourceLayers.get_mipLevel(segment, 0L); } + /// {@return `mipLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int mipLevelAt(long index) { return VkImageSubresourceLayers.get_mipLevel(this.segment(), index); } + /// {@return `mipLevel`} + public @CType("uint32_t") int mipLevel() { return VkImageSubresourceLayers.get_mipLevel(this.segment()); } + /// Sets `mipLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mipLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_mipLevel.set(segment, 0L, index, value); } + /// Sets `mipLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mipLevel(MemorySegment segment, @CType("uint32_t") int value) { VkImageSubresourceLayers.set_mipLevel(segment, 0L, value); } + /// Sets `mipLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresourceLayers mipLevelAt(long index, @CType("uint32_t") int value) { VkImageSubresourceLayers.set_mipLevel(this.segment(), index, value); return this; } + /// Sets `mipLevel` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresourceLayers mipLevel(@CType("uint32_t") int value) { VkImageSubresourceLayers.set_mipLevel(this.segment(), value); return this; } + + /// {@return `baseArrayLayer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_baseArrayLayer(MemorySegment segment, long index) { return (int) VH_baseArrayLayer.get(segment, 0L, index); } + /// {@return `baseArrayLayer`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_baseArrayLayer(MemorySegment segment) { return VkImageSubresourceLayers.get_baseArrayLayer(segment, 0L); } + /// {@return `baseArrayLayer` at the given index} + /// @param index the index + public @CType("uint32_t") int baseArrayLayerAt(long index) { return VkImageSubresourceLayers.get_baseArrayLayer(this.segment(), index); } + /// {@return `baseArrayLayer`} + public @CType("uint32_t") int baseArrayLayer() { return VkImageSubresourceLayers.get_baseArrayLayer(this.segment()); } + /// Sets `baseArrayLayer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_baseArrayLayer(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_baseArrayLayer.set(segment, 0L, index, value); } + /// Sets `baseArrayLayer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_baseArrayLayer(MemorySegment segment, @CType("uint32_t") int value) { VkImageSubresourceLayers.set_baseArrayLayer(segment, 0L, value); } + /// Sets `baseArrayLayer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresourceLayers baseArrayLayerAt(long index, @CType("uint32_t") int value) { VkImageSubresourceLayers.set_baseArrayLayer(this.segment(), index, value); return this; } + /// Sets `baseArrayLayer` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresourceLayers baseArrayLayer(@CType("uint32_t") int value) { VkImageSubresourceLayers.set_baseArrayLayer(this.segment(), value); return this; } + + /// {@return `layerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_layerCount(MemorySegment segment, long index) { return (int) VH_layerCount.get(segment, 0L, index); } + /// {@return `layerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_layerCount(MemorySegment segment) { return VkImageSubresourceLayers.get_layerCount(segment, 0L); } + /// {@return `layerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int layerCountAt(long index) { return VkImageSubresourceLayers.get_layerCount(this.segment(), index); } + /// {@return `layerCount`} + public @CType("uint32_t") int layerCount() { return VkImageSubresourceLayers.get_layerCount(this.segment()); } + /// Sets `layerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_layerCount.set(segment, 0L, index, value); } + /// Sets `layerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layerCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageSubresourceLayers.set_layerCount(segment, 0L, value); } + /// Sets `layerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresourceLayers layerCountAt(long index, @CType("uint32_t") int value) { VkImageSubresourceLayers.set_layerCount(this.segment(), index, value); return this; } + /// Sets `layerCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresourceLayers layerCount(@CType("uint32_t") int value) { VkImageSubresourceLayers.set_layerCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresourceRange.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresourceRange.java new file mode 100644 index 00000000..2bced64b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageSubresourceRange.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### aspectMask +/// [VarHandle][#VH_aspectMask] - [Getter][#aspectMask()] - [Setter][#aspectMask(int)] +/// ### baseMipLevel +/// [VarHandle][#VH_baseMipLevel] - [Getter][#baseMipLevel()] - [Setter][#baseMipLevel(int)] +/// ### levelCount +/// [VarHandle][#VH_levelCount] - [Getter][#levelCount()] - [Setter][#levelCount(int)] +/// ### baseArrayLayer +/// [VarHandle][#VH_baseArrayLayer] - [Getter][#baseArrayLayer()] - [Setter][#baseArrayLayer(int)] +/// ### layerCount +/// [VarHandle][#VH_layerCount] - [Getter][#layerCount()] - [Setter][#layerCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageSubresourceRange { +/// VkImageAspectFlags aspectMask; +/// uint32_t baseMipLevel; +/// uint32_t levelCount; +/// uint32_t baseArrayLayer; +/// uint32_t layerCount; +/// } VkImageSubresourceRange; +/// ``` +public final class VkImageSubresourceRange extends Struct { + /// The struct layout of `VkImageSubresourceRange`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("aspectMask"), + ValueLayout.JAVA_INT.withName("baseMipLevel"), + ValueLayout.JAVA_INT.withName("levelCount"), + ValueLayout.JAVA_INT.withName("baseArrayLayer"), + ValueLayout.JAVA_INT.withName("layerCount") + ); + /// The [VarHandle] of `aspectMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspectMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspectMask")); + /// The [VarHandle] of `baseMipLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_baseMipLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("baseMipLevel")); + /// The [VarHandle] of `levelCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_levelCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("levelCount")); + /// The [VarHandle] of `baseArrayLayer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_baseArrayLayer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("baseArrayLayer")); + /// The [VarHandle] of `layerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layerCount")); + + /// Creates `VkImageSubresourceRange` with the given segment. + /// @param segment the memory segment + public VkImageSubresourceRange(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageSubresourceRange` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresourceRange of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresourceRange(segment); } + + /// Creates `VkImageSubresourceRange` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresourceRange ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresourceRange(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageSubresourceRange` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageSubresourceRange ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageSubresourceRange(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageSubresourceRange` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageSubresourceRange` + public static VkImageSubresourceRange alloc(SegmentAllocator allocator) { return new VkImageSubresourceRange(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageSubresourceRange` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageSubresourceRange` + public static VkImageSubresourceRange alloc(SegmentAllocator allocator, long count) { return new VkImageSubresourceRange(allocator.allocate(LAYOUT, count)); } + + /// {@return `aspectMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment, long index) { return (int) VH_aspectMask.get(segment, 0L, index); } + /// {@return `aspectMask`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment) { return VkImageSubresourceRange.get_aspectMask(segment, 0L); } + /// {@return `aspectMask` at the given index} + /// @param index the index + public @CType("VkImageAspectFlags") int aspectMaskAt(long index) { return VkImageSubresourceRange.get_aspectMask(this.segment(), index); } + /// {@return `aspectMask`} + public @CType("VkImageAspectFlags") int aspectMask() { return VkImageSubresourceRange.get_aspectMask(this.segment()); } + /// Sets `aspectMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspectMask(MemorySegment segment, long index, @CType("VkImageAspectFlags") int value) { VH_aspectMask.set(segment, 0L, index, value); } + /// Sets `aspectMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspectMask(MemorySegment segment, @CType("VkImageAspectFlags") int value) { VkImageSubresourceRange.set_aspectMask(segment, 0L, value); } + /// Sets `aspectMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresourceRange aspectMaskAt(long index, @CType("VkImageAspectFlags") int value) { VkImageSubresourceRange.set_aspectMask(this.segment(), index, value); return this; } + /// Sets `aspectMask` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresourceRange aspectMask(@CType("VkImageAspectFlags") int value) { VkImageSubresourceRange.set_aspectMask(this.segment(), value); return this; } + + /// {@return `baseMipLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_baseMipLevel(MemorySegment segment, long index) { return (int) VH_baseMipLevel.get(segment, 0L, index); } + /// {@return `baseMipLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_baseMipLevel(MemorySegment segment) { return VkImageSubresourceRange.get_baseMipLevel(segment, 0L); } + /// {@return `baseMipLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int baseMipLevelAt(long index) { return VkImageSubresourceRange.get_baseMipLevel(this.segment(), index); } + /// {@return `baseMipLevel`} + public @CType("uint32_t") int baseMipLevel() { return VkImageSubresourceRange.get_baseMipLevel(this.segment()); } + /// Sets `baseMipLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_baseMipLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_baseMipLevel.set(segment, 0L, index, value); } + /// Sets `baseMipLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_baseMipLevel(MemorySegment segment, @CType("uint32_t") int value) { VkImageSubresourceRange.set_baseMipLevel(segment, 0L, value); } + /// Sets `baseMipLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresourceRange baseMipLevelAt(long index, @CType("uint32_t") int value) { VkImageSubresourceRange.set_baseMipLevel(this.segment(), index, value); return this; } + /// Sets `baseMipLevel` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresourceRange baseMipLevel(@CType("uint32_t") int value) { VkImageSubresourceRange.set_baseMipLevel(this.segment(), value); return this; } + + /// {@return `levelCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_levelCount(MemorySegment segment, long index) { return (int) VH_levelCount.get(segment, 0L, index); } + /// {@return `levelCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_levelCount(MemorySegment segment) { return VkImageSubresourceRange.get_levelCount(segment, 0L); } + /// {@return `levelCount` at the given index} + /// @param index the index + public @CType("uint32_t") int levelCountAt(long index) { return VkImageSubresourceRange.get_levelCount(this.segment(), index); } + /// {@return `levelCount`} + public @CType("uint32_t") int levelCount() { return VkImageSubresourceRange.get_levelCount(this.segment()); } + /// Sets `levelCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_levelCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_levelCount.set(segment, 0L, index, value); } + /// Sets `levelCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_levelCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageSubresourceRange.set_levelCount(segment, 0L, value); } + /// Sets `levelCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresourceRange levelCountAt(long index, @CType("uint32_t") int value) { VkImageSubresourceRange.set_levelCount(this.segment(), index, value); return this; } + /// Sets `levelCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresourceRange levelCount(@CType("uint32_t") int value) { VkImageSubresourceRange.set_levelCount(this.segment(), value); return this; } + + /// {@return `baseArrayLayer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_baseArrayLayer(MemorySegment segment, long index) { return (int) VH_baseArrayLayer.get(segment, 0L, index); } + /// {@return `baseArrayLayer`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_baseArrayLayer(MemorySegment segment) { return VkImageSubresourceRange.get_baseArrayLayer(segment, 0L); } + /// {@return `baseArrayLayer` at the given index} + /// @param index the index + public @CType("uint32_t") int baseArrayLayerAt(long index) { return VkImageSubresourceRange.get_baseArrayLayer(this.segment(), index); } + /// {@return `baseArrayLayer`} + public @CType("uint32_t") int baseArrayLayer() { return VkImageSubresourceRange.get_baseArrayLayer(this.segment()); } + /// Sets `baseArrayLayer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_baseArrayLayer(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_baseArrayLayer.set(segment, 0L, index, value); } + /// Sets `baseArrayLayer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_baseArrayLayer(MemorySegment segment, @CType("uint32_t") int value) { VkImageSubresourceRange.set_baseArrayLayer(segment, 0L, value); } + /// Sets `baseArrayLayer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresourceRange baseArrayLayerAt(long index, @CType("uint32_t") int value) { VkImageSubresourceRange.set_baseArrayLayer(this.segment(), index, value); return this; } + /// Sets `baseArrayLayer` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresourceRange baseArrayLayer(@CType("uint32_t") int value) { VkImageSubresourceRange.set_baseArrayLayer(this.segment(), value); return this; } + + /// {@return `layerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_layerCount(MemorySegment segment, long index) { return (int) VH_layerCount.get(segment, 0L, index); } + /// {@return `layerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_layerCount(MemorySegment segment) { return VkImageSubresourceRange.get_layerCount(segment, 0L); } + /// {@return `layerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int layerCountAt(long index) { return VkImageSubresourceRange.get_layerCount(this.segment(), index); } + /// {@return `layerCount`} + public @CType("uint32_t") int layerCount() { return VkImageSubresourceRange.get_layerCount(this.segment()); } + /// Sets `layerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_layerCount.set(segment, 0L, index, value); } + /// Sets `layerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layerCount(MemorySegment segment, @CType("uint32_t") int value) { VkImageSubresourceRange.set_layerCount(segment, 0L, value); } + /// Sets `layerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageSubresourceRange layerCountAt(long index, @CType("uint32_t") int value) { VkImageSubresourceRange.set_layerCount(this.segment(), index, value); return this; } + /// Sets `layerCount` with the given value. + /// @param value the value + /// @return `this` + public VkImageSubresourceRange layerCount(@CType("uint32_t") int value) { VkImageSubresourceRange.set_layerCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageToMemoryCopy.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageToMemoryCopy.java new file mode 100644 index 00000000..bee8a6ab --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageToMemoryCopy.java @@ -0,0 +1,376 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pHostPointer +/// [VarHandle][#VH_pHostPointer] - [Getter][#pHostPointer()] - [Setter][#pHostPointer(java.lang.foreign.MemorySegment)] +/// ### memoryRowLength +/// [VarHandle][#VH_memoryRowLength] - [Getter][#memoryRowLength()] - [Setter][#memoryRowLength(int)] +/// ### memoryImageHeight +/// [VarHandle][#VH_memoryImageHeight] - [Getter][#memoryImageHeight()] - [Setter][#memoryImageHeight(int)] +/// ### imageSubresource +/// [Byte offset][#OFFSET_imageSubresource] - [Memory layout][#ML_imageSubresource] - [Getter][#imageSubresource()] - [Setter][#imageSubresource(java.lang.foreign.MemorySegment)] +/// ### imageOffset +/// [Byte offset][#OFFSET_imageOffset] - [Memory layout][#ML_imageOffset] - [Getter][#imageOffset()] - [Setter][#imageOffset(java.lang.foreign.MemorySegment)] +/// ### imageExtent +/// [Byte offset][#OFFSET_imageExtent] - [Memory layout][#ML_imageExtent] - [Getter][#imageExtent()] - [Setter][#imageExtent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageToMemoryCopy { +/// VkStructureType sType; +/// const void * pNext; +/// void * pHostPointer; +/// uint32_t memoryRowLength; +/// uint32_t memoryImageHeight; +/// VkImageSubresourceLayers imageSubresource; +/// VkOffset3D imageOffset; +/// VkExtent3D imageExtent; +/// } VkImageToMemoryCopy; +/// ``` +public final class VkImageToMemoryCopy extends Struct { + /// The struct layout of `VkImageToMemoryCopy`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pHostPointer"), + ValueLayout.JAVA_INT.withName("memoryRowLength"), + ValueLayout.JAVA_INT.withName("memoryImageHeight"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("imageSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("imageOffset"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("imageExtent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pHostPointer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pHostPointer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pHostPointer")); + /// The [VarHandle] of `memoryRowLength` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryRowLength = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryRowLength")); + /// The [VarHandle] of `memoryImageHeight` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryImageHeight = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryImageHeight")); + /// The byte offset of `imageSubresource`. + public static final long OFFSET_imageSubresource = LAYOUT.byteOffset(PathElement.groupElement("imageSubresource")); + /// The memory layout of `imageSubresource`. + public static final MemoryLayout ML_imageSubresource = LAYOUT.select(PathElement.groupElement("imageSubresource")); + /// The byte offset of `imageOffset`. + public static final long OFFSET_imageOffset = LAYOUT.byteOffset(PathElement.groupElement("imageOffset")); + /// The memory layout of `imageOffset`. + public static final MemoryLayout ML_imageOffset = LAYOUT.select(PathElement.groupElement("imageOffset")); + /// The byte offset of `imageExtent`. + public static final long OFFSET_imageExtent = LAYOUT.byteOffset(PathElement.groupElement("imageExtent")); + /// The memory layout of `imageExtent`. + public static final MemoryLayout ML_imageExtent = LAYOUT.select(PathElement.groupElement("imageExtent")); + + /// Creates `VkImageToMemoryCopy` with the given segment. + /// @param segment the memory segment + public VkImageToMemoryCopy(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageToMemoryCopy` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageToMemoryCopy of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageToMemoryCopy(segment); } + + /// Creates `VkImageToMemoryCopy` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageToMemoryCopy ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageToMemoryCopy(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageToMemoryCopy` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageToMemoryCopy ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageToMemoryCopy(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageToMemoryCopy` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageToMemoryCopy` + public static VkImageToMemoryCopy alloc(SegmentAllocator allocator) { return new VkImageToMemoryCopy(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageToMemoryCopy` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageToMemoryCopy` + public static VkImageToMemoryCopy alloc(SegmentAllocator allocator, long count) { return new VkImageToMemoryCopy(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageToMemoryCopy.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageToMemoryCopy.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageToMemoryCopy.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageToMemoryCopy.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy sTypeAt(long index, @CType("VkStructureType") int value) { VkImageToMemoryCopy.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy sType(@CType("VkStructureType") int value) { VkImageToMemoryCopy.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageToMemoryCopy.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageToMemoryCopy.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageToMemoryCopy.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_pNext(this.segment(), value); return this; } + + /// {@return `pHostPointer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pHostPointer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pHostPointer.get(segment, 0L, index); } + /// {@return `pHostPointer`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pHostPointer(MemorySegment segment) { return VkImageToMemoryCopy.get_pHostPointer(segment, 0L); } + /// {@return `pHostPointer` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pHostPointerAt(long index) { return VkImageToMemoryCopy.get_pHostPointer(this.segment(), index); } + /// {@return `pHostPointer`} + public @CType("void *") java.lang.foreign.MemorySegment pHostPointer() { return VkImageToMemoryCopy.get_pHostPointer(this.segment()); } + /// Sets `pHostPointer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pHostPointer(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pHostPointer.set(segment, 0L, index, value); } + /// Sets `pHostPointer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pHostPointer(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_pHostPointer(segment, 0L, value); } + /// Sets `pHostPointer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy pHostPointerAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_pHostPointer(this.segment(), index, value); return this; } + /// Sets `pHostPointer` with the given value. + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy pHostPointer(@CType("void *") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_pHostPointer(this.segment(), value); return this; } + + /// {@return `memoryRowLength` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryRowLength(MemorySegment segment, long index) { return (int) VH_memoryRowLength.get(segment, 0L, index); } + /// {@return `memoryRowLength`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryRowLength(MemorySegment segment) { return VkImageToMemoryCopy.get_memoryRowLength(segment, 0L); } + /// {@return `memoryRowLength` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryRowLengthAt(long index) { return VkImageToMemoryCopy.get_memoryRowLength(this.segment(), index); } + /// {@return `memoryRowLength`} + public @CType("uint32_t") int memoryRowLength() { return VkImageToMemoryCopy.get_memoryRowLength(this.segment()); } + /// Sets `memoryRowLength` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryRowLength(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryRowLength.set(segment, 0L, index, value); } + /// Sets `memoryRowLength` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryRowLength(MemorySegment segment, @CType("uint32_t") int value) { VkImageToMemoryCopy.set_memoryRowLength(segment, 0L, value); } + /// Sets `memoryRowLength` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy memoryRowLengthAt(long index, @CType("uint32_t") int value) { VkImageToMemoryCopy.set_memoryRowLength(this.segment(), index, value); return this; } + /// Sets `memoryRowLength` with the given value. + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy memoryRowLength(@CType("uint32_t") int value) { VkImageToMemoryCopy.set_memoryRowLength(this.segment(), value); return this; } + + /// {@return `memoryImageHeight` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryImageHeight(MemorySegment segment, long index) { return (int) VH_memoryImageHeight.get(segment, 0L, index); } + /// {@return `memoryImageHeight`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryImageHeight(MemorySegment segment) { return VkImageToMemoryCopy.get_memoryImageHeight(segment, 0L); } + /// {@return `memoryImageHeight` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryImageHeightAt(long index) { return VkImageToMemoryCopy.get_memoryImageHeight(this.segment(), index); } + /// {@return `memoryImageHeight`} + public @CType("uint32_t") int memoryImageHeight() { return VkImageToMemoryCopy.get_memoryImageHeight(this.segment()); } + /// Sets `memoryImageHeight` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryImageHeight(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryImageHeight.set(segment, 0L, index, value); } + /// Sets `memoryImageHeight` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryImageHeight(MemorySegment segment, @CType("uint32_t") int value) { VkImageToMemoryCopy.set_memoryImageHeight(segment, 0L, value); } + /// Sets `memoryImageHeight` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy memoryImageHeightAt(long index, @CType("uint32_t") int value) { VkImageToMemoryCopy.set_memoryImageHeight(this.segment(), index, value); return this; } + /// Sets `memoryImageHeight` with the given value. + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy memoryImageHeight(@CType("uint32_t") int value) { VkImageToMemoryCopy.set_memoryImageHeight(this.segment(), value); return this; } + + /// {@return `imageSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource); } + /// {@return `imageSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment) { return VkImageToMemoryCopy.get_imageSubresource(segment, 0L); } + /// {@return `imageSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment imageSubresourceAt(long index) { return VkImageToMemoryCopy.get_imageSubresource(this.segment(), index); } + /// {@return `imageSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment imageSubresource() { return VkImageToMemoryCopy.get_imageSubresource(this.segment()); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource.byteSize()); } + /// Sets `imageSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_imageSubresource(segment, 0L, value); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy imageSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_imageSubresource(this.segment(), index, value); return this; } + /// Sets `imageSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy imageSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_imageSubresource(this.segment(), value); return this; } + + /// {@return `imageOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_imageOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageOffset, index), ML_imageOffset); } + /// {@return `imageOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_imageOffset(MemorySegment segment) { return VkImageToMemoryCopy.get_imageOffset(segment, 0L); } + /// {@return `imageOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment imageOffsetAt(long index) { return VkImageToMemoryCopy.get_imageOffset(this.segment(), index); } + /// {@return `imageOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment imageOffset() { return VkImageToMemoryCopy.get_imageOffset(this.segment()); } + /// Sets `imageOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageOffset, index), ML_imageOffset.byteSize()); } + /// Sets `imageOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_imageOffset(segment, 0L, value); } + /// Sets `imageOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy imageOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_imageOffset(this.segment(), index, value); return this; } + /// Sets `imageOffset` with the given value. + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy imageOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_imageOffset(this.segment(), value); return this; } + + /// {@return `imageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent); } + /// {@return `imageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment) { return VkImageToMemoryCopy.get_imageExtent(segment, 0L); } + /// {@return `imageExtent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageExtentAt(long index) { return VkImageToMemoryCopy.get_imageExtent(this.segment(), index); } + /// {@return `imageExtent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageExtent() { return VkImageToMemoryCopy.get_imageExtent(this.segment()); } + /// Sets `imageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageExtent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent.byteSize()); } + /// Sets `imageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageExtent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_imageExtent(segment, 0L, value); } + /// Sets `imageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy imageExtentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_imageExtent(this.segment(), index, value); return this; } + /// Sets `imageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkImageToMemoryCopy imageExtent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkImageToMemoryCopy.set_imageExtent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageViewCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageViewCreateInfo.java new file mode 100644 index 00000000..5c66d878 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageViewCreateInfo.java @@ -0,0 +1,374 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### viewType +/// [VarHandle][#VH_viewType] - [Getter][#viewType()] - [Setter][#viewType(int)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### components +/// [Byte offset][#OFFSET_components] - [Memory layout][#ML_components] - [Getter][#components()] - [Setter][#components(java.lang.foreign.MemorySegment)] +/// ### subresourceRange +/// [Byte offset][#OFFSET_subresourceRange] - [Memory layout][#ML_subresourceRange] - [Getter][#subresourceRange()] - [Setter][#subresourceRange(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageViewCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageViewCreateFlags flags; +/// VkImage image; +/// VkImageViewType viewType; +/// VkFormat format; +/// VkComponentMapping components; +/// VkImageSubresourceRange subresourceRange; +/// } VkImageViewCreateInfo; +/// ``` +public final class VkImageViewCreateInfo extends Struct { + /// The struct layout of `VkImageViewCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("image"), + ValueLayout.JAVA_INT.withName("viewType"), + ValueLayout.JAVA_INT.withName("format"), + overrungl.vulkan.struct.VkComponentMapping.LAYOUT.withName("components"), + overrungl.vulkan.struct.VkImageSubresourceRange.LAYOUT.withName("subresourceRange") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The [VarHandle] of `viewType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewType")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The byte offset of `components`. + public static final long OFFSET_components = LAYOUT.byteOffset(PathElement.groupElement("components")); + /// The memory layout of `components`. + public static final MemoryLayout ML_components = LAYOUT.select(PathElement.groupElement("components")); + /// The byte offset of `subresourceRange`. + public static final long OFFSET_subresourceRange = LAYOUT.byteOffset(PathElement.groupElement("subresourceRange")); + /// The memory layout of `subresourceRange`. + public static final MemoryLayout ML_subresourceRange = LAYOUT.select(PathElement.groupElement("subresourceRange")); + + /// Creates `VkImageViewCreateInfo` with the given segment. + /// @param segment the memory segment + public VkImageViewCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageViewCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewCreateInfo(segment); } + + /// Creates `VkImageViewCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageViewCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageViewCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageViewCreateInfo` + public static VkImageViewCreateInfo alloc(SegmentAllocator allocator) { return new VkImageViewCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageViewCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageViewCreateInfo` + public static VkImageViewCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkImageViewCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageViewCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageViewCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageViewCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageViewCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkImageViewCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo sType(@CType("VkStructureType") int value) { VkImageViewCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageViewCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageViewCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageViewCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageViewCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkImageViewCreateFlags") int get_flags(MemorySegment segment) { return VkImageViewCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkImageViewCreateFlags") int flagsAt(long index) { return VkImageViewCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkImageViewCreateFlags") int flags() { return VkImageViewCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkImageViewCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkImageViewCreateFlags") int value) { VkImageViewCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo flagsAt(long index, @CType("VkImageViewCreateFlags") int value) { VkImageViewCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo flags(@CType("VkImageViewCreateFlags") int value) { VkImageViewCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkImageViewCreateInfo.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkImageViewCreateInfo.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkImageViewCreateInfo.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_image(this.segment(), value); return this; } + + /// {@return `viewType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageViewType") int get_viewType(MemorySegment segment, long index) { return (int) VH_viewType.get(segment, 0L, index); } + /// {@return `viewType`} + /// @param segment the segment of the struct + public static @CType("VkImageViewType") int get_viewType(MemorySegment segment) { return VkImageViewCreateInfo.get_viewType(segment, 0L); } + /// {@return `viewType` at the given index} + /// @param index the index + public @CType("VkImageViewType") int viewTypeAt(long index) { return VkImageViewCreateInfo.get_viewType(this.segment(), index); } + /// {@return `viewType`} + public @CType("VkImageViewType") int viewType() { return VkImageViewCreateInfo.get_viewType(this.segment()); } + /// Sets `viewType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewType(MemorySegment segment, long index, @CType("VkImageViewType") int value) { VH_viewType.set(segment, 0L, index, value); } + /// Sets `viewType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewType(MemorySegment segment, @CType("VkImageViewType") int value) { VkImageViewCreateInfo.set_viewType(segment, 0L, value); } + /// Sets `viewType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo viewTypeAt(long index, @CType("VkImageViewType") int value) { VkImageViewCreateInfo.set_viewType(this.segment(), index, value); return this; } + /// Sets `viewType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo viewType(@CType("VkImageViewType") int value) { VkImageViewCreateInfo.set_viewType(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkImageViewCreateInfo.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkImageViewCreateInfo.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkImageViewCreateInfo.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkImageViewCreateInfo.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo formatAt(long index, @CType("VkFormat") int value) { VkImageViewCreateInfo.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo format(@CType("VkFormat") int value) { VkImageViewCreateInfo.set_format(this.segment(), value); return this; } + + /// {@return `components` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_components(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_components, index), ML_components); } + /// {@return `components`} + /// @param segment the segment of the struct + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_components(MemorySegment segment) { return VkImageViewCreateInfo.get_components(segment, 0L); } + /// {@return `components` at the given index} + /// @param index the index + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment componentsAt(long index) { return VkImageViewCreateInfo.get_components(this.segment(), index); } + /// {@return `components`} + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment components() { return VkImageViewCreateInfo.get_components(this.segment()); } + /// Sets `components` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_components(MemorySegment segment, long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_components, index), ML_components.byteSize()); } + /// Sets `components` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_components(MemorySegment segment, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_components(segment, 0L, value); } + /// Sets `components` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo componentsAt(long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_components(this.segment(), index, value); return this; } + /// Sets `components` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo components(@CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_components(this.segment(), value); return this; } + + /// {@return `subresourceRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment get_subresourceRange(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_subresourceRange, index), ML_subresourceRange); } + /// {@return `subresourceRange`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment get_subresourceRange(MemorySegment segment) { return VkImageViewCreateInfo.get_subresourceRange(segment, 0L); } + /// {@return `subresourceRange` at the given index} + /// @param index the index + public @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment subresourceRangeAt(long index) { return VkImageViewCreateInfo.get_subresourceRange(this.segment(), index); } + /// {@return `subresourceRange`} + public @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment subresourceRange() { return VkImageViewCreateInfo.get_subresourceRange(this.segment()); } + /// Sets `subresourceRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subresourceRange(MemorySegment segment, long index, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_subresourceRange, index), ML_subresourceRange.byteSize()); } + /// Sets `subresourceRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subresourceRange(MemorySegment segment, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_subresourceRange(segment, 0L, value); } + /// Sets `subresourceRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo subresourceRangeAt(long index, @CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_subresourceRange(this.segment(), index, value); return this; } + /// Sets `subresourceRange` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewCreateInfo subresourceRange(@CType("VkImageSubresourceRange") java.lang.foreign.MemorySegment value) { VkImageViewCreateInfo.set_subresourceRange(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageViewUsageCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageViewUsageCreateInfo.java new file mode 100644 index 00000000..4d7f1c6d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkImageViewUsageCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkImageViewUsageCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageUsageFlags usage; +/// } VkImageViewUsageCreateInfo; +/// ``` +public final class VkImageViewUsageCreateInfo extends Struct { + /// The struct layout of `VkImageViewUsageCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("usage") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + + /// Creates `VkImageViewUsageCreateInfo` with the given segment. + /// @param segment the memory segment + public VkImageViewUsageCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkImageViewUsageCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewUsageCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewUsageCreateInfo(segment); } + + /// Creates `VkImageViewUsageCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewUsageCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewUsageCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkImageViewUsageCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkImageViewUsageCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkImageViewUsageCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkImageViewUsageCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkImageViewUsageCreateInfo` + public static VkImageViewUsageCreateInfo alloc(SegmentAllocator allocator) { return new VkImageViewUsageCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkImageViewUsageCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkImageViewUsageCreateInfo` + public static VkImageViewUsageCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkImageViewUsageCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkImageViewUsageCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkImageViewUsageCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkImageViewUsageCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkImageViewUsageCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewUsageCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkImageViewUsageCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewUsageCreateInfo sType(@CType("VkStructureType") int value) { VkImageViewUsageCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkImageViewUsageCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkImageViewUsageCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkImageViewUsageCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewUsageCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewUsageCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewUsageCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewUsageCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkImageViewUsageCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_usage(MemorySegment segment) { return VkImageViewUsageCreateInfo.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int usageAt(long index) { return VkImageViewUsageCreateInfo.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkImageUsageFlags") int usage() { return VkImageViewUsageCreateInfo.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkImageViewUsageCreateInfo.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkImageViewUsageCreateInfo usageAt(long index, @CType("VkImageUsageFlags") int value) { VkImageViewUsageCreateInfo.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkImageViewUsageCreateInfo usage(@CType("VkImageUsageFlags") int value) { VkImageViewUsageCreateInfo.set_usage(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkInputAttachmentAspectReference.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkInputAttachmentAspectReference.java new file mode 100644 index 00000000..b7bc3e85 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkInputAttachmentAspectReference.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### subpass +/// [VarHandle][#VH_subpass] - [Getter][#subpass()] - [Setter][#subpass(int)] +/// ### inputAttachmentIndex +/// [VarHandle][#VH_inputAttachmentIndex] - [Getter][#inputAttachmentIndex()] - [Setter][#inputAttachmentIndex(int)] +/// ### aspectMask +/// [VarHandle][#VH_aspectMask] - [Getter][#aspectMask()] - [Setter][#aspectMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkInputAttachmentAspectReference { +/// uint32_t subpass; +/// uint32_t inputAttachmentIndex; +/// VkImageAspectFlags aspectMask; +/// } VkInputAttachmentAspectReference; +/// ``` +public final class VkInputAttachmentAspectReference extends Struct { + /// The struct layout of `VkInputAttachmentAspectReference`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("subpass"), + ValueLayout.JAVA_INT.withName("inputAttachmentIndex"), + ValueLayout.JAVA_INT.withName("aspectMask") + ); + /// The [VarHandle] of `subpass` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpass")); + /// The [VarHandle] of `inputAttachmentIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inputAttachmentIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inputAttachmentIndex")); + /// The [VarHandle] of `aspectMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspectMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspectMask")); + + /// Creates `VkInputAttachmentAspectReference` with the given segment. + /// @param segment the memory segment + public VkInputAttachmentAspectReference(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkInputAttachmentAspectReference` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkInputAttachmentAspectReference of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkInputAttachmentAspectReference(segment); } + + /// Creates `VkInputAttachmentAspectReference` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkInputAttachmentAspectReference ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkInputAttachmentAspectReference(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkInputAttachmentAspectReference` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkInputAttachmentAspectReference ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkInputAttachmentAspectReference(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkInputAttachmentAspectReference` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkInputAttachmentAspectReference` + public static VkInputAttachmentAspectReference alloc(SegmentAllocator allocator) { return new VkInputAttachmentAspectReference(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkInputAttachmentAspectReference` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkInputAttachmentAspectReference` + public static VkInputAttachmentAspectReference alloc(SegmentAllocator allocator, long count) { return new VkInputAttachmentAspectReference(allocator.allocate(LAYOUT, count)); } + + /// {@return `subpass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subpass(MemorySegment segment, long index) { return (int) VH_subpass.get(segment, 0L, index); } + /// {@return `subpass`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subpass(MemorySegment segment) { return VkInputAttachmentAspectReference.get_subpass(segment, 0L); } + /// {@return `subpass` at the given index} + /// @param index the index + public @CType("uint32_t") int subpassAt(long index) { return VkInputAttachmentAspectReference.get_subpass(this.segment(), index); } + /// {@return `subpass`} + public @CType("uint32_t") int subpass() { return VkInputAttachmentAspectReference.get_subpass(this.segment()); } + /// Sets `subpass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpass(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subpass.set(segment, 0L, index, value); } + /// Sets `subpass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpass(MemorySegment segment, @CType("uint32_t") int value) { VkInputAttachmentAspectReference.set_subpass(segment, 0L, value); } + /// Sets `subpass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInputAttachmentAspectReference subpassAt(long index, @CType("uint32_t") int value) { VkInputAttachmentAspectReference.set_subpass(this.segment(), index, value); return this; } + /// Sets `subpass` with the given value. + /// @param value the value + /// @return `this` + public VkInputAttachmentAspectReference subpass(@CType("uint32_t") int value) { VkInputAttachmentAspectReference.set_subpass(this.segment(), value); return this; } + + /// {@return `inputAttachmentIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_inputAttachmentIndex(MemorySegment segment, long index) { return (int) VH_inputAttachmentIndex.get(segment, 0L, index); } + /// {@return `inputAttachmentIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_inputAttachmentIndex(MemorySegment segment) { return VkInputAttachmentAspectReference.get_inputAttachmentIndex(segment, 0L); } + /// {@return `inputAttachmentIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int inputAttachmentIndexAt(long index) { return VkInputAttachmentAspectReference.get_inputAttachmentIndex(this.segment(), index); } + /// {@return `inputAttachmentIndex`} + public @CType("uint32_t") int inputAttachmentIndex() { return VkInputAttachmentAspectReference.get_inputAttachmentIndex(this.segment()); } + /// Sets `inputAttachmentIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inputAttachmentIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_inputAttachmentIndex.set(segment, 0L, index, value); } + /// Sets `inputAttachmentIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inputAttachmentIndex(MemorySegment segment, @CType("uint32_t") int value) { VkInputAttachmentAspectReference.set_inputAttachmentIndex(segment, 0L, value); } + /// Sets `inputAttachmentIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInputAttachmentAspectReference inputAttachmentIndexAt(long index, @CType("uint32_t") int value) { VkInputAttachmentAspectReference.set_inputAttachmentIndex(this.segment(), index, value); return this; } + /// Sets `inputAttachmentIndex` with the given value. + /// @param value the value + /// @return `this` + public VkInputAttachmentAspectReference inputAttachmentIndex(@CType("uint32_t") int value) { VkInputAttachmentAspectReference.set_inputAttachmentIndex(this.segment(), value); return this; } + + /// {@return `aspectMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment, long index) { return (int) VH_aspectMask.get(segment, 0L, index); } + /// {@return `aspectMask`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment) { return VkInputAttachmentAspectReference.get_aspectMask(segment, 0L); } + /// {@return `aspectMask` at the given index} + /// @param index the index + public @CType("VkImageAspectFlags") int aspectMaskAt(long index) { return VkInputAttachmentAspectReference.get_aspectMask(this.segment(), index); } + /// {@return `aspectMask`} + public @CType("VkImageAspectFlags") int aspectMask() { return VkInputAttachmentAspectReference.get_aspectMask(this.segment()); } + /// Sets `aspectMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspectMask(MemorySegment segment, long index, @CType("VkImageAspectFlags") int value) { VH_aspectMask.set(segment, 0L, index, value); } + /// Sets `aspectMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspectMask(MemorySegment segment, @CType("VkImageAspectFlags") int value) { VkInputAttachmentAspectReference.set_aspectMask(segment, 0L, value); } + /// Sets `aspectMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInputAttachmentAspectReference aspectMaskAt(long index, @CType("VkImageAspectFlags") int value) { VkInputAttachmentAspectReference.set_aspectMask(this.segment(), index, value); return this; } + /// Sets `aspectMask` with the given value. + /// @param value the value + /// @return `this` + public VkInputAttachmentAspectReference aspectMask(@CType("VkImageAspectFlags") int value) { VkInputAttachmentAspectReference.set_aspectMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkInstanceCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkInstanceCreateInfo.java new file mode 100644 index 00000000..efb3b9a1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkInstanceCreateInfo.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pApplicationInfo +/// [VarHandle][#VH_pApplicationInfo] - [Getter][#pApplicationInfo()] - [Setter][#pApplicationInfo(java.lang.foreign.MemorySegment)] +/// ### enabledLayerCount +/// [VarHandle][#VH_enabledLayerCount] - [Getter][#enabledLayerCount()] - [Setter][#enabledLayerCount(int)] +/// ### ppEnabledLayerNames +/// [VarHandle][#VH_ppEnabledLayerNames] - [Getter][#ppEnabledLayerNames()] - [Setter][#ppEnabledLayerNames(java.lang.foreign.MemorySegment)] +/// ### enabledExtensionCount +/// [VarHandle][#VH_enabledExtensionCount] - [Getter][#enabledExtensionCount()] - [Setter][#enabledExtensionCount(int)] +/// ### ppEnabledExtensionNames +/// [VarHandle][#VH_ppEnabledExtensionNames] - [Getter][#ppEnabledExtensionNames()] - [Setter][#ppEnabledExtensionNames(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkInstanceCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkInstanceCreateFlags flags; +/// const VkApplicationInfo * pApplicationInfo; +/// uint32_t enabledLayerCount; +/// const char * const* ppEnabledLayerNames; +/// uint32_t enabledExtensionCount; +/// const char * const* ppEnabledExtensionNames; +/// } VkInstanceCreateInfo; +/// ``` +public final class VkInstanceCreateInfo extends Struct { + /// The struct layout of `VkInstanceCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("pApplicationInfo"), + ValueLayout.JAVA_INT.withName("enabledLayerCount"), + ValueLayout.ADDRESS.withName("ppEnabledLayerNames"), + ValueLayout.JAVA_INT.withName("enabledExtensionCount"), + ValueLayout.ADDRESS.withName("ppEnabledExtensionNames") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pApplicationInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pApplicationInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pApplicationInfo")); + /// The [VarHandle] of `enabledLayerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enabledLayerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enabledLayerCount")); + /// The [VarHandle] of `ppEnabledLayerNames` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_ppEnabledLayerNames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ppEnabledLayerNames")); + /// The [VarHandle] of `enabledExtensionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enabledExtensionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enabledExtensionCount")); + /// The [VarHandle] of `ppEnabledExtensionNames` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_ppEnabledExtensionNames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ppEnabledExtensionNames")); + + /// Creates `VkInstanceCreateInfo` with the given segment. + /// @param segment the memory segment + public VkInstanceCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkInstanceCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkInstanceCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkInstanceCreateInfo(segment); } + + /// Creates `VkInstanceCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkInstanceCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkInstanceCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkInstanceCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkInstanceCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkInstanceCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkInstanceCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkInstanceCreateInfo` + public static VkInstanceCreateInfo alloc(SegmentAllocator allocator) { return new VkInstanceCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkInstanceCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkInstanceCreateInfo` + public static VkInstanceCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkInstanceCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkInstanceCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkInstanceCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkInstanceCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkInstanceCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkInstanceCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo sType(@CType("VkStructureType") int value) { VkInstanceCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkInstanceCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkInstanceCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkInstanceCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkInstanceCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkInstanceCreateFlags") int get_flags(MemorySegment segment) { return VkInstanceCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkInstanceCreateFlags") int flagsAt(long index) { return VkInstanceCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkInstanceCreateFlags") int flags() { return VkInstanceCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkInstanceCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkInstanceCreateFlags") int value) { VkInstanceCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo flagsAt(long index, @CType("VkInstanceCreateFlags") int value) { VkInstanceCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo flags(@CType("VkInstanceCreateFlags") int value) { VkInstanceCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `pApplicationInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkApplicationInfo *") java.lang.foreign.MemorySegment get_pApplicationInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pApplicationInfo.get(segment, 0L, index); } + /// {@return `pApplicationInfo`} + /// @param segment the segment of the struct + public static @CType("const VkApplicationInfo *") java.lang.foreign.MemorySegment get_pApplicationInfo(MemorySegment segment) { return VkInstanceCreateInfo.get_pApplicationInfo(segment, 0L); } + /// {@return `pApplicationInfo` at the given index} + /// @param index the index + public @CType("const VkApplicationInfo *") java.lang.foreign.MemorySegment pApplicationInfoAt(long index) { return VkInstanceCreateInfo.get_pApplicationInfo(this.segment(), index); } + /// {@return `pApplicationInfo`} + public @CType("const VkApplicationInfo *") java.lang.foreign.MemorySegment pApplicationInfo() { return VkInstanceCreateInfo.get_pApplicationInfo(this.segment()); } + /// Sets `pApplicationInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pApplicationInfo(MemorySegment segment, long index, @CType("const VkApplicationInfo *") java.lang.foreign.MemorySegment value) { VH_pApplicationInfo.set(segment, 0L, index, value); } + /// Sets `pApplicationInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pApplicationInfo(MemorySegment segment, @CType("const VkApplicationInfo *") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_pApplicationInfo(segment, 0L, value); } + /// Sets `pApplicationInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo pApplicationInfoAt(long index, @CType("const VkApplicationInfo *") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_pApplicationInfo(this.segment(), index, value); return this; } + /// Sets `pApplicationInfo` with the given value. + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo pApplicationInfo(@CType("const VkApplicationInfo *") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_pApplicationInfo(this.segment(), value); return this; } + + /// {@return `enabledLayerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_enabledLayerCount(MemorySegment segment, long index) { return (int) VH_enabledLayerCount.get(segment, 0L, index); } + /// {@return `enabledLayerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_enabledLayerCount(MemorySegment segment) { return VkInstanceCreateInfo.get_enabledLayerCount(segment, 0L); } + /// {@return `enabledLayerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int enabledLayerCountAt(long index) { return VkInstanceCreateInfo.get_enabledLayerCount(this.segment(), index); } + /// {@return `enabledLayerCount`} + public @CType("uint32_t") int enabledLayerCount() { return VkInstanceCreateInfo.get_enabledLayerCount(this.segment()); } + /// Sets `enabledLayerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enabledLayerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_enabledLayerCount.set(segment, 0L, index, value); } + /// Sets `enabledLayerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enabledLayerCount(MemorySegment segment, @CType("uint32_t") int value) { VkInstanceCreateInfo.set_enabledLayerCount(segment, 0L, value); } + /// Sets `enabledLayerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo enabledLayerCountAt(long index, @CType("uint32_t") int value) { VkInstanceCreateInfo.set_enabledLayerCount(this.segment(), index, value); return this; } + /// Sets `enabledLayerCount` with the given value. + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo enabledLayerCount(@CType("uint32_t") int value) { VkInstanceCreateInfo.set_enabledLayerCount(this.segment(), value); return this; } + + /// {@return `ppEnabledLayerNames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char * const*") java.lang.foreign.MemorySegment get_ppEnabledLayerNames(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_ppEnabledLayerNames.get(segment, 0L, index); } + /// {@return `ppEnabledLayerNames`} + /// @param segment the segment of the struct + public static @CType("const char * const*") java.lang.foreign.MemorySegment get_ppEnabledLayerNames(MemorySegment segment) { return VkInstanceCreateInfo.get_ppEnabledLayerNames(segment, 0L); } + /// {@return `ppEnabledLayerNames` at the given index} + /// @param index the index + public @CType("const char * const*") java.lang.foreign.MemorySegment ppEnabledLayerNamesAt(long index) { return VkInstanceCreateInfo.get_ppEnabledLayerNames(this.segment(), index); } + /// {@return `ppEnabledLayerNames`} + public @CType("const char * const*") java.lang.foreign.MemorySegment ppEnabledLayerNames() { return VkInstanceCreateInfo.get_ppEnabledLayerNames(this.segment()); } + /// Sets `ppEnabledLayerNames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ppEnabledLayerNames(MemorySegment segment, long index, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VH_ppEnabledLayerNames.set(segment, 0L, index, value); } + /// Sets `ppEnabledLayerNames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ppEnabledLayerNames(MemorySegment segment, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_ppEnabledLayerNames(segment, 0L, value); } + /// Sets `ppEnabledLayerNames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo ppEnabledLayerNamesAt(long index, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_ppEnabledLayerNames(this.segment(), index, value); return this; } + /// Sets `ppEnabledLayerNames` with the given value. + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo ppEnabledLayerNames(@CType("const char * const*") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_ppEnabledLayerNames(this.segment(), value); return this; } + + /// {@return `enabledExtensionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_enabledExtensionCount(MemorySegment segment, long index) { return (int) VH_enabledExtensionCount.get(segment, 0L, index); } + /// {@return `enabledExtensionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_enabledExtensionCount(MemorySegment segment) { return VkInstanceCreateInfo.get_enabledExtensionCount(segment, 0L); } + /// {@return `enabledExtensionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int enabledExtensionCountAt(long index) { return VkInstanceCreateInfo.get_enabledExtensionCount(this.segment(), index); } + /// {@return `enabledExtensionCount`} + public @CType("uint32_t") int enabledExtensionCount() { return VkInstanceCreateInfo.get_enabledExtensionCount(this.segment()); } + /// Sets `enabledExtensionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enabledExtensionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_enabledExtensionCount.set(segment, 0L, index, value); } + /// Sets `enabledExtensionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enabledExtensionCount(MemorySegment segment, @CType("uint32_t") int value) { VkInstanceCreateInfo.set_enabledExtensionCount(segment, 0L, value); } + /// Sets `enabledExtensionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo enabledExtensionCountAt(long index, @CType("uint32_t") int value) { VkInstanceCreateInfo.set_enabledExtensionCount(this.segment(), index, value); return this; } + /// Sets `enabledExtensionCount` with the given value. + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo enabledExtensionCount(@CType("uint32_t") int value) { VkInstanceCreateInfo.set_enabledExtensionCount(this.segment(), value); return this; } + + /// {@return `ppEnabledExtensionNames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char * const*") java.lang.foreign.MemorySegment get_ppEnabledExtensionNames(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_ppEnabledExtensionNames.get(segment, 0L, index); } + /// {@return `ppEnabledExtensionNames`} + /// @param segment the segment of the struct + public static @CType("const char * const*") java.lang.foreign.MemorySegment get_ppEnabledExtensionNames(MemorySegment segment) { return VkInstanceCreateInfo.get_ppEnabledExtensionNames(segment, 0L); } + /// {@return `ppEnabledExtensionNames` at the given index} + /// @param index the index + public @CType("const char * const*") java.lang.foreign.MemorySegment ppEnabledExtensionNamesAt(long index) { return VkInstanceCreateInfo.get_ppEnabledExtensionNames(this.segment(), index); } + /// {@return `ppEnabledExtensionNames`} + public @CType("const char * const*") java.lang.foreign.MemorySegment ppEnabledExtensionNames() { return VkInstanceCreateInfo.get_ppEnabledExtensionNames(this.segment()); } + /// Sets `ppEnabledExtensionNames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ppEnabledExtensionNames(MemorySegment segment, long index, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VH_ppEnabledExtensionNames.set(segment, 0L, index, value); } + /// Sets `ppEnabledExtensionNames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ppEnabledExtensionNames(MemorySegment segment, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_ppEnabledExtensionNames(segment, 0L, value); } + /// Sets `ppEnabledExtensionNames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo ppEnabledExtensionNamesAt(long index, @CType("const char * const*") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_ppEnabledExtensionNames(this.segment(), index, value); return this; } + /// Sets `ppEnabledExtensionNames` with the given value. + /// @param value the value + /// @return `this` + public VkInstanceCreateInfo ppEnabledExtensionNames(@CType("const char * const*") java.lang.foreign.MemorySegment value) { VkInstanceCreateInfo.set_ppEnabledExtensionNames(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkLayerProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkLayerProperties.java new file mode 100644 index 00000000..330a9cd2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkLayerProperties.java @@ -0,0 +1,256 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### layerName +/// [Byte offset handle][#MH_layerName] - [Memory layout][#ML_layerName] - [Getter][#layerName(long)] - [Setter][#layerName(long, java.lang.foreign.MemorySegment)] +/// ### specVersion +/// [VarHandle][#VH_specVersion] - [Getter][#specVersion()] - [Setter][#specVersion(int)] +/// ### implementationVersion +/// [VarHandle][#VH_implementationVersion] - [Getter][#implementationVersion()] - [Setter][#implementationVersion(int)] +/// ### description +/// [Byte offset handle][#MH_description] - [Memory layout][#ML_description] - [Getter][#description(long)] - [Setter][#description(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkLayerProperties { +/// char[VK_MAX_EXTENSION_NAME_SIZE] layerName; +/// uint32_t specVersion; +/// uint32_t implementationVersion; +/// char[VK_MAX_DESCRIPTION_SIZE] description; +/// } VkLayerProperties; +/// ``` +public final class VkLayerProperties extends Struct { + /// The struct layout of `VkLayerProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + MemoryLayout.sequenceLayout(VK_MAX_EXTENSION_NAME_SIZE, ValueLayout.JAVA_BYTE).withName("layerName"), + ValueLayout.JAVA_INT.withName("specVersion"), + ValueLayout.JAVA_INT.withName("implementationVersion"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("description") + ); + /// The byte offset handle of `layerName` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_layerName = LAYOUT.byteOffsetHandle(PathElement.groupElement("layerName"), PathElement.sequenceElement()); + /// The memory layout of `layerName`. + public static final MemoryLayout ML_layerName = LAYOUT.select(PathElement.groupElement("layerName")); + /// The [VarHandle] of `specVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_specVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("specVersion")); + /// The [VarHandle] of `implementationVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_implementationVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("implementationVersion")); + /// The byte offset handle of `description` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_description = LAYOUT.byteOffsetHandle(PathElement.groupElement("description"), PathElement.sequenceElement()); + /// The memory layout of `description`. + public static final MemoryLayout ML_description = LAYOUT.select(PathElement.groupElement("description")); + + /// Creates `VkLayerProperties` with the given segment. + /// @param segment the memory segment + public VkLayerProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkLayerProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLayerProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLayerProperties(segment); } + + /// Creates `VkLayerProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkLayerProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkLayerProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkLayerProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkLayerProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkLayerProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkLayerProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkLayerProperties` + public static VkLayerProperties alloc(SegmentAllocator allocator) { return new VkLayerProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkLayerProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkLayerProperties` + public static VkLayerProperties alloc(SegmentAllocator allocator, long count) { return new VkLayerProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `layerName` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment get_layerName(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_layerName.invokeExact(0L, elementIndex), index), ML_layerName); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `layerName`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment get_layerName(MemorySegment segment, long elementIndex) { return VkLayerProperties.get_layerName(segment, 0L, elementIndex); } + /// {@return `layerName` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment layerNameAt(long index, long elementIndex) { return VkLayerProperties.get_layerName(this.segment(), index, elementIndex); } + /// {@return `layerName`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment layerName(long elementIndex) { return VkLayerProperties.get_layerName(this.segment(), elementIndex); } + /// Sets `layerName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_layerName(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_layerName.invokeExact(0L, elementIndex), index), ML_layerName.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `layerName` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_layerName(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkLayerProperties.set_layerName(segment, 0L, elementIndex, value); } + /// Sets `layerName` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkLayerProperties layerNameAt(long index, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkLayerProperties.set_layerName(this.segment(), index, elementIndex, value); return this; } + /// Sets `layerName` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkLayerProperties layerName(long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkLayerProperties.set_layerName(this.segment(), elementIndex, value); return this; } + + /// {@return `specVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_specVersion(MemorySegment segment, long index) { return (int) VH_specVersion.get(segment, 0L, index); } + /// {@return `specVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_specVersion(MemorySegment segment) { return VkLayerProperties.get_specVersion(segment, 0L); } + /// {@return `specVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int specVersionAt(long index) { return VkLayerProperties.get_specVersion(this.segment(), index); } + /// {@return `specVersion`} + public @CType("uint32_t") int specVersion() { return VkLayerProperties.get_specVersion(this.segment()); } + /// Sets `specVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_specVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_specVersion.set(segment, 0L, index, value); } + /// Sets `specVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_specVersion(MemorySegment segment, @CType("uint32_t") int value) { VkLayerProperties.set_specVersion(segment, 0L, value); } + /// Sets `specVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerProperties specVersionAt(long index, @CType("uint32_t") int value) { VkLayerProperties.set_specVersion(this.segment(), index, value); return this; } + /// Sets `specVersion` with the given value. + /// @param value the value + /// @return `this` + public VkLayerProperties specVersion(@CType("uint32_t") int value) { VkLayerProperties.set_specVersion(this.segment(), value); return this; } + + /// {@return `implementationVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_implementationVersion(MemorySegment segment, long index) { return (int) VH_implementationVersion.get(segment, 0L, index); } + /// {@return `implementationVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_implementationVersion(MemorySegment segment) { return VkLayerProperties.get_implementationVersion(segment, 0L); } + /// {@return `implementationVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int implementationVersionAt(long index) { return VkLayerProperties.get_implementationVersion(this.segment(), index); } + /// {@return `implementationVersion`} + public @CType("uint32_t") int implementationVersion() { return VkLayerProperties.get_implementationVersion(this.segment()); } + /// Sets `implementationVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_implementationVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_implementationVersion.set(segment, 0L, index, value); } + /// Sets `implementationVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_implementationVersion(MemorySegment segment, @CType("uint32_t") int value) { VkLayerProperties.set_implementationVersion(segment, 0L, value); } + /// Sets `implementationVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkLayerProperties implementationVersionAt(long index, @CType("uint32_t") int value) { VkLayerProperties.set_implementationVersion(this.segment(), index, value); return this; } + /// Sets `implementationVersion` with the given value. + /// @param value the value + /// @return `this` + public VkLayerProperties implementationVersion(@CType("uint32_t") int value) { VkLayerProperties.set_implementationVersion(this.segment(), value); return this; } + + /// {@return `description` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `description`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long elementIndex) { return VkLayerProperties.get_description(segment, 0L, elementIndex); } + /// {@return `description` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment descriptionAt(long index, long elementIndex) { return VkLayerProperties.get_description(this.segment(), index, elementIndex); } + /// {@return `description`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment description(long elementIndex) { return VkLayerProperties.get_description(this.segment(), elementIndex); } + /// Sets `description` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `description` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkLayerProperties.set_description(segment, 0L, elementIndex, value); } + /// Sets `description` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkLayerProperties descriptionAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkLayerProperties.set_description(this.segment(), index, elementIndex, value); return this; } + /// Sets `description` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkLayerProperties description(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkLayerProperties.set_description(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMappedMemoryRange.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMappedMemoryRange.java new file mode 100644 index 00000000..805830a0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMappedMemoryRange.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMappedMemoryRange { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceMemory memory; +/// VkDeviceSize offset; +/// VkDeviceSize size; +/// } VkMappedMemoryRange; +/// ``` +public final class VkMappedMemoryRange extends Struct { + /// The struct layout of `VkMappedMemoryRange`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkMappedMemoryRange` with the given segment. + /// @param segment the memory segment + public VkMappedMemoryRange(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMappedMemoryRange` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMappedMemoryRange of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMappedMemoryRange(segment); } + + /// Creates `VkMappedMemoryRange` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMappedMemoryRange ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMappedMemoryRange(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMappedMemoryRange` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMappedMemoryRange ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMappedMemoryRange(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMappedMemoryRange` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMappedMemoryRange` + public static VkMappedMemoryRange alloc(SegmentAllocator allocator) { return new VkMappedMemoryRange(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMappedMemoryRange` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMappedMemoryRange` + public static VkMappedMemoryRange alloc(SegmentAllocator allocator, long count) { return new VkMappedMemoryRange(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMappedMemoryRange.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMappedMemoryRange.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMappedMemoryRange.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMappedMemoryRange.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMappedMemoryRange sTypeAt(long index, @CType("VkStructureType") int value) { VkMappedMemoryRange.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMappedMemoryRange sType(@CType("VkStructureType") int value) { VkMappedMemoryRange.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMappedMemoryRange.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMappedMemoryRange.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMappedMemoryRange.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMappedMemoryRange.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMappedMemoryRange pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMappedMemoryRange.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMappedMemoryRange pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMappedMemoryRange.set_pNext(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkMappedMemoryRange.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkMappedMemoryRange.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkMappedMemoryRange.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMappedMemoryRange.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMappedMemoryRange memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMappedMemoryRange.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkMappedMemoryRange memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMappedMemoryRange.set_memory(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkMappedMemoryRange.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkMappedMemoryRange.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkMappedMemoryRange.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMappedMemoryRange.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMappedMemoryRange offsetAt(long index, @CType("VkDeviceSize") long value) { VkMappedMemoryRange.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkMappedMemoryRange offset(@CType("VkDeviceSize") long value) { VkMappedMemoryRange.set_offset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkMappedMemoryRange.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkMappedMemoryRange.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkMappedMemoryRange.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMappedMemoryRange.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMappedMemoryRange sizeAt(long index, @CType("VkDeviceSize") long value) { VkMappedMemoryRange.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkMappedMemoryRange size(@CType("VkDeviceSize") long value) { VkMappedMemoryRange.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryAllocateFlagsInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryAllocateFlagsInfo.java new file mode 100644 index 00000000..bb16b4e1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryAllocateFlagsInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### deviceMask +/// [VarHandle][#VH_deviceMask] - [Getter][#deviceMask()] - [Setter][#deviceMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryAllocateFlagsInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkMemoryAllocateFlags flags; +/// uint32_t deviceMask; +/// } VkMemoryAllocateFlagsInfo; +/// ``` +public final class VkMemoryAllocateFlagsInfo extends Struct { + /// The struct layout of `VkMemoryAllocateFlagsInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("deviceMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `deviceMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceMask")); + + /// Creates `VkMemoryAllocateFlagsInfo` with the given segment. + /// @param segment the memory segment + public VkMemoryAllocateFlagsInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryAllocateFlagsInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryAllocateFlagsInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryAllocateFlagsInfo(segment); } + + /// Creates `VkMemoryAllocateFlagsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryAllocateFlagsInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryAllocateFlagsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryAllocateFlagsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryAllocateFlagsInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryAllocateFlagsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryAllocateFlagsInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryAllocateFlagsInfo` + public static VkMemoryAllocateFlagsInfo alloc(SegmentAllocator allocator) { return new VkMemoryAllocateFlagsInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryAllocateFlagsInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryAllocateFlagsInfo` + public static VkMemoryAllocateFlagsInfo alloc(SegmentAllocator allocator, long count) { return new VkMemoryAllocateFlagsInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryAllocateFlagsInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryAllocateFlagsInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryAllocateFlagsInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryAllocateFlagsInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryAllocateFlagsInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryAllocateFlagsInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryAllocateFlagsInfo sType(@CType("VkStructureType") int value) { VkMemoryAllocateFlagsInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryAllocateFlagsInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryAllocateFlagsInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryAllocateFlagsInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryAllocateFlagsInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryAllocateFlagsInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryAllocateFlagsInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryAllocateFlagsInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryAllocateFlagsInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMemoryAllocateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkMemoryAllocateFlags") int get_flags(MemorySegment segment) { return VkMemoryAllocateFlagsInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkMemoryAllocateFlags") int flagsAt(long index) { return VkMemoryAllocateFlagsInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkMemoryAllocateFlags") int flags() { return VkMemoryAllocateFlagsInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkMemoryAllocateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkMemoryAllocateFlags") int value) { VkMemoryAllocateFlagsInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryAllocateFlagsInfo flagsAt(long index, @CType("VkMemoryAllocateFlags") int value) { VkMemoryAllocateFlagsInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryAllocateFlagsInfo flags(@CType("VkMemoryAllocateFlags") int value) { VkMemoryAllocateFlagsInfo.set_flags(this.segment(), value); return this; } + + /// {@return `deviceMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceMask(MemorySegment segment, long index) { return (int) VH_deviceMask.get(segment, 0L, index); } + /// {@return `deviceMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceMask(MemorySegment segment) { return VkMemoryAllocateFlagsInfo.get_deviceMask(segment, 0L); } + /// {@return `deviceMask` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceMaskAt(long index) { return VkMemoryAllocateFlagsInfo.get_deviceMask(this.segment(), index); } + /// {@return `deviceMask`} + public @CType("uint32_t") int deviceMask() { return VkMemoryAllocateFlagsInfo.get_deviceMask(this.segment()); } + /// Sets `deviceMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceMask.set(segment, 0L, index, value); } + /// Sets `deviceMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceMask(MemorySegment segment, @CType("uint32_t") int value) { VkMemoryAllocateFlagsInfo.set_deviceMask(segment, 0L, value); } + /// Sets `deviceMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryAllocateFlagsInfo deviceMaskAt(long index, @CType("uint32_t") int value) { VkMemoryAllocateFlagsInfo.set_deviceMask(this.segment(), index, value); return this; } + /// Sets `deviceMask` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryAllocateFlagsInfo deviceMask(@CType("uint32_t") int value) { VkMemoryAllocateFlagsInfo.set_deviceMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryAllocateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryAllocateInfo.java new file mode 100644 index 00000000..e112686e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryAllocateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### allocationSize +/// [VarHandle][#VH_allocationSize] - [Getter][#allocationSize()] - [Setter][#allocationSize(long)] +/// ### memoryTypeIndex +/// [VarHandle][#VH_memoryTypeIndex] - [Getter][#memoryTypeIndex()] - [Setter][#memoryTypeIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryAllocateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceSize allocationSize; +/// uint32_t memoryTypeIndex; +/// } VkMemoryAllocateInfo; +/// ``` +public final class VkMemoryAllocateInfo extends Struct { + /// The struct layout of `VkMemoryAllocateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("allocationSize"), + ValueLayout.JAVA_INT.withName("memoryTypeIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `allocationSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_allocationSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allocationSize")); + /// The [VarHandle] of `memoryTypeIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeIndex")); + + /// Creates `VkMemoryAllocateInfo` with the given segment. + /// @param segment the memory segment + public VkMemoryAllocateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryAllocateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryAllocateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryAllocateInfo(segment); } + + /// Creates `VkMemoryAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryAllocateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryAllocateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryAllocateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryAllocateInfo` + public static VkMemoryAllocateInfo alloc(SegmentAllocator allocator) { return new VkMemoryAllocateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryAllocateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryAllocateInfo` + public static VkMemoryAllocateInfo alloc(SegmentAllocator allocator, long count) { return new VkMemoryAllocateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryAllocateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryAllocateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryAllocateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryAllocateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryAllocateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryAllocateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryAllocateInfo sType(@CType("VkStructureType") int value) { VkMemoryAllocateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryAllocateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryAllocateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryAllocateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryAllocateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryAllocateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryAllocateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryAllocateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryAllocateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `allocationSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_allocationSize(MemorySegment segment, long index) { return (long) VH_allocationSize.get(segment, 0L, index); } + /// {@return `allocationSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_allocationSize(MemorySegment segment) { return VkMemoryAllocateInfo.get_allocationSize(segment, 0L); } + /// {@return `allocationSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long allocationSizeAt(long index) { return VkMemoryAllocateInfo.get_allocationSize(this.segment(), index); } + /// {@return `allocationSize`} + public @CType("VkDeviceSize") long allocationSize() { return VkMemoryAllocateInfo.get_allocationSize(this.segment()); } + /// Sets `allocationSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allocationSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_allocationSize.set(segment, 0L, index, value); } + /// Sets `allocationSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allocationSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMemoryAllocateInfo.set_allocationSize(segment, 0L, value); } + /// Sets `allocationSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryAllocateInfo allocationSizeAt(long index, @CType("VkDeviceSize") long value) { VkMemoryAllocateInfo.set_allocationSize(this.segment(), index, value); return this; } + /// Sets `allocationSize` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryAllocateInfo allocationSize(@CType("VkDeviceSize") long value) { VkMemoryAllocateInfo.set_allocationSize(this.segment(), value); return this; } + + /// {@return `memoryTypeIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeIndex(MemorySegment segment, long index) { return (int) VH_memoryTypeIndex.get(segment, 0L, index); } + /// {@return `memoryTypeIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeIndex(MemorySegment segment) { return VkMemoryAllocateInfo.get_memoryTypeIndex(segment, 0L); } + /// {@return `memoryTypeIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeIndexAt(long index) { return VkMemoryAllocateInfo.get_memoryTypeIndex(this.segment(), index); } + /// {@return `memoryTypeIndex`} + public @CType("uint32_t") int memoryTypeIndex() { return VkMemoryAllocateInfo.get_memoryTypeIndex(this.segment()); } + /// Sets `memoryTypeIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeIndex.set(segment, 0L, index, value); } + /// Sets `memoryTypeIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeIndex(MemorySegment segment, @CType("uint32_t") int value) { VkMemoryAllocateInfo.set_memoryTypeIndex(segment, 0L, value); } + /// Sets `memoryTypeIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryAllocateInfo memoryTypeIndexAt(long index, @CType("uint32_t") int value) { VkMemoryAllocateInfo.set_memoryTypeIndex(this.segment(), index, value); return this; } + /// Sets `memoryTypeIndex` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryAllocateInfo memoryTypeIndex(@CType("uint32_t") int value) { VkMemoryAllocateInfo.set_memoryTypeIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryBarrier.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryBarrier.java new file mode 100644 index 00000000..5589eebd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryBarrier.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcAccessMask +/// [VarHandle][#VH_srcAccessMask] - [Getter][#srcAccessMask()] - [Setter][#srcAccessMask(int)] +/// ### dstAccessMask +/// [VarHandle][#VH_dstAccessMask] - [Getter][#dstAccessMask()] - [Setter][#dstAccessMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryBarrier { +/// VkStructureType sType; +/// const void * pNext; +/// VkAccessFlags srcAccessMask; +/// VkAccessFlags dstAccessMask; +/// } VkMemoryBarrier; +/// ``` +public final class VkMemoryBarrier extends Struct { + /// The struct layout of `VkMemoryBarrier`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("srcAccessMask"), + ValueLayout.JAVA_INT.withName("dstAccessMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcAccessMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAccessMask")); + /// The [VarHandle] of `dstAccessMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAccessMask")); + + /// Creates `VkMemoryBarrier` with the given segment. + /// @param segment the memory segment + public VkMemoryBarrier(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryBarrier` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryBarrier of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryBarrier(segment); } + + /// Creates `VkMemoryBarrier` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryBarrier ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryBarrier(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryBarrier` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryBarrier ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryBarrier(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryBarrier` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryBarrier` + public static VkMemoryBarrier alloc(SegmentAllocator allocator) { return new VkMemoryBarrier(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryBarrier` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryBarrier` + public static VkMemoryBarrier alloc(SegmentAllocator allocator, long count) { return new VkMemoryBarrier(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryBarrier.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryBarrier.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryBarrier.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryBarrier.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryBarrier sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryBarrier.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryBarrier sType(@CType("VkStructureType") int value) { VkMemoryBarrier.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryBarrier.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryBarrier.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryBarrier.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryBarrier.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryBarrier pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryBarrier.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryBarrier pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryBarrier.set_pNext(this.segment(), value); return this; } + + /// {@return `srcAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags") int get_srcAccessMask(MemorySegment segment, long index) { return (int) VH_srcAccessMask.get(segment, 0L, index); } + /// {@return `srcAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags") int get_srcAccessMask(MemorySegment segment) { return VkMemoryBarrier.get_srcAccessMask(segment, 0L); } + /// {@return `srcAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags") int srcAccessMaskAt(long index) { return VkMemoryBarrier.get_srcAccessMask(this.segment(), index); } + /// {@return `srcAccessMask`} + public @CType("VkAccessFlags") int srcAccessMask() { return VkMemoryBarrier.get_srcAccessMask(this.segment()); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags") int value) { VH_srcAccessMask.set(segment, 0L, index, value); } + /// Sets `srcAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, @CType("VkAccessFlags") int value) { VkMemoryBarrier.set_srcAccessMask(segment, 0L, value); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryBarrier srcAccessMaskAt(long index, @CType("VkAccessFlags") int value) { VkMemoryBarrier.set_srcAccessMask(this.segment(), index, value); return this; } + /// Sets `srcAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryBarrier srcAccessMask(@CType("VkAccessFlags") int value) { VkMemoryBarrier.set_srcAccessMask(this.segment(), value); return this; } + + /// {@return `dstAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags") int get_dstAccessMask(MemorySegment segment, long index) { return (int) VH_dstAccessMask.get(segment, 0L, index); } + /// {@return `dstAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags") int get_dstAccessMask(MemorySegment segment) { return VkMemoryBarrier.get_dstAccessMask(segment, 0L); } + /// {@return `dstAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags") int dstAccessMaskAt(long index) { return VkMemoryBarrier.get_dstAccessMask(this.segment(), index); } + /// {@return `dstAccessMask`} + public @CType("VkAccessFlags") int dstAccessMask() { return VkMemoryBarrier.get_dstAccessMask(this.segment()); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags") int value) { VH_dstAccessMask.set(segment, 0L, index, value); } + /// Sets `dstAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, @CType("VkAccessFlags") int value) { VkMemoryBarrier.set_dstAccessMask(segment, 0L, value); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryBarrier dstAccessMaskAt(long index, @CType("VkAccessFlags") int value) { VkMemoryBarrier.set_dstAccessMask(this.segment(), index, value); return this; } + /// Sets `dstAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryBarrier dstAccessMask(@CType("VkAccessFlags") int value) { VkMemoryBarrier.set_dstAccessMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryBarrier2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryBarrier2.java new file mode 100644 index 00000000..079eb474 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryBarrier2.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcStageMask +/// [VarHandle][#VH_srcStageMask] - [Getter][#srcStageMask()] - [Setter][#srcStageMask(long)] +/// ### srcAccessMask +/// [VarHandle][#VH_srcAccessMask] - [Getter][#srcAccessMask()] - [Setter][#srcAccessMask(long)] +/// ### dstStageMask +/// [VarHandle][#VH_dstStageMask] - [Getter][#dstStageMask()] - [Setter][#dstStageMask(long)] +/// ### dstAccessMask +/// [VarHandle][#VH_dstAccessMask] - [Getter][#dstAccessMask()] - [Setter][#dstAccessMask(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryBarrier2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineStageFlags2 srcStageMask; +/// VkAccessFlags2 srcAccessMask; +/// VkPipelineStageFlags2 dstStageMask; +/// VkAccessFlags2 dstAccessMask; +/// } VkMemoryBarrier2; +/// ``` +public final class VkMemoryBarrier2 extends Struct { + /// The struct layout of `VkMemoryBarrier2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("srcStageMask"), + ValueLayout.JAVA_LONG.withName("srcAccessMask"), + ValueLayout.JAVA_LONG.withName("dstStageMask"), + ValueLayout.JAVA_LONG.withName("dstAccessMask") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcStageMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcStageMask")); + /// The [VarHandle] of `srcAccessMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_srcAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAccessMask")); + /// The [VarHandle] of `dstStageMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstStageMask")); + /// The [VarHandle] of `dstAccessMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dstAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAccessMask")); + + /// Creates `VkMemoryBarrier2` with the given segment. + /// @param segment the memory segment + public VkMemoryBarrier2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryBarrier2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryBarrier2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryBarrier2(segment); } + + /// Creates `VkMemoryBarrier2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryBarrier2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryBarrier2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryBarrier2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryBarrier2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryBarrier2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryBarrier2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryBarrier2` + public static VkMemoryBarrier2 alloc(SegmentAllocator allocator) { return new VkMemoryBarrier2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryBarrier2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryBarrier2` + public static VkMemoryBarrier2 alloc(SegmentAllocator allocator, long count) { return new VkMemoryBarrier2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryBarrier2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryBarrier2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryBarrier2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryBarrier2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryBarrier2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 sType(@CType("VkStructureType") int value) { VkMemoryBarrier2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryBarrier2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryBarrier2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryBarrier2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryBarrier2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryBarrier2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryBarrier2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags2") long get_srcStageMask(MemorySegment segment, long index) { return (long) VH_srcStageMask.get(segment, 0L, index); } + /// {@return `srcStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags2") long get_srcStageMask(MemorySegment segment) { return VkMemoryBarrier2.get_srcStageMask(segment, 0L); } + /// {@return `srcStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags2") long srcStageMaskAt(long index) { return VkMemoryBarrier2.get_srcStageMask(this.segment(), index); } + /// {@return `srcStageMask`} + public @CType("VkPipelineStageFlags2") long srcStageMask() { return VkMemoryBarrier2.get_srcStageMask(this.segment()); } + /// Sets `srcStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags2") long value) { VH_srcStageMask.set(segment, 0L, index, value); } + /// Sets `srcStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcStageMask(MemorySegment segment, @CType("VkPipelineStageFlags2") long value) { VkMemoryBarrier2.set_srcStageMask(segment, 0L, value); } + /// Sets `srcStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 srcStageMaskAt(long index, @CType("VkPipelineStageFlags2") long value) { VkMemoryBarrier2.set_srcStageMask(this.segment(), index, value); return this; } + /// Sets `srcStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 srcStageMask(@CType("VkPipelineStageFlags2") long value) { VkMemoryBarrier2.set_srcStageMask(this.segment(), value); return this; } + + /// {@return `srcAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags2") long get_srcAccessMask(MemorySegment segment, long index) { return (long) VH_srcAccessMask.get(segment, 0L, index); } + /// {@return `srcAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags2") long get_srcAccessMask(MemorySegment segment) { return VkMemoryBarrier2.get_srcAccessMask(segment, 0L); } + /// {@return `srcAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags2") long srcAccessMaskAt(long index) { return VkMemoryBarrier2.get_srcAccessMask(this.segment(), index); } + /// {@return `srcAccessMask`} + public @CType("VkAccessFlags2") long srcAccessMask() { return VkMemoryBarrier2.get_srcAccessMask(this.segment()); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags2") long value) { VH_srcAccessMask.set(segment, 0L, index, value); } + /// Sets `srcAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, @CType("VkAccessFlags2") long value) { VkMemoryBarrier2.set_srcAccessMask(segment, 0L, value); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 srcAccessMaskAt(long index, @CType("VkAccessFlags2") long value) { VkMemoryBarrier2.set_srcAccessMask(this.segment(), index, value); return this; } + /// Sets `srcAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 srcAccessMask(@CType("VkAccessFlags2") long value) { VkMemoryBarrier2.set_srcAccessMask(this.segment(), value); return this; } + + /// {@return `dstStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags2") long get_dstStageMask(MemorySegment segment, long index) { return (long) VH_dstStageMask.get(segment, 0L, index); } + /// {@return `dstStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags2") long get_dstStageMask(MemorySegment segment) { return VkMemoryBarrier2.get_dstStageMask(segment, 0L); } + /// {@return `dstStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags2") long dstStageMaskAt(long index) { return VkMemoryBarrier2.get_dstStageMask(this.segment(), index); } + /// {@return `dstStageMask`} + public @CType("VkPipelineStageFlags2") long dstStageMask() { return VkMemoryBarrier2.get_dstStageMask(this.segment()); } + /// Sets `dstStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags2") long value) { VH_dstStageMask.set(segment, 0L, index, value); } + /// Sets `dstStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstStageMask(MemorySegment segment, @CType("VkPipelineStageFlags2") long value) { VkMemoryBarrier2.set_dstStageMask(segment, 0L, value); } + /// Sets `dstStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 dstStageMaskAt(long index, @CType("VkPipelineStageFlags2") long value) { VkMemoryBarrier2.set_dstStageMask(this.segment(), index, value); return this; } + /// Sets `dstStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 dstStageMask(@CType("VkPipelineStageFlags2") long value) { VkMemoryBarrier2.set_dstStageMask(this.segment(), value); return this; } + + /// {@return `dstAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags2") long get_dstAccessMask(MemorySegment segment, long index) { return (long) VH_dstAccessMask.get(segment, 0L, index); } + /// {@return `dstAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags2") long get_dstAccessMask(MemorySegment segment) { return VkMemoryBarrier2.get_dstAccessMask(segment, 0L); } + /// {@return `dstAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags2") long dstAccessMaskAt(long index) { return VkMemoryBarrier2.get_dstAccessMask(this.segment(), index); } + /// {@return `dstAccessMask`} + public @CType("VkAccessFlags2") long dstAccessMask() { return VkMemoryBarrier2.get_dstAccessMask(this.segment()); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags2") long value) { VH_dstAccessMask.set(segment, 0L, index, value); } + /// Sets `dstAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, @CType("VkAccessFlags2") long value) { VkMemoryBarrier2.set_dstAccessMask(segment, 0L, value); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 dstAccessMaskAt(long index, @CType("VkAccessFlags2") long value) { VkMemoryBarrier2.set_dstAccessMask(this.segment(), index, value); return this; } + /// Sets `dstAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryBarrier2 dstAccessMask(@CType("VkAccessFlags2") long value) { VkMemoryBarrier2.set_dstAccessMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryDedicatedAllocateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryDedicatedAllocateInfo.java new file mode 100644 index 00000000..64f33905 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryDedicatedAllocateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryDedicatedAllocateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage image; +/// VkBuffer buffer; +/// } VkMemoryDedicatedAllocateInfo; +/// ``` +public final class VkMemoryDedicatedAllocateInfo extends Struct { + /// The struct layout of `VkMemoryDedicatedAllocateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("image"), + ValueLayout.ADDRESS.withName("buffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + + /// Creates `VkMemoryDedicatedAllocateInfo` with the given segment. + /// @param segment the memory segment + public VkMemoryDedicatedAllocateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryDedicatedAllocateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryDedicatedAllocateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryDedicatedAllocateInfo(segment); } + + /// Creates `VkMemoryDedicatedAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryDedicatedAllocateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryDedicatedAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryDedicatedAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryDedicatedAllocateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryDedicatedAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryDedicatedAllocateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryDedicatedAllocateInfo` + public static VkMemoryDedicatedAllocateInfo alloc(SegmentAllocator allocator) { return new VkMemoryDedicatedAllocateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryDedicatedAllocateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryDedicatedAllocateInfo` + public static VkMemoryDedicatedAllocateInfo alloc(SegmentAllocator allocator, long count) { return new VkMemoryDedicatedAllocateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryDedicatedAllocateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryDedicatedAllocateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryDedicatedAllocateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryDedicatedAllocateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryDedicatedAllocateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryDedicatedAllocateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryDedicatedAllocateInfo sType(@CType("VkStructureType") int value) { VkMemoryDedicatedAllocateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryDedicatedAllocateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryDedicatedAllocateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryDedicatedAllocateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedAllocateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryDedicatedAllocateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedAllocateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryDedicatedAllocateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedAllocateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkMemoryDedicatedAllocateInfo.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkMemoryDedicatedAllocateInfo.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkMemoryDedicatedAllocateInfo.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedAllocateInfo.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryDedicatedAllocateInfo imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedAllocateInfo.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryDedicatedAllocateInfo image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedAllocateInfo.set_image(this.segment(), value); return this; } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkMemoryDedicatedAllocateInfo.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkMemoryDedicatedAllocateInfo.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkMemoryDedicatedAllocateInfo.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedAllocateInfo.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryDedicatedAllocateInfo bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedAllocateInfo.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryDedicatedAllocateInfo buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedAllocateInfo.set_buffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryDedicatedRequirements.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryDedicatedRequirements.java new file mode 100644 index 00000000..7d829c81 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryDedicatedRequirements.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### prefersDedicatedAllocation +/// [VarHandle][#VH_prefersDedicatedAllocation] - [Getter][#prefersDedicatedAllocation()] - [Setter][#prefersDedicatedAllocation(int)] +/// ### requiresDedicatedAllocation +/// [VarHandle][#VH_requiresDedicatedAllocation] - [Getter][#requiresDedicatedAllocation()] - [Setter][#requiresDedicatedAllocation(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryDedicatedRequirements { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 prefersDedicatedAllocation; +/// VkBool32 requiresDedicatedAllocation; +/// } VkMemoryDedicatedRequirements; +/// ``` +public final class VkMemoryDedicatedRequirements extends Struct { + /// The struct layout of `VkMemoryDedicatedRequirements`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("prefersDedicatedAllocation"), + ValueLayout.JAVA_INT.withName("requiresDedicatedAllocation") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `prefersDedicatedAllocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_prefersDedicatedAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("prefersDedicatedAllocation")); + /// The [VarHandle] of `requiresDedicatedAllocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_requiresDedicatedAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("requiresDedicatedAllocation")); + + /// Creates `VkMemoryDedicatedRequirements` with the given segment. + /// @param segment the memory segment + public VkMemoryDedicatedRequirements(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryDedicatedRequirements` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryDedicatedRequirements of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryDedicatedRequirements(segment); } + + /// Creates `VkMemoryDedicatedRequirements` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryDedicatedRequirements ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryDedicatedRequirements(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryDedicatedRequirements` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryDedicatedRequirements ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryDedicatedRequirements(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryDedicatedRequirements` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryDedicatedRequirements` + public static VkMemoryDedicatedRequirements alloc(SegmentAllocator allocator) { return new VkMemoryDedicatedRequirements(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryDedicatedRequirements` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryDedicatedRequirements` + public static VkMemoryDedicatedRequirements alloc(SegmentAllocator allocator, long count) { return new VkMemoryDedicatedRequirements(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryDedicatedRequirements.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryDedicatedRequirements.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryDedicatedRequirements.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryDedicatedRequirements.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryDedicatedRequirements sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryDedicatedRequirements.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryDedicatedRequirements sType(@CType("VkStructureType") int value) { VkMemoryDedicatedRequirements.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryDedicatedRequirements.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryDedicatedRequirements.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryDedicatedRequirements.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedRequirements.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryDedicatedRequirements pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedRequirements.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryDedicatedRequirements pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryDedicatedRequirements.set_pNext(this.segment(), value); return this; } + + /// {@return `prefersDedicatedAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_prefersDedicatedAllocation(MemorySegment segment, long index) { return (int) VH_prefersDedicatedAllocation.get(segment, 0L, index); } + /// {@return `prefersDedicatedAllocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_prefersDedicatedAllocation(MemorySegment segment) { return VkMemoryDedicatedRequirements.get_prefersDedicatedAllocation(segment, 0L); } + /// {@return `prefersDedicatedAllocation` at the given index} + /// @param index the index + public @CType("VkBool32") int prefersDedicatedAllocationAt(long index) { return VkMemoryDedicatedRequirements.get_prefersDedicatedAllocation(this.segment(), index); } + /// {@return `prefersDedicatedAllocation`} + public @CType("VkBool32") int prefersDedicatedAllocation() { return VkMemoryDedicatedRequirements.get_prefersDedicatedAllocation(this.segment()); } + /// Sets `prefersDedicatedAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_prefersDedicatedAllocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_prefersDedicatedAllocation.set(segment, 0L, index, value); } + /// Sets `prefersDedicatedAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_prefersDedicatedAllocation(MemorySegment segment, @CType("VkBool32") int value) { VkMemoryDedicatedRequirements.set_prefersDedicatedAllocation(segment, 0L, value); } + /// Sets `prefersDedicatedAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryDedicatedRequirements prefersDedicatedAllocationAt(long index, @CType("VkBool32") int value) { VkMemoryDedicatedRequirements.set_prefersDedicatedAllocation(this.segment(), index, value); return this; } + /// Sets `prefersDedicatedAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryDedicatedRequirements prefersDedicatedAllocation(@CType("VkBool32") int value) { VkMemoryDedicatedRequirements.set_prefersDedicatedAllocation(this.segment(), value); return this; } + + /// {@return `requiresDedicatedAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_requiresDedicatedAllocation(MemorySegment segment, long index) { return (int) VH_requiresDedicatedAllocation.get(segment, 0L, index); } + /// {@return `requiresDedicatedAllocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_requiresDedicatedAllocation(MemorySegment segment) { return VkMemoryDedicatedRequirements.get_requiresDedicatedAllocation(segment, 0L); } + /// {@return `requiresDedicatedAllocation` at the given index} + /// @param index the index + public @CType("VkBool32") int requiresDedicatedAllocationAt(long index) { return VkMemoryDedicatedRequirements.get_requiresDedicatedAllocation(this.segment(), index); } + /// {@return `requiresDedicatedAllocation`} + public @CType("VkBool32") int requiresDedicatedAllocation() { return VkMemoryDedicatedRequirements.get_requiresDedicatedAllocation(this.segment()); } + /// Sets `requiresDedicatedAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_requiresDedicatedAllocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_requiresDedicatedAllocation.set(segment, 0L, index, value); } + /// Sets `requiresDedicatedAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_requiresDedicatedAllocation(MemorySegment segment, @CType("VkBool32") int value) { VkMemoryDedicatedRequirements.set_requiresDedicatedAllocation(segment, 0L, value); } + /// Sets `requiresDedicatedAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryDedicatedRequirements requiresDedicatedAllocationAt(long index, @CType("VkBool32") int value) { VkMemoryDedicatedRequirements.set_requiresDedicatedAllocation(this.segment(), index, value); return this; } + /// Sets `requiresDedicatedAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryDedicatedRequirements requiresDedicatedAllocation(@CType("VkBool32") int value) { VkMemoryDedicatedRequirements.set_requiresDedicatedAllocation(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryHeap.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryHeap.java new file mode 100644 index 00000000..358b5b24 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryHeap.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryHeap { +/// VkDeviceSize size; +/// VkMemoryHeapFlags flags; +/// } VkMemoryHeap; +/// ``` +public final class VkMemoryHeap extends Struct { + /// The struct layout of `VkMemoryHeap`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("size"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkMemoryHeap` with the given segment. + /// @param segment the memory segment + public VkMemoryHeap(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryHeap` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryHeap of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryHeap(segment); } + + /// Creates `VkMemoryHeap` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryHeap ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryHeap(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryHeap` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryHeap ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryHeap(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryHeap` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryHeap` + public static VkMemoryHeap alloc(SegmentAllocator allocator) { return new VkMemoryHeap(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryHeap` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryHeap` + public static VkMemoryHeap alloc(SegmentAllocator allocator, long count) { return new VkMemoryHeap(allocator.allocate(LAYOUT, count)); } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkMemoryHeap.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkMemoryHeap.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkMemoryHeap.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMemoryHeap.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryHeap sizeAt(long index, @CType("VkDeviceSize") long value) { VkMemoryHeap.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryHeap size(@CType("VkDeviceSize") long value) { VkMemoryHeap.set_size(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMemoryHeapFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkMemoryHeapFlags") int get_flags(MemorySegment segment) { return VkMemoryHeap.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkMemoryHeapFlags") int flagsAt(long index) { return VkMemoryHeap.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkMemoryHeapFlags") int flags() { return VkMemoryHeap.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkMemoryHeapFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkMemoryHeapFlags") int value) { VkMemoryHeap.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryHeap flagsAt(long index, @CType("VkMemoryHeapFlags") int value) { VkMemoryHeap.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryHeap flags(@CType("VkMemoryHeapFlags") int value) { VkMemoryHeap.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryMapInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryMapInfo.java new file mode 100644 index 00000000..dd2580d5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryMapInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryMapInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkMemoryMapFlags flags; +/// VkDeviceMemory memory; +/// VkDeviceSize offset; +/// VkDeviceSize size; +/// } VkMemoryMapInfo; +/// ``` +public final class VkMemoryMapInfo extends Struct { + /// The struct layout of `VkMemoryMapInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkMemoryMapInfo` with the given segment. + /// @param segment the memory segment + public VkMemoryMapInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryMapInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryMapInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryMapInfo(segment); } + + /// Creates `VkMemoryMapInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryMapInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryMapInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryMapInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryMapInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryMapInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryMapInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryMapInfo` + public static VkMemoryMapInfo alloc(SegmentAllocator allocator) { return new VkMemoryMapInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryMapInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryMapInfo` + public static VkMemoryMapInfo alloc(SegmentAllocator allocator, long count) { return new VkMemoryMapInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryMapInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryMapInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryMapInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryMapInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryMapInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryMapInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryMapInfo sType(@CType("VkStructureType") int value) { VkMemoryMapInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryMapInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryMapInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryMapInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryMapInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryMapInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryMapInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryMapInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryMapInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMemoryMapFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkMemoryMapFlags") int get_flags(MemorySegment segment) { return VkMemoryMapInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkMemoryMapFlags") int flagsAt(long index) { return VkMemoryMapInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkMemoryMapFlags") int flags() { return VkMemoryMapInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkMemoryMapFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkMemoryMapFlags") int value) { VkMemoryMapInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryMapInfo flagsAt(long index, @CType("VkMemoryMapFlags") int value) { VkMemoryMapInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryMapInfo flags(@CType("VkMemoryMapFlags") int value) { VkMemoryMapInfo.set_flags(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkMemoryMapInfo.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkMemoryMapInfo.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkMemoryMapInfo.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryMapInfo.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryMapInfo memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryMapInfo.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryMapInfo memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryMapInfo.set_memory(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkMemoryMapInfo.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkMemoryMapInfo.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkMemoryMapInfo.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMemoryMapInfo.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryMapInfo offsetAt(long index, @CType("VkDeviceSize") long value) { VkMemoryMapInfo.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryMapInfo offset(@CType("VkDeviceSize") long value) { VkMemoryMapInfo.set_offset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkMemoryMapInfo.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkMemoryMapInfo.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkMemoryMapInfo.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMemoryMapInfo.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryMapInfo sizeAt(long index, @CType("VkDeviceSize") long value) { VkMemoryMapInfo.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryMapInfo size(@CType("VkDeviceSize") long value) { VkMemoryMapInfo.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryOpaqueCaptureAddressAllocateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryOpaqueCaptureAddressAllocateInfo.java new file mode 100644 index 00000000..e8c10169 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryOpaqueCaptureAddressAllocateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### opaqueCaptureAddress +/// [VarHandle][#VH_opaqueCaptureAddress] - [Getter][#opaqueCaptureAddress()] - [Setter][#opaqueCaptureAddress(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryOpaqueCaptureAddressAllocateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint64_t opaqueCaptureAddress; +/// } VkMemoryOpaqueCaptureAddressAllocateInfo; +/// ``` +public final class VkMemoryOpaqueCaptureAddressAllocateInfo extends Struct { + /// The struct layout of `VkMemoryOpaqueCaptureAddressAllocateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("opaqueCaptureAddress") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `opaqueCaptureAddress` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_opaqueCaptureAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("opaqueCaptureAddress")); + + /// Creates `VkMemoryOpaqueCaptureAddressAllocateInfo` with the given segment. + /// @param segment the memory segment + public VkMemoryOpaqueCaptureAddressAllocateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryOpaqueCaptureAddressAllocateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryOpaqueCaptureAddressAllocateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryOpaqueCaptureAddressAllocateInfo(segment); } + + /// Creates `VkMemoryOpaqueCaptureAddressAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryOpaqueCaptureAddressAllocateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryOpaqueCaptureAddressAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryOpaqueCaptureAddressAllocateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryOpaqueCaptureAddressAllocateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryOpaqueCaptureAddressAllocateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryOpaqueCaptureAddressAllocateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryOpaqueCaptureAddressAllocateInfo` + public static VkMemoryOpaqueCaptureAddressAllocateInfo alloc(SegmentAllocator allocator) { return new VkMemoryOpaqueCaptureAddressAllocateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryOpaqueCaptureAddressAllocateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryOpaqueCaptureAddressAllocateInfo` + public static VkMemoryOpaqueCaptureAddressAllocateInfo alloc(SegmentAllocator allocator, long count) { return new VkMemoryOpaqueCaptureAddressAllocateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryOpaqueCaptureAddressAllocateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryOpaqueCaptureAddressAllocateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryOpaqueCaptureAddressAllocateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryOpaqueCaptureAddressAllocateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryOpaqueCaptureAddressAllocateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryOpaqueCaptureAddressAllocateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryOpaqueCaptureAddressAllocateInfo sType(@CType("VkStructureType") int value) { VkMemoryOpaqueCaptureAddressAllocateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryOpaqueCaptureAddressAllocateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryOpaqueCaptureAddressAllocateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryOpaqueCaptureAddressAllocateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryOpaqueCaptureAddressAllocateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryOpaqueCaptureAddressAllocateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryOpaqueCaptureAddressAllocateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryOpaqueCaptureAddressAllocateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryOpaqueCaptureAddressAllocateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `opaqueCaptureAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_opaqueCaptureAddress(MemorySegment segment, long index) { return (long) VH_opaqueCaptureAddress.get(segment, 0L, index); } + /// {@return `opaqueCaptureAddress`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_opaqueCaptureAddress(MemorySegment segment) { return VkMemoryOpaqueCaptureAddressAllocateInfo.get_opaqueCaptureAddress(segment, 0L); } + /// {@return `opaqueCaptureAddress` at the given index} + /// @param index the index + public @CType("uint64_t") long opaqueCaptureAddressAt(long index) { return VkMemoryOpaqueCaptureAddressAllocateInfo.get_opaqueCaptureAddress(this.segment(), index); } + /// {@return `opaqueCaptureAddress`} + public @CType("uint64_t") long opaqueCaptureAddress() { return VkMemoryOpaqueCaptureAddressAllocateInfo.get_opaqueCaptureAddress(this.segment()); } + /// Sets `opaqueCaptureAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_opaqueCaptureAddress(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_opaqueCaptureAddress.set(segment, 0L, index, value); } + /// Sets `opaqueCaptureAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_opaqueCaptureAddress(MemorySegment segment, @CType("uint64_t") long value) { VkMemoryOpaqueCaptureAddressAllocateInfo.set_opaqueCaptureAddress(segment, 0L, value); } + /// Sets `opaqueCaptureAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryOpaqueCaptureAddressAllocateInfo opaqueCaptureAddressAt(long index, @CType("uint64_t") long value) { VkMemoryOpaqueCaptureAddressAllocateInfo.set_opaqueCaptureAddress(this.segment(), index, value); return this; } + /// Sets `opaqueCaptureAddress` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryOpaqueCaptureAddressAllocateInfo opaqueCaptureAddress(@CType("uint64_t") long value) { VkMemoryOpaqueCaptureAddressAllocateInfo.set_opaqueCaptureAddress(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryRequirements.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryRequirements.java new file mode 100644 index 00000000..9ed8d066 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryRequirements.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ### alignment +/// [VarHandle][#VH_alignment] - [Getter][#alignment()] - [Setter][#alignment(long)] +/// ### memoryTypeBits +/// [VarHandle][#VH_memoryTypeBits] - [Getter][#memoryTypeBits()] - [Setter][#memoryTypeBits(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryRequirements { +/// VkDeviceSize size; +/// VkDeviceSize alignment; +/// uint32_t memoryTypeBits; +/// } VkMemoryRequirements; +/// ``` +public final class VkMemoryRequirements extends Struct { + /// The struct layout of `VkMemoryRequirements`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("size"), + ValueLayout.JAVA_LONG.withName("alignment"), + ValueLayout.JAVA_INT.withName("memoryTypeBits") + ); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `alignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_alignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("alignment")); + /// The [VarHandle] of `memoryTypeBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeBits")); + + /// Creates `VkMemoryRequirements` with the given segment. + /// @param segment the memory segment + public VkMemoryRequirements(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryRequirements` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryRequirements of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryRequirements(segment); } + + /// Creates `VkMemoryRequirements` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryRequirements ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryRequirements(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryRequirements` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryRequirements ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryRequirements(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryRequirements` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryRequirements` + public static VkMemoryRequirements alloc(SegmentAllocator allocator) { return new VkMemoryRequirements(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryRequirements` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryRequirements` + public static VkMemoryRequirements alloc(SegmentAllocator allocator, long count) { return new VkMemoryRequirements(allocator.allocate(LAYOUT, count)); } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkMemoryRequirements.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkMemoryRequirements.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkMemoryRequirements.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMemoryRequirements.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryRequirements sizeAt(long index, @CType("VkDeviceSize") long value) { VkMemoryRequirements.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryRequirements size(@CType("VkDeviceSize") long value) { VkMemoryRequirements.set_size(this.segment(), value); return this; } + + /// {@return `alignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_alignment(MemorySegment segment, long index) { return (long) VH_alignment.get(segment, 0L, index); } + /// {@return `alignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_alignment(MemorySegment segment) { return VkMemoryRequirements.get_alignment(segment, 0L); } + /// {@return `alignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long alignmentAt(long index) { return VkMemoryRequirements.get_alignment(this.segment(), index); } + /// {@return `alignment`} + public @CType("VkDeviceSize") long alignment() { return VkMemoryRequirements.get_alignment(this.segment()); } + /// Sets `alignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_alignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_alignment.set(segment, 0L, index, value); } + /// Sets `alignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_alignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkMemoryRequirements.set_alignment(segment, 0L, value); } + /// Sets `alignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryRequirements alignmentAt(long index, @CType("VkDeviceSize") long value) { VkMemoryRequirements.set_alignment(this.segment(), index, value); return this; } + /// Sets `alignment` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryRequirements alignment(@CType("VkDeviceSize") long value) { VkMemoryRequirements.set_alignment(this.segment(), value); return this; } + + /// {@return `memoryTypeBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment, long index) { return (int) VH_memoryTypeBits.get(segment, 0L, index); } + /// {@return `memoryTypeBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeBits(MemorySegment segment) { return VkMemoryRequirements.get_memoryTypeBits(segment, 0L); } + /// {@return `memoryTypeBits` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeBitsAt(long index) { return VkMemoryRequirements.get_memoryTypeBits(this.segment(), index); } + /// {@return `memoryTypeBits`} + public @CType("uint32_t") int memoryTypeBits() { return VkMemoryRequirements.get_memoryTypeBits(this.segment()); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeBits.set(segment, 0L, index, value); } + /// Sets `memoryTypeBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeBits(MemorySegment segment, @CType("uint32_t") int value) { VkMemoryRequirements.set_memoryTypeBits(segment, 0L, value); } + /// Sets `memoryTypeBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryRequirements memoryTypeBitsAt(long index, @CType("uint32_t") int value) { VkMemoryRequirements.set_memoryTypeBits(this.segment(), index, value); return this; } + /// Sets `memoryTypeBits` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryRequirements memoryTypeBits(@CType("uint32_t") int value) { VkMemoryRequirements.set_memoryTypeBits(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryRequirements2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryRequirements2.java new file mode 100644 index 00000000..fe94c221 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryRequirements2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryRequirements +/// [Byte offset][#OFFSET_memoryRequirements] - [Memory layout][#ML_memoryRequirements] - [Getter][#memoryRequirements()] - [Setter][#memoryRequirements(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryRequirements2 { +/// VkStructureType sType; +/// void * pNext; +/// VkMemoryRequirements memoryRequirements; +/// } VkMemoryRequirements2; +/// ``` +public final class VkMemoryRequirements2 extends Struct { + /// The struct layout of `VkMemoryRequirements2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkMemoryRequirements.LAYOUT.withName("memoryRequirements") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `memoryRequirements`. + public static final long OFFSET_memoryRequirements = LAYOUT.byteOffset(PathElement.groupElement("memoryRequirements")); + /// The memory layout of `memoryRequirements`. + public static final MemoryLayout ML_memoryRequirements = LAYOUT.select(PathElement.groupElement("memoryRequirements")); + + /// Creates `VkMemoryRequirements2` with the given segment. + /// @param segment the memory segment + public VkMemoryRequirements2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryRequirements2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryRequirements2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryRequirements2(segment); } + + /// Creates `VkMemoryRequirements2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryRequirements2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryRequirements2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryRequirements2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryRequirements2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryRequirements2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryRequirements2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryRequirements2` + public static VkMemoryRequirements2 alloc(SegmentAllocator allocator) { return new VkMemoryRequirements2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryRequirements2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryRequirements2` + public static VkMemoryRequirements2 alloc(SegmentAllocator allocator, long count) { return new VkMemoryRequirements2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryRequirements2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryRequirements2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryRequirements2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryRequirements2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryRequirements2 sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryRequirements2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryRequirements2 sType(@CType("VkStructureType") int value) { VkMemoryRequirements2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryRequirements2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryRequirements2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryRequirements2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryRequirements2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryRequirements2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryRequirements2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryRequirements2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkMemoryRequirements2.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryRequirements` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment get_memoryRequirements(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_memoryRequirements, index), ML_memoryRequirements); } + /// {@return `memoryRequirements`} + /// @param segment the segment of the struct + public static @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment get_memoryRequirements(MemorySegment segment) { return VkMemoryRequirements2.get_memoryRequirements(segment, 0L); } + /// {@return `memoryRequirements` at the given index} + /// @param index the index + public @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment memoryRequirementsAt(long index) { return VkMemoryRequirements2.get_memoryRequirements(this.segment(), index); } + /// {@return `memoryRequirements`} + public @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment memoryRequirements() { return VkMemoryRequirements2.get_memoryRequirements(this.segment()); } + /// Sets `memoryRequirements` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryRequirements(MemorySegment segment, long index, @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_memoryRequirements, index), ML_memoryRequirements.byteSize()); } + /// Sets `memoryRequirements` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryRequirements(MemorySegment segment, @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment value) { VkMemoryRequirements2.set_memoryRequirements(segment, 0L, value); } + /// Sets `memoryRequirements` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryRequirements2 memoryRequirementsAt(long index, @CType("VkMemoryRequirements") java.lang.foreign.MemorySegment value) { VkMemoryRequirements2.set_memoryRequirements(this.segment(), index, value); return this; } + /// Sets `memoryRequirements` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryRequirements2 memoryRequirements(@CType("VkMemoryRequirements") java.lang.foreign.MemorySegment value) { VkMemoryRequirements2.set_memoryRequirements(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryToImageCopy.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryToImageCopy.java new file mode 100644 index 00000000..65dfc6cf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryToImageCopy.java @@ -0,0 +1,376 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pHostPointer +/// [VarHandle][#VH_pHostPointer] - [Getter][#pHostPointer()] - [Setter][#pHostPointer(java.lang.foreign.MemorySegment)] +/// ### memoryRowLength +/// [VarHandle][#VH_memoryRowLength] - [Getter][#memoryRowLength()] - [Setter][#memoryRowLength(int)] +/// ### memoryImageHeight +/// [VarHandle][#VH_memoryImageHeight] - [Getter][#memoryImageHeight()] - [Setter][#memoryImageHeight(int)] +/// ### imageSubresource +/// [Byte offset][#OFFSET_imageSubresource] - [Memory layout][#ML_imageSubresource] - [Getter][#imageSubresource()] - [Setter][#imageSubresource(java.lang.foreign.MemorySegment)] +/// ### imageOffset +/// [Byte offset][#OFFSET_imageOffset] - [Memory layout][#ML_imageOffset] - [Getter][#imageOffset()] - [Setter][#imageOffset(java.lang.foreign.MemorySegment)] +/// ### imageExtent +/// [Byte offset][#OFFSET_imageExtent] - [Memory layout][#ML_imageExtent] - [Getter][#imageExtent()] - [Setter][#imageExtent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryToImageCopy { +/// VkStructureType sType; +/// const void * pNext; +/// const void * pHostPointer; +/// uint32_t memoryRowLength; +/// uint32_t memoryImageHeight; +/// VkImageSubresourceLayers imageSubresource; +/// VkOffset3D imageOffset; +/// VkExtent3D imageExtent; +/// } VkMemoryToImageCopy; +/// ``` +public final class VkMemoryToImageCopy extends Struct { + /// The struct layout of `VkMemoryToImageCopy`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pHostPointer"), + ValueLayout.JAVA_INT.withName("memoryRowLength"), + ValueLayout.JAVA_INT.withName("memoryImageHeight"), + overrungl.vulkan.struct.VkImageSubresourceLayers.LAYOUT.withName("imageSubresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("imageOffset"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("imageExtent") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pHostPointer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pHostPointer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pHostPointer")); + /// The [VarHandle] of `memoryRowLength` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryRowLength = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryRowLength")); + /// The [VarHandle] of `memoryImageHeight` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryImageHeight = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryImageHeight")); + /// The byte offset of `imageSubresource`. + public static final long OFFSET_imageSubresource = LAYOUT.byteOffset(PathElement.groupElement("imageSubresource")); + /// The memory layout of `imageSubresource`. + public static final MemoryLayout ML_imageSubresource = LAYOUT.select(PathElement.groupElement("imageSubresource")); + /// The byte offset of `imageOffset`. + public static final long OFFSET_imageOffset = LAYOUT.byteOffset(PathElement.groupElement("imageOffset")); + /// The memory layout of `imageOffset`. + public static final MemoryLayout ML_imageOffset = LAYOUT.select(PathElement.groupElement("imageOffset")); + /// The byte offset of `imageExtent`. + public static final long OFFSET_imageExtent = LAYOUT.byteOffset(PathElement.groupElement("imageExtent")); + /// The memory layout of `imageExtent`. + public static final MemoryLayout ML_imageExtent = LAYOUT.select(PathElement.groupElement("imageExtent")); + + /// Creates `VkMemoryToImageCopy` with the given segment. + /// @param segment the memory segment + public VkMemoryToImageCopy(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryToImageCopy` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryToImageCopy of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryToImageCopy(segment); } + + /// Creates `VkMemoryToImageCopy` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryToImageCopy ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryToImageCopy(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryToImageCopy` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryToImageCopy ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryToImageCopy(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryToImageCopy` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryToImageCopy` + public static VkMemoryToImageCopy alloc(SegmentAllocator allocator) { return new VkMemoryToImageCopy(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryToImageCopy` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryToImageCopy` + public static VkMemoryToImageCopy alloc(SegmentAllocator allocator, long count) { return new VkMemoryToImageCopy(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryToImageCopy.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryToImageCopy.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryToImageCopy.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryToImageCopy.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryToImageCopy.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy sType(@CType("VkStructureType") int value) { VkMemoryToImageCopy.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryToImageCopy.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryToImageCopy.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryToImageCopy.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_pNext(this.segment(), value); return this; } + + /// {@return `pHostPointer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pHostPointer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pHostPointer.get(segment, 0L, index); } + /// {@return `pHostPointer`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pHostPointer(MemorySegment segment) { return VkMemoryToImageCopy.get_pHostPointer(segment, 0L); } + /// {@return `pHostPointer` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pHostPointerAt(long index) { return VkMemoryToImageCopy.get_pHostPointer(this.segment(), index); } + /// {@return `pHostPointer`} + public @CType("const void *") java.lang.foreign.MemorySegment pHostPointer() { return VkMemoryToImageCopy.get_pHostPointer(this.segment()); } + /// Sets `pHostPointer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pHostPointer(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pHostPointer.set(segment, 0L, index, value); } + /// Sets `pHostPointer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pHostPointer(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_pHostPointer(segment, 0L, value); } + /// Sets `pHostPointer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy pHostPointerAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_pHostPointer(this.segment(), index, value); return this; } + /// Sets `pHostPointer` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy pHostPointer(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_pHostPointer(this.segment(), value); return this; } + + /// {@return `memoryRowLength` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryRowLength(MemorySegment segment, long index) { return (int) VH_memoryRowLength.get(segment, 0L, index); } + /// {@return `memoryRowLength`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryRowLength(MemorySegment segment) { return VkMemoryToImageCopy.get_memoryRowLength(segment, 0L); } + /// {@return `memoryRowLength` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryRowLengthAt(long index) { return VkMemoryToImageCopy.get_memoryRowLength(this.segment(), index); } + /// {@return `memoryRowLength`} + public @CType("uint32_t") int memoryRowLength() { return VkMemoryToImageCopy.get_memoryRowLength(this.segment()); } + /// Sets `memoryRowLength` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryRowLength(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryRowLength.set(segment, 0L, index, value); } + /// Sets `memoryRowLength` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryRowLength(MemorySegment segment, @CType("uint32_t") int value) { VkMemoryToImageCopy.set_memoryRowLength(segment, 0L, value); } + /// Sets `memoryRowLength` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy memoryRowLengthAt(long index, @CType("uint32_t") int value) { VkMemoryToImageCopy.set_memoryRowLength(this.segment(), index, value); return this; } + /// Sets `memoryRowLength` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy memoryRowLength(@CType("uint32_t") int value) { VkMemoryToImageCopy.set_memoryRowLength(this.segment(), value); return this; } + + /// {@return `memoryImageHeight` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryImageHeight(MemorySegment segment, long index) { return (int) VH_memoryImageHeight.get(segment, 0L, index); } + /// {@return `memoryImageHeight`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryImageHeight(MemorySegment segment) { return VkMemoryToImageCopy.get_memoryImageHeight(segment, 0L); } + /// {@return `memoryImageHeight` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryImageHeightAt(long index) { return VkMemoryToImageCopy.get_memoryImageHeight(this.segment(), index); } + /// {@return `memoryImageHeight`} + public @CType("uint32_t") int memoryImageHeight() { return VkMemoryToImageCopy.get_memoryImageHeight(this.segment()); } + /// Sets `memoryImageHeight` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryImageHeight(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryImageHeight.set(segment, 0L, index, value); } + /// Sets `memoryImageHeight` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryImageHeight(MemorySegment segment, @CType("uint32_t") int value) { VkMemoryToImageCopy.set_memoryImageHeight(segment, 0L, value); } + /// Sets `memoryImageHeight` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy memoryImageHeightAt(long index, @CType("uint32_t") int value) { VkMemoryToImageCopy.set_memoryImageHeight(this.segment(), index, value); return this; } + /// Sets `memoryImageHeight` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy memoryImageHeight(@CType("uint32_t") int value) { VkMemoryToImageCopy.set_memoryImageHeight(this.segment(), value); return this; } + + /// {@return `imageSubresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource); } + /// {@return `imageSubresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment get_imageSubresource(MemorySegment segment) { return VkMemoryToImageCopy.get_imageSubresource(segment, 0L); } + /// {@return `imageSubresource` at the given index} + /// @param index the index + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment imageSubresourceAt(long index) { return VkMemoryToImageCopy.get_imageSubresource(this.segment(), index); } + /// {@return `imageSubresource`} + public @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment imageSubresource() { return VkMemoryToImageCopy.get_imageSubresource(this.segment()); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageSubresource, index), ML_imageSubresource.byteSize()); } + /// Sets `imageSubresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageSubresource(MemorySegment segment, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_imageSubresource(segment, 0L, value); } + /// Sets `imageSubresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy imageSubresourceAt(long index, @CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_imageSubresource(this.segment(), index, value); return this; } + /// Sets `imageSubresource` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy imageSubresource(@CType("VkImageSubresourceLayers") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_imageSubresource(this.segment(), value); return this; } + + /// {@return `imageOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_imageOffset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageOffset, index), ML_imageOffset); } + /// {@return `imageOffset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_imageOffset(MemorySegment segment) { return VkMemoryToImageCopy.get_imageOffset(segment, 0L); } + /// {@return `imageOffset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment imageOffsetAt(long index) { return VkMemoryToImageCopy.get_imageOffset(this.segment(), index); } + /// {@return `imageOffset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment imageOffset() { return VkMemoryToImageCopy.get_imageOffset(this.segment()); } + /// Sets `imageOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageOffset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageOffset, index), ML_imageOffset.byteSize()); } + /// Sets `imageOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageOffset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_imageOffset(segment, 0L, value); } + /// Sets `imageOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy imageOffsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_imageOffset(this.segment(), index, value); return this; } + /// Sets `imageOffset` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy imageOffset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_imageOffset(this.segment(), value); return this; } + + /// {@return `imageExtent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent); } + /// {@return `imageExtent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageExtent(MemorySegment segment) { return VkMemoryToImageCopy.get_imageExtent(segment, 0L); } + /// {@return `imageExtent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageExtentAt(long index) { return VkMemoryToImageCopy.get_imageExtent(this.segment(), index); } + /// {@return `imageExtent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageExtent() { return VkMemoryToImageCopy.get_imageExtent(this.segment()); } + /// Sets `imageExtent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageExtent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageExtent, index), ML_imageExtent.byteSize()); } + /// Sets `imageExtent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageExtent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_imageExtent(segment, 0L, value); } + /// Sets `imageExtent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy imageExtentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_imageExtent(this.segment(), index, value); return this; } + /// Sets `imageExtent` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryToImageCopy imageExtent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkMemoryToImageCopy.set_imageExtent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryType.java new file mode 100644 index 00000000..f28e438c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryType.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### propertyFlags +/// [VarHandle][#VH_propertyFlags] - [Getter][#propertyFlags()] - [Setter][#propertyFlags(int)] +/// ### heapIndex +/// [VarHandle][#VH_heapIndex] - [Getter][#heapIndex()] - [Setter][#heapIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryType { +/// VkMemoryPropertyFlags propertyFlags; +/// uint32_t heapIndex; +/// } VkMemoryType; +/// ``` +public final class VkMemoryType extends Struct { + /// The struct layout of `VkMemoryType`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("propertyFlags"), + ValueLayout.JAVA_INT.withName("heapIndex") + ); + /// The [VarHandle] of `propertyFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_propertyFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("propertyFlags")); + /// The [VarHandle] of `heapIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_heapIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("heapIndex")); + + /// Creates `VkMemoryType` with the given segment. + /// @param segment the memory segment + public VkMemoryType(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryType` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryType of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryType(segment); } + + /// Creates `VkMemoryType` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryType ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryType(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryType` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryType ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryType(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryType` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryType` + public static VkMemoryType alloc(SegmentAllocator allocator) { return new VkMemoryType(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryType` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryType` + public static VkMemoryType alloc(SegmentAllocator allocator, long count) { return new VkMemoryType(allocator.allocate(LAYOUT, count)); } + + /// {@return `propertyFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMemoryPropertyFlags") int get_propertyFlags(MemorySegment segment, long index) { return (int) VH_propertyFlags.get(segment, 0L, index); } + /// {@return `propertyFlags`} + /// @param segment the segment of the struct + public static @CType("VkMemoryPropertyFlags") int get_propertyFlags(MemorySegment segment) { return VkMemoryType.get_propertyFlags(segment, 0L); } + /// {@return `propertyFlags` at the given index} + /// @param index the index + public @CType("VkMemoryPropertyFlags") int propertyFlagsAt(long index) { return VkMemoryType.get_propertyFlags(this.segment(), index); } + /// {@return `propertyFlags`} + public @CType("VkMemoryPropertyFlags") int propertyFlags() { return VkMemoryType.get_propertyFlags(this.segment()); } + /// Sets `propertyFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_propertyFlags(MemorySegment segment, long index, @CType("VkMemoryPropertyFlags") int value) { VH_propertyFlags.set(segment, 0L, index, value); } + /// Sets `propertyFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_propertyFlags(MemorySegment segment, @CType("VkMemoryPropertyFlags") int value) { VkMemoryType.set_propertyFlags(segment, 0L, value); } + /// Sets `propertyFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryType propertyFlagsAt(long index, @CType("VkMemoryPropertyFlags") int value) { VkMemoryType.set_propertyFlags(this.segment(), index, value); return this; } + /// Sets `propertyFlags` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryType propertyFlags(@CType("VkMemoryPropertyFlags") int value) { VkMemoryType.set_propertyFlags(this.segment(), value); return this; } + + /// {@return `heapIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_heapIndex(MemorySegment segment, long index) { return (int) VH_heapIndex.get(segment, 0L, index); } + /// {@return `heapIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_heapIndex(MemorySegment segment) { return VkMemoryType.get_heapIndex(segment, 0L); } + /// {@return `heapIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int heapIndexAt(long index) { return VkMemoryType.get_heapIndex(this.segment(), index); } + /// {@return `heapIndex`} + public @CType("uint32_t") int heapIndex() { return VkMemoryType.get_heapIndex(this.segment()); } + /// Sets `heapIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_heapIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_heapIndex.set(segment, 0L, index, value); } + /// Sets `heapIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_heapIndex(MemorySegment segment, @CType("uint32_t") int value) { VkMemoryType.set_heapIndex(segment, 0L, value); } + /// Sets `heapIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryType heapIndexAt(long index, @CType("uint32_t") int value) { VkMemoryType.set_heapIndex(this.segment(), index, value); return this; } + /// Sets `heapIndex` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryType heapIndex(@CType("uint32_t") int value) { VkMemoryType.set_heapIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryUnmapInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryUnmapInfo.java new file mode 100644 index 00000000..c634274b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkMemoryUnmapInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkMemoryUnmapInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkMemoryUnmapFlags flags; +/// VkDeviceMemory memory; +/// } VkMemoryUnmapInfo; +/// ``` +public final class VkMemoryUnmapInfo extends Struct { + /// The struct layout of `VkMemoryUnmapInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.ADDRESS.withName("memory") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + + /// Creates `VkMemoryUnmapInfo` with the given segment. + /// @param segment the memory segment + public VkMemoryUnmapInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkMemoryUnmapInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryUnmapInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryUnmapInfo(segment); } + + /// Creates `VkMemoryUnmapInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryUnmapInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryUnmapInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkMemoryUnmapInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkMemoryUnmapInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkMemoryUnmapInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkMemoryUnmapInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkMemoryUnmapInfo` + public static VkMemoryUnmapInfo alloc(SegmentAllocator allocator) { return new VkMemoryUnmapInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkMemoryUnmapInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkMemoryUnmapInfo` + public static VkMemoryUnmapInfo alloc(SegmentAllocator allocator, long count) { return new VkMemoryUnmapInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkMemoryUnmapInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkMemoryUnmapInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkMemoryUnmapInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkMemoryUnmapInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryUnmapInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkMemoryUnmapInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryUnmapInfo sType(@CType("VkStructureType") int value) { VkMemoryUnmapInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkMemoryUnmapInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkMemoryUnmapInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkMemoryUnmapInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryUnmapInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryUnmapInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryUnmapInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryUnmapInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkMemoryUnmapInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkMemoryUnmapFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkMemoryUnmapFlags") int get_flags(MemorySegment segment) { return VkMemoryUnmapInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkMemoryUnmapFlags") int flagsAt(long index) { return VkMemoryUnmapInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkMemoryUnmapFlags") int flags() { return VkMemoryUnmapInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkMemoryUnmapFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkMemoryUnmapFlags") int value) { VkMemoryUnmapInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryUnmapInfo flagsAt(long index, @CType("VkMemoryUnmapFlags") int value) { VkMemoryUnmapInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryUnmapInfo flags(@CType("VkMemoryUnmapFlags") int value) { VkMemoryUnmapInfo.set_flags(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkMemoryUnmapInfo.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkMemoryUnmapInfo.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkMemoryUnmapInfo.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryUnmapInfo.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkMemoryUnmapInfo memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryUnmapInfo.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkMemoryUnmapInfo memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkMemoryUnmapInfo.set_memory(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkOffset2D.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkOffset2D.java new file mode 100644 index 00000000..9506207f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkOffset2D.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### x +/// [VarHandle][#VH_x] - [Getter][#x()] - [Setter][#x(int)] +/// ### y +/// [VarHandle][#VH_y] - [Getter][#y()] - [Setter][#y(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkOffset2D { +/// int32_t x; +/// int32_t y; +/// } VkOffset2D; +/// ``` +public final class VkOffset2D extends Struct { + /// The struct layout of `VkOffset2D`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("x"), + ValueLayout.JAVA_INT.withName("y") + ); + /// The [VarHandle] of `x` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_x = LAYOUT.arrayElementVarHandle(PathElement.groupElement("x")); + /// The [VarHandle] of `y` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_y = LAYOUT.arrayElementVarHandle(PathElement.groupElement("y")); + + /// Creates `VkOffset2D` with the given segment. + /// @param segment the memory segment + public VkOffset2D(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkOffset2D` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOffset2D of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOffset2D(segment); } + + /// Creates `VkOffset2D` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOffset2D ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOffset2D(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkOffset2D` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkOffset2D ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkOffset2D(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkOffset2D` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkOffset2D` + public static VkOffset2D alloc(SegmentAllocator allocator) { return new VkOffset2D(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkOffset2D` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkOffset2D` + public static VkOffset2D alloc(SegmentAllocator allocator, long count) { return new VkOffset2D(allocator.allocate(LAYOUT, count)); } + + /// {@return `x` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_x(MemorySegment segment, long index) { return (int) VH_x.get(segment, 0L, index); } + /// {@return `x`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_x(MemorySegment segment) { return VkOffset2D.get_x(segment, 0L); } + /// {@return `x` at the given index} + /// @param index the index + public @CType("int32_t") int xAt(long index) { return VkOffset2D.get_x(this.segment(), index); } + /// {@return `x`} + public @CType("int32_t") int x() { return VkOffset2D.get_x(this.segment()); } + /// Sets `x` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_x(MemorySegment segment, long index, @CType("int32_t") int value) { VH_x.set(segment, 0L, index, value); } + /// Sets `x` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_x(MemorySegment segment, @CType("int32_t") int value) { VkOffset2D.set_x(segment, 0L, value); } + /// Sets `x` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOffset2D xAt(long index, @CType("int32_t") int value) { VkOffset2D.set_x(this.segment(), index, value); return this; } + /// Sets `x` with the given value. + /// @param value the value + /// @return `this` + public VkOffset2D x(@CType("int32_t") int value) { VkOffset2D.set_x(this.segment(), value); return this; } + + /// {@return `y` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_y(MemorySegment segment, long index) { return (int) VH_y.get(segment, 0L, index); } + /// {@return `y`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_y(MemorySegment segment) { return VkOffset2D.get_y(segment, 0L); } + /// {@return `y` at the given index} + /// @param index the index + public @CType("int32_t") int yAt(long index) { return VkOffset2D.get_y(this.segment(), index); } + /// {@return `y`} + public @CType("int32_t") int y() { return VkOffset2D.get_y(this.segment()); } + /// Sets `y` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_y(MemorySegment segment, long index, @CType("int32_t") int value) { VH_y.set(segment, 0L, index, value); } + /// Sets `y` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_y(MemorySegment segment, @CType("int32_t") int value) { VkOffset2D.set_y(segment, 0L, value); } + /// Sets `y` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOffset2D yAt(long index, @CType("int32_t") int value) { VkOffset2D.set_y(this.segment(), index, value); return this; } + /// Sets `y` with the given value. + /// @param value the value + /// @return `this` + public VkOffset2D y(@CType("int32_t") int value) { VkOffset2D.set_y(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkOffset3D.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkOffset3D.java new file mode 100644 index 00000000..c31908f9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkOffset3D.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### x +/// [VarHandle][#VH_x] - [Getter][#x()] - [Setter][#x(int)] +/// ### y +/// [VarHandle][#VH_y] - [Getter][#y()] - [Setter][#y(int)] +/// ### z +/// [VarHandle][#VH_z] - [Getter][#z()] - [Setter][#z(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkOffset3D { +/// int32_t x; +/// int32_t y; +/// int32_t z; +/// } VkOffset3D; +/// ``` +public final class VkOffset3D extends Struct { + /// The struct layout of `VkOffset3D`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("x"), + ValueLayout.JAVA_INT.withName("y"), + ValueLayout.JAVA_INT.withName("z") + ); + /// The [VarHandle] of `x` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_x = LAYOUT.arrayElementVarHandle(PathElement.groupElement("x")); + /// The [VarHandle] of `y` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_y = LAYOUT.arrayElementVarHandle(PathElement.groupElement("y")); + /// The [VarHandle] of `z` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_z = LAYOUT.arrayElementVarHandle(PathElement.groupElement("z")); + + /// Creates `VkOffset3D` with the given segment. + /// @param segment the memory segment + public VkOffset3D(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkOffset3D` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOffset3D of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOffset3D(segment); } + + /// Creates `VkOffset3D` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkOffset3D ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkOffset3D(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkOffset3D` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkOffset3D ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkOffset3D(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkOffset3D` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkOffset3D` + public static VkOffset3D alloc(SegmentAllocator allocator) { return new VkOffset3D(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkOffset3D` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkOffset3D` + public static VkOffset3D alloc(SegmentAllocator allocator, long count) { return new VkOffset3D(allocator.allocate(LAYOUT, count)); } + + /// {@return `x` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_x(MemorySegment segment, long index) { return (int) VH_x.get(segment, 0L, index); } + /// {@return `x`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_x(MemorySegment segment) { return VkOffset3D.get_x(segment, 0L); } + /// {@return `x` at the given index} + /// @param index the index + public @CType("int32_t") int xAt(long index) { return VkOffset3D.get_x(this.segment(), index); } + /// {@return `x`} + public @CType("int32_t") int x() { return VkOffset3D.get_x(this.segment()); } + /// Sets `x` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_x(MemorySegment segment, long index, @CType("int32_t") int value) { VH_x.set(segment, 0L, index, value); } + /// Sets `x` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_x(MemorySegment segment, @CType("int32_t") int value) { VkOffset3D.set_x(segment, 0L, value); } + /// Sets `x` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOffset3D xAt(long index, @CType("int32_t") int value) { VkOffset3D.set_x(this.segment(), index, value); return this; } + /// Sets `x` with the given value. + /// @param value the value + /// @return `this` + public VkOffset3D x(@CType("int32_t") int value) { VkOffset3D.set_x(this.segment(), value); return this; } + + /// {@return `y` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_y(MemorySegment segment, long index) { return (int) VH_y.get(segment, 0L, index); } + /// {@return `y`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_y(MemorySegment segment) { return VkOffset3D.get_y(segment, 0L); } + /// {@return `y` at the given index} + /// @param index the index + public @CType("int32_t") int yAt(long index) { return VkOffset3D.get_y(this.segment(), index); } + /// {@return `y`} + public @CType("int32_t") int y() { return VkOffset3D.get_y(this.segment()); } + /// Sets `y` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_y(MemorySegment segment, long index, @CType("int32_t") int value) { VH_y.set(segment, 0L, index, value); } + /// Sets `y` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_y(MemorySegment segment, @CType("int32_t") int value) { VkOffset3D.set_y(segment, 0L, value); } + /// Sets `y` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOffset3D yAt(long index, @CType("int32_t") int value) { VkOffset3D.set_y(this.segment(), index, value); return this; } + /// Sets `y` with the given value. + /// @param value the value + /// @return `this` + public VkOffset3D y(@CType("int32_t") int value) { VkOffset3D.set_y(this.segment(), value); return this; } + + /// {@return `z` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_z(MemorySegment segment, long index) { return (int) VH_z.get(segment, 0L, index); } + /// {@return `z`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_z(MemorySegment segment) { return VkOffset3D.get_z(segment, 0L); } + /// {@return `z` at the given index} + /// @param index the index + public @CType("int32_t") int zAt(long index) { return VkOffset3D.get_z(this.segment(), index); } + /// {@return `z`} + public @CType("int32_t") int z() { return VkOffset3D.get_z(this.segment()); } + /// Sets `z` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_z(MemorySegment segment, long index, @CType("int32_t") int value) { VH_z.set(segment, 0L, index, value); } + /// Sets `z` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_z(MemorySegment segment, @CType("int32_t") int value) { VkOffset3D.set_z(segment, 0L, value); } + /// Sets `z` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkOffset3D zAt(long index, @CType("int32_t") int value) { VkOffset3D.set_z(this.segment(), index, value); return this; } + /// Sets `z` with the given value. + /// @param value the value + /// @return `this` + public VkOffset3D z(@CType("int32_t") int value) { VkOffset3D.set_z(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevice16BitStorageFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevice16BitStorageFeatures.java new file mode 100644 index 00000000..69669f1c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevice16BitStorageFeatures.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### storageBuffer16BitAccess +/// [VarHandle][#VH_storageBuffer16BitAccess] - [Getter][#storageBuffer16BitAccess()] - [Setter][#storageBuffer16BitAccess(int)] +/// ### uniformAndStorageBuffer16BitAccess +/// [VarHandle][#VH_uniformAndStorageBuffer16BitAccess] - [Getter][#uniformAndStorageBuffer16BitAccess()] - [Setter][#uniformAndStorageBuffer16BitAccess(int)] +/// ### storagePushConstant16 +/// [VarHandle][#VH_storagePushConstant16] - [Getter][#storagePushConstant16()] - [Setter][#storagePushConstant16(int)] +/// ### storageInputOutput16 +/// [VarHandle][#VH_storageInputOutput16] - [Getter][#storageInputOutput16()] - [Setter][#storageInputOutput16(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevice16BitStorageFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 storageBuffer16BitAccess; +/// VkBool32 uniformAndStorageBuffer16BitAccess; +/// VkBool32 storagePushConstant16; +/// VkBool32 storageInputOutput16; +/// } VkPhysicalDevice16BitStorageFeatures; +/// ``` +public final class VkPhysicalDevice16BitStorageFeatures extends Struct { + /// The struct layout of `VkPhysicalDevice16BitStorageFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("storageBuffer16BitAccess"), + ValueLayout.JAVA_INT.withName("uniformAndStorageBuffer16BitAccess"), + ValueLayout.JAVA_INT.withName("storagePushConstant16"), + ValueLayout.JAVA_INT.withName("storageInputOutput16") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `storageBuffer16BitAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storageBuffer16BitAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageBuffer16BitAccess")); + /// The [VarHandle] of `uniformAndStorageBuffer16BitAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniformAndStorageBuffer16BitAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformAndStorageBuffer16BitAccess")); + /// The [VarHandle] of `storagePushConstant16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storagePushConstant16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storagePushConstant16")); + /// The [VarHandle] of `storageInputOutput16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storageInputOutput16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageInputOutput16")); + + /// Creates `VkPhysicalDevice16BitStorageFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevice16BitStorageFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevice16BitStorageFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevice16BitStorageFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevice16BitStorageFeatures(segment); } + + /// Creates `VkPhysicalDevice16BitStorageFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevice16BitStorageFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevice16BitStorageFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevice16BitStorageFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevice16BitStorageFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevice16BitStorageFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevice16BitStorageFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevice16BitStorageFeatures` + public static VkPhysicalDevice16BitStorageFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDevice16BitStorageFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevice16BitStorageFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevice16BitStorageFeatures` + public static VkPhysicalDevice16BitStorageFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevice16BitStorageFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevice16BitStorageFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevice16BitStorageFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevice16BitStorageFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevice16BitStorageFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevice16BitStorageFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDevice16BitStorageFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevice16BitStorageFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevice16BitStorageFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevice16BitStorageFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevice16BitStorageFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevice16BitStorageFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevice16BitStorageFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `storageBuffer16BitAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storageBuffer16BitAccess(MemorySegment segment, long index) { return (int) VH_storageBuffer16BitAccess.get(segment, 0L, index); } + /// {@return `storageBuffer16BitAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storageBuffer16BitAccess(MemorySegment segment) { return VkPhysicalDevice16BitStorageFeatures.get_storageBuffer16BitAccess(segment, 0L); } + /// {@return `storageBuffer16BitAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int storageBuffer16BitAccessAt(long index) { return VkPhysicalDevice16BitStorageFeatures.get_storageBuffer16BitAccess(this.segment(), index); } + /// {@return `storageBuffer16BitAccess`} + public @CType("VkBool32") int storageBuffer16BitAccess() { return VkPhysicalDevice16BitStorageFeatures.get_storageBuffer16BitAccess(this.segment()); } + /// Sets `storageBuffer16BitAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageBuffer16BitAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storageBuffer16BitAccess.set(segment, 0L, index, value); } + /// Sets `storageBuffer16BitAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageBuffer16BitAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_storageBuffer16BitAccess(segment, 0L, value); } + /// Sets `storageBuffer16BitAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures storageBuffer16BitAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_storageBuffer16BitAccess(this.segment(), index, value); return this; } + /// Sets `storageBuffer16BitAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures storageBuffer16BitAccess(@CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_storageBuffer16BitAccess(this.segment(), value); return this; } + + /// {@return `uniformAndStorageBuffer16BitAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_uniformAndStorageBuffer16BitAccess(MemorySegment segment, long index) { return (int) VH_uniformAndStorageBuffer16BitAccess.get(segment, 0L, index); } + /// {@return `uniformAndStorageBuffer16BitAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_uniformAndStorageBuffer16BitAccess(MemorySegment segment) { return VkPhysicalDevice16BitStorageFeatures.get_uniformAndStorageBuffer16BitAccess(segment, 0L); } + /// {@return `uniformAndStorageBuffer16BitAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int uniformAndStorageBuffer16BitAccessAt(long index) { return VkPhysicalDevice16BitStorageFeatures.get_uniformAndStorageBuffer16BitAccess(this.segment(), index); } + /// {@return `uniformAndStorageBuffer16BitAccess`} + public @CType("VkBool32") int uniformAndStorageBuffer16BitAccess() { return VkPhysicalDevice16BitStorageFeatures.get_uniformAndStorageBuffer16BitAccess(this.segment()); } + /// Sets `uniformAndStorageBuffer16BitAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformAndStorageBuffer16BitAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_uniformAndStorageBuffer16BitAccess.set(segment, 0L, index, value); } + /// Sets `uniformAndStorageBuffer16BitAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformAndStorageBuffer16BitAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_uniformAndStorageBuffer16BitAccess(segment, 0L, value); } + /// Sets `uniformAndStorageBuffer16BitAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures uniformAndStorageBuffer16BitAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_uniformAndStorageBuffer16BitAccess(this.segment(), index, value); return this; } + /// Sets `uniformAndStorageBuffer16BitAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures uniformAndStorageBuffer16BitAccess(@CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_uniformAndStorageBuffer16BitAccess(this.segment(), value); return this; } + + /// {@return `storagePushConstant16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storagePushConstant16(MemorySegment segment, long index) { return (int) VH_storagePushConstant16.get(segment, 0L, index); } + /// {@return `storagePushConstant16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storagePushConstant16(MemorySegment segment) { return VkPhysicalDevice16BitStorageFeatures.get_storagePushConstant16(segment, 0L); } + /// {@return `storagePushConstant16` at the given index} + /// @param index the index + public @CType("VkBool32") int storagePushConstant16At(long index) { return VkPhysicalDevice16BitStorageFeatures.get_storagePushConstant16(this.segment(), index); } + /// {@return `storagePushConstant16`} + public @CType("VkBool32") int storagePushConstant16() { return VkPhysicalDevice16BitStorageFeatures.get_storagePushConstant16(this.segment()); } + /// Sets `storagePushConstant16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storagePushConstant16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storagePushConstant16.set(segment, 0L, index, value); } + /// Sets `storagePushConstant16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storagePushConstant16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_storagePushConstant16(segment, 0L, value); } + /// Sets `storagePushConstant16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures storagePushConstant16At(long index, @CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_storagePushConstant16(this.segment(), index, value); return this; } + /// Sets `storagePushConstant16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures storagePushConstant16(@CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_storagePushConstant16(this.segment(), value); return this; } + + /// {@return `storageInputOutput16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storageInputOutput16(MemorySegment segment, long index) { return (int) VH_storageInputOutput16.get(segment, 0L, index); } + /// {@return `storageInputOutput16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storageInputOutput16(MemorySegment segment) { return VkPhysicalDevice16BitStorageFeatures.get_storageInputOutput16(segment, 0L); } + /// {@return `storageInputOutput16` at the given index} + /// @param index the index + public @CType("VkBool32") int storageInputOutput16At(long index) { return VkPhysicalDevice16BitStorageFeatures.get_storageInputOutput16(this.segment(), index); } + /// {@return `storageInputOutput16`} + public @CType("VkBool32") int storageInputOutput16() { return VkPhysicalDevice16BitStorageFeatures.get_storageInputOutput16(this.segment()); } + /// Sets `storageInputOutput16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageInputOutput16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storageInputOutput16.set(segment, 0L, index, value); } + /// Sets `storageInputOutput16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageInputOutput16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_storageInputOutput16(segment, 0L, value); } + /// Sets `storageInputOutput16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures storageInputOutput16At(long index, @CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_storageInputOutput16(this.segment(), index, value); return this; } + /// Sets `storageInputOutput16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice16BitStorageFeatures storageInputOutput16(@CType("VkBool32") int value) { VkPhysicalDevice16BitStorageFeatures.set_storageInputOutput16(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevice8BitStorageFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevice8BitStorageFeatures.java new file mode 100644 index 00000000..05ce4f14 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevice8BitStorageFeatures.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### storageBuffer8BitAccess +/// [VarHandle][#VH_storageBuffer8BitAccess] - [Getter][#storageBuffer8BitAccess()] - [Setter][#storageBuffer8BitAccess(int)] +/// ### uniformAndStorageBuffer8BitAccess +/// [VarHandle][#VH_uniformAndStorageBuffer8BitAccess] - [Getter][#uniformAndStorageBuffer8BitAccess()] - [Setter][#uniformAndStorageBuffer8BitAccess(int)] +/// ### storagePushConstant8 +/// [VarHandle][#VH_storagePushConstant8] - [Getter][#storagePushConstant8()] - [Setter][#storagePushConstant8(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevice8BitStorageFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 storageBuffer8BitAccess; +/// VkBool32 uniformAndStorageBuffer8BitAccess; +/// VkBool32 storagePushConstant8; +/// } VkPhysicalDevice8BitStorageFeatures; +/// ``` +public final class VkPhysicalDevice8BitStorageFeatures extends Struct { + /// The struct layout of `VkPhysicalDevice8BitStorageFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("storageBuffer8BitAccess"), + ValueLayout.JAVA_INT.withName("uniformAndStorageBuffer8BitAccess"), + ValueLayout.JAVA_INT.withName("storagePushConstant8") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `storageBuffer8BitAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storageBuffer8BitAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageBuffer8BitAccess")); + /// The [VarHandle] of `uniformAndStorageBuffer8BitAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniformAndStorageBuffer8BitAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformAndStorageBuffer8BitAccess")); + /// The [VarHandle] of `storagePushConstant8` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storagePushConstant8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storagePushConstant8")); + + /// Creates `VkPhysicalDevice8BitStorageFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevice8BitStorageFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevice8BitStorageFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevice8BitStorageFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevice8BitStorageFeatures(segment); } + + /// Creates `VkPhysicalDevice8BitStorageFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevice8BitStorageFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevice8BitStorageFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevice8BitStorageFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevice8BitStorageFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevice8BitStorageFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevice8BitStorageFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevice8BitStorageFeatures` + public static VkPhysicalDevice8BitStorageFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDevice8BitStorageFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevice8BitStorageFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevice8BitStorageFeatures` + public static VkPhysicalDevice8BitStorageFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevice8BitStorageFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevice8BitStorageFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevice8BitStorageFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevice8BitStorageFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevice8BitStorageFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice8BitStorageFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevice8BitStorageFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice8BitStorageFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDevice8BitStorageFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevice8BitStorageFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevice8BitStorageFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevice8BitStorageFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevice8BitStorageFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice8BitStorageFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevice8BitStorageFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice8BitStorageFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevice8BitStorageFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `storageBuffer8BitAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storageBuffer8BitAccess(MemorySegment segment, long index) { return (int) VH_storageBuffer8BitAccess.get(segment, 0L, index); } + /// {@return `storageBuffer8BitAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storageBuffer8BitAccess(MemorySegment segment) { return VkPhysicalDevice8BitStorageFeatures.get_storageBuffer8BitAccess(segment, 0L); } + /// {@return `storageBuffer8BitAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int storageBuffer8BitAccessAt(long index) { return VkPhysicalDevice8BitStorageFeatures.get_storageBuffer8BitAccess(this.segment(), index); } + /// {@return `storageBuffer8BitAccess`} + public @CType("VkBool32") int storageBuffer8BitAccess() { return VkPhysicalDevice8BitStorageFeatures.get_storageBuffer8BitAccess(this.segment()); } + /// Sets `storageBuffer8BitAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageBuffer8BitAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storageBuffer8BitAccess.set(segment, 0L, index, value); } + /// Sets `storageBuffer8BitAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageBuffer8BitAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevice8BitStorageFeatures.set_storageBuffer8BitAccess(segment, 0L, value); } + /// Sets `storageBuffer8BitAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice8BitStorageFeatures storageBuffer8BitAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDevice8BitStorageFeatures.set_storageBuffer8BitAccess(this.segment(), index, value); return this; } + /// Sets `storageBuffer8BitAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice8BitStorageFeatures storageBuffer8BitAccess(@CType("VkBool32") int value) { VkPhysicalDevice8BitStorageFeatures.set_storageBuffer8BitAccess(this.segment(), value); return this; } + + /// {@return `uniformAndStorageBuffer8BitAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_uniformAndStorageBuffer8BitAccess(MemorySegment segment, long index) { return (int) VH_uniformAndStorageBuffer8BitAccess.get(segment, 0L, index); } + /// {@return `uniformAndStorageBuffer8BitAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_uniformAndStorageBuffer8BitAccess(MemorySegment segment) { return VkPhysicalDevice8BitStorageFeatures.get_uniformAndStorageBuffer8BitAccess(segment, 0L); } + /// {@return `uniformAndStorageBuffer8BitAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int uniformAndStorageBuffer8BitAccessAt(long index) { return VkPhysicalDevice8BitStorageFeatures.get_uniformAndStorageBuffer8BitAccess(this.segment(), index); } + /// {@return `uniformAndStorageBuffer8BitAccess`} + public @CType("VkBool32") int uniformAndStorageBuffer8BitAccess() { return VkPhysicalDevice8BitStorageFeatures.get_uniformAndStorageBuffer8BitAccess(this.segment()); } + /// Sets `uniformAndStorageBuffer8BitAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformAndStorageBuffer8BitAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_uniformAndStorageBuffer8BitAccess.set(segment, 0L, index, value); } + /// Sets `uniformAndStorageBuffer8BitAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformAndStorageBuffer8BitAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevice8BitStorageFeatures.set_uniformAndStorageBuffer8BitAccess(segment, 0L, value); } + /// Sets `uniformAndStorageBuffer8BitAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice8BitStorageFeatures uniformAndStorageBuffer8BitAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDevice8BitStorageFeatures.set_uniformAndStorageBuffer8BitAccess(this.segment(), index, value); return this; } + /// Sets `uniformAndStorageBuffer8BitAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice8BitStorageFeatures uniformAndStorageBuffer8BitAccess(@CType("VkBool32") int value) { VkPhysicalDevice8BitStorageFeatures.set_uniformAndStorageBuffer8BitAccess(this.segment(), value); return this; } + + /// {@return `storagePushConstant8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storagePushConstant8(MemorySegment segment, long index) { return (int) VH_storagePushConstant8.get(segment, 0L, index); } + /// {@return `storagePushConstant8`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storagePushConstant8(MemorySegment segment) { return VkPhysicalDevice8BitStorageFeatures.get_storagePushConstant8(segment, 0L); } + /// {@return `storagePushConstant8` at the given index} + /// @param index the index + public @CType("VkBool32") int storagePushConstant8At(long index) { return VkPhysicalDevice8BitStorageFeatures.get_storagePushConstant8(this.segment(), index); } + /// {@return `storagePushConstant8`} + public @CType("VkBool32") int storagePushConstant8() { return VkPhysicalDevice8BitStorageFeatures.get_storagePushConstant8(this.segment()); } + /// Sets `storagePushConstant8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storagePushConstant8(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storagePushConstant8.set(segment, 0L, index, value); } + /// Sets `storagePushConstant8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storagePushConstant8(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevice8BitStorageFeatures.set_storagePushConstant8(segment, 0L, value); } + /// Sets `storagePushConstant8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevice8BitStorageFeatures storagePushConstant8At(long index, @CType("VkBool32") int value) { VkPhysicalDevice8BitStorageFeatures.set_storagePushConstant8(this.segment(), index, value); return this; } + /// Sets `storagePushConstant8` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevice8BitStorageFeatures storagePushConstant8(@CType("VkBool32") int value) { VkPhysicalDevice8BitStorageFeatures.set_storagePushConstant8(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceBufferDeviceAddressFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceBufferDeviceAddressFeatures.java new file mode 100644 index 00000000..4da1aa6e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceBufferDeviceAddressFeatures.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### bufferDeviceAddress +/// [VarHandle][#VH_bufferDeviceAddress] - [Getter][#bufferDeviceAddress()] - [Setter][#bufferDeviceAddress(int)] +/// ### bufferDeviceAddressCaptureReplay +/// [VarHandle][#VH_bufferDeviceAddressCaptureReplay] - [Getter][#bufferDeviceAddressCaptureReplay()] - [Setter][#bufferDeviceAddressCaptureReplay(int)] +/// ### bufferDeviceAddressMultiDevice +/// [VarHandle][#VH_bufferDeviceAddressMultiDevice] - [Getter][#bufferDeviceAddressMultiDevice()] - [Setter][#bufferDeviceAddressMultiDevice(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceBufferDeviceAddressFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 bufferDeviceAddress; +/// VkBool32 bufferDeviceAddressCaptureReplay; +/// VkBool32 bufferDeviceAddressMultiDevice; +/// } VkPhysicalDeviceBufferDeviceAddressFeatures; +/// ``` +public final class VkPhysicalDeviceBufferDeviceAddressFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceBufferDeviceAddressFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("bufferDeviceAddress"), + ValueLayout.JAVA_INT.withName("bufferDeviceAddressCaptureReplay"), + ValueLayout.JAVA_INT.withName("bufferDeviceAddressMultiDevice") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `bufferDeviceAddress` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferDeviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferDeviceAddress")); + /// The [VarHandle] of `bufferDeviceAddressCaptureReplay` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferDeviceAddressCaptureReplay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferDeviceAddressCaptureReplay")); + /// The [VarHandle] of `bufferDeviceAddressMultiDevice` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferDeviceAddressMultiDevice = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferDeviceAddressMultiDevice")); + + /// Creates `VkPhysicalDeviceBufferDeviceAddressFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceBufferDeviceAddressFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceBufferDeviceAddressFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBufferDeviceAddressFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBufferDeviceAddressFeatures(segment); } + + /// Creates `VkPhysicalDeviceBufferDeviceAddressFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBufferDeviceAddressFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBufferDeviceAddressFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceBufferDeviceAddressFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceBufferDeviceAddressFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceBufferDeviceAddressFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceBufferDeviceAddressFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceBufferDeviceAddressFeatures` + public static VkPhysicalDeviceBufferDeviceAddressFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceBufferDeviceAddressFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceBufferDeviceAddressFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceBufferDeviceAddressFeatures` + public static VkPhysicalDeviceBufferDeviceAddressFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceBufferDeviceAddressFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `bufferDeviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bufferDeviceAddress(MemorySegment segment, long index) { return (int) VH_bufferDeviceAddress.get(segment, 0L, index); } + /// {@return `bufferDeviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bufferDeviceAddress(MemorySegment segment) { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_bufferDeviceAddress(segment, 0L); } + /// {@return `bufferDeviceAddress` at the given index} + /// @param index the index + public @CType("VkBool32") int bufferDeviceAddressAt(long index) { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_bufferDeviceAddress(this.segment(), index); } + /// {@return `bufferDeviceAddress`} + public @CType("VkBool32") int bufferDeviceAddress() { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_bufferDeviceAddress(this.segment()); } + /// Sets `bufferDeviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferDeviceAddress(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bufferDeviceAddress.set(segment, 0L, index, value); } + /// Sets `bufferDeviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferDeviceAddress(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_bufferDeviceAddress(segment, 0L, value); } + /// Sets `bufferDeviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeatures bufferDeviceAddressAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_bufferDeviceAddress(this.segment(), index, value); return this; } + /// Sets `bufferDeviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeatures bufferDeviceAddress(@CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_bufferDeviceAddress(this.segment(), value); return this; } + + /// {@return `bufferDeviceAddressCaptureReplay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bufferDeviceAddressCaptureReplay(MemorySegment segment, long index) { return (int) VH_bufferDeviceAddressCaptureReplay.get(segment, 0L, index); } + /// {@return `bufferDeviceAddressCaptureReplay`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bufferDeviceAddressCaptureReplay(MemorySegment segment) { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_bufferDeviceAddressCaptureReplay(segment, 0L); } + /// {@return `bufferDeviceAddressCaptureReplay` at the given index} + /// @param index the index + public @CType("VkBool32") int bufferDeviceAddressCaptureReplayAt(long index) { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_bufferDeviceAddressCaptureReplay(this.segment(), index); } + /// {@return `bufferDeviceAddressCaptureReplay`} + public @CType("VkBool32") int bufferDeviceAddressCaptureReplay() { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_bufferDeviceAddressCaptureReplay(this.segment()); } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferDeviceAddressCaptureReplay(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bufferDeviceAddressCaptureReplay.set(segment, 0L, index, value); } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferDeviceAddressCaptureReplay(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_bufferDeviceAddressCaptureReplay(segment, 0L, value); } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeatures bufferDeviceAddressCaptureReplayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_bufferDeviceAddressCaptureReplay(this.segment(), index, value); return this; } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeatures bufferDeviceAddressCaptureReplay(@CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_bufferDeviceAddressCaptureReplay(this.segment(), value); return this; } + + /// {@return `bufferDeviceAddressMultiDevice` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bufferDeviceAddressMultiDevice(MemorySegment segment, long index) { return (int) VH_bufferDeviceAddressMultiDevice.get(segment, 0L, index); } + /// {@return `bufferDeviceAddressMultiDevice`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bufferDeviceAddressMultiDevice(MemorySegment segment) { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_bufferDeviceAddressMultiDevice(segment, 0L); } + /// {@return `bufferDeviceAddressMultiDevice` at the given index} + /// @param index the index + public @CType("VkBool32") int bufferDeviceAddressMultiDeviceAt(long index) { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_bufferDeviceAddressMultiDevice(this.segment(), index); } + /// {@return `bufferDeviceAddressMultiDevice`} + public @CType("VkBool32") int bufferDeviceAddressMultiDevice() { return VkPhysicalDeviceBufferDeviceAddressFeatures.get_bufferDeviceAddressMultiDevice(this.segment()); } + /// Sets `bufferDeviceAddressMultiDevice` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferDeviceAddressMultiDevice(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bufferDeviceAddressMultiDevice.set(segment, 0L, index, value); } + /// Sets `bufferDeviceAddressMultiDevice` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferDeviceAddressMultiDevice(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_bufferDeviceAddressMultiDevice(segment, 0L, value); } + /// Sets `bufferDeviceAddressMultiDevice` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeatures bufferDeviceAddressMultiDeviceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_bufferDeviceAddressMultiDevice(this.segment(), index, value); return this; } + /// Sets `bufferDeviceAddressMultiDevice` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceBufferDeviceAddressFeatures bufferDeviceAddressMultiDevice(@CType("VkBool32") int value) { VkPhysicalDeviceBufferDeviceAddressFeatures.set_bufferDeviceAddressMultiDevice(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDepthStencilResolveProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDepthStencilResolveProperties.java new file mode 100644 index 00000000..f0075409 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDepthStencilResolveProperties.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### supportedDepthResolveModes +/// [VarHandle][#VH_supportedDepthResolveModes] - [Getter][#supportedDepthResolveModes()] - [Setter][#supportedDepthResolveModes(int)] +/// ### supportedStencilResolveModes +/// [VarHandle][#VH_supportedStencilResolveModes] - [Getter][#supportedStencilResolveModes()] - [Setter][#supportedStencilResolveModes(int)] +/// ### independentResolveNone +/// [VarHandle][#VH_independentResolveNone] - [Getter][#independentResolveNone()] - [Setter][#independentResolveNone(int)] +/// ### independentResolve +/// [VarHandle][#VH_independentResolve] - [Getter][#independentResolve()] - [Setter][#independentResolve(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDepthStencilResolveProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkResolveModeFlags supportedDepthResolveModes; +/// VkResolveModeFlags supportedStencilResolveModes; +/// VkBool32 independentResolveNone; +/// VkBool32 independentResolve; +/// } VkPhysicalDeviceDepthStencilResolveProperties; +/// ``` +public final class VkPhysicalDeviceDepthStencilResolveProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceDepthStencilResolveProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("supportedDepthResolveModes"), + ValueLayout.JAVA_INT.withName("supportedStencilResolveModes"), + ValueLayout.JAVA_INT.withName("independentResolveNone"), + ValueLayout.JAVA_INT.withName("independentResolve") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `supportedDepthResolveModes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedDepthResolveModes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedDepthResolveModes")); + /// The [VarHandle] of `supportedStencilResolveModes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedStencilResolveModes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedStencilResolveModes")); + /// The [VarHandle] of `independentResolveNone` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_independentResolveNone = LAYOUT.arrayElementVarHandle(PathElement.groupElement("independentResolveNone")); + /// The [VarHandle] of `independentResolve` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_independentResolve = LAYOUT.arrayElementVarHandle(PathElement.groupElement("independentResolve")); + + /// Creates `VkPhysicalDeviceDepthStencilResolveProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDepthStencilResolveProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDepthStencilResolveProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthStencilResolveProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthStencilResolveProperties(segment); } + + /// Creates `VkPhysicalDeviceDepthStencilResolveProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthStencilResolveProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthStencilResolveProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDepthStencilResolveProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDepthStencilResolveProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDepthStencilResolveProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDepthStencilResolveProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDepthStencilResolveProperties` + public static VkPhysicalDeviceDepthStencilResolveProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDepthStencilResolveProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDepthStencilResolveProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDepthStencilResolveProperties` + public static VkPhysicalDeviceDepthStencilResolveProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDepthStencilResolveProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDepthStencilResolveProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDepthStencilResolveProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDepthStencilResolveProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDepthStencilResolveProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDepthStencilResolveProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDepthStencilResolveProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthStencilResolveProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthStencilResolveProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDepthStencilResolveProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `supportedDepthResolveModes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkResolveModeFlags") int get_supportedDepthResolveModes(MemorySegment segment, long index) { return (int) VH_supportedDepthResolveModes.get(segment, 0L, index); } + /// {@return `supportedDepthResolveModes`} + /// @param segment the segment of the struct + public static @CType("VkResolveModeFlags") int get_supportedDepthResolveModes(MemorySegment segment) { return VkPhysicalDeviceDepthStencilResolveProperties.get_supportedDepthResolveModes(segment, 0L); } + /// {@return `supportedDepthResolveModes` at the given index} + /// @param index the index + public @CType("VkResolveModeFlags") int supportedDepthResolveModesAt(long index) { return VkPhysicalDeviceDepthStencilResolveProperties.get_supportedDepthResolveModes(this.segment(), index); } + /// {@return `supportedDepthResolveModes`} + public @CType("VkResolveModeFlags") int supportedDepthResolveModes() { return VkPhysicalDeviceDepthStencilResolveProperties.get_supportedDepthResolveModes(this.segment()); } + /// Sets `supportedDepthResolveModes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedDepthResolveModes(MemorySegment segment, long index, @CType("VkResolveModeFlags") int value) { VH_supportedDepthResolveModes.set(segment, 0L, index, value); } + /// Sets `supportedDepthResolveModes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedDepthResolveModes(MemorySegment segment, @CType("VkResolveModeFlags") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_supportedDepthResolveModes(segment, 0L, value); } + /// Sets `supportedDepthResolveModes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties supportedDepthResolveModesAt(long index, @CType("VkResolveModeFlags") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_supportedDepthResolveModes(this.segment(), index, value); return this; } + /// Sets `supportedDepthResolveModes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties supportedDepthResolveModes(@CType("VkResolveModeFlags") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_supportedDepthResolveModes(this.segment(), value); return this; } + + /// {@return `supportedStencilResolveModes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkResolveModeFlags") int get_supportedStencilResolveModes(MemorySegment segment, long index) { return (int) VH_supportedStencilResolveModes.get(segment, 0L, index); } + /// {@return `supportedStencilResolveModes`} + /// @param segment the segment of the struct + public static @CType("VkResolveModeFlags") int get_supportedStencilResolveModes(MemorySegment segment) { return VkPhysicalDeviceDepthStencilResolveProperties.get_supportedStencilResolveModes(segment, 0L); } + /// {@return `supportedStencilResolveModes` at the given index} + /// @param index the index + public @CType("VkResolveModeFlags") int supportedStencilResolveModesAt(long index) { return VkPhysicalDeviceDepthStencilResolveProperties.get_supportedStencilResolveModes(this.segment(), index); } + /// {@return `supportedStencilResolveModes`} + public @CType("VkResolveModeFlags") int supportedStencilResolveModes() { return VkPhysicalDeviceDepthStencilResolveProperties.get_supportedStencilResolveModes(this.segment()); } + /// Sets `supportedStencilResolveModes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedStencilResolveModes(MemorySegment segment, long index, @CType("VkResolveModeFlags") int value) { VH_supportedStencilResolveModes.set(segment, 0L, index, value); } + /// Sets `supportedStencilResolveModes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedStencilResolveModes(MemorySegment segment, @CType("VkResolveModeFlags") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_supportedStencilResolveModes(segment, 0L, value); } + /// Sets `supportedStencilResolveModes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties supportedStencilResolveModesAt(long index, @CType("VkResolveModeFlags") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_supportedStencilResolveModes(this.segment(), index, value); return this; } + /// Sets `supportedStencilResolveModes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties supportedStencilResolveModes(@CType("VkResolveModeFlags") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_supportedStencilResolveModes(this.segment(), value); return this; } + + /// {@return `independentResolveNone` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_independentResolveNone(MemorySegment segment, long index) { return (int) VH_independentResolveNone.get(segment, 0L, index); } + /// {@return `independentResolveNone`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_independentResolveNone(MemorySegment segment) { return VkPhysicalDeviceDepthStencilResolveProperties.get_independentResolveNone(segment, 0L); } + /// {@return `independentResolveNone` at the given index} + /// @param index the index + public @CType("VkBool32") int independentResolveNoneAt(long index) { return VkPhysicalDeviceDepthStencilResolveProperties.get_independentResolveNone(this.segment(), index); } + /// {@return `independentResolveNone`} + public @CType("VkBool32") int independentResolveNone() { return VkPhysicalDeviceDepthStencilResolveProperties.get_independentResolveNone(this.segment()); } + /// Sets `independentResolveNone` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_independentResolveNone(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_independentResolveNone.set(segment, 0L, index, value); } + /// Sets `independentResolveNone` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_independentResolveNone(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_independentResolveNone(segment, 0L, value); } + /// Sets `independentResolveNone` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties independentResolveNoneAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_independentResolveNone(this.segment(), index, value); return this; } + /// Sets `independentResolveNone` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties independentResolveNone(@CType("VkBool32") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_independentResolveNone(this.segment(), value); return this; } + + /// {@return `independentResolve` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_independentResolve(MemorySegment segment, long index) { return (int) VH_independentResolve.get(segment, 0L, index); } + /// {@return `independentResolve`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_independentResolve(MemorySegment segment) { return VkPhysicalDeviceDepthStencilResolveProperties.get_independentResolve(segment, 0L); } + /// {@return `independentResolve` at the given index} + /// @param index the index + public @CType("VkBool32") int independentResolveAt(long index) { return VkPhysicalDeviceDepthStencilResolveProperties.get_independentResolve(this.segment(), index); } + /// {@return `independentResolve`} + public @CType("VkBool32") int independentResolve() { return VkPhysicalDeviceDepthStencilResolveProperties.get_independentResolve(this.segment()); } + /// Sets `independentResolve` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_independentResolve(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_independentResolve.set(segment, 0L, index, value); } + /// Sets `independentResolve` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_independentResolve(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_independentResolve(segment, 0L, value); } + /// Sets `independentResolve` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties independentResolveAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_independentResolve(this.segment(), index, value); return this; } + /// Sets `independentResolve` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDepthStencilResolveProperties independentResolve(@CType("VkBool32") int value) { VkPhysicalDeviceDepthStencilResolveProperties.set_independentResolve(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDescriptorIndexingFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDescriptorIndexingFeatures.java new file mode 100644 index 00000000..6be29555 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDescriptorIndexingFeatures.java @@ -0,0 +1,888 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderInputAttachmentArrayDynamicIndexing +/// [VarHandle][#VH_shaderInputAttachmentArrayDynamicIndexing] - [Getter][#shaderInputAttachmentArrayDynamicIndexing()] - [Setter][#shaderInputAttachmentArrayDynamicIndexing(int)] +/// ### shaderUniformTexelBufferArrayDynamicIndexing +/// [VarHandle][#VH_shaderUniformTexelBufferArrayDynamicIndexing] - [Getter][#shaderUniformTexelBufferArrayDynamicIndexing()] - [Setter][#shaderUniformTexelBufferArrayDynamicIndexing(int)] +/// ### shaderStorageTexelBufferArrayDynamicIndexing +/// [VarHandle][#VH_shaderStorageTexelBufferArrayDynamicIndexing] - [Getter][#shaderStorageTexelBufferArrayDynamicIndexing()] - [Setter][#shaderStorageTexelBufferArrayDynamicIndexing(int)] +/// ### shaderUniformBufferArrayNonUniformIndexing +/// [VarHandle][#VH_shaderUniformBufferArrayNonUniformIndexing] - [Getter][#shaderUniformBufferArrayNonUniformIndexing()] - [Setter][#shaderUniformBufferArrayNonUniformIndexing(int)] +/// ### shaderSampledImageArrayNonUniformIndexing +/// [VarHandle][#VH_shaderSampledImageArrayNonUniformIndexing] - [Getter][#shaderSampledImageArrayNonUniformIndexing()] - [Setter][#shaderSampledImageArrayNonUniformIndexing(int)] +/// ### shaderStorageBufferArrayNonUniformIndexing +/// [VarHandle][#VH_shaderStorageBufferArrayNonUniformIndexing] - [Getter][#shaderStorageBufferArrayNonUniformIndexing()] - [Setter][#shaderStorageBufferArrayNonUniformIndexing(int)] +/// ### shaderStorageImageArrayNonUniformIndexing +/// [VarHandle][#VH_shaderStorageImageArrayNonUniformIndexing] - [Getter][#shaderStorageImageArrayNonUniformIndexing()] - [Setter][#shaderStorageImageArrayNonUniformIndexing(int)] +/// ### shaderInputAttachmentArrayNonUniformIndexing +/// [VarHandle][#VH_shaderInputAttachmentArrayNonUniformIndexing] - [Getter][#shaderInputAttachmentArrayNonUniformIndexing()] - [Setter][#shaderInputAttachmentArrayNonUniformIndexing(int)] +/// ### shaderUniformTexelBufferArrayNonUniformIndexing +/// [VarHandle][#VH_shaderUniformTexelBufferArrayNonUniformIndexing] - [Getter][#shaderUniformTexelBufferArrayNonUniformIndexing()] - [Setter][#shaderUniformTexelBufferArrayNonUniformIndexing(int)] +/// ### shaderStorageTexelBufferArrayNonUniformIndexing +/// [VarHandle][#VH_shaderStorageTexelBufferArrayNonUniformIndexing] - [Getter][#shaderStorageTexelBufferArrayNonUniformIndexing()] - [Setter][#shaderStorageTexelBufferArrayNonUniformIndexing(int)] +/// ### descriptorBindingUniformBufferUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingUniformBufferUpdateAfterBind] - [Getter][#descriptorBindingUniformBufferUpdateAfterBind()] - [Setter][#descriptorBindingUniformBufferUpdateAfterBind(int)] +/// ### descriptorBindingSampledImageUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingSampledImageUpdateAfterBind] - [Getter][#descriptorBindingSampledImageUpdateAfterBind()] - [Setter][#descriptorBindingSampledImageUpdateAfterBind(int)] +/// ### descriptorBindingStorageImageUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingStorageImageUpdateAfterBind] - [Getter][#descriptorBindingStorageImageUpdateAfterBind()] - [Setter][#descriptorBindingStorageImageUpdateAfterBind(int)] +/// ### descriptorBindingStorageBufferUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingStorageBufferUpdateAfterBind] - [Getter][#descriptorBindingStorageBufferUpdateAfterBind()] - [Setter][#descriptorBindingStorageBufferUpdateAfterBind(int)] +/// ### descriptorBindingUniformTexelBufferUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingUniformTexelBufferUpdateAfterBind] - [Getter][#descriptorBindingUniformTexelBufferUpdateAfterBind()] - [Setter][#descriptorBindingUniformTexelBufferUpdateAfterBind(int)] +/// ### descriptorBindingStorageTexelBufferUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingStorageTexelBufferUpdateAfterBind] - [Getter][#descriptorBindingStorageTexelBufferUpdateAfterBind()] - [Setter][#descriptorBindingStorageTexelBufferUpdateAfterBind(int)] +/// ### descriptorBindingUpdateUnusedWhilePending +/// [VarHandle][#VH_descriptorBindingUpdateUnusedWhilePending] - [Getter][#descriptorBindingUpdateUnusedWhilePending()] - [Setter][#descriptorBindingUpdateUnusedWhilePending(int)] +/// ### descriptorBindingPartiallyBound +/// [VarHandle][#VH_descriptorBindingPartiallyBound] - [Getter][#descriptorBindingPartiallyBound()] - [Setter][#descriptorBindingPartiallyBound(int)] +/// ### descriptorBindingVariableDescriptorCount +/// [VarHandle][#VH_descriptorBindingVariableDescriptorCount] - [Getter][#descriptorBindingVariableDescriptorCount()] - [Setter][#descriptorBindingVariableDescriptorCount(int)] +/// ### runtimeDescriptorArray +/// [VarHandle][#VH_runtimeDescriptorArray] - [Getter][#runtimeDescriptorArray()] - [Setter][#runtimeDescriptorArray(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDescriptorIndexingFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderInputAttachmentArrayDynamicIndexing; +/// VkBool32 shaderUniformTexelBufferArrayDynamicIndexing; +/// VkBool32 shaderStorageTexelBufferArrayDynamicIndexing; +/// VkBool32 shaderUniformBufferArrayNonUniformIndexing; +/// VkBool32 shaderSampledImageArrayNonUniformIndexing; +/// VkBool32 shaderStorageBufferArrayNonUniformIndexing; +/// VkBool32 shaderStorageImageArrayNonUniformIndexing; +/// VkBool32 shaderInputAttachmentArrayNonUniformIndexing; +/// VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing; +/// VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing; +/// VkBool32 descriptorBindingUniformBufferUpdateAfterBind; +/// VkBool32 descriptorBindingSampledImageUpdateAfterBind; +/// VkBool32 descriptorBindingStorageImageUpdateAfterBind; +/// VkBool32 descriptorBindingStorageBufferUpdateAfterBind; +/// VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind; +/// VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind; +/// VkBool32 descriptorBindingUpdateUnusedWhilePending; +/// VkBool32 descriptorBindingPartiallyBound; +/// VkBool32 descriptorBindingVariableDescriptorCount; +/// VkBool32 runtimeDescriptorArray; +/// } VkPhysicalDeviceDescriptorIndexingFeatures; +/// ``` +public final class VkPhysicalDeviceDescriptorIndexingFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceDescriptorIndexingFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderInputAttachmentArrayDynamicIndexing"), + ValueLayout.JAVA_INT.withName("shaderUniformTexelBufferArrayDynamicIndexing"), + ValueLayout.JAVA_INT.withName("shaderStorageTexelBufferArrayDynamicIndexing"), + ValueLayout.JAVA_INT.withName("shaderUniformBufferArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderSampledImageArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderStorageBufferArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderStorageImageArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderInputAttachmentArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderUniformTexelBufferArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderStorageTexelBufferArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("descriptorBindingUniformBufferUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingSampledImageUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingStorageImageUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingStorageBufferUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingUniformTexelBufferUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingStorageTexelBufferUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingUpdateUnusedWhilePending"), + ValueLayout.JAVA_INT.withName("descriptorBindingPartiallyBound"), + ValueLayout.JAVA_INT.withName("descriptorBindingVariableDescriptorCount"), + ValueLayout.JAVA_INT.withName("runtimeDescriptorArray") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderInputAttachmentArrayDynamicIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderInputAttachmentArrayDynamicIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderInputAttachmentArrayDynamicIndexing")); + /// The [VarHandle] of `shaderUniformTexelBufferArrayDynamicIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderUniformTexelBufferArrayDynamicIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderUniformTexelBufferArrayDynamicIndexing")); + /// The [VarHandle] of `shaderStorageTexelBufferArrayDynamicIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageTexelBufferArrayDynamicIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageTexelBufferArrayDynamicIndexing")); + /// The [VarHandle] of `shaderUniformBufferArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderUniformBufferArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderUniformBufferArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderSampledImageArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSampledImageArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSampledImageArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderStorageBufferArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageBufferArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageBufferArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderStorageImageArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageImageArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageImageArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderInputAttachmentArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderInputAttachmentArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderInputAttachmentArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderUniformTexelBufferArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderUniformTexelBufferArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderUniformTexelBufferArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderStorageTexelBufferArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageTexelBufferArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageTexelBufferArrayNonUniformIndexing")); + /// The [VarHandle] of `descriptorBindingUniformBufferUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingUniformBufferUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingUniformBufferUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingSampledImageUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingSampledImageUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingSampledImageUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingStorageImageUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingStorageImageUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingStorageImageUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingStorageBufferUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingStorageBufferUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingStorageBufferUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingUniformTexelBufferUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingUniformTexelBufferUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingUniformTexelBufferUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingStorageTexelBufferUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingStorageTexelBufferUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingStorageTexelBufferUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingUpdateUnusedWhilePending` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingUpdateUnusedWhilePending = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingUpdateUnusedWhilePending")); + /// The [VarHandle] of `descriptorBindingPartiallyBound` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingPartiallyBound = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingPartiallyBound")); + /// The [VarHandle] of `descriptorBindingVariableDescriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingVariableDescriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingVariableDescriptorCount")); + /// The [VarHandle] of `runtimeDescriptorArray` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_runtimeDescriptorArray = LAYOUT.arrayElementVarHandle(PathElement.groupElement("runtimeDescriptorArray")); + + /// Creates `VkPhysicalDeviceDescriptorIndexingFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDescriptorIndexingFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDescriptorIndexingFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorIndexingFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorIndexingFeatures(segment); } + + /// Creates `VkPhysicalDeviceDescriptorIndexingFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorIndexingFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorIndexingFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDescriptorIndexingFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorIndexingFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorIndexingFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDescriptorIndexingFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDescriptorIndexingFeatures` + public static VkPhysicalDeviceDescriptorIndexingFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDescriptorIndexingFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDescriptorIndexingFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDescriptorIndexingFeatures` + public static VkPhysicalDeviceDescriptorIndexingFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDescriptorIndexingFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderInputAttachmentArrayDynamicIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderInputAttachmentArrayDynamicIndexing(MemorySegment segment, long index) { return (int) VH_shaderInputAttachmentArrayDynamicIndexing.get(segment, 0L, index); } + /// {@return `shaderInputAttachmentArrayDynamicIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderInputAttachmentArrayDynamicIndexing(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderInputAttachmentArrayDynamicIndexing(segment, 0L); } + /// {@return `shaderInputAttachmentArrayDynamicIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderInputAttachmentArrayDynamicIndexingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderInputAttachmentArrayDynamicIndexing(this.segment(), index); } + /// {@return `shaderInputAttachmentArrayDynamicIndexing`} + public @CType("VkBool32") int shaderInputAttachmentArrayDynamicIndexing() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderInputAttachmentArrayDynamicIndexing(this.segment()); } + /// Sets `shaderInputAttachmentArrayDynamicIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderInputAttachmentArrayDynamicIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderInputAttachmentArrayDynamicIndexing.set(segment, 0L, index, value); } + /// Sets `shaderInputAttachmentArrayDynamicIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderInputAttachmentArrayDynamicIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderInputAttachmentArrayDynamicIndexing(segment, 0L, value); } + /// Sets `shaderInputAttachmentArrayDynamicIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderInputAttachmentArrayDynamicIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderInputAttachmentArrayDynamicIndexing(this.segment(), index, value); return this; } + /// Sets `shaderInputAttachmentArrayDynamicIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderInputAttachmentArrayDynamicIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderInputAttachmentArrayDynamicIndexing(this.segment(), value); return this; } + + /// {@return `shaderUniformTexelBufferArrayDynamicIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderUniformTexelBufferArrayDynamicIndexing(MemorySegment segment, long index) { return (int) VH_shaderUniformTexelBufferArrayDynamicIndexing.get(segment, 0L, index); } + /// {@return `shaderUniformTexelBufferArrayDynamicIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderUniformTexelBufferArrayDynamicIndexing(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderUniformTexelBufferArrayDynamicIndexing(segment, 0L); } + /// {@return `shaderUniformTexelBufferArrayDynamicIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderUniformTexelBufferArrayDynamicIndexingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderUniformTexelBufferArrayDynamicIndexing(this.segment(), index); } + /// {@return `shaderUniformTexelBufferArrayDynamicIndexing`} + public @CType("VkBool32") int shaderUniformTexelBufferArrayDynamicIndexing() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderUniformTexelBufferArrayDynamicIndexing(this.segment()); } + /// Sets `shaderUniformTexelBufferArrayDynamicIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderUniformTexelBufferArrayDynamicIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderUniformTexelBufferArrayDynamicIndexing.set(segment, 0L, index, value); } + /// Sets `shaderUniformTexelBufferArrayDynamicIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderUniformTexelBufferArrayDynamicIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderUniformTexelBufferArrayDynamicIndexing(segment, 0L, value); } + /// Sets `shaderUniformTexelBufferArrayDynamicIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderUniformTexelBufferArrayDynamicIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderUniformTexelBufferArrayDynamicIndexing(this.segment(), index, value); return this; } + /// Sets `shaderUniformTexelBufferArrayDynamicIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderUniformTexelBufferArrayDynamicIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderUniformTexelBufferArrayDynamicIndexing(this.segment(), value); return this; } + + /// {@return `shaderStorageTexelBufferArrayDynamicIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageTexelBufferArrayDynamicIndexing(MemorySegment segment, long index) { return (int) VH_shaderStorageTexelBufferArrayDynamicIndexing.get(segment, 0L, index); } + /// {@return `shaderStorageTexelBufferArrayDynamicIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageTexelBufferArrayDynamicIndexing(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageTexelBufferArrayDynamicIndexing(segment, 0L); } + /// {@return `shaderStorageTexelBufferArrayDynamicIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageTexelBufferArrayDynamicIndexingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageTexelBufferArrayDynamicIndexing(this.segment(), index); } + /// {@return `shaderStorageTexelBufferArrayDynamicIndexing`} + public @CType("VkBool32") int shaderStorageTexelBufferArrayDynamicIndexing() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageTexelBufferArrayDynamicIndexing(this.segment()); } + /// Sets `shaderStorageTexelBufferArrayDynamicIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageTexelBufferArrayDynamicIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageTexelBufferArrayDynamicIndexing.set(segment, 0L, index, value); } + /// Sets `shaderStorageTexelBufferArrayDynamicIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageTexelBufferArrayDynamicIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageTexelBufferArrayDynamicIndexing(segment, 0L, value); } + /// Sets `shaderStorageTexelBufferArrayDynamicIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderStorageTexelBufferArrayDynamicIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageTexelBufferArrayDynamicIndexing(this.segment(), index, value); return this; } + /// Sets `shaderStorageTexelBufferArrayDynamicIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderStorageTexelBufferArrayDynamicIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageTexelBufferArrayDynamicIndexing(this.segment(), value); return this; } + + /// {@return `shaderUniformBufferArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderUniformBufferArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderUniformBufferArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderUniformBufferArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderUniformBufferArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderUniformBufferArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderUniformBufferArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderUniformBufferArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderUniformBufferArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderUniformBufferArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderUniformBufferArrayNonUniformIndexing() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderUniformBufferArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderUniformBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderUniformBufferArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderUniformBufferArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderUniformBufferArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderUniformBufferArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderUniformBufferArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderUniformBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderUniformBufferArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderUniformBufferArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderUniformBufferArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderUniformBufferArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderUniformBufferArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderSampledImageArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSampledImageArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderSampledImageArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderSampledImageArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSampledImageArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderSampledImageArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderSampledImageArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSampledImageArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderSampledImageArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderSampledImageArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderSampledImageArrayNonUniformIndexing() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderSampledImageArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderSampledImageArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSampledImageArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSampledImageArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderSampledImageArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSampledImageArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderSampledImageArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderSampledImageArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderSampledImageArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderSampledImageArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderSampledImageArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderSampledImageArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderSampledImageArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderStorageBufferArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageBufferArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderStorageBufferArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderStorageBufferArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageBufferArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageBufferArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderStorageBufferArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageBufferArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageBufferArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderStorageBufferArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderStorageBufferArrayNonUniformIndexing() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageBufferArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderStorageBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageBufferArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageBufferArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderStorageBufferArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageBufferArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageBufferArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderStorageBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderStorageBufferArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageBufferArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderStorageBufferArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderStorageBufferArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageBufferArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderStorageImageArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageImageArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderStorageImageArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderStorageImageArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageImageArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageImageArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderStorageImageArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageImageArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageImageArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderStorageImageArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderStorageImageArrayNonUniformIndexing() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageImageArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderStorageImageArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageImageArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageImageArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderStorageImageArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageImageArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageImageArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderStorageImageArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderStorageImageArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageImageArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderStorageImageArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderStorageImageArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageImageArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderInputAttachmentArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderInputAttachmentArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderInputAttachmentArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderInputAttachmentArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderInputAttachmentArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderInputAttachmentArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderInputAttachmentArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderInputAttachmentArrayNonUniformIndexing() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderInputAttachmentArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderInputAttachmentArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderInputAttachmentArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderInputAttachmentArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderInputAttachmentArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderInputAttachmentArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderInputAttachmentArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderInputAttachmentArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderInputAttachmentArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderInputAttachmentArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderUniformTexelBufferArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderUniformTexelBufferArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderUniformTexelBufferArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderUniformTexelBufferArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderUniformTexelBufferArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderUniformTexelBufferArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderUniformTexelBufferArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderUniformTexelBufferArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderUniformTexelBufferArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderUniformTexelBufferArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderUniformTexelBufferArrayNonUniformIndexing() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderUniformTexelBufferArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderUniformTexelBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderUniformTexelBufferArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderUniformTexelBufferArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderUniformTexelBufferArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderUniformTexelBufferArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderUniformTexelBufferArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderUniformTexelBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderUniformTexelBufferArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderUniformTexelBufferArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderUniformTexelBufferArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderUniformTexelBufferArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderUniformTexelBufferArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderStorageTexelBufferArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageTexelBufferArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderStorageTexelBufferArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderStorageTexelBufferArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageTexelBufferArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageTexelBufferArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderStorageTexelBufferArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageTexelBufferArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageTexelBufferArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderStorageTexelBufferArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderStorageTexelBufferArrayNonUniformIndexing() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_shaderStorageTexelBufferArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderStorageTexelBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageTexelBufferArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageTexelBufferArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderStorageTexelBufferArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageTexelBufferArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageTexelBufferArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderStorageTexelBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderStorageTexelBufferArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageTexelBufferArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderStorageTexelBufferArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures shaderStorageTexelBufferArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_shaderStorageTexelBufferArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `descriptorBindingUniformBufferUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingUniformBufferUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingUniformBufferUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingUniformBufferUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingUniformBufferUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingUniformBufferUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingUniformBufferUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingUniformBufferUpdateAfterBindAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingUniformBufferUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingUniformBufferUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingUniformBufferUpdateAfterBind() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingUniformBufferUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingUniformBufferUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingUniformBufferUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingUniformBufferUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingUniformBufferUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingUniformBufferUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingUniformBufferUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingUniformBufferUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingUniformBufferUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingUniformBufferUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingUniformBufferUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingUniformBufferUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingUniformBufferUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingSampledImageUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingSampledImageUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingSampledImageUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingSampledImageUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingSampledImageUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingSampledImageUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingSampledImageUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingSampledImageUpdateAfterBindAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingSampledImageUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingSampledImageUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingSampledImageUpdateAfterBind() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingSampledImageUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingSampledImageUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingSampledImageUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingSampledImageUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingSampledImageUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingSampledImageUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingSampledImageUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingSampledImageUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingSampledImageUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingSampledImageUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingSampledImageUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingSampledImageUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingSampledImageUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingStorageImageUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingStorageImageUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingStorageImageUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingStorageImageUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingStorageImageUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingStorageImageUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingStorageImageUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingStorageImageUpdateAfterBindAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingStorageImageUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingStorageImageUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingStorageImageUpdateAfterBind() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingStorageImageUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingStorageImageUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingStorageImageUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingStorageImageUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingStorageImageUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingStorageImageUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingStorageImageUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingStorageImageUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingStorageImageUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingStorageImageUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingStorageImageUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingStorageImageUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingStorageImageUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingStorageBufferUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingStorageBufferUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingStorageBufferUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingStorageBufferUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingStorageBufferUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingStorageBufferUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingStorageBufferUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingStorageBufferUpdateAfterBindAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingStorageBufferUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingStorageBufferUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingStorageBufferUpdateAfterBind() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingStorageBufferUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingStorageBufferUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingStorageBufferUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingStorageBufferUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingStorageBufferUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingStorageBufferUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingStorageBufferUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingStorageBufferUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingStorageBufferUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingStorageBufferUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingStorageBufferUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingStorageBufferUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingStorageBufferUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingUniformTexelBufferUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingUniformTexelBufferUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingUniformTexelBufferUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingUniformTexelBufferUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingUniformTexelBufferUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingUniformTexelBufferUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingUniformTexelBufferUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingUniformTexelBufferUpdateAfterBindAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingUniformTexelBufferUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingUniformTexelBufferUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingUniformTexelBufferUpdateAfterBind() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingUniformTexelBufferUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingUniformTexelBufferUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingUniformTexelBufferUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingUniformTexelBufferUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingUniformTexelBufferUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingUniformTexelBufferUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingUniformTexelBufferUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingUniformTexelBufferUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingUniformTexelBufferUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingUniformTexelBufferUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingUniformTexelBufferUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingUniformTexelBufferUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingUniformTexelBufferUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingStorageTexelBufferUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingStorageTexelBufferUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingStorageTexelBufferUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingStorageTexelBufferUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingStorageTexelBufferUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingStorageTexelBufferUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingStorageTexelBufferUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingStorageTexelBufferUpdateAfterBindAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingStorageTexelBufferUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingStorageTexelBufferUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingStorageTexelBufferUpdateAfterBind() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingStorageTexelBufferUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingStorageTexelBufferUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingStorageTexelBufferUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingStorageTexelBufferUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingStorageTexelBufferUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingStorageTexelBufferUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingStorageTexelBufferUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingStorageTexelBufferUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingStorageTexelBufferUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingStorageTexelBufferUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingStorageTexelBufferUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingStorageTexelBufferUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingStorageTexelBufferUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingUpdateUnusedWhilePending` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingUpdateUnusedWhilePending(MemorySegment segment, long index) { return (int) VH_descriptorBindingUpdateUnusedWhilePending.get(segment, 0L, index); } + /// {@return `descriptorBindingUpdateUnusedWhilePending`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingUpdateUnusedWhilePending(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingUpdateUnusedWhilePending(segment, 0L); } + /// {@return `descriptorBindingUpdateUnusedWhilePending` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingUpdateUnusedWhilePendingAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingUpdateUnusedWhilePending(this.segment(), index); } + /// {@return `descriptorBindingUpdateUnusedWhilePending`} + public @CType("VkBool32") int descriptorBindingUpdateUnusedWhilePending() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingUpdateUnusedWhilePending(this.segment()); } + /// Sets `descriptorBindingUpdateUnusedWhilePending` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingUpdateUnusedWhilePending(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingUpdateUnusedWhilePending.set(segment, 0L, index, value); } + /// Sets `descriptorBindingUpdateUnusedWhilePending` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingUpdateUnusedWhilePending(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingUpdateUnusedWhilePending(segment, 0L, value); } + /// Sets `descriptorBindingUpdateUnusedWhilePending` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingUpdateUnusedWhilePendingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingUpdateUnusedWhilePending(this.segment(), index, value); return this; } + /// Sets `descriptorBindingUpdateUnusedWhilePending` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingUpdateUnusedWhilePending(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingUpdateUnusedWhilePending(this.segment(), value); return this; } + + /// {@return `descriptorBindingPartiallyBound` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingPartiallyBound(MemorySegment segment, long index) { return (int) VH_descriptorBindingPartiallyBound.get(segment, 0L, index); } + /// {@return `descriptorBindingPartiallyBound`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingPartiallyBound(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingPartiallyBound(segment, 0L); } + /// {@return `descriptorBindingPartiallyBound` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingPartiallyBoundAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingPartiallyBound(this.segment(), index); } + /// {@return `descriptorBindingPartiallyBound`} + public @CType("VkBool32") int descriptorBindingPartiallyBound() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingPartiallyBound(this.segment()); } + /// Sets `descriptorBindingPartiallyBound` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingPartiallyBound(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingPartiallyBound.set(segment, 0L, index, value); } + /// Sets `descriptorBindingPartiallyBound` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingPartiallyBound(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingPartiallyBound(segment, 0L, value); } + /// Sets `descriptorBindingPartiallyBound` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingPartiallyBoundAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingPartiallyBound(this.segment(), index, value); return this; } + /// Sets `descriptorBindingPartiallyBound` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingPartiallyBound(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingPartiallyBound(this.segment(), value); return this; } + + /// {@return `descriptorBindingVariableDescriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingVariableDescriptorCount(MemorySegment segment, long index) { return (int) VH_descriptorBindingVariableDescriptorCount.get(segment, 0L, index); } + /// {@return `descriptorBindingVariableDescriptorCount`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingVariableDescriptorCount(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingVariableDescriptorCount(segment, 0L); } + /// {@return `descriptorBindingVariableDescriptorCount` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingVariableDescriptorCountAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingVariableDescriptorCount(this.segment(), index); } + /// {@return `descriptorBindingVariableDescriptorCount`} + public @CType("VkBool32") int descriptorBindingVariableDescriptorCount() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_descriptorBindingVariableDescriptorCount(this.segment()); } + /// Sets `descriptorBindingVariableDescriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingVariableDescriptorCount(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingVariableDescriptorCount.set(segment, 0L, index, value); } + /// Sets `descriptorBindingVariableDescriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingVariableDescriptorCount(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingVariableDescriptorCount(segment, 0L, value); } + /// Sets `descriptorBindingVariableDescriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingVariableDescriptorCountAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingVariableDescriptorCount(this.segment(), index, value); return this; } + /// Sets `descriptorBindingVariableDescriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures descriptorBindingVariableDescriptorCount(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_descriptorBindingVariableDescriptorCount(this.segment(), value); return this; } + + /// {@return `runtimeDescriptorArray` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_runtimeDescriptorArray(MemorySegment segment, long index) { return (int) VH_runtimeDescriptorArray.get(segment, 0L, index); } + /// {@return `runtimeDescriptorArray`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_runtimeDescriptorArray(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_runtimeDescriptorArray(segment, 0L); } + /// {@return `runtimeDescriptorArray` at the given index} + /// @param index the index + public @CType("VkBool32") int runtimeDescriptorArrayAt(long index) { return VkPhysicalDeviceDescriptorIndexingFeatures.get_runtimeDescriptorArray(this.segment(), index); } + /// {@return `runtimeDescriptorArray`} + public @CType("VkBool32") int runtimeDescriptorArray() { return VkPhysicalDeviceDescriptorIndexingFeatures.get_runtimeDescriptorArray(this.segment()); } + /// Sets `runtimeDescriptorArray` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_runtimeDescriptorArray(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_runtimeDescriptorArray.set(segment, 0L, index, value); } + /// Sets `runtimeDescriptorArray` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_runtimeDescriptorArray(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_runtimeDescriptorArray(segment, 0L, value); } + /// Sets `runtimeDescriptorArray` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures runtimeDescriptorArrayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_runtimeDescriptorArray(this.segment(), index, value); return this; } + /// Sets `runtimeDescriptorArray` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingFeatures runtimeDescriptorArray(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingFeatures.set_runtimeDescriptorArray(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDescriptorIndexingProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDescriptorIndexingProperties.java new file mode 100644 index 00000000..51704839 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDescriptorIndexingProperties.java @@ -0,0 +1,999 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxUpdateAfterBindDescriptorsInAllPools +/// [VarHandle][#VH_maxUpdateAfterBindDescriptorsInAllPools] - [Getter][#maxUpdateAfterBindDescriptorsInAllPools()] - [Setter][#maxUpdateAfterBindDescriptorsInAllPools(int)] +/// ### shaderUniformBufferArrayNonUniformIndexingNative +/// [VarHandle][#VH_shaderUniformBufferArrayNonUniformIndexingNative] - [Getter][#shaderUniformBufferArrayNonUniformIndexingNative()] - [Setter][#shaderUniformBufferArrayNonUniformIndexingNative(int)] +/// ### shaderSampledImageArrayNonUniformIndexingNative +/// [VarHandle][#VH_shaderSampledImageArrayNonUniformIndexingNative] - [Getter][#shaderSampledImageArrayNonUniformIndexingNative()] - [Setter][#shaderSampledImageArrayNonUniformIndexingNative(int)] +/// ### shaderStorageBufferArrayNonUniformIndexingNative +/// [VarHandle][#VH_shaderStorageBufferArrayNonUniformIndexingNative] - [Getter][#shaderStorageBufferArrayNonUniformIndexingNative()] - [Setter][#shaderStorageBufferArrayNonUniformIndexingNative(int)] +/// ### shaderStorageImageArrayNonUniformIndexingNative +/// [VarHandle][#VH_shaderStorageImageArrayNonUniformIndexingNative] - [Getter][#shaderStorageImageArrayNonUniformIndexingNative()] - [Setter][#shaderStorageImageArrayNonUniformIndexingNative(int)] +/// ### shaderInputAttachmentArrayNonUniformIndexingNative +/// [VarHandle][#VH_shaderInputAttachmentArrayNonUniformIndexingNative] - [Getter][#shaderInputAttachmentArrayNonUniformIndexingNative()] - [Setter][#shaderInputAttachmentArrayNonUniformIndexingNative(int)] +/// ### robustBufferAccessUpdateAfterBind +/// [VarHandle][#VH_robustBufferAccessUpdateAfterBind] - [Getter][#robustBufferAccessUpdateAfterBind()] - [Setter][#robustBufferAccessUpdateAfterBind(int)] +/// ### quadDivergentImplicitLod +/// [VarHandle][#VH_quadDivergentImplicitLod] - [Getter][#quadDivergentImplicitLod()] - [Setter][#quadDivergentImplicitLod(int)] +/// ### maxPerStageDescriptorUpdateAfterBindSamplers +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindSamplers] - [Getter][#maxPerStageDescriptorUpdateAfterBindSamplers()] - [Setter][#maxPerStageDescriptorUpdateAfterBindSamplers(int)] +/// ### maxPerStageDescriptorUpdateAfterBindUniformBuffers +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindUniformBuffers] - [Getter][#maxPerStageDescriptorUpdateAfterBindUniformBuffers()] - [Setter][#maxPerStageDescriptorUpdateAfterBindUniformBuffers(int)] +/// ### maxPerStageDescriptorUpdateAfterBindStorageBuffers +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindStorageBuffers] - [Getter][#maxPerStageDescriptorUpdateAfterBindStorageBuffers()] - [Setter][#maxPerStageDescriptorUpdateAfterBindStorageBuffers(int)] +/// ### maxPerStageDescriptorUpdateAfterBindSampledImages +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindSampledImages] - [Getter][#maxPerStageDescriptorUpdateAfterBindSampledImages()] - [Setter][#maxPerStageDescriptorUpdateAfterBindSampledImages(int)] +/// ### maxPerStageDescriptorUpdateAfterBindStorageImages +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindStorageImages] - [Getter][#maxPerStageDescriptorUpdateAfterBindStorageImages()] - [Setter][#maxPerStageDescriptorUpdateAfterBindStorageImages(int)] +/// ### maxPerStageDescriptorUpdateAfterBindInputAttachments +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindInputAttachments] - [Getter][#maxPerStageDescriptorUpdateAfterBindInputAttachments()] - [Setter][#maxPerStageDescriptorUpdateAfterBindInputAttachments(int)] +/// ### maxPerStageUpdateAfterBindResources +/// [VarHandle][#VH_maxPerStageUpdateAfterBindResources] - [Getter][#maxPerStageUpdateAfterBindResources()] - [Setter][#maxPerStageUpdateAfterBindResources(int)] +/// ### maxDescriptorSetUpdateAfterBindSamplers +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindSamplers] - [Getter][#maxDescriptorSetUpdateAfterBindSamplers()] - [Setter][#maxDescriptorSetUpdateAfterBindSamplers(int)] +/// ### maxDescriptorSetUpdateAfterBindUniformBuffers +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindUniformBuffers] - [Getter][#maxDescriptorSetUpdateAfterBindUniformBuffers()] - [Setter][#maxDescriptorSetUpdateAfterBindUniformBuffers(int)] +/// ### maxDescriptorSetUpdateAfterBindUniformBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic] - [Getter][#maxDescriptorSetUpdateAfterBindUniformBuffersDynamic()] - [Setter][#maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(int)] +/// ### maxDescriptorSetUpdateAfterBindStorageBuffers +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindStorageBuffers] - [Getter][#maxDescriptorSetUpdateAfterBindStorageBuffers()] - [Setter][#maxDescriptorSetUpdateAfterBindStorageBuffers(int)] +/// ### maxDescriptorSetUpdateAfterBindStorageBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic] - [Getter][#maxDescriptorSetUpdateAfterBindStorageBuffersDynamic()] - [Setter][#maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(int)] +/// ### maxDescriptorSetUpdateAfterBindSampledImages +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindSampledImages] - [Getter][#maxDescriptorSetUpdateAfterBindSampledImages()] - [Setter][#maxDescriptorSetUpdateAfterBindSampledImages(int)] +/// ### maxDescriptorSetUpdateAfterBindStorageImages +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindStorageImages] - [Getter][#maxDescriptorSetUpdateAfterBindStorageImages()] - [Setter][#maxDescriptorSetUpdateAfterBindStorageImages(int)] +/// ### maxDescriptorSetUpdateAfterBindInputAttachments +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindInputAttachments] - [Getter][#maxDescriptorSetUpdateAfterBindInputAttachments()] - [Setter][#maxDescriptorSetUpdateAfterBindInputAttachments(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDescriptorIndexingProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxUpdateAfterBindDescriptorsInAllPools; +/// VkBool32 shaderUniformBufferArrayNonUniformIndexingNative; +/// VkBool32 shaderSampledImageArrayNonUniformIndexingNative; +/// VkBool32 shaderStorageBufferArrayNonUniformIndexingNative; +/// VkBool32 shaderStorageImageArrayNonUniformIndexingNative; +/// VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative; +/// VkBool32 robustBufferAccessUpdateAfterBind; +/// VkBool32 quadDivergentImplicitLod; +/// uint32_t maxPerStageDescriptorUpdateAfterBindSamplers; +/// uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers; +/// uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers; +/// uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages; +/// uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages; +/// uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments; +/// uint32_t maxPerStageUpdateAfterBindResources; +/// uint32_t maxDescriptorSetUpdateAfterBindSamplers; +/// uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers; +/// uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; +/// uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers; +/// uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; +/// uint32_t maxDescriptorSetUpdateAfterBindSampledImages; +/// uint32_t maxDescriptorSetUpdateAfterBindStorageImages; +/// uint32_t maxDescriptorSetUpdateAfterBindInputAttachments; +/// } VkPhysicalDeviceDescriptorIndexingProperties; +/// ``` +public final class VkPhysicalDeviceDescriptorIndexingProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceDescriptorIndexingProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxUpdateAfterBindDescriptorsInAllPools"), + ValueLayout.JAVA_INT.withName("shaderUniformBufferArrayNonUniformIndexingNative"), + ValueLayout.JAVA_INT.withName("shaderSampledImageArrayNonUniformIndexingNative"), + ValueLayout.JAVA_INT.withName("shaderStorageBufferArrayNonUniformIndexingNative"), + ValueLayout.JAVA_INT.withName("shaderStorageImageArrayNonUniformIndexingNative"), + ValueLayout.JAVA_INT.withName("shaderInputAttachmentArrayNonUniformIndexingNative"), + ValueLayout.JAVA_INT.withName("robustBufferAccessUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("quadDivergentImplicitLod"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindSamplers"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindUniformBuffers"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindStorageBuffers"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindSampledImages"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindStorageImages"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindInputAttachments"), + ValueLayout.JAVA_INT.withName("maxPerStageUpdateAfterBindResources"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindSamplers"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindUniformBuffers"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindUniformBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindStorageBuffers"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindStorageBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindSampledImages"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindStorageImages"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindInputAttachments") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxUpdateAfterBindDescriptorsInAllPools` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxUpdateAfterBindDescriptorsInAllPools = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxUpdateAfterBindDescriptorsInAllPools")); + /// The [VarHandle] of `shaderUniformBufferArrayNonUniformIndexingNative` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderUniformBufferArrayNonUniformIndexingNative = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderUniformBufferArrayNonUniformIndexingNative")); + /// The [VarHandle] of `shaderSampledImageArrayNonUniformIndexingNative` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSampledImageArrayNonUniformIndexingNative = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSampledImageArrayNonUniformIndexingNative")); + /// The [VarHandle] of `shaderStorageBufferArrayNonUniformIndexingNative` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageBufferArrayNonUniformIndexingNative = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageBufferArrayNonUniformIndexingNative")); + /// The [VarHandle] of `shaderStorageImageArrayNonUniformIndexingNative` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageImageArrayNonUniformIndexingNative = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageImageArrayNonUniformIndexingNative")); + /// The [VarHandle] of `shaderInputAttachmentArrayNonUniformIndexingNative` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderInputAttachmentArrayNonUniformIndexingNative = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderInputAttachmentArrayNonUniformIndexingNative")); + /// The [VarHandle] of `robustBufferAccessUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_robustBufferAccessUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustBufferAccessUpdateAfterBind")); + /// The [VarHandle] of `quadDivergentImplicitLod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_quadDivergentImplicitLod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("quadDivergentImplicitLod")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindSamplers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindSamplers")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindUniformBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindUniformBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindUniformBuffers")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindStorageBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindStorageBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindStorageBuffers")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindSampledImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindSampledImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindSampledImages")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindStorageImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindStorageImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindStorageImages")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindInputAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindInputAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindInputAttachments")); + /// The [VarHandle] of `maxPerStageUpdateAfterBindResources` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageUpdateAfterBindResources = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageUpdateAfterBindResources")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindSamplers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindSamplers")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindUniformBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindUniformBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindUniformBuffers")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindUniformBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindStorageBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindStorageBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindStorageBuffers")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindStorageBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindSampledImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindSampledImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindSampledImages")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindStorageImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindStorageImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindStorageImages")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindInputAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindInputAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindInputAttachments")); + + /// Creates `VkPhysicalDeviceDescriptorIndexingProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDescriptorIndexingProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDescriptorIndexingProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorIndexingProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorIndexingProperties(segment); } + + /// Creates `VkPhysicalDeviceDescriptorIndexingProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorIndexingProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorIndexingProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDescriptorIndexingProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorIndexingProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorIndexingProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDescriptorIndexingProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDescriptorIndexingProperties` + public static VkPhysicalDeviceDescriptorIndexingProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDescriptorIndexingProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDescriptorIndexingProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDescriptorIndexingProperties` + public static VkPhysicalDeviceDescriptorIndexingProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDescriptorIndexingProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDescriptorIndexingProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDescriptorIndexingProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorIndexingProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorIndexingProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorIndexingProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `maxUpdateAfterBindDescriptorsInAllPools` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxUpdateAfterBindDescriptorsInAllPools(MemorySegment segment, long index) { return (int) VH_maxUpdateAfterBindDescriptorsInAllPools.get(segment, 0L, index); } + /// {@return `maxUpdateAfterBindDescriptorsInAllPools`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxUpdateAfterBindDescriptorsInAllPools(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxUpdateAfterBindDescriptorsInAllPools(segment, 0L); } + /// {@return `maxUpdateAfterBindDescriptorsInAllPools` at the given index} + /// @param index the index + public @CType("uint32_t") int maxUpdateAfterBindDescriptorsInAllPoolsAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxUpdateAfterBindDescriptorsInAllPools(this.segment(), index); } + /// {@return `maxUpdateAfterBindDescriptorsInAllPools`} + public @CType("uint32_t") int maxUpdateAfterBindDescriptorsInAllPools() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxUpdateAfterBindDescriptorsInAllPools(this.segment()); } + /// Sets `maxUpdateAfterBindDescriptorsInAllPools` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxUpdateAfterBindDescriptorsInAllPools(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxUpdateAfterBindDescriptorsInAllPools.set(segment, 0L, index, value); } + /// Sets `maxUpdateAfterBindDescriptorsInAllPools` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxUpdateAfterBindDescriptorsInAllPools(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxUpdateAfterBindDescriptorsInAllPools(segment, 0L, value); } + /// Sets `maxUpdateAfterBindDescriptorsInAllPools` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxUpdateAfterBindDescriptorsInAllPoolsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxUpdateAfterBindDescriptorsInAllPools(this.segment(), index, value); return this; } + /// Sets `maxUpdateAfterBindDescriptorsInAllPools` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxUpdateAfterBindDescriptorsInAllPools(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxUpdateAfterBindDescriptorsInAllPools(this.segment(), value); return this; } + + /// {@return `shaderUniformBufferArrayNonUniformIndexingNative` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderUniformBufferArrayNonUniformIndexingNative(MemorySegment segment, long index) { return (int) VH_shaderUniformBufferArrayNonUniformIndexingNative.get(segment, 0L, index); } + /// {@return `shaderUniformBufferArrayNonUniformIndexingNative`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderUniformBufferArrayNonUniformIndexingNative(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderUniformBufferArrayNonUniformIndexingNative(segment, 0L); } + /// {@return `shaderUniformBufferArrayNonUniformIndexingNative` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderUniformBufferArrayNonUniformIndexingNativeAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderUniformBufferArrayNonUniformIndexingNative(this.segment(), index); } + /// {@return `shaderUniformBufferArrayNonUniformIndexingNative`} + public @CType("VkBool32") int shaderUniformBufferArrayNonUniformIndexingNative() { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderUniformBufferArrayNonUniformIndexingNative(this.segment()); } + /// Sets `shaderUniformBufferArrayNonUniformIndexingNative` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderUniformBufferArrayNonUniformIndexingNative(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderUniformBufferArrayNonUniformIndexingNative.set(segment, 0L, index, value); } + /// Sets `shaderUniformBufferArrayNonUniformIndexingNative` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderUniformBufferArrayNonUniformIndexingNative(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderUniformBufferArrayNonUniformIndexingNative(segment, 0L, value); } + /// Sets `shaderUniformBufferArrayNonUniformIndexingNative` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties shaderUniformBufferArrayNonUniformIndexingNativeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderUniformBufferArrayNonUniformIndexingNative(this.segment(), index, value); return this; } + /// Sets `shaderUniformBufferArrayNonUniformIndexingNative` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties shaderUniformBufferArrayNonUniformIndexingNative(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderUniformBufferArrayNonUniformIndexingNative(this.segment(), value); return this; } + + /// {@return `shaderSampledImageArrayNonUniformIndexingNative` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSampledImageArrayNonUniformIndexingNative(MemorySegment segment, long index) { return (int) VH_shaderSampledImageArrayNonUniformIndexingNative.get(segment, 0L, index); } + /// {@return `shaderSampledImageArrayNonUniformIndexingNative`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSampledImageArrayNonUniformIndexingNative(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderSampledImageArrayNonUniformIndexingNative(segment, 0L); } + /// {@return `shaderSampledImageArrayNonUniformIndexingNative` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSampledImageArrayNonUniformIndexingNativeAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderSampledImageArrayNonUniformIndexingNative(this.segment(), index); } + /// {@return `shaderSampledImageArrayNonUniformIndexingNative`} + public @CType("VkBool32") int shaderSampledImageArrayNonUniformIndexingNative() { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderSampledImageArrayNonUniformIndexingNative(this.segment()); } + /// Sets `shaderSampledImageArrayNonUniformIndexingNative` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSampledImageArrayNonUniformIndexingNative(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSampledImageArrayNonUniformIndexingNative.set(segment, 0L, index, value); } + /// Sets `shaderSampledImageArrayNonUniformIndexingNative` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSampledImageArrayNonUniformIndexingNative(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderSampledImageArrayNonUniformIndexingNative(segment, 0L, value); } + /// Sets `shaderSampledImageArrayNonUniformIndexingNative` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties shaderSampledImageArrayNonUniformIndexingNativeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderSampledImageArrayNonUniformIndexingNative(this.segment(), index, value); return this; } + /// Sets `shaderSampledImageArrayNonUniformIndexingNative` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties shaderSampledImageArrayNonUniformIndexingNative(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderSampledImageArrayNonUniformIndexingNative(this.segment(), value); return this; } + + /// {@return `shaderStorageBufferArrayNonUniformIndexingNative` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageBufferArrayNonUniformIndexingNative(MemorySegment segment, long index) { return (int) VH_shaderStorageBufferArrayNonUniformIndexingNative.get(segment, 0L, index); } + /// {@return `shaderStorageBufferArrayNonUniformIndexingNative`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageBufferArrayNonUniformIndexingNative(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderStorageBufferArrayNonUniformIndexingNative(segment, 0L); } + /// {@return `shaderStorageBufferArrayNonUniformIndexingNative` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageBufferArrayNonUniformIndexingNativeAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderStorageBufferArrayNonUniformIndexingNative(this.segment(), index); } + /// {@return `shaderStorageBufferArrayNonUniformIndexingNative`} + public @CType("VkBool32") int shaderStorageBufferArrayNonUniformIndexingNative() { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderStorageBufferArrayNonUniformIndexingNative(this.segment()); } + /// Sets `shaderStorageBufferArrayNonUniformIndexingNative` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageBufferArrayNonUniformIndexingNative(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageBufferArrayNonUniformIndexingNative.set(segment, 0L, index, value); } + /// Sets `shaderStorageBufferArrayNonUniformIndexingNative` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageBufferArrayNonUniformIndexingNative(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderStorageBufferArrayNonUniformIndexingNative(segment, 0L, value); } + /// Sets `shaderStorageBufferArrayNonUniformIndexingNative` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties shaderStorageBufferArrayNonUniformIndexingNativeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderStorageBufferArrayNonUniformIndexingNative(this.segment(), index, value); return this; } + /// Sets `shaderStorageBufferArrayNonUniformIndexingNative` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties shaderStorageBufferArrayNonUniformIndexingNative(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderStorageBufferArrayNonUniformIndexingNative(this.segment(), value); return this; } + + /// {@return `shaderStorageImageArrayNonUniformIndexingNative` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageImageArrayNonUniformIndexingNative(MemorySegment segment, long index) { return (int) VH_shaderStorageImageArrayNonUniformIndexingNative.get(segment, 0L, index); } + /// {@return `shaderStorageImageArrayNonUniformIndexingNative`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageImageArrayNonUniformIndexingNative(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderStorageImageArrayNonUniformIndexingNative(segment, 0L); } + /// {@return `shaderStorageImageArrayNonUniformIndexingNative` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageImageArrayNonUniformIndexingNativeAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderStorageImageArrayNonUniformIndexingNative(this.segment(), index); } + /// {@return `shaderStorageImageArrayNonUniformIndexingNative`} + public @CType("VkBool32") int shaderStorageImageArrayNonUniformIndexingNative() { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderStorageImageArrayNonUniformIndexingNative(this.segment()); } + /// Sets `shaderStorageImageArrayNonUniformIndexingNative` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageImageArrayNonUniformIndexingNative(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageImageArrayNonUniformIndexingNative.set(segment, 0L, index, value); } + /// Sets `shaderStorageImageArrayNonUniformIndexingNative` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageImageArrayNonUniformIndexingNative(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderStorageImageArrayNonUniformIndexingNative(segment, 0L, value); } + /// Sets `shaderStorageImageArrayNonUniformIndexingNative` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties shaderStorageImageArrayNonUniformIndexingNativeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderStorageImageArrayNonUniformIndexingNative(this.segment(), index, value); return this; } + /// Sets `shaderStorageImageArrayNonUniformIndexingNative` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties shaderStorageImageArrayNonUniformIndexingNative(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderStorageImageArrayNonUniformIndexingNative(this.segment(), value); return this; } + + /// {@return `shaderInputAttachmentArrayNonUniformIndexingNative` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderInputAttachmentArrayNonUniformIndexingNative(MemorySegment segment, long index) { return (int) VH_shaderInputAttachmentArrayNonUniformIndexingNative.get(segment, 0L, index); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexingNative`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderInputAttachmentArrayNonUniformIndexingNative(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderInputAttachmentArrayNonUniformIndexingNative(segment, 0L); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexingNative` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderInputAttachmentArrayNonUniformIndexingNativeAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderInputAttachmentArrayNonUniformIndexingNative(this.segment(), index); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexingNative`} + public @CType("VkBool32") int shaderInputAttachmentArrayNonUniformIndexingNative() { return VkPhysicalDeviceDescriptorIndexingProperties.get_shaderInputAttachmentArrayNonUniformIndexingNative(this.segment()); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexingNative` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderInputAttachmentArrayNonUniformIndexingNative(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderInputAttachmentArrayNonUniformIndexingNative.set(segment, 0L, index, value); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexingNative` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderInputAttachmentArrayNonUniformIndexingNative(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderInputAttachmentArrayNonUniformIndexingNative(segment, 0L, value); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexingNative` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties shaderInputAttachmentArrayNonUniformIndexingNativeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderInputAttachmentArrayNonUniformIndexingNative(this.segment(), index, value); return this; } + /// Sets `shaderInputAttachmentArrayNonUniformIndexingNative` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties shaderInputAttachmentArrayNonUniformIndexingNative(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_shaderInputAttachmentArrayNonUniformIndexingNative(this.segment(), value); return this; } + + /// {@return `robustBufferAccessUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_robustBufferAccessUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_robustBufferAccessUpdateAfterBind.get(segment, 0L, index); } + /// {@return `robustBufferAccessUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_robustBufferAccessUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_robustBufferAccessUpdateAfterBind(segment, 0L); } + /// {@return `robustBufferAccessUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int robustBufferAccessUpdateAfterBindAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_robustBufferAccessUpdateAfterBind(this.segment(), index); } + /// {@return `robustBufferAccessUpdateAfterBind`} + public @CType("VkBool32") int robustBufferAccessUpdateAfterBind() { return VkPhysicalDeviceDescriptorIndexingProperties.get_robustBufferAccessUpdateAfterBind(this.segment()); } + /// Sets `robustBufferAccessUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustBufferAccessUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_robustBufferAccessUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `robustBufferAccessUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustBufferAccessUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_robustBufferAccessUpdateAfterBind(segment, 0L, value); } + /// Sets `robustBufferAccessUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties robustBufferAccessUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_robustBufferAccessUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `robustBufferAccessUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties robustBufferAccessUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_robustBufferAccessUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `quadDivergentImplicitLod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_quadDivergentImplicitLod(MemorySegment segment, long index) { return (int) VH_quadDivergentImplicitLod.get(segment, 0L, index); } + /// {@return `quadDivergentImplicitLod`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_quadDivergentImplicitLod(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_quadDivergentImplicitLod(segment, 0L); } + /// {@return `quadDivergentImplicitLod` at the given index} + /// @param index the index + public @CType("VkBool32") int quadDivergentImplicitLodAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_quadDivergentImplicitLod(this.segment(), index); } + /// {@return `quadDivergentImplicitLod`} + public @CType("VkBool32") int quadDivergentImplicitLod() { return VkPhysicalDeviceDescriptorIndexingProperties.get_quadDivergentImplicitLod(this.segment()); } + /// Sets `quadDivergentImplicitLod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_quadDivergentImplicitLod(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_quadDivergentImplicitLod.set(segment, 0L, index, value); } + /// Sets `quadDivergentImplicitLod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_quadDivergentImplicitLod(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_quadDivergentImplicitLod(segment, 0L, value); } + /// Sets `quadDivergentImplicitLod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties quadDivergentImplicitLodAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_quadDivergentImplicitLod(this.segment(), index, value); return this; } + /// Sets `quadDivergentImplicitLod` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties quadDivergentImplicitLod(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_quadDivergentImplicitLod(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindSamplers(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindSamplers.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSamplers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindSamplers(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindSamplers(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSamplers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindSamplersAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindSamplers(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSamplers`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindSamplers() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindSamplers(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindSamplers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindSamplers.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindSamplers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindSamplers(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindSamplersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindSamplers(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindSamplers(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindSamplers(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindUniformBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindUniformBuffers(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindUniformBuffers.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindUniformBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindUniformBuffers(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindUniformBuffers(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindUniformBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindUniformBuffersAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindUniformBuffers(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindUniformBuffers`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindUniformBuffers() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindUniformBuffers(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindUniformBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindUniformBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindUniformBuffers.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindUniformBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindUniformBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindUniformBuffers(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindUniformBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindUniformBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindUniformBuffers(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindUniformBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindUniformBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindUniformBuffers(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindStorageBuffers(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindStorageBuffers.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindStorageBuffers(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindStorageBuffers(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindStorageBuffersAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindStorageBuffers(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageBuffers`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindStorageBuffers() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindStorageBuffers(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindStorageBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindStorageBuffers.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindStorageBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindStorageBuffers(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindStorageBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindStorageBuffers(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindStorageBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindStorageBuffers(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindSampledImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindSampledImages(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindSampledImages.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSampledImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindSampledImages(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindSampledImages(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSampledImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindSampledImagesAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindSampledImages(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSampledImages`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindSampledImages() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindSampledImages(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSampledImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindSampledImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindSampledImages.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSampledImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindSampledImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindSampledImages(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSampledImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindSampledImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindSampledImages(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindSampledImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindSampledImages(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindSampledImages(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindStorageImages(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindStorageImages.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindStorageImages(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindStorageImages(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindStorageImagesAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindStorageImages(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageImages`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindStorageImages() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindStorageImages(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindStorageImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindStorageImages.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindStorageImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindStorageImages(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindStorageImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindStorageImages(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindStorageImages(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindStorageImages(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindInputAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindInputAttachments(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindInputAttachments.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInputAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindInputAttachments(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindInputAttachments(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInputAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindInputAttachmentsAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindInputAttachments(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInputAttachments`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindInputAttachments() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageDescriptorUpdateAfterBindInputAttachments(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInputAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindInputAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindInputAttachments.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInputAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindInputAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindInputAttachments(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInputAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindInputAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindInputAttachments(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindInputAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageDescriptorUpdateAfterBindInputAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageDescriptorUpdateAfterBindInputAttachments(this.segment(), value); return this; } + + /// {@return `maxPerStageUpdateAfterBindResources` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageUpdateAfterBindResources(MemorySegment segment, long index) { return (int) VH_maxPerStageUpdateAfterBindResources.get(segment, 0L, index); } + /// {@return `maxPerStageUpdateAfterBindResources`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageUpdateAfterBindResources(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageUpdateAfterBindResources(segment, 0L); } + /// {@return `maxPerStageUpdateAfterBindResources` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageUpdateAfterBindResourcesAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageUpdateAfterBindResources(this.segment(), index); } + /// {@return `maxPerStageUpdateAfterBindResources`} + public @CType("uint32_t") int maxPerStageUpdateAfterBindResources() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxPerStageUpdateAfterBindResources(this.segment()); } + /// Sets `maxPerStageUpdateAfterBindResources` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageUpdateAfterBindResources(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageUpdateAfterBindResources.set(segment, 0L, index, value); } + /// Sets `maxPerStageUpdateAfterBindResources` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageUpdateAfterBindResources(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageUpdateAfterBindResources(segment, 0L, value); } + /// Sets `maxPerStageUpdateAfterBindResources` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageUpdateAfterBindResourcesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageUpdateAfterBindResources(this.segment(), index, value); return this; } + /// Sets `maxPerStageUpdateAfterBindResources` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxPerStageUpdateAfterBindResources(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxPerStageUpdateAfterBindResources(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindSamplers(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindSamplers.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindSamplers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindSamplers(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindSamplers(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindSamplers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindSamplersAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindSamplers(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindSamplers`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindSamplers() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindSamplers(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindSamplers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindSamplers.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindSamplers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindSamplers(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindSamplersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindSamplers(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindSamplers(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindSamplers(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindUniformBuffers(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindUniformBuffers.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindUniformBuffers(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindUniformBuffers(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindUniformBuffersAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindUniformBuffers(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffers`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindUniformBuffers() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindUniformBuffers(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindUniformBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindUniformBuffers.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindUniformBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindUniformBuffers(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindUniformBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindUniformBuffers(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindUniformBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindUniformBuffers(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindUniformBuffersDynamicAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindUniformBuffersDynamic() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindUniformBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageBuffers(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindStorageBuffers.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageBuffers(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindStorageBuffers(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageBuffersAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindStorageBuffers(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffers`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageBuffers() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindStorageBuffers(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindStorageBuffers.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindStorageBuffers(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindStorageBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindStorageBuffers(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindStorageBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindStorageBuffers(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageBuffersDynamicAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageBuffersDynamic() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindStorageBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindSampledImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindSampledImages(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindSampledImages.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindSampledImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindSampledImages(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindSampledImages(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindSampledImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindSampledImagesAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindSampledImages(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindSampledImages`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindSampledImages() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindSampledImages(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindSampledImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindSampledImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindSampledImages.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindSampledImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindSampledImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindSampledImages(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindSampledImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindSampledImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindSampledImages(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindSampledImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindSampledImages(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindSampledImages(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindStorageImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageImages(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindStorageImages.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageImages(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindStorageImages(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageImagesAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindStorageImages(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageImages`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageImages() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindStorageImages(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindStorageImages.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindStorageImages(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindStorageImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindStorageImages(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindStorageImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindStorageImages(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindStorageImages(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindInputAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindInputAttachments(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindInputAttachments.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindInputAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindInputAttachments(MemorySegment segment) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindInputAttachments(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindInputAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindInputAttachmentsAt(long index) { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindInputAttachments(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindInputAttachments`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindInputAttachments() { return VkPhysicalDeviceDescriptorIndexingProperties.get_maxDescriptorSetUpdateAfterBindInputAttachments(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindInputAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindInputAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindInputAttachments.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindInputAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindInputAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindInputAttachments(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindInputAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindInputAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindInputAttachments(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindInputAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorIndexingProperties maxDescriptorSetUpdateAfterBindInputAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceDescriptorIndexingProperties.set_maxDescriptorSetUpdateAfterBindInputAttachments(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDriverProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDriverProperties.java new file mode 100644 index 00000000..09d6147d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDriverProperties.java @@ -0,0 +1,332 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK12.*; +import static overrungl.vulkan.VK12.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### driverID +/// [VarHandle][#VH_driverID] - [Getter][#driverID()] - [Setter][#driverID(int)] +/// ### driverName +/// [Byte offset handle][#MH_driverName] - [Memory layout][#ML_driverName] - [Getter][#driverName(long)] - [Setter][#driverName(long, java.lang.foreign.MemorySegment)] +/// ### driverInfo +/// [Byte offset handle][#MH_driverInfo] - [Memory layout][#ML_driverInfo] - [Getter][#driverInfo(long)] - [Setter][#driverInfo(long, java.lang.foreign.MemorySegment)] +/// ### conformanceVersion +/// [Byte offset][#OFFSET_conformanceVersion] - [Memory layout][#ML_conformanceVersion] - [Getter][#conformanceVersion()] - [Setter][#conformanceVersion(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDriverProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkDriverId driverID; +/// char[VK_MAX_DRIVER_NAME_SIZE] driverName; +/// char[VK_MAX_DRIVER_INFO_SIZE] driverInfo; +/// VkConformanceVersion conformanceVersion; +/// } VkPhysicalDeviceDriverProperties; +/// ``` +public final class VkPhysicalDeviceDriverProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceDriverProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("driverID"), + MemoryLayout.sequenceLayout(VK_MAX_DRIVER_NAME_SIZE, ValueLayout.JAVA_BYTE).withName("driverName"), + MemoryLayout.sequenceLayout(VK_MAX_DRIVER_INFO_SIZE, ValueLayout.JAVA_BYTE).withName("driverInfo"), + overrungl.vulkan.struct.VkConformanceVersion.LAYOUT.withName("conformanceVersion") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `driverID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_driverID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("driverID")); + /// The byte offset handle of `driverName` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_driverName = LAYOUT.byteOffsetHandle(PathElement.groupElement("driverName"), PathElement.sequenceElement()); + /// The memory layout of `driverName`. + public static final MemoryLayout ML_driverName = LAYOUT.select(PathElement.groupElement("driverName")); + /// The byte offset handle of `driverInfo` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_driverInfo = LAYOUT.byteOffsetHandle(PathElement.groupElement("driverInfo"), PathElement.sequenceElement()); + /// The memory layout of `driverInfo`. + public static final MemoryLayout ML_driverInfo = LAYOUT.select(PathElement.groupElement("driverInfo")); + /// The byte offset of `conformanceVersion`. + public static final long OFFSET_conformanceVersion = LAYOUT.byteOffset(PathElement.groupElement("conformanceVersion")); + /// The memory layout of `conformanceVersion`. + public static final MemoryLayout ML_conformanceVersion = LAYOUT.select(PathElement.groupElement("conformanceVersion")); + + /// Creates `VkPhysicalDeviceDriverProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDriverProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDriverProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDriverProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDriverProperties(segment); } + + /// Creates `VkPhysicalDeviceDriverProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDriverProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDriverProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDriverProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDriverProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDriverProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDriverProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDriverProperties` + public static VkPhysicalDeviceDriverProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDriverProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDriverProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDriverProperties` + public static VkPhysicalDeviceDriverProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDriverProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDriverProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDriverProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDriverProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDriverProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDriverProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDriverProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDriverProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDriverProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDriverProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `driverID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDriverId") int get_driverID(MemorySegment segment, long index) { return (int) VH_driverID.get(segment, 0L, index); } + /// {@return `driverID`} + /// @param segment the segment of the struct + public static @CType("VkDriverId") int get_driverID(MemorySegment segment) { return VkPhysicalDeviceDriverProperties.get_driverID(segment, 0L); } + /// {@return `driverID` at the given index} + /// @param index the index + public @CType("VkDriverId") int driverIDAt(long index) { return VkPhysicalDeviceDriverProperties.get_driverID(this.segment(), index); } + /// {@return `driverID`} + public @CType("VkDriverId") int driverID() { return VkPhysicalDeviceDriverProperties.get_driverID(this.segment()); } + /// Sets `driverID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_driverID(MemorySegment segment, long index, @CType("VkDriverId") int value) { VH_driverID.set(segment, 0L, index, value); } + /// Sets `driverID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_driverID(MemorySegment segment, @CType("VkDriverId") int value) { VkPhysicalDeviceDriverProperties.set_driverID(segment, 0L, value); } + /// Sets `driverID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties driverIDAt(long index, @CType("VkDriverId") int value) { VkPhysicalDeviceDriverProperties.set_driverID(this.segment(), index, value); return this; } + /// Sets `driverID` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties driverID(@CType("VkDriverId") int value) { VkPhysicalDeviceDriverProperties.set_driverID(this.segment(), value); return this; } + + /// {@return `driverName` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment get_driverName(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_driverName.invokeExact(0L, elementIndex), index), ML_driverName); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `driverName`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment get_driverName(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceDriverProperties.get_driverName(segment, 0L, elementIndex); } + /// {@return `driverName` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment driverNameAt(long index, long elementIndex) { return VkPhysicalDeviceDriverProperties.get_driverName(this.segment(), index, elementIndex); } + /// {@return `driverName`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment driverName(long elementIndex) { return VkPhysicalDeviceDriverProperties.get_driverName(this.segment(), elementIndex); } + /// Sets `driverName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverName(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_driverName.invokeExact(0L, elementIndex), index), ML_driverName.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `driverName` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverName(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_driverName(segment, 0L, elementIndex, value); } + /// Sets `driverName` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties driverNameAt(long index, long elementIndex, @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_driverName(this.segment(), index, elementIndex, value); return this; } + /// Sets `driverName` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties driverName(long elementIndex, @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_driverName(this.segment(), elementIndex, value); return this; } + + /// {@return `driverInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment get_driverInfo(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_driverInfo.invokeExact(0L, elementIndex), index), ML_driverInfo); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `driverInfo`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment get_driverInfo(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceDriverProperties.get_driverInfo(segment, 0L, elementIndex); } + /// {@return `driverInfo` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment driverInfoAt(long index, long elementIndex) { return VkPhysicalDeviceDriverProperties.get_driverInfo(this.segment(), index, elementIndex); } + /// {@return `driverInfo`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment driverInfo(long elementIndex) { return VkPhysicalDeviceDriverProperties.get_driverInfo(this.segment(), elementIndex); } + /// Sets `driverInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverInfo(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_driverInfo.invokeExact(0L, elementIndex), index), ML_driverInfo.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `driverInfo` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverInfo(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_driverInfo(segment, 0L, elementIndex, value); } + /// Sets `driverInfo` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties driverInfoAt(long index, long elementIndex, @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_driverInfo(this.segment(), index, elementIndex, value); return this; } + /// Sets `driverInfo` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties driverInfo(long elementIndex, @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_driverInfo(this.segment(), elementIndex, value); return this; } + + /// {@return `conformanceVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkConformanceVersion") java.lang.foreign.MemorySegment get_conformanceVersion(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_conformanceVersion, index), ML_conformanceVersion); } + /// {@return `conformanceVersion`} + /// @param segment the segment of the struct + public static @CType("VkConformanceVersion") java.lang.foreign.MemorySegment get_conformanceVersion(MemorySegment segment) { return VkPhysicalDeviceDriverProperties.get_conformanceVersion(segment, 0L); } + /// {@return `conformanceVersion` at the given index} + /// @param index the index + public @CType("VkConformanceVersion") java.lang.foreign.MemorySegment conformanceVersionAt(long index) { return VkPhysicalDeviceDriverProperties.get_conformanceVersion(this.segment(), index); } + /// {@return `conformanceVersion`} + public @CType("VkConformanceVersion") java.lang.foreign.MemorySegment conformanceVersion() { return VkPhysicalDeviceDriverProperties.get_conformanceVersion(this.segment()); } + /// Sets `conformanceVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conformanceVersion(MemorySegment segment, long index, @CType("VkConformanceVersion") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_conformanceVersion, index), ML_conformanceVersion.byteSize()); } + /// Sets `conformanceVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conformanceVersion(MemorySegment segment, @CType("VkConformanceVersion") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_conformanceVersion(segment, 0L, value); } + /// Sets `conformanceVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties conformanceVersionAt(long index, @CType("VkConformanceVersion") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_conformanceVersion(this.segment(), index, value); return this; } + /// Sets `conformanceVersion` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDriverProperties conformanceVersion(@CType("VkConformanceVersion") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDriverProperties.set_conformanceVersion(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDynamicRenderingFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDynamicRenderingFeatures.java new file mode 100644 index 00000000..37199358 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDynamicRenderingFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dynamicRendering +/// [VarHandle][#VH_dynamicRendering] - [Getter][#dynamicRendering()] - [Setter][#dynamicRendering(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDynamicRenderingFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 dynamicRendering; +/// } VkPhysicalDeviceDynamicRenderingFeatures; +/// ``` +public final class VkPhysicalDeviceDynamicRenderingFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceDynamicRenderingFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("dynamicRendering") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dynamicRendering` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicRendering = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicRendering")); + + /// Creates `VkPhysicalDeviceDynamicRenderingFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDynamicRenderingFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDynamicRenderingFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDynamicRenderingFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDynamicRenderingFeatures(segment); } + + /// Creates `VkPhysicalDeviceDynamicRenderingFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDynamicRenderingFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDynamicRenderingFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDynamicRenderingFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDynamicRenderingFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDynamicRenderingFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDynamicRenderingFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDynamicRenderingFeatures` + public static VkPhysicalDeviceDynamicRenderingFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDynamicRenderingFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDynamicRenderingFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDynamicRenderingFeatures` + public static VkPhysicalDeviceDynamicRenderingFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDynamicRenderingFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDynamicRenderingFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDynamicRenderingFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDynamicRenderingFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDynamicRenderingFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDynamicRenderingFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDynamicRenderingFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDynamicRenderingFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDynamicRenderingFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDynamicRenderingFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDynamicRenderingFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDynamicRenderingFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDynamicRenderingFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `dynamicRendering` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dynamicRendering(MemorySegment segment, long index) { return (int) VH_dynamicRendering.get(segment, 0L, index); } + /// {@return `dynamicRendering`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dynamicRendering(MemorySegment segment) { return VkPhysicalDeviceDynamicRenderingFeatures.get_dynamicRendering(segment, 0L); } + /// {@return `dynamicRendering` at the given index} + /// @param index the index + public @CType("VkBool32") int dynamicRenderingAt(long index) { return VkPhysicalDeviceDynamicRenderingFeatures.get_dynamicRendering(this.segment(), index); } + /// {@return `dynamicRendering`} + public @CType("VkBool32") int dynamicRendering() { return VkPhysicalDeviceDynamicRenderingFeatures.get_dynamicRendering(this.segment()); } + /// Sets `dynamicRendering` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicRendering(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dynamicRendering.set(segment, 0L, index, value); } + /// Sets `dynamicRendering` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicRendering(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDynamicRenderingFeatures.set_dynamicRendering(segment, 0L, value); } + /// Sets `dynamicRendering` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingFeatures dynamicRenderingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDynamicRenderingFeatures.set_dynamicRendering(this.segment(), index, value); return this; } + /// Sets `dynamicRendering` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingFeatures dynamicRendering(@CType("VkBool32") int value) { VkPhysicalDeviceDynamicRenderingFeatures.set_dynamicRendering(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDynamicRenderingLocalReadFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDynamicRenderingLocalReadFeatures.java new file mode 100644 index 00000000..31c73880 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceDynamicRenderingLocalReadFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dynamicRenderingLocalRead +/// [VarHandle][#VH_dynamicRenderingLocalRead] - [Getter][#dynamicRenderingLocalRead()] - [Setter][#dynamicRenderingLocalRead(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDynamicRenderingLocalReadFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 dynamicRenderingLocalRead; +/// } VkPhysicalDeviceDynamicRenderingLocalReadFeatures; +/// ``` +public final class VkPhysicalDeviceDynamicRenderingLocalReadFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceDynamicRenderingLocalReadFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("dynamicRenderingLocalRead") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dynamicRenderingLocalRead` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicRenderingLocalRead = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicRenderingLocalRead")); + + /// Creates `VkPhysicalDeviceDynamicRenderingLocalReadFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDynamicRenderingLocalReadFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDynamicRenderingLocalReadFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDynamicRenderingLocalReadFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDynamicRenderingLocalReadFeatures(segment); } + + /// Creates `VkPhysicalDeviceDynamicRenderingLocalReadFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDynamicRenderingLocalReadFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDynamicRenderingLocalReadFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDynamicRenderingLocalReadFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDynamicRenderingLocalReadFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDynamicRenderingLocalReadFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDynamicRenderingLocalReadFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDynamicRenderingLocalReadFeatures` + public static VkPhysicalDeviceDynamicRenderingLocalReadFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDynamicRenderingLocalReadFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDynamicRenderingLocalReadFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDynamicRenderingLocalReadFeatures` + public static VkPhysicalDeviceDynamicRenderingLocalReadFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDynamicRenderingLocalReadFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDynamicRenderingLocalReadFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDynamicRenderingLocalReadFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDynamicRenderingLocalReadFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDynamicRenderingLocalReadFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingLocalReadFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDynamicRenderingLocalReadFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingLocalReadFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDynamicRenderingLocalReadFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDynamicRenderingLocalReadFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDynamicRenderingLocalReadFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDynamicRenderingLocalReadFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDynamicRenderingLocalReadFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingLocalReadFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDynamicRenderingLocalReadFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingLocalReadFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDynamicRenderingLocalReadFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `dynamicRenderingLocalRead` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dynamicRenderingLocalRead(MemorySegment segment, long index) { return (int) VH_dynamicRenderingLocalRead.get(segment, 0L, index); } + /// {@return `dynamicRenderingLocalRead`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dynamicRenderingLocalRead(MemorySegment segment) { return VkPhysicalDeviceDynamicRenderingLocalReadFeatures.get_dynamicRenderingLocalRead(segment, 0L); } + /// {@return `dynamicRenderingLocalRead` at the given index} + /// @param index the index + public @CType("VkBool32") int dynamicRenderingLocalReadAt(long index) { return VkPhysicalDeviceDynamicRenderingLocalReadFeatures.get_dynamicRenderingLocalRead(this.segment(), index); } + /// {@return `dynamicRenderingLocalRead`} + public @CType("VkBool32") int dynamicRenderingLocalRead() { return VkPhysicalDeviceDynamicRenderingLocalReadFeatures.get_dynamicRenderingLocalRead(this.segment()); } + /// Sets `dynamicRenderingLocalRead` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicRenderingLocalRead(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dynamicRenderingLocalRead.set(segment, 0L, index, value); } + /// Sets `dynamicRenderingLocalRead` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicRenderingLocalRead(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDynamicRenderingLocalReadFeatures.set_dynamicRenderingLocalRead(segment, 0L, value); } + /// Sets `dynamicRenderingLocalRead` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingLocalReadFeatures dynamicRenderingLocalReadAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDynamicRenderingLocalReadFeatures.set_dynamicRenderingLocalRead(this.segment(), index, value); return this; } + /// Sets `dynamicRenderingLocalRead` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDynamicRenderingLocalReadFeatures dynamicRenderingLocalRead(@CType("VkBool32") int value) { VkPhysicalDeviceDynamicRenderingLocalReadFeatures.set_dynamicRenderingLocalRead(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalBufferInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalBufferInfo.java new file mode 100644 index 00000000..44359576 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalBufferInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalBufferInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkBufferCreateFlags flags; +/// VkBufferUsageFlags usage; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// } VkPhysicalDeviceExternalBufferInfo; +/// ``` +public final class VkPhysicalDeviceExternalBufferInfo extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalBufferInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("usage"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkPhysicalDeviceExternalBufferInfo` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalBufferInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalBufferInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalBufferInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalBufferInfo(segment); } + + /// Creates `VkPhysicalDeviceExternalBufferInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalBufferInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalBufferInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalBufferInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalBufferInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalBufferInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalBufferInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalBufferInfo` + public static VkPhysicalDeviceExternalBufferInfo alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalBufferInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalBufferInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalBufferInfo` + public static VkPhysicalDeviceExternalBufferInfo alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalBufferInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalBufferInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalBufferInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalBufferInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalBufferInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalBufferInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalBufferInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalBufferInfo sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalBufferInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalBufferInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalBufferInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalBufferInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalBufferInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalBufferInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalBufferInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalBufferInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalBufferInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkBufferCreateFlags") int get_flags(MemorySegment segment) { return VkPhysicalDeviceExternalBufferInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkBufferCreateFlags") int flagsAt(long index) { return VkPhysicalDeviceExternalBufferInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkBufferCreateFlags") int flags() { return VkPhysicalDeviceExternalBufferInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkBufferCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkBufferCreateFlags") int value) { VkPhysicalDeviceExternalBufferInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalBufferInfo flagsAt(long index, @CType("VkBufferCreateFlags") int value) { VkPhysicalDeviceExternalBufferInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalBufferInfo flags(@CType("VkBufferCreateFlags") int value) { VkPhysicalDeviceExternalBufferInfo.set_flags(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBufferUsageFlags") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkBufferUsageFlags") int get_usage(MemorySegment segment) { return VkPhysicalDeviceExternalBufferInfo.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkBufferUsageFlags") int usageAt(long index) { return VkPhysicalDeviceExternalBufferInfo.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkBufferUsageFlags") int usage() { return VkPhysicalDeviceExternalBufferInfo.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkBufferUsageFlags") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkBufferUsageFlags") int value) { VkPhysicalDeviceExternalBufferInfo.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalBufferInfo usageAt(long index, @CType("VkBufferUsageFlags") int value) { VkPhysicalDeviceExternalBufferInfo.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalBufferInfo usage(@CType("VkBufferUsageFlags") int value) { VkPhysicalDeviceExternalBufferInfo.set_usage(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkPhysicalDeviceExternalBufferInfo.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkPhysicalDeviceExternalBufferInfo.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkPhysicalDeviceExternalBufferInfo.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalBufferInfo.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalBufferInfo handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalBufferInfo.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalBufferInfo handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalBufferInfo.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalFenceInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalFenceInfo.java new file mode 100644 index 00000000..3ab4100f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalFenceInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalFenceInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalFenceHandleTypeFlagBits handleType; +/// } VkPhysicalDeviceExternalFenceInfo; +/// ``` +public final class VkPhysicalDeviceExternalFenceInfo extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalFenceInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkPhysicalDeviceExternalFenceInfo` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalFenceInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalFenceInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalFenceInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalFenceInfo(segment); } + + /// Creates `VkPhysicalDeviceExternalFenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalFenceInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalFenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalFenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalFenceInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalFenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalFenceInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalFenceInfo` + public static VkPhysicalDeviceExternalFenceInfo alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalFenceInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalFenceInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalFenceInfo` + public static VkPhysicalDeviceExternalFenceInfo alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalFenceInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalFenceInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalFenceInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalFenceInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalFenceInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFenceInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalFenceInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFenceInfo sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalFenceInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalFenceInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalFenceInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalFenceInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalFenceInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFenceInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalFenceInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFenceInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalFenceInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalFenceHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkPhysicalDeviceExternalFenceInfo.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalFenceHandleTypeFlagBits") int handleTypeAt(long index) { return VkPhysicalDeviceExternalFenceInfo.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalFenceHandleTypeFlagBits") int handleType() { return VkPhysicalDeviceExternalFenceInfo.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalFenceInfo.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFenceInfo handleTypeAt(long index, @CType("VkExternalFenceHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalFenceInfo.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalFenceInfo handleType(@CType("VkExternalFenceHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalFenceInfo.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalImageFormatInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalImageFormatInfo.java new file mode 100644 index 00000000..5aeb395b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalImageFormatInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalImageFormatInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalMemoryHandleTypeFlagBits handleType; +/// } VkPhysicalDeviceExternalImageFormatInfo; +/// ``` +public final class VkPhysicalDeviceExternalImageFormatInfo extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalImageFormatInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkPhysicalDeviceExternalImageFormatInfo` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalImageFormatInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalImageFormatInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalImageFormatInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalImageFormatInfo(segment); } + + /// Creates `VkPhysicalDeviceExternalImageFormatInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalImageFormatInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalImageFormatInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalImageFormatInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalImageFormatInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalImageFormatInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalImageFormatInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalImageFormatInfo` + public static VkPhysicalDeviceExternalImageFormatInfo alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalImageFormatInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalImageFormatInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalImageFormatInfo` + public static VkPhysicalDeviceExternalImageFormatInfo alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalImageFormatInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalImageFormatInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalImageFormatInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalImageFormatInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalImageFormatInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalImageFormatInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalImageFormatInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalImageFormatInfo sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalImageFormatInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalImageFormatInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalImageFormatInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalImageFormatInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalImageFormatInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalImageFormatInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalImageFormatInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalImageFormatInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalImageFormatInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalMemoryHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkPhysicalDeviceExternalImageFormatInfo.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleTypeAt(long index) { return VkPhysicalDeviceExternalImageFormatInfo.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalMemoryHandleTypeFlagBits") int handleType() { return VkPhysicalDeviceExternalImageFormatInfo.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalImageFormatInfo.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalImageFormatInfo handleTypeAt(long index, @CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalImageFormatInfo.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalImageFormatInfo handleType(@CType("VkExternalMemoryHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalImageFormatInfo.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalSemaphoreInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalSemaphoreInfo.java new file mode 100644 index 00000000..2ddc04bd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceExternalSemaphoreInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### handleType +/// [VarHandle][#VH_handleType] - [Getter][#handleType()] - [Setter][#handleType(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceExternalSemaphoreInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkExternalSemaphoreHandleTypeFlagBits handleType; +/// } VkPhysicalDeviceExternalSemaphoreInfo; +/// ``` +public final class VkPhysicalDeviceExternalSemaphoreInfo extends Struct { + /// The struct layout of `VkPhysicalDeviceExternalSemaphoreInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("handleType") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `handleType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_handleType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("handleType")); + + /// Creates `VkPhysicalDeviceExternalSemaphoreInfo` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceExternalSemaphoreInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceExternalSemaphoreInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalSemaphoreInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalSemaphoreInfo(segment); } + + /// Creates `VkPhysicalDeviceExternalSemaphoreInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalSemaphoreInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalSemaphoreInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceExternalSemaphoreInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceExternalSemaphoreInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceExternalSemaphoreInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceExternalSemaphoreInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceExternalSemaphoreInfo` + public static VkPhysicalDeviceExternalSemaphoreInfo alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceExternalSemaphoreInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceExternalSemaphoreInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceExternalSemaphoreInfo` + public static VkPhysicalDeviceExternalSemaphoreInfo alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceExternalSemaphoreInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceExternalSemaphoreInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceExternalSemaphoreInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceExternalSemaphoreInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalSemaphoreInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSemaphoreInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceExternalSemaphoreInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSemaphoreInfo sType(@CType("VkStructureType") int value) { VkPhysicalDeviceExternalSemaphoreInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceExternalSemaphoreInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceExternalSemaphoreInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceExternalSemaphoreInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalSemaphoreInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSemaphoreInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalSemaphoreInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSemaphoreInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceExternalSemaphoreInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `handleType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment, long index) { return (int) VH_handleType.get(segment, 0L, index); } + /// {@return `handleType`} + /// @param segment the segment of the struct + public static @CType("VkExternalSemaphoreHandleTypeFlagBits") int get_handleType(MemorySegment segment) { return VkPhysicalDeviceExternalSemaphoreInfo.get_handleType(segment, 0L); } + /// {@return `handleType` at the given index} + /// @param index the index + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleTypeAt(long index) { return VkPhysicalDeviceExternalSemaphoreInfo.get_handleType(this.segment(), index); } + /// {@return `handleType`} + public @CType("VkExternalSemaphoreHandleTypeFlagBits") int handleType() { return VkPhysicalDeviceExternalSemaphoreInfo.get_handleType(this.segment()); } + /// Sets `handleType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_handleType(MemorySegment segment, long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VH_handleType.set(segment, 0L, index, value); } + /// Sets `handleType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_handleType(MemorySegment segment, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalSemaphoreInfo.set_handleType(segment, 0L, value); } + /// Sets `handleType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSemaphoreInfo handleTypeAt(long index, @CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalSemaphoreInfo.set_handleType(this.segment(), index, value); return this; } + /// Sets `handleType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceExternalSemaphoreInfo handleType(@CType("VkExternalSemaphoreHandleTypeFlagBits") int value) { VkPhysicalDeviceExternalSemaphoreInfo.set_handleType(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceFeatures.java new file mode 100644 index 00000000..4f31e47a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceFeatures.java @@ -0,0 +1,2109 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### robustBufferAccess +/// [VarHandle][#VH_robustBufferAccess] - [Getter][#robustBufferAccess()] - [Setter][#robustBufferAccess(int)] +/// ### fullDrawIndexUint32 +/// [VarHandle][#VH_fullDrawIndexUint32] - [Getter][#fullDrawIndexUint32()] - [Setter][#fullDrawIndexUint32(int)] +/// ### imageCubeArray +/// [VarHandle][#VH_imageCubeArray] - [Getter][#imageCubeArray()] - [Setter][#imageCubeArray(int)] +/// ### independentBlend +/// [VarHandle][#VH_independentBlend] - [Getter][#independentBlend()] - [Setter][#independentBlend(int)] +/// ### geometryShader +/// [VarHandle][#VH_geometryShader] - [Getter][#geometryShader()] - [Setter][#geometryShader(int)] +/// ### tessellationShader +/// [VarHandle][#VH_tessellationShader] - [Getter][#tessellationShader()] - [Setter][#tessellationShader(int)] +/// ### sampleRateShading +/// [VarHandle][#VH_sampleRateShading] - [Getter][#sampleRateShading()] - [Setter][#sampleRateShading(int)] +/// ### dualSrcBlend +/// [VarHandle][#VH_dualSrcBlend] - [Getter][#dualSrcBlend()] - [Setter][#dualSrcBlend(int)] +/// ### logicOp +/// [VarHandle][#VH_logicOp] - [Getter][#logicOp()] - [Setter][#logicOp(int)] +/// ### multiDrawIndirect +/// [VarHandle][#VH_multiDrawIndirect] - [Getter][#multiDrawIndirect()] - [Setter][#multiDrawIndirect(int)] +/// ### drawIndirectFirstInstance +/// [VarHandle][#VH_drawIndirectFirstInstance] - [Getter][#drawIndirectFirstInstance()] - [Setter][#drawIndirectFirstInstance(int)] +/// ### depthClamp +/// [VarHandle][#VH_depthClamp] - [Getter][#depthClamp()] - [Setter][#depthClamp(int)] +/// ### depthBiasClamp +/// [VarHandle][#VH_depthBiasClamp] - [Getter][#depthBiasClamp()] - [Setter][#depthBiasClamp(int)] +/// ### fillModeNonSolid +/// [VarHandle][#VH_fillModeNonSolid] - [Getter][#fillModeNonSolid()] - [Setter][#fillModeNonSolid(int)] +/// ### depthBounds +/// [VarHandle][#VH_depthBounds] - [Getter][#depthBounds()] - [Setter][#depthBounds(int)] +/// ### wideLines +/// [VarHandle][#VH_wideLines] - [Getter][#wideLines()] - [Setter][#wideLines(int)] +/// ### largePoints +/// [VarHandle][#VH_largePoints] - [Getter][#largePoints()] - [Setter][#largePoints(int)] +/// ### alphaToOne +/// [VarHandle][#VH_alphaToOne] - [Getter][#alphaToOne()] - [Setter][#alphaToOne(int)] +/// ### multiViewport +/// [VarHandle][#VH_multiViewport] - [Getter][#multiViewport()] - [Setter][#multiViewport(int)] +/// ### samplerAnisotropy +/// [VarHandle][#VH_samplerAnisotropy] - [Getter][#samplerAnisotropy()] - [Setter][#samplerAnisotropy(int)] +/// ### textureCompressionETC2 +/// [VarHandle][#VH_textureCompressionETC2] - [Getter][#textureCompressionETC2()] - [Setter][#textureCompressionETC2(int)] +/// ### textureCompressionASTC_LDR +/// [VarHandle][#VH_textureCompressionASTC_LDR] - [Getter][#textureCompressionASTC_LDR()] - [Setter][#textureCompressionASTC_LDR(int)] +/// ### textureCompressionBC +/// [VarHandle][#VH_textureCompressionBC] - [Getter][#textureCompressionBC()] - [Setter][#textureCompressionBC(int)] +/// ### occlusionQueryPrecise +/// [VarHandle][#VH_occlusionQueryPrecise] - [Getter][#occlusionQueryPrecise()] - [Setter][#occlusionQueryPrecise(int)] +/// ### pipelineStatisticsQuery +/// [VarHandle][#VH_pipelineStatisticsQuery] - [Getter][#pipelineStatisticsQuery()] - [Setter][#pipelineStatisticsQuery(int)] +/// ### vertexPipelineStoresAndAtomics +/// [VarHandle][#VH_vertexPipelineStoresAndAtomics] - [Getter][#vertexPipelineStoresAndAtomics()] - [Setter][#vertexPipelineStoresAndAtomics(int)] +/// ### fragmentStoresAndAtomics +/// [VarHandle][#VH_fragmentStoresAndAtomics] - [Getter][#fragmentStoresAndAtomics()] - [Setter][#fragmentStoresAndAtomics(int)] +/// ### shaderTessellationAndGeometryPointSize +/// [VarHandle][#VH_shaderTessellationAndGeometryPointSize] - [Getter][#shaderTessellationAndGeometryPointSize()] - [Setter][#shaderTessellationAndGeometryPointSize(int)] +/// ### shaderImageGatherExtended +/// [VarHandle][#VH_shaderImageGatherExtended] - [Getter][#shaderImageGatherExtended()] - [Setter][#shaderImageGatherExtended(int)] +/// ### shaderStorageImageExtendedFormats +/// [VarHandle][#VH_shaderStorageImageExtendedFormats] - [Getter][#shaderStorageImageExtendedFormats()] - [Setter][#shaderStorageImageExtendedFormats(int)] +/// ### shaderStorageImageMultisample +/// [VarHandle][#VH_shaderStorageImageMultisample] - [Getter][#shaderStorageImageMultisample()] - [Setter][#shaderStorageImageMultisample(int)] +/// ### shaderStorageImageReadWithoutFormat +/// [VarHandle][#VH_shaderStorageImageReadWithoutFormat] - [Getter][#shaderStorageImageReadWithoutFormat()] - [Setter][#shaderStorageImageReadWithoutFormat(int)] +/// ### shaderStorageImageWriteWithoutFormat +/// [VarHandle][#VH_shaderStorageImageWriteWithoutFormat] - [Getter][#shaderStorageImageWriteWithoutFormat()] - [Setter][#shaderStorageImageWriteWithoutFormat(int)] +/// ### shaderUniformBufferArrayDynamicIndexing +/// [VarHandle][#VH_shaderUniformBufferArrayDynamicIndexing] - [Getter][#shaderUniformBufferArrayDynamicIndexing()] - [Setter][#shaderUniformBufferArrayDynamicIndexing(int)] +/// ### shaderSampledImageArrayDynamicIndexing +/// [VarHandle][#VH_shaderSampledImageArrayDynamicIndexing] - [Getter][#shaderSampledImageArrayDynamicIndexing()] - [Setter][#shaderSampledImageArrayDynamicIndexing(int)] +/// ### shaderStorageBufferArrayDynamicIndexing +/// [VarHandle][#VH_shaderStorageBufferArrayDynamicIndexing] - [Getter][#shaderStorageBufferArrayDynamicIndexing()] - [Setter][#shaderStorageBufferArrayDynamicIndexing(int)] +/// ### shaderStorageImageArrayDynamicIndexing +/// [VarHandle][#VH_shaderStorageImageArrayDynamicIndexing] - [Getter][#shaderStorageImageArrayDynamicIndexing()] - [Setter][#shaderStorageImageArrayDynamicIndexing(int)] +/// ### shaderClipDistance +/// [VarHandle][#VH_shaderClipDistance] - [Getter][#shaderClipDistance()] - [Setter][#shaderClipDistance(int)] +/// ### shaderCullDistance +/// [VarHandle][#VH_shaderCullDistance] - [Getter][#shaderCullDistance()] - [Setter][#shaderCullDistance(int)] +/// ### shaderFloat64 +/// [VarHandle][#VH_shaderFloat64] - [Getter][#shaderFloat64()] - [Setter][#shaderFloat64(int)] +/// ### shaderInt64 +/// [VarHandle][#VH_shaderInt64] - [Getter][#shaderInt64()] - [Setter][#shaderInt64(int)] +/// ### shaderInt16 +/// [VarHandle][#VH_shaderInt16] - [Getter][#shaderInt16()] - [Setter][#shaderInt16(int)] +/// ### shaderResourceResidency +/// [VarHandle][#VH_shaderResourceResidency] - [Getter][#shaderResourceResidency()] - [Setter][#shaderResourceResidency(int)] +/// ### shaderResourceMinLod +/// [VarHandle][#VH_shaderResourceMinLod] - [Getter][#shaderResourceMinLod()] - [Setter][#shaderResourceMinLod(int)] +/// ### sparseBinding +/// [VarHandle][#VH_sparseBinding] - [Getter][#sparseBinding()] - [Setter][#sparseBinding(int)] +/// ### sparseResidencyBuffer +/// [VarHandle][#VH_sparseResidencyBuffer] - [Getter][#sparseResidencyBuffer()] - [Setter][#sparseResidencyBuffer(int)] +/// ### sparseResidencyImage2D +/// [VarHandle][#VH_sparseResidencyImage2D] - [Getter][#sparseResidencyImage2D()] - [Setter][#sparseResidencyImage2D(int)] +/// ### sparseResidencyImage3D +/// [VarHandle][#VH_sparseResidencyImage3D] - [Getter][#sparseResidencyImage3D()] - [Setter][#sparseResidencyImage3D(int)] +/// ### sparseResidency2Samples +/// [VarHandle][#VH_sparseResidency2Samples] - [Getter][#sparseResidency2Samples()] - [Setter][#sparseResidency2Samples(int)] +/// ### sparseResidency4Samples +/// [VarHandle][#VH_sparseResidency4Samples] - [Getter][#sparseResidency4Samples()] - [Setter][#sparseResidency4Samples(int)] +/// ### sparseResidency8Samples +/// [VarHandle][#VH_sparseResidency8Samples] - [Getter][#sparseResidency8Samples()] - [Setter][#sparseResidency8Samples(int)] +/// ### sparseResidency16Samples +/// [VarHandle][#VH_sparseResidency16Samples] - [Getter][#sparseResidency16Samples()] - [Setter][#sparseResidency16Samples(int)] +/// ### sparseResidencyAliased +/// [VarHandle][#VH_sparseResidencyAliased] - [Getter][#sparseResidencyAliased()] - [Setter][#sparseResidencyAliased(int)] +/// ### variableMultisampleRate +/// [VarHandle][#VH_variableMultisampleRate] - [Getter][#variableMultisampleRate()] - [Setter][#variableMultisampleRate(int)] +/// ### inheritedQueries +/// [VarHandle][#VH_inheritedQueries] - [Getter][#inheritedQueries()] - [Setter][#inheritedQueries(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFeatures { +/// VkBool32 robustBufferAccess; +/// VkBool32 fullDrawIndexUint32; +/// VkBool32 imageCubeArray; +/// VkBool32 independentBlend; +/// VkBool32 geometryShader; +/// VkBool32 tessellationShader; +/// VkBool32 sampleRateShading; +/// VkBool32 dualSrcBlend; +/// VkBool32 logicOp; +/// VkBool32 multiDrawIndirect; +/// VkBool32 drawIndirectFirstInstance; +/// VkBool32 depthClamp; +/// VkBool32 depthBiasClamp; +/// VkBool32 fillModeNonSolid; +/// VkBool32 depthBounds; +/// VkBool32 wideLines; +/// VkBool32 largePoints; +/// VkBool32 alphaToOne; +/// VkBool32 multiViewport; +/// VkBool32 samplerAnisotropy; +/// VkBool32 textureCompressionETC2; +/// VkBool32 textureCompressionASTC_LDR; +/// VkBool32 textureCompressionBC; +/// VkBool32 occlusionQueryPrecise; +/// VkBool32 pipelineStatisticsQuery; +/// VkBool32 vertexPipelineStoresAndAtomics; +/// VkBool32 fragmentStoresAndAtomics; +/// VkBool32 shaderTessellationAndGeometryPointSize; +/// VkBool32 shaderImageGatherExtended; +/// VkBool32 shaderStorageImageExtendedFormats; +/// VkBool32 shaderStorageImageMultisample; +/// VkBool32 shaderStorageImageReadWithoutFormat; +/// VkBool32 shaderStorageImageWriteWithoutFormat; +/// VkBool32 shaderUniformBufferArrayDynamicIndexing; +/// VkBool32 shaderSampledImageArrayDynamicIndexing; +/// VkBool32 shaderStorageBufferArrayDynamicIndexing; +/// VkBool32 shaderStorageImageArrayDynamicIndexing; +/// VkBool32 shaderClipDistance; +/// VkBool32 shaderCullDistance; +/// VkBool32 shaderFloat64; +/// VkBool32 shaderInt64; +/// VkBool32 shaderInt16; +/// VkBool32 shaderResourceResidency; +/// VkBool32 shaderResourceMinLod; +/// VkBool32 sparseBinding; +/// VkBool32 sparseResidencyBuffer; +/// VkBool32 sparseResidencyImage2D; +/// VkBool32 sparseResidencyImage3D; +/// VkBool32 sparseResidency2Samples; +/// VkBool32 sparseResidency4Samples; +/// VkBool32 sparseResidency8Samples; +/// VkBool32 sparseResidency16Samples; +/// VkBool32 sparseResidencyAliased; +/// VkBool32 variableMultisampleRate; +/// VkBool32 inheritedQueries; +/// } VkPhysicalDeviceFeatures; +/// ``` +public final class VkPhysicalDeviceFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("robustBufferAccess"), + ValueLayout.JAVA_INT.withName("fullDrawIndexUint32"), + ValueLayout.JAVA_INT.withName("imageCubeArray"), + ValueLayout.JAVA_INT.withName("independentBlend"), + ValueLayout.JAVA_INT.withName("geometryShader"), + ValueLayout.JAVA_INT.withName("tessellationShader"), + ValueLayout.JAVA_INT.withName("sampleRateShading"), + ValueLayout.JAVA_INT.withName("dualSrcBlend"), + ValueLayout.JAVA_INT.withName("logicOp"), + ValueLayout.JAVA_INT.withName("multiDrawIndirect"), + ValueLayout.JAVA_INT.withName("drawIndirectFirstInstance"), + ValueLayout.JAVA_INT.withName("depthClamp"), + ValueLayout.JAVA_INT.withName("depthBiasClamp"), + ValueLayout.JAVA_INT.withName("fillModeNonSolid"), + ValueLayout.JAVA_INT.withName("depthBounds"), + ValueLayout.JAVA_INT.withName("wideLines"), + ValueLayout.JAVA_INT.withName("largePoints"), + ValueLayout.JAVA_INT.withName("alphaToOne"), + ValueLayout.JAVA_INT.withName("multiViewport"), + ValueLayout.JAVA_INT.withName("samplerAnisotropy"), + ValueLayout.JAVA_INT.withName("textureCompressionETC2"), + ValueLayout.JAVA_INT.withName("textureCompressionASTC_LDR"), + ValueLayout.JAVA_INT.withName("textureCompressionBC"), + ValueLayout.JAVA_INT.withName("occlusionQueryPrecise"), + ValueLayout.JAVA_INT.withName("pipelineStatisticsQuery"), + ValueLayout.JAVA_INT.withName("vertexPipelineStoresAndAtomics"), + ValueLayout.JAVA_INT.withName("fragmentStoresAndAtomics"), + ValueLayout.JAVA_INT.withName("shaderTessellationAndGeometryPointSize"), + ValueLayout.JAVA_INT.withName("shaderImageGatherExtended"), + ValueLayout.JAVA_INT.withName("shaderStorageImageExtendedFormats"), + ValueLayout.JAVA_INT.withName("shaderStorageImageMultisample"), + ValueLayout.JAVA_INT.withName("shaderStorageImageReadWithoutFormat"), + ValueLayout.JAVA_INT.withName("shaderStorageImageWriteWithoutFormat"), + ValueLayout.JAVA_INT.withName("shaderUniformBufferArrayDynamicIndexing"), + ValueLayout.JAVA_INT.withName("shaderSampledImageArrayDynamicIndexing"), + ValueLayout.JAVA_INT.withName("shaderStorageBufferArrayDynamicIndexing"), + ValueLayout.JAVA_INT.withName("shaderStorageImageArrayDynamicIndexing"), + ValueLayout.JAVA_INT.withName("shaderClipDistance"), + ValueLayout.JAVA_INT.withName("shaderCullDistance"), + ValueLayout.JAVA_INT.withName("shaderFloat64"), + ValueLayout.JAVA_INT.withName("shaderInt64"), + ValueLayout.JAVA_INT.withName("shaderInt16"), + ValueLayout.JAVA_INT.withName("shaderResourceResidency"), + ValueLayout.JAVA_INT.withName("shaderResourceMinLod"), + ValueLayout.JAVA_INT.withName("sparseBinding"), + ValueLayout.JAVA_INT.withName("sparseResidencyBuffer"), + ValueLayout.JAVA_INT.withName("sparseResidencyImage2D"), + ValueLayout.JAVA_INT.withName("sparseResidencyImage3D"), + ValueLayout.JAVA_INT.withName("sparseResidency2Samples"), + ValueLayout.JAVA_INT.withName("sparseResidency4Samples"), + ValueLayout.JAVA_INT.withName("sparseResidency8Samples"), + ValueLayout.JAVA_INT.withName("sparseResidency16Samples"), + ValueLayout.JAVA_INT.withName("sparseResidencyAliased"), + ValueLayout.JAVA_INT.withName("variableMultisampleRate"), + ValueLayout.JAVA_INT.withName("inheritedQueries") + ); + /// The [VarHandle] of `robustBufferAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_robustBufferAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustBufferAccess")); + /// The [VarHandle] of `fullDrawIndexUint32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fullDrawIndexUint32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fullDrawIndexUint32")); + /// The [VarHandle] of `imageCubeArray` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageCubeArray = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageCubeArray")); + /// The [VarHandle] of `independentBlend` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_independentBlend = LAYOUT.arrayElementVarHandle(PathElement.groupElement("independentBlend")); + /// The [VarHandle] of `geometryShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_geometryShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("geometryShader")); + /// The [VarHandle] of `tessellationShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tessellationShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tessellationShader")); + /// The [VarHandle] of `sampleRateShading` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleRateShading = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleRateShading")); + /// The [VarHandle] of `dualSrcBlend` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dualSrcBlend = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dualSrcBlend")); + /// The [VarHandle] of `logicOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_logicOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("logicOp")); + /// The [VarHandle] of `multiDrawIndirect` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiDrawIndirect = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiDrawIndirect")); + /// The [VarHandle] of `drawIndirectFirstInstance` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_drawIndirectFirstInstance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drawIndirectFirstInstance")); + /// The [VarHandle] of `depthClamp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthClamp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthClamp")); + /// The [VarHandle] of `depthBiasClamp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthBiasClamp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasClamp")); + /// The [VarHandle] of `fillModeNonSolid` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fillModeNonSolid = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fillModeNonSolid")); + /// The [VarHandle] of `depthBounds` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthBounds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBounds")); + /// The [VarHandle] of `wideLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_wideLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("wideLines")); + /// The [VarHandle] of `largePoints` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_largePoints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("largePoints")); + /// The [VarHandle] of `alphaToOne` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_alphaToOne = LAYOUT.arrayElementVarHandle(PathElement.groupElement("alphaToOne")); + /// The [VarHandle] of `multiViewport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiViewport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiViewport")); + /// The [VarHandle] of `samplerAnisotropy` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samplerAnisotropy = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerAnisotropy")); + /// The [VarHandle] of `textureCompressionETC2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_textureCompressionETC2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("textureCompressionETC2")); + /// The [VarHandle] of `textureCompressionASTC_LDR` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_textureCompressionASTC_LDR = LAYOUT.arrayElementVarHandle(PathElement.groupElement("textureCompressionASTC_LDR")); + /// The [VarHandle] of `textureCompressionBC` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_textureCompressionBC = LAYOUT.arrayElementVarHandle(PathElement.groupElement("textureCompressionBC")); + /// The [VarHandle] of `occlusionQueryPrecise` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_occlusionQueryPrecise = LAYOUT.arrayElementVarHandle(PathElement.groupElement("occlusionQueryPrecise")); + /// The [VarHandle] of `pipelineStatisticsQuery` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineStatisticsQuery = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineStatisticsQuery")); + /// The [VarHandle] of `vertexPipelineStoresAndAtomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexPipelineStoresAndAtomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexPipelineStoresAndAtomics")); + /// The [VarHandle] of `fragmentStoresAndAtomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentStoresAndAtomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentStoresAndAtomics")); + /// The [VarHandle] of `shaderTessellationAndGeometryPointSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderTessellationAndGeometryPointSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderTessellationAndGeometryPointSize")); + /// The [VarHandle] of `shaderImageGatherExtended` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderImageGatherExtended = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderImageGatherExtended")); + /// The [VarHandle] of `shaderStorageImageExtendedFormats` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageImageExtendedFormats = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageImageExtendedFormats")); + /// The [VarHandle] of `shaderStorageImageMultisample` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageImageMultisample = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageImageMultisample")); + /// The [VarHandle] of `shaderStorageImageReadWithoutFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageImageReadWithoutFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageImageReadWithoutFormat")); + /// The [VarHandle] of `shaderStorageImageWriteWithoutFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageImageWriteWithoutFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageImageWriteWithoutFormat")); + /// The [VarHandle] of `shaderUniformBufferArrayDynamicIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderUniformBufferArrayDynamicIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderUniformBufferArrayDynamicIndexing")); + /// The [VarHandle] of `shaderSampledImageArrayDynamicIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSampledImageArrayDynamicIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSampledImageArrayDynamicIndexing")); + /// The [VarHandle] of `shaderStorageBufferArrayDynamicIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageBufferArrayDynamicIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageBufferArrayDynamicIndexing")); + /// The [VarHandle] of `shaderStorageImageArrayDynamicIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageImageArrayDynamicIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageImageArrayDynamicIndexing")); + /// The [VarHandle] of `shaderClipDistance` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderClipDistance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderClipDistance")); + /// The [VarHandle] of `shaderCullDistance` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderCullDistance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderCullDistance")); + /// The [VarHandle] of `shaderFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderFloat64")); + /// The [VarHandle] of `shaderInt64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderInt64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderInt64")); + /// The [VarHandle] of `shaderInt16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderInt16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderInt16")); + /// The [VarHandle] of `shaderResourceResidency` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderResourceResidency = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderResourceResidency")); + /// The [VarHandle] of `shaderResourceMinLod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderResourceMinLod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderResourceMinLod")); + /// The [VarHandle] of `sparseBinding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseBinding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseBinding")); + /// The [VarHandle] of `sparseResidencyBuffer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseResidencyBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseResidencyBuffer")); + /// The [VarHandle] of `sparseResidencyImage2D` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseResidencyImage2D = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseResidencyImage2D")); + /// The [VarHandle] of `sparseResidencyImage3D` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseResidencyImage3D = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseResidencyImage3D")); + /// The [VarHandle] of `sparseResidency2Samples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseResidency2Samples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseResidency2Samples")); + /// The [VarHandle] of `sparseResidency4Samples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseResidency4Samples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseResidency4Samples")); + /// The [VarHandle] of `sparseResidency8Samples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseResidency8Samples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseResidency8Samples")); + /// The [VarHandle] of `sparseResidency16Samples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseResidency16Samples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseResidency16Samples")); + /// The [VarHandle] of `sparseResidencyAliased` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sparseResidencyAliased = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseResidencyAliased")); + /// The [VarHandle] of `variableMultisampleRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_variableMultisampleRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("variableMultisampleRate")); + /// The [VarHandle] of `inheritedQueries` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inheritedQueries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inheritedQueries")); + + /// Creates `VkPhysicalDeviceFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFeatures(segment); } + + /// Creates `VkPhysicalDeviceFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFeatures` + public static VkPhysicalDeviceFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFeatures` + public static VkPhysicalDeviceFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `robustBufferAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_robustBufferAccess(MemorySegment segment, long index) { return (int) VH_robustBufferAccess.get(segment, 0L, index); } + /// {@return `robustBufferAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_robustBufferAccess(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_robustBufferAccess(segment, 0L); } + /// {@return `robustBufferAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int robustBufferAccessAt(long index) { return VkPhysicalDeviceFeatures.get_robustBufferAccess(this.segment(), index); } + /// {@return `robustBufferAccess`} + public @CType("VkBool32") int robustBufferAccess() { return VkPhysicalDeviceFeatures.get_robustBufferAccess(this.segment()); } + /// Sets `robustBufferAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustBufferAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_robustBufferAccess.set(segment, 0L, index, value); } + /// Sets `robustBufferAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustBufferAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_robustBufferAccess(segment, 0L, value); } + /// Sets `robustBufferAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures robustBufferAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_robustBufferAccess(this.segment(), index, value); return this; } + /// Sets `robustBufferAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures robustBufferAccess(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_robustBufferAccess(this.segment(), value); return this; } + + /// {@return `fullDrawIndexUint32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fullDrawIndexUint32(MemorySegment segment, long index) { return (int) VH_fullDrawIndexUint32.get(segment, 0L, index); } + /// {@return `fullDrawIndexUint32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fullDrawIndexUint32(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_fullDrawIndexUint32(segment, 0L); } + /// {@return `fullDrawIndexUint32` at the given index} + /// @param index the index + public @CType("VkBool32") int fullDrawIndexUint32At(long index) { return VkPhysicalDeviceFeatures.get_fullDrawIndexUint32(this.segment(), index); } + /// {@return `fullDrawIndexUint32`} + public @CType("VkBool32") int fullDrawIndexUint32() { return VkPhysicalDeviceFeatures.get_fullDrawIndexUint32(this.segment()); } + /// Sets `fullDrawIndexUint32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fullDrawIndexUint32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fullDrawIndexUint32.set(segment, 0L, index, value); } + /// Sets `fullDrawIndexUint32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fullDrawIndexUint32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_fullDrawIndexUint32(segment, 0L, value); } + /// Sets `fullDrawIndexUint32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures fullDrawIndexUint32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_fullDrawIndexUint32(this.segment(), index, value); return this; } + /// Sets `fullDrawIndexUint32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures fullDrawIndexUint32(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_fullDrawIndexUint32(this.segment(), value); return this; } + + /// {@return `imageCubeArray` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imageCubeArray(MemorySegment segment, long index) { return (int) VH_imageCubeArray.get(segment, 0L, index); } + /// {@return `imageCubeArray`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imageCubeArray(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_imageCubeArray(segment, 0L); } + /// {@return `imageCubeArray` at the given index} + /// @param index the index + public @CType("VkBool32") int imageCubeArrayAt(long index) { return VkPhysicalDeviceFeatures.get_imageCubeArray(this.segment(), index); } + /// {@return `imageCubeArray`} + public @CType("VkBool32") int imageCubeArray() { return VkPhysicalDeviceFeatures.get_imageCubeArray(this.segment()); } + /// Sets `imageCubeArray` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageCubeArray(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imageCubeArray.set(segment, 0L, index, value); } + /// Sets `imageCubeArray` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageCubeArray(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_imageCubeArray(segment, 0L, value); } + /// Sets `imageCubeArray` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures imageCubeArrayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_imageCubeArray(this.segment(), index, value); return this; } + /// Sets `imageCubeArray` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures imageCubeArray(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_imageCubeArray(this.segment(), value); return this; } + + /// {@return `independentBlend` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_independentBlend(MemorySegment segment, long index) { return (int) VH_independentBlend.get(segment, 0L, index); } + /// {@return `independentBlend`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_independentBlend(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_independentBlend(segment, 0L); } + /// {@return `independentBlend` at the given index} + /// @param index the index + public @CType("VkBool32") int independentBlendAt(long index) { return VkPhysicalDeviceFeatures.get_independentBlend(this.segment(), index); } + /// {@return `independentBlend`} + public @CType("VkBool32") int independentBlend() { return VkPhysicalDeviceFeatures.get_independentBlend(this.segment()); } + /// Sets `independentBlend` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_independentBlend(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_independentBlend.set(segment, 0L, index, value); } + /// Sets `independentBlend` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_independentBlend(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_independentBlend(segment, 0L, value); } + /// Sets `independentBlend` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures independentBlendAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_independentBlend(this.segment(), index, value); return this; } + /// Sets `independentBlend` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures independentBlend(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_independentBlend(this.segment(), value); return this; } + + /// {@return `geometryShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_geometryShader(MemorySegment segment, long index) { return (int) VH_geometryShader.get(segment, 0L, index); } + /// {@return `geometryShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_geometryShader(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_geometryShader(segment, 0L); } + /// {@return `geometryShader` at the given index} + /// @param index the index + public @CType("VkBool32") int geometryShaderAt(long index) { return VkPhysicalDeviceFeatures.get_geometryShader(this.segment(), index); } + /// {@return `geometryShader`} + public @CType("VkBool32") int geometryShader() { return VkPhysicalDeviceFeatures.get_geometryShader(this.segment()); } + /// Sets `geometryShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_geometryShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_geometryShader.set(segment, 0L, index, value); } + /// Sets `geometryShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_geometryShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_geometryShader(segment, 0L, value); } + /// Sets `geometryShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures geometryShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_geometryShader(this.segment(), index, value); return this; } + /// Sets `geometryShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures geometryShader(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_geometryShader(this.segment(), value); return this; } + + /// {@return `tessellationShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_tessellationShader(MemorySegment segment, long index) { return (int) VH_tessellationShader.get(segment, 0L, index); } + /// {@return `tessellationShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_tessellationShader(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_tessellationShader(segment, 0L); } + /// {@return `tessellationShader` at the given index} + /// @param index the index + public @CType("VkBool32") int tessellationShaderAt(long index) { return VkPhysicalDeviceFeatures.get_tessellationShader(this.segment(), index); } + /// {@return `tessellationShader`} + public @CType("VkBool32") int tessellationShader() { return VkPhysicalDeviceFeatures.get_tessellationShader(this.segment()); } + /// Sets `tessellationShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tessellationShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_tessellationShader.set(segment, 0L, index, value); } + /// Sets `tessellationShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tessellationShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_tessellationShader(segment, 0L, value); } + /// Sets `tessellationShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures tessellationShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_tessellationShader(this.segment(), index, value); return this; } + /// Sets `tessellationShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures tessellationShader(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_tessellationShader(this.segment(), value); return this; } + + /// {@return `sampleRateShading` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sampleRateShading(MemorySegment segment, long index) { return (int) VH_sampleRateShading.get(segment, 0L, index); } + /// {@return `sampleRateShading`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sampleRateShading(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_sampleRateShading(segment, 0L); } + /// {@return `sampleRateShading` at the given index} + /// @param index the index + public @CType("VkBool32") int sampleRateShadingAt(long index) { return VkPhysicalDeviceFeatures.get_sampleRateShading(this.segment(), index); } + /// {@return `sampleRateShading`} + public @CType("VkBool32") int sampleRateShading() { return VkPhysicalDeviceFeatures.get_sampleRateShading(this.segment()); } + /// Sets `sampleRateShading` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleRateShading(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sampleRateShading.set(segment, 0L, index, value); } + /// Sets `sampleRateShading` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleRateShading(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sampleRateShading(segment, 0L, value); } + /// Sets `sampleRateShading` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sampleRateShadingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sampleRateShading(this.segment(), index, value); return this; } + /// Sets `sampleRateShading` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sampleRateShading(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sampleRateShading(this.segment(), value); return this; } + + /// {@return `dualSrcBlend` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dualSrcBlend(MemorySegment segment, long index) { return (int) VH_dualSrcBlend.get(segment, 0L, index); } + /// {@return `dualSrcBlend`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dualSrcBlend(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_dualSrcBlend(segment, 0L); } + /// {@return `dualSrcBlend` at the given index} + /// @param index the index + public @CType("VkBool32") int dualSrcBlendAt(long index) { return VkPhysicalDeviceFeatures.get_dualSrcBlend(this.segment(), index); } + /// {@return `dualSrcBlend`} + public @CType("VkBool32") int dualSrcBlend() { return VkPhysicalDeviceFeatures.get_dualSrcBlend(this.segment()); } + /// Sets `dualSrcBlend` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dualSrcBlend(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dualSrcBlend.set(segment, 0L, index, value); } + /// Sets `dualSrcBlend` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dualSrcBlend(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_dualSrcBlend(segment, 0L, value); } + /// Sets `dualSrcBlend` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures dualSrcBlendAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_dualSrcBlend(this.segment(), index, value); return this; } + /// Sets `dualSrcBlend` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures dualSrcBlend(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_dualSrcBlend(this.segment(), value); return this; } + + /// {@return `logicOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_logicOp(MemorySegment segment, long index) { return (int) VH_logicOp.get(segment, 0L, index); } + /// {@return `logicOp`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_logicOp(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_logicOp(segment, 0L); } + /// {@return `logicOp` at the given index} + /// @param index the index + public @CType("VkBool32") int logicOpAt(long index) { return VkPhysicalDeviceFeatures.get_logicOp(this.segment(), index); } + /// {@return `logicOp`} + public @CType("VkBool32") int logicOp() { return VkPhysicalDeviceFeatures.get_logicOp(this.segment()); } + /// Sets `logicOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_logicOp(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_logicOp.set(segment, 0L, index, value); } + /// Sets `logicOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_logicOp(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_logicOp(segment, 0L, value); } + /// Sets `logicOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures logicOpAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_logicOp(this.segment(), index, value); return this; } + /// Sets `logicOp` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures logicOp(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_logicOp(this.segment(), value); return this; } + + /// {@return `multiDrawIndirect` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiDrawIndirect(MemorySegment segment, long index) { return (int) VH_multiDrawIndirect.get(segment, 0L, index); } + /// {@return `multiDrawIndirect`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiDrawIndirect(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_multiDrawIndirect(segment, 0L); } + /// {@return `multiDrawIndirect` at the given index} + /// @param index the index + public @CType("VkBool32") int multiDrawIndirectAt(long index) { return VkPhysicalDeviceFeatures.get_multiDrawIndirect(this.segment(), index); } + /// {@return `multiDrawIndirect`} + public @CType("VkBool32") int multiDrawIndirect() { return VkPhysicalDeviceFeatures.get_multiDrawIndirect(this.segment()); } + /// Sets `multiDrawIndirect` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiDrawIndirect(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiDrawIndirect.set(segment, 0L, index, value); } + /// Sets `multiDrawIndirect` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiDrawIndirect(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_multiDrawIndirect(segment, 0L, value); } + /// Sets `multiDrawIndirect` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures multiDrawIndirectAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_multiDrawIndirect(this.segment(), index, value); return this; } + /// Sets `multiDrawIndirect` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures multiDrawIndirect(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_multiDrawIndirect(this.segment(), value); return this; } + + /// {@return `drawIndirectFirstInstance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_drawIndirectFirstInstance(MemorySegment segment, long index) { return (int) VH_drawIndirectFirstInstance.get(segment, 0L, index); } + /// {@return `drawIndirectFirstInstance`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_drawIndirectFirstInstance(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_drawIndirectFirstInstance(segment, 0L); } + /// {@return `drawIndirectFirstInstance` at the given index} + /// @param index the index + public @CType("VkBool32") int drawIndirectFirstInstanceAt(long index) { return VkPhysicalDeviceFeatures.get_drawIndirectFirstInstance(this.segment(), index); } + /// {@return `drawIndirectFirstInstance`} + public @CType("VkBool32") int drawIndirectFirstInstance() { return VkPhysicalDeviceFeatures.get_drawIndirectFirstInstance(this.segment()); } + /// Sets `drawIndirectFirstInstance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drawIndirectFirstInstance(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_drawIndirectFirstInstance.set(segment, 0L, index, value); } + /// Sets `drawIndirectFirstInstance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drawIndirectFirstInstance(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_drawIndirectFirstInstance(segment, 0L, value); } + /// Sets `drawIndirectFirstInstance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures drawIndirectFirstInstanceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_drawIndirectFirstInstance(this.segment(), index, value); return this; } + /// Sets `drawIndirectFirstInstance` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures drawIndirectFirstInstance(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_drawIndirectFirstInstance(this.segment(), value); return this; } + + /// {@return `depthClamp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthClamp(MemorySegment segment, long index) { return (int) VH_depthClamp.get(segment, 0L, index); } + /// {@return `depthClamp`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthClamp(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_depthClamp(segment, 0L); } + /// {@return `depthClamp` at the given index} + /// @param index the index + public @CType("VkBool32") int depthClampAt(long index) { return VkPhysicalDeviceFeatures.get_depthClamp(this.segment(), index); } + /// {@return `depthClamp`} + public @CType("VkBool32") int depthClamp() { return VkPhysicalDeviceFeatures.get_depthClamp(this.segment()); } + /// Sets `depthClamp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthClamp(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthClamp.set(segment, 0L, index, value); } + /// Sets `depthClamp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthClamp(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_depthClamp(segment, 0L, value); } + /// Sets `depthClamp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures depthClampAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_depthClamp(this.segment(), index, value); return this; } + /// Sets `depthClamp` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures depthClamp(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_depthClamp(this.segment(), value); return this; } + + /// {@return `depthBiasClamp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthBiasClamp(MemorySegment segment, long index) { return (int) VH_depthBiasClamp.get(segment, 0L, index); } + /// {@return `depthBiasClamp`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthBiasClamp(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_depthBiasClamp(segment, 0L); } + /// {@return `depthBiasClamp` at the given index} + /// @param index the index + public @CType("VkBool32") int depthBiasClampAt(long index) { return VkPhysicalDeviceFeatures.get_depthBiasClamp(this.segment(), index); } + /// {@return `depthBiasClamp`} + public @CType("VkBool32") int depthBiasClamp() { return VkPhysicalDeviceFeatures.get_depthBiasClamp(this.segment()); } + /// Sets `depthBiasClamp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasClamp(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthBiasClamp.set(segment, 0L, index, value); } + /// Sets `depthBiasClamp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasClamp(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_depthBiasClamp(segment, 0L, value); } + /// Sets `depthBiasClamp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures depthBiasClampAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_depthBiasClamp(this.segment(), index, value); return this; } + /// Sets `depthBiasClamp` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures depthBiasClamp(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_depthBiasClamp(this.segment(), value); return this; } + + /// {@return `fillModeNonSolid` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fillModeNonSolid(MemorySegment segment, long index) { return (int) VH_fillModeNonSolid.get(segment, 0L, index); } + /// {@return `fillModeNonSolid`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fillModeNonSolid(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_fillModeNonSolid(segment, 0L); } + /// {@return `fillModeNonSolid` at the given index} + /// @param index the index + public @CType("VkBool32") int fillModeNonSolidAt(long index) { return VkPhysicalDeviceFeatures.get_fillModeNonSolid(this.segment(), index); } + /// {@return `fillModeNonSolid`} + public @CType("VkBool32") int fillModeNonSolid() { return VkPhysicalDeviceFeatures.get_fillModeNonSolid(this.segment()); } + /// Sets `fillModeNonSolid` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fillModeNonSolid(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fillModeNonSolid.set(segment, 0L, index, value); } + /// Sets `fillModeNonSolid` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fillModeNonSolid(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_fillModeNonSolid(segment, 0L, value); } + /// Sets `fillModeNonSolid` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures fillModeNonSolidAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_fillModeNonSolid(this.segment(), index, value); return this; } + /// Sets `fillModeNonSolid` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures fillModeNonSolid(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_fillModeNonSolid(this.segment(), value); return this; } + + /// {@return `depthBounds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthBounds(MemorySegment segment, long index) { return (int) VH_depthBounds.get(segment, 0L, index); } + /// {@return `depthBounds`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthBounds(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_depthBounds(segment, 0L); } + /// {@return `depthBounds` at the given index} + /// @param index the index + public @CType("VkBool32") int depthBoundsAt(long index) { return VkPhysicalDeviceFeatures.get_depthBounds(this.segment(), index); } + /// {@return `depthBounds`} + public @CType("VkBool32") int depthBounds() { return VkPhysicalDeviceFeatures.get_depthBounds(this.segment()); } + /// Sets `depthBounds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBounds(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthBounds.set(segment, 0L, index, value); } + /// Sets `depthBounds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBounds(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_depthBounds(segment, 0L, value); } + /// Sets `depthBounds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures depthBoundsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_depthBounds(this.segment(), index, value); return this; } + /// Sets `depthBounds` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures depthBounds(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_depthBounds(this.segment(), value); return this; } + + /// {@return `wideLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_wideLines(MemorySegment segment, long index) { return (int) VH_wideLines.get(segment, 0L, index); } + /// {@return `wideLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_wideLines(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_wideLines(segment, 0L); } + /// {@return `wideLines` at the given index} + /// @param index the index + public @CType("VkBool32") int wideLinesAt(long index) { return VkPhysicalDeviceFeatures.get_wideLines(this.segment(), index); } + /// {@return `wideLines`} + public @CType("VkBool32") int wideLines() { return VkPhysicalDeviceFeatures.get_wideLines(this.segment()); } + /// Sets `wideLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_wideLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_wideLines.set(segment, 0L, index, value); } + /// Sets `wideLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_wideLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_wideLines(segment, 0L, value); } + /// Sets `wideLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures wideLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_wideLines(this.segment(), index, value); return this; } + /// Sets `wideLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures wideLines(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_wideLines(this.segment(), value); return this; } + + /// {@return `largePoints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_largePoints(MemorySegment segment, long index) { return (int) VH_largePoints.get(segment, 0L, index); } + /// {@return `largePoints`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_largePoints(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_largePoints(segment, 0L); } + /// {@return `largePoints` at the given index} + /// @param index the index + public @CType("VkBool32") int largePointsAt(long index) { return VkPhysicalDeviceFeatures.get_largePoints(this.segment(), index); } + /// {@return `largePoints`} + public @CType("VkBool32") int largePoints() { return VkPhysicalDeviceFeatures.get_largePoints(this.segment()); } + /// Sets `largePoints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_largePoints(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_largePoints.set(segment, 0L, index, value); } + /// Sets `largePoints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_largePoints(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_largePoints(segment, 0L, value); } + /// Sets `largePoints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures largePointsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_largePoints(this.segment(), index, value); return this; } + /// Sets `largePoints` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures largePoints(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_largePoints(this.segment(), value); return this; } + + /// {@return `alphaToOne` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_alphaToOne(MemorySegment segment, long index) { return (int) VH_alphaToOne.get(segment, 0L, index); } + /// {@return `alphaToOne`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_alphaToOne(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_alphaToOne(segment, 0L); } + /// {@return `alphaToOne` at the given index} + /// @param index the index + public @CType("VkBool32") int alphaToOneAt(long index) { return VkPhysicalDeviceFeatures.get_alphaToOne(this.segment(), index); } + /// {@return `alphaToOne`} + public @CType("VkBool32") int alphaToOne() { return VkPhysicalDeviceFeatures.get_alphaToOne(this.segment()); } + /// Sets `alphaToOne` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_alphaToOne(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_alphaToOne.set(segment, 0L, index, value); } + /// Sets `alphaToOne` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_alphaToOne(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_alphaToOne(segment, 0L, value); } + /// Sets `alphaToOne` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures alphaToOneAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_alphaToOne(this.segment(), index, value); return this; } + /// Sets `alphaToOne` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures alphaToOne(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_alphaToOne(this.segment(), value); return this; } + + /// {@return `multiViewport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiViewport(MemorySegment segment, long index) { return (int) VH_multiViewport.get(segment, 0L, index); } + /// {@return `multiViewport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiViewport(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_multiViewport(segment, 0L); } + /// {@return `multiViewport` at the given index} + /// @param index the index + public @CType("VkBool32") int multiViewportAt(long index) { return VkPhysicalDeviceFeatures.get_multiViewport(this.segment(), index); } + /// {@return `multiViewport`} + public @CType("VkBool32") int multiViewport() { return VkPhysicalDeviceFeatures.get_multiViewport(this.segment()); } + /// Sets `multiViewport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiViewport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiViewport.set(segment, 0L, index, value); } + /// Sets `multiViewport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiViewport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_multiViewport(segment, 0L, value); } + /// Sets `multiViewport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures multiViewportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_multiViewport(this.segment(), index, value); return this; } + /// Sets `multiViewport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures multiViewport(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_multiViewport(this.segment(), value); return this; } + + /// {@return `samplerAnisotropy` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_samplerAnisotropy(MemorySegment segment, long index) { return (int) VH_samplerAnisotropy.get(segment, 0L, index); } + /// {@return `samplerAnisotropy`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_samplerAnisotropy(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_samplerAnisotropy(segment, 0L); } + /// {@return `samplerAnisotropy` at the given index} + /// @param index the index + public @CType("VkBool32") int samplerAnisotropyAt(long index) { return VkPhysicalDeviceFeatures.get_samplerAnisotropy(this.segment(), index); } + /// {@return `samplerAnisotropy`} + public @CType("VkBool32") int samplerAnisotropy() { return VkPhysicalDeviceFeatures.get_samplerAnisotropy(this.segment()); } + /// Sets `samplerAnisotropy` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerAnisotropy(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_samplerAnisotropy.set(segment, 0L, index, value); } + /// Sets `samplerAnisotropy` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerAnisotropy(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_samplerAnisotropy(segment, 0L, value); } + /// Sets `samplerAnisotropy` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures samplerAnisotropyAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_samplerAnisotropy(this.segment(), index, value); return this; } + /// Sets `samplerAnisotropy` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures samplerAnisotropy(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_samplerAnisotropy(this.segment(), value); return this; } + + /// {@return `textureCompressionETC2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_textureCompressionETC2(MemorySegment segment, long index) { return (int) VH_textureCompressionETC2.get(segment, 0L, index); } + /// {@return `textureCompressionETC2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_textureCompressionETC2(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_textureCompressionETC2(segment, 0L); } + /// {@return `textureCompressionETC2` at the given index} + /// @param index the index + public @CType("VkBool32") int textureCompressionETC2At(long index) { return VkPhysicalDeviceFeatures.get_textureCompressionETC2(this.segment(), index); } + /// {@return `textureCompressionETC2`} + public @CType("VkBool32") int textureCompressionETC2() { return VkPhysicalDeviceFeatures.get_textureCompressionETC2(this.segment()); } + /// Sets `textureCompressionETC2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_textureCompressionETC2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_textureCompressionETC2.set(segment, 0L, index, value); } + /// Sets `textureCompressionETC2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_textureCompressionETC2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_textureCompressionETC2(segment, 0L, value); } + /// Sets `textureCompressionETC2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures textureCompressionETC2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_textureCompressionETC2(this.segment(), index, value); return this; } + /// Sets `textureCompressionETC2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures textureCompressionETC2(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_textureCompressionETC2(this.segment(), value); return this; } + + /// {@return `textureCompressionASTC_LDR` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_textureCompressionASTC_LDR(MemorySegment segment, long index) { return (int) VH_textureCompressionASTC_LDR.get(segment, 0L, index); } + /// {@return `textureCompressionASTC_LDR`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_textureCompressionASTC_LDR(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_textureCompressionASTC_LDR(segment, 0L); } + /// {@return `textureCompressionASTC_LDR` at the given index} + /// @param index the index + public @CType("VkBool32") int textureCompressionASTC_LDRAt(long index) { return VkPhysicalDeviceFeatures.get_textureCompressionASTC_LDR(this.segment(), index); } + /// {@return `textureCompressionASTC_LDR`} + public @CType("VkBool32") int textureCompressionASTC_LDR() { return VkPhysicalDeviceFeatures.get_textureCompressionASTC_LDR(this.segment()); } + /// Sets `textureCompressionASTC_LDR` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_textureCompressionASTC_LDR(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_textureCompressionASTC_LDR.set(segment, 0L, index, value); } + /// Sets `textureCompressionASTC_LDR` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_textureCompressionASTC_LDR(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_textureCompressionASTC_LDR(segment, 0L, value); } + /// Sets `textureCompressionASTC_LDR` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures textureCompressionASTC_LDRAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_textureCompressionASTC_LDR(this.segment(), index, value); return this; } + /// Sets `textureCompressionASTC_LDR` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures textureCompressionASTC_LDR(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_textureCompressionASTC_LDR(this.segment(), value); return this; } + + /// {@return `textureCompressionBC` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_textureCompressionBC(MemorySegment segment, long index) { return (int) VH_textureCompressionBC.get(segment, 0L, index); } + /// {@return `textureCompressionBC`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_textureCompressionBC(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_textureCompressionBC(segment, 0L); } + /// {@return `textureCompressionBC` at the given index} + /// @param index the index + public @CType("VkBool32") int textureCompressionBCAt(long index) { return VkPhysicalDeviceFeatures.get_textureCompressionBC(this.segment(), index); } + /// {@return `textureCompressionBC`} + public @CType("VkBool32") int textureCompressionBC() { return VkPhysicalDeviceFeatures.get_textureCompressionBC(this.segment()); } + /// Sets `textureCompressionBC` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_textureCompressionBC(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_textureCompressionBC.set(segment, 0L, index, value); } + /// Sets `textureCompressionBC` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_textureCompressionBC(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_textureCompressionBC(segment, 0L, value); } + /// Sets `textureCompressionBC` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures textureCompressionBCAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_textureCompressionBC(this.segment(), index, value); return this; } + /// Sets `textureCompressionBC` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures textureCompressionBC(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_textureCompressionBC(this.segment(), value); return this; } + + /// {@return `occlusionQueryPrecise` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_occlusionQueryPrecise(MemorySegment segment, long index) { return (int) VH_occlusionQueryPrecise.get(segment, 0L, index); } + /// {@return `occlusionQueryPrecise`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_occlusionQueryPrecise(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_occlusionQueryPrecise(segment, 0L); } + /// {@return `occlusionQueryPrecise` at the given index} + /// @param index the index + public @CType("VkBool32") int occlusionQueryPreciseAt(long index) { return VkPhysicalDeviceFeatures.get_occlusionQueryPrecise(this.segment(), index); } + /// {@return `occlusionQueryPrecise`} + public @CType("VkBool32") int occlusionQueryPrecise() { return VkPhysicalDeviceFeatures.get_occlusionQueryPrecise(this.segment()); } + /// Sets `occlusionQueryPrecise` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_occlusionQueryPrecise(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_occlusionQueryPrecise.set(segment, 0L, index, value); } + /// Sets `occlusionQueryPrecise` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_occlusionQueryPrecise(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_occlusionQueryPrecise(segment, 0L, value); } + /// Sets `occlusionQueryPrecise` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures occlusionQueryPreciseAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_occlusionQueryPrecise(this.segment(), index, value); return this; } + /// Sets `occlusionQueryPrecise` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures occlusionQueryPrecise(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_occlusionQueryPrecise(this.segment(), value); return this; } + + /// {@return `pipelineStatisticsQuery` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineStatisticsQuery(MemorySegment segment, long index) { return (int) VH_pipelineStatisticsQuery.get(segment, 0L, index); } + /// {@return `pipelineStatisticsQuery`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineStatisticsQuery(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_pipelineStatisticsQuery(segment, 0L); } + /// {@return `pipelineStatisticsQuery` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineStatisticsQueryAt(long index) { return VkPhysicalDeviceFeatures.get_pipelineStatisticsQuery(this.segment(), index); } + /// {@return `pipelineStatisticsQuery`} + public @CType("VkBool32") int pipelineStatisticsQuery() { return VkPhysicalDeviceFeatures.get_pipelineStatisticsQuery(this.segment()); } + /// Sets `pipelineStatisticsQuery` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineStatisticsQuery(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineStatisticsQuery.set(segment, 0L, index, value); } + /// Sets `pipelineStatisticsQuery` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineStatisticsQuery(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_pipelineStatisticsQuery(segment, 0L, value); } + /// Sets `pipelineStatisticsQuery` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures pipelineStatisticsQueryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_pipelineStatisticsQuery(this.segment(), index, value); return this; } + /// Sets `pipelineStatisticsQuery` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures pipelineStatisticsQuery(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_pipelineStatisticsQuery(this.segment(), value); return this; } + + /// {@return `vertexPipelineStoresAndAtomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vertexPipelineStoresAndAtomics(MemorySegment segment, long index) { return (int) VH_vertexPipelineStoresAndAtomics.get(segment, 0L, index); } + /// {@return `vertexPipelineStoresAndAtomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vertexPipelineStoresAndAtomics(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_vertexPipelineStoresAndAtomics(segment, 0L); } + /// {@return `vertexPipelineStoresAndAtomics` at the given index} + /// @param index the index + public @CType("VkBool32") int vertexPipelineStoresAndAtomicsAt(long index) { return VkPhysicalDeviceFeatures.get_vertexPipelineStoresAndAtomics(this.segment(), index); } + /// {@return `vertexPipelineStoresAndAtomics`} + public @CType("VkBool32") int vertexPipelineStoresAndAtomics() { return VkPhysicalDeviceFeatures.get_vertexPipelineStoresAndAtomics(this.segment()); } + /// Sets `vertexPipelineStoresAndAtomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexPipelineStoresAndAtomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vertexPipelineStoresAndAtomics.set(segment, 0L, index, value); } + /// Sets `vertexPipelineStoresAndAtomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexPipelineStoresAndAtomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_vertexPipelineStoresAndAtomics(segment, 0L, value); } + /// Sets `vertexPipelineStoresAndAtomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures vertexPipelineStoresAndAtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_vertexPipelineStoresAndAtomics(this.segment(), index, value); return this; } + /// Sets `vertexPipelineStoresAndAtomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures vertexPipelineStoresAndAtomics(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_vertexPipelineStoresAndAtomics(this.segment(), value); return this; } + + /// {@return `fragmentStoresAndAtomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentStoresAndAtomics(MemorySegment segment, long index) { return (int) VH_fragmentStoresAndAtomics.get(segment, 0L, index); } + /// {@return `fragmentStoresAndAtomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentStoresAndAtomics(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_fragmentStoresAndAtomics(segment, 0L); } + /// {@return `fragmentStoresAndAtomics` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentStoresAndAtomicsAt(long index) { return VkPhysicalDeviceFeatures.get_fragmentStoresAndAtomics(this.segment(), index); } + /// {@return `fragmentStoresAndAtomics`} + public @CType("VkBool32") int fragmentStoresAndAtomics() { return VkPhysicalDeviceFeatures.get_fragmentStoresAndAtomics(this.segment()); } + /// Sets `fragmentStoresAndAtomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentStoresAndAtomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentStoresAndAtomics.set(segment, 0L, index, value); } + /// Sets `fragmentStoresAndAtomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentStoresAndAtomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_fragmentStoresAndAtomics(segment, 0L, value); } + /// Sets `fragmentStoresAndAtomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures fragmentStoresAndAtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_fragmentStoresAndAtomics(this.segment(), index, value); return this; } + /// Sets `fragmentStoresAndAtomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures fragmentStoresAndAtomics(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_fragmentStoresAndAtomics(this.segment(), value); return this; } + + /// {@return `shaderTessellationAndGeometryPointSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderTessellationAndGeometryPointSize(MemorySegment segment, long index) { return (int) VH_shaderTessellationAndGeometryPointSize.get(segment, 0L, index); } + /// {@return `shaderTessellationAndGeometryPointSize`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderTessellationAndGeometryPointSize(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderTessellationAndGeometryPointSize(segment, 0L); } + /// {@return `shaderTessellationAndGeometryPointSize` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderTessellationAndGeometryPointSizeAt(long index) { return VkPhysicalDeviceFeatures.get_shaderTessellationAndGeometryPointSize(this.segment(), index); } + /// {@return `shaderTessellationAndGeometryPointSize`} + public @CType("VkBool32") int shaderTessellationAndGeometryPointSize() { return VkPhysicalDeviceFeatures.get_shaderTessellationAndGeometryPointSize(this.segment()); } + /// Sets `shaderTessellationAndGeometryPointSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderTessellationAndGeometryPointSize(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderTessellationAndGeometryPointSize.set(segment, 0L, index, value); } + /// Sets `shaderTessellationAndGeometryPointSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderTessellationAndGeometryPointSize(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderTessellationAndGeometryPointSize(segment, 0L, value); } + /// Sets `shaderTessellationAndGeometryPointSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderTessellationAndGeometryPointSizeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderTessellationAndGeometryPointSize(this.segment(), index, value); return this; } + /// Sets `shaderTessellationAndGeometryPointSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderTessellationAndGeometryPointSize(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderTessellationAndGeometryPointSize(this.segment(), value); return this; } + + /// {@return `shaderImageGatherExtended` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderImageGatherExtended(MemorySegment segment, long index) { return (int) VH_shaderImageGatherExtended.get(segment, 0L, index); } + /// {@return `shaderImageGatherExtended`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderImageGatherExtended(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderImageGatherExtended(segment, 0L); } + /// {@return `shaderImageGatherExtended` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderImageGatherExtendedAt(long index) { return VkPhysicalDeviceFeatures.get_shaderImageGatherExtended(this.segment(), index); } + /// {@return `shaderImageGatherExtended`} + public @CType("VkBool32") int shaderImageGatherExtended() { return VkPhysicalDeviceFeatures.get_shaderImageGatherExtended(this.segment()); } + /// Sets `shaderImageGatherExtended` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderImageGatherExtended(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderImageGatherExtended.set(segment, 0L, index, value); } + /// Sets `shaderImageGatherExtended` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderImageGatherExtended(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderImageGatherExtended(segment, 0L, value); } + /// Sets `shaderImageGatherExtended` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderImageGatherExtendedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderImageGatherExtended(this.segment(), index, value); return this; } + /// Sets `shaderImageGatherExtended` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderImageGatherExtended(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderImageGatherExtended(this.segment(), value); return this; } + + /// {@return `shaderStorageImageExtendedFormats` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageImageExtendedFormats(MemorySegment segment, long index) { return (int) VH_shaderStorageImageExtendedFormats.get(segment, 0L, index); } + /// {@return `shaderStorageImageExtendedFormats`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageImageExtendedFormats(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderStorageImageExtendedFormats(segment, 0L); } + /// {@return `shaderStorageImageExtendedFormats` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageImageExtendedFormatsAt(long index) { return VkPhysicalDeviceFeatures.get_shaderStorageImageExtendedFormats(this.segment(), index); } + /// {@return `shaderStorageImageExtendedFormats`} + public @CType("VkBool32") int shaderStorageImageExtendedFormats() { return VkPhysicalDeviceFeatures.get_shaderStorageImageExtendedFormats(this.segment()); } + /// Sets `shaderStorageImageExtendedFormats` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageImageExtendedFormats(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageImageExtendedFormats.set(segment, 0L, index, value); } + /// Sets `shaderStorageImageExtendedFormats` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageImageExtendedFormats(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageExtendedFormats(segment, 0L, value); } + /// Sets `shaderStorageImageExtendedFormats` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageImageExtendedFormatsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageExtendedFormats(this.segment(), index, value); return this; } + /// Sets `shaderStorageImageExtendedFormats` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageImageExtendedFormats(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageExtendedFormats(this.segment(), value); return this; } + + /// {@return `shaderStorageImageMultisample` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageImageMultisample(MemorySegment segment, long index) { return (int) VH_shaderStorageImageMultisample.get(segment, 0L, index); } + /// {@return `shaderStorageImageMultisample`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageImageMultisample(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderStorageImageMultisample(segment, 0L); } + /// {@return `shaderStorageImageMultisample` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageImageMultisampleAt(long index) { return VkPhysicalDeviceFeatures.get_shaderStorageImageMultisample(this.segment(), index); } + /// {@return `shaderStorageImageMultisample`} + public @CType("VkBool32") int shaderStorageImageMultisample() { return VkPhysicalDeviceFeatures.get_shaderStorageImageMultisample(this.segment()); } + /// Sets `shaderStorageImageMultisample` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageImageMultisample(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageImageMultisample.set(segment, 0L, index, value); } + /// Sets `shaderStorageImageMultisample` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageImageMultisample(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageMultisample(segment, 0L, value); } + /// Sets `shaderStorageImageMultisample` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageImageMultisampleAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageMultisample(this.segment(), index, value); return this; } + /// Sets `shaderStorageImageMultisample` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageImageMultisample(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageMultisample(this.segment(), value); return this; } + + /// {@return `shaderStorageImageReadWithoutFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageImageReadWithoutFormat(MemorySegment segment, long index) { return (int) VH_shaderStorageImageReadWithoutFormat.get(segment, 0L, index); } + /// {@return `shaderStorageImageReadWithoutFormat`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageImageReadWithoutFormat(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderStorageImageReadWithoutFormat(segment, 0L); } + /// {@return `shaderStorageImageReadWithoutFormat` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageImageReadWithoutFormatAt(long index) { return VkPhysicalDeviceFeatures.get_shaderStorageImageReadWithoutFormat(this.segment(), index); } + /// {@return `shaderStorageImageReadWithoutFormat`} + public @CType("VkBool32") int shaderStorageImageReadWithoutFormat() { return VkPhysicalDeviceFeatures.get_shaderStorageImageReadWithoutFormat(this.segment()); } + /// Sets `shaderStorageImageReadWithoutFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageImageReadWithoutFormat(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageImageReadWithoutFormat.set(segment, 0L, index, value); } + /// Sets `shaderStorageImageReadWithoutFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageImageReadWithoutFormat(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageReadWithoutFormat(segment, 0L, value); } + /// Sets `shaderStorageImageReadWithoutFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageImageReadWithoutFormatAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageReadWithoutFormat(this.segment(), index, value); return this; } + /// Sets `shaderStorageImageReadWithoutFormat` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageImageReadWithoutFormat(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageReadWithoutFormat(this.segment(), value); return this; } + + /// {@return `shaderStorageImageWriteWithoutFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageImageWriteWithoutFormat(MemorySegment segment, long index) { return (int) VH_shaderStorageImageWriteWithoutFormat.get(segment, 0L, index); } + /// {@return `shaderStorageImageWriteWithoutFormat`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageImageWriteWithoutFormat(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderStorageImageWriteWithoutFormat(segment, 0L); } + /// {@return `shaderStorageImageWriteWithoutFormat` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageImageWriteWithoutFormatAt(long index) { return VkPhysicalDeviceFeatures.get_shaderStorageImageWriteWithoutFormat(this.segment(), index); } + /// {@return `shaderStorageImageWriteWithoutFormat`} + public @CType("VkBool32") int shaderStorageImageWriteWithoutFormat() { return VkPhysicalDeviceFeatures.get_shaderStorageImageWriteWithoutFormat(this.segment()); } + /// Sets `shaderStorageImageWriteWithoutFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageImageWriteWithoutFormat(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageImageWriteWithoutFormat.set(segment, 0L, index, value); } + /// Sets `shaderStorageImageWriteWithoutFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageImageWriteWithoutFormat(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageWriteWithoutFormat(segment, 0L, value); } + /// Sets `shaderStorageImageWriteWithoutFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageImageWriteWithoutFormatAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageWriteWithoutFormat(this.segment(), index, value); return this; } + /// Sets `shaderStorageImageWriteWithoutFormat` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageImageWriteWithoutFormat(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageWriteWithoutFormat(this.segment(), value); return this; } + + /// {@return `shaderUniformBufferArrayDynamicIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderUniformBufferArrayDynamicIndexing(MemorySegment segment, long index) { return (int) VH_shaderUniformBufferArrayDynamicIndexing.get(segment, 0L, index); } + /// {@return `shaderUniformBufferArrayDynamicIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderUniformBufferArrayDynamicIndexing(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderUniformBufferArrayDynamicIndexing(segment, 0L); } + /// {@return `shaderUniformBufferArrayDynamicIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderUniformBufferArrayDynamicIndexingAt(long index) { return VkPhysicalDeviceFeatures.get_shaderUniformBufferArrayDynamicIndexing(this.segment(), index); } + /// {@return `shaderUniformBufferArrayDynamicIndexing`} + public @CType("VkBool32") int shaderUniformBufferArrayDynamicIndexing() { return VkPhysicalDeviceFeatures.get_shaderUniformBufferArrayDynamicIndexing(this.segment()); } + /// Sets `shaderUniformBufferArrayDynamicIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderUniformBufferArrayDynamicIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderUniformBufferArrayDynamicIndexing.set(segment, 0L, index, value); } + /// Sets `shaderUniformBufferArrayDynamicIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderUniformBufferArrayDynamicIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderUniformBufferArrayDynamicIndexing(segment, 0L, value); } + /// Sets `shaderUniformBufferArrayDynamicIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderUniformBufferArrayDynamicIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderUniformBufferArrayDynamicIndexing(this.segment(), index, value); return this; } + /// Sets `shaderUniformBufferArrayDynamicIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderUniformBufferArrayDynamicIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderUniformBufferArrayDynamicIndexing(this.segment(), value); return this; } + + /// {@return `shaderSampledImageArrayDynamicIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSampledImageArrayDynamicIndexing(MemorySegment segment, long index) { return (int) VH_shaderSampledImageArrayDynamicIndexing.get(segment, 0L, index); } + /// {@return `shaderSampledImageArrayDynamicIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSampledImageArrayDynamicIndexing(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderSampledImageArrayDynamicIndexing(segment, 0L); } + /// {@return `shaderSampledImageArrayDynamicIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSampledImageArrayDynamicIndexingAt(long index) { return VkPhysicalDeviceFeatures.get_shaderSampledImageArrayDynamicIndexing(this.segment(), index); } + /// {@return `shaderSampledImageArrayDynamicIndexing`} + public @CType("VkBool32") int shaderSampledImageArrayDynamicIndexing() { return VkPhysicalDeviceFeatures.get_shaderSampledImageArrayDynamicIndexing(this.segment()); } + /// Sets `shaderSampledImageArrayDynamicIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSampledImageArrayDynamicIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSampledImageArrayDynamicIndexing.set(segment, 0L, index, value); } + /// Sets `shaderSampledImageArrayDynamicIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSampledImageArrayDynamicIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderSampledImageArrayDynamicIndexing(segment, 0L, value); } + /// Sets `shaderSampledImageArrayDynamicIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderSampledImageArrayDynamicIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderSampledImageArrayDynamicIndexing(this.segment(), index, value); return this; } + /// Sets `shaderSampledImageArrayDynamicIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderSampledImageArrayDynamicIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderSampledImageArrayDynamicIndexing(this.segment(), value); return this; } + + /// {@return `shaderStorageBufferArrayDynamicIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageBufferArrayDynamicIndexing(MemorySegment segment, long index) { return (int) VH_shaderStorageBufferArrayDynamicIndexing.get(segment, 0L, index); } + /// {@return `shaderStorageBufferArrayDynamicIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageBufferArrayDynamicIndexing(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderStorageBufferArrayDynamicIndexing(segment, 0L); } + /// {@return `shaderStorageBufferArrayDynamicIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageBufferArrayDynamicIndexingAt(long index) { return VkPhysicalDeviceFeatures.get_shaderStorageBufferArrayDynamicIndexing(this.segment(), index); } + /// {@return `shaderStorageBufferArrayDynamicIndexing`} + public @CType("VkBool32") int shaderStorageBufferArrayDynamicIndexing() { return VkPhysicalDeviceFeatures.get_shaderStorageBufferArrayDynamicIndexing(this.segment()); } + /// Sets `shaderStorageBufferArrayDynamicIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageBufferArrayDynamicIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageBufferArrayDynamicIndexing.set(segment, 0L, index, value); } + /// Sets `shaderStorageBufferArrayDynamicIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageBufferArrayDynamicIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageBufferArrayDynamicIndexing(segment, 0L, value); } + /// Sets `shaderStorageBufferArrayDynamicIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageBufferArrayDynamicIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageBufferArrayDynamicIndexing(this.segment(), index, value); return this; } + /// Sets `shaderStorageBufferArrayDynamicIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageBufferArrayDynamicIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageBufferArrayDynamicIndexing(this.segment(), value); return this; } + + /// {@return `shaderStorageImageArrayDynamicIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageImageArrayDynamicIndexing(MemorySegment segment, long index) { return (int) VH_shaderStorageImageArrayDynamicIndexing.get(segment, 0L, index); } + /// {@return `shaderStorageImageArrayDynamicIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageImageArrayDynamicIndexing(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderStorageImageArrayDynamicIndexing(segment, 0L); } + /// {@return `shaderStorageImageArrayDynamicIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageImageArrayDynamicIndexingAt(long index) { return VkPhysicalDeviceFeatures.get_shaderStorageImageArrayDynamicIndexing(this.segment(), index); } + /// {@return `shaderStorageImageArrayDynamicIndexing`} + public @CType("VkBool32") int shaderStorageImageArrayDynamicIndexing() { return VkPhysicalDeviceFeatures.get_shaderStorageImageArrayDynamicIndexing(this.segment()); } + /// Sets `shaderStorageImageArrayDynamicIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageImageArrayDynamicIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageImageArrayDynamicIndexing.set(segment, 0L, index, value); } + /// Sets `shaderStorageImageArrayDynamicIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageImageArrayDynamicIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageArrayDynamicIndexing(segment, 0L, value); } + /// Sets `shaderStorageImageArrayDynamicIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageImageArrayDynamicIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageArrayDynamicIndexing(this.segment(), index, value); return this; } + /// Sets `shaderStorageImageArrayDynamicIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderStorageImageArrayDynamicIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderStorageImageArrayDynamicIndexing(this.segment(), value); return this; } + + /// {@return `shaderClipDistance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderClipDistance(MemorySegment segment, long index) { return (int) VH_shaderClipDistance.get(segment, 0L, index); } + /// {@return `shaderClipDistance`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderClipDistance(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderClipDistance(segment, 0L); } + /// {@return `shaderClipDistance` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderClipDistanceAt(long index) { return VkPhysicalDeviceFeatures.get_shaderClipDistance(this.segment(), index); } + /// {@return `shaderClipDistance`} + public @CType("VkBool32") int shaderClipDistance() { return VkPhysicalDeviceFeatures.get_shaderClipDistance(this.segment()); } + /// Sets `shaderClipDistance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderClipDistance(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderClipDistance.set(segment, 0L, index, value); } + /// Sets `shaderClipDistance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderClipDistance(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderClipDistance(segment, 0L, value); } + /// Sets `shaderClipDistance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderClipDistanceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderClipDistance(this.segment(), index, value); return this; } + /// Sets `shaderClipDistance` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderClipDistance(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderClipDistance(this.segment(), value); return this; } + + /// {@return `shaderCullDistance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderCullDistance(MemorySegment segment, long index) { return (int) VH_shaderCullDistance.get(segment, 0L, index); } + /// {@return `shaderCullDistance`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderCullDistance(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderCullDistance(segment, 0L); } + /// {@return `shaderCullDistance` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderCullDistanceAt(long index) { return VkPhysicalDeviceFeatures.get_shaderCullDistance(this.segment(), index); } + /// {@return `shaderCullDistance`} + public @CType("VkBool32") int shaderCullDistance() { return VkPhysicalDeviceFeatures.get_shaderCullDistance(this.segment()); } + /// Sets `shaderCullDistance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderCullDistance(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderCullDistance.set(segment, 0L, index, value); } + /// Sets `shaderCullDistance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderCullDistance(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderCullDistance(segment, 0L, value); } + /// Sets `shaderCullDistance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderCullDistanceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderCullDistance(this.segment(), index, value); return this; } + /// Sets `shaderCullDistance` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderCullDistance(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderCullDistance(this.segment(), value); return this; } + + /// {@return `shaderFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderFloat64(MemorySegment segment, long index) { return (int) VH_shaderFloat64.get(segment, 0L, index); } + /// {@return `shaderFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderFloat64(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderFloat64(segment, 0L); } + /// {@return `shaderFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderFloat64At(long index) { return VkPhysicalDeviceFeatures.get_shaderFloat64(this.segment(), index); } + /// {@return `shaderFloat64`} + public @CType("VkBool32") int shaderFloat64() { return VkPhysicalDeviceFeatures.get_shaderFloat64(this.segment()); } + /// Sets `shaderFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderFloat64.set(segment, 0L, index, value); } + /// Sets `shaderFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderFloat64(segment, 0L, value); } + /// Sets `shaderFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderFloat64(this.segment(), index, value); return this; } + /// Sets `shaderFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderFloat64(this.segment(), value); return this; } + + /// {@return `shaderInt64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderInt64(MemorySegment segment, long index) { return (int) VH_shaderInt64.get(segment, 0L, index); } + /// {@return `shaderInt64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderInt64(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderInt64(segment, 0L); } + /// {@return `shaderInt64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderInt64At(long index) { return VkPhysicalDeviceFeatures.get_shaderInt64(this.segment(), index); } + /// {@return `shaderInt64`} + public @CType("VkBool32") int shaderInt64() { return VkPhysicalDeviceFeatures.get_shaderInt64(this.segment()); } + /// Sets `shaderInt64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderInt64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderInt64.set(segment, 0L, index, value); } + /// Sets `shaderInt64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderInt64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderInt64(segment, 0L, value); } + /// Sets `shaderInt64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderInt64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderInt64(this.segment(), index, value); return this; } + /// Sets `shaderInt64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderInt64(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderInt64(this.segment(), value); return this; } + + /// {@return `shaderInt16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderInt16(MemorySegment segment, long index) { return (int) VH_shaderInt16.get(segment, 0L, index); } + /// {@return `shaderInt16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderInt16(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderInt16(segment, 0L); } + /// {@return `shaderInt16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderInt16At(long index) { return VkPhysicalDeviceFeatures.get_shaderInt16(this.segment(), index); } + /// {@return `shaderInt16`} + public @CType("VkBool32") int shaderInt16() { return VkPhysicalDeviceFeatures.get_shaderInt16(this.segment()); } + /// Sets `shaderInt16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderInt16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderInt16.set(segment, 0L, index, value); } + /// Sets `shaderInt16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderInt16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderInt16(segment, 0L, value); } + /// Sets `shaderInt16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderInt16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderInt16(this.segment(), index, value); return this; } + /// Sets `shaderInt16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderInt16(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderInt16(this.segment(), value); return this; } + + /// {@return `shaderResourceResidency` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderResourceResidency(MemorySegment segment, long index) { return (int) VH_shaderResourceResidency.get(segment, 0L, index); } + /// {@return `shaderResourceResidency`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderResourceResidency(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderResourceResidency(segment, 0L); } + /// {@return `shaderResourceResidency` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderResourceResidencyAt(long index) { return VkPhysicalDeviceFeatures.get_shaderResourceResidency(this.segment(), index); } + /// {@return `shaderResourceResidency`} + public @CType("VkBool32") int shaderResourceResidency() { return VkPhysicalDeviceFeatures.get_shaderResourceResidency(this.segment()); } + /// Sets `shaderResourceResidency` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderResourceResidency(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderResourceResidency.set(segment, 0L, index, value); } + /// Sets `shaderResourceResidency` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderResourceResidency(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderResourceResidency(segment, 0L, value); } + /// Sets `shaderResourceResidency` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderResourceResidencyAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderResourceResidency(this.segment(), index, value); return this; } + /// Sets `shaderResourceResidency` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderResourceResidency(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderResourceResidency(this.segment(), value); return this; } + + /// {@return `shaderResourceMinLod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderResourceMinLod(MemorySegment segment, long index) { return (int) VH_shaderResourceMinLod.get(segment, 0L, index); } + /// {@return `shaderResourceMinLod`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderResourceMinLod(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_shaderResourceMinLod(segment, 0L); } + /// {@return `shaderResourceMinLod` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderResourceMinLodAt(long index) { return VkPhysicalDeviceFeatures.get_shaderResourceMinLod(this.segment(), index); } + /// {@return `shaderResourceMinLod`} + public @CType("VkBool32") int shaderResourceMinLod() { return VkPhysicalDeviceFeatures.get_shaderResourceMinLod(this.segment()); } + /// Sets `shaderResourceMinLod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderResourceMinLod(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderResourceMinLod.set(segment, 0L, index, value); } + /// Sets `shaderResourceMinLod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderResourceMinLod(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderResourceMinLod(segment, 0L, value); } + /// Sets `shaderResourceMinLod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderResourceMinLodAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderResourceMinLod(this.segment(), index, value); return this; } + /// Sets `shaderResourceMinLod` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures shaderResourceMinLod(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_shaderResourceMinLod(this.segment(), value); return this; } + + /// {@return `sparseBinding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseBinding(MemorySegment segment, long index) { return (int) VH_sparseBinding.get(segment, 0L, index); } + /// {@return `sparseBinding`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseBinding(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_sparseBinding(segment, 0L); } + /// {@return `sparseBinding` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseBindingAt(long index) { return VkPhysicalDeviceFeatures.get_sparseBinding(this.segment(), index); } + /// {@return `sparseBinding`} + public @CType("VkBool32") int sparseBinding() { return VkPhysicalDeviceFeatures.get_sparseBinding(this.segment()); } + /// Sets `sparseBinding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseBinding(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseBinding.set(segment, 0L, index, value); } + /// Sets `sparseBinding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseBinding(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseBinding(segment, 0L, value); } + /// Sets `sparseBinding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseBindingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseBinding(this.segment(), index, value); return this; } + /// Sets `sparseBinding` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseBinding(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseBinding(this.segment(), value); return this; } + + /// {@return `sparseResidencyBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseResidencyBuffer(MemorySegment segment, long index) { return (int) VH_sparseResidencyBuffer.get(segment, 0L, index); } + /// {@return `sparseResidencyBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseResidencyBuffer(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_sparseResidencyBuffer(segment, 0L); } + /// {@return `sparseResidencyBuffer` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseResidencyBufferAt(long index) { return VkPhysicalDeviceFeatures.get_sparseResidencyBuffer(this.segment(), index); } + /// {@return `sparseResidencyBuffer`} + public @CType("VkBool32") int sparseResidencyBuffer() { return VkPhysicalDeviceFeatures.get_sparseResidencyBuffer(this.segment()); } + /// Sets `sparseResidencyBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseResidencyBuffer(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseResidencyBuffer.set(segment, 0L, index, value); } + /// Sets `sparseResidencyBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseResidencyBuffer(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyBuffer(segment, 0L, value); } + /// Sets `sparseResidencyBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidencyBufferAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyBuffer(this.segment(), index, value); return this; } + /// Sets `sparseResidencyBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidencyBuffer(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyBuffer(this.segment(), value); return this; } + + /// {@return `sparseResidencyImage2D` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseResidencyImage2D(MemorySegment segment, long index) { return (int) VH_sparseResidencyImage2D.get(segment, 0L, index); } + /// {@return `sparseResidencyImage2D`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseResidencyImage2D(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_sparseResidencyImage2D(segment, 0L); } + /// {@return `sparseResidencyImage2D` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseResidencyImage2DAt(long index) { return VkPhysicalDeviceFeatures.get_sparseResidencyImage2D(this.segment(), index); } + /// {@return `sparseResidencyImage2D`} + public @CType("VkBool32") int sparseResidencyImage2D() { return VkPhysicalDeviceFeatures.get_sparseResidencyImage2D(this.segment()); } + /// Sets `sparseResidencyImage2D` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseResidencyImage2D(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseResidencyImage2D.set(segment, 0L, index, value); } + /// Sets `sparseResidencyImage2D` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseResidencyImage2D(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyImage2D(segment, 0L, value); } + /// Sets `sparseResidencyImage2D` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidencyImage2DAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyImage2D(this.segment(), index, value); return this; } + /// Sets `sparseResidencyImage2D` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidencyImage2D(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyImage2D(this.segment(), value); return this; } + + /// {@return `sparseResidencyImage3D` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseResidencyImage3D(MemorySegment segment, long index) { return (int) VH_sparseResidencyImage3D.get(segment, 0L, index); } + /// {@return `sparseResidencyImage3D`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseResidencyImage3D(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_sparseResidencyImage3D(segment, 0L); } + /// {@return `sparseResidencyImage3D` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseResidencyImage3DAt(long index) { return VkPhysicalDeviceFeatures.get_sparseResidencyImage3D(this.segment(), index); } + /// {@return `sparseResidencyImage3D`} + public @CType("VkBool32") int sparseResidencyImage3D() { return VkPhysicalDeviceFeatures.get_sparseResidencyImage3D(this.segment()); } + /// Sets `sparseResidencyImage3D` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseResidencyImage3D(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseResidencyImage3D.set(segment, 0L, index, value); } + /// Sets `sparseResidencyImage3D` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseResidencyImage3D(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyImage3D(segment, 0L, value); } + /// Sets `sparseResidencyImage3D` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidencyImage3DAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyImage3D(this.segment(), index, value); return this; } + /// Sets `sparseResidencyImage3D` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidencyImage3D(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyImage3D(this.segment(), value); return this; } + + /// {@return `sparseResidency2Samples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseResidency2Samples(MemorySegment segment, long index) { return (int) VH_sparseResidency2Samples.get(segment, 0L, index); } + /// {@return `sparseResidency2Samples`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseResidency2Samples(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_sparseResidency2Samples(segment, 0L); } + /// {@return `sparseResidency2Samples` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseResidency2SamplesAt(long index) { return VkPhysicalDeviceFeatures.get_sparseResidency2Samples(this.segment(), index); } + /// {@return `sparseResidency2Samples`} + public @CType("VkBool32") int sparseResidency2Samples() { return VkPhysicalDeviceFeatures.get_sparseResidency2Samples(this.segment()); } + /// Sets `sparseResidency2Samples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseResidency2Samples(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseResidency2Samples.set(segment, 0L, index, value); } + /// Sets `sparseResidency2Samples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseResidency2Samples(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency2Samples(segment, 0L, value); } + /// Sets `sparseResidency2Samples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidency2SamplesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency2Samples(this.segment(), index, value); return this; } + /// Sets `sparseResidency2Samples` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidency2Samples(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency2Samples(this.segment(), value); return this; } + + /// {@return `sparseResidency4Samples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseResidency4Samples(MemorySegment segment, long index) { return (int) VH_sparseResidency4Samples.get(segment, 0L, index); } + /// {@return `sparseResidency4Samples`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseResidency4Samples(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_sparseResidency4Samples(segment, 0L); } + /// {@return `sparseResidency4Samples` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseResidency4SamplesAt(long index) { return VkPhysicalDeviceFeatures.get_sparseResidency4Samples(this.segment(), index); } + /// {@return `sparseResidency4Samples`} + public @CType("VkBool32") int sparseResidency4Samples() { return VkPhysicalDeviceFeatures.get_sparseResidency4Samples(this.segment()); } + /// Sets `sparseResidency4Samples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseResidency4Samples(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseResidency4Samples.set(segment, 0L, index, value); } + /// Sets `sparseResidency4Samples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseResidency4Samples(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency4Samples(segment, 0L, value); } + /// Sets `sparseResidency4Samples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidency4SamplesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency4Samples(this.segment(), index, value); return this; } + /// Sets `sparseResidency4Samples` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidency4Samples(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency4Samples(this.segment(), value); return this; } + + /// {@return `sparseResidency8Samples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseResidency8Samples(MemorySegment segment, long index) { return (int) VH_sparseResidency8Samples.get(segment, 0L, index); } + /// {@return `sparseResidency8Samples`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseResidency8Samples(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_sparseResidency8Samples(segment, 0L); } + /// {@return `sparseResidency8Samples` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseResidency8SamplesAt(long index) { return VkPhysicalDeviceFeatures.get_sparseResidency8Samples(this.segment(), index); } + /// {@return `sparseResidency8Samples`} + public @CType("VkBool32") int sparseResidency8Samples() { return VkPhysicalDeviceFeatures.get_sparseResidency8Samples(this.segment()); } + /// Sets `sparseResidency8Samples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseResidency8Samples(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseResidency8Samples.set(segment, 0L, index, value); } + /// Sets `sparseResidency8Samples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseResidency8Samples(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency8Samples(segment, 0L, value); } + /// Sets `sparseResidency8Samples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidency8SamplesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency8Samples(this.segment(), index, value); return this; } + /// Sets `sparseResidency8Samples` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidency8Samples(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency8Samples(this.segment(), value); return this; } + + /// {@return `sparseResidency16Samples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseResidency16Samples(MemorySegment segment, long index) { return (int) VH_sparseResidency16Samples.get(segment, 0L, index); } + /// {@return `sparseResidency16Samples`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseResidency16Samples(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_sparseResidency16Samples(segment, 0L); } + /// {@return `sparseResidency16Samples` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseResidency16SamplesAt(long index) { return VkPhysicalDeviceFeatures.get_sparseResidency16Samples(this.segment(), index); } + /// {@return `sparseResidency16Samples`} + public @CType("VkBool32") int sparseResidency16Samples() { return VkPhysicalDeviceFeatures.get_sparseResidency16Samples(this.segment()); } + /// Sets `sparseResidency16Samples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseResidency16Samples(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseResidency16Samples.set(segment, 0L, index, value); } + /// Sets `sparseResidency16Samples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseResidency16Samples(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency16Samples(segment, 0L, value); } + /// Sets `sparseResidency16Samples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidency16SamplesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency16Samples(this.segment(), index, value); return this; } + /// Sets `sparseResidency16Samples` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidency16Samples(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidency16Samples(this.segment(), value); return this; } + + /// {@return `sparseResidencyAliased` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sparseResidencyAliased(MemorySegment segment, long index) { return (int) VH_sparseResidencyAliased.get(segment, 0L, index); } + /// {@return `sparseResidencyAliased`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sparseResidencyAliased(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_sparseResidencyAliased(segment, 0L); } + /// {@return `sparseResidencyAliased` at the given index} + /// @param index the index + public @CType("VkBool32") int sparseResidencyAliasedAt(long index) { return VkPhysicalDeviceFeatures.get_sparseResidencyAliased(this.segment(), index); } + /// {@return `sparseResidencyAliased`} + public @CType("VkBool32") int sparseResidencyAliased() { return VkPhysicalDeviceFeatures.get_sparseResidencyAliased(this.segment()); } + /// Sets `sparseResidencyAliased` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseResidencyAliased(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sparseResidencyAliased.set(segment, 0L, index, value); } + /// Sets `sparseResidencyAliased` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseResidencyAliased(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyAliased(segment, 0L, value); } + /// Sets `sparseResidencyAliased` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidencyAliasedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyAliased(this.segment(), index, value); return this; } + /// Sets `sparseResidencyAliased` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures sparseResidencyAliased(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_sparseResidencyAliased(this.segment(), value); return this; } + + /// {@return `variableMultisampleRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_variableMultisampleRate(MemorySegment segment, long index) { return (int) VH_variableMultisampleRate.get(segment, 0L, index); } + /// {@return `variableMultisampleRate`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_variableMultisampleRate(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_variableMultisampleRate(segment, 0L); } + /// {@return `variableMultisampleRate` at the given index} + /// @param index the index + public @CType("VkBool32") int variableMultisampleRateAt(long index) { return VkPhysicalDeviceFeatures.get_variableMultisampleRate(this.segment(), index); } + /// {@return `variableMultisampleRate`} + public @CType("VkBool32") int variableMultisampleRate() { return VkPhysicalDeviceFeatures.get_variableMultisampleRate(this.segment()); } + /// Sets `variableMultisampleRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_variableMultisampleRate(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_variableMultisampleRate.set(segment, 0L, index, value); } + /// Sets `variableMultisampleRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_variableMultisampleRate(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_variableMultisampleRate(segment, 0L, value); } + /// Sets `variableMultisampleRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures variableMultisampleRateAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_variableMultisampleRate(this.segment(), index, value); return this; } + /// Sets `variableMultisampleRate` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures variableMultisampleRate(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_variableMultisampleRate(this.segment(), value); return this; } + + /// {@return `inheritedQueries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_inheritedQueries(MemorySegment segment, long index) { return (int) VH_inheritedQueries.get(segment, 0L, index); } + /// {@return `inheritedQueries`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_inheritedQueries(MemorySegment segment) { return VkPhysicalDeviceFeatures.get_inheritedQueries(segment, 0L); } + /// {@return `inheritedQueries` at the given index} + /// @param index the index + public @CType("VkBool32") int inheritedQueriesAt(long index) { return VkPhysicalDeviceFeatures.get_inheritedQueries(this.segment(), index); } + /// {@return `inheritedQueries`} + public @CType("VkBool32") int inheritedQueries() { return VkPhysicalDeviceFeatures.get_inheritedQueries(this.segment()); } + /// Sets `inheritedQueries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inheritedQueries(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_inheritedQueries.set(segment, 0L, index, value); } + /// Sets `inheritedQueries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inheritedQueries(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_inheritedQueries(segment, 0L, value); } + /// Sets `inheritedQueries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures inheritedQueriesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_inheritedQueries(this.segment(), index, value); return this; } + /// Sets `inheritedQueries` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures inheritedQueries(@CType("VkBool32") int value) { VkPhysicalDeviceFeatures.set_inheritedQueries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceFeatures2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceFeatures2.java new file mode 100644 index 00000000..11756a1d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceFeatures2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### features +/// [Byte offset][#OFFSET_features] - [Memory layout][#ML_features] - [Getter][#features()] - [Setter][#features(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFeatures2 { +/// VkStructureType sType; +/// void * pNext; +/// VkPhysicalDeviceFeatures features; +/// } VkPhysicalDeviceFeatures2; +/// ``` +public final class VkPhysicalDeviceFeatures2 extends Struct { + /// The struct layout of `VkPhysicalDeviceFeatures2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkPhysicalDeviceFeatures.LAYOUT.withName("features") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `features`. + public static final long OFFSET_features = LAYOUT.byteOffset(PathElement.groupElement("features")); + /// The memory layout of `features`. + public static final MemoryLayout ML_features = LAYOUT.select(PathElement.groupElement("features")); + + /// Creates `VkPhysicalDeviceFeatures2` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFeatures2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFeatures2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFeatures2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFeatures2(segment); } + + /// Creates `VkPhysicalDeviceFeatures2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFeatures2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFeatures2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFeatures2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFeatures2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFeatures2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFeatures2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFeatures2` + public static VkPhysicalDeviceFeatures2 alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFeatures2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFeatures2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFeatures2` + public static VkPhysicalDeviceFeatures2 alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFeatures2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFeatures2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFeatures2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFeatures2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFeatures2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures2 sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFeatures2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures2 sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFeatures2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFeatures2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFeatures2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFeatures2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFeatures2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFeatures2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFeatures2.set_pNext(this.segment(), value); return this; } + + /// {@return `features` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPhysicalDeviceFeatures") java.lang.foreign.MemorySegment get_features(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_features, index), ML_features); } + /// {@return `features`} + /// @param segment the segment of the struct + public static @CType("VkPhysicalDeviceFeatures") java.lang.foreign.MemorySegment get_features(MemorySegment segment) { return VkPhysicalDeviceFeatures2.get_features(segment, 0L); } + /// {@return `features` at the given index} + /// @param index the index + public @CType("VkPhysicalDeviceFeatures") java.lang.foreign.MemorySegment featuresAt(long index) { return VkPhysicalDeviceFeatures2.get_features(this.segment(), index); } + /// {@return `features`} + public @CType("VkPhysicalDeviceFeatures") java.lang.foreign.MemorySegment features() { return VkPhysicalDeviceFeatures2.get_features(this.segment()); } + /// Sets `features` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_features(MemorySegment segment, long index, @CType("VkPhysicalDeviceFeatures") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_features, index), ML_features.byteSize()); } + /// Sets `features` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_features(MemorySegment segment, @CType("VkPhysicalDeviceFeatures") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFeatures2.set_features(segment, 0L, value); } + /// Sets `features` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures2 featuresAt(long index, @CType("VkPhysicalDeviceFeatures") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFeatures2.set_features(this.segment(), index, value); return this; } + /// Sets `features` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFeatures2 features(@CType("VkPhysicalDeviceFeatures") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFeatures2.set_features(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceFloatControlsProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceFloatControlsProperties.java new file mode 100644 index 00000000..fee33949 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceFloatControlsProperties.java @@ -0,0 +1,777 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### denormBehaviorIndependence +/// [VarHandle][#VH_denormBehaviorIndependence] - [Getter][#denormBehaviorIndependence()] - [Setter][#denormBehaviorIndependence(int)] +/// ### roundingModeIndependence +/// [VarHandle][#VH_roundingModeIndependence] - [Getter][#roundingModeIndependence()] - [Setter][#roundingModeIndependence(int)] +/// ### shaderSignedZeroInfNanPreserveFloat16 +/// [VarHandle][#VH_shaderSignedZeroInfNanPreserveFloat16] - [Getter][#shaderSignedZeroInfNanPreserveFloat16()] - [Setter][#shaderSignedZeroInfNanPreserveFloat16(int)] +/// ### shaderSignedZeroInfNanPreserveFloat32 +/// [VarHandle][#VH_shaderSignedZeroInfNanPreserveFloat32] - [Getter][#shaderSignedZeroInfNanPreserveFloat32()] - [Setter][#shaderSignedZeroInfNanPreserveFloat32(int)] +/// ### shaderSignedZeroInfNanPreserveFloat64 +/// [VarHandle][#VH_shaderSignedZeroInfNanPreserveFloat64] - [Getter][#shaderSignedZeroInfNanPreserveFloat64()] - [Setter][#shaderSignedZeroInfNanPreserveFloat64(int)] +/// ### shaderDenormPreserveFloat16 +/// [VarHandle][#VH_shaderDenormPreserveFloat16] - [Getter][#shaderDenormPreserveFloat16()] - [Setter][#shaderDenormPreserveFloat16(int)] +/// ### shaderDenormPreserveFloat32 +/// [VarHandle][#VH_shaderDenormPreserveFloat32] - [Getter][#shaderDenormPreserveFloat32()] - [Setter][#shaderDenormPreserveFloat32(int)] +/// ### shaderDenormPreserveFloat64 +/// [VarHandle][#VH_shaderDenormPreserveFloat64] - [Getter][#shaderDenormPreserveFloat64()] - [Setter][#shaderDenormPreserveFloat64(int)] +/// ### shaderDenormFlushToZeroFloat16 +/// [VarHandle][#VH_shaderDenormFlushToZeroFloat16] - [Getter][#shaderDenormFlushToZeroFloat16()] - [Setter][#shaderDenormFlushToZeroFloat16(int)] +/// ### shaderDenormFlushToZeroFloat32 +/// [VarHandle][#VH_shaderDenormFlushToZeroFloat32] - [Getter][#shaderDenormFlushToZeroFloat32()] - [Setter][#shaderDenormFlushToZeroFloat32(int)] +/// ### shaderDenormFlushToZeroFloat64 +/// [VarHandle][#VH_shaderDenormFlushToZeroFloat64] - [Getter][#shaderDenormFlushToZeroFloat64()] - [Setter][#shaderDenormFlushToZeroFloat64(int)] +/// ### shaderRoundingModeRTEFloat16 +/// [VarHandle][#VH_shaderRoundingModeRTEFloat16] - [Getter][#shaderRoundingModeRTEFloat16()] - [Setter][#shaderRoundingModeRTEFloat16(int)] +/// ### shaderRoundingModeRTEFloat32 +/// [VarHandle][#VH_shaderRoundingModeRTEFloat32] - [Getter][#shaderRoundingModeRTEFloat32()] - [Setter][#shaderRoundingModeRTEFloat32(int)] +/// ### shaderRoundingModeRTEFloat64 +/// [VarHandle][#VH_shaderRoundingModeRTEFloat64] - [Getter][#shaderRoundingModeRTEFloat64()] - [Setter][#shaderRoundingModeRTEFloat64(int)] +/// ### shaderRoundingModeRTZFloat16 +/// [VarHandle][#VH_shaderRoundingModeRTZFloat16] - [Getter][#shaderRoundingModeRTZFloat16()] - [Setter][#shaderRoundingModeRTZFloat16(int)] +/// ### shaderRoundingModeRTZFloat32 +/// [VarHandle][#VH_shaderRoundingModeRTZFloat32] - [Getter][#shaderRoundingModeRTZFloat32()] - [Setter][#shaderRoundingModeRTZFloat32(int)] +/// ### shaderRoundingModeRTZFloat64 +/// [VarHandle][#VH_shaderRoundingModeRTZFloat64] - [Getter][#shaderRoundingModeRTZFloat64()] - [Setter][#shaderRoundingModeRTZFloat64(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceFloatControlsProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkShaderFloatControlsIndependence denormBehaviorIndependence; +/// VkShaderFloatControlsIndependence roundingModeIndependence; +/// VkBool32 shaderSignedZeroInfNanPreserveFloat16; +/// VkBool32 shaderSignedZeroInfNanPreserveFloat32; +/// VkBool32 shaderSignedZeroInfNanPreserveFloat64; +/// VkBool32 shaderDenormPreserveFloat16; +/// VkBool32 shaderDenormPreserveFloat32; +/// VkBool32 shaderDenormPreserveFloat64; +/// VkBool32 shaderDenormFlushToZeroFloat16; +/// VkBool32 shaderDenormFlushToZeroFloat32; +/// VkBool32 shaderDenormFlushToZeroFloat64; +/// VkBool32 shaderRoundingModeRTEFloat16; +/// VkBool32 shaderRoundingModeRTEFloat32; +/// VkBool32 shaderRoundingModeRTEFloat64; +/// VkBool32 shaderRoundingModeRTZFloat16; +/// VkBool32 shaderRoundingModeRTZFloat32; +/// VkBool32 shaderRoundingModeRTZFloat64; +/// } VkPhysicalDeviceFloatControlsProperties; +/// ``` +public final class VkPhysicalDeviceFloatControlsProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceFloatControlsProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("denormBehaviorIndependence"), + ValueLayout.JAVA_INT.withName("roundingModeIndependence"), + ValueLayout.JAVA_INT.withName("shaderSignedZeroInfNanPreserveFloat16"), + ValueLayout.JAVA_INT.withName("shaderSignedZeroInfNanPreserveFloat32"), + ValueLayout.JAVA_INT.withName("shaderSignedZeroInfNanPreserveFloat64"), + ValueLayout.JAVA_INT.withName("shaderDenormPreserveFloat16"), + ValueLayout.JAVA_INT.withName("shaderDenormPreserveFloat32"), + ValueLayout.JAVA_INT.withName("shaderDenormPreserveFloat64"), + ValueLayout.JAVA_INT.withName("shaderDenormFlushToZeroFloat16"), + ValueLayout.JAVA_INT.withName("shaderDenormFlushToZeroFloat32"), + ValueLayout.JAVA_INT.withName("shaderDenormFlushToZeroFloat64"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTEFloat16"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTEFloat32"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTEFloat64"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTZFloat16"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTZFloat32"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTZFloat64") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `denormBehaviorIndependence` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_denormBehaviorIndependence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("denormBehaviorIndependence")); + /// The [VarHandle] of `roundingModeIndependence` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_roundingModeIndependence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("roundingModeIndependence")); + /// The [VarHandle] of `shaderSignedZeroInfNanPreserveFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSignedZeroInfNanPreserveFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSignedZeroInfNanPreserveFloat16")); + /// The [VarHandle] of `shaderSignedZeroInfNanPreserveFloat32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSignedZeroInfNanPreserveFloat32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSignedZeroInfNanPreserveFloat32")); + /// The [VarHandle] of `shaderSignedZeroInfNanPreserveFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSignedZeroInfNanPreserveFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSignedZeroInfNanPreserveFloat64")); + /// The [VarHandle] of `shaderDenormPreserveFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormPreserveFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormPreserveFloat16")); + /// The [VarHandle] of `shaderDenormPreserveFloat32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormPreserveFloat32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormPreserveFloat32")); + /// The [VarHandle] of `shaderDenormPreserveFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormPreserveFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormPreserveFloat64")); + /// The [VarHandle] of `shaderDenormFlushToZeroFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormFlushToZeroFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormFlushToZeroFloat16")); + /// The [VarHandle] of `shaderDenormFlushToZeroFloat32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormFlushToZeroFloat32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormFlushToZeroFloat32")); + /// The [VarHandle] of `shaderDenormFlushToZeroFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormFlushToZeroFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormFlushToZeroFloat64")); + /// The [VarHandle] of `shaderRoundingModeRTEFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTEFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTEFloat16")); + /// The [VarHandle] of `shaderRoundingModeRTEFloat32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTEFloat32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTEFloat32")); + /// The [VarHandle] of `shaderRoundingModeRTEFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTEFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTEFloat64")); + /// The [VarHandle] of `shaderRoundingModeRTZFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTZFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTZFloat16")); + /// The [VarHandle] of `shaderRoundingModeRTZFloat32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTZFloat32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTZFloat32")); + /// The [VarHandle] of `shaderRoundingModeRTZFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTZFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTZFloat64")); + + /// Creates `VkPhysicalDeviceFloatControlsProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceFloatControlsProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceFloatControlsProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFloatControlsProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFloatControlsProperties(segment); } + + /// Creates `VkPhysicalDeviceFloatControlsProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFloatControlsProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFloatControlsProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceFloatControlsProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceFloatControlsProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceFloatControlsProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceFloatControlsProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceFloatControlsProperties` + public static VkPhysicalDeviceFloatControlsProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceFloatControlsProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceFloatControlsProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceFloatControlsProperties` + public static VkPhysicalDeviceFloatControlsProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceFloatControlsProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceFloatControlsProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceFloatControlsProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceFloatControlsProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceFloatControlsProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceFloatControlsProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceFloatControlsProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceFloatControlsProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFloatControlsProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFloatControlsProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceFloatControlsProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `denormBehaviorIndependence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderFloatControlsIndependence") int get_denormBehaviorIndependence(MemorySegment segment, long index) { return (int) VH_denormBehaviorIndependence.get(segment, 0L, index); } + /// {@return `denormBehaviorIndependence`} + /// @param segment the segment of the struct + public static @CType("VkShaderFloatControlsIndependence") int get_denormBehaviorIndependence(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_denormBehaviorIndependence(segment, 0L); } + /// {@return `denormBehaviorIndependence` at the given index} + /// @param index the index + public @CType("VkShaderFloatControlsIndependence") int denormBehaviorIndependenceAt(long index) { return VkPhysicalDeviceFloatControlsProperties.get_denormBehaviorIndependence(this.segment(), index); } + /// {@return `denormBehaviorIndependence`} + public @CType("VkShaderFloatControlsIndependence") int denormBehaviorIndependence() { return VkPhysicalDeviceFloatControlsProperties.get_denormBehaviorIndependence(this.segment()); } + /// Sets `denormBehaviorIndependence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_denormBehaviorIndependence(MemorySegment segment, long index, @CType("VkShaderFloatControlsIndependence") int value) { VH_denormBehaviorIndependence.set(segment, 0L, index, value); } + /// Sets `denormBehaviorIndependence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_denormBehaviorIndependence(MemorySegment segment, @CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceFloatControlsProperties.set_denormBehaviorIndependence(segment, 0L, value); } + /// Sets `denormBehaviorIndependence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties denormBehaviorIndependenceAt(long index, @CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceFloatControlsProperties.set_denormBehaviorIndependence(this.segment(), index, value); return this; } + /// Sets `denormBehaviorIndependence` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties denormBehaviorIndependence(@CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceFloatControlsProperties.set_denormBehaviorIndependence(this.segment(), value); return this; } + + /// {@return `roundingModeIndependence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderFloatControlsIndependence") int get_roundingModeIndependence(MemorySegment segment, long index) { return (int) VH_roundingModeIndependence.get(segment, 0L, index); } + /// {@return `roundingModeIndependence`} + /// @param segment the segment of the struct + public static @CType("VkShaderFloatControlsIndependence") int get_roundingModeIndependence(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_roundingModeIndependence(segment, 0L); } + /// {@return `roundingModeIndependence` at the given index} + /// @param index the index + public @CType("VkShaderFloatControlsIndependence") int roundingModeIndependenceAt(long index) { return VkPhysicalDeviceFloatControlsProperties.get_roundingModeIndependence(this.segment(), index); } + /// {@return `roundingModeIndependence`} + public @CType("VkShaderFloatControlsIndependence") int roundingModeIndependence() { return VkPhysicalDeviceFloatControlsProperties.get_roundingModeIndependence(this.segment()); } + /// Sets `roundingModeIndependence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_roundingModeIndependence(MemorySegment segment, long index, @CType("VkShaderFloatControlsIndependence") int value) { VH_roundingModeIndependence.set(segment, 0L, index, value); } + /// Sets `roundingModeIndependence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_roundingModeIndependence(MemorySegment segment, @CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceFloatControlsProperties.set_roundingModeIndependence(segment, 0L, value); } + /// Sets `roundingModeIndependence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties roundingModeIndependenceAt(long index, @CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceFloatControlsProperties.set_roundingModeIndependence(this.segment(), index, value); return this; } + /// Sets `roundingModeIndependence` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties roundingModeIndependence(@CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceFloatControlsProperties.set_roundingModeIndependence(this.segment(), value); return this; } + + /// {@return `shaderSignedZeroInfNanPreserveFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat16(MemorySegment segment, long index) { return (int) VH_shaderSignedZeroInfNanPreserveFloat16.get(segment, 0L, index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat16(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderSignedZeroInfNanPreserveFloat16(segment, 0L); } + /// {@return `shaderSignedZeroInfNanPreserveFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat16At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderSignedZeroInfNanPreserveFloat16(this.segment(), index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat16`} + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat16() { return VkPhysicalDeviceFloatControlsProperties.get_shaderSignedZeroInfNanPreserveFloat16(this.segment()); } + /// Sets `shaderSignedZeroInfNanPreserveFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSignedZeroInfNanPreserveFloat16.set(segment, 0L, index, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderSignedZeroInfNanPreserveFloat16(segment, 0L, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderSignedZeroInfNanPreserveFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderSignedZeroInfNanPreserveFloat16(this.segment(), index, value); return this; } + /// Sets `shaderSignedZeroInfNanPreserveFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderSignedZeroInfNanPreserveFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderSignedZeroInfNanPreserveFloat16(this.segment(), value); return this; } + + /// {@return `shaderSignedZeroInfNanPreserveFloat32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat32(MemorySegment segment, long index) { return (int) VH_shaderSignedZeroInfNanPreserveFloat32.get(segment, 0L, index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat32(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderSignedZeroInfNanPreserveFloat32(segment, 0L); } + /// {@return `shaderSignedZeroInfNanPreserveFloat32` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat32At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderSignedZeroInfNanPreserveFloat32(this.segment(), index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat32`} + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat32() { return VkPhysicalDeviceFloatControlsProperties.get_shaderSignedZeroInfNanPreserveFloat32(this.segment()); } + /// Sets `shaderSignedZeroInfNanPreserveFloat32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSignedZeroInfNanPreserveFloat32.set(segment, 0L, index, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderSignedZeroInfNanPreserveFloat32(segment, 0L, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderSignedZeroInfNanPreserveFloat32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderSignedZeroInfNanPreserveFloat32(this.segment(), index, value); return this; } + /// Sets `shaderSignedZeroInfNanPreserveFloat32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderSignedZeroInfNanPreserveFloat32(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderSignedZeroInfNanPreserveFloat32(this.segment(), value); return this; } + + /// {@return `shaderSignedZeroInfNanPreserveFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat64(MemorySegment segment, long index) { return (int) VH_shaderSignedZeroInfNanPreserveFloat64.get(segment, 0L, index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat64(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderSignedZeroInfNanPreserveFloat64(segment, 0L); } + /// {@return `shaderSignedZeroInfNanPreserveFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat64At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderSignedZeroInfNanPreserveFloat64(this.segment(), index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat64`} + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat64() { return VkPhysicalDeviceFloatControlsProperties.get_shaderSignedZeroInfNanPreserveFloat64(this.segment()); } + /// Sets `shaderSignedZeroInfNanPreserveFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSignedZeroInfNanPreserveFloat64.set(segment, 0L, index, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderSignedZeroInfNanPreserveFloat64(segment, 0L, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderSignedZeroInfNanPreserveFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderSignedZeroInfNanPreserveFloat64(this.segment(), index, value); return this; } + /// Sets `shaderSignedZeroInfNanPreserveFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderSignedZeroInfNanPreserveFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderSignedZeroInfNanPreserveFloat64(this.segment(), value); return this; } + + /// {@return `shaderDenormPreserveFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormPreserveFloat16(MemorySegment segment, long index) { return (int) VH_shaderDenormPreserveFloat16.get(segment, 0L, index); } + /// {@return `shaderDenormPreserveFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormPreserveFloat16(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormPreserveFloat16(segment, 0L); } + /// {@return `shaderDenormPreserveFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormPreserveFloat16At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormPreserveFloat16(this.segment(), index); } + /// {@return `shaderDenormPreserveFloat16`} + public @CType("VkBool32") int shaderDenormPreserveFloat16() { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormPreserveFloat16(this.segment()); } + /// Sets `shaderDenormPreserveFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormPreserveFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormPreserveFloat16.set(segment, 0L, index, value); } + /// Sets `shaderDenormPreserveFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormPreserveFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormPreserveFloat16(segment, 0L, value); } + /// Sets `shaderDenormPreserveFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormPreserveFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormPreserveFloat16(this.segment(), index, value); return this; } + /// Sets `shaderDenormPreserveFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormPreserveFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormPreserveFloat16(this.segment(), value); return this; } + + /// {@return `shaderDenormPreserveFloat32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormPreserveFloat32(MemorySegment segment, long index) { return (int) VH_shaderDenormPreserveFloat32.get(segment, 0L, index); } + /// {@return `shaderDenormPreserveFloat32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormPreserveFloat32(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormPreserveFloat32(segment, 0L); } + /// {@return `shaderDenormPreserveFloat32` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormPreserveFloat32At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormPreserveFloat32(this.segment(), index); } + /// {@return `shaderDenormPreserveFloat32`} + public @CType("VkBool32") int shaderDenormPreserveFloat32() { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormPreserveFloat32(this.segment()); } + /// Sets `shaderDenormPreserveFloat32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormPreserveFloat32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormPreserveFloat32.set(segment, 0L, index, value); } + /// Sets `shaderDenormPreserveFloat32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormPreserveFloat32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormPreserveFloat32(segment, 0L, value); } + /// Sets `shaderDenormPreserveFloat32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormPreserveFloat32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormPreserveFloat32(this.segment(), index, value); return this; } + /// Sets `shaderDenormPreserveFloat32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormPreserveFloat32(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormPreserveFloat32(this.segment(), value); return this; } + + /// {@return `shaderDenormPreserveFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormPreserveFloat64(MemorySegment segment, long index) { return (int) VH_shaderDenormPreserveFloat64.get(segment, 0L, index); } + /// {@return `shaderDenormPreserveFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormPreserveFloat64(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormPreserveFloat64(segment, 0L); } + /// {@return `shaderDenormPreserveFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormPreserveFloat64At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormPreserveFloat64(this.segment(), index); } + /// {@return `shaderDenormPreserveFloat64`} + public @CType("VkBool32") int shaderDenormPreserveFloat64() { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormPreserveFloat64(this.segment()); } + /// Sets `shaderDenormPreserveFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormPreserveFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormPreserveFloat64.set(segment, 0L, index, value); } + /// Sets `shaderDenormPreserveFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormPreserveFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormPreserveFloat64(segment, 0L, value); } + /// Sets `shaderDenormPreserveFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormPreserveFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormPreserveFloat64(this.segment(), index, value); return this; } + /// Sets `shaderDenormPreserveFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormPreserveFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormPreserveFloat64(this.segment(), value); return this; } + + /// {@return `shaderDenormFlushToZeroFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat16(MemorySegment segment, long index) { return (int) VH_shaderDenormFlushToZeroFloat16.get(segment, 0L, index); } + /// {@return `shaderDenormFlushToZeroFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat16(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormFlushToZeroFloat16(segment, 0L); } + /// {@return `shaderDenormFlushToZeroFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormFlushToZeroFloat16At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormFlushToZeroFloat16(this.segment(), index); } + /// {@return `shaderDenormFlushToZeroFloat16`} + public @CType("VkBool32") int shaderDenormFlushToZeroFloat16() { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormFlushToZeroFloat16(this.segment()); } + /// Sets `shaderDenormFlushToZeroFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormFlushToZeroFloat16.set(segment, 0L, index, value); } + /// Sets `shaderDenormFlushToZeroFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormFlushToZeroFloat16(segment, 0L, value); } + /// Sets `shaderDenormFlushToZeroFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormFlushToZeroFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormFlushToZeroFloat16(this.segment(), index, value); return this; } + /// Sets `shaderDenormFlushToZeroFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormFlushToZeroFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormFlushToZeroFloat16(this.segment(), value); return this; } + + /// {@return `shaderDenormFlushToZeroFloat32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat32(MemorySegment segment, long index) { return (int) VH_shaderDenormFlushToZeroFloat32.get(segment, 0L, index); } + /// {@return `shaderDenormFlushToZeroFloat32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat32(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormFlushToZeroFloat32(segment, 0L); } + /// {@return `shaderDenormFlushToZeroFloat32` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormFlushToZeroFloat32At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormFlushToZeroFloat32(this.segment(), index); } + /// {@return `shaderDenormFlushToZeroFloat32`} + public @CType("VkBool32") int shaderDenormFlushToZeroFloat32() { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormFlushToZeroFloat32(this.segment()); } + /// Sets `shaderDenormFlushToZeroFloat32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormFlushToZeroFloat32.set(segment, 0L, index, value); } + /// Sets `shaderDenormFlushToZeroFloat32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormFlushToZeroFloat32(segment, 0L, value); } + /// Sets `shaderDenormFlushToZeroFloat32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormFlushToZeroFloat32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormFlushToZeroFloat32(this.segment(), index, value); return this; } + /// Sets `shaderDenormFlushToZeroFloat32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormFlushToZeroFloat32(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormFlushToZeroFloat32(this.segment(), value); return this; } + + /// {@return `shaderDenormFlushToZeroFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat64(MemorySegment segment, long index) { return (int) VH_shaderDenormFlushToZeroFloat64.get(segment, 0L, index); } + /// {@return `shaderDenormFlushToZeroFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat64(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormFlushToZeroFloat64(segment, 0L); } + /// {@return `shaderDenormFlushToZeroFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormFlushToZeroFloat64At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormFlushToZeroFloat64(this.segment(), index); } + /// {@return `shaderDenormFlushToZeroFloat64`} + public @CType("VkBool32") int shaderDenormFlushToZeroFloat64() { return VkPhysicalDeviceFloatControlsProperties.get_shaderDenormFlushToZeroFloat64(this.segment()); } + /// Sets `shaderDenormFlushToZeroFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormFlushToZeroFloat64.set(segment, 0L, index, value); } + /// Sets `shaderDenormFlushToZeroFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormFlushToZeroFloat64(segment, 0L, value); } + /// Sets `shaderDenormFlushToZeroFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormFlushToZeroFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormFlushToZeroFloat64(this.segment(), index, value); return this; } + /// Sets `shaderDenormFlushToZeroFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderDenormFlushToZeroFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderDenormFlushToZeroFloat64(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTEFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat16(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTEFloat16.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTEFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat16(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTEFloat16(segment, 0L); } + /// {@return `shaderRoundingModeRTEFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTEFloat16At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTEFloat16(this.segment(), index); } + /// {@return `shaderRoundingModeRTEFloat16`} + public @CType("VkBool32") int shaderRoundingModeRTEFloat16() { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTEFloat16(this.segment()); } + /// Sets `shaderRoundingModeRTEFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTEFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTEFloat16.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTEFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTEFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTEFloat16(segment, 0L, value); } + /// Sets `shaderRoundingModeRTEFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTEFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTEFloat16(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTEFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTEFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTEFloat16(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTEFloat32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat32(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTEFloat32.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTEFloat32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat32(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTEFloat32(segment, 0L); } + /// {@return `shaderRoundingModeRTEFloat32` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTEFloat32At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTEFloat32(this.segment(), index); } + /// {@return `shaderRoundingModeRTEFloat32`} + public @CType("VkBool32") int shaderRoundingModeRTEFloat32() { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTEFloat32(this.segment()); } + /// Sets `shaderRoundingModeRTEFloat32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTEFloat32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTEFloat32.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTEFloat32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTEFloat32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTEFloat32(segment, 0L, value); } + /// Sets `shaderRoundingModeRTEFloat32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTEFloat32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTEFloat32(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTEFloat32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTEFloat32(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTEFloat32(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTEFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat64(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTEFloat64.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTEFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat64(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTEFloat64(segment, 0L); } + /// {@return `shaderRoundingModeRTEFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTEFloat64At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTEFloat64(this.segment(), index); } + /// {@return `shaderRoundingModeRTEFloat64`} + public @CType("VkBool32") int shaderRoundingModeRTEFloat64() { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTEFloat64(this.segment()); } + /// Sets `shaderRoundingModeRTEFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTEFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTEFloat64.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTEFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTEFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTEFloat64(segment, 0L, value); } + /// Sets `shaderRoundingModeRTEFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTEFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTEFloat64(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTEFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTEFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTEFloat64(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTZFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat16(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTZFloat16.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTZFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat16(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTZFloat16(segment, 0L); } + /// {@return `shaderRoundingModeRTZFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTZFloat16At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTZFloat16(this.segment(), index); } + /// {@return `shaderRoundingModeRTZFloat16`} + public @CType("VkBool32") int shaderRoundingModeRTZFloat16() { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTZFloat16(this.segment()); } + /// Sets `shaderRoundingModeRTZFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTZFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTZFloat16.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTZFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTZFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTZFloat16(segment, 0L, value); } + /// Sets `shaderRoundingModeRTZFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTZFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTZFloat16(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTZFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTZFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTZFloat16(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTZFloat32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat32(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTZFloat32.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTZFloat32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat32(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTZFloat32(segment, 0L); } + /// {@return `shaderRoundingModeRTZFloat32` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTZFloat32At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTZFloat32(this.segment(), index); } + /// {@return `shaderRoundingModeRTZFloat32`} + public @CType("VkBool32") int shaderRoundingModeRTZFloat32() { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTZFloat32(this.segment()); } + /// Sets `shaderRoundingModeRTZFloat32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTZFloat32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTZFloat32.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTZFloat32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTZFloat32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTZFloat32(segment, 0L, value); } + /// Sets `shaderRoundingModeRTZFloat32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTZFloat32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTZFloat32(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTZFloat32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTZFloat32(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTZFloat32(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTZFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat64(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTZFloat64.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTZFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat64(MemorySegment segment) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTZFloat64(segment, 0L); } + /// {@return `shaderRoundingModeRTZFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTZFloat64At(long index) { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTZFloat64(this.segment(), index); } + /// {@return `shaderRoundingModeRTZFloat64`} + public @CType("VkBool32") int shaderRoundingModeRTZFloat64() { return VkPhysicalDeviceFloatControlsProperties.get_shaderRoundingModeRTZFloat64(this.segment()); } + /// Sets `shaderRoundingModeRTZFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTZFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTZFloat64.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTZFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTZFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTZFloat64(segment, 0L, value); } + /// Sets `shaderRoundingModeRTZFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTZFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTZFloat64(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTZFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceFloatControlsProperties shaderRoundingModeRTZFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceFloatControlsProperties.set_shaderRoundingModeRTZFloat64(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceGlobalPriorityQueryFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceGlobalPriorityQueryFeatures.java new file mode 100644 index 00000000..6f4506e0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceGlobalPriorityQueryFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### globalPriorityQuery +/// [VarHandle][#VH_globalPriorityQuery] - [Getter][#globalPriorityQuery()] - [Setter][#globalPriorityQuery(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceGlobalPriorityQueryFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 globalPriorityQuery; +/// } VkPhysicalDeviceGlobalPriorityQueryFeatures; +/// ``` +public final class VkPhysicalDeviceGlobalPriorityQueryFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceGlobalPriorityQueryFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("globalPriorityQuery") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `globalPriorityQuery` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_globalPriorityQuery = LAYOUT.arrayElementVarHandle(PathElement.groupElement("globalPriorityQuery")); + + /// Creates `VkPhysicalDeviceGlobalPriorityQueryFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceGlobalPriorityQueryFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceGlobalPriorityQueryFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGlobalPriorityQueryFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGlobalPriorityQueryFeatures(segment); } + + /// Creates `VkPhysicalDeviceGlobalPriorityQueryFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGlobalPriorityQueryFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGlobalPriorityQueryFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceGlobalPriorityQueryFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGlobalPriorityQueryFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGlobalPriorityQueryFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceGlobalPriorityQueryFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceGlobalPriorityQueryFeatures` + public static VkPhysicalDeviceGlobalPriorityQueryFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceGlobalPriorityQueryFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceGlobalPriorityQueryFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceGlobalPriorityQueryFeatures` + public static VkPhysicalDeviceGlobalPriorityQueryFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceGlobalPriorityQueryFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceGlobalPriorityQueryFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceGlobalPriorityQueryFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceGlobalPriorityQueryFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceGlobalPriorityQueryFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGlobalPriorityQueryFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceGlobalPriorityQueryFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGlobalPriorityQueryFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceGlobalPriorityQueryFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceGlobalPriorityQueryFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceGlobalPriorityQueryFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceGlobalPriorityQueryFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGlobalPriorityQueryFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGlobalPriorityQueryFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGlobalPriorityQueryFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGlobalPriorityQueryFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGlobalPriorityQueryFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `globalPriorityQuery` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_globalPriorityQuery(MemorySegment segment, long index) { return (int) VH_globalPriorityQuery.get(segment, 0L, index); } + /// {@return `globalPriorityQuery`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_globalPriorityQuery(MemorySegment segment) { return VkPhysicalDeviceGlobalPriorityQueryFeatures.get_globalPriorityQuery(segment, 0L); } + /// {@return `globalPriorityQuery` at the given index} + /// @param index the index + public @CType("VkBool32") int globalPriorityQueryAt(long index) { return VkPhysicalDeviceGlobalPriorityQueryFeatures.get_globalPriorityQuery(this.segment(), index); } + /// {@return `globalPriorityQuery`} + public @CType("VkBool32") int globalPriorityQuery() { return VkPhysicalDeviceGlobalPriorityQueryFeatures.get_globalPriorityQuery(this.segment()); } + /// Sets `globalPriorityQuery` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_globalPriorityQuery(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_globalPriorityQuery.set(segment, 0L, index, value); } + /// Sets `globalPriorityQuery` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_globalPriorityQuery(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceGlobalPriorityQueryFeatures.set_globalPriorityQuery(segment, 0L, value); } + /// Sets `globalPriorityQuery` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGlobalPriorityQueryFeatures globalPriorityQueryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceGlobalPriorityQueryFeatures.set_globalPriorityQuery(this.segment(), index, value); return this; } + /// Sets `globalPriorityQuery` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGlobalPriorityQueryFeatures globalPriorityQuery(@CType("VkBool32") int value) { VkPhysicalDeviceGlobalPriorityQueryFeatures.set_globalPriorityQuery(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceGroupProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceGroupProperties.java new file mode 100644 index 00000000..ee81d9fa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceGroupProperties.java @@ -0,0 +1,276 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK11.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### physicalDeviceCount +/// [VarHandle][#VH_physicalDeviceCount] - [Getter][#physicalDeviceCount()] - [Setter][#physicalDeviceCount(int)] +/// ### physicalDevices +/// [Byte offset handle][#MH_physicalDevices] - [Memory layout][#ML_physicalDevices] - [Getter][#physicalDevices(long)] - [Setter][#physicalDevices(long, java.lang.foreign.MemorySegment)] +/// ### subsetAllocation +/// [VarHandle][#VH_subsetAllocation] - [Getter][#subsetAllocation()] - [Setter][#subsetAllocation(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceGroupProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t physicalDeviceCount; +/// VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE] physicalDevices; +/// VkBool32 subsetAllocation; +/// } VkPhysicalDeviceGroupProperties; +/// ``` +public final class VkPhysicalDeviceGroupProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceGroupProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("physicalDeviceCount"), + MemoryLayout.sequenceLayout(VK_MAX_DEVICE_GROUP_SIZE, ValueLayout.ADDRESS).withName("physicalDevices"), + ValueLayout.JAVA_INT.withName("subsetAllocation") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `physicalDeviceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_physicalDeviceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("physicalDeviceCount")); + /// The byte offset handle of `physicalDevices` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_physicalDevices = LAYOUT.byteOffsetHandle(PathElement.groupElement("physicalDevices"), PathElement.sequenceElement()); + /// The memory layout of `physicalDevices`. + public static final MemoryLayout ML_physicalDevices = LAYOUT.select(PathElement.groupElement("physicalDevices")); + /// The [VarHandle] of `subsetAllocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subsetAllocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subsetAllocation")); + + /// Creates `VkPhysicalDeviceGroupProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceGroupProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceGroupProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGroupProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGroupProperties(segment); } + + /// Creates `VkPhysicalDeviceGroupProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGroupProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGroupProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceGroupProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceGroupProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceGroupProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceGroupProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceGroupProperties` + public static VkPhysicalDeviceGroupProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceGroupProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceGroupProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceGroupProperties` + public static VkPhysicalDeviceGroupProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceGroupProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceGroupProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceGroupProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceGroupProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceGroupProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGroupProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceGroupProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGroupProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceGroupProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceGroupProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceGroupProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceGroupProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGroupProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGroupProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGroupProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGroupProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGroupProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `physicalDeviceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_physicalDeviceCount(MemorySegment segment, long index) { return (int) VH_physicalDeviceCount.get(segment, 0L, index); } + /// {@return `physicalDeviceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_physicalDeviceCount(MemorySegment segment) { return VkPhysicalDeviceGroupProperties.get_physicalDeviceCount(segment, 0L); } + /// {@return `physicalDeviceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int physicalDeviceCountAt(long index) { return VkPhysicalDeviceGroupProperties.get_physicalDeviceCount(this.segment(), index); } + /// {@return `physicalDeviceCount`} + public @CType("uint32_t") int physicalDeviceCount() { return VkPhysicalDeviceGroupProperties.get_physicalDeviceCount(this.segment()); } + /// Sets `physicalDeviceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_physicalDeviceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_physicalDeviceCount.set(segment, 0L, index, value); } + /// Sets `physicalDeviceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_physicalDeviceCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceGroupProperties.set_physicalDeviceCount(segment, 0L, value); } + /// Sets `physicalDeviceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGroupProperties physicalDeviceCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceGroupProperties.set_physicalDeviceCount(this.segment(), index, value); return this; } + /// Sets `physicalDeviceCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGroupProperties physicalDeviceCount(@CType("uint32_t") int value) { VkPhysicalDeviceGroupProperties.set_physicalDeviceCount(this.segment(), value); return this; } + + /// {@return `physicalDevices` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment get_physicalDevices(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_physicalDevices.invokeExact(0L, elementIndex), index), ML_physicalDevices); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `physicalDevices`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment get_physicalDevices(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceGroupProperties.get_physicalDevices(segment, 0L, elementIndex); } + /// {@return `physicalDevices` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment physicalDevicesAt(long index, long elementIndex) { return VkPhysicalDeviceGroupProperties.get_physicalDevices(this.segment(), index, elementIndex); } + /// {@return `physicalDevices`} + /// @param elementIndex the index of the element + public @CType("VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment physicalDevices(long elementIndex) { return VkPhysicalDeviceGroupProperties.get_physicalDevices(this.segment(), elementIndex); } + /// Sets `physicalDevices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_physicalDevices(MemorySegment segment, long index, long elementIndex, @CType("VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_physicalDevices.invokeExact(0L, elementIndex), index), ML_physicalDevices.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `physicalDevices` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_physicalDevices(MemorySegment segment, long elementIndex, @CType("VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGroupProperties.set_physicalDevices(segment, 0L, elementIndex, value); } + /// Sets `physicalDevices` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGroupProperties physicalDevicesAt(long index, long elementIndex, @CType("VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGroupProperties.set_physicalDevices(this.segment(), index, elementIndex, value); return this; } + /// Sets `physicalDevices` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGroupProperties physicalDevices(long elementIndex, @CType("VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceGroupProperties.set_physicalDevices(this.segment(), elementIndex, value); return this; } + + /// {@return `subsetAllocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_subsetAllocation(MemorySegment segment, long index) { return (int) VH_subsetAllocation.get(segment, 0L, index); } + /// {@return `subsetAllocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_subsetAllocation(MemorySegment segment) { return VkPhysicalDeviceGroupProperties.get_subsetAllocation(segment, 0L); } + /// {@return `subsetAllocation` at the given index} + /// @param index the index + public @CType("VkBool32") int subsetAllocationAt(long index) { return VkPhysicalDeviceGroupProperties.get_subsetAllocation(this.segment(), index); } + /// {@return `subsetAllocation`} + public @CType("VkBool32") int subsetAllocation() { return VkPhysicalDeviceGroupProperties.get_subsetAllocation(this.segment()); } + /// Sets `subsetAllocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subsetAllocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_subsetAllocation.set(segment, 0L, index, value); } + /// Sets `subsetAllocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subsetAllocation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceGroupProperties.set_subsetAllocation(segment, 0L, value); } + /// Sets `subsetAllocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGroupProperties subsetAllocationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceGroupProperties.set_subsetAllocation(this.segment(), index, value); return this; } + /// Sets `subsetAllocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceGroupProperties subsetAllocation(@CType("VkBool32") int value) { VkPhysicalDeviceGroupProperties.set_subsetAllocation(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceHostImageCopyFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceHostImageCopyFeatures.java new file mode 100644 index 00000000..9ebf72ea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceHostImageCopyFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### hostImageCopy +/// [VarHandle][#VH_hostImageCopy] - [Getter][#hostImageCopy()] - [Setter][#hostImageCopy(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceHostImageCopyFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 hostImageCopy; +/// } VkPhysicalDeviceHostImageCopyFeatures; +/// ``` +public final class VkPhysicalDeviceHostImageCopyFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceHostImageCopyFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("hostImageCopy") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `hostImageCopy` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hostImageCopy = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hostImageCopy")); + + /// Creates `VkPhysicalDeviceHostImageCopyFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceHostImageCopyFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceHostImageCopyFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHostImageCopyFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHostImageCopyFeatures(segment); } + + /// Creates `VkPhysicalDeviceHostImageCopyFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHostImageCopyFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHostImageCopyFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceHostImageCopyFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHostImageCopyFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHostImageCopyFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceHostImageCopyFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceHostImageCopyFeatures` + public static VkPhysicalDeviceHostImageCopyFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceHostImageCopyFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceHostImageCopyFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceHostImageCopyFeatures` + public static VkPhysicalDeviceHostImageCopyFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceHostImageCopyFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceHostImageCopyFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceHostImageCopyFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceHostImageCopyFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceHostImageCopyFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceHostImageCopyFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceHostImageCopyFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceHostImageCopyFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceHostImageCopyFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceHostImageCopyFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `hostImageCopy` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hostImageCopy(MemorySegment segment, long index) { return (int) VH_hostImageCopy.get(segment, 0L, index); } + /// {@return `hostImageCopy`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hostImageCopy(MemorySegment segment) { return VkPhysicalDeviceHostImageCopyFeatures.get_hostImageCopy(segment, 0L); } + /// {@return `hostImageCopy` at the given index} + /// @param index the index + public @CType("VkBool32") int hostImageCopyAt(long index) { return VkPhysicalDeviceHostImageCopyFeatures.get_hostImageCopy(this.segment(), index); } + /// {@return `hostImageCopy`} + public @CType("VkBool32") int hostImageCopy() { return VkPhysicalDeviceHostImageCopyFeatures.get_hostImageCopy(this.segment()); } + /// Sets `hostImageCopy` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hostImageCopy(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hostImageCopy.set(segment, 0L, index, value); } + /// Sets `hostImageCopy` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hostImageCopy(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceHostImageCopyFeatures.set_hostImageCopy(segment, 0L, value); } + /// Sets `hostImageCopy` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyFeatures hostImageCopyAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceHostImageCopyFeatures.set_hostImageCopy(this.segment(), index, value); return this; } + /// Sets `hostImageCopy` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyFeatures hostImageCopy(@CType("VkBool32") int value) { VkPhysicalDeviceHostImageCopyFeatures.set_hostImageCopy(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceHostImageCopyProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceHostImageCopyProperties.java new file mode 100644 index 00000000..8a61e489 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceHostImageCopyProperties.java @@ -0,0 +1,387 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### copySrcLayoutCount +/// [VarHandle][#VH_copySrcLayoutCount] - [Getter][#copySrcLayoutCount()] - [Setter][#copySrcLayoutCount(int)] +/// ### pCopySrcLayouts +/// [VarHandle][#VH_pCopySrcLayouts] - [Getter][#pCopySrcLayouts()] - [Setter][#pCopySrcLayouts(java.lang.foreign.MemorySegment)] +/// ### copyDstLayoutCount +/// [VarHandle][#VH_copyDstLayoutCount] - [Getter][#copyDstLayoutCount()] - [Setter][#copyDstLayoutCount(int)] +/// ### pCopyDstLayouts +/// [VarHandle][#VH_pCopyDstLayouts] - [Getter][#pCopyDstLayouts()] - [Setter][#pCopyDstLayouts(java.lang.foreign.MemorySegment)] +/// ### optimalTilingLayoutUUID +/// [Byte offset handle][#MH_optimalTilingLayoutUUID] - [Memory layout][#ML_optimalTilingLayoutUUID] - [Getter][#optimalTilingLayoutUUID(long)] - [Setter][#optimalTilingLayoutUUID(long, java.lang.foreign.MemorySegment)] +/// ### identicalMemoryTypeRequirements +/// [VarHandle][#VH_identicalMemoryTypeRequirements] - [Getter][#identicalMemoryTypeRequirements()] - [Setter][#identicalMemoryTypeRequirements(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceHostImageCopyProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t copySrcLayoutCount; +/// VkImageLayout * pCopySrcLayouts; +/// uint32_t copyDstLayoutCount; +/// VkImageLayout * pCopyDstLayouts; +/// uint8_t[VK_UUID_SIZE] optimalTilingLayoutUUID; +/// VkBool32 identicalMemoryTypeRequirements; +/// } VkPhysicalDeviceHostImageCopyProperties; +/// ``` +public final class VkPhysicalDeviceHostImageCopyProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceHostImageCopyProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("copySrcLayoutCount"), + ValueLayout.ADDRESS.withName("pCopySrcLayouts"), + ValueLayout.JAVA_INT.withName("copyDstLayoutCount"), + ValueLayout.ADDRESS.withName("pCopyDstLayouts"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("optimalTilingLayoutUUID"), + ValueLayout.JAVA_INT.withName("identicalMemoryTypeRequirements") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `copySrcLayoutCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_copySrcLayoutCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("copySrcLayoutCount")); + /// The [VarHandle] of `pCopySrcLayouts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCopySrcLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCopySrcLayouts")); + /// The [VarHandle] of `copyDstLayoutCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_copyDstLayoutCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("copyDstLayoutCount")); + /// The [VarHandle] of `pCopyDstLayouts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCopyDstLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCopyDstLayouts")); + /// The byte offset handle of `optimalTilingLayoutUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_optimalTilingLayoutUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("optimalTilingLayoutUUID"), PathElement.sequenceElement()); + /// The memory layout of `optimalTilingLayoutUUID`. + public static final MemoryLayout ML_optimalTilingLayoutUUID = LAYOUT.select(PathElement.groupElement("optimalTilingLayoutUUID")); + /// The [VarHandle] of `identicalMemoryTypeRequirements` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_identicalMemoryTypeRequirements = LAYOUT.arrayElementVarHandle(PathElement.groupElement("identicalMemoryTypeRequirements")); + + /// Creates `VkPhysicalDeviceHostImageCopyProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceHostImageCopyProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceHostImageCopyProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHostImageCopyProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHostImageCopyProperties(segment); } + + /// Creates `VkPhysicalDeviceHostImageCopyProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHostImageCopyProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHostImageCopyProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceHostImageCopyProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHostImageCopyProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHostImageCopyProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceHostImageCopyProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceHostImageCopyProperties` + public static VkPhysicalDeviceHostImageCopyProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceHostImageCopyProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceHostImageCopyProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceHostImageCopyProperties` + public static VkPhysicalDeviceHostImageCopyProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceHostImageCopyProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceHostImageCopyProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceHostImageCopyProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceHostImageCopyProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceHostImageCopyProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceHostImageCopyProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceHostImageCopyProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceHostImageCopyProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceHostImageCopyProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceHostImageCopyProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `copySrcLayoutCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_copySrcLayoutCount(MemorySegment segment, long index) { return (int) VH_copySrcLayoutCount.get(segment, 0L, index); } + /// {@return `copySrcLayoutCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_copySrcLayoutCount(MemorySegment segment) { return VkPhysicalDeviceHostImageCopyProperties.get_copySrcLayoutCount(segment, 0L); } + /// {@return `copySrcLayoutCount` at the given index} + /// @param index the index + public @CType("uint32_t") int copySrcLayoutCountAt(long index) { return VkPhysicalDeviceHostImageCopyProperties.get_copySrcLayoutCount(this.segment(), index); } + /// {@return `copySrcLayoutCount`} + public @CType("uint32_t") int copySrcLayoutCount() { return VkPhysicalDeviceHostImageCopyProperties.get_copySrcLayoutCount(this.segment()); } + /// Sets `copySrcLayoutCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_copySrcLayoutCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_copySrcLayoutCount.set(segment, 0L, index, value); } + /// Sets `copySrcLayoutCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_copySrcLayoutCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceHostImageCopyProperties.set_copySrcLayoutCount(segment, 0L, value); } + /// Sets `copySrcLayoutCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties copySrcLayoutCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceHostImageCopyProperties.set_copySrcLayoutCount(this.segment(), index, value); return this; } + /// Sets `copySrcLayoutCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties copySrcLayoutCount(@CType("uint32_t") int value) { VkPhysicalDeviceHostImageCopyProperties.set_copySrcLayoutCount(this.segment(), value); return this; } + + /// {@return `pCopySrcLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout *") java.lang.foreign.MemorySegment get_pCopySrcLayouts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCopySrcLayouts.get(segment, 0L, index); } + /// {@return `pCopySrcLayouts`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout *") java.lang.foreign.MemorySegment get_pCopySrcLayouts(MemorySegment segment) { return VkPhysicalDeviceHostImageCopyProperties.get_pCopySrcLayouts(segment, 0L); } + /// {@return `pCopySrcLayouts` at the given index} + /// @param index the index + public @CType("VkImageLayout *") java.lang.foreign.MemorySegment pCopySrcLayoutsAt(long index) { return VkPhysicalDeviceHostImageCopyProperties.get_pCopySrcLayouts(this.segment(), index); } + /// {@return `pCopySrcLayouts`} + public @CType("VkImageLayout *") java.lang.foreign.MemorySegment pCopySrcLayouts() { return VkPhysicalDeviceHostImageCopyProperties.get_pCopySrcLayouts(this.segment()); } + /// Sets `pCopySrcLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCopySrcLayouts(MemorySegment segment, long index, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VH_pCopySrcLayouts.set(segment, 0L, index, value); } + /// Sets `pCopySrcLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCopySrcLayouts(MemorySegment segment, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_pCopySrcLayouts(segment, 0L, value); } + /// Sets `pCopySrcLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties pCopySrcLayoutsAt(long index, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_pCopySrcLayouts(this.segment(), index, value); return this; } + /// Sets `pCopySrcLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties pCopySrcLayouts(@CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_pCopySrcLayouts(this.segment(), value); return this; } + + /// {@return `copyDstLayoutCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_copyDstLayoutCount(MemorySegment segment, long index) { return (int) VH_copyDstLayoutCount.get(segment, 0L, index); } + /// {@return `copyDstLayoutCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_copyDstLayoutCount(MemorySegment segment) { return VkPhysicalDeviceHostImageCopyProperties.get_copyDstLayoutCount(segment, 0L); } + /// {@return `copyDstLayoutCount` at the given index} + /// @param index the index + public @CType("uint32_t") int copyDstLayoutCountAt(long index) { return VkPhysicalDeviceHostImageCopyProperties.get_copyDstLayoutCount(this.segment(), index); } + /// {@return `copyDstLayoutCount`} + public @CType("uint32_t") int copyDstLayoutCount() { return VkPhysicalDeviceHostImageCopyProperties.get_copyDstLayoutCount(this.segment()); } + /// Sets `copyDstLayoutCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_copyDstLayoutCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_copyDstLayoutCount.set(segment, 0L, index, value); } + /// Sets `copyDstLayoutCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_copyDstLayoutCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceHostImageCopyProperties.set_copyDstLayoutCount(segment, 0L, value); } + /// Sets `copyDstLayoutCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties copyDstLayoutCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceHostImageCopyProperties.set_copyDstLayoutCount(this.segment(), index, value); return this; } + /// Sets `copyDstLayoutCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties copyDstLayoutCount(@CType("uint32_t") int value) { VkPhysicalDeviceHostImageCopyProperties.set_copyDstLayoutCount(this.segment(), value); return this; } + + /// {@return `pCopyDstLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout *") java.lang.foreign.MemorySegment get_pCopyDstLayouts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCopyDstLayouts.get(segment, 0L, index); } + /// {@return `pCopyDstLayouts`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout *") java.lang.foreign.MemorySegment get_pCopyDstLayouts(MemorySegment segment) { return VkPhysicalDeviceHostImageCopyProperties.get_pCopyDstLayouts(segment, 0L); } + /// {@return `pCopyDstLayouts` at the given index} + /// @param index the index + public @CType("VkImageLayout *") java.lang.foreign.MemorySegment pCopyDstLayoutsAt(long index) { return VkPhysicalDeviceHostImageCopyProperties.get_pCopyDstLayouts(this.segment(), index); } + /// {@return `pCopyDstLayouts`} + public @CType("VkImageLayout *") java.lang.foreign.MemorySegment pCopyDstLayouts() { return VkPhysicalDeviceHostImageCopyProperties.get_pCopyDstLayouts(this.segment()); } + /// Sets `pCopyDstLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCopyDstLayouts(MemorySegment segment, long index, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VH_pCopyDstLayouts.set(segment, 0L, index, value); } + /// Sets `pCopyDstLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCopyDstLayouts(MemorySegment segment, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_pCopyDstLayouts(segment, 0L, value); } + /// Sets `pCopyDstLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties pCopyDstLayoutsAt(long index, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_pCopyDstLayouts(this.segment(), index, value); return this; } + /// Sets `pCopyDstLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties pCopyDstLayouts(@CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_pCopyDstLayouts(this.segment(), value); return this; } + + /// {@return `optimalTilingLayoutUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_optimalTilingLayoutUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_optimalTilingLayoutUUID.invokeExact(0L, elementIndex), index), ML_optimalTilingLayoutUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `optimalTilingLayoutUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_optimalTilingLayoutUUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceHostImageCopyProperties.get_optimalTilingLayoutUUID(segment, 0L, elementIndex); } + /// {@return `optimalTilingLayoutUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment optimalTilingLayoutUUIDAt(long index, long elementIndex) { return VkPhysicalDeviceHostImageCopyProperties.get_optimalTilingLayoutUUID(this.segment(), index, elementIndex); } + /// {@return `optimalTilingLayoutUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment optimalTilingLayoutUUID(long elementIndex) { return VkPhysicalDeviceHostImageCopyProperties.get_optimalTilingLayoutUUID(this.segment(), elementIndex); } + /// Sets `optimalTilingLayoutUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_optimalTilingLayoutUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_optimalTilingLayoutUUID.invokeExact(0L, elementIndex), index), ML_optimalTilingLayoutUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `optimalTilingLayoutUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_optimalTilingLayoutUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_optimalTilingLayoutUUID(segment, 0L, elementIndex, value); } + /// Sets `optimalTilingLayoutUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties optimalTilingLayoutUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_optimalTilingLayoutUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `optimalTilingLayoutUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties optimalTilingLayoutUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostImageCopyProperties.set_optimalTilingLayoutUUID(this.segment(), elementIndex, value); return this; } + + /// {@return `identicalMemoryTypeRequirements` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_identicalMemoryTypeRequirements(MemorySegment segment, long index) { return (int) VH_identicalMemoryTypeRequirements.get(segment, 0L, index); } + /// {@return `identicalMemoryTypeRequirements`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_identicalMemoryTypeRequirements(MemorySegment segment) { return VkPhysicalDeviceHostImageCopyProperties.get_identicalMemoryTypeRequirements(segment, 0L); } + /// {@return `identicalMemoryTypeRequirements` at the given index} + /// @param index the index + public @CType("VkBool32") int identicalMemoryTypeRequirementsAt(long index) { return VkPhysicalDeviceHostImageCopyProperties.get_identicalMemoryTypeRequirements(this.segment(), index); } + /// {@return `identicalMemoryTypeRequirements`} + public @CType("VkBool32") int identicalMemoryTypeRequirements() { return VkPhysicalDeviceHostImageCopyProperties.get_identicalMemoryTypeRequirements(this.segment()); } + /// Sets `identicalMemoryTypeRequirements` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_identicalMemoryTypeRequirements(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_identicalMemoryTypeRequirements.set(segment, 0L, index, value); } + /// Sets `identicalMemoryTypeRequirements` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_identicalMemoryTypeRequirements(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceHostImageCopyProperties.set_identicalMemoryTypeRequirements(segment, 0L, value); } + /// Sets `identicalMemoryTypeRequirements` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties identicalMemoryTypeRequirementsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceHostImageCopyProperties.set_identicalMemoryTypeRequirements(this.segment(), index, value); return this; } + /// Sets `identicalMemoryTypeRequirements` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostImageCopyProperties identicalMemoryTypeRequirements(@CType("VkBool32") int value) { VkPhysicalDeviceHostImageCopyProperties.set_identicalMemoryTypeRequirements(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceHostQueryResetFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceHostQueryResetFeatures.java new file mode 100644 index 00000000..6662974c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceHostQueryResetFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### hostQueryReset +/// [VarHandle][#VH_hostQueryReset] - [Getter][#hostQueryReset()] - [Setter][#hostQueryReset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceHostQueryResetFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 hostQueryReset; +/// } VkPhysicalDeviceHostQueryResetFeatures; +/// ``` +public final class VkPhysicalDeviceHostQueryResetFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceHostQueryResetFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("hostQueryReset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `hostQueryReset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hostQueryReset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hostQueryReset")); + + /// Creates `VkPhysicalDeviceHostQueryResetFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceHostQueryResetFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceHostQueryResetFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHostQueryResetFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHostQueryResetFeatures(segment); } + + /// Creates `VkPhysicalDeviceHostQueryResetFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHostQueryResetFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHostQueryResetFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceHostQueryResetFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceHostQueryResetFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceHostQueryResetFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceHostQueryResetFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceHostQueryResetFeatures` + public static VkPhysicalDeviceHostQueryResetFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceHostQueryResetFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceHostQueryResetFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceHostQueryResetFeatures` + public static VkPhysicalDeviceHostQueryResetFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceHostQueryResetFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceHostQueryResetFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceHostQueryResetFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceHostQueryResetFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceHostQueryResetFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostQueryResetFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceHostQueryResetFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostQueryResetFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceHostQueryResetFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceHostQueryResetFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceHostQueryResetFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceHostQueryResetFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostQueryResetFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostQueryResetFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostQueryResetFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostQueryResetFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceHostQueryResetFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `hostQueryReset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hostQueryReset(MemorySegment segment, long index) { return (int) VH_hostQueryReset.get(segment, 0L, index); } + /// {@return `hostQueryReset`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hostQueryReset(MemorySegment segment) { return VkPhysicalDeviceHostQueryResetFeatures.get_hostQueryReset(segment, 0L); } + /// {@return `hostQueryReset` at the given index} + /// @param index the index + public @CType("VkBool32") int hostQueryResetAt(long index) { return VkPhysicalDeviceHostQueryResetFeatures.get_hostQueryReset(this.segment(), index); } + /// {@return `hostQueryReset`} + public @CType("VkBool32") int hostQueryReset() { return VkPhysicalDeviceHostQueryResetFeatures.get_hostQueryReset(this.segment()); } + /// Sets `hostQueryReset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hostQueryReset(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hostQueryReset.set(segment, 0L, index, value); } + /// Sets `hostQueryReset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hostQueryReset(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceHostQueryResetFeatures.set_hostQueryReset(segment, 0L, value); } + /// Sets `hostQueryReset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostQueryResetFeatures hostQueryResetAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceHostQueryResetFeatures.set_hostQueryReset(this.segment(), index, value); return this; } + /// Sets `hostQueryReset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceHostQueryResetFeatures hostQueryReset(@CType("VkBool32") int value) { VkPhysicalDeviceHostQueryResetFeatures.set_hostQueryReset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceIDProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceIDProperties.java new file mode 100644 index 00000000..1f487791 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceIDProperties.java @@ -0,0 +1,384 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK11.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceUUID +/// [Byte offset handle][#MH_deviceUUID] - [Memory layout][#ML_deviceUUID] - [Getter][#deviceUUID(long)] - [Setter][#deviceUUID(long, java.lang.foreign.MemorySegment)] +/// ### driverUUID +/// [Byte offset handle][#MH_driverUUID] - [Memory layout][#ML_driverUUID] - [Getter][#driverUUID(long)] - [Setter][#driverUUID(long, java.lang.foreign.MemorySegment)] +/// ### deviceLUID +/// [Byte offset handle][#MH_deviceLUID] - [Memory layout][#ML_deviceLUID] - [Getter][#deviceLUID(long)] - [Setter][#deviceLUID(long, java.lang.foreign.MemorySegment)] +/// ### deviceNodeMask +/// [VarHandle][#VH_deviceNodeMask] - [Getter][#deviceNodeMask()] - [Setter][#deviceNodeMask(int)] +/// ### deviceLUIDValid +/// [VarHandle][#VH_deviceLUIDValid] - [Getter][#deviceLUIDValid()] - [Setter][#deviceLUIDValid(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceIDProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint8_t[VK_UUID_SIZE] deviceUUID; +/// uint8_t[VK_UUID_SIZE] driverUUID; +/// uint8_t[VK_LUID_SIZE] deviceLUID; +/// uint32_t deviceNodeMask; +/// VkBool32 deviceLUIDValid; +/// } VkPhysicalDeviceIDProperties; +/// ``` +public final class VkPhysicalDeviceIDProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceIDProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("deviceUUID"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("driverUUID"), + MemoryLayout.sequenceLayout(VK_LUID_SIZE, ValueLayout.JAVA_BYTE).withName("deviceLUID"), + ValueLayout.JAVA_INT.withName("deviceNodeMask"), + ValueLayout.JAVA_INT.withName("deviceLUIDValid") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `deviceUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_deviceUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("deviceUUID"), PathElement.sequenceElement()); + /// The memory layout of `deviceUUID`. + public static final MemoryLayout ML_deviceUUID = LAYOUT.select(PathElement.groupElement("deviceUUID")); + /// The byte offset handle of `driverUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_driverUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("driverUUID"), PathElement.sequenceElement()); + /// The memory layout of `driverUUID`. + public static final MemoryLayout ML_driverUUID = LAYOUT.select(PathElement.groupElement("driverUUID")); + /// The byte offset handle of `deviceLUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_deviceLUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("deviceLUID"), PathElement.sequenceElement()); + /// The memory layout of `deviceLUID`. + public static final MemoryLayout ML_deviceLUID = LAYOUT.select(PathElement.groupElement("deviceLUID")); + /// The [VarHandle] of `deviceNodeMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceNodeMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceNodeMask")); + /// The [VarHandle] of `deviceLUIDValid` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceLUIDValid = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceLUIDValid")); + + /// Creates `VkPhysicalDeviceIDProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceIDProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceIDProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceIDProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceIDProperties(segment); } + + /// Creates `VkPhysicalDeviceIDProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceIDProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceIDProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceIDProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceIDProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceIDProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceIDProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceIDProperties` + public static VkPhysicalDeviceIDProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceIDProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceIDProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceIDProperties` + public static VkPhysicalDeviceIDProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceIDProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceIDProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceIDProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceIDProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceIDProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceIDProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceIDProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceIDProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceIDProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceIDProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_deviceUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_deviceUUID.invokeExact(0L, elementIndex), index), ML_deviceUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `deviceUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_deviceUUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceIDProperties.get_deviceUUID(segment, 0L, elementIndex); } + /// {@return `deviceUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment deviceUUIDAt(long index, long elementIndex) { return VkPhysicalDeviceIDProperties.get_deviceUUID(this.segment(), index, elementIndex); } + /// {@return `deviceUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment deviceUUID(long elementIndex) { return VkPhysicalDeviceIDProperties.get_deviceUUID(this.segment(), elementIndex); } + /// Sets `deviceUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_deviceUUID.invokeExact(0L, elementIndex), index), ML_deviceUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `deviceUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_deviceUUID(segment, 0L, elementIndex, value); } + /// Sets `deviceUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties deviceUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_deviceUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `deviceUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties deviceUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_deviceUUID(this.segment(), elementIndex, value); return this; } + + /// {@return `driverUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_driverUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_driverUUID.invokeExact(0L, elementIndex), index), ML_driverUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `driverUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_driverUUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceIDProperties.get_driverUUID(segment, 0L, elementIndex); } + /// {@return `driverUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment driverUUIDAt(long index, long elementIndex) { return VkPhysicalDeviceIDProperties.get_driverUUID(this.segment(), index, elementIndex); } + /// {@return `driverUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment driverUUID(long elementIndex) { return VkPhysicalDeviceIDProperties.get_driverUUID(this.segment(), elementIndex); } + /// Sets `driverUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_driverUUID.invokeExact(0L, elementIndex), index), ML_driverUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `driverUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_driverUUID(segment, 0L, elementIndex, value); } + /// Sets `driverUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties driverUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_driverUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `driverUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties driverUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_driverUUID(this.segment(), elementIndex, value); return this; } + + /// {@return `deviceLUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment get_deviceLUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_deviceLUID.invokeExact(0L, elementIndex), index), ML_deviceLUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `deviceLUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment get_deviceLUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceIDProperties.get_deviceLUID(segment, 0L, elementIndex); } + /// {@return `deviceLUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment deviceLUIDAt(long index, long elementIndex) { return VkPhysicalDeviceIDProperties.get_deviceLUID(this.segment(), index, elementIndex); } + /// {@return `deviceLUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment deviceLUID(long elementIndex) { return VkPhysicalDeviceIDProperties.get_deviceLUID(this.segment(), elementIndex); } + /// Sets `deviceLUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceLUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_deviceLUID.invokeExact(0L, elementIndex), index), ML_deviceLUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `deviceLUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceLUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_deviceLUID(segment, 0L, elementIndex, value); } + /// Sets `deviceLUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties deviceLUIDAt(long index, long elementIndex, @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_deviceLUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `deviceLUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties deviceLUID(long elementIndex, @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIDProperties.set_deviceLUID(this.segment(), elementIndex, value); return this; } + + /// {@return `deviceNodeMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceNodeMask(MemorySegment segment, long index) { return (int) VH_deviceNodeMask.get(segment, 0L, index); } + /// {@return `deviceNodeMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceNodeMask(MemorySegment segment) { return VkPhysicalDeviceIDProperties.get_deviceNodeMask(segment, 0L); } + /// {@return `deviceNodeMask` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceNodeMaskAt(long index) { return VkPhysicalDeviceIDProperties.get_deviceNodeMask(this.segment(), index); } + /// {@return `deviceNodeMask`} + public @CType("uint32_t") int deviceNodeMask() { return VkPhysicalDeviceIDProperties.get_deviceNodeMask(this.segment()); } + /// Sets `deviceNodeMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceNodeMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceNodeMask.set(segment, 0L, index, value); } + /// Sets `deviceNodeMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceNodeMask(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceIDProperties.set_deviceNodeMask(segment, 0L, value); } + /// Sets `deviceNodeMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties deviceNodeMaskAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceIDProperties.set_deviceNodeMask(this.segment(), index, value); return this; } + /// Sets `deviceNodeMask` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties deviceNodeMask(@CType("uint32_t") int value) { VkPhysicalDeviceIDProperties.set_deviceNodeMask(this.segment(), value); return this; } + + /// {@return `deviceLUIDValid` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceLUIDValid(MemorySegment segment, long index) { return (int) VH_deviceLUIDValid.get(segment, 0L, index); } + /// {@return `deviceLUIDValid`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceLUIDValid(MemorySegment segment) { return VkPhysicalDeviceIDProperties.get_deviceLUIDValid(segment, 0L); } + /// {@return `deviceLUIDValid` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceLUIDValidAt(long index) { return VkPhysicalDeviceIDProperties.get_deviceLUIDValid(this.segment(), index); } + /// {@return `deviceLUIDValid`} + public @CType("VkBool32") int deviceLUIDValid() { return VkPhysicalDeviceIDProperties.get_deviceLUIDValid(this.segment()); } + /// Sets `deviceLUIDValid` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceLUIDValid(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceLUIDValid.set(segment, 0L, index, value); } + /// Sets `deviceLUIDValid` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceLUIDValid(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceIDProperties.set_deviceLUIDValid(segment, 0L, value); } + /// Sets `deviceLUIDValid` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties deviceLUIDValidAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceIDProperties.set_deviceLUIDValid(this.segment(), index, value); return this; } + /// Sets `deviceLUIDValid` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIDProperties deviceLUIDValid(@CType("VkBool32") int value) { VkPhysicalDeviceIDProperties.set_deviceLUIDValid(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceImageFormatInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceImageFormatInfo2.java new file mode 100644 index 00000000..42e15d53 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceImageFormatInfo2.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### tiling +/// [VarHandle][#VH_tiling] - [Getter][#tiling()] - [Setter][#tiling(int)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageFormatInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkFormat format; +/// VkImageType type; +/// VkImageTiling tiling; +/// VkImageUsageFlags usage; +/// VkImageCreateFlags flags; +/// } VkPhysicalDeviceImageFormatInfo2; +/// ``` +public final class VkPhysicalDeviceImageFormatInfo2 extends Struct { + /// The struct layout of `VkPhysicalDeviceImageFormatInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("tiling"), + ValueLayout.JAVA_INT.withName("usage"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `tiling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tiling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tiling")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkPhysicalDeviceImageFormatInfo2` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageFormatInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageFormatInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageFormatInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageFormatInfo2(segment); } + + /// Creates `VkPhysicalDeviceImageFormatInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageFormatInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageFormatInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageFormatInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageFormatInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageFormatInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageFormatInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageFormatInfo2` + public static VkPhysicalDeviceImageFormatInfo2 alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageFormatInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageFormatInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageFormatInfo2` + public static VkPhysicalDeviceImageFormatInfo2 alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageFormatInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageFormatInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageFormatInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageFormatInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageFormatInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageFormatInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageFormatInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageFormatInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageFormatInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageFormatInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageFormatInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageFormatInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageFormatInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkPhysicalDeviceImageFormatInfo2.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkPhysicalDeviceImageFormatInfo2.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkPhysicalDeviceImageFormatInfo2.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkPhysicalDeviceImageFormatInfo2.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 formatAt(long index, @CType("VkFormat") int value) { VkPhysicalDeviceImageFormatInfo2.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 format(@CType("VkFormat") int value) { VkPhysicalDeviceImageFormatInfo2.set_format(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageType") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkImageType") int get_type(MemorySegment segment) { return VkPhysicalDeviceImageFormatInfo2.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkImageType") int typeAt(long index) { return VkPhysicalDeviceImageFormatInfo2.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkImageType") int type() { return VkPhysicalDeviceImageFormatInfo2.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkImageType") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkImageType") int value) { VkPhysicalDeviceImageFormatInfo2.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 typeAt(long index, @CType("VkImageType") int value) { VkPhysicalDeviceImageFormatInfo2.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 type(@CType("VkImageType") int value) { VkPhysicalDeviceImageFormatInfo2.set_type(this.segment(), value); return this; } + + /// {@return `tiling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageTiling") int get_tiling(MemorySegment segment, long index) { return (int) VH_tiling.get(segment, 0L, index); } + /// {@return `tiling`} + /// @param segment the segment of the struct + public static @CType("VkImageTiling") int get_tiling(MemorySegment segment) { return VkPhysicalDeviceImageFormatInfo2.get_tiling(segment, 0L); } + /// {@return `tiling` at the given index} + /// @param index the index + public @CType("VkImageTiling") int tilingAt(long index) { return VkPhysicalDeviceImageFormatInfo2.get_tiling(this.segment(), index); } + /// {@return `tiling`} + public @CType("VkImageTiling") int tiling() { return VkPhysicalDeviceImageFormatInfo2.get_tiling(this.segment()); } + /// Sets `tiling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tiling(MemorySegment segment, long index, @CType("VkImageTiling") int value) { VH_tiling.set(segment, 0L, index, value); } + /// Sets `tiling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tiling(MemorySegment segment, @CType("VkImageTiling") int value) { VkPhysicalDeviceImageFormatInfo2.set_tiling(segment, 0L, value); } + /// Sets `tiling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 tilingAt(long index, @CType("VkImageTiling") int value) { VkPhysicalDeviceImageFormatInfo2.set_tiling(this.segment(), index, value); return this; } + /// Sets `tiling` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 tiling(@CType("VkImageTiling") int value) { VkPhysicalDeviceImageFormatInfo2.set_tiling(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_usage(MemorySegment segment) { return VkPhysicalDeviceImageFormatInfo2.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int usageAt(long index) { return VkPhysicalDeviceImageFormatInfo2.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkImageUsageFlags") int usage() { return VkPhysicalDeviceImageFormatInfo2.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkPhysicalDeviceImageFormatInfo2.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 usageAt(long index, @CType("VkImageUsageFlags") int value) { VkPhysicalDeviceImageFormatInfo2.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 usage(@CType("VkImageUsageFlags") int value) { VkPhysicalDeviceImageFormatInfo2.set_usage(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkImageCreateFlags") int get_flags(MemorySegment segment) { return VkPhysicalDeviceImageFormatInfo2.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkImageCreateFlags") int flagsAt(long index) { return VkPhysicalDeviceImageFormatInfo2.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkImageCreateFlags") int flags() { return VkPhysicalDeviceImageFormatInfo2.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkImageCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkImageCreateFlags") int value) { VkPhysicalDeviceImageFormatInfo2.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 flagsAt(long index, @CType("VkImageCreateFlags") int value) { VkPhysicalDeviceImageFormatInfo2.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageFormatInfo2 flags(@CType("VkImageCreateFlags") int value) { VkPhysicalDeviceImageFormatInfo2.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceImageRobustnessFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceImageRobustnessFeatures.java new file mode 100644 index 00000000..bd0b2f7b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceImageRobustnessFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### robustImageAccess +/// [VarHandle][#VH_robustImageAccess] - [Getter][#robustImageAccess()] - [Setter][#robustImageAccess(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImageRobustnessFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 robustImageAccess; +/// } VkPhysicalDeviceImageRobustnessFeatures; +/// ``` +public final class VkPhysicalDeviceImageRobustnessFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceImageRobustnessFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("robustImageAccess") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `robustImageAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_robustImageAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustImageAccess")); + + /// Creates `VkPhysicalDeviceImageRobustnessFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImageRobustnessFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImageRobustnessFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageRobustnessFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageRobustnessFeatures(segment); } + + /// Creates `VkPhysicalDeviceImageRobustnessFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageRobustnessFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageRobustnessFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImageRobustnessFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImageRobustnessFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImageRobustnessFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImageRobustnessFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImageRobustnessFeatures` + public static VkPhysicalDeviceImageRobustnessFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImageRobustnessFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImageRobustnessFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImageRobustnessFeatures` + public static VkPhysicalDeviceImageRobustnessFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImageRobustnessFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImageRobustnessFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImageRobustnessFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImageRobustnessFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImageRobustnessFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageRobustnessFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImageRobustnessFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageRobustnessFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImageRobustnessFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImageRobustnessFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImageRobustnessFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImageRobustnessFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageRobustnessFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageRobustnessFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageRobustnessFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageRobustnessFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImageRobustnessFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `robustImageAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_robustImageAccess(MemorySegment segment, long index) { return (int) VH_robustImageAccess.get(segment, 0L, index); } + /// {@return `robustImageAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_robustImageAccess(MemorySegment segment) { return VkPhysicalDeviceImageRobustnessFeatures.get_robustImageAccess(segment, 0L); } + /// {@return `robustImageAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int robustImageAccessAt(long index) { return VkPhysicalDeviceImageRobustnessFeatures.get_robustImageAccess(this.segment(), index); } + /// {@return `robustImageAccess`} + public @CType("VkBool32") int robustImageAccess() { return VkPhysicalDeviceImageRobustnessFeatures.get_robustImageAccess(this.segment()); } + /// Sets `robustImageAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustImageAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_robustImageAccess.set(segment, 0L, index, value); } + /// Sets `robustImageAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustImageAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImageRobustnessFeatures.set_robustImageAccess(segment, 0L, value); } + /// Sets `robustImageAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageRobustnessFeatures robustImageAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImageRobustnessFeatures.set_robustImageAccess(this.segment(), index, value); return this; } + /// Sets `robustImageAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImageRobustnessFeatures robustImageAccess(@CType("VkBool32") int value) { VkPhysicalDeviceImageRobustnessFeatures.set_robustImageAccess(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceImagelessFramebufferFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceImagelessFramebufferFeatures.java new file mode 100644 index 00000000..3b48cf99 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceImagelessFramebufferFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imagelessFramebuffer +/// [VarHandle][#VH_imagelessFramebuffer] - [Getter][#imagelessFramebuffer()] - [Setter][#imagelessFramebuffer(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceImagelessFramebufferFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 imagelessFramebuffer; +/// } VkPhysicalDeviceImagelessFramebufferFeatures; +/// ``` +public final class VkPhysicalDeviceImagelessFramebufferFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceImagelessFramebufferFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("imagelessFramebuffer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imagelessFramebuffer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imagelessFramebuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imagelessFramebuffer")); + + /// Creates `VkPhysicalDeviceImagelessFramebufferFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceImagelessFramebufferFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceImagelessFramebufferFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImagelessFramebufferFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImagelessFramebufferFeatures(segment); } + + /// Creates `VkPhysicalDeviceImagelessFramebufferFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImagelessFramebufferFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImagelessFramebufferFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceImagelessFramebufferFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceImagelessFramebufferFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceImagelessFramebufferFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceImagelessFramebufferFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceImagelessFramebufferFeatures` + public static VkPhysicalDeviceImagelessFramebufferFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceImagelessFramebufferFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceImagelessFramebufferFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceImagelessFramebufferFeatures` + public static VkPhysicalDeviceImagelessFramebufferFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceImagelessFramebufferFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceImagelessFramebufferFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceImagelessFramebufferFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceImagelessFramebufferFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceImagelessFramebufferFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImagelessFramebufferFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceImagelessFramebufferFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImagelessFramebufferFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceImagelessFramebufferFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceImagelessFramebufferFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceImagelessFramebufferFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceImagelessFramebufferFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImagelessFramebufferFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImagelessFramebufferFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImagelessFramebufferFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImagelessFramebufferFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceImagelessFramebufferFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `imagelessFramebuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imagelessFramebuffer(MemorySegment segment, long index) { return (int) VH_imagelessFramebuffer.get(segment, 0L, index); } + /// {@return `imagelessFramebuffer`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imagelessFramebuffer(MemorySegment segment) { return VkPhysicalDeviceImagelessFramebufferFeatures.get_imagelessFramebuffer(segment, 0L); } + /// {@return `imagelessFramebuffer` at the given index} + /// @param index the index + public @CType("VkBool32") int imagelessFramebufferAt(long index) { return VkPhysicalDeviceImagelessFramebufferFeatures.get_imagelessFramebuffer(this.segment(), index); } + /// {@return `imagelessFramebuffer`} + public @CType("VkBool32") int imagelessFramebuffer() { return VkPhysicalDeviceImagelessFramebufferFeatures.get_imagelessFramebuffer(this.segment()); } + /// Sets `imagelessFramebuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imagelessFramebuffer(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imagelessFramebuffer.set(segment, 0L, index, value); } + /// Sets `imagelessFramebuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imagelessFramebuffer(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceImagelessFramebufferFeatures.set_imagelessFramebuffer(segment, 0L, value); } + /// Sets `imagelessFramebuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImagelessFramebufferFeatures imagelessFramebufferAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceImagelessFramebufferFeatures.set_imagelessFramebuffer(this.segment(), index, value); return this; } + /// Sets `imagelessFramebuffer` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceImagelessFramebufferFeatures imagelessFramebuffer(@CType("VkBool32") int value) { VkPhysicalDeviceImagelessFramebufferFeatures.set_imagelessFramebuffer(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceIndexTypeUint8Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceIndexTypeUint8Features.java new file mode 100644 index 00000000..1df38360 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceIndexTypeUint8Features.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### indexTypeUint8 +/// [VarHandle][#VH_indexTypeUint8] - [Getter][#indexTypeUint8()] - [Setter][#indexTypeUint8(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceIndexTypeUint8Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 indexTypeUint8; +/// } VkPhysicalDeviceIndexTypeUint8Features; +/// ``` +public final class VkPhysicalDeviceIndexTypeUint8Features extends Struct { + /// The struct layout of `VkPhysicalDeviceIndexTypeUint8Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("indexTypeUint8") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `indexTypeUint8` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexTypeUint8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexTypeUint8")); + + /// Creates `VkPhysicalDeviceIndexTypeUint8Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceIndexTypeUint8Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceIndexTypeUint8Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceIndexTypeUint8Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceIndexTypeUint8Features(segment); } + + /// Creates `VkPhysicalDeviceIndexTypeUint8Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceIndexTypeUint8Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceIndexTypeUint8Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceIndexTypeUint8Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceIndexTypeUint8Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceIndexTypeUint8Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceIndexTypeUint8Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceIndexTypeUint8Features` + public static VkPhysicalDeviceIndexTypeUint8Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceIndexTypeUint8Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceIndexTypeUint8Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceIndexTypeUint8Features` + public static VkPhysicalDeviceIndexTypeUint8Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceIndexTypeUint8Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceIndexTypeUint8Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceIndexTypeUint8Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceIndexTypeUint8Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceIndexTypeUint8Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIndexTypeUint8Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceIndexTypeUint8Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIndexTypeUint8Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceIndexTypeUint8Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceIndexTypeUint8Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceIndexTypeUint8Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceIndexTypeUint8Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIndexTypeUint8Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIndexTypeUint8Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIndexTypeUint8Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIndexTypeUint8Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceIndexTypeUint8Features.set_pNext(this.segment(), value); return this; } + + /// {@return `indexTypeUint8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_indexTypeUint8(MemorySegment segment, long index) { return (int) VH_indexTypeUint8.get(segment, 0L, index); } + /// {@return `indexTypeUint8`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_indexTypeUint8(MemorySegment segment) { return VkPhysicalDeviceIndexTypeUint8Features.get_indexTypeUint8(segment, 0L); } + /// {@return `indexTypeUint8` at the given index} + /// @param index the index + public @CType("VkBool32") int indexTypeUint8At(long index) { return VkPhysicalDeviceIndexTypeUint8Features.get_indexTypeUint8(this.segment(), index); } + /// {@return `indexTypeUint8`} + public @CType("VkBool32") int indexTypeUint8() { return VkPhysicalDeviceIndexTypeUint8Features.get_indexTypeUint8(this.segment()); } + /// Sets `indexTypeUint8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexTypeUint8(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_indexTypeUint8.set(segment, 0L, index, value); } + /// Sets `indexTypeUint8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexTypeUint8(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceIndexTypeUint8Features.set_indexTypeUint8(segment, 0L, value); } + /// Sets `indexTypeUint8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIndexTypeUint8Features indexTypeUint8At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceIndexTypeUint8Features.set_indexTypeUint8(this.segment(), index, value); return this; } + /// Sets `indexTypeUint8` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceIndexTypeUint8Features indexTypeUint8(@CType("VkBool32") int value) { VkPhysicalDeviceIndexTypeUint8Features.set_indexTypeUint8(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceInlineUniformBlockFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceInlineUniformBlockFeatures.java new file mode 100644 index 00000000..90b90f9b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceInlineUniformBlockFeatures.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### inlineUniformBlock +/// [VarHandle][#VH_inlineUniformBlock] - [Getter][#inlineUniformBlock()] - [Setter][#inlineUniformBlock(int)] +/// ### descriptorBindingInlineUniformBlockUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingInlineUniformBlockUpdateAfterBind] - [Getter][#descriptorBindingInlineUniformBlockUpdateAfterBind()] - [Setter][#descriptorBindingInlineUniformBlockUpdateAfterBind(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceInlineUniformBlockFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 inlineUniformBlock; +/// VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind; +/// } VkPhysicalDeviceInlineUniformBlockFeatures; +/// ``` +public final class VkPhysicalDeviceInlineUniformBlockFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceInlineUniformBlockFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("inlineUniformBlock"), + ValueLayout.JAVA_INT.withName("descriptorBindingInlineUniformBlockUpdateAfterBind") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `inlineUniformBlock` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inlineUniformBlock = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inlineUniformBlock")); + /// The [VarHandle] of `descriptorBindingInlineUniformBlockUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingInlineUniformBlockUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingInlineUniformBlockUpdateAfterBind")); + + /// Creates `VkPhysicalDeviceInlineUniformBlockFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceInlineUniformBlockFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceInlineUniformBlockFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInlineUniformBlockFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInlineUniformBlockFeatures(segment); } + + /// Creates `VkPhysicalDeviceInlineUniformBlockFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInlineUniformBlockFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInlineUniformBlockFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceInlineUniformBlockFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInlineUniformBlockFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInlineUniformBlockFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceInlineUniformBlockFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceInlineUniformBlockFeatures` + public static VkPhysicalDeviceInlineUniformBlockFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceInlineUniformBlockFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceInlineUniformBlockFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceInlineUniformBlockFeatures` + public static VkPhysicalDeviceInlineUniformBlockFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceInlineUniformBlockFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceInlineUniformBlockFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceInlineUniformBlockFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceInlineUniformBlockFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceInlineUniformBlockFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `inlineUniformBlock` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_inlineUniformBlock(MemorySegment segment, long index) { return (int) VH_inlineUniformBlock.get(segment, 0L, index); } + /// {@return `inlineUniformBlock`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_inlineUniformBlock(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockFeatures.get_inlineUniformBlock(segment, 0L); } + /// {@return `inlineUniformBlock` at the given index} + /// @param index the index + public @CType("VkBool32") int inlineUniformBlockAt(long index) { return VkPhysicalDeviceInlineUniformBlockFeatures.get_inlineUniformBlock(this.segment(), index); } + /// {@return `inlineUniformBlock`} + public @CType("VkBool32") int inlineUniformBlock() { return VkPhysicalDeviceInlineUniformBlockFeatures.get_inlineUniformBlock(this.segment()); } + /// Sets `inlineUniformBlock` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inlineUniformBlock(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_inlineUniformBlock.set(segment, 0L, index, value); } + /// Sets `inlineUniformBlock` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inlineUniformBlock(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_inlineUniformBlock(segment, 0L, value); } + /// Sets `inlineUniformBlock` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockFeatures inlineUniformBlockAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_inlineUniformBlock(this.segment(), index, value); return this; } + /// Sets `inlineUniformBlock` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockFeatures inlineUniformBlock(@CType("VkBool32") int value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_inlineUniformBlock(this.segment(), value); return this; } + + /// {@return `descriptorBindingInlineUniformBlockUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingInlineUniformBlockUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingInlineUniformBlockUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingInlineUniformBlockUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingInlineUniformBlockUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockFeatures.get_descriptorBindingInlineUniformBlockUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingInlineUniformBlockUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingInlineUniformBlockUpdateAfterBindAt(long index) { return VkPhysicalDeviceInlineUniformBlockFeatures.get_descriptorBindingInlineUniformBlockUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingInlineUniformBlockUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingInlineUniformBlockUpdateAfterBind() { return VkPhysicalDeviceInlineUniformBlockFeatures.get_descriptorBindingInlineUniformBlockUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingInlineUniformBlockUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingInlineUniformBlockUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingInlineUniformBlockUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingInlineUniformBlockUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingInlineUniformBlockUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_descriptorBindingInlineUniformBlockUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingInlineUniformBlockUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockFeatures descriptorBindingInlineUniformBlockUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_descriptorBindingInlineUniformBlockUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingInlineUniformBlockUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockFeatures descriptorBindingInlineUniformBlockUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceInlineUniformBlockFeatures.set_descriptorBindingInlineUniformBlockUpdateAfterBind(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceInlineUniformBlockProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceInlineUniformBlockProperties.java new file mode 100644 index 00000000..b359fc0e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceInlineUniformBlockProperties.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxInlineUniformBlockSize +/// [VarHandle][#VH_maxInlineUniformBlockSize] - [Getter][#maxInlineUniformBlockSize()] - [Setter][#maxInlineUniformBlockSize(int)] +/// ### maxPerStageDescriptorInlineUniformBlocks +/// [VarHandle][#VH_maxPerStageDescriptorInlineUniformBlocks] - [Getter][#maxPerStageDescriptorInlineUniformBlocks()] - [Setter][#maxPerStageDescriptorInlineUniformBlocks(int)] +/// ### maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks] - [Getter][#maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks()] - [Setter][#maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(int)] +/// ### maxDescriptorSetInlineUniformBlocks +/// [VarHandle][#VH_maxDescriptorSetInlineUniformBlocks] - [Getter][#maxDescriptorSetInlineUniformBlocks()] - [Setter][#maxDescriptorSetInlineUniformBlocks(int)] +/// ### maxDescriptorSetUpdateAfterBindInlineUniformBlocks +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindInlineUniformBlocks] - [Getter][#maxDescriptorSetUpdateAfterBindInlineUniformBlocks()] - [Setter][#maxDescriptorSetUpdateAfterBindInlineUniformBlocks(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceInlineUniformBlockProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxInlineUniformBlockSize; +/// uint32_t maxPerStageDescriptorInlineUniformBlocks; +/// uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; +/// uint32_t maxDescriptorSetInlineUniformBlocks; +/// uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks; +/// } VkPhysicalDeviceInlineUniformBlockProperties; +/// ``` +public final class VkPhysicalDeviceInlineUniformBlockProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceInlineUniformBlockProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxInlineUniformBlockSize"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorInlineUniformBlocks"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetInlineUniformBlocks"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindInlineUniformBlocks") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxInlineUniformBlockSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxInlineUniformBlockSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxInlineUniformBlockSize")); + /// The [VarHandle] of `maxPerStageDescriptorInlineUniformBlocks` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorInlineUniformBlocks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorInlineUniformBlocks")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks")); + /// The [VarHandle] of `maxDescriptorSetInlineUniformBlocks` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetInlineUniformBlocks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetInlineUniformBlocks")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindInlineUniformBlocks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindInlineUniformBlocks")); + + /// Creates `VkPhysicalDeviceInlineUniformBlockProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceInlineUniformBlockProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceInlineUniformBlockProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInlineUniformBlockProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInlineUniformBlockProperties(segment); } + + /// Creates `VkPhysicalDeviceInlineUniformBlockProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInlineUniformBlockProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInlineUniformBlockProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceInlineUniformBlockProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceInlineUniformBlockProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceInlineUniformBlockProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceInlineUniformBlockProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceInlineUniformBlockProperties` + public static VkPhysicalDeviceInlineUniformBlockProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceInlineUniformBlockProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceInlineUniformBlockProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceInlineUniformBlockProperties` + public static VkPhysicalDeviceInlineUniformBlockProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceInlineUniformBlockProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceInlineUniformBlockProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceInlineUniformBlockProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceInlineUniformBlockProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceInlineUniformBlockProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInlineUniformBlockProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInlineUniformBlockProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceInlineUniformBlockProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `maxInlineUniformBlockSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxInlineUniformBlockSize(MemorySegment segment, long index) { return (int) VH_maxInlineUniformBlockSize.get(segment, 0L, index); } + /// {@return `maxInlineUniformBlockSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxInlineUniformBlockSize(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxInlineUniformBlockSize(segment, 0L); } + /// {@return `maxInlineUniformBlockSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxInlineUniformBlockSizeAt(long index) { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxInlineUniformBlockSize(this.segment(), index); } + /// {@return `maxInlineUniformBlockSize`} + public @CType("uint32_t") int maxInlineUniformBlockSize() { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxInlineUniformBlockSize(this.segment()); } + /// Sets `maxInlineUniformBlockSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxInlineUniformBlockSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxInlineUniformBlockSize.set(segment, 0L, index, value); } + /// Sets `maxInlineUniformBlockSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxInlineUniformBlockSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxInlineUniformBlockSize(segment, 0L, value); } + /// Sets `maxInlineUniformBlockSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties maxInlineUniformBlockSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxInlineUniformBlockSize(this.segment(), index, value); return this; } + /// Sets `maxInlineUniformBlockSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties maxInlineUniformBlockSize(@CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxInlineUniformBlockSize(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorInlineUniformBlocks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorInlineUniformBlocks(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorInlineUniformBlocks.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorInlineUniformBlocks`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorInlineUniformBlocks(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxPerStageDescriptorInlineUniformBlocks(segment, 0L); } + /// {@return `maxPerStageDescriptorInlineUniformBlocks` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorInlineUniformBlocksAt(long index) { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxPerStageDescriptorInlineUniformBlocks(this.segment(), index); } + /// {@return `maxPerStageDescriptorInlineUniformBlocks`} + public @CType("uint32_t") int maxPerStageDescriptorInlineUniformBlocks() { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxPerStageDescriptorInlineUniformBlocks(this.segment()); } + /// Sets `maxPerStageDescriptorInlineUniformBlocks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorInlineUniformBlocks(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorInlineUniformBlocks.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorInlineUniformBlocks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorInlineUniformBlocks(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxPerStageDescriptorInlineUniformBlocks(segment, 0L, value); } + /// Sets `maxPerStageDescriptorInlineUniformBlocks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties maxPerStageDescriptorInlineUniformBlocksAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxPerStageDescriptorInlineUniformBlocks(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorInlineUniformBlocks` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties maxPerStageDescriptorInlineUniformBlocks(@CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxPerStageDescriptorInlineUniformBlocks(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindInlineUniformBlocksAt(long index) { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks() { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties maxPerStageDescriptorUpdateAfterBindInlineUniformBlocksAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(@CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetInlineUniformBlocks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetInlineUniformBlocks(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetInlineUniformBlocks.get(segment, 0L, index); } + /// {@return `maxDescriptorSetInlineUniformBlocks`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetInlineUniformBlocks(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxDescriptorSetInlineUniformBlocks(segment, 0L); } + /// {@return `maxDescriptorSetInlineUniformBlocks` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetInlineUniformBlocksAt(long index) { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxDescriptorSetInlineUniformBlocks(this.segment(), index); } + /// {@return `maxDescriptorSetInlineUniformBlocks`} + public @CType("uint32_t") int maxDescriptorSetInlineUniformBlocks() { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxDescriptorSetInlineUniformBlocks(this.segment()); } + /// Sets `maxDescriptorSetInlineUniformBlocks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetInlineUniformBlocks(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetInlineUniformBlocks.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetInlineUniformBlocks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetInlineUniformBlocks(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxDescriptorSetInlineUniformBlocks(segment, 0L, value); } + /// Sets `maxDescriptorSetInlineUniformBlocks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties maxDescriptorSetInlineUniformBlocksAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxDescriptorSetInlineUniformBlocks(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetInlineUniformBlocks` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties maxDescriptorSetInlineUniformBlocks(@CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxDescriptorSetInlineUniformBlocks(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindInlineUniformBlocks.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindInlineUniformBlocks`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(MemorySegment segment) { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindInlineUniformBlocksAt(long index) { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindInlineUniformBlocks`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindInlineUniformBlocks() { return VkPhysicalDeviceInlineUniformBlockProperties.get_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindInlineUniformBlocks.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties maxDescriptorSetUpdateAfterBindInlineUniformBlocksAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceInlineUniformBlockProperties maxDescriptorSetUpdateAfterBindInlineUniformBlocks(@CType("uint32_t") int value) { VkPhysicalDeviceInlineUniformBlockProperties.set_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceLimits.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceLimits.java new file mode 100644 index 00000000..5b21c7a2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceLimits.java @@ -0,0 +1,4092 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### maxImageDimension1D +/// [VarHandle][#VH_maxImageDimension1D] - [Getter][#maxImageDimension1D()] - [Setter][#maxImageDimension1D(int)] +/// ### maxImageDimension2D +/// [VarHandle][#VH_maxImageDimension2D] - [Getter][#maxImageDimension2D()] - [Setter][#maxImageDimension2D(int)] +/// ### maxImageDimension3D +/// [VarHandle][#VH_maxImageDimension3D] - [Getter][#maxImageDimension3D()] - [Setter][#maxImageDimension3D(int)] +/// ### maxImageDimensionCube +/// [VarHandle][#VH_maxImageDimensionCube] - [Getter][#maxImageDimensionCube()] - [Setter][#maxImageDimensionCube(int)] +/// ### maxImageArrayLayers +/// [VarHandle][#VH_maxImageArrayLayers] - [Getter][#maxImageArrayLayers()] - [Setter][#maxImageArrayLayers(int)] +/// ### maxTexelBufferElements +/// [VarHandle][#VH_maxTexelBufferElements] - [Getter][#maxTexelBufferElements()] - [Setter][#maxTexelBufferElements(int)] +/// ### maxUniformBufferRange +/// [VarHandle][#VH_maxUniformBufferRange] - [Getter][#maxUniformBufferRange()] - [Setter][#maxUniformBufferRange(int)] +/// ### maxStorageBufferRange +/// [VarHandle][#VH_maxStorageBufferRange] - [Getter][#maxStorageBufferRange()] - [Setter][#maxStorageBufferRange(int)] +/// ### maxPushConstantsSize +/// [VarHandle][#VH_maxPushConstantsSize] - [Getter][#maxPushConstantsSize()] - [Setter][#maxPushConstantsSize(int)] +/// ### maxMemoryAllocationCount +/// [VarHandle][#VH_maxMemoryAllocationCount] - [Getter][#maxMemoryAllocationCount()] - [Setter][#maxMemoryAllocationCount(int)] +/// ### maxSamplerAllocationCount +/// [VarHandle][#VH_maxSamplerAllocationCount] - [Getter][#maxSamplerAllocationCount()] - [Setter][#maxSamplerAllocationCount(int)] +/// ### bufferImageGranularity +/// [VarHandle][#VH_bufferImageGranularity] - [Getter][#bufferImageGranularity()] - [Setter][#bufferImageGranularity(long)] +/// ### sparseAddressSpaceSize +/// [VarHandle][#VH_sparseAddressSpaceSize] - [Getter][#sparseAddressSpaceSize()] - [Setter][#sparseAddressSpaceSize(long)] +/// ### maxBoundDescriptorSets +/// [VarHandle][#VH_maxBoundDescriptorSets] - [Getter][#maxBoundDescriptorSets()] - [Setter][#maxBoundDescriptorSets(int)] +/// ### maxPerStageDescriptorSamplers +/// [VarHandle][#VH_maxPerStageDescriptorSamplers] - [Getter][#maxPerStageDescriptorSamplers()] - [Setter][#maxPerStageDescriptorSamplers(int)] +/// ### maxPerStageDescriptorUniformBuffers +/// [VarHandle][#VH_maxPerStageDescriptorUniformBuffers] - [Getter][#maxPerStageDescriptorUniformBuffers()] - [Setter][#maxPerStageDescriptorUniformBuffers(int)] +/// ### maxPerStageDescriptorStorageBuffers +/// [VarHandle][#VH_maxPerStageDescriptorStorageBuffers] - [Getter][#maxPerStageDescriptorStorageBuffers()] - [Setter][#maxPerStageDescriptorStorageBuffers(int)] +/// ### maxPerStageDescriptorSampledImages +/// [VarHandle][#VH_maxPerStageDescriptorSampledImages] - [Getter][#maxPerStageDescriptorSampledImages()] - [Setter][#maxPerStageDescriptorSampledImages(int)] +/// ### maxPerStageDescriptorStorageImages +/// [VarHandle][#VH_maxPerStageDescriptorStorageImages] - [Getter][#maxPerStageDescriptorStorageImages()] - [Setter][#maxPerStageDescriptorStorageImages(int)] +/// ### maxPerStageDescriptorInputAttachments +/// [VarHandle][#VH_maxPerStageDescriptorInputAttachments] - [Getter][#maxPerStageDescriptorInputAttachments()] - [Setter][#maxPerStageDescriptorInputAttachments(int)] +/// ### maxPerStageResources +/// [VarHandle][#VH_maxPerStageResources] - [Getter][#maxPerStageResources()] - [Setter][#maxPerStageResources(int)] +/// ### maxDescriptorSetSamplers +/// [VarHandle][#VH_maxDescriptorSetSamplers] - [Getter][#maxDescriptorSetSamplers()] - [Setter][#maxDescriptorSetSamplers(int)] +/// ### maxDescriptorSetUniformBuffers +/// [VarHandle][#VH_maxDescriptorSetUniformBuffers] - [Getter][#maxDescriptorSetUniformBuffers()] - [Setter][#maxDescriptorSetUniformBuffers(int)] +/// ### maxDescriptorSetUniformBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetUniformBuffersDynamic] - [Getter][#maxDescriptorSetUniformBuffersDynamic()] - [Setter][#maxDescriptorSetUniformBuffersDynamic(int)] +/// ### maxDescriptorSetStorageBuffers +/// [VarHandle][#VH_maxDescriptorSetStorageBuffers] - [Getter][#maxDescriptorSetStorageBuffers()] - [Setter][#maxDescriptorSetStorageBuffers(int)] +/// ### maxDescriptorSetStorageBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetStorageBuffersDynamic] - [Getter][#maxDescriptorSetStorageBuffersDynamic()] - [Setter][#maxDescriptorSetStorageBuffersDynamic(int)] +/// ### maxDescriptorSetSampledImages +/// [VarHandle][#VH_maxDescriptorSetSampledImages] - [Getter][#maxDescriptorSetSampledImages()] - [Setter][#maxDescriptorSetSampledImages(int)] +/// ### maxDescriptorSetStorageImages +/// [VarHandle][#VH_maxDescriptorSetStorageImages] - [Getter][#maxDescriptorSetStorageImages()] - [Setter][#maxDescriptorSetStorageImages(int)] +/// ### maxDescriptorSetInputAttachments +/// [VarHandle][#VH_maxDescriptorSetInputAttachments] - [Getter][#maxDescriptorSetInputAttachments()] - [Setter][#maxDescriptorSetInputAttachments(int)] +/// ### maxVertexInputAttributes +/// [VarHandle][#VH_maxVertexInputAttributes] - [Getter][#maxVertexInputAttributes()] - [Setter][#maxVertexInputAttributes(int)] +/// ### maxVertexInputBindings +/// [VarHandle][#VH_maxVertexInputBindings] - [Getter][#maxVertexInputBindings()] - [Setter][#maxVertexInputBindings(int)] +/// ### maxVertexInputAttributeOffset +/// [VarHandle][#VH_maxVertexInputAttributeOffset] - [Getter][#maxVertexInputAttributeOffset()] - [Setter][#maxVertexInputAttributeOffset(int)] +/// ### maxVertexInputBindingStride +/// [VarHandle][#VH_maxVertexInputBindingStride] - [Getter][#maxVertexInputBindingStride()] - [Setter][#maxVertexInputBindingStride(int)] +/// ### maxVertexOutputComponents +/// [VarHandle][#VH_maxVertexOutputComponents] - [Getter][#maxVertexOutputComponents()] - [Setter][#maxVertexOutputComponents(int)] +/// ### maxTessellationGenerationLevel +/// [VarHandle][#VH_maxTessellationGenerationLevel] - [Getter][#maxTessellationGenerationLevel()] - [Setter][#maxTessellationGenerationLevel(int)] +/// ### maxTessellationPatchSize +/// [VarHandle][#VH_maxTessellationPatchSize] - [Getter][#maxTessellationPatchSize()] - [Setter][#maxTessellationPatchSize(int)] +/// ### maxTessellationControlPerVertexInputComponents +/// [VarHandle][#VH_maxTessellationControlPerVertexInputComponents] - [Getter][#maxTessellationControlPerVertexInputComponents()] - [Setter][#maxTessellationControlPerVertexInputComponents(int)] +/// ### maxTessellationControlPerVertexOutputComponents +/// [VarHandle][#VH_maxTessellationControlPerVertexOutputComponents] - [Getter][#maxTessellationControlPerVertexOutputComponents()] - [Setter][#maxTessellationControlPerVertexOutputComponents(int)] +/// ### maxTessellationControlPerPatchOutputComponents +/// [VarHandle][#VH_maxTessellationControlPerPatchOutputComponents] - [Getter][#maxTessellationControlPerPatchOutputComponents()] - [Setter][#maxTessellationControlPerPatchOutputComponents(int)] +/// ### maxTessellationControlTotalOutputComponents +/// [VarHandle][#VH_maxTessellationControlTotalOutputComponents] - [Getter][#maxTessellationControlTotalOutputComponents()] - [Setter][#maxTessellationControlTotalOutputComponents(int)] +/// ### maxTessellationEvaluationInputComponents +/// [VarHandle][#VH_maxTessellationEvaluationInputComponents] - [Getter][#maxTessellationEvaluationInputComponents()] - [Setter][#maxTessellationEvaluationInputComponents(int)] +/// ### maxTessellationEvaluationOutputComponents +/// [VarHandle][#VH_maxTessellationEvaluationOutputComponents] - [Getter][#maxTessellationEvaluationOutputComponents()] - [Setter][#maxTessellationEvaluationOutputComponents(int)] +/// ### maxGeometryShaderInvocations +/// [VarHandle][#VH_maxGeometryShaderInvocations] - [Getter][#maxGeometryShaderInvocations()] - [Setter][#maxGeometryShaderInvocations(int)] +/// ### maxGeometryInputComponents +/// [VarHandle][#VH_maxGeometryInputComponents] - [Getter][#maxGeometryInputComponents()] - [Setter][#maxGeometryInputComponents(int)] +/// ### maxGeometryOutputComponents +/// [VarHandle][#VH_maxGeometryOutputComponents] - [Getter][#maxGeometryOutputComponents()] - [Setter][#maxGeometryOutputComponents(int)] +/// ### maxGeometryOutputVertices +/// [VarHandle][#VH_maxGeometryOutputVertices] - [Getter][#maxGeometryOutputVertices()] - [Setter][#maxGeometryOutputVertices(int)] +/// ### maxGeometryTotalOutputComponents +/// [VarHandle][#VH_maxGeometryTotalOutputComponents] - [Getter][#maxGeometryTotalOutputComponents()] - [Setter][#maxGeometryTotalOutputComponents(int)] +/// ### maxFragmentInputComponents +/// [VarHandle][#VH_maxFragmentInputComponents] - [Getter][#maxFragmentInputComponents()] - [Setter][#maxFragmentInputComponents(int)] +/// ### maxFragmentOutputAttachments +/// [VarHandle][#VH_maxFragmentOutputAttachments] - [Getter][#maxFragmentOutputAttachments()] - [Setter][#maxFragmentOutputAttachments(int)] +/// ### maxFragmentDualSrcAttachments +/// [VarHandle][#VH_maxFragmentDualSrcAttachments] - [Getter][#maxFragmentDualSrcAttachments()] - [Setter][#maxFragmentDualSrcAttachments(int)] +/// ### maxFragmentCombinedOutputResources +/// [VarHandle][#VH_maxFragmentCombinedOutputResources] - [Getter][#maxFragmentCombinedOutputResources()] - [Setter][#maxFragmentCombinedOutputResources(int)] +/// ### maxComputeSharedMemorySize +/// [VarHandle][#VH_maxComputeSharedMemorySize] - [Getter][#maxComputeSharedMemorySize()] - [Setter][#maxComputeSharedMemorySize(int)] +/// ### maxComputeWorkGroupCount +/// [Byte offset handle][#MH_maxComputeWorkGroupCount] - [Memory layout][#ML_maxComputeWorkGroupCount] - [Getter][#maxComputeWorkGroupCount(long)] - [Setter][#maxComputeWorkGroupCount(long, java.lang.foreign.MemorySegment)] +/// ### maxComputeWorkGroupInvocations +/// [VarHandle][#VH_maxComputeWorkGroupInvocations] - [Getter][#maxComputeWorkGroupInvocations()] - [Setter][#maxComputeWorkGroupInvocations(int)] +/// ### maxComputeWorkGroupSize +/// [Byte offset handle][#MH_maxComputeWorkGroupSize] - [Memory layout][#ML_maxComputeWorkGroupSize] - [Getter][#maxComputeWorkGroupSize(long)] - [Setter][#maxComputeWorkGroupSize(long, java.lang.foreign.MemorySegment)] +/// ### subPixelPrecisionBits +/// [VarHandle][#VH_subPixelPrecisionBits] - [Getter][#subPixelPrecisionBits()] - [Setter][#subPixelPrecisionBits(int)] +/// ### subTexelPrecisionBits +/// [VarHandle][#VH_subTexelPrecisionBits] - [Getter][#subTexelPrecisionBits()] - [Setter][#subTexelPrecisionBits(int)] +/// ### mipmapPrecisionBits +/// [VarHandle][#VH_mipmapPrecisionBits] - [Getter][#mipmapPrecisionBits()] - [Setter][#mipmapPrecisionBits(int)] +/// ### maxDrawIndexedIndexValue +/// [VarHandle][#VH_maxDrawIndexedIndexValue] - [Getter][#maxDrawIndexedIndexValue()] - [Setter][#maxDrawIndexedIndexValue(int)] +/// ### maxDrawIndirectCount +/// [VarHandle][#VH_maxDrawIndirectCount] - [Getter][#maxDrawIndirectCount()] - [Setter][#maxDrawIndirectCount(int)] +/// ### maxSamplerLodBias +/// [VarHandle][#VH_maxSamplerLodBias] - [Getter][#maxSamplerLodBias()] - [Setter][#maxSamplerLodBias(float)] +/// ### maxSamplerAnisotropy +/// [VarHandle][#VH_maxSamplerAnisotropy] - [Getter][#maxSamplerAnisotropy()] - [Setter][#maxSamplerAnisotropy(float)] +/// ### maxViewports +/// [VarHandle][#VH_maxViewports] - [Getter][#maxViewports()] - [Setter][#maxViewports(int)] +/// ### maxViewportDimensions +/// [Byte offset handle][#MH_maxViewportDimensions] - [Memory layout][#ML_maxViewportDimensions] - [Getter][#maxViewportDimensions(long)] - [Setter][#maxViewportDimensions(long, java.lang.foreign.MemorySegment)] +/// ### viewportBoundsRange +/// [Byte offset handle][#MH_viewportBoundsRange] - [Memory layout][#ML_viewportBoundsRange] - [Getter][#viewportBoundsRange(long)] - [Setter][#viewportBoundsRange(long, java.lang.foreign.MemorySegment)] +/// ### viewportSubPixelBits +/// [VarHandle][#VH_viewportSubPixelBits] - [Getter][#viewportSubPixelBits()] - [Setter][#viewportSubPixelBits(int)] +/// ### minMemoryMapAlignment +/// [VarHandle][#VH_minMemoryMapAlignment] - [Getter][#minMemoryMapAlignment()] - [Setter][#minMemoryMapAlignment(long)] +/// ### minTexelBufferOffsetAlignment +/// [VarHandle][#VH_minTexelBufferOffsetAlignment] - [Getter][#minTexelBufferOffsetAlignment()] - [Setter][#minTexelBufferOffsetAlignment(long)] +/// ### minUniformBufferOffsetAlignment +/// [VarHandle][#VH_minUniformBufferOffsetAlignment] - [Getter][#minUniformBufferOffsetAlignment()] - [Setter][#minUniformBufferOffsetAlignment(long)] +/// ### minStorageBufferOffsetAlignment +/// [VarHandle][#VH_minStorageBufferOffsetAlignment] - [Getter][#minStorageBufferOffsetAlignment()] - [Setter][#minStorageBufferOffsetAlignment(long)] +/// ### minTexelOffset +/// [VarHandle][#VH_minTexelOffset] - [Getter][#minTexelOffset()] - [Setter][#minTexelOffset(int)] +/// ### maxTexelOffset +/// [VarHandle][#VH_maxTexelOffset] - [Getter][#maxTexelOffset()] - [Setter][#maxTexelOffset(int)] +/// ### minTexelGatherOffset +/// [VarHandle][#VH_minTexelGatherOffset] - [Getter][#minTexelGatherOffset()] - [Setter][#minTexelGatherOffset(int)] +/// ### maxTexelGatherOffset +/// [VarHandle][#VH_maxTexelGatherOffset] - [Getter][#maxTexelGatherOffset()] - [Setter][#maxTexelGatherOffset(int)] +/// ### minInterpolationOffset +/// [VarHandle][#VH_minInterpolationOffset] - [Getter][#minInterpolationOffset()] - [Setter][#minInterpolationOffset(float)] +/// ### maxInterpolationOffset +/// [VarHandle][#VH_maxInterpolationOffset] - [Getter][#maxInterpolationOffset()] - [Setter][#maxInterpolationOffset(float)] +/// ### subPixelInterpolationOffsetBits +/// [VarHandle][#VH_subPixelInterpolationOffsetBits] - [Getter][#subPixelInterpolationOffsetBits()] - [Setter][#subPixelInterpolationOffsetBits(int)] +/// ### maxFramebufferWidth +/// [VarHandle][#VH_maxFramebufferWidth] - [Getter][#maxFramebufferWidth()] - [Setter][#maxFramebufferWidth(int)] +/// ### maxFramebufferHeight +/// [VarHandle][#VH_maxFramebufferHeight] - [Getter][#maxFramebufferHeight()] - [Setter][#maxFramebufferHeight(int)] +/// ### maxFramebufferLayers +/// [VarHandle][#VH_maxFramebufferLayers] - [Getter][#maxFramebufferLayers()] - [Setter][#maxFramebufferLayers(int)] +/// ### framebufferColorSampleCounts +/// [VarHandle][#VH_framebufferColorSampleCounts] - [Getter][#framebufferColorSampleCounts()] - [Setter][#framebufferColorSampleCounts(int)] +/// ### framebufferDepthSampleCounts +/// [VarHandle][#VH_framebufferDepthSampleCounts] - [Getter][#framebufferDepthSampleCounts()] - [Setter][#framebufferDepthSampleCounts(int)] +/// ### framebufferStencilSampleCounts +/// [VarHandle][#VH_framebufferStencilSampleCounts] - [Getter][#framebufferStencilSampleCounts()] - [Setter][#framebufferStencilSampleCounts(int)] +/// ### framebufferNoAttachmentsSampleCounts +/// [VarHandle][#VH_framebufferNoAttachmentsSampleCounts] - [Getter][#framebufferNoAttachmentsSampleCounts()] - [Setter][#framebufferNoAttachmentsSampleCounts(int)] +/// ### maxColorAttachments +/// [VarHandle][#VH_maxColorAttachments] - [Getter][#maxColorAttachments()] - [Setter][#maxColorAttachments(int)] +/// ### sampledImageColorSampleCounts +/// [VarHandle][#VH_sampledImageColorSampleCounts] - [Getter][#sampledImageColorSampleCounts()] - [Setter][#sampledImageColorSampleCounts(int)] +/// ### sampledImageIntegerSampleCounts +/// [VarHandle][#VH_sampledImageIntegerSampleCounts] - [Getter][#sampledImageIntegerSampleCounts()] - [Setter][#sampledImageIntegerSampleCounts(int)] +/// ### sampledImageDepthSampleCounts +/// [VarHandle][#VH_sampledImageDepthSampleCounts] - [Getter][#sampledImageDepthSampleCounts()] - [Setter][#sampledImageDepthSampleCounts(int)] +/// ### sampledImageStencilSampleCounts +/// [VarHandle][#VH_sampledImageStencilSampleCounts] - [Getter][#sampledImageStencilSampleCounts()] - [Setter][#sampledImageStencilSampleCounts(int)] +/// ### storageImageSampleCounts +/// [VarHandle][#VH_storageImageSampleCounts] - [Getter][#storageImageSampleCounts()] - [Setter][#storageImageSampleCounts(int)] +/// ### maxSampleMaskWords +/// [VarHandle][#VH_maxSampleMaskWords] - [Getter][#maxSampleMaskWords()] - [Setter][#maxSampleMaskWords(int)] +/// ### timestampComputeAndGraphics +/// [VarHandle][#VH_timestampComputeAndGraphics] - [Getter][#timestampComputeAndGraphics()] - [Setter][#timestampComputeAndGraphics(int)] +/// ### timestampPeriod +/// [VarHandle][#VH_timestampPeriod] - [Getter][#timestampPeriod()] - [Setter][#timestampPeriod(float)] +/// ### maxClipDistances +/// [VarHandle][#VH_maxClipDistances] - [Getter][#maxClipDistances()] - [Setter][#maxClipDistances(int)] +/// ### maxCullDistances +/// [VarHandle][#VH_maxCullDistances] - [Getter][#maxCullDistances()] - [Setter][#maxCullDistances(int)] +/// ### maxCombinedClipAndCullDistances +/// [VarHandle][#VH_maxCombinedClipAndCullDistances] - [Getter][#maxCombinedClipAndCullDistances()] - [Setter][#maxCombinedClipAndCullDistances(int)] +/// ### discreteQueuePriorities +/// [VarHandle][#VH_discreteQueuePriorities] - [Getter][#discreteQueuePriorities()] - [Setter][#discreteQueuePriorities(int)] +/// ### pointSizeRange +/// [Byte offset handle][#MH_pointSizeRange] - [Memory layout][#ML_pointSizeRange] - [Getter][#pointSizeRange(long)] - [Setter][#pointSizeRange(long, java.lang.foreign.MemorySegment)] +/// ### lineWidthRange +/// [Byte offset handle][#MH_lineWidthRange] - [Memory layout][#ML_lineWidthRange] - [Getter][#lineWidthRange(long)] - [Setter][#lineWidthRange(long, java.lang.foreign.MemorySegment)] +/// ### pointSizeGranularity +/// [VarHandle][#VH_pointSizeGranularity] - [Getter][#pointSizeGranularity()] - [Setter][#pointSizeGranularity(float)] +/// ### lineWidthGranularity +/// [VarHandle][#VH_lineWidthGranularity] - [Getter][#lineWidthGranularity()] - [Setter][#lineWidthGranularity(float)] +/// ### strictLines +/// [VarHandle][#VH_strictLines] - [Getter][#strictLines()] - [Setter][#strictLines(int)] +/// ### standardSampleLocations +/// [VarHandle][#VH_standardSampleLocations] - [Getter][#standardSampleLocations()] - [Setter][#standardSampleLocations(int)] +/// ### optimalBufferCopyOffsetAlignment +/// [VarHandle][#VH_optimalBufferCopyOffsetAlignment] - [Getter][#optimalBufferCopyOffsetAlignment()] - [Setter][#optimalBufferCopyOffsetAlignment(long)] +/// ### optimalBufferCopyRowPitchAlignment +/// [VarHandle][#VH_optimalBufferCopyRowPitchAlignment] - [Getter][#optimalBufferCopyRowPitchAlignment()] - [Setter][#optimalBufferCopyRowPitchAlignment(long)] +/// ### nonCoherentAtomSize +/// [VarHandle][#VH_nonCoherentAtomSize] - [Getter][#nonCoherentAtomSize()] - [Setter][#nonCoherentAtomSize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLimits { +/// uint32_t maxImageDimension1D; +/// uint32_t maxImageDimension2D; +/// uint32_t maxImageDimension3D; +/// uint32_t maxImageDimensionCube; +/// uint32_t maxImageArrayLayers; +/// uint32_t maxTexelBufferElements; +/// uint32_t maxUniformBufferRange; +/// uint32_t maxStorageBufferRange; +/// uint32_t maxPushConstantsSize; +/// uint32_t maxMemoryAllocationCount; +/// uint32_t maxSamplerAllocationCount; +/// VkDeviceSize bufferImageGranularity; +/// VkDeviceSize sparseAddressSpaceSize; +/// uint32_t maxBoundDescriptorSets; +/// uint32_t maxPerStageDescriptorSamplers; +/// uint32_t maxPerStageDescriptorUniformBuffers; +/// uint32_t maxPerStageDescriptorStorageBuffers; +/// uint32_t maxPerStageDescriptorSampledImages; +/// uint32_t maxPerStageDescriptorStorageImages; +/// uint32_t maxPerStageDescriptorInputAttachments; +/// uint32_t maxPerStageResources; +/// uint32_t maxDescriptorSetSamplers; +/// uint32_t maxDescriptorSetUniformBuffers; +/// uint32_t maxDescriptorSetUniformBuffersDynamic; +/// uint32_t maxDescriptorSetStorageBuffers; +/// uint32_t maxDescriptorSetStorageBuffersDynamic; +/// uint32_t maxDescriptorSetSampledImages; +/// uint32_t maxDescriptorSetStorageImages; +/// uint32_t maxDescriptorSetInputAttachments; +/// uint32_t maxVertexInputAttributes; +/// uint32_t maxVertexInputBindings; +/// uint32_t maxVertexInputAttributeOffset; +/// uint32_t maxVertexInputBindingStride; +/// uint32_t maxVertexOutputComponents; +/// uint32_t maxTessellationGenerationLevel; +/// uint32_t maxTessellationPatchSize; +/// uint32_t maxTessellationControlPerVertexInputComponents; +/// uint32_t maxTessellationControlPerVertexOutputComponents; +/// uint32_t maxTessellationControlPerPatchOutputComponents; +/// uint32_t maxTessellationControlTotalOutputComponents; +/// uint32_t maxTessellationEvaluationInputComponents; +/// uint32_t maxTessellationEvaluationOutputComponents; +/// uint32_t maxGeometryShaderInvocations; +/// uint32_t maxGeometryInputComponents; +/// uint32_t maxGeometryOutputComponents; +/// uint32_t maxGeometryOutputVertices; +/// uint32_t maxGeometryTotalOutputComponents; +/// uint32_t maxFragmentInputComponents; +/// uint32_t maxFragmentOutputAttachments; +/// uint32_t maxFragmentDualSrcAttachments; +/// uint32_t maxFragmentCombinedOutputResources; +/// uint32_t maxComputeSharedMemorySize; +/// uint32_t[3] maxComputeWorkGroupCount; +/// uint32_t maxComputeWorkGroupInvocations; +/// uint32_t[3] maxComputeWorkGroupSize; +/// uint32_t subPixelPrecisionBits; +/// uint32_t subTexelPrecisionBits; +/// uint32_t mipmapPrecisionBits; +/// uint32_t maxDrawIndexedIndexValue; +/// uint32_t maxDrawIndirectCount; +/// float maxSamplerLodBias; +/// float maxSamplerAnisotropy; +/// uint32_t maxViewports; +/// uint32_t[2] maxViewportDimensions; +/// float[2] viewportBoundsRange; +/// uint32_t viewportSubPixelBits; +/// size_t minMemoryMapAlignment; +/// VkDeviceSize minTexelBufferOffsetAlignment; +/// VkDeviceSize minUniformBufferOffsetAlignment; +/// VkDeviceSize minStorageBufferOffsetAlignment; +/// int32_t minTexelOffset; +/// uint32_t maxTexelOffset; +/// int32_t minTexelGatherOffset; +/// uint32_t maxTexelGatherOffset; +/// float minInterpolationOffset; +/// float maxInterpolationOffset; +/// uint32_t subPixelInterpolationOffsetBits; +/// uint32_t maxFramebufferWidth; +/// uint32_t maxFramebufferHeight; +/// uint32_t maxFramebufferLayers; +/// VkSampleCountFlags framebufferColorSampleCounts; +/// VkSampleCountFlags framebufferDepthSampleCounts; +/// VkSampleCountFlags framebufferStencilSampleCounts; +/// VkSampleCountFlags framebufferNoAttachmentsSampleCounts; +/// uint32_t maxColorAttachments; +/// VkSampleCountFlags sampledImageColorSampleCounts; +/// VkSampleCountFlags sampledImageIntegerSampleCounts; +/// VkSampleCountFlags sampledImageDepthSampleCounts; +/// VkSampleCountFlags sampledImageStencilSampleCounts; +/// VkSampleCountFlags storageImageSampleCounts; +/// uint32_t maxSampleMaskWords; +/// VkBool32 timestampComputeAndGraphics; +/// float timestampPeriod; +/// uint32_t maxClipDistances; +/// uint32_t maxCullDistances; +/// uint32_t maxCombinedClipAndCullDistances; +/// uint32_t discreteQueuePriorities; +/// float[2] pointSizeRange; +/// float[2] lineWidthRange; +/// float pointSizeGranularity; +/// float lineWidthGranularity; +/// VkBool32 strictLines; +/// VkBool32 standardSampleLocations; +/// VkDeviceSize optimalBufferCopyOffsetAlignment; +/// VkDeviceSize optimalBufferCopyRowPitchAlignment; +/// VkDeviceSize nonCoherentAtomSize; +/// } VkPhysicalDeviceLimits; +/// ``` +public final class VkPhysicalDeviceLimits extends Struct { + /// The struct layout of `VkPhysicalDeviceLimits`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("maxImageDimension1D"), + ValueLayout.JAVA_INT.withName("maxImageDimension2D"), + ValueLayout.JAVA_INT.withName("maxImageDimension3D"), + ValueLayout.JAVA_INT.withName("maxImageDimensionCube"), + ValueLayout.JAVA_INT.withName("maxImageArrayLayers"), + ValueLayout.JAVA_INT.withName("maxTexelBufferElements"), + ValueLayout.JAVA_INT.withName("maxUniformBufferRange"), + ValueLayout.JAVA_INT.withName("maxStorageBufferRange"), + ValueLayout.JAVA_INT.withName("maxPushConstantsSize"), + ValueLayout.JAVA_INT.withName("maxMemoryAllocationCount"), + ValueLayout.JAVA_INT.withName("maxSamplerAllocationCount"), + ValueLayout.JAVA_LONG.withName("bufferImageGranularity"), + ValueLayout.JAVA_LONG.withName("sparseAddressSpaceSize"), + ValueLayout.JAVA_INT.withName("maxBoundDescriptorSets"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorSamplers"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUniformBuffers"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorStorageBuffers"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorSampledImages"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorStorageImages"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorInputAttachments"), + ValueLayout.JAVA_INT.withName("maxPerStageResources"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetSamplers"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUniformBuffers"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUniformBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetStorageBuffers"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetStorageBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetSampledImages"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetStorageImages"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetInputAttachments"), + ValueLayout.JAVA_INT.withName("maxVertexInputAttributes"), + ValueLayout.JAVA_INT.withName("maxVertexInputBindings"), + ValueLayout.JAVA_INT.withName("maxVertexInputAttributeOffset"), + ValueLayout.JAVA_INT.withName("maxVertexInputBindingStride"), + ValueLayout.JAVA_INT.withName("maxVertexOutputComponents"), + ValueLayout.JAVA_INT.withName("maxTessellationGenerationLevel"), + ValueLayout.JAVA_INT.withName("maxTessellationPatchSize"), + ValueLayout.JAVA_INT.withName("maxTessellationControlPerVertexInputComponents"), + ValueLayout.JAVA_INT.withName("maxTessellationControlPerVertexOutputComponents"), + ValueLayout.JAVA_INT.withName("maxTessellationControlPerPatchOutputComponents"), + ValueLayout.JAVA_INT.withName("maxTessellationControlTotalOutputComponents"), + ValueLayout.JAVA_INT.withName("maxTessellationEvaluationInputComponents"), + ValueLayout.JAVA_INT.withName("maxTessellationEvaluationOutputComponents"), + ValueLayout.JAVA_INT.withName("maxGeometryShaderInvocations"), + ValueLayout.JAVA_INT.withName("maxGeometryInputComponents"), + ValueLayout.JAVA_INT.withName("maxGeometryOutputComponents"), + ValueLayout.JAVA_INT.withName("maxGeometryOutputVertices"), + ValueLayout.JAVA_INT.withName("maxGeometryTotalOutputComponents"), + ValueLayout.JAVA_INT.withName("maxFragmentInputComponents"), + ValueLayout.JAVA_INT.withName("maxFragmentOutputAttachments"), + ValueLayout.JAVA_INT.withName("maxFragmentDualSrcAttachments"), + ValueLayout.JAVA_INT.withName("maxFragmentCombinedOutputResources"), + ValueLayout.JAVA_INT.withName("maxComputeSharedMemorySize"), + MemoryLayout.sequenceLayout(3, ValueLayout.JAVA_INT).withName("maxComputeWorkGroupCount"), + ValueLayout.JAVA_INT.withName("maxComputeWorkGroupInvocations"), + MemoryLayout.sequenceLayout(3, ValueLayout.JAVA_INT).withName("maxComputeWorkGroupSize"), + ValueLayout.JAVA_INT.withName("subPixelPrecisionBits"), + ValueLayout.JAVA_INT.withName("subTexelPrecisionBits"), + ValueLayout.JAVA_INT.withName("mipmapPrecisionBits"), + ValueLayout.JAVA_INT.withName("maxDrawIndexedIndexValue"), + ValueLayout.JAVA_INT.withName("maxDrawIndirectCount"), + ValueLayout.JAVA_FLOAT.withName("maxSamplerLodBias"), + ValueLayout.JAVA_FLOAT.withName("maxSamplerAnisotropy"), + ValueLayout.JAVA_INT.withName("maxViewports"), + MemoryLayout.sequenceLayout(2, ValueLayout.JAVA_INT).withName("maxViewportDimensions"), + MemoryLayout.sequenceLayout(2, ValueLayout.JAVA_FLOAT).withName("viewportBoundsRange"), + ValueLayout.JAVA_INT.withName("viewportSubPixelBits"), + ValueLayout.JAVA_LONG.withName("minMemoryMapAlignment"), + ValueLayout.JAVA_LONG.withName("minTexelBufferOffsetAlignment"), + ValueLayout.JAVA_LONG.withName("minUniformBufferOffsetAlignment"), + ValueLayout.JAVA_LONG.withName("minStorageBufferOffsetAlignment"), + ValueLayout.JAVA_INT.withName("minTexelOffset"), + ValueLayout.JAVA_INT.withName("maxTexelOffset"), + ValueLayout.JAVA_INT.withName("minTexelGatherOffset"), + ValueLayout.JAVA_INT.withName("maxTexelGatherOffset"), + ValueLayout.JAVA_FLOAT.withName("minInterpolationOffset"), + ValueLayout.JAVA_FLOAT.withName("maxInterpolationOffset"), + ValueLayout.JAVA_INT.withName("subPixelInterpolationOffsetBits"), + ValueLayout.JAVA_INT.withName("maxFramebufferWidth"), + ValueLayout.JAVA_INT.withName("maxFramebufferHeight"), + ValueLayout.JAVA_INT.withName("maxFramebufferLayers"), + ValueLayout.JAVA_INT.withName("framebufferColorSampleCounts"), + ValueLayout.JAVA_INT.withName("framebufferDepthSampleCounts"), + ValueLayout.JAVA_INT.withName("framebufferStencilSampleCounts"), + ValueLayout.JAVA_INT.withName("framebufferNoAttachmentsSampleCounts"), + ValueLayout.JAVA_INT.withName("maxColorAttachments"), + ValueLayout.JAVA_INT.withName("sampledImageColorSampleCounts"), + ValueLayout.JAVA_INT.withName("sampledImageIntegerSampleCounts"), + ValueLayout.JAVA_INT.withName("sampledImageDepthSampleCounts"), + ValueLayout.JAVA_INT.withName("sampledImageStencilSampleCounts"), + ValueLayout.JAVA_INT.withName("storageImageSampleCounts"), + ValueLayout.JAVA_INT.withName("maxSampleMaskWords"), + ValueLayout.JAVA_INT.withName("timestampComputeAndGraphics"), + ValueLayout.JAVA_FLOAT.withName("timestampPeriod"), + ValueLayout.JAVA_INT.withName("maxClipDistances"), + ValueLayout.JAVA_INT.withName("maxCullDistances"), + ValueLayout.JAVA_INT.withName("maxCombinedClipAndCullDistances"), + ValueLayout.JAVA_INT.withName("discreteQueuePriorities"), + MemoryLayout.sequenceLayout(2, ValueLayout.JAVA_FLOAT).withName("pointSizeRange"), + MemoryLayout.sequenceLayout(2, ValueLayout.JAVA_FLOAT).withName("lineWidthRange"), + ValueLayout.JAVA_FLOAT.withName("pointSizeGranularity"), + ValueLayout.JAVA_FLOAT.withName("lineWidthGranularity"), + ValueLayout.JAVA_INT.withName("strictLines"), + ValueLayout.JAVA_INT.withName("standardSampleLocations"), + ValueLayout.JAVA_LONG.withName("optimalBufferCopyOffsetAlignment"), + ValueLayout.JAVA_LONG.withName("optimalBufferCopyRowPitchAlignment"), + ValueLayout.JAVA_LONG.withName("nonCoherentAtomSize") + ); + /// The [VarHandle] of `maxImageDimension1D` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageDimension1D = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageDimension1D")); + /// The [VarHandle] of `maxImageDimension2D` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageDimension2D = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageDimension2D")); + /// The [VarHandle] of `maxImageDimension3D` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageDimension3D = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageDimension3D")); + /// The [VarHandle] of `maxImageDimensionCube` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageDimensionCube = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageDimensionCube")); + /// The [VarHandle] of `maxImageArrayLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxImageArrayLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxImageArrayLayers")); + /// The [VarHandle] of `maxTexelBufferElements` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTexelBufferElements = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTexelBufferElements")); + /// The [VarHandle] of `maxUniformBufferRange` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxUniformBufferRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxUniformBufferRange")); + /// The [VarHandle] of `maxStorageBufferRange` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxStorageBufferRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxStorageBufferRange")); + /// The [VarHandle] of `maxPushConstantsSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPushConstantsSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPushConstantsSize")); + /// The [VarHandle] of `maxMemoryAllocationCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMemoryAllocationCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMemoryAllocationCount")); + /// The [VarHandle] of `maxSamplerAllocationCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSamplerAllocationCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSamplerAllocationCount")); + /// The [VarHandle] of `bufferImageGranularity` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_bufferImageGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferImageGranularity")); + /// The [VarHandle] of `sparseAddressSpaceSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_sparseAddressSpaceSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sparseAddressSpaceSize")); + /// The [VarHandle] of `maxBoundDescriptorSets` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxBoundDescriptorSets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBoundDescriptorSets")); + /// The [VarHandle] of `maxPerStageDescriptorSamplers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorSamplers")); + /// The [VarHandle] of `maxPerStageDescriptorUniformBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUniformBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUniformBuffers")); + /// The [VarHandle] of `maxPerStageDescriptorStorageBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorStorageBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorStorageBuffers")); + /// The [VarHandle] of `maxPerStageDescriptorSampledImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorSampledImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorSampledImages")); + /// The [VarHandle] of `maxPerStageDescriptorStorageImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorStorageImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorStorageImages")); + /// The [VarHandle] of `maxPerStageDescriptorInputAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorInputAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorInputAttachments")); + /// The [VarHandle] of `maxPerStageResources` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageResources = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageResources")); + /// The [VarHandle] of `maxDescriptorSetSamplers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetSamplers")); + /// The [VarHandle] of `maxDescriptorSetUniformBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUniformBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUniformBuffers")); + /// The [VarHandle] of `maxDescriptorSetUniformBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUniformBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUniformBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetStorageBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetStorageBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetStorageBuffers")); + /// The [VarHandle] of `maxDescriptorSetStorageBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetStorageBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetStorageBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetSampledImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetSampledImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetSampledImages")); + /// The [VarHandle] of `maxDescriptorSetStorageImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetStorageImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetStorageImages")); + /// The [VarHandle] of `maxDescriptorSetInputAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetInputAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetInputAttachments")); + /// The [VarHandle] of `maxVertexInputAttributes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVertexInputAttributes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVertexInputAttributes")); + /// The [VarHandle] of `maxVertexInputBindings` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVertexInputBindings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVertexInputBindings")); + /// The [VarHandle] of `maxVertexInputAttributeOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVertexInputAttributeOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVertexInputAttributeOffset")); + /// The [VarHandle] of `maxVertexInputBindingStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVertexInputBindingStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVertexInputBindingStride")); + /// The [VarHandle] of `maxVertexOutputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVertexOutputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVertexOutputComponents")); + /// The [VarHandle] of `maxTessellationGenerationLevel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTessellationGenerationLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTessellationGenerationLevel")); + /// The [VarHandle] of `maxTessellationPatchSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTessellationPatchSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTessellationPatchSize")); + /// The [VarHandle] of `maxTessellationControlPerVertexInputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTessellationControlPerVertexInputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTessellationControlPerVertexInputComponents")); + /// The [VarHandle] of `maxTessellationControlPerVertexOutputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTessellationControlPerVertexOutputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTessellationControlPerVertexOutputComponents")); + /// The [VarHandle] of `maxTessellationControlPerPatchOutputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTessellationControlPerPatchOutputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTessellationControlPerPatchOutputComponents")); + /// The [VarHandle] of `maxTessellationControlTotalOutputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTessellationControlTotalOutputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTessellationControlTotalOutputComponents")); + /// The [VarHandle] of `maxTessellationEvaluationInputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTessellationEvaluationInputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTessellationEvaluationInputComponents")); + /// The [VarHandle] of `maxTessellationEvaluationOutputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTessellationEvaluationOutputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTessellationEvaluationOutputComponents")); + /// The [VarHandle] of `maxGeometryShaderInvocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxGeometryShaderInvocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxGeometryShaderInvocations")); + /// The [VarHandle] of `maxGeometryInputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxGeometryInputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxGeometryInputComponents")); + /// The [VarHandle] of `maxGeometryOutputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxGeometryOutputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxGeometryOutputComponents")); + /// The [VarHandle] of `maxGeometryOutputVertices` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxGeometryOutputVertices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxGeometryOutputVertices")); + /// The [VarHandle] of `maxGeometryTotalOutputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxGeometryTotalOutputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxGeometryTotalOutputComponents")); + /// The [VarHandle] of `maxFragmentInputComponents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFragmentInputComponents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFragmentInputComponents")); + /// The [VarHandle] of `maxFragmentOutputAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFragmentOutputAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFragmentOutputAttachments")); + /// The [VarHandle] of `maxFragmentDualSrcAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFragmentDualSrcAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFragmentDualSrcAttachments")); + /// The [VarHandle] of `maxFragmentCombinedOutputResources` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFragmentCombinedOutputResources = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFragmentCombinedOutputResources")); + /// The [VarHandle] of `maxComputeSharedMemorySize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxComputeSharedMemorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxComputeSharedMemorySize")); + /// The byte offset handle of `maxComputeWorkGroupCount` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_maxComputeWorkGroupCount = LAYOUT.byteOffsetHandle(PathElement.groupElement("maxComputeWorkGroupCount"), PathElement.sequenceElement()); + /// The memory layout of `maxComputeWorkGroupCount`. + public static final MemoryLayout ML_maxComputeWorkGroupCount = LAYOUT.select(PathElement.groupElement("maxComputeWorkGroupCount")); + /// The [VarHandle] of `maxComputeWorkGroupInvocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxComputeWorkGroupInvocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxComputeWorkGroupInvocations")); + /// The byte offset handle of `maxComputeWorkGroupSize` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_maxComputeWorkGroupSize = LAYOUT.byteOffsetHandle(PathElement.groupElement("maxComputeWorkGroupSize"), PathElement.sequenceElement()); + /// The memory layout of `maxComputeWorkGroupSize`. + public static final MemoryLayout ML_maxComputeWorkGroupSize = LAYOUT.select(PathElement.groupElement("maxComputeWorkGroupSize")); + /// The [VarHandle] of `subPixelPrecisionBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subPixelPrecisionBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subPixelPrecisionBits")); + /// The [VarHandle] of `subTexelPrecisionBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subTexelPrecisionBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subTexelPrecisionBits")); + /// The [VarHandle] of `mipmapPrecisionBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mipmapPrecisionBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mipmapPrecisionBits")); + /// The [VarHandle] of `maxDrawIndexedIndexValue` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDrawIndexedIndexValue = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDrawIndexedIndexValue")); + /// The [VarHandle] of `maxDrawIndirectCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDrawIndirectCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDrawIndirectCount")); + /// The [VarHandle] of `maxSamplerLodBias` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxSamplerLodBias = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSamplerLodBias")); + /// The [VarHandle] of `maxSamplerAnisotropy` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxSamplerAnisotropy = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSamplerAnisotropy")); + /// The [VarHandle] of `maxViewports` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxViewports = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxViewports")); + /// The byte offset handle of `maxViewportDimensions` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_maxViewportDimensions = LAYOUT.byteOffsetHandle(PathElement.groupElement("maxViewportDimensions"), PathElement.sequenceElement()); + /// The memory layout of `maxViewportDimensions`. + public static final MemoryLayout ML_maxViewportDimensions = LAYOUT.select(PathElement.groupElement("maxViewportDimensions")); + /// The byte offset handle of `viewportBoundsRange` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_viewportBoundsRange = LAYOUT.byteOffsetHandle(PathElement.groupElement("viewportBoundsRange"), PathElement.sequenceElement()); + /// The memory layout of `viewportBoundsRange`. + public static final MemoryLayout ML_viewportBoundsRange = LAYOUT.select(PathElement.groupElement("viewportBoundsRange")); + /// The [VarHandle] of `viewportSubPixelBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewportSubPixelBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewportSubPixelBits")); + /// The [VarHandle] of `minMemoryMapAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_minMemoryMapAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minMemoryMapAlignment")); + /// The [VarHandle] of `minTexelBufferOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_minTexelBufferOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minTexelBufferOffsetAlignment")); + /// The [VarHandle] of `minUniformBufferOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_minUniformBufferOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minUniformBufferOffsetAlignment")); + /// The [VarHandle] of `minStorageBufferOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_minStorageBufferOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minStorageBufferOffsetAlignment")); + /// The [VarHandle] of `minTexelOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minTexelOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minTexelOffset")); + /// The [VarHandle] of `maxTexelOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTexelOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTexelOffset")); + /// The [VarHandle] of `minTexelGatherOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minTexelGatherOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minTexelGatherOffset")); + /// The [VarHandle] of `maxTexelGatherOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxTexelGatherOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTexelGatherOffset")); + /// The [VarHandle] of `minInterpolationOffset` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minInterpolationOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minInterpolationOffset")); + /// The [VarHandle] of `maxInterpolationOffset` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxInterpolationOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxInterpolationOffset")); + /// The [VarHandle] of `subPixelInterpolationOffsetBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subPixelInterpolationOffsetBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subPixelInterpolationOffsetBits")); + /// The [VarHandle] of `maxFramebufferWidth` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFramebufferWidth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFramebufferWidth")); + /// The [VarHandle] of `maxFramebufferHeight` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFramebufferHeight = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFramebufferHeight")); + /// The [VarHandle] of `maxFramebufferLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFramebufferLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFramebufferLayers")); + /// The [VarHandle] of `framebufferColorSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_framebufferColorSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("framebufferColorSampleCounts")); + /// The [VarHandle] of `framebufferDepthSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_framebufferDepthSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("framebufferDepthSampleCounts")); + /// The [VarHandle] of `framebufferStencilSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_framebufferStencilSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("framebufferStencilSampleCounts")); + /// The [VarHandle] of `framebufferNoAttachmentsSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_framebufferNoAttachmentsSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("framebufferNoAttachmentsSampleCounts")); + /// The [VarHandle] of `maxColorAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxColorAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxColorAttachments")); + /// The [VarHandle] of `sampledImageColorSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampledImageColorSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampledImageColorSampleCounts")); + /// The [VarHandle] of `sampledImageIntegerSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampledImageIntegerSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampledImageIntegerSampleCounts")); + /// The [VarHandle] of `sampledImageDepthSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampledImageDepthSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampledImageDepthSampleCounts")); + /// The [VarHandle] of `sampledImageStencilSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampledImageStencilSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampledImageStencilSampleCounts")); + /// The [VarHandle] of `storageImageSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storageImageSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageImageSampleCounts")); + /// The [VarHandle] of `maxSampleMaskWords` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSampleMaskWords = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSampleMaskWords")); + /// The [VarHandle] of `timestampComputeAndGraphics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_timestampComputeAndGraphics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timestampComputeAndGraphics")); + /// The [VarHandle] of `timestampPeriod` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_timestampPeriod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timestampPeriod")); + /// The [VarHandle] of `maxClipDistances` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxClipDistances = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxClipDistances")); + /// The [VarHandle] of `maxCullDistances` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxCullDistances = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxCullDistances")); + /// The [VarHandle] of `maxCombinedClipAndCullDistances` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxCombinedClipAndCullDistances = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxCombinedClipAndCullDistances")); + /// The [VarHandle] of `discreteQueuePriorities` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_discreteQueuePriorities = LAYOUT.arrayElementVarHandle(PathElement.groupElement("discreteQueuePriorities")); + /// The byte offset handle of `pointSizeRange` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_pointSizeRange = LAYOUT.byteOffsetHandle(PathElement.groupElement("pointSizeRange"), PathElement.sequenceElement()); + /// The memory layout of `pointSizeRange`. + public static final MemoryLayout ML_pointSizeRange = LAYOUT.select(PathElement.groupElement("pointSizeRange")); + /// The byte offset handle of `lineWidthRange` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_lineWidthRange = LAYOUT.byteOffsetHandle(PathElement.groupElement("lineWidthRange"), PathElement.sequenceElement()); + /// The memory layout of `lineWidthRange`. + public static final MemoryLayout ML_lineWidthRange = LAYOUT.select(PathElement.groupElement("lineWidthRange")); + /// The [VarHandle] of `pointSizeGranularity` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_pointSizeGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pointSizeGranularity")); + /// The [VarHandle] of `lineWidthGranularity` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_lineWidthGranularity = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lineWidthGranularity")); + /// The [VarHandle] of `strictLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_strictLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("strictLines")); + /// The [VarHandle] of `standardSampleLocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_standardSampleLocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("standardSampleLocations")); + /// The [VarHandle] of `optimalBufferCopyOffsetAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_optimalBufferCopyOffsetAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("optimalBufferCopyOffsetAlignment")); + /// The [VarHandle] of `optimalBufferCopyRowPitchAlignment` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_optimalBufferCopyRowPitchAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("optimalBufferCopyRowPitchAlignment")); + /// The [VarHandle] of `nonCoherentAtomSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_nonCoherentAtomSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nonCoherentAtomSize")); + + /// Creates `VkPhysicalDeviceLimits` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLimits(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLimits` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLimits of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLimits(segment); } + + /// Creates `VkPhysicalDeviceLimits` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLimits ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLimits(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLimits` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLimits ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLimits(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLimits` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLimits` + public static VkPhysicalDeviceLimits alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLimits(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLimits` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLimits` + public static VkPhysicalDeviceLimits alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLimits(allocator.allocate(LAYOUT, count)); } + + /// {@return `maxImageDimension1D` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageDimension1D(MemorySegment segment, long index) { return (int) VH_maxImageDimension1D.get(segment, 0L, index); } + /// {@return `maxImageDimension1D`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageDimension1D(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxImageDimension1D(segment, 0L); } + /// {@return `maxImageDimension1D` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageDimension1DAt(long index) { return VkPhysicalDeviceLimits.get_maxImageDimension1D(this.segment(), index); } + /// {@return `maxImageDimension1D`} + public @CType("uint32_t") int maxImageDimension1D() { return VkPhysicalDeviceLimits.get_maxImageDimension1D(this.segment()); } + /// Sets `maxImageDimension1D` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageDimension1D(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageDimension1D.set(segment, 0L, index, value); } + /// Sets `maxImageDimension1D` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageDimension1D(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimension1D(segment, 0L, value); } + /// Sets `maxImageDimension1D` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxImageDimension1DAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimension1D(this.segment(), index, value); return this; } + /// Sets `maxImageDimension1D` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxImageDimension1D(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimension1D(this.segment(), value); return this; } + + /// {@return `maxImageDimension2D` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageDimension2D(MemorySegment segment, long index) { return (int) VH_maxImageDimension2D.get(segment, 0L, index); } + /// {@return `maxImageDimension2D`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageDimension2D(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxImageDimension2D(segment, 0L); } + /// {@return `maxImageDimension2D` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageDimension2DAt(long index) { return VkPhysicalDeviceLimits.get_maxImageDimension2D(this.segment(), index); } + /// {@return `maxImageDimension2D`} + public @CType("uint32_t") int maxImageDimension2D() { return VkPhysicalDeviceLimits.get_maxImageDimension2D(this.segment()); } + /// Sets `maxImageDimension2D` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageDimension2D(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageDimension2D.set(segment, 0L, index, value); } + /// Sets `maxImageDimension2D` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageDimension2D(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimension2D(segment, 0L, value); } + /// Sets `maxImageDimension2D` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxImageDimension2DAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimension2D(this.segment(), index, value); return this; } + /// Sets `maxImageDimension2D` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxImageDimension2D(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimension2D(this.segment(), value); return this; } + + /// {@return `maxImageDimension3D` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageDimension3D(MemorySegment segment, long index) { return (int) VH_maxImageDimension3D.get(segment, 0L, index); } + /// {@return `maxImageDimension3D`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageDimension3D(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxImageDimension3D(segment, 0L); } + /// {@return `maxImageDimension3D` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageDimension3DAt(long index) { return VkPhysicalDeviceLimits.get_maxImageDimension3D(this.segment(), index); } + /// {@return `maxImageDimension3D`} + public @CType("uint32_t") int maxImageDimension3D() { return VkPhysicalDeviceLimits.get_maxImageDimension3D(this.segment()); } + /// Sets `maxImageDimension3D` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageDimension3D(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageDimension3D.set(segment, 0L, index, value); } + /// Sets `maxImageDimension3D` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageDimension3D(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimension3D(segment, 0L, value); } + /// Sets `maxImageDimension3D` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxImageDimension3DAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimension3D(this.segment(), index, value); return this; } + /// Sets `maxImageDimension3D` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxImageDimension3D(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimension3D(this.segment(), value); return this; } + + /// {@return `maxImageDimensionCube` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageDimensionCube(MemorySegment segment, long index) { return (int) VH_maxImageDimensionCube.get(segment, 0L, index); } + /// {@return `maxImageDimensionCube`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageDimensionCube(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxImageDimensionCube(segment, 0L); } + /// {@return `maxImageDimensionCube` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageDimensionCubeAt(long index) { return VkPhysicalDeviceLimits.get_maxImageDimensionCube(this.segment(), index); } + /// {@return `maxImageDimensionCube`} + public @CType("uint32_t") int maxImageDimensionCube() { return VkPhysicalDeviceLimits.get_maxImageDimensionCube(this.segment()); } + /// Sets `maxImageDimensionCube` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageDimensionCube(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageDimensionCube.set(segment, 0L, index, value); } + /// Sets `maxImageDimensionCube` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageDimensionCube(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimensionCube(segment, 0L, value); } + /// Sets `maxImageDimensionCube` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxImageDimensionCubeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimensionCube(this.segment(), index, value); return this; } + /// Sets `maxImageDimensionCube` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxImageDimensionCube(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageDimensionCube(this.segment(), value); return this; } + + /// {@return `maxImageArrayLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxImageArrayLayers(MemorySegment segment, long index) { return (int) VH_maxImageArrayLayers.get(segment, 0L, index); } + /// {@return `maxImageArrayLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxImageArrayLayers(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxImageArrayLayers(segment, 0L); } + /// {@return `maxImageArrayLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxImageArrayLayersAt(long index) { return VkPhysicalDeviceLimits.get_maxImageArrayLayers(this.segment(), index); } + /// {@return `maxImageArrayLayers`} + public @CType("uint32_t") int maxImageArrayLayers() { return VkPhysicalDeviceLimits.get_maxImageArrayLayers(this.segment()); } + /// Sets `maxImageArrayLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxImageArrayLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxImageArrayLayers.set(segment, 0L, index, value); } + /// Sets `maxImageArrayLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxImageArrayLayers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageArrayLayers(segment, 0L, value); } + /// Sets `maxImageArrayLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxImageArrayLayersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageArrayLayers(this.segment(), index, value); return this; } + /// Sets `maxImageArrayLayers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxImageArrayLayers(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxImageArrayLayers(this.segment(), value); return this; } + + /// {@return `maxTexelBufferElements` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTexelBufferElements(MemorySegment segment, long index) { return (int) VH_maxTexelBufferElements.get(segment, 0L, index); } + /// {@return `maxTexelBufferElements`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTexelBufferElements(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTexelBufferElements(segment, 0L); } + /// {@return `maxTexelBufferElements` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTexelBufferElementsAt(long index) { return VkPhysicalDeviceLimits.get_maxTexelBufferElements(this.segment(), index); } + /// {@return `maxTexelBufferElements`} + public @CType("uint32_t") int maxTexelBufferElements() { return VkPhysicalDeviceLimits.get_maxTexelBufferElements(this.segment()); } + /// Sets `maxTexelBufferElements` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTexelBufferElements(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTexelBufferElements.set(segment, 0L, index, value); } + /// Sets `maxTexelBufferElements` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTexelBufferElements(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTexelBufferElements(segment, 0L, value); } + /// Sets `maxTexelBufferElements` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTexelBufferElementsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTexelBufferElements(this.segment(), index, value); return this; } + /// Sets `maxTexelBufferElements` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTexelBufferElements(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTexelBufferElements(this.segment(), value); return this; } + + /// {@return `maxUniformBufferRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxUniformBufferRange(MemorySegment segment, long index) { return (int) VH_maxUniformBufferRange.get(segment, 0L, index); } + /// {@return `maxUniformBufferRange`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxUniformBufferRange(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxUniformBufferRange(segment, 0L); } + /// {@return `maxUniformBufferRange` at the given index} + /// @param index the index + public @CType("uint32_t") int maxUniformBufferRangeAt(long index) { return VkPhysicalDeviceLimits.get_maxUniformBufferRange(this.segment(), index); } + /// {@return `maxUniformBufferRange`} + public @CType("uint32_t") int maxUniformBufferRange() { return VkPhysicalDeviceLimits.get_maxUniformBufferRange(this.segment()); } + /// Sets `maxUniformBufferRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxUniformBufferRange(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxUniformBufferRange.set(segment, 0L, index, value); } + /// Sets `maxUniformBufferRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxUniformBufferRange(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxUniformBufferRange(segment, 0L, value); } + /// Sets `maxUniformBufferRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxUniformBufferRangeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxUniformBufferRange(this.segment(), index, value); return this; } + /// Sets `maxUniformBufferRange` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxUniformBufferRange(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxUniformBufferRange(this.segment(), value); return this; } + + /// {@return `maxStorageBufferRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxStorageBufferRange(MemorySegment segment, long index) { return (int) VH_maxStorageBufferRange.get(segment, 0L, index); } + /// {@return `maxStorageBufferRange`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxStorageBufferRange(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxStorageBufferRange(segment, 0L); } + /// {@return `maxStorageBufferRange` at the given index} + /// @param index the index + public @CType("uint32_t") int maxStorageBufferRangeAt(long index) { return VkPhysicalDeviceLimits.get_maxStorageBufferRange(this.segment(), index); } + /// {@return `maxStorageBufferRange`} + public @CType("uint32_t") int maxStorageBufferRange() { return VkPhysicalDeviceLimits.get_maxStorageBufferRange(this.segment()); } + /// Sets `maxStorageBufferRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxStorageBufferRange(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxStorageBufferRange.set(segment, 0L, index, value); } + /// Sets `maxStorageBufferRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxStorageBufferRange(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxStorageBufferRange(segment, 0L, value); } + /// Sets `maxStorageBufferRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxStorageBufferRangeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxStorageBufferRange(this.segment(), index, value); return this; } + /// Sets `maxStorageBufferRange` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxStorageBufferRange(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxStorageBufferRange(this.segment(), value); return this; } + + /// {@return `maxPushConstantsSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPushConstantsSize(MemorySegment segment, long index) { return (int) VH_maxPushConstantsSize.get(segment, 0L, index); } + /// {@return `maxPushConstantsSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPushConstantsSize(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxPushConstantsSize(segment, 0L); } + /// {@return `maxPushConstantsSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPushConstantsSizeAt(long index) { return VkPhysicalDeviceLimits.get_maxPushConstantsSize(this.segment(), index); } + /// {@return `maxPushConstantsSize`} + public @CType("uint32_t") int maxPushConstantsSize() { return VkPhysicalDeviceLimits.get_maxPushConstantsSize(this.segment()); } + /// Sets `maxPushConstantsSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPushConstantsSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPushConstantsSize.set(segment, 0L, index, value); } + /// Sets `maxPushConstantsSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPushConstantsSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPushConstantsSize(segment, 0L, value); } + /// Sets `maxPushConstantsSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPushConstantsSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPushConstantsSize(this.segment(), index, value); return this; } + /// Sets `maxPushConstantsSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPushConstantsSize(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPushConstantsSize(this.segment(), value); return this; } + + /// {@return `maxMemoryAllocationCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMemoryAllocationCount(MemorySegment segment, long index) { return (int) VH_maxMemoryAllocationCount.get(segment, 0L, index); } + /// {@return `maxMemoryAllocationCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMemoryAllocationCount(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxMemoryAllocationCount(segment, 0L); } + /// {@return `maxMemoryAllocationCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMemoryAllocationCountAt(long index) { return VkPhysicalDeviceLimits.get_maxMemoryAllocationCount(this.segment(), index); } + /// {@return `maxMemoryAllocationCount`} + public @CType("uint32_t") int maxMemoryAllocationCount() { return VkPhysicalDeviceLimits.get_maxMemoryAllocationCount(this.segment()); } + /// Sets `maxMemoryAllocationCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMemoryAllocationCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMemoryAllocationCount.set(segment, 0L, index, value); } + /// Sets `maxMemoryAllocationCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMemoryAllocationCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxMemoryAllocationCount(segment, 0L, value); } + /// Sets `maxMemoryAllocationCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxMemoryAllocationCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxMemoryAllocationCount(this.segment(), index, value); return this; } + /// Sets `maxMemoryAllocationCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxMemoryAllocationCount(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxMemoryAllocationCount(this.segment(), value); return this; } + + /// {@return `maxSamplerAllocationCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSamplerAllocationCount(MemorySegment segment, long index) { return (int) VH_maxSamplerAllocationCount.get(segment, 0L, index); } + /// {@return `maxSamplerAllocationCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSamplerAllocationCount(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxSamplerAllocationCount(segment, 0L); } + /// {@return `maxSamplerAllocationCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSamplerAllocationCountAt(long index) { return VkPhysicalDeviceLimits.get_maxSamplerAllocationCount(this.segment(), index); } + /// {@return `maxSamplerAllocationCount`} + public @CType("uint32_t") int maxSamplerAllocationCount() { return VkPhysicalDeviceLimits.get_maxSamplerAllocationCount(this.segment()); } + /// Sets `maxSamplerAllocationCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSamplerAllocationCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSamplerAllocationCount.set(segment, 0L, index, value); } + /// Sets `maxSamplerAllocationCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSamplerAllocationCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxSamplerAllocationCount(segment, 0L, value); } + /// Sets `maxSamplerAllocationCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxSamplerAllocationCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxSamplerAllocationCount(this.segment(), index, value); return this; } + /// Sets `maxSamplerAllocationCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxSamplerAllocationCount(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxSamplerAllocationCount(this.segment(), value); return this; } + + /// {@return `bufferImageGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_bufferImageGranularity(MemorySegment segment, long index) { return (long) VH_bufferImageGranularity.get(segment, 0L, index); } + /// {@return `bufferImageGranularity`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_bufferImageGranularity(MemorySegment segment) { return VkPhysicalDeviceLimits.get_bufferImageGranularity(segment, 0L); } + /// {@return `bufferImageGranularity` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long bufferImageGranularityAt(long index) { return VkPhysicalDeviceLimits.get_bufferImageGranularity(this.segment(), index); } + /// {@return `bufferImageGranularity`} + public @CType("VkDeviceSize") long bufferImageGranularity() { return VkPhysicalDeviceLimits.get_bufferImageGranularity(this.segment()); } + /// Sets `bufferImageGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferImageGranularity(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_bufferImageGranularity.set(segment, 0L, index, value); } + /// Sets `bufferImageGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferImageGranularity(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_bufferImageGranularity(segment, 0L, value); } + /// Sets `bufferImageGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits bufferImageGranularityAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_bufferImageGranularity(this.segment(), index, value); return this; } + /// Sets `bufferImageGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits bufferImageGranularity(@CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_bufferImageGranularity(this.segment(), value); return this; } + + /// {@return `sparseAddressSpaceSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_sparseAddressSpaceSize(MemorySegment segment, long index) { return (long) VH_sparseAddressSpaceSize.get(segment, 0L, index); } + /// {@return `sparseAddressSpaceSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_sparseAddressSpaceSize(MemorySegment segment) { return VkPhysicalDeviceLimits.get_sparseAddressSpaceSize(segment, 0L); } + /// {@return `sparseAddressSpaceSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sparseAddressSpaceSizeAt(long index) { return VkPhysicalDeviceLimits.get_sparseAddressSpaceSize(this.segment(), index); } + /// {@return `sparseAddressSpaceSize`} + public @CType("VkDeviceSize") long sparseAddressSpaceSize() { return VkPhysicalDeviceLimits.get_sparseAddressSpaceSize(this.segment()); } + /// Sets `sparseAddressSpaceSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseAddressSpaceSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_sparseAddressSpaceSize.set(segment, 0L, index, value); } + /// Sets `sparseAddressSpaceSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseAddressSpaceSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_sparseAddressSpaceSize(segment, 0L, value); } + /// Sets `sparseAddressSpaceSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits sparseAddressSpaceSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_sparseAddressSpaceSize(this.segment(), index, value); return this; } + /// Sets `sparseAddressSpaceSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits sparseAddressSpaceSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_sparseAddressSpaceSize(this.segment(), value); return this; } + + /// {@return `maxBoundDescriptorSets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxBoundDescriptorSets(MemorySegment segment, long index) { return (int) VH_maxBoundDescriptorSets.get(segment, 0L, index); } + /// {@return `maxBoundDescriptorSets`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxBoundDescriptorSets(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxBoundDescriptorSets(segment, 0L); } + /// {@return `maxBoundDescriptorSets` at the given index} + /// @param index the index + public @CType("uint32_t") int maxBoundDescriptorSetsAt(long index) { return VkPhysicalDeviceLimits.get_maxBoundDescriptorSets(this.segment(), index); } + /// {@return `maxBoundDescriptorSets`} + public @CType("uint32_t") int maxBoundDescriptorSets() { return VkPhysicalDeviceLimits.get_maxBoundDescriptorSets(this.segment()); } + /// Sets `maxBoundDescriptorSets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBoundDescriptorSets(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxBoundDescriptorSets.set(segment, 0L, index, value); } + /// Sets `maxBoundDescriptorSets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBoundDescriptorSets(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxBoundDescriptorSets(segment, 0L, value); } + /// Sets `maxBoundDescriptorSets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxBoundDescriptorSetsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxBoundDescriptorSets(this.segment(), index, value); return this; } + /// Sets `maxBoundDescriptorSets` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxBoundDescriptorSets(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxBoundDescriptorSets(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorSamplers(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorSamplers.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorSamplers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorSamplers(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorSamplers(segment, 0L); } + /// {@return `maxPerStageDescriptorSamplers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorSamplersAt(long index) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorSamplers(this.segment(), index); } + /// {@return `maxPerStageDescriptorSamplers`} + public @CType("uint32_t") int maxPerStageDescriptorSamplers() { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorSamplers(this.segment()); } + /// Sets `maxPerStageDescriptorSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorSamplers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorSamplers.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorSamplers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorSamplers(segment, 0L, value); } + /// Sets `maxPerStageDescriptorSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorSamplersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorSamplers(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorSamplers(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorSamplers(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUniformBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUniformBuffers(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUniformBuffers.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUniformBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUniformBuffers(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorUniformBuffers(segment, 0L); } + /// {@return `maxPerStageDescriptorUniformBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUniformBuffersAt(long index) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorUniformBuffers(this.segment(), index); } + /// {@return `maxPerStageDescriptorUniformBuffers`} + public @CType("uint32_t") int maxPerStageDescriptorUniformBuffers() { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorUniformBuffers(this.segment()); } + /// Sets `maxPerStageDescriptorUniformBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUniformBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUniformBuffers.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUniformBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUniformBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorUniformBuffers(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUniformBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorUniformBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorUniformBuffers(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUniformBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorUniformBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorUniformBuffers(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorStorageBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorStorageBuffers(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorStorageBuffers.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorStorageBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorStorageBuffers(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorStorageBuffers(segment, 0L); } + /// {@return `maxPerStageDescriptorStorageBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorStorageBuffersAt(long index) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorStorageBuffers(this.segment(), index); } + /// {@return `maxPerStageDescriptorStorageBuffers`} + public @CType("uint32_t") int maxPerStageDescriptorStorageBuffers() { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorStorageBuffers(this.segment()); } + /// Sets `maxPerStageDescriptorStorageBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorStorageBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorStorageBuffers.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorStorageBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorStorageBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorStorageBuffers(segment, 0L, value); } + /// Sets `maxPerStageDescriptorStorageBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorStorageBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorStorageBuffers(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorStorageBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorStorageBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorStorageBuffers(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorSampledImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorSampledImages(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorSampledImages.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorSampledImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorSampledImages(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorSampledImages(segment, 0L); } + /// {@return `maxPerStageDescriptorSampledImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorSampledImagesAt(long index) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorSampledImages(this.segment(), index); } + /// {@return `maxPerStageDescriptorSampledImages`} + public @CType("uint32_t") int maxPerStageDescriptorSampledImages() { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorSampledImages(this.segment()); } + /// Sets `maxPerStageDescriptorSampledImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorSampledImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorSampledImages.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorSampledImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorSampledImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorSampledImages(segment, 0L, value); } + /// Sets `maxPerStageDescriptorSampledImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorSampledImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorSampledImages(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorSampledImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorSampledImages(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorSampledImages(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorStorageImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorStorageImages(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorStorageImages.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorStorageImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorStorageImages(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorStorageImages(segment, 0L); } + /// {@return `maxPerStageDescriptorStorageImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorStorageImagesAt(long index) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorStorageImages(this.segment(), index); } + /// {@return `maxPerStageDescriptorStorageImages`} + public @CType("uint32_t") int maxPerStageDescriptorStorageImages() { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorStorageImages(this.segment()); } + /// Sets `maxPerStageDescriptorStorageImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorStorageImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorStorageImages.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorStorageImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorStorageImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorStorageImages(segment, 0L, value); } + /// Sets `maxPerStageDescriptorStorageImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorStorageImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorStorageImages(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorStorageImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorStorageImages(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorStorageImages(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorInputAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorInputAttachments(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorInputAttachments.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorInputAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorInputAttachments(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorInputAttachments(segment, 0L); } + /// {@return `maxPerStageDescriptorInputAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorInputAttachmentsAt(long index) { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorInputAttachments(this.segment(), index); } + /// {@return `maxPerStageDescriptorInputAttachments`} + public @CType("uint32_t") int maxPerStageDescriptorInputAttachments() { return VkPhysicalDeviceLimits.get_maxPerStageDescriptorInputAttachments(this.segment()); } + /// Sets `maxPerStageDescriptorInputAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorInputAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorInputAttachments.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorInputAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorInputAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorInputAttachments(segment, 0L, value); } + /// Sets `maxPerStageDescriptorInputAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorInputAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorInputAttachments(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorInputAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageDescriptorInputAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageDescriptorInputAttachments(this.segment(), value); return this; } + + /// {@return `maxPerStageResources` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageResources(MemorySegment segment, long index) { return (int) VH_maxPerStageResources.get(segment, 0L, index); } + /// {@return `maxPerStageResources`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageResources(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxPerStageResources(segment, 0L); } + /// {@return `maxPerStageResources` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageResourcesAt(long index) { return VkPhysicalDeviceLimits.get_maxPerStageResources(this.segment(), index); } + /// {@return `maxPerStageResources`} + public @CType("uint32_t") int maxPerStageResources() { return VkPhysicalDeviceLimits.get_maxPerStageResources(this.segment()); } + /// Sets `maxPerStageResources` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageResources(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageResources.set(segment, 0L, index, value); } + /// Sets `maxPerStageResources` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageResources(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageResources(segment, 0L, value); } + /// Sets `maxPerStageResources` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageResourcesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageResources(this.segment(), index, value); return this; } + /// Sets `maxPerStageResources` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxPerStageResources(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxPerStageResources(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetSamplers(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetSamplers.get(segment, 0L, index); } + /// {@return `maxDescriptorSetSamplers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetSamplers(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxDescriptorSetSamplers(segment, 0L); } + /// {@return `maxDescriptorSetSamplers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetSamplersAt(long index) { return VkPhysicalDeviceLimits.get_maxDescriptorSetSamplers(this.segment(), index); } + /// {@return `maxDescriptorSetSamplers`} + public @CType("uint32_t") int maxDescriptorSetSamplers() { return VkPhysicalDeviceLimits.get_maxDescriptorSetSamplers(this.segment()); } + /// Sets `maxDescriptorSetSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetSamplers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetSamplers.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetSamplers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetSamplers(segment, 0L, value); } + /// Sets `maxDescriptorSetSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetSamplersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetSamplers(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetSamplers(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetSamplers(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUniformBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUniformBuffers(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUniformBuffers.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUniformBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUniformBuffers(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxDescriptorSetUniformBuffers(segment, 0L); } + /// {@return `maxDescriptorSetUniformBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUniformBuffersAt(long index) { return VkPhysicalDeviceLimits.get_maxDescriptorSetUniformBuffers(this.segment(), index); } + /// {@return `maxDescriptorSetUniformBuffers`} + public @CType("uint32_t") int maxDescriptorSetUniformBuffers() { return VkPhysicalDeviceLimits.get_maxDescriptorSetUniformBuffers(this.segment()); } + /// Sets `maxDescriptorSetUniformBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUniformBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUniformBuffers.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUniformBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUniformBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetUniformBuffers(segment, 0L, value); } + /// Sets `maxDescriptorSetUniformBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetUniformBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetUniformBuffers(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUniformBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetUniformBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetUniformBuffers(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUniformBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUniformBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUniformBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUniformBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUniformBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxDescriptorSetUniformBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetUniformBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUniformBuffersDynamicAt(long index) { return VkPhysicalDeviceLimits.get_maxDescriptorSetUniformBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetUniformBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetUniformBuffersDynamic() { return VkPhysicalDeviceLimits.get_maxDescriptorSetUniformBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetUniformBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUniformBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUniformBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUniformBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUniformBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetUniformBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetUniformBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetUniformBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetUniformBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUniformBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetUniformBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetUniformBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetStorageBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetStorageBuffers(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetStorageBuffers.get(segment, 0L, index); } + /// {@return `maxDescriptorSetStorageBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetStorageBuffers(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxDescriptorSetStorageBuffers(segment, 0L); } + /// {@return `maxDescriptorSetStorageBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetStorageBuffersAt(long index) { return VkPhysicalDeviceLimits.get_maxDescriptorSetStorageBuffers(this.segment(), index); } + /// {@return `maxDescriptorSetStorageBuffers`} + public @CType("uint32_t") int maxDescriptorSetStorageBuffers() { return VkPhysicalDeviceLimits.get_maxDescriptorSetStorageBuffers(this.segment()); } + /// Sets `maxDescriptorSetStorageBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetStorageBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetStorageBuffers.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetStorageBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetStorageBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetStorageBuffers(segment, 0L, value); } + /// Sets `maxDescriptorSetStorageBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetStorageBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetStorageBuffers(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetStorageBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetStorageBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetStorageBuffers(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetStorageBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetStorageBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetStorageBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetStorageBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetStorageBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxDescriptorSetStorageBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetStorageBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetStorageBuffersDynamicAt(long index) { return VkPhysicalDeviceLimits.get_maxDescriptorSetStorageBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetStorageBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetStorageBuffersDynamic() { return VkPhysicalDeviceLimits.get_maxDescriptorSetStorageBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetStorageBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetStorageBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetStorageBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetStorageBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetStorageBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetStorageBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetStorageBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetStorageBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetStorageBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetStorageBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetStorageBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetStorageBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetSampledImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetSampledImages(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetSampledImages.get(segment, 0L, index); } + /// {@return `maxDescriptorSetSampledImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetSampledImages(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxDescriptorSetSampledImages(segment, 0L); } + /// {@return `maxDescriptorSetSampledImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetSampledImagesAt(long index) { return VkPhysicalDeviceLimits.get_maxDescriptorSetSampledImages(this.segment(), index); } + /// {@return `maxDescriptorSetSampledImages`} + public @CType("uint32_t") int maxDescriptorSetSampledImages() { return VkPhysicalDeviceLimits.get_maxDescriptorSetSampledImages(this.segment()); } + /// Sets `maxDescriptorSetSampledImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetSampledImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetSampledImages.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetSampledImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetSampledImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetSampledImages(segment, 0L, value); } + /// Sets `maxDescriptorSetSampledImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetSampledImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetSampledImages(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetSampledImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetSampledImages(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetSampledImages(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetStorageImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetStorageImages(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetStorageImages.get(segment, 0L, index); } + /// {@return `maxDescriptorSetStorageImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetStorageImages(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxDescriptorSetStorageImages(segment, 0L); } + /// {@return `maxDescriptorSetStorageImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetStorageImagesAt(long index) { return VkPhysicalDeviceLimits.get_maxDescriptorSetStorageImages(this.segment(), index); } + /// {@return `maxDescriptorSetStorageImages`} + public @CType("uint32_t") int maxDescriptorSetStorageImages() { return VkPhysicalDeviceLimits.get_maxDescriptorSetStorageImages(this.segment()); } + /// Sets `maxDescriptorSetStorageImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetStorageImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetStorageImages.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetStorageImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetStorageImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetStorageImages(segment, 0L, value); } + /// Sets `maxDescriptorSetStorageImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetStorageImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetStorageImages(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetStorageImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetStorageImages(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetStorageImages(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetInputAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetInputAttachments(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetInputAttachments.get(segment, 0L, index); } + /// {@return `maxDescriptorSetInputAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetInputAttachments(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxDescriptorSetInputAttachments(segment, 0L); } + /// {@return `maxDescriptorSetInputAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetInputAttachmentsAt(long index) { return VkPhysicalDeviceLimits.get_maxDescriptorSetInputAttachments(this.segment(), index); } + /// {@return `maxDescriptorSetInputAttachments`} + public @CType("uint32_t") int maxDescriptorSetInputAttachments() { return VkPhysicalDeviceLimits.get_maxDescriptorSetInputAttachments(this.segment()); } + /// Sets `maxDescriptorSetInputAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetInputAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetInputAttachments.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetInputAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetInputAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetInputAttachments(segment, 0L, value); } + /// Sets `maxDescriptorSetInputAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetInputAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetInputAttachments(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetInputAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDescriptorSetInputAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDescriptorSetInputAttachments(this.segment(), value); return this; } + + /// {@return `maxVertexInputAttributes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVertexInputAttributes(MemorySegment segment, long index) { return (int) VH_maxVertexInputAttributes.get(segment, 0L, index); } + /// {@return `maxVertexInputAttributes`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVertexInputAttributes(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxVertexInputAttributes(segment, 0L); } + /// {@return `maxVertexInputAttributes` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVertexInputAttributesAt(long index) { return VkPhysicalDeviceLimits.get_maxVertexInputAttributes(this.segment(), index); } + /// {@return `maxVertexInputAttributes`} + public @CType("uint32_t") int maxVertexInputAttributes() { return VkPhysicalDeviceLimits.get_maxVertexInputAttributes(this.segment()); } + /// Sets `maxVertexInputAttributes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVertexInputAttributes(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVertexInputAttributes.set(segment, 0L, index, value); } + /// Sets `maxVertexInputAttributes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVertexInputAttributes(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputAttributes(segment, 0L, value); } + /// Sets `maxVertexInputAttributes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxVertexInputAttributesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputAttributes(this.segment(), index, value); return this; } + /// Sets `maxVertexInputAttributes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxVertexInputAttributes(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputAttributes(this.segment(), value); return this; } + + /// {@return `maxVertexInputBindings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVertexInputBindings(MemorySegment segment, long index) { return (int) VH_maxVertexInputBindings.get(segment, 0L, index); } + /// {@return `maxVertexInputBindings`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVertexInputBindings(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxVertexInputBindings(segment, 0L); } + /// {@return `maxVertexInputBindings` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVertexInputBindingsAt(long index) { return VkPhysicalDeviceLimits.get_maxVertexInputBindings(this.segment(), index); } + /// {@return `maxVertexInputBindings`} + public @CType("uint32_t") int maxVertexInputBindings() { return VkPhysicalDeviceLimits.get_maxVertexInputBindings(this.segment()); } + /// Sets `maxVertexInputBindings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVertexInputBindings(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVertexInputBindings.set(segment, 0L, index, value); } + /// Sets `maxVertexInputBindings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVertexInputBindings(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputBindings(segment, 0L, value); } + /// Sets `maxVertexInputBindings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxVertexInputBindingsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputBindings(this.segment(), index, value); return this; } + /// Sets `maxVertexInputBindings` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxVertexInputBindings(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputBindings(this.segment(), value); return this; } + + /// {@return `maxVertexInputAttributeOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVertexInputAttributeOffset(MemorySegment segment, long index) { return (int) VH_maxVertexInputAttributeOffset.get(segment, 0L, index); } + /// {@return `maxVertexInputAttributeOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVertexInputAttributeOffset(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxVertexInputAttributeOffset(segment, 0L); } + /// {@return `maxVertexInputAttributeOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVertexInputAttributeOffsetAt(long index) { return VkPhysicalDeviceLimits.get_maxVertexInputAttributeOffset(this.segment(), index); } + /// {@return `maxVertexInputAttributeOffset`} + public @CType("uint32_t") int maxVertexInputAttributeOffset() { return VkPhysicalDeviceLimits.get_maxVertexInputAttributeOffset(this.segment()); } + /// Sets `maxVertexInputAttributeOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVertexInputAttributeOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVertexInputAttributeOffset.set(segment, 0L, index, value); } + /// Sets `maxVertexInputAttributeOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVertexInputAttributeOffset(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputAttributeOffset(segment, 0L, value); } + /// Sets `maxVertexInputAttributeOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxVertexInputAttributeOffsetAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputAttributeOffset(this.segment(), index, value); return this; } + /// Sets `maxVertexInputAttributeOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxVertexInputAttributeOffset(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputAttributeOffset(this.segment(), value); return this; } + + /// {@return `maxVertexInputBindingStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVertexInputBindingStride(MemorySegment segment, long index) { return (int) VH_maxVertexInputBindingStride.get(segment, 0L, index); } + /// {@return `maxVertexInputBindingStride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVertexInputBindingStride(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxVertexInputBindingStride(segment, 0L); } + /// {@return `maxVertexInputBindingStride` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVertexInputBindingStrideAt(long index) { return VkPhysicalDeviceLimits.get_maxVertexInputBindingStride(this.segment(), index); } + /// {@return `maxVertexInputBindingStride`} + public @CType("uint32_t") int maxVertexInputBindingStride() { return VkPhysicalDeviceLimits.get_maxVertexInputBindingStride(this.segment()); } + /// Sets `maxVertexInputBindingStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVertexInputBindingStride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVertexInputBindingStride.set(segment, 0L, index, value); } + /// Sets `maxVertexInputBindingStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVertexInputBindingStride(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputBindingStride(segment, 0L, value); } + /// Sets `maxVertexInputBindingStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxVertexInputBindingStrideAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputBindingStride(this.segment(), index, value); return this; } + /// Sets `maxVertexInputBindingStride` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxVertexInputBindingStride(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexInputBindingStride(this.segment(), value); return this; } + + /// {@return `maxVertexOutputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVertexOutputComponents(MemorySegment segment, long index) { return (int) VH_maxVertexOutputComponents.get(segment, 0L, index); } + /// {@return `maxVertexOutputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVertexOutputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxVertexOutputComponents(segment, 0L); } + /// {@return `maxVertexOutputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVertexOutputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxVertexOutputComponents(this.segment(), index); } + /// {@return `maxVertexOutputComponents`} + public @CType("uint32_t") int maxVertexOutputComponents() { return VkPhysicalDeviceLimits.get_maxVertexOutputComponents(this.segment()); } + /// Sets `maxVertexOutputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVertexOutputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVertexOutputComponents.set(segment, 0L, index, value); } + /// Sets `maxVertexOutputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVertexOutputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexOutputComponents(segment, 0L, value); } + /// Sets `maxVertexOutputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxVertexOutputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexOutputComponents(this.segment(), index, value); return this; } + /// Sets `maxVertexOutputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxVertexOutputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxVertexOutputComponents(this.segment(), value); return this; } + + /// {@return `maxTessellationGenerationLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTessellationGenerationLevel(MemorySegment segment, long index) { return (int) VH_maxTessellationGenerationLevel.get(segment, 0L, index); } + /// {@return `maxTessellationGenerationLevel`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTessellationGenerationLevel(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTessellationGenerationLevel(segment, 0L); } + /// {@return `maxTessellationGenerationLevel` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTessellationGenerationLevelAt(long index) { return VkPhysicalDeviceLimits.get_maxTessellationGenerationLevel(this.segment(), index); } + /// {@return `maxTessellationGenerationLevel`} + public @CType("uint32_t") int maxTessellationGenerationLevel() { return VkPhysicalDeviceLimits.get_maxTessellationGenerationLevel(this.segment()); } + /// Sets `maxTessellationGenerationLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTessellationGenerationLevel(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTessellationGenerationLevel.set(segment, 0L, index, value); } + /// Sets `maxTessellationGenerationLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTessellationGenerationLevel(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationGenerationLevel(segment, 0L, value); } + /// Sets `maxTessellationGenerationLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationGenerationLevelAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationGenerationLevel(this.segment(), index, value); return this; } + /// Sets `maxTessellationGenerationLevel` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationGenerationLevel(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationGenerationLevel(this.segment(), value); return this; } + + /// {@return `maxTessellationPatchSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTessellationPatchSize(MemorySegment segment, long index) { return (int) VH_maxTessellationPatchSize.get(segment, 0L, index); } + /// {@return `maxTessellationPatchSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTessellationPatchSize(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTessellationPatchSize(segment, 0L); } + /// {@return `maxTessellationPatchSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTessellationPatchSizeAt(long index) { return VkPhysicalDeviceLimits.get_maxTessellationPatchSize(this.segment(), index); } + /// {@return `maxTessellationPatchSize`} + public @CType("uint32_t") int maxTessellationPatchSize() { return VkPhysicalDeviceLimits.get_maxTessellationPatchSize(this.segment()); } + /// Sets `maxTessellationPatchSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTessellationPatchSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTessellationPatchSize.set(segment, 0L, index, value); } + /// Sets `maxTessellationPatchSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTessellationPatchSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationPatchSize(segment, 0L, value); } + /// Sets `maxTessellationPatchSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationPatchSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationPatchSize(this.segment(), index, value); return this; } + /// Sets `maxTessellationPatchSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationPatchSize(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationPatchSize(this.segment(), value); return this; } + + /// {@return `maxTessellationControlPerVertexInputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTessellationControlPerVertexInputComponents(MemorySegment segment, long index) { return (int) VH_maxTessellationControlPerVertexInputComponents.get(segment, 0L, index); } + /// {@return `maxTessellationControlPerVertexInputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTessellationControlPerVertexInputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTessellationControlPerVertexInputComponents(segment, 0L); } + /// {@return `maxTessellationControlPerVertexInputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTessellationControlPerVertexInputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxTessellationControlPerVertexInputComponents(this.segment(), index); } + /// {@return `maxTessellationControlPerVertexInputComponents`} + public @CType("uint32_t") int maxTessellationControlPerVertexInputComponents() { return VkPhysicalDeviceLimits.get_maxTessellationControlPerVertexInputComponents(this.segment()); } + /// Sets `maxTessellationControlPerVertexInputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTessellationControlPerVertexInputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTessellationControlPerVertexInputComponents.set(segment, 0L, index, value); } + /// Sets `maxTessellationControlPerVertexInputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTessellationControlPerVertexInputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlPerVertexInputComponents(segment, 0L, value); } + /// Sets `maxTessellationControlPerVertexInputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationControlPerVertexInputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlPerVertexInputComponents(this.segment(), index, value); return this; } + /// Sets `maxTessellationControlPerVertexInputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationControlPerVertexInputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlPerVertexInputComponents(this.segment(), value); return this; } + + /// {@return `maxTessellationControlPerVertexOutputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTessellationControlPerVertexOutputComponents(MemorySegment segment, long index) { return (int) VH_maxTessellationControlPerVertexOutputComponents.get(segment, 0L, index); } + /// {@return `maxTessellationControlPerVertexOutputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTessellationControlPerVertexOutputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTessellationControlPerVertexOutputComponents(segment, 0L); } + /// {@return `maxTessellationControlPerVertexOutputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTessellationControlPerVertexOutputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxTessellationControlPerVertexOutputComponents(this.segment(), index); } + /// {@return `maxTessellationControlPerVertexOutputComponents`} + public @CType("uint32_t") int maxTessellationControlPerVertexOutputComponents() { return VkPhysicalDeviceLimits.get_maxTessellationControlPerVertexOutputComponents(this.segment()); } + /// Sets `maxTessellationControlPerVertexOutputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTessellationControlPerVertexOutputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTessellationControlPerVertexOutputComponents.set(segment, 0L, index, value); } + /// Sets `maxTessellationControlPerVertexOutputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTessellationControlPerVertexOutputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlPerVertexOutputComponents(segment, 0L, value); } + /// Sets `maxTessellationControlPerVertexOutputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationControlPerVertexOutputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlPerVertexOutputComponents(this.segment(), index, value); return this; } + /// Sets `maxTessellationControlPerVertexOutputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationControlPerVertexOutputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlPerVertexOutputComponents(this.segment(), value); return this; } + + /// {@return `maxTessellationControlPerPatchOutputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTessellationControlPerPatchOutputComponents(MemorySegment segment, long index) { return (int) VH_maxTessellationControlPerPatchOutputComponents.get(segment, 0L, index); } + /// {@return `maxTessellationControlPerPatchOutputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTessellationControlPerPatchOutputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTessellationControlPerPatchOutputComponents(segment, 0L); } + /// {@return `maxTessellationControlPerPatchOutputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTessellationControlPerPatchOutputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxTessellationControlPerPatchOutputComponents(this.segment(), index); } + /// {@return `maxTessellationControlPerPatchOutputComponents`} + public @CType("uint32_t") int maxTessellationControlPerPatchOutputComponents() { return VkPhysicalDeviceLimits.get_maxTessellationControlPerPatchOutputComponents(this.segment()); } + /// Sets `maxTessellationControlPerPatchOutputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTessellationControlPerPatchOutputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTessellationControlPerPatchOutputComponents.set(segment, 0L, index, value); } + /// Sets `maxTessellationControlPerPatchOutputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTessellationControlPerPatchOutputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlPerPatchOutputComponents(segment, 0L, value); } + /// Sets `maxTessellationControlPerPatchOutputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationControlPerPatchOutputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlPerPatchOutputComponents(this.segment(), index, value); return this; } + /// Sets `maxTessellationControlPerPatchOutputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationControlPerPatchOutputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlPerPatchOutputComponents(this.segment(), value); return this; } + + /// {@return `maxTessellationControlTotalOutputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTessellationControlTotalOutputComponents(MemorySegment segment, long index) { return (int) VH_maxTessellationControlTotalOutputComponents.get(segment, 0L, index); } + /// {@return `maxTessellationControlTotalOutputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTessellationControlTotalOutputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTessellationControlTotalOutputComponents(segment, 0L); } + /// {@return `maxTessellationControlTotalOutputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTessellationControlTotalOutputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxTessellationControlTotalOutputComponents(this.segment(), index); } + /// {@return `maxTessellationControlTotalOutputComponents`} + public @CType("uint32_t") int maxTessellationControlTotalOutputComponents() { return VkPhysicalDeviceLimits.get_maxTessellationControlTotalOutputComponents(this.segment()); } + /// Sets `maxTessellationControlTotalOutputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTessellationControlTotalOutputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTessellationControlTotalOutputComponents.set(segment, 0L, index, value); } + /// Sets `maxTessellationControlTotalOutputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTessellationControlTotalOutputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlTotalOutputComponents(segment, 0L, value); } + /// Sets `maxTessellationControlTotalOutputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationControlTotalOutputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlTotalOutputComponents(this.segment(), index, value); return this; } + /// Sets `maxTessellationControlTotalOutputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationControlTotalOutputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationControlTotalOutputComponents(this.segment(), value); return this; } + + /// {@return `maxTessellationEvaluationInputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTessellationEvaluationInputComponents(MemorySegment segment, long index) { return (int) VH_maxTessellationEvaluationInputComponents.get(segment, 0L, index); } + /// {@return `maxTessellationEvaluationInputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTessellationEvaluationInputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTessellationEvaluationInputComponents(segment, 0L); } + /// {@return `maxTessellationEvaluationInputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTessellationEvaluationInputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxTessellationEvaluationInputComponents(this.segment(), index); } + /// {@return `maxTessellationEvaluationInputComponents`} + public @CType("uint32_t") int maxTessellationEvaluationInputComponents() { return VkPhysicalDeviceLimits.get_maxTessellationEvaluationInputComponents(this.segment()); } + /// Sets `maxTessellationEvaluationInputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTessellationEvaluationInputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTessellationEvaluationInputComponents.set(segment, 0L, index, value); } + /// Sets `maxTessellationEvaluationInputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTessellationEvaluationInputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationEvaluationInputComponents(segment, 0L, value); } + /// Sets `maxTessellationEvaluationInputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationEvaluationInputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationEvaluationInputComponents(this.segment(), index, value); return this; } + /// Sets `maxTessellationEvaluationInputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationEvaluationInputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationEvaluationInputComponents(this.segment(), value); return this; } + + /// {@return `maxTessellationEvaluationOutputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTessellationEvaluationOutputComponents(MemorySegment segment, long index) { return (int) VH_maxTessellationEvaluationOutputComponents.get(segment, 0L, index); } + /// {@return `maxTessellationEvaluationOutputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTessellationEvaluationOutputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTessellationEvaluationOutputComponents(segment, 0L); } + /// {@return `maxTessellationEvaluationOutputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTessellationEvaluationOutputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxTessellationEvaluationOutputComponents(this.segment(), index); } + /// {@return `maxTessellationEvaluationOutputComponents`} + public @CType("uint32_t") int maxTessellationEvaluationOutputComponents() { return VkPhysicalDeviceLimits.get_maxTessellationEvaluationOutputComponents(this.segment()); } + /// Sets `maxTessellationEvaluationOutputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTessellationEvaluationOutputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTessellationEvaluationOutputComponents.set(segment, 0L, index, value); } + /// Sets `maxTessellationEvaluationOutputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTessellationEvaluationOutputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationEvaluationOutputComponents(segment, 0L, value); } + /// Sets `maxTessellationEvaluationOutputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationEvaluationOutputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationEvaluationOutputComponents(this.segment(), index, value); return this; } + /// Sets `maxTessellationEvaluationOutputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTessellationEvaluationOutputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTessellationEvaluationOutputComponents(this.segment(), value); return this; } + + /// {@return `maxGeometryShaderInvocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxGeometryShaderInvocations(MemorySegment segment, long index) { return (int) VH_maxGeometryShaderInvocations.get(segment, 0L, index); } + /// {@return `maxGeometryShaderInvocations`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxGeometryShaderInvocations(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxGeometryShaderInvocations(segment, 0L); } + /// {@return `maxGeometryShaderInvocations` at the given index} + /// @param index the index + public @CType("uint32_t") int maxGeometryShaderInvocationsAt(long index) { return VkPhysicalDeviceLimits.get_maxGeometryShaderInvocations(this.segment(), index); } + /// {@return `maxGeometryShaderInvocations`} + public @CType("uint32_t") int maxGeometryShaderInvocations() { return VkPhysicalDeviceLimits.get_maxGeometryShaderInvocations(this.segment()); } + /// Sets `maxGeometryShaderInvocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxGeometryShaderInvocations(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxGeometryShaderInvocations.set(segment, 0L, index, value); } + /// Sets `maxGeometryShaderInvocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxGeometryShaderInvocations(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryShaderInvocations(segment, 0L, value); } + /// Sets `maxGeometryShaderInvocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxGeometryShaderInvocationsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryShaderInvocations(this.segment(), index, value); return this; } + /// Sets `maxGeometryShaderInvocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxGeometryShaderInvocations(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryShaderInvocations(this.segment(), value); return this; } + + /// {@return `maxGeometryInputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxGeometryInputComponents(MemorySegment segment, long index) { return (int) VH_maxGeometryInputComponents.get(segment, 0L, index); } + /// {@return `maxGeometryInputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxGeometryInputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxGeometryInputComponents(segment, 0L); } + /// {@return `maxGeometryInputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxGeometryInputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxGeometryInputComponents(this.segment(), index); } + /// {@return `maxGeometryInputComponents`} + public @CType("uint32_t") int maxGeometryInputComponents() { return VkPhysicalDeviceLimits.get_maxGeometryInputComponents(this.segment()); } + /// Sets `maxGeometryInputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxGeometryInputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxGeometryInputComponents.set(segment, 0L, index, value); } + /// Sets `maxGeometryInputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxGeometryInputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryInputComponents(segment, 0L, value); } + /// Sets `maxGeometryInputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxGeometryInputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryInputComponents(this.segment(), index, value); return this; } + /// Sets `maxGeometryInputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxGeometryInputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryInputComponents(this.segment(), value); return this; } + + /// {@return `maxGeometryOutputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxGeometryOutputComponents(MemorySegment segment, long index) { return (int) VH_maxGeometryOutputComponents.get(segment, 0L, index); } + /// {@return `maxGeometryOutputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxGeometryOutputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxGeometryOutputComponents(segment, 0L); } + /// {@return `maxGeometryOutputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxGeometryOutputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxGeometryOutputComponents(this.segment(), index); } + /// {@return `maxGeometryOutputComponents`} + public @CType("uint32_t") int maxGeometryOutputComponents() { return VkPhysicalDeviceLimits.get_maxGeometryOutputComponents(this.segment()); } + /// Sets `maxGeometryOutputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxGeometryOutputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxGeometryOutputComponents.set(segment, 0L, index, value); } + /// Sets `maxGeometryOutputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxGeometryOutputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryOutputComponents(segment, 0L, value); } + /// Sets `maxGeometryOutputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxGeometryOutputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryOutputComponents(this.segment(), index, value); return this; } + /// Sets `maxGeometryOutputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxGeometryOutputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryOutputComponents(this.segment(), value); return this; } + + /// {@return `maxGeometryOutputVertices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxGeometryOutputVertices(MemorySegment segment, long index) { return (int) VH_maxGeometryOutputVertices.get(segment, 0L, index); } + /// {@return `maxGeometryOutputVertices`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxGeometryOutputVertices(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxGeometryOutputVertices(segment, 0L); } + /// {@return `maxGeometryOutputVertices` at the given index} + /// @param index the index + public @CType("uint32_t") int maxGeometryOutputVerticesAt(long index) { return VkPhysicalDeviceLimits.get_maxGeometryOutputVertices(this.segment(), index); } + /// {@return `maxGeometryOutputVertices`} + public @CType("uint32_t") int maxGeometryOutputVertices() { return VkPhysicalDeviceLimits.get_maxGeometryOutputVertices(this.segment()); } + /// Sets `maxGeometryOutputVertices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxGeometryOutputVertices(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxGeometryOutputVertices.set(segment, 0L, index, value); } + /// Sets `maxGeometryOutputVertices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxGeometryOutputVertices(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryOutputVertices(segment, 0L, value); } + /// Sets `maxGeometryOutputVertices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxGeometryOutputVerticesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryOutputVertices(this.segment(), index, value); return this; } + /// Sets `maxGeometryOutputVertices` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxGeometryOutputVertices(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryOutputVertices(this.segment(), value); return this; } + + /// {@return `maxGeometryTotalOutputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxGeometryTotalOutputComponents(MemorySegment segment, long index) { return (int) VH_maxGeometryTotalOutputComponents.get(segment, 0L, index); } + /// {@return `maxGeometryTotalOutputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxGeometryTotalOutputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxGeometryTotalOutputComponents(segment, 0L); } + /// {@return `maxGeometryTotalOutputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxGeometryTotalOutputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxGeometryTotalOutputComponents(this.segment(), index); } + /// {@return `maxGeometryTotalOutputComponents`} + public @CType("uint32_t") int maxGeometryTotalOutputComponents() { return VkPhysicalDeviceLimits.get_maxGeometryTotalOutputComponents(this.segment()); } + /// Sets `maxGeometryTotalOutputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxGeometryTotalOutputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxGeometryTotalOutputComponents.set(segment, 0L, index, value); } + /// Sets `maxGeometryTotalOutputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxGeometryTotalOutputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryTotalOutputComponents(segment, 0L, value); } + /// Sets `maxGeometryTotalOutputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxGeometryTotalOutputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryTotalOutputComponents(this.segment(), index, value); return this; } + /// Sets `maxGeometryTotalOutputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxGeometryTotalOutputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxGeometryTotalOutputComponents(this.segment(), value); return this; } + + /// {@return `maxFragmentInputComponents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFragmentInputComponents(MemorySegment segment, long index) { return (int) VH_maxFragmentInputComponents.get(segment, 0L, index); } + /// {@return `maxFragmentInputComponents`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFragmentInputComponents(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxFragmentInputComponents(segment, 0L); } + /// {@return `maxFragmentInputComponents` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFragmentInputComponentsAt(long index) { return VkPhysicalDeviceLimits.get_maxFragmentInputComponents(this.segment(), index); } + /// {@return `maxFragmentInputComponents`} + public @CType("uint32_t") int maxFragmentInputComponents() { return VkPhysicalDeviceLimits.get_maxFragmentInputComponents(this.segment()); } + /// Sets `maxFragmentInputComponents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentInputComponents(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFragmentInputComponents.set(segment, 0L, index, value); } + /// Sets `maxFragmentInputComponents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentInputComponents(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentInputComponents(segment, 0L, value); } + /// Sets `maxFragmentInputComponents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFragmentInputComponentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentInputComponents(this.segment(), index, value); return this; } + /// Sets `maxFragmentInputComponents` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFragmentInputComponents(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentInputComponents(this.segment(), value); return this; } + + /// {@return `maxFragmentOutputAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFragmentOutputAttachments(MemorySegment segment, long index) { return (int) VH_maxFragmentOutputAttachments.get(segment, 0L, index); } + /// {@return `maxFragmentOutputAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFragmentOutputAttachments(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxFragmentOutputAttachments(segment, 0L); } + /// {@return `maxFragmentOutputAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFragmentOutputAttachmentsAt(long index) { return VkPhysicalDeviceLimits.get_maxFragmentOutputAttachments(this.segment(), index); } + /// {@return `maxFragmentOutputAttachments`} + public @CType("uint32_t") int maxFragmentOutputAttachments() { return VkPhysicalDeviceLimits.get_maxFragmentOutputAttachments(this.segment()); } + /// Sets `maxFragmentOutputAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentOutputAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFragmentOutputAttachments.set(segment, 0L, index, value); } + /// Sets `maxFragmentOutputAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentOutputAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentOutputAttachments(segment, 0L, value); } + /// Sets `maxFragmentOutputAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFragmentOutputAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentOutputAttachments(this.segment(), index, value); return this; } + /// Sets `maxFragmentOutputAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFragmentOutputAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentOutputAttachments(this.segment(), value); return this; } + + /// {@return `maxFragmentDualSrcAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFragmentDualSrcAttachments(MemorySegment segment, long index) { return (int) VH_maxFragmentDualSrcAttachments.get(segment, 0L, index); } + /// {@return `maxFragmentDualSrcAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFragmentDualSrcAttachments(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxFragmentDualSrcAttachments(segment, 0L); } + /// {@return `maxFragmentDualSrcAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFragmentDualSrcAttachmentsAt(long index) { return VkPhysicalDeviceLimits.get_maxFragmentDualSrcAttachments(this.segment(), index); } + /// {@return `maxFragmentDualSrcAttachments`} + public @CType("uint32_t") int maxFragmentDualSrcAttachments() { return VkPhysicalDeviceLimits.get_maxFragmentDualSrcAttachments(this.segment()); } + /// Sets `maxFragmentDualSrcAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentDualSrcAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFragmentDualSrcAttachments.set(segment, 0L, index, value); } + /// Sets `maxFragmentDualSrcAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentDualSrcAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentDualSrcAttachments(segment, 0L, value); } + /// Sets `maxFragmentDualSrcAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFragmentDualSrcAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentDualSrcAttachments(this.segment(), index, value); return this; } + /// Sets `maxFragmentDualSrcAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFragmentDualSrcAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentDualSrcAttachments(this.segment(), value); return this; } + + /// {@return `maxFragmentCombinedOutputResources` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFragmentCombinedOutputResources(MemorySegment segment, long index) { return (int) VH_maxFragmentCombinedOutputResources.get(segment, 0L, index); } + /// {@return `maxFragmentCombinedOutputResources`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFragmentCombinedOutputResources(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxFragmentCombinedOutputResources(segment, 0L); } + /// {@return `maxFragmentCombinedOutputResources` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFragmentCombinedOutputResourcesAt(long index) { return VkPhysicalDeviceLimits.get_maxFragmentCombinedOutputResources(this.segment(), index); } + /// {@return `maxFragmentCombinedOutputResources`} + public @CType("uint32_t") int maxFragmentCombinedOutputResources() { return VkPhysicalDeviceLimits.get_maxFragmentCombinedOutputResources(this.segment()); } + /// Sets `maxFragmentCombinedOutputResources` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFragmentCombinedOutputResources(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFragmentCombinedOutputResources.set(segment, 0L, index, value); } + /// Sets `maxFragmentCombinedOutputResources` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFragmentCombinedOutputResources(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentCombinedOutputResources(segment, 0L, value); } + /// Sets `maxFragmentCombinedOutputResources` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFragmentCombinedOutputResourcesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentCombinedOutputResources(this.segment(), index, value); return this; } + /// Sets `maxFragmentCombinedOutputResources` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFragmentCombinedOutputResources(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFragmentCombinedOutputResources(this.segment(), value); return this; } + + /// {@return `maxComputeSharedMemorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxComputeSharedMemorySize(MemorySegment segment, long index) { return (int) VH_maxComputeSharedMemorySize.get(segment, 0L, index); } + /// {@return `maxComputeSharedMemorySize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxComputeSharedMemorySize(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxComputeSharedMemorySize(segment, 0L); } + /// {@return `maxComputeSharedMemorySize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxComputeSharedMemorySizeAt(long index) { return VkPhysicalDeviceLimits.get_maxComputeSharedMemorySize(this.segment(), index); } + /// {@return `maxComputeSharedMemorySize`} + public @CType("uint32_t") int maxComputeSharedMemorySize() { return VkPhysicalDeviceLimits.get_maxComputeSharedMemorySize(this.segment()); } + /// Sets `maxComputeSharedMemorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxComputeSharedMemorySize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxComputeSharedMemorySize.set(segment, 0L, index, value); } + /// Sets `maxComputeSharedMemorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxComputeSharedMemorySize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxComputeSharedMemorySize(segment, 0L, value); } + /// Sets `maxComputeSharedMemorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxComputeSharedMemorySizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxComputeSharedMemorySize(this.segment(), index, value); return this; } + /// Sets `maxComputeSharedMemorySize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxComputeSharedMemorySize(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxComputeSharedMemorySize(this.segment(), value); return this; } + + /// {@return `maxComputeWorkGroupCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint32_t[3]") java.lang.foreign.MemorySegment get_maxComputeWorkGroupCount(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_maxComputeWorkGroupCount.invokeExact(0L, elementIndex), index), ML_maxComputeWorkGroupCount); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `maxComputeWorkGroupCount`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint32_t[3]") java.lang.foreign.MemorySegment get_maxComputeWorkGroupCount(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceLimits.get_maxComputeWorkGroupCount(segment, 0L, elementIndex); } + /// {@return `maxComputeWorkGroupCount` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint32_t[3]") java.lang.foreign.MemorySegment maxComputeWorkGroupCountAt(long index, long elementIndex) { return VkPhysicalDeviceLimits.get_maxComputeWorkGroupCount(this.segment(), index, elementIndex); } + /// {@return `maxComputeWorkGroupCount`} + /// @param elementIndex the index of the element + public @CType("uint32_t[3]") java.lang.foreign.MemorySegment maxComputeWorkGroupCount(long elementIndex) { return VkPhysicalDeviceLimits.get_maxComputeWorkGroupCount(this.segment(), elementIndex); } + /// Sets `maxComputeWorkGroupCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_maxComputeWorkGroupCount(MemorySegment segment, long index, long elementIndex, @CType("uint32_t[3]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_maxComputeWorkGroupCount.invokeExact(0L, elementIndex), index), ML_maxComputeWorkGroupCount.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `maxComputeWorkGroupCount` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_maxComputeWorkGroupCount(MemorySegment segment, long elementIndex, @CType("uint32_t[3]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_maxComputeWorkGroupCount(segment, 0L, elementIndex, value); } + /// Sets `maxComputeWorkGroupCount` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxComputeWorkGroupCountAt(long index, long elementIndex, @CType("uint32_t[3]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_maxComputeWorkGroupCount(this.segment(), index, elementIndex, value); return this; } + /// Sets `maxComputeWorkGroupCount` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxComputeWorkGroupCount(long elementIndex, @CType("uint32_t[3]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_maxComputeWorkGroupCount(this.segment(), elementIndex, value); return this; } + + /// {@return `maxComputeWorkGroupInvocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxComputeWorkGroupInvocations(MemorySegment segment, long index) { return (int) VH_maxComputeWorkGroupInvocations.get(segment, 0L, index); } + /// {@return `maxComputeWorkGroupInvocations`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxComputeWorkGroupInvocations(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxComputeWorkGroupInvocations(segment, 0L); } + /// {@return `maxComputeWorkGroupInvocations` at the given index} + /// @param index the index + public @CType("uint32_t") int maxComputeWorkGroupInvocationsAt(long index) { return VkPhysicalDeviceLimits.get_maxComputeWorkGroupInvocations(this.segment(), index); } + /// {@return `maxComputeWorkGroupInvocations`} + public @CType("uint32_t") int maxComputeWorkGroupInvocations() { return VkPhysicalDeviceLimits.get_maxComputeWorkGroupInvocations(this.segment()); } + /// Sets `maxComputeWorkGroupInvocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxComputeWorkGroupInvocations(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxComputeWorkGroupInvocations.set(segment, 0L, index, value); } + /// Sets `maxComputeWorkGroupInvocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxComputeWorkGroupInvocations(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxComputeWorkGroupInvocations(segment, 0L, value); } + /// Sets `maxComputeWorkGroupInvocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxComputeWorkGroupInvocationsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxComputeWorkGroupInvocations(this.segment(), index, value); return this; } + /// Sets `maxComputeWorkGroupInvocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxComputeWorkGroupInvocations(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxComputeWorkGroupInvocations(this.segment(), value); return this; } + + /// {@return `maxComputeWorkGroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint32_t[3]") java.lang.foreign.MemorySegment get_maxComputeWorkGroupSize(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_maxComputeWorkGroupSize.invokeExact(0L, elementIndex), index), ML_maxComputeWorkGroupSize); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `maxComputeWorkGroupSize`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint32_t[3]") java.lang.foreign.MemorySegment get_maxComputeWorkGroupSize(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceLimits.get_maxComputeWorkGroupSize(segment, 0L, elementIndex); } + /// {@return `maxComputeWorkGroupSize` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint32_t[3]") java.lang.foreign.MemorySegment maxComputeWorkGroupSizeAt(long index, long elementIndex) { return VkPhysicalDeviceLimits.get_maxComputeWorkGroupSize(this.segment(), index, elementIndex); } + /// {@return `maxComputeWorkGroupSize`} + /// @param elementIndex the index of the element + public @CType("uint32_t[3]") java.lang.foreign.MemorySegment maxComputeWorkGroupSize(long elementIndex) { return VkPhysicalDeviceLimits.get_maxComputeWorkGroupSize(this.segment(), elementIndex); } + /// Sets `maxComputeWorkGroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_maxComputeWorkGroupSize(MemorySegment segment, long index, long elementIndex, @CType("uint32_t[3]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_maxComputeWorkGroupSize.invokeExact(0L, elementIndex), index), ML_maxComputeWorkGroupSize.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `maxComputeWorkGroupSize` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_maxComputeWorkGroupSize(MemorySegment segment, long elementIndex, @CType("uint32_t[3]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_maxComputeWorkGroupSize(segment, 0L, elementIndex, value); } + /// Sets `maxComputeWorkGroupSize` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxComputeWorkGroupSizeAt(long index, long elementIndex, @CType("uint32_t[3]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_maxComputeWorkGroupSize(this.segment(), index, elementIndex, value); return this; } + /// Sets `maxComputeWorkGroupSize` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxComputeWorkGroupSize(long elementIndex, @CType("uint32_t[3]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_maxComputeWorkGroupSize(this.segment(), elementIndex, value); return this; } + + /// {@return `subPixelPrecisionBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subPixelPrecisionBits(MemorySegment segment, long index) { return (int) VH_subPixelPrecisionBits.get(segment, 0L, index); } + /// {@return `subPixelPrecisionBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subPixelPrecisionBits(MemorySegment segment) { return VkPhysicalDeviceLimits.get_subPixelPrecisionBits(segment, 0L); } + /// {@return `subPixelPrecisionBits` at the given index} + /// @param index the index + public @CType("uint32_t") int subPixelPrecisionBitsAt(long index) { return VkPhysicalDeviceLimits.get_subPixelPrecisionBits(this.segment(), index); } + /// {@return `subPixelPrecisionBits`} + public @CType("uint32_t") int subPixelPrecisionBits() { return VkPhysicalDeviceLimits.get_subPixelPrecisionBits(this.segment()); } + /// Sets `subPixelPrecisionBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subPixelPrecisionBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subPixelPrecisionBits.set(segment, 0L, index, value); } + /// Sets `subPixelPrecisionBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subPixelPrecisionBits(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_subPixelPrecisionBits(segment, 0L, value); } + /// Sets `subPixelPrecisionBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits subPixelPrecisionBitsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_subPixelPrecisionBits(this.segment(), index, value); return this; } + /// Sets `subPixelPrecisionBits` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits subPixelPrecisionBits(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_subPixelPrecisionBits(this.segment(), value); return this; } + + /// {@return `subTexelPrecisionBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subTexelPrecisionBits(MemorySegment segment, long index) { return (int) VH_subTexelPrecisionBits.get(segment, 0L, index); } + /// {@return `subTexelPrecisionBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subTexelPrecisionBits(MemorySegment segment) { return VkPhysicalDeviceLimits.get_subTexelPrecisionBits(segment, 0L); } + /// {@return `subTexelPrecisionBits` at the given index} + /// @param index the index + public @CType("uint32_t") int subTexelPrecisionBitsAt(long index) { return VkPhysicalDeviceLimits.get_subTexelPrecisionBits(this.segment(), index); } + /// {@return `subTexelPrecisionBits`} + public @CType("uint32_t") int subTexelPrecisionBits() { return VkPhysicalDeviceLimits.get_subTexelPrecisionBits(this.segment()); } + /// Sets `subTexelPrecisionBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subTexelPrecisionBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subTexelPrecisionBits.set(segment, 0L, index, value); } + /// Sets `subTexelPrecisionBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subTexelPrecisionBits(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_subTexelPrecisionBits(segment, 0L, value); } + /// Sets `subTexelPrecisionBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits subTexelPrecisionBitsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_subTexelPrecisionBits(this.segment(), index, value); return this; } + /// Sets `subTexelPrecisionBits` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits subTexelPrecisionBits(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_subTexelPrecisionBits(this.segment(), value); return this; } + + /// {@return `mipmapPrecisionBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_mipmapPrecisionBits(MemorySegment segment, long index) { return (int) VH_mipmapPrecisionBits.get(segment, 0L, index); } + /// {@return `mipmapPrecisionBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_mipmapPrecisionBits(MemorySegment segment) { return VkPhysicalDeviceLimits.get_mipmapPrecisionBits(segment, 0L); } + /// {@return `mipmapPrecisionBits` at the given index} + /// @param index the index + public @CType("uint32_t") int mipmapPrecisionBitsAt(long index) { return VkPhysicalDeviceLimits.get_mipmapPrecisionBits(this.segment(), index); } + /// {@return `mipmapPrecisionBits`} + public @CType("uint32_t") int mipmapPrecisionBits() { return VkPhysicalDeviceLimits.get_mipmapPrecisionBits(this.segment()); } + /// Sets `mipmapPrecisionBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mipmapPrecisionBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_mipmapPrecisionBits.set(segment, 0L, index, value); } + /// Sets `mipmapPrecisionBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mipmapPrecisionBits(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_mipmapPrecisionBits(segment, 0L, value); } + /// Sets `mipmapPrecisionBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits mipmapPrecisionBitsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_mipmapPrecisionBits(this.segment(), index, value); return this; } + /// Sets `mipmapPrecisionBits` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits mipmapPrecisionBits(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_mipmapPrecisionBits(this.segment(), value); return this; } + + /// {@return `maxDrawIndexedIndexValue` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDrawIndexedIndexValue(MemorySegment segment, long index) { return (int) VH_maxDrawIndexedIndexValue.get(segment, 0L, index); } + /// {@return `maxDrawIndexedIndexValue`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDrawIndexedIndexValue(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxDrawIndexedIndexValue(segment, 0L); } + /// {@return `maxDrawIndexedIndexValue` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDrawIndexedIndexValueAt(long index) { return VkPhysicalDeviceLimits.get_maxDrawIndexedIndexValue(this.segment(), index); } + /// {@return `maxDrawIndexedIndexValue`} + public @CType("uint32_t") int maxDrawIndexedIndexValue() { return VkPhysicalDeviceLimits.get_maxDrawIndexedIndexValue(this.segment()); } + /// Sets `maxDrawIndexedIndexValue` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDrawIndexedIndexValue(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDrawIndexedIndexValue.set(segment, 0L, index, value); } + /// Sets `maxDrawIndexedIndexValue` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDrawIndexedIndexValue(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDrawIndexedIndexValue(segment, 0L, value); } + /// Sets `maxDrawIndexedIndexValue` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDrawIndexedIndexValueAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDrawIndexedIndexValue(this.segment(), index, value); return this; } + /// Sets `maxDrawIndexedIndexValue` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDrawIndexedIndexValue(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDrawIndexedIndexValue(this.segment(), value); return this; } + + /// {@return `maxDrawIndirectCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDrawIndirectCount(MemorySegment segment, long index) { return (int) VH_maxDrawIndirectCount.get(segment, 0L, index); } + /// {@return `maxDrawIndirectCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDrawIndirectCount(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxDrawIndirectCount(segment, 0L); } + /// {@return `maxDrawIndirectCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDrawIndirectCountAt(long index) { return VkPhysicalDeviceLimits.get_maxDrawIndirectCount(this.segment(), index); } + /// {@return `maxDrawIndirectCount`} + public @CType("uint32_t") int maxDrawIndirectCount() { return VkPhysicalDeviceLimits.get_maxDrawIndirectCount(this.segment()); } + /// Sets `maxDrawIndirectCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDrawIndirectCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDrawIndirectCount.set(segment, 0L, index, value); } + /// Sets `maxDrawIndirectCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDrawIndirectCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDrawIndirectCount(segment, 0L, value); } + /// Sets `maxDrawIndirectCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDrawIndirectCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDrawIndirectCount(this.segment(), index, value); return this; } + /// Sets `maxDrawIndirectCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxDrawIndirectCount(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxDrawIndirectCount(this.segment(), value); return this; } + + /// {@return `maxSamplerLodBias` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxSamplerLodBias(MemorySegment segment, long index) { return (float) VH_maxSamplerLodBias.get(segment, 0L, index); } + /// {@return `maxSamplerLodBias`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxSamplerLodBias(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxSamplerLodBias(segment, 0L); } + /// {@return `maxSamplerLodBias` at the given index} + /// @param index the index + public @CType("float") float maxSamplerLodBiasAt(long index) { return VkPhysicalDeviceLimits.get_maxSamplerLodBias(this.segment(), index); } + /// {@return `maxSamplerLodBias`} + public @CType("float") float maxSamplerLodBias() { return VkPhysicalDeviceLimits.get_maxSamplerLodBias(this.segment()); } + /// Sets `maxSamplerLodBias` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSamplerLodBias(MemorySegment segment, long index, @CType("float") float value) { VH_maxSamplerLodBias.set(segment, 0L, index, value); } + /// Sets `maxSamplerLodBias` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSamplerLodBias(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceLimits.set_maxSamplerLodBias(segment, 0L, value); } + /// Sets `maxSamplerLodBias` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxSamplerLodBiasAt(long index, @CType("float") float value) { VkPhysicalDeviceLimits.set_maxSamplerLodBias(this.segment(), index, value); return this; } + /// Sets `maxSamplerLodBias` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxSamplerLodBias(@CType("float") float value) { VkPhysicalDeviceLimits.set_maxSamplerLodBias(this.segment(), value); return this; } + + /// {@return `maxSamplerAnisotropy` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxSamplerAnisotropy(MemorySegment segment, long index) { return (float) VH_maxSamplerAnisotropy.get(segment, 0L, index); } + /// {@return `maxSamplerAnisotropy`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxSamplerAnisotropy(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxSamplerAnisotropy(segment, 0L); } + /// {@return `maxSamplerAnisotropy` at the given index} + /// @param index the index + public @CType("float") float maxSamplerAnisotropyAt(long index) { return VkPhysicalDeviceLimits.get_maxSamplerAnisotropy(this.segment(), index); } + /// {@return `maxSamplerAnisotropy`} + public @CType("float") float maxSamplerAnisotropy() { return VkPhysicalDeviceLimits.get_maxSamplerAnisotropy(this.segment()); } + /// Sets `maxSamplerAnisotropy` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSamplerAnisotropy(MemorySegment segment, long index, @CType("float") float value) { VH_maxSamplerAnisotropy.set(segment, 0L, index, value); } + /// Sets `maxSamplerAnisotropy` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSamplerAnisotropy(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceLimits.set_maxSamplerAnisotropy(segment, 0L, value); } + /// Sets `maxSamplerAnisotropy` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxSamplerAnisotropyAt(long index, @CType("float") float value) { VkPhysicalDeviceLimits.set_maxSamplerAnisotropy(this.segment(), index, value); return this; } + /// Sets `maxSamplerAnisotropy` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxSamplerAnisotropy(@CType("float") float value) { VkPhysicalDeviceLimits.set_maxSamplerAnisotropy(this.segment(), value); return this; } + + /// {@return `maxViewports` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxViewports(MemorySegment segment, long index) { return (int) VH_maxViewports.get(segment, 0L, index); } + /// {@return `maxViewports`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxViewports(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxViewports(segment, 0L); } + /// {@return `maxViewports` at the given index} + /// @param index the index + public @CType("uint32_t") int maxViewportsAt(long index) { return VkPhysicalDeviceLimits.get_maxViewports(this.segment(), index); } + /// {@return `maxViewports`} + public @CType("uint32_t") int maxViewports() { return VkPhysicalDeviceLimits.get_maxViewports(this.segment()); } + /// Sets `maxViewports` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxViewports(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxViewports.set(segment, 0L, index, value); } + /// Sets `maxViewports` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxViewports(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxViewports(segment, 0L, value); } + /// Sets `maxViewports` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxViewportsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxViewports(this.segment(), index, value); return this; } + /// Sets `maxViewports` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxViewports(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxViewports(this.segment(), value); return this; } + + /// {@return `maxViewportDimensions` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint32_t[2]") java.lang.foreign.MemorySegment get_maxViewportDimensions(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_maxViewportDimensions.invokeExact(0L, elementIndex), index), ML_maxViewportDimensions); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `maxViewportDimensions`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint32_t[2]") java.lang.foreign.MemorySegment get_maxViewportDimensions(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceLimits.get_maxViewportDimensions(segment, 0L, elementIndex); } + /// {@return `maxViewportDimensions` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint32_t[2]") java.lang.foreign.MemorySegment maxViewportDimensionsAt(long index, long elementIndex) { return VkPhysicalDeviceLimits.get_maxViewportDimensions(this.segment(), index, elementIndex); } + /// {@return `maxViewportDimensions`} + /// @param elementIndex the index of the element + public @CType("uint32_t[2]") java.lang.foreign.MemorySegment maxViewportDimensions(long elementIndex) { return VkPhysicalDeviceLimits.get_maxViewportDimensions(this.segment(), elementIndex); } + /// Sets `maxViewportDimensions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_maxViewportDimensions(MemorySegment segment, long index, long elementIndex, @CType("uint32_t[2]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_maxViewportDimensions.invokeExact(0L, elementIndex), index), ML_maxViewportDimensions.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `maxViewportDimensions` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_maxViewportDimensions(MemorySegment segment, long elementIndex, @CType("uint32_t[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_maxViewportDimensions(segment, 0L, elementIndex, value); } + /// Sets `maxViewportDimensions` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxViewportDimensionsAt(long index, long elementIndex, @CType("uint32_t[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_maxViewportDimensions(this.segment(), index, elementIndex, value); return this; } + /// Sets `maxViewportDimensions` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxViewportDimensions(long elementIndex, @CType("uint32_t[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_maxViewportDimensions(this.segment(), elementIndex, value); return this; } + + /// {@return `viewportBoundsRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("float[2]") java.lang.foreign.MemorySegment get_viewportBoundsRange(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_viewportBoundsRange.invokeExact(0L, elementIndex), index), ML_viewportBoundsRange); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `viewportBoundsRange`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("float[2]") java.lang.foreign.MemorySegment get_viewportBoundsRange(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceLimits.get_viewportBoundsRange(segment, 0L, elementIndex); } + /// {@return `viewportBoundsRange` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("float[2]") java.lang.foreign.MemorySegment viewportBoundsRangeAt(long index, long elementIndex) { return VkPhysicalDeviceLimits.get_viewportBoundsRange(this.segment(), index, elementIndex); } + /// {@return `viewportBoundsRange`} + /// @param elementIndex the index of the element + public @CType("float[2]") java.lang.foreign.MemorySegment viewportBoundsRange(long elementIndex) { return VkPhysicalDeviceLimits.get_viewportBoundsRange(this.segment(), elementIndex); } + /// Sets `viewportBoundsRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_viewportBoundsRange(MemorySegment segment, long index, long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_viewportBoundsRange.invokeExact(0L, elementIndex), index), ML_viewportBoundsRange.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `viewportBoundsRange` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_viewportBoundsRange(MemorySegment segment, long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_viewportBoundsRange(segment, 0L, elementIndex, value); } + /// Sets `viewportBoundsRange` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits viewportBoundsRangeAt(long index, long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_viewportBoundsRange(this.segment(), index, elementIndex, value); return this; } + /// Sets `viewportBoundsRange` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits viewportBoundsRange(long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_viewportBoundsRange(this.segment(), elementIndex, value); return this; } + + /// {@return `viewportSubPixelBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewportSubPixelBits(MemorySegment segment, long index) { return (int) VH_viewportSubPixelBits.get(segment, 0L, index); } + /// {@return `viewportSubPixelBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewportSubPixelBits(MemorySegment segment) { return VkPhysicalDeviceLimits.get_viewportSubPixelBits(segment, 0L); } + /// {@return `viewportSubPixelBits` at the given index} + /// @param index the index + public @CType("uint32_t") int viewportSubPixelBitsAt(long index) { return VkPhysicalDeviceLimits.get_viewportSubPixelBits(this.segment(), index); } + /// {@return `viewportSubPixelBits`} + public @CType("uint32_t") int viewportSubPixelBits() { return VkPhysicalDeviceLimits.get_viewportSubPixelBits(this.segment()); } + /// Sets `viewportSubPixelBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewportSubPixelBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewportSubPixelBits.set(segment, 0L, index, value); } + /// Sets `viewportSubPixelBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewportSubPixelBits(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_viewportSubPixelBits(segment, 0L, value); } + /// Sets `viewportSubPixelBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits viewportSubPixelBitsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_viewportSubPixelBits(this.segment(), index, value); return this; } + /// Sets `viewportSubPixelBits` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits viewportSubPixelBits(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_viewportSubPixelBits(this.segment(), value); return this; } + + /// {@return `minMemoryMapAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_minMemoryMapAlignment(MemorySegment segment, long index) { return (long) VH_minMemoryMapAlignment.get(segment, 0L, index); } + /// {@return `minMemoryMapAlignment`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_minMemoryMapAlignment(MemorySegment segment) { return VkPhysicalDeviceLimits.get_minMemoryMapAlignment(segment, 0L); } + /// {@return `minMemoryMapAlignment` at the given index} + /// @param index the index + public @CType("size_t") long minMemoryMapAlignmentAt(long index) { return VkPhysicalDeviceLimits.get_minMemoryMapAlignment(this.segment(), index); } + /// {@return `minMemoryMapAlignment`} + public @CType("size_t") long minMemoryMapAlignment() { return VkPhysicalDeviceLimits.get_minMemoryMapAlignment(this.segment()); } + /// Sets `minMemoryMapAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minMemoryMapAlignment(MemorySegment segment, long index, @CType("size_t") long value) { VH_minMemoryMapAlignment.set(segment, 0L, index, value); } + /// Sets `minMemoryMapAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minMemoryMapAlignment(MemorySegment segment, @CType("size_t") long value) { VkPhysicalDeviceLimits.set_minMemoryMapAlignment(segment, 0L, value); } + /// Sets `minMemoryMapAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minMemoryMapAlignmentAt(long index, @CType("size_t") long value) { VkPhysicalDeviceLimits.set_minMemoryMapAlignment(this.segment(), index, value); return this; } + /// Sets `minMemoryMapAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minMemoryMapAlignment(@CType("size_t") long value) { VkPhysicalDeviceLimits.set_minMemoryMapAlignment(this.segment(), value); return this; } + + /// {@return `minTexelBufferOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_minTexelBufferOffsetAlignment(MemorySegment segment, long index) { return (long) VH_minTexelBufferOffsetAlignment.get(segment, 0L, index); } + /// {@return `minTexelBufferOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_minTexelBufferOffsetAlignment(MemorySegment segment) { return VkPhysicalDeviceLimits.get_minTexelBufferOffsetAlignment(segment, 0L); } + /// {@return `minTexelBufferOffsetAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long minTexelBufferOffsetAlignmentAt(long index) { return VkPhysicalDeviceLimits.get_minTexelBufferOffsetAlignment(this.segment(), index); } + /// {@return `minTexelBufferOffsetAlignment`} + public @CType("VkDeviceSize") long minTexelBufferOffsetAlignment() { return VkPhysicalDeviceLimits.get_minTexelBufferOffsetAlignment(this.segment()); } + /// Sets `minTexelBufferOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minTexelBufferOffsetAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_minTexelBufferOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `minTexelBufferOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minTexelBufferOffsetAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_minTexelBufferOffsetAlignment(segment, 0L, value); } + /// Sets `minTexelBufferOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minTexelBufferOffsetAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_minTexelBufferOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `minTexelBufferOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minTexelBufferOffsetAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_minTexelBufferOffsetAlignment(this.segment(), value); return this; } + + /// {@return `minUniformBufferOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_minUniformBufferOffsetAlignment(MemorySegment segment, long index) { return (long) VH_minUniformBufferOffsetAlignment.get(segment, 0L, index); } + /// {@return `minUniformBufferOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_minUniformBufferOffsetAlignment(MemorySegment segment) { return VkPhysicalDeviceLimits.get_minUniformBufferOffsetAlignment(segment, 0L); } + /// {@return `minUniformBufferOffsetAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long minUniformBufferOffsetAlignmentAt(long index) { return VkPhysicalDeviceLimits.get_minUniformBufferOffsetAlignment(this.segment(), index); } + /// {@return `minUniformBufferOffsetAlignment`} + public @CType("VkDeviceSize") long minUniformBufferOffsetAlignment() { return VkPhysicalDeviceLimits.get_minUniformBufferOffsetAlignment(this.segment()); } + /// Sets `minUniformBufferOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minUniformBufferOffsetAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_minUniformBufferOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `minUniformBufferOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minUniformBufferOffsetAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_minUniformBufferOffsetAlignment(segment, 0L, value); } + /// Sets `minUniformBufferOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minUniformBufferOffsetAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_minUniformBufferOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `minUniformBufferOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minUniformBufferOffsetAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_minUniformBufferOffsetAlignment(this.segment(), value); return this; } + + /// {@return `minStorageBufferOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_minStorageBufferOffsetAlignment(MemorySegment segment, long index) { return (long) VH_minStorageBufferOffsetAlignment.get(segment, 0L, index); } + /// {@return `minStorageBufferOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_minStorageBufferOffsetAlignment(MemorySegment segment) { return VkPhysicalDeviceLimits.get_minStorageBufferOffsetAlignment(segment, 0L); } + /// {@return `minStorageBufferOffsetAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long minStorageBufferOffsetAlignmentAt(long index) { return VkPhysicalDeviceLimits.get_minStorageBufferOffsetAlignment(this.segment(), index); } + /// {@return `minStorageBufferOffsetAlignment`} + public @CType("VkDeviceSize") long minStorageBufferOffsetAlignment() { return VkPhysicalDeviceLimits.get_minStorageBufferOffsetAlignment(this.segment()); } + /// Sets `minStorageBufferOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minStorageBufferOffsetAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_minStorageBufferOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `minStorageBufferOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minStorageBufferOffsetAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_minStorageBufferOffsetAlignment(segment, 0L, value); } + /// Sets `minStorageBufferOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minStorageBufferOffsetAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_minStorageBufferOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `minStorageBufferOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minStorageBufferOffsetAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_minStorageBufferOffsetAlignment(this.segment(), value); return this; } + + /// {@return `minTexelOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_minTexelOffset(MemorySegment segment, long index) { return (int) VH_minTexelOffset.get(segment, 0L, index); } + /// {@return `minTexelOffset`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_minTexelOffset(MemorySegment segment) { return VkPhysicalDeviceLimits.get_minTexelOffset(segment, 0L); } + /// {@return `minTexelOffset` at the given index} + /// @param index the index + public @CType("int32_t") int minTexelOffsetAt(long index) { return VkPhysicalDeviceLimits.get_minTexelOffset(this.segment(), index); } + /// {@return `minTexelOffset`} + public @CType("int32_t") int minTexelOffset() { return VkPhysicalDeviceLimits.get_minTexelOffset(this.segment()); } + /// Sets `minTexelOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minTexelOffset(MemorySegment segment, long index, @CType("int32_t") int value) { VH_minTexelOffset.set(segment, 0L, index, value); } + /// Sets `minTexelOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minTexelOffset(MemorySegment segment, @CType("int32_t") int value) { VkPhysicalDeviceLimits.set_minTexelOffset(segment, 0L, value); } + /// Sets `minTexelOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minTexelOffsetAt(long index, @CType("int32_t") int value) { VkPhysicalDeviceLimits.set_minTexelOffset(this.segment(), index, value); return this; } + /// Sets `minTexelOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minTexelOffset(@CType("int32_t") int value) { VkPhysicalDeviceLimits.set_minTexelOffset(this.segment(), value); return this; } + + /// {@return `maxTexelOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTexelOffset(MemorySegment segment, long index) { return (int) VH_maxTexelOffset.get(segment, 0L, index); } + /// {@return `maxTexelOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTexelOffset(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTexelOffset(segment, 0L); } + /// {@return `maxTexelOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTexelOffsetAt(long index) { return VkPhysicalDeviceLimits.get_maxTexelOffset(this.segment(), index); } + /// {@return `maxTexelOffset`} + public @CType("uint32_t") int maxTexelOffset() { return VkPhysicalDeviceLimits.get_maxTexelOffset(this.segment()); } + /// Sets `maxTexelOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTexelOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTexelOffset.set(segment, 0L, index, value); } + /// Sets `maxTexelOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTexelOffset(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTexelOffset(segment, 0L, value); } + /// Sets `maxTexelOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTexelOffsetAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTexelOffset(this.segment(), index, value); return this; } + /// Sets `maxTexelOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTexelOffset(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTexelOffset(this.segment(), value); return this; } + + /// {@return `minTexelGatherOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_minTexelGatherOffset(MemorySegment segment, long index) { return (int) VH_minTexelGatherOffset.get(segment, 0L, index); } + /// {@return `minTexelGatherOffset`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_minTexelGatherOffset(MemorySegment segment) { return VkPhysicalDeviceLimits.get_minTexelGatherOffset(segment, 0L); } + /// {@return `minTexelGatherOffset` at the given index} + /// @param index the index + public @CType("int32_t") int minTexelGatherOffsetAt(long index) { return VkPhysicalDeviceLimits.get_minTexelGatherOffset(this.segment(), index); } + /// {@return `minTexelGatherOffset`} + public @CType("int32_t") int minTexelGatherOffset() { return VkPhysicalDeviceLimits.get_minTexelGatherOffset(this.segment()); } + /// Sets `minTexelGatherOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minTexelGatherOffset(MemorySegment segment, long index, @CType("int32_t") int value) { VH_minTexelGatherOffset.set(segment, 0L, index, value); } + /// Sets `minTexelGatherOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minTexelGatherOffset(MemorySegment segment, @CType("int32_t") int value) { VkPhysicalDeviceLimits.set_minTexelGatherOffset(segment, 0L, value); } + /// Sets `minTexelGatherOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minTexelGatherOffsetAt(long index, @CType("int32_t") int value) { VkPhysicalDeviceLimits.set_minTexelGatherOffset(this.segment(), index, value); return this; } + /// Sets `minTexelGatherOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minTexelGatherOffset(@CType("int32_t") int value) { VkPhysicalDeviceLimits.set_minTexelGatherOffset(this.segment(), value); return this; } + + /// {@return `maxTexelGatherOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxTexelGatherOffset(MemorySegment segment, long index) { return (int) VH_maxTexelGatherOffset.get(segment, 0L, index); } + /// {@return `maxTexelGatherOffset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxTexelGatherOffset(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxTexelGatherOffset(segment, 0L); } + /// {@return `maxTexelGatherOffset` at the given index} + /// @param index the index + public @CType("uint32_t") int maxTexelGatherOffsetAt(long index) { return VkPhysicalDeviceLimits.get_maxTexelGatherOffset(this.segment(), index); } + /// {@return `maxTexelGatherOffset`} + public @CType("uint32_t") int maxTexelGatherOffset() { return VkPhysicalDeviceLimits.get_maxTexelGatherOffset(this.segment()); } + /// Sets `maxTexelGatherOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTexelGatherOffset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxTexelGatherOffset.set(segment, 0L, index, value); } + /// Sets `maxTexelGatherOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTexelGatherOffset(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTexelGatherOffset(segment, 0L, value); } + /// Sets `maxTexelGatherOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTexelGatherOffsetAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTexelGatherOffset(this.segment(), index, value); return this; } + /// Sets `maxTexelGatherOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxTexelGatherOffset(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxTexelGatherOffset(this.segment(), value); return this; } + + /// {@return `minInterpolationOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minInterpolationOffset(MemorySegment segment, long index) { return (float) VH_minInterpolationOffset.get(segment, 0L, index); } + /// {@return `minInterpolationOffset`} + /// @param segment the segment of the struct + public static @CType("float") float get_minInterpolationOffset(MemorySegment segment) { return VkPhysicalDeviceLimits.get_minInterpolationOffset(segment, 0L); } + /// {@return `minInterpolationOffset` at the given index} + /// @param index the index + public @CType("float") float minInterpolationOffsetAt(long index) { return VkPhysicalDeviceLimits.get_minInterpolationOffset(this.segment(), index); } + /// {@return `minInterpolationOffset`} + public @CType("float") float minInterpolationOffset() { return VkPhysicalDeviceLimits.get_minInterpolationOffset(this.segment()); } + /// Sets `minInterpolationOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minInterpolationOffset(MemorySegment segment, long index, @CType("float") float value) { VH_minInterpolationOffset.set(segment, 0L, index, value); } + /// Sets `minInterpolationOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minInterpolationOffset(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceLimits.set_minInterpolationOffset(segment, 0L, value); } + /// Sets `minInterpolationOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minInterpolationOffsetAt(long index, @CType("float") float value) { VkPhysicalDeviceLimits.set_minInterpolationOffset(this.segment(), index, value); return this; } + /// Sets `minInterpolationOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits minInterpolationOffset(@CType("float") float value) { VkPhysicalDeviceLimits.set_minInterpolationOffset(this.segment(), value); return this; } + + /// {@return `maxInterpolationOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxInterpolationOffset(MemorySegment segment, long index) { return (float) VH_maxInterpolationOffset.get(segment, 0L, index); } + /// {@return `maxInterpolationOffset`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxInterpolationOffset(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxInterpolationOffset(segment, 0L); } + /// {@return `maxInterpolationOffset` at the given index} + /// @param index the index + public @CType("float") float maxInterpolationOffsetAt(long index) { return VkPhysicalDeviceLimits.get_maxInterpolationOffset(this.segment(), index); } + /// {@return `maxInterpolationOffset`} + public @CType("float") float maxInterpolationOffset() { return VkPhysicalDeviceLimits.get_maxInterpolationOffset(this.segment()); } + /// Sets `maxInterpolationOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxInterpolationOffset(MemorySegment segment, long index, @CType("float") float value) { VH_maxInterpolationOffset.set(segment, 0L, index, value); } + /// Sets `maxInterpolationOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxInterpolationOffset(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceLimits.set_maxInterpolationOffset(segment, 0L, value); } + /// Sets `maxInterpolationOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxInterpolationOffsetAt(long index, @CType("float") float value) { VkPhysicalDeviceLimits.set_maxInterpolationOffset(this.segment(), index, value); return this; } + /// Sets `maxInterpolationOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxInterpolationOffset(@CType("float") float value) { VkPhysicalDeviceLimits.set_maxInterpolationOffset(this.segment(), value); return this; } + + /// {@return `subPixelInterpolationOffsetBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subPixelInterpolationOffsetBits(MemorySegment segment, long index) { return (int) VH_subPixelInterpolationOffsetBits.get(segment, 0L, index); } + /// {@return `subPixelInterpolationOffsetBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subPixelInterpolationOffsetBits(MemorySegment segment) { return VkPhysicalDeviceLimits.get_subPixelInterpolationOffsetBits(segment, 0L); } + /// {@return `subPixelInterpolationOffsetBits` at the given index} + /// @param index the index + public @CType("uint32_t") int subPixelInterpolationOffsetBitsAt(long index) { return VkPhysicalDeviceLimits.get_subPixelInterpolationOffsetBits(this.segment(), index); } + /// {@return `subPixelInterpolationOffsetBits`} + public @CType("uint32_t") int subPixelInterpolationOffsetBits() { return VkPhysicalDeviceLimits.get_subPixelInterpolationOffsetBits(this.segment()); } + /// Sets `subPixelInterpolationOffsetBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subPixelInterpolationOffsetBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subPixelInterpolationOffsetBits.set(segment, 0L, index, value); } + /// Sets `subPixelInterpolationOffsetBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subPixelInterpolationOffsetBits(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_subPixelInterpolationOffsetBits(segment, 0L, value); } + /// Sets `subPixelInterpolationOffsetBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits subPixelInterpolationOffsetBitsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_subPixelInterpolationOffsetBits(this.segment(), index, value); return this; } + /// Sets `subPixelInterpolationOffsetBits` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits subPixelInterpolationOffsetBits(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_subPixelInterpolationOffsetBits(this.segment(), value); return this; } + + /// {@return `maxFramebufferWidth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFramebufferWidth(MemorySegment segment, long index) { return (int) VH_maxFramebufferWidth.get(segment, 0L, index); } + /// {@return `maxFramebufferWidth`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFramebufferWidth(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxFramebufferWidth(segment, 0L); } + /// {@return `maxFramebufferWidth` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFramebufferWidthAt(long index) { return VkPhysicalDeviceLimits.get_maxFramebufferWidth(this.segment(), index); } + /// {@return `maxFramebufferWidth`} + public @CType("uint32_t") int maxFramebufferWidth() { return VkPhysicalDeviceLimits.get_maxFramebufferWidth(this.segment()); } + /// Sets `maxFramebufferWidth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFramebufferWidth(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFramebufferWidth.set(segment, 0L, index, value); } + /// Sets `maxFramebufferWidth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFramebufferWidth(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFramebufferWidth(segment, 0L, value); } + /// Sets `maxFramebufferWidth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFramebufferWidthAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFramebufferWidth(this.segment(), index, value); return this; } + /// Sets `maxFramebufferWidth` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFramebufferWidth(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFramebufferWidth(this.segment(), value); return this; } + + /// {@return `maxFramebufferHeight` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFramebufferHeight(MemorySegment segment, long index) { return (int) VH_maxFramebufferHeight.get(segment, 0L, index); } + /// {@return `maxFramebufferHeight`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFramebufferHeight(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxFramebufferHeight(segment, 0L); } + /// {@return `maxFramebufferHeight` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFramebufferHeightAt(long index) { return VkPhysicalDeviceLimits.get_maxFramebufferHeight(this.segment(), index); } + /// {@return `maxFramebufferHeight`} + public @CType("uint32_t") int maxFramebufferHeight() { return VkPhysicalDeviceLimits.get_maxFramebufferHeight(this.segment()); } + /// Sets `maxFramebufferHeight` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFramebufferHeight(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFramebufferHeight.set(segment, 0L, index, value); } + /// Sets `maxFramebufferHeight` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFramebufferHeight(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFramebufferHeight(segment, 0L, value); } + /// Sets `maxFramebufferHeight` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFramebufferHeightAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFramebufferHeight(this.segment(), index, value); return this; } + /// Sets `maxFramebufferHeight` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFramebufferHeight(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFramebufferHeight(this.segment(), value); return this; } + + /// {@return `maxFramebufferLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFramebufferLayers(MemorySegment segment, long index) { return (int) VH_maxFramebufferLayers.get(segment, 0L, index); } + /// {@return `maxFramebufferLayers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFramebufferLayers(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxFramebufferLayers(segment, 0L); } + /// {@return `maxFramebufferLayers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFramebufferLayersAt(long index) { return VkPhysicalDeviceLimits.get_maxFramebufferLayers(this.segment(), index); } + /// {@return `maxFramebufferLayers`} + public @CType("uint32_t") int maxFramebufferLayers() { return VkPhysicalDeviceLimits.get_maxFramebufferLayers(this.segment()); } + /// Sets `maxFramebufferLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFramebufferLayers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFramebufferLayers.set(segment, 0L, index, value); } + /// Sets `maxFramebufferLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFramebufferLayers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFramebufferLayers(segment, 0L, value); } + /// Sets `maxFramebufferLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFramebufferLayersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFramebufferLayers(this.segment(), index, value); return this; } + /// Sets `maxFramebufferLayers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxFramebufferLayers(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxFramebufferLayers(this.segment(), value); return this; } + + /// {@return `framebufferColorSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_framebufferColorSampleCounts(MemorySegment segment, long index) { return (int) VH_framebufferColorSampleCounts.get(segment, 0L, index); } + /// {@return `framebufferColorSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_framebufferColorSampleCounts(MemorySegment segment) { return VkPhysicalDeviceLimits.get_framebufferColorSampleCounts(segment, 0L); } + /// {@return `framebufferColorSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int framebufferColorSampleCountsAt(long index) { return VkPhysicalDeviceLimits.get_framebufferColorSampleCounts(this.segment(), index); } + /// {@return `framebufferColorSampleCounts`} + public @CType("VkSampleCountFlags") int framebufferColorSampleCounts() { return VkPhysicalDeviceLimits.get_framebufferColorSampleCounts(this.segment()); } + /// Sets `framebufferColorSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_framebufferColorSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_framebufferColorSampleCounts.set(segment, 0L, index, value); } + /// Sets `framebufferColorSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_framebufferColorSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferColorSampleCounts(segment, 0L, value); } + /// Sets `framebufferColorSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits framebufferColorSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferColorSampleCounts(this.segment(), index, value); return this; } + /// Sets `framebufferColorSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits framebufferColorSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferColorSampleCounts(this.segment(), value); return this; } + + /// {@return `framebufferDepthSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_framebufferDepthSampleCounts(MemorySegment segment, long index) { return (int) VH_framebufferDepthSampleCounts.get(segment, 0L, index); } + /// {@return `framebufferDepthSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_framebufferDepthSampleCounts(MemorySegment segment) { return VkPhysicalDeviceLimits.get_framebufferDepthSampleCounts(segment, 0L); } + /// {@return `framebufferDepthSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int framebufferDepthSampleCountsAt(long index) { return VkPhysicalDeviceLimits.get_framebufferDepthSampleCounts(this.segment(), index); } + /// {@return `framebufferDepthSampleCounts`} + public @CType("VkSampleCountFlags") int framebufferDepthSampleCounts() { return VkPhysicalDeviceLimits.get_framebufferDepthSampleCounts(this.segment()); } + /// Sets `framebufferDepthSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_framebufferDepthSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_framebufferDepthSampleCounts.set(segment, 0L, index, value); } + /// Sets `framebufferDepthSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_framebufferDepthSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferDepthSampleCounts(segment, 0L, value); } + /// Sets `framebufferDepthSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits framebufferDepthSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferDepthSampleCounts(this.segment(), index, value); return this; } + /// Sets `framebufferDepthSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits framebufferDepthSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferDepthSampleCounts(this.segment(), value); return this; } + + /// {@return `framebufferStencilSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_framebufferStencilSampleCounts(MemorySegment segment, long index) { return (int) VH_framebufferStencilSampleCounts.get(segment, 0L, index); } + /// {@return `framebufferStencilSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_framebufferStencilSampleCounts(MemorySegment segment) { return VkPhysicalDeviceLimits.get_framebufferStencilSampleCounts(segment, 0L); } + /// {@return `framebufferStencilSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int framebufferStencilSampleCountsAt(long index) { return VkPhysicalDeviceLimits.get_framebufferStencilSampleCounts(this.segment(), index); } + /// {@return `framebufferStencilSampleCounts`} + public @CType("VkSampleCountFlags") int framebufferStencilSampleCounts() { return VkPhysicalDeviceLimits.get_framebufferStencilSampleCounts(this.segment()); } + /// Sets `framebufferStencilSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_framebufferStencilSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_framebufferStencilSampleCounts.set(segment, 0L, index, value); } + /// Sets `framebufferStencilSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_framebufferStencilSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferStencilSampleCounts(segment, 0L, value); } + /// Sets `framebufferStencilSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits framebufferStencilSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferStencilSampleCounts(this.segment(), index, value); return this; } + /// Sets `framebufferStencilSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits framebufferStencilSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferStencilSampleCounts(this.segment(), value); return this; } + + /// {@return `framebufferNoAttachmentsSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_framebufferNoAttachmentsSampleCounts(MemorySegment segment, long index) { return (int) VH_framebufferNoAttachmentsSampleCounts.get(segment, 0L, index); } + /// {@return `framebufferNoAttachmentsSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_framebufferNoAttachmentsSampleCounts(MemorySegment segment) { return VkPhysicalDeviceLimits.get_framebufferNoAttachmentsSampleCounts(segment, 0L); } + /// {@return `framebufferNoAttachmentsSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int framebufferNoAttachmentsSampleCountsAt(long index) { return VkPhysicalDeviceLimits.get_framebufferNoAttachmentsSampleCounts(this.segment(), index); } + /// {@return `framebufferNoAttachmentsSampleCounts`} + public @CType("VkSampleCountFlags") int framebufferNoAttachmentsSampleCounts() { return VkPhysicalDeviceLimits.get_framebufferNoAttachmentsSampleCounts(this.segment()); } + /// Sets `framebufferNoAttachmentsSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_framebufferNoAttachmentsSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_framebufferNoAttachmentsSampleCounts.set(segment, 0L, index, value); } + /// Sets `framebufferNoAttachmentsSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_framebufferNoAttachmentsSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferNoAttachmentsSampleCounts(segment, 0L, value); } + /// Sets `framebufferNoAttachmentsSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits framebufferNoAttachmentsSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferNoAttachmentsSampleCounts(this.segment(), index, value); return this; } + /// Sets `framebufferNoAttachmentsSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits framebufferNoAttachmentsSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_framebufferNoAttachmentsSampleCounts(this.segment(), value); return this; } + + /// {@return `maxColorAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxColorAttachments(MemorySegment segment, long index) { return (int) VH_maxColorAttachments.get(segment, 0L, index); } + /// {@return `maxColorAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxColorAttachments(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxColorAttachments(segment, 0L); } + /// {@return `maxColorAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxColorAttachmentsAt(long index) { return VkPhysicalDeviceLimits.get_maxColorAttachments(this.segment(), index); } + /// {@return `maxColorAttachments`} + public @CType("uint32_t") int maxColorAttachments() { return VkPhysicalDeviceLimits.get_maxColorAttachments(this.segment()); } + /// Sets `maxColorAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxColorAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxColorAttachments.set(segment, 0L, index, value); } + /// Sets `maxColorAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxColorAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxColorAttachments(segment, 0L, value); } + /// Sets `maxColorAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxColorAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxColorAttachments(this.segment(), index, value); return this; } + /// Sets `maxColorAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxColorAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxColorAttachments(this.segment(), value); return this; } + + /// {@return `sampledImageColorSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_sampledImageColorSampleCounts(MemorySegment segment, long index) { return (int) VH_sampledImageColorSampleCounts.get(segment, 0L, index); } + /// {@return `sampledImageColorSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_sampledImageColorSampleCounts(MemorySegment segment) { return VkPhysicalDeviceLimits.get_sampledImageColorSampleCounts(segment, 0L); } + /// {@return `sampledImageColorSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int sampledImageColorSampleCountsAt(long index) { return VkPhysicalDeviceLimits.get_sampledImageColorSampleCounts(this.segment(), index); } + /// {@return `sampledImageColorSampleCounts`} + public @CType("VkSampleCountFlags") int sampledImageColorSampleCounts() { return VkPhysicalDeviceLimits.get_sampledImageColorSampleCounts(this.segment()); } + /// Sets `sampledImageColorSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampledImageColorSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_sampledImageColorSampleCounts.set(segment, 0L, index, value); } + /// Sets `sampledImageColorSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampledImageColorSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageColorSampleCounts(segment, 0L, value); } + /// Sets `sampledImageColorSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits sampledImageColorSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageColorSampleCounts(this.segment(), index, value); return this; } + /// Sets `sampledImageColorSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits sampledImageColorSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageColorSampleCounts(this.segment(), value); return this; } + + /// {@return `sampledImageIntegerSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_sampledImageIntegerSampleCounts(MemorySegment segment, long index) { return (int) VH_sampledImageIntegerSampleCounts.get(segment, 0L, index); } + /// {@return `sampledImageIntegerSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_sampledImageIntegerSampleCounts(MemorySegment segment) { return VkPhysicalDeviceLimits.get_sampledImageIntegerSampleCounts(segment, 0L); } + /// {@return `sampledImageIntegerSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int sampledImageIntegerSampleCountsAt(long index) { return VkPhysicalDeviceLimits.get_sampledImageIntegerSampleCounts(this.segment(), index); } + /// {@return `sampledImageIntegerSampleCounts`} + public @CType("VkSampleCountFlags") int sampledImageIntegerSampleCounts() { return VkPhysicalDeviceLimits.get_sampledImageIntegerSampleCounts(this.segment()); } + /// Sets `sampledImageIntegerSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampledImageIntegerSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_sampledImageIntegerSampleCounts.set(segment, 0L, index, value); } + /// Sets `sampledImageIntegerSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampledImageIntegerSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageIntegerSampleCounts(segment, 0L, value); } + /// Sets `sampledImageIntegerSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits sampledImageIntegerSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageIntegerSampleCounts(this.segment(), index, value); return this; } + /// Sets `sampledImageIntegerSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits sampledImageIntegerSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageIntegerSampleCounts(this.segment(), value); return this; } + + /// {@return `sampledImageDepthSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_sampledImageDepthSampleCounts(MemorySegment segment, long index) { return (int) VH_sampledImageDepthSampleCounts.get(segment, 0L, index); } + /// {@return `sampledImageDepthSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_sampledImageDepthSampleCounts(MemorySegment segment) { return VkPhysicalDeviceLimits.get_sampledImageDepthSampleCounts(segment, 0L); } + /// {@return `sampledImageDepthSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int sampledImageDepthSampleCountsAt(long index) { return VkPhysicalDeviceLimits.get_sampledImageDepthSampleCounts(this.segment(), index); } + /// {@return `sampledImageDepthSampleCounts`} + public @CType("VkSampleCountFlags") int sampledImageDepthSampleCounts() { return VkPhysicalDeviceLimits.get_sampledImageDepthSampleCounts(this.segment()); } + /// Sets `sampledImageDepthSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampledImageDepthSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_sampledImageDepthSampleCounts.set(segment, 0L, index, value); } + /// Sets `sampledImageDepthSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampledImageDepthSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageDepthSampleCounts(segment, 0L, value); } + /// Sets `sampledImageDepthSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits sampledImageDepthSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageDepthSampleCounts(this.segment(), index, value); return this; } + /// Sets `sampledImageDepthSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits sampledImageDepthSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageDepthSampleCounts(this.segment(), value); return this; } + + /// {@return `sampledImageStencilSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_sampledImageStencilSampleCounts(MemorySegment segment, long index) { return (int) VH_sampledImageStencilSampleCounts.get(segment, 0L, index); } + /// {@return `sampledImageStencilSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_sampledImageStencilSampleCounts(MemorySegment segment) { return VkPhysicalDeviceLimits.get_sampledImageStencilSampleCounts(segment, 0L); } + /// {@return `sampledImageStencilSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int sampledImageStencilSampleCountsAt(long index) { return VkPhysicalDeviceLimits.get_sampledImageStencilSampleCounts(this.segment(), index); } + /// {@return `sampledImageStencilSampleCounts`} + public @CType("VkSampleCountFlags") int sampledImageStencilSampleCounts() { return VkPhysicalDeviceLimits.get_sampledImageStencilSampleCounts(this.segment()); } + /// Sets `sampledImageStencilSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampledImageStencilSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_sampledImageStencilSampleCounts.set(segment, 0L, index, value); } + /// Sets `sampledImageStencilSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampledImageStencilSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageStencilSampleCounts(segment, 0L, value); } + /// Sets `sampledImageStencilSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits sampledImageStencilSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageStencilSampleCounts(this.segment(), index, value); return this; } + /// Sets `sampledImageStencilSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits sampledImageStencilSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_sampledImageStencilSampleCounts(this.segment(), value); return this; } + + /// {@return `storageImageSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_storageImageSampleCounts(MemorySegment segment, long index) { return (int) VH_storageImageSampleCounts.get(segment, 0L, index); } + /// {@return `storageImageSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_storageImageSampleCounts(MemorySegment segment) { return VkPhysicalDeviceLimits.get_storageImageSampleCounts(segment, 0L); } + /// {@return `storageImageSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int storageImageSampleCountsAt(long index) { return VkPhysicalDeviceLimits.get_storageImageSampleCounts(this.segment(), index); } + /// {@return `storageImageSampleCounts`} + public @CType("VkSampleCountFlags") int storageImageSampleCounts() { return VkPhysicalDeviceLimits.get_storageImageSampleCounts(this.segment()); } + /// Sets `storageImageSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageImageSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_storageImageSampleCounts.set(segment, 0L, index, value); } + /// Sets `storageImageSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageImageSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_storageImageSampleCounts(segment, 0L, value); } + /// Sets `storageImageSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits storageImageSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_storageImageSampleCounts(this.segment(), index, value); return this; } + /// Sets `storageImageSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits storageImageSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceLimits.set_storageImageSampleCounts(this.segment(), value); return this; } + + /// {@return `maxSampleMaskWords` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSampleMaskWords(MemorySegment segment, long index) { return (int) VH_maxSampleMaskWords.get(segment, 0L, index); } + /// {@return `maxSampleMaskWords`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSampleMaskWords(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxSampleMaskWords(segment, 0L); } + /// {@return `maxSampleMaskWords` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSampleMaskWordsAt(long index) { return VkPhysicalDeviceLimits.get_maxSampleMaskWords(this.segment(), index); } + /// {@return `maxSampleMaskWords`} + public @CType("uint32_t") int maxSampleMaskWords() { return VkPhysicalDeviceLimits.get_maxSampleMaskWords(this.segment()); } + /// Sets `maxSampleMaskWords` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSampleMaskWords(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSampleMaskWords.set(segment, 0L, index, value); } + /// Sets `maxSampleMaskWords` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSampleMaskWords(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxSampleMaskWords(segment, 0L, value); } + /// Sets `maxSampleMaskWords` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxSampleMaskWordsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxSampleMaskWords(this.segment(), index, value); return this; } + /// Sets `maxSampleMaskWords` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxSampleMaskWords(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxSampleMaskWords(this.segment(), value); return this; } + + /// {@return `timestampComputeAndGraphics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_timestampComputeAndGraphics(MemorySegment segment, long index) { return (int) VH_timestampComputeAndGraphics.get(segment, 0L, index); } + /// {@return `timestampComputeAndGraphics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_timestampComputeAndGraphics(MemorySegment segment) { return VkPhysicalDeviceLimits.get_timestampComputeAndGraphics(segment, 0L); } + /// {@return `timestampComputeAndGraphics` at the given index} + /// @param index the index + public @CType("VkBool32") int timestampComputeAndGraphicsAt(long index) { return VkPhysicalDeviceLimits.get_timestampComputeAndGraphics(this.segment(), index); } + /// {@return `timestampComputeAndGraphics`} + public @CType("VkBool32") int timestampComputeAndGraphics() { return VkPhysicalDeviceLimits.get_timestampComputeAndGraphics(this.segment()); } + /// Sets `timestampComputeAndGraphics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timestampComputeAndGraphics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_timestampComputeAndGraphics.set(segment, 0L, index, value); } + /// Sets `timestampComputeAndGraphics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timestampComputeAndGraphics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLimits.set_timestampComputeAndGraphics(segment, 0L, value); } + /// Sets `timestampComputeAndGraphics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits timestampComputeAndGraphicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLimits.set_timestampComputeAndGraphics(this.segment(), index, value); return this; } + /// Sets `timestampComputeAndGraphics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits timestampComputeAndGraphics(@CType("VkBool32") int value) { VkPhysicalDeviceLimits.set_timestampComputeAndGraphics(this.segment(), value); return this; } + + /// {@return `timestampPeriod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_timestampPeriod(MemorySegment segment, long index) { return (float) VH_timestampPeriod.get(segment, 0L, index); } + /// {@return `timestampPeriod`} + /// @param segment the segment of the struct + public static @CType("float") float get_timestampPeriod(MemorySegment segment) { return VkPhysicalDeviceLimits.get_timestampPeriod(segment, 0L); } + /// {@return `timestampPeriod` at the given index} + /// @param index the index + public @CType("float") float timestampPeriodAt(long index) { return VkPhysicalDeviceLimits.get_timestampPeriod(this.segment(), index); } + /// {@return `timestampPeriod`} + public @CType("float") float timestampPeriod() { return VkPhysicalDeviceLimits.get_timestampPeriod(this.segment()); } + /// Sets `timestampPeriod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timestampPeriod(MemorySegment segment, long index, @CType("float") float value) { VH_timestampPeriod.set(segment, 0L, index, value); } + /// Sets `timestampPeriod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timestampPeriod(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceLimits.set_timestampPeriod(segment, 0L, value); } + /// Sets `timestampPeriod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits timestampPeriodAt(long index, @CType("float") float value) { VkPhysicalDeviceLimits.set_timestampPeriod(this.segment(), index, value); return this; } + /// Sets `timestampPeriod` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits timestampPeriod(@CType("float") float value) { VkPhysicalDeviceLimits.set_timestampPeriod(this.segment(), value); return this; } + + /// {@return `maxClipDistances` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxClipDistances(MemorySegment segment, long index) { return (int) VH_maxClipDistances.get(segment, 0L, index); } + /// {@return `maxClipDistances`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxClipDistances(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxClipDistances(segment, 0L); } + /// {@return `maxClipDistances` at the given index} + /// @param index the index + public @CType("uint32_t") int maxClipDistancesAt(long index) { return VkPhysicalDeviceLimits.get_maxClipDistances(this.segment(), index); } + /// {@return `maxClipDistances`} + public @CType("uint32_t") int maxClipDistances() { return VkPhysicalDeviceLimits.get_maxClipDistances(this.segment()); } + /// Sets `maxClipDistances` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxClipDistances(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxClipDistances.set(segment, 0L, index, value); } + /// Sets `maxClipDistances` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxClipDistances(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxClipDistances(segment, 0L, value); } + /// Sets `maxClipDistances` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxClipDistancesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxClipDistances(this.segment(), index, value); return this; } + /// Sets `maxClipDistances` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxClipDistances(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxClipDistances(this.segment(), value); return this; } + + /// {@return `maxCullDistances` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxCullDistances(MemorySegment segment, long index) { return (int) VH_maxCullDistances.get(segment, 0L, index); } + /// {@return `maxCullDistances`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxCullDistances(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxCullDistances(segment, 0L); } + /// {@return `maxCullDistances` at the given index} + /// @param index the index + public @CType("uint32_t") int maxCullDistancesAt(long index) { return VkPhysicalDeviceLimits.get_maxCullDistances(this.segment(), index); } + /// {@return `maxCullDistances`} + public @CType("uint32_t") int maxCullDistances() { return VkPhysicalDeviceLimits.get_maxCullDistances(this.segment()); } + /// Sets `maxCullDistances` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCullDistances(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxCullDistances.set(segment, 0L, index, value); } + /// Sets `maxCullDistances` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCullDistances(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxCullDistances(segment, 0L, value); } + /// Sets `maxCullDistances` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxCullDistancesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxCullDistances(this.segment(), index, value); return this; } + /// Sets `maxCullDistances` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxCullDistances(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxCullDistances(this.segment(), value); return this; } + + /// {@return `maxCombinedClipAndCullDistances` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxCombinedClipAndCullDistances(MemorySegment segment, long index) { return (int) VH_maxCombinedClipAndCullDistances.get(segment, 0L, index); } + /// {@return `maxCombinedClipAndCullDistances`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxCombinedClipAndCullDistances(MemorySegment segment) { return VkPhysicalDeviceLimits.get_maxCombinedClipAndCullDistances(segment, 0L); } + /// {@return `maxCombinedClipAndCullDistances` at the given index} + /// @param index the index + public @CType("uint32_t") int maxCombinedClipAndCullDistancesAt(long index) { return VkPhysicalDeviceLimits.get_maxCombinedClipAndCullDistances(this.segment(), index); } + /// {@return `maxCombinedClipAndCullDistances`} + public @CType("uint32_t") int maxCombinedClipAndCullDistances() { return VkPhysicalDeviceLimits.get_maxCombinedClipAndCullDistances(this.segment()); } + /// Sets `maxCombinedClipAndCullDistances` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCombinedClipAndCullDistances(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxCombinedClipAndCullDistances.set(segment, 0L, index, value); } + /// Sets `maxCombinedClipAndCullDistances` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCombinedClipAndCullDistances(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxCombinedClipAndCullDistances(segment, 0L, value); } + /// Sets `maxCombinedClipAndCullDistances` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxCombinedClipAndCullDistancesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxCombinedClipAndCullDistances(this.segment(), index, value); return this; } + /// Sets `maxCombinedClipAndCullDistances` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits maxCombinedClipAndCullDistances(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_maxCombinedClipAndCullDistances(this.segment(), value); return this; } + + /// {@return `discreteQueuePriorities` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_discreteQueuePriorities(MemorySegment segment, long index) { return (int) VH_discreteQueuePriorities.get(segment, 0L, index); } + /// {@return `discreteQueuePriorities`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_discreteQueuePriorities(MemorySegment segment) { return VkPhysicalDeviceLimits.get_discreteQueuePriorities(segment, 0L); } + /// {@return `discreteQueuePriorities` at the given index} + /// @param index the index + public @CType("uint32_t") int discreteQueuePrioritiesAt(long index) { return VkPhysicalDeviceLimits.get_discreteQueuePriorities(this.segment(), index); } + /// {@return `discreteQueuePriorities`} + public @CType("uint32_t") int discreteQueuePriorities() { return VkPhysicalDeviceLimits.get_discreteQueuePriorities(this.segment()); } + /// Sets `discreteQueuePriorities` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_discreteQueuePriorities(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_discreteQueuePriorities.set(segment, 0L, index, value); } + /// Sets `discreteQueuePriorities` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_discreteQueuePriorities(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_discreteQueuePriorities(segment, 0L, value); } + /// Sets `discreteQueuePriorities` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits discreteQueuePrioritiesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_discreteQueuePriorities(this.segment(), index, value); return this; } + /// Sets `discreteQueuePriorities` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits discreteQueuePriorities(@CType("uint32_t") int value) { VkPhysicalDeviceLimits.set_discreteQueuePriorities(this.segment(), value); return this; } + + /// {@return `pointSizeRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("float[2]") java.lang.foreign.MemorySegment get_pointSizeRange(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_pointSizeRange.invokeExact(0L, elementIndex), index), ML_pointSizeRange); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `pointSizeRange`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("float[2]") java.lang.foreign.MemorySegment get_pointSizeRange(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceLimits.get_pointSizeRange(segment, 0L, elementIndex); } + /// {@return `pointSizeRange` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("float[2]") java.lang.foreign.MemorySegment pointSizeRangeAt(long index, long elementIndex) { return VkPhysicalDeviceLimits.get_pointSizeRange(this.segment(), index, elementIndex); } + /// {@return `pointSizeRange`} + /// @param elementIndex the index of the element + public @CType("float[2]") java.lang.foreign.MemorySegment pointSizeRange(long elementIndex) { return VkPhysicalDeviceLimits.get_pointSizeRange(this.segment(), elementIndex); } + /// Sets `pointSizeRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pointSizeRange(MemorySegment segment, long index, long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_pointSizeRange.invokeExact(0L, elementIndex), index), ML_pointSizeRange.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `pointSizeRange` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pointSizeRange(MemorySegment segment, long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_pointSizeRange(segment, 0L, elementIndex, value); } + /// Sets `pointSizeRange` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits pointSizeRangeAt(long index, long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_pointSizeRange(this.segment(), index, elementIndex, value); return this; } + /// Sets `pointSizeRange` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits pointSizeRange(long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_pointSizeRange(this.segment(), elementIndex, value); return this; } + + /// {@return `lineWidthRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("float[2]") java.lang.foreign.MemorySegment get_lineWidthRange(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_lineWidthRange.invokeExact(0L, elementIndex), index), ML_lineWidthRange); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `lineWidthRange`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("float[2]") java.lang.foreign.MemorySegment get_lineWidthRange(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceLimits.get_lineWidthRange(segment, 0L, elementIndex); } + /// {@return `lineWidthRange` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("float[2]") java.lang.foreign.MemorySegment lineWidthRangeAt(long index, long elementIndex) { return VkPhysicalDeviceLimits.get_lineWidthRange(this.segment(), index, elementIndex); } + /// {@return `lineWidthRange`} + /// @param elementIndex the index of the element + public @CType("float[2]") java.lang.foreign.MemorySegment lineWidthRange(long elementIndex) { return VkPhysicalDeviceLimits.get_lineWidthRange(this.segment(), elementIndex); } + /// Sets `lineWidthRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_lineWidthRange(MemorySegment segment, long index, long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_lineWidthRange.invokeExact(0L, elementIndex), index), ML_lineWidthRange.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `lineWidthRange` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_lineWidthRange(MemorySegment segment, long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_lineWidthRange(segment, 0L, elementIndex, value); } + /// Sets `lineWidthRange` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits lineWidthRangeAt(long index, long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_lineWidthRange(this.segment(), index, elementIndex, value); return this; } + /// Sets `lineWidthRange` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits lineWidthRange(long elementIndex, @CType("float[2]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLimits.set_lineWidthRange(this.segment(), elementIndex, value); return this; } + + /// {@return `pointSizeGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_pointSizeGranularity(MemorySegment segment, long index) { return (float) VH_pointSizeGranularity.get(segment, 0L, index); } + /// {@return `pointSizeGranularity`} + /// @param segment the segment of the struct + public static @CType("float") float get_pointSizeGranularity(MemorySegment segment) { return VkPhysicalDeviceLimits.get_pointSizeGranularity(segment, 0L); } + /// {@return `pointSizeGranularity` at the given index} + /// @param index the index + public @CType("float") float pointSizeGranularityAt(long index) { return VkPhysicalDeviceLimits.get_pointSizeGranularity(this.segment(), index); } + /// {@return `pointSizeGranularity`} + public @CType("float") float pointSizeGranularity() { return VkPhysicalDeviceLimits.get_pointSizeGranularity(this.segment()); } + /// Sets `pointSizeGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pointSizeGranularity(MemorySegment segment, long index, @CType("float") float value) { VH_pointSizeGranularity.set(segment, 0L, index, value); } + /// Sets `pointSizeGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pointSizeGranularity(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceLimits.set_pointSizeGranularity(segment, 0L, value); } + /// Sets `pointSizeGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits pointSizeGranularityAt(long index, @CType("float") float value) { VkPhysicalDeviceLimits.set_pointSizeGranularity(this.segment(), index, value); return this; } + /// Sets `pointSizeGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits pointSizeGranularity(@CType("float") float value) { VkPhysicalDeviceLimits.set_pointSizeGranularity(this.segment(), value); return this; } + + /// {@return `lineWidthGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_lineWidthGranularity(MemorySegment segment, long index) { return (float) VH_lineWidthGranularity.get(segment, 0L, index); } + /// {@return `lineWidthGranularity`} + /// @param segment the segment of the struct + public static @CType("float") float get_lineWidthGranularity(MemorySegment segment) { return VkPhysicalDeviceLimits.get_lineWidthGranularity(segment, 0L); } + /// {@return `lineWidthGranularity` at the given index} + /// @param index the index + public @CType("float") float lineWidthGranularityAt(long index) { return VkPhysicalDeviceLimits.get_lineWidthGranularity(this.segment(), index); } + /// {@return `lineWidthGranularity`} + public @CType("float") float lineWidthGranularity() { return VkPhysicalDeviceLimits.get_lineWidthGranularity(this.segment()); } + /// Sets `lineWidthGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lineWidthGranularity(MemorySegment segment, long index, @CType("float") float value) { VH_lineWidthGranularity.set(segment, 0L, index, value); } + /// Sets `lineWidthGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lineWidthGranularity(MemorySegment segment, @CType("float") float value) { VkPhysicalDeviceLimits.set_lineWidthGranularity(segment, 0L, value); } + /// Sets `lineWidthGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits lineWidthGranularityAt(long index, @CType("float") float value) { VkPhysicalDeviceLimits.set_lineWidthGranularity(this.segment(), index, value); return this; } + /// Sets `lineWidthGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits lineWidthGranularity(@CType("float") float value) { VkPhysicalDeviceLimits.set_lineWidthGranularity(this.segment(), value); return this; } + + /// {@return `strictLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_strictLines(MemorySegment segment, long index) { return (int) VH_strictLines.get(segment, 0L, index); } + /// {@return `strictLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_strictLines(MemorySegment segment) { return VkPhysicalDeviceLimits.get_strictLines(segment, 0L); } + /// {@return `strictLines` at the given index} + /// @param index the index + public @CType("VkBool32") int strictLinesAt(long index) { return VkPhysicalDeviceLimits.get_strictLines(this.segment(), index); } + /// {@return `strictLines`} + public @CType("VkBool32") int strictLines() { return VkPhysicalDeviceLimits.get_strictLines(this.segment()); } + /// Sets `strictLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_strictLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_strictLines.set(segment, 0L, index, value); } + /// Sets `strictLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_strictLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLimits.set_strictLines(segment, 0L, value); } + /// Sets `strictLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits strictLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLimits.set_strictLines(this.segment(), index, value); return this; } + /// Sets `strictLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits strictLines(@CType("VkBool32") int value) { VkPhysicalDeviceLimits.set_strictLines(this.segment(), value); return this; } + + /// {@return `standardSampleLocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_standardSampleLocations(MemorySegment segment, long index) { return (int) VH_standardSampleLocations.get(segment, 0L, index); } + /// {@return `standardSampleLocations`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_standardSampleLocations(MemorySegment segment) { return VkPhysicalDeviceLimits.get_standardSampleLocations(segment, 0L); } + /// {@return `standardSampleLocations` at the given index} + /// @param index the index + public @CType("VkBool32") int standardSampleLocationsAt(long index) { return VkPhysicalDeviceLimits.get_standardSampleLocations(this.segment(), index); } + /// {@return `standardSampleLocations`} + public @CType("VkBool32") int standardSampleLocations() { return VkPhysicalDeviceLimits.get_standardSampleLocations(this.segment()); } + /// Sets `standardSampleLocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_standardSampleLocations(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_standardSampleLocations.set(segment, 0L, index, value); } + /// Sets `standardSampleLocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_standardSampleLocations(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLimits.set_standardSampleLocations(segment, 0L, value); } + /// Sets `standardSampleLocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits standardSampleLocationsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLimits.set_standardSampleLocations(this.segment(), index, value); return this; } + /// Sets `standardSampleLocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits standardSampleLocations(@CType("VkBool32") int value) { VkPhysicalDeviceLimits.set_standardSampleLocations(this.segment(), value); return this; } + + /// {@return `optimalBufferCopyOffsetAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_optimalBufferCopyOffsetAlignment(MemorySegment segment, long index) { return (long) VH_optimalBufferCopyOffsetAlignment.get(segment, 0L, index); } + /// {@return `optimalBufferCopyOffsetAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_optimalBufferCopyOffsetAlignment(MemorySegment segment) { return VkPhysicalDeviceLimits.get_optimalBufferCopyOffsetAlignment(segment, 0L); } + /// {@return `optimalBufferCopyOffsetAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long optimalBufferCopyOffsetAlignmentAt(long index) { return VkPhysicalDeviceLimits.get_optimalBufferCopyOffsetAlignment(this.segment(), index); } + /// {@return `optimalBufferCopyOffsetAlignment`} + public @CType("VkDeviceSize") long optimalBufferCopyOffsetAlignment() { return VkPhysicalDeviceLimits.get_optimalBufferCopyOffsetAlignment(this.segment()); } + /// Sets `optimalBufferCopyOffsetAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_optimalBufferCopyOffsetAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_optimalBufferCopyOffsetAlignment.set(segment, 0L, index, value); } + /// Sets `optimalBufferCopyOffsetAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_optimalBufferCopyOffsetAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_optimalBufferCopyOffsetAlignment(segment, 0L, value); } + /// Sets `optimalBufferCopyOffsetAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits optimalBufferCopyOffsetAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_optimalBufferCopyOffsetAlignment(this.segment(), index, value); return this; } + /// Sets `optimalBufferCopyOffsetAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits optimalBufferCopyOffsetAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_optimalBufferCopyOffsetAlignment(this.segment(), value); return this; } + + /// {@return `optimalBufferCopyRowPitchAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_optimalBufferCopyRowPitchAlignment(MemorySegment segment, long index) { return (long) VH_optimalBufferCopyRowPitchAlignment.get(segment, 0L, index); } + /// {@return `optimalBufferCopyRowPitchAlignment`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_optimalBufferCopyRowPitchAlignment(MemorySegment segment) { return VkPhysicalDeviceLimits.get_optimalBufferCopyRowPitchAlignment(segment, 0L); } + /// {@return `optimalBufferCopyRowPitchAlignment` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long optimalBufferCopyRowPitchAlignmentAt(long index) { return VkPhysicalDeviceLimits.get_optimalBufferCopyRowPitchAlignment(this.segment(), index); } + /// {@return `optimalBufferCopyRowPitchAlignment`} + public @CType("VkDeviceSize") long optimalBufferCopyRowPitchAlignment() { return VkPhysicalDeviceLimits.get_optimalBufferCopyRowPitchAlignment(this.segment()); } + /// Sets `optimalBufferCopyRowPitchAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_optimalBufferCopyRowPitchAlignment(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_optimalBufferCopyRowPitchAlignment.set(segment, 0L, index, value); } + /// Sets `optimalBufferCopyRowPitchAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_optimalBufferCopyRowPitchAlignment(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_optimalBufferCopyRowPitchAlignment(segment, 0L, value); } + /// Sets `optimalBufferCopyRowPitchAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits optimalBufferCopyRowPitchAlignmentAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_optimalBufferCopyRowPitchAlignment(this.segment(), index, value); return this; } + /// Sets `optimalBufferCopyRowPitchAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits optimalBufferCopyRowPitchAlignment(@CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_optimalBufferCopyRowPitchAlignment(this.segment(), value); return this; } + + /// {@return `nonCoherentAtomSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_nonCoherentAtomSize(MemorySegment segment, long index) { return (long) VH_nonCoherentAtomSize.get(segment, 0L, index); } + /// {@return `nonCoherentAtomSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_nonCoherentAtomSize(MemorySegment segment) { return VkPhysicalDeviceLimits.get_nonCoherentAtomSize(segment, 0L); } + /// {@return `nonCoherentAtomSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long nonCoherentAtomSizeAt(long index) { return VkPhysicalDeviceLimits.get_nonCoherentAtomSize(this.segment(), index); } + /// {@return `nonCoherentAtomSize`} + public @CType("VkDeviceSize") long nonCoherentAtomSize() { return VkPhysicalDeviceLimits.get_nonCoherentAtomSize(this.segment()); } + /// Sets `nonCoherentAtomSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nonCoherentAtomSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_nonCoherentAtomSize.set(segment, 0L, index, value); } + /// Sets `nonCoherentAtomSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nonCoherentAtomSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_nonCoherentAtomSize(segment, 0L, value); } + /// Sets `nonCoherentAtomSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits nonCoherentAtomSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_nonCoherentAtomSize(this.segment(), index, value); return this; } + /// Sets `nonCoherentAtomSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLimits nonCoherentAtomSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceLimits.set_nonCoherentAtomSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceLineRasterizationFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceLineRasterizationFeatures.java new file mode 100644 index 00000000..2285ebb2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceLineRasterizationFeatures.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### rectangularLines +/// [VarHandle][#VH_rectangularLines] - [Getter][#rectangularLines()] - [Setter][#rectangularLines(int)] +/// ### bresenhamLines +/// [VarHandle][#VH_bresenhamLines] - [Getter][#bresenhamLines()] - [Setter][#bresenhamLines(int)] +/// ### smoothLines +/// [VarHandle][#VH_smoothLines] - [Getter][#smoothLines()] - [Setter][#smoothLines(int)] +/// ### stippledRectangularLines +/// [VarHandle][#VH_stippledRectangularLines] - [Getter][#stippledRectangularLines()] - [Setter][#stippledRectangularLines(int)] +/// ### stippledBresenhamLines +/// [VarHandle][#VH_stippledBresenhamLines] - [Getter][#stippledBresenhamLines()] - [Setter][#stippledBresenhamLines(int)] +/// ### stippledSmoothLines +/// [VarHandle][#VH_stippledSmoothLines] - [Getter][#stippledSmoothLines()] - [Setter][#stippledSmoothLines(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLineRasterizationFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 rectangularLines; +/// VkBool32 bresenhamLines; +/// VkBool32 smoothLines; +/// VkBool32 stippledRectangularLines; +/// VkBool32 stippledBresenhamLines; +/// VkBool32 stippledSmoothLines; +/// } VkPhysicalDeviceLineRasterizationFeatures; +/// ``` +public final class VkPhysicalDeviceLineRasterizationFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceLineRasterizationFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("rectangularLines"), + ValueLayout.JAVA_INT.withName("bresenhamLines"), + ValueLayout.JAVA_INT.withName("smoothLines"), + ValueLayout.JAVA_INT.withName("stippledRectangularLines"), + ValueLayout.JAVA_INT.withName("stippledBresenhamLines"), + ValueLayout.JAVA_INT.withName("stippledSmoothLines") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `rectangularLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rectangularLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rectangularLines")); + /// The [VarHandle] of `bresenhamLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bresenhamLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bresenhamLines")); + /// The [VarHandle] of `smoothLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_smoothLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("smoothLines")); + /// The [VarHandle] of `stippledRectangularLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stippledRectangularLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stippledRectangularLines")); + /// The [VarHandle] of `stippledBresenhamLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stippledBresenhamLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stippledBresenhamLines")); + /// The [VarHandle] of `stippledSmoothLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stippledSmoothLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stippledSmoothLines")); + + /// Creates `VkPhysicalDeviceLineRasterizationFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLineRasterizationFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLineRasterizationFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLineRasterizationFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLineRasterizationFeatures(segment); } + + /// Creates `VkPhysicalDeviceLineRasterizationFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLineRasterizationFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLineRasterizationFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLineRasterizationFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLineRasterizationFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLineRasterizationFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLineRasterizationFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLineRasterizationFeatures` + public static VkPhysicalDeviceLineRasterizationFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLineRasterizationFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLineRasterizationFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLineRasterizationFeatures` + public static VkPhysicalDeviceLineRasterizationFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLineRasterizationFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceLineRasterizationFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceLineRasterizationFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceLineRasterizationFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceLineRasterizationFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLineRasterizationFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLineRasterizationFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLineRasterizationFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `rectangularLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rectangularLines(MemorySegment segment, long index) { return (int) VH_rectangularLines.get(segment, 0L, index); } + /// {@return `rectangularLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rectangularLines(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationFeatures.get_rectangularLines(segment, 0L); } + /// {@return `rectangularLines` at the given index} + /// @param index the index + public @CType("VkBool32") int rectangularLinesAt(long index) { return VkPhysicalDeviceLineRasterizationFeatures.get_rectangularLines(this.segment(), index); } + /// {@return `rectangularLines`} + public @CType("VkBool32") int rectangularLines() { return VkPhysicalDeviceLineRasterizationFeatures.get_rectangularLines(this.segment()); } + /// Sets `rectangularLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rectangularLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rectangularLines.set(segment, 0L, index, value); } + /// Sets `rectangularLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rectangularLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_rectangularLines(segment, 0L, value); } + /// Sets `rectangularLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures rectangularLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_rectangularLines(this.segment(), index, value); return this; } + /// Sets `rectangularLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures rectangularLines(@CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_rectangularLines(this.segment(), value); return this; } + + /// {@return `bresenhamLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bresenhamLines(MemorySegment segment, long index) { return (int) VH_bresenhamLines.get(segment, 0L, index); } + /// {@return `bresenhamLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bresenhamLines(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationFeatures.get_bresenhamLines(segment, 0L); } + /// {@return `bresenhamLines` at the given index} + /// @param index the index + public @CType("VkBool32") int bresenhamLinesAt(long index) { return VkPhysicalDeviceLineRasterizationFeatures.get_bresenhamLines(this.segment(), index); } + /// {@return `bresenhamLines`} + public @CType("VkBool32") int bresenhamLines() { return VkPhysicalDeviceLineRasterizationFeatures.get_bresenhamLines(this.segment()); } + /// Sets `bresenhamLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bresenhamLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bresenhamLines.set(segment, 0L, index, value); } + /// Sets `bresenhamLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bresenhamLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_bresenhamLines(segment, 0L, value); } + /// Sets `bresenhamLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures bresenhamLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_bresenhamLines(this.segment(), index, value); return this; } + /// Sets `bresenhamLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures bresenhamLines(@CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_bresenhamLines(this.segment(), value); return this; } + + /// {@return `smoothLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_smoothLines(MemorySegment segment, long index) { return (int) VH_smoothLines.get(segment, 0L, index); } + /// {@return `smoothLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_smoothLines(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationFeatures.get_smoothLines(segment, 0L); } + /// {@return `smoothLines` at the given index} + /// @param index the index + public @CType("VkBool32") int smoothLinesAt(long index) { return VkPhysicalDeviceLineRasterizationFeatures.get_smoothLines(this.segment(), index); } + /// {@return `smoothLines`} + public @CType("VkBool32") int smoothLines() { return VkPhysicalDeviceLineRasterizationFeatures.get_smoothLines(this.segment()); } + /// Sets `smoothLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_smoothLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_smoothLines.set(segment, 0L, index, value); } + /// Sets `smoothLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_smoothLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_smoothLines(segment, 0L, value); } + /// Sets `smoothLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures smoothLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_smoothLines(this.segment(), index, value); return this; } + /// Sets `smoothLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures smoothLines(@CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_smoothLines(this.segment(), value); return this; } + + /// {@return `stippledRectangularLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_stippledRectangularLines(MemorySegment segment, long index) { return (int) VH_stippledRectangularLines.get(segment, 0L, index); } + /// {@return `stippledRectangularLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_stippledRectangularLines(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationFeatures.get_stippledRectangularLines(segment, 0L); } + /// {@return `stippledRectangularLines` at the given index} + /// @param index the index + public @CType("VkBool32") int stippledRectangularLinesAt(long index) { return VkPhysicalDeviceLineRasterizationFeatures.get_stippledRectangularLines(this.segment(), index); } + /// {@return `stippledRectangularLines`} + public @CType("VkBool32") int stippledRectangularLines() { return VkPhysicalDeviceLineRasterizationFeatures.get_stippledRectangularLines(this.segment()); } + /// Sets `stippledRectangularLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stippledRectangularLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_stippledRectangularLines.set(segment, 0L, index, value); } + /// Sets `stippledRectangularLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stippledRectangularLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_stippledRectangularLines(segment, 0L, value); } + /// Sets `stippledRectangularLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures stippledRectangularLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_stippledRectangularLines(this.segment(), index, value); return this; } + /// Sets `stippledRectangularLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures stippledRectangularLines(@CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_stippledRectangularLines(this.segment(), value); return this; } + + /// {@return `stippledBresenhamLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_stippledBresenhamLines(MemorySegment segment, long index) { return (int) VH_stippledBresenhamLines.get(segment, 0L, index); } + /// {@return `stippledBresenhamLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_stippledBresenhamLines(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationFeatures.get_stippledBresenhamLines(segment, 0L); } + /// {@return `stippledBresenhamLines` at the given index} + /// @param index the index + public @CType("VkBool32") int stippledBresenhamLinesAt(long index) { return VkPhysicalDeviceLineRasterizationFeatures.get_stippledBresenhamLines(this.segment(), index); } + /// {@return `stippledBresenhamLines`} + public @CType("VkBool32") int stippledBresenhamLines() { return VkPhysicalDeviceLineRasterizationFeatures.get_stippledBresenhamLines(this.segment()); } + /// Sets `stippledBresenhamLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stippledBresenhamLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_stippledBresenhamLines.set(segment, 0L, index, value); } + /// Sets `stippledBresenhamLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stippledBresenhamLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_stippledBresenhamLines(segment, 0L, value); } + /// Sets `stippledBresenhamLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures stippledBresenhamLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_stippledBresenhamLines(this.segment(), index, value); return this; } + /// Sets `stippledBresenhamLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures stippledBresenhamLines(@CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_stippledBresenhamLines(this.segment(), value); return this; } + + /// {@return `stippledSmoothLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_stippledSmoothLines(MemorySegment segment, long index) { return (int) VH_stippledSmoothLines.get(segment, 0L, index); } + /// {@return `stippledSmoothLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_stippledSmoothLines(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationFeatures.get_stippledSmoothLines(segment, 0L); } + /// {@return `stippledSmoothLines` at the given index} + /// @param index the index + public @CType("VkBool32") int stippledSmoothLinesAt(long index) { return VkPhysicalDeviceLineRasterizationFeatures.get_stippledSmoothLines(this.segment(), index); } + /// {@return `stippledSmoothLines`} + public @CType("VkBool32") int stippledSmoothLines() { return VkPhysicalDeviceLineRasterizationFeatures.get_stippledSmoothLines(this.segment()); } + /// Sets `stippledSmoothLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stippledSmoothLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_stippledSmoothLines.set(segment, 0L, index, value); } + /// Sets `stippledSmoothLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stippledSmoothLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_stippledSmoothLines(segment, 0L, value); } + /// Sets `stippledSmoothLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures stippledSmoothLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_stippledSmoothLines(this.segment(), index, value); return this; } + /// Sets `stippledSmoothLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationFeatures stippledSmoothLines(@CType("VkBool32") int value) { VkPhysicalDeviceLineRasterizationFeatures.set_stippledSmoothLines(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceLineRasterizationProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceLineRasterizationProperties.java new file mode 100644 index 00000000..254aa47c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceLineRasterizationProperties.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### lineSubPixelPrecisionBits +/// [VarHandle][#VH_lineSubPixelPrecisionBits] - [Getter][#lineSubPixelPrecisionBits()] - [Setter][#lineSubPixelPrecisionBits(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceLineRasterizationProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t lineSubPixelPrecisionBits; +/// } VkPhysicalDeviceLineRasterizationProperties; +/// ``` +public final class VkPhysicalDeviceLineRasterizationProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceLineRasterizationProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("lineSubPixelPrecisionBits") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `lineSubPixelPrecisionBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_lineSubPixelPrecisionBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lineSubPixelPrecisionBits")); + + /// Creates `VkPhysicalDeviceLineRasterizationProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceLineRasterizationProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceLineRasterizationProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLineRasterizationProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLineRasterizationProperties(segment); } + + /// Creates `VkPhysicalDeviceLineRasterizationProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLineRasterizationProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLineRasterizationProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceLineRasterizationProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceLineRasterizationProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceLineRasterizationProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceLineRasterizationProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceLineRasterizationProperties` + public static VkPhysicalDeviceLineRasterizationProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceLineRasterizationProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceLineRasterizationProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceLineRasterizationProperties` + public static VkPhysicalDeviceLineRasterizationProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceLineRasterizationProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceLineRasterizationProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceLineRasterizationProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceLineRasterizationProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceLineRasterizationProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceLineRasterizationProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceLineRasterizationProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceLineRasterizationProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLineRasterizationProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLineRasterizationProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceLineRasterizationProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `lineSubPixelPrecisionBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_lineSubPixelPrecisionBits(MemorySegment segment, long index) { return (int) VH_lineSubPixelPrecisionBits.get(segment, 0L, index); } + /// {@return `lineSubPixelPrecisionBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_lineSubPixelPrecisionBits(MemorySegment segment) { return VkPhysicalDeviceLineRasterizationProperties.get_lineSubPixelPrecisionBits(segment, 0L); } + /// {@return `lineSubPixelPrecisionBits` at the given index} + /// @param index the index + public @CType("uint32_t") int lineSubPixelPrecisionBitsAt(long index) { return VkPhysicalDeviceLineRasterizationProperties.get_lineSubPixelPrecisionBits(this.segment(), index); } + /// {@return `lineSubPixelPrecisionBits`} + public @CType("uint32_t") int lineSubPixelPrecisionBits() { return VkPhysicalDeviceLineRasterizationProperties.get_lineSubPixelPrecisionBits(this.segment()); } + /// Sets `lineSubPixelPrecisionBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lineSubPixelPrecisionBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_lineSubPixelPrecisionBits.set(segment, 0L, index, value); } + /// Sets `lineSubPixelPrecisionBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lineSubPixelPrecisionBits(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceLineRasterizationProperties.set_lineSubPixelPrecisionBits(segment, 0L, value); } + /// Sets `lineSubPixelPrecisionBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationProperties lineSubPixelPrecisionBitsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceLineRasterizationProperties.set_lineSubPixelPrecisionBits(this.segment(), index, value); return this; } + /// Sets `lineSubPixelPrecisionBits` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceLineRasterizationProperties lineSubPixelPrecisionBits(@CType("uint32_t") int value) { VkPhysicalDeviceLineRasterizationProperties.set_lineSubPixelPrecisionBits(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance3Properties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance3Properties.java new file mode 100644 index 00000000..ff10c028 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance3Properties.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxPerSetDescriptors +/// [VarHandle][#VH_maxPerSetDescriptors] - [Getter][#maxPerSetDescriptors()] - [Setter][#maxPerSetDescriptors(int)] +/// ### maxMemoryAllocationSize +/// [VarHandle][#VH_maxMemoryAllocationSize] - [Getter][#maxMemoryAllocationSize()] - [Setter][#maxMemoryAllocationSize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMaintenance3Properties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxPerSetDescriptors; +/// VkDeviceSize maxMemoryAllocationSize; +/// } VkPhysicalDeviceMaintenance3Properties; +/// ``` +public final class VkPhysicalDeviceMaintenance3Properties extends Struct { + /// The struct layout of `VkPhysicalDeviceMaintenance3Properties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxPerSetDescriptors"), + ValueLayout.JAVA_LONG.withName("maxMemoryAllocationSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxPerSetDescriptors` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerSetDescriptors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerSetDescriptors")); + /// The [VarHandle] of `maxMemoryAllocationSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxMemoryAllocationSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMemoryAllocationSize")); + + /// Creates `VkPhysicalDeviceMaintenance3Properties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMaintenance3Properties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMaintenance3Properties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance3Properties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance3Properties(segment); } + + /// Creates `VkPhysicalDeviceMaintenance3Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance3Properties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance3Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMaintenance3Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance3Properties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance3Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMaintenance3Properties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMaintenance3Properties` + public static VkPhysicalDeviceMaintenance3Properties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMaintenance3Properties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMaintenance3Properties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMaintenance3Properties` + public static VkPhysicalDeviceMaintenance3Properties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMaintenance3Properties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMaintenance3Properties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMaintenance3Properties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMaintenance3Properties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance3Properties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance3Properties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance3Properties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance3Properties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance3Properties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMaintenance3Properties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMaintenance3Properties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMaintenance3Properties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance3Properties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance3Properties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance3Properties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance3Properties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance3Properties.set_pNext(this.segment(), value); return this; } + + /// {@return `maxPerSetDescriptors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerSetDescriptors(MemorySegment segment, long index) { return (int) VH_maxPerSetDescriptors.get(segment, 0L, index); } + /// {@return `maxPerSetDescriptors`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerSetDescriptors(MemorySegment segment) { return VkPhysicalDeviceMaintenance3Properties.get_maxPerSetDescriptors(segment, 0L); } + /// {@return `maxPerSetDescriptors` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerSetDescriptorsAt(long index) { return VkPhysicalDeviceMaintenance3Properties.get_maxPerSetDescriptors(this.segment(), index); } + /// {@return `maxPerSetDescriptors`} + public @CType("uint32_t") int maxPerSetDescriptors() { return VkPhysicalDeviceMaintenance3Properties.get_maxPerSetDescriptors(this.segment()); } + /// Sets `maxPerSetDescriptors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerSetDescriptors(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerSetDescriptors.set(segment, 0L, index, value); } + /// Sets `maxPerSetDescriptors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerSetDescriptors(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance3Properties.set_maxPerSetDescriptors(segment, 0L, value); } + /// Sets `maxPerSetDescriptors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance3Properties maxPerSetDescriptorsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance3Properties.set_maxPerSetDescriptors(this.segment(), index, value); return this; } + /// Sets `maxPerSetDescriptors` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance3Properties maxPerSetDescriptors(@CType("uint32_t") int value) { VkPhysicalDeviceMaintenance3Properties.set_maxPerSetDescriptors(this.segment(), value); return this; } + + /// {@return `maxMemoryAllocationSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_maxMemoryAllocationSize(MemorySegment segment, long index) { return (long) VH_maxMemoryAllocationSize.get(segment, 0L, index); } + /// {@return `maxMemoryAllocationSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_maxMemoryAllocationSize(MemorySegment segment) { return VkPhysicalDeviceMaintenance3Properties.get_maxMemoryAllocationSize(segment, 0L); } + /// {@return `maxMemoryAllocationSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long maxMemoryAllocationSizeAt(long index) { return VkPhysicalDeviceMaintenance3Properties.get_maxMemoryAllocationSize(this.segment(), index); } + /// {@return `maxMemoryAllocationSize`} + public @CType("VkDeviceSize") long maxMemoryAllocationSize() { return VkPhysicalDeviceMaintenance3Properties.get_maxMemoryAllocationSize(this.segment()); } + /// Sets `maxMemoryAllocationSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMemoryAllocationSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_maxMemoryAllocationSize.set(segment, 0L, index, value); } + /// Sets `maxMemoryAllocationSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMemoryAllocationSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceMaintenance3Properties.set_maxMemoryAllocationSize(segment, 0L, value); } + /// Sets `maxMemoryAllocationSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance3Properties maxMemoryAllocationSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceMaintenance3Properties.set_maxMemoryAllocationSize(this.segment(), index, value); return this; } + /// Sets `maxMemoryAllocationSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance3Properties maxMemoryAllocationSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceMaintenance3Properties.set_maxMemoryAllocationSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance4Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance4Features.java new file mode 100644 index 00000000..dc792b09 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance4Features.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maintenance4 +/// [VarHandle][#VH_maintenance4] - [Getter][#maintenance4()] - [Setter][#maintenance4(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMaintenance4Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 maintenance4; +/// } VkPhysicalDeviceMaintenance4Features; +/// ``` +public final class VkPhysicalDeviceMaintenance4Features extends Struct { + /// The struct layout of `VkPhysicalDeviceMaintenance4Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maintenance4") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maintenance4` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maintenance4 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maintenance4")); + + /// Creates `VkPhysicalDeviceMaintenance4Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMaintenance4Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMaintenance4Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance4Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance4Features(segment); } + + /// Creates `VkPhysicalDeviceMaintenance4Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance4Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance4Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMaintenance4Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance4Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance4Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMaintenance4Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMaintenance4Features` + public static VkPhysicalDeviceMaintenance4Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMaintenance4Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMaintenance4Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMaintenance4Features` + public static VkPhysicalDeviceMaintenance4Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMaintenance4Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMaintenance4Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMaintenance4Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMaintenance4Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance4Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance4Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance4Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMaintenance4Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMaintenance4Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMaintenance4Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance4Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance4Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance4Features.set_pNext(this.segment(), value); return this; } + + /// {@return `maintenance4` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_maintenance4(MemorySegment segment, long index) { return (int) VH_maintenance4.get(segment, 0L, index); } + /// {@return `maintenance4`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_maintenance4(MemorySegment segment) { return VkPhysicalDeviceMaintenance4Features.get_maintenance4(segment, 0L); } + /// {@return `maintenance4` at the given index} + /// @param index the index + public @CType("VkBool32") int maintenance4At(long index) { return VkPhysicalDeviceMaintenance4Features.get_maintenance4(this.segment(), index); } + /// {@return `maintenance4`} + public @CType("VkBool32") int maintenance4() { return VkPhysicalDeviceMaintenance4Features.get_maintenance4(this.segment()); } + /// Sets `maintenance4` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maintenance4(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_maintenance4.set(segment, 0L, index, value); } + /// Sets `maintenance4` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maintenance4(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance4Features.set_maintenance4(segment, 0L, value); } + /// Sets `maintenance4` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Features maintenance4At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance4Features.set_maintenance4(this.segment(), index, value); return this; } + /// Sets `maintenance4` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Features maintenance4(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance4Features.set_maintenance4(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance4Properties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance4Properties.java new file mode 100644 index 00000000..f34dc00a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance4Properties.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxBufferSize +/// [VarHandle][#VH_maxBufferSize] - [Getter][#maxBufferSize()] - [Setter][#maxBufferSize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMaintenance4Properties { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize maxBufferSize; +/// } VkPhysicalDeviceMaintenance4Properties; +/// ``` +public final class VkPhysicalDeviceMaintenance4Properties extends Struct { + /// The struct layout of `VkPhysicalDeviceMaintenance4Properties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("maxBufferSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxBufferSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxBufferSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBufferSize")); + + /// Creates `VkPhysicalDeviceMaintenance4Properties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMaintenance4Properties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMaintenance4Properties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance4Properties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance4Properties(segment); } + + /// Creates `VkPhysicalDeviceMaintenance4Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance4Properties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance4Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMaintenance4Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance4Properties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance4Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMaintenance4Properties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMaintenance4Properties` + public static VkPhysicalDeviceMaintenance4Properties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMaintenance4Properties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMaintenance4Properties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMaintenance4Properties` + public static VkPhysicalDeviceMaintenance4Properties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMaintenance4Properties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMaintenance4Properties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMaintenance4Properties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMaintenance4Properties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance4Properties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Properties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance4Properties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Properties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance4Properties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMaintenance4Properties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMaintenance4Properties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMaintenance4Properties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance4Properties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Properties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance4Properties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Properties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance4Properties.set_pNext(this.segment(), value); return this; } + + /// {@return `maxBufferSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_maxBufferSize(MemorySegment segment, long index) { return (long) VH_maxBufferSize.get(segment, 0L, index); } + /// {@return `maxBufferSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_maxBufferSize(MemorySegment segment) { return VkPhysicalDeviceMaintenance4Properties.get_maxBufferSize(segment, 0L); } + /// {@return `maxBufferSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long maxBufferSizeAt(long index) { return VkPhysicalDeviceMaintenance4Properties.get_maxBufferSize(this.segment(), index); } + /// {@return `maxBufferSize`} + public @CType("VkDeviceSize") long maxBufferSize() { return VkPhysicalDeviceMaintenance4Properties.get_maxBufferSize(this.segment()); } + /// Sets `maxBufferSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBufferSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_maxBufferSize.set(segment, 0L, index, value); } + /// Sets `maxBufferSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBufferSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceMaintenance4Properties.set_maxBufferSize(segment, 0L, value); } + /// Sets `maxBufferSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Properties maxBufferSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceMaintenance4Properties.set_maxBufferSize(this.segment(), index, value); return this; } + /// Sets `maxBufferSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance4Properties maxBufferSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceMaintenance4Properties.set_maxBufferSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance5Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance5Features.java new file mode 100644 index 00000000..72da412e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance5Features.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maintenance5 +/// [VarHandle][#VH_maintenance5] - [Getter][#maintenance5()] - [Setter][#maintenance5(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMaintenance5Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 maintenance5; +/// } VkPhysicalDeviceMaintenance5Features; +/// ``` +public final class VkPhysicalDeviceMaintenance5Features extends Struct { + /// The struct layout of `VkPhysicalDeviceMaintenance5Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maintenance5") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maintenance5` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maintenance5 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maintenance5")); + + /// Creates `VkPhysicalDeviceMaintenance5Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMaintenance5Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMaintenance5Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance5Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance5Features(segment); } + + /// Creates `VkPhysicalDeviceMaintenance5Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance5Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance5Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMaintenance5Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance5Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance5Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMaintenance5Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMaintenance5Features` + public static VkPhysicalDeviceMaintenance5Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMaintenance5Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMaintenance5Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMaintenance5Features` + public static VkPhysicalDeviceMaintenance5Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMaintenance5Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMaintenance5Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMaintenance5Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance5Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance5Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance5Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMaintenance5Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMaintenance5Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance5Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance5Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance5Features.set_pNext(this.segment(), value); return this; } + + /// {@return `maintenance5` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_maintenance5(MemorySegment segment, long index) { return (int) VH_maintenance5.get(segment, 0L, index); } + /// {@return `maintenance5`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_maintenance5(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Features.get_maintenance5(segment, 0L); } + /// {@return `maintenance5` at the given index} + /// @param index the index + public @CType("VkBool32") int maintenance5At(long index) { return VkPhysicalDeviceMaintenance5Features.get_maintenance5(this.segment(), index); } + /// {@return `maintenance5`} + public @CType("VkBool32") int maintenance5() { return VkPhysicalDeviceMaintenance5Features.get_maintenance5(this.segment()); } + /// Sets `maintenance5` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maintenance5(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_maintenance5.set(segment, 0L, index, value); } + /// Sets `maintenance5` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maintenance5(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Features.set_maintenance5(segment, 0L, value); } + /// Sets `maintenance5` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Features maintenance5At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Features.set_maintenance5(this.segment(), index, value); return this; } + /// Sets `maintenance5` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Features maintenance5(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Features.set_maintenance5(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance5Properties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance5Properties.java new file mode 100644 index 00000000..23a8e47e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance5Properties.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### earlyFragmentMultisampleCoverageAfterSampleCounting +/// [VarHandle][#VH_earlyFragmentMultisampleCoverageAfterSampleCounting] - [Getter][#earlyFragmentMultisampleCoverageAfterSampleCounting()] - [Setter][#earlyFragmentMultisampleCoverageAfterSampleCounting(int)] +/// ### earlyFragmentSampleMaskTestBeforeSampleCounting +/// [VarHandle][#VH_earlyFragmentSampleMaskTestBeforeSampleCounting] - [Getter][#earlyFragmentSampleMaskTestBeforeSampleCounting()] - [Setter][#earlyFragmentSampleMaskTestBeforeSampleCounting(int)] +/// ### depthStencilSwizzleOneSupport +/// [VarHandle][#VH_depthStencilSwizzleOneSupport] - [Getter][#depthStencilSwizzleOneSupport()] - [Setter][#depthStencilSwizzleOneSupport(int)] +/// ### polygonModePointSize +/// [VarHandle][#VH_polygonModePointSize] - [Getter][#polygonModePointSize()] - [Setter][#polygonModePointSize(int)] +/// ### nonStrictSinglePixelWideLinesUseParallelogram +/// [VarHandle][#VH_nonStrictSinglePixelWideLinesUseParallelogram] - [Getter][#nonStrictSinglePixelWideLinesUseParallelogram()] - [Setter][#nonStrictSinglePixelWideLinesUseParallelogram(int)] +/// ### nonStrictWideLinesUseParallelogram +/// [VarHandle][#VH_nonStrictWideLinesUseParallelogram] - [Getter][#nonStrictWideLinesUseParallelogram()] - [Setter][#nonStrictWideLinesUseParallelogram(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMaintenance5Properties { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting; +/// VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting; +/// VkBool32 depthStencilSwizzleOneSupport; +/// VkBool32 polygonModePointSize; +/// VkBool32 nonStrictSinglePixelWideLinesUseParallelogram; +/// VkBool32 nonStrictWideLinesUseParallelogram; +/// } VkPhysicalDeviceMaintenance5Properties; +/// ``` +public final class VkPhysicalDeviceMaintenance5Properties extends Struct { + /// The struct layout of `VkPhysicalDeviceMaintenance5Properties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("earlyFragmentMultisampleCoverageAfterSampleCounting"), + ValueLayout.JAVA_INT.withName("earlyFragmentSampleMaskTestBeforeSampleCounting"), + ValueLayout.JAVA_INT.withName("depthStencilSwizzleOneSupport"), + ValueLayout.JAVA_INT.withName("polygonModePointSize"), + ValueLayout.JAVA_INT.withName("nonStrictSinglePixelWideLinesUseParallelogram"), + ValueLayout.JAVA_INT.withName("nonStrictWideLinesUseParallelogram") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `earlyFragmentMultisampleCoverageAfterSampleCounting` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_earlyFragmentMultisampleCoverageAfterSampleCounting = LAYOUT.arrayElementVarHandle(PathElement.groupElement("earlyFragmentMultisampleCoverageAfterSampleCounting")); + /// The [VarHandle] of `earlyFragmentSampleMaskTestBeforeSampleCounting` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_earlyFragmentSampleMaskTestBeforeSampleCounting = LAYOUT.arrayElementVarHandle(PathElement.groupElement("earlyFragmentSampleMaskTestBeforeSampleCounting")); + /// The [VarHandle] of `depthStencilSwizzleOneSupport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthStencilSwizzleOneSupport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthStencilSwizzleOneSupport")); + /// The [VarHandle] of `polygonModePointSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_polygonModePointSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("polygonModePointSize")); + /// The [VarHandle] of `nonStrictSinglePixelWideLinesUseParallelogram` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nonStrictSinglePixelWideLinesUseParallelogram = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nonStrictSinglePixelWideLinesUseParallelogram")); + /// The [VarHandle] of `nonStrictWideLinesUseParallelogram` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nonStrictWideLinesUseParallelogram = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nonStrictWideLinesUseParallelogram")); + + /// Creates `VkPhysicalDeviceMaintenance5Properties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMaintenance5Properties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMaintenance5Properties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance5Properties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance5Properties(segment); } + + /// Creates `VkPhysicalDeviceMaintenance5Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance5Properties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance5Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMaintenance5Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance5Properties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance5Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMaintenance5Properties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMaintenance5Properties` + public static VkPhysicalDeviceMaintenance5Properties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMaintenance5Properties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMaintenance5Properties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMaintenance5Properties` + public static VkPhysicalDeviceMaintenance5Properties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMaintenance5Properties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Properties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMaintenance5Properties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMaintenance5Properties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance5Properties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance5Properties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance5Properties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Properties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMaintenance5Properties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMaintenance5Properties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance5Properties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance5Properties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance5Properties.set_pNext(this.segment(), value); return this; } + + /// {@return `earlyFragmentMultisampleCoverageAfterSampleCounting` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_earlyFragmentMultisampleCoverageAfterSampleCounting(MemorySegment segment, long index) { return (int) VH_earlyFragmentMultisampleCoverageAfterSampleCounting.get(segment, 0L, index); } + /// {@return `earlyFragmentMultisampleCoverageAfterSampleCounting`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_earlyFragmentMultisampleCoverageAfterSampleCounting(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Properties.get_earlyFragmentMultisampleCoverageAfterSampleCounting(segment, 0L); } + /// {@return `earlyFragmentMultisampleCoverageAfterSampleCounting` at the given index} + /// @param index the index + public @CType("VkBool32") int earlyFragmentMultisampleCoverageAfterSampleCountingAt(long index) { return VkPhysicalDeviceMaintenance5Properties.get_earlyFragmentMultisampleCoverageAfterSampleCounting(this.segment(), index); } + /// {@return `earlyFragmentMultisampleCoverageAfterSampleCounting`} + public @CType("VkBool32") int earlyFragmentMultisampleCoverageAfterSampleCounting() { return VkPhysicalDeviceMaintenance5Properties.get_earlyFragmentMultisampleCoverageAfterSampleCounting(this.segment()); } + /// Sets `earlyFragmentMultisampleCoverageAfterSampleCounting` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_earlyFragmentMultisampleCoverageAfterSampleCounting(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_earlyFragmentMultisampleCoverageAfterSampleCounting.set(segment, 0L, index, value); } + /// Sets `earlyFragmentMultisampleCoverageAfterSampleCounting` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_earlyFragmentMultisampleCoverageAfterSampleCounting(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_earlyFragmentMultisampleCoverageAfterSampleCounting(segment, 0L, value); } + /// Sets `earlyFragmentMultisampleCoverageAfterSampleCounting` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties earlyFragmentMultisampleCoverageAfterSampleCountingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_earlyFragmentMultisampleCoverageAfterSampleCounting(this.segment(), index, value); return this; } + /// Sets `earlyFragmentMultisampleCoverageAfterSampleCounting` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties earlyFragmentMultisampleCoverageAfterSampleCounting(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_earlyFragmentMultisampleCoverageAfterSampleCounting(this.segment(), value); return this; } + + /// {@return `earlyFragmentSampleMaskTestBeforeSampleCounting` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_earlyFragmentSampleMaskTestBeforeSampleCounting(MemorySegment segment, long index) { return (int) VH_earlyFragmentSampleMaskTestBeforeSampleCounting.get(segment, 0L, index); } + /// {@return `earlyFragmentSampleMaskTestBeforeSampleCounting`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_earlyFragmentSampleMaskTestBeforeSampleCounting(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Properties.get_earlyFragmentSampleMaskTestBeforeSampleCounting(segment, 0L); } + /// {@return `earlyFragmentSampleMaskTestBeforeSampleCounting` at the given index} + /// @param index the index + public @CType("VkBool32") int earlyFragmentSampleMaskTestBeforeSampleCountingAt(long index) { return VkPhysicalDeviceMaintenance5Properties.get_earlyFragmentSampleMaskTestBeforeSampleCounting(this.segment(), index); } + /// {@return `earlyFragmentSampleMaskTestBeforeSampleCounting`} + public @CType("VkBool32") int earlyFragmentSampleMaskTestBeforeSampleCounting() { return VkPhysicalDeviceMaintenance5Properties.get_earlyFragmentSampleMaskTestBeforeSampleCounting(this.segment()); } + /// Sets `earlyFragmentSampleMaskTestBeforeSampleCounting` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_earlyFragmentSampleMaskTestBeforeSampleCounting(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_earlyFragmentSampleMaskTestBeforeSampleCounting.set(segment, 0L, index, value); } + /// Sets `earlyFragmentSampleMaskTestBeforeSampleCounting` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_earlyFragmentSampleMaskTestBeforeSampleCounting(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_earlyFragmentSampleMaskTestBeforeSampleCounting(segment, 0L, value); } + /// Sets `earlyFragmentSampleMaskTestBeforeSampleCounting` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties earlyFragmentSampleMaskTestBeforeSampleCountingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_earlyFragmentSampleMaskTestBeforeSampleCounting(this.segment(), index, value); return this; } + /// Sets `earlyFragmentSampleMaskTestBeforeSampleCounting` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties earlyFragmentSampleMaskTestBeforeSampleCounting(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_earlyFragmentSampleMaskTestBeforeSampleCounting(this.segment(), value); return this; } + + /// {@return `depthStencilSwizzleOneSupport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthStencilSwizzleOneSupport(MemorySegment segment, long index) { return (int) VH_depthStencilSwizzleOneSupport.get(segment, 0L, index); } + /// {@return `depthStencilSwizzleOneSupport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthStencilSwizzleOneSupport(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Properties.get_depthStencilSwizzleOneSupport(segment, 0L); } + /// {@return `depthStencilSwizzleOneSupport` at the given index} + /// @param index the index + public @CType("VkBool32") int depthStencilSwizzleOneSupportAt(long index) { return VkPhysicalDeviceMaintenance5Properties.get_depthStencilSwizzleOneSupport(this.segment(), index); } + /// {@return `depthStencilSwizzleOneSupport`} + public @CType("VkBool32") int depthStencilSwizzleOneSupport() { return VkPhysicalDeviceMaintenance5Properties.get_depthStencilSwizzleOneSupport(this.segment()); } + /// Sets `depthStencilSwizzleOneSupport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthStencilSwizzleOneSupport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthStencilSwizzleOneSupport.set(segment, 0L, index, value); } + /// Sets `depthStencilSwizzleOneSupport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthStencilSwizzleOneSupport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_depthStencilSwizzleOneSupport(segment, 0L, value); } + /// Sets `depthStencilSwizzleOneSupport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties depthStencilSwizzleOneSupportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_depthStencilSwizzleOneSupport(this.segment(), index, value); return this; } + /// Sets `depthStencilSwizzleOneSupport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties depthStencilSwizzleOneSupport(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_depthStencilSwizzleOneSupport(this.segment(), value); return this; } + + /// {@return `polygonModePointSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_polygonModePointSize(MemorySegment segment, long index) { return (int) VH_polygonModePointSize.get(segment, 0L, index); } + /// {@return `polygonModePointSize`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_polygonModePointSize(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Properties.get_polygonModePointSize(segment, 0L); } + /// {@return `polygonModePointSize` at the given index} + /// @param index the index + public @CType("VkBool32") int polygonModePointSizeAt(long index) { return VkPhysicalDeviceMaintenance5Properties.get_polygonModePointSize(this.segment(), index); } + /// {@return `polygonModePointSize`} + public @CType("VkBool32") int polygonModePointSize() { return VkPhysicalDeviceMaintenance5Properties.get_polygonModePointSize(this.segment()); } + /// Sets `polygonModePointSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_polygonModePointSize(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_polygonModePointSize.set(segment, 0L, index, value); } + /// Sets `polygonModePointSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_polygonModePointSize(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_polygonModePointSize(segment, 0L, value); } + /// Sets `polygonModePointSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties polygonModePointSizeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_polygonModePointSize(this.segment(), index, value); return this; } + /// Sets `polygonModePointSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties polygonModePointSize(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_polygonModePointSize(this.segment(), value); return this; } + + /// {@return `nonStrictSinglePixelWideLinesUseParallelogram` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nonStrictSinglePixelWideLinesUseParallelogram(MemorySegment segment, long index) { return (int) VH_nonStrictSinglePixelWideLinesUseParallelogram.get(segment, 0L, index); } + /// {@return `nonStrictSinglePixelWideLinesUseParallelogram`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nonStrictSinglePixelWideLinesUseParallelogram(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Properties.get_nonStrictSinglePixelWideLinesUseParallelogram(segment, 0L); } + /// {@return `nonStrictSinglePixelWideLinesUseParallelogram` at the given index} + /// @param index the index + public @CType("VkBool32") int nonStrictSinglePixelWideLinesUseParallelogramAt(long index) { return VkPhysicalDeviceMaintenance5Properties.get_nonStrictSinglePixelWideLinesUseParallelogram(this.segment(), index); } + /// {@return `nonStrictSinglePixelWideLinesUseParallelogram`} + public @CType("VkBool32") int nonStrictSinglePixelWideLinesUseParallelogram() { return VkPhysicalDeviceMaintenance5Properties.get_nonStrictSinglePixelWideLinesUseParallelogram(this.segment()); } + /// Sets `nonStrictSinglePixelWideLinesUseParallelogram` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nonStrictSinglePixelWideLinesUseParallelogram(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nonStrictSinglePixelWideLinesUseParallelogram.set(segment, 0L, index, value); } + /// Sets `nonStrictSinglePixelWideLinesUseParallelogram` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nonStrictSinglePixelWideLinesUseParallelogram(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_nonStrictSinglePixelWideLinesUseParallelogram(segment, 0L, value); } + /// Sets `nonStrictSinglePixelWideLinesUseParallelogram` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties nonStrictSinglePixelWideLinesUseParallelogramAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_nonStrictSinglePixelWideLinesUseParallelogram(this.segment(), index, value); return this; } + /// Sets `nonStrictSinglePixelWideLinesUseParallelogram` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties nonStrictSinglePixelWideLinesUseParallelogram(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_nonStrictSinglePixelWideLinesUseParallelogram(this.segment(), value); return this; } + + /// {@return `nonStrictWideLinesUseParallelogram` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nonStrictWideLinesUseParallelogram(MemorySegment segment, long index) { return (int) VH_nonStrictWideLinesUseParallelogram.get(segment, 0L, index); } + /// {@return `nonStrictWideLinesUseParallelogram`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nonStrictWideLinesUseParallelogram(MemorySegment segment) { return VkPhysicalDeviceMaintenance5Properties.get_nonStrictWideLinesUseParallelogram(segment, 0L); } + /// {@return `nonStrictWideLinesUseParallelogram` at the given index} + /// @param index the index + public @CType("VkBool32") int nonStrictWideLinesUseParallelogramAt(long index) { return VkPhysicalDeviceMaintenance5Properties.get_nonStrictWideLinesUseParallelogram(this.segment(), index); } + /// {@return `nonStrictWideLinesUseParallelogram`} + public @CType("VkBool32") int nonStrictWideLinesUseParallelogram() { return VkPhysicalDeviceMaintenance5Properties.get_nonStrictWideLinesUseParallelogram(this.segment()); } + /// Sets `nonStrictWideLinesUseParallelogram` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nonStrictWideLinesUseParallelogram(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nonStrictWideLinesUseParallelogram.set(segment, 0L, index, value); } + /// Sets `nonStrictWideLinesUseParallelogram` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nonStrictWideLinesUseParallelogram(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_nonStrictWideLinesUseParallelogram(segment, 0L, value); } + /// Sets `nonStrictWideLinesUseParallelogram` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties nonStrictWideLinesUseParallelogramAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_nonStrictWideLinesUseParallelogram(this.segment(), index, value); return this; } + /// Sets `nonStrictWideLinesUseParallelogram` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance5Properties nonStrictWideLinesUseParallelogram(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance5Properties.set_nonStrictWideLinesUseParallelogram(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance6Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance6Features.java new file mode 100644 index 00000000..bc091389 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance6Features.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maintenance6 +/// [VarHandle][#VH_maintenance6] - [Getter][#maintenance6()] - [Setter][#maintenance6(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMaintenance6Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 maintenance6; +/// } VkPhysicalDeviceMaintenance6Features; +/// ``` +public final class VkPhysicalDeviceMaintenance6Features extends Struct { + /// The struct layout of `VkPhysicalDeviceMaintenance6Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maintenance6") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maintenance6` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maintenance6 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maintenance6")); + + /// Creates `VkPhysicalDeviceMaintenance6Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMaintenance6Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMaintenance6Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance6Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance6Features(segment); } + + /// Creates `VkPhysicalDeviceMaintenance6Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance6Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance6Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMaintenance6Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance6Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance6Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMaintenance6Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMaintenance6Features` + public static VkPhysicalDeviceMaintenance6Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMaintenance6Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMaintenance6Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMaintenance6Features` + public static VkPhysicalDeviceMaintenance6Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMaintenance6Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMaintenance6Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMaintenance6Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMaintenance6Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance6Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance6Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance6Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMaintenance6Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMaintenance6Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMaintenance6Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance6Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance6Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance6Features.set_pNext(this.segment(), value); return this; } + + /// {@return `maintenance6` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_maintenance6(MemorySegment segment, long index) { return (int) VH_maintenance6.get(segment, 0L, index); } + /// {@return `maintenance6`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_maintenance6(MemorySegment segment) { return VkPhysicalDeviceMaintenance6Features.get_maintenance6(segment, 0L); } + /// {@return `maintenance6` at the given index} + /// @param index the index + public @CType("VkBool32") int maintenance6At(long index) { return VkPhysicalDeviceMaintenance6Features.get_maintenance6(this.segment(), index); } + /// {@return `maintenance6`} + public @CType("VkBool32") int maintenance6() { return VkPhysicalDeviceMaintenance6Features.get_maintenance6(this.segment()); } + /// Sets `maintenance6` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maintenance6(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_maintenance6.set(segment, 0L, index, value); } + /// Sets `maintenance6` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maintenance6(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance6Features.set_maintenance6(segment, 0L, value); } + /// Sets `maintenance6` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Features maintenance6At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance6Features.set_maintenance6(this.segment(), index, value); return this; } + /// Sets `maintenance6` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Features maintenance6(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance6Features.set_maintenance6(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance6Properties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance6Properties.java new file mode 100644 index 00000000..c165c37d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMaintenance6Properties.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### blockTexelViewCompatibleMultipleLayers +/// [VarHandle][#VH_blockTexelViewCompatibleMultipleLayers] - [Getter][#blockTexelViewCompatibleMultipleLayers()] - [Setter][#blockTexelViewCompatibleMultipleLayers(int)] +/// ### maxCombinedImageSamplerDescriptorCount +/// [VarHandle][#VH_maxCombinedImageSamplerDescriptorCount] - [Getter][#maxCombinedImageSamplerDescriptorCount()] - [Setter][#maxCombinedImageSamplerDescriptorCount(int)] +/// ### fragmentShadingRateClampCombinerInputs +/// [VarHandle][#VH_fragmentShadingRateClampCombinerInputs] - [Getter][#fragmentShadingRateClampCombinerInputs()] - [Setter][#fragmentShadingRateClampCombinerInputs(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMaintenance6Properties { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 blockTexelViewCompatibleMultipleLayers; +/// uint32_t maxCombinedImageSamplerDescriptorCount; +/// VkBool32 fragmentShadingRateClampCombinerInputs; +/// } VkPhysicalDeviceMaintenance6Properties; +/// ``` +public final class VkPhysicalDeviceMaintenance6Properties extends Struct { + /// The struct layout of `VkPhysicalDeviceMaintenance6Properties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("blockTexelViewCompatibleMultipleLayers"), + ValueLayout.JAVA_INT.withName("maxCombinedImageSamplerDescriptorCount"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateClampCombinerInputs") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `blockTexelViewCompatibleMultipleLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blockTexelViewCompatibleMultipleLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blockTexelViewCompatibleMultipleLayers")); + /// The [VarHandle] of `maxCombinedImageSamplerDescriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxCombinedImageSamplerDescriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxCombinedImageSamplerDescriptorCount")); + /// The [VarHandle] of `fragmentShadingRateClampCombinerInputs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateClampCombinerInputs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateClampCombinerInputs")); + + /// Creates `VkPhysicalDeviceMaintenance6Properties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMaintenance6Properties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMaintenance6Properties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance6Properties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance6Properties(segment); } + + /// Creates `VkPhysicalDeviceMaintenance6Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance6Properties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance6Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMaintenance6Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMaintenance6Properties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMaintenance6Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMaintenance6Properties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMaintenance6Properties` + public static VkPhysicalDeviceMaintenance6Properties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMaintenance6Properties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMaintenance6Properties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMaintenance6Properties` + public static VkPhysicalDeviceMaintenance6Properties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMaintenance6Properties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMaintenance6Properties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMaintenance6Properties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMaintenance6Properties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance6Properties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Properties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance6Properties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Properties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMaintenance6Properties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMaintenance6Properties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMaintenance6Properties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMaintenance6Properties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance6Properties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Properties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance6Properties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Properties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMaintenance6Properties.set_pNext(this.segment(), value); return this; } + + /// {@return `blockTexelViewCompatibleMultipleLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_blockTexelViewCompatibleMultipleLayers(MemorySegment segment, long index) { return (int) VH_blockTexelViewCompatibleMultipleLayers.get(segment, 0L, index); } + /// {@return `blockTexelViewCompatibleMultipleLayers`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_blockTexelViewCompatibleMultipleLayers(MemorySegment segment) { return VkPhysicalDeviceMaintenance6Properties.get_blockTexelViewCompatibleMultipleLayers(segment, 0L); } + /// {@return `blockTexelViewCompatibleMultipleLayers` at the given index} + /// @param index the index + public @CType("VkBool32") int blockTexelViewCompatibleMultipleLayersAt(long index) { return VkPhysicalDeviceMaintenance6Properties.get_blockTexelViewCompatibleMultipleLayers(this.segment(), index); } + /// {@return `blockTexelViewCompatibleMultipleLayers`} + public @CType("VkBool32") int blockTexelViewCompatibleMultipleLayers() { return VkPhysicalDeviceMaintenance6Properties.get_blockTexelViewCompatibleMultipleLayers(this.segment()); } + /// Sets `blockTexelViewCompatibleMultipleLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blockTexelViewCompatibleMultipleLayers(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_blockTexelViewCompatibleMultipleLayers.set(segment, 0L, index, value); } + /// Sets `blockTexelViewCompatibleMultipleLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blockTexelViewCompatibleMultipleLayers(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance6Properties.set_blockTexelViewCompatibleMultipleLayers(segment, 0L, value); } + /// Sets `blockTexelViewCompatibleMultipleLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Properties blockTexelViewCompatibleMultipleLayersAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance6Properties.set_blockTexelViewCompatibleMultipleLayers(this.segment(), index, value); return this; } + /// Sets `blockTexelViewCompatibleMultipleLayers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Properties blockTexelViewCompatibleMultipleLayers(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance6Properties.set_blockTexelViewCompatibleMultipleLayers(this.segment(), value); return this; } + + /// {@return `maxCombinedImageSamplerDescriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxCombinedImageSamplerDescriptorCount(MemorySegment segment, long index) { return (int) VH_maxCombinedImageSamplerDescriptorCount.get(segment, 0L, index); } + /// {@return `maxCombinedImageSamplerDescriptorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxCombinedImageSamplerDescriptorCount(MemorySegment segment) { return VkPhysicalDeviceMaintenance6Properties.get_maxCombinedImageSamplerDescriptorCount(segment, 0L); } + /// {@return `maxCombinedImageSamplerDescriptorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxCombinedImageSamplerDescriptorCountAt(long index) { return VkPhysicalDeviceMaintenance6Properties.get_maxCombinedImageSamplerDescriptorCount(this.segment(), index); } + /// {@return `maxCombinedImageSamplerDescriptorCount`} + public @CType("uint32_t") int maxCombinedImageSamplerDescriptorCount() { return VkPhysicalDeviceMaintenance6Properties.get_maxCombinedImageSamplerDescriptorCount(this.segment()); } + /// Sets `maxCombinedImageSamplerDescriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCombinedImageSamplerDescriptorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxCombinedImageSamplerDescriptorCount.set(segment, 0L, index, value); } + /// Sets `maxCombinedImageSamplerDescriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCombinedImageSamplerDescriptorCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance6Properties.set_maxCombinedImageSamplerDescriptorCount(segment, 0L, value); } + /// Sets `maxCombinedImageSamplerDescriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Properties maxCombinedImageSamplerDescriptorCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMaintenance6Properties.set_maxCombinedImageSamplerDescriptorCount(this.segment(), index, value); return this; } + /// Sets `maxCombinedImageSamplerDescriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Properties maxCombinedImageSamplerDescriptorCount(@CType("uint32_t") int value) { VkPhysicalDeviceMaintenance6Properties.set_maxCombinedImageSamplerDescriptorCount(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateClampCombinerInputs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateClampCombinerInputs(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateClampCombinerInputs.get(segment, 0L, index); } + /// {@return `fragmentShadingRateClampCombinerInputs`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateClampCombinerInputs(MemorySegment segment) { return VkPhysicalDeviceMaintenance6Properties.get_fragmentShadingRateClampCombinerInputs(segment, 0L); } + /// {@return `fragmentShadingRateClampCombinerInputs` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateClampCombinerInputsAt(long index) { return VkPhysicalDeviceMaintenance6Properties.get_fragmentShadingRateClampCombinerInputs(this.segment(), index); } + /// {@return `fragmentShadingRateClampCombinerInputs`} + public @CType("VkBool32") int fragmentShadingRateClampCombinerInputs() { return VkPhysicalDeviceMaintenance6Properties.get_fragmentShadingRateClampCombinerInputs(this.segment()); } + /// Sets `fragmentShadingRateClampCombinerInputs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateClampCombinerInputs(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateClampCombinerInputs.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateClampCombinerInputs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateClampCombinerInputs(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance6Properties.set_fragmentShadingRateClampCombinerInputs(segment, 0L, value); } + /// Sets `fragmentShadingRateClampCombinerInputs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Properties fragmentShadingRateClampCombinerInputsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMaintenance6Properties.set_fragmentShadingRateClampCombinerInputs(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateClampCombinerInputs` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMaintenance6Properties fragmentShadingRateClampCombinerInputs(@CType("VkBool32") int value) { VkPhysicalDeviceMaintenance6Properties.set_fragmentShadingRateClampCombinerInputs(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMemoryProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMemoryProperties.java new file mode 100644 index 00000000..fc99b22e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMemoryProperties.java @@ -0,0 +1,256 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### memoryTypeCount +/// [VarHandle][#VH_memoryTypeCount] - [Getter][#memoryTypeCount()] - [Setter][#memoryTypeCount(int)] +/// ### memoryTypes +/// [Byte offset handle][#MH_memoryTypes] - [Memory layout][#ML_memoryTypes] - [Getter][#memoryTypes(long)] - [Setter][#memoryTypes(long, java.lang.foreign.MemorySegment)] +/// ### memoryHeapCount +/// [VarHandle][#VH_memoryHeapCount] - [Getter][#memoryHeapCount()] - [Setter][#memoryHeapCount(int)] +/// ### memoryHeaps +/// [Byte offset handle][#MH_memoryHeaps] - [Memory layout][#ML_memoryHeaps] - [Getter][#memoryHeaps(long)] - [Setter][#memoryHeaps(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMemoryProperties { +/// uint32_t memoryTypeCount; +/// VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes; +/// uint32_t memoryHeapCount; +/// VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps; +/// } VkPhysicalDeviceMemoryProperties; +/// ``` +public final class VkPhysicalDeviceMemoryProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceMemoryProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("memoryTypeCount"), + MemoryLayout.sequenceLayout(VK_MAX_MEMORY_TYPES, VkMemoryType.LAYOUT).withName("memoryTypes"), + ValueLayout.JAVA_INT.withName("memoryHeapCount"), + MemoryLayout.sequenceLayout(VK_MAX_MEMORY_HEAPS, VkMemoryHeap.LAYOUT).withName("memoryHeaps") + ); + /// The [VarHandle] of `memoryTypeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryTypeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryTypeCount")); + /// The byte offset handle of `memoryTypes` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_memoryTypes = LAYOUT.byteOffsetHandle(PathElement.groupElement("memoryTypes"), PathElement.sequenceElement()); + /// The memory layout of `memoryTypes`. + public static final MemoryLayout ML_memoryTypes = LAYOUT.select(PathElement.groupElement("memoryTypes")); + /// The [VarHandle] of `memoryHeapCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memoryHeapCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryHeapCount")); + /// The byte offset handle of `memoryHeaps` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_memoryHeaps = LAYOUT.byteOffsetHandle(PathElement.groupElement("memoryHeaps"), PathElement.sequenceElement()); + /// The memory layout of `memoryHeaps`. + public static final MemoryLayout ML_memoryHeaps = LAYOUT.select(PathElement.groupElement("memoryHeaps")); + + /// Creates `VkPhysicalDeviceMemoryProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMemoryProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMemoryProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryProperties(segment); } + + /// Creates `VkPhysicalDeviceMemoryProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMemoryProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMemoryProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMemoryProperties` + public static VkPhysicalDeviceMemoryProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMemoryProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMemoryProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMemoryProperties` + public static VkPhysicalDeviceMemoryProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMemoryProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `memoryTypeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryTypeCount(MemorySegment segment, long index) { return (int) VH_memoryTypeCount.get(segment, 0L, index); } + /// {@return `memoryTypeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryTypeCount(MemorySegment segment) { return VkPhysicalDeviceMemoryProperties.get_memoryTypeCount(segment, 0L); } + /// {@return `memoryTypeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryTypeCountAt(long index) { return VkPhysicalDeviceMemoryProperties.get_memoryTypeCount(this.segment(), index); } + /// {@return `memoryTypeCount`} + public @CType("uint32_t") int memoryTypeCount() { return VkPhysicalDeviceMemoryProperties.get_memoryTypeCount(this.segment()); } + /// Sets `memoryTypeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryTypeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryTypeCount.set(segment, 0L, index, value); } + /// Sets `memoryTypeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryTypeCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMemoryProperties.set_memoryTypeCount(segment, 0L, value); } + /// Sets `memoryTypeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties memoryTypeCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMemoryProperties.set_memoryTypeCount(this.segment(), index, value); return this; } + /// Sets `memoryTypeCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties memoryTypeCount(@CType("uint32_t") int value) { VkPhysicalDeviceMemoryProperties.set_memoryTypeCount(this.segment(), value); return this; } + + /// {@return `memoryTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("VkMemoryType[VK_MAX_MEMORY_TYPES]") java.lang.foreign.MemorySegment get_memoryTypes(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_memoryTypes.invokeExact(0L, elementIndex), index), ML_memoryTypes); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `memoryTypes`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("VkMemoryType[VK_MAX_MEMORY_TYPES]") java.lang.foreign.MemorySegment get_memoryTypes(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceMemoryProperties.get_memoryTypes(segment, 0L, elementIndex); } + /// {@return `memoryTypes` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("VkMemoryType[VK_MAX_MEMORY_TYPES]") java.lang.foreign.MemorySegment memoryTypesAt(long index, long elementIndex) { return VkPhysicalDeviceMemoryProperties.get_memoryTypes(this.segment(), index, elementIndex); } + /// {@return `memoryTypes`} + /// @param elementIndex the index of the element + public @CType("VkMemoryType[VK_MAX_MEMORY_TYPES]") java.lang.foreign.MemorySegment memoryTypes(long elementIndex) { return VkPhysicalDeviceMemoryProperties.get_memoryTypes(this.segment(), elementIndex); } + /// Sets `memoryTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_memoryTypes(MemorySegment segment, long index, long elementIndex, @CType("VkMemoryType[VK_MAX_MEMORY_TYPES]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_memoryTypes.invokeExact(0L, elementIndex), index), ML_memoryTypes.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `memoryTypes` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_memoryTypes(MemorySegment segment, long elementIndex, @CType("VkMemoryType[VK_MAX_MEMORY_TYPES]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties.set_memoryTypes(segment, 0L, elementIndex, value); } + /// Sets `memoryTypes` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties memoryTypesAt(long index, long elementIndex, @CType("VkMemoryType[VK_MAX_MEMORY_TYPES]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties.set_memoryTypes(this.segment(), index, elementIndex, value); return this; } + /// Sets `memoryTypes` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties memoryTypes(long elementIndex, @CType("VkMemoryType[VK_MAX_MEMORY_TYPES]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties.set_memoryTypes(this.segment(), elementIndex, value); return this; } + + /// {@return `memoryHeapCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_memoryHeapCount(MemorySegment segment, long index) { return (int) VH_memoryHeapCount.get(segment, 0L, index); } + /// {@return `memoryHeapCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_memoryHeapCount(MemorySegment segment) { return VkPhysicalDeviceMemoryProperties.get_memoryHeapCount(segment, 0L); } + /// {@return `memoryHeapCount` at the given index} + /// @param index the index + public @CType("uint32_t") int memoryHeapCountAt(long index) { return VkPhysicalDeviceMemoryProperties.get_memoryHeapCount(this.segment(), index); } + /// {@return `memoryHeapCount`} + public @CType("uint32_t") int memoryHeapCount() { return VkPhysicalDeviceMemoryProperties.get_memoryHeapCount(this.segment()); } + /// Sets `memoryHeapCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryHeapCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_memoryHeapCount.set(segment, 0L, index, value); } + /// Sets `memoryHeapCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryHeapCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMemoryProperties.set_memoryHeapCount(segment, 0L, value); } + /// Sets `memoryHeapCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties memoryHeapCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMemoryProperties.set_memoryHeapCount(this.segment(), index, value); return this; } + /// Sets `memoryHeapCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties memoryHeapCount(@CType("uint32_t") int value) { VkPhysicalDeviceMemoryProperties.set_memoryHeapCount(this.segment(), value); return this; } + + /// {@return `memoryHeaps` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("VkMemoryHeap[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment get_memoryHeaps(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_memoryHeaps.invokeExact(0L, elementIndex), index), ML_memoryHeaps); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `memoryHeaps`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("VkMemoryHeap[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment get_memoryHeaps(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceMemoryProperties.get_memoryHeaps(segment, 0L, elementIndex); } + /// {@return `memoryHeaps` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("VkMemoryHeap[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment memoryHeapsAt(long index, long elementIndex) { return VkPhysicalDeviceMemoryProperties.get_memoryHeaps(this.segment(), index, elementIndex); } + /// {@return `memoryHeaps`} + /// @param elementIndex the index of the element + public @CType("VkMemoryHeap[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment memoryHeaps(long elementIndex) { return VkPhysicalDeviceMemoryProperties.get_memoryHeaps(this.segment(), elementIndex); } + /// Sets `memoryHeaps` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_memoryHeaps(MemorySegment segment, long index, long elementIndex, @CType("VkMemoryHeap[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_memoryHeaps.invokeExact(0L, elementIndex), index), ML_memoryHeaps.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `memoryHeaps` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_memoryHeaps(MemorySegment segment, long elementIndex, @CType("VkMemoryHeap[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties.set_memoryHeaps(segment, 0L, elementIndex, value); } + /// Sets `memoryHeaps` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties memoryHeapsAt(long index, long elementIndex, @CType("VkMemoryHeap[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties.set_memoryHeaps(this.segment(), index, elementIndex, value); return this; } + /// Sets `memoryHeaps` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties memoryHeaps(long elementIndex, @CType("VkMemoryHeap[VK_MAX_MEMORY_HEAPS]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties.set_memoryHeaps(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMemoryProperties2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMemoryProperties2.java new file mode 100644 index 00000000..085cb584 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMemoryProperties2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryProperties +/// [Byte offset][#OFFSET_memoryProperties] - [Memory layout][#ML_memoryProperties] - [Getter][#memoryProperties()] - [Setter][#memoryProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMemoryProperties2 { +/// VkStructureType sType; +/// void * pNext; +/// VkPhysicalDeviceMemoryProperties memoryProperties; +/// } VkPhysicalDeviceMemoryProperties2; +/// ``` +public final class VkPhysicalDeviceMemoryProperties2 extends Struct { + /// The struct layout of `VkPhysicalDeviceMemoryProperties2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkPhysicalDeviceMemoryProperties.LAYOUT.withName("memoryProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `memoryProperties`. + public static final long OFFSET_memoryProperties = LAYOUT.byteOffset(PathElement.groupElement("memoryProperties")); + /// The memory layout of `memoryProperties`. + public static final MemoryLayout ML_memoryProperties = LAYOUT.select(PathElement.groupElement("memoryProperties")); + + /// Creates `VkPhysicalDeviceMemoryProperties2` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMemoryProperties2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMemoryProperties2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryProperties2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryProperties2(segment); } + + /// Creates `VkPhysicalDeviceMemoryProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryProperties2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMemoryProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMemoryProperties2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMemoryProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMemoryProperties2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMemoryProperties2` + public static VkPhysicalDeviceMemoryProperties2 alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMemoryProperties2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMemoryProperties2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMemoryProperties2` + public static VkPhysicalDeviceMemoryProperties2 alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMemoryProperties2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMemoryProperties2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMemoryProperties2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMemoryProperties2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMemoryProperties2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties2 sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMemoryProperties2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties2 sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMemoryProperties2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMemoryProperties2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMemoryProperties2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMemoryProperties2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties2.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPhysicalDeviceMemoryProperties") java.lang.foreign.MemorySegment get_memoryProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_memoryProperties, index), ML_memoryProperties); } + /// {@return `memoryProperties`} + /// @param segment the segment of the struct + public static @CType("VkPhysicalDeviceMemoryProperties") java.lang.foreign.MemorySegment get_memoryProperties(MemorySegment segment) { return VkPhysicalDeviceMemoryProperties2.get_memoryProperties(segment, 0L); } + /// {@return `memoryProperties` at the given index} + /// @param index the index + public @CType("VkPhysicalDeviceMemoryProperties") java.lang.foreign.MemorySegment memoryPropertiesAt(long index) { return VkPhysicalDeviceMemoryProperties2.get_memoryProperties(this.segment(), index); } + /// {@return `memoryProperties`} + public @CType("VkPhysicalDeviceMemoryProperties") java.lang.foreign.MemorySegment memoryProperties() { return VkPhysicalDeviceMemoryProperties2.get_memoryProperties(this.segment()); } + /// Sets `memoryProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryProperties(MemorySegment segment, long index, @CType("VkPhysicalDeviceMemoryProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_memoryProperties, index), ML_memoryProperties.byteSize()); } + /// Sets `memoryProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryProperties(MemorySegment segment, @CType("VkPhysicalDeviceMemoryProperties") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties2.set_memoryProperties(segment, 0L, value); } + /// Sets `memoryProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties2 memoryPropertiesAt(long index, @CType("VkPhysicalDeviceMemoryProperties") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties2.set_memoryProperties(this.segment(), index, value); return this; } + /// Sets `memoryProperties` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMemoryProperties2 memoryProperties(@CType("VkPhysicalDeviceMemoryProperties") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMemoryProperties2.set_memoryProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMultiviewFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMultiviewFeatures.java new file mode 100644 index 00000000..f52eb70c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMultiviewFeatures.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### multiview +/// [VarHandle][#VH_multiview] - [Getter][#multiview()] - [Setter][#multiview(int)] +/// ### multiviewGeometryShader +/// [VarHandle][#VH_multiviewGeometryShader] - [Getter][#multiviewGeometryShader()] - [Setter][#multiviewGeometryShader(int)] +/// ### multiviewTessellationShader +/// [VarHandle][#VH_multiviewTessellationShader] - [Getter][#multiviewTessellationShader()] - [Setter][#multiviewTessellationShader(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMultiviewFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 multiview; +/// VkBool32 multiviewGeometryShader; +/// VkBool32 multiviewTessellationShader; +/// } VkPhysicalDeviceMultiviewFeatures; +/// ``` +public final class VkPhysicalDeviceMultiviewFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceMultiviewFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("multiview"), + ValueLayout.JAVA_INT.withName("multiviewGeometryShader"), + ValueLayout.JAVA_INT.withName("multiviewTessellationShader") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `multiview` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiview = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiview")); + /// The [VarHandle] of `multiviewGeometryShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiviewGeometryShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiviewGeometryShader")); + /// The [VarHandle] of `multiviewTessellationShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiviewTessellationShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiviewTessellationShader")); + + /// Creates `VkPhysicalDeviceMultiviewFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMultiviewFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMultiviewFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewFeatures(segment); } + + /// Creates `VkPhysicalDeviceMultiviewFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMultiviewFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMultiviewFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMultiviewFeatures` + public static VkPhysicalDeviceMultiviewFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMultiviewFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMultiviewFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMultiviewFeatures` + public static VkPhysicalDeviceMultiviewFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMultiviewFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMultiviewFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMultiviewFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMultiviewFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMultiviewFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMultiviewFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMultiviewFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `multiview` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiview(MemorySegment segment, long index) { return (int) VH_multiview.get(segment, 0L, index); } + /// {@return `multiview`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiview(MemorySegment segment) { return VkPhysicalDeviceMultiviewFeatures.get_multiview(segment, 0L); } + /// {@return `multiview` at the given index} + /// @param index the index + public @CType("VkBool32") int multiviewAt(long index) { return VkPhysicalDeviceMultiviewFeatures.get_multiview(this.segment(), index); } + /// {@return `multiview`} + public @CType("VkBool32") int multiview() { return VkPhysicalDeviceMultiviewFeatures.get_multiview(this.segment()); } + /// Sets `multiview` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiview(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiview.set(segment, 0L, index, value); } + /// Sets `multiview` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiview(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewFeatures.set_multiview(segment, 0L, value); } + /// Sets `multiview` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewFeatures multiviewAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewFeatures.set_multiview(this.segment(), index, value); return this; } + /// Sets `multiview` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewFeatures multiview(@CType("VkBool32") int value) { VkPhysicalDeviceMultiviewFeatures.set_multiview(this.segment(), value); return this; } + + /// {@return `multiviewGeometryShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiviewGeometryShader(MemorySegment segment, long index) { return (int) VH_multiviewGeometryShader.get(segment, 0L, index); } + /// {@return `multiviewGeometryShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiviewGeometryShader(MemorySegment segment) { return VkPhysicalDeviceMultiviewFeatures.get_multiviewGeometryShader(segment, 0L); } + /// {@return `multiviewGeometryShader` at the given index} + /// @param index the index + public @CType("VkBool32") int multiviewGeometryShaderAt(long index) { return VkPhysicalDeviceMultiviewFeatures.get_multiviewGeometryShader(this.segment(), index); } + /// {@return `multiviewGeometryShader`} + public @CType("VkBool32") int multiviewGeometryShader() { return VkPhysicalDeviceMultiviewFeatures.get_multiviewGeometryShader(this.segment()); } + /// Sets `multiviewGeometryShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiviewGeometryShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiviewGeometryShader.set(segment, 0L, index, value); } + /// Sets `multiviewGeometryShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiviewGeometryShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewFeatures.set_multiviewGeometryShader(segment, 0L, value); } + /// Sets `multiviewGeometryShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewFeatures multiviewGeometryShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewFeatures.set_multiviewGeometryShader(this.segment(), index, value); return this; } + /// Sets `multiviewGeometryShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewFeatures multiviewGeometryShader(@CType("VkBool32") int value) { VkPhysicalDeviceMultiviewFeatures.set_multiviewGeometryShader(this.segment(), value); return this; } + + /// {@return `multiviewTessellationShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiviewTessellationShader(MemorySegment segment, long index) { return (int) VH_multiviewTessellationShader.get(segment, 0L, index); } + /// {@return `multiviewTessellationShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiviewTessellationShader(MemorySegment segment) { return VkPhysicalDeviceMultiviewFeatures.get_multiviewTessellationShader(segment, 0L); } + /// {@return `multiviewTessellationShader` at the given index} + /// @param index the index + public @CType("VkBool32") int multiviewTessellationShaderAt(long index) { return VkPhysicalDeviceMultiviewFeatures.get_multiviewTessellationShader(this.segment(), index); } + /// {@return `multiviewTessellationShader`} + public @CType("VkBool32") int multiviewTessellationShader() { return VkPhysicalDeviceMultiviewFeatures.get_multiviewTessellationShader(this.segment()); } + /// Sets `multiviewTessellationShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiviewTessellationShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiviewTessellationShader.set(segment, 0L, index, value); } + /// Sets `multiviewTessellationShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiviewTessellationShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewFeatures.set_multiviewTessellationShader(segment, 0L, value); } + /// Sets `multiviewTessellationShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewFeatures multiviewTessellationShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceMultiviewFeatures.set_multiviewTessellationShader(this.segment(), index, value); return this; } + /// Sets `multiviewTessellationShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewFeatures multiviewTessellationShader(@CType("VkBool32") int value) { VkPhysicalDeviceMultiviewFeatures.set_multiviewTessellationShader(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMultiviewProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMultiviewProperties.java new file mode 100644 index 00000000..5b677156 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceMultiviewProperties.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxMultiviewViewCount +/// [VarHandle][#VH_maxMultiviewViewCount] - [Getter][#maxMultiviewViewCount()] - [Setter][#maxMultiviewViewCount(int)] +/// ### maxMultiviewInstanceIndex +/// [VarHandle][#VH_maxMultiviewInstanceIndex] - [Getter][#maxMultiviewInstanceIndex()] - [Setter][#maxMultiviewInstanceIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceMultiviewProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxMultiviewViewCount; +/// uint32_t maxMultiviewInstanceIndex; +/// } VkPhysicalDeviceMultiviewProperties; +/// ``` +public final class VkPhysicalDeviceMultiviewProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceMultiviewProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxMultiviewViewCount"), + ValueLayout.JAVA_INT.withName("maxMultiviewInstanceIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxMultiviewViewCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMultiviewViewCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMultiviewViewCount")); + /// The [VarHandle] of `maxMultiviewInstanceIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMultiviewInstanceIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMultiviewInstanceIndex")); + + /// Creates `VkPhysicalDeviceMultiviewProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceMultiviewProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceMultiviewProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewProperties(segment); } + + /// Creates `VkPhysicalDeviceMultiviewProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceMultiviewProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceMultiviewProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceMultiviewProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceMultiviewProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceMultiviewProperties` + public static VkPhysicalDeviceMultiviewProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceMultiviewProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceMultiviewProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceMultiviewProperties` + public static VkPhysicalDeviceMultiviewProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceMultiviewProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceMultiviewProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceMultiviewProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceMultiviewProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceMultiviewProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceMultiviewProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceMultiviewProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceMultiviewProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceMultiviewProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `maxMultiviewViewCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMultiviewViewCount(MemorySegment segment, long index) { return (int) VH_maxMultiviewViewCount.get(segment, 0L, index); } + /// {@return `maxMultiviewViewCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMultiviewViewCount(MemorySegment segment) { return VkPhysicalDeviceMultiviewProperties.get_maxMultiviewViewCount(segment, 0L); } + /// {@return `maxMultiviewViewCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMultiviewViewCountAt(long index) { return VkPhysicalDeviceMultiviewProperties.get_maxMultiviewViewCount(this.segment(), index); } + /// {@return `maxMultiviewViewCount`} + public @CType("uint32_t") int maxMultiviewViewCount() { return VkPhysicalDeviceMultiviewProperties.get_maxMultiviewViewCount(this.segment()); } + /// Sets `maxMultiviewViewCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMultiviewViewCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMultiviewViewCount.set(segment, 0L, index, value); } + /// Sets `maxMultiviewViewCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMultiviewViewCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMultiviewProperties.set_maxMultiviewViewCount(segment, 0L, value); } + /// Sets `maxMultiviewViewCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewProperties maxMultiviewViewCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMultiviewProperties.set_maxMultiviewViewCount(this.segment(), index, value); return this; } + /// Sets `maxMultiviewViewCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewProperties maxMultiviewViewCount(@CType("uint32_t") int value) { VkPhysicalDeviceMultiviewProperties.set_maxMultiviewViewCount(this.segment(), value); return this; } + + /// {@return `maxMultiviewInstanceIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMultiviewInstanceIndex(MemorySegment segment, long index) { return (int) VH_maxMultiviewInstanceIndex.get(segment, 0L, index); } + /// {@return `maxMultiviewInstanceIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMultiviewInstanceIndex(MemorySegment segment) { return VkPhysicalDeviceMultiviewProperties.get_maxMultiviewInstanceIndex(segment, 0L); } + /// {@return `maxMultiviewInstanceIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMultiviewInstanceIndexAt(long index) { return VkPhysicalDeviceMultiviewProperties.get_maxMultiviewInstanceIndex(this.segment(), index); } + /// {@return `maxMultiviewInstanceIndex`} + public @CType("uint32_t") int maxMultiviewInstanceIndex() { return VkPhysicalDeviceMultiviewProperties.get_maxMultiviewInstanceIndex(this.segment()); } + /// Sets `maxMultiviewInstanceIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMultiviewInstanceIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMultiviewInstanceIndex.set(segment, 0L, index, value); } + /// Sets `maxMultiviewInstanceIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMultiviewInstanceIndex(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceMultiviewProperties.set_maxMultiviewInstanceIndex(segment, 0L, value); } + /// Sets `maxMultiviewInstanceIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewProperties maxMultiviewInstanceIndexAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceMultiviewProperties.set_maxMultiviewInstanceIndex(this.segment(), index, value); return this; } + /// Sets `maxMultiviewInstanceIndex` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceMultiviewProperties maxMultiviewInstanceIndex(@CType("uint32_t") int value) { VkPhysicalDeviceMultiviewProperties.set_maxMultiviewInstanceIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineCreationCacheControlFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineCreationCacheControlFeatures.java new file mode 100644 index 00000000..28456f54 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineCreationCacheControlFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineCreationCacheControl +/// [VarHandle][#VH_pipelineCreationCacheControl] - [Getter][#pipelineCreationCacheControl()] - [Setter][#pipelineCreationCacheControl(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePipelineCreationCacheControlFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 pipelineCreationCacheControl; +/// } VkPhysicalDevicePipelineCreationCacheControlFeatures; +/// ``` +public final class VkPhysicalDevicePipelineCreationCacheControlFeatures extends Struct { + /// The struct layout of `VkPhysicalDevicePipelineCreationCacheControlFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineCreationCacheControl") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineCreationCacheControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineCreationCacheControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineCreationCacheControl")); + + /// Creates `VkPhysicalDevicePipelineCreationCacheControlFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePipelineCreationCacheControlFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePipelineCreationCacheControlFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineCreationCacheControlFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineCreationCacheControlFeatures(segment); } + + /// Creates `VkPhysicalDevicePipelineCreationCacheControlFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineCreationCacheControlFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineCreationCacheControlFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePipelineCreationCacheControlFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineCreationCacheControlFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineCreationCacheControlFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePipelineCreationCacheControlFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePipelineCreationCacheControlFeatures` + public static VkPhysicalDevicePipelineCreationCacheControlFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePipelineCreationCacheControlFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePipelineCreationCacheControlFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePipelineCreationCacheControlFeatures` + public static VkPhysicalDevicePipelineCreationCacheControlFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePipelineCreationCacheControlFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePipelineCreationCacheControlFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePipelineCreationCacheControlFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePipelineCreationCacheControlFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineCreationCacheControlFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineCreationCacheControlFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineCreationCacheControlFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineCreationCacheControlFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDevicePipelineCreationCacheControlFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePipelineCreationCacheControlFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePipelineCreationCacheControlFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePipelineCreationCacheControlFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineCreationCacheControlFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineCreationCacheControlFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineCreationCacheControlFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineCreationCacheControlFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineCreationCacheControlFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineCreationCacheControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineCreationCacheControl(MemorySegment segment, long index) { return (int) VH_pipelineCreationCacheControl.get(segment, 0L, index); } + /// {@return `pipelineCreationCacheControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineCreationCacheControl(MemorySegment segment) { return VkPhysicalDevicePipelineCreationCacheControlFeatures.get_pipelineCreationCacheControl(segment, 0L); } + /// {@return `pipelineCreationCacheControl` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineCreationCacheControlAt(long index) { return VkPhysicalDevicePipelineCreationCacheControlFeatures.get_pipelineCreationCacheControl(this.segment(), index); } + /// {@return `pipelineCreationCacheControl`} + public @CType("VkBool32") int pipelineCreationCacheControl() { return VkPhysicalDevicePipelineCreationCacheControlFeatures.get_pipelineCreationCacheControl(this.segment()); } + /// Sets `pipelineCreationCacheControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineCreationCacheControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineCreationCacheControl.set(segment, 0L, index, value); } + /// Sets `pipelineCreationCacheControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineCreationCacheControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineCreationCacheControlFeatures.set_pipelineCreationCacheControl(segment, 0L, value); } + /// Sets `pipelineCreationCacheControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineCreationCacheControlFeatures pipelineCreationCacheControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineCreationCacheControlFeatures.set_pipelineCreationCacheControl(this.segment(), index, value); return this; } + /// Sets `pipelineCreationCacheControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineCreationCacheControlFeatures pipelineCreationCacheControl(@CType("VkBool32") int value) { VkPhysicalDevicePipelineCreationCacheControlFeatures.set_pipelineCreationCacheControl(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineProtectedAccessFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineProtectedAccessFeatures.java new file mode 100644 index 00000000..60c40348 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineProtectedAccessFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineProtectedAccess +/// [VarHandle][#VH_pipelineProtectedAccess] - [Getter][#pipelineProtectedAccess()] - [Setter][#pipelineProtectedAccess(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePipelineProtectedAccessFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 pipelineProtectedAccess; +/// } VkPhysicalDevicePipelineProtectedAccessFeatures; +/// ``` +public final class VkPhysicalDevicePipelineProtectedAccessFeatures extends Struct { + /// The struct layout of `VkPhysicalDevicePipelineProtectedAccessFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineProtectedAccess") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineProtectedAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineProtectedAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineProtectedAccess")); + + /// Creates `VkPhysicalDevicePipelineProtectedAccessFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePipelineProtectedAccessFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePipelineProtectedAccessFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineProtectedAccessFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineProtectedAccessFeatures(segment); } + + /// Creates `VkPhysicalDevicePipelineProtectedAccessFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineProtectedAccessFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineProtectedAccessFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePipelineProtectedAccessFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineProtectedAccessFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineProtectedAccessFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePipelineProtectedAccessFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePipelineProtectedAccessFeatures` + public static VkPhysicalDevicePipelineProtectedAccessFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePipelineProtectedAccessFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePipelineProtectedAccessFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePipelineProtectedAccessFeatures` + public static VkPhysicalDevicePipelineProtectedAccessFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePipelineProtectedAccessFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePipelineProtectedAccessFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePipelineProtectedAccessFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePipelineProtectedAccessFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineProtectedAccessFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineProtectedAccessFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineProtectedAccessFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineProtectedAccessFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDevicePipelineProtectedAccessFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePipelineProtectedAccessFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePipelineProtectedAccessFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePipelineProtectedAccessFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineProtectedAccessFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineProtectedAccessFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineProtectedAccessFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineProtectedAccessFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineProtectedAccessFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineProtectedAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineProtectedAccess(MemorySegment segment, long index) { return (int) VH_pipelineProtectedAccess.get(segment, 0L, index); } + /// {@return `pipelineProtectedAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineProtectedAccess(MemorySegment segment) { return VkPhysicalDevicePipelineProtectedAccessFeatures.get_pipelineProtectedAccess(segment, 0L); } + /// {@return `pipelineProtectedAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineProtectedAccessAt(long index) { return VkPhysicalDevicePipelineProtectedAccessFeatures.get_pipelineProtectedAccess(this.segment(), index); } + /// {@return `pipelineProtectedAccess`} + public @CType("VkBool32") int pipelineProtectedAccess() { return VkPhysicalDevicePipelineProtectedAccessFeatures.get_pipelineProtectedAccess(this.segment()); } + /// Sets `pipelineProtectedAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineProtectedAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineProtectedAccess.set(segment, 0L, index, value); } + /// Sets `pipelineProtectedAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineProtectedAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineProtectedAccessFeatures.set_pipelineProtectedAccess(segment, 0L, value); } + /// Sets `pipelineProtectedAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineProtectedAccessFeatures pipelineProtectedAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineProtectedAccessFeatures.set_pipelineProtectedAccess(this.segment(), index, value); return this; } + /// Sets `pipelineProtectedAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineProtectedAccessFeatures pipelineProtectedAccess(@CType("VkBool32") int value) { VkPhysicalDevicePipelineProtectedAccessFeatures.set_pipelineProtectedAccess(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineRobustnessFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineRobustnessFeatures.java new file mode 100644 index 00000000..c98fdf89 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineRobustnessFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineRobustness +/// [VarHandle][#VH_pipelineRobustness] - [Getter][#pipelineRobustness()] - [Setter][#pipelineRobustness(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePipelineRobustnessFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 pipelineRobustness; +/// } VkPhysicalDevicePipelineRobustnessFeatures; +/// ``` +public final class VkPhysicalDevicePipelineRobustnessFeatures extends Struct { + /// The struct layout of `VkPhysicalDevicePipelineRobustnessFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pipelineRobustness") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pipelineRobustness` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineRobustness = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineRobustness")); + + /// Creates `VkPhysicalDevicePipelineRobustnessFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePipelineRobustnessFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePipelineRobustnessFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineRobustnessFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineRobustnessFeatures(segment); } + + /// Creates `VkPhysicalDevicePipelineRobustnessFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineRobustnessFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineRobustnessFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePipelineRobustnessFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineRobustnessFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineRobustnessFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePipelineRobustnessFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePipelineRobustnessFeatures` + public static VkPhysicalDevicePipelineRobustnessFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePipelineRobustnessFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePipelineRobustnessFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePipelineRobustnessFeatures` + public static VkPhysicalDevicePipelineRobustnessFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePipelineRobustnessFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePipelineRobustnessFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePipelineRobustnessFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePipelineRobustnessFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineRobustnessFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineRobustnessFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDevicePipelineRobustnessFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePipelineRobustnessFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePipelineRobustnessFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePipelineRobustnessFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineRobustnessFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineRobustnessFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineRobustnessFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineRobustness` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineRobustness(MemorySegment segment, long index) { return (int) VH_pipelineRobustness.get(segment, 0L, index); } + /// {@return `pipelineRobustness`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineRobustness(MemorySegment segment) { return VkPhysicalDevicePipelineRobustnessFeatures.get_pipelineRobustness(segment, 0L); } + /// {@return `pipelineRobustness` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineRobustnessAt(long index) { return VkPhysicalDevicePipelineRobustnessFeatures.get_pipelineRobustness(this.segment(), index); } + /// {@return `pipelineRobustness`} + public @CType("VkBool32") int pipelineRobustness() { return VkPhysicalDevicePipelineRobustnessFeatures.get_pipelineRobustness(this.segment()); } + /// Sets `pipelineRobustness` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineRobustness(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineRobustness.set(segment, 0L, index, value); } + /// Sets `pipelineRobustness` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineRobustness(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePipelineRobustnessFeatures.set_pipelineRobustness(segment, 0L, value); } + /// Sets `pipelineRobustness` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessFeatures pipelineRobustnessAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePipelineRobustnessFeatures.set_pipelineRobustness(this.segment(), index, value); return this; } + /// Sets `pipelineRobustness` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessFeatures pipelineRobustness(@CType("VkBool32") int value) { VkPhysicalDevicePipelineRobustnessFeatures.set_pipelineRobustness(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineRobustnessProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineRobustnessProperties.java new file mode 100644 index 00000000..da664e6b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePipelineRobustnessProperties.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### defaultRobustnessStorageBuffers +/// [VarHandle][#VH_defaultRobustnessStorageBuffers] - [Getter][#defaultRobustnessStorageBuffers()] - [Setter][#defaultRobustnessStorageBuffers(int)] +/// ### defaultRobustnessUniformBuffers +/// [VarHandle][#VH_defaultRobustnessUniformBuffers] - [Getter][#defaultRobustnessUniformBuffers()] - [Setter][#defaultRobustnessUniformBuffers(int)] +/// ### defaultRobustnessVertexInputs +/// [VarHandle][#VH_defaultRobustnessVertexInputs] - [Getter][#defaultRobustnessVertexInputs()] - [Setter][#defaultRobustnessVertexInputs(int)] +/// ### defaultRobustnessImages +/// [VarHandle][#VH_defaultRobustnessImages] - [Getter][#defaultRobustnessImages()] - [Setter][#defaultRobustnessImages(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePipelineRobustnessProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkPipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers; +/// VkPipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers; +/// VkPipelineRobustnessBufferBehavior defaultRobustnessVertexInputs; +/// VkPipelineRobustnessImageBehavior defaultRobustnessImages; +/// } VkPhysicalDevicePipelineRobustnessProperties; +/// ``` +public final class VkPhysicalDevicePipelineRobustnessProperties extends Struct { + /// The struct layout of `VkPhysicalDevicePipelineRobustnessProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("defaultRobustnessStorageBuffers"), + ValueLayout.JAVA_INT.withName("defaultRobustnessUniformBuffers"), + ValueLayout.JAVA_INT.withName("defaultRobustnessVertexInputs"), + ValueLayout.JAVA_INT.withName("defaultRobustnessImages") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `defaultRobustnessStorageBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_defaultRobustnessStorageBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("defaultRobustnessStorageBuffers")); + /// The [VarHandle] of `defaultRobustnessUniformBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_defaultRobustnessUniformBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("defaultRobustnessUniformBuffers")); + /// The [VarHandle] of `defaultRobustnessVertexInputs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_defaultRobustnessVertexInputs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("defaultRobustnessVertexInputs")); + /// The [VarHandle] of `defaultRobustnessImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_defaultRobustnessImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("defaultRobustnessImages")); + + /// Creates `VkPhysicalDevicePipelineRobustnessProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePipelineRobustnessProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePipelineRobustnessProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineRobustnessProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineRobustnessProperties(segment); } + + /// Creates `VkPhysicalDevicePipelineRobustnessProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineRobustnessProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineRobustnessProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePipelineRobustnessProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePipelineRobustnessProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePipelineRobustnessProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePipelineRobustnessProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePipelineRobustnessProperties` + public static VkPhysicalDevicePipelineRobustnessProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePipelineRobustnessProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePipelineRobustnessProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePipelineRobustnessProperties` + public static VkPhysicalDevicePipelineRobustnessProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePipelineRobustnessProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePipelineRobustnessProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePipelineRobustnessProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePipelineRobustnessProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties sType(@CType("VkStructureType") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePipelineRobustnessProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePipelineRobustnessProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePipelineRobustnessProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineRobustnessProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineRobustnessProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePipelineRobustnessProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `defaultRobustnessStorageBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessStorageBuffers(MemorySegment segment, long index) { return (int) VH_defaultRobustnessStorageBuffers.get(segment, 0L, index); } + /// {@return `defaultRobustnessStorageBuffers`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessStorageBuffers(MemorySegment segment) { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessStorageBuffers(segment, 0L); } + /// {@return `defaultRobustnessStorageBuffers` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessStorageBuffersAt(long index) { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessStorageBuffers(this.segment(), index); } + /// {@return `defaultRobustnessStorageBuffers`} + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessStorageBuffers() { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessStorageBuffers(this.segment()); } + /// Sets `defaultRobustnessStorageBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_defaultRobustnessStorageBuffers(MemorySegment segment, long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VH_defaultRobustnessStorageBuffers.set(segment, 0L, index, value); } + /// Sets `defaultRobustnessStorageBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_defaultRobustnessStorageBuffers(MemorySegment segment, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessStorageBuffers(segment, 0L, value); } + /// Sets `defaultRobustnessStorageBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties defaultRobustnessStorageBuffersAt(long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessStorageBuffers(this.segment(), index, value); return this; } + /// Sets `defaultRobustnessStorageBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties defaultRobustnessStorageBuffers(@CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessStorageBuffers(this.segment(), value); return this; } + + /// {@return `defaultRobustnessUniformBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessUniformBuffers(MemorySegment segment, long index) { return (int) VH_defaultRobustnessUniformBuffers.get(segment, 0L, index); } + /// {@return `defaultRobustnessUniformBuffers`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessUniformBuffers(MemorySegment segment) { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessUniformBuffers(segment, 0L); } + /// {@return `defaultRobustnessUniformBuffers` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessUniformBuffersAt(long index) { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessUniformBuffers(this.segment(), index); } + /// {@return `defaultRobustnessUniformBuffers`} + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessUniformBuffers() { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessUniformBuffers(this.segment()); } + /// Sets `defaultRobustnessUniformBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_defaultRobustnessUniformBuffers(MemorySegment segment, long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VH_defaultRobustnessUniformBuffers.set(segment, 0L, index, value); } + /// Sets `defaultRobustnessUniformBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_defaultRobustnessUniformBuffers(MemorySegment segment, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessUniformBuffers(segment, 0L, value); } + /// Sets `defaultRobustnessUniformBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties defaultRobustnessUniformBuffersAt(long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessUniformBuffers(this.segment(), index, value); return this; } + /// Sets `defaultRobustnessUniformBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties defaultRobustnessUniformBuffers(@CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessUniformBuffers(this.segment(), value); return this; } + + /// {@return `defaultRobustnessVertexInputs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessVertexInputs(MemorySegment segment, long index) { return (int) VH_defaultRobustnessVertexInputs.get(segment, 0L, index); } + /// {@return `defaultRobustnessVertexInputs`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessVertexInputs(MemorySegment segment) { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessVertexInputs(segment, 0L); } + /// {@return `defaultRobustnessVertexInputs` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessVertexInputsAt(long index) { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessVertexInputs(this.segment(), index); } + /// {@return `defaultRobustnessVertexInputs`} + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessVertexInputs() { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessVertexInputs(this.segment()); } + /// Sets `defaultRobustnessVertexInputs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_defaultRobustnessVertexInputs(MemorySegment segment, long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VH_defaultRobustnessVertexInputs.set(segment, 0L, index, value); } + /// Sets `defaultRobustnessVertexInputs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_defaultRobustnessVertexInputs(MemorySegment segment, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessVertexInputs(segment, 0L, value); } + /// Sets `defaultRobustnessVertexInputs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties defaultRobustnessVertexInputsAt(long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessVertexInputs(this.segment(), index, value); return this; } + /// Sets `defaultRobustnessVertexInputs` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties defaultRobustnessVertexInputs(@CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessVertexInputs(this.segment(), value); return this; } + + /// {@return `defaultRobustnessImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessImageBehavior") int get_defaultRobustnessImages(MemorySegment segment, long index) { return (int) VH_defaultRobustnessImages.get(segment, 0L, index); } + /// {@return `defaultRobustnessImages`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessImageBehavior") int get_defaultRobustnessImages(MemorySegment segment) { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessImages(segment, 0L); } + /// {@return `defaultRobustnessImages` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessImageBehavior") int defaultRobustnessImagesAt(long index) { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessImages(this.segment(), index); } + /// {@return `defaultRobustnessImages`} + public @CType("VkPipelineRobustnessImageBehavior") int defaultRobustnessImages() { return VkPhysicalDevicePipelineRobustnessProperties.get_defaultRobustnessImages(this.segment()); } + /// Sets `defaultRobustnessImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_defaultRobustnessImages(MemorySegment segment, long index, @CType("VkPipelineRobustnessImageBehavior") int value) { VH_defaultRobustnessImages.set(segment, 0L, index, value); } + /// Sets `defaultRobustnessImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_defaultRobustnessImages(MemorySegment segment, @CType("VkPipelineRobustnessImageBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessImages(segment, 0L, value); } + /// Sets `defaultRobustnessImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties defaultRobustnessImagesAt(long index, @CType("VkPipelineRobustnessImageBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessImages(this.segment(), index, value); return this; } + /// Sets `defaultRobustnessImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePipelineRobustnessProperties defaultRobustnessImages(@CType("VkPipelineRobustnessImageBehavior") int value) { VkPhysicalDevicePipelineRobustnessProperties.set_defaultRobustnessImages(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePointClippingProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePointClippingProperties.java new file mode 100644 index 00000000..7bc7cefa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePointClippingProperties.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pointClippingBehavior +/// [VarHandle][#VH_pointClippingBehavior] - [Getter][#pointClippingBehavior()] - [Setter][#pointClippingBehavior(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePointClippingProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkPointClippingBehavior pointClippingBehavior; +/// } VkPhysicalDevicePointClippingProperties; +/// ``` +public final class VkPhysicalDevicePointClippingProperties extends Struct { + /// The struct layout of `VkPhysicalDevicePointClippingProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("pointClippingBehavior") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pointClippingBehavior` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pointClippingBehavior = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pointClippingBehavior")); + + /// Creates `VkPhysicalDevicePointClippingProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePointClippingProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePointClippingProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePointClippingProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePointClippingProperties(segment); } + + /// Creates `VkPhysicalDevicePointClippingProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePointClippingProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePointClippingProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePointClippingProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePointClippingProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePointClippingProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePointClippingProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePointClippingProperties` + public static VkPhysicalDevicePointClippingProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePointClippingProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePointClippingProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePointClippingProperties` + public static VkPhysicalDevicePointClippingProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePointClippingProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePointClippingProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePointClippingProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePointClippingProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePointClippingProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePointClippingProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePointClippingProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePointClippingProperties sType(@CType("VkStructureType") int value) { VkPhysicalDevicePointClippingProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePointClippingProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePointClippingProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePointClippingProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePointClippingProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePointClippingProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePointClippingProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePointClippingProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePointClippingProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `pointClippingBehavior` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPointClippingBehavior") int get_pointClippingBehavior(MemorySegment segment, long index) { return (int) VH_pointClippingBehavior.get(segment, 0L, index); } + /// {@return `pointClippingBehavior`} + /// @param segment the segment of the struct + public static @CType("VkPointClippingBehavior") int get_pointClippingBehavior(MemorySegment segment) { return VkPhysicalDevicePointClippingProperties.get_pointClippingBehavior(segment, 0L); } + /// {@return `pointClippingBehavior` at the given index} + /// @param index the index + public @CType("VkPointClippingBehavior") int pointClippingBehaviorAt(long index) { return VkPhysicalDevicePointClippingProperties.get_pointClippingBehavior(this.segment(), index); } + /// {@return `pointClippingBehavior`} + public @CType("VkPointClippingBehavior") int pointClippingBehavior() { return VkPhysicalDevicePointClippingProperties.get_pointClippingBehavior(this.segment()); } + /// Sets `pointClippingBehavior` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pointClippingBehavior(MemorySegment segment, long index, @CType("VkPointClippingBehavior") int value) { VH_pointClippingBehavior.set(segment, 0L, index, value); } + /// Sets `pointClippingBehavior` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pointClippingBehavior(MemorySegment segment, @CType("VkPointClippingBehavior") int value) { VkPhysicalDevicePointClippingProperties.set_pointClippingBehavior(segment, 0L, value); } + /// Sets `pointClippingBehavior` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePointClippingProperties pointClippingBehaviorAt(long index, @CType("VkPointClippingBehavior") int value) { VkPhysicalDevicePointClippingProperties.set_pointClippingBehavior(this.segment(), index, value); return this; } + /// Sets `pointClippingBehavior` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePointClippingProperties pointClippingBehavior(@CType("VkPointClippingBehavior") int value) { VkPhysicalDevicePointClippingProperties.set_pointClippingBehavior(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePrivateDataFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePrivateDataFeatures.java new file mode 100644 index 00000000..23973f5e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePrivateDataFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### privateData +/// [VarHandle][#VH_privateData] - [Getter][#privateData()] - [Setter][#privateData(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePrivateDataFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 privateData; +/// } VkPhysicalDevicePrivateDataFeatures; +/// ``` +public final class VkPhysicalDevicePrivateDataFeatures extends Struct { + /// The struct layout of `VkPhysicalDevicePrivateDataFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("privateData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `privateData` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_privateData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("privateData")); + + /// Creates `VkPhysicalDevicePrivateDataFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePrivateDataFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePrivateDataFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePrivateDataFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePrivateDataFeatures(segment); } + + /// Creates `VkPhysicalDevicePrivateDataFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePrivateDataFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePrivateDataFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePrivateDataFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePrivateDataFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePrivateDataFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePrivateDataFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePrivateDataFeatures` + public static VkPhysicalDevicePrivateDataFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePrivateDataFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePrivateDataFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePrivateDataFeatures` + public static VkPhysicalDevicePrivateDataFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePrivateDataFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePrivateDataFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePrivateDataFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePrivateDataFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePrivateDataFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrivateDataFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePrivateDataFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrivateDataFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDevicePrivateDataFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePrivateDataFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePrivateDataFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePrivateDataFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePrivateDataFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrivateDataFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePrivateDataFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrivateDataFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePrivateDataFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `privateData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_privateData(MemorySegment segment, long index) { return (int) VH_privateData.get(segment, 0L, index); } + /// {@return `privateData`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_privateData(MemorySegment segment) { return VkPhysicalDevicePrivateDataFeatures.get_privateData(segment, 0L); } + /// {@return `privateData` at the given index} + /// @param index the index + public @CType("VkBool32") int privateDataAt(long index) { return VkPhysicalDevicePrivateDataFeatures.get_privateData(this.segment(), index); } + /// {@return `privateData`} + public @CType("VkBool32") int privateData() { return VkPhysicalDevicePrivateDataFeatures.get_privateData(this.segment()); } + /// Sets `privateData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_privateData(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_privateData.set(segment, 0L, index, value); } + /// Sets `privateData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_privateData(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDevicePrivateDataFeatures.set_privateData(segment, 0L, value); } + /// Sets `privateData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrivateDataFeatures privateDataAt(long index, @CType("VkBool32") int value) { VkPhysicalDevicePrivateDataFeatures.set_privateData(this.segment(), index, value); return this; } + /// Sets `privateData` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePrivateDataFeatures privateData(@CType("VkBool32") int value) { VkPhysicalDevicePrivateDataFeatures.set_privateData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProperties.java new file mode 100644 index 00000000..c843da66 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProperties.java @@ -0,0 +1,445 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### apiVersion +/// [VarHandle][#VH_apiVersion] - [Getter][#apiVersion()] - [Setter][#apiVersion(int)] +/// ### driverVersion +/// [VarHandle][#VH_driverVersion] - [Getter][#driverVersion()] - [Setter][#driverVersion(int)] +/// ### vendorID +/// [VarHandle][#VH_vendorID] - [Getter][#vendorID()] - [Setter][#vendorID(int)] +/// ### deviceID +/// [VarHandle][#VH_deviceID] - [Getter][#deviceID()] - [Setter][#deviceID(int)] +/// ### deviceType +/// [VarHandle][#VH_deviceType] - [Getter][#deviceType()] - [Setter][#deviceType(int)] +/// ### deviceName +/// [Byte offset handle][#MH_deviceName] - [Memory layout][#ML_deviceName] - [Getter][#deviceName(long)] - [Setter][#deviceName(long, java.lang.foreign.MemorySegment)] +/// ### pipelineCacheUUID +/// [Byte offset handle][#MH_pipelineCacheUUID] - [Memory layout][#ML_pipelineCacheUUID] - [Getter][#pipelineCacheUUID(long)] - [Setter][#pipelineCacheUUID(long, java.lang.foreign.MemorySegment)] +/// ### limits +/// [Byte offset][#OFFSET_limits] - [Memory layout][#ML_limits] - [Getter][#limits()] - [Setter][#limits(java.lang.foreign.MemorySegment)] +/// ### sparseProperties +/// [Byte offset][#OFFSET_sparseProperties] - [Memory layout][#ML_sparseProperties] - [Getter][#sparseProperties()] - [Setter][#sparseProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceProperties { +/// uint32_t apiVersion; +/// uint32_t driverVersion; +/// uint32_t vendorID; +/// uint32_t deviceID; +/// VkPhysicalDeviceType deviceType; +/// char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName; +/// uint8_t[VK_UUID_SIZE] pipelineCacheUUID; +/// VkPhysicalDeviceLimits limits; +/// VkPhysicalDeviceSparseProperties sparseProperties; +/// } VkPhysicalDeviceProperties; +/// ``` +public final class VkPhysicalDeviceProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("apiVersion"), + ValueLayout.JAVA_INT.withName("driverVersion"), + ValueLayout.JAVA_INT.withName("vendorID"), + ValueLayout.JAVA_INT.withName("deviceID"), + ValueLayout.JAVA_INT.withName("deviceType"), + MemoryLayout.sequenceLayout(VK_MAX_PHYSICAL_DEVICE_NAME_SIZE, ValueLayout.JAVA_BYTE).withName("deviceName"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("pipelineCacheUUID"), + overrungl.vulkan.struct.VkPhysicalDeviceLimits.LAYOUT.withName("limits"), + overrungl.vulkan.struct.VkPhysicalDeviceSparseProperties.LAYOUT.withName("sparseProperties") + ); + /// The [VarHandle] of `apiVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_apiVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("apiVersion")); + /// The [VarHandle] of `driverVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_driverVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("driverVersion")); + /// The [VarHandle] of `vendorID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vendorID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vendorID")); + /// The [VarHandle] of `deviceID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceID")); + /// The [VarHandle] of `deviceType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceType")); + /// The byte offset handle of `deviceName` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_deviceName = LAYOUT.byteOffsetHandle(PathElement.groupElement("deviceName"), PathElement.sequenceElement()); + /// The memory layout of `deviceName`. + public static final MemoryLayout ML_deviceName = LAYOUT.select(PathElement.groupElement("deviceName")); + /// The byte offset handle of `pipelineCacheUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_pipelineCacheUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("pipelineCacheUUID"), PathElement.sequenceElement()); + /// The memory layout of `pipelineCacheUUID`. + public static final MemoryLayout ML_pipelineCacheUUID = LAYOUT.select(PathElement.groupElement("pipelineCacheUUID")); + /// The byte offset of `limits`. + public static final long OFFSET_limits = LAYOUT.byteOffset(PathElement.groupElement("limits")); + /// The memory layout of `limits`. + public static final MemoryLayout ML_limits = LAYOUT.select(PathElement.groupElement("limits")); + /// The byte offset of `sparseProperties`. + public static final long OFFSET_sparseProperties = LAYOUT.byteOffset(PathElement.groupElement("sparseProperties")); + /// The memory layout of `sparseProperties`. + public static final MemoryLayout ML_sparseProperties = LAYOUT.select(PathElement.groupElement("sparseProperties")); + + /// Creates `VkPhysicalDeviceProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProperties(segment); } + + /// Creates `VkPhysicalDeviceProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceProperties` + public static VkPhysicalDeviceProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceProperties` + public static VkPhysicalDeviceProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `apiVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_apiVersion(MemorySegment segment, long index) { return (int) VH_apiVersion.get(segment, 0L, index); } + /// {@return `apiVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_apiVersion(MemorySegment segment) { return VkPhysicalDeviceProperties.get_apiVersion(segment, 0L); } + /// {@return `apiVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int apiVersionAt(long index) { return VkPhysicalDeviceProperties.get_apiVersion(this.segment(), index); } + /// {@return `apiVersion`} + public @CType("uint32_t") int apiVersion() { return VkPhysicalDeviceProperties.get_apiVersion(this.segment()); } + /// Sets `apiVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_apiVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_apiVersion.set(segment, 0L, index, value); } + /// Sets `apiVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_apiVersion(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_apiVersion(segment, 0L, value); } + /// Sets `apiVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties apiVersionAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_apiVersion(this.segment(), index, value); return this; } + /// Sets `apiVersion` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties apiVersion(@CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_apiVersion(this.segment(), value); return this; } + + /// {@return `driverVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_driverVersion(MemorySegment segment, long index) { return (int) VH_driverVersion.get(segment, 0L, index); } + /// {@return `driverVersion`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_driverVersion(MemorySegment segment) { return VkPhysicalDeviceProperties.get_driverVersion(segment, 0L); } + /// {@return `driverVersion` at the given index} + /// @param index the index + public @CType("uint32_t") int driverVersionAt(long index) { return VkPhysicalDeviceProperties.get_driverVersion(this.segment(), index); } + /// {@return `driverVersion`} + public @CType("uint32_t") int driverVersion() { return VkPhysicalDeviceProperties.get_driverVersion(this.segment()); } + /// Sets `driverVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_driverVersion(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_driverVersion.set(segment, 0L, index, value); } + /// Sets `driverVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_driverVersion(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_driverVersion(segment, 0L, value); } + /// Sets `driverVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties driverVersionAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_driverVersion(this.segment(), index, value); return this; } + /// Sets `driverVersion` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties driverVersion(@CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_driverVersion(this.segment(), value); return this; } + + /// {@return `vendorID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vendorID(MemorySegment segment, long index) { return (int) VH_vendorID.get(segment, 0L, index); } + /// {@return `vendorID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vendorID(MemorySegment segment) { return VkPhysicalDeviceProperties.get_vendorID(segment, 0L); } + /// {@return `vendorID` at the given index} + /// @param index the index + public @CType("uint32_t") int vendorIDAt(long index) { return VkPhysicalDeviceProperties.get_vendorID(this.segment(), index); } + /// {@return `vendorID`} + public @CType("uint32_t") int vendorID() { return VkPhysicalDeviceProperties.get_vendorID(this.segment()); } + /// Sets `vendorID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vendorID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vendorID.set(segment, 0L, index, value); } + /// Sets `vendorID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vendorID(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_vendorID(segment, 0L, value); } + /// Sets `vendorID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties vendorIDAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_vendorID(this.segment(), index, value); return this; } + /// Sets `vendorID` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties vendorID(@CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_vendorID(this.segment(), value); return this; } + + /// {@return `deviceID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceID(MemorySegment segment, long index) { return (int) VH_deviceID.get(segment, 0L, index); } + /// {@return `deviceID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceID(MemorySegment segment) { return VkPhysicalDeviceProperties.get_deviceID(segment, 0L); } + /// {@return `deviceID` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceIDAt(long index) { return VkPhysicalDeviceProperties.get_deviceID(this.segment(), index); } + /// {@return `deviceID`} + public @CType("uint32_t") int deviceID() { return VkPhysicalDeviceProperties.get_deviceID(this.segment()); } + /// Sets `deviceID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceID.set(segment, 0L, index, value); } + /// Sets `deviceID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceID(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_deviceID(segment, 0L, value); } + /// Sets `deviceID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties deviceIDAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_deviceID(this.segment(), index, value); return this; } + /// Sets `deviceID` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties deviceID(@CType("uint32_t") int value) { VkPhysicalDeviceProperties.set_deviceID(this.segment(), value); return this; } + + /// {@return `deviceType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPhysicalDeviceType") int get_deviceType(MemorySegment segment, long index) { return (int) VH_deviceType.get(segment, 0L, index); } + /// {@return `deviceType`} + /// @param segment the segment of the struct + public static @CType("VkPhysicalDeviceType") int get_deviceType(MemorySegment segment) { return VkPhysicalDeviceProperties.get_deviceType(segment, 0L); } + /// {@return `deviceType` at the given index} + /// @param index the index + public @CType("VkPhysicalDeviceType") int deviceTypeAt(long index) { return VkPhysicalDeviceProperties.get_deviceType(this.segment(), index); } + /// {@return `deviceType`} + public @CType("VkPhysicalDeviceType") int deviceType() { return VkPhysicalDeviceProperties.get_deviceType(this.segment()); } + /// Sets `deviceType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceType(MemorySegment segment, long index, @CType("VkPhysicalDeviceType") int value) { VH_deviceType.set(segment, 0L, index, value); } + /// Sets `deviceType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceType(MemorySegment segment, @CType("VkPhysicalDeviceType") int value) { VkPhysicalDeviceProperties.set_deviceType(segment, 0L, value); } + /// Sets `deviceType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties deviceTypeAt(long index, @CType("VkPhysicalDeviceType") int value) { VkPhysicalDeviceProperties.set_deviceType(this.segment(), index, value); return this; } + /// Sets `deviceType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties deviceType(@CType("VkPhysicalDeviceType") int value) { VkPhysicalDeviceProperties.set_deviceType(this.segment(), value); return this; } + + /// {@return `deviceName` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment get_deviceName(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_deviceName.invokeExact(0L, elementIndex), index), ML_deviceName); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `deviceName`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment get_deviceName(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceProperties.get_deviceName(segment, 0L, elementIndex); } + /// {@return `deviceName` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment deviceNameAt(long index, long elementIndex) { return VkPhysicalDeviceProperties.get_deviceName(this.segment(), index, elementIndex); } + /// {@return `deviceName`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment deviceName(long elementIndex) { return VkPhysicalDeviceProperties.get_deviceName(this.segment(), elementIndex); } + /// Sets `deviceName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceName(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_deviceName.invokeExact(0L, elementIndex), index), ML_deviceName.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `deviceName` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceName(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_deviceName(segment, 0L, elementIndex, value); } + /// Sets `deviceName` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties deviceNameAt(long index, long elementIndex, @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_deviceName(this.segment(), index, elementIndex, value); return this; } + /// Sets `deviceName` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties deviceName(long elementIndex, @CType("char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_deviceName(this.segment(), elementIndex, value); return this; } + + /// {@return `pipelineCacheUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineCacheUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_pipelineCacheUUID.invokeExact(0L, elementIndex), index), ML_pipelineCacheUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `pipelineCacheUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineCacheUUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceProperties.get_pipelineCacheUUID(segment, 0L, elementIndex); } + /// {@return `pipelineCacheUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineCacheUUIDAt(long index, long elementIndex) { return VkPhysicalDeviceProperties.get_pipelineCacheUUID(this.segment(), index, elementIndex); } + /// {@return `pipelineCacheUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineCacheUUID(long elementIndex) { return VkPhysicalDeviceProperties.get_pipelineCacheUUID(this.segment(), elementIndex); } + /// Sets `pipelineCacheUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineCacheUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_pipelineCacheUUID.invokeExact(0L, elementIndex), index), ML_pipelineCacheUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `pipelineCacheUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineCacheUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_pipelineCacheUUID(segment, 0L, elementIndex, value); } + /// Sets `pipelineCacheUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties pipelineCacheUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_pipelineCacheUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `pipelineCacheUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties pipelineCacheUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_pipelineCacheUUID(this.segment(), elementIndex, value); return this; } + + /// {@return `limits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPhysicalDeviceLimits") java.lang.foreign.MemorySegment get_limits(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_limits, index), ML_limits); } + /// {@return `limits`} + /// @param segment the segment of the struct + public static @CType("VkPhysicalDeviceLimits") java.lang.foreign.MemorySegment get_limits(MemorySegment segment) { return VkPhysicalDeviceProperties.get_limits(segment, 0L); } + /// {@return `limits` at the given index} + /// @param index the index + public @CType("VkPhysicalDeviceLimits") java.lang.foreign.MemorySegment limitsAt(long index) { return VkPhysicalDeviceProperties.get_limits(this.segment(), index); } + /// {@return `limits`} + public @CType("VkPhysicalDeviceLimits") java.lang.foreign.MemorySegment limits() { return VkPhysicalDeviceProperties.get_limits(this.segment()); } + /// Sets `limits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_limits(MemorySegment segment, long index, @CType("VkPhysicalDeviceLimits") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_limits, index), ML_limits.byteSize()); } + /// Sets `limits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_limits(MemorySegment segment, @CType("VkPhysicalDeviceLimits") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_limits(segment, 0L, value); } + /// Sets `limits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties limitsAt(long index, @CType("VkPhysicalDeviceLimits") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_limits(this.segment(), index, value); return this; } + /// Sets `limits` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties limits(@CType("VkPhysicalDeviceLimits") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_limits(this.segment(), value); return this; } + + /// {@return `sparseProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPhysicalDeviceSparseProperties") java.lang.foreign.MemorySegment get_sparseProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_sparseProperties, index), ML_sparseProperties); } + /// {@return `sparseProperties`} + /// @param segment the segment of the struct + public static @CType("VkPhysicalDeviceSparseProperties") java.lang.foreign.MemorySegment get_sparseProperties(MemorySegment segment) { return VkPhysicalDeviceProperties.get_sparseProperties(segment, 0L); } + /// {@return `sparseProperties` at the given index} + /// @param index the index + public @CType("VkPhysicalDeviceSparseProperties") java.lang.foreign.MemorySegment sparsePropertiesAt(long index) { return VkPhysicalDeviceProperties.get_sparseProperties(this.segment(), index); } + /// {@return `sparseProperties`} + public @CType("VkPhysicalDeviceSparseProperties") java.lang.foreign.MemorySegment sparseProperties() { return VkPhysicalDeviceProperties.get_sparseProperties(this.segment()); } + /// Sets `sparseProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sparseProperties(MemorySegment segment, long index, @CType("VkPhysicalDeviceSparseProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_sparseProperties, index), ML_sparseProperties.byteSize()); } + /// Sets `sparseProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sparseProperties(MemorySegment segment, @CType("VkPhysicalDeviceSparseProperties") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_sparseProperties(segment, 0L, value); } + /// Sets `sparseProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties sparsePropertiesAt(long index, @CType("VkPhysicalDeviceSparseProperties") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_sparseProperties(this.segment(), index, value); return this; } + /// Sets `sparseProperties` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties sparseProperties(@CType("VkPhysicalDeviceSparseProperties") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties.set_sparseProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProperties2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProperties2.java new file mode 100644 index 00000000..1b2b3500 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProperties2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### properties +/// [Byte offset][#OFFSET_properties] - [Memory layout][#ML_properties] - [Getter][#properties()] - [Setter][#properties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceProperties2 { +/// VkStructureType sType; +/// void * pNext; +/// VkPhysicalDeviceProperties properties; +/// } VkPhysicalDeviceProperties2; +/// ``` +public final class VkPhysicalDeviceProperties2 extends Struct { + /// The struct layout of `VkPhysicalDeviceProperties2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkPhysicalDeviceProperties.LAYOUT.withName("properties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `properties`. + public static final long OFFSET_properties = LAYOUT.byteOffset(PathElement.groupElement("properties")); + /// The memory layout of `properties`. + public static final MemoryLayout ML_properties = LAYOUT.select(PathElement.groupElement("properties")); + + /// Creates `VkPhysicalDeviceProperties2` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceProperties2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceProperties2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProperties2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProperties2(segment); } + + /// Creates `VkPhysicalDeviceProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProperties2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProperties2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceProperties2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceProperties2` + public static VkPhysicalDeviceProperties2 alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceProperties2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceProperties2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceProperties2` + public static VkPhysicalDeviceProperties2 alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceProperties2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceProperties2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceProperties2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceProperties2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceProperties2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties2 sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceProperties2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties2 sType(@CType("VkStructureType") int value) { VkPhysicalDeviceProperties2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceProperties2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceProperties2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceProperties2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties2.set_pNext(this.segment(), value); return this; } + + /// {@return `properties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPhysicalDeviceProperties") java.lang.foreign.MemorySegment get_properties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_properties, index), ML_properties); } + /// {@return `properties`} + /// @param segment the segment of the struct + public static @CType("VkPhysicalDeviceProperties") java.lang.foreign.MemorySegment get_properties(MemorySegment segment) { return VkPhysicalDeviceProperties2.get_properties(segment, 0L); } + /// {@return `properties` at the given index} + /// @param index the index + public @CType("VkPhysicalDeviceProperties") java.lang.foreign.MemorySegment propertiesAt(long index) { return VkPhysicalDeviceProperties2.get_properties(this.segment(), index); } + /// {@return `properties`} + public @CType("VkPhysicalDeviceProperties") java.lang.foreign.MemorySegment properties() { return VkPhysicalDeviceProperties2.get_properties(this.segment()); } + /// Sets `properties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_properties(MemorySegment segment, long index, @CType("VkPhysicalDeviceProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_properties, index), ML_properties.byteSize()); } + /// Sets `properties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_properties(MemorySegment segment, @CType("VkPhysicalDeviceProperties") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties2.set_properties(segment, 0L, value); } + /// Sets `properties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties2 propertiesAt(long index, @CType("VkPhysicalDeviceProperties") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties2.set_properties(this.segment(), index, value); return this; } + /// Sets `properties` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProperties2 properties(@CType("VkPhysicalDeviceProperties") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProperties2.set_properties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProtectedMemoryFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProtectedMemoryFeatures.java new file mode 100644 index 00000000..661f459a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProtectedMemoryFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### protectedMemory +/// [VarHandle][#VH_protectedMemory] - [Getter][#protectedMemory()] - [Setter][#protectedMemory(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceProtectedMemoryFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 protectedMemory; +/// } VkPhysicalDeviceProtectedMemoryFeatures; +/// ``` +public final class VkPhysicalDeviceProtectedMemoryFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceProtectedMemoryFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("protectedMemory") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `protectedMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_protectedMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("protectedMemory")); + + /// Creates `VkPhysicalDeviceProtectedMemoryFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceProtectedMemoryFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceProtectedMemoryFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProtectedMemoryFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProtectedMemoryFeatures(segment); } + + /// Creates `VkPhysicalDeviceProtectedMemoryFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProtectedMemoryFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProtectedMemoryFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceProtectedMemoryFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProtectedMemoryFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProtectedMemoryFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceProtectedMemoryFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceProtectedMemoryFeatures` + public static VkPhysicalDeviceProtectedMemoryFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceProtectedMemoryFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceProtectedMemoryFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceProtectedMemoryFeatures` + public static VkPhysicalDeviceProtectedMemoryFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceProtectedMemoryFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceProtectedMemoryFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceProtectedMemoryFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceProtectedMemoryFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceProtectedMemoryFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceProtectedMemoryFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceProtectedMemoryFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceProtectedMemoryFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceProtectedMemoryFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceProtectedMemoryFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProtectedMemoryFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProtectedMemoryFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProtectedMemoryFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `protectedMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_protectedMemory(MemorySegment segment, long index) { return (int) VH_protectedMemory.get(segment, 0L, index); } + /// {@return `protectedMemory`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_protectedMemory(MemorySegment segment) { return VkPhysicalDeviceProtectedMemoryFeatures.get_protectedMemory(segment, 0L); } + /// {@return `protectedMemory` at the given index} + /// @param index the index + public @CType("VkBool32") int protectedMemoryAt(long index) { return VkPhysicalDeviceProtectedMemoryFeatures.get_protectedMemory(this.segment(), index); } + /// {@return `protectedMemory`} + public @CType("VkBool32") int protectedMemory() { return VkPhysicalDeviceProtectedMemoryFeatures.get_protectedMemory(this.segment()); } + /// Sets `protectedMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_protectedMemory(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_protectedMemory.set(segment, 0L, index, value); } + /// Sets `protectedMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_protectedMemory(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceProtectedMemoryFeatures.set_protectedMemory(segment, 0L, value); } + /// Sets `protectedMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryFeatures protectedMemoryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceProtectedMemoryFeatures.set_protectedMemory(this.segment(), index, value); return this; } + /// Sets `protectedMemory` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryFeatures protectedMemory(@CType("VkBool32") int value) { VkPhysicalDeviceProtectedMemoryFeatures.set_protectedMemory(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProtectedMemoryProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProtectedMemoryProperties.java new file mode 100644 index 00000000..98cc63a5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceProtectedMemoryProperties.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### protectedNoFault +/// [VarHandle][#VH_protectedNoFault] - [Getter][#protectedNoFault()] - [Setter][#protectedNoFault(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceProtectedMemoryProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 protectedNoFault; +/// } VkPhysicalDeviceProtectedMemoryProperties; +/// ``` +public final class VkPhysicalDeviceProtectedMemoryProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceProtectedMemoryProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("protectedNoFault") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `protectedNoFault` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_protectedNoFault = LAYOUT.arrayElementVarHandle(PathElement.groupElement("protectedNoFault")); + + /// Creates `VkPhysicalDeviceProtectedMemoryProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceProtectedMemoryProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceProtectedMemoryProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProtectedMemoryProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProtectedMemoryProperties(segment); } + + /// Creates `VkPhysicalDeviceProtectedMemoryProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProtectedMemoryProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProtectedMemoryProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceProtectedMemoryProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceProtectedMemoryProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceProtectedMemoryProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceProtectedMemoryProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceProtectedMemoryProperties` + public static VkPhysicalDeviceProtectedMemoryProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceProtectedMemoryProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceProtectedMemoryProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceProtectedMemoryProperties` + public static VkPhysicalDeviceProtectedMemoryProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceProtectedMemoryProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceProtectedMemoryProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceProtectedMemoryProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceProtectedMemoryProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceProtectedMemoryProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceProtectedMemoryProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceProtectedMemoryProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceProtectedMemoryProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceProtectedMemoryProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceProtectedMemoryProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProtectedMemoryProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProtectedMemoryProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceProtectedMemoryProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `protectedNoFault` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_protectedNoFault(MemorySegment segment, long index) { return (int) VH_protectedNoFault.get(segment, 0L, index); } + /// {@return `protectedNoFault`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_protectedNoFault(MemorySegment segment) { return VkPhysicalDeviceProtectedMemoryProperties.get_protectedNoFault(segment, 0L); } + /// {@return `protectedNoFault` at the given index} + /// @param index the index + public @CType("VkBool32") int protectedNoFaultAt(long index) { return VkPhysicalDeviceProtectedMemoryProperties.get_protectedNoFault(this.segment(), index); } + /// {@return `protectedNoFault`} + public @CType("VkBool32") int protectedNoFault() { return VkPhysicalDeviceProtectedMemoryProperties.get_protectedNoFault(this.segment()); } + /// Sets `protectedNoFault` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_protectedNoFault(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_protectedNoFault.set(segment, 0L, index, value); } + /// Sets `protectedNoFault` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_protectedNoFault(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceProtectedMemoryProperties.set_protectedNoFault(segment, 0L, value); } + /// Sets `protectedNoFault` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryProperties protectedNoFaultAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceProtectedMemoryProperties.set_protectedNoFault(this.segment(), index, value); return this; } + /// Sets `protectedNoFault` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceProtectedMemoryProperties protectedNoFault(@CType("VkBool32") int value) { VkPhysicalDeviceProtectedMemoryProperties.set_protectedNoFault(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePushDescriptorProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePushDescriptorProperties.java new file mode 100644 index 00000000..89ac15b6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDevicePushDescriptorProperties.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxPushDescriptors +/// [VarHandle][#VH_maxPushDescriptors] - [Getter][#maxPushDescriptors()] - [Setter][#maxPushDescriptors(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDevicePushDescriptorProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxPushDescriptors; +/// } VkPhysicalDevicePushDescriptorProperties; +/// ``` +public final class VkPhysicalDevicePushDescriptorProperties extends Struct { + /// The struct layout of `VkPhysicalDevicePushDescriptorProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxPushDescriptors") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxPushDescriptors` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPushDescriptors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPushDescriptors")); + + /// Creates `VkPhysicalDevicePushDescriptorProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDevicePushDescriptorProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDevicePushDescriptorProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePushDescriptorProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePushDescriptorProperties(segment); } + + /// Creates `VkPhysicalDevicePushDescriptorProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePushDescriptorProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePushDescriptorProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDevicePushDescriptorProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDevicePushDescriptorProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDevicePushDescriptorProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDevicePushDescriptorProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDevicePushDescriptorProperties` + public static VkPhysicalDevicePushDescriptorProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDevicePushDescriptorProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDevicePushDescriptorProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDevicePushDescriptorProperties` + public static VkPhysicalDevicePushDescriptorProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDevicePushDescriptorProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDevicePushDescriptorProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDevicePushDescriptorProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDevicePushDescriptorProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDevicePushDescriptorProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePushDescriptorProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDevicePushDescriptorProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePushDescriptorProperties sType(@CType("VkStructureType") int value) { VkPhysicalDevicePushDescriptorProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDevicePushDescriptorProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDevicePushDescriptorProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDevicePushDescriptorProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePushDescriptorProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePushDescriptorProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePushDescriptorProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePushDescriptorProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDevicePushDescriptorProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `maxPushDescriptors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPushDescriptors(MemorySegment segment, long index) { return (int) VH_maxPushDescriptors.get(segment, 0L, index); } + /// {@return `maxPushDescriptors`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPushDescriptors(MemorySegment segment) { return VkPhysicalDevicePushDescriptorProperties.get_maxPushDescriptors(segment, 0L); } + /// {@return `maxPushDescriptors` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPushDescriptorsAt(long index) { return VkPhysicalDevicePushDescriptorProperties.get_maxPushDescriptors(this.segment(), index); } + /// {@return `maxPushDescriptors`} + public @CType("uint32_t") int maxPushDescriptors() { return VkPhysicalDevicePushDescriptorProperties.get_maxPushDescriptors(this.segment()); } + /// Sets `maxPushDescriptors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPushDescriptors(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPushDescriptors.set(segment, 0L, index, value); } + /// Sets `maxPushDescriptors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPushDescriptors(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDevicePushDescriptorProperties.set_maxPushDescriptors(segment, 0L, value); } + /// Sets `maxPushDescriptors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDevicePushDescriptorProperties maxPushDescriptorsAt(long index, @CType("uint32_t") int value) { VkPhysicalDevicePushDescriptorProperties.set_maxPushDescriptors(this.segment(), index, value); return this; } + /// Sets `maxPushDescriptors` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDevicePushDescriptorProperties maxPushDescriptors(@CType("uint32_t") int value) { VkPhysicalDevicePushDescriptorProperties.set_maxPushDescriptors(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSamplerFilterMinmaxProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSamplerFilterMinmaxProperties.java new file mode 100644 index 00000000..f5a31c63 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSamplerFilterMinmaxProperties.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### filterMinmaxSingleComponentFormats +/// [VarHandle][#VH_filterMinmaxSingleComponentFormats] - [Getter][#filterMinmaxSingleComponentFormats()] - [Setter][#filterMinmaxSingleComponentFormats(int)] +/// ### filterMinmaxImageComponentMapping +/// [VarHandle][#VH_filterMinmaxImageComponentMapping] - [Getter][#filterMinmaxImageComponentMapping()] - [Setter][#filterMinmaxImageComponentMapping(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSamplerFilterMinmaxProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 filterMinmaxSingleComponentFormats; +/// VkBool32 filterMinmaxImageComponentMapping; +/// } VkPhysicalDeviceSamplerFilterMinmaxProperties; +/// ``` +public final class VkPhysicalDeviceSamplerFilterMinmaxProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceSamplerFilterMinmaxProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("filterMinmaxSingleComponentFormats"), + ValueLayout.JAVA_INT.withName("filterMinmaxImageComponentMapping") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `filterMinmaxSingleComponentFormats` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_filterMinmaxSingleComponentFormats = LAYOUT.arrayElementVarHandle(PathElement.groupElement("filterMinmaxSingleComponentFormats")); + /// The [VarHandle] of `filterMinmaxImageComponentMapping` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_filterMinmaxImageComponentMapping = LAYOUT.arrayElementVarHandle(PathElement.groupElement("filterMinmaxImageComponentMapping")); + + /// Creates `VkPhysicalDeviceSamplerFilterMinmaxProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSamplerFilterMinmaxProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSamplerFilterMinmaxProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSamplerFilterMinmaxProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSamplerFilterMinmaxProperties(segment); } + + /// Creates `VkPhysicalDeviceSamplerFilterMinmaxProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSamplerFilterMinmaxProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSamplerFilterMinmaxProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSamplerFilterMinmaxProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSamplerFilterMinmaxProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSamplerFilterMinmaxProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSamplerFilterMinmaxProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSamplerFilterMinmaxProperties` + public static VkPhysicalDeviceSamplerFilterMinmaxProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSamplerFilterMinmaxProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSamplerFilterMinmaxProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSamplerFilterMinmaxProperties` + public static VkPhysicalDeviceSamplerFilterMinmaxProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSamplerFilterMinmaxProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerFilterMinmaxProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerFilterMinmaxProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerFilterMinmaxProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerFilterMinmaxProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `filterMinmaxSingleComponentFormats` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_filterMinmaxSingleComponentFormats(MemorySegment segment, long index) { return (int) VH_filterMinmaxSingleComponentFormats.get(segment, 0L, index); } + /// {@return `filterMinmaxSingleComponentFormats`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_filterMinmaxSingleComponentFormats(MemorySegment segment) { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_filterMinmaxSingleComponentFormats(segment, 0L); } + /// {@return `filterMinmaxSingleComponentFormats` at the given index} + /// @param index the index + public @CType("VkBool32") int filterMinmaxSingleComponentFormatsAt(long index) { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_filterMinmaxSingleComponentFormats(this.segment(), index); } + /// {@return `filterMinmaxSingleComponentFormats`} + public @CType("VkBool32") int filterMinmaxSingleComponentFormats() { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_filterMinmaxSingleComponentFormats(this.segment()); } + /// Sets `filterMinmaxSingleComponentFormats` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_filterMinmaxSingleComponentFormats(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_filterMinmaxSingleComponentFormats.set(segment, 0L, index, value); } + /// Sets `filterMinmaxSingleComponentFormats` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_filterMinmaxSingleComponentFormats(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_filterMinmaxSingleComponentFormats(segment, 0L, value); } + /// Sets `filterMinmaxSingleComponentFormats` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerFilterMinmaxProperties filterMinmaxSingleComponentFormatsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_filterMinmaxSingleComponentFormats(this.segment(), index, value); return this; } + /// Sets `filterMinmaxSingleComponentFormats` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerFilterMinmaxProperties filterMinmaxSingleComponentFormats(@CType("VkBool32") int value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_filterMinmaxSingleComponentFormats(this.segment(), value); return this; } + + /// {@return `filterMinmaxImageComponentMapping` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_filterMinmaxImageComponentMapping(MemorySegment segment, long index) { return (int) VH_filterMinmaxImageComponentMapping.get(segment, 0L, index); } + /// {@return `filterMinmaxImageComponentMapping`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_filterMinmaxImageComponentMapping(MemorySegment segment) { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_filterMinmaxImageComponentMapping(segment, 0L); } + /// {@return `filterMinmaxImageComponentMapping` at the given index} + /// @param index the index + public @CType("VkBool32") int filterMinmaxImageComponentMappingAt(long index) { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_filterMinmaxImageComponentMapping(this.segment(), index); } + /// {@return `filterMinmaxImageComponentMapping`} + public @CType("VkBool32") int filterMinmaxImageComponentMapping() { return VkPhysicalDeviceSamplerFilterMinmaxProperties.get_filterMinmaxImageComponentMapping(this.segment()); } + /// Sets `filterMinmaxImageComponentMapping` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_filterMinmaxImageComponentMapping(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_filterMinmaxImageComponentMapping.set(segment, 0L, index, value); } + /// Sets `filterMinmaxImageComponentMapping` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_filterMinmaxImageComponentMapping(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_filterMinmaxImageComponentMapping(segment, 0L, value); } + /// Sets `filterMinmaxImageComponentMapping` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerFilterMinmaxProperties filterMinmaxImageComponentMappingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_filterMinmaxImageComponentMapping(this.segment(), index, value); return this; } + /// Sets `filterMinmaxImageComponentMapping` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerFilterMinmaxProperties filterMinmaxImageComponentMapping(@CType("VkBool32") int value) { VkPhysicalDeviceSamplerFilterMinmaxProperties.set_filterMinmaxImageComponentMapping(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSamplerYcbcrConversionFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSamplerYcbcrConversionFeatures.java new file mode 100644 index 00000000..3e65abc0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSamplerYcbcrConversionFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### samplerYcbcrConversion +/// [VarHandle][#VH_samplerYcbcrConversion] - [Getter][#samplerYcbcrConversion()] - [Setter][#samplerYcbcrConversion(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSamplerYcbcrConversionFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 samplerYcbcrConversion; +/// } VkPhysicalDeviceSamplerYcbcrConversionFeatures; +/// ``` +public final class VkPhysicalDeviceSamplerYcbcrConversionFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceSamplerYcbcrConversionFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("samplerYcbcrConversion") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `samplerYcbcrConversion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samplerYcbcrConversion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerYcbcrConversion")); + + /// Creates `VkPhysicalDeviceSamplerYcbcrConversionFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSamplerYcbcrConversionFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSamplerYcbcrConversionFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSamplerYcbcrConversionFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSamplerYcbcrConversionFeatures(segment); } + + /// Creates `VkPhysicalDeviceSamplerYcbcrConversionFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSamplerYcbcrConversionFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSamplerYcbcrConversionFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSamplerYcbcrConversionFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSamplerYcbcrConversionFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSamplerYcbcrConversionFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSamplerYcbcrConversionFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSamplerYcbcrConversionFeatures` + public static VkPhysicalDeviceSamplerYcbcrConversionFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSamplerYcbcrConversionFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSamplerYcbcrConversionFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSamplerYcbcrConversionFeatures` + public static VkPhysicalDeviceSamplerYcbcrConversionFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSamplerYcbcrConversionFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSamplerYcbcrConversionFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSamplerYcbcrConversionFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSamplerYcbcrConversionFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSamplerYcbcrConversionFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerYcbcrConversionFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSamplerYcbcrConversionFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerYcbcrConversionFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSamplerYcbcrConversionFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSamplerYcbcrConversionFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSamplerYcbcrConversionFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSamplerYcbcrConversionFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSamplerYcbcrConversionFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerYcbcrConversionFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSamplerYcbcrConversionFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerYcbcrConversionFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSamplerYcbcrConversionFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `samplerYcbcrConversion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_samplerYcbcrConversion(MemorySegment segment, long index) { return (int) VH_samplerYcbcrConversion.get(segment, 0L, index); } + /// {@return `samplerYcbcrConversion`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_samplerYcbcrConversion(MemorySegment segment) { return VkPhysicalDeviceSamplerYcbcrConversionFeatures.get_samplerYcbcrConversion(segment, 0L); } + /// {@return `samplerYcbcrConversion` at the given index} + /// @param index the index + public @CType("VkBool32") int samplerYcbcrConversionAt(long index) { return VkPhysicalDeviceSamplerYcbcrConversionFeatures.get_samplerYcbcrConversion(this.segment(), index); } + /// {@return `samplerYcbcrConversion`} + public @CType("VkBool32") int samplerYcbcrConversion() { return VkPhysicalDeviceSamplerYcbcrConversionFeatures.get_samplerYcbcrConversion(this.segment()); } + /// Sets `samplerYcbcrConversion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerYcbcrConversion(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_samplerYcbcrConversion.set(segment, 0L, index, value); } + /// Sets `samplerYcbcrConversion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerYcbcrConversion(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSamplerYcbcrConversionFeatures.set_samplerYcbcrConversion(segment, 0L, value); } + /// Sets `samplerYcbcrConversion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerYcbcrConversionFeatures samplerYcbcrConversionAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSamplerYcbcrConversionFeatures.set_samplerYcbcrConversion(this.segment(), index, value); return this; } + /// Sets `samplerYcbcrConversion` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSamplerYcbcrConversionFeatures samplerYcbcrConversion(@CType("VkBool32") int value) { VkPhysicalDeviceSamplerYcbcrConversionFeatures.set_samplerYcbcrConversion(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceScalarBlockLayoutFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceScalarBlockLayoutFeatures.java new file mode 100644 index 00000000..fa57b310 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceScalarBlockLayoutFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### scalarBlockLayout +/// [VarHandle][#VH_scalarBlockLayout] - [Getter][#scalarBlockLayout()] - [Setter][#scalarBlockLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceScalarBlockLayoutFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 scalarBlockLayout; +/// } VkPhysicalDeviceScalarBlockLayoutFeatures; +/// ``` +public final class VkPhysicalDeviceScalarBlockLayoutFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceScalarBlockLayoutFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("scalarBlockLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `scalarBlockLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_scalarBlockLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scalarBlockLayout")); + + /// Creates `VkPhysicalDeviceScalarBlockLayoutFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceScalarBlockLayoutFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceScalarBlockLayoutFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceScalarBlockLayoutFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceScalarBlockLayoutFeatures(segment); } + + /// Creates `VkPhysicalDeviceScalarBlockLayoutFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceScalarBlockLayoutFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceScalarBlockLayoutFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceScalarBlockLayoutFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceScalarBlockLayoutFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceScalarBlockLayoutFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceScalarBlockLayoutFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceScalarBlockLayoutFeatures` + public static VkPhysicalDeviceScalarBlockLayoutFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceScalarBlockLayoutFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceScalarBlockLayoutFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceScalarBlockLayoutFeatures` + public static VkPhysicalDeviceScalarBlockLayoutFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceScalarBlockLayoutFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceScalarBlockLayoutFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceScalarBlockLayoutFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceScalarBlockLayoutFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceScalarBlockLayoutFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceScalarBlockLayoutFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceScalarBlockLayoutFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceScalarBlockLayoutFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceScalarBlockLayoutFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceScalarBlockLayoutFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceScalarBlockLayoutFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceScalarBlockLayoutFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceScalarBlockLayoutFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceScalarBlockLayoutFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceScalarBlockLayoutFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceScalarBlockLayoutFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceScalarBlockLayoutFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `scalarBlockLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_scalarBlockLayout(MemorySegment segment, long index) { return (int) VH_scalarBlockLayout.get(segment, 0L, index); } + /// {@return `scalarBlockLayout`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_scalarBlockLayout(MemorySegment segment) { return VkPhysicalDeviceScalarBlockLayoutFeatures.get_scalarBlockLayout(segment, 0L); } + /// {@return `scalarBlockLayout` at the given index} + /// @param index the index + public @CType("VkBool32") int scalarBlockLayoutAt(long index) { return VkPhysicalDeviceScalarBlockLayoutFeatures.get_scalarBlockLayout(this.segment(), index); } + /// {@return `scalarBlockLayout`} + public @CType("VkBool32") int scalarBlockLayout() { return VkPhysicalDeviceScalarBlockLayoutFeatures.get_scalarBlockLayout(this.segment()); } + /// Sets `scalarBlockLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scalarBlockLayout(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_scalarBlockLayout.set(segment, 0L, index, value); } + /// Sets `scalarBlockLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scalarBlockLayout(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceScalarBlockLayoutFeatures.set_scalarBlockLayout(segment, 0L, value); } + /// Sets `scalarBlockLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceScalarBlockLayoutFeatures scalarBlockLayoutAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceScalarBlockLayoutFeatures.set_scalarBlockLayout(this.segment(), index, value); return this; } + /// Sets `scalarBlockLayout` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceScalarBlockLayoutFeatures scalarBlockLayout(@CType("VkBool32") int value) { VkPhysicalDeviceScalarBlockLayoutFeatures.set_scalarBlockLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.java new file mode 100644 index 00000000..11972675 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### separateDepthStencilLayouts +/// [VarHandle][#VH_separateDepthStencilLayouts] - [Getter][#separateDepthStencilLayouts()] - [Setter][#separateDepthStencilLayouts(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 separateDepthStencilLayouts; +/// } VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures; +/// ``` +public final class VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("separateDepthStencilLayouts") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `separateDepthStencilLayouts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_separateDepthStencilLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("separateDepthStencilLayouts")); + + /// Creates `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(segment); } + + /// Creates `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures` + public static VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures` + public static VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `separateDepthStencilLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_separateDepthStencilLayouts(MemorySegment segment, long index) { return (int) VH_separateDepthStencilLayouts.get(segment, 0L, index); } + /// {@return `separateDepthStencilLayouts`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_separateDepthStencilLayouts(MemorySegment segment) { return VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.get_separateDepthStencilLayouts(segment, 0L); } + /// {@return `separateDepthStencilLayouts` at the given index} + /// @param index the index + public @CType("VkBool32") int separateDepthStencilLayoutsAt(long index) { return VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.get_separateDepthStencilLayouts(this.segment(), index); } + /// {@return `separateDepthStencilLayouts`} + public @CType("VkBool32") int separateDepthStencilLayouts() { return VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.get_separateDepthStencilLayouts(this.segment()); } + /// Sets `separateDepthStencilLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_separateDepthStencilLayouts(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_separateDepthStencilLayouts.set(segment, 0L, index, value); } + /// Sets `separateDepthStencilLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_separateDepthStencilLayouts(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.set_separateDepthStencilLayouts(segment, 0L, value); } + /// Sets `separateDepthStencilLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures separateDepthStencilLayoutsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.set_separateDepthStencilLayouts(this.segment(), index, value); return this; } + /// Sets `separateDepthStencilLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures separateDepthStencilLayouts(@CType("VkBool32") int value) { VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.set_separateDepthStencilLayouts(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderAtomicInt64Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderAtomicInt64Features.java new file mode 100644 index 00000000..daa452f1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderAtomicInt64Features.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderBufferInt64Atomics +/// [VarHandle][#VH_shaderBufferInt64Atomics] - [Getter][#shaderBufferInt64Atomics()] - [Setter][#shaderBufferInt64Atomics(int)] +/// ### shaderSharedInt64Atomics +/// [VarHandle][#VH_shaderSharedInt64Atomics] - [Getter][#shaderSharedInt64Atomics()] - [Setter][#shaderSharedInt64Atomics(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderAtomicInt64Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderBufferInt64Atomics; +/// VkBool32 shaderSharedInt64Atomics; +/// } VkPhysicalDeviceShaderAtomicInt64Features; +/// ``` +public final class VkPhysicalDeviceShaderAtomicInt64Features extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderAtomicInt64Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderBufferInt64Atomics"), + ValueLayout.JAVA_INT.withName("shaderSharedInt64Atomics") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderBufferInt64Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferInt64Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferInt64Atomics")); + /// The [VarHandle] of `shaderSharedInt64Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedInt64Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedInt64Atomics")); + + /// Creates `VkPhysicalDeviceShaderAtomicInt64Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderAtomicInt64Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderAtomicInt64Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicInt64Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicInt64Features(segment); } + + /// Creates `VkPhysicalDeviceShaderAtomicInt64Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicInt64Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicInt64Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderAtomicInt64Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderAtomicInt64Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderAtomicInt64Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderAtomicInt64Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderAtomicInt64Features` + public static VkPhysicalDeviceShaderAtomicInt64Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderAtomicInt64Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderAtomicInt64Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderAtomicInt64Features` + public static VkPhysicalDeviceShaderAtomicInt64Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderAtomicInt64Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicInt64Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderAtomicInt64Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderAtomicInt64Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicInt64Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicInt64Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicInt64Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicInt64Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderAtomicInt64Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicInt64Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderAtomicInt64Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderAtomicInt64Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicInt64Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicInt64Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicInt64Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicInt64Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderAtomicInt64Features.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderBufferInt64Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferInt64Atomics(MemorySegment segment, long index) { return (int) VH_shaderBufferInt64Atomics.get(segment, 0L, index); } + /// {@return `shaderBufferInt64Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferInt64Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicInt64Features.get_shaderBufferInt64Atomics(segment, 0L); } + /// {@return `shaderBufferInt64Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferInt64AtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicInt64Features.get_shaderBufferInt64Atomics(this.segment(), index); } + /// {@return `shaderBufferInt64Atomics`} + public @CType("VkBool32") int shaderBufferInt64Atomics() { return VkPhysicalDeviceShaderAtomicInt64Features.get_shaderBufferInt64Atomics(this.segment()); } + /// Sets `shaderBufferInt64Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferInt64Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferInt64Atomics.set(segment, 0L, index, value); } + /// Sets `shaderBufferInt64Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferInt64Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicInt64Features.set_shaderBufferInt64Atomics(segment, 0L, value); } + /// Sets `shaderBufferInt64Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicInt64Features shaderBufferInt64AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicInt64Features.set_shaderBufferInt64Atomics(this.segment(), index, value); return this; } + /// Sets `shaderBufferInt64Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicInt64Features shaderBufferInt64Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicInt64Features.set_shaderBufferInt64Atomics(this.segment(), value); return this; } + + /// {@return `shaderSharedInt64Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedInt64Atomics(MemorySegment segment, long index) { return (int) VH_shaderSharedInt64Atomics.get(segment, 0L, index); } + /// {@return `shaderSharedInt64Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedInt64Atomics(MemorySegment segment) { return VkPhysicalDeviceShaderAtomicInt64Features.get_shaderSharedInt64Atomics(segment, 0L); } + /// {@return `shaderSharedInt64Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedInt64AtomicsAt(long index) { return VkPhysicalDeviceShaderAtomicInt64Features.get_shaderSharedInt64Atomics(this.segment(), index); } + /// {@return `shaderSharedInt64Atomics`} + public @CType("VkBool32") int shaderSharedInt64Atomics() { return VkPhysicalDeviceShaderAtomicInt64Features.get_shaderSharedInt64Atomics(this.segment()); } + /// Sets `shaderSharedInt64Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedInt64Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedInt64Atomics.set(segment, 0L, index, value); } + /// Sets `shaderSharedInt64Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedInt64Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicInt64Features.set_shaderSharedInt64Atomics(segment, 0L, value); } + /// Sets `shaderSharedInt64Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicInt64Features shaderSharedInt64AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicInt64Features.set_shaderSharedInt64Atomics(this.segment(), index, value); return this; } + /// Sets `shaderSharedInt64Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderAtomicInt64Features shaderSharedInt64Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceShaderAtomicInt64Features.set_shaderSharedInt64Atomics(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.java new file mode 100644 index 00000000..43c5c911 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderDemoteToHelperInvocation +/// [VarHandle][#VH_shaderDemoteToHelperInvocation] - [Getter][#shaderDemoteToHelperInvocation()] - [Setter][#shaderDemoteToHelperInvocation(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderDemoteToHelperInvocation; +/// } VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures; +/// ``` +public final class VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderDemoteToHelperInvocation") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderDemoteToHelperInvocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDemoteToHelperInvocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDemoteToHelperInvocation")); + + /// Creates `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(segment); } + + /// Creates `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures` + public static VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures` + public static VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderDemoteToHelperInvocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDemoteToHelperInvocation(MemorySegment segment, long index) { return (int) VH_shaderDemoteToHelperInvocation.get(segment, 0L, index); } + /// {@return `shaderDemoteToHelperInvocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDemoteToHelperInvocation(MemorySegment segment) { return VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.get_shaderDemoteToHelperInvocation(segment, 0L); } + /// {@return `shaderDemoteToHelperInvocation` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDemoteToHelperInvocationAt(long index) { return VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.get_shaderDemoteToHelperInvocation(this.segment(), index); } + /// {@return `shaderDemoteToHelperInvocation`} + public @CType("VkBool32") int shaderDemoteToHelperInvocation() { return VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.get_shaderDemoteToHelperInvocation(this.segment()); } + /// Sets `shaderDemoteToHelperInvocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDemoteToHelperInvocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDemoteToHelperInvocation.set(segment, 0L, index, value); } + /// Sets `shaderDemoteToHelperInvocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDemoteToHelperInvocation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.set_shaderDemoteToHelperInvocation(segment, 0L, value); } + /// Sets `shaderDemoteToHelperInvocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures shaderDemoteToHelperInvocationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.set_shaderDemoteToHelperInvocation(this.segment(), index, value); return this; } + /// Sets `shaderDemoteToHelperInvocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures shaderDemoteToHelperInvocation(@CType("VkBool32") int value) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.set_shaderDemoteToHelperInvocation(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderDrawParametersFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderDrawParametersFeatures.java new file mode 100644 index 00000000..7914d583 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderDrawParametersFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderDrawParameters +/// [VarHandle][#VH_shaderDrawParameters] - [Getter][#shaderDrawParameters()] - [Setter][#shaderDrawParameters(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderDrawParametersFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderDrawParameters; +/// } VkPhysicalDeviceShaderDrawParametersFeatures; +/// ``` +public final class VkPhysicalDeviceShaderDrawParametersFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderDrawParametersFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderDrawParameters") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderDrawParameters` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDrawParameters = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDrawParameters")); + + /// Creates `VkPhysicalDeviceShaderDrawParametersFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderDrawParametersFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderDrawParametersFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderDrawParametersFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderDrawParametersFeatures(segment); } + + /// Creates `VkPhysicalDeviceShaderDrawParametersFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderDrawParametersFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderDrawParametersFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderDrawParametersFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderDrawParametersFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderDrawParametersFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderDrawParametersFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderDrawParametersFeatures` + public static VkPhysicalDeviceShaderDrawParametersFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderDrawParametersFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderDrawParametersFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderDrawParametersFeatures` + public static VkPhysicalDeviceShaderDrawParametersFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderDrawParametersFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderDrawParametersFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderDrawParametersFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderDrawParametersFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderDrawParametersFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDrawParametersFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderDrawParametersFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDrawParametersFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderDrawParametersFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderDrawParametersFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderDrawParametersFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderDrawParametersFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderDrawParametersFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDrawParametersFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderDrawParametersFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDrawParametersFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderDrawParametersFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderDrawParameters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDrawParameters(MemorySegment segment, long index) { return (int) VH_shaderDrawParameters.get(segment, 0L, index); } + /// {@return `shaderDrawParameters`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDrawParameters(MemorySegment segment) { return VkPhysicalDeviceShaderDrawParametersFeatures.get_shaderDrawParameters(segment, 0L); } + /// {@return `shaderDrawParameters` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDrawParametersAt(long index) { return VkPhysicalDeviceShaderDrawParametersFeatures.get_shaderDrawParameters(this.segment(), index); } + /// {@return `shaderDrawParameters`} + public @CType("VkBool32") int shaderDrawParameters() { return VkPhysicalDeviceShaderDrawParametersFeatures.get_shaderDrawParameters(this.segment()); } + /// Sets `shaderDrawParameters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDrawParameters(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDrawParameters.set(segment, 0L, index, value); } + /// Sets `shaderDrawParameters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDrawParameters(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderDrawParametersFeatures.set_shaderDrawParameters(segment, 0L, value); } + /// Sets `shaderDrawParameters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDrawParametersFeatures shaderDrawParametersAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderDrawParametersFeatures.set_shaderDrawParameters(this.segment(), index, value); return this; } + /// Sets `shaderDrawParameters` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderDrawParametersFeatures shaderDrawParameters(@CType("VkBool32") int value) { VkPhysicalDeviceShaderDrawParametersFeatures.set_shaderDrawParameters(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderExpectAssumeFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderExpectAssumeFeatures.java new file mode 100644 index 00000000..78f602e6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderExpectAssumeFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderExpectAssume +/// [VarHandle][#VH_shaderExpectAssume] - [Getter][#shaderExpectAssume()] - [Setter][#shaderExpectAssume(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderExpectAssumeFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderExpectAssume; +/// } VkPhysicalDeviceShaderExpectAssumeFeatures; +/// ``` +public final class VkPhysicalDeviceShaderExpectAssumeFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderExpectAssumeFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderExpectAssume") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderExpectAssume` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderExpectAssume = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderExpectAssume")); + + /// Creates `VkPhysicalDeviceShaderExpectAssumeFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderExpectAssumeFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderExpectAssumeFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderExpectAssumeFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderExpectAssumeFeatures(segment); } + + /// Creates `VkPhysicalDeviceShaderExpectAssumeFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderExpectAssumeFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderExpectAssumeFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderExpectAssumeFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderExpectAssumeFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderExpectAssumeFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderExpectAssumeFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderExpectAssumeFeatures` + public static VkPhysicalDeviceShaderExpectAssumeFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderExpectAssumeFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderExpectAssumeFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderExpectAssumeFeatures` + public static VkPhysicalDeviceShaderExpectAssumeFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderExpectAssumeFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderExpectAssumeFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderExpectAssumeFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderExpectAssumeFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderExpectAssumeFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderExpectAssumeFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderExpectAssumeFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderExpectAssumeFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderExpectAssumeFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderExpectAssumeFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderExpectAssumeFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderExpectAssumeFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderExpectAssumeFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderExpectAssumeFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderExpectAssumeFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderExpectAssumeFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderExpectAssumeFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderExpectAssume` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderExpectAssume(MemorySegment segment, long index) { return (int) VH_shaderExpectAssume.get(segment, 0L, index); } + /// {@return `shaderExpectAssume`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderExpectAssume(MemorySegment segment) { return VkPhysicalDeviceShaderExpectAssumeFeatures.get_shaderExpectAssume(segment, 0L); } + /// {@return `shaderExpectAssume` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderExpectAssumeAt(long index) { return VkPhysicalDeviceShaderExpectAssumeFeatures.get_shaderExpectAssume(this.segment(), index); } + /// {@return `shaderExpectAssume`} + public @CType("VkBool32") int shaderExpectAssume() { return VkPhysicalDeviceShaderExpectAssumeFeatures.get_shaderExpectAssume(this.segment()); } + /// Sets `shaderExpectAssume` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderExpectAssume(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderExpectAssume.set(segment, 0L, index, value); } + /// Sets `shaderExpectAssume` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderExpectAssume(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderExpectAssumeFeatures.set_shaderExpectAssume(segment, 0L, value); } + /// Sets `shaderExpectAssume` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderExpectAssumeFeatures shaderExpectAssumeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderExpectAssumeFeatures.set_shaderExpectAssume(this.segment(), index, value); return this; } + /// Sets `shaderExpectAssume` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderExpectAssumeFeatures shaderExpectAssume(@CType("VkBool32") int value) { VkPhysicalDeviceShaderExpectAssumeFeatures.set_shaderExpectAssume(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderFloat16Int8Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderFloat16Int8Features.java new file mode 100644 index 00000000..5acf4386 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderFloat16Int8Features.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderFloat16 +/// [VarHandle][#VH_shaderFloat16] - [Getter][#shaderFloat16()] - [Setter][#shaderFloat16(int)] +/// ### shaderInt8 +/// [VarHandle][#VH_shaderInt8] - [Getter][#shaderInt8()] - [Setter][#shaderInt8(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderFloat16Int8Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderFloat16; +/// VkBool32 shaderInt8; +/// } VkPhysicalDeviceShaderFloat16Int8Features; +/// ``` +public final class VkPhysicalDeviceShaderFloat16Int8Features extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderFloat16Int8Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderFloat16"), + ValueLayout.JAVA_INT.withName("shaderInt8") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderFloat16")); + /// The [VarHandle] of `shaderInt8` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderInt8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderInt8")); + + /// Creates `VkPhysicalDeviceShaderFloat16Int8Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderFloat16Int8Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderFloat16Int8Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderFloat16Int8Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderFloat16Int8Features(segment); } + + /// Creates `VkPhysicalDeviceShaderFloat16Int8Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderFloat16Int8Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderFloat16Int8Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderFloat16Int8Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderFloat16Int8Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderFloat16Int8Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderFloat16Int8Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderFloat16Int8Features` + public static VkPhysicalDeviceShaderFloat16Int8Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderFloat16Int8Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderFloat16Int8Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderFloat16Int8Features` + public static VkPhysicalDeviceShaderFloat16Int8Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderFloat16Int8Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderFloat16Int8Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderFloat16Int8Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderFloat16Int8Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderFloat16Int8Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloat16Int8Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderFloat16Int8Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloat16Int8Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderFloat16Int8Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderFloat16Int8Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderFloat16Int8Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderFloat16Int8Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderFloat16Int8Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloat16Int8Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderFloat16Int8Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloat16Int8Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderFloat16Int8Features.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderFloat16(MemorySegment segment, long index) { return (int) VH_shaderFloat16.get(segment, 0L, index); } + /// {@return `shaderFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderFloat16(MemorySegment segment) { return VkPhysicalDeviceShaderFloat16Int8Features.get_shaderFloat16(segment, 0L); } + /// {@return `shaderFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderFloat16At(long index) { return VkPhysicalDeviceShaderFloat16Int8Features.get_shaderFloat16(this.segment(), index); } + /// {@return `shaderFloat16`} + public @CType("VkBool32") int shaderFloat16() { return VkPhysicalDeviceShaderFloat16Int8Features.get_shaderFloat16(this.segment()); } + /// Sets `shaderFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderFloat16.set(segment, 0L, index, value); } + /// Sets `shaderFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderFloat16Int8Features.set_shaderFloat16(segment, 0L, value); } + /// Sets `shaderFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloat16Int8Features shaderFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderFloat16Int8Features.set_shaderFloat16(this.segment(), index, value); return this; } + /// Sets `shaderFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloat16Int8Features shaderFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceShaderFloat16Int8Features.set_shaderFloat16(this.segment(), value); return this; } + + /// {@return `shaderInt8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderInt8(MemorySegment segment, long index) { return (int) VH_shaderInt8.get(segment, 0L, index); } + /// {@return `shaderInt8`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderInt8(MemorySegment segment) { return VkPhysicalDeviceShaderFloat16Int8Features.get_shaderInt8(segment, 0L); } + /// {@return `shaderInt8` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderInt8At(long index) { return VkPhysicalDeviceShaderFloat16Int8Features.get_shaderInt8(this.segment(), index); } + /// {@return `shaderInt8`} + public @CType("VkBool32") int shaderInt8() { return VkPhysicalDeviceShaderFloat16Int8Features.get_shaderInt8(this.segment()); } + /// Sets `shaderInt8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderInt8(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderInt8.set(segment, 0L, index, value); } + /// Sets `shaderInt8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderInt8(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderFloat16Int8Features.set_shaderInt8(segment, 0L, value); } + /// Sets `shaderInt8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloat16Int8Features shaderInt8At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderFloat16Int8Features.set_shaderInt8(this.segment(), index, value); return this; } + /// Sets `shaderInt8` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloat16Int8Features shaderInt8(@CType("VkBool32") int value) { VkPhysicalDeviceShaderFloat16Int8Features.set_shaderInt8(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderFloatControls2Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderFloatControls2Features.java new file mode 100644 index 00000000..1dc26f68 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderFloatControls2Features.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderFloatControls2 +/// [VarHandle][#VH_shaderFloatControls2] - [Getter][#shaderFloatControls2()] - [Setter][#shaderFloatControls2(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderFloatControls2Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderFloatControls2; +/// } VkPhysicalDeviceShaderFloatControls2Features; +/// ``` +public final class VkPhysicalDeviceShaderFloatControls2Features extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderFloatControls2Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderFloatControls2") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderFloatControls2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderFloatControls2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderFloatControls2")); + + /// Creates `VkPhysicalDeviceShaderFloatControls2Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderFloatControls2Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderFloatControls2Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderFloatControls2Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderFloatControls2Features(segment); } + + /// Creates `VkPhysicalDeviceShaderFloatControls2Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderFloatControls2Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderFloatControls2Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderFloatControls2Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderFloatControls2Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderFloatControls2Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderFloatControls2Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderFloatControls2Features` + public static VkPhysicalDeviceShaderFloatControls2Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderFloatControls2Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderFloatControls2Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderFloatControls2Features` + public static VkPhysicalDeviceShaderFloatControls2Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderFloatControls2Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderFloatControls2Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderFloatControls2Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderFloatControls2Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderFloatControls2Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloatControls2Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderFloatControls2Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloatControls2Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderFloatControls2Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderFloatControls2Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderFloatControls2Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderFloatControls2Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderFloatControls2Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloatControls2Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderFloatControls2Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloatControls2Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderFloatControls2Features.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderFloatControls2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderFloatControls2(MemorySegment segment, long index) { return (int) VH_shaderFloatControls2.get(segment, 0L, index); } + /// {@return `shaderFloatControls2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderFloatControls2(MemorySegment segment) { return VkPhysicalDeviceShaderFloatControls2Features.get_shaderFloatControls2(segment, 0L); } + /// {@return `shaderFloatControls2` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderFloatControls2At(long index) { return VkPhysicalDeviceShaderFloatControls2Features.get_shaderFloatControls2(this.segment(), index); } + /// {@return `shaderFloatControls2`} + public @CType("VkBool32") int shaderFloatControls2() { return VkPhysicalDeviceShaderFloatControls2Features.get_shaderFloatControls2(this.segment()); } + /// Sets `shaderFloatControls2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderFloatControls2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderFloatControls2.set(segment, 0L, index, value); } + /// Sets `shaderFloatControls2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderFloatControls2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderFloatControls2Features.set_shaderFloatControls2(segment, 0L, value); } + /// Sets `shaderFloatControls2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloatControls2Features shaderFloatControls2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderFloatControls2Features.set_shaderFloatControls2(this.segment(), index, value); return this; } + /// Sets `shaderFloatControls2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderFloatControls2Features shaderFloatControls2(@CType("VkBool32") int value) { VkPhysicalDeviceShaderFloatControls2Features.set_shaderFloatControls2(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderIntegerDotProductFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderIntegerDotProductFeatures.java new file mode 100644 index 00000000..822d3467 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderIntegerDotProductFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderIntegerDotProduct +/// [VarHandle][#VH_shaderIntegerDotProduct] - [Getter][#shaderIntegerDotProduct()] - [Setter][#shaderIntegerDotProduct(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderIntegerDotProductFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderIntegerDotProduct; +/// } VkPhysicalDeviceShaderIntegerDotProductFeatures; +/// ``` +public final class VkPhysicalDeviceShaderIntegerDotProductFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderIntegerDotProductFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderIntegerDotProduct") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderIntegerDotProduct` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderIntegerDotProduct = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderIntegerDotProduct")); + + /// Creates `VkPhysicalDeviceShaderIntegerDotProductFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderIntegerDotProductFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderIntegerDotProductFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderIntegerDotProductFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderIntegerDotProductFeatures(segment); } + + /// Creates `VkPhysicalDeviceShaderIntegerDotProductFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderIntegerDotProductFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderIntegerDotProductFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderIntegerDotProductFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderIntegerDotProductFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderIntegerDotProductFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderIntegerDotProductFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderIntegerDotProductFeatures` + public static VkPhysicalDeviceShaderIntegerDotProductFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderIntegerDotProductFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderIntegerDotProductFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderIntegerDotProductFeatures` + public static VkPhysicalDeviceShaderIntegerDotProductFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderIntegerDotProductFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderIntegerDotProductFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderIntegerDotProductFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderIntegerDotProductFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderIntegerDotProductFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderIntegerDotProductFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderIntegerDotProductFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderIntegerDotProductFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderIntegerDotProductFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderIntegerDotProduct` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderIntegerDotProduct(MemorySegment segment, long index) { return (int) VH_shaderIntegerDotProduct.get(segment, 0L, index); } + /// {@return `shaderIntegerDotProduct`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderIntegerDotProduct(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductFeatures.get_shaderIntegerDotProduct(segment, 0L); } + /// {@return `shaderIntegerDotProduct` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderIntegerDotProductAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductFeatures.get_shaderIntegerDotProduct(this.segment(), index); } + /// {@return `shaderIntegerDotProduct`} + public @CType("VkBool32") int shaderIntegerDotProduct() { return VkPhysicalDeviceShaderIntegerDotProductFeatures.get_shaderIntegerDotProduct(this.segment()); } + /// Sets `shaderIntegerDotProduct` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderIntegerDotProduct(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderIntegerDotProduct.set(segment, 0L, index, value); } + /// Sets `shaderIntegerDotProduct` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderIntegerDotProduct(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductFeatures.set_shaderIntegerDotProduct(segment, 0L, value); } + /// Sets `shaderIntegerDotProduct` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductFeatures shaderIntegerDotProductAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductFeatures.set_shaderIntegerDotProduct(this.segment(), index, value); return this; } + /// Sets `shaderIntegerDotProduct` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductFeatures shaderIntegerDotProduct(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductFeatures.set_shaderIntegerDotProduct(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderIntegerDotProductProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderIntegerDotProductProperties.java new file mode 100644 index 00000000..8b4fc6b0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderIntegerDotProductProperties.java @@ -0,0 +1,1258 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### integerDotProduct8BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProduct8BitUnsignedAccelerated] - [Getter][#integerDotProduct8BitUnsignedAccelerated()] - [Setter][#integerDotProduct8BitUnsignedAccelerated(int)] +/// ### integerDotProduct8BitSignedAccelerated +/// [VarHandle][#VH_integerDotProduct8BitSignedAccelerated] - [Getter][#integerDotProduct8BitSignedAccelerated()] - [Setter][#integerDotProduct8BitSignedAccelerated(int)] +/// ### integerDotProduct8BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProduct8BitMixedSignednessAccelerated] - [Getter][#integerDotProduct8BitMixedSignednessAccelerated()] - [Setter][#integerDotProduct8BitMixedSignednessAccelerated(int)] +/// ### integerDotProduct4x8BitPackedUnsignedAccelerated +/// [VarHandle][#VH_integerDotProduct4x8BitPackedUnsignedAccelerated] - [Getter][#integerDotProduct4x8BitPackedUnsignedAccelerated()] - [Setter][#integerDotProduct4x8BitPackedUnsignedAccelerated(int)] +/// ### integerDotProduct4x8BitPackedSignedAccelerated +/// [VarHandle][#VH_integerDotProduct4x8BitPackedSignedAccelerated] - [Getter][#integerDotProduct4x8BitPackedSignedAccelerated()] - [Setter][#integerDotProduct4x8BitPackedSignedAccelerated(int)] +/// ### integerDotProduct4x8BitPackedMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProduct4x8BitPackedMixedSignednessAccelerated] - [Getter][#integerDotProduct4x8BitPackedMixedSignednessAccelerated()] - [Setter][#integerDotProduct4x8BitPackedMixedSignednessAccelerated(int)] +/// ### integerDotProduct16BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProduct16BitUnsignedAccelerated] - [Getter][#integerDotProduct16BitUnsignedAccelerated()] - [Setter][#integerDotProduct16BitUnsignedAccelerated(int)] +/// ### integerDotProduct16BitSignedAccelerated +/// [VarHandle][#VH_integerDotProduct16BitSignedAccelerated] - [Getter][#integerDotProduct16BitSignedAccelerated()] - [Setter][#integerDotProduct16BitSignedAccelerated(int)] +/// ### integerDotProduct16BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProduct16BitMixedSignednessAccelerated] - [Getter][#integerDotProduct16BitMixedSignednessAccelerated()] - [Setter][#integerDotProduct16BitMixedSignednessAccelerated(int)] +/// ### integerDotProduct32BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProduct32BitUnsignedAccelerated] - [Getter][#integerDotProduct32BitUnsignedAccelerated()] - [Setter][#integerDotProduct32BitUnsignedAccelerated(int)] +/// ### integerDotProduct32BitSignedAccelerated +/// [VarHandle][#VH_integerDotProduct32BitSignedAccelerated] - [Getter][#integerDotProduct32BitSignedAccelerated()] - [Setter][#integerDotProduct32BitSignedAccelerated(int)] +/// ### integerDotProduct32BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProduct32BitMixedSignednessAccelerated] - [Getter][#integerDotProduct32BitMixedSignednessAccelerated()] - [Setter][#integerDotProduct32BitMixedSignednessAccelerated(int)] +/// ### integerDotProduct64BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProduct64BitUnsignedAccelerated] - [Getter][#integerDotProduct64BitUnsignedAccelerated()] - [Setter][#integerDotProduct64BitUnsignedAccelerated(int)] +/// ### integerDotProduct64BitSignedAccelerated +/// [VarHandle][#VH_integerDotProduct64BitSignedAccelerated] - [Getter][#integerDotProduct64BitSignedAccelerated()] - [Setter][#integerDotProduct64BitSignedAccelerated(int)] +/// ### integerDotProduct64BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProduct64BitMixedSignednessAccelerated] - [Getter][#integerDotProduct64BitMixedSignednessAccelerated()] - [Setter][#integerDotProduct64BitMixedSignednessAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating8BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating8BitUnsignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating8BitSignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating8BitSignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating8BitSignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating8BitSignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated] - [Getter][#integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated] - [Getter][#integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating16BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating16BitUnsignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating16BitSignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating16BitSignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating16BitSignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating16BitSignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated] - [Getter][#integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating32BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating32BitUnsignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating32BitSignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating32BitSignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating32BitSignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating32BitSignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated] - [Getter][#integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating64BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating64BitUnsignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating64BitSignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating64BitSignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating64BitSignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating64BitSignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated] - [Getter][#integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderIntegerDotProductProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 integerDotProduct8BitUnsignedAccelerated; +/// VkBool32 integerDotProduct8BitSignedAccelerated; +/// VkBool32 integerDotProduct8BitMixedSignednessAccelerated; +/// VkBool32 integerDotProduct4x8BitPackedUnsignedAccelerated; +/// VkBool32 integerDotProduct4x8BitPackedSignedAccelerated; +/// VkBool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated; +/// VkBool32 integerDotProduct16BitUnsignedAccelerated; +/// VkBool32 integerDotProduct16BitSignedAccelerated; +/// VkBool32 integerDotProduct16BitMixedSignednessAccelerated; +/// VkBool32 integerDotProduct32BitUnsignedAccelerated; +/// VkBool32 integerDotProduct32BitSignedAccelerated; +/// VkBool32 integerDotProduct32BitMixedSignednessAccelerated; +/// VkBool32 integerDotProduct64BitUnsignedAccelerated; +/// VkBool32 integerDotProduct64BitSignedAccelerated; +/// VkBool32 integerDotProduct64BitMixedSignednessAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; +/// } VkPhysicalDeviceShaderIntegerDotProductProperties; +/// ``` +public final class VkPhysicalDeviceShaderIntegerDotProductProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderIntegerDotProductProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("integerDotProduct8BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct8BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct8BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct4x8BitPackedUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct4x8BitPackedSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct4x8BitPackedMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct16BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct16BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct16BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct32BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct32BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct32BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct64BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct64BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct64BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating8BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating8BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating16BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating16BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating32BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating32BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating64BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating64BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `integerDotProduct8BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct8BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct8BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProduct8BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct8BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct8BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProduct8BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct8BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct8BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProduct4x8BitPackedUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct4x8BitPackedUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct4x8BitPackedUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProduct4x8BitPackedSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct4x8BitPackedSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct4x8BitPackedSignedAccelerated")); + /// The [VarHandle] of `integerDotProduct4x8BitPackedMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct4x8BitPackedMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct4x8BitPackedMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProduct16BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct16BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct16BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProduct16BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct16BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct16BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProduct16BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct16BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct16BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProduct32BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct32BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct32BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProduct32BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct32BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct32BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProduct32BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct32BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct32BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProduct64BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct64BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct64BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProduct64BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct64BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct64BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProduct64BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct64BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct64BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating8BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating8BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating8BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating8BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating16BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating16BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating16BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating16BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating32BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating32BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating32BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating32BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating64BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating64BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating64BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating64BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated")); + + /// Creates `VkPhysicalDeviceShaderIntegerDotProductProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderIntegerDotProductProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderIntegerDotProductProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderIntegerDotProductProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderIntegerDotProductProperties(segment); } + + /// Creates `VkPhysicalDeviceShaderIntegerDotProductProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderIntegerDotProductProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderIntegerDotProductProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderIntegerDotProductProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderIntegerDotProductProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderIntegerDotProductProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderIntegerDotProductProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderIntegerDotProductProperties` + public static VkPhysicalDeviceShaderIntegerDotProductProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderIntegerDotProductProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderIntegerDotProductProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderIntegerDotProductProperties` + public static VkPhysicalDeviceShaderIntegerDotProductProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderIntegerDotProductProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `integerDotProduct8BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct8BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct8BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct8BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct8BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct8BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct8BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct8BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct8BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct8BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProduct8BitUnsignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct8BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProduct8BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct8BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct8BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct8BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct8BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct8BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct8BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct8BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct8BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct8BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct8BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct8BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct8BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct8BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct8BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct8BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct8BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct8BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct8BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct8BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct8BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct8BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProduct8BitSignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct8BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProduct8BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct8BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct8BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct8BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct8BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct8BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct8BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct8BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct8BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct8BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct8BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct8BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct8BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct8BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct8BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct8BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct8BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct8BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProduct8BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct8BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct8BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProduct8BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProduct8BitMixedSignednessAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct8BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProduct8BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct8BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct8BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct8BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct8BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct8BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct8BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct8BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct8BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct8BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct8BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct8BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct4x8BitPackedUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct4x8BitPackedUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct4x8BitPackedUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct4x8BitPackedUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct4x8BitPackedUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct4x8BitPackedUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct4x8BitPackedUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct4x8BitPackedUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProduct4x8BitPackedUnsignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct4x8BitPackedUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProduct4x8BitPackedUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct4x8BitPackedUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct4x8BitPackedUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct4x8BitPackedUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct4x8BitPackedUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct4x8BitPackedUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct4x8BitPackedUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct4x8BitPackedUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct4x8BitPackedUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct4x8BitPackedUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct4x8BitPackedUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct4x8BitPackedUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct4x8BitPackedSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct4x8BitPackedSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct4x8BitPackedSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct4x8BitPackedSignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct4x8BitPackedSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct4x8BitPackedSignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct4x8BitPackedSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct4x8BitPackedSignedAccelerated`} + public @CType("VkBool32") int integerDotProduct4x8BitPackedSignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct4x8BitPackedSignedAccelerated(this.segment()); } + /// Sets `integerDotProduct4x8BitPackedSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct4x8BitPackedSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct4x8BitPackedSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct4x8BitPackedSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct4x8BitPackedSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct4x8BitPackedSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct4x8BitPackedSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct4x8BitPackedSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct4x8BitPackedSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct4x8BitPackedSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct4x8BitPackedSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct4x8BitPackedSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct4x8BitPackedMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct4x8BitPackedMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct4x8BitPackedMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct4x8BitPackedMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProduct4x8BitPackedMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct4x8BitPackedMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct4x8BitPackedMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProduct4x8BitPackedMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProduct4x8BitPackedMixedSignednessAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct4x8BitPackedMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProduct4x8BitPackedMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct4x8BitPackedMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct4x8BitPackedMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct4x8BitPackedMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct4x8BitPackedMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct4x8BitPackedMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct4x8BitPackedMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct4x8BitPackedMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct4x8BitPackedMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct4x8BitPackedMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct16BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct16BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct16BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct16BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct16BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct16BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct16BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct16BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct16BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct16BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProduct16BitUnsignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct16BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProduct16BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct16BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct16BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct16BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct16BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct16BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct16BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct16BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct16BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct16BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct16BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct16BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct16BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct16BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct16BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct16BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct16BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct16BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct16BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct16BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct16BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct16BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProduct16BitSignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct16BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProduct16BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct16BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct16BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct16BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct16BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct16BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct16BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct16BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct16BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct16BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct16BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct16BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct16BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct16BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct16BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct16BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct16BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct16BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProduct16BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct16BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct16BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProduct16BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProduct16BitMixedSignednessAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct16BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProduct16BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct16BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct16BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct16BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct16BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct16BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct16BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct16BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct16BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct16BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct16BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct16BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct32BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct32BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct32BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct32BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct32BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct32BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct32BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct32BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct32BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct32BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProduct32BitUnsignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct32BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProduct32BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct32BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct32BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct32BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct32BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct32BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct32BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct32BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct32BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct32BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct32BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct32BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct32BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct32BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct32BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct32BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct32BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct32BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct32BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct32BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct32BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct32BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProduct32BitSignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct32BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProduct32BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct32BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct32BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct32BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct32BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct32BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct32BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct32BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct32BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct32BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct32BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct32BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct32BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct32BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct32BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct32BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct32BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct32BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProduct32BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct32BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct32BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProduct32BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProduct32BitMixedSignednessAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct32BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProduct32BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct32BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct32BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct32BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct32BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct32BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct32BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct32BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct32BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct32BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct32BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct32BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct64BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct64BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct64BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct64BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct64BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct64BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct64BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct64BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct64BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct64BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProduct64BitUnsignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct64BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProduct64BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct64BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct64BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct64BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct64BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct64BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct64BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct64BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct64BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct64BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct64BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct64BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct64BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct64BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct64BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct64BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct64BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct64BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct64BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct64BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct64BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct64BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProduct64BitSignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct64BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProduct64BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct64BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct64BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct64BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct64BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct64BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct64BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct64BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct64BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct64BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct64BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct64BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct64BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct64BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct64BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct64BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct64BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct64BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProduct64BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct64BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct64BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProduct64BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProduct64BitMixedSignednessAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProduct64BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProduct64BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct64BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct64BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct64BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct64BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct64BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct64BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct64BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct64BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct64BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProduct64BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProduct64BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitUnsignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating8BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating8BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating8BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating8BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating8BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating8BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating8BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating8BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitSignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating8BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating8BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating8BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating8BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating8BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating8BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating8BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating8BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating8BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating8BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedSignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating4x8BitPackedSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitUnsignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating16BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating16BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating16BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating16BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating16BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating16BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating16BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating16BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitSignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating16BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating16BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating16BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating16BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating16BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating16BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating16BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating16BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating16BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating16BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitUnsignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating32BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating32BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating32BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating32BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating32BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating32BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating32BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating32BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitSignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating32BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating32BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating32BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating32BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating32BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating32BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating32BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating32BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating32BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating32BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitUnsignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating64BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating64BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating64BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating64BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating64BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating64BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating64BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating64BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitSignedAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating64BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating64BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating64BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating64BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating64BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating64BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating64BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating64BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating64BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated() { return VkPhysicalDeviceShaderIntegerDotProductProperties.get_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating64BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderIntegerDotProductProperties integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceShaderIntegerDotProductProperties.set_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.java new file mode 100644 index 00000000..839287d6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderSubgroupExtendedTypes +/// [VarHandle][#VH_shaderSubgroupExtendedTypes] - [Getter][#shaderSubgroupExtendedTypes()] - [Setter][#shaderSubgroupExtendedTypes(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderSubgroupExtendedTypes; +/// } VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures; +/// ``` +public final class VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderSubgroupExtendedTypes") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderSubgroupExtendedTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSubgroupExtendedTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSubgroupExtendedTypes")); + + /// Creates `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(segment); } + + /// Creates `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures` + public static VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures` + public static VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderSubgroupExtendedTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSubgroupExtendedTypes(MemorySegment segment, long index) { return (int) VH_shaderSubgroupExtendedTypes.get(segment, 0L, index); } + /// {@return `shaderSubgroupExtendedTypes`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSubgroupExtendedTypes(MemorySegment segment) { return VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.get_shaderSubgroupExtendedTypes(segment, 0L); } + /// {@return `shaderSubgroupExtendedTypes` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSubgroupExtendedTypesAt(long index) { return VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.get_shaderSubgroupExtendedTypes(this.segment(), index); } + /// {@return `shaderSubgroupExtendedTypes`} + public @CType("VkBool32") int shaderSubgroupExtendedTypes() { return VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.get_shaderSubgroupExtendedTypes(this.segment()); } + /// Sets `shaderSubgroupExtendedTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSubgroupExtendedTypes(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSubgroupExtendedTypes.set(segment, 0L, index, value); } + /// Sets `shaderSubgroupExtendedTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSubgroupExtendedTypes(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.set_shaderSubgroupExtendedTypes(segment, 0L, value); } + /// Sets `shaderSubgroupExtendedTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures shaderSubgroupExtendedTypesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.set_shaderSubgroupExtendedTypes(this.segment(), index, value); return this; } + /// Sets `shaderSubgroupExtendedTypes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures shaderSubgroupExtendedTypes(@CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.set_shaderSubgroupExtendedTypes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderSubgroupRotateFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderSubgroupRotateFeatures.java new file mode 100644 index 00000000..398991fd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderSubgroupRotateFeatures.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderSubgroupRotate +/// [VarHandle][#VH_shaderSubgroupRotate] - [Getter][#shaderSubgroupRotate()] - [Setter][#shaderSubgroupRotate(int)] +/// ### shaderSubgroupRotateClustered +/// [VarHandle][#VH_shaderSubgroupRotateClustered] - [Getter][#shaderSubgroupRotateClustered()] - [Setter][#shaderSubgroupRotateClustered(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderSubgroupRotateFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderSubgroupRotate; +/// VkBool32 shaderSubgroupRotateClustered; +/// } VkPhysicalDeviceShaderSubgroupRotateFeatures; +/// ``` +public final class VkPhysicalDeviceShaderSubgroupRotateFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderSubgroupRotateFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderSubgroupRotate"), + ValueLayout.JAVA_INT.withName("shaderSubgroupRotateClustered") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderSubgroupRotate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSubgroupRotate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSubgroupRotate")); + /// The [VarHandle] of `shaderSubgroupRotateClustered` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSubgroupRotateClustered = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSubgroupRotateClustered")); + + /// Creates `VkPhysicalDeviceShaderSubgroupRotateFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderSubgroupRotateFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderSubgroupRotateFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSubgroupRotateFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSubgroupRotateFeatures(segment); } + + /// Creates `VkPhysicalDeviceShaderSubgroupRotateFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSubgroupRotateFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSubgroupRotateFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderSubgroupRotateFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderSubgroupRotateFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderSubgroupRotateFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderSubgroupRotateFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderSubgroupRotateFeatures` + public static VkPhysicalDeviceShaderSubgroupRotateFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderSubgroupRotateFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderSubgroupRotateFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderSubgroupRotateFeatures` + public static VkPhysicalDeviceShaderSubgroupRotateFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderSubgroupRotateFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupRotateFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupRotateFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupRotateFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupRotateFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderSubgroupRotate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSubgroupRotate(MemorySegment segment, long index) { return (int) VH_shaderSubgroupRotate.get(segment, 0L, index); } + /// {@return `shaderSubgroupRotate`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSubgroupRotate(MemorySegment segment) { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_shaderSubgroupRotate(segment, 0L); } + /// {@return `shaderSubgroupRotate` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSubgroupRotateAt(long index) { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_shaderSubgroupRotate(this.segment(), index); } + /// {@return `shaderSubgroupRotate`} + public @CType("VkBool32") int shaderSubgroupRotate() { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_shaderSubgroupRotate(this.segment()); } + /// Sets `shaderSubgroupRotate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSubgroupRotate(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSubgroupRotate.set(segment, 0L, index, value); } + /// Sets `shaderSubgroupRotate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSubgroupRotate(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_shaderSubgroupRotate(segment, 0L, value); } + /// Sets `shaderSubgroupRotate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupRotateFeatures shaderSubgroupRotateAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_shaderSubgroupRotate(this.segment(), index, value); return this; } + /// Sets `shaderSubgroupRotate` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupRotateFeatures shaderSubgroupRotate(@CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_shaderSubgroupRotate(this.segment(), value); return this; } + + /// {@return `shaderSubgroupRotateClustered` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSubgroupRotateClustered(MemorySegment segment, long index) { return (int) VH_shaderSubgroupRotateClustered.get(segment, 0L, index); } + /// {@return `shaderSubgroupRotateClustered`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSubgroupRotateClustered(MemorySegment segment) { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_shaderSubgroupRotateClustered(segment, 0L); } + /// {@return `shaderSubgroupRotateClustered` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSubgroupRotateClusteredAt(long index) { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_shaderSubgroupRotateClustered(this.segment(), index); } + /// {@return `shaderSubgroupRotateClustered`} + public @CType("VkBool32") int shaderSubgroupRotateClustered() { return VkPhysicalDeviceShaderSubgroupRotateFeatures.get_shaderSubgroupRotateClustered(this.segment()); } + /// Sets `shaderSubgroupRotateClustered` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSubgroupRotateClustered(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSubgroupRotateClustered.set(segment, 0L, index, value); } + /// Sets `shaderSubgroupRotateClustered` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSubgroupRotateClustered(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_shaderSubgroupRotateClustered(segment, 0L, value); } + /// Sets `shaderSubgroupRotateClustered` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupRotateFeatures shaderSubgroupRotateClusteredAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_shaderSubgroupRotateClustered(this.segment(), index, value); return this; } + /// Sets `shaderSubgroupRotateClustered` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderSubgroupRotateFeatures shaderSubgroupRotateClustered(@CType("VkBool32") int value) { VkPhysicalDeviceShaderSubgroupRotateFeatures.set_shaderSubgroupRotateClustered(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderTerminateInvocationFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderTerminateInvocationFeatures.java new file mode 100644 index 00000000..609268a8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceShaderTerminateInvocationFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderTerminateInvocation +/// [VarHandle][#VH_shaderTerminateInvocation] - [Getter][#shaderTerminateInvocation()] - [Setter][#shaderTerminateInvocation(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceShaderTerminateInvocationFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderTerminateInvocation; +/// } VkPhysicalDeviceShaderTerminateInvocationFeatures; +/// ``` +public final class VkPhysicalDeviceShaderTerminateInvocationFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceShaderTerminateInvocationFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderTerminateInvocation") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderTerminateInvocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderTerminateInvocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderTerminateInvocation")); + + /// Creates `VkPhysicalDeviceShaderTerminateInvocationFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceShaderTerminateInvocationFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceShaderTerminateInvocationFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderTerminateInvocationFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderTerminateInvocationFeatures(segment); } + + /// Creates `VkPhysicalDeviceShaderTerminateInvocationFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderTerminateInvocationFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderTerminateInvocationFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceShaderTerminateInvocationFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceShaderTerminateInvocationFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceShaderTerminateInvocationFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceShaderTerminateInvocationFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceShaderTerminateInvocationFeatures` + public static VkPhysicalDeviceShaderTerminateInvocationFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceShaderTerminateInvocationFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceShaderTerminateInvocationFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceShaderTerminateInvocationFeatures` + public static VkPhysicalDeviceShaderTerminateInvocationFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceShaderTerminateInvocationFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceShaderTerminateInvocationFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceShaderTerminateInvocationFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceShaderTerminateInvocationFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderTerminateInvocationFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTerminateInvocationFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceShaderTerminateInvocationFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTerminateInvocationFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceShaderTerminateInvocationFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceShaderTerminateInvocationFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceShaderTerminateInvocationFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceShaderTerminateInvocationFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderTerminateInvocationFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTerminateInvocationFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderTerminateInvocationFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTerminateInvocationFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceShaderTerminateInvocationFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderTerminateInvocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderTerminateInvocation(MemorySegment segment, long index) { return (int) VH_shaderTerminateInvocation.get(segment, 0L, index); } + /// {@return `shaderTerminateInvocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderTerminateInvocation(MemorySegment segment) { return VkPhysicalDeviceShaderTerminateInvocationFeatures.get_shaderTerminateInvocation(segment, 0L); } + /// {@return `shaderTerminateInvocation` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderTerminateInvocationAt(long index) { return VkPhysicalDeviceShaderTerminateInvocationFeatures.get_shaderTerminateInvocation(this.segment(), index); } + /// {@return `shaderTerminateInvocation`} + public @CType("VkBool32") int shaderTerminateInvocation() { return VkPhysicalDeviceShaderTerminateInvocationFeatures.get_shaderTerminateInvocation(this.segment()); } + /// Sets `shaderTerminateInvocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderTerminateInvocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderTerminateInvocation.set(segment, 0L, index, value); } + /// Sets `shaderTerminateInvocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderTerminateInvocation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTerminateInvocationFeatures.set_shaderTerminateInvocation(segment, 0L, value); } + /// Sets `shaderTerminateInvocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTerminateInvocationFeatures shaderTerminateInvocationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceShaderTerminateInvocationFeatures.set_shaderTerminateInvocation(this.segment(), index, value); return this; } + /// Sets `shaderTerminateInvocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceShaderTerminateInvocationFeatures shaderTerminateInvocation(@CType("VkBool32") int value) { VkPhysicalDeviceShaderTerminateInvocationFeatures.set_shaderTerminateInvocation(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSparseImageFormatInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSparseImageFormatInfo2.java new file mode 100644 index 00000000..bcb6f3a4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSparseImageFormatInfo2.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### type +/// [VarHandle][#VH_type] - [Getter][#type()] - [Setter][#type(int)] +/// ### samples +/// [VarHandle][#VH_samples] - [Getter][#samples()] - [Setter][#samples(int)] +/// ### usage +/// [VarHandle][#VH_usage] - [Getter][#usage()] - [Setter][#usage(int)] +/// ### tiling +/// [VarHandle][#VH_tiling] - [Getter][#tiling()] - [Setter][#tiling(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSparseImageFormatInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkFormat format; +/// VkImageType type; +/// VkSampleCountFlagBits samples; +/// VkImageUsageFlags usage; +/// VkImageTiling tiling; +/// } VkPhysicalDeviceSparseImageFormatInfo2; +/// ``` +public final class VkPhysicalDeviceSparseImageFormatInfo2 extends Struct { + /// The struct layout of `VkPhysicalDeviceSparseImageFormatInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_INT.withName("type"), + ValueLayout.JAVA_INT.withName("samples"), + ValueLayout.JAVA_INT.withName("usage"), + ValueLayout.JAVA_INT.withName("tiling") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("type")); + /// The [VarHandle] of `samples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samples")); + /// The [VarHandle] of `usage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usage")); + /// The [VarHandle] of `tiling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tiling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tiling")); + + /// Creates `VkPhysicalDeviceSparseImageFormatInfo2` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSparseImageFormatInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSparseImageFormatInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSparseImageFormatInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSparseImageFormatInfo2(segment); } + + /// Creates `VkPhysicalDeviceSparseImageFormatInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSparseImageFormatInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSparseImageFormatInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSparseImageFormatInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSparseImageFormatInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSparseImageFormatInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSparseImageFormatInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSparseImageFormatInfo2` + public static VkPhysicalDeviceSparseImageFormatInfo2 alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSparseImageFormatInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSparseImageFormatInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSparseImageFormatInfo2` + public static VkPhysicalDeviceSparseImageFormatInfo2 alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSparseImageFormatInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSparseImageFormatInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSparseImageFormatInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSparseImageFormatInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSparseImageFormatInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSparseImageFormatInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSparseImageFormatInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSparseImageFormatInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSparseImageFormatInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSparseImageFormatInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkPhysicalDeviceSparseImageFormatInfo2.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkPhysicalDeviceSparseImageFormatInfo2.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkPhysicalDeviceSparseImageFormatInfo2.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 formatAt(long index, @CType("VkFormat") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 format(@CType("VkFormat") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_format(this.segment(), value); return this; } + + /// {@return `type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageType") int get_type(MemorySegment segment, long index) { return (int) VH_type.get(segment, 0L, index); } + /// {@return `type`} + /// @param segment the segment of the struct + public static @CType("VkImageType") int get_type(MemorySegment segment) { return VkPhysicalDeviceSparseImageFormatInfo2.get_type(segment, 0L); } + /// {@return `type` at the given index} + /// @param index the index + public @CType("VkImageType") int typeAt(long index) { return VkPhysicalDeviceSparseImageFormatInfo2.get_type(this.segment(), index); } + /// {@return `type`} + public @CType("VkImageType") int type() { return VkPhysicalDeviceSparseImageFormatInfo2.get_type(this.segment()); } + /// Sets `type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_type(MemorySegment segment, long index, @CType("VkImageType") int value) { VH_type.set(segment, 0L, index, value); } + /// Sets `type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_type(MemorySegment segment, @CType("VkImageType") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_type(segment, 0L, value); } + /// Sets `type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 typeAt(long index, @CType("VkImageType") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_type(this.segment(), index, value); return this; } + /// Sets `type` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 type(@CType("VkImageType") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_type(this.segment(), value); return this; } + + /// {@return `samples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_samples(MemorySegment segment, long index) { return (int) VH_samples.get(segment, 0L, index); } + /// {@return `samples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_samples(MemorySegment segment) { return VkPhysicalDeviceSparseImageFormatInfo2.get_samples(segment, 0L); } + /// {@return `samples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int samplesAt(long index) { return VkPhysicalDeviceSparseImageFormatInfo2.get_samples(this.segment(), index); } + /// {@return `samples`} + public @CType("VkSampleCountFlagBits") int samples() { return VkPhysicalDeviceSparseImageFormatInfo2.get_samples(this.segment()); } + /// Sets `samples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samples(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_samples.set(segment, 0L, index, value); } + /// Sets `samples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samples(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_samples(segment, 0L, value); } + /// Sets `samples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 samplesAt(long index, @CType("VkSampleCountFlagBits") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_samples(this.segment(), index, value); return this; } + /// Sets `samples` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 samples(@CType("VkSampleCountFlagBits") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_samples(this.segment(), value); return this; } + + /// {@return `usage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageUsageFlags") int get_usage(MemorySegment segment, long index) { return (int) VH_usage.get(segment, 0L, index); } + /// {@return `usage`} + /// @param segment the segment of the struct + public static @CType("VkImageUsageFlags") int get_usage(MemorySegment segment) { return VkPhysicalDeviceSparseImageFormatInfo2.get_usage(segment, 0L); } + /// {@return `usage` at the given index} + /// @param index the index + public @CType("VkImageUsageFlags") int usageAt(long index) { return VkPhysicalDeviceSparseImageFormatInfo2.get_usage(this.segment(), index); } + /// {@return `usage`} + public @CType("VkImageUsageFlags") int usage() { return VkPhysicalDeviceSparseImageFormatInfo2.get_usage(this.segment()); } + /// Sets `usage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usage(MemorySegment segment, long index, @CType("VkImageUsageFlags") int value) { VH_usage.set(segment, 0L, index, value); } + /// Sets `usage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usage(MemorySegment segment, @CType("VkImageUsageFlags") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_usage(segment, 0L, value); } + /// Sets `usage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 usageAt(long index, @CType("VkImageUsageFlags") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_usage(this.segment(), index, value); return this; } + /// Sets `usage` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 usage(@CType("VkImageUsageFlags") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_usage(this.segment(), value); return this; } + + /// {@return `tiling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageTiling") int get_tiling(MemorySegment segment, long index) { return (int) VH_tiling.get(segment, 0L, index); } + /// {@return `tiling`} + /// @param segment the segment of the struct + public static @CType("VkImageTiling") int get_tiling(MemorySegment segment) { return VkPhysicalDeviceSparseImageFormatInfo2.get_tiling(segment, 0L); } + /// {@return `tiling` at the given index} + /// @param index the index + public @CType("VkImageTiling") int tilingAt(long index) { return VkPhysicalDeviceSparseImageFormatInfo2.get_tiling(this.segment(), index); } + /// {@return `tiling`} + public @CType("VkImageTiling") int tiling() { return VkPhysicalDeviceSparseImageFormatInfo2.get_tiling(this.segment()); } + /// Sets `tiling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tiling(MemorySegment segment, long index, @CType("VkImageTiling") int value) { VH_tiling.set(segment, 0L, index, value); } + /// Sets `tiling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tiling(MemorySegment segment, @CType("VkImageTiling") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_tiling(segment, 0L, value); } + /// Sets `tiling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 tilingAt(long index, @CType("VkImageTiling") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_tiling(this.segment(), index, value); return this; } + /// Sets `tiling` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseImageFormatInfo2 tiling(@CType("VkImageTiling") int value) { VkPhysicalDeviceSparseImageFormatInfo2.set_tiling(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSparseProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSparseProperties.java new file mode 100644 index 00000000..4d4f830b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSparseProperties.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### residencyStandard2DBlockShape +/// [VarHandle][#VH_residencyStandard2DBlockShape] - [Getter][#residencyStandard2DBlockShape()] - [Setter][#residencyStandard2DBlockShape(int)] +/// ### residencyStandard2DMultisampleBlockShape +/// [VarHandle][#VH_residencyStandard2DMultisampleBlockShape] - [Getter][#residencyStandard2DMultisampleBlockShape()] - [Setter][#residencyStandard2DMultisampleBlockShape(int)] +/// ### residencyStandard3DBlockShape +/// [VarHandle][#VH_residencyStandard3DBlockShape] - [Getter][#residencyStandard3DBlockShape()] - [Setter][#residencyStandard3DBlockShape(int)] +/// ### residencyAlignedMipSize +/// [VarHandle][#VH_residencyAlignedMipSize] - [Getter][#residencyAlignedMipSize()] - [Setter][#residencyAlignedMipSize(int)] +/// ### residencyNonResidentStrict +/// [VarHandle][#VH_residencyNonResidentStrict] - [Getter][#residencyNonResidentStrict()] - [Setter][#residencyNonResidentStrict(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSparseProperties { +/// VkBool32 residencyStandard2DBlockShape; +/// VkBool32 residencyStandard2DMultisampleBlockShape; +/// VkBool32 residencyStandard3DBlockShape; +/// VkBool32 residencyAlignedMipSize; +/// VkBool32 residencyNonResidentStrict; +/// } VkPhysicalDeviceSparseProperties; +/// ``` +public final class VkPhysicalDeviceSparseProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceSparseProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("residencyStandard2DBlockShape"), + ValueLayout.JAVA_INT.withName("residencyStandard2DMultisampleBlockShape"), + ValueLayout.JAVA_INT.withName("residencyStandard3DBlockShape"), + ValueLayout.JAVA_INT.withName("residencyAlignedMipSize"), + ValueLayout.JAVA_INT.withName("residencyNonResidentStrict") + ); + /// The [VarHandle] of `residencyStandard2DBlockShape` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_residencyStandard2DBlockShape = LAYOUT.arrayElementVarHandle(PathElement.groupElement("residencyStandard2DBlockShape")); + /// The [VarHandle] of `residencyStandard2DMultisampleBlockShape` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_residencyStandard2DMultisampleBlockShape = LAYOUT.arrayElementVarHandle(PathElement.groupElement("residencyStandard2DMultisampleBlockShape")); + /// The [VarHandle] of `residencyStandard3DBlockShape` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_residencyStandard3DBlockShape = LAYOUT.arrayElementVarHandle(PathElement.groupElement("residencyStandard3DBlockShape")); + /// The [VarHandle] of `residencyAlignedMipSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_residencyAlignedMipSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("residencyAlignedMipSize")); + /// The [VarHandle] of `residencyNonResidentStrict` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_residencyNonResidentStrict = LAYOUT.arrayElementVarHandle(PathElement.groupElement("residencyNonResidentStrict")); + + /// Creates `VkPhysicalDeviceSparseProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSparseProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSparseProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSparseProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSparseProperties(segment); } + + /// Creates `VkPhysicalDeviceSparseProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSparseProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSparseProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSparseProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSparseProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSparseProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSparseProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSparseProperties` + public static VkPhysicalDeviceSparseProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSparseProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSparseProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSparseProperties` + public static VkPhysicalDeviceSparseProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSparseProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `residencyStandard2DBlockShape` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_residencyStandard2DBlockShape(MemorySegment segment, long index) { return (int) VH_residencyStandard2DBlockShape.get(segment, 0L, index); } + /// {@return `residencyStandard2DBlockShape`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_residencyStandard2DBlockShape(MemorySegment segment) { return VkPhysicalDeviceSparseProperties.get_residencyStandard2DBlockShape(segment, 0L); } + /// {@return `residencyStandard2DBlockShape` at the given index} + /// @param index the index + public @CType("VkBool32") int residencyStandard2DBlockShapeAt(long index) { return VkPhysicalDeviceSparseProperties.get_residencyStandard2DBlockShape(this.segment(), index); } + /// {@return `residencyStandard2DBlockShape`} + public @CType("VkBool32") int residencyStandard2DBlockShape() { return VkPhysicalDeviceSparseProperties.get_residencyStandard2DBlockShape(this.segment()); } + /// Sets `residencyStandard2DBlockShape` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_residencyStandard2DBlockShape(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_residencyStandard2DBlockShape.set(segment, 0L, index, value); } + /// Sets `residencyStandard2DBlockShape` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_residencyStandard2DBlockShape(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyStandard2DBlockShape(segment, 0L, value); } + /// Sets `residencyStandard2DBlockShape` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseProperties residencyStandard2DBlockShapeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyStandard2DBlockShape(this.segment(), index, value); return this; } + /// Sets `residencyStandard2DBlockShape` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseProperties residencyStandard2DBlockShape(@CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyStandard2DBlockShape(this.segment(), value); return this; } + + /// {@return `residencyStandard2DMultisampleBlockShape` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_residencyStandard2DMultisampleBlockShape(MemorySegment segment, long index) { return (int) VH_residencyStandard2DMultisampleBlockShape.get(segment, 0L, index); } + /// {@return `residencyStandard2DMultisampleBlockShape`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_residencyStandard2DMultisampleBlockShape(MemorySegment segment) { return VkPhysicalDeviceSparseProperties.get_residencyStandard2DMultisampleBlockShape(segment, 0L); } + /// {@return `residencyStandard2DMultisampleBlockShape` at the given index} + /// @param index the index + public @CType("VkBool32") int residencyStandard2DMultisampleBlockShapeAt(long index) { return VkPhysicalDeviceSparseProperties.get_residencyStandard2DMultisampleBlockShape(this.segment(), index); } + /// {@return `residencyStandard2DMultisampleBlockShape`} + public @CType("VkBool32") int residencyStandard2DMultisampleBlockShape() { return VkPhysicalDeviceSparseProperties.get_residencyStandard2DMultisampleBlockShape(this.segment()); } + /// Sets `residencyStandard2DMultisampleBlockShape` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_residencyStandard2DMultisampleBlockShape(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_residencyStandard2DMultisampleBlockShape.set(segment, 0L, index, value); } + /// Sets `residencyStandard2DMultisampleBlockShape` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_residencyStandard2DMultisampleBlockShape(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyStandard2DMultisampleBlockShape(segment, 0L, value); } + /// Sets `residencyStandard2DMultisampleBlockShape` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseProperties residencyStandard2DMultisampleBlockShapeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyStandard2DMultisampleBlockShape(this.segment(), index, value); return this; } + /// Sets `residencyStandard2DMultisampleBlockShape` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseProperties residencyStandard2DMultisampleBlockShape(@CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyStandard2DMultisampleBlockShape(this.segment(), value); return this; } + + /// {@return `residencyStandard3DBlockShape` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_residencyStandard3DBlockShape(MemorySegment segment, long index) { return (int) VH_residencyStandard3DBlockShape.get(segment, 0L, index); } + /// {@return `residencyStandard3DBlockShape`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_residencyStandard3DBlockShape(MemorySegment segment) { return VkPhysicalDeviceSparseProperties.get_residencyStandard3DBlockShape(segment, 0L); } + /// {@return `residencyStandard3DBlockShape` at the given index} + /// @param index the index + public @CType("VkBool32") int residencyStandard3DBlockShapeAt(long index) { return VkPhysicalDeviceSparseProperties.get_residencyStandard3DBlockShape(this.segment(), index); } + /// {@return `residencyStandard3DBlockShape`} + public @CType("VkBool32") int residencyStandard3DBlockShape() { return VkPhysicalDeviceSparseProperties.get_residencyStandard3DBlockShape(this.segment()); } + /// Sets `residencyStandard3DBlockShape` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_residencyStandard3DBlockShape(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_residencyStandard3DBlockShape.set(segment, 0L, index, value); } + /// Sets `residencyStandard3DBlockShape` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_residencyStandard3DBlockShape(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyStandard3DBlockShape(segment, 0L, value); } + /// Sets `residencyStandard3DBlockShape` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseProperties residencyStandard3DBlockShapeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyStandard3DBlockShape(this.segment(), index, value); return this; } + /// Sets `residencyStandard3DBlockShape` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseProperties residencyStandard3DBlockShape(@CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyStandard3DBlockShape(this.segment(), value); return this; } + + /// {@return `residencyAlignedMipSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_residencyAlignedMipSize(MemorySegment segment, long index) { return (int) VH_residencyAlignedMipSize.get(segment, 0L, index); } + /// {@return `residencyAlignedMipSize`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_residencyAlignedMipSize(MemorySegment segment) { return VkPhysicalDeviceSparseProperties.get_residencyAlignedMipSize(segment, 0L); } + /// {@return `residencyAlignedMipSize` at the given index} + /// @param index the index + public @CType("VkBool32") int residencyAlignedMipSizeAt(long index) { return VkPhysicalDeviceSparseProperties.get_residencyAlignedMipSize(this.segment(), index); } + /// {@return `residencyAlignedMipSize`} + public @CType("VkBool32") int residencyAlignedMipSize() { return VkPhysicalDeviceSparseProperties.get_residencyAlignedMipSize(this.segment()); } + /// Sets `residencyAlignedMipSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_residencyAlignedMipSize(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_residencyAlignedMipSize.set(segment, 0L, index, value); } + /// Sets `residencyAlignedMipSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_residencyAlignedMipSize(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyAlignedMipSize(segment, 0L, value); } + /// Sets `residencyAlignedMipSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseProperties residencyAlignedMipSizeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyAlignedMipSize(this.segment(), index, value); return this; } + /// Sets `residencyAlignedMipSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseProperties residencyAlignedMipSize(@CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyAlignedMipSize(this.segment(), value); return this; } + + /// {@return `residencyNonResidentStrict` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_residencyNonResidentStrict(MemorySegment segment, long index) { return (int) VH_residencyNonResidentStrict.get(segment, 0L, index); } + /// {@return `residencyNonResidentStrict`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_residencyNonResidentStrict(MemorySegment segment) { return VkPhysicalDeviceSparseProperties.get_residencyNonResidentStrict(segment, 0L); } + /// {@return `residencyNonResidentStrict` at the given index} + /// @param index the index + public @CType("VkBool32") int residencyNonResidentStrictAt(long index) { return VkPhysicalDeviceSparseProperties.get_residencyNonResidentStrict(this.segment(), index); } + /// {@return `residencyNonResidentStrict`} + public @CType("VkBool32") int residencyNonResidentStrict() { return VkPhysicalDeviceSparseProperties.get_residencyNonResidentStrict(this.segment()); } + /// Sets `residencyNonResidentStrict` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_residencyNonResidentStrict(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_residencyNonResidentStrict.set(segment, 0L, index, value); } + /// Sets `residencyNonResidentStrict` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_residencyNonResidentStrict(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyNonResidentStrict(segment, 0L, value); } + /// Sets `residencyNonResidentStrict` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseProperties residencyNonResidentStrictAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyNonResidentStrict(this.segment(), index, value); return this; } + /// Sets `residencyNonResidentStrict` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSparseProperties residencyNonResidentStrict(@CType("VkBool32") int value) { VkPhysicalDeviceSparseProperties.set_residencyNonResidentStrict(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSubgroupProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSubgroupProperties.java new file mode 100644 index 00000000..912a67b9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSubgroupProperties.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### subgroupSize +/// [VarHandle][#VH_subgroupSize] - [Getter][#subgroupSize()] - [Setter][#subgroupSize(int)] +/// ### supportedStages +/// [VarHandle][#VH_supportedStages] - [Getter][#supportedStages()] - [Setter][#supportedStages(int)] +/// ### supportedOperations +/// [VarHandle][#VH_supportedOperations] - [Getter][#supportedOperations()] - [Setter][#supportedOperations(int)] +/// ### quadOperationsInAllStages +/// [VarHandle][#VH_quadOperationsInAllStages] - [Getter][#quadOperationsInAllStages()] - [Setter][#quadOperationsInAllStages(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSubgroupProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t subgroupSize; +/// VkShaderStageFlags supportedStages; +/// VkSubgroupFeatureFlags supportedOperations; +/// VkBool32 quadOperationsInAllStages; +/// } VkPhysicalDeviceSubgroupProperties; +/// ``` +public final class VkPhysicalDeviceSubgroupProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceSubgroupProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("subgroupSize"), + ValueLayout.JAVA_INT.withName("supportedStages"), + ValueLayout.JAVA_INT.withName("supportedOperations"), + ValueLayout.JAVA_INT.withName("quadOperationsInAllStages") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `subgroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subgroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subgroupSize")); + /// The [VarHandle] of `supportedStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedStages")); + /// The [VarHandle] of `supportedOperations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedOperations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedOperations")); + /// The [VarHandle] of `quadOperationsInAllStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_quadOperationsInAllStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("quadOperationsInAllStages")); + + /// Creates `VkPhysicalDeviceSubgroupProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSubgroupProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSubgroupProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubgroupProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubgroupProperties(segment); } + + /// Creates `VkPhysicalDeviceSubgroupProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubgroupProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubgroupProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSubgroupProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubgroupProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubgroupProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSubgroupProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSubgroupProperties` + public static VkPhysicalDeviceSubgroupProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSubgroupProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSubgroupProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSubgroupProperties` + public static VkPhysicalDeviceSubgroupProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSubgroupProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSubgroupProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSubgroupProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSubgroupProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSubgroupProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSubgroupProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSubgroupProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSubgroupProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSubgroupProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSubgroupProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubgroupProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubgroupProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubgroupProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `subgroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subgroupSize(MemorySegment segment, long index) { return (int) VH_subgroupSize.get(segment, 0L, index); } + /// {@return `subgroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subgroupSize(MemorySegment segment) { return VkPhysicalDeviceSubgroupProperties.get_subgroupSize(segment, 0L); } + /// {@return `subgroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int subgroupSizeAt(long index) { return VkPhysicalDeviceSubgroupProperties.get_subgroupSize(this.segment(), index); } + /// {@return `subgroupSize`} + public @CType("uint32_t") int subgroupSize() { return VkPhysicalDeviceSubgroupProperties.get_subgroupSize(this.segment()); } + /// Sets `subgroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subgroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subgroupSize.set(segment, 0L, index, value); } + /// Sets `subgroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subgroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceSubgroupProperties.set_subgroupSize(segment, 0L, value); } + /// Sets `subgroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties subgroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceSubgroupProperties.set_subgroupSize(this.segment(), index, value); return this; } + /// Sets `subgroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties subgroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceSubgroupProperties.set_subgroupSize(this.segment(), value); return this; } + + /// {@return `supportedStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_supportedStages(MemorySegment segment, long index) { return (int) VH_supportedStages.get(segment, 0L, index); } + /// {@return `supportedStages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_supportedStages(MemorySegment segment) { return VkPhysicalDeviceSubgroupProperties.get_supportedStages(segment, 0L); } + /// {@return `supportedStages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int supportedStagesAt(long index) { return VkPhysicalDeviceSubgroupProperties.get_supportedStages(this.segment(), index); } + /// {@return `supportedStages`} + public @CType("VkShaderStageFlags") int supportedStages() { return VkPhysicalDeviceSubgroupProperties.get_supportedStages(this.segment()); } + /// Sets `supportedStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedStages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_supportedStages.set(segment, 0L, index, value); } + /// Sets `supportedStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedStages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceSubgroupProperties.set_supportedStages(segment, 0L, value); } + /// Sets `supportedStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties supportedStagesAt(long index, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceSubgroupProperties.set_supportedStages(this.segment(), index, value); return this; } + /// Sets `supportedStages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties supportedStages(@CType("VkShaderStageFlags") int value) { VkPhysicalDeviceSubgroupProperties.set_supportedStages(this.segment(), value); return this; } + + /// {@return `supportedOperations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSubgroupFeatureFlags") int get_supportedOperations(MemorySegment segment, long index) { return (int) VH_supportedOperations.get(segment, 0L, index); } + /// {@return `supportedOperations`} + /// @param segment the segment of the struct + public static @CType("VkSubgroupFeatureFlags") int get_supportedOperations(MemorySegment segment) { return VkPhysicalDeviceSubgroupProperties.get_supportedOperations(segment, 0L); } + /// {@return `supportedOperations` at the given index} + /// @param index the index + public @CType("VkSubgroupFeatureFlags") int supportedOperationsAt(long index) { return VkPhysicalDeviceSubgroupProperties.get_supportedOperations(this.segment(), index); } + /// {@return `supportedOperations`} + public @CType("VkSubgroupFeatureFlags") int supportedOperations() { return VkPhysicalDeviceSubgroupProperties.get_supportedOperations(this.segment()); } + /// Sets `supportedOperations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedOperations(MemorySegment segment, long index, @CType("VkSubgroupFeatureFlags") int value) { VH_supportedOperations.set(segment, 0L, index, value); } + /// Sets `supportedOperations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedOperations(MemorySegment segment, @CType("VkSubgroupFeatureFlags") int value) { VkPhysicalDeviceSubgroupProperties.set_supportedOperations(segment, 0L, value); } + /// Sets `supportedOperations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties supportedOperationsAt(long index, @CType("VkSubgroupFeatureFlags") int value) { VkPhysicalDeviceSubgroupProperties.set_supportedOperations(this.segment(), index, value); return this; } + /// Sets `supportedOperations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties supportedOperations(@CType("VkSubgroupFeatureFlags") int value) { VkPhysicalDeviceSubgroupProperties.set_supportedOperations(this.segment(), value); return this; } + + /// {@return `quadOperationsInAllStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_quadOperationsInAllStages(MemorySegment segment, long index) { return (int) VH_quadOperationsInAllStages.get(segment, 0L, index); } + /// {@return `quadOperationsInAllStages`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_quadOperationsInAllStages(MemorySegment segment) { return VkPhysicalDeviceSubgroupProperties.get_quadOperationsInAllStages(segment, 0L); } + /// {@return `quadOperationsInAllStages` at the given index} + /// @param index the index + public @CType("VkBool32") int quadOperationsInAllStagesAt(long index) { return VkPhysicalDeviceSubgroupProperties.get_quadOperationsInAllStages(this.segment(), index); } + /// {@return `quadOperationsInAllStages`} + public @CType("VkBool32") int quadOperationsInAllStages() { return VkPhysicalDeviceSubgroupProperties.get_quadOperationsInAllStages(this.segment()); } + /// Sets `quadOperationsInAllStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_quadOperationsInAllStages(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_quadOperationsInAllStages.set(segment, 0L, index, value); } + /// Sets `quadOperationsInAllStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_quadOperationsInAllStages(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSubgroupProperties.set_quadOperationsInAllStages(segment, 0L, value); } + /// Sets `quadOperationsInAllStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties quadOperationsInAllStagesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSubgroupProperties.set_quadOperationsInAllStages(this.segment(), index, value); return this; } + /// Sets `quadOperationsInAllStages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupProperties quadOperationsInAllStages(@CType("VkBool32") int value) { VkPhysicalDeviceSubgroupProperties.set_quadOperationsInAllStages(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSubgroupSizeControlFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSubgroupSizeControlFeatures.java new file mode 100644 index 00000000..124b3191 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSubgroupSizeControlFeatures.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### subgroupSizeControl +/// [VarHandle][#VH_subgroupSizeControl] - [Getter][#subgroupSizeControl()] - [Setter][#subgroupSizeControl(int)] +/// ### computeFullSubgroups +/// [VarHandle][#VH_computeFullSubgroups] - [Getter][#computeFullSubgroups()] - [Setter][#computeFullSubgroups(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSubgroupSizeControlFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 subgroupSizeControl; +/// VkBool32 computeFullSubgroups; +/// } VkPhysicalDeviceSubgroupSizeControlFeatures; +/// ``` +public final class VkPhysicalDeviceSubgroupSizeControlFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceSubgroupSizeControlFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("subgroupSizeControl"), + ValueLayout.JAVA_INT.withName("computeFullSubgroups") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `subgroupSizeControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subgroupSizeControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subgroupSizeControl")); + /// The [VarHandle] of `computeFullSubgroups` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_computeFullSubgroups = LAYOUT.arrayElementVarHandle(PathElement.groupElement("computeFullSubgroups")); + + /// Creates `VkPhysicalDeviceSubgroupSizeControlFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSubgroupSizeControlFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSubgroupSizeControlFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubgroupSizeControlFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubgroupSizeControlFeatures(segment); } + + /// Creates `VkPhysicalDeviceSubgroupSizeControlFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubgroupSizeControlFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubgroupSizeControlFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSubgroupSizeControlFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubgroupSizeControlFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubgroupSizeControlFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSubgroupSizeControlFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSubgroupSizeControlFeatures` + public static VkPhysicalDeviceSubgroupSizeControlFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSubgroupSizeControlFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSubgroupSizeControlFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSubgroupSizeControlFeatures` + public static VkPhysicalDeviceSubgroupSizeControlFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSubgroupSizeControlFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `subgroupSizeControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_subgroupSizeControl(MemorySegment segment, long index) { return (int) VH_subgroupSizeControl.get(segment, 0L, index); } + /// {@return `subgroupSizeControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_subgroupSizeControl(MemorySegment segment) { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_subgroupSizeControl(segment, 0L); } + /// {@return `subgroupSizeControl` at the given index} + /// @param index the index + public @CType("VkBool32") int subgroupSizeControlAt(long index) { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_subgroupSizeControl(this.segment(), index); } + /// {@return `subgroupSizeControl`} + public @CType("VkBool32") int subgroupSizeControl() { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_subgroupSizeControl(this.segment()); } + /// Sets `subgroupSizeControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subgroupSizeControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_subgroupSizeControl.set(segment, 0L, index, value); } + /// Sets `subgroupSizeControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subgroupSizeControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_subgroupSizeControl(segment, 0L, value); } + /// Sets `subgroupSizeControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlFeatures subgroupSizeControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_subgroupSizeControl(this.segment(), index, value); return this; } + /// Sets `subgroupSizeControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlFeatures subgroupSizeControl(@CType("VkBool32") int value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_subgroupSizeControl(this.segment(), value); return this; } + + /// {@return `computeFullSubgroups` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_computeFullSubgroups(MemorySegment segment, long index) { return (int) VH_computeFullSubgroups.get(segment, 0L, index); } + /// {@return `computeFullSubgroups`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_computeFullSubgroups(MemorySegment segment) { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_computeFullSubgroups(segment, 0L); } + /// {@return `computeFullSubgroups` at the given index} + /// @param index the index + public @CType("VkBool32") int computeFullSubgroupsAt(long index) { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_computeFullSubgroups(this.segment(), index); } + /// {@return `computeFullSubgroups`} + public @CType("VkBool32") int computeFullSubgroups() { return VkPhysicalDeviceSubgroupSizeControlFeatures.get_computeFullSubgroups(this.segment()); } + /// Sets `computeFullSubgroups` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_computeFullSubgroups(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_computeFullSubgroups.set(segment, 0L, index, value); } + /// Sets `computeFullSubgroups` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_computeFullSubgroups(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_computeFullSubgroups(segment, 0L, value); } + /// Sets `computeFullSubgroups` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlFeatures computeFullSubgroupsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_computeFullSubgroups(this.segment(), index, value); return this; } + /// Sets `computeFullSubgroups` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlFeatures computeFullSubgroups(@CType("VkBool32") int value) { VkPhysicalDeviceSubgroupSizeControlFeatures.set_computeFullSubgroups(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSubgroupSizeControlProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSubgroupSizeControlProperties.java new file mode 100644 index 00000000..dc1e7281 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSubgroupSizeControlProperties.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minSubgroupSize +/// [VarHandle][#VH_minSubgroupSize] - [Getter][#minSubgroupSize()] - [Setter][#minSubgroupSize(int)] +/// ### maxSubgroupSize +/// [VarHandle][#VH_maxSubgroupSize] - [Getter][#maxSubgroupSize()] - [Setter][#maxSubgroupSize(int)] +/// ### maxComputeWorkgroupSubgroups +/// [VarHandle][#VH_maxComputeWorkgroupSubgroups] - [Getter][#maxComputeWorkgroupSubgroups()] - [Setter][#maxComputeWorkgroupSubgroups(int)] +/// ### requiredSubgroupSizeStages +/// [VarHandle][#VH_requiredSubgroupSizeStages] - [Getter][#requiredSubgroupSizeStages()] - [Setter][#requiredSubgroupSizeStages(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSubgroupSizeControlProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t minSubgroupSize; +/// uint32_t maxSubgroupSize; +/// uint32_t maxComputeWorkgroupSubgroups; +/// VkShaderStageFlags requiredSubgroupSizeStages; +/// } VkPhysicalDeviceSubgroupSizeControlProperties; +/// ``` +public final class VkPhysicalDeviceSubgroupSizeControlProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceSubgroupSizeControlProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("minSubgroupSize"), + ValueLayout.JAVA_INT.withName("maxSubgroupSize"), + ValueLayout.JAVA_INT.withName("maxComputeWorkgroupSubgroups"), + ValueLayout.JAVA_INT.withName("requiredSubgroupSizeStages") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minSubgroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minSubgroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minSubgroupSize")); + /// The [VarHandle] of `maxSubgroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSubgroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSubgroupSize")); + /// The [VarHandle] of `maxComputeWorkgroupSubgroups` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxComputeWorkgroupSubgroups = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxComputeWorkgroupSubgroups")); + /// The [VarHandle] of `requiredSubgroupSizeStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_requiredSubgroupSizeStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("requiredSubgroupSizeStages")); + + /// Creates `VkPhysicalDeviceSubgroupSizeControlProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSubgroupSizeControlProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSubgroupSizeControlProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubgroupSizeControlProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubgroupSizeControlProperties(segment); } + + /// Creates `VkPhysicalDeviceSubgroupSizeControlProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubgroupSizeControlProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubgroupSizeControlProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSubgroupSizeControlProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSubgroupSizeControlProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSubgroupSizeControlProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSubgroupSizeControlProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSubgroupSizeControlProperties` + public static VkPhysicalDeviceSubgroupSizeControlProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSubgroupSizeControlProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSubgroupSizeControlProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSubgroupSizeControlProperties` + public static VkPhysicalDeviceSubgroupSizeControlProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSubgroupSizeControlProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSubgroupSizeControlProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSubgroupSizeControlProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `minSubgroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minSubgroupSize(MemorySegment segment, long index) { return (int) VH_minSubgroupSize.get(segment, 0L, index); } + /// {@return `minSubgroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minSubgroupSize(MemorySegment segment) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_minSubgroupSize(segment, 0L); } + /// {@return `minSubgroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int minSubgroupSizeAt(long index) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_minSubgroupSize(this.segment(), index); } + /// {@return `minSubgroupSize`} + public @CType("uint32_t") int minSubgroupSize() { return VkPhysicalDeviceSubgroupSizeControlProperties.get_minSubgroupSize(this.segment()); } + /// Sets `minSubgroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minSubgroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minSubgroupSize.set(segment, 0L, index, value); } + /// Sets `minSubgroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minSubgroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_minSubgroupSize(segment, 0L, value); } + /// Sets `minSubgroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties minSubgroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_minSubgroupSize(this.segment(), index, value); return this; } + /// Sets `minSubgroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties minSubgroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_minSubgroupSize(this.segment(), value); return this; } + + /// {@return `maxSubgroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSubgroupSize(MemorySegment segment, long index) { return (int) VH_maxSubgroupSize.get(segment, 0L, index); } + /// {@return `maxSubgroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSubgroupSize(MemorySegment segment) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_maxSubgroupSize(segment, 0L); } + /// {@return `maxSubgroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSubgroupSizeAt(long index) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_maxSubgroupSize(this.segment(), index); } + /// {@return `maxSubgroupSize`} + public @CType("uint32_t") int maxSubgroupSize() { return VkPhysicalDeviceSubgroupSizeControlProperties.get_maxSubgroupSize(this.segment()); } + /// Sets `maxSubgroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSubgroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSubgroupSize.set(segment, 0L, index, value); } + /// Sets `maxSubgroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSubgroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_maxSubgroupSize(segment, 0L, value); } + /// Sets `maxSubgroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties maxSubgroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_maxSubgroupSize(this.segment(), index, value); return this; } + /// Sets `maxSubgroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties maxSubgroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_maxSubgroupSize(this.segment(), value); return this; } + + /// {@return `maxComputeWorkgroupSubgroups` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxComputeWorkgroupSubgroups(MemorySegment segment, long index) { return (int) VH_maxComputeWorkgroupSubgroups.get(segment, 0L, index); } + /// {@return `maxComputeWorkgroupSubgroups`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxComputeWorkgroupSubgroups(MemorySegment segment) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_maxComputeWorkgroupSubgroups(segment, 0L); } + /// {@return `maxComputeWorkgroupSubgroups` at the given index} + /// @param index the index + public @CType("uint32_t") int maxComputeWorkgroupSubgroupsAt(long index) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_maxComputeWorkgroupSubgroups(this.segment(), index); } + /// {@return `maxComputeWorkgroupSubgroups`} + public @CType("uint32_t") int maxComputeWorkgroupSubgroups() { return VkPhysicalDeviceSubgroupSizeControlProperties.get_maxComputeWorkgroupSubgroups(this.segment()); } + /// Sets `maxComputeWorkgroupSubgroups` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxComputeWorkgroupSubgroups(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxComputeWorkgroupSubgroups.set(segment, 0L, index, value); } + /// Sets `maxComputeWorkgroupSubgroups` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxComputeWorkgroupSubgroups(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_maxComputeWorkgroupSubgroups(segment, 0L, value); } + /// Sets `maxComputeWorkgroupSubgroups` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties maxComputeWorkgroupSubgroupsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_maxComputeWorkgroupSubgroups(this.segment(), index, value); return this; } + /// Sets `maxComputeWorkgroupSubgroups` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties maxComputeWorkgroupSubgroups(@CType("uint32_t") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_maxComputeWorkgroupSubgroups(this.segment(), value); return this; } + + /// {@return `requiredSubgroupSizeStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_requiredSubgroupSizeStages(MemorySegment segment, long index) { return (int) VH_requiredSubgroupSizeStages.get(segment, 0L, index); } + /// {@return `requiredSubgroupSizeStages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_requiredSubgroupSizeStages(MemorySegment segment) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_requiredSubgroupSizeStages(segment, 0L); } + /// {@return `requiredSubgroupSizeStages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int requiredSubgroupSizeStagesAt(long index) { return VkPhysicalDeviceSubgroupSizeControlProperties.get_requiredSubgroupSizeStages(this.segment(), index); } + /// {@return `requiredSubgroupSizeStages`} + public @CType("VkShaderStageFlags") int requiredSubgroupSizeStages() { return VkPhysicalDeviceSubgroupSizeControlProperties.get_requiredSubgroupSizeStages(this.segment()); } + /// Sets `requiredSubgroupSizeStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_requiredSubgroupSizeStages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_requiredSubgroupSizeStages.set(segment, 0L, index, value); } + /// Sets `requiredSubgroupSizeStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_requiredSubgroupSizeStages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_requiredSubgroupSizeStages(segment, 0L, value); } + /// Sets `requiredSubgroupSizeStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties requiredSubgroupSizeStagesAt(long index, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_requiredSubgroupSizeStages(this.segment(), index, value); return this; } + /// Sets `requiredSubgroupSizeStages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSubgroupSizeControlProperties requiredSubgroupSizeStages(@CType("VkShaderStageFlags") int value) { VkPhysicalDeviceSubgroupSizeControlProperties.set_requiredSubgroupSizeStages(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSynchronization2Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSynchronization2Features.java new file mode 100644 index 00000000..8c63c072 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceSynchronization2Features.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### synchronization2 +/// [VarHandle][#VH_synchronization2] - [Getter][#synchronization2()] - [Setter][#synchronization2(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceSynchronization2Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 synchronization2; +/// } VkPhysicalDeviceSynchronization2Features; +/// ``` +public final class VkPhysicalDeviceSynchronization2Features extends Struct { + /// The struct layout of `VkPhysicalDeviceSynchronization2Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("synchronization2") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `synchronization2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_synchronization2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("synchronization2")); + + /// Creates `VkPhysicalDeviceSynchronization2Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceSynchronization2Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceSynchronization2Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSynchronization2Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSynchronization2Features(segment); } + + /// Creates `VkPhysicalDeviceSynchronization2Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSynchronization2Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSynchronization2Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceSynchronization2Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceSynchronization2Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceSynchronization2Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceSynchronization2Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceSynchronization2Features` + public static VkPhysicalDeviceSynchronization2Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceSynchronization2Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceSynchronization2Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceSynchronization2Features` + public static VkPhysicalDeviceSynchronization2Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceSynchronization2Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceSynchronization2Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceSynchronization2Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceSynchronization2Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceSynchronization2Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSynchronization2Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceSynchronization2Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSynchronization2Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceSynchronization2Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceSynchronization2Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceSynchronization2Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceSynchronization2Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSynchronization2Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSynchronization2Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSynchronization2Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSynchronization2Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceSynchronization2Features.set_pNext(this.segment(), value); return this; } + + /// {@return `synchronization2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_synchronization2(MemorySegment segment, long index) { return (int) VH_synchronization2.get(segment, 0L, index); } + /// {@return `synchronization2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_synchronization2(MemorySegment segment) { return VkPhysicalDeviceSynchronization2Features.get_synchronization2(segment, 0L); } + /// {@return `synchronization2` at the given index} + /// @param index the index + public @CType("VkBool32") int synchronization2At(long index) { return VkPhysicalDeviceSynchronization2Features.get_synchronization2(this.segment(), index); } + /// {@return `synchronization2`} + public @CType("VkBool32") int synchronization2() { return VkPhysicalDeviceSynchronization2Features.get_synchronization2(this.segment()); } + /// Sets `synchronization2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_synchronization2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_synchronization2.set(segment, 0L, index, value); } + /// Sets `synchronization2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_synchronization2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceSynchronization2Features.set_synchronization2(segment, 0L, value); } + /// Sets `synchronization2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSynchronization2Features synchronization2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceSynchronization2Features.set_synchronization2(this.segment(), index, value); return this; } + /// Sets `synchronization2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceSynchronization2Features synchronization2(@CType("VkBool32") int value) { VkPhysicalDeviceSynchronization2Features.set_synchronization2(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTexelBufferAlignmentProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTexelBufferAlignmentProperties.java new file mode 100644 index 00000000..0a81accf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTexelBufferAlignmentProperties.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### storageTexelBufferOffsetAlignmentBytes +/// [VarHandle][#VH_storageTexelBufferOffsetAlignmentBytes] - [Getter][#storageTexelBufferOffsetAlignmentBytes()] - [Setter][#storageTexelBufferOffsetAlignmentBytes(long)] +/// ### storageTexelBufferOffsetSingleTexelAlignment +/// [VarHandle][#VH_storageTexelBufferOffsetSingleTexelAlignment] - [Getter][#storageTexelBufferOffsetSingleTexelAlignment()] - [Setter][#storageTexelBufferOffsetSingleTexelAlignment(int)] +/// ### uniformTexelBufferOffsetAlignmentBytes +/// [VarHandle][#VH_uniformTexelBufferOffsetAlignmentBytes] - [Getter][#uniformTexelBufferOffsetAlignmentBytes()] - [Setter][#uniformTexelBufferOffsetAlignmentBytes(long)] +/// ### uniformTexelBufferOffsetSingleTexelAlignment +/// [VarHandle][#VH_uniformTexelBufferOffsetSingleTexelAlignment] - [Getter][#uniformTexelBufferOffsetSingleTexelAlignment()] - [Setter][#uniformTexelBufferOffsetSingleTexelAlignment(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceTexelBufferAlignmentProperties { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize storageTexelBufferOffsetAlignmentBytes; +/// VkBool32 storageTexelBufferOffsetSingleTexelAlignment; +/// VkDeviceSize uniformTexelBufferOffsetAlignmentBytes; +/// VkBool32 uniformTexelBufferOffsetSingleTexelAlignment; +/// } VkPhysicalDeviceTexelBufferAlignmentProperties; +/// ``` +public final class VkPhysicalDeviceTexelBufferAlignmentProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceTexelBufferAlignmentProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("storageTexelBufferOffsetAlignmentBytes"), + ValueLayout.JAVA_INT.withName("storageTexelBufferOffsetSingleTexelAlignment"), + ValueLayout.JAVA_LONG.withName("uniformTexelBufferOffsetAlignmentBytes"), + ValueLayout.JAVA_INT.withName("uniformTexelBufferOffsetSingleTexelAlignment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `storageTexelBufferOffsetAlignmentBytes` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_storageTexelBufferOffsetAlignmentBytes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageTexelBufferOffsetAlignmentBytes")); + /// The [VarHandle] of `storageTexelBufferOffsetSingleTexelAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storageTexelBufferOffsetSingleTexelAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageTexelBufferOffsetSingleTexelAlignment")); + /// The [VarHandle] of `uniformTexelBufferOffsetAlignmentBytes` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_uniformTexelBufferOffsetAlignmentBytes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformTexelBufferOffsetAlignmentBytes")); + /// The [VarHandle] of `uniformTexelBufferOffsetSingleTexelAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniformTexelBufferOffsetSingleTexelAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformTexelBufferOffsetSingleTexelAlignment")); + + /// Creates `VkPhysicalDeviceTexelBufferAlignmentProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceTexelBufferAlignmentProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceTexelBufferAlignmentProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTexelBufferAlignmentProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTexelBufferAlignmentProperties(segment); } + + /// Creates `VkPhysicalDeviceTexelBufferAlignmentProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTexelBufferAlignmentProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTexelBufferAlignmentProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceTexelBufferAlignmentProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTexelBufferAlignmentProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTexelBufferAlignmentProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceTexelBufferAlignmentProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceTexelBufferAlignmentProperties` + public static VkPhysicalDeviceTexelBufferAlignmentProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceTexelBufferAlignmentProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceTexelBufferAlignmentProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceTexelBufferAlignmentProperties` + public static VkPhysicalDeviceTexelBufferAlignmentProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceTexelBufferAlignmentProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `storageTexelBufferOffsetAlignmentBytes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_storageTexelBufferOffsetAlignmentBytes(MemorySegment segment, long index) { return (long) VH_storageTexelBufferOffsetAlignmentBytes.get(segment, 0L, index); } + /// {@return `storageTexelBufferOffsetAlignmentBytes`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_storageTexelBufferOffsetAlignmentBytes(MemorySegment segment) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_storageTexelBufferOffsetAlignmentBytes(segment, 0L); } + /// {@return `storageTexelBufferOffsetAlignmentBytes` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long storageTexelBufferOffsetAlignmentBytesAt(long index) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_storageTexelBufferOffsetAlignmentBytes(this.segment(), index); } + /// {@return `storageTexelBufferOffsetAlignmentBytes`} + public @CType("VkDeviceSize") long storageTexelBufferOffsetAlignmentBytes() { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_storageTexelBufferOffsetAlignmentBytes(this.segment()); } + /// Sets `storageTexelBufferOffsetAlignmentBytes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageTexelBufferOffsetAlignmentBytes(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_storageTexelBufferOffsetAlignmentBytes.set(segment, 0L, index, value); } + /// Sets `storageTexelBufferOffsetAlignmentBytes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageTexelBufferOffsetAlignmentBytes(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_storageTexelBufferOffsetAlignmentBytes(segment, 0L, value); } + /// Sets `storageTexelBufferOffsetAlignmentBytes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties storageTexelBufferOffsetAlignmentBytesAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_storageTexelBufferOffsetAlignmentBytes(this.segment(), index, value); return this; } + /// Sets `storageTexelBufferOffsetAlignmentBytes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties storageTexelBufferOffsetAlignmentBytes(@CType("VkDeviceSize") long value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_storageTexelBufferOffsetAlignmentBytes(this.segment(), value); return this; } + + /// {@return `storageTexelBufferOffsetSingleTexelAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storageTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, long index) { return (int) VH_storageTexelBufferOffsetSingleTexelAlignment.get(segment, 0L, index); } + /// {@return `storageTexelBufferOffsetSingleTexelAlignment`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storageTexelBufferOffsetSingleTexelAlignment(MemorySegment segment) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_storageTexelBufferOffsetSingleTexelAlignment(segment, 0L); } + /// {@return `storageTexelBufferOffsetSingleTexelAlignment` at the given index} + /// @param index the index + public @CType("VkBool32") int storageTexelBufferOffsetSingleTexelAlignmentAt(long index) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_storageTexelBufferOffsetSingleTexelAlignment(this.segment(), index); } + /// {@return `storageTexelBufferOffsetSingleTexelAlignment`} + public @CType("VkBool32") int storageTexelBufferOffsetSingleTexelAlignment() { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_storageTexelBufferOffsetSingleTexelAlignment(this.segment()); } + /// Sets `storageTexelBufferOffsetSingleTexelAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storageTexelBufferOffsetSingleTexelAlignment.set(segment, 0L, index, value); } + /// Sets `storageTexelBufferOffsetSingleTexelAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_storageTexelBufferOffsetSingleTexelAlignment(segment, 0L, value); } + /// Sets `storageTexelBufferOffsetSingleTexelAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties storageTexelBufferOffsetSingleTexelAlignmentAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_storageTexelBufferOffsetSingleTexelAlignment(this.segment(), index, value); return this; } + /// Sets `storageTexelBufferOffsetSingleTexelAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties storageTexelBufferOffsetSingleTexelAlignment(@CType("VkBool32") int value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_storageTexelBufferOffsetSingleTexelAlignment(this.segment(), value); return this; } + + /// {@return `uniformTexelBufferOffsetAlignmentBytes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_uniformTexelBufferOffsetAlignmentBytes(MemorySegment segment, long index) { return (long) VH_uniformTexelBufferOffsetAlignmentBytes.get(segment, 0L, index); } + /// {@return `uniformTexelBufferOffsetAlignmentBytes`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_uniformTexelBufferOffsetAlignmentBytes(MemorySegment segment) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_uniformTexelBufferOffsetAlignmentBytes(segment, 0L); } + /// {@return `uniformTexelBufferOffsetAlignmentBytes` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long uniformTexelBufferOffsetAlignmentBytesAt(long index) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_uniformTexelBufferOffsetAlignmentBytes(this.segment(), index); } + /// {@return `uniformTexelBufferOffsetAlignmentBytes`} + public @CType("VkDeviceSize") long uniformTexelBufferOffsetAlignmentBytes() { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_uniformTexelBufferOffsetAlignmentBytes(this.segment()); } + /// Sets `uniformTexelBufferOffsetAlignmentBytes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformTexelBufferOffsetAlignmentBytes(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_uniformTexelBufferOffsetAlignmentBytes.set(segment, 0L, index, value); } + /// Sets `uniformTexelBufferOffsetAlignmentBytes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformTexelBufferOffsetAlignmentBytes(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_uniformTexelBufferOffsetAlignmentBytes(segment, 0L, value); } + /// Sets `uniformTexelBufferOffsetAlignmentBytes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties uniformTexelBufferOffsetAlignmentBytesAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_uniformTexelBufferOffsetAlignmentBytes(this.segment(), index, value); return this; } + /// Sets `uniformTexelBufferOffsetAlignmentBytes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties uniformTexelBufferOffsetAlignmentBytes(@CType("VkDeviceSize") long value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_uniformTexelBufferOffsetAlignmentBytes(this.segment(), value); return this; } + + /// {@return `uniformTexelBufferOffsetSingleTexelAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_uniformTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, long index) { return (int) VH_uniformTexelBufferOffsetSingleTexelAlignment.get(segment, 0L, index); } + /// {@return `uniformTexelBufferOffsetSingleTexelAlignment`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_uniformTexelBufferOffsetSingleTexelAlignment(MemorySegment segment) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_uniformTexelBufferOffsetSingleTexelAlignment(segment, 0L); } + /// {@return `uniformTexelBufferOffsetSingleTexelAlignment` at the given index} + /// @param index the index + public @CType("VkBool32") int uniformTexelBufferOffsetSingleTexelAlignmentAt(long index) { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_uniformTexelBufferOffsetSingleTexelAlignment(this.segment(), index); } + /// {@return `uniformTexelBufferOffsetSingleTexelAlignment`} + public @CType("VkBool32") int uniformTexelBufferOffsetSingleTexelAlignment() { return VkPhysicalDeviceTexelBufferAlignmentProperties.get_uniformTexelBufferOffsetSingleTexelAlignment(this.segment()); } + /// Sets `uniformTexelBufferOffsetSingleTexelAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_uniformTexelBufferOffsetSingleTexelAlignment.set(segment, 0L, index, value); } + /// Sets `uniformTexelBufferOffsetSingleTexelAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_uniformTexelBufferOffsetSingleTexelAlignment(segment, 0L, value); } + /// Sets `uniformTexelBufferOffsetSingleTexelAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties uniformTexelBufferOffsetSingleTexelAlignmentAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_uniformTexelBufferOffsetSingleTexelAlignment(this.segment(), index, value); return this; } + /// Sets `uniformTexelBufferOffsetSingleTexelAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTexelBufferAlignmentProperties uniformTexelBufferOffsetSingleTexelAlignment(@CType("VkBool32") int value) { VkPhysicalDeviceTexelBufferAlignmentProperties.set_uniformTexelBufferOffsetSingleTexelAlignment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTextureCompressionASTCHDRFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTextureCompressionASTCHDRFeatures.java new file mode 100644 index 00000000..6a769b8a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTextureCompressionASTCHDRFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### textureCompressionASTC_HDR +/// [VarHandle][#VH_textureCompressionASTC_HDR] - [Getter][#textureCompressionASTC_HDR()] - [Setter][#textureCompressionASTC_HDR(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceTextureCompressionASTCHDRFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 textureCompressionASTC_HDR; +/// } VkPhysicalDeviceTextureCompressionASTCHDRFeatures; +/// ``` +public final class VkPhysicalDeviceTextureCompressionASTCHDRFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceTextureCompressionASTCHDRFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("textureCompressionASTC_HDR") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `textureCompressionASTC_HDR` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_textureCompressionASTC_HDR = LAYOUT.arrayElementVarHandle(PathElement.groupElement("textureCompressionASTC_HDR")); + + /// Creates `VkPhysicalDeviceTextureCompressionASTCHDRFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceTextureCompressionASTCHDRFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceTextureCompressionASTCHDRFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTextureCompressionASTCHDRFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTextureCompressionASTCHDRFeatures(segment); } + + /// Creates `VkPhysicalDeviceTextureCompressionASTCHDRFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTextureCompressionASTCHDRFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTextureCompressionASTCHDRFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceTextureCompressionASTCHDRFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTextureCompressionASTCHDRFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTextureCompressionASTCHDRFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceTextureCompressionASTCHDRFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceTextureCompressionASTCHDRFeatures` + public static VkPhysicalDeviceTextureCompressionASTCHDRFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceTextureCompressionASTCHDRFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceTextureCompressionASTCHDRFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceTextureCompressionASTCHDRFeatures` + public static VkPhysicalDeviceTextureCompressionASTCHDRFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceTextureCompressionASTCHDRFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceTextureCompressionASTCHDRFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceTextureCompressionASTCHDRFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceTextureCompressionASTCHDRFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceTextureCompressionASTCHDRFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTextureCompressionASTCHDRFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceTextureCompressionASTCHDRFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTextureCompressionASTCHDRFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceTextureCompressionASTCHDRFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceTextureCompressionASTCHDRFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceTextureCompressionASTCHDRFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceTextureCompressionASTCHDRFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTextureCompressionASTCHDRFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTextureCompressionASTCHDRFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTextureCompressionASTCHDRFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTextureCompressionASTCHDRFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTextureCompressionASTCHDRFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `textureCompressionASTC_HDR` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_textureCompressionASTC_HDR(MemorySegment segment, long index) { return (int) VH_textureCompressionASTC_HDR.get(segment, 0L, index); } + /// {@return `textureCompressionASTC_HDR`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_textureCompressionASTC_HDR(MemorySegment segment) { return VkPhysicalDeviceTextureCompressionASTCHDRFeatures.get_textureCompressionASTC_HDR(segment, 0L); } + /// {@return `textureCompressionASTC_HDR` at the given index} + /// @param index the index + public @CType("VkBool32") int textureCompressionASTC_HDRAt(long index) { return VkPhysicalDeviceTextureCompressionASTCHDRFeatures.get_textureCompressionASTC_HDR(this.segment(), index); } + /// {@return `textureCompressionASTC_HDR`} + public @CType("VkBool32") int textureCompressionASTC_HDR() { return VkPhysicalDeviceTextureCompressionASTCHDRFeatures.get_textureCompressionASTC_HDR(this.segment()); } + /// Sets `textureCompressionASTC_HDR` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_textureCompressionASTC_HDR(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_textureCompressionASTC_HDR.set(segment, 0L, index, value); } + /// Sets `textureCompressionASTC_HDR` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_textureCompressionASTC_HDR(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTextureCompressionASTCHDRFeatures.set_textureCompressionASTC_HDR(segment, 0L, value); } + /// Sets `textureCompressionASTC_HDR` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTextureCompressionASTCHDRFeatures textureCompressionASTC_HDRAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTextureCompressionASTCHDRFeatures.set_textureCompressionASTC_HDR(this.segment(), index, value); return this; } + /// Sets `textureCompressionASTC_HDR` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTextureCompressionASTCHDRFeatures textureCompressionASTC_HDR(@CType("VkBool32") int value) { VkPhysicalDeviceTextureCompressionASTCHDRFeatures.set_textureCompressionASTC_HDR(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTimelineSemaphoreFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTimelineSemaphoreFeatures.java new file mode 100644 index 00000000..37ef2d45 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTimelineSemaphoreFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### timelineSemaphore +/// [VarHandle][#VH_timelineSemaphore] - [Getter][#timelineSemaphore()] - [Setter][#timelineSemaphore(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceTimelineSemaphoreFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 timelineSemaphore; +/// } VkPhysicalDeviceTimelineSemaphoreFeatures; +/// ``` +public final class VkPhysicalDeviceTimelineSemaphoreFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceTimelineSemaphoreFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("timelineSemaphore") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `timelineSemaphore` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_timelineSemaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timelineSemaphore")); + + /// Creates `VkPhysicalDeviceTimelineSemaphoreFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceTimelineSemaphoreFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceTimelineSemaphoreFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTimelineSemaphoreFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTimelineSemaphoreFeatures(segment); } + + /// Creates `VkPhysicalDeviceTimelineSemaphoreFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTimelineSemaphoreFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTimelineSemaphoreFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceTimelineSemaphoreFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTimelineSemaphoreFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTimelineSemaphoreFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceTimelineSemaphoreFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceTimelineSemaphoreFeatures` + public static VkPhysicalDeviceTimelineSemaphoreFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceTimelineSemaphoreFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceTimelineSemaphoreFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceTimelineSemaphoreFeatures` + public static VkPhysicalDeviceTimelineSemaphoreFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceTimelineSemaphoreFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceTimelineSemaphoreFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceTimelineSemaphoreFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceTimelineSemaphoreFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceTimelineSemaphoreFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceTimelineSemaphoreFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceTimelineSemaphoreFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceTimelineSemaphoreFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceTimelineSemaphoreFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceTimelineSemaphoreFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTimelineSemaphoreFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTimelineSemaphoreFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTimelineSemaphoreFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `timelineSemaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_timelineSemaphore(MemorySegment segment, long index) { return (int) VH_timelineSemaphore.get(segment, 0L, index); } + /// {@return `timelineSemaphore`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_timelineSemaphore(MemorySegment segment) { return VkPhysicalDeviceTimelineSemaphoreFeatures.get_timelineSemaphore(segment, 0L); } + /// {@return `timelineSemaphore` at the given index} + /// @param index the index + public @CType("VkBool32") int timelineSemaphoreAt(long index) { return VkPhysicalDeviceTimelineSemaphoreFeatures.get_timelineSemaphore(this.segment(), index); } + /// {@return `timelineSemaphore`} + public @CType("VkBool32") int timelineSemaphore() { return VkPhysicalDeviceTimelineSemaphoreFeatures.get_timelineSemaphore(this.segment()); } + /// Sets `timelineSemaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timelineSemaphore(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_timelineSemaphore.set(segment, 0L, index, value); } + /// Sets `timelineSemaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timelineSemaphore(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceTimelineSemaphoreFeatures.set_timelineSemaphore(segment, 0L, value); } + /// Sets `timelineSemaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreFeatures timelineSemaphoreAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceTimelineSemaphoreFeatures.set_timelineSemaphore(this.segment(), index, value); return this; } + /// Sets `timelineSemaphore` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreFeatures timelineSemaphore(@CType("VkBool32") int value) { VkPhysicalDeviceTimelineSemaphoreFeatures.set_timelineSemaphore(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTimelineSemaphoreProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTimelineSemaphoreProperties.java new file mode 100644 index 00000000..54c59d21 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceTimelineSemaphoreProperties.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxTimelineSemaphoreValueDifference +/// [VarHandle][#VH_maxTimelineSemaphoreValueDifference] - [Getter][#maxTimelineSemaphoreValueDifference()] - [Setter][#maxTimelineSemaphoreValueDifference(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceTimelineSemaphoreProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint64_t maxTimelineSemaphoreValueDifference; +/// } VkPhysicalDeviceTimelineSemaphoreProperties; +/// ``` +public final class VkPhysicalDeviceTimelineSemaphoreProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceTimelineSemaphoreProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("maxTimelineSemaphoreValueDifference") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxTimelineSemaphoreValueDifference` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxTimelineSemaphoreValueDifference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTimelineSemaphoreValueDifference")); + + /// Creates `VkPhysicalDeviceTimelineSemaphoreProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceTimelineSemaphoreProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceTimelineSemaphoreProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTimelineSemaphoreProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTimelineSemaphoreProperties(segment); } + + /// Creates `VkPhysicalDeviceTimelineSemaphoreProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTimelineSemaphoreProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTimelineSemaphoreProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceTimelineSemaphoreProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceTimelineSemaphoreProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceTimelineSemaphoreProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceTimelineSemaphoreProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceTimelineSemaphoreProperties` + public static VkPhysicalDeviceTimelineSemaphoreProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceTimelineSemaphoreProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceTimelineSemaphoreProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceTimelineSemaphoreProperties` + public static VkPhysicalDeviceTimelineSemaphoreProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceTimelineSemaphoreProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceTimelineSemaphoreProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceTimelineSemaphoreProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceTimelineSemaphoreProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceTimelineSemaphoreProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceTimelineSemaphoreProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceTimelineSemaphoreProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceTimelineSemaphoreProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceTimelineSemaphoreProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceTimelineSemaphoreProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTimelineSemaphoreProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTimelineSemaphoreProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceTimelineSemaphoreProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `maxTimelineSemaphoreValueDifference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxTimelineSemaphoreValueDifference(MemorySegment segment, long index) { return (long) VH_maxTimelineSemaphoreValueDifference.get(segment, 0L, index); } + /// {@return `maxTimelineSemaphoreValueDifference`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxTimelineSemaphoreValueDifference(MemorySegment segment) { return VkPhysicalDeviceTimelineSemaphoreProperties.get_maxTimelineSemaphoreValueDifference(segment, 0L); } + /// {@return `maxTimelineSemaphoreValueDifference` at the given index} + /// @param index the index + public @CType("uint64_t") long maxTimelineSemaphoreValueDifferenceAt(long index) { return VkPhysicalDeviceTimelineSemaphoreProperties.get_maxTimelineSemaphoreValueDifference(this.segment(), index); } + /// {@return `maxTimelineSemaphoreValueDifference`} + public @CType("uint64_t") long maxTimelineSemaphoreValueDifference() { return VkPhysicalDeviceTimelineSemaphoreProperties.get_maxTimelineSemaphoreValueDifference(this.segment()); } + /// Sets `maxTimelineSemaphoreValueDifference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTimelineSemaphoreValueDifference(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxTimelineSemaphoreValueDifference.set(segment, 0L, index, value); } + /// Sets `maxTimelineSemaphoreValueDifference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTimelineSemaphoreValueDifference(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceTimelineSemaphoreProperties.set_maxTimelineSemaphoreValueDifference(segment, 0L, value); } + /// Sets `maxTimelineSemaphoreValueDifference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreProperties maxTimelineSemaphoreValueDifferenceAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceTimelineSemaphoreProperties.set_maxTimelineSemaphoreValueDifference(this.segment(), index, value); return this; } + /// Sets `maxTimelineSemaphoreValueDifference` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceTimelineSemaphoreProperties maxTimelineSemaphoreValueDifference(@CType("uint64_t") long value) { VkPhysicalDeviceTimelineSemaphoreProperties.set_maxTimelineSemaphoreValueDifference(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceToolProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceToolProperties.java new file mode 100644 index 00000000..2075a39d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceToolProperties.java @@ -0,0 +1,401 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### name +/// [Byte offset handle][#MH_name] - [Memory layout][#ML_name] - [Getter][#name(long)] - [Setter][#name(long, java.lang.foreign.MemorySegment)] +/// ### version +/// [Byte offset handle][#MH_version] - [Memory layout][#ML_version] - [Getter][#version(long)] - [Setter][#version(long, java.lang.foreign.MemorySegment)] +/// ### purposes +/// [VarHandle][#VH_purposes] - [Getter][#purposes()] - [Setter][#purposes(int)] +/// ### description +/// [Byte offset handle][#MH_description] - [Memory layout][#ML_description] - [Getter][#description(long)] - [Setter][#description(long, java.lang.foreign.MemorySegment)] +/// ### layer +/// [Byte offset handle][#MH_layer] - [Memory layout][#ML_layer] - [Getter][#layer(long)] - [Setter][#layer(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceToolProperties { +/// VkStructureType sType; +/// void * pNext; +/// char[VK_MAX_EXTENSION_NAME_SIZE] name; +/// char[VK_MAX_EXTENSION_NAME_SIZE] version; +/// VkToolPurposeFlags purposes; +/// char[VK_MAX_DESCRIPTION_SIZE] description; +/// char[VK_MAX_EXTENSION_NAME_SIZE] layer; +/// } VkPhysicalDeviceToolProperties; +/// ``` +public final class VkPhysicalDeviceToolProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceToolProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_MAX_EXTENSION_NAME_SIZE, ValueLayout.JAVA_BYTE).withName("name"), + MemoryLayout.sequenceLayout(VK_MAX_EXTENSION_NAME_SIZE, ValueLayout.JAVA_BYTE).withName("version"), + ValueLayout.JAVA_INT.withName("purposes"), + MemoryLayout.sequenceLayout(VK_MAX_DESCRIPTION_SIZE, ValueLayout.JAVA_BYTE).withName("description"), + MemoryLayout.sequenceLayout(VK_MAX_EXTENSION_NAME_SIZE, ValueLayout.JAVA_BYTE).withName("layer") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `name` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_name = LAYOUT.byteOffsetHandle(PathElement.groupElement("name"), PathElement.sequenceElement()); + /// The memory layout of `name`. + public static final MemoryLayout ML_name = LAYOUT.select(PathElement.groupElement("name")); + /// The byte offset handle of `version` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_version = LAYOUT.byteOffsetHandle(PathElement.groupElement("version"), PathElement.sequenceElement()); + /// The memory layout of `version`. + public static final MemoryLayout ML_version = LAYOUT.select(PathElement.groupElement("version")); + /// The [VarHandle] of `purposes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_purposes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("purposes")); + /// The byte offset handle of `description` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_description = LAYOUT.byteOffsetHandle(PathElement.groupElement("description"), PathElement.sequenceElement()); + /// The memory layout of `description`. + public static final MemoryLayout ML_description = LAYOUT.select(PathElement.groupElement("description")); + /// The byte offset handle of `layer` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_layer = LAYOUT.byteOffsetHandle(PathElement.groupElement("layer"), PathElement.sequenceElement()); + /// The memory layout of `layer`. + public static final MemoryLayout ML_layer = LAYOUT.select(PathElement.groupElement("layer")); + + /// Creates `VkPhysicalDeviceToolProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceToolProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceToolProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceToolProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceToolProperties(segment); } + + /// Creates `VkPhysicalDeviceToolProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceToolProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceToolProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceToolProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceToolProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceToolProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceToolProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceToolProperties` + public static VkPhysicalDeviceToolProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceToolProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceToolProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceToolProperties` + public static VkPhysicalDeviceToolProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceToolProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceToolProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceToolProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceToolProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceToolProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceToolProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceToolProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceToolProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceToolProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceToolProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `name` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_name.invokeExact(0L, elementIndex), index), ML_name); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `name`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment get_name(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceToolProperties.get_name(segment, 0L, elementIndex); } + /// {@return `name` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment nameAt(long index, long elementIndex) { return VkPhysicalDeviceToolProperties.get_name(this.segment(), index, elementIndex); } + /// {@return `name`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment name(long elementIndex) { return VkPhysicalDeviceToolProperties.get_name(this.segment(), elementIndex); } + /// Sets `name` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_name(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_name.invokeExact(0L, elementIndex), index), ML_name.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `name` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_name(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_name(segment, 0L, elementIndex, value); } + /// Sets `name` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties nameAt(long index, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_name(this.segment(), index, elementIndex, value); return this; } + /// Sets `name` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties name(long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_name(this.segment(), elementIndex, value); return this; } + + /// {@return `version` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment get_version(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_version.invokeExact(0L, elementIndex), index), ML_version); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `version`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment get_version(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceToolProperties.get_version(segment, 0L, elementIndex); } + /// {@return `version` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment versionAt(long index, long elementIndex) { return VkPhysicalDeviceToolProperties.get_version(this.segment(), index, elementIndex); } + /// {@return `version`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment version(long elementIndex) { return VkPhysicalDeviceToolProperties.get_version(this.segment(), elementIndex); } + /// Sets `version` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_version(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_version.invokeExact(0L, elementIndex), index), ML_version.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `version` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_version(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_version(segment, 0L, elementIndex, value); } + /// Sets `version` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties versionAt(long index, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_version(this.segment(), index, elementIndex, value); return this; } + /// Sets `version` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties version(long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_version(this.segment(), elementIndex, value); return this; } + + /// {@return `purposes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkToolPurposeFlags") int get_purposes(MemorySegment segment, long index) { return (int) VH_purposes.get(segment, 0L, index); } + /// {@return `purposes`} + /// @param segment the segment of the struct + public static @CType("VkToolPurposeFlags") int get_purposes(MemorySegment segment) { return VkPhysicalDeviceToolProperties.get_purposes(segment, 0L); } + /// {@return `purposes` at the given index} + /// @param index the index + public @CType("VkToolPurposeFlags") int purposesAt(long index) { return VkPhysicalDeviceToolProperties.get_purposes(this.segment(), index); } + /// {@return `purposes`} + public @CType("VkToolPurposeFlags") int purposes() { return VkPhysicalDeviceToolProperties.get_purposes(this.segment()); } + /// Sets `purposes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_purposes(MemorySegment segment, long index, @CType("VkToolPurposeFlags") int value) { VH_purposes.set(segment, 0L, index, value); } + /// Sets `purposes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_purposes(MemorySegment segment, @CType("VkToolPurposeFlags") int value) { VkPhysicalDeviceToolProperties.set_purposes(segment, 0L, value); } + /// Sets `purposes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties purposesAt(long index, @CType("VkToolPurposeFlags") int value) { VkPhysicalDeviceToolProperties.set_purposes(this.segment(), index, value); return this; } + /// Sets `purposes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties purposes(@CType("VkToolPurposeFlags") int value) { VkPhysicalDeviceToolProperties.set_purposes(this.segment(), value); return this; } + + /// {@return `description` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `description`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment get_description(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceToolProperties.get_description(segment, 0L, elementIndex); } + /// {@return `description` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment descriptionAt(long index, long elementIndex) { return VkPhysicalDeviceToolProperties.get_description(this.segment(), index, elementIndex); } + /// {@return `description`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment description(long elementIndex) { return VkPhysicalDeviceToolProperties.get_description(this.segment(), elementIndex); } + /// Sets `description` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_description.invokeExact(0L, elementIndex), index), ML_description.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `description` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_description(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_description(segment, 0L, elementIndex, value); } + /// Sets `description` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties descriptionAt(long index, long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_description(this.segment(), index, elementIndex, value); return this; } + /// Sets `description` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties description(long elementIndex, @CType("char[VK_MAX_DESCRIPTION_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_description(this.segment(), elementIndex, value); return this; } + + /// {@return `layer` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment get_layer(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_layer.invokeExact(0L, elementIndex), index), ML_layer); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `layer`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment get_layer(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceToolProperties.get_layer(segment, 0L, elementIndex); } + /// {@return `layer` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment layerAt(long index, long elementIndex) { return VkPhysicalDeviceToolProperties.get_layer(this.segment(), index, elementIndex); } + /// {@return `layer`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment layer(long elementIndex) { return VkPhysicalDeviceToolProperties.get_layer(this.segment(), elementIndex); } + /// Sets `layer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_layer(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_layer.invokeExact(0L, elementIndex), index), ML_layer.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `layer` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_layer(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_layer(segment, 0L, elementIndex, value); } + /// Sets `layer` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties layerAt(long index, long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_layer(this.segment(), index, elementIndex, value); return this; } + /// Sets `layer` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceToolProperties layer(long elementIndex, @CType("char[VK_MAX_EXTENSION_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceToolProperties.set_layer(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceUniformBufferStandardLayoutFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceUniformBufferStandardLayoutFeatures.java new file mode 100644 index 00000000..7fe91c12 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceUniformBufferStandardLayoutFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### uniformBufferStandardLayout +/// [VarHandle][#VH_uniformBufferStandardLayout] - [Getter][#uniformBufferStandardLayout()] - [Setter][#uniformBufferStandardLayout(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceUniformBufferStandardLayoutFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 uniformBufferStandardLayout; +/// } VkPhysicalDeviceUniformBufferStandardLayoutFeatures; +/// ``` +public final class VkPhysicalDeviceUniformBufferStandardLayoutFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceUniformBufferStandardLayoutFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("uniformBufferStandardLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `uniformBufferStandardLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniformBufferStandardLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformBufferStandardLayout")); + + /// Creates `VkPhysicalDeviceUniformBufferStandardLayoutFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceUniformBufferStandardLayoutFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceUniformBufferStandardLayoutFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceUniformBufferStandardLayoutFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceUniformBufferStandardLayoutFeatures(segment); } + + /// Creates `VkPhysicalDeviceUniformBufferStandardLayoutFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceUniformBufferStandardLayoutFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceUniformBufferStandardLayoutFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceUniformBufferStandardLayoutFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceUniformBufferStandardLayoutFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceUniformBufferStandardLayoutFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceUniformBufferStandardLayoutFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceUniformBufferStandardLayoutFeatures` + public static VkPhysicalDeviceUniformBufferStandardLayoutFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceUniformBufferStandardLayoutFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceUniformBufferStandardLayoutFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceUniformBufferStandardLayoutFeatures` + public static VkPhysicalDeviceUniformBufferStandardLayoutFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceUniformBufferStandardLayoutFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceUniformBufferStandardLayoutFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceUniformBufferStandardLayoutFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceUniformBufferStandardLayoutFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceUniformBufferStandardLayoutFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceUniformBufferStandardLayoutFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceUniformBufferStandardLayoutFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceUniformBufferStandardLayoutFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceUniformBufferStandardLayoutFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceUniformBufferStandardLayoutFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceUniformBufferStandardLayoutFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceUniformBufferStandardLayoutFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceUniformBufferStandardLayoutFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceUniformBufferStandardLayoutFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceUniformBufferStandardLayoutFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceUniformBufferStandardLayoutFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceUniformBufferStandardLayoutFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `uniformBufferStandardLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_uniformBufferStandardLayout(MemorySegment segment, long index) { return (int) VH_uniformBufferStandardLayout.get(segment, 0L, index); } + /// {@return `uniformBufferStandardLayout`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_uniformBufferStandardLayout(MemorySegment segment) { return VkPhysicalDeviceUniformBufferStandardLayoutFeatures.get_uniformBufferStandardLayout(segment, 0L); } + /// {@return `uniformBufferStandardLayout` at the given index} + /// @param index the index + public @CType("VkBool32") int uniformBufferStandardLayoutAt(long index) { return VkPhysicalDeviceUniformBufferStandardLayoutFeatures.get_uniformBufferStandardLayout(this.segment(), index); } + /// {@return `uniformBufferStandardLayout`} + public @CType("VkBool32") int uniformBufferStandardLayout() { return VkPhysicalDeviceUniformBufferStandardLayoutFeatures.get_uniformBufferStandardLayout(this.segment()); } + /// Sets `uniformBufferStandardLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformBufferStandardLayout(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_uniformBufferStandardLayout.set(segment, 0L, index, value); } + /// Sets `uniformBufferStandardLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformBufferStandardLayout(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceUniformBufferStandardLayoutFeatures.set_uniformBufferStandardLayout(segment, 0L, value); } + /// Sets `uniformBufferStandardLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceUniformBufferStandardLayoutFeatures uniformBufferStandardLayoutAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceUniformBufferStandardLayoutFeatures.set_uniformBufferStandardLayout(this.segment(), index, value); return this; } + /// Sets `uniformBufferStandardLayout` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceUniformBufferStandardLayoutFeatures uniformBufferStandardLayout(@CType("VkBool32") int value) { VkPhysicalDeviceUniformBufferStandardLayoutFeatures.set_uniformBufferStandardLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVariablePointersFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVariablePointersFeatures.java new file mode 100644 index 00000000..0a88cc92 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVariablePointersFeatures.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### variablePointersStorageBuffer +/// [VarHandle][#VH_variablePointersStorageBuffer] - [Getter][#variablePointersStorageBuffer()] - [Setter][#variablePointersStorageBuffer(int)] +/// ### variablePointers +/// [VarHandle][#VH_variablePointers] - [Getter][#variablePointers()] - [Setter][#variablePointers(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVariablePointersFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 variablePointersStorageBuffer; +/// VkBool32 variablePointers; +/// } VkPhysicalDeviceVariablePointersFeatures; +/// ``` +public final class VkPhysicalDeviceVariablePointersFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceVariablePointersFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("variablePointersStorageBuffer"), + ValueLayout.JAVA_INT.withName("variablePointers") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `variablePointersStorageBuffer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_variablePointersStorageBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("variablePointersStorageBuffer")); + /// The [VarHandle] of `variablePointers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_variablePointers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("variablePointers")); + + /// Creates `VkPhysicalDeviceVariablePointersFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVariablePointersFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVariablePointersFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVariablePointersFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVariablePointersFeatures(segment); } + + /// Creates `VkPhysicalDeviceVariablePointersFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVariablePointersFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVariablePointersFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVariablePointersFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVariablePointersFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVariablePointersFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVariablePointersFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVariablePointersFeatures` + public static VkPhysicalDeviceVariablePointersFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVariablePointersFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVariablePointersFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVariablePointersFeatures` + public static VkPhysicalDeviceVariablePointersFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVariablePointersFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVariablePointersFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVariablePointersFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVariablePointersFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVariablePointersFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVariablePointersFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVariablePointersFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVariablePointersFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVariablePointersFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVariablePointersFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVariablePointersFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVariablePointersFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVariablePointersFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVariablePointersFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVariablePointersFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVariablePointersFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVariablePointersFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `variablePointersStorageBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_variablePointersStorageBuffer(MemorySegment segment, long index) { return (int) VH_variablePointersStorageBuffer.get(segment, 0L, index); } + /// {@return `variablePointersStorageBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_variablePointersStorageBuffer(MemorySegment segment) { return VkPhysicalDeviceVariablePointersFeatures.get_variablePointersStorageBuffer(segment, 0L); } + /// {@return `variablePointersStorageBuffer` at the given index} + /// @param index the index + public @CType("VkBool32") int variablePointersStorageBufferAt(long index) { return VkPhysicalDeviceVariablePointersFeatures.get_variablePointersStorageBuffer(this.segment(), index); } + /// {@return `variablePointersStorageBuffer`} + public @CType("VkBool32") int variablePointersStorageBuffer() { return VkPhysicalDeviceVariablePointersFeatures.get_variablePointersStorageBuffer(this.segment()); } + /// Sets `variablePointersStorageBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_variablePointersStorageBuffer(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_variablePointersStorageBuffer.set(segment, 0L, index, value); } + /// Sets `variablePointersStorageBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_variablePointersStorageBuffer(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVariablePointersFeatures.set_variablePointersStorageBuffer(segment, 0L, value); } + /// Sets `variablePointersStorageBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVariablePointersFeatures variablePointersStorageBufferAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVariablePointersFeatures.set_variablePointersStorageBuffer(this.segment(), index, value); return this; } + /// Sets `variablePointersStorageBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVariablePointersFeatures variablePointersStorageBuffer(@CType("VkBool32") int value) { VkPhysicalDeviceVariablePointersFeatures.set_variablePointersStorageBuffer(this.segment(), value); return this; } + + /// {@return `variablePointers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_variablePointers(MemorySegment segment, long index) { return (int) VH_variablePointers.get(segment, 0L, index); } + /// {@return `variablePointers`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_variablePointers(MemorySegment segment) { return VkPhysicalDeviceVariablePointersFeatures.get_variablePointers(segment, 0L); } + /// {@return `variablePointers` at the given index} + /// @param index the index + public @CType("VkBool32") int variablePointersAt(long index) { return VkPhysicalDeviceVariablePointersFeatures.get_variablePointers(this.segment(), index); } + /// {@return `variablePointers`} + public @CType("VkBool32") int variablePointers() { return VkPhysicalDeviceVariablePointersFeatures.get_variablePointers(this.segment()); } + /// Sets `variablePointers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_variablePointers(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_variablePointers.set(segment, 0L, index, value); } + /// Sets `variablePointers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_variablePointers(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVariablePointersFeatures.set_variablePointers(segment, 0L, value); } + /// Sets `variablePointers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVariablePointersFeatures variablePointersAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVariablePointersFeatures.set_variablePointers(this.segment(), index, value); return this; } + /// Sets `variablePointers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVariablePointersFeatures variablePointers(@CType("VkBool32") int value) { VkPhysicalDeviceVariablePointersFeatures.set_variablePointers(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVertexAttributeDivisorFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVertexAttributeDivisorFeatures.java new file mode 100644 index 00000000..c24ca0f5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVertexAttributeDivisorFeatures.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### vertexAttributeInstanceRateDivisor +/// [VarHandle][#VH_vertexAttributeInstanceRateDivisor] - [Getter][#vertexAttributeInstanceRateDivisor()] - [Setter][#vertexAttributeInstanceRateDivisor(int)] +/// ### vertexAttributeInstanceRateZeroDivisor +/// [VarHandle][#VH_vertexAttributeInstanceRateZeroDivisor] - [Getter][#vertexAttributeInstanceRateZeroDivisor()] - [Setter][#vertexAttributeInstanceRateZeroDivisor(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVertexAttributeDivisorFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 vertexAttributeInstanceRateDivisor; +/// VkBool32 vertexAttributeInstanceRateZeroDivisor; +/// } VkPhysicalDeviceVertexAttributeDivisorFeatures; +/// ``` +public final class VkPhysicalDeviceVertexAttributeDivisorFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceVertexAttributeDivisorFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("vertexAttributeInstanceRateDivisor"), + ValueLayout.JAVA_INT.withName("vertexAttributeInstanceRateZeroDivisor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `vertexAttributeInstanceRateDivisor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexAttributeInstanceRateDivisor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexAttributeInstanceRateDivisor")); + /// The [VarHandle] of `vertexAttributeInstanceRateZeroDivisor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexAttributeInstanceRateZeroDivisor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexAttributeInstanceRateZeroDivisor")); + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVertexAttributeDivisorFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeDivisorFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeDivisorFeatures(segment); } + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeDivisorFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeDivisorFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeDivisorFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeDivisorFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVertexAttributeDivisorFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVertexAttributeDivisorFeatures` + public static VkPhysicalDeviceVertexAttributeDivisorFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVertexAttributeDivisorFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVertexAttributeDivisorFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVertexAttributeDivisorFeatures` + public static VkPhysicalDeviceVertexAttributeDivisorFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVertexAttributeDivisorFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `vertexAttributeInstanceRateDivisor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vertexAttributeInstanceRateDivisor(MemorySegment segment, long index) { return (int) VH_vertexAttributeInstanceRateDivisor.get(segment, 0L, index); } + /// {@return `vertexAttributeInstanceRateDivisor`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vertexAttributeInstanceRateDivisor(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_vertexAttributeInstanceRateDivisor(segment, 0L); } + /// {@return `vertexAttributeInstanceRateDivisor` at the given index} + /// @param index the index + public @CType("VkBool32") int vertexAttributeInstanceRateDivisorAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_vertexAttributeInstanceRateDivisor(this.segment(), index); } + /// {@return `vertexAttributeInstanceRateDivisor`} + public @CType("VkBool32") int vertexAttributeInstanceRateDivisor() { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_vertexAttributeInstanceRateDivisor(this.segment()); } + /// Sets `vertexAttributeInstanceRateDivisor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexAttributeInstanceRateDivisor(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vertexAttributeInstanceRateDivisor.set(segment, 0L, index, value); } + /// Sets `vertexAttributeInstanceRateDivisor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexAttributeInstanceRateDivisor(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_vertexAttributeInstanceRateDivisor(segment, 0L, value); } + /// Sets `vertexAttributeInstanceRateDivisor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorFeatures vertexAttributeInstanceRateDivisorAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_vertexAttributeInstanceRateDivisor(this.segment(), index, value); return this; } + /// Sets `vertexAttributeInstanceRateDivisor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorFeatures vertexAttributeInstanceRateDivisor(@CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_vertexAttributeInstanceRateDivisor(this.segment(), value); return this; } + + /// {@return `vertexAttributeInstanceRateZeroDivisor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vertexAttributeInstanceRateZeroDivisor(MemorySegment segment, long index) { return (int) VH_vertexAttributeInstanceRateZeroDivisor.get(segment, 0L, index); } + /// {@return `vertexAttributeInstanceRateZeroDivisor`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vertexAttributeInstanceRateZeroDivisor(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_vertexAttributeInstanceRateZeroDivisor(segment, 0L); } + /// {@return `vertexAttributeInstanceRateZeroDivisor` at the given index} + /// @param index the index + public @CType("VkBool32") int vertexAttributeInstanceRateZeroDivisorAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_vertexAttributeInstanceRateZeroDivisor(this.segment(), index); } + /// {@return `vertexAttributeInstanceRateZeroDivisor`} + public @CType("VkBool32") int vertexAttributeInstanceRateZeroDivisor() { return VkPhysicalDeviceVertexAttributeDivisorFeatures.get_vertexAttributeInstanceRateZeroDivisor(this.segment()); } + /// Sets `vertexAttributeInstanceRateZeroDivisor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexAttributeInstanceRateZeroDivisor(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vertexAttributeInstanceRateZeroDivisor.set(segment, 0L, index, value); } + /// Sets `vertexAttributeInstanceRateZeroDivisor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexAttributeInstanceRateZeroDivisor(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_vertexAttributeInstanceRateZeroDivisor(segment, 0L, value); } + /// Sets `vertexAttributeInstanceRateZeroDivisor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorFeatures vertexAttributeInstanceRateZeroDivisorAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_vertexAttributeInstanceRateZeroDivisor(this.segment(), index, value); return this; } + /// Sets `vertexAttributeInstanceRateZeroDivisor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorFeatures vertexAttributeInstanceRateZeroDivisor(@CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeDivisorFeatures.set_vertexAttributeInstanceRateZeroDivisor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVertexAttributeDivisorProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVertexAttributeDivisorProperties.java new file mode 100644 index 00000000..406e58ac --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVertexAttributeDivisorProperties.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### maxVertexAttribDivisor +/// [VarHandle][#VH_maxVertexAttribDivisor] - [Getter][#maxVertexAttribDivisor()] - [Setter][#maxVertexAttribDivisor(int)] +/// ### supportsNonZeroFirstInstance +/// [VarHandle][#VH_supportsNonZeroFirstInstance] - [Getter][#supportsNonZeroFirstInstance()] - [Setter][#supportsNonZeroFirstInstance(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVertexAttributeDivisorProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t maxVertexAttribDivisor; +/// VkBool32 supportsNonZeroFirstInstance; +/// } VkPhysicalDeviceVertexAttributeDivisorProperties; +/// ``` +public final class VkPhysicalDeviceVertexAttributeDivisorProperties extends Struct { + /// The struct layout of `VkPhysicalDeviceVertexAttributeDivisorProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("maxVertexAttribDivisor"), + ValueLayout.JAVA_INT.withName("supportsNonZeroFirstInstance") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `maxVertexAttribDivisor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVertexAttribDivisor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVertexAttribDivisor")); + /// The [VarHandle] of `supportsNonZeroFirstInstance` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportsNonZeroFirstInstance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportsNonZeroFirstInstance")); + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorProperties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVertexAttributeDivisorProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeDivisorProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeDivisorProperties(segment); } + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeDivisorProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeDivisorProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVertexAttributeDivisorProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVertexAttributeDivisorProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVertexAttributeDivisorProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVertexAttributeDivisorProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVertexAttributeDivisorProperties` + public static VkPhysicalDeviceVertexAttributeDivisorProperties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVertexAttributeDivisorProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVertexAttributeDivisorProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVertexAttributeDivisorProperties` + public static VkPhysicalDeviceVertexAttributeDivisorProperties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVertexAttributeDivisorProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorProperties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `maxVertexAttribDivisor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVertexAttribDivisor(MemorySegment segment, long index) { return (int) VH_maxVertexAttribDivisor.get(segment, 0L, index); } + /// {@return `maxVertexAttribDivisor`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVertexAttribDivisor(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_maxVertexAttribDivisor(segment, 0L); } + /// {@return `maxVertexAttribDivisor` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVertexAttribDivisorAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_maxVertexAttribDivisor(this.segment(), index); } + /// {@return `maxVertexAttribDivisor`} + public @CType("uint32_t") int maxVertexAttribDivisor() { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_maxVertexAttribDivisor(this.segment()); } + /// Sets `maxVertexAttribDivisor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVertexAttribDivisor(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVertexAttribDivisor.set(segment, 0L, index, value); } + /// Sets `maxVertexAttribDivisor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVertexAttribDivisor(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_maxVertexAttribDivisor(segment, 0L, value); } + /// Sets `maxVertexAttribDivisor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorProperties maxVertexAttribDivisorAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_maxVertexAttribDivisor(this.segment(), index, value); return this; } + /// Sets `maxVertexAttribDivisor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorProperties maxVertexAttribDivisor(@CType("uint32_t") int value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_maxVertexAttribDivisor(this.segment(), value); return this; } + + /// {@return `supportsNonZeroFirstInstance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_supportsNonZeroFirstInstance(MemorySegment segment, long index) { return (int) VH_supportsNonZeroFirstInstance.get(segment, 0L, index); } + /// {@return `supportsNonZeroFirstInstance`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_supportsNonZeroFirstInstance(MemorySegment segment) { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_supportsNonZeroFirstInstance(segment, 0L); } + /// {@return `supportsNonZeroFirstInstance` at the given index} + /// @param index the index + public @CType("VkBool32") int supportsNonZeroFirstInstanceAt(long index) { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_supportsNonZeroFirstInstance(this.segment(), index); } + /// {@return `supportsNonZeroFirstInstance`} + public @CType("VkBool32") int supportsNonZeroFirstInstance() { return VkPhysicalDeviceVertexAttributeDivisorProperties.get_supportsNonZeroFirstInstance(this.segment()); } + /// Sets `supportsNonZeroFirstInstance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportsNonZeroFirstInstance(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_supportsNonZeroFirstInstance.set(segment, 0L, index, value); } + /// Sets `supportsNonZeroFirstInstance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportsNonZeroFirstInstance(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_supportsNonZeroFirstInstance(segment, 0L, value); } + /// Sets `supportsNonZeroFirstInstance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorProperties supportsNonZeroFirstInstanceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_supportsNonZeroFirstInstance(this.segment(), index, value); return this; } + /// Sets `supportsNonZeroFirstInstance` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVertexAttributeDivisorProperties supportsNonZeroFirstInstance(@CType("VkBool32") int value) { VkPhysicalDeviceVertexAttributeDivisorProperties.set_supportsNonZeroFirstInstance(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan11Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan11Features.java new file mode 100644 index 00000000..b797ac04 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan11Features.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### storageBuffer16BitAccess +/// [VarHandle][#VH_storageBuffer16BitAccess] - [Getter][#storageBuffer16BitAccess()] - [Setter][#storageBuffer16BitAccess(int)] +/// ### uniformAndStorageBuffer16BitAccess +/// [VarHandle][#VH_uniformAndStorageBuffer16BitAccess] - [Getter][#uniformAndStorageBuffer16BitAccess()] - [Setter][#uniformAndStorageBuffer16BitAccess(int)] +/// ### storagePushConstant16 +/// [VarHandle][#VH_storagePushConstant16] - [Getter][#storagePushConstant16()] - [Setter][#storagePushConstant16(int)] +/// ### storageInputOutput16 +/// [VarHandle][#VH_storageInputOutput16] - [Getter][#storageInputOutput16()] - [Setter][#storageInputOutput16(int)] +/// ### multiview +/// [VarHandle][#VH_multiview] - [Getter][#multiview()] - [Setter][#multiview(int)] +/// ### multiviewGeometryShader +/// [VarHandle][#VH_multiviewGeometryShader] - [Getter][#multiviewGeometryShader()] - [Setter][#multiviewGeometryShader(int)] +/// ### multiviewTessellationShader +/// [VarHandle][#VH_multiviewTessellationShader] - [Getter][#multiviewTessellationShader()] - [Setter][#multiviewTessellationShader(int)] +/// ### variablePointersStorageBuffer +/// [VarHandle][#VH_variablePointersStorageBuffer] - [Getter][#variablePointersStorageBuffer()] - [Setter][#variablePointersStorageBuffer(int)] +/// ### variablePointers +/// [VarHandle][#VH_variablePointers] - [Getter][#variablePointers()] - [Setter][#variablePointers(int)] +/// ### protectedMemory +/// [VarHandle][#VH_protectedMemory] - [Getter][#protectedMemory()] - [Setter][#protectedMemory(int)] +/// ### samplerYcbcrConversion +/// [VarHandle][#VH_samplerYcbcrConversion] - [Getter][#samplerYcbcrConversion()] - [Setter][#samplerYcbcrConversion(int)] +/// ### shaderDrawParameters +/// [VarHandle][#VH_shaderDrawParameters] - [Getter][#shaderDrawParameters()] - [Setter][#shaderDrawParameters(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkan11Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 storageBuffer16BitAccess; +/// VkBool32 uniformAndStorageBuffer16BitAccess; +/// VkBool32 storagePushConstant16; +/// VkBool32 storageInputOutput16; +/// VkBool32 multiview; +/// VkBool32 multiviewGeometryShader; +/// VkBool32 multiviewTessellationShader; +/// VkBool32 variablePointersStorageBuffer; +/// VkBool32 variablePointers; +/// VkBool32 protectedMemory; +/// VkBool32 samplerYcbcrConversion; +/// VkBool32 shaderDrawParameters; +/// } VkPhysicalDeviceVulkan11Features; +/// ``` +public final class VkPhysicalDeviceVulkan11Features extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkan11Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("storageBuffer16BitAccess"), + ValueLayout.JAVA_INT.withName("uniformAndStorageBuffer16BitAccess"), + ValueLayout.JAVA_INT.withName("storagePushConstant16"), + ValueLayout.JAVA_INT.withName("storageInputOutput16"), + ValueLayout.JAVA_INT.withName("multiview"), + ValueLayout.JAVA_INT.withName("multiviewGeometryShader"), + ValueLayout.JAVA_INT.withName("multiviewTessellationShader"), + ValueLayout.JAVA_INT.withName("variablePointersStorageBuffer"), + ValueLayout.JAVA_INT.withName("variablePointers"), + ValueLayout.JAVA_INT.withName("protectedMemory"), + ValueLayout.JAVA_INT.withName("samplerYcbcrConversion"), + ValueLayout.JAVA_INT.withName("shaderDrawParameters") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `storageBuffer16BitAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storageBuffer16BitAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageBuffer16BitAccess")); + /// The [VarHandle] of `uniformAndStorageBuffer16BitAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniformAndStorageBuffer16BitAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformAndStorageBuffer16BitAccess")); + /// The [VarHandle] of `storagePushConstant16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storagePushConstant16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storagePushConstant16")); + /// The [VarHandle] of `storageInputOutput16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storageInputOutput16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageInputOutput16")); + /// The [VarHandle] of `multiview` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiview = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiview")); + /// The [VarHandle] of `multiviewGeometryShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiviewGeometryShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiviewGeometryShader")); + /// The [VarHandle] of `multiviewTessellationShader` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_multiviewTessellationShader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("multiviewTessellationShader")); + /// The [VarHandle] of `variablePointersStorageBuffer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_variablePointersStorageBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("variablePointersStorageBuffer")); + /// The [VarHandle] of `variablePointers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_variablePointers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("variablePointers")); + /// The [VarHandle] of `protectedMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_protectedMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("protectedMemory")); + /// The [VarHandle] of `samplerYcbcrConversion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samplerYcbcrConversion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerYcbcrConversion")); + /// The [VarHandle] of `shaderDrawParameters` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDrawParameters = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDrawParameters")); + + /// Creates `VkPhysicalDeviceVulkan11Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkan11Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkan11Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan11Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan11Features(segment); } + + /// Creates `VkPhysicalDeviceVulkan11Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan11Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan11Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkan11Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan11Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan11Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkan11Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkan11Features` + public static VkPhysicalDeviceVulkan11Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkan11Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkan11Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkan11Features` + public static VkPhysicalDeviceVulkan11Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkan11Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkan11Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkan11Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan11Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan11Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkan11Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkan11Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkan11Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Features.set_pNext(this.segment(), value); return this; } + + /// {@return `storageBuffer16BitAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storageBuffer16BitAccess(MemorySegment segment, long index) { return (int) VH_storageBuffer16BitAccess.get(segment, 0L, index); } + /// {@return `storageBuffer16BitAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storageBuffer16BitAccess(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_storageBuffer16BitAccess(segment, 0L); } + /// {@return `storageBuffer16BitAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int storageBuffer16BitAccessAt(long index) { return VkPhysicalDeviceVulkan11Features.get_storageBuffer16BitAccess(this.segment(), index); } + /// {@return `storageBuffer16BitAccess`} + public @CType("VkBool32") int storageBuffer16BitAccess() { return VkPhysicalDeviceVulkan11Features.get_storageBuffer16BitAccess(this.segment()); } + /// Sets `storageBuffer16BitAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageBuffer16BitAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storageBuffer16BitAccess.set(segment, 0L, index, value); } + /// Sets `storageBuffer16BitAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageBuffer16BitAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_storageBuffer16BitAccess(segment, 0L, value); } + /// Sets `storageBuffer16BitAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features storageBuffer16BitAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_storageBuffer16BitAccess(this.segment(), index, value); return this; } + /// Sets `storageBuffer16BitAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features storageBuffer16BitAccess(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_storageBuffer16BitAccess(this.segment(), value); return this; } + + /// {@return `uniformAndStorageBuffer16BitAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_uniformAndStorageBuffer16BitAccess(MemorySegment segment, long index) { return (int) VH_uniformAndStorageBuffer16BitAccess.get(segment, 0L, index); } + /// {@return `uniformAndStorageBuffer16BitAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_uniformAndStorageBuffer16BitAccess(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_uniformAndStorageBuffer16BitAccess(segment, 0L); } + /// {@return `uniformAndStorageBuffer16BitAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int uniformAndStorageBuffer16BitAccessAt(long index) { return VkPhysicalDeviceVulkan11Features.get_uniformAndStorageBuffer16BitAccess(this.segment(), index); } + /// {@return `uniformAndStorageBuffer16BitAccess`} + public @CType("VkBool32") int uniformAndStorageBuffer16BitAccess() { return VkPhysicalDeviceVulkan11Features.get_uniformAndStorageBuffer16BitAccess(this.segment()); } + /// Sets `uniformAndStorageBuffer16BitAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformAndStorageBuffer16BitAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_uniformAndStorageBuffer16BitAccess.set(segment, 0L, index, value); } + /// Sets `uniformAndStorageBuffer16BitAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformAndStorageBuffer16BitAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_uniformAndStorageBuffer16BitAccess(segment, 0L, value); } + /// Sets `uniformAndStorageBuffer16BitAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features uniformAndStorageBuffer16BitAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_uniformAndStorageBuffer16BitAccess(this.segment(), index, value); return this; } + /// Sets `uniformAndStorageBuffer16BitAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features uniformAndStorageBuffer16BitAccess(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_uniformAndStorageBuffer16BitAccess(this.segment(), value); return this; } + + /// {@return `storagePushConstant16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storagePushConstant16(MemorySegment segment, long index) { return (int) VH_storagePushConstant16.get(segment, 0L, index); } + /// {@return `storagePushConstant16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storagePushConstant16(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_storagePushConstant16(segment, 0L); } + /// {@return `storagePushConstant16` at the given index} + /// @param index the index + public @CType("VkBool32") int storagePushConstant16At(long index) { return VkPhysicalDeviceVulkan11Features.get_storagePushConstant16(this.segment(), index); } + /// {@return `storagePushConstant16`} + public @CType("VkBool32") int storagePushConstant16() { return VkPhysicalDeviceVulkan11Features.get_storagePushConstant16(this.segment()); } + /// Sets `storagePushConstant16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storagePushConstant16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storagePushConstant16.set(segment, 0L, index, value); } + /// Sets `storagePushConstant16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storagePushConstant16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_storagePushConstant16(segment, 0L, value); } + /// Sets `storagePushConstant16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features storagePushConstant16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_storagePushConstant16(this.segment(), index, value); return this; } + /// Sets `storagePushConstant16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features storagePushConstant16(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_storagePushConstant16(this.segment(), value); return this; } + + /// {@return `storageInputOutput16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storageInputOutput16(MemorySegment segment, long index) { return (int) VH_storageInputOutput16.get(segment, 0L, index); } + /// {@return `storageInputOutput16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storageInputOutput16(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_storageInputOutput16(segment, 0L); } + /// {@return `storageInputOutput16` at the given index} + /// @param index the index + public @CType("VkBool32") int storageInputOutput16At(long index) { return VkPhysicalDeviceVulkan11Features.get_storageInputOutput16(this.segment(), index); } + /// {@return `storageInputOutput16`} + public @CType("VkBool32") int storageInputOutput16() { return VkPhysicalDeviceVulkan11Features.get_storageInputOutput16(this.segment()); } + /// Sets `storageInputOutput16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageInputOutput16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storageInputOutput16.set(segment, 0L, index, value); } + /// Sets `storageInputOutput16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageInputOutput16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_storageInputOutput16(segment, 0L, value); } + /// Sets `storageInputOutput16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features storageInputOutput16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_storageInputOutput16(this.segment(), index, value); return this; } + /// Sets `storageInputOutput16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features storageInputOutput16(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_storageInputOutput16(this.segment(), value); return this; } + + /// {@return `multiview` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiview(MemorySegment segment, long index) { return (int) VH_multiview.get(segment, 0L, index); } + /// {@return `multiview`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiview(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_multiview(segment, 0L); } + /// {@return `multiview` at the given index} + /// @param index the index + public @CType("VkBool32") int multiviewAt(long index) { return VkPhysicalDeviceVulkan11Features.get_multiview(this.segment(), index); } + /// {@return `multiview`} + public @CType("VkBool32") int multiview() { return VkPhysicalDeviceVulkan11Features.get_multiview(this.segment()); } + /// Sets `multiview` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiview(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiview.set(segment, 0L, index, value); } + /// Sets `multiview` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiview(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_multiview(segment, 0L, value); } + /// Sets `multiview` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features multiviewAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_multiview(this.segment(), index, value); return this; } + /// Sets `multiview` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features multiview(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_multiview(this.segment(), value); return this; } + + /// {@return `multiviewGeometryShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiviewGeometryShader(MemorySegment segment, long index) { return (int) VH_multiviewGeometryShader.get(segment, 0L, index); } + /// {@return `multiviewGeometryShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiviewGeometryShader(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_multiviewGeometryShader(segment, 0L); } + /// {@return `multiviewGeometryShader` at the given index} + /// @param index the index + public @CType("VkBool32") int multiviewGeometryShaderAt(long index) { return VkPhysicalDeviceVulkan11Features.get_multiviewGeometryShader(this.segment(), index); } + /// {@return `multiviewGeometryShader`} + public @CType("VkBool32") int multiviewGeometryShader() { return VkPhysicalDeviceVulkan11Features.get_multiviewGeometryShader(this.segment()); } + /// Sets `multiviewGeometryShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiviewGeometryShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiviewGeometryShader.set(segment, 0L, index, value); } + /// Sets `multiviewGeometryShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiviewGeometryShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_multiviewGeometryShader(segment, 0L, value); } + /// Sets `multiviewGeometryShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features multiviewGeometryShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_multiviewGeometryShader(this.segment(), index, value); return this; } + /// Sets `multiviewGeometryShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features multiviewGeometryShader(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_multiviewGeometryShader(this.segment(), value); return this; } + + /// {@return `multiviewTessellationShader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_multiviewTessellationShader(MemorySegment segment, long index) { return (int) VH_multiviewTessellationShader.get(segment, 0L, index); } + /// {@return `multiviewTessellationShader`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_multiviewTessellationShader(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_multiviewTessellationShader(segment, 0L); } + /// {@return `multiviewTessellationShader` at the given index} + /// @param index the index + public @CType("VkBool32") int multiviewTessellationShaderAt(long index) { return VkPhysicalDeviceVulkan11Features.get_multiviewTessellationShader(this.segment(), index); } + /// {@return `multiviewTessellationShader`} + public @CType("VkBool32") int multiviewTessellationShader() { return VkPhysicalDeviceVulkan11Features.get_multiviewTessellationShader(this.segment()); } + /// Sets `multiviewTessellationShader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_multiviewTessellationShader(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_multiviewTessellationShader.set(segment, 0L, index, value); } + /// Sets `multiviewTessellationShader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_multiviewTessellationShader(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_multiviewTessellationShader(segment, 0L, value); } + /// Sets `multiviewTessellationShader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features multiviewTessellationShaderAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_multiviewTessellationShader(this.segment(), index, value); return this; } + /// Sets `multiviewTessellationShader` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features multiviewTessellationShader(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_multiviewTessellationShader(this.segment(), value); return this; } + + /// {@return `variablePointersStorageBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_variablePointersStorageBuffer(MemorySegment segment, long index) { return (int) VH_variablePointersStorageBuffer.get(segment, 0L, index); } + /// {@return `variablePointersStorageBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_variablePointersStorageBuffer(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_variablePointersStorageBuffer(segment, 0L); } + /// {@return `variablePointersStorageBuffer` at the given index} + /// @param index the index + public @CType("VkBool32") int variablePointersStorageBufferAt(long index) { return VkPhysicalDeviceVulkan11Features.get_variablePointersStorageBuffer(this.segment(), index); } + /// {@return `variablePointersStorageBuffer`} + public @CType("VkBool32") int variablePointersStorageBuffer() { return VkPhysicalDeviceVulkan11Features.get_variablePointersStorageBuffer(this.segment()); } + /// Sets `variablePointersStorageBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_variablePointersStorageBuffer(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_variablePointersStorageBuffer.set(segment, 0L, index, value); } + /// Sets `variablePointersStorageBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_variablePointersStorageBuffer(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_variablePointersStorageBuffer(segment, 0L, value); } + /// Sets `variablePointersStorageBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features variablePointersStorageBufferAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_variablePointersStorageBuffer(this.segment(), index, value); return this; } + /// Sets `variablePointersStorageBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features variablePointersStorageBuffer(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_variablePointersStorageBuffer(this.segment(), value); return this; } + + /// {@return `variablePointers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_variablePointers(MemorySegment segment, long index) { return (int) VH_variablePointers.get(segment, 0L, index); } + /// {@return `variablePointers`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_variablePointers(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_variablePointers(segment, 0L); } + /// {@return `variablePointers` at the given index} + /// @param index the index + public @CType("VkBool32") int variablePointersAt(long index) { return VkPhysicalDeviceVulkan11Features.get_variablePointers(this.segment(), index); } + /// {@return `variablePointers`} + public @CType("VkBool32") int variablePointers() { return VkPhysicalDeviceVulkan11Features.get_variablePointers(this.segment()); } + /// Sets `variablePointers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_variablePointers(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_variablePointers.set(segment, 0L, index, value); } + /// Sets `variablePointers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_variablePointers(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_variablePointers(segment, 0L, value); } + /// Sets `variablePointers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features variablePointersAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_variablePointers(this.segment(), index, value); return this; } + /// Sets `variablePointers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features variablePointers(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_variablePointers(this.segment(), value); return this; } + + /// {@return `protectedMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_protectedMemory(MemorySegment segment, long index) { return (int) VH_protectedMemory.get(segment, 0L, index); } + /// {@return `protectedMemory`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_protectedMemory(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_protectedMemory(segment, 0L); } + /// {@return `protectedMemory` at the given index} + /// @param index the index + public @CType("VkBool32") int protectedMemoryAt(long index) { return VkPhysicalDeviceVulkan11Features.get_protectedMemory(this.segment(), index); } + /// {@return `protectedMemory`} + public @CType("VkBool32") int protectedMemory() { return VkPhysicalDeviceVulkan11Features.get_protectedMemory(this.segment()); } + /// Sets `protectedMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_protectedMemory(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_protectedMemory.set(segment, 0L, index, value); } + /// Sets `protectedMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_protectedMemory(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_protectedMemory(segment, 0L, value); } + /// Sets `protectedMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features protectedMemoryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_protectedMemory(this.segment(), index, value); return this; } + /// Sets `protectedMemory` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features protectedMemory(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_protectedMemory(this.segment(), value); return this; } + + /// {@return `samplerYcbcrConversion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_samplerYcbcrConversion(MemorySegment segment, long index) { return (int) VH_samplerYcbcrConversion.get(segment, 0L, index); } + /// {@return `samplerYcbcrConversion`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_samplerYcbcrConversion(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_samplerYcbcrConversion(segment, 0L); } + /// {@return `samplerYcbcrConversion` at the given index} + /// @param index the index + public @CType("VkBool32") int samplerYcbcrConversionAt(long index) { return VkPhysicalDeviceVulkan11Features.get_samplerYcbcrConversion(this.segment(), index); } + /// {@return `samplerYcbcrConversion`} + public @CType("VkBool32") int samplerYcbcrConversion() { return VkPhysicalDeviceVulkan11Features.get_samplerYcbcrConversion(this.segment()); } + /// Sets `samplerYcbcrConversion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerYcbcrConversion(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_samplerYcbcrConversion.set(segment, 0L, index, value); } + /// Sets `samplerYcbcrConversion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerYcbcrConversion(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_samplerYcbcrConversion(segment, 0L, value); } + /// Sets `samplerYcbcrConversion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features samplerYcbcrConversionAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_samplerYcbcrConversion(this.segment(), index, value); return this; } + /// Sets `samplerYcbcrConversion` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features samplerYcbcrConversion(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_samplerYcbcrConversion(this.segment(), value); return this; } + + /// {@return `shaderDrawParameters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDrawParameters(MemorySegment segment, long index) { return (int) VH_shaderDrawParameters.get(segment, 0L, index); } + /// {@return `shaderDrawParameters`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDrawParameters(MemorySegment segment) { return VkPhysicalDeviceVulkan11Features.get_shaderDrawParameters(segment, 0L); } + /// {@return `shaderDrawParameters` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDrawParametersAt(long index) { return VkPhysicalDeviceVulkan11Features.get_shaderDrawParameters(this.segment(), index); } + /// {@return `shaderDrawParameters`} + public @CType("VkBool32") int shaderDrawParameters() { return VkPhysicalDeviceVulkan11Features.get_shaderDrawParameters(this.segment()); } + /// Sets `shaderDrawParameters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDrawParameters(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDrawParameters.set(segment, 0L, index, value); } + /// Sets `shaderDrawParameters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDrawParameters(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_shaderDrawParameters(segment, 0L, value); } + /// Sets `shaderDrawParameters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features shaderDrawParametersAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_shaderDrawParameters(this.segment(), index, value); return this; } + /// Sets `shaderDrawParameters` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Features shaderDrawParameters(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Features.set_shaderDrawParameters(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan11Properties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan11Properties.java new file mode 100644 index 00000000..a5b46349 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan11Properties.java @@ -0,0 +1,754 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK10.*; +import static overrungl.vulkan.VK11.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceUUID +/// [Byte offset handle][#MH_deviceUUID] - [Memory layout][#ML_deviceUUID] - [Getter][#deviceUUID(long)] - [Setter][#deviceUUID(long, java.lang.foreign.MemorySegment)] +/// ### driverUUID +/// [Byte offset handle][#MH_driverUUID] - [Memory layout][#ML_driverUUID] - [Getter][#driverUUID(long)] - [Setter][#driverUUID(long, java.lang.foreign.MemorySegment)] +/// ### deviceLUID +/// [Byte offset handle][#MH_deviceLUID] - [Memory layout][#ML_deviceLUID] - [Getter][#deviceLUID(long)] - [Setter][#deviceLUID(long, java.lang.foreign.MemorySegment)] +/// ### deviceNodeMask +/// [VarHandle][#VH_deviceNodeMask] - [Getter][#deviceNodeMask()] - [Setter][#deviceNodeMask(int)] +/// ### deviceLUIDValid +/// [VarHandle][#VH_deviceLUIDValid] - [Getter][#deviceLUIDValid()] - [Setter][#deviceLUIDValid(int)] +/// ### subgroupSize +/// [VarHandle][#VH_subgroupSize] - [Getter][#subgroupSize()] - [Setter][#subgroupSize(int)] +/// ### subgroupSupportedStages +/// [VarHandle][#VH_subgroupSupportedStages] - [Getter][#subgroupSupportedStages()] - [Setter][#subgroupSupportedStages(int)] +/// ### subgroupSupportedOperations +/// [VarHandle][#VH_subgroupSupportedOperations] - [Getter][#subgroupSupportedOperations()] - [Setter][#subgroupSupportedOperations(int)] +/// ### subgroupQuadOperationsInAllStages +/// [VarHandle][#VH_subgroupQuadOperationsInAllStages] - [Getter][#subgroupQuadOperationsInAllStages()] - [Setter][#subgroupQuadOperationsInAllStages(int)] +/// ### pointClippingBehavior +/// [VarHandle][#VH_pointClippingBehavior] - [Getter][#pointClippingBehavior()] - [Setter][#pointClippingBehavior(int)] +/// ### maxMultiviewViewCount +/// [VarHandle][#VH_maxMultiviewViewCount] - [Getter][#maxMultiviewViewCount()] - [Setter][#maxMultiviewViewCount(int)] +/// ### maxMultiviewInstanceIndex +/// [VarHandle][#VH_maxMultiviewInstanceIndex] - [Getter][#maxMultiviewInstanceIndex()] - [Setter][#maxMultiviewInstanceIndex(int)] +/// ### protectedNoFault +/// [VarHandle][#VH_protectedNoFault] - [Getter][#protectedNoFault()] - [Setter][#protectedNoFault(int)] +/// ### maxPerSetDescriptors +/// [VarHandle][#VH_maxPerSetDescriptors] - [Getter][#maxPerSetDescriptors()] - [Setter][#maxPerSetDescriptors(int)] +/// ### maxMemoryAllocationSize +/// [VarHandle][#VH_maxMemoryAllocationSize] - [Getter][#maxMemoryAllocationSize()] - [Setter][#maxMemoryAllocationSize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkan11Properties { +/// VkStructureType sType; +/// void * pNext; +/// uint8_t[VK_UUID_SIZE] deviceUUID; +/// uint8_t[VK_UUID_SIZE] driverUUID; +/// uint8_t[VK_LUID_SIZE] deviceLUID; +/// uint32_t deviceNodeMask; +/// VkBool32 deviceLUIDValid; +/// uint32_t subgroupSize; +/// VkShaderStageFlags subgroupSupportedStages; +/// VkSubgroupFeatureFlags subgroupSupportedOperations; +/// VkBool32 subgroupQuadOperationsInAllStages; +/// VkPointClippingBehavior pointClippingBehavior; +/// uint32_t maxMultiviewViewCount; +/// uint32_t maxMultiviewInstanceIndex; +/// VkBool32 protectedNoFault; +/// uint32_t maxPerSetDescriptors; +/// VkDeviceSize maxMemoryAllocationSize; +/// } VkPhysicalDeviceVulkan11Properties; +/// ``` +public final class VkPhysicalDeviceVulkan11Properties extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkan11Properties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("deviceUUID"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("driverUUID"), + MemoryLayout.sequenceLayout(VK_LUID_SIZE, ValueLayout.JAVA_BYTE).withName("deviceLUID"), + ValueLayout.JAVA_INT.withName("deviceNodeMask"), + ValueLayout.JAVA_INT.withName("deviceLUIDValid"), + ValueLayout.JAVA_INT.withName("subgroupSize"), + ValueLayout.JAVA_INT.withName("subgroupSupportedStages"), + ValueLayout.JAVA_INT.withName("subgroupSupportedOperations"), + ValueLayout.JAVA_INT.withName("subgroupQuadOperationsInAllStages"), + ValueLayout.JAVA_INT.withName("pointClippingBehavior"), + ValueLayout.JAVA_INT.withName("maxMultiviewViewCount"), + ValueLayout.JAVA_INT.withName("maxMultiviewInstanceIndex"), + ValueLayout.JAVA_INT.withName("protectedNoFault"), + ValueLayout.JAVA_INT.withName("maxPerSetDescriptors"), + ValueLayout.JAVA_LONG.withName("maxMemoryAllocationSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `deviceUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_deviceUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("deviceUUID"), PathElement.sequenceElement()); + /// The memory layout of `deviceUUID`. + public static final MemoryLayout ML_deviceUUID = LAYOUT.select(PathElement.groupElement("deviceUUID")); + /// The byte offset handle of `driverUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_driverUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("driverUUID"), PathElement.sequenceElement()); + /// The memory layout of `driverUUID`. + public static final MemoryLayout ML_driverUUID = LAYOUT.select(PathElement.groupElement("driverUUID")); + /// The byte offset handle of `deviceLUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_deviceLUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("deviceLUID"), PathElement.sequenceElement()); + /// The memory layout of `deviceLUID`. + public static final MemoryLayout ML_deviceLUID = LAYOUT.select(PathElement.groupElement("deviceLUID")); + /// The [VarHandle] of `deviceNodeMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceNodeMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceNodeMask")); + /// The [VarHandle] of `deviceLUIDValid` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceLUIDValid = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceLUIDValid")); + /// The [VarHandle] of `subgroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subgroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subgroupSize")); + /// The [VarHandle] of `subgroupSupportedStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subgroupSupportedStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subgroupSupportedStages")); + /// The [VarHandle] of `subgroupSupportedOperations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subgroupSupportedOperations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subgroupSupportedOperations")); + /// The [VarHandle] of `subgroupQuadOperationsInAllStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subgroupQuadOperationsInAllStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subgroupQuadOperationsInAllStages")); + /// The [VarHandle] of `pointClippingBehavior` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pointClippingBehavior = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pointClippingBehavior")); + /// The [VarHandle] of `maxMultiviewViewCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMultiviewViewCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMultiviewViewCount")); + /// The [VarHandle] of `maxMultiviewInstanceIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxMultiviewInstanceIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMultiviewInstanceIndex")); + /// The [VarHandle] of `protectedNoFault` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_protectedNoFault = LAYOUT.arrayElementVarHandle(PathElement.groupElement("protectedNoFault")); + /// The [VarHandle] of `maxPerSetDescriptors` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerSetDescriptors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerSetDescriptors")); + /// The [VarHandle] of `maxMemoryAllocationSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxMemoryAllocationSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxMemoryAllocationSize")); + + /// Creates `VkPhysicalDeviceVulkan11Properties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkan11Properties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkan11Properties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan11Properties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan11Properties(segment); } + + /// Creates `VkPhysicalDeviceVulkan11Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan11Properties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan11Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkan11Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan11Properties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan11Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkan11Properties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkan11Properties` + public static VkPhysicalDeviceVulkan11Properties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkan11Properties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkan11Properties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkan11Properties` + public static VkPhysicalDeviceVulkan11Properties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkan11Properties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkan11Properties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan11Properties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan11Properties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkan11Properties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkan11Properties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_deviceUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_deviceUUID.invokeExact(0L, elementIndex), index), ML_deviceUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `deviceUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_deviceUUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceVulkan11Properties.get_deviceUUID(segment, 0L, elementIndex); } + /// {@return `deviceUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment deviceUUIDAt(long index, long elementIndex) { return VkPhysicalDeviceVulkan11Properties.get_deviceUUID(this.segment(), index, elementIndex); } + /// {@return `deviceUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment deviceUUID(long elementIndex) { return VkPhysicalDeviceVulkan11Properties.get_deviceUUID(this.segment(), elementIndex); } + /// Sets `deviceUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_deviceUUID.invokeExact(0L, elementIndex), index), ML_deviceUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `deviceUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_deviceUUID(segment, 0L, elementIndex, value); } + /// Sets `deviceUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties deviceUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_deviceUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `deviceUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties deviceUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_deviceUUID(this.segment(), elementIndex, value); return this; } + + /// {@return `driverUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_driverUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_driverUUID.invokeExact(0L, elementIndex), index), ML_driverUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `driverUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_driverUUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceVulkan11Properties.get_driverUUID(segment, 0L, elementIndex); } + /// {@return `driverUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment driverUUIDAt(long index, long elementIndex) { return VkPhysicalDeviceVulkan11Properties.get_driverUUID(this.segment(), index, elementIndex); } + /// {@return `driverUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment driverUUID(long elementIndex) { return VkPhysicalDeviceVulkan11Properties.get_driverUUID(this.segment(), elementIndex); } + /// Sets `driverUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_driverUUID.invokeExact(0L, elementIndex), index), ML_driverUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `driverUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_driverUUID(segment, 0L, elementIndex, value); } + /// Sets `driverUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties driverUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_driverUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `driverUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties driverUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_driverUUID(this.segment(), elementIndex, value); return this; } + + /// {@return `deviceLUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment get_deviceLUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_deviceLUID.invokeExact(0L, elementIndex), index), ML_deviceLUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `deviceLUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment get_deviceLUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceVulkan11Properties.get_deviceLUID(segment, 0L, elementIndex); } + /// {@return `deviceLUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment deviceLUIDAt(long index, long elementIndex) { return VkPhysicalDeviceVulkan11Properties.get_deviceLUID(this.segment(), index, elementIndex); } + /// {@return `deviceLUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment deviceLUID(long elementIndex) { return VkPhysicalDeviceVulkan11Properties.get_deviceLUID(this.segment(), elementIndex); } + /// Sets `deviceLUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceLUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_deviceLUID.invokeExact(0L, elementIndex), index), ML_deviceLUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `deviceLUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_deviceLUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_deviceLUID(segment, 0L, elementIndex, value); } + /// Sets `deviceLUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties deviceLUIDAt(long index, long elementIndex, @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_deviceLUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `deviceLUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties deviceLUID(long elementIndex, @CType("uint8_t[VK_LUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan11Properties.set_deviceLUID(this.segment(), elementIndex, value); return this; } + + /// {@return `deviceNodeMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceNodeMask(MemorySegment segment, long index) { return (int) VH_deviceNodeMask.get(segment, 0L, index); } + /// {@return `deviceNodeMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceNodeMask(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_deviceNodeMask(segment, 0L); } + /// {@return `deviceNodeMask` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceNodeMaskAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_deviceNodeMask(this.segment(), index); } + /// {@return `deviceNodeMask`} + public @CType("uint32_t") int deviceNodeMask() { return VkPhysicalDeviceVulkan11Properties.get_deviceNodeMask(this.segment()); } + /// Sets `deviceNodeMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceNodeMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceNodeMask.set(segment, 0L, index, value); } + /// Sets `deviceNodeMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceNodeMask(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_deviceNodeMask(segment, 0L, value); } + /// Sets `deviceNodeMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties deviceNodeMaskAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_deviceNodeMask(this.segment(), index, value); return this; } + /// Sets `deviceNodeMask` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties deviceNodeMask(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_deviceNodeMask(this.segment(), value); return this; } + + /// {@return `deviceLUIDValid` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceLUIDValid(MemorySegment segment, long index) { return (int) VH_deviceLUIDValid.get(segment, 0L, index); } + /// {@return `deviceLUIDValid`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceLUIDValid(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_deviceLUIDValid(segment, 0L); } + /// {@return `deviceLUIDValid` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceLUIDValidAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_deviceLUIDValid(this.segment(), index); } + /// {@return `deviceLUIDValid`} + public @CType("VkBool32") int deviceLUIDValid() { return VkPhysicalDeviceVulkan11Properties.get_deviceLUIDValid(this.segment()); } + /// Sets `deviceLUIDValid` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceLUIDValid(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceLUIDValid.set(segment, 0L, index, value); } + /// Sets `deviceLUIDValid` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceLUIDValid(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Properties.set_deviceLUIDValid(segment, 0L, value); } + /// Sets `deviceLUIDValid` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties deviceLUIDValidAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Properties.set_deviceLUIDValid(this.segment(), index, value); return this; } + /// Sets `deviceLUIDValid` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties deviceLUIDValid(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Properties.set_deviceLUIDValid(this.segment(), value); return this; } + + /// {@return `subgroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subgroupSize(MemorySegment segment, long index) { return (int) VH_subgroupSize.get(segment, 0L, index); } + /// {@return `subgroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subgroupSize(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_subgroupSize(segment, 0L); } + /// {@return `subgroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int subgroupSizeAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_subgroupSize(this.segment(), index); } + /// {@return `subgroupSize`} + public @CType("uint32_t") int subgroupSize() { return VkPhysicalDeviceVulkan11Properties.get_subgroupSize(this.segment()); } + /// Sets `subgroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subgroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subgroupSize.set(segment, 0L, index, value); } + /// Sets `subgroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subgroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupSize(segment, 0L, value); } + /// Sets `subgroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties subgroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupSize(this.segment(), index, value); return this; } + /// Sets `subgroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties subgroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupSize(this.segment(), value); return this; } + + /// {@return `subgroupSupportedStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_subgroupSupportedStages(MemorySegment segment, long index) { return (int) VH_subgroupSupportedStages.get(segment, 0L, index); } + /// {@return `subgroupSupportedStages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_subgroupSupportedStages(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_subgroupSupportedStages(segment, 0L); } + /// {@return `subgroupSupportedStages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int subgroupSupportedStagesAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_subgroupSupportedStages(this.segment(), index); } + /// {@return `subgroupSupportedStages`} + public @CType("VkShaderStageFlags") int subgroupSupportedStages() { return VkPhysicalDeviceVulkan11Properties.get_subgroupSupportedStages(this.segment()); } + /// Sets `subgroupSupportedStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subgroupSupportedStages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_subgroupSupportedStages.set(segment, 0L, index, value); } + /// Sets `subgroupSupportedStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subgroupSupportedStages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupSupportedStages(segment, 0L, value); } + /// Sets `subgroupSupportedStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties subgroupSupportedStagesAt(long index, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupSupportedStages(this.segment(), index, value); return this; } + /// Sets `subgroupSupportedStages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties subgroupSupportedStages(@CType("VkShaderStageFlags") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupSupportedStages(this.segment(), value); return this; } + + /// {@return `subgroupSupportedOperations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSubgroupFeatureFlags") int get_subgroupSupportedOperations(MemorySegment segment, long index) { return (int) VH_subgroupSupportedOperations.get(segment, 0L, index); } + /// {@return `subgroupSupportedOperations`} + /// @param segment the segment of the struct + public static @CType("VkSubgroupFeatureFlags") int get_subgroupSupportedOperations(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_subgroupSupportedOperations(segment, 0L); } + /// {@return `subgroupSupportedOperations` at the given index} + /// @param index the index + public @CType("VkSubgroupFeatureFlags") int subgroupSupportedOperationsAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_subgroupSupportedOperations(this.segment(), index); } + /// {@return `subgroupSupportedOperations`} + public @CType("VkSubgroupFeatureFlags") int subgroupSupportedOperations() { return VkPhysicalDeviceVulkan11Properties.get_subgroupSupportedOperations(this.segment()); } + /// Sets `subgroupSupportedOperations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subgroupSupportedOperations(MemorySegment segment, long index, @CType("VkSubgroupFeatureFlags") int value) { VH_subgroupSupportedOperations.set(segment, 0L, index, value); } + /// Sets `subgroupSupportedOperations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subgroupSupportedOperations(MemorySegment segment, @CType("VkSubgroupFeatureFlags") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupSupportedOperations(segment, 0L, value); } + /// Sets `subgroupSupportedOperations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties subgroupSupportedOperationsAt(long index, @CType("VkSubgroupFeatureFlags") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupSupportedOperations(this.segment(), index, value); return this; } + /// Sets `subgroupSupportedOperations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties subgroupSupportedOperations(@CType("VkSubgroupFeatureFlags") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupSupportedOperations(this.segment(), value); return this; } + + /// {@return `subgroupQuadOperationsInAllStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_subgroupQuadOperationsInAllStages(MemorySegment segment, long index) { return (int) VH_subgroupQuadOperationsInAllStages.get(segment, 0L, index); } + /// {@return `subgroupQuadOperationsInAllStages`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_subgroupQuadOperationsInAllStages(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_subgroupQuadOperationsInAllStages(segment, 0L); } + /// {@return `subgroupQuadOperationsInAllStages` at the given index} + /// @param index the index + public @CType("VkBool32") int subgroupQuadOperationsInAllStagesAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_subgroupQuadOperationsInAllStages(this.segment(), index); } + /// {@return `subgroupQuadOperationsInAllStages`} + public @CType("VkBool32") int subgroupQuadOperationsInAllStages() { return VkPhysicalDeviceVulkan11Properties.get_subgroupQuadOperationsInAllStages(this.segment()); } + /// Sets `subgroupQuadOperationsInAllStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subgroupQuadOperationsInAllStages(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_subgroupQuadOperationsInAllStages.set(segment, 0L, index, value); } + /// Sets `subgroupQuadOperationsInAllStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subgroupQuadOperationsInAllStages(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupQuadOperationsInAllStages(segment, 0L, value); } + /// Sets `subgroupQuadOperationsInAllStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties subgroupQuadOperationsInAllStagesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupQuadOperationsInAllStages(this.segment(), index, value); return this; } + /// Sets `subgroupQuadOperationsInAllStages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties subgroupQuadOperationsInAllStages(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Properties.set_subgroupQuadOperationsInAllStages(this.segment(), value); return this; } + + /// {@return `pointClippingBehavior` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPointClippingBehavior") int get_pointClippingBehavior(MemorySegment segment, long index) { return (int) VH_pointClippingBehavior.get(segment, 0L, index); } + /// {@return `pointClippingBehavior`} + /// @param segment the segment of the struct + public static @CType("VkPointClippingBehavior") int get_pointClippingBehavior(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_pointClippingBehavior(segment, 0L); } + /// {@return `pointClippingBehavior` at the given index} + /// @param index the index + public @CType("VkPointClippingBehavior") int pointClippingBehaviorAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_pointClippingBehavior(this.segment(), index); } + /// {@return `pointClippingBehavior`} + public @CType("VkPointClippingBehavior") int pointClippingBehavior() { return VkPhysicalDeviceVulkan11Properties.get_pointClippingBehavior(this.segment()); } + /// Sets `pointClippingBehavior` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pointClippingBehavior(MemorySegment segment, long index, @CType("VkPointClippingBehavior") int value) { VH_pointClippingBehavior.set(segment, 0L, index, value); } + /// Sets `pointClippingBehavior` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pointClippingBehavior(MemorySegment segment, @CType("VkPointClippingBehavior") int value) { VkPhysicalDeviceVulkan11Properties.set_pointClippingBehavior(segment, 0L, value); } + /// Sets `pointClippingBehavior` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties pointClippingBehaviorAt(long index, @CType("VkPointClippingBehavior") int value) { VkPhysicalDeviceVulkan11Properties.set_pointClippingBehavior(this.segment(), index, value); return this; } + /// Sets `pointClippingBehavior` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties pointClippingBehavior(@CType("VkPointClippingBehavior") int value) { VkPhysicalDeviceVulkan11Properties.set_pointClippingBehavior(this.segment(), value); return this; } + + /// {@return `maxMultiviewViewCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMultiviewViewCount(MemorySegment segment, long index) { return (int) VH_maxMultiviewViewCount.get(segment, 0L, index); } + /// {@return `maxMultiviewViewCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMultiviewViewCount(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_maxMultiviewViewCount(segment, 0L); } + /// {@return `maxMultiviewViewCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMultiviewViewCountAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_maxMultiviewViewCount(this.segment(), index); } + /// {@return `maxMultiviewViewCount`} + public @CType("uint32_t") int maxMultiviewViewCount() { return VkPhysicalDeviceVulkan11Properties.get_maxMultiviewViewCount(this.segment()); } + /// Sets `maxMultiviewViewCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMultiviewViewCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMultiviewViewCount.set(segment, 0L, index, value); } + /// Sets `maxMultiviewViewCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMultiviewViewCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_maxMultiviewViewCount(segment, 0L, value); } + /// Sets `maxMultiviewViewCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties maxMultiviewViewCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_maxMultiviewViewCount(this.segment(), index, value); return this; } + /// Sets `maxMultiviewViewCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties maxMultiviewViewCount(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_maxMultiviewViewCount(this.segment(), value); return this; } + + /// {@return `maxMultiviewInstanceIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxMultiviewInstanceIndex(MemorySegment segment, long index) { return (int) VH_maxMultiviewInstanceIndex.get(segment, 0L, index); } + /// {@return `maxMultiviewInstanceIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxMultiviewInstanceIndex(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_maxMultiviewInstanceIndex(segment, 0L); } + /// {@return `maxMultiviewInstanceIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int maxMultiviewInstanceIndexAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_maxMultiviewInstanceIndex(this.segment(), index); } + /// {@return `maxMultiviewInstanceIndex`} + public @CType("uint32_t") int maxMultiviewInstanceIndex() { return VkPhysicalDeviceVulkan11Properties.get_maxMultiviewInstanceIndex(this.segment()); } + /// Sets `maxMultiviewInstanceIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMultiviewInstanceIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxMultiviewInstanceIndex.set(segment, 0L, index, value); } + /// Sets `maxMultiviewInstanceIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMultiviewInstanceIndex(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_maxMultiviewInstanceIndex(segment, 0L, value); } + /// Sets `maxMultiviewInstanceIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties maxMultiviewInstanceIndexAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_maxMultiviewInstanceIndex(this.segment(), index, value); return this; } + /// Sets `maxMultiviewInstanceIndex` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties maxMultiviewInstanceIndex(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_maxMultiviewInstanceIndex(this.segment(), value); return this; } + + /// {@return `protectedNoFault` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_protectedNoFault(MemorySegment segment, long index) { return (int) VH_protectedNoFault.get(segment, 0L, index); } + /// {@return `protectedNoFault`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_protectedNoFault(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_protectedNoFault(segment, 0L); } + /// {@return `protectedNoFault` at the given index} + /// @param index the index + public @CType("VkBool32") int protectedNoFaultAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_protectedNoFault(this.segment(), index); } + /// {@return `protectedNoFault`} + public @CType("VkBool32") int protectedNoFault() { return VkPhysicalDeviceVulkan11Properties.get_protectedNoFault(this.segment()); } + /// Sets `protectedNoFault` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_protectedNoFault(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_protectedNoFault.set(segment, 0L, index, value); } + /// Sets `protectedNoFault` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_protectedNoFault(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Properties.set_protectedNoFault(segment, 0L, value); } + /// Sets `protectedNoFault` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties protectedNoFaultAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Properties.set_protectedNoFault(this.segment(), index, value); return this; } + /// Sets `protectedNoFault` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties protectedNoFault(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan11Properties.set_protectedNoFault(this.segment(), value); return this; } + + /// {@return `maxPerSetDescriptors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerSetDescriptors(MemorySegment segment, long index) { return (int) VH_maxPerSetDescriptors.get(segment, 0L, index); } + /// {@return `maxPerSetDescriptors`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerSetDescriptors(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_maxPerSetDescriptors(segment, 0L); } + /// {@return `maxPerSetDescriptors` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerSetDescriptorsAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_maxPerSetDescriptors(this.segment(), index); } + /// {@return `maxPerSetDescriptors`} + public @CType("uint32_t") int maxPerSetDescriptors() { return VkPhysicalDeviceVulkan11Properties.get_maxPerSetDescriptors(this.segment()); } + /// Sets `maxPerSetDescriptors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerSetDescriptors(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerSetDescriptors.set(segment, 0L, index, value); } + /// Sets `maxPerSetDescriptors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerSetDescriptors(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_maxPerSetDescriptors(segment, 0L, value); } + /// Sets `maxPerSetDescriptors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties maxPerSetDescriptorsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_maxPerSetDescriptors(this.segment(), index, value); return this; } + /// Sets `maxPerSetDescriptors` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties maxPerSetDescriptors(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan11Properties.set_maxPerSetDescriptors(this.segment(), value); return this; } + + /// {@return `maxMemoryAllocationSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_maxMemoryAllocationSize(MemorySegment segment, long index) { return (long) VH_maxMemoryAllocationSize.get(segment, 0L, index); } + /// {@return `maxMemoryAllocationSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_maxMemoryAllocationSize(MemorySegment segment) { return VkPhysicalDeviceVulkan11Properties.get_maxMemoryAllocationSize(segment, 0L); } + /// {@return `maxMemoryAllocationSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long maxMemoryAllocationSizeAt(long index) { return VkPhysicalDeviceVulkan11Properties.get_maxMemoryAllocationSize(this.segment(), index); } + /// {@return `maxMemoryAllocationSize`} + public @CType("VkDeviceSize") long maxMemoryAllocationSize() { return VkPhysicalDeviceVulkan11Properties.get_maxMemoryAllocationSize(this.segment()); } + /// Sets `maxMemoryAllocationSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxMemoryAllocationSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_maxMemoryAllocationSize.set(segment, 0L, index, value); } + /// Sets `maxMemoryAllocationSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxMemoryAllocationSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan11Properties.set_maxMemoryAllocationSize(segment, 0L, value); } + /// Sets `maxMemoryAllocationSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties maxMemoryAllocationSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan11Properties.set_maxMemoryAllocationSize(this.segment(), index, value); return this; } + /// Sets `maxMemoryAllocationSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan11Properties maxMemoryAllocationSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan11Properties.set_maxMemoryAllocationSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan12Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan12Features.java new file mode 100644 index 00000000..39551eb9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan12Features.java @@ -0,0 +1,1887 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### samplerMirrorClampToEdge +/// [VarHandle][#VH_samplerMirrorClampToEdge] - [Getter][#samplerMirrorClampToEdge()] - [Setter][#samplerMirrorClampToEdge(int)] +/// ### drawIndirectCount +/// [VarHandle][#VH_drawIndirectCount] - [Getter][#drawIndirectCount()] - [Setter][#drawIndirectCount(int)] +/// ### storageBuffer8BitAccess +/// [VarHandle][#VH_storageBuffer8BitAccess] - [Getter][#storageBuffer8BitAccess()] - [Setter][#storageBuffer8BitAccess(int)] +/// ### uniformAndStorageBuffer8BitAccess +/// [VarHandle][#VH_uniformAndStorageBuffer8BitAccess] - [Getter][#uniformAndStorageBuffer8BitAccess()] - [Setter][#uniformAndStorageBuffer8BitAccess(int)] +/// ### storagePushConstant8 +/// [VarHandle][#VH_storagePushConstant8] - [Getter][#storagePushConstant8()] - [Setter][#storagePushConstant8(int)] +/// ### shaderBufferInt64Atomics +/// [VarHandle][#VH_shaderBufferInt64Atomics] - [Getter][#shaderBufferInt64Atomics()] - [Setter][#shaderBufferInt64Atomics(int)] +/// ### shaderSharedInt64Atomics +/// [VarHandle][#VH_shaderSharedInt64Atomics] - [Getter][#shaderSharedInt64Atomics()] - [Setter][#shaderSharedInt64Atomics(int)] +/// ### shaderFloat16 +/// [VarHandle][#VH_shaderFloat16] - [Getter][#shaderFloat16()] - [Setter][#shaderFloat16(int)] +/// ### shaderInt8 +/// [VarHandle][#VH_shaderInt8] - [Getter][#shaderInt8()] - [Setter][#shaderInt8(int)] +/// ### descriptorIndexing +/// [VarHandle][#VH_descriptorIndexing] - [Getter][#descriptorIndexing()] - [Setter][#descriptorIndexing(int)] +/// ### shaderInputAttachmentArrayDynamicIndexing +/// [VarHandle][#VH_shaderInputAttachmentArrayDynamicIndexing] - [Getter][#shaderInputAttachmentArrayDynamicIndexing()] - [Setter][#shaderInputAttachmentArrayDynamicIndexing(int)] +/// ### shaderUniformTexelBufferArrayDynamicIndexing +/// [VarHandle][#VH_shaderUniformTexelBufferArrayDynamicIndexing] - [Getter][#shaderUniformTexelBufferArrayDynamicIndexing()] - [Setter][#shaderUniformTexelBufferArrayDynamicIndexing(int)] +/// ### shaderStorageTexelBufferArrayDynamicIndexing +/// [VarHandle][#VH_shaderStorageTexelBufferArrayDynamicIndexing] - [Getter][#shaderStorageTexelBufferArrayDynamicIndexing()] - [Setter][#shaderStorageTexelBufferArrayDynamicIndexing(int)] +/// ### shaderUniformBufferArrayNonUniformIndexing +/// [VarHandle][#VH_shaderUniformBufferArrayNonUniformIndexing] - [Getter][#shaderUniformBufferArrayNonUniformIndexing()] - [Setter][#shaderUniformBufferArrayNonUniformIndexing(int)] +/// ### shaderSampledImageArrayNonUniformIndexing +/// [VarHandle][#VH_shaderSampledImageArrayNonUniformIndexing] - [Getter][#shaderSampledImageArrayNonUniformIndexing()] - [Setter][#shaderSampledImageArrayNonUniformIndexing(int)] +/// ### shaderStorageBufferArrayNonUniformIndexing +/// [VarHandle][#VH_shaderStorageBufferArrayNonUniformIndexing] - [Getter][#shaderStorageBufferArrayNonUniformIndexing()] - [Setter][#shaderStorageBufferArrayNonUniformIndexing(int)] +/// ### shaderStorageImageArrayNonUniformIndexing +/// [VarHandle][#VH_shaderStorageImageArrayNonUniformIndexing] - [Getter][#shaderStorageImageArrayNonUniformIndexing()] - [Setter][#shaderStorageImageArrayNonUniformIndexing(int)] +/// ### shaderInputAttachmentArrayNonUniformIndexing +/// [VarHandle][#VH_shaderInputAttachmentArrayNonUniformIndexing] - [Getter][#shaderInputAttachmentArrayNonUniformIndexing()] - [Setter][#shaderInputAttachmentArrayNonUniformIndexing(int)] +/// ### shaderUniformTexelBufferArrayNonUniformIndexing +/// [VarHandle][#VH_shaderUniformTexelBufferArrayNonUniformIndexing] - [Getter][#shaderUniformTexelBufferArrayNonUniformIndexing()] - [Setter][#shaderUniformTexelBufferArrayNonUniformIndexing(int)] +/// ### shaderStorageTexelBufferArrayNonUniformIndexing +/// [VarHandle][#VH_shaderStorageTexelBufferArrayNonUniformIndexing] - [Getter][#shaderStorageTexelBufferArrayNonUniformIndexing()] - [Setter][#shaderStorageTexelBufferArrayNonUniformIndexing(int)] +/// ### descriptorBindingUniformBufferUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingUniformBufferUpdateAfterBind] - [Getter][#descriptorBindingUniformBufferUpdateAfterBind()] - [Setter][#descriptorBindingUniformBufferUpdateAfterBind(int)] +/// ### descriptorBindingSampledImageUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingSampledImageUpdateAfterBind] - [Getter][#descriptorBindingSampledImageUpdateAfterBind()] - [Setter][#descriptorBindingSampledImageUpdateAfterBind(int)] +/// ### descriptorBindingStorageImageUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingStorageImageUpdateAfterBind] - [Getter][#descriptorBindingStorageImageUpdateAfterBind()] - [Setter][#descriptorBindingStorageImageUpdateAfterBind(int)] +/// ### descriptorBindingStorageBufferUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingStorageBufferUpdateAfterBind] - [Getter][#descriptorBindingStorageBufferUpdateAfterBind()] - [Setter][#descriptorBindingStorageBufferUpdateAfterBind(int)] +/// ### descriptorBindingUniformTexelBufferUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingUniformTexelBufferUpdateAfterBind] - [Getter][#descriptorBindingUniformTexelBufferUpdateAfterBind()] - [Setter][#descriptorBindingUniformTexelBufferUpdateAfterBind(int)] +/// ### descriptorBindingStorageTexelBufferUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingStorageTexelBufferUpdateAfterBind] - [Getter][#descriptorBindingStorageTexelBufferUpdateAfterBind()] - [Setter][#descriptorBindingStorageTexelBufferUpdateAfterBind(int)] +/// ### descriptorBindingUpdateUnusedWhilePending +/// [VarHandle][#VH_descriptorBindingUpdateUnusedWhilePending] - [Getter][#descriptorBindingUpdateUnusedWhilePending()] - [Setter][#descriptorBindingUpdateUnusedWhilePending(int)] +/// ### descriptorBindingPartiallyBound +/// [VarHandle][#VH_descriptorBindingPartiallyBound] - [Getter][#descriptorBindingPartiallyBound()] - [Setter][#descriptorBindingPartiallyBound(int)] +/// ### descriptorBindingVariableDescriptorCount +/// [VarHandle][#VH_descriptorBindingVariableDescriptorCount] - [Getter][#descriptorBindingVariableDescriptorCount()] - [Setter][#descriptorBindingVariableDescriptorCount(int)] +/// ### runtimeDescriptorArray +/// [VarHandle][#VH_runtimeDescriptorArray] - [Getter][#runtimeDescriptorArray()] - [Setter][#runtimeDescriptorArray(int)] +/// ### samplerFilterMinmax +/// [VarHandle][#VH_samplerFilterMinmax] - [Getter][#samplerFilterMinmax()] - [Setter][#samplerFilterMinmax(int)] +/// ### scalarBlockLayout +/// [VarHandle][#VH_scalarBlockLayout] - [Getter][#scalarBlockLayout()] - [Setter][#scalarBlockLayout(int)] +/// ### imagelessFramebuffer +/// [VarHandle][#VH_imagelessFramebuffer] - [Getter][#imagelessFramebuffer()] - [Setter][#imagelessFramebuffer(int)] +/// ### uniformBufferStandardLayout +/// [VarHandle][#VH_uniformBufferStandardLayout] - [Getter][#uniformBufferStandardLayout()] - [Setter][#uniformBufferStandardLayout(int)] +/// ### shaderSubgroupExtendedTypes +/// [VarHandle][#VH_shaderSubgroupExtendedTypes] - [Getter][#shaderSubgroupExtendedTypes()] - [Setter][#shaderSubgroupExtendedTypes(int)] +/// ### separateDepthStencilLayouts +/// [VarHandle][#VH_separateDepthStencilLayouts] - [Getter][#separateDepthStencilLayouts()] - [Setter][#separateDepthStencilLayouts(int)] +/// ### hostQueryReset +/// [VarHandle][#VH_hostQueryReset] - [Getter][#hostQueryReset()] - [Setter][#hostQueryReset(int)] +/// ### timelineSemaphore +/// [VarHandle][#VH_timelineSemaphore] - [Getter][#timelineSemaphore()] - [Setter][#timelineSemaphore(int)] +/// ### bufferDeviceAddress +/// [VarHandle][#VH_bufferDeviceAddress] - [Getter][#bufferDeviceAddress()] - [Setter][#bufferDeviceAddress(int)] +/// ### bufferDeviceAddressCaptureReplay +/// [VarHandle][#VH_bufferDeviceAddressCaptureReplay] - [Getter][#bufferDeviceAddressCaptureReplay()] - [Setter][#bufferDeviceAddressCaptureReplay(int)] +/// ### bufferDeviceAddressMultiDevice +/// [VarHandle][#VH_bufferDeviceAddressMultiDevice] - [Getter][#bufferDeviceAddressMultiDevice()] - [Setter][#bufferDeviceAddressMultiDevice(int)] +/// ### vulkanMemoryModel +/// [VarHandle][#VH_vulkanMemoryModel] - [Getter][#vulkanMemoryModel()] - [Setter][#vulkanMemoryModel(int)] +/// ### vulkanMemoryModelDeviceScope +/// [VarHandle][#VH_vulkanMemoryModelDeviceScope] - [Getter][#vulkanMemoryModelDeviceScope()] - [Setter][#vulkanMemoryModelDeviceScope(int)] +/// ### vulkanMemoryModelAvailabilityVisibilityChains +/// [VarHandle][#VH_vulkanMemoryModelAvailabilityVisibilityChains] - [Getter][#vulkanMemoryModelAvailabilityVisibilityChains()] - [Setter][#vulkanMemoryModelAvailabilityVisibilityChains(int)] +/// ### shaderOutputViewportIndex +/// [VarHandle][#VH_shaderOutputViewportIndex] - [Getter][#shaderOutputViewportIndex()] - [Setter][#shaderOutputViewportIndex(int)] +/// ### shaderOutputLayer +/// [VarHandle][#VH_shaderOutputLayer] - [Getter][#shaderOutputLayer()] - [Setter][#shaderOutputLayer(int)] +/// ### subgroupBroadcastDynamicId +/// [VarHandle][#VH_subgroupBroadcastDynamicId] - [Getter][#subgroupBroadcastDynamicId()] - [Setter][#subgroupBroadcastDynamicId(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkan12Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 samplerMirrorClampToEdge; +/// VkBool32 drawIndirectCount; +/// VkBool32 storageBuffer8BitAccess; +/// VkBool32 uniformAndStorageBuffer8BitAccess; +/// VkBool32 storagePushConstant8; +/// VkBool32 shaderBufferInt64Atomics; +/// VkBool32 shaderSharedInt64Atomics; +/// VkBool32 shaderFloat16; +/// VkBool32 shaderInt8; +/// VkBool32 descriptorIndexing; +/// VkBool32 shaderInputAttachmentArrayDynamicIndexing; +/// VkBool32 shaderUniformTexelBufferArrayDynamicIndexing; +/// VkBool32 shaderStorageTexelBufferArrayDynamicIndexing; +/// VkBool32 shaderUniformBufferArrayNonUniformIndexing; +/// VkBool32 shaderSampledImageArrayNonUniformIndexing; +/// VkBool32 shaderStorageBufferArrayNonUniformIndexing; +/// VkBool32 shaderStorageImageArrayNonUniformIndexing; +/// VkBool32 shaderInputAttachmentArrayNonUniformIndexing; +/// VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing; +/// VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing; +/// VkBool32 descriptorBindingUniformBufferUpdateAfterBind; +/// VkBool32 descriptorBindingSampledImageUpdateAfterBind; +/// VkBool32 descriptorBindingStorageImageUpdateAfterBind; +/// VkBool32 descriptorBindingStorageBufferUpdateAfterBind; +/// VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind; +/// VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind; +/// VkBool32 descriptorBindingUpdateUnusedWhilePending; +/// VkBool32 descriptorBindingPartiallyBound; +/// VkBool32 descriptorBindingVariableDescriptorCount; +/// VkBool32 runtimeDescriptorArray; +/// VkBool32 samplerFilterMinmax; +/// VkBool32 scalarBlockLayout; +/// VkBool32 imagelessFramebuffer; +/// VkBool32 uniformBufferStandardLayout; +/// VkBool32 shaderSubgroupExtendedTypes; +/// VkBool32 separateDepthStencilLayouts; +/// VkBool32 hostQueryReset; +/// VkBool32 timelineSemaphore; +/// VkBool32 bufferDeviceAddress; +/// VkBool32 bufferDeviceAddressCaptureReplay; +/// VkBool32 bufferDeviceAddressMultiDevice; +/// VkBool32 vulkanMemoryModel; +/// VkBool32 vulkanMemoryModelDeviceScope; +/// VkBool32 vulkanMemoryModelAvailabilityVisibilityChains; +/// VkBool32 shaderOutputViewportIndex; +/// VkBool32 shaderOutputLayer; +/// VkBool32 subgroupBroadcastDynamicId; +/// } VkPhysicalDeviceVulkan12Features; +/// ``` +public final class VkPhysicalDeviceVulkan12Features extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkan12Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("samplerMirrorClampToEdge"), + ValueLayout.JAVA_INT.withName("drawIndirectCount"), + ValueLayout.JAVA_INT.withName("storageBuffer8BitAccess"), + ValueLayout.JAVA_INT.withName("uniformAndStorageBuffer8BitAccess"), + ValueLayout.JAVA_INT.withName("storagePushConstant8"), + ValueLayout.JAVA_INT.withName("shaderBufferInt64Atomics"), + ValueLayout.JAVA_INT.withName("shaderSharedInt64Atomics"), + ValueLayout.JAVA_INT.withName("shaderFloat16"), + ValueLayout.JAVA_INT.withName("shaderInt8"), + ValueLayout.JAVA_INT.withName("descriptorIndexing"), + ValueLayout.JAVA_INT.withName("shaderInputAttachmentArrayDynamicIndexing"), + ValueLayout.JAVA_INT.withName("shaderUniformTexelBufferArrayDynamicIndexing"), + ValueLayout.JAVA_INT.withName("shaderStorageTexelBufferArrayDynamicIndexing"), + ValueLayout.JAVA_INT.withName("shaderUniformBufferArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderSampledImageArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderStorageBufferArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderStorageImageArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderInputAttachmentArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderUniformTexelBufferArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("shaderStorageTexelBufferArrayNonUniformIndexing"), + ValueLayout.JAVA_INT.withName("descriptorBindingUniformBufferUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingSampledImageUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingStorageImageUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingStorageBufferUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingUniformTexelBufferUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingStorageTexelBufferUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("descriptorBindingUpdateUnusedWhilePending"), + ValueLayout.JAVA_INT.withName("descriptorBindingPartiallyBound"), + ValueLayout.JAVA_INT.withName("descriptorBindingVariableDescriptorCount"), + ValueLayout.JAVA_INT.withName("runtimeDescriptorArray"), + ValueLayout.JAVA_INT.withName("samplerFilterMinmax"), + ValueLayout.JAVA_INT.withName("scalarBlockLayout"), + ValueLayout.JAVA_INT.withName("imagelessFramebuffer"), + ValueLayout.JAVA_INT.withName("uniformBufferStandardLayout"), + ValueLayout.JAVA_INT.withName("shaderSubgroupExtendedTypes"), + ValueLayout.JAVA_INT.withName("separateDepthStencilLayouts"), + ValueLayout.JAVA_INT.withName("hostQueryReset"), + ValueLayout.JAVA_INT.withName("timelineSemaphore"), + ValueLayout.JAVA_INT.withName("bufferDeviceAddress"), + ValueLayout.JAVA_INT.withName("bufferDeviceAddressCaptureReplay"), + ValueLayout.JAVA_INT.withName("bufferDeviceAddressMultiDevice"), + ValueLayout.JAVA_INT.withName("vulkanMemoryModel"), + ValueLayout.JAVA_INT.withName("vulkanMemoryModelDeviceScope"), + ValueLayout.JAVA_INT.withName("vulkanMemoryModelAvailabilityVisibilityChains"), + ValueLayout.JAVA_INT.withName("shaderOutputViewportIndex"), + ValueLayout.JAVA_INT.withName("shaderOutputLayer"), + ValueLayout.JAVA_INT.withName("subgroupBroadcastDynamicId") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `samplerMirrorClampToEdge` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samplerMirrorClampToEdge = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerMirrorClampToEdge")); + /// The [VarHandle] of `drawIndirectCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_drawIndirectCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("drawIndirectCount")); + /// The [VarHandle] of `storageBuffer8BitAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storageBuffer8BitAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageBuffer8BitAccess")); + /// The [VarHandle] of `uniformAndStorageBuffer8BitAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniformAndStorageBuffer8BitAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformAndStorageBuffer8BitAccess")); + /// The [VarHandle] of `storagePushConstant8` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storagePushConstant8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storagePushConstant8")); + /// The [VarHandle] of `shaderBufferInt64Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderBufferInt64Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderBufferInt64Atomics")); + /// The [VarHandle] of `shaderSharedInt64Atomics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSharedInt64Atomics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSharedInt64Atomics")); + /// The [VarHandle] of `shaderFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderFloat16")); + /// The [VarHandle] of `shaderInt8` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderInt8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderInt8")); + /// The [VarHandle] of `descriptorIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorIndexing")); + /// The [VarHandle] of `shaderInputAttachmentArrayDynamicIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderInputAttachmentArrayDynamicIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderInputAttachmentArrayDynamicIndexing")); + /// The [VarHandle] of `shaderUniformTexelBufferArrayDynamicIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderUniformTexelBufferArrayDynamicIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderUniformTexelBufferArrayDynamicIndexing")); + /// The [VarHandle] of `shaderStorageTexelBufferArrayDynamicIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageTexelBufferArrayDynamicIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageTexelBufferArrayDynamicIndexing")); + /// The [VarHandle] of `shaderUniformBufferArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderUniformBufferArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderUniformBufferArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderSampledImageArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSampledImageArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSampledImageArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderStorageBufferArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageBufferArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageBufferArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderStorageImageArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageImageArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageImageArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderInputAttachmentArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderInputAttachmentArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderInputAttachmentArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderUniformTexelBufferArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderUniformTexelBufferArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderUniformTexelBufferArrayNonUniformIndexing")); + /// The [VarHandle] of `shaderStorageTexelBufferArrayNonUniformIndexing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageTexelBufferArrayNonUniformIndexing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageTexelBufferArrayNonUniformIndexing")); + /// The [VarHandle] of `descriptorBindingUniformBufferUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingUniformBufferUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingUniformBufferUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingSampledImageUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingSampledImageUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingSampledImageUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingStorageImageUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingStorageImageUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingStorageImageUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingStorageBufferUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingStorageBufferUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingStorageBufferUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingUniformTexelBufferUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingUniformTexelBufferUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingUniformTexelBufferUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingStorageTexelBufferUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingStorageTexelBufferUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingStorageTexelBufferUpdateAfterBind")); + /// The [VarHandle] of `descriptorBindingUpdateUnusedWhilePending` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingUpdateUnusedWhilePending = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingUpdateUnusedWhilePending")); + /// The [VarHandle] of `descriptorBindingPartiallyBound` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingPartiallyBound = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingPartiallyBound")); + /// The [VarHandle] of `descriptorBindingVariableDescriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingVariableDescriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingVariableDescriptorCount")); + /// The [VarHandle] of `runtimeDescriptorArray` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_runtimeDescriptorArray = LAYOUT.arrayElementVarHandle(PathElement.groupElement("runtimeDescriptorArray")); + /// The [VarHandle] of `samplerFilterMinmax` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_samplerFilterMinmax = LAYOUT.arrayElementVarHandle(PathElement.groupElement("samplerFilterMinmax")); + /// The [VarHandle] of `scalarBlockLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_scalarBlockLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scalarBlockLayout")); + /// The [VarHandle] of `imagelessFramebuffer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imagelessFramebuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imagelessFramebuffer")); + /// The [VarHandle] of `uniformBufferStandardLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniformBufferStandardLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformBufferStandardLayout")); + /// The [VarHandle] of `shaderSubgroupExtendedTypes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSubgroupExtendedTypes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSubgroupExtendedTypes")); + /// The [VarHandle] of `separateDepthStencilLayouts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_separateDepthStencilLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("separateDepthStencilLayouts")); + /// The [VarHandle] of `hostQueryReset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hostQueryReset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hostQueryReset")); + /// The [VarHandle] of `timelineSemaphore` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_timelineSemaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timelineSemaphore")); + /// The [VarHandle] of `bufferDeviceAddress` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferDeviceAddress = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferDeviceAddress")); + /// The [VarHandle] of `bufferDeviceAddressCaptureReplay` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferDeviceAddressCaptureReplay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferDeviceAddressCaptureReplay")); + /// The [VarHandle] of `bufferDeviceAddressMultiDevice` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bufferDeviceAddressMultiDevice = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bufferDeviceAddressMultiDevice")); + /// The [VarHandle] of `vulkanMemoryModel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vulkanMemoryModel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vulkanMemoryModel")); + /// The [VarHandle] of `vulkanMemoryModelDeviceScope` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vulkanMemoryModelDeviceScope = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vulkanMemoryModelDeviceScope")); + /// The [VarHandle] of `vulkanMemoryModelAvailabilityVisibilityChains` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vulkanMemoryModelAvailabilityVisibilityChains = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vulkanMemoryModelAvailabilityVisibilityChains")); + /// The [VarHandle] of `shaderOutputViewportIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderOutputViewportIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderOutputViewportIndex")); + /// The [VarHandle] of `shaderOutputLayer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderOutputLayer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderOutputLayer")); + /// The [VarHandle] of `subgroupBroadcastDynamicId` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subgroupBroadcastDynamicId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subgroupBroadcastDynamicId")); + + /// Creates `VkPhysicalDeviceVulkan12Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkan12Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkan12Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan12Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan12Features(segment); } + + /// Creates `VkPhysicalDeviceVulkan12Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan12Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan12Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkan12Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan12Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan12Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkan12Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkan12Features` + public static VkPhysicalDeviceVulkan12Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkan12Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkan12Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkan12Features` + public static VkPhysicalDeviceVulkan12Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkan12Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkan12Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkan12Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan12Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan12Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkan12Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkan12Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkan12Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Features.set_pNext(this.segment(), value); return this; } + + /// {@return `samplerMirrorClampToEdge` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_samplerMirrorClampToEdge(MemorySegment segment, long index) { return (int) VH_samplerMirrorClampToEdge.get(segment, 0L, index); } + /// {@return `samplerMirrorClampToEdge`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_samplerMirrorClampToEdge(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_samplerMirrorClampToEdge(segment, 0L); } + /// {@return `samplerMirrorClampToEdge` at the given index} + /// @param index the index + public @CType("VkBool32") int samplerMirrorClampToEdgeAt(long index) { return VkPhysicalDeviceVulkan12Features.get_samplerMirrorClampToEdge(this.segment(), index); } + /// {@return `samplerMirrorClampToEdge`} + public @CType("VkBool32") int samplerMirrorClampToEdge() { return VkPhysicalDeviceVulkan12Features.get_samplerMirrorClampToEdge(this.segment()); } + /// Sets `samplerMirrorClampToEdge` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerMirrorClampToEdge(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_samplerMirrorClampToEdge.set(segment, 0L, index, value); } + /// Sets `samplerMirrorClampToEdge` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerMirrorClampToEdge(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_samplerMirrorClampToEdge(segment, 0L, value); } + /// Sets `samplerMirrorClampToEdge` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features samplerMirrorClampToEdgeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_samplerMirrorClampToEdge(this.segment(), index, value); return this; } + /// Sets `samplerMirrorClampToEdge` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features samplerMirrorClampToEdge(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_samplerMirrorClampToEdge(this.segment(), value); return this; } + + /// {@return `drawIndirectCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_drawIndirectCount(MemorySegment segment, long index) { return (int) VH_drawIndirectCount.get(segment, 0L, index); } + /// {@return `drawIndirectCount`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_drawIndirectCount(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_drawIndirectCount(segment, 0L); } + /// {@return `drawIndirectCount` at the given index} + /// @param index the index + public @CType("VkBool32") int drawIndirectCountAt(long index) { return VkPhysicalDeviceVulkan12Features.get_drawIndirectCount(this.segment(), index); } + /// {@return `drawIndirectCount`} + public @CType("VkBool32") int drawIndirectCount() { return VkPhysicalDeviceVulkan12Features.get_drawIndirectCount(this.segment()); } + /// Sets `drawIndirectCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_drawIndirectCount(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_drawIndirectCount.set(segment, 0L, index, value); } + /// Sets `drawIndirectCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_drawIndirectCount(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_drawIndirectCount(segment, 0L, value); } + /// Sets `drawIndirectCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features drawIndirectCountAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_drawIndirectCount(this.segment(), index, value); return this; } + /// Sets `drawIndirectCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features drawIndirectCount(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_drawIndirectCount(this.segment(), value); return this; } + + /// {@return `storageBuffer8BitAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storageBuffer8BitAccess(MemorySegment segment, long index) { return (int) VH_storageBuffer8BitAccess.get(segment, 0L, index); } + /// {@return `storageBuffer8BitAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storageBuffer8BitAccess(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_storageBuffer8BitAccess(segment, 0L); } + /// {@return `storageBuffer8BitAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int storageBuffer8BitAccessAt(long index) { return VkPhysicalDeviceVulkan12Features.get_storageBuffer8BitAccess(this.segment(), index); } + /// {@return `storageBuffer8BitAccess`} + public @CType("VkBool32") int storageBuffer8BitAccess() { return VkPhysicalDeviceVulkan12Features.get_storageBuffer8BitAccess(this.segment()); } + /// Sets `storageBuffer8BitAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageBuffer8BitAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storageBuffer8BitAccess.set(segment, 0L, index, value); } + /// Sets `storageBuffer8BitAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageBuffer8BitAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_storageBuffer8BitAccess(segment, 0L, value); } + /// Sets `storageBuffer8BitAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features storageBuffer8BitAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_storageBuffer8BitAccess(this.segment(), index, value); return this; } + /// Sets `storageBuffer8BitAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features storageBuffer8BitAccess(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_storageBuffer8BitAccess(this.segment(), value); return this; } + + /// {@return `uniformAndStorageBuffer8BitAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_uniformAndStorageBuffer8BitAccess(MemorySegment segment, long index) { return (int) VH_uniformAndStorageBuffer8BitAccess.get(segment, 0L, index); } + /// {@return `uniformAndStorageBuffer8BitAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_uniformAndStorageBuffer8BitAccess(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_uniformAndStorageBuffer8BitAccess(segment, 0L); } + /// {@return `uniformAndStorageBuffer8BitAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int uniformAndStorageBuffer8BitAccessAt(long index) { return VkPhysicalDeviceVulkan12Features.get_uniformAndStorageBuffer8BitAccess(this.segment(), index); } + /// {@return `uniformAndStorageBuffer8BitAccess`} + public @CType("VkBool32") int uniformAndStorageBuffer8BitAccess() { return VkPhysicalDeviceVulkan12Features.get_uniformAndStorageBuffer8BitAccess(this.segment()); } + /// Sets `uniformAndStorageBuffer8BitAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformAndStorageBuffer8BitAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_uniformAndStorageBuffer8BitAccess.set(segment, 0L, index, value); } + /// Sets `uniformAndStorageBuffer8BitAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformAndStorageBuffer8BitAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_uniformAndStorageBuffer8BitAccess(segment, 0L, value); } + /// Sets `uniformAndStorageBuffer8BitAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features uniformAndStorageBuffer8BitAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_uniformAndStorageBuffer8BitAccess(this.segment(), index, value); return this; } + /// Sets `uniformAndStorageBuffer8BitAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features uniformAndStorageBuffer8BitAccess(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_uniformAndStorageBuffer8BitAccess(this.segment(), value); return this; } + + /// {@return `storagePushConstant8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storagePushConstant8(MemorySegment segment, long index) { return (int) VH_storagePushConstant8.get(segment, 0L, index); } + /// {@return `storagePushConstant8`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storagePushConstant8(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_storagePushConstant8(segment, 0L); } + /// {@return `storagePushConstant8` at the given index} + /// @param index the index + public @CType("VkBool32") int storagePushConstant8At(long index) { return VkPhysicalDeviceVulkan12Features.get_storagePushConstant8(this.segment(), index); } + /// {@return `storagePushConstant8`} + public @CType("VkBool32") int storagePushConstant8() { return VkPhysicalDeviceVulkan12Features.get_storagePushConstant8(this.segment()); } + /// Sets `storagePushConstant8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storagePushConstant8(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storagePushConstant8.set(segment, 0L, index, value); } + /// Sets `storagePushConstant8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storagePushConstant8(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_storagePushConstant8(segment, 0L, value); } + /// Sets `storagePushConstant8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features storagePushConstant8At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_storagePushConstant8(this.segment(), index, value); return this; } + /// Sets `storagePushConstant8` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features storagePushConstant8(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_storagePushConstant8(this.segment(), value); return this; } + + /// {@return `shaderBufferInt64Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderBufferInt64Atomics(MemorySegment segment, long index) { return (int) VH_shaderBufferInt64Atomics.get(segment, 0L, index); } + /// {@return `shaderBufferInt64Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderBufferInt64Atomics(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderBufferInt64Atomics(segment, 0L); } + /// {@return `shaderBufferInt64Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderBufferInt64AtomicsAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderBufferInt64Atomics(this.segment(), index); } + /// {@return `shaderBufferInt64Atomics`} + public @CType("VkBool32") int shaderBufferInt64Atomics() { return VkPhysicalDeviceVulkan12Features.get_shaderBufferInt64Atomics(this.segment()); } + /// Sets `shaderBufferInt64Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderBufferInt64Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderBufferInt64Atomics.set(segment, 0L, index, value); } + /// Sets `shaderBufferInt64Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderBufferInt64Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderBufferInt64Atomics(segment, 0L, value); } + /// Sets `shaderBufferInt64Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderBufferInt64AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderBufferInt64Atomics(this.segment(), index, value); return this; } + /// Sets `shaderBufferInt64Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderBufferInt64Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderBufferInt64Atomics(this.segment(), value); return this; } + + /// {@return `shaderSharedInt64Atomics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSharedInt64Atomics(MemorySegment segment, long index) { return (int) VH_shaderSharedInt64Atomics.get(segment, 0L, index); } + /// {@return `shaderSharedInt64Atomics`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSharedInt64Atomics(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderSharedInt64Atomics(segment, 0L); } + /// {@return `shaderSharedInt64Atomics` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSharedInt64AtomicsAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderSharedInt64Atomics(this.segment(), index); } + /// {@return `shaderSharedInt64Atomics`} + public @CType("VkBool32") int shaderSharedInt64Atomics() { return VkPhysicalDeviceVulkan12Features.get_shaderSharedInt64Atomics(this.segment()); } + /// Sets `shaderSharedInt64Atomics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSharedInt64Atomics(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSharedInt64Atomics.set(segment, 0L, index, value); } + /// Sets `shaderSharedInt64Atomics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSharedInt64Atomics(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderSharedInt64Atomics(segment, 0L, value); } + /// Sets `shaderSharedInt64Atomics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderSharedInt64AtomicsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderSharedInt64Atomics(this.segment(), index, value); return this; } + /// Sets `shaderSharedInt64Atomics` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderSharedInt64Atomics(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderSharedInt64Atomics(this.segment(), value); return this; } + + /// {@return `shaderFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderFloat16(MemorySegment segment, long index) { return (int) VH_shaderFloat16.get(segment, 0L, index); } + /// {@return `shaderFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderFloat16(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderFloat16(segment, 0L); } + /// {@return `shaderFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderFloat16At(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderFloat16(this.segment(), index); } + /// {@return `shaderFloat16`} + public @CType("VkBool32") int shaderFloat16() { return VkPhysicalDeviceVulkan12Features.get_shaderFloat16(this.segment()); } + /// Sets `shaderFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderFloat16.set(segment, 0L, index, value); } + /// Sets `shaderFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderFloat16(segment, 0L, value); } + /// Sets `shaderFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderFloat16(this.segment(), index, value); return this; } + /// Sets `shaderFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderFloat16(this.segment(), value); return this; } + + /// {@return `shaderInt8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderInt8(MemorySegment segment, long index) { return (int) VH_shaderInt8.get(segment, 0L, index); } + /// {@return `shaderInt8`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderInt8(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderInt8(segment, 0L); } + /// {@return `shaderInt8` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderInt8At(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderInt8(this.segment(), index); } + /// {@return `shaderInt8`} + public @CType("VkBool32") int shaderInt8() { return VkPhysicalDeviceVulkan12Features.get_shaderInt8(this.segment()); } + /// Sets `shaderInt8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderInt8(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderInt8.set(segment, 0L, index, value); } + /// Sets `shaderInt8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderInt8(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderInt8(segment, 0L, value); } + /// Sets `shaderInt8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderInt8At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderInt8(this.segment(), index, value); return this; } + /// Sets `shaderInt8` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderInt8(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderInt8(this.segment(), value); return this; } + + /// {@return `descriptorIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorIndexing(MemorySegment segment, long index) { return (int) VH_descriptorIndexing.get(segment, 0L, index); } + /// {@return `descriptorIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_descriptorIndexing(segment, 0L); } + /// {@return `descriptorIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_descriptorIndexing(this.segment(), index); } + /// {@return `descriptorIndexing`} + public @CType("VkBool32") int descriptorIndexing() { return VkPhysicalDeviceVulkan12Features.get_descriptorIndexing(this.segment()); } + /// Sets `descriptorIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorIndexing.set(segment, 0L, index, value); } + /// Sets `descriptorIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorIndexing(segment, 0L, value); } + /// Sets `descriptorIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorIndexing(this.segment(), index, value); return this; } + /// Sets `descriptorIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorIndexing(this.segment(), value); return this; } + + /// {@return `shaderInputAttachmentArrayDynamicIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderInputAttachmentArrayDynamicIndexing(MemorySegment segment, long index) { return (int) VH_shaderInputAttachmentArrayDynamicIndexing.get(segment, 0L, index); } + /// {@return `shaderInputAttachmentArrayDynamicIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderInputAttachmentArrayDynamicIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderInputAttachmentArrayDynamicIndexing(segment, 0L); } + /// {@return `shaderInputAttachmentArrayDynamicIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderInputAttachmentArrayDynamicIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderInputAttachmentArrayDynamicIndexing(this.segment(), index); } + /// {@return `shaderInputAttachmentArrayDynamicIndexing`} + public @CType("VkBool32") int shaderInputAttachmentArrayDynamicIndexing() { return VkPhysicalDeviceVulkan12Features.get_shaderInputAttachmentArrayDynamicIndexing(this.segment()); } + /// Sets `shaderInputAttachmentArrayDynamicIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderInputAttachmentArrayDynamicIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderInputAttachmentArrayDynamicIndexing.set(segment, 0L, index, value); } + /// Sets `shaderInputAttachmentArrayDynamicIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderInputAttachmentArrayDynamicIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderInputAttachmentArrayDynamicIndexing(segment, 0L, value); } + /// Sets `shaderInputAttachmentArrayDynamicIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderInputAttachmentArrayDynamicIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderInputAttachmentArrayDynamicIndexing(this.segment(), index, value); return this; } + /// Sets `shaderInputAttachmentArrayDynamicIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderInputAttachmentArrayDynamicIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderInputAttachmentArrayDynamicIndexing(this.segment(), value); return this; } + + /// {@return `shaderUniformTexelBufferArrayDynamicIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderUniformTexelBufferArrayDynamicIndexing(MemorySegment segment, long index) { return (int) VH_shaderUniformTexelBufferArrayDynamicIndexing.get(segment, 0L, index); } + /// {@return `shaderUniformTexelBufferArrayDynamicIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderUniformTexelBufferArrayDynamicIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderUniformTexelBufferArrayDynamicIndexing(segment, 0L); } + /// {@return `shaderUniformTexelBufferArrayDynamicIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderUniformTexelBufferArrayDynamicIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderUniformTexelBufferArrayDynamicIndexing(this.segment(), index); } + /// {@return `shaderUniformTexelBufferArrayDynamicIndexing`} + public @CType("VkBool32") int shaderUniformTexelBufferArrayDynamicIndexing() { return VkPhysicalDeviceVulkan12Features.get_shaderUniformTexelBufferArrayDynamicIndexing(this.segment()); } + /// Sets `shaderUniformTexelBufferArrayDynamicIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderUniformTexelBufferArrayDynamicIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderUniformTexelBufferArrayDynamicIndexing.set(segment, 0L, index, value); } + /// Sets `shaderUniformTexelBufferArrayDynamicIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderUniformTexelBufferArrayDynamicIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderUniformTexelBufferArrayDynamicIndexing(segment, 0L, value); } + /// Sets `shaderUniformTexelBufferArrayDynamicIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderUniformTexelBufferArrayDynamicIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderUniformTexelBufferArrayDynamicIndexing(this.segment(), index, value); return this; } + /// Sets `shaderUniformTexelBufferArrayDynamicIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderUniformTexelBufferArrayDynamicIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderUniformTexelBufferArrayDynamicIndexing(this.segment(), value); return this; } + + /// {@return `shaderStorageTexelBufferArrayDynamicIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageTexelBufferArrayDynamicIndexing(MemorySegment segment, long index) { return (int) VH_shaderStorageTexelBufferArrayDynamicIndexing.get(segment, 0L, index); } + /// {@return `shaderStorageTexelBufferArrayDynamicIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageTexelBufferArrayDynamicIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderStorageTexelBufferArrayDynamicIndexing(segment, 0L); } + /// {@return `shaderStorageTexelBufferArrayDynamicIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageTexelBufferArrayDynamicIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderStorageTexelBufferArrayDynamicIndexing(this.segment(), index); } + /// {@return `shaderStorageTexelBufferArrayDynamicIndexing`} + public @CType("VkBool32") int shaderStorageTexelBufferArrayDynamicIndexing() { return VkPhysicalDeviceVulkan12Features.get_shaderStorageTexelBufferArrayDynamicIndexing(this.segment()); } + /// Sets `shaderStorageTexelBufferArrayDynamicIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageTexelBufferArrayDynamicIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageTexelBufferArrayDynamicIndexing.set(segment, 0L, index, value); } + /// Sets `shaderStorageTexelBufferArrayDynamicIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageTexelBufferArrayDynamicIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageTexelBufferArrayDynamicIndexing(segment, 0L, value); } + /// Sets `shaderStorageTexelBufferArrayDynamicIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderStorageTexelBufferArrayDynamicIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageTexelBufferArrayDynamicIndexing(this.segment(), index, value); return this; } + /// Sets `shaderStorageTexelBufferArrayDynamicIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderStorageTexelBufferArrayDynamicIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageTexelBufferArrayDynamicIndexing(this.segment(), value); return this; } + + /// {@return `shaderUniformBufferArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderUniformBufferArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderUniformBufferArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderUniformBufferArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderUniformBufferArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderUniformBufferArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderUniformBufferArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderUniformBufferArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderUniformBufferArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderUniformBufferArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderUniformBufferArrayNonUniformIndexing() { return VkPhysicalDeviceVulkan12Features.get_shaderUniformBufferArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderUniformBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderUniformBufferArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderUniformBufferArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderUniformBufferArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderUniformBufferArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderUniformBufferArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderUniformBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderUniformBufferArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderUniformBufferArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderUniformBufferArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderUniformBufferArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderUniformBufferArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderSampledImageArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSampledImageArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderSampledImageArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderSampledImageArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSampledImageArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderSampledImageArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderSampledImageArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSampledImageArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderSampledImageArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderSampledImageArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderSampledImageArrayNonUniformIndexing() { return VkPhysicalDeviceVulkan12Features.get_shaderSampledImageArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderSampledImageArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSampledImageArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSampledImageArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderSampledImageArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSampledImageArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderSampledImageArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderSampledImageArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderSampledImageArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderSampledImageArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderSampledImageArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderSampledImageArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderSampledImageArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderStorageBufferArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageBufferArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderStorageBufferArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderStorageBufferArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageBufferArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderStorageBufferArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderStorageBufferArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageBufferArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderStorageBufferArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderStorageBufferArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderStorageBufferArrayNonUniformIndexing() { return VkPhysicalDeviceVulkan12Features.get_shaderStorageBufferArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderStorageBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageBufferArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageBufferArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderStorageBufferArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageBufferArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageBufferArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderStorageBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderStorageBufferArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageBufferArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderStorageBufferArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderStorageBufferArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageBufferArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderStorageImageArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageImageArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderStorageImageArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderStorageImageArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageImageArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderStorageImageArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderStorageImageArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageImageArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderStorageImageArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderStorageImageArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderStorageImageArrayNonUniformIndexing() { return VkPhysicalDeviceVulkan12Features.get_shaderStorageImageArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderStorageImageArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageImageArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageImageArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderStorageImageArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageImageArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageImageArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderStorageImageArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderStorageImageArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageImageArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderStorageImageArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderStorageImageArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageImageArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderInputAttachmentArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderInputAttachmentArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderInputAttachmentArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderInputAttachmentArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderInputAttachmentArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderInputAttachmentArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderInputAttachmentArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderInputAttachmentArrayNonUniformIndexing() { return VkPhysicalDeviceVulkan12Features.get_shaderInputAttachmentArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderInputAttachmentArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderInputAttachmentArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderInputAttachmentArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderInputAttachmentArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderInputAttachmentArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderInputAttachmentArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderInputAttachmentArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderInputAttachmentArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderInputAttachmentArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderUniformTexelBufferArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderUniformTexelBufferArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderUniformTexelBufferArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderUniformTexelBufferArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderUniformTexelBufferArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderUniformTexelBufferArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderUniformTexelBufferArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderUniformTexelBufferArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderUniformTexelBufferArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderUniformTexelBufferArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderUniformTexelBufferArrayNonUniformIndexing() { return VkPhysicalDeviceVulkan12Features.get_shaderUniformTexelBufferArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderUniformTexelBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderUniformTexelBufferArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderUniformTexelBufferArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderUniformTexelBufferArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderUniformTexelBufferArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderUniformTexelBufferArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderUniformTexelBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderUniformTexelBufferArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderUniformTexelBufferArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderUniformTexelBufferArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderUniformTexelBufferArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderUniformTexelBufferArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `shaderStorageTexelBufferArrayNonUniformIndexing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageTexelBufferArrayNonUniformIndexing(MemorySegment segment, long index) { return (int) VH_shaderStorageTexelBufferArrayNonUniformIndexing.get(segment, 0L, index); } + /// {@return `shaderStorageTexelBufferArrayNonUniformIndexing`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageTexelBufferArrayNonUniformIndexing(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderStorageTexelBufferArrayNonUniformIndexing(segment, 0L); } + /// {@return `shaderStorageTexelBufferArrayNonUniformIndexing` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageTexelBufferArrayNonUniformIndexingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderStorageTexelBufferArrayNonUniformIndexing(this.segment(), index); } + /// {@return `shaderStorageTexelBufferArrayNonUniformIndexing`} + public @CType("VkBool32") int shaderStorageTexelBufferArrayNonUniformIndexing() { return VkPhysicalDeviceVulkan12Features.get_shaderStorageTexelBufferArrayNonUniformIndexing(this.segment()); } + /// Sets `shaderStorageTexelBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageTexelBufferArrayNonUniformIndexing(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageTexelBufferArrayNonUniformIndexing.set(segment, 0L, index, value); } + /// Sets `shaderStorageTexelBufferArrayNonUniformIndexing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageTexelBufferArrayNonUniformIndexing(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageTexelBufferArrayNonUniformIndexing(segment, 0L, value); } + /// Sets `shaderStorageTexelBufferArrayNonUniformIndexing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderStorageTexelBufferArrayNonUniformIndexingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageTexelBufferArrayNonUniformIndexing(this.segment(), index, value); return this; } + /// Sets `shaderStorageTexelBufferArrayNonUniformIndexing` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderStorageTexelBufferArrayNonUniformIndexing(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderStorageTexelBufferArrayNonUniformIndexing(this.segment(), value); return this; } + + /// {@return `descriptorBindingUniformBufferUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingUniformBufferUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingUniformBufferUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingUniformBufferUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingUniformBufferUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingUniformBufferUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingUniformBufferUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingUniformBufferUpdateAfterBindAt(long index) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingUniformBufferUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingUniformBufferUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingUniformBufferUpdateAfterBind() { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingUniformBufferUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingUniformBufferUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingUniformBufferUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingUniformBufferUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingUniformBufferUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingUniformBufferUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingUniformBufferUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingUniformBufferUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingUniformBufferUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingUniformBufferUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingUniformBufferUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingUniformBufferUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingUniformBufferUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingSampledImageUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingSampledImageUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingSampledImageUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingSampledImageUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingSampledImageUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingSampledImageUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingSampledImageUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingSampledImageUpdateAfterBindAt(long index) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingSampledImageUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingSampledImageUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingSampledImageUpdateAfterBind() { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingSampledImageUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingSampledImageUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingSampledImageUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingSampledImageUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingSampledImageUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingSampledImageUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingSampledImageUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingSampledImageUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingSampledImageUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingSampledImageUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingSampledImageUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingSampledImageUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingSampledImageUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingStorageImageUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingStorageImageUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingStorageImageUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingStorageImageUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingStorageImageUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingStorageImageUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingStorageImageUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingStorageImageUpdateAfterBindAt(long index) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingStorageImageUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingStorageImageUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingStorageImageUpdateAfterBind() { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingStorageImageUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingStorageImageUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingStorageImageUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingStorageImageUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingStorageImageUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingStorageImageUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingStorageImageUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingStorageImageUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingStorageImageUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingStorageImageUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingStorageImageUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingStorageImageUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingStorageImageUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingStorageBufferUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingStorageBufferUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingStorageBufferUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingStorageBufferUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingStorageBufferUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingStorageBufferUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingStorageBufferUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingStorageBufferUpdateAfterBindAt(long index) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingStorageBufferUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingStorageBufferUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingStorageBufferUpdateAfterBind() { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingStorageBufferUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingStorageBufferUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingStorageBufferUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingStorageBufferUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingStorageBufferUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingStorageBufferUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingStorageBufferUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingStorageBufferUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingStorageBufferUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingStorageBufferUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingStorageBufferUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingStorageBufferUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingStorageBufferUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingUniformTexelBufferUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingUniformTexelBufferUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingUniformTexelBufferUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingUniformTexelBufferUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingUniformTexelBufferUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingUniformTexelBufferUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingUniformTexelBufferUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingUniformTexelBufferUpdateAfterBindAt(long index) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingUniformTexelBufferUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingUniformTexelBufferUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingUniformTexelBufferUpdateAfterBind() { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingUniformTexelBufferUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingUniformTexelBufferUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingUniformTexelBufferUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingUniformTexelBufferUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingUniformTexelBufferUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingUniformTexelBufferUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingUniformTexelBufferUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingUniformTexelBufferUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingUniformTexelBufferUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingUniformTexelBufferUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingUniformTexelBufferUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingUniformTexelBufferUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingUniformTexelBufferUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingStorageTexelBufferUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingStorageTexelBufferUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingStorageTexelBufferUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingStorageTexelBufferUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingStorageTexelBufferUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingStorageTexelBufferUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingStorageTexelBufferUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingStorageTexelBufferUpdateAfterBindAt(long index) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingStorageTexelBufferUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingStorageTexelBufferUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingStorageTexelBufferUpdateAfterBind() { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingStorageTexelBufferUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingStorageTexelBufferUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingStorageTexelBufferUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingStorageTexelBufferUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingStorageTexelBufferUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingStorageTexelBufferUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingStorageTexelBufferUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingStorageTexelBufferUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingStorageTexelBufferUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingStorageTexelBufferUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingStorageTexelBufferUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingStorageTexelBufferUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingStorageTexelBufferUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `descriptorBindingUpdateUnusedWhilePending` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingUpdateUnusedWhilePending(MemorySegment segment, long index) { return (int) VH_descriptorBindingUpdateUnusedWhilePending.get(segment, 0L, index); } + /// {@return `descriptorBindingUpdateUnusedWhilePending`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingUpdateUnusedWhilePending(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingUpdateUnusedWhilePending(segment, 0L); } + /// {@return `descriptorBindingUpdateUnusedWhilePending` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingUpdateUnusedWhilePendingAt(long index) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingUpdateUnusedWhilePending(this.segment(), index); } + /// {@return `descriptorBindingUpdateUnusedWhilePending`} + public @CType("VkBool32") int descriptorBindingUpdateUnusedWhilePending() { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingUpdateUnusedWhilePending(this.segment()); } + /// Sets `descriptorBindingUpdateUnusedWhilePending` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingUpdateUnusedWhilePending(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingUpdateUnusedWhilePending.set(segment, 0L, index, value); } + /// Sets `descriptorBindingUpdateUnusedWhilePending` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingUpdateUnusedWhilePending(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingUpdateUnusedWhilePending(segment, 0L, value); } + /// Sets `descriptorBindingUpdateUnusedWhilePending` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingUpdateUnusedWhilePendingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingUpdateUnusedWhilePending(this.segment(), index, value); return this; } + /// Sets `descriptorBindingUpdateUnusedWhilePending` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingUpdateUnusedWhilePending(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingUpdateUnusedWhilePending(this.segment(), value); return this; } + + /// {@return `descriptorBindingPartiallyBound` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingPartiallyBound(MemorySegment segment, long index) { return (int) VH_descriptorBindingPartiallyBound.get(segment, 0L, index); } + /// {@return `descriptorBindingPartiallyBound`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingPartiallyBound(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingPartiallyBound(segment, 0L); } + /// {@return `descriptorBindingPartiallyBound` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingPartiallyBoundAt(long index) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingPartiallyBound(this.segment(), index); } + /// {@return `descriptorBindingPartiallyBound`} + public @CType("VkBool32") int descriptorBindingPartiallyBound() { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingPartiallyBound(this.segment()); } + /// Sets `descriptorBindingPartiallyBound` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingPartiallyBound(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingPartiallyBound.set(segment, 0L, index, value); } + /// Sets `descriptorBindingPartiallyBound` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingPartiallyBound(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingPartiallyBound(segment, 0L, value); } + /// Sets `descriptorBindingPartiallyBound` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingPartiallyBoundAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingPartiallyBound(this.segment(), index, value); return this; } + /// Sets `descriptorBindingPartiallyBound` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingPartiallyBound(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingPartiallyBound(this.segment(), value); return this; } + + /// {@return `descriptorBindingVariableDescriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingVariableDescriptorCount(MemorySegment segment, long index) { return (int) VH_descriptorBindingVariableDescriptorCount.get(segment, 0L, index); } + /// {@return `descriptorBindingVariableDescriptorCount`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingVariableDescriptorCount(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingVariableDescriptorCount(segment, 0L); } + /// {@return `descriptorBindingVariableDescriptorCount` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingVariableDescriptorCountAt(long index) { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingVariableDescriptorCount(this.segment(), index); } + /// {@return `descriptorBindingVariableDescriptorCount`} + public @CType("VkBool32") int descriptorBindingVariableDescriptorCount() { return VkPhysicalDeviceVulkan12Features.get_descriptorBindingVariableDescriptorCount(this.segment()); } + /// Sets `descriptorBindingVariableDescriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingVariableDescriptorCount(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingVariableDescriptorCount.set(segment, 0L, index, value); } + /// Sets `descriptorBindingVariableDescriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingVariableDescriptorCount(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingVariableDescriptorCount(segment, 0L, value); } + /// Sets `descriptorBindingVariableDescriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingVariableDescriptorCountAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingVariableDescriptorCount(this.segment(), index, value); return this; } + /// Sets `descriptorBindingVariableDescriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features descriptorBindingVariableDescriptorCount(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_descriptorBindingVariableDescriptorCount(this.segment(), value); return this; } + + /// {@return `runtimeDescriptorArray` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_runtimeDescriptorArray(MemorySegment segment, long index) { return (int) VH_runtimeDescriptorArray.get(segment, 0L, index); } + /// {@return `runtimeDescriptorArray`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_runtimeDescriptorArray(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_runtimeDescriptorArray(segment, 0L); } + /// {@return `runtimeDescriptorArray` at the given index} + /// @param index the index + public @CType("VkBool32") int runtimeDescriptorArrayAt(long index) { return VkPhysicalDeviceVulkan12Features.get_runtimeDescriptorArray(this.segment(), index); } + /// {@return `runtimeDescriptorArray`} + public @CType("VkBool32") int runtimeDescriptorArray() { return VkPhysicalDeviceVulkan12Features.get_runtimeDescriptorArray(this.segment()); } + /// Sets `runtimeDescriptorArray` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_runtimeDescriptorArray(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_runtimeDescriptorArray.set(segment, 0L, index, value); } + /// Sets `runtimeDescriptorArray` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_runtimeDescriptorArray(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_runtimeDescriptorArray(segment, 0L, value); } + /// Sets `runtimeDescriptorArray` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features runtimeDescriptorArrayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_runtimeDescriptorArray(this.segment(), index, value); return this; } + /// Sets `runtimeDescriptorArray` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features runtimeDescriptorArray(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_runtimeDescriptorArray(this.segment(), value); return this; } + + /// {@return `samplerFilterMinmax` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_samplerFilterMinmax(MemorySegment segment, long index) { return (int) VH_samplerFilterMinmax.get(segment, 0L, index); } + /// {@return `samplerFilterMinmax`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_samplerFilterMinmax(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_samplerFilterMinmax(segment, 0L); } + /// {@return `samplerFilterMinmax` at the given index} + /// @param index the index + public @CType("VkBool32") int samplerFilterMinmaxAt(long index) { return VkPhysicalDeviceVulkan12Features.get_samplerFilterMinmax(this.segment(), index); } + /// {@return `samplerFilterMinmax`} + public @CType("VkBool32") int samplerFilterMinmax() { return VkPhysicalDeviceVulkan12Features.get_samplerFilterMinmax(this.segment()); } + /// Sets `samplerFilterMinmax` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_samplerFilterMinmax(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_samplerFilterMinmax.set(segment, 0L, index, value); } + /// Sets `samplerFilterMinmax` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_samplerFilterMinmax(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_samplerFilterMinmax(segment, 0L, value); } + /// Sets `samplerFilterMinmax` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features samplerFilterMinmaxAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_samplerFilterMinmax(this.segment(), index, value); return this; } + /// Sets `samplerFilterMinmax` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features samplerFilterMinmax(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_samplerFilterMinmax(this.segment(), value); return this; } + + /// {@return `scalarBlockLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_scalarBlockLayout(MemorySegment segment, long index) { return (int) VH_scalarBlockLayout.get(segment, 0L, index); } + /// {@return `scalarBlockLayout`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_scalarBlockLayout(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_scalarBlockLayout(segment, 0L); } + /// {@return `scalarBlockLayout` at the given index} + /// @param index the index + public @CType("VkBool32") int scalarBlockLayoutAt(long index) { return VkPhysicalDeviceVulkan12Features.get_scalarBlockLayout(this.segment(), index); } + /// {@return `scalarBlockLayout`} + public @CType("VkBool32") int scalarBlockLayout() { return VkPhysicalDeviceVulkan12Features.get_scalarBlockLayout(this.segment()); } + /// Sets `scalarBlockLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scalarBlockLayout(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_scalarBlockLayout.set(segment, 0L, index, value); } + /// Sets `scalarBlockLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scalarBlockLayout(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_scalarBlockLayout(segment, 0L, value); } + /// Sets `scalarBlockLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features scalarBlockLayoutAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_scalarBlockLayout(this.segment(), index, value); return this; } + /// Sets `scalarBlockLayout` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features scalarBlockLayout(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_scalarBlockLayout(this.segment(), value); return this; } + + /// {@return `imagelessFramebuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_imagelessFramebuffer(MemorySegment segment, long index) { return (int) VH_imagelessFramebuffer.get(segment, 0L, index); } + /// {@return `imagelessFramebuffer`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_imagelessFramebuffer(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_imagelessFramebuffer(segment, 0L); } + /// {@return `imagelessFramebuffer` at the given index} + /// @param index the index + public @CType("VkBool32") int imagelessFramebufferAt(long index) { return VkPhysicalDeviceVulkan12Features.get_imagelessFramebuffer(this.segment(), index); } + /// {@return `imagelessFramebuffer`} + public @CType("VkBool32") int imagelessFramebuffer() { return VkPhysicalDeviceVulkan12Features.get_imagelessFramebuffer(this.segment()); } + /// Sets `imagelessFramebuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imagelessFramebuffer(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_imagelessFramebuffer.set(segment, 0L, index, value); } + /// Sets `imagelessFramebuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imagelessFramebuffer(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_imagelessFramebuffer(segment, 0L, value); } + /// Sets `imagelessFramebuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features imagelessFramebufferAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_imagelessFramebuffer(this.segment(), index, value); return this; } + /// Sets `imagelessFramebuffer` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features imagelessFramebuffer(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_imagelessFramebuffer(this.segment(), value); return this; } + + /// {@return `uniformBufferStandardLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_uniformBufferStandardLayout(MemorySegment segment, long index) { return (int) VH_uniformBufferStandardLayout.get(segment, 0L, index); } + /// {@return `uniformBufferStandardLayout`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_uniformBufferStandardLayout(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_uniformBufferStandardLayout(segment, 0L); } + /// {@return `uniformBufferStandardLayout` at the given index} + /// @param index the index + public @CType("VkBool32") int uniformBufferStandardLayoutAt(long index) { return VkPhysicalDeviceVulkan12Features.get_uniformBufferStandardLayout(this.segment(), index); } + /// {@return `uniformBufferStandardLayout`} + public @CType("VkBool32") int uniformBufferStandardLayout() { return VkPhysicalDeviceVulkan12Features.get_uniformBufferStandardLayout(this.segment()); } + /// Sets `uniformBufferStandardLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformBufferStandardLayout(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_uniformBufferStandardLayout.set(segment, 0L, index, value); } + /// Sets `uniformBufferStandardLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformBufferStandardLayout(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_uniformBufferStandardLayout(segment, 0L, value); } + /// Sets `uniformBufferStandardLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features uniformBufferStandardLayoutAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_uniformBufferStandardLayout(this.segment(), index, value); return this; } + /// Sets `uniformBufferStandardLayout` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features uniformBufferStandardLayout(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_uniformBufferStandardLayout(this.segment(), value); return this; } + + /// {@return `shaderSubgroupExtendedTypes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSubgroupExtendedTypes(MemorySegment segment, long index) { return (int) VH_shaderSubgroupExtendedTypes.get(segment, 0L, index); } + /// {@return `shaderSubgroupExtendedTypes`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSubgroupExtendedTypes(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderSubgroupExtendedTypes(segment, 0L); } + /// {@return `shaderSubgroupExtendedTypes` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSubgroupExtendedTypesAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderSubgroupExtendedTypes(this.segment(), index); } + /// {@return `shaderSubgroupExtendedTypes`} + public @CType("VkBool32") int shaderSubgroupExtendedTypes() { return VkPhysicalDeviceVulkan12Features.get_shaderSubgroupExtendedTypes(this.segment()); } + /// Sets `shaderSubgroupExtendedTypes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSubgroupExtendedTypes(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSubgroupExtendedTypes.set(segment, 0L, index, value); } + /// Sets `shaderSubgroupExtendedTypes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSubgroupExtendedTypes(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderSubgroupExtendedTypes(segment, 0L, value); } + /// Sets `shaderSubgroupExtendedTypes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderSubgroupExtendedTypesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderSubgroupExtendedTypes(this.segment(), index, value); return this; } + /// Sets `shaderSubgroupExtendedTypes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderSubgroupExtendedTypes(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderSubgroupExtendedTypes(this.segment(), value); return this; } + + /// {@return `separateDepthStencilLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_separateDepthStencilLayouts(MemorySegment segment, long index) { return (int) VH_separateDepthStencilLayouts.get(segment, 0L, index); } + /// {@return `separateDepthStencilLayouts`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_separateDepthStencilLayouts(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_separateDepthStencilLayouts(segment, 0L); } + /// {@return `separateDepthStencilLayouts` at the given index} + /// @param index the index + public @CType("VkBool32") int separateDepthStencilLayoutsAt(long index) { return VkPhysicalDeviceVulkan12Features.get_separateDepthStencilLayouts(this.segment(), index); } + /// {@return `separateDepthStencilLayouts`} + public @CType("VkBool32") int separateDepthStencilLayouts() { return VkPhysicalDeviceVulkan12Features.get_separateDepthStencilLayouts(this.segment()); } + /// Sets `separateDepthStencilLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_separateDepthStencilLayouts(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_separateDepthStencilLayouts.set(segment, 0L, index, value); } + /// Sets `separateDepthStencilLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_separateDepthStencilLayouts(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_separateDepthStencilLayouts(segment, 0L, value); } + /// Sets `separateDepthStencilLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features separateDepthStencilLayoutsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_separateDepthStencilLayouts(this.segment(), index, value); return this; } + /// Sets `separateDepthStencilLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features separateDepthStencilLayouts(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_separateDepthStencilLayouts(this.segment(), value); return this; } + + /// {@return `hostQueryReset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hostQueryReset(MemorySegment segment, long index) { return (int) VH_hostQueryReset.get(segment, 0L, index); } + /// {@return `hostQueryReset`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hostQueryReset(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_hostQueryReset(segment, 0L); } + /// {@return `hostQueryReset` at the given index} + /// @param index the index + public @CType("VkBool32") int hostQueryResetAt(long index) { return VkPhysicalDeviceVulkan12Features.get_hostQueryReset(this.segment(), index); } + /// {@return `hostQueryReset`} + public @CType("VkBool32") int hostQueryReset() { return VkPhysicalDeviceVulkan12Features.get_hostQueryReset(this.segment()); } + /// Sets `hostQueryReset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hostQueryReset(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hostQueryReset.set(segment, 0L, index, value); } + /// Sets `hostQueryReset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hostQueryReset(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_hostQueryReset(segment, 0L, value); } + /// Sets `hostQueryReset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features hostQueryResetAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_hostQueryReset(this.segment(), index, value); return this; } + /// Sets `hostQueryReset` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features hostQueryReset(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_hostQueryReset(this.segment(), value); return this; } + + /// {@return `timelineSemaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_timelineSemaphore(MemorySegment segment, long index) { return (int) VH_timelineSemaphore.get(segment, 0L, index); } + /// {@return `timelineSemaphore`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_timelineSemaphore(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_timelineSemaphore(segment, 0L); } + /// {@return `timelineSemaphore` at the given index} + /// @param index the index + public @CType("VkBool32") int timelineSemaphoreAt(long index) { return VkPhysicalDeviceVulkan12Features.get_timelineSemaphore(this.segment(), index); } + /// {@return `timelineSemaphore`} + public @CType("VkBool32") int timelineSemaphore() { return VkPhysicalDeviceVulkan12Features.get_timelineSemaphore(this.segment()); } + /// Sets `timelineSemaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timelineSemaphore(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_timelineSemaphore.set(segment, 0L, index, value); } + /// Sets `timelineSemaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timelineSemaphore(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_timelineSemaphore(segment, 0L, value); } + /// Sets `timelineSemaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features timelineSemaphoreAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_timelineSemaphore(this.segment(), index, value); return this; } + /// Sets `timelineSemaphore` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features timelineSemaphore(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_timelineSemaphore(this.segment(), value); return this; } + + /// {@return `bufferDeviceAddress` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bufferDeviceAddress(MemorySegment segment, long index) { return (int) VH_bufferDeviceAddress.get(segment, 0L, index); } + /// {@return `bufferDeviceAddress`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bufferDeviceAddress(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_bufferDeviceAddress(segment, 0L); } + /// {@return `bufferDeviceAddress` at the given index} + /// @param index the index + public @CType("VkBool32") int bufferDeviceAddressAt(long index) { return VkPhysicalDeviceVulkan12Features.get_bufferDeviceAddress(this.segment(), index); } + /// {@return `bufferDeviceAddress`} + public @CType("VkBool32") int bufferDeviceAddress() { return VkPhysicalDeviceVulkan12Features.get_bufferDeviceAddress(this.segment()); } + /// Sets `bufferDeviceAddress` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferDeviceAddress(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bufferDeviceAddress.set(segment, 0L, index, value); } + /// Sets `bufferDeviceAddress` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferDeviceAddress(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_bufferDeviceAddress(segment, 0L, value); } + /// Sets `bufferDeviceAddress` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features bufferDeviceAddressAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_bufferDeviceAddress(this.segment(), index, value); return this; } + /// Sets `bufferDeviceAddress` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features bufferDeviceAddress(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_bufferDeviceAddress(this.segment(), value); return this; } + + /// {@return `bufferDeviceAddressCaptureReplay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bufferDeviceAddressCaptureReplay(MemorySegment segment, long index) { return (int) VH_bufferDeviceAddressCaptureReplay.get(segment, 0L, index); } + /// {@return `bufferDeviceAddressCaptureReplay`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bufferDeviceAddressCaptureReplay(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_bufferDeviceAddressCaptureReplay(segment, 0L); } + /// {@return `bufferDeviceAddressCaptureReplay` at the given index} + /// @param index the index + public @CType("VkBool32") int bufferDeviceAddressCaptureReplayAt(long index) { return VkPhysicalDeviceVulkan12Features.get_bufferDeviceAddressCaptureReplay(this.segment(), index); } + /// {@return `bufferDeviceAddressCaptureReplay`} + public @CType("VkBool32") int bufferDeviceAddressCaptureReplay() { return VkPhysicalDeviceVulkan12Features.get_bufferDeviceAddressCaptureReplay(this.segment()); } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferDeviceAddressCaptureReplay(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bufferDeviceAddressCaptureReplay.set(segment, 0L, index, value); } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferDeviceAddressCaptureReplay(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_bufferDeviceAddressCaptureReplay(segment, 0L, value); } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features bufferDeviceAddressCaptureReplayAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_bufferDeviceAddressCaptureReplay(this.segment(), index, value); return this; } + /// Sets `bufferDeviceAddressCaptureReplay` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features bufferDeviceAddressCaptureReplay(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_bufferDeviceAddressCaptureReplay(this.segment(), value); return this; } + + /// {@return `bufferDeviceAddressMultiDevice` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bufferDeviceAddressMultiDevice(MemorySegment segment, long index) { return (int) VH_bufferDeviceAddressMultiDevice.get(segment, 0L, index); } + /// {@return `bufferDeviceAddressMultiDevice`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bufferDeviceAddressMultiDevice(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_bufferDeviceAddressMultiDevice(segment, 0L); } + /// {@return `bufferDeviceAddressMultiDevice` at the given index} + /// @param index the index + public @CType("VkBool32") int bufferDeviceAddressMultiDeviceAt(long index) { return VkPhysicalDeviceVulkan12Features.get_bufferDeviceAddressMultiDevice(this.segment(), index); } + /// {@return `bufferDeviceAddressMultiDevice`} + public @CType("VkBool32") int bufferDeviceAddressMultiDevice() { return VkPhysicalDeviceVulkan12Features.get_bufferDeviceAddressMultiDevice(this.segment()); } + /// Sets `bufferDeviceAddressMultiDevice` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bufferDeviceAddressMultiDevice(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bufferDeviceAddressMultiDevice.set(segment, 0L, index, value); } + /// Sets `bufferDeviceAddressMultiDevice` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bufferDeviceAddressMultiDevice(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_bufferDeviceAddressMultiDevice(segment, 0L, value); } + /// Sets `bufferDeviceAddressMultiDevice` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features bufferDeviceAddressMultiDeviceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_bufferDeviceAddressMultiDevice(this.segment(), index, value); return this; } + /// Sets `bufferDeviceAddressMultiDevice` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features bufferDeviceAddressMultiDevice(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_bufferDeviceAddressMultiDevice(this.segment(), value); return this; } + + /// {@return `vulkanMemoryModel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vulkanMemoryModel(MemorySegment segment, long index) { return (int) VH_vulkanMemoryModel.get(segment, 0L, index); } + /// {@return `vulkanMemoryModel`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vulkanMemoryModel(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_vulkanMemoryModel(segment, 0L); } + /// {@return `vulkanMemoryModel` at the given index} + /// @param index the index + public @CType("VkBool32") int vulkanMemoryModelAt(long index) { return VkPhysicalDeviceVulkan12Features.get_vulkanMemoryModel(this.segment(), index); } + /// {@return `vulkanMemoryModel`} + public @CType("VkBool32") int vulkanMemoryModel() { return VkPhysicalDeviceVulkan12Features.get_vulkanMemoryModel(this.segment()); } + /// Sets `vulkanMemoryModel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vulkanMemoryModel(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vulkanMemoryModel.set(segment, 0L, index, value); } + /// Sets `vulkanMemoryModel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vulkanMemoryModel(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_vulkanMemoryModel(segment, 0L, value); } + /// Sets `vulkanMemoryModel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features vulkanMemoryModelAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_vulkanMemoryModel(this.segment(), index, value); return this; } + /// Sets `vulkanMemoryModel` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features vulkanMemoryModel(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_vulkanMemoryModel(this.segment(), value); return this; } + + /// {@return `vulkanMemoryModelDeviceScope` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vulkanMemoryModelDeviceScope(MemorySegment segment, long index) { return (int) VH_vulkanMemoryModelDeviceScope.get(segment, 0L, index); } + /// {@return `vulkanMemoryModelDeviceScope`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vulkanMemoryModelDeviceScope(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_vulkanMemoryModelDeviceScope(segment, 0L); } + /// {@return `vulkanMemoryModelDeviceScope` at the given index} + /// @param index the index + public @CType("VkBool32") int vulkanMemoryModelDeviceScopeAt(long index) { return VkPhysicalDeviceVulkan12Features.get_vulkanMemoryModelDeviceScope(this.segment(), index); } + /// {@return `vulkanMemoryModelDeviceScope`} + public @CType("VkBool32") int vulkanMemoryModelDeviceScope() { return VkPhysicalDeviceVulkan12Features.get_vulkanMemoryModelDeviceScope(this.segment()); } + /// Sets `vulkanMemoryModelDeviceScope` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vulkanMemoryModelDeviceScope(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vulkanMemoryModelDeviceScope.set(segment, 0L, index, value); } + /// Sets `vulkanMemoryModelDeviceScope` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vulkanMemoryModelDeviceScope(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_vulkanMemoryModelDeviceScope(segment, 0L, value); } + /// Sets `vulkanMemoryModelDeviceScope` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features vulkanMemoryModelDeviceScopeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_vulkanMemoryModelDeviceScope(this.segment(), index, value); return this; } + /// Sets `vulkanMemoryModelDeviceScope` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features vulkanMemoryModelDeviceScope(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_vulkanMemoryModelDeviceScope(this.segment(), value); return this; } + + /// {@return `vulkanMemoryModelAvailabilityVisibilityChains` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vulkanMemoryModelAvailabilityVisibilityChains(MemorySegment segment, long index) { return (int) VH_vulkanMemoryModelAvailabilityVisibilityChains.get(segment, 0L, index); } + /// {@return `vulkanMemoryModelAvailabilityVisibilityChains`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vulkanMemoryModelAvailabilityVisibilityChains(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_vulkanMemoryModelAvailabilityVisibilityChains(segment, 0L); } + /// {@return `vulkanMemoryModelAvailabilityVisibilityChains` at the given index} + /// @param index the index + public @CType("VkBool32") int vulkanMemoryModelAvailabilityVisibilityChainsAt(long index) { return VkPhysicalDeviceVulkan12Features.get_vulkanMemoryModelAvailabilityVisibilityChains(this.segment(), index); } + /// {@return `vulkanMemoryModelAvailabilityVisibilityChains`} + public @CType("VkBool32") int vulkanMemoryModelAvailabilityVisibilityChains() { return VkPhysicalDeviceVulkan12Features.get_vulkanMemoryModelAvailabilityVisibilityChains(this.segment()); } + /// Sets `vulkanMemoryModelAvailabilityVisibilityChains` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vulkanMemoryModelAvailabilityVisibilityChains(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vulkanMemoryModelAvailabilityVisibilityChains.set(segment, 0L, index, value); } + /// Sets `vulkanMemoryModelAvailabilityVisibilityChains` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vulkanMemoryModelAvailabilityVisibilityChains(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_vulkanMemoryModelAvailabilityVisibilityChains(segment, 0L, value); } + /// Sets `vulkanMemoryModelAvailabilityVisibilityChains` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features vulkanMemoryModelAvailabilityVisibilityChainsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_vulkanMemoryModelAvailabilityVisibilityChains(this.segment(), index, value); return this; } + /// Sets `vulkanMemoryModelAvailabilityVisibilityChains` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features vulkanMemoryModelAvailabilityVisibilityChains(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_vulkanMemoryModelAvailabilityVisibilityChains(this.segment(), value); return this; } + + /// {@return `shaderOutputViewportIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderOutputViewportIndex(MemorySegment segment, long index) { return (int) VH_shaderOutputViewportIndex.get(segment, 0L, index); } + /// {@return `shaderOutputViewportIndex`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderOutputViewportIndex(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderOutputViewportIndex(segment, 0L); } + /// {@return `shaderOutputViewportIndex` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderOutputViewportIndexAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderOutputViewportIndex(this.segment(), index); } + /// {@return `shaderOutputViewportIndex`} + public @CType("VkBool32") int shaderOutputViewportIndex() { return VkPhysicalDeviceVulkan12Features.get_shaderOutputViewportIndex(this.segment()); } + /// Sets `shaderOutputViewportIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderOutputViewportIndex(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderOutputViewportIndex.set(segment, 0L, index, value); } + /// Sets `shaderOutputViewportIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderOutputViewportIndex(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderOutputViewportIndex(segment, 0L, value); } + /// Sets `shaderOutputViewportIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderOutputViewportIndexAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderOutputViewportIndex(this.segment(), index, value); return this; } + /// Sets `shaderOutputViewportIndex` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderOutputViewportIndex(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderOutputViewportIndex(this.segment(), value); return this; } + + /// {@return `shaderOutputLayer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderOutputLayer(MemorySegment segment, long index) { return (int) VH_shaderOutputLayer.get(segment, 0L, index); } + /// {@return `shaderOutputLayer`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderOutputLayer(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_shaderOutputLayer(segment, 0L); } + /// {@return `shaderOutputLayer` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderOutputLayerAt(long index) { return VkPhysicalDeviceVulkan12Features.get_shaderOutputLayer(this.segment(), index); } + /// {@return `shaderOutputLayer`} + public @CType("VkBool32") int shaderOutputLayer() { return VkPhysicalDeviceVulkan12Features.get_shaderOutputLayer(this.segment()); } + /// Sets `shaderOutputLayer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderOutputLayer(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderOutputLayer.set(segment, 0L, index, value); } + /// Sets `shaderOutputLayer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderOutputLayer(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderOutputLayer(segment, 0L, value); } + /// Sets `shaderOutputLayer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderOutputLayerAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderOutputLayer(this.segment(), index, value); return this; } + /// Sets `shaderOutputLayer` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features shaderOutputLayer(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_shaderOutputLayer(this.segment(), value); return this; } + + /// {@return `subgroupBroadcastDynamicId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_subgroupBroadcastDynamicId(MemorySegment segment, long index) { return (int) VH_subgroupBroadcastDynamicId.get(segment, 0L, index); } + /// {@return `subgroupBroadcastDynamicId`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_subgroupBroadcastDynamicId(MemorySegment segment) { return VkPhysicalDeviceVulkan12Features.get_subgroupBroadcastDynamicId(segment, 0L); } + /// {@return `subgroupBroadcastDynamicId` at the given index} + /// @param index the index + public @CType("VkBool32") int subgroupBroadcastDynamicIdAt(long index) { return VkPhysicalDeviceVulkan12Features.get_subgroupBroadcastDynamicId(this.segment(), index); } + /// {@return `subgroupBroadcastDynamicId`} + public @CType("VkBool32") int subgroupBroadcastDynamicId() { return VkPhysicalDeviceVulkan12Features.get_subgroupBroadcastDynamicId(this.segment()); } + /// Sets `subgroupBroadcastDynamicId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subgroupBroadcastDynamicId(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_subgroupBroadcastDynamicId.set(segment, 0L, index, value); } + /// Sets `subgroupBroadcastDynamicId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subgroupBroadcastDynamicId(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_subgroupBroadcastDynamicId(segment, 0L, value); } + /// Sets `subgroupBroadcastDynamicId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features subgroupBroadcastDynamicIdAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_subgroupBroadcastDynamicId(this.segment(), index, value); return this; } + /// Sets `subgroupBroadcastDynamicId` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Features subgroupBroadcastDynamicId(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Features.set_subgroupBroadcastDynamicId(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan12Properties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan12Properties.java new file mode 100644 index 00000000..75192db0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan12Properties.java @@ -0,0 +1,2108 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK12.*; +import static overrungl.vulkan.VK12.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### driverID +/// [VarHandle][#VH_driverID] - [Getter][#driverID()] - [Setter][#driverID(int)] +/// ### driverName +/// [Byte offset handle][#MH_driverName] - [Memory layout][#ML_driverName] - [Getter][#driverName(long)] - [Setter][#driverName(long, java.lang.foreign.MemorySegment)] +/// ### driverInfo +/// [Byte offset handle][#MH_driverInfo] - [Memory layout][#ML_driverInfo] - [Getter][#driverInfo(long)] - [Setter][#driverInfo(long, java.lang.foreign.MemorySegment)] +/// ### conformanceVersion +/// [Byte offset][#OFFSET_conformanceVersion] - [Memory layout][#ML_conformanceVersion] - [Getter][#conformanceVersion()] - [Setter][#conformanceVersion(java.lang.foreign.MemorySegment)] +/// ### denormBehaviorIndependence +/// [VarHandle][#VH_denormBehaviorIndependence] - [Getter][#denormBehaviorIndependence()] - [Setter][#denormBehaviorIndependence(int)] +/// ### roundingModeIndependence +/// [VarHandle][#VH_roundingModeIndependence] - [Getter][#roundingModeIndependence()] - [Setter][#roundingModeIndependence(int)] +/// ### shaderSignedZeroInfNanPreserveFloat16 +/// [VarHandle][#VH_shaderSignedZeroInfNanPreserveFloat16] - [Getter][#shaderSignedZeroInfNanPreserveFloat16()] - [Setter][#shaderSignedZeroInfNanPreserveFloat16(int)] +/// ### shaderSignedZeroInfNanPreserveFloat32 +/// [VarHandle][#VH_shaderSignedZeroInfNanPreserveFloat32] - [Getter][#shaderSignedZeroInfNanPreserveFloat32()] - [Setter][#shaderSignedZeroInfNanPreserveFloat32(int)] +/// ### shaderSignedZeroInfNanPreserveFloat64 +/// [VarHandle][#VH_shaderSignedZeroInfNanPreserveFloat64] - [Getter][#shaderSignedZeroInfNanPreserveFloat64()] - [Setter][#shaderSignedZeroInfNanPreserveFloat64(int)] +/// ### shaderDenormPreserveFloat16 +/// [VarHandle][#VH_shaderDenormPreserveFloat16] - [Getter][#shaderDenormPreserveFloat16()] - [Setter][#shaderDenormPreserveFloat16(int)] +/// ### shaderDenormPreserveFloat32 +/// [VarHandle][#VH_shaderDenormPreserveFloat32] - [Getter][#shaderDenormPreserveFloat32()] - [Setter][#shaderDenormPreserveFloat32(int)] +/// ### shaderDenormPreserveFloat64 +/// [VarHandle][#VH_shaderDenormPreserveFloat64] - [Getter][#shaderDenormPreserveFloat64()] - [Setter][#shaderDenormPreserveFloat64(int)] +/// ### shaderDenormFlushToZeroFloat16 +/// [VarHandle][#VH_shaderDenormFlushToZeroFloat16] - [Getter][#shaderDenormFlushToZeroFloat16()] - [Setter][#shaderDenormFlushToZeroFloat16(int)] +/// ### shaderDenormFlushToZeroFloat32 +/// [VarHandle][#VH_shaderDenormFlushToZeroFloat32] - [Getter][#shaderDenormFlushToZeroFloat32()] - [Setter][#shaderDenormFlushToZeroFloat32(int)] +/// ### shaderDenormFlushToZeroFloat64 +/// [VarHandle][#VH_shaderDenormFlushToZeroFloat64] - [Getter][#shaderDenormFlushToZeroFloat64()] - [Setter][#shaderDenormFlushToZeroFloat64(int)] +/// ### shaderRoundingModeRTEFloat16 +/// [VarHandle][#VH_shaderRoundingModeRTEFloat16] - [Getter][#shaderRoundingModeRTEFloat16()] - [Setter][#shaderRoundingModeRTEFloat16(int)] +/// ### shaderRoundingModeRTEFloat32 +/// [VarHandle][#VH_shaderRoundingModeRTEFloat32] - [Getter][#shaderRoundingModeRTEFloat32()] - [Setter][#shaderRoundingModeRTEFloat32(int)] +/// ### shaderRoundingModeRTEFloat64 +/// [VarHandle][#VH_shaderRoundingModeRTEFloat64] - [Getter][#shaderRoundingModeRTEFloat64()] - [Setter][#shaderRoundingModeRTEFloat64(int)] +/// ### shaderRoundingModeRTZFloat16 +/// [VarHandle][#VH_shaderRoundingModeRTZFloat16] - [Getter][#shaderRoundingModeRTZFloat16()] - [Setter][#shaderRoundingModeRTZFloat16(int)] +/// ### shaderRoundingModeRTZFloat32 +/// [VarHandle][#VH_shaderRoundingModeRTZFloat32] - [Getter][#shaderRoundingModeRTZFloat32()] - [Setter][#shaderRoundingModeRTZFloat32(int)] +/// ### shaderRoundingModeRTZFloat64 +/// [VarHandle][#VH_shaderRoundingModeRTZFloat64] - [Getter][#shaderRoundingModeRTZFloat64()] - [Setter][#shaderRoundingModeRTZFloat64(int)] +/// ### maxUpdateAfterBindDescriptorsInAllPools +/// [VarHandle][#VH_maxUpdateAfterBindDescriptorsInAllPools] - [Getter][#maxUpdateAfterBindDescriptorsInAllPools()] - [Setter][#maxUpdateAfterBindDescriptorsInAllPools(int)] +/// ### shaderUniformBufferArrayNonUniformIndexingNative +/// [VarHandle][#VH_shaderUniformBufferArrayNonUniformIndexingNative] - [Getter][#shaderUniformBufferArrayNonUniformIndexingNative()] - [Setter][#shaderUniformBufferArrayNonUniformIndexingNative(int)] +/// ### shaderSampledImageArrayNonUniformIndexingNative +/// [VarHandle][#VH_shaderSampledImageArrayNonUniformIndexingNative] - [Getter][#shaderSampledImageArrayNonUniformIndexingNative()] - [Setter][#shaderSampledImageArrayNonUniformIndexingNative(int)] +/// ### shaderStorageBufferArrayNonUniformIndexingNative +/// [VarHandle][#VH_shaderStorageBufferArrayNonUniformIndexingNative] - [Getter][#shaderStorageBufferArrayNonUniformIndexingNative()] - [Setter][#shaderStorageBufferArrayNonUniformIndexingNative(int)] +/// ### shaderStorageImageArrayNonUniformIndexingNative +/// [VarHandle][#VH_shaderStorageImageArrayNonUniformIndexingNative] - [Getter][#shaderStorageImageArrayNonUniformIndexingNative()] - [Setter][#shaderStorageImageArrayNonUniformIndexingNative(int)] +/// ### shaderInputAttachmentArrayNonUniformIndexingNative +/// [VarHandle][#VH_shaderInputAttachmentArrayNonUniformIndexingNative] - [Getter][#shaderInputAttachmentArrayNonUniformIndexingNative()] - [Setter][#shaderInputAttachmentArrayNonUniformIndexingNative(int)] +/// ### robustBufferAccessUpdateAfterBind +/// [VarHandle][#VH_robustBufferAccessUpdateAfterBind] - [Getter][#robustBufferAccessUpdateAfterBind()] - [Setter][#robustBufferAccessUpdateAfterBind(int)] +/// ### quadDivergentImplicitLod +/// [VarHandle][#VH_quadDivergentImplicitLod] - [Getter][#quadDivergentImplicitLod()] - [Setter][#quadDivergentImplicitLod(int)] +/// ### maxPerStageDescriptorUpdateAfterBindSamplers +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindSamplers] - [Getter][#maxPerStageDescriptorUpdateAfterBindSamplers()] - [Setter][#maxPerStageDescriptorUpdateAfterBindSamplers(int)] +/// ### maxPerStageDescriptorUpdateAfterBindUniformBuffers +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindUniformBuffers] - [Getter][#maxPerStageDescriptorUpdateAfterBindUniformBuffers()] - [Setter][#maxPerStageDescriptorUpdateAfterBindUniformBuffers(int)] +/// ### maxPerStageDescriptorUpdateAfterBindStorageBuffers +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindStorageBuffers] - [Getter][#maxPerStageDescriptorUpdateAfterBindStorageBuffers()] - [Setter][#maxPerStageDescriptorUpdateAfterBindStorageBuffers(int)] +/// ### maxPerStageDescriptorUpdateAfterBindSampledImages +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindSampledImages] - [Getter][#maxPerStageDescriptorUpdateAfterBindSampledImages()] - [Setter][#maxPerStageDescriptorUpdateAfterBindSampledImages(int)] +/// ### maxPerStageDescriptorUpdateAfterBindStorageImages +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindStorageImages] - [Getter][#maxPerStageDescriptorUpdateAfterBindStorageImages()] - [Setter][#maxPerStageDescriptorUpdateAfterBindStorageImages(int)] +/// ### maxPerStageDescriptorUpdateAfterBindInputAttachments +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindInputAttachments] - [Getter][#maxPerStageDescriptorUpdateAfterBindInputAttachments()] - [Setter][#maxPerStageDescriptorUpdateAfterBindInputAttachments(int)] +/// ### maxPerStageUpdateAfterBindResources +/// [VarHandle][#VH_maxPerStageUpdateAfterBindResources] - [Getter][#maxPerStageUpdateAfterBindResources()] - [Setter][#maxPerStageUpdateAfterBindResources(int)] +/// ### maxDescriptorSetUpdateAfterBindSamplers +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindSamplers] - [Getter][#maxDescriptorSetUpdateAfterBindSamplers()] - [Setter][#maxDescriptorSetUpdateAfterBindSamplers(int)] +/// ### maxDescriptorSetUpdateAfterBindUniformBuffers +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindUniformBuffers] - [Getter][#maxDescriptorSetUpdateAfterBindUniformBuffers()] - [Setter][#maxDescriptorSetUpdateAfterBindUniformBuffers(int)] +/// ### maxDescriptorSetUpdateAfterBindUniformBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic] - [Getter][#maxDescriptorSetUpdateAfterBindUniformBuffersDynamic()] - [Setter][#maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(int)] +/// ### maxDescriptorSetUpdateAfterBindStorageBuffers +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindStorageBuffers] - [Getter][#maxDescriptorSetUpdateAfterBindStorageBuffers()] - [Setter][#maxDescriptorSetUpdateAfterBindStorageBuffers(int)] +/// ### maxDescriptorSetUpdateAfterBindStorageBuffersDynamic +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic] - [Getter][#maxDescriptorSetUpdateAfterBindStorageBuffersDynamic()] - [Setter][#maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(int)] +/// ### maxDescriptorSetUpdateAfterBindSampledImages +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindSampledImages] - [Getter][#maxDescriptorSetUpdateAfterBindSampledImages()] - [Setter][#maxDescriptorSetUpdateAfterBindSampledImages(int)] +/// ### maxDescriptorSetUpdateAfterBindStorageImages +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindStorageImages] - [Getter][#maxDescriptorSetUpdateAfterBindStorageImages()] - [Setter][#maxDescriptorSetUpdateAfterBindStorageImages(int)] +/// ### maxDescriptorSetUpdateAfterBindInputAttachments +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindInputAttachments] - [Getter][#maxDescriptorSetUpdateAfterBindInputAttachments()] - [Setter][#maxDescriptorSetUpdateAfterBindInputAttachments(int)] +/// ### supportedDepthResolveModes +/// [VarHandle][#VH_supportedDepthResolveModes] - [Getter][#supportedDepthResolveModes()] - [Setter][#supportedDepthResolveModes(int)] +/// ### supportedStencilResolveModes +/// [VarHandle][#VH_supportedStencilResolveModes] - [Getter][#supportedStencilResolveModes()] - [Setter][#supportedStencilResolveModes(int)] +/// ### independentResolveNone +/// [VarHandle][#VH_independentResolveNone] - [Getter][#independentResolveNone()] - [Setter][#independentResolveNone(int)] +/// ### independentResolve +/// [VarHandle][#VH_independentResolve] - [Getter][#independentResolve()] - [Setter][#independentResolve(int)] +/// ### filterMinmaxSingleComponentFormats +/// [VarHandle][#VH_filterMinmaxSingleComponentFormats] - [Getter][#filterMinmaxSingleComponentFormats()] - [Setter][#filterMinmaxSingleComponentFormats(int)] +/// ### filterMinmaxImageComponentMapping +/// [VarHandle][#VH_filterMinmaxImageComponentMapping] - [Getter][#filterMinmaxImageComponentMapping()] - [Setter][#filterMinmaxImageComponentMapping(int)] +/// ### maxTimelineSemaphoreValueDifference +/// [VarHandle][#VH_maxTimelineSemaphoreValueDifference] - [Getter][#maxTimelineSemaphoreValueDifference()] - [Setter][#maxTimelineSemaphoreValueDifference(long)] +/// ### framebufferIntegerColorSampleCounts +/// [VarHandle][#VH_framebufferIntegerColorSampleCounts] - [Getter][#framebufferIntegerColorSampleCounts()] - [Setter][#framebufferIntegerColorSampleCounts(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkan12Properties { +/// VkStructureType sType; +/// void * pNext; +/// VkDriverId driverID; +/// char[VK_MAX_DRIVER_NAME_SIZE] driverName; +/// char[VK_MAX_DRIVER_INFO_SIZE] driverInfo; +/// VkConformanceVersion conformanceVersion; +/// VkShaderFloatControlsIndependence denormBehaviorIndependence; +/// VkShaderFloatControlsIndependence roundingModeIndependence; +/// VkBool32 shaderSignedZeroInfNanPreserveFloat16; +/// VkBool32 shaderSignedZeroInfNanPreserveFloat32; +/// VkBool32 shaderSignedZeroInfNanPreserveFloat64; +/// VkBool32 shaderDenormPreserveFloat16; +/// VkBool32 shaderDenormPreserveFloat32; +/// VkBool32 shaderDenormPreserveFloat64; +/// VkBool32 shaderDenormFlushToZeroFloat16; +/// VkBool32 shaderDenormFlushToZeroFloat32; +/// VkBool32 shaderDenormFlushToZeroFloat64; +/// VkBool32 shaderRoundingModeRTEFloat16; +/// VkBool32 shaderRoundingModeRTEFloat32; +/// VkBool32 shaderRoundingModeRTEFloat64; +/// VkBool32 shaderRoundingModeRTZFloat16; +/// VkBool32 shaderRoundingModeRTZFloat32; +/// VkBool32 shaderRoundingModeRTZFloat64; +/// uint32_t maxUpdateAfterBindDescriptorsInAllPools; +/// VkBool32 shaderUniformBufferArrayNonUniformIndexingNative; +/// VkBool32 shaderSampledImageArrayNonUniformIndexingNative; +/// VkBool32 shaderStorageBufferArrayNonUniformIndexingNative; +/// VkBool32 shaderStorageImageArrayNonUniformIndexingNative; +/// VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative; +/// VkBool32 robustBufferAccessUpdateAfterBind; +/// VkBool32 quadDivergentImplicitLod; +/// uint32_t maxPerStageDescriptorUpdateAfterBindSamplers; +/// uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers; +/// uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers; +/// uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages; +/// uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages; +/// uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments; +/// uint32_t maxPerStageUpdateAfterBindResources; +/// uint32_t maxDescriptorSetUpdateAfterBindSamplers; +/// uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers; +/// uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; +/// uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers; +/// uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; +/// uint32_t maxDescriptorSetUpdateAfterBindSampledImages; +/// uint32_t maxDescriptorSetUpdateAfterBindStorageImages; +/// uint32_t maxDescriptorSetUpdateAfterBindInputAttachments; +/// VkResolveModeFlags supportedDepthResolveModes; +/// VkResolveModeFlags supportedStencilResolveModes; +/// VkBool32 independentResolveNone; +/// VkBool32 independentResolve; +/// VkBool32 filterMinmaxSingleComponentFormats; +/// VkBool32 filterMinmaxImageComponentMapping; +/// uint64_t maxTimelineSemaphoreValueDifference; +/// VkSampleCountFlags framebufferIntegerColorSampleCounts; +/// } VkPhysicalDeviceVulkan12Properties; +/// ``` +public final class VkPhysicalDeviceVulkan12Properties extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkan12Properties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("driverID"), + MemoryLayout.sequenceLayout(VK_MAX_DRIVER_NAME_SIZE, ValueLayout.JAVA_BYTE).withName("driverName"), + MemoryLayout.sequenceLayout(VK_MAX_DRIVER_INFO_SIZE, ValueLayout.JAVA_BYTE).withName("driverInfo"), + overrungl.vulkan.struct.VkConformanceVersion.LAYOUT.withName("conformanceVersion"), + ValueLayout.JAVA_INT.withName("denormBehaviorIndependence"), + ValueLayout.JAVA_INT.withName("roundingModeIndependence"), + ValueLayout.JAVA_INT.withName("shaderSignedZeroInfNanPreserveFloat16"), + ValueLayout.JAVA_INT.withName("shaderSignedZeroInfNanPreserveFloat32"), + ValueLayout.JAVA_INT.withName("shaderSignedZeroInfNanPreserveFloat64"), + ValueLayout.JAVA_INT.withName("shaderDenormPreserveFloat16"), + ValueLayout.JAVA_INT.withName("shaderDenormPreserveFloat32"), + ValueLayout.JAVA_INT.withName("shaderDenormPreserveFloat64"), + ValueLayout.JAVA_INT.withName("shaderDenormFlushToZeroFloat16"), + ValueLayout.JAVA_INT.withName("shaderDenormFlushToZeroFloat32"), + ValueLayout.JAVA_INT.withName("shaderDenormFlushToZeroFloat64"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTEFloat16"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTEFloat32"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTEFloat64"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTZFloat16"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTZFloat32"), + ValueLayout.JAVA_INT.withName("shaderRoundingModeRTZFloat64"), + ValueLayout.JAVA_INT.withName("maxUpdateAfterBindDescriptorsInAllPools"), + ValueLayout.JAVA_INT.withName("shaderUniformBufferArrayNonUniformIndexingNative"), + ValueLayout.JAVA_INT.withName("shaderSampledImageArrayNonUniformIndexingNative"), + ValueLayout.JAVA_INT.withName("shaderStorageBufferArrayNonUniformIndexingNative"), + ValueLayout.JAVA_INT.withName("shaderStorageImageArrayNonUniformIndexingNative"), + ValueLayout.JAVA_INT.withName("shaderInputAttachmentArrayNonUniformIndexingNative"), + ValueLayout.JAVA_INT.withName("robustBufferAccessUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("quadDivergentImplicitLod"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindSamplers"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindUniformBuffers"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindStorageBuffers"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindSampledImages"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindStorageImages"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindInputAttachments"), + ValueLayout.JAVA_INT.withName("maxPerStageUpdateAfterBindResources"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindSamplers"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindUniformBuffers"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindUniformBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindStorageBuffers"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindStorageBuffersDynamic"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindSampledImages"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindStorageImages"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindInputAttachments"), + ValueLayout.JAVA_INT.withName("supportedDepthResolveModes"), + ValueLayout.JAVA_INT.withName("supportedStencilResolveModes"), + ValueLayout.JAVA_INT.withName("independentResolveNone"), + ValueLayout.JAVA_INT.withName("independentResolve"), + ValueLayout.JAVA_INT.withName("filterMinmaxSingleComponentFormats"), + ValueLayout.JAVA_INT.withName("filterMinmaxImageComponentMapping"), + ValueLayout.JAVA_LONG.withName("maxTimelineSemaphoreValueDifference"), + ValueLayout.JAVA_INT.withName("framebufferIntegerColorSampleCounts") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `driverID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_driverID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("driverID")); + /// The byte offset handle of `driverName` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_driverName = LAYOUT.byteOffsetHandle(PathElement.groupElement("driverName"), PathElement.sequenceElement()); + /// The memory layout of `driverName`. + public static final MemoryLayout ML_driverName = LAYOUT.select(PathElement.groupElement("driverName")); + /// The byte offset handle of `driverInfo` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_driverInfo = LAYOUT.byteOffsetHandle(PathElement.groupElement("driverInfo"), PathElement.sequenceElement()); + /// The memory layout of `driverInfo`. + public static final MemoryLayout ML_driverInfo = LAYOUT.select(PathElement.groupElement("driverInfo")); + /// The byte offset of `conformanceVersion`. + public static final long OFFSET_conformanceVersion = LAYOUT.byteOffset(PathElement.groupElement("conformanceVersion")); + /// The memory layout of `conformanceVersion`. + public static final MemoryLayout ML_conformanceVersion = LAYOUT.select(PathElement.groupElement("conformanceVersion")); + /// The [VarHandle] of `denormBehaviorIndependence` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_denormBehaviorIndependence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("denormBehaviorIndependence")); + /// The [VarHandle] of `roundingModeIndependence` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_roundingModeIndependence = LAYOUT.arrayElementVarHandle(PathElement.groupElement("roundingModeIndependence")); + /// The [VarHandle] of `shaderSignedZeroInfNanPreserveFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSignedZeroInfNanPreserveFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSignedZeroInfNanPreserveFloat16")); + /// The [VarHandle] of `shaderSignedZeroInfNanPreserveFloat32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSignedZeroInfNanPreserveFloat32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSignedZeroInfNanPreserveFloat32")); + /// The [VarHandle] of `shaderSignedZeroInfNanPreserveFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSignedZeroInfNanPreserveFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSignedZeroInfNanPreserveFloat64")); + /// The [VarHandle] of `shaderDenormPreserveFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormPreserveFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormPreserveFloat16")); + /// The [VarHandle] of `shaderDenormPreserveFloat32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormPreserveFloat32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormPreserveFloat32")); + /// The [VarHandle] of `shaderDenormPreserveFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormPreserveFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormPreserveFloat64")); + /// The [VarHandle] of `shaderDenormFlushToZeroFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormFlushToZeroFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormFlushToZeroFloat16")); + /// The [VarHandle] of `shaderDenormFlushToZeroFloat32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormFlushToZeroFloat32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormFlushToZeroFloat32")); + /// The [VarHandle] of `shaderDenormFlushToZeroFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDenormFlushToZeroFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDenormFlushToZeroFloat64")); + /// The [VarHandle] of `shaderRoundingModeRTEFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTEFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTEFloat16")); + /// The [VarHandle] of `shaderRoundingModeRTEFloat32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTEFloat32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTEFloat32")); + /// The [VarHandle] of `shaderRoundingModeRTEFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTEFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTEFloat64")); + /// The [VarHandle] of `shaderRoundingModeRTZFloat16` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTZFloat16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTZFloat16")); + /// The [VarHandle] of `shaderRoundingModeRTZFloat32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTZFloat32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTZFloat32")); + /// The [VarHandle] of `shaderRoundingModeRTZFloat64` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderRoundingModeRTZFloat64 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderRoundingModeRTZFloat64")); + /// The [VarHandle] of `maxUpdateAfterBindDescriptorsInAllPools` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxUpdateAfterBindDescriptorsInAllPools = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxUpdateAfterBindDescriptorsInAllPools")); + /// The [VarHandle] of `shaderUniformBufferArrayNonUniformIndexingNative` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderUniformBufferArrayNonUniformIndexingNative = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderUniformBufferArrayNonUniformIndexingNative")); + /// The [VarHandle] of `shaderSampledImageArrayNonUniformIndexingNative` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSampledImageArrayNonUniformIndexingNative = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSampledImageArrayNonUniformIndexingNative")); + /// The [VarHandle] of `shaderStorageBufferArrayNonUniformIndexingNative` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageBufferArrayNonUniformIndexingNative = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageBufferArrayNonUniformIndexingNative")); + /// The [VarHandle] of `shaderStorageImageArrayNonUniformIndexingNative` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderStorageImageArrayNonUniformIndexingNative = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderStorageImageArrayNonUniformIndexingNative")); + /// The [VarHandle] of `shaderInputAttachmentArrayNonUniformIndexingNative` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderInputAttachmentArrayNonUniformIndexingNative = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderInputAttachmentArrayNonUniformIndexingNative")); + /// The [VarHandle] of `robustBufferAccessUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_robustBufferAccessUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustBufferAccessUpdateAfterBind")); + /// The [VarHandle] of `quadDivergentImplicitLod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_quadDivergentImplicitLod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("quadDivergentImplicitLod")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindSamplers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindSamplers")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindUniformBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindUniformBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindUniformBuffers")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindStorageBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindStorageBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindStorageBuffers")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindSampledImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindSampledImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindSampledImages")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindStorageImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindStorageImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindStorageImages")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindInputAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindInputAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindInputAttachments")); + /// The [VarHandle] of `maxPerStageUpdateAfterBindResources` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageUpdateAfterBindResources = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageUpdateAfterBindResources")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindSamplers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindSamplers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindSamplers")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindUniformBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindUniformBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindUniformBuffers")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindUniformBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindStorageBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindStorageBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindStorageBuffers")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindStorageBuffersDynamic")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindSampledImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindSampledImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindSampledImages")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindStorageImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindStorageImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindStorageImages")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindInputAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindInputAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindInputAttachments")); + /// The [VarHandle] of `supportedDepthResolveModes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedDepthResolveModes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedDepthResolveModes")); + /// The [VarHandle] of `supportedStencilResolveModes` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportedStencilResolveModes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportedStencilResolveModes")); + /// The [VarHandle] of `independentResolveNone` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_independentResolveNone = LAYOUT.arrayElementVarHandle(PathElement.groupElement("independentResolveNone")); + /// The [VarHandle] of `independentResolve` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_independentResolve = LAYOUT.arrayElementVarHandle(PathElement.groupElement("independentResolve")); + /// The [VarHandle] of `filterMinmaxSingleComponentFormats` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_filterMinmaxSingleComponentFormats = LAYOUT.arrayElementVarHandle(PathElement.groupElement("filterMinmaxSingleComponentFormats")); + /// The [VarHandle] of `filterMinmaxImageComponentMapping` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_filterMinmaxImageComponentMapping = LAYOUT.arrayElementVarHandle(PathElement.groupElement("filterMinmaxImageComponentMapping")); + /// The [VarHandle] of `maxTimelineSemaphoreValueDifference` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxTimelineSemaphoreValueDifference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxTimelineSemaphoreValueDifference")); + /// The [VarHandle] of `framebufferIntegerColorSampleCounts` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_framebufferIntegerColorSampleCounts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("framebufferIntegerColorSampleCounts")); + + /// Creates `VkPhysicalDeviceVulkan12Properties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkan12Properties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkan12Properties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan12Properties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan12Properties(segment); } + + /// Creates `VkPhysicalDeviceVulkan12Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan12Properties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan12Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkan12Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan12Properties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan12Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkan12Properties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkan12Properties` + public static VkPhysicalDeviceVulkan12Properties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkan12Properties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkan12Properties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkan12Properties` + public static VkPhysicalDeviceVulkan12Properties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkan12Properties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkan12Properties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan12Properties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan12Properties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkan12Properties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkan12Properties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_pNext(this.segment(), value); return this; } + + /// {@return `driverID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDriverId") int get_driverID(MemorySegment segment, long index) { return (int) VH_driverID.get(segment, 0L, index); } + /// {@return `driverID`} + /// @param segment the segment of the struct + public static @CType("VkDriverId") int get_driverID(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_driverID(segment, 0L); } + /// {@return `driverID` at the given index} + /// @param index the index + public @CType("VkDriverId") int driverIDAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_driverID(this.segment(), index); } + /// {@return `driverID`} + public @CType("VkDriverId") int driverID() { return VkPhysicalDeviceVulkan12Properties.get_driverID(this.segment()); } + /// Sets `driverID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_driverID(MemorySegment segment, long index, @CType("VkDriverId") int value) { VH_driverID.set(segment, 0L, index, value); } + /// Sets `driverID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_driverID(MemorySegment segment, @CType("VkDriverId") int value) { VkPhysicalDeviceVulkan12Properties.set_driverID(segment, 0L, value); } + /// Sets `driverID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties driverIDAt(long index, @CType("VkDriverId") int value) { VkPhysicalDeviceVulkan12Properties.set_driverID(this.segment(), index, value); return this; } + /// Sets `driverID` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties driverID(@CType("VkDriverId") int value) { VkPhysicalDeviceVulkan12Properties.set_driverID(this.segment(), value); return this; } + + /// {@return `driverName` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment get_driverName(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_driverName.invokeExact(0L, elementIndex), index), ML_driverName); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `driverName`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment get_driverName(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceVulkan12Properties.get_driverName(segment, 0L, elementIndex); } + /// {@return `driverName` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment driverNameAt(long index, long elementIndex) { return VkPhysicalDeviceVulkan12Properties.get_driverName(this.segment(), index, elementIndex); } + /// {@return `driverName`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment driverName(long elementIndex) { return VkPhysicalDeviceVulkan12Properties.get_driverName(this.segment(), elementIndex); } + /// Sets `driverName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverName(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_driverName.invokeExact(0L, elementIndex), index), ML_driverName.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `driverName` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverName(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_driverName(segment, 0L, elementIndex, value); } + /// Sets `driverName` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties driverNameAt(long index, long elementIndex, @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_driverName(this.segment(), index, elementIndex, value); return this; } + /// Sets `driverName` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties driverName(long elementIndex, @CType("char[VK_MAX_DRIVER_NAME_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_driverName(this.segment(), elementIndex, value); return this; } + + /// {@return `driverInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment get_driverInfo(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_driverInfo.invokeExact(0L, elementIndex), index), ML_driverInfo); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `driverInfo`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment get_driverInfo(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceVulkan12Properties.get_driverInfo(segment, 0L, elementIndex); } + /// {@return `driverInfo` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment driverInfoAt(long index, long elementIndex) { return VkPhysicalDeviceVulkan12Properties.get_driverInfo(this.segment(), index, elementIndex); } + /// {@return `driverInfo`} + /// @param elementIndex the index of the element + public @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment driverInfo(long elementIndex) { return VkPhysicalDeviceVulkan12Properties.get_driverInfo(this.segment(), elementIndex); } + /// Sets `driverInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverInfo(MemorySegment segment, long index, long elementIndex, @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_driverInfo.invokeExact(0L, elementIndex), index), ML_driverInfo.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `driverInfo` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_driverInfo(MemorySegment segment, long elementIndex, @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_driverInfo(segment, 0L, elementIndex, value); } + /// Sets `driverInfo` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties driverInfoAt(long index, long elementIndex, @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_driverInfo(this.segment(), index, elementIndex, value); return this; } + /// Sets `driverInfo` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties driverInfo(long elementIndex, @CType("char[VK_MAX_DRIVER_INFO_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_driverInfo(this.segment(), elementIndex, value); return this; } + + /// {@return `conformanceVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkConformanceVersion") java.lang.foreign.MemorySegment get_conformanceVersion(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_conformanceVersion, index), ML_conformanceVersion); } + /// {@return `conformanceVersion`} + /// @param segment the segment of the struct + public static @CType("VkConformanceVersion") java.lang.foreign.MemorySegment get_conformanceVersion(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_conformanceVersion(segment, 0L); } + /// {@return `conformanceVersion` at the given index} + /// @param index the index + public @CType("VkConformanceVersion") java.lang.foreign.MemorySegment conformanceVersionAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_conformanceVersion(this.segment(), index); } + /// {@return `conformanceVersion`} + public @CType("VkConformanceVersion") java.lang.foreign.MemorySegment conformanceVersion() { return VkPhysicalDeviceVulkan12Properties.get_conformanceVersion(this.segment()); } + /// Sets `conformanceVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conformanceVersion(MemorySegment segment, long index, @CType("VkConformanceVersion") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_conformanceVersion, index), ML_conformanceVersion.byteSize()); } + /// Sets `conformanceVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conformanceVersion(MemorySegment segment, @CType("VkConformanceVersion") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_conformanceVersion(segment, 0L, value); } + /// Sets `conformanceVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties conformanceVersionAt(long index, @CType("VkConformanceVersion") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_conformanceVersion(this.segment(), index, value); return this; } + /// Sets `conformanceVersion` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties conformanceVersion(@CType("VkConformanceVersion") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan12Properties.set_conformanceVersion(this.segment(), value); return this; } + + /// {@return `denormBehaviorIndependence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderFloatControlsIndependence") int get_denormBehaviorIndependence(MemorySegment segment, long index) { return (int) VH_denormBehaviorIndependence.get(segment, 0L, index); } + /// {@return `denormBehaviorIndependence`} + /// @param segment the segment of the struct + public static @CType("VkShaderFloatControlsIndependence") int get_denormBehaviorIndependence(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_denormBehaviorIndependence(segment, 0L); } + /// {@return `denormBehaviorIndependence` at the given index} + /// @param index the index + public @CType("VkShaderFloatControlsIndependence") int denormBehaviorIndependenceAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_denormBehaviorIndependence(this.segment(), index); } + /// {@return `denormBehaviorIndependence`} + public @CType("VkShaderFloatControlsIndependence") int denormBehaviorIndependence() { return VkPhysicalDeviceVulkan12Properties.get_denormBehaviorIndependence(this.segment()); } + /// Sets `denormBehaviorIndependence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_denormBehaviorIndependence(MemorySegment segment, long index, @CType("VkShaderFloatControlsIndependence") int value) { VH_denormBehaviorIndependence.set(segment, 0L, index, value); } + /// Sets `denormBehaviorIndependence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_denormBehaviorIndependence(MemorySegment segment, @CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceVulkan12Properties.set_denormBehaviorIndependence(segment, 0L, value); } + /// Sets `denormBehaviorIndependence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties denormBehaviorIndependenceAt(long index, @CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceVulkan12Properties.set_denormBehaviorIndependence(this.segment(), index, value); return this; } + /// Sets `denormBehaviorIndependence` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties denormBehaviorIndependence(@CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceVulkan12Properties.set_denormBehaviorIndependence(this.segment(), value); return this; } + + /// {@return `roundingModeIndependence` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderFloatControlsIndependence") int get_roundingModeIndependence(MemorySegment segment, long index) { return (int) VH_roundingModeIndependence.get(segment, 0L, index); } + /// {@return `roundingModeIndependence`} + /// @param segment the segment of the struct + public static @CType("VkShaderFloatControlsIndependence") int get_roundingModeIndependence(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_roundingModeIndependence(segment, 0L); } + /// {@return `roundingModeIndependence` at the given index} + /// @param index the index + public @CType("VkShaderFloatControlsIndependence") int roundingModeIndependenceAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_roundingModeIndependence(this.segment(), index); } + /// {@return `roundingModeIndependence`} + public @CType("VkShaderFloatControlsIndependence") int roundingModeIndependence() { return VkPhysicalDeviceVulkan12Properties.get_roundingModeIndependence(this.segment()); } + /// Sets `roundingModeIndependence` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_roundingModeIndependence(MemorySegment segment, long index, @CType("VkShaderFloatControlsIndependence") int value) { VH_roundingModeIndependence.set(segment, 0L, index, value); } + /// Sets `roundingModeIndependence` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_roundingModeIndependence(MemorySegment segment, @CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceVulkan12Properties.set_roundingModeIndependence(segment, 0L, value); } + /// Sets `roundingModeIndependence` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties roundingModeIndependenceAt(long index, @CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceVulkan12Properties.set_roundingModeIndependence(this.segment(), index, value); return this; } + /// Sets `roundingModeIndependence` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties roundingModeIndependence(@CType("VkShaderFloatControlsIndependence") int value) { VkPhysicalDeviceVulkan12Properties.set_roundingModeIndependence(this.segment(), value); return this; } + + /// {@return `shaderSignedZeroInfNanPreserveFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat16(MemorySegment segment, long index) { return (int) VH_shaderSignedZeroInfNanPreserveFloat16.get(segment, 0L, index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat16(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderSignedZeroInfNanPreserveFloat16(segment, 0L); } + /// {@return `shaderSignedZeroInfNanPreserveFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat16At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderSignedZeroInfNanPreserveFloat16(this.segment(), index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat16`} + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat16() { return VkPhysicalDeviceVulkan12Properties.get_shaderSignedZeroInfNanPreserveFloat16(this.segment()); } + /// Sets `shaderSignedZeroInfNanPreserveFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSignedZeroInfNanPreserveFloat16.set(segment, 0L, index, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSignedZeroInfNanPreserveFloat16(segment, 0L, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderSignedZeroInfNanPreserveFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSignedZeroInfNanPreserveFloat16(this.segment(), index, value); return this; } + /// Sets `shaderSignedZeroInfNanPreserveFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderSignedZeroInfNanPreserveFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSignedZeroInfNanPreserveFloat16(this.segment(), value); return this; } + + /// {@return `shaderSignedZeroInfNanPreserveFloat32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat32(MemorySegment segment, long index) { return (int) VH_shaderSignedZeroInfNanPreserveFloat32.get(segment, 0L, index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat32(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderSignedZeroInfNanPreserveFloat32(segment, 0L); } + /// {@return `shaderSignedZeroInfNanPreserveFloat32` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat32At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderSignedZeroInfNanPreserveFloat32(this.segment(), index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat32`} + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat32() { return VkPhysicalDeviceVulkan12Properties.get_shaderSignedZeroInfNanPreserveFloat32(this.segment()); } + /// Sets `shaderSignedZeroInfNanPreserveFloat32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSignedZeroInfNanPreserveFloat32.set(segment, 0L, index, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSignedZeroInfNanPreserveFloat32(segment, 0L, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderSignedZeroInfNanPreserveFloat32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSignedZeroInfNanPreserveFloat32(this.segment(), index, value); return this; } + /// Sets `shaderSignedZeroInfNanPreserveFloat32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderSignedZeroInfNanPreserveFloat32(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSignedZeroInfNanPreserveFloat32(this.segment(), value); return this; } + + /// {@return `shaderSignedZeroInfNanPreserveFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat64(MemorySegment segment, long index) { return (int) VH_shaderSignedZeroInfNanPreserveFloat64.get(segment, 0L, index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSignedZeroInfNanPreserveFloat64(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderSignedZeroInfNanPreserveFloat64(segment, 0L); } + /// {@return `shaderSignedZeroInfNanPreserveFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat64At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderSignedZeroInfNanPreserveFloat64(this.segment(), index); } + /// {@return `shaderSignedZeroInfNanPreserveFloat64`} + public @CType("VkBool32") int shaderSignedZeroInfNanPreserveFloat64() { return VkPhysicalDeviceVulkan12Properties.get_shaderSignedZeroInfNanPreserveFloat64(this.segment()); } + /// Sets `shaderSignedZeroInfNanPreserveFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSignedZeroInfNanPreserveFloat64.set(segment, 0L, index, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSignedZeroInfNanPreserveFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSignedZeroInfNanPreserveFloat64(segment, 0L, value); } + /// Sets `shaderSignedZeroInfNanPreserveFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderSignedZeroInfNanPreserveFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSignedZeroInfNanPreserveFloat64(this.segment(), index, value); return this; } + /// Sets `shaderSignedZeroInfNanPreserveFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderSignedZeroInfNanPreserveFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSignedZeroInfNanPreserveFloat64(this.segment(), value); return this; } + + /// {@return `shaderDenormPreserveFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormPreserveFloat16(MemorySegment segment, long index) { return (int) VH_shaderDenormPreserveFloat16.get(segment, 0L, index); } + /// {@return `shaderDenormPreserveFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormPreserveFloat16(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormPreserveFloat16(segment, 0L); } + /// {@return `shaderDenormPreserveFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormPreserveFloat16At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormPreserveFloat16(this.segment(), index); } + /// {@return `shaderDenormPreserveFloat16`} + public @CType("VkBool32") int shaderDenormPreserveFloat16() { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormPreserveFloat16(this.segment()); } + /// Sets `shaderDenormPreserveFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormPreserveFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormPreserveFloat16.set(segment, 0L, index, value); } + /// Sets `shaderDenormPreserveFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormPreserveFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormPreserveFloat16(segment, 0L, value); } + /// Sets `shaderDenormPreserveFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormPreserveFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormPreserveFloat16(this.segment(), index, value); return this; } + /// Sets `shaderDenormPreserveFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormPreserveFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormPreserveFloat16(this.segment(), value); return this; } + + /// {@return `shaderDenormPreserveFloat32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormPreserveFloat32(MemorySegment segment, long index) { return (int) VH_shaderDenormPreserveFloat32.get(segment, 0L, index); } + /// {@return `shaderDenormPreserveFloat32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormPreserveFloat32(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormPreserveFloat32(segment, 0L); } + /// {@return `shaderDenormPreserveFloat32` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormPreserveFloat32At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormPreserveFloat32(this.segment(), index); } + /// {@return `shaderDenormPreserveFloat32`} + public @CType("VkBool32") int shaderDenormPreserveFloat32() { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormPreserveFloat32(this.segment()); } + /// Sets `shaderDenormPreserveFloat32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormPreserveFloat32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormPreserveFloat32.set(segment, 0L, index, value); } + /// Sets `shaderDenormPreserveFloat32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormPreserveFloat32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormPreserveFloat32(segment, 0L, value); } + /// Sets `shaderDenormPreserveFloat32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormPreserveFloat32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormPreserveFloat32(this.segment(), index, value); return this; } + /// Sets `shaderDenormPreserveFloat32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormPreserveFloat32(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormPreserveFloat32(this.segment(), value); return this; } + + /// {@return `shaderDenormPreserveFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormPreserveFloat64(MemorySegment segment, long index) { return (int) VH_shaderDenormPreserveFloat64.get(segment, 0L, index); } + /// {@return `shaderDenormPreserveFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormPreserveFloat64(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormPreserveFloat64(segment, 0L); } + /// {@return `shaderDenormPreserveFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormPreserveFloat64At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormPreserveFloat64(this.segment(), index); } + /// {@return `shaderDenormPreserveFloat64`} + public @CType("VkBool32") int shaderDenormPreserveFloat64() { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormPreserveFloat64(this.segment()); } + /// Sets `shaderDenormPreserveFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormPreserveFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormPreserveFloat64.set(segment, 0L, index, value); } + /// Sets `shaderDenormPreserveFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormPreserveFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormPreserveFloat64(segment, 0L, value); } + /// Sets `shaderDenormPreserveFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormPreserveFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormPreserveFloat64(this.segment(), index, value); return this; } + /// Sets `shaderDenormPreserveFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormPreserveFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormPreserveFloat64(this.segment(), value); return this; } + + /// {@return `shaderDenormFlushToZeroFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat16(MemorySegment segment, long index) { return (int) VH_shaderDenormFlushToZeroFloat16.get(segment, 0L, index); } + /// {@return `shaderDenormFlushToZeroFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat16(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormFlushToZeroFloat16(segment, 0L); } + /// {@return `shaderDenormFlushToZeroFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormFlushToZeroFloat16At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormFlushToZeroFloat16(this.segment(), index); } + /// {@return `shaderDenormFlushToZeroFloat16`} + public @CType("VkBool32") int shaderDenormFlushToZeroFloat16() { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormFlushToZeroFloat16(this.segment()); } + /// Sets `shaderDenormFlushToZeroFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormFlushToZeroFloat16.set(segment, 0L, index, value); } + /// Sets `shaderDenormFlushToZeroFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormFlushToZeroFloat16(segment, 0L, value); } + /// Sets `shaderDenormFlushToZeroFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormFlushToZeroFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormFlushToZeroFloat16(this.segment(), index, value); return this; } + /// Sets `shaderDenormFlushToZeroFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormFlushToZeroFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormFlushToZeroFloat16(this.segment(), value); return this; } + + /// {@return `shaderDenormFlushToZeroFloat32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat32(MemorySegment segment, long index) { return (int) VH_shaderDenormFlushToZeroFloat32.get(segment, 0L, index); } + /// {@return `shaderDenormFlushToZeroFloat32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat32(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormFlushToZeroFloat32(segment, 0L); } + /// {@return `shaderDenormFlushToZeroFloat32` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormFlushToZeroFloat32At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormFlushToZeroFloat32(this.segment(), index); } + /// {@return `shaderDenormFlushToZeroFloat32`} + public @CType("VkBool32") int shaderDenormFlushToZeroFloat32() { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormFlushToZeroFloat32(this.segment()); } + /// Sets `shaderDenormFlushToZeroFloat32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormFlushToZeroFloat32.set(segment, 0L, index, value); } + /// Sets `shaderDenormFlushToZeroFloat32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormFlushToZeroFloat32(segment, 0L, value); } + /// Sets `shaderDenormFlushToZeroFloat32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormFlushToZeroFloat32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormFlushToZeroFloat32(this.segment(), index, value); return this; } + /// Sets `shaderDenormFlushToZeroFloat32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormFlushToZeroFloat32(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormFlushToZeroFloat32(this.segment(), value); return this; } + + /// {@return `shaderDenormFlushToZeroFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat64(MemorySegment segment, long index) { return (int) VH_shaderDenormFlushToZeroFloat64.get(segment, 0L, index); } + /// {@return `shaderDenormFlushToZeroFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDenormFlushToZeroFloat64(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormFlushToZeroFloat64(segment, 0L); } + /// {@return `shaderDenormFlushToZeroFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDenormFlushToZeroFloat64At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormFlushToZeroFloat64(this.segment(), index); } + /// {@return `shaderDenormFlushToZeroFloat64`} + public @CType("VkBool32") int shaderDenormFlushToZeroFloat64() { return VkPhysicalDeviceVulkan12Properties.get_shaderDenormFlushToZeroFloat64(this.segment()); } + /// Sets `shaderDenormFlushToZeroFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDenormFlushToZeroFloat64.set(segment, 0L, index, value); } + /// Sets `shaderDenormFlushToZeroFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDenormFlushToZeroFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormFlushToZeroFloat64(segment, 0L, value); } + /// Sets `shaderDenormFlushToZeroFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormFlushToZeroFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormFlushToZeroFloat64(this.segment(), index, value); return this; } + /// Sets `shaderDenormFlushToZeroFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderDenormFlushToZeroFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderDenormFlushToZeroFloat64(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTEFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat16(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTEFloat16.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTEFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat16(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTEFloat16(segment, 0L); } + /// {@return `shaderRoundingModeRTEFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTEFloat16At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTEFloat16(this.segment(), index); } + /// {@return `shaderRoundingModeRTEFloat16`} + public @CType("VkBool32") int shaderRoundingModeRTEFloat16() { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTEFloat16(this.segment()); } + /// Sets `shaderRoundingModeRTEFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTEFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTEFloat16.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTEFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTEFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTEFloat16(segment, 0L, value); } + /// Sets `shaderRoundingModeRTEFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTEFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTEFloat16(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTEFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTEFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTEFloat16(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTEFloat32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat32(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTEFloat32.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTEFloat32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat32(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTEFloat32(segment, 0L); } + /// {@return `shaderRoundingModeRTEFloat32` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTEFloat32At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTEFloat32(this.segment(), index); } + /// {@return `shaderRoundingModeRTEFloat32`} + public @CType("VkBool32") int shaderRoundingModeRTEFloat32() { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTEFloat32(this.segment()); } + /// Sets `shaderRoundingModeRTEFloat32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTEFloat32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTEFloat32.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTEFloat32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTEFloat32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTEFloat32(segment, 0L, value); } + /// Sets `shaderRoundingModeRTEFloat32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTEFloat32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTEFloat32(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTEFloat32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTEFloat32(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTEFloat32(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTEFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat64(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTEFloat64.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTEFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTEFloat64(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTEFloat64(segment, 0L); } + /// {@return `shaderRoundingModeRTEFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTEFloat64At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTEFloat64(this.segment(), index); } + /// {@return `shaderRoundingModeRTEFloat64`} + public @CType("VkBool32") int shaderRoundingModeRTEFloat64() { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTEFloat64(this.segment()); } + /// Sets `shaderRoundingModeRTEFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTEFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTEFloat64.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTEFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTEFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTEFloat64(segment, 0L, value); } + /// Sets `shaderRoundingModeRTEFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTEFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTEFloat64(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTEFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTEFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTEFloat64(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTZFloat16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat16(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTZFloat16.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTZFloat16`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat16(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTZFloat16(segment, 0L); } + /// {@return `shaderRoundingModeRTZFloat16` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTZFloat16At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTZFloat16(this.segment(), index); } + /// {@return `shaderRoundingModeRTZFloat16`} + public @CType("VkBool32") int shaderRoundingModeRTZFloat16() { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTZFloat16(this.segment()); } + /// Sets `shaderRoundingModeRTZFloat16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTZFloat16(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTZFloat16.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTZFloat16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTZFloat16(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTZFloat16(segment, 0L, value); } + /// Sets `shaderRoundingModeRTZFloat16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTZFloat16At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTZFloat16(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTZFloat16` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTZFloat16(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTZFloat16(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTZFloat32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat32(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTZFloat32.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTZFloat32`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat32(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTZFloat32(segment, 0L); } + /// {@return `shaderRoundingModeRTZFloat32` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTZFloat32At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTZFloat32(this.segment(), index); } + /// {@return `shaderRoundingModeRTZFloat32`} + public @CType("VkBool32") int shaderRoundingModeRTZFloat32() { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTZFloat32(this.segment()); } + /// Sets `shaderRoundingModeRTZFloat32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTZFloat32(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTZFloat32.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTZFloat32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTZFloat32(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTZFloat32(segment, 0L, value); } + /// Sets `shaderRoundingModeRTZFloat32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTZFloat32At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTZFloat32(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTZFloat32` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTZFloat32(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTZFloat32(this.segment(), value); return this; } + + /// {@return `shaderRoundingModeRTZFloat64` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat64(MemorySegment segment, long index) { return (int) VH_shaderRoundingModeRTZFloat64.get(segment, 0L, index); } + /// {@return `shaderRoundingModeRTZFloat64`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderRoundingModeRTZFloat64(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTZFloat64(segment, 0L); } + /// {@return `shaderRoundingModeRTZFloat64` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderRoundingModeRTZFloat64At(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTZFloat64(this.segment(), index); } + /// {@return `shaderRoundingModeRTZFloat64`} + public @CType("VkBool32") int shaderRoundingModeRTZFloat64() { return VkPhysicalDeviceVulkan12Properties.get_shaderRoundingModeRTZFloat64(this.segment()); } + /// Sets `shaderRoundingModeRTZFloat64` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderRoundingModeRTZFloat64(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderRoundingModeRTZFloat64.set(segment, 0L, index, value); } + /// Sets `shaderRoundingModeRTZFloat64` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderRoundingModeRTZFloat64(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTZFloat64(segment, 0L, value); } + /// Sets `shaderRoundingModeRTZFloat64` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTZFloat64At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTZFloat64(this.segment(), index, value); return this; } + /// Sets `shaderRoundingModeRTZFloat64` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderRoundingModeRTZFloat64(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderRoundingModeRTZFloat64(this.segment(), value); return this; } + + /// {@return `maxUpdateAfterBindDescriptorsInAllPools` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxUpdateAfterBindDescriptorsInAllPools(MemorySegment segment, long index) { return (int) VH_maxUpdateAfterBindDescriptorsInAllPools.get(segment, 0L, index); } + /// {@return `maxUpdateAfterBindDescriptorsInAllPools`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxUpdateAfterBindDescriptorsInAllPools(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxUpdateAfterBindDescriptorsInAllPools(segment, 0L); } + /// {@return `maxUpdateAfterBindDescriptorsInAllPools` at the given index} + /// @param index the index + public @CType("uint32_t") int maxUpdateAfterBindDescriptorsInAllPoolsAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxUpdateAfterBindDescriptorsInAllPools(this.segment(), index); } + /// {@return `maxUpdateAfterBindDescriptorsInAllPools`} + public @CType("uint32_t") int maxUpdateAfterBindDescriptorsInAllPools() { return VkPhysicalDeviceVulkan12Properties.get_maxUpdateAfterBindDescriptorsInAllPools(this.segment()); } + /// Sets `maxUpdateAfterBindDescriptorsInAllPools` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxUpdateAfterBindDescriptorsInAllPools(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxUpdateAfterBindDescriptorsInAllPools.set(segment, 0L, index, value); } + /// Sets `maxUpdateAfterBindDescriptorsInAllPools` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxUpdateAfterBindDescriptorsInAllPools(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxUpdateAfterBindDescriptorsInAllPools(segment, 0L, value); } + /// Sets `maxUpdateAfterBindDescriptorsInAllPools` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxUpdateAfterBindDescriptorsInAllPoolsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxUpdateAfterBindDescriptorsInAllPools(this.segment(), index, value); return this; } + /// Sets `maxUpdateAfterBindDescriptorsInAllPools` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxUpdateAfterBindDescriptorsInAllPools(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxUpdateAfterBindDescriptorsInAllPools(this.segment(), value); return this; } + + /// {@return `shaderUniformBufferArrayNonUniformIndexingNative` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderUniformBufferArrayNonUniformIndexingNative(MemorySegment segment, long index) { return (int) VH_shaderUniformBufferArrayNonUniformIndexingNative.get(segment, 0L, index); } + /// {@return `shaderUniformBufferArrayNonUniformIndexingNative`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderUniformBufferArrayNonUniformIndexingNative(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderUniformBufferArrayNonUniformIndexingNative(segment, 0L); } + /// {@return `shaderUniformBufferArrayNonUniformIndexingNative` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderUniformBufferArrayNonUniformIndexingNativeAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderUniformBufferArrayNonUniformIndexingNative(this.segment(), index); } + /// {@return `shaderUniformBufferArrayNonUniformIndexingNative`} + public @CType("VkBool32") int shaderUniformBufferArrayNonUniformIndexingNative() { return VkPhysicalDeviceVulkan12Properties.get_shaderUniformBufferArrayNonUniformIndexingNative(this.segment()); } + /// Sets `shaderUniformBufferArrayNonUniformIndexingNative` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderUniformBufferArrayNonUniformIndexingNative(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderUniformBufferArrayNonUniformIndexingNative.set(segment, 0L, index, value); } + /// Sets `shaderUniformBufferArrayNonUniformIndexingNative` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderUniformBufferArrayNonUniformIndexingNative(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderUniformBufferArrayNonUniformIndexingNative(segment, 0L, value); } + /// Sets `shaderUniformBufferArrayNonUniformIndexingNative` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderUniformBufferArrayNonUniformIndexingNativeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderUniformBufferArrayNonUniformIndexingNative(this.segment(), index, value); return this; } + /// Sets `shaderUniformBufferArrayNonUniformIndexingNative` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderUniformBufferArrayNonUniformIndexingNative(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderUniformBufferArrayNonUniformIndexingNative(this.segment(), value); return this; } + + /// {@return `shaderSampledImageArrayNonUniformIndexingNative` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSampledImageArrayNonUniformIndexingNative(MemorySegment segment, long index) { return (int) VH_shaderSampledImageArrayNonUniformIndexingNative.get(segment, 0L, index); } + /// {@return `shaderSampledImageArrayNonUniformIndexingNative`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSampledImageArrayNonUniformIndexingNative(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderSampledImageArrayNonUniformIndexingNative(segment, 0L); } + /// {@return `shaderSampledImageArrayNonUniformIndexingNative` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSampledImageArrayNonUniformIndexingNativeAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderSampledImageArrayNonUniformIndexingNative(this.segment(), index); } + /// {@return `shaderSampledImageArrayNonUniformIndexingNative`} + public @CType("VkBool32") int shaderSampledImageArrayNonUniformIndexingNative() { return VkPhysicalDeviceVulkan12Properties.get_shaderSampledImageArrayNonUniformIndexingNative(this.segment()); } + /// Sets `shaderSampledImageArrayNonUniformIndexingNative` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSampledImageArrayNonUniformIndexingNative(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSampledImageArrayNonUniformIndexingNative.set(segment, 0L, index, value); } + /// Sets `shaderSampledImageArrayNonUniformIndexingNative` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSampledImageArrayNonUniformIndexingNative(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSampledImageArrayNonUniformIndexingNative(segment, 0L, value); } + /// Sets `shaderSampledImageArrayNonUniformIndexingNative` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderSampledImageArrayNonUniformIndexingNativeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSampledImageArrayNonUniformIndexingNative(this.segment(), index, value); return this; } + /// Sets `shaderSampledImageArrayNonUniformIndexingNative` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderSampledImageArrayNonUniformIndexingNative(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderSampledImageArrayNonUniformIndexingNative(this.segment(), value); return this; } + + /// {@return `shaderStorageBufferArrayNonUniformIndexingNative` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageBufferArrayNonUniformIndexingNative(MemorySegment segment, long index) { return (int) VH_shaderStorageBufferArrayNonUniformIndexingNative.get(segment, 0L, index); } + /// {@return `shaderStorageBufferArrayNonUniformIndexingNative`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageBufferArrayNonUniformIndexingNative(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderStorageBufferArrayNonUniformIndexingNative(segment, 0L); } + /// {@return `shaderStorageBufferArrayNonUniformIndexingNative` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageBufferArrayNonUniformIndexingNativeAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderStorageBufferArrayNonUniformIndexingNative(this.segment(), index); } + /// {@return `shaderStorageBufferArrayNonUniformIndexingNative`} + public @CType("VkBool32") int shaderStorageBufferArrayNonUniformIndexingNative() { return VkPhysicalDeviceVulkan12Properties.get_shaderStorageBufferArrayNonUniformIndexingNative(this.segment()); } + /// Sets `shaderStorageBufferArrayNonUniformIndexingNative` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageBufferArrayNonUniformIndexingNative(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageBufferArrayNonUniformIndexingNative.set(segment, 0L, index, value); } + /// Sets `shaderStorageBufferArrayNonUniformIndexingNative` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageBufferArrayNonUniformIndexingNative(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderStorageBufferArrayNonUniformIndexingNative(segment, 0L, value); } + /// Sets `shaderStorageBufferArrayNonUniformIndexingNative` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderStorageBufferArrayNonUniformIndexingNativeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderStorageBufferArrayNonUniformIndexingNative(this.segment(), index, value); return this; } + /// Sets `shaderStorageBufferArrayNonUniformIndexingNative` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderStorageBufferArrayNonUniformIndexingNative(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderStorageBufferArrayNonUniformIndexingNative(this.segment(), value); return this; } + + /// {@return `shaderStorageImageArrayNonUniformIndexingNative` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderStorageImageArrayNonUniformIndexingNative(MemorySegment segment, long index) { return (int) VH_shaderStorageImageArrayNonUniformIndexingNative.get(segment, 0L, index); } + /// {@return `shaderStorageImageArrayNonUniformIndexingNative`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderStorageImageArrayNonUniformIndexingNative(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderStorageImageArrayNonUniformIndexingNative(segment, 0L); } + /// {@return `shaderStorageImageArrayNonUniformIndexingNative` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderStorageImageArrayNonUniformIndexingNativeAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderStorageImageArrayNonUniformIndexingNative(this.segment(), index); } + /// {@return `shaderStorageImageArrayNonUniformIndexingNative`} + public @CType("VkBool32") int shaderStorageImageArrayNonUniformIndexingNative() { return VkPhysicalDeviceVulkan12Properties.get_shaderStorageImageArrayNonUniformIndexingNative(this.segment()); } + /// Sets `shaderStorageImageArrayNonUniformIndexingNative` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderStorageImageArrayNonUniformIndexingNative(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderStorageImageArrayNonUniformIndexingNative.set(segment, 0L, index, value); } + /// Sets `shaderStorageImageArrayNonUniformIndexingNative` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderStorageImageArrayNonUniformIndexingNative(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderStorageImageArrayNonUniformIndexingNative(segment, 0L, value); } + /// Sets `shaderStorageImageArrayNonUniformIndexingNative` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderStorageImageArrayNonUniformIndexingNativeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderStorageImageArrayNonUniformIndexingNative(this.segment(), index, value); return this; } + /// Sets `shaderStorageImageArrayNonUniformIndexingNative` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderStorageImageArrayNonUniformIndexingNative(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderStorageImageArrayNonUniformIndexingNative(this.segment(), value); return this; } + + /// {@return `shaderInputAttachmentArrayNonUniformIndexingNative` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderInputAttachmentArrayNonUniformIndexingNative(MemorySegment segment, long index) { return (int) VH_shaderInputAttachmentArrayNonUniformIndexingNative.get(segment, 0L, index); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexingNative`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderInputAttachmentArrayNonUniformIndexingNative(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_shaderInputAttachmentArrayNonUniformIndexingNative(segment, 0L); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexingNative` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderInputAttachmentArrayNonUniformIndexingNativeAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_shaderInputAttachmentArrayNonUniformIndexingNative(this.segment(), index); } + /// {@return `shaderInputAttachmentArrayNonUniformIndexingNative`} + public @CType("VkBool32") int shaderInputAttachmentArrayNonUniformIndexingNative() { return VkPhysicalDeviceVulkan12Properties.get_shaderInputAttachmentArrayNonUniformIndexingNative(this.segment()); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexingNative` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderInputAttachmentArrayNonUniformIndexingNative(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderInputAttachmentArrayNonUniformIndexingNative.set(segment, 0L, index, value); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexingNative` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderInputAttachmentArrayNonUniformIndexingNative(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderInputAttachmentArrayNonUniformIndexingNative(segment, 0L, value); } + /// Sets `shaderInputAttachmentArrayNonUniformIndexingNative` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderInputAttachmentArrayNonUniformIndexingNativeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderInputAttachmentArrayNonUniformIndexingNative(this.segment(), index, value); return this; } + /// Sets `shaderInputAttachmentArrayNonUniformIndexingNative` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties shaderInputAttachmentArrayNonUniformIndexingNative(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_shaderInputAttachmentArrayNonUniformIndexingNative(this.segment(), value); return this; } + + /// {@return `robustBufferAccessUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_robustBufferAccessUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_robustBufferAccessUpdateAfterBind.get(segment, 0L, index); } + /// {@return `robustBufferAccessUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_robustBufferAccessUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_robustBufferAccessUpdateAfterBind(segment, 0L); } + /// {@return `robustBufferAccessUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int robustBufferAccessUpdateAfterBindAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_robustBufferAccessUpdateAfterBind(this.segment(), index); } + /// {@return `robustBufferAccessUpdateAfterBind`} + public @CType("VkBool32") int robustBufferAccessUpdateAfterBind() { return VkPhysicalDeviceVulkan12Properties.get_robustBufferAccessUpdateAfterBind(this.segment()); } + /// Sets `robustBufferAccessUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustBufferAccessUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_robustBufferAccessUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `robustBufferAccessUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustBufferAccessUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_robustBufferAccessUpdateAfterBind(segment, 0L, value); } + /// Sets `robustBufferAccessUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties robustBufferAccessUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_robustBufferAccessUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `robustBufferAccessUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties robustBufferAccessUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_robustBufferAccessUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `quadDivergentImplicitLod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_quadDivergentImplicitLod(MemorySegment segment, long index) { return (int) VH_quadDivergentImplicitLod.get(segment, 0L, index); } + /// {@return `quadDivergentImplicitLod`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_quadDivergentImplicitLod(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_quadDivergentImplicitLod(segment, 0L); } + /// {@return `quadDivergentImplicitLod` at the given index} + /// @param index the index + public @CType("VkBool32") int quadDivergentImplicitLodAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_quadDivergentImplicitLod(this.segment(), index); } + /// {@return `quadDivergentImplicitLod`} + public @CType("VkBool32") int quadDivergentImplicitLod() { return VkPhysicalDeviceVulkan12Properties.get_quadDivergentImplicitLod(this.segment()); } + /// Sets `quadDivergentImplicitLod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_quadDivergentImplicitLod(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_quadDivergentImplicitLod.set(segment, 0L, index, value); } + /// Sets `quadDivergentImplicitLod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_quadDivergentImplicitLod(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_quadDivergentImplicitLod(segment, 0L, value); } + /// Sets `quadDivergentImplicitLod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties quadDivergentImplicitLodAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_quadDivergentImplicitLod(this.segment(), index, value); return this; } + /// Sets `quadDivergentImplicitLod` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties quadDivergentImplicitLod(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_quadDivergentImplicitLod(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindSamplers(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindSamplers.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSamplers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindSamplers(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindSamplers(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSamplers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindSamplersAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindSamplers(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSamplers`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindSamplers() { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindSamplers(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindSamplers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindSamplers.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindSamplers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindSamplers(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindSamplersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindSamplers(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindSamplers(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindSamplers(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindUniformBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindUniformBuffers(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindUniformBuffers.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindUniformBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindUniformBuffers(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindUniformBuffers(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindUniformBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindUniformBuffersAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindUniformBuffers(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindUniformBuffers`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindUniformBuffers() { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindUniformBuffers(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindUniformBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindUniformBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindUniformBuffers.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindUniformBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindUniformBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindUniformBuffers(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindUniformBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindUniformBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindUniformBuffers(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindUniformBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindUniformBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindUniformBuffers(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindStorageBuffers(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindStorageBuffers.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindStorageBuffers(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindStorageBuffers(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindStorageBuffersAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindStorageBuffers(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageBuffers`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindStorageBuffers() { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindStorageBuffers(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindStorageBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindStorageBuffers.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindStorageBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindStorageBuffers(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindStorageBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindStorageBuffers(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindStorageBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindStorageBuffers(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindSampledImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindSampledImages(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindSampledImages.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSampledImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindSampledImages(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindSampledImages(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSampledImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindSampledImagesAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindSampledImages(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindSampledImages`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindSampledImages() { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindSampledImages(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSampledImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindSampledImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindSampledImages.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSampledImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindSampledImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindSampledImages(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindSampledImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindSampledImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindSampledImages(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindSampledImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindSampledImages(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindSampledImages(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindStorageImages(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindStorageImages.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindStorageImages(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindStorageImages(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindStorageImagesAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindStorageImages(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindStorageImages`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindStorageImages() { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindStorageImages(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindStorageImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindStorageImages.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindStorageImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindStorageImages(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindStorageImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindStorageImages(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindStorageImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindStorageImages(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindStorageImages(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindInputAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindInputAttachments(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindInputAttachments.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInputAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindInputAttachments(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindInputAttachments(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInputAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindInputAttachmentsAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindInputAttachments(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInputAttachments`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindInputAttachments() { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageDescriptorUpdateAfterBindInputAttachments(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInputAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindInputAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindInputAttachments.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInputAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindInputAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindInputAttachments(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInputAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindInputAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindInputAttachments(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindInputAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageDescriptorUpdateAfterBindInputAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageDescriptorUpdateAfterBindInputAttachments(this.segment(), value); return this; } + + /// {@return `maxPerStageUpdateAfterBindResources` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageUpdateAfterBindResources(MemorySegment segment, long index) { return (int) VH_maxPerStageUpdateAfterBindResources.get(segment, 0L, index); } + /// {@return `maxPerStageUpdateAfterBindResources`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageUpdateAfterBindResources(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageUpdateAfterBindResources(segment, 0L); } + /// {@return `maxPerStageUpdateAfterBindResources` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageUpdateAfterBindResourcesAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageUpdateAfterBindResources(this.segment(), index); } + /// {@return `maxPerStageUpdateAfterBindResources`} + public @CType("uint32_t") int maxPerStageUpdateAfterBindResources() { return VkPhysicalDeviceVulkan12Properties.get_maxPerStageUpdateAfterBindResources(this.segment()); } + /// Sets `maxPerStageUpdateAfterBindResources` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageUpdateAfterBindResources(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageUpdateAfterBindResources.set(segment, 0L, index, value); } + /// Sets `maxPerStageUpdateAfterBindResources` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageUpdateAfterBindResources(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageUpdateAfterBindResources(segment, 0L, value); } + /// Sets `maxPerStageUpdateAfterBindResources` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageUpdateAfterBindResourcesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageUpdateAfterBindResources(this.segment(), index, value); return this; } + /// Sets `maxPerStageUpdateAfterBindResources` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxPerStageUpdateAfterBindResources(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxPerStageUpdateAfterBindResources(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindSamplers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindSamplers(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindSamplers.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindSamplers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindSamplers(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindSamplers(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindSamplers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindSamplersAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindSamplers(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindSamplers`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindSamplers() { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindSamplers(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindSamplers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindSamplers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindSamplers.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindSamplers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindSamplers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindSamplers(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindSamplers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindSamplersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindSamplers(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindSamplers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindSamplers(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindSamplers(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindUniformBuffers(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindUniformBuffers.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindUniformBuffers(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindUniformBuffers(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindUniformBuffersAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindUniformBuffers(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffers`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindUniformBuffers() { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindUniformBuffers(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindUniformBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindUniformBuffers.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindUniformBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindUniformBuffers(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindUniformBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindUniformBuffers(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindUniformBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindUniformBuffers(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindUniformBuffersDynamicAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindUniformBuffersDynamic() { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindUniformBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindUniformBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageBuffers(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindStorageBuffers.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageBuffers(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindStorageBuffers(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageBuffersAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindStorageBuffers(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffers`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageBuffers() { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindStorageBuffers(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindStorageBuffers.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindStorageBuffers(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindStorageBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindStorageBuffers(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindStorageBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindStorageBuffers(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageBuffersDynamicAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageBuffersDynamic() { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindStorageBuffersDynamicAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindStorageBuffersDynamic` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindSampledImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindSampledImages(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindSampledImages.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindSampledImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindSampledImages(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindSampledImages(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindSampledImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindSampledImagesAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindSampledImages(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindSampledImages`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindSampledImages() { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindSampledImages(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindSampledImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindSampledImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindSampledImages.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindSampledImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindSampledImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindSampledImages(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindSampledImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindSampledImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindSampledImages(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindSampledImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindSampledImages(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindSampledImages(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindStorageImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageImages(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindStorageImages.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageImages`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindStorageImages(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindStorageImages(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageImages` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageImagesAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindStorageImages(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindStorageImages`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindStorageImages() { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindStorageImages(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageImages(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindStorageImages.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindStorageImages(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindStorageImages(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindStorageImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindStorageImagesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindStorageImages(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindStorageImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindStorageImages(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindStorageImages(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindInputAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindInputAttachments(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindInputAttachments.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindInputAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindInputAttachments(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindInputAttachments(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindInputAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindInputAttachmentsAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindInputAttachments(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindInputAttachments`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindInputAttachments() { return VkPhysicalDeviceVulkan12Properties.get_maxDescriptorSetUpdateAfterBindInputAttachments(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindInputAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindInputAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindInputAttachments.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindInputAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindInputAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindInputAttachments(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindInputAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindInputAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindInputAttachments(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindInputAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxDescriptorSetUpdateAfterBindInputAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan12Properties.set_maxDescriptorSetUpdateAfterBindInputAttachments(this.segment(), value); return this; } + + /// {@return `supportedDepthResolveModes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkResolveModeFlags") int get_supportedDepthResolveModes(MemorySegment segment, long index) { return (int) VH_supportedDepthResolveModes.get(segment, 0L, index); } + /// {@return `supportedDepthResolveModes`} + /// @param segment the segment of the struct + public static @CType("VkResolveModeFlags") int get_supportedDepthResolveModes(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_supportedDepthResolveModes(segment, 0L); } + /// {@return `supportedDepthResolveModes` at the given index} + /// @param index the index + public @CType("VkResolveModeFlags") int supportedDepthResolveModesAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_supportedDepthResolveModes(this.segment(), index); } + /// {@return `supportedDepthResolveModes`} + public @CType("VkResolveModeFlags") int supportedDepthResolveModes() { return VkPhysicalDeviceVulkan12Properties.get_supportedDepthResolveModes(this.segment()); } + /// Sets `supportedDepthResolveModes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedDepthResolveModes(MemorySegment segment, long index, @CType("VkResolveModeFlags") int value) { VH_supportedDepthResolveModes.set(segment, 0L, index, value); } + /// Sets `supportedDepthResolveModes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedDepthResolveModes(MemorySegment segment, @CType("VkResolveModeFlags") int value) { VkPhysicalDeviceVulkan12Properties.set_supportedDepthResolveModes(segment, 0L, value); } + /// Sets `supportedDepthResolveModes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties supportedDepthResolveModesAt(long index, @CType("VkResolveModeFlags") int value) { VkPhysicalDeviceVulkan12Properties.set_supportedDepthResolveModes(this.segment(), index, value); return this; } + /// Sets `supportedDepthResolveModes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties supportedDepthResolveModes(@CType("VkResolveModeFlags") int value) { VkPhysicalDeviceVulkan12Properties.set_supportedDepthResolveModes(this.segment(), value); return this; } + + /// {@return `supportedStencilResolveModes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkResolveModeFlags") int get_supportedStencilResolveModes(MemorySegment segment, long index) { return (int) VH_supportedStencilResolveModes.get(segment, 0L, index); } + /// {@return `supportedStencilResolveModes`} + /// @param segment the segment of the struct + public static @CType("VkResolveModeFlags") int get_supportedStencilResolveModes(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_supportedStencilResolveModes(segment, 0L); } + /// {@return `supportedStencilResolveModes` at the given index} + /// @param index the index + public @CType("VkResolveModeFlags") int supportedStencilResolveModesAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_supportedStencilResolveModes(this.segment(), index); } + /// {@return `supportedStencilResolveModes`} + public @CType("VkResolveModeFlags") int supportedStencilResolveModes() { return VkPhysicalDeviceVulkan12Properties.get_supportedStencilResolveModes(this.segment()); } + /// Sets `supportedStencilResolveModes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportedStencilResolveModes(MemorySegment segment, long index, @CType("VkResolveModeFlags") int value) { VH_supportedStencilResolveModes.set(segment, 0L, index, value); } + /// Sets `supportedStencilResolveModes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportedStencilResolveModes(MemorySegment segment, @CType("VkResolveModeFlags") int value) { VkPhysicalDeviceVulkan12Properties.set_supportedStencilResolveModes(segment, 0L, value); } + /// Sets `supportedStencilResolveModes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties supportedStencilResolveModesAt(long index, @CType("VkResolveModeFlags") int value) { VkPhysicalDeviceVulkan12Properties.set_supportedStencilResolveModes(this.segment(), index, value); return this; } + /// Sets `supportedStencilResolveModes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties supportedStencilResolveModes(@CType("VkResolveModeFlags") int value) { VkPhysicalDeviceVulkan12Properties.set_supportedStencilResolveModes(this.segment(), value); return this; } + + /// {@return `independentResolveNone` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_independentResolveNone(MemorySegment segment, long index) { return (int) VH_independentResolveNone.get(segment, 0L, index); } + /// {@return `independentResolveNone`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_independentResolveNone(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_independentResolveNone(segment, 0L); } + /// {@return `independentResolveNone` at the given index} + /// @param index the index + public @CType("VkBool32") int independentResolveNoneAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_independentResolveNone(this.segment(), index); } + /// {@return `independentResolveNone`} + public @CType("VkBool32") int independentResolveNone() { return VkPhysicalDeviceVulkan12Properties.get_independentResolveNone(this.segment()); } + /// Sets `independentResolveNone` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_independentResolveNone(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_independentResolveNone.set(segment, 0L, index, value); } + /// Sets `independentResolveNone` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_independentResolveNone(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_independentResolveNone(segment, 0L, value); } + /// Sets `independentResolveNone` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties independentResolveNoneAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_independentResolveNone(this.segment(), index, value); return this; } + /// Sets `independentResolveNone` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties independentResolveNone(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_independentResolveNone(this.segment(), value); return this; } + + /// {@return `independentResolve` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_independentResolve(MemorySegment segment, long index) { return (int) VH_independentResolve.get(segment, 0L, index); } + /// {@return `independentResolve`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_independentResolve(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_independentResolve(segment, 0L); } + /// {@return `independentResolve` at the given index} + /// @param index the index + public @CType("VkBool32") int independentResolveAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_independentResolve(this.segment(), index); } + /// {@return `independentResolve`} + public @CType("VkBool32") int independentResolve() { return VkPhysicalDeviceVulkan12Properties.get_independentResolve(this.segment()); } + /// Sets `independentResolve` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_independentResolve(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_independentResolve.set(segment, 0L, index, value); } + /// Sets `independentResolve` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_independentResolve(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_independentResolve(segment, 0L, value); } + /// Sets `independentResolve` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties independentResolveAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_independentResolve(this.segment(), index, value); return this; } + /// Sets `independentResolve` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties independentResolve(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_independentResolve(this.segment(), value); return this; } + + /// {@return `filterMinmaxSingleComponentFormats` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_filterMinmaxSingleComponentFormats(MemorySegment segment, long index) { return (int) VH_filterMinmaxSingleComponentFormats.get(segment, 0L, index); } + /// {@return `filterMinmaxSingleComponentFormats`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_filterMinmaxSingleComponentFormats(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_filterMinmaxSingleComponentFormats(segment, 0L); } + /// {@return `filterMinmaxSingleComponentFormats` at the given index} + /// @param index the index + public @CType("VkBool32") int filterMinmaxSingleComponentFormatsAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_filterMinmaxSingleComponentFormats(this.segment(), index); } + /// {@return `filterMinmaxSingleComponentFormats`} + public @CType("VkBool32") int filterMinmaxSingleComponentFormats() { return VkPhysicalDeviceVulkan12Properties.get_filterMinmaxSingleComponentFormats(this.segment()); } + /// Sets `filterMinmaxSingleComponentFormats` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_filterMinmaxSingleComponentFormats(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_filterMinmaxSingleComponentFormats.set(segment, 0L, index, value); } + /// Sets `filterMinmaxSingleComponentFormats` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_filterMinmaxSingleComponentFormats(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_filterMinmaxSingleComponentFormats(segment, 0L, value); } + /// Sets `filterMinmaxSingleComponentFormats` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties filterMinmaxSingleComponentFormatsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_filterMinmaxSingleComponentFormats(this.segment(), index, value); return this; } + /// Sets `filterMinmaxSingleComponentFormats` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties filterMinmaxSingleComponentFormats(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_filterMinmaxSingleComponentFormats(this.segment(), value); return this; } + + /// {@return `filterMinmaxImageComponentMapping` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_filterMinmaxImageComponentMapping(MemorySegment segment, long index) { return (int) VH_filterMinmaxImageComponentMapping.get(segment, 0L, index); } + /// {@return `filterMinmaxImageComponentMapping`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_filterMinmaxImageComponentMapping(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_filterMinmaxImageComponentMapping(segment, 0L); } + /// {@return `filterMinmaxImageComponentMapping` at the given index} + /// @param index the index + public @CType("VkBool32") int filterMinmaxImageComponentMappingAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_filterMinmaxImageComponentMapping(this.segment(), index); } + /// {@return `filterMinmaxImageComponentMapping`} + public @CType("VkBool32") int filterMinmaxImageComponentMapping() { return VkPhysicalDeviceVulkan12Properties.get_filterMinmaxImageComponentMapping(this.segment()); } + /// Sets `filterMinmaxImageComponentMapping` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_filterMinmaxImageComponentMapping(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_filterMinmaxImageComponentMapping.set(segment, 0L, index, value); } + /// Sets `filterMinmaxImageComponentMapping` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_filterMinmaxImageComponentMapping(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_filterMinmaxImageComponentMapping(segment, 0L, value); } + /// Sets `filterMinmaxImageComponentMapping` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties filterMinmaxImageComponentMappingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_filterMinmaxImageComponentMapping(this.segment(), index, value); return this; } + /// Sets `filterMinmaxImageComponentMapping` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties filterMinmaxImageComponentMapping(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan12Properties.set_filterMinmaxImageComponentMapping(this.segment(), value); return this; } + + /// {@return `maxTimelineSemaphoreValueDifference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_maxTimelineSemaphoreValueDifference(MemorySegment segment, long index) { return (long) VH_maxTimelineSemaphoreValueDifference.get(segment, 0L, index); } + /// {@return `maxTimelineSemaphoreValueDifference`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_maxTimelineSemaphoreValueDifference(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_maxTimelineSemaphoreValueDifference(segment, 0L); } + /// {@return `maxTimelineSemaphoreValueDifference` at the given index} + /// @param index the index + public @CType("uint64_t") long maxTimelineSemaphoreValueDifferenceAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_maxTimelineSemaphoreValueDifference(this.segment(), index); } + /// {@return `maxTimelineSemaphoreValueDifference`} + public @CType("uint64_t") long maxTimelineSemaphoreValueDifference() { return VkPhysicalDeviceVulkan12Properties.get_maxTimelineSemaphoreValueDifference(this.segment()); } + /// Sets `maxTimelineSemaphoreValueDifference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxTimelineSemaphoreValueDifference(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_maxTimelineSemaphoreValueDifference.set(segment, 0L, index, value); } + /// Sets `maxTimelineSemaphoreValueDifference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxTimelineSemaphoreValueDifference(MemorySegment segment, @CType("uint64_t") long value) { VkPhysicalDeviceVulkan12Properties.set_maxTimelineSemaphoreValueDifference(segment, 0L, value); } + /// Sets `maxTimelineSemaphoreValueDifference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxTimelineSemaphoreValueDifferenceAt(long index, @CType("uint64_t") long value) { VkPhysicalDeviceVulkan12Properties.set_maxTimelineSemaphoreValueDifference(this.segment(), index, value); return this; } + /// Sets `maxTimelineSemaphoreValueDifference` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties maxTimelineSemaphoreValueDifference(@CType("uint64_t") long value) { VkPhysicalDeviceVulkan12Properties.set_maxTimelineSemaphoreValueDifference(this.segment(), value); return this; } + + /// {@return `framebufferIntegerColorSampleCounts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlags") int get_framebufferIntegerColorSampleCounts(MemorySegment segment, long index) { return (int) VH_framebufferIntegerColorSampleCounts.get(segment, 0L, index); } + /// {@return `framebufferIntegerColorSampleCounts`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlags") int get_framebufferIntegerColorSampleCounts(MemorySegment segment) { return VkPhysicalDeviceVulkan12Properties.get_framebufferIntegerColorSampleCounts(segment, 0L); } + /// {@return `framebufferIntegerColorSampleCounts` at the given index} + /// @param index the index + public @CType("VkSampleCountFlags") int framebufferIntegerColorSampleCountsAt(long index) { return VkPhysicalDeviceVulkan12Properties.get_framebufferIntegerColorSampleCounts(this.segment(), index); } + /// {@return `framebufferIntegerColorSampleCounts`} + public @CType("VkSampleCountFlags") int framebufferIntegerColorSampleCounts() { return VkPhysicalDeviceVulkan12Properties.get_framebufferIntegerColorSampleCounts(this.segment()); } + /// Sets `framebufferIntegerColorSampleCounts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_framebufferIntegerColorSampleCounts(MemorySegment segment, long index, @CType("VkSampleCountFlags") int value) { VH_framebufferIntegerColorSampleCounts.set(segment, 0L, index, value); } + /// Sets `framebufferIntegerColorSampleCounts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_framebufferIntegerColorSampleCounts(MemorySegment segment, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceVulkan12Properties.set_framebufferIntegerColorSampleCounts(segment, 0L, value); } + /// Sets `framebufferIntegerColorSampleCounts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties framebufferIntegerColorSampleCountsAt(long index, @CType("VkSampleCountFlags") int value) { VkPhysicalDeviceVulkan12Properties.set_framebufferIntegerColorSampleCounts(this.segment(), index, value); return this; } + /// Sets `framebufferIntegerColorSampleCounts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan12Properties framebufferIntegerColorSampleCounts(@CType("VkSampleCountFlags") int value) { VkPhysicalDeviceVulkan12Properties.set_framebufferIntegerColorSampleCounts(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan13Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan13Features.java new file mode 100644 index 00000000..72dd1dea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan13Features.java @@ -0,0 +1,703 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### robustImageAccess +/// [VarHandle][#VH_robustImageAccess] - [Getter][#robustImageAccess()] - [Setter][#robustImageAccess(int)] +/// ### inlineUniformBlock +/// [VarHandle][#VH_inlineUniformBlock] - [Getter][#inlineUniformBlock()] - [Setter][#inlineUniformBlock(int)] +/// ### descriptorBindingInlineUniformBlockUpdateAfterBind +/// [VarHandle][#VH_descriptorBindingInlineUniformBlockUpdateAfterBind] - [Getter][#descriptorBindingInlineUniformBlockUpdateAfterBind()] - [Setter][#descriptorBindingInlineUniformBlockUpdateAfterBind(int)] +/// ### pipelineCreationCacheControl +/// [VarHandle][#VH_pipelineCreationCacheControl] - [Getter][#pipelineCreationCacheControl()] - [Setter][#pipelineCreationCacheControl(int)] +/// ### privateData +/// [VarHandle][#VH_privateData] - [Getter][#privateData()] - [Setter][#privateData(int)] +/// ### shaderDemoteToHelperInvocation +/// [VarHandle][#VH_shaderDemoteToHelperInvocation] - [Getter][#shaderDemoteToHelperInvocation()] - [Setter][#shaderDemoteToHelperInvocation(int)] +/// ### shaderTerminateInvocation +/// [VarHandle][#VH_shaderTerminateInvocation] - [Getter][#shaderTerminateInvocation()] - [Setter][#shaderTerminateInvocation(int)] +/// ### subgroupSizeControl +/// [VarHandle][#VH_subgroupSizeControl] - [Getter][#subgroupSizeControl()] - [Setter][#subgroupSizeControl(int)] +/// ### computeFullSubgroups +/// [VarHandle][#VH_computeFullSubgroups] - [Getter][#computeFullSubgroups()] - [Setter][#computeFullSubgroups(int)] +/// ### synchronization2 +/// [VarHandle][#VH_synchronization2] - [Getter][#synchronization2()] - [Setter][#synchronization2(int)] +/// ### textureCompressionASTC_HDR +/// [VarHandle][#VH_textureCompressionASTC_HDR] - [Getter][#textureCompressionASTC_HDR()] - [Setter][#textureCompressionASTC_HDR(int)] +/// ### shaderZeroInitializeWorkgroupMemory +/// [VarHandle][#VH_shaderZeroInitializeWorkgroupMemory] - [Getter][#shaderZeroInitializeWorkgroupMemory()] - [Setter][#shaderZeroInitializeWorkgroupMemory(int)] +/// ### dynamicRendering +/// [VarHandle][#VH_dynamicRendering] - [Getter][#dynamicRendering()] - [Setter][#dynamicRendering(int)] +/// ### shaderIntegerDotProduct +/// [VarHandle][#VH_shaderIntegerDotProduct] - [Getter][#shaderIntegerDotProduct()] - [Setter][#shaderIntegerDotProduct(int)] +/// ### maintenance4 +/// [VarHandle][#VH_maintenance4] - [Getter][#maintenance4()] - [Setter][#maintenance4(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkan13Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 robustImageAccess; +/// VkBool32 inlineUniformBlock; +/// VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind; +/// VkBool32 pipelineCreationCacheControl; +/// VkBool32 privateData; +/// VkBool32 shaderDemoteToHelperInvocation; +/// VkBool32 shaderTerminateInvocation; +/// VkBool32 subgroupSizeControl; +/// VkBool32 computeFullSubgroups; +/// VkBool32 synchronization2; +/// VkBool32 textureCompressionASTC_HDR; +/// VkBool32 shaderZeroInitializeWorkgroupMemory; +/// VkBool32 dynamicRendering; +/// VkBool32 shaderIntegerDotProduct; +/// VkBool32 maintenance4; +/// } VkPhysicalDeviceVulkan13Features; +/// ``` +public final class VkPhysicalDeviceVulkan13Features extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkan13Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("robustImageAccess"), + ValueLayout.JAVA_INT.withName("inlineUniformBlock"), + ValueLayout.JAVA_INT.withName("descriptorBindingInlineUniformBlockUpdateAfterBind"), + ValueLayout.JAVA_INT.withName("pipelineCreationCacheControl"), + ValueLayout.JAVA_INT.withName("privateData"), + ValueLayout.JAVA_INT.withName("shaderDemoteToHelperInvocation"), + ValueLayout.JAVA_INT.withName("shaderTerminateInvocation"), + ValueLayout.JAVA_INT.withName("subgroupSizeControl"), + ValueLayout.JAVA_INT.withName("computeFullSubgroups"), + ValueLayout.JAVA_INT.withName("synchronization2"), + ValueLayout.JAVA_INT.withName("textureCompressionASTC_HDR"), + ValueLayout.JAVA_INT.withName("shaderZeroInitializeWorkgroupMemory"), + ValueLayout.JAVA_INT.withName("dynamicRendering"), + ValueLayout.JAVA_INT.withName("shaderIntegerDotProduct"), + ValueLayout.JAVA_INT.withName("maintenance4") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `robustImageAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_robustImageAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("robustImageAccess")); + /// The [VarHandle] of `inlineUniformBlock` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inlineUniformBlock = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inlineUniformBlock")); + /// The [VarHandle] of `descriptorBindingInlineUniformBlockUpdateAfterBind` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorBindingInlineUniformBlockUpdateAfterBind = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorBindingInlineUniformBlockUpdateAfterBind")); + /// The [VarHandle] of `pipelineCreationCacheControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineCreationCacheControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineCreationCacheControl")); + /// The [VarHandle] of `privateData` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_privateData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("privateData")); + /// The [VarHandle] of `shaderDemoteToHelperInvocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderDemoteToHelperInvocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderDemoteToHelperInvocation")); + /// The [VarHandle] of `shaderTerminateInvocation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderTerminateInvocation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderTerminateInvocation")); + /// The [VarHandle] of `subgroupSizeControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subgroupSizeControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subgroupSizeControl")); + /// The [VarHandle] of `computeFullSubgroups` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_computeFullSubgroups = LAYOUT.arrayElementVarHandle(PathElement.groupElement("computeFullSubgroups")); + /// The [VarHandle] of `synchronization2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_synchronization2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("synchronization2")); + /// The [VarHandle] of `textureCompressionASTC_HDR` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_textureCompressionASTC_HDR = LAYOUT.arrayElementVarHandle(PathElement.groupElement("textureCompressionASTC_HDR")); + /// The [VarHandle] of `shaderZeroInitializeWorkgroupMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderZeroInitializeWorkgroupMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderZeroInitializeWorkgroupMemory")); + /// The [VarHandle] of `dynamicRendering` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicRendering = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicRendering")); + /// The [VarHandle] of `shaderIntegerDotProduct` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderIntegerDotProduct = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderIntegerDotProduct")); + /// The [VarHandle] of `maintenance4` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maintenance4 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maintenance4")); + + /// Creates `VkPhysicalDeviceVulkan13Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkan13Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkan13Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan13Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan13Features(segment); } + + /// Creates `VkPhysicalDeviceVulkan13Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan13Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan13Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkan13Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan13Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan13Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkan13Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkan13Features` + public static VkPhysicalDeviceVulkan13Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkan13Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkan13Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkan13Features` + public static VkPhysicalDeviceVulkan13Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkan13Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkan13Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkan13Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan13Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan13Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkan13Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkan13Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkan13Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan13Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan13Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan13Features.set_pNext(this.segment(), value); return this; } + + /// {@return `robustImageAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_robustImageAccess(MemorySegment segment, long index) { return (int) VH_robustImageAccess.get(segment, 0L, index); } + /// {@return `robustImageAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_robustImageAccess(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_robustImageAccess(segment, 0L); } + /// {@return `robustImageAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int robustImageAccessAt(long index) { return VkPhysicalDeviceVulkan13Features.get_robustImageAccess(this.segment(), index); } + /// {@return `robustImageAccess`} + public @CType("VkBool32") int robustImageAccess() { return VkPhysicalDeviceVulkan13Features.get_robustImageAccess(this.segment()); } + /// Sets `robustImageAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_robustImageAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_robustImageAccess.set(segment, 0L, index, value); } + /// Sets `robustImageAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_robustImageAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_robustImageAccess(segment, 0L, value); } + /// Sets `robustImageAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features robustImageAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_robustImageAccess(this.segment(), index, value); return this; } + /// Sets `robustImageAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features robustImageAccess(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_robustImageAccess(this.segment(), value); return this; } + + /// {@return `inlineUniformBlock` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_inlineUniformBlock(MemorySegment segment, long index) { return (int) VH_inlineUniformBlock.get(segment, 0L, index); } + /// {@return `inlineUniformBlock`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_inlineUniformBlock(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_inlineUniformBlock(segment, 0L); } + /// {@return `inlineUniformBlock` at the given index} + /// @param index the index + public @CType("VkBool32") int inlineUniformBlockAt(long index) { return VkPhysicalDeviceVulkan13Features.get_inlineUniformBlock(this.segment(), index); } + /// {@return `inlineUniformBlock`} + public @CType("VkBool32") int inlineUniformBlock() { return VkPhysicalDeviceVulkan13Features.get_inlineUniformBlock(this.segment()); } + /// Sets `inlineUniformBlock` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inlineUniformBlock(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_inlineUniformBlock.set(segment, 0L, index, value); } + /// Sets `inlineUniformBlock` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inlineUniformBlock(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_inlineUniformBlock(segment, 0L, value); } + /// Sets `inlineUniformBlock` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features inlineUniformBlockAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_inlineUniformBlock(this.segment(), index, value); return this; } + /// Sets `inlineUniformBlock` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features inlineUniformBlock(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_inlineUniformBlock(this.segment(), value); return this; } + + /// {@return `descriptorBindingInlineUniformBlockUpdateAfterBind` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorBindingInlineUniformBlockUpdateAfterBind(MemorySegment segment, long index) { return (int) VH_descriptorBindingInlineUniformBlockUpdateAfterBind.get(segment, 0L, index); } + /// {@return `descriptorBindingInlineUniformBlockUpdateAfterBind`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorBindingInlineUniformBlockUpdateAfterBind(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_descriptorBindingInlineUniformBlockUpdateAfterBind(segment, 0L); } + /// {@return `descriptorBindingInlineUniformBlockUpdateAfterBind` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorBindingInlineUniformBlockUpdateAfterBindAt(long index) { return VkPhysicalDeviceVulkan13Features.get_descriptorBindingInlineUniformBlockUpdateAfterBind(this.segment(), index); } + /// {@return `descriptorBindingInlineUniformBlockUpdateAfterBind`} + public @CType("VkBool32") int descriptorBindingInlineUniformBlockUpdateAfterBind() { return VkPhysicalDeviceVulkan13Features.get_descriptorBindingInlineUniformBlockUpdateAfterBind(this.segment()); } + /// Sets `descriptorBindingInlineUniformBlockUpdateAfterBind` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorBindingInlineUniformBlockUpdateAfterBind(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorBindingInlineUniformBlockUpdateAfterBind.set(segment, 0L, index, value); } + /// Sets `descriptorBindingInlineUniformBlockUpdateAfterBind` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorBindingInlineUniformBlockUpdateAfterBind(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_descriptorBindingInlineUniformBlockUpdateAfterBind(segment, 0L, value); } + /// Sets `descriptorBindingInlineUniformBlockUpdateAfterBind` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features descriptorBindingInlineUniformBlockUpdateAfterBindAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_descriptorBindingInlineUniformBlockUpdateAfterBind(this.segment(), index, value); return this; } + /// Sets `descriptorBindingInlineUniformBlockUpdateAfterBind` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features descriptorBindingInlineUniformBlockUpdateAfterBind(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_descriptorBindingInlineUniformBlockUpdateAfterBind(this.segment(), value); return this; } + + /// {@return `pipelineCreationCacheControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineCreationCacheControl(MemorySegment segment, long index) { return (int) VH_pipelineCreationCacheControl.get(segment, 0L, index); } + /// {@return `pipelineCreationCacheControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineCreationCacheControl(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_pipelineCreationCacheControl(segment, 0L); } + /// {@return `pipelineCreationCacheControl` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineCreationCacheControlAt(long index) { return VkPhysicalDeviceVulkan13Features.get_pipelineCreationCacheControl(this.segment(), index); } + /// {@return `pipelineCreationCacheControl`} + public @CType("VkBool32") int pipelineCreationCacheControl() { return VkPhysicalDeviceVulkan13Features.get_pipelineCreationCacheControl(this.segment()); } + /// Sets `pipelineCreationCacheControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineCreationCacheControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineCreationCacheControl.set(segment, 0L, index, value); } + /// Sets `pipelineCreationCacheControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineCreationCacheControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_pipelineCreationCacheControl(segment, 0L, value); } + /// Sets `pipelineCreationCacheControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features pipelineCreationCacheControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_pipelineCreationCacheControl(this.segment(), index, value); return this; } + /// Sets `pipelineCreationCacheControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features pipelineCreationCacheControl(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_pipelineCreationCacheControl(this.segment(), value); return this; } + + /// {@return `privateData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_privateData(MemorySegment segment, long index) { return (int) VH_privateData.get(segment, 0L, index); } + /// {@return `privateData`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_privateData(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_privateData(segment, 0L); } + /// {@return `privateData` at the given index} + /// @param index the index + public @CType("VkBool32") int privateDataAt(long index) { return VkPhysicalDeviceVulkan13Features.get_privateData(this.segment(), index); } + /// {@return `privateData`} + public @CType("VkBool32") int privateData() { return VkPhysicalDeviceVulkan13Features.get_privateData(this.segment()); } + /// Sets `privateData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_privateData(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_privateData.set(segment, 0L, index, value); } + /// Sets `privateData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_privateData(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_privateData(segment, 0L, value); } + /// Sets `privateData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features privateDataAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_privateData(this.segment(), index, value); return this; } + /// Sets `privateData` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features privateData(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_privateData(this.segment(), value); return this; } + + /// {@return `shaderDemoteToHelperInvocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderDemoteToHelperInvocation(MemorySegment segment, long index) { return (int) VH_shaderDemoteToHelperInvocation.get(segment, 0L, index); } + /// {@return `shaderDemoteToHelperInvocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderDemoteToHelperInvocation(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_shaderDemoteToHelperInvocation(segment, 0L); } + /// {@return `shaderDemoteToHelperInvocation` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderDemoteToHelperInvocationAt(long index) { return VkPhysicalDeviceVulkan13Features.get_shaderDemoteToHelperInvocation(this.segment(), index); } + /// {@return `shaderDemoteToHelperInvocation`} + public @CType("VkBool32") int shaderDemoteToHelperInvocation() { return VkPhysicalDeviceVulkan13Features.get_shaderDemoteToHelperInvocation(this.segment()); } + /// Sets `shaderDemoteToHelperInvocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderDemoteToHelperInvocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderDemoteToHelperInvocation.set(segment, 0L, index, value); } + /// Sets `shaderDemoteToHelperInvocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderDemoteToHelperInvocation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderDemoteToHelperInvocation(segment, 0L, value); } + /// Sets `shaderDemoteToHelperInvocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features shaderDemoteToHelperInvocationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderDemoteToHelperInvocation(this.segment(), index, value); return this; } + /// Sets `shaderDemoteToHelperInvocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features shaderDemoteToHelperInvocation(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderDemoteToHelperInvocation(this.segment(), value); return this; } + + /// {@return `shaderTerminateInvocation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderTerminateInvocation(MemorySegment segment, long index) { return (int) VH_shaderTerminateInvocation.get(segment, 0L, index); } + /// {@return `shaderTerminateInvocation`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderTerminateInvocation(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_shaderTerminateInvocation(segment, 0L); } + /// {@return `shaderTerminateInvocation` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderTerminateInvocationAt(long index) { return VkPhysicalDeviceVulkan13Features.get_shaderTerminateInvocation(this.segment(), index); } + /// {@return `shaderTerminateInvocation`} + public @CType("VkBool32") int shaderTerminateInvocation() { return VkPhysicalDeviceVulkan13Features.get_shaderTerminateInvocation(this.segment()); } + /// Sets `shaderTerminateInvocation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderTerminateInvocation(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderTerminateInvocation.set(segment, 0L, index, value); } + /// Sets `shaderTerminateInvocation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderTerminateInvocation(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderTerminateInvocation(segment, 0L, value); } + /// Sets `shaderTerminateInvocation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features shaderTerminateInvocationAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderTerminateInvocation(this.segment(), index, value); return this; } + /// Sets `shaderTerminateInvocation` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features shaderTerminateInvocation(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderTerminateInvocation(this.segment(), value); return this; } + + /// {@return `subgroupSizeControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_subgroupSizeControl(MemorySegment segment, long index) { return (int) VH_subgroupSizeControl.get(segment, 0L, index); } + /// {@return `subgroupSizeControl`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_subgroupSizeControl(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_subgroupSizeControl(segment, 0L); } + /// {@return `subgroupSizeControl` at the given index} + /// @param index the index + public @CType("VkBool32") int subgroupSizeControlAt(long index) { return VkPhysicalDeviceVulkan13Features.get_subgroupSizeControl(this.segment(), index); } + /// {@return `subgroupSizeControl`} + public @CType("VkBool32") int subgroupSizeControl() { return VkPhysicalDeviceVulkan13Features.get_subgroupSizeControl(this.segment()); } + /// Sets `subgroupSizeControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subgroupSizeControl(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_subgroupSizeControl.set(segment, 0L, index, value); } + /// Sets `subgroupSizeControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subgroupSizeControl(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_subgroupSizeControl(segment, 0L, value); } + /// Sets `subgroupSizeControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features subgroupSizeControlAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_subgroupSizeControl(this.segment(), index, value); return this; } + /// Sets `subgroupSizeControl` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features subgroupSizeControl(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_subgroupSizeControl(this.segment(), value); return this; } + + /// {@return `computeFullSubgroups` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_computeFullSubgroups(MemorySegment segment, long index) { return (int) VH_computeFullSubgroups.get(segment, 0L, index); } + /// {@return `computeFullSubgroups`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_computeFullSubgroups(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_computeFullSubgroups(segment, 0L); } + /// {@return `computeFullSubgroups` at the given index} + /// @param index the index + public @CType("VkBool32") int computeFullSubgroupsAt(long index) { return VkPhysicalDeviceVulkan13Features.get_computeFullSubgroups(this.segment(), index); } + /// {@return `computeFullSubgroups`} + public @CType("VkBool32") int computeFullSubgroups() { return VkPhysicalDeviceVulkan13Features.get_computeFullSubgroups(this.segment()); } + /// Sets `computeFullSubgroups` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_computeFullSubgroups(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_computeFullSubgroups.set(segment, 0L, index, value); } + /// Sets `computeFullSubgroups` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_computeFullSubgroups(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_computeFullSubgroups(segment, 0L, value); } + /// Sets `computeFullSubgroups` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features computeFullSubgroupsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_computeFullSubgroups(this.segment(), index, value); return this; } + /// Sets `computeFullSubgroups` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features computeFullSubgroups(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_computeFullSubgroups(this.segment(), value); return this; } + + /// {@return `synchronization2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_synchronization2(MemorySegment segment, long index) { return (int) VH_synchronization2.get(segment, 0L, index); } + /// {@return `synchronization2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_synchronization2(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_synchronization2(segment, 0L); } + /// {@return `synchronization2` at the given index} + /// @param index the index + public @CType("VkBool32") int synchronization2At(long index) { return VkPhysicalDeviceVulkan13Features.get_synchronization2(this.segment(), index); } + /// {@return `synchronization2`} + public @CType("VkBool32") int synchronization2() { return VkPhysicalDeviceVulkan13Features.get_synchronization2(this.segment()); } + /// Sets `synchronization2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_synchronization2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_synchronization2.set(segment, 0L, index, value); } + /// Sets `synchronization2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_synchronization2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_synchronization2(segment, 0L, value); } + /// Sets `synchronization2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features synchronization2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_synchronization2(this.segment(), index, value); return this; } + /// Sets `synchronization2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features synchronization2(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_synchronization2(this.segment(), value); return this; } + + /// {@return `textureCompressionASTC_HDR` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_textureCompressionASTC_HDR(MemorySegment segment, long index) { return (int) VH_textureCompressionASTC_HDR.get(segment, 0L, index); } + /// {@return `textureCompressionASTC_HDR`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_textureCompressionASTC_HDR(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_textureCompressionASTC_HDR(segment, 0L); } + /// {@return `textureCompressionASTC_HDR` at the given index} + /// @param index the index + public @CType("VkBool32") int textureCompressionASTC_HDRAt(long index) { return VkPhysicalDeviceVulkan13Features.get_textureCompressionASTC_HDR(this.segment(), index); } + /// {@return `textureCompressionASTC_HDR`} + public @CType("VkBool32") int textureCompressionASTC_HDR() { return VkPhysicalDeviceVulkan13Features.get_textureCompressionASTC_HDR(this.segment()); } + /// Sets `textureCompressionASTC_HDR` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_textureCompressionASTC_HDR(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_textureCompressionASTC_HDR.set(segment, 0L, index, value); } + /// Sets `textureCompressionASTC_HDR` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_textureCompressionASTC_HDR(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_textureCompressionASTC_HDR(segment, 0L, value); } + /// Sets `textureCompressionASTC_HDR` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features textureCompressionASTC_HDRAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_textureCompressionASTC_HDR(this.segment(), index, value); return this; } + /// Sets `textureCompressionASTC_HDR` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features textureCompressionASTC_HDR(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_textureCompressionASTC_HDR(this.segment(), value); return this; } + + /// {@return `shaderZeroInitializeWorkgroupMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderZeroInitializeWorkgroupMemory(MemorySegment segment, long index) { return (int) VH_shaderZeroInitializeWorkgroupMemory.get(segment, 0L, index); } + /// {@return `shaderZeroInitializeWorkgroupMemory`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderZeroInitializeWorkgroupMemory(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_shaderZeroInitializeWorkgroupMemory(segment, 0L); } + /// {@return `shaderZeroInitializeWorkgroupMemory` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderZeroInitializeWorkgroupMemoryAt(long index) { return VkPhysicalDeviceVulkan13Features.get_shaderZeroInitializeWorkgroupMemory(this.segment(), index); } + /// {@return `shaderZeroInitializeWorkgroupMemory`} + public @CType("VkBool32") int shaderZeroInitializeWorkgroupMemory() { return VkPhysicalDeviceVulkan13Features.get_shaderZeroInitializeWorkgroupMemory(this.segment()); } + /// Sets `shaderZeroInitializeWorkgroupMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderZeroInitializeWorkgroupMemory(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderZeroInitializeWorkgroupMemory.set(segment, 0L, index, value); } + /// Sets `shaderZeroInitializeWorkgroupMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderZeroInitializeWorkgroupMemory(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderZeroInitializeWorkgroupMemory(segment, 0L, value); } + /// Sets `shaderZeroInitializeWorkgroupMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features shaderZeroInitializeWorkgroupMemoryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderZeroInitializeWorkgroupMemory(this.segment(), index, value); return this; } + /// Sets `shaderZeroInitializeWorkgroupMemory` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features shaderZeroInitializeWorkgroupMemory(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderZeroInitializeWorkgroupMemory(this.segment(), value); return this; } + + /// {@return `dynamicRendering` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dynamicRendering(MemorySegment segment, long index) { return (int) VH_dynamicRendering.get(segment, 0L, index); } + /// {@return `dynamicRendering`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dynamicRendering(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_dynamicRendering(segment, 0L); } + /// {@return `dynamicRendering` at the given index} + /// @param index the index + public @CType("VkBool32") int dynamicRenderingAt(long index) { return VkPhysicalDeviceVulkan13Features.get_dynamicRendering(this.segment(), index); } + /// {@return `dynamicRendering`} + public @CType("VkBool32") int dynamicRendering() { return VkPhysicalDeviceVulkan13Features.get_dynamicRendering(this.segment()); } + /// Sets `dynamicRendering` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicRendering(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dynamicRendering.set(segment, 0L, index, value); } + /// Sets `dynamicRendering` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicRendering(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_dynamicRendering(segment, 0L, value); } + /// Sets `dynamicRendering` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features dynamicRenderingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_dynamicRendering(this.segment(), index, value); return this; } + /// Sets `dynamicRendering` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features dynamicRendering(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_dynamicRendering(this.segment(), value); return this; } + + /// {@return `shaderIntegerDotProduct` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderIntegerDotProduct(MemorySegment segment, long index) { return (int) VH_shaderIntegerDotProduct.get(segment, 0L, index); } + /// {@return `shaderIntegerDotProduct`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderIntegerDotProduct(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_shaderIntegerDotProduct(segment, 0L); } + /// {@return `shaderIntegerDotProduct` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderIntegerDotProductAt(long index) { return VkPhysicalDeviceVulkan13Features.get_shaderIntegerDotProduct(this.segment(), index); } + /// {@return `shaderIntegerDotProduct`} + public @CType("VkBool32") int shaderIntegerDotProduct() { return VkPhysicalDeviceVulkan13Features.get_shaderIntegerDotProduct(this.segment()); } + /// Sets `shaderIntegerDotProduct` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderIntegerDotProduct(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderIntegerDotProduct.set(segment, 0L, index, value); } + /// Sets `shaderIntegerDotProduct` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderIntegerDotProduct(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderIntegerDotProduct(segment, 0L, value); } + /// Sets `shaderIntegerDotProduct` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features shaderIntegerDotProductAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderIntegerDotProduct(this.segment(), index, value); return this; } + /// Sets `shaderIntegerDotProduct` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features shaderIntegerDotProduct(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_shaderIntegerDotProduct(this.segment(), value); return this; } + + /// {@return `maintenance4` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_maintenance4(MemorySegment segment, long index) { return (int) VH_maintenance4.get(segment, 0L, index); } + /// {@return `maintenance4`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_maintenance4(MemorySegment segment) { return VkPhysicalDeviceVulkan13Features.get_maintenance4(segment, 0L); } + /// {@return `maintenance4` at the given index} + /// @param index the index + public @CType("VkBool32") int maintenance4At(long index) { return VkPhysicalDeviceVulkan13Features.get_maintenance4(this.segment(), index); } + /// {@return `maintenance4`} + public @CType("VkBool32") int maintenance4() { return VkPhysicalDeviceVulkan13Features.get_maintenance4(this.segment()); } + /// Sets `maintenance4` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maintenance4(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_maintenance4.set(segment, 0L, index, value); } + /// Sets `maintenance4` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maintenance4(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_maintenance4(segment, 0L, value); } + /// Sets `maintenance4` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features maintenance4At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_maintenance4(this.segment(), index, value); return this; } + /// Sets `maintenance4` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Features maintenance4(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Features.set_maintenance4(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan13Properties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan13Properties.java new file mode 100644 index 00000000..30b7adbd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan13Properties.java @@ -0,0 +1,1813 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### minSubgroupSize +/// [VarHandle][#VH_minSubgroupSize] - [Getter][#minSubgroupSize()] - [Setter][#minSubgroupSize(int)] +/// ### maxSubgroupSize +/// [VarHandle][#VH_maxSubgroupSize] - [Getter][#maxSubgroupSize()] - [Setter][#maxSubgroupSize(int)] +/// ### maxComputeWorkgroupSubgroups +/// [VarHandle][#VH_maxComputeWorkgroupSubgroups] - [Getter][#maxComputeWorkgroupSubgroups()] - [Setter][#maxComputeWorkgroupSubgroups(int)] +/// ### requiredSubgroupSizeStages +/// [VarHandle][#VH_requiredSubgroupSizeStages] - [Getter][#requiredSubgroupSizeStages()] - [Setter][#requiredSubgroupSizeStages(int)] +/// ### maxInlineUniformBlockSize +/// [VarHandle][#VH_maxInlineUniformBlockSize] - [Getter][#maxInlineUniformBlockSize()] - [Setter][#maxInlineUniformBlockSize(int)] +/// ### maxPerStageDescriptorInlineUniformBlocks +/// [VarHandle][#VH_maxPerStageDescriptorInlineUniformBlocks] - [Getter][#maxPerStageDescriptorInlineUniformBlocks()] - [Setter][#maxPerStageDescriptorInlineUniformBlocks(int)] +/// ### maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks +/// [VarHandle][#VH_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks] - [Getter][#maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks()] - [Setter][#maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(int)] +/// ### maxDescriptorSetInlineUniformBlocks +/// [VarHandle][#VH_maxDescriptorSetInlineUniformBlocks] - [Getter][#maxDescriptorSetInlineUniformBlocks()] - [Setter][#maxDescriptorSetInlineUniformBlocks(int)] +/// ### maxDescriptorSetUpdateAfterBindInlineUniformBlocks +/// [VarHandle][#VH_maxDescriptorSetUpdateAfterBindInlineUniformBlocks] - [Getter][#maxDescriptorSetUpdateAfterBindInlineUniformBlocks()] - [Setter][#maxDescriptorSetUpdateAfterBindInlineUniformBlocks(int)] +/// ### maxInlineUniformTotalSize +/// [VarHandle][#VH_maxInlineUniformTotalSize] - [Getter][#maxInlineUniformTotalSize()] - [Setter][#maxInlineUniformTotalSize(int)] +/// ### integerDotProduct8BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProduct8BitUnsignedAccelerated] - [Getter][#integerDotProduct8BitUnsignedAccelerated()] - [Setter][#integerDotProduct8BitUnsignedAccelerated(int)] +/// ### integerDotProduct8BitSignedAccelerated +/// [VarHandle][#VH_integerDotProduct8BitSignedAccelerated] - [Getter][#integerDotProduct8BitSignedAccelerated()] - [Setter][#integerDotProduct8BitSignedAccelerated(int)] +/// ### integerDotProduct8BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProduct8BitMixedSignednessAccelerated] - [Getter][#integerDotProduct8BitMixedSignednessAccelerated()] - [Setter][#integerDotProduct8BitMixedSignednessAccelerated(int)] +/// ### integerDotProduct4x8BitPackedUnsignedAccelerated +/// [VarHandle][#VH_integerDotProduct4x8BitPackedUnsignedAccelerated] - [Getter][#integerDotProduct4x8BitPackedUnsignedAccelerated()] - [Setter][#integerDotProduct4x8BitPackedUnsignedAccelerated(int)] +/// ### integerDotProduct4x8BitPackedSignedAccelerated +/// [VarHandle][#VH_integerDotProduct4x8BitPackedSignedAccelerated] - [Getter][#integerDotProduct4x8BitPackedSignedAccelerated()] - [Setter][#integerDotProduct4x8BitPackedSignedAccelerated(int)] +/// ### integerDotProduct4x8BitPackedMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProduct4x8BitPackedMixedSignednessAccelerated] - [Getter][#integerDotProduct4x8BitPackedMixedSignednessAccelerated()] - [Setter][#integerDotProduct4x8BitPackedMixedSignednessAccelerated(int)] +/// ### integerDotProduct16BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProduct16BitUnsignedAccelerated] - [Getter][#integerDotProduct16BitUnsignedAccelerated()] - [Setter][#integerDotProduct16BitUnsignedAccelerated(int)] +/// ### integerDotProduct16BitSignedAccelerated +/// [VarHandle][#VH_integerDotProduct16BitSignedAccelerated] - [Getter][#integerDotProduct16BitSignedAccelerated()] - [Setter][#integerDotProduct16BitSignedAccelerated(int)] +/// ### integerDotProduct16BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProduct16BitMixedSignednessAccelerated] - [Getter][#integerDotProduct16BitMixedSignednessAccelerated()] - [Setter][#integerDotProduct16BitMixedSignednessAccelerated(int)] +/// ### integerDotProduct32BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProduct32BitUnsignedAccelerated] - [Getter][#integerDotProduct32BitUnsignedAccelerated()] - [Setter][#integerDotProduct32BitUnsignedAccelerated(int)] +/// ### integerDotProduct32BitSignedAccelerated +/// [VarHandle][#VH_integerDotProduct32BitSignedAccelerated] - [Getter][#integerDotProduct32BitSignedAccelerated()] - [Setter][#integerDotProduct32BitSignedAccelerated(int)] +/// ### integerDotProduct32BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProduct32BitMixedSignednessAccelerated] - [Getter][#integerDotProduct32BitMixedSignednessAccelerated()] - [Setter][#integerDotProduct32BitMixedSignednessAccelerated(int)] +/// ### integerDotProduct64BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProduct64BitUnsignedAccelerated] - [Getter][#integerDotProduct64BitUnsignedAccelerated()] - [Setter][#integerDotProduct64BitUnsignedAccelerated(int)] +/// ### integerDotProduct64BitSignedAccelerated +/// [VarHandle][#VH_integerDotProduct64BitSignedAccelerated] - [Getter][#integerDotProduct64BitSignedAccelerated()] - [Setter][#integerDotProduct64BitSignedAccelerated(int)] +/// ### integerDotProduct64BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProduct64BitMixedSignednessAccelerated] - [Getter][#integerDotProduct64BitMixedSignednessAccelerated()] - [Setter][#integerDotProduct64BitMixedSignednessAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating8BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating8BitUnsignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating8BitSignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating8BitSignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating8BitSignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating8BitSignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated] - [Getter][#integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated] - [Getter][#integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating16BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating16BitUnsignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating16BitSignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating16BitSignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating16BitSignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating16BitSignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated] - [Getter][#integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating32BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating32BitUnsignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating32BitSignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating32BitSignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating32BitSignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating32BitSignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated] - [Getter][#integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating64BitUnsignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating64BitUnsignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating64BitSignedAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating64BitSignedAccelerated] - [Getter][#integerDotProductAccumulatingSaturating64BitSignedAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating64BitSignedAccelerated(int)] +/// ### integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated +/// [VarHandle][#VH_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated] - [Getter][#integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated()] - [Setter][#integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(int)] +/// ### storageTexelBufferOffsetAlignmentBytes +/// [VarHandle][#VH_storageTexelBufferOffsetAlignmentBytes] - [Getter][#storageTexelBufferOffsetAlignmentBytes()] - [Setter][#storageTexelBufferOffsetAlignmentBytes(long)] +/// ### storageTexelBufferOffsetSingleTexelAlignment +/// [VarHandle][#VH_storageTexelBufferOffsetSingleTexelAlignment] - [Getter][#storageTexelBufferOffsetSingleTexelAlignment()] - [Setter][#storageTexelBufferOffsetSingleTexelAlignment(int)] +/// ### uniformTexelBufferOffsetAlignmentBytes +/// [VarHandle][#VH_uniformTexelBufferOffsetAlignmentBytes] - [Getter][#uniformTexelBufferOffsetAlignmentBytes()] - [Setter][#uniformTexelBufferOffsetAlignmentBytes(long)] +/// ### uniformTexelBufferOffsetSingleTexelAlignment +/// [VarHandle][#VH_uniformTexelBufferOffsetSingleTexelAlignment] - [Getter][#uniformTexelBufferOffsetSingleTexelAlignment()] - [Setter][#uniformTexelBufferOffsetSingleTexelAlignment(int)] +/// ### maxBufferSize +/// [VarHandle][#VH_maxBufferSize] - [Getter][#maxBufferSize()] - [Setter][#maxBufferSize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkan13Properties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t minSubgroupSize; +/// uint32_t maxSubgroupSize; +/// uint32_t maxComputeWorkgroupSubgroups; +/// VkShaderStageFlags requiredSubgroupSizeStages; +/// uint32_t maxInlineUniformBlockSize; +/// uint32_t maxPerStageDescriptorInlineUniformBlocks; +/// uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; +/// uint32_t maxDescriptorSetInlineUniformBlocks; +/// uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks; +/// uint32_t maxInlineUniformTotalSize; +/// VkBool32 integerDotProduct8BitUnsignedAccelerated; +/// VkBool32 integerDotProduct8BitSignedAccelerated; +/// VkBool32 integerDotProduct8BitMixedSignednessAccelerated; +/// VkBool32 integerDotProduct4x8BitPackedUnsignedAccelerated; +/// VkBool32 integerDotProduct4x8BitPackedSignedAccelerated; +/// VkBool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated; +/// VkBool32 integerDotProduct16BitUnsignedAccelerated; +/// VkBool32 integerDotProduct16BitSignedAccelerated; +/// VkBool32 integerDotProduct16BitMixedSignednessAccelerated; +/// VkBool32 integerDotProduct32BitUnsignedAccelerated; +/// VkBool32 integerDotProduct32BitSignedAccelerated; +/// VkBool32 integerDotProduct32BitMixedSignednessAccelerated; +/// VkBool32 integerDotProduct64BitUnsignedAccelerated; +/// VkBool32 integerDotProduct64BitSignedAccelerated; +/// VkBool32 integerDotProduct64BitMixedSignednessAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated; +/// VkBool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; +/// VkDeviceSize storageTexelBufferOffsetAlignmentBytes; +/// VkBool32 storageTexelBufferOffsetSingleTexelAlignment; +/// VkDeviceSize uniformTexelBufferOffsetAlignmentBytes; +/// VkBool32 uniformTexelBufferOffsetSingleTexelAlignment; +/// VkDeviceSize maxBufferSize; +/// } VkPhysicalDeviceVulkan13Properties; +/// ``` +public final class VkPhysicalDeviceVulkan13Properties extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkan13Properties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("minSubgroupSize"), + ValueLayout.JAVA_INT.withName("maxSubgroupSize"), + ValueLayout.JAVA_INT.withName("maxComputeWorkgroupSubgroups"), + ValueLayout.JAVA_INT.withName("requiredSubgroupSizeStages"), + ValueLayout.JAVA_INT.withName("maxInlineUniformBlockSize"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorInlineUniformBlocks"), + ValueLayout.JAVA_INT.withName("maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetInlineUniformBlocks"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetUpdateAfterBindInlineUniformBlocks"), + ValueLayout.JAVA_INT.withName("maxInlineUniformTotalSize"), + ValueLayout.JAVA_INT.withName("integerDotProduct8BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct8BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct8BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct4x8BitPackedUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct4x8BitPackedSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct4x8BitPackedMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct16BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct16BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct16BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct32BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct32BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct32BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct64BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct64BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProduct64BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating8BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating8BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating16BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating16BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating32BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating32BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating64BitUnsignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating64BitSignedAccelerated"), + ValueLayout.JAVA_INT.withName("integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated"), + ValueLayout.JAVA_LONG.withName("storageTexelBufferOffsetAlignmentBytes"), + ValueLayout.JAVA_INT.withName("storageTexelBufferOffsetSingleTexelAlignment"), + ValueLayout.JAVA_LONG.withName("uniformTexelBufferOffsetAlignmentBytes"), + ValueLayout.JAVA_INT.withName("uniformTexelBufferOffsetSingleTexelAlignment"), + ValueLayout.JAVA_LONG.withName("maxBufferSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `minSubgroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minSubgroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minSubgroupSize")); + /// The [VarHandle] of `maxSubgroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSubgroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSubgroupSize")); + /// The [VarHandle] of `maxComputeWorkgroupSubgroups` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxComputeWorkgroupSubgroups = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxComputeWorkgroupSubgroups")); + /// The [VarHandle] of `requiredSubgroupSizeStages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_requiredSubgroupSizeStages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("requiredSubgroupSizeStages")); + /// The [VarHandle] of `maxInlineUniformBlockSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxInlineUniformBlockSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxInlineUniformBlockSize")); + /// The [VarHandle] of `maxPerStageDescriptorInlineUniformBlocks` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorInlineUniformBlocks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorInlineUniformBlocks")); + /// The [VarHandle] of `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks")); + /// The [VarHandle] of `maxDescriptorSetInlineUniformBlocks` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetInlineUniformBlocks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetInlineUniformBlocks")); + /// The [VarHandle] of `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetUpdateAfterBindInlineUniformBlocks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetUpdateAfterBindInlineUniformBlocks")); + /// The [VarHandle] of `maxInlineUniformTotalSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxInlineUniformTotalSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxInlineUniformTotalSize")); + /// The [VarHandle] of `integerDotProduct8BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct8BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct8BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProduct8BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct8BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct8BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProduct8BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct8BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct8BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProduct4x8BitPackedUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct4x8BitPackedUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct4x8BitPackedUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProduct4x8BitPackedSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct4x8BitPackedSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct4x8BitPackedSignedAccelerated")); + /// The [VarHandle] of `integerDotProduct4x8BitPackedMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct4x8BitPackedMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct4x8BitPackedMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProduct16BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct16BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct16BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProduct16BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct16BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct16BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProduct16BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct16BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct16BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProduct32BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct32BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct32BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProduct32BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct32BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct32BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProduct32BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct32BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct32BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProduct64BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct64BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct64BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProduct64BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct64BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct64BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProduct64BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProduct64BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProduct64BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating8BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating8BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating8BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating8BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating16BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating16BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating16BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating16BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating32BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating32BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating32BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating32BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating64BitUnsignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating64BitSignedAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating64BitSignedAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating64BitSignedAccelerated")); + /// The [VarHandle] of `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = LAYOUT.arrayElementVarHandle(PathElement.groupElement("integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated")); + /// The [VarHandle] of `storageTexelBufferOffsetAlignmentBytes` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_storageTexelBufferOffsetAlignmentBytes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageTexelBufferOffsetAlignmentBytes")); + /// The [VarHandle] of `storageTexelBufferOffsetSingleTexelAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storageTexelBufferOffsetSingleTexelAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageTexelBufferOffsetSingleTexelAlignment")); + /// The [VarHandle] of `uniformTexelBufferOffsetAlignmentBytes` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_uniformTexelBufferOffsetAlignmentBytes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformTexelBufferOffsetAlignmentBytes")); + /// The [VarHandle] of `uniformTexelBufferOffsetSingleTexelAlignment` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniformTexelBufferOffsetSingleTexelAlignment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformTexelBufferOffsetSingleTexelAlignment")); + /// The [VarHandle] of `maxBufferSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxBufferSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxBufferSize")); + + /// Creates `VkPhysicalDeviceVulkan13Properties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkan13Properties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkan13Properties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan13Properties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan13Properties(segment); } + + /// Creates `VkPhysicalDeviceVulkan13Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan13Properties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan13Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkan13Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan13Properties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan13Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkan13Properties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkan13Properties` + public static VkPhysicalDeviceVulkan13Properties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkan13Properties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkan13Properties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkan13Properties` + public static VkPhysicalDeviceVulkan13Properties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkan13Properties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkan13Properties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan13Properties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan13Properties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkan13Properties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkan13Properties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan13Properties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan13Properties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan13Properties.set_pNext(this.segment(), value); return this; } + + /// {@return `minSubgroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_minSubgroupSize(MemorySegment segment, long index) { return (int) VH_minSubgroupSize.get(segment, 0L, index); } + /// {@return `minSubgroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_minSubgroupSize(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_minSubgroupSize(segment, 0L); } + /// {@return `minSubgroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int minSubgroupSizeAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_minSubgroupSize(this.segment(), index); } + /// {@return `minSubgroupSize`} + public @CType("uint32_t") int minSubgroupSize() { return VkPhysicalDeviceVulkan13Properties.get_minSubgroupSize(this.segment()); } + /// Sets `minSubgroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minSubgroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_minSubgroupSize.set(segment, 0L, index, value); } + /// Sets `minSubgroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minSubgroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_minSubgroupSize(segment, 0L, value); } + /// Sets `minSubgroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties minSubgroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_minSubgroupSize(this.segment(), index, value); return this; } + /// Sets `minSubgroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties minSubgroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_minSubgroupSize(this.segment(), value); return this; } + + /// {@return `maxSubgroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSubgroupSize(MemorySegment segment, long index) { return (int) VH_maxSubgroupSize.get(segment, 0L, index); } + /// {@return `maxSubgroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSubgroupSize(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_maxSubgroupSize(segment, 0L); } + /// {@return `maxSubgroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSubgroupSizeAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_maxSubgroupSize(this.segment(), index); } + /// {@return `maxSubgroupSize`} + public @CType("uint32_t") int maxSubgroupSize() { return VkPhysicalDeviceVulkan13Properties.get_maxSubgroupSize(this.segment()); } + /// Sets `maxSubgroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSubgroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSubgroupSize.set(segment, 0L, index, value); } + /// Sets `maxSubgroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSubgroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxSubgroupSize(segment, 0L, value); } + /// Sets `maxSubgroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxSubgroupSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxSubgroupSize(this.segment(), index, value); return this; } + /// Sets `maxSubgroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxSubgroupSize(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxSubgroupSize(this.segment(), value); return this; } + + /// {@return `maxComputeWorkgroupSubgroups` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxComputeWorkgroupSubgroups(MemorySegment segment, long index) { return (int) VH_maxComputeWorkgroupSubgroups.get(segment, 0L, index); } + /// {@return `maxComputeWorkgroupSubgroups`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxComputeWorkgroupSubgroups(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_maxComputeWorkgroupSubgroups(segment, 0L); } + /// {@return `maxComputeWorkgroupSubgroups` at the given index} + /// @param index the index + public @CType("uint32_t") int maxComputeWorkgroupSubgroupsAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_maxComputeWorkgroupSubgroups(this.segment(), index); } + /// {@return `maxComputeWorkgroupSubgroups`} + public @CType("uint32_t") int maxComputeWorkgroupSubgroups() { return VkPhysicalDeviceVulkan13Properties.get_maxComputeWorkgroupSubgroups(this.segment()); } + /// Sets `maxComputeWorkgroupSubgroups` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxComputeWorkgroupSubgroups(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxComputeWorkgroupSubgroups.set(segment, 0L, index, value); } + /// Sets `maxComputeWorkgroupSubgroups` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxComputeWorkgroupSubgroups(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxComputeWorkgroupSubgroups(segment, 0L, value); } + /// Sets `maxComputeWorkgroupSubgroups` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxComputeWorkgroupSubgroupsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxComputeWorkgroupSubgroups(this.segment(), index, value); return this; } + /// Sets `maxComputeWorkgroupSubgroups` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxComputeWorkgroupSubgroups(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxComputeWorkgroupSubgroups(this.segment(), value); return this; } + + /// {@return `requiredSubgroupSizeStages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_requiredSubgroupSizeStages(MemorySegment segment, long index) { return (int) VH_requiredSubgroupSizeStages.get(segment, 0L, index); } + /// {@return `requiredSubgroupSizeStages`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_requiredSubgroupSizeStages(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_requiredSubgroupSizeStages(segment, 0L); } + /// {@return `requiredSubgroupSizeStages` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int requiredSubgroupSizeStagesAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_requiredSubgroupSizeStages(this.segment(), index); } + /// {@return `requiredSubgroupSizeStages`} + public @CType("VkShaderStageFlags") int requiredSubgroupSizeStages() { return VkPhysicalDeviceVulkan13Properties.get_requiredSubgroupSizeStages(this.segment()); } + /// Sets `requiredSubgroupSizeStages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_requiredSubgroupSizeStages(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_requiredSubgroupSizeStages.set(segment, 0L, index, value); } + /// Sets `requiredSubgroupSizeStages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_requiredSubgroupSizeStages(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceVulkan13Properties.set_requiredSubgroupSizeStages(segment, 0L, value); } + /// Sets `requiredSubgroupSizeStages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties requiredSubgroupSizeStagesAt(long index, @CType("VkShaderStageFlags") int value) { VkPhysicalDeviceVulkan13Properties.set_requiredSubgroupSizeStages(this.segment(), index, value); return this; } + /// Sets `requiredSubgroupSizeStages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties requiredSubgroupSizeStages(@CType("VkShaderStageFlags") int value) { VkPhysicalDeviceVulkan13Properties.set_requiredSubgroupSizeStages(this.segment(), value); return this; } + + /// {@return `maxInlineUniformBlockSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxInlineUniformBlockSize(MemorySegment segment, long index) { return (int) VH_maxInlineUniformBlockSize.get(segment, 0L, index); } + /// {@return `maxInlineUniformBlockSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxInlineUniformBlockSize(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_maxInlineUniformBlockSize(segment, 0L); } + /// {@return `maxInlineUniformBlockSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxInlineUniformBlockSizeAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_maxInlineUniformBlockSize(this.segment(), index); } + /// {@return `maxInlineUniformBlockSize`} + public @CType("uint32_t") int maxInlineUniformBlockSize() { return VkPhysicalDeviceVulkan13Properties.get_maxInlineUniformBlockSize(this.segment()); } + /// Sets `maxInlineUniformBlockSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxInlineUniformBlockSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxInlineUniformBlockSize.set(segment, 0L, index, value); } + /// Sets `maxInlineUniformBlockSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxInlineUniformBlockSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxInlineUniformBlockSize(segment, 0L, value); } + /// Sets `maxInlineUniformBlockSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxInlineUniformBlockSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxInlineUniformBlockSize(this.segment(), index, value); return this; } + /// Sets `maxInlineUniformBlockSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxInlineUniformBlockSize(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxInlineUniformBlockSize(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorInlineUniformBlocks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorInlineUniformBlocks(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorInlineUniformBlocks.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorInlineUniformBlocks`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorInlineUniformBlocks(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_maxPerStageDescriptorInlineUniformBlocks(segment, 0L); } + /// {@return `maxPerStageDescriptorInlineUniformBlocks` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorInlineUniformBlocksAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_maxPerStageDescriptorInlineUniformBlocks(this.segment(), index); } + /// {@return `maxPerStageDescriptorInlineUniformBlocks`} + public @CType("uint32_t") int maxPerStageDescriptorInlineUniformBlocks() { return VkPhysicalDeviceVulkan13Properties.get_maxPerStageDescriptorInlineUniformBlocks(this.segment()); } + /// Sets `maxPerStageDescriptorInlineUniformBlocks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorInlineUniformBlocks(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorInlineUniformBlocks.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorInlineUniformBlocks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorInlineUniformBlocks(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxPerStageDescriptorInlineUniformBlocks(segment, 0L, value); } + /// Sets `maxPerStageDescriptorInlineUniformBlocks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxPerStageDescriptorInlineUniformBlocksAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxPerStageDescriptorInlineUniformBlocks(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorInlineUniformBlocks` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxPerStageDescriptorInlineUniformBlocks(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxPerStageDescriptorInlineUniformBlocks(this.segment(), value); return this; } + + /// {@return `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(MemorySegment segment, long index) { return (int) VH_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks.get(segment, 0L, index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(segment, 0L); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindInlineUniformBlocksAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(this.segment(), index); } + /// {@return `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks`} + public @CType("uint32_t") int maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks() { return VkPhysicalDeviceVulkan13Properties.get_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(this.segment()); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks.set(segment, 0L, index, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(segment, 0L, value); } + /// Sets `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxPerStageDescriptorUpdateAfterBindInlineUniformBlocksAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(this.segment(), index, value); return this; } + /// Sets `maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetInlineUniformBlocks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetInlineUniformBlocks(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetInlineUniformBlocks.get(segment, 0L, index); } + /// {@return `maxDescriptorSetInlineUniformBlocks`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetInlineUniformBlocks(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_maxDescriptorSetInlineUniformBlocks(segment, 0L); } + /// {@return `maxDescriptorSetInlineUniformBlocks` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetInlineUniformBlocksAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_maxDescriptorSetInlineUniformBlocks(this.segment(), index); } + /// {@return `maxDescriptorSetInlineUniformBlocks`} + public @CType("uint32_t") int maxDescriptorSetInlineUniformBlocks() { return VkPhysicalDeviceVulkan13Properties.get_maxDescriptorSetInlineUniformBlocks(this.segment()); } + /// Sets `maxDescriptorSetInlineUniformBlocks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetInlineUniformBlocks(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetInlineUniformBlocks.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetInlineUniformBlocks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetInlineUniformBlocks(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxDescriptorSetInlineUniformBlocks(segment, 0L, value); } + /// Sets `maxDescriptorSetInlineUniformBlocks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxDescriptorSetInlineUniformBlocksAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxDescriptorSetInlineUniformBlocks(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetInlineUniformBlocks` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxDescriptorSetInlineUniformBlocks(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxDescriptorSetInlineUniformBlocks(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetUpdateAfterBindInlineUniformBlocks.get(segment, 0L, index); } + /// {@return `maxDescriptorSetUpdateAfterBindInlineUniformBlocks`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(segment, 0L); } + /// {@return `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindInlineUniformBlocksAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(this.segment(), index); } + /// {@return `maxDescriptorSetUpdateAfterBindInlineUniformBlocks`} + public @CType("uint32_t") int maxDescriptorSetUpdateAfterBindInlineUniformBlocks() { return VkPhysicalDeviceVulkan13Properties.get_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(this.segment()); } + /// Sets `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetUpdateAfterBindInlineUniformBlocks.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(segment, 0L, value); } + /// Sets `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxDescriptorSetUpdateAfterBindInlineUniformBlocksAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetUpdateAfterBindInlineUniformBlocks` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxDescriptorSetUpdateAfterBindInlineUniformBlocks(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxDescriptorSetUpdateAfterBindInlineUniformBlocks(this.segment(), value); return this; } + + /// {@return `maxInlineUniformTotalSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxInlineUniformTotalSize(MemorySegment segment, long index) { return (int) VH_maxInlineUniformTotalSize.get(segment, 0L, index); } + /// {@return `maxInlineUniformTotalSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxInlineUniformTotalSize(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_maxInlineUniformTotalSize(segment, 0L); } + /// {@return `maxInlineUniformTotalSize` at the given index} + /// @param index the index + public @CType("uint32_t") int maxInlineUniformTotalSizeAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_maxInlineUniformTotalSize(this.segment(), index); } + /// {@return `maxInlineUniformTotalSize`} + public @CType("uint32_t") int maxInlineUniformTotalSize() { return VkPhysicalDeviceVulkan13Properties.get_maxInlineUniformTotalSize(this.segment()); } + /// Sets `maxInlineUniformTotalSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxInlineUniformTotalSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxInlineUniformTotalSize.set(segment, 0L, index, value); } + /// Sets `maxInlineUniformTotalSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxInlineUniformTotalSize(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxInlineUniformTotalSize(segment, 0L, value); } + /// Sets `maxInlineUniformTotalSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxInlineUniformTotalSizeAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxInlineUniformTotalSize(this.segment(), index, value); return this; } + /// Sets `maxInlineUniformTotalSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxInlineUniformTotalSize(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan13Properties.set_maxInlineUniformTotalSize(this.segment(), value); return this; } + + /// {@return `integerDotProduct8BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct8BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct8BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct8BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct8BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct8BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct8BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct8BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct8BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct8BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProduct8BitUnsignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct8BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProduct8BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct8BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct8BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct8BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct8BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct8BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct8BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct8BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct8BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct8BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct8BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct8BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct8BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct8BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct8BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct8BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct8BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct8BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct8BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct8BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct8BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct8BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProduct8BitSignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct8BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProduct8BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct8BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct8BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct8BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct8BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct8BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct8BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct8BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct8BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct8BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct8BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct8BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct8BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct8BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct8BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct8BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct8BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct8BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProduct8BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct8BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct8BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProduct8BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProduct8BitMixedSignednessAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct8BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProduct8BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct8BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct8BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct8BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct8BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct8BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct8BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct8BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct8BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct8BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct8BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct8BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct4x8BitPackedUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct4x8BitPackedUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct4x8BitPackedUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct4x8BitPackedUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct4x8BitPackedUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct4x8BitPackedUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct4x8BitPackedUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct4x8BitPackedUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProduct4x8BitPackedUnsignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct4x8BitPackedUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProduct4x8BitPackedUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct4x8BitPackedUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct4x8BitPackedUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct4x8BitPackedUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct4x8BitPackedUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct4x8BitPackedUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct4x8BitPackedUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct4x8BitPackedUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct4x8BitPackedUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct4x8BitPackedUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct4x8BitPackedUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct4x8BitPackedUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct4x8BitPackedSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct4x8BitPackedSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct4x8BitPackedSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct4x8BitPackedSignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct4x8BitPackedSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct4x8BitPackedSignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct4x8BitPackedSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct4x8BitPackedSignedAccelerated`} + public @CType("VkBool32") int integerDotProduct4x8BitPackedSignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct4x8BitPackedSignedAccelerated(this.segment()); } + /// Sets `integerDotProduct4x8BitPackedSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct4x8BitPackedSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct4x8BitPackedSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct4x8BitPackedSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct4x8BitPackedSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct4x8BitPackedSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct4x8BitPackedSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct4x8BitPackedSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct4x8BitPackedSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct4x8BitPackedSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct4x8BitPackedSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct4x8BitPackedSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct4x8BitPackedMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct4x8BitPackedMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct4x8BitPackedMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct4x8BitPackedMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct4x8BitPackedMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProduct4x8BitPackedMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct4x8BitPackedMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct4x8BitPackedMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProduct4x8BitPackedMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProduct4x8BitPackedMixedSignednessAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct4x8BitPackedMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProduct4x8BitPackedMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct4x8BitPackedMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct4x8BitPackedMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct4x8BitPackedMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct4x8BitPackedMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct4x8BitPackedMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct4x8BitPackedMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct4x8BitPackedMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct4x8BitPackedMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct4x8BitPackedMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct16BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct16BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct16BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct16BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct16BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct16BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct16BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct16BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct16BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct16BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProduct16BitUnsignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct16BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProduct16BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct16BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct16BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct16BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct16BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct16BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct16BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct16BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct16BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct16BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct16BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct16BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct16BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct16BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct16BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct16BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct16BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct16BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct16BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct16BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct16BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct16BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProduct16BitSignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct16BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProduct16BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct16BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct16BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct16BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct16BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct16BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct16BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct16BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct16BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct16BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct16BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct16BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct16BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct16BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct16BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct16BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct16BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct16BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProduct16BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct16BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct16BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProduct16BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProduct16BitMixedSignednessAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct16BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProduct16BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct16BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct16BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct16BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct16BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct16BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct16BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct16BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct16BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct16BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct16BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct16BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct32BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct32BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct32BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct32BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct32BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct32BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct32BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct32BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct32BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct32BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProduct32BitUnsignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct32BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProduct32BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct32BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct32BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct32BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct32BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct32BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct32BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct32BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct32BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct32BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct32BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct32BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct32BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct32BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct32BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct32BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct32BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct32BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct32BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct32BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct32BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct32BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProduct32BitSignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct32BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProduct32BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct32BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct32BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct32BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct32BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct32BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct32BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct32BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct32BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct32BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct32BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct32BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct32BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct32BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct32BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct32BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct32BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct32BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProduct32BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct32BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct32BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProduct32BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProduct32BitMixedSignednessAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct32BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProduct32BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct32BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct32BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct32BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct32BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct32BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct32BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct32BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct32BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct32BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct32BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct32BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct64BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct64BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct64BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct64BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct64BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct64BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct64BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct64BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct64BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct64BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProduct64BitUnsignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct64BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProduct64BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct64BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct64BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct64BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct64BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct64BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct64BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct64BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct64BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct64BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct64BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct64BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct64BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct64BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct64BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct64BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct64BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct64BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProduct64BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct64BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct64BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProduct64BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProduct64BitSignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct64BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProduct64BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct64BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct64BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct64BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct64BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct64BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct64BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct64BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct64BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct64BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct64BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct64BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProduct64BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProduct64BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProduct64BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProduct64BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProduct64BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct64BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProduct64BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProduct64BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct64BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProduct64BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProduct64BitMixedSignednessAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProduct64BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProduct64BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProduct64BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProduct64BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProduct64BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProduct64BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct64BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProduct64BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct64BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct64BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProduct64BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProduct64BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProduct64BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitUnsignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating8BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating8BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating8BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating8BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating8BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating8BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating8BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating8BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating8BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitSignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating8BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating8BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating8BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating8BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating8BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating8BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating8BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating8BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating8BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating8BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedSignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating4x8BitPackedSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitUnsignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating16BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating16BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating16BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating16BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating16BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating16BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating16BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating16BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating16BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitSignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating16BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating16BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating16BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating16BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating16BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating16BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating16BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating16BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating16BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating16BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitUnsignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating32BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating32BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating32BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating32BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating32BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating32BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating32BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating32BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating32BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitSignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating32BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating32BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating32BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating32BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating32BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating32BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating32BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating32BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating32BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating32BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitUnsignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitUnsignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating64BitUnsignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating64BitUnsignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating64BitSignedAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitSignedAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating64BitSignedAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating64BitSignedAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitSignedAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating64BitSignedAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating64BitSignedAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitSignedAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating64BitSignedAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating64BitSignedAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitSignedAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating64BitSignedAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating64BitSignedAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitSignedAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating64BitSignedAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitSignedAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitSignedAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating64BitSignedAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitSignedAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating64BitSignedAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating64BitSignedAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating64BitSignedAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating64BitSignedAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating64BitSignedAccelerated(this.segment(), value); return this; } + + /// {@return `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(MemorySegment segment, long index) { return (int) VH_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated.get(segment, 0L, index); } + /// {@return `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(segment, 0L); } + /// {@return `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` at the given index} + /// @param index the index + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitMixedSignednessAcceleratedAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(this.segment(), index); } + /// {@return `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated`} + public @CType("VkBool32") int integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated() { return VkPhysicalDeviceVulkan13Properties.get_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(this.segment()); } + /// Sets `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated.set(segment, 0L, index, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(segment, 0L, value); } + /// Sets `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating64BitMixedSignednessAcceleratedAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(this.segment(), index, value); return this; } + /// Sets `integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(this.segment(), value); return this; } + + /// {@return `storageTexelBufferOffsetAlignmentBytes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_storageTexelBufferOffsetAlignmentBytes(MemorySegment segment, long index) { return (long) VH_storageTexelBufferOffsetAlignmentBytes.get(segment, 0L, index); } + /// {@return `storageTexelBufferOffsetAlignmentBytes`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_storageTexelBufferOffsetAlignmentBytes(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_storageTexelBufferOffsetAlignmentBytes(segment, 0L); } + /// {@return `storageTexelBufferOffsetAlignmentBytes` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long storageTexelBufferOffsetAlignmentBytesAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_storageTexelBufferOffsetAlignmentBytes(this.segment(), index); } + /// {@return `storageTexelBufferOffsetAlignmentBytes`} + public @CType("VkDeviceSize") long storageTexelBufferOffsetAlignmentBytes() { return VkPhysicalDeviceVulkan13Properties.get_storageTexelBufferOffsetAlignmentBytes(this.segment()); } + /// Sets `storageTexelBufferOffsetAlignmentBytes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageTexelBufferOffsetAlignmentBytes(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_storageTexelBufferOffsetAlignmentBytes.set(segment, 0L, index, value); } + /// Sets `storageTexelBufferOffsetAlignmentBytes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageTexelBufferOffsetAlignmentBytes(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan13Properties.set_storageTexelBufferOffsetAlignmentBytes(segment, 0L, value); } + /// Sets `storageTexelBufferOffsetAlignmentBytes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties storageTexelBufferOffsetAlignmentBytesAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan13Properties.set_storageTexelBufferOffsetAlignmentBytes(this.segment(), index, value); return this; } + /// Sets `storageTexelBufferOffsetAlignmentBytes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties storageTexelBufferOffsetAlignmentBytes(@CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan13Properties.set_storageTexelBufferOffsetAlignmentBytes(this.segment(), value); return this; } + + /// {@return `storageTexelBufferOffsetSingleTexelAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_storageTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, long index) { return (int) VH_storageTexelBufferOffsetSingleTexelAlignment.get(segment, 0L, index); } + /// {@return `storageTexelBufferOffsetSingleTexelAlignment`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_storageTexelBufferOffsetSingleTexelAlignment(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_storageTexelBufferOffsetSingleTexelAlignment(segment, 0L); } + /// {@return `storageTexelBufferOffsetSingleTexelAlignment` at the given index} + /// @param index the index + public @CType("VkBool32") int storageTexelBufferOffsetSingleTexelAlignmentAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_storageTexelBufferOffsetSingleTexelAlignment(this.segment(), index); } + /// {@return `storageTexelBufferOffsetSingleTexelAlignment`} + public @CType("VkBool32") int storageTexelBufferOffsetSingleTexelAlignment() { return VkPhysicalDeviceVulkan13Properties.get_storageTexelBufferOffsetSingleTexelAlignment(this.segment()); } + /// Sets `storageTexelBufferOffsetSingleTexelAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_storageTexelBufferOffsetSingleTexelAlignment.set(segment, 0L, index, value); } + /// Sets `storageTexelBufferOffsetSingleTexelAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_storageTexelBufferOffsetSingleTexelAlignment(segment, 0L, value); } + /// Sets `storageTexelBufferOffsetSingleTexelAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties storageTexelBufferOffsetSingleTexelAlignmentAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_storageTexelBufferOffsetSingleTexelAlignment(this.segment(), index, value); return this; } + /// Sets `storageTexelBufferOffsetSingleTexelAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties storageTexelBufferOffsetSingleTexelAlignment(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_storageTexelBufferOffsetSingleTexelAlignment(this.segment(), value); return this; } + + /// {@return `uniformTexelBufferOffsetAlignmentBytes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_uniformTexelBufferOffsetAlignmentBytes(MemorySegment segment, long index) { return (long) VH_uniformTexelBufferOffsetAlignmentBytes.get(segment, 0L, index); } + /// {@return `uniformTexelBufferOffsetAlignmentBytes`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_uniformTexelBufferOffsetAlignmentBytes(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_uniformTexelBufferOffsetAlignmentBytes(segment, 0L); } + /// {@return `uniformTexelBufferOffsetAlignmentBytes` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long uniformTexelBufferOffsetAlignmentBytesAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_uniformTexelBufferOffsetAlignmentBytes(this.segment(), index); } + /// {@return `uniformTexelBufferOffsetAlignmentBytes`} + public @CType("VkDeviceSize") long uniformTexelBufferOffsetAlignmentBytes() { return VkPhysicalDeviceVulkan13Properties.get_uniformTexelBufferOffsetAlignmentBytes(this.segment()); } + /// Sets `uniformTexelBufferOffsetAlignmentBytes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformTexelBufferOffsetAlignmentBytes(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_uniformTexelBufferOffsetAlignmentBytes.set(segment, 0L, index, value); } + /// Sets `uniformTexelBufferOffsetAlignmentBytes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformTexelBufferOffsetAlignmentBytes(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan13Properties.set_uniformTexelBufferOffsetAlignmentBytes(segment, 0L, value); } + /// Sets `uniformTexelBufferOffsetAlignmentBytes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties uniformTexelBufferOffsetAlignmentBytesAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan13Properties.set_uniformTexelBufferOffsetAlignmentBytes(this.segment(), index, value); return this; } + /// Sets `uniformTexelBufferOffsetAlignmentBytes` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties uniformTexelBufferOffsetAlignmentBytes(@CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan13Properties.set_uniformTexelBufferOffsetAlignmentBytes(this.segment(), value); return this; } + + /// {@return `uniformTexelBufferOffsetSingleTexelAlignment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_uniformTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, long index) { return (int) VH_uniformTexelBufferOffsetSingleTexelAlignment.get(segment, 0L, index); } + /// {@return `uniformTexelBufferOffsetSingleTexelAlignment`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_uniformTexelBufferOffsetSingleTexelAlignment(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_uniformTexelBufferOffsetSingleTexelAlignment(segment, 0L); } + /// {@return `uniformTexelBufferOffsetSingleTexelAlignment` at the given index} + /// @param index the index + public @CType("VkBool32") int uniformTexelBufferOffsetSingleTexelAlignmentAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_uniformTexelBufferOffsetSingleTexelAlignment(this.segment(), index); } + /// {@return `uniformTexelBufferOffsetSingleTexelAlignment`} + public @CType("VkBool32") int uniformTexelBufferOffsetSingleTexelAlignment() { return VkPhysicalDeviceVulkan13Properties.get_uniformTexelBufferOffsetSingleTexelAlignment(this.segment()); } + /// Sets `uniformTexelBufferOffsetSingleTexelAlignment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_uniformTexelBufferOffsetSingleTexelAlignment.set(segment, 0L, index, value); } + /// Sets `uniformTexelBufferOffsetSingleTexelAlignment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformTexelBufferOffsetSingleTexelAlignment(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_uniformTexelBufferOffsetSingleTexelAlignment(segment, 0L, value); } + /// Sets `uniformTexelBufferOffsetSingleTexelAlignment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties uniformTexelBufferOffsetSingleTexelAlignmentAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_uniformTexelBufferOffsetSingleTexelAlignment(this.segment(), index, value); return this; } + /// Sets `uniformTexelBufferOffsetSingleTexelAlignment` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties uniformTexelBufferOffsetSingleTexelAlignment(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan13Properties.set_uniformTexelBufferOffsetSingleTexelAlignment(this.segment(), value); return this; } + + /// {@return `maxBufferSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_maxBufferSize(MemorySegment segment, long index) { return (long) VH_maxBufferSize.get(segment, 0L, index); } + /// {@return `maxBufferSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_maxBufferSize(MemorySegment segment) { return VkPhysicalDeviceVulkan13Properties.get_maxBufferSize(segment, 0L); } + /// {@return `maxBufferSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long maxBufferSizeAt(long index) { return VkPhysicalDeviceVulkan13Properties.get_maxBufferSize(this.segment(), index); } + /// {@return `maxBufferSize`} + public @CType("VkDeviceSize") long maxBufferSize() { return VkPhysicalDeviceVulkan13Properties.get_maxBufferSize(this.segment()); } + /// Sets `maxBufferSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxBufferSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_maxBufferSize.set(segment, 0L, index, value); } + /// Sets `maxBufferSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxBufferSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan13Properties.set_maxBufferSize(segment, 0L, value); } + /// Sets `maxBufferSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxBufferSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan13Properties.set_maxBufferSize(this.segment(), index, value); return this; } + /// Sets `maxBufferSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan13Properties maxBufferSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkan13Properties.set_maxBufferSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan14Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan14Features.java new file mode 100644 index 00000000..de5da647 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan14Features.java @@ -0,0 +1,925 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### globalPriorityQuery +/// [VarHandle][#VH_globalPriorityQuery] - [Getter][#globalPriorityQuery()] - [Setter][#globalPriorityQuery(int)] +/// ### shaderSubgroupRotate +/// [VarHandle][#VH_shaderSubgroupRotate] - [Getter][#shaderSubgroupRotate()] - [Setter][#shaderSubgroupRotate(int)] +/// ### shaderSubgroupRotateClustered +/// [VarHandle][#VH_shaderSubgroupRotateClustered] - [Getter][#shaderSubgroupRotateClustered()] - [Setter][#shaderSubgroupRotateClustered(int)] +/// ### shaderFloatControls2 +/// [VarHandle][#VH_shaderFloatControls2] - [Getter][#shaderFloatControls2()] - [Setter][#shaderFloatControls2(int)] +/// ### shaderExpectAssume +/// [VarHandle][#VH_shaderExpectAssume] - [Getter][#shaderExpectAssume()] - [Setter][#shaderExpectAssume(int)] +/// ### rectangularLines +/// [VarHandle][#VH_rectangularLines] - [Getter][#rectangularLines()] - [Setter][#rectangularLines(int)] +/// ### bresenhamLines +/// [VarHandle][#VH_bresenhamLines] - [Getter][#bresenhamLines()] - [Setter][#bresenhamLines(int)] +/// ### smoothLines +/// [VarHandle][#VH_smoothLines] - [Getter][#smoothLines()] - [Setter][#smoothLines(int)] +/// ### stippledRectangularLines +/// [VarHandle][#VH_stippledRectangularLines] - [Getter][#stippledRectangularLines()] - [Setter][#stippledRectangularLines(int)] +/// ### stippledBresenhamLines +/// [VarHandle][#VH_stippledBresenhamLines] - [Getter][#stippledBresenhamLines()] - [Setter][#stippledBresenhamLines(int)] +/// ### stippledSmoothLines +/// [VarHandle][#VH_stippledSmoothLines] - [Getter][#stippledSmoothLines()] - [Setter][#stippledSmoothLines(int)] +/// ### vertexAttributeInstanceRateDivisor +/// [VarHandle][#VH_vertexAttributeInstanceRateDivisor] - [Getter][#vertexAttributeInstanceRateDivisor()] - [Setter][#vertexAttributeInstanceRateDivisor(int)] +/// ### vertexAttributeInstanceRateZeroDivisor +/// [VarHandle][#VH_vertexAttributeInstanceRateZeroDivisor] - [Getter][#vertexAttributeInstanceRateZeroDivisor()] - [Setter][#vertexAttributeInstanceRateZeroDivisor(int)] +/// ### indexTypeUint8 +/// [VarHandle][#VH_indexTypeUint8] - [Getter][#indexTypeUint8()] - [Setter][#indexTypeUint8(int)] +/// ### dynamicRenderingLocalRead +/// [VarHandle][#VH_dynamicRenderingLocalRead] - [Getter][#dynamicRenderingLocalRead()] - [Setter][#dynamicRenderingLocalRead(int)] +/// ### maintenance5 +/// [VarHandle][#VH_maintenance5] - [Getter][#maintenance5()] - [Setter][#maintenance5(int)] +/// ### maintenance6 +/// [VarHandle][#VH_maintenance6] - [Getter][#maintenance6()] - [Setter][#maintenance6(int)] +/// ### pipelineProtectedAccess +/// [VarHandle][#VH_pipelineProtectedAccess] - [Getter][#pipelineProtectedAccess()] - [Setter][#pipelineProtectedAccess(int)] +/// ### pipelineRobustness +/// [VarHandle][#VH_pipelineRobustness] - [Getter][#pipelineRobustness()] - [Setter][#pipelineRobustness(int)] +/// ### hostImageCopy +/// [VarHandle][#VH_hostImageCopy] - [Getter][#hostImageCopy()] - [Setter][#hostImageCopy(int)] +/// ### pushDescriptor +/// [VarHandle][#VH_pushDescriptor] - [Getter][#pushDescriptor()] - [Setter][#pushDescriptor(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkan14Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 globalPriorityQuery; +/// VkBool32 shaderSubgroupRotate; +/// VkBool32 shaderSubgroupRotateClustered; +/// VkBool32 shaderFloatControls2; +/// VkBool32 shaderExpectAssume; +/// VkBool32 rectangularLines; +/// VkBool32 bresenhamLines; +/// VkBool32 smoothLines; +/// VkBool32 stippledRectangularLines; +/// VkBool32 stippledBresenhamLines; +/// VkBool32 stippledSmoothLines; +/// VkBool32 vertexAttributeInstanceRateDivisor; +/// VkBool32 vertexAttributeInstanceRateZeroDivisor; +/// VkBool32 indexTypeUint8; +/// VkBool32 dynamicRenderingLocalRead; +/// VkBool32 maintenance5; +/// VkBool32 maintenance6; +/// VkBool32 pipelineProtectedAccess; +/// VkBool32 pipelineRobustness; +/// VkBool32 hostImageCopy; +/// VkBool32 pushDescriptor; +/// } VkPhysicalDeviceVulkan14Features; +/// ``` +public final class VkPhysicalDeviceVulkan14Features extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkan14Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("globalPriorityQuery"), + ValueLayout.JAVA_INT.withName("shaderSubgroupRotate"), + ValueLayout.JAVA_INT.withName("shaderSubgroupRotateClustered"), + ValueLayout.JAVA_INT.withName("shaderFloatControls2"), + ValueLayout.JAVA_INT.withName("shaderExpectAssume"), + ValueLayout.JAVA_INT.withName("rectangularLines"), + ValueLayout.JAVA_INT.withName("bresenhamLines"), + ValueLayout.JAVA_INT.withName("smoothLines"), + ValueLayout.JAVA_INT.withName("stippledRectangularLines"), + ValueLayout.JAVA_INT.withName("stippledBresenhamLines"), + ValueLayout.JAVA_INT.withName("stippledSmoothLines"), + ValueLayout.JAVA_INT.withName("vertexAttributeInstanceRateDivisor"), + ValueLayout.JAVA_INT.withName("vertexAttributeInstanceRateZeroDivisor"), + ValueLayout.JAVA_INT.withName("indexTypeUint8"), + ValueLayout.JAVA_INT.withName("dynamicRenderingLocalRead"), + ValueLayout.JAVA_INT.withName("maintenance5"), + ValueLayout.JAVA_INT.withName("maintenance6"), + ValueLayout.JAVA_INT.withName("pipelineProtectedAccess"), + ValueLayout.JAVA_INT.withName("pipelineRobustness"), + ValueLayout.JAVA_INT.withName("hostImageCopy"), + ValueLayout.JAVA_INT.withName("pushDescriptor") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `globalPriorityQuery` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_globalPriorityQuery = LAYOUT.arrayElementVarHandle(PathElement.groupElement("globalPriorityQuery")); + /// The [VarHandle] of `shaderSubgroupRotate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSubgroupRotate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSubgroupRotate")); + /// The [VarHandle] of `shaderSubgroupRotateClustered` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderSubgroupRotateClustered = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderSubgroupRotateClustered")); + /// The [VarHandle] of `shaderFloatControls2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderFloatControls2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderFloatControls2")); + /// The [VarHandle] of `shaderExpectAssume` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderExpectAssume = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderExpectAssume")); + /// The [VarHandle] of `rectangularLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rectangularLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rectangularLines")); + /// The [VarHandle] of `bresenhamLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bresenhamLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bresenhamLines")); + /// The [VarHandle] of `smoothLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_smoothLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("smoothLines")); + /// The [VarHandle] of `stippledRectangularLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stippledRectangularLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stippledRectangularLines")); + /// The [VarHandle] of `stippledBresenhamLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stippledBresenhamLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stippledBresenhamLines")); + /// The [VarHandle] of `stippledSmoothLines` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stippledSmoothLines = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stippledSmoothLines")); + /// The [VarHandle] of `vertexAttributeInstanceRateDivisor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexAttributeInstanceRateDivisor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexAttributeInstanceRateDivisor")); + /// The [VarHandle] of `vertexAttributeInstanceRateZeroDivisor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexAttributeInstanceRateZeroDivisor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexAttributeInstanceRateZeroDivisor")); + /// The [VarHandle] of `indexTypeUint8` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_indexTypeUint8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("indexTypeUint8")); + /// The [VarHandle] of `dynamicRenderingLocalRead` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicRenderingLocalRead = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicRenderingLocalRead")); + /// The [VarHandle] of `maintenance5` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maintenance5 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maintenance5")); + /// The [VarHandle] of `maintenance6` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maintenance6 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maintenance6")); + /// The [VarHandle] of `pipelineProtectedAccess` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineProtectedAccess = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineProtectedAccess")); + /// The [VarHandle] of `pipelineRobustness` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineRobustness = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineRobustness")); + /// The [VarHandle] of `hostImageCopy` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_hostImageCopy = LAYOUT.arrayElementVarHandle(PathElement.groupElement("hostImageCopy")); + /// The [VarHandle] of `pushDescriptor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pushDescriptor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pushDescriptor")); + + /// Creates `VkPhysicalDeviceVulkan14Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkan14Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkan14Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan14Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan14Features(segment); } + + /// Creates `VkPhysicalDeviceVulkan14Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan14Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan14Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkan14Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan14Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan14Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkan14Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkan14Features` + public static VkPhysicalDeviceVulkan14Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkan14Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkan14Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkan14Features` + public static VkPhysicalDeviceVulkan14Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkan14Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkan14Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkan14Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan14Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan14Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkan14Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkan14Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkan14Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Features.set_pNext(this.segment(), value); return this; } + + /// {@return `globalPriorityQuery` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_globalPriorityQuery(MemorySegment segment, long index) { return (int) VH_globalPriorityQuery.get(segment, 0L, index); } + /// {@return `globalPriorityQuery`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_globalPriorityQuery(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_globalPriorityQuery(segment, 0L); } + /// {@return `globalPriorityQuery` at the given index} + /// @param index the index + public @CType("VkBool32") int globalPriorityQueryAt(long index) { return VkPhysicalDeviceVulkan14Features.get_globalPriorityQuery(this.segment(), index); } + /// {@return `globalPriorityQuery`} + public @CType("VkBool32") int globalPriorityQuery() { return VkPhysicalDeviceVulkan14Features.get_globalPriorityQuery(this.segment()); } + /// Sets `globalPriorityQuery` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_globalPriorityQuery(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_globalPriorityQuery.set(segment, 0L, index, value); } + /// Sets `globalPriorityQuery` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_globalPriorityQuery(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_globalPriorityQuery(segment, 0L, value); } + /// Sets `globalPriorityQuery` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features globalPriorityQueryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_globalPriorityQuery(this.segment(), index, value); return this; } + /// Sets `globalPriorityQuery` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features globalPriorityQuery(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_globalPriorityQuery(this.segment(), value); return this; } + + /// {@return `shaderSubgroupRotate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSubgroupRotate(MemorySegment segment, long index) { return (int) VH_shaderSubgroupRotate.get(segment, 0L, index); } + /// {@return `shaderSubgroupRotate`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSubgroupRotate(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_shaderSubgroupRotate(segment, 0L); } + /// {@return `shaderSubgroupRotate` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSubgroupRotateAt(long index) { return VkPhysicalDeviceVulkan14Features.get_shaderSubgroupRotate(this.segment(), index); } + /// {@return `shaderSubgroupRotate`} + public @CType("VkBool32") int shaderSubgroupRotate() { return VkPhysicalDeviceVulkan14Features.get_shaderSubgroupRotate(this.segment()); } + /// Sets `shaderSubgroupRotate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSubgroupRotate(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSubgroupRotate.set(segment, 0L, index, value); } + /// Sets `shaderSubgroupRotate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSubgroupRotate(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderSubgroupRotate(segment, 0L, value); } + /// Sets `shaderSubgroupRotate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features shaderSubgroupRotateAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderSubgroupRotate(this.segment(), index, value); return this; } + /// Sets `shaderSubgroupRotate` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features shaderSubgroupRotate(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderSubgroupRotate(this.segment(), value); return this; } + + /// {@return `shaderSubgroupRotateClustered` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderSubgroupRotateClustered(MemorySegment segment, long index) { return (int) VH_shaderSubgroupRotateClustered.get(segment, 0L, index); } + /// {@return `shaderSubgroupRotateClustered`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderSubgroupRotateClustered(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_shaderSubgroupRotateClustered(segment, 0L); } + /// {@return `shaderSubgroupRotateClustered` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderSubgroupRotateClusteredAt(long index) { return VkPhysicalDeviceVulkan14Features.get_shaderSubgroupRotateClustered(this.segment(), index); } + /// {@return `shaderSubgroupRotateClustered`} + public @CType("VkBool32") int shaderSubgroupRotateClustered() { return VkPhysicalDeviceVulkan14Features.get_shaderSubgroupRotateClustered(this.segment()); } + /// Sets `shaderSubgroupRotateClustered` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderSubgroupRotateClustered(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderSubgroupRotateClustered.set(segment, 0L, index, value); } + /// Sets `shaderSubgroupRotateClustered` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderSubgroupRotateClustered(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderSubgroupRotateClustered(segment, 0L, value); } + /// Sets `shaderSubgroupRotateClustered` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features shaderSubgroupRotateClusteredAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderSubgroupRotateClustered(this.segment(), index, value); return this; } + /// Sets `shaderSubgroupRotateClustered` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features shaderSubgroupRotateClustered(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderSubgroupRotateClustered(this.segment(), value); return this; } + + /// {@return `shaderFloatControls2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderFloatControls2(MemorySegment segment, long index) { return (int) VH_shaderFloatControls2.get(segment, 0L, index); } + /// {@return `shaderFloatControls2`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderFloatControls2(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_shaderFloatControls2(segment, 0L); } + /// {@return `shaderFloatControls2` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderFloatControls2At(long index) { return VkPhysicalDeviceVulkan14Features.get_shaderFloatControls2(this.segment(), index); } + /// {@return `shaderFloatControls2`} + public @CType("VkBool32") int shaderFloatControls2() { return VkPhysicalDeviceVulkan14Features.get_shaderFloatControls2(this.segment()); } + /// Sets `shaderFloatControls2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderFloatControls2(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderFloatControls2.set(segment, 0L, index, value); } + /// Sets `shaderFloatControls2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderFloatControls2(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderFloatControls2(segment, 0L, value); } + /// Sets `shaderFloatControls2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features shaderFloatControls2At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderFloatControls2(this.segment(), index, value); return this; } + /// Sets `shaderFloatControls2` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features shaderFloatControls2(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderFloatControls2(this.segment(), value); return this; } + + /// {@return `shaderExpectAssume` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderExpectAssume(MemorySegment segment, long index) { return (int) VH_shaderExpectAssume.get(segment, 0L, index); } + /// {@return `shaderExpectAssume`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderExpectAssume(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_shaderExpectAssume(segment, 0L); } + /// {@return `shaderExpectAssume` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderExpectAssumeAt(long index) { return VkPhysicalDeviceVulkan14Features.get_shaderExpectAssume(this.segment(), index); } + /// {@return `shaderExpectAssume`} + public @CType("VkBool32") int shaderExpectAssume() { return VkPhysicalDeviceVulkan14Features.get_shaderExpectAssume(this.segment()); } + /// Sets `shaderExpectAssume` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderExpectAssume(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderExpectAssume.set(segment, 0L, index, value); } + /// Sets `shaderExpectAssume` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderExpectAssume(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderExpectAssume(segment, 0L, value); } + /// Sets `shaderExpectAssume` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features shaderExpectAssumeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderExpectAssume(this.segment(), index, value); return this; } + /// Sets `shaderExpectAssume` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features shaderExpectAssume(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_shaderExpectAssume(this.segment(), value); return this; } + + /// {@return `rectangularLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rectangularLines(MemorySegment segment, long index) { return (int) VH_rectangularLines.get(segment, 0L, index); } + /// {@return `rectangularLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rectangularLines(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_rectangularLines(segment, 0L); } + /// {@return `rectangularLines` at the given index} + /// @param index the index + public @CType("VkBool32") int rectangularLinesAt(long index) { return VkPhysicalDeviceVulkan14Features.get_rectangularLines(this.segment(), index); } + /// {@return `rectangularLines`} + public @CType("VkBool32") int rectangularLines() { return VkPhysicalDeviceVulkan14Features.get_rectangularLines(this.segment()); } + /// Sets `rectangularLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rectangularLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rectangularLines.set(segment, 0L, index, value); } + /// Sets `rectangularLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rectangularLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_rectangularLines(segment, 0L, value); } + /// Sets `rectangularLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features rectangularLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_rectangularLines(this.segment(), index, value); return this; } + /// Sets `rectangularLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features rectangularLines(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_rectangularLines(this.segment(), value); return this; } + + /// {@return `bresenhamLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_bresenhamLines(MemorySegment segment, long index) { return (int) VH_bresenhamLines.get(segment, 0L, index); } + /// {@return `bresenhamLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_bresenhamLines(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_bresenhamLines(segment, 0L); } + /// {@return `bresenhamLines` at the given index} + /// @param index the index + public @CType("VkBool32") int bresenhamLinesAt(long index) { return VkPhysicalDeviceVulkan14Features.get_bresenhamLines(this.segment(), index); } + /// {@return `bresenhamLines`} + public @CType("VkBool32") int bresenhamLines() { return VkPhysicalDeviceVulkan14Features.get_bresenhamLines(this.segment()); } + /// Sets `bresenhamLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bresenhamLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_bresenhamLines.set(segment, 0L, index, value); } + /// Sets `bresenhamLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bresenhamLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_bresenhamLines(segment, 0L, value); } + /// Sets `bresenhamLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features bresenhamLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_bresenhamLines(this.segment(), index, value); return this; } + /// Sets `bresenhamLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features bresenhamLines(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_bresenhamLines(this.segment(), value); return this; } + + /// {@return `smoothLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_smoothLines(MemorySegment segment, long index) { return (int) VH_smoothLines.get(segment, 0L, index); } + /// {@return `smoothLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_smoothLines(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_smoothLines(segment, 0L); } + /// {@return `smoothLines` at the given index} + /// @param index the index + public @CType("VkBool32") int smoothLinesAt(long index) { return VkPhysicalDeviceVulkan14Features.get_smoothLines(this.segment(), index); } + /// {@return `smoothLines`} + public @CType("VkBool32") int smoothLines() { return VkPhysicalDeviceVulkan14Features.get_smoothLines(this.segment()); } + /// Sets `smoothLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_smoothLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_smoothLines.set(segment, 0L, index, value); } + /// Sets `smoothLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_smoothLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_smoothLines(segment, 0L, value); } + /// Sets `smoothLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features smoothLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_smoothLines(this.segment(), index, value); return this; } + /// Sets `smoothLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features smoothLines(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_smoothLines(this.segment(), value); return this; } + + /// {@return `stippledRectangularLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_stippledRectangularLines(MemorySegment segment, long index) { return (int) VH_stippledRectangularLines.get(segment, 0L, index); } + /// {@return `stippledRectangularLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_stippledRectangularLines(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_stippledRectangularLines(segment, 0L); } + /// {@return `stippledRectangularLines` at the given index} + /// @param index the index + public @CType("VkBool32") int stippledRectangularLinesAt(long index) { return VkPhysicalDeviceVulkan14Features.get_stippledRectangularLines(this.segment(), index); } + /// {@return `stippledRectangularLines`} + public @CType("VkBool32") int stippledRectangularLines() { return VkPhysicalDeviceVulkan14Features.get_stippledRectangularLines(this.segment()); } + /// Sets `stippledRectangularLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stippledRectangularLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_stippledRectangularLines.set(segment, 0L, index, value); } + /// Sets `stippledRectangularLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stippledRectangularLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_stippledRectangularLines(segment, 0L, value); } + /// Sets `stippledRectangularLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features stippledRectangularLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_stippledRectangularLines(this.segment(), index, value); return this; } + /// Sets `stippledRectangularLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features stippledRectangularLines(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_stippledRectangularLines(this.segment(), value); return this; } + + /// {@return `stippledBresenhamLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_stippledBresenhamLines(MemorySegment segment, long index) { return (int) VH_stippledBresenhamLines.get(segment, 0L, index); } + /// {@return `stippledBresenhamLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_stippledBresenhamLines(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_stippledBresenhamLines(segment, 0L); } + /// {@return `stippledBresenhamLines` at the given index} + /// @param index the index + public @CType("VkBool32") int stippledBresenhamLinesAt(long index) { return VkPhysicalDeviceVulkan14Features.get_stippledBresenhamLines(this.segment(), index); } + /// {@return `stippledBresenhamLines`} + public @CType("VkBool32") int stippledBresenhamLines() { return VkPhysicalDeviceVulkan14Features.get_stippledBresenhamLines(this.segment()); } + /// Sets `stippledBresenhamLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stippledBresenhamLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_stippledBresenhamLines.set(segment, 0L, index, value); } + /// Sets `stippledBresenhamLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stippledBresenhamLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_stippledBresenhamLines(segment, 0L, value); } + /// Sets `stippledBresenhamLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features stippledBresenhamLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_stippledBresenhamLines(this.segment(), index, value); return this; } + /// Sets `stippledBresenhamLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features stippledBresenhamLines(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_stippledBresenhamLines(this.segment(), value); return this; } + + /// {@return `stippledSmoothLines` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_stippledSmoothLines(MemorySegment segment, long index) { return (int) VH_stippledSmoothLines.get(segment, 0L, index); } + /// {@return `stippledSmoothLines`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_stippledSmoothLines(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_stippledSmoothLines(segment, 0L); } + /// {@return `stippledSmoothLines` at the given index} + /// @param index the index + public @CType("VkBool32") int stippledSmoothLinesAt(long index) { return VkPhysicalDeviceVulkan14Features.get_stippledSmoothLines(this.segment(), index); } + /// {@return `stippledSmoothLines`} + public @CType("VkBool32") int stippledSmoothLines() { return VkPhysicalDeviceVulkan14Features.get_stippledSmoothLines(this.segment()); } + /// Sets `stippledSmoothLines` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stippledSmoothLines(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_stippledSmoothLines.set(segment, 0L, index, value); } + /// Sets `stippledSmoothLines` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stippledSmoothLines(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_stippledSmoothLines(segment, 0L, value); } + /// Sets `stippledSmoothLines` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features stippledSmoothLinesAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_stippledSmoothLines(this.segment(), index, value); return this; } + /// Sets `stippledSmoothLines` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features stippledSmoothLines(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_stippledSmoothLines(this.segment(), value); return this; } + + /// {@return `vertexAttributeInstanceRateDivisor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vertexAttributeInstanceRateDivisor(MemorySegment segment, long index) { return (int) VH_vertexAttributeInstanceRateDivisor.get(segment, 0L, index); } + /// {@return `vertexAttributeInstanceRateDivisor`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vertexAttributeInstanceRateDivisor(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_vertexAttributeInstanceRateDivisor(segment, 0L); } + /// {@return `vertexAttributeInstanceRateDivisor` at the given index} + /// @param index the index + public @CType("VkBool32") int vertexAttributeInstanceRateDivisorAt(long index) { return VkPhysicalDeviceVulkan14Features.get_vertexAttributeInstanceRateDivisor(this.segment(), index); } + /// {@return `vertexAttributeInstanceRateDivisor`} + public @CType("VkBool32") int vertexAttributeInstanceRateDivisor() { return VkPhysicalDeviceVulkan14Features.get_vertexAttributeInstanceRateDivisor(this.segment()); } + /// Sets `vertexAttributeInstanceRateDivisor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexAttributeInstanceRateDivisor(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vertexAttributeInstanceRateDivisor.set(segment, 0L, index, value); } + /// Sets `vertexAttributeInstanceRateDivisor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexAttributeInstanceRateDivisor(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_vertexAttributeInstanceRateDivisor(segment, 0L, value); } + /// Sets `vertexAttributeInstanceRateDivisor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features vertexAttributeInstanceRateDivisorAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_vertexAttributeInstanceRateDivisor(this.segment(), index, value); return this; } + /// Sets `vertexAttributeInstanceRateDivisor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features vertexAttributeInstanceRateDivisor(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_vertexAttributeInstanceRateDivisor(this.segment(), value); return this; } + + /// {@return `vertexAttributeInstanceRateZeroDivisor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vertexAttributeInstanceRateZeroDivisor(MemorySegment segment, long index) { return (int) VH_vertexAttributeInstanceRateZeroDivisor.get(segment, 0L, index); } + /// {@return `vertexAttributeInstanceRateZeroDivisor`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vertexAttributeInstanceRateZeroDivisor(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_vertexAttributeInstanceRateZeroDivisor(segment, 0L); } + /// {@return `vertexAttributeInstanceRateZeroDivisor` at the given index} + /// @param index the index + public @CType("VkBool32") int vertexAttributeInstanceRateZeroDivisorAt(long index) { return VkPhysicalDeviceVulkan14Features.get_vertexAttributeInstanceRateZeroDivisor(this.segment(), index); } + /// {@return `vertexAttributeInstanceRateZeroDivisor`} + public @CType("VkBool32") int vertexAttributeInstanceRateZeroDivisor() { return VkPhysicalDeviceVulkan14Features.get_vertexAttributeInstanceRateZeroDivisor(this.segment()); } + /// Sets `vertexAttributeInstanceRateZeroDivisor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexAttributeInstanceRateZeroDivisor(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vertexAttributeInstanceRateZeroDivisor.set(segment, 0L, index, value); } + /// Sets `vertexAttributeInstanceRateZeroDivisor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexAttributeInstanceRateZeroDivisor(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_vertexAttributeInstanceRateZeroDivisor(segment, 0L, value); } + /// Sets `vertexAttributeInstanceRateZeroDivisor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features vertexAttributeInstanceRateZeroDivisorAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_vertexAttributeInstanceRateZeroDivisor(this.segment(), index, value); return this; } + /// Sets `vertexAttributeInstanceRateZeroDivisor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features vertexAttributeInstanceRateZeroDivisor(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_vertexAttributeInstanceRateZeroDivisor(this.segment(), value); return this; } + + /// {@return `indexTypeUint8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_indexTypeUint8(MemorySegment segment, long index) { return (int) VH_indexTypeUint8.get(segment, 0L, index); } + /// {@return `indexTypeUint8`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_indexTypeUint8(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_indexTypeUint8(segment, 0L); } + /// {@return `indexTypeUint8` at the given index} + /// @param index the index + public @CType("VkBool32") int indexTypeUint8At(long index) { return VkPhysicalDeviceVulkan14Features.get_indexTypeUint8(this.segment(), index); } + /// {@return `indexTypeUint8`} + public @CType("VkBool32") int indexTypeUint8() { return VkPhysicalDeviceVulkan14Features.get_indexTypeUint8(this.segment()); } + /// Sets `indexTypeUint8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_indexTypeUint8(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_indexTypeUint8.set(segment, 0L, index, value); } + /// Sets `indexTypeUint8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_indexTypeUint8(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_indexTypeUint8(segment, 0L, value); } + /// Sets `indexTypeUint8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features indexTypeUint8At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_indexTypeUint8(this.segment(), index, value); return this; } + /// Sets `indexTypeUint8` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features indexTypeUint8(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_indexTypeUint8(this.segment(), value); return this; } + + /// {@return `dynamicRenderingLocalRead` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dynamicRenderingLocalRead(MemorySegment segment, long index) { return (int) VH_dynamicRenderingLocalRead.get(segment, 0L, index); } + /// {@return `dynamicRenderingLocalRead`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dynamicRenderingLocalRead(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_dynamicRenderingLocalRead(segment, 0L); } + /// {@return `dynamicRenderingLocalRead` at the given index} + /// @param index the index + public @CType("VkBool32") int dynamicRenderingLocalReadAt(long index) { return VkPhysicalDeviceVulkan14Features.get_dynamicRenderingLocalRead(this.segment(), index); } + /// {@return `dynamicRenderingLocalRead`} + public @CType("VkBool32") int dynamicRenderingLocalRead() { return VkPhysicalDeviceVulkan14Features.get_dynamicRenderingLocalRead(this.segment()); } + /// Sets `dynamicRenderingLocalRead` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicRenderingLocalRead(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dynamicRenderingLocalRead.set(segment, 0L, index, value); } + /// Sets `dynamicRenderingLocalRead` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicRenderingLocalRead(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_dynamicRenderingLocalRead(segment, 0L, value); } + /// Sets `dynamicRenderingLocalRead` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features dynamicRenderingLocalReadAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_dynamicRenderingLocalRead(this.segment(), index, value); return this; } + /// Sets `dynamicRenderingLocalRead` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features dynamicRenderingLocalRead(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_dynamicRenderingLocalRead(this.segment(), value); return this; } + + /// {@return `maintenance5` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_maintenance5(MemorySegment segment, long index) { return (int) VH_maintenance5.get(segment, 0L, index); } + /// {@return `maintenance5`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_maintenance5(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_maintenance5(segment, 0L); } + /// {@return `maintenance5` at the given index} + /// @param index the index + public @CType("VkBool32") int maintenance5At(long index) { return VkPhysicalDeviceVulkan14Features.get_maintenance5(this.segment(), index); } + /// {@return `maintenance5`} + public @CType("VkBool32") int maintenance5() { return VkPhysicalDeviceVulkan14Features.get_maintenance5(this.segment()); } + /// Sets `maintenance5` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maintenance5(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_maintenance5.set(segment, 0L, index, value); } + /// Sets `maintenance5` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maintenance5(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_maintenance5(segment, 0L, value); } + /// Sets `maintenance5` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features maintenance5At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_maintenance5(this.segment(), index, value); return this; } + /// Sets `maintenance5` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features maintenance5(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_maintenance5(this.segment(), value); return this; } + + /// {@return `maintenance6` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_maintenance6(MemorySegment segment, long index) { return (int) VH_maintenance6.get(segment, 0L, index); } + /// {@return `maintenance6`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_maintenance6(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_maintenance6(segment, 0L); } + /// {@return `maintenance6` at the given index} + /// @param index the index + public @CType("VkBool32") int maintenance6At(long index) { return VkPhysicalDeviceVulkan14Features.get_maintenance6(this.segment(), index); } + /// {@return `maintenance6`} + public @CType("VkBool32") int maintenance6() { return VkPhysicalDeviceVulkan14Features.get_maintenance6(this.segment()); } + /// Sets `maintenance6` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maintenance6(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_maintenance6.set(segment, 0L, index, value); } + /// Sets `maintenance6` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maintenance6(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_maintenance6(segment, 0L, value); } + /// Sets `maintenance6` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features maintenance6At(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_maintenance6(this.segment(), index, value); return this; } + /// Sets `maintenance6` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features maintenance6(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_maintenance6(this.segment(), value); return this; } + + /// {@return `pipelineProtectedAccess` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineProtectedAccess(MemorySegment segment, long index) { return (int) VH_pipelineProtectedAccess.get(segment, 0L, index); } + /// {@return `pipelineProtectedAccess`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineProtectedAccess(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_pipelineProtectedAccess(segment, 0L); } + /// {@return `pipelineProtectedAccess` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineProtectedAccessAt(long index) { return VkPhysicalDeviceVulkan14Features.get_pipelineProtectedAccess(this.segment(), index); } + /// {@return `pipelineProtectedAccess`} + public @CType("VkBool32") int pipelineProtectedAccess() { return VkPhysicalDeviceVulkan14Features.get_pipelineProtectedAccess(this.segment()); } + /// Sets `pipelineProtectedAccess` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineProtectedAccess(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineProtectedAccess.set(segment, 0L, index, value); } + /// Sets `pipelineProtectedAccess` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineProtectedAccess(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_pipelineProtectedAccess(segment, 0L, value); } + /// Sets `pipelineProtectedAccess` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features pipelineProtectedAccessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_pipelineProtectedAccess(this.segment(), index, value); return this; } + /// Sets `pipelineProtectedAccess` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features pipelineProtectedAccess(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_pipelineProtectedAccess(this.segment(), value); return this; } + + /// {@return `pipelineRobustness` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pipelineRobustness(MemorySegment segment, long index) { return (int) VH_pipelineRobustness.get(segment, 0L, index); } + /// {@return `pipelineRobustness`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pipelineRobustness(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_pipelineRobustness(segment, 0L); } + /// {@return `pipelineRobustness` at the given index} + /// @param index the index + public @CType("VkBool32") int pipelineRobustnessAt(long index) { return VkPhysicalDeviceVulkan14Features.get_pipelineRobustness(this.segment(), index); } + /// {@return `pipelineRobustness`} + public @CType("VkBool32") int pipelineRobustness() { return VkPhysicalDeviceVulkan14Features.get_pipelineRobustness(this.segment()); } + /// Sets `pipelineRobustness` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineRobustness(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pipelineRobustness.set(segment, 0L, index, value); } + /// Sets `pipelineRobustness` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineRobustness(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_pipelineRobustness(segment, 0L, value); } + /// Sets `pipelineRobustness` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features pipelineRobustnessAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_pipelineRobustness(this.segment(), index, value); return this; } + /// Sets `pipelineRobustness` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features pipelineRobustness(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_pipelineRobustness(this.segment(), value); return this; } + + /// {@return `hostImageCopy` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_hostImageCopy(MemorySegment segment, long index) { return (int) VH_hostImageCopy.get(segment, 0L, index); } + /// {@return `hostImageCopy`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_hostImageCopy(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_hostImageCopy(segment, 0L); } + /// {@return `hostImageCopy` at the given index} + /// @param index the index + public @CType("VkBool32") int hostImageCopyAt(long index) { return VkPhysicalDeviceVulkan14Features.get_hostImageCopy(this.segment(), index); } + /// {@return `hostImageCopy`} + public @CType("VkBool32") int hostImageCopy() { return VkPhysicalDeviceVulkan14Features.get_hostImageCopy(this.segment()); } + /// Sets `hostImageCopy` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_hostImageCopy(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_hostImageCopy.set(segment, 0L, index, value); } + /// Sets `hostImageCopy` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_hostImageCopy(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_hostImageCopy(segment, 0L, value); } + /// Sets `hostImageCopy` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features hostImageCopyAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_hostImageCopy(this.segment(), index, value); return this; } + /// Sets `hostImageCopy` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features hostImageCopy(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_hostImageCopy(this.segment(), value); return this; } + + /// {@return `pushDescriptor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_pushDescriptor(MemorySegment segment, long index) { return (int) VH_pushDescriptor.get(segment, 0L, index); } + /// {@return `pushDescriptor`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_pushDescriptor(MemorySegment segment) { return VkPhysicalDeviceVulkan14Features.get_pushDescriptor(segment, 0L); } + /// {@return `pushDescriptor` at the given index} + /// @param index the index + public @CType("VkBool32") int pushDescriptorAt(long index) { return VkPhysicalDeviceVulkan14Features.get_pushDescriptor(this.segment(), index); } + /// {@return `pushDescriptor`} + public @CType("VkBool32") int pushDescriptor() { return VkPhysicalDeviceVulkan14Features.get_pushDescriptor(this.segment()); } + /// Sets `pushDescriptor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pushDescriptor(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_pushDescriptor.set(segment, 0L, index, value); } + /// Sets `pushDescriptor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pushDescriptor(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_pushDescriptor(segment, 0L, value); } + /// Sets `pushDescriptor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features pushDescriptorAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_pushDescriptor(this.segment(), index, value); return this; } + /// Sets `pushDescriptor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Features pushDescriptor(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Features.set_pushDescriptor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan14Properties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan14Properties.java new file mode 100644 index 00000000..e62a0c95 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkan14Properties.java @@ -0,0 +1,1090 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### lineSubPixelPrecisionBits +/// [VarHandle][#VH_lineSubPixelPrecisionBits] - [Getter][#lineSubPixelPrecisionBits()] - [Setter][#lineSubPixelPrecisionBits(int)] +/// ### maxVertexAttribDivisor +/// [VarHandle][#VH_maxVertexAttribDivisor] - [Getter][#maxVertexAttribDivisor()] - [Setter][#maxVertexAttribDivisor(int)] +/// ### supportsNonZeroFirstInstance +/// [VarHandle][#VH_supportsNonZeroFirstInstance] - [Getter][#supportsNonZeroFirstInstance()] - [Setter][#supportsNonZeroFirstInstance(int)] +/// ### maxPushDescriptors +/// [VarHandle][#VH_maxPushDescriptors] - [Getter][#maxPushDescriptors()] - [Setter][#maxPushDescriptors(int)] +/// ### dynamicRenderingLocalReadDepthStencilAttachments +/// [VarHandle][#VH_dynamicRenderingLocalReadDepthStencilAttachments] - [Getter][#dynamicRenderingLocalReadDepthStencilAttachments()] - [Setter][#dynamicRenderingLocalReadDepthStencilAttachments(int)] +/// ### dynamicRenderingLocalReadMultisampledAttachments +/// [VarHandle][#VH_dynamicRenderingLocalReadMultisampledAttachments] - [Getter][#dynamicRenderingLocalReadMultisampledAttachments()] - [Setter][#dynamicRenderingLocalReadMultisampledAttachments(int)] +/// ### earlyFragmentMultisampleCoverageAfterSampleCounting +/// [VarHandle][#VH_earlyFragmentMultisampleCoverageAfterSampleCounting] - [Getter][#earlyFragmentMultisampleCoverageAfterSampleCounting()] - [Setter][#earlyFragmentMultisampleCoverageAfterSampleCounting(int)] +/// ### earlyFragmentSampleMaskTestBeforeSampleCounting +/// [VarHandle][#VH_earlyFragmentSampleMaskTestBeforeSampleCounting] - [Getter][#earlyFragmentSampleMaskTestBeforeSampleCounting()] - [Setter][#earlyFragmentSampleMaskTestBeforeSampleCounting(int)] +/// ### depthStencilSwizzleOneSupport +/// [VarHandle][#VH_depthStencilSwizzleOneSupport] - [Getter][#depthStencilSwizzleOneSupport()] - [Setter][#depthStencilSwizzleOneSupport(int)] +/// ### polygonModePointSize +/// [VarHandle][#VH_polygonModePointSize] - [Getter][#polygonModePointSize()] - [Setter][#polygonModePointSize(int)] +/// ### nonStrictSinglePixelWideLinesUseParallelogram +/// [VarHandle][#VH_nonStrictSinglePixelWideLinesUseParallelogram] - [Getter][#nonStrictSinglePixelWideLinesUseParallelogram()] - [Setter][#nonStrictSinglePixelWideLinesUseParallelogram(int)] +/// ### nonStrictWideLinesUseParallelogram +/// [VarHandle][#VH_nonStrictWideLinesUseParallelogram] - [Getter][#nonStrictWideLinesUseParallelogram()] - [Setter][#nonStrictWideLinesUseParallelogram(int)] +/// ### blockTexelViewCompatibleMultipleLayers +/// [VarHandle][#VH_blockTexelViewCompatibleMultipleLayers] - [Getter][#blockTexelViewCompatibleMultipleLayers()] - [Setter][#blockTexelViewCompatibleMultipleLayers(int)] +/// ### maxCombinedImageSamplerDescriptorCount +/// [VarHandle][#VH_maxCombinedImageSamplerDescriptorCount] - [Getter][#maxCombinedImageSamplerDescriptorCount()] - [Setter][#maxCombinedImageSamplerDescriptorCount(int)] +/// ### fragmentShadingRateClampCombinerInputs +/// [VarHandle][#VH_fragmentShadingRateClampCombinerInputs] - [Getter][#fragmentShadingRateClampCombinerInputs()] - [Setter][#fragmentShadingRateClampCombinerInputs(int)] +/// ### defaultRobustnessStorageBuffers +/// [VarHandle][#VH_defaultRobustnessStorageBuffers] - [Getter][#defaultRobustnessStorageBuffers()] - [Setter][#defaultRobustnessStorageBuffers(int)] +/// ### defaultRobustnessUniformBuffers +/// [VarHandle][#VH_defaultRobustnessUniformBuffers] - [Getter][#defaultRobustnessUniformBuffers()] - [Setter][#defaultRobustnessUniformBuffers(int)] +/// ### defaultRobustnessVertexInputs +/// [VarHandle][#VH_defaultRobustnessVertexInputs] - [Getter][#defaultRobustnessVertexInputs()] - [Setter][#defaultRobustnessVertexInputs(int)] +/// ### defaultRobustnessImages +/// [VarHandle][#VH_defaultRobustnessImages] - [Getter][#defaultRobustnessImages()] - [Setter][#defaultRobustnessImages(int)] +/// ### copySrcLayoutCount +/// [VarHandle][#VH_copySrcLayoutCount] - [Getter][#copySrcLayoutCount()] - [Setter][#copySrcLayoutCount(int)] +/// ### pCopySrcLayouts +/// [VarHandle][#VH_pCopySrcLayouts] - [Getter][#pCopySrcLayouts()] - [Setter][#pCopySrcLayouts(java.lang.foreign.MemorySegment)] +/// ### copyDstLayoutCount +/// [VarHandle][#VH_copyDstLayoutCount] - [Getter][#copyDstLayoutCount()] - [Setter][#copyDstLayoutCount(int)] +/// ### pCopyDstLayouts +/// [VarHandle][#VH_pCopyDstLayouts] - [Getter][#pCopyDstLayouts()] - [Setter][#pCopyDstLayouts(java.lang.foreign.MemorySegment)] +/// ### optimalTilingLayoutUUID +/// [Byte offset handle][#MH_optimalTilingLayoutUUID] - [Memory layout][#ML_optimalTilingLayoutUUID] - [Getter][#optimalTilingLayoutUUID(long)] - [Setter][#optimalTilingLayoutUUID(long, java.lang.foreign.MemorySegment)] +/// ### identicalMemoryTypeRequirements +/// [VarHandle][#VH_identicalMemoryTypeRequirements] - [Getter][#identicalMemoryTypeRequirements()] - [Setter][#identicalMemoryTypeRequirements(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkan14Properties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t lineSubPixelPrecisionBits; +/// uint32_t maxVertexAttribDivisor; +/// VkBool32 supportsNonZeroFirstInstance; +/// uint32_t maxPushDescriptors; +/// VkBool32 dynamicRenderingLocalReadDepthStencilAttachments; +/// VkBool32 dynamicRenderingLocalReadMultisampledAttachments; +/// VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting; +/// VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting; +/// VkBool32 depthStencilSwizzleOneSupport; +/// VkBool32 polygonModePointSize; +/// VkBool32 nonStrictSinglePixelWideLinesUseParallelogram; +/// VkBool32 nonStrictWideLinesUseParallelogram; +/// VkBool32 blockTexelViewCompatibleMultipleLayers; +/// uint32_t maxCombinedImageSamplerDescriptorCount; +/// VkBool32 fragmentShadingRateClampCombinerInputs; +/// VkPipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers; +/// VkPipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers; +/// VkPipelineRobustnessBufferBehavior defaultRobustnessVertexInputs; +/// VkPipelineRobustnessImageBehavior defaultRobustnessImages; +/// uint32_t copySrcLayoutCount; +/// VkImageLayout * pCopySrcLayouts; +/// uint32_t copyDstLayoutCount; +/// VkImageLayout * pCopyDstLayouts; +/// uint8_t[VK_UUID_SIZE] optimalTilingLayoutUUID; +/// VkBool32 identicalMemoryTypeRequirements; +/// } VkPhysicalDeviceVulkan14Properties; +/// ``` +public final class VkPhysicalDeviceVulkan14Properties extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkan14Properties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("lineSubPixelPrecisionBits"), + ValueLayout.JAVA_INT.withName("maxVertexAttribDivisor"), + ValueLayout.JAVA_INT.withName("supportsNonZeroFirstInstance"), + ValueLayout.JAVA_INT.withName("maxPushDescriptors"), + ValueLayout.JAVA_INT.withName("dynamicRenderingLocalReadDepthStencilAttachments"), + ValueLayout.JAVA_INT.withName("dynamicRenderingLocalReadMultisampledAttachments"), + ValueLayout.JAVA_INT.withName("earlyFragmentMultisampleCoverageAfterSampleCounting"), + ValueLayout.JAVA_INT.withName("earlyFragmentSampleMaskTestBeforeSampleCounting"), + ValueLayout.JAVA_INT.withName("depthStencilSwizzleOneSupport"), + ValueLayout.JAVA_INT.withName("polygonModePointSize"), + ValueLayout.JAVA_INT.withName("nonStrictSinglePixelWideLinesUseParallelogram"), + ValueLayout.JAVA_INT.withName("nonStrictWideLinesUseParallelogram"), + ValueLayout.JAVA_INT.withName("blockTexelViewCompatibleMultipleLayers"), + ValueLayout.JAVA_INT.withName("maxCombinedImageSamplerDescriptorCount"), + ValueLayout.JAVA_INT.withName("fragmentShadingRateClampCombinerInputs"), + ValueLayout.JAVA_INT.withName("defaultRobustnessStorageBuffers"), + ValueLayout.JAVA_INT.withName("defaultRobustnessUniformBuffers"), + ValueLayout.JAVA_INT.withName("defaultRobustnessVertexInputs"), + ValueLayout.JAVA_INT.withName("defaultRobustnessImages"), + ValueLayout.JAVA_INT.withName("copySrcLayoutCount"), + ValueLayout.ADDRESS.withName("pCopySrcLayouts"), + ValueLayout.JAVA_INT.withName("copyDstLayoutCount"), + ValueLayout.ADDRESS.withName("pCopyDstLayouts"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("optimalTilingLayoutUUID"), + ValueLayout.JAVA_INT.withName("identicalMemoryTypeRequirements") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `lineSubPixelPrecisionBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_lineSubPixelPrecisionBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lineSubPixelPrecisionBits")); + /// The [VarHandle] of `maxVertexAttribDivisor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxVertexAttribDivisor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxVertexAttribDivisor")); + /// The [VarHandle] of `supportsNonZeroFirstInstance` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_supportsNonZeroFirstInstance = LAYOUT.arrayElementVarHandle(PathElement.groupElement("supportsNonZeroFirstInstance")); + /// The [VarHandle] of `maxPushDescriptors` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxPushDescriptors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxPushDescriptors")); + /// The [VarHandle] of `dynamicRenderingLocalReadDepthStencilAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicRenderingLocalReadDepthStencilAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicRenderingLocalReadDepthStencilAttachments")); + /// The [VarHandle] of `dynamicRenderingLocalReadMultisampledAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicRenderingLocalReadMultisampledAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicRenderingLocalReadMultisampledAttachments")); + /// The [VarHandle] of `earlyFragmentMultisampleCoverageAfterSampleCounting` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_earlyFragmentMultisampleCoverageAfterSampleCounting = LAYOUT.arrayElementVarHandle(PathElement.groupElement("earlyFragmentMultisampleCoverageAfterSampleCounting")); + /// The [VarHandle] of `earlyFragmentSampleMaskTestBeforeSampleCounting` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_earlyFragmentSampleMaskTestBeforeSampleCounting = LAYOUT.arrayElementVarHandle(PathElement.groupElement("earlyFragmentSampleMaskTestBeforeSampleCounting")); + /// The [VarHandle] of `depthStencilSwizzleOneSupport` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthStencilSwizzleOneSupport = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthStencilSwizzleOneSupport")); + /// The [VarHandle] of `polygonModePointSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_polygonModePointSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("polygonModePointSize")); + /// The [VarHandle] of `nonStrictSinglePixelWideLinesUseParallelogram` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nonStrictSinglePixelWideLinesUseParallelogram = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nonStrictSinglePixelWideLinesUseParallelogram")); + /// The [VarHandle] of `nonStrictWideLinesUseParallelogram` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nonStrictWideLinesUseParallelogram = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nonStrictWideLinesUseParallelogram")); + /// The [VarHandle] of `blockTexelViewCompatibleMultipleLayers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blockTexelViewCompatibleMultipleLayers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blockTexelViewCompatibleMultipleLayers")); + /// The [VarHandle] of `maxCombinedImageSamplerDescriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxCombinedImageSamplerDescriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxCombinedImageSamplerDescriptorCount")); + /// The [VarHandle] of `fragmentShadingRateClampCombinerInputs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fragmentShadingRateClampCombinerInputs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fragmentShadingRateClampCombinerInputs")); + /// The [VarHandle] of `defaultRobustnessStorageBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_defaultRobustnessStorageBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("defaultRobustnessStorageBuffers")); + /// The [VarHandle] of `defaultRobustnessUniformBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_defaultRobustnessUniformBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("defaultRobustnessUniformBuffers")); + /// The [VarHandle] of `defaultRobustnessVertexInputs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_defaultRobustnessVertexInputs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("defaultRobustnessVertexInputs")); + /// The [VarHandle] of `defaultRobustnessImages` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_defaultRobustnessImages = LAYOUT.arrayElementVarHandle(PathElement.groupElement("defaultRobustnessImages")); + /// The [VarHandle] of `copySrcLayoutCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_copySrcLayoutCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("copySrcLayoutCount")); + /// The [VarHandle] of `pCopySrcLayouts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCopySrcLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCopySrcLayouts")); + /// The [VarHandle] of `copyDstLayoutCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_copyDstLayoutCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("copyDstLayoutCount")); + /// The [VarHandle] of `pCopyDstLayouts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCopyDstLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCopyDstLayouts")); + /// The byte offset handle of `optimalTilingLayoutUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_optimalTilingLayoutUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("optimalTilingLayoutUUID"), PathElement.sequenceElement()); + /// The memory layout of `optimalTilingLayoutUUID`. + public static final MemoryLayout ML_optimalTilingLayoutUUID = LAYOUT.select(PathElement.groupElement("optimalTilingLayoutUUID")); + /// The [VarHandle] of `identicalMemoryTypeRequirements` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_identicalMemoryTypeRequirements = LAYOUT.arrayElementVarHandle(PathElement.groupElement("identicalMemoryTypeRequirements")); + + /// Creates `VkPhysicalDeviceVulkan14Properties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkan14Properties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkan14Properties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan14Properties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan14Properties(segment); } + + /// Creates `VkPhysicalDeviceVulkan14Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan14Properties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan14Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkan14Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkan14Properties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkan14Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkan14Properties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkan14Properties` + public static VkPhysicalDeviceVulkan14Properties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkan14Properties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkan14Properties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkan14Properties` + public static VkPhysicalDeviceVulkan14Properties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkan14Properties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkan14Properties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan14Properties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkan14Properties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkan14Properties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkan14Properties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_pNext(this.segment(), value); return this; } + + /// {@return `lineSubPixelPrecisionBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_lineSubPixelPrecisionBits(MemorySegment segment, long index) { return (int) VH_lineSubPixelPrecisionBits.get(segment, 0L, index); } + /// {@return `lineSubPixelPrecisionBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_lineSubPixelPrecisionBits(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_lineSubPixelPrecisionBits(segment, 0L); } + /// {@return `lineSubPixelPrecisionBits` at the given index} + /// @param index the index + public @CType("uint32_t") int lineSubPixelPrecisionBitsAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_lineSubPixelPrecisionBits(this.segment(), index); } + /// {@return `lineSubPixelPrecisionBits`} + public @CType("uint32_t") int lineSubPixelPrecisionBits() { return VkPhysicalDeviceVulkan14Properties.get_lineSubPixelPrecisionBits(this.segment()); } + /// Sets `lineSubPixelPrecisionBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lineSubPixelPrecisionBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_lineSubPixelPrecisionBits.set(segment, 0L, index, value); } + /// Sets `lineSubPixelPrecisionBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lineSubPixelPrecisionBits(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_lineSubPixelPrecisionBits(segment, 0L, value); } + /// Sets `lineSubPixelPrecisionBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties lineSubPixelPrecisionBitsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_lineSubPixelPrecisionBits(this.segment(), index, value); return this; } + /// Sets `lineSubPixelPrecisionBits` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties lineSubPixelPrecisionBits(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_lineSubPixelPrecisionBits(this.segment(), value); return this; } + + /// {@return `maxVertexAttribDivisor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxVertexAttribDivisor(MemorySegment segment, long index) { return (int) VH_maxVertexAttribDivisor.get(segment, 0L, index); } + /// {@return `maxVertexAttribDivisor`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxVertexAttribDivisor(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_maxVertexAttribDivisor(segment, 0L); } + /// {@return `maxVertexAttribDivisor` at the given index} + /// @param index the index + public @CType("uint32_t") int maxVertexAttribDivisorAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_maxVertexAttribDivisor(this.segment(), index); } + /// {@return `maxVertexAttribDivisor`} + public @CType("uint32_t") int maxVertexAttribDivisor() { return VkPhysicalDeviceVulkan14Properties.get_maxVertexAttribDivisor(this.segment()); } + /// Sets `maxVertexAttribDivisor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxVertexAttribDivisor(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxVertexAttribDivisor.set(segment, 0L, index, value); } + /// Sets `maxVertexAttribDivisor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxVertexAttribDivisor(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_maxVertexAttribDivisor(segment, 0L, value); } + /// Sets `maxVertexAttribDivisor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties maxVertexAttribDivisorAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_maxVertexAttribDivisor(this.segment(), index, value); return this; } + /// Sets `maxVertexAttribDivisor` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties maxVertexAttribDivisor(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_maxVertexAttribDivisor(this.segment(), value); return this; } + + /// {@return `supportsNonZeroFirstInstance` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_supportsNonZeroFirstInstance(MemorySegment segment, long index) { return (int) VH_supportsNonZeroFirstInstance.get(segment, 0L, index); } + /// {@return `supportsNonZeroFirstInstance`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_supportsNonZeroFirstInstance(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_supportsNonZeroFirstInstance(segment, 0L); } + /// {@return `supportsNonZeroFirstInstance` at the given index} + /// @param index the index + public @CType("VkBool32") int supportsNonZeroFirstInstanceAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_supportsNonZeroFirstInstance(this.segment(), index); } + /// {@return `supportsNonZeroFirstInstance`} + public @CType("VkBool32") int supportsNonZeroFirstInstance() { return VkPhysicalDeviceVulkan14Properties.get_supportsNonZeroFirstInstance(this.segment()); } + /// Sets `supportsNonZeroFirstInstance` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_supportsNonZeroFirstInstance(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_supportsNonZeroFirstInstance.set(segment, 0L, index, value); } + /// Sets `supportsNonZeroFirstInstance` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_supportsNonZeroFirstInstance(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_supportsNonZeroFirstInstance(segment, 0L, value); } + /// Sets `supportsNonZeroFirstInstance` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties supportsNonZeroFirstInstanceAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_supportsNonZeroFirstInstance(this.segment(), index, value); return this; } + /// Sets `supportsNonZeroFirstInstance` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties supportsNonZeroFirstInstance(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_supportsNonZeroFirstInstance(this.segment(), value); return this; } + + /// {@return `maxPushDescriptors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxPushDescriptors(MemorySegment segment, long index) { return (int) VH_maxPushDescriptors.get(segment, 0L, index); } + /// {@return `maxPushDescriptors`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxPushDescriptors(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_maxPushDescriptors(segment, 0L); } + /// {@return `maxPushDescriptors` at the given index} + /// @param index the index + public @CType("uint32_t") int maxPushDescriptorsAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_maxPushDescriptors(this.segment(), index); } + /// {@return `maxPushDescriptors`} + public @CType("uint32_t") int maxPushDescriptors() { return VkPhysicalDeviceVulkan14Properties.get_maxPushDescriptors(this.segment()); } + /// Sets `maxPushDescriptors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxPushDescriptors(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxPushDescriptors.set(segment, 0L, index, value); } + /// Sets `maxPushDescriptors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxPushDescriptors(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_maxPushDescriptors(segment, 0L, value); } + /// Sets `maxPushDescriptors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties maxPushDescriptorsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_maxPushDescriptors(this.segment(), index, value); return this; } + /// Sets `maxPushDescriptors` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties maxPushDescriptors(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_maxPushDescriptors(this.segment(), value); return this; } + + /// {@return `dynamicRenderingLocalReadDepthStencilAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dynamicRenderingLocalReadDepthStencilAttachments(MemorySegment segment, long index) { return (int) VH_dynamicRenderingLocalReadDepthStencilAttachments.get(segment, 0L, index); } + /// {@return `dynamicRenderingLocalReadDepthStencilAttachments`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dynamicRenderingLocalReadDepthStencilAttachments(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_dynamicRenderingLocalReadDepthStencilAttachments(segment, 0L); } + /// {@return `dynamicRenderingLocalReadDepthStencilAttachments` at the given index} + /// @param index the index + public @CType("VkBool32") int dynamicRenderingLocalReadDepthStencilAttachmentsAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_dynamicRenderingLocalReadDepthStencilAttachments(this.segment(), index); } + /// {@return `dynamicRenderingLocalReadDepthStencilAttachments`} + public @CType("VkBool32") int dynamicRenderingLocalReadDepthStencilAttachments() { return VkPhysicalDeviceVulkan14Properties.get_dynamicRenderingLocalReadDepthStencilAttachments(this.segment()); } + /// Sets `dynamicRenderingLocalReadDepthStencilAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicRenderingLocalReadDepthStencilAttachments(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dynamicRenderingLocalReadDepthStencilAttachments.set(segment, 0L, index, value); } + /// Sets `dynamicRenderingLocalReadDepthStencilAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicRenderingLocalReadDepthStencilAttachments(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_dynamicRenderingLocalReadDepthStencilAttachments(segment, 0L, value); } + /// Sets `dynamicRenderingLocalReadDepthStencilAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties dynamicRenderingLocalReadDepthStencilAttachmentsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_dynamicRenderingLocalReadDepthStencilAttachments(this.segment(), index, value); return this; } + /// Sets `dynamicRenderingLocalReadDepthStencilAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties dynamicRenderingLocalReadDepthStencilAttachments(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_dynamicRenderingLocalReadDepthStencilAttachments(this.segment(), value); return this; } + + /// {@return `dynamicRenderingLocalReadMultisampledAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_dynamicRenderingLocalReadMultisampledAttachments(MemorySegment segment, long index) { return (int) VH_dynamicRenderingLocalReadMultisampledAttachments.get(segment, 0L, index); } + /// {@return `dynamicRenderingLocalReadMultisampledAttachments`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_dynamicRenderingLocalReadMultisampledAttachments(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_dynamicRenderingLocalReadMultisampledAttachments(segment, 0L); } + /// {@return `dynamicRenderingLocalReadMultisampledAttachments` at the given index} + /// @param index the index + public @CType("VkBool32") int dynamicRenderingLocalReadMultisampledAttachmentsAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_dynamicRenderingLocalReadMultisampledAttachments(this.segment(), index); } + /// {@return `dynamicRenderingLocalReadMultisampledAttachments`} + public @CType("VkBool32") int dynamicRenderingLocalReadMultisampledAttachments() { return VkPhysicalDeviceVulkan14Properties.get_dynamicRenderingLocalReadMultisampledAttachments(this.segment()); } + /// Sets `dynamicRenderingLocalReadMultisampledAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicRenderingLocalReadMultisampledAttachments(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_dynamicRenderingLocalReadMultisampledAttachments.set(segment, 0L, index, value); } + /// Sets `dynamicRenderingLocalReadMultisampledAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicRenderingLocalReadMultisampledAttachments(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_dynamicRenderingLocalReadMultisampledAttachments(segment, 0L, value); } + /// Sets `dynamicRenderingLocalReadMultisampledAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties dynamicRenderingLocalReadMultisampledAttachmentsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_dynamicRenderingLocalReadMultisampledAttachments(this.segment(), index, value); return this; } + /// Sets `dynamicRenderingLocalReadMultisampledAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties dynamicRenderingLocalReadMultisampledAttachments(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_dynamicRenderingLocalReadMultisampledAttachments(this.segment(), value); return this; } + + /// {@return `earlyFragmentMultisampleCoverageAfterSampleCounting` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_earlyFragmentMultisampleCoverageAfterSampleCounting(MemorySegment segment, long index) { return (int) VH_earlyFragmentMultisampleCoverageAfterSampleCounting.get(segment, 0L, index); } + /// {@return `earlyFragmentMultisampleCoverageAfterSampleCounting`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_earlyFragmentMultisampleCoverageAfterSampleCounting(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_earlyFragmentMultisampleCoverageAfterSampleCounting(segment, 0L); } + /// {@return `earlyFragmentMultisampleCoverageAfterSampleCounting` at the given index} + /// @param index the index + public @CType("VkBool32") int earlyFragmentMultisampleCoverageAfterSampleCountingAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_earlyFragmentMultisampleCoverageAfterSampleCounting(this.segment(), index); } + /// {@return `earlyFragmentMultisampleCoverageAfterSampleCounting`} + public @CType("VkBool32") int earlyFragmentMultisampleCoverageAfterSampleCounting() { return VkPhysicalDeviceVulkan14Properties.get_earlyFragmentMultisampleCoverageAfterSampleCounting(this.segment()); } + /// Sets `earlyFragmentMultisampleCoverageAfterSampleCounting` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_earlyFragmentMultisampleCoverageAfterSampleCounting(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_earlyFragmentMultisampleCoverageAfterSampleCounting.set(segment, 0L, index, value); } + /// Sets `earlyFragmentMultisampleCoverageAfterSampleCounting` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_earlyFragmentMultisampleCoverageAfterSampleCounting(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_earlyFragmentMultisampleCoverageAfterSampleCounting(segment, 0L, value); } + /// Sets `earlyFragmentMultisampleCoverageAfterSampleCounting` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties earlyFragmentMultisampleCoverageAfterSampleCountingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_earlyFragmentMultisampleCoverageAfterSampleCounting(this.segment(), index, value); return this; } + /// Sets `earlyFragmentMultisampleCoverageAfterSampleCounting` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties earlyFragmentMultisampleCoverageAfterSampleCounting(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_earlyFragmentMultisampleCoverageAfterSampleCounting(this.segment(), value); return this; } + + /// {@return `earlyFragmentSampleMaskTestBeforeSampleCounting` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_earlyFragmentSampleMaskTestBeforeSampleCounting(MemorySegment segment, long index) { return (int) VH_earlyFragmentSampleMaskTestBeforeSampleCounting.get(segment, 0L, index); } + /// {@return `earlyFragmentSampleMaskTestBeforeSampleCounting`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_earlyFragmentSampleMaskTestBeforeSampleCounting(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_earlyFragmentSampleMaskTestBeforeSampleCounting(segment, 0L); } + /// {@return `earlyFragmentSampleMaskTestBeforeSampleCounting` at the given index} + /// @param index the index + public @CType("VkBool32") int earlyFragmentSampleMaskTestBeforeSampleCountingAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_earlyFragmentSampleMaskTestBeforeSampleCounting(this.segment(), index); } + /// {@return `earlyFragmentSampleMaskTestBeforeSampleCounting`} + public @CType("VkBool32") int earlyFragmentSampleMaskTestBeforeSampleCounting() { return VkPhysicalDeviceVulkan14Properties.get_earlyFragmentSampleMaskTestBeforeSampleCounting(this.segment()); } + /// Sets `earlyFragmentSampleMaskTestBeforeSampleCounting` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_earlyFragmentSampleMaskTestBeforeSampleCounting(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_earlyFragmentSampleMaskTestBeforeSampleCounting.set(segment, 0L, index, value); } + /// Sets `earlyFragmentSampleMaskTestBeforeSampleCounting` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_earlyFragmentSampleMaskTestBeforeSampleCounting(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_earlyFragmentSampleMaskTestBeforeSampleCounting(segment, 0L, value); } + /// Sets `earlyFragmentSampleMaskTestBeforeSampleCounting` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties earlyFragmentSampleMaskTestBeforeSampleCountingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_earlyFragmentSampleMaskTestBeforeSampleCounting(this.segment(), index, value); return this; } + /// Sets `earlyFragmentSampleMaskTestBeforeSampleCounting` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties earlyFragmentSampleMaskTestBeforeSampleCounting(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_earlyFragmentSampleMaskTestBeforeSampleCounting(this.segment(), value); return this; } + + /// {@return `depthStencilSwizzleOneSupport` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthStencilSwizzleOneSupport(MemorySegment segment, long index) { return (int) VH_depthStencilSwizzleOneSupport.get(segment, 0L, index); } + /// {@return `depthStencilSwizzleOneSupport`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthStencilSwizzleOneSupport(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_depthStencilSwizzleOneSupport(segment, 0L); } + /// {@return `depthStencilSwizzleOneSupport` at the given index} + /// @param index the index + public @CType("VkBool32") int depthStencilSwizzleOneSupportAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_depthStencilSwizzleOneSupport(this.segment(), index); } + /// {@return `depthStencilSwizzleOneSupport`} + public @CType("VkBool32") int depthStencilSwizzleOneSupport() { return VkPhysicalDeviceVulkan14Properties.get_depthStencilSwizzleOneSupport(this.segment()); } + /// Sets `depthStencilSwizzleOneSupport` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthStencilSwizzleOneSupport(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthStencilSwizzleOneSupport.set(segment, 0L, index, value); } + /// Sets `depthStencilSwizzleOneSupport` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthStencilSwizzleOneSupport(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_depthStencilSwizzleOneSupport(segment, 0L, value); } + /// Sets `depthStencilSwizzleOneSupport` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties depthStencilSwizzleOneSupportAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_depthStencilSwizzleOneSupport(this.segment(), index, value); return this; } + /// Sets `depthStencilSwizzleOneSupport` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties depthStencilSwizzleOneSupport(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_depthStencilSwizzleOneSupport(this.segment(), value); return this; } + + /// {@return `polygonModePointSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_polygonModePointSize(MemorySegment segment, long index) { return (int) VH_polygonModePointSize.get(segment, 0L, index); } + /// {@return `polygonModePointSize`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_polygonModePointSize(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_polygonModePointSize(segment, 0L); } + /// {@return `polygonModePointSize` at the given index} + /// @param index the index + public @CType("VkBool32") int polygonModePointSizeAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_polygonModePointSize(this.segment(), index); } + /// {@return `polygonModePointSize`} + public @CType("VkBool32") int polygonModePointSize() { return VkPhysicalDeviceVulkan14Properties.get_polygonModePointSize(this.segment()); } + /// Sets `polygonModePointSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_polygonModePointSize(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_polygonModePointSize.set(segment, 0L, index, value); } + /// Sets `polygonModePointSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_polygonModePointSize(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_polygonModePointSize(segment, 0L, value); } + /// Sets `polygonModePointSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties polygonModePointSizeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_polygonModePointSize(this.segment(), index, value); return this; } + /// Sets `polygonModePointSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties polygonModePointSize(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_polygonModePointSize(this.segment(), value); return this; } + + /// {@return `nonStrictSinglePixelWideLinesUseParallelogram` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nonStrictSinglePixelWideLinesUseParallelogram(MemorySegment segment, long index) { return (int) VH_nonStrictSinglePixelWideLinesUseParallelogram.get(segment, 0L, index); } + /// {@return `nonStrictSinglePixelWideLinesUseParallelogram`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nonStrictSinglePixelWideLinesUseParallelogram(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_nonStrictSinglePixelWideLinesUseParallelogram(segment, 0L); } + /// {@return `nonStrictSinglePixelWideLinesUseParallelogram` at the given index} + /// @param index the index + public @CType("VkBool32") int nonStrictSinglePixelWideLinesUseParallelogramAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_nonStrictSinglePixelWideLinesUseParallelogram(this.segment(), index); } + /// {@return `nonStrictSinglePixelWideLinesUseParallelogram`} + public @CType("VkBool32") int nonStrictSinglePixelWideLinesUseParallelogram() { return VkPhysicalDeviceVulkan14Properties.get_nonStrictSinglePixelWideLinesUseParallelogram(this.segment()); } + /// Sets `nonStrictSinglePixelWideLinesUseParallelogram` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nonStrictSinglePixelWideLinesUseParallelogram(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nonStrictSinglePixelWideLinesUseParallelogram.set(segment, 0L, index, value); } + /// Sets `nonStrictSinglePixelWideLinesUseParallelogram` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nonStrictSinglePixelWideLinesUseParallelogram(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_nonStrictSinglePixelWideLinesUseParallelogram(segment, 0L, value); } + /// Sets `nonStrictSinglePixelWideLinesUseParallelogram` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties nonStrictSinglePixelWideLinesUseParallelogramAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_nonStrictSinglePixelWideLinesUseParallelogram(this.segment(), index, value); return this; } + /// Sets `nonStrictSinglePixelWideLinesUseParallelogram` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties nonStrictSinglePixelWideLinesUseParallelogram(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_nonStrictSinglePixelWideLinesUseParallelogram(this.segment(), value); return this; } + + /// {@return `nonStrictWideLinesUseParallelogram` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_nonStrictWideLinesUseParallelogram(MemorySegment segment, long index) { return (int) VH_nonStrictWideLinesUseParallelogram.get(segment, 0L, index); } + /// {@return `nonStrictWideLinesUseParallelogram`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_nonStrictWideLinesUseParallelogram(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_nonStrictWideLinesUseParallelogram(segment, 0L); } + /// {@return `nonStrictWideLinesUseParallelogram` at the given index} + /// @param index the index + public @CType("VkBool32") int nonStrictWideLinesUseParallelogramAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_nonStrictWideLinesUseParallelogram(this.segment(), index); } + /// {@return `nonStrictWideLinesUseParallelogram`} + public @CType("VkBool32") int nonStrictWideLinesUseParallelogram() { return VkPhysicalDeviceVulkan14Properties.get_nonStrictWideLinesUseParallelogram(this.segment()); } + /// Sets `nonStrictWideLinesUseParallelogram` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nonStrictWideLinesUseParallelogram(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_nonStrictWideLinesUseParallelogram.set(segment, 0L, index, value); } + /// Sets `nonStrictWideLinesUseParallelogram` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nonStrictWideLinesUseParallelogram(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_nonStrictWideLinesUseParallelogram(segment, 0L, value); } + /// Sets `nonStrictWideLinesUseParallelogram` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties nonStrictWideLinesUseParallelogramAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_nonStrictWideLinesUseParallelogram(this.segment(), index, value); return this; } + /// Sets `nonStrictWideLinesUseParallelogram` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties nonStrictWideLinesUseParallelogram(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_nonStrictWideLinesUseParallelogram(this.segment(), value); return this; } + + /// {@return `blockTexelViewCompatibleMultipleLayers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_blockTexelViewCompatibleMultipleLayers(MemorySegment segment, long index) { return (int) VH_blockTexelViewCompatibleMultipleLayers.get(segment, 0L, index); } + /// {@return `blockTexelViewCompatibleMultipleLayers`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_blockTexelViewCompatibleMultipleLayers(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_blockTexelViewCompatibleMultipleLayers(segment, 0L); } + /// {@return `blockTexelViewCompatibleMultipleLayers` at the given index} + /// @param index the index + public @CType("VkBool32") int blockTexelViewCompatibleMultipleLayersAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_blockTexelViewCompatibleMultipleLayers(this.segment(), index); } + /// {@return `blockTexelViewCompatibleMultipleLayers`} + public @CType("VkBool32") int blockTexelViewCompatibleMultipleLayers() { return VkPhysicalDeviceVulkan14Properties.get_blockTexelViewCompatibleMultipleLayers(this.segment()); } + /// Sets `blockTexelViewCompatibleMultipleLayers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blockTexelViewCompatibleMultipleLayers(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_blockTexelViewCompatibleMultipleLayers.set(segment, 0L, index, value); } + /// Sets `blockTexelViewCompatibleMultipleLayers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blockTexelViewCompatibleMultipleLayers(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_blockTexelViewCompatibleMultipleLayers(segment, 0L, value); } + /// Sets `blockTexelViewCompatibleMultipleLayers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties blockTexelViewCompatibleMultipleLayersAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_blockTexelViewCompatibleMultipleLayers(this.segment(), index, value); return this; } + /// Sets `blockTexelViewCompatibleMultipleLayers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties blockTexelViewCompatibleMultipleLayers(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_blockTexelViewCompatibleMultipleLayers(this.segment(), value); return this; } + + /// {@return `maxCombinedImageSamplerDescriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxCombinedImageSamplerDescriptorCount(MemorySegment segment, long index) { return (int) VH_maxCombinedImageSamplerDescriptorCount.get(segment, 0L, index); } + /// {@return `maxCombinedImageSamplerDescriptorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxCombinedImageSamplerDescriptorCount(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_maxCombinedImageSamplerDescriptorCount(segment, 0L); } + /// {@return `maxCombinedImageSamplerDescriptorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxCombinedImageSamplerDescriptorCountAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_maxCombinedImageSamplerDescriptorCount(this.segment(), index); } + /// {@return `maxCombinedImageSamplerDescriptorCount`} + public @CType("uint32_t") int maxCombinedImageSamplerDescriptorCount() { return VkPhysicalDeviceVulkan14Properties.get_maxCombinedImageSamplerDescriptorCount(this.segment()); } + /// Sets `maxCombinedImageSamplerDescriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCombinedImageSamplerDescriptorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxCombinedImageSamplerDescriptorCount.set(segment, 0L, index, value); } + /// Sets `maxCombinedImageSamplerDescriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCombinedImageSamplerDescriptorCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_maxCombinedImageSamplerDescriptorCount(segment, 0L, value); } + /// Sets `maxCombinedImageSamplerDescriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties maxCombinedImageSamplerDescriptorCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_maxCombinedImageSamplerDescriptorCount(this.segment(), index, value); return this; } + /// Sets `maxCombinedImageSamplerDescriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties maxCombinedImageSamplerDescriptorCount(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_maxCombinedImageSamplerDescriptorCount(this.segment(), value); return this; } + + /// {@return `fragmentShadingRateClampCombinerInputs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_fragmentShadingRateClampCombinerInputs(MemorySegment segment, long index) { return (int) VH_fragmentShadingRateClampCombinerInputs.get(segment, 0L, index); } + /// {@return `fragmentShadingRateClampCombinerInputs`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_fragmentShadingRateClampCombinerInputs(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_fragmentShadingRateClampCombinerInputs(segment, 0L); } + /// {@return `fragmentShadingRateClampCombinerInputs` at the given index} + /// @param index the index + public @CType("VkBool32") int fragmentShadingRateClampCombinerInputsAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_fragmentShadingRateClampCombinerInputs(this.segment(), index); } + /// {@return `fragmentShadingRateClampCombinerInputs`} + public @CType("VkBool32") int fragmentShadingRateClampCombinerInputs() { return VkPhysicalDeviceVulkan14Properties.get_fragmentShadingRateClampCombinerInputs(this.segment()); } + /// Sets `fragmentShadingRateClampCombinerInputs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fragmentShadingRateClampCombinerInputs(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_fragmentShadingRateClampCombinerInputs.set(segment, 0L, index, value); } + /// Sets `fragmentShadingRateClampCombinerInputs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fragmentShadingRateClampCombinerInputs(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_fragmentShadingRateClampCombinerInputs(segment, 0L, value); } + /// Sets `fragmentShadingRateClampCombinerInputs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties fragmentShadingRateClampCombinerInputsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_fragmentShadingRateClampCombinerInputs(this.segment(), index, value); return this; } + /// Sets `fragmentShadingRateClampCombinerInputs` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties fragmentShadingRateClampCombinerInputs(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_fragmentShadingRateClampCombinerInputs(this.segment(), value); return this; } + + /// {@return `defaultRobustnessStorageBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessStorageBuffers(MemorySegment segment, long index) { return (int) VH_defaultRobustnessStorageBuffers.get(segment, 0L, index); } + /// {@return `defaultRobustnessStorageBuffers`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessStorageBuffers(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessStorageBuffers(segment, 0L); } + /// {@return `defaultRobustnessStorageBuffers` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessStorageBuffersAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessStorageBuffers(this.segment(), index); } + /// {@return `defaultRobustnessStorageBuffers`} + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessStorageBuffers() { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessStorageBuffers(this.segment()); } + /// Sets `defaultRobustnessStorageBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_defaultRobustnessStorageBuffers(MemorySegment segment, long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VH_defaultRobustnessStorageBuffers.set(segment, 0L, index, value); } + /// Sets `defaultRobustnessStorageBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_defaultRobustnessStorageBuffers(MemorySegment segment, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessStorageBuffers(segment, 0L, value); } + /// Sets `defaultRobustnessStorageBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties defaultRobustnessStorageBuffersAt(long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessStorageBuffers(this.segment(), index, value); return this; } + /// Sets `defaultRobustnessStorageBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties defaultRobustnessStorageBuffers(@CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessStorageBuffers(this.segment(), value); return this; } + + /// {@return `defaultRobustnessUniformBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessUniformBuffers(MemorySegment segment, long index) { return (int) VH_defaultRobustnessUniformBuffers.get(segment, 0L, index); } + /// {@return `defaultRobustnessUniformBuffers`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessUniformBuffers(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessUniformBuffers(segment, 0L); } + /// {@return `defaultRobustnessUniformBuffers` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessUniformBuffersAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessUniformBuffers(this.segment(), index); } + /// {@return `defaultRobustnessUniformBuffers`} + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessUniformBuffers() { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessUniformBuffers(this.segment()); } + /// Sets `defaultRobustnessUniformBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_defaultRobustnessUniformBuffers(MemorySegment segment, long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VH_defaultRobustnessUniformBuffers.set(segment, 0L, index, value); } + /// Sets `defaultRobustnessUniformBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_defaultRobustnessUniformBuffers(MemorySegment segment, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessUniformBuffers(segment, 0L, value); } + /// Sets `defaultRobustnessUniformBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties defaultRobustnessUniformBuffersAt(long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessUniformBuffers(this.segment(), index, value); return this; } + /// Sets `defaultRobustnessUniformBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties defaultRobustnessUniformBuffers(@CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessUniformBuffers(this.segment(), value); return this; } + + /// {@return `defaultRobustnessVertexInputs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessVertexInputs(MemorySegment segment, long index) { return (int) VH_defaultRobustnessVertexInputs.get(segment, 0L, index); } + /// {@return `defaultRobustnessVertexInputs`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessBufferBehavior") int get_defaultRobustnessVertexInputs(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessVertexInputs(segment, 0L); } + /// {@return `defaultRobustnessVertexInputs` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessVertexInputsAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessVertexInputs(this.segment(), index); } + /// {@return `defaultRobustnessVertexInputs`} + public @CType("VkPipelineRobustnessBufferBehavior") int defaultRobustnessVertexInputs() { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessVertexInputs(this.segment()); } + /// Sets `defaultRobustnessVertexInputs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_defaultRobustnessVertexInputs(MemorySegment segment, long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VH_defaultRobustnessVertexInputs.set(segment, 0L, index, value); } + /// Sets `defaultRobustnessVertexInputs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_defaultRobustnessVertexInputs(MemorySegment segment, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessVertexInputs(segment, 0L, value); } + /// Sets `defaultRobustnessVertexInputs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties defaultRobustnessVertexInputsAt(long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessVertexInputs(this.segment(), index, value); return this; } + /// Sets `defaultRobustnessVertexInputs` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties defaultRobustnessVertexInputs(@CType("VkPipelineRobustnessBufferBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessVertexInputs(this.segment(), value); return this; } + + /// {@return `defaultRobustnessImages` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessImageBehavior") int get_defaultRobustnessImages(MemorySegment segment, long index) { return (int) VH_defaultRobustnessImages.get(segment, 0L, index); } + /// {@return `defaultRobustnessImages`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessImageBehavior") int get_defaultRobustnessImages(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessImages(segment, 0L); } + /// {@return `defaultRobustnessImages` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessImageBehavior") int defaultRobustnessImagesAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessImages(this.segment(), index); } + /// {@return `defaultRobustnessImages`} + public @CType("VkPipelineRobustnessImageBehavior") int defaultRobustnessImages() { return VkPhysicalDeviceVulkan14Properties.get_defaultRobustnessImages(this.segment()); } + /// Sets `defaultRobustnessImages` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_defaultRobustnessImages(MemorySegment segment, long index, @CType("VkPipelineRobustnessImageBehavior") int value) { VH_defaultRobustnessImages.set(segment, 0L, index, value); } + /// Sets `defaultRobustnessImages` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_defaultRobustnessImages(MemorySegment segment, @CType("VkPipelineRobustnessImageBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessImages(segment, 0L, value); } + /// Sets `defaultRobustnessImages` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties defaultRobustnessImagesAt(long index, @CType("VkPipelineRobustnessImageBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessImages(this.segment(), index, value); return this; } + /// Sets `defaultRobustnessImages` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties defaultRobustnessImages(@CType("VkPipelineRobustnessImageBehavior") int value) { VkPhysicalDeviceVulkan14Properties.set_defaultRobustnessImages(this.segment(), value); return this; } + + /// {@return `copySrcLayoutCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_copySrcLayoutCount(MemorySegment segment, long index) { return (int) VH_copySrcLayoutCount.get(segment, 0L, index); } + /// {@return `copySrcLayoutCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_copySrcLayoutCount(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_copySrcLayoutCount(segment, 0L); } + /// {@return `copySrcLayoutCount` at the given index} + /// @param index the index + public @CType("uint32_t") int copySrcLayoutCountAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_copySrcLayoutCount(this.segment(), index); } + /// {@return `copySrcLayoutCount`} + public @CType("uint32_t") int copySrcLayoutCount() { return VkPhysicalDeviceVulkan14Properties.get_copySrcLayoutCount(this.segment()); } + /// Sets `copySrcLayoutCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_copySrcLayoutCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_copySrcLayoutCount.set(segment, 0L, index, value); } + /// Sets `copySrcLayoutCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_copySrcLayoutCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_copySrcLayoutCount(segment, 0L, value); } + /// Sets `copySrcLayoutCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties copySrcLayoutCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_copySrcLayoutCount(this.segment(), index, value); return this; } + /// Sets `copySrcLayoutCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties copySrcLayoutCount(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_copySrcLayoutCount(this.segment(), value); return this; } + + /// {@return `pCopySrcLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout *") java.lang.foreign.MemorySegment get_pCopySrcLayouts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCopySrcLayouts.get(segment, 0L, index); } + /// {@return `pCopySrcLayouts`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout *") java.lang.foreign.MemorySegment get_pCopySrcLayouts(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_pCopySrcLayouts(segment, 0L); } + /// {@return `pCopySrcLayouts` at the given index} + /// @param index the index + public @CType("VkImageLayout *") java.lang.foreign.MemorySegment pCopySrcLayoutsAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_pCopySrcLayouts(this.segment(), index); } + /// {@return `pCopySrcLayouts`} + public @CType("VkImageLayout *") java.lang.foreign.MemorySegment pCopySrcLayouts() { return VkPhysicalDeviceVulkan14Properties.get_pCopySrcLayouts(this.segment()); } + /// Sets `pCopySrcLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCopySrcLayouts(MemorySegment segment, long index, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VH_pCopySrcLayouts.set(segment, 0L, index, value); } + /// Sets `pCopySrcLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCopySrcLayouts(MemorySegment segment, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_pCopySrcLayouts(segment, 0L, value); } + /// Sets `pCopySrcLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties pCopySrcLayoutsAt(long index, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_pCopySrcLayouts(this.segment(), index, value); return this; } + /// Sets `pCopySrcLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties pCopySrcLayouts(@CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_pCopySrcLayouts(this.segment(), value); return this; } + + /// {@return `copyDstLayoutCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_copyDstLayoutCount(MemorySegment segment, long index) { return (int) VH_copyDstLayoutCount.get(segment, 0L, index); } + /// {@return `copyDstLayoutCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_copyDstLayoutCount(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_copyDstLayoutCount(segment, 0L); } + /// {@return `copyDstLayoutCount` at the given index} + /// @param index the index + public @CType("uint32_t") int copyDstLayoutCountAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_copyDstLayoutCount(this.segment(), index); } + /// {@return `copyDstLayoutCount`} + public @CType("uint32_t") int copyDstLayoutCount() { return VkPhysicalDeviceVulkan14Properties.get_copyDstLayoutCount(this.segment()); } + /// Sets `copyDstLayoutCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_copyDstLayoutCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_copyDstLayoutCount.set(segment, 0L, index, value); } + /// Sets `copyDstLayoutCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_copyDstLayoutCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_copyDstLayoutCount(segment, 0L, value); } + /// Sets `copyDstLayoutCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties copyDstLayoutCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_copyDstLayoutCount(this.segment(), index, value); return this; } + /// Sets `copyDstLayoutCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties copyDstLayoutCount(@CType("uint32_t") int value) { VkPhysicalDeviceVulkan14Properties.set_copyDstLayoutCount(this.segment(), value); return this; } + + /// {@return `pCopyDstLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout *") java.lang.foreign.MemorySegment get_pCopyDstLayouts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCopyDstLayouts.get(segment, 0L, index); } + /// {@return `pCopyDstLayouts`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout *") java.lang.foreign.MemorySegment get_pCopyDstLayouts(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_pCopyDstLayouts(segment, 0L); } + /// {@return `pCopyDstLayouts` at the given index} + /// @param index the index + public @CType("VkImageLayout *") java.lang.foreign.MemorySegment pCopyDstLayoutsAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_pCopyDstLayouts(this.segment(), index); } + /// {@return `pCopyDstLayouts`} + public @CType("VkImageLayout *") java.lang.foreign.MemorySegment pCopyDstLayouts() { return VkPhysicalDeviceVulkan14Properties.get_pCopyDstLayouts(this.segment()); } + /// Sets `pCopyDstLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCopyDstLayouts(MemorySegment segment, long index, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VH_pCopyDstLayouts.set(segment, 0L, index, value); } + /// Sets `pCopyDstLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCopyDstLayouts(MemorySegment segment, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_pCopyDstLayouts(segment, 0L, value); } + /// Sets `pCopyDstLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties pCopyDstLayoutsAt(long index, @CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_pCopyDstLayouts(this.segment(), index, value); return this; } + /// Sets `pCopyDstLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties pCopyDstLayouts(@CType("VkImageLayout *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_pCopyDstLayouts(this.segment(), value); return this; } + + /// {@return `optimalTilingLayoutUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_optimalTilingLayoutUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_optimalTilingLayoutUUID.invokeExact(0L, elementIndex), index), ML_optimalTilingLayoutUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `optimalTilingLayoutUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_optimalTilingLayoutUUID(MemorySegment segment, long elementIndex) { return VkPhysicalDeviceVulkan14Properties.get_optimalTilingLayoutUUID(segment, 0L, elementIndex); } + /// {@return `optimalTilingLayoutUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment optimalTilingLayoutUUIDAt(long index, long elementIndex) { return VkPhysicalDeviceVulkan14Properties.get_optimalTilingLayoutUUID(this.segment(), index, elementIndex); } + /// {@return `optimalTilingLayoutUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment optimalTilingLayoutUUID(long elementIndex) { return VkPhysicalDeviceVulkan14Properties.get_optimalTilingLayoutUUID(this.segment(), elementIndex); } + /// Sets `optimalTilingLayoutUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_optimalTilingLayoutUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_optimalTilingLayoutUUID.invokeExact(0L, elementIndex), index), ML_optimalTilingLayoutUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `optimalTilingLayoutUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_optimalTilingLayoutUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_optimalTilingLayoutUUID(segment, 0L, elementIndex, value); } + /// Sets `optimalTilingLayoutUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties optimalTilingLayoutUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_optimalTilingLayoutUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `optimalTilingLayoutUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties optimalTilingLayoutUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkan14Properties.set_optimalTilingLayoutUUID(this.segment(), elementIndex, value); return this; } + + /// {@return `identicalMemoryTypeRequirements` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_identicalMemoryTypeRequirements(MemorySegment segment, long index) { return (int) VH_identicalMemoryTypeRequirements.get(segment, 0L, index); } + /// {@return `identicalMemoryTypeRequirements`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_identicalMemoryTypeRequirements(MemorySegment segment) { return VkPhysicalDeviceVulkan14Properties.get_identicalMemoryTypeRequirements(segment, 0L); } + /// {@return `identicalMemoryTypeRequirements` at the given index} + /// @param index the index + public @CType("VkBool32") int identicalMemoryTypeRequirementsAt(long index) { return VkPhysicalDeviceVulkan14Properties.get_identicalMemoryTypeRequirements(this.segment(), index); } + /// {@return `identicalMemoryTypeRequirements`} + public @CType("VkBool32") int identicalMemoryTypeRequirements() { return VkPhysicalDeviceVulkan14Properties.get_identicalMemoryTypeRequirements(this.segment()); } + /// Sets `identicalMemoryTypeRequirements` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_identicalMemoryTypeRequirements(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_identicalMemoryTypeRequirements.set(segment, 0L, index, value); } + /// Sets `identicalMemoryTypeRequirements` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_identicalMemoryTypeRequirements(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_identicalMemoryTypeRequirements(segment, 0L, value); } + /// Sets `identicalMemoryTypeRequirements` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties identicalMemoryTypeRequirementsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_identicalMemoryTypeRequirements(this.segment(), index, value); return this; } + /// Sets `identicalMemoryTypeRequirements` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkan14Properties identicalMemoryTypeRequirements(@CType("VkBool32") int value) { VkPhysicalDeviceVulkan14Properties.set_identicalMemoryTypeRequirements(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkanMemoryModelFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkanMemoryModelFeatures.java new file mode 100644 index 00000000..63fb0e54 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkanMemoryModelFeatures.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### vulkanMemoryModel +/// [VarHandle][#VH_vulkanMemoryModel] - [Getter][#vulkanMemoryModel()] - [Setter][#vulkanMemoryModel(int)] +/// ### vulkanMemoryModelDeviceScope +/// [VarHandle][#VH_vulkanMemoryModelDeviceScope] - [Getter][#vulkanMemoryModelDeviceScope()] - [Setter][#vulkanMemoryModelDeviceScope(int)] +/// ### vulkanMemoryModelAvailabilityVisibilityChains +/// [VarHandle][#VH_vulkanMemoryModelAvailabilityVisibilityChains] - [Getter][#vulkanMemoryModelAvailabilityVisibilityChains()] - [Setter][#vulkanMemoryModelAvailabilityVisibilityChains(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkanMemoryModelFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 vulkanMemoryModel; +/// VkBool32 vulkanMemoryModelDeviceScope; +/// VkBool32 vulkanMemoryModelAvailabilityVisibilityChains; +/// } VkPhysicalDeviceVulkanMemoryModelFeatures; +/// ``` +public final class VkPhysicalDeviceVulkanMemoryModelFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkanMemoryModelFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("vulkanMemoryModel"), + ValueLayout.JAVA_INT.withName("vulkanMemoryModelDeviceScope"), + ValueLayout.JAVA_INT.withName("vulkanMemoryModelAvailabilityVisibilityChains") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `vulkanMemoryModel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vulkanMemoryModel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vulkanMemoryModel")); + /// The [VarHandle] of `vulkanMemoryModelDeviceScope` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vulkanMemoryModelDeviceScope = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vulkanMemoryModelDeviceScope")); + /// The [VarHandle] of `vulkanMemoryModelAvailabilityVisibilityChains` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vulkanMemoryModelAvailabilityVisibilityChains = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vulkanMemoryModelAvailabilityVisibilityChains")); + + /// Creates `VkPhysicalDeviceVulkanMemoryModelFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkanMemoryModelFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkanMemoryModelFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkanMemoryModelFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkanMemoryModelFeatures(segment); } + + /// Creates `VkPhysicalDeviceVulkanMemoryModelFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkanMemoryModelFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkanMemoryModelFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkanMemoryModelFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkanMemoryModelFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkanMemoryModelFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkanMemoryModelFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkanMemoryModelFeatures` + public static VkPhysicalDeviceVulkanMemoryModelFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkanMemoryModelFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkanMemoryModelFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkanMemoryModelFeatures` + public static VkPhysicalDeviceVulkanMemoryModelFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkanMemoryModelFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanMemoryModelFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanMemoryModelFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanMemoryModelFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanMemoryModelFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `vulkanMemoryModel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vulkanMemoryModel(MemorySegment segment, long index) { return (int) VH_vulkanMemoryModel.get(segment, 0L, index); } + /// {@return `vulkanMemoryModel`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vulkanMemoryModel(MemorySegment segment) { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_vulkanMemoryModel(segment, 0L); } + /// {@return `vulkanMemoryModel` at the given index} + /// @param index the index + public @CType("VkBool32") int vulkanMemoryModelAt(long index) { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_vulkanMemoryModel(this.segment(), index); } + /// {@return `vulkanMemoryModel`} + public @CType("VkBool32") int vulkanMemoryModel() { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_vulkanMemoryModel(this.segment()); } + /// Sets `vulkanMemoryModel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vulkanMemoryModel(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vulkanMemoryModel.set(segment, 0L, index, value); } + /// Sets `vulkanMemoryModel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vulkanMemoryModel(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_vulkanMemoryModel(segment, 0L, value); } + /// Sets `vulkanMemoryModel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanMemoryModelFeatures vulkanMemoryModelAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_vulkanMemoryModel(this.segment(), index, value); return this; } + /// Sets `vulkanMemoryModel` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanMemoryModelFeatures vulkanMemoryModel(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_vulkanMemoryModel(this.segment(), value); return this; } + + /// {@return `vulkanMemoryModelDeviceScope` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vulkanMemoryModelDeviceScope(MemorySegment segment, long index) { return (int) VH_vulkanMemoryModelDeviceScope.get(segment, 0L, index); } + /// {@return `vulkanMemoryModelDeviceScope`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vulkanMemoryModelDeviceScope(MemorySegment segment) { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_vulkanMemoryModelDeviceScope(segment, 0L); } + /// {@return `vulkanMemoryModelDeviceScope` at the given index} + /// @param index the index + public @CType("VkBool32") int vulkanMemoryModelDeviceScopeAt(long index) { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_vulkanMemoryModelDeviceScope(this.segment(), index); } + /// {@return `vulkanMemoryModelDeviceScope`} + public @CType("VkBool32") int vulkanMemoryModelDeviceScope() { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_vulkanMemoryModelDeviceScope(this.segment()); } + /// Sets `vulkanMemoryModelDeviceScope` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vulkanMemoryModelDeviceScope(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vulkanMemoryModelDeviceScope.set(segment, 0L, index, value); } + /// Sets `vulkanMemoryModelDeviceScope` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vulkanMemoryModelDeviceScope(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_vulkanMemoryModelDeviceScope(segment, 0L, value); } + /// Sets `vulkanMemoryModelDeviceScope` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanMemoryModelFeatures vulkanMemoryModelDeviceScopeAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_vulkanMemoryModelDeviceScope(this.segment(), index, value); return this; } + /// Sets `vulkanMemoryModelDeviceScope` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanMemoryModelFeatures vulkanMemoryModelDeviceScope(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_vulkanMemoryModelDeviceScope(this.segment(), value); return this; } + + /// {@return `vulkanMemoryModelAvailabilityVisibilityChains` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_vulkanMemoryModelAvailabilityVisibilityChains(MemorySegment segment, long index) { return (int) VH_vulkanMemoryModelAvailabilityVisibilityChains.get(segment, 0L, index); } + /// {@return `vulkanMemoryModelAvailabilityVisibilityChains`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_vulkanMemoryModelAvailabilityVisibilityChains(MemorySegment segment) { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_vulkanMemoryModelAvailabilityVisibilityChains(segment, 0L); } + /// {@return `vulkanMemoryModelAvailabilityVisibilityChains` at the given index} + /// @param index the index + public @CType("VkBool32") int vulkanMemoryModelAvailabilityVisibilityChainsAt(long index) { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_vulkanMemoryModelAvailabilityVisibilityChains(this.segment(), index); } + /// {@return `vulkanMemoryModelAvailabilityVisibilityChains`} + public @CType("VkBool32") int vulkanMemoryModelAvailabilityVisibilityChains() { return VkPhysicalDeviceVulkanMemoryModelFeatures.get_vulkanMemoryModelAvailabilityVisibilityChains(this.segment()); } + /// Sets `vulkanMemoryModelAvailabilityVisibilityChains` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vulkanMemoryModelAvailabilityVisibilityChains(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_vulkanMemoryModelAvailabilityVisibilityChains.set(segment, 0L, index, value); } + /// Sets `vulkanMemoryModelAvailabilityVisibilityChains` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vulkanMemoryModelAvailabilityVisibilityChains(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_vulkanMemoryModelAvailabilityVisibilityChains(segment, 0L, value); } + /// Sets `vulkanMemoryModelAvailabilityVisibilityChains` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanMemoryModelFeatures vulkanMemoryModelAvailabilityVisibilityChainsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_vulkanMemoryModelAvailabilityVisibilityChains(this.segment(), index, value); return this; } + /// Sets `vulkanMemoryModelAvailabilityVisibilityChains` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanMemoryModelFeatures vulkanMemoryModelAvailabilityVisibilityChains(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanMemoryModelFeatures.set_vulkanMemoryModelAvailabilityVisibilityChains(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkanSC10Features.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkanSC10Features.java new file mode 100644 index 00000000..d535ddff --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkanSC10Features.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderAtomicInstructions +/// [VarHandle][#VH_shaderAtomicInstructions] - [Getter][#shaderAtomicInstructions()] - [Setter][#shaderAtomicInstructions(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkanSC10Features { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderAtomicInstructions; +/// } VkPhysicalDeviceVulkanSC10Features; +/// ``` +public final class VkPhysicalDeviceVulkanSC10Features extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkanSC10Features`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderAtomicInstructions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderAtomicInstructions` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderAtomicInstructions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderAtomicInstructions")); + + /// Creates `VkPhysicalDeviceVulkanSC10Features` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkanSC10Features(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkanSC10Features` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkanSC10Features of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkanSC10Features(segment); } + + /// Creates `VkPhysicalDeviceVulkanSC10Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkanSC10Features ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkanSC10Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkanSC10Features` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkanSC10Features ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkanSC10Features(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkanSC10Features` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkanSC10Features` + public static VkPhysicalDeviceVulkanSC10Features alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkanSC10Features(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkanSC10Features` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkanSC10Features` + public static VkPhysicalDeviceVulkanSC10Features alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkanSC10Features(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Features.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkanSC10Features.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkanSC10Features.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkanSC10Features.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Features sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkanSC10Features.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Features sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkanSC10Features.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Features.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkanSC10Features.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkanSC10Features.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkanSC10Features.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Features pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkanSC10Features.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Features pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkanSC10Features.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderAtomicInstructions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderAtomicInstructions(MemorySegment segment, long index) { return (int) VH_shaderAtomicInstructions.get(segment, 0L, index); } + /// {@return `shaderAtomicInstructions`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderAtomicInstructions(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Features.get_shaderAtomicInstructions(segment, 0L); } + /// {@return `shaderAtomicInstructions` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderAtomicInstructionsAt(long index) { return VkPhysicalDeviceVulkanSC10Features.get_shaderAtomicInstructions(this.segment(), index); } + /// {@return `shaderAtomicInstructions`} + public @CType("VkBool32") int shaderAtomicInstructions() { return VkPhysicalDeviceVulkanSC10Features.get_shaderAtomicInstructions(this.segment()); } + /// Sets `shaderAtomicInstructions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderAtomicInstructions(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderAtomicInstructions.set(segment, 0L, index, value); } + /// Sets `shaderAtomicInstructions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderAtomicInstructions(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Features.set_shaderAtomicInstructions(segment, 0L, value); } + /// Sets `shaderAtomicInstructions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Features shaderAtomicInstructionsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Features.set_shaderAtomicInstructions(this.segment(), index, value); return this; } + /// Sets `shaderAtomicInstructions` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Features shaderAtomicInstructions(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Features.set_shaderAtomicInstructions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkanSC10Properties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkanSC10Properties.java new file mode 100644 index 00000000..16318644 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceVulkanSC10Properties.java @@ -0,0 +1,814 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### deviceNoDynamicHostAllocations +/// [VarHandle][#VH_deviceNoDynamicHostAllocations] - [Getter][#deviceNoDynamicHostAllocations()] - [Setter][#deviceNoDynamicHostAllocations(int)] +/// ### deviceDestroyFreesMemory +/// [VarHandle][#VH_deviceDestroyFreesMemory] - [Getter][#deviceDestroyFreesMemory()] - [Setter][#deviceDestroyFreesMemory(int)] +/// ### commandPoolMultipleCommandBuffersRecording +/// [VarHandle][#VH_commandPoolMultipleCommandBuffersRecording] - [Getter][#commandPoolMultipleCommandBuffersRecording()] - [Setter][#commandPoolMultipleCommandBuffersRecording(int)] +/// ### commandPoolResetCommandBuffer +/// [VarHandle][#VH_commandPoolResetCommandBuffer] - [Getter][#commandPoolResetCommandBuffer()] - [Setter][#commandPoolResetCommandBuffer(int)] +/// ### commandBufferSimultaneousUse +/// [VarHandle][#VH_commandBufferSimultaneousUse] - [Getter][#commandBufferSimultaneousUse()] - [Setter][#commandBufferSimultaneousUse(int)] +/// ### secondaryCommandBufferNullOrImagelessFramebuffer +/// [VarHandle][#VH_secondaryCommandBufferNullOrImagelessFramebuffer] - [Getter][#secondaryCommandBufferNullOrImagelessFramebuffer()] - [Setter][#secondaryCommandBufferNullOrImagelessFramebuffer(int)] +/// ### recycleDescriptorSetMemory +/// [VarHandle][#VH_recycleDescriptorSetMemory] - [Getter][#recycleDescriptorSetMemory()] - [Setter][#recycleDescriptorSetMemory(int)] +/// ### recyclePipelineMemory +/// [VarHandle][#VH_recyclePipelineMemory] - [Getter][#recyclePipelineMemory()] - [Setter][#recyclePipelineMemory(int)] +/// ### maxRenderPassSubpasses +/// [VarHandle][#VH_maxRenderPassSubpasses] - [Getter][#maxRenderPassSubpasses()] - [Setter][#maxRenderPassSubpasses(int)] +/// ### maxRenderPassDependencies +/// [VarHandle][#VH_maxRenderPassDependencies] - [Getter][#maxRenderPassDependencies()] - [Setter][#maxRenderPassDependencies(int)] +/// ### maxSubpassInputAttachments +/// [VarHandle][#VH_maxSubpassInputAttachments] - [Getter][#maxSubpassInputAttachments()] - [Setter][#maxSubpassInputAttachments(int)] +/// ### maxSubpassPreserveAttachments +/// [VarHandle][#VH_maxSubpassPreserveAttachments] - [Getter][#maxSubpassPreserveAttachments()] - [Setter][#maxSubpassPreserveAttachments(int)] +/// ### maxFramebufferAttachments +/// [VarHandle][#VH_maxFramebufferAttachments] - [Getter][#maxFramebufferAttachments()] - [Setter][#maxFramebufferAttachments(int)] +/// ### maxDescriptorSetLayoutBindings +/// [VarHandle][#VH_maxDescriptorSetLayoutBindings] - [Getter][#maxDescriptorSetLayoutBindings()] - [Setter][#maxDescriptorSetLayoutBindings(int)] +/// ### maxQueryFaultCount +/// [VarHandle][#VH_maxQueryFaultCount] - [Getter][#maxQueryFaultCount()] - [Setter][#maxQueryFaultCount(int)] +/// ### maxCallbackFaultCount +/// [VarHandle][#VH_maxCallbackFaultCount] - [Getter][#maxCallbackFaultCount()] - [Setter][#maxCallbackFaultCount(int)] +/// ### maxCommandPoolCommandBuffers +/// [VarHandle][#VH_maxCommandPoolCommandBuffers] - [Getter][#maxCommandPoolCommandBuffers()] - [Setter][#maxCommandPoolCommandBuffers(int)] +/// ### maxCommandBufferSize +/// [VarHandle][#VH_maxCommandBufferSize] - [Getter][#maxCommandBufferSize()] - [Setter][#maxCommandBufferSize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceVulkanSC10Properties { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 deviceNoDynamicHostAllocations; +/// VkBool32 deviceDestroyFreesMemory; +/// VkBool32 commandPoolMultipleCommandBuffersRecording; +/// VkBool32 commandPoolResetCommandBuffer; +/// VkBool32 commandBufferSimultaneousUse; +/// VkBool32 secondaryCommandBufferNullOrImagelessFramebuffer; +/// VkBool32 recycleDescriptorSetMemory; +/// VkBool32 recyclePipelineMemory; +/// uint32_t maxRenderPassSubpasses; +/// uint32_t maxRenderPassDependencies; +/// uint32_t maxSubpassInputAttachments; +/// uint32_t maxSubpassPreserveAttachments; +/// uint32_t maxFramebufferAttachments; +/// uint32_t maxDescriptorSetLayoutBindings; +/// uint32_t maxQueryFaultCount; +/// uint32_t maxCallbackFaultCount; +/// uint32_t maxCommandPoolCommandBuffers; +/// VkDeviceSize maxCommandBufferSize; +/// } VkPhysicalDeviceVulkanSC10Properties; +/// ``` +public final class VkPhysicalDeviceVulkanSC10Properties extends Struct { + /// The struct layout of `VkPhysicalDeviceVulkanSC10Properties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("deviceNoDynamicHostAllocations"), + ValueLayout.JAVA_INT.withName("deviceDestroyFreesMemory"), + ValueLayout.JAVA_INT.withName("commandPoolMultipleCommandBuffersRecording"), + ValueLayout.JAVA_INT.withName("commandPoolResetCommandBuffer"), + ValueLayout.JAVA_INT.withName("commandBufferSimultaneousUse"), + ValueLayout.JAVA_INT.withName("secondaryCommandBufferNullOrImagelessFramebuffer"), + ValueLayout.JAVA_INT.withName("recycleDescriptorSetMemory"), + ValueLayout.JAVA_INT.withName("recyclePipelineMemory"), + ValueLayout.JAVA_INT.withName("maxRenderPassSubpasses"), + ValueLayout.JAVA_INT.withName("maxRenderPassDependencies"), + ValueLayout.JAVA_INT.withName("maxSubpassInputAttachments"), + ValueLayout.JAVA_INT.withName("maxSubpassPreserveAttachments"), + ValueLayout.JAVA_INT.withName("maxFramebufferAttachments"), + ValueLayout.JAVA_INT.withName("maxDescriptorSetLayoutBindings"), + ValueLayout.JAVA_INT.withName("maxQueryFaultCount"), + ValueLayout.JAVA_INT.withName("maxCallbackFaultCount"), + ValueLayout.JAVA_INT.withName("maxCommandPoolCommandBuffers"), + ValueLayout.JAVA_LONG.withName("maxCommandBufferSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `deviceNoDynamicHostAllocations` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceNoDynamicHostAllocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceNoDynamicHostAllocations")); + /// The [VarHandle] of `deviceDestroyFreesMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceDestroyFreesMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceDestroyFreesMemory")); + /// The [VarHandle] of `commandPoolMultipleCommandBuffersRecording` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandPoolMultipleCommandBuffersRecording = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandPoolMultipleCommandBuffersRecording")); + /// The [VarHandle] of `commandPoolResetCommandBuffer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandPoolResetCommandBuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandPoolResetCommandBuffer")); + /// The [VarHandle] of `commandBufferSimultaneousUse` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandBufferSimultaneousUse = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandBufferSimultaneousUse")); + /// The [VarHandle] of `secondaryCommandBufferNullOrImagelessFramebuffer` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_secondaryCommandBufferNullOrImagelessFramebuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("secondaryCommandBufferNullOrImagelessFramebuffer")); + /// The [VarHandle] of `recycleDescriptorSetMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_recycleDescriptorSetMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("recycleDescriptorSetMemory")); + /// The [VarHandle] of `recyclePipelineMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_recyclePipelineMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("recyclePipelineMemory")); + /// The [VarHandle] of `maxRenderPassSubpasses` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxRenderPassSubpasses = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxRenderPassSubpasses")); + /// The [VarHandle] of `maxRenderPassDependencies` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxRenderPassDependencies = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxRenderPassDependencies")); + /// The [VarHandle] of `maxSubpassInputAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSubpassInputAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSubpassInputAttachments")); + /// The [VarHandle] of `maxSubpassPreserveAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxSubpassPreserveAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxSubpassPreserveAttachments")); + /// The [VarHandle] of `maxFramebufferAttachments` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxFramebufferAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxFramebufferAttachments")); + /// The [VarHandle] of `maxDescriptorSetLayoutBindings` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxDescriptorSetLayoutBindings = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDescriptorSetLayoutBindings")); + /// The [VarHandle] of `maxQueryFaultCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxQueryFaultCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxQueryFaultCount")); + /// The [VarHandle] of `maxCallbackFaultCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxCallbackFaultCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxCallbackFaultCount")); + /// The [VarHandle] of `maxCommandPoolCommandBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_maxCommandPoolCommandBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxCommandPoolCommandBuffers")); + /// The [VarHandle] of `maxCommandBufferSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_maxCommandBufferSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxCommandBufferSize")); + + /// Creates `VkPhysicalDeviceVulkanSC10Properties` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceVulkanSC10Properties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceVulkanSC10Properties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkanSC10Properties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkanSC10Properties(segment); } + + /// Creates `VkPhysicalDeviceVulkanSC10Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkanSC10Properties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkanSC10Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceVulkanSC10Properties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceVulkanSC10Properties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceVulkanSC10Properties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceVulkanSC10Properties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceVulkanSC10Properties` + public static VkPhysicalDeviceVulkanSC10Properties alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceVulkanSC10Properties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceVulkanSC10Properties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceVulkanSC10Properties` + public static VkPhysicalDeviceVulkanSC10Properties alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceVulkanSC10Properties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceVulkanSC10Properties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkanSC10Properties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceVulkanSC10Properties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties sType(@CType("VkStructureType") int value) { VkPhysicalDeviceVulkanSC10Properties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceVulkanSC10Properties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkanSC10Properties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkanSC10Properties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceVulkanSC10Properties.set_pNext(this.segment(), value); return this; } + + /// {@return `deviceNoDynamicHostAllocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceNoDynamicHostAllocations(MemorySegment segment, long index) { return (int) VH_deviceNoDynamicHostAllocations.get(segment, 0L, index); } + /// {@return `deviceNoDynamicHostAllocations`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceNoDynamicHostAllocations(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_deviceNoDynamicHostAllocations(segment, 0L); } + /// {@return `deviceNoDynamicHostAllocations` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceNoDynamicHostAllocationsAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_deviceNoDynamicHostAllocations(this.segment(), index); } + /// {@return `deviceNoDynamicHostAllocations`} + public @CType("VkBool32") int deviceNoDynamicHostAllocations() { return VkPhysicalDeviceVulkanSC10Properties.get_deviceNoDynamicHostAllocations(this.segment()); } + /// Sets `deviceNoDynamicHostAllocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceNoDynamicHostAllocations(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceNoDynamicHostAllocations.set(segment, 0L, index, value); } + /// Sets `deviceNoDynamicHostAllocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceNoDynamicHostAllocations(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_deviceNoDynamicHostAllocations(segment, 0L, value); } + /// Sets `deviceNoDynamicHostAllocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties deviceNoDynamicHostAllocationsAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_deviceNoDynamicHostAllocations(this.segment(), index, value); return this; } + /// Sets `deviceNoDynamicHostAllocations` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties deviceNoDynamicHostAllocations(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_deviceNoDynamicHostAllocations(this.segment(), value); return this; } + + /// {@return `deviceDestroyFreesMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_deviceDestroyFreesMemory(MemorySegment segment, long index) { return (int) VH_deviceDestroyFreesMemory.get(segment, 0L, index); } + /// {@return `deviceDestroyFreesMemory`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_deviceDestroyFreesMemory(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_deviceDestroyFreesMemory(segment, 0L); } + /// {@return `deviceDestroyFreesMemory` at the given index} + /// @param index the index + public @CType("VkBool32") int deviceDestroyFreesMemoryAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_deviceDestroyFreesMemory(this.segment(), index); } + /// {@return `deviceDestroyFreesMemory`} + public @CType("VkBool32") int deviceDestroyFreesMemory() { return VkPhysicalDeviceVulkanSC10Properties.get_deviceDestroyFreesMemory(this.segment()); } + /// Sets `deviceDestroyFreesMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceDestroyFreesMemory(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_deviceDestroyFreesMemory.set(segment, 0L, index, value); } + /// Sets `deviceDestroyFreesMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceDestroyFreesMemory(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_deviceDestroyFreesMemory(segment, 0L, value); } + /// Sets `deviceDestroyFreesMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties deviceDestroyFreesMemoryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_deviceDestroyFreesMemory(this.segment(), index, value); return this; } + /// Sets `deviceDestroyFreesMemory` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties deviceDestroyFreesMemory(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_deviceDestroyFreesMemory(this.segment(), value); return this; } + + /// {@return `commandPoolMultipleCommandBuffersRecording` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_commandPoolMultipleCommandBuffersRecording(MemorySegment segment, long index) { return (int) VH_commandPoolMultipleCommandBuffersRecording.get(segment, 0L, index); } + /// {@return `commandPoolMultipleCommandBuffersRecording`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_commandPoolMultipleCommandBuffersRecording(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_commandPoolMultipleCommandBuffersRecording(segment, 0L); } + /// {@return `commandPoolMultipleCommandBuffersRecording` at the given index} + /// @param index the index + public @CType("VkBool32") int commandPoolMultipleCommandBuffersRecordingAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_commandPoolMultipleCommandBuffersRecording(this.segment(), index); } + /// {@return `commandPoolMultipleCommandBuffersRecording`} + public @CType("VkBool32") int commandPoolMultipleCommandBuffersRecording() { return VkPhysicalDeviceVulkanSC10Properties.get_commandPoolMultipleCommandBuffersRecording(this.segment()); } + /// Sets `commandPoolMultipleCommandBuffersRecording` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandPoolMultipleCommandBuffersRecording(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_commandPoolMultipleCommandBuffersRecording.set(segment, 0L, index, value); } + /// Sets `commandPoolMultipleCommandBuffersRecording` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandPoolMultipleCommandBuffersRecording(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_commandPoolMultipleCommandBuffersRecording(segment, 0L, value); } + /// Sets `commandPoolMultipleCommandBuffersRecording` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties commandPoolMultipleCommandBuffersRecordingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_commandPoolMultipleCommandBuffersRecording(this.segment(), index, value); return this; } + /// Sets `commandPoolMultipleCommandBuffersRecording` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties commandPoolMultipleCommandBuffersRecording(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_commandPoolMultipleCommandBuffersRecording(this.segment(), value); return this; } + + /// {@return `commandPoolResetCommandBuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_commandPoolResetCommandBuffer(MemorySegment segment, long index) { return (int) VH_commandPoolResetCommandBuffer.get(segment, 0L, index); } + /// {@return `commandPoolResetCommandBuffer`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_commandPoolResetCommandBuffer(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_commandPoolResetCommandBuffer(segment, 0L); } + /// {@return `commandPoolResetCommandBuffer` at the given index} + /// @param index the index + public @CType("VkBool32") int commandPoolResetCommandBufferAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_commandPoolResetCommandBuffer(this.segment(), index); } + /// {@return `commandPoolResetCommandBuffer`} + public @CType("VkBool32") int commandPoolResetCommandBuffer() { return VkPhysicalDeviceVulkanSC10Properties.get_commandPoolResetCommandBuffer(this.segment()); } + /// Sets `commandPoolResetCommandBuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandPoolResetCommandBuffer(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_commandPoolResetCommandBuffer.set(segment, 0L, index, value); } + /// Sets `commandPoolResetCommandBuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandPoolResetCommandBuffer(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_commandPoolResetCommandBuffer(segment, 0L, value); } + /// Sets `commandPoolResetCommandBuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties commandPoolResetCommandBufferAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_commandPoolResetCommandBuffer(this.segment(), index, value); return this; } + /// Sets `commandPoolResetCommandBuffer` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties commandPoolResetCommandBuffer(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_commandPoolResetCommandBuffer(this.segment(), value); return this; } + + /// {@return `commandBufferSimultaneousUse` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_commandBufferSimultaneousUse(MemorySegment segment, long index) { return (int) VH_commandBufferSimultaneousUse.get(segment, 0L, index); } + /// {@return `commandBufferSimultaneousUse`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_commandBufferSimultaneousUse(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_commandBufferSimultaneousUse(segment, 0L); } + /// {@return `commandBufferSimultaneousUse` at the given index} + /// @param index the index + public @CType("VkBool32") int commandBufferSimultaneousUseAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_commandBufferSimultaneousUse(this.segment(), index); } + /// {@return `commandBufferSimultaneousUse`} + public @CType("VkBool32") int commandBufferSimultaneousUse() { return VkPhysicalDeviceVulkanSC10Properties.get_commandBufferSimultaneousUse(this.segment()); } + /// Sets `commandBufferSimultaneousUse` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandBufferSimultaneousUse(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_commandBufferSimultaneousUse.set(segment, 0L, index, value); } + /// Sets `commandBufferSimultaneousUse` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandBufferSimultaneousUse(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_commandBufferSimultaneousUse(segment, 0L, value); } + /// Sets `commandBufferSimultaneousUse` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties commandBufferSimultaneousUseAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_commandBufferSimultaneousUse(this.segment(), index, value); return this; } + /// Sets `commandBufferSimultaneousUse` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties commandBufferSimultaneousUse(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_commandBufferSimultaneousUse(this.segment(), value); return this; } + + /// {@return `secondaryCommandBufferNullOrImagelessFramebuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_secondaryCommandBufferNullOrImagelessFramebuffer(MemorySegment segment, long index) { return (int) VH_secondaryCommandBufferNullOrImagelessFramebuffer.get(segment, 0L, index); } + /// {@return `secondaryCommandBufferNullOrImagelessFramebuffer`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_secondaryCommandBufferNullOrImagelessFramebuffer(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_secondaryCommandBufferNullOrImagelessFramebuffer(segment, 0L); } + /// {@return `secondaryCommandBufferNullOrImagelessFramebuffer` at the given index} + /// @param index the index + public @CType("VkBool32") int secondaryCommandBufferNullOrImagelessFramebufferAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_secondaryCommandBufferNullOrImagelessFramebuffer(this.segment(), index); } + /// {@return `secondaryCommandBufferNullOrImagelessFramebuffer`} + public @CType("VkBool32") int secondaryCommandBufferNullOrImagelessFramebuffer() { return VkPhysicalDeviceVulkanSC10Properties.get_secondaryCommandBufferNullOrImagelessFramebuffer(this.segment()); } + /// Sets `secondaryCommandBufferNullOrImagelessFramebuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_secondaryCommandBufferNullOrImagelessFramebuffer(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_secondaryCommandBufferNullOrImagelessFramebuffer.set(segment, 0L, index, value); } + /// Sets `secondaryCommandBufferNullOrImagelessFramebuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_secondaryCommandBufferNullOrImagelessFramebuffer(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_secondaryCommandBufferNullOrImagelessFramebuffer(segment, 0L, value); } + /// Sets `secondaryCommandBufferNullOrImagelessFramebuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties secondaryCommandBufferNullOrImagelessFramebufferAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_secondaryCommandBufferNullOrImagelessFramebuffer(this.segment(), index, value); return this; } + /// Sets `secondaryCommandBufferNullOrImagelessFramebuffer` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties secondaryCommandBufferNullOrImagelessFramebuffer(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_secondaryCommandBufferNullOrImagelessFramebuffer(this.segment(), value); return this; } + + /// {@return `recycleDescriptorSetMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_recycleDescriptorSetMemory(MemorySegment segment, long index) { return (int) VH_recycleDescriptorSetMemory.get(segment, 0L, index); } + /// {@return `recycleDescriptorSetMemory`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_recycleDescriptorSetMemory(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_recycleDescriptorSetMemory(segment, 0L); } + /// {@return `recycleDescriptorSetMemory` at the given index} + /// @param index the index + public @CType("VkBool32") int recycleDescriptorSetMemoryAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_recycleDescriptorSetMemory(this.segment(), index); } + /// {@return `recycleDescriptorSetMemory`} + public @CType("VkBool32") int recycleDescriptorSetMemory() { return VkPhysicalDeviceVulkanSC10Properties.get_recycleDescriptorSetMemory(this.segment()); } + /// Sets `recycleDescriptorSetMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_recycleDescriptorSetMemory(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_recycleDescriptorSetMemory.set(segment, 0L, index, value); } + /// Sets `recycleDescriptorSetMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_recycleDescriptorSetMemory(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_recycleDescriptorSetMemory(segment, 0L, value); } + /// Sets `recycleDescriptorSetMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties recycleDescriptorSetMemoryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_recycleDescriptorSetMemory(this.segment(), index, value); return this; } + /// Sets `recycleDescriptorSetMemory` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties recycleDescriptorSetMemory(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_recycleDescriptorSetMemory(this.segment(), value); return this; } + + /// {@return `recyclePipelineMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_recyclePipelineMemory(MemorySegment segment, long index) { return (int) VH_recyclePipelineMemory.get(segment, 0L, index); } + /// {@return `recyclePipelineMemory`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_recyclePipelineMemory(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_recyclePipelineMemory(segment, 0L); } + /// {@return `recyclePipelineMemory` at the given index} + /// @param index the index + public @CType("VkBool32") int recyclePipelineMemoryAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_recyclePipelineMemory(this.segment(), index); } + /// {@return `recyclePipelineMemory`} + public @CType("VkBool32") int recyclePipelineMemory() { return VkPhysicalDeviceVulkanSC10Properties.get_recyclePipelineMemory(this.segment()); } + /// Sets `recyclePipelineMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_recyclePipelineMemory(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_recyclePipelineMemory.set(segment, 0L, index, value); } + /// Sets `recyclePipelineMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_recyclePipelineMemory(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_recyclePipelineMemory(segment, 0L, value); } + /// Sets `recyclePipelineMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties recyclePipelineMemoryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_recyclePipelineMemory(this.segment(), index, value); return this; } + /// Sets `recyclePipelineMemory` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties recyclePipelineMemory(@CType("VkBool32") int value) { VkPhysicalDeviceVulkanSC10Properties.set_recyclePipelineMemory(this.segment(), value); return this; } + + /// {@return `maxRenderPassSubpasses` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxRenderPassSubpasses(MemorySegment segment, long index) { return (int) VH_maxRenderPassSubpasses.get(segment, 0L, index); } + /// {@return `maxRenderPassSubpasses`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxRenderPassSubpasses(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_maxRenderPassSubpasses(segment, 0L); } + /// {@return `maxRenderPassSubpasses` at the given index} + /// @param index the index + public @CType("uint32_t") int maxRenderPassSubpassesAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_maxRenderPassSubpasses(this.segment(), index); } + /// {@return `maxRenderPassSubpasses`} + public @CType("uint32_t") int maxRenderPassSubpasses() { return VkPhysicalDeviceVulkanSC10Properties.get_maxRenderPassSubpasses(this.segment()); } + /// Sets `maxRenderPassSubpasses` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxRenderPassSubpasses(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxRenderPassSubpasses.set(segment, 0L, index, value); } + /// Sets `maxRenderPassSubpasses` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxRenderPassSubpasses(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxRenderPassSubpasses(segment, 0L, value); } + /// Sets `maxRenderPassSubpasses` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxRenderPassSubpassesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxRenderPassSubpasses(this.segment(), index, value); return this; } + /// Sets `maxRenderPassSubpasses` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxRenderPassSubpasses(@CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxRenderPassSubpasses(this.segment(), value); return this; } + + /// {@return `maxRenderPassDependencies` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxRenderPassDependencies(MemorySegment segment, long index) { return (int) VH_maxRenderPassDependencies.get(segment, 0L, index); } + /// {@return `maxRenderPassDependencies`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxRenderPassDependencies(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_maxRenderPassDependencies(segment, 0L); } + /// {@return `maxRenderPassDependencies` at the given index} + /// @param index the index + public @CType("uint32_t") int maxRenderPassDependenciesAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_maxRenderPassDependencies(this.segment(), index); } + /// {@return `maxRenderPassDependencies`} + public @CType("uint32_t") int maxRenderPassDependencies() { return VkPhysicalDeviceVulkanSC10Properties.get_maxRenderPassDependencies(this.segment()); } + /// Sets `maxRenderPassDependencies` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxRenderPassDependencies(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxRenderPassDependencies.set(segment, 0L, index, value); } + /// Sets `maxRenderPassDependencies` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxRenderPassDependencies(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxRenderPassDependencies(segment, 0L, value); } + /// Sets `maxRenderPassDependencies` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxRenderPassDependenciesAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxRenderPassDependencies(this.segment(), index, value); return this; } + /// Sets `maxRenderPassDependencies` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxRenderPassDependencies(@CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxRenderPassDependencies(this.segment(), value); return this; } + + /// {@return `maxSubpassInputAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSubpassInputAttachments(MemorySegment segment, long index) { return (int) VH_maxSubpassInputAttachments.get(segment, 0L, index); } + /// {@return `maxSubpassInputAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSubpassInputAttachments(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_maxSubpassInputAttachments(segment, 0L); } + /// {@return `maxSubpassInputAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSubpassInputAttachmentsAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_maxSubpassInputAttachments(this.segment(), index); } + /// {@return `maxSubpassInputAttachments`} + public @CType("uint32_t") int maxSubpassInputAttachments() { return VkPhysicalDeviceVulkanSC10Properties.get_maxSubpassInputAttachments(this.segment()); } + /// Sets `maxSubpassInputAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSubpassInputAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSubpassInputAttachments.set(segment, 0L, index, value); } + /// Sets `maxSubpassInputAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSubpassInputAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxSubpassInputAttachments(segment, 0L, value); } + /// Sets `maxSubpassInputAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxSubpassInputAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxSubpassInputAttachments(this.segment(), index, value); return this; } + /// Sets `maxSubpassInputAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxSubpassInputAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxSubpassInputAttachments(this.segment(), value); return this; } + + /// {@return `maxSubpassPreserveAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxSubpassPreserveAttachments(MemorySegment segment, long index) { return (int) VH_maxSubpassPreserveAttachments.get(segment, 0L, index); } + /// {@return `maxSubpassPreserveAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxSubpassPreserveAttachments(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_maxSubpassPreserveAttachments(segment, 0L); } + /// {@return `maxSubpassPreserveAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxSubpassPreserveAttachmentsAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_maxSubpassPreserveAttachments(this.segment(), index); } + /// {@return `maxSubpassPreserveAttachments`} + public @CType("uint32_t") int maxSubpassPreserveAttachments() { return VkPhysicalDeviceVulkanSC10Properties.get_maxSubpassPreserveAttachments(this.segment()); } + /// Sets `maxSubpassPreserveAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxSubpassPreserveAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxSubpassPreserveAttachments.set(segment, 0L, index, value); } + /// Sets `maxSubpassPreserveAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxSubpassPreserveAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxSubpassPreserveAttachments(segment, 0L, value); } + /// Sets `maxSubpassPreserveAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxSubpassPreserveAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxSubpassPreserveAttachments(this.segment(), index, value); return this; } + /// Sets `maxSubpassPreserveAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxSubpassPreserveAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxSubpassPreserveAttachments(this.segment(), value); return this; } + + /// {@return `maxFramebufferAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxFramebufferAttachments(MemorySegment segment, long index) { return (int) VH_maxFramebufferAttachments.get(segment, 0L, index); } + /// {@return `maxFramebufferAttachments`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxFramebufferAttachments(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_maxFramebufferAttachments(segment, 0L); } + /// {@return `maxFramebufferAttachments` at the given index} + /// @param index the index + public @CType("uint32_t") int maxFramebufferAttachmentsAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_maxFramebufferAttachments(this.segment(), index); } + /// {@return `maxFramebufferAttachments`} + public @CType("uint32_t") int maxFramebufferAttachments() { return VkPhysicalDeviceVulkanSC10Properties.get_maxFramebufferAttachments(this.segment()); } + /// Sets `maxFramebufferAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxFramebufferAttachments(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxFramebufferAttachments.set(segment, 0L, index, value); } + /// Sets `maxFramebufferAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxFramebufferAttachments(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxFramebufferAttachments(segment, 0L, value); } + /// Sets `maxFramebufferAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxFramebufferAttachmentsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxFramebufferAttachments(this.segment(), index, value); return this; } + /// Sets `maxFramebufferAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxFramebufferAttachments(@CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxFramebufferAttachments(this.segment(), value); return this; } + + /// {@return `maxDescriptorSetLayoutBindings` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxDescriptorSetLayoutBindings(MemorySegment segment, long index) { return (int) VH_maxDescriptorSetLayoutBindings.get(segment, 0L, index); } + /// {@return `maxDescriptorSetLayoutBindings`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxDescriptorSetLayoutBindings(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_maxDescriptorSetLayoutBindings(segment, 0L); } + /// {@return `maxDescriptorSetLayoutBindings` at the given index} + /// @param index the index + public @CType("uint32_t") int maxDescriptorSetLayoutBindingsAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_maxDescriptorSetLayoutBindings(this.segment(), index); } + /// {@return `maxDescriptorSetLayoutBindings`} + public @CType("uint32_t") int maxDescriptorSetLayoutBindings() { return VkPhysicalDeviceVulkanSC10Properties.get_maxDescriptorSetLayoutBindings(this.segment()); } + /// Sets `maxDescriptorSetLayoutBindings` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDescriptorSetLayoutBindings(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxDescriptorSetLayoutBindings.set(segment, 0L, index, value); } + /// Sets `maxDescriptorSetLayoutBindings` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDescriptorSetLayoutBindings(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxDescriptorSetLayoutBindings(segment, 0L, value); } + /// Sets `maxDescriptorSetLayoutBindings` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxDescriptorSetLayoutBindingsAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxDescriptorSetLayoutBindings(this.segment(), index, value); return this; } + /// Sets `maxDescriptorSetLayoutBindings` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxDescriptorSetLayoutBindings(@CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxDescriptorSetLayoutBindings(this.segment(), value); return this; } + + /// {@return `maxQueryFaultCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxQueryFaultCount(MemorySegment segment, long index) { return (int) VH_maxQueryFaultCount.get(segment, 0L, index); } + /// {@return `maxQueryFaultCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxQueryFaultCount(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_maxQueryFaultCount(segment, 0L); } + /// {@return `maxQueryFaultCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxQueryFaultCountAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_maxQueryFaultCount(this.segment(), index); } + /// {@return `maxQueryFaultCount`} + public @CType("uint32_t") int maxQueryFaultCount() { return VkPhysicalDeviceVulkanSC10Properties.get_maxQueryFaultCount(this.segment()); } + /// Sets `maxQueryFaultCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxQueryFaultCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxQueryFaultCount.set(segment, 0L, index, value); } + /// Sets `maxQueryFaultCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxQueryFaultCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxQueryFaultCount(segment, 0L, value); } + /// Sets `maxQueryFaultCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxQueryFaultCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxQueryFaultCount(this.segment(), index, value); return this; } + /// Sets `maxQueryFaultCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxQueryFaultCount(@CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxQueryFaultCount(this.segment(), value); return this; } + + /// {@return `maxCallbackFaultCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxCallbackFaultCount(MemorySegment segment, long index) { return (int) VH_maxCallbackFaultCount.get(segment, 0L, index); } + /// {@return `maxCallbackFaultCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxCallbackFaultCount(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_maxCallbackFaultCount(segment, 0L); } + /// {@return `maxCallbackFaultCount` at the given index} + /// @param index the index + public @CType("uint32_t") int maxCallbackFaultCountAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_maxCallbackFaultCount(this.segment(), index); } + /// {@return `maxCallbackFaultCount`} + public @CType("uint32_t") int maxCallbackFaultCount() { return VkPhysicalDeviceVulkanSC10Properties.get_maxCallbackFaultCount(this.segment()); } + /// Sets `maxCallbackFaultCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCallbackFaultCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxCallbackFaultCount.set(segment, 0L, index, value); } + /// Sets `maxCallbackFaultCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCallbackFaultCount(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxCallbackFaultCount(segment, 0L, value); } + /// Sets `maxCallbackFaultCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxCallbackFaultCountAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxCallbackFaultCount(this.segment(), index, value); return this; } + /// Sets `maxCallbackFaultCount` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxCallbackFaultCount(@CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxCallbackFaultCount(this.segment(), value); return this; } + + /// {@return `maxCommandPoolCommandBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_maxCommandPoolCommandBuffers(MemorySegment segment, long index) { return (int) VH_maxCommandPoolCommandBuffers.get(segment, 0L, index); } + /// {@return `maxCommandPoolCommandBuffers`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_maxCommandPoolCommandBuffers(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_maxCommandPoolCommandBuffers(segment, 0L); } + /// {@return `maxCommandPoolCommandBuffers` at the given index} + /// @param index the index + public @CType("uint32_t") int maxCommandPoolCommandBuffersAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_maxCommandPoolCommandBuffers(this.segment(), index); } + /// {@return `maxCommandPoolCommandBuffers`} + public @CType("uint32_t") int maxCommandPoolCommandBuffers() { return VkPhysicalDeviceVulkanSC10Properties.get_maxCommandPoolCommandBuffers(this.segment()); } + /// Sets `maxCommandPoolCommandBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCommandPoolCommandBuffers(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_maxCommandPoolCommandBuffers.set(segment, 0L, index, value); } + /// Sets `maxCommandPoolCommandBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCommandPoolCommandBuffers(MemorySegment segment, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxCommandPoolCommandBuffers(segment, 0L, value); } + /// Sets `maxCommandPoolCommandBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxCommandPoolCommandBuffersAt(long index, @CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxCommandPoolCommandBuffers(this.segment(), index, value); return this; } + /// Sets `maxCommandPoolCommandBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxCommandPoolCommandBuffers(@CType("uint32_t") int value) { VkPhysicalDeviceVulkanSC10Properties.set_maxCommandPoolCommandBuffers(this.segment(), value); return this; } + + /// {@return `maxCommandBufferSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_maxCommandBufferSize(MemorySegment segment, long index) { return (long) VH_maxCommandBufferSize.get(segment, 0L, index); } + /// {@return `maxCommandBufferSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_maxCommandBufferSize(MemorySegment segment) { return VkPhysicalDeviceVulkanSC10Properties.get_maxCommandBufferSize(segment, 0L); } + /// {@return `maxCommandBufferSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long maxCommandBufferSizeAt(long index) { return VkPhysicalDeviceVulkanSC10Properties.get_maxCommandBufferSize(this.segment(), index); } + /// {@return `maxCommandBufferSize`} + public @CType("VkDeviceSize") long maxCommandBufferSize() { return VkPhysicalDeviceVulkanSC10Properties.get_maxCommandBufferSize(this.segment()); } + /// Sets `maxCommandBufferSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxCommandBufferSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_maxCommandBufferSize.set(segment, 0L, index, value); } + /// Sets `maxCommandBufferSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxCommandBufferSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkanSC10Properties.set_maxCommandBufferSize(segment, 0L, value); } + /// Sets `maxCommandBufferSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxCommandBufferSizeAt(long index, @CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkanSC10Properties.set_maxCommandBufferSize(this.segment(), index, value); return this; } + /// Sets `maxCommandBufferSize` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceVulkanSC10Properties maxCommandBufferSize(@CType("VkDeviceSize") long value) { VkPhysicalDeviceVulkanSC10Properties.set_maxCommandBufferSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.java new file mode 100644 index 00000000..cef69ceb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### shaderZeroInitializeWorkgroupMemory +/// [VarHandle][#VH_shaderZeroInitializeWorkgroupMemory] - [Getter][#shaderZeroInitializeWorkgroupMemory()] - [Setter][#shaderZeroInitializeWorkgroupMemory(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 shaderZeroInitializeWorkgroupMemory; +/// } VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; +/// ``` +public final class VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures extends Struct { + /// The struct layout of `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("shaderZeroInitializeWorkgroupMemory") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `shaderZeroInitializeWorkgroupMemory` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_shaderZeroInitializeWorkgroupMemory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("shaderZeroInitializeWorkgroupMemory")); + + /// Creates `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(segment); } + + /// Creates `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures` + public static VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures` + public static VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures sType(@CType("VkStructureType") int value) { VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.set_pNext(this.segment(), value); return this; } + + /// {@return `shaderZeroInitializeWorkgroupMemory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_shaderZeroInitializeWorkgroupMemory(MemorySegment segment, long index) { return (int) VH_shaderZeroInitializeWorkgroupMemory.get(segment, 0L, index); } + /// {@return `shaderZeroInitializeWorkgroupMemory`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_shaderZeroInitializeWorkgroupMemory(MemorySegment segment) { return VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.get_shaderZeroInitializeWorkgroupMemory(segment, 0L); } + /// {@return `shaderZeroInitializeWorkgroupMemory` at the given index} + /// @param index the index + public @CType("VkBool32") int shaderZeroInitializeWorkgroupMemoryAt(long index) { return VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.get_shaderZeroInitializeWorkgroupMemory(this.segment(), index); } + /// {@return `shaderZeroInitializeWorkgroupMemory`} + public @CType("VkBool32") int shaderZeroInitializeWorkgroupMemory() { return VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.get_shaderZeroInitializeWorkgroupMemory(this.segment()); } + /// Sets `shaderZeroInitializeWorkgroupMemory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_shaderZeroInitializeWorkgroupMemory(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_shaderZeroInitializeWorkgroupMemory.set(segment, 0L, index, value); } + /// Sets `shaderZeroInitializeWorkgroupMemory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_shaderZeroInitializeWorkgroupMemory(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.set_shaderZeroInitializeWorkgroupMemory(segment, 0L, value); } + /// Sets `shaderZeroInitializeWorkgroupMemory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures shaderZeroInitializeWorkgroupMemoryAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.set_shaderZeroInitializeWorkgroupMemory(this.segment(), index, value); return this; } + /// Sets `shaderZeroInitializeWorkgroupMemory` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures shaderZeroInitializeWorkgroupMemory(@CType("VkBool32") int value) { VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.set_shaderZeroInitializeWorkgroupMemory(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheCreateInfo.java new file mode 100644 index 00000000..013cb560 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheCreateInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### initialDataSize +/// [VarHandle][#VH_initialDataSize] - [Getter][#initialDataSize()] - [Setter][#initialDataSize(long)] +/// ### pInitialData +/// [VarHandle][#VH_pInitialData] - [Getter][#pInitialData()] - [Setter][#pInitialData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCacheCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCacheCreateFlags flags; +/// size_t initialDataSize; +/// const void * pInitialData; +/// } VkPipelineCacheCreateInfo; +/// ``` +public final class VkPipelineCacheCreateInfo extends Struct { + /// The struct layout of `VkPipelineCacheCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("initialDataSize"), + ValueLayout.ADDRESS.withName("pInitialData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `initialDataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_initialDataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initialDataSize")); + /// The [VarHandle] of `pInitialData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pInitialData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pInitialData")); + + /// Creates `VkPipelineCacheCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineCacheCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCacheCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheCreateInfo(segment); } + + /// Creates `VkPipelineCacheCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCacheCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCacheCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCacheCreateInfo` + public static VkPipelineCacheCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineCacheCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCacheCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCacheCreateInfo` + public static VkPipelineCacheCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineCacheCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineCacheCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineCacheCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineCacheCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineCacheCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineCacheCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineCacheCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineCacheCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineCacheCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineCacheCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCacheCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCacheCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCacheCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCacheCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCacheCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineCacheCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCacheCreateFlags") int flagsAt(long index) { return VkPipelineCacheCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCacheCreateFlags") int flags() { return VkPipelineCacheCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCacheCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCacheCreateFlags") int value) { VkPipelineCacheCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheCreateInfo flagsAt(long index, @CType("VkPipelineCacheCreateFlags") int value) { VkPipelineCacheCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheCreateInfo flags(@CType("VkPipelineCacheCreateFlags") int value) { VkPipelineCacheCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `initialDataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_initialDataSize(MemorySegment segment, long index) { return (long) VH_initialDataSize.get(segment, 0L, index); } + /// {@return `initialDataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_initialDataSize(MemorySegment segment) { return VkPipelineCacheCreateInfo.get_initialDataSize(segment, 0L); } + /// {@return `initialDataSize` at the given index} + /// @param index the index + public @CType("size_t") long initialDataSizeAt(long index) { return VkPipelineCacheCreateInfo.get_initialDataSize(this.segment(), index); } + /// {@return `initialDataSize`} + public @CType("size_t") long initialDataSize() { return VkPipelineCacheCreateInfo.get_initialDataSize(this.segment()); } + /// Sets `initialDataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initialDataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_initialDataSize.set(segment, 0L, index, value); } + /// Sets `initialDataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initialDataSize(MemorySegment segment, @CType("size_t") long value) { VkPipelineCacheCreateInfo.set_initialDataSize(segment, 0L, value); } + /// Sets `initialDataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheCreateInfo initialDataSizeAt(long index, @CType("size_t") long value) { VkPipelineCacheCreateInfo.set_initialDataSize(this.segment(), index, value); return this; } + /// Sets `initialDataSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheCreateInfo initialDataSize(@CType("size_t") long value) { VkPipelineCacheCreateInfo.set_initialDataSize(this.segment(), value); return this; } + + /// {@return `pInitialData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pInitialData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pInitialData.get(segment, 0L, index); } + /// {@return `pInitialData`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pInitialData(MemorySegment segment) { return VkPipelineCacheCreateInfo.get_pInitialData(segment, 0L); } + /// {@return `pInitialData` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pInitialDataAt(long index) { return VkPipelineCacheCreateInfo.get_pInitialData(this.segment(), index); } + /// {@return `pInitialData`} + public @CType("const void *") java.lang.foreign.MemorySegment pInitialData() { return VkPipelineCacheCreateInfo.get_pInitialData(this.segment()); } + /// Sets `pInitialData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pInitialData(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pInitialData.set(segment, 0L, index, value); } + /// Sets `pInitialData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pInitialData(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCacheCreateInfo.set_pInitialData(segment, 0L, value); } + /// Sets `pInitialData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheCreateInfo pInitialDataAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCacheCreateInfo.set_pInitialData(this.segment(), index, value); return this; } + /// Sets `pInitialData` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheCreateInfo pInitialData(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCacheCreateInfo.set_pInitialData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheHeaderVersionOne.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheHeaderVersionOne.java new file mode 100644 index 00000000..10abf489 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheHeaderVersionOne.java @@ -0,0 +1,276 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### headerSize +/// [VarHandle][#VH_headerSize] - [Getter][#headerSize()] - [Setter][#headerSize(int)] +/// ### headerVersion +/// [VarHandle][#VH_headerVersion] - [Getter][#headerVersion()] - [Setter][#headerVersion(int)] +/// ### vendorID +/// [VarHandle][#VH_vendorID] - [Getter][#vendorID()] - [Setter][#vendorID(int)] +/// ### deviceID +/// [VarHandle][#VH_deviceID] - [Getter][#deviceID()] - [Setter][#deviceID(int)] +/// ### pipelineCacheUUID +/// [Byte offset handle][#MH_pipelineCacheUUID] - [Memory layout][#ML_pipelineCacheUUID] - [Getter][#pipelineCacheUUID(long)] - [Setter][#pipelineCacheUUID(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCacheHeaderVersionOne { +/// uint32_t headerSize; +/// VkPipelineCacheHeaderVersion headerVersion; +/// uint32_t vendorID; +/// uint32_t deviceID; +/// uint8_t[VK_UUID_SIZE] pipelineCacheUUID; +/// } VkPipelineCacheHeaderVersionOne; +/// ``` +public final class VkPipelineCacheHeaderVersionOne extends Struct { + /// The struct layout of `VkPipelineCacheHeaderVersionOne`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("headerSize"), + ValueLayout.JAVA_INT.withName("headerVersion"), + ValueLayout.JAVA_INT.withName("vendorID"), + ValueLayout.JAVA_INT.withName("deviceID"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("pipelineCacheUUID") + ); + /// The [VarHandle] of `headerSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_headerSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("headerSize")); + /// The [VarHandle] of `headerVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_headerVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("headerVersion")); + /// The [VarHandle] of `vendorID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vendorID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vendorID")); + /// The [VarHandle] of `deviceID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceID")); + /// The byte offset handle of `pipelineCacheUUID` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_pipelineCacheUUID = LAYOUT.byteOffsetHandle(PathElement.groupElement("pipelineCacheUUID"), PathElement.sequenceElement()); + /// The memory layout of `pipelineCacheUUID`. + public static final MemoryLayout ML_pipelineCacheUUID = LAYOUT.select(PathElement.groupElement("pipelineCacheUUID")); + + /// Creates `VkPipelineCacheHeaderVersionOne` with the given segment. + /// @param segment the memory segment + public VkPipelineCacheHeaderVersionOne(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCacheHeaderVersionOne` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheHeaderVersionOne of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheHeaderVersionOne(segment); } + + /// Creates `VkPipelineCacheHeaderVersionOne` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheHeaderVersionOne ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheHeaderVersionOne(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCacheHeaderVersionOne` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheHeaderVersionOne ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheHeaderVersionOne(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCacheHeaderVersionOne` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCacheHeaderVersionOne` + public static VkPipelineCacheHeaderVersionOne alloc(SegmentAllocator allocator) { return new VkPipelineCacheHeaderVersionOne(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCacheHeaderVersionOne` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCacheHeaderVersionOne` + public static VkPipelineCacheHeaderVersionOne alloc(SegmentAllocator allocator, long count) { return new VkPipelineCacheHeaderVersionOne(allocator.allocate(LAYOUT, count)); } + + /// {@return `headerSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_headerSize(MemorySegment segment, long index) { return (int) VH_headerSize.get(segment, 0L, index); } + /// {@return `headerSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_headerSize(MemorySegment segment) { return VkPipelineCacheHeaderVersionOne.get_headerSize(segment, 0L); } + /// {@return `headerSize` at the given index} + /// @param index the index + public @CType("uint32_t") int headerSizeAt(long index) { return VkPipelineCacheHeaderVersionOne.get_headerSize(this.segment(), index); } + /// {@return `headerSize`} + public @CType("uint32_t") int headerSize() { return VkPipelineCacheHeaderVersionOne.get_headerSize(this.segment()); } + /// Sets `headerSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_headerSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_headerSize.set(segment, 0L, index, value); } + /// Sets `headerSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_headerSize(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionOne.set_headerSize(segment, 0L, value); } + /// Sets `headerSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionOne headerSizeAt(long index, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionOne.set_headerSize(this.segment(), index, value); return this; } + /// Sets `headerSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionOne headerSize(@CType("uint32_t") int value) { VkPipelineCacheHeaderVersionOne.set_headerSize(this.segment(), value); return this; } + + /// {@return `headerVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCacheHeaderVersion") int get_headerVersion(MemorySegment segment, long index) { return (int) VH_headerVersion.get(segment, 0L, index); } + /// {@return `headerVersion`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCacheHeaderVersion") int get_headerVersion(MemorySegment segment) { return VkPipelineCacheHeaderVersionOne.get_headerVersion(segment, 0L); } + /// {@return `headerVersion` at the given index} + /// @param index the index + public @CType("VkPipelineCacheHeaderVersion") int headerVersionAt(long index) { return VkPipelineCacheHeaderVersionOne.get_headerVersion(this.segment(), index); } + /// {@return `headerVersion`} + public @CType("VkPipelineCacheHeaderVersion") int headerVersion() { return VkPipelineCacheHeaderVersionOne.get_headerVersion(this.segment()); } + /// Sets `headerVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_headerVersion(MemorySegment segment, long index, @CType("VkPipelineCacheHeaderVersion") int value) { VH_headerVersion.set(segment, 0L, index, value); } + /// Sets `headerVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_headerVersion(MemorySegment segment, @CType("VkPipelineCacheHeaderVersion") int value) { VkPipelineCacheHeaderVersionOne.set_headerVersion(segment, 0L, value); } + /// Sets `headerVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionOne headerVersionAt(long index, @CType("VkPipelineCacheHeaderVersion") int value) { VkPipelineCacheHeaderVersionOne.set_headerVersion(this.segment(), index, value); return this; } + /// Sets `headerVersion` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionOne headerVersion(@CType("VkPipelineCacheHeaderVersion") int value) { VkPipelineCacheHeaderVersionOne.set_headerVersion(this.segment(), value); return this; } + + /// {@return `vendorID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vendorID(MemorySegment segment, long index) { return (int) VH_vendorID.get(segment, 0L, index); } + /// {@return `vendorID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vendorID(MemorySegment segment) { return VkPipelineCacheHeaderVersionOne.get_vendorID(segment, 0L); } + /// {@return `vendorID` at the given index} + /// @param index the index + public @CType("uint32_t") int vendorIDAt(long index) { return VkPipelineCacheHeaderVersionOne.get_vendorID(this.segment(), index); } + /// {@return `vendorID`} + public @CType("uint32_t") int vendorID() { return VkPipelineCacheHeaderVersionOne.get_vendorID(this.segment()); } + /// Sets `vendorID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vendorID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vendorID.set(segment, 0L, index, value); } + /// Sets `vendorID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vendorID(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionOne.set_vendorID(segment, 0L, value); } + /// Sets `vendorID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionOne vendorIDAt(long index, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionOne.set_vendorID(this.segment(), index, value); return this; } + /// Sets `vendorID` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionOne vendorID(@CType("uint32_t") int value) { VkPipelineCacheHeaderVersionOne.set_vendorID(this.segment(), value); return this; } + + /// {@return `deviceID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceID(MemorySegment segment, long index) { return (int) VH_deviceID.get(segment, 0L, index); } + /// {@return `deviceID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceID(MemorySegment segment) { return VkPipelineCacheHeaderVersionOne.get_deviceID(segment, 0L); } + /// {@return `deviceID` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceIDAt(long index) { return VkPipelineCacheHeaderVersionOne.get_deviceID(this.segment(), index); } + /// {@return `deviceID`} + public @CType("uint32_t") int deviceID() { return VkPipelineCacheHeaderVersionOne.get_deviceID(this.segment()); } + /// Sets `deviceID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceID.set(segment, 0L, index, value); } + /// Sets `deviceID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceID(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionOne.set_deviceID(segment, 0L, value); } + /// Sets `deviceID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionOne deviceIDAt(long index, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionOne.set_deviceID(this.segment(), index, value); return this; } + /// Sets `deviceID` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionOne deviceID(@CType("uint32_t") int value) { VkPipelineCacheHeaderVersionOne.set_deviceID(this.segment(), value); return this; } + + /// {@return `pipelineCacheUUID` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineCacheUUID(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_pipelineCacheUUID.invokeExact(0L, elementIndex), index), ML_pipelineCacheUUID); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `pipelineCacheUUID`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineCacheUUID(MemorySegment segment, long elementIndex) { return VkPipelineCacheHeaderVersionOne.get_pipelineCacheUUID(segment, 0L, elementIndex); } + /// {@return `pipelineCacheUUID` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineCacheUUIDAt(long index, long elementIndex) { return VkPipelineCacheHeaderVersionOne.get_pipelineCacheUUID(this.segment(), index, elementIndex); } + /// {@return `pipelineCacheUUID`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineCacheUUID(long elementIndex) { return VkPipelineCacheHeaderVersionOne.get_pipelineCacheUUID(this.segment(), elementIndex); } + /// Sets `pipelineCacheUUID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineCacheUUID(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_pipelineCacheUUID.invokeExact(0L, elementIndex), index), ML_pipelineCacheUUID.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `pipelineCacheUUID` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineCacheUUID(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineCacheHeaderVersionOne.set_pipelineCacheUUID(segment, 0L, elementIndex, value); } + /// Sets `pipelineCacheUUID` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionOne pipelineCacheUUIDAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineCacheHeaderVersionOne.set_pipelineCacheUUID(this.segment(), index, elementIndex, value); return this; } + /// Sets `pipelineCacheUUID` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionOne pipelineCacheUUID(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineCacheHeaderVersionOne.set_pipelineCacheUUID(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheHeaderVersionSafetyCriticalOne.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheHeaderVersionSafetyCriticalOne.java new file mode 100644 index 00000000..d61e3676 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheHeaderVersionSafetyCriticalOne.java @@ -0,0 +1,298 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### headerVersionOne +/// [Byte offset][#OFFSET_headerVersionOne] - [Memory layout][#ML_headerVersionOne] - [Getter][#headerVersionOne()] - [Setter][#headerVersionOne(java.lang.foreign.MemorySegment)] +/// ### validationVersion +/// [VarHandle][#VH_validationVersion] - [Getter][#validationVersion()] - [Setter][#validationVersion(int)] +/// ### implementationData +/// [VarHandle][#VH_implementationData] - [Getter][#implementationData()] - [Setter][#implementationData(int)] +/// ### pipelineIndexCount +/// [VarHandle][#VH_pipelineIndexCount] - [Getter][#pipelineIndexCount()] - [Setter][#pipelineIndexCount(int)] +/// ### pipelineIndexStride +/// [VarHandle][#VH_pipelineIndexStride] - [Getter][#pipelineIndexStride()] - [Setter][#pipelineIndexStride(int)] +/// ### pipelineIndexOffset +/// [VarHandle][#VH_pipelineIndexOffset] - [Getter][#pipelineIndexOffset()] - [Setter][#pipelineIndexOffset(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCacheHeaderVersionSafetyCriticalOne { +/// VkPipelineCacheHeaderVersionOne headerVersionOne; +/// VkPipelineCacheValidationVersion validationVersion; +/// uint32_t implementationData; +/// uint32_t pipelineIndexCount; +/// uint32_t pipelineIndexStride; +/// uint64_t pipelineIndexOffset; +/// } VkPipelineCacheHeaderVersionSafetyCriticalOne; +/// ``` +public final class VkPipelineCacheHeaderVersionSafetyCriticalOne extends Struct { + /// The struct layout of `VkPipelineCacheHeaderVersionSafetyCriticalOne`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkPipelineCacheHeaderVersionOne.LAYOUT.withName("headerVersionOne"), + ValueLayout.JAVA_INT.withName("validationVersion"), + ValueLayout.JAVA_INT.withName("implementationData"), + ValueLayout.JAVA_INT.withName("pipelineIndexCount"), + ValueLayout.JAVA_INT.withName("pipelineIndexStride"), + ValueLayout.JAVA_LONG.withName("pipelineIndexOffset") + ); + /// The byte offset of `headerVersionOne`. + public static final long OFFSET_headerVersionOne = LAYOUT.byteOffset(PathElement.groupElement("headerVersionOne")); + /// The memory layout of `headerVersionOne`. + public static final MemoryLayout ML_headerVersionOne = LAYOUT.select(PathElement.groupElement("headerVersionOne")); + /// The [VarHandle] of `validationVersion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_validationVersion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("validationVersion")); + /// The [VarHandle] of `implementationData` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_implementationData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("implementationData")); + /// The [VarHandle] of `pipelineIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineIndexCount")); + /// The [VarHandle] of `pipelineIndexStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineIndexStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineIndexStride")); + /// The [VarHandle] of `pipelineIndexOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_pipelineIndexOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineIndexOffset")); + + /// Creates `VkPipelineCacheHeaderVersionSafetyCriticalOne` with the given segment. + /// @param segment the memory segment + public VkPipelineCacheHeaderVersionSafetyCriticalOne(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCacheHeaderVersionSafetyCriticalOne` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheHeaderVersionSafetyCriticalOne of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheHeaderVersionSafetyCriticalOne(segment); } + + /// Creates `VkPipelineCacheHeaderVersionSafetyCriticalOne` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheHeaderVersionSafetyCriticalOne ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheHeaderVersionSafetyCriticalOne(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCacheHeaderVersionSafetyCriticalOne` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheHeaderVersionSafetyCriticalOne ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheHeaderVersionSafetyCriticalOne(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCacheHeaderVersionSafetyCriticalOne` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCacheHeaderVersionSafetyCriticalOne` + public static VkPipelineCacheHeaderVersionSafetyCriticalOne alloc(SegmentAllocator allocator) { return new VkPipelineCacheHeaderVersionSafetyCriticalOne(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCacheHeaderVersionSafetyCriticalOne` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCacheHeaderVersionSafetyCriticalOne` + public static VkPipelineCacheHeaderVersionSafetyCriticalOne alloc(SegmentAllocator allocator, long count) { return new VkPipelineCacheHeaderVersionSafetyCriticalOne(allocator.allocate(LAYOUT, count)); } + + /// {@return `headerVersionOne` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCacheHeaderVersionOne") java.lang.foreign.MemorySegment get_headerVersionOne(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_headerVersionOne, index), ML_headerVersionOne); } + /// {@return `headerVersionOne`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCacheHeaderVersionOne") java.lang.foreign.MemorySegment get_headerVersionOne(MemorySegment segment) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_headerVersionOne(segment, 0L); } + /// {@return `headerVersionOne` at the given index} + /// @param index the index + public @CType("VkPipelineCacheHeaderVersionOne") java.lang.foreign.MemorySegment headerVersionOneAt(long index) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_headerVersionOne(this.segment(), index); } + /// {@return `headerVersionOne`} + public @CType("VkPipelineCacheHeaderVersionOne") java.lang.foreign.MemorySegment headerVersionOne() { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_headerVersionOne(this.segment()); } + /// Sets `headerVersionOne` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_headerVersionOne(MemorySegment segment, long index, @CType("VkPipelineCacheHeaderVersionOne") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_headerVersionOne, index), ML_headerVersionOne.byteSize()); } + /// Sets `headerVersionOne` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_headerVersionOne(MemorySegment segment, @CType("VkPipelineCacheHeaderVersionOne") java.lang.foreign.MemorySegment value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_headerVersionOne(segment, 0L, value); } + /// Sets `headerVersionOne` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne headerVersionOneAt(long index, @CType("VkPipelineCacheHeaderVersionOne") java.lang.foreign.MemorySegment value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_headerVersionOne(this.segment(), index, value); return this; } + /// Sets `headerVersionOne` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne headerVersionOne(@CType("VkPipelineCacheHeaderVersionOne") java.lang.foreign.MemorySegment value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_headerVersionOne(this.segment(), value); return this; } + + /// {@return `validationVersion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCacheValidationVersion") int get_validationVersion(MemorySegment segment, long index) { return (int) VH_validationVersion.get(segment, 0L, index); } + /// {@return `validationVersion`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCacheValidationVersion") int get_validationVersion(MemorySegment segment) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_validationVersion(segment, 0L); } + /// {@return `validationVersion` at the given index} + /// @param index the index + public @CType("VkPipelineCacheValidationVersion") int validationVersionAt(long index) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_validationVersion(this.segment(), index); } + /// {@return `validationVersion`} + public @CType("VkPipelineCacheValidationVersion") int validationVersion() { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_validationVersion(this.segment()); } + /// Sets `validationVersion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_validationVersion(MemorySegment segment, long index, @CType("VkPipelineCacheValidationVersion") int value) { VH_validationVersion.set(segment, 0L, index, value); } + /// Sets `validationVersion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_validationVersion(MemorySegment segment, @CType("VkPipelineCacheValidationVersion") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_validationVersion(segment, 0L, value); } + /// Sets `validationVersion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne validationVersionAt(long index, @CType("VkPipelineCacheValidationVersion") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_validationVersion(this.segment(), index, value); return this; } + /// Sets `validationVersion` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne validationVersion(@CType("VkPipelineCacheValidationVersion") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_validationVersion(this.segment(), value); return this; } + + /// {@return `implementationData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_implementationData(MemorySegment segment, long index) { return (int) VH_implementationData.get(segment, 0L, index); } + /// {@return `implementationData`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_implementationData(MemorySegment segment) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_implementationData(segment, 0L); } + /// {@return `implementationData` at the given index} + /// @param index the index + public @CType("uint32_t") int implementationDataAt(long index) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_implementationData(this.segment(), index); } + /// {@return `implementationData`} + public @CType("uint32_t") int implementationData() { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_implementationData(this.segment()); } + /// Sets `implementationData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_implementationData(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_implementationData.set(segment, 0L, index, value); } + /// Sets `implementationData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_implementationData(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_implementationData(segment, 0L, value); } + /// Sets `implementationData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne implementationDataAt(long index, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_implementationData(this.segment(), index, value); return this; } + /// Sets `implementationData` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne implementationData(@CType("uint32_t") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_implementationData(this.segment(), value); return this; } + + /// {@return `pipelineIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pipelineIndexCount(MemorySegment segment, long index) { return (int) VH_pipelineIndexCount.get(segment, 0L, index); } + /// {@return `pipelineIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pipelineIndexCount(MemorySegment segment) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_pipelineIndexCount(segment, 0L); } + /// {@return `pipelineIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pipelineIndexCountAt(long index) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_pipelineIndexCount(this.segment(), index); } + /// {@return `pipelineIndexCount`} + public @CType("uint32_t") int pipelineIndexCount() { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_pipelineIndexCount(this.segment()); } + /// Sets `pipelineIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pipelineIndexCount.set(segment, 0L, index, value); } + /// Sets `pipelineIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_pipelineIndexCount(segment, 0L, value); } + /// Sets `pipelineIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne pipelineIndexCountAt(long index, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_pipelineIndexCount(this.segment(), index, value); return this; } + /// Sets `pipelineIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne pipelineIndexCount(@CType("uint32_t") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_pipelineIndexCount(this.segment(), value); return this; } + + /// {@return `pipelineIndexStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pipelineIndexStride(MemorySegment segment, long index) { return (int) VH_pipelineIndexStride.get(segment, 0L, index); } + /// {@return `pipelineIndexStride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pipelineIndexStride(MemorySegment segment) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_pipelineIndexStride(segment, 0L); } + /// {@return `pipelineIndexStride` at the given index} + /// @param index the index + public @CType("uint32_t") int pipelineIndexStrideAt(long index) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_pipelineIndexStride(this.segment(), index); } + /// {@return `pipelineIndexStride`} + public @CType("uint32_t") int pipelineIndexStride() { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_pipelineIndexStride(this.segment()); } + /// Sets `pipelineIndexStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineIndexStride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pipelineIndexStride.set(segment, 0L, index, value); } + /// Sets `pipelineIndexStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineIndexStride(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_pipelineIndexStride(segment, 0L, value); } + /// Sets `pipelineIndexStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne pipelineIndexStrideAt(long index, @CType("uint32_t") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_pipelineIndexStride(this.segment(), index, value); return this; } + /// Sets `pipelineIndexStride` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne pipelineIndexStride(@CType("uint32_t") int value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_pipelineIndexStride(this.segment(), value); return this; } + + /// {@return `pipelineIndexOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_pipelineIndexOffset(MemorySegment segment, long index) { return (long) VH_pipelineIndexOffset.get(segment, 0L, index); } + /// {@return `pipelineIndexOffset`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_pipelineIndexOffset(MemorySegment segment) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_pipelineIndexOffset(segment, 0L); } + /// {@return `pipelineIndexOffset` at the given index} + /// @param index the index + public @CType("uint64_t") long pipelineIndexOffsetAt(long index) { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_pipelineIndexOffset(this.segment(), index); } + /// {@return `pipelineIndexOffset`} + public @CType("uint64_t") long pipelineIndexOffset() { return VkPipelineCacheHeaderVersionSafetyCriticalOne.get_pipelineIndexOffset(this.segment()); } + /// Sets `pipelineIndexOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineIndexOffset(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_pipelineIndexOffset.set(segment, 0L, index, value); } + /// Sets `pipelineIndexOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineIndexOffset(MemorySegment segment, @CType("uint64_t") long value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_pipelineIndexOffset(segment, 0L, value); } + /// Sets `pipelineIndexOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne pipelineIndexOffsetAt(long index, @CType("uint64_t") long value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_pipelineIndexOffset(this.segment(), index, value); return this; } + /// Sets `pipelineIndexOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheHeaderVersionSafetyCriticalOne pipelineIndexOffset(@CType("uint64_t") long value) { VkPipelineCacheHeaderVersionSafetyCriticalOne.set_pipelineIndexOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheSafetyCriticalIndexEntry.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheSafetyCriticalIndexEntry.java new file mode 100644 index 00000000..524987ee --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheSafetyCriticalIndexEntry.java @@ -0,0 +1,350 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### pipelineIdentifier +/// [Byte offset handle][#MH_pipelineIdentifier] - [Memory layout][#ML_pipelineIdentifier] - [Getter][#pipelineIdentifier(long)] - [Setter][#pipelineIdentifier(long, java.lang.foreign.MemorySegment)] +/// ### pipelineMemorySize +/// [VarHandle][#VH_pipelineMemorySize] - [Getter][#pipelineMemorySize()] - [Setter][#pipelineMemorySize(long)] +/// ### jsonSize +/// [VarHandle][#VH_jsonSize] - [Getter][#jsonSize()] - [Setter][#jsonSize(long)] +/// ### jsonOffset +/// [VarHandle][#VH_jsonOffset] - [Getter][#jsonOffset()] - [Setter][#jsonOffset(long)] +/// ### stageIndexCount +/// [VarHandle][#VH_stageIndexCount] - [Getter][#stageIndexCount()] - [Setter][#stageIndexCount(int)] +/// ### stageIndexStride +/// [VarHandle][#VH_stageIndexStride] - [Getter][#stageIndexStride()] - [Setter][#stageIndexStride(int)] +/// ### stageIndexOffset +/// [VarHandle][#VH_stageIndexOffset] - [Getter][#stageIndexOffset()] - [Setter][#stageIndexOffset(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCacheSafetyCriticalIndexEntry { +/// uint8_t[VK_UUID_SIZE] pipelineIdentifier; +/// uint64_t pipelineMemorySize; +/// uint64_t jsonSize; +/// uint64_t jsonOffset; +/// uint32_t stageIndexCount; +/// uint32_t stageIndexStride; +/// uint64_t stageIndexOffset; +/// } VkPipelineCacheSafetyCriticalIndexEntry; +/// ``` +public final class VkPipelineCacheSafetyCriticalIndexEntry extends Struct { + /// The struct layout of `VkPipelineCacheSafetyCriticalIndexEntry`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("pipelineIdentifier"), + ValueLayout.JAVA_LONG.withName("pipelineMemorySize"), + ValueLayout.JAVA_LONG.withName("jsonSize"), + ValueLayout.JAVA_LONG.withName("jsonOffset"), + ValueLayout.JAVA_INT.withName("stageIndexCount"), + ValueLayout.JAVA_INT.withName("stageIndexStride"), + ValueLayout.JAVA_LONG.withName("stageIndexOffset") + ); + /// The byte offset handle of `pipelineIdentifier` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_pipelineIdentifier = LAYOUT.byteOffsetHandle(PathElement.groupElement("pipelineIdentifier"), PathElement.sequenceElement()); + /// The memory layout of `pipelineIdentifier`. + public static final MemoryLayout ML_pipelineIdentifier = LAYOUT.select(PathElement.groupElement("pipelineIdentifier")); + /// The [VarHandle] of `pipelineMemorySize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_pipelineMemorySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineMemorySize")); + /// The [VarHandle] of `jsonSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_jsonSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("jsonSize")); + /// The [VarHandle] of `jsonOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_jsonOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("jsonOffset")); + /// The [VarHandle] of `stageIndexCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageIndexCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageIndexCount")); + /// The [VarHandle] of `stageIndexStride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageIndexStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageIndexStride")); + /// The [VarHandle] of `stageIndexOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_stageIndexOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageIndexOffset")); + + /// Creates `VkPipelineCacheSafetyCriticalIndexEntry` with the given segment. + /// @param segment the memory segment + public VkPipelineCacheSafetyCriticalIndexEntry(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCacheSafetyCriticalIndexEntry` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheSafetyCriticalIndexEntry of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheSafetyCriticalIndexEntry(segment); } + + /// Creates `VkPipelineCacheSafetyCriticalIndexEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheSafetyCriticalIndexEntry ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheSafetyCriticalIndexEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCacheSafetyCriticalIndexEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheSafetyCriticalIndexEntry ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheSafetyCriticalIndexEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCacheSafetyCriticalIndexEntry` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCacheSafetyCriticalIndexEntry` + public static VkPipelineCacheSafetyCriticalIndexEntry alloc(SegmentAllocator allocator) { return new VkPipelineCacheSafetyCriticalIndexEntry(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCacheSafetyCriticalIndexEntry` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCacheSafetyCriticalIndexEntry` + public static VkPipelineCacheSafetyCriticalIndexEntry alloc(SegmentAllocator allocator, long count) { return new VkPipelineCacheSafetyCriticalIndexEntry(allocator.allocate(LAYOUT, count)); } + + /// {@return `pipelineIdentifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineIdentifier(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_pipelineIdentifier.invokeExact(0L, elementIndex), index), ML_pipelineIdentifier); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `pipelineIdentifier`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineIdentifier(MemorySegment segment, long elementIndex) { return VkPipelineCacheSafetyCriticalIndexEntry.get_pipelineIdentifier(segment, 0L, elementIndex); } + /// {@return `pipelineIdentifier` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineIdentifierAt(long index, long elementIndex) { return VkPipelineCacheSafetyCriticalIndexEntry.get_pipelineIdentifier(this.segment(), index, elementIndex); } + /// {@return `pipelineIdentifier`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineIdentifier(long elementIndex) { return VkPipelineCacheSafetyCriticalIndexEntry.get_pipelineIdentifier(this.segment(), elementIndex); } + /// Sets `pipelineIdentifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineIdentifier(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_pipelineIdentifier.invokeExact(0L, elementIndex), index), ML_pipelineIdentifier.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `pipelineIdentifier` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineIdentifier(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineCacheSafetyCriticalIndexEntry.set_pipelineIdentifier(segment, 0L, elementIndex, value); } + /// Sets `pipelineIdentifier` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry pipelineIdentifierAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineCacheSafetyCriticalIndexEntry.set_pipelineIdentifier(this.segment(), index, elementIndex, value); return this; } + /// Sets `pipelineIdentifier` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry pipelineIdentifier(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineCacheSafetyCriticalIndexEntry.set_pipelineIdentifier(this.segment(), elementIndex, value); return this; } + + /// {@return `pipelineMemorySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_pipelineMemorySize(MemorySegment segment, long index) { return (long) VH_pipelineMemorySize.get(segment, 0L, index); } + /// {@return `pipelineMemorySize`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_pipelineMemorySize(MemorySegment segment) { return VkPipelineCacheSafetyCriticalIndexEntry.get_pipelineMemorySize(segment, 0L); } + /// {@return `pipelineMemorySize` at the given index} + /// @param index the index + public @CType("uint64_t") long pipelineMemorySizeAt(long index) { return VkPipelineCacheSafetyCriticalIndexEntry.get_pipelineMemorySize(this.segment(), index); } + /// {@return `pipelineMemorySize`} + public @CType("uint64_t") long pipelineMemorySize() { return VkPipelineCacheSafetyCriticalIndexEntry.get_pipelineMemorySize(this.segment()); } + /// Sets `pipelineMemorySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineMemorySize(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_pipelineMemorySize.set(segment, 0L, index, value); } + /// Sets `pipelineMemorySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineMemorySize(MemorySegment segment, @CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_pipelineMemorySize(segment, 0L, value); } + /// Sets `pipelineMemorySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry pipelineMemorySizeAt(long index, @CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_pipelineMemorySize(this.segment(), index, value); return this; } + /// Sets `pipelineMemorySize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry pipelineMemorySize(@CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_pipelineMemorySize(this.segment(), value); return this; } + + /// {@return `jsonSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_jsonSize(MemorySegment segment, long index) { return (long) VH_jsonSize.get(segment, 0L, index); } + /// {@return `jsonSize`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_jsonSize(MemorySegment segment) { return VkPipelineCacheSafetyCriticalIndexEntry.get_jsonSize(segment, 0L); } + /// {@return `jsonSize` at the given index} + /// @param index the index + public @CType("uint64_t") long jsonSizeAt(long index) { return VkPipelineCacheSafetyCriticalIndexEntry.get_jsonSize(this.segment(), index); } + /// {@return `jsonSize`} + public @CType("uint64_t") long jsonSize() { return VkPipelineCacheSafetyCriticalIndexEntry.get_jsonSize(this.segment()); } + /// Sets `jsonSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_jsonSize(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_jsonSize.set(segment, 0L, index, value); } + /// Sets `jsonSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_jsonSize(MemorySegment segment, @CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_jsonSize(segment, 0L, value); } + /// Sets `jsonSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry jsonSizeAt(long index, @CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_jsonSize(this.segment(), index, value); return this; } + /// Sets `jsonSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry jsonSize(@CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_jsonSize(this.segment(), value); return this; } + + /// {@return `jsonOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_jsonOffset(MemorySegment segment, long index) { return (long) VH_jsonOffset.get(segment, 0L, index); } + /// {@return `jsonOffset`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_jsonOffset(MemorySegment segment) { return VkPipelineCacheSafetyCriticalIndexEntry.get_jsonOffset(segment, 0L); } + /// {@return `jsonOffset` at the given index} + /// @param index the index + public @CType("uint64_t") long jsonOffsetAt(long index) { return VkPipelineCacheSafetyCriticalIndexEntry.get_jsonOffset(this.segment(), index); } + /// {@return `jsonOffset`} + public @CType("uint64_t") long jsonOffset() { return VkPipelineCacheSafetyCriticalIndexEntry.get_jsonOffset(this.segment()); } + /// Sets `jsonOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_jsonOffset(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_jsonOffset.set(segment, 0L, index, value); } + /// Sets `jsonOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_jsonOffset(MemorySegment segment, @CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_jsonOffset(segment, 0L, value); } + /// Sets `jsonOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry jsonOffsetAt(long index, @CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_jsonOffset(this.segment(), index, value); return this; } + /// Sets `jsonOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry jsonOffset(@CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_jsonOffset(this.segment(), value); return this; } + + /// {@return `stageIndexCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stageIndexCount(MemorySegment segment, long index) { return (int) VH_stageIndexCount.get(segment, 0L, index); } + /// {@return `stageIndexCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stageIndexCount(MemorySegment segment) { return VkPipelineCacheSafetyCriticalIndexEntry.get_stageIndexCount(segment, 0L); } + /// {@return `stageIndexCount` at the given index} + /// @param index the index + public @CType("uint32_t") int stageIndexCountAt(long index) { return VkPipelineCacheSafetyCriticalIndexEntry.get_stageIndexCount(this.segment(), index); } + /// {@return `stageIndexCount`} + public @CType("uint32_t") int stageIndexCount() { return VkPipelineCacheSafetyCriticalIndexEntry.get_stageIndexCount(this.segment()); } + /// Sets `stageIndexCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageIndexCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stageIndexCount.set(segment, 0L, index, value); } + /// Sets `stageIndexCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageIndexCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCacheSafetyCriticalIndexEntry.set_stageIndexCount(segment, 0L, value); } + /// Sets `stageIndexCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry stageIndexCountAt(long index, @CType("uint32_t") int value) { VkPipelineCacheSafetyCriticalIndexEntry.set_stageIndexCount(this.segment(), index, value); return this; } + /// Sets `stageIndexCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry stageIndexCount(@CType("uint32_t") int value) { VkPipelineCacheSafetyCriticalIndexEntry.set_stageIndexCount(this.segment(), value); return this; } + + /// {@return `stageIndexStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stageIndexStride(MemorySegment segment, long index) { return (int) VH_stageIndexStride.get(segment, 0L, index); } + /// {@return `stageIndexStride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stageIndexStride(MemorySegment segment) { return VkPipelineCacheSafetyCriticalIndexEntry.get_stageIndexStride(segment, 0L); } + /// {@return `stageIndexStride` at the given index} + /// @param index the index + public @CType("uint32_t") int stageIndexStrideAt(long index) { return VkPipelineCacheSafetyCriticalIndexEntry.get_stageIndexStride(this.segment(), index); } + /// {@return `stageIndexStride`} + public @CType("uint32_t") int stageIndexStride() { return VkPipelineCacheSafetyCriticalIndexEntry.get_stageIndexStride(this.segment()); } + /// Sets `stageIndexStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageIndexStride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stageIndexStride.set(segment, 0L, index, value); } + /// Sets `stageIndexStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageIndexStride(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCacheSafetyCriticalIndexEntry.set_stageIndexStride(segment, 0L, value); } + /// Sets `stageIndexStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry stageIndexStrideAt(long index, @CType("uint32_t") int value) { VkPipelineCacheSafetyCriticalIndexEntry.set_stageIndexStride(this.segment(), index, value); return this; } + /// Sets `stageIndexStride` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry stageIndexStride(@CType("uint32_t") int value) { VkPipelineCacheSafetyCriticalIndexEntry.set_stageIndexStride(this.segment(), value); return this; } + + /// {@return `stageIndexOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_stageIndexOffset(MemorySegment segment, long index) { return (long) VH_stageIndexOffset.get(segment, 0L, index); } + /// {@return `stageIndexOffset`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_stageIndexOffset(MemorySegment segment) { return VkPipelineCacheSafetyCriticalIndexEntry.get_stageIndexOffset(segment, 0L); } + /// {@return `stageIndexOffset` at the given index} + /// @param index the index + public @CType("uint64_t") long stageIndexOffsetAt(long index) { return VkPipelineCacheSafetyCriticalIndexEntry.get_stageIndexOffset(this.segment(), index); } + /// {@return `stageIndexOffset`} + public @CType("uint64_t") long stageIndexOffset() { return VkPipelineCacheSafetyCriticalIndexEntry.get_stageIndexOffset(this.segment()); } + /// Sets `stageIndexOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageIndexOffset(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_stageIndexOffset.set(segment, 0L, index, value); } + /// Sets `stageIndexOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageIndexOffset(MemorySegment segment, @CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_stageIndexOffset(segment, 0L, value); } + /// Sets `stageIndexOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry stageIndexOffsetAt(long index, @CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_stageIndexOffset(this.segment(), index, value); return this; } + /// Sets `stageIndexOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheSafetyCriticalIndexEntry stageIndexOffset(@CType("uint64_t") long value) { VkPipelineCacheSafetyCriticalIndexEntry.set_stageIndexOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheStageValidationIndexEntry.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheStageValidationIndexEntry.java new file mode 100644 index 00000000..0fe6ebf8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCacheStageValidationIndexEntry.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### codeSize +/// [VarHandle][#VH_codeSize] - [Getter][#codeSize()] - [Setter][#codeSize(long)] +/// ### codeOffset +/// [VarHandle][#VH_codeOffset] - [Getter][#codeOffset()] - [Setter][#codeOffset(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCacheStageValidationIndexEntry { +/// uint64_t codeSize; +/// uint64_t codeOffset; +/// } VkPipelineCacheStageValidationIndexEntry; +/// ``` +public final class VkPipelineCacheStageValidationIndexEntry extends Struct { + /// The struct layout of `VkPipelineCacheStageValidationIndexEntry`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("codeSize"), + ValueLayout.JAVA_LONG.withName("codeOffset") + ); + /// The [VarHandle] of `codeSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_codeSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("codeSize")); + /// The [VarHandle] of `codeOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_codeOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("codeOffset")); + + /// Creates `VkPipelineCacheStageValidationIndexEntry` with the given segment. + /// @param segment the memory segment + public VkPipelineCacheStageValidationIndexEntry(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCacheStageValidationIndexEntry` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheStageValidationIndexEntry of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheStageValidationIndexEntry(segment); } + + /// Creates `VkPipelineCacheStageValidationIndexEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheStageValidationIndexEntry ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheStageValidationIndexEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCacheStageValidationIndexEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCacheStageValidationIndexEntry ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCacheStageValidationIndexEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCacheStageValidationIndexEntry` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCacheStageValidationIndexEntry` + public static VkPipelineCacheStageValidationIndexEntry alloc(SegmentAllocator allocator) { return new VkPipelineCacheStageValidationIndexEntry(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCacheStageValidationIndexEntry` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCacheStageValidationIndexEntry` + public static VkPipelineCacheStageValidationIndexEntry alloc(SegmentAllocator allocator, long count) { return new VkPipelineCacheStageValidationIndexEntry(allocator.allocate(LAYOUT, count)); } + + /// {@return `codeSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_codeSize(MemorySegment segment, long index) { return (long) VH_codeSize.get(segment, 0L, index); } + /// {@return `codeSize`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_codeSize(MemorySegment segment) { return VkPipelineCacheStageValidationIndexEntry.get_codeSize(segment, 0L); } + /// {@return `codeSize` at the given index} + /// @param index the index + public @CType("uint64_t") long codeSizeAt(long index) { return VkPipelineCacheStageValidationIndexEntry.get_codeSize(this.segment(), index); } + /// {@return `codeSize`} + public @CType("uint64_t") long codeSize() { return VkPipelineCacheStageValidationIndexEntry.get_codeSize(this.segment()); } + /// Sets `codeSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_codeSize(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_codeSize.set(segment, 0L, index, value); } + /// Sets `codeSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_codeSize(MemorySegment segment, @CType("uint64_t") long value) { VkPipelineCacheStageValidationIndexEntry.set_codeSize(segment, 0L, value); } + /// Sets `codeSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheStageValidationIndexEntry codeSizeAt(long index, @CType("uint64_t") long value) { VkPipelineCacheStageValidationIndexEntry.set_codeSize(this.segment(), index, value); return this; } + /// Sets `codeSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheStageValidationIndexEntry codeSize(@CType("uint64_t") long value) { VkPipelineCacheStageValidationIndexEntry.set_codeSize(this.segment(), value); return this; } + + /// {@return `codeOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_codeOffset(MemorySegment segment, long index) { return (long) VH_codeOffset.get(segment, 0L, index); } + /// {@return `codeOffset`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_codeOffset(MemorySegment segment) { return VkPipelineCacheStageValidationIndexEntry.get_codeOffset(segment, 0L); } + /// {@return `codeOffset` at the given index} + /// @param index the index + public @CType("uint64_t") long codeOffsetAt(long index) { return VkPipelineCacheStageValidationIndexEntry.get_codeOffset(this.segment(), index); } + /// {@return `codeOffset`} + public @CType("uint64_t") long codeOffset() { return VkPipelineCacheStageValidationIndexEntry.get_codeOffset(this.segment()); } + /// Sets `codeOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_codeOffset(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_codeOffset.set(segment, 0L, index, value); } + /// Sets `codeOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_codeOffset(MemorySegment segment, @CType("uint64_t") long value) { VkPipelineCacheStageValidationIndexEntry.set_codeOffset(segment, 0L, value); } + /// Sets `codeOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCacheStageValidationIndexEntry codeOffsetAt(long index, @CType("uint64_t") long value) { VkPipelineCacheStageValidationIndexEntry.set_codeOffset(this.segment(), index, value); return this; } + /// Sets `codeOffset` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCacheStageValidationIndexEntry codeOffset(@CType("uint64_t") long value) { VkPipelineCacheStageValidationIndexEntry.set_codeOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineColorBlendAttachmentState.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineColorBlendAttachmentState.java new file mode 100644 index 00000000..ed2ca9a2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineColorBlendAttachmentState.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### blendEnable +/// [VarHandle][#VH_blendEnable] - [Getter][#blendEnable()] - [Setter][#blendEnable(int)] +/// ### srcColorBlendFactor +/// [VarHandle][#VH_srcColorBlendFactor] - [Getter][#srcColorBlendFactor()] - [Setter][#srcColorBlendFactor(int)] +/// ### dstColorBlendFactor +/// [VarHandle][#VH_dstColorBlendFactor] - [Getter][#dstColorBlendFactor()] - [Setter][#dstColorBlendFactor(int)] +/// ### colorBlendOp +/// [VarHandle][#VH_colorBlendOp] - [Getter][#colorBlendOp()] - [Setter][#colorBlendOp(int)] +/// ### srcAlphaBlendFactor +/// [VarHandle][#VH_srcAlphaBlendFactor] - [Getter][#srcAlphaBlendFactor()] - [Setter][#srcAlphaBlendFactor(int)] +/// ### dstAlphaBlendFactor +/// [VarHandle][#VH_dstAlphaBlendFactor] - [Getter][#dstAlphaBlendFactor()] - [Setter][#dstAlphaBlendFactor(int)] +/// ### alphaBlendOp +/// [VarHandle][#VH_alphaBlendOp] - [Getter][#alphaBlendOp()] - [Setter][#alphaBlendOp(int)] +/// ### colorWriteMask +/// [VarHandle][#VH_colorWriteMask] - [Getter][#colorWriteMask()] - [Setter][#colorWriteMask(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineColorBlendAttachmentState { +/// VkBool32 blendEnable; +/// VkBlendFactor srcColorBlendFactor; +/// VkBlendFactor dstColorBlendFactor; +/// VkBlendOp colorBlendOp; +/// VkBlendFactor srcAlphaBlendFactor; +/// VkBlendFactor dstAlphaBlendFactor; +/// VkBlendOp alphaBlendOp; +/// VkColorComponentFlags colorWriteMask; +/// } VkPipelineColorBlendAttachmentState; +/// ``` +public final class VkPipelineColorBlendAttachmentState extends Struct { + /// The struct layout of `VkPipelineColorBlendAttachmentState`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("blendEnable"), + ValueLayout.JAVA_INT.withName("srcColorBlendFactor"), + ValueLayout.JAVA_INT.withName("dstColorBlendFactor"), + ValueLayout.JAVA_INT.withName("colorBlendOp"), + ValueLayout.JAVA_INT.withName("srcAlphaBlendFactor"), + ValueLayout.JAVA_INT.withName("dstAlphaBlendFactor"), + ValueLayout.JAVA_INT.withName("alphaBlendOp"), + ValueLayout.JAVA_INT.withName("colorWriteMask") + ); + /// The [VarHandle] of `blendEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_blendEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blendEnable")); + /// The [VarHandle] of `srcColorBlendFactor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcColorBlendFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcColorBlendFactor")); + /// The [VarHandle] of `dstColorBlendFactor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstColorBlendFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstColorBlendFactor")); + /// The [VarHandle] of `colorBlendOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorBlendOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorBlendOp")); + /// The [VarHandle] of `srcAlphaBlendFactor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcAlphaBlendFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAlphaBlendFactor")); + /// The [VarHandle] of `dstAlphaBlendFactor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstAlphaBlendFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAlphaBlendFactor")); + /// The [VarHandle] of `alphaBlendOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_alphaBlendOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("alphaBlendOp")); + /// The [VarHandle] of `colorWriteMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorWriteMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorWriteMask")); + + /// Creates `VkPipelineColorBlendAttachmentState` with the given segment. + /// @param segment the memory segment + public VkPipelineColorBlendAttachmentState(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineColorBlendAttachmentState` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorBlendAttachmentState of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorBlendAttachmentState(segment); } + + /// Creates `VkPipelineColorBlendAttachmentState` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorBlendAttachmentState ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorBlendAttachmentState(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineColorBlendAttachmentState` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorBlendAttachmentState ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorBlendAttachmentState(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineColorBlendAttachmentState` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineColorBlendAttachmentState` + public static VkPipelineColorBlendAttachmentState alloc(SegmentAllocator allocator) { return new VkPipelineColorBlendAttachmentState(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineColorBlendAttachmentState` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineColorBlendAttachmentState` + public static VkPipelineColorBlendAttachmentState alloc(SegmentAllocator allocator, long count) { return new VkPipelineColorBlendAttachmentState(allocator.allocate(LAYOUT, count)); } + + /// {@return `blendEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_blendEnable(MemorySegment segment, long index) { return (int) VH_blendEnable.get(segment, 0L, index); } + /// {@return `blendEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_blendEnable(MemorySegment segment) { return VkPipelineColorBlendAttachmentState.get_blendEnable(segment, 0L); } + /// {@return `blendEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int blendEnableAt(long index) { return VkPipelineColorBlendAttachmentState.get_blendEnable(this.segment(), index); } + /// {@return `blendEnable`} + public @CType("VkBool32") int blendEnable() { return VkPipelineColorBlendAttachmentState.get_blendEnable(this.segment()); } + /// Sets `blendEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blendEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_blendEnable.set(segment, 0L, index, value); } + /// Sets `blendEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blendEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineColorBlendAttachmentState.set_blendEnable(segment, 0L, value); } + /// Sets `blendEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState blendEnableAt(long index, @CType("VkBool32") int value) { VkPipelineColorBlendAttachmentState.set_blendEnable(this.segment(), index, value); return this; } + /// Sets `blendEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState blendEnable(@CType("VkBool32") int value) { VkPipelineColorBlendAttachmentState.set_blendEnable(this.segment(), value); return this; } + + /// {@return `srcColorBlendFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendFactor") int get_srcColorBlendFactor(MemorySegment segment, long index) { return (int) VH_srcColorBlendFactor.get(segment, 0L, index); } + /// {@return `srcColorBlendFactor`} + /// @param segment the segment of the struct + public static @CType("VkBlendFactor") int get_srcColorBlendFactor(MemorySegment segment) { return VkPipelineColorBlendAttachmentState.get_srcColorBlendFactor(segment, 0L); } + /// {@return `srcColorBlendFactor` at the given index} + /// @param index the index + public @CType("VkBlendFactor") int srcColorBlendFactorAt(long index) { return VkPipelineColorBlendAttachmentState.get_srcColorBlendFactor(this.segment(), index); } + /// {@return `srcColorBlendFactor`} + public @CType("VkBlendFactor") int srcColorBlendFactor() { return VkPipelineColorBlendAttachmentState.get_srcColorBlendFactor(this.segment()); } + /// Sets `srcColorBlendFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcColorBlendFactor(MemorySegment segment, long index, @CType("VkBlendFactor") int value) { VH_srcColorBlendFactor.set(segment, 0L, index, value); } + /// Sets `srcColorBlendFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcColorBlendFactor(MemorySegment segment, @CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_srcColorBlendFactor(segment, 0L, value); } + /// Sets `srcColorBlendFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState srcColorBlendFactorAt(long index, @CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_srcColorBlendFactor(this.segment(), index, value); return this; } + /// Sets `srcColorBlendFactor` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState srcColorBlendFactor(@CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_srcColorBlendFactor(this.segment(), value); return this; } + + /// {@return `dstColorBlendFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendFactor") int get_dstColorBlendFactor(MemorySegment segment, long index) { return (int) VH_dstColorBlendFactor.get(segment, 0L, index); } + /// {@return `dstColorBlendFactor`} + /// @param segment the segment of the struct + public static @CType("VkBlendFactor") int get_dstColorBlendFactor(MemorySegment segment) { return VkPipelineColorBlendAttachmentState.get_dstColorBlendFactor(segment, 0L); } + /// {@return `dstColorBlendFactor` at the given index} + /// @param index the index + public @CType("VkBlendFactor") int dstColorBlendFactorAt(long index) { return VkPipelineColorBlendAttachmentState.get_dstColorBlendFactor(this.segment(), index); } + /// {@return `dstColorBlendFactor`} + public @CType("VkBlendFactor") int dstColorBlendFactor() { return VkPipelineColorBlendAttachmentState.get_dstColorBlendFactor(this.segment()); } + /// Sets `dstColorBlendFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstColorBlendFactor(MemorySegment segment, long index, @CType("VkBlendFactor") int value) { VH_dstColorBlendFactor.set(segment, 0L, index, value); } + /// Sets `dstColorBlendFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstColorBlendFactor(MemorySegment segment, @CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_dstColorBlendFactor(segment, 0L, value); } + /// Sets `dstColorBlendFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState dstColorBlendFactorAt(long index, @CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_dstColorBlendFactor(this.segment(), index, value); return this; } + /// Sets `dstColorBlendFactor` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState dstColorBlendFactor(@CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_dstColorBlendFactor(this.segment(), value); return this; } + + /// {@return `colorBlendOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendOp") int get_colorBlendOp(MemorySegment segment, long index) { return (int) VH_colorBlendOp.get(segment, 0L, index); } + /// {@return `colorBlendOp`} + /// @param segment the segment of the struct + public static @CType("VkBlendOp") int get_colorBlendOp(MemorySegment segment) { return VkPipelineColorBlendAttachmentState.get_colorBlendOp(segment, 0L); } + /// {@return `colorBlendOp` at the given index} + /// @param index the index + public @CType("VkBlendOp") int colorBlendOpAt(long index) { return VkPipelineColorBlendAttachmentState.get_colorBlendOp(this.segment(), index); } + /// {@return `colorBlendOp`} + public @CType("VkBlendOp") int colorBlendOp() { return VkPipelineColorBlendAttachmentState.get_colorBlendOp(this.segment()); } + /// Sets `colorBlendOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorBlendOp(MemorySegment segment, long index, @CType("VkBlendOp") int value) { VH_colorBlendOp.set(segment, 0L, index, value); } + /// Sets `colorBlendOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorBlendOp(MemorySegment segment, @CType("VkBlendOp") int value) { VkPipelineColorBlendAttachmentState.set_colorBlendOp(segment, 0L, value); } + /// Sets `colorBlendOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState colorBlendOpAt(long index, @CType("VkBlendOp") int value) { VkPipelineColorBlendAttachmentState.set_colorBlendOp(this.segment(), index, value); return this; } + /// Sets `colorBlendOp` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState colorBlendOp(@CType("VkBlendOp") int value) { VkPipelineColorBlendAttachmentState.set_colorBlendOp(this.segment(), value); return this; } + + /// {@return `srcAlphaBlendFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendFactor") int get_srcAlphaBlendFactor(MemorySegment segment, long index) { return (int) VH_srcAlphaBlendFactor.get(segment, 0L, index); } + /// {@return `srcAlphaBlendFactor`} + /// @param segment the segment of the struct + public static @CType("VkBlendFactor") int get_srcAlphaBlendFactor(MemorySegment segment) { return VkPipelineColorBlendAttachmentState.get_srcAlphaBlendFactor(segment, 0L); } + /// {@return `srcAlphaBlendFactor` at the given index} + /// @param index the index + public @CType("VkBlendFactor") int srcAlphaBlendFactorAt(long index) { return VkPipelineColorBlendAttachmentState.get_srcAlphaBlendFactor(this.segment(), index); } + /// {@return `srcAlphaBlendFactor`} + public @CType("VkBlendFactor") int srcAlphaBlendFactor() { return VkPipelineColorBlendAttachmentState.get_srcAlphaBlendFactor(this.segment()); } + /// Sets `srcAlphaBlendFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAlphaBlendFactor(MemorySegment segment, long index, @CType("VkBlendFactor") int value) { VH_srcAlphaBlendFactor.set(segment, 0L, index, value); } + /// Sets `srcAlphaBlendFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAlphaBlendFactor(MemorySegment segment, @CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_srcAlphaBlendFactor(segment, 0L, value); } + /// Sets `srcAlphaBlendFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState srcAlphaBlendFactorAt(long index, @CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_srcAlphaBlendFactor(this.segment(), index, value); return this; } + /// Sets `srcAlphaBlendFactor` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState srcAlphaBlendFactor(@CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_srcAlphaBlendFactor(this.segment(), value); return this; } + + /// {@return `dstAlphaBlendFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendFactor") int get_dstAlphaBlendFactor(MemorySegment segment, long index) { return (int) VH_dstAlphaBlendFactor.get(segment, 0L, index); } + /// {@return `dstAlphaBlendFactor`} + /// @param segment the segment of the struct + public static @CType("VkBlendFactor") int get_dstAlphaBlendFactor(MemorySegment segment) { return VkPipelineColorBlendAttachmentState.get_dstAlphaBlendFactor(segment, 0L); } + /// {@return `dstAlphaBlendFactor` at the given index} + /// @param index the index + public @CType("VkBlendFactor") int dstAlphaBlendFactorAt(long index) { return VkPipelineColorBlendAttachmentState.get_dstAlphaBlendFactor(this.segment(), index); } + /// {@return `dstAlphaBlendFactor`} + public @CType("VkBlendFactor") int dstAlphaBlendFactor() { return VkPipelineColorBlendAttachmentState.get_dstAlphaBlendFactor(this.segment()); } + /// Sets `dstAlphaBlendFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAlphaBlendFactor(MemorySegment segment, long index, @CType("VkBlendFactor") int value) { VH_dstAlphaBlendFactor.set(segment, 0L, index, value); } + /// Sets `dstAlphaBlendFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAlphaBlendFactor(MemorySegment segment, @CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_dstAlphaBlendFactor(segment, 0L, value); } + /// Sets `dstAlphaBlendFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState dstAlphaBlendFactorAt(long index, @CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_dstAlphaBlendFactor(this.segment(), index, value); return this; } + /// Sets `dstAlphaBlendFactor` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState dstAlphaBlendFactor(@CType("VkBlendFactor") int value) { VkPipelineColorBlendAttachmentState.set_dstAlphaBlendFactor(this.segment(), value); return this; } + + /// {@return `alphaBlendOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBlendOp") int get_alphaBlendOp(MemorySegment segment, long index) { return (int) VH_alphaBlendOp.get(segment, 0L, index); } + /// {@return `alphaBlendOp`} + /// @param segment the segment of the struct + public static @CType("VkBlendOp") int get_alphaBlendOp(MemorySegment segment) { return VkPipelineColorBlendAttachmentState.get_alphaBlendOp(segment, 0L); } + /// {@return `alphaBlendOp` at the given index} + /// @param index the index + public @CType("VkBlendOp") int alphaBlendOpAt(long index) { return VkPipelineColorBlendAttachmentState.get_alphaBlendOp(this.segment(), index); } + /// {@return `alphaBlendOp`} + public @CType("VkBlendOp") int alphaBlendOp() { return VkPipelineColorBlendAttachmentState.get_alphaBlendOp(this.segment()); } + /// Sets `alphaBlendOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_alphaBlendOp(MemorySegment segment, long index, @CType("VkBlendOp") int value) { VH_alphaBlendOp.set(segment, 0L, index, value); } + /// Sets `alphaBlendOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_alphaBlendOp(MemorySegment segment, @CType("VkBlendOp") int value) { VkPipelineColorBlendAttachmentState.set_alphaBlendOp(segment, 0L, value); } + /// Sets `alphaBlendOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState alphaBlendOpAt(long index, @CType("VkBlendOp") int value) { VkPipelineColorBlendAttachmentState.set_alphaBlendOp(this.segment(), index, value); return this; } + /// Sets `alphaBlendOp` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState alphaBlendOp(@CType("VkBlendOp") int value) { VkPipelineColorBlendAttachmentState.set_alphaBlendOp(this.segment(), value); return this; } + + /// {@return `colorWriteMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkColorComponentFlags") int get_colorWriteMask(MemorySegment segment, long index) { return (int) VH_colorWriteMask.get(segment, 0L, index); } + /// {@return `colorWriteMask`} + /// @param segment the segment of the struct + public static @CType("VkColorComponentFlags") int get_colorWriteMask(MemorySegment segment) { return VkPipelineColorBlendAttachmentState.get_colorWriteMask(segment, 0L); } + /// {@return `colorWriteMask` at the given index} + /// @param index the index + public @CType("VkColorComponentFlags") int colorWriteMaskAt(long index) { return VkPipelineColorBlendAttachmentState.get_colorWriteMask(this.segment(), index); } + /// {@return `colorWriteMask`} + public @CType("VkColorComponentFlags") int colorWriteMask() { return VkPipelineColorBlendAttachmentState.get_colorWriteMask(this.segment()); } + /// Sets `colorWriteMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorWriteMask(MemorySegment segment, long index, @CType("VkColorComponentFlags") int value) { VH_colorWriteMask.set(segment, 0L, index, value); } + /// Sets `colorWriteMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorWriteMask(MemorySegment segment, @CType("VkColorComponentFlags") int value) { VkPipelineColorBlendAttachmentState.set_colorWriteMask(segment, 0L, value); } + /// Sets `colorWriteMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState colorWriteMaskAt(long index, @CType("VkColorComponentFlags") int value) { VkPipelineColorBlendAttachmentState.set_colorWriteMask(this.segment(), index, value); return this; } + /// Sets `colorWriteMask` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendAttachmentState colorWriteMask(@CType("VkColorComponentFlags") int value) { VkPipelineColorBlendAttachmentState.set_colorWriteMask(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineColorBlendStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineColorBlendStateCreateInfo.java new file mode 100644 index 00000000..bd0c9330 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineColorBlendStateCreateInfo.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### logicOpEnable +/// [VarHandle][#VH_logicOpEnable] - [Getter][#logicOpEnable()] - [Setter][#logicOpEnable(int)] +/// ### logicOp +/// [VarHandle][#VH_logicOp] - [Getter][#logicOp()] - [Setter][#logicOp(int)] +/// ### attachmentCount +/// [VarHandle][#VH_attachmentCount] - [Getter][#attachmentCount()] - [Setter][#attachmentCount(int)] +/// ### pAttachments +/// [VarHandle][#VH_pAttachments] - [Getter][#pAttachments()] - [Setter][#pAttachments(java.lang.foreign.MemorySegment)] +/// ### blendConstants +/// [VarHandle][#VH_blendConstants] - [Getter][#blendConstants()] - [Setter][#blendConstants(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineColorBlendStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineColorBlendStateCreateFlags flags; +/// VkBool32 logicOpEnable; +/// VkLogicOp logicOp; +/// uint32_t attachmentCount; +/// const VkPipelineColorBlendAttachmentState * pAttachments; +/// float blendConstants; +/// } VkPipelineColorBlendStateCreateInfo; +/// ``` +public final class VkPipelineColorBlendStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineColorBlendStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("logicOpEnable"), + ValueLayout.JAVA_INT.withName("logicOp"), + ValueLayout.JAVA_INT.withName("attachmentCount"), + ValueLayout.ADDRESS.withName("pAttachments"), + ValueLayout.JAVA_FLOAT.withName("blendConstants") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `logicOpEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_logicOpEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("logicOpEnable")); + /// The [VarHandle] of `logicOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_logicOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("logicOp")); + /// The [VarHandle] of `attachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentCount")); + /// The [VarHandle] of `pAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttachments")); + /// The [VarHandle] of `blendConstants` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_blendConstants = LAYOUT.arrayElementVarHandle(PathElement.groupElement("blendConstants")); + + /// Creates `VkPipelineColorBlendStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineColorBlendStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineColorBlendStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorBlendStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorBlendStateCreateInfo(segment); } + + /// Creates `VkPipelineColorBlendStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorBlendStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorBlendStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineColorBlendStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineColorBlendStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineColorBlendStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineColorBlendStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineColorBlendStateCreateInfo` + public static VkPipelineColorBlendStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineColorBlendStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineColorBlendStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineColorBlendStateCreateInfo` + public static VkPipelineColorBlendStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineColorBlendStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineColorBlendStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineColorBlendStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineColorBlendStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineColorBlendStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineColorBlendStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineColorBlendStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineColorBlendStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineColorBlendStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineColorBlendStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineColorBlendStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineColorBlendStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineColorBlendStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineColorBlendStateCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineColorBlendStateCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineColorBlendStateCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineColorBlendStateCreateFlags") int flagsAt(long index) { return VkPipelineColorBlendStateCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineColorBlendStateCreateFlags") int flags() { return VkPipelineColorBlendStateCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineColorBlendStateCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineColorBlendStateCreateFlags") int value) { VkPipelineColorBlendStateCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo flagsAt(long index, @CType("VkPipelineColorBlendStateCreateFlags") int value) { VkPipelineColorBlendStateCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo flags(@CType("VkPipelineColorBlendStateCreateFlags") int value) { VkPipelineColorBlendStateCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `logicOpEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_logicOpEnable(MemorySegment segment, long index) { return (int) VH_logicOpEnable.get(segment, 0L, index); } + /// {@return `logicOpEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_logicOpEnable(MemorySegment segment) { return VkPipelineColorBlendStateCreateInfo.get_logicOpEnable(segment, 0L); } + /// {@return `logicOpEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int logicOpEnableAt(long index) { return VkPipelineColorBlendStateCreateInfo.get_logicOpEnable(this.segment(), index); } + /// {@return `logicOpEnable`} + public @CType("VkBool32") int logicOpEnable() { return VkPipelineColorBlendStateCreateInfo.get_logicOpEnable(this.segment()); } + /// Sets `logicOpEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_logicOpEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_logicOpEnable.set(segment, 0L, index, value); } + /// Sets `logicOpEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_logicOpEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineColorBlendStateCreateInfo.set_logicOpEnable(segment, 0L, value); } + /// Sets `logicOpEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo logicOpEnableAt(long index, @CType("VkBool32") int value) { VkPipelineColorBlendStateCreateInfo.set_logicOpEnable(this.segment(), index, value); return this; } + /// Sets `logicOpEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo logicOpEnable(@CType("VkBool32") int value) { VkPipelineColorBlendStateCreateInfo.set_logicOpEnable(this.segment(), value); return this; } + + /// {@return `logicOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkLogicOp") int get_logicOp(MemorySegment segment, long index) { return (int) VH_logicOp.get(segment, 0L, index); } + /// {@return `logicOp`} + /// @param segment the segment of the struct + public static @CType("VkLogicOp") int get_logicOp(MemorySegment segment) { return VkPipelineColorBlendStateCreateInfo.get_logicOp(segment, 0L); } + /// {@return `logicOp` at the given index} + /// @param index the index + public @CType("VkLogicOp") int logicOpAt(long index) { return VkPipelineColorBlendStateCreateInfo.get_logicOp(this.segment(), index); } + /// {@return `logicOp`} + public @CType("VkLogicOp") int logicOp() { return VkPipelineColorBlendStateCreateInfo.get_logicOp(this.segment()); } + /// Sets `logicOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_logicOp(MemorySegment segment, long index, @CType("VkLogicOp") int value) { VH_logicOp.set(segment, 0L, index, value); } + /// Sets `logicOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_logicOp(MemorySegment segment, @CType("VkLogicOp") int value) { VkPipelineColorBlendStateCreateInfo.set_logicOp(segment, 0L, value); } + /// Sets `logicOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo logicOpAt(long index, @CType("VkLogicOp") int value) { VkPipelineColorBlendStateCreateInfo.set_logicOp(this.segment(), index, value); return this; } + /// Sets `logicOp` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo logicOp(@CType("VkLogicOp") int value) { VkPipelineColorBlendStateCreateInfo.set_logicOp(this.segment(), value); return this; } + + /// {@return `attachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment, long index) { return (int) VH_attachmentCount.get(segment, 0L, index); } + /// {@return `attachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment) { return VkPipelineColorBlendStateCreateInfo.get_attachmentCount(segment, 0L); } + /// {@return `attachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentCountAt(long index) { return VkPipelineColorBlendStateCreateInfo.get_attachmentCount(this.segment(), index); } + /// {@return `attachmentCount`} + public @CType("uint32_t") int attachmentCount() { return VkPipelineColorBlendStateCreateInfo.get_attachmentCount(this.segment()); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachmentCount.set(segment, 0L, index, value); } + /// Sets `attachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineColorBlendStateCreateInfo.set_attachmentCount(segment, 0L, value); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo attachmentCountAt(long index, @CType("uint32_t") int value) { VkPipelineColorBlendStateCreateInfo.set_attachmentCount(this.segment(), index, value); return this; } + /// Sets `attachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo attachmentCount(@CType("uint32_t") int value) { VkPipelineColorBlendStateCreateInfo.set_attachmentCount(this.segment(), value); return this; } + + /// {@return `pAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineColorBlendAttachmentState *") java.lang.foreign.MemorySegment get_pAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttachments.get(segment, 0L, index); } + /// {@return `pAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineColorBlendAttachmentState *") java.lang.foreign.MemorySegment get_pAttachments(MemorySegment segment) { return VkPipelineColorBlendStateCreateInfo.get_pAttachments(segment, 0L); } + /// {@return `pAttachments` at the given index} + /// @param index the index + public @CType("const VkPipelineColorBlendAttachmentState *") java.lang.foreign.MemorySegment pAttachmentsAt(long index) { return VkPipelineColorBlendStateCreateInfo.get_pAttachments(this.segment(), index); } + /// {@return `pAttachments`} + public @CType("const VkPipelineColorBlendAttachmentState *") java.lang.foreign.MemorySegment pAttachments() { return VkPipelineColorBlendStateCreateInfo.get_pAttachments(this.segment()); } + /// Sets `pAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttachments(MemorySegment segment, long index, @CType("const VkPipelineColorBlendAttachmentState *") java.lang.foreign.MemorySegment value) { VH_pAttachments.set(segment, 0L, index, value); } + /// Sets `pAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttachments(MemorySegment segment, @CType("const VkPipelineColorBlendAttachmentState *") java.lang.foreign.MemorySegment value) { VkPipelineColorBlendStateCreateInfo.set_pAttachments(segment, 0L, value); } + /// Sets `pAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo pAttachmentsAt(long index, @CType("const VkPipelineColorBlendAttachmentState *") java.lang.foreign.MemorySegment value) { VkPipelineColorBlendStateCreateInfo.set_pAttachments(this.segment(), index, value); return this; } + /// Sets `pAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo pAttachments(@CType("const VkPipelineColorBlendAttachmentState *") java.lang.foreign.MemorySegment value) { VkPipelineColorBlendStateCreateInfo.set_pAttachments(this.segment(), value); return this; } + + /// {@return `blendConstants` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_blendConstants(MemorySegment segment, long index) { return (float) VH_blendConstants.get(segment, 0L, index); } + /// {@return `blendConstants`} + /// @param segment the segment of the struct + public static @CType("float") float get_blendConstants(MemorySegment segment) { return VkPipelineColorBlendStateCreateInfo.get_blendConstants(segment, 0L); } + /// {@return `blendConstants` at the given index} + /// @param index the index + public @CType("float") float blendConstantsAt(long index) { return VkPipelineColorBlendStateCreateInfo.get_blendConstants(this.segment(), index); } + /// {@return `blendConstants`} + public @CType("float") float blendConstants() { return VkPipelineColorBlendStateCreateInfo.get_blendConstants(this.segment()); } + /// Sets `blendConstants` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_blendConstants(MemorySegment segment, long index, @CType("float") float value) { VH_blendConstants.set(segment, 0L, index, value); } + /// Sets `blendConstants` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_blendConstants(MemorySegment segment, @CType("float") float value) { VkPipelineColorBlendStateCreateInfo.set_blendConstants(segment, 0L, value); } + /// Sets `blendConstants` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo blendConstantsAt(long index, @CType("float") float value) { VkPipelineColorBlendStateCreateInfo.set_blendConstants(this.segment(), index, value); return this; } + /// Sets `blendConstants` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineColorBlendStateCreateInfo blendConstants(@CType("float") float value) { VkPipelineColorBlendStateCreateInfo.set_blendConstants(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCreateFlags2CreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCreateFlags2CreateInfo.java new file mode 100644 index 00000000..c449e2a9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCreateFlags2CreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCreateFlags2CreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCreateFlags2 flags; +/// } VkPipelineCreateFlags2CreateInfo; +/// ``` +public final class VkPipelineCreateFlags2CreateInfo extends Struct { + /// The struct layout of `VkPipelineCreateFlags2CreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkPipelineCreateFlags2CreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineCreateFlags2CreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCreateFlags2CreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreateFlags2CreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreateFlags2CreateInfo(segment); } + + /// Creates `VkPipelineCreateFlags2CreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreateFlags2CreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreateFlags2CreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCreateFlags2CreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreateFlags2CreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreateFlags2CreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCreateFlags2CreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCreateFlags2CreateInfo` + public static VkPipelineCreateFlags2CreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineCreateFlags2CreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCreateFlags2CreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCreateFlags2CreateInfo` + public static VkPipelineCreateFlags2CreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineCreateFlags2CreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineCreateFlags2CreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineCreateFlags2CreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineCreateFlags2CreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineCreateFlags2CreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreateFlags2CreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineCreateFlags2CreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreateFlags2CreateInfo sType(@CType("VkStructureType") int value) { VkPipelineCreateFlags2CreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineCreateFlags2CreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineCreateFlags2CreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineCreateFlags2CreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCreateFlags2CreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreateFlags2CreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCreateFlags2CreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreateFlags2CreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCreateFlags2CreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCreateFlags2") long get_flags(MemorySegment segment, long index) { return (long) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCreateFlags2") long get_flags(MemorySegment segment) { return VkPipelineCreateFlags2CreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCreateFlags2") long flagsAt(long index) { return VkPipelineCreateFlags2CreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCreateFlags2") long flags() { return VkPipelineCreateFlags2CreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCreateFlags2") long value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCreateFlags2") long value) { VkPipelineCreateFlags2CreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreateFlags2CreateInfo flagsAt(long index, @CType("VkPipelineCreateFlags2") long value) { VkPipelineCreateFlags2CreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreateFlags2CreateInfo flags(@CType("VkPipelineCreateFlags2") long value) { VkPipelineCreateFlags2CreateInfo.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCreationFeedback.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCreationFeedback.java new file mode 100644 index 00000000..a5bf3f3c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCreationFeedback.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### duration +/// [VarHandle][#VH_duration] - [Getter][#duration()] - [Setter][#duration(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCreationFeedback { +/// VkPipelineCreationFeedbackFlags flags; +/// uint64_t duration; +/// } VkPipelineCreationFeedback; +/// ``` +public final class VkPipelineCreationFeedback extends Struct { + /// The struct layout of `VkPipelineCreationFeedback`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("duration") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `duration` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_duration = LAYOUT.arrayElementVarHandle(PathElement.groupElement("duration")); + + /// Creates `VkPipelineCreationFeedback` with the given segment. + /// @param segment the memory segment + public VkPipelineCreationFeedback(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCreationFeedback` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreationFeedback of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreationFeedback(segment); } + + /// Creates `VkPipelineCreationFeedback` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreationFeedback ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreationFeedback(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCreationFeedback` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreationFeedback ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreationFeedback(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCreationFeedback` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCreationFeedback` + public static VkPipelineCreationFeedback alloc(SegmentAllocator allocator) { return new VkPipelineCreationFeedback(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCreationFeedback` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCreationFeedback` + public static VkPipelineCreationFeedback alloc(SegmentAllocator allocator, long count) { return new VkPipelineCreationFeedback(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCreationFeedbackFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCreationFeedbackFlags") int get_flags(MemorySegment segment) { return VkPipelineCreationFeedback.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineCreationFeedbackFlags") int flagsAt(long index) { return VkPipelineCreationFeedback.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineCreationFeedbackFlags") int flags() { return VkPipelineCreationFeedback.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineCreationFeedbackFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineCreationFeedbackFlags") int value) { VkPipelineCreationFeedback.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedback flagsAt(long index, @CType("VkPipelineCreationFeedbackFlags") int value) { VkPipelineCreationFeedback.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedback flags(@CType("VkPipelineCreationFeedbackFlags") int value) { VkPipelineCreationFeedback.set_flags(this.segment(), value); return this; } + + /// {@return `duration` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_duration(MemorySegment segment, long index) { return (long) VH_duration.get(segment, 0L, index); } + /// {@return `duration`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_duration(MemorySegment segment) { return VkPipelineCreationFeedback.get_duration(segment, 0L); } + /// {@return `duration` at the given index} + /// @param index the index + public @CType("uint64_t") long durationAt(long index) { return VkPipelineCreationFeedback.get_duration(this.segment(), index); } + /// {@return `duration`} + public @CType("uint64_t") long duration() { return VkPipelineCreationFeedback.get_duration(this.segment()); } + /// Sets `duration` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_duration(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_duration.set(segment, 0L, index, value); } + /// Sets `duration` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_duration(MemorySegment segment, @CType("uint64_t") long value) { VkPipelineCreationFeedback.set_duration(segment, 0L, value); } + /// Sets `duration` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedback durationAt(long index, @CType("uint64_t") long value) { VkPipelineCreationFeedback.set_duration(this.segment(), index, value); return this; } + /// Sets `duration` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedback duration(@CType("uint64_t") long value) { VkPipelineCreationFeedback.set_duration(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCreationFeedbackCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCreationFeedbackCreateInfo.java new file mode 100644 index 00000000..120d8d35 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineCreationFeedbackCreateInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pPipelineCreationFeedback +/// [VarHandle][#VH_pPipelineCreationFeedback] - [Getter][#pPipelineCreationFeedback()] - [Setter][#pPipelineCreationFeedback(java.lang.foreign.MemorySegment)] +/// ### pipelineStageCreationFeedbackCount +/// [VarHandle][#VH_pipelineStageCreationFeedbackCount] - [Getter][#pipelineStageCreationFeedbackCount()] - [Setter][#pipelineStageCreationFeedbackCount(int)] +/// ### pPipelineStageCreationFeedbacks +/// [VarHandle][#VH_pPipelineStageCreationFeedbacks] - [Getter][#pPipelineStageCreationFeedbacks()] - [Setter][#pPipelineStageCreationFeedbacks(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineCreationFeedbackCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineCreationFeedback * pPipelineCreationFeedback; +/// uint32_t pipelineStageCreationFeedbackCount; +/// VkPipelineCreationFeedback * pPipelineStageCreationFeedbacks; +/// } VkPipelineCreationFeedbackCreateInfo; +/// ``` +public final class VkPipelineCreationFeedbackCreateInfo extends Struct { + /// The struct layout of `VkPipelineCreationFeedbackCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("pPipelineCreationFeedback"), + ValueLayout.JAVA_INT.withName("pipelineStageCreationFeedbackCount"), + ValueLayout.ADDRESS.withName("pPipelineStageCreationFeedbacks") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `pPipelineCreationFeedback` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelineCreationFeedback = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelineCreationFeedback")); + /// The [VarHandle] of `pipelineStageCreationFeedbackCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineStageCreationFeedbackCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineStageCreationFeedbackCount")); + /// The [VarHandle] of `pPipelineStageCreationFeedbacks` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPipelineStageCreationFeedbacks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPipelineStageCreationFeedbacks")); + + /// Creates `VkPipelineCreationFeedbackCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineCreationFeedbackCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineCreationFeedbackCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreationFeedbackCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreationFeedbackCreateInfo(segment); } + + /// Creates `VkPipelineCreationFeedbackCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreationFeedbackCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreationFeedbackCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineCreationFeedbackCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineCreationFeedbackCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineCreationFeedbackCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineCreationFeedbackCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineCreationFeedbackCreateInfo` + public static VkPipelineCreationFeedbackCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineCreationFeedbackCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineCreationFeedbackCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineCreationFeedbackCreateInfo` + public static VkPipelineCreationFeedbackCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineCreationFeedbackCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineCreationFeedbackCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineCreationFeedbackCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineCreationFeedbackCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineCreationFeedbackCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedbackCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineCreationFeedbackCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedbackCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineCreationFeedbackCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineCreationFeedbackCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineCreationFeedbackCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineCreationFeedbackCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCreationFeedbackCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedbackCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCreationFeedbackCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedbackCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineCreationFeedbackCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `pPipelineCreationFeedback` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment get_pPipelineCreationFeedback(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelineCreationFeedback.get(segment, 0L, index); } + /// {@return `pPipelineCreationFeedback`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment get_pPipelineCreationFeedback(MemorySegment segment) { return VkPipelineCreationFeedbackCreateInfo.get_pPipelineCreationFeedback(segment, 0L); } + /// {@return `pPipelineCreationFeedback` at the given index} + /// @param index the index + public @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment pPipelineCreationFeedbackAt(long index) { return VkPipelineCreationFeedbackCreateInfo.get_pPipelineCreationFeedback(this.segment(), index); } + /// {@return `pPipelineCreationFeedback`} + public @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment pPipelineCreationFeedback() { return VkPipelineCreationFeedbackCreateInfo.get_pPipelineCreationFeedback(this.segment()); } + /// Sets `pPipelineCreationFeedback` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelineCreationFeedback(MemorySegment segment, long index, @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment value) { VH_pPipelineCreationFeedback.set(segment, 0L, index, value); } + /// Sets `pPipelineCreationFeedback` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelineCreationFeedback(MemorySegment segment, @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment value) { VkPipelineCreationFeedbackCreateInfo.set_pPipelineCreationFeedback(segment, 0L, value); } + /// Sets `pPipelineCreationFeedback` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedbackCreateInfo pPipelineCreationFeedbackAt(long index, @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment value) { VkPipelineCreationFeedbackCreateInfo.set_pPipelineCreationFeedback(this.segment(), index, value); return this; } + /// Sets `pPipelineCreationFeedback` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedbackCreateInfo pPipelineCreationFeedback(@CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment value) { VkPipelineCreationFeedbackCreateInfo.set_pPipelineCreationFeedback(this.segment(), value); return this; } + + /// {@return `pipelineStageCreationFeedbackCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pipelineStageCreationFeedbackCount(MemorySegment segment, long index) { return (int) VH_pipelineStageCreationFeedbackCount.get(segment, 0L, index); } + /// {@return `pipelineStageCreationFeedbackCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pipelineStageCreationFeedbackCount(MemorySegment segment) { return VkPipelineCreationFeedbackCreateInfo.get_pipelineStageCreationFeedbackCount(segment, 0L); } + /// {@return `pipelineStageCreationFeedbackCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pipelineStageCreationFeedbackCountAt(long index) { return VkPipelineCreationFeedbackCreateInfo.get_pipelineStageCreationFeedbackCount(this.segment(), index); } + /// {@return `pipelineStageCreationFeedbackCount`} + public @CType("uint32_t") int pipelineStageCreationFeedbackCount() { return VkPipelineCreationFeedbackCreateInfo.get_pipelineStageCreationFeedbackCount(this.segment()); } + /// Sets `pipelineStageCreationFeedbackCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineStageCreationFeedbackCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pipelineStageCreationFeedbackCount.set(segment, 0L, index, value); } + /// Sets `pipelineStageCreationFeedbackCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineStageCreationFeedbackCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineCreationFeedbackCreateInfo.set_pipelineStageCreationFeedbackCount(segment, 0L, value); } + /// Sets `pipelineStageCreationFeedbackCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedbackCreateInfo pipelineStageCreationFeedbackCountAt(long index, @CType("uint32_t") int value) { VkPipelineCreationFeedbackCreateInfo.set_pipelineStageCreationFeedbackCount(this.segment(), index, value); return this; } + /// Sets `pipelineStageCreationFeedbackCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedbackCreateInfo pipelineStageCreationFeedbackCount(@CType("uint32_t") int value) { VkPipelineCreationFeedbackCreateInfo.set_pipelineStageCreationFeedbackCount(this.segment(), value); return this; } + + /// {@return `pPipelineStageCreationFeedbacks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment get_pPipelineStageCreationFeedbacks(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPipelineStageCreationFeedbacks.get(segment, 0L, index); } + /// {@return `pPipelineStageCreationFeedbacks`} + /// @param segment the segment of the struct + public static @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment get_pPipelineStageCreationFeedbacks(MemorySegment segment) { return VkPipelineCreationFeedbackCreateInfo.get_pPipelineStageCreationFeedbacks(segment, 0L); } + /// {@return `pPipelineStageCreationFeedbacks` at the given index} + /// @param index the index + public @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment pPipelineStageCreationFeedbacksAt(long index) { return VkPipelineCreationFeedbackCreateInfo.get_pPipelineStageCreationFeedbacks(this.segment(), index); } + /// {@return `pPipelineStageCreationFeedbacks`} + public @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment pPipelineStageCreationFeedbacks() { return VkPipelineCreationFeedbackCreateInfo.get_pPipelineStageCreationFeedbacks(this.segment()); } + /// Sets `pPipelineStageCreationFeedbacks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPipelineStageCreationFeedbacks(MemorySegment segment, long index, @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment value) { VH_pPipelineStageCreationFeedbacks.set(segment, 0L, index, value); } + /// Sets `pPipelineStageCreationFeedbacks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPipelineStageCreationFeedbacks(MemorySegment segment, @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment value) { VkPipelineCreationFeedbackCreateInfo.set_pPipelineStageCreationFeedbacks(segment, 0L, value); } + /// Sets `pPipelineStageCreationFeedbacks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedbackCreateInfo pPipelineStageCreationFeedbacksAt(long index, @CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment value) { VkPipelineCreationFeedbackCreateInfo.set_pPipelineStageCreationFeedbacks(this.segment(), index, value); return this; } + /// Sets `pPipelineStageCreationFeedbacks` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineCreationFeedbackCreateInfo pPipelineStageCreationFeedbacks(@CType("VkPipelineCreationFeedback *") java.lang.foreign.MemorySegment value) { VkPipelineCreationFeedbackCreateInfo.set_pPipelineStageCreationFeedbacks(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineDepthStencilStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineDepthStencilStateCreateInfo.java new file mode 100644 index 00000000..546c21ac --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineDepthStencilStateCreateInfo.java @@ -0,0 +1,522 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### depthTestEnable +/// [VarHandle][#VH_depthTestEnable] - [Getter][#depthTestEnable()] - [Setter][#depthTestEnable(int)] +/// ### depthWriteEnable +/// [VarHandle][#VH_depthWriteEnable] - [Getter][#depthWriteEnable()] - [Setter][#depthWriteEnable(int)] +/// ### depthCompareOp +/// [VarHandle][#VH_depthCompareOp] - [Getter][#depthCompareOp()] - [Setter][#depthCompareOp(int)] +/// ### depthBoundsTestEnable +/// [VarHandle][#VH_depthBoundsTestEnable] - [Getter][#depthBoundsTestEnable()] - [Setter][#depthBoundsTestEnable(int)] +/// ### stencilTestEnable +/// [VarHandle][#VH_stencilTestEnable] - [Getter][#stencilTestEnable()] - [Setter][#stencilTestEnable(int)] +/// ### front +/// [Byte offset][#OFFSET_front] - [Memory layout][#ML_front] - [Getter][#front()] - [Setter][#front(java.lang.foreign.MemorySegment)] +/// ### back +/// [Byte offset][#OFFSET_back] - [Memory layout][#ML_back] - [Getter][#back()] - [Setter][#back(java.lang.foreign.MemorySegment)] +/// ### minDepthBounds +/// [VarHandle][#VH_minDepthBounds] - [Getter][#minDepthBounds()] - [Setter][#minDepthBounds(float)] +/// ### maxDepthBounds +/// [VarHandle][#VH_maxDepthBounds] - [Getter][#maxDepthBounds()] - [Setter][#maxDepthBounds(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineDepthStencilStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineDepthStencilStateCreateFlags flags; +/// VkBool32 depthTestEnable; +/// VkBool32 depthWriteEnable; +/// VkCompareOp depthCompareOp; +/// VkBool32 depthBoundsTestEnable; +/// VkBool32 stencilTestEnable; +/// VkStencilOpState front; +/// VkStencilOpState back; +/// float minDepthBounds; +/// float maxDepthBounds; +/// } VkPipelineDepthStencilStateCreateInfo; +/// ``` +public final class VkPipelineDepthStencilStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineDepthStencilStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("depthTestEnable"), + ValueLayout.JAVA_INT.withName("depthWriteEnable"), + ValueLayout.JAVA_INT.withName("depthCompareOp"), + ValueLayout.JAVA_INT.withName("depthBoundsTestEnable"), + ValueLayout.JAVA_INT.withName("stencilTestEnable"), + overrungl.vulkan.struct.VkStencilOpState.LAYOUT.withName("front"), + overrungl.vulkan.struct.VkStencilOpState.LAYOUT.withName("back"), + ValueLayout.JAVA_FLOAT.withName("minDepthBounds"), + ValueLayout.JAVA_FLOAT.withName("maxDepthBounds") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `depthTestEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthTestEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthTestEnable")); + /// The [VarHandle] of `depthWriteEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthWriteEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthWriteEnable")); + /// The [VarHandle] of `depthCompareOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthCompareOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthCompareOp")); + /// The [VarHandle] of `depthBoundsTestEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthBoundsTestEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBoundsTestEnable")); + /// The [VarHandle] of `stencilTestEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilTestEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilTestEnable")); + /// The byte offset of `front`. + public static final long OFFSET_front = LAYOUT.byteOffset(PathElement.groupElement("front")); + /// The memory layout of `front`. + public static final MemoryLayout ML_front = LAYOUT.select(PathElement.groupElement("front")); + /// The byte offset of `back`. + public static final long OFFSET_back = LAYOUT.byteOffset(PathElement.groupElement("back")); + /// The memory layout of `back`. + public static final MemoryLayout ML_back = LAYOUT.select(PathElement.groupElement("back")); + /// The [VarHandle] of `minDepthBounds` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minDepthBounds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minDepthBounds")); + /// The [VarHandle] of `maxDepthBounds` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxDepthBounds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDepthBounds")); + + /// Creates `VkPipelineDepthStencilStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineDepthStencilStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineDepthStencilStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineDepthStencilStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineDepthStencilStateCreateInfo(segment); } + + /// Creates `VkPipelineDepthStencilStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineDepthStencilStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineDepthStencilStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineDepthStencilStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineDepthStencilStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineDepthStencilStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineDepthStencilStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineDepthStencilStateCreateInfo` + public static VkPipelineDepthStencilStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineDepthStencilStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineDepthStencilStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineDepthStencilStateCreateInfo` + public static VkPipelineDepthStencilStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineDepthStencilStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineDepthStencilStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineDepthStencilStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineDepthStencilStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineDepthStencilStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineDepthStencilStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineDepthStencilStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineDepthStencilStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineDepthStencilStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineDepthStencilStateCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineDepthStencilStateCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineDepthStencilStateCreateFlags") int flagsAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineDepthStencilStateCreateFlags") int flags() { return VkPipelineDepthStencilStateCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineDepthStencilStateCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineDepthStencilStateCreateFlags") int value) { VkPipelineDepthStencilStateCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo flagsAt(long index, @CType("VkPipelineDepthStencilStateCreateFlags") int value) { VkPipelineDepthStencilStateCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo flags(@CType("VkPipelineDepthStencilStateCreateFlags") int value) { VkPipelineDepthStencilStateCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `depthTestEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthTestEnable(MemorySegment segment, long index) { return (int) VH_depthTestEnable.get(segment, 0L, index); } + /// {@return `depthTestEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthTestEnable(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_depthTestEnable(segment, 0L); } + /// {@return `depthTestEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int depthTestEnableAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_depthTestEnable(this.segment(), index); } + /// {@return `depthTestEnable`} + public @CType("VkBool32") int depthTestEnable() { return VkPipelineDepthStencilStateCreateInfo.get_depthTestEnable(this.segment()); } + /// Sets `depthTestEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthTestEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthTestEnable.set(segment, 0L, index, value); } + /// Sets `depthTestEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthTestEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthTestEnable(segment, 0L, value); } + /// Sets `depthTestEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo depthTestEnableAt(long index, @CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthTestEnable(this.segment(), index, value); return this; } + /// Sets `depthTestEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo depthTestEnable(@CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthTestEnable(this.segment(), value); return this; } + + /// {@return `depthWriteEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthWriteEnable(MemorySegment segment, long index) { return (int) VH_depthWriteEnable.get(segment, 0L, index); } + /// {@return `depthWriteEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthWriteEnable(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_depthWriteEnable(segment, 0L); } + /// {@return `depthWriteEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int depthWriteEnableAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_depthWriteEnable(this.segment(), index); } + /// {@return `depthWriteEnable`} + public @CType("VkBool32") int depthWriteEnable() { return VkPipelineDepthStencilStateCreateInfo.get_depthWriteEnable(this.segment()); } + /// Sets `depthWriteEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthWriteEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthWriteEnable.set(segment, 0L, index, value); } + /// Sets `depthWriteEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthWriteEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthWriteEnable(segment, 0L, value); } + /// Sets `depthWriteEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo depthWriteEnableAt(long index, @CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthWriteEnable(this.segment(), index, value); return this; } + /// Sets `depthWriteEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo depthWriteEnable(@CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthWriteEnable(this.segment(), value); return this; } + + /// {@return `depthCompareOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCompareOp") int get_depthCompareOp(MemorySegment segment, long index) { return (int) VH_depthCompareOp.get(segment, 0L, index); } + /// {@return `depthCompareOp`} + /// @param segment the segment of the struct + public static @CType("VkCompareOp") int get_depthCompareOp(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_depthCompareOp(segment, 0L); } + /// {@return `depthCompareOp` at the given index} + /// @param index the index + public @CType("VkCompareOp") int depthCompareOpAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_depthCompareOp(this.segment(), index); } + /// {@return `depthCompareOp`} + public @CType("VkCompareOp") int depthCompareOp() { return VkPipelineDepthStencilStateCreateInfo.get_depthCompareOp(this.segment()); } + /// Sets `depthCompareOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthCompareOp(MemorySegment segment, long index, @CType("VkCompareOp") int value) { VH_depthCompareOp.set(segment, 0L, index, value); } + /// Sets `depthCompareOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthCompareOp(MemorySegment segment, @CType("VkCompareOp") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthCompareOp(segment, 0L, value); } + /// Sets `depthCompareOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo depthCompareOpAt(long index, @CType("VkCompareOp") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthCompareOp(this.segment(), index, value); return this; } + /// Sets `depthCompareOp` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo depthCompareOp(@CType("VkCompareOp") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthCompareOp(this.segment(), value); return this; } + + /// {@return `depthBoundsTestEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthBoundsTestEnable(MemorySegment segment, long index) { return (int) VH_depthBoundsTestEnable.get(segment, 0L, index); } + /// {@return `depthBoundsTestEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthBoundsTestEnable(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_depthBoundsTestEnable(segment, 0L); } + /// {@return `depthBoundsTestEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int depthBoundsTestEnableAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_depthBoundsTestEnable(this.segment(), index); } + /// {@return `depthBoundsTestEnable`} + public @CType("VkBool32") int depthBoundsTestEnable() { return VkPipelineDepthStencilStateCreateInfo.get_depthBoundsTestEnable(this.segment()); } + /// Sets `depthBoundsTestEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBoundsTestEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthBoundsTestEnable.set(segment, 0L, index, value); } + /// Sets `depthBoundsTestEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBoundsTestEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthBoundsTestEnable(segment, 0L, value); } + /// Sets `depthBoundsTestEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo depthBoundsTestEnableAt(long index, @CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthBoundsTestEnable(this.segment(), index, value); return this; } + /// Sets `depthBoundsTestEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo depthBoundsTestEnable(@CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_depthBoundsTestEnable(this.segment(), value); return this; } + + /// {@return `stencilTestEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_stencilTestEnable(MemorySegment segment, long index) { return (int) VH_stencilTestEnable.get(segment, 0L, index); } + /// {@return `stencilTestEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_stencilTestEnable(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_stencilTestEnable(segment, 0L); } + /// {@return `stencilTestEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int stencilTestEnableAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_stencilTestEnable(this.segment(), index); } + /// {@return `stencilTestEnable`} + public @CType("VkBool32") int stencilTestEnable() { return VkPipelineDepthStencilStateCreateInfo.get_stencilTestEnable(this.segment()); } + /// Sets `stencilTestEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilTestEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_stencilTestEnable.set(segment, 0L, index, value); } + /// Sets `stencilTestEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilTestEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_stencilTestEnable(segment, 0L, value); } + /// Sets `stencilTestEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo stencilTestEnableAt(long index, @CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_stencilTestEnable(this.segment(), index, value); return this; } + /// Sets `stencilTestEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo stencilTestEnable(@CType("VkBool32") int value) { VkPipelineDepthStencilStateCreateInfo.set_stencilTestEnable(this.segment(), value); return this; } + + /// {@return `front` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStencilOpState") java.lang.foreign.MemorySegment get_front(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_front, index), ML_front); } + /// {@return `front`} + /// @param segment the segment of the struct + public static @CType("VkStencilOpState") java.lang.foreign.MemorySegment get_front(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_front(segment, 0L); } + /// {@return `front` at the given index} + /// @param index the index + public @CType("VkStencilOpState") java.lang.foreign.MemorySegment frontAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_front(this.segment(), index); } + /// {@return `front`} + public @CType("VkStencilOpState") java.lang.foreign.MemorySegment front() { return VkPipelineDepthStencilStateCreateInfo.get_front(this.segment()); } + /// Sets `front` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_front(MemorySegment segment, long index, @CType("VkStencilOpState") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_front, index), ML_front.byteSize()); } + /// Sets `front` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_front(MemorySegment segment, @CType("VkStencilOpState") java.lang.foreign.MemorySegment value) { VkPipelineDepthStencilStateCreateInfo.set_front(segment, 0L, value); } + /// Sets `front` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo frontAt(long index, @CType("VkStencilOpState") java.lang.foreign.MemorySegment value) { VkPipelineDepthStencilStateCreateInfo.set_front(this.segment(), index, value); return this; } + /// Sets `front` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo front(@CType("VkStencilOpState") java.lang.foreign.MemorySegment value) { VkPipelineDepthStencilStateCreateInfo.set_front(this.segment(), value); return this; } + + /// {@return `back` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStencilOpState") java.lang.foreign.MemorySegment get_back(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_back, index), ML_back); } + /// {@return `back`} + /// @param segment the segment of the struct + public static @CType("VkStencilOpState") java.lang.foreign.MemorySegment get_back(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_back(segment, 0L); } + /// {@return `back` at the given index} + /// @param index the index + public @CType("VkStencilOpState") java.lang.foreign.MemorySegment backAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_back(this.segment(), index); } + /// {@return `back`} + public @CType("VkStencilOpState") java.lang.foreign.MemorySegment back() { return VkPipelineDepthStencilStateCreateInfo.get_back(this.segment()); } + /// Sets `back` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_back(MemorySegment segment, long index, @CType("VkStencilOpState") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_back, index), ML_back.byteSize()); } + /// Sets `back` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_back(MemorySegment segment, @CType("VkStencilOpState") java.lang.foreign.MemorySegment value) { VkPipelineDepthStencilStateCreateInfo.set_back(segment, 0L, value); } + /// Sets `back` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo backAt(long index, @CType("VkStencilOpState") java.lang.foreign.MemorySegment value) { VkPipelineDepthStencilStateCreateInfo.set_back(this.segment(), index, value); return this; } + /// Sets `back` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo back(@CType("VkStencilOpState") java.lang.foreign.MemorySegment value) { VkPipelineDepthStencilStateCreateInfo.set_back(this.segment(), value); return this; } + + /// {@return `minDepthBounds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minDepthBounds(MemorySegment segment, long index) { return (float) VH_minDepthBounds.get(segment, 0L, index); } + /// {@return `minDepthBounds`} + /// @param segment the segment of the struct + public static @CType("float") float get_minDepthBounds(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_minDepthBounds(segment, 0L); } + /// {@return `minDepthBounds` at the given index} + /// @param index the index + public @CType("float") float minDepthBoundsAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_minDepthBounds(this.segment(), index); } + /// {@return `minDepthBounds`} + public @CType("float") float minDepthBounds() { return VkPipelineDepthStencilStateCreateInfo.get_minDepthBounds(this.segment()); } + /// Sets `minDepthBounds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minDepthBounds(MemorySegment segment, long index, @CType("float") float value) { VH_minDepthBounds.set(segment, 0L, index, value); } + /// Sets `minDepthBounds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minDepthBounds(MemorySegment segment, @CType("float") float value) { VkPipelineDepthStencilStateCreateInfo.set_minDepthBounds(segment, 0L, value); } + /// Sets `minDepthBounds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo minDepthBoundsAt(long index, @CType("float") float value) { VkPipelineDepthStencilStateCreateInfo.set_minDepthBounds(this.segment(), index, value); return this; } + /// Sets `minDepthBounds` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo minDepthBounds(@CType("float") float value) { VkPipelineDepthStencilStateCreateInfo.set_minDepthBounds(this.segment(), value); return this; } + + /// {@return `maxDepthBounds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxDepthBounds(MemorySegment segment, long index) { return (float) VH_maxDepthBounds.get(segment, 0L, index); } + /// {@return `maxDepthBounds`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxDepthBounds(MemorySegment segment) { return VkPipelineDepthStencilStateCreateInfo.get_maxDepthBounds(segment, 0L); } + /// {@return `maxDepthBounds` at the given index} + /// @param index the index + public @CType("float") float maxDepthBoundsAt(long index) { return VkPipelineDepthStencilStateCreateInfo.get_maxDepthBounds(this.segment(), index); } + /// {@return `maxDepthBounds`} + public @CType("float") float maxDepthBounds() { return VkPipelineDepthStencilStateCreateInfo.get_maxDepthBounds(this.segment()); } + /// Sets `maxDepthBounds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDepthBounds(MemorySegment segment, long index, @CType("float") float value) { VH_maxDepthBounds.set(segment, 0L, index, value); } + /// Sets `maxDepthBounds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDepthBounds(MemorySegment segment, @CType("float") float value) { VkPipelineDepthStencilStateCreateInfo.set_maxDepthBounds(segment, 0L, value); } + /// Sets `maxDepthBounds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo maxDepthBoundsAt(long index, @CType("float") float value) { VkPipelineDepthStencilStateCreateInfo.set_maxDepthBounds(this.segment(), index, value); return this; } + /// Sets `maxDepthBounds` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDepthStencilStateCreateInfo maxDepthBounds(@CType("float") float value) { VkPipelineDepthStencilStateCreateInfo.set_maxDepthBounds(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineDynamicStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineDynamicStateCreateInfo.java new file mode 100644 index 00000000..ce912e06 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineDynamicStateCreateInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### dynamicStateCount +/// [VarHandle][#VH_dynamicStateCount] - [Getter][#dynamicStateCount()] - [Setter][#dynamicStateCount(int)] +/// ### pDynamicStates +/// [VarHandle][#VH_pDynamicStates] - [Getter][#pDynamicStates()] - [Setter][#pDynamicStates(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineDynamicStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineDynamicStateCreateFlags flags; +/// uint32_t dynamicStateCount; +/// const VkDynamicState * pDynamicStates; +/// } VkPipelineDynamicStateCreateInfo; +/// ``` +public final class VkPipelineDynamicStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineDynamicStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("dynamicStateCount"), + ValueLayout.ADDRESS.withName("pDynamicStates") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `dynamicStateCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dynamicStateCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dynamicStateCount")); + /// The [VarHandle] of `pDynamicStates` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDynamicStates = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDynamicStates")); + + /// Creates `VkPipelineDynamicStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineDynamicStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineDynamicStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineDynamicStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineDynamicStateCreateInfo(segment); } + + /// Creates `VkPipelineDynamicStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineDynamicStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineDynamicStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineDynamicStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineDynamicStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineDynamicStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineDynamicStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineDynamicStateCreateInfo` + public static VkPipelineDynamicStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineDynamicStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineDynamicStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineDynamicStateCreateInfo` + public static VkPipelineDynamicStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineDynamicStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineDynamicStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineDynamicStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineDynamicStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineDynamicStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDynamicStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineDynamicStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDynamicStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineDynamicStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineDynamicStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineDynamicStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineDynamicStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineDynamicStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDynamicStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineDynamicStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDynamicStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineDynamicStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineDynamicStateCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineDynamicStateCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineDynamicStateCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineDynamicStateCreateFlags") int flagsAt(long index) { return VkPipelineDynamicStateCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineDynamicStateCreateFlags") int flags() { return VkPipelineDynamicStateCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineDynamicStateCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineDynamicStateCreateFlags") int value) { VkPipelineDynamicStateCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDynamicStateCreateInfo flagsAt(long index, @CType("VkPipelineDynamicStateCreateFlags") int value) { VkPipelineDynamicStateCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDynamicStateCreateInfo flags(@CType("VkPipelineDynamicStateCreateFlags") int value) { VkPipelineDynamicStateCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `dynamicStateCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dynamicStateCount(MemorySegment segment, long index) { return (int) VH_dynamicStateCount.get(segment, 0L, index); } + /// {@return `dynamicStateCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dynamicStateCount(MemorySegment segment) { return VkPipelineDynamicStateCreateInfo.get_dynamicStateCount(segment, 0L); } + /// {@return `dynamicStateCount` at the given index} + /// @param index the index + public @CType("uint32_t") int dynamicStateCountAt(long index) { return VkPipelineDynamicStateCreateInfo.get_dynamicStateCount(this.segment(), index); } + /// {@return `dynamicStateCount`} + public @CType("uint32_t") int dynamicStateCount() { return VkPipelineDynamicStateCreateInfo.get_dynamicStateCount(this.segment()); } + /// Sets `dynamicStateCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dynamicStateCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dynamicStateCount.set(segment, 0L, index, value); } + /// Sets `dynamicStateCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dynamicStateCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineDynamicStateCreateInfo.set_dynamicStateCount(segment, 0L, value); } + /// Sets `dynamicStateCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDynamicStateCreateInfo dynamicStateCountAt(long index, @CType("uint32_t") int value) { VkPipelineDynamicStateCreateInfo.set_dynamicStateCount(this.segment(), index, value); return this; } + /// Sets `dynamicStateCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDynamicStateCreateInfo dynamicStateCount(@CType("uint32_t") int value) { VkPipelineDynamicStateCreateInfo.set_dynamicStateCount(this.segment(), value); return this; } + + /// {@return `pDynamicStates` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDynamicState *") java.lang.foreign.MemorySegment get_pDynamicStates(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDynamicStates.get(segment, 0L, index); } + /// {@return `pDynamicStates`} + /// @param segment the segment of the struct + public static @CType("const VkDynamicState *") java.lang.foreign.MemorySegment get_pDynamicStates(MemorySegment segment) { return VkPipelineDynamicStateCreateInfo.get_pDynamicStates(segment, 0L); } + /// {@return `pDynamicStates` at the given index} + /// @param index the index + public @CType("const VkDynamicState *") java.lang.foreign.MemorySegment pDynamicStatesAt(long index) { return VkPipelineDynamicStateCreateInfo.get_pDynamicStates(this.segment(), index); } + /// {@return `pDynamicStates`} + public @CType("const VkDynamicState *") java.lang.foreign.MemorySegment pDynamicStates() { return VkPipelineDynamicStateCreateInfo.get_pDynamicStates(this.segment()); } + /// Sets `pDynamicStates` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDynamicStates(MemorySegment segment, long index, @CType("const VkDynamicState *") java.lang.foreign.MemorySegment value) { VH_pDynamicStates.set(segment, 0L, index, value); } + /// Sets `pDynamicStates` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDynamicStates(MemorySegment segment, @CType("const VkDynamicState *") java.lang.foreign.MemorySegment value) { VkPipelineDynamicStateCreateInfo.set_pDynamicStates(segment, 0L, value); } + /// Sets `pDynamicStates` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineDynamicStateCreateInfo pDynamicStatesAt(long index, @CType("const VkDynamicState *") java.lang.foreign.MemorySegment value) { VkPipelineDynamicStateCreateInfo.set_pDynamicStates(this.segment(), index, value); return this; } + /// Sets `pDynamicStates` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineDynamicStateCreateInfo pDynamicStates(@CType("const VkDynamicState *") java.lang.foreign.MemorySegment value) { VkPipelineDynamicStateCreateInfo.set_pDynamicStates(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineInputAssemblyStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineInputAssemblyStateCreateInfo.java new file mode 100644 index 00000000..ab32f7b8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineInputAssemblyStateCreateInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### topology +/// [VarHandle][#VH_topology] - [Getter][#topology()] - [Setter][#topology(int)] +/// ### primitiveRestartEnable +/// [VarHandle][#VH_primitiveRestartEnable] - [Getter][#primitiveRestartEnable()] - [Setter][#primitiveRestartEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineInputAssemblyStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineInputAssemblyStateCreateFlags flags; +/// VkPrimitiveTopology topology; +/// VkBool32 primitiveRestartEnable; +/// } VkPipelineInputAssemblyStateCreateInfo; +/// ``` +public final class VkPipelineInputAssemblyStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineInputAssemblyStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("topology"), + ValueLayout.JAVA_INT.withName("primitiveRestartEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `topology` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_topology = LAYOUT.arrayElementVarHandle(PathElement.groupElement("topology")); + /// The [VarHandle] of `primitiveRestartEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primitiveRestartEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primitiveRestartEnable")); + + /// Creates `VkPipelineInputAssemblyStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineInputAssemblyStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineInputAssemblyStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineInputAssemblyStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineInputAssemblyStateCreateInfo(segment); } + + /// Creates `VkPipelineInputAssemblyStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineInputAssemblyStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineInputAssemblyStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineInputAssemblyStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineInputAssemblyStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineInputAssemblyStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineInputAssemblyStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineInputAssemblyStateCreateInfo` + public static VkPipelineInputAssemblyStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineInputAssemblyStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineInputAssemblyStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineInputAssemblyStateCreateInfo` + public static VkPipelineInputAssemblyStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineInputAssemblyStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineInputAssemblyStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineInputAssemblyStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineInputAssemblyStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineInputAssemblyStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineInputAssemblyStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineInputAssemblyStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineInputAssemblyStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineInputAssemblyStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineInputAssemblyStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineInputAssemblyStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineInputAssemblyStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineInputAssemblyStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineInputAssemblyStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineInputAssemblyStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineInputAssemblyStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineInputAssemblyStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineInputAssemblyStateCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineInputAssemblyStateCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineInputAssemblyStateCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineInputAssemblyStateCreateFlags") int flagsAt(long index) { return VkPipelineInputAssemblyStateCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineInputAssemblyStateCreateFlags") int flags() { return VkPipelineInputAssemblyStateCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineInputAssemblyStateCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineInputAssemblyStateCreateFlags") int value) { VkPipelineInputAssemblyStateCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineInputAssemblyStateCreateInfo flagsAt(long index, @CType("VkPipelineInputAssemblyStateCreateFlags") int value) { VkPipelineInputAssemblyStateCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineInputAssemblyStateCreateInfo flags(@CType("VkPipelineInputAssemblyStateCreateFlags") int value) { VkPipelineInputAssemblyStateCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `topology` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPrimitiveTopology") int get_topology(MemorySegment segment, long index) { return (int) VH_topology.get(segment, 0L, index); } + /// {@return `topology`} + /// @param segment the segment of the struct + public static @CType("VkPrimitiveTopology") int get_topology(MemorySegment segment) { return VkPipelineInputAssemblyStateCreateInfo.get_topology(segment, 0L); } + /// {@return `topology` at the given index} + /// @param index the index + public @CType("VkPrimitiveTopology") int topologyAt(long index) { return VkPipelineInputAssemblyStateCreateInfo.get_topology(this.segment(), index); } + /// {@return `topology`} + public @CType("VkPrimitiveTopology") int topology() { return VkPipelineInputAssemblyStateCreateInfo.get_topology(this.segment()); } + /// Sets `topology` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_topology(MemorySegment segment, long index, @CType("VkPrimitiveTopology") int value) { VH_topology.set(segment, 0L, index, value); } + /// Sets `topology` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_topology(MemorySegment segment, @CType("VkPrimitiveTopology") int value) { VkPipelineInputAssemblyStateCreateInfo.set_topology(segment, 0L, value); } + /// Sets `topology` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineInputAssemblyStateCreateInfo topologyAt(long index, @CType("VkPrimitiveTopology") int value) { VkPipelineInputAssemblyStateCreateInfo.set_topology(this.segment(), index, value); return this; } + /// Sets `topology` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineInputAssemblyStateCreateInfo topology(@CType("VkPrimitiveTopology") int value) { VkPipelineInputAssemblyStateCreateInfo.set_topology(this.segment(), value); return this; } + + /// {@return `primitiveRestartEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_primitiveRestartEnable(MemorySegment segment, long index) { return (int) VH_primitiveRestartEnable.get(segment, 0L, index); } + /// {@return `primitiveRestartEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_primitiveRestartEnable(MemorySegment segment) { return VkPipelineInputAssemblyStateCreateInfo.get_primitiveRestartEnable(segment, 0L); } + /// {@return `primitiveRestartEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int primitiveRestartEnableAt(long index) { return VkPipelineInputAssemblyStateCreateInfo.get_primitiveRestartEnable(this.segment(), index); } + /// {@return `primitiveRestartEnable`} + public @CType("VkBool32") int primitiveRestartEnable() { return VkPipelineInputAssemblyStateCreateInfo.get_primitiveRestartEnable(this.segment()); } + /// Sets `primitiveRestartEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primitiveRestartEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_primitiveRestartEnable.set(segment, 0L, index, value); } + /// Sets `primitiveRestartEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primitiveRestartEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineInputAssemblyStateCreateInfo.set_primitiveRestartEnable(segment, 0L, value); } + /// Sets `primitiveRestartEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineInputAssemblyStateCreateInfo primitiveRestartEnableAt(long index, @CType("VkBool32") int value) { VkPipelineInputAssemblyStateCreateInfo.set_primitiveRestartEnable(this.segment(), index, value); return this; } + /// Sets `primitiveRestartEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineInputAssemblyStateCreateInfo primitiveRestartEnable(@CType("VkBool32") int value) { VkPipelineInputAssemblyStateCreateInfo.set_primitiveRestartEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineLayoutCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineLayoutCreateInfo.java new file mode 100644 index 00000000..c23a1ed2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineLayoutCreateInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### setLayoutCount +/// [VarHandle][#VH_setLayoutCount] - [Getter][#setLayoutCount()] - [Setter][#setLayoutCount(int)] +/// ### pSetLayouts +/// [VarHandle][#VH_pSetLayouts] - [Getter][#pSetLayouts()] - [Setter][#pSetLayouts(java.lang.foreign.MemorySegment)] +/// ### pushConstantRangeCount +/// [VarHandle][#VH_pushConstantRangeCount] - [Getter][#pushConstantRangeCount()] - [Setter][#pushConstantRangeCount(int)] +/// ### pPushConstantRanges +/// [VarHandle][#VH_pPushConstantRanges] - [Getter][#pPushConstantRanges()] - [Setter][#pPushConstantRanges(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineLayoutCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineLayoutCreateFlags flags; +/// uint32_t setLayoutCount; +/// const VkDescriptorSetLayout * pSetLayouts; +/// uint32_t pushConstantRangeCount; +/// const VkPushConstantRange * pPushConstantRanges; +/// } VkPipelineLayoutCreateInfo; +/// ``` +public final class VkPipelineLayoutCreateInfo extends Struct { + /// The struct layout of `VkPipelineLayoutCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("setLayoutCount"), + ValueLayout.ADDRESS.withName("pSetLayouts"), + ValueLayout.JAVA_INT.withName("pushConstantRangeCount"), + ValueLayout.ADDRESS.withName("pPushConstantRanges") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `setLayoutCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_setLayoutCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("setLayoutCount")); + /// The [VarHandle] of `pSetLayouts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSetLayouts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSetLayouts")); + /// The [VarHandle] of `pushConstantRangeCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pushConstantRangeCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pushConstantRangeCount")); + /// The [VarHandle] of `pPushConstantRanges` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPushConstantRanges = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPushConstantRanges")); + + /// Creates `VkPipelineLayoutCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineLayoutCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineLayoutCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineLayoutCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineLayoutCreateInfo(segment); } + + /// Creates `VkPipelineLayoutCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineLayoutCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineLayoutCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineLayoutCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineLayoutCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineLayoutCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineLayoutCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineLayoutCreateInfo` + public static VkPipelineLayoutCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineLayoutCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineLayoutCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineLayoutCreateInfo` + public static VkPipelineLayoutCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineLayoutCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineLayoutCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineLayoutCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineLayoutCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineLayoutCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineLayoutCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineLayoutCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineLayoutCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineLayoutCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineLayoutCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineLayoutCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineLayoutCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineLayoutCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayoutCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayoutCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineLayoutCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineLayoutCreateFlags") int flagsAt(long index) { return VkPipelineLayoutCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineLayoutCreateFlags") int flags() { return VkPipelineLayoutCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineLayoutCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineLayoutCreateFlags") int value) { VkPipelineLayoutCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo flagsAt(long index, @CType("VkPipelineLayoutCreateFlags") int value) { VkPipelineLayoutCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo flags(@CType("VkPipelineLayoutCreateFlags") int value) { VkPipelineLayoutCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `setLayoutCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_setLayoutCount(MemorySegment segment, long index) { return (int) VH_setLayoutCount.get(segment, 0L, index); } + /// {@return `setLayoutCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_setLayoutCount(MemorySegment segment) { return VkPipelineLayoutCreateInfo.get_setLayoutCount(segment, 0L); } + /// {@return `setLayoutCount` at the given index} + /// @param index the index + public @CType("uint32_t") int setLayoutCountAt(long index) { return VkPipelineLayoutCreateInfo.get_setLayoutCount(this.segment(), index); } + /// {@return `setLayoutCount`} + public @CType("uint32_t") int setLayoutCount() { return VkPipelineLayoutCreateInfo.get_setLayoutCount(this.segment()); } + /// Sets `setLayoutCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_setLayoutCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_setLayoutCount.set(segment, 0L, index, value); } + /// Sets `setLayoutCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_setLayoutCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineLayoutCreateInfo.set_setLayoutCount(segment, 0L, value); } + /// Sets `setLayoutCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo setLayoutCountAt(long index, @CType("uint32_t") int value) { VkPipelineLayoutCreateInfo.set_setLayoutCount(this.segment(), index, value); return this; } + /// Sets `setLayoutCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo setLayoutCount(@CType("uint32_t") int value) { VkPipelineLayoutCreateInfo.set_setLayoutCount(this.segment(), value); return this; } + + /// {@return `pSetLayouts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment get_pSetLayouts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSetLayouts.get(segment, 0L, index); } + /// {@return `pSetLayouts`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment get_pSetLayouts(MemorySegment segment) { return VkPipelineLayoutCreateInfo.get_pSetLayouts(segment, 0L); } + /// {@return `pSetLayouts` at the given index} + /// @param index the index + public @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment pSetLayoutsAt(long index) { return VkPipelineLayoutCreateInfo.get_pSetLayouts(this.segment(), index); } + /// {@return `pSetLayouts`} + public @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment pSetLayouts() { return VkPipelineLayoutCreateInfo.get_pSetLayouts(this.segment()); } + /// Sets `pSetLayouts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSetLayouts(MemorySegment segment, long index, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VH_pSetLayouts.set(segment, 0L, index, value); } + /// Sets `pSetLayouts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSetLayouts(MemorySegment segment, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkPipelineLayoutCreateInfo.set_pSetLayouts(segment, 0L, value); } + /// Sets `pSetLayouts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo pSetLayoutsAt(long index, @CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkPipelineLayoutCreateInfo.set_pSetLayouts(this.segment(), index, value); return this; } + /// Sets `pSetLayouts` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo pSetLayouts(@CType("const VkDescriptorSetLayout *") java.lang.foreign.MemorySegment value) { VkPipelineLayoutCreateInfo.set_pSetLayouts(this.segment(), value); return this; } + + /// {@return `pushConstantRangeCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pushConstantRangeCount(MemorySegment segment, long index) { return (int) VH_pushConstantRangeCount.get(segment, 0L, index); } + /// {@return `pushConstantRangeCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pushConstantRangeCount(MemorySegment segment) { return VkPipelineLayoutCreateInfo.get_pushConstantRangeCount(segment, 0L); } + /// {@return `pushConstantRangeCount` at the given index} + /// @param index the index + public @CType("uint32_t") int pushConstantRangeCountAt(long index) { return VkPipelineLayoutCreateInfo.get_pushConstantRangeCount(this.segment(), index); } + /// {@return `pushConstantRangeCount`} + public @CType("uint32_t") int pushConstantRangeCount() { return VkPipelineLayoutCreateInfo.get_pushConstantRangeCount(this.segment()); } + /// Sets `pushConstantRangeCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pushConstantRangeCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pushConstantRangeCount.set(segment, 0L, index, value); } + /// Sets `pushConstantRangeCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pushConstantRangeCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineLayoutCreateInfo.set_pushConstantRangeCount(segment, 0L, value); } + /// Sets `pushConstantRangeCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo pushConstantRangeCountAt(long index, @CType("uint32_t") int value) { VkPipelineLayoutCreateInfo.set_pushConstantRangeCount(this.segment(), index, value); return this; } + /// Sets `pushConstantRangeCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo pushConstantRangeCount(@CType("uint32_t") int value) { VkPipelineLayoutCreateInfo.set_pushConstantRangeCount(this.segment(), value); return this; } + + /// {@return `pPushConstantRanges` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment get_pPushConstantRanges(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPushConstantRanges.get(segment, 0L, index); } + /// {@return `pPushConstantRanges`} + /// @param segment the segment of the struct + public static @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment get_pPushConstantRanges(MemorySegment segment) { return VkPipelineLayoutCreateInfo.get_pPushConstantRanges(segment, 0L); } + /// {@return `pPushConstantRanges` at the given index} + /// @param index the index + public @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment pPushConstantRangesAt(long index) { return VkPipelineLayoutCreateInfo.get_pPushConstantRanges(this.segment(), index); } + /// {@return `pPushConstantRanges`} + public @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment pPushConstantRanges() { return VkPipelineLayoutCreateInfo.get_pPushConstantRanges(this.segment()); } + /// Sets `pPushConstantRanges` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPushConstantRanges(MemorySegment segment, long index, @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VH_pPushConstantRanges.set(segment, 0L, index, value); } + /// Sets `pPushConstantRanges` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPushConstantRanges(MemorySegment segment, @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VkPipelineLayoutCreateInfo.set_pPushConstantRanges(segment, 0L, value); } + /// Sets `pPushConstantRanges` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo pPushConstantRangesAt(long index, @CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VkPipelineLayoutCreateInfo.set_pPushConstantRanges(this.segment(), index, value); return this; } + /// Sets `pPushConstantRanges` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineLayoutCreateInfo pPushConstantRanges(@CType("const VkPushConstantRange *") java.lang.foreign.MemorySegment value) { VkPipelineLayoutCreateInfo.set_pPushConstantRanges(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineMultisampleStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineMultisampleStateCreateInfo.java new file mode 100644 index 00000000..a0d87d0a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineMultisampleStateCreateInfo.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### rasterizationSamples +/// [VarHandle][#VH_rasterizationSamples] - [Getter][#rasterizationSamples()] - [Setter][#rasterizationSamples(int)] +/// ### sampleShadingEnable +/// [VarHandle][#VH_sampleShadingEnable] - [Getter][#sampleShadingEnable()] - [Setter][#sampleShadingEnable(int)] +/// ### minSampleShading +/// [VarHandle][#VH_minSampleShading] - [Getter][#minSampleShading()] - [Setter][#minSampleShading(float)] +/// ### pSampleMask +/// [VarHandle][#VH_pSampleMask] - [Getter][#pSampleMask()] - [Setter][#pSampleMask(java.lang.foreign.MemorySegment)] +/// ### alphaToCoverageEnable +/// [VarHandle][#VH_alphaToCoverageEnable] - [Getter][#alphaToCoverageEnable()] - [Setter][#alphaToCoverageEnable(int)] +/// ### alphaToOneEnable +/// [VarHandle][#VH_alphaToOneEnable] - [Getter][#alphaToOneEnable()] - [Setter][#alphaToOneEnable(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineMultisampleStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineMultisampleStateCreateFlags flags; +/// VkSampleCountFlagBits rasterizationSamples; +/// VkBool32 sampleShadingEnable; +/// float minSampleShading; +/// const VkSampleMask * pSampleMask; +/// VkBool32 alphaToCoverageEnable; +/// VkBool32 alphaToOneEnable; +/// } VkPipelineMultisampleStateCreateInfo; +/// ``` +public final class VkPipelineMultisampleStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineMultisampleStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("rasterizationSamples"), + ValueLayout.JAVA_INT.withName("sampleShadingEnable"), + ValueLayout.JAVA_FLOAT.withName("minSampleShading"), + ValueLayout.ADDRESS.withName("pSampleMask"), + ValueLayout.JAVA_INT.withName("alphaToCoverageEnable"), + ValueLayout.JAVA_INT.withName("alphaToOneEnable") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `rasterizationSamples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rasterizationSamples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rasterizationSamples")); + /// The [VarHandle] of `sampleShadingEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sampleShadingEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sampleShadingEnable")); + /// The [VarHandle] of `minSampleShading` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minSampleShading = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minSampleShading")); + /// The [VarHandle] of `pSampleMask` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSampleMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSampleMask")); + /// The [VarHandle] of `alphaToCoverageEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_alphaToCoverageEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("alphaToCoverageEnable")); + /// The [VarHandle] of `alphaToOneEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_alphaToOneEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("alphaToOneEnable")); + + /// Creates `VkPipelineMultisampleStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineMultisampleStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineMultisampleStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineMultisampleStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineMultisampleStateCreateInfo(segment); } + + /// Creates `VkPipelineMultisampleStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineMultisampleStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineMultisampleStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineMultisampleStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineMultisampleStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineMultisampleStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineMultisampleStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineMultisampleStateCreateInfo` + public static VkPipelineMultisampleStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineMultisampleStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineMultisampleStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineMultisampleStateCreateInfo` + public static VkPipelineMultisampleStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineMultisampleStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineMultisampleStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineMultisampleStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineMultisampleStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineMultisampleStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineMultisampleStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineMultisampleStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineMultisampleStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineMultisampleStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineMultisampleStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineMultisampleStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineMultisampleStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineMultisampleStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineMultisampleStateCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineMultisampleStateCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineMultisampleStateCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineMultisampleStateCreateFlags") int flagsAt(long index) { return VkPipelineMultisampleStateCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineMultisampleStateCreateFlags") int flags() { return VkPipelineMultisampleStateCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineMultisampleStateCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineMultisampleStateCreateFlags") int value) { VkPipelineMultisampleStateCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo flagsAt(long index, @CType("VkPipelineMultisampleStateCreateFlags") int value) { VkPipelineMultisampleStateCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo flags(@CType("VkPipelineMultisampleStateCreateFlags") int value) { VkPipelineMultisampleStateCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `rasterizationSamples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSampleCountFlagBits") int get_rasterizationSamples(MemorySegment segment, long index) { return (int) VH_rasterizationSamples.get(segment, 0L, index); } + /// {@return `rasterizationSamples`} + /// @param segment the segment of the struct + public static @CType("VkSampleCountFlagBits") int get_rasterizationSamples(MemorySegment segment) { return VkPipelineMultisampleStateCreateInfo.get_rasterizationSamples(segment, 0L); } + /// {@return `rasterizationSamples` at the given index} + /// @param index the index + public @CType("VkSampleCountFlagBits") int rasterizationSamplesAt(long index) { return VkPipelineMultisampleStateCreateInfo.get_rasterizationSamples(this.segment(), index); } + /// {@return `rasterizationSamples`} + public @CType("VkSampleCountFlagBits") int rasterizationSamples() { return VkPipelineMultisampleStateCreateInfo.get_rasterizationSamples(this.segment()); } + /// Sets `rasterizationSamples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rasterizationSamples(MemorySegment segment, long index, @CType("VkSampleCountFlagBits") int value) { VH_rasterizationSamples.set(segment, 0L, index, value); } + /// Sets `rasterizationSamples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rasterizationSamples(MemorySegment segment, @CType("VkSampleCountFlagBits") int value) { VkPipelineMultisampleStateCreateInfo.set_rasterizationSamples(segment, 0L, value); } + /// Sets `rasterizationSamples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo rasterizationSamplesAt(long index, @CType("VkSampleCountFlagBits") int value) { VkPipelineMultisampleStateCreateInfo.set_rasterizationSamples(this.segment(), index, value); return this; } + /// Sets `rasterizationSamples` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo rasterizationSamples(@CType("VkSampleCountFlagBits") int value) { VkPipelineMultisampleStateCreateInfo.set_rasterizationSamples(this.segment(), value); return this; } + + /// {@return `sampleShadingEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_sampleShadingEnable(MemorySegment segment, long index) { return (int) VH_sampleShadingEnable.get(segment, 0L, index); } + /// {@return `sampleShadingEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_sampleShadingEnable(MemorySegment segment) { return VkPipelineMultisampleStateCreateInfo.get_sampleShadingEnable(segment, 0L); } + /// {@return `sampleShadingEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int sampleShadingEnableAt(long index) { return VkPipelineMultisampleStateCreateInfo.get_sampleShadingEnable(this.segment(), index); } + /// {@return `sampleShadingEnable`} + public @CType("VkBool32") int sampleShadingEnable() { return VkPipelineMultisampleStateCreateInfo.get_sampleShadingEnable(this.segment()); } + /// Sets `sampleShadingEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sampleShadingEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_sampleShadingEnable.set(segment, 0L, index, value); } + /// Sets `sampleShadingEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sampleShadingEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineMultisampleStateCreateInfo.set_sampleShadingEnable(segment, 0L, value); } + /// Sets `sampleShadingEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo sampleShadingEnableAt(long index, @CType("VkBool32") int value) { VkPipelineMultisampleStateCreateInfo.set_sampleShadingEnable(this.segment(), index, value); return this; } + /// Sets `sampleShadingEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo sampleShadingEnable(@CType("VkBool32") int value) { VkPipelineMultisampleStateCreateInfo.set_sampleShadingEnable(this.segment(), value); return this; } + + /// {@return `minSampleShading` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minSampleShading(MemorySegment segment, long index) { return (float) VH_minSampleShading.get(segment, 0L, index); } + /// {@return `minSampleShading`} + /// @param segment the segment of the struct + public static @CType("float") float get_minSampleShading(MemorySegment segment) { return VkPipelineMultisampleStateCreateInfo.get_minSampleShading(segment, 0L); } + /// {@return `minSampleShading` at the given index} + /// @param index the index + public @CType("float") float minSampleShadingAt(long index) { return VkPipelineMultisampleStateCreateInfo.get_minSampleShading(this.segment(), index); } + /// {@return `minSampleShading`} + public @CType("float") float minSampleShading() { return VkPipelineMultisampleStateCreateInfo.get_minSampleShading(this.segment()); } + /// Sets `minSampleShading` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minSampleShading(MemorySegment segment, long index, @CType("float") float value) { VH_minSampleShading.set(segment, 0L, index, value); } + /// Sets `minSampleShading` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minSampleShading(MemorySegment segment, @CType("float") float value) { VkPipelineMultisampleStateCreateInfo.set_minSampleShading(segment, 0L, value); } + /// Sets `minSampleShading` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo minSampleShadingAt(long index, @CType("float") float value) { VkPipelineMultisampleStateCreateInfo.set_minSampleShading(this.segment(), index, value); return this; } + /// Sets `minSampleShading` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo minSampleShading(@CType("float") float value) { VkPipelineMultisampleStateCreateInfo.set_minSampleShading(this.segment(), value); return this; } + + /// {@return `pSampleMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSampleMask *") java.lang.foreign.MemorySegment get_pSampleMask(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSampleMask.get(segment, 0L, index); } + /// {@return `pSampleMask`} + /// @param segment the segment of the struct + public static @CType("const VkSampleMask *") java.lang.foreign.MemorySegment get_pSampleMask(MemorySegment segment) { return VkPipelineMultisampleStateCreateInfo.get_pSampleMask(segment, 0L); } + /// {@return `pSampleMask` at the given index} + /// @param index the index + public @CType("const VkSampleMask *") java.lang.foreign.MemorySegment pSampleMaskAt(long index) { return VkPipelineMultisampleStateCreateInfo.get_pSampleMask(this.segment(), index); } + /// {@return `pSampleMask`} + public @CType("const VkSampleMask *") java.lang.foreign.MemorySegment pSampleMask() { return VkPipelineMultisampleStateCreateInfo.get_pSampleMask(this.segment()); } + /// Sets `pSampleMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSampleMask(MemorySegment segment, long index, @CType("const VkSampleMask *") java.lang.foreign.MemorySegment value) { VH_pSampleMask.set(segment, 0L, index, value); } + /// Sets `pSampleMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSampleMask(MemorySegment segment, @CType("const VkSampleMask *") java.lang.foreign.MemorySegment value) { VkPipelineMultisampleStateCreateInfo.set_pSampleMask(segment, 0L, value); } + /// Sets `pSampleMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo pSampleMaskAt(long index, @CType("const VkSampleMask *") java.lang.foreign.MemorySegment value) { VkPipelineMultisampleStateCreateInfo.set_pSampleMask(this.segment(), index, value); return this; } + /// Sets `pSampleMask` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo pSampleMask(@CType("const VkSampleMask *") java.lang.foreign.MemorySegment value) { VkPipelineMultisampleStateCreateInfo.set_pSampleMask(this.segment(), value); return this; } + + /// {@return `alphaToCoverageEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_alphaToCoverageEnable(MemorySegment segment, long index) { return (int) VH_alphaToCoverageEnable.get(segment, 0L, index); } + /// {@return `alphaToCoverageEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_alphaToCoverageEnable(MemorySegment segment) { return VkPipelineMultisampleStateCreateInfo.get_alphaToCoverageEnable(segment, 0L); } + /// {@return `alphaToCoverageEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int alphaToCoverageEnableAt(long index) { return VkPipelineMultisampleStateCreateInfo.get_alphaToCoverageEnable(this.segment(), index); } + /// {@return `alphaToCoverageEnable`} + public @CType("VkBool32") int alphaToCoverageEnable() { return VkPipelineMultisampleStateCreateInfo.get_alphaToCoverageEnable(this.segment()); } + /// Sets `alphaToCoverageEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_alphaToCoverageEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_alphaToCoverageEnable.set(segment, 0L, index, value); } + /// Sets `alphaToCoverageEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_alphaToCoverageEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineMultisampleStateCreateInfo.set_alphaToCoverageEnable(segment, 0L, value); } + /// Sets `alphaToCoverageEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo alphaToCoverageEnableAt(long index, @CType("VkBool32") int value) { VkPipelineMultisampleStateCreateInfo.set_alphaToCoverageEnable(this.segment(), index, value); return this; } + /// Sets `alphaToCoverageEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo alphaToCoverageEnable(@CType("VkBool32") int value) { VkPipelineMultisampleStateCreateInfo.set_alphaToCoverageEnable(this.segment(), value); return this; } + + /// {@return `alphaToOneEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_alphaToOneEnable(MemorySegment segment, long index) { return (int) VH_alphaToOneEnable.get(segment, 0L, index); } + /// {@return `alphaToOneEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_alphaToOneEnable(MemorySegment segment) { return VkPipelineMultisampleStateCreateInfo.get_alphaToOneEnable(segment, 0L); } + /// {@return `alphaToOneEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int alphaToOneEnableAt(long index) { return VkPipelineMultisampleStateCreateInfo.get_alphaToOneEnable(this.segment(), index); } + /// {@return `alphaToOneEnable`} + public @CType("VkBool32") int alphaToOneEnable() { return VkPipelineMultisampleStateCreateInfo.get_alphaToOneEnable(this.segment()); } + /// Sets `alphaToOneEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_alphaToOneEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_alphaToOneEnable.set(segment, 0L, index, value); } + /// Sets `alphaToOneEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_alphaToOneEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineMultisampleStateCreateInfo.set_alphaToOneEnable(segment, 0L, value); } + /// Sets `alphaToOneEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo alphaToOneEnableAt(long index, @CType("VkBool32") int value) { VkPipelineMultisampleStateCreateInfo.set_alphaToOneEnable(this.segment(), index, value); return this; } + /// Sets `alphaToOneEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineMultisampleStateCreateInfo alphaToOneEnable(@CType("VkBool32") int value) { VkPipelineMultisampleStateCreateInfo.set_alphaToOneEnable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineOfflineCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineOfflineCreateInfo.java new file mode 100644 index 00000000..94b337c6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineOfflineCreateInfo.java @@ -0,0 +1,276 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK10.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### pipelineIdentifier +/// [Byte offset handle][#MH_pipelineIdentifier] - [Memory layout][#ML_pipelineIdentifier] - [Getter][#pipelineIdentifier(long)] - [Setter][#pipelineIdentifier(long, java.lang.foreign.MemorySegment)] +/// ### matchControl +/// [VarHandle][#VH_matchControl] - [Getter][#matchControl()] - [Setter][#matchControl(int)] +/// ### poolEntrySize +/// [VarHandle][#VH_poolEntrySize] - [Getter][#poolEntrySize()] - [Setter][#poolEntrySize(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineOfflineCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint8_t[VK_UUID_SIZE] pipelineIdentifier; +/// VkPipelineMatchControl matchControl; +/// VkDeviceSize poolEntrySize; +/// } VkPipelineOfflineCreateInfo; +/// ``` +public final class VkPipelineOfflineCreateInfo extends Struct { + /// The struct layout of `VkPipelineOfflineCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + MemoryLayout.sequenceLayout(VK_UUID_SIZE, ValueLayout.JAVA_BYTE).withName("pipelineIdentifier"), + ValueLayout.JAVA_INT.withName("matchControl"), + ValueLayout.JAVA_LONG.withName("poolEntrySize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset handle of `pipelineIdentifier` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_pipelineIdentifier = LAYOUT.byteOffsetHandle(PathElement.groupElement("pipelineIdentifier"), PathElement.sequenceElement()); + /// The memory layout of `pipelineIdentifier`. + public static final MemoryLayout ML_pipelineIdentifier = LAYOUT.select(PathElement.groupElement("pipelineIdentifier")); + /// The [VarHandle] of `matchControl` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_matchControl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("matchControl")); + /// The [VarHandle] of `poolEntrySize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_poolEntrySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("poolEntrySize")); + + /// Creates `VkPipelineOfflineCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineOfflineCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineOfflineCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineOfflineCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineOfflineCreateInfo(segment); } + + /// Creates `VkPipelineOfflineCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineOfflineCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineOfflineCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineOfflineCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineOfflineCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineOfflineCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineOfflineCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineOfflineCreateInfo` + public static VkPipelineOfflineCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineOfflineCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineOfflineCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineOfflineCreateInfo` + public static VkPipelineOfflineCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineOfflineCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineOfflineCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineOfflineCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineOfflineCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineOfflineCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineOfflineCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineOfflineCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineOfflineCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineOfflineCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineOfflineCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineOfflineCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineOfflineCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineOfflineCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineOfflineCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineOfflineCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineOfflineCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineOfflineCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `pipelineIdentifier` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineIdentifier(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_pipelineIdentifier.invokeExact(0L, elementIndex), index), ML_pipelineIdentifier); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `pipelineIdentifier`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment get_pipelineIdentifier(MemorySegment segment, long elementIndex) { return VkPipelineOfflineCreateInfo.get_pipelineIdentifier(segment, 0L, elementIndex); } + /// {@return `pipelineIdentifier` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineIdentifierAt(long index, long elementIndex) { return VkPipelineOfflineCreateInfo.get_pipelineIdentifier(this.segment(), index, elementIndex); } + /// {@return `pipelineIdentifier`} + /// @param elementIndex the index of the element + public @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment pipelineIdentifier(long elementIndex) { return VkPipelineOfflineCreateInfo.get_pipelineIdentifier(this.segment(), elementIndex); } + /// Sets `pipelineIdentifier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineIdentifier(MemorySegment segment, long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_pipelineIdentifier.invokeExact(0L, elementIndex), index), ML_pipelineIdentifier.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `pipelineIdentifier` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_pipelineIdentifier(MemorySegment segment, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineOfflineCreateInfo.set_pipelineIdentifier(segment, 0L, elementIndex, value); } + /// Sets `pipelineIdentifier` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineOfflineCreateInfo pipelineIdentifierAt(long index, long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineOfflineCreateInfo.set_pipelineIdentifier(this.segment(), index, elementIndex, value); return this; } + /// Sets `pipelineIdentifier` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkPipelineOfflineCreateInfo pipelineIdentifier(long elementIndex, @CType("uint8_t[VK_UUID_SIZE]") java.lang.foreign.MemorySegment value) { VkPipelineOfflineCreateInfo.set_pipelineIdentifier(this.segment(), elementIndex, value); return this; } + + /// {@return `matchControl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineMatchControl") int get_matchControl(MemorySegment segment, long index) { return (int) VH_matchControl.get(segment, 0L, index); } + /// {@return `matchControl`} + /// @param segment the segment of the struct + public static @CType("VkPipelineMatchControl") int get_matchControl(MemorySegment segment) { return VkPipelineOfflineCreateInfo.get_matchControl(segment, 0L); } + /// {@return `matchControl` at the given index} + /// @param index the index + public @CType("VkPipelineMatchControl") int matchControlAt(long index) { return VkPipelineOfflineCreateInfo.get_matchControl(this.segment(), index); } + /// {@return `matchControl`} + public @CType("VkPipelineMatchControl") int matchControl() { return VkPipelineOfflineCreateInfo.get_matchControl(this.segment()); } + /// Sets `matchControl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_matchControl(MemorySegment segment, long index, @CType("VkPipelineMatchControl") int value) { VH_matchControl.set(segment, 0L, index, value); } + /// Sets `matchControl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_matchControl(MemorySegment segment, @CType("VkPipelineMatchControl") int value) { VkPipelineOfflineCreateInfo.set_matchControl(segment, 0L, value); } + /// Sets `matchControl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineOfflineCreateInfo matchControlAt(long index, @CType("VkPipelineMatchControl") int value) { VkPipelineOfflineCreateInfo.set_matchControl(this.segment(), index, value); return this; } + /// Sets `matchControl` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineOfflineCreateInfo matchControl(@CType("VkPipelineMatchControl") int value) { VkPipelineOfflineCreateInfo.set_matchControl(this.segment(), value); return this; } + + /// {@return `poolEntrySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_poolEntrySize(MemorySegment segment, long index) { return (long) VH_poolEntrySize.get(segment, 0L, index); } + /// {@return `poolEntrySize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_poolEntrySize(MemorySegment segment) { return VkPipelineOfflineCreateInfo.get_poolEntrySize(segment, 0L); } + /// {@return `poolEntrySize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long poolEntrySizeAt(long index) { return VkPipelineOfflineCreateInfo.get_poolEntrySize(this.segment(), index); } + /// {@return `poolEntrySize`} + public @CType("VkDeviceSize") long poolEntrySize() { return VkPipelineOfflineCreateInfo.get_poolEntrySize(this.segment()); } + /// Sets `poolEntrySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_poolEntrySize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_poolEntrySize.set(segment, 0L, index, value); } + /// Sets `poolEntrySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_poolEntrySize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPipelineOfflineCreateInfo.set_poolEntrySize(segment, 0L, value); } + /// Sets `poolEntrySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineOfflineCreateInfo poolEntrySizeAt(long index, @CType("VkDeviceSize") long value) { VkPipelineOfflineCreateInfo.set_poolEntrySize(this.segment(), index, value); return this; } + /// Sets `poolEntrySize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineOfflineCreateInfo poolEntrySize(@CType("VkDeviceSize") long value) { VkPipelineOfflineCreateInfo.set_poolEntrySize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelinePoolSize.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelinePoolSize.java new file mode 100644 index 00000000..b3710857 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelinePoolSize.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### poolEntrySize +/// [VarHandle][#VH_poolEntrySize] - [Getter][#poolEntrySize()] - [Setter][#poolEntrySize(long)] +/// ### poolEntryCount +/// [VarHandle][#VH_poolEntryCount] - [Getter][#poolEntryCount()] - [Setter][#poolEntryCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelinePoolSize { +/// VkStructureType sType; +/// const void * pNext; +/// VkDeviceSize poolEntrySize; +/// uint32_t poolEntryCount; +/// } VkPipelinePoolSize; +/// ``` +public final class VkPipelinePoolSize extends Struct { + /// The struct layout of `VkPipelinePoolSize`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("poolEntrySize"), + ValueLayout.JAVA_INT.withName("poolEntryCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `poolEntrySize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_poolEntrySize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("poolEntrySize")); + /// The [VarHandle] of `poolEntryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_poolEntryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("poolEntryCount")); + + /// Creates `VkPipelinePoolSize` with the given segment. + /// @param segment the memory segment + public VkPipelinePoolSize(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelinePoolSize` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelinePoolSize of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelinePoolSize(segment); } + + /// Creates `VkPipelinePoolSize` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelinePoolSize ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelinePoolSize(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelinePoolSize` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelinePoolSize ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelinePoolSize(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelinePoolSize` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelinePoolSize` + public static VkPipelinePoolSize alloc(SegmentAllocator allocator) { return new VkPipelinePoolSize(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelinePoolSize` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelinePoolSize` + public static VkPipelinePoolSize alloc(SegmentAllocator allocator, long count) { return new VkPipelinePoolSize(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelinePoolSize.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelinePoolSize.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelinePoolSize.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelinePoolSize.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelinePoolSize sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelinePoolSize.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelinePoolSize sType(@CType("VkStructureType") int value) { VkPipelinePoolSize.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelinePoolSize.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelinePoolSize.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelinePoolSize.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelinePoolSize.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelinePoolSize pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelinePoolSize.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelinePoolSize pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelinePoolSize.set_pNext(this.segment(), value); return this; } + + /// {@return `poolEntrySize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_poolEntrySize(MemorySegment segment, long index) { return (long) VH_poolEntrySize.get(segment, 0L, index); } + /// {@return `poolEntrySize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_poolEntrySize(MemorySegment segment) { return VkPipelinePoolSize.get_poolEntrySize(segment, 0L); } + /// {@return `poolEntrySize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long poolEntrySizeAt(long index) { return VkPipelinePoolSize.get_poolEntrySize(this.segment(), index); } + /// {@return `poolEntrySize`} + public @CType("VkDeviceSize") long poolEntrySize() { return VkPipelinePoolSize.get_poolEntrySize(this.segment()); } + /// Sets `poolEntrySize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_poolEntrySize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_poolEntrySize.set(segment, 0L, index, value); } + /// Sets `poolEntrySize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_poolEntrySize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkPipelinePoolSize.set_poolEntrySize(segment, 0L, value); } + /// Sets `poolEntrySize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelinePoolSize poolEntrySizeAt(long index, @CType("VkDeviceSize") long value) { VkPipelinePoolSize.set_poolEntrySize(this.segment(), index, value); return this; } + /// Sets `poolEntrySize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelinePoolSize poolEntrySize(@CType("VkDeviceSize") long value) { VkPipelinePoolSize.set_poolEntrySize(this.segment(), value); return this; } + + /// {@return `poolEntryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_poolEntryCount(MemorySegment segment, long index) { return (int) VH_poolEntryCount.get(segment, 0L, index); } + /// {@return `poolEntryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_poolEntryCount(MemorySegment segment) { return VkPipelinePoolSize.get_poolEntryCount(segment, 0L); } + /// {@return `poolEntryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int poolEntryCountAt(long index) { return VkPipelinePoolSize.get_poolEntryCount(this.segment(), index); } + /// {@return `poolEntryCount`} + public @CType("uint32_t") int poolEntryCount() { return VkPipelinePoolSize.get_poolEntryCount(this.segment()); } + /// Sets `poolEntryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_poolEntryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_poolEntryCount.set(segment, 0L, index, value); } + /// Sets `poolEntryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_poolEntryCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelinePoolSize.set_poolEntryCount(segment, 0L, value); } + /// Sets `poolEntryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelinePoolSize poolEntryCountAt(long index, @CType("uint32_t") int value) { VkPipelinePoolSize.set_poolEntryCount(this.segment(), index, value); return this; } + /// Sets `poolEntryCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelinePoolSize poolEntryCount(@CType("uint32_t") int value) { VkPipelinePoolSize.set_poolEntryCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRasterizationLineStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRasterizationLineStateCreateInfo.java new file mode 100644 index 00000000..74a1b0a1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRasterizationLineStateCreateInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### lineRasterizationMode +/// [VarHandle][#VH_lineRasterizationMode] - [Getter][#lineRasterizationMode()] - [Setter][#lineRasterizationMode(int)] +/// ### stippledLineEnable +/// [VarHandle][#VH_stippledLineEnable] - [Getter][#stippledLineEnable()] - [Setter][#stippledLineEnable(int)] +/// ### lineStippleFactor +/// [VarHandle][#VH_lineStippleFactor] - [Getter][#lineStippleFactor()] - [Setter][#lineStippleFactor(int)] +/// ### lineStipplePattern +/// [VarHandle][#VH_lineStipplePattern] - [Getter][#lineStipplePattern()] - [Setter][#lineStipplePattern(short)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineRasterizationLineStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkLineRasterizationMode lineRasterizationMode; +/// VkBool32 stippledLineEnable; +/// uint32_t lineStippleFactor; +/// uint16_t lineStipplePattern; +/// } VkPipelineRasterizationLineStateCreateInfo; +/// ``` +public final class VkPipelineRasterizationLineStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineRasterizationLineStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("lineRasterizationMode"), + ValueLayout.JAVA_INT.withName("stippledLineEnable"), + ValueLayout.JAVA_INT.withName("lineStippleFactor"), + ValueLayout.JAVA_SHORT.withName("lineStipplePattern") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `lineRasterizationMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_lineRasterizationMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lineRasterizationMode")); + /// The [VarHandle] of `stippledLineEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stippledLineEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stippledLineEnable")); + /// The [VarHandle] of `lineStippleFactor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_lineStippleFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lineStippleFactor")); + /// The [VarHandle] of `lineStipplePattern` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_lineStipplePattern = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lineStipplePattern")); + + /// Creates `VkPipelineRasterizationLineStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineRasterizationLineStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineRasterizationLineStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationLineStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationLineStateCreateInfo(segment); } + + /// Creates `VkPipelineRasterizationLineStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationLineStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationLineStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineRasterizationLineStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationLineStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationLineStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineRasterizationLineStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineRasterizationLineStateCreateInfo` + public static VkPipelineRasterizationLineStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineRasterizationLineStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineRasterizationLineStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineRasterizationLineStateCreateInfo` + public static VkPipelineRasterizationLineStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineRasterizationLineStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineRasterizationLineStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineRasterizationLineStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineRasterizationLineStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineRasterizationLineStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineRasterizationLineStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineRasterizationLineStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineRasterizationLineStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineRasterizationLineStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineRasterizationLineStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationLineStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationLineStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationLineStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `lineRasterizationMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkLineRasterizationMode") int get_lineRasterizationMode(MemorySegment segment, long index) { return (int) VH_lineRasterizationMode.get(segment, 0L, index); } + /// {@return `lineRasterizationMode`} + /// @param segment the segment of the struct + public static @CType("VkLineRasterizationMode") int get_lineRasterizationMode(MemorySegment segment) { return VkPipelineRasterizationLineStateCreateInfo.get_lineRasterizationMode(segment, 0L); } + /// {@return `lineRasterizationMode` at the given index} + /// @param index the index + public @CType("VkLineRasterizationMode") int lineRasterizationModeAt(long index) { return VkPipelineRasterizationLineStateCreateInfo.get_lineRasterizationMode(this.segment(), index); } + /// {@return `lineRasterizationMode`} + public @CType("VkLineRasterizationMode") int lineRasterizationMode() { return VkPipelineRasterizationLineStateCreateInfo.get_lineRasterizationMode(this.segment()); } + /// Sets `lineRasterizationMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lineRasterizationMode(MemorySegment segment, long index, @CType("VkLineRasterizationMode") int value) { VH_lineRasterizationMode.set(segment, 0L, index, value); } + /// Sets `lineRasterizationMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lineRasterizationMode(MemorySegment segment, @CType("VkLineRasterizationMode") int value) { VkPipelineRasterizationLineStateCreateInfo.set_lineRasterizationMode(segment, 0L, value); } + /// Sets `lineRasterizationMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo lineRasterizationModeAt(long index, @CType("VkLineRasterizationMode") int value) { VkPipelineRasterizationLineStateCreateInfo.set_lineRasterizationMode(this.segment(), index, value); return this; } + /// Sets `lineRasterizationMode` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo lineRasterizationMode(@CType("VkLineRasterizationMode") int value) { VkPipelineRasterizationLineStateCreateInfo.set_lineRasterizationMode(this.segment(), value); return this; } + + /// {@return `stippledLineEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_stippledLineEnable(MemorySegment segment, long index) { return (int) VH_stippledLineEnable.get(segment, 0L, index); } + /// {@return `stippledLineEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_stippledLineEnable(MemorySegment segment) { return VkPipelineRasterizationLineStateCreateInfo.get_stippledLineEnable(segment, 0L); } + /// {@return `stippledLineEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int stippledLineEnableAt(long index) { return VkPipelineRasterizationLineStateCreateInfo.get_stippledLineEnable(this.segment(), index); } + /// {@return `stippledLineEnable`} + public @CType("VkBool32") int stippledLineEnable() { return VkPipelineRasterizationLineStateCreateInfo.get_stippledLineEnable(this.segment()); } + /// Sets `stippledLineEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stippledLineEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_stippledLineEnable.set(segment, 0L, index, value); } + /// Sets `stippledLineEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stippledLineEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineRasterizationLineStateCreateInfo.set_stippledLineEnable(segment, 0L, value); } + /// Sets `stippledLineEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo stippledLineEnableAt(long index, @CType("VkBool32") int value) { VkPipelineRasterizationLineStateCreateInfo.set_stippledLineEnable(this.segment(), index, value); return this; } + /// Sets `stippledLineEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo stippledLineEnable(@CType("VkBool32") int value) { VkPipelineRasterizationLineStateCreateInfo.set_stippledLineEnable(this.segment(), value); return this; } + + /// {@return `lineStippleFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_lineStippleFactor(MemorySegment segment, long index) { return (int) VH_lineStippleFactor.get(segment, 0L, index); } + /// {@return `lineStippleFactor`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_lineStippleFactor(MemorySegment segment) { return VkPipelineRasterizationLineStateCreateInfo.get_lineStippleFactor(segment, 0L); } + /// {@return `lineStippleFactor` at the given index} + /// @param index the index + public @CType("uint32_t") int lineStippleFactorAt(long index) { return VkPipelineRasterizationLineStateCreateInfo.get_lineStippleFactor(this.segment(), index); } + /// {@return `lineStippleFactor`} + public @CType("uint32_t") int lineStippleFactor() { return VkPipelineRasterizationLineStateCreateInfo.get_lineStippleFactor(this.segment()); } + /// Sets `lineStippleFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lineStippleFactor(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_lineStippleFactor.set(segment, 0L, index, value); } + /// Sets `lineStippleFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lineStippleFactor(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineRasterizationLineStateCreateInfo.set_lineStippleFactor(segment, 0L, value); } + /// Sets `lineStippleFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo lineStippleFactorAt(long index, @CType("uint32_t") int value) { VkPipelineRasterizationLineStateCreateInfo.set_lineStippleFactor(this.segment(), index, value); return this; } + /// Sets `lineStippleFactor` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo lineStippleFactor(@CType("uint32_t") int value) { VkPipelineRasterizationLineStateCreateInfo.set_lineStippleFactor(this.segment(), value); return this; } + + /// {@return `lineStipplePattern` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_lineStipplePattern(MemorySegment segment, long index) { return (short) VH_lineStipplePattern.get(segment, 0L, index); } + /// {@return `lineStipplePattern`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_lineStipplePattern(MemorySegment segment) { return VkPipelineRasterizationLineStateCreateInfo.get_lineStipplePattern(segment, 0L); } + /// {@return `lineStipplePattern` at the given index} + /// @param index the index + public @CType("uint16_t") short lineStipplePatternAt(long index) { return VkPipelineRasterizationLineStateCreateInfo.get_lineStipplePattern(this.segment(), index); } + /// {@return `lineStipplePattern`} + public @CType("uint16_t") short lineStipplePattern() { return VkPipelineRasterizationLineStateCreateInfo.get_lineStipplePattern(this.segment()); } + /// Sets `lineStipplePattern` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lineStipplePattern(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_lineStipplePattern.set(segment, 0L, index, value); } + /// Sets `lineStipplePattern` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lineStipplePattern(MemorySegment segment, @CType("uint16_t") short value) { VkPipelineRasterizationLineStateCreateInfo.set_lineStipplePattern(segment, 0L, value); } + /// Sets `lineStipplePattern` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo lineStipplePatternAt(long index, @CType("uint16_t") short value) { VkPipelineRasterizationLineStateCreateInfo.set_lineStipplePattern(this.segment(), index, value); return this; } + /// Sets `lineStipplePattern` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationLineStateCreateInfo lineStipplePattern(@CType("uint16_t") short value) { VkPipelineRasterizationLineStateCreateInfo.set_lineStipplePattern(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRasterizationStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRasterizationStateCreateInfo.java new file mode 100644 index 00000000..6a66f12e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRasterizationStateCreateInfo.java @@ -0,0 +1,555 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### depthClampEnable +/// [VarHandle][#VH_depthClampEnable] - [Getter][#depthClampEnable()] - [Setter][#depthClampEnable(int)] +/// ### rasterizerDiscardEnable +/// [VarHandle][#VH_rasterizerDiscardEnable] - [Getter][#rasterizerDiscardEnable()] - [Setter][#rasterizerDiscardEnable(int)] +/// ### polygonMode +/// [VarHandle][#VH_polygonMode] - [Getter][#polygonMode()] - [Setter][#polygonMode(int)] +/// ### cullMode +/// [VarHandle][#VH_cullMode] - [Getter][#cullMode()] - [Setter][#cullMode(int)] +/// ### frontFace +/// [VarHandle][#VH_frontFace] - [Getter][#frontFace()] - [Setter][#frontFace(int)] +/// ### depthBiasEnable +/// [VarHandle][#VH_depthBiasEnable] - [Getter][#depthBiasEnable()] - [Setter][#depthBiasEnable(int)] +/// ### depthBiasConstantFactor +/// [VarHandle][#VH_depthBiasConstantFactor] - [Getter][#depthBiasConstantFactor()] - [Setter][#depthBiasConstantFactor(float)] +/// ### depthBiasClamp +/// [VarHandle][#VH_depthBiasClamp] - [Getter][#depthBiasClamp()] - [Setter][#depthBiasClamp(float)] +/// ### depthBiasSlopeFactor +/// [VarHandle][#VH_depthBiasSlopeFactor] - [Getter][#depthBiasSlopeFactor()] - [Setter][#depthBiasSlopeFactor(float)] +/// ### lineWidth +/// [VarHandle][#VH_lineWidth] - [Getter][#lineWidth()] - [Setter][#lineWidth(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineRasterizationStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineRasterizationStateCreateFlags flags; +/// VkBool32 depthClampEnable; +/// VkBool32 rasterizerDiscardEnable; +/// VkPolygonMode polygonMode; +/// VkCullModeFlags cullMode; +/// VkFrontFace frontFace; +/// VkBool32 depthBiasEnable; +/// float depthBiasConstantFactor; +/// float depthBiasClamp; +/// float depthBiasSlopeFactor; +/// float lineWidth; +/// } VkPipelineRasterizationStateCreateInfo; +/// ``` +public final class VkPipelineRasterizationStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineRasterizationStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("depthClampEnable"), + ValueLayout.JAVA_INT.withName("rasterizerDiscardEnable"), + ValueLayout.JAVA_INT.withName("polygonMode"), + ValueLayout.JAVA_INT.withName("cullMode"), + ValueLayout.JAVA_INT.withName("frontFace"), + ValueLayout.JAVA_INT.withName("depthBiasEnable"), + ValueLayout.JAVA_FLOAT.withName("depthBiasConstantFactor"), + ValueLayout.JAVA_FLOAT.withName("depthBiasClamp"), + ValueLayout.JAVA_FLOAT.withName("depthBiasSlopeFactor"), + ValueLayout.JAVA_FLOAT.withName("lineWidth") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `depthClampEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthClampEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthClampEnable")); + /// The [VarHandle] of `rasterizerDiscardEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_rasterizerDiscardEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rasterizerDiscardEnable")); + /// The [VarHandle] of `polygonMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_polygonMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("polygonMode")); + /// The [VarHandle] of `cullMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cullMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cullMode")); + /// The [VarHandle] of `frontFace` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frontFace = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frontFace")); + /// The [VarHandle] of `depthBiasEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthBiasEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasEnable")); + /// The [VarHandle] of `depthBiasConstantFactor` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_depthBiasConstantFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasConstantFactor")); + /// The [VarHandle] of `depthBiasClamp` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_depthBiasClamp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasClamp")); + /// The [VarHandle] of `depthBiasSlopeFactor` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_depthBiasSlopeFactor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthBiasSlopeFactor")); + /// The [VarHandle] of `lineWidth` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_lineWidth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lineWidth")); + + /// Creates `VkPipelineRasterizationStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineRasterizationStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineRasterizationStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationStateCreateInfo(segment); } + + /// Creates `VkPipelineRasterizationStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineRasterizationStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRasterizationStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRasterizationStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineRasterizationStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineRasterizationStateCreateInfo` + public static VkPipelineRasterizationStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineRasterizationStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineRasterizationStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineRasterizationStateCreateInfo` + public static VkPipelineRasterizationStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineRasterizationStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineRasterizationStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineRasterizationStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineRasterizationStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineRasterizationStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineRasterizationStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRasterizationStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRasterizationStateCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRasterizationStateCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineRasterizationStateCreateFlags") int flagsAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineRasterizationStateCreateFlags") int flags() { return VkPipelineRasterizationStateCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineRasterizationStateCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineRasterizationStateCreateFlags") int value) { VkPipelineRasterizationStateCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo flagsAt(long index, @CType("VkPipelineRasterizationStateCreateFlags") int value) { VkPipelineRasterizationStateCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo flags(@CType("VkPipelineRasterizationStateCreateFlags") int value) { VkPipelineRasterizationStateCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `depthClampEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthClampEnable(MemorySegment segment, long index) { return (int) VH_depthClampEnable.get(segment, 0L, index); } + /// {@return `depthClampEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthClampEnable(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_depthClampEnable(segment, 0L); } + /// {@return `depthClampEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int depthClampEnableAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_depthClampEnable(this.segment(), index); } + /// {@return `depthClampEnable`} + public @CType("VkBool32") int depthClampEnable() { return VkPipelineRasterizationStateCreateInfo.get_depthClampEnable(this.segment()); } + /// Sets `depthClampEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthClampEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthClampEnable.set(segment, 0L, index, value); } + /// Sets `depthClampEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthClampEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineRasterizationStateCreateInfo.set_depthClampEnable(segment, 0L, value); } + /// Sets `depthClampEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo depthClampEnableAt(long index, @CType("VkBool32") int value) { VkPipelineRasterizationStateCreateInfo.set_depthClampEnable(this.segment(), index, value); return this; } + /// Sets `depthClampEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo depthClampEnable(@CType("VkBool32") int value) { VkPipelineRasterizationStateCreateInfo.set_depthClampEnable(this.segment(), value); return this; } + + /// {@return `rasterizerDiscardEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_rasterizerDiscardEnable(MemorySegment segment, long index) { return (int) VH_rasterizerDiscardEnable.get(segment, 0L, index); } + /// {@return `rasterizerDiscardEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_rasterizerDiscardEnable(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_rasterizerDiscardEnable(segment, 0L); } + /// {@return `rasterizerDiscardEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int rasterizerDiscardEnableAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_rasterizerDiscardEnable(this.segment(), index); } + /// {@return `rasterizerDiscardEnable`} + public @CType("VkBool32") int rasterizerDiscardEnable() { return VkPipelineRasterizationStateCreateInfo.get_rasterizerDiscardEnable(this.segment()); } + /// Sets `rasterizerDiscardEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rasterizerDiscardEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_rasterizerDiscardEnable.set(segment, 0L, index, value); } + /// Sets `rasterizerDiscardEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rasterizerDiscardEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineRasterizationStateCreateInfo.set_rasterizerDiscardEnable(segment, 0L, value); } + /// Sets `rasterizerDiscardEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo rasterizerDiscardEnableAt(long index, @CType("VkBool32") int value) { VkPipelineRasterizationStateCreateInfo.set_rasterizerDiscardEnable(this.segment(), index, value); return this; } + /// Sets `rasterizerDiscardEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo rasterizerDiscardEnable(@CType("VkBool32") int value) { VkPipelineRasterizationStateCreateInfo.set_rasterizerDiscardEnable(this.segment(), value); return this; } + + /// {@return `polygonMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPolygonMode") int get_polygonMode(MemorySegment segment, long index) { return (int) VH_polygonMode.get(segment, 0L, index); } + /// {@return `polygonMode`} + /// @param segment the segment of the struct + public static @CType("VkPolygonMode") int get_polygonMode(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_polygonMode(segment, 0L); } + /// {@return `polygonMode` at the given index} + /// @param index the index + public @CType("VkPolygonMode") int polygonModeAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_polygonMode(this.segment(), index); } + /// {@return `polygonMode`} + public @CType("VkPolygonMode") int polygonMode() { return VkPipelineRasterizationStateCreateInfo.get_polygonMode(this.segment()); } + /// Sets `polygonMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_polygonMode(MemorySegment segment, long index, @CType("VkPolygonMode") int value) { VH_polygonMode.set(segment, 0L, index, value); } + /// Sets `polygonMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_polygonMode(MemorySegment segment, @CType("VkPolygonMode") int value) { VkPipelineRasterizationStateCreateInfo.set_polygonMode(segment, 0L, value); } + /// Sets `polygonMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo polygonModeAt(long index, @CType("VkPolygonMode") int value) { VkPipelineRasterizationStateCreateInfo.set_polygonMode(this.segment(), index, value); return this; } + /// Sets `polygonMode` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo polygonMode(@CType("VkPolygonMode") int value) { VkPipelineRasterizationStateCreateInfo.set_polygonMode(this.segment(), value); return this; } + + /// {@return `cullMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCullModeFlags") int get_cullMode(MemorySegment segment, long index) { return (int) VH_cullMode.get(segment, 0L, index); } + /// {@return `cullMode`} + /// @param segment the segment of the struct + public static @CType("VkCullModeFlags") int get_cullMode(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_cullMode(segment, 0L); } + /// {@return `cullMode` at the given index} + /// @param index the index + public @CType("VkCullModeFlags") int cullModeAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_cullMode(this.segment(), index); } + /// {@return `cullMode`} + public @CType("VkCullModeFlags") int cullMode() { return VkPipelineRasterizationStateCreateInfo.get_cullMode(this.segment()); } + /// Sets `cullMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cullMode(MemorySegment segment, long index, @CType("VkCullModeFlags") int value) { VH_cullMode.set(segment, 0L, index, value); } + /// Sets `cullMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cullMode(MemorySegment segment, @CType("VkCullModeFlags") int value) { VkPipelineRasterizationStateCreateInfo.set_cullMode(segment, 0L, value); } + /// Sets `cullMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo cullModeAt(long index, @CType("VkCullModeFlags") int value) { VkPipelineRasterizationStateCreateInfo.set_cullMode(this.segment(), index, value); return this; } + /// Sets `cullMode` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo cullMode(@CType("VkCullModeFlags") int value) { VkPipelineRasterizationStateCreateInfo.set_cullMode(this.segment(), value); return this; } + + /// {@return `frontFace` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFrontFace") int get_frontFace(MemorySegment segment, long index) { return (int) VH_frontFace.get(segment, 0L, index); } + /// {@return `frontFace`} + /// @param segment the segment of the struct + public static @CType("VkFrontFace") int get_frontFace(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_frontFace(segment, 0L); } + /// {@return `frontFace` at the given index} + /// @param index the index + public @CType("VkFrontFace") int frontFaceAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_frontFace(this.segment(), index); } + /// {@return `frontFace`} + public @CType("VkFrontFace") int frontFace() { return VkPipelineRasterizationStateCreateInfo.get_frontFace(this.segment()); } + /// Sets `frontFace` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frontFace(MemorySegment segment, long index, @CType("VkFrontFace") int value) { VH_frontFace.set(segment, 0L, index, value); } + /// Sets `frontFace` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frontFace(MemorySegment segment, @CType("VkFrontFace") int value) { VkPipelineRasterizationStateCreateInfo.set_frontFace(segment, 0L, value); } + /// Sets `frontFace` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo frontFaceAt(long index, @CType("VkFrontFace") int value) { VkPipelineRasterizationStateCreateInfo.set_frontFace(this.segment(), index, value); return this; } + /// Sets `frontFace` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo frontFace(@CType("VkFrontFace") int value) { VkPipelineRasterizationStateCreateInfo.set_frontFace(this.segment(), value); return this; } + + /// {@return `depthBiasEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_depthBiasEnable(MemorySegment segment, long index) { return (int) VH_depthBiasEnable.get(segment, 0L, index); } + /// {@return `depthBiasEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_depthBiasEnable(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_depthBiasEnable(segment, 0L); } + /// {@return `depthBiasEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int depthBiasEnableAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_depthBiasEnable(this.segment(), index); } + /// {@return `depthBiasEnable`} + public @CType("VkBool32") int depthBiasEnable() { return VkPipelineRasterizationStateCreateInfo.get_depthBiasEnable(this.segment()); } + /// Sets `depthBiasEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_depthBiasEnable.set(segment, 0L, index, value); } + /// Sets `depthBiasEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasEnable(MemorySegment segment, @CType("VkBool32") int value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasEnable(segment, 0L, value); } + /// Sets `depthBiasEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo depthBiasEnableAt(long index, @CType("VkBool32") int value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasEnable(this.segment(), index, value); return this; } + /// Sets `depthBiasEnable` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo depthBiasEnable(@CType("VkBool32") int value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasEnable(this.segment(), value); return this; } + + /// {@return `depthBiasConstantFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_depthBiasConstantFactor(MemorySegment segment, long index) { return (float) VH_depthBiasConstantFactor.get(segment, 0L, index); } + /// {@return `depthBiasConstantFactor`} + /// @param segment the segment of the struct + public static @CType("float") float get_depthBiasConstantFactor(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_depthBiasConstantFactor(segment, 0L); } + /// {@return `depthBiasConstantFactor` at the given index} + /// @param index the index + public @CType("float") float depthBiasConstantFactorAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_depthBiasConstantFactor(this.segment(), index); } + /// {@return `depthBiasConstantFactor`} + public @CType("float") float depthBiasConstantFactor() { return VkPipelineRasterizationStateCreateInfo.get_depthBiasConstantFactor(this.segment()); } + /// Sets `depthBiasConstantFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasConstantFactor(MemorySegment segment, long index, @CType("float") float value) { VH_depthBiasConstantFactor.set(segment, 0L, index, value); } + /// Sets `depthBiasConstantFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasConstantFactor(MemorySegment segment, @CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasConstantFactor(segment, 0L, value); } + /// Sets `depthBiasConstantFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo depthBiasConstantFactorAt(long index, @CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasConstantFactor(this.segment(), index, value); return this; } + /// Sets `depthBiasConstantFactor` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo depthBiasConstantFactor(@CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasConstantFactor(this.segment(), value); return this; } + + /// {@return `depthBiasClamp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_depthBiasClamp(MemorySegment segment, long index) { return (float) VH_depthBiasClamp.get(segment, 0L, index); } + /// {@return `depthBiasClamp`} + /// @param segment the segment of the struct + public static @CType("float") float get_depthBiasClamp(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_depthBiasClamp(segment, 0L); } + /// {@return `depthBiasClamp` at the given index} + /// @param index the index + public @CType("float") float depthBiasClampAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_depthBiasClamp(this.segment(), index); } + /// {@return `depthBiasClamp`} + public @CType("float") float depthBiasClamp() { return VkPipelineRasterizationStateCreateInfo.get_depthBiasClamp(this.segment()); } + /// Sets `depthBiasClamp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasClamp(MemorySegment segment, long index, @CType("float") float value) { VH_depthBiasClamp.set(segment, 0L, index, value); } + /// Sets `depthBiasClamp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasClamp(MemorySegment segment, @CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasClamp(segment, 0L, value); } + /// Sets `depthBiasClamp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo depthBiasClampAt(long index, @CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasClamp(this.segment(), index, value); return this; } + /// Sets `depthBiasClamp` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo depthBiasClamp(@CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasClamp(this.segment(), value); return this; } + + /// {@return `depthBiasSlopeFactor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_depthBiasSlopeFactor(MemorySegment segment, long index) { return (float) VH_depthBiasSlopeFactor.get(segment, 0L, index); } + /// {@return `depthBiasSlopeFactor`} + /// @param segment the segment of the struct + public static @CType("float") float get_depthBiasSlopeFactor(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_depthBiasSlopeFactor(segment, 0L); } + /// {@return `depthBiasSlopeFactor` at the given index} + /// @param index the index + public @CType("float") float depthBiasSlopeFactorAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_depthBiasSlopeFactor(this.segment(), index); } + /// {@return `depthBiasSlopeFactor`} + public @CType("float") float depthBiasSlopeFactor() { return VkPipelineRasterizationStateCreateInfo.get_depthBiasSlopeFactor(this.segment()); } + /// Sets `depthBiasSlopeFactor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthBiasSlopeFactor(MemorySegment segment, long index, @CType("float") float value) { VH_depthBiasSlopeFactor.set(segment, 0L, index, value); } + /// Sets `depthBiasSlopeFactor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthBiasSlopeFactor(MemorySegment segment, @CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasSlopeFactor(segment, 0L, value); } + /// Sets `depthBiasSlopeFactor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo depthBiasSlopeFactorAt(long index, @CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasSlopeFactor(this.segment(), index, value); return this; } + /// Sets `depthBiasSlopeFactor` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo depthBiasSlopeFactor(@CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_depthBiasSlopeFactor(this.segment(), value); return this; } + + /// {@return `lineWidth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_lineWidth(MemorySegment segment, long index) { return (float) VH_lineWidth.get(segment, 0L, index); } + /// {@return `lineWidth`} + /// @param segment the segment of the struct + public static @CType("float") float get_lineWidth(MemorySegment segment) { return VkPipelineRasterizationStateCreateInfo.get_lineWidth(segment, 0L); } + /// {@return `lineWidth` at the given index} + /// @param index the index + public @CType("float") float lineWidthAt(long index) { return VkPipelineRasterizationStateCreateInfo.get_lineWidth(this.segment(), index); } + /// {@return `lineWidth`} + public @CType("float") float lineWidth() { return VkPipelineRasterizationStateCreateInfo.get_lineWidth(this.segment()); } + /// Sets `lineWidth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lineWidth(MemorySegment segment, long index, @CType("float") float value) { VH_lineWidth.set(segment, 0L, index, value); } + /// Sets `lineWidth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lineWidth(MemorySegment segment, @CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_lineWidth(segment, 0L, value); } + /// Sets `lineWidth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo lineWidthAt(long index, @CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_lineWidth(this.segment(), index, value); return this; } + /// Sets `lineWidth` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRasterizationStateCreateInfo lineWidth(@CType("float") float value) { VkPipelineRasterizationStateCreateInfo.set_lineWidth(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRenderingCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRenderingCreateInfo.java new file mode 100644 index 00000000..1dbec0c2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRenderingCreateInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### viewMask +/// [VarHandle][#VH_viewMask] - [Getter][#viewMask()] - [Setter][#viewMask(int)] +/// ### colorAttachmentCount +/// [VarHandle][#VH_colorAttachmentCount] - [Getter][#colorAttachmentCount()] - [Setter][#colorAttachmentCount(int)] +/// ### pColorAttachmentFormats +/// [VarHandle][#VH_pColorAttachmentFormats] - [Getter][#pColorAttachmentFormats()] - [Setter][#pColorAttachmentFormats(java.lang.foreign.MemorySegment)] +/// ### depthAttachmentFormat +/// [VarHandle][#VH_depthAttachmentFormat] - [Getter][#depthAttachmentFormat()] - [Setter][#depthAttachmentFormat(int)] +/// ### stencilAttachmentFormat +/// [VarHandle][#VH_stencilAttachmentFormat] - [Getter][#stencilAttachmentFormat()] - [Setter][#stencilAttachmentFormat(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineRenderingCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t viewMask; +/// uint32_t colorAttachmentCount; +/// const VkFormat * pColorAttachmentFormats; +/// VkFormat depthAttachmentFormat; +/// VkFormat stencilAttachmentFormat; +/// } VkPipelineRenderingCreateInfo; +/// ``` +public final class VkPipelineRenderingCreateInfo extends Struct { + /// The struct layout of `VkPipelineRenderingCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("viewMask"), + ValueLayout.JAVA_INT.withName("colorAttachmentCount"), + ValueLayout.ADDRESS.withName("pColorAttachmentFormats"), + ValueLayout.JAVA_INT.withName("depthAttachmentFormat"), + ValueLayout.JAVA_INT.withName("stencilAttachmentFormat") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `viewMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewMask")); + /// The [VarHandle] of `colorAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachmentCount")); + /// The [VarHandle] of `pColorAttachmentFormats` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorAttachmentFormats = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorAttachmentFormats")); + /// The [VarHandle] of `depthAttachmentFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthAttachmentFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthAttachmentFormat")); + /// The [VarHandle] of `stencilAttachmentFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilAttachmentFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilAttachmentFormat")); + + /// Creates `VkPipelineRenderingCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineRenderingCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineRenderingCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRenderingCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRenderingCreateInfo(segment); } + + /// Creates `VkPipelineRenderingCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRenderingCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRenderingCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineRenderingCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRenderingCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRenderingCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineRenderingCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineRenderingCreateInfo` + public static VkPipelineRenderingCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineRenderingCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineRenderingCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineRenderingCreateInfo` + public static VkPipelineRenderingCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineRenderingCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineRenderingCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineRenderingCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineRenderingCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineRenderingCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineRenderingCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineRenderingCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineRenderingCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineRenderingCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineRenderingCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRenderingCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRenderingCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRenderingCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `viewMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewMask(MemorySegment segment, long index) { return (int) VH_viewMask.get(segment, 0L, index); } + /// {@return `viewMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewMask(MemorySegment segment) { return VkPipelineRenderingCreateInfo.get_viewMask(segment, 0L); } + /// {@return `viewMask` at the given index} + /// @param index the index + public @CType("uint32_t") int viewMaskAt(long index) { return VkPipelineRenderingCreateInfo.get_viewMask(this.segment(), index); } + /// {@return `viewMask`} + public @CType("uint32_t") int viewMask() { return VkPipelineRenderingCreateInfo.get_viewMask(this.segment()); } + /// Sets `viewMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewMask.set(segment, 0L, index, value); } + /// Sets `viewMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewMask(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineRenderingCreateInfo.set_viewMask(segment, 0L, value); } + /// Sets `viewMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo viewMaskAt(long index, @CType("uint32_t") int value) { VkPipelineRenderingCreateInfo.set_viewMask(this.segment(), index, value); return this; } + /// Sets `viewMask` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo viewMask(@CType("uint32_t") int value) { VkPipelineRenderingCreateInfo.set_viewMask(this.segment(), value); return this; } + + /// {@return `colorAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment, long index) { return (int) VH_colorAttachmentCount.get(segment, 0L, index); } + /// {@return `colorAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment) { return VkPipelineRenderingCreateInfo.get_colorAttachmentCount(segment, 0L); } + /// {@return `colorAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int colorAttachmentCountAt(long index) { return VkPipelineRenderingCreateInfo.get_colorAttachmentCount(this.segment(), index); } + /// {@return `colorAttachmentCount`} + public @CType("uint32_t") int colorAttachmentCount() { return VkPipelineRenderingCreateInfo.get_colorAttachmentCount(this.segment()); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorAttachmentCount.set(segment, 0L, index, value); } + /// Sets `colorAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineRenderingCreateInfo.set_colorAttachmentCount(segment, 0L, value); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo colorAttachmentCountAt(long index, @CType("uint32_t") int value) { VkPipelineRenderingCreateInfo.set_colorAttachmentCount(this.segment(), index, value); return this; } + /// Sets `colorAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo colorAttachmentCount(@CType("uint32_t") int value) { VkPipelineRenderingCreateInfo.set_colorAttachmentCount(this.segment(), value); return this; } + + /// {@return `pColorAttachmentFormats` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkFormat *") java.lang.foreign.MemorySegment get_pColorAttachmentFormats(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorAttachmentFormats.get(segment, 0L, index); } + /// {@return `pColorAttachmentFormats`} + /// @param segment the segment of the struct + public static @CType("const VkFormat *") java.lang.foreign.MemorySegment get_pColorAttachmentFormats(MemorySegment segment) { return VkPipelineRenderingCreateInfo.get_pColorAttachmentFormats(segment, 0L); } + /// {@return `pColorAttachmentFormats` at the given index} + /// @param index the index + public @CType("const VkFormat *") java.lang.foreign.MemorySegment pColorAttachmentFormatsAt(long index) { return VkPipelineRenderingCreateInfo.get_pColorAttachmentFormats(this.segment(), index); } + /// {@return `pColorAttachmentFormats`} + public @CType("const VkFormat *") java.lang.foreign.MemorySegment pColorAttachmentFormats() { return VkPipelineRenderingCreateInfo.get_pColorAttachmentFormats(this.segment()); } + /// Sets `pColorAttachmentFormats` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorAttachmentFormats(MemorySegment segment, long index, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VH_pColorAttachmentFormats.set(segment, 0L, index, value); } + /// Sets `pColorAttachmentFormats` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorAttachmentFormats(MemorySegment segment, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkPipelineRenderingCreateInfo.set_pColorAttachmentFormats(segment, 0L, value); } + /// Sets `pColorAttachmentFormats` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo pColorAttachmentFormatsAt(long index, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkPipelineRenderingCreateInfo.set_pColorAttachmentFormats(this.segment(), index, value); return this; } + /// Sets `pColorAttachmentFormats` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo pColorAttachmentFormats(@CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkPipelineRenderingCreateInfo.set_pColorAttachmentFormats(this.segment(), value); return this; } + + /// {@return `depthAttachmentFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_depthAttachmentFormat(MemorySegment segment, long index) { return (int) VH_depthAttachmentFormat.get(segment, 0L, index); } + /// {@return `depthAttachmentFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_depthAttachmentFormat(MemorySegment segment) { return VkPipelineRenderingCreateInfo.get_depthAttachmentFormat(segment, 0L); } + /// {@return `depthAttachmentFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int depthAttachmentFormatAt(long index) { return VkPipelineRenderingCreateInfo.get_depthAttachmentFormat(this.segment(), index); } + /// {@return `depthAttachmentFormat`} + public @CType("VkFormat") int depthAttachmentFormat() { return VkPipelineRenderingCreateInfo.get_depthAttachmentFormat(this.segment()); } + /// Sets `depthAttachmentFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthAttachmentFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_depthAttachmentFormat.set(segment, 0L, index, value); } + /// Sets `depthAttachmentFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthAttachmentFormat(MemorySegment segment, @CType("VkFormat") int value) { VkPipelineRenderingCreateInfo.set_depthAttachmentFormat(segment, 0L, value); } + /// Sets `depthAttachmentFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo depthAttachmentFormatAt(long index, @CType("VkFormat") int value) { VkPipelineRenderingCreateInfo.set_depthAttachmentFormat(this.segment(), index, value); return this; } + /// Sets `depthAttachmentFormat` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo depthAttachmentFormat(@CType("VkFormat") int value) { VkPipelineRenderingCreateInfo.set_depthAttachmentFormat(this.segment(), value); return this; } + + /// {@return `stencilAttachmentFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_stencilAttachmentFormat(MemorySegment segment, long index) { return (int) VH_stencilAttachmentFormat.get(segment, 0L, index); } + /// {@return `stencilAttachmentFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_stencilAttachmentFormat(MemorySegment segment) { return VkPipelineRenderingCreateInfo.get_stencilAttachmentFormat(segment, 0L); } + /// {@return `stencilAttachmentFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int stencilAttachmentFormatAt(long index) { return VkPipelineRenderingCreateInfo.get_stencilAttachmentFormat(this.segment(), index); } + /// {@return `stencilAttachmentFormat`} + public @CType("VkFormat") int stencilAttachmentFormat() { return VkPipelineRenderingCreateInfo.get_stencilAttachmentFormat(this.segment()); } + /// Sets `stencilAttachmentFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilAttachmentFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_stencilAttachmentFormat.set(segment, 0L, index, value); } + /// Sets `stencilAttachmentFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilAttachmentFormat(MemorySegment segment, @CType("VkFormat") int value) { VkPipelineRenderingCreateInfo.set_stencilAttachmentFormat(segment, 0L, value); } + /// Sets `stencilAttachmentFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo stencilAttachmentFormatAt(long index, @CType("VkFormat") int value) { VkPipelineRenderingCreateInfo.set_stencilAttachmentFormat(this.segment(), index, value); return this; } + /// Sets `stencilAttachmentFormat` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRenderingCreateInfo stencilAttachmentFormat(@CType("VkFormat") int value) { VkPipelineRenderingCreateInfo.set_stencilAttachmentFormat(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRobustnessCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRobustnessCreateInfo.java new file mode 100644 index 00000000..acb06fdd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineRobustnessCreateInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### storageBuffers +/// [VarHandle][#VH_storageBuffers] - [Getter][#storageBuffers()] - [Setter][#storageBuffers(int)] +/// ### uniformBuffers +/// [VarHandle][#VH_uniformBuffers] - [Getter][#uniformBuffers()] - [Setter][#uniformBuffers(int)] +/// ### vertexInputs +/// [VarHandle][#VH_vertexInputs] - [Getter][#vertexInputs()] - [Setter][#vertexInputs(int)] +/// ### images +/// [VarHandle][#VH_images] - [Getter][#images()] - [Setter][#images(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineRobustnessCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineRobustnessBufferBehavior storageBuffers; +/// VkPipelineRobustnessBufferBehavior uniformBuffers; +/// VkPipelineRobustnessBufferBehavior vertexInputs; +/// VkPipelineRobustnessImageBehavior images; +/// } VkPipelineRobustnessCreateInfo; +/// ``` +public final class VkPipelineRobustnessCreateInfo extends Struct { + /// The struct layout of `VkPipelineRobustnessCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("storageBuffers"), + ValueLayout.JAVA_INT.withName("uniformBuffers"), + ValueLayout.JAVA_INT.withName("vertexInputs"), + ValueLayout.JAVA_INT.withName("images") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `storageBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storageBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storageBuffers")); + /// The [VarHandle] of `uniformBuffers` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniformBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniformBuffers")); + /// The [VarHandle] of `vertexInputs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexInputs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexInputs")); + /// The [VarHandle] of `images` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_images = LAYOUT.arrayElementVarHandle(PathElement.groupElement("images")); + + /// Creates `VkPipelineRobustnessCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineRobustnessCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineRobustnessCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRobustnessCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRobustnessCreateInfo(segment); } + + /// Creates `VkPipelineRobustnessCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRobustnessCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRobustnessCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineRobustnessCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineRobustnessCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineRobustnessCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineRobustnessCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineRobustnessCreateInfo` + public static VkPipelineRobustnessCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineRobustnessCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineRobustnessCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineRobustnessCreateInfo` + public static VkPipelineRobustnessCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineRobustnessCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineRobustnessCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineRobustnessCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineRobustnessCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineRobustnessCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineRobustnessCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineRobustnessCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineRobustnessCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineRobustnessCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineRobustnessCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRobustnessCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRobustnessCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineRobustnessCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `storageBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessBufferBehavior") int get_storageBuffers(MemorySegment segment, long index) { return (int) VH_storageBuffers.get(segment, 0L, index); } + /// {@return `storageBuffers`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessBufferBehavior") int get_storageBuffers(MemorySegment segment) { return VkPipelineRobustnessCreateInfo.get_storageBuffers(segment, 0L); } + /// {@return `storageBuffers` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessBufferBehavior") int storageBuffersAt(long index) { return VkPipelineRobustnessCreateInfo.get_storageBuffers(this.segment(), index); } + /// {@return `storageBuffers`} + public @CType("VkPipelineRobustnessBufferBehavior") int storageBuffers() { return VkPipelineRobustnessCreateInfo.get_storageBuffers(this.segment()); } + /// Sets `storageBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storageBuffers(MemorySegment segment, long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VH_storageBuffers.set(segment, 0L, index, value); } + /// Sets `storageBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storageBuffers(MemorySegment segment, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPipelineRobustnessCreateInfo.set_storageBuffers(segment, 0L, value); } + /// Sets `storageBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo storageBuffersAt(long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPipelineRobustnessCreateInfo.set_storageBuffers(this.segment(), index, value); return this; } + /// Sets `storageBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo storageBuffers(@CType("VkPipelineRobustnessBufferBehavior") int value) { VkPipelineRobustnessCreateInfo.set_storageBuffers(this.segment(), value); return this; } + + /// {@return `uniformBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessBufferBehavior") int get_uniformBuffers(MemorySegment segment, long index) { return (int) VH_uniformBuffers.get(segment, 0L, index); } + /// {@return `uniformBuffers`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessBufferBehavior") int get_uniformBuffers(MemorySegment segment) { return VkPipelineRobustnessCreateInfo.get_uniformBuffers(segment, 0L); } + /// {@return `uniformBuffers` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessBufferBehavior") int uniformBuffersAt(long index) { return VkPipelineRobustnessCreateInfo.get_uniformBuffers(this.segment(), index); } + /// {@return `uniformBuffers`} + public @CType("VkPipelineRobustnessBufferBehavior") int uniformBuffers() { return VkPipelineRobustnessCreateInfo.get_uniformBuffers(this.segment()); } + /// Sets `uniformBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniformBuffers(MemorySegment segment, long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VH_uniformBuffers.set(segment, 0L, index, value); } + /// Sets `uniformBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniformBuffers(MemorySegment segment, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPipelineRobustnessCreateInfo.set_uniformBuffers(segment, 0L, value); } + /// Sets `uniformBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo uniformBuffersAt(long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPipelineRobustnessCreateInfo.set_uniformBuffers(this.segment(), index, value); return this; } + /// Sets `uniformBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo uniformBuffers(@CType("VkPipelineRobustnessBufferBehavior") int value) { VkPipelineRobustnessCreateInfo.set_uniformBuffers(this.segment(), value); return this; } + + /// {@return `vertexInputs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessBufferBehavior") int get_vertexInputs(MemorySegment segment, long index) { return (int) VH_vertexInputs.get(segment, 0L, index); } + /// {@return `vertexInputs`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessBufferBehavior") int get_vertexInputs(MemorySegment segment) { return VkPipelineRobustnessCreateInfo.get_vertexInputs(segment, 0L); } + /// {@return `vertexInputs` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessBufferBehavior") int vertexInputsAt(long index) { return VkPipelineRobustnessCreateInfo.get_vertexInputs(this.segment(), index); } + /// {@return `vertexInputs`} + public @CType("VkPipelineRobustnessBufferBehavior") int vertexInputs() { return VkPipelineRobustnessCreateInfo.get_vertexInputs(this.segment()); } + /// Sets `vertexInputs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexInputs(MemorySegment segment, long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VH_vertexInputs.set(segment, 0L, index, value); } + /// Sets `vertexInputs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexInputs(MemorySegment segment, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPipelineRobustnessCreateInfo.set_vertexInputs(segment, 0L, value); } + /// Sets `vertexInputs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo vertexInputsAt(long index, @CType("VkPipelineRobustnessBufferBehavior") int value) { VkPipelineRobustnessCreateInfo.set_vertexInputs(this.segment(), index, value); return this; } + /// Sets `vertexInputs` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo vertexInputs(@CType("VkPipelineRobustnessBufferBehavior") int value) { VkPipelineRobustnessCreateInfo.set_vertexInputs(this.segment(), value); return this; } + + /// {@return `images` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineRobustnessImageBehavior") int get_images(MemorySegment segment, long index) { return (int) VH_images.get(segment, 0L, index); } + /// {@return `images`} + /// @param segment the segment of the struct + public static @CType("VkPipelineRobustnessImageBehavior") int get_images(MemorySegment segment) { return VkPipelineRobustnessCreateInfo.get_images(segment, 0L); } + /// {@return `images` at the given index} + /// @param index the index + public @CType("VkPipelineRobustnessImageBehavior") int imagesAt(long index) { return VkPipelineRobustnessCreateInfo.get_images(this.segment(), index); } + /// {@return `images`} + public @CType("VkPipelineRobustnessImageBehavior") int images() { return VkPipelineRobustnessCreateInfo.get_images(this.segment()); } + /// Sets `images` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_images(MemorySegment segment, long index, @CType("VkPipelineRobustnessImageBehavior") int value) { VH_images.set(segment, 0L, index, value); } + /// Sets `images` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_images(MemorySegment segment, @CType("VkPipelineRobustnessImageBehavior") int value) { VkPipelineRobustnessCreateInfo.set_images(segment, 0L, value); } + /// Sets `images` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo imagesAt(long index, @CType("VkPipelineRobustnessImageBehavior") int value) { VkPipelineRobustnessCreateInfo.set_images(this.segment(), index, value); return this; } + /// Sets `images` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineRobustnessCreateInfo images(@CType("VkPipelineRobustnessImageBehavior") int value) { VkPipelineRobustnessCreateInfo.set_images(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineShaderStageCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineShaderStageCreateInfo.java new file mode 100644 index 00000000..107a0f21 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineShaderStageCreateInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### stage +/// [VarHandle][#VH_stage] - [Getter][#stage()] - [Setter][#stage(int)] +/// ### module +/// [VarHandle][#VH_module] - [Getter][#module()] - [Setter][#module(java.lang.foreign.MemorySegment)] +/// ### pName +/// [VarHandle][#VH_pName] - [Getter][#pName()] - [Setter][#pName(java.lang.foreign.MemorySegment)] +/// ### pSpecializationInfo +/// [VarHandle][#VH_pSpecializationInfo] - [Getter][#pSpecializationInfo()] - [Setter][#pSpecializationInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineShaderStageCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineShaderStageCreateFlags flags; +/// VkShaderStageFlagBits stage; +/// VkShaderModule module; +/// const char * pName; +/// const VkSpecializationInfo * pSpecializationInfo; +/// } VkPipelineShaderStageCreateInfo; +/// ``` +public final class VkPipelineShaderStageCreateInfo extends Struct { + /// The struct layout of `VkPipelineShaderStageCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("stage"), + ValueLayout.ADDRESS.withName("module"), + ValueLayout.ADDRESS.withName("pName"), + ValueLayout.ADDRESS.withName("pSpecializationInfo") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `stage` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stage")); + /// The [VarHandle] of `module` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_module = LAYOUT.arrayElementVarHandle(PathElement.groupElement("module")); + /// The [VarHandle] of `pName` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pName = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pName")); + /// The [VarHandle] of `pSpecializationInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSpecializationInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSpecializationInfo")); + + /// Creates `VkPipelineShaderStageCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineShaderStageCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineShaderStageCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageCreateInfo(segment); } + + /// Creates `VkPipelineShaderStageCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineShaderStageCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineShaderStageCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineShaderStageCreateInfo` + public static VkPipelineShaderStageCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineShaderStageCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineShaderStageCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineShaderStageCreateInfo` + public static VkPipelineShaderStageCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineShaderStageCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineShaderStageCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineShaderStageCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineShaderStageCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineShaderStageCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineShaderStageCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineShaderStageCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineShaderStageCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineShaderStageCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineShaderStageCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineShaderStageCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineShaderStageCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineShaderStageCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineShaderStageCreateFlags") int flagsAt(long index) { return VkPipelineShaderStageCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineShaderStageCreateFlags") int flags() { return VkPipelineShaderStageCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineShaderStageCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineShaderStageCreateFlags") int value) { VkPipelineShaderStageCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo flagsAt(long index, @CType("VkPipelineShaderStageCreateFlags") int value) { VkPipelineShaderStageCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo flags(@CType("VkPipelineShaderStageCreateFlags") int value) { VkPipelineShaderStageCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `stage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlagBits") int get_stage(MemorySegment segment, long index) { return (int) VH_stage.get(segment, 0L, index); } + /// {@return `stage`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlagBits") int get_stage(MemorySegment segment) { return VkPipelineShaderStageCreateInfo.get_stage(segment, 0L); } + /// {@return `stage` at the given index} + /// @param index the index + public @CType("VkShaderStageFlagBits") int stageAt(long index) { return VkPipelineShaderStageCreateInfo.get_stage(this.segment(), index); } + /// {@return `stage`} + public @CType("VkShaderStageFlagBits") int stage() { return VkPipelineShaderStageCreateInfo.get_stage(this.segment()); } + /// Sets `stage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stage(MemorySegment segment, long index, @CType("VkShaderStageFlagBits") int value) { VH_stage.set(segment, 0L, index, value); } + /// Sets `stage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stage(MemorySegment segment, @CType("VkShaderStageFlagBits") int value) { VkPipelineShaderStageCreateInfo.set_stage(segment, 0L, value); } + /// Sets `stage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo stageAt(long index, @CType("VkShaderStageFlagBits") int value) { VkPipelineShaderStageCreateInfo.set_stage(this.segment(), index, value); return this; } + /// Sets `stage` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo stage(@CType("VkShaderStageFlagBits") int value) { VkPipelineShaderStageCreateInfo.set_stage(this.segment(), value); return this; } + + /// {@return `module` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderModule") java.lang.foreign.MemorySegment get_module(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_module.get(segment, 0L, index); } + /// {@return `module`} + /// @param segment the segment of the struct + public static @CType("VkShaderModule") java.lang.foreign.MemorySegment get_module(MemorySegment segment) { return VkPipelineShaderStageCreateInfo.get_module(segment, 0L); } + /// {@return `module` at the given index} + /// @param index the index + public @CType("VkShaderModule") java.lang.foreign.MemorySegment moduleAt(long index) { return VkPipelineShaderStageCreateInfo.get_module(this.segment(), index); } + /// {@return `module`} + public @CType("VkShaderModule") java.lang.foreign.MemorySegment module() { return VkPipelineShaderStageCreateInfo.get_module(this.segment()); } + /// Sets `module` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_module(MemorySegment segment, long index, @CType("VkShaderModule") java.lang.foreign.MemorySegment value) { VH_module.set(segment, 0L, index, value); } + /// Sets `module` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_module(MemorySegment segment, @CType("VkShaderModule") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_module(segment, 0L, value); } + /// Sets `module` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo moduleAt(long index, @CType("VkShaderModule") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_module(this.segment(), index, value); return this; } + /// Sets `module` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo module(@CType("VkShaderModule") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_module(this.segment(), value); return this; } + + /// {@return `pName` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const char *") java.lang.foreign.MemorySegment get_pName(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pName.get(segment, 0L, index); } + /// {@return `pName`} + /// @param segment the segment of the struct + public static @CType("const char *") java.lang.foreign.MemorySegment get_pName(MemorySegment segment) { return VkPipelineShaderStageCreateInfo.get_pName(segment, 0L); } + /// {@return `pName` at the given index} + /// @param index the index + public @CType("const char *") java.lang.foreign.MemorySegment pNameAt(long index) { return VkPipelineShaderStageCreateInfo.get_pName(this.segment(), index); } + /// {@return `pName`} + public @CType("const char *") java.lang.foreign.MemorySegment pName() { return VkPipelineShaderStageCreateInfo.get_pName(this.segment()); } + /// Sets `pName` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pName(MemorySegment segment, long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VH_pName.set(segment, 0L, index, value); } + /// Sets `pName` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pName(MemorySegment segment, @CType("const char *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_pName(segment, 0L, value); } + /// Sets `pName` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo pNameAt(long index, @CType("const char *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_pName(this.segment(), index, value); return this; } + /// Sets `pName` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo pName(@CType("const char *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_pName(this.segment(), value); return this; } + + /// {@return `pSpecializationInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment get_pSpecializationInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSpecializationInfo.get(segment, 0L, index); } + /// {@return `pSpecializationInfo`} + /// @param segment the segment of the struct + public static @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment get_pSpecializationInfo(MemorySegment segment) { return VkPipelineShaderStageCreateInfo.get_pSpecializationInfo(segment, 0L); } + /// {@return `pSpecializationInfo` at the given index} + /// @param index the index + public @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment pSpecializationInfoAt(long index) { return VkPipelineShaderStageCreateInfo.get_pSpecializationInfo(this.segment(), index); } + /// {@return `pSpecializationInfo`} + public @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment pSpecializationInfo() { return VkPipelineShaderStageCreateInfo.get_pSpecializationInfo(this.segment()); } + /// Sets `pSpecializationInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSpecializationInfo(MemorySegment segment, long index, @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment value) { VH_pSpecializationInfo.set(segment, 0L, index, value); } + /// Sets `pSpecializationInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSpecializationInfo(MemorySegment segment, @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_pSpecializationInfo(segment, 0L, value); } + /// Sets `pSpecializationInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo pSpecializationInfoAt(long index, @CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_pSpecializationInfo(this.segment(), index, value); return this; } + /// Sets `pSpecializationInfo` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageCreateInfo pSpecializationInfo(@CType("const VkSpecializationInfo *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageCreateInfo.set_pSpecializationInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.java new file mode 100644 index 00000000..31b4cc74 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### requiredSubgroupSize +/// [VarHandle][#VH_requiredSubgroupSize] - [Getter][#requiredSubgroupSize()] - [Setter][#requiredSubgroupSize(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineShaderStageRequiredSubgroupSizeCreateInfo { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t requiredSubgroupSize; +/// } VkPipelineShaderStageRequiredSubgroupSizeCreateInfo; +/// ``` +public final class VkPipelineShaderStageRequiredSubgroupSizeCreateInfo extends Struct { + /// The struct layout of `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("requiredSubgroupSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `requiredSubgroupSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_requiredSubgroupSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("requiredSubgroupSize")); + + /// Creates `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineShaderStageRequiredSubgroupSizeCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageRequiredSubgroupSizeCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageRequiredSubgroupSizeCreateInfo(segment); } + + /// Creates `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageRequiredSubgroupSizeCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageRequiredSubgroupSizeCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineShaderStageRequiredSubgroupSizeCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineShaderStageRequiredSubgroupSizeCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` + public static VkPipelineShaderStageRequiredSubgroupSizeCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineShaderStageRequiredSubgroupSizeCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` + public static VkPipelineShaderStageRequiredSubgroupSizeCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineShaderStageRequiredSubgroupSizeCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageRequiredSubgroupSizeCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageRequiredSubgroupSizeCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageRequiredSubgroupSizeCreateInfo pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageRequiredSubgroupSizeCreateInfo pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `requiredSubgroupSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_requiredSubgroupSize(MemorySegment segment, long index) { return (int) VH_requiredSubgroupSize.get(segment, 0L, index); } + /// {@return `requiredSubgroupSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_requiredSubgroupSize(MemorySegment segment) { return VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.get_requiredSubgroupSize(segment, 0L); } + /// {@return `requiredSubgroupSize` at the given index} + /// @param index the index + public @CType("uint32_t") int requiredSubgroupSizeAt(long index) { return VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.get_requiredSubgroupSize(this.segment(), index); } + /// {@return `requiredSubgroupSize`} + public @CType("uint32_t") int requiredSubgroupSize() { return VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.get_requiredSubgroupSize(this.segment()); } + /// Sets `requiredSubgroupSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_requiredSubgroupSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_requiredSubgroupSize.set(segment, 0L, index, value); } + /// Sets `requiredSubgroupSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_requiredSubgroupSize(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.set_requiredSubgroupSize(segment, 0L, value); } + /// Sets `requiredSubgroupSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineShaderStageRequiredSubgroupSizeCreateInfo requiredSubgroupSizeAt(long index, @CType("uint32_t") int value) { VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.set_requiredSubgroupSize(this.segment(), index, value); return this; } + /// Sets `requiredSubgroupSize` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineShaderStageRequiredSubgroupSizeCreateInfo requiredSubgroupSize(@CType("uint32_t") int value) { VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.set_requiredSubgroupSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineTessellationDomainOriginStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineTessellationDomainOriginStateCreateInfo.java new file mode 100644 index 00000000..01168a41 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineTessellationDomainOriginStateCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### domainOrigin +/// [VarHandle][#VH_domainOrigin] - [Getter][#domainOrigin()] - [Setter][#domainOrigin(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineTessellationDomainOriginStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkTessellationDomainOrigin domainOrigin; +/// } VkPipelineTessellationDomainOriginStateCreateInfo; +/// ``` +public final class VkPipelineTessellationDomainOriginStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineTessellationDomainOriginStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("domainOrigin") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `domainOrigin` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_domainOrigin = LAYOUT.arrayElementVarHandle(PathElement.groupElement("domainOrigin")); + + /// Creates `VkPipelineTessellationDomainOriginStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineTessellationDomainOriginStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineTessellationDomainOriginStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineTessellationDomainOriginStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineTessellationDomainOriginStateCreateInfo(segment); } + + /// Creates `VkPipelineTessellationDomainOriginStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineTessellationDomainOriginStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineTessellationDomainOriginStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineTessellationDomainOriginStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineTessellationDomainOriginStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineTessellationDomainOriginStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineTessellationDomainOriginStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineTessellationDomainOriginStateCreateInfo` + public static VkPipelineTessellationDomainOriginStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineTessellationDomainOriginStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineTessellationDomainOriginStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineTessellationDomainOriginStateCreateInfo` + public static VkPipelineTessellationDomainOriginStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineTessellationDomainOriginStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineTessellationDomainOriginStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineTessellationDomainOriginStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineTessellationDomainOriginStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineTessellationDomainOriginStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineTessellationDomainOriginStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineTessellationDomainOriginStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineTessellationDomainOriginStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineTessellationDomainOriginStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineTessellationDomainOriginStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineTessellationDomainOriginStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineTessellationDomainOriginStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineTessellationDomainOriginStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineTessellationDomainOriginStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineTessellationDomainOriginStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineTessellationDomainOriginStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineTessellationDomainOriginStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `domainOrigin` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkTessellationDomainOrigin") int get_domainOrigin(MemorySegment segment, long index) { return (int) VH_domainOrigin.get(segment, 0L, index); } + /// {@return `domainOrigin`} + /// @param segment the segment of the struct + public static @CType("VkTessellationDomainOrigin") int get_domainOrigin(MemorySegment segment) { return VkPipelineTessellationDomainOriginStateCreateInfo.get_domainOrigin(segment, 0L); } + /// {@return `domainOrigin` at the given index} + /// @param index the index + public @CType("VkTessellationDomainOrigin") int domainOriginAt(long index) { return VkPipelineTessellationDomainOriginStateCreateInfo.get_domainOrigin(this.segment(), index); } + /// {@return `domainOrigin`} + public @CType("VkTessellationDomainOrigin") int domainOrigin() { return VkPipelineTessellationDomainOriginStateCreateInfo.get_domainOrigin(this.segment()); } + /// Sets `domainOrigin` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_domainOrigin(MemorySegment segment, long index, @CType("VkTessellationDomainOrigin") int value) { VH_domainOrigin.set(segment, 0L, index, value); } + /// Sets `domainOrigin` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_domainOrigin(MemorySegment segment, @CType("VkTessellationDomainOrigin") int value) { VkPipelineTessellationDomainOriginStateCreateInfo.set_domainOrigin(segment, 0L, value); } + /// Sets `domainOrigin` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineTessellationDomainOriginStateCreateInfo domainOriginAt(long index, @CType("VkTessellationDomainOrigin") int value) { VkPipelineTessellationDomainOriginStateCreateInfo.set_domainOrigin(this.segment(), index, value); return this; } + /// Sets `domainOrigin` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineTessellationDomainOriginStateCreateInfo domainOrigin(@CType("VkTessellationDomainOrigin") int value) { VkPipelineTessellationDomainOriginStateCreateInfo.set_domainOrigin(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineTessellationStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineTessellationStateCreateInfo.java new file mode 100644 index 00000000..5b32fe4b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineTessellationStateCreateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### patchControlPoints +/// [VarHandle][#VH_patchControlPoints] - [Getter][#patchControlPoints()] - [Setter][#patchControlPoints(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineTessellationStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineTessellationStateCreateFlags flags; +/// uint32_t patchControlPoints; +/// } VkPipelineTessellationStateCreateInfo; +/// ``` +public final class VkPipelineTessellationStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineTessellationStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("patchControlPoints") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `patchControlPoints` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_patchControlPoints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("patchControlPoints")); + + /// Creates `VkPipelineTessellationStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineTessellationStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineTessellationStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineTessellationStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineTessellationStateCreateInfo(segment); } + + /// Creates `VkPipelineTessellationStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineTessellationStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineTessellationStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineTessellationStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineTessellationStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineTessellationStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineTessellationStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineTessellationStateCreateInfo` + public static VkPipelineTessellationStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineTessellationStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineTessellationStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineTessellationStateCreateInfo` + public static VkPipelineTessellationStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineTessellationStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineTessellationStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineTessellationStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineTessellationStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineTessellationStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineTessellationStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineTessellationStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineTessellationStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineTessellationStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineTessellationStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineTessellationStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineTessellationStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineTessellationStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineTessellationStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineTessellationStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineTessellationStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineTessellationStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineTessellationStateCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineTessellationStateCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineTessellationStateCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineTessellationStateCreateFlags") int flagsAt(long index) { return VkPipelineTessellationStateCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineTessellationStateCreateFlags") int flags() { return VkPipelineTessellationStateCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineTessellationStateCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineTessellationStateCreateFlags") int value) { VkPipelineTessellationStateCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineTessellationStateCreateInfo flagsAt(long index, @CType("VkPipelineTessellationStateCreateFlags") int value) { VkPipelineTessellationStateCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineTessellationStateCreateInfo flags(@CType("VkPipelineTessellationStateCreateFlags") int value) { VkPipelineTessellationStateCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `patchControlPoints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_patchControlPoints(MemorySegment segment, long index) { return (int) VH_patchControlPoints.get(segment, 0L, index); } + /// {@return `patchControlPoints`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_patchControlPoints(MemorySegment segment) { return VkPipelineTessellationStateCreateInfo.get_patchControlPoints(segment, 0L); } + /// {@return `patchControlPoints` at the given index} + /// @param index the index + public @CType("uint32_t") int patchControlPointsAt(long index) { return VkPipelineTessellationStateCreateInfo.get_patchControlPoints(this.segment(), index); } + /// {@return `patchControlPoints`} + public @CType("uint32_t") int patchControlPoints() { return VkPipelineTessellationStateCreateInfo.get_patchControlPoints(this.segment()); } + /// Sets `patchControlPoints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_patchControlPoints(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_patchControlPoints.set(segment, 0L, index, value); } + /// Sets `patchControlPoints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_patchControlPoints(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineTessellationStateCreateInfo.set_patchControlPoints(segment, 0L, value); } + /// Sets `patchControlPoints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineTessellationStateCreateInfo patchControlPointsAt(long index, @CType("uint32_t") int value) { VkPipelineTessellationStateCreateInfo.set_patchControlPoints(this.segment(), index, value); return this; } + /// Sets `patchControlPoints` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineTessellationStateCreateInfo patchControlPoints(@CType("uint32_t") int value) { VkPipelineTessellationStateCreateInfo.set_patchControlPoints(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineVertexInputDivisorStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineVertexInputDivisorStateCreateInfo.java new file mode 100644 index 00000000..85df4ff4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineVertexInputDivisorStateCreateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### vertexBindingDivisorCount +/// [VarHandle][#VH_vertexBindingDivisorCount] - [Getter][#vertexBindingDivisorCount()] - [Setter][#vertexBindingDivisorCount(int)] +/// ### pVertexBindingDivisors +/// [VarHandle][#VH_pVertexBindingDivisors] - [Getter][#pVertexBindingDivisors()] - [Setter][#pVertexBindingDivisors(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineVertexInputDivisorStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t vertexBindingDivisorCount; +/// const VkVertexInputBindingDivisorDescription * pVertexBindingDivisors; +/// } VkPipelineVertexInputDivisorStateCreateInfo; +/// ``` +public final class VkPipelineVertexInputDivisorStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineVertexInputDivisorStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("vertexBindingDivisorCount"), + ValueLayout.ADDRESS.withName("pVertexBindingDivisors") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `vertexBindingDivisorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexBindingDivisorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexBindingDivisorCount")); + /// The [VarHandle] of `pVertexBindingDivisors` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVertexBindingDivisors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVertexBindingDivisors")); + + /// Creates `VkPipelineVertexInputDivisorStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineVertexInputDivisorStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineVertexInputDivisorStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineVertexInputDivisorStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineVertexInputDivisorStateCreateInfo(segment); } + + /// Creates `VkPipelineVertexInputDivisorStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineVertexInputDivisorStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineVertexInputDivisorStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineVertexInputDivisorStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineVertexInputDivisorStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineVertexInputDivisorStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineVertexInputDivisorStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineVertexInputDivisorStateCreateInfo` + public static VkPipelineVertexInputDivisorStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineVertexInputDivisorStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineVertexInputDivisorStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineVertexInputDivisorStateCreateInfo` + public static VkPipelineVertexInputDivisorStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineVertexInputDivisorStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineVertexInputDivisorStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineVertexInputDivisorStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineVertexInputDivisorStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineVertexInputDivisorStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputDivisorStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineVertexInputDivisorStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputDivisorStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineVertexInputDivisorStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineVertexInputDivisorStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineVertexInputDivisorStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineVertexInputDivisorStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputDivisorStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputDivisorStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputDivisorStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputDivisorStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputDivisorStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `vertexBindingDivisorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vertexBindingDivisorCount(MemorySegment segment, long index) { return (int) VH_vertexBindingDivisorCount.get(segment, 0L, index); } + /// {@return `vertexBindingDivisorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vertexBindingDivisorCount(MemorySegment segment) { return VkPipelineVertexInputDivisorStateCreateInfo.get_vertexBindingDivisorCount(segment, 0L); } + /// {@return `vertexBindingDivisorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int vertexBindingDivisorCountAt(long index) { return VkPipelineVertexInputDivisorStateCreateInfo.get_vertexBindingDivisorCount(this.segment(), index); } + /// {@return `vertexBindingDivisorCount`} + public @CType("uint32_t") int vertexBindingDivisorCount() { return VkPipelineVertexInputDivisorStateCreateInfo.get_vertexBindingDivisorCount(this.segment()); } + /// Sets `vertexBindingDivisorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexBindingDivisorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vertexBindingDivisorCount.set(segment, 0L, index, value); } + /// Sets `vertexBindingDivisorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexBindingDivisorCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineVertexInputDivisorStateCreateInfo.set_vertexBindingDivisorCount(segment, 0L, value); } + /// Sets `vertexBindingDivisorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputDivisorStateCreateInfo vertexBindingDivisorCountAt(long index, @CType("uint32_t") int value) { VkPipelineVertexInputDivisorStateCreateInfo.set_vertexBindingDivisorCount(this.segment(), index, value); return this; } + /// Sets `vertexBindingDivisorCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputDivisorStateCreateInfo vertexBindingDivisorCount(@CType("uint32_t") int value) { VkPipelineVertexInputDivisorStateCreateInfo.set_vertexBindingDivisorCount(this.segment(), value); return this; } + + /// {@return `pVertexBindingDivisors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVertexInputBindingDivisorDescription *") java.lang.foreign.MemorySegment get_pVertexBindingDivisors(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVertexBindingDivisors.get(segment, 0L, index); } + /// {@return `pVertexBindingDivisors`} + /// @param segment the segment of the struct + public static @CType("const VkVertexInputBindingDivisorDescription *") java.lang.foreign.MemorySegment get_pVertexBindingDivisors(MemorySegment segment) { return VkPipelineVertexInputDivisorStateCreateInfo.get_pVertexBindingDivisors(segment, 0L); } + /// {@return `pVertexBindingDivisors` at the given index} + /// @param index the index + public @CType("const VkVertexInputBindingDivisorDescription *") java.lang.foreign.MemorySegment pVertexBindingDivisorsAt(long index) { return VkPipelineVertexInputDivisorStateCreateInfo.get_pVertexBindingDivisors(this.segment(), index); } + /// {@return `pVertexBindingDivisors`} + public @CType("const VkVertexInputBindingDivisorDescription *") java.lang.foreign.MemorySegment pVertexBindingDivisors() { return VkPipelineVertexInputDivisorStateCreateInfo.get_pVertexBindingDivisors(this.segment()); } + /// Sets `pVertexBindingDivisors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVertexBindingDivisors(MemorySegment segment, long index, @CType("const VkVertexInputBindingDivisorDescription *") java.lang.foreign.MemorySegment value) { VH_pVertexBindingDivisors.set(segment, 0L, index, value); } + /// Sets `pVertexBindingDivisors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVertexBindingDivisors(MemorySegment segment, @CType("const VkVertexInputBindingDivisorDescription *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputDivisorStateCreateInfo.set_pVertexBindingDivisors(segment, 0L, value); } + /// Sets `pVertexBindingDivisors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputDivisorStateCreateInfo pVertexBindingDivisorsAt(long index, @CType("const VkVertexInputBindingDivisorDescription *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputDivisorStateCreateInfo.set_pVertexBindingDivisors(this.segment(), index, value); return this; } + /// Sets `pVertexBindingDivisors` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputDivisorStateCreateInfo pVertexBindingDivisors(@CType("const VkVertexInputBindingDivisorDescription *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputDivisorStateCreateInfo.set_pVertexBindingDivisors(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineVertexInputStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineVertexInputStateCreateInfo.java new file mode 100644 index 00000000..286575a7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineVertexInputStateCreateInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### vertexBindingDescriptionCount +/// [VarHandle][#VH_vertexBindingDescriptionCount] - [Getter][#vertexBindingDescriptionCount()] - [Setter][#vertexBindingDescriptionCount(int)] +/// ### pVertexBindingDescriptions +/// [VarHandle][#VH_pVertexBindingDescriptions] - [Getter][#pVertexBindingDescriptions()] - [Setter][#pVertexBindingDescriptions(java.lang.foreign.MemorySegment)] +/// ### vertexAttributeDescriptionCount +/// [VarHandle][#VH_vertexAttributeDescriptionCount] - [Getter][#vertexAttributeDescriptionCount()] - [Setter][#vertexAttributeDescriptionCount(int)] +/// ### pVertexAttributeDescriptions +/// [VarHandle][#VH_pVertexAttributeDescriptions] - [Getter][#pVertexAttributeDescriptions()] - [Setter][#pVertexAttributeDescriptions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineVertexInputStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineVertexInputStateCreateFlags flags; +/// uint32_t vertexBindingDescriptionCount; +/// const VkVertexInputBindingDescription * pVertexBindingDescriptions; +/// uint32_t vertexAttributeDescriptionCount; +/// const VkVertexInputAttributeDescription * pVertexAttributeDescriptions; +/// } VkPipelineVertexInputStateCreateInfo; +/// ``` +public final class VkPipelineVertexInputStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineVertexInputStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("vertexBindingDescriptionCount"), + ValueLayout.ADDRESS.withName("pVertexBindingDescriptions"), + ValueLayout.JAVA_INT.withName("vertexAttributeDescriptionCount"), + ValueLayout.ADDRESS.withName("pVertexAttributeDescriptions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `vertexBindingDescriptionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexBindingDescriptionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexBindingDescriptionCount")); + /// The [VarHandle] of `pVertexBindingDescriptions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVertexBindingDescriptions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVertexBindingDescriptions")); + /// The [VarHandle] of `vertexAttributeDescriptionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vertexAttributeDescriptionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vertexAttributeDescriptionCount")); + /// The [VarHandle] of `pVertexAttributeDescriptions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pVertexAttributeDescriptions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pVertexAttributeDescriptions")); + + /// Creates `VkPipelineVertexInputStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineVertexInputStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineVertexInputStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineVertexInputStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineVertexInputStateCreateInfo(segment); } + + /// Creates `VkPipelineVertexInputStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineVertexInputStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineVertexInputStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineVertexInputStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineVertexInputStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineVertexInputStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineVertexInputStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineVertexInputStateCreateInfo` + public static VkPipelineVertexInputStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineVertexInputStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineVertexInputStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineVertexInputStateCreateInfo` + public static VkPipelineVertexInputStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineVertexInputStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineVertexInputStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineVertexInputStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineVertexInputStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineVertexInputStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineVertexInputStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineVertexInputStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineVertexInputStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineVertexInputStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineVertexInputStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineVertexInputStateCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineVertexInputStateCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineVertexInputStateCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineVertexInputStateCreateFlags") int flagsAt(long index) { return VkPipelineVertexInputStateCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineVertexInputStateCreateFlags") int flags() { return VkPipelineVertexInputStateCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineVertexInputStateCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineVertexInputStateCreateFlags") int value) { VkPipelineVertexInputStateCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo flagsAt(long index, @CType("VkPipelineVertexInputStateCreateFlags") int value) { VkPipelineVertexInputStateCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo flags(@CType("VkPipelineVertexInputStateCreateFlags") int value) { VkPipelineVertexInputStateCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `vertexBindingDescriptionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vertexBindingDescriptionCount(MemorySegment segment, long index) { return (int) VH_vertexBindingDescriptionCount.get(segment, 0L, index); } + /// {@return `vertexBindingDescriptionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vertexBindingDescriptionCount(MemorySegment segment) { return VkPipelineVertexInputStateCreateInfo.get_vertexBindingDescriptionCount(segment, 0L); } + /// {@return `vertexBindingDescriptionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int vertexBindingDescriptionCountAt(long index) { return VkPipelineVertexInputStateCreateInfo.get_vertexBindingDescriptionCount(this.segment(), index); } + /// {@return `vertexBindingDescriptionCount`} + public @CType("uint32_t") int vertexBindingDescriptionCount() { return VkPipelineVertexInputStateCreateInfo.get_vertexBindingDescriptionCount(this.segment()); } + /// Sets `vertexBindingDescriptionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexBindingDescriptionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vertexBindingDescriptionCount.set(segment, 0L, index, value); } + /// Sets `vertexBindingDescriptionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexBindingDescriptionCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineVertexInputStateCreateInfo.set_vertexBindingDescriptionCount(segment, 0L, value); } + /// Sets `vertexBindingDescriptionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo vertexBindingDescriptionCountAt(long index, @CType("uint32_t") int value) { VkPipelineVertexInputStateCreateInfo.set_vertexBindingDescriptionCount(this.segment(), index, value); return this; } + /// Sets `vertexBindingDescriptionCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo vertexBindingDescriptionCount(@CType("uint32_t") int value) { VkPipelineVertexInputStateCreateInfo.set_vertexBindingDescriptionCount(this.segment(), value); return this; } + + /// {@return `pVertexBindingDescriptions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVertexInputBindingDescription *") java.lang.foreign.MemorySegment get_pVertexBindingDescriptions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVertexBindingDescriptions.get(segment, 0L, index); } + /// {@return `pVertexBindingDescriptions`} + /// @param segment the segment of the struct + public static @CType("const VkVertexInputBindingDescription *") java.lang.foreign.MemorySegment get_pVertexBindingDescriptions(MemorySegment segment) { return VkPipelineVertexInputStateCreateInfo.get_pVertexBindingDescriptions(segment, 0L); } + /// {@return `pVertexBindingDescriptions` at the given index} + /// @param index the index + public @CType("const VkVertexInputBindingDescription *") java.lang.foreign.MemorySegment pVertexBindingDescriptionsAt(long index) { return VkPipelineVertexInputStateCreateInfo.get_pVertexBindingDescriptions(this.segment(), index); } + /// {@return `pVertexBindingDescriptions`} + public @CType("const VkVertexInputBindingDescription *") java.lang.foreign.MemorySegment pVertexBindingDescriptions() { return VkPipelineVertexInputStateCreateInfo.get_pVertexBindingDescriptions(this.segment()); } + /// Sets `pVertexBindingDescriptions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVertexBindingDescriptions(MemorySegment segment, long index, @CType("const VkVertexInputBindingDescription *") java.lang.foreign.MemorySegment value) { VH_pVertexBindingDescriptions.set(segment, 0L, index, value); } + /// Sets `pVertexBindingDescriptions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVertexBindingDescriptions(MemorySegment segment, @CType("const VkVertexInputBindingDescription *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputStateCreateInfo.set_pVertexBindingDescriptions(segment, 0L, value); } + /// Sets `pVertexBindingDescriptions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo pVertexBindingDescriptionsAt(long index, @CType("const VkVertexInputBindingDescription *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputStateCreateInfo.set_pVertexBindingDescriptions(this.segment(), index, value); return this; } + /// Sets `pVertexBindingDescriptions` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo pVertexBindingDescriptions(@CType("const VkVertexInputBindingDescription *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputStateCreateInfo.set_pVertexBindingDescriptions(this.segment(), value); return this; } + + /// {@return `vertexAttributeDescriptionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vertexAttributeDescriptionCount(MemorySegment segment, long index) { return (int) VH_vertexAttributeDescriptionCount.get(segment, 0L, index); } + /// {@return `vertexAttributeDescriptionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vertexAttributeDescriptionCount(MemorySegment segment) { return VkPipelineVertexInputStateCreateInfo.get_vertexAttributeDescriptionCount(segment, 0L); } + /// {@return `vertexAttributeDescriptionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int vertexAttributeDescriptionCountAt(long index) { return VkPipelineVertexInputStateCreateInfo.get_vertexAttributeDescriptionCount(this.segment(), index); } + /// {@return `vertexAttributeDescriptionCount`} + public @CType("uint32_t") int vertexAttributeDescriptionCount() { return VkPipelineVertexInputStateCreateInfo.get_vertexAttributeDescriptionCount(this.segment()); } + /// Sets `vertexAttributeDescriptionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vertexAttributeDescriptionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vertexAttributeDescriptionCount.set(segment, 0L, index, value); } + /// Sets `vertexAttributeDescriptionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vertexAttributeDescriptionCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineVertexInputStateCreateInfo.set_vertexAttributeDescriptionCount(segment, 0L, value); } + /// Sets `vertexAttributeDescriptionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo vertexAttributeDescriptionCountAt(long index, @CType("uint32_t") int value) { VkPipelineVertexInputStateCreateInfo.set_vertexAttributeDescriptionCount(this.segment(), index, value); return this; } + /// Sets `vertexAttributeDescriptionCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo vertexAttributeDescriptionCount(@CType("uint32_t") int value) { VkPipelineVertexInputStateCreateInfo.set_vertexAttributeDescriptionCount(this.segment(), value); return this; } + + /// {@return `pVertexAttributeDescriptions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkVertexInputAttributeDescription *") java.lang.foreign.MemorySegment get_pVertexAttributeDescriptions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pVertexAttributeDescriptions.get(segment, 0L, index); } + /// {@return `pVertexAttributeDescriptions`} + /// @param segment the segment of the struct + public static @CType("const VkVertexInputAttributeDescription *") java.lang.foreign.MemorySegment get_pVertexAttributeDescriptions(MemorySegment segment) { return VkPipelineVertexInputStateCreateInfo.get_pVertexAttributeDescriptions(segment, 0L); } + /// {@return `pVertexAttributeDescriptions` at the given index} + /// @param index the index + public @CType("const VkVertexInputAttributeDescription *") java.lang.foreign.MemorySegment pVertexAttributeDescriptionsAt(long index) { return VkPipelineVertexInputStateCreateInfo.get_pVertexAttributeDescriptions(this.segment(), index); } + /// {@return `pVertexAttributeDescriptions`} + public @CType("const VkVertexInputAttributeDescription *") java.lang.foreign.MemorySegment pVertexAttributeDescriptions() { return VkPipelineVertexInputStateCreateInfo.get_pVertexAttributeDescriptions(this.segment()); } + /// Sets `pVertexAttributeDescriptions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pVertexAttributeDescriptions(MemorySegment segment, long index, @CType("const VkVertexInputAttributeDescription *") java.lang.foreign.MemorySegment value) { VH_pVertexAttributeDescriptions.set(segment, 0L, index, value); } + /// Sets `pVertexAttributeDescriptions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pVertexAttributeDescriptions(MemorySegment segment, @CType("const VkVertexInputAttributeDescription *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputStateCreateInfo.set_pVertexAttributeDescriptions(segment, 0L, value); } + /// Sets `pVertexAttributeDescriptions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo pVertexAttributeDescriptionsAt(long index, @CType("const VkVertexInputAttributeDescription *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputStateCreateInfo.set_pVertexAttributeDescriptions(this.segment(), index, value); return this; } + /// Sets `pVertexAttributeDescriptions` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineVertexInputStateCreateInfo pVertexAttributeDescriptions(@CType("const VkVertexInputAttributeDescription *") java.lang.foreign.MemorySegment value) { VkPipelineVertexInputStateCreateInfo.set_pVertexAttributeDescriptions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineViewportStateCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineViewportStateCreateInfo.java new file mode 100644 index 00000000..246586ff --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPipelineViewportStateCreateInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### viewportCount +/// [VarHandle][#VH_viewportCount] - [Getter][#viewportCount()] - [Setter][#viewportCount(int)] +/// ### pViewports +/// [VarHandle][#VH_pViewports] - [Getter][#pViewports()] - [Setter][#pViewports(java.lang.foreign.MemorySegment)] +/// ### scissorCount +/// [VarHandle][#VH_scissorCount] - [Getter][#scissorCount()] - [Setter][#scissorCount(int)] +/// ### pScissors +/// [VarHandle][#VH_pScissors] - [Getter][#pScissors()] - [Setter][#pScissors(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPipelineViewportStateCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineViewportStateCreateFlags flags; +/// uint32_t viewportCount; +/// const VkViewport * pViewports; +/// uint32_t scissorCount; +/// const VkRect2D * pScissors; +/// } VkPipelineViewportStateCreateInfo; +/// ``` +public final class VkPipelineViewportStateCreateInfo extends Struct { + /// The struct layout of `VkPipelineViewportStateCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("viewportCount"), + ValueLayout.ADDRESS.withName("pViewports"), + ValueLayout.JAVA_INT.withName("scissorCount"), + ValueLayout.ADDRESS.withName("pScissors") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `viewportCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewportCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewportCount")); + /// The [VarHandle] of `pViewports` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pViewports = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pViewports")); + /// The [VarHandle] of `scissorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_scissorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scissorCount")); + /// The [VarHandle] of `pScissors` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pScissors = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pScissors")); + + /// Creates `VkPipelineViewportStateCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPipelineViewportStateCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPipelineViewportStateCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportStateCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportStateCreateInfo(segment); } + + /// Creates `VkPipelineViewportStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportStateCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPipelineViewportStateCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPipelineViewportStateCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPipelineViewportStateCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPipelineViewportStateCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPipelineViewportStateCreateInfo` + public static VkPipelineViewportStateCreateInfo alloc(SegmentAllocator allocator) { return new VkPipelineViewportStateCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPipelineViewportStateCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPipelineViewportStateCreateInfo` + public static VkPipelineViewportStateCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPipelineViewportStateCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPipelineViewportStateCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPipelineViewportStateCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPipelineViewportStateCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPipelineViewportStateCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPipelineViewportStateCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo sType(@CType("VkStructureType") int value) { VkPipelineViewportStateCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPipelineViewportStateCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPipelineViewportStateCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPipelineViewportStateCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportStateCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportStateCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPipelineViewportStateCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineViewportStateCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPipelineViewportStateCreateFlags") int get_flags(MemorySegment segment) { return VkPipelineViewportStateCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPipelineViewportStateCreateFlags") int flagsAt(long index) { return VkPipelineViewportStateCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPipelineViewportStateCreateFlags") int flags() { return VkPipelineViewportStateCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPipelineViewportStateCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPipelineViewportStateCreateFlags") int value) { VkPipelineViewportStateCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo flagsAt(long index, @CType("VkPipelineViewportStateCreateFlags") int value) { VkPipelineViewportStateCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo flags(@CType("VkPipelineViewportStateCreateFlags") int value) { VkPipelineViewportStateCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `viewportCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewportCount(MemorySegment segment, long index) { return (int) VH_viewportCount.get(segment, 0L, index); } + /// {@return `viewportCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewportCount(MemorySegment segment) { return VkPipelineViewportStateCreateInfo.get_viewportCount(segment, 0L); } + /// {@return `viewportCount` at the given index} + /// @param index the index + public @CType("uint32_t") int viewportCountAt(long index) { return VkPipelineViewportStateCreateInfo.get_viewportCount(this.segment(), index); } + /// {@return `viewportCount`} + public @CType("uint32_t") int viewportCount() { return VkPipelineViewportStateCreateInfo.get_viewportCount(this.segment()); } + /// Sets `viewportCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewportCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewportCount.set(segment, 0L, index, value); } + /// Sets `viewportCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewportCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineViewportStateCreateInfo.set_viewportCount(segment, 0L, value); } + /// Sets `viewportCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo viewportCountAt(long index, @CType("uint32_t") int value) { VkPipelineViewportStateCreateInfo.set_viewportCount(this.segment(), index, value); return this; } + /// Sets `viewportCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo viewportCount(@CType("uint32_t") int value) { VkPipelineViewportStateCreateInfo.set_viewportCount(this.segment(), value); return this; } + + /// {@return `pViewports` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkViewport *") java.lang.foreign.MemorySegment get_pViewports(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pViewports.get(segment, 0L, index); } + /// {@return `pViewports`} + /// @param segment the segment of the struct + public static @CType("const VkViewport *") java.lang.foreign.MemorySegment get_pViewports(MemorySegment segment) { return VkPipelineViewportStateCreateInfo.get_pViewports(segment, 0L); } + /// {@return `pViewports` at the given index} + /// @param index the index + public @CType("const VkViewport *") java.lang.foreign.MemorySegment pViewportsAt(long index) { return VkPipelineViewportStateCreateInfo.get_pViewports(this.segment(), index); } + /// {@return `pViewports`} + public @CType("const VkViewport *") java.lang.foreign.MemorySegment pViewports() { return VkPipelineViewportStateCreateInfo.get_pViewports(this.segment()); } + /// Sets `pViewports` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pViewports(MemorySegment segment, long index, @CType("const VkViewport *") java.lang.foreign.MemorySegment value) { VH_pViewports.set(segment, 0L, index, value); } + /// Sets `pViewports` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pViewports(MemorySegment segment, @CType("const VkViewport *") java.lang.foreign.MemorySegment value) { VkPipelineViewportStateCreateInfo.set_pViewports(segment, 0L, value); } + /// Sets `pViewports` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo pViewportsAt(long index, @CType("const VkViewport *") java.lang.foreign.MemorySegment value) { VkPipelineViewportStateCreateInfo.set_pViewports(this.segment(), index, value); return this; } + /// Sets `pViewports` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo pViewports(@CType("const VkViewport *") java.lang.foreign.MemorySegment value) { VkPipelineViewportStateCreateInfo.set_pViewports(this.segment(), value); return this; } + + /// {@return `scissorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_scissorCount(MemorySegment segment, long index) { return (int) VH_scissorCount.get(segment, 0L, index); } + /// {@return `scissorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_scissorCount(MemorySegment segment) { return VkPipelineViewportStateCreateInfo.get_scissorCount(segment, 0L); } + /// {@return `scissorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int scissorCountAt(long index) { return VkPipelineViewportStateCreateInfo.get_scissorCount(this.segment(), index); } + /// {@return `scissorCount`} + public @CType("uint32_t") int scissorCount() { return VkPipelineViewportStateCreateInfo.get_scissorCount(this.segment()); } + /// Sets `scissorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scissorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_scissorCount.set(segment, 0L, index, value); } + /// Sets `scissorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scissorCount(MemorySegment segment, @CType("uint32_t") int value) { VkPipelineViewportStateCreateInfo.set_scissorCount(segment, 0L, value); } + /// Sets `scissorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo scissorCountAt(long index, @CType("uint32_t") int value) { VkPipelineViewportStateCreateInfo.set_scissorCount(this.segment(), index, value); return this; } + /// Sets `scissorCount` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo scissorCount(@CType("uint32_t") int value) { VkPipelineViewportStateCreateInfo.set_scissorCount(this.segment(), value); return this; } + + /// {@return `pScissors` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pScissors(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pScissors.get(segment, 0L, index); } + /// {@return `pScissors`} + /// @param segment the segment of the struct + public static @CType("const VkRect2D *") java.lang.foreign.MemorySegment get_pScissors(MemorySegment segment) { return VkPipelineViewportStateCreateInfo.get_pScissors(segment, 0L); } + /// {@return `pScissors` at the given index} + /// @param index the index + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pScissorsAt(long index) { return VkPipelineViewportStateCreateInfo.get_pScissors(this.segment(), index); } + /// {@return `pScissors`} + public @CType("const VkRect2D *") java.lang.foreign.MemorySegment pScissors() { return VkPipelineViewportStateCreateInfo.get_pScissors(this.segment()); } + /// Sets `pScissors` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pScissors(MemorySegment segment, long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VH_pScissors.set(segment, 0L, index, value); } + /// Sets `pScissors` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pScissors(MemorySegment segment, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkPipelineViewportStateCreateInfo.set_pScissors(segment, 0L, value); } + /// Sets `pScissors` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo pScissorsAt(long index, @CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkPipelineViewportStateCreateInfo.set_pScissors(this.segment(), index, value); return this; } + /// Sets `pScissors` with the given value. + /// @param value the value + /// @return `this` + public VkPipelineViewportStateCreateInfo pScissors(@CType("const VkRect2D *") java.lang.foreign.MemorySegment value) { VkPipelineViewportStateCreateInfo.set_pScissors(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPrivateDataSlotCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPrivateDataSlotCreateInfo.java new file mode 100644 index 00000000..4167b0ad --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPrivateDataSlotCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPrivateDataSlotCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPrivateDataSlotCreateFlags flags; +/// } VkPrivateDataSlotCreateInfo; +/// ``` +public final class VkPrivateDataSlotCreateInfo extends Struct { + /// The struct layout of `VkPrivateDataSlotCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkPrivateDataSlotCreateInfo` with the given segment. + /// @param segment the memory segment + public VkPrivateDataSlotCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPrivateDataSlotCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPrivateDataSlotCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPrivateDataSlotCreateInfo(segment); } + + /// Creates `VkPrivateDataSlotCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPrivateDataSlotCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPrivateDataSlotCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPrivateDataSlotCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPrivateDataSlotCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPrivateDataSlotCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPrivateDataSlotCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPrivateDataSlotCreateInfo` + public static VkPrivateDataSlotCreateInfo alloc(SegmentAllocator allocator) { return new VkPrivateDataSlotCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPrivateDataSlotCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPrivateDataSlotCreateInfo` + public static VkPrivateDataSlotCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkPrivateDataSlotCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPrivateDataSlotCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPrivateDataSlotCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPrivateDataSlotCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPrivateDataSlotCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPrivateDataSlotCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPrivateDataSlotCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPrivateDataSlotCreateInfo sType(@CType("VkStructureType") int value) { VkPrivateDataSlotCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPrivateDataSlotCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPrivateDataSlotCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPrivateDataSlotCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPrivateDataSlotCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPrivateDataSlotCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPrivateDataSlotCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPrivateDataSlotCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPrivateDataSlotCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPrivateDataSlotCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkPrivateDataSlotCreateFlags") int get_flags(MemorySegment segment) { return VkPrivateDataSlotCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkPrivateDataSlotCreateFlags") int flagsAt(long index) { return VkPrivateDataSlotCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkPrivateDataSlotCreateFlags") int flags() { return VkPrivateDataSlotCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkPrivateDataSlotCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkPrivateDataSlotCreateFlags") int value) { VkPrivateDataSlotCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPrivateDataSlotCreateInfo flagsAt(long index, @CType("VkPrivateDataSlotCreateFlags") int value) { VkPrivateDataSlotCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkPrivateDataSlotCreateInfo flags(@CType("VkPrivateDataSlotCreateFlags") int value) { VkPrivateDataSlotCreateInfo.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkProtectedSubmitInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkProtectedSubmitInfo.java new file mode 100644 index 00000000..f71ca9ce --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkProtectedSubmitInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### protectedSubmit +/// [VarHandle][#VH_protectedSubmit] - [Getter][#protectedSubmit()] - [Setter][#protectedSubmit(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkProtectedSubmitInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkBool32 protectedSubmit; +/// } VkProtectedSubmitInfo; +/// ``` +public final class VkProtectedSubmitInfo extends Struct { + /// The struct layout of `VkProtectedSubmitInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("protectedSubmit") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `protectedSubmit` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_protectedSubmit = LAYOUT.arrayElementVarHandle(PathElement.groupElement("protectedSubmit")); + + /// Creates `VkProtectedSubmitInfo` with the given segment. + /// @param segment the memory segment + public VkProtectedSubmitInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkProtectedSubmitInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkProtectedSubmitInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkProtectedSubmitInfo(segment); } + + /// Creates `VkProtectedSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkProtectedSubmitInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkProtectedSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkProtectedSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkProtectedSubmitInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkProtectedSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkProtectedSubmitInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkProtectedSubmitInfo` + public static VkProtectedSubmitInfo alloc(SegmentAllocator allocator) { return new VkProtectedSubmitInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkProtectedSubmitInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkProtectedSubmitInfo` + public static VkProtectedSubmitInfo alloc(SegmentAllocator allocator, long count) { return new VkProtectedSubmitInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkProtectedSubmitInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkProtectedSubmitInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkProtectedSubmitInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkProtectedSubmitInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkProtectedSubmitInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkProtectedSubmitInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkProtectedSubmitInfo sType(@CType("VkStructureType") int value) { VkProtectedSubmitInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkProtectedSubmitInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkProtectedSubmitInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkProtectedSubmitInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkProtectedSubmitInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkProtectedSubmitInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkProtectedSubmitInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkProtectedSubmitInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkProtectedSubmitInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `protectedSubmit` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_protectedSubmit(MemorySegment segment, long index) { return (int) VH_protectedSubmit.get(segment, 0L, index); } + /// {@return `protectedSubmit`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_protectedSubmit(MemorySegment segment) { return VkProtectedSubmitInfo.get_protectedSubmit(segment, 0L); } + /// {@return `protectedSubmit` at the given index} + /// @param index the index + public @CType("VkBool32") int protectedSubmitAt(long index) { return VkProtectedSubmitInfo.get_protectedSubmit(this.segment(), index); } + /// {@return `protectedSubmit`} + public @CType("VkBool32") int protectedSubmit() { return VkProtectedSubmitInfo.get_protectedSubmit(this.segment()); } + /// Sets `protectedSubmit` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_protectedSubmit(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_protectedSubmit.set(segment, 0L, index, value); } + /// Sets `protectedSubmit` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_protectedSubmit(MemorySegment segment, @CType("VkBool32") int value) { VkProtectedSubmitInfo.set_protectedSubmit(segment, 0L, value); } + /// Sets `protectedSubmit` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkProtectedSubmitInfo protectedSubmitAt(long index, @CType("VkBool32") int value) { VkProtectedSubmitInfo.set_protectedSubmit(this.segment(), index, value); return this; } + /// Sets `protectedSubmit` with the given value. + /// @param value the value + /// @return `this` + public VkProtectedSubmitInfo protectedSubmit(@CType("VkBool32") int value) { VkProtectedSubmitInfo.set_protectedSubmit(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushConstantRange.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushConstantRange.java new file mode 100644 index 00000000..db0c6175 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushConstantRange.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### stageFlags +/// [VarHandle][#VH_stageFlags] - [Getter][#stageFlags()] - [Setter][#stageFlags(int)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(int)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPushConstantRange { +/// VkShaderStageFlags stageFlags; +/// uint32_t offset; +/// uint32_t size; +/// } VkPushConstantRange; +/// ``` +public final class VkPushConstantRange extends Struct { + /// The struct layout of `VkPushConstantRange`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("stageFlags"), + ValueLayout.JAVA_INT.withName("offset"), + ValueLayout.JAVA_INT.withName("size") + ); + /// The [VarHandle] of `stageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageFlags")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkPushConstantRange` with the given segment. + /// @param segment the memory segment + public VkPushConstantRange(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPushConstantRange` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushConstantRange of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPushConstantRange(segment); } + + /// Creates `VkPushConstantRange` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushConstantRange ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPushConstantRange(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPushConstantRange` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushConstantRange ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPushConstantRange(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPushConstantRange` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPushConstantRange` + public static VkPushConstantRange alloc(SegmentAllocator allocator) { return new VkPushConstantRange(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPushConstantRange` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPushConstantRange` + public static VkPushConstantRange alloc(SegmentAllocator allocator, long count) { return new VkPushConstantRange(allocator.allocate(LAYOUT, count)); } + + /// {@return `stageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment, long index) { return (int) VH_stageFlags.get(segment, 0L, index); } + /// {@return `stageFlags`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment) { return VkPushConstantRange.get_stageFlags(segment, 0L); } + /// {@return `stageFlags` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int stageFlagsAt(long index) { return VkPushConstantRange.get_stageFlags(this.segment(), index); } + /// {@return `stageFlags`} + public @CType("VkShaderStageFlags") int stageFlags() { return VkPushConstantRange.get_stageFlags(this.segment()); } + /// Sets `stageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageFlags(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_stageFlags.set(segment, 0L, index, value); } + /// Sets `stageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageFlags(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPushConstantRange.set_stageFlags(segment, 0L, value); } + /// Sets `stageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushConstantRange stageFlagsAt(long index, @CType("VkShaderStageFlags") int value) { VkPushConstantRange.set_stageFlags(this.segment(), index, value); return this; } + /// Sets `stageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkPushConstantRange stageFlags(@CType("VkShaderStageFlags") int value) { VkPushConstantRange.set_stageFlags(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_offset(MemorySegment segment, long index) { return (int) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_offset(MemorySegment segment) { return VkPushConstantRange.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("uint32_t") int offsetAt(long index) { return VkPushConstantRange.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("uint32_t") int offset() { return VkPushConstantRange.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("uint32_t") int value) { VkPushConstantRange.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushConstantRange offsetAt(long index, @CType("uint32_t") int value) { VkPushConstantRange.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkPushConstantRange offset(@CType("uint32_t") int value) { VkPushConstantRange.set_offset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_size(MemorySegment segment, long index) { return (int) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_size(MemorySegment segment) { return VkPushConstantRange.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("uint32_t") int sizeAt(long index) { return VkPushConstantRange.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("uint32_t") int size() { return VkPushConstantRange.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("uint32_t") int value) { VkPushConstantRange.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushConstantRange sizeAt(long index, @CType("uint32_t") int value) { VkPushConstantRange.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkPushConstantRange size(@CType("uint32_t") int value) { VkPushConstantRange.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushConstantsInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushConstantsInfo.java new file mode 100644 index 00000000..7026fcf6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushConstantsInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### stageFlags +/// [VarHandle][#VH_stageFlags] - [Getter][#stageFlags()] - [Setter][#stageFlags(int)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(int)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(int)] +/// ### pValues +/// [VarHandle][#VH_pValues] - [Getter][#pValues()] - [Setter][#pValues(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPushConstantsInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkPipelineLayout layout; +/// VkShaderStageFlags stageFlags; +/// uint32_t offset; +/// uint32_t size; +/// const void * pValues; +/// } VkPushConstantsInfo; +/// ``` +public final class VkPushConstantsInfo extends Struct { + /// The struct layout of `VkPushConstantsInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.JAVA_INT.withName("stageFlags"), + ValueLayout.JAVA_INT.withName("offset"), + ValueLayout.JAVA_INT.withName("size"), + ValueLayout.ADDRESS.withName("pValues") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `stageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageFlags")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `pValues` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pValues = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pValues")); + + /// Creates `VkPushConstantsInfo` with the given segment. + /// @param segment the memory segment + public VkPushConstantsInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPushConstantsInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushConstantsInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPushConstantsInfo(segment); } + + /// Creates `VkPushConstantsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushConstantsInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPushConstantsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPushConstantsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushConstantsInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPushConstantsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPushConstantsInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPushConstantsInfo` + public static VkPushConstantsInfo alloc(SegmentAllocator allocator) { return new VkPushConstantsInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPushConstantsInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPushConstantsInfo` + public static VkPushConstantsInfo alloc(SegmentAllocator allocator, long count) { return new VkPushConstantsInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPushConstantsInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPushConstantsInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPushConstantsInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPushConstantsInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushConstantsInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPushConstantsInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPushConstantsInfo sType(@CType("VkStructureType") int value) { VkPushConstantsInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPushConstantsInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPushConstantsInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPushConstantsInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPushConstantsInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushConstantsInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPushConstantsInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPushConstantsInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPushConstantsInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkPushConstantsInfo.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkPushConstantsInfo.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkPushConstantsInfo.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkPushConstantsInfo.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushConstantsInfo layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkPushConstantsInfo.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkPushConstantsInfo layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkPushConstantsInfo.set_layout(this.segment(), value); return this; } + + /// {@return `stageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment, long index) { return (int) VH_stageFlags.get(segment, 0L, index); } + /// {@return `stageFlags`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment) { return VkPushConstantsInfo.get_stageFlags(segment, 0L); } + /// {@return `stageFlags` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int stageFlagsAt(long index) { return VkPushConstantsInfo.get_stageFlags(this.segment(), index); } + /// {@return `stageFlags`} + public @CType("VkShaderStageFlags") int stageFlags() { return VkPushConstantsInfo.get_stageFlags(this.segment()); } + /// Sets `stageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageFlags(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_stageFlags.set(segment, 0L, index, value); } + /// Sets `stageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageFlags(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPushConstantsInfo.set_stageFlags(segment, 0L, value); } + /// Sets `stageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushConstantsInfo stageFlagsAt(long index, @CType("VkShaderStageFlags") int value) { VkPushConstantsInfo.set_stageFlags(this.segment(), index, value); return this; } + /// Sets `stageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkPushConstantsInfo stageFlags(@CType("VkShaderStageFlags") int value) { VkPushConstantsInfo.set_stageFlags(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_offset(MemorySegment segment, long index) { return (int) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_offset(MemorySegment segment) { return VkPushConstantsInfo.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("uint32_t") int offsetAt(long index) { return VkPushConstantsInfo.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("uint32_t") int offset() { return VkPushConstantsInfo.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("uint32_t") int value) { VkPushConstantsInfo.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushConstantsInfo offsetAt(long index, @CType("uint32_t") int value) { VkPushConstantsInfo.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkPushConstantsInfo offset(@CType("uint32_t") int value) { VkPushConstantsInfo.set_offset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_size(MemorySegment segment, long index) { return (int) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_size(MemorySegment segment) { return VkPushConstantsInfo.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("uint32_t") int sizeAt(long index) { return VkPushConstantsInfo.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("uint32_t") int size() { return VkPushConstantsInfo.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("uint32_t") int value) { VkPushConstantsInfo.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushConstantsInfo sizeAt(long index, @CType("uint32_t") int value) { VkPushConstantsInfo.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkPushConstantsInfo size(@CType("uint32_t") int value) { VkPushConstantsInfo.set_size(this.segment(), value); return this; } + + /// {@return `pValues` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pValues(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pValues.get(segment, 0L, index); } + /// {@return `pValues`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pValues(MemorySegment segment) { return VkPushConstantsInfo.get_pValues(segment, 0L); } + /// {@return `pValues` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pValuesAt(long index) { return VkPushConstantsInfo.get_pValues(this.segment(), index); } + /// {@return `pValues`} + public @CType("const void *") java.lang.foreign.MemorySegment pValues() { return VkPushConstantsInfo.get_pValues(this.segment()); } + /// Sets `pValues` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pValues(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pValues.set(segment, 0L, index, value); } + /// Sets `pValues` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pValues(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPushConstantsInfo.set_pValues(segment, 0L, value); } + /// Sets `pValues` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushConstantsInfo pValuesAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPushConstantsInfo.set_pValues(this.segment(), index, value); return this; } + /// Sets `pValues` with the given value. + /// @param value the value + /// @return `this` + public VkPushConstantsInfo pValues(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPushConstantsInfo.set_pValues(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushDescriptorSetInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushDescriptorSetInfo.java new file mode 100644 index 00000000..e003f947 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushDescriptorSetInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### stageFlags +/// [VarHandle][#VH_stageFlags] - [Getter][#stageFlags()] - [Setter][#stageFlags(int)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### set +/// [VarHandle][#VH_set] - [Getter][#set()] - [Setter][#set(int)] +/// ### descriptorWriteCount +/// [VarHandle][#VH_descriptorWriteCount] - [Getter][#descriptorWriteCount()] - [Setter][#descriptorWriteCount(int)] +/// ### pDescriptorWrites +/// [VarHandle][#VH_pDescriptorWrites] - [Getter][#pDescriptorWrites()] - [Setter][#pDescriptorWrites(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPushDescriptorSetInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkShaderStageFlags stageFlags; +/// VkPipelineLayout layout; +/// uint32_t set; +/// uint32_t descriptorWriteCount; +/// const VkWriteDescriptorSet * pDescriptorWrites; +/// } VkPushDescriptorSetInfo; +/// ``` +public final class VkPushDescriptorSetInfo extends Struct { + /// The struct layout of `VkPushDescriptorSetInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("stageFlags"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.JAVA_INT.withName("set"), + ValueLayout.JAVA_INT.withName("descriptorWriteCount"), + ValueLayout.ADDRESS.withName("pDescriptorWrites") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `stageFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stageFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageFlags")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `set` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_set = LAYOUT.arrayElementVarHandle(PathElement.groupElement("set")); + /// The [VarHandle] of `descriptorWriteCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorWriteCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorWriteCount")); + /// The [VarHandle] of `pDescriptorWrites` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDescriptorWrites = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDescriptorWrites")); + + /// Creates `VkPushDescriptorSetInfo` with the given segment. + /// @param segment the memory segment + public VkPushDescriptorSetInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPushDescriptorSetInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushDescriptorSetInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPushDescriptorSetInfo(segment); } + + /// Creates `VkPushDescriptorSetInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushDescriptorSetInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPushDescriptorSetInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPushDescriptorSetInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushDescriptorSetInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPushDescriptorSetInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPushDescriptorSetInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPushDescriptorSetInfo` + public static VkPushDescriptorSetInfo alloc(SegmentAllocator allocator) { return new VkPushDescriptorSetInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPushDescriptorSetInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPushDescriptorSetInfo` + public static VkPushDescriptorSetInfo alloc(SegmentAllocator allocator, long count) { return new VkPushDescriptorSetInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPushDescriptorSetInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPushDescriptorSetInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPushDescriptorSetInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPushDescriptorSetInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPushDescriptorSetInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo sType(@CType("VkStructureType") int value) { VkPushDescriptorSetInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPushDescriptorSetInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPushDescriptorSetInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPushDescriptorSetInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `stageFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment, long index) { return (int) VH_stageFlags.get(segment, 0L, index); } + /// {@return `stageFlags`} + /// @param segment the segment of the struct + public static @CType("VkShaderStageFlags") int get_stageFlags(MemorySegment segment) { return VkPushDescriptorSetInfo.get_stageFlags(segment, 0L); } + /// {@return `stageFlags` at the given index} + /// @param index the index + public @CType("VkShaderStageFlags") int stageFlagsAt(long index) { return VkPushDescriptorSetInfo.get_stageFlags(this.segment(), index); } + /// {@return `stageFlags`} + public @CType("VkShaderStageFlags") int stageFlags() { return VkPushDescriptorSetInfo.get_stageFlags(this.segment()); } + /// Sets `stageFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageFlags(MemorySegment segment, long index, @CType("VkShaderStageFlags") int value) { VH_stageFlags.set(segment, 0L, index, value); } + /// Sets `stageFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageFlags(MemorySegment segment, @CType("VkShaderStageFlags") int value) { VkPushDescriptorSetInfo.set_stageFlags(segment, 0L, value); } + /// Sets `stageFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo stageFlagsAt(long index, @CType("VkShaderStageFlags") int value) { VkPushDescriptorSetInfo.set_stageFlags(this.segment(), index, value); return this; } + /// Sets `stageFlags` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo stageFlags(@CType("VkShaderStageFlags") int value) { VkPushDescriptorSetInfo.set_stageFlags(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkPushDescriptorSetInfo.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkPushDescriptorSetInfo.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkPushDescriptorSetInfo.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetInfo.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetInfo.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetInfo.set_layout(this.segment(), value); return this; } + + /// {@return `set` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_set(MemorySegment segment, long index) { return (int) VH_set.get(segment, 0L, index); } + /// {@return `set`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_set(MemorySegment segment) { return VkPushDescriptorSetInfo.get_set(segment, 0L); } + /// {@return `set` at the given index} + /// @param index the index + public @CType("uint32_t") int setAt(long index) { return VkPushDescriptorSetInfo.get_set(this.segment(), index); } + /// {@return `set`} + public @CType("uint32_t") int set() { return VkPushDescriptorSetInfo.get_set(this.segment()); } + /// Sets `set` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_set(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_set.set(segment, 0L, index, value); } + /// Sets `set` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_set(MemorySegment segment, @CType("uint32_t") int value) { VkPushDescriptorSetInfo.set_set(segment, 0L, value); } + /// Sets `set` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo setAt(long index, @CType("uint32_t") int value) { VkPushDescriptorSetInfo.set_set(this.segment(), index, value); return this; } + /// Sets `set` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo set(@CType("uint32_t") int value) { VkPushDescriptorSetInfo.set_set(this.segment(), value); return this; } + + /// {@return `descriptorWriteCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorWriteCount(MemorySegment segment, long index) { return (int) VH_descriptorWriteCount.get(segment, 0L, index); } + /// {@return `descriptorWriteCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorWriteCount(MemorySegment segment) { return VkPushDescriptorSetInfo.get_descriptorWriteCount(segment, 0L); } + /// {@return `descriptorWriteCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorWriteCountAt(long index) { return VkPushDescriptorSetInfo.get_descriptorWriteCount(this.segment(), index); } + /// {@return `descriptorWriteCount`} + public @CType("uint32_t") int descriptorWriteCount() { return VkPushDescriptorSetInfo.get_descriptorWriteCount(this.segment()); } + /// Sets `descriptorWriteCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorWriteCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorWriteCount.set(segment, 0L, index, value); } + /// Sets `descriptorWriteCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorWriteCount(MemorySegment segment, @CType("uint32_t") int value) { VkPushDescriptorSetInfo.set_descriptorWriteCount(segment, 0L, value); } + /// Sets `descriptorWriteCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo descriptorWriteCountAt(long index, @CType("uint32_t") int value) { VkPushDescriptorSetInfo.set_descriptorWriteCount(this.segment(), index, value); return this; } + /// Sets `descriptorWriteCount` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo descriptorWriteCount(@CType("uint32_t") int value) { VkPushDescriptorSetInfo.set_descriptorWriteCount(this.segment(), value); return this; } + + /// {@return `pDescriptorWrites` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkWriteDescriptorSet *") java.lang.foreign.MemorySegment get_pDescriptorWrites(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDescriptorWrites.get(segment, 0L, index); } + /// {@return `pDescriptorWrites`} + /// @param segment the segment of the struct + public static @CType("const VkWriteDescriptorSet *") java.lang.foreign.MemorySegment get_pDescriptorWrites(MemorySegment segment) { return VkPushDescriptorSetInfo.get_pDescriptorWrites(segment, 0L); } + /// {@return `pDescriptorWrites` at the given index} + /// @param index the index + public @CType("const VkWriteDescriptorSet *") java.lang.foreign.MemorySegment pDescriptorWritesAt(long index) { return VkPushDescriptorSetInfo.get_pDescriptorWrites(this.segment(), index); } + /// {@return `pDescriptorWrites`} + public @CType("const VkWriteDescriptorSet *") java.lang.foreign.MemorySegment pDescriptorWrites() { return VkPushDescriptorSetInfo.get_pDescriptorWrites(this.segment()); } + /// Sets `pDescriptorWrites` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDescriptorWrites(MemorySegment segment, long index, @CType("const VkWriteDescriptorSet *") java.lang.foreign.MemorySegment value) { VH_pDescriptorWrites.set(segment, 0L, index, value); } + /// Sets `pDescriptorWrites` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDescriptorWrites(MemorySegment segment, @CType("const VkWriteDescriptorSet *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetInfo.set_pDescriptorWrites(segment, 0L, value); } + /// Sets `pDescriptorWrites` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo pDescriptorWritesAt(long index, @CType("const VkWriteDescriptorSet *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetInfo.set_pDescriptorWrites(this.segment(), index, value); return this; } + /// Sets `pDescriptorWrites` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetInfo pDescriptorWrites(@CType("const VkWriteDescriptorSet *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetInfo.set_pDescriptorWrites(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushDescriptorSetWithTemplateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushDescriptorSetWithTemplateInfo.java new file mode 100644 index 00000000..f8427200 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkPushDescriptorSetWithTemplateInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### descriptorUpdateTemplate +/// [VarHandle][#VH_descriptorUpdateTemplate] - [Getter][#descriptorUpdateTemplate()] - [Setter][#descriptorUpdateTemplate(java.lang.foreign.MemorySegment)] +/// ### layout +/// [VarHandle][#VH_layout] - [Getter][#layout()] - [Setter][#layout(java.lang.foreign.MemorySegment)] +/// ### set +/// [VarHandle][#VH_set] - [Getter][#set()] - [Setter][#set(int)] +/// ### pData +/// [VarHandle][#VH_pData] - [Getter][#pData()] - [Setter][#pData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPushDescriptorSetWithTemplateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkDescriptorUpdateTemplate descriptorUpdateTemplate; +/// VkPipelineLayout layout; +/// uint32_t set; +/// const void * pData; +/// } VkPushDescriptorSetWithTemplateInfo; +/// ``` +public final class VkPushDescriptorSetWithTemplateInfo extends Struct { + /// The struct layout of `VkPushDescriptorSetWithTemplateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("descriptorUpdateTemplate"), + ValueLayout.ADDRESS.withName("layout"), + ValueLayout.JAVA_INT.withName("set"), + ValueLayout.ADDRESS.withName("pData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `descriptorUpdateTemplate` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_descriptorUpdateTemplate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorUpdateTemplate")); + /// The [VarHandle] of `layout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_layout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layout")); + /// The [VarHandle] of `set` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_set = LAYOUT.arrayElementVarHandle(PathElement.groupElement("set")); + /// The [VarHandle] of `pData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pData")); + + /// Creates `VkPushDescriptorSetWithTemplateInfo` with the given segment. + /// @param segment the memory segment + public VkPushDescriptorSetWithTemplateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPushDescriptorSetWithTemplateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushDescriptorSetWithTemplateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPushDescriptorSetWithTemplateInfo(segment); } + + /// Creates `VkPushDescriptorSetWithTemplateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushDescriptorSetWithTemplateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPushDescriptorSetWithTemplateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPushDescriptorSetWithTemplateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPushDescriptorSetWithTemplateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPushDescriptorSetWithTemplateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPushDescriptorSetWithTemplateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPushDescriptorSetWithTemplateInfo` + public static VkPushDescriptorSetWithTemplateInfo alloc(SegmentAllocator allocator) { return new VkPushDescriptorSetWithTemplateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPushDescriptorSetWithTemplateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPushDescriptorSetWithTemplateInfo` + public static VkPushDescriptorSetWithTemplateInfo alloc(SegmentAllocator allocator, long count) { return new VkPushDescriptorSetWithTemplateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPushDescriptorSetWithTemplateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPushDescriptorSetWithTemplateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPushDescriptorSetWithTemplateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPushDescriptorSetWithTemplateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkPushDescriptorSetWithTemplateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo sType(@CType("VkStructureType") int value) { VkPushDescriptorSetWithTemplateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPushDescriptorSetWithTemplateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPushDescriptorSetWithTemplateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkPushDescriptorSetWithTemplateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `descriptorUpdateTemplate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorUpdateTemplate") java.lang.foreign.MemorySegment get_descriptorUpdateTemplate(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_descriptorUpdateTemplate.get(segment, 0L, index); } + /// {@return `descriptorUpdateTemplate`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorUpdateTemplate") java.lang.foreign.MemorySegment get_descriptorUpdateTemplate(MemorySegment segment) { return VkPushDescriptorSetWithTemplateInfo.get_descriptorUpdateTemplate(segment, 0L); } + /// {@return `descriptorUpdateTemplate` at the given index} + /// @param index the index + public @CType("VkDescriptorUpdateTemplate") java.lang.foreign.MemorySegment descriptorUpdateTemplateAt(long index) { return VkPushDescriptorSetWithTemplateInfo.get_descriptorUpdateTemplate(this.segment(), index); } + /// {@return `descriptorUpdateTemplate`} + public @CType("VkDescriptorUpdateTemplate") java.lang.foreign.MemorySegment descriptorUpdateTemplate() { return VkPushDescriptorSetWithTemplateInfo.get_descriptorUpdateTemplate(this.segment()); } + /// Sets `descriptorUpdateTemplate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorUpdateTemplate(MemorySegment segment, long index, @CType("VkDescriptorUpdateTemplate") java.lang.foreign.MemorySegment value) { VH_descriptorUpdateTemplate.set(segment, 0L, index, value); } + /// Sets `descriptorUpdateTemplate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorUpdateTemplate(MemorySegment segment, @CType("VkDescriptorUpdateTemplate") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_descriptorUpdateTemplate(segment, 0L, value); } + /// Sets `descriptorUpdateTemplate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo descriptorUpdateTemplateAt(long index, @CType("VkDescriptorUpdateTemplate") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_descriptorUpdateTemplate(this.segment(), index, value); return this; } + /// Sets `descriptorUpdateTemplate` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo descriptorUpdateTemplate(@CType("VkDescriptorUpdateTemplate") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_descriptorUpdateTemplate(this.segment(), value); return this; } + + /// {@return `layout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_layout.get(segment, 0L, index); } + /// {@return `layout`} + /// @param segment the segment of the struct + public static @CType("VkPipelineLayout") java.lang.foreign.MemorySegment get_layout(MemorySegment segment) { return VkPushDescriptorSetWithTemplateInfo.get_layout(segment, 0L); } + /// {@return `layout` at the given index} + /// @param index the index + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layoutAt(long index) { return VkPushDescriptorSetWithTemplateInfo.get_layout(this.segment(), index); } + /// {@return `layout`} + public @CType("VkPipelineLayout") java.lang.foreign.MemorySegment layout() { return VkPushDescriptorSetWithTemplateInfo.get_layout(this.segment()); } + /// Sets `layout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layout(MemorySegment segment, long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VH_layout.set(segment, 0L, index, value); } + /// Sets `layout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layout(MemorySegment segment, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_layout(segment, 0L, value); } + /// Sets `layout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo layoutAt(long index, @CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_layout(this.segment(), index, value); return this; } + /// Sets `layout` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo layout(@CType("VkPipelineLayout") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_layout(this.segment(), value); return this; } + + /// {@return `set` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_set(MemorySegment segment, long index) { return (int) VH_set.get(segment, 0L, index); } + /// {@return `set`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_set(MemorySegment segment) { return VkPushDescriptorSetWithTemplateInfo.get_set(segment, 0L); } + /// {@return `set` at the given index} + /// @param index the index + public @CType("uint32_t") int setAt(long index) { return VkPushDescriptorSetWithTemplateInfo.get_set(this.segment(), index); } + /// {@return `set`} + public @CType("uint32_t") int set() { return VkPushDescriptorSetWithTemplateInfo.get_set(this.segment()); } + /// Sets `set` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_set(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_set.set(segment, 0L, index, value); } + /// Sets `set` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_set(MemorySegment segment, @CType("uint32_t") int value) { VkPushDescriptorSetWithTemplateInfo.set_set(segment, 0L, value); } + /// Sets `set` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo setAt(long index, @CType("uint32_t") int value) { VkPushDescriptorSetWithTemplateInfo.set_set(this.segment(), index, value); return this; } + /// Sets `set` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo set(@CType("uint32_t") int value) { VkPushDescriptorSetWithTemplateInfo.set_set(this.segment(), value); return this; } + + /// {@return `pData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pData.get(segment, 0L, index); } + /// {@return `pData`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment) { return VkPushDescriptorSetWithTemplateInfo.get_pData(segment, 0L); } + /// {@return `pData` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pDataAt(long index) { return VkPushDescriptorSetWithTemplateInfo.get_pData(this.segment(), index); } + /// {@return `pData`} + public @CType("const void *") java.lang.foreign.MemorySegment pData() { return VkPushDescriptorSetWithTemplateInfo.get_pData(this.segment()); } + /// Sets `pData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pData(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pData.set(segment, 0L, index, value); } + /// Sets `pData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pData(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_pData(segment, 0L, value); } + /// Sets `pData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo pDataAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_pData(this.segment(), index, value); return this; } + /// Sets `pData` with the given value. + /// @param value the value + /// @return `this` + public VkPushDescriptorSetWithTemplateInfo pData(@CType("const void *") java.lang.foreign.MemorySegment value) { VkPushDescriptorSetWithTemplateInfo.set_pData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueryPoolCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueryPoolCreateInfo.java new file mode 100644 index 00000000..00b7efc6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueryPoolCreateInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### queryType +/// [VarHandle][#VH_queryType] - [Getter][#queryType()] - [Setter][#queryType(int)] +/// ### queryCount +/// [VarHandle][#VH_queryCount] - [Getter][#queryCount()] - [Setter][#queryCount(int)] +/// ### pipelineStatistics +/// [VarHandle][#VH_pipelineStatistics] - [Getter][#pipelineStatistics()] - [Setter][#pipelineStatistics(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueryPoolCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkQueryPoolCreateFlags flags; +/// VkQueryType queryType; +/// uint32_t queryCount; +/// VkQueryPipelineStatisticFlags pipelineStatistics; +/// } VkQueryPoolCreateInfo; +/// ``` +public final class VkQueryPoolCreateInfo extends Struct { + /// The struct layout of `VkQueryPoolCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("queryType"), + ValueLayout.JAVA_INT.withName("queryCount"), + ValueLayout.JAVA_INT.withName("pipelineStatistics") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `queryType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queryType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queryType")); + /// The [VarHandle] of `queryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queryCount")); + /// The [VarHandle] of `pipelineStatistics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineStatistics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineStatistics")); + + /// Creates `VkQueryPoolCreateInfo` with the given segment. + /// @param segment the memory segment + public VkQueryPoolCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueryPoolCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolCreateInfo(segment); } + + /// Creates `VkQueryPoolCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueryPoolCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueryPoolCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueryPoolCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueryPoolCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueryPoolCreateInfo` + public static VkQueryPoolCreateInfo alloc(SegmentAllocator allocator) { return new VkQueryPoolCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueryPoolCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueryPoolCreateInfo` + public static VkQueryPoolCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkQueryPoolCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueryPoolCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueryPoolCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueryPoolCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueryPoolCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkQueryPoolCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo sType(@CType("VkStructureType") int value) { VkQueryPoolCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueryPoolCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueryPoolCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkQueryPoolCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkQueryPoolCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueryPoolCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkQueryPoolCreateFlags") int get_flags(MemorySegment segment) { return VkQueryPoolCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkQueryPoolCreateFlags") int flagsAt(long index) { return VkQueryPoolCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkQueryPoolCreateFlags") int flags() { return VkQueryPoolCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkQueryPoolCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkQueryPoolCreateFlags") int value) { VkQueryPoolCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo flagsAt(long index, @CType("VkQueryPoolCreateFlags") int value) { VkQueryPoolCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo flags(@CType("VkQueryPoolCreateFlags") int value) { VkQueryPoolCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `queryType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueryType") int get_queryType(MemorySegment segment, long index) { return (int) VH_queryType.get(segment, 0L, index); } + /// {@return `queryType`} + /// @param segment the segment of the struct + public static @CType("VkQueryType") int get_queryType(MemorySegment segment) { return VkQueryPoolCreateInfo.get_queryType(segment, 0L); } + /// {@return `queryType` at the given index} + /// @param index the index + public @CType("VkQueryType") int queryTypeAt(long index) { return VkQueryPoolCreateInfo.get_queryType(this.segment(), index); } + /// {@return `queryType`} + public @CType("VkQueryType") int queryType() { return VkQueryPoolCreateInfo.get_queryType(this.segment()); } + /// Sets `queryType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queryType(MemorySegment segment, long index, @CType("VkQueryType") int value) { VH_queryType.set(segment, 0L, index, value); } + /// Sets `queryType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queryType(MemorySegment segment, @CType("VkQueryType") int value) { VkQueryPoolCreateInfo.set_queryType(segment, 0L, value); } + /// Sets `queryType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo queryTypeAt(long index, @CType("VkQueryType") int value) { VkQueryPoolCreateInfo.set_queryType(this.segment(), index, value); return this; } + /// Sets `queryType` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo queryType(@CType("VkQueryType") int value) { VkQueryPoolCreateInfo.set_queryType(this.segment(), value); return this; } + + /// {@return `queryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queryCount(MemorySegment segment, long index) { return (int) VH_queryCount.get(segment, 0L, index); } + /// {@return `queryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queryCount(MemorySegment segment) { return VkQueryPoolCreateInfo.get_queryCount(segment, 0L); } + /// {@return `queryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queryCountAt(long index) { return VkQueryPoolCreateInfo.get_queryCount(this.segment(), index); } + /// {@return `queryCount`} + public @CType("uint32_t") int queryCount() { return VkQueryPoolCreateInfo.get_queryCount(this.segment()); } + /// Sets `queryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queryCount.set(segment, 0L, index, value); } + /// Sets `queryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queryCount(MemorySegment segment, @CType("uint32_t") int value) { VkQueryPoolCreateInfo.set_queryCount(segment, 0L, value); } + /// Sets `queryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo queryCountAt(long index, @CType("uint32_t") int value) { VkQueryPoolCreateInfo.set_queryCount(this.segment(), index, value); return this; } + /// Sets `queryCount` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo queryCount(@CType("uint32_t") int value) { VkQueryPoolCreateInfo.set_queryCount(this.segment(), value); return this; } + + /// {@return `pipelineStatistics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueryPipelineStatisticFlags") int get_pipelineStatistics(MemorySegment segment, long index) { return (int) VH_pipelineStatistics.get(segment, 0L, index); } + /// {@return `pipelineStatistics`} + /// @param segment the segment of the struct + public static @CType("VkQueryPipelineStatisticFlags") int get_pipelineStatistics(MemorySegment segment) { return VkQueryPoolCreateInfo.get_pipelineStatistics(segment, 0L); } + /// {@return `pipelineStatistics` at the given index} + /// @param index the index + public @CType("VkQueryPipelineStatisticFlags") int pipelineStatisticsAt(long index) { return VkQueryPoolCreateInfo.get_pipelineStatistics(this.segment(), index); } + /// {@return `pipelineStatistics`} + public @CType("VkQueryPipelineStatisticFlags") int pipelineStatistics() { return VkQueryPoolCreateInfo.get_pipelineStatistics(this.segment()); } + /// Sets `pipelineStatistics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineStatistics(MemorySegment segment, long index, @CType("VkQueryPipelineStatisticFlags") int value) { VH_pipelineStatistics.set(segment, 0L, index, value); } + /// Sets `pipelineStatistics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineStatistics(MemorySegment segment, @CType("VkQueryPipelineStatisticFlags") int value) { VkQueryPoolCreateInfo.set_pipelineStatistics(segment, 0L, value); } + /// Sets `pipelineStatistics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo pipelineStatisticsAt(long index, @CType("VkQueryPipelineStatisticFlags") int value) { VkQueryPoolCreateInfo.set_pipelineStatistics(this.segment(), index, value); return this; } + /// Sets `pipelineStatistics` with the given value. + /// @param value the value + /// @return `this` + public VkQueryPoolCreateInfo pipelineStatistics(@CType("VkQueryPipelineStatisticFlags") int value) { VkQueryPoolCreateInfo.set_pipelineStatistics(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueueFamilyGlobalPriorityProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueueFamilyGlobalPriorityProperties.java new file mode 100644 index 00000000..56f5d3f4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueueFamilyGlobalPriorityProperties.java @@ -0,0 +1,239 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; +import static overrungl.vulkan.VK14.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### priorityCount +/// [VarHandle][#VH_priorityCount] - [Getter][#priorityCount()] - [Setter][#priorityCount(int)] +/// ### priorities +/// [Byte offset handle][#MH_priorities] - [Memory layout][#ML_priorities] - [Getter][#priorities(long)] - [Setter][#priorities(long, java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueueFamilyGlobalPriorityProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t priorityCount; +/// VkQueueGlobalPriority[VK_MAX_GLOBAL_PRIORITY_SIZE] priorities; +/// } VkQueueFamilyGlobalPriorityProperties; +/// ``` +public final class VkQueueFamilyGlobalPriorityProperties extends Struct { + /// The struct layout of `VkQueueFamilyGlobalPriorityProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("priorityCount"), + MemoryLayout.sequenceLayout(VK_MAX_GLOBAL_PRIORITY_SIZE, ValueLayout.JAVA_INT).withName("priorities") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `priorityCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_priorityCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("priorityCount")); + /// The byte offset handle of `priorities` of type `(long baseOffset, long elementIndex)long`. + public static final MethodHandle MH_priorities = LAYOUT.byteOffsetHandle(PathElement.groupElement("priorities"), PathElement.sequenceElement()); + /// The memory layout of `priorities`. + public static final MemoryLayout ML_priorities = LAYOUT.select(PathElement.groupElement("priorities")); + + /// Creates `VkQueueFamilyGlobalPriorityProperties` with the given segment. + /// @param segment the memory segment + public VkQueueFamilyGlobalPriorityProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueueFamilyGlobalPriorityProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyGlobalPriorityProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyGlobalPriorityProperties(segment); } + + /// Creates `VkQueueFamilyGlobalPriorityProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyGlobalPriorityProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyGlobalPriorityProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueueFamilyGlobalPriorityProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyGlobalPriorityProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyGlobalPriorityProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueueFamilyGlobalPriorityProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueueFamilyGlobalPriorityProperties` + public static VkQueueFamilyGlobalPriorityProperties alloc(SegmentAllocator allocator) { return new VkQueueFamilyGlobalPriorityProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueueFamilyGlobalPriorityProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueueFamilyGlobalPriorityProperties` + public static VkQueueFamilyGlobalPriorityProperties alloc(SegmentAllocator allocator, long count) { return new VkQueueFamilyGlobalPriorityProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueueFamilyGlobalPriorityProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueueFamilyGlobalPriorityProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueueFamilyGlobalPriorityProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueueFamilyGlobalPriorityProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyGlobalPriorityProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkQueueFamilyGlobalPriorityProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyGlobalPriorityProperties sType(@CType("VkStructureType") int value) { VkQueueFamilyGlobalPriorityProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueueFamilyGlobalPriorityProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueueFamilyGlobalPriorityProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkQueueFamilyGlobalPriorityProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyGlobalPriorityProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyGlobalPriorityProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyGlobalPriorityProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyGlobalPriorityProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyGlobalPriorityProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `priorityCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_priorityCount(MemorySegment segment, long index) { return (int) VH_priorityCount.get(segment, 0L, index); } + /// {@return `priorityCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_priorityCount(MemorySegment segment) { return VkQueueFamilyGlobalPriorityProperties.get_priorityCount(segment, 0L); } + /// {@return `priorityCount` at the given index} + /// @param index the index + public @CType("uint32_t") int priorityCountAt(long index) { return VkQueueFamilyGlobalPriorityProperties.get_priorityCount(this.segment(), index); } + /// {@return `priorityCount`} + public @CType("uint32_t") int priorityCount() { return VkQueueFamilyGlobalPriorityProperties.get_priorityCount(this.segment()); } + /// Sets `priorityCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_priorityCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_priorityCount.set(segment, 0L, index, value); } + /// Sets `priorityCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_priorityCount(MemorySegment segment, @CType("uint32_t") int value) { VkQueueFamilyGlobalPriorityProperties.set_priorityCount(segment, 0L, value); } + /// Sets `priorityCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyGlobalPriorityProperties priorityCountAt(long index, @CType("uint32_t") int value) { VkQueueFamilyGlobalPriorityProperties.set_priorityCount(this.segment(), index, value); return this; } + /// Sets `priorityCount` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyGlobalPriorityProperties priorityCount(@CType("uint32_t") int value) { VkQueueFamilyGlobalPriorityProperties.set_priorityCount(this.segment(), value); return this; } + + /// {@return `priorities` at the given index} + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public static @CType("VkQueueGlobalPriority[VK_MAX_GLOBAL_PRIORITY_SIZE]") java.lang.foreign.MemorySegment get_priorities(MemorySegment segment, long index, long elementIndex) { + try { return segment.asSlice(LAYOUT.scale((long) MH_priorities.invokeExact(0L, elementIndex), index), ML_priorities); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// {@return `priorities`} + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + public static @CType("VkQueueGlobalPriority[VK_MAX_GLOBAL_PRIORITY_SIZE]") java.lang.foreign.MemorySegment get_priorities(MemorySegment segment, long elementIndex) { return VkQueueFamilyGlobalPriorityProperties.get_priorities(segment, 0L, elementIndex); } + /// {@return `priorities` at the given index} + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + public @CType("VkQueueGlobalPriority[VK_MAX_GLOBAL_PRIORITY_SIZE]") java.lang.foreign.MemorySegment prioritiesAt(long index, long elementIndex) { return VkQueueFamilyGlobalPriorityProperties.get_priorities(this.segment(), index, elementIndex); } + /// {@return `priorities`} + /// @param elementIndex the index of the element + public @CType("VkQueueGlobalPriority[VK_MAX_GLOBAL_PRIORITY_SIZE]") java.lang.foreign.MemorySegment priorities(long elementIndex) { return VkQueueFamilyGlobalPriorityProperties.get_priorities(this.segment(), elementIndex); } + /// Sets `priorities` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + public static void set_priorities(MemorySegment segment, long index, long elementIndex, @CType("VkQueueGlobalPriority[VK_MAX_GLOBAL_PRIORITY_SIZE]") java.lang.foreign.MemorySegment value) { + try { MemorySegment.copy(value, 0L, segment, LAYOUT.scale((long) MH_priorities.invokeExact(0L, elementIndex), index), ML_priorities.byteSize()); } + catch (Throwable e) { throw new RuntimeException(e); } + } + /// Sets `priorities` with the given value. + /// @param segment the segment of the struct + /// @param elementIndex the index of the element + /// @param value the value + public static void set_priorities(MemorySegment segment, long elementIndex, @CType("VkQueueGlobalPriority[VK_MAX_GLOBAL_PRIORITY_SIZE]") java.lang.foreign.MemorySegment value) { VkQueueFamilyGlobalPriorityProperties.set_priorities(segment, 0L, elementIndex, value); } + /// Sets `priorities` with the given value at the given index. + /// @param index the index of the struct buffer + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkQueueFamilyGlobalPriorityProperties prioritiesAt(long index, long elementIndex, @CType("VkQueueGlobalPriority[VK_MAX_GLOBAL_PRIORITY_SIZE]") java.lang.foreign.MemorySegment value) { VkQueueFamilyGlobalPriorityProperties.set_priorities(this.segment(), index, elementIndex, value); return this; } + /// Sets `priorities` with the given value. + /// @param elementIndex the index of the element + /// @param value the value + /// @return `this` + public VkQueueFamilyGlobalPriorityProperties priorities(long elementIndex, @CType("VkQueueGlobalPriority[VK_MAX_GLOBAL_PRIORITY_SIZE]") java.lang.foreign.MemorySegment value) { VkQueueFamilyGlobalPriorityProperties.set_priorities(this.segment(), elementIndex, value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueueFamilyProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueueFamilyProperties.java new file mode 100644 index 00000000..40469951 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueueFamilyProperties.java @@ -0,0 +1,224 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### queueFlags +/// [VarHandle][#VH_queueFlags] - [Getter][#queueFlags()] - [Setter][#queueFlags(int)] +/// ### queueCount +/// [VarHandle][#VH_queueCount] - [Getter][#queueCount()] - [Setter][#queueCount(int)] +/// ### timestampValidBits +/// [VarHandle][#VH_timestampValidBits] - [Getter][#timestampValidBits()] - [Setter][#timestampValidBits(int)] +/// ### minImageTransferGranularity +/// [Byte offset][#OFFSET_minImageTransferGranularity] - [Memory layout][#ML_minImageTransferGranularity] - [Getter][#minImageTransferGranularity()] - [Setter][#minImageTransferGranularity(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueueFamilyProperties { +/// VkQueueFlags queueFlags; +/// uint32_t queueCount; +/// uint32_t timestampValidBits; +/// VkExtent3D minImageTransferGranularity; +/// } VkQueueFamilyProperties; +/// ``` +public final class VkQueueFamilyProperties extends Struct { + /// The struct layout of `VkQueueFamilyProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("queueFlags"), + ValueLayout.JAVA_INT.withName("queueCount"), + ValueLayout.JAVA_INT.withName("timestampValidBits"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("minImageTransferGranularity") + ); + /// The [VarHandle] of `queueFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueFlags")); + /// The [VarHandle] of `queueCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_queueCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("queueCount")); + /// The [VarHandle] of `timestampValidBits` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_timestampValidBits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timestampValidBits")); + /// The byte offset of `minImageTransferGranularity`. + public static final long OFFSET_minImageTransferGranularity = LAYOUT.byteOffset(PathElement.groupElement("minImageTransferGranularity")); + /// The memory layout of `minImageTransferGranularity`. + public static final MemoryLayout ML_minImageTransferGranularity = LAYOUT.select(PathElement.groupElement("minImageTransferGranularity")); + + /// Creates `VkQueueFamilyProperties` with the given segment. + /// @param segment the memory segment + public VkQueueFamilyProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueueFamilyProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyProperties(segment); } + + /// Creates `VkQueueFamilyProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueueFamilyProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueueFamilyProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueueFamilyProperties` + public static VkQueueFamilyProperties alloc(SegmentAllocator allocator) { return new VkQueueFamilyProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueueFamilyProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueueFamilyProperties` + public static VkQueueFamilyProperties alloc(SegmentAllocator allocator, long count) { return new VkQueueFamilyProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `queueFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueueFlags") int get_queueFlags(MemorySegment segment, long index) { return (int) VH_queueFlags.get(segment, 0L, index); } + /// {@return `queueFlags`} + /// @param segment the segment of the struct + public static @CType("VkQueueFlags") int get_queueFlags(MemorySegment segment) { return VkQueueFamilyProperties.get_queueFlags(segment, 0L); } + /// {@return `queueFlags` at the given index} + /// @param index the index + public @CType("VkQueueFlags") int queueFlagsAt(long index) { return VkQueueFamilyProperties.get_queueFlags(this.segment(), index); } + /// {@return `queueFlags`} + public @CType("VkQueueFlags") int queueFlags() { return VkQueueFamilyProperties.get_queueFlags(this.segment()); } + /// Sets `queueFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFlags(MemorySegment segment, long index, @CType("VkQueueFlags") int value) { VH_queueFlags.set(segment, 0L, index, value); } + /// Sets `queueFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFlags(MemorySegment segment, @CType("VkQueueFlags") int value) { VkQueueFamilyProperties.set_queueFlags(segment, 0L, value); } + /// Sets `queueFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties queueFlagsAt(long index, @CType("VkQueueFlags") int value) { VkQueueFamilyProperties.set_queueFlags(this.segment(), index, value); return this; } + /// Sets `queueFlags` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties queueFlags(@CType("VkQueueFlags") int value) { VkQueueFamilyProperties.set_queueFlags(this.segment(), value); return this; } + + /// {@return `queueCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_queueCount(MemorySegment segment, long index) { return (int) VH_queueCount.get(segment, 0L, index); } + /// {@return `queueCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_queueCount(MemorySegment segment) { return VkQueueFamilyProperties.get_queueCount(segment, 0L); } + /// {@return `queueCount` at the given index} + /// @param index the index + public @CType("uint32_t") int queueCountAt(long index) { return VkQueueFamilyProperties.get_queueCount(this.segment(), index); } + /// {@return `queueCount`} + public @CType("uint32_t") int queueCount() { return VkQueueFamilyProperties.get_queueCount(this.segment()); } + /// Sets `queueCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_queueCount.set(segment, 0L, index, value); } + /// Sets `queueCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueCount(MemorySegment segment, @CType("uint32_t") int value) { VkQueueFamilyProperties.set_queueCount(segment, 0L, value); } + /// Sets `queueCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties queueCountAt(long index, @CType("uint32_t") int value) { VkQueueFamilyProperties.set_queueCount(this.segment(), index, value); return this; } + /// Sets `queueCount` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties queueCount(@CType("uint32_t") int value) { VkQueueFamilyProperties.set_queueCount(this.segment(), value); return this; } + + /// {@return `timestampValidBits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_timestampValidBits(MemorySegment segment, long index) { return (int) VH_timestampValidBits.get(segment, 0L, index); } + /// {@return `timestampValidBits`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_timestampValidBits(MemorySegment segment) { return VkQueueFamilyProperties.get_timestampValidBits(segment, 0L); } + /// {@return `timestampValidBits` at the given index} + /// @param index the index + public @CType("uint32_t") int timestampValidBitsAt(long index) { return VkQueueFamilyProperties.get_timestampValidBits(this.segment(), index); } + /// {@return `timestampValidBits`} + public @CType("uint32_t") int timestampValidBits() { return VkQueueFamilyProperties.get_timestampValidBits(this.segment()); } + /// Sets `timestampValidBits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timestampValidBits(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_timestampValidBits.set(segment, 0L, index, value); } + /// Sets `timestampValidBits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timestampValidBits(MemorySegment segment, @CType("uint32_t") int value) { VkQueueFamilyProperties.set_timestampValidBits(segment, 0L, value); } + /// Sets `timestampValidBits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties timestampValidBitsAt(long index, @CType("uint32_t") int value) { VkQueueFamilyProperties.set_timestampValidBits(this.segment(), index, value); return this; } + /// Sets `timestampValidBits` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties timestampValidBits(@CType("uint32_t") int value) { VkQueueFamilyProperties.set_timestampValidBits(this.segment(), value); return this; } + + /// {@return `minImageTransferGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_minImageTransferGranularity(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_minImageTransferGranularity, index), ML_minImageTransferGranularity); } + /// {@return `minImageTransferGranularity`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_minImageTransferGranularity(MemorySegment segment) { return VkQueueFamilyProperties.get_minImageTransferGranularity(segment, 0L); } + /// {@return `minImageTransferGranularity` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment minImageTransferGranularityAt(long index) { return VkQueueFamilyProperties.get_minImageTransferGranularity(this.segment(), index); } + /// {@return `minImageTransferGranularity`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment minImageTransferGranularity() { return VkQueueFamilyProperties.get_minImageTransferGranularity(this.segment()); } + /// Sets `minImageTransferGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minImageTransferGranularity(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_minImageTransferGranularity, index), ML_minImageTransferGranularity.byteSize()); } + /// Sets `minImageTransferGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minImageTransferGranularity(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkQueueFamilyProperties.set_minImageTransferGranularity(segment, 0L, value); } + /// Sets `minImageTransferGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties minImageTransferGranularityAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkQueueFamilyProperties.set_minImageTransferGranularity(this.segment(), index, value); return this; } + /// Sets `minImageTransferGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties minImageTransferGranularity(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkQueueFamilyProperties.set_minImageTransferGranularity(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueueFamilyProperties2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueueFamilyProperties2.java new file mode 100644 index 00000000..87270d34 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkQueueFamilyProperties2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### queueFamilyProperties +/// [Byte offset][#OFFSET_queueFamilyProperties] - [Memory layout][#ML_queueFamilyProperties] - [Getter][#queueFamilyProperties()] - [Setter][#queueFamilyProperties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkQueueFamilyProperties2 { +/// VkStructureType sType; +/// void * pNext; +/// VkQueueFamilyProperties queueFamilyProperties; +/// } VkQueueFamilyProperties2; +/// ``` +public final class VkQueueFamilyProperties2 extends Struct { + /// The struct layout of `VkQueueFamilyProperties2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkQueueFamilyProperties.LAYOUT.withName("queueFamilyProperties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `queueFamilyProperties`. + public static final long OFFSET_queueFamilyProperties = LAYOUT.byteOffset(PathElement.groupElement("queueFamilyProperties")); + /// The memory layout of `queueFamilyProperties`. + public static final MemoryLayout ML_queueFamilyProperties = LAYOUT.select(PathElement.groupElement("queueFamilyProperties")); + + /// Creates `VkQueueFamilyProperties2` with the given segment. + /// @param segment the memory segment + public VkQueueFamilyProperties2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkQueueFamilyProperties2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyProperties2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyProperties2(segment); } + + /// Creates `VkQueueFamilyProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyProperties2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkQueueFamilyProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkQueueFamilyProperties2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkQueueFamilyProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkQueueFamilyProperties2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkQueueFamilyProperties2` + public static VkQueueFamilyProperties2 alloc(SegmentAllocator allocator) { return new VkQueueFamilyProperties2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkQueueFamilyProperties2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkQueueFamilyProperties2` + public static VkQueueFamilyProperties2 alloc(SegmentAllocator allocator, long count) { return new VkQueueFamilyProperties2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkQueueFamilyProperties2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkQueueFamilyProperties2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkQueueFamilyProperties2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkQueueFamilyProperties2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties2 sTypeAt(long index, @CType("VkStructureType") int value) { VkQueueFamilyProperties2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties2 sType(@CType("VkStructureType") int value) { VkQueueFamilyProperties2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkQueueFamilyProperties2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkQueueFamilyProperties2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkQueueFamilyProperties2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyProperties2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyProperties2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkQueueFamilyProperties2.set_pNext(this.segment(), value); return this; } + + /// {@return `queueFamilyProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkQueueFamilyProperties") java.lang.foreign.MemorySegment get_queueFamilyProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_queueFamilyProperties, index), ML_queueFamilyProperties); } + /// {@return `queueFamilyProperties`} + /// @param segment the segment of the struct + public static @CType("VkQueueFamilyProperties") java.lang.foreign.MemorySegment get_queueFamilyProperties(MemorySegment segment) { return VkQueueFamilyProperties2.get_queueFamilyProperties(segment, 0L); } + /// {@return `queueFamilyProperties` at the given index} + /// @param index the index + public @CType("VkQueueFamilyProperties") java.lang.foreign.MemorySegment queueFamilyPropertiesAt(long index) { return VkQueueFamilyProperties2.get_queueFamilyProperties(this.segment(), index); } + /// {@return `queueFamilyProperties`} + public @CType("VkQueueFamilyProperties") java.lang.foreign.MemorySegment queueFamilyProperties() { return VkQueueFamilyProperties2.get_queueFamilyProperties(this.segment()); } + /// Sets `queueFamilyProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_queueFamilyProperties(MemorySegment segment, long index, @CType("VkQueueFamilyProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_queueFamilyProperties, index), ML_queueFamilyProperties.byteSize()); } + /// Sets `queueFamilyProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_queueFamilyProperties(MemorySegment segment, @CType("VkQueueFamilyProperties") java.lang.foreign.MemorySegment value) { VkQueueFamilyProperties2.set_queueFamilyProperties(segment, 0L, value); } + /// Sets `queueFamilyProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties2 queueFamilyPropertiesAt(long index, @CType("VkQueueFamilyProperties") java.lang.foreign.MemorySegment value) { VkQueueFamilyProperties2.set_queueFamilyProperties(this.segment(), index, value); return this; } + /// Sets `queueFamilyProperties` with the given value. + /// @param value the value + /// @return `this` + public VkQueueFamilyProperties2 queueFamilyProperties(@CType("VkQueueFamilyProperties") java.lang.foreign.MemorySegment value) { VkQueueFamilyProperties2.set_queueFamilyProperties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRect2D.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRect2D.java new file mode 100644 index 00000000..69ad22a4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRect2D.java @@ -0,0 +1,152 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### offset +/// [Byte offset][#OFFSET_offset] - [Memory layout][#ML_offset] - [Getter][#offset()] - [Setter][#offset(java.lang.foreign.MemorySegment)] +/// ### extent +/// [Byte offset][#OFFSET_extent] - [Memory layout][#ML_extent] - [Getter][#extent()] - [Setter][#extent(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRect2D { +/// VkOffset2D offset; +/// VkExtent2D extent; +/// } VkRect2D; +/// ``` +public final class VkRect2D extends Struct { + /// The struct layout of `VkRect2D`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkOffset2D.LAYOUT.withName("offset"), + overrungl.vulkan.struct.VkExtent2D.LAYOUT.withName("extent") + ); + /// The byte offset of `offset`. + public static final long OFFSET_offset = LAYOUT.byteOffset(PathElement.groupElement("offset")); + /// The memory layout of `offset`. + public static final MemoryLayout ML_offset = LAYOUT.select(PathElement.groupElement("offset")); + /// The byte offset of `extent`. + public static final long OFFSET_extent = LAYOUT.byteOffset(PathElement.groupElement("extent")); + /// The memory layout of `extent`. + public static final MemoryLayout ML_extent = LAYOUT.select(PathElement.groupElement("extent")); + + /// Creates `VkRect2D` with the given segment. + /// @param segment the memory segment + public VkRect2D(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRect2D` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRect2D of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRect2D(segment); } + + /// Creates `VkRect2D` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRect2D ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRect2D(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRect2D` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRect2D ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRect2D(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRect2D` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRect2D` + public static VkRect2D alloc(SegmentAllocator allocator) { return new VkRect2D(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRect2D` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRect2D` + public static VkRect2D alloc(SegmentAllocator allocator, long count) { return new VkRect2D(allocator.allocate(LAYOUT, count)); } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_offset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_offset, index), ML_offset); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkOffset2D") java.lang.foreign.MemorySegment get_offset(MemorySegment segment) { return VkRect2D.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkOffset2D") java.lang.foreign.MemorySegment offsetAt(long index) { return VkRect2D.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkOffset2D") java.lang.foreign.MemorySegment offset() { return VkRect2D.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_offset, index), ML_offset.byteSize()); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkRect2D.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRect2D offsetAt(long index, @CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkRect2D.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkRect2D offset(@CType("VkOffset2D") java.lang.foreign.MemorySegment value) { VkRect2D.set_offset(this.segment(), value); return this; } + + /// {@return `extent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_extent, index), ML_extent); } + /// {@return `extent`} + /// @param segment the segment of the struct + public static @CType("VkExtent2D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment) { return VkRect2D.get_extent(segment, 0L); } + /// {@return `extent` at the given index} + /// @param index the index + public @CType("VkExtent2D") java.lang.foreign.MemorySegment extentAt(long index) { return VkRect2D.get_extent(this.segment(), index); } + /// {@return `extent`} + public @CType("VkExtent2D") java.lang.foreign.MemorySegment extent() { return VkRect2D.get_extent(this.segment()); } + /// Sets `extent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extent(MemorySegment segment, long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_extent, index), ML_extent.byteSize()); } + /// Sets `extent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extent(MemorySegment segment, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkRect2D.set_extent(segment, 0L, value); } + /// Sets `extent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRect2D extentAt(long index, @CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkRect2D.set_extent(this.segment(), index, value); return this; } + /// Sets `extent` with the given value. + /// @param value the value + /// @return `this` + public VkRect2D extent(@CType("VkExtent2D") java.lang.foreign.MemorySegment value) { VkRect2D.set_extent(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassAttachmentBeginInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassAttachmentBeginInfo.java new file mode 100644 index 00000000..8ff0fdc9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassAttachmentBeginInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### attachmentCount +/// [VarHandle][#VH_attachmentCount] - [Getter][#attachmentCount()] - [Setter][#attachmentCount(int)] +/// ### pAttachments +/// [VarHandle][#VH_pAttachments] - [Getter][#pAttachments()] - [Setter][#pAttachments(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassAttachmentBeginInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t attachmentCount; +/// const VkImageView * pAttachments; +/// } VkRenderPassAttachmentBeginInfo; +/// ``` +public final class VkRenderPassAttachmentBeginInfo extends Struct { + /// The struct layout of `VkRenderPassAttachmentBeginInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("attachmentCount"), + ValueLayout.ADDRESS.withName("pAttachments") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `attachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentCount")); + /// The [VarHandle] of `pAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttachments")); + + /// Creates `VkRenderPassAttachmentBeginInfo` with the given segment. + /// @param segment the memory segment + public VkRenderPassAttachmentBeginInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassAttachmentBeginInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassAttachmentBeginInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassAttachmentBeginInfo(segment); } + + /// Creates `VkRenderPassAttachmentBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassAttachmentBeginInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassAttachmentBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassAttachmentBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassAttachmentBeginInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassAttachmentBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassAttachmentBeginInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassAttachmentBeginInfo` + public static VkRenderPassAttachmentBeginInfo alloc(SegmentAllocator allocator) { return new VkRenderPassAttachmentBeginInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassAttachmentBeginInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassAttachmentBeginInfo` + public static VkRenderPassAttachmentBeginInfo alloc(SegmentAllocator allocator, long count) { return new VkRenderPassAttachmentBeginInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassAttachmentBeginInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassAttachmentBeginInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassAttachmentBeginInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassAttachmentBeginInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassAttachmentBeginInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassAttachmentBeginInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassAttachmentBeginInfo sType(@CType("VkStructureType") int value) { VkRenderPassAttachmentBeginInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassAttachmentBeginInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassAttachmentBeginInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassAttachmentBeginInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassAttachmentBeginInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassAttachmentBeginInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassAttachmentBeginInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassAttachmentBeginInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassAttachmentBeginInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `attachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment, long index) { return (int) VH_attachmentCount.get(segment, 0L, index); } + /// {@return `attachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment) { return VkRenderPassAttachmentBeginInfo.get_attachmentCount(segment, 0L); } + /// {@return `attachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentCountAt(long index) { return VkRenderPassAttachmentBeginInfo.get_attachmentCount(this.segment(), index); } + /// {@return `attachmentCount`} + public @CType("uint32_t") int attachmentCount() { return VkRenderPassAttachmentBeginInfo.get_attachmentCount(this.segment()); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachmentCount.set(segment, 0L, index, value); } + /// Sets `attachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassAttachmentBeginInfo.set_attachmentCount(segment, 0L, value); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassAttachmentBeginInfo attachmentCountAt(long index, @CType("uint32_t") int value) { VkRenderPassAttachmentBeginInfo.set_attachmentCount(this.segment(), index, value); return this; } + /// Sets `attachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassAttachmentBeginInfo attachmentCount(@CType("uint32_t") int value) { VkRenderPassAttachmentBeginInfo.set_attachmentCount(this.segment(), value); return this; } + + /// {@return `pAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageView *") java.lang.foreign.MemorySegment get_pAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttachments.get(segment, 0L, index); } + /// {@return `pAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkImageView *") java.lang.foreign.MemorySegment get_pAttachments(MemorySegment segment) { return VkRenderPassAttachmentBeginInfo.get_pAttachments(segment, 0L); } + /// {@return `pAttachments` at the given index} + /// @param index the index + public @CType("const VkImageView *") java.lang.foreign.MemorySegment pAttachmentsAt(long index) { return VkRenderPassAttachmentBeginInfo.get_pAttachments(this.segment(), index); } + /// {@return `pAttachments`} + public @CType("const VkImageView *") java.lang.foreign.MemorySegment pAttachments() { return VkRenderPassAttachmentBeginInfo.get_pAttachments(this.segment()); } + /// Sets `pAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttachments(MemorySegment segment, long index, @CType("const VkImageView *") java.lang.foreign.MemorySegment value) { VH_pAttachments.set(segment, 0L, index, value); } + /// Sets `pAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttachments(MemorySegment segment, @CType("const VkImageView *") java.lang.foreign.MemorySegment value) { VkRenderPassAttachmentBeginInfo.set_pAttachments(segment, 0L, value); } + /// Sets `pAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassAttachmentBeginInfo pAttachmentsAt(long index, @CType("const VkImageView *") java.lang.foreign.MemorySegment value) { VkRenderPassAttachmentBeginInfo.set_pAttachments(this.segment(), index, value); return this; } + /// Sets `pAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassAttachmentBeginInfo pAttachments(@CType("const VkImageView *") java.lang.foreign.MemorySegment value) { VkRenderPassAttachmentBeginInfo.set_pAttachments(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassBeginInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassBeginInfo.java new file mode 100644 index 00000000..68204c28 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassBeginInfo.java @@ -0,0 +1,335 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### renderPass +/// [VarHandle][#VH_renderPass] - [Getter][#renderPass()] - [Setter][#renderPass(java.lang.foreign.MemorySegment)] +/// ### framebuffer +/// [VarHandle][#VH_framebuffer] - [Getter][#framebuffer()] - [Setter][#framebuffer(java.lang.foreign.MemorySegment)] +/// ### renderArea +/// [Byte offset][#OFFSET_renderArea] - [Memory layout][#ML_renderArea] - [Getter][#renderArea()] - [Setter][#renderArea(java.lang.foreign.MemorySegment)] +/// ### clearValueCount +/// [VarHandle][#VH_clearValueCount] - [Getter][#clearValueCount()] - [Setter][#clearValueCount(int)] +/// ### pClearValues +/// [VarHandle][#VH_pClearValues] - [Getter][#pClearValues()] - [Setter][#pClearValues(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassBeginInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkRenderPass renderPass; +/// VkFramebuffer framebuffer; +/// VkRect2D renderArea; +/// uint32_t clearValueCount; +/// const VkClearValue * pClearValues; +/// } VkRenderPassBeginInfo; +/// ``` +public final class VkRenderPassBeginInfo extends Struct { + /// The struct layout of `VkRenderPassBeginInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("renderPass"), + ValueLayout.ADDRESS.withName("framebuffer"), + overrungl.vulkan.struct.VkRect2D.LAYOUT.withName("renderArea"), + ValueLayout.JAVA_INT.withName("clearValueCount"), + ValueLayout.ADDRESS.withName("pClearValues") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `renderPass` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_renderPass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("renderPass")); + /// The [VarHandle] of `framebuffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_framebuffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("framebuffer")); + /// The byte offset of `renderArea`. + public static final long OFFSET_renderArea = LAYOUT.byteOffset(PathElement.groupElement("renderArea")); + /// The memory layout of `renderArea`. + public static final MemoryLayout ML_renderArea = LAYOUT.select(PathElement.groupElement("renderArea")); + /// The [VarHandle] of `clearValueCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_clearValueCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("clearValueCount")); + /// The [VarHandle] of `pClearValues` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pClearValues = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pClearValues")); + + /// Creates `VkRenderPassBeginInfo` with the given segment. + /// @param segment the memory segment + public VkRenderPassBeginInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassBeginInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassBeginInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassBeginInfo(segment); } + + /// Creates `VkRenderPassBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassBeginInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassBeginInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassBeginInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassBeginInfo` + public static VkRenderPassBeginInfo alloc(SegmentAllocator allocator) { return new VkRenderPassBeginInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassBeginInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassBeginInfo` + public static VkRenderPassBeginInfo alloc(SegmentAllocator allocator, long count) { return new VkRenderPassBeginInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassBeginInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassBeginInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassBeginInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassBeginInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassBeginInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo sType(@CType("VkStructureType") int value) { VkRenderPassBeginInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassBeginInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassBeginInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassBeginInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `renderPass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderPass") java.lang.foreign.MemorySegment get_renderPass(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_renderPass.get(segment, 0L, index); } + /// {@return `renderPass`} + /// @param segment the segment of the struct + public static @CType("VkRenderPass") java.lang.foreign.MemorySegment get_renderPass(MemorySegment segment) { return VkRenderPassBeginInfo.get_renderPass(segment, 0L); } + /// {@return `renderPass` at the given index} + /// @param index the index + public @CType("VkRenderPass") java.lang.foreign.MemorySegment renderPassAt(long index) { return VkRenderPassBeginInfo.get_renderPass(this.segment(), index); } + /// {@return `renderPass`} + public @CType("VkRenderPass") java.lang.foreign.MemorySegment renderPass() { return VkRenderPassBeginInfo.get_renderPass(this.segment()); } + /// Sets `renderPass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderPass(MemorySegment segment, long index, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VH_renderPass.set(segment, 0L, index, value); } + /// Sets `renderPass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderPass(MemorySegment segment, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_renderPass(segment, 0L, value); } + /// Sets `renderPass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo renderPassAt(long index, @CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_renderPass(this.segment(), index, value); return this; } + /// Sets `renderPass` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo renderPass(@CType("VkRenderPass") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_renderPass(this.segment(), value); return this; } + + /// {@return `framebuffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFramebuffer") java.lang.foreign.MemorySegment get_framebuffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_framebuffer.get(segment, 0L, index); } + /// {@return `framebuffer`} + /// @param segment the segment of the struct + public static @CType("VkFramebuffer") java.lang.foreign.MemorySegment get_framebuffer(MemorySegment segment) { return VkRenderPassBeginInfo.get_framebuffer(segment, 0L); } + /// {@return `framebuffer` at the given index} + /// @param index the index + public @CType("VkFramebuffer") java.lang.foreign.MemorySegment framebufferAt(long index) { return VkRenderPassBeginInfo.get_framebuffer(this.segment(), index); } + /// {@return `framebuffer`} + public @CType("VkFramebuffer") java.lang.foreign.MemorySegment framebuffer() { return VkRenderPassBeginInfo.get_framebuffer(this.segment()); } + /// Sets `framebuffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_framebuffer(MemorySegment segment, long index, @CType("VkFramebuffer") java.lang.foreign.MemorySegment value) { VH_framebuffer.set(segment, 0L, index, value); } + /// Sets `framebuffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_framebuffer(MemorySegment segment, @CType("VkFramebuffer") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_framebuffer(segment, 0L, value); } + /// Sets `framebuffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo framebufferAt(long index, @CType("VkFramebuffer") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_framebuffer(this.segment(), index, value); return this; } + /// Sets `framebuffer` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo framebuffer(@CType("VkFramebuffer") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_framebuffer(this.segment(), value); return this; } + + /// {@return `renderArea` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_renderArea(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_renderArea, index), ML_renderArea); } + /// {@return `renderArea`} + /// @param segment the segment of the struct + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_renderArea(MemorySegment segment) { return VkRenderPassBeginInfo.get_renderArea(segment, 0L); } + /// {@return `renderArea` at the given index} + /// @param index the index + public @CType("VkRect2D") java.lang.foreign.MemorySegment renderAreaAt(long index) { return VkRenderPassBeginInfo.get_renderArea(this.segment(), index); } + /// {@return `renderArea`} + public @CType("VkRect2D") java.lang.foreign.MemorySegment renderArea() { return VkRenderPassBeginInfo.get_renderArea(this.segment()); } + /// Sets `renderArea` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderArea(MemorySegment segment, long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_renderArea, index), ML_renderArea.byteSize()); } + /// Sets `renderArea` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderArea(MemorySegment segment, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_renderArea(segment, 0L, value); } + /// Sets `renderArea` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo renderAreaAt(long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_renderArea(this.segment(), index, value); return this; } + /// Sets `renderArea` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo renderArea(@CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_renderArea(this.segment(), value); return this; } + + /// {@return `clearValueCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_clearValueCount(MemorySegment segment, long index) { return (int) VH_clearValueCount.get(segment, 0L, index); } + /// {@return `clearValueCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_clearValueCount(MemorySegment segment) { return VkRenderPassBeginInfo.get_clearValueCount(segment, 0L); } + /// {@return `clearValueCount` at the given index} + /// @param index the index + public @CType("uint32_t") int clearValueCountAt(long index) { return VkRenderPassBeginInfo.get_clearValueCount(this.segment(), index); } + /// {@return `clearValueCount`} + public @CType("uint32_t") int clearValueCount() { return VkRenderPassBeginInfo.get_clearValueCount(this.segment()); } + /// Sets `clearValueCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_clearValueCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_clearValueCount.set(segment, 0L, index, value); } + /// Sets `clearValueCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_clearValueCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassBeginInfo.set_clearValueCount(segment, 0L, value); } + /// Sets `clearValueCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo clearValueCountAt(long index, @CType("uint32_t") int value) { VkRenderPassBeginInfo.set_clearValueCount(this.segment(), index, value); return this; } + /// Sets `clearValueCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo clearValueCount(@CType("uint32_t") int value) { VkRenderPassBeginInfo.set_clearValueCount(this.segment(), value); return this; } + + /// {@return `pClearValues` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkClearValue *") java.lang.foreign.MemorySegment get_pClearValues(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pClearValues.get(segment, 0L, index); } + /// {@return `pClearValues`} + /// @param segment the segment of the struct + public static @CType("const VkClearValue *") java.lang.foreign.MemorySegment get_pClearValues(MemorySegment segment) { return VkRenderPassBeginInfo.get_pClearValues(segment, 0L); } + /// {@return `pClearValues` at the given index} + /// @param index the index + public @CType("const VkClearValue *") java.lang.foreign.MemorySegment pClearValuesAt(long index) { return VkRenderPassBeginInfo.get_pClearValues(this.segment(), index); } + /// {@return `pClearValues`} + public @CType("const VkClearValue *") java.lang.foreign.MemorySegment pClearValues() { return VkRenderPassBeginInfo.get_pClearValues(this.segment()); } + /// Sets `pClearValues` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pClearValues(MemorySegment segment, long index, @CType("const VkClearValue *") java.lang.foreign.MemorySegment value) { VH_pClearValues.set(segment, 0L, index, value); } + /// Sets `pClearValues` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pClearValues(MemorySegment segment, @CType("const VkClearValue *") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_pClearValues(segment, 0L, value); } + /// Sets `pClearValues` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo pClearValuesAt(long index, @CType("const VkClearValue *") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_pClearValues(this.segment(), index, value); return this; } + /// Sets `pClearValues` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassBeginInfo pClearValues(@CType("const VkClearValue *") java.lang.foreign.MemorySegment value) { VkRenderPassBeginInfo.set_pClearValues(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassCreateInfo.java new file mode 100644 index 00000000..cd5adee9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassCreateInfo.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### attachmentCount +/// [VarHandle][#VH_attachmentCount] - [Getter][#attachmentCount()] - [Setter][#attachmentCount(int)] +/// ### pAttachments +/// [VarHandle][#VH_pAttachments] - [Getter][#pAttachments()] - [Setter][#pAttachments(java.lang.foreign.MemorySegment)] +/// ### subpassCount +/// [VarHandle][#VH_subpassCount] - [Getter][#subpassCount()] - [Setter][#subpassCount(int)] +/// ### pSubpasses +/// [VarHandle][#VH_pSubpasses] - [Getter][#pSubpasses()] - [Setter][#pSubpasses(java.lang.foreign.MemorySegment)] +/// ### dependencyCount +/// [VarHandle][#VH_dependencyCount] - [Getter][#dependencyCount()] - [Setter][#dependencyCount(int)] +/// ### pDependencies +/// [VarHandle][#VH_pDependencies] - [Getter][#pDependencies()] - [Setter][#pDependencies(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkRenderPassCreateFlags flags; +/// uint32_t attachmentCount; +/// const VkAttachmentDescription * pAttachments; +/// uint32_t subpassCount; +/// const VkSubpassDescription * pSubpasses; +/// uint32_t dependencyCount; +/// const VkSubpassDependency * pDependencies; +/// } VkRenderPassCreateInfo; +/// ``` +public final class VkRenderPassCreateInfo extends Struct { + /// The struct layout of `VkRenderPassCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("attachmentCount"), + ValueLayout.ADDRESS.withName("pAttachments"), + ValueLayout.JAVA_INT.withName("subpassCount"), + ValueLayout.ADDRESS.withName("pSubpasses"), + ValueLayout.JAVA_INT.withName("dependencyCount"), + ValueLayout.ADDRESS.withName("pDependencies") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `attachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentCount")); + /// The [VarHandle] of `pAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttachments")); + /// The [VarHandle] of `subpassCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpassCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpassCount")); + /// The [VarHandle] of `pSubpasses` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSubpasses = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSubpasses")); + /// The [VarHandle] of `dependencyCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dependencyCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dependencyCount")); + /// The [VarHandle] of `pDependencies` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDependencies = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDependencies")); + + /// Creates `VkRenderPassCreateInfo` with the given segment. + /// @param segment the memory segment + public VkRenderPassCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreateInfo(segment); } + + /// Creates `VkRenderPassCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassCreateInfo` + public static VkRenderPassCreateInfo alloc(SegmentAllocator allocator) { return new VkRenderPassCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassCreateInfo` + public static VkRenderPassCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkRenderPassCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo sType(@CType("VkStructureType") int value) { VkRenderPassCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderPassCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkRenderPassCreateFlags") int get_flags(MemorySegment segment) { return VkRenderPassCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkRenderPassCreateFlags") int flagsAt(long index) { return VkRenderPassCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkRenderPassCreateFlags") int flags() { return VkRenderPassCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkRenderPassCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkRenderPassCreateFlags") int value) { VkRenderPassCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo flagsAt(long index, @CType("VkRenderPassCreateFlags") int value) { VkRenderPassCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo flags(@CType("VkRenderPassCreateFlags") int value) { VkRenderPassCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `attachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment, long index) { return (int) VH_attachmentCount.get(segment, 0L, index); } + /// {@return `attachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment) { return VkRenderPassCreateInfo.get_attachmentCount(segment, 0L); } + /// {@return `attachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentCountAt(long index) { return VkRenderPassCreateInfo.get_attachmentCount(this.segment(), index); } + /// {@return `attachmentCount`} + public @CType("uint32_t") int attachmentCount() { return VkRenderPassCreateInfo.get_attachmentCount(this.segment()); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachmentCount.set(segment, 0L, index, value); } + /// Sets `attachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassCreateInfo.set_attachmentCount(segment, 0L, value); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo attachmentCountAt(long index, @CType("uint32_t") int value) { VkRenderPassCreateInfo.set_attachmentCount(this.segment(), index, value); return this; } + /// Sets `attachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo attachmentCount(@CType("uint32_t") int value) { VkRenderPassCreateInfo.set_attachmentCount(this.segment(), value); return this; } + + /// {@return `pAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentDescription *") java.lang.foreign.MemorySegment get_pAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttachments.get(segment, 0L, index); } + /// {@return `pAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentDescription *") java.lang.foreign.MemorySegment get_pAttachments(MemorySegment segment) { return VkRenderPassCreateInfo.get_pAttachments(segment, 0L); } + /// {@return `pAttachments` at the given index} + /// @param index the index + public @CType("const VkAttachmentDescription *") java.lang.foreign.MemorySegment pAttachmentsAt(long index) { return VkRenderPassCreateInfo.get_pAttachments(this.segment(), index); } + /// {@return `pAttachments`} + public @CType("const VkAttachmentDescription *") java.lang.foreign.MemorySegment pAttachments() { return VkRenderPassCreateInfo.get_pAttachments(this.segment()); } + /// Sets `pAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttachments(MemorySegment segment, long index, @CType("const VkAttachmentDescription *") java.lang.foreign.MemorySegment value) { VH_pAttachments.set(segment, 0L, index, value); } + /// Sets `pAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttachments(MemorySegment segment, @CType("const VkAttachmentDescription *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pAttachments(segment, 0L, value); } + /// Sets `pAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo pAttachmentsAt(long index, @CType("const VkAttachmentDescription *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pAttachments(this.segment(), index, value); return this; } + /// Sets `pAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo pAttachments(@CType("const VkAttachmentDescription *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pAttachments(this.segment(), value); return this; } + + /// {@return `subpassCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subpassCount(MemorySegment segment, long index) { return (int) VH_subpassCount.get(segment, 0L, index); } + /// {@return `subpassCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subpassCount(MemorySegment segment) { return VkRenderPassCreateInfo.get_subpassCount(segment, 0L); } + /// {@return `subpassCount` at the given index} + /// @param index the index + public @CType("uint32_t") int subpassCountAt(long index) { return VkRenderPassCreateInfo.get_subpassCount(this.segment(), index); } + /// {@return `subpassCount`} + public @CType("uint32_t") int subpassCount() { return VkRenderPassCreateInfo.get_subpassCount(this.segment()); } + /// Sets `subpassCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpassCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subpassCount.set(segment, 0L, index, value); } + /// Sets `subpassCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpassCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassCreateInfo.set_subpassCount(segment, 0L, value); } + /// Sets `subpassCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo subpassCountAt(long index, @CType("uint32_t") int value) { VkRenderPassCreateInfo.set_subpassCount(this.segment(), index, value); return this; } + /// Sets `subpassCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo subpassCount(@CType("uint32_t") int value) { VkRenderPassCreateInfo.set_subpassCount(this.segment(), value); return this; } + + /// {@return `pSubpasses` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSubpassDescription *") java.lang.foreign.MemorySegment get_pSubpasses(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSubpasses.get(segment, 0L, index); } + /// {@return `pSubpasses`} + /// @param segment the segment of the struct + public static @CType("const VkSubpassDescription *") java.lang.foreign.MemorySegment get_pSubpasses(MemorySegment segment) { return VkRenderPassCreateInfo.get_pSubpasses(segment, 0L); } + /// {@return `pSubpasses` at the given index} + /// @param index the index + public @CType("const VkSubpassDescription *") java.lang.foreign.MemorySegment pSubpassesAt(long index) { return VkRenderPassCreateInfo.get_pSubpasses(this.segment(), index); } + /// {@return `pSubpasses`} + public @CType("const VkSubpassDescription *") java.lang.foreign.MemorySegment pSubpasses() { return VkRenderPassCreateInfo.get_pSubpasses(this.segment()); } + /// Sets `pSubpasses` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSubpasses(MemorySegment segment, long index, @CType("const VkSubpassDescription *") java.lang.foreign.MemorySegment value) { VH_pSubpasses.set(segment, 0L, index, value); } + /// Sets `pSubpasses` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSubpasses(MemorySegment segment, @CType("const VkSubpassDescription *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pSubpasses(segment, 0L, value); } + /// Sets `pSubpasses` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo pSubpassesAt(long index, @CType("const VkSubpassDescription *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pSubpasses(this.segment(), index, value); return this; } + /// Sets `pSubpasses` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo pSubpasses(@CType("const VkSubpassDescription *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pSubpasses(this.segment(), value); return this; } + + /// {@return `dependencyCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dependencyCount(MemorySegment segment, long index) { return (int) VH_dependencyCount.get(segment, 0L, index); } + /// {@return `dependencyCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dependencyCount(MemorySegment segment) { return VkRenderPassCreateInfo.get_dependencyCount(segment, 0L); } + /// {@return `dependencyCount` at the given index} + /// @param index the index + public @CType("uint32_t") int dependencyCountAt(long index) { return VkRenderPassCreateInfo.get_dependencyCount(this.segment(), index); } + /// {@return `dependencyCount`} + public @CType("uint32_t") int dependencyCount() { return VkRenderPassCreateInfo.get_dependencyCount(this.segment()); } + /// Sets `dependencyCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dependencyCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dependencyCount.set(segment, 0L, index, value); } + /// Sets `dependencyCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dependencyCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassCreateInfo.set_dependencyCount(segment, 0L, value); } + /// Sets `dependencyCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo dependencyCountAt(long index, @CType("uint32_t") int value) { VkRenderPassCreateInfo.set_dependencyCount(this.segment(), index, value); return this; } + /// Sets `dependencyCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo dependencyCount(@CType("uint32_t") int value) { VkRenderPassCreateInfo.set_dependencyCount(this.segment(), value); return this; } + + /// {@return `pDependencies` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSubpassDependency *") java.lang.foreign.MemorySegment get_pDependencies(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDependencies.get(segment, 0L, index); } + /// {@return `pDependencies`} + /// @param segment the segment of the struct + public static @CType("const VkSubpassDependency *") java.lang.foreign.MemorySegment get_pDependencies(MemorySegment segment) { return VkRenderPassCreateInfo.get_pDependencies(segment, 0L); } + /// {@return `pDependencies` at the given index} + /// @param index the index + public @CType("const VkSubpassDependency *") java.lang.foreign.MemorySegment pDependenciesAt(long index) { return VkRenderPassCreateInfo.get_pDependencies(this.segment(), index); } + /// {@return `pDependencies`} + public @CType("const VkSubpassDependency *") java.lang.foreign.MemorySegment pDependencies() { return VkRenderPassCreateInfo.get_pDependencies(this.segment()); } + /// Sets `pDependencies` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDependencies(MemorySegment segment, long index, @CType("const VkSubpassDependency *") java.lang.foreign.MemorySegment value) { VH_pDependencies.set(segment, 0L, index, value); } + /// Sets `pDependencies` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDependencies(MemorySegment segment, @CType("const VkSubpassDependency *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pDependencies(segment, 0L, value); } + /// Sets `pDependencies` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo pDependenciesAt(long index, @CType("const VkSubpassDependency *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pDependencies(this.segment(), index, value); return this; } + /// Sets `pDependencies` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo pDependencies(@CType("const VkSubpassDependency *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo.set_pDependencies(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassCreateInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassCreateInfo2.java new file mode 100644 index 00000000..0ca51f25 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassCreateInfo2.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### attachmentCount +/// [VarHandle][#VH_attachmentCount] - [Getter][#attachmentCount()] - [Setter][#attachmentCount(int)] +/// ### pAttachments +/// [VarHandle][#VH_pAttachments] - [Getter][#pAttachments()] - [Setter][#pAttachments(java.lang.foreign.MemorySegment)] +/// ### subpassCount +/// [VarHandle][#VH_subpassCount] - [Getter][#subpassCount()] - [Setter][#subpassCount(int)] +/// ### pSubpasses +/// [VarHandle][#VH_pSubpasses] - [Getter][#pSubpasses()] - [Setter][#pSubpasses(java.lang.foreign.MemorySegment)] +/// ### dependencyCount +/// [VarHandle][#VH_dependencyCount] - [Getter][#dependencyCount()] - [Setter][#dependencyCount(int)] +/// ### pDependencies +/// [VarHandle][#VH_pDependencies] - [Getter][#pDependencies()] - [Setter][#pDependencies(java.lang.foreign.MemorySegment)] +/// ### correlatedViewMaskCount +/// [VarHandle][#VH_correlatedViewMaskCount] - [Getter][#correlatedViewMaskCount()] - [Setter][#correlatedViewMaskCount(int)] +/// ### pCorrelatedViewMasks +/// [VarHandle][#VH_pCorrelatedViewMasks] - [Getter][#pCorrelatedViewMasks()] - [Setter][#pCorrelatedViewMasks(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassCreateInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkRenderPassCreateFlags flags; +/// uint32_t attachmentCount; +/// const VkAttachmentDescription2 * pAttachments; +/// uint32_t subpassCount; +/// const VkSubpassDescription2 * pSubpasses; +/// uint32_t dependencyCount; +/// const VkSubpassDependency2 * pDependencies; +/// uint32_t correlatedViewMaskCount; +/// const uint32_t * pCorrelatedViewMasks; +/// } VkRenderPassCreateInfo2; +/// ``` +public final class VkRenderPassCreateInfo2 extends Struct { + /// The struct layout of `VkRenderPassCreateInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("attachmentCount"), + ValueLayout.ADDRESS.withName("pAttachments"), + ValueLayout.JAVA_INT.withName("subpassCount"), + ValueLayout.ADDRESS.withName("pSubpasses"), + ValueLayout.JAVA_INT.withName("dependencyCount"), + ValueLayout.ADDRESS.withName("pDependencies"), + ValueLayout.JAVA_INT.withName("correlatedViewMaskCount"), + ValueLayout.ADDRESS.withName("pCorrelatedViewMasks") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `attachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_attachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("attachmentCount")); + /// The [VarHandle] of `pAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAttachments")); + /// The [VarHandle] of `subpassCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpassCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpassCount")); + /// The [VarHandle] of `pSubpasses` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSubpasses = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSubpasses")); + /// The [VarHandle] of `dependencyCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dependencyCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dependencyCount")); + /// The [VarHandle] of `pDependencies` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDependencies = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDependencies")); + /// The [VarHandle] of `correlatedViewMaskCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_correlatedViewMaskCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("correlatedViewMaskCount")); + /// The [VarHandle] of `pCorrelatedViewMasks` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCorrelatedViewMasks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCorrelatedViewMasks")); + + /// Creates `VkRenderPassCreateInfo2` with the given segment. + /// @param segment the memory segment + public VkRenderPassCreateInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassCreateInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreateInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreateInfo2(segment); } + + /// Creates `VkRenderPassCreateInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreateInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreateInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassCreateInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassCreateInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassCreateInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassCreateInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassCreateInfo2` + public static VkRenderPassCreateInfo2 alloc(SegmentAllocator allocator) { return new VkRenderPassCreateInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassCreateInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassCreateInfo2` + public static VkRenderPassCreateInfo2 alloc(SegmentAllocator allocator, long count) { return new VkRenderPassCreateInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassCreateInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassCreateInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassCreateInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassCreateInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassCreateInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 sType(@CType("VkStructureType") int value) { VkRenderPassCreateInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassCreateInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassCreateInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassCreateInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderPassCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkRenderPassCreateFlags") int get_flags(MemorySegment segment) { return VkRenderPassCreateInfo2.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkRenderPassCreateFlags") int flagsAt(long index) { return VkRenderPassCreateInfo2.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkRenderPassCreateFlags") int flags() { return VkRenderPassCreateInfo2.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkRenderPassCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkRenderPassCreateFlags") int value) { VkRenderPassCreateInfo2.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 flagsAt(long index, @CType("VkRenderPassCreateFlags") int value) { VkRenderPassCreateInfo2.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 flags(@CType("VkRenderPassCreateFlags") int value) { VkRenderPassCreateInfo2.set_flags(this.segment(), value); return this; } + + /// {@return `attachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment, long index) { return (int) VH_attachmentCount.get(segment, 0L, index); } + /// {@return `attachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_attachmentCount(MemorySegment segment) { return VkRenderPassCreateInfo2.get_attachmentCount(segment, 0L); } + /// {@return `attachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int attachmentCountAt(long index) { return VkRenderPassCreateInfo2.get_attachmentCount(this.segment(), index); } + /// {@return `attachmentCount`} + public @CType("uint32_t") int attachmentCount() { return VkRenderPassCreateInfo2.get_attachmentCount(this.segment()); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_attachmentCount.set(segment, 0L, index, value); } + /// Sets `attachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_attachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_attachmentCount(segment, 0L, value); } + /// Sets `attachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 attachmentCountAt(long index, @CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_attachmentCount(this.segment(), index, value); return this; } + /// Sets `attachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 attachmentCount(@CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_attachmentCount(this.segment(), value); return this; } + + /// {@return `pAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentDescription2 *") java.lang.foreign.MemorySegment get_pAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAttachments.get(segment, 0L, index); } + /// {@return `pAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentDescription2 *") java.lang.foreign.MemorySegment get_pAttachments(MemorySegment segment) { return VkRenderPassCreateInfo2.get_pAttachments(segment, 0L); } + /// {@return `pAttachments` at the given index} + /// @param index the index + public @CType("const VkAttachmentDescription2 *") java.lang.foreign.MemorySegment pAttachmentsAt(long index) { return VkRenderPassCreateInfo2.get_pAttachments(this.segment(), index); } + /// {@return `pAttachments`} + public @CType("const VkAttachmentDescription2 *") java.lang.foreign.MemorySegment pAttachments() { return VkRenderPassCreateInfo2.get_pAttachments(this.segment()); } + /// Sets `pAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAttachments(MemorySegment segment, long index, @CType("const VkAttachmentDescription2 *") java.lang.foreign.MemorySegment value) { VH_pAttachments.set(segment, 0L, index, value); } + /// Sets `pAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAttachments(MemorySegment segment, @CType("const VkAttachmentDescription2 *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pAttachments(segment, 0L, value); } + /// Sets `pAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 pAttachmentsAt(long index, @CType("const VkAttachmentDescription2 *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pAttachments(this.segment(), index, value); return this; } + /// Sets `pAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 pAttachments(@CType("const VkAttachmentDescription2 *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pAttachments(this.segment(), value); return this; } + + /// {@return `subpassCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subpassCount(MemorySegment segment, long index) { return (int) VH_subpassCount.get(segment, 0L, index); } + /// {@return `subpassCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subpassCount(MemorySegment segment) { return VkRenderPassCreateInfo2.get_subpassCount(segment, 0L); } + /// {@return `subpassCount` at the given index} + /// @param index the index + public @CType("uint32_t") int subpassCountAt(long index) { return VkRenderPassCreateInfo2.get_subpassCount(this.segment(), index); } + /// {@return `subpassCount`} + public @CType("uint32_t") int subpassCount() { return VkRenderPassCreateInfo2.get_subpassCount(this.segment()); } + /// Sets `subpassCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpassCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subpassCount.set(segment, 0L, index, value); } + /// Sets `subpassCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpassCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_subpassCount(segment, 0L, value); } + /// Sets `subpassCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 subpassCountAt(long index, @CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_subpassCount(this.segment(), index, value); return this; } + /// Sets `subpassCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 subpassCount(@CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_subpassCount(this.segment(), value); return this; } + + /// {@return `pSubpasses` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSubpassDescription2 *") java.lang.foreign.MemorySegment get_pSubpasses(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSubpasses.get(segment, 0L, index); } + /// {@return `pSubpasses`} + /// @param segment the segment of the struct + public static @CType("const VkSubpassDescription2 *") java.lang.foreign.MemorySegment get_pSubpasses(MemorySegment segment) { return VkRenderPassCreateInfo2.get_pSubpasses(segment, 0L); } + /// {@return `pSubpasses` at the given index} + /// @param index the index + public @CType("const VkSubpassDescription2 *") java.lang.foreign.MemorySegment pSubpassesAt(long index) { return VkRenderPassCreateInfo2.get_pSubpasses(this.segment(), index); } + /// {@return `pSubpasses`} + public @CType("const VkSubpassDescription2 *") java.lang.foreign.MemorySegment pSubpasses() { return VkRenderPassCreateInfo2.get_pSubpasses(this.segment()); } + /// Sets `pSubpasses` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSubpasses(MemorySegment segment, long index, @CType("const VkSubpassDescription2 *") java.lang.foreign.MemorySegment value) { VH_pSubpasses.set(segment, 0L, index, value); } + /// Sets `pSubpasses` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSubpasses(MemorySegment segment, @CType("const VkSubpassDescription2 *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pSubpasses(segment, 0L, value); } + /// Sets `pSubpasses` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 pSubpassesAt(long index, @CType("const VkSubpassDescription2 *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pSubpasses(this.segment(), index, value); return this; } + /// Sets `pSubpasses` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 pSubpasses(@CType("const VkSubpassDescription2 *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pSubpasses(this.segment(), value); return this; } + + /// {@return `dependencyCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dependencyCount(MemorySegment segment, long index) { return (int) VH_dependencyCount.get(segment, 0L, index); } + /// {@return `dependencyCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dependencyCount(MemorySegment segment) { return VkRenderPassCreateInfo2.get_dependencyCount(segment, 0L); } + /// {@return `dependencyCount` at the given index} + /// @param index the index + public @CType("uint32_t") int dependencyCountAt(long index) { return VkRenderPassCreateInfo2.get_dependencyCount(this.segment(), index); } + /// {@return `dependencyCount`} + public @CType("uint32_t") int dependencyCount() { return VkRenderPassCreateInfo2.get_dependencyCount(this.segment()); } + /// Sets `dependencyCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dependencyCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dependencyCount.set(segment, 0L, index, value); } + /// Sets `dependencyCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dependencyCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_dependencyCount(segment, 0L, value); } + /// Sets `dependencyCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 dependencyCountAt(long index, @CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_dependencyCount(this.segment(), index, value); return this; } + /// Sets `dependencyCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 dependencyCount(@CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_dependencyCount(this.segment(), value); return this; } + + /// {@return `pDependencies` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSubpassDependency2 *") java.lang.foreign.MemorySegment get_pDependencies(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDependencies.get(segment, 0L, index); } + /// {@return `pDependencies`} + /// @param segment the segment of the struct + public static @CType("const VkSubpassDependency2 *") java.lang.foreign.MemorySegment get_pDependencies(MemorySegment segment) { return VkRenderPassCreateInfo2.get_pDependencies(segment, 0L); } + /// {@return `pDependencies` at the given index} + /// @param index the index + public @CType("const VkSubpassDependency2 *") java.lang.foreign.MemorySegment pDependenciesAt(long index) { return VkRenderPassCreateInfo2.get_pDependencies(this.segment(), index); } + /// {@return `pDependencies`} + public @CType("const VkSubpassDependency2 *") java.lang.foreign.MemorySegment pDependencies() { return VkRenderPassCreateInfo2.get_pDependencies(this.segment()); } + /// Sets `pDependencies` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDependencies(MemorySegment segment, long index, @CType("const VkSubpassDependency2 *") java.lang.foreign.MemorySegment value) { VH_pDependencies.set(segment, 0L, index, value); } + /// Sets `pDependencies` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDependencies(MemorySegment segment, @CType("const VkSubpassDependency2 *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pDependencies(segment, 0L, value); } + /// Sets `pDependencies` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 pDependenciesAt(long index, @CType("const VkSubpassDependency2 *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pDependencies(this.segment(), index, value); return this; } + /// Sets `pDependencies` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 pDependencies(@CType("const VkSubpassDependency2 *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pDependencies(this.segment(), value); return this; } + + /// {@return `correlatedViewMaskCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_correlatedViewMaskCount(MemorySegment segment, long index) { return (int) VH_correlatedViewMaskCount.get(segment, 0L, index); } + /// {@return `correlatedViewMaskCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_correlatedViewMaskCount(MemorySegment segment) { return VkRenderPassCreateInfo2.get_correlatedViewMaskCount(segment, 0L); } + /// {@return `correlatedViewMaskCount` at the given index} + /// @param index the index + public @CType("uint32_t") int correlatedViewMaskCountAt(long index) { return VkRenderPassCreateInfo2.get_correlatedViewMaskCount(this.segment(), index); } + /// {@return `correlatedViewMaskCount`} + public @CType("uint32_t") int correlatedViewMaskCount() { return VkRenderPassCreateInfo2.get_correlatedViewMaskCount(this.segment()); } + /// Sets `correlatedViewMaskCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_correlatedViewMaskCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_correlatedViewMaskCount.set(segment, 0L, index, value); } + /// Sets `correlatedViewMaskCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_correlatedViewMaskCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_correlatedViewMaskCount(segment, 0L, value); } + /// Sets `correlatedViewMaskCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 correlatedViewMaskCountAt(long index, @CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_correlatedViewMaskCount(this.segment(), index, value); return this; } + /// Sets `correlatedViewMaskCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 correlatedViewMaskCount(@CType("uint32_t") int value) { VkRenderPassCreateInfo2.set_correlatedViewMaskCount(this.segment(), value); return this; } + + /// {@return `pCorrelatedViewMasks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pCorrelatedViewMasks(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCorrelatedViewMasks.get(segment, 0L, index); } + /// {@return `pCorrelatedViewMasks`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pCorrelatedViewMasks(MemorySegment segment) { return VkRenderPassCreateInfo2.get_pCorrelatedViewMasks(segment, 0L); } + /// {@return `pCorrelatedViewMasks` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pCorrelatedViewMasksAt(long index) { return VkRenderPassCreateInfo2.get_pCorrelatedViewMasks(this.segment(), index); } + /// {@return `pCorrelatedViewMasks`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pCorrelatedViewMasks() { return VkRenderPassCreateInfo2.get_pCorrelatedViewMasks(this.segment()); } + /// Sets `pCorrelatedViewMasks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCorrelatedViewMasks(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pCorrelatedViewMasks.set(segment, 0L, index, value); } + /// Sets `pCorrelatedViewMasks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCorrelatedViewMasks(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pCorrelatedViewMasks(segment, 0L, value); } + /// Sets `pCorrelatedViewMasks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 pCorrelatedViewMasksAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pCorrelatedViewMasks(this.segment(), index, value); return this; } + /// Sets `pCorrelatedViewMasks` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassCreateInfo2 pCorrelatedViewMasks(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassCreateInfo2.set_pCorrelatedViewMasks(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassInputAttachmentAspectCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassInputAttachmentAspectCreateInfo.java new file mode 100644 index 00000000..7163b616 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassInputAttachmentAspectCreateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### aspectReferenceCount +/// [VarHandle][#VH_aspectReferenceCount] - [Getter][#aspectReferenceCount()] - [Setter][#aspectReferenceCount(int)] +/// ### pAspectReferences +/// [VarHandle][#VH_pAspectReferences] - [Getter][#pAspectReferences()] - [Setter][#pAspectReferences(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassInputAttachmentAspectCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t aspectReferenceCount; +/// const VkInputAttachmentAspectReference * pAspectReferences; +/// } VkRenderPassInputAttachmentAspectCreateInfo; +/// ``` +public final class VkRenderPassInputAttachmentAspectCreateInfo extends Struct { + /// The struct layout of `VkRenderPassInputAttachmentAspectCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("aspectReferenceCount"), + ValueLayout.ADDRESS.withName("pAspectReferences") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `aspectReferenceCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspectReferenceCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspectReferenceCount")); + /// The [VarHandle] of `pAspectReferences` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pAspectReferences = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pAspectReferences")); + + /// Creates `VkRenderPassInputAttachmentAspectCreateInfo` with the given segment. + /// @param segment the memory segment + public VkRenderPassInputAttachmentAspectCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassInputAttachmentAspectCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassInputAttachmentAspectCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassInputAttachmentAspectCreateInfo(segment); } + + /// Creates `VkRenderPassInputAttachmentAspectCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassInputAttachmentAspectCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassInputAttachmentAspectCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassInputAttachmentAspectCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassInputAttachmentAspectCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassInputAttachmentAspectCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassInputAttachmentAspectCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassInputAttachmentAspectCreateInfo` + public static VkRenderPassInputAttachmentAspectCreateInfo alloc(SegmentAllocator allocator) { return new VkRenderPassInputAttachmentAspectCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassInputAttachmentAspectCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassInputAttachmentAspectCreateInfo` + public static VkRenderPassInputAttachmentAspectCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkRenderPassInputAttachmentAspectCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassInputAttachmentAspectCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassInputAttachmentAspectCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassInputAttachmentAspectCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassInputAttachmentAspectCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassInputAttachmentAspectCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassInputAttachmentAspectCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassInputAttachmentAspectCreateInfo sType(@CType("VkStructureType") int value) { VkRenderPassInputAttachmentAspectCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassInputAttachmentAspectCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassInputAttachmentAspectCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassInputAttachmentAspectCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassInputAttachmentAspectCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassInputAttachmentAspectCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassInputAttachmentAspectCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassInputAttachmentAspectCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassInputAttachmentAspectCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `aspectReferenceCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_aspectReferenceCount(MemorySegment segment, long index) { return (int) VH_aspectReferenceCount.get(segment, 0L, index); } + /// {@return `aspectReferenceCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_aspectReferenceCount(MemorySegment segment) { return VkRenderPassInputAttachmentAspectCreateInfo.get_aspectReferenceCount(segment, 0L); } + /// {@return `aspectReferenceCount` at the given index} + /// @param index the index + public @CType("uint32_t") int aspectReferenceCountAt(long index) { return VkRenderPassInputAttachmentAspectCreateInfo.get_aspectReferenceCount(this.segment(), index); } + /// {@return `aspectReferenceCount`} + public @CType("uint32_t") int aspectReferenceCount() { return VkRenderPassInputAttachmentAspectCreateInfo.get_aspectReferenceCount(this.segment()); } + /// Sets `aspectReferenceCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspectReferenceCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_aspectReferenceCount.set(segment, 0L, index, value); } + /// Sets `aspectReferenceCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspectReferenceCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassInputAttachmentAspectCreateInfo.set_aspectReferenceCount(segment, 0L, value); } + /// Sets `aspectReferenceCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassInputAttachmentAspectCreateInfo aspectReferenceCountAt(long index, @CType("uint32_t") int value) { VkRenderPassInputAttachmentAspectCreateInfo.set_aspectReferenceCount(this.segment(), index, value); return this; } + /// Sets `aspectReferenceCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassInputAttachmentAspectCreateInfo aspectReferenceCount(@CType("uint32_t") int value) { VkRenderPassInputAttachmentAspectCreateInfo.set_aspectReferenceCount(this.segment(), value); return this; } + + /// {@return `pAspectReferences` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkInputAttachmentAspectReference *") java.lang.foreign.MemorySegment get_pAspectReferences(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pAspectReferences.get(segment, 0L, index); } + /// {@return `pAspectReferences`} + /// @param segment the segment of the struct + public static @CType("const VkInputAttachmentAspectReference *") java.lang.foreign.MemorySegment get_pAspectReferences(MemorySegment segment) { return VkRenderPassInputAttachmentAspectCreateInfo.get_pAspectReferences(segment, 0L); } + /// {@return `pAspectReferences` at the given index} + /// @param index the index + public @CType("const VkInputAttachmentAspectReference *") java.lang.foreign.MemorySegment pAspectReferencesAt(long index) { return VkRenderPassInputAttachmentAspectCreateInfo.get_pAspectReferences(this.segment(), index); } + /// {@return `pAspectReferences`} + public @CType("const VkInputAttachmentAspectReference *") java.lang.foreign.MemorySegment pAspectReferences() { return VkRenderPassInputAttachmentAspectCreateInfo.get_pAspectReferences(this.segment()); } + /// Sets `pAspectReferences` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pAspectReferences(MemorySegment segment, long index, @CType("const VkInputAttachmentAspectReference *") java.lang.foreign.MemorySegment value) { VH_pAspectReferences.set(segment, 0L, index, value); } + /// Sets `pAspectReferences` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pAspectReferences(MemorySegment segment, @CType("const VkInputAttachmentAspectReference *") java.lang.foreign.MemorySegment value) { VkRenderPassInputAttachmentAspectCreateInfo.set_pAspectReferences(segment, 0L, value); } + /// Sets `pAspectReferences` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassInputAttachmentAspectCreateInfo pAspectReferencesAt(long index, @CType("const VkInputAttachmentAspectReference *") java.lang.foreign.MemorySegment value) { VkRenderPassInputAttachmentAspectCreateInfo.set_pAspectReferences(this.segment(), index, value); return this; } + /// Sets `pAspectReferences` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassInputAttachmentAspectCreateInfo pAspectReferences(@CType("const VkInputAttachmentAspectReference *") java.lang.foreign.MemorySegment value) { VkRenderPassInputAttachmentAspectCreateInfo.set_pAspectReferences(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassMultiviewCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassMultiviewCreateInfo.java new file mode 100644 index 00000000..ddeccb00 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderPassMultiviewCreateInfo.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### subpassCount +/// [VarHandle][#VH_subpassCount] - [Getter][#subpassCount()] - [Setter][#subpassCount(int)] +/// ### pViewMasks +/// [VarHandle][#VH_pViewMasks] - [Getter][#pViewMasks()] - [Setter][#pViewMasks(java.lang.foreign.MemorySegment)] +/// ### dependencyCount +/// [VarHandle][#VH_dependencyCount] - [Getter][#dependencyCount()] - [Setter][#dependencyCount(int)] +/// ### pViewOffsets +/// [VarHandle][#VH_pViewOffsets] - [Getter][#pViewOffsets()] - [Setter][#pViewOffsets(java.lang.foreign.MemorySegment)] +/// ### correlationMaskCount +/// [VarHandle][#VH_correlationMaskCount] - [Getter][#correlationMaskCount()] - [Setter][#correlationMaskCount(int)] +/// ### pCorrelationMasks +/// [VarHandle][#VH_pCorrelationMasks] - [Getter][#pCorrelationMasks()] - [Setter][#pCorrelationMasks(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderPassMultiviewCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t subpassCount; +/// const uint32_t * pViewMasks; +/// uint32_t dependencyCount; +/// const int32_t * pViewOffsets; +/// uint32_t correlationMaskCount; +/// const uint32_t * pCorrelationMasks; +/// } VkRenderPassMultiviewCreateInfo; +/// ``` +public final class VkRenderPassMultiviewCreateInfo extends Struct { + /// The struct layout of `VkRenderPassMultiviewCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("subpassCount"), + ValueLayout.ADDRESS.withName("pViewMasks"), + ValueLayout.JAVA_INT.withName("dependencyCount"), + ValueLayout.ADDRESS.withName("pViewOffsets"), + ValueLayout.JAVA_INT.withName("correlationMaskCount"), + ValueLayout.ADDRESS.withName("pCorrelationMasks") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `subpassCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_subpassCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subpassCount")); + /// The [VarHandle] of `pViewMasks` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pViewMasks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pViewMasks")); + /// The [VarHandle] of `dependencyCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dependencyCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dependencyCount")); + /// The [VarHandle] of `pViewOffsets` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pViewOffsets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pViewOffsets")); + /// The [VarHandle] of `correlationMaskCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_correlationMaskCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("correlationMaskCount")); + /// The [VarHandle] of `pCorrelationMasks` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCorrelationMasks = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCorrelationMasks")); + + /// Creates `VkRenderPassMultiviewCreateInfo` with the given segment. + /// @param segment the memory segment + public VkRenderPassMultiviewCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderPassMultiviewCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassMultiviewCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassMultiviewCreateInfo(segment); } + + /// Creates `VkRenderPassMultiviewCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassMultiviewCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassMultiviewCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderPassMultiviewCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderPassMultiviewCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderPassMultiviewCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderPassMultiviewCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderPassMultiviewCreateInfo` + public static VkRenderPassMultiviewCreateInfo alloc(SegmentAllocator allocator) { return new VkRenderPassMultiviewCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderPassMultiviewCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderPassMultiviewCreateInfo` + public static VkRenderPassMultiviewCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkRenderPassMultiviewCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderPassMultiviewCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderPassMultiviewCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderPassMultiviewCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderPassMultiviewCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderPassMultiviewCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo sType(@CType("VkStructureType") int value) { VkRenderPassMultiviewCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderPassMultiviewCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderPassMultiviewCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderPassMultiviewCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `subpassCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_subpassCount(MemorySegment segment, long index) { return (int) VH_subpassCount.get(segment, 0L, index); } + /// {@return `subpassCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_subpassCount(MemorySegment segment) { return VkRenderPassMultiviewCreateInfo.get_subpassCount(segment, 0L); } + /// {@return `subpassCount` at the given index} + /// @param index the index + public @CType("uint32_t") int subpassCountAt(long index) { return VkRenderPassMultiviewCreateInfo.get_subpassCount(this.segment(), index); } + /// {@return `subpassCount`} + public @CType("uint32_t") int subpassCount() { return VkRenderPassMultiviewCreateInfo.get_subpassCount(this.segment()); } + /// Sets `subpassCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subpassCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_subpassCount.set(segment, 0L, index, value); } + /// Sets `subpassCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subpassCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassMultiviewCreateInfo.set_subpassCount(segment, 0L, value); } + /// Sets `subpassCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo subpassCountAt(long index, @CType("uint32_t") int value) { VkRenderPassMultiviewCreateInfo.set_subpassCount(this.segment(), index, value); return this; } + /// Sets `subpassCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo subpassCount(@CType("uint32_t") int value) { VkRenderPassMultiviewCreateInfo.set_subpassCount(this.segment(), value); return this; } + + /// {@return `pViewMasks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pViewMasks(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pViewMasks.get(segment, 0L, index); } + /// {@return `pViewMasks`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pViewMasks(MemorySegment segment) { return VkRenderPassMultiviewCreateInfo.get_pViewMasks(segment, 0L); } + /// {@return `pViewMasks` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pViewMasksAt(long index) { return VkRenderPassMultiviewCreateInfo.get_pViewMasks(this.segment(), index); } + /// {@return `pViewMasks`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pViewMasks() { return VkRenderPassMultiviewCreateInfo.get_pViewMasks(this.segment()); } + /// Sets `pViewMasks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pViewMasks(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pViewMasks.set(segment, 0L, index, value); } + /// Sets `pViewMasks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pViewMasks(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pViewMasks(segment, 0L, value); } + /// Sets `pViewMasks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo pViewMasksAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pViewMasks(this.segment(), index, value); return this; } + /// Sets `pViewMasks` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo pViewMasks(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pViewMasks(this.segment(), value); return this; } + + /// {@return `dependencyCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dependencyCount(MemorySegment segment, long index) { return (int) VH_dependencyCount.get(segment, 0L, index); } + /// {@return `dependencyCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dependencyCount(MemorySegment segment) { return VkRenderPassMultiviewCreateInfo.get_dependencyCount(segment, 0L); } + /// {@return `dependencyCount` at the given index} + /// @param index the index + public @CType("uint32_t") int dependencyCountAt(long index) { return VkRenderPassMultiviewCreateInfo.get_dependencyCount(this.segment(), index); } + /// {@return `dependencyCount`} + public @CType("uint32_t") int dependencyCount() { return VkRenderPassMultiviewCreateInfo.get_dependencyCount(this.segment()); } + /// Sets `dependencyCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dependencyCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dependencyCount.set(segment, 0L, index, value); } + /// Sets `dependencyCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dependencyCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassMultiviewCreateInfo.set_dependencyCount(segment, 0L, value); } + /// Sets `dependencyCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo dependencyCountAt(long index, @CType("uint32_t") int value) { VkRenderPassMultiviewCreateInfo.set_dependencyCount(this.segment(), index, value); return this; } + /// Sets `dependencyCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo dependencyCount(@CType("uint32_t") int value) { VkRenderPassMultiviewCreateInfo.set_dependencyCount(this.segment(), value); return this; } + + /// {@return `pViewOffsets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const int32_t *") java.lang.foreign.MemorySegment get_pViewOffsets(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pViewOffsets.get(segment, 0L, index); } + /// {@return `pViewOffsets`} + /// @param segment the segment of the struct + public static @CType("const int32_t *") java.lang.foreign.MemorySegment get_pViewOffsets(MemorySegment segment) { return VkRenderPassMultiviewCreateInfo.get_pViewOffsets(segment, 0L); } + /// {@return `pViewOffsets` at the given index} + /// @param index the index + public @CType("const int32_t *") java.lang.foreign.MemorySegment pViewOffsetsAt(long index) { return VkRenderPassMultiviewCreateInfo.get_pViewOffsets(this.segment(), index); } + /// {@return `pViewOffsets`} + public @CType("const int32_t *") java.lang.foreign.MemorySegment pViewOffsets() { return VkRenderPassMultiviewCreateInfo.get_pViewOffsets(this.segment()); } + /// Sets `pViewOffsets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pViewOffsets(MemorySegment segment, long index, @CType("const int32_t *") java.lang.foreign.MemorySegment value) { VH_pViewOffsets.set(segment, 0L, index, value); } + /// Sets `pViewOffsets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pViewOffsets(MemorySegment segment, @CType("const int32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pViewOffsets(segment, 0L, value); } + /// Sets `pViewOffsets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo pViewOffsetsAt(long index, @CType("const int32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pViewOffsets(this.segment(), index, value); return this; } + /// Sets `pViewOffsets` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo pViewOffsets(@CType("const int32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pViewOffsets(this.segment(), value); return this; } + + /// {@return `correlationMaskCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_correlationMaskCount(MemorySegment segment, long index) { return (int) VH_correlationMaskCount.get(segment, 0L, index); } + /// {@return `correlationMaskCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_correlationMaskCount(MemorySegment segment) { return VkRenderPassMultiviewCreateInfo.get_correlationMaskCount(segment, 0L); } + /// {@return `correlationMaskCount` at the given index} + /// @param index the index + public @CType("uint32_t") int correlationMaskCountAt(long index) { return VkRenderPassMultiviewCreateInfo.get_correlationMaskCount(this.segment(), index); } + /// {@return `correlationMaskCount`} + public @CType("uint32_t") int correlationMaskCount() { return VkRenderPassMultiviewCreateInfo.get_correlationMaskCount(this.segment()); } + /// Sets `correlationMaskCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_correlationMaskCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_correlationMaskCount.set(segment, 0L, index, value); } + /// Sets `correlationMaskCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_correlationMaskCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderPassMultiviewCreateInfo.set_correlationMaskCount(segment, 0L, value); } + /// Sets `correlationMaskCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo correlationMaskCountAt(long index, @CType("uint32_t") int value) { VkRenderPassMultiviewCreateInfo.set_correlationMaskCount(this.segment(), index, value); return this; } + /// Sets `correlationMaskCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo correlationMaskCount(@CType("uint32_t") int value) { VkRenderPassMultiviewCreateInfo.set_correlationMaskCount(this.segment(), value); return this; } + + /// {@return `pCorrelationMasks` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pCorrelationMasks(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCorrelationMasks.get(segment, 0L, index); } + /// {@return `pCorrelationMasks`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pCorrelationMasks(MemorySegment segment) { return VkRenderPassMultiviewCreateInfo.get_pCorrelationMasks(segment, 0L); } + /// {@return `pCorrelationMasks` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pCorrelationMasksAt(long index) { return VkRenderPassMultiviewCreateInfo.get_pCorrelationMasks(this.segment(), index); } + /// {@return `pCorrelationMasks`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pCorrelationMasks() { return VkRenderPassMultiviewCreateInfo.get_pCorrelationMasks(this.segment()); } + /// Sets `pCorrelationMasks` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCorrelationMasks(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pCorrelationMasks.set(segment, 0L, index, value); } + /// Sets `pCorrelationMasks` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCorrelationMasks(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pCorrelationMasks(segment, 0L, value); } + /// Sets `pCorrelationMasks` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo pCorrelationMasksAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pCorrelationMasks(this.segment(), index, value); return this; } + /// Sets `pCorrelationMasks` with the given value. + /// @param value the value + /// @return `this` + public VkRenderPassMultiviewCreateInfo pCorrelationMasks(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderPassMultiviewCreateInfo.set_pCorrelationMasks(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingAreaInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingAreaInfo.java new file mode 100644 index 00000000..a9b0a939 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingAreaInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### viewMask +/// [VarHandle][#VH_viewMask] - [Getter][#viewMask()] - [Setter][#viewMask(int)] +/// ### colorAttachmentCount +/// [VarHandle][#VH_colorAttachmentCount] - [Getter][#colorAttachmentCount()] - [Setter][#colorAttachmentCount(int)] +/// ### pColorAttachmentFormats +/// [VarHandle][#VH_pColorAttachmentFormats] - [Getter][#pColorAttachmentFormats()] - [Setter][#pColorAttachmentFormats(java.lang.foreign.MemorySegment)] +/// ### depthAttachmentFormat +/// [VarHandle][#VH_depthAttachmentFormat] - [Getter][#depthAttachmentFormat()] - [Setter][#depthAttachmentFormat(int)] +/// ### stencilAttachmentFormat +/// [VarHandle][#VH_stencilAttachmentFormat] - [Getter][#stencilAttachmentFormat()] - [Setter][#stencilAttachmentFormat(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderingAreaInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t viewMask; +/// uint32_t colorAttachmentCount; +/// const VkFormat * pColorAttachmentFormats; +/// VkFormat depthAttachmentFormat; +/// VkFormat stencilAttachmentFormat; +/// } VkRenderingAreaInfo; +/// ``` +public final class VkRenderingAreaInfo extends Struct { + /// The struct layout of `VkRenderingAreaInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("viewMask"), + ValueLayout.JAVA_INT.withName("colorAttachmentCount"), + ValueLayout.ADDRESS.withName("pColorAttachmentFormats"), + ValueLayout.JAVA_INT.withName("depthAttachmentFormat"), + ValueLayout.JAVA_INT.withName("stencilAttachmentFormat") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `viewMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewMask")); + /// The [VarHandle] of `colorAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachmentCount")); + /// The [VarHandle] of `pColorAttachmentFormats` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorAttachmentFormats = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorAttachmentFormats")); + /// The [VarHandle] of `depthAttachmentFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthAttachmentFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthAttachmentFormat")); + /// The [VarHandle] of `stencilAttachmentFormat` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilAttachmentFormat = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilAttachmentFormat")); + + /// Creates `VkRenderingAreaInfo` with the given segment. + /// @param segment the memory segment + public VkRenderingAreaInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderingAreaInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingAreaInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingAreaInfo(segment); } + + /// Creates `VkRenderingAreaInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingAreaInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingAreaInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderingAreaInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingAreaInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingAreaInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderingAreaInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderingAreaInfo` + public static VkRenderingAreaInfo alloc(SegmentAllocator allocator) { return new VkRenderingAreaInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderingAreaInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderingAreaInfo` + public static VkRenderingAreaInfo alloc(SegmentAllocator allocator, long count) { return new VkRenderingAreaInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderingAreaInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderingAreaInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderingAreaInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderingAreaInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderingAreaInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo sType(@CType("VkStructureType") int value) { VkRenderingAreaInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderingAreaInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderingAreaInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderingAreaInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingAreaInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingAreaInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingAreaInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `viewMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewMask(MemorySegment segment, long index) { return (int) VH_viewMask.get(segment, 0L, index); } + /// {@return `viewMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewMask(MemorySegment segment) { return VkRenderingAreaInfo.get_viewMask(segment, 0L); } + /// {@return `viewMask` at the given index} + /// @param index the index + public @CType("uint32_t") int viewMaskAt(long index) { return VkRenderingAreaInfo.get_viewMask(this.segment(), index); } + /// {@return `viewMask`} + public @CType("uint32_t") int viewMask() { return VkRenderingAreaInfo.get_viewMask(this.segment()); } + /// Sets `viewMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewMask.set(segment, 0L, index, value); } + /// Sets `viewMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewMask(MemorySegment segment, @CType("uint32_t") int value) { VkRenderingAreaInfo.set_viewMask(segment, 0L, value); } + /// Sets `viewMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo viewMaskAt(long index, @CType("uint32_t") int value) { VkRenderingAreaInfo.set_viewMask(this.segment(), index, value); return this; } + /// Sets `viewMask` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo viewMask(@CType("uint32_t") int value) { VkRenderingAreaInfo.set_viewMask(this.segment(), value); return this; } + + /// {@return `colorAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment, long index) { return (int) VH_colorAttachmentCount.get(segment, 0L, index); } + /// {@return `colorAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment) { return VkRenderingAreaInfo.get_colorAttachmentCount(segment, 0L); } + /// {@return `colorAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int colorAttachmentCountAt(long index) { return VkRenderingAreaInfo.get_colorAttachmentCount(this.segment(), index); } + /// {@return `colorAttachmentCount`} + public @CType("uint32_t") int colorAttachmentCount() { return VkRenderingAreaInfo.get_colorAttachmentCount(this.segment()); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorAttachmentCount.set(segment, 0L, index, value); } + /// Sets `colorAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderingAreaInfo.set_colorAttachmentCount(segment, 0L, value); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo colorAttachmentCountAt(long index, @CType("uint32_t") int value) { VkRenderingAreaInfo.set_colorAttachmentCount(this.segment(), index, value); return this; } + /// Sets `colorAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo colorAttachmentCount(@CType("uint32_t") int value) { VkRenderingAreaInfo.set_colorAttachmentCount(this.segment(), value); return this; } + + /// {@return `pColorAttachmentFormats` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkFormat *") java.lang.foreign.MemorySegment get_pColorAttachmentFormats(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorAttachmentFormats.get(segment, 0L, index); } + /// {@return `pColorAttachmentFormats`} + /// @param segment the segment of the struct + public static @CType("const VkFormat *") java.lang.foreign.MemorySegment get_pColorAttachmentFormats(MemorySegment segment) { return VkRenderingAreaInfo.get_pColorAttachmentFormats(segment, 0L); } + /// {@return `pColorAttachmentFormats` at the given index} + /// @param index the index + public @CType("const VkFormat *") java.lang.foreign.MemorySegment pColorAttachmentFormatsAt(long index) { return VkRenderingAreaInfo.get_pColorAttachmentFormats(this.segment(), index); } + /// {@return `pColorAttachmentFormats`} + public @CType("const VkFormat *") java.lang.foreign.MemorySegment pColorAttachmentFormats() { return VkRenderingAreaInfo.get_pColorAttachmentFormats(this.segment()); } + /// Sets `pColorAttachmentFormats` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorAttachmentFormats(MemorySegment segment, long index, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VH_pColorAttachmentFormats.set(segment, 0L, index, value); } + /// Sets `pColorAttachmentFormats` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorAttachmentFormats(MemorySegment segment, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkRenderingAreaInfo.set_pColorAttachmentFormats(segment, 0L, value); } + /// Sets `pColorAttachmentFormats` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo pColorAttachmentFormatsAt(long index, @CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkRenderingAreaInfo.set_pColorAttachmentFormats(this.segment(), index, value); return this; } + /// Sets `pColorAttachmentFormats` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo pColorAttachmentFormats(@CType("const VkFormat *") java.lang.foreign.MemorySegment value) { VkRenderingAreaInfo.set_pColorAttachmentFormats(this.segment(), value); return this; } + + /// {@return `depthAttachmentFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_depthAttachmentFormat(MemorySegment segment, long index) { return (int) VH_depthAttachmentFormat.get(segment, 0L, index); } + /// {@return `depthAttachmentFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_depthAttachmentFormat(MemorySegment segment) { return VkRenderingAreaInfo.get_depthAttachmentFormat(segment, 0L); } + /// {@return `depthAttachmentFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int depthAttachmentFormatAt(long index) { return VkRenderingAreaInfo.get_depthAttachmentFormat(this.segment(), index); } + /// {@return `depthAttachmentFormat`} + public @CType("VkFormat") int depthAttachmentFormat() { return VkRenderingAreaInfo.get_depthAttachmentFormat(this.segment()); } + /// Sets `depthAttachmentFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthAttachmentFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_depthAttachmentFormat.set(segment, 0L, index, value); } + /// Sets `depthAttachmentFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthAttachmentFormat(MemorySegment segment, @CType("VkFormat") int value) { VkRenderingAreaInfo.set_depthAttachmentFormat(segment, 0L, value); } + /// Sets `depthAttachmentFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo depthAttachmentFormatAt(long index, @CType("VkFormat") int value) { VkRenderingAreaInfo.set_depthAttachmentFormat(this.segment(), index, value); return this; } + /// Sets `depthAttachmentFormat` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo depthAttachmentFormat(@CType("VkFormat") int value) { VkRenderingAreaInfo.set_depthAttachmentFormat(this.segment(), value); return this; } + + /// {@return `stencilAttachmentFormat` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_stencilAttachmentFormat(MemorySegment segment, long index) { return (int) VH_stencilAttachmentFormat.get(segment, 0L, index); } + /// {@return `stencilAttachmentFormat`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_stencilAttachmentFormat(MemorySegment segment) { return VkRenderingAreaInfo.get_stencilAttachmentFormat(segment, 0L); } + /// {@return `stencilAttachmentFormat` at the given index} + /// @param index the index + public @CType("VkFormat") int stencilAttachmentFormatAt(long index) { return VkRenderingAreaInfo.get_stencilAttachmentFormat(this.segment(), index); } + /// {@return `stencilAttachmentFormat`} + public @CType("VkFormat") int stencilAttachmentFormat() { return VkRenderingAreaInfo.get_stencilAttachmentFormat(this.segment()); } + /// Sets `stencilAttachmentFormat` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilAttachmentFormat(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_stencilAttachmentFormat.set(segment, 0L, index, value); } + /// Sets `stencilAttachmentFormat` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilAttachmentFormat(MemorySegment segment, @CType("VkFormat") int value) { VkRenderingAreaInfo.set_stencilAttachmentFormat(segment, 0L, value); } + /// Sets `stencilAttachmentFormat` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo stencilAttachmentFormatAt(long index, @CType("VkFormat") int value) { VkRenderingAreaInfo.set_stencilAttachmentFormat(this.segment(), index, value); return this; } + /// Sets `stencilAttachmentFormat` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAreaInfo stencilAttachmentFormat(@CType("VkFormat") int value) { VkRenderingAreaInfo.set_stencilAttachmentFormat(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingAttachmentInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingAttachmentInfo.java new file mode 100644 index 00000000..9c3dbc81 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingAttachmentInfo.java @@ -0,0 +1,446 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### imageView +/// [VarHandle][#VH_imageView] - [Getter][#imageView()] - [Setter][#imageView(java.lang.foreign.MemorySegment)] +/// ### imageLayout +/// [VarHandle][#VH_imageLayout] - [Getter][#imageLayout()] - [Setter][#imageLayout(int)] +/// ### resolveMode +/// [VarHandle][#VH_resolveMode] - [Getter][#resolveMode()] - [Setter][#resolveMode(int)] +/// ### resolveImageView +/// [VarHandle][#VH_resolveImageView] - [Getter][#resolveImageView()] - [Setter][#resolveImageView(java.lang.foreign.MemorySegment)] +/// ### resolveImageLayout +/// [VarHandle][#VH_resolveImageLayout] - [Getter][#resolveImageLayout()] - [Setter][#resolveImageLayout(int)] +/// ### loadOp +/// [VarHandle][#VH_loadOp] - [Getter][#loadOp()] - [Setter][#loadOp(int)] +/// ### storeOp +/// [VarHandle][#VH_storeOp] - [Getter][#storeOp()] - [Setter][#storeOp(int)] +/// ### clearValue +/// [Byte offset][#OFFSET_clearValue] - [Memory layout][#ML_clearValue] - [Getter][#clearValue()] - [Setter][#clearValue(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderingAttachmentInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkImageView imageView; +/// VkImageLayout imageLayout; +/// VkResolveModeFlagBits resolveMode; +/// VkImageView resolveImageView; +/// VkImageLayout resolveImageLayout; +/// VkAttachmentLoadOp loadOp; +/// VkAttachmentStoreOp storeOp; +/// VkClearValue clearValue; +/// } VkRenderingAttachmentInfo; +/// ``` +public final class VkRenderingAttachmentInfo extends Struct { + /// The struct layout of `VkRenderingAttachmentInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("imageView"), + ValueLayout.JAVA_INT.withName("imageLayout"), + ValueLayout.JAVA_INT.withName("resolveMode"), + ValueLayout.ADDRESS.withName("resolveImageView"), + ValueLayout.JAVA_INT.withName("resolveImageLayout"), + ValueLayout.JAVA_INT.withName("loadOp"), + ValueLayout.JAVA_INT.withName("storeOp"), + overrungl.vulkan.union.VkClearValue.LAYOUT.withName("clearValue") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `imageView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_imageView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageView")); + /// The [VarHandle] of `imageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageLayout")); + /// The [VarHandle] of `resolveMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_resolveMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("resolveMode")); + /// The [VarHandle] of `resolveImageView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_resolveImageView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("resolveImageView")); + /// The [VarHandle] of `resolveImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_resolveImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("resolveImageLayout")); + /// The [VarHandle] of `loadOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_loadOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("loadOp")); + /// The [VarHandle] of `storeOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_storeOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("storeOp")); + /// The byte offset of `clearValue`. + public static final long OFFSET_clearValue = LAYOUT.byteOffset(PathElement.groupElement("clearValue")); + /// The memory layout of `clearValue`. + public static final MemoryLayout ML_clearValue = LAYOUT.select(PathElement.groupElement("clearValue")); + + /// Creates `VkRenderingAttachmentInfo` with the given segment. + /// @param segment the memory segment + public VkRenderingAttachmentInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderingAttachmentInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingAttachmentInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingAttachmentInfo(segment); } + + /// Creates `VkRenderingAttachmentInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingAttachmentInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingAttachmentInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderingAttachmentInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingAttachmentInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingAttachmentInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderingAttachmentInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderingAttachmentInfo` + public static VkRenderingAttachmentInfo alloc(SegmentAllocator allocator) { return new VkRenderingAttachmentInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderingAttachmentInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderingAttachmentInfo` + public static VkRenderingAttachmentInfo alloc(SegmentAllocator allocator, long count) { return new VkRenderingAttachmentInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderingAttachmentInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderingAttachmentInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderingAttachmentInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderingAttachmentInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderingAttachmentInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo sType(@CType("VkStructureType") int value) { VkRenderingAttachmentInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderingAttachmentInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderingAttachmentInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderingAttachmentInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `imageView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_imageView.get(segment, 0L, index); } + /// {@return `imageView`} + /// @param segment the segment of the struct + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_imageView(MemorySegment segment) { return VkRenderingAttachmentInfo.get_imageView(segment, 0L); } + /// {@return `imageView` at the given index} + /// @param index the index + public @CType("VkImageView") java.lang.foreign.MemorySegment imageViewAt(long index) { return VkRenderingAttachmentInfo.get_imageView(this.segment(), index); } + /// {@return `imageView`} + public @CType("VkImageView") java.lang.foreign.MemorySegment imageView() { return VkRenderingAttachmentInfo.get_imageView(this.segment()); } + /// Sets `imageView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageView(MemorySegment segment, long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VH_imageView.set(segment, 0L, index, value); } + /// Sets `imageView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageView(MemorySegment segment, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_imageView(segment, 0L, value); } + /// Sets `imageView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo imageViewAt(long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_imageView(this.segment(), index, value); return this; } + /// Sets `imageView` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo imageView(@CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_imageView(this.segment(), value); return this; } + + /// {@return `imageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_imageLayout(MemorySegment segment, long index) { return (int) VH_imageLayout.get(segment, 0L, index); } + /// {@return `imageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_imageLayout(MemorySegment segment) { return VkRenderingAttachmentInfo.get_imageLayout(segment, 0L); } + /// {@return `imageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int imageLayoutAt(long index) { return VkRenderingAttachmentInfo.get_imageLayout(this.segment(), index); } + /// {@return `imageLayout`} + public @CType("VkImageLayout") int imageLayout() { return VkRenderingAttachmentInfo.get_imageLayout(this.segment()); } + /// Sets `imageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_imageLayout.set(segment, 0L, index, value); } + /// Sets `imageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkRenderingAttachmentInfo.set_imageLayout(segment, 0L, value); } + /// Sets `imageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo imageLayoutAt(long index, @CType("VkImageLayout") int value) { VkRenderingAttachmentInfo.set_imageLayout(this.segment(), index, value); return this; } + /// Sets `imageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo imageLayout(@CType("VkImageLayout") int value) { VkRenderingAttachmentInfo.set_imageLayout(this.segment(), value); return this; } + + /// {@return `resolveMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkResolveModeFlagBits") int get_resolveMode(MemorySegment segment, long index) { return (int) VH_resolveMode.get(segment, 0L, index); } + /// {@return `resolveMode`} + /// @param segment the segment of the struct + public static @CType("VkResolveModeFlagBits") int get_resolveMode(MemorySegment segment) { return VkRenderingAttachmentInfo.get_resolveMode(segment, 0L); } + /// {@return `resolveMode` at the given index} + /// @param index the index + public @CType("VkResolveModeFlagBits") int resolveModeAt(long index) { return VkRenderingAttachmentInfo.get_resolveMode(this.segment(), index); } + /// {@return `resolveMode`} + public @CType("VkResolveModeFlagBits") int resolveMode() { return VkRenderingAttachmentInfo.get_resolveMode(this.segment()); } + /// Sets `resolveMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_resolveMode(MemorySegment segment, long index, @CType("VkResolveModeFlagBits") int value) { VH_resolveMode.set(segment, 0L, index, value); } + /// Sets `resolveMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_resolveMode(MemorySegment segment, @CType("VkResolveModeFlagBits") int value) { VkRenderingAttachmentInfo.set_resolveMode(segment, 0L, value); } + /// Sets `resolveMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo resolveModeAt(long index, @CType("VkResolveModeFlagBits") int value) { VkRenderingAttachmentInfo.set_resolveMode(this.segment(), index, value); return this; } + /// Sets `resolveMode` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo resolveMode(@CType("VkResolveModeFlagBits") int value) { VkRenderingAttachmentInfo.set_resolveMode(this.segment(), value); return this; } + + /// {@return `resolveImageView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_resolveImageView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_resolveImageView.get(segment, 0L, index); } + /// {@return `resolveImageView`} + /// @param segment the segment of the struct + public static @CType("VkImageView") java.lang.foreign.MemorySegment get_resolveImageView(MemorySegment segment) { return VkRenderingAttachmentInfo.get_resolveImageView(segment, 0L); } + /// {@return `resolveImageView` at the given index} + /// @param index the index + public @CType("VkImageView") java.lang.foreign.MemorySegment resolveImageViewAt(long index) { return VkRenderingAttachmentInfo.get_resolveImageView(this.segment(), index); } + /// {@return `resolveImageView`} + public @CType("VkImageView") java.lang.foreign.MemorySegment resolveImageView() { return VkRenderingAttachmentInfo.get_resolveImageView(this.segment()); } + /// Sets `resolveImageView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_resolveImageView(MemorySegment segment, long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VH_resolveImageView.set(segment, 0L, index, value); } + /// Sets `resolveImageView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_resolveImageView(MemorySegment segment, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_resolveImageView(segment, 0L, value); } + /// Sets `resolveImageView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo resolveImageViewAt(long index, @CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_resolveImageView(this.segment(), index, value); return this; } + /// Sets `resolveImageView` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo resolveImageView(@CType("VkImageView") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_resolveImageView(this.segment(), value); return this; } + + /// {@return `resolveImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_resolveImageLayout(MemorySegment segment, long index) { return (int) VH_resolveImageLayout.get(segment, 0L, index); } + /// {@return `resolveImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_resolveImageLayout(MemorySegment segment) { return VkRenderingAttachmentInfo.get_resolveImageLayout(segment, 0L); } + /// {@return `resolveImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int resolveImageLayoutAt(long index) { return VkRenderingAttachmentInfo.get_resolveImageLayout(this.segment(), index); } + /// {@return `resolveImageLayout`} + public @CType("VkImageLayout") int resolveImageLayout() { return VkRenderingAttachmentInfo.get_resolveImageLayout(this.segment()); } + /// Sets `resolveImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_resolveImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_resolveImageLayout.set(segment, 0L, index, value); } + /// Sets `resolveImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_resolveImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkRenderingAttachmentInfo.set_resolveImageLayout(segment, 0L, value); } + /// Sets `resolveImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo resolveImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkRenderingAttachmentInfo.set_resolveImageLayout(this.segment(), index, value); return this; } + /// Sets `resolveImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo resolveImageLayout(@CType("VkImageLayout") int value) { VkRenderingAttachmentInfo.set_resolveImageLayout(this.segment(), value); return this; } + + /// {@return `loadOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentLoadOp") int get_loadOp(MemorySegment segment, long index) { return (int) VH_loadOp.get(segment, 0L, index); } + /// {@return `loadOp`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentLoadOp") int get_loadOp(MemorySegment segment) { return VkRenderingAttachmentInfo.get_loadOp(segment, 0L); } + /// {@return `loadOp` at the given index} + /// @param index the index + public @CType("VkAttachmentLoadOp") int loadOpAt(long index) { return VkRenderingAttachmentInfo.get_loadOp(this.segment(), index); } + /// {@return `loadOp`} + public @CType("VkAttachmentLoadOp") int loadOp() { return VkRenderingAttachmentInfo.get_loadOp(this.segment()); } + /// Sets `loadOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_loadOp(MemorySegment segment, long index, @CType("VkAttachmentLoadOp") int value) { VH_loadOp.set(segment, 0L, index, value); } + /// Sets `loadOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_loadOp(MemorySegment segment, @CType("VkAttachmentLoadOp") int value) { VkRenderingAttachmentInfo.set_loadOp(segment, 0L, value); } + /// Sets `loadOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo loadOpAt(long index, @CType("VkAttachmentLoadOp") int value) { VkRenderingAttachmentInfo.set_loadOp(this.segment(), index, value); return this; } + /// Sets `loadOp` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo loadOp(@CType("VkAttachmentLoadOp") int value) { VkRenderingAttachmentInfo.set_loadOp(this.segment(), value); return this; } + + /// {@return `storeOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAttachmentStoreOp") int get_storeOp(MemorySegment segment, long index) { return (int) VH_storeOp.get(segment, 0L, index); } + /// {@return `storeOp`} + /// @param segment the segment of the struct + public static @CType("VkAttachmentStoreOp") int get_storeOp(MemorySegment segment) { return VkRenderingAttachmentInfo.get_storeOp(segment, 0L); } + /// {@return `storeOp` at the given index} + /// @param index the index + public @CType("VkAttachmentStoreOp") int storeOpAt(long index) { return VkRenderingAttachmentInfo.get_storeOp(this.segment(), index); } + /// {@return `storeOp`} + public @CType("VkAttachmentStoreOp") int storeOp() { return VkRenderingAttachmentInfo.get_storeOp(this.segment()); } + /// Sets `storeOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_storeOp(MemorySegment segment, long index, @CType("VkAttachmentStoreOp") int value) { VH_storeOp.set(segment, 0L, index, value); } + /// Sets `storeOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_storeOp(MemorySegment segment, @CType("VkAttachmentStoreOp") int value) { VkRenderingAttachmentInfo.set_storeOp(segment, 0L, value); } + /// Sets `storeOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo storeOpAt(long index, @CType("VkAttachmentStoreOp") int value) { VkRenderingAttachmentInfo.set_storeOp(this.segment(), index, value); return this; } + /// Sets `storeOp` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo storeOp(@CType("VkAttachmentStoreOp") int value) { VkRenderingAttachmentInfo.set_storeOp(this.segment(), value); return this; } + + /// {@return `clearValue` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkClearValue") java.lang.foreign.MemorySegment get_clearValue(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_clearValue, index), ML_clearValue); } + /// {@return `clearValue`} + /// @param segment the segment of the struct + public static @CType("VkClearValue") java.lang.foreign.MemorySegment get_clearValue(MemorySegment segment) { return VkRenderingAttachmentInfo.get_clearValue(segment, 0L); } + /// {@return `clearValue` at the given index} + /// @param index the index + public @CType("VkClearValue") java.lang.foreign.MemorySegment clearValueAt(long index) { return VkRenderingAttachmentInfo.get_clearValue(this.segment(), index); } + /// {@return `clearValue`} + public @CType("VkClearValue") java.lang.foreign.MemorySegment clearValue() { return VkRenderingAttachmentInfo.get_clearValue(this.segment()); } + /// Sets `clearValue` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_clearValue(MemorySegment segment, long index, @CType("VkClearValue") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_clearValue, index), ML_clearValue.byteSize()); } + /// Sets `clearValue` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_clearValue(MemorySegment segment, @CType("VkClearValue") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_clearValue(segment, 0L, value); } + /// Sets `clearValue` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo clearValueAt(long index, @CType("VkClearValue") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_clearValue(this.segment(), index, value); return this; } + /// Sets `clearValue` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentInfo clearValue(@CType("VkClearValue") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentInfo.set_clearValue(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingAttachmentLocationInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingAttachmentLocationInfo.java new file mode 100644 index 00000000..f786f868 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingAttachmentLocationInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### colorAttachmentCount +/// [VarHandle][#VH_colorAttachmentCount] - [Getter][#colorAttachmentCount()] - [Setter][#colorAttachmentCount(int)] +/// ### pColorAttachmentLocations +/// [VarHandle][#VH_pColorAttachmentLocations] - [Getter][#pColorAttachmentLocations()] - [Setter][#pColorAttachmentLocations(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderingAttachmentLocationInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t colorAttachmentCount; +/// const uint32_t * pColorAttachmentLocations; +/// } VkRenderingAttachmentLocationInfo; +/// ``` +public final class VkRenderingAttachmentLocationInfo extends Struct { + /// The struct layout of `VkRenderingAttachmentLocationInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("colorAttachmentCount"), + ValueLayout.ADDRESS.withName("pColorAttachmentLocations") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `colorAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachmentCount")); + /// The [VarHandle] of `pColorAttachmentLocations` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorAttachmentLocations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorAttachmentLocations")); + + /// Creates `VkRenderingAttachmentLocationInfo` with the given segment. + /// @param segment the memory segment + public VkRenderingAttachmentLocationInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderingAttachmentLocationInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingAttachmentLocationInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingAttachmentLocationInfo(segment); } + + /// Creates `VkRenderingAttachmentLocationInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingAttachmentLocationInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingAttachmentLocationInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderingAttachmentLocationInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingAttachmentLocationInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingAttachmentLocationInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderingAttachmentLocationInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderingAttachmentLocationInfo` + public static VkRenderingAttachmentLocationInfo alloc(SegmentAllocator allocator) { return new VkRenderingAttachmentLocationInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderingAttachmentLocationInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderingAttachmentLocationInfo` + public static VkRenderingAttachmentLocationInfo alloc(SegmentAllocator allocator, long count) { return new VkRenderingAttachmentLocationInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderingAttachmentLocationInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderingAttachmentLocationInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderingAttachmentLocationInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderingAttachmentLocationInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentLocationInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderingAttachmentLocationInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentLocationInfo sType(@CType("VkStructureType") int value) { VkRenderingAttachmentLocationInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderingAttachmentLocationInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderingAttachmentLocationInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderingAttachmentLocationInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentLocationInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentLocationInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentLocationInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentLocationInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentLocationInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `colorAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment, long index) { return (int) VH_colorAttachmentCount.get(segment, 0L, index); } + /// {@return `colorAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment) { return VkRenderingAttachmentLocationInfo.get_colorAttachmentCount(segment, 0L); } + /// {@return `colorAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int colorAttachmentCountAt(long index) { return VkRenderingAttachmentLocationInfo.get_colorAttachmentCount(this.segment(), index); } + /// {@return `colorAttachmentCount`} + public @CType("uint32_t") int colorAttachmentCount() { return VkRenderingAttachmentLocationInfo.get_colorAttachmentCount(this.segment()); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorAttachmentCount.set(segment, 0L, index, value); } + /// Sets `colorAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderingAttachmentLocationInfo.set_colorAttachmentCount(segment, 0L, value); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentLocationInfo colorAttachmentCountAt(long index, @CType("uint32_t") int value) { VkRenderingAttachmentLocationInfo.set_colorAttachmentCount(this.segment(), index, value); return this; } + /// Sets `colorAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentLocationInfo colorAttachmentCount(@CType("uint32_t") int value) { VkRenderingAttachmentLocationInfo.set_colorAttachmentCount(this.segment(), value); return this; } + + /// {@return `pColorAttachmentLocations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pColorAttachmentLocations(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorAttachmentLocations.get(segment, 0L, index); } + /// {@return `pColorAttachmentLocations`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pColorAttachmentLocations(MemorySegment segment) { return VkRenderingAttachmentLocationInfo.get_pColorAttachmentLocations(segment, 0L); } + /// {@return `pColorAttachmentLocations` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pColorAttachmentLocationsAt(long index) { return VkRenderingAttachmentLocationInfo.get_pColorAttachmentLocations(this.segment(), index); } + /// {@return `pColorAttachmentLocations`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pColorAttachmentLocations() { return VkRenderingAttachmentLocationInfo.get_pColorAttachmentLocations(this.segment()); } + /// Sets `pColorAttachmentLocations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorAttachmentLocations(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pColorAttachmentLocations.set(segment, 0L, index, value); } + /// Sets `pColorAttachmentLocations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorAttachmentLocations(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentLocationInfo.set_pColorAttachmentLocations(segment, 0L, value); } + /// Sets `pColorAttachmentLocations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingAttachmentLocationInfo pColorAttachmentLocationsAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentLocationInfo.set_pColorAttachmentLocations(this.segment(), index, value); return this; } + /// Sets `pColorAttachmentLocations` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingAttachmentLocationInfo pColorAttachmentLocations(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingAttachmentLocationInfo.set_pColorAttachmentLocations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingInfo.java new file mode 100644 index 00000000..20082ac2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingInfo.java @@ -0,0 +1,446 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### renderArea +/// [Byte offset][#OFFSET_renderArea] - [Memory layout][#ML_renderArea] - [Getter][#renderArea()] - [Setter][#renderArea(java.lang.foreign.MemorySegment)] +/// ### layerCount +/// [VarHandle][#VH_layerCount] - [Getter][#layerCount()] - [Setter][#layerCount(int)] +/// ### viewMask +/// [VarHandle][#VH_viewMask] - [Getter][#viewMask()] - [Setter][#viewMask(int)] +/// ### colorAttachmentCount +/// [VarHandle][#VH_colorAttachmentCount] - [Getter][#colorAttachmentCount()] - [Setter][#colorAttachmentCount(int)] +/// ### pColorAttachments +/// [VarHandle][#VH_pColorAttachments] - [Getter][#pColorAttachments()] - [Setter][#pColorAttachments(java.lang.foreign.MemorySegment)] +/// ### pDepthAttachment +/// [VarHandle][#VH_pDepthAttachment] - [Getter][#pDepthAttachment()] - [Setter][#pDepthAttachment(java.lang.foreign.MemorySegment)] +/// ### pStencilAttachment +/// [VarHandle][#VH_pStencilAttachment] - [Getter][#pStencilAttachment()] - [Setter][#pStencilAttachment(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderingInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkRenderingFlags flags; +/// VkRect2D renderArea; +/// uint32_t layerCount; +/// uint32_t viewMask; +/// uint32_t colorAttachmentCount; +/// const VkRenderingAttachmentInfo * pColorAttachments; +/// const VkRenderingAttachmentInfo * pDepthAttachment; +/// const VkRenderingAttachmentInfo * pStencilAttachment; +/// } VkRenderingInfo; +/// ``` +public final class VkRenderingInfo extends Struct { + /// The struct layout of `VkRenderingInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + overrungl.vulkan.struct.VkRect2D.LAYOUT.withName("renderArea"), + ValueLayout.JAVA_INT.withName("layerCount"), + ValueLayout.JAVA_INT.withName("viewMask"), + ValueLayout.JAVA_INT.withName("colorAttachmentCount"), + ValueLayout.ADDRESS.withName("pColorAttachments"), + ValueLayout.ADDRESS.withName("pDepthAttachment"), + ValueLayout.ADDRESS.withName("pStencilAttachment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The byte offset of `renderArea`. + public static final long OFFSET_renderArea = LAYOUT.byteOffset(PathElement.groupElement("renderArea")); + /// The memory layout of `renderArea`. + public static final MemoryLayout ML_renderArea = LAYOUT.select(PathElement.groupElement("renderArea")); + /// The [VarHandle] of `layerCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_layerCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("layerCount")); + /// The [VarHandle] of `viewMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewMask")); + /// The [VarHandle] of `colorAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachmentCount")); + /// The [VarHandle] of `pColorAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorAttachments")); + /// The [VarHandle] of `pDepthAttachment` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDepthAttachment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDepthAttachment")); + /// The [VarHandle] of `pStencilAttachment` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStencilAttachment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStencilAttachment")); + + /// Creates `VkRenderingInfo` with the given segment. + /// @param segment the memory segment + public VkRenderingInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderingInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingInfo(segment); } + + /// Creates `VkRenderingInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderingInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderingInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderingInfo` + public static VkRenderingInfo alloc(SegmentAllocator allocator) { return new VkRenderingInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderingInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderingInfo` + public static VkRenderingInfo alloc(SegmentAllocator allocator, long count) { return new VkRenderingInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderingInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderingInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderingInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderingInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderingInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInfo sType(@CType("VkStructureType") int value) { VkRenderingInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderingInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderingInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderingInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRenderingFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkRenderingFlags") int get_flags(MemorySegment segment) { return VkRenderingInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkRenderingFlags") int flagsAt(long index) { return VkRenderingInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkRenderingFlags") int flags() { return VkRenderingInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkRenderingFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkRenderingFlags") int value) { VkRenderingInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInfo flagsAt(long index, @CType("VkRenderingFlags") int value) { VkRenderingInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInfo flags(@CType("VkRenderingFlags") int value) { VkRenderingInfo.set_flags(this.segment(), value); return this; } + + /// {@return `renderArea` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_renderArea(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_renderArea, index), ML_renderArea); } + /// {@return `renderArea`} + /// @param segment the segment of the struct + public static @CType("VkRect2D") java.lang.foreign.MemorySegment get_renderArea(MemorySegment segment) { return VkRenderingInfo.get_renderArea(segment, 0L); } + /// {@return `renderArea` at the given index} + /// @param index the index + public @CType("VkRect2D") java.lang.foreign.MemorySegment renderAreaAt(long index) { return VkRenderingInfo.get_renderArea(this.segment(), index); } + /// {@return `renderArea`} + public @CType("VkRect2D") java.lang.foreign.MemorySegment renderArea() { return VkRenderingInfo.get_renderArea(this.segment()); } + /// Sets `renderArea` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_renderArea(MemorySegment segment, long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_renderArea, index), ML_renderArea.byteSize()); } + /// Sets `renderArea` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_renderArea(MemorySegment segment, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_renderArea(segment, 0L, value); } + /// Sets `renderArea` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInfo renderAreaAt(long index, @CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_renderArea(this.segment(), index, value); return this; } + /// Sets `renderArea` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInfo renderArea(@CType("VkRect2D") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_renderArea(this.segment(), value); return this; } + + /// {@return `layerCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_layerCount(MemorySegment segment, long index) { return (int) VH_layerCount.get(segment, 0L, index); } + /// {@return `layerCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_layerCount(MemorySegment segment) { return VkRenderingInfo.get_layerCount(segment, 0L); } + /// {@return `layerCount` at the given index} + /// @param index the index + public @CType("uint32_t") int layerCountAt(long index) { return VkRenderingInfo.get_layerCount(this.segment(), index); } + /// {@return `layerCount`} + public @CType("uint32_t") int layerCount() { return VkRenderingInfo.get_layerCount(this.segment()); } + /// Sets `layerCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_layerCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_layerCount.set(segment, 0L, index, value); } + /// Sets `layerCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_layerCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderingInfo.set_layerCount(segment, 0L, value); } + /// Sets `layerCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInfo layerCountAt(long index, @CType("uint32_t") int value) { VkRenderingInfo.set_layerCount(this.segment(), index, value); return this; } + /// Sets `layerCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInfo layerCount(@CType("uint32_t") int value) { VkRenderingInfo.set_layerCount(this.segment(), value); return this; } + + /// {@return `viewMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewMask(MemorySegment segment, long index) { return (int) VH_viewMask.get(segment, 0L, index); } + /// {@return `viewMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewMask(MemorySegment segment) { return VkRenderingInfo.get_viewMask(segment, 0L); } + /// {@return `viewMask` at the given index} + /// @param index the index + public @CType("uint32_t") int viewMaskAt(long index) { return VkRenderingInfo.get_viewMask(this.segment(), index); } + /// {@return `viewMask`} + public @CType("uint32_t") int viewMask() { return VkRenderingInfo.get_viewMask(this.segment()); } + /// Sets `viewMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewMask.set(segment, 0L, index, value); } + /// Sets `viewMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewMask(MemorySegment segment, @CType("uint32_t") int value) { VkRenderingInfo.set_viewMask(segment, 0L, value); } + /// Sets `viewMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInfo viewMaskAt(long index, @CType("uint32_t") int value) { VkRenderingInfo.set_viewMask(this.segment(), index, value); return this; } + /// Sets `viewMask` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInfo viewMask(@CType("uint32_t") int value) { VkRenderingInfo.set_viewMask(this.segment(), value); return this; } + + /// {@return `colorAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment, long index) { return (int) VH_colorAttachmentCount.get(segment, 0L, index); } + /// {@return `colorAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment) { return VkRenderingInfo.get_colorAttachmentCount(segment, 0L); } + /// {@return `colorAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int colorAttachmentCountAt(long index) { return VkRenderingInfo.get_colorAttachmentCount(this.segment(), index); } + /// {@return `colorAttachmentCount`} + public @CType("uint32_t") int colorAttachmentCount() { return VkRenderingInfo.get_colorAttachmentCount(this.segment()); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorAttachmentCount.set(segment, 0L, index, value); } + /// Sets `colorAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderingInfo.set_colorAttachmentCount(segment, 0L, value); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInfo colorAttachmentCountAt(long index, @CType("uint32_t") int value) { VkRenderingInfo.set_colorAttachmentCount(this.segment(), index, value); return this; } + /// Sets `colorAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInfo colorAttachmentCount(@CType("uint32_t") int value) { VkRenderingInfo.set_colorAttachmentCount(this.segment(), value); return this; } + + /// {@return `pColorAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment get_pColorAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorAttachments.get(segment, 0L, index); } + /// {@return `pColorAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment get_pColorAttachments(MemorySegment segment) { return VkRenderingInfo.get_pColorAttachments(segment, 0L); } + /// {@return `pColorAttachments` at the given index} + /// @param index the index + public @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment pColorAttachmentsAt(long index) { return VkRenderingInfo.get_pColorAttachments(this.segment(), index); } + /// {@return `pColorAttachments`} + public @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment pColorAttachments() { return VkRenderingInfo.get_pColorAttachments(this.segment()); } + /// Sets `pColorAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorAttachments(MemorySegment segment, long index, @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VH_pColorAttachments.set(segment, 0L, index, value); } + /// Sets `pColorAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorAttachments(MemorySegment segment, @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pColorAttachments(segment, 0L, value); } + /// Sets `pColorAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInfo pColorAttachmentsAt(long index, @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pColorAttachments(this.segment(), index, value); return this; } + /// Sets `pColorAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInfo pColorAttachments(@CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pColorAttachments(this.segment(), value); return this; } + + /// {@return `pDepthAttachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment get_pDepthAttachment(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDepthAttachment.get(segment, 0L, index); } + /// {@return `pDepthAttachment`} + /// @param segment the segment of the struct + public static @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment get_pDepthAttachment(MemorySegment segment) { return VkRenderingInfo.get_pDepthAttachment(segment, 0L); } + /// {@return `pDepthAttachment` at the given index} + /// @param index the index + public @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment pDepthAttachmentAt(long index) { return VkRenderingInfo.get_pDepthAttachment(this.segment(), index); } + /// {@return `pDepthAttachment`} + public @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment pDepthAttachment() { return VkRenderingInfo.get_pDepthAttachment(this.segment()); } + /// Sets `pDepthAttachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDepthAttachment(MemorySegment segment, long index, @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VH_pDepthAttachment.set(segment, 0L, index, value); } + /// Sets `pDepthAttachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDepthAttachment(MemorySegment segment, @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pDepthAttachment(segment, 0L, value); } + /// Sets `pDepthAttachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInfo pDepthAttachmentAt(long index, @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pDepthAttachment(this.segment(), index, value); return this; } + /// Sets `pDepthAttachment` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInfo pDepthAttachment(@CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pDepthAttachment(this.segment(), value); return this; } + + /// {@return `pStencilAttachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment get_pStencilAttachment(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStencilAttachment.get(segment, 0L, index); } + /// {@return `pStencilAttachment`} + /// @param segment the segment of the struct + public static @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment get_pStencilAttachment(MemorySegment segment) { return VkRenderingInfo.get_pStencilAttachment(segment, 0L); } + /// {@return `pStencilAttachment` at the given index} + /// @param index the index + public @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment pStencilAttachmentAt(long index) { return VkRenderingInfo.get_pStencilAttachment(this.segment(), index); } + /// {@return `pStencilAttachment`} + public @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment pStencilAttachment() { return VkRenderingInfo.get_pStencilAttachment(this.segment()); } + /// Sets `pStencilAttachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStencilAttachment(MemorySegment segment, long index, @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VH_pStencilAttachment.set(segment, 0L, index, value); } + /// Sets `pStencilAttachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStencilAttachment(MemorySegment segment, @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pStencilAttachment(segment, 0L, value); } + /// Sets `pStencilAttachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInfo pStencilAttachmentAt(long index, @CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pStencilAttachment(this.segment(), index, value); return this; } + /// Sets `pStencilAttachment` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInfo pStencilAttachment(@CType("const VkRenderingAttachmentInfo *") java.lang.foreign.MemorySegment value) { VkRenderingInfo.set_pStencilAttachment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingInputAttachmentIndexInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingInputAttachmentIndexInfo.java new file mode 100644 index 00000000..11ca8ae8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkRenderingInputAttachmentIndexInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### colorAttachmentCount +/// [VarHandle][#VH_colorAttachmentCount] - [Getter][#colorAttachmentCount()] - [Setter][#colorAttachmentCount(int)] +/// ### pColorAttachmentInputIndices +/// [VarHandle][#VH_pColorAttachmentInputIndices] - [Getter][#pColorAttachmentInputIndices()] - [Setter][#pColorAttachmentInputIndices(java.lang.foreign.MemorySegment)] +/// ### pDepthInputAttachmentIndex +/// [VarHandle][#VH_pDepthInputAttachmentIndex] - [Getter][#pDepthInputAttachmentIndex()] - [Setter][#pDepthInputAttachmentIndex(java.lang.foreign.MemorySegment)] +/// ### pStencilInputAttachmentIndex +/// [VarHandle][#VH_pStencilInputAttachmentIndex] - [Getter][#pStencilInputAttachmentIndex()] - [Setter][#pStencilInputAttachmentIndex(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkRenderingInputAttachmentIndexInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t colorAttachmentCount; +/// const uint32_t * pColorAttachmentInputIndices; +/// const uint32_t * pDepthInputAttachmentIndex; +/// const uint32_t * pStencilInputAttachmentIndex; +/// } VkRenderingInputAttachmentIndexInfo; +/// ``` +public final class VkRenderingInputAttachmentIndexInfo extends Struct { + /// The struct layout of `VkRenderingInputAttachmentIndexInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("colorAttachmentCount"), + ValueLayout.ADDRESS.withName("pColorAttachmentInputIndices"), + ValueLayout.ADDRESS.withName("pDepthInputAttachmentIndex"), + ValueLayout.ADDRESS.withName("pStencilInputAttachmentIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `colorAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachmentCount")); + /// The [VarHandle] of `pColorAttachmentInputIndices` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorAttachmentInputIndices = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorAttachmentInputIndices")); + /// The [VarHandle] of `pDepthInputAttachmentIndex` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDepthInputAttachmentIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDepthInputAttachmentIndex")); + /// The [VarHandle] of `pStencilInputAttachmentIndex` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pStencilInputAttachmentIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pStencilInputAttachmentIndex")); + + /// Creates `VkRenderingInputAttachmentIndexInfo` with the given segment. + /// @param segment the memory segment + public VkRenderingInputAttachmentIndexInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkRenderingInputAttachmentIndexInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingInputAttachmentIndexInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingInputAttachmentIndexInfo(segment); } + + /// Creates `VkRenderingInputAttachmentIndexInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingInputAttachmentIndexInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingInputAttachmentIndexInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkRenderingInputAttachmentIndexInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkRenderingInputAttachmentIndexInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkRenderingInputAttachmentIndexInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkRenderingInputAttachmentIndexInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkRenderingInputAttachmentIndexInfo` + public static VkRenderingInputAttachmentIndexInfo alloc(SegmentAllocator allocator) { return new VkRenderingInputAttachmentIndexInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkRenderingInputAttachmentIndexInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkRenderingInputAttachmentIndexInfo` + public static VkRenderingInputAttachmentIndexInfo alloc(SegmentAllocator allocator, long count) { return new VkRenderingInputAttachmentIndexInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkRenderingInputAttachmentIndexInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkRenderingInputAttachmentIndexInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkRenderingInputAttachmentIndexInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkRenderingInputAttachmentIndexInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkRenderingInputAttachmentIndexInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo sType(@CType("VkStructureType") int value) { VkRenderingInputAttachmentIndexInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkRenderingInputAttachmentIndexInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkRenderingInputAttachmentIndexInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkRenderingInputAttachmentIndexInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `colorAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment, long index) { return (int) VH_colorAttachmentCount.get(segment, 0L, index); } + /// {@return `colorAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment) { return VkRenderingInputAttachmentIndexInfo.get_colorAttachmentCount(segment, 0L); } + /// {@return `colorAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int colorAttachmentCountAt(long index) { return VkRenderingInputAttachmentIndexInfo.get_colorAttachmentCount(this.segment(), index); } + /// {@return `colorAttachmentCount`} + public @CType("uint32_t") int colorAttachmentCount() { return VkRenderingInputAttachmentIndexInfo.get_colorAttachmentCount(this.segment()); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorAttachmentCount.set(segment, 0L, index, value); } + /// Sets `colorAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkRenderingInputAttachmentIndexInfo.set_colorAttachmentCount(segment, 0L, value); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo colorAttachmentCountAt(long index, @CType("uint32_t") int value) { VkRenderingInputAttachmentIndexInfo.set_colorAttachmentCount(this.segment(), index, value); return this; } + /// Sets `colorAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo colorAttachmentCount(@CType("uint32_t") int value) { VkRenderingInputAttachmentIndexInfo.set_colorAttachmentCount(this.segment(), value); return this; } + + /// {@return `pColorAttachmentInputIndices` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pColorAttachmentInputIndices(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorAttachmentInputIndices.get(segment, 0L, index); } + /// {@return `pColorAttachmentInputIndices`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pColorAttachmentInputIndices(MemorySegment segment) { return VkRenderingInputAttachmentIndexInfo.get_pColorAttachmentInputIndices(segment, 0L); } + /// {@return `pColorAttachmentInputIndices` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pColorAttachmentInputIndicesAt(long index) { return VkRenderingInputAttachmentIndexInfo.get_pColorAttachmentInputIndices(this.segment(), index); } + /// {@return `pColorAttachmentInputIndices`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pColorAttachmentInputIndices() { return VkRenderingInputAttachmentIndexInfo.get_pColorAttachmentInputIndices(this.segment()); } + /// Sets `pColorAttachmentInputIndices` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorAttachmentInputIndices(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pColorAttachmentInputIndices.set(segment, 0L, index, value); } + /// Sets `pColorAttachmentInputIndices` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorAttachmentInputIndices(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pColorAttachmentInputIndices(segment, 0L, value); } + /// Sets `pColorAttachmentInputIndices` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo pColorAttachmentInputIndicesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pColorAttachmentInputIndices(this.segment(), index, value); return this; } + /// Sets `pColorAttachmentInputIndices` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo pColorAttachmentInputIndices(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pColorAttachmentInputIndices(this.segment(), value); return this; } + + /// {@return `pDepthInputAttachmentIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDepthInputAttachmentIndex(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDepthInputAttachmentIndex.get(segment, 0L, index); } + /// {@return `pDepthInputAttachmentIndex`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pDepthInputAttachmentIndex(MemorySegment segment) { return VkRenderingInputAttachmentIndexInfo.get_pDepthInputAttachmentIndex(segment, 0L); } + /// {@return `pDepthInputAttachmentIndex` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDepthInputAttachmentIndexAt(long index) { return VkRenderingInputAttachmentIndexInfo.get_pDepthInputAttachmentIndex(this.segment(), index); } + /// {@return `pDepthInputAttachmentIndex`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pDepthInputAttachmentIndex() { return VkRenderingInputAttachmentIndexInfo.get_pDepthInputAttachmentIndex(this.segment()); } + /// Sets `pDepthInputAttachmentIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDepthInputAttachmentIndex(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pDepthInputAttachmentIndex.set(segment, 0L, index, value); } + /// Sets `pDepthInputAttachmentIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDepthInputAttachmentIndex(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pDepthInputAttachmentIndex(segment, 0L, value); } + /// Sets `pDepthInputAttachmentIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo pDepthInputAttachmentIndexAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pDepthInputAttachmentIndex(this.segment(), index, value); return this; } + /// Sets `pDepthInputAttachmentIndex` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo pDepthInputAttachmentIndex(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pDepthInputAttachmentIndex(this.segment(), value); return this; } + + /// {@return `pStencilInputAttachmentIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pStencilInputAttachmentIndex(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pStencilInputAttachmentIndex.get(segment, 0L, index); } + /// {@return `pStencilInputAttachmentIndex`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pStencilInputAttachmentIndex(MemorySegment segment) { return VkRenderingInputAttachmentIndexInfo.get_pStencilInputAttachmentIndex(segment, 0L); } + /// {@return `pStencilInputAttachmentIndex` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pStencilInputAttachmentIndexAt(long index) { return VkRenderingInputAttachmentIndexInfo.get_pStencilInputAttachmentIndex(this.segment(), index); } + /// {@return `pStencilInputAttachmentIndex`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pStencilInputAttachmentIndex() { return VkRenderingInputAttachmentIndexInfo.get_pStencilInputAttachmentIndex(this.segment()); } + /// Sets `pStencilInputAttachmentIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pStencilInputAttachmentIndex(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pStencilInputAttachmentIndex.set(segment, 0L, index, value); } + /// Sets `pStencilInputAttachmentIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pStencilInputAttachmentIndex(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pStencilInputAttachmentIndex(segment, 0L, value); } + /// Sets `pStencilInputAttachmentIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo pStencilInputAttachmentIndexAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pStencilInputAttachmentIndex(this.segment(), index, value); return this; } + /// Sets `pStencilInputAttachmentIndex` with the given value. + /// @param value the value + /// @return `this` + public VkRenderingInputAttachmentIndexInfo pStencilInputAttachmentIndex(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkRenderingInputAttachmentIndexInfo.set_pStencilInputAttachmentIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkResolveImageInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkResolveImageInfo2.java new file mode 100644 index 00000000..b0e53875 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkResolveImageInfo2.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcImage +/// [VarHandle][#VH_srcImage] - [Getter][#srcImage()] - [Setter][#srcImage(java.lang.foreign.MemorySegment)] +/// ### srcImageLayout +/// [VarHandle][#VH_srcImageLayout] - [Getter][#srcImageLayout()] - [Setter][#srcImageLayout(int)] +/// ### dstImage +/// [VarHandle][#VH_dstImage] - [Getter][#dstImage()] - [Setter][#dstImage(java.lang.foreign.MemorySegment)] +/// ### dstImageLayout +/// [VarHandle][#VH_dstImageLayout] - [Getter][#dstImageLayout()] - [Setter][#dstImageLayout(int)] +/// ### regionCount +/// [VarHandle][#VH_regionCount] - [Getter][#regionCount()] - [Setter][#regionCount(int)] +/// ### pRegions +/// [VarHandle][#VH_pRegions] - [Getter][#pRegions()] - [Setter][#pRegions(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkResolveImageInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkImage srcImage; +/// VkImageLayout srcImageLayout; +/// VkImage dstImage; +/// VkImageLayout dstImageLayout; +/// uint32_t regionCount; +/// const VkImageResolve2 * pRegions; +/// } VkResolveImageInfo2; +/// ``` +public final class VkResolveImageInfo2 extends Struct { + /// The struct layout of `VkResolveImageInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("srcImage"), + ValueLayout.JAVA_INT.withName("srcImageLayout"), + ValueLayout.ADDRESS.withName("dstImage"), + ValueLayout.JAVA_INT.withName("dstImageLayout"), + ValueLayout.JAVA_INT.withName("regionCount"), + ValueLayout.ADDRESS.withName("pRegions") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_srcImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImage")); + /// The [VarHandle] of `srcImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcImageLayout")); + /// The [VarHandle] of `dstImage` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstImage = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImage")); + /// The [VarHandle] of `dstImageLayout` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstImageLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstImageLayout")); + /// The [VarHandle] of `regionCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_regionCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("regionCount")); + /// The [VarHandle] of `pRegions` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRegions = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRegions")); + + /// Creates `VkResolveImageInfo2` with the given segment. + /// @param segment the memory segment + public VkResolveImageInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkResolveImageInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkResolveImageInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkResolveImageInfo2(segment); } + + /// Creates `VkResolveImageInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkResolveImageInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkResolveImageInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkResolveImageInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkResolveImageInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkResolveImageInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkResolveImageInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkResolveImageInfo2` + public static VkResolveImageInfo2 alloc(SegmentAllocator allocator) { return new VkResolveImageInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkResolveImageInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkResolveImageInfo2` + public static VkResolveImageInfo2 alloc(SegmentAllocator allocator, long count) { return new VkResolveImageInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkResolveImageInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkResolveImageInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkResolveImageInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkResolveImageInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkResolveImageInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 sType(@CType("VkStructureType") int value) { VkResolveImageInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkResolveImageInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkResolveImageInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkResolveImageInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_srcImage.get(segment, 0L, index); } + /// {@return `srcImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_srcImage(MemorySegment segment) { return VkResolveImageInfo2.get_srcImage(segment, 0L); } + /// {@return `srcImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment srcImageAt(long index) { return VkResolveImageInfo2.get_srcImage(this.segment(), index); } + /// {@return `srcImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment srcImage() { return VkResolveImageInfo2.get_srcImage(this.segment()); } + /// Sets `srcImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_srcImage.set(segment, 0L, index, value); } + /// Sets `srcImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_srcImage(segment, 0L, value); } + /// Sets `srcImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 srcImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_srcImage(this.segment(), index, value); return this; } + /// Sets `srcImage` with the given value. + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 srcImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_srcImage(this.segment(), value); return this; } + + /// {@return `srcImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment, long index) { return (int) VH_srcImageLayout.get(segment, 0L, index); } + /// {@return `srcImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_srcImageLayout(MemorySegment segment) { return VkResolveImageInfo2.get_srcImageLayout(segment, 0L); } + /// {@return `srcImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int srcImageLayoutAt(long index) { return VkResolveImageInfo2.get_srcImageLayout(this.segment(), index); } + /// {@return `srcImageLayout`} + public @CType("VkImageLayout") int srcImageLayout() { return VkResolveImageInfo2.get_srcImageLayout(this.segment()); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_srcImageLayout.set(segment, 0L, index, value); } + /// Sets `srcImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkResolveImageInfo2.set_srcImageLayout(segment, 0L, value); } + /// Sets `srcImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 srcImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkResolveImageInfo2.set_srcImageLayout(this.segment(), index, value); return this; } + /// Sets `srcImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 srcImageLayout(@CType("VkImageLayout") int value) { VkResolveImageInfo2.set_srcImageLayout(this.segment(), value); return this; } + + /// {@return `dstImage` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstImage.get(segment, 0L, index); } + /// {@return `dstImage`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_dstImage(MemorySegment segment) { return VkResolveImageInfo2.get_dstImage(segment, 0L); } + /// {@return `dstImage` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment dstImageAt(long index) { return VkResolveImageInfo2.get_dstImage(this.segment(), index); } + /// {@return `dstImage`} + public @CType("VkImage") java.lang.foreign.MemorySegment dstImage() { return VkResolveImageInfo2.get_dstImage(this.segment()); } + /// Sets `dstImage` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImage(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_dstImage.set(segment, 0L, index, value); } + /// Sets `dstImage` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImage(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_dstImage(segment, 0L, value); } + /// Sets `dstImage` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 dstImageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_dstImage(this.segment(), index, value); return this; } + /// Sets `dstImage` with the given value. + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 dstImage(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_dstImage(this.segment(), value); return this; } + + /// {@return `dstImageLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment, long index) { return (int) VH_dstImageLayout.get(segment, 0L, index); } + /// {@return `dstImageLayout`} + /// @param segment the segment of the struct + public static @CType("VkImageLayout") int get_dstImageLayout(MemorySegment segment) { return VkResolveImageInfo2.get_dstImageLayout(segment, 0L); } + /// {@return `dstImageLayout` at the given index} + /// @param index the index + public @CType("VkImageLayout") int dstImageLayoutAt(long index) { return VkResolveImageInfo2.get_dstImageLayout(this.segment(), index); } + /// {@return `dstImageLayout`} + public @CType("VkImageLayout") int dstImageLayout() { return VkResolveImageInfo2.get_dstImageLayout(this.segment()); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, long index, @CType("VkImageLayout") int value) { VH_dstImageLayout.set(segment, 0L, index, value); } + /// Sets `dstImageLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstImageLayout(MemorySegment segment, @CType("VkImageLayout") int value) { VkResolveImageInfo2.set_dstImageLayout(segment, 0L, value); } + /// Sets `dstImageLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 dstImageLayoutAt(long index, @CType("VkImageLayout") int value) { VkResolveImageInfo2.set_dstImageLayout(this.segment(), index, value); return this; } + /// Sets `dstImageLayout` with the given value. + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 dstImageLayout(@CType("VkImageLayout") int value) { VkResolveImageInfo2.set_dstImageLayout(this.segment(), value); return this; } + + /// {@return `regionCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_regionCount(MemorySegment segment, long index) { return (int) VH_regionCount.get(segment, 0L, index); } + /// {@return `regionCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_regionCount(MemorySegment segment) { return VkResolveImageInfo2.get_regionCount(segment, 0L); } + /// {@return `regionCount` at the given index} + /// @param index the index + public @CType("uint32_t") int regionCountAt(long index) { return VkResolveImageInfo2.get_regionCount(this.segment(), index); } + /// {@return `regionCount`} + public @CType("uint32_t") int regionCount() { return VkResolveImageInfo2.get_regionCount(this.segment()); } + /// Sets `regionCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_regionCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_regionCount.set(segment, 0L, index, value); } + /// Sets `regionCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_regionCount(MemorySegment segment, @CType("uint32_t") int value) { VkResolveImageInfo2.set_regionCount(segment, 0L, value); } + /// Sets `regionCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 regionCountAt(long index, @CType("uint32_t") int value) { VkResolveImageInfo2.set_regionCount(this.segment(), index, value); return this; } + /// Sets `regionCount` with the given value. + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 regionCount(@CType("uint32_t") int value) { VkResolveImageInfo2.set_regionCount(this.segment(), value); return this; } + + /// {@return `pRegions` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkImageResolve2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRegions.get(segment, 0L, index); } + /// {@return `pRegions`} + /// @param segment the segment of the struct + public static @CType("const VkImageResolve2 *") java.lang.foreign.MemorySegment get_pRegions(MemorySegment segment) { return VkResolveImageInfo2.get_pRegions(segment, 0L); } + /// {@return `pRegions` at the given index} + /// @param index the index + public @CType("const VkImageResolve2 *") java.lang.foreign.MemorySegment pRegionsAt(long index) { return VkResolveImageInfo2.get_pRegions(this.segment(), index); } + /// {@return `pRegions`} + public @CType("const VkImageResolve2 *") java.lang.foreign.MemorySegment pRegions() { return VkResolveImageInfo2.get_pRegions(this.segment()); } + /// Sets `pRegions` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRegions(MemorySegment segment, long index, @CType("const VkImageResolve2 *") java.lang.foreign.MemorySegment value) { VH_pRegions.set(segment, 0L, index, value); } + /// Sets `pRegions` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRegions(MemorySegment segment, @CType("const VkImageResolve2 *") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_pRegions(segment, 0L, value); } + /// Sets `pRegions` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 pRegionsAt(long index, @CType("const VkImageResolve2 *") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_pRegions(this.segment(), index, value); return this; } + /// Sets `pRegions` with the given value. + /// @param value the value + /// @return `this` + public VkResolveImageInfo2 pRegions(@CType("const VkImageResolve2 *") java.lang.foreign.MemorySegment value) { VkResolveImageInfo2.set_pRegions(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerCreateInfo.java new file mode 100644 index 00000000..ed4b4dcc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerCreateInfo.java @@ -0,0 +1,740 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### magFilter +/// [VarHandle][#VH_magFilter] - [Getter][#magFilter()] - [Setter][#magFilter(int)] +/// ### minFilter +/// [VarHandle][#VH_minFilter] - [Getter][#minFilter()] - [Setter][#minFilter(int)] +/// ### mipmapMode +/// [VarHandle][#VH_mipmapMode] - [Getter][#mipmapMode()] - [Setter][#mipmapMode(int)] +/// ### addressModeU +/// [VarHandle][#VH_addressModeU] - [Getter][#addressModeU()] - [Setter][#addressModeU(int)] +/// ### addressModeV +/// [VarHandle][#VH_addressModeV] - [Getter][#addressModeV()] - [Setter][#addressModeV(int)] +/// ### addressModeW +/// [VarHandle][#VH_addressModeW] - [Getter][#addressModeW()] - [Setter][#addressModeW(int)] +/// ### mipLodBias +/// [VarHandle][#VH_mipLodBias] - [Getter][#mipLodBias()] - [Setter][#mipLodBias(float)] +/// ### anisotropyEnable +/// [VarHandle][#VH_anisotropyEnable] - [Getter][#anisotropyEnable()] - [Setter][#anisotropyEnable(int)] +/// ### maxAnisotropy +/// [VarHandle][#VH_maxAnisotropy] - [Getter][#maxAnisotropy()] - [Setter][#maxAnisotropy(float)] +/// ### compareEnable +/// [VarHandle][#VH_compareEnable] - [Getter][#compareEnable()] - [Setter][#compareEnable(int)] +/// ### compareOp +/// [VarHandle][#VH_compareOp] - [Getter][#compareOp()] - [Setter][#compareOp(int)] +/// ### minLod +/// [VarHandle][#VH_minLod] - [Getter][#minLod()] - [Setter][#minLod(float)] +/// ### maxLod +/// [VarHandle][#VH_maxLod] - [Getter][#maxLod()] - [Setter][#maxLod(float)] +/// ### borderColor +/// [VarHandle][#VH_borderColor] - [Getter][#borderColor()] - [Setter][#borderColor(int)] +/// ### unnormalizedCoordinates +/// [VarHandle][#VH_unnormalizedCoordinates] - [Getter][#unnormalizedCoordinates()] - [Setter][#unnormalizedCoordinates(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkSamplerCreateFlags flags; +/// VkFilter magFilter; +/// VkFilter minFilter; +/// VkSamplerMipmapMode mipmapMode; +/// VkSamplerAddressMode addressModeU; +/// VkSamplerAddressMode addressModeV; +/// VkSamplerAddressMode addressModeW; +/// float mipLodBias; +/// VkBool32 anisotropyEnable; +/// float maxAnisotropy; +/// VkBool32 compareEnable; +/// VkCompareOp compareOp; +/// float minLod; +/// float maxLod; +/// VkBorderColor borderColor; +/// VkBool32 unnormalizedCoordinates; +/// } VkSamplerCreateInfo; +/// ``` +public final class VkSamplerCreateInfo extends Struct { + /// The struct layout of `VkSamplerCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("magFilter"), + ValueLayout.JAVA_INT.withName("minFilter"), + ValueLayout.JAVA_INT.withName("mipmapMode"), + ValueLayout.JAVA_INT.withName("addressModeU"), + ValueLayout.JAVA_INT.withName("addressModeV"), + ValueLayout.JAVA_INT.withName("addressModeW"), + ValueLayout.JAVA_FLOAT.withName("mipLodBias"), + ValueLayout.JAVA_INT.withName("anisotropyEnable"), + ValueLayout.JAVA_FLOAT.withName("maxAnisotropy"), + ValueLayout.JAVA_INT.withName("compareEnable"), + ValueLayout.JAVA_INT.withName("compareOp"), + ValueLayout.JAVA_FLOAT.withName("minLod"), + ValueLayout.JAVA_FLOAT.withName("maxLod"), + ValueLayout.JAVA_INT.withName("borderColor"), + ValueLayout.JAVA_INT.withName("unnormalizedCoordinates") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `magFilter` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_magFilter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("magFilter")); + /// The [VarHandle] of `minFilter` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_minFilter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minFilter")); + /// The [VarHandle] of `mipmapMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mipmapMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mipmapMode")); + /// The [VarHandle] of `addressModeU` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_addressModeU = LAYOUT.arrayElementVarHandle(PathElement.groupElement("addressModeU")); + /// The [VarHandle] of `addressModeV` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_addressModeV = LAYOUT.arrayElementVarHandle(PathElement.groupElement("addressModeV")); + /// The [VarHandle] of `addressModeW` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_addressModeW = LAYOUT.arrayElementVarHandle(PathElement.groupElement("addressModeW")); + /// The [VarHandle] of `mipLodBias` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_mipLodBias = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mipLodBias")); + /// The [VarHandle] of `anisotropyEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_anisotropyEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("anisotropyEnable")); + /// The [VarHandle] of `maxAnisotropy` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxAnisotropy = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxAnisotropy")); + /// The [VarHandle] of `compareEnable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compareEnable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compareEnable")); + /// The [VarHandle] of `compareOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compareOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compareOp")); + /// The [VarHandle] of `minLod` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minLod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minLod")); + /// The [VarHandle] of `maxLod` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxLod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxLod")); + /// The [VarHandle] of `borderColor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_borderColor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("borderColor")); + /// The [VarHandle] of `unnormalizedCoordinates` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_unnormalizedCoordinates = LAYOUT.arrayElementVarHandle(PathElement.groupElement("unnormalizedCoordinates")); + + /// Creates `VkSamplerCreateInfo` with the given segment. + /// @param segment the memory segment + public VkSamplerCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCreateInfo(segment); } + + /// Creates `VkSamplerCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerCreateInfo` + public static VkSamplerCreateInfo alloc(SegmentAllocator allocator) { return new VkSamplerCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerCreateInfo` + public static VkSamplerCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkSamplerCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo sType(@CType("VkStructureType") int value) { VkSamplerCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSamplerCreateFlags") int get_flags(MemorySegment segment) { return VkSamplerCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSamplerCreateFlags") int flagsAt(long index) { return VkSamplerCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSamplerCreateFlags") int flags() { return VkSamplerCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSamplerCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSamplerCreateFlags") int value) { VkSamplerCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo flagsAt(long index, @CType("VkSamplerCreateFlags") int value) { VkSamplerCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo flags(@CType("VkSamplerCreateFlags") int value) { VkSamplerCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `magFilter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFilter") int get_magFilter(MemorySegment segment, long index) { return (int) VH_magFilter.get(segment, 0L, index); } + /// {@return `magFilter`} + /// @param segment the segment of the struct + public static @CType("VkFilter") int get_magFilter(MemorySegment segment) { return VkSamplerCreateInfo.get_magFilter(segment, 0L); } + /// {@return `magFilter` at the given index} + /// @param index the index + public @CType("VkFilter") int magFilterAt(long index) { return VkSamplerCreateInfo.get_magFilter(this.segment(), index); } + /// {@return `magFilter`} + public @CType("VkFilter") int magFilter() { return VkSamplerCreateInfo.get_magFilter(this.segment()); } + /// Sets `magFilter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_magFilter(MemorySegment segment, long index, @CType("VkFilter") int value) { VH_magFilter.set(segment, 0L, index, value); } + /// Sets `magFilter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_magFilter(MemorySegment segment, @CType("VkFilter") int value) { VkSamplerCreateInfo.set_magFilter(segment, 0L, value); } + /// Sets `magFilter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo magFilterAt(long index, @CType("VkFilter") int value) { VkSamplerCreateInfo.set_magFilter(this.segment(), index, value); return this; } + /// Sets `magFilter` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo magFilter(@CType("VkFilter") int value) { VkSamplerCreateInfo.set_magFilter(this.segment(), value); return this; } + + /// {@return `minFilter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFilter") int get_minFilter(MemorySegment segment, long index) { return (int) VH_minFilter.get(segment, 0L, index); } + /// {@return `minFilter`} + /// @param segment the segment of the struct + public static @CType("VkFilter") int get_minFilter(MemorySegment segment) { return VkSamplerCreateInfo.get_minFilter(segment, 0L); } + /// {@return `minFilter` at the given index} + /// @param index the index + public @CType("VkFilter") int minFilterAt(long index) { return VkSamplerCreateInfo.get_minFilter(this.segment(), index); } + /// {@return `minFilter`} + public @CType("VkFilter") int minFilter() { return VkSamplerCreateInfo.get_minFilter(this.segment()); } + /// Sets `minFilter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minFilter(MemorySegment segment, long index, @CType("VkFilter") int value) { VH_minFilter.set(segment, 0L, index, value); } + /// Sets `minFilter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minFilter(MemorySegment segment, @CType("VkFilter") int value) { VkSamplerCreateInfo.set_minFilter(segment, 0L, value); } + /// Sets `minFilter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo minFilterAt(long index, @CType("VkFilter") int value) { VkSamplerCreateInfo.set_minFilter(this.segment(), index, value); return this; } + /// Sets `minFilter` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo minFilter(@CType("VkFilter") int value) { VkSamplerCreateInfo.set_minFilter(this.segment(), value); return this; } + + /// {@return `mipmapMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerMipmapMode") int get_mipmapMode(MemorySegment segment, long index) { return (int) VH_mipmapMode.get(segment, 0L, index); } + /// {@return `mipmapMode`} + /// @param segment the segment of the struct + public static @CType("VkSamplerMipmapMode") int get_mipmapMode(MemorySegment segment) { return VkSamplerCreateInfo.get_mipmapMode(segment, 0L); } + /// {@return `mipmapMode` at the given index} + /// @param index the index + public @CType("VkSamplerMipmapMode") int mipmapModeAt(long index) { return VkSamplerCreateInfo.get_mipmapMode(this.segment(), index); } + /// {@return `mipmapMode`} + public @CType("VkSamplerMipmapMode") int mipmapMode() { return VkSamplerCreateInfo.get_mipmapMode(this.segment()); } + /// Sets `mipmapMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mipmapMode(MemorySegment segment, long index, @CType("VkSamplerMipmapMode") int value) { VH_mipmapMode.set(segment, 0L, index, value); } + /// Sets `mipmapMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mipmapMode(MemorySegment segment, @CType("VkSamplerMipmapMode") int value) { VkSamplerCreateInfo.set_mipmapMode(segment, 0L, value); } + /// Sets `mipmapMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo mipmapModeAt(long index, @CType("VkSamplerMipmapMode") int value) { VkSamplerCreateInfo.set_mipmapMode(this.segment(), index, value); return this; } + /// Sets `mipmapMode` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo mipmapMode(@CType("VkSamplerMipmapMode") int value) { VkSamplerCreateInfo.set_mipmapMode(this.segment(), value); return this; } + + /// {@return `addressModeU` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerAddressMode") int get_addressModeU(MemorySegment segment, long index) { return (int) VH_addressModeU.get(segment, 0L, index); } + /// {@return `addressModeU`} + /// @param segment the segment of the struct + public static @CType("VkSamplerAddressMode") int get_addressModeU(MemorySegment segment) { return VkSamplerCreateInfo.get_addressModeU(segment, 0L); } + /// {@return `addressModeU` at the given index} + /// @param index the index + public @CType("VkSamplerAddressMode") int addressModeUAt(long index) { return VkSamplerCreateInfo.get_addressModeU(this.segment(), index); } + /// {@return `addressModeU`} + public @CType("VkSamplerAddressMode") int addressModeU() { return VkSamplerCreateInfo.get_addressModeU(this.segment()); } + /// Sets `addressModeU` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_addressModeU(MemorySegment segment, long index, @CType("VkSamplerAddressMode") int value) { VH_addressModeU.set(segment, 0L, index, value); } + /// Sets `addressModeU` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_addressModeU(MemorySegment segment, @CType("VkSamplerAddressMode") int value) { VkSamplerCreateInfo.set_addressModeU(segment, 0L, value); } + /// Sets `addressModeU` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo addressModeUAt(long index, @CType("VkSamplerAddressMode") int value) { VkSamplerCreateInfo.set_addressModeU(this.segment(), index, value); return this; } + /// Sets `addressModeU` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo addressModeU(@CType("VkSamplerAddressMode") int value) { VkSamplerCreateInfo.set_addressModeU(this.segment(), value); return this; } + + /// {@return `addressModeV` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerAddressMode") int get_addressModeV(MemorySegment segment, long index) { return (int) VH_addressModeV.get(segment, 0L, index); } + /// {@return `addressModeV`} + /// @param segment the segment of the struct + public static @CType("VkSamplerAddressMode") int get_addressModeV(MemorySegment segment) { return VkSamplerCreateInfo.get_addressModeV(segment, 0L); } + /// {@return `addressModeV` at the given index} + /// @param index the index + public @CType("VkSamplerAddressMode") int addressModeVAt(long index) { return VkSamplerCreateInfo.get_addressModeV(this.segment(), index); } + /// {@return `addressModeV`} + public @CType("VkSamplerAddressMode") int addressModeV() { return VkSamplerCreateInfo.get_addressModeV(this.segment()); } + /// Sets `addressModeV` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_addressModeV(MemorySegment segment, long index, @CType("VkSamplerAddressMode") int value) { VH_addressModeV.set(segment, 0L, index, value); } + /// Sets `addressModeV` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_addressModeV(MemorySegment segment, @CType("VkSamplerAddressMode") int value) { VkSamplerCreateInfo.set_addressModeV(segment, 0L, value); } + /// Sets `addressModeV` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo addressModeVAt(long index, @CType("VkSamplerAddressMode") int value) { VkSamplerCreateInfo.set_addressModeV(this.segment(), index, value); return this; } + /// Sets `addressModeV` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo addressModeV(@CType("VkSamplerAddressMode") int value) { VkSamplerCreateInfo.set_addressModeV(this.segment(), value); return this; } + + /// {@return `addressModeW` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerAddressMode") int get_addressModeW(MemorySegment segment, long index) { return (int) VH_addressModeW.get(segment, 0L, index); } + /// {@return `addressModeW`} + /// @param segment the segment of the struct + public static @CType("VkSamplerAddressMode") int get_addressModeW(MemorySegment segment) { return VkSamplerCreateInfo.get_addressModeW(segment, 0L); } + /// {@return `addressModeW` at the given index} + /// @param index the index + public @CType("VkSamplerAddressMode") int addressModeWAt(long index) { return VkSamplerCreateInfo.get_addressModeW(this.segment(), index); } + /// {@return `addressModeW`} + public @CType("VkSamplerAddressMode") int addressModeW() { return VkSamplerCreateInfo.get_addressModeW(this.segment()); } + /// Sets `addressModeW` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_addressModeW(MemorySegment segment, long index, @CType("VkSamplerAddressMode") int value) { VH_addressModeW.set(segment, 0L, index, value); } + /// Sets `addressModeW` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_addressModeW(MemorySegment segment, @CType("VkSamplerAddressMode") int value) { VkSamplerCreateInfo.set_addressModeW(segment, 0L, value); } + /// Sets `addressModeW` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo addressModeWAt(long index, @CType("VkSamplerAddressMode") int value) { VkSamplerCreateInfo.set_addressModeW(this.segment(), index, value); return this; } + /// Sets `addressModeW` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo addressModeW(@CType("VkSamplerAddressMode") int value) { VkSamplerCreateInfo.set_addressModeW(this.segment(), value); return this; } + + /// {@return `mipLodBias` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_mipLodBias(MemorySegment segment, long index) { return (float) VH_mipLodBias.get(segment, 0L, index); } + /// {@return `mipLodBias`} + /// @param segment the segment of the struct + public static @CType("float") float get_mipLodBias(MemorySegment segment) { return VkSamplerCreateInfo.get_mipLodBias(segment, 0L); } + /// {@return `mipLodBias` at the given index} + /// @param index the index + public @CType("float") float mipLodBiasAt(long index) { return VkSamplerCreateInfo.get_mipLodBias(this.segment(), index); } + /// {@return `mipLodBias`} + public @CType("float") float mipLodBias() { return VkSamplerCreateInfo.get_mipLodBias(this.segment()); } + /// Sets `mipLodBias` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mipLodBias(MemorySegment segment, long index, @CType("float") float value) { VH_mipLodBias.set(segment, 0L, index, value); } + /// Sets `mipLodBias` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mipLodBias(MemorySegment segment, @CType("float") float value) { VkSamplerCreateInfo.set_mipLodBias(segment, 0L, value); } + /// Sets `mipLodBias` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo mipLodBiasAt(long index, @CType("float") float value) { VkSamplerCreateInfo.set_mipLodBias(this.segment(), index, value); return this; } + /// Sets `mipLodBias` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo mipLodBias(@CType("float") float value) { VkSamplerCreateInfo.set_mipLodBias(this.segment(), value); return this; } + + /// {@return `anisotropyEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_anisotropyEnable(MemorySegment segment, long index) { return (int) VH_anisotropyEnable.get(segment, 0L, index); } + /// {@return `anisotropyEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_anisotropyEnable(MemorySegment segment) { return VkSamplerCreateInfo.get_anisotropyEnable(segment, 0L); } + /// {@return `anisotropyEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int anisotropyEnableAt(long index) { return VkSamplerCreateInfo.get_anisotropyEnable(this.segment(), index); } + /// {@return `anisotropyEnable`} + public @CType("VkBool32") int anisotropyEnable() { return VkSamplerCreateInfo.get_anisotropyEnable(this.segment()); } + /// Sets `anisotropyEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_anisotropyEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_anisotropyEnable.set(segment, 0L, index, value); } + /// Sets `anisotropyEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_anisotropyEnable(MemorySegment segment, @CType("VkBool32") int value) { VkSamplerCreateInfo.set_anisotropyEnable(segment, 0L, value); } + /// Sets `anisotropyEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo anisotropyEnableAt(long index, @CType("VkBool32") int value) { VkSamplerCreateInfo.set_anisotropyEnable(this.segment(), index, value); return this; } + /// Sets `anisotropyEnable` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo anisotropyEnable(@CType("VkBool32") int value) { VkSamplerCreateInfo.set_anisotropyEnable(this.segment(), value); return this; } + + /// {@return `maxAnisotropy` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxAnisotropy(MemorySegment segment, long index) { return (float) VH_maxAnisotropy.get(segment, 0L, index); } + /// {@return `maxAnisotropy`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxAnisotropy(MemorySegment segment) { return VkSamplerCreateInfo.get_maxAnisotropy(segment, 0L); } + /// {@return `maxAnisotropy` at the given index} + /// @param index the index + public @CType("float") float maxAnisotropyAt(long index) { return VkSamplerCreateInfo.get_maxAnisotropy(this.segment(), index); } + /// {@return `maxAnisotropy`} + public @CType("float") float maxAnisotropy() { return VkSamplerCreateInfo.get_maxAnisotropy(this.segment()); } + /// Sets `maxAnisotropy` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxAnisotropy(MemorySegment segment, long index, @CType("float") float value) { VH_maxAnisotropy.set(segment, 0L, index, value); } + /// Sets `maxAnisotropy` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxAnisotropy(MemorySegment segment, @CType("float") float value) { VkSamplerCreateInfo.set_maxAnisotropy(segment, 0L, value); } + /// Sets `maxAnisotropy` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo maxAnisotropyAt(long index, @CType("float") float value) { VkSamplerCreateInfo.set_maxAnisotropy(this.segment(), index, value); return this; } + /// Sets `maxAnisotropy` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo maxAnisotropy(@CType("float") float value) { VkSamplerCreateInfo.set_maxAnisotropy(this.segment(), value); return this; } + + /// {@return `compareEnable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_compareEnable(MemorySegment segment, long index) { return (int) VH_compareEnable.get(segment, 0L, index); } + /// {@return `compareEnable`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_compareEnable(MemorySegment segment) { return VkSamplerCreateInfo.get_compareEnable(segment, 0L); } + /// {@return `compareEnable` at the given index} + /// @param index the index + public @CType("VkBool32") int compareEnableAt(long index) { return VkSamplerCreateInfo.get_compareEnable(this.segment(), index); } + /// {@return `compareEnable`} + public @CType("VkBool32") int compareEnable() { return VkSamplerCreateInfo.get_compareEnable(this.segment()); } + /// Sets `compareEnable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compareEnable(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_compareEnable.set(segment, 0L, index, value); } + /// Sets `compareEnable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compareEnable(MemorySegment segment, @CType("VkBool32") int value) { VkSamplerCreateInfo.set_compareEnable(segment, 0L, value); } + /// Sets `compareEnable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo compareEnableAt(long index, @CType("VkBool32") int value) { VkSamplerCreateInfo.set_compareEnable(this.segment(), index, value); return this; } + /// Sets `compareEnable` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo compareEnable(@CType("VkBool32") int value) { VkSamplerCreateInfo.set_compareEnable(this.segment(), value); return this; } + + /// {@return `compareOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCompareOp") int get_compareOp(MemorySegment segment, long index) { return (int) VH_compareOp.get(segment, 0L, index); } + /// {@return `compareOp`} + /// @param segment the segment of the struct + public static @CType("VkCompareOp") int get_compareOp(MemorySegment segment) { return VkSamplerCreateInfo.get_compareOp(segment, 0L); } + /// {@return `compareOp` at the given index} + /// @param index the index + public @CType("VkCompareOp") int compareOpAt(long index) { return VkSamplerCreateInfo.get_compareOp(this.segment(), index); } + /// {@return `compareOp`} + public @CType("VkCompareOp") int compareOp() { return VkSamplerCreateInfo.get_compareOp(this.segment()); } + /// Sets `compareOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compareOp(MemorySegment segment, long index, @CType("VkCompareOp") int value) { VH_compareOp.set(segment, 0L, index, value); } + /// Sets `compareOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compareOp(MemorySegment segment, @CType("VkCompareOp") int value) { VkSamplerCreateInfo.set_compareOp(segment, 0L, value); } + /// Sets `compareOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo compareOpAt(long index, @CType("VkCompareOp") int value) { VkSamplerCreateInfo.set_compareOp(this.segment(), index, value); return this; } + /// Sets `compareOp` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo compareOp(@CType("VkCompareOp") int value) { VkSamplerCreateInfo.set_compareOp(this.segment(), value); return this; } + + /// {@return `minLod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minLod(MemorySegment segment, long index) { return (float) VH_minLod.get(segment, 0L, index); } + /// {@return `minLod`} + /// @param segment the segment of the struct + public static @CType("float") float get_minLod(MemorySegment segment) { return VkSamplerCreateInfo.get_minLod(segment, 0L); } + /// {@return `minLod` at the given index} + /// @param index the index + public @CType("float") float minLodAt(long index) { return VkSamplerCreateInfo.get_minLod(this.segment(), index); } + /// {@return `minLod`} + public @CType("float") float minLod() { return VkSamplerCreateInfo.get_minLod(this.segment()); } + /// Sets `minLod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minLod(MemorySegment segment, long index, @CType("float") float value) { VH_minLod.set(segment, 0L, index, value); } + /// Sets `minLod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minLod(MemorySegment segment, @CType("float") float value) { VkSamplerCreateInfo.set_minLod(segment, 0L, value); } + /// Sets `minLod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo minLodAt(long index, @CType("float") float value) { VkSamplerCreateInfo.set_minLod(this.segment(), index, value); return this; } + /// Sets `minLod` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo minLod(@CType("float") float value) { VkSamplerCreateInfo.set_minLod(this.segment(), value); return this; } + + /// {@return `maxLod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxLod(MemorySegment segment, long index) { return (float) VH_maxLod.get(segment, 0L, index); } + /// {@return `maxLod`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxLod(MemorySegment segment) { return VkSamplerCreateInfo.get_maxLod(segment, 0L); } + /// {@return `maxLod` at the given index} + /// @param index the index + public @CType("float") float maxLodAt(long index) { return VkSamplerCreateInfo.get_maxLod(this.segment(), index); } + /// {@return `maxLod`} + public @CType("float") float maxLod() { return VkSamplerCreateInfo.get_maxLod(this.segment()); } + /// Sets `maxLod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxLod(MemorySegment segment, long index, @CType("float") float value) { VH_maxLod.set(segment, 0L, index, value); } + /// Sets `maxLod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxLod(MemorySegment segment, @CType("float") float value) { VkSamplerCreateInfo.set_maxLod(segment, 0L, value); } + /// Sets `maxLod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo maxLodAt(long index, @CType("float") float value) { VkSamplerCreateInfo.set_maxLod(this.segment(), index, value); return this; } + /// Sets `maxLod` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo maxLod(@CType("float") float value) { VkSamplerCreateInfo.set_maxLod(this.segment(), value); return this; } + + /// {@return `borderColor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBorderColor") int get_borderColor(MemorySegment segment, long index) { return (int) VH_borderColor.get(segment, 0L, index); } + /// {@return `borderColor`} + /// @param segment the segment of the struct + public static @CType("VkBorderColor") int get_borderColor(MemorySegment segment) { return VkSamplerCreateInfo.get_borderColor(segment, 0L); } + /// {@return `borderColor` at the given index} + /// @param index the index + public @CType("VkBorderColor") int borderColorAt(long index) { return VkSamplerCreateInfo.get_borderColor(this.segment(), index); } + /// {@return `borderColor`} + public @CType("VkBorderColor") int borderColor() { return VkSamplerCreateInfo.get_borderColor(this.segment()); } + /// Sets `borderColor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_borderColor(MemorySegment segment, long index, @CType("VkBorderColor") int value) { VH_borderColor.set(segment, 0L, index, value); } + /// Sets `borderColor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_borderColor(MemorySegment segment, @CType("VkBorderColor") int value) { VkSamplerCreateInfo.set_borderColor(segment, 0L, value); } + /// Sets `borderColor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo borderColorAt(long index, @CType("VkBorderColor") int value) { VkSamplerCreateInfo.set_borderColor(this.segment(), index, value); return this; } + /// Sets `borderColor` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo borderColor(@CType("VkBorderColor") int value) { VkSamplerCreateInfo.set_borderColor(this.segment(), value); return this; } + + /// {@return `unnormalizedCoordinates` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_unnormalizedCoordinates(MemorySegment segment, long index) { return (int) VH_unnormalizedCoordinates.get(segment, 0L, index); } + /// {@return `unnormalizedCoordinates`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_unnormalizedCoordinates(MemorySegment segment) { return VkSamplerCreateInfo.get_unnormalizedCoordinates(segment, 0L); } + /// {@return `unnormalizedCoordinates` at the given index} + /// @param index the index + public @CType("VkBool32") int unnormalizedCoordinatesAt(long index) { return VkSamplerCreateInfo.get_unnormalizedCoordinates(this.segment(), index); } + /// {@return `unnormalizedCoordinates`} + public @CType("VkBool32") int unnormalizedCoordinates() { return VkSamplerCreateInfo.get_unnormalizedCoordinates(this.segment()); } + /// Sets `unnormalizedCoordinates` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_unnormalizedCoordinates(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_unnormalizedCoordinates.set(segment, 0L, index, value); } + /// Sets `unnormalizedCoordinates` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_unnormalizedCoordinates(MemorySegment segment, @CType("VkBool32") int value) { VkSamplerCreateInfo.set_unnormalizedCoordinates(segment, 0L, value); } + /// Sets `unnormalizedCoordinates` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo unnormalizedCoordinatesAt(long index, @CType("VkBool32") int value) { VkSamplerCreateInfo.set_unnormalizedCoordinates(this.segment(), index, value); return this; } + /// Sets `unnormalizedCoordinates` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerCreateInfo unnormalizedCoordinates(@CType("VkBool32") int value) { VkSamplerCreateInfo.set_unnormalizedCoordinates(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerReductionModeCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerReductionModeCreateInfo.java new file mode 100644 index 00000000..d18d10ab --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerReductionModeCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### reductionMode +/// [VarHandle][#VH_reductionMode] - [Getter][#reductionMode()] - [Setter][#reductionMode(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerReductionModeCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkSamplerReductionMode reductionMode; +/// } VkSamplerReductionModeCreateInfo; +/// ``` +public final class VkSamplerReductionModeCreateInfo extends Struct { + /// The struct layout of `VkSamplerReductionModeCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("reductionMode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `reductionMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reductionMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reductionMode")); + + /// Creates `VkSamplerReductionModeCreateInfo` with the given segment. + /// @param segment the memory segment + public VkSamplerReductionModeCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerReductionModeCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerReductionModeCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerReductionModeCreateInfo(segment); } + + /// Creates `VkSamplerReductionModeCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerReductionModeCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerReductionModeCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerReductionModeCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerReductionModeCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerReductionModeCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerReductionModeCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerReductionModeCreateInfo` + public static VkSamplerReductionModeCreateInfo alloc(SegmentAllocator allocator) { return new VkSamplerReductionModeCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerReductionModeCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerReductionModeCreateInfo` + public static VkSamplerReductionModeCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkSamplerReductionModeCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerReductionModeCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerReductionModeCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerReductionModeCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerReductionModeCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerReductionModeCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerReductionModeCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerReductionModeCreateInfo sType(@CType("VkStructureType") int value) { VkSamplerReductionModeCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerReductionModeCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerReductionModeCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerReductionModeCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerReductionModeCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerReductionModeCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerReductionModeCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerReductionModeCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerReductionModeCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `reductionMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerReductionMode") int get_reductionMode(MemorySegment segment, long index) { return (int) VH_reductionMode.get(segment, 0L, index); } + /// {@return `reductionMode`} + /// @param segment the segment of the struct + public static @CType("VkSamplerReductionMode") int get_reductionMode(MemorySegment segment) { return VkSamplerReductionModeCreateInfo.get_reductionMode(segment, 0L); } + /// {@return `reductionMode` at the given index} + /// @param index the index + public @CType("VkSamplerReductionMode") int reductionModeAt(long index) { return VkSamplerReductionModeCreateInfo.get_reductionMode(this.segment(), index); } + /// {@return `reductionMode`} + public @CType("VkSamplerReductionMode") int reductionMode() { return VkSamplerReductionModeCreateInfo.get_reductionMode(this.segment()); } + /// Sets `reductionMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reductionMode(MemorySegment segment, long index, @CType("VkSamplerReductionMode") int value) { VH_reductionMode.set(segment, 0L, index, value); } + /// Sets `reductionMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reductionMode(MemorySegment segment, @CType("VkSamplerReductionMode") int value) { VkSamplerReductionModeCreateInfo.set_reductionMode(segment, 0L, value); } + /// Sets `reductionMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerReductionModeCreateInfo reductionModeAt(long index, @CType("VkSamplerReductionMode") int value) { VkSamplerReductionModeCreateInfo.set_reductionMode(this.segment(), index, value); return this; } + /// Sets `reductionMode` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerReductionModeCreateInfo reductionMode(@CType("VkSamplerReductionMode") int value) { VkSamplerReductionModeCreateInfo.set_reductionMode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerYcbcrConversionCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerYcbcrConversionCreateInfo.java new file mode 100644 index 00000000..ee380cba --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerYcbcrConversionCreateInfo.java @@ -0,0 +1,446 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### ycbcrModel +/// [VarHandle][#VH_ycbcrModel] - [Getter][#ycbcrModel()] - [Setter][#ycbcrModel(int)] +/// ### ycbcrRange +/// [VarHandle][#VH_ycbcrRange] - [Getter][#ycbcrRange()] - [Setter][#ycbcrRange(int)] +/// ### components +/// [Byte offset][#OFFSET_components] - [Memory layout][#ML_components] - [Getter][#components()] - [Setter][#components(java.lang.foreign.MemorySegment)] +/// ### xChromaOffset +/// [VarHandle][#VH_xChromaOffset] - [Getter][#xChromaOffset()] - [Setter][#xChromaOffset(int)] +/// ### yChromaOffset +/// [VarHandle][#VH_yChromaOffset] - [Getter][#yChromaOffset()] - [Setter][#yChromaOffset(int)] +/// ### chromaFilter +/// [VarHandle][#VH_chromaFilter] - [Getter][#chromaFilter()] - [Setter][#chromaFilter(int)] +/// ### forceExplicitReconstruction +/// [VarHandle][#VH_forceExplicitReconstruction] - [Getter][#forceExplicitReconstruction()] - [Setter][#forceExplicitReconstruction(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerYcbcrConversionCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkFormat format; +/// VkSamplerYcbcrModelConversion ycbcrModel; +/// VkSamplerYcbcrRange ycbcrRange; +/// VkComponentMapping components; +/// VkChromaLocation xChromaOffset; +/// VkChromaLocation yChromaOffset; +/// VkFilter chromaFilter; +/// VkBool32 forceExplicitReconstruction; +/// } VkSamplerYcbcrConversionCreateInfo; +/// ``` +public final class VkSamplerYcbcrConversionCreateInfo extends Struct { + /// The struct layout of `VkSamplerYcbcrConversionCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_INT.withName("ycbcrModel"), + ValueLayout.JAVA_INT.withName("ycbcrRange"), + overrungl.vulkan.struct.VkComponentMapping.LAYOUT.withName("components"), + ValueLayout.JAVA_INT.withName("xChromaOffset"), + ValueLayout.JAVA_INT.withName("yChromaOffset"), + ValueLayout.JAVA_INT.withName("chromaFilter"), + ValueLayout.JAVA_INT.withName("forceExplicitReconstruction") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `ycbcrModel` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ycbcrModel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ycbcrModel")); + /// The [VarHandle] of `ycbcrRange` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ycbcrRange = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ycbcrRange")); + /// The byte offset of `components`. + public static final long OFFSET_components = LAYOUT.byteOffset(PathElement.groupElement("components")); + /// The memory layout of `components`. + public static final MemoryLayout ML_components = LAYOUT.select(PathElement.groupElement("components")); + /// The [VarHandle] of `xChromaOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_xChromaOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("xChromaOffset")); + /// The [VarHandle] of `yChromaOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_yChromaOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("yChromaOffset")); + /// The [VarHandle] of `chromaFilter` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chromaFilter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chromaFilter")); + /// The [VarHandle] of `forceExplicitReconstruction` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_forceExplicitReconstruction = LAYOUT.arrayElementVarHandle(PathElement.groupElement("forceExplicitReconstruction")); + + /// Creates `VkSamplerYcbcrConversionCreateInfo` with the given segment. + /// @param segment the memory segment + public VkSamplerYcbcrConversionCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerYcbcrConversionCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionCreateInfo(segment); } + + /// Creates `VkSamplerYcbcrConversionCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerYcbcrConversionCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerYcbcrConversionCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerYcbcrConversionCreateInfo` + public static VkSamplerYcbcrConversionCreateInfo alloc(SegmentAllocator allocator) { return new VkSamplerYcbcrConversionCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerYcbcrConversionCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerYcbcrConversionCreateInfo` + public static VkSamplerYcbcrConversionCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkSamplerYcbcrConversionCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerYcbcrConversionCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerYcbcrConversionCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerYcbcrConversionCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerYcbcrConversionCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerYcbcrConversionCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo sType(@CType("VkStructureType") int value) { VkSamplerYcbcrConversionCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerYcbcrConversionCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerYcbcrConversionCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerYcbcrConversionCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkSamplerYcbcrConversionCreateInfo.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkSamplerYcbcrConversionCreateInfo.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkSamplerYcbcrConversionCreateInfo.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkSamplerYcbcrConversionCreateInfo.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo formatAt(long index, @CType("VkFormat") int value) { VkSamplerYcbcrConversionCreateInfo.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo format(@CType("VkFormat") int value) { VkSamplerYcbcrConversionCreateInfo.set_format(this.segment(), value); return this; } + + /// {@return `ycbcrModel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrModelConversion") int get_ycbcrModel(MemorySegment segment, long index) { return (int) VH_ycbcrModel.get(segment, 0L, index); } + /// {@return `ycbcrModel`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrModelConversion") int get_ycbcrModel(MemorySegment segment) { return VkSamplerYcbcrConversionCreateInfo.get_ycbcrModel(segment, 0L); } + /// {@return `ycbcrModel` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrModelConversion") int ycbcrModelAt(long index) { return VkSamplerYcbcrConversionCreateInfo.get_ycbcrModel(this.segment(), index); } + /// {@return `ycbcrModel`} + public @CType("VkSamplerYcbcrModelConversion") int ycbcrModel() { return VkSamplerYcbcrConversionCreateInfo.get_ycbcrModel(this.segment()); } + /// Sets `ycbcrModel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ycbcrModel(MemorySegment segment, long index, @CType("VkSamplerYcbcrModelConversion") int value) { VH_ycbcrModel.set(segment, 0L, index, value); } + /// Sets `ycbcrModel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ycbcrModel(MemorySegment segment, @CType("VkSamplerYcbcrModelConversion") int value) { VkSamplerYcbcrConversionCreateInfo.set_ycbcrModel(segment, 0L, value); } + /// Sets `ycbcrModel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo ycbcrModelAt(long index, @CType("VkSamplerYcbcrModelConversion") int value) { VkSamplerYcbcrConversionCreateInfo.set_ycbcrModel(this.segment(), index, value); return this; } + /// Sets `ycbcrModel` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo ycbcrModel(@CType("VkSamplerYcbcrModelConversion") int value) { VkSamplerYcbcrConversionCreateInfo.set_ycbcrModel(this.segment(), value); return this; } + + /// {@return `ycbcrRange` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrRange") int get_ycbcrRange(MemorySegment segment, long index) { return (int) VH_ycbcrRange.get(segment, 0L, index); } + /// {@return `ycbcrRange`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrRange") int get_ycbcrRange(MemorySegment segment) { return VkSamplerYcbcrConversionCreateInfo.get_ycbcrRange(segment, 0L); } + /// {@return `ycbcrRange` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrRange") int ycbcrRangeAt(long index) { return VkSamplerYcbcrConversionCreateInfo.get_ycbcrRange(this.segment(), index); } + /// {@return `ycbcrRange`} + public @CType("VkSamplerYcbcrRange") int ycbcrRange() { return VkSamplerYcbcrConversionCreateInfo.get_ycbcrRange(this.segment()); } + /// Sets `ycbcrRange` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ycbcrRange(MemorySegment segment, long index, @CType("VkSamplerYcbcrRange") int value) { VH_ycbcrRange.set(segment, 0L, index, value); } + /// Sets `ycbcrRange` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ycbcrRange(MemorySegment segment, @CType("VkSamplerYcbcrRange") int value) { VkSamplerYcbcrConversionCreateInfo.set_ycbcrRange(segment, 0L, value); } + /// Sets `ycbcrRange` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo ycbcrRangeAt(long index, @CType("VkSamplerYcbcrRange") int value) { VkSamplerYcbcrConversionCreateInfo.set_ycbcrRange(this.segment(), index, value); return this; } + /// Sets `ycbcrRange` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo ycbcrRange(@CType("VkSamplerYcbcrRange") int value) { VkSamplerYcbcrConversionCreateInfo.set_ycbcrRange(this.segment(), value); return this; } + + /// {@return `components` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_components(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_components, index), ML_components); } + /// {@return `components`} + /// @param segment the segment of the struct + public static @CType("VkComponentMapping") java.lang.foreign.MemorySegment get_components(MemorySegment segment) { return VkSamplerYcbcrConversionCreateInfo.get_components(segment, 0L); } + /// {@return `components` at the given index} + /// @param index the index + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment componentsAt(long index) { return VkSamplerYcbcrConversionCreateInfo.get_components(this.segment(), index); } + /// {@return `components`} + public @CType("VkComponentMapping") java.lang.foreign.MemorySegment components() { return VkSamplerYcbcrConversionCreateInfo.get_components(this.segment()); } + /// Sets `components` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_components(MemorySegment segment, long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_components, index), ML_components.byteSize()); } + /// Sets `components` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_components(MemorySegment segment, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionCreateInfo.set_components(segment, 0L, value); } + /// Sets `components` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo componentsAt(long index, @CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionCreateInfo.set_components(this.segment(), index, value); return this; } + /// Sets `components` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo components(@CType("VkComponentMapping") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionCreateInfo.set_components(this.segment(), value); return this; } + + /// {@return `xChromaOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_xChromaOffset(MemorySegment segment, long index) { return (int) VH_xChromaOffset.get(segment, 0L, index); } + /// {@return `xChromaOffset`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_xChromaOffset(MemorySegment segment) { return VkSamplerYcbcrConversionCreateInfo.get_xChromaOffset(segment, 0L); } + /// {@return `xChromaOffset` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int xChromaOffsetAt(long index) { return VkSamplerYcbcrConversionCreateInfo.get_xChromaOffset(this.segment(), index); } + /// {@return `xChromaOffset`} + public @CType("VkChromaLocation") int xChromaOffset() { return VkSamplerYcbcrConversionCreateInfo.get_xChromaOffset(this.segment()); } + /// Sets `xChromaOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_xChromaOffset(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_xChromaOffset.set(segment, 0L, index, value); } + /// Sets `xChromaOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_xChromaOffset(MemorySegment segment, @CType("VkChromaLocation") int value) { VkSamplerYcbcrConversionCreateInfo.set_xChromaOffset(segment, 0L, value); } + /// Sets `xChromaOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo xChromaOffsetAt(long index, @CType("VkChromaLocation") int value) { VkSamplerYcbcrConversionCreateInfo.set_xChromaOffset(this.segment(), index, value); return this; } + /// Sets `xChromaOffset` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo xChromaOffset(@CType("VkChromaLocation") int value) { VkSamplerYcbcrConversionCreateInfo.set_xChromaOffset(this.segment(), value); return this; } + + /// {@return `yChromaOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkChromaLocation") int get_yChromaOffset(MemorySegment segment, long index) { return (int) VH_yChromaOffset.get(segment, 0L, index); } + /// {@return `yChromaOffset`} + /// @param segment the segment of the struct + public static @CType("VkChromaLocation") int get_yChromaOffset(MemorySegment segment) { return VkSamplerYcbcrConversionCreateInfo.get_yChromaOffset(segment, 0L); } + /// {@return `yChromaOffset` at the given index} + /// @param index the index + public @CType("VkChromaLocation") int yChromaOffsetAt(long index) { return VkSamplerYcbcrConversionCreateInfo.get_yChromaOffset(this.segment(), index); } + /// {@return `yChromaOffset`} + public @CType("VkChromaLocation") int yChromaOffset() { return VkSamplerYcbcrConversionCreateInfo.get_yChromaOffset(this.segment()); } + /// Sets `yChromaOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_yChromaOffset(MemorySegment segment, long index, @CType("VkChromaLocation") int value) { VH_yChromaOffset.set(segment, 0L, index, value); } + /// Sets `yChromaOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_yChromaOffset(MemorySegment segment, @CType("VkChromaLocation") int value) { VkSamplerYcbcrConversionCreateInfo.set_yChromaOffset(segment, 0L, value); } + /// Sets `yChromaOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo yChromaOffsetAt(long index, @CType("VkChromaLocation") int value) { VkSamplerYcbcrConversionCreateInfo.set_yChromaOffset(this.segment(), index, value); return this; } + /// Sets `yChromaOffset` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo yChromaOffset(@CType("VkChromaLocation") int value) { VkSamplerYcbcrConversionCreateInfo.set_yChromaOffset(this.segment(), value); return this; } + + /// {@return `chromaFilter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFilter") int get_chromaFilter(MemorySegment segment, long index) { return (int) VH_chromaFilter.get(segment, 0L, index); } + /// {@return `chromaFilter`} + /// @param segment the segment of the struct + public static @CType("VkFilter") int get_chromaFilter(MemorySegment segment) { return VkSamplerYcbcrConversionCreateInfo.get_chromaFilter(segment, 0L); } + /// {@return `chromaFilter` at the given index} + /// @param index the index + public @CType("VkFilter") int chromaFilterAt(long index) { return VkSamplerYcbcrConversionCreateInfo.get_chromaFilter(this.segment(), index); } + /// {@return `chromaFilter`} + public @CType("VkFilter") int chromaFilter() { return VkSamplerYcbcrConversionCreateInfo.get_chromaFilter(this.segment()); } + /// Sets `chromaFilter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chromaFilter(MemorySegment segment, long index, @CType("VkFilter") int value) { VH_chromaFilter.set(segment, 0L, index, value); } + /// Sets `chromaFilter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chromaFilter(MemorySegment segment, @CType("VkFilter") int value) { VkSamplerYcbcrConversionCreateInfo.set_chromaFilter(segment, 0L, value); } + /// Sets `chromaFilter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo chromaFilterAt(long index, @CType("VkFilter") int value) { VkSamplerYcbcrConversionCreateInfo.set_chromaFilter(this.segment(), index, value); return this; } + /// Sets `chromaFilter` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo chromaFilter(@CType("VkFilter") int value) { VkSamplerYcbcrConversionCreateInfo.set_chromaFilter(this.segment(), value); return this; } + + /// {@return `forceExplicitReconstruction` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_forceExplicitReconstruction(MemorySegment segment, long index) { return (int) VH_forceExplicitReconstruction.get(segment, 0L, index); } + /// {@return `forceExplicitReconstruction`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_forceExplicitReconstruction(MemorySegment segment) { return VkSamplerYcbcrConversionCreateInfo.get_forceExplicitReconstruction(segment, 0L); } + /// {@return `forceExplicitReconstruction` at the given index} + /// @param index the index + public @CType("VkBool32") int forceExplicitReconstructionAt(long index) { return VkSamplerYcbcrConversionCreateInfo.get_forceExplicitReconstruction(this.segment(), index); } + /// {@return `forceExplicitReconstruction`} + public @CType("VkBool32") int forceExplicitReconstruction() { return VkSamplerYcbcrConversionCreateInfo.get_forceExplicitReconstruction(this.segment()); } + /// Sets `forceExplicitReconstruction` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_forceExplicitReconstruction(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_forceExplicitReconstruction.set(segment, 0L, index, value); } + /// Sets `forceExplicitReconstruction` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_forceExplicitReconstruction(MemorySegment segment, @CType("VkBool32") int value) { VkSamplerYcbcrConversionCreateInfo.set_forceExplicitReconstruction(segment, 0L, value); } + /// Sets `forceExplicitReconstruction` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo forceExplicitReconstructionAt(long index, @CType("VkBool32") int value) { VkSamplerYcbcrConversionCreateInfo.set_forceExplicitReconstruction(this.segment(), index, value); return this; } + /// Sets `forceExplicitReconstruction` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionCreateInfo forceExplicitReconstruction(@CType("VkBool32") int value) { VkSamplerYcbcrConversionCreateInfo.set_forceExplicitReconstruction(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerYcbcrConversionImageFormatProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerYcbcrConversionImageFormatProperties.java new file mode 100644 index 00000000..5289849a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerYcbcrConversionImageFormatProperties.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### combinedImageSamplerDescriptorCount +/// [VarHandle][#VH_combinedImageSamplerDescriptorCount] - [Getter][#combinedImageSamplerDescriptorCount()] - [Setter][#combinedImageSamplerDescriptorCount(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerYcbcrConversionImageFormatProperties { +/// VkStructureType sType; +/// void * pNext; +/// uint32_t combinedImageSamplerDescriptorCount; +/// } VkSamplerYcbcrConversionImageFormatProperties; +/// ``` +public final class VkSamplerYcbcrConversionImageFormatProperties extends Struct { + /// The struct layout of `VkSamplerYcbcrConversionImageFormatProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("combinedImageSamplerDescriptorCount") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `combinedImageSamplerDescriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_combinedImageSamplerDescriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("combinedImageSamplerDescriptorCount")); + + /// Creates `VkSamplerYcbcrConversionImageFormatProperties` with the given segment. + /// @param segment the memory segment + public VkSamplerYcbcrConversionImageFormatProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerYcbcrConversionImageFormatProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionImageFormatProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionImageFormatProperties(segment); } + + /// Creates `VkSamplerYcbcrConversionImageFormatProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionImageFormatProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionImageFormatProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerYcbcrConversionImageFormatProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionImageFormatProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionImageFormatProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerYcbcrConversionImageFormatProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerYcbcrConversionImageFormatProperties` + public static VkSamplerYcbcrConversionImageFormatProperties alloc(SegmentAllocator allocator) { return new VkSamplerYcbcrConversionImageFormatProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerYcbcrConversionImageFormatProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerYcbcrConversionImageFormatProperties` + public static VkSamplerYcbcrConversionImageFormatProperties alloc(SegmentAllocator allocator, long count) { return new VkSamplerYcbcrConversionImageFormatProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerYcbcrConversionImageFormatProperties.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerYcbcrConversionImageFormatProperties.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerYcbcrConversionImageFormatProperties.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerYcbcrConversionImageFormatProperties.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionImageFormatProperties sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerYcbcrConversionImageFormatProperties.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionImageFormatProperties sType(@CType("VkStructureType") int value) { VkSamplerYcbcrConversionImageFormatProperties.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerYcbcrConversionImageFormatProperties.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerYcbcrConversionImageFormatProperties.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerYcbcrConversionImageFormatProperties.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionImageFormatProperties.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionImageFormatProperties pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionImageFormatProperties.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionImageFormatProperties pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionImageFormatProperties.set_pNext(this.segment(), value); return this; } + + /// {@return `combinedImageSamplerDescriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_combinedImageSamplerDescriptorCount(MemorySegment segment, long index) { return (int) VH_combinedImageSamplerDescriptorCount.get(segment, 0L, index); } + /// {@return `combinedImageSamplerDescriptorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_combinedImageSamplerDescriptorCount(MemorySegment segment) { return VkSamplerYcbcrConversionImageFormatProperties.get_combinedImageSamplerDescriptorCount(segment, 0L); } + /// {@return `combinedImageSamplerDescriptorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int combinedImageSamplerDescriptorCountAt(long index) { return VkSamplerYcbcrConversionImageFormatProperties.get_combinedImageSamplerDescriptorCount(this.segment(), index); } + /// {@return `combinedImageSamplerDescriptorCount`} + public @CType("uint32_t") int combinedImageSamplerDescriptorCount() { return VkSamplerYcbcrConversionImageFormatProperties.get_combinedImageSamplerDescriptorCount(this.segment()); } + /// Sets `combinedImageSamplerDescriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_combinedImageSamplerDescriptorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_combinedImageSamplerDescriptorCount.set(segment, 0L, index, value); } + /// Sets `combinedImageSamplerDescriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_combinedImageSamplerDescriptorCount(MemorySegment segment, @CType("uint32_t") int value) { VkSamplerYcbcrConversionImageFormatProperties.set_combinedImageSamplerDescriptorCount(segment, 0L, value); } + /// Sets `combinedImageSamplerDescriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionImageFormatProperties combinedImageSamplerDescriptorCountAt(long index, @CType("uint32_t") int value) { VkSamplerYcbcrConversionImageFormatProperties.set_combinedImageSamplerDescriptorCount(this.segment(), index, value); return this; } + /// Sets `combinedImageSamplerDescriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionImageFormatProperties combinedImageSamplerDescriptorCount(@CType("uint32_t") int value) { VkSamplerYcbcrConversionImageFormatProperties.set_combinedImageSamplerDescriptorCount(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerYcbcrConversionInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerYcbcrConversionInfo.java new file mode 100644 index 00000000..3f024b45 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSamplerYcbcrConversionInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### conversion +/// [VarHandle][#VH_conversion] - [Getter][#conversion()] - [Setter][#conversion(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSamplerYcbcrConversionInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkSamplerYcbcrConversion conversion; +/// } VkSamplerYcbcrConversionInfo; +/// ``` +public final class VkSamplerYcbcrConversionInfo extends Struct { + /// The struct layout of `VkSamplerYcbcrConversionInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("conversion") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `conversion` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_conversion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conversion")); + + /// Creates `VkSamplerYcbcrConversionInfo` with the given segment. + /// @param segment the memory segment + public VkSamplerYcbcrConversionInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSamplerYcbcrConversionInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionInfo(segment); } + + /// Creates `VkSamplerYcbcrConversionInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSamplerYcbcrConversionInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSamplerYcbcrConversionInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSamplerYcbcrConversionInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSamplerYcbcrConversionInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSamplerYcbcrConversionInfo` + public static VkSamplerYcbcrConversionInfo alloc(SegmentAllocator allocator) { return new VkSamplerYcbcrConversionInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSamplerYcbcrConversionInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSamplerYcbcrConversionInfo` + public static VkSamplerYcbcrConversionInfo alloc(SegmentAllocator allocator, long count) { return new VkSamplerYcbcrConversionInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSamplerYcbcrConversionInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSamplerYcbcrConversionInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSamplerYcbcrConversionInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSamplerYcbcrConversionInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSamplerYcbcrConversionInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionInfo sType(@CType("VkStructureType") int value) { VkSamplerYcbcrConversionInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSamplerYcbcrConversionInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSamplerYcbcrConversionInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSamplerYcbcrConversionInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `conversion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSamplerYcbcrConversion") java.lang.foreign.MemorySegment get_conversion(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_conversion.get(segment, 0L, index); } + /// {@return `conversion`} + /// @param segment the segment of the struct + public static @CType("VkSamplerYcbcrConversion") java.lang.foreign.MemorySegment get_conversion(MemorySegment segment) { return VkSamplerYcbcrConversionInfo.get_conversion(segment, 0L); } + /// {@return `conversion` at the given index} + /// @param index the index + public @CType("VkSamplerYcbcrConversion") java.lang.foreign.MemorySegment conversionAt(long index) { return VkSamplerYcbcrConversionInfo.get_conversion(this.segment(), index); } + /// {@return `conversion`} + public @CType("VkSamplerYcbcrConversion") java.lang.foreign.MemorySegment conversion() { return VkSamplerYcbcrConversionInfo.get_conversion(this.segment()); } + /// Sets `conversion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conversion(MemorySegment segment, long index, @CType("VkSamplerYcbcrConversion") java.lang.foreign.MemorySegment value) { VH_conversion.set(segment, 0L, index, value); } + /// Sets `conversion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conversion(MemorySegment segment, @CType("VkSamplerYcbcrConversion") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionInfo.set_conversion(segment, 0L, value); } + /// Sets `conversion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionInfo conversionAt(long index, @CType("VkSamplerYcbcrConversion") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionInfo.set_conversion(this.segment(), index, value); return this; } + /// Sets `conversion` with the given value. + /// @param value the value + /// @return `this` + public VkSamplerYcbcrConversionInfo conversion(@CType("VkSamplerYcbcrConversion") java.lang.foreign.MemorySegment value) { VkSamplerYcbcrConversionInfo.set_conversion(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreCreateInfo.java new file mode 100644 index 00000000..21888e15 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreCreateInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphoreCreateFlags flags; +/// } VkSemaphoreCreateInfo; +/// ``` +public final class VkSemaphoreCreateInfo extends Struct { + /// The struct layout of `VkSemaphoreCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkSemaphoreCreateInfo` with the given segment. + /// @param segment the memory segment + public VkSemaphoreCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreCreateInfo(segment); } + + /// Creates `VkSemaphoreCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreCreateInfo` + public static VkSemaphoreCreateInfo alloc(SegmentAllocator allocator) { return new VkSemaphoreCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreCreateInfo` + public static VkSemaphoreCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreCreateInfo sType(@CType("VkStructureType") int value) { VkSemaphoreCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphoreCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSemaphoreCreateFlags") int get_flags(MemorySegment segment) { return VkSemaphoreCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSemaphoreCreateFlags") int flagsAt(long index) { return VkSemaphoreCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSemaphoreCreateFlags") int flags() { return VkSemaphoreCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSemaphoreCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSemaphoreCreateFlags") int value) { VkSemaphoreCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreCreateInfo flagsAt(long index, @CType("VkSemaphoreCreateFlags") int value) { VkSemaphoreCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreCreateInfo flags(@CType("VkSemaphoreCreateFlags") int value) { VkSemaphoreCreateInfo.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreSignalInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreSignalInfo.java new file mode 100644 index 00000000..cb87d530 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreSignalInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### value +/// [VarHandle][#VH_value] - [Getter][#value()] - [Setter][#value(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreSignalInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// uint64_t value; +/// } VkSemaphoreSignalInfo; +/// ``` +public final class VkSemaphoreSignalInfo extends Struct { + /// The struct layout of `VkSemaphoreSignalInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.JAVA_LONG.withName("value") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `value` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_value = LAYOUT.arrayElementVarHandle(PathElement.groupElement("value")); + + /// Creates `VkSemaphoreSignalInfo` with the given segment. + /// @param segment the memory segment + public VkSemaphoreSignalInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreSignalInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSignalInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSignalInfo(segment); } + + /// Creates `VkSemaphoreSignalInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSignalInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSignalInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreSignalInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSignalInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSignalInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreSignalInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreSignalInfo` + public static VkSemaphoreSignalInfo alloc(SegmentAllocator allocator) { return new VkSemaphoreSignalInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreSignalInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreSignalInfo` + public static VkSemaphoreSignalInfo alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreSignalInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreSignalInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreSignalInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreSignalInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreSignalInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSignalInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreSignalInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSignalInfo sType(@CType("VkStructureType") int value) { VkSemaphoreSignalInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreSignalInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreSignalInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreSignalInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSignalInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSignalInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSignalInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSignalInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSignalInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkSemaphoreSignalInfo.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkSemaphoreSignalInfo.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkSemaphoreSignalInfo.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreSignalInfo.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSignalInfo semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreSignalInfo.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSignalInfo semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreSignalInfo.set_semaphore(this.segment(), value); return this; } + + /// {@return `value` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_value(MemorySegment segment, long index) { return (long) VH_value.get(segment, 0L, index); } + /// {@return `value`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_value(MemorySegment segment) { return VkSemaphoreSignalInfo.get_value(segment, 0L); } + /// {@return `value` at the given index} + /// @param index the index + public @CType("uint64_t") long valueAt(long index) { return VkSemaphoreSignalInfo.get_value(this.segment(), index); } + /// {@return `value`} + public @CType("uint64_t") long value() { return VkSemaphoreSignalInfo.get_value(this.segment()); } + /// Sets `value` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_value(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_value.set(segment, 0L, index, value); } + /// Sets `value` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_value(MemorySegment segment, @CType("uint64_t") long value) { VkSemaphoreSignalInfo.set_value(segment, 0L, value); } + /// Sets `value` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSignalInfo valueAt(long index, @CType("uint64_t") long value) { VkSemaphoreSignalInfo.set_value(this.segment(), index, value); return this; } + /// Sets `value` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSignalInfo value(@CType("uint64_t") long value) { VkSemaphoreSignalInfo.set_value(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreSubmitInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreSubmitInfo.java new file mode 100644 index 00000000..3ce5ab9c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreSubmitInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphore +/// [VarHandle][#VH_semaphore] - [Getter][#semaphore()] - [Setter][#semaphore(java.lang.foreign.MemorySegment)] +/// ### value +/// [VarHandle][#VH_value] - [Getter][#value()] - [Setter][#value(long)] +/// ### stageMask +/// [VarHandle][#VH_stageMask] - [Getter][#stageMask()] - [Setter][#stageMask(long)] +/// ### deviceIndex +/// [VarHandle][#VH_deviceIndex] - [Getter][#deviceIndex()] - [Setter][#deviceIndex(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreSubmitInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphore semaphore; +/// uint64_t value; +/// VkPipelineStageFlags2 stageMask; +/// uint32_t deviceIndex; +/// } VkSemaphoreSubmitInfo; +/// ``` +public final class VkSemaphoreSubmitInfo extends Struct { + /// The struct layout of `VkSemaphoreSubmitInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("semaphore"), + ValueLayout.JAVA_LONG.withName("value"), + ValueLayout.JAVA_LONG.withName("stageMask"), + ValueLayout.JAVA_INT.withName("deviceIndex") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphore` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_semaphore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphore")); + /// The [VarHandle] of `value` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_value = LAYOUT.arrayElementVarHandle(PathElement.groupElement("value")); + /// The [VarHandle] of `stageMask` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_stageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stageMask")); + /// The [VarHandle] of `deviceIndex` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deviceIndex = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deviceIndex")); + + /// Creates `VkSemaphoreSubmitInfo` with the given segment. + /// @param segment the memory segment + public VkSemaphoreSubmitInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreSubmitInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSubmitInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSubmitInfo(segment); } + + /// Creates `VkSemaphoreSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSubmitInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreSubmitInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreSubmitInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreSubmitInfo` + public static VkSemaphoreSubmitInfo alloc(SegmentAllocator allocator) { return new VkSemaphoreSubmitInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreSubmitInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreSubmitInfo` + public static VkSemaphoreSubmitInfo alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreSubmitInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreSubmitInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreSubmitInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreSubmitInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreSubmitInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreSubmitInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo sType(@CType("VkStructureType") int value) { VkSemaphoreSubmitInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreSubmitInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreSubmitInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreSubmitInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSubmitInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSubmitInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreSubmitInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_semaphore.get(segment, 0L, index); } + /// {@return `semaphore`} + /// @param segment the segment of the struct + public static @CType("VkSemaphore") java.lang.foreign.MemorySegment get_semaphore(MemorySegment segment) { return VkSemaphoreSubmitInfo.get_semaphore(segment, 0L); } + /// {@return `semaphore` at the given index} + /// @param index the index + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphoreAt(long index) { return VkSemaphoreSubmitInfo.get_semaphore(this.segment(), index); } + /// {@return `semaphore`} + public @CType("VkSemaphore") java.lang.foreign.MemorySegment semaphore() { return VkSemaphoreSubmitInfo.get_semaphore(this.segment()); } + /// Sets `semaphore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphore(MemorySegment segment, long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VH_semaphore.set(segment, 0L, index, value); } + /// Sets `semaphore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphore(MemorySegment segment, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreSubmitInfo.set_semaphore(segment, 0L, value); } + /// Sets `semaphore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo semaphoreAt(long index, @CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreSubmitInfo.set_semaphore(this.segment(), index, value); return this; } + /// Sets `semaphore` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo semaphore(@CType("VkSemaphore") java.lang.foreign.MemorySegment value) { VkSemaphoreSubmitInfo.set_semaphore(this.segment(), value); return this; } + + /// {@return `value` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_value(MemorySegment segment, long index) { return (long) VH_value.get(segment, 0L, index); } + /// {@return `value`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_value(MemorySegment segment) { return VkSemaphoreSubmitInfo.get_value(segment, 0L); } + /// {@return `value` at the given index} + /// @param index the index + public @CType("uint64_t") long valueAt(long index) { return VkSemaphoreSubmitInfo.get_value(this.segment(), index); } + /// {@return `value`} + public @CType("uint64_t") long value() { return VkSemaphoreSubmitInfo.get_value(this.segment()); } + /// Sets `value` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_value(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_value.set(segment, 0L, index, value); } + /// Sets `value` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_value(MemorySegment segment, @CType("uint64_t") long value) { VkSemaphoreSubmitInfo.set_value(segment, 0L, value); } + /// Sets `value` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo valueAt(long index, @CType("uint64_t") long value) { VkSemaphoreSubmitInfo.set_value(this.segment(), index, value); return this; } + /// Sets `value` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo value(@CType("uint64_t") long value) { VkSemaphoreSubmitInfo.set_value(this.segment(), value); return this; } + + /// {@return `stageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags2") long get_stageMask(MemorySegment segment, long index) { return (long) VH_stageMask.get(segment, 0L, index); } + /// {@return `stageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags2") long get_stageMask(MemorySegment segment) { return VkSemaphoreSubmitInfo.get_stageMask(segment, 0L); } + /// {@return `stageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags2") long stageMaskAt(long index) { return VkSemaphoreSubmitInfo.get_stageMask(this.segment(), index); } + /// {@return `stageMask`} + public @CType("VkPipelineStageFlags2") long stageMask() { return VkSemaphoreSubmitInfo.get_stageMask(this.segment()); } + /// Sets `stageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags2") long value) { VH_stageMask.set(segment, 0L, index, value); } + /// Sets `stageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stageMask(MemorySegment segment, @CType("VkPipelineStageFlags2") long value) { VkSemaphoreSubmitInfo.set_stageMask(segment, 0L, value); } + /// Sets `stageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo stageMaskAt(long index, @CType("VkPipelineStageFlags2") long value) { VkSemaphoreSubmitInfo.set_stageMask(this.segment(), index, value); return this; } + /// Sets `stageMask` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo stageMask(@CType("VkPipelineStageFlags2") long value) { VkSemaphoreSubmitInfo.set_stageMask(this.segment(), value); return this; } + + /// {@return `deviceIndex` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_deviceIndex(MemorySegment segment, long index) { return (int) VH_deviceIndex.get(segment, 0L, index); } + /// {@return `deviceIndex`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_deviceIndex(MemorySegment segment) { return VkSemaphoreSubmitInfo.get_deviceIndex(segment, 0L); } + /// {@return `deviceIndex` at the given index} + /// @param index the index + public @CType("uint32_t") int deviceIndexAt(long index) { return VkSemaphoreSubmitInfo.get_deviceIndex(this.segment(), index); } + /// {@return `deviceIndex`} + public @CType("uint32_t") int deviceIndex() { return VkSemaphoreSubmitInfo.get_deviceIndex(this.segment()); } + /// Sets `deviceIndex` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deviceIndex(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_deviceIndex.set(segment, 0L, index, value); } + /// Sets `deviceIndex` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deviceIndex(MemorySegment segment, @CType("uint32_t") int value) { VkSemaphoreSubmitInfo.set_deviceIndex(segment, 0L, value); } + /// Sets `deviceIndex` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo deviceIndexAt(long index, @CType("uint32_t") int value) { VkSemaphoreSubmitInfo.set_deviceIndex(this.segment(), index, value); return this; } + /// Sets `deviceIndex` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreSubmitInfo deviceIndex(@CType("uint32_t") int value) { VkSemaphoreSubmitInfo.set_deviceIndex(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreTypeCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreTypeCreateInfo.java new file mode 100644 index 00000000..58e26651 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreTypeCreateInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### semaphoreType +/// [VarHandle][#VH_semaphoreType] - [Getter][#semaphoreType()] - [Setter][#semaphoreType(int)] +/// ### initialValue +/// [VarHandle][#VH_initialValue] - [Getter][#initialValue()] - [Setter][#initialValue(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreTypeCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphoreType semaphoreType; +/// uint64_t initialValue; +/// } VkSemaphoreTypeCreateInfo; +/// ``` +public final class VkSemaphoreTypeCreateInfo extends Struct { + /// The struct layout of `VkSemaphoreTypeCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("semaphoreType"), + ValueLayout.JAVA_LONG.withName("initialValue") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `semaphoreType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_semaphoreType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphoreType")); + /// The [VarHandle] of `initialValue` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_initialValue = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initialValue")); + + /// Creates `VkSemaphoreTypeCreateInfo` with the given segment. + /// @param segment the memory segment + public VkSemaphoreTypeCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreTypeCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreTypeCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreTypeCreateInfo(segment); } + + /// Creates `VkSemaphoreTypeCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreTypeCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreTypeCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreTypeCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreTypeCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreTypeCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreTypeCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreTypeCreateInfo` + public static VkSemaphoreTypeCreateInfo alloc(SegmentAllocator allocator) { return new VkSemaphoreTypeCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreTypeCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreTypeCreateInfo` + public static VkSemaphoreTypeCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreTypeCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreTypeCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreTypeCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreTypeCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreTypeCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreTypeCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreTypeCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreTypeCreateInfo sType(@CType("VkStructureType") int value) { VkSemaphoreTypeCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreTypeCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreTypeCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreTypeCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreTypeCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreTypeCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreTypeCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreTypeCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreTypeCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `semaphoreType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphoreType") int get_semaphoreType(MemorySegment segment, long index) { return (int) VH_semaphoreType.get(segment, 0L, index); } + /// {@return `semaphoreType`} + /// @param segment the segment of the struct + public static @CType("VkSemaphoreType") int get_semaphoreType(MemorySegment segment) { return VkSemaphoreTypeCreateInfo.get_semaphoreType(segment, 0L); } + /// {@return `semaphoreType` at the given index} + /// @param index the index + public @CType("VkSemaphoreType") int semaphoreTypeAt(long index) { return VkSemaphoreTypeCreateInfo.get_semaphoreType(this.segment(), index); } + /// {@return `semaphoreType`} + public @CType("VkSemaphoreType") int semaphoreType() { return VkSemaphoreTypeCreateInfo.get_semaphoreType(this.segment()); } + /// Sets `semaphoreType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphoreType(MemorySegment segment, long index, @CType("VkSemaphoreType") int value) { VH_semaphoreType.set(segment, 0L, index, value); } + /// Sets `semaphoreType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphoreType(MemorySegment segment, @CType("VkSemaphoreType") int value) { VkSemaphoreTypeCreateInfo.set_semaphoreType(segment, 0L, value); } + /// Sets `semaphoreType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreTypeCreateInfo semaphoreTypeAt(long index, @CType("VkSemaphoreType") int value) { VkSemaphoreTypeCreateInfo.set_semaphoreType(this.segment(), index, value); return this; } + /// Sets `semaphoreType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreTypeCreateInfo semaphoreType(@CType("VkSemaphoreType") int value) { VkSemaphoreTypeCreateInfo.set_semaphoreType(this.segment(), value); return this; } + + /// {@return `initialValue` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint64_t") long get_initialValue(MemorySegment segment, long index) { return (long) VH_initialValue.get(segment, 0L, index); } + /// {@return `initialValue`} + /// @param segment the segment of the struct + public static @CType("uint64_t") long get_initialValue(MemorySegment segment) { return VkSemaphoreTypeCreateInfo.get_initialValue(segment, 0L); } + /// {@return `initialValue` at the given index} + /// @param index the index + public @CType("uint64_t") long initialValueAt(long index) { return VkSemaphoreTypeCreateInfo.get_initialValue(this.segment(), index); } + /// {@return `initialValue`} + public @CType("uint64_t") long initialValue() { return VkSemaphoreTypeCreateInfo.get_initialValue(this.segment()); } + /// Sets `initialValue` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initialValue(MemorySegment segment, long index, @CType("uint64_t") long value) { VH_initialValue.set(segment, 0L, index, value); } + /// Sets `initialValue` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initialValue(MemorySegment segment, @CType("uint64_t") long value) { VkSemaphoreTypeCreateInfo.set_initialValue(segment, 0L, value); } + /// Sets `initialValue` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreTypeCreateInfo initialValueAt(long index, @CType("uint64_t") long value) { VkSemaphoreTypeCreateInfo.set_initialValue(this.segment(), index, value); return this; } + /// Sets `initialValue` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreTypeCreateInfo initialValue(@CType("uint64_t") long value) { VkSemaphoreTypeCreateInfo.set_initialValue(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreWaitInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreWaitInfo.java new file mode 100644 index 00000000..41027275 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSemaphoreWaitInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### semaphoreCount +/// [VarHandle][#VH_semaphoreCount] - [Getter][#semaphoreCount()] - [Setter][#semaphoreCount(int)] +/// ### pSemaphores +/// [VarHandle][#VH_pSemaphores] - [Getter][#pSemaphores()] - [Setter][#pSemaphores(java.lang.foreign.MemorySegment)] +/// ### pValues +/// [VarHandle][#VH_pValues] - [Getter][#pValues()] - [Setter][#pValues(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSemaphoreWaitInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkSemaphoreWaitFlags flags; +/// uint32_t semaphoreCount; +/// const VkSemaphore * pSemaphores; +/// const uint64_t * pValues; +/// } VkSemaphoreWaitInfo; +/// ``` +public final class VkSemaphoreWaitInfo extends Struct { + /// The struct layout of `VkSemaphoreWaitInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("semaphoreCount"), + ValueLayout.ADDRESS.withName("pSemaphores"), + ValueLayout.ADDRESS.withName("pValues") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `semaphoreCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_semaphoreCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("semaphoreCount")); + /// The [VarHandle] of `pSemaphores` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSemaphores = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSemaphores")); + /// The [VarHandle] of `pValues` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pValues = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pValues")); + + /// Creates `VkSemaphoreWaitInfo` with the given segment. + /// @param segment the memory segment + public VkSemaphoreWaitInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSemaphoreWaitInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreWaitInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreWaitInfo(segment); } + + /// Creates `VkSemaphoreWaitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreWaitInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreWaitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSemaphoreWaitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSemaphoreWaitInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSemaphoreWaitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSemaphoreWaitInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSemaphoreWaitInfo` + public static VkSemaphoreWaitInfo alloc(SegmentAllocator allocator) { return new VkSemaphoreWaitInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSemaphoreWaitInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSemaphoreWaitInfo` + public static VkSemaphoreWaitInfo alloc(SegmentAllocator allocator, long count) { return new VkSemaphoreWaitInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSemaphoreWaitInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSemaphoreWaitInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSemaphoreWaitInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSemaphoreWaitInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSemaphoreWaitInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo sType(@CType("VkStructureType") int value) { VkSemaphoreWaitInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSemaphoreWaitInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSemaphoreWaitInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSemaphoreWaitInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreWaitInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreWaitInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSemaphoreWaitInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSemaphoreWaitFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSemaphoreWaitFlags") int get_flags(MemorySegment segment) { return VkSemaphoreWaitInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSemaphoreWaitFlags") int flagsAt(long index) { return VkSemaphoreWaitInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSemaphoreWaitFlags") int flags() { return VkSemaphoreWaitInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSemaphoreWaitFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSemaphoreWaitFlags") int value) { VkSemaphoreWaitInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo flagsAt(long index, @CType("VkSemaphoreWaitFlags") int value) { VkSemaphoreWaitInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo flags(@CType("VkSemaphoreWaitFlags") int value) { VkSemaphoreWaitInfo.set_flags(this.segment(), value); return this; } + + /// {@return `semaphoreCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_semaphoreCount(MemorySegment segment, long index) { return (int) VH_semaphoreCount.get(segment, 0L, index); } + /// {@return `semaphoreCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_semaphoreCount(MemorySegment segment) { return VkSemaphoreWaitInfo.get_semaphoreCount(segment, 0L); } + /// {@return `semaphoreCount` at the given index} + /// @param index the index + public @CType("uint32_t") int semaphoreCountAt(long index) { return VkSemaphoreWaitInfo.get_semaphoreCount(this.segment(), index); } + /// {@return `semaphoreCount`} + public @CType("uint32_t") int semaphoreCount() { return VkSemaphoreWaitInfo.get_semaphoreCount(this.segment()); } + /// Sets `semaphoreCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_semaphoreCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_semaphoreCount.set(segment, 0L, index, value); } + /// Sets `semaphoreCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_semaphoreCount(MemorySegment segment, @CType("uint32_t") int value) { VkSemaphoreWaitInfo.set_semaphoreCount(segment, 0L, value); } + /// Sets `semaphoreCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo semaphoreCountAt(long index, @CType("uint32_t") int value) { VkSemaphoreWaitInfo.set_semaphoreCount(this.segment(), index, value); return this; } + /// Sets `semaphoreCount` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo semaphoreCount(@CType("uint32_t") int value) { VkSemaphoreWaitInfo.set_semaphoreCount(this.segment(), value); return this; } + + /// {@return `pSemaphores` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pSemaphores(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSemaphores.get(segment, 0L, index); } + /// {@return `pSemaphores`} + /// @param segment the segment of the struct + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pSemaphores(MemorySegment segment) { return VkSemaphoreWaitInfo.get_pSemaphores(segment, 0L); } + /// {@return `pSemaphores` at the given index} + /// @param index the index + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pSemaphoresAt(long index) { return VkSemaphoreWaitInfo.get_pSemaphores(this.segment(), index); } + /// {@return `pSemaphores`} + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pSemaphores() { return VkSemaphoreWaitInfo.get_pSemaphores(this.segment()); } + /// Sets `pSemaphores` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSemaphores(MemorySegment segment, long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VH_pSemaphores.set(segment, 0L, index, value); } + /// Sets `pSemaphores` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSemaphores(MemorySegment segment, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkSemaphoreWaitInfo.set_pSemaphores(segment, 0L, value); } + /// Sets `pSemaphores` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo pSemaphoresAt(long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkSemaphoreWaitInfo.set_pSemaphores(this.segment(), index, value); return this; } + /// Sets `pSemaphores` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo pSemaphores(@CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkSemaphoreWaitInfo.set_pSemaphores(this.segment(), value); return this; } + + /// {@return `pValues` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pValues(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pValues.get(segment, 0L, index); } + /// {@return `pValues`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pValues(MemorySegment segment) { return VkSemaphoreWaitInfo.get_pValues(segment, 0L); } + /// {@return `pValues` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pValuesAt(long index) { return VkSemaphoreWaitInfo.get_pValues(this.segment(), index); } + /// {@return `pValues`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pValues() { return VkSemaphoreWaitInfo.get_pValues(this.segment()); } + /// Sets `pValues` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pValues(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pValues.set(segment, 0L, index, value); } + /// Sets `pValues` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pValues(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkSemaphoreWaitInfo.set_pValues(segment, 0L, value); } + /// Sets `pValues` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo pValuesAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkSemaphoreWaitInfo.set_pValues(this.segment(), index, value); return this; } + /// Sets `pValues` with the given value. + /// @param value the value + /// @return `this` + public VkSemaphoreWaitInfo pValues(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkSemaphoreWaitInfo.set_pValues(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkShaderModuleCreateInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkShaderModuleCreateInfo.java new file mode 100644 index 00000000..b4985df6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkShaderModuleCreateInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### codeSize +/// [VarHandle][#VH_codeSize] - [Getter][#codeSize()] - [Setter][#codeSize(long)] +/// ### pCode +/// [VarHandle][#VH_pCode] - [Getter][#pCode()] - [Setter][#pCode(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkShaderModuleCreateInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkShaderModuleCreateFlags flags; +/// size_t codeSize; +/// const uint32_t * pCode; +/// } VkShaderModuleCreateInfo; +/// ``` +public final class VkShaderModuleCreateInfo extends Struct { + /// The struct layout of `VkShaderModuleCreateInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_LONG.withName("codeSize"), + ValueLayout.ADDRESS.withName("pCode") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `codeSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_codeSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("codeSize")); + /// The [VarHandle] of `pCode` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCode")); + + /// Creates `VkShaderModuleCreateInfo` with the given segment. + /// @param segment the memory segment + public VkShaderModuleCreateInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkShaderModuleCreateInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderModuleCreateInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderModuleCreateInfo(segment); } + + /// Creates `VkShaderModuleCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderModuleCreateInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderModuleCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkShaderModuleCreateInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkShaderModuleCreateInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkShaderModuleCreateInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkShaderModuleCreateInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkShaderModuleCreateInfo` + public static VkShaderModuleCreateInfo alloc(SegmentAllocator allocator) { return new VkShaderModuleCreateInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkShaderModuleCreateInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkShaderModuleCreateInfo` + public static VkShaderModuleCreateInfo alloc(SegmentAllocator allocator, long count) { return new VkShaderModuleCreateInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkShaderModuleCreateInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkShaderModuleCreateInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkShaderModuleCreateInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkShaderModuleCreateInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleCreateInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkShaderModuleCreateInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleCreateInfo sType(@CType("VkStructureType") int value) { VkShaderModuleCreateInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkShaderModuleCreateInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkShaderModuleCreateInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkShaderModuleCreateInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderModuleCreateInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleCreateInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderModuleCreateInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleCreateInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkShaderModuleCreateInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkShaderModuleCreateFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkShaderModuleCreateFlags") int get_flags(MemorySegment segment) { return VkShaderModuleCreateInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkShaderModuleCreateFlags") int flagsAt(long index) { return VkShaderModuleCreateInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkShaderModuleCreateFlags") int flags() { return VkShaderModuleCreateInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkShaderModuleCreateFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkShaderModuleCreateFlags") int value) { VkShaderModuleCreateInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleCreateInfo flagsAt(long index, @CType("VkShaderModuleCreateFlags") int value) { VkShaderModuleCreateInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleCreateInfo flags(@CType("VkShaderModuleCreateFlags") int value) { VkShaderModuleCreateInfo.set_flags(this.segment(), value); return this; } + + /// {@return `codeSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_codeSize(MemorySegment segment, long index) { return (long) VH_codeSize.get(segment, 0L, index); } + /// {@return `codeSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_codeSize(MemorySegment segment) { return VkShaderModuleCreateInfo.get_codeSize(segment, 0L); } + /// {@return `codeSize` at the given index} + /// @param index the index + public @CType("size_t") long codeSizeAt(long index) { return VkShaderModuleCreateInfo.get_codeSize(this.segment(), index); } + /// {@return `codeSize`} + public @CType("size_t") long codeSize() { return VkShaderModuleCreateInfo.get_codeSize(this.segment()); } + /// Sets `codeSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_codeSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_codeSize.set(segment, 0L, index, value); } + /// Sets `codeSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_codeSize(MemorySegment segment, @CType("size_t") long value) { VkShaderModuleCreateInfo.set_codeSize(segment, 0L, value); } + /// Sets `codeSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleCreateInfo codeSizeAt(long index, @CType("size_t") long value) { VkShaderModuleCreateInfo.set_codeSize(this.segment(), index, value); return this; } + /// Sets `codeSize` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleCreateInfo codeSize(@CType("size_t") long value) { VkShaderModuleCreateInfo.set_codeSize(this.segment(), value); return this; } + + /// {@return `pCode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pCode(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCode.get(segment, 0L, index); } + /// {@return `pCode`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pCode(MemorySegment segment) { return VkShaderModuleCreateInfo.get_pCode(segment, 0L); } + /// {@return `pCode` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pCodeAt(long index) { return VkShaderModuleCreateInfo.get_pCode(this.segment(), index); } + /// {@return `pCode`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pCode() { return VkShaderModuleCreateInfo.get_pCode(this.segment()); } + /// Sets `pCode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCode(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pCode.set(segment, 0L, index, value); } + /// Sets `pCode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCode(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkShaderModuleCreateInfo.set_pCode(segment, 0L, value); } + /// Sets `pCode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkShaderModuleCreateInfo pCodeAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkShaderModuleCreateInfo.set_pCode(this.segment(), index, value); return this; } + /// Sets `pCode` with the given value. + /// @param value the value + /// @return `this` + public VkShaderModuleCreateInfo pCode(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkShaderModuleCreateInfo.set_pCode(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseBufferMemoryBindInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseBufferMemoryBindInfo.java new file mode 100644 index 00000000..4f7ff030 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseBufferMemoryBindInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### buffer +/// [VarHandle][#VH_buffer] - [Getter][#buffer()] - [Setter][#buffer(java.lang.foreign.MemorySegment)] +/// ### bindCount +/// [VarHandle][#VH_bindCount] - [Getter][#bindCount()] - [Setter][#bindCount(int)] +/// ### pBinds +/// [VarHandle][#VH_pBinds] - [Getter][#pBinds()] - [Setter][#pBinds(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSparseBufferMemoryBindInfo { +/// VkBuffer buffer; +/// uint32_t bindCount; +/// const VkSparseMemoryBind * pBinds; +/// } VkSparseBufferMemoryBindInfo; +/// ``` +public final class VkSparseBufferMemoryBindInfo extends Struct { + /// The struct layout of `VkSparseBufferMemoryBindInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("buffer"), + ValueLayout.JAVA_INT.withName("bindCount"), + ValueLayout.ADDRESS.withName("pBinds") + ); + /// The [VarHandle] of `buffer` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_buffer = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer")); + /// The [VarHandle] of `bindCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bindCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bindCount")); + /// The [VarHandle] of `pBinds` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBinds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBinds")); + + /// Creates `VkSparseBufferMemoryBindInfo` with the given segment. + /// @param segment the memory segment + public VkSparseBufferMemoryBindInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSparseBufferMemoryBindInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseBufferMemoryBindInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseBufferMemoryBindInfo(segment); } + + /// Creates `VkSparseBufferMemoryBindInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseBufferMemoryBindInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseBufferMemoryBindInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSparseBufferMemoryBindInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseBufferMemoryBindInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseBufferMemoryBindInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSparseBufferMemoryBindInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSparseBufferMemoryBindInfo` + public static VkSparseBufferMemoryBindInfo alloc(SegmentAllocator allocator) { return new VkSparseBufferMemoryBindInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSparseBufferMemoryBindInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSparseBufferMemoryBindInfo` + public static VkSparseBufferMemoryBindInfo alloc(SegmentAllocator allocator, long count) { return new VkSparseBufferMemoryBindInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `buffer` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_buffer.get(segment, 0L, index); } + /// {@return `buffer`} + /// @param segment the segment of the struct + public static @CType("VkBuffer") java.lang.foreign.MemorySegment get_buffer(MemorySegment segment) { return VkSparseBufferMemoryBindInfo.get_buffer(segment, 0L); } + /// {@return `buffer` at the given index} + /// @param index the index + public @CType("VkBuffer") java.lang.foreign.MemorySegment bufferAt(long index) { return VkSparseBufferMemoryBindInfo.get_buffer(this.segment(), index); } + /// {@return `buffer`} + public @CType("VkBuffer") java.lang.foreign.MemorySegment buffer() { return VkSparseBufferMemoryBindInfo.get_buffer(this.segment()); } + /// Sets `buffer` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer(MemorySegment segment, long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VH_buffer.set(segment, 0L, index, value); } + /// Sets `buffer` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer(MemorySegment segment, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkSparseBufferMemoryBindInfo.set_buffer(segment, 0L, value); } + /// Sets `buffer` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseBufferMemoryBindInfo bufferAt(long index, @CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkSparseBufferMemoryBindInfo.set_buffer(this.segment(), index, value); return this; } + /// Sets `buffer` with the given value. + /// @param value the value + /// @return `this` + public VkSparseBufferMemoryBindInfo buffer(@CType("VkBuffer") java.lang.foreign.MemorySegment value) { VkSparseBufferMemoryBindInfo.set_buffer(this.segment(), value); return this; } + + /// {@return `bindCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bindCount(MemorySegment segment, long index) { return (int) VH_bindCount.get(segment, 0L, index); } + /// {@return `bindCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bindCount(MemorySegment segment) { return VkSparseBufferMemoryBindInfo.get_bindCount(segment, 0L); } + /// {@return `bindCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bindCountAt(long index) { return VkSparseBufferMemoryBindInfo.get_bindCount(this.segment(), index); } + /// {@return `bindCount`} + public @CType("uint32_t") int bindCount() { return VkSparseBufferMemoryBindInfo.get_bindCount(this.segment()); } + /// Sets `bindCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bindCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bindCount.set(segment, 0L, index, value); } + /// Sets `bindCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bindCount(MemorySegment segment, @CType("uint32_t") int value) { VkSparseBufferMemoryBindInfo.set_bindCount(segment, 0L, value); } + /// Sets `bindCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseBufferMemoryBindInfo bindCountAt(long index, @CType("uint32_t") int value) { VkSparseBufferMemoryBindInfo.set_bindCount(this.segment(), index, value); return this; } + /// Sets `bindCount` with the given value. + /// @param value the value + /// @return `this` + public VkSparseBufferMemoryBindInfo bindCount(@CType("uint32_t") int value) { VkSparseBufferMemoryBindInfo.set_bindCount(this.segment(), value); return this; } + + /// {@return `pBinds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment get_pBinds(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBinds.get(segment, 0L, index); } + /// {@return `pBinds`} + /// @param segment the segment of the struct + public static @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment get_pBinds(MemorySegment segment) { return VkSparseBufferMemoryBindInfo.get_pBinds(segment, 0L); } + /// {@return `pBinds` at the given index} + /// @param index the index + public @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment pBindsAt(long index) { return VkSparseBufferMemoryBindInfo.get_pBinds(this.segment(), index); } + /// {@return `pBinds`} + public @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment pBinds() { return VkSparseBufferMemoryBindInfo.get_pBinds(this.segment()); } + /// Sets `pBinds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBinds(MemorySegment segment, long index, @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment value) { VH_pBinds.set(segment, 0L, index, value); } + /// Sets `pBinds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBinds(MemorySegment segment, @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment value) { VkSparseBufferMemoryBindInfo.set_pBinds(segment, 0L, value); } + /// Sets `pBinds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseBufferMemoryBindInfo pBindsAt(long index, @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment value) { VkSparseBufferMemoryBindInfo.set_pBinds(this.segment(), index, value); return this; } + /// Sets `pBinds` with the given value. + /// @param value the value + /// @return `this` + public VkSparseBufferMemoryBindInfo pBinds(@CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment value) { VkSparseBufferMemoryBindInfo.set_pBinds(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageFormatProperties.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageFormatProperties.java new file mode 100644 index 00000000..a9a6fed4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageFormatProperties.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### aspectMask +/// [VarHandle][#VH_aspectMask] - [Getter][#aspectMask()] - [Setter][#aspectMask(int)] +/// ### imageGranularity +/// [Byte offset][#OFFSET_imageGranularity] - [Memory layout][#ML_imageGranularity] - [Getter][#imageGranularity()] - [Setter][#imageGranularity(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSparseImageFormatProperties { +/// VkImageAspectFlags aspectMask; +/// VkExtent3D imageGranularity; +/// VkSparseImageFormatFlags flags; +/// } VkSparseImageFormatProperties; +/// ``` +public final class VkSparseImageFormatProperties extends Struct { + /// The struct layout of `VkSparseImageFormatProperties`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("aspectMask"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("imageGranularity"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `aspectMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspectMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspectMask")); + /// The byte offset of `imageGranularity`. + public static final long OFFSET_imageGranularity = LAYOUT.byteOffset(PathElement.groupElement("imageGranularity")); + /// The memory layout of `imageGranularity`. + public static final MemoryLayout ML_imageGranularity = LAYOUT.select(PathElement.groupElement("imageGranularity")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkSparseImageFormatProperties` with the given segment. + /// @param segment the memory segment + public VkSparseImageFormatProperties(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSparseImageFormatProperties` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageFormatProperties of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageFormatProperties(segment); } + + /// Creates `VkSparseImageFormatProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageFormatProperties ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageFormatProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSparseImageFormatProperties` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageFormatProperties ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageFormatProperties(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSparseImageFormatProperties` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSparseImageFormatProperties` + public static VkSparseImageFormatProperties alloc(SegmentAllocator allocator) { return new VkSparseImageFormatProperties(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSparseImageFormatProperties` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSparseImageFormatProperties` + public static VkSparseImageFormatProperties alloc(SegmentAllocator allocator, long count) { return new VkSparseImageFormatProperties(allocator.allocate(LAYOUT, count)); } + + /// {@return `aspectMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment, long index) { return (int) VH_aspectMask.get(segment, 0L, index); } + /// {@return `aspectMask`} + /// @param segment the segment of the struct + public static @CType("VkImageAspectFlags") int get_aspectMask(MemorySegment segment) { return VkSparseImageFormatProperties.get_aspectMask(segment, 0L); } + /// {@return `aspectMask` at the given index} + /// @param index the index + public @CType("VkImageAspectFlags") int aspectMaskAt(long index) { return VkSparseImageFormatProperties.get_aspectMask(this.segment(), index); } + /// {@return `aspectMask`} + public @CType("VkImageAspectFlags") int aspectMask() { return VkSparseImageFormatProperties.get_aspectMask(this.segment()); } + /// Sets `aspectMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspectMask(MemorySegment segment, long index, @CType("VkImageAspectFlags") int value) { VH_aspectMask.set(segment, 0L, index, value); } + /// Sets `aspectMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspectMask(MemorySegment segment, @CType("VkImageAspectFlags") int value) { VkSparseImageFormatProperties.set_aspectMask(segment, 0L, value); } + /// Sets `aspectMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties aspectMaskAt(long index, @CType("VkImageAspectFlags") int value) { VkSparseImageFormatProperties.set_aspectMask(this.segment(), index, value); return this; } + /// Sets `aspectMask` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties aspectMask(@CType("VkImageAspectFlags") int value) { VkSparseImageFormatProperties.set_aspectMask(this.segment(), value); return this; } + + /// {@return `imageGranularity` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageGranularity(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_imageGranularity, index), ML_imageGranularity); } + /// {@return `imageGranularity`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_imageGranularity(MemorySegment segment) { return VkSparseImageFormatProperties.get_imageGranularity(segment, 0L); } + /// {@return `imageGranularity` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageGranularityAt(long index) { return VkSparseImageFormatProperties.get_imageGranularity(this.segment(), index); } + /// {@return `imageGranularity`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment imageGranularity() { return VkSparseImageFormatProperties.get_imageGranularity(this.segment()); } + /// Sets `imageGranularity` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageGranularity(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_imageGranularity, index), ML_imageGranularity.byteSize()); } + /// Sets `imageGranularity` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageGranularity(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkSparseImageFormatProperties.set_imageGranularity(segment, 0L, value); } + /// Sets `imageGranularity` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties imageGranularityAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkSparseImageFormatProperties.set_imageGranularity(this.segment(), index, value); return this; } + /// Sets `imageGranularity` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties imageGranularity(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkSparseImageFormatProperties.set_imageGranularity(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSparseImageFormatFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSparseImageFormatFlags") int get_flags(MemorySegment segment) { return VkSparseImageFormatProperties.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSparseImageFormatFlags") int flagsAt(long index) { return VkSparseImageFormatProperties.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSparseImageFormatFlags") int flags() { return VkSparseImageFormatProperties.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSparseImageFormatFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSparseImageFormatFlags") int value) { VkSparseImageFormatProperties.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties flagsAt(long index, @CType("VkSparseImageFormatFlags") int value) { VkSparseImageFormatProperties.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties flags(@CType("VkSparseImageFormatFlags") int value) { VkSparseImageFormatProperties.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageFormatProperties2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageFormatProperties2.java new file mode 100644 index 00000000..ddb6f21f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageFormatProperties2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### properties +/// [Byte offset][#OFFSET_properties] - [Memory layout][#ML_properties] - [Getter][#properties()] - [Setter][#properties(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSparseImageFormatProperties2 { +/// VkStructureType sType; +/// void * pNext; +/// VkSparseImageFormatProperties properties; +/// } VkSparseImageFormatProperties2; +/// ``` +public final class VkSparseImageFormatProperties2 extends Struct { + /// The struct layout of `VkSparseImageFormatProperties2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkSparseImageFormatProperties.LAYOUT.withName("properties") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `properties`. + public static final long OFFSET_properties = LAYOUT.byteOffset(PathElement.groupElement("properties")); + /// The memory layout of `properties`. + public static final MemoryLayout ML_properties = LAYOUT.select(PathElement.groupElement("properties")); + + /// Creates `VkSparseImageFormatProperties2` with the given segment. + /// @param segment the memory segment + public VkSparseImageFormatProperties2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSparseImageFormatProperties2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageFormatProperties2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageFormatProperties2(segment); } + + /// Creates `VkSparseImageFormatProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageFormatProperties2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageFormatProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSparseImageFormatProperties2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageFormatProperties2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageFormatProperties2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSparseImageFormatProperties2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSparseImageFormatProperties2` + public static VkSparseImageFormatProperties2 alloc(SegmentAllocator allocator) { return new VkSparseImageFormatProperties2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSparseImageFormatProperties2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSparseImageFormatProperties2` + public static VkSparseImageFormatProperties2 alloc(SegmentAllocator allocator, long count) { return new VkSparseImageFormatProperties2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSparseImageFormatProperties2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSparseImageFormatProperties2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSparseImageFormatProperties2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSparseImageFormatProperties2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties2 sTypeAt(long index, @CType("VkStructureType") int value) { VkSparseImageFormatProperties2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties2 sType(@CType("VkStructureType") int value) { VkSparseImageFormatProperties2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSparseImageFormatProperties2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSparseImageFormatProperties2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSparseImageFormatProperties2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSparseImageFormatProperties2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSparseImageFormatProperties2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSparseImageFormatProperties2.set_pNext(this.segment(), value); return this; } + + /// {@return `properties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment get_properties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_properties, index), ML_properties); } + /// {@return `properties`} + /// @param segment the segment of the struct + public static @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment get_properties(MemorySegment segment) { return VkSparseImageFormatProperties2.get_properties(segment, 0L); } + /// {@return `properties` at the given index} + /// @param index the index + public @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment propertiesAt(long index) { return VkSparseImageFormatProperties2.get_properties(this.segment(), index); } + /// {@return `properties`} + public @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment properties() { return VkSparseImageFormatProperties2.get_properties(this.segment()); } + /// Sets `properties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_properties(MemorySegment segment, long index, @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_properties, index), ML_properties.byteSize()); } + /// Sets `properties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_properties(MemorySegment segment, @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment value) { VkSparseImageFormatProperties2.set_properties(segment, 0L, value); } + /// Sets `properties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties2 propertiesAt(long index, @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment value) { VkSparseImageFormatProperties2.set_properties(this.segment(), index, value); return this; } + /// Sets `properties` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageFormatProperties2 properties(@CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment value) { VkSparseImageFormatProperties2.set_properties(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryBind.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryBind.java new file mode 100644 index 00000000..13e1026e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryBind.java @@ -0,0 +1,302 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### subresource +/// [Byte offset][#OFFSET_subresource] - [Memory layout][#ML_subresource] - [Getter][#subresource()] - [Setter][#subresource(java.lang.foreign.MemorySegment)] +/// ### offset +/// [Byte offset][#OFFSET_offset] - [Memory layout][#ML_offset] - [Getter][#offset()] - [Setter][#offset(java.lang.foreign.MemorySegment)] +/// ### extent +/// [Byte offset][#OFFSET_extent] - [Memory layout][#ML_extent] - [Getter][#extent()] - [Setter][#extent(java.lang.foreign.MemorySegment)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### memoryOffset +/// [VarHandle][#VH_memoryOffset] - [Getter][#memoryOffset()] - [Setter][#memoryOffset(long)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSparseImageMemoryBind { +/// VkImageSubresource subresource; +/// VkOffset3D offset; +/// VkExtent3D extent; +/// VkDeviceMemory memory; +/// VkDeviceSize memoryOffset; +/// VkSparseMemoryBindFlags flags; +/// } VkSparseImageMemoryBind; +/// ``` +public final class VkSparseImageMemoryBind extends Struct { + /// The struct layout of `VkSparseImageMemoryBind`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkImageSubresource.LAYOUT.withName("subresource"), + overrungl.vulkan.struct.VkOffset3D.LAYOUT.withName("offset"), + overrungl.vulkan.struct.VkExtent3D.LAYOUT.withName("extent"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_LONG.withName("memoryOffset"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The byte offset of `subresource`. + public static final long OFFSET_subresource = LAYOUT.byteOffset(PathElement.groupElement("subresource")); + /// The memory layout of `subresource`. + public static final MemoryLayout ML_subresource = LAYOUT.select(PathElement.groupElement("subresource")); + /// The byte offset of `offset`. + public static final long OFFSET_offset = LAYOUT.byteOffset(PathElement.groupElement("offset")); + /// The memory layout of `offset`. + public static final MemoryLayout ML_offset = LAYOUT.select(PathElement.groupElement("offset")); + /// The byte offset of `extent`. + public static final long OFFSET_extent = LAYOUT.byteOffset(PathElement.groupElement("extent")); + /// The memory layout of `extent`. + public static final MemoryLayout ML_extent = LAYOUT.select(PathElement.groupElement("extent")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `memoryOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_memoryOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryOffset")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkSparseImageMemoryBind` with the given segment. + /// @param segment the memory segment + public VkSparseImageMemoryBind(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSparseImageMemoryBind` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryBind of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryBind(segment); } + + /// Creates `VkSparseImageMemoryBind` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryBind ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryBind(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSparseImageMemoryBind` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryBind ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryBind(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSparseImageMemoryBind` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSparseImageMemoryBind` + public static VkSparseImageMemoryBind alloc(SegmentAllocator allocator) { return new VkSparseImageMemoryBind(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSparseImageMemoryBind` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSparseImageMemoryBind` + public static VkSparseImageMemoryBind alloc(SegmentAllocator allocator, long count) { return new VkSparseImageMemoryBind(allocator.allocate(LAYOUT, count)); } + + /// {@return `subresource` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImageSubresource") java.lang.foreign.MemorySegment get_subresource(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_subresource, index), ML_subresource); } + /// {@return `subresource`} + /// @param segment the segment of the struct + public static @CType("VkImageSubresource") java.lang.foreign.MemorySegment get_subresource(MemorySegment segment) { return VkSparseImageMemoryBind.get_subresource(segment, 0L); } + /// {@return `subresource` at the given index} + /// @param index the index + public @CType("VkImageSubresource") java.lang.foreign.MemorySegment subresourceAt(long index) { return VkSparseImageMemoryBind.get_subresource(this.segment(), index); } + /// {@return `subresource`} + public @CType("VkImageSubresource") java.lang.foreign.MemorySegment subresource() { return VkSparseImageMemoryBind.get_subresource(this.segment()); } + /// Sets `subresource` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subresource(MemorySegment segment, long index, @CType("VkImageSubresource") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_subresource, index), ML_subresource.byteSize()); } + /// Sets `subresource` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subresource(MemorySegment segment, @CType("VkImageSubresource") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_subresource(segment, 0L, value); } + /// Sets `subresource` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind subresourceAt(long index, @CType("VkImageSubresource") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_subresource(this.segment(), index, value); return this; } + /// Sets `subresource` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind subresource(@CType("VkImageSubresource") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_subresource(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_offset(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_offset, index), ML_offset); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkOffset3D") java.lang.foreign.MemorySegment get_offset(MemorySegment segment) { return VkSparseImageMemoryBind.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkOffset3D") java.lang.foreign.MemorySegment offsetAt(long index) { return VkSparseImageMemoryBind.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkOffset3D") java.lang.foreign.MemorySegment offset() { return VkSparseImageMemoryBind.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_offset, index), ML_offset.byteSize()); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind offsetAt(long index, @CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind offset(@CType("VkOffset3D") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_offset(this.segment(), value); return this; } + + /// {@return `extent` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_extent, index), ML_extent); } + /// {@return `extent`} + /// @param segment the segment of the struct + public static @CType("VkExtent3D") java.lang.foreign.MemorySegment get_extent(MemorySegment segment) { return VkSparseImageMemoryBind.get_extent(segment, 0L); } + /// {@return `extent` at the given index} + /// @param index the index + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extentAt(long index) { return VkSparseImageMemoryBind.get_extent(this.segment(), index); } + /// {@return `extent`} + public @CType("VkExtent3D") java.lang.foreign.MemorySegment extent() { return VkSparseImageMemoryBind.get_extent(this.segment()); } + /// Sets `extent` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extent(MemorySegment segment, long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_extent, index), ML_extent.byteSize()); } + /// Sets `extent` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extent(MemorySegment segment, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_extent(segment, 0L, value); } + /// Sets `extent` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind extentAt(long index, @CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_extent(this.segment(), index, value); return this; } + /// Sets `extent` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind extent(@CType("VkExtent3D") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_extent(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkSparseImageMemoryBind.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkSparseImageMemoryBind.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkSparseImageMemoryBind.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBind.set_memory(this.segment(), value); return this; } + + /// {@return `memoryOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment, long index) { return (long) VH_memoryOffset.get(segment, 0L, index); } + /// {@return `memoryOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment) { return VkSparseImageMemoryBind.get_memoryOffset(segment, 0L); } + /// {@return `memoryOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long memoryOffsetAt(long index) { return VkSparseImageMemoryBind.get_memoryOffset(this.segment(), index); } + /// {@return `memoryOffset`} + public @CType("VkDeviceSize") long memoryOffset() { return VkSparseImageMemoryBind.get_memoryOffset(this.segment()); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_memoryOffset.set(segment, 0L, index, value); } + /// Sets `memoryOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSparseImageMemoryBind.set_memoryOffset(segment, 0L, value); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind memoryOffsetAt(long index, @CType("VkDeviceSize") long value) { VkSparseImageMemoryBind.set_memoryOffset(this.segment(), index, value); return this; } + /// Sets `memoryOffset` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind memoryOffset(@CType("VkDeviceSize") long value) { VkSparseImageMemoryBind.set_memoryOffset(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSparseMemoryBindFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSparseMemoryBindFlags") int get_flags(MemorySegment segment) { return VkSparseImageMemoryBind.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSparseMemoryBindFlags") int flagsAt(long index) { return VkSparseImageMemoryBind.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSparseMemoryBindFlags") int flags() { return VkSparseImageMemoryBind.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSparseMemoryBindFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSparseMemoryBindFlags") int value) { VkSparseImageMemoryBind.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind flagsAt(long index, @CType("VkSparseMemoryBindFlags") int value) { VkSparseImageMemoryBind.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBind flags(@CType("VkSparseMemoryBindFlags") int value) { VkSparseImageMemoryBind.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryBindInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryBindInfo.java new file mode 100644 index 00000000..77f8c620 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryBindInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### bindCount +/// [VarHandle][#VH_bindCount] - [Getter][#bindCount()] - [Setter][#bindCount(int)] +/// ### pBinds +/// [VarHandle][#VH_pBinds] - [Getter][#pBinds()] - [Setter][#pBinds(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSparseImageMemoryBindInfo { +/// VkImage image; +/// uint32_t bindCount; +/// const VkSparseImageMemoryBind * pBinds; +/// } VkSparseImageMemoryBindInfo; +/// ``` +public final class VkSparseImageMemoryBindInfo extends Struct { + /// The struct layout of `VkSparseImageMemoryBindInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("image"), + ValueLayout.JAVA_INT.withName("bindCount"), + ValueLayout.ADDRESS.withName("pBinds") + ); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The [VarHandle] of `bindCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bindCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bindCount")); + /// The [VarHandle] of `pBinds` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBinds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBinds")); + + /// Creates `VkSparseImageMemoryBindInfo` with the given segment. + /// @param segment the memory segment + public VkSparseImageMemoryBindInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSparseImageMemoryBindInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryBindInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryBindInfo(segment); } + + /// Creates `VkSparseImageMemoryBindInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryBindInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryBindInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSparseImageMemoryBindInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryBindInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryBindInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSparseImageMemoryBindInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSparseImageMemoryBindInfo` + public static VkSparseImageMemoryBindInfo alloc(SegmentAllocator allocator) { return new VkSparseImageMemoryBindInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSparseImageMemoryBindInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSparseImageMemoryBindInfo` + public static VkSparseImageMemoryBindInfo alloc(SegmentAllocator allocator, long count) { return new VkSparseImageMemoryBindInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkSparseImageMemoryBindInfo.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkSparseImageMemoryBindInfo.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkSparseImageMemoryBindInfo.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBindInfo.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBindInfo imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBindInfo.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBindInfo image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBindInfo.set_image(this.segment(), value); return this; } + + /// {@return `bindCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bindCount(MemorySegment segment, long index) { return (int) VH_bindCount.get(segment, 0L, index); } + /// {@return `bindCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bindCount(MemorySegment segment) { return VkSparseImageMemoryBindInfo.get_bindCount(segment, 0L); } + /// {@return `bindCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bindCountAt(long index) { return VkSparseImageMemoryBindInfo.get_bindCount(this.segment(), index); } + /// {@return `bindCount`} + public @CType("uint32_t") int bindCount() { return VkSparseImageMemoryBindInfo.get_bindCount(this.segment()); } + /// Sets `bindCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bindCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bindCount.set(segment, 0L, index, value); } + /// Sets `bindCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bindCount(MemorySegment segment, @CType("uint32_t") int value) { VkSparseImageMemoryBindInfo.set_bindCount(segment, 0L, value); } + /// Sets `bindCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBindInfo bindCountAt(long index, @CType("uint32_t") int value) { VkSparseImageMemoryBindInfo.set_bindCount(this.segment(), index, value); return this; } + /// Sets `bindCount` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBindInfo bindCount(@CType("uint32_t") int value) { VkSparseImageMemoryBindInfo.set_bindCount(this.segment(), value); return this; } + + /// {@return `pBinds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSparseImageMemoryBind *") java.lang.foreign.MemorySegment get_pBinds(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBinds.get(segment, 0L, index); } + /// {@return `pBinds`} + /// @param segment the segment of the struct + public static @CType("const VkSparseImageMemoryBind *") java.lang.foreign.MemorySegment get_pBinds(MemorySegment segment) { return VkSparseImageMemoryBindInfo.get_pBinds(segment, 0L); } + /// {@return `pBinds` at the given index} + /// @param index the index + public @CType("const VkSparseImageMemoryBind *") java.lang.foreign.MemorySegment pBindsAt(long index) { return VkSparseImageMemoryBindInfo.get_pBinds(this.segment(), index); } + /// {@return `pBinds`} + public @CType("const VkSparseImageMemoryBind *") java.lang.foreign.MemorySegment pBinds() { return VkSparseImageMemoryBindInfo.get_pBinds(this.segment()); } + /// Sets `pBinds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBinds(MemorySegment segment, long index, @CType("const VkSparseImageMemoryBind *") java.lang.foreign.MemorySegment value) { VH_pBinds.set(segment, 0L, index, value); } + /// Sets `pBinds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBinds(MemorySegment segment, @CType("const VkSparseImageMemoryBind *") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBindInfo.set_pBinds(segment, 0L, value); } + /// Sets `pBinds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBindInfo pBindsAt(long index, @CType("const VkSparseImageMemoryBind *") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBindInfo.set_pBinds(this.segment(), index, value); return this; } + /// Sets `pBinds` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryBindInfo pBinds(@CType("const VkSparseImageMemoryBind *") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryBindInfo.set_pBinds(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryRequirements.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryRequirements.java new file mode 100644 index 00000000..29ddbb9e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryRequirements.java @@ -0,0 +1,261 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### formatProperties +/// [Byte offset][#OFFSET_formatProperties] - [Memory layout][#ML_formatProperties] - [Getter][#formatProperties()] - [Setter][#formatProperties(java.lang.foreign.MemorySegment)] +/// ### imageMipTailFirstLod +/// [VarHandle][#VH_imageMipTailFirstLod] - [Getter][#imageMipTailFirstLod()] - [Setter][#imageMipTailFirstLod(int)] +/// ### imageMipTailSize +/// [VarHandle][#VH_imageMipTailSize] - [Getter][#imageMipTailSize()] - [Setter][#imageMipTailSize(long)] +/// ### imageMipTailOffset +/// [VarHandle][#VH_imageMipTailOffset] - [Getter][#imageMipTailOffset()] - [Setter][#imageMipTailOffset(long)] +/// ### imageMipTailStride +/// [VarHandle][#VH_imageMipTailStride] - [Getter][#imageMipTailStride()] - [Setter][#imageMipTailStride(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSparseImageMemoryRequirements { +/// VkSparseImageFormatProperties formatProperties; +/// uint32_t imageMipTailFirstLod; +/// VkDeviceSize imageMipTailSize; +/// VkDeviceSize imageMipTailOffset; +/// VkDeviceSize imageMipTailStride; +/// } VkSparseImageMemoryRequirements; +/// ``` +public final class VkSparseImageMemoryRequirements extends Struct { + /// The struct layout of `VkSparseImageMemoryRequirements`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + overrungl.vulkan.struct.VkSparseImageFormatProperties.LAYOUT.withName("formatProperties"), + ValueLayout.JAVA_INT.withName("imageMipTailFirstLod"), + ValueLayout.JAVA_LONG.withName("imageMipTailSize"), + ValueLayout.JAVA_LONG.withName("imageMipTailOffset"), + ValueLayout.JAVA_LONG.withName("imageMipTailStride") + ); + /// The byte offset of `formatProperties`. + public static final long OFFSET_formatProperties = LAYOUT.byteOffset(PathElement.groupElement("formatProperties")); + /// The memory layout of `formatProperties`. + public static final MemoryLayout ML_formatProperties = LAYOUT.select(PathElement.groupElement("formatProperties")); + /// The [VarHandle] of `imageMipTailFirstLod` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_imageMipTailFirstLod = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageMipTailFirstLod")); + /// The [VarHandle] of `imageMipTailSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_imageMipTailSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageMipTailSize")); + /// The [VarHandle] of `imageMipTailOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_imageMipTailOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageMipTailOffset")); + /// The [VarHandle] of `imageMipTailStride` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_imageMipTailStride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("imageMipTailStride")); + + /// Creates `VkSparseImageMemoryRequirements` with the given segment. + /// @param segment the memory segment + public VkSparseImageMemoryRequirements(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSparseImageMemoryRequirements` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryRequirements of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryRequirements(segment); } + + /// Creates `VkSparseImageMemoryRequirements` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryRequirements ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryRequirements(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSparseImageMemoryRequirements` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryRequirements ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryRequirements(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSparseImageMemoryRequirements` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSparseImageMemoryRequirements` + public static VkSparseImageMemoryRequirements alloc(SegmentAllocator allocator) { return new VkSparseImageMemoryRequirements(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSparseImageMemoryRequirements` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSparseImageMemoryRequirements` + public static VkSparseImageMemoryRequirements alloc(SegmentAllocator allocator, long count) { return new VkSparseImageMemoryRequirements(allocator.allocate(LAYOUT, count)); } + + /// {@return `formatProperties` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment get_formatProperties(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_formatProperties, index), ML_formatProperties); } + /// {@return `formatProperties`} + /// @param segment the segment of the struct + public static @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment get_formatProperties(MemorySegment segment) { return VkSparseImageMemoryRequirements.get_formatProperties(segment, 0L); } + /// {@return `formatProperties` at the given index} + /// @param index the index + public @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment formatPropertiesAt(long index) { return VkSparseImageMemoryRequirements.get_formatProperties(this.segment(), index); } + /// {@return `formatProperties`} + public @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment formatProperties() { return VkSparseImageMemoryRequirements.get_formatProperties(this.segment()); } + /// Sets `formatProperties` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_formatProperties(MemorySegment segment, long index, @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_formatProperties, index), ML_formatProperties.byteSize()); } + /// Sets `formatProperties` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_formatProperties(MemorySegment segment, @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryRequirements.set_formatProperties(segment, 0L, value); } + /// Sets `formatProperties` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements formatPropertiesAt(long index, @CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryRequirements.set_formatProperties(this.segment(), index, value); return this; } + /// Sets `formatProperties` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements formatProperties(@CType("VkSparseImageFormatProperties") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryRequirements.set_formatProperties(this.segment(), value); return this; } + + /// {@return `imageMipTailFirstLod` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_imageMipTailFirstLod(MemorySegment segment, long index) { return (int) VH_imageMipTailFirstLod.get(segment, 0L, index); } + /// {@return `imageMipTailFirstLod`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_imageMipTailFirstLod(MemorySegment segment) { return VkSparseImageMemoryRequirements.get_imageMipTailFirstLod(segment, 0L); } + /// {@return `imageMipTailFirstLod` at the given index} + /// @param index the index + public @CType("uint32_t") int imageMipTailFirstLodAt(long index) { return VkSparseImageMemoryRequirements.get_imageMipTailFirstLod(this.segment(), index); } + /// {@return `imageMipTailFirstLod`} + public @CType("uint32_t") int imageMipTailFirstLod() { return VkSparseImageMemoryRequirements.get_imageMipTailFirstLod(this.segment()); } + /// Sets `imageMipTailFirstLod` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageMipTailFirstLod(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_imageMipTailFirstLod.set(segment, 0L, index, value); } + /// Sets `imageMipTailFirstLod` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageMipTailFirstLod(MemorySegment segment, @CType("uint32_t") int value) { VkSparseImageMemoryRequirements.set_imageMipTailFirstLod(segment, 0L, value); } + /// Sets `imageMipTailFirstLod` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements imageMipTailFirstLodAt(long index, @CType("uint32_t") int value) { VkSparseImageMemoryRequirements.set_imageMipTailFirstLod(this.segment(), index, value); return this; } + /// Sets `imageMipTailFirstLod` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements imageMipTailFirstLod(@CType("uint32_t") int value) { VkSparseImageMemoryRequirements.set_imageMipTailFirstLod(this.segment(), value); return this; } + + /// {@return `imageMipTailSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_imageMipTailSize(MemorySegment segment, long index) { return (long) VH_imageMipTailSize.get(segment, 0L, index); } + /// {@return `imageMipTailSize`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_imageMipTailSize(MemorySegment segment) { return VkSparseImageMemoryRequirements.get_imageMipTailSize(segment, 0L); } + /// {@return `imageMipTailSize` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long imageMipTailSizeAt(long index) { return VkSparseImageMemoryRequirements.get_imageMipTailSize(this.segment(), index); } + /// {@return `imageMipTailSize`} + public @CType("VkDeviceSize") long imageMipTailSize() { return VkSparseImageMemoryRequirements.get_imageMipTailSize(this.segment()); } + /// Sets `imageMipTailSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageMipTailSize(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_imageMipTailSize.set(segment, 0L, index, value); } + /// Sets `imageMipTailSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageMipTailSize(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSparseImageMemoryRequirements.set_imageMipTailSize(segment, 0L, value); } + /// Sets `imageMipTailSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements imageMipTailSizeAt(long index, @CType("VkDeviceSize") long value) { VkSparseImageMemoryRequirements.set_imageMipTailSize(this.segment(), index, value); return this; } + /// Sets `imageMipTailSize` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements imageMipTailSize(@CType("VkDeviceSize") long value) { VkSparseImageMemoryRequirements.set_imageMipTailSize(this.segment(), value); return this; } + + /// {@return `imageMipTailOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_imageMipTailOffset(MemorySegment segment, long index) { return (long) VH_imageMipTailOffset.get(segment, 0L, index); } + /// {@return `imageMipTailOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_imageMipTailOffset(MemorySegment segment) { return VkSparseImageMemoryRequirements.get_imageMipTailOffset(segment, 0L); } + /// {@return `imageMipTailOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long imageMipTailOffsetAt(long index) { return VkSparseImageMemoryRequirements.get_imageMipTailOffset(this.segment(), index); } + /// {@return `imageMipTailOffset`} + public @CType("VkDeviceSize") long imageMipTailOffset() { return VkSparseImageMemoryRequirements.get_imageMipTailOffset(this.segment()); } + /// Sets `imageMipTailOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageMipTailOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_imageMipTailOffset.set(segment, 0L, index, value); } + /// Sets `imageMipTailOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageMipTailOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSparseImageMemoryRequirements.set_imageMipTailOffset(segment, 0L, value); } + /// Sets `imageMipTailOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements imageMipTailOffsetAt(long index, @CType("VkDeviceSize") long value) { VkSparseImageMemoryRequirements.set_imageMipTailOffset(this.segment(), index, value); return this; } + /// Sets `imageMipTailOffset` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements imageMipTailOffset(@CType("VkDeviceSize") long value) { VkSparseImageMemoryRequirements.set_imageMipTailOffset(this.segment(), value); return this; } + + /// {@return `imageMipTailStride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_imageMipTailStride(MemorySegment segment, long index) { return (long) VH_imageMipTailStride.get(segment, 0L, index); } + /// {@return `imageMipTailStride`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_imageMipTailStride(MemorySegment segment) { return VkSparseImageMemoryRequirements.get_imageMipTailStride(segment, 0L); } + /// {@return `imageMipTailStride` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long imageMipTailStrideAt(long index) { return VkSparseImageMemoryRequirements.get_imageMipTailStride(this.segment(), index); } + /// {@return `imageMipTailStride`} + public @CType("VkDeviceSize") long imageMipTailStride() { return VkSparseImageMemoryRequirements.get_imageMipTailStride(this.segment()); } + /// Sets `imageMipTailStride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_imageMipTailStride(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_imageMipTailStride.set(segment, 0L, index, value); } + /// Sets `imageMipTailStride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_imageMipTailStride(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSparseImageMemoryRequirements.set_imageMipTailStride(segment, 0L, value); } + /// Sets `imageMipTailStride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements imageMipTailStrideAt(long index, @CType("VkDeviceSize") long value) { VkSparseImageMemoryRequirements.set_imageMipTailStride(this.segment(), index, value); return this; } + /// Sets `imageMipTailStride` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements imageMipTailStride(@CType("VkDeviceSize") long value) { VkSparseImageMemoryRequirements.set_imageMipTailStride(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryRequirements2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryRequirements2.java new file mode 100644 index 00000000..27a8bd7f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageMemoryRequirements2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### memoryRequirements +/// [Byte offset][#OFFSET_memoryRequirements] - [Memory layout][#ML_memoryRequirements] - [Getter][#memoryRequirements()] - [Setter][#memoryRequirements(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSparseImageMemoryRequirements2 { +/// VkStructureType sType; +/// void * pNext; +/// VkSparseImageMemoryRequirements memoryRequirements; +/// } VkSparseImageMemoryRequirements2; +/// ``` +public final class VkSparseImageMemoryRequirements2 extends Struct { + /// The struct layout of `VkSparseImageMemoryRequirements2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkSparseImageMemoryRequirements.LAYOUT.withName("memoryRequirements") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `memoryRequirements`. + public static final long OFFSET_memoryRequirements = LAYOUT.byteOffset(PathElement.groupElement("memoryRequirements")); + /// The memory layout of `memoryRequirements`. + public static final MemoryLayout ML_memoryRequirements = LAYOUT.select(PathElement.groupElement("memoryRequirements")); + + /// Creates `VkSparseImageMemoryRequirements2` with the given segment. + /// @param segment the memory segment + public VkSparseImageMemoryRequirements2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSparseImageMemoryRequirements2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryRequirements2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryRequirements2(segment); } + + /// Creates `VkSparseImageMemoryRequirements2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryRequirements2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryRequirements2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSparseImageMemoryRequirements2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageMemoryRequirements2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageMemoryRequirements2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSparseImageMemoryRequirements2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSparseImageMemoryRequirements2` + public static VkSparseImageMemoryRequirements2 alloc(SegmentAllocator allocator) { return new VkSparseImageMemoryRequirements2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSparseImageMemoryRequirements2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSparseImageMemoryRequirements2` + public static VkSparseImageMemoryRequirements2 alloc(SegmentAllocator allocator, long count) { return new VkSparseImageMemoryRequirements2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSparseImageMemoryRequirements2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSparseImageMemoryRequirements2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSparseImageMemoryRequirements2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSparseImageMemoryRequirements2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements2 sTypeAt(long index, @CType("VkStructureType") int value) { VkSparseImageMemoryRequirements2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements2 sType(@CType("VkStructureType") int value) { VkSparseImageMemoryRequirements2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSparseImageMemoryRequirements2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSparseImageMemoryRequirements2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSparseImageMemoryRequirements2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryRequirements2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryRequirements2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryRequirements2.set_pNext(this.segment(), value); return this; } + + /// {@return `memoryRequirements` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSparseImageMemoryRequirements") java.lang.foreign.MemorySegment get_memoryRequirements(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_memoryRequirements, index), ML_memoryRequirements); } + /// {@return `memoryRequirements`} + /// @param segment the segment of the struct + public static @CType("VkSparseImageMemoryRequirements") java.lang.foreign.MemorySegment get_memoryRequirements(MemorySegment segment) { return VkSparseImageMemoryRequirements2.get_memoryRequirements(segment, 0L); } + /// {@return `memoryRequirements` at the given index} + /// @param index the index + public @CType("VkSparseImageMemoryRequirements") java.lang.foreign.MemorySegment memoryRequirementsAt(long index) { return VkSparseImageMemoryRequirements2.get_memoryRequirements(this.segment(), index); } + /// {@return `memoryRequirements`} + public @CType("VkSparseImageMemoryRequirements") java.lang.foreign.MemorySegment memoryRequirements() { return VkSparseImageMemoryRequirements2.get_memoryRequirements(this.segment()); } + /// Sets `memoryRequirements` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryRequirements(MemorySegment segment, long index, @CType("VkSparseImageMemoryRequirements") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_memoryRequirements, index), ML_memoryRequirements.byteSize()); } + /// Sets `memoryRequirements` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryRequirements(MemorySegment segment, @CType("VkSparseImageMemoryRequirements") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryRequirements2.set_memoryRequirements(segment, 0L, value); } + /// Sets `memoryRequirements` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements2 memoryRequirementsAt(long index, @CType("VkSparseImageMemoryRequirements") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryRequirements2.set_memoryRequirements(this.segment(), index, value); return this; } + /// Sets `memoryRequirements` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageMemoryRequirements2 memoryRequirements(@CType("VkSparseImageMemoryRequirements") java.lang.foreign.MemorySegment value) { VkSparseImageMemoryRequirements2.set_memoryRequirements(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageOpaqueMemoryBindInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageOpaqueMemoryBindInfo.java new file mode 100644 index 00000000..bb425afd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseImageOpaqueMemoryBindInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### image +/// [VarHandle][#VH_image] - [Getter][#image()] - [Setter][#image(java.lang.foreign.MemorySegment)] +/// ### bindCount +/// [VarHandle][#VH_bindCount] - [Getter][#bindCount()] - [Setter][#bindCount(int)] +/// ### pBinds +/// [VarHandle][#VH_pBinds] - [Getter][#pBinds()] - [Setter][#pBinds(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSparseImageOpaqueMemoryBindInfo { +/// VkImage image; +/// uint32_t bindCount; +/// const VkSparseMemoryBind * pBinds; +/// } VkSparseImageOpaqueMemoryBindInfo; +/// ``` +public final class VkSparseImageOpaqueMemoryBindInfo extends Struct { + /// The struct layout of `VkSparseImageOpaqueMemoryBindInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.ADDRESS.withName("image"), + ValueLayout.JAVA_INT.withName("bindCount"), + ValueLayout.ADDRESS.withName("pBinds") + ); + /// The [VarHandle] of `image` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_image = LAYOUT.arrayElementVarHandle(PathElement.groupElement("image")); + /// The [VarHandle] of `bindCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bindCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bindCount")); + /// The [VarHandle] of `pBinds` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBinds = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBinds")); + + /// Creates `VkSparseImageOpaqueMemoryBindInfo` with the given segment. + /// @param segment the memory segment + public VkSparseImageOpaqueMemoryBindInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSparseImageOpaqueMemoryBindInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageOpaqueMemoryBindInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageOpaqueMemoryBindInfo(segment); } + + /// Creates `VkSparseImageOpaqueMemoryBindInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageOpaqueMemoryBindInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageOpaqueMemoryBindInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSparseImageOpaqueMemoryBindInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseImageOpaqueMemoryBindInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseImageOpaqueMemoryBindInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSparseImageOpaqueMemoryBindInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSparseImageOpaqueMemoryBindInfo` + public static VkSparseImageOpaqueMemoryBindInfo alloc(SegmentAllocator allocator) { return new VkSparseImageOpaqueMemoryBindInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSparseImageOpaqueMemoryBindInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSparseImageOpaqueMemoryBindInfo` + public static VkSparseImageOpaqueMemoryBindInfo alloc(SegmentAllocator allocator, long count) { return new VkSparseImageOpaqueMemoryBindInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `image` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_image.get(segment, 0L, index); } + /// {@return `image`} + /// @param segment the segment of the struct + public static @CType("VkImage") java.lang.foreign.MemorySegment get_image(MemorySegment segment) { return VkSparseImageOpaqueMemoryBindInfo.get_image(segment, 0L); } + /// {@return `image` at the given index} + /// @param index the index + public @CType("VkImage") java.lang.foreign.MemorySegment imageAt(long index) { return VkSparseImageOpaqueMemoryBindInfo.get_image(this.segment(), index); } + /// {@return `image`} + public @CType("VkImage") java.lang.foreign.MemorySegment image() { return VkSparseImageOpaqueMemoryBindInfo.get_image(this.segment()); } + /// Sets `image` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_image(MemorySegment segment, long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VH_image.set(segment, 0L, index, value); } + /// Sets `image` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_image(MemorySegment segment, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkSparseImageOpaqueMemoryBindInfo.set_image(segment, 0L, value); } + /// Sets `image` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageOpaqueMemoryBindInfo imageAt(long index, @CType("VkImage") java.lang.foreign.MemorySegment value) { VkSparseImageOpaqueMemoryBindInfo.set_image(this.segment(), index, value); return this; } + /// Sets `image` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageOpaqueMemoryBindInfo image(@CType("VkImage") java.lang.foreign.MemorySegment value) { VkSparseImageOpaqueMemoryBindInfo.set_image(this.segment(), value); return this; } + + /// {@return `bindCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_bindCount(MemorySegment segment, long index) { return (int) VH_bindCount.get(segment, 0L, index); } + /// {@return `bindCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_bindCount(MemorySegment segment) { return VkSparseImageOpaqueMemoryBindInfo.get_bindCount(segment, 0L); } + /// {@return `bindCount` at the given index} + /// @param index the index + public @CType("uint32_t") int bindCountAt(long index) { return VkSparseImageOpaqueMemoryBindInfo.get_bindCount(this.segment(), index); } + /// {@return `bindCount`} + public @CType("uint32_t") int bindCount() { return VkSparseImageOpaqueMemoryBindInfo.get_bindCount(this.segment()); } + /// Sets `bindCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bindCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_bindCount.set(segment, 0L, index, value); } + /// Sets `bindCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bindCount(MemorySegment segment, @CType("uint32_t") int value) { VkSparseImageOpaqueMemoryBindInfo.set_bindCount(segment, 0L, value); } + /// Sets `bindCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageOpaqueMemoryBindInfo bindCountAt(long index, @CType("uint32_t") int value) { VkSparseImageOpaqueMemoryBindInfo.set_bindCount(this.segment(), index, value); return this; } + /// Sets `bindCount` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageOpaqueMemoryBindInfo bindCount(@CType("uint32_t") int value) { VkSparseImageOpaqueMemoryBindInfo.set_bindCount(this.segment(), value); return this; } + + /// {@return `pBinds` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment get_pBinds(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBinds.get(segment, 0L, index); } + /// {@return `pBinds`} + /// @param segment the segment of the struct + public static @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment get_pBinds(MemorySegment segment) { return VkSparseImageOpaqueMemoryBindInfo.get_pBinds(segment, 0L); } + /// {@return `pBinds` at the given index} + /// @param index the index + public @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment pBindsAt(long index) { return VkSparseImageOpaqueMemoryBindInfo.get_pBinds(this.segment(), index); } + /// {@return `pBinds`} + public @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment pBinds() { return VkSparseImageOpaqueMemoryBindInfo.get_pBinds(this.segment()); } + /// Sets `pBinds` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBinds(MemorySegment segment, long index, @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment value) { VH_pBinds.set(segment, 0L, index, value); } + /// Sets `pBinds` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBinds(MemorySegment segment, @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment value) { VkSparseImageOpaqueMemoryBindInfo.set_pBinds(segment, 0L, value); } + /// Sets `pBinds` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseImageOpaqueMemoryBindInfo pBindsAt(long index, @CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment value) { VkSparseImageOpaqueMemoryBindInfo.set_pBinds(this.segment(), index, value); return this; } + /// Sets `pBinds` with the given value. + /// @param value the value + /// @return `this` + public VkSparseImageOpaqueMemoryBindInfo pBinds(@CType("const VkSparseMemoryBind *") java.lang.foreign.MemorySegment value) { VkSparseImageOpaqueMemoryBindInfo.set_pBinds(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseMemoryBind.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseMemoryBind.java new file mode 100644 index 00000000..ba34df30 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSparseMemoryBind.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### resourceOffset +/// [VarHandle][#VH_resourceOffset] - [Getter][#resourceOffset()] - [Setter][#resourceOffset(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ### memory +/// [VarHandle][#VH_memory] - [Getter][#memory()] - [Setter][#memory(java.lang.foreign.MemorySegment)] +/// ### memoryOffset +/// [VarHandle][#VH_memoryOffset] - [Getter][#memoryOffset()] - [Setter][#memoryOffset(long)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSparseMemoryBind { +/// VkDeviceSize resourceOffset; +/// VkDeviceSize size; +/// VkDeviceMemory memory; +/// VkDeviceSize memoryOffset; +/// VkSparseMemoryBindFlags flags; +/// } VkSparseMemoryBind; +/// ``` +public final class VkSparseMemoryBind extends Struct { + /// The struct layout of `VkSparseMemoryBind`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("resourceOffset"), + ValueLayout.JAVA_LONG.withName("size"), + ValueLayout.ADDRESS.withName("memory"), + ValueLayout.JAVA_LONG.withName("memoryOffset"), + ValueLayout.JAVA_INT.withName("flags") + ); + /// The [VarHandle] of `resourceOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_resourceOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("resourceOffset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `memory` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_memory = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory")); + /// The [VarHandle] of `memoryOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_memoryOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memoryOffset")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + + /// Creates `VkSparseMemoryBind` with the given segment. + /// @param segment the memory segment + public VkSparseMemoryBind(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSparseMemoryBind` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseMemoryBind of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseMemoryBind(segment); } + + /// Creates `VkSparseMemoryBind` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseMemoryBind ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseMemoryBind(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSparseMemoryBind` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSparseMemoryBind ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSparseMemoryBind(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSparseMemoryBind` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSparseMemoryBind` + public static VkSparseMemoryBind alloc(SegmentAllocator allocator) { return new VkSparseMemoryBind(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSparseMemoryBind` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSparseMemoryBind` + public static VkSparseMemoryBind alloc(SegmentAllocator allocator, long count) { return new VkSparseMemoryBind(allocator.allocate(LAYOUT, count)); } + + /// {@return `resourceOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_resourceOffset(MemorySegment segment, long index) { return (long) VH_resourceOffset.get(segment, 0L, index); } + /// {@return `resourceOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_resourceOffset(MemorySegment segment) { return VkSparseMemoryBind.get_resourceOffset(segment, 0L); } + /// {@return `resourceOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long resourceOffsetAt(long index) { return VkSparseMemoryBind.get_resourceOffset(this.segment(), index); } + /// {@return `resourceOffset`} + public @CType("VkDeviceSize") long resourceOffset() { return VkSparseMemoryBind.get_resourceOffset(this.segment()); } + /// Sets `resourceOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_resourceOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_resourceOffset.set(segment, 0L, index, value); } + /// Sets `resourceOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_resourceOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSparseMemoryBind.set_resourceOffset(segment, 0L, value); } + /// Sets `resourceOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseMemoryBind resourceOffsetAt(long index, @CType("VkDeviceSize") long value) { VkSparseMemoryBind.set_resourceOffset(this.segment(), index, value); return this; } + /// Sets `resourceOffset` with the given value. + /// @param value the value + /// @return `this` + public VkSparseMemoryBind resourceOffset(@CType("VkDeviceSize") long value) { VkSparseMemoryBind.set_resourceOffset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkSparseMemoryBind.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkSparseMemoryBind.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkSparseMemoryBind.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSparseMemoryBind.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseMemoryBind sizeAt(long index, @CType("VkDeviceSize") long value) { VkSparseMemoryBind.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkSparseMemoryBind size(@CType("VkDeviceSize") long value) { VkSparseMemoryBind.set_size(this.segment(), value); return this; } + + /// {@return `memory` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_memory.get(segment, 0L, index); } + /// {@return `memory`} + /// @param segment the segment of the struct + public static @CType("VkDeviceMemory") java.lang.foreign.MemorySegment get_memory(MemorySegment segment) { return VkSparseMemoryBind.get_memory(segment, 0L); } + /// {@return `memory` at the given index} + /// @param index the index + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memoryAt(long index) { return VkSparseMemoryBind.get_memory(this.segment(), index); } + /// {@return `memory`} + public @CType("VkDeviceMemory") java.lang.foreign.MemorySegment memory() { return VkSparseMemoryBind.get_memory(this.segment()); } + /// Sets `memory` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory(MemorySegment segment, long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VH_memory.set(segment, 0L, index, value); } + /// Sets `memory` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory(MemorySegment segment, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkSparseMemoryBind.set_memory(segment, 0L, value); } + /// Sets `memory` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseMemoryBind memoryAt(long index, @CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkSparseMemoryBind.set_memory(this.segment(), index, value); return this; } + /// Sets `memory` with the given value. + /// @param value the value + /// @return `this` + public VkSparseMemoryBind memory(@CType("VkDeviceMemory") java.lang.foreign.MemorySegment value) { VkSparseMemoryBind.set_memory(this.segment(), value); return this; } + + /// {@return `memoryOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment, long index) { return (long) VH_memoryOffset.get(segment, 0L, index); } + /// {@return `memoryOffset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_memoryOffset(MemorySegment segment) { return VkSparseMemoryBind.get_memoryOffset(segment, 0L); } + /// {@return `memoryOffset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long memoryOffsetAt(long index) { return VkSparseMemoryBind.get_memoryOffset(this.segment(), index); } + /// {@return `memoryOffset`} + public @CType("VkDeviceSize") long memoryOffset() { return VkSparseMemoryBind.get_memoryOffset(this.segment()); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_memoryOffset.set(segment, 0L, index, value); } + /// Sets `memoryOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memoryOffset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSparseMemoryBind.set_memoryOffset(segment, 0L, value); } + /// Sets `memoryOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseMemoryBind memoryOffsetAt(long index, @CType("VkDeviceSize") long value) { VkSparseMemoryBind.set_memoryOffset(this.segment(), index, value); return this; } + /// Sets `memoryOffset` with the given value. + /// @param value the value + /// @return `this` + public VkSparseMemoryBind memoryOffset(@CType("VkDeviceSize") long value) { VkSparseMemoryBind.set_memoryOffset(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSparseMemoryBindFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSparseMemoryBindFlags") int get_flags(MemorySegment segment) { return VkSparseMemoryBind.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSparseMemoryBindFlags") int flagsAt(long index) { return VkSparseMemoryBind.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSparseMemoryBindFlags") int flags() { return VkSparseMemoryBind.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSparseMemoryBindFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSparseMemoryBindFlags") int value) { VkSparseMemoryBind.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSparseMemoryBind flagsAt(long index, @CType("VkSparseMemoryBindFlags") int value) { VkSparseMemoryBind.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkSparseMemoryBind flags(@CType("VkSparseMemoryBindFlags") int value) { VkSparseMemoryBind.set_flags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSpecializationInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSpecializationInfo.java new file mode 100644 index 00000000..3aa421ee --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSpecializationInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### mapEntryCount +/// [VarHandle][#VH_mapEntryCount] - [Getter][#mapEntryCount()] - [Setter][#mapEntryCount(int)] +/// ### pMapEntries +/// [VarHandle][#VH_pMapEntries] - [Getter][#pMapEntries()] - [Setter][#pMapEntries(java.lang.foreign.MemorySegment)] +/// ### dataSize +/// [VarHandle][#VH_dataSize] - [Getter][#dataSize()] - [Setter][#dataSize(long)] +/// ### pData +/// [VarHandle][#VH_pData] - [Getter][#pData()] - [Setter][#pData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSpecializationInfo { +/// uint32_t mapEntryCount; +/// const VkSpecializationMapEntry * pMapEntries; +/// size_t dataSize; +/// const void * pData; +/// } VkSpecializationInfo; +/// ``` +public final class VkSpecializationInfo extends Struct { + /// The struct layout of `VkSpecializationInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("mapEntryCount"), + ValueLayout.ADDRESS.withName("pMapEntries"), + ValueLayout.JAVA_LONG.withName("dataSize"), + ValueLayout.ADDRESS.withName("pData") + ); + /// The [VarHandle] of `mapEntryCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mapEntryCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mapEntryCount")); + /// The [VarHandle] of `pMapEntries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pMapEntries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pMapEntries")); + /// The [VarHandle] of `dataSize` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_dataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dataSize")); + /// The [VarHandle] of `pData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pData")); + + /// Creates `VkSpecializationInfo` with the given segment. + /// @param segment the memory segment + public VkSpecializationInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSpecializationInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSpecializationInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSpecializationInfo(segment); } + + /// Creates `VkSpecializationInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSpecializationInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSpecializationInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSpecializationInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSpecializationInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSpecializationInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSpecializationInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSpecializationInfo` + public static VkSpecializationInfo alloc(SegmentAllocator allocator) { return new VkSpecializationInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSpecializationInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSpecializationInfo` + public static VkSpecializationInfo alloc(SegmentAllocator allocator, long count) { return new VkSpecializationInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `mapEntryCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_mapEntryCount(MemorySegment segment, long index) { return (int) VH_mapEntryCount.get(segment, 0L, index); } + /// {@return `mapEntryCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_mapEntryCount(MemorySegment segment) { return VkSpecializationInfo.get_mapEntryCount(segment, 0L); } + /// {@return `mapEntryCount` at the given index} + /// @param index the index + public @CType("uint32_t") int mapEntryCountAt(long index) { return VkSpecializationInfo.get_mapEntryCount(this.segment(), index); } + /// {@return `mapEntryCount`} + public @CType("uint32_t") int mapEntryCount() { return VkSpecializationInfo.get_mapEntryCount(this.segment()); } + /// Sets `mapEntryCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mapEntryCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_mapEntryCount.set(segment, 0L, index, value); } + /// Sets `mapEntryCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mapEntryCount(MemorySegment segment, @CType("uint32_t") int value) { VkSpecializationInfo.set_mapEntryCount(segment, 0L, value); } + /// Sets `mapEntryCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSpecializationInfo mapEntryCountAt(long index, @CType("uint32_t") int value) { VkSpecializationInfo.set_mapEntryCount(this.segment(), index, value); return this; } + /// Sets `mapEntryCount` with the given value. + /// @param value the value + /// @return `this` + public VkSpecializationInfo mapEntryCount(@CType("uint32_t") int value) { VkSpecializationInfo.set_mapEntryCount(this.segment(), value); return this; } + + /// {@return `pMapEntries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSpecializationMapEntry *") java.lang.foreign.MemorySegment get_pMapEntries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pMapEntries.get(segment, 0L, index); } + /// {@return `pMapEntries`} + /// @param segment the segment of the struct + public static @CType("const VkSpecializationMapEntry *") java.lang.foreign.MemorySegment get_pMapEntries(MemorySegment segment) { return VkSpecializationInfo.get_pMapEntries(segment, 0L); } + /// {@return `pMapEntries` at the given index} + /// @param index the index + public @CType("const VkSpecializationMapEntry *") java.lang.foreign.MemorySegment pMapEntriesAt(long index) { return VkSpecializationInfo.get_pMapEntries(this.segment(), index); } + /// {@return `pMapEntries`} + public @CType("const VkSpecializationMapEntry *") java.lang.foreign.MemorySegment pMapEntries() { return VkSpecializationInfo.get_pMapEntries(this.segment()); } + /// Sets `pMapEntries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pMapEntries(MemorySegment segment, long index, @CType("const VkSpecializationMapEntry *") java.lang.foreign.MemorySegment value) { VH_pMapEntries.set(segment, 0L, index, value); } + /// Sets `pMapEntries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pMapEntries(MemorySegment segment, @CType("const VkSpecializationMapEntry *") java.lang.foreign.MemorySegment value) { VkSpecializationInfo.set_pMapEntries(segment, 0L, value); } + /// Sets `pMapEntries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSpecializationInfo pMapEntriesAt(long index, @CType("const VkSpecializationMapEntry *") java.lang.foreign.MemorySegment value) { VkSpecializationInfo.set_pMapEntries(this.segment(), index, value); return this; } + /// Sets `pMapEntries` with the given value. + /// @param value the value + /// @return `this` + public VkSpecializationInfo pMapEntries(@CType("const VkSpecializationMapEntry *") java.lang.foreign.MemorySegment value) { VkSpecializationInfo.set_pMapEntries(this.segment(), value); return this; } + + /// {@return `dataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_dataSize(MemorySegment segment, long index) { return (long) VH_dataSize.get(segment, 0L, index); } + /// {@return `dataSize`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_dataSize(MemorySegment segment) { return VkSpecializationInfo.get_dataSize(segment, 0L); } + /// {@return `dataSize` at the given index} + /// @param index the index + public @CType("size_t") long dataSizeAt(long index) { return VkSpecializationInfo.get_dataSize(this.segment(), index); } + /// {@return `dataSize`} + public @CType("size_t") long dataSize() { return VkSpecializationInfo.get_dataSize(this.segment()); } + /// Sets `dataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dataSize(MemorySegment segment, long index, @CType("size_t") long value) { VH_dataSize.set(segment, 0L, index, value); } + /// Sets `dataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dataSize(MemorySegment segment, @CType("size_t") long value) { VkSpecializationInfo.set_dataSize(segment, 0L, value); } + /// Sets `dataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSpecializationInfo dataSizeAt(long index, @CType("size_t") long value) { VkSpecializationInfo.set_dataSize(this.segment(), index, value); return this; } + /// Sets `dataSize` with the given value. + /// @param value the value + /// @return `this` + public VkSpecializationInfo dataSize(@CType("size_t") long value) { VkSpecializationInfo.set_dataSize(this.segment(), value); return this; } + + /// {@return `pData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pData.get(segment, 0L, index); } + /// {@return `pData`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment) { return VkSpecializationInfo.get_pData(segment, 0L); } + /// {@return `pData` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pDataAt(long index) { return VkSpecializationInfo.get_pData(this.segment(), index); } + /// {@return `pData`} + public @CType("const void *") java.lang.foreign.MemorySegment pData() { return VkSpecializationInfo.get_pData(this.segment()); } + /// Sets `pData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pData(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pData.set(segment, 0L, index, value); } + /// Sets `pData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pData(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSpecializationInfo.set_pData(segment, 0L, value); } + /// Sets `pData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSpecializationInfo pDataAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSpecializationInfo.set_pData(this.segment(), index, value); return this; } + /// Sets `pData` with the given value. + /// @param value the value + /// @return `this` + public VkSpecializationInfo pData(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSpecializationInfo.set_pData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSpecializationMapEntry.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSpecializationMapEntry.java new file mode 100644 index 00000000..aa029af4 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSpecializationMapEntry.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### constantID +/// [VarHandle][#VH_constantID] - [Getter][#constantID()] - [Setter][#constantID(int)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(int)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSpecializationMapEntry { +/// uint32_t constantID; +/// uint32_t offset; +/// size_t size; +/// } VkSpecializationMapEntry; +/// ``` +public final class VkSpecializationMapEntry extends Struct { + /// The struct layout of `VkSpecializationMapEntry`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("constantID"), + ValueLayout.JAVA_INT.withName("offset"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `constantID` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constantID = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constantID")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkSpecializationMapEntry` with the given segment. + /// @param segment the memory segment + public VkSpecializationMapEntry(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSpecializationMapEntry` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSpecializationMapEntry of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSpecializationMapEntry(segment); } + + /// Creates `VkSpecializationMapEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSpecializationMapEntry ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSpecializationMapEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSpecializationMapEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSpecializationMapEntry ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSpecializationMapEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSpecializationMapEntry` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSpecializationMapEntry` + public static VkSpecializationMapEntry alloc(SegmentAllocator allocator) { return new VkSpecializationMapEntry(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSpecializationMapEntry` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSpecializationMapEntry` + public static VkSpecializationMapEntry alloc(SegmentAllocator allocator, long count) { return new VkSpecializationMapEntry(allocator.allocate(LAYOUT, count)); } + + /// {@return `constantID` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_constantID(MemorySegment segment, long index) { return (int) VH_constantID.get(segment, 0L, index); } + /// {@return `constantID`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_constantID(MemorySegment segment) { return VkSpecializationMapEntry.get_constantID(segment, 0L); } + /// {@return `constantID` at the given index} + /// @param index the index + public @CType("uint32_t") int constantIDAt(long index) { return VkSpecializationMapEntry.get_constantID(this.segment(), index); } + /// {@return `constantID`} + public @CType("uint32_t") int constantID() { return VkSpecializationMapEntry.get_constantID(this.segment()); } + /// Sets `constantID` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constantID(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_constantID.set(segment, 0L, index, value); } + /// Sets `constantID` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constantID(MemorySegment segment, @CType("uint32_t") int value) { VkSpecializationMapEntry.set_constantID(segment, 0L, value); } + /// Sets `constantID` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSpecializationMapEntry constantIDAt(long index, @CType("uint32_t") int value) { VkSpecializationMapEntry.set_constantID(this.segment(), index, value); return this; } + /// Sets `constantID` with the given value. + /// @param value the value + /// @return `this` + public VkSpecializationMapEntry constantID(@CType("uint32_t") int value) { VkSpecializationMapEntry.set_constantID(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_offset(MemorySegment segment, long index) { return (int) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_offset(MemorySegment segment) { return VkSpecializationMapEntry.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("uint32_t") int offsetAt(long index) { return VkSpecializationMapEntry.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("uint32_t") int offset() { return VkSpecializationMapEntry.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("uint32_t") int value) { VkSpecializationMapEntry.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSpecializationMapEntry offsetAt(long index, @CType("uint32_t") int value) { VkSpecializationMapEntry.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkSpecializationMapEntry offset(@CType("uint32_t") int value) { VkSpecializationMapEntry.set_offset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_size(MemorySegment segment) { return VkSpecializationMapEntry.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("size_t") long sizeAt(long index) { return VkSpecializationMapEntry.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("size_t") long size() { return VkSpecializationMapEntry.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("size_t") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("size_t") long value) { VkSpecializationMapEntry.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSpecializationMapEntry sizeAt(long index, @CType("size_t") long value) { VkSpecializationMapEntry.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkSpecializationMapEntry size(@CType("size_t") long value) { VkSpecializationMapEntry.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkStencilOpState.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkStencilOpState.java new file mode 100644 index 00000000..5831ce61 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkStencilOpState.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### failOp +/// [VarHandle][#VH_failOp] - [Getter][#failOp()] - [Setter][#failOp(int)] +/// ### passOp +/// [VarHandle][#VH_passOp] - [Getter][#passOp()] - [Setter][#passOp(int)] +/// ### depthFailOp +/// [VarHandle][#VH_depthFailOp] - [Getter][#depthFailOp()] - [Setter][#depthFailOp(int)] +/// ### compareOp +/// [VarHandle][#VH_compareOp] - [Getter][#compareOp()] - [Setter][#compareOp(int)] +/// ### compareMask +/// [VarHandle][#VH_compareMask] - [Getter][#compareMask()] - [Setter][#compareMask(int)] +/// ### writeMask +/// [VarHandle][#VH_writeMask] - [Getter][#writeMask()] - [Setter][#writeMask(int)] +/// ### reference +/// [VarHandle][#VH_reference] - [Getter][#reference()] - [Setter][#reference(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkStencilOpState { +/// VkStencilOp failOp; +/// VkStencilOp passOp; +/// VkStencilOp depthFailOp; +/// VkCompareOp compareOp; +/// uint32_t compareMask; +/// uint32_t writeMask; +/// uint32_t reference; +/// } VkStencilOpState; +/// ``` +public final class VkStencilOpState extends Struct { + /// The struct layout of `VkStencilOpState`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("failOp"), + ValueLayout.JAVA_INT.withName("passOp"), + ValueLayout.JAVA_INT.withName("depthFailOp"), + ValueLayout.JAVA_INT.withName("compareOp"), + ValueLayout.JAVA_INT.withName("compareMask"), + ValueLayout.JAVA_INT.withName("writeMask"), + ValueLayout.JAVA_INT.withName("reference") + ); + /// The [VarHandle] of `failOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_failOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("failOp")); + /// The [VarHandle] of `passOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_passOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("passOp")); + /// The [VarHandle] of `depthFailOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthFailOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthFailOp")); + /// The [VarHandle] of `compareOp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compareOp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compareOp")); + /// The [VarHandle] of `compareMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_compareMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("compareMask")); + /// The [VarHandle] of `writeMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_writeMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("writeMask")); + /// The [VarHandle] of `reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reference")); + + /// Creates `VkStencilOpState` with the given segment. + /// @param segment the memory segment + public VkStencilOpState(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkStencilOpState` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkStencilOpState of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkStencilOpState(segment); } + + /// Creates `VkStencilOpState` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkStencilOpState ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkStencilOpState(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkStencilOpState` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkStencilOpState ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkStencilOpState(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkStencilOpState` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkStencilOpState` + public static VkStencilOpState alloc(SegmentAllocator allocator) { return new VkStencilOpState(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkStencilOpState` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkStencilOpState` + public static VkStencilOpState alloc(SegmentAllocator allocator, long count) { return new VkStencilOpState(allocator.allocate(LAYOUT, count)); } + + /// {@return `failOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStencilOp") int get_failOp(MemorySegment segment, long index) { return (int) VH_failOp.get(segment, 0L, index); } + /// {@return `failOp`} + /// @param segment the segment of the struct + public static @CType("VkStencilOp") int get_failOp(MemorySegment segment) { return VkStencilOpState.get_failOp(segment, 0L); } + /// {@return `failOp` at the given index} + /// @param index the index + public @CType("VkStencilOp") int failOpAt(long index) { return VkStencilOpState.get_failOp(this.segment(), index); } + /// {@return `failOp`} + public @CType("VkStencilOp") int failOp() { return VkStencilOpState.get_failOp(this.segment()); } + /// Sets `failOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_failOp(MemorySegment segment, long index, @CType("VkStencilOp") int value) { VH_failOp.set(segment, 0L, index, value); } + /// Sets `failOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_failOp(MemorySegment segment, @CType("VkStencilOp") int value) { VkStencilOpState.set_failOp(segment, 0L, value); } + /// Sets `failOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStencilOpState failOpAt(long index, @CType("VkStencilOp") int value) { VkStencilOpState.set_failOp(this.segment(), index, value); return this; } + /// Sets `failOp` with the given value. + /// @param value the value + /// @return `this` + public VkStencilOpState failOp(@CType("VkStencilOp") int value) { VkStencilOpState.set_failOp(this.segment(), value); return this; } + + /// {@return `passOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStencilOp") int get_passOp(MemorySegment segment, long index) { return (int) VH_passOp.get(segment, 0L, index); } + /// {@return `passOp`} + /// @param segment the segment of the struct + public static @CType("VkStencilOp") int get_passOp(MemorySegment segment) { return VkStencilOpState.get_passOp(segment, 0L); } + /// {@return `passOp` at the given index} + /// @param index the index + public @CType("VkStencilOp") int passOpAt(long index) { return VkStencilOpState.get_passOp(this.segment(), index); } + /// {@return `passOp`} + public @CType("VkStencilOp") int passOp() { return VkStencilOpState.get_passOp(this.segment()); } + /// Sets `passOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_passOp(MemorySegment segment, long index, @CType("VkStencilOp") int value) { VH_passOp.set(segment, 0L, index, value); } + /// Sets `passOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_passOp(MemorySegment segment, @CType("VkStencilOp") int value) { VkStencilOpState.set_passOp(segment, 0L, value); } + /// Sets `passOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStencilOpState passOpAt(long index, @CType("VkStencilOp") int value) { VkStencilOpState.set_passOp(this.segment(), index, value); return this; } + /// Sets `passOp` with the given value. + /// @param value the value + /// @return `this` + public VkStencilOpState passOp(@CType("VkStencilOp") int value) { VkStencilOpState.set_passOp(this.segment(), value); return this; } + + /// {@return `depthFailOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStencilOp") int get_depthFailOp(MemorySegment segment, long index) { return (int) VH_depthFailOp.get(segment, 0L, index); } + /// {@return `depthFailOp`} + /// @param segment the segment of the struct + public static @CType("VkStencilOp") int get_depthFailOp(MemorySegment segment) { return VkStencilOpState.get_depthFailOp(segment, 0L); } + /// {@return `depthFailOp` at the given index} + /// @param index the index + public @CType("VkStencilOp") int depthFailOpAt(long index) { return VkStencilOpState.get_depthFailOp(this.segment(), index); } + /// {@return `depthFailOp`} + public @CType("VkStencilOp") int depthFailOp() { return VkStencilOpState.get_depthFailOp(this.segment()); } + /// Sets `depthFailOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthFailOp(MemorySegment segment, long index, @CType("VkStencilOp") int value) { VH_depthFailOp.set(segment, 0L, index, value); } + /// Sets `depthFailOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthFailOp(MemorySegment segment, @CType("VkStencilOp") int value) { VkStencilOpState.set_depthFailOp(segment, 0L, value); } + /// Sets `depthFailOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStencilOpState depthFailOpAt(long index, @CType("VkStencilOp") int value) { VkStencilOpState.set_depthFailOp(this.segment(), index, value); return this; } + /// Sets `depthFailOp` with the given value. + /// @param value the value + /// @return `this` + public VkStencilOpState depthFailOp(@CType("VkStencilOp") int value) { VkStencilOpState.set_depthFailOp(this.segment(), value); return this; } + + /// {@return `compareOp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkCompareOp") int get_compareOp(MemorySegment segment, long index) { return (int) VH_compareOp.get(segment, 0L, index); } + /// {@return `compareOp`} + /// @param segment the segment of the struct + public static @CType("VkCompareOp") int get_compareOp(MemorySegment segment) { return VkStencilOpState.get_compareOp(segment, 0L); } + /// {@return `compareOp` at the given index} + /// @param index the index + public @CType("VkCompareOp") int compareOpAt(long index) { return VkStencilOpState.get_compareOp(this.segment(), index); } + /// {@return `compareOp`} + public @CType("VkCompareOp") int compareOp() { return VkStencilOpState.get_compareOp(this.segment()); } + /// Sets `compareOp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compareOp(MemorySegment segment, long index, @CType("VkCompareOp") int value) { VH_compareOp.set(segment, 0L, index, value); } + /// Sets `compareOp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compareOp(MemorySegment segment, @CType("VkCompareOp") int value) { VkStencilOpState.set_compareOp(segment, 0L, value); } + /// Sets `compareOp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStencilOpState compareOpAt(long index, @CType("VkCompareOp") int value) { VkStencilOpState.set_compareOp(this.segment(), index, value); return this; } + /// Sets `compareOp` with the given value. + /// @param value the value + /// @return `this` + public VkStencilOpState compareOp(@CType("VkCompareOp") int value) { VkStencilOpState.set_compareOp(this.segment(), value); return this; } + + /// {@return `compareMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_compareMask(MemorySegment segment, long index) { return (int) VH_compareMask.get(segment, 0L, index); } + /// {@return `compareMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_compareMask(MemorySegment segment) { return VkStencilOpState.get_compareMask(segment, 0L); } + /// {@return `compareMask` at the given index} + /// @param index the index + public @CType("uint32_t") int compareMaskAt(long index) { return VkStencilOpState.get_compareMask(this.segment(), index); } + /// {@return `compareMask`} + public @CType("uint32_t") int compareMask() { return VkStencilOpState.get_compareMask(this.segment()); } + /// Sets `compareMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_compareMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_compareMask.set(segment, 0L, index, value); } + /// Sets `compareMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_compareMask(MemorySegment segment, @CType("uint32_t") int value) { VkStencilOpState.set_compareMask(segment, 0L, value); } + /// Sets `compareMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStencilOpState compareMaskAt(long index, @CType("uint32_t") int value) { VkStencilOpState.set_compareMask(this.segment(), index, value); return this; } + /// Sets `compareMask` with the given value. + /// @param value the value + /// @return `this` + public VkStencilOpState compareMask(@CType("uint32_t") int value) { VkStencilOpState.set_compareMask(this.segment(), value); return this; } + + /// {@return `writeMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_writeMask(MemorySegment segment, long index) { return (int) VH_writeMask.get(segment, 0L, index); } + /// {@return `writeMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_writeMask(MemorySegment segment) { return VkStencilOpState.get_writeMask(segment, 0L); } + /// {@return `writeMask` at the given index} + /// @param index the index + public @CType("uint32_t") int writeMaskAt(long index) { return VkStencilOpState.get_writeMask(this.segment(), index); } + /// {@return `writeMask`} + public @CType("uint32_t") int writeMask() { return VkStencilOpState.get_writeMask(this.segment()); } + /// Sets `writeMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_writeMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_writeMask.set(segment, 0L, index, value); } + /// Sets `writeMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_writeMask(MemorySegment segment, @CType("uint32_t") int value) { VkStencilOpState.set_writeMask(segment, 0L, value); } + /// Sets `writeMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStencilOpState writeMaskAt(long index, @CType("uint32_t") int value) { VkStencilOpState.set_writeMask(this.segment(), index, value); return this; } + /// Sets `writeMask` with the given value. + /// @param value the value + /// @return `this` + public VkStencilOpState writeMask(@CType("uint32_t") int value) { VkStencilOpState.set_writeMask(this.segment(), value); return this; } + + /// {@return `reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_reference(MemorySegment segment, long index) { return (int) VH_reference.get(segment, 0L, index); } + /// {@return `reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_reference(MemorySegment segment) { return VkStencilOpState.get_reference(segment, 0L); } + /// {@return `reference` at the given index} + /// @param index the index + public @CType("uint32_t") int referenceAt(long index) { return VkStencilOpState.get_reference(this.segment(), index); } + /// {@return `reference`} + public @CType("uint32_t") int reference() { return VkStencilOpState.get_reference(this.segment()); } + /// Sets `reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reference(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_reference.set(segment, 0L, index, value); } + /// Sets `reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reference(MemorySegment segment, @CType("uint32_t") int value) { VkStencilOpState.set_reference(segment, 0L, value); } + /// Sets `reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkStencilOpState referenceAt(long index, @CType("uint32_t") int value) { VkStencilOpState.set_reference(this.segment(), index, value); return this; } + /// Sets `reference` with the given value. + /// @param value the value + /// @return `this` + public VkStencilOpState reference(@CType("uint32_t") int value) { VkStencilOpState.set_reference(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubmitInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubmitInfo.java new file mode 100644 index 00000000..136d1f56 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubmitInfo.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### waitSemaphoreCount +/// [VarHandle][#VH_waitSemaphoreCount] - [Getter][#waitSemaphoreCount()] - [Setter][#waitSemaphoreCount(int)] +/// ### pWaitSemaphores +/// [VarHandle][#VH_pWaitSemaphores] - [Getter][#pWaitSemaphores()] - [Setter][#pWaitSemaphores(java.lang.foreign.MemorySegment)] +/// ### pWaitDstStageMask +/// [VarHandle][#VH_pWaitDstStageMask] - [Getter][#pWaitDstStageMask()] - [Setter][#pWaitDstStageMask(java.lang.foreign.MemorySegment)] +/// ### commandBufferCount +/// [VarHandle][#VH_commandBufferCount] - [Getter][#commandBufferCount()] - [Setter][#commandBufferCount(int)] +/// ### pCommandBuffers +/// [VarHandle][#VH_pCommandBuffers] - [Getter][#pCommandBuffers()] - [Setter][#pCommandBuffers(java.lang.foreign.MemorySegment)] +/// ### signalSemaphoreCount +/// [VarHandle][#VH_signalSemaphoreCount] - [Getter][#signalSemaphoreCount()] - [Setter][#signalSemaphoreCount(int)] +/// ### pSignalSemaphores +/// [VarHandle][#VH_pSignalSemaphores] - [Getter][#pSignalSemaphores()] - [Setter][#pSignalSemaphores(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubmitInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t waitSemaphoreCount; +/// const VkSemaphore * pWaitSemaphores; +/// const VkPipelineStageFlags * pWaitDstStageMask; +/// uint32_t commandBufferCount; +/// const VkCommandBuffer * pCommandBuffers; +/// uint32_t signalSemaphoreCount; +/// const VkSemaphore * pSignalSemaphores; +/// } VkSubmitInfo; +/// ``` +public final class VkSubmitInfo extends Struct { + /// The struct layout of `VkSubmitInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("waitSemaphoreCount"), + ValueLayout.ADDRESS.withName("pWaitSemaphores"), + ValueLayout.ADDRESS.withName("pWaitDstStageMask"), + ValueLayout.JAVA_INT.withName("commandBufferCount"), + ValueLayout.ADDRESS.withName("pCommandBuffers"), + ValueLayout.JAVA_INT.withName("signalSemaphoreCount"), + ValueLayout.ADDRESS.withName("pSignalSemaphores") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `waitSemaphoreCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_waitSemaphoreCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("waitSemaphoreCount")); + /// The [VarHandle] of `pWaitSemaphores` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWaitSemaphores = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWaitSemaphores")); + /// The [VarHandle] of `pWaitDstStageMask` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWaitDstStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWaitDstStageMask")); + /// The [VarHandle] of `commandBufferCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandBufferCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandBufferCount")); + /// The [VarHandle] of `pCommandBuffers` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCommandBuffers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCommandBuffers")); + /// The [VarHandle] of `signalSemaphoreCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_signalSemaphoreCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("signalSemaphoreCount")); + /// The [VarHandle] of `pSignalSemaphores` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSignalSemaphores = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSignalSemaphores")); + + /// Creates `VkSubmitInfo` with the given segment. + /// @param segment the memory segment + public VkSubmitInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubmitInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubmitInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubmitInfo(segment); } + + /// Creates `VkSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubmitInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubmitInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubmitInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubmitInfo` + public static VkSubmitInfo alloc(SegmentAllocator allocator) { return new VkSubmitInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubmitInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubmitInfo` + public static VkSubmitInfo alloc(SegmentAllocator allocator, long count) { return new VkSubmitInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubmitInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubmitInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubmitInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubmitInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSubmitInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo sType(@CType("VkStructureType") int value) { VkSubmitInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubmitInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubmitInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSubmitInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `waitSemaphoreCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_waitSemaphoreCount(MemorySegment segment, long index) { return (int) VH_waitSemaphoreCount.get(segment, 0L, index); } + /// {@return `waitSemaphoreCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_waitSemaphoreCount(MemorySegment segment) { return VkSubmitInfo.get_waitSemaphoreCount(segment, 0L); } + /// {@return `waitSemaphoreCount` at the given index} + /// @param index the index + public @CType("uint32_t") int waitSemaphoreCountAt(long index) { return VkSubmitInfo.get_waitSemaphoreCount(this.segment(), index); } + /// {@return `waitSemaphoreCount`} + public @CType("uint32_t") int waitSemaphoreCount() { return VkSubmitInfo.get_waitSemaphoreCount(this.segment()); } + /// Sets `waitSemaphoreCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_waitSemaphoreCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_waitSemaphoreCount.set(segment, 0L, index, value); } + /// Sets `waitSemaphoreCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_waitSemaphoreCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubmitInfo.set_waitSemaphoreCount(segment, 0L, value); } + /// Sets `waitSemaphoreCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo waitSemaphoreCountAt(long index, @CType("uint32_t") int value) { VkSubmitInfo.set_waitSemaphoreCount(this.segment(), index, value); return this; } + /// Sets `waitSemaphoreCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo waitSemaphoreCount(@CType("uint32_t") int value) { VkSubmitInfo.set_waitSemaphoreCount(this.segment(), value); return this; } + + /// {@return `pWaitSemaphores` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pWaitSemaphores(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWaitSemaphores.get(segment, 0L, index); } + /// {@return `pWaitSemaphores`} + /// @param segment the segment of the struct + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pWaitSemaphores(MemorySegment segment) { return VkSubmitInfo.get_pWaitSemaphores(segment, 0L); } + /// {@return `pWaitSemaphores` at the given index} + /// @param index the index + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pWaitSemaphoresAt(long index) { return VkSubmitInfo.get_pWaitSemaphores(this.segment(), index); } + /// {@return `pWaitSemaphores`} + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pWaitSemaphores() { return VkSubmitInfo.get_pWaitSemaphores(this.segment()); } + /// Sets `pWaitSemaphores` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWaitSemaphores(MemorySegment segment, long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VH_pWaitSemaphores.set(segment, 0L, index, value); } + /// Sets `pWaitSemaphores` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWaitSemaphores(MemorySegment segment, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pWaitSemaphores(segment, 0L, value); } + /// Sets `pWaitSemaphores` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo pWaitSemaphoresAt(long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pWaitSemaphores(this.segment(), index, value); return this; } + /// Sets `pWaitSemaphores` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo pWaitSemaphores(@CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pWaitSemaphores(this.segment(), value); return this; } + + /// {@return `pWaitDstStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkPipelineStageFlags *") java.lang.foreign.MemorySegment get_pWaitDstStageMask(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWaitDstStageMask.get(segment, 0L, index); } + /// {@return `pWaitDstStageMask`} + /// @param segment the segment of the struct + public static @CType("const VkPipelineStageFlags *") java.lang.foreign.MemorySegment get_pWaitDstStageMask(MemorySegment segment) { return VkSubmitInfo.get_pWaitDstStageMask(segment, 0L); } + /// {@return `pWaitDstStageMask` at the given index} + /// @param index the index + public @CType("const VkPipelineStageFlags *") java.lang.foreign.MemorySegment pWaitDstStageMaskAt(long index) { return VkSubmitInfo.get_pWaitDstStageMask(this.segment(), index); } + /// {@return `pWaitDstStageMask`} + public @CType("const VkPipelineStageFlags *") java.lang.foreign.MemorySegment pWaitDstStageMask() { return VkSubmitInfo.get_pWaitDstStageMask(this.segment()); } + /// Sets `pWaitDstStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWaitDstStageMask(MemorySegment segment, long index, @CType("const VkPipelineStageFlags *") java.lang.foreign.MemorySegment value) { VH_pWaitDstStageMask.set(segment, 0L, index, value); } + /// Sets `pWaitDstStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWaitDstStageMask(MemorySegment segment, @CType("const VkPipelineStageFlags *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pWaitDstStageMask(segment, 0L, value); } + /// Sets `pWaitDstStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo pWaitDstStageMaskAt(long index, @CType("const VkPipelineStageFlags *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pWaitDstStageMask(this.segment(), index, value); return this; } + /// Sets `pWaitDstStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo pWaitDstStageMask(@CType("const VkPipelineStageFlags *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pWaitDstStageMask(this.segment(), value); return this; } + + /// {@return `commandBufferCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_commandBufferCount(MemorySegment segment, long index) { return (int) VH_commandBufferCount.get(segment, 0L, index); } + /// {@return `commandBufferCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_commandBufferCount(MemorySegment segment) { return VkSubmitInfo.get_commandBufferCount(segment, 0L); } + /// {@return `commandBufferCount` at the given index} + /// @param index the index + public @CType("uint32_t") int commandBufferCountAt(long index) { return VkSubmitInfo.get_commandBufferCount(this.segment(), index); } + /// {@return `commandBufferCount`} + public @CType("uint32_t") int commandBufferCount() { return VkSubmitInfo.get_commandBufferCount(this.segment()); } + /// Sets `commandBufferCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandBufferCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_commandBufferCount.set(segment, 0L, index, value); } + /// Sets `commandBufferCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandBufferCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubmitInfo.set_commandBufferCount(segment, 0L, value); } + /// Sets `commandBufferCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo commandBufferCountAt(long index, @CType("uint32_t") int value) { VkSubmitInfo.set_commandBufferCount(this.segment(), index, value); return this; } + /// Sets `commandBufferCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo commandBufferCount(@CType("uint32_t") int value) { VkSubmitInfo.set_commandBufferCount(this.segment(), value); return this; } + + /// {@return `pCommandBuffers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkCommandBuffer *") java.lang.foreign.MemorySegment get_pCommandBuffers(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCommandBuffers.get(segment, 0L, index); } + /// {@return `pCommandBuffers`} + /// @param segment the segment of the struct + public static @CType("const VkCommandBuffer *") java.lang.foreign.MemorySegment get_pCommandBuffers(MemorySegment segment) { return VkSubmitInfo.get_pCommandBuffers(segment, 0L); } + /// {@return `pCommandBuffers` at the given index} + /// @param index the index + public @CType("const VkCommandBuffer *") java.lang.foreign.MemorySegment pCommandBuffersAt(long index) { return VkSubmitInfo.get_pCommandBuffers(this.segment(), index); } + /// {@return `pCommandBuffers`} + public @CType("const VkCommandBuffer *") java.lang.foreign.MemorySegment pCommandBuffers() { return VkSubmitInfo.get_pCommandBuffers(this.segment()); } + /// Sets `pCommandBuffers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCommandBuffers(MemorySegment segment, long index, @CType("const VkCommandBuffer *") java.lang.foreign.MemorySegment value) { VH_pCommandBuffers.set(segment, 0L, index, value); } + /// Sets `pCommandBuffers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCommandBuffers(MemorySegment segment, @CType("const VkCommandBuffer *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pCommandBuffers(segment, 0L, value); } + /// Sets `pCommandBuffers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo pCommandBuffersAt(long index, @CType("const VkCommandBuffer *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pCommandBuffers(this.segment(), index, value); return this; } + /// Sets `pCommandBuffers` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo pCommandBuffers(@CType("const VkCommandBuffer *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pCommandBuffers(this.segment(), value); return this; } + + /// {@return `signalSemaphoreCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_signalSemaphoreCount(MemorySegment segment, long index) { return (int) VH_signalSemaphoreCount.get(segment, 0L, index); } + /// {@return `signalSemaphoreCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_signalSemaphoreCount(MemorySegment segment) { return VkSubmitInfo.get_signalSemaphoreCount(segment, 0L); } + /// {@return `signalSemaphoreCount` at the given index} + /// @param index the index + public @CType("uint32_t") int signalSemaphoreCountAt(long index) { return VkSubmitInfo.get_signalSemaphoreCount(this.segment(), index); } + /// {@return `signalSemaphoreCount`} + public @CType("uint32_t") int signalSemaphoreCount() { return VkSubmitInfo.get_signalSemaphoreCount(this.segment()); } + /// Sets `signalSemaphoreCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_signalSemaphoreCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_signalSemaphoreCount.set(segment, 0L, index, value); } + /// Sets `signalSemaphoreCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_signalSemaphoreCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubmitInfo.set_signalSemaphoreCount(segment, 0L, value); } + /// Sets `signalSemaphoreCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo signalSemaphoreCountAt(long index, @CType("uint32_t") int value) { VkSubmitInfo.set_signalSemaphoreCount(this.segment(), index, value); return this; } + /// Sets `signalSemaphoreCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo signalSemaphoreCount(@CType("uint32_t") int value) { VkSubmitInfo.set_signalSemaphoreCount(this.segment(), value); return this; } + + /// {@return `pSignalSemaphores` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pSignalSemaphores(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSignalSemaphores.get(segment, 0L, index); } + /// {@return `pSignalSemaphores`} + /// @param segment the segment of the struct + public static @CType("const VkSemaphore *") java.lang.foreign.MemorySegment get_pSignalSemaphores(MemorySegment segment) { return VkSubmitInfo.get_pSignalSemaphores(segment, 0L); } + /// {@return `pSignalSemaphores` at the given index} + /// @param index the index + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pSignalSemaphoresAt(long index) { return VkSubmitInfo.get_pSignalSemaphores(this.segment(), index); } + /// {@return `pSignalSemaphores`} + public @CType("const VkSemaphore *") java.lang.foreign.MemorySegment pSignalSemaphores() { return VkSubmitInfo.get_pSignalSemaphores(this.segment()); } + /// Sets `pSignalSemaphores` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSignalSemaphores(MemorySegment segment, long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VH_pSignalSemaphores.set(segment, 0L, index, value); } + /// Sets `pSignalSemaphores` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSignalSemaphores(MemorySegment segment, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pSignalSemaphores(segment, 0L, value); } + /// Sets `pSignalSemaphores` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo pSignalSemaphoresAt(long index, @CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pSignalSemaphores(this.segment(), index, value); return this; } + /// Sets `pSignalSemaphores` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo pSignalSemaphores(@CType("const VkSemaphore *") java.lang.foreign.MemorySegment value) { VkSubmitInfo.set_pSignalSemaphores(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubmitInfo2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubmitInfo2.java new file mode 100644 index 00000000..74297888 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubmitInfo2.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### waitSemaphoreInfoCount +/// [VarHandle][#VH_waitSemaphoreInfoCount] - [Getter][#waitSemaphoreInfoCount()] - [Setter][#waitSemaphoreInfoCount(int)] +/// ### pWaitSemaphoreInfos +/// [VarHandle][#VH_pWaitSemaphoreInfos] - [Getter][#pWaitSemaphoreInfos()] - [Setter][#pWaitSemaphoreInfos(java.lang.foreign.MemorySegment)] +/// ### commandBufferInfoCount +/// [VarHandle][#VH_commandBufferInfoCount] - [Getter][#commandBufferInfoCount()] - [Setter][#commandBufferInfoCount(int)] +/// ### pCommandBufferInfos +/// [VarHandle][#VH_pCommandBufferInfos] - [Getter][#pCommandBufferInfos()] - [Setter][#pCommandBufferInfos(java.lang.foreign.MemorySegment)] +/// ### signalSemaphoreInfoCount +/// [VarHandle][#VH_signalSemaphoreInfoCount] - [Getter][#signalSemaphoreInfoCount()] - [Setter][#signalSemaphoreInfoCount(int)] +/// ### pSignalSemaphoreInfos +/// [VarHandle][#VH_pSignalSemaphoreInfos] - [Getter][#pSignalSemaphoreInfos()] - [Setter][#pSignalSemaphoreInfos(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubmitInfo2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkSubmitFlags flags; +/// uint32_t waitSemaphoreInfoCount; +/// const VkSemaphoreSubmitInfo * pWaitSemaphoreInfos; +/// uint32_t commandBufferInfoCount; +/// const VkCommandBufferSubmitInfo * pCommandBufferInfos; +/// uint32_t signalSemaphoreInfoCount; +/// const VkSemaphoreSubmitInfo * pSignalSemaphoreInfos; +/// } VkSubmitInfo2; +/// ``` +public final class VkSubmitInfo2 extends Struct { + /// The struct layout of `VkSubmitInfo2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("waitSemaphoreInfoCount"), + ValueLayout.ADDRESS.withName("pWaitSemaphoreInfos"), + ValueLayout.JAVA_INT.withName("commandBufferInfoCount"), + ValueLayout.ADDRESS.withName("pCommandBufferInfos"), + ValueLayout.JAVA_INT.withName("signalSemaphoreInfoCount"), + ValueLayout.ADDRESS.withName("pSignalSemaphoreInfos") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `waitSemaphoreInfoCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_waitSemaphoreInfoCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("waitSemaphoreInfoCount")); + /// The [VarHandle] of `pWaitSemaphoreInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWaitSemaphoreInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWaitSemaphoreInfos")); + /// The [VarHandle] of `commandBufferInfoCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_commandBufferInfoCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("commandBufferInfoCount")); + /// The [VarHandle] of `pCommandBufferInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCommandBufferInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCommandBufferInfos")); + /// The [VarHandle] of `signalSemaphoreInfoCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_signalSemaphoreInfoCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("signalSemaphoreInfoCount")); + /// The [VarHandle] of `pSignalSemaphoreInfos` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSignalSemaphoreInfos = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSignalSemaphoreInfos")); + + /// Creates `VkSubmitInfo2` with the given segment. + /// @param segment the memory segment + public VkSubmitInfo2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubmitInfo2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubmitInfo2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubmitInfo2(segment); } + + /// Creates `VkSubmitInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubmitInfo2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubmitInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubmitInfo2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubmitInfo2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubmitInfo2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubmitInfo2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubmitInfo2` + public static VkSubmitInfo2 alloc(SegmentAllocator allocator) { return new VkSubmitInfo2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubmitInfo2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubmitInfo2` + public static VkSubmitInfo2 alloc(SegmentAllocator allocator, long count) { return new VkSubmitInfo2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubmitInfo2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubmitInfo2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubmitInfo2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubmitInfo2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo2 sTypeAt(long index, @CType("VkStructureType") int value) { VkSubmitInfo2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo2 sType(@CType("VkStructureType") int value) { VkSubmitInfo2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubmitInfo2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubmitInfo2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSubmitInfo2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSubmitFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSubmitFlags") int get_flags(MemorySegment segment) { return VkSubmitInfo2.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSubmitFlags") int flagsAt(long index) { return VkSubmitInfo2.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSubmitFlags") int flags() { return VkSubmitInfo2.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSubmitFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSubmitFlags") int value) { VkSubmitInfo2.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo2 flagsAt(long index, @CType("VkSubmitFlags") int value) { VkSubmitInfo2.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo2 flags(@CType("VkSubmitFlags") int value) { VkSubmitInfo2.set_flags(this.segment(), value); return this; } + + /// {@return `waitSemaphoreInfoCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_waitSemaphoreInfoCount(MemorySegment segment, long index) { return (int) VH_waitSemaphoreInfoCount.get(segment, 0L, index); } + /// {@return `waitSemaphoreInfoCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_waitSemaphoreInfoCount(MemorySegment segment) { return VkSubmitInfo2.get_waitSemaphoreInfoCount(segment, 0L); } + /// {@return `waitSemaphoreInfoCount` at the given index} + /// @param index the index + public @CType("uint32_t") int waitSemaphoreInfoCountAt(long index) { return VkSubmitInfo2.get_waitSemaphoreInfoCount(this.segment(), index); } + /// {@return `waitSemaphoreInfoCount`} + public @CType("uint32_t") int waitSemaphoreInfoCount() { return VkSubmitInfo2.get_waitSemaphoreInfoCount(this.segment()); } + /// Sets `waitSemaphoreInfoCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_waitSemaphoreInfoCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_waitSemaphoreInfoCount.set(segment, 0L, index, value); } + /// Sets `waitSemaphoreInfoCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_waitSemaphoreInfoCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubmitInfo2.set_waitSemaphoreInfoCount(segment, 0L, value); } + /// Sets `waitSemaphoreInfoCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo2 waitSemaphoreInfoCountAt(long index, @CType("uint32_t") int value) { VkSubmitInfo2.set_waitSemaphoreInfoCount(this.segment(), index, value); return this; } + /// Sets `waitSemaphoreInfoCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo2 waitSemaphoreInfoCount(@CType("uint32_t") int value) { VkSubmitInfo2.set_waitSemaphoreInfoCount(this.segment(), value); return this; } + + /// {@return `pWaitSemaphoreInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment get_pWaitSemaphoreInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWaitSemaphoreInfos.get(segment, 0L, index); } + /// {@return `pWaitSemaphoreInfos`} + /// @param segment the segment of the struct + public static @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment get_pWaitSemaphoreInfos(MemorySegment segment) { return VkSubmitInfo2.get_pWaitSemaphoreInfos(segment, 0L); } + /// {@return `pWaitSemaphoreInfos` at the given index} + /// @param index the index + public @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment pWaitSemaphoreInfosAt(long index) { return VkSubmitInfo2.get_pWaitSemaphoreInfos(this.segment(), index); } + /// {@return `pWaitSemaphoreInfos`} + public @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment pWaitSemaphoreInfos() { return VkSubmitInfo2.get_pWaitSemaphoreInfos(this.segment()); } + /// Sets `pWaitSemaphoreInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWaitSemaphoreInfos(MemorySegment segment, long index, @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VH_pWaitSemaphoreInfos.set(segment, 0L, index, value); } + /// Sets `pWaitSemaphoreInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWaitSemaphoreInfos(MemorySegment segment, @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pWaitSemaphoreInfos(segment, 0L, value); } + /// Sets `pWaitSemaphoreInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo2 pWaitSemaphoreInfosAt(long index, @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pWaitSemaphoreInfos(this.segment(), index, value); return this; } + /// Sets `pWaitSemaphoreInfos` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo2 pWaitSemaphoreInfos(@CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pWaitSemaphoreInfos(this.segment(), value); return this; } + + /// {@return `commandBufferInfoCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_commandBufferInfoCount(MemorySegment segment, long index) { return (int) VH_commandBufferInfoCount.get(segment, 0L, index); } + /// {@return `commandBufferInfoCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_commandBufferInfoCount(MemorySegment segment) { return VkSubmitInfo2.get_commandBufferInfoCount(segment, 0L); } + /// {@return `commandBufferInfoCount` at the given index} + /// @param index the index + public @CType("uint32_t") int commandBufferInfoCountAt(long index) { return VkSubmitInfo2.get_commandBufferInfoCount(this.segment(), index); } + /// {@return `commandBufferInfoCount`} + public @CType("uint32_t") int commandBufferInfoCount() { return VkSubmitInfo2.get_commandBufferInfoCount(this.segment()); } + /// Sets `commandBufferInfoCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_commandBufferInfoCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_commandBufferInfoCount.set(segment, 0L, index, value); } + /// Sets `commandBufferInfoCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_commandBufferInfoCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubmitInfo2.set_commandBufferInfoCount(segment, 0L, value); } + /// Sets `commandBufferInfoCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo2 commandBufferInfoCountAt(long index, @CType("uint32_t") int value) { VkSubmitInfo2.set_commandBufferInfoCount(this.segment(), index, value); return this; } + /// Sets `commandBufferInfoCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo2 commandBufferInfoCount(@CType("uint32_t") int value) { VkSubmitInfo2.set_commandBufferInfoCount(this.segment(), value); return this; } + + /// {@return `pCommandBufferInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkCommandBufferSubmitInfo *") java.lang.foreign.MemorySegment get_pCommandBufferInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCommandBufferInfos.get(segment, 0L, index); } + /// {@return `pCommandBufferInfos`} + /// @param segment the segment of the struct + public static @CType("const VkCommandBufferSubmitInfo *") java.lang.foreign.MemorySegment get_pCommandBufferInfos(MemorySegment segment) { return VkSubmitInfo2.get_pCommandBufferInfos(segment, 0L); } + /// {@return `pCommandBufferInfos` at the given index} + /// @param index the index + public @CType("const VkCommandBufferSubmitInfo *") java.lang.foreign.MemorySegment pCommandBufferInfosAt(long index) { return VkSubmitInfo2.get_pCommandBufferInfos(this.segment(), index); } + /// {@return `pCommandBufferInfos`} + public @CType("const VkCommandBufferSubmitInfo *") java.lang.foreign.MemorySegment pCommandBufferInfos() { return VkSubmitInfo2.get_pCommandBufferInfos(this.segment()); } + /// Sets `pCommandBufferInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCommandBufferInfos(MemorySegment segment, long index, @CType("const VkCommandBufferSubmitInfo *") java.lang.foreign.MemorySegment value) { VH_pCommandBufferInfos.set(segment, 0L, index, value); } + /// Sets `pCommandBufferInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCommandBufferInfos(MemorySegment segment, @CType("const VkCommandBufferSubmitInfo *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pCommandBufferInfos(segment, 0L, value); } + /// Sets `pCommandBufferInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo2 pCommandBufferInfosAt(long index, @CType("const VkCommandBufferSubmitInfo *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pCommandBufferInfos(this.segment(), index, value); return this; } + /// Sets `pCommandBufferInfos` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo2 pCommandBufferInfos(@CType("const VkCommandBufferSubmitInfo *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pCommandBufferInfos(this.segment(), value); return this; } + + /// {@return `signalSemaphoreInfoCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_signalSemaphoreInfoCount(MemorySegment segment, long index) { return (int) VH_signalSemaphoreInfoCount.get(segment, 0L, index); } + /// {@return `signalSemaphoreInfoCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_signalSemaphoreInfoCount(MemorySegment segment) { return VkSubmitInfo2.get_signalSemaphoreInfoCount(segment, 0L); } + /// {@return `signalSemaphoreInfoCount` at the given index} + /// @param index the index + public @CType("uint32_t") int signalSemaphoreInfoCountAt(long index) { return VkSubmitInfo2.get_signalSemaphoreInfoCount(this.segment(), index); } + /// {@return `signalSemaphoreInfoCount`} + public @CType("uint32_t") int signalSemaphoreInfoCount() { return VkSubmitInfo2.get_signalSemaphoreInfoCount(this.segment()); } + /// Sets `signalSemaphoreInfoCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_signalSemaphoreInfoCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_signalSemaphoreInfoCount.set(segment, 0L, index, value); } + /// Sets `signalSemaphoreInfoCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_signalSemaphoreInfoCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubmitInfo2.set_signalSemaphoreInfoCount(segment, 0L, value); } + /// Sets `signalSemaphoreInfoCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo2 signalSemaphoreInfoCountAt(long index, @CType("uint32_t") int value) { VkSubmitInfo2.set_signalSemaphoreInfoCount(this.segment(), index, value); return this; } + /// Sets `signalSemaphoreInfoCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo2 signalSemaphoreInfoCount(@CType("uint32_t") int value) { VkSubmitInfo2.set_signalSemaphoreInfoCount(this.segment(), value); return this; } + + /// {@return `pSignalSemaphoreInfos` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment get_pSignalSemaphoreInfos(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSignalSemaphoreInfos.get(segment, 0L, index); } + /// {@return `pSignalSemaphoreInfos`} + /// @param segment the segment of the struct + public static @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment get_pSignalSemaphoreInfos(MemorySegment segment) { return VkSubmitInfo2.get_pSignalSemaphoreInfos(segment, 0L); } + /// {@return `pSignalSemaphoreInfos` at the given index} + /// @param index the index + public @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment pSignalSemaphoreInfosAt(long index) { return VkSubmitInfo2.get_pSignalSemaphoreInfos(this.segment(), index); } + /// {@return `pSignalSemaphoreInfos`} + public @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment pSignalSemaphoreInfos() { return VkSubmitInfo2.get_pSignalSemaphoreInfos(this.segment()); } + /// Sets `pSignalSemaphoreInfos` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSignalSemaphoreInfos(MemorySegment segment, long index, @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VH_pSignalSemaphoreInfos.set(segment, 0L, index, value); } + /// Sets `pSignalSemaphoreInfos` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSignalSemaphoreInfos(MemorySegment segment, @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pSignalSemaphoreInfos(segment, 0L, value); } + /// Sets `pSignalSemaphoreInfos` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubmitInfo2 pSignalSemaphoreInfosAt(long index, @CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pSignalSemaphoreInfos(this.segment(), index, value); return this; } + /// Sets `pSignalSemaphoreInfos` with the given value. + /// @param value the value + /// @return `this` + public VkSubmitInfo2 pSignalSemaphoreInfos(@CType("const VkSemaphoreSubmitInfo *") java.lang.foreign.MemorySegment value) { VkSubmitInfo2.set_pSignalSemaphoreInfos(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassBeginInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassBeginInfo.java new file mode 100644 index 00000000..9cc78368 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassBeginInfo.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### contents +/// [VarHandle][#VH_contents] - [Getter][#contents()] - [Setter][#contents(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassBeginInfo { +/// VkStructureType sType; +/// const void * pNext; +/// VkSubpassContents contents; +/// } VkSubpassBeginInfo; +/// ``` +public final class VkSubpassBeginInfo extends Struct { + /// The struct layout of `VkSubpassBeginInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("contents") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `contents` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_contents = LAYOUT.arrayElementVarHandle(PathElement.groupElement("contents")); + + /// Creates `VkSubpassBeginInfo` with the given segment. + /// @param segment the memory segment + public VkSubpassBeginInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassBeginInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassBeginInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassBeginInfo(segment); } + + /// Creates `VkSubpassBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassBeginInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassBeginInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassBeginInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassBeginInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassBeginInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassBeginInfo` + public static VkSubpassBeginInfo alloc(SegmentAllocator allocator) { return new VkSubpassBeginInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassBeginInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassBeginInfo` + public static VkSubpassBeginInfo alloc(SegmentAllocator allocator, long count) { return new VkSubpassBeginInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubpassBeginInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubpassBeginInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubpassBeginInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubpassBeginInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassBeginInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSubpassBeginInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassBeginInfo sType(@CType("VkStructureType") int value) { VkSubpassBeginInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubpassBeginInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubpassBeginInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSubpassBeginInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassBeginInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassBeginInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassBeginInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassBeginInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassBeginInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `contents` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSubpassContents") int get_contents(MemorySegment segment, long index) { return (int) VH_contents.get(segment, 0L, index); } + /// {@return `contents`} + /// @param segment the segment of the struct + public static @CType("VkSubpassContents") int get_contents(MemorySegment segment) { return VkSubpassBeginInfo.get_contents(segment, 0L); } + /// {@return `contents` at the given index} + /// @param index the index + public @CType("VkSubpassContents") int contentsAt(long index) { return VkSubpassBeginInfo.get_contents(this.segment(), index); } + /// {@return `contents`} + public @CType("VkSubpassContents") int contents() { return VkSubpassBeginInfo.get_contents(this.segment()); } + /// Sets `contents` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_contents(MemorySegment segment, long index, @CType("VkSubpassContents") int value) { VH_contents.set(segment, 0L, index, value); } + /// Sets `contents` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_contents(MemorySegment segment, @CType("VkSubpassContents") int value) { VkSubpassBeginInfo.set_contents(segment, 0L, value); } + /// Sets `contents` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassBeginInfo contentsAt(long index, @CType("VkSubpassContents") int value) { VkSubpassBeginInfo.set_contents(this.segment(), index, value); return this; } + /// Sets `contents` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassBeginInfo contents(@CType("VkSubpassContents") int value) { VkSubpassBeginInfo.set_contents(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDependency.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDependency.java new file mode 100644 index 00000000..774a6fff --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDependency.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### srcSubpass +/// [VarHandle][#VH_srcSubpass] - [Getter][#srcSubpass()] - [Setter][#srcSubpass(int)] +/// ### dstSubpass +/// [VarHandle][#VH_dstSubpass] - [Getter][#dstSubpass()] - [Setter][#dstSubpass(int)] +/// ### srcStageMask +/// [VarHandle][#VH_srcStageMask] - [Getter][#srcStageMask()] - [Setter][#srcStageMask(int)] +/// ### dstStageMask +/// [VarHandle][#VH_dstStageMask] - [Getter][#dstStageMask()] - [Setter][#dstStageMask(int)] +/// ### srcAccessMask +/// [VarHandle][#VH_srcAccessMask] - [Getter][#srcAccessMask()] - [Setter][#srcAccessMask(int)] +/// ### dstAccessMask +/// [VarHandle][#VH_dstAccessMask] - [Getter][#dstAccessMask()] - [Setter][#dstAccessMask(int)] +/// ### dependencyFlags +/// [VarHandle][#VH_dependencyFlags] - [Getter][#dependencyFlags()] - [Setter][#dependencyFlags(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassDependency { +/// uint32_t srcSubpass; +/// uint32_t dstSubpass; +/// VkPipelineStageFlags srcStageMask; +/// VkPipelineStageFlags dstStageMask; +/// VkAccessFlags srcAccessMask; +/// VkAccessFlags dstAccessMask; +/// VkDependencyFlags dependencyFlags; +/// } VkSubpassDependency; +/// ``` +public final class VkSubpassDependency extends Struct { + /// The struct layout of `VkSubpassDependency`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("srcSubpass"), + ValueLayout.JAVA_INT.withName("dstSubpass"), + ValueLayout.JAVA_INT.withName("srcStageMask"), + ValueLayout.JAVA_INT.withName("dstStageMask"), + ValueLayout.JAVA_INT.withName("srcAccessMask"), + ValueLayout.JAVA_INT.withName("dstAccessMask"), + ValueLayout.JAVA_INT.withName("dependencyFlags") + ); + /// The [VarHandle] of `srcSubpass` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcSubpass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcSubpass")); + /// The [VarHandle] of `dstSubpass` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstSubpass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstSubpass")); + /// The [VarHandle] of `srcStageMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcStageMask")); + /// The [VarHandle] of `dstStageMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstStageMask")); + /// The [VarHandle] of `srcAccessMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAccessMask")); + /// The [VarHandle] of `dstAccessMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAccessMask")); + /// The [VarHandle] of `dependencyFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dependencyFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dependencyFlags")); + + /// Creates `VkSubpassDependency` with the given segment. + /// @param segment the memory segment + public VkSubpassDependency(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassDependency` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDependency of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDependency(segment); } + + /// Creates `VkSubpassDependency` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDependency ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDependency(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassDependency` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDependency ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDependency(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassDependency` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassDependency` + public static VkSubpassDependency alloc(SegmentAllocator allocator) { return new VkSubpassDependency(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassDependency` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassDependency` + public static VkSubpassDependency alloc(SegmentAllocator allocator, long count) { return new VkSubpassDependency(allocator.allocate(LAYOUT, count)); } + + /// {@return `srcSubpass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_srcSubpass(MemorySegment segment, long index) { return (int) VH_srcSubpass.get(segment, 0L, index); } + /// {@return `srcSubpass`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_srcSubpass(MemorySegment segment) { return VkSubpassDependency.get_srcSubpass(segment, 0L); } + /// {@return `srcSubpass` at the given index} + /// @param index the index + public @CType("uint32_t") int srcSubpassAt(long index) { return VkSubpassDependency.get_srcSubpass(this.segment(), index); } + /// {@return `srcSubpass`} + public @CType("uint32_t") int srcSubpass() { return VkSubpassDependency.get_srcSubpass(this.segment()); } + /// Sets `srcSubpass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcSubpass(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_srcSubpass.set(segment, 0L, index, value); } + /// Sets `srcSubpass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcSubpass(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDependency.set_srcSubpass(segment, 0L, value); } + /// Sets `srcSubpass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency srcSubpassAt(long index, @CType("uint32_t") int value) { VkSubpassDependency.set_srcSubpass(this.segment(), index, value); return this; } + /// Sets `srcSubpass` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency srcSubpass(@CType("uint32_t") int value) { VkSubpassDependency.set_srcSubpass(this.segment(), value); return this; } + + /// {@return `dstSubpass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstSubpass(MemorySegment segment, long index) { return (int) VH_dstSubpass.get(segment, 0L, index); } + /// {@return `dstSubpass`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstSubpass(MemorySegment segment) { return VkSubpassDependency.get_dstSubpass(segment, 0L); } + /// {@return `dstSubpass` at the given index} + /// @param index the index + public @CType("uint32_t") int dstSubpassAt(long index) { return VkSubpassDependency.get_dstSubpass(this.segment(), index); } + /// {@return `dstSubpass`} + public @CType("uint32_t") int dstSubpass() { return VkSubpassDependency.get_dstSubpass(this.segment()); } + /// Sets `dstSubpass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstSubpass(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstSubpass.set(segment, 0L, index, value); } + /// Sets `dstSubpass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstSubpass(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDependency.set_dstSubpass(segment, 0L, value); } + /// Sets `dstSubpass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency dstSubpassAt(long index, @CType("uint32_t") int value) { VkSubpassDependency.set_dstSubpass(this.segment(), index, value); return this; } + /// Sets `dstSubpass` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency dstSubpass(@CType("uint32_t") int value) { VkSubpassDependency.set_dstSubpass(this.segment(), value); return this; } + + /// {@return `srcStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags") int get_srcStageMask(MemorySegment segment, long index) { return (int) VH_srcStageMask.get(segment, 0L, index); } + /// {@return `srcStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags") int get_srcStageMask(MemorySegment segment) { return VkSubpassDependency.get_srcStageMask(segment, 0L); } + /// {@return `srcStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags") int srcStageMaskAt(long index) { return VkSubpassDependency.get_srcStageMask(this.segment(), index); } + /// {@return `srcStageMask`} + public @CType("VkPipelineStageFlags") int srcStageMask() { return VkSubpassDependency.get_srcStageMask(this.segment()); } + /// Sets `srcStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags") int value) { VH_srcStageMask.set(segment, 0L, index, value); } + /// Sets `srcStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcStageMask(MemorySegment segment, @CType("VkPipelineStageFlags") int value) { VkSubpassDependency.set_srcStageMask(segment, 0L, value); } + /// Sets `srcStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency srcStageMaskAt(long index, @CType("VkPipelineStageFlags") int value) { VkSubpassDependency.set_srcStageMask(this.segment(), index, value); return this; } + /// Sets `srcStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency srcStageMask(@CType("VkPipelineStageFlags") int value) { VkSubpassDependency.set_srcStageMask(this.segment(), value); return this; } + + /// {@return `dstStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags") int get_dstStageMask(MemorySegment segment, long index) { return (int) VH_dstStageMask.get(segment, 0L, index); } + /// {@return `dstStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags") int get_dstStageMask(MemorySegment segment) { return VkSubpassDependency.get_dstStageMask(segment, 0L); } + /// {@return `dstStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags") int dstStageMaskAt(long index) { return VkSubpassDependency.get_dstStageMask(this.segment(), index); } + /// {@return `dstStageMask`} + public @CType("VkPipelineStageFlags") int dstStageMask() { return VkSubpassDependency.get_dstStageMask(this.segment()); } + /// Sets `dstStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags") int value) { VH_dstStageMask.set(segment, 0L, index, value); } + /// Sets `dstStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstStageMask(MemorySegment segment, @CType("VkPipelineStageFlags") int value) { VkSubpassDependency.set_dstStageMask(segment, 0L, value); } + /// Sets `dstStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency dstStageMaskAt(long index, @CType("VkPipelineStageFlags") int value) { VkSubpassDependency.set_dstStageMask(this.segment(), index, value); return this; } + /// Sets `dstStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency dstStageMask(@CType("VkPipelineStageFlags") int value) { VkSubpassDependency.set_dstStageMask(this.segment(), value); return this; } + + /// {@return `srcAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags") int get_srcAccessMask(MemorySegment segment, long index) { return (int) VH_srcAccessMask.get(segment, 0L, index); } + /// {@return `srcAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags") int get_srcAccessMask(MemorySegment segment) { return VkSubpassDependency.get_srcAccessMask(segment, 0L); } + /// {@return `srcAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags") int srcAccessMaskAt(long index) { return VkSubpassDependency.get_srcAccessMask(this.segment(), index); } + /// {@return `srcAccessMask`} + public @CType("VkAccessFlags") int srcAccessMask() { return VkSubpassDependency.get_srcAccessMask(this.segment()); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags") int value) { VH_srcAccessMask.set(segment, 0L, index, value); } + /// Sets `srcAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, @CType("VkAccessFlags") int value) { VkSubpassDependency.set_srcAccessMask(segment, 0L, value); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency srcAccessMaskAt(long index, @CType("VkAccessFlags") int value) { VkSubpassDependency.set_srcAccessMask(this.segment(), index, value); return this; } + /// Sets `srcAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency srcAccessMask(@CType("VkAccessFlags") int value) { VkSubpassDependency.set_srcAccessMask(this.segment(), value); return this; } + + /// {@return `dstAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags") int get_dstAccessMask(MemorySegment segment, long index) { return (int) VH_dstAccessMask.get(segment, 0L, index); } + /// {@return `dstAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags") int get_dstAccessMask(MemorySegment segment) { return VkSubpassDependency.get_dstAccessMask(segment, 0L); } + /// {@return `dstAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags") int dstAccessMaskAt(long index) { return VkSubpassDependency.get_dstAccessMask(this.segment(), index); } + /// {@return `dstAccessMask`} + public @CType("VkAccessFlags") int dstAccessMask() { return VkSubpassDependency.get_dstAccessMask(this.segment()); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags") int value) { VH_dstAccessMask.set(segment, 0L, index, value); } + /// Sets `dstAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, @CType("VkAccessFlags") int value) { VkSubpassDependency.set_dstAccessMask(segment, 0L, value); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency dstAccessMaskAt(long index, @CType("VkAccessFlags") int value) { VkSubpassDependency.set_dstAccessMask(this.segment(), index, value); return this; } + /// Sets `dstAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency dstAccessMask(@CType("VkAccessFlags") int value) { VkSubpassDependency.set_dstAccessMask(this.segment(), value); return this; } + + /// {@return `dependencyFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDependencyFlags") int get_dependencyFlags(MemorySegment segment, long index) { return (int) VH_dependencyFlags.get(segment, 0L, index); } + /// {@return `dependencyFlags`} + /// @param segment the segment of the struct + public static @CType("VkDependencyFlags") int get_dependencyFlags(MemorySegment segment) { return VkSubpassDependency.get_dependencyFlags(segment, 0L); } + /// {@return `dependencyFlags` at the given index} + /// @param index the index + public @CType("VkDependencyFlags") int dependencyFlagsAt(long index) { return VkSubpassDependency.get_dependencyFlags(this.segment(), index); } + /// {@return `dependencyFlags`} + public @CType("VkDependencyFlags") int dependencyFlags() { return VkSubpassDependency.get_dependencyFlags(this.segment()); } + /// Sets `dependencyFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dependencyFlags(MemorySegment segment, long index, @CType("VkDependencyFlags") int value) { VH_dependencyFlags.set(segment, 0L, index, value); } + /// Sets `dependencyFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dependencyFlags(MemorySegment segment, @CType("VkDependencyFlags") int value) { VkSubpassDependency.set_dependencyFlags(segment, 0L, value); } + /// Sets `dependencyFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency dependencyFlagsAt(long index, @CType("VkDependencyFlags") int value) { VkSubpassDependency.set_dependencyFlags(this.segment(), index, value); return this; } + /// Sets `dependencyFlags` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency dependencyFlags(@CType("VkDependencyFlags") int value) { VkSubpassDependency.set_dependencyFlags(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDependency2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDependency2.java new file mode 100644 index 00000000..968aaaed --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDependency2.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### srcSubpass +/// [VarHandle][#VH_srcSubpass] - [Getter][#srcSubpass()] - [Setter][#srcSubpass(int)] +/// ### dstSubpass +/// [VarHandle][#VH_dstSubpass] - [Getter][#dstSubpass()] - [Setter][#dstSubpass(int)] +/// ### srcStageMask +/// [VarHandle][#VH_srcStageMask] - [Getter][#srcStageMask()] - [Setter][#srcStageMask(int)] +/// ### dstStageMask +/// [VarHandle][#VH_dstStageMask] - [Getter][#dstStageMask()] - [Setter][#dstStageMask(int)] +/// ### srcAccessMask +/// [VarHandle][#VH_srcAccessMask] - [Getter][#srcAccessMask()] - [Setter][#srcAccessMask(int)] +/// ### dstAccessMask +/// [VarHandle][#VH_dstAccessMask] - [Getter][#dstAccessMask()] - [Setter][#dstAccessMask(int)] +/// ### dependencyFlags +/// [VarHandle][#VH_dependencyFlags] - [Getter][#dependencyFlags()] - [Setter][#dependencyFlags(int)] +/// ### viewOffset +/// [VarHandle][#VH_viewOffset] - [Getter][#viewOffset()] - [Setter][#viewOffset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassDependency2 { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t srcSubpass; +/// uint32_t dstSubpass; +/// VkPipelineStageFlags srcStageMask; +/// VkPipelineStageFlags dstStageMask; +/// VkAccessFlags srcAccessMask; +/// VkAccessFlags dstAccessMask; +/// VkDependencyFlags dependencyFlags; +/// int32_t viewOffset; +/// } VkSubpassDependency2; +/// ``` +public final class VkSubpassDependency2 extends Struct { + /// The struct layout of `VkSubpassDependency2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("srcSubpass"), + ValueLayout.JAVA_INT.withName("dstSubpass"), + ValueLayout.JAVA_INT.withName("srcStageMask"), + ValueLayout.JAVA_INT.withName("dstStageMask"), + ValueLayout.JAVA_INT.withName("srcAccessMask"), + ValueLayout.JAVA_INT.withName("dstAccessMask"), + ValueLayout.JAVA_INT.withName("dependencyFlags"), + ValueLayout.JAVA_INT.withName("viewOffset") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `srcSubpass` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcSubpass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcSubpass")); + /// The [VarHandle] of `dstSubpass` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstSubpass = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstSubpass")); + /// The [VarHandle] of `srcStageMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcStageMask")); + /// The [VarHandle] of `dstStageMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstStageMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstStageMask")); + /// The [VarHandle] of `srcAccessMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_srcAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("srcAccessMask")); + /// The [VarHandle] of `dstAccessMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstAccessMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstAccessMask")); + /// The [VarHandle] of `dependencyFlags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dependencyFlags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dependencyFlags")); + /// The [VarHandle] of `viewOffset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewOffset")); + + /// Creates `VkSubpassDependency2` with the given segment. + /// @param segment the memory segment + public VkSubpassDependency2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassDependency2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDependency2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDependency2(segment); } + + /// Creates `VkSubpassDependency2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDependency2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDependency2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassDependency2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDependency2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDependency2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassDependency2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassDependency2` + public static VkSubpassDependency2 alloc(SegmentAllocator allocator) { return new VkSubpassDependency2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassDependency2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassDependency2` + public static VkSubpassDependency2 alloc(SegmentAllocator allocator, long count) { return new VkSubpassDependency2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubpassDependency2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubpassDependency2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubpassDependency2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubpassDependency2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency2 sTypeAt(long index, @CType("VkStructureType") int value) { VkSubpassDependency2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency2 sType(@CType("VkStructureType") int value) { VkSubpassDependency2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubpassDependency2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubpassDependency2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSubpassDependency2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassDependency2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassDependency2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassDependency2.set_pNext(this.segment(), value); return this; } + + /// {@return `srcSubpass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_srcSubpass(MemorySegment segment, long index) { return (int) VH_srcSubpass.get(segment, 0L, index); } + /// {@return `srcSubpass`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_srcSubpass(MemorySegment segment) { return VkSubpassDependency2.get_srcSubpass(segment, 0L); } + /// {@return `srcSubpass` at the given index} + /// @param index the index + public @CType("uint32_t") int srcSubpassAt(long index) { return VkSubpassDependency2.get_srcSubpass(this.segment(), index); } + /// {@return `srcSubpass`} + public @CType("uint32_t") int srcSubpass() { return VkSubpassDependency2.get_srcSubpass(this.segment()); } + /// Sets `srcSubpass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcSubpass(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_srcSubpass.set(segment, 0L, index, value); } + /// Sets `srcSubpass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcSubpass(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDependency2.set_srcSubpass(segment, 0L, value); } + /// Sets `srcSubpass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency2 srcSubpassAt(long index, @CType("uint32_t") int value) { VkSubpassDependency2.set_srcSubpass(this.segment(), index, value); return this; } + /// Sets `srcSubpass` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency2 srcSubpass(@CType("uint32_t") int value) { VkSubpassDependency2.set_srcSubpass(this.segment(), value); return this; } + + /// {@return `dstSubpass` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstSubpass(MemorySegment segment, long index) { return (int) VH_dstSubpass.get(segment, 0L, index); } + /// {@return `dstSubpass`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstSubpass(MemorySegment segment) { return VkSubpassDependency2.get_dstSubpass(segment, 0L); } + /// {@return `dstSubpass` at the given index} + /// @param index the index + public @CType("uint32_t") int dstSubpassAt(long index) { return VkSubpassDependency2.get_dstSubpass(this.segment(), index); } + /// {@return `dstSubpass`} + public @CType("uint32_t") int dstSubpass() { return VkSubpassDependency2.get_dstSubpass(this.segment()); } + /// Sets `dstSubpass` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstSubpass(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstSubpass.set(segment, 0L, index, value); } + /// Sets `dstSubpass` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstSubpass(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDependency2.set_dstSubpass(segment, 0L, value); } + /// Sets `dstSubpass` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency2 dstSubpassAt(long index, @CType("uint32_t") int value) { VkSubpassDependency2.set_dstSubpass(this.segment(), index, value); return this; } + /// Sets `dstSubpass` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency2 dstSubpass(@CType("uint32_t") int value) { VkSubpassDependency2.set_dstSubpass(this.segment(), value); return this; } + + /// {@return `srcStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags") int get_srcStageMask(MemorySegment segment, long index) { return (int) VH_srcStageMask.get(segment, 0L, index); } + /// {@return `srcStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags") int get_srcStageMask(MemorySegment segment) { return VkSubpassDependency2.get_srcStageMask(segment, 0L); } + /// {@return `srcStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags") int srcStageMaskAt(long index) { return VkSubpassDependency2.get_srcStageMask(this.segment(), index); } + /// {@return `srcStageMask`} + public @CType("VkPipelineStageFlags") int srcStageMask() { return VkSubpassDependency2.get_srcStageMask(this.segment()); } + /// Sets `srcStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags") int value) { VH_srcStageMask.set(segment, 0L, index, value); } + /// Sets `srcStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcStageMask(MemorySegment segment, @CType("VkPipelineStageFlags") int value) { VkSubpassDependency2.set_srcStageMask(segment, 0L, value); } + /// Sets `srcStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency2 srcStageMaskAt(long index, @CType("VkPipelineStageFlags") int value) { VkSubpassDependency2.set_srcStageMask(this.segment(), index, value); return this; } + /// Sets `srcStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency2 srcStageMask(@CType("VkPipelineStageFlags") int value) { VkSubpassDependency2.set_srcStageMask(this.segment(), value); return this; } + + /// {@return `dstStageMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineStageFlags") int get_dstStageMask(MemorySegment segment, long index) { return (int) VH_dstStageMask.get(segment, 0L, index); } + /// {@return `dstStageMask`} + /// @param segment the segment of the struct + public static @CType("VkPipelineStageFlags") int get_dstStageMask(MemorySegment segment) { return VkSubpassDependency2.get_dstStageMask(segment, 0L); } + /// {@return `dstStageMask` at the given index} + /// @param index the index + public @CType("VkPipelineStageFlags") int dstStageMaskAt(long index) { return VkSubpassDependency2.get_dstStageMask(this.segment(), index); } + /// {@return `dstStageMask`} + public @CType("VkPipelineStageFlags") int dstStageMask() { return VkSubpassDependency2.get_dstStageMask(this.segment()); } + /// Sets `dstStageMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstStageMask(MemorySegment segment, long index, @CType("VkPipelineStageFlags") int value) { VH_dstStageMask.set(segment, 0L, index, value); } + /// Sets `dstStageMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstStageMask(MemorySegment segment, @CType("VkPipelineStageFlags") int value) { VkSubpassDependency2.set_dstStageMask(segment, 0L, value); } + /// Sets `dstStageMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency2 dstStageMaskAt(long index, @CType("VkPipelineStageFlags") int value) { VkSubpassDependency2.set_dstStageMask(this.segment(), index, value); return this; } + /// Sets `dstStageMask` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency2 dstStageMask(@CType("VkPipelineStageFlags") int value) { VkSubpassDependency2.set_dstStageMask(this.segment(), value); return this; } + + /// {@return `srcAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags") int get_srcAccessMask(MemorySegment segment, long index) { return (int) VH_srcAccessMask.get(segment, 0L, index); } + /// {@return `srcAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags") int get_srcAccessMask(MemorySegment segment) { return VkSubpassDependency2.get_srcAccessMask(segment, 0L); } + /// {@return `srcAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags") int srcAccessMaskAt(long index) { return VkSubpassDependency2.get_srcAccessMask(this.segment(), index); } + /// {@return `srcAccessMask`} + public @CType("VkAccessFlags") int srcAccessMask() { return VkSubpassDependency2.get_srcAccessMask(this.segment()); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags") int value) { VH_srcAccessMask.set(segment, 0L, index, value); } + /// Sets `srcAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_srcAccessMask(MemorySegment segment, @CType("VkAccessFlags") int value) { VkSubpassDependency2.set_srcAccessMask(segment, 0L, value); } + /// Sets `srcAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency2 srcAccessMaskAt(long index, @CType("VkAccessFlags") int value) { VkSubpassDependency2.set_srcAccessMask(this.segment(), index, value); return this; } + /// Sets `srcAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency2 srcAccessMask(@CType("VkAccessFlags") int value) { VkSubpassDependency2.set_srcAccessMask(this.segment(), value); return this; } + + /// {@return `dstAccessMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkAccessFlags") int get_dstAccessMask(MemorySegment segment, long index) { return (int) VH_dstAccessMask.get(segment, 0L, index); } + /// {@return `dstAccessMask`} + /// @param segment the segment of the struct + public static @CType("VkAccessFlags") int get_dstAccessMask(MemorySegment segment) { return VkSubpassDependency2.get_dstAccessMask(segment, 0L); } + /// {@return `dstAccessMask` at the given index} + /// @param index the index + public @CType("VkAccessFlags") int dstAccessMaskAt(long index) { return VkSubpassDependency2.get_dstAccessMask(this.segment(), index); } + /// {@return `dstAccessMask`} + public @CType("VkAccessFlags") int dstAccessMask() { return VkSubpassDependency2.get_dstAccessMask(this.segment()); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, long index, @CType("VkAccessFlags") int value) { VH_dstAccessMask.set(segment, 0L, index, value); } + /// Sets `dstAccessMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstAccessMask(MemorySegment segment, @CType("VkAccessFlags") int value) { VkSubpassDependency2.set_dstAccessMask(segment, 0L, value); } + /// Sets `dstAccessMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency2 dstAccessMaskAt(long index, @CType("VkAccessFlags") int value) { VkSubpassDependency2.set_dstAccessMask(this.segment(), index, value); return this; } + /// Sets `dstAccessMask` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency2 dstAccessMask(@CType("VkAccessFlags") int value) { VkSubpassDependency2.set_dstAccessMask(this.segment(), value); return this; } + + /// {@return `dependencyFlags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDependencyFlags") int get_dependencyFlags(MemorySegment segment, long index) { return (int) VH_dependencyFlags.get(segment, 0L, index); } + /// {@return `dependencyFlags`} + /// @param segment the segment of the struct + public static @CType("VkDependencyFlags") int get_dependencyFlags(MemorySegment segment) { return VkSubpassDependency2.get_dependencyFlags(segment, 0L); } + /// {@return `dependencyFlags` at the given index} + /// @param index the index + public @CType("VkDependencyFlags") int dependencyFlagsAt(long index) { return VkSubpassDependency2.get_dependencyFlags(this.segment(), index); } + /// {@return `dependencyFlags`} + public @CType("VkDependencyFlags") int dependencyFlags() { return VkSubpassDependency2.get_dependencyFlags(this.segment()); } + /// Sets `dependencyFlags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dependencyFlags(MemorySegment segment, long index, @CType("VkDependencyFlags") int value) { VH_dependencyFlags.set(segment, 0L, index, value); } + /// Sets `dependencyFlags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dependencyFlags(MemorySegment segment, @CType("VkDependencyFlags") int value) { VkSubpassDependency2.set_dependencyFlags(segment, 0L, value); } + /// Sets `dependencyFlags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency2 dependencyFlagsAt(long index, @CType("VkDependencyFlags") int value) { VkSubpassDependency2.set_dependencyFlags(this.segment(), index, value); return this; } + /// Sets `dependencyFlags` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency2 dependencyFlags(@CType("VkDependencyFlags") int value) { VkSubpassDependency2.set_dependencyFlags(this.segment(), value); return this; } + + /// {@return `viewOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_viewOffset(MemorySegment segment, long index) { return (int) VH_viewOffset.get(segment, 0L, index); } + /// {@return `viewOffset`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_viewOffset(MemorySegment segment) { return VkSubpassDependency2.get_viewOffset(segment, 0L); } + /// {@return `viewOffset` at the given index} + /// @param index the index + public @CType("int32_t") int viewOffsetAt(long index) { return VkSubpassDependency2.get_viewOffset(this.segment(), index); } + /// {@return `viewOffset`} + public @CType("int32_t") int viewOffset() { return VkSubpassDependency2.get_viewOffset(this.segment()); } + /// Sets `viewOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewOffset(MemorySegment segment, long index, @CType("int32_t") int value) { VH_viewOffset.set(segment, 0L, index, value); } + /// Sets `viewOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewOffset(MemorySegment segment, @CType("int32_t") int value) { VkSubpassDependency2.set_viewOffset(segment, 0L, value); } + /// Sets `viewOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDependency2 viewOffsetAt(long index, @CType("int32_t") int value) { VkSubpassDependency2.set_viewOffset(this.segment(), index, value); return this; } + /// Sets `viewOffset` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDependency2 viewOffset(@CType("int32_t") int value) { VkSubpassDependency2.set_viewOffset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDescription.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDescription.java new file mode 100644 index 00000000..93e85b61 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDescription.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pipelineBindPoint +/// [VarHandle][#VH_pipelineBindPoint] - [Getter][#pipelineBindPoint()] - [Setter][#pipelineBindPoint(int)] +/// ### inputAttachmentCount +/// [VarHandle][#VH_inputAttachmentCount] - [Getter][#inputAttachmentCount()] - [Setter][#inputAttachmentCount(int)] +/// ### pInputAttachments +/// [VarHandle][#VH_pInputAttachments] - [Getter][#pInputAttachments()] - [Setter][#pInputAttachments(java.lang.foreign.MemorySegment)] +/// ### colorAttachmentCount +/// [VarHandle][#VH_colorAttachmentCount] - [Getter][#colorAttachmentCount()] - [Setter][#colorAttachmentCount(int)] +/// ### pColorAttachments +/// [VarHandle][#VH_pColorAttachments] - [Getter][#pColorAttachments()] - [Setter][#pColorAttachments(java.lang.foreign.MemorySegment)] +/// ### pResolveAttachments +/// [VarHandle][#VH_pResolveAttachments] - [Getter][#pResolveAttachments()] - [Setter][#pResolveAttachments(java.lang.foreign.MemorySegment)] +/// ### pDepthStencilAttachment +/// [VarHandle][#VH_pDepthStencilAttachment] - [Getter][#pDepthStencilAttachment()] - [Setter][#pDepthStencilAttachment(java.lang.foreign.MemorySegment)] +/// ### preserveAttachmentCount +/// [VarHandle][#VH_preserveAttachmentCount] - [Getter][#preserveAttachmentCount()] - [Setter][#preserveAttachmentCount(int)] +/// ### pPreserveAttachments +/// [VarHandle][#VH_pPreserveAttachments] - [Getter][#pPreserveAttachments()] - [Setter][#pPreserveAttachments(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassDescription { +/// VkSubpassDescriptionFlags flags; +/// VkPipelineBindPoint pipelineBindPoint; +/// uint32_t inputAttachmentCount; +/// const VkAttachmentReference * pInputAttachments; +/// uint32_t colorAttachmentCount; +/// const VkAttachmentReference * pColorAttachments; +/// const VkAttachmentReference * pResolveAttachments; +/// const VkAttachmentReference * pDepthStencilAttachment; +/// uint32_t preserveAttachmentCount; +/// const uint32_t * pPreserveAttachments; +/// } VkSubpassDescription; +/// ``` +public final class VkSubpassDescription extends Struct { + /// The struct layout of `VkSubpassDescription`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("pipelineBindPoint"), + ValueLayout.JAVA_INT.withName("inputAttachmentCount"), + ValueLayout.ADDRESS.withName("pInputAttachments"), + ValueLayout.JAVA_INT.withName("colorAttachmentCount"), + ValueLayout.ADDRESS.withName("pColorAttachments"), + ValueLayout.ADDRESS.withName("pResolveAttachments"), + ValueLayout.ADDRESS.withName("pDepthStencilAttachment"), + ValueLayout.JAVA_INT.withName("preserveAttachmentCount"), + ValueLayout.ADDRESS.withName("pPreserveAttachments") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pipelineBindPoint` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBindPoint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBindPoint")); + /// The [VarHandle] of `inputAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inputAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inputAttachmentCount")); + /// The [VarHandle] of `pInputAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pInputAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pInputAttachments")); + /// The [VarHandle] of `colorAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachmentCount")); + /// The [VarHandle] of `pColorAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorAttachments")); + /// The [VarHandle] of `pResolveAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pResolveAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pResolveAttachments")); + /// The [VarHandle] of `pDepthStencilAttachment` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDepthStencilAttachment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDepthStencilAttachment")); + /// The [VarHandle] of `preserveAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preserveAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preserveAttachmentCount")); + /// The [VarHandle] of `pPreserveAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPreserveAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPreserveAttachments")); + + /// Creates `VkSubpassDescription` with the given segment. + /// @param segment the memory segment + public VkSubpassDescription(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassDescription` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDescription of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDescription(segment); } + + /// Creates `VkSubpassDescription` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDescription ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDescription(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassDescription` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDescription ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDescription(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassDescription` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassDescription` + public static VkSubpassDescription alloc(SegmentAllocator allocator) { return new VkSubpassDescription(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassDescription` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassDescription` + public static VkSubpassDescription alloc(SegmentAllocator allocator, long count) { return new VkSubpassDescription(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSubpassDescriptionFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSubpassDescriptionFlags") int get_flags(MemorySegment segment) { return VkSubpassDescription.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSubpassDescriptionFlags") int flagsAt(long index) { return VkSubpassDescription.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSubpassDescriptionFlags") int flags() { return VkSubpassDescription.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSubpassDescriptionFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSubpassDescriptionFlags") int value) { VkSubpassDescription.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription flagsAt(long index, @CType("VkSubpassDescriptionFlags") int value) { VkSubpassDescription.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription flags(@CType("VkSubpassDescriptionFlags") int value) { VkSubpassDescription.set_flags(this.segment(), value); return this; } + + /// {@return `pipelineBindPoint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment, long index) { return (int) VH_pipelineBindPoint.get(segment, 0L, index); } + /// {@return `pipelineBindPoint`} + /// @param segment the segment of the struct + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment) { return VkSubpassDescription.get_pipelineBindPoint(segment, 0L); } + /// {@return `pipelineBindPoint` at the given index} + /// @param index the index + public @CType("VkPipelineBindPoint") int pipelineBindPointAt(long index) { return VkSubpassDescription.get_pipelineBindPoint(this.segment(), index); } + /// {@return `pipelineBindPoint`} + public @CType("VkPipelineBindPoint") int pipelineBindPoint() { return VkSubpassDescription.get_pipelineBindPoint(this.segment()); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, long index, @CType("VkPipelineBindPoint") int value) { VH_pipelineBindPoint.set(segment, 0L, index, value); } + /// Sets `pipelineBindPoint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, @CType("VkPipelineBindPoint") int value) { VkSubpassDescription.set_pipelineBindPoint(segment, 0L, value); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription pipelineBindPointAt(long index, @CType("VkPipelineBindPoint") int value) { VkSubpassDescription.set_pipelineBindPoint(this.segment(), index, value); return this; } + /// Sets `pipelineBindPoint` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription pipelineBindPoint(@CType("VkPipelineBindPoint") int value) { VkSubpassDescription.set_pipelineBindPoint(this.segment(), value); return this; } + + /// {@return `inputAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_inputAttachmentCount(MemorySegment segment, long index) { return (int) VH_inputAttachmentCount.get(segment, 0L, index); } + /// {@return `inputAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_inputAttachmentCount(MemorySegment segment) { return VkSubpassDescription.get_inputAttachmentCount(segment, 0L); } + /// {@return `inputAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int inputAttachmentCountAt(long index) { return VkSubpassDescription.get_inputAttachmentCount(this.segment(), index); } + /// {@return `inputAttachmentCount`} + public @CType("uint32_t") int inputAttachmentCount() { return VkSubpassDescription.get_inputAttachmentCount(this.segment()); } + /// Sets `inputAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inputAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_inputAttachmentCount.set(segment, 0L, index, value); } + /// Sets `inputAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inputAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDescription.set_inputAttachmentCount(segment, 0L, value); } + /// Sets `inputAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription inputAttachmentCountAt(long index, @CType("uint32_t") int value) { VkSubpassDescription.set_inputAttachmentCount(this.segment(), index, value); return this; } + /// Sets `inputAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription inputAttachmentCount(@CType("uint32_t") int value) { VkSubpassDescription.set_inputAttachmentCount(this.segment(), value); return this; } + + /// {@return `pInputAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment get_pInputAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pInputAttachments.get(segment, 0L, index); } + /// {@return `pInputAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment get_pInputAttachments(MemorySegment segment) { return VkSubpassDescription.get_pInputAttachments(segment, 0L); } + /// {@return `pInputAttachments` at the given index} + /// @param index the index + public @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment pInputAttachmentsAt(long index) { return VkSubpassDescription.get_pInputAttachments(this.segment(), index); } + /// {@return `pInputAttachments`} + public @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment pInputAttachments() { return VkSubpassDescription.get_pInputAttachments(this.segment()); } + /// Sets `pInputAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pInputAttachments(MemorySegment segment, long index, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VH_pInputAttachments.set(segment, 0L, index, value); } + /// Sets `pInputAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pInputAttachments(MemorySegment segment, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pInputAttachments(segment, 0L, value); } + /// Sets `pInputAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription pInputAttachmentsAt(long index, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pInputAttachments(this.segment(), index, value); return this; } + /// Sets `pInputAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription pInputAttachments(@CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pInputAttachments(this.segment(), value); return this; } + + /// {@return `colorAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment, long index) { return (int) VH_colorAttachmentCount.get(segment, 0L, index); } + /// {@return `colorAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment) { return VkSubpassDescription.get_colorAttachmentCount(segment, 0L); } + /// {@return `colorAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int colorAttachmentCountAt(long index) { return VkSubpassDescription.get_colorAttachmentCount(this.segment(), index); } + /// {@return `colorAttachmentCount`} + public @CType("uint32_t") int colorAttachmentCount() { return VkSubpassDescription.get_colorAttachmentCount(this.segment()); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorAttachmentCount.set(segment, 0L, index, value); } + /// Sets `colorAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDescription.set_colorAttachmentCount(segment, 0L, value); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription colorAttachmentCountAt(long index, @CType("uint32_t") int value) { VkSubpassDescription.set_colorAttachmentCount(this.segment(), index, value); return this; } + /// Sets `colorAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription colorAttachmentCount(@CType("uint32_t") int value) { VkSubpassDescription.set_colorAttachmentCount(this.segment(), value); return this; } + + /// {@return `pColorAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment get_pColorAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorAttachments.get(segment, 0L, index); } + /// {@return `pColorAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment get_pColorAttachments(MemorySegment segment) { return VkSubpassDescription.get_pColorAttachments(segment, 0L); } + /// {@return `pColorAttachments` at the given index} + /// @param index the index + public @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment pColorAttachmentsAt(long index) { return VkSubpassDescription.get_pColorAttachments(this.segment(), index); } + /// {@return `pColorAttachments`} + public @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment pColorAttachments() { return VkSubpassDescription.get_pColorAttachments(this.segment()); } + /// Sets `pColorAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorAttachments(MemorySegment segment, long index, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VH_pColorAttachments.set(segment, 0L, index, value); } + /// Sets `pColorAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorAttachments(MemorySegment segment, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pColorAttachments(segment, 0L, value); } + /// Sets `pColorAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription pColorAttachmentsAt(long index, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pColorAttachments(this.segment(), index, value); return this; } + /// Sets `pColorAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription pColorAttachments(@CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pColorAttachments(this.segment(), value); return this; } + + /// {@return `pResolveAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment get_pResolveAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pResolveAttachments.get(segment, 0L, index); } + /// {@return `pResolveAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment get_pResolveAttachments(MemorySegment segment) { return VkSubpassDescription.get_pResolveAttachments(segment, 0L); } + /// {@return `pResolveAttachments` at the given index} + /// @param index the index + public @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment pResolveAttachmentsAt(long index) { return VkSubpassDescription.get_pResolveAttachments(this.segment(), index); } + /// {@return `pResolveAttachments`} + public @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment pResolveAttachments() { return VkSubpassDescription.get_pResolveAttachments(this.segment()); } + /// Sets `pResolveAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pResolveAttachments(MemorySegment segment, long index, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VH_pResolveAttachments.set(segment, 0L, index, value); } + /// Sets `pResolveAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pResolveAttachments(MemorySegment segment, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pResolveAttachments(segment, 0L, value); } + /// Sets `pResolveAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription pResolveAttachmentsAt(long index, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pResolveAttachments(this.segment(), index, value); return this; } + /// Sets `pResolveAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription pResolveAttachments(@CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pResolveAttachments(this.segment(), value); return this; } + + /// {@return `pDepthStencilAttachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment get_pDepthStencilAttachment(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDepthStencilAttachment.get(segment, 0L, index); } + /// {@return `pDepthStencilAttachment`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment get_pDepthStencilAttachment(MemorySegment segment) { return VkSubpassDescription.get_pDepthStencilAttachment(segment, 0L); } + /// {@return `pDepthStencilAttachment` at the given index} + /// @param index the index + public @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment pDepthStencilAttachmentAt(long index) { return VkSubpassDescription.get_pDepthStencilAttachment(this.segment(), index); } + /// {@return `pDepthStencilAttachment`} + public @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment pDepthStencilAttachment() { return VkSubpassDescription.get_pDepthStencilAttachment(this.segment()); } + /// Sets `pDepthStencilAttachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDepthStencilAttachment(MemorySegment segment, long index, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VH_pDepthStencilAttachment.set(segment, 0L, index, value); } + /// Sets `pDepthStencilAttachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDepthStencilAttachment(MemorySegment segment, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pDepthStencilAttachment(segment, 0L, value); } + /// Sets `pDepthStencilAttachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription pDepthStencilAttachmentAt(long index, @CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pDepthStencilAttachment(this.segment(), index, value); return this; } + /// Sets `pDepthStencilAttachment` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription pDepthStencilAttachment(@CType("const VkAttachmentReference *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pDepthStencilAttachment(this.segment(), value); return this; } + + /// {@return `preserveAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preserveAttachmentCount(MemorySegment segment, long index) { return (int) VH_preserveAttachmentCount.get(segment, 0L, index); } + /// {@return `preserveAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preserveAttachmentCount(MemorySegment segment) { return VkSubpassDescription.get_preserveAttachmentCount(segment, 0L); } + /// {@return `preserveAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preserveAttachmentCountAt(long index) { return VkSubpassDescription.get_preserveAttachmentCount(this.segment(), index); } + /// {@return `preserveAttachmentCount`} + public @CType("uint32_t") int preserveAttachmentCount() { return VkSubpassDescription.get_preserveAttachmentCount(this.segment()); } + /// Sets `preserveAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preserveAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preserveAttachmentCount.set(segment, 0L, index, value); } + /// Sets `preserveAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preserveAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDescription.set_preserveAttachmentCount(segment, 0L, value); } + /// Sets `preserveAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription preserveAttachmentCountAt(long index, @CType("uint32_t") int value) { VkSubpassDescription.set_preserveAttachmentCount(this.segment(), index, value); return this; } + /// Sets `preserveAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription preserveAttachmentCount(@CType("uint32_t") int value) { VkSubpassDescription.set_preserveAttachmentCount(this.segment(), value); return this; } + + /// {@return `pPreserveAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pPreserveAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPreserveAttachments.get(segment, 0L, index); } + /// {@return `pPreserveAttachments`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pPreserveAttachments(MemorySegment segment) { return VkSubpassDescription.get_pPreserveAttachments(segment, 0L); } + /// {@return `pPreserveAttachments` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pPreserveAttachmentsAt(long index) { return VkSubpassDescription.get_pPreserveAttachments(this.segment(), index); } + /// {@return `pPreserveAttachments`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pPreserveAttachments() { return VkSubpassDescription.get_pPreserveAttachments(this.segment()); } + /// Sets `pPreserveAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPreserveAttachments(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pPreserveAttachments.set(segment, 0L, index, value); } + /// Sets `pPreserveAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPreserveAttachments(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pPreserveAttachments(segment, 0L, value); } + /// Sets `pPreserveAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription pPreserveAttachmentsAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pPreserveAttachments(this.segment(), index, value); return this; } + /// Sets `pPreserveAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription pPreserveAttachments(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSubpassDescription.set_pPreserveAttachments(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDescription2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDescription2.java new file mode 100644 index 00000000..7bd06c30 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDescription2.java @@ -0,0 +1,555 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(int)] +/// ### pipelineBindPoint +/// [VarHandle][#VH_pipelineBindPoint] - [Getter][#pipelineBindPoint()] - [Setter][#pipelineBindPoint(int)] +/// ### viewMask +/// [VarHandle][#VH_viewMask] - [Getter][#viewMask()] - [Setter][#viewMask(int)] +/// ### inputAttachmentCount +/// [VarHandle][#VH_inputAttachmentCount] - [Getter][#inputAttachmentCount()] - [Setter][#inputAttachmentCount(int)] +/// ### pInputAttachments +/// [VarHandle][#VH_pInputAttachments] - [Getter][#pInputAttachments()] - [Setter][#pInputAttachments(java.lang.foreign.MemorySegment)] +/// ### colorAttachmentCount +/// [VarHandle][#VH_colorAttachmentCount] - [Getter][#colorAttachmentCount()] - [Setter][#colorAttachmentCount(int)] +/// ### pColorAttachments +/// [VarHandle][#VH_pColorAttachments] - [Getter][#pColorAttachments()] - [Setter][#pColorAttachments(java.lang.foreign.MemorySegment)] +/// ### pResolveAttachments +/// [VarHandle][#VH_pResolveAttachments] - [Getter][#pResolveAttachments()] - [Setter][#pResolveAttachments(java.lang.foreign.MemorySegment)] +/// ### pDepthStencilAttachment +/// [VarHandle][#VH_pDepthStencilAttachment] - [Getter][#pDepthStencilAttachment()] - [Setter][#pDepthStencilAttachment(java.lang.foreign.MemorySegment)] +/// ### preserveAttachmentCount +/// [VarHandle][#VH_preserveAttachmentCount] - [Getter][#preserveAttachmentCount()] - [Setter][#preserveAttachmentCount(int)] +/// ### pPreserveAttachments +/// [VarHandle][#VH_pPreserveAttachments] - [Getter][#pPreserveAttachments()] - [Setter][#pPreserveAttachments(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassDescription2 { +/// VkStructureType sType; +/// const void * pNext; +/// VkSubpassDescriptionFlags flags; +/// VkPipelineBindPoint pipelineBindPoint; +/// uint32_t viewMask; +/// uint32_t inputAttachmentCount; +/// const VkAttachmentReference2 * pInputAttachments; +/// uint32_t colorAttachmentCount; +/// const VkAttachmentReference2 * pColorAttachments; +/// const VkAttachmentReference2 * pResolveAttachments; +/// const VkAttachmentReference2 * pDepthStencilAttachment; +/// uint32_t preserveAttachmentCount; +/// const uint32_t * pPreserveAttachments; +/// } VkSubpassDescription2; +/// ``` +public final class VkSubpassDescription2 extends Struct { + /// The struct layout of `VkSubpassDescription2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("flags"), + ValueLayout.JAVA_INT.withName("pipelineBindPoint"), + ValueLayout.JAVA_INT.withName("viewMask"), + ValueLayout.JAVA_INT.withName("inputAttachmentCount"), + ValueLayout.ADDRESS.withName("pInputAttachments"), + ValueLayout.JAVA_INT.withName("colorAttachmentCount"), + ValueLayout.ADDRESS.withName("pColorAttachments"), + ValueLayout.ADDRESS.withName("pResolveAttachments"), + ValueLayout.ADDRESS.withName("pDepthStencilAttachment"), + ValueLayout.JAVA_INT.withName("preserveAttachmentCount"), + ValueLayout.ADDRESS.withName("pPreserveAttachments") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pipelineBindPoint` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pipelineBindPoint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pipelineBindPoint")); + /// The [VarHandle] of `viewMask` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_viewMask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("viewMask")); + /// The [VarHandle] of `inputAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inputAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inputAttachmentCount")); + /// The [VarHandle] of `pInputAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pInputAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pInputAttachments")); + /// The [VarHandle] of `colorAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colorAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colorAttachmentCount")); + /// The [VarHandle] of `pColorAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorAttachments")); + /// The [VarHandle] of `pResolveAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pResolveAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pResolveAttachments")); + /// The [VarHandle] of `pDepthStencilAttachment` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDepthStencilAttachment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDepthStencilAttachment")); + /// The [VarHandle] of `preserveAttachmentCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_preserveAttachmentCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("preserveAttachmentCount")); + /// The [VarHandle] of `pPreserveAttachments` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPreserveAttachments = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPreserveAttachments")); + + /// Creates `VkSubpassDescription2` with the given segment. + /// @param segment the memory segment + public VkSubpassDescription2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassDescription2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDescription2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDescription2(segment); } + + /// Creates `VkSubpassDescription2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDescription2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDescription2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassDescription2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDescription2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDescription2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassDescription2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassDescription2` + public static VkSubpassDescription2 alloc(SegmentAllocator allocator) { return new VkSubpassDescription2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassDescription2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassDescription2` + public static VkSubpassDescription2 alloc(SegmentAllocator allocator, long count) { return new VkSubpassDescription2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubpassDescription2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubpassDescription2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubpassDescription2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubpassDescription2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 sTypeAt(long index, @CType("VkStructureType") int value) { VkSubpassDescription2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 sType(@CType("VkStructureType") int value) { VkSubpassDescription2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubpassDescription2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubpassDescription2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSubpassDescription2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pNext(this.segment(), value); return this; } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSubpassDescriptionFlags") int get_flags(MemorySegment segment, long index) { return (int) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("VkSubpassDescriptionFlags") int get_flags(MemorySegment segment) { return VkSubpassDescription2.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("VkSubpassDescriptionFlags") int flagsAt(long index) { return VkSubpassDescription2.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("VkSubpassDescriptionFlags") int flags() { return VkSubpassDescription2.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("VkSubpassDescriptionFlags") int value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("VkSubpassDescriptionFlags") int value) { VkSubpassDescription2.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 flagsAt(long index, @CType("VkSubpassDescriptionFlags") int value) { VkSubpassDescription2.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 flags(@CType("VkSubpassDescriptionFlags") int value) { VkSubpassDescription2.set_flags(this.segment(), value); return this; } + + /// {@return `pipelineBindPoint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment, long index) { return (int) VH_pipelineBindPoint.get(segment, 0L, index); } + /// {@return `pipelineBindPoint`} + /// @param segment the segment of the struct + public static @CType("VkPipelineBindPoint") int get_pipelineBindPoint(MemorySegment segment) { return VkSubpassDescription2.get_pipelineBindPoint(segment, 0L); } + /// {@return `pipelineBindPoint` at the given index} + /// @param index the index + public @CType("VkPipelineBindPoint") int pipelineBindPointAt(long index) { return VkSubpassDescription2.get_pipelineBindPoint(this.segment(), index); } + /// {@return `pipelineBindPoint`} + public @CType("VkPipelineBindPoint") int pipelineBindPoint() { return VkSubpassDescription2.get_pipelineBindPoint(this.segment()); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, long index, @CType("VkPipelineBindPoint") int value) { VH_pipelineBindPoint.set(segment, 0L, index, value); } + /// Sets `pipelineBindPoint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pipelineBindPoint(MemorySegment segment, @CType("VkPipelineBindPoint") int value) { VkSubpassDescription2.set_pipelineBindPoint(segment, 0L, value); } + /// Sets `pipelineBindPoint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pipelineBindPointAt(long index, @CType("VkPipelineBindPoint") int value) { VkSubpassDescription2.set_pipelineBindPoint(this.segment(), index, value); return this; } + /// Sets `pipelineBindPoint` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pipelineBindPoint(@CType("VkPipelineBindPoint") int value) { VkSubpassDescription2.set_pipelineBindPoint(this.segment(), value); return this; } + + /// {@return `viewMask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_viewMask(MemorySegment segment, long index) { return (int) VH_viewMask.get(segment, 0L, index); } + /// {@return `viewMask`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_viewMask(MemorySegment segment) { return VkSubpassDescription2.get_viewMask(segment, 0L); } + /// {@return `viewMask` at the given index} + /// @param index the index + public @CType("uint32_t") int viewMaskAt(long index) { return VkSubpassDescription2.get_viewMask(this.segment(), index); } + /// {@return `viewMask`} + public @CType("uint32_t") int viewMask() { return VkSubpassDescription2.get_viewMask(this.segment()); } + /// Sets `viewMask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_viewMask(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_viewMask.set(segment, 0L, index, value); } + /// Sets `viewMask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_viewMask(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDescription2.set_viewMask(segment, 0L, value); } + /// Sets `viewMask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 viewMaskAt(long index, @CType("uint32_t") int value) { VkSubpassDescription2.set_viewMask(this.segment(), index, value); return this; } + /// Sets `viewMask` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 viewMask(@CType("uint32_t") int value) { VkSubpassDescription2.set_viewMask(this.segment(), value); return this; } + + /// {@return `inputAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_inputAttachmentCount(MemorySegment segment, long index) { return (int) VH_inputAttachmentCount.get(segment, 0L, index); } + /// {@return `inputAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_inputAttachmentCount(MemorySegment segment) { return VkSubpassDescription2.get_inputAttachmentCount(segment, 0L); } + /// {@return `inputAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int inputAttachmentCountAt(long index) { return VkSubpassDescription2.get_inputAttachmentCount(this.segment(), index); } + /// {@return `inputAttachmentCount`} + public @CType("uint32_t") int inputAttachmentCount() { return VkSubpassDescription2.get_inputAttachmentCount(this.segment()); } + /// Sets `inputAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inputAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_inputAttachmentCount.set(segment, 0L, index, value); } + /// Sets `inputAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inputAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDescription2.set_inputAttachmentCount(segment, 0L, value); } + /// Sets `inputAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 inputAttachmentCountAt(long index, @CType("uint32_t") int value) { VkSubpassDescription2.set_inputAttachmentCount(this.segment(), index, value); return this; } + /// Sets `inputAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 inputAttachmentCount(@CType("uint32_t") int value) { VkSubpassDescription2.set_inputAttachmentCount(this.segment(), value); return this; } + + /// {@return `pInputAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pInputAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pInputAttachments.get(segment, 0L, index); } + /// {@return `pInputAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pInputAttachments(MemorySegment segment) { return VkSubpassDescription2.get_pInputAttachments(segment, 0L); } + /// {@return `pInputAttachments` at the given index} + /// @param index the index + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pInputAttachmentsAt(long index) { return VkSubpassDescription2.get_pInputAttachments(this.segment(), index); } + /// {@return `pInputAttachments`} + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pInputAttachments() { return VkSubpassDescription2.get_pInputAttachments(this.segment()); } + /// Sets `pInputAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pInputAttachments(MemorySegment segment, long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VH_pInputAttachments.set(segment, 0L, index, value); } + /// Sets `pInputAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pInputAttachments(MemorySegment segment, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pInputAttachments(segment, 0L, value); } + /// Sets `pInputAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pInputAttachmentsAt(long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pInputAttachments(this.segment(), index, value); return this; } + /// Sets `pInputAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pInputAttachments(@CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pInputAttachments(this.segment(), value); return this; } + + /// {@return `colorAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment, long index) { return (int) VH_colorAttachmentCount.get(segment, 0L, index); } + /// {@return `colorAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_colorAttachmentCount(MemorySegment segment) { return VkSubpassDescription2.get_colorAttachmentCount(segment, 0L); } + /// {@return `colorAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int colorAttachmentCountAt(long index) { return VkSubpassDescription2.get_colorAttachmentCount(this.segment(), index); } + /// {@return `colorAttachmentCount`} + public @CType("uint32_t") int colorAttachmentCount() { return VkSubpassDescription2.get_colorAttachmentCount(this.segment()); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_colorAttachmentCount.set(segment, 0L, index, value); } + /// Sets `colorAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colorAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDescription2.set_colorAttachmentCount(segment, 0L, value); } + /// Sets `colorAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 colorAttachmentCountAt(long index, @CType("uint32_t") int value) { VkSubpassDescription2.set_colorAttachmentCount(this.segment(), index, value); return this; } + /// Sets `colorAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 colorAttachmentCount(@CType("uint32_t") int value) { VkSubpassDescription2.set_colorAttachmentCount(this.segment(), value); return this; } + + /// {@return `pColorAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pColorAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorAttachments.get(segment, 0L, index); } + /// {@return `pColorAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pColorAttachments(MemorySegment segment) { return VkSubpassDescription2.get_pColorAttachments(segment, 0L); } + /// {@return `pColorAttachments` at the given index} + /// @param index the index + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pColorAttachmentsAt(long index) { return VkSubpassDescription2.get_pColorAttachments(this.segment(), index); } + /// {@return `pColorAttachments`} + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pColorAttachments() { return VkSubpassDescription2.get_pColorAttachments(this.segment()); } + /// Sets `pColorAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorAttachments(MemorySegment segment, long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VH_pColorAttachments.set(segment, 0L, index, value); } + /// Sets `pColorAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorAttachments(MemorySegment segment, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pColorAttachments(segment, 0L, value); } + /// Sets `pColorAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pColorAttachmentsAt(long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pColorAttachments(this.segment(), index, value); return this; } + /// Sets `pColorAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pColorAttachments(@CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pColorAttachments(this.segment(), value); return this; } + + /// {@return `pResolveAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pResolveAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pResolveAttachments.get(segment, 0L, index); } + /// {@return `pResolveAttachments`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pResolveAttachments(MemorySegment segment) { return VkSubpassDescription2.get_pResolveAttachments(segment, 0L); } + /// {@return `pResolveAttachments` at the given index} + /// @param index the index + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pResolveAttachmentsAt(long index) { return VkSubpassDescription2.get_pResolveAttachments(this.segment(), index); } + /// {@return `pResolveAttachments`} + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pResolveAttachments() { return VkSubpassDescription2.get_pResolveAttachments(this.segment()); } + /// Sets `pResolveAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pResolveAttachments(MemorySegment segment, long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VH_pResolveAttachments.set(segment, 0L, index, value); } + /// Sets `pResolveAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pResolveAttachments(MemorySegment segment, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pResolveAttachments(segment, 0L, value); } + /// Sets `pResolveAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pResolveAttachmentsAt(long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pResolveAttachments(this.segment(), index, value); return this; } + /// Sets `pResolveAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pResolveAttachments(@CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pResolveAttachments(this.segment(), value); return this; } + + /// {@return `pDepthStencilAttachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pDepthStencilAttachment(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDepthStencilAttachment.get(segment, 0L, index); } + /// {@return `pDepthStencilAttachment`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pDepthStencilAttachment(MemorySegment segment) { return VkSubpassDescription2.get_pDepthStencilAttachment(segment, 0L); } + /// {@return `pDepthStencilAttachment` at the given index} + /// @param index the index + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pDepthStencilAttachmentAt(long index) { return VkSubpassDescription2.get_pDepthStencilAttachment(this.segment(), index); } + /// {@return `pDepthStencilAttachment`} + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pDepthStencilAttachment() { return VkSubpassDescription2.get_pDepthStencilAttachment(this.segment()); } + /// Sets `pDepthStencilAttachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDepthStencilAttachment(MemorySegment segment, long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VH_pDepthStencilAttachment.set(segment, 0L, index, value); } + /// Sets `pDepthStencilAttachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDepthStencilAttachment(MemorySegment segment, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pDepthStencilAttachment(segment, 0L, value); } + /// Sets `pDepthStencilAttachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pDepthStencilAttachmentAt(long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pDepthStencilAttachment(this.segment(), index, value); return this; } + /// Sets `pDepthStencilAttachment` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pDepthStencilAttachment(@CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pDepthStencilAttachment(this.segment(), value); return this; } + + /// {@return `preserveAttachmentCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_preserveAttachmentCount(MemorySegment segment, long index) { return (int) VH_preserveAttachmentCount.get(segment, 0L, index); } + /// {@return `preserveAttachmentCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_preserveAttachmentCount(MemorySegment segment) { return VkSubpassDescription2.get_preserveAttachmentCount(segment, 0L); } + /// {@return `preserveAttachmentCount` at the given index} + /// @param index the index + public @CType("uint32_t") int preserveAttachmentCountAt(long index) { return VkSubpassDescription2.get_preserveAttachmentCount(this.segment(), index); } + /// {@return `preserveAttachmentCount`} + public @CType("uint32_t") int preserveAttachmentCount() { return VkSubpassDescription2.get_preserveAttachmentCount(this.segment()); } + /// Sets `preserveAttachmentCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_preserveAttachmentCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_preserveAttachmentCount.set(segment, 0L, index, value); } + /// Sets `preserveAttachmentCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_preserveAttachmentCount(MemorySegment segment, @CType("uint32_t") int value) { VkSubpassDescription2.set_preserveAttachmentCount(segment, 0L, value); } + /// Sets `preserveAttachmentCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 preserveAttachmentCountAt(long index, @CType("uint32_t") int value) { VkSubpassDescription2.set_preserveAttachmentCount(this.segment(), index, value); return this; } + /// Sets `preserveAttachmentCount` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 preserveAttachmentCount(@CType("uint32_t") int value) { VkSubpassDescription2.set_preserveAttachmentCount(this.segment(), value); return this; } + + /// {@return `pPreserveAttachments` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pPreserveAttachments(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPreserveAttachments.get(segment, 0L, index); } + /// {@return `pPreserveAttachments`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pPreserveAttachments(MemorySegment segment) { return VkSubpassDescription2.get_pPreserveAttachments(segment, 0L); } + /// {@return `pPreserveAttachments` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pPreserveAttachmentsAt(long index) { return VkSubpassDescription2.get_pPreserveAttachments(this.segment(), index); } + /// {@return `pPreserveAttachments`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pPreserveAttachments() { return VkSubpassDescription2.get_pPreserveAttachments(this.segment()); } + /// Sets `pPreserveAttachments` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPreserveAttachments(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pPreserveAttachments.set(segment, 0L, index, value); } + /// Sets `pPreserveAttachments` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPreserveAttachments(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pPreserveAttachments(segment, 0L, value); } + /// Sets `pPreserveAttachments` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pPreserveAttachmentsAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pPreserveAttachments(this.segment(), index, value); return this; } + /// Sets `pPreserveAttachments` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescription2 pPreserveAttachments(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VkSubpassDescription2.set_pPreserveAttachments(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDescriptionDepthStencilResolve.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDescriptionDepthStencilResolve.java new file mode 100644 index 00000000..6a75fd04 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassDescriptionDepthStencilResolve.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### depthResolveMode +/// [VarHandle][#VH_depthResolveMode] - [Getter][#depthResolveMode()] - [Setter][#depthResolveMode(int)] +/// ### stencilResolveMode +/// [VarHandle][#VH_stencilResolveMode] - [Getter][#stencilResolveMode()] - [Setter][#stencilResolveMode(int)] +/// ### pDepthStencilResolveAttachment +/// [VarHandle][#VH_pDepthStencilResolveAttachment] - [Getter][#pDepthStencilResolveAttachment()] - [Setter][#pDepthStencilResolveAttachment(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassDescriptionDepthStencilResolve { +/// VkStructureType sType; +/// const void * pNext; +/// VkResolveModeFlagBits depthResolveMode; +/// VkResolveModeFlagBits stencilResolveMode; +/// const VkAttachmentReference2 * pDepthStencilResolveAttachment; +/// } VkSubpassDescriptionDepthStencilResolve; +/// ``` +public final class VkSubpassDescriptionDepthStencilResolve extends Struct { + /// The struct layout of `VkSubpassDescriptionDepthStencilResolve`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("depthResolveMode"), + ValueLayout.JAVA_INT.withName("stencilResolveMode"), + ValueLayout.ADDRESS.withName("pDepthStencilResolveAttachment") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `depthResolveMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_depthResolveMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthResolveMode")); + /// The [VarHandle] of `stencilResolveMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stencilResolveMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stencilResolveMode")); + /// The [VarHandle] of `pDepthStencilResolveAttachment` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDepthStencilResolveAttachment = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDepthStencilResolveAttachment")); + + /// Creates `VkSubpassDescriptionDepthStencilResolve` with the given segment. + /// @param segment the memory segment + public VkSubpassDescriptionDepthStencilResolve(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassDescriptionDepthStencilResolve` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDescriptionDepthStencilResolve of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDescriptionDepthStencilResolve(segment); } + + /// Creates `VkSubpassDescriptionDepthStencilResolve` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDescriptionDepthStencilResolve ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDescriptionDepthStencilResolve(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassDescriptionDepthStencilResolve` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassDescriptionDepthStencilResolve ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassDescriptionDepthStencilResolve(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassDescriptionDepthStencilResolve` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassDescriptionDepthStencilResolve` + public static VkSubpassDescriptionDepthStencilResolve alloc(SegmentAllocator allocator) { return new VkSubpassDescriptionDepthStencilResolve(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassDescriptionDepthStencilResolve` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassDescriptionDepthStencilResolve` + public static VkSubpassDescriptionDepthStencilResolve alloc(SegmentAllocator allocator, long count) { return new VkSubpassDescriptionDepthStencilResolve(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubpassDescriptionDepthStencilResolve.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubpassDescriptionDepthStencilResolve.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubpassDescriptionDepthStencilResolve.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubpassDescriptionDepthStencilResolve.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescriptionDepthStencilResolve sTypeAt(long index, @CType("VkStructureType") int value) { VkSubpassDescriptionDepthStencilResolve.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescriptionDepthStencilResolve sType(@CType("VkStructureType") int value) { VkSubpassDescriptionDepthStencilResolve.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubpassDescriptionDepthStencilResolve.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubpassDescriptionDepthStencilResolve.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSubpassDescriptionDepthStencilResolve.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassDescriptionDepthStencilResolve.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescriptionDepthStencilResolve pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassDescriptionDepthStencilResolve.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescriptionDepthStencilResolve pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassDescriptionDepthStencilResolve.set_pNext(this.segment(), value); return this; } + + /// {@return `depthResolveMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkResolveModeFlagBits") int get_depthResolveMode(MemorySegment segment, long index) { return (int) VH_depthResolveMode.get(segment, 0L, index); } + /// {@return `depthResolveMode`} + /// @param segment the segment of the struct + public static @CType("VkResolveModeFlagBits") int get_depthResolveMode(MemorySegment segment) { return VkSubpassDescriptionDepthStencilResolve.get_depthResolveMode(segment, 0L); } + /// {@return `depthResolveMode` at the given index} + /// @param index the index + public @CType("VkResolveModeFlagBits") int depthResolveModeAt(long index) { return VkSubpassDescriptionDepthStencilResolve.get_depthResolveMode(this.segment(), index); } + /// {@return `depthResolveMode`} + public @CType("VkResolveModeFlagBits") int depthResolveMode() { return VkSubpassDescriptionDepthStencilResolve.get_depthResolveMode(this.segment()); } + /// Sets `depthResolveMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthResolveMode(MemorySegment segment, long index, @CType("VkResolveModeFlagBits") int value) { VH_depthResolveMode.set(segment, 0L, index, value); } + /// Sets `depthResolveMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthResolveMode(MemorySegment segment, @CType("VkResolveModeFlagBits") int value) { VkSubpassDescriptionDepthStencilResolve.set_depthResolveMode(segment, 0L, value); } + /// Sets `depthResolveMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescriptionDepthStencilResolve depthResolveModeAt(long index, @CType("VkResolveModeFlagBits") int value) { VkSubpassDescriptionDepthStencilResolve.set_depthResolveMode(this.segment(), index, value); return this; } + /// Sets `depthResolveMode` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescriptionDepthStencilResolve depthResolveMode(@CType("VkResolveModeFlagBits") int value) { VkSubpassDescriptionDepthStencilResolve.set_depthResolveMode(this.segment(), value); return this; } + + /// {@return `stencilResolveMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkResolveModeFlagBits") int get_stencilResolveMode(MemorySegment segment, long index) { return (int) VH_stencilResolveMode.get(segment, 0L, index); } + /// {@return `stencilResolveMode`} + /// @param segment the segment of the struct + public static @CType("VkResolveModeFlagBits") int get_stencilResolveMode(MemorySegment segment) { return VkSubpassDescriptionDepthStencilResolve.get_stencilResolveMode(segment, 0L); } + /// {@return `stencilResolveMode` at the given index} + /// @param index the index + public @CType("VkResolveModeFlagBits") int stencilResolveModeAt(long index) { return VkSubpassDescriptionDepthStencilResolve.get_stencilResolveMode(this.segment(), index); } + /// {@return `stencilResolveMode`} + public @CType("VkResolveModeFlagBits") int stencilResolveMode() { return VkSubpassDescriptionDepthStencilResolve.get_stencilResolveMode(this.segment()); } + /// Sets `stencilResolveMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stencilResolveMode(MemorySegment segment, long index, @CType("VkResolveModeFlagBits") int value) { VH_stencilResolveMode.set(segment, 0L, index, value); } + /// Sets `stencilResolveMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stencilResolveMode(MemorySegment segment, @CType("VkResolveModeFlagBits") int value) { VkSubpassDescriptionDepthStencilResolve.set_stencilResolveMode(segment, 0L, value); } + /// Sets `stencilResolveMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescriptionDepthStencilResolve stencilResolveModeAt(long index, @CType("VkResolveModeFlagBits") int value) { VkSubpassDescriptionDepthStencilResolve.set_stencilResolveMode(this.segment(), index, value); return this; } + /// Sets `stencilResolveMode` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescriptionDepthStencilResolve stencilResolveMode(@CType("VkResolveModeFlagBits") int value) { VkSubpassDescriptionDepthStencilResolve.set_stencilResolveMode(this.segment(), value); return this; } + + /// {@return `pDepthStencilResolveAttachment` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pDepthStencilResolveAttachment(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDepthStencilResolveAttachment.get(segment, 0L, index); } + /// {@return `pDepthStencilResolveAttachment`} + /// @param segment the segment of the struct + public static @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment get_pDepthStencilResolveAttachment(MemorySegment segment) { return VkSubpassDescriptionDepthStencilResolve.get_pDepthStencilResolveAttachment(segment, 0L); } + /// {@return `pDepthStencilResolveAttachment` at the given index} + /// @param index the index + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pDepthStencilResolveAttachmentAt(long index) { return VkSubpassDescriptionDepthStencilResolve.get_pDepthStencilResolveAttachment(this.segment(), index); } + /// {@return `pDepthStencilResolveAttachment`} + public @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment pDepthStencilResolveAttachment() { return VkSubpassDescriptionDepthStencilResolve.get_pDepthStencilResolveAttachment(this.segment()); } + /// Sets `pDepthStencilResolveAttachment` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDepthStencilResolveAttachment(MemorySegment segment, long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VH_pDepthStencilResolveAttachment.set(segment, 0L, index, value); } + /// Sets `pDepthStencilResolveAttachment` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDepthStencilResolveAttachment(MemorySegment segment, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescriptionDepthStencilResolve.set_pDepthStencilResolveAttachment(segment, 0L, value); } + /// Sets `pDepthStencilResolveAttachment` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassDescriptionDepthStencilResolve pDepthStencilResolveAttachmentAt(long index, @CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescriptionDepthStencilResolve.set_pDepthStencilResolveAttachment(this.segment(), index, value); return this; } + /// Sets `pDepthStencilResolveAttachment` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassDescriptionDepthStencilResolve pDepthStencilResolveAttachment(@CType("const VkAttachmentReference2 *") java.lang.foreign.MemorySegment value) { VkSubpassDescriptionDepthStencilResolve.set_pDepthStencilResolveAttachment(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassEndInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassEndInfo.java new file mode 100644 index 00000000..8ea744fa --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubpassEndInfo.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubpassEndInfo { +/// VkStructureType sType; +/// const void * pNext; +/// } VkSubpassEndInfo; +/// ``` +public final class VkSubpassEndInfo extends Struct { + /// The struct layout of `VkSubpassEndInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + + /// Creates `VkSubpassEndInfo` with the given segment. + /// @param segment the memory segment + public VkSubpassEndInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubpassEndInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassEndInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassEndInfo(segment); } + + /// Creates `VkSubpassEndInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassEndInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassEndInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubpassEndInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubpassEndInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubpassEndInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubpassEndInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubpassEndInfo` + public static VkSubpassEndInfo alloc(SegmentAllocator allocator) { return new VkSubpassEndInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubpassEndInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubpassEndInfo` + public static VkSubpassEndInfo alloc(SegmentAllocator allocator, long count) { return new VkSubpassEndInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubpassEndInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubpassEndInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubpassEndInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubpassEndInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassEndInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkSubpassEndInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassEndInfo sType(@CType("VkStructureType") int value) { VkSubpassEndInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubpassEndInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubpassEndInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkSubpassEndInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassEndInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubpassEndInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassEndInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubpassEndInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkSubpassEndInfo.set_pNext(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubresourceHostMemcpySize.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubresourceHostMemcpySize.java new file mode 100644 index 00000000..41525146 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubresourceHostMemcpySize.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubresourceHostMemcpySize { +/// VkStructureType sType; +/// void * pNext; +/// VkDeviceSize size; +/// } VkSubresourceHostMemcpySize; +/// ``` +public final class VkSubresourceHostMemcpySize extends Struct { + /// The struct layout of `VkSubresourceHostMemcpySize`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("size") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + + /// Creates `VkSubresourceHostMemcpySize` with the given segment. + /// @param segment the memory segment + public VkSubresourceHostMemcpySize(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubresourceHostMemcpySize` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubresourceHostMemcpySize of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubresourceHostMemcpySize(segment); } + + /// Creates `VkSubresourceHostMemcpySize` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubresourceHostMemcpySize ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubresourceHostMemcpySize(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubresourceHostMemcpySize` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubresourceHostMemcpySize ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubresourceHostMemcpySize(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubresourceHostMemcpySize` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubresourceHostMemcpySize` + public static VkSubresourceHostMemcpySize alloc(SegmentAllocator allocator) { return new VkSubresourceHostMemcpySize(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubresourceHostMemcpySize` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubresourceHostMemcpySize` + public static VkSubresourceHostMemcpySize alloc(SegmentAllocator allocator, long count) { return new VkSubresourceHostMemcpySize(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubresourceHostMemcpySize.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubresourceHostMemcpySize.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubresourceHostMemcpySize.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubresourceHostMemcpySize.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceHostMemcpySize sTypeAt(long index, @CType("VkStructureType") int value) { VkSubresourceHostMemcpySize.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceHostMemcpySize sType(@CType("VkStructureType") int value) { VkSubresourceHostMemcpySize.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubresourceHostMemcpySize.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubresourceHostMemcpySize.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSubresourceHostMemcpySize.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSubresourceHostMemcpySize.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceHostMemcpySize pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSubresourceHostMemcpySize.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceHostMemcpySize pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSubresourceHostMemcpySize.set_pNext(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkSubresourceHostMemcpySize.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkSubresourceHostMemcpySize.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkSubresourceHostMemcpySize.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSubresourceHostMemcpySize.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceHostMemcpySize sizeAt(long index, @CType("VkDeviceSize") long value) { VkSubresourceHostMemcpySize.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceHostMemcpySize size(@CType("VkDeviceSize") long value) { VkSubresourceHostMemcpySize.set_size(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubresourceLayout.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubresourceLayout.java new file mode 100644 index 00000000..2a4a3c3d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubresourceLayout.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(long)] +/// ### size +/// [VarHandle][#VH_size] - [Getter][#size()] - [Setter][#size(long)] +/// ### rowPitch +/// [VarHandle][#VH_rowPitch] - [Getter][#rowPitch()] - [Setter][#rowPitch(long)] +/// ### arrayPitch +/// [VarHandle][#VH_arrayPitch] - [Getter][#arrayPitch()] - [Setter][#arrayPitch(long)] +/// ### depthPitch +/// [VarHandle][#VH_depthPitch] - [Getter][#depthPitch()] - [Setter][#depthPitch(long)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubresourceLayout { +/// VkDeviceSize offset; +/// VkDeviceSize size; +/// VkDeviceSize rowPitch; +/// VkDeviceSize arrayPitch; +/// VkDeviceSize depthPitch; +/// } VkSubresourceLayout; +/// ``` +public final class VkSubresourceLayout extends Struct { + /// The struct layout of `VkSubresourceLayout`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_LONG.withName("offset"), + ValueLayout.JAVA_LONG.withName("size"), + ValueLayout.JAVA_LONG.withName("rowPitch"), + ValueLayout.JAVA_LONG.withName("arrayPitch"), + ValueLayout.JAVA_LONG.withName("depthPitch") + ); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + /// The [VarHandle] of `size` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("size")); + /// The [VarHandle] of `rowPitch` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_rowPitch = LAYOUT.arrayElementVarHandle(PathElement.groupElement("rowPitch")); + /// The [VarHandle] of `arrayPitch` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_arrayPitch = LAYOUT.arrayElementVarHandle(PathElement.groupElement("arrayPitch")); + /// The [VarHandle] of `depthPitch` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_depthPitch = LAYOUT.arrayElementVarHandle(PathElement.groupElement("depthPitch")); + + /// Creates `VkSubresourceLayout` with the given segment. + /// @param segment the memory segment + public VkSubresourceLayout(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubresourceLayout` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubresourceLayout of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubresourceLayout(segment); } + + /// Creates `VkSubresourceLayout` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubresourceLayout ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubresourceLayout(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubresourceLayout` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubresourceLayout ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubresourceLayout(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubresourceLayout` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubresourceLayout` + public static VkSubresourceLayout alloc(SegmentAllocator allocator) { return new VkSubresourceLayout(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubresourceLayout` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubresourceLayout` + public static VkSubresourceLayout alloc(SegmentAllocator allocator, long count) { return new VkSubresourceLayout(allocator.allocate(LAYOUT, count)); } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment, long index) { return (long) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_offset(MemorySegment segment) { return VkSubresourceLayout.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long offsetAt(long index) { return VkSubresourceLayout.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("VkDeviceSize") long offset() { return VkSubresourceLayout.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSubresourceLayout.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceLayout offsetAt(long index, @CType("VkDeviceSize") long value) { VkSubresourceLayout.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceLayout offset(@CType("VkDeviceSize") long value) { VkSubresourceLayout.set_offset(this.segment(), value); return this; } + + /// {@return `size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_size(MemorySegment segment, long index) { return (long) VH_size.get(segment, 0L, index); } + /// {@return `size`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_size(MemorySegment segment) { return VkSubresourceLayout.get_size(segment, 0L); } + /// {@return `size` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long sizeAt(long index) { return VkSubresourceLayout.get_size(this.segment(), index); } + /// {@return `size`} + public @CType("VkDeviceSize") long size() { return VkSubresourceLayout.get_size(this.segment()); } + /// Sets `size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_size(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_size.set(segment, 0L, index, value); } + /// Sets `size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_size(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSubresourceLayout.set_size(segment, 0L, value); } + /// Sets `size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceLayout sizeAt(long index, @CType("VkDeviceSize") long value) { VkSubresourceLayout.set_size(this.segment(), index, value); return this; } + /// Sets `size` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceLayout size(@CType("VkDeviceSize") long value) { VkSubresourceLayout.set_size(this.segment(), value); return this; } + + /// {@return `rowPitch` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_rowPitch(MemorySegment segment, long index) { return (long) VH_rowPitch.get(segment, 0L, index); } + /// {@return `rowPitch`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_rowPitch(MemorySegment segment) { return VkSubresourceLayout.get_rowPitch(segment, 0L); } + /// {@return `rowPitch` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long rowPitchAt(long index) { return VkSubresourceLayout.get_rowPitch(this.segment(), index); } + /// {@return `rowPitch`} + public @CType("VkDeviceSize") long rowPitch() { return VkSubresourceLayout.get_rowPitch(this.segment()); } + /// Sets `rowPitch` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_rowPitch(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_rowPitch.set(segment, 0L, index, value); } + /// Sets `rowPitch` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_rowPitch(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSubresourceLayout.set_rowPitch(segment, 0L, value); } + /// Sets `rowPitch` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceLayout rowPitchAt(long index, @CType("VkDeviceSize") long value) { VkSubresourceLayout.set_rowPitch(this.segment(), index, value); return this; } + /// Sets `rowPitch` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceLayout rowPitch(@CType("VkDeviceSize") long value) { VkSubresourceLayout.set_rowPitch(this.segment(), value); return this; } + + /// {@return `arrayPitch` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_arrayPitch(MemorySegment segment, long index) { return (long) VH_arrayPitch.get(segment, 0L, index); } + /// {@return `arrayPitch`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_arrayPitch(MemorySegment segment) { return VkSubresourceLayout.get_arrayPitch(segment, 0L); } + /// {@return `arrayPitch` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long arrayPitchAt(long index) { return VkSubresourceLayout.get_arrayPitch(this.segment(), index); } + /// {@return `arrayPitch`} + public @CType("VkDeviceSize") long arrayPitch() { return VkSubresourceLayout.get_arrayPitch(this.segment()); } + /// Sets `arrayPitch` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_arrayPitch(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_arrayPitch.set(segment, 0L, index, value); } + /// Sets `arrayPitch` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_arrayPitch(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSubresourceLayout.set_arrayPitch(segment, 0L, value); } + /// Sets `arrayPitch` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceLayout arrayPitchAt(long index, @CType("VkDeviceSize") long value) { VkSubresourceLayout.set_arrayPitch(this.segment(), index, value); return this; } + /// Sets `arrayPitch` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceLayout arrayPitch(@CType("VkDeviceSize") long value) { VkSubresourceLayout.set_arrayPitch(this.segment(), value); return this; } + + /// {@return `depthPitch` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDeviceSize") long get_depthPitch(MemorySegment segment, long index) { return (long) VH_depthPitch.get(segment, 0L, index); } + /// {@return `depthPitch`} + /// @param segment the segment of the struct + public static @CType("VkDeviceSize") long get_depthPitch(MemorySegment segment) { return VkSubresourceLayout.get_depthPitch(segment, 0L); } + /// {@return `depthPitch` at the given index} + /// @param index the index + public @CType("VkDeviceSize") long depthPitchAt(long index) { return VkSubresourceLayout.get_depthPitch(this.segment(), index); } + /// {@return `depthPitch`} + public @CType("VkDeviceSize") long depthPitch() { return VkSubresourceLayout.get_depthPitch(this.segment()); } + /// Sets `depthPitch` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthPitch(MemorySegment segment, long index, @CType("VkDeviceSize") long value) { VH_depthPitch.set(segment, 0L, index, value); } + /// Sets `depthPitch` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthPitch(MemorySegment segment, @CType("VkDeviceSize") long value) { VkSubresourceLayout.set_depthPitch(segment, 0L, value); } + /// Sets `depthPitch` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceLayout depthPitchAt(long index, @CType("VkDeviceSize") long value) { VkSubresourceLayout.set_depthPitch(this.segment(), index, value); return this; } + /// Sets `depthPitch` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceLayout depthPitch(@CType("VkDeviceSize") long value) { VkSubresourceLayout.set_depthPitch(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubresourceLayout2.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubresourceLayout2.java new file mode 100644 index 00000000..915924d0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkSubresourceLayout2.java @@ -0,0 +1,187 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### subresourceLayout +/// [Byte offset][#OFFSET_subresourceLayout] - [Memory layout][#ML_subresourceLayout] - [Getter][#subresourceLayout()] - [Setter][#subresourceLayout(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkSubresourceLayout2 { +/// VkStructureType sType; +/// void * pNext; +/// VkSubresourceLayout subresourceLayout; +/// } VkSubresourceLayout2; +/// ``` +public final class VkSubresourceLayout2 extends Struct { + /// The struct layout of `VkSubresourceLayout2`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + overrungl.vulkan.struct.VkSubresourceLayout.LAYOUT.withName("subresourceLayout") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The byte offset of `subresourceLayout`. + public static final long OFFSET_subresourceLayout = LAYOUT.byteOffset(PathElement.groupElement("subresourceLayout")); + /// The memory layout of `subresourceLayout`. + public static final MemoryLayout ML_subresourceLayout = LAYOUT.select(PathElement.groupElement("subresourceLayout")); + + /// Creates `VkSubresourceLayout2` with the given segment. + /// @param segment the memory segment + public VkSubresourceLayout2(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkSubresourceLayout2` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubresourceLayout2 of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubresourceLayout2(segment); } + + /// Creates `VkSubresourceLayout2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubresourceLayout2 ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkSubresourceLayout2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkSubresourceLayout2` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkSubresourceLayout2 ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkSubresourceLayout2(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkSubresourceLayout2` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkSubresourceLayout2` + public static VkSubresourceLayout2 alloc(SegmentAllocator allocator) { return new VkSubresourceLayout2(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkSubresourceLayout2` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkSubresourceLayout2` + public static VkSubresourceLayout2 alloc(SegmentAllocator allocator, long count) { return new VkSubresourceLayout2(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkSubresourceLayout2.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkSubresourceLayout2.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkSubresourceLayout2.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkSubresourceLayout2.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceLayout2 sTypeAt(long index, @CType("VkStructureType") int value) { VkSubresourceLayout2.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceLayout2 sType(@CType("VkStructureType") int value) { VkSubresourceLayout2.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkSubresourceLayout2.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkSubresourceLayout2.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkSubresourceLayout2.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkSubresourceLayout2.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceLayout2 pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkSubresourceLayout2.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceLayout2 pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkSubresourceLayout2.set_pNext(this.segment(), value); return this; } + + /// {@return `subresourceLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkSubresourceLayout") java.lang.foreign.MemorySegment get_subresourceLayout(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_subresourceLayout, index), ML_subresourceLayout); } + /// {@return `subresourceLayout`} + /// @param segment the segment of the struct + public static @CType("VkSubresourceLayout") java.lang.foreign.MemorySegment get_subresourceLayout(MemorySegment segment) { return VkSubresourceLayout2.get_subresourceLayout(segment, 0L); } + /// {@return `subresourceLayout` at the given index} + /// @param index the index + public @CType("VkSubresourceLayout") java.lang.foreign.MemorySegment subresourceLayoutAt(long index) { return VkSubresourceLayout2.get_subresourceLayout(this.segment(), index); } + /// {@return `subresourceLayout`} + public @CType("VkSubresourceLayout") java.lang.foreign.MemorySegment subresourceLayout() { return VkSubresourceLayout2.get_subresourceLayout(this.segment()); } + /// Sets `subresourceLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subresourceLayout(MemorySegment segment, long index, @CType("VkSubresourceLayout") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_subresourceLayout, index), ML_subresourceLayout.byteSize()); } + /// Sets `subresourceLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subresourceLayout(MemorySegment segment, @CType("VkSubresourceLayout") java.lang.foreign.MemorySegment value) { VkSubresourceLayout2.set_subresourceLayout(segment, 0L, value); } + /// Sets `subresourceLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkSubresourceLayout2 subresourceLayoutAt(long index, @CType("VkSubresourceLayout") java.lang.foreign.MemorySegment value) { VkSubresourceLayout2.set_subresourceLayout(this.segment(), index, value); return this; } + /// Sets `subresourceLayout` with the given value. + /// @param value the value + /// @return `this` + public VkSubresourceLayout2 subresourceLayout(@CType("VkSubresourceLayout") java.lang.foreign.MemorySegment value) { VkSubresourceLayout2.set_subresourceLayout(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkTimelineSemaphoreSubmitInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkTimelineSemaphoreSubmitInfo.java new file mode 100644 index 00000000..89bf785d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkTimelineSemaphoreSubmitInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### waitSemaphoreValueCount +/// [VarHandle][#VH_waitSemaphoreValueCount] - [Getter][#waitSemaphoreValueCount()] - [Setter][#waitSemaphoreValueCount(int)] +/// ### pWaitSemaphoreValues +/// [VarHandle][#VH_pWaitSemaphoreValues] - [Getter][#pWaitSemaphoreValues()] - [Setter][#pWaitSemaphoreValues(java.lang.foreign.MemorySegment)] +/// ### signalSemaphoreValueCount +/// [VarHandle][#VH_signalSemaphoreValueCount] - [Getter][#signalSemaphoreValueCount()] - [Setter][#signalSemaphoreValueCount(int)] +/// ### pSignalSemaphoreValues +/// [VarHandle][#VH_pSignalSemaphoreValues] - [Getter][#pSignalSemaphoreValues()] - [Setter][#pSignalSemaphoreValues(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkTimelineSemaphoreSubmitInfo { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t waitSemaphoreValueCount; +/// const uint64_t * pWaitSemaphoreValues; +/// uint32_t signalSemaphoreValueCount; +/// const uint64_t * pSignalSemaphoreValues; +/// } VkTimelineSemaphoreSubmitInfo; +/// ``` +public final class VkTimelineSemaphoreSubmitInfo extends Struct { + /// The struct layout of `VkTimelineSemaphoreSubmitInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("waitSemaphoreValueCount"), + ValueLayout.ADDRESS.withName("pWaitSemaphoreValues"), + ValueLayout.JAVA_INT.withName("signalSemaphoreValueCount"), + ValueLayout.ADDRESS.withName("pSignalSemaphoreValues") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `waitSemaphoreValueCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_waitSemaphoreValueCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("waitSemaphoreValueCount")); + /// The [VarHandle] of `pWaitSemaphoreValues` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWaitSemaphoreValues = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWaitSemaphoreValues")); + /// The [VarHandle] of `signalSemaphoreValueCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_signalSemaphoreValueCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("signalSemaphoreValueCount")); + /// The [VarHandle] of `pSignalSemaphoreValues` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSignalSemaphoreValues = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSignalSemaphoreValues")); + + /// Creates `VkTimelineSemaphoreSubmitInfo` with the given segment. + /// @param segment the memory segment + public VkTimelineSemaphoreSubmitInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkTimelineSemaphoreSubmitInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTimelineSemaphoreSubmitInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTimelineSemaphoreSubmitInfo(segment); } + + /// Creates `VkTimelineSemaphoreSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkTimelineSemaphoreSubmitInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkTimelineSemaphoreSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkTimelineSemaphoreSubmitInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkTimelineSemaphoreSubmitInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkTimelineSemaphoreSubmitInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkTimelineSemaphoreSubmitInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkTimelineSemaphoreSubmitInfo` + public static VkTimelineSemaphoreSubmitInfo alloc(SegmentAllocator allocator) { return new VkTimelineSemaphoreSubmitInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkTimelineSemaphoreSubmitInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkTimelineSemaphoreSubmitInfo` + public static VkTimelineSemaphoreSubmitInfo alloc(SegmentAllocator allocator, long count) { return new VkTimelineSemaphoreSubmitInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkTimelineSemaphoreSubmitInfo.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkTimelineSemaphoreSubmitInfo.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkTimelineSemaphoreSubmitInfo.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkTimelineSemaphoreSubmitInfo.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo sTypeAt(long index, @CType("VkStructureType") int value) { VkTimelineSemaphoreSubmitInfo.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo sType(@CType("VkStructureType") int value) { VkTimelineSemaphoreSubmitInfo.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkTimelineSemaphoreSubmitInfo.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkTimelineSemaphoreSubmitInfo.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkTimelineSemaphoreSubmitInfo.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkTimelineSemaphoreSubmitInfo.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkTimelineSemaphoreSubmitInfo.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkTimelineSemaphoreSubmitInfo.set_pNext(this.segment(), value); return this; } + + /// {@return `waitSemaphoreValueCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_waitSemaphoreValueCount(MemorySegment segment, long index) { return (int) VH_waitSemaphoreValueCount.get(segment, 0L, index); } + /// {@return `waitSemaphoreValueCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_waitSemaphoreValueCount(MemorySegment segment) { return VkTimelineSemaphoreSubmitInfo.get_waitSemaphoreValueCount(segment, 0L); } + /// {@return `waitSemaphoreValueCount` at the given index} + /// @param index the index + public @CType("uint32_t") int waitSemaphoreValueCountAt(long index) { return VkTimelineSemaphoreSubmitInfo.get_waitSemaphoreValueCount(this.segment(), index); } + /// {@return `waitSemaphoreValueCount`} + public @CType("uint32_t") int waitSemaphoreValueCount() { return VkTimelineSemaphoreSubmitInfo.get_waitSemaphoreValueCount(this.segment()); } + /// Sets `waitSemaphoreValueCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_waitSemaphoreValueCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_waitSemaphoreValueCount.set(segment, 0L, index, value); } + /// Sets `waitSemaphoreValueCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_waitSemaphoreValueCount(MemorySegment segment, @CType("uint32_t") int value) { VkTimelineSemaphoreSubmitInfo.set_waitSemaphoreValueCount(segment, 0L, value); } + /// Sets `waitSemaphoreValueCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo waitSemaphoreValueCountAt(long index, @CType("uint32_t") int value) { VkTimelineSemaphoreSubmitInfo.set_waitSemaphoreValueCount(this.segment(), index, value); return this; } + /// Sets `waitSemaphoreValueCount` with the given value. + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo waitSemaphoreValueCount(@CType("uint32_t") int value) { VkTimelineSemaphoreSubmitInfo.set_waitSemaphoreValueCount(this.segment(), value); return this; } + + /// {@return `pWaitSemaphoreValues` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pWaitSemaphoreValues(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWaitSemaphoreValues.get(segment, 0L, index); } + /// {@return `pWaitSemaphoreValues`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pWaitSemaphoreValues(MemorySegment segment) { return VkTimelineSemaphoreSubmitInfo.get_pWaitSemaphoreValues(segment, 0L); } + /// {@return `pWaitSemaphoreValues` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pWaitSemaphoreValuesAt(long index) { return VkTimelineSemaphoreSubmitInfo.get_pWaitSemaphoreValues(this.segment(), index); } + /// {@return `pWaitSemaphoreValues`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pWaitSemaphoreValues() { return VkTimelineSemaphoreSubmitInfo.get_pWaitSemaphoreValues(this.segment()); } + /// Sets `pWaitSemaphoreValues` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWaitSemaphoreValues(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pWaitSemaphoreValues.set(segment, 0L, index, value); } + /// Sets `pWaitSemaphoreValues` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWaitSemaphoreValues(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkTimelineSemaphoreSubmitInfo.set_pWaitSemaphoreValues(segment, 0L, value); } + /// Sets `pWaitSemaphoreValues` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo pWaitSemaphoreValuesAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkTimelineSemaphoreSubmitInfo.set_pWaitSemaphoreValues(this.segment(), index, value); return this; } + /// Sets `pWaitSemaphoreValues` with the given value. + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo pWaitSemaphoreValues(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkTimelineSemaphoreSubmitInfo.set_pWaitSemaphoreValues(this.segment(), value); return this; } + + /// {@return `signalSemaphoreValueCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_signalSemaphoreValueCount(MemorySegment segment, long index) { return (int) VH_signalSemaphoreValueCount.get(segment, 0L, index); } + /// {@return `signalSemaphoreValueCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_signalSemaphoreValueCount(MemorySegment segment) { return VkTimelineSemaphoreSubmitInfo.get_signalSemaphoreValueCount(segment, 0L); } + /// {@return `signalSemaphoreValueCount` at the given index} + /// @param index the index + public @CType("uint32_t") int signalSemaphoreValueCountAt(long index) { return VkTimelineSemaphoreSubmitInfo.get_signalSemaphoreValueCount(this.segment(), index); } + /// {@return `signalSemaphoreValueCount`} + public @CType("uint32_t") int signalSemaphoreValueCount() { return VkTimelineSemaphoreSubmitInfo.get_signalSemaphoreValueCount(this.segment()); } + /// Sets `signalSemaphoreValueCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_signalSemaphoreValueCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_signalSemaphoreValueCount.set(segment, 0L, index, value); } + /// Sets `signalSemaphoreValueCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_signalSemaphoreValueCount(MemorySegment segment, @CType("uint32_t") int value) { VkTimelineSemaphoreSubmitInfo.set_signalSemaphoreValueCount(segment, 0L, value); } + /// Sets `signalSemaphoreValueCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo signalSemaphoreValueCountAt(long index, @CType("uint32_t") int value) { VkTimelineSemaphoreSubmitInfo.set_signalSemaphoreValueCount(this.segment(), index, value); return this; } + /// Sets `signalSemaphoreValueCount` with the given value. + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo signalSemaphoreValueCount(@CType("uint32_t") int value) { VkTimelineSemaphoreSubmitInfo.set_signalSemaphoreValueCount(this.segment(), value); return this; } + + /// {@return `pSignalSemaphoreValues` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pSignalSemaphoreValues(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSignalSemaphoreValues.get(segment, 0L, index); } + /// {@return `pSignalSemaphoreValues`} + /// @param segment the segment of the struct + public static @CType("const uint64_t *") java.lang.foreign.MemorySegment get_pSignalSemaphoreValues(MemorySegment segment) { return VkTimelineSemaphoreSubmitInfo.get_pSignalSemaphoreValues(segment, 0L); } + /// {@return `pSignalSemaphoreValues` at the given index} + /// @param index the index + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pSignalSemaphoreValuesAt(long index) { return VkTimelineSemaphoreSubmitInfo.get_pSignalSemaphoreValues(this.segment(), index); } + /// {@return `pSignalSemaphoreValues`} + public @CType("const uint64_t *") java.lang.foreign.MemorySegment pSignalSemaphoreValues() { return VkTimelineSemaphoreSubmitInfo.get_pSignalSemaphoreValues(this.segment()); } + /// Sets `pSignalSemaphoreValues` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSignalSemaphoreValues(MemorySegment segment, long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VH_pSignalSemaphoreValues.set(segment, 0L, index, value); } + /// Sets `pSignalSemaphoreValues` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSignalSemaphoreValues(MemorySegment segment, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkTimelineSemaphoreSubmitInfo.set_pSignalSemaphoreValues(segment, 0L, value); } + /// Sets `pSignalSemaphoreValues` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo pSignalSemaphoreValuesAt(long index, @CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkTimelineSemaphoreSubmitInfo.set_pSignalSemaphoreValues(this.segment(), index, value); return this; } + /// Sets `pSignalSemaphoreValues` with the given value. + /// @param value the value + /// @return `this` + public VkTimelineSemaphoreSubmitInfo pSignalSemaphoreValues(@CType("const uint64_t *") java.lang.foreign.MemorySegment value) { VkTimelineSemaphoreSubmitInfo.set_pSignalSemaphoreValues(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkVertexInputAttributeDescription.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkVertexInputAttributeDescription.java new file mode 100644 index 00000000..0b2b9577 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkVertexInputAttributeDescription.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### location +/// [VarHandle][#VH_location] - [Getter][#location()] - [Setter][#location(int)] +/// ### binding +/// [VarHandle][#VH_binding] - [Getter][#binding()] - [Setter][#binding(int)] +/// ### format +/// [VarHandle][#VH_format] - [Getter][#format()] - [Setter][#format(int)] +/// ### offset +/// [VarHandle][#VH_offset] - [Getter][#offset()] - [Setter][#offset(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVertexInputAttributeDescription { +/// uint32_t location; +/// uint32_t binding; +/// VkFormat format; +/// uint32_t offset; +/// } VkVertexInputAttributeDescription; +/// ``` +public final class VkVertexInputAttributeDescription extends Struct { + /// The struct layout of `VkVertexInputAttributeDescription`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("location"), + ValueLayout.JAVA_INT.withName("binding"), + ValueLayout.JAVA_INT.withName("format"), + ValueLayout.JAVA_INT.withName("offset") + ); + /// The [VarHandle] of `location` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_location = LAYOUT.arrayElementVarHandle(PathElement.groupElement("location")); + /// The [VarHandle] of `binding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_binding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("binding")); + /// The [VarHandle] of `format` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("format")); + /// The [VarHandle] of `offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset")); + + /// Creates `VkVertexInputAttributeDescription` with the given segment. + /// @param segment the memory segment + public VkVertexInputAttributeDescription(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVertexInputAttributeDescription` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputAttributeDescription of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputAttributeDescription(segment); } + + /// Creates `VkVertexInputAttributeDescription` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputAttributeDescription ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputAttributeDescription(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVertexInputAttributeDescription` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputAttributeDescription ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputAttributeDescription(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVertexInputAttributeDescription` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVertexInputAttributeDescription` + public static VkVertexInputAttributeDescription alloc(SegmentAllocator allocator) { return new VkVertexInputAttributeDescription(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVertexInputAttributeDescription` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVertexInputAttributeDescription` + public static VkVertexInputAttributeDescription alloc(SegmentAllocator allocator, long count) { return new VkVertexInputAttributeDescription(allocator.allocate(LAYOUT, count)); } + + /// {@return `location` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_location(MemorySegment segment, long index) { return (int) VH_location.get(segment, 0L, index); } + /// {@return `location`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_location(MemorySegment segment) { return VkVertexInputAttributeDescription.get_location(segment, 0L); } + /// {@return `location` at the given index} + /// @param index the index + public @CType("uint32_t") int locationAt(long index) { return VkVertexInputAttributeDescription.get_location(this.segment(), index); } + /// {@return `location`} + public @CType("uint32_t") int location() { return VkVertexInputAttributeDescription.get_location(this.segment()); } + /// Sets `location` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_location(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_location.set(segment, 0L, index, value); } + /// Sets `location` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_location(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputAttributeDescription.set_location(segment, 0L, value); } + /// Sets `location` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription locationAt(long index, @CType("uint32_t") int value) { VkVertexInputAttributeDescription.set_location(this.segment(), index, value); return this; } + /// Sets `location` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription location(@CType("uint32_t") int value) { VkVertexInputAttributeDescription.set_location(this.segment(), value); return this; } + + /// {@return `binding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_binding(MemorySegment segment, long index) { return (int) VH_binding.get(segment, 0L, index); } + /// {@return `binding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_binding(MemorySegment segment) { return VkVertexInputAttributeDescription.get_binding(segment, 0L); } + /// {@return `binding` at the given index} + /// @param index the index + public @CType("uint32_t") int bindingAt(long index) { return VkVertexInputAttributeDescription.get_binding(this.segment(), index); } + /// {@return `binding`} + public @CType("uint32_t") int binding() { return VkVertexInputAttributeDescription.get_binding(this.segment()); } + /// Sets `binding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_binding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_binding.set(segment, 0L, index, value); } + /// Sets `binding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_binding(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputAttributeDescription.set_binding(segment, 0L, value); } + /// Sets `binding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription bindingAt(long index, @CType("uint32_t") int value) { VkVertexInputAttributeDescription.set_binding(this.segment(), index, value); return this; } + /// Sets `binding` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription binding(@CType("uint32_t") int value) { VkVertexInputAttributeDescription.set_binding(this.segment(), value); return this; } + + /// {@return `format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkFormat") int get_format(MemorySegment segment, long index) { return (int) VH_format.get(segment, 0L, index); } + /// {@return `format`} + /// @param segment the segment of the struct + public static @CType("VkFormat") int get_format(MemorySegment segment) { return VkVertexInputAttributeDescription.get_format(segment, 0L); } + /// {@return `format` at the given index} + /// @param index the index + public @CType("VkFormat") int formatAt(long index) { return VkVertexInputAttributeDescription.get_format(this.segment(), index); } + /// {@return `format`} + public @CType("VkFormat") int format() { return VkVertexInputAttributeDescription.get_format(this.segment()); } + /// Sets `format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_format(MemorySegment segment, long index, @CType("VkFormat") int value) { VH_format.set(segment, 0L, index, value); } + /// Sets `format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_format(MemorySegment segment, @CType("VkFormat") int value) { VkVertexInputAttributeDescription.set_format(segment, 0L, value); } + /// Sets `format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription formatAt(long index, @CType("VkFormat") int value) { VkVertexInputAttributeDescription.set_format(this.segment(), index, value); return this; } + /// Sets `format` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription format(@CType("VkFormat") int value) { VkVertexInputAttributeDescription.set_format(this.segment(), value); return this; } + + /// {@return `offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_offset(MemorySegment segment, long index) { return (int) VH_offset.get(segment, 0L, index); } + /// {@return `offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_offset(MemorySegment segment) { return VkVertexInputAttributeDescription.get_offset(segment, 0L); } + /// {@return `offset` at the given index} + /// @param index the index + public @CType("uint32_t") int offsetAt(long index) { return VkVertexInputAttributeDescription.get_offset(this.segment(), index); } + /// {@return `offset`} + public @CType("uint32_t") int offset() { return VkVertexInputAttributeDescription.get_offset(this.segment()); } + /// Sets `offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_offset.set(segment, 0L, index, value); } + /// Sets `offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputAttributeDescription.set_offset(segment, 0L, value); } + /// Sets `offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription offsetAt(long index, @CType("uint32_t") int value) { VkVertexInputAttributeDescription.set_offset(this.segment(), index, value); return this; } + /// Sets `offset` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputAttributeDescription offset(@CType("uint32_t") int value) { VkVertexInputAttributeDescription.set_offset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkVertexInputBindingDescription.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkVertexInputBindingDescription.java new file mode 100644 index 00000000..d8da7381 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkVertexInputBindingDescription.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### binding +/// [VarHandle][#VH_binding] - [Getter][#binding()] - [Setter][#binding(int)] +/// ### stride +/// [VarHandle][#VH_stride] - [Getter][#stride()] - [Setter][#stride(int)] +/// ### inputRate +/// [VarHandle][#VH_inputRate] - [Getter][#inputRate()] - [Setter][#inputRate(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVertexInputBindingDescription { +/// uint32_t binding; +/// uint32_t stride; +/// VkVertexInputRate inputRate; +/// } VkVertexInputBindingDescription; +/// ``` +public final class VkVertexInputBindingDescription extends Struct { + /// The struct layout of `VkVertexInputBindingDescription`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("binding"), + ValueLayout.JAVA_INT.withName("stride"), + ValueLayout.JAVA_INT.withName("inputRate") + ); + /// The [VarHandle] of `binding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_binding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("binding")); + /// The [VarHandle] of `stride` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_stride = LAYOUT.arrayElementVarHandle(PathElement.groupElement("stride")); + /// The [VarHandle] of `inputRate` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inputRate = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inputRate")); + + /// Creates `VkVertexInputBindingDescription` with the given segment. + /// @param segment the memory segment + public VkVertexInputBindingDescription(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVertexInputBindingDescription` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputBindingDescription of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputBindingDescription(segment); } + + /// Creates `VkVertexInputBindingDescription` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputBindingDescription ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputBindingDescription(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVertexInputBindingDescription` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputBindingDescription ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputBindingDescription(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVertexInputBindingDescription` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVertexInputBindingDescription` + public static VkVertexInputBindingDescription alloc(SegmentAllocator allocator) { return new VkVertexInputBindingDescription(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVertexInputBindingDescription` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVertexInputBindingDescription` + public static VkVertexInputBindingDescription alloc(SegmentAllocator allocator, long count) { return new VkVertexInputBindingDescription(allocator.allocate(LAYOUT, count)); } + + /// {@return `binding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_binding(MemorySegment segment, long index) { return (int) VH_binding.get(segment, 0L, index); } + /// {@return `binding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_binding(MemorySegment segment) { return VkVertexInputBindingDescription.get_binding(segment, 0L); } + /// {@return `binding` at the given index} + /// @param index the index + public @CType("uint32_t") int bindingAt(long index) { return VkVertexInputBindingDescription.get_binding(this.segment(), index); } + /// {@return `binding`} + public @CType("uint32_t") int binding() { return VkVertexInputBindingDescription.get_binding(this.segment()); } + /// Sets `binding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_binding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_binding.set(segment, 0L, index, value); } + /// Sets `binding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_binding(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputBindingDescription.set_binding(segment, 0L, value); } + /// Sets `binding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription bindingAt(long index, @CType("uint32_t") int value) { VkVertexInputBindingDescription.set_binding(this.segment(), index, value); return this; } + /// Sets `binding` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription binding(@CType("uint32_t") int value) { VkVertexInputBindingDescription.set_binding(this.segment(), value); return this; } + + /// {@return `stride` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_stride(MemorySegment segment, long index) { return (int) VH_stride.get(segment, 0L, index); } + /// {@return `stride`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_stride(MemorySegment segment) { return VkVertexInputBindingDescription.get_stride(segment, 0L); } + /// {@return `stride` at the given index} + /// @param index the index + public @CType("uint32_t") int strideAt(long index) { return VkVertexInputBindingDescription.get_stride(this.segment(), index); } + /// {@return `stride`} + public @CType("uint32_t") int stride() { return VkVertexInputBindingDescription.get_stride(this.segment()); } + /// Sets `stride` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_stride(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_stride.set(segment, 0L, index, value); } + /// Sets `stride` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_stride(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputBindingDescription.set_stride(segment, 0L, value); } + /// Sets `stride` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription strideAt(long index, @CType("uint32_t") int value) { VkVertexInputBindingDescription.set_stride(this.segment(), index, value); return this; } + /// Sets `stride` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription stride(@CType("uint32_t") int value) { VkVertexInputBindingDescription.set_stride(this.segment(), value); return this; } + + /// {@return `inputRate` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkVertexInputRate") int get_inputRate(MemorySegment segment, long index) { return (int) VH_inputRate.get(segment, 0L, index); } + /// {@return `inputRate`} + /// @param segment the segment of the struct + public static @CType("VkVertexInputRate") int get_inputRate(MemorySegment segment) { return VkVertexInputBindingDescription.get_inputRate(segment, 0L); } + /// {@return `inputRate` at the given index} + /// @param index the index + public @CType("VkVertexInputRate") int inputRateAt(long index) { return VkVertexInputBindingDescription.get_inputRate(this.segment(), index); } + /// {@return `inputRate`} + public @CType("VkVertexInputRate") int inputRate() { return VkVertexInputBindingDescription.get_inputRate(this.segment()); } + /// Sets `inputRate` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inputRate(MemorySegment segment, long index, @CType("VkVertexInputRate") int value) { VH_inputRate.set(segment, 0L, index, value); } + /// Sets `inputRate` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inputRate(MemorySegment segment, @CType("VkVertexInputRate") int value) { VkVertexInputBindingDescription.set_inputRate(segment, 0L, value); } + /// Sets `inputRate` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription inputRateAt(long index, @CType("VkVertexInputRate") int value) { VkVertexInputBindingDescription.set_inputRate(this.segment(), index, value); return this; } + /// Sets `inputRate` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDescription inputRate(@CType("VkVertexInputRate") int value) { VkVertexInputBindingDescription.set_inputRate(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkVertexInputBindingDivisorDescription.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkVertexInputBindingDivisorDescription.java new file mode 100644 index 00000000..8eeb41ab --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkVertexInputBindingDivisorDescription.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### binding +/// [VarHandle][#VH_binding] - [Getter][#binding()] - [Setter][#binding(int)] +/// ### divisor +/// [VarHandle][#VH_divisor] - [Getter][#divisor()] - [Setter][#divisor(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkVertexInputBindingDivisorDescription { +/// uint32_t binding; +/// uint32_t divisor; +/// } VkVertexInputBindingDivisorDescription; +/// ``` +public final class VkVertexInputBindingDivisorDescription extends Struct { + /// The struct layout of `VkVertexInputBindingDivisorDescription`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("binding"), + ValueLayout.JAVA_INT.withName("divisor") + ); + /// The [VarHandle] of `binding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_binding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("binding")); + /// The [VarHandle] of `divisor` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_divisor = LAYOUT.arrayElementVarHandle(PathElement.groupElement("divisor")); + + /// Creates `VkVertexInputBindingDivisorDescription` with the given segment. + /// @param segment the memory segment + public VkVertexInputBindingDivisorDescription(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkVertexInputBindingDivisorDescription` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputBindingDivisorDescription of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputBindingDivisorDescription(segment); } + + /// Creates `VkVertexInputBindingDivisorDescription` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputBindingDivisorDescription ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputBindingDivisorDescription(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkVertexInputBindingDivisorDescription` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkVertexInputBindingDivisorDescription ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkVertexInputBindingDivisorDescription(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkVertexInputBindingDivisorDescription` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkVertexInputBindingDivisorDescription` + public static VkVertexInputBindingDivisorDescription alloc(SegmentAllocator allocator) { return new VkVertexInputBindingDivisorDescription(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkVertexInputBindingDivisorDescription` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkVertexInputBindingDivisorDescription` + public static VkVertexInputBindingDivisorDescription alloc(SegmentAllocator allocator, long count) { return new VkVertexInputBindingDivisorDescription(allocator.allocate(LAYOUT, count)); } + + /// {@return `binding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_binding(MemorySegment segment, long index) { return (int) VH_binding.get(segment, 0L, index); } + /// {@return `binding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_binding(MemorySegment segment) { return VkVertexInputBindingDivisorDescription.get_binding(segment, 0L); } + /// {@return `binding` at the given index} + /// @param index the index + public @CType("uint32_t") int bindingAt(long index) { return VkVertexInputBindingDivisorDescription.get_binding(this.segment(), index); } + /// {@return `binding`} + public @CType("uint32_t") int binding() { return VkVertexInputBindingDivisorDescription.get_binding(this.segment()); } + /// Sets `binding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_binding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_binding.set(segment, 0L, index, value); } + /// Sets `binding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_binding(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputBindingDivisorDescription.set_binding(segment, 0L, value); } + /// Sets `binding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDivisorDescription bindingAt(long index, @CType("uint32_t") int value) { VkVertexInputBindingDivisorDescription.set_binding(this.segment(), index, value); return this; } + /// Sets `binding` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDivisorDescription binding(@CType("uint32_t") int value) { VkVertexInputBindingDivisorDescription.set_binding(this.segment(), value); return this; } + + /// {@return `divisor` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_divisor(MemorySegment segment, long index) { return (int) VH_divisor.get(segment, 0L, index); } + /// {@return `divisor`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_divisor(MemorySegment segment) { return VkVertexInputBindingDivisorDescription.get_divisor(segment, 0L); } + /// {@return `divisor` at the given index} + /// @param index the index + public @CType("uint32_t") int divisorAt(long index) { return VkVertexInputBindingDivisorDescription.get_divisor(this.segment(), index); } + /// {@return `divisor`} + public @CType("uint32_t") int divisor() { return VkVertexInputBindingDivisorDescription.get_divisor(this.segment()); } + /// Sets `divisor` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_divisor(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_divisor.set(segment, 0L, index, value); } + /// Sets `divisor` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_divisor(MemorySegment segment, @CType("uint32_t") int value) { VkVertexInputBindingDivisorDescription.set_divisor(segment, 0L, value); } + /// Sets `divisor` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkVertexInputBindingDivisorDescription divisorAt(long index, @CType("uint32_t") int value) { VkVertexInputBindingDivisorDescription.set_divisor(this.segment(), index, value); return this; } + /// Sets `divisor` with the given value. + /// @param value the value + /// @return `this` + public VkVertexInputBindingDivisorDescription divisor(@CType("uint32_t") int value) { VkVertexInputBindingDivisorDescription.set_divisor(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkViewport.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkViewport.java new file mode 100644 index 00000000..9b0e996d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkViewport.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### x +/// [VarHandle][#VH_x] - [Getter][#x()] - [Setter][#x(float)] +/// ### y +/// [VarHandle][#VH_y] - [Getter][#y()] - [Setter][#y(float)] +/// ### width +/// [VarHandle][#VH_width] - [Getter][#width()] - [Setter][#width(float)] +/// ### height +/// [VarHandle][#VH_height] - [Getter][#height()] - [Setter][#height(float)] +/// ### minDepth +/// [VarHandle][#VH_minDepth] - [Getter][#minDepth()] - [Setter][#minDepth(float)] +/// ### maxDepth +/// [VarHandle][#VH_maxDepth] - [Getter][#maxDepth()] - [Setter][#maxDepth(float)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkViewport { +/// float x; +/// float y; +/// float width; +/// float height; +/// float minDepth; +/// float maxDepth; +/// } VkViewport; +/// ``` +public final class VkViewport extends Struct { + /// The struct layout of `VkViewport`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_FLOAT.withName("x"), + ValueLayout.JAVA_FLOAT.withName("y"), + ValueLayout.JAVA_FLOAT.withName("width"), + ValueLayout.JAVA_FLOAT.withName("height"), + ValueLayout.JAVA_FLOAT.withName("minDepth"), + ValueLayout.JAVA_FLOAT.withName("maxDepth") + ); + /// The [VarHandle] of `x` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_x = LAYOUT.arrayElementVarHandle(PathElement.groupElement("x")); + /// The [VarHandle] of `y` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_y = LAYOUT.arrayElementVarHandle(PathElement.groupElement("y")); + /// The [VarHandle] of `width` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_width = LAYOUT.arrayElementVarHandle(PathElement.groupElement("width")); + /// The [VarHandle] of `height` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_height = LAYOUT.arrayElementVarHandle(PathElement.groupElement("height")); + /// The [VarHandle] of `minDepth` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_minDepth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("minDepth")); + /// The [VarHandle] of `maxDepth` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_maxDepth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("maxDepth")); + + /// Creates `VkViewport` with the given segment. + /// @param segment the memory segment + public VkViewport(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkViewport` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkViewport of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkViewport(segment); } + + /// Creates `VkViewport` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkViewport ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkViewport(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkViewport` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkViewport ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkViewport(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkViewport` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkViewport` + public static VkViewport alloc(SegmentAllocator allocator) { return new VkViewport(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkViewport` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkViewport` + public static VkViewport alloc(SegmentAllocator allocator, long count) { return new VkViewport(allocator.allocate(LAYOUT, count)); } + + /// {@return `x` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_x(MemorySegment segment, long index) { return (float) VH_x.get(segment, 0L, index); } + /// {@return `x`} + /// @param segment the segment of the struct + public static @CType("float") float get_x(MemorySegment segment) { return VkViewport.get_x(segment, 0L); } + /// {@return `x` at the given index} + /// @param index the index + public @CType("float") float xAt(long index) { return VkViewport.get_x(this.segment(), index); } + /// {@return `x`} + public @CType("float") float x() { return VkViewport.get_x(this.segment()); } + /// Sets `x` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_x(MemorySegment segment, long index, @CType("float") float value) { VH_x.set(segment, 0L, index, value); } + /// Sets `x` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_x(MemorySegment segment, @CType("float") float value) { VkViewport.set_x(segment, 0L, value); } + /// Sets `x` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewport xAt(long index, @CType("float") float value) { VkViewport.set_x(this.segment(), index, value); return this; } + /// Sets `x` with the given value. + /// @param value the value + /// @return `this` + public VkViewport x(@CType("float") float value) { VkViewport.set_x(this.segment(), value); return this; } + + /// {@return `y` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_y(MemorySegment segment, long index) { return (float) VH_y.get(segment, 0L, index); } + /// {@return `y`} + /// @param segment the segment of the struct + public static @CType("float") float get_y(MemorySegment segment) { return VkViewport.get_y(segment, 0L); } + /// {@return `y` at the given index} + /// @param index the index + public @CType("float") float yAt(long index) { return VkViewport.get_y(this.segment(), index); } + /// {@return `y`} + public @CType("float") float y() { return VkViewport.get_y(this.segment()); } + /// Sets `y` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_y(MemorySegment segment, long index, @CType("float") float value) { VH_y.set(segment, 0L, index, value); } + /// Sets `y` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_y(MemorySegment segment, @CType("float") float value) { VkViewport.set_y(segment, 0L, value); } + /// Sets `y` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewport yAt(long index, @CType("float") float value) { VkViewport.set_y(this.segment(), index, value); return this; } + /// Sets `y` with the given value. + /// @param value the value + /// @return `this` + public VkViewport y(@CType("float") float value) { VkViewport.set_y(this.segment(), value); return this; } + + /// {@return `width` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_width(MemorySegment segment, long index) { return (float) VH_width.get(segment, 0L, index); } + /// {@return `width`} + /// @param segment the segment of the struct + public static @CType("float") float get_width(MemorySegment segment) { return VkViewport.get_width(segment, 0L); } + /// {@return `width` at the given index} + /// @param index the index + public @CType("float") float widthAt(long index) { return VkViewport.get_width(this.segment(), index); } + /// {@return `width`} + public @CType("float") float width() { return VkViewport.get_width(this.segment()); } + /// Sets `width` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_width(MemorySegment segment, long index, @CType("float") float value) { VH_width.set(segment, 0L, index, value); } + /// Sets `width` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_width(MemorySegment segment, @CType("float") float value) { VkViewport.set_width(segment, 0L, value); } + /// Sets `width` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewport widthAt(long index, @CType("float") float value) { VkViewport.set_width(this.segment(), index, value); return this; } + /// Sets `width` with the given value. + /// @param value the value + /// @return `this` + public VkViewport width(@CType("float") float value) { VkViewport.set_width(this.segment(), value); return this; } + + /// {@return `height` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_height(MemorySegment segment, long index) { return (float) VH_height.get(segment, 0L, index); } + /// {@return `height`} + /// @param segment the segment of the struct + public static @CType("float") float get_height(MemorySegment segment) { return VkViewport.get_height(segment, 0L); } + /// {@return `height` at the given index} + /// @param index the index + public @CType("float") float heightAt(long index) { return VkViewport.get_height(this.segment(), index); } + /// {@return `height`} + public @CType("float") float height() { return VkViewport.get_height(this.segment()); } + /// Sets `height` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_height(MemorySegment segment, long index, @CType("float") float value) { VH_height.set(segment, 0L, index, value); } + /// Sets `height` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_height(MemorySegment segment, @CType("float") float value) { VkViewport.set_height(segment, 0L, value); } + /// Sets `height` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewport heightAt(long index, @CType("float") float value) { VkViewport.set_height(this.segment(), index, value); return this; } + /// Sets `height` with the given value. + /// @param value the value + /// @return `this` + public VkViewport height(@CType("float") float value) { VkViewport.set_height(this.segment(), value); return this; } + + /// {@return `minDepth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_minDepth(MemorySegment segment, long index) { return (float) VH_minDepth.get(segment, 0L, index); } + /// {@return `minDepth`} + /// @param segment the segment of the struct + public static @CType("float") float get_minDepth(MemorySegment segment) { return VkViewport.get_minDepth(segment, 0L); } + /// {@return `minDepth` at the given index} + /// @param index the index + public @CType("float") float minDepthAt(long index) { return VkViewport.get_minDepth(this.segment(), index); } + /// {@return `minDepth`} + public @CType("float") float minDepth() { return VkViewport.get_minDepth(this.segment()); } + /// Sets `minDepth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_minDepth(MemorySegment segment, long index, @CType("float") float value) { VH_minDepth.set(segment, 0L, index, value); } + /// Sets `minDepth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_minDepth(MemorySegment segment, @CType("float") float value) { VkViewport.set_minDepth(segment, 0L, value); } + /// Sets `minDepth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewport minDepthAt(long index, @CType("float") float value) { VkViewport.set_minDepth(this.segment(), index, value); return this; } + /// Sets `minDepth` with the given value. + /// @param value the value + /// @return `this` + public VkViewport minDepth(@CType("float") float value) { VkViewport.set_minDepth(this.segment(), value); return this; } + + /// {@return `maxDepth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_maxDepth(MemorySegment segment, long index) { return (float) VH_maxDepth.get(segment, 0L, index); } + /// {@return `maxDepth`} + /// @param segment the segment of the struct + public static @CType("float") float get_maxDepth(MemorySegment segment) { return VkViewport.get_maxDepth(segment, 0L); } + /// {@return `maxDepth` at the given index} + /// @param index the index + public @CType("float") float maxDepthAt(long index) { return VkViewport.get_maxDepth(this.segment(), index); } + /// {@return `maxDepth`} + public @CType("float") float maxDepth() { return VkViewport.get_maxDepth(this.segment()); } + /// Sets `maxDepth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_maxDepth(MemorySegment segment, long index, @CType("float") float value) { VH_maxDepth.set(segment, 0L, index, value); } + /// Sets `maxDepth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_maxDepth(MemorySegment segment, @CType("float") float value) { VkViewport.set_maxDepth(segment, 0L, value); } + /// Sets `maxDepth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkViewport maxDepthAt(long index, @CType("float") float value) { VkViewport.set_maxDepth(this.segment(), index, value); return this; } + /// Sets `maxDepth` with the given value. + /// @param value the value + /// @return `this` + public VkViewport maxDepth(@CType("float") float value) { VkViewport.set_maxDepth(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkWriteDescriptorSet.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkWriteDescriptorSet.java new file mode 100644 index 00000000..e99885a6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkWriteDescriptorSet.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dstSet +/// [VarHandle][#VH_dstSet] - [Getter][#dstSet()] - [Setter][#dstSet(java.lang.foreign.MemorySegment)] +/// ### dstBinding +/// [VarHandle][#VH_dstBinding] - [Getter][#dstBinding()] - [Setter][#dstBinding(int)] +/// ### dstArrayElement +/// [VarHandle][#VH_dstArrayElement] - [Getter][#dstArrayElement()] - [Setter][#dstArrayElement(int)] +/// ### descriptorCount +/// [VarHandle][#VH_descriptorCount] - [Getter][#descriptorCount()] - [Setter][#descriptorCount(int)] +/// ### descriptorType +/// [VarHandle][#VH_descriptorType] - [Getter][#descriptorType()] - [Setter][#descriptorType(int)] +/// ### pImageInfo +/// [VarHandle][#VH_pImageInfo] - [Getter][#pImageInfo()] - [Setter][#pImageInfo(java.lang.foreign.MemorySegment)] +/// ### pBufferInfo +/// [VarHandle][#VH_pBufferInfo] - [Getter][#pBufferInfo()] - [Setter][#pBufferInfo(java.lang.foreign.MemorySegment)] +/// ### pTexelBufferView +/// [VarHandle][#VH_pTexelBufferView] - [Getter][#pTexelBufferView()] - [Setter][#pTexelBufferView(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkWriteDescriptorSet { +/// VkStructureType sType; +/// const void * pNext; +/// VkDescriptorSet dstSet; +/// uint32_t dstBinding; +/// uint32_t dstArrayElement; +/// uint32_t descriptorCount; +/// VkDescriptorType descriptorType; +/// const VkDescriptorImageInfo * pImageInfo; +/// const VkDescriptorBufferInfo * pBufferInfo; +/// const VkBufferView * pTexelBufferView; +/// } VkWriteDescriptorSet; +/// ``` +public final class VkWriteDescriptorSet extends Struct { + /// The struct layout of `VkWriteDescriptorSet`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("dstSet"), + ValueLayout.JAVA_INT.withName("dstBinding"), + ValueLayout.JAVA_INT.withName("dstArrayElement"), + ValueLayout.JAVA_INT.withName("descriptorCount"), + ValueLayout.JAVA_INT.withName("descriptorType"), + ValueLayout.ADDRESS.withName("pImageInfo"), + ValueLayout.ADDRESS.withName("pBufferInfo"), + ValueLayout.ADDRESS.withName("pTexelBufferView") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dstSet` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_dstSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstSet")); + /// The [VarHandle] of `dstBinding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstBinding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstBinding")); + /// The [VarHandle] of `dstArrayElement` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dstArrayElement = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dstArrayElement")); + /// The [VarHandle] of `descriptorCount` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorCount")); + /// The [VarHandle] of `descriptorType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorType")); + /// The [VarHandle] of `pImageInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pImageInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pImageInfo")); + /// The [VarHandle] of `pBufferInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBufferInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBufferInfo")); + /// The [VarHandle] of `pTexelBufferView` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTexelBufferView = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTexelBufferView")); + + /// Creates `VkWriteDescriptorSet` with the given segment. + /// @param segment the memory segment + public VkWriteDescriptorSet(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkWriteDescriptorSet` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSet of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSet(segment); } + + /// Creates `VkWriteDescriptorSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSet ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkWriteDescriptorSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSet ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkWriteDescriptorSet` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkWriteDescriptorSet` + public static VkWriteDescriptorSet alloc(SegmentAllocator allocator) { return new VkWriteDescriptorSet(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkWriteDescriptorSet` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkWriteDescriptorSet` + public static VkWriteDescriptorSet alloc(SegmentAllocator allocator, long count) { return new VkWriteDescriptorSet(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkWriteDescriptorSet.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkWriteDescriptorSet.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkWriteDescriptorSet.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkWriteDescriptorSet.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet sTypeAt(long index, @CType("VkStructureType") int value) { VkWriteDescriptorSet.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet sType(@CType("VkStructureType") int value) { VkWriteDescriptorSet.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkWriteDescriptorSet.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkWriteDescriptorSet.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkWriteDescriptorSet.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pNext(this.segment(), value); return this; } + + /// {@return `dstSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorSet") java.lang.foreign.MemorySegment get_dstSet(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_dstSet.get(segment, 0L, index); } + /// {@return `dstSet`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorSet") java.lang.foreign.MemorySegment get_dstSet(MemorySegment segment) { return VkWriteDescriptorSet.get_dstSet(segment, 0L); } + /// {@return `dstSet` at the given index} + /// @param index the index + public @CType("VkDescriptorSet") java.lang.foreign.MemorySegment dstSetAt(long index) { return VkWriteDescriptorSet.get_dstSet(this.segment(), index); } + /// {@return `dstSet`} + public @CType("VkDescriptorSet") java.lang.foreign.MemorySegment dstSet() { return VkWriteDescriptorSet.get_dstSet(this.segment()); } + /// Sets `dstSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstSet(MemorySegment segment, long index, @CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VH_dstSet.set(segment, 0L, index, value); } + /// Sets `dstSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstSet(MemorySegment segment, @CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_dstSet(segment, 0L, value); } + /// Sets `dstSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet dstSetAt(long index, @CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_dstSet(this.segment(), index, value); return this; } + /// Sets `dstSet` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet dstSet(@CType("VkDescriptorSet") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_dstSet(this.segment(), value); return this; } + + /// {@return `dstBinding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstBinding(MemorySegment segment, long index) { return (int) VH_dstBinding.get(segment, 0L, index); } + /// {@return `dstBinding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstBinding(MemorySegment segment) { return VkWriteDescriptorSet.get_dstBinding(segment, 0L); } + /// {@return `dstBinding` at the given index} + /// @param index the index + public @CType("uint32_t") int dstBindingAt(long index) { return VkWriteDescriptorSet.get_dstBinding(this.segment(), index); } + /// {@return `dstBinding`} + public @CType("uint32_t") int dstBinding() { return VkWriteDescriptorSet.get_dstBinding(this.segment()); } + /// Sets `dstBinding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstBinding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstBinding.set(segment, 0L, index, value); } + /// Sets `dstBinding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstBinding(MemorySegment segment, @CType("uint32_t") int value) { VkWriteDescriptorSet.set_dstBinding(segment, 0L, value); } + /// Sets `dstBinding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet dstBindingAt(long index, @CType("uint32_t") int value) { VkWriteDescriptorSet.set_dstBinding(this.segment(), index, value); return this; } + /// Sets `dstBinding` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet dstBinding(@CType("uint32_t") int value) { VkWriteDescriptorSet.set_dstBinding(this.segment(), value); return this; } + + /// {@return `dstArrayElement` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dstArrayElement(MemorySegment segment, long index) { return (int) VH_dstArrayElement.get(segment, 0L, index); } + /// {@return `dstArrayElement`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dstArrayElement(MemorySegment segment) { return VkWriteDescriptorSet.get_dstArrayElement(segment, 0L); } + /// {@return `dstArrayElement` at the given index} + /// @param index the index + public @CType("uint32_t") int dstArrayElementAt(long index) { return VkWriteDescriptorSet.get_dstArrayElement(this.segment(), index); } + /// {@return `dstArrayElement`} + public @CType("uint32_t") int dstArrayElement() { return VkWriteDescriptorSet.get_dstArrayElement(this.segment()); } + /// Sets `dstArrayElement` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dstArrayElement(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dstArrayElement.set(segment, 0L, index, value); } + /// Sets `dstArrayElement` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dstArrayElement(MemorySegment segment, @CType("uint32_t") int value) { VkWriteDescriptorSet.set_dstArrayElement(segment, 0L, value); } + /// Sets `dstArrayElement` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet dstArrayElementAt(long index, @CType("uint32_t") int value) { VkWriteDescriptorSet.set_dstArrayElement(this.segment(), index, value); return this; } + /// Sets `dstArrayElement` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet dstArrayElement(@CType("uint32_t") int value) { VkWriteDescriptorSet.set_dstArrayElement(this.segment(), value); return this; } + + /// {@return `descriptorCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorCount(MemorySegment segment, long index) { return (int) VH_descriptorCount.get(segment, 0L, index); } + /// {@return `descriptorCount`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorCount(MemorySegment segment) { return VkWriteDescriptorSet.get_descriptorCount(segment, 0L); } + /// {@return `descriptorCount` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorCountAt(long index) { return VkWriteDescriptorSet.get_descriptorCount(this.segment(), index); } + /// {@return `descriptorCount`} + public @CType("uint32_t") int descriptorCount() { return VkWriteDescriptorSet.get_descriptorCount(this.segment()); } + /// Sets `descriptorCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorCount(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorCount.set(segment, 0L, index, value); } + /// Sets `descriptorCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorCount(MemorySegment segment, @CType("uint32_t") int value) { VkWriteDescriptorSet.set_descriptorCount(segment, 0L, value); } + /// Sets `descriptorCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet descriptorCountAt(long index, @CType("uint32_t") int value) { VkWriteDescriptorSet.set_descriptorCount(this.segment(), index, value); return this; } + /// Sets `descriptorCount` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet descriptorCount(@CType("uint32_t") int value) { VkWriteDescriptorSet.set_descriptorCount(this.segment(), value); return this; } + + /// {@return `descriptorType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorType") int get_descriptorType(MemorySegment segment, long index) { return (int) VH_descriptorType.get(segment, 0L, index); } + /// {@return `descriptorType`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorType") int get_descriptorType(MemorySegment segment) { return VkWriteDescriptorSet.get_descriptorType(segment, 0L); } + /// {@return `descriptorType` at the given index} + /// @param index the index + public @CType("VkDescriptorType") int descriptorTypeAt(long index) { return VkWriteDescriptorSet.get_descriptorType(this.segment(), index); } + /// {@return `descriptorType`} + public @CType("VkDescriptorType") int descriptorType() { return VkWriteDescriptorSet.get_descriptorType(this.segment()); } + /// Sets `descriptorType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorType(MemorySegment segment, long index, @CType("VkDescriptorType") int value) { VH_descriptorType.set(segment, 0L, index, value); } + /// Sets `descriptorType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorType(MemorySegment segment, @CType("VkDescriptorType") int value) { VkWriteDescriptorSet.set_descriptorType(segment, 0L, value); } + /// Sets `descriptorType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet descriptorTypeAt(long index, @CType("VkDescriptorType") int value) { VkWriteDescriptorSet.set_descriptorType(this.segment(), index, value); return this; } + /// Sets `descriptorType` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet descriptorType(@CType("VkDescriptorType") int value) { VkWriteDescriptorSet.set_descriptorType(this.segment(), value); return this; } + + /// {@return `pImageInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment get_pImageInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pImageInfo.get(segment, 0L, index); } + /// {@return `pImageInfo`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment get_pImageInfo(MemorySegment segment) { return VkWriteDescriptorSet.get_pImageInfo(segment, 0L); } + /// {@return `pImageInfo` at the given index} + /// @param index the index + public @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment pImageInfoAt(long index) { return VkWriteDescriptorSet.get_pImageInfo(this.segment(), index); } + /// {@return `pImageInfo`} + public @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment pImageInfo() { return VkWriteDescriptorSet.get_pImageInfo(this.segment()); } + /// Sets `pImageInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pImageInfo(MemorySegment segment, long index, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VH_pImageInfo.set(segment, 0L, index, value); } + /// Sets `pImageInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pImageInfo(MemorySegment segment, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pImageInfo(segment, 0L, value); } + /// Sets `pImageInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet pImageInfoAt(long index, @CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pImageInfo(this.segment(), index, value); return this; } + /// Sets `pImageInfo` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet pImageInfo(@CType("const VkDescriptorImageInfo *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pImageInfo(this.segment(), value); return this; } + + /// {@return `pBufferInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkDescriptorBufferInfo *") java.lang.foreign.MemorySegment get_pBufferInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBufferInfo.get(segment, 0L, index); } + /// {@return `pBufferInfo`} + /// @param segment the segment of the struct + public static @CType("const VkDescriptorBufferInfo *") java.lang.foreign.MemorySegment get_pBufferInfo(MemorySegment segment) { return VkWriteDescriptorSet.get_pBufferInfo(segment, 0L); } + /// {@return `pBufferInfo` at the given index} + /// @param index the index + public @CType("const VkDescriptorBufferInfo *") java.lang.foreign.MemorySegment pBufferInfoAt(long index) { return VkWriteDescriptorSet.get_pBufferInfo(this.segment(), index); } + /// {@return `pBufferInfo`} + public @CType("const VkDescriptorBufferInfo *") java.lang.foreign.MemorySegment pBufferInfo() { return VkWriteDescriptorSet.get_pBufferInfo(this.segment()); } + /// Sets `pBufferInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBufferInfo(MemorySegment segment, long index, @CType("const VkDescriptorBufferInfo *") java.lang.foreign.MemorySegment value) { VH_pBufferInfo.set(segment, 0L, index, value); } + /// Sets `pBufferInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBufferInfo(MemorySegment segment, @CType("const VkDescriptorBufferInfo *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pBufferInfo(segment, 0L, value); } + /// Sets `pBufferInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet pBufferInfoAt(long index, @CType("const VkDescriptorBufferInfo *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pBufferInfo(this.segment(), index, value); return this; } + /// Sets `pBufferInfo` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet pBufferInfo(@CType("const VkDescriptorBufferInfo *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pBufferInfo(this.segment(), value); return this; } + + /// {@return `pTexelBufferView` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const VkBufferView *") java.lang.foreign.MemorySegment get_pTexelBufferView(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTexelBufferView.get(segment, 0L, index); } + /// {@return `pTexelBufferView`} + /// @param segment the segment of the struct + public static @CType("const VkBufferView *") java.lang.foreign.MemorySegment get_pTexelBufferView(MemorySegment segment) { return VkWriteDescriptorSet.get_pTexelBufferView(segment, 0L); } + /// {@return `pTexelBufferView` at the given index} + /// @param index the index + public @CType("const VkBufferView *") java.lang.foreign.MemorySegment pTexelBufferViewAt(long index) { return VkWriteDescriptorSet.get_pTexelBufferView(this.segment(), index); } + /// {@return `pTexelBufferView`} + public @CType("const VkBufferView *") java.lang.foreign.MemorySegment pTexelBufferView() { return VkWriteDescriptorSet.get_pTexelBufferView(this.segment()); } + /// Sets `pTexelBufferView` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTexelBufferView(MemorySegment segment, long index, @CType("const VkBufferView *") java.lang.foreign.MemorySegment value) { VH_pTexelBufferView.set(segment, 0L, index, value); } + /// Sets `pTexelBufferView` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTexelBufferView(MemorySegment segment, @CType("const VkBufferView *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pTexelBufferView(segment, 0L, value); } + /// Sets `pTexelBufferView` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet pTexelBufferViewAt(long index, @CType("const VkBufferView *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pTexelBufferView(this.segment(), index, value); return this; } + /// Sets `pTexelBufferView` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSet pTexelBufferView(@CType("const VkBufferView *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSet.set_pTexelBufferView(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkWriteDescriptorSetInlineUniformBlock.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkWriteDescriptorSetInlineUniformBlock.java new file mode 100644 index 00000000..3c6a2ac0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/struct/VkWriteDescriptorSetInlineUniformBlock.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### dataSize +/// [VarHandle][#VH_dataSize] - [Getter][#dataSize()] - [Setter][#dataSize(int)] +/// ### pData +/// [VarHandle][#VH_pData] - [Getter][#pData()] - [Setter][#pData(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkWriteDescriptorSetInlineUniformBlock { +/// VkStructureType sType; +/// const void * pNext; +/// uint32_t dataSize; +/// const void * pData; +/// } VkWriteDescriptorSetInlineUniformBlock; +/// ``` +public final class VkWriteDescriptorSetInlineUniformBlock extends Struct { + /// The struct layout of `VkWriteDescriptorSetInlineUniformBlock`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("dataSize"), + ValueLayout.ADDRESS.withName("pData") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `dataSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dataSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dataSize")); + /// The [VarHandle] of `pData` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pData")); + + /// Creates `VkWriteDescriptorSetInlineUniformBlock` with the given segment. + /// @param segment the memory segment + public VkWriteDescriptorSetInlineUniformBlock(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkWriteDescriptorSetInlineUniformBlock` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSetInlineUniformBlock of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSetInlineUniformBlock(segment); } + + /// Creates `VkWriteDescriptorSetInlineUniformBlock` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSetInlineUniformBlock ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSetInlineUniformBlock(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkWriteDescriptorSetInlineUniformBlock` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkWriteDescriptorSetInlineUniformBlock ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkWriteDescriptorSetInlineUniformBlock(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkWriteDescriptorSetInlineUniformBlock` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkWriteDescriptorSetInlineUniformBlock` + public static VkWriteDescriptorSetInlineUniformBlock alloc(SegmentAllocator allocator) { return new VkWriteDescriptorSetInlineUniformBlock(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkWriteDescriptorSetInlineUniformBlock` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkWriteDescriptorSetInlineUniformBlock` + public static VkWriteDescriptorSetInlineUniformBlock alloc(SegmentAllocator allocator, long count) { return new VkWriteDescriptorSetInlineUniformBlock(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkWriteDescriptorSetInlineUniformBlock.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkWriteDescriptorSetInlineUniformBlock.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkWriteDescriptorSetInlineUniformBlock.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkWriteDescriptorSetInlineUniformBlock.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetInlineUniformBlock sTypeAt(long index, @CType("VkStructureType") int value) { VkWriteDescriptorSetInlineUniformBlock.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetInlineUniformBlock sType(@CType("VkStructureType") int value) { VkWriteDescriptorSetInlineUniformBlock.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkWriteDescriptorSetInlineUniformBlock.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkWriteDescriptorSetInlineUniformBlock.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkWriteDescriptorSetInlineUniformBlock.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetInlineUniformBlock.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetInlineUniformBlock pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetInlineUniformBlock.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetInlineUniformBlock pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetInlineUniformBlock.set_pNext(this.segment(), value); return this; } + + /// {@return `dataSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dataSize(MemorySegment segment, long index) { return (int) VH_dataSize.get(segment, 0L, index); } + /// {@return `dataSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dataSize(MemorySegment segment) { return VkWriteDescriptorSetInlineUniformBlock.get_dataSize(segment, 0L); } + /// {@return `dataSize` at the given index} + /// @param index the index + public @CType("uint32_t") int dataSizeAt(long index) { return VkWriteDescriptorSetInlineUniformBlock.get_dataSize(this.segment(), index); } + /// {@return `dataSize`} + public @CType("uint32_t") int dataSize() { return VkWriteDescriptorSetInlineUniformBlock.get_dataSize(this.segment()); } + /// Sets `dataSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dataSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dataSize.set(segment, 0L, index, value); } + /// Sets `dataSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dataSize(MemorySegment segment, @CType("uint32_t") int value) { VkWriteDescriptorSetInlineUniformBlock.set_dataSize(segment, 0L, value); } + /// Sets `dataSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetInlineUniformBlock dataSizeAt(long index, @CType("uint32_t") int value) { VkWriteDescriptorSetInlineUniformBlock.set_dataSize(this.segment(), index, value); return this; } + /// Sets `dataSize` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetInlineUniformBlock dataSize(@CType("uint32_t") int value) { VkWriteDescriptorSetInlineUniformBlock.set_dataSize(this.segment(), value); return this; } + + /// {@return `pData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pData.get(segment, 0L, index); } + /// {@return `pData`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pData(MemorySegment segment) { return VkWriteDescriptorSetInlineUniformBlock.get_pData(segment, 0L); } + /// {@return `pData` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pDataAt(long index) { return VkWriteDescriptorSetInlineUniformBlock.get_pData(this.segment(), index); } + /// {@return `pData`} + public @CType("const void *") java.lang.foreign.MemorySegment pData() { return VkWriteDescriptorSetInlineUniformBlock.get_pData(this.segment()); } + /// Sets `pData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pData(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pData.set(segment, 0L, index, value); } + /// Sets `pData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pData(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetInlineUniformBlock.set_pData(segment, 0L, value); } + /// Sets `pData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetInlineUniformBlock pDataAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetInlineUniformBlock.set_pData(this.segment(), index, value); return this; } + /// Sets `pData` with the given value. + /// @param value the value + /// @return `this` + public VkWriteDescriptorSetInlineUniformBlock pData(@CType("const void *") java.lang.foreign.MemorySegment value) { VkWriteDescriptorSetInlineUniformBlock.set_pData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/union/VkClearColorValue.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/union/VkClearColorValue.java new file mode 100644 index 00000000..63d97fd0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/union/VkClearColorValue.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### float32 +/// [VarHandle][#VH_float32] - [Getter][#float32()] - [Setter][#float32(float)] +/// ### int32 +/// [VarHandle][#VH_int32] - [Getter][#int32()] - [Setter][#int32(int)] +/// ### uint32 +/// [VarHandle][#VH_uint32] - [Getter][#uint32()] - [Setter][#uint32(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkClearColorValue { +/// float float32; +/// int32_t int32; +/// uint32_t uint32; +/// } VkClearColorValue; +/// ``` +public final class VkClearColorValue extends Union { + /// The union layout of `VkClearColorValue`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + ValueLayout.JAVA_FLOAT.withName("float32"), + ValueLayout.JAVA_INT.withName("int32"), + ValueLayout.JAVA_INT.withName("uint32") + ); + /// The [VarHandle] of `float32` of type `(MemorySegment base, long baseOffset, long index)float`. + public static final VarHandle VH_float32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("float32")); + /// The [VarHandle] of `int32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_int32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("int32")); + /// The [VarHandle] of `uint32` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uint32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uint32")); + + /// Creates `VkClearColorValue` with the given segment. + /// @param segment the memory segment + public VkClearColorValue(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkClearColorValue` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearColorValue of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkClearColorValue(segment); } + + /// Creates `VkClearColorValue` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearColorValue ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkClearColorValue(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkClearColorValue` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearColorValue ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkClearColorValue(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkClearColorValue` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkClearColorValue` + public static VkClearColorValue alloc(SegmentAllocator allocator) { return new VkClearColorValue(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkClearColorValue` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkClearColorValue` + public static VkClearColorValue alloc(SegmentAllocator allocator, long count) { return new VkClearColorValue(allocator.allocate(LAYOUT, count)); } + + /// {@return `float32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("float") float get_float32(MemorySegment segment, long index) { return (float) VH_float32.get(segment, 0L, index); } + /// {@return `float32`} + /// @param segment the segment of the struct + public static @CType("float") float get_float32(MemorySegment segment) { return VkClearColorValue.get_float32(segment, 0L); } + /// {@return `float32` at the given index} + /// @param index the index + public @CType("float") float float32At(long index) { return VkClearColorValue.get_float32(this.segment(), index); } + /// {@return `float32`} + public @CType("float") float float32() { return VkClearColorValue.get_float32(this.segment()); } + /// Sets `float32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_float32(MemorySegment segment, long index, @CType("float") float value) { VH_float32.set(segment, 0L, index, value); } + /// Sets `float32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_float32(MemorySegment segment, @CType("float") float value) { VkClearColorValue.set_float32(segment, 0L, value); } + /// Sets `float32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearColorValue float32At(long index, @CType("float") float value) { VkClearColorValue.set_float32(this.segment(), index, value); return this; } + /// Sets `float32` with the given value. + /// @param value the value + /// @return `this` + public VkClearColorValue float32(@CType("float") float value) { VkClearColorValue.set_float32(this.segment(), value); return this; } + + /// {@return `int32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_int32(MemorySegment segment, long index) { return (int) VH_int32.get(segment, 0L, index); } + /// {@return `int32`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_int32(MemorySegment segment) { return VkClearColorValue.get_int32(segment, 0L); } + /// {@return `int32` at the given index} + /// @param index the index + public @CType("int32_t") int int32At(long index) { return VkClearColorValue.get_int32(this.segment(), index); } + /// {@return `int32`} + public @CType("int32_t") int int32() { return VkClearColorValue.get_int32(this.segment()); } + /// Sets `int32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_int32(MemorySegment segment, long index, @CType("int32_t") int value) { VH_int32.set(segment, 0L, index, value); } + /// Sets `int32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_int32(MemorySegment segment, @CType("int32_t") int value) { VkClearColorValue.set_int32(segment, 0L, value); } + /// Sets `int32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearColorValue int32At(long index, @CType("int32_t") int value) { VkClearColorValue.set_int32(this.segment(), index, value); return this; } + /// Sets `int32` with the given value. + /// @param value the value + /// @return `this` + public VkClearColorValue int32(@CType("int32_t") int value) { VkClearColorValue.set_int32(this.segment(), value); return this; } + + /// {@return `uint32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_uint32(MemorySegment segment, long index) { return (int) VH_uint32.get(segment, 0L, index); } + /// {@return `uint32`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_uint32(MemorySegment segment) { return VkClearColorValue.get_uint32(segment, 0L); } + /// {@return `uint32` at the given index} + /// @param index the index + public @CType("uint32_t") int uint32At(long index) { return VkClearColorValue.get_uint32(this.segment(), index); } + /// {@return `uint32`} + public @CType("uint32_t") int uint32() { return VkClearColorValue.get_uint32(this.segment()); } + /// Sets `uint32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uint32(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_uint32.set(segment, 0L, index, value); } + /// Sets `uint32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uint32(MemorySegment segment, @CType("uint32_t") int value) { VkClearColorValue.set_uint32(segment, 0L, value); } + /// Sets `uint32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearColorValue uint32At(long index, @CType("uint32_t") int value) { VkClearColorValue.set_uint32(this.segment(), index, value); return this; } + /// Sets `uint32` with the given value. + /// @param value the value + /// @return `this` + public VkClearColorValue uint32(@CType("uint32_t") int value) { VkClearColorValue.set_uint32(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/union/VkClearValue.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/union/VkClearValue.java new file mode 100644 index 00000000..c19a2642 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/union/VkClearValue.java @@ -0,0 +1,152 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.union; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### color +/// [Byte offset][#OFFSET_color] - [Memory layout][#ML_color] - [Getter][#color()] - [Setter][#color(java.lang.foreign.MemorySegment)] +/// ### depthStencil +/// [Byte offset][#OFFSET_depthStencil] - [Memory layout][#ML_depthStencil] - [Getter][#depthStencil()] - [Setter][#depthStencil(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef union VkClearValue { +/// VkClearColorValue color; +/// VkClearDepthStencilValue depthStencil; +/// } VkClearValue; +/// ``` +public final class VkClearValue extends Union { + /// The union layout of `VkClearValue`. + public static final UnionLayout LAYOUT = MemoryLayout.unionLayout( + overrungl.vulkan.union.VkClearColorValue.LAYOUT.withName("color"), + overrungl.vulkan.struct.VkClearDepthStencilValue.LAYOUT.withName("depthStencil") + ); + /// The byte offset of `color`. + public static final long OFFSET_color = LAYOUT.byteOffset(PathElement.groupElement("color")); + /// The memory layout of `color`. + public static final MemoryLayout ML_color = LAYOUT.select(PathElement.groupElement("color")); + /// The byte offset of `depthStencil`. + public static final long OFFSET_depthStencil = LAYOUT.byteOffset(PathElement.groupElement("depthStencil")); + /// The memory layout of `depthStencil`. + public static final MemoryLayout ML_depthStencil = LAYOUT.select(PathElement.groupElement("depthStencil")); + + /// Creates `VkClearValue` with the given segment. + /// @param segment the memory segment + public VkClearValue(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkClearValue` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearValue of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkClearValue(segment); } + + /// Creates `VkClearValue` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearValue ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkClearValue(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkClearValue` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkClearValue ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkClearValue(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkClearValue` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkClearValue` + public static VkClearValue alloc(SegmentAllocator allocator) { return new VkClearValue(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkClearValue` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkClearValue` + public static VkClearValue alloc(SegmentAllocator allocator, long count) { return new VkClearValue(allocator.allocate(LAYOUT, count)); } + + /// {@return `color` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkClearColorValue") java.lang.foreign.MemorySegment get_color(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_color, index), ML_color); } + /// {@return `color`} + /// @param segment the segment of the struct + public static @CType("VkClearColorValue") java.lang.foreign.MemorySegment get_color(MemorySegment segment) { return VkClearValue.get_color(segment, 0L); } + /// {@return `color` at the given index} + /// @param index the index + public @CType("VkClearColorValue") java.lang.foreign.MemorySegment colorAt(long index) { return VkClearValue.get_color(this.segment(), index); } + /// {@return `color`} + public @CType("VkClearColorValue") java.lang.foreign.MemorySegment color() { return VkClearValue.get_color(this.segment()); } + /// Sets `color` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_color(MemorySegment segment, long index, @CType("VkClearColorValue") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_color, index), ML_color.byteSize()); } + /// Sets `color` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_color(MemorySegment segment, @CType("VkClearColorValue") java.lang.foreign.MemorySegment value) { VkClearValue.set_color(segment, 0L, value); } + /// Sets `color` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearValue colorAt(long index, @CType("VkClearColorValue") java.lang.foreign.MemorySegment value) { VkClearValue.set_color(this.segment(), index, value); return this; } + /// Sets `color` with the given value. + /// @param value the value + /// @return `this` + public VkClearValue color(@CType("VkClearColorValue") java.lang.foreign.MemorySegment value) { VkClearValue.set_color(this.segment(), value); return this; } + + /// {@return `depthStencil` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkClearDepthStencilValue") java.lang.foreign.MemorySegment get_depthStencil(MemorySegment segment, long index) { return segment.asSlice(LAYOUT.scale(OFFSET_depthStencil, index), ML_depthStencil); } + /// {@return `depthStencil`} + /// @param segment the segment of the struct + public static @CType("VkClearDepthStencilValue") java.lang.foreign.MemorySegment get_depthStencil(MemorySegment segment) { return VkClearValue.get_depthStencil(segment, 0L); } + /// {@return `depthStencil` at the given index} + /// @param index the index + public @CType("VkClearDepthStencilValue") java.lang.foreign.MemorySegment depthStencilAt(long index) { return VkClearValue.get_depthStencil(this.segment(), index); } + /// {@return `depthStencil`} + public @CType("VkClearDepthStencilValue") java.lang.foreign.MemorySegment depthStencil() { return VkClearValue.get_depthStencil(this.segment()); } + /// Sets `depthStencil` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_depthStencil(MemorySegment segment, long index, @CType("VkClearDepthStencilValue") java.lang.foreign.MemorySegment value) { MemorySegment.copy(value, 0L, segment, LAYOUT.scale(OFFSET_depthStencil, index), ML_depthStencil.byteSize()); } + /// Sets `depthStencil` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_depthStencil(MemorySegment segment, @CType("VkClearDepthStencilValue") java.lang.foreign.MemorySegment value) { VkClearValue.set_depthStencil(segment, 0L, value); } + /// Sets `depthStencil` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkClearValue depthStencilAt(long index, @CType("VkClearDepthStencilValue") java.lang.foreign.MemorySegment value) { VkClearValue.set_depthStencil(this.segment(), index, value); return this; } + /// Sets `depthStencil` with the given value. + /// @param value the value + /// @return `this` + public VkClearValue depthStencil(@CType("VkClearDepthStencilValue") java.lang.foreign.MemorySegment value) { VkClearValue.set_depthStencil(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkAllocationFunction.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkAllocationFunction.java new file mode 100644 index 00000000..cf28b498 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkAllocationFunction.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkAllocationFunction extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.of(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkAllocationFunction.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("void *") java.lang.foreign.MemorySegment invoke(@CType("void *") java.lang.foreign.MemorySegment pUserData, @CType("size_t") long size, @CType("size_t") long alignment, @CType("VkSystemAllocationScope") int allocationScope); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("void *") java.lang.foreign.MemorySegment invoke(MemorySegment stub, @CType("void *") java.lang.foreign.MemorySegment pUserData, @CType("size_t") long size, @CType("size_t") long alignment, @CType("VkSystemAllocationScope") int allocationScope) { + try { return (java.lang.foreign.MemorySegment) HANDLE.invokeExact(stub, pUserData, size, alignment, allocationScope); } + catch (Throwable e) { throw new RuntimeException("error in VkAllocationFunction::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkAllocationFunction wrap(MemorySegment stub) { + return (pUserData, size, alignment, allocationScope) -> + invoke(stub, pUserData, size, alignment, allocationScope); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkDebugReportCallbackEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkDebugReportCallbackEXT.java new file mode 100644 index 00000000..690344a0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkDebugReportCallbackEXT.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkDebugReportCallbackEXT extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkDebugReportCallbackEXT.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("VkBool32") int invoke(@CType("VkDebugReportFlagsEXT") int flags, @CType("VkDebugReportObjectTypeEXT") int objectType, @CType("uint64_t") long object, @CType("size_t") long location, @CType("int32_t") int messageCode, @CType("const char *") java.lang.foreign.MemorySegment pLayerPrefix, @CType("const char *") java.lang.foreign.MemorySegment pMessage, @CType("void *") java.lang.foreign.MemorySegment pUserData); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("VkBool32") int invoke(MemorySegment stub, @CType("VkDebugReportFlagsEXT") int flags, @CType("VkDebugReportObjectTypeEXT") int objectType, @CType("uint64_t") long object, @CType("size_t") long location, @CType("int32_t") int messageCode, @CType("const char *") java.lang.foreign.MemorySegment pLayerPrefix, @CType("const char *") java.lang.foreign.MemorySegment pMessage, @CType("void *") java.lang.foreign.MemorySegment pUserData) { + try { return (int) HANDLE.invokeExact(stub, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage, pUserData); } + catch (Throwable e) { throw new RuntimeException("error in VkDebugReportCallbackEXT::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkDebugReportCallbackEXT wrap(MemorySegment stub) { + return (flags, objectType, object, location, messageCode, pLayerPrefix, pMessage, pUserData) -> + invoke(stub, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage, pUserData); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkDebugUtilsMessengerCallbackEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkDebugUtilsMessengerCallbackEXT.java new file mode 100644 index 00000000..11288100 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkDebugUtilsMessengerCallbackEXT.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkDebugUtilsMessengerCallbackEXT extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS, ValueLayout.ADDRESS); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkDebugUtilsMessengerCallbackEXT.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("VkBool32") int invoke(@CType("VkDebugUtilsMessageSeverityFlagBitsEXT") int messageSeverity, @CType("VkDebugUtilsMessageTypeFlagsEXT") int messageTypes, @CType("const VkDebugUtilsMessengerCallbackDataEXT *") java.lang.foreign.MemorySegment pCallbackData, @CType("void *") java.lang.foreign.MemorySegment pUserData); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("VkBool32") int invoke(MemorySegment stub, @CType("VkDebugUtilsMessageSeverityFlagBitsEXT") int messageSeverity, @CType("VkDebugUtilsMessageTypeFlagsEXT") int messageTypes, @CType("const VkDebugUtilsMessengerCallbackDataEXT *") java.lang.foreign.MemorySegment pCallbackData, @CType("void *") java.lang.foreign.MemorySegment pUserData) { + try { return (int) HANDLE.invokeExact(stub, messageSeverity, messageTypes, pCallbackData, pUserData); } + catch (Throwable e) { throw new RuntimeException("error in VkDebugUtilsMessengerCallbackEXT::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkDebugUtilsMessengerCallbackEXT wrap(MemorySegment stub) { + return (messageSeverity, messageTypes, pCallbackData, pUserData) -> + invoke(stub, messageSeverity, messageTypes, pCallbackData, pUserData); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkDeviceMemoryReportCallbackEXT.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkDeviceMemoryReportCallbackEXT.java new file mode 100644 index 00000000..0cd1af28 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkDeviceMemoryReportCallbackEXT.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkDeviceMemoryReportCallbackEXT extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkDeviceMemoryReportCallbackEXT.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("void") void invoke(@CType("const VkDeviceMemoryReportCallbackDataEXT *") java.lang.foreign.MemorySegment pCallbackData, @CType("void *") java.lang.foreign.MemorySegment pUserData); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("void") void invoke(MemorySegment stub, @CType("const VkDeviceMemoryReportCallbackDataEXT *") java.lang.foreign.MemorySegment pCallbackData, @CType("void *") java.lang.foreign.MemorySegment pUserData) { + try { HANDLE.invokeExact(stub, pCallbackData, pUserData); } + catch (Throwable e) { throw new RuntimeException("error in VkDeviceMemoryReportCallbackEXT::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkDeviceMemoryReportCallbackEXT wrap(MemorySegment stub) { + return (pCallbackData, pUserData) -> + invoke(stub, pCallbackData, pUserData); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkFaultCallbackFunction.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkFaultCallbackFunction.java new file mode 100644 index 00000000..46c96fcb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkFaultCallbackFunction.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkFaultCallbackFunction extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.ofVoid(ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.ADDRESS); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkFaultCallbackFunction.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("void") void invoke(@CType("VkBool32") int unrecordedFaults, @CType("uint32_t") int faultCount, @CType("const VkFaultData *") java.lang.foreign.MemorySegment pFaults); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("void") void invoke(MemorySegment stub, @CType("VkBool32") int unrecordedFaults, @CType("uint32_t") int faultCount, @CType("const VkFaultData *") java.lang.foreign.MemorySegment pFaults) { + try { HANDLE.invokeExact(stub, unrecordedFaults, faultCount, pFaults); } + catch (Throwable e) { throw new RuntimeException("error in VkFaultCallbackFunction::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkFaultCallbackFunction wrap(MemorySegment stub) { + return (unrecordedFaults, faultCount, pFaults) -> + invoke(stub, unrecordedFaults, faultCount, pFaults); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkFreeFunction.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkFreeFunction.java new file mode 100644 index 00000000..ae202920 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkFreeFunction.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkFreeFunction extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkFreeFunction.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("void") void invoke(@CType("void *") java.lang.foreign.MemorySegment pUserData, @CType("void *") java.lang.foreign.MemorySegment pMemory); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("void") void invoke(MemorySegment stub, @CType("void *") java.lang.foreign.MemorySegment pUserData, @CType("void *") java.lang.foreign.MemorySegment pMemory) { + try { HANDLE.invokeExact(stub, pUserData, pMemory); } + catch (Throwable e) { throw new RuntimeException("error in VkFreeFunction::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkFreeFunction wrap(MemorySegment stub) { + return (pUserData, pMemory) -> + invoke(stub, pUserData, pMemory); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkGetInstanceProcAddrLUNARG.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkGetInstanceProcAddrLUNARG.java new file mode 100644 index 00000000..fecb8729 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkGetInstanceProcAddrLUNARG.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkGetInstanceProcAddrLUNARG extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.of(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkGetInstanceProcAddrLUNARG.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("PFN_vkVoidFunction") java.lang.foreign.MemorySegment invoke(@CType("VkInstance") java.lang.foreign.MemorySegment instance, @CType("const char *") java.lang.foreign.MemorySegment pName); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("PFN_vkVoidFunction") java.lang.foreign.MemorySegment invoke(MemorySegment stub, @CType("VkInstance") java.lang.foreign.MemorySegment instance, @CType("const char *") java.lang.foreign.MemorySegment pName) { + try { return (java.lang.foreign.MemorySegment) HANDLE.invokeExact(stub, instance, pName); } + catch (Throwable e) { throw new RuntimeException("error in VkGetInstanceProcAddrLUNARG::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkGetInstanceProcAddrLUNARG wrap(MemorySegment stub) { + return (instance, pName) -> + invoke(stub, instance, pName); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkInternalAllocationNotification.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkInternalAllocationNotification.java new file mode 100644 index 00000000..73015b4c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkInternalAllocationNotification.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkInternalAllocationNotification extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkInternalAllocationNotification.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("void") void invoke(@CType("void *") java.lang.foreign.MemorySegment pUserData, @CType("size_t") long size, @CType("VkInternalAllocationType") int allocationType, @CType("VkSystemAllocationScope") int allocationScope); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("void") void invoke(MemorySegment stub, @CType("void *") java.lang.foreign.MemorySegment pUserData, @CType("size_t") long size, @CType("VkInternalAllocationType") int allocationType, @CType("VkSystemAllocationScope") int allocationScope) { + try { HANDLE.invokeExact(stub, pUserData, size, allocationType, allocationScope); } + catch (Throwable e) { throw new RuntimeException("error in VkInternalAllocationNotification::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkInternalAllocationNotification wrap(MemorySegment stub) { + return (pUserData, size, allocationType, allocationScope) -> + invoke(stub, pUserData, size, allocationType, allocationScope); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkInternalFreeNotification.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkInternalFreeNotification.java new file mode 100644 index 00000000..60357c2b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkInternalFreeNotification.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkInternalFreeNotification extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkInternalFreeNotification.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("void") void invoke(@CType("void *") java.lang.foreign.MemorySegment pUserData, @CType("size_t") long size, @CType("VkInternalAllocationType") int allocationType, @CType("VkSystemAllocationScope") int allocationScope); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("void") void invoke(MemorySegment stub, @CType("void *") java.lang.foreign.MemorySegment pUserData, @CType("size_t") long size, @CType("VkInternalAllocationType") int allocationType, @CType("VkSystemAllocationScope") int allocationScope) { + try { HANDLE.invokeExact(stub, pUserData, size, allocationType, allocationScope); } + catch (Throwable e) { throw new RuntimeException("error in VkInternalFreeNotification::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkInternalFreeNotification wrap(MemorySegment stub) { + return (pUserData, size, allocationType, allocationScope) -> + invoke(stub, pUserData, size, allocationType, allocationScope); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkReallocationFunction.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkReallocationFunction.java new file mode 100644 index 00000000..d2f75a2c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkReallocationFunction.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkReallocationFunction extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.of(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.JAVA_LONG, ValueLayout.JAVA_LONG, ValueLayout.JAVA_INT); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkReallocationFunction.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("void *") java.lang.foreign.MemorySegment invoke(@CType("void *") java.lang.foreign.MemorySegment pUserData, @CType("void *") java.lang.foreign.MemorySegment pOriginal, @CType("size_t") long size, @CType("size_t") long alignment, @CType("VkSystemAllocationScope") int allocationScope); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("void *") java.lang.foreign.MemorySegment invoke(MemorySegment stub, @CType("void *") java.lang.foreign.MemorySegment pUserData, @CType("void *") java.lang.foreign.MemorySegment pOriginal, @CType("size_t") long size, @CType("size_t") long alignment, @CType("VkSystemAllocationScope") int allocationScope) { + try { return (java.lang.foreign.MemorySegment) HANDLE.invokeExact(stub, pUserData, pOriginal, size, alignment, allocationScope); } + catch (Throwable e) { throw new RuntimeException("error in VkReallocationFunction::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkReallocationFunction wrap(MemorySegment stub) { + return (pUserData, pOriginal, size, alignment, allocationScope) -> + invoke(stub, pUserData, pOriginal, size, alignment, allocationScope); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkVoidFunction.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkVoidFunction.java new file mode 100644 index 00000000..10c77f60 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/upcall/VkVoidFunction.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.upcall; + +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.upcall.*; +import overrungl.util.*; + +@FunctionalInterface +public interface VkVoidFunction extends Upcall { + /// The function descriptor. + FunctionDescriptor DESCRIPTOR = FunctionDescriptor.ofVoid(); + /// The method handle of the target method. + MethodHandle HANDLE = Upcall.findTarget(VkVoidFunction.class, "invoke", DESCRIPTOR); + + /// The target method of the upcall. + @CType("void") void invoke(); + + @Override + default MemorySegment stub(Arena arena) { return Linker.nativeLinker().upcallStub(HANDLE.bindTo(this), DESCRIPTOR, arena); } + + /// A static invoker of the target method. + /// @param stub the upcall stub + static @CType("void") void invoke(MemorySegment stub) { + try { HANDLE.invokeExact(stub); } + catch (Throwable e) { throw new RuntimeException("error in VkVoidFunction::invoke (static invoker)", e); } + } + + /// A wrapper for the target method. + /// @param stub the upcall stub + /// @return an instance that wraps the static invoker + static VkVoidFunction wrap(MemorySegment stub) { + return () -> + invoke(stub); + } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/VKVALVEDescriptorSetHostMapping.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/VKVALVEDescriptorSetHostMapping.java new file mode 100644 index 00000000..ac79f8ac --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/VKVALVEDescriptorSetHostMapping.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.valve; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +public class VKVALVEDescriptorSetHostMapping { + public static final int VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_SPEC_VERSION = 1; + public static final String VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_EXTENSION_NAME = "VK_VALVE_descriptor_set_host_mapping"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE = 1000420000; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_BINDING_REFERENCE_VALVE = 1000420001; + public static final int VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE = 1000420002; + public static final MethodHandle MH_vkGetDescriptorSetLayoutHostMappingInfoVALVE = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public static final MethodHandle MH_vkGetDescriptorSetHostMappingVALVE = RuntimeHelper.downcall(FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS)); + public final MemorySegment PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE; + public final MemorySegment PFN_vkGetDescriptorSetHostMappingVALVE; + + public VKVALVEDescriptorSetHostMapping(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE = func.invoke(device, "vkGetDescriptorSetLayoutHostMappingInfoVALVE"); + PFN_vkGetDescriptorSetHostMappingVALVE = func.invoke(device, "vkGetDescriptorSetHostMappingVALVE"); + } + + public void GetDescriptorSetLayoutHostMappingInfoVALVE(@CType("VkDevice") MemorySegment device, @CType("const VkDescriptorSetBindingReferenceVALVE *") MemorySegment pBindingReference, @CType("VkDescriptorSetLayoutHostMappingInfoVALVE *") MemorySegment pHostMapping) { + if (Unmarshal.isNullPointer(PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE)) throw new SymbolNotFoundError("Symbol not found: vkGetDescriptorSetLayoutHostMappingInfoVALVE"); + try { MH_vkGetDescriptorSetLayoutHostMappingInfoVALVE.invokeExact(PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE, device, pBindingReference, pHostMapping); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDescriptorSetLayoutHostMappingInfoVALVE", e); } + } + + public void GetDescriptorSetHostMappingVALVE(@CType("VkDevice") MemorySegment device, @CType("VkDescriptorSet") MemorySegment descriptorSet, @CType("void **") MemorySegment ppData) { + if (Unmarshal.isNullPointer(PFN_vkGetDescriptorSetHostMappingVALVE)) throw new SymbolNotFoundError("Symbol not found: vkGetDescriptorSetHostMappingVALVE"); + try { MH_vkGetDescriptorSetHostMappingVALVE.invokeExact(PFN_vkGetDescriptorSetHostMappingVALVE, device, descriptorSet, ppData); } + catch (Throwable e) { throw new RuntimeException("error in vkGetDescriptorSetHostMappingVALVE", e); } + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/VKVALVEMutableDescriptorType.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/VKVALVEMutableDescriptorType.java new file mode 100644 index 00000000..a3bd453d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/VKVALVEMutableDescriptorType.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.valve; +import java.lang.foreign.*; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.internal.RuntimeHelper; +import overrungl.util.*; +import overrungl.vulkan.*; +import static overrungl.vulkan.ext.VKEXTMutableDescriptorType.*; +public class VKVALVEMutableDescriptorType { + public static final int VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION = 1; + public static final String VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME = "VK_VALVE_mutable_descriptor_type"; + public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT; + public static final int VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT; + public static final int VK_DESCRIPTOR_TYPE_MUTABLE_VALVE = VK_DESCRIPTOR_TYPE_MUTABLE_EXT; + public static final int VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE = VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT; + public static final int VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE = VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT; + + public VKVALVEMutableDescriptorType(@CType("VkDevice") MemorySegment device, VKLoadFunc func) { + } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/struct/VkDescriptorSetBindingReferenceVALVE.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/struct/VkDescriptorSetBindingReferenceVALVE.java new file mode 100644 index 00000000..22fd3a44 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/struct/VkDescriptorSetBindingReferenceVALVE.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.valve.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### descriptorSetLayout +/// [VarHandle][#VH_descriptorSetLayout] - [Getter][#descriptorSetLayout()] - [Setter][#descriptorSetLayout(java.lang.foreign.MemorySegment)] +/// ### binding +/// [VarHandle][#VH_binding] - [Getter][#binding()] - [Setter][#binding(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorSetBindingReferenceVALVE { +/// VkStructureType sType; +/// const void * pNext; +/// VkDescriptorSetLayout descriptorSetLayout; +/// uint32_t binding; +/// } VkDescriptorSetBindingReferenceVALVE; +/// ``` +public final class VkDescriptorSetBindingReferenceVALVE extends Struct { + /// The struct layout of `VkDescriptorSetBindingReferenceVALVE`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.ADDRESS.withName("descriptorSetLayout"), + ValueLayout.JAVA_INT.withName("binding") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `descriptorSetLayout` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_descriptorSetLayout = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSetLayout")); + /// The [VarHandle] of `binding` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_binding = LAYOUT.arrayElementVarHandle(PathElement.groupElement("binding")); + + /// Creates `VkDescriptorSetBindingReferenceVALVE` with the given segment. + /// @param segment the memory segment + public VkDescriptorSetBindingReferenceVALVE(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorSetBindingReferenceVALVE` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetBindingReferenceVALVE of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetBindingReferenceVALVE(segment); } + + /// Creates `VkDescriptorSetBindingReferenceVALVE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetBindingReferenceVALVE ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetBindingReferenceVALVE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorSetBindingReferenceVALVE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetBindingReferenceVALVE ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetBindingReferenceVALVE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorSetBindingReferenceVALVE` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorSetBindingReferenceVALVE` + public static VkDescriptorSetBindingReferenceVALVE alloc(SegmentAllocator allocator) { return new VkDescriptorSetBindingReferenceVALVE(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorSetBindingReferenceVALVE` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorSetBindingReferenceVALVE` + public static VkDescriptorSetBindingReferenceVALVE alloc(SegmentAllocator allocator, long count) { return new VkDescriptorSetBindingReferenceVALVE(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorSetBindingReferenceVALVE.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorSetBindingReferenceVALVE.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorSetBindingReferenceVALVE.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorSetBindingReferenceVALVE.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetBindingReferenceVALVE sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorSetBindingReferenceVALVE.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetBindingReferenceVALVE sType(@CType("VkStructureType") int value) { VkDescriptorSetBindingReferenceVALVE.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("const void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorSetBindingReferenceVALVE.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("const void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorSetBindingReferenceVALVE.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("const void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorSetBindingReferenceVALVE.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetBindingReferenceVALVE.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetBindingReferenceVALVE pNextAt(long index, @CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetBindingReferenceVALVE.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetBindingReferenceVALVE pNext(@CType("const void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetBindingReferenceVALVE.set_pNext(this.segment(), value); return this; } + + /// {@return `descriptorSetLayout` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment get_descriptorSetLayout(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_descriptorSetLayout.get(segment, 0L, index); } + /// {@return `descriptorSetLayout`} + /// @param segment the segment of the struct + public static @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment get_descriptorSetLayout(MemorySegment segment) { return VkDescriptorSetBindingReferenceVALVE.get_descriptorSetLayout(segment, 0L); } + /// {@return `descriptorSetLayout` at the given index} + /// @param index the index + public @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment descriptorSetLayoutAt(long index) { return VkDescriptorSetBindingReferenceVALVE.get_descriptorSetLayout(this.segment(), index); } + /// {@return `descriptorSetLayout`} + public @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment descriptorSetLayout() { return VkDescriptorSetBindingReferenceVALVE.get_descriptorSetLayout(this.segment()); } + /// Sets `descriptorSetLayout` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSetLayout(MemorySegment segment, long index, @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment value) { VH_descriptorSetLayout.set(segment, 0L, index, value); } + /// Sets `descriptorSetLayout` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSetLayout(MemorySegment segment, @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment value) { VkDescriptorSetBindingReferenceVALVE.set_descriptorSetLayout(segment, 0L, value); } + /// Sets `descriptorSetLayout` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetBindingReferenceVALVE descriptorSetLayoutAt(long index, @CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment value) { VkDescriptorSetBindingReferenceVALVE.set_descriptorSetLayout(this.segment(), index, value); return this; } + /// Sets `descriptorSetLayout` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetBindingReferenceVALVE descriptorSetLayout(@CType("VkDescriptorSetLayout") java.lang.foreign.MemorySegment value) { VkDescriptorSetBindingReferenceVALVE.set_descriptorSetLayout(this.segment(), value); return this; } + + /// {@return `binding` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_binding(MemorySegment segment, long index) { return (int) VH_binding.get(segment, 0L, index); } + /// {@return `binding`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_binding(MemorySegment segment) { return VkDescriptorSetBindingReferenceVALVE.get_binding(segment, 0L); } + /// {@return `binding` at the given index} + /// @param index the index + public @CType("uint32_t") int bindingAt(long index) { return VkDescriptorSetBindingReferenceVALVE.get_binding(this.segment(), index); } + /// {@return `binding`} + public @CType("uint32_t") int binding() { return VkDescriptorSetBindingReferenceVALVE.get_binding(this.segment()); } + /// Sets `binding` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_binding(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_binding.set(segment, 0L, index, value); } + /// Sets `binding` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_binding(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorSetBindingReferenceVALVE.set_binding(segment, 0L, value); } + /// Sets `binding` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetBindingReferenceVALVE bindingAt(long index, @CType("uint32_t") int value) { VkDescriptorSetBindingReferenceVALVE.set_binding(this.segment(), index, value); return this; } + /// Sets `binding` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetBindingReferenceVALVE binding(@CType("uint32_t") int value) { VkDescriptorSetBindingReferenceVALVE.set_binding(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/struct/VkDescriptorSetLayoutHostMappingInfoVALVE.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/struct/VkDescriptorSetLayoutHostMappingInfoVALVE.java new file mode 100644 index 00000000..398f327d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/struct/VkDescriptorSetLayoutHostMappingInfoVALVE.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.valve.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### descriptorOffset +/// [VarHandle][#VH_descriptorOffset] - [Getter][#descriptorOffset()] - [Setter][#descriptorOffset(long)] +/// ### descriptorSize +/// [VarHandle][#VH_descriptorSize] - [Getter][#descriptorSize()] - [Setter][#descriptorSize(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkDescriptorSetLayoutHostMappingInfoVALVE { +/// VkStructureType sType; +/// void * pNext; +/// size_t descriptorOffset; +/// uint32_t descriptorSize; +/// } VkDescriptorSetLayoutHostMappingInfoVALVE; +/// ``` +public final class VkDescriptorSetLayoutHostMappingInfoVALVE extends Struct { + /// The struct layout of `VkDescriptorSetLayoutHostMappingInfoVALVE`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_LONG.withName("descriptorOffset"), + ValueLayout.JAVA_INT.withName("descriptorSize") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `descriptorOffset` of type `(MemorySegment base, long baseOffset, long index)long`. + public static final VarHandle VH_descriptorOffset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorOffset")); + /// The [VarHandle] of `descriptorSize` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSize")); + + /// Creates `VkDescriptorSetLayoutHostMappingInfoVALVE` with the given segment. + /// @param segment the memory segment + public VkDescriptorSetLayoutHostMappingInfoVALVE(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkDescriptorSetLayoutHostMappingInfoVALVE` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutHostMappingInfoVALVE of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutHostMappingInfoVALVE(segment); } + + /// Creates `VkDescriptorSetLayoutHostMappingInfoVALVE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutHostMappingInfoVALVE ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutHostMappingInfoVALVE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkDescriptorSetLayoutHostMappingInfoVALVE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkDescriptorSetLayoutHostMappingInfoVALVE ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkDescriptorSetLayoutHostMappingInfoVALVE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkDescriptorSetLayoutHostMappingInfoVALVE` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkDescriptorSetLayoutHostMappingInfoVALVE` + public static VkDescriptorSetLayoutHostMappingInfoVALVE alloc(SegmentAllocator allocator) { return new VkDescriptorSetLayoutHostMappingInfoVALVE(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkDescriptorSetLayoutHostMappingInfoVALVE` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkDescriptorSetLayoutHostMappingInfoVALVE` + public static VkDescriptorSetLayoutHostMappingInfoVALVE alloc(SegmentAllocator allocator, long count) { return new VkDescriptorSetLayoutHostMappingInfoVALVE(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutHostMappingInfoVALVE sTypeAt(long index, @CType("VkStructureType") int value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutHostMappingInfoVALVE sType(@CType("VkStructureType") int value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutHostMappingInfoVALVE pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutHostMappingInfoVALVE pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_pNext(this.segment(), value); return this; } + + /// {@return `descriptorOffset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("size_t") long get_descriptorOffset(MemorySegment segment, long index) { return (long) VH_descriptorOffset.get(segment, 0L, index); } + /// {@return `descriptorOffset`} + /// @param segment the segment of the struct + public static @CType("size_t") long get_descriptorOffset(MemorySegment segment) { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_descriptorOffset(segment, 0L); } + /// {@return `descriptorOffset` at the given index} + /// @param index the index + public @CType("size_t") long descriptorOffsetAt(long index) { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_descriptorOffset(this.segment(), index); } + /// {@return `descriptorOffset`} + public @CType("size_t") long descriptorOffset() { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_descriptorOffset(this.segment()); } + /// Sets `descriptorOffset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorOffset(MemorySegment segment, long index, @CType("size_t") long value) { VH_descriptorOffset.set(segment, 0L, index, value); } + /// Sets `descriptorOffset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorOffset(MemorySegment segment, @CType("size_t") long value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_descriptorOffset(segment, 0L, value); } + /// Sets `descriptorOffset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutHostMappingInfoVALVE descriptorOffsetAt(long index, @CType("size_t") long value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_descriptorOffset(this.segment(), index, value); return this; } + /// Sets `descriptorOffset` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutHostMappingInfoVALVE descriptorOffset(@CType("size_t") long value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_descriptorOffset(this.segment(), value); return this; } + + /// {@return `descriptorSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_descriptorSize(MemorySegment segment, long index) { return (int) VH_descriptorSize.get(segment, 0L, index); } + /// {@return `descriptorSize`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_descriptorSize(MemorySegment segment) { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_descriptorSize(segment, 0L); } + /// {@return `descriptorSize` at the given index} + /// @param index the index + public @CType("uint32_t") int descriptorSizeAt(long index) { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_descriptorSize(this.segment(), index); } + /// {@return `descriptorSize`} + public @CType("uint32_t") int descriptorSize() { return VkDescriptorSetLayoutHostMappingInfoVALVE.get_descriptorSize(this.segment()); } + /// Sets `descriptorSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSize(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_descriptorSize.set(segment, 0L, index, value); } + /// Sets `descriptorSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSize(MemorySegment segment, @CType("uint32_t") int value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_descriptorSize(segment, 0L, value); } + /// Sets `descriptorSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutHostMappingInfoVALVE descriptorSizeAt(long index, @CType("uint32_t") int value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_descriptorSize(this.segment(), index, value); return this; } + /// Sets `descriptorSize` with the given value. + /// @param value the value + /// @return `this` + public VkDescriptorSetLayoutHostMappingInfoVALVE descriptorSize(@CType("uint32_t") int value) { VkDescriptorSetLayoutHostMappingInfoVALVE.set_descriptorSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/struct/VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/struct/VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.java new file mode 100644 index 00000000..46ba3e07 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/valve/struct/VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.valve.struct; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sType +/// [VarHandle][#VH_sType] - [Getter][#sType()] - [Setter][#sType(int)] +/// ### pNext +/// [VarHandle][#VH_pNext] - [Getter][#pNext()] - [Setter][#pNext(java.lang.foreign.MemorySegment)] +/// ### descriptorSetHostMapping +/// [VarHandle][#VH_descriptorSetHostMapping] - [Getter][#descriptorSetHostMapping()] - [Setter][#descriptorSetHostMapping(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE { +/// VkStructureType sType; +/// void * pNext; +/// VkBool32 descriptorSetHostMapping; +/// } VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; +/// ``` +public final class VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE extends Struct { + /// The struct layout of `VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sType"), + ValueLayout.ADDRESS.withName("pNext"), + ValueLayout.JAVA_INT.withName("descriptorSetHostMapping") + ); + /// The [VarHandle] of `sType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sType")); + /// The [VarHandle] of `pNext` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pNext = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pNext")); + /// The [VarHandle] of `descriptorSetHostMapping` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_descriptorSetHostMapping = LAYOUT.arrayElementVarHandle(PathElement.groupElement("descriptorSetHostMapping")); + + /// Creates `VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE` with the given segment. + /// @param segment the memory segment + public VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE(segment); } + + /// Creates `VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE` + public static VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE alloc(SegmentAllocator allocator) { return new VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE(allocator.allocate(LAYOUT)); } + + /// Allocates a `VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE` + public static VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE alloc(SegmentAllocator allocator, long count) { return new VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE(allocator.allocate(LAYOUT, count)); } + + /// {@return `sType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkStructureType") int get_sType(MemorySegment segment, long index) { return (int) VH_sType.get(segment, 0L, index); } + /// {@return `sType`} + /// @param segment the segment of the struct + public static @CType("VkStructureType") int get_sType(MemorySegment segment) { return VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.get_sType(segment, 0L); } + /// {@return `sType` at the given index} + /// @param index the index + public @CType("VkStructureType") int sTypeAt(long index) { return VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.get_sType(this.segment(), index); } + /// {@return `sType`} + public @CType("VkStructureType") int sType() { return VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.get_sType(this.segment()); } + /// Sets `sType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sType(MemorySegment segment, long index, @CType("VkStructureType") int value) { VH_sType.set(segment, 0L, index, value); } + /// Sets `sType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sType(MemorySegment segment, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.set_sType(segment, 0L, value); } + /// Sets `sType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE sTypeAt(long index, @CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.set_sType(this.segment(), index, value); return this; } + /// Sets `sType` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE sType(@CType("VkStructureType") int value) { VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.set_sType(this.segment(), value); return this; } + + /// {@return `pNext` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pNext.get(segment, 0L, index); } + /// {@return `pNext`} + /// @param segment the segment of the struct + public static @CType("void *") java.lang.foreign.MemorySegment get_pNext(MemorySegment segment) { return VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.get_pNext(segment, 0L); } + /// {@return `pNext` at the given index} + /// @param index the index + public @CType("void *") java.lang.foreign.MemorySegment pNextAt(long index) { return VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.get_pNext(this.segment(), index); } + /// {@return `pNext`} + public @CType("void *") java.lang.foreign.MemorySegment pNext() { return VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.get_pNext(this.segment()); } + /// Sets `pNext` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pNext(MemorySegment segment, long index, @CType("void *") java.lang.foreign.MemorySegment value) { VH_pNext.set(segment, 0L, index, value); } + /// Sets `pNext` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pNext(MemorySegment segment, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.set_pNext(segment, 0L, value); } + /// Sets `pNext` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE pNextAt(long index, @CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.set_pNext(this.segment(), index, value); return this; } + /// Sets `pNext` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE pNext(@CType("void *") java.lang.foreign.MemorySegment value) { VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.set_pNext(this.segment(), value); return this; } + + /// {@return `descriptorSetHostMapping` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("VkBool32") int get_descriptorSetHostMapping(MemorySegment segment, long index) { return (int) VH_descriptorSetHostMapping.get(segment, 0L, index); } + /// {@return `descriptorSetHostMapping`} + /// @param segment the segment of the struct + public static @CType("VkBool32") int get_descriptorSetHostMapping(MemorySegment segment) { return VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.get_descriptorSetHostMapping(segment, 0L); } + /// {@return `descriptorSetHostMapping` at the given index} + /// @param index the index + public @CType("VkBool32") int descriptorSetHostMappingAt(long index) { return VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.get_descriptorSetHostMapping(this.segment(), index); } + /// {@return `descriptorSetHostMapping`} + public @CType("VkBool32") int descriptorSetHostMapping() { return VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.get_descriptorSetHostMapping(this.segment()); } + /// Sets `descriptorSetHostMapping` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_descriptorSetHostMapping(MemorySegment segment, long index, @CType("VkBool32") int value) { VH_descriptorSetHostMapping.set(segment, 0L, index, value); } + /// Sets `descriptorSetHostMapping` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_descriptorSetHostMapping(MemorySegment segment, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.set_descriptorSetHostMapping(segment, 0L, value); } + /// Sets `descriptorSetHostMapping` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE descriptorSetHostMappingAt(long index, @CType("VkBool32") int value) { VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.set_descriptorSetHostMapping(this.segment(), index, value); return this; } + /// Sets `descriptorSetHostMapping` with the given value. + /// @param value the value + /// @return `this` + public VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE descriptorSetHostMapping(@CType("VkBool32") int value) { VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.set_descriptorSetHostMapping(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1CDEF.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1CDEF.java new file mode 100644 index 00000000..58628eb0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1CDEF.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### cdef_damping_minus_3 +/// [VarHandle][#VH_cdef_damping_minus_3] - [Getter][#cdef_damping_minus_3()] - [Setter][#cdef_damping_minus_3(byte)] +/// ### cdef_bits +/// [VarHandle][#VH_cdef_bits] - [Getter][#cdef_bits()] - [Setter][#cdef_bits(byte)] +/// ### cdef_y_pri_strength +/// [VarHandle][#VH_cdef_y_pri_strength] - [Getter][#cdef_y_pri_strength()] - [Setter][#cdef_y_pri_strength(byte)] +/// ### cdef_y_sec_strength +/// [VarHandle][#VH_cdef_y_sec_strength] - [Getter][#cdef_y_sec_strength()] - [Setter][#cdef_y_sec_strength(byte)] +/// ### cdef_uv_pri_strength +/// [VarHandle][#VH_cdef_uv_pri_strength] - [Getter][#cdef_uv_pri_strength()] - [Setter][#cdef_uv_pri_strength(byte)] +/// ### cdef_uv_sec_strength +/// [VarHandle][#VH_cdef_uv_sec_strength] - [Getter][#cdef_uv_sec_strength()] - [Setter][#cdef_uv_sec_strength(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1CDEF { +/// uint8_t cdef_damping_minus_3; +/// uint8_t cdef_bits; +/// uint8_t [ ] cdef_y_pri_strength; +/// uint8_t [ ] cdef_y_sec_strength; +/// uint8_t [ ] cdef_uv_pri_strength; +/// uint8_t [ ] cdef_uv_sec_strength; +/// } StdVideoAV1CDEF; +/// ``` +public final class StdVideoAV1CDEF extends Struct { + /// The struct layout of `StdVideoAV1CDEF`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_BYTE.withName("cdef_damping_minus_3"), + ValueLayout.JAVA_BYTE.withName("cdef_bits"), + ValueLayout.JAVA_BYTE.withName("cdef_y_pri_strength"), + ValueLayout.JAVA_BYTE.withName("cdef_y_sec_strength"), + ValueLayout.JAVA_BYTE.withName("cdef_uv_pri_strength"), + ValueLayout.JAVA_BYTE.withName("cdef_uv_sec_strength") + ); + /// The [VarHandle] of `cdef_damping_minus_3` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cdef_damping_minus_3 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cdef_damping_minus_3")); + /// The [VarHandle] of `cdef_bits` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cdef_bits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cdef_bits")); + /// The [VarHandle] of `cdef_y_pri_strength` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cdef_y_pri_strength = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cdef_y_pri_strength")); + /// The [VarHandle] of `cdef_y_sec_strength` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cdef_y_sec_strength = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cdef_y_sec_strength")); + /// The [VarHandle] of `cdef_uv_pri_strength` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cdef_uv_pri_strength = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cdef_uv_pri_strength")); + /// The [VarHandle] of `cdef_uv_sec_strength` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cdef_uv_sec_strength = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cdef_uv_sec_strength")); + + /// Creates `StdVideoAV1CDEF` with the given segment. + /// @param segment the memory segment + public StdVideoAV1CDEF(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1CDEF` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1CDEF of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1CDEF(segment); } + + /// Creates `StdVideoAV1CDEF` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1CDEF ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1CDEF(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1CDEF` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1CDEF ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1CDEF(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1CDEF` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1CDEF` + public static StdVideoAV1CDEF alloc(SegmentAllocator allocator) { return new StdVideoAV1CDEF(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1CDEF` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1CDEF` + public static StdVideoAV1CDEF alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1CDEF(allocator.allocate(LAYOUT, count)); } + + /// {@return `cdef_damping_minus_3` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_cdef_damping_minus_3(MemorySegment segment, long index) { return (byte) VH_cdef_damping_minus_3.get(segment, 0L, index); } + /// {@return `cdef_damping_minus_3`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_cdef_damping_minus_3(MemorySegment segment) { return StdVideoAV1CDEF.get_cdef_damping_minus_3(segment, 0L); } + /// {@return `cdef_damping_minus_3` at the given index} + /// @param index the index + public @CType("uint8_t") byte cdef_damping_minus_3At(long index) { return StdVideoAV1CDEF.get_cdef_damping_minus_3(this.segment(), index); } + /// {@return `cdef_damping_minus_3`} + public @CType("uint8_t") byte cdef_damping_minus_3() { return StdVideoAV1CDEF.get_cdef_damping_minus_3(this.segment()); } + /// Sets `cdef_damping_minus_3` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cdef_damping_minus_3(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_cdef_damping_minus_3.set(segment, 0L, index, value); } + /// Sets `cdef_damping_minus_3` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cdef_damping_minus_3(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1CDEF.set_cdef_damping_minus_3(segment, 0L, value); } + /// Sets `cdef_damping_minus_3` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_damping_minus_3At(long index, @CType("uint8_t") byte value) { StdVideoAV1CDEF.set_cdef_damping_minus_3(this.segment(), index, value); return this; } + /// Sets `cdef_damping_minus_3` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_damping_minus_3(@CType("uint8_t") byte value) { StdVideoAV1CDEF.set_cdef_damping_minus_3(this.segment(), value); return this; } + + /// {@return `cdef_bits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_cdef_bits(MemorySegment segment, long index) { return (byte) VH_cdef_bits.get(segment, 0L, index); } + /// {@return `cdef_bits`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_cdef_bits(MemorySegment segment) { return StdVideoAV1CDEF.get_cdef_bits(segment, 0L); } + /// {@return `cdef_bits` at the given index} + /// @param index the index + public @CType("uint8_t") byte cdef_bitsAt(long index) { return StdVideoAV1CDEF.get_cdef_bits(this.segment(), index); } + /// {@return `cdef_bits`} + public @CType("uint8_t") byte cdef_bits() { return StdVideoAV1CDEF.get_cdef_bits(this.segment()); } + /// Sets `cdef_bits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cdef_bits(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_cdef_bits.set(segment, 0L, index, value); } + /// Sets `cdef_bits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cdef_bits(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1CDEF.set_cdef_bits(segment, 0L, value); } + /// Sets `cdef_bits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_bitsAt(long index, @CType("uint8_t") byte value) { StdVideoAV1CDEF.set_cdef_bits(this.segment(), index, value); return this; } + /// Sets `cdef_bits` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_bits(@CType("uint8_t") byte value) { StdVideoAV1CDEF.set_cdef_bits(this.segment(), value); return this; } + + /// {@return `cdef_y_pri_strength` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_cdef_y_pri_strength(MemorySegment segment, long index) { return (byte) VH_cdef_y_pri_strength.get(segment, 0L, index); } + /// {@return `cdef_y_pri_strength`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_cdef_y_pri_strength(MemorySegment segment) { return StdVideoAV1CDEF.get_cdef_y_pri_strength(segment, 0L); } + /// {@return `cdef_y_pri_strength` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte cdef_y_pri_strengthAt(long index) { return StdVideoAV1CDEF.get_cdef_y_pri_strength(this.segment(), index); } + /// {@return `cdef_y_pri_strength`} + public @CType("uint8_t [ ]") byte cdef_y_pri_strength() { return StdVideoAV1CDEF.get_cdef_y_pri_strength(this.segment()); } + /// Sets `cdef_y_pri_strength` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cdef_y_pri_strength(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_cdef_y_pri_strength.set(segment, 0L, index, value); } + /// Sets `cdef_y_pri_strength` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cdef_y_pri_strength(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_y_pri_strength(segment, 0L, value); } + /// Sets `cdef_y_pri_strength` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_y_pri_strengthAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_y_pri_strength(this.segment(), index, value); return this; } + /// Sets `cdef_y_pri_strength` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_y_pri_strength(@CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_y_pri_strength(this.segment(), value); return this; } + + /// {@return `cdef_y_sec_strength` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_cdef_y_sec_strength(MemorySegment segment, long index) { return (byte) VH_cdef_y_sec_strength.get(segment, 0L, index); } + /// {@return `cdef_y_sec_strength`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_cdef_y_sec_strength(MemorySegment segment) { return StdVideoAV1CDEF.get_cdef_y_sec_strength(segment, 0L); } + /// {@return `cdef_y_sec_strength` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte cdef_y_sec_strengthAt(long index) { return StdVideoAV1CDEF.get_cdef_y_sec_strength(this.segment(), index); } + /// {@return `cdef_y_sec_strength`} + public @CType("uint8_t [ ]") byte cdef_y_sec_strength() { return StdVideoAV1CDEF.get_cdef_y_sec_strength(this.segment()); } + /// Sets `cdef_y_sec_strength` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cdef_y_sec_strength(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_cdef_y_sec_strength.set(segment, 0L, index, value); } + /// Sets `cdef_y_sec_strength` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cdef_y_sec_strength(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_y_sec_strength(segment, 0L, value); } + /// Sets `cdef_y_sec_strength` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_y_sec_strengthAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_y_sec_strength(this.segment(), index, value); return this; } + /// Sets `cdef_y_sec_strength` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_y_sec_strength(@CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_y_sec_strength(this.segment(), value); return this; } + + /// {@return `cdef_uv_pri_strength` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_cdef_uv_pri_strength(MemorySegment segment, long index) { return (byte) VH_cdef_uv_pri_strength.get(segment, 0L, index); } + /// {@return `cdef_uv_pri_strength`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_cdef_uv_pri_strength(MemorySegment segment) { return StdVideoAV1CDEF.get_cdef_uv_pri_strength(segment, 0L); } + /// {@return `cdef_uv_pri_strength` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte cdef_uv_pri_strengthAt(long index) { return StdVideoAV1CDEF.get_cdef_uv_pri_strength(this.segment(), index); } + /// {@return `cdef_uv_pri_strength`} + public @CType("uint8_t [ ]") byte cdef_uv_pri_strength() { return StdVideoAV1CDEF.get_cdef_uv_pri_strength(this.segment()); } + /// Sets `cdef_uv_pri_strength` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cdef_uv_pri_strength(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_cdef_uv_pri_strength.set(segment, 0L, index, value); } + /// Sets `cdef_uv_pri_strength` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cdef_uv_pri_strength(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_uv_pri_strength(segment, 0L, value); } + /// Sets `cdef_uv_pri_strength` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_uv_pri_strengthAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_uv_pri_strength(this.segment(), index, value); return this; } + /// Sets `cdef_uv_pri_strength` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_uv_pri_strength(@CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_uv_pri_strength(this.segment(), value); return this; } + + /// {@return `cdef_uv_sec_strength` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_cdef_uv_sec_strength(MemorySegment segment, long index) { return (byte) VH_cdef_uv_sec_strength.get(segment, 0L, index); } + /// {@return `cdef_uv_sec_strength`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_cdef_uv_sec_strength(MemorySegment segment) { return StdVideoAV1CDEF.get_cdef_uv_sec_strength(segment, 0L); } + /// {@return `cdef_uv_sec_strength` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte cdef_uv_sec_strengthAt(long index) { return StdVideoAV1CDEF.get_cdef_uv_sec_strength(this.segment(), index); } + /// {@return `cdef_uv_sec_strength`} + public @CType("uint8_t [ ]") byte cdef_uv_sec_strength() { return StdVideoAV1CDEF.get_cdef_uv_sec_strength(this.segment()); } + /// Sets `cdef_uv_sec_strength` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cdef_uv_sec_strength(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_cdef_uv_sec_strength.set(segment, 0L, index, value); } + /// Sets `cdef_uv_sec_strength` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cdef_uv_sec_strength(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_uv_sec_strength(segment, 0L, value); } + /// Sets `cdef_uv_sec_strength` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_uv_sec_strengthAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_uv_sec_strength(this.segment(), index, value); return this; } + /// Sets `cdef_uv_sec_strength` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1CDEF cdef_uv_sec_strength(@CType("uint8_t [ ]") byte value) { StdVideoAV1CDEF.set_cdef_uv_sec_strength(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1ColorConfig.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1ColorConfig.java new file mode 100644 index 00000000..b5cef0e7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1ColorConfig.java @@ -0,0 +1,407 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### BitDepth +/// [VarHandle][#VH_BitDepth] - [Getter][#BitDepth()] - [Setter][#BitDepth(byte)] +/// ### subsampling_x +/// [VarHandle][#VH_subsampling_x] - [Getter][#subsampling_x()] - [Setter][#subsampling_x(byte)] +/// ### subsampling_y +/// [VarHandle][#VH_subsampling_y] - [Getter][#subsampling_y()] - [Setter][#subsampling_y(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### color_primaries +/// [VarHandle][#VH_color_primaries] - [Getter][#color_primaries()] - [Setter][#color_primaries(int)] +/// ### transfer_characteristics +/// [VarHandle][#VH_transfer_characteristics] - [Getter][#transfer_characteristics()] - [Setter][#transfer_characteristics(int)] +/// ### matrix_coefficients +/// [VarHandle][#VH_matrix_coefficients] - [Getter][#matrix_coefficients()] - [Setter][#matrix_coefficients(int)] +/// ### chroma_sample_position +/// [VarHandle][#VH_chroma_sample_position] - [Getter][#chroma_sample_position()] - [Setter][#chroma_sample_position(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1ColorConfig { +/// StdVideoAV1ColorConfigFlags flags; +/// uint8_t BitDepth; +/// uint8_t subsampling_x; +/// uint8_t subsampling_y; +/// uint8_t reserved1; +/// StdVideoAV1ColorPrimaries color_primaries; +/// StdVideoAV1TransferCharacteristics transfer_characteristics; +/// StdVideoAV1MatrixCoefficients matrix_coefficients; +/// StdVideoAV1ChromaSamplePosition chroma_sample_position; +/// } StdVideoAV1ColorConfig; +/// ``` +public final class StdVideoAV1ColorConfig extends Struct { + /// The struct layout of `StdVideoAV1ColorConfig`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoAV1ColorConfigFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("BitDepth"), + ValueLayout.JAVA_BYTE.withName("subsampling_x"), + ValueLayout.JAVA_BYTE.withName("subsampling_y"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_INT.withName("color_primaries"), + ValueLayout.JAVA_INT.withName("transfer_characteristics"), + ValueLayout.JAVA_INT.withName("matrix_coefficients"), + ValueLayout.JAVA_INT.withName("chroma_sample_position") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `BitDepth` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_BitDepth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("BitDepth")); + /// The [VarHandle] of `subsampling_x` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_subsampling_x = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subsampling_x")); + /// The [VarHandle] of `subsampling_y` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_subsampling_y = LAYOUT.arrayElementVarHandle(PathElement.groupElement("subsampling_y")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `color_primaries` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_color_primaries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("color_primaries")); + /// The [VarHandle] of `transfer_characteristics` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transfer_characteristics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transfer_characteristics")); + /// The [VarHandle] of `matrix_coefficients` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_matrix_coefficients = LAYOUT.arrayElementVarHandle(PathElement.groupElement("matrix_coefficients")); + /// The [VarHandle] of `chroma_sample_position` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chroma_sample_position = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_sample_position")); + + /// Creates `StdVideoAV1ColorConfig` with the given segment. + /// @param segment the memory segment + public StdVideoAV1ColorConfig(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1ColorConfig` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1ColorConfig of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1ColorConfig(segment); } + + /// Creates `StdVideoAV1ColorConfig` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1ColorConfig ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1ColorConfig(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1ColorConfig` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1ColorConfig ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1ColorConfig(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1ColorConfig` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1ColorConfig` + public static StdVideoAV1ColorConfig alloc(SegmentAllocator allocator) { return new StdVideoAV1ColorConfig(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1ColorConfig` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1ColorConfig` + public static StdVideoAV1ColorConfig alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1ColorConfig(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1ColorConfigFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1ColorConfigFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoAV1ColorConfig.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoAV1ColorConfigFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoAV1ColorConfig.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoAV1ColorConfigFlags") java.lang.foreign.MemorySegment flags() { return StdVideoAV1ColorConfig.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoAV1ColorConfigFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoAV1ColorConfigFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1ColorConfig.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig flagsAt(long index, @CType("StdVideoAV1ColorConfigFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1ColorConfig.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig flags(@CType("StdVideoAV1ColorConfigFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1ColorConfig.set_flags(this.segment(), value); return this; } + + /// {@return `BitDepth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_BitDepth(MemorySegment segment, long index) { return (byte) VH_BitDepth.get(segment, 0L, index); } + /// {@return `BitDepth`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_BitDepth(MemorySegment segment) { return StdVideoAV1ColorConfig.get_BitDepth(segment, 0L); } + /// {@return `BitDepth` at the given index} + /// @param index the index + public @CType("uint8_t") byte BitDepthAt(long index) { return StdVideoAV1ColorConfig.get_BitDepth(this.segment(), index); } + /// {@return `BitDepth`} + public @CType("uint8_t") byte BitDepth() { return StdVideoAV1ColorConfig.get_BitDepth(this.segment()); } + /// Sets `BitDepth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_BitDepth(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_BitDepth.set(segment, 0L, index, value); } + /// Sets `BitDepth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_BitDepth(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_BitDepth(segment, 0L, value); } + /// Sets `BitDepth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig BitDepthAt(long index, @CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_BitDepth(this.segment(), index, value); return this; } + /// Sets `BitDepth` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig BitDepth(@CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_BitDepth(this.segment(), value); return this; } + + /// {@return `subsampling_x` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_subsampling_x(MemorySegment segment, long index) { return (byte) VH_subsampling_x.get(segment, 0L, index); } + /// {@return `subsampling_x`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_subsampling_x(MemorySegment segment) { return StdVideoAV1ColorConfig.get_subsampling_x(segment, 0L); } + /// {@return `subsampling_x` at the given index} + /// @param index the index + public @CType("uint8_t") byte subsampling_xAt(long index) { return StdVideoAV1ColorConfig.get_subsampling_x(this.segment(), index); } + /// {@return `subsampling_x`} + public @CType("uint8_t") byte subsampling_x() { return StdVideoAV1ColorConfig.get_subsampling_x(this.segment()); } + /// Sets `subsampling_x` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subsampling_x(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_subsampling_x.set(segment, 0L, index, value); } + /// Sets `subsampling_x` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subsampling_x(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_subsampling_x(segment, 0L, value); } + /// Sets `subsampling_x` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig subsampling_xAt(long index, @CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_subsampling_x(this.segment(), index, value); return this; } + /// Sets `subsampling_x` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig subsampling_x(@CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_subsampling_x(this.segment(), value); return this; } + + /// {@return `subsampling_y` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_subsampling_y(MemorySegment segment, long index) { return (byte) VH_subsampling_y.get(segment, 0L, index); } + /// {@return `subsampling_y`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_subsampling_y(MemorySegment segment) { return StdVideoAV1ColorConfig.get_subsampling_y(segment, 0L); } + /// {@return `subsampling_y` at the given index} + /// @param index the index + public @CType("uint8_t") byte subsampling_yAt(long index) { return StdVideoAV1ColorConfig.get_subsampling_y(this.segment(), index); } + /// {@return `subsampling_y`} + public @CType("uint8_t") byte subsampling_y() { return StdVideoAV1ColorConfig.get_subsampling_y(this.segment()); } + /// Sets `subsampling_y` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_subsampling_y(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_subsampling_y.set(segment, 0L, index, value); } + /// Sets `subsampling_y` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_subsampling_y(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_subsampling_y(segment, 0L, value); } + /// Sets `subsampling_y` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig subsampling_yAt(long index, @CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_subsampling_y(this.segment(), index, value); return this; } + /// Sets `subsampling_y` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig subsampling_y(@CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_subsampling_y(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoAV1ColorConfig.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoAV1ColorConfig.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoAV1ColorConfig.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig reserved1At(long index, @CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig reserved1(@CType("uint8_t") byte value) { StdVideoAV1ColorConfig.set_reserved1(this.segment(), value); return this; } + + /// {@return `color_primaries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1ColorPrimaries") int get_color_primaries(MemorySegment segment, long index) { return (int) VH_color_primaries.get(segment, 0L, index); } + /// {@return `color_primaries`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1ColorPrimaries") int get_color_primaries(MemorySegment segment) { return StdVideoAV1ColorConfig.get_color_primaries(segment, 0L); } + /// {@return `color_primaries` at the given index} + /// @param index the index + public @CType("StdVideoAV1ColorPrimaries") int color_primariesAt(long index) { return StdVideoAV1ColorConfig.get_color_primaries(this.segment(), index); } + /// {@return `color_primaries`} + public @CType("StdVideoAV1ColorPrimaries") int color_primaries() { return StdVideoAV1ColorConfig.get_color_primaries(this.segment()); } + /// Sets `color_primaries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_color_primaries(MemorySegment segment, long index, @CType("StdVideoAV1ColorPrimaries") int value) { VH_color_primaries.set(segment, 0L, index, value); } + /// Sets `color_primaries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_color_primaries(MemorySegment segment, @CType("StdVideoAV1ColorPrimaries") int value) { StdVideoAV1ColorConfig.set_color_primaries(segment, 0L, value); } + /// Sets `color_primaries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig color_primariesAt(long index, @CType("StdVideoAV1ColorPrimaries") int value) { StdVideoAV1ColorConfig.set_color_primaries(this.segment(), index, value); return this; } + /// Sets `color_primaries` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig color_primaries(@CType("StdVideoAV1ColorPrimaries") int value) { StdVideoAV1ColorConfig.set_color_primaries(this.segment(), value); return this; } + + /// {@return `transfer_characteristics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1TransferCharacteristics") int get_transfer_characteristics(MemorySegment segment, long index) { return (int) VH_transfer_characteristics.get(segment, 0L, index); } + /// {@return `transfer_characteristics`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1TransferCharacteristics") int get_transfer_characteristics(MemorySegment segment) { return StdVideoAV1ColorConfig.get_transfer_characteristics(segment, 0L); } + /// {@return `transfer_characteristics` at the given index} + /// @param index the index + public @CType("StdVideoAV1TransferCharacteristics") int transfer_characteristicsAt(long index) { return StdVideoAV1ColorConfig.get_transfer_characteristics(this.segment(), index); } + /// {@return `transfer_characteristics`} + public @CType("StdVideoAV1TransferCharacteristics") int transfer_characteristics() { return StdVideoAV1ColorConfig.get_transfer_characteristics(this.segment()); } + /// Sets `transfer_characteristics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transfer_characteristics(MemorySegment segment, long index, @CType("StdVideoAV1TransferCharacteristics") int value) { VH_transfer_characteristics.set(segment, 0L, index, value); } + /// Sets `transfer_characteristics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transfer_characteristics(MemorySegment segment, @CType("StdVideoAV1TransferCharacteristics") int value) { StdVideoAV1ColorConfig.set_transfer_characteristics(segment, 0L, value); } + /// Sets `transfer_characteristics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig transfer_characteristicsAt(long index, @CType("StdVideoAV1TransferCharacteristics") int value) { StdVideoAV1ColorConfig.set_transfer_characteristics(this.segment(), index, value); return this; } + /// Sets `transfer_characteristics` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig transfer_characteristics(@CType("StdVideoAV1TransferCharacteristics") int value) { StdVideoAV1ColorConfig.set_transfer_characteristics(this.segment(), value); return this; } + + /// {@return `matrix_coefficients` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1MatrixCoefficients") int get_matrix_coefficients(MemorySegment segment, long index) { return (int) VH_matrix_coefficients.get(segment, 0L, index); } + /// {@return `matrix_coefficients`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1MatrixCoefficients") int get_matrix_coefficients(MemorySegment segment) { return StdVideoAV1ColorConfig.get_matrix_coefficients(segment, 0L); } + /// {@return `matrix_coefficients` at the given index} + /// @param index the index + public @CType("StdVideoAV1MatrixCoefficients") int matrix_coefficientsAt(long index) { return StdVideoAV1ColorConfig.get_matrix_coefficients(this.segment(), index); } + /// {@return `matrix_coefficients`} + public @CType("StdVideoAV1MatrixCoefficients") int matrix_coefficients() { return StdVideoAV1ColorConfig.get_matrix_coefficients(this.segment()); } + /// Sets `matrix_coefficients` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_matrix_coefficients(MemorySegment segment, long index, @CType("StdVideoAV1MatrixCoefficients") int value) { VH_matrix_coefficients.set(segment, 0L, index, value); } + /// Sets `matrix_coefficients` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_matrix_coefficients(MemorySegment segment, @CType("StdVideoAV1MatrixCoefficients") int value) { StdVideoAV1ColorConfig.set_matrix_coefficients(segment, 0L, value); } + /// Sets `matrix_coefficients` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig matrix_coefficientsAt(long index, @CType("StdVideoAV1MatrixCoefficients") int value) { StdVideoAV1ColorConfig.set_matrix_coefficients(this.segment(), index, value); return this; } + /// Sets `matrix_coefficients` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig matrix_coefficients(@CType("StdVideoAV1MatrixCoefficients") int value) { StdVideoAV1ColorConfig.set_matrix_coefficients(this.segment(), value); return this; } + + /// {@return `chroma_sample_position` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1ChromaSamplePosition") int get_chroma_sample_position(MemorySegment segment, long index) { return (int) VH_chroma_sample_position.get(segment, 0L, index); } + /// {@return `chroma_sample_position`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1ChromaSamplePosition") int get_chroma_sample_position(MemorySegment segment) { return StdVideoAV1ColorConfig.get_chroma_sample_position(segment, 0L); } + /// {@return `chroma_sample_position` at the given index} + /// @param index the index + public @CType("StdVideoAV1ChromaSamplePosition") int chroma_sample_positionAt(long index) { return StdVideoAV1ColorConfig.get_chroma_sample_position(this.segment(), index); } + /// {@return `chroma_sample_position`} + public @CType("StdVideoAV1ChromaSamplePosition") int chroma_sample_position() { return StdVideoAV1ColorConfig.get_chroma_sample_position(this.segment()); } + /// Sets `chroma_sample_position` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_sample_position(MemorySegment segment, long index, @CType("StdVideoAV1ChromaSamplePosition") int value) { VH_chroma_sample_position.set(segment, 0L, index, value); } + /// Sets `chroma_sample_position` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_sample_position(MemorySegment segment, @CType("StdVideoAV1ChromaSamplePosition") int value) { StdVideoAV1ColorConfig.set_chroma_sample_position(segment, 0L, value); } + /// Sets `chroma_sample_position` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig chroma_sample_positionAt(long index, @CType("StdVideoAV1ChromaSamplePosition") int value) { StdVideoAV1ColorConfig.set_chroma_sample_position(this.segment(), index, value); return this; } + /// Sets `chroma_sample_position` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfig chroma_sample_position(@CType("StdVideoAV1ChromaSamplePosition") int value) { StdVideoAV1ColorConfig.set_chroma_sample_position(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1ColorConfigFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1ColorConfigFlags.java new file mode 100644 index 00000000..ef9cdef1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1ColorConfigFlags.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### mono_chrome +/// [VarHandle][#VH_mono_chrome] - [Getter][#mono_chrome()] - [Setter][#mono_chrome(int)] +/// ### color_range +/// [VarHandle][#VH_color_range] - [Getter][#color_range()] - [Setter][#color_range(int)] +/// ### separate_uv_delta_q +/// [VarHandle][#VH_separate_uv_delta_q] - [Getter][#separate_uv_delta_q()] - [Setter][#separate_uv_delta_q(int)] +/// ### color_description_present_flag +/// [VarHandle][#VH_color_description_present_flag] - [Getter][#color_description_present_flag()] - [Setter][#color_description_present_flag(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1ColorConfigFlags { +/// uint32_t : 1 mono_chrome; +/// uint32_t : 1 color_range; +/// uint32_t : 1 separate_uv_delta_q; +/// uint32_t : 1 color_description_present_flag; +/// uint32_t : 28 reserved; +/// } StdVideoAV1ColorConfigFlags; +/// ``` +public final class StdVideoAV1ColorConfigFlags extends Struct { + /// The struct layout of `StdVideoAV1ColorConfigFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("mono_chrome"), + ValueLayout.JAVA_INT.withName("color_range"), + ValueLayout.JAVA_INT.withName("separate_uv_delta_q"), + ValueLayout.JAVA_INT.withName("color_description_present_flag"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `mono_chrome` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mono_chrome = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mono_chrome")); + /// The [VarHandle] of `color_range` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_color_range = LAYOUT.arrayElementVarHandle(PathElement.groupElement("color_range")); + /// The [VarHandle] of `separate_uv_delta_q` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_separate_uv_delta_q = LAYOUT.arrayElementVarHandle(PathElement.groupElement("separate_uv_delta_q")); + /// The [VarHandle] of `color_description_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_color_description_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("color_description_present_flag")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoAV1ColorConfigFlags` with the given segment. + /// @param segment the memory segment + public StdVideoAV1ColorConfigFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1ColorConfigFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1ColorConfigFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1ColorConfigFlags(segment); } + + /// Creates `StdVideoAV1ColorConfigFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1ColorConfigFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1ColorConfigFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1ColorConfigFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1ColorConfigFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1ColorConfigFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1ColorConfigFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1ColorConfigFlags` + public static StdVideoAV1ColorConfigFlags alloc(SegmentAllocator allocator) { return new StdVideoAV1ColorConfigFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1ColorConfigFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1ColorConfigFlags` + public static StdVideoAV1ColorConfigFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1ColorConfigFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `mono_chrome` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_mono_chrome(MemorySegment segment, long index) { return (int) VH_mono_chrome.get(segment, 0L, index); } + /// {@return `mono_chrome`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_mono_chrome(MemorySegment segment) { return StdVideoAV1ColorConfigFlags.get_mono_chrome(segment, 0L); } + /// {@return `mono_chrome` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int mono_chromeAt(long index) { return StdVideoAV1ColorConfigFlags.get_mono_chrome(this.segment(), index); } + /// {@return `mono_chrome`} + public @CType("uint32_t : 1") int mono_chrome() { return StdVideoAV1ColorConfigFlags.get_mono_chrome(this.segment()); } + /// Sets `mono_chrome` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mono_chrome(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_mono_chrome.set(segment, 0L, index, value); } + /// Sets `mono_chrome` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mono_chrome(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_mono_chrome(segment, 0L, value); } + /// Sets `mono_chrome` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfigFlags mono_chromeAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_mono_chrome(this.segment(), index, value); return this; } + /// Sets `mono_chrome` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfigFlags mono_chrome(@CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_mono_chrome(this.segment(), value); return this; } + + /// {@return `color_range` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_color_range(MemorySegment segment, long index) { return (int) VH_color_range.get(segment, 0L, index); } + /// {@return `color_range`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_color_range(MemorySegment segment) { return StdVideoAV1ColorConfigFlags.get_color_range(segment, 0L); } + /// {@return `color_range` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int color_rangeAt(long index) { return StdVideoAV1ColorConfigFlags.get_color_range(this.segment(), index); } + /// {@return `color_range`} + public @CType("uint32_t : 1") int color_range() { return StdVideoAV1ColorConfigFlags.get_color_range(this.segment()); } + /// Sets `color_range` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_color_range(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_color_range.set(segment, 0L, index, value); } + /// Sets `color_range` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_color_range(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_color_range(segment, 0L, value); } + /// Sets `color_range` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfigFlags color_rangeAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_color_range(this.segment(), index, value); return this; } + /// Sets `color_range` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfigFlags color_range(@CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_color_range(this.segment(), value); return this; } + + /// {@return `separate_uv_delta_q` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_separate_uv_delta_q(MemorySegment segment, long index) { return (int) VH_separate_uv_delta_q.get(segment, 0L, index); } + /// {@return `separate_uv_delta_q`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_separate_uv_delta_q(MemorySegment segment) { return StdVideoAV1ColorConfigFlags.get_separate_uv_delta_q(segment, 0L); } + /// {@return `separate_uv_delta_q` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int separate_uv_delta_qAt(long index) { return StdVideoAV1ColorConfigFlags.get_separate_uv_delta_q(this.segment(), index); } + /// {@return `separate_uv_delta_q`} + public @CType("uint32_t : 1") int separate_uv_delta_q() { return StdVideoAV1ColorConfigFlags.get_separate_uv_delta_q(this.segment()); } + /// Sets `separate_uv_delta_q` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_separate_uv_delta_q(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_separate_uv_delta_q.set(segment, 0L, index, value); } + /// Sets `separate_uv_delta_q` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_separate_uv_delta_q(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_separate_uv_delta_q(segment, 0L, value); } + /// Sets `separate_uv_delta_q` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfigFlags separate_uv_delta_qAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_separate_uv_delta_q(this.segment(), index, value); return this; } + /// Sets `separate_uv_delta_q` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfigFlags separate_uv_delta_q(@CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_separate_uv_delta_q(this.segment(), value); return this; } + + /// {@return `color_description_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_color_description_present_flag(MemorySegment segment, long index) { return (int) VH_color_description_present_flag.get(segment, 0L, index); } + /// {@return `color_description_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_color_description_present_flag(MemorySegment segment) { return StdVideoAV1ColorConfigFlags.get_color_description_present_flag(segment, 0L); } + /// {@return `color_description_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int color_description_present_flagAt(long index) { return StdVideoAV1ColorConfigFlags.get_color_description_present_flag(this.segment(), index); } + /// {@return `color_description_present_flag`} + public @CType("uint32_t : 1") int color_description_present_flag() { return StdVideoAV1ColorConfigFlags.get_color_description_present_flag(this.segment()); } + /// Sets `color_description_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_color_description_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_color_description_present_flag.set(segment, 0L, index, value); } + /// Sets `color_description_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_color_description_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_color_description_present_flag(segment, 0L, value); } + /// Sets `color_description_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfigFlags color_description_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_color_description_present_flag(this.segment(), index, value); return this; } + /// Sets `color_description_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfigFlags color_description_present_flag(@CType("uint32_t : 1") int value) { StdVideoAV1ColorConfigFlags.set_color_description_present_flag(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 28") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 28") int get_reserved(MemorySegment segment) { return StdVideoAV1ColorConfigFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 28") int reservedAt(long index) { return StdVideoAV1ColorConfigFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 28") int reserved() { return StdVideoAV1ColorConfigFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 28") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 28") int value) { StdVideoAV1ColorConfigFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfigFlags reservedAt(long index, @CType("uint32_t : 28") int value) { StdVideoAV1ColorConfigFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1ColorConfigFlags reserved(@CType("uint32_t : 28") int value) { StdVideoAV1ColorConfigFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1FilmGrain.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1FilmGrain.java new file mode 100644 index 00000000..2169f417 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1FilmGrain.java @@ -0,0 +1,999 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### grain_scaling_minus_8 +/// [VarHandle][#VH_grain_scaling_minus_8] - [Getter][#grain_scaling_minus_8()] - [Setter][#grain_scaling_minus_8(byte)] +/// ### ar_coeff_lag +/// [VarHandle][#VH_ar_coeff_lag] - [Getter][#ar_coeff_lag()] - [Setter][#ar_coeff_lag(byte)] +/// ### ar_coeff_shift_minus_6 +/// [VarHandle][#VH_ar_coeff_shift_minus_6] - [Getter][#ar_coeff_shift_minus_6()] - [Setter][#ar_coeff_shift_minus_6(byte)] +/// ### grain_scale_shift +/// [VarHandle][#VH_grain_scale_shift] - [Getter][#grain_scale_shift()] - [Setter][#grain_scale_shift(byte)] +/// ### grain_seed +/// [VarHandle][#VH_grain_seed] - [Getter][#grain_seed()] - [Setter][#grain_seed(short)] +/// ### film_grain_params_ref_idx +/// [VarHandle][#VH_film_grain_params_ref_idx] - [Getter][#film_grain_params_ref_idx()] - [Setter][#film_grain_params_ref_idx(byte)] +/// ### num_y_points +/// [VarHandle][#VH_num_y_points] - [Getter][#num_y_points()] - [Setter][#num_y_points(byte)] +/// ### point_y_value +/// [VarHandle][#VH_point_y_value] - [Getter][#point_y_value()] - [Setter][#point_y_value(byte)] +/// ### point_y_scaling +/// [VarHandle][#VH_point_y_scaling] - [Getter][#point_y_scaling()] - [Setter][#point_y_scaling(byte)] +/// ### num_cb_points +/// [VarHandle][#VH_num_cb_points] - [Getter][#num_cb_points()] - [Setter][#num_cb_points(byte)] +/// ### point_cb_value +/// [VarHandle][#VH_point_cb_value] - [Getter][#point_cb_value()] - [Setter][#point_cb_value(byte)] +/// ### point_cb_scaling +/// [VarHandle][#VH_point_cb_scaling] - [Getter][#point_cb_scaling()] - [Setter][#point_cb_scaling(byte)] +/// ### num_cr_points +/// [VarHandle][#VH_num_cr_points] - [Getter][#num_cr_points()] - [Setter][#num_cr_points(byte)] +/// ### point_cr_value +/// [VarHandle][#VH_point_cr_value] - [Getter][#point_cr_value()] - [Setter][#point_cr_value(byte)] +/// ### point_cr_scaling +/// [VarHandle][#VH_point_cr_scaling] - [Getter][#point_cr_scaling()] - [Setter][#point_cr_scaling(byte)] +/// ### ar_coeffs_y_plus_128 +/// [VarHandle][#VH_ar_coeffs_y_plus_128] - [Getter][#ar_coeffs_y_plus_128()] - [Setter][#ar_coeffs_y_plus_128(byte)] +/// ### ar_coeffs_cb_plus_128 +/// [VarHandle][#VH_ar_coeffs_cb_plus_128] - [Getter][#ar_coeffs_cb_plus_128()] - [Setter][#ar_coeffs_cb_plus_128(byte)] +/// ### ar_coeffs_cr_plus_128 +/// [VarHandle][#VH_ar_coeffs_cr_plus_128] - [Getter][#ar_coeffs_cr_plus_128()] - [Setter][#ar_coeffs_cr_plus_128(byte)] +/// ### cb_mult +/// [VarHandle][#VH_cb_mult] - [Getter][#cb_mult()] - [Setter][#cb_mult(byte)] +/// ### cb_luma_mult +/// [VarHandle][#VH_cb_luma_mult] - [Getter][#cb_luma_mult()] - [Setter][#cb_luma_mult(byte)] +/// ### cb_offset +/// [VarHandle][#VH_cb_offset] - [Getter][#cb_offset()] - [Setter][#cb_offset(short)] +/// ### cr_mult +/// [VarHandle][#VH_cr_mult] - [Getter][#cr_mult()] - [Setter][#cr_mult(byte)] +/// ### cr_luma_mult +/// [VarHandle][#VH_cr_luma_mult] - [Getter][#cr_luma_mult()] - [Setter][#cr_luma_mult(byte)] +/// ### cr_offset +/// [VarHandle][#VH_cr_offset] - [Getter][#cr_offset()] - [Setter][#cr_offset(short)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1FilmGrain { +/// StdVideoAV1FilmGrainFlags flags; +/// uint8_t grain_scaling_minus_8; +/// uint8_t ar_coeff_lag; +/// uint8_t ar_coeff_shift_minus_6; +/// uint8_t grain_scale_shift; +/// uint16_t grain_seed; +/// uint8_t film_grain_params_ref_idx; +/// uint8_t num_y_points; +/// uint8_t [ ] point_y_value; +/// uint8_t [ ] point_y_scaling; +/// uint8_t num_cb_points; +/// uint8_t [ ] point_cb_value; +/// uint8_t [ ] point_cb_scaling; +/// uint8_t num_cr_points; +/// uint8_t [ ] point_cr_value; +/// uint8_t [ ] point_cr_scaling; +/// int8_t [ ] ar_coeffs_y_plus_128; +/// int8_t [ ] ar_coeffs_cb_plus_128; +/// int8_t [ ] ar_coeffs_cr_plus_128; +/// uint8_t cb_mult; +/// uint8_t cb_luma_mult; +/// uint16_t cb_offset; +/// uint8_t cr_mult; +/// uint8_t cr_luma_mult; +/// uint16_t cr_offset; +/// } StdVideoAV1FilmGrain; +/// ``` +public final class StdVideoAV1FilmGrain extends Struct { + /// The struct layout of `StdVideoAV1FilmGrain`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoAV1FilmGrainFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("grain_scaling_minus_8"), + ValueLayout.JAVA_BYTE.withName("ar_coeff_lag"), + ValueLayout.JAVA_BYTE.withName("ar_coeff_shift_minus_6"), + ValueLayout.JAVA_BYTE.withName("grain_scale_shift"), + ValueLayout.JAVA_SHORT.withName("grain_seed"), + ValueLayout.JAVA_BYTE.withName("film_grain_params_ref_idx"), + ValueLayout.JAVA_BYTE.withName("num_y_points"), + ValueLayout.JAVA_BYTE.withName("point_y_value"), + ValueLayout.JAVA_BYTE.withName("point_y_scaling"), + ValueLayout.JAVA_BYTE.withName("num_cb_points"), + ValueLayout.JAVA_BYTE.withName("point_cb_value"), + ValueLayout.JAVA_BYTE.withName("point_cb_scaling"), + ValueLayout.JAVA_BYTE.withName("num_cr_points"), + ValueLayout.JAVA_BYTE.withName("point_cr_value"), + ValueLayout.JAVA_BYTE.withName("point_cr_scaling"), + ValueLayout.JAVA_BYTE.withName("ar_coeffs_y_plus_128"), + ValueLayout.JAVA_BYTE.withName("ar_coeffs_cb_plus_128"), + ValueLayout.JAVA_BYTE.withName("ar_coeffs_cr_plus_128"), + ValueLayout.JAVA_BYTE.withName("cb_mult"), + ValueLayout.JAVA_BYTE.withName("cb_luma_mult"), + ValueLayout.JAVA_SHORT.withName("cb_offset"), + ValueLayout.JAVA_BYTE.withName("cr_mult"), + ValueLayout.JAVA_BYTE.withName("cr_luma_mult"), + ValueLayout.JAVA_SHORT.withName("cr_offset") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `grain_scaling_minus_8` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_grain_scaling_minus_8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("grain_scaling_minus_8")); + /// The [VarHandle] of `ar_coeff_lag` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ar_coeff_lag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ar_coeff_lag")); + /// The [VarHandle] of `ar_coeff_shift_minus_6` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ar_coeff_shift_minus_6 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ar_coeff_shift_minus_6")); + /// The [VarHandle] of `grain_scale_shift` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_grain_scale_shift = LAYOUT.arrayElementVarHandle(PathElement.groupElement("grain_scale_shift")); + /// The [VarHandle] of `grain_seed` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_grain_seed = LAYOUT.arrayElementVarHandle(PathElement.groupElement("grain_seed")); + /// The [VarHandle] of `film_grain_params_ref_idx` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_film_grain_params_ref_idx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("film_grain_params_ref_idx")); + /// The [VarHandle] of `num_y_points` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_y_points = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_y_points")); + /// The [VarHandle] of `point_y_value` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_point_y_value = LAYOUT.arrayElementVarHandle(PathElement.groupElement("point_y_value")); + /// The [VarHandle] of `point_y_scaling` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_point_y_scaling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("point_y_scaling")); + /// The [VarHandle] of `num_cb_points` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_cb_points = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_cb_points")); + /// The [VarHandle] of `point_cb_value` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_point_cb_value = LAYOUT.arrayElementVarHandle(PathElement.groupElement("point_cb_value")); + /// The [VarHandle] of `point_cb_scaling` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_point_cb_scaling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("point_cb_scaling")); + /// The [VarHandle] of `num_cr_points` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_cr_points = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_cr_points")); + /// The [VarHandle] of `point_cr_value` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_point_cr_value = LAYOUT.arrayElementVarHandle(PathElement.groupElement("point_cr_value")); + /// The [VarHandle] of `point_cr_scaling` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_point_cr_scaling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("point_cr_scaling")); + /// The [VarHandle] of `ar_coeffs_y_plus_128` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ar_coeffs_y_plus_128 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ar_coeffs_y_plus_128")); + /// The [VarHandle] of `ar_coeffs_cb_plus_128` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ar_coeffs_cb_plus_128 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ar_coeffs_cb_plus_128")); + /// The [VarHandle] of `ar_coeffs_cr_plus_128` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ar_coeffs_cr_plus_128 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ar_coeffs_cr_plus_128")); + /// The [VarHandle] of `cb_mult` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cb_mult = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cb_mult")); + /// The [VarHandle] of `cb_luma_mult` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cb_luma_mult = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cb_luma_mult")); + /// The [VarHandle] of `cb_offset` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_cb_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cb_offset")); + /// The [VarHandle] of `cr_mult` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cr_mult = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cr_mult")); + /// The [VarHandle] of `cr_luma_mult` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cr_luma_mult = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cr_luma_mult")); + /// The [VarHandle] of `cr_offset` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_cr_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cr_offset")); + + /// Creates `StdVideoAV1FilmGrain` with the given segment. + /// @param segment the memory segment + public StdVideoAV1FilmGrain(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1FilmGrain` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1FilmGrain of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1FilmGrain(segment); } + + /// Creates `StdVideoAV1FilmGrain` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1FilmGrain ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1FilmGrain(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1FilmGrain` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1FilmGrain ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1FilmGrain(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1FilmGrain` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1FilmGrain` + public static StdVideoAV1FilmGrain alloc(SegmentAllocator allocator) { return new StdVideoAV1FilmGrain(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1FilmGrain` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1FilmGrain` + public static StdVideoAV1FilmGrain alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1FilmGrain(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1FilmGrainFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1FilmGrainFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoAV1FilmGrain.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoAV1FilmGrainFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoAV1FilmGrain.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoAV1FilmGrainFlags") java.lang.foreign.MemorySegment flags() { return StdVideoAV1FilmGrain.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoAV1FilmGrainFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoAV1FilmGrainFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1FilmGrain.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain flagsAt(long index, @CType("StdVideoAV1FilmGrainFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1FilmGrain.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain flags(@CType("StdVideoAV1FilmGrainFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1FilmGrain.set_flags(this.segment(), value); return this; } + + /// {@return `grain_scaling_minus_8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_grain_scaling_minus_8(MemorySegment segment, long index) { return (byte) VH_grain_scaling_minus_8.get(segment, 0L, index); } + /// {@return `grain_scaling_minus_8`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_grain_scaling_minus_8(MemorySegment segment) { return StdVideoAV1FilmGrain.get_grain_scaling_minus_8(segment, 0L); } + /// {@return `grain_scaling_minus_8` at the given index} + /// @param index the index + public @CType("uint8_t") byte grain_scaling_minus_8At(long index) { return StdVideoAV1FilmGrain.get_grain_scaling_minus_8(this.segment(), index); } + /// {@return `grain_scaling_minus_8`} + public @CType("uint8_t") byte grain_scaling_minus_8() { return StdVideoAV1FilmGrain.get_grain_scaling_minus_8(this.segment()); } + /// Sets `grain_scaling_minus_8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_grain_scaling_minus_8(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_grain_scaling_minus_8.set(segment, 0L, index, value); } + /// Sets `grain_scaling_minus_8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_grain_scaling_minus_8(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_grain_scaling_minus_8(segment, 0L, value); } + /// Sets `grain_scaling_minus_8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain grain_scaling_minus_8At(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_grain_scaling_minus_8(this.segment(), index, value); return this; } + /// Sets `grain_scaling_minus_8` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain grain_scaling_minus_8(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_grain_scaling_minus_8(this.segment(), value); return this; } + + /// {@return `ar_coeff_lag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_ar_coeff_lag(MemorySegment segment, long index) { return (byte) VH_ar_coeff_lag.get(segment, 0L, index); } + /// {@return `ar_coeff_lag`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_ar_coeff_lag(MemorySegment segment) { return StdVideoAV1FilmGrain.get_ar_coeff_lag(segment, 0L); } + /// {@return `ar_coeff_lag` at the given index} + /// @param index the index + public @CType("uint8_t") byte ar_coeff_lagAt(long index) { return StdVideoAV1FilmGrain.get_ar_coeff_lag(this.segment(), index); } + /// {@return `ar_coeff_lag`} + public @CType("uint8_t") byte ar_coeff_lag() { return StdVideoAV1FilmGrain.get_ar_coeff_lag(this.segment()); } + /// Sets `ar_coeff_lag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ar_coeff_lag(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_ar_coeff_lag.set(segment, 0L, index, value); } + /// Sets `ar_coeff_lag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ar_coeff_lag(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_ar_coeff_lag(segment, 0L, value); } + /// Sets `ar_coeff_lag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain ar_coeff_lagAt(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_ar_coeff_lag(this.segment(), index, value); return this; } + /// Sets `ar_coeff_lag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain ar_coeff_lag(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_ar_coeff_lag(this.segment(), value); return this; } + + /// {@return `ar_coeff_shift_minus_6` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_ar_coeff_shift_minus_6(MemorySegment segment, long index) { return (byte) VH_ar_coeff_shift_minus_6.get(segment, 0L, index); } + /// {@return `ar_coeff_shift_minus_6`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_ar_coeff_shift_minus_6(MemorySegment segment) { return StdVideoAV1FilmGrain.get_ar_coeff_shift_minus_6(segment, 0L); } + /// {@return `ar_coeff_shift_minus_6` at the given index} + /// @param index the index + public @CType("uint8_t") byte ar_coeff_shift_minus_6At(long index) { return StdVideoAV1FilmGrain.get_ar_coeff_shift_minus_6(this.segment(), index); } + /// {@return `ar_coeff_shift_minus_6`} + public @CType("uint8_t") byte ar_coeff_shift_minus_6() { return StdVideoAV1FilmGrain.get_ar_coeff_shift_minus_6(this.segment()); } + /// Sets `ar_coeff_shift_minus_6` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ar_coeff_shift_minus_6(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_ar_coeff_shift_minus_6.set(segment, 0L, index, value); } + /// Sets `ar_coeff_shift_minus_6` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ar_coeff_shift_minus_6(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_ar_coeff_shift_minus_6(segment, 0L, value); } + /// Sets `ar_coeff_shift_minus_6` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain ar_coeff_shift_minus_6At(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_ar_coeff_shift_minus_6(this.segment(), index, value); return this; } + /// Sets `ar_coeff_shift_minus_6` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain ar_coeff_shift_minus_6(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_ar_coeff_shift_minus_6(this.segment(), value); return this; } + + /// {@return `grain_scale_shift` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_grain_scale_shift(MemorySegment segment, long index) { return (byte) VH_grain_scale_shift.get(segment, 0L, index); } + /// {@return `grain_scale_shift`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_grain_scale_shift(MemorySegment segment) { return StdVideoAV1FilmGrain.get_grain_scale_shift(segment, 0L); } + /// {@return `grain_scale_shift` at the given index} + /// @param index the index + public @CType("uint8_t") byte grain_scale_shiftAt(long index) { return StdVideoAV1FilmGrain.get_grain_scale_shift(this.segment(), index); } + /// {@return `grain_scale_shift`} + public @CType("uint8_t") byte grain_scale_shift() { return StdVideoAV1FilmGrain.get_grain_scale_shift(this.segment()); } + /// Sets `grain_scale_shift` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_grain_scale_shift(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_grain_scale_shift.set(segment, 0L, index, value); } + /// Sets `grain_scale_shift` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_grain_scale_shift(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_grain_scale_shift(segment, 0L, value); } + /// Sets `grain_scale_shift` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain grain_scale_shiftAt(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_grain_scale_shift(this.segment(), index, value); return this; } + /// Sets `grain_scale_shift` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain grain_scale_shift(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_grain_scale_shift(this.segment(), value); return this; } + + /// {@return `grain_seed` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_grain_seed(MemorySegment segment, long index) { return (short) VH_grain_seed.get(segment, 0L, index); } + /// {@return `grain_seed`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_grain_seed(MemorySegment segment) { return StdVideoAV1FilmGrain.get_grain_seed(segment, 0L); } + /// {@return `grain_seed` at the given index} + /// @param index the index + public @CType("uint16_t") short grain_seedAt(long index) { return StdVideoAV1FilmGrain.get_grain_seed(this.segment(), index); } + /// {@return `grain_seed`} + public @CType("uint16_t") short grain_seed() { return StdVideoAV1FilmGrain.get_grain_seed(this.segment()); } + /// Sets `grain_seed` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_grain_seed(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_grain_seed.set(segment, 0L, index, value); } + /// Sets `grain_seed` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_grain_seed(MemorySegment segment, @CType("uint16_t") short value) { StdVideoAV1FilmGrain.set_grain_seed(segment, 0L, value); } + /// Sets `grain_seed` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain grain_seedAt(long index, @CType("uint16_t") short value) { StdVideoAV1FilmGrain.set_grain_seed(this.segment(), index, value); return this; } + /// Sets `grain_seed` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain grain_seed(@CType("uint16_t") short value) { StdVideoAV1FilmGrain.set_grain_seed(this.segment(), value); return this; } + + /// {@return `film_grain_params_ref_idx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_film_grain_params_ref_idx(MemorySegment segment, long index) { return (byte) VH_film_grain_params_ref_idx.get(segment, 0L, index); } + /// {@return `film_grain_params_ref_idx`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_film_grain_params_ref_idx(MemorySegment segment) { return StdVideoAV1FilmGrain.get_film_grain_params_ref_idx(segment, 0L); } + /// {@return `film_grain_params_ref_idx` at the given index} + /// @param index the index + public @CType("uint8_t") byte film_grain_params_ref_idxAt(long index) { return StdVideoAV1FilmGrain.get_film_grain_params_ref_idx(this.segment(), index); } + /// {@return `film_grain_params_ref_idx`} + public @CType("uint8_t") byte film_grain_params_ref_idx() { return StdVideoAV1FilmGrain.get_film_grain_params_ref_idx(this.segment()); } + /// Sets `film_grain_params_ref_idx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_film_grain_params_ref_idx(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_film_grain_params_ref_idx.set(segment, 0L, index, value); } + /// Sets `film_grain_params_ref_idx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_film_grain_params_ref_idx(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_film_grain_params_ref_idx(segment, 0L, value); } + /// Sets `film_grain_params_ref_idx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain film_grain_params_ref_idxAt(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_film_grain_params_ref_idx(this.segment(), index, value); return this; } + /// Sets `film_grain_params_ref_idx` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain film_grain_params_ref_idx(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_film_grain_params_ref_idx(this.segment(), value); return this; } + + /// {@return `num_y_points` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_y_points(MemorySegment segment, long index) { return (byte) VH_num_y_points.get(segment, 0L, index); } + /// {@return `num_y_points`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_y_points(MemorySegment segment) { return StdVideoAV1FilmGrain.get_num_y_points(segment, 0L); } + /// {@return `num_y_points` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_y_pointsAt(long index) { return StdVideoAV1FilmGrain.get_num_y_points(this.segment(), index); } + /// {@return `num_y_points`} + public @CType("uint8_t") byte num_y_points() { return StdVideoAV1FilmGrain.get_num_y_points(this.segment()); } + /// Sets `num_y_points` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_y_points(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_y_points.set(segment, 0L, index, value); } + /// Sets `num_y_points` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_y_points(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_num_y_points(segment, 0L, value); } + /// Sets `num_y_points` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain num_y_pointsAt(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_num_y_points(this.segment(), index, value); return this; } + /// Sets `num_y_points` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain num_y_points(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_num_y_points(this.segment(), value); return this; } + + /// {@return `point_y_value` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_point_y_value(MemorySegment segment, long index) { return (byte) VH_point_y_value.get(segment, 0L, index); } + /// {@return `point_y_value`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_point_y_value(MemorySegment segment) { return StdVideoAV1FilmGrain.get_point_y_value(segment, 0L); } + /// {@return `point_y_value` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte point_y_valueAt(long index) { return StdVideoAV1FilmGrain.get_point_y_value(this.segment(), index); } + /// {@return `point_y_value`} + public @CType("uint8_t [ ]") byte point_y_value() { return StdVideoAV1FilmGrain.get_point_y_value(this.segment()); } + /// Sets `point_y_value` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_point_y_value(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_point_y_value.set(segment, 0L, index, value); } + /// Sets `point_y_value` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_point_y_value(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_y_value(segment, 0L, value); } + /// Sets `point_y_value` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_y_valueAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_y_value(this.segment(), index, value); return this; } + /// Sets `point_y_value` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_y_value(@CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_y_value(this.segment(), value); return this; } + + /// {@return `point_y_scaling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_point_y_scaling(MemorySegment segment, long index) { return (byte) VH_point_y_scaling.get(segment, 0L, index); } + /// {@return `point_y_scaling`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_point_y_scaling(MemorySegment segment) { return StdVideoAV1FilmGrain.get_point_y_scaling(segment, 0L); } + /// {@return `point_y_scaling` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte point_y_scalingAt(long index) { return StdVideoAV1FilmGrain.get_point_y_scaling(this.segment(), index); } + /// {@return `point_y_scaling`} + public @CType("uint8_t [ ]") byte point_y_scaling() { return StdVideoAV1FilmGrain.get_point_y_scaling(this.segment()); } + /// Sets `point_y_scaling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_point_y_scaling(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_point_y_scaling.set(segment, 0L, index, value); } + /// Sets `point_y_scaling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_point_y_scaling(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_y_scaling(segment, 0L, value); } + /// Sets `point_y_scaling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_y_scalingAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_y_scaling(this.segment(), index, value); return this; } + /// Sets `point_y_scaling` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_y_scaling(@CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_y_scaling(this.segment(), value); return this; } + + /// {@return `num_cb_points` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_cb_points(MemorySegment segment, long index) { return (byte) VH_num_cb_points.get(segment, 0L, index); } + /// {@return `num_cb_points`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_cb_points(MemorySegment segment) { return StdVideoAV1FilmGrain.get_num_cb_points(segment, 0L); } + /// {@return `num_cb_points` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_cb_pointsAt(long index) { return StdVideoAV1FilmGrain.get_num_cb_points(this.segment(), index); } + /// {@return `num_cb_points`} + public @CType("uint8_t") byte num_cb_points() { return StdVideoAV1FilmGrain.get_num_cb_points(this.segment()); } + /// Sets `num_cb_points` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_cb_points(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_cb_points.set(segment, 0L, index, value); } + /// Sets `num_cb_points` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_cb_points(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_num_cb_points(segment, 0L, value); } + /// Sets `num_cb_points` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain num_cb_pointsAt(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_num_cb_points(this.segment(), index, value); return this; } + /// Sets `num_cb_points` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain num_cb_points(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_num_cb_points(this.segment(), value); return this; } + + /// {@return `point_cb_value` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_point_cb_value(MemorySegment segment, long index) { return (byte) VH_point_cb_value.get(segment, 0L, index); } + /// {@return `point_cb_value`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_point_cb_value(MemorySegment segment) { return StdVideoAV1FilmGrain.get_point_cb_value(segment, 0L); } + /// {@return `point_cb_value` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte point_cb_valueAt(long index) { return StdVideoAV1FilmGrain.get_point_cb_value(this.segment(), index); } + /// {@return `point_cb_value`} + public @CType("uint8_t [ ]") byte point_cb_value() { return StdVideoAV1FilmGrain.get_point_cb_value(this.segment()); } + /// Sets `point_cb_value` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_point_cb_value(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_point_cb_value.set(segment, 0L, index, value); } + /// Sets `point_cb_value` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_point_cb_value(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cb_value(segment, 0L, value); } + /// Sets `point_cb_value` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_cb_valueAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cb_value(this.segment(), index, value); return this; } + /// Sets `point_cb_value` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_cb_value(@CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cb_value(this.segment(), value); return this; } + + /// {@return `point_cb_scaling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_point_cb_scaling(MemorySegment segment, long index) { return (byte) VH_point_cb_scaling.get(segment, 0L, index); } + /// {@return `point_cb_scaling`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_point_cb_scaling(MemorySegment segment) { return StdVideoAV1FilmGrain.get_point_cb_scaling(segment, 0L); } + /// {@return `point_cb_scaling` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte point_cb_scalingAt(long index) { return StdVideoAV1FilmGrain.get_point_cb_scaling(this.segment(), index); } + /// {@return `point_cb_scaling`} + public @CType("uint8_t [ ]") byte point_cb_scaling() { return StdVideoAV1FilmGrain.get_point_cb_scaling(this.segment()); } + /// Sets `point_cb_scaling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_point_cb_scaling(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_point_cb_scaling.set(segment, 0L, index, value); } + /// Sets `point_cb_scaling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_point_cb_scaling(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cb_scaling(segment, 0L, value); } + /// Sets `point_cb_scaling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_cb_scalingAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cb_scaling(this.segment(), index, value); return this; } + /// Sets `point_cb_scaling` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_cb_scaling(@CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cb_scaling(this.segment(), value); return this; } + + /// {@return `num_cr_points` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_cr_points(MemorySegment segment, long index) { return (byte) VH_num_cr_points.get(segment, 0L, index); } + /// {@return `num_cr_points`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_cr_points(MemorySegment segment) { return StdVideoAV1FilmGrain.get_num_cr_points(segment, 0L); } + /// {@return `num_cr_points` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_cr_pointsAt(long index) { return StdVideoAV1FilmGrain.get_num_cr_points(this.segment(), index); } + /// {@return `num_cr_points`} + public @CType("uint8_t") byte num_cr_points() { return StdVideoAV1FilmGrain.get_num_cr_points(this.segment()); } + /// Sets `num_cr_points` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_cr_points(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_cr_points.set(segment, 0L, index, value); } + /// Sets `num_cr_points` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_cr_points(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_num_cr_points(segment, 0L, value); } + /// Sets `num_cr_points` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain num_cr_pointsAt(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_num_cr_points(this.segment(), index, value); return this; } + /// Sets `num_cr_points` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain num_cr_points(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_num_cr_points(this.segment(), value); return this; } + + /// {@return `point_cr_value` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_point_cr_value(MemorySegment segment, long index) { return (byte) VH_point_cr_value.get(segment, 0L, index); } + /// {@return `point_cr_value`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_point_cr_value(MemorySegment segment) { return StdVideoAV1FilmGrain.get_point_cr_value(segment, 0L); } + /// {@return `point_cr_value` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte point_cr_valueAt(long index) { return StdVideoAV1FilmGrain.get_point_cr_value(this.segment(), index); } + /// {@return `point_cr_value`} + public @CType("uint8_t [ ]") byte point_cr_value() { return StdVideoAV1FilmGrain.get_point_cr_value(this.segment()); } + /// Sets `point_cr_value` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_point_cr_value(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_point_cr_value.set(segment, 0L, index, value); } + /// Sets `point_cr_value` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_point_cr_value(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cr_value(segment, 0L, value); } + /// Sets `point_cr_value` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_cr_valueAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cr_value(this.segment(), index, value); return this; } + /// Sets `point_cr_value` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_cr_value(@CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cr_value(this.segment(), value); return this; } + + /// {@return `point_cr_scaling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_point_cr_scaling(MemorySegment segment, long index) { return (byte) VH_point_cr_scaling.get(segment, 0L, index); } + /// {@return `point_cr_scaling`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_point_cr_scaling(MemorySegment segment) { return StdVideoAV1FilmGrain.get_point_cr_scaling(segment, 0L); } + /// {@return `point_cr_scaling` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte point_cr_scalingAt(long index) { return StdVideoAV1FilmGrain.get_point_cr_scaling(this.segment(), index); } + /// {@return `point_cr_scaling`} + public @CType("uint8_t [ ]") byte point_cr_scaling() { return StdVideoAV1FilmGrain.get_point_cr_scaling(this.segment()); } + /// Sets `point_cr_scaling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_point_cr_scaling(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_point_cr_scaling.set(segment, 0L, index, value); } + /// Sets `point_cr_scaling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_point_cr_scaling(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cr_scaling(segment, 0L, value); } + /// Sets `point_cr_scaling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_cr_scalingAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cr_scaling(this.segment(), index, value); return this; } + /// Sets `point_cr_scaling` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain point_cr_scaling(@CType("uint8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_point_cr_scaling(this.segment(), value); return this; } + + /// {@return `ar_coeffs_y_plus_128` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_ar_coeffs_y_plus_128(MemorySegment segment, long index) { return (byte) VH_ar_coeffs_y_plus_128.get(segment, 0L, index); } + /// {@return `ar_coeffs_y_plus_128`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_ar_coeffs_y_plus_128(MemorySegment segment) { return StdVideoAV1FilmGrain.get_ar_coeffs_y_plus_128(segment, 0L); } + /// {@return `ar_coeffs_y_plus_128` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte ar_coeffs_y_plus_128At(long index) { return StdVideoAV1FilmGrain.get_ar_coeffs_y_plus_128(this.segment(), index); } + /// {@return `ar_coeffs_y_plus_128`} + public @CType("int8_t [ ]") byte ar_coeffs_y_plus_128() { return StdVideoAV1FilmGrain.get_ar_coeffs_y_plus_128(this.segment()); } + /// Sets `ar_coeffs_y_plus_128` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ar_coeffs_y_plus_128(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_ar_coeffs_y_plus_128.set(segment, 0L, index, value); } + /// Sets `ar_coeffs_y_plus_128` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ar_coeffs_y_plus_128(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_ar_coeffs_y_plus_128(segment, 0L, value); } + /// Sets `ar_coeffs_y_plus_128` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain ar_coeffs_y_plus_128At(long index, @CType("int8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_ar_coeffs_y_plus_128(this.segment(), index, value); return this; } + /// Sets `ar_coeffs_y_plus_128` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain ar_coeffs_y_plus_128(@CType("int8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_ar_coeffs_y_plus_128(this.segment(), value); return this; } + + /// {@return `ar_coeffs_cb_plus_128` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_ar_coeffs_cb_plus_128(MemorySegment segment, long index) { return (byte) VH_ar_coeffs_cb_plus_128.get(segment, 0L, index); } + /// {@return `ar_coeffs_cb_plus_128`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_ar_coeffs_cb_plus_128(MemorySegment segment) { return StdVideoAV1FilmGrain.get_ar_coeffs_cb_plus_128(segment, 0L); } + /// {@return `ar_coeffs_cb_plus_128` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte ar_coeffs_cb_plus_128At(long index) { return StdVideoAV1FilmGrain.get_ar_coeffs_cb_plus_128(this.segment(), index); } + /// {@return `ar_coeffs_cb_plus_128`} + public @CType("int8_t [ ]") byte ar_coeffs_cb_plus_128() { return StdVideoAV1FilmGrain.get_ar_coeffs_cb_plus_128(this.segment()); } + /// Sets `ar_coeffs_cb_plus_128` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ar_coeffs_cb_plus_128(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_ar_coeffs_cb_plus_128.set(segment, 0L, index, value); } + /// Sets `ar_coeffs_cb_plus_128` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ar_coeffs_cb_plus_128(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_ar_coeffs_cb_plus_128(segment, 0L, value); } + /// Sets `ar_coeffs_cb_plus_128` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain ar_coeffs_cb_plus_128At(long index, @CType("int8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_ar_coeffs_cb_plus_128(this.segment(), index, value); return this; } + /// Sets `ar_coeffs_cb_plus_128` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain ar_coeffs_cb_plus_128(@CType("int8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_ar_coeffs_cb_plus_128(this.segment(), value); return this; } + + /// {@return `ar_coeffs_cr_plus_128` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_ar_coeffs_cr_plus_128(MemorySegment segment, long index) { return (byte) VH_ar_coeffs_cr_plus_128.get(segment, 0L, index); } + /// {@return `ar_coeffs_cr_plus_128`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_ar_coeffs_cr_plus_128(MemorySegment segment) { return StdVideoAV1FilmGrain.get_ar_coeffs_cr_plus_128(segment, 0L); } + /// {@return `ar_coeffs_cr_plus_128` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte ar_coeffs_cr_plus_128At(long index) { return StdVideoAV1FilmGrain.get_ar_coeffs_cr_plus_128(this.segment(), index); } + /// {@return `ar_coeffs_cr_plus_128`} + public @CType("int8_t [ ]") byte ar_coeffs_cr_plus_128() { return StdVideoAV1FilmGrain.get_ar_coeffs_cr_plus_128(this.segment()); } + /// Sets `ar_coeffs_cr_plus_128` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ar_coeffs_cr_plus_128(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_ar_coeffs_cr_plus_128.set(segment, 0L, index, value); } + /// Sets `ar_coeffs_cr_plus_128` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ar_coeffs_cr_plus_128(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_ar_coeffs_cr_plus_128(segment, 0L, value); } + /// Sets `ar_coeffs_cr_plus_128` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain ar_coeffs_cr_plus_128At(long index, @CType("int8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_ar_coeffs_cr_plus_128(this.segment(), index, value); return this; } + /// Sets `ar_coeffs_cr_plus_128` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain ar_coeffs_cr_plus_128(@CType("int8_t [ ]") byte value) { StdVideoAV1FilmGrain.set_ar_coeffs_cr_plus_128(this.segment(), value); return this; } + + /// {@return `cb_mult` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_cb_mult(MemorySegment segment, long index) { return (byte) VH_cb_mult.get(segment, 0L, index); } + /// {@return `cb_mult`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_cb_mult(MemorySegment segment) { return StdVideoAV1FilmGrain.get_cb_mult(segment, 0L); } + /// {@return `cb_mult` at the given index} + /// @param index the index + public @CType("uint8_t") byte cb_multAt(long index) { return StdVideoAV1FilmGrain.get_cb_mult(this.segment(), index); } + /// {@return `cb_mult`} + public @CType("uint8_t") byte cb_mult() { return StdVideoAV1FilmGrain.get_cb_mult(this.segment()); } + /// Sets `cb_mult` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cb_mult(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_cb_mult.set(segment, 0L, index, value); } + /// Sets `cb_mult` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cb_mult(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cb_mult(segment, 0L, value); } + /// Sets `cb_mult` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cb_multAt(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cb_mult(this.segment(), index, value); return this; } + /// Sets `cb_mult` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cb_mult(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cb_mult(this.segment(), value); return this; } + + /// {@return `cb_luma_mult` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_cb_luma_mult(MemorySegment segment, long index) { return (byte) VH_cb_luma_mult.get(segment, 0L, index); } + /// {@return `cb_luma_mult`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_cb_luma_mult(MemorySegment segment) { return StdVideoAV1FilmGrain.get_cb_luma_mult(segment, 0L); } + /// {@return `cb_luma_mult` at the given index} + /// @param index the index + public @CType("uint8_t") byte cb_luma_multAt(long index) { return StdVideoAV1FilmGrain.get_cb_luma_mult(this.segment(), index); } + /// {@return `cb_luma_mult`} + public @CType("uint8_t") byte cb_luma_mult() { return StdVideoAV1FilmGrain.get_cb_luma_mult(this.segment()); } + /// Sets `cb_luma_mult` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cb_luma_mult(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_cb_luma_mult.set(segment, 0L, index, value); } + /// Sets `cb_luma_mult` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cb_luma_mult(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cb_luma_mult(segment, 0L, value); } + /// Sets `cb_luma_mult` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cb_luma_multAt(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cb_luma_mult(this.segment(), index, value); return this; } + /// Sets `cb_luma_mult` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cb_luma_mult(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cb_luma_mult(this.segment(), value); return this; } + + /// {@return `cb_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_cb_offset(MemorySegment segment, long index) { return (short) VH_cb_offset.get(segment, 0L, index); } + /// {@return `cb_offset`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_cb_offset(MemorySegment segment) { return StdVideoAV1FilmGrain.get_cb_offset(segment, 0L); } + /// {@return `cb_offset` at the given index} + /// @param index the index + public @CType("uint16_t") short cb_offsetAt(long index) { return StdVideoAV1FilmGrain.get_cb_offset(this.segment(), index); } + /// {@return `cb_offset`} + public @CType("uint16_t") short cb_offset() { return StdVideoAV1FilmGrain.get_cb_offset(this.segment()); } + /// Sets `cb_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cb_offset(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_cb_offset.set(segment, 0L, index, value); } + /// Sets `cb_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cb_offset(MemorySegment segment, @CType("uint16_t") short value) { StdVideoAV1FilmGrain.set_cb_offset(segment, 0L, value); } + /// Sets `cb_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cb_offsetAt(long index, @CType("uint16_t") short value) { StdVideoAV1FilmGrain.set_cb_offset(this.segment(), index, value); return this; } + /// Sets `cb_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cb_offset(@CType("uint16_t") short value) { StdVideoAV1FilmGrain.set_cb_offset(this.segment(), value); return this; } + + /// {@return `cr_mult` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_cr_mult(MemorySegment segment, long index) { return (byte) VH_cr_mult.get(segment, 0L, index); } + /// {@return `cr_mult`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_cr_mult(MemorySegment segment) { return StdVideoAV1FilmGrain.get_cr_mult(segment, 0L); } + /// {@return `cr_mult` at the given index} + /// @param index the index + public @CType("uint8_t") byte cr_multAt(long index) { return StdVideoAV1FilmGrain.get_cr_mult(this.segment(), index); } + /// {@return `cr_mult`} + public @CType("uint8_t") byte cr_mult() { return StdVideoAV1FilmGrain.get_cr_mult(this.segment()); } + /// Sets `cr_mult` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cr_mult(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_cr_mult.set(segment, 0L, index, value); } + /// Sets `cr_mult` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cr_mult(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cr_mult(segment, 0L, value); } + /// Sets `cr_mult` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cr_multAt(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cr_mult(this.segment(), index, value); return this; } + /// Sets `cr_mult` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cr_mult(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cr_mult(this.segment(), value); return this; } + + /// {@return `cr_luma_mult` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_cr_luma_mult(MemorySegment segment, long index) { return (byte) VH_cr_luma_mult.get(segment, 0L, index); } + /// {@return `cr_luma_mult`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_cr_luma_mult(MemorySegment segment) { return StdVideoAV1FilmGrain.get_cr_luma_mult(segment, 0L); } + /// {@return `cr_luma_mult` at the given index} + /// @param index the index + public @CType("uint8_t") byte cr_luma_multAt(long index) { return StdVideoAV1FilmGrain.get_cr_luma_mult(this.segment(), index); } + /// {@return `cr_luma_mult`} + public @CType("uint8_t") byte cr_luma_mult() { return StdVideoAV1FilmGrain.get_cr_luma_mult(this.segment()); } + /// Sets `cr_luma_mult` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cr_luma_mult(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_cr_luma_mult.set(segment, 0L, index, value); } + /// Sets `cr_luma_mult` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cr_luma_mult(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cr_luma_mult(segment, 0L, value); } + /// Sets `cr_luma_mult` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cr_luma_multAt(long index, @CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cr_luma_mult(this.segment(), index, value); return this; } + /// Sets `cr_luma_mult` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cr_luma_mult(@CType("uint8_t") byte value) { StdVideoAV1FilmGrain.set_cr_luma_mult(this.segment(), value); return this; } + + /// {@return `cr_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_cr_offset(MemorySegment segment, long index) { return (short) VH_cr_offset.get(segment, 0L, index); } + /// {@return `cr_offset`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_cr_offset(MemorySegment segment) { return StdVideoAV1FilmGrain.get_cr_offset(segment, 0L); } + /// {@return `cr_offset` at the given index} + /// @param index the index + public @CType("uint16_t") short cr_offsetAt(long index) { return StdVideoAV1FilmGrain.get_cr_offset(this.segment(), index); } + /// {@return `cr_offset`} + public @CType("uint16_t") short cr_offset() { return StdVideoAV1FilmGrain.get_cr_offset(this.segment()); } + /// Sets `cr_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cr_offset(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_cr_offset.set(segment, 0L, index, value); } + /// Sets `cr_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cr_offset(MemorySegment segment, @CType("uint16_t") short value) { StdVideoAV1FilmGrain.set_cr_offset(segment, 0L, value); } + /// Sets `cr_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cr_offsetAt(long index, @CType("uint16_t") short value) { StdVideoAV1FilmGrain.set_cr_offset(this.segment(), index, value); return this; } + /// Sets `cr_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrain cr_offset(@CType("uint16_t") short value) { StdVideoAV1FilmGrain.set_cr_offset(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1FilmGrainFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1FilmGrainFlags.java new file mode 100644 index 00000000..92a87002 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1FilmGrainFlags.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### chroma_scaling_from_luma +/// [VarHandle][#VH_chroma_scaling_from_luma] - [Getter][#chroma_scaling_from_luma()] - [Setter][#chroma_scaling_from_luma(int)] +/// ### overlap_flag +/// [VarHandle][#VH_overlap_flag] - [Getter][#overlap_flag()] - [Setter][#overlap_flag(int)] +/// ### clip_to_restricted_range +/// [VarHandle][#VH_clip_to_restricted_range] - [Getter][#clip_to_restricted_range()] - [Setter][#clip_to_restricted_range(int)] +/// ### update_grain +/// [VarHandle][#VH_update_grain] - [Getter][#update_grain()] - [Setter][#update_grain(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1FilmGrainFlags { +/// uint32_t : 1 chroma_scaling_from_luma; +/// uint32_t : 1 overlap_flag; +/// uint32_t : 1 clip_to_restricted_range; +/// uint32_t : 1 update_grain; +/// uint32_t : 28 reserved; +/// } StdVideoAV1FilmGrainFlags; +/// ``` +public final class StdVideoAV1FilmGrainFlags extends Struct { + /// The struct layout of `StdVideoAV1FilmGrainFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("chroma_scaling_from_luma"), + ValueLayout.JAVA_INT.withName("overlap_flag"), + ValueLayout.JAVA_INT.withName("clip_to_restricted_range"), + ValueLayout.JAVA_INT.withName("update_grain"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `chroma_scaling_from_luma` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chroma_scaling_from_luma = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_scaling_from_luma")); + /// The [VarHandle] of `overlap_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_overlap_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("overlap_flag")); + /// The [VarHandle] of `clip_to_restricted_range` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_clip_to_restricted_range = LAYOUT.arrayElementVarHandle(PathElement.groupElement("clip_to_restricted_range")); + /// The [VarHandle] of `update_grain` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_update_grain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("update_grain")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoAV1FilmGrainFlags` with the given segment. + /// @param segment the memory segment + public StdVideoAV1FilmGrainFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1FilmGrainFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1FilmGrainFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1FilmGrainFlags(segment); } + + /// Creates `StdVideoAV1FilmGrainFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1FilmGrainFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1FilmGrainFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1FilmGrainFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1FilmGrainFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1FilmGrainFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1FilmGrainFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1FilmGrainFlags` + public static StdVideoAV1FilmGrainFlags alloc(SegmentAllocator allocator) { return new StdVideoAV1FilmGrainFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1FilmGrainFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1FilmGrainFlags` + public static StdVideoAV1FilmGrainFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1FilmGrainFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `chroma_scaling_from_luma` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_chroma_scaling_from_luma(MemorySegment segment, long index) { return (int) VH_chroma_scaling_from_luma.get(segment, 0L, index); } + /// {@return `chroma_scaling_from_luma`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_chroma_scaling_from_luma(MemorySegment segment) { return StdVideoAV1FilmGrainFlags.get_chroma_scaling_from_luma(segment, 0L); } + /// {@return `chroma_scaling_from_luma` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int chroma_scaling_from_lumaAt(long index) { return StdVideoAV1FilmGrainFlags.get_chroma_scaling_from_luma(this.segment(), index); } + /// {@return `chroma_scaling_from_luma`} + public @CType("uint32_t : 1") int chroma_scaling_from_luma() { return StdVideoAV1FilmGrainFlags.get_chroma_scaling_from_luma(this.segment()); } + /// Sets `chroma_scaling_from_luma` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_scaling_from_luma(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_chroma_scaling_from_luma.set(segment, 0L, index, value); } + /// Sets `chroma_scaling_from_luma` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_scaling_from_luma(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_chroma_scaling_from_luma(segment, 0L, value); } + /// Sets `chroma_scaling_from_luma` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrainFlags chroma_scaling_from_lumaAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_chroma_scaling_from_luma(this.segment(), index, value); return this; } + /// Sets `chroma_scaling_from_luma` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrainFlags chroma_scaling_from_luma(@CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_chroma_scaling_from_luma(this.segment(), value); return this; } + + /// {@return `overlap_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_overlap_flag(MemorySegment segment, long index) { return (int) VH_overlap_flag.get(segment, 0L, index); } + /// {@return `overlap_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_overlap_flag(MemorySegment segment) { return StdVideoAV1FilmGrainFlags.get_overlap_flag(segment, 0L); } + /// {@return `overlap_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int overlap_flagAt(long index) { return StdVideoAV1FilmGrainFlags.get_overlap_flag(this.segment(), index); } + /// {@return `overlap_flag`} + public @CType("uint32_t : 1") int overlap_flag() { return StdVideoAV1FilmGrainFlags.get_overlap_flag(this.segment()); } + /// Sets `overlap_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_overlap_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_overlap_flag.set(segment, 0L, index, value); } + /// Sets `overlap_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_overlap_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_overlap_flag(segment, 0L, value); } + /// Sets `overlap_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrainFlags overlap_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_overlap_flag(this.segment(), index, value); return this; } + /// Sets `overlap_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrainFlags overlap_flag(@CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_overlap_flag(this.segment(), value); return this; } + + /// {@return `clip_to_restricted_range` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_clip_to_restricted_range(MemorySegment segment, long index) { return (int) VH_clip_to_restricted_range.get(segment, 0L, index); } + /// {@return `clip_to_restricted_range`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_clip_to_restricted_range(MemorySegment segment) { return StdVideoAV1FilmGrainFlags.get_clip_to_restricted_range(segment, 0L); } + /// {@return `clip_to_restricted_range` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int clip_to_restricted_rangeAt(long index) { return StdVideoAV1FilmGrainFlags.get_clip_to_restricted_range(this.segment(), index); } + /// {@return `clip_to_restricted_range`} + public @CType("uint32_t : 1") int clip_to_restricted_range() { return StdVideoAV1FilmGrainFlags.get_clip_to_restricted_range(this.segment()); } + /// Sets `clip_to_restricted_range` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_clip_to_restricted_range(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_clip_to_restricted_range.set(segment, 0L, index, value); } + /// Sets `clip_to_restricted_range` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_clip_to_restricted_range(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_clip_to_restricted_range(segment, 0L, value); } + /// Sets `clip_to_restricted_range` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrainFlags clip_to_restricted_rangeAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_clip_to_restricted_range(this.segment(), index, value); return this; } + /// Sets `clip_to_restricted_range` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrainFlags clip_to_restricted_range(@CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_clip_to_restricted_range(this.segment(), value); return this; } + + /// {@return `update_grain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_update_grain(MemorySegment segment, long index) { return (int) VH_update_grain.get(segment, 0L, index); } + /// {@return `update_grain`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_update_grain(MemorySegment segment) { return StdVideoAV1FilmGrainFlags.get_update_grain(segment, 0L); } + /// {@return `update_grain` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int update_grainAt(long index) { return StdVideoAV1FilmGrainFlags.get_update_grain(this.segment(), index); } + /// {@return `update_grain`} + public @CType("uint32_t : 1") int update_grain() { return StdVideoAV1FilmGrainFlags.get_update_grain(this.segment()); } + /// Sets `update_grain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_update_grain(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_update_grain.set(segment, 0L, index, value); } + /// Sets `update_grain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_update_grain(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_update_grain(segment, 0L, value); } + /// Sets `update_grain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrainFlags update_grainAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_update_grain(this.segment(), index, value); return this; } + /// Sets `update_grain` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrainFlags update_grain(@CType("uint32_t : 1") int value) { StdVideoAV1FilmGrainFlags.set_update_grain(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 28") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 28") int get_reserved(MemorySegment segment) { return StdVideoAV1FilmGrainFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 28") int reservedAt(long index) { return StdVideoAV1FilmGrainFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 28") int reserved() { return StdVideoAV1FilmGrainFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 28") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 28") int value) { StdVideoAV1FilmGrainFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrainFlags reservedAt(long index, @CType("uint32_t : 28") int value) { StdVideoAV1FilmGrainFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1FilmGrainFlags reserved(@CType("uint32_t : 28") int value) { StdVideoAV1FilmGrainFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1GlobalMotion.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1GlobalMotion.java new file mode 100644 index 00000000..22153d57 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1GlobalMotion.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### GmType +/// [VarHandle][#VH_GmType] - [Getter][#GmType()] - [Setter][#GmType(byte)] +/// ### gm_params +/// [VarHandle][#VH_gm_params] - [Getter][#gm_params()] - [Setter][#gm_params(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1GlobalMotion { +/// uint8_t [ ] GmType; +/// int32_t [ ][ ] gm_params; +/// } StdVideoAV1GlobalMotion; +/// ``` +public final class StdVideoAV1GlobalMotion extends Struct { + /// The struct layout of `StdVideoAV1GlobalMotion`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_BYTE.withName("GmType"), + ValueLayout.JAVA_INT.withName("gm_params") + ); + /// The [VarHandle] of `GmType` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_GmType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("GmType")); + /// The [VarHandle] of `gm_params` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gm_params = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gm_params")); + + /// Creates `StdVideoAV1GlobalMotion` with the given segment. + /// @param segment the memory segment + public StdVideoAV1GlobalMotion(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1GlobalMotion` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1GlobalMotion of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1GlobalMotion(segment); } + + /// Creates `StdVideoAV1GlobalMotion` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1GlobalMotion ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1GlobalMotion(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1GlobalMotion` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1GlobalMotion ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1GlobalMotion(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1GlobalMotion` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1GlobalMotion` + public static StdVideoAV1GlobalMotion alloc(SegmentAllocator allocator) { return new StdVideoAV1GlobalMotion(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1GlobalMotion` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1GlobalMotion` + public static StdVideoAV1GlobalMotion alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1GlobalMotion(allocator.allocate(LAYOUT, count)); } + + /// {@return `GmType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_GmType(MemorySegment segment, long index) { return (byte) VH_GmType.get(segment, 0L, index); } + /// {@return `GmType`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_GmType(MemorySegment segment) { return StdVideoAV1GlobalMotion.get_GmType(segment, 0L); } + /// {@return `GmType` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte GmTypeAt(long index) { return StdVideoAV1GlobalMotion.get_GmType(this.segment(), index); } + /// {@return `GmType`} + public @CType("uint8_t [ ]") byte GmType() { return StdVideoAV1GlobalMotion.get_GmType(this.segment()); } + /// Sets `GmType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_GmType(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_GmType.set(segment, 0L, index, value); } + /// Sets `GmType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_GmType(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1GlobalMotion.set_GmType(segment, 0L, value); } + /// Sets `GmType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1GlobalMotion GmTypeAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1GlobalMotion.set_GmType(this.segment(), index, value); return this; } + /// Sets `GmType` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1GlobalMotion GmType(@CType("uint8_t [ ]") byte value) { StdVideoAV1GlobalMotion.set_GmType(this.segment(), value); return this; } + + /// {@return `gm_params` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t [ ][ ]") int get_gm_params(MemorySegment segment, long index) { return (int) VH_gm_params.get(segment, 0L, index); } + /// {@return `gm_params`} + /// @param segment the segment of the struct + public static @CType("int32_t [ ][ ]") int get_gm_params(MemorySegment segment) { return StdVideoAV1GlobalMotion.get_gm_params(segment, 0L); } + /// {@return `gm_params` at the given index} + /// @param index the index + public @CType("int32_t [ ][ ]") int gm_paramsAt(long index) { return StdVideoAV1GlobalMotion.get_gm_params(this.segment(), index); } + /// {@return `gm_params`} + public @CType("int32_t [ ][ ]") int gm_params() { return StdVideoAV1GlobalMotion.get_gm_params(this.segment()); } + /// Sets `gm_params` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gm_params(MemorySegment segment, long index, @CType("int32_t [ ][ ]") int value) { VH_gm_params.set(segment, 0L, index, value); } + /// Sets `gm_params` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gm_params(MemorySegment segment, @CType("int32_t [ ][ ]") int value) { StdVideoAV1GlobalMotion.set_gm_params(segment, 0L, value); } + /// Sets `gm_params` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1GlobalMotion gm_paramsAt(long index, @CType("int32_t [ ][ ]") int value) { StdVideoAV1GlobalMotion.set_gm_params(this.segment(), index, value); return this; } + /// Sets `gm_params` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1GlobalMotion gm_params(@CType("int32_t [ ][ ]") int value) { StdVideoAV1GlobalMotion.set_gm_params(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1LoopFilter.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1LoopFilter.java new file mode 100644 index 00000000..9c778e67 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1LoopFilter.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### loop_filter_level +/// [VarHandle][#VH_loop_filter_level] - [Getter][#loop_filter_level()] - [Setter][#loop_filter_level(byte)] +/// ### loop_filter_sharpness +/// [VarHandle][#VH_loop_filter_sharpness] - [Getter][#loop_filter_sharpness()] - [Setter][#loop_filter_sharpness(byte)] +/// ### update_ref_delta +/// [VarHandle][#VH_update_ref_delta] - [Getter][#update_ref_delta()] - [Setter][#update_ref_delta(byte)] +/// ### loop_filter_ref_deltas +/// [VarHandle][#VH_loop_filter_ref_deltas] - [Getter][#loop_filter_ref_deltas()] - [Setter][#loop_filter_ref_deltas(byte)] +/// ### update_mode_delta +/// [VarHandle][#VH_update_mode_delta] - [Getter][#update_mode_delta()] - [Setter][#update_mode_delta(byte)] +/// ### loop_filter_mode_deltas +/// [VarHandle][#VH_loop_filter_mode_deltas] - [Getter][#loop_filter_mode_deltas()] - [Setter][#loop_filter_mode_deltas(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1LoopFilter { +/// StdVideoAV1LoopFilterFlags flags; +/// uint8_t [ ] loop_filter_level; +/// uint8_t loop_filter_sharpness; +/// uint8_t update_ref_delta; +/// int8_t [ ] loop_filter_ref_deltas; +/// uint8_t update_mode_delta; +/// int8_t [ ] loop_filter_mode_deltas; +/// } StdVideoAV1LoopFilter; +/// ``` +public final class StdVideoAV1LoopFilter extends Struct { + /// The struct layout of `StdVideoAV1LoopFilter`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoAV1LoopFilterFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("loop_filter_level"), + ValueLayout.JAVA_BYTE.withName("loop_filter_sharpness"), + ValueLayout.JAVA_BYTE.withName("update_ref_delta"), + ValueLayout.JAVA_BYTE.withName("loop_filter_ref_deltas"), + ValueLayout.JAVA_BYTE.withName("update_mode_delta"), + ValueLayout.JAVA_BYTE.withName("loop_filter_mode_deltas") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `loop_filter_level` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_loop_filter_level = LAYOUT.arrayElementVarHandle(PathElement.groupElement("loop_filter_level")); + /// The [VarHandle] of `loop_filter_sharpness` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_loop_filter_sharpness = LAYOUT.arrayElementVarHandle(PathElement.groupElement("loop_filter_sharpness")); + /// The [VarHandle] of `update_ref_delta` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_update_ref_delta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("update_ref_delta")); + /// The [VarHandle] of `loop_filter_ref_deltas` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_loop_filter_ref_deltas = LAYOUT.arrayElementVarHandle(PathElement.groupElement("loop_filter_ref_deltas")); + /// The [VarHandle] of `update_mode_delta` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_update_mode_delta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("update_mode_delta")); + /// The [VarHandle] of `loop_filter_mode_deltas` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_loop_filter_mode_deltas = LAYOUT.arrayElementVarHandle(PathElement.groupElement("loop_filter_mode_deltas")); + + /// Creates `StdVideoAV1LoopFilter` with the given segment. + /// @param segment the memory segment + public StdVideoAV1LoopFilter(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1LoopFilter` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1LoopFilter of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1LoopFilter(segment); } + + /// Creates `StdVideoAV1LoopFilter` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1LoopFilter ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1LoopFilter(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1LoopFilter` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1LoopFilter ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1LoopFilter(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1LoopFilter` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1LoopFilter` + public static StdVideoAV1LoopFilter alloc(SegmentAllocator allocator) { return new StdVideoAV1LoopFilter(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1LoopFilter` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1LoopFilter` + public static StdVideoAV1LoopFilter alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1LoopFilter(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1LoopFilterFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1LoopFilterFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoAV1LoopFilter.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoAV1LoopFilterFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoAV1LoopFilter.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoAV1LoopFilterFlags") java.lang.foreign.MemorySegment flags() { return StdVideoAV1LoopFilter.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoAV1LoopFilterFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoAV1LoopFilterFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1LoopFilter.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter flagsAt(long index, @CType("StdVideoAV1LoopFilterFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1LoopFilter.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter flags(@CType("StdVideoAV1LoopFilterFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1LoopFilter.set_flags(this.segment(), value); return this; } + + /// {@return `loop_filter_level` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_loop_filter_level(MemorySegment segment, long index) { return (byte) VH_loop_filter_level.get(segment, 0L, index); } + /// {@return `loop_filter_level`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_loop_filter_level(MemorySegment segment) { return StdVideoAV1LoopFilter.get_loop_filter_level(segment, 0L); } + /// {@return `loop_filter_level` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte loop_filter_levelAt(long index) { return StdVideoAV1LoopFilter.get_loop_filter_level(this.segment(), index); } + /// {@return `loop_filter_level`} + public @CType("uint8_t [ ]") byte loop_filter_level() { return StdVideoAV1LoopFilter.get_loop_filter_level(this.segment()); } + /// Sets `loop_filter_level` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_loop_filter_level(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_loop_filter_level.set(segment, 0L, index, value); } + /// Sets `loop_filter_level` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_loop_filter_level(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1LoopFilter.set_loop_filter_level(segment, 0L, value); } + /// Sets `loop_filter_level` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter loop_filter_levelAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1LoopFilter.set_loop_filter_level(this.segment(), index, value); return this; } + /// Sets `loop_filter_level` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter loop_filter_level(@CType("uint8_t [ ]") byte value) { StdVideoAV1LoopFilter.set_loop_filter_level(this.segment(), value); return this; } + + /// {@return `loop_filter_sharpness` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_loop_filter_sharpness(MemorySegment segment, long index) { return (byte) VH_loop_filter_sharpness.get(segment, 0L, index); } + /// {@return `loop_filter_sharpness`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_loop_filter_sharpness(MemorySegment segment) { return StdVideoAV1LoopFilter.get_loop_filter_sharpness(segment, 0L); } + /// {@return `loop_filter_sharpness` at the given index} + /// @param index the index + public @CType("uint8_t") byte loop_filter_sharpnessAt(long index) { return StdVideoAV1LoopFilter.get_loop_filter_sharpness(this.segment(), index); } + /// {@return `loop_filter_sharpness`} + public @CType("uint8_t") byte loop_filter_sharpness() { return StdVideoAV1LoopFilter.get_loop_filter_sharpness(this.segment()); } + /// Sets `loop_filter_sharpness` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_loop_filter_sharpness(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_loop_filter_sharpness.set(segment, 0L, index, value); } + /// Sets `loop_filter_sharpness` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_loop_filter_sharpness(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1LoopFilter.set_loop_filter_sharpness(segment, 0L, value); } + /// Sets `loop_filter_sharpness` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter loop_filter_sharpnessAt(long index, @CType("uint8_t") byte value) { StdVideoAV1LoopFilter.set_loop_filter_sharpness(this.segment(), index, value); return this; } + /// Sets `loop_filter_sharpness` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter loop_filter_sharpness(@CType("uint8_t") byte value) { StdVideoAV1LoopFilter.set_loop_filter_sharpness(this.segment(), value); return this; } + + /// {@return `update_ref_delta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_update_ref_delta(MemorySegment segment, long index) { return (byte) VH_update_ref_delta.get(segment, 0L, index); } + /// {@return `update_ref_delta`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_update_ref_delta(MemorySegment segment) { return StdVideoAV1LoopFilter.get_update_ref_delta(segment, 0L); } + /// {@return `update_ref_delta` at the given index} + /// @param index the index + public @CType("uint8_t") byte update_ref_deltaAt(long index) { return StdVideoAV1LoopFilter.get_update_ref_delta(this.segment(), index); } + /// {@return `update_ref_delta`} + public @CType("uint8_t") byte update_ref_delta() { return StdVideoAV1LoopFilter.get_update_ref_delta(this.segment()); } + /// Sets `update_ref_delta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_update_ref_delta(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_update_ref_delta.set(segment, 0L, index, value); } + /// Sets `update_ref_delta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_update_ref_delta(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1LoopFilter.set_update_ref_delta(segment, 0L, value); } + /// Sets `update_ref_delta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter update_ref_deltaAt(long index, @CType("uint8_t") byte value) { StdVideoAV1LoopFilter.set_update_ref_delta(this.segment(), index, value); return this; } + /// Sets `update_ref_delta` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter update_ref_delta(@CType("uint8_t") byte value) { StdVideoAV1LoopFilter.set_update_ref_delta(this.segment(), value); return this; } + + /// {@return `loop_filter_ref_deltas` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_loop_filter_ref_deltas(MemorySegment segment, long index) { return (byte) VH_loop_filter_ref_deltas.get(segment, 0L, index); } + /// {@return `loop_filter_ref_deltas`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_loop_filter_ref_deltas(MemorySegment segment) { return StdVideoAV1LoopFilter.get_loop_filter_ref_deltas(segment, 0L); } + /// {@return `loop_filter_ref_deltas` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte loop_filter_ref_deltasAt(long index) { return StdVideoAV1LoopFilter.get_loop_filter_ref_deltas(this.segment(), index); } + /// {@return `loop_filter_ref_deltas`} + public @CType("int8_t [ ]") byte loop_filter_ref_deltas() { return StdVideoAV1LoopFilter.get_loop_filter_ref_deltas(this.segment()); } + /// Sets `loop_filter_ref_deltas` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_loop_filter_ref_deltas(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_loop_filter_ref_deltas.set(segment, 0L, index, value); } + /// Sets `loop_filter_ref_deltas` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_loop_filter_ref_deltas(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoAV1LoopFilter.set_loop_filter_ref_deltas(segment, 0L, value); } + /// Sets `loop_filter_ref_deltas` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter loop_filter_ref_deltasAt(long index, @CType("int8_t [ ]") byte value) { StdVideoAV1LoopFilter.set_loop_filter_ref_deltas(this.segment(), index, value); return this; } + /// Sets `loop_filter_ref_deltas` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter loop_filter_ref_deltas(@CType("int8_t [ ]") byte value) { StdVideoAV1LoopFilter.set_loop_filter_ref_deltas(this.segment(), value); return this; } + + /// {@return `update_mode_delta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_update_mode_delta(MemorySegment segment, long index) { return (byte) VH_update_mode_delta.get(segment, 0L, index); } + /// {@return `update_mode_delta`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_update_mode_delta(MemorySegment segment) { return StdVideoAV1LoopFilter.get_update_mode_delta(segment, 0L); } + /// {@return `update_mode_delta` at the given index} + /// @param index the index + public @CType("uint8_t") byte update_mode_deltaAt(long index) { return StdVideoAV1LoopFilter.get_update_mode_delta(this.segment(), index); } + /// {@return `update_mode_delta`} + public @CType("uint8_t") byte update_mode_delta() { return StdVideoAV1LoopFilter.get_update_mode_delta(this.segment()); } + /// Sets `update_mode_delta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_update_mode_delta(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_update_mode_delta.set(segment, 0L, index, value); } + /// Sets `update_mode_delta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_update_mode_delta(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1LoopFilter.set_update_mode_delta(segment, 0L, value); } + /// Sets `update_mode_delta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter update_mode_deltaAt(long index, @CType("uint8_t") byte value) { StdVideoAV1LoopFilter.set_update_mode_delta(this.segment(), index, value); return this; } + /// Sets `update_mode_delta` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter update_mode_delta(@CType("uint8_t") byte value) { StdVideoAV1LoopFilter.set_update_mode_delta(this.segment(), value); return this; } + + /// {@return `loop_filter_mode_deltas` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_loop_filter_mode_deltas(MemorySegment segment, long index) { return (byte) VH_loop_filter_mode_deltas.get(segment, 0L, index); } + /// {@return `loop_filter_mode_deltas`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_loop_filter_mode_deltas(MemorySegment segment) { return StdVideoAV1LoopFilter.get_loop_filter_mode_deltas(segment, 0L); } + /// {@return `loop_filter_mode_deltas` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte loop_filter_mode_deltasAt(long index) { return StdVideoAV1LoopFilter.get_loop_filter_mode_deltas(this.segment(), index); } + /// {@return `loop_filter_mode_deltas`} + public @CType("int8_t [ ]") byte loop_filter_mode_deltas() { return StdVideoAV1LoopFilter.get_loop_filter_mode_deltas(this.segment()); } + /// Sets `loop_filter_mode_deltas` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_loop_filter_mode_deltas(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_loop_filter_mode_deltas.set(segment, 0L, index, value); } + /// Sets `loop_filter_mode_deltas` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_loop_filter_mode_deltas(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoAV1LoopFilter.set_loop_filter_mode_deltas(segment, 0L, value); } + /// Sets `loop_filter_mode_deltas` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter loop_filter_mode_deltasAt(long index, @CType("int8_t [ ]") byte value) { StdVideoAV1LoopFilter.set_loop_filter_mode_deltas(this.segment(), index, value); return this; } + /// Sets `loop_filter_mode_deltas` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilter loop_filter_mode_deltas(@CType("int8_t [ ]") byte value) { StdVideoAV1LoopFilter.set_loop_filter_mode_deltas(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1LoopFilterFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1LoopFilterFlags.java new file mode 100644 index 00000000..1766fba2 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1LoopFilterFlags.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### loop_filter_delta_enabled +/// [VarHandle][#VH_loop_filter_delta_enabled] - [Getter][#loop_filter_delta_enabled()] - [Setter][#loop_filter_delta_enabled(int)] +/// ### loop_filter_delta_update +/// [VarHandle][#VH_loop_filter_delta_update] - [Getter][#loop_filter_delta_update()] - [Setter][#loop_filter_delta_update(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1LoopFilterFlags { +/// uint32_t : 1 loop_filter_delta_enabled; +/// uint32_t : 1 loop_filter_delta_update; +/// uint32_t : 30 reserved; +/// } StdVideoAV1LoopFilterFlags; +/// ``` +public final class StdVideoAV1LoopFilterFlags extends Struct { + /// The struct layout of `StdVideoAV1LoopFilterFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("loop_filter_delta_enabled"), + ValueLayout.JAVA_INT.withName("loop_filter_delta_update"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `loop_filter_delta_enabled` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_loop_filter_delta_enabled = LAYOUT.arrayElementVarHandle(PathElement.groupElement("loop_filter_delta_enabled")); + /// The [VarHandle] of `loop_filter_delta_update` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_loop_filter_delta_update = LAYOUT.arrayElementVarHandle(PathElement.groupElement("loop_filter_delta_update")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoAV1LoopFilterFlags` with the given segment. + /// @param segment the memory segment + public StdVideoAV1LoopFilterFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1LoopFilterFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1LoopFilterFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1LoopFilterFlags(segment); } + + /// Creates `StdVideoAV1LoopFilterFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1LoopFilterFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1LoopFilterFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1LoopFilterFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1LoopFilterFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1LoopFilterFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1LoopFilterFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1LoopFilterFlags` + public static StdVideoAV1LoopFilterFlags alloc(SegmentAllocator allocator) { return new StdVideoAV1LoopFilterFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1LoopFilterFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1LoopFilterFlags` + public static StdVideoAV1LoopFilterFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1LoopFilterFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `loop_filter_delta_enabled` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_loop_filter_delta_enabled(MemorySegment segment, long index) { return (int) VH_loop_filter_delta_enabled.get(segment, 0L, index); } + /// {@return `loop_filter_delta_enabled`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_loop_filter_delta_enabled(MemorySegment segment) { return StdVideoAV1LoopFilterFlags.get_loop_filter_delta_enabled(segment, 0L); } + /// {@return `loop_filter_delta_enabled` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int loop_filter_delta_enabledAt(long index) { return StdVideoAV1LoopFilterFlags.get_loop_filter_delta_enabled(this.segment(), index); } + /// {@return `loop_filter_delta_enabled`} + public @CType("uint32_t : 1") int loop_filter_delta_enabled() { return StdVideoAV1LoopFilterFlags.get_loop_filter_delta_enabled(this.segment()); } + /// Sets `loop_filter_delta_enabled` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_loop_filter_delta_enabled(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_loop_filter_delta_enabled.set(segment, 0L, index, value); } + /// Sets `loop_filter_delta_enabled` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_loop_filter_delta_enabled(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1LoopFilterFlags.set_loop_filter_delta_enabled(segment, 0L, value); } + /// Sets `loop_filter_delta_enabled` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilterFlags loop_filter_delta_enabledAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1LoopFilterFlags.set_loop_filter_delta_enabled(this.segment(), index, value); return this; } + /// Sets `loop_filter_delta_enabled` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilterFlags loop_filter_delta_enabled(@CType("uint32_t : 1") int value) { StdVideoAV1LoopFilterFlags.set_loop_filter_delta_enabled(this.segment(), value); return this; } + + /// {@return `loop_filter_delta_update` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_loop_filter_delta_update(MemorySegment segment, long index) { return (int) VH_loop_filter_delta_update.get(segment, 0L, index); } + /// {@return `loop_filter_delta_update`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_loop_filter_delta_update(MemorySegment segment) { return StdVideoAV1LoopFilterFlags.get_loop_filter_delta_update(segment, 0L); } + /// {@return `loop_filter_delta_update` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int loop_filter_delta_updateAt(long index) { return StdVideoAV1LoopFilterFlags.get_loop_filter_delta_update(this.segment(), index); } + /// {@return `loop_filter_delta_update`} + public @CType("uint32_t : 1") int loop_filter_delta_update() { return StdVideoAV1LoopFilterFlags.get_loop_filter_delta_update(this.segment()); } + /// Sets `loop_filter_delta_update` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_loop_filter_delta_update(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_loop_filter_delta_update.set(segment, 0L, index, value); } + /// Sets `loop_filter_delta_update` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_loop_filter_delta_update(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1LoopFilterFlags.set_loop_filter_delta_update(segment, 0L, value); } + /// Sets `loop_filter_delta_update` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilterFlags loop_filter_delta_updateAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1LoopFilterFlags.set_loop_filter_delta_update(this.segment(), index, value); return this; } + /// Sets `loop_filter_delta_update` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilterFlags loop_filter_delta_update(@CType("uint32_t : 1") int value) { StdVideoAV1LoopFilterFlags.set_loop_filter_delta_update(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment) { return StdVideoAV1LoopFilterFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 30") int reservedAt(long index) { return StdVideoAV1LoopFilterFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 30") int reserved() { return StdVideoAV1LoopFilterFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 30") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 30") int value) { StdVideoAV1LoopFilterFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilterFlags reservedAt(long index, @CType("uint32_t : 30") int value) { StdVideoAV1LoopFilterFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopFilterFlags reserved(@CType("uint32_t : 30") int value) { StdVideoAV1LoopFilterFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1LoopRestoration.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1LoopRestoration.java new file mode 100644 index 00000000..86a0cb1e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1LoopRestoration.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### FrameRestorationType +/// [VarHandle][#VH_FrameRestorationType] - [Getter][#FrameRestorationType()] - [Setter][#FrameRestorationType(int)] +/// ### LoopRestorationSize +/// [VarHandle][#VH_LoopRestorationSize] - [Getter][#LoopRestorationSize()] - [Setter][#LoopRestorationSize(short)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1LoopRestoration { +/// StdVideoAV1FrameRestorationType [ ] FrameRestorationType; +/// uint16_t [ ] LoopRestorationSize; +/// } StdVideoAV1LoopRestoration; +/// ``` +public final class StdVideoAV1LoopRestoration extends Struct { + /// The struct layout of `StdVideoAV1LoopRestoration`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("FrameRestorationType"), + ValueLayout.JAVA_SHORT.withName("LoopRestorationSize") + ); + /// The [VarHandle] of `FrameRestorationType` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_FrameRestorationType = LAYOUT.arrayElementVarHandle(PathElement.groupElement("FrameRestorationType")); + /// The [VarHandle] of `LoopRestorationSize` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_LoopRestorationSize = LAYOUT.arrayElementVarHandle(PathElement.groupElement("LoopRestorationSize")); + + /// Creates `StdVideoAV1LoopRestoration` with the given segment. + /// @param segment the memory segment + public StdVideoAV1LoopRestoration(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1LoopRestoration` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1LoopRestoration of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1LoopRestoration(segment); } + + /// Creates `StdVideoAV1LoopRestoration` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1LoopRestoration ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1LoopRestoration(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1LoopRestoration` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1LoopRestoration ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1LoopRestoration(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1LoopRestoration` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1LoopRestoration` + public static StdVideoAV1LoopRestoration alloc(SegmentAllocator allocator) { return new StdVideoAV1LoopRestoration(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1LoopRestoration` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1LoopRestoration` + public static StdVideoAV1LoopRestoration alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1LoopRestoration(allocator.allocate(LAYOUT, count)); } + + /// {@return `FrameRestorationType` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1FrameRestorationType [ ]") int get_FrameRestorationType(MemorySegment segment, long index) { return (int) VH_FrameRestorationType.get(segment, 0L, index); } + /// {@return `FrameRestorationType`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1FrameRestorationType [ ]") int get_FrameRestorationType(MemorySegment segment) { return StdVideoAV1LoopRestoration.get_FrameRestorationType(segment, 0L); } + /// {@return `FrameRestorationType` at the given index} + /// @param index the index + public @CType("StdVideoAV1FrameRestorationType [ ]") int FrameRestorationTypeAt(long index) { return StdVideoAV1LoopRestoration.get_FrameRestorationType(this.segment(), index); } + /// {@return `FrameRestorationType`} + public @CType("StdVideoAV1FrameRestorationType [ ]") int FrameRestorationType() { return StdVideoAV1LoopRestoration.get_FrameRestorationType(this.segment()); } + /// Sets `FrameRestorationType` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_FrameRestorationType(MemorySegment segment, long index, @CType("StdVideoAV1FrameRestorationType [ ]") int value) { VH_FrameRestorationType.set(segment, 0L, index, value); } + /// Sets `FrameRestorationType` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_FrameRestorationType(MemorySegment segment, @CType("StdVideoAV1FrameRestorationType [ ]") int value) { StdVideoAV1LoopRestoration.set_FrameRestorationType(segment, 0L, value); } + /// Sets `FrameRestorationType` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopRestoration FrameRestorationTypeAt(long index, @CType("StdVideoAV1FrameRestorationType [ ]") int value) { StdVideoAV1LoopRestoration.set_FrameRestorationType(this.segment(), index, value); return this; } + /// Sets `FrameRestorationType` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopRestoration FrameRestorationType(@CType("StdVideoAV1FrameRestorationType [ ]") int value) { StdVideoAV1LoopRestoration.set_FrameRestorationType(this.segment(), value); return this; } + + /// {@return `LoopRestorationSize` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t [ ]") short get_LoopRestorationSize(MemorySegment segment, long index) { return (short) VH_LoopRestorationSize.get(segment, 0L, index); } + /// {@return `LoopRestorationSize`} + /// @param segment the segment of the struct + public static @CType("uint16_t [ ]") short get_LoopRestorationSize(MemorySegment segment) { return StdVideoAV1LoopRestoration.get_LoopRestorationSize(segment, 0L); } + /// {@return `LoopRestorationSize` at the given index} + /// @param index the index + public @CType("uint16_t [ ]") short LoopRestorationSizeAt(long index) { return StdVideoAV1LoopRestoration.get_LoopRestorationSize(this.segment(), index); } + /// {@return `LoopRestorationSize`} + public @CType("uint16_t [ ]") short LoopRestorationSize() { return StdVideoAV1LoopRestoration.get_LoopRestorationSize(this.segment()); } + /// Sets `LoopRestorationSize` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_LoopRestorationSize(MemorySegment segment, long index, @CType("uint16_t [ ]") short value) { VH_LoopRestorationSize.set(segment, 0L, index, value); } + /// Sets `LoopRestorationSize` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_LoopRestorationSize(MemorySegment segment, @CType("uint16_t [ ]") short value) { StdVideoAV1LoopRestoration.set_LoopRestorationSize(segment, 0L, value); } + /// Sets `LoopRestorationSize` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1LoopRestoration LoopRestorationSizeAt(long index, @CType("uint16_t [ ]") short value) { StdVideoAV1LoopRestoration.set_LoopRestorationSize(this.segment(), index, value); return this; } + /// Sets `LoopRestorationSize` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1LoopRestoration LoopRestorationSize(@CType("uint16_t [ ]") short value) { StdVideoAV1LoopRestoration.set_LoopRestorationSize(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1Quantization.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1Quantization.java new file mode 100644 index 00000000..0da88dea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1Quantization.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### base_q_idx +/// [VarHandle][#VH_base_q_idx] - [Getter][#base_q_idx()] - [Setter][#base_q_idx(byte)] +/// ### DeltaQYDc +/// [VarHandle][#VH_DeltaQYDc] - [Getter][#DeltaQYDc()] - [Setter][#DeltaQYDc(byte)] +/// ### DeltaQUDc +/// [VarHandle][#VH_DeltaQUDc] - [Getter][#DeltaQUDc()] - [Setter][#DeltaQUDc(byte)] +/// ### DeltaQUAc +/// [VarHandle][#VH_DeltaQUAc] - [Getter][#DeltaQUAc()] - [Setter][#DeltaQUAc(byte)] +/// ### DeltaQVDc +/// [VarHandle][#VH_DeltaQVDc] - [Getter][#DeltaQVDc()] - [Setter][#DeltaQVDc(byte)] +/// ### DeltaQVAc +/// [VarHandle][#VH_DeltaQVAc] - [Getter][#DeltaQVAc()] - [Setter][#DeltaQVAc(byte)] +/// ### qm_y +/// [VarHandle][#VH_qm_y] - [Getter][#qm_y()] - [Setter][#qm_y(byte)] +/// ### qm_u +/// [VarHandle][#VH_qm_u] - [Getter][#qm_u()] - [Setter][#qm_u(byte)] +/// ### qm_v +/// [VarHandle][#VH_qm_v] - [Getter][#qm_v()] - [Setter][#qm_v(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1Quantization { +/// StdVideoAV1QuantizationFlags flags; +/// uint8_t base_q_idx; +/// int8_t DeltaQYDc; +/// int8_t DeltaQUDc; +/// int8_t DeltaQUAc; +/// int8_t DeltaQVDc; +/// int8_t DeltaQVAc; +/// uint8_t qm_y; +/// uint8_t qm_u; +/// uint8_t qm_v; +/// } StdVideoAV1Quantization; +/// ``` +public final class StdVideoAV1Quantization extends Struct { + /// The struct layout of `StdVideoAV1Quantization`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoAV1QuantizationFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("base_q_idx"), + ValueLayout.JAVA_BYTE.withName("DeltaQYDc"), + ValueLayout.JAVA_BYTE.withName("DeltaQUDc"), + ValueLayout.JAVA_BYTE.withName("DeltaQUAc"), + ValueLayout.JAVA_BYTE.withName("DeltaQVDc"), + ValueLayout.JAVA_BYTE.withName("DeltaQVAc"), + ValueLayout.JAVA_BYTE.withName("qm_y"), + ValueLayout.JAVA_BYTE.withName("qm_u"), + ValueLayout.JAVA_BYTE.withName("qm_v") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `base_q_idx` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_base_q_idx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("base_q_idx")); + /// The [VarHandle] of `DeltaQYDc` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_DeltaQYDc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("DeltaQYDc")); + /// The [VarHandle] of `DeltaQUDc` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_DeltaQUDc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("DeltaQUDc")); + /// The [VarHandle] of `DeltaQUAc` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_DeltaQUAc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("DeltaQUAc")); + /// The [VarHandle] of `DeltaQVDc` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_DeltaQVDc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("DeltaQVDc")); + /// The [VarHandle] of `DeltaQVAc` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_DeltaQVAc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("DeltaQVAc")); + /// The [VarHandle] of `qm_y` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_qm_y = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qm_y")); + /// The [VarHandle] of `qm_u` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_qm_u = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qm_u")); + /// The [VarHandle] of `qm_v` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_qm_v = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qm_v")); + + /// Creates `StdVideoAV1Quantization` with the given segment. + /// @param segment the memory segment + public StdVideoAV1Quantization(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1Quantization` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1Quantization of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1Quantization(segment); } + + /// Creates `StdVideoAV1Quantization` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1Quantization ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1Quantization(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1Quantization` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1Quantization ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1Quantization(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1Quantization` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1Quantization` + public static StdVideoAV1Quantization alloc(SegmentAllocator allocator) { return new StdVideoAV1Quantization(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1Quantization` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1Quantization` + public static StdVideoAV1Quantization alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1Quantization(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1QuantizationFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1QuantizationFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoAV1Quantization.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoAV1QuantizationFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoAV1Quantization.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoAV1QuantizationFlags") java.lang.foreign.MemorySegment flags() { return StdVideoAV1Quantization.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoAV1QuantizationFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoAV1QuantizationFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1Quantization.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization flagsAt(long index, @CType("StdVideoAV1QuantizationFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1Quantization.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization flags(@CType("StdVideoAV1QuantizationFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1Quantization.set_flags(this.segment(), value); return this; } + + /// {@return `base_q_idx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_base_q_idx(MemorySegment segment, long index) { return (byte) VH_base_q_idx.get(segment, 0L, index); } + /// {@return `base_q_idx`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_base_q_idx(MemorySegment segment) { return StdVideoAV1Quantization.get_base_q_idx(segment, 0L); } + /// {@return `base_q_idx` at the given index} + /// @param index the index + public @CType("uint8_t") byte base_q_idxAt(long index) { return StdVideoAV1Quantization.get_base_q_idx(this.segment(), index); } + /// {@return `base_q_idx`} + public @CType("uint8_t") byte base_q_idx() { return StdVideoAV1Quantization.get_base_q_idx(this.segment()); } + /// Sets `base_q_idx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_base_q_idx(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_base_q_idx.set(segment, 0L, index, value); } + /// Sets `base_q_idx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_base_q_idx(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1Quantization.set_base_q_idx(segment, 0L, value); } + /// Sets `base_q_idx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization base_q_idxAt(long index, @CType("uint8_t") byte value) { StdVideoAV1Quantization.set_base_q_idx(this.segment(), index, value); return this; } + /// Sets `base_q_idx` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization base_q_idx(@CType("uint8_t") byte value) { StdVideoAV1Quantization.set_base_q_idx(this.segment(), value); return this; } + + /// {@return `DeltaQYDc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_DeltaQYDc(MemorySegment segment, long index) { return (byte) VH_DeltaQYDc.get(segment, 0L, index); } + /// {@return `DeltaQYDc`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_DeltaQYDc(MemorySegment segment) { return StdVideoAV1Quantization.get_DeltaQYDc(segment, 0L); } + /// {@return `DeltaQYDc` at the given index} + /// @param index the index + public @CType("int8_t") byte DeltaQYDcAt(long index) { return StdVideoAV1Quantization.get_DeltaQYDc(this.segment(), index); } + /// {@return `DeltaQYDc`} + public @CType("int8_t") byte DeltaQYDc() { return StdVideoAV1Quantization.get_DeltaQYDc(this.segment()); } + /// Sets `DeltaQYDc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_DeltaQYDc(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_DeltaQYDc.set(segment, 0L, index, value); } + /// Sets `DeltaQYDc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_DeltaQYDc(MemorySegment segment, @CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQYDc(segment, 0L, value); } + /// Sets `DeltaQYDc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization DeltaQYDcAt(long index, @CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQYDc(this.segment(), index, value); return this; } + /// Sets `DeltaQYDc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization DeltaQYDc(@CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQYDc(this.segment(), value); return this; } + + /// {@return `DeltaQUDc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_DeltaQUDc(MemorySegment segment, long index) { return (byte) VH_DeltaQUDc.get(segment, 0L, index); } + /// {@return `DeltaQUDc`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_DeltaQUDc(MemorySegment segment) { return StdVideoAV1Quantization.get_DeltaQUDc(segment, 0L); } + /// {@return `DeltaQUDc` at the given index} + /// @param index the index + public @CType("int8_t") byte DeltaQUDcAt(long index) { return StdVideoAV1Quantization.get_DeltaQUDc(this.segment(), index); } + /// {@return `DeltaQUDc`} + public @CType("int8_t") byte DeltaQUDc() { return StdVideoAV1Quantization.get_DeltaQUDc(this.segment()); } + /// Sets `DeltaQUDc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_DeltaQUDc(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_DeltaQUDc.set(segment, 0L, index, value); } + /// Sets `DeltaQUDc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_DeltaQUDc(MemorySegment segment, @CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQUDc(segment, 0L, value); } + /// Sets `DeltaQUDc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization DeltaQUDcAt(long index, @CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQUDc(this.segment(), index, value); return this; } + /// Sets `DeltaQUDc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization DeltaQUDc(@CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQUDc(this.segment(), value); return this; } + + /// {@return `DeltaQUAc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_DeltaQUAc(MemorySegment segment, long index) { return (byte) VH_DeltaQUAc.get(segment, 0L, index); } + /// {@return `DeltaQUAc`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_DeltaQUAc(MemorySegment segment) { return StdVideoAV1Quantization.get_DeltaQUAc(segment, 0L); } + /// {@return `DeltaQUAc` at the given index} + /// @param index the index + public @CType("int8_t") byte DeltaQUAcAt(long index) { return StdVideoAV1Quantization.get_DeltaQUAc(this.segment(), index); } + /// {@return `DeltaQUAc`} + public @CType("int8_t") byte DeltaQUAc() { return StdVideoAV1Quantization.get_DeltaQUAc(this.segment()); } + /// Sets `DeltaQUAc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_DeltaQUAc(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_DeltaQUAc.set(segment, 0L, index, value); } + /// Sets `DeltaQUAc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_DeltaQUAc(MemorySegment segment, @CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQUAc(segment, 0L, value); } + /// Sets `DeltaQUAc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization DeltaQUAcAt(long index, @CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQUAc(this.segment(), index, value); return this; } + /// Sets `DeltaQUAc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization DeltaQUAc(@CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQUAc(this.segment(), value); return this; } + + /// {@return `DeltaQVDc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_DeltaQVDc(MemorySegment segment, long index) { return (byte) VH_DeltaQVDc.get(segment, 0L, index); } + /// {@return `DeltaQVDc`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_DeltaQVDc(MemorySegment segment) { return StdVideoAV1Quantization.get_DeltaQVDc(segment, 0L); } + /// {@return `DeltaQVDc` at the given index} + /// @param index the index + public @CType("int8_t") byte DeltaQVDcAt(long index) { return StdVideoAV1Quantization.get_DeltaQVDc(this.segment(), index); } + /// {@return `DeltaQVDc`} + public @CType("int8_t") byte DeltaQVDc() { return StdVideoAV1Quantization.get_DeltaQVDc(this.segment()); } + /// Sets `DeltaQVDc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_DeltaQVDc(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_DeltaQVDc.set(segment, 0L, index, value); } + /// Sets `DeltaQVDc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_DeltaQVDc(MemorySegment segment, @CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQVDc(segment, 0L, value); } + /// Sets `DeltaQVDc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization DeltaQVDcAt(long index, @CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQVDc(this.segment(), index, value); return this; } + /// Sets `DeltaQVDc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization DeltaQVDc(@CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQVDc(this.segment(), value); return this; } + + /// {@return `DeltaQVAc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_DeltaQVAc(MemorySegment segment, long index) { return (byte) VH_DeltaQVAc.get(segment, 0L, index); } + /// {@return `DeltaQVAc`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_DeltaQVAc(MemorySegment segment) { return StdVideoAV1Quantization.get_DeltaQVAc(segment, 0L); } + /// {@return `DeltaQVAc` at the given index} + /// @param index the index + public @CType("int8_t") byte DeltaQVAcAt(long index) { return StdVideoAV1Quantization.get_DeltaQVAc(this.segment(), index); } + /// {@return `DeltaQVAc`} + public @CType("int8_t") byte DeltaQVAc() { return StdVideoAV1Quantization.get_DeltaQVAc(this.segment()); } + /// Sets `DeltaQVAc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_DeltaQVAc(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_DeltaQVAc.set(segment, 0L, index, value); } + /// Sets `DeltaQVAc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_DeltaQVAc(MemorySegment segment, @CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQVAc(segment, 0L, value); } + /// Sets `DeltaQVAc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization DeltaQVAcAt(long index, @CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQVAc(this.segment(), index, value); return this; } + /// Sets `DeltaQVAc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization DeltaQVAc(@CType("int8_t") byte value) { StdVideoAV1Quantization.set_DeltaQVAc(this.segment(), value); return this; } + + /// {@return `qm_y` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_qm_y(MemorySegment segment, long index) { return (byte) VH_qm_y.get(segment, 0L, index); } + /// {@return `qm_y`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_qm_y(MemorySegment segment) { return StdVideoAV1Quantization.get_qm_y(segment, 0L); } + /// {@return `qm_y` at the given index} + /// @param index the index + public @CType("uint8_t") byte qm_yAt(long index) { return StdVideoAV1Quantization.get_qm_y(this.segment(), index); } + /// {@return `qm_y`} + public @CType("uint8_t") byte qm_y() { return StdVideoAV1Quantization.get_qm_y(this.segment()); } + /// Sets `qm_y` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qm_y(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_qm_y.set(segment, 0L, index, value); } + /// Sets `qm_y` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qm_y(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1Quantization.set_qm_y(segment, 0L, value); } + /// Sets `qm_y` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization qm_yAt(long index, @CType("uint8_t") byte value) { StdVideoAV1Quantization.set_qm_y(this.segment(), index, value); return this; } + /// Sets `qm_y` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization qm_y(@CType("uint8_t") byte value) { StdVideoAV1Quantization.set_qm_y(this.segment(), value); return this; } + + /// {@return `qm_u` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_qm_u(MemorySegment segment, long index) { return (byte) VH_qm_u.get(segment, 0L, index); } + /// {@return `qm_u`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_qm_u(MemorySegment segment) { return StdVideoAV1Quantization.get_qm_u(segment, 0L); } + /// {@return `qm_u` at the given index} + /// @param index the index + public @CType("uint8_t") byte qm_uAt(long index) { return StdVideoAV1Quantization.get_qm_u(this.segment(), index); } + /// {@return `qm_u`} + public @CType("uint8_t") byte qm_u() { return StdVideoAV1Quantization.get_qm_u(this.segment()); } + /// Sets `qm_u` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qm_u(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_qm_u.set(segment, 0L, index, value); } + /// Sets `qm_u` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qm_u(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1Quantization.set_qm_u(segment, 0L, value); } + /// Sets `qm_u` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization qm_uAt(long index, @CType("uint8_t") byte value) { StdVideoAV1Quantization.set_qm_u(this.segment(), index, value); return this; } + /// Sets `qm_u` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization qm_u(@CType("uint8_t") byte value) { StdVideoAV1Quantization.set_qm_u(this.segment(), value); return this; } + + /// {@return `qm_v` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_qm_v(MemorySegment segment, long index) { return (byte) VH_qm_v.get(segment, 0L, index); } + /// {@return `qm_v`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_qm_v(MemorySegment segment) { return StdVideoAV1Quantization.get_qm_v(segment, 0L); } + /// {@return `qm_v` at the given index} + /// @param index the index + public @CType("uint8_t") byte qm_vAt(long index) { return StdVideoAV1Quantization.get_qm_v(this.segment(), index); } + /// {@return `qm_v`} + public @CType("uint8_t") byte qm_v() { return StdVideoAV1Quantization.get_qm_v(this.segment()); } + /// Sets `qm_v` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qm_v(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_qm_v.set(segment, 0L, index, value); } + /// Sets `qm_v` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qm_v(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1Quantization.set_qm_v(segment, 0L, value); } + /// Sets `qm_v` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization qm_vAt(long index, @CType("uint8_t") byte value) { StdVideoAV1Quantization.set_qm_v(this.segment(), index, value); return this; } + /// Sets `qm_v` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Quantization qm_v(@CType("uint8_t") byte value) { StdVideoAV1Quantization.set_qm_v(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1QuantizationFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1QuantizationFlags.java new file mode 100644 index 00000000..02c03ecf --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1QuantizationFlags.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### using_qmatrix +/// [VarHandle][#VH_using_qmatrix] - [Getter][#using_qmatrix()] - [Setter][#using_qmatrix(int)] +/// ### diff_uv_delta +/// [VarHandle][#VH_diff_uv_delta] - [Getter][#diff_uv_delta()] - [Setter][#diff_uv_delta(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1QuantizationFlags { +/// uint32_t : 1 using_qmatrix; +/// uint32_t : 1 diff_uv_delta; +/// uint32_t : 30 reserved; +/// } StdVideoAV1QuantizationFlags; +/// ``` +public final class StdVideoAV1QuantizationFlags extends Struct { + /// The struct layout of `StdVideoAV1QuantizationFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("using_qmatrix"), + ValueLayout.JAVA_INT.withName("diff_uv_delta"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `using_qmatrix` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_using_qmatrix = LAYOUT.arrayElementVarHandle(PathElement.groupElement("using_qmatrix")); + /// The [VarHandle] of `diff_uv_delta` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_diff_uv_delta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("diff_uv_delta")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoAV1QuantizationFlags` with the given segment. + /// @param segment the memory segment + public StdVideoAV1QuantizationFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1QuantizationFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1QuantizationFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1QuantizationFlags(segment); } + + /// Creates `StdVideoAV1QuantizationFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1QuantizationFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1QuantizationFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1QuantizationFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1QuantizationFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1QuantizationFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1QuantizationFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1QuantizationFlags` + public static StdVideoAV1QuantizationFlags alloc(SegmentAllocator allocator) { return new StdVideoAV1QuantizationFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1QuantizationFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1QuantizationFlags` + public static StdVideoAV1QuantizationFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1QuantizationFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `using_qmatrix` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_using_qmatrix(MemorySegment segment, long index) { return (int) VH_using_qmatrix.get(segment, 0L, index); } + /// {@return `using_qmatrix`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_using_qmatrix(MemorySegment segment) { return StdVideoAV1QuantizationFlags.get_using_qmatrix(segment, 0L); } + /// {@return `using_qmatrix` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int using_qmatrixAt(long index) { return StdVideoAV1QuantizationFlags.get_using_qmatrix(this.segment(), index); } + /// {@return `using_qmatrix`} + public @CType("uint32_t : 1") int using_qmatrix() { return StdVideoAV1QuantizationFlags.get_using_qmatrix(this.segment()); } + /// Sets `using_qmatrix` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_using_qmatrix(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_using_qmatrix.set(segment, 0L, index, value); } + /// Sets `using_qmatrix` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_using_qmatrix(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1QuantizationFlags.set_using_qmatrix(segment, 0L, value); } + /// Sets `using_qmatrix` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1QuantizationFlags using_qmatrixAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1QuantizationFlags.set_using_qmatrix(this.segment(), index, value); return this; } + /// Sets `using_qmatrix` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1QuantizationFlags using_qmatrix(@CType("uint32_t : 1") int value) { StdVideoAV1QuantizationFlags.set_using_qmatrix(this.segment(), value); return this; } + + /// {@return `diff_uv_delta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_diff_uv_delta(MemorySegment segment, long index) { return (int) VH_diff_uv_delta.get(segment, 0L, index); } + /// {@return `diff_uv_delta`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_diff_uv_delta(MemorySegment segment) { return StdVideoAV1QuantizationFlags.get_diff_uv_delta(segment, 0L); } + /// {@return `diff_uv_delta` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int diff_uv_deltaAt(long index) { return StdVideoAV1QuantizationFlags.get_diff_uv_delta(this.segment(), index); } + /// {@return `diff_uv_delta`} + public @CType("uint32_t : 1") int diff_uv_delta() { return StdVideoAV1QuantizationFlags.get_diff_uv_delta(this.segment()); } + /// Sets `diff_uv_delta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_diff_uv_delta(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_diff_uv_delta.set(segment, 0L, index, value); } + /// Sets `diff_uv_delta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_diff_uv_delta(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1QuantizationFlags.set_diff_uv_delta(segment, 0L, value); } + /// Sets `diff_uv_delta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1QuantizationFlags diff_uv_deltaAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1QuantizationFlags.set_diff_uv_delta(this.segment(), index, value); return this; } + /// Sets `diff_uv_delta` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1QuantizationFlags diff_uv_delta(@CType("uint32_t : 1") int value) { StdVideoAV1QuantizationFlags.set_diff_uv_delta(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment) { return StdVideoAV1QuantizationFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 30") int reservedAt(long index) { return StdVideoAV1QuantizationFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 30") int reserved() { return StdVideoAV1QuantizationFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 30") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 30") int value) { StdVideoAV1QuantizationFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1QuantizationFlags reservedAt(long index, @CType("uint32_t : 30") int value) { StdVideoAV1QuantizationFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1QuantizationFlags reserved(@CType("uint32_t : 30") int value) { StdVideoAV1QuantizationFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1Segmentation.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1Segmentation.java new file mode 100644 index 00000000..c642b110 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1Segmentation.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### FeatureEnabled +/// [VarHandle][#VH_FeatureEnabled] - [Getter][#FeatureEnabled()] - [Setter][#FeatureEnabled(byte)] +/// ### FeatureData +/// [VarHandle][#VH_FeatureData] - [Getter][#FeatureData()] - [Setter][#FeatureData(short)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1Segmentation { +/// uint8_t [ ] FeatureEnabled; +/// int16_t [ ][ ] FeatureData; +/// } StdVideoAV1Segmentation; +/// ``` +public final class StdVideoAV1Segmentation extends Struct { + /// The struct layout of `StdVideoAV1Segmentation`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_BYTE.withName("FeatureEnabled"), + ValueLayout.JAVA_SHORT.withName("FeatureData") + ); + /// The [VarHandle] of `FeatureEnabled` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_FeatureEnabled = LAYOUT.arrayElementVarHandle(PathElement.groupElement("FeatureEnabled")); + /// The [VarHandle] of `FeatureData` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_FeatureData = LAYOUT.arrayElementVarHandle(PathElement.groupElement("FeatureData")); + + /// Creates `StdVideoAV1Segmentation` with the given segment. + /// @param segment the memory segment + public StdVideoAV1Segmentation(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1Segmentation` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1Segmentation of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1Segmentation(segment); } + + /// Creates `StdVideoAV1Segmentation` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1Segmentation ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1Segmentation(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1Segmentation` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1Segmentation ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1Segmentation(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1Segmentation` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1Segmentation` + public static StdVideoAV1Segmentation alloc(SegmentAllocator allocator) { return new StdVideoAV1Segmentation(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1Segmentation` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1Segmentation` + public static StdVideoAV1Segmentation alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1Segmentation(allocator.allocate(LAYOUT, count)); } + + /// {@return `FeatureEnabled` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_FeatureEnabled(MemorySegment segment, long index) { return (byte) VH_FeatureEnabled.get(segment, 0L, index); } + /// {@return `FeatureEnabled`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_FeatureEnabled(MemorySegment segment) { return StdVideoAV1Segmentation.get_FeatureEnabled(segment, 0L); } + /// {@return `FeatureEnabled` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte FeatureEnabledAt(long index) { return StdVideoAV1Segmentation.get_FeatureEnabled(this.segment(), index); } + /// {@return `FeatureEnabled`} + public @CType("uint8_t [ ]") byte FeatureEnabled() { return StdVideoAV1Segmentation.get_FeatureEnabled(this.segment()); } + /// Sets `FeatureEnabled` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_FeatureEnabled(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_FeatureEnabled.set(segment, 0L, index, value); } + /// Sets `FeatureEnabled` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_FeatureEnabled(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoAV1Segmentation.set_FeatureEnabled(segment, 0L, value); } + /// Sets `FeatureEnabled` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Segmentation FeatureEnabledAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoAV1Segmentation.set_FeatureEnabled(this.segment(), index, value); return this; } + /// Sets `FeatureEnabled` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Segmentation FeatureEnabled(@CType("uint8_t [ ]") byte value) { StdVideoAV1Segmentation.set_FeatureEnabled(this.segment(), value); return this; } + + /// {@return `FeatureData` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int16_t [ ][ ]") short get_FeatureData(MemorySegment segment, long index) { return (short) VH_FeatureData.get(segment, 0L, index); } + /// {@return `FeatureData`} + /// @param segment the segment of the struct + public static @CType("int16_t [ ][ ]") short get_FeatureData(MemorySegment segment) { return StdVideoAV1Segmentation.get_FeatureData(segment, 0L); } + /// {@return `FeatureData` at the given index} + /// @param index the index + public @CType("int16_t [ ][ ]") short FeatureDataAt(long index) { return StdVideoAV1Segmentation.get_FeatureData(this.segment(), index); } + /// {@return `FeatureData`} + public @CType("int16_t [ ][ ]") short FeatureData() { return StdVideoAV1Segmentation.get_FeatureData(this.segment()); } + /// Sets `FeatureData` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_FeatureData(MemorySegment segment, long index, @CType("int16_t [ ][ ]") short value) { VH_FeatureData.set(segment, 0L, index, value); } + /// Sets `FeatureData` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_FeatureData(MemorySegment segment, @CType("int16_t [ ][ ]") short value) { StdVideoAV1Segmentation.set_FeatureData(segment, 0L, value); } + /// Sets `FeatureData` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1Segmentation FeatureDataAt(long index, @CType("int16_t [ ][ ]") short value) { StdVideoAV1Segmentation.set_FeatureData(this.segment(), index, value); return this; } + /// Sets `FeatureData` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1Segmentation FeatureData(@CType("int16_t [ ][ ]") short value) { StdVideoAV1Segmentation.set_FeatureData(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1SequenceHeader.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1SequenceHeader.java new file mode 100644 index 00000000..bd6591b8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1SequenceHeader.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### seq_profile +/// [VarHandle][#VH_seq_profile] - [Getter][#seq_profile()] - [Setter][#seq_profile(int)] +/// ### frame_width_bits_minus_1 +/// [VarHandle][#VH_frame_width_bits_minus_1] - [Getter][#frame_width_bits_minus_1()] - [Setter][#frame_width_bits_minus_1(byte)] +/// ### frame_height_bits_minus_1 +/// [VarHandle][#VH_frame_height_bits_minus_1] - [Getter][#frame_height_bits_minus_1()] - [Setter][#frame_height_bits_minus_1(byte)] +/// ### max_frame_width_minus_1 +/// [VarHandle][#VH_max_frame_width_minus_1] - [Getter][#max_frame_width_minus_1()] - [Setter][#max_frame_width_minus_1(short)] +/// ### max_frame_height_minus_1 +/// [VarHandle][#VH_max_frame_height_minus_1] - [Getter][#max_frame_height_minus_1()] - [Setter][#max_frame_height_minus_1(short)] +/// ### delta_frame_id_length_minus_2 +/// [VarHandle][#VH_delta_frame_id_length_minus_2] - [Getter][#delta_frame_id_length_minus_2()] - [Setter][#delta_frame_id_length_minus_2(byte)] +/// ### additional_frame_id_length_minus_1 +/// [VarHandle][#VH_additional_frame_id_length_minus_1] - [Getter][#additional_frame_id_length_minus_1()] - [Setter][#additional_frame_id_length_minus_1(byte)] +/// ### order_hint_bits_minus_1 +/// [VarHandle][#VH_order_hint_bits_minus_1] - [Getter][#order_hint_bits_minus_1()] - [Setter][#order_hint_bits_minus_1(byte)] +/// ### seq_force_integer_mv +/// [VarHandle][#VH_seq_force_integer_mv] - [Getter][#seq_force_integer_mv()] - [Setter][#seq_force_integer_mv(byte)] +/// ### seq_force_screen_content_tools +/// [VarHandle][#VH_seq_force_screen_content_tools] - [Getter][#seq_force_screen_content_tools()] - [Setter][#seq_force_screen_content_tools(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### pColorConfig +/// [VarHandle][#VH_pColorConfig] - [Getter][#pColorConfig()] - [Setter][#pColorConfig(java.lang.foreign.MemorySegment)] +/// ### pTimingInfo +/// [VarHandle][#VH_pTimingInfo] - [Getter][#pTimingInfo()] - [Setter][#pTimingInfo(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1SequenceHeader { +/// StdVideoAV1SequenceHeaderFlags flags; +/// StdVideoAV1Profile seq_profile; +/// uint8_t frame_width_bits_minus_1; +/// uint8_t frame_height_bits_minus_1; +/// uint16_t max_frame_width_minus_1; +/// uint16_t max_frame_height_minus_1; +/// uint8_t delta_frame_id_length_minus_2; +/// uint8_t additional_frame_id_length_minus_1; +/// uint8_t order_hint_bits_minus_1; +/// uint8_t seq_force_integer_mv; +/// uint8_t seq_force_screen_content_tools; +/// uint8_t [5] reserved1; +/// const StdVideoAV1ColorConfig * pColorConfig; +/// const StdVideoAV1TimingInfo * pTimingInfo; +/// } StdVideoAV1SequenceHeader; +/// ``` +public final class StdVideoAV1SequenceHeader extends Struct { + /// The struct layout of `StdVideoAV1SequenceHeader`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoAV1SequenceHeaderFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("seq_profile"), + ValueLayout.JAVA_BYTE.withName("frame_width_bits_minus_1"), + ValueLayout.JAVA_BYTE.withName("frame_height_bits_minus_1"), + ValueLayout.JAVA_SHORT.withName("max_frame_width_minus_1"), + ValueLayout.JAVA_SHORT.withName("max_frame_height_minus_1"), + ValueLayout.JAVA_BYTE.withName("delta_frame_id_length_minus_2"), + ValueLayout.JAVA_BYTE.withName("additional_frame_id_length_minus_1"), + ValueLayout.JAVA_BYTE.withName("order_hint_bits_minus_1"), + ValueLayout.JAVA_BYTE.withName("seq_force_integer_mv"), + ValueLayout.JAVA_BYTE.withName("seq_force_screen_content_tools"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.ADDRESS.withName("pColorConfig"), + ValueLayout.ADDRESS.withName("pTimingInfo") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `seq_profile` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_seq_profile = LAYOUT.arrayElementVarHandle(PathElement.groupElement("seq_profile")); + /// The [VarHandle] of `frame_width_bits_minus_1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_frame_width_bits_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_width_bits_minus_1")); + /// The [VarHandle] of `frame_height_bits_minus_1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_frame_height_bits_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_height_bits_minus_1")); + /// The [VarHandle] of `max_frame_width_minus_1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_max_frame_width_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_frame_width_minus_1")); + /// The [VarHandle] of `max_frame_height_minus_1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_max_frame_height_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_frame_height_minus_1")); + /// The [VarHandle] of `delta_frame_id_length_minus_2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_frame_id_length_minus_2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_frame_id_length_minus_2")); + /// The [VarHandle] of `additional_frame_id_length_minus_1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_additional_frame_id_length_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("additional_frame_id_length_minus_1")); + /// The [VarHandle] of `order_hint_bits_minus_1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_order_hint_bits_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("order_hint_bits_minus_1")); + /// The [VarHandle] of `seq_force_integer_mv` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_seq_force_integer_mv = LAYOUT.arrayElementVarHandle(PathElement.groupElement("seq_force_integer_mv")); + /// The [VarHandle] of `seq_force_screen_content_tools` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_seq_force_screen_content_tools = LAYOUT.arrayElementVarHandle(PathElement.groupElement("seq_force_screen_content_tools")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `pColorConfig` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pColorConfig = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pColorConfig")); + /// The [VarHandle] of `pTimingInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTimingInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTimingInfo")); + + /// Creates `StdVideoAV1SequenceHeader` with the given segment. + /// @param segment the memory segment + public StdVideoAV1SequenceHeader(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1SequenceHeader` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1SequenceHeader of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1SequenceHeader(segment); } + + /// Creates `StdVideoAV1SequenceHeader` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1SequenceHeader ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1SequenceHeader(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1SequenceHeader` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1SequenceHeader ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1SequenceHeader(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1SequenceHeader` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1SequenceHeader` + public static StdVideoAV1SequenceHeader alloc(SegmentAllocator allocator) { return new StdVideoAV1SequenceHeader(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1SequenceHeader` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1SequenceHeader` + public static StdVideoAV1SequenceHeader alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1SequenceHeader(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1SequenceHeaderFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1SequenceHeaderFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoAV1SequenceHeaderFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoAV1SequenceHeader.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoAV1SequenceHeaderFlags") java.lang.foreign.MemorySegment flags() { return StdVideoAV1SequenceHeader.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoAV1SequenceHeaderFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoAV1SequenceHeaderFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1SequenceHeader.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader flagsAt(long index, @CType("StdVideoAV1SequenceHeaderFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1SequenceHeader.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader flags(@CType("StdVideoAV1SequenceHeaderFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1SequenceHeader.set_flags(this.segment(), value); return this; } + + /// {@return `seq_profile` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1Profile") int get_seq_profile(MemorySegment segment, long index) { return (int) VH_seq_profile.get(segment, 0L, index); } + /// {@return `seq_profile`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1Profile") int get_seq_profile(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_seq_profile(segment, 0L); } + /// {@return `seq_profile` at the given index} + /// @param index the index + public @CType("StdVideoAV1Profile") int seq_profileAt(long index) { return StdVideoAV1SequenceHeader.get_seq_profile(this.segment(), index); } + /// {@return `seq_profile`} + public @CType("StdVideoAV1Profile") int seq_profile() { return StdVideoAV1SequenceHeader.get_seq_profile(this.segment()); } + /// Sets `seq_profile` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_seq_profile(MemorySegment segment, long index, @CType("StdVideoAV1Profile") int value) { VH_seq_profile.set(segment, 0L, index, value); } + /// Sets `seq_profile` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_seq_profile(MemorySegment segment, @CType("StdVideoAV1Profile") int value) { StdVideoAV1SequenceHeader.set_seq_profile(segment, 0L, value); } + /// Sets `seq_profile` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader seq_profileAt(long index, @CType("StdVideoAV1Profile") int value) { StdVideoAV1SequenceHeader.set_seq_profile(this.segment(), index, value); return this; } + /// Sets `seq_profile` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader seq_profile(@CType("StdVideoAV1Profile") int value) { StdVideoAV1SequenceHeader.set_seq_profile(this.segment(), value); return this; } + + /// {@return `frame_width_bits_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_frame_width_bits_minus_1(MemorySegment segment, long index) { return (byte) VH_frame_width_bits_minus_1.get(segment, 0L, index); } + /// {@return `frame_width_bits_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_frame_width_bits_minus_1(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_frame_width_bits_minus_1(segment, 0L); } + /// {@return `frame_width_bits_minus_1` at the given index} + /// @param index the index + public @CType("uint8_t") byte frame_width_bits_minus_1At(long index) { return StdVideoAV1SequenceHeader.get_frame_width_bits_minus_1(this.segment(), index); } + /// {@return `frame_width_bits_minus_1`} + public @CType("uint8_t") byte frame_width_bits_minus_1() { return StdVideoAV1SequenceHeader.get_frame_width_bits_minus_1(this.segment()); } + /// Sets `frame_width_bits_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_width_bits_minus_1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_frame_width_bits_minus_1.set(segment, 0L, index, value); } + /// Sets `frame_width_bits_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_width_bits_minus_1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_frame_width_bits_minus_1(segment, 0L, value); } + /// Sets `frame_width_bits_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader frame_width_bits_minus_1At(long index, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_frame_width_bits_minus_1(this.segment(), index, value); return this; } + /// Sets `frame_width_bits_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader frame_width_bits_minus_1(@CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_frame_width_bits_minus_1(this.segment(), value); return this; } + + /// {@return `frame_height_bits_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_frame_height_bits_minus_1(MemorySegment segment, long index) { return (byte) VH_frame_height_bits_minus_1.get(segment, 0L, index); } + /// {@return `frame_height_bits_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_frame_height_bits_minus_1(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_frame_height_bits_minus_1(segment, 0L); } + /// {@return `frame_height_bits_minus_1` at the given index} + /// @param index the index + public @CType("uint8_t") byte frame_height_bits_minus_1At(long index) { return StdVideoAV1SequenceHeader.get_frame_height_bits_minus_1(this.segment(), index); } + /// {@return `frame_height_bits_minus_1`} + public @CType("uint8_t") byte frame_height_bits_minus_1() { return StdVideoAV1SequenceHeader.get_frame_height_bits_minus_1(this.segment()); } + /// Sets `frame_height_bits_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_height_bits_minus_1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_frame_height_bits_minus_1.set(segment, 0L, index, value); } + /// Sets `frame_height_bits_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_height_bits_minus_1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_frame_height_bits_minus_1(segment, 0L, value); } + /// Sets `frame_height_bits_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader frame_height_bits_minus_1At(long index, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_frame_height_bits_minus_1(this.segment(), index, value); return this; } + /// Sets `frame_height_bits_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader frame_height_bits_minus_1(@CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_frame_height_bits_minus_1(this.segment(), value); return this; } + + /// {@return `max_frame_width_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_max_frame_width_minus_1(MemorySegment segment, long index) { return (short) VH_max_frame_width_minus_1.get(segment, 0L, index); } + /// {@return `max_frame_width_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_max_frame_width_minus_1(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_max_frame_width_minus_1(segment, 0L); } + /// {@return `max_frame_width_minus_1` at the given index} + /// @param index the index + public @CType("uint16_t") short max_frame_width_minus_1At(long index) { return StdVideoAV1SequenceHeader.get_max_frame_width_minus_1(this.segment(), index); } + /// {@return `max_frame_width_minus_1`} + public @CType("uint16_t") short max_frame_width_minus_1() { return StdVideoAV1SequenceHeader.get_max_frame_width_minus_1(this.segment()); } + /// Sets `max_frame_width_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_frame_width_minus_1(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_max_frame_width_minus_1.set(segment, 0L, index, value); } + /// Sets `max_frame_width_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_frame_width_minus_1(MemorySegment segment, @CType("uint16_t") short value) { StdVideoAV1SequenceHeader.set_max_frame_width_minus_1(segment, 0L, value); } + /// Sets `max_frame_width_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader max_frame_width_minus_1At(long index, @CType("uint16_t") short value) { StdVideoAV1SequenceHeader.set_max_frame_width_minus_1(this.segment(), index, value); return this; } + /// Sets `max_frame_width_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader max_frame_width_minus_1(@CType("uint16_t") short value) { StdVideoAV1SequenceHeader.set_max_frame_width_minus_1(this.segment(), value); return this; } + + /// {@return `max_frame_height_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_max_frame_height_minus_1(MemorySegment segment, long index) { return (short) VH_max_frame_height_minus_1.get(segment, 0L, index); } + /// {@return `max_frame_height_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_max_frame_height_minus_1(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_max_frame_height_minus_1(segment, 0L); } + /// {@return `max_frame_height_minus_1` at the given index} + /// @param index the index + public @CType("uint16_t") short max_frame_height_minus_1At(long index) { return StdVideoAV1SequenceHeader.get_max_frame_height_minus_1(this.segment(), index); } + /// {@return `max_frame_height_minus_1`} + public @CType("uint16_t") short max_frame_height_minus_1() { return StdVideoAV1SequenceHeader.get_max_frame_height_minus_1(this.segment()); } + /// Sets `max_frame_height_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_frame_height_minus_1(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_max_frame_height_minus_1.set(segment, 0L, index, value); } + /// Sets `max_frame_height_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_frame_height_minus_1(MemorySegment segment, @CType("uint16_t") short value) { StdVideoAV1SequenceHeader.set_max_frame_height_minus_1(segment, 0L, value); } + /// Sets `max_frame_height_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader max_frame_height_minus_1At(long index, @CType("uint16_t") short value) { StdVideoAV1SequenceHeader.set_max_frame_height_minus_1(this.segment(), index, value); return this; } + /// Sets `max_frame_height_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader max_frame_height_minus_1(@CType("uint16_t") short value) { StdVideoAV1SequenceHeader.set_max_frame_height_minus_1(this.segment(), value); return this; } + + /// {@return `delta_frame_id_length_minus_2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_delta_frame_id_length_minus_2(MemorySegment segment, long index) { return (byte) VH_delta_frame_id_length_minus_2.get(segment, 0L, index); } + /// {@return `delta_frame_id_length_minus_2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_delta_frame_id_length_minus_2(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_delta_frame_id_length_minus_2(segment, 0L); } + /// {@return `delta_frame_id_length_minus_2` at the given index} + /// @param index the index + public @CType("uint8_t") byte delta_frame_id_length_minus_2At(long index) { return StdVideoAV1SequenceHeader.get_delta_frame_id_length_minus_2(this.segment(), index); } + /// {@return `delta_frame_id_length_minus_2`} + public @CType("uint8_t") byte delta_frame_id_length_minus_2() { return StdVideoAV1SequenceHeader.get_delta_frame_id_length_minus_2(this.segment()); } + /// Sets `delta_frame_id_length_minus_2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_frame_id_length_minus_2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_delta_frame_id_length_minus_2.set(segment, 0L, index, value); } + /// Sets `delta_frame_id_length_minus_2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_frame_id_length_minus_2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_delta_frame_id_length_minus_2(segment, 0L, value); } + /// Sets `delta_frame_id_length_minus_2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader delta_frame_id_length_minus_2At(long index, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_delta_frame_id_length_minus_2(this.segment(), index, value); return this; } + /// Sets `delta_frame_id_length_minus_2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader delta_frame_id_length_minus_2(@CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_delta_frame_id_length_minus_2(this.segment(), value); return this; } + + /// {@return `additional_frame_id_length_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_additional_frame_id_length_minus_1(MemorySegment segment, long index) { return (byte) VH_additional_frame_id_length_minus_1.get(segment, 0L, index); } + /// {@return `additional_frame_id_length_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_additional_frame_id_length_minus_1(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_additional_frame_id_length_minus_1(segment, 0L); } + /// {@return `additional_frame_id_length_minus_1` at the given index} + /// @param index the index + public @CType("uint8_t") byte additional_frame_id_length_minus_1At(long index) { return StdVideoAV1SequenceHeader.get_additional_frame_id_length_minus_1(this.segment(), index); } + /// {@return `additional_frame_id_length_minus_1`} + public @CType("uint8_t") byte additional_frame_id_length_minus_1() { return StdVideoAV1SequenceHeader.get_additional_frame_id_length_minus_1(this.segment()); } + /// Sets `additional_frame_id_length_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_additional_frame_id_length_minus_1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_additional_frame_id_length_minus_1.set(segment, 0L, index, value); } + /// Sets `additional_frame_id_length_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_additional_frame_id_length_minus_1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_additional_frame_id_length_minus_1(segment, 0L, value); } + /// Sets `additional_frame_id_length_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader additional_frame_id_length_minus_1At(long index, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_additional_frame_id_length_minus_1(this.segment(), index, value); return this; } + /// Sets `additional_frame_id_length_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader additional_frame_id_length_minus_1(@CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_additional_frame_id_length_minus_1(this.segment(), value); return this; } + + /// {@return `order_hint_bits_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_order_hint_bits_minus_1(MemorySegment segment, long index) { return (byte) VH_order_hint_bits_minus_1.get(segment, 0L, index); } + /// {@return `order_hint_bits_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_order_hint_bits_minus_1(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_order_hint_bits_minus_1(segment, 0L); } + /// {@return `order_hint_bits_minus_1` at the given index} + /// @param index the index + public @CType("uint8_t") byte order_hint_bits_minus_1At(long index) { return StdVideoAV1SequenceHeader.get_order_hint_bits_minus_1(this.segment(), index); } + /// {@return `order_hint_bits_minus_1`} + public @CType("uint8_t") byte order_hint_bits_minus_1() { return StdVideoAV1SequenceHeader.get_order_hint_bits_minus_1(this.segment()); } + /// Sets `order_hint_bits_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_order_hint_bits_minus_1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_order_hint_bits_minus_1.set(segment, 0L, index, value); } + /// Sets `order_hint_bits_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_order_hint_bits_minus_1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_order_hint_bits_minus_1(segment, 0L, value); } + /// Sets `order_hint_bits_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader order_hint_bits_minus_1At(long index, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_order_hint_bits_minus_1(this.segment(), index, value); return this; } + /// Sets `order_hint_bits_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader order_hint_bits_minus_1(@CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_order_hint_bits_minus_1(this.segment(), value); return this; } + + /// {@return `seq_force_integer_mv` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_seq_force_integer_mv(MemorySegment segment, long index) { return (byte) VH_seq_force_integer_mv.get(segment, 0L, index); } + /// {@return `seq_force_integer_mv`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_seq_force_integer_mv(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_seq_force_integer_mv(segment, 0L); } + /// {@return `seq_force_integer_mv` at the given index} + /// @param index the index + public @CType("uint8_t") byte seq_force_integer_mvAt(long index) { return StdVideoAV1SequenceHeader.get_seq_force_integer_mv(this.segment(), index); } + /// {@return `seq_force_integer_mv`} + public @CType("uint8_t") byte seq_force_integer_mv() { return StdVideoAV1SequenceHeader.get_seq_force_integer_mv(this.segment()); } + /// Sets `seq_force_integer_mv` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_seq_force_integer_mv(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_seq_force_integer_mv.set(segment, 0L, index, value); } + /// Sets `seq_force_integer_mv` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_seq_force_integer_mv(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_seq_force_integer_mv(segment, 0L, value); } + /// Sets `seq_force_integer_mv` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader seq_force_integer_mvAt(long index, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_seq_force_integer_mv(this.segment(), index, value); return this; } + /// Sets `seq_force_integer_mv` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader seq_force_integer_mv(@CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_seq_force_integer_mv(this.segment(), value); return this; } + + /// {@return `seq_force_screen_content_tools` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_seq_force_screen_content_tools(MemorySegment segment, long index) { return (byte) VH_seq_force_screen_content_tools.get(segment, 0L, index); } + /// {@return `seq_force_screen_content_tools`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_seq_force_screen_content_tools(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_seq_force_screen_content_tools(segment, 0L); } + /// {@return `seq_force_screen_content_tools` at the given index} + /// @param index the index + public @CType("uint8_t") byte seq_force_screen_content_toolsAt(long index) { return StdVideoAV1SequenceHeader.get_seq_force_screen_content_tools(this.segment(), index); } + /// {@return `seq_force_screen_content_tools`} + public @CType("uint8_t") byte seq_force_screen_content_tools() { return StdVideoAV1SequenceHeader.get_seq_force_screen_content_tools(this.segment()); } + /// Sets `seq_force_screen_content_tools` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_seq_force_screen_content_tools(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_seq_force_screen_content_tools.set(segment, 0L, index, value); } + /// Sets `seq_force_screen_content_tools` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_seq_force_screen_content_tools(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_seq_force_screen_content_tools(segment, 0L, value); } + /// Sets `seq_force_screen_content_tools` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader seq_force_screen_content_toolsAt(long index, @CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_seq_force_screen_content_tools(this.segment(), index, value); return this; } + /// Sets `seq_force_screen_content_tools` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader seq_force_screen_content_tools(@CType("uint8_t") byte value) { StdVideoAV1SequenceHeader.set_seq_force_screen_content_tools(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [5]") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [5]") byte get_reserved1(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t [5]") byte reserved1At(long index) { return StdVideoAV1SequenceHeader.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t [5]") byte reserved1() { return StdVideoAV1SequenceHeader.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t [5]") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t [5]") byte value) { StdVideoAV1SequenceHeader.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader reserved1At(long index, @CType("uint8_t [5]") byte value) { StdVideoAV1SequenceHeader.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader reserved1(@CType("uint8_t [5]") byte value) { StdVideoAV1SequenceHeader.set_reserved1(this.segment(), value); return this; } + + /// {@return `pColorConfig` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1ColorConfig *") java.lang.foreign.MemorySegment get_pColorConfig(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pColorConfig.get(segment, 0L, index); } + /// {@return `pColorConfig`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1ColorConfig *") java.lang.foreign.MemorySegment get_pColorConfig(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_pColorConfig(segment, 0L); } + /// {@return `pColorConfig` at the given index} + /// @param index the index + public @CType("const StdVideoAV1ColorConfig *") java.lang.foreign.MemorySegment pColorConfigAt(long index) { return StdVideoAV1SequenceHeader.get_pColorConfig(this.segment(), index); } + /// {@return `pColorConfig`} + public @CType("const StdVideoAV1ColorConfig *") java.lang.foreign.MemorySegment pColorConfig() { return StdVideoAV1SequenceHeader.get_pColorConfig(this.segment()); } + /// Sets `pColorConfig` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pColorConfig(MemorySegment segment, long index, @CType("const StdVideoAV1ColorConfig *") java.lang.foreign.MemorySegment value) { VH_pColorConfig.set(segment, 0L, index, value); } + /// Sets `pColorConfig` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pColorConfig(MemorySegment segment, @CType("const StdVideoAV1ColorConfig *") java.lang.foreign.MemorySegment value) { StdVideoAV1SequenceHeader.set_pColorConfig(segment, 0L, value); } + /// Sets `pColorConfig` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader pColorConfigAt(long index, @CType("const StdVideoAV1ColorConfig *") java.lang.foreign.MemorySegment value) { StdVideoAV1SequenceHeader.set_pColorConfig(this.segment(), index, value); return this; } + /// Sets `pColorConfig` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader pColorConfig(@CType("const StdVideoAV1ColorConfig *") java.lang.foreign.MemorySegment value) { StdVideoAV1SequenceHeader.set_pColorConfig(this.segment(), value); return this; } + + /// {@return `pTimingInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1TimingInfo *") java.lang.foreign.MemorySegment get_pTimingInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTimingInfo.get(segment, 0L, index); } + /// {@return `pTimingInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1TimingInfo *") java.lang.foreign.MemorySegment get_pTimingInfo(MemorySegment segment) { return StdVideoAV1SequenceHeader.get_pTimingInfo(segment, 0L); } + /// {@return `pTimingInfo` at the given index} + /// @param index the index + public @CType("const StdVideoAV1TimingInfo *") java.lang.foreign.MemorySegment pTimingInfoAt(long index) { return StdVideoAV1SequenceHeader.get_pTimingInfo(this.segment(), index); } + /// {@return `pTimingInfo`} + public @CType("const StdVideoAV1TimingInfo *") java.lang.foreign.MemorySegment pTimingInfo() { return StdVideoAV1SequenceHeader.get_pTimingInfo(this.segment()); } + /// Sets `pTimingInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTimingInfo(MemorySegment segment, long index, @CType("const StdVideoAV1TimingInfo *") java.lang.foreign.MemorySegment value) { VH_pTimingInfo.set(segment, 0L, index, value); } + /// Sets `pTimingInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTimingInfo(MemorySegment segment, @CType("const StdVideoAV1TimingInfo *") java.lang.foreign.MemorySegment value) { StdVideoAV1SequenceHeader.set_pTimingInfo(segment, 0L, value); } + /// Sets `pTimingInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader pTimingInfoAt(long index, @CType("const StdVideoAV1TimingInfo *") java.lang.foreign.MemorySegment value) { StdVideoAV1SequenceHeader.set_pTimingInfo(this.segment(), index, value); return this; } + /// Sets `pTimingInfo` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeader pTimingInfo(@CType("const StdVideoAV1TimingInfo *") java.lang.foreign.MemorySegment value) { StdVideoAV1SequenceHeader.set_pTimingInfo(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1SequenceHeaderFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1SequenceHeaderFlags.java new file mode 100644 index 00000000..928172b5 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1SequenceHeaderFlags.java @@ -0,0 +1,814 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### still_picture +/// [VarHandle][#VH_still_picture] - [Getter][#still_picture()] - [Setter][#still_picture(int)] +/// ### reduced_still_picture_header +/// [VarHandle][#VH_reduced_still_picture_header] - [Getter][#reduced_still_picture_header()] - [Setter][#reduced_still_picture_header(int)] +/// ### use_128x128_superblock +/// [VarHandle][#VH_use_128x128_superblock] - [Getter][#use_128x128_superblock()] - [Setter][#use_128x128_superblock(int)] +/// ### enable_filter_intra +/// [VarHandle][#VH_enable_filter_intra] - [Getter][#enable_filter_intra()] - [Setter][#enable_filter_intra(int)] +/// ### enable_intra_edge_filter +/// [VarHandle][#VH_enable_intra_edge_filter] - [Getter][#enable_intra_edge_filter()] - [Setter][#enable_intra_edge_filter(int)] +/// ### enable_interintra_compound +/// [VarHandle][#VH_enable_interintra_compound] - [Getter][#enable_interintra_compound()] - [Setter][#enable_interintra_compound(int)] +/// ### enable_masked_compound +/// [VarHandle][#VH_enable_masked_compound] - [Getter][#enable_masked_compound()] - [Setter][#enable_masked_compound(int)] +/// ### enable_warped_motion +/// [VarHandle][#VH_enable_warped_motion] - [Getter][#enable_warped_motion()] - [Setter][#enable_warped_motion(int)] +/// ### enable_dual_filter +/// [VarHandle][#VH_enable_dual_filter] - [Getter][#enable_dual_filter()] - [Setter][#enable_dual_filter(int)] +/// ### enable_order_hint +/// [VarHandle][#VH_enable_order_hint] - [Getter][#enable_order_hint()] - [Setter][#enable_order_hint(int)] +/// ### enable_jnt_comp +/// [VarHandle][#VH_enable_jnt_comp] - [Getter][#enable_jnt_comp()] - [Setter][#enable_jnt_comp(int)] +/// ### enable_ref_frame_mvs +/// [VarHandle][#VH_enable_ref_frame_mvs] - [Getter][#enable_ref_frame_mvs()] - [Setter][#enable_ref_frame_mvs(int)] +/// ### frame_id_numbers_present_flag +/// [VarHandle][#VH_frame_id_numbers_present_flag] - [Getter][#frame_id_numbers_present_flag()] - [Setter][#frame_id_numbers_present_flag(int)] +/// ### enable_superres +/// [VarHandle][#VH_enable_superres] - [Getter][#enable_superres()] - [Setter][#enable_superres(int)] +/// ### enable_cdef +/// [VarHandle][#VH_enable_cdef] - [Getter][#enable_cdef()] - [Setter][#enable_cdef(int)] +/// ### enable_restoration +/// [VarHandle][#VH_enable_restoration] - [Getter][#enable_restoration()] - [Setter][#enable_restoration(int)] +/// ### film_grain_params_present +/// [VarHandle][#VH_film_grain_params_present] - [Getter][#film_grain_params_present()] - [Setter][#film_grain_params_present(int)] +/// ### timing_info_present_flag +/// [VarHandle][#VH_timing_info_present_flag] - [Getter][#timing_info_present_flag()] - [Setter][#timing_info_present_flag(int)] +/// ### initial_display_delay_present_flag +/// [VarHandle][#VH_initial_display_delay_present_flag] - [Getter][#initial_display_delay_present_flag()] - [Setter][#initial_display_delay_present_flag(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1SequenceHeaderFlags { +/// uint32_t : 1 still_picture; +/// uint32_t : 1 reduced_still_picture_header; +/// uint32_t : 1 use_128x128_superblock; +/// uint32_t : 1 enable_filter_intra; +/// uint32_t : 1 enable_intra_edge_filter; +/// uint32_t : 1 enable_interintra_compound; +/// uint32_t : 1 enable_masked_compound; +/// uint32_t : 1 enable_warped_motion; +/// uint32_t : 1 enable_dual_filter; +/// uint32_t : 1 enable_order_hint; +/// uint32_t : 1 enable_jnt_comp; +/// uint32_t : 1 enable_ref_frame_mvs; +/// uint32_t : 1 frame_id_numbers_present_flag; +/// uint32_t : 1 enable_superres; +/// uint32_t : 1 enable_cdef; +/// uint32_t : 1 enable_restoration; +/// uint32_t : 1 film_grain_params_present; +/// uint32_t : 1 timing_info_present_flag; +/// uint32_t : 1 initial_display_delay_present_flag; +/// uint32_t : 13 reserved; +/// } StdVideoAV1SequenceHeaderFlags; +/// ``` +public final class StdVideoAV1SequenceHeaderFlags extends Struct { + /// The struct layout of `StdVideoAV1SequenceHeaderFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("still_picture"), + ValueLayout.JAVA_INT.withName("reduced_still_picture_header"), + ValueLayout.JAVA_INT.withName("use_128x128_superblock"), + ValueLayout.JAVA_INT.withName("enable_filter_intra"), + ValueLayout.JAVA_INT.withName("enable_intra_edge_filter"), + ValueLayout.JAVA_INT.withName("enable_interintra_compound"), + ValueLayout.JAVA_INT.withName("enable_masked_compound"), + ValueLayout.JAVA_INT.withName("enable_warped_motion"), + ValueLayout.JAVA_INT.withName("enable_dual_filter"), + ValueLayout.JAVA_INT.withName("enable_order_hint"), + ValueLayout.JAVA_INT.withName("enable_jnt_comp"), + ValueLayout.JAVA_INT.withName("enable_ref_frame_mvs"), + ValueLayout.JAVA_INT.withName("frame_id_numbers_present_flag"), + ValueLayout.JAVA_INT.withName("enable_superres"), + ValueLayout.JAVA_INT.withName("enable_cdef"), + ValueLayout.JAVA_INT.withName("enable_restoration"), + ValueLayout.JAVA_INT.withName("film_grain_params_present"), + ValueLayout.JAVA_INT.withName("timing_info_present_flag"), + ValueLayout.JAVA_INT.withName("initial_display_delay_present_flag"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `still_picture` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_still_picture = LAYOUT.arrayElementVarHandle(PathElement.groupElement("still_picture")); + /// The [VarHandle] of `reduced_still_picture_header` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reduced_still_picture_header = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reduced_still_picture_header")); + /// The [VarHandle] of `use_128x128_superblock` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_use_128x128_superblock = LAYOUT.arrayElementVarHandle(PathElement.groupElement("use_128x128_superblock")); + /// The [VarHandle] of `enable_filter_intra` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_filter_intra = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_filter_intra")); + /// The [VarHandle] of `enable_intra_edge_filter` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_intra_edge_filter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_intra_edge_filter")); + /// The [VarHandle] of `enable_interintra_compound` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_interintra_compound = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_interintra_compound")); + /// The [VarHandle] of `enable_masked_compound` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_masked_compound = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_masked_compound")); + /// The [VarHandle] of `enable_warped_motion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_warped_motion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_warped_motion")); + /// The [VarHandle] of `enable_dual_filter` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_dual_filter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_dual_filter")); + /// The [VarHandle] of `enable_order_hint` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_order_hint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_order_hint")); + /// The [VarHandle] of `enable_jnt_comp` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_jnt_comp = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_jnt_comp")); + /// The [VarHandle] of `enable_ref_frame_mvs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_ref_frame_mvs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_ref_frame_mvs")); + /// The [VarHandle] of `frame_id_numbers_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_id_numbers_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_id_numbers_present_flag")); + /// The [VarHandle] of `enable_superres` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_superres = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_superres")); + /// The [VarHandle] of `enable_cdef` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_cdef = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_cdef")); + /// The [VarHandle] of `enable_restoration` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_enable_restoration = LAYOUT.arrayElementVarHandle(PathElement.groupElement("enable_restoration")); + /// The [VarHandle] of `film_grain_params_present` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_film_grain_params_present = LAYOUT.arrayElementVarHandle(PathElement.groupElement("film_grain_params_present")); + /// The [VarHandle] of `timing_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_timing_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timing_info_present_flag")); + /// The [VarHandle] of `initial_display_delay_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_initial_display_delay_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initial_display_delay_present_flag")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoAV1SequenceHeaderFlags` with the given segment. + /// @param segment the memory segment + public StdVideoAV1SequenceHeaderFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1SequenceHeaderFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1SequenceHeaderFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1SequenceHeaderFlags(segment); } + + /// Creates `StdVideoAV1SequenceHeaderFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1SequenceHeaderFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1SequenceHeaderFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1SequenceHeaderFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1SequenceHeaderFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1SequenceHeaderFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1SequenceHeaderFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1SequenceHeaderFlags` + public static StdVideoAV1SequenceHeaderFlags alloc(SegmentAllocator allocator) { return new StdVideoAV1SequenceHeaderFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1SequenceHeaderFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1SequenceHeaderFlags` + public static StdVideoAV1SequenceHeaderFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1SequenceHeaderFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `still_picture` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_still_picture(MemorySegment segment, long index) { return (int) VH_still_picture.get(segment, 0L, index); } + /// {@return `still_picture`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_still_picture(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_still_picture(segment, 0L); } + /// {@return `still_picture` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int still_pictureAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_still_picture(this.segment(), index); } + /// {@return `still_picture`} + public @CType("uint32_t : 1") int still_picture() { return StdVideoAV1SequenceHeaderFlags.get_still_picture(this.segment()); } + /// Sets `still_picture` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_still_picture(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_still_picture.set(segment, 0L, index, value); } + /// Sets `still_picture` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_still_picture(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_still_picture(segment, 0L, value); } + /// Sets `still_picture` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags still_pictureAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_still_picture(this.segment(), index, value); return this; } + /// Sets `still_picture` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags still_picture(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_still_picture(this.segment(), value); return this; } + + /// {@return `reduced_still_picture_header` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_reduced_still_picture_header(MemorySegment segment, long index) { return (int) VH_reduced_still_picture_header.get(segment, 0L, index); } + /// {@return `reduced_still_picture_header`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_reduced_still_picture_header(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_reduced_still_picture_header(segment, 0L); } + /// {@return `reduced_still_picture_header` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int reduced_still_picture_headerAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_reduced_still_picture_header(this.segment(), index); } + /// {@return `reduced_still_picture_header`} + public @CType("uint32_t : 1") int reduced_still_picture_header() { return StdVideoAV1SequenceHeaderFlags.get_reduced_still_picture_header(this.segment()); } + /// Sets `reduced_still_picture_header` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reduced_still_picture_header(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_reduced_still_picture_header.set(segment, 0L, index, value); } + /// Sets `reduced_still_picture_header` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reduced_still_picture_header(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_reduced_still_picture_header(segment, 0L, value); } + /// Sets `reduced_still_picture_header` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags reduced_still_picture_headerAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_reduced_still_picture_header(this.segment(), index, value); return this; } + /// Sets `reduced_still_picture_header` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags reduced_still_picture_header(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_reduced_still_picture_header(this.segment(), value); return this; } + + /// {@return `use_128x128_superblock` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_use_128x128_superblock(MemorySegment segment, long index) { return (int) VH_use_128x128_superblock.get(segment, 0L, index); } + /// {@return `use_128x128_superblock`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_use_128x128_superblock(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_use_128x128_superblock(segment, 0L); } + /// {@return `use_128x128_superblock` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int use_128x128_superblockAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_use_128x128_superblock(this.segment(), index); } + /// {@return `use_128x128_superblock`} + public @CType("uint32_t : 1") int use_128x128_superblock() { return StdVideoAV1SequenceHeaderFlags.get_use_128x128_superblock(this.segment()); } + /// Sets `use_128x128_superblock` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_use_128x128_superblock(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_use_128x128_superblock.set(segment, 0L, index, value); } + /// Sets `use_128x128_superblock` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_use_128x128_superblock(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_use_128x128_superblock(segment, 0L, value); } + /// Sets `use_128x128_superblock` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags use_128x128_superblockAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_use_128x128_superblock(this.segment(), index, value); return this; } + /// Sets `use_128x128_superblock` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags use_128x128_superblock(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_use_128x128_superblock(this.segment(), value); return this; } + + /// {@return `enable_filter_intra` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_filter_intra(MemorySegment segment, long index) { return (int) VH_enable_filter_intra.get(segment, 0L, index); } + /// {@return `enable_filter_intra`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_filter_intra(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_filter_intra(segment, 0L); } + /// {@return `enable_filter_intra` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_filter_intraAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_filter_intra(this.segment(), index); } + /// {@return `enable_filter_intra`} + public @CType("uint32_t : 1") int enable_filter_intra() { return StdVideoAV1SequenceHeaderFlags.get_enable_filter_intra(this.segment()); } + /// Sets `enable_filter_intra` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_filter_intra(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_filter_intra.set(segment, 0L, index, value); } + /// Sets `enable_filter_intra` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_filter_intra(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_filter_intra(segment, 0L, value); } + /// Sets `enable_filter_intra` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_filter_intraAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_filter_intra(this.segment(), index, value); return this; } + /// Sets `enable_filter_intra` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_filter_intra(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_filter_intra(this.segment(), value); return this; } + + /// {@return `enable_intra_edge_filter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_intra_edge_filter(MemorySegment segment, long index) { return (int) VH_enable_intra_edge_filter.get(segment, 0L, index); } + /// {@return `enable_intra_edge_filter`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_intra_edge_filter(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_intra_edge_filter(segment, 0L); } + /// {@return `enable_intra_edge_filter` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_intra_edge_filterAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_intra_edge_filter(this.segment(), index); } + /// {@return `enable_intra_edge_filter`} + public @CType("uint32_t : 1") int enable_intra_edge_filter() { return StdVideoAV1SequenceHeaderFlags.get_enable_intra_edge_filter(this.segment()); } + /// Sets `enable_intra_edge_filter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_intra_edge_filter(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_intra_edge_filter.set(segment, 0L, index, value); } + /// Sets `enable_intra_edge_filter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_intra_edge_filter(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_intra_edge_filter(segment, 0L, value); } + /// Sets `enable_intra_edge_filter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_intra_edge_filterAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_intra_edge_filter(this.segment(), index, value); return this; } + /// Sets `enable_intra_edge_filter` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_intra_edge_filter(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_intra_edge_filter(this.segment(), value); return this; } + + /// {@return `enable_interintra_compound` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_interintra_compound(MemorySegment segment, long index) { return (int) VH_enable_interintra_compound.get(segment, 0L, index); } + /// {@return `enable_interintra_compound`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_interintra_compound(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_interintra_compound(segment, 0L); } + /// {@return `enable_interintra_compound` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_interintra_compoundAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_interintra_compound(this.segment(), index); } + /// {@return `enable_interintra_compound`} + public @CType("uint32_t : 1") int enable_interintra_compound() { return StdVideoAV1SequenceHeaderFlags.get_enable_interintra_compound(this.segment()); } + /// Sets `enable_interintra_compound` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_interintra_compound(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_interintra_compound.set(segment, 0L, index, value); } + /// Sets `enable_interintra_compound` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_interintra_compound(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_interintra_compound(segment, 0L, value); } + /// Sets `enable_interintra_compound` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_interintra_compoundAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_interintra_compound(this.segment(), index, value); return this; } + /// Sets `enable_interintra_compound` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_interintra_compound(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_interintra_compound(this.segment(), value); return this; } + + /// {@return `enable_masked_compound` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_masked_compound(MemorySegment segment, long index) { return (int) VH_enable_masked_compound.get(segment, 0L, index); } + /// {@return `enable_masked_compound`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_masked_compound(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_masked_compound(segment, 0L); } + /// {@return `enable_masked_compound` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_masked_compoundAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_masked_compound(this.segment(), index); } + /// {@return `enable_masked_compound`} + public @CType("uint32_t : 1") int enable_masked_compound() { return StdVideoAV1SequenceHeaderFlags.get_enable_masked_compound(this.segment()); } + /// Sets `enable_masked_compound` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_masked_compound(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_masked_compound.set(segment, 0L, index, value); } + /// Sets `enable_masked_compound` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_masked_compound(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_masked_compound(segment, 0L, value); } + /// Sets `enable_masked_compound` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_masked_compoundAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_masked_compound(this.segment(), index, value); return this; } + /// Sets `enable_masked_compound` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_masked_compound(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_masked_compound(this.segment(), value); return this; } + + /// {@return `enable_warped_motion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_warped_motion(MemorySegment segment, long index) { return (int) VH_enable_warped_motion.get(segment, 0L, index); } + /// {@return `enable_warped_motion`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_warped_motion(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_warped_motion(segment, 0L); } + /// {@return `enable_warped_motion` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_warped_motionAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_warped_motion(this.segment(), index); } + /// {@return `enable_warped_motion`} + public @CType("uint32_t : 1") int enable_warped_motion() { return StdVideoAV1SequenceHeaderFlags.get_enable_warped_motion(this.segment()); } + /// Sets `enable_warped_motion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_warped_motion(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_warped_motion.set(segment, 0L, index, value); } + /// Sets `enable_warped_motion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_warped_motion(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_warped_motion(segment, 0L, value); } + /// Sets `enable_warped_motion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_warped_motionAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_warped_motion(this.segment(), index, value); return this; } + /// Sets `enable_warped_motion` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_warped_motion(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_warped_motion(this.segment(), value); return this; } + + /// {@return `enable_dual_filter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_dual_filter(MemorySegment segment, long index) { return (int) VH_enable_dual_filter.get(segment, 0L, index); } + /// {@return `enable_dual_filter`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_dual_filter(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_dual_filter(segment, 0L); } + /// {@return `enable_dual_filter` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_dual_filterAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_dual_filter(this.segment(), index); } + /// {@return `enable_dual_filter`} + public @CType("uint32_t : 1") int enable_dual_filter() { return StdVideoAV1SequenceHeaderFlags.get_enable_dual_filter(this.segment()); } + /// Sets `enable_dual_filter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_dual_filter(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_dual_filter.set(segment, 0L, index, value); } + /// Sets `enable_dual_filter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_dual_filter(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_dual_filter(segment, 0L, value); } + /// Sets `enable_dual_filter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_dual_filterAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_dual_filter(this.segment(), index, value); return this; } + /// Sets `enable_dual_filter` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_dual_filter(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_dual_filter(this.segment(), value); return this; } + + /// {@return `enable_order_hint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_order_hint(MemorySegment segment, long index) { return (int) VH_enable_order_hint.get(segment, 0L, index); } + /// {@return `enable_order_hint`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_order_hint(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_order_hint(segment, 0L); } + /// {@return `enable_order_hint` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_order_hintAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_order_hint(this.segment(), index); } + /// {@return `enable_order_hint`} + public @CType("uint32_t : 1") int enable_order_hint() { return StdVideoAV1SequenceHeaderFlags.get_enable_order_hint(this.segment()); } + /// Sets `enable_order_hint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_order_hint(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_order_hint.set(segment, 0L, index, value); } + /// Sets `enable_order_hint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_order_hint(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_order_hint(segment, 0L, value); } + /// Sets `enable_order_hint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_order_hintAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_order_hint(this.segment(), index, value); return this; } + /// Sets `enable_order_hint` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_order_hint(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_order_hint(this.segment(), value); return this; } + + /// {@return `enable_jnt_comp` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_jnt_comp(MemorySegment segment, long index) { return (int) VH_enable_jnt_comp.get(segment, 0L, index); } + /// {@return `enable_jnt_comp`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_jnt_comp(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_jnt_comp(segment, 0L); } + /// {@return `enable_jnt_comp` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_jnt_compAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_jnt_comp(this.segment(), index); } + /// {@return `enable_jnt_comp`} + public @CType("uint32_t : 1") int enable_jnt_comp() { return StdVideoAV1SequenceHeaderFlags.get_enable_jnt_comp(this.segment()); } + /// Sets `enable_jnt_comp` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_jnt_comp(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_jnt_comp.set(segment, 0L, index, value); } + /// Sets `enable_jnt_comp` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_jnt_comp(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_jnt_comp(segment, 0L, value); } + /// Sets `enable_jnt_comp` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_jnt_compAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_jnt_comp(this.segment(), index, value); return this; } + /// Sets `enable_jnt_comp` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_jnt_comp(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_jnt_comp(this.segment(), value); return this; } + + /// {@return `enable_ref_frame_mvs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_ref_frame_mvs(MemorySegment segment, long index) { return (int) VH_enable_ref_frame_mvs.get(segment, 0L, index); } + /// {@return `enable_ref_frame_mvs`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_ref_frame_mvs(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_ref_frame_mvs(segment, 0L); } + /// {@return `enable_ref_frame_mvs` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_ref_frame_mvsAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_ref_frame_mvs(this.segment(), index); } + /// {@return `enable_ref_frame_mvs`} + public @CType("uint32_t : 1") int enable_ref_frame_mvs() { return StdVideoAV1SequenceHeaderFlags.get_enable_ref_frame_mvs(this.segment()); } + /// Sets `enable_ref_frame_mvs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_ref_frame_mvs(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_ref_frame_mvs.set(segment, 0L, index, value); } + /// Sets `enable_ref_frame_mvs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_ref_frame_mvs(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_ref_frame_mvs(segment, 0L, value); } + /// Sets `enable_ref_frame_mvs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_ref_frame_mvsAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_ref_frame_mvs(this.segment(), index, value); return this; } + /// Sets `enable_ref_frame_mvs` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_ref_frame_mvs(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_ref_frame_mvs(this.segment(), value); return this; } + + /// {@return `frame_id_numbers_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_frame_id_numbers_present_flag(MemorySegment segment, long index) { return (int) VH_frame_id_numbers_present_flag.get(segment, 0L, index); } + /// {@return `frame_id_numbers_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_frame_id_numbers_present_flag(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_frame_id_numbers_present_flag(segment, 0L); } + /// {@return `frame_id_numbers_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int frame_id_numbers_present_flagAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_frame_id_numbers_present_flag(this.segment(), index); } + /// {@return `frame_id_numbers_present_flag`} + public @CType("uint32_t : 1") int frame_id_numbers_present_flag() { return StdVideoAV1SequenceHeaderFlags.get_frame_id_numbers_present_flag(this.segment()); } + /// Sets `frame_id_numbers_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_id_numbers_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_frame_id_numbers_present_flag.set(segment, 0L, index, value); } + /// Sets `frame_id_numbers_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_id_numbers_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_frame_id_numbers_present_flag(segment, 0L, value); } + /// Sets `frame_id_numbers_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags frame_id_numbers_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_frame_id_numbers_present_flag(this.segment(), index, value); return this; } + /// Sets `frame_id_numbers_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags frame_id_numbers_present_flag(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_frame_id_numbers_present_flag(this.segment(), value); return this; } + + /// {@return `enable_superres` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_superres(MemorySegment segment, long index) { return (int) VH_enable_superres.get(segment, 0L, index); } + /// {@return `enable_superres`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_superres(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_superres(segment, 0L); } + /// {@return `enable_superres` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_superresAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_superres(this.segment(), index); } + /// {@return `enable_superres`} + public @CType("uint32_t : 1") int enable_superres() { return StdVideoAV1SequenceHeaderFlags.get_enable_superres(this.segment()); } + /// Sets `enable_superres` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_superres(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_superres.set(segment, 0L, index, value); } + /// Sets `enable_superres` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_superres(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_superres(segment, 0L, value); } + /// Sets `enable_superres` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_superresAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_superres(this.segment(), index, value); return this; } + /// Sets `enable_superres` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_superres(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_superres(this.segment(), value); return this; } + + /// {@return `enable_cdef` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_cdef(MemorySegment segment, long index) { return (int) VH_enable_cdef.get(segment, 0L, index); } + /// {@return `enable_cdef`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_cdef(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_cdef(segment, 0L); } + /// {@return `enable_cdef` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_cdefAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_cdef(this.segment(), index); } + /// {@return `enable_cdef`} + public @CType("uint32_t : 1") int enable_cdef() { return StdVideoAV1SequenceHeaderFlags.get_enable_cdef(this.segment()); } + /// Sets `enable_cdef` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_cdef(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_cdef.set(segment, 0L, index, value); } + /// Sets `enable_cdef` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_cdef(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_cdef(segment, 0L, value); } + /// Sets `enable_cdef` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_cdefAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_cdef(this.segment(), index, value); return this; } + /// Sets `enable_cdef` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_cdef(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_cdef(this.segment(), value); return this; } + + /// {@return `enable_restoration` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_enable_restoration(MemorySegment segment, long index) { return (int) VH_enable_restoration.get(segment, 0L, index); } + /// {@return `enable_restoration`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_enable_restoration(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_enable_restoration(segment, 0L); } + /// {@return `enable_restoration` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int enable_restorationAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_enable_restoration(this.segment(), index); } + /// {@return `enable_restoration`} + public @CType("uint32_t : 1") int enable_restoration() { return StdVideoAV1SequenceHeaderFlags.get_enable_restoration(this.segment()); } + /// Sets `enable_restoration` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_enable_restoration(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_enable_restoration.set(segment, 0L, index, value); } + /// Sets `enable_restoration` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_enable_restoration(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_restoration(segment, 0L, value); } + /// Sets `enable_restoration` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_restorationAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_restoration(this.segment(), index, value); return this; } + /// Sets `enable_restoration` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags enable_restoration(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_enable_restoration(this.segment(), value); return this; } + + /// {@return `film_grain_params_present` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_film_grain_params_present(MemorySegment segment, long index) { return (int) VH_film_grain_params_present.get(segment, 0L, index); } + /// {@return `film_grain_params_present`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_film_grain_params_present(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_film_grain_params_present(segment, 0L); } + /// {@return `film_grain_params_present` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int film_grain_params_presentAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_film_grain_params_present(this.segment(), index); } + /// {@return `film_grain_params_present`} + public @CType("uint32_t : 1") int film_grain_params_present() { return StdVideoAV1SequenceHeaderFlags.get_film_grain_params_present(this.segment()); } + /// Sets `film_grain_params_present` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_film_grain_params_present(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_film_grain_params_present.set(segment, 0L, index, value); } + /// Sets `film_grain_params_present` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_film_grain_params_present(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_film_grain_params_present(segment, 0L, value); } + /// Sets `film_grain_params_present` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags film_grain_params_presentAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_film_grain_params_present(this.segment(), index, value); return this; } + /// Sets `film_grain_params_present` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags film_grain_params_present(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_film_grain_params_present(this.segment(), value); return this; } + + /// {@return `timing_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_timing_info_present_flag(MemorySegment segment, long index) { return (int) VH_timing_info_present_flag.get(segment, 0L, index); } + /// {@return `timing_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_timing_info_present_flag(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_timing_info_present_flag(segment, 0L); } + /// {@return `timing_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int timing_info_present_flagAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_timing_info_present_flag(this.segment(), index); } + /// {@return `timing_info_present_flag`} + public @CType("uint32_t : 1") int timing_info_present_flag() { return StdVideoAV1SequenceHeaderFlags.get_timing_info_present_flag(this.segment()); } + /// Sets `timing_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timing_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_timing_info_present_flag.set(segment, 0L, index, value); } + /// Sets `timing_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timing_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_timing_info_present_flag(segment, 0L, value); } + /// Sets `timing_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags timing_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_timing_info_present_flag(this.segment(), index, value); return this; } + /// Sets `timing_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags timing_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_timing_info_present_flag(this.segment(), value); return this; } + + /// {@return `initial_display_delay_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_initial_display_delay_present_flag(MemorySegment segment, long index) { return (int) VH_initial_display_delay_present_flag.get(segment, 0L, index); } + /// {@return `initial_display_delay_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_initial_display_delay_present_flag(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_initial_display_delay_present_flag(segment, 0L); } + /// {@return `initial_display_delay_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int initial_display_delay_present_flagAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_initial_display_delay_present_flag(this.segment(), index); } + /// {@return `initial_display_delay_present_flag`} + public @CType("uint32_t : 1") int initial_display_delay_present_flag() { return StdVideoAV1SequenceHeaderFlags.get_initial_display_delay_present_flag(this.segment()); } + /// Sets `initial_display_delay_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initial_display_delay_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_initial_display_delay_present_flag.set(segment, 0L, index, value); } + /// Sets `initial_display_delay_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initial_display_delay_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_initial_display_delay_present_flag(segment, 0L, value); } + /// Sets `initial_display_delay_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags initial_display_delay_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_initial_display_delay_present_flag(this.segment(), index, value); return this; } + /// Sets `initial_display_delay_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags initial_display_delay_present_flag(@CType("uint32_t : 1") int value) { StdVideoAV1SequenceHeaderFlags.set_initial_display_delay_present_flag(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 13") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 13") int get_reserved(MemorySegment segment) { return StdVideoAV1SequenceHeaderFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 13") int reservedAt(long index) { return StdVideoAV1SequenceHeaderFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 13") int reserved() { return StdVideoAV1SequenceHeaderFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 13") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 13") int value) { StdVideoAV1SequenceHeaderFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags reservedAt(long index, @CType("uint32_t : 13") int value) { StdVideoAV1SequenceHeaderFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1SequenceHeaderFlags reserved(@CType("uint32_t : 13") int value) { StdVideoAV1SequenceHeaderFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TileInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TileInfo.java new file mode 100644 index 00000000..ca6393a3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TileInfo.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### TileCols +/// [VarHandle][#VH_TileCols] - [Getter][#TileCols()] - [Setter][#TileCols(byte)] +/// ### TileRows +/// [VarHandle][#VH_TileRows] - [Getter][#TileRows()] - [Setter][#TileRows(byte)] +/// ### context_update_tile_id +/// [VarHandle][#VH_context_update_tile_id] - [Getter][#context_update_tile_id()] - [Setter][#context_update_tile_id(short)] +/// ### tile_size_bytes_minus_1 +/// [VarHandle][#VH_tile_size_bytes_minus_1] - [Getter][#tile_size_bytes_minus_1()] - [Setter][#tile_size_bytes_minus_1(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### pMiColStarts +/// [VarHandle][#VH_pMiColStarts] - [Getter][#pMiColStarts()] - [Setter][#pMiColStarts(java.lang.foreign.MemorySegment)] +/// ### pMiRowStarts +/// [VarHandle][#VH_pMiRowStarts] - [Getter][#pMiRowStarts()] - [Setter][#pMiRowStarts(java.lang.foreign.MemorySegment)] +/// ### pWidthInSbsMinus1 +/// [VarHandle][#VH_pWidthInSbsMinus1] - [Getter][#pWidthInSbsMinus1()] - [Setter][#pWidthInSbsMinus1(java.lang.foreign.MemorySegment)] +/// ### pHeightInSbsMinus1 +/// [VarHandle][#VH_pHeightInSbsMinus1] - [Getter][#pHeightInSbsMinus1()] - [Setter][#pHeightInSbsMinus1(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1TileInfo { +/// StdVideoAV1TileInfoFlags flags; +/// uint8_t TileCols; +/// uint8_t TileRows; +/// uint16_t context_update_tile_id; +/// uint8_t tile_size_bytes_minus_1; +/// uint8_t [7] reserved1; +/// const uint16_t * pMiColStarts; +/// const uint16_t * pMiRowStarts; +/// const uint16_t * pWidthInSbsMinus1; +/// const uint16_t * pHeightInSbsMinus1; +/// } StdVideoAV1TileInfo; +/// ``` +public final class StdVideoAV1TileInfo extends Struct { + /// The struct layout of `StdVideoAV1TileInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoAV1TileInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("TileCols"), + ValueLayout.JAVA_BYTE.withName("TileRows"), + ValueLayout.JAVA_SHORT.withName("context_update_tile_id"), + ValueLayout.JAVA_BYTE.withName("tile_size_bytes_minus_1"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.ADDRESS.withName("pMiColStarts"), + ValueLayout.ADDRESS.withName("pMiRowStarts"), + ValueLayout.ADDRESS.withName("pWidthInSbsMinus1"), + ValueLayout.ADDRESS.withName("pHeightInSbsMinus1") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `TileCols` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_TileCols = LAYOUT.arrayElementVarHandle(PathElement.groupElement("TileCols")); + /// The [VarHandle] of `TileRows` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_TileRows = LAYOUT.arrayElementVarHandle(PathElement.groupElement("TileRows")); + /// The [VarHandle] of `context_update_tile_id` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_context_update_tile_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("context_update_tile_id")); + /// The [VarHandle] of `tile_size_bytes_minus_1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_tile_size_bytes_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tile_size_bytes_minus_1")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `pMiColStarts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pMiColStarts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pMiColStarts")); + /// The [VarHandle] of `pMiRowStarts` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pMiRowStarts = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pMiRowStarts")); + /// The [VarHandle] of `pWidthInSbsMinus1` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWidthInSbsMinus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWidthInSbsMinus1")); + /// The [VarHandle] of `pHeightInSbsMinus1` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pHeightInSbsMinus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pHeightInSbsMinus1")); + + /// Creates `StdVideoAV1TileInfo` with the given segment. + /// @param segment the memory segment + public StdVideoAV1TileInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1TileInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TileInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TileInfo(segment); } + + /// Creates `StdVideoAV1TileInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TileInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TileInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1TileInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TileInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TileInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1TileInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1TileInfo` + public static StdVideoAV1TileInfo alloc(SegmentAllocator allocator) { return new StdVideoAV1TileInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1TileInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1TileInfo` + public static StdVideoAV1TileInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1TileInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1TileInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1TileInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoAV1TileInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoAV1TileInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoAV1TileInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoAV1TileInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoAV1TileInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoAV1TileInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoAV1TileInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo flagsAt(long index, @CType("StdVideoAV1TileInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo flags(@CType("StdVideoAV1TileInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_flags(this.segment(), value); return this; } + + /// {@return `TileCols` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_TileCols(MemorySegment segment, long index) { return (byte) VH_TileCols.get(segment, 0L, index); } + /// {@return `TileCols`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_TileCols(MemorySegment segment) { return StdVideoAV1TileInfo.get_TileCols(segment, 0L); } + /// {@return `TileCols` at the given index} + /// @param index the index + public @CType("uint8_t") byte TileColsAt(long index) { return StdVideoAV1TileInfo.get_TileCols(this.segment(), index); } + /// {@return `TileCols`} + public @CType("uint8_t") byte TileCols() { return StdVideoAV1TileInfo.get_TileCols(this.segment()); } + /// Sets `TileCols` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_TileCols(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_TileCols.set(segment, 0L, index, value); } + /// Sets `TileCols` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_TileCols(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1TileInfo.set_TileCols(segment, 0L, value); } + /// Sets `TileCols` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo TileColsAt(long index, @CType("uint8_t") byte value) { StdVideoAV1TileInfo.set_TileCols(this.segment(), index, value); return this; } + /// Sets `TileCols` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo TileCols(@CType("uint8_t") byte value) { StdVideoAV1TileInfo.set_TileCols(this.segment(), value); return this; } + + /// {@return `TileRows` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_TileRows(MemorySegment segment, long index) { return (byte) VH_TileRows.get(segment, 0L, index); } + /// {@return `TileRows`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_TileRows(MemorySegment segment) { return StdVideoAV1TileInfo.get_TileRows(segment, 0L); } + /// {@return `TileRows` at the given index} + /// @param index the index + public @CType("uint8_t") byte TileRowsAt(long index) { return StdVideoAV1TileInfo.get_TileRows(this.segment(), index); } + /// {@return `TileRows`} + public @CType("uint8_t") byte TileRows() { return StdVideoAV1TileInfo.get_TileRows(this.segment()); } + /// Sets `TileRows` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_TileRows(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_TileRows.set(segment, 0L, index, value); } + /// Sets `TileRows` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_TileRows(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1TileInfo.set_TileRows(segment, 0L, value); } + /// Sets `TileRows` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo TileRowsAt(long index, @CType("uint8_t") byte value) { StdVideoAV1TileInfo.set_TileRows(this.segment(), index, value); return this; } + /// Sets `TileRows` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo TileRows(@CType("uint8_t") byte value) { StdVideoAV1TileInfo.set_TileRows(this.segment(), value); return this; } + + /// {@return `context_update_tile_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_context_update_tile_id(MemorySegment segment, long index) { return (short) VH_context_update_tile_id.get(segment, 0L, index); } + /// {@return `context_update_tile_id`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_context_update_tile_id(MemorySegment segment) { return StdVideoAV1TileInfo.get_context_update_tile_id(segment, 0L); } + /// {@return `context_update_tile_id` at the given index} + /// @param index the index + public @CType("uint16_t") short context_update_tile_idAt(long index) { return StdVideoAV1TileInfo.get_context_update_tile_id(this.segment(), index); } + /// {@return `context_update_tile_id`} + public @CType("uint16_t") short context_update_tile_id() { return StdVideoAV1TileInfo.get_context_update_tile_id(this.segment()); } + /// Sets `context_update_tile_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_context_update_tile_id(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_context_update_tile_id.set(segment, 0L, index, value); } + /// Sets `context_update_tile_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_context_update_tile_id(MemorySegment segment, @CType("uint16_t") short value) { StdVideoAV1TileInfo.set_context_update_tile_id(segment, 0L, value); } + /// Sets `context_update_tile_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo context_update_tile_idAt(long index, @CType("uint16_t") short value) { StdVideoAV1TileInfo.set_context_update_tile_id(this.segment(), index, value); return this; } + /// Sets `context_update_tile_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo context_update_tile_id(@CType("uint16_t") short value) { StdVideoAV1TileInfo.set_context_update_tile_id(this.segment(), value); return this; } + + /// {@return `tile_size_bytes_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_tile_size_bytes_minus_1(MemorySegment segment, long index) { return (byte) VH_tile_size_bytes_minus_1.get(segment, 0L, index); } + /// {@return `tile_size_bytes_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_tile_size_bytes_minus_1(MemorySegment segment) { return StdVideoAV1TileInfo.get_tile_size_bytes_minus_1(segment, 0L); } + /// {@return `tile_size_bytes_minus_1` at the given index} + /// @param index the index + public @CType("uint8_t") byte tile_size_bytes_minus_1At(long index) { return StdVideoAV1TileInfo.get_tile_size_bytes_minus_1(this.segment(), index); } + /// {@return `tile_size_bytes_minus_1`} + public @CType("uint8_t") byte tile_size_bytes_minus_1() { return StdVideoAV1TileInfo.get_tile_size_bytes_minus_1(this.segment()); } + /// Sets `tile_size_bytes_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tile_size_bytes_minus_1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_tile_size_bytes_minus_1.set(segment, 0L, index, value); } + /// Sets `tile_size_bytes_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tile_size_bytes_minus_1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoAV1TileInfo.set_tile_size_bytes_minus_1(segment, 0L, value); } + /// Sets `tile_size_bytes_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo tile_size_bytes_minus_1At(long index, @CType("uint8_t") byte value) { StdVideoAV1TileInfo.set_tile_size_bytes_minus_1(this.segment(), index, value); return this; } + /// Sets `tile_size_bytes_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo tile_size_bytes_minus_1(@CType("uint8_t") byte value) { StdVideoAV1TileInfo.set_tile_size_bytes_minus_1(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [7]") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [7]") byte get_reserved1(MemorySegment segment) { return StdVideoAV1TileInfo.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t [7]") byte reserved1At(long index) { return StdVideoAV1TileInfo.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t [7]") byte reserved1() { return StdVideoAV1TileInfo.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t [7]") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t [7]") byte value) { StdVideoAV1TileInfo.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo reserved1At(long index, @CType("uint8_t [7]") byte value) { StdVideoAV1TileInfo.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo reserved1(@CType("uint8_t [7]") byte value) { StdVideoAV1TileInfo.set_reserved1(this.segment(), value); return this; } + + /// {@return `pMiColStarts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint16_t *") java.lang.foreign.MemorySegment get_pMiColStarts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pMiColStarts.get(segment, 0L, index); } + /// {@return `pMiColStarts`} + /// @param segment the segment of the struct + public static @CType("const uint16_t *") java.lang.foreign.MemorySegment get_pMiColStarts(MemorySegment segment) { return StdVideoAV1TileInfo.get_pMiColStarts(segment, 0L); } + /// {@return `pMiColStarts` at the given index} + /// @param index the index + public @CType("const uint16_t *") java.lang.foreign.MemorySegment pMiColStartsAt(long index) { return StdVideoAV1TileInfo.get_pMiColStarts(this.segment(), index); } + /// {@return `pMiColStarts`} + public @CType("const uint16_t *") java.lang.foreign.MemorySegment pMiColStarts() { return StdVideoAV1TileInfo.get_pMiColStarts(this.segment()); } + /// Sets `pMiColStarts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pMiColStarts(MemorySegment segment, long index, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { VH_pMiColStarts.set(segment, 0L, index, value); } + /// Sets `pMiColStarts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pMiColStarts(MemorySegment segment, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pMiColStarts(segment, 0L, value); } + /// Sets `pMiColStarts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo pMiColStartsAt(long index, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pMiColStarts(this.segment(), index, value); return this; } + /// Sets `pMiColStarts` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo pMiColStarts(@CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pMiColStarts(this.segment(), value); return this; } + + /// {@return `pMiRowStarts` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint16_t *") java.lang.foreign.MemorySegment get_pMiRowStarts(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pMiRowStarts.get(segment, 0L, index); } + /// {@return `pMiRowStarts`} + /// @param segment the segment of the struct + public static @CType("const uint16_t *") java.lang.foreign.MemorySegment get_pMiRowStarts(MemorySegment segment) { return StdVideoAV1TileInfo.get_pMiRowStarts(segment, 0L); } + /// {@return `pMiRowStarts` at the given index} + /// @param index the index + public @CType("const uint16_t *") java.lang.foreign.MemorySegment pMiRowStartsAt(long index) { return StdVideoAV1TileInfo.get_pMiRowStarts(this.segment(), index); } + /// {@return `pMiRowStarts`} + public @CType("const uint16_t *") java.lang.foreign.MemorySegment pMiRowStarts() { return StdVideoAV1TileInfo.get_pMiRowStarts(this.segment()); } + /// Sets `pMiRowStarts` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pMiRowStarts(MemorySegment segment, long index, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { VH_pMiRowStarts.set(segment, 0L, index, value); } + /// Sets `pMiRowStarts` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pMiRowStarts(MemorySegment segment, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pMiRowStarts(segment, 0L, value); } + /// Sets `pMiRowStarts` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo pMiRowStartsAt(long index, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pMiRowStarts(this.segment(), index, value); return this; } + /// Sets `pMiRowStarts` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo pMiRowStarts(@CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pMiRowStarts(this.segment(), value); return this; } + + /// {@return `pWidthInSbsMinus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint16_t *") java.lang.foreign.MemorySegment get_pWidthInSbsMinus1(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWidthInSbsMinus1.get(segment, 0L, index); } + /// {@return `pWidthInSbsMinus1`} + /// @param segment the segment of the struct + public static @CType("const uint16_t *") java.lang.foreign.MemorySegment get_pWidthInSbsMinus1(MemorySegment segment) { return StdVideoAV1TileInfo.get_pWidthInSbsMinus1(segment, 0L); } + /// {@return `pWidthInSbsMinus1` at the given index} + /// @param index the index + public @CType("const uint16_t *") java.lang.foreign.MemorySegment pWidthInSbsMinus1At(long index) { return StdVideoAV1TileInfo.get_pWidthInSbsMinus1(this.segment(), index); } + /// {@return `pWidthInSbsMinus1`} + public @CType("const uint16_t *") java.lang.foreign.MemorySegment pWidthInSbsMinus1() { return StdVideoAV1TileInfo.get_pWidthInSbsMinus1(this.segment()); } + /// Sets `pWidthInSbsMinus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWidthInSbsMinus1(MemorySegment segment, long index, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { VH_pWidthInSbsMinus1.set(segment, 0L, index, value); } + /// Sets `pWidthInSbsMinus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWidthInSbsMinus1(MemorySegment segment, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pWidthInSbsMinus1(segment, 0L, value); } + /// Sets `pWidthInSbsMinus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo pWidthInSbsMinus1At(long index, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pWidthInSbsMinus1(this.segment(), index, value); return this; } + /// Sets `pWidthInSbsMinus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo pWidthInSbsMinus1(@CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pWidthInSbsMinus1(this.segment(), value); return this; } + + /// {@return `pHeightInSbsMinus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint16_t *") java.lang.foreign.MemorySegment get_pHeightInSbsMinus1(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pHeightInSbsMinus1.get(segment, 0L, index); } + /// {@return `pHeightInSbsMinus1`} + /// @param segment the segment of the struct + public static @CType("const uint16_t *") java.lang.foreign.MemorySegment get_pHeightInSbsMinus1(MemorySegment segment) { return StdVideoAV1TileInfo.get_pHeightInSbsMinus1(segment, 0L); } + /// {@return `pHeightInSbsMinus1` at the given index} + /// @param index the index + public @CType("const uint16_t *") java.lang.foreign.MemorySegment pHeightInSbsMinus1At(long index) { return StdVideoAV1TileInfo.get_pHeightInSbsMinus1(this.segment(), index); } + /// {@return `pHeightInSbsMinus1`} + public @CType("const uint16_t *") java.lang.foreign.MemorySegment pHeightInSbsMinus1() { return StdVideoAV1TileInfo.get_pHeightInSbsMinus1(this.segment()); } + /// Sets `pHeightInSbsMinus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pHeightInSbsMinus1(MemorySegment segment, long index, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { VH_pHeightInSbsMinus1.set(segment, 0L, index, value); } + /// Sets `pHeightInSbsMinus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pHeightInSbsMinus1(MemorySegment segment, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pHeightInSbsMinus1(segment, 0L, value); } + /// Sets `pHeightInSbsMinus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo pHeightInSbsMinus1At(long index, @CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pHeightInSbsMinus1(this.segment(), index, value); return this; } + /// Sets `pHeightInSbsMinus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfo pHeightInSbsMinus1(@CType("const uint16_t *") java.lang.foreign.MemorySegment value) { StdVideoAV1TileInfo.set_pHeightInSbsMinus1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TileInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TileInfoFlags.java new file mode 100644 index 00000000..e73f16e9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TileInfoFlags.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### uniform_tile_spacing_flag +/// [VarHandle][#VH_uniform_tile_spacing_flag] - [Getter][#uniform_tile_spacing_flag()] - [Setter][#uniform_tile_spacing_flag(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1TileInfoFlags { +/// uint32_t : 1 uniform_tile_spacing_flag; +/// uint32_t : 31 reserved; +/// } StdVideoAV1TileInfoFlags; +/// ``` +public final class StdVideoAV1TileInfoFlags extends Struct { + /// The struct layout of `StdVideoAV1TileInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("uniform_tile_spacing_flag"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `uniform_tile_spacing_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniform_tile_spacing_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniform_tile_spacing_flag")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoAV1TileInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoAV1TileInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1TileInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TileInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TileInfoFlags(segment); } + + /// Creates `StdVideoAV1TileInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TileInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TileInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1TileInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TileInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TileInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1TileInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1TileInfoFlags` + public static StdVideoAV1TileInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoAV1TileInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1TileInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1TileInfoFlags` + public static StdVideoAV1TileInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1TileInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `uniform_tile_spacing_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_uniform_tile_spacing_flag(MemorySegment segment, long index) { return (int) VH_uniform_tile_spacing_flag.get(segment, 0L, index); } + /// {@return `uniform_tile_spacing_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_uniform_tile_spacing_flag(MemorySegment segment) { return StdVideoAV1TileInfoFlags.get_uniform_tile_spacing_flag(segment, 0L); } + /// {@return `uniform_tile_spacing_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int uniform_tile_spacing_flagAt(long index) { return StdVideoAV1TileInfoFlags.get_uniform_tile_spacing_flag(this.segment(), index); } + /// {@return `uniform_tile_spacing_flag`} + public @CType("uint32_t : 1") int uniform_tile_spacing_flag() { return StdVideoAV1TileInfoFlags.get_uniform_tile_spacing_flag(this.segment()); } + /// Sets `uniform_tile_spacing_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniform_tile_spacing_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_uniform_tile_spacing_flag.set(segment, 0L, index, value); } + /// Sets `uniform_tile_spacing_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniform_tile_spacing_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1TileInfoFlags.set_uniform_tile_spacing_flag(segment, 0L, value); } + /// Sets `uniform_tile_spacing_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfoFlags uniform_tile_spacing_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1TileInfoFlags.set_uniform_tile_spacing_flag(this.segment(), index, value); return this; } + /// Sets `uniform_tile_spacing_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfoFlags uniform_tile_spacing_flag(@CType("uint32_t : 1") int value) { StdVideoAV1TileInfoFlags.set_uniform_tile_spacing_flag(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 31") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 31") int get_reserved(MemorySegment segment) { return StdVideoAV1TileInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 31") int reservedAt(long index) { return StdVideoAV1TileInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 31") int reserved() { return StdVideoAV1TileInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 31") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 31") int value) { StdVideoAV1TileInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfoFlags reservedAt(long index, @CType("uint32_t : 31") int value) { StdVideoAV1TileInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TileInfoFlags reserved(@CType("uint32_t : 31") int value) { StdVideoAV1TileInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TimingInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TimingInfo.java new file mode 100644 index 00000000..0fea9165 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TimingInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### num_units_in_display_tick +/// [VarHandle][#VH_num_units_in_display_tick] - [Getter][#num_units_in_display_tick()] - [Setter][#num_units_in_display_tick(int)] +/// ### time_scale +/// [VarHandle][#VH_time_scale] - [Getter][#time_scale()] - [Setter][#time_scale(int)] +/// ### num_ticks_per_picture_minus_1 +/// [VarHandle][#VH_num_ticks_per_picture_minus_1] - [Getter][#num_ticks_per_picture_minus_1()] - [Setter][#num_ticks_per_picture_minus_1(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1TimingInfo { +/// StdVideoAV1TimingInfoFlags flags; +/// uint32_t num_units_in_display_tick; +/// uint32_t time_scale; +/// uint32_t num_ticks_per_picture_minus_1; +/// } StdVideoAV1TimingInfo; +/// ``` +public final class StdVideoAV1TimingInfo extends Struct { + /// The struct layout of `StdVideoAV1TimingInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoAV1TimingInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("num_units_in_display_tick"), + ValueLayout.JAVA_INT.withName("time_scale"), + ValueLayout.JAVA_INT.withName("num_ticks_per_picture_minus_1") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `num_units_in_display_tick` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_num_units_in_display_tick = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_units_in_display_tick")); + /// The [VarHandle] of `time_scale` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_time_scale = LAYOUT.arrayElementVarHandle(PathElement.groupElement("time_scale")); + /// The [VarHandle] of `num_ticks_per_picture_minus_1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_num_ticks_per_picture_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ticks_per_picture_minus_1")); + + /// Creates `StdVideoAV1TimingInfo` with the given segment. + /// @param segment the memory segment + public StdVideoAV1TimingInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1TimingInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TimingInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TimingInfo(segment); } + + /// Creates `StdVideoAV1TimingInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TimingInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TimingInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1TimingInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TimingInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TimingInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1TimingInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1TimingInfo` + public static StdVideoAV1TimingInfo alloc(SegmentAllocator allocator) { return new StdVideoAV1TimingInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1TimingInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1TimingInfo` + public static StdVideoAV1TimingInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1TimingInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1TimingInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1TimingInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoAV1TimingInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoAV1TimingInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoAV1TimingInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoAV1TimingInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoAV1TimingInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoAV1TimingInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoAV1TimingInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1TimingInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfo flagsAt(long index, @CType("StdVideoAV1TimingInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1TimingInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfo flags(@CType("StdVideoAV1TimingInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoAV1TimingInfo.set_flags(this.segment(), value); return this; } + + /// {@return `num_units_in_display_tick` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_num_units_in_display_tick(MemorySegment segment, long index) { return (int) VH_num_units_in_display_tick.get(segment, 0L, index); } + /// {@return `num_units_in_display_tick`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_num_units_in_display_tick(MemorySegment segment) { return StdVideoAV1TimingInfo.get_num_units_in_display_tick(segment, 0L); } + /// {@return `num_units_in_display_tick` at the given index} + /// @param index the index + public @CType("uint32_t") int num_units_in_display_tickAt(long index) { return StdVideoAV1TimingInfo.get_num_units_in_display_tick(this.segment(), index); } + /// {@return `num_units_in_display_tick`} + public @CType("uint32_t") int num_units_in_display_tick() { return StdVideoAV1TimingInfo.get_num_units_in_display_tick(this.segment()); } + /// Sets `num_units_in_display_tick` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_units_in_display_tick(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_num_units_in_display_tick.set(segment, 0L, index, value); } + /// Sets `num_units_in_display_tick` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_units_in_display_tick(MemorySegment segment, @CType("uint32_t") int value) { StdVideoAV1TimingInfo.set_num_units_in_display_tick(segment, 0L, value); } + /// Sets `num_units_in_display_tick` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfo num_units_in_display_tickAt(long index, @CType("uint32_t") int value) { StdVideoAV1TimingInfo.set_num_units_in_display_tick(this.segment(), index, value); return this; } + /// Sets `num_units_in_display_tick` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfo num_units_in_display_tick(@CType("uint32_t") int value) { StdVideoAV1TimingInfo.set_num_units_in_display_tick(this.segment(), value); return this; } + + /// {@return `time_scale` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_time_scale(MemorySegment segment, long index) { return (int) VH_time_scale.get(segment, 0L, index); } + /// {@return `time_scale`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_time_scale(MemorySegment segment) { return StdVideoAV1TimingInfo.get_time_scale(segment, 0L); } + /// {@return `time_scale` at the given index} + /// @param index the index + public @CType("uint32_t") int time_scaleAt(long index) { return StdVideoAV1TimingInfo.get_time_scale(this.segment(), index); } + /// {@return `time_scale`} + public @CType("uint32_t") int time_scale() { return StdVideoAV1TimingInfo.get_time_scale(this.segment()); } + /// Sets `time_scale` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_time_scale(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_time_scale.set(segment, 0L, index, value); } + /// Sets `time_scale` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_time_scale(MemorySegment segment, @CType("uint32_t") int value) { StdVideoAV1TimingInfo.set_time_scale(segment, 0L, value); } + /// Sets `time_scale` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfo time_scaleAt(long index, @CType("uint32_t") int value) { StdVideoAV1TimingInfo.set_time_scale(this.segment(), index, value); return this; } + /// Sets `time_scale` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfo time_scale(@CType("uint32_t") int value) { StdVideoAV1TimingInfo.set_time_scale(this.segment(), value); return this; } + + /// {@return `num_ticks_per_picture_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_num_ticks_per_picture_minus_1(MemorySegment segment, long index) { return (int) VH_num_ticks_per_picture_minus_1.get(segment, 0L, index); } + /// {@return `num_ticks_per_picture_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_num_ticks_per_picture_minus_1(MemorySegment segment) { return StdVideoAV1TimingInfo.get_num_ticks_per_picture_minus_1(segment, 0L); } + /// {@return `num_ticks_per_picture_minus_1` at the given index} + /// @param index the index + public @CType("uint32_t") int num_ticks_per_picture_minus_1At(long index) { return StdVideoAV1TimingInfo.get_num_ticks_per_picture_minus_1(this.segment(), index); } + /// {@return `num_ticks_per_picture_minus_1`} + public @CType("uint32_t") int num_ticks_per_picture_minus_1() { return StdVideoAV1TimingInfo.get_num_ticks_per_picture_minus_1(this.segment()); } + /// Sets `num_ticks_per_picture_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ticks_per_picture_minus_1(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_num_ticks_per_picture_minus_1.set(segment, 0L, index, value); } + /// Sets `num_ticks_per_picture_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ticks_per_picture_minus_1(MemorySegment segment, @CType("uint32_t") int value) { StdVideoAV1TimingInfo.set_num_ticks_per_picture_minus_1(segment, 0L, value); } + /// Sets `num_ticks_per_picture_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfo num_ticks_per_picture_minus_1At(long index, @CType("uint32_t") int value) { StdVideoAV1TimingInfo.set_num_ticks_per_picture_minus_1(this.segment(), index, value); return this; } + /// Sets `num_ticks_per_picture_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfo num_ticks_per_picture_minus_1(@CType("uint32_t") int value) { StdVideoAV1TimingInfo.set_num_ticks_per_picture_minus_1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TimingInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TimingInfoFlags.java new file mode 100644 index 00000000..125e0ba9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoAV1TimingInfoFlags.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### equal_picture_interval +/// [VarHandle][#VH_equal_picture_interval] - [Getter][#equal_picture_interval()] - [Setter][#equal_picture_interval(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoAV1TimingInfoFlags { +/// uint32_t : 1 equal_picture_interval; +/// uint32_t : 31 reserved; +/// } StdVideoAV1TimingInfoFlags; +/// ``` +public final class StdVideoAV1TimingInfoFlags extends Struct { + /// The struct layout of `StdVideoAV1TimingInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("equal_picture_interval"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `equal_picture_interval` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_equal_picture_interval = LAYOUT.arrayElementVarHandle(PathElement.groupElement("equal_picture_interval")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoAV1TimingInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoAV1TimingInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoAV1TimingInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TimingInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TimingInfoFlags(segment); } + + /// Creates `StdVideoAV1TimingInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TimingInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TimingInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoAV1TimingInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoAV1TimingInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoAV1TimingInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoAV1TimingInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoAV1TimingInfoFlags` + public static StdVideoAV1TimingInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoAV1TimingInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoAV1TimingInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoAV1TimingInfoFlags` + public static StdVideoAV1TimingInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoAV1TimingInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `equal_picture_interval` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_equal_picture_interval(MemorySegment segment, long index) { return (int) VH_equal_picture_interval.get(segment, 0L, index); } + /// {@return `equal_picture_interval`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_equal_picture_interval(MemorySegment segment) { return StdVideoAV1TimingInfoFlags.get_equal_picture_interval(segment, 0L); } + /// {@return `equal_picture_interval` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int equal_picture_intervalAt(long index) { return StdVideoAV1TimingInfoFlags.get_equal_picture_interval(this.segment(), index); } + /// {@return `equal_picture_interval`} + public @CType("uint32_t : 1") int equal_picture_interval() { return StdVideoAV1TimingInfoFlags.get_equal_picture_interval(this.segment()); } + /// Sets `equal_picture_interval` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_equal_picture_interval(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_equal_picture_interval.set(segment, 0L, index, value); } + /// Sets `equal_picture_interval` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_equal_picture_interval(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoAV1TimingInfoFlags.set_equal_picture_interval(segment, 0L, value); } + /// Sets `equal_picture_interval` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfoFlags equal_picture_intervalAt(long index, @CType("uint32_t : 1") int value) { StdVideoAV1TimingInfoFlags.set_equal_picture_interval(this.segment(), index, value); return this; } + /// Sets `equal_picture_interval` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfoFlags equal_picture_interval(@CType("uint32_t : 1") int value) { StdVideoAV1TimingInfoFlags.set_equal_picture_interval(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 31") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 31") int get_reserved(MemorySegment segment) { return StdVideoAV1TimingInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 31") int reservedAt(long index) { return StdVideoAV1TimingInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 31") int reserved() { return StdVideoAV1TimingInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 31") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 31") int value) { StdVideoAV1TimingInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfoFlags reservedAt(long index, @CType("uint32_t : 31") int value) { StdVideoAV1TimingInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoAV1TimingInfoFlags reserved(@CType("uint32_t : 31") int value) { StdVideoAV1TimingInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1PictureInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1PictureInfo.java new file mode 100644 index 00000000..f0311723 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1PictureInfo.java @@ -0,0 +1,962 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### frame_type +/// [VarHandle][#VH_frame_type] - [Getter][#frame_type()] - [Setter][#frame_type(int)] +/// ### current_frame_id +/// [VarHandle][#VH_current_frame_id] - [Getter][#current_frame_id()] - [Setter][#current_frame_id(int)] +/// ### OrderHint +/// [VarHandle][#VH_OrderHint] - [Getter][#OrderHint()] - [Setter][#OrderHint(byte)] +/// ### primary_ref_frame +/// [VarHandle][#VH_primary_ref_frame] - [Getter][#primary_ref_frame()] - [Setter][#primary_ref_frame(byte)] +/// ### refresh_frame_flags +/// [VarHandle][#VH_refresh_frame_flags] - [Getter][#refresh_frame_flags()] - [Setter][#refresh_frame_flags(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### interpolation_filter +/// [VarHandle][#VH_interpolation_filter] - [Getter][#interpolation_filter()] - [Setter][#interpolation_filter(int)] +/// ### TxMode +/// [VarHandle][#VH_TxMode] - [Getter][#TxMode()] - [Setter][#TxMode(int)] +/// ### delta_q_res +/// [VarHandle][#VH_delta_q_res] - [Getter][#delta_q_res()] - [Setter][#delta_q_res(byte)] +/// ### delta_lf_res +/// [VarHandle][#VH_delta_lf_res] - [Getter][#delta_lf_res()] - [Setter][#delta_lf_res(byte)] +/// ### SkipModeFrame +/// [VarHandle][#VH_SkipModeFrame] - [Getter][#SkipModeFrame()] - [Setter][#SkipModeFrame(byte)] +/// ### coded_denom +/// [VarHandle][#VH_coded_denom] - [Getter][#coded_denom()] - [Setter][#coded_denom(byte)] +/// ### reserved2 +/// [VarHandle][#VH_reserved2] - [Getter][#reserved2()] - [Setter][#reserved2(byte)] +/// ### OrderHints +/// [VarHandle][#VH_OrderHints] - [Getter][#OrderHints()] - [Setter][#OrderHints(byte)] +/// ### expectedFrameId +/// [VarHandle][#VH_expectedFrameId] - [Getter][#expectedFrameId()] - [Setter][#expectedFrameId(int)] +/// ### pTileInfo +/// [VarHandle][#VH_pTileInfo] - [Getter][#pTileInfo()] - [Setter][#pTileInfo(java.lang.foreign.MemorySegment)] +/// ### pQuantization +/// [VarHandle][#VH_pQuantization] - [Getter][#pQuantization()] - [Setter][#pQuantization(java.lang.foreign.MemorySegment)] +/// ### pSegmentation +/// [VarHandle][#VH_pSegmentation] - [Getter][#pSegmentation()] - [Setter][#pSegmentation(java.lang.foreign.MemorySegment)] +/// ### pLoopFilter +/// [VarHandle][#VH_pLoopFilter] - [Getter][#pLoopFilter()] - [Setter][#pLoopFilter(java.lang.foreign.MemorySegment)] +/// ### pCDEF +/// [VarHandle][#VH_pCDEF] - [Getter][#pCDEF()] - [Setter][#pCDEF(java.lang.foreign.MemorySegment)] +/// ### pLoopRestoration +/// [VarHandle][#VH_pLoopRestoration] - [Getter][#pLoopRestoration()] - [Setter][#pLoopRestoration(java.lang.foreign.MemorySegment)] +/// ### pGlobalMotion +/// [VarHandle][#VH_pGlobalMotion] - [Getter][#pGlobalMotion()] - [Setter][#pGlobalMotion(java.lang.foreign.MemorySegment)] +/// ### pFilmGrain +/// [VarHandle][#VH_pFilmGrain] - [Getter][#pFilmGrain()] - [Setter][#pFilmGrain(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeAV1PictureInfo { +/// StdVideoDecodeAV1PictureInfoFlags flags; +/// StdVideoAV1FrameType frame_type; +/// uint32_t current_frame_id; +/// uint8_t OrderHint; +/// uint8_t primary_ref_frame; +/// uint8_t refresh_frame_flags; +/// uint8_t reserved1; +/// StdVideoAV1InterpolationFilter interpolation_filter; +/// StdVideoAV1TxMode TxMode; +/// uint8_t delta_q_res; +/// uint8_t delta_lf_res; +/// uint8_t [ ] SkipModeFrame; +/// uint8_t coded_denom; +/// uint8_t [3] reserved2; +/// uint8_t [ ] OrderHints; +/// uint32_t [ ] expectedFrameId; +/// const StdVideoAV1TileInfo * pTileInfo; +/// const StdVideoAV1Quantization * pQuantization; +/// const StdVideoAV1Segmentation * pSegmentation; +/// const StdVideoAV1LoopFilter * pLoopFilter; +/// const StdVideoAV1CDEF * pCDEF; +/// const StdVideoAV1LoopRestoration * pLoopRestoration; +/// const StdVideoAV1GlobalMotion * pGlobalMotion; +/// const StdVideoAV1FilmGrain * pFilmGrain; +/// } StdVideoDecodeAV1PictureInfo; +/// ``` +public final class StdVideoDecodeAV1PictureInfo extends Struct { + /// The struct layout of `StdVideoDecodeAV1PictureInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoDecodeAV1PictureInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("frame_type"), + ValueLayout.JAVA_INT.withName("current_frame_id"), + ValueLayout.JAVA_BYTE.withName("OrderHint"), + ValueLayout.JAVA_BYTE.withName("primary_ref_frame"), + ValueLayout.JAVA_BYTE.withName("refresh_frame_flags"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_INT.withName("interpolation_filter"), + ValueLayout.JAVA_INT.withName("TxMode"), + ValueLayout.JAVA_BYTE.withName("delta_q_res"), + ValueLayout.JAVA_BYTE.withName("delta_lf_res"), + ValueLayout.JAVA_BYTE.withName("SkipModeFrame"), + ValueLayout.JAVA_BYTE.withName("coded_denom"), + ValueLayout.JAVA_BYTE.withName("reserved2"), + ValueLayout.JAVA_BYTE.withName("OrderHints"), + ValueLayout.JAVA_INT.withName("expectedFrameId"), + ValueLayout.ADDRESS.withName("pTileInfo"), + ValueLayout.ADDRESS.withName("pQuantization"), + ValueLayout.ADDRESS.withName("pSegmentation"), + ValueLayout.ADDRESS.withName("pLoopFilter"), + ValueLayout.ADDRESS.withName("pCDEF"), + ValueLayout.ADDRESS.withName("pLoopRestoration"), + ValueLayout.ADDRESS.withName("pGlobalMotion"), + ValueLayout.ADDRESS.withName("pFilmGrain") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `frame_type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_type")); + /// The [VarHandle] of `current_frame_id` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_current_frame_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("current_frame_id")); + /// The [VarHandle] of `OrderHint` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_OrderHint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("OrderHint")); + /// The [VarHandle] of `primary_ref_frame` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_primary_ref_frame = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primary_ref_frame")); + /// The [VarHandle] of `refresh_frame_flags` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_refresh_frame_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("refresh_frame_flags")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `interpolation_filter` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_interpolation_filter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("interpolation_filter")); + /// The [VarHandle] of `TxMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_TxMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("TxMode")); + /// The [VarHandle] of `delta_q_res` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_q_res = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_q_res")); + /// The [VarHandle] of `delta_lf_res` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_lf_res = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_lf_res")); + /// The [VarHandle] of `SkipModeFrame` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_SkipModeFrame = LAYOUT.arrayElementVarHandle(PathElement.groupElement("SkipModeFrame")); + /// The [VarHandle] of `coded_denom` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_coded_denom = LAYOUT.arrayElementVarHandle(PathElement.groupElement("coded_denom")); + /// The [VarHandle] of `reserved2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved2")); + /// The [VarHandle] of `OrderHints` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_OrderHints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("OrderHints")); + /// The [VarHandle] of `expectedFrameId` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_expectedFrameId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("expectedFrameId")); + /// The [VarHandle] of `pTileInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTileInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTileInfo")); + /// The [VarHandle] of `pQuantization` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pQuantization = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pQuantization")); + /// The [VarHandle] of `pSegmentation` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSegmentation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSegmentation")); + /// The [VarHandle] of `pLoopFilter` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLoopFilter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLoopFilter")); + /// The [VarHandle] of `pCDEF` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCDEF = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCDEF")); + /// The [VarHandle] of `pLoopRestoration` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLoopRestoration = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLoopRestoration")); + /// The [VarHandle] of `pGlobalMotion` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pGlobalMotion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pGlobalMotion")); + /// The [VarHandle] of `pFilmGrain` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pFilmGrain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pFilmGrain")); + + /// Creates `StdVideoDecodeAV1PictureInfo` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeAV1PictureInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeAV1PictureInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1PictureInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1PictureInfo(segment); } + + /// Creates `StdVideoDecodeAV1PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1PictureInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeAV1PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1PictureInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeAV1PictureInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeAV1PictureInfo` + public static StdVideoDecodeAV1PictureInfo alloc(SegmentAllocator allocator) { return new StdVideoDecodeAV1PictureInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeAV1PictureInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeAV1PictureInfo` + public static StdVideoDecodeAV1PictureInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeAV1PictureInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoDecodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoDecodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoDecodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoDecodeAV1PictureInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoDecodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoDecodeAV1PictureInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoDecodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoDecodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo flagsAt(long index, @CType("StdVideoDecodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo flags(@CType("StdVideoDecodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_flags(this.segment(), value); return this; } + + /// {@return `frame_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1FrameType") int get_frame_type(MemorySegment segment, long index) { return (int) VH_frame_type.get(segment, 0L, index); } + /// {@return `frame_type`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1FrameType") int get_frame_type(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_frame_type(segment, 0L); } + /// {@return `frame_type` at the given index} + /// @param index the index + public @CType("StdVideoAV1FrameType") int frame_typeAt(long index) { return StdVideoDecodeAV1PictureInfo.get_frame_type(this.segment(), index); } + /// {@return `frame_type`} + public @CType("StdVideoAV1FrameType") int frame_type() { return StdVideoDecodeAV1PictureInfo.get_frame_type(this.segment()); } + /// Sets `frame_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_type(MemorySegment segment, long index, @CType("StdVideoAV1FrameType") int value) { VH_frame_type.set(segment, 0L, index, value); } + /// Sets `frame_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_type(MemorySegment segment, @CType("StdVideoAV1FrameType") int value) { StdVideoDecodeAV1PictureInfo.set_frame_type(segment, 0L, value); } + /// Sets `frame_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo frame_typeAt(long index, @CType("StdVideoAV1FrameType") int value) { StdVideoDecodeAV1PictureInfo.set_frame_type(this.segment(), index, value); return this; } + /// Sets `frame_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo frame_type(@CType("StdVideoAV1FrameType") int value) { StdVideoDecodeAV1PictureInfo.set_frame_type(this.segment(), value); return this; } + + /// {@return `current_frame_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_current_frame_id(MemorySegment segment, long index) { return (int) VH_current_frame_id.get(segment, 0L, index); } + /// {@return `current_frame_id`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_current_frame_id(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_current_frame_id(segment, 0L); } + /// {@return `current_frame_id` at the given index} + /// @param index the index + public @CType("uint32_t") int current_frame_idAt(long index) { return StdVideoDecodeAV1PictureInfo.get_current_frame_id(this.segment(), index); } + /// {@return `current_frame_id`} + public @CType("uint32_t") int current_frame_id() { return StdVideoDecodeAV1PictureInfo.get_current_frame_id(this.segment()); } + /// Sets `current_frame_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_current_frame_id(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_current_frame_id.set(segment, 0L, index, value); } + /// Sets `current_frame_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_current_frame_id(MemorySegment segment, @CType("uint32_t") int value) { StdVideoDecodeAV1PictureInfo.set_current_frame_id(segment, 0L, value); } + /// Sets `current_frame_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo current_frame_idAt(long index, @CType("uint32_t") int value) { StdVideoDecodeAV1PictureInfo.set_current_frame_id(this.segment(), index, value); return this; } + /// Sets `current_frame_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo current_frame_id(@CType("uint32_t") int value) { StdVideoDecodeAV1PictureInfo.set_current_frame_id(this.segment(), value); return this; } + + /// {@return `OrderHint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_OrderHint(MemorySegment segment, long index) { return (byte) VH_OrderHint.get(segment, 0L, index); } + /// {@return `OrderHint`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_OrderHint(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_OrderHint(segment, 0L); } + /// {@return `OrderHint` at the given index} + /// @param index the index + public @CType("uint8_t") byte OrderHintAt(long index) { return StdVideoDecodeAV1PictureInfo.get_OrderHint(this.segment(), index); } + /// {@return `OrderHint`} + public @CType("uint8_t") byte OrderHint() { return StdVideoDecodeAV1PictureInfo.get_OrderHint(this.segment()); } + /// Sets `OrderHint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_OrderHint(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_OrderHint.set(segment, 0L, index, value); } + /// Sets `OrderHint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_OrderHint(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_OrderHint(segment, 0L, value); } + /// Sets `OrderHint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo OrderHintAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_OrderHint(this.segment(), index, value); return this; } + /// Sets `OrderHint` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo OrderHint(@CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_OrderHint(this.segment(), value); return this; } + + /// {@return `primary_ref_frame` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_primary_ref_frame(MemorySegment segment, long index) { return (byte) VH_primary_ref_frame.get(segment, 0L, index); } + /// {@return `primary_ref_frame`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_primary_ref_frame(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_primary_ref_frame(segment, 0L); } + /// {@return `primary_ref_frame` at the given index} + /// @param index the index + public @CType("uint8_t") byte primary_ref_frameAt(long index) { return StdVideoDecodeAV1PictureInfo.get_primary_ref_frame(this.segment(), index); } + /// {@return `primary_ref_frame`} + public @CType("uint8_t") byte primary_ref_frame() { return StdVideoDecodeAV1PictureInfo.get_primary_ref_frame(this.segment()); } + /// Sets `primary_ref_frame` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primary_ref_frame(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_primary_ref_frame.set(segment, 0L, index, value); } + /// Sets `primary_ref_frame` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primary_ref_frame(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_primary_ref_frame(segment, 0L, value); } + /// Sets `primary_ref_frame` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo primary_ref_frameAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_primary_ref_frame(this.segment(), index, value); return this; } + /// Sets `primary_ref_frame` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo primary_ref_frame(@CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_primary_ref_frame(this.segment(), value); return this; } + + /// {@return `refresh_frame_flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_refresh_frame_flags(MemorySegment segment, long index) { return (byte) VH_refresh_frame_flags.get(segment, 0L, index); } + /// {@return `refresh_frame_flags`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_refresh_frame_flags(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_refresh_frame_flags(segment, 0L); } + /// {@return `refresh_frame_flags` at the given index} + /// @param index the index + public @CType("uint8_t") byte refresh_frame_flagsAt(long index) { return StdVideoDecodeAV1PictureInfo.get_refresh_frame_flags(this.segment(), index); } + /// {@return `refresh_frame_flags`} + public @CType("uint8_t") byte refresh_frame_flags() { return StdVideoDecodeAV1PictureInfo.get_refresh_frame_flags(this.segment()); } + /// Sets `refresh_frame_flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_refresh_frame_flags(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_refresh_frame_flags.set(segment, 0L, index, value); } + /// Sets `refresh_frame_flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_refresh_frame_flags(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_refresh_frame_flags(segment, 0L, value); } + /// Sets `refresh_frame_flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo refresh_frame_flagsAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_refresh_frame_flags(this.segment(), index, value); return this; } + /// Sets `refresh_frame_flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo refresh_frame_flags(@CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_refresh_frame_flags(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoDecodeAV1PictureInfo.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoDecodeAV1PictureInfo.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo reserved1At(long index, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo reserved1(@CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_reserved1(this.segment(), value); return this; } + + /// {@return `interpolation_filter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1InterpolationFilter") int get_interpolation_filter(MemorySegment segment, long index) { return (int) VH_interpolation_filter.get(segment, 0L, index); } + /// {@return `interpolation_filter`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1InterpolationFilter") int get_interpolation_filter(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_interpolation_filter(segment, 0L); } + /// {@return `interpolation_filter` at the given index} + /// @param index the index + public @CType("StdVideoAV1InterpolationFilter") int interpolation_filterAt(long index) { return StdVideoDecodeAV1PictureInfo.get_interpolation_filter(this.segment(), index); } + /// {@return `interpolation_filter`} + public @CType("StdVideoAV1InterpolationFilter") int interpolation_filter() { return StdVideoDecodeAV1PictureInfo.get_interpolation_filter(this.segment()); } + /// Sets `interpolation_filter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_interpolation_filter(MemorySegment segment, long index, @CType("StdVideoAV1InterpolationFilter") int value) { VH_interpolation_filter.set(segment, 0L, index, value); } + /// Sets `interpolation_filter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_interpolation_filter(MemorySegment segment, @CType("StdVideoAV1InterpolationFilter") int value) { StdVideoDecodeAV1PictureInfo.set_interpolation_filter(segment, 0L, value); } + /// Sets `interpolation_filter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo interpolation_filterAt(long index, @CType("StdVideoAV1InterpolationFilter") int value) { StdVideoDecodeAV1PictureInfo.set_interpolation_filter(this.segment(), index, value); return this; } + /// Sets `interpolation_filter` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo interpolation_filter(@CType("StdVideoAV1InterpolationFilter") int value) { StdVideoDecodeAV1PictureInfo.set_interpolation_filter(this.segment(), value); return this; } + + /// {@return `TxMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1TxMode") int get_TxMode(MemorySegment segment, long index) { return (int) VH_TxMode.get(segment, 0L, index); } + /// {@return `TxMode`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1TxMode") int get_TxMode(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_TxMode(segment, 0L); } + /// {@return `TxMode` at the given index} + /// @param index the index + public @CType("StdVideoAV1TxMode") int TxModeAt(long index) { return StdVideoDecodeAV1PictureInfo.get_TxMode(this.segment(), index); } + /// {@return `TxMode`} + public @CType("StdVideoAV1TxMode") int TxMode() { return StdVideoDecodeAV1PictureInfo.get_TxMode(this.segment()); } + /// Sets `TxMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_TxMode(MemorySegment segment, long index, @CType("StdVideoAV1TxMode") int value) { VH_TxMode.set(segment, 0L, index, value); } + /// Sets `TxMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_TxMode(MemorySegment segment, @CType("StdVideoAV1TxMode") int value) { StdVideoDecodeAV1PictureInfo.set_TxMode(segment, 0L, value); } + /// Sets `TxMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo TxModeAt(long index, @CType("StdVideoAV1TxMode") int value) { StdVideoDecodeAV1PictureInfo.set_TxMode(this.segment(), index, value); return this; } + /// Sets `TxMode` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo TxMode(@CType("StdVideoAV1TxMode") int value) { StdVideoDecodeAV1PictureInfo.set_TxMode(this.segment(), value); return this; } + + /// {@return `delta_q_res` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_delta_q_res(MemorySegment segment, long index) { return (byte) VH_delta_q_res.get(segment, 0L, index); } + /// {@return `delta_q_res`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_delta_q_res(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_delta_q_res(segment, 0L); } + /// {@return `delta_q_res` at the given index} + /// @param index the index + public @CType("uint8_t") byte delta_q_resAt(long index) { return StdVideoDecodeAV1PictureInfo.get_delta_q_res(this.segment(), index); } + /// {@return `delta_q_res`} + public @CType("uint8_t") byte delta_q_res() { return StdVideoDecodeAV1PictureInfo.get_delta_q_res(this.segment()); } + /// Sets `delta_q_res` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_q_res(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_delta_q_res.set(segment, 0L, index, value); } + /// Sets `delta_q_res` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_q_res(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_delta_q_res(segment, 0L, value); } + /// Sets `delta_q_res` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo delta_q_resAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_delta_q_res(this.segment(), index, value); return this; } + /// Sets `delta_q_res` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo delta_q_res(@CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_delta_q_res(this.segment(), value); return this; } + + /// {@return `delta_lf_res` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_delta_lf_res(MemorySegment segment, long index) { return (byte) VH_delta_lf_res.get(segment, 0L, index); } + /// {@return `delta_lf_res`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_delta_lf_res(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_delta_lf_res(segment, 0L); } + /// {@return `delta_lf_res` at the given index} + /// @param index the index + public @CType("uint8_t") byte delta_lf_resAt(long index) { return StdVideoDecodeAV1PictureInfo.get_delta_lf_res(this.segment(), index); } + /// {@return `delta_lf_res`} + public @CType("uint8_t") byte delta_lf_res() { return StdVideoDecodeAV1PictureInfo.get_delta_lf_res(this.segment()); } + /// Sets `delta_lf_res` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_lf_res(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_delta_lf_res.set(segment, 0L, index, value); } + /// Sets `delta_lf_res` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_lf_res(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_delta_lf_res(segment, 0L, value); } + /// Sets `delta_lf_res` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo delta_lf_resAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_delta_lf_res(this.segment(), index, value); return this; } + /// Sets `delta_lf_res` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo delta_lf_res(@CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_delta_lf_res(this.segment(), value); return this; } + + /// {@return `SkipModeFrame` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_SkipModeFrame(MemorySegment segment, long index) { return (byte) VH_SkipModeFrame.get(segment, 0L, index); } + /// {@return `SkipModeFrame`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_SkipModeFrame(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_SkipModeFrame(segment, 0L); } + /// {@return `SkipModeFrame` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte SkipModeFrameAt(long index) { return StdVideoDecodeAV1PictureInfo.get_SkipModeFrame(this.segment(), index); } + /// {@return `SkipModeFrame`} + public @CType("uint8_t [ ]") byte SkipModeFrame() { return StdVideoDecodeAV1PictureInfo.get_SkipModeFrame(this.segment()); } + /// Sets `SkipModeFrame` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_SkipModeFrame(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_SkipModeFrame.set(segment, 0L, index, value); } + /// Sets `SkipModeFrame` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_SkipModeFrame(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoDecodeAV1PictureInfo.set_SkipModeFrame(segment, 0L, value); } + /// Sets `SkipModeFrame` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo SkipModeFrameAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoDecodeAV1PictureInfo.set_SkipModeFrame(this.segment(), index, value); return this; } + /// Sets `SkipModeFrame` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo SkipModeFrame(@CType("uint8_t [ ]") byte value) { StdVideoDecodeAV1PictureInfo.set_SkipModeFrame(this.segment(), value); return this; } + + /// {@return `coded_denom` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_coded_denom(MemorySegment segment, long index) { return (byte) VH_coded_denom.get(segment, 0L, index); } + /// {@return `coded_denom`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_coded_denom(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_coded_denom(segment, 0L); } + /// {@return `coded_denom` at the given index} + /// @param index the index + public @CType("uint8_t") byte coded_denomAt(long index) { return StdVideoDecodeAV1PictureInfo.get_coded_denom(this.segment(), index); } + /// {@return `coded_denom`} + public @CType("uint8_t") byte coded_denom() { return StdVideoDecodeAV1PictureInfo.get_coded_denom(this.segment()); } + /// Sets `coded_denom` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_coded_denom(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_coded_denom.set(segment, 0L, index, value); } + /// Sets `coded_denom` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_coded_denom(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_coded_denom(segment, 0L, value); } + /// Sets `coded_denom` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo coded_denomAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_coded_denom(this.segment(), index, value); return this; } + /// Sets `coded_denom` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo coded_denom(@CType("uint8_t") byte value) { StdVideoDecodeAV1PictureInfo.set_coded_denom(this.segment(), value); return this; } + + /// {@return `reserved2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [3]") byte get_reserved2(MemorySegment segment, long index) { return (byte) VH_reserved2.get(segment, 0L, index); } + /// {@return `reserved2`} + /// @param segment the segment of the struct + public static @CType("uint8_t [3]") byte get_reserved2(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_reserved2(segment, 0L); } + /// {@return `reserved2` at the given index} + /// @param index the index + public @CType("uint8_t [3]") byte reserved2At(long index) { return StdVideoDecodeAV1PictureInfo.get_reserved2(this.segment(), index); } + /// {@return `reserved2`} + public @CType("uint8_t [3]") byte reserved2() { return StdVideoDecodeAV1PictureInfo.get_reserved2(this.segment()); } + /// Sets `reserved2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved2(MemorySegment segment, long index, @CType("uint8_t [3]") byte value) { VH_reserved2.set(segment, 0L, index, value); } + /// Sets `reserved2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved2(MemorySegment segment, @CType("uint8_t [3]") byte value) { StdVideoDecodeAV1PictureInfo.set_reserved2(segment, 0L, value); } + /// Sets `reserved2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo reserved2At(long index, @CType("uint8_t [3]") byte value) { StdVideoDecodeAV1PictureInfo.set_reserved2(this.segment(), index, value); return this; } + /// Sets `reserved2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo reserved2(@CType("uint8_t [3]") byte value) { StdVideoDecodeAV1PictureInfo.set_reserved2(this.segment(), value); return this; } + + /// {@return `OrderHints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_OrderHints(MemorySegment segment, long index) { return (byte) VH_OrderHints.get(segment, 0L, index); } + /// {@return `OrderHints`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_OrderHints(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_OrderHints(segment, 0L); } + /// {@return `OrderHints` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte OrderHintsAt(long index) { return StdVideoDecodeAV1PictureInfo.get_OrderHints(this.segment(), index); } + /// {@return `OrderHints`} + public @CType("uint8_t [ ]") byte OrderHints() { return StdVideoDecodeAV1PictureInfo.get_OrderHints(this.segment()); } + /// Sets `OrderHints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_OrderHints(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_OrderHints.set(segment, 0L, index, value); } + /// Sets `OrderHints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_OrderHints(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoDecodeAV1PictureInfo.set_OrderHints(segment, 0L, value); } + /// Sets `OrderHints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo OrderHintsAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoDecodeAV1PictureInfo.set_OrderHints(this.segment(), index, value); return this; } + /// Sets `OrderHints` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo OrderHints(@CType("uint8_t [ ]") byte value) { StdVideoDecodeAV1PictureInfo.set_OrderHints(this.segment(), value); return this; } + + /// {@return `expectedFrameId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t [ ]") int get_expectedFrameId(MemorySegment segment, long index) { return (int) VH_expectedFrameId.get(segment, 0L, index); } + /// {@return `expectedFrameId`} + /// @param segment the segment of the struct + public static @CType("uint32_t [ ]") int get_expectedFrameId(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_expectedFrameId(segment, 0L); } + /// {@return `expectedFrameId` at the given index} + /// @param index the index + public @CType("uint32_t [ ]") int expectedFrameIdAt(long index) { return StdVideoDecodeAV1PictureInfo.get_expectedFrameId(this.segment(), index); } + /// {@return `expectedFrameId`} + public @CType("uint32_t [ ]") int expectedFrameId() { return StdVideoDecodeAV1PictureInfo.get_expectedFrameId(this.segment()); } + /// Sets `expectedFrameId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_expectedFrameId(MemorySegment segment, long index, @CType("uint32_t [ ]") int value) { VH_expectedFrameId.set(segment, 0L, index, value); } + /// Sets `expectedFrameId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_expectedFrameId(MemorySegment segment, @CType("uint32_t [ ]") int value) { StdVideoDecodeAV1PictureInfo.set_expectedFrameId(segment, 0L, value); } + /// Sets `expectedFrameId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo expectedFrameIdAt(long index, @CType("uint32_t [ ]") int value) { StdVideoDecodeAV1PictureInfo.set_expectedFrameId(this.segment(), index, value); return this; } + /// Sets `expectedFrameId` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo expectedFrameId(@CType("uint32_t [ ]") int value) { StdVideoDecodeAV1PictureInfo.set_expectedFrameId(this.segment(), value); return this; } + + /// {@return `pTileInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment get_pTileInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTileInfo.get(segment, 0L, index); } + /// {@return `pTileInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment get_pTileInfo(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_pTileInfo(segment, 0L); } + /// {@return `pTileInfo` at the given index} + /// @param index the index + public @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment pTileInfoAt(long index) { return StdVideoDecodeAV1PictureInfo.get_pTileInfo(this.segment(), index); } + /// {@return `pTileInfo`} + public @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment pTileInfo() { return StdVideoDecodeAV1PictureInfo.get_pTileInfo(this.segment()); } + /// Sets `pTileInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTileInfo(MemorySegment segment, long index, @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment value) { VH_pTileInfo.set(segment, 0L, index, value); } + /// Sets `pTileInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTileInfo(MemorySegment segment, @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pTileInfo(segment, 0L, value); } + /// Sets `pTileInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pTileInfoAt(long index, @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pTileInfo(this.segment(), index, value); return this; } + /// Sets `pTileInfo` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pTileInfo(@CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pTileInfo(this.segment(), value); return this; } + + /// {@return `pQuantization` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment get_pQuantization(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pQuantization.get(segment, 0L, index); } + /// {@return `pQuantization`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment get_pQuantization(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_pQuantization(segment, 0L); } + /// {@return `pQuantization` at the given index} + /// @param index the index + public @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment pQuantizationAt(long index) { return StdVideoDecodeAV1PictureInfo.get_pQuantization(this.segment(), index); } + /// {@return `pQuantization`} + public @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment pQuantization() { return StdVideoDecodeAV1PictureInfo.get_pQuantization(this.segment()); } + /// Sets `pQuantization` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pQuantization(MemorySegment segment, long index, @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment value) { VH_pQuantization.set(segment, 0L, index, value); } + /// Sets `pQuantization` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pQuantization(MemorySegment segment, @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pQuantization(segment, 0L, value); } + /// Sets `pQuantization` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pQuantizationAt(long index, @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pQuantization(this.segment(), index, value); return this; } + /// Sets `pQuantization` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pQuantization(@CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pQuantization(this.segment(), value); return this; } + + /// {@return `pSegmentation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment get_pSegmentation(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSegmentation.get(segment, 0L, index); } + /// {@return `pSegmentation`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment get_pSegmentation(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_pSegmentation(segment, 0L); } + /// {@return `pSegmentation` at the given index} + /// @param index the index + public @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment pSegmentationAt(long index) { return StdVideoDecodeAV1PictureInfo.get_pSegmentation(this.segment(), index); } + /// {@return `pSegmentation`} + public @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment pSegmentation() { return StdVideoDecodeAV1PictureInfo.get_pSegmentation(this.segment()); } + /// Sets `pSegmentation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSegmentation(MemorySegment segment, long index, @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment value) { VH_pSegmentation.set(segment, 0L, index, value); } + /// Sets `pSegmentation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSegmentation(MemorySegment segment, @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pSegmentation(segment, 0L, value); } + /// Sets `pSegmentation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pSegmentationAt(long index, @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pSegmentation(this.segment(), index, value); return this; } + /// Sets `pSegmentation` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pSegmentation(@CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pSegmentation(this.segment(), value); return this; } + + /// {@return `pLoopFilter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment get_pLoopFilter(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLoopFilter.get(segment, 0L, index); } + /// {@return `pLoopFilter`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment get_pLoopFilter(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_pLoopFilter(segment, 0L); } + /// {@return `pLoopFilter` at the given index} + /// @param index the index + public @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment pLoopFilterAt(long index) { return StdVideoDecodeAV1PictureInfo.get_pLoopFilter(this.segment(), index); } + /// {@return `pLoopFilter`} + public @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment pLoopFilter() { return StdVideoDecodeAV1PictureInfo.get_pLoopFilter(this.segment()); } + /// Sets `pLoopFilter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLoopFilter(MemorySegment segment, long index, @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment value) { VH_pLoopFilter.set(segment, 0L, index, value); } + /// Sets `pLoopFilter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLoopFilter(MemorySegment segment, @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pLoopFilter(segment, 0L, value); } + /// Sets `pLoopFilter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pLoopFilterAt(long index, @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pLoopFilter(this.segment(), index, value); return this; } + /// Sets `pLoopFilter` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pLoopFilter(@CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pLoopFilter(this.segment(), value); return this; } + + /// {@return `pCDEF` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment get_pCDEF(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCDEF.get(segment, 0L, index); } + /// {@return `pCDEF`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment get_pCDEF(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_pCDEF(segment, 0L); } + /// {@return `pCDEF` at the given index} + /// @param index the index + public @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment pCDEFAt(long index) { return StdVideoDecodeAV1PictureInfo.get_pCDEF(this.segment(), index); } + /// {@return `pCDEF`} + public @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment pCDEF() { return StdVideoDecodeAV1PictureInfo.get_pCDEF(this.segment()); } + /// Sets `pCDEF` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCDEF(MemorySegment segment, long index, @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment value) { VH_pCDEF.set(segment, 0L, index, value); } + /// Sets `pCDEF` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCDEF(MemorySegment segment, @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pCDEF(segment, 0L, value); } + /// Sets `pCDEF` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pCDEFAt(long index, @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pCDEF(this.segment(), index, value); return this; } + /// Sets `pCDEF` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pCDEF(@CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pCDEF(this.segment(), value); return this; } + + /// {@return `pLoopRestoration` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment get_pLoopRestoration(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLoopRestoration.get(segment, 0L, index); } + /// {@return `pLoopRestoration`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment get_pLoopRestoration(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_pLoopRestoration(segment, 0L); } + /// {@return `pLoopRestoration` at the given index} + /// @param index the index + public @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment pLoopRestorationAt(long index) { return StdVideoDecodeAV1PictureInfo.get_pLoopRestoration(this.segment(), index); } + /// {@return `pLoopRestoration`} + public @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment pLoopRestoration() { return StdVideoDecodeAV1PictureInfo.get_pLoopRestoration(this.segment()); } + /// Sets `pLoopRestoration` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLoopRestoration(MemorySegment segment, long index, @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment value) { VH_pLoopRestoration.set(segment, 0L, index, value); } + /// Sets `pLoopRestoration` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLoopRestoration(MemorySegment segment, @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pLoopRestoration(segment, 0L, value); } + /// Sets `pLoopRestoration` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pLoopRestorationAt(long index, @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pLoopRestoration(this.segment(), index, value); return this; } + /// Sets `pLoopRestoration` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pLoopRestoration(@CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pLoopRestoration(this.segment(), value); return this; } + + /// {@return `pGlobalMotion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment get_pGlobalMotion(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pGlobalMotion.get(segment, 0L, index); } + /// {@return `pGlobalMotion`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment get_pGlobalMotion(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_pGlobalMotion(segment, 0L); } + /// {@return `pGlobalMotion` at the given index} + /// @param index the index + public @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment pGlobalMotionAt(long index) { return StdVideoDecodeAV1PictureInfo.get_pGlobalMotion(this.segment(), index); } + /// {@return `pGlobalMotion`} + public @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment pGlobalMotion() { return StdVideoDecodeAV1PictureInfo.get_pGlobalMotion(this.segment()); } + /// Sets `pGlobalMotion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pGlobalMotion(MemorySegment segment, long index, @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment value) { VH_pGlobalMotion.set(segment, 0L, index, value); } + /// Sets `pGlobalMotion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pGlobalMotion(MemorySegment segment, @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pGlobalMotion(segment, 0L, value); } + /// Sets `pGlobalMotion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pGlobalMotionAt(long index, @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pGlobalMotion(this.segment(), index, value); return this; } + /// Sets `pGlobalMotion` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pGlobalMotion(@CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pGlobalMotion(this.segment(), value); return this; } + + /// {@return `pFilmGrain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1FilmGrain *") java.lang.foreign.MemorySegment get_pFilmGrain(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pFilmGrain.get(segment, 0L, index); } + /// {@return `pFilmGrain`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1FilmGrain *") java.lang.foreign.MemorySegment get_pFilmGrain(MemorySegment segment) { return StdVideoDecodeAV1PictureInfo.get_pFilmGrain(segment, 0L); } + /// {@return `pFilmGrain` at the given index} + /// @param index the index + public @CType("const StdVideoAV1FilmGrain *") java.lang.foreign.MemorySegment pFilmGrainAt(long index) { return StdVideoDecodeAV1PictureInfo.get_pFilmGrain(this.segment(), index); } + /// {@return `pFilmGrain`} + public @CType("const StdVideoAV1FilmGrain *") java.lang.foreign.MemorySegment pFilmGrain() { return StdVideoDecodeAV1PictureInfo.get_pFilmGrain(this.segment()); } + /// Sets `pFilmGrain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pFilmGrain(MemorySegment segment, long index, @CType("const StdVideoAV1FilmGrain *") java.lang.foreign.MemorySegment value) { VH_pFilmGrain.set(segment, 0L, index, value); } + /// Sets `pFilmGrain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pFilmGrain(MemorySegment segment, @CType("const StdVideoAV1FilmGrain *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pFilmGrain(segment, 0L, value); } + /// Sets `pFilmGrain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pFilmGrainAt(long index, @CType("const StdVideoAV1FilmGrain *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pFilmGrain(this.segment(), index, value); return this; } + /// Sets `pFilmGrain` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfo pFilmGrain(@CType("const StdVideoAV1FilmGrain *") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1PictureInfo.set_pFilmGrain(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1PictureInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1PictureInfoFlags.java new file mode 100644 index 00000000..0cc81ff7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1PictureInfoFlags.java @@ -0,0 +1,1184 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### error_resilient_mode +/// [VarHandle][#VH_error_resilient_mode] - [Getter][#error_resilient_mode()] - [Setter][#error_resilient_mode(int)] +/// ### disable_cdf_update +/// [VarHandle][#VH_disable_cdf_update] - [Getter][#disable_cdf_update()] - [Setter][#disable_cdf_update(int)] +/// ### use_superres +/// [VarHandle][#VH_use_superres] - [Getter][#use_superres()] - [Setter][#use_superres(int)] +/// ### render_and_frame_size_different +/// [VarHandle][#VH_render_and_frame_size_different] - [Getter][#render_and_frame_size_different()] - [Setter][#render_and_frame_size_different(int)] +/// ### allow_screen_content_tools +/// [VarHandle][#VH_allow_screen_content_tools] - [Getter][#allow_screen_content_tools()] - [Setter][#allow_screen_content_tools(int)] +/// ### is_filter_switchable +/// [VarHandle][#VH_is_filter_switchable] - [Getter][#is_filter_switchable()] - [Setter][#is_filter_switchable(int)] +/// ### force_integer_mv +/// [VarHandle][#VH_force_integer_mv] - [Getter][#force_integer_mv()] - [Setter][#force_integer_mv(int)] +/// ### frame_size_override_flag +/// [VarHandle][#VH_frame_size_override_flag] - [Getter][#frame_size_override_flag()] - [Setter][#frame_size_override_flag(int)] +/// ### buffer_removal_time_present_flag +/// [VarHandle][#VH_buffer_removal_time_present_flag] - [Getter][#buffer_removal_time_present_flag()] - [Setter][#buffer_removal_time_present_flag(int)] +/// ### allow_intrabc +/// [VarHandle][#VH_allow_intrabc] - [Getter][#allow_intrabc()] - [Setter][#allow_intrabc(int)] +/// ### frame_refs_short_signaling +/// [VarHandle][#VH_frame_refs_short_signaling] - [Getter][#frame_refs_short_signaling()] - [Setter][#frame_refs_short_signaling(int)] +/// ### allow_high_precision_mv +/// [VarHandle][#VH_allow_high_precision_mv] - [Getter][#allow_high_precision_mv()] - [Setter][#allow_high_precision_mv(int)] +/// ### is_motion_mode_switchable +/// [VarHandle][#VH_is_motion_mode_switchable] - [Getter][#is_motion_mode_switchable()] - [Setter][#is_motion_mode_switchable(int)] +/// ### use_ref_frame_mvs +/// [VarHandle][#VH_use_ref_frame_mvs] - [Getter][#use_ref_frame_mvs()] - [Setter][#use_ref_frame_mvs(int)] +/// ### disable_frame_end_update_cdf +/// [VarHandle][#VH_disable_frame_end_update_cdf] - [Getter][#disable_frame_end_update_cdf()] - [Setter][#disable_frame_end_update_cdf(int)] +/// ### allow_warped_motion +/// [VarHandle][#VH_allow_warped_motion] - [Getter][#allow_warped_motion()] - [Setter][#allow_warped_motion(int)] +/// ### reduced_tx_set +/// [VarHandle][#VH_reduced_tx_set] - [Getter][#reduced_tx_set()] - [Setter][#reduced_tx_set(int)] +/// ### reference_select +/// [VarHandle][#VH_reference_select] - [Getter][#reference_select()] - [Setter][#reference_select(int)] +/// ### skip_mode_present +/// [VarHandle][#VH_skip_mode_present] - [Getter][#skip_mode_present()] - [Setter][#skip_mode_present(int)] +/// ### delta_q_present +/// [VarHandle][#VH_delta_q_present] - [Getter][#delta_q_present()] - [Setter][#delta_q_present(int)] +/// ### delta_lf_present +/// [VarHandle][#VH_delta_lf_present] - [Getter][#delta_lf_present()] - [Setter][#delta_lf_present(int)] +/// ### delta_lf_multi +/// [VarHandle][#VH_delta_lf_multi] - [Getter][#delta_lf_multi()] - [Setter][#delta_lf_multi(int)] +/// ### segmentation_enabled +/// [VarHandle][#VH_segmentation_enabled] - [Getter][#segmentation_enabled()] - [Setter][#segmentation_enabled(int)] +/// ### segmentation_update_map +/// [VarHandle][#VH_segmentation_update_map] - [Getter][#segmentation_update_map()] - [Setter][#segmentation_update_map(int)] +/// ### segmentation_temporal_update +/// [VarHandle][#VH_segmentation_temporal_update] - [Getter][#segmentation_temporal_update()] - [Setter][#segmentation_temporal_update(int)] +/// ### segmentation_update_data +/// [VarHandle][#VH_segmentation_update_data] - [Getter][#segmentation_update_data()] - [Setter][#segmentation_update_data(int)] +/// ### UsesLr +/// [VarHandle][#VH_UsesLr] - [Getter][#UsesLr()] - [Setter][#UsesLr(int)] +/// ### usesChromaLr +/// [VarHandle][#VH_usesChromaLr] - [Getter][#usesChromaLr()] - [Setter][#usesChromaLr(int)] +/// ### apply_grain +/// [VarHandle][#VH_apply_grain] - [Getter][#apply_grain()] - [Setter][#apply_grain(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeAV1PictureInfoFlags { +/// uint32_t : 1 error_resilient_mode; +/// uint32_t : 1 disable_cdf_update; +/// uint32_t : 1 use_superres; +/// uint32_t : 1 render_and_frame_size_different; +/// uint32_t : 1 allow_screen_content_tools; +/// uint32_t : 1 is_filter_switchable; +/// uint32_t : 1 force_integer_mv; +/// uint32_t : 1 frame_size_override_flag; +/// uint32_t : 1 buffer_removal_time_present_flag; +/// uint32_t : 1 allow_intrabc; +/// uint32_t : 1 frame_refs_short_signaling; +/// uint32_t : 1 allow_high_precision_mv; +/// uint32_t : 1 is_motion_mode_switchable; +/// uint32_t : 1 use_ref_frame_mvs; +/// uint32_t : 1 disable_frame_end_update_cdf; +/// uint32_t : 1 allow_warped_motion; +/// uint32_t : 1 reduced_tx_set; +/// uint32_t : 1 reference_select; +/// uint32_t : 1 skip_mode_present; +/// uint32_t : 1 delta_q_present; +/// uint32_t : 1 delta_lf_present; +/// uint32_t : 1 delta_lf_multi; +/// uint32_t : 1 segmentation_enabled; +/// uint32_t : 1 segmentation_update_map; +/// uint32_t : 1 segmentation_temporal_update; +/// uint32_t : 1 segmentation_update_data; +/// uint32_t : 1 UsesLr; +/// uint32_t : 1 usesChromaLr; +/// uint32_t : 1 apply_grain; +/// uint32_t : 3 reserved; +/// } StdVideoDecodeAV1PictureInfoFlags; +/// ``` +public final class StdVideoDecodeAV1PictureInfoFlags extends Struct { + /// The struct layout of `StdVideoDecodeAV1PictureInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("error_resilient_mode"), + ValueLayout.JAVA_INT.withName("disable_cdf_update"), + ValueLayout.JAVA_INT.withName("use_superres"), + ValueLayout.JAVA_INT.withName("render_and_frame_size_different"), + ValueLayout.JAVA_INT.withName("allow_screen_content_tools"), + ValueLayout.JAVA_INT.withName("is_filter_switchable"), + ValueLayout.JAVA_INT.withName("force_integer_mv"), + ValueLayout.JAVA_INT.withName("frame_size_override_flag"), + ValueLayout.JAVA_INT.withName("buffer_removal_time_present_flag"), + ValueLayout.JAVA_INT.withName("allow_intrabc"), + ValueLayout.JAVA_INT.withName("frame_refs_short_signaling"), + ValueLayout.JAVA_INT.withName("allow_high_precision_mv"), + ValueLayout.JAVA_INT.withName("is_motion_mode_switchable"), + ValueLayout.JAVA_INT.withName("use_ref_frame_mvs"), + ValueLayout.JAVA_INT.withName("disable_frame_end_update_cdf"), + ValueLayout.JAVA_INT.withName("allow_warped_motion"), + ValueLayout.JAVA_INT.withName("reduced_tx_set"), + ValueLayout.JAVA_INT.withName("reference_select"), + ValueLayout.JAVA_INT.withName("skip_mode_present"), + ValueLayout.JAVA_INT.withName("delta_q_present"), + ValueLayout.JAVA_INT.withName("delta_lf_present"), + ValueLayout.JAVA_INT.withName("delta_lf_multi"), + ValueLayout.JAVA_INT.withName("segmentation_enabled"), + ValueLayout.JAVA_INT.withName("segmentation_update_map"), + ValueLayout.JAVA_INT.withName("segmentation_temporal_update"), + ValueLayout.JAVA_INT.withName("segmentation_update_data"), + ValueLayout.JAVA_INT.withName("UsesLr"), + ValueLayout.JAVA_INT.withName("usesChromaLr"), + ValueLayout.JAVA_INT.withName("apply_grain"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `error_resilient_mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_error_resilient_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("error_resilient_mode")); + /// The [VarHandle] of `disable_cdf_update` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disable_cdf_update = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disable_cdf_update")); + /// The [VarHandle] of `use_superres` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_use_superres = LAYOUT.arrayElementVarHandle(PathElement.groupElement("use_superres")); + /// The [VarHandle] of `render_and_frame_size_different` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_render_and_frame_size_different = LAYOUT.arrayElementVarHandle(PathElement.groupElement("render_and_frame_size_different")); + /// The [VarHandle] of `allow_screen_content_tools` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_allow_screen_content_tools = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allow_screen_content_tools")); + /// The [VarHandle] of `is_filter_switchable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_is_filter_switchable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("is_filter_switchable")); + /// The [VarHandle] of `force_integer_mv` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_force_integer_mv = LAYOUT.arrayElementVarHandle(PathElement.groupElement("force_integer_mv")); + /// The [VarHandle] of `frame_size_override_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_size_override_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_size_override_flag")); + /// The [VarHandle] of `buffer_removal_time_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_buffer_removal_time_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer_removal_time_present_flag")); + /// The [VarHandle] of `allow_intrabc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_allow_intrabc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allow_intrabc")); + /// The [VarHandle] of `frame_refs_short_signaling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_refs_short_signaling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_refs_short_signaling")); + /// The [VarHandle] of `allow_high_precision_mv` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_allow_high_precision_mv = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allow_high_precision_mv")); + /// The [VarHandle] of `is_motion_mode_switchable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_is_motion_mode_switchable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("is_motion_mode_switchable")); + /// The [VarHandle] of `use_ref_frame_mvs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_use_ref_frame_mvs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("use_ref_frame_mvs")); + /// The [VarHandle] of `disable_frame_end_update_cdf` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disable_frame_end_update_cdf = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disable_frame_end_update_cdf")); + /// The [VarHandle] of `allow_warped_motion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_allow_warped_motion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allow_warped_motion")); + /// The [VarHandle] of `reduced_tx_set` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reduced_tx_set = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reduced_tx_set")); + /// The [VarHandle] of `reference_select` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reference_select = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reference_select")); + /// The [VarHandle] of `skip_mode_present` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_skip_mode_present = LAYOUT.arrayElementVarHandle(PathElement.groupElement("skip_mode_present")); + /// The [VarHandle] of `delta_q_present` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_delta_q_present = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_q_present")); + /// The [VarHandle] of `delta_lf_present` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_delta_lf_present = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_lf_present")); + /// The [VarHandle] of `delta_lf_multi` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_delta_lf_multi = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_lf_multi")); + /// The [VarHandle] of `segmentation_enabled` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_segmentation_enabled = LAYOUT.arrayElementVarHandle(PathElement.groupElement("segmentation_enabled")); + /// The [VarHandle] of `segmentation_update_map` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_segmentation_update_map = LAYOUT.arrayElementVarHandle(PathElement.groupElement("segmentation_update_map")); + /// The [VarHandle] of `segmentation_temporal_update` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_segmentation_temporal_update = LAYOUT.arrayElementVarHandle(PathElement.groupElement("segmentation_temporal_update")); + /// The [VarHandle] of `segmentation_update_data` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_segmentation_update_data = LAYOUT.arrayElementVarHandle(PathElement.groupElement("segmentation_update_data")); + /// The [VarHandle] of `UsesLr` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_UsesLr = LAYOUT.arrayElementVarHandle(PathElement.groupElement("UsesLr")); + /// The [VarHandle] of `usesChromaLr` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usesChromaLr = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usesChromaLr")); + /// The [VarHandle] of `apply_grain` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_apply_grain = LAYOUT.arrayElementVarHandle(PathElement.groupElement("apply_grain")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoDecodeAV1PictureInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeAV1PictureInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeAV1PictureInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1PictureInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1PictureInfoFlags(segment); } + + /// Creates `StdVideoDecodeAV1PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1PictureInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeAV1PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1PictureInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeAV1PictureInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeAV1PictureInfoFlags` + public static StdVideoDecodeAV1PictureInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoDecodeAV1PictureInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeAV1PictureInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeAV1PictureInfoFlags` + public static StdVideoDecodeAV1PictureInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeAV1PictureInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `error_resilient_mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_error_resilient_mode(MemorySegment segment, long index) { return (int) VH_error_resilient_mode.get(segment, 0L, index); } + /// {@return `error_resilient_mode`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_error_resilient_mode(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_error_resilient_mode(segment, 0L); } + /// {@return `error_resilient_mode` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int error_resilient_modeAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_error_resilient_mode(this.segment(), index); } + /// {@return `error_resilient_mode`} + public @CType("uint32_t : 1") int error_resilient_mode() { return StdVideoDecodeAV1PictureInfoFlags.get_error_resilient_mode(this.segment()); } + /// Sets `error_resilient_mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_error_resilient_mode(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_error_resilient_mode.set(segment, 0L, index, value); } + /// Sets `error_resilient_mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_error_resilient_mode(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_error_resilient_mode(segment, 0L, value); } + /// Sets `error_resilient_mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags error_resilient_modeAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_error_resilient_mode(this.segment(), index, value); return this; } + /// Sets `error_resilient_mode` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags error_resilient_mode(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_error_resilient_mode(this.segment(), value); return this; } + + /// {@return `disable_cdf_update` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_disable_cdf_update(MemorySegment segment, long index) { return (int) VH_disable_cdf_update.get(segment, 0L, index); } + /// {@return `disable_cdf_update`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_disable_cdf_update(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_disable_cdf_update(segment, 0L); } + /// {@return `disable_cdf_update` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int disable_cdf_updateAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_disable_cdf_update(this.segment(), index); } + /// {@return `disable_cdf_update`} + public @CType("uint32_t : 1") int disable_cdf_update() { return StdVideoDecodeAV1PictureInfoFlags.get_disable_cdf_update(this.segment()); } + /// Sets `disable_cdf_update` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disable_cdf_update(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_disable_cdf_update.set(segment, 0L, index, value); } + /// Sets `disable_cdf_update` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disable_cdf_update(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_disable_cdf_update(segment, 0L, value); } + /// Sets `disable_cdf_update` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags disable_cdf_updateAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_disable_cdf_update(this.segment(), index, value); return this; } + /// Sets `disable_cdf_update` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags disable_cdf_update(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_disable_cdf_update(this.segment(), value); return this; } + + /// {@return `use_superres` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_use_superres(MemorySegment segment, long index) { return (int) VH_use_superres.get(segment, 0L, index); } + /// {@return `use_superres`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_use_superres(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_use_superres(segment, 0L); } + /// {@return `use_superres` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int use_superresAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_use_superres(this.segment(), index); } + /// {@return `use_superres`} + public @CType("uint32_t : 1") int use_superres() { return StdVideoDecodeAV1PictureInfoFlags.get_use_superres(this.segment()); } + /// Sets `use_superres` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_use_superres(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_use_superres.set(segment, 0L, index, value); } + /// Sets `use_superres` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_use_superres(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_use_superres(segment, 0L, value); } + /// Sets `use_superres` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags use_superresAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_use_superres(this.segment(), index, value); return this; } + /// Sets `use_superres` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags use_superres(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_use_superres(this.segment(), value); return this; } + + /// {@return `render_and_frame_size_different` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_render_and_frame_size_different(MemorySegment segment, long index) { return (int) VH_render_and_frame_size_different.get(segment, 0L, index); } + /// {@return `render_and_frame_size_different`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_render_and_frame_size_different(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_render_and_frame_size_different(segment, 0L); } + /// {@return `render_and_frame_size_different` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int render_and_frame_size_differentAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_render_and_frame_size_different(this.segment(), index); } + /// {@return `render_and_frame_size_different`} + public @CType("uint32_t : 1") int render_and_frame_size_different() { return StdVideoDecodeAV1PictureInfoFlags.get_render_and_frame_size_different(this.segment()); } + /// Sets `render_and_frame_size_different` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_render_and_frame_size_different(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_render_and_frame_size_different.set(segment, 0L, index, value); } + /// Sets `render_and_frame_size_different` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_render_and_frame_size_different(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_render_and_frame_size_different(segment, 0L, value); } + /// Sets `render_and_frame_size_different` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags render_and_frame_size_differentAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_render_and_frame_size_different(this.segment(), index, value); return this; } + /// Sets `render_and_frame_size_different` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags render_and_frame_size_different(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_render_and_frame_size_different(this.segment(), value); return this; } + + /// {@return `allow_screen_content_tools` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_allow_screen_content_tools(MemorySegment segment, long index) { return (int) VH_allow_screen_content_tools.get(segment, 0L, index); } + /// {@return `allow_screen_content_tools`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_allow_screen_content_tools(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_allow_screen_content_tools(segment, 0L); } + /// {@return `allow_screen_content_tools` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int allow_screen_content_toolsAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_allow_screen_content_tools(this.segment(), index); } + /// {@return `allow_screen_content_tools`} + public @CType("uint32_t : 1") int allow_screen_content_tools() { return StdVideoDecodeAV1PictureInfoFlags.get_allow_screen_content_tools(this.segment()); } + /// Sets `allow_screen_content_tools` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allow_screen_content_tools(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_allow_screen_content_tools.set(segment, 0L, index, value); } + /// Sets `allow_screen_content_tools` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allow_screen_content_tools(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_screen_content_tools(segment, 0L, value); } + /// Sets `allow_screen_content_tools` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags allow_screen_content_toolsAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_screen_content_tools(this.segment(), index, value); return this; } + /// Sets `allow_screen_content_tools` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags allow_screen_content_tools(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_screen_content_tools(this.segment(), value); return this; } + + /// {@return `is_filter_switchable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_is_filter_switchable(MemorySegment segment, long index) { return (int) VH_is_filter_switchable.get(segment, 0L, index); } + /// {@return `is_filter_switchable`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_is_filter_switchable(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_is_filter_switchable(segment, 0L); } + /// {@return `is_filter_switchable` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int is_filter_switchableAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_is_filter_switchable(this.segment(), index); } + /// {@return `is_filter_switchable`} + public @CType("uint32_t : 1") int is_filter_switchable() { return StdVideoDecodeAV1PictureInfoFlags.get_is_filter_switchable(this.segment()); } + /// Sets `is_filter_switchable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_is_filter_switchable(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_is_filter_switchable.set(segment, 0L, index, value); } + /// Sets `is_filter_switchable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_is_filter_switchable(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_is_filter_switchable(segment, 0L, value); } + /// Sets `is_filter_switchable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags is_filter_switchableAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_is_filter_switchable(this.segment(), index, value); return this; } + /// Sets `is_filter_switchable` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags is_filter_switchable(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_is_filter_switchable(this.segment(), value); return this; } + + /// {@return `force_integer_mv` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_force_integer_mv(MemorySegment segment, long index) { return (int) VH_force_integer_mv.get(segment, 0L, index); } + /// {@return `force_integer_mv`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_force_integer_mv(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_force_integer_mv(segment, 0L); } + /// {@return `force_integer_mv` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int force_integer_mvAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_force_integer_mv(this.segment(), index); } + /// {@return `force_integer_mv`} + public @CType("uint32_t : 1") int force_integer_mv() { return StdVideoDecodeAV1PictureInfoFlags.get_force_integer_mv(this.segment()); } + /// Sets `force_integer_mv` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_force_integer_mv(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_force_integer_mv.set(segment, 0L, index, value); } + /// Sets `force_integer_mv` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_force_integer_mv(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_force_integer_mv(segment, 0L, value); } + /// Sets `force_integer_mv` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags force_integer_mvAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_force_integer_mv(this.segment(), index, value); return this; } + /// Sets `force_integer_mv` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags force_integer_mv(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_force_integer_mv(this.segment(), value); return this; } + + /// {@return `frame_size_override_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_frame_size_override_flag(MemorySegment segment, long index) { return (int) VH_frame_size_override_flag.get(segment, 0L, index); } + /// {@return `frame_size_override_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_frame_size_override_flag(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_frame_size_override_flag(segment, 0L); } + /// {@return `frame_size_override_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int frame_size_override_flagAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_frame_size_override_flag(this.segment(), index); } + /// {@return `frame_size_override_flag`} + public @CType("uint32_t : 1") int frame_size_override_flag() { return StdVideoDecodeAV1PictureInfoFlags.get_frame_size_override_flag(this.segment()); } + /// Sets `frame_size_override_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_size_override_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_frame_size_override_flag.set(segment, 0L, index, value); } + /// Sets `frame_size_override_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_size_override_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_frame_size_override_flag(segment, 0L, value); } + /// Sets `frame_size_override_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags frame_size_override_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_frame_size_override_flag(this.segment(), index, value); return this; } + /// Sets `frame_size_override_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags frame_size_override_flag(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_frame_size_override_flag(this.segment(), value); return this; } + + /// {@return `buffer_removal_time_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_buffer_removal_time_present_flag(MemorySegment segment, long index) { return (int) VH_buffer_removal_time_present_flag.get(segment, 0L, index); } + /// {@return `buffer_removal_time_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_buffer_removal_time_present_flag(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_buffer_removal_time_present_flag(segment, 0L); } + /// {@return `buffer_removal_time_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int buffer_removal_time_present_flagAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_buffer_removal_time_present_flag(this.segment(), index); } + /// {@return `buffer_removal_time_present_flag`} + public @CType("uint32_t : 1") int buffer_removal_time_present_flag() { return StdVideoDecodeAV1PictureInfoFlags.get_buffer_removal_time_present_flag(this.segment()); } + /// Sets `buffer_removal_time_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer_removal_time_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_buffer_removal_time_present_flag.set(segment, 0L, index, value); } + /// Sets `buffer_removal_time_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer_removal_time_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_buffer_removal_time_present_flag(segment, 0L, value); } + /// Sets `buffer_removal_time_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags buffer_removal_time_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_buffer_removal_time_present_flag(this.segment(), index, value); return this; } + /// Sets `buffer_removal_time_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags buffer_removal_time_present_flag(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_buffer_removal_time_present_flag(this.segment(), value); return this; } + + /// {@return `allow_intrabc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_allow_intrabc(MemorySegment segment, long index) { return (int) VH_allow_intrabc.get(segment, 0L, index); } + /// {@return `allow_intrabc`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_allow_intrabc(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_allow_intrabc(segment, 0L); } + /// {@return `allow_intrabc` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int allow_intrabcAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_allow_intrabc(this.segment(), index); } + /// {@return `allow_intrabc`} + public @CType("uint32_t : 1") int allow_intrabc() { return StdVideoDecodeAV1PictureInfoFlags.get_allow_intrabc(this.segment()); } + /// Sets `allow_intrabc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allow_intrabc(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_allow_intrabc.set(segment, 0L, index, value); } + /// Sets `allow_intrabc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allow_intrabc(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_intrabc(segment, 0L, value); } + /// Sets `allow_intrabc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags allow_intrabcAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_intrabc(this.segment(), index, value); return this; } + /// Sets `allow_intrabc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags allow_intrabc(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_intrabc(this.segment(), value); return this; } + + /// {@return `frame_refs_short_signaling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_frame_refs_short_signaling(MemorySegment segment, long index) { return (int) VH_frame_refs_short_signaling.get(segment, 0L, index); } + /// {@return `frame_refs_short_signaling`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_frame_refs_short_signaling(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_frame_refs_short_signaling(segment, 0L); } + /// {@return `frame_refs_short_signaling` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int frame_refs_short_signalingAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_frame_refs_short_signaling(this.segment(), index); } + /// {@return `frame_refs_short_signaling`} + public @CType("uint32_t : 1") int frame_refs_short_signaling() { return StdVideoDecodeAV1PictureInfoFlags.get_frame_refs_short_signaling(this.segment()); } + /// Sets `frame_refs_short_signaling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_refs_short_signaling(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_frame_refs_short_signaling.set(segment, 0L, index, value); } + /// Sets `frame_refs_short_signaling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_refs_short_signaling(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_frame_refs_short_signaling(segment, 0L, value); } + /// Sets `frame_refs_short_signaling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags frame_refs_short_signalingAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_frame_refs_short_signaling(this.segment(), index, value); return this; } + /// Sets `frame_refs_short_signaling` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags frame_refs_short_signaling(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_frame_refs_short_signaling(this.segment(), value); return this; } + + /// {@return `allow_high_precision_mv` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_allow_high_precision_mv(MemorySegment segment, long index) { return (int) VH_allow_high_precision_mv.get(segment, 0L, index); } + /// {@return `allow_high_precision_mv`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_allow_high_precision_mv(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_allow_high_precision_mv(segment, 0L); } + /// {@return `allow_high_precision_mv` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int allow_high_precision_mvAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_allow_high_precision_mv(this.segment(), index); } + /// {@return `allow_high_precision_mv`} + public @CType("uint32_t : 1") int allow_high_precision_mv() { return StdVideoDecodeAV1PictureInfoFlags.get_allow_high_precision_mv(this.segment()); } + /// Sets `allow_high_precision_mv` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allow_high_precision_mv(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_allow_high_precision_mv.set(segment, 0L, index, value); } + /// Sets `allow_high_precision_mv` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allow_high_precision_mv(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_high_precision_mv(segment, 0L, value); } + /// Sets `allow_high_precision_mv` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags allow_high_precision_mvAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_high_precision_mv(this.segment(), index, value); return this; } + /// Sets `allow_high_precision_mv` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags allow_high_precision_mv(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_high_precision_mv(this.segment(), value); return this; } + + /// {@return `is_motion_mode_switchable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_is_motion_mode_switchable(MemorySegment segment, long index) { return (int) VH_is_motion_mode_switchable.get(segment, 0L, index); } + /// {@return `is_motion_mode_switchable`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_is_motion_mode_switchable(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_is_motion_mode_switchable(segment, 0L); } + /// {@return `is_motion_mode_switchable` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int is_motion_mode_switchableAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_is_motion_mode_switchable(this.segment(), index); } + /// {@return `is_motion_mode_switchable`} + public @CType("uint32_t : 1") int is_motion_mode_switchable() { return StdVideoDecodeAV1PictureInfoFlags.get_is_motion_mode_switchable(this.segment()); } + /// Sets `is_motion_mode_switchable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_is_motion_mode_switchable(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_is_motion_mode_switchable.set(segment, 0L, index, value); } + /// Sets `is_motion_mode_switchable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_is_motion_mode_switchable(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_is_motion_mode_switchable(segment, 0L, value); } + /// Sets `is_motion_mode_switchable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags is_motion_mode_switchableAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_is_motion_mode_switchable(this.segment(), index, value); return this; } + /// Sets `is_motion_mode_switchable` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags is_motion_mode_switchable(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_is_motion_mode_switchable(this.segment(), value); return this; } + + /// {@return `use_ref_frame_mvs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_use_ref_frame_mvs(MemorySegment segment, long index) { return (int) VH_use_ref_frame_mvs.get(segment, 0L, index); } + /// {@return `use_ref_frame_mvs`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_use_ref_frame_mvs(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_use_ref_frame_mvs(segment, 0L); } + /// {@return `use_ref_frame_mvs` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int use_ref_frame_mvsAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_use_ref_frame_mvs(this.segment(), index); } + /// {@return `use_ref_frame_mvs`} + public @CType("uint32_t : 1") int use_ref_frame_mvs() { return StdVideoDecodeAV1PictureInfoFlags.get_use_ref_frame_mvs(this.segment()); } + /// Sets `use_ref_frame_mvs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_use_ref_frame_mvs(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_use_ref_frame_mvs.set(segment, 0L, index, value); } + /// Sets `use_ref_frame_mvs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_use_ref_frame_mvs(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_use_ref_frame_mvs(segment, 0L, value); } + /// Sets `use_ref_frame_mvs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags use_ref_frame_mvsAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_use_ref_frame_mvs(this.segment(), index, value); return this; } + /// Sets `use_ref_frame_mvs` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags use_ref_frame_mvs(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_use_ref_frame_mvs(this.segment(), value); return this; } + + /// {@return `disable_frame_end_update_cdf` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_disable_frame_end_update_cdf(MemorySegment segment, long index) { return (int) VH_disable_frame_end_update_cdf.get(segment, 0L, index); } + /// {@return `disable_frame_end_update_cdf`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_disable_frame_end_update_cdf(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_disable_frame_end_update_cdf(segment, 0L); } + /// {@return `disable_frame_end_update_cdf` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int disable_frame_end_update_cdfAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_disable_frame_end_update_cdf(this.segment(), index); } + /// {@return `disable_frame_end_update_cdf`} + public @CType("uint32_t : 1") int disable_frame_end_update_cdf() { return StdVideoDecodeAV1PictureInfoFlags.get_disable_frame_end_update_cdf(this.segment()); } + /// Sets `disable_frame_end_update_cdf` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disable_frame_end_update_cdf(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_disable_frame_end_update_cdf.set(segment, 0L, index, value); } + /// Sets `disable_frame_end_update_cdf` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disable_frame_end_update_cdf(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_disable_frame_end_update_cdf(segment, 0L, value); } + /// Sets `disable_frame_end_update_cdf` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags disable_frame_end_update_cdfAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_disable_frame_end_update_cdf(this.segment(), index, value); return this; } + /// Sets `disable_frame_end_update_cdf` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags disable_frame_end_update_cdf(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_disable_frame_end_update_cdf(this.segment(), value); return this; } + + /// {@return `allow_warped_motion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_allow_warped_motion(MemorySegment segment, long index) { return (int) VH_allow_warped_motion.get(segment, 0L, index); } + /// {@return `allow_warped_motion`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_allow_warped_motion(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_allow_warped_motion(segment, 0L); } + /// {@return `allow_warped_motion` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int allow_warped_motionAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_allow_warped_motion(this.segment(), index); } + /// {@return `allow_warped_motion`} + public @CType("uint32_t : 1") int allow_warped_motion() { return StdVideoDecodeAV1PictureInfoFlags.get_allow_warped_motion(this.segment()); } + /// Sets `allow_warped_motion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allow_warped_motion(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_allow_warped_motion.set(segment, 0L, index, value); } + /// Sets `allow_warped_motion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allow_warped_motion(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_warped_motion(segment, 0L, value); } + /// Sets `allow_warped_motion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags allow_warped_motionAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_warped_motion(this.segment(), index, value); return this; } + /// Sets `allow_warped_motion` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags allow_warped_motion(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_allow_warped_motion(this.segment(), value); return this; } + + /// {@return `reduced_tx_set` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_reduced_tx_set(MemorySegment segment, long index) { return (int) VH_reduced_tx_set.get(segment, 0L, index); } + /// {@return `reduced_tx_set`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_reduced_tx_set(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_reduced_tx_set(segment, 0L); } + /// {@return `reduced_tx_set` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int reduced_tx_setAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_reduced_tx_set(this.segment(), index); } + /// {@return `reduced_tx_set`} + public @CType("uint32_t : 1") int reduced_tx_set() { return StdVideoDecodeAV1PictureInfoFlags.get_reduced_tx_set(this.segment()); } + /// Sets `reduced_tx_set` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reduced_tx_set(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_reduced_tx_set.set(segment, 0L, index, value); } + /// Sets `reduced_tx_set` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reduced_tx_set(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_reduced_tx_set(segment, 0L, value); } + /// Sets `reduced_tx_set` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags reduced_tx_setAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_reduced_tx_set(this.segment(), index, value); return this; } + /// Sets `reduced_tx_set` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags reduced_tx_set(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_reduced_tx_set(this.segment(), value); return this; } + + /// {@return `reference_select` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_reference_select(MemorySegment segment, long index) { return (int) VH_reference_select.get(segment, 0L, index); } + /// {@return `reference_select`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_reference_select(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_reference_select(segment, 0L); } + /// {@return `reference_select` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int reference_selectAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_reference_select(this.segment(), index); } + /// {@return `reference_select`} + public @CType("uint32_t : 1") int reference_select() { return StdVideoDecodeAV1PictureInfoFlags.get_reference_select(this.segment()); } + /// Sets `reference_select` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reference_select(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_reference_select.set(segment, 0L, index, value); } + /// Sets `reference_select` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reference_select(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_reference_select(segment, 0L, value); } + /// Sets `reference_select` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags reference_selectAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_reference_select(this.segment(), index, value); return this; } + /// Sets `reference_select` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags reference_select(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_reference_select(this.segment(), value); return this; } + + /// {@return `skip_mode_present` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_skip_mode_present(MemorySegment segment, long index) { return (int) VH_skip_mode_present.get(segment, 0L, index); } + /// {@return `skip_mode_present`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_skip_mode_present(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_skip_mode_present(segment, 0L); } + /// {@return `skip_mode_present` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int skip_mode_presentAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_skip_mode_present(this.segment(), index); } + /// {@return `skip_mode_present`} + public @CType("uint32_t : 1") int skip_mode_present() { return StdVideoDecodeAV1PictureInfoFlags.get_skip_mode_present(this.segment()); } + /// Sets `skip_mode_present` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_skip_mode_present(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_skip_mode_present.set(segment, 0L, index, value); } + /// Sets `skip_mode_present` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_skip_mode_present(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_skip_mode_present(segment, 0L, value); } + /// Sets `skip_mode_present` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags skip_mode_presentAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_skip_mode_present(this.segment(), index, value); return this; } + /// Sets `skip_mode_present` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags skip_mode_present(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_skip_mode_present(this.segment(), value); return this; } + + /// {@return `delta_q_present` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_delta_q_present(MemorySegment segment, long index) { return (int) VH_delta_q_present.get(segment, 0L, index); } + /// {@return `delta_q_present`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_delta_q_present(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_delta_q_present(segment, 0L); } + /// {@return `delta_q_present` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int delta_q_presentAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_delta_q_present(this.segment(), index); } + /// {@return `delta_q_present`} + public @CType("uint32_t : 1") int delta_q_present() { return StdVideoDecodeAV1PictureInfoFlags.get_delta_q_present(this.segment()); } + /// Sets `delta_q_present` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_q_present(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_delta_q_present.set(segment, 0L, index, value); } + /// Sets `delta_q_present` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_q_present(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_delta_q_present(segment, 0L, value); } + /// Sets `delta_q_present` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags delta_q_presentAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_delta_q_present(this.segment(), index, value); return this; } + /// Sets `delta_q_present` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags delta_q_present(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_delta_q_present(this.segment(), value); return this; } + + /// {@return `delta_lf_present` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_delta_lf_present(MemorySegment segment, long index) { return (int) VH_delta_lf_present.get(segment, 0L, index); } + /// {@return `delta_lf_present`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_delta_lf_present(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_delta_lf_present(segment, 0L); } + /// {@return `delta_lf_present` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int delta_lf_presentAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_delta_lf_present(this.segment(), index); } + /// {@return `delta_lf_present`} + public @CType("uint32_t : 1") int delta_lf_present() { return StdVideoDecodeAV1PictureInfoFlags.get_delta_lf_present(this.segment()); } + /// Sets `delta_lf_present` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_lf_present(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_delta_lf_present.set(segment, 0L, index, value); } + /// Sets `delta_lf_present` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_lf_present(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_delta_lf_present(segment, 0L, value); } + /// Sets `delta_lf_present` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags delta_lf_presentAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_delta_lf_present(this.segment(), index, value); return this; } + /// Sets `delta_lf_present` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags delta_lf_present(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_delta_lf_present(this.segment(), value); return this; } + + /// {@return `delta_lf_multi` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_delta_lf_multi(MemorySegment segment, long index) { return (int) VH_delta_lf_multi.get(segment, 0L, index); } + /// {@return `delta_lf_multi`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_delta_lf_multi(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_delta_lf_multi(segment, 0L); } + /// {@return `delta_lf_multi` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int delta_lf_multiAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_delta_lf_multi(this.segment(), index); } + /// {@return `delta_lf_multi`} + public @CType("uint32_t : 1") int delta_lf_multi() { return StdVideoDecodeAV1PictureInfoFlags.get_delta_lf_multi(this.segment()); } + /// Sets `delta_lf_multi` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_lf_multi(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_delta_lf_multi.set(segment, 0L, index, value); } + /// Sets `delta_lf_multi` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_lf_multi(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_delta_lf_multi(segment, 0L, value); } + /// Sets `delta_lf_multi` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags delta_lf_multiAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_delta_lf_multi(this.segment(), index, value); return this; } + /// Sets `delta_lf_multi` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags delta_lf_multi(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_delta_lf_multi(this.segment(), value); return this; } + + /// {@return `segmentation_enabled` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_segmentation_enabled(MemorySegment segment, long index) { return (int) VH_segmentation_enabled.get(segment, 0L, index); } + /// {@return `segmentation_enabled`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_segmentation_enabled(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_enabled(segment, 0L); } + /// {@return `segmentation_enabled` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int segmentation_enabledAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_enabled(this.segment(), index); } + /// {@return `segmentation_enabled`} + public @CType("uint32_t : 1") int segmentation_enabled() { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_enabled(this.segment()); } + /// Sets `segmentation_enabled` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_segmentation_enabled(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_segmentation_enabled.set(segment, 0L, index, value); } + /// Sets `segmentation_enabled` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_segmentation_enabled(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_enabled(segment, 0L, value); } + /// Sets `segmentation_enabled` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags segmentation_enabledAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_enabled(this.segment(), index, value); return this; } + /// Sets `segmentation_enabled` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags segmentation_enabled(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_enabled(this.segment(), value); return this; } + + /// {@return `segmentation_update_map` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_segmentation_update_map(MemorySegment segment, long index) { return (int) VH_segmentation_update_map.get(segment, 0L, index); } + /// {@return `segmentation_update_map`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_segmentation_update_map(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_update_map(segment, 0L); } + /// {@return `segmentation_update_map` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int segmentation_update_mapAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_update_map(this.segment(), index); } + /// {@return `segmentation_update_map`} + public @CType("uint32_t : 1") int segmentation_update_map() { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_update_map(this.segment()); } + /// Sets `segmentation_update_map` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_segmentation_update_map(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_segmentation_update_map.set(segment, 0L, index, value); } + /// Sets `segmentation_update_map` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_segmentation_update_map(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_update_map(segment, 0L, value); } + /// Sets `segmentation_update_map` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags segmentation_update_mapAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_update_map(this.segment(), index, value); return this; } + /// Sets `segmentation_update_map` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags segmentation_update_map(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_update_map(this.segment(), value); return this; } + + /// {@return `segmentation_temporal_update` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_segmentation_temporal_update(MemorySegment segment, long index) { return (int) VH_segmentation_temporal_update.get(segment, 0L, index); } + /// {@return `segmentation_temporal_update`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_segmentation_temporal_update(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_temporal_update(segment, 0L); } + /// {@return `segmentation_temporal_update` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int segmentation_temporal_updateAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_temporal_update(this.segment(), index); } + /// {@return `segmentation_temporal_update`} + public @CType("uint32_t : 1") int segmentation_temporal_update() { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_temporal_update(this.segment()); } + /// Sets `segmentation_temporal_update` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_segmentation_temporal_update(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_segmentation_temporal_update.set(segment, 0L, index, value); } + /// Sets `segmentation_temporal_update` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_segmentation_temporal_update(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_temporal_update(segment, 0L, value); } + /// Sets `segmentation_temporal_update` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags segmentation_temporal_updateAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_temporal_update(this.segment(), index, value); return this; } + /// Sets `segmentation_temporal_update` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags segmentation_temporal_update(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_temporal_update(this.segment(), value); return this; } + + /// {@return `segmentation_update_data` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_segmentation_update_data(MemorySegment segment, long index) { return (int) VH_segmentation_update_data.get(segment, 0L, index); } + /// {@return `segmentation_update_data`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_segmentation_update_data(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_update_data(segment, 0L); } + /// {@return `segmentation_update_data` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int segmentation_update_dataAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_update_data(this.segment(), index); } + /// {@return `segmentation_update_data`} + public @CType("uint32_t : 1") int segmentation_update_data() { return StdVideoDecodeAV1PictureInfoFlags.get_segmentation_update_data(this.segment()); } + /// Sets `segmentation_update_data` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_segmentation_update_data(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_segmentation_update_data.set(segment, 0L, index, value); } + /// Sets `segmentation_update_data` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_segmentation_update_data(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_update_data(segment, 0L, value); } + /// Sets `segmentation_update_data` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags segmentation_update_dataAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_update_data(this.segment(), index, value); return this; } + /// Sets `segmentation_update_data` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags segmentation_update_data(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_segmentation_update_data(this.segment(), value); return this; } + + /// {@return `UsesLr` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_UsesLr(MemorySegment segment, long index) { return (int) VH_UsesLr.get(segment, 0L, index); } + /// {@return `UsesLr`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_UsesLr(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_UsesLr(segment, 0L); } + /// {@return `UsesLr` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int UsesLrAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_UsesLr(this.segment(), index); } + /// {@return `UsesLr`} + public @CType("uint32_t : 1") int UsesLr() { return StdVideoDecodeAV1PictureInfoFlags.get_UsesLr(this.segment()); } + /// Sets `UsesLr` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_UsesLr(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_UsesLr.set(segment, 0L, index, value); } + /// Sets `UsesLr` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_UsesLr(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_UsesLr(segment, 0L, value); } + /// Sets `UsesLr` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags UsesLrAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_UsesLr(this.segment(), index, value); return this; } + /// Sets `UsesLr` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags UsesLr(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_UsesLr(this.segment(), value); return this; } + + /// {@return `usesChromaLr` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_usesChromaLr(MemorySegment segment, long index) { return (int) VH_usesChromaLr.get(segment, 0L, index); } + /// {@return `usesChromaLr`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_usesChromaLr(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_usesChromaLr(segment, 0L); } + /// {@return `usesChromaLr` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int usesChromaLrAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_usesChromaLr(this.segment(), index); } + /// {@return `usesChromaLr`} + public @CType("uint32_t : 1") int usesChromaLr() { return StdVideoDecodeAV1PictureInfoFlags.get_usesChromaLr(this.segment()); } + /// Sets `usesChromaLr` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usesChromaLr(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_usesChromaLr.set(segment, 0L, index, value); } + /// Sets `usesChromaLr` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usesChromaLr(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_usesChromaLr(segment, 0L, value); } + /// Sets `usesChromaLr` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags usesChromaLrAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_usesChromaLr(this.segment(), index, value); return this; } + /// Sets `usesChromaLr` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags usesChromaLr(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_usesChromaLr(this.segment(), value); return this; } + + /// {@return `apply_grain` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_apply_grain(MemorySegment segment, long index) { return (int) VH_apply_grain.get(segment, 0L, index); } + /// {@return `apply_grain`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_apply_grain(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_apply_grain(segment, 0L); } + /// {@return `apply_grain` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int apply_grainAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_apply_grain(this.segment(), index); } + /// {@return `apply_grain`} + public @CType("uint32_t : 1") int apply_grain() { return StdVideoDecodeAV1PictureInfoFlags.get_apply_grain(this.segment()); } + /// Sets `apply_grain` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_apply_grain(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_apply_grain.set(segment, 0L, index, value); } + /// Sets `apply_grain` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_apply_grain(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_apply_grain(segment, 0L, value); } + /// Sets `apply_grain` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags apply_grainAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_apply_grain(this.segment(), index, value); return this; } + /// Sets `apply_grain` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags apply_grain(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1PictureInfoFlags.set_apply_grain(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 3") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 3") int get_reserved(MemorySegment segment) { return StdVideoDecodeAV1PictureInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 3") int reservedAt(long index) { return StdVideoDecodeAV1PictureInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 3") int reserved() { return StdVideoDecodeAV1PictureInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 3") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 3") int value) { StdVideoDecodeAV1PictureInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags reservedAt(long index, @CType("uint32_t : 3") int value) { StdVideoDecodeAV1PictureInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1PictureInfoFlags reserved(@CType("uint32_t : 3") int value) { StdVideoDecodeAV1PictureInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1ReferenceInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1ReferenceInfo.java new file mode 100644 index 00000000..a86f64a6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1ReferenceInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### frame_type +/// [VarHandle][#VH_frame_type] - [Getter][#frame_type()] - [Setter][#frame_type(byte)] +/// ### RefFrameSignBias +/// [VarHandle][#VH_RefFrameSignBias] - [Getter][#RefFrameSignBias()] - [Setter][#RefFrameSignBias(byte)] +/// ### OrderHint +/// [VarHandle][#VH_OrderHint] - [Getter][#OrderHint()] - [Setter][#OrderHint(byte)] +/// ### SavedOrderHints +/// [VarHandle][#VH_SavedOrderHints] - [Getter][#SavedOrderHints()] - [Setter][#SavedOrderHints(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeAV1ReferenceInfo { +/// StdVideoDecodeAV1ReferenceInfoFlags flags; +/// uint8_t frame_type; +/// uint8_t RefFrameSignBias; +/// uint8_t OrderHint; +/// uint8_t [ ] SavedOrderHints; +/// } StdVideoDecodeAV1ReferenceInfo; +/// ``` +public final class StdVideoDecodeAV1ReferenceInfo extends Struct { + /// The struct layout of `StdVideoDecodeAV1ReferenceInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoDecodeAV1ReferenceInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("frame_type"), + ValueLayout.JAVA_BYTE.withName("RefFrameSignBias"), + ValueLayout.JAVA_BYTE.withName("OrderHint"), + ValueLayout.JAVA_BYTE.withName("SavedOrderHints") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `frame_type` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_frame_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_type")); + /// The [VarHandle] of `RefFrameSignBias` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_RefFrameSignBias = LAYOUT.arrayElementVarHandle(PathElement.groupElement("RefFrameSignBias")); + /// The [VarHandle] of `OrderHint` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_OrderHint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("OrderHint")); + /// The [VarHandle] of `SavedOrderHints` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_SavedOrderHints = LAYOUT.arrayElementVarHandle(PathElement.groupElement("SavedOrderHints")); + + /// Creates `StdVideoDecodeAV1ReferenceInfo` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeAV1ReferenceInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeAV1ReferenceInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1ReferenceInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1ReferenceInfo(segment); } + + /// Creates `StdVideoDecodeAV1ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1ReferenceInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeAV1ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1ReferenceInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeAV1ReferenceInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeAV1ReferenceInfo` + public static StdVideoDecodeAV1ReferenceInfo alloc(SegmentAllocator allocator) { return new StdVideoDecodeAV1ReferenceInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeAV1ReferenceInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeAV1ReferenceInfo` + public static StdVideoDecodeAV1ReferenceInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeAV1ReferenceInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoDecodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoDecodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoDecodeAV1ReferenceInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoDecodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoDecodeAV1ReferenceInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoDecodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoDecodeAV1ReferenceInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoDecodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoDecodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1ReferenceInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfo flagsAt(long index, @CType("StdVideoDecodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1ReferenceInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfo flags(@CType("StdVideoDecodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeAV1ReferenceInfo.set_flags(this.segment(), value); return this; } + + /// {@return `frame_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_frame_type(MemorySegment segment, long index) { return (byte) VH_frame_type.get(segment, 0L, index); } + /// {@return `frame_type`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_frame_type(MemorySegment segment) { return StdVideoDecodeAV1ReferenceInfo.get_frame_type(segment, 0L); } + /// {@return `frame_type` at the given index} + /// @param index the index + public @CType("uint8_t") byte frame_typeAt(long index) { return StdVideoDecodeAV1ReferenceInfo.get_frame_type(this.segment(), index); } + /// {@return `frame_type`} + public @CType("uint8_t") byte frame_type() { return StdVideoDecodeAV1ReferenceInfo.get_frame_type(this.segment()); } + /// Sets `frame_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_type(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_frame_type.set(segment, 0L, index, value); } + /// Sets `frame_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_type(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeAV1ReferenceInfo.set_frame_type(segment, 0L, value); } + /// Sets `frame_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfo frame_typeAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeAV1ReferenceInfo.set_frame_type(this.segment(), index, value); return this; } + /// Sets `frame_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfo frame_type(@CType("uint8_t") byte value) { StdVideoDecodeAV1ReferenceInfo.set_frame_type(this.segment(), value); return this; } + + /// {@return `RefFrameSignBias` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_RefFrameSignBias(MemorySegment segment, long index) { return (byte) VH_RefFrameSignBias.get(segment, 0L, index); } + /// {@return `RefFrameSignBias`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_RefFrameSignBias(MemorySegment segment) { return StdVideoDecodeAV1ReferenceInfo.get_RefFrameSignBias(segment, 0L); } + /// {@return `RefFrameSignBias` at the given index} + /// @param index the index + public @CType("uint8_t") byte RefFrameSignBiasAt(long index) { return StdVideoDecodeAV1ReferenceInfo.get_RefFrameSignBias(this.segment(), index); } + /// {@return `RefFrameSignBias`} + public @CType("uint8_t") byte RefFrameSignBias() { return StdVideoDecodeAV1ReferenceInfo.get_RefFrameSignBias(this.segment()); } + /// Sets `RefFrameSignBias` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_RefFrameSignBias(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_RefFrameSignBias.set(segment, 0L, index, value); } + /// Sets `RefFrameSignBias` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_RefFrameSignBias(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeAV1ReferenceInfo.set_RefFrameSignBias(segment, 0L, value); } + /// Sets `RefFrameSignBias` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfo RefFrameSignBiasAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeAV1ReferenceInfo.set_RefFrameSignBias(this.segment(), index, value); return this; } + /// Sets `RefFrameSignBias` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfo RefFrameSignBias(@CType("uint8_t") byte value) { StdVideoDecodeAV1ReferenceInfo.set_RefFrameSignBias(this.segment(), value); return this; } + + /// {@return `OrderHint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_OrderHint(MemorySegment segment, long index) { return (byte) VH_OrderHint.get(segment, 0L, index); } + /// {@return `OrderHint`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_OrderHint(MemorySegment segment) { return StdVideoDecodeAV1ReferenceInfo.get_OrderHint(segment, 0L); } + /// {@return `OrderHint` at the given index} + /// @param index the index + public @CType("uint8_t") byte OrderHintAt(long index) { return StdVideoDecodeAV1ReferenceInfo.get_OrderHint(this.segment(), index); } + /// {@return `OrderHint`} + public @CType("uint8_t") byte OrderHint() { return StdVideoDecodeAV1ReferenceInfo.get_OrderHint(this.segment()); } + /// Sets `OrderHint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_OrderHint(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_OrderHint.set(segment, 0L, index, value); } + /// Sets `OrderHint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_OrderHint(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeAV1ReferenceInfo.set_OrderHint(segment, 0L, value); } + /// Sets `OrderHint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfo OrderHintAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeAV1ReferenceInfo.set_OrderHint(this.segment(), index, value); return this; } + /// Sets `OrderHint` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfo OrderHint(@CType("uint8_t") byte value) { StdVideoDecodeAV1ReferenceInfo.set_OrderHint(this.segment(), value); return this; } + + /// {@return `SavedOrderHints` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_SavedOrderHints(MemorySegment segment, long index) { return (byte) VH_SavedOrderHints.get(segment, 0L, index); } + /// {@return `SavedOrderHints`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_SavedOrderHints(MemorySegment segment) { return StdVideoDecodeAV1ReferenceInfo.get_SavedOrderHints(segment, 0L); } + /// {@return `SavedOrderHints` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte SavedOrderHintsAt(long index) { return StdVideoDecodeAV1ReferenceInfo.get_SavedOrderHints(this.segment(), index); } + /// {@return `SavedOrderHints`} + public @CType("uint8_t [ ]") byte SavedOrderHints() { return StdVideoDecodeAV1ReferenceInfo.get_SavedOrderHints(this.segment()); } + /// Sets `SavedOrderHints` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_SavedOrderHints(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_SavedOrderHints.set(segment, 0L, index, value); } + /// Sets `SavedOrderHints` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_SavedOrderHints(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoDecodeAV1ReferenceInfo.set_SavedOrderHints(segment, 0L, value); } + /// Sets `SavedOrderHints` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfo SavedOrderHintsAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoDecodeAV1ReferenceInfo.set_SavedOrderHints(this.segment(), index, value); return this; } + /// Sets `SavedOrderHints` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfo SavedOrderHints(@CType("uint8_t [ ]") byte value) { StdVideoDecodeAV1ReferenceInfo.set_SavedOrderHints(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1ReferenceInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1ReferenceInfoFlags.java new file mode 100644 index 00000000..ea7734fb --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeAV1ReferenceInfoFlags.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### disable_frame_end_update_cdf +/// [VarHandle][#VH_disable_frame_end_update_cdf] - [Getter][#disable_frame_end_update_cdf()] - [Setter][#disable_frame_end_update_cdf(int)] +/// ### segmentation_enabled +/// [VarHandle][#VH_segmentation_enabled] - [Getter][#segmentation_enabled()] - [Setter][#segmentation_enabled(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeAV1ReferenceInfoFlags { +/// uint32_t : 1 disable_frame_end_update_cdf; +/// uint32_t : 1 segmentation_enabled; +/// uint32_t : 30 reserved; +/// } StdVideoDecodeAV1ReferenceInfoFlags; +/// ``` +public final class StdVideoDecodeAV1ReferenceInfoFlags extends Struct { + /// The struct layout of `StdVideoDecodeAV1ReferenceInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("disable_frame_end_update_cdf"), + ValueLayout.JAVA_INT.withName("segmentation_enabled"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `disable_frame_end_update_cdf` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disable_frame_end_update_cdf = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disable_frame_end_update_cdf")); + /// The [VarHandle] of `segmentation_enabled` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_segmentation_enabled = LAYOUT.arrayElementVarHandle(PathElement.groupElement("segmentation_enabled")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoDecodeAV1ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeAV1ReferenceInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeAV1ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1ReferenceInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1ReferenceInfoFlags(segment); } + + /// Creates `StdVideoDecodeAV1ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1ReferenceInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeAV1ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeAV1ReferenceInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeAV1ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeAV1ReferenceInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeAV1ReferenceInfoFlags` + public static StdVideoDecodeAV1ReferenceInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoDecodeAV1ReferenceInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeAV1ReferenceInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeAV1ReferenceInfoFlags` + public static StdVideoDecodeAV1ReferenceInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeAV1ReferenceInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `disable_frame_end_update_cdf` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_disable_frame_end_update_cdf(MemorySegment segment, long index) { return (int) VH_disable_frame_end_update_cdf.get(segment, 0L, index); } + /// {@return `disable_frame_end_update_cdf`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_disable_frame_end_update_cdf(MemorySegment segment) { return StdVideoDecodeAV1ReferenceInfoFlags.get_disable_frame_end_update_cdf(segment, 0L); } + /// {@return `disable_frame_end_update_cdf` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int disable_frame_end_update_cdfAt(long index) { return StdVideoDecodeAV1ReferenceInfoFlags.get_disable_frame_end_update_cdf(this.segment(), index); } + /// {@return `disable_frame_end_update_cdf`} + public @CType("uint32_t : 1") int disable_frame_end_update_cdf() { return StdVideoDecodeAV1ReferenceInfoFlags.get_disable_frame_end_update_cdf(this.segment()); } + /// Sets `disable_frame_end_update_cdf` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disable_frame_end_update_cdf(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_disable_frame_end_update_cdf.set(segment, 0L, index, value); } + /// Sets `disable_frame_end_update_cdf` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disable_frame_end_update_cdf(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1ReferenceInfoFlags.set_disable_frame_end_update_cdf(segment, 0L, value); } + /// Sets `disable_frame_end_update_cdf` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfoFlags disable_frame_end_update_cdfAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1ReferenceInfoFlags.set_disable_frame_end_update_cdf(this.segment(), index, value); return this; } + /// Sets `disable_frame_end_update_cdf` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfoFlags disable_frame_end_update_cdf(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1ReferenceInfoFlags.set_disable_frame_end_update_cdf(this.segment(), value); return this; } + + /// {@return `segmentation_enabled` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_segmentation_enabled(MemorySegment segment, long index) { return (int) VH_segmentation_enabled.get(segment, 0L, index); } + /// {@return `segmentation_enabled`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_segmentation_enabled(MemorySegment segment) { return StdVideoDecodeAV1ReferenceInfoFlags.get_segmentation_enabled(segment, 0L); } + /// {@return `segmentation_enabled` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int segmentation_enabledAt(long index) { return StdVideoDecodeAV1ReferenceInfoFlags.get_segmentation_enabled(this.segment(), index); } + /// {@return `segmentation_enabled`} + public @CType("uint32_t : 1") int segmentation_enabled() { return StdVideoDecodeAV1ReferenceInfoFlags.get_segmentation_enabled(this.segment()); } + /// Sets `segmentation_enabled` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_segmentation_enabled(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_segmentation_enabled.set(segment, 0L, index, value); } + /// Sets `segmentation_enabled` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_segmentation_enabled(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1ReferenceInfoFlags.set_segmentation_enabled(segment, 0L, value); } + /// Sets `segmentation_enabled` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfoFlags segmentation_enabledAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeAV1ReferenceInfoFlags.set_segmentation_enabled(this.segment(), index, value); return this; } + /// Sets `segmentation_enabled` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfoFlags segmentation_enabled(@CType("uint32_t : 1") int value) { StdVideoDecodeAV1ReferenceInfoFlags.set_segmentation_enabled(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment) { return StdVideoDecodeAV1ReferenceInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 30") int reservedAt(long index) { return StdVideoDecodeAV1ReferenceInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 30") int reserved() { return StdVideoDecodeAV1ReferenceInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 30") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 30") int value) { StdVideoDecodeAV1ReferenceInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfoFlags reservedAt(long index, @CType("uint32_t : 30") int value) { StdVideoDecodeAV1ReferenceInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeAV1ReferenceInfoFlags reserved(@CType("uint32_t : 30") int value) { StdVideoDecodeAV1ReferenceInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264PictureInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264PictureInfo.java new file mode 100644 index 00000000..0a8a2425 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264PictureInfo.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### seq_parameter_set_id +/// [VarHandle][#VH_seq_parameter_set_id] - [Getter][#seq_parameter_set_id()] - [Setter][#seq_parameter_set_id(byte)] +/// ### pic_parameter_set_id +/// [VarHandle][#VH_pic_parameter_set_id] - [Getter][#pic_parameter_set_id()] - [Setter][#pic_parameter_set_id(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### reserved2 +/// [VarHandle][#VH_reserved2] - [Getter][#reserved2()] - [Setter][#reserved2(byte)] +/// ### frame_num +/// [VarHandle][#VH_frame_num] - [Getter][#frame_num()] - [Setter][#frame_num(short)] +/// ### idr_pic_id +/// [VarHandle][#VH_idr_pic_id] - [Getter][#idr_pic_id()] - [Setter][#idr_pic_id(short)] +/// ### PicOrderCnt +/// [VarHandle][#VH_PicOrderCnt] - [Getter][#PicOrderCnt()] - [Setter][#PicOrderCnt(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeH264PictureInfo { +/// StdVideoDecodeH264PictureInfoFlags flags; +/// uint8_t seq_parameter_set_id; +/// uint8_t pic_parameter_set_id; +/// uint8_t reserved1; +/// uint8_t reserved2; +/// uint16_t frame_num; +/// uint16_t idr_pic_id; +/// int32_t [ ] PicOrderCnt; +/// } StdVideoDecodeH264PictureInfo; +/// ``` +public final class StdVideoDecodeH264PictureInfo extends Struct { + /// The struct layout of `StdVideoDecodeH264PictureInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoDecodeH264PictureInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("seq_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("pic_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_BYTE.withName("reserved2"), + ValueLayout.JAVA_SHORT.withName("frame_num"), + ValueLayout.JAVA_SHORT.withName("idr_pic_id"), + ValueLayout.JAVA_INT.withName("PicOrderCnt") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `seq_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_seq_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("seq_parameter_set_id")); + /// The [VarHandle] of `pic_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pic_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_parameter_set_id")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `reserved2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved2")); + /// The [VarHandle] of `frame_num` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_frame_num = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_num")); + /// The [VarHandle] of `idr_pic_id` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_idr_pic_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("idr_pic_id")); + /// The [VarHandle] of `PicOrderCnt` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_PicOrderCnt = LAYOUT.arrayElementVarHandle(PathElement.groupElement("PicOrderCnt")); + + /// Creates `StdVideoDecodeH264PictureInfo` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeH264PictureInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeH264PictureInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264PictureInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264PictureInfo(segment); } + + /// Creates `StdVideoDecodeH264PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264PictureInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeH264PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264PictureInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeH264PictureInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeH264PictureInfo` + public static StdVideoDecodeH264PictureInfo alloc(SegmentAllocator allocator) { return new StdVideoDecodeH264PictureInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeH264PictureInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeH264PictureInfo` + public static StdVideoDecodeH264PictureInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeH264PictureInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoDecodeH264PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoDecodeH264PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoDecodeH264PictureInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoDecodeH264PictureInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoDecodeH264PictureInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoDecodeH264PictureInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoDecodeH264PictureInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoDecodeH264PictureInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoDecodeH264PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH264PictureInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo flagsAt(long index, @CType("StdVideoDecodeH264PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH264PictureInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo flags(@CType("StdVideoDecodeH264PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH264PictureInfo.set_flags(this.segment(), value); return this; } + + /// {@return `seq_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_seq_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_seq_parameter_set_id.get(segment, 0L, index); } + /// {@return `seq_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_seq_parameter_set_id(MemorySegment segment) { return StdVideoDecodeH264PictureInfo.get_seq_parameter_set_id(segment, 0L); } + /// {@return `seq_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte seq_parameter_set_idAt(long index) { return StdVideoDecodeH264PictureInfo.get_seq_parameter_set_id(this.segment(), index); } + /// {@return `seq_parameter_set_id`} + public @CType("uint8_t") byte seq_parameter_set_id() { return StdVideoDecodeH264PictureInfo.get_seq_parameter_set_id(this.segment()); } + /// Sets `seq_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_seq_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_seq_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `seq_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_seq_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_seq_parameter_set_id(segment, 0L, value); } + /// Sets `seq_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo seq_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_seq_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `seq_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo seq_parameter_set_id(@CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_seq_parameter_set_id(this.segment(), value); return this; } + + /// {@return `pic_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pic_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_pic_parameter_set_id.get(segment, 0L, index); } + /// {@return `pic_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pic_parameter_set_id(MemorySegment segment) { return StdVideoDecodeH264PictureInfo.get_pic_parameter_set_id(segment, 0L); } + /// {@return `pic_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte pic_parameter_set_idAt(long index) { return StdVideoDecodeH264PictureInfo.get_pic_parameter_set_id(this.segment(), index); } + /// {@return `pic_parameter_set_id`} + public @CType("uint8_t") byte pic_parameter_set_id() { return StdVideoDecodeH264PictureInfo.get_pic_parameter_set_id(this.segment()); } + /// Sets `pic_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pic_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `pic_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_pic_parameter_set_id(segment, 0L, value); } + /// Sets `pic_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo pic_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_pic_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `pic_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo pic_parameter_set_id(@CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_pic_parameter_set_id(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoDecodeH264PictureInfo.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoDecodeH264PictureInfo.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoDecodeH264PictureInfo.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo reserved1At(long index, @CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo reserved1(@CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_reserved1(this.segment(), value); return this; } + + /// {@return `reserved2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment, long index) { return (byte) VH_reserved2.get(segment, 0L, index); } + /// {@return `reserved2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment) { return StdVideoDecodeH264PictureInfo.get_reserved2(segment, 0L); } + /// {@return `reserved2` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved2At(long index) { return StdVideoDecodeH264PictureInfo.get_reserved2(this.segment(), index); } + /// {@return `reserved2`} + public @CType("uint8_t") byte reserved2() { return StdVideoDecodeH264PictureInfo.get_reserved2(this.segment()); } + /// Sets `reserved2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved2.set(segment, 0L, index, value); } + /// Sets `reserved2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_reserved2(segment, 0L, value); } + /// Sets `reserved2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo reserved2At(long index, @CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_reserved2(this.segment(), index, value); return this; } + /// Sets `reserved2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo reserved2(@CType("uint8_t") byte value) { StdVideoDecodeH264PictureInfo.set_reserved2(this.segment(), value); return this; } + + /// {@return `frame_num` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_frame_num(MemorySegment segment, long index) { return (short) VH_frame_num.get(segment, 0L, index); } + /// {@return `frame_num`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_frame_num(MemorySegment segment) { return StdVideoDecodeH264PictureInfo.get_frame_num(segment, 0L); } + /// {@return `frame_num` at the given index} + /// @param index the index + public @CType("uint16_t") short frame_numAt(long index) { return StdVideoDecodeH264PictureInfo.get_frame_num(this.segment(), index); } + /// {@return `frame_num`} + public @CType("uint16_t") short frame_num() { return StdVideoDecodeH264PictureInfo.get_frame_num(this.segment()); } + /// Sets `frame_num` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_num(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_frame_num.set(segment, 0L, index, value); } + /// Sets `frame_num` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_num(MemorySegment segment, @CType("uint16_t") short value) { StdVideoDecodeH264PictureInfo.set_frame_num(segment, 0L, value); } + /// Sets `frame_num` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo frame_numAt(long index, @CType("uint16_t") short value) { StdVideoDecodeH264PictureInfo.set_frame_num(this.segment(), index, value); return this; } + /// Sets `frame_num` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo frame_num(@CType("uint16_t") short value) { StdVideoDecodeH264PictureInfo.set_frame_num(this.segment(), value); return this; } + + /// {@return `idr_pic_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_idr_pic_id(MemorySegment segment, long index) { return (short) VH_idr_pic_id.get(segment, 0L, index); } + /// {@return `idr_pic_id`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_idr_pic_id(MemorySegment segment) { return StdVideoDecodeH264PictureInfo.get_idr_pic_id(segment, 0L); } + /// {@return `idr_pic_id` at the given index} + /// @param index the index + public @CType("uint16_t") short idr_pic_idAt(long index) { return StdVideoDecodeH264PictureInfo.get_idr_pic_id(this.segment(), index); } + /// {@return `idr_pic_id`} + public @CType("uint16_t") short idr_pic_id() { return StdVideoDecodeH264PictureInfo.get_idr_pic_id(this.segment()); } + /// Sets `idr_pic_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_idr_pic_id(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_idr_pic_id.set(segment, 0L, index, value); } + /// Sets `idr_pic_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_idr_pic_id(MemorySegment segment, @CType("uint16_t") short value) { StdVideoDecodeH264PictureInfo.set_idr_pic_id(segment, 0L, value); } + /// Sets `idr_pic_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo idr_pic_idAt(long index, @CType("uint16_t") short value) { StdVideoDecodeH264PictureInfo.set_idr_pic_id(this.segment(), index, value); return this; } + /// Sets `idr_pic_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo idr_pic_id(@CType("uint16_t") short value) { StdVideoDecodeH264PictureInfo.set_idr_pic_id(this.segment(), value); return this; } + + /// {@return `PicOrderCnt` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t [ ]") int get_PicOrderCnt(MemorySegment segment, long index) { return (int) VH_PicOrderCnt.get(segment, 0L, index); } + /// {@return `PicOrderCnt`} + /// @param segment the segment of the struct + public static @CType("int32_t [ ]") int get_PicOrderCnt(MemorySegment segment) { return StdVideoDecodeH264PictureInfo.get_PicOrderCnt(segment, 0L); } + /// {@return `PicOrderCnt` at the given index} + /// @param index the index + public @CType("int32_t [ ]") int PicOrderCntAt(long index) { return StdVideoDecodeH264PictureInfo.get_PicOrderCnt(this.segment(), index); } + /// {@return `PicOrderCnt`} + public @CType("int32_t [ ]") int PicOrderCnt() { return StdVideoDecodeH264PictureInfo.get_PicOrderCnt(this.segment()); } + /// Sets `PicOrderCnt` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_PicOrderCnt(MemorySegment segment, long index, @CType("int32_t [ ]") int value) { VH_PicOrderCnt.set(segment, 0L, index, value); } + /// Sets `PicOrderCnt` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_PicOrderCnt(MemorySegment segment, @CType("int32_t [ ]") int value) { StdVideoDecodeH264PictureInfo.set_PicOrderCnt(segment, 0L, value); } + /// Sets `PicOrderCnt` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo PicOrderCntAt(long index, @CType("int32_t [ ]") int value) { StdVideoDecodeH264PictureInfo.set_PicOrderCnt(this.segment(), index, value); return this; } + /// Sets `PicOrderCnt` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfo PicOrderCnt(@CType("int32_t [ ]") int value) { StdVideoDecodeH264PictureInfo.set_PicOrderCnt(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264PictureInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264PictureInfoFlags.java new file mode 100644 index 00000000..ad2cea82 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264PictureInfoFlags.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### field_pic_flag +/// [VarHandle][#VH_field_pic_flag] - [Getter][#field_pic_flag()] - [Setter][#field_pic_flag(int)] +/// ### is_intra +/// [VarHandle][#VH_is_intra] - [Getter][#is_intra()] - [Setter][#is_intra(int)] +/// ### IdrPicFlag +/// [VarHandle][#VH_IdrPicFlag] - [Getter][#IdrPicFlag()] - [Setter][#IdrPicFlag(int)] +/// ### bottom_field_flag +/// [VarHandle][#VH_bottom_field_flag] - [Getter][#bottom_field_flag()] - [Setter][#bottom_field_flag(int)] +/// ### is_reference +/// [VarHandle][#VH_is_reference] - [Getter][#is_reference()] - [Setter][#is_reference(int)] +/// ### complementary_field_pair +/// [VarHandle][#VH_complementary_field_pair] - [Getter][#complementary_field_pair()] - [Setter][#complementary_field_pair(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeH264PictureInfoFlags { +/// uint32_t : 1 field_pic_flag; +/// uint32_t : 1 is_intra; +/// uint32_t : 1 IdrPicFlag; +/// uint32_t : 1 bottom_field_flag; +/// uint32_t : 1 is_reference; +/// uint32_t : 1 complementary_field_pair; +/// } StdVideoDecodeH264PictureInfoFlags; +/// ``` +public final class StdVideoDecodeH264PictureInfoFlags extends Struct { + /// The struct layout of `StdVideoDecodeH264PictureInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("field_pic_flag"), + ValueLayout.JAVA_INT.withName("is_intra"), + ValueLayout.JAVA_INT.withName("IdrPicFlag"), + ValueLayout.JAVA_INT.withName("bottom_field_flag"), + ValueLayout.JAVA_INT.withName("is_reference"), + ValueLayout.JAVA_INT.withName("complementary_field_pair") + ); + /// The [VarHandle] of `field_pic_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_field_pic_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("field_pic_flag")); + /// The [VarHandle] of `is_intra` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_is_intra = LAYOUT.arrayElementVarHandle(PathElement.groupElement("is_intra")); + /// The [VarHandle] of `IdrPicFlag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_IdrPicFlag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("IdrPicFlag")); + /// The [VarHandle] of `bottom_field_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bottom_field_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bottom_field_flag")); + /// The [VarHandle] of `is_reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_is_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("is_reference")); + /// The [VarHandle] of `complementary_field_pair` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_complementary_field_pair = LAYOUT.arrayElementVarHandle(PathElement.groupElement("complementary_field_pair")); + + /// Creates `StdVideoDecodeH264PictureInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeH264PictureInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeH264PictureInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264PictureInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264PictureInfoFlags(segment); } + + /// Creates `StdVideoDecodeH264PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264PictureInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeH264PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264PictureInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeH264PictureInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeH264PictureInfoFlags` + public static StdVideoDecodeH264PictureInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoDecodeH264PictureInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeH264PictureInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeH264PictureInfoFlags` + public static StdVideoDecodeH264PictureInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeH264PictureInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `field_pic_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_field_pic_flag(MemorySegment segment, long index) { return (int) VH_field_pic_flag.get(segment, 0L, index); } + /// {@return `field_pic_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_field_pic_flag(MemorySegment segment) { return StdVideoDecodeH264PictureInfoFlags.get_field_pic_flag(segment, 0L); } + /// {@return `field_pic_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int field_pic_flagAt(long index) { return StdVideoDecodeH264PictureInfoFlags.get_field_pic_flag(this.segment(), index); } + /// {@return `field_pic_flag`} + public @CType("uint32_t : 1") int field_pic_flag() { return StdVideoDecodeH264PictureInfoFlags.get_field_pic_flag(this.segment()); } + /// Sets `field_pic_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_field_pic_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_field_pic_flag.set(segment, 0L, index, value); } + /// Sets `field_pic_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_field_pic_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_field_pic_flag(segment, 0L, value); } + /// Sets `field_pic_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags field_pic_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_field_pic_flag(this.segment(), index, value); return this; } + /// Sets `field_pic_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags field_pic_flag(@CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_field_pic_flag(this.segment(), value); return this; } + + /// {@return `is_intra` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_is_intra(MemorySegment segment, long index) { return (int) VH_is_intra.get(segment, 0L, index); } + /// {@return `is_intra`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_is_intra(MemorySegment segment) { return StdVideoDecodeH264PictureInfoFlags.get_is_intra(segment, 0L); } + /// {@return `is_intra` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int is_intraAt(long index) { return StdVideoDecodeH264PictureInfoFlags.get_is_intra(this.segment(), index); } + /// {@return `is_intra`} + public @CType("uint32_t : 1") int is_intra() { return StdVideoDecodeH264PictureInfoFlags.get_is_intra(this.segment()); } + /// Sets `is_intra` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_is_intra(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_is_intra.set(segment, 0L, index, value); } + /// Sets `is_intra` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_is_intra(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_is_intra(segment, 0L, value); } + /// Sets `is_intra` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags is_intraAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_is_intra(this.segment(), index, value); return this; } + /// Sets `is_intra` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags is_intra(@CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_is_intra(this.segment(), value); return this; } + + /// {@return `IdrPicFlag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_IdrPicFlag(MemorySegment segment, long index) { return (int) VH_IdrPicFlag.get(segment, 0L, index); } + /// {@return `IdrPicFlag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_IdrPicFlag(MemorySegment segment) { return StdVideoDecodeH264PictureInfoFlags.get_IdrPicFlag(segment, 0L); } + /// {@return `IdrPicFlag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int IdrPicFlagAt(long index) { return StdVideoDecodeH264PictureInfoFlags.get_IdrPicFlag(this.segment(), index); } + /// {@return `IdrPicFlag`} + public @CType("uint32_t : 1") int IdrPicFlag() { return StdVideoDecodeH264PictureInfoFlags.get_IdrPicFlag(this.segment()); } + /// Sets `IdrPicFlag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_IdrPicFlag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_IdrPicFlag.set(segment, 0L, index, value); } + /// Sets `IdrPicFlag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_IdrPicFlag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_IdrPicFlag(segment, 0L, value); } + /// Sets `IdrPicFlag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags IdrPicFlagAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_IdrPicFlag(this.segment(), index, value); return this; } + /// Sets `IdrPicFlag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags IdrPicFlag(@CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_IdrPicFlag(this.segment(), value); return this; } + + /// {@return `bottom_field_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_bottom_field_flag(MemorySegment segment, long index) { return (int) VH_bottom_field_flag.get(segment, 0L, index); } + /// {@return `bottom_field_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_bottom_field_flag(MemorySegment segment) { return StdVideoDecodeH264PictureInfoFlags.get_bottom_field_flag(segment, 0L); } + /// {@return `bottom_field_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int bottom_field_flagAt(long index) { return StdVideoDecodeH264PictureInfoFlags.get_bottom_field_flag(this.segment(), index); } + /// {@return `bottom_field_flag`} + public @CType("uint32_t : 1") int bottom_field_flag() { return StdVideoDecodeH264PictureInfoFlags.get_bottom_field_flag(this.segment()); } + /// Sets `bottom_field_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bottom_field_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_bottom_field_flag.set(segment, 0L, index, value); } + /// Sets `bottom_field_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bottom_field_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_bottom_field_flag(segment, 0L, value); } + /// Sets `bottom_field_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags bottom_field_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_bottom_field_flag(this.segment(), index, value); return this; } + /// Sets `bottom_field_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags bottom_field_flag(@CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_bottom_field_flag(this.segment(), value); return this; } + + /// {@return `is_reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_is_reference(MemorySegment segment, long index) { return (int) VH_is_reference.get(segment, 0L, index); } + /// {@return `is_reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_is_reference(MemorySegment segment) { return StdVideoDecodeH264PictureInfoFlags.get_is_reference(segment, 0L); } + /// {@return `is_reference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int is_referenceAt(long index) { return StdVideoDecodeH264PictureInfoFlags.get_is_reference(this.segment(), index); } + /// {@return `is_reference`} + public @CType("uint32_t : 1") int is_reference() { return StdVideoDecodeH264PictureInfoFlags.get_is_reference(this.segment()); } + /// Sets `is_reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_is_reference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_is_reference.set(segment, 0L, index, value); } + /// Sets `is_reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_is_reference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_is_reference(segment, 0L, value); } + /// Sets `is_reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags is_referenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_is_reference(this.segment(), index, value); return this; } + /// Sets `is_reference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags is_reference(@CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_is_reference(this.segment(), value); return this; } + + /// {@return `complementary_field_pair` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_complementary_field_pair(MemorySegment segment, long index) { return (int) VH_complementary_field_pair.get(segment, 0L, index); } + /// {@return `complementary_field_pair`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_complementary_field_pair(MemorySegment segment) { return StdVideoDecodeH264PictureInfoFlags.get_complementary_field_pair(segment, 0L); } + /// {@return `complementary_field_pair` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int complementary_field_pairAt(long index) { return StdVideoDecodeH264PictureInfoFlags.get_complementary_field_pair(this.segment(), index); } + /// {@return `complementary_field_pair`} + public @CType("uint32_t : 1") int complementary_field_pair() { return StdVideoDecodeH264PictureInfoFlags.get_complementary_field_pair(this.segment()); } + /// Sets `complementary_field_pair` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_complementary_field_pair(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_complementary_field_pair.set(segment, 0L, index, value); } + /// Sets `complementary_field_pair` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_complementary_field_pair(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_complementary_field_pair(segment, 0L, value); } + /// Sets `complementary_field_pair` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags complementary_field_pairAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_complementary_field_pair(this.segment(), index, value); return this; } + /// Sets `complementary_field_pair` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264PictureInfoFlags complementary_field_pair(@CType("uint32_t : 1") int value) { StdVideoDecodeH264PictureInfoFlags.set_complementary_field_pair(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264ReferenceInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264ReferenceInfo.java new file mode 100644 index 00000000..6af4e343 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264ReferenceInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### FrameNum +/// [VarHandle][#VH_FrameNum] - [Getter][#FrameNum()] - [Setter][#FrameNum(short)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(short)] +/// ### PicOrderCnt +/// [VarHandle][#VH_PicOrderCnt] - [Getter][#PicOrderCnt()] - [Setter][#PicOrderCnt(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeH264ReferenceInfo { +/// StdVideoDecodeH264ReferenceInfoFlags flags; +/// uint16_t FrameNum; +/// uint16_t reserved; +/// int32_t [ ] PicOrderCnt; +/// } StdVideoDecodeH264ReferenceInfo; +/// ``` +public final class StdVideoDecodeH264ReferenceInfo extends Struct { + /// The struct layout of `StdVideoDecodeH264ReferenceInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoDecodeH264ReferenceInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_SHORT.withName("FrameNum"), + ValueLayout.JAVA_SHORT.withName("reserved"), + ValueLayout.JAVA_INT.withName("PicOrderCnt") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `FrameNum` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_FrameNum = LAYOUT.arrayElementVarHandle(PathElement.groupElement("FrameNum")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + /// The [VarHandle] of `PicOrderCnt` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_PicOrderCnt = LAYOUT.arrayElementVarHandle(PathElement.groupElement("PicOrderCnt")); + + /// Creates `StdVideoDecodeH264ReferenceInfo` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeH264ReferenceInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeH264ReferenceInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264ReferenceInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264ReferenceInfo(segment); } + + /// Creates `StdVideoDecodeH264ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264ReferenceInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeH264ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264ReferenceInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeH264ReferenceInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeH264ReferenceInfo` + public static StdVideoDecodeH264ReferenceInfo alloc(SegmentAllocator allocator) { return new StdVideoDecodeH264ReferenceInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeH264ReferenceInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeH264ReferenceInfo` + public static StdVideoDecodeH264ReferenceInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeH264ReferenceInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoDecodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoDecodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoDecodeH264ReferenceInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoDecodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoDecodeH264ReferenceInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoDecodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoDecodeH264ReferenceInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoDecodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoDecodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH264ReferenceInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfo flagsAt(long index, @CType("StdVideoDecodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH264ReferenceInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfo flags(@CType("StdVideoDecodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH264ReferenceInfo.set_flags(this.segment(), value); return this; } + + /// {@return `FrameNum` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_FrameNum(MemorySegment segment, long index) { return (short) VH_FrameNum.get(segment, 0L, index); } + /// {@return `FrameNum`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_FrameNum(MemorySegment segment) { return StdVideoDecodeH264ReferenceInfo.get_FrameNum(segment, 0L); } + /// {@return `FrameNum` at the given index} + /// @param index the index + public @CType("uint16_t") short FrameNumAt(long index) { return StdVideoDecodeH264ReferenceInfo.get_FrameNum(this.segment(), index); } + /// {@return `FrameNum`} + public @CType("uint16_t") short FrameNum() { return StdVideoDecodeH264ReferenceInfo.get_FrameNum(this.segment()); } + /// Sets `FrameNum` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_FrameNum(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_FrameNum.set(segment, 0L, index, value); } + /// Sets `FrameNum` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_FrameNum(MemorySegment segment, @CType("uint16_t") short value) { StdVideoDecodeH264ReferenceInfo.set_FrameNum(segment, 0L, value); } + /// Sets `FrameNum` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfo FrameNumAt(long index, @CType("uint16_t") short value) { StdVideoDecodeH264ReferenceInfo.set_FrameNum(this.segment(), index, value); return this; } + /// Sets `FrameNum` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfo FrameNum(@CType("uint16_t") short value) { StdVideoDecodeH264ReferenceInfo.set_FrameNum(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_reserved(MemorySegment segment, long index) { return (short) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_reserved(MemorySegment segment) { return StdVideoDecodeH264ReferenceInfo.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint16_t") short reservedAt(long index) { return StdVideoDecodeH264ReferenceInfo.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint16_t") short reserved() { return StdVideoDecodeH264ReferenceInfo.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint16_t") short value) { StdVideoDecodeH264ReferenceInfo.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfo reservedAt(long index, @CType("uint16_t") short value) { StdVideoDecodeH264ReferenceInfo.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfo reserved(@CType("uint16_t") short value) { StdVideoDecodeH264ReferenceInfo.set_reserved(this.segment(), value); return this; } + + /// {@return `PicOrderCnt` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t [ ]") int get_PicOrderCnt(MemorySegment segment, long index) { return (int) VH_PicOrderCnt.get(segment, 0L, index); } + /// {@return `PicOrderCnt`} + /// @param segment the segment of the struct + public static @CType("int32_t [ ]") int get_PicOrderCnt(MemorySegment segment) { return StdVideoDecodeH264ReferenceInfo.get_PicOrderCnt(segment, 0L); } + /// {@return `PicOrderCnt` at the given index} + /// @param index the index + public @CType("int32_t [ ]") int PicOrderCntAt(long index) { return StdVideoDecodeH264ReferenceInfo.get_PicOrderCnt(this.segment(), index); } + /// {@return `PicOrderCnt`} + public @CType("int32_t [ ]") int PicOrderCnt() { return StdVideoDecodeH264ReferenceInfo.get_PicOrderCnt(this.segment()); } + /// Sets `PicOrderCnt` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_PicOrderCnt(MemorySegment segment, long index, @CType("int32_t [ ]") int value) { VH_PicOrderCnt.set(segment, 0L, index, value); } + /// Sets `PicOrderCnt` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_PicOrderCnt(MemorySegment segment, @CType("int32_t [ ]") int value) { StdVideoDecodeH264ReferenceInfo.set_PicOrderCnt(segment, 0L, value); } + /// Sets `PicOrderCnt` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfo PicOrderCntAt(long index, @CType("int32_t [ ]") int value) { StdVideoDecodeH264ReferenceInfo.set_PicOrderCnt(this.segment(), index, value); return this; } + /// Sets `PicOrderCnt` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfo PicOrderCnt(@CType("int32_t [ ]") int value) { StdVideoDecodeH264ReferenceInfo.set_PicOrderCnt(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264ReferenceInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264ReferenceInfoFlags.java new file mode 100644 index 00000000..15c04323 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH264ReferenceInfoFlags.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### top_field_flag +/// [VarHandle][#VH_top_field_flag] - [Getter][#top_field_flag()] - [Setter][#top_field_flag(int)] +/// ### bottom_field_flag +/// [VarHandle][#VH_bottom_field_flag] - [Getter][#bottom_field_flag()] - [Setter][#bottom_field_flag(int)] +/// ### used_for_long_term_reference +/// [VarHandle][#VH_used_for_long_term_reference] - [Getter][#used_for_long_term_reference()] - [Setter][#used_for_long_term_reference(int)] +/// ### is_non_existing +/// [VarHandle][#VH_is_non_existing] - [Getter][#is_non_existing()] - [Setter][#is_non_existing(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeH264ReferenceInfoFlags { +/// uint32_t : 1 top_field_flag; +/// uint32_t : 1 bottom_field_flag; +/// uint32_t : 1 used_for_long_term_reference; +/// uint32_t : 1 is_non_existing; +/// } StdVideoDecodeH264ReferenceInfoFlags; +/// ``` +public final class StdVideoDecodeH264ReferenceInfoFlags extends Struct { + /// The struct layout of `StdVideoDecodeH264ReferenceInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("top_field_flag"), + ValueLayout.JAVA_INT.withName("bottom_field_flag"), + ValueLayout.JAVA_INT.withName("used_for_long_term_reference"), + ValueLayout.JAVA_INT.withName("is_non_existing") + ); + /// The [VarHandle] of `top_field_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_top_field_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("top_field_flag")); + /// The [VarHandle] of `bottom_field_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bottom_field_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bottom_field_flag")); + /// The [VarHandle] of `used_for_long_term_reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_used_for_long_term_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("used_for_long_term_reference")); + /// The [VarHandle] of `is_non_existing` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_is_non_existing = LAYOUT.arrayElementVarHandle(PathElement.groupElement("is_non_existing")); + + /// Creates `StdVideoDecodeH264ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeH264ReferenceInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeH264ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264ReferenceInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264ReferenceInfoFlags(segment); } + + /// Creates `StdVideoDecodeH264ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264ReferenceInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeH264ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH264ReferenceInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH264ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeH264ReferenceInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeH264ReferenceInfoFlags` + public static StdVideoDecodeH264ReferenceInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoDecodeH264ReferenceInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeH264ReferenceInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeH264ReferenceInfoFlags` + public static StdVideoDecodeH264ReferenceInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeH264ReferenceInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `top_field_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_top_field_flag(MemorySegment segment, long index) { return (int) VH_top_field_flag.get(segment, 0L, index); } + /// {@return `top_field_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_top_field_flag(MemorySegment segment) { return StdVideoDecodeH264ReferenceInfoFlags.get_top_field_flag(segment, 0L); } + /// {@return `top_field_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int top_field_flagAt(long index) { return StdVideoDecodeH264ReferenceInfoFlags.get_top_field_flag(this.segment(), index); } + /// {@return `top_field_flag`} + public @CType("uint32_t : 1") int top_field_flag() { return StdVideoDecodeH264ReferenceInfoFlags.get_top_field_flag(this.segment()); } + /// Sets `top_field_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_top_field_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_top_field_flag.set(segment, 0L, index, value); } + /// Sets `top_field_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_top_field_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_top_field_flag(segment, 0L, value); } + /// Sets `top_field_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfoFlags top_field_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_top_field_flag(this.segment(), index, value); return this; } + /// Sets `top_field_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfoFlags top_field_flag(@CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_top_field_flag(this.segment(), value); return this; } + + /// {@return `bottom_field_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_bottom_field_flag(MemorySegment segment, long index) { return (int) VH_bottom_field_flag.get(segment, 0L, index); } + /// {@return `bottom_field_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_bottom_field_flag(MemorySegment segment) { return StdVideoDecodeH264ReferenceInfoFlags.get_bottom_field_flag(segment, 0L); } + /// {@return `bottom_field_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int bottom_field_flagAt(long index) { return StdVideoDecodeH264ReferenceInfoFlags.get_bottom_field_flag(this.segment(), index); } + /// {@return `bottom_field_flag`} + public @CType("uint32_t : 1") int bottom_field_flag() { return StdVideoDecodeH264ReferenceInfoFlags.get_bottom_field_flag(this.segment()); } + /// Sets `bottom_field_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bottom_field_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_bottom_field_flag.set(segment, 0L, index, value); } + /// Sets `bottom_field_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bottom_field_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_bottom_field_flag(segment, 0L, value); } + /// Sets `bottom_field_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfoFlags bottom_field_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_bottom_field_flag(this.segment(), index, value); return this; } + /// Sets `bottom_field_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfoFlags bottom_field_flag(@CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_bottom_field_flag(this.segment(), value); return this; } + + /// {@return `used_for_long_term_reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_used_for_long_term_reference(MemorySegment segment, long index) { return (int) VH_used_for_long_term_reference.get(segment, 0L, index); } + /// {@return `used_for_long_term_reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_used_for_long_term_reference(MemorySegment segment) { return StdVideoDecodeH264ReferenceInfoFlags.get_used_for_long_term_reference(segment, 0L); } + /// {@return `used_for_long_term_reference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int used_for_long_term_referenceAt(long index) { return StdVideoDecodeH264ReferenceInfoFlags.get_used_for_long_term_reference(this.segment(), index); } + /// {@return `used_for_long_term_reference`} + public @CType("uint32_t : 1") int used_for_long_term_reference() { return StdVideoDecodeH264ReferenceInfoFlags.get_used_for_long_term_reference(this.segment()); } + /// Sets `used_for_long_term_reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_used_for_long_term_reference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_used_for_long_term_reference.set(segment, 0L, index, value); } + /// Sets `used_for_long_term_reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_used_for_long_term_reference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_used_for_long_term_reference(segment, 0L, value); } + /// Sets `used_for_long_term_reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfoFlags used_for_long_term_referenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_used_for_long_term_reference(this.segment(), index, value); return this; } + /// Sets `used_for_long_term_reference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfoFlags used_for_long_term_reference(@CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_used_for_long_term_reference(this.segment(), value); return this; } + + /// {@return `is_non_existing` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_is_non_existing(MemorySegment segment, long index) { return (int) VH_is_non_existing.get(segment, 0L, index); } + /// {@return `is_non_existing`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_is_non_existing(MemorySegment segment) { return StdVideoDecodeH264ReferenceInfoFlags.get_is_non_existing(segment, 0L); } + /// {@return `is_non_existing` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int is_non_existingAt(long index) { return StdVideoDecodeH264ReferenceInfoFlags.get_is_non_existing(this.segment(), index); } + /// {@return `is_non_existing`} + public @CType("uint32_t : 1") int is_non_existing() { return StdVideoDecodeH264ReferenceInfoFlags.get_is_non_existing(this.segment()); } + /// Sets `is_non_existing` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_is_non_existing(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_is_non_existing.set(segment, 0L, index, value); } + /// Sets `is_non_existing` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_is_non_existing(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_is_non_existing(segment, 0L, value); } + /// Sets `is_non_existing` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfoFlags is_non_existingAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_is_non_existing(this.segment(), index, value); return this; } + /// Sets `is_non_existing` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH264ReferenceInfoFlags is_non_existing(@CType("uint32_t : 1") int value) { StdVideoDecodeH264ReferenceInfoFlags.set_is_non_existing(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265PictureInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265PictureInfo.java new file mode 100644 index 00000000..02b36b6e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265PictureInfo.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### sps_video_parameter_set_id +/// [VarHandle][#VH_sps_video_parameter_set_id] - [Getter][#sps_video_parameter_set_id()] - [Setter][#sps_video_parameter_set_id(byte)] +/// ### pps_seq_parameter_set_id +/// [VarHandle][#VH_pps_seq_parameter_set_id] - [Getter][#pps_seq_parameter_set_id()] - [Setter][#pps_seq_parameter_set_id(byte)] +/// ### pps_pic_parameter_set_id +/// [VarHandle][#VH_pps_pic_parameter_set_id] - [Getter][#pps_pic_parameter_set_id()] - [Setter][#pps_pic_parameter_set_id(byte)] +/// ### NumDeltaPocsOfRefRpsIdx +/// [VarHandle][#VH_NumDeltaPocsOfRefRpsIdx] - [Getter][#NumDeltaPocsOfRefRpsIdx()] - [Setter][#NumDeltaPocsOfRefRpsIdx(byte)] +/// ### PicOrderCntVal +/// [VarHandle][#VH_PicOrderCntVal] - [Getter][#PicOrderCntVal()] - [Setter][#PicOrderCntVal(int)] +/// ### NumBitsForSTRefPicSetInSlice +/// [VarHandle][#VH_NumBitsForSTRefPicSetInSlice] - [Getter][#NumBitsForSTRefPicSetInSlice()] - [Setter][#NumBitsForSTRefPicSetInSlice(short)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(short)] +/// ### RefPicSetStCurrBefore +/// [VarHandle][#VH_RefPicSetStCurrBefore] - [Getter][#RefPicSetStCurrBefore()] - [Setter][#RefPicSetStCurrBefore(byte)] +/// ### RefPicSetStCurrAfter +/// [VarHandle][#VH_RefPicSetStCurrAfter] - [Getter][#RefPicSetStCurrAfter()] - [Setter][#RefPicSetStCurrAfter(byte)] +/// ### RefPicSetLtCurr +/// [VarHandle][#VH_RefPicSetLtCurr] - [Getter][#RefPicSetLtCurr()] - [Setter][#RefPicSetLtCurr(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeH265PictureInfo { +/// StdVideoDecodeH265PictureInfoFlags flags; +/// uint8_t sps_video_parameter_set_id; +/// uint8_t pps_seq_parameter_set_id; +/// uint8_t pps_pic_parameter_set_id; +/// uint8_t NumDeltaPocsOfRefRpsIdx; +/// int32_t PicOrderCntVal; +/// uint16_t NumBitsForSTRefPicSetInSlice; +/// uint16_t reserved; +/// uint8_t [ ] RefPicSetStCurrBefore; +/// uint8_t [ ] RefPicSetStCurrAfter; +/// uint8_t [ ] RefPicSetLtCurr; +/// } StdVideoDecodeH265PictureInfo; +/// ``` +public final class StdVideoDecodeH265PictureInfo extends Struct { + /// The struct layout of `StdVideoDecodeH265PictureInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoDecodeH265PictureInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("sps_video_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("pps_seq_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("pps_pic_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("NumDeltaPocsOfRefRpsIdx"), + ValueLayout.JAVA_INT.withName("PicOrderCntVal"), + ValueLayout.JAVA_SHORT.withName("NumBitsForSTRefPicSetInSlice"), + ValueLayout.JAVA_SHORT.withName("reserved"), + ValueLayout.JAVA_BYTE.withName("RefPicSetStCurrBefore"), + ValueLayout.JAVA_BYTE.withName("RefPicSetStCurrAfter"), + ValueLayout.JAVA_BYTE.withName("RefPicSetLtCurr") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `sps_video_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_sps_video_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_video_parameter_set_id")); + /// The [VarHandle] of `pps_seq_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_seq_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_seq_parameter_set_id")); + /// The [VarHandle] of `pps_pic_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_pic_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_pic_parameter_set_id")); + /// The [VarHandle] of `NumDeltaPocsOfRefRpsIdx` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_NumDeltaPocsOfRefRpsIdx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("NumDeltaPocsOfRefRpsIdx")); + /// The [VarHandle] of `PicOrderCntVal` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_PicOrderCntVal = LAYOUT.arrayElementVarHandle(PathElement.groupElement("PicOrderCntVal")); + /// The [VarHandle] of `NumBitsForSTRefPicSetInSlice` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_NumBitsForSTRefPicSetInSlice = LAYOUT.arrayElementVarHandle(PathElement.groupElement("NumBitsForSTRefPicSetInSlice")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + /// The [VarHandle] of `RefPicSetStCurrBefore` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_RefPicSetStCurrBefore = LAYOUT.arrayElementVarHandle(PathElement.groupElement("RefPicSetStCurrBefore")); + /// The [VarHandle] of `RefPicSetStCurrAfter` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_RefPicSetStCurrAfter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("RefPicSetStCurrAfter")); + /// The [VarHandle] of `RefPicSetLtCurr` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_RefPicSetLtCurr = LAYOUT.arrayElementVarHandle(PathElement.groupElement("RefPicSetLtCurr")); + + /// Creates `StdVideoDecodeH265PictureInfo` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeH265PictureInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeH265PictureInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265PictureInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265PictureInfo(segment); } + + /// Creates `StdVideoDecodeH265PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265PictureInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeH265PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265PictureInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeH265PictureInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeH265PictureInfo` + public static StdVideoDecodeH265PictureInfo alloc(SegmentAllocator allocator) { return new StdVideoDecodeH265PictureInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeH265PictureInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeH265PictureInfo` + public static StdVideoDecodeH265PictureInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeH265PictureInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoDecodeH265PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoDecodeH265PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoDecodeH265PictureInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoDecodeH265PictureInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoDecodeH265PictureInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoDecodeH265PictureInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoDecodeH265PictureInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoDecodeH265PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH265PictureInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo flagsAt(long index, @CType("StdVideoDecodeH265PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH265PictureInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo flags(@CType("StdVideoDecodeH265PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH265PictureInfo.set_flags(this.segment(), value); return this; } + + /// {@return `sps_video_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_sps_video_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_sps_video_parameter_set_id.get(segment, 0L, index); } + /// {@return `sps_video_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_sps_video_parameter_set_id(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_sps_video_parameter_set_id(segment, 0L); } + /// {@return `sps_video_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte sps_video_parameter_set_idAt(long index) { return StdVideoDecodeH265PictureInfo.get_sps_video_parameter_set_id(this.segment(), index); } + /// {@return `sps_video_parameter_set_id`} + public @CType("uint8_t") byte sps_video_parameter_set_id() { return StdVideoDecodeH265PictureInfo.get_sps_video_parameter_set_id(this.segment()); } + /// Sets `sps_video_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_video_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_sps_video_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `sps_video_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_video_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_sps_video_parameter_set_id(segment, 0L, value); } + /// Sets `sps_video_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo sps_video_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_sps_video_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `sps_video_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo sps_video_parameter_set_id(@CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_sps_video_parameter_set_id(this.segment(), value); return this; } + + /// {@return `pps_seq_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pps_seq_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_pps_seq_parameter_set_id.get(segment, 0L, index); } + /// {@return `pps_seq_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pps_seq_parameter_set_id(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_pps_seq_parameter_set_id(segment, 0L); } + /// {@return `pps_seq_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte pps_seq_parameter_set_idAt(long index) { return StdVideoDecodeH265PictureInfo.get_pps_seq_parameter_set_id(this.segment(), index); } + /// {@return `pps_seq_parameter_set_id`} + public @CType("uint8_t") byte pps_seq_parameter_set_id() { return StdVideoDecodeH265PictureInfo.get_pps_seq_parameter_set_id(this.segment()); } + /// Sets `pps_seq_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_seq_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pps_seq_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `pps_seq_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_seq_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_pps_seq_parameter_set_id(segment, 0L, value); } + /// Sets `pps_seq_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo pps_seq_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_pps_seq_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `pps_seq_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo pps_seq_parameter_set_id(@CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_pps_seq_parameter_set_id(this.segment(), value); return this; } + + /// {@return `pps_pic_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pps_pic_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_pps_pic_parameter_set_id.get(segment, 0L, index); } + /// {@return `pps_pic_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pps_pic_parameter_set_id(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_pps_pic_parameter_set_id(segment, 0L); } + /// {@return `pps_pic_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte pps_pic_parameter_set_idAt(long index) { return StdVideoDecodeH265PictureInfo.get_pps_pic_parameter_set_id(this.segment(), index); } + /// {@return `pps_pic_parameter_set_id`} + public @CType("uint8_t") byte pps_pic_parameter_set_id() { return StdVideoDecodeH265PictureInfo.get_pps_pic_parameter_set_id(this.segment()); } + /// Sets `pps_pic_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_pic_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pps_pic_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `pps_pic_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_pic_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_pps_pic_parameter_set_id(segment, 0L, value); } + /// Sets `pps_pic_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo pps_pic_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_pps_pic_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `pps_pic_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo pps_pic_parameter_set_id(@CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_pps_pic_parameter_set_id(this.segment(), value); return this; } + + /// {@return `NumDeltaPocsOfRefRpsIdx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_NumDeltaPocsOfRefRpsIdx(MemorySegment segment, long index) { return (byte) VH_NumDeltaPocsOfRefRpsIdx.get(segment, 0L, index); } + /// {@return `NumDeltaPocsOfRefRpsIdx`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_NumDeltaPocsOfRefRpsIdx(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_NumDeltaPocsOfRefRpsIdx(segment, 0L); } + /// {@return `NumDeltaPocsOfRefRpsIdx` at the given index} + /// @param index the index + public @CType("uint8_t") byte NumDeltaPocsOfRefRpsIdxAt(long index) { return StdVideoDecodeH265PictureInfo.get_NumDeltaPocsOfRefRpsIdx(this.segment(), index); } + /// {@return `NumDeltaPocsOfRefRpsIdx`} + public @CType("uint8_t") byte NumDeltaPocsOfRefRpsIdx() { return StdVideoDecodeH265PictureInfo.get_NumDeltaPocsOfRefRpsIdx(this.segment()); } + /// Sets `NumDeltaPocsOfRefRpsIdx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_NumDeltaPocsOfRefRpsIdx(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_NumDeltaPocsOfRefRpsIdx.set(segment, 0L, index, value); } + /// Sets `NumDeltaPocsOfRefRpsIdx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_NumDeltaPocsOfRefRpsIdx(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_NumDeltaPocsOfRefRpsIdx(segment, 0L, value); } + /// Sets `NumDeltaPocsOfRefRpsIdx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo NumDeltaPocsOfRefRpsIdxAt(long index, @CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_NumDeltaPocsOfRefRpsIdx(this.segment(), index, value); return this; } + /// Sets `NumDeltaPocsOfRefRpsIdx` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo NumDeltaPocsOfRefRpsIdx(@CType("uint8_t") byte value) { StdVideoDecodeH265PictureInfo.set_NumDeltaPocsOfRefRpsIdx(this.segment(), value); return this; } + + /// {@return `PicOrderCntVal` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_PicOrderCntVal(MemorySegment segment, long index) { return (int) VH_PicOrderCntVal.get(segment, 0L, index); } + /// {@return `PicOrderCntVal`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_PicOrderCntVal(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_PicOrderCntVal(segment, 0L); } + /// {@return `PicOrderCntVal` at the given index} + /// @param index the index + public @CType("int32_t") int PicOrderCntValAt(long index) { return StdVideoDecodeH265PictureInfo.get_PicOrderCntVal(this.segment(), index); } + /// {@return `PicOrderCntVal`} + public @CType("int32_t") int PicOrderCntVal() { return StdVideoDecodeH265PictureInfo.get_PicOrderCntVal(this.segment()); } + /// Sets `PicOrderCntVal` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_PicOrderCntVal(MemorySegment segment, long index, @CType("int32_t") int value) { VH_PicOrderCntVal.set(segment, 0L, index, value); } + /// Sets `PicOrderCntVal` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_PicOrderCntVal(MemorySegment segment, @CType("int32_t") int value) { StdVideoDecodeH265PictureInfo.set_PicOrderCntVal(segment, 0L, value); } + /// Sets `PicOrderCntVal` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo PicOrderCntValAt(long index, @CType("int32_t") int value) { StdVideoDecodeH265PictureInfo.set_PicOrderCntVal(this.segment(), index, value); return this; } + /// Sets `PicOrderCntVal` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo PicOrderCntVal(@CType("int32_t") int value) { StdVideoDecodeH265PictureInfo.set_PicOrderCntVal(this.segment(), value); return this; } + + /// {@return `NumBitsForSTRefPicSetInSlice` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_NumBitsForSTRefPicSetInSlice(MemorySegment segment, long index) { return (short) VH_NumBitsForSTRefPicSetInSlice.get(segment, 0L, index); } + /// {@return `NumBitsForSTRefPicSetInSlice`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_NumBitsForSTRefPicSetInSlice(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_NumBitsForSTRefPicSetInSlice(segment, 0L); } + /// {@return `NumBitsForSTRefPicSetInSlice` at the given index} + /// @param index the index + public @CType("uint16_t") short NumBitsForSTRefPicSetInSliceAt(long index) { return StdVideoDecodeH265PictureInfo.get_NumBitsForSTRefPicSetInSlice(this.segment(), index); } + /// {@return `NumBitsForSTRefPicSetInSlice`} + public @CType("uint16_t") short NumBitsForSTRefPicSetInSlice() { return StdVideoDecodeH265PictureInfo.get_NumBitsForSTRefPicSetInSlice(this.segment()); } + /// Sets `NumBitsForSTRefPicSetInSlice` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_NumBitsForSTRefPicSetInSlice(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_NumBitsForSTRefPicSetInSlice.set(segment, 0L, index, value); } + /// Sets `NumBitsForSTRefPicSetInSlice` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_NumBitsForSTRefPicSetInSlice(MemorySegment segment, @CType("uint16_t") short value) { StdVideoDecodeH265PictureInfo.set_NumBitsForSTRefPicSetInSlice(segment, 0L, value); } + /// Sets `NumBitsForSTRefPicSetInSlice` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo NumBitsForSTRefPicSetInSliceAt(long index, @CType("uint16_t") short value) { StdVideoDecodeH265PictureInfo.set_NumBitsForSTRefPicSetInSlice(this.segment(), index, value); return this; } + /// Sets `NumBitsForSTRefPicSetInSlice` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo NumBitsForSTRefPicSetInSlice(@CType("uint16_t") short value) { StdVideoDecodeH265PictureInfo.set_NumBitsForSTRefPicSetInSlice(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_reserved(MemorySegment segment, long index) { return (short) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_reserved(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint16_t") short reservedAt(long index) { return StdVideoDecodeH265PictureInfo.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint16_t") short reserved() { return StdVideoDecodeH265PictureInfo.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint16_t") short value) { StdVideoDecodeH265PictureInfo.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo reservedAt(long index, @CType("uint16_t") short value) { StdVideoDecodeH265PictureInfo.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo reserved(@CType("uint16_t") short value) { StdVideoDecodeH265PictureInfo.set_reserved(this.segment(), value); return this; } + + /// {@return `RefPicSetStCurrBefore` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_RefPicSetStCurrBefore(MemorySegment segment, long index) { return (byte) VH_RefPicSetStCurrBefore.get(segment, 0L, index); } + /// {@return `RefPicSetStCurrBefore`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_RefPicSetStCurrBefore(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_RefPicSetStCurrBefore(segment, 0L); } + /// {@return `RefPicSetStCurrBefore` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte RefPicSetStCurrBeforeAt(long index) { return StdVideoDecodeH265PictureInfo.get_RefPicSetStCurrBefore(this.segment(), index); } + /// {@return `RefPicSetStCurrBefore`} + public @CType("uint8_t [ ]") byte RefPicSetStCurrBefore() { return StdVideoDecodeH265PictureInfo.get_RefPicSetStCurrBefore(this.segment()); } + /// Sets `RefPicSetStCurrBefore` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_RefPicSetStCurrBefore(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_RefPicSetStCurrBefore.set(segment, 0L, index, value); } + /// Sets `RefPicSetStCurrBefore` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_RefPicSetStCurrBefore(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoDecodeH265PictureInfo.set_RefPicSetStCurrBefore(segment, 0L, value); } + /// Sets `RefPicSetStCurrBefore` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo RefPicSetStCurrBeforeAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoDecodeH265PictureInfo.set_RefPicSetStCurrBefore(this.segment(), index, value); return this; } + /// Sets `RefPicSetStCurrBefore` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo RefPicSetStCurrBefore(@CType("uint8_t [ ]") byte value) { StdVideoDecodeH265PictureInfo.set_RefPicSetStCurrBefore(this.segment(), value); return this; } + + /// {@return `RefPicSetStCurrAfter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_RefPicSetStCurrAfter(MemorySegment segment, long index) { return (byte) VH_RefPicSetStCurrAfter.get(segment, 0L, index); } + /// {@return `RefPicSetStCurrAfter`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_RefPicSetStCurrAfter(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_RefPicSetStCurrAfter(segment, 0L); } + /// {@return `RefPicSetStCurrAfter` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte RefPicSetStCurrAfterAt(long index) { return StdVideoDecodeH265PictureInfo.get_RefPicSetStCurrAfter(this.segment(), index); } + /// {@return `RefPicSetStCurrAfter`} + public @CType("uint8_t [ ]") byte RefPicSetStCurrAfter() { return StdVideoDecodeH265PictureInfo.get_RefPicSetStCurrAfter(this.segment()); } + /// Sets `RefPicSetStCurrAfter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_RefPicSetStCurrAfter(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_RefPicSetStCurrAfter.set(segment, 0L, index, value); } + /// Sets `RefPicSetStCurrAfter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_RefPicSetStCurrAfter(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoDecodeH265PictureInfo.set_RefPicSetStCurrAfter(segment, 0L, value); } + /// Sets `RefPicSetStCurrAfter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo RefPicSetStCurrAfterAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoDecodeH265PictureInfo.set_RefPicSetStCurrAfter(this.segment(), index, value); return this; } + /// Sets `RefPicSetStCurrAfter` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo RefPicSetStCurrAfter(@CType("uint8_t [ ]") byte value) { StdVideoDecodeH265PictureInfo.set_RefPicSetStCurrAfter(this.segment(), value); return this; } + + /// {@return `RefPicSetLtCurr` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_RefPicSetLtCurr(MemorySegment segment, long index) { return (byte) VH_RefPicSetLtCurr.get(segment, 0L, index); } + /// {@return `RefPicSetLtCurr`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_RefPicSetLtCurr(MemorySegment segment) { return StdVideoDecodeH265PictureInfo.get_RefPicSetLtCurr(segment, 0L); } + /// {@return `RefPicSetLtCurr` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte RefPicSetLtCurrAt(long index) { return StdVideoDecodeH265PictureInfo.get_RefPicSetLtCurr(this.segment(), index); } + /// {@return `RefPicSetLtCurr`} + public @CType("uint8_t [ ]") byte RefPicSetLtCurr() { return StdVideoDecodeH265PictureInfo.get_RefPicSetLtCurr(this.segment()); } + /// Sets `RefPicSetLtCurr` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_RefPicSetLtCurr(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_RefPicSetLtCurr.set(segment, 0L, index, value); } + /// Sets `RefPicSetLtCurr` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_RefPicSetLtCurr(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoDecodeH265PictureInfo.set_RefPicSetLtCurr(segment, 0L, value); } + /// Sets `RefPicSetLtCurr` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo RefPicSetLtCurrAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoDecodeH265PictureInfo.set_RefPicSetLtCurr(this.segment(), index, value); return this; } + /// Sets `RefPicSetLtCurr` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfo RefPicSetLtCurr(@CType("uint8_t [ ]") byte value) { StdVideoDecodeH265PictureInfo.set_RefPicSetLtCurr(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265PictureInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265PictureInfoFlags.java new file mode 100644 index 00000000..fca8628f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265PictureInfoFlags.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### IrapPicFlag +/// [VarHandle][#VH_IrapPicFlag] - [Getter][#IrapPicFlag()] - [Setter][#IrapPicFlag(int)] +/// ### IdrPicFlag +/// [VarHandle][#VH_IdrPicFlag] - [Getter][#IdrPicFlag()] - [Setter][#IdrPicFlag(int)] +/// ### IsReference +/// [VarHandle][#VH_IsReference] - [Getter][#IsReference()] - [Setter][#IsReference(int)] +/// ### short_term_ref_pic_set_sps_flag +/// [VarHandle][#VH_short_term_ref_pic_set_sps_flag] - [Getter][#short_term_ref_pic_set_sps_flag()] - [Setter][#short_term_ref_pic_set_sps_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeH265PictureInfoFlags { +/// uint32_t : 1 IrapPicFlag; +/// uint32_t : 1 IdrPicFlag; +/// uint32_t : 1 IsReference; +/// uint32_t : 1 short_term_ref_pic_set_sps_flag; +/// } StdVideoDecodeH265PictureInfoFlags; +/// ``` +public final class StdVideoDecodeH265PictureInfoFlags extends Struct { + /// The struct layout of `StdVideoDecodeH265PictureInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("IrapPicFlag"), + ValueLayout.JAVA_INT.withName("IdrPicFlag"), + ValueLayout.JAVA_INT.withName("IsReference"), + ValueLayout.JAVA_INT.withName("short_term_ref_pic_set_sps_flag") + ); + /// The [VarHandle] of `IrapPicFlag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_IrapPicFlag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("IrapPicFlag")); + /// The [VarHandle] of `IdrPicFlag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_IdrPicFlag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("IdrPicFlag")); + /// The [VarHandle] of `IsReference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_IsReference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("IsReference")); + /// The [VarHandle] of `short_term_ref_pic_set_sps_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_short_term_ref_pic_set_sps_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("short_term_ref_pic_set_sps_flag")); + + /// Creates `StdVideoDecodeH265PictureInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeH265PictureInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeH265PictureInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265PictureInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265PictureInfoFlags(segment); } + + /// Creates `StdVideoDecodeH265PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265PictureInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeH265PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265PictureInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeH265PictureInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeH265PictureInfoFlags` + public static StdVideoDecodeH265PictureInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoDecodeH265PictureInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeH265PictureInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeH265PictureInfoFlags` + public static StdVideoDecodeH265PictureInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeH265PictureInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `IrapPicFlag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_IrapPicFlag(MemorySegment segment, long index) { return (int) VH_IrapPicFlag.get(segment, 0L, index); } + /// {@return `IrapPicFlag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_IrapPicFlag(MemorySegment segment) { return StdVideoDecodeH265PictureInfoFlags.get_IrapPicFlag(segment, 0L); } + /// {@return `IrapPicFlag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int IrapPicFlagAt(long index) { return StdVideoDecodeH265PictureInfoFlags.get_IrapPicFlag(this.segment(), index); } + /// {@return `IrapPicFlag`} + public @CType("uint32_t : 1") int IrapPicFlag() { return StdVideoDecodeH265PictureInfoFlags.get_IrapPicFlag(this.segment()); } + /// Sets `IrapPicFlag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_IrapPicFlag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_IrapPicFlag.set(segment, 0L, index, value); } + /// Sets `IrapPicFlag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_IrapPicFlag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_IrapPicFlag(segment, 0L, value); } + /// Sets `IrapPicFlag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfoFlags IrapPicFlagAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_IrapPicFlag(this.segment(), index, value); return this; } + /// Sets `IrapPicFlag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfoFlags IrapPicFlag(@CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_IrapPicFlag(this.segment(), value); return this; } + + /// {@return `IdrPicFlag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_IdrPicFlag(MemorySegment segment, long index) { return (int) VH_IdrPicFlag.get(segment, 0L, index); } + /// {@return `IdrPicFlag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_IdrPicFlag(MemorySegment segment) { return StdVideoDecodeH265PictureInfoFlags.get_IdrPicFlag(segment, 0L); } + /// {@return `IdrPicFlag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int IdrPicFlagAt(long index) { return StdVideoDecodeH265PictureInfoFlags.get_IdrPicFlag(this.segment(), index); } + /// {@return `IdrPicFlag`} + public @CType("uint32_t : 1") int IdrPicFlag() { return StdVideoDecodeH265PictureInfoFlags.get_IdrPicFlag(this.segment()); } + /// Sets `IdrPicFlag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_IdrPicFlag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_IdrPicFlag.set(segment, 0L, index, value); } + /// Sets `IdrPicFlag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_IdrPicFlag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_IdrPicFlag(segment, 0L, value); } + /// Sets `IdrPicFlag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfoFlags IdrPicFlagAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_IdrPicFlag(this.segment(), index, value); return this; } + /// Sets `IdrPicFlag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfoFlags IdrPicFlag(@CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_IdrPicFlag(this.segment(), value); return this; } + + /// {@return `IsReference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_IsReference(MemorySegment segment, long index) { return (int) VH_IsReference.get(segment, 0L, index); } + /// {@return `IsReference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_IsReference(MemorySegment segment) { return StdVideoDecodeH265PictureInfoFlags.get_IsReference(segment, 0L); } + /// {@return `IsReference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int IsReferenceAt(long index) { return StdVideoDecodeH265PictureInfoFlags.get_IsReference(this.segment(), index); } + /// {@return `IsReference`} + public @CType("uint32_t : 1") int IsReference() { return StdVideoDecodeH265PictureInfoFlags.get_IsReference(this.segment()); } + /// Sets `IsReference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_IsReference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_IsReference.set(segment, 0L, index, value); } + /// Sets `IsReference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_IsReference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_IsReference(segment, 0L, value); } + /// Sets `IsReference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfoFlags IsReferenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_IsReference(this.segment(), index, value); return this; } + /// Sets `IsReference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfoFlags IsReference(@CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_IsReference(this.segment(), value); return this; } + + /// {@return `short_term_ref_pic_set_sps_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_short_term_ref_pic_set_sps_flag(MemorySegment segment, long index) { return (int) VH_short_term_ref_pic_set_sps_flag.get(segment, 0L, index); } + /// {@return `short_term_ref_pic_set_sps_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_short_term_ref_pic_set_sps_flag(MemorySegment segment) { return StdVideoDecodeH265PictureInfoFlags.get_short_term_ref_pic_set_sps_flag(segment, 0L); } + /// {@return `short_term_ref_pic_set_sps_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int short_term_ref_pic_set_sps_flagAt(long index) { return StdVideoDecodeH265PictureInfoFlags.get_short_term_ref_pic_set_sps_flag(this.segment(), index); } + /// {@return `short_term_ref_pic_set_sps_flag`} + public @CType("uint32_t : 1") int short_term_ref_pic_set_sps_flag() { return StdVideoDecodeH265PictureInfoFlags.get_short_term_ref_pic_set_sps_flag(this.segment()); } + /// Sets `short_term_ref_pic_set_sps_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_short_term_ref_pic_set_sps_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_short_term_ref_pic_set_sps_flag.set(segment, 0L, index, value); } + /// Sets `short_term_ref_pic_set_sps_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_short_term_ref_pic_set_sps_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_short_term_ref_pic_set_sps_flag(segment, 0L, value); } + /// Sets `short_term_ref_pic_set_sps_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfoFlags short_term_ref_pic_set_sps_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_short_term_ref_pic_set_sps_flag(this.segment(), index, value); return this; } + /// Sets `short_term_ref_pic_set_sps_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265PictureInfoFlags short_term_ref_pic_set_sps_flag(@CType("uint32_t : 1") int value) { StdVideoDecodeH265PictureInfoFlags.set_short_term_ref_pic_set_sps_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265ReferenceInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265ReferenceInfo.java new file mode 100644 index 00000000..792d6269 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265ReferenceInfo.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### PicOrderCntVal +/// [VarHandle][#VH_PicOrderCntVal] - [Getter][#PicOrderCntVal()] - [Setter][#PicOrderCntVal(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeH265ReferenceInfo { +/// StdVideoDecodeH265ReferenceInfoFlags flags; +/// int32_t PicOrderCntVal; +/// } StdVideoDecodeH265ReferenceInfo; +/// ``` +public final class StdVideoDecodeH265ReferenceInfo extends Struct { + /// The struct layout of `StdVideoDecodeH265ReferenceInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoDecodeH265ReferenceInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("PicOrderCntVal") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `PicOrderCntVal` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_PicOrderCntVal = LAYOUT.arrayElementVarHandle(PathElement.groupElement("PicOrderCntVal")); + + /// Creates `StdVideoDecodeH265ReferenceInfo` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeH265ReferenceInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeH265ReferenceInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265ReferenceInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265ReferenceInfo(segment); } + + /// Creates `StdVideoDecodeH265ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265ReferenceInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeH265ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265ReferenceInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeH265ReferenceInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeH265ReferenceInfo` + public static StdVideoDecodeH265ReferenceInfo alloc(SegmentAllocator allocator) { return new StdVideoDecodeH265ReferenceInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeH265ReferenceInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeH265ReferenceInfo` + public static StdVideoDecodeH265ReferenceInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeH265ReferenceInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoDecodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoDecodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoDecodeH265ReferenceInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoDecodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoDecodeH265ReferenceInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoDecodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoDecodeH265ReferenceInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoDecodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoDecodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH265ReferenceInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265ReferenceInfo flagsAt(long index, @CType("StdVideoDecodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH265ReferenceInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265ReferenceInfo flags(@CType("StdVideoDecodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoDecodeH265ReferenceInfo.set_flags(this.segment(), value); return this; } + + /// {@return `PicOrderCntVal` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_PicOrderCntVal(MemorySegment segment, long index) { return (int) VH_PicOrderCntVal.get(segment, 0L, index); } + /// {@return `PicOrderCntVal`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_PicOrderCntVal(MemorySegment segment) { return StdVideoDecodeH265ReferenceInfo.get_PicOrderCntVal(segment, 0L); } + /// {@return `PicOrderCntVal` at the given index} + /// @param index the index + public @CType("int32_t") int PicOrderCntValAt(long index) { return StdVideoDecodeH265ReferenceInfo.get_PicOrderCntVal(this.segment(), index); } + /// {@return `PicOrderCntVal`} + public @CType("int32_t") int PicOrderCntVal() { return StdVideoDecodeH265ReferenceInfo.get_PicOrderCntVal(this.segment()); } + /// Sets `PicOrderCntVal` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_PicOrderCntVal(MemorySegment segment, long index, @CType("int32_t") int value) { VH_PicOrderCntVal.set(segment, 0L, index, value); } + /// Sets `PicOrderCntVal` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_PicOrderCntVal(MemorySegment segment, @CType("int32_t") int value) { StdVideoDecodeH265ReferenceInfo.set_PicOrderCntVal(segment, 0L, value); } + /// Sets `PicOrderCntVal` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265ReferenceInfo PicOrderCntValAt(long index, @CType("int32_t") int value) { StdVideoDecodeH265ReferenceInfo.set_PicOrderCntVal(this.segment(), index, value); return this; } + /// Sets `PicOrderCntVal` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265ReferenceInfo PicOrderCntVal(@CType("int32_t") int value) { StdVideoDecodeH265ReferenceInfo.set_PicOrderCntVal(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265ReferenceInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265ReferenceInfoFlags.java new file mode 100644 index 00000000..82891679 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoDecodeH265ReferenceInfoFlags.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### used_for_long_term_reference +/// [VarHandle][#VH_used_for_long_term_reference] - [Getter][#used_for_long_term_reference()] - [Setter][#used_for_long_term_reference(int)] +/// ### unused_for_reference +/// [VarHandle][#VH_unused_for_reference] - [Getter][#unused_for_reference()] - [Setter][#unused_for_reference(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoDecodeH265ReferenceInfoFlags { +/// uint32_t : 1 used_for_long_term_reference; +/// uint32_t : 1 unused_for_reference; +/// } StdVideoDecodeH265ReferenceInfoFlags; +/// ``` +public final class StdVideoDecodeH265ReferenceInfoFlags extends Struct { + /// The struct layout of `StdVideoDecodeH265ReferenceInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("used_for_long_term_reference"), + ValueLayout.JAVA_INT.withName("unused_for_reference") + ); + /// The [VarHandle] of `used_for_long_term_reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_used_for_long_term_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("used_for_long_term_reference")); + /// The [VarHandle] of `unused_for_reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_unused_for_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("unused_for_reference")); + + /// Creates `StdVideoDecodeH265ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoDecodeH265ReferenceInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoDecodeH265ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265ReferenceInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265ReferenceInfoFlags(segment); } + + /// Creates `StdVideoDecodeH265ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265ReferenceInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoDecodeH265ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoDecodeH265ReferenceInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoDecodeH265ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoDecodeH265ReferenceInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoDecodeH265ReferenceInfoFlags` + public static StdVideoDecodeH265ReferenceInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoDecodeH265ReferenceInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoDecodeH265ReferenceInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoDecodeH265ReferenceInfoFlags` + public static StdVideoDecodeH265ReferenceInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoDecodeH265ReferenceInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `used_for_long_term_reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_used_for_long_term_reference(MemorySegment segment, long index) { return (int) VH_used_for_long_term_reference.get(segment, 0L, index); } + /// {@return `used_for_long_term_reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_used_for_long_term_reference(MemorySegment segment) { return StdVideoDecodeH265ReferenceInfoFlags.get_used_for_long_term_reference(segment, 0L); } + /// {@return `used_for_long_term_reference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int used_for_long_term_referenceAt(long index) { return StdVideoDecodeH265ReferenceInfoFlags.get_used_for_long_term_reference(this.segment(), index); } + /// {@return `used_for_long_term_reference`} + public @CType("uint32_t : 1") int used_for_long_term_reference() { return StdVideoDecodeH265ReferenceInfoFlags.get_used_for_long_term_reference(this.segment()); } + /// Sets `used_for_long_term_reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_used_for_long_term_reference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_used_for_long_term_reference.set(segment, 0L, index, value); } + /// Sets `used_for_long_term_reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_used_for_long_term_reference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH265ReferenceInfoFlags.set_used_for_long_term_reference(segment, 0L, value); } + /// Sets `used_for_long_term_reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265ReferenceInfoFlags used_for_long_term_referenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH265ReferenceInfoFlags.set_used_for_long_term_reference(this.segment(), index, value); return this; } + /// Sets `used_for_long_term_reference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265ReferenceInfoFlags used_for_long_term_reference(@CType("uint32_t : 1") int value) { StdVideoDecodeH265ReferenceInfoFlags.set_used_for_long_term_reference(this.segment(), value); return this; } + + /// {@return `unused_for_reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_unused_for_reference(MemorySegment segment, long index) { return (int) VH_unused_for_reference.get(segment, 0L, index); } + /// {@return `unused_for_reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_unused_for_reference(MemorySegment segment) { return StdVideoDecodeH265ReferenceInfoFlags.get_unused_for_reference(segment, 0L); } + /// {@return `unused_for_reference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int unused_for_referenceAt(long index) { return StdVideoDecodeH265ReferenceInfoFlags.get_unused_for_reference(this.segment(), index); } + /// {@return `unused_for_reference`} + public @CType("uint32_t : 1") int unused_for_reference() { return StdVideoDecodeH265ReferenceInfoFlags.get_unused_for_reference(this.segment()); } + /// Sets `unused_for_reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_unused_for_reference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_unused_for_reference.set(segment, 0L, index, value); } + /// Sets `unused_for_reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_unused_for_reference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoDecodeH265ReferenceInfoFlags.set_unused_for_reference(segment, 0L, value); } + /// Sets `unused_for_reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoDecodeH265ReferenceInfoFlags unused_for_referenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoDecodeH265ReferenceInfoFlags.set_unused_for_reference(this.segment(), index, value); return this; } + /// Sets `unused_for_reference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoDecodeH265ReferenceInfoFlags unused_for_reference(@CType("uint32_t : 1") int value) { StdVideoDecodeH265ReferenceInfoFlags.set_unused_for_reference(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1DecoderModelInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1DecoderModelInfo.java new file mode 100644 index 00000000..81ef0168 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1DecoderModelInfo.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### buffer_delay_length_minus_1 +/// [VarHandle][#VH_buffer_delay_length_minus_1] - [Getter][#buffer_delay_length_minus_1()] - [Setter][#buffer_delay_length_minus_1(byte)] +/// ### buffer_removal_time_length_minus_1 +/// [VarHandle][#VH_buffer_removal_time_length_minus_1] - [Getter][#buffer_removal_time_length_minus_1()] - [Setter][#buffer_removal_time_length_minus_1(byte)] +/// ### frame_presentation_time_length_minus_1 +/// [VarHandle][#VH_frame_presentation_time_length_minus_1] - [Getter][#frame_presentation_time_length_minus_1()] - [Setter][#frame_presentation_time_length_minus_1(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### num_units_in_decoding_tick +/// [VarHandle][#VH_num_units_in_decoding_tick] - [Getter][#num_units_in_decoding_tick()] - [Setter][#num_units_in_decoding_tick(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeAV1DecoderModelInfo { +/// uint8_t buffer_delay_length_minus_1; +/// uint8_t buffer_removal_time_length_minus_1; +/// uint8_t frame_presentation_time_length_minus_1; +/// uint8_t reserved1; +/// uint32_t num_units_in_decoding_tick; +/// } StdVideoEncodeAV1DecoderModelInfo; +/// ``` +public final class StdVideoEncodeAV1DecoderModelInfo extends Struct { + /// The struct layout of `StdVideoEncodeAV1DecoderModelInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_BYTE.withName("buffer_delay_length_minus_1"), + ValueLayout.JAVA_BYTE.withName("buffer_removal_time_length_minus_1"), + ValueLayout.JAVA_BYTE.withName("frame_presentation_time_length_minus_1"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_INT.withName("num_units_in_decoding_tick") + ); + /// The [VarHandle] of `buffer_delay_length_minus_1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_buffer_delay_length_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer_delay_length_minus_1")); + /// The [VarHandle] of `buffer_removal_time_length_minus_1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_buffer_removal_time_length_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer_removal_time_length_minus_1")); + /// The [VarHandle] of `frame_presentation_time_length_minus_1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_frame_presentation_time_length_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_presentation_time_length_minus_1")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `num_units_in_decoding_tick` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_num_units_in_decoding_tick = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_units_in_decoding_tick")); + + /// Creates `StdVideoEncodeAV1DecoderModelInfo` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeAV1DecoderModelInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeAV1DecoderModelInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1DecoderModelInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1DecoderModelInfo(segment); } + + /// Creates `StdVideoEncodeAV1DecoderModelInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1DecoderModelInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1DecoderModelInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeAV1DecoderModelInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1DecoderModelInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1DecoderModelInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeAV1DecoderModelInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeAV1DecoderModelInfo` + public static StdVideoEncodeAV1DecoderModelInfo alloc(SegmentAllocator allocator) { return new StdVideoEncodeAV1DecoderModelInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeAV1DecoderModelInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeAV1DecoderModelInfo` + public static StdVideoEncodeAV1DecoderModelInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeAV1DecoderModelInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `buffer_delay_length_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_buffer_delay_length_minus_1(MemorySegment segment, long index) { return (byte) VH_buffer_delay_length_minus_1.get(segment, 0L, index); } + /// {@return `buffer_delay_length_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_buffer_delay_length_minus_1(MemorySegment segment) { return StdVideoEncodeAV1DecoderModelInfo.get_buffer_delay_length_minus_1(segment, 0L); } + /// {@return `buffer_delay_length_minus_1` at the given index} + /// @param index the index + public @CType("uint8_t") byte buffer_delay_length_minus_1At(long index) { return StdVideoEncodeAV1DecoderModelInfo.get_buffer_delay_length_minus_1(this.segment(), index); } + /// {@return `buffer_delay_length_minus_1`} + public @CType("uint8_t") byte buffer_delay_length_minus_1() { return StdVideoEncodeAV1DecoderModelInfo.get_buffer_delay_length_minus_1(this.segment()); } + /// Sets `buffer_delay_length_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer_delay_length_minus_1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_buffer_delay_length_minus_1.set(segment, 0L, index, value); } + /// Sets `buffer_delay_length_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer_delay_length_minus_1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_buffer_delay_length_minus_1(segment, 0L, value); } + /// Sets `buffer_delay_length_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1DecoderModelInfo buffer_delay_length_minus_1At(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_buffer_delay_length_minus_1(this.segment(), index, value); return this; } + /// Sets `buffer_delay_length_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1DecoderModelInfo buffer_delay_length_minus_1(@CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_buffer_delay_length_minus_1(this.segment(), value); return this; } + + /// {@return `buffer_removal_time_length_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_buffer_removal_time_length_minus_1(MemorySegment segment, long index) { return (byte) VH_buffer_removal_time_length_minus_1.get(segment, 0L, index); } + /// {@return `buffer_removal_time_length_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_buffer_removal_time_length_minus_1(MemorySegment segment) { return StdVideoEncodeAV1DecoderModelInfo.get_buffer_removal_time_length_minus_1(segment, 0L); } + /// {@return `buffer_removal_time_length_minus_1` at the given index} + /// @param index the index + public @CType("uint8_t") byte buffer_removal_time_length_minus_1At(long index) { return StdVideoEncodeAV1DecoderModelInfo.get_buffer_removal_time_length_minus_1(this.segment(), index); } + /// {@return `buffer_removal_time_length_minus_1`} + public @CType("uint8_t") byte buffer_removal_time_length_minus_1() { return StdVideoEncodeAV1DecoderModelInfo.get_buffer_removal_time_length_minus_1(this.segment()); } + /// Sets `buffer_removal_time_length_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer_removal_time_length_minus_1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_buffer_removal_time_length_minus_1.set(segment, 0L, index, value); } + /// Sets `buffer_removal_time_length_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer_removal_time_length_minus_1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_buffer_removal_time_length_minus_1(segment, 0L, value); } + /// Sets `buffer_removal_time_length_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1DecoderModelInfo buffer_removal_time_length_minus_1At(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_buffer_removal_time_length_minus_1(this.segment(), index, value); return this; } + /// Sets `buffer_removal_time_length_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1DecoderModelInfo buffer_removal_time_length_minus_1(@CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_buffer_removal_time_length_minus_1(this.segment(), value); return this; } + + /// {@return `frame_presentation_time_length_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_frame_presentation_time_length_minus_1(MemorySegment segment, long index) { return (byte) VH_frame_presentation_time_length_minus_1.get(segment, 0L, index); } + /// {@return `frame_presentation_time_length_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_frame_presentation_time_length_minus_1(MemorySegment segment) { return StdVideoEncodeAV1DecoderModelInfo.get_frame_presentation_time_length_minus_1(segment, 0L); } + /// {@return `frame_presentation_time_length_minus_1` at the given index} + /// @param index the index + public @CType("uint8_t") byte frame_presentation_time_length_minus_1At(long index) { return StdVideoEncodeAV1DecoderModelInfo.get_frame_presentation_time_length_minus_1(this.segment(), index); } + /// {@return `frame_presentation_time_length_minus_1`} + public @CType("uint8_t") byte frame_presentation_time_length_minus_1() { return StdVideoEncodeAV1DecoderModelInfo.get_frame_presentation_time_length_minus_1(this.segment()); } + /// Sets `frame_presentation_time_length_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_presentation_time_length_minus_1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_frame_presentation_time_length_minus_1.set(segment, 0L, index, value); } + /// Sets `frame_presentation_time_length_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_presentation_time_length_minus_1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_frame_presentation_time_length_minus_1(segment, 0L, value); } + /// Sets `frame_presentation_time_length_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1DecoderModelInfo frame_presentation_time_length_minus_1At(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_frame_presentation_time_length_minus_1(this.segment(), index, value); return this; } + /// Sets `frame_presentation_time_length_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1DecoderModelInfo frame_presentation_time_length_minus_1(@CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_frame_presentation_time_length_minus_1(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoEncodeAV1DecoderModelInfo.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoEncodeAV1DecoderModelInfo.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoEncodeAV1DecoderModelInfo.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1DecoderModelInfo reserved1At(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1DecoderModelInfo reserved1(@CType("uint8_t") byte value) { StdVideoEncodeAV1DecoderModelInfo.set_reserved1(this.segment(), value); return this; } + + /// {@return `num_units_in_decoding_tick` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_num_units_in_decoding_tick(MemorySegment segment, long index) { return (int) VH_num_units_in_decoding_tick.get(segment, 0L, index); } + /// {@return `num_units_in_decoding_tick`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_num_units_in_decoding_tick(MemorySegment segment) { return StdVideoEncodeAV1DecoderModelInfo.get_num_units_in_decoding_tick(segment, 0L); } + /// {@return `num_units_in_decoding_tick` at the given index} + /// @param index the index + public @CType("uint32_t") int num_units_in_decoding_tickAt(long index) { return StdVideoEncodeAV1DecoderModelInfo.get_num_units_in_decoding_tick(this.segment(), index); } + /// {@return `num_units_in_decoding_tick`} + public @CType("uint32_t") int num_units_in_decoding_tick() { return StdVideoEncodeAV1DecoderModelInfo.get_num_units_in_decoding_tick(this.segment()); } + /// Sets `num_units_in_decoding_tick` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_units_in_decoding_tick(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_num_units_in_decoding_tick.set(segment, 0L, index, value); } + /// Sets `num_units_in_decoding_tick` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_units_in_decoding_tick(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeAV1DecoderModelInfo.set_num_units_in_decoding_tick(segment, 0L, value); } + /// Sets `num_units_in_decoding_tick` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1DecoderModelInfo num_units_in_decoding_tickAt(long index, @CType("uint32_t") int value) { StdVideoEncodeAV1DecoderModelInfo.set_num_units_in_decoding_tick(this.segment(), index, value); return this; } + /// Sets `num_units_in_decoding_tick` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1DecoderModelInfo num_units_in_decoding_tick(@CType("uint32_t") int value) { StdVideoEncodeAV1DecoderModelInfo.set_num_units_in_decoding_tick(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1ExtensionHeader.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1ExtensionHeader.java new file mode 100644 index 00000000..f3e74b6f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1ExtensionHeader.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### temporal_id +/// [VarHandle][#VH_temporal_id] - [Getter][#temporal_id()] - [Setter][#temporal_id(byte)] +/// ### spatial_id +/// [VarHandle][#VH_spatial_id] - [Getter][#spatial_id()] - [Setter][#spatial_id(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeAV1ExtensionHeader { +/// uint8_t temporal_id; +/// uint8_t spatial_id; +/// } StdVideoEncodeAV1ExtensionHeader; +/// ``` +public final class StdVideoEncodeAV1ExtensionHeader extends Struct { + /// The struct layout of `StdVideoEncodeAV1ExtensionHeader`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_BYTE.withName("temporal_id"), + ValueLayout.JAVA_BYTE.withName("spatial_id") + ); + /// The [VarHandle] of `temporal_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_temporal_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("temporal_id")); + /// The [VarHandle] of `spatial_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_spatial_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("spatial_id")); + + /// Creates `StdVideoEncodeAV1ExtensionHeader` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeAV1ExtensionHeader(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeAV1ExtensionHeader` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1ExtensionHeader of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1ExtensionHeader(segment); } + + /// Creates `StdVideoEncodeAV1ExtensionHeader` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1ExtensionHeader ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1ExtensionHeader(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeAV1ExtensionHeader` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1ExtensionHeader ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1ExtensionHeader(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeAV1ExtensionHeader` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeAV1ExtensionHeader` + public static StdVideoEncodeAV1ExtensionHeader alloc(SegmentAllocator allocator) { return new StdVideoEncodeAV1ExtensionHeader(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeAV1ExtensionHeader` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeAV1ExtensionHeader` + public static StdVideoEncodeAV1ExtensionHeader alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeAV1ExtensionHeader(allocator.allocate(LAYOUT, count)); } + + /// {@return `temporal_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_temporal_id(MemorySegment segment, long index) { return (byte) VH_temporal_id.get(segment, 0L, index); } + /// {@return `temporal_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_temporal_id(MemorySegment segment) { return StdVideoEncodeAV1ExtensionHeader.get_temporal_id(segment, 0L); } + /// {@return `temporal_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte temporal_idAt(long index) { return StdVideoEncodeAV1ExtensionHeader.get_temporal_id(this.segment(), index); } + /// {@return `temporal_id`} + public @CType("uint8_t") byte temporal_id() { return StdVideoEncodeAV1ExtensionHeader.get_temporal_id(this.segment()); } + /// Sets `temporal_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_temporal_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_temporal_id.set(segment, 0L, index, value); } + /// Sets `temporal_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_temporal_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1ExtensionHeader.set_temporal_id(segment, 0L, value); } + /// Sets `temporal_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ExtensionHeader temporal_idAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1ExtensionHeader.set_temporal_id(this.segment(), index, value); return this; } + /// Sets `temporal_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ExtensionHeader temporal_id(@CType("uint8_t") byte value) { StdVideoEncodeAV1ExtensionHeader.set_temporal_id(this.segment(), value); return this; } + + /// {@return `spatial_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_spatial_id(MemorySegment segment, long index) { return (byte) VH_spatial_id.get(segment, 0L, index); } + /// {@return `spatial_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_spatial_id(MemorySegment segment) { return StdVideoEncodeAV1ExtensionHeader.get_spatial_id(segment, 0L); } + /// {@return `spatial_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte spatial_idAt(long index) { return StdVideoEncodeAV1ExtensionHeader.get_spatial_id(this.segment(), index); } + /// {@return `spatial_id`} + public @CType("uint8_t") byte spatial_id() { return StdVideoEncodeAV1ExtensionHeader.get_spatial_id(this.segment()); } + /// Sets `spatial_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_spatial_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_spatial_id.set(segment, 0L, index, value); } + /// Sets `spatial_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_spatial_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1ExtensionHeader.set_spatial_id(segment, 0L, value); } + /// Sets `spatial_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ExtensionHeader spatial_idAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1ExtensionHeader.set_spatial_id(this.segment(), index, value); return this; } + /// Sets `spatial_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ExtensionHeader spatial_id(@CType("uint8_t") byte value) { StdVideoEncodeAV1ExtensionHeader.set_spatial_id(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1OperatingPointInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1OperatingPointInfo.java new file mode 100644 index 00000000..9fe74283 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1OperatingPointInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### operating_point_idc +/// [VarHandle][#VH_operating_point_idc] - [Getter][#operating_point_idc()] - [Setter][#operating_point_idc(short)] +/// ### seq_level_idx +/// [VarHandle][#VH_seq_level_idx] - [Getter][#seq_level_idx()] - [Setter][#seq_level_idx(byte)] +/// ### seq_tier +/// [VarHandle][#VH_seq_tier] - [Getter][#seq_tier()] - [Setter][#seq_tier(byte)] +/// ### decoder_buffer_delay +/// [VarHandle][#VH_decoder_buffer_delay] - [Getter][#decoder_buffer_delay()] - [Setter][#decoder_buffer_delay(int)] +/// ### encoder_buffer_delay +/// [VarHandle][#VH_encoder_buffer_delay] - [Getter][#encoder_buffer_delay()] - [Setter][#encoder_buffer_delay(int)] +/// ### initial_display_delay_minus_1 +/// [VarHandle][#VH_initial_display_delay_minus_1] - [Getter][#initial_display_delay_minus_1()] - [Setter][#initial_display_delay_minus_1(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeAV1OperatingPointInfo { +/// StdVideoEncodeAV1OperatingPointInfoFlags flags; +/// uint16_t operating_point_idc; +/// uint8_t seq_level_idx; +/// uint8_t seq_tier; +/// uint32_t decoder_buffer_delay; +/// uint32_t encoder_buffer_delay; +/// uint8_t initial_display_delay_minus_1; +/// } StdVideoEncodeAV1OperatingPointInfo; +/// ``` +public final class StdVideoEncodeAV1OperatingPointInfo extends Struct { + /// The struct layout of `StdVideoEncodeAV1OperatingPointInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeAV1OperatingPointInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_SHORT.withName("operating_point_idc"), + ValueLayout.JAVA_BYTE.withName("seq_level_idx"), + ValueLayout.JAVA_BYTE.withName("seq_tier"), + ValueLayout.JAVA_INT.withName("decoder_buffer_delay"), + ValueLayout.JAVA_INT.withName("encoder_buffer_delay"), + ValueLayout.JAVA_BYTE.withName("initial_display_delay_minus_1") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `operating_point_idc` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_operating_point_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("operating_point_idc")); + /// The [VarHandle] of `seq_level_idx` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_seq_level_idx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("seq_level_idx")); + /// The [VarHandle] of `seq_tier` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_seq_tier = LAYOUT.arrayElementVarHandle(PathElement.groupElement("seq_tier")); + /// The [VarHandle] of `decoder_buffer_delay` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_decoder_buffer_delay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("decoder_buffer_delay")); + /// The [VarHandle] of `encoder_buffer_delay` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_encoder_buffer_delay = LAYOUT.arrayElementVarHandle(PathElement.groupElement("encoder_buffer_delay")); + /// The [VarHandle] of `initial_display_delay_minus_1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_initial_display_delay_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initial_display_delay_minus_1")); + + /// Creates `StdVideoEncodeAV1OperatingPointInfo` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeAV1OperatingPointInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeAV1OperatingPointInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1OperatingPointInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1OperatingPointInfo(segment); } + + /// Creates `StdVideoEncodeAV1OperatingPointInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1OperatingPointInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1OperatingPointInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeAV1OperatingPointInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1OperatingPointInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1OperatingPointInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeAV1OperatingPointInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeAV1OperatingPointInfo` + public static StdVideoEncodeAV1OperatingPointInfo alloc(SegmentAllocator allocator) { return new StdVideoEncodeAV1OperatingPointInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeAV1OperatingPointInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeAV1OperatingPointInfo` + public static StdVideoEncodeAV1OperatingPointInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeAV1OperatingPointInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeAV1OperatingPointInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeAV1OperatingPointInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeAV1OperatingPointInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeAV1OperatingPointInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeAV1OperatingPointInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeAV1OperatingPointInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeAV1OperatingPointInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeAV1OperatingPointInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1OperatingPointInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo flagsAt(long index, @CType("StdVideoEncodeAV1OperatingPointInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1OperatingPointInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo flags(@CType("StdVideoEncodeAV1OperatingPointInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1OperatingPointInfo.set_flags(this.segment(), value); return this; } + + /// {@return `operating_point_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_operating_point_idc(MemorySegment segment, long index) { return (short) VH_operating_point_idc.get(segment, 0L, index); } + /// {@return `operating_point_idc`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_operating_point_idc(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfo.get_operating_point_idc(segment, 0L); } + /// {@return `operating_point_idc` at the given index} + /// @param index the index + public @CType("uint16_t") short operating_point_idcAt(long index) { return StdVideoEncodeAV1OperatingPointInfo.get_operating_point_idc(this.segment(), index); } + /// {@return `operating_point_idc`} + public @CType("uint16_t") short operating_point_idc() { return StdVideoEncodeAV1OperatingPointInfo.get_operating_point_idc(this.segment()); } + /// Sets `operating_point_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_operating_point_idc(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_operating_point_idc.set(segment, 0L, index, value); } + /// Sets `operating_point_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_operating_point_idc(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeAV1OperatingPointInfo.set_operating_point_idc(segment, 0L, value); } + /// Sets `operating_point_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo operating_point_idcAt(long index, @CType("uint16_t") short value) { StdVideoEncodeAV1OperatingPointInfo.set_operating_point_idc(this.segment(), index, value); return this; } + /// Sets `operating_point_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo operating_point_idc(@CType("uint16_t") short value) { StdVideoEncodeAV1OperatingPointInfo.set_operating_point_idc(this.segment(), value); return this; } + + /// {@return `seq_level_idx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_seq_level_idx(MemorySegment segment, long index) { return (byte) VH_seq_level_idx.get(segment, 0L, index); } + /// {@return `seq_level_idx`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_seq_level_idx(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfo.get_seq_level_idx(segment, 0L); } + /// {@return `seq_level_idx` at the given index} + /// @param index the index + public @CType("uint8_t") byte seq_level_idxAt(long index) { return StdVideoEncodeAV1OperatingPointInfo.get_seq_level_idx(this.segment(), index); } + /// {@return `seq_level_idx`} + public @CType("uint8_t") byte seq_level_idx() { return StdVideoEncodeAV1OperatingPointInfo.get_seq_level_idx(this.segment()); } + /// Sets `seq_level_idx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_seq_level_idx(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_seq_level_idx.set(segment, 0L, index, value); } + /// Sets `seq_level_idx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_seq_level_idx(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1OperatingPointInfo.set_seq_level_idx(segment, 0L, value); } + /// Sets `seq_level_idx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo seq_level_idxAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1OperatingPointInfo.set_seq_level_idx(this.segment(), index, value); return this; } + /// Sets `seq_level_idx` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo seq_level_idx(@CType("uint8_t") byte value) { StdVideoEncodeAV1OperatingPointInfo.set_seq_level_idx(this.segment(), value); return this; } + + /// {@return `seq_tier` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_seq_tier(MemorySegment segment, long index) { return (byte) VH_seq_tier.get(segment, 0L, index); } + /// {@return `seq_tier`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_seq_tier(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfo.get_seq_tier(segment, 0L); } + /// {@return `seq_tier` at the given index} + /// @param index the index + public @CType("uint8_t") byte seq_tierAt(long index) { return StdVideoEncodeAV1OperatingPointInfo.get_seq_tier(this.segment(), index); } + /// {@return `seq_tier`} + public @CType("uint8_t") byte seq_tier() { return StdVideoEncodeAV1OperatingPointInfo.get_seq_tier(this.segment()); } + /// Sets `seq_tier` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_seq_tier(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_seq_tier.set(segment, 0L, index, value); } + /// Sets `seq_tier` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_seq_tier(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1OperatingPointInfo.set_seq_tier(segment, 0L, value); } + /// Sets `seq_tier` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo seq_tierAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1OperatingPointInfo.set_seq_tier(this.segment(), index, value); return this; } + /// Sets `seq_tier` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo seq_tier(@CType("uint8_t") byte value) { StdVideoEncodeAV1OperatingPointInfo.set_seq_tier(this.segment(), value); return this; } + + /// {@return `decoder_buffer_delay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_decoder_buffer_delay(MemorySegment segment, long index) { return (int) VH_decoder_buffer_delay.get(segment, 0L, index); } + /// {@return `decoder_buffer_delay`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_decoder_buffer_delay(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfo.get_decoder_buffer_delay(segment, 0L); } + /// {@return `decoder_buffer_delay` at the given index} + /// @param index the index + public @CType("uint32_t") int decoder_buffer_delayAt(long index) { return StdVideoEncodeAV1OperatingPointInfo.get_decoder_buffer_delay(this.segment(), index); } + /// {@return `decoder_buffer_delay`} + public @CType("uint32_t") int decoder_buffer_delay() { return StdVideoEncodeAV1OperatingPointInfo.get_decoder_buffer_delay(this.segment()); } + /// Sets `decoder_buffer_delay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_decoder_buffer_delay(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_decoder_buffer_delay.set(segment, 0L, index, value); } + /// Sets `decoder_buffer_delay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_decoder_buffer_delay(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeAV1OperatingPointInfo.set_decoder_buffer_delay(segment, 0L, value); } + /// Sets `decoder_buffer_delay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo decoder_buffer_delayAt(long index, @CType("uint32_t") int value) { StdVideoEncodeAV1OperatingPointInfo.set_decoder_buffer_delay(this.segment(), index, value); return this; } + /// Sets `decoder_buffer_delay` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo decoder_buffer_delay(@CType("uint32_t") int value) { StdVideoEncodeAV1OperatingPointInfo.set_decoder_buffer_delay(this.segment(), value); return this; } + + /// {@return `encoder_buffer_delay` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_encoder_buffer_delay(MemorySegment segment, long index) { return (int) VH_encoder_buffer_delay.get(segment, 0L, index); } + /// {@return `encoder_buffer_delay`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_encoder_buffer_delay(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfo.get_encoder_buffer_delay(segment, 0L); } + /// {@return `encoder_buffer_delay` at the given index} + /// @param index the index + public @CType("uint32_t") int encoder_buffer_delayAt(long index) { return StdVideoEncodeAV1OperatingPointInfo.get_encoder_buffer_delay(this.segment(), index); } + /// {@return `encoder_buffer_delay`} + public @CType("uint32_t") int encoder_buffer_delay() { return StdVideoEncodeAV1OperatingPointInfo.get_encoder_buffer_delay(this.segment()); } + /// Sets `encoder_buffer_delay` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_encoder_buffer_delay(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_encoder_buffer_delay.set(segment, 0L, index, value); } + /// Sets `encoder_buffer_delay` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_encoder_buffer_delay(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeAV1OperatingPointInfo.set_encoder_buffer_delay(segment, 0L, value); } + /// Sets `encoder_buffer_delay` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo encoder_buffer_delayAt(long index, @CType("uint32_t") int value) { StdVideoEncodeAV1OperatingPointInfo.set_encoder_buffer_delay(this.segment(), index, value); return this; } + /// Sets `encoder_buffer_delay` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo encoder_buffer_delay(@CType("uint32_t") int value) { StdVideoEncodeAV1OperatingPointInfo.set_encoder_buffer_delay(this.segment(), value); return this; } + + /// {@return `initial_display_delay_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_initial_display_delay_minus_1(MemorySegment segment, long index) { return (byte) VH_initial_display_delay_minus_1.get(segment, 0L, index); } + /// {@return `initial_display_delay_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_initial_display_delay_minus_1(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfo.get_initial_display_delay_minus_1(segment, 0L); } + /// {@return `initial_display_delay_minus_1` at the given index} + /// @param index the index + public @CType("uint8_t") byte initial_display_delay_minus_1At(long index) { return StdVideoEncodeAV1OperatingPointInfo.get_initial_display_delay_minus_1(this.segment(), index); } + /// {@return `initial_display_delay_minus_1`} + public @CType("uint8_t") byte initial_display_delay_minus_1() { return StdVideoEncodeAV1OperatingPointInfo.get_initial_display_delay_minus_1(this.segment()); } + /// Sets `initial_display_delay_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initial_display_delay_minus_1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_initial_display_delay_minus_1.set(segment, 0L, index, value); } + /// Sets `initial_display_delay_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initial_display_delay_minus_1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1OperatingPointInfo.set_initial_display_delay_minus_1(segment, 0L, value); } + /// Sets `initial_display_delay_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo initial_display_delay_minus_1At(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1OperatingPointInfo.set_initial_display_delay_minus_1(this.segment(), index, value); return this; } + /// Sets `initial_display_delay_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfo initial_display_delay_minus_1(@CType("uint8_t") byte value) { StdVideoEncodeAV1OperatingPointInfo.set_initial_display_delay_minus_1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1OperatingPointInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1OperatingPointInfoFlags.java new file mode 100644 index 00000000..329c9504 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1OperatingPointInfoFlags.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### decoder_model_present_for_this_op +/// [VarHandle][#VH_decoder_model_present_for_this_op] - [Getter][#decoder_model_present_for_this_op()] - [Setter][#decoder_model_present_for_this_op(int)] +/// ### low_delay_mode_flag +/// [VarHandle][#VH_low_delay_mode_flag] - [Getter][#low_delay_mode_flag()] - [Setter][#low_delay_mode_flag(int)] +/// ### initial_display_delay_present_for_this_op +/// [VarHandle][#VH_initial_display_delay_present_for_this_op] - [Getter][#initial_display_delay_present_for_this_op()] - [Setter][#initial_display_delay_present_for_this_op(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeAV1OperatingPointInfoFlags { +/// uint32_t : 1 decoder_model_present_for_this_op; +/// uint32_t : 1 low_delay_mode_flag; +/// uint32_t : 1 initial_display_delay_present_for_this_op; +/// uint32_t : 29 reserved; +/// } StdVideoEncodeAV1OperatingPointInfoFlags; +/// ``` +public final class StdVideoEncodeAV1OperatingPointInfoFlags extends Struct { + /// The struct layout of `StdVideoEncodeAV1OperatingPointInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("decoder_model_present_for_this_op"), + ValueLayout.JAVA_INT.withName("low_delay_mode_flag"), + ValueLayout.JAVA_INT.withName("initial_display_delay_present_for_this_op"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `decoder_model_present_for_this_op` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_decoder_model_present_for_this_op = LAYOUT.arrayElementVarHandle(PathElement.groupElement("decoder_model_present_for_this_op")); + /// The [VarHandle] of `low_delay_mode_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_low_delay_mode_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("low_delay_mode_flag")); + /// The [VarHandle] of `initial_display_delay_present_for_this_op` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_initial_display_delay_present_for_this_op = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initial_display_delay_present_for_this_op")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeAV1OperatingPointInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeAV1OperatingPointInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeAV1OperatingPointInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1OperatingPointInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1OperatingPointInfoFlags(segment); } + + /// Creates `StdVideoEncodeAV1OperatingPointInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1OperatingPointInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1OperatingPointInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeAV1OperatingPointInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1OperatingPointInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1OperatingPointInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeAV1OperatingPointInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeAV1OperatingPointInfoFlags` + public static StdVideoEncodeAV1OperatingPointInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeAV1OperatingPointInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeAV1OperatingPointInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeAV1OperatingPointInfoFlags` + public static StdVideoEncodeAV1OperatingPointInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeAV1OperatingPointInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `decoder_model_present_for_this_op` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_decoder_model_present_for_this_op(MemorySegment segment, long index) { return (int) VH_decoder_model_present_for_this_op.get(segment, 0L, index); } + /// {@return `decoder_model_present_for_this_op`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_decoder_model_present_for_this_op(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfoFlags.get_decoder_model_present_for_this_op(segment, 0L); } + /// {@return `decoder_model_present_for_this_op` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int decoder_model_present_for_this_opAt(long index) { return StdVideoEncodeAV1OperatingPointInfoFlags.get_decoder_model_present_for_this_op(this.segment(), index); } + /// {@return `decoder_model_present_for_this_op`} + public @CType("uint32_t : 1") int decoder_model_present_for_this_op() { return StdVideoEncodeAV1OperatingPointInfoFlags.get_decoder_model_present_for_this_op(this.segment()); } + /// Sets `decoder_model_present_for_this_op` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_decoder_model_present_for_this_op(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_decoder_model_present_for_this_op.set(segment, 0L, index, value); } + /// Sets `decoder_model_present_for_this_op` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_decoder_model_present_for_this_op(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_decoder_model_present_for_this_op(segment, 0L, value); } + /// Sets `decoder_model_present_for_this_op` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfoFlags decoder_model_present_for_this_opAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_decoder_model_present_for_this_op(this.segment(), index, value); return this; } + /// Sets `decoder_model_present_for_this_op` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfoFlags decoder_model_present_for_this_op(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_decoder_model_present_for_this_op(this.segment(), value); return this; } + + /// {@return `low_delay_mode_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_low_delay_mode_flag(MemorySegment segment, long index) { return (int) VH_low_delay_mode_flag.get(segment, 0L, index); } + /// {@return `low_delay_mode_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_low_delay_mode_flag(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfoFlags.get_low_delay_mode_flag(segment, 0L); } + /// {@return `low_delay_mode_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int low_delay_mode_flagAt(long index) { return StdVideoEncodeAV1OperatingPointInfoFlags.get_low_delay_mode_flag(this.segment(), index); } + /// {@return `low_delay_mode_flag`} + public @CType("uint32_t : 1") int low_delay_mode_flag() { return StdVideoEncodeAV1OperatingPointInfoFlags.get_low_delay_mode_flag(this.segment()); } + /// Sets `low_delay_mode_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_low_delay_mode_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_low_delay_mode_flag.set(segment, 0L, index, value); } + /// Sets `low_delay_mode_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_low_delay_mode_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_low_delay_mode_flag(segment, 0L, value); } + /// Sets `low_delay_mode_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfoFlags low_delay_mode_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_low_delay_mode_flag(this.segment(), index, value); return this; } + /// Sets `low_delay_mode_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfoFlags low_delay_mode_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_low_delay_mode_flag(this.segment(), value); return this; } + + /// {@return `initial_display_delay_present_for_this_op` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_initial_display_delay_present_for_this_op(MemorySegment segment, long index) { return (int) VH_initial_display_delay_present_for_this_op.get(segment, 0L, index); } + /// {@return `initial_display_delay_present_for_this_op`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_initial_display_delay_present_for_this_op(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfoFlags.get_initial_display_delay_present_for_this_op(segment, 0L); } + /// {@return `initial_display_delay_present_for_this_op` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int initial_display_delay_present_for_this_opAt(long index) { return StdVideoEncodeAV1OperatingPointInfoFlags.get_initial_display_delay_present_for_this_op(this.segment(), index); } + /// {@return `initial_display_delay_present_for_this_op`} + public @CType("uint32_t : 1") int initial_display_delay_present_for_this_op() { return StdVideoEncodeAV1OperatingPointInfoFlags.get_initial_display_delay_present_for_this_op(this.segment()); } + /// Sets `initial_display_delay_present_for_this_op` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initial_display_delay_present_for_this_op(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_initial_display_delay_present_for_this_op.set(segment, 0L, index, value); } + /// Sets `initial_display_delay_present_for_this_op` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initial_display_delay_present_for_this_op(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_initial_display_delay_present_for_this_op(segment, 0L, value); } + /// Sets `initial_display_delay_present_for_this_op` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfoFlags initial_display_delay_present_for_this_opAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_initial_display_delay_present_for_this_op(this.segment(), index, value); return this; } + /// Sets `initial_display_delay_present_for_this_op` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfoFlags initial_display_delay_present_for_this_op(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_initial_display_delay_present_for_this_op(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 29") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 29") int get_reserved(MemorySegment segment) { return StdVideoEncodeAV1OperatingPointInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 29") int reservedAt(long index) { return StdVideoEncodeAV1OperatingPointInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 29") int reserved() { return StdVideoEncodeAV1OperatingPointInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 29") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 29") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfoFlags reservedAt(long index, @CType("uint32_t : 29") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1OperatingPointInfoFlags reserved(@CType("uint32_t : 29") int value) { StdVideoEncodeAV1OperatingPointInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1PictureInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1PictureInfo.java new file mode 100644 index 00000000..49f71e7a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1PictureInfo.java @@ -0,0 +1,1073 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### frame_type +/// [VarHandle][#VH_frame_type] - [Getter][#frame_type()] - [Setter][#frame_type(int)] +/// ### frame_presentation_time +/// [VarHandle][#VH_frame_presentation_time] - [Getter][#frame_presentation_time()] - [Setter][#frame_presentation_time(int)] +/// ### current_frame_id +/// [VarHandle][#VH_current_frame_id] - [Getter][#current_frame_id()] - [Setter][#current_frame_id(int)] +/// ### order_hint +/// [VarHandle][#VH_order_hint] - [Getter][#order_hint()] - [Setter][#order_hint(byte)] +/// ### primary_ref_frame +/// [VarHandle][#VH_primary_ref_frame] - [Getter][#primary_ref_frame()] - [Setter][#primary_ref_frame(byte)] +/// ### refresh_frame_flags +/// [VarHandle][#VH_refresh_frame_flags] - [Getter][#refresh_frame_flags()] - [Setter][#refresh_frame_flags(byte)] +/// ### coded_denom +/// [VarHandle][#VH_coded_denom] - [Getter][#coded_denom()] - [Setter][#coded_denom(byte)] +/// ### render_width_minus_1 +/// [VarHandle][#VH_render_width_minus_1] - [Getter][#render_width_minus_1()] - [Setter][#render_width_minus_1(short)] +/// ### render_height_minus_1 +/// [VarHandle][#VH_render_height_minus_1] - [Getter][#render_height_minus_1()] - [Setter][#render_height_minus_1(short)] +/// ### interpolation_filter +/// [VarHandle][#VH_interpolation_filter] - [Getter][#interpolation_filter()] - [Setter][#interpolation_filter(int)] +/// ### TxMode +/// [VarHandle][#VH_TxMode] - [Getter][#TxMode()] - [Setter][#TxMode(int)] +/// ### delta_q_res +/// [VarHandle][#VH_delta_q_res] - [Getter][#delta_q_res()] - [Setter][#delta_q_res(byte)] +/// ### delta_lf_res +/// [VarHandle][#VH_delta_lf_res] - [Getter][#delta_lf_res()] - [Setter][#delta_lf_res(byte)] +/// ### ref_order_hint +/// [VarHandle][#VH_ref_order_hint] - [Getter][#ref_order_hint()] - [Setter][#ref_order_hint(byte)] +/// ### ref_frame_idx +/// [VarHandle][#VH_ref_frame_idx] - [Getter][#ref_frame_idx()] - [Setter][#ref_frame_idx(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### delta_frame_id_minus_1 +/// [VarHandle][#VH_delta_frame_id_minus_1] - [Getter][#delta_frame_id_minus_1()] - [Setter][#delta_frame_id_minus_1(int)] +/// ### pTileInfo +/// [VarHandle][#VH_pTileInfo] - [Getter][#pTileInfo()] - [Setter][#pTileInfo(java.lang.foreign.MemorySegment)] +/// ### pQuantization +/// [VarHandle][#VH_pQuantization] - [Getter][#pQuantization()] - [Setter][#pQuantization(java.lang.foreign.MemorySegment)] +/// ### pSegmentation +/// [VarHandle][#VH_pSegmentation] - [Getter][#pSegmentation()] - [Setter][#pSegmentation(java.lang.foreign.MemorySegment)] +/// ### pLoopFilter +/// [VarHandle][#VH_pLoopFilter] - [Getter][#pLoopFilter()] - [Setter][#pLoopFilter(java.lang.foreign.MemorySegment)] +/// ### pCDEF +/// [VarHandle][#VH_pCDEF] - [Getter][#pCDEF()] - [Setter][#pCDEF(java.lang.foreign.MemorySegment)] +/// ### pLoopRestoration +/// [VarHandle][#VH_pLoopRestoration] - [Getter][#pLoopRestoration()] - [Setter][#pLoopRestoration(java.lang.foreign.MemorySegment)] +/// ### pGlobalMotion +/// [VarHandle][#VH_pGlobalMotion] - [Getter][#pGlobalMotion()] - [Setter][#pGlobalMotion(java.lang.foreign.MemorySegment)] +/// ### pExtensionHeader +/// [VarHandle][#VH_pExtensionHeader] - [Getter][#pExtensionHeader()] - [Setter][#pExtensionHeader(java.lang.foreign.MemorySegment)] +/// ### pBufferRemovalTimes +/// [VarHandle][#VH_pBufferRemovalTimes] - [Getter][#pBufferRemovalTimes()] - [Setter][#pBufferRemovalTimes(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeAV1PictureInfo { +/// StdVideoEncodeAV1PictureInfoFlags flags; +/// StdVideoAV1FrameType frame_type; +/// uint32_t frame_presentation_time; +/// uint32_t current_frame_id; +/// uint8_t order_hint; +/// uint8_t primary_ref_frame; +/// uint8_t refresh_frame_flags; +/// uint8_t coded_denom; +/// uint16_t render_width_minus_1; +/// uint16_t render_height_minus_1; +/// StdVideoAV1InterpolationFilter interpolation_filter; +/// StdVideoAV1TxMode TxMode; +/// uint8_t delta_q_res; +/// uint8_t delta_lf_res; +/// uint8_t [ ] ref_order_hint; +/// int8_t [ ] ref_frame_idx; +/// uint8_t [3] reserved1; +/// uint32_t [ ] delta_frame_id_minus_1; +/// const StdVideoAV1TileInfo * pTileInfo; +/// const StdVideoAV1Quantization * pQuantization; +/// const StdVideoAV1Segmentation * pSegmentation; +/// const StdVideoAV1LoopFilter * pLoopFilter; +/// const StdVideoAV1CDEF * pCDEF; +/// const StdVideoAV1LoopRestoration * pLoopRestoration; +/// const StdVideoAV1GlobalMotion * pGlobalMotion; +/// const StdVideoEncodeAV1ExtensionHeader * pExtensionHeader; +/// const uint32_t * pBufferRemovalTimes; +/// } StdVideoEncodeAV1PictureInfo; +/// ``` +public final class StdVideoEncodeAV1PictureInfo extends Struct { + /// The struct layout of `StdVideoEncodeAV1PictureInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeAV1PictureInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("frame_type"), + ValueLayout.JAVA_INT.withName("frame_presentation_time"), + ValueLayout.JAVA_INT.withName("current_frame_id"), + ValueLayout.JAVA_BYTE.withName("order_hint"), + ValueLayout.JAVA_BYTE.withName("primary_ref_frame"), + ValueLayout.JAVA_BYTE.withName("refresh_frame_flags"), + ValueLayout.JAVA_BYTE.withName("coded_denom"), + ValueLayout.JAVA_SHORT.withName("render_width_minus_1"), + ValueLayout.JAVA_SHORT.withName("render_height_minus_1"), + ValueLayout.JAVA_INT.withName("interpolation_filter"), + ValueLayout.JAVA_INT.withName("TxMode"), + ValueLayout.JAVA_BYTE.withName("delta_q_res"), + ValueLayout.JAVA_BYTE.withName("delta_lf_res"), + ValueLayout.JAVA_BYTE.withName("ref_order_hint"), + ValueLayout.JAVA_BYTE.withName("ref_frame_idx"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_INT.withName("delta_frame_id_minus_1"), + ValueLayout.ADDRESS.withName("pTileInfo"), + ValueLayout.ADDRESS.withName("pQuantization"), + ValueLayout.ADDRESS.withName("pSegmentation"), + ValueLayout.ADDRESS.withName("pLoopFilter"), + ValueLayout.ADDRESS.withName("pCDEF"), + ValueLayout.ADDRESS.withName("pLoopRestoration"), + ValueLayout.ADDRESS.withName("pGlobalMotion"), + ValueLayout.ADDRESS.withName("pExtensionHeader"), + ValueLayout.ADDRESS.withName("pBufferRemovalTimes") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `frame_type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_type")); + /// The [VarHandle] of `frame_presentation_time` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_presentation_time = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_presentation_time")); + /// The [VarHandle] of `current_frame_id` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_current_frame_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("current_frame_id")); + /// The [VarHandle] of `order_hint` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_order_hint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("order_hint")); + /// The [VarHandle] of `primary_ref_frame` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_primary_ref_frame = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primary_ref_frame")); + /// The [VarHandle] of `refresh_frame_flags` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_refresh_frame_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("refresh_frame_flags")); + /// The [VarHandle] of `coded_denom` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_coded_denom = LAYOUT.arrayElementVarHandle(PathElement.groupElement("coded_denom")); + /// The [VarHandle] of `render_width_minus_1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_render_width_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("render_width_minus_1")); + /// The [VarHandle] of `render_height_minus_1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_render_height_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("render_height_minus_1")); + /// The [VarHandle] of `interpolation_filter` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_interpolation_filter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("interpolation_filter")); + /// The [VarHandle] of `TxMode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_TxMode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("TxMode")); + /// The [VarHandle] of `delta_q_res` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_q_res = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_q_res")); + /// The [VarHandle] of `delta_lf_res` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_lf_res = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_lf_res")); + /// The [VarHandle] of `ref_order_hint` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ref_order_hint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ref_order_hint")); + /// The [VarHandle] of `ref_frame_idx` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ref_frame_idx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ref_frame_idx")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `delta_frame_id_minus_1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_delta_frame_id_minus_1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_frame_id_minus_1")); + /// The [VarHandle] of `pTileInfo` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pTileInfo = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pTileInfo")); + /// The [VarHandle] of `pQuantization` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pQuantization = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pQuantization")); + /// The [VarHandle] of `pSegmentation` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSegmentation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSegmentation")); + /// The [VarHandle] of `pLoopFilter` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLoopFilter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLoopFilter")); + /// The [VarHandle] of `pCDEF` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pCDEF = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pCDEF")); + /// The [VarHandle] of `pLoopRestoration` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLoopRestoration = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLoopRestoration")); + /// The [VarHandle] of `pGlobalMotion` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pGlobalMotion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pGlobalMotion")); + /// The [VarHandle] of `pExtensionHeader` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pExtensionHeader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pExtensionHeader")); + /// The [VarHandle] of `pBufferRemovalTimes` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pBufferRemovalTimes = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pBufferRemovalTimes")); + + /// Creates `StdVideoEncodeAV1PictureInfo` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeAV1PictureInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeAV1PictureInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1PictureInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1PictureInfo(segment); } + + /// Creates `StdVideoEncodeAV1PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1PictureInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeAV1PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1PictureInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeAV1PictureInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeAV1PictureInfo` + public static StdVideoEncodeAV1PictureInfo alloc(SegmentAllocator allocator) { return new StdVideoEncodeAV1PictureInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeAV1PictureInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeAV1PictureInfo` + public static StdVideoEncodeAV1PictureInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeAV1PictureInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeAV1PictureInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeAV1PictureInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo flagsAt(long index, @CType("StdVideoEncodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo flags(@CType("StdVideoEncodeAV1PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_flags(this.segment(), value); return this; } + + /// {@return `frame_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1FrameType") int get_frame_type(MemorySegment segment, long index) { return (int) VH_frame_type.get(segment, 0L, index); } + /// {@return `frame_type`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1FrameType") int get_frame_type(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_frame_type(segment, 0L); } + /// {@return `frame_type` at the given index} + /// @param index the index + public @CType("StdVideoAV1FrameType") int frame_typeAt(long index) { return StdVideoEncodeAV1PictureInfo.get_frame_type(this.segment(), index); } + /// {@return `frame_type`} + public @CType("StdVideoAV1FrameType") int frame_type() { return StdVideoEncodeAV1PictureInfo.get_frame_type(this.segment()); } + /// Sets `frame_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_type(MemorySegment segment, long index, @CType("StdVideoAV1FrameType") int value) { VH_frame_type.set(segment, 0L, index, value); } + /// Sets `frame_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_type(MemorySegment segment, @CType("StdVideoAV1FrameType") int value) { StdVideoEncodeAV1PictureInfo.set_frame_type(segment, 0L, value); } + /// Sets `frame_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo frame_typeAt(long index, @CType("StdVideoAV1FrameType") int value) { StdVideoEncodeAV1PictureInfo.set_frame_type(this.segment(), index, value); return this; } + /// Sets `frame_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo frame_type(@CType("StdVideoAV1FrameType") int value) { StdVideoEncodeAV1PictureInfo.set_frame_type(this.segment(), value); return this; } + + /// {@return `frame_presentation_time` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frame_presentation_time(MemorySegment segment, long index) { return (int) VH_frame_presentation_time.get(segment, 0L, index); } + /// {@return `frame_presentation_time`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frame_presentation_time(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_frame_presentation_time(segment, 0L); } + /// {@return `frame_presentation_time` at the given index} + /// @param index the index + public @CType("uint32_t") int frame_presentation_timeAt(long index) { return StdVideoEncodeAV1PictureInfo.get_frame_presentation_time(this.segment(), index); } + /// {@return `frame_presentation_time`} + public @CType("uint32_t") int frame_presentation_time() { return StdVideoEncodeAV1PictureInfo.get_frame_presentation_time(this.segment()); } + /// Sets `frame_presentation_time` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_presentation_time(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frame_presentation_time.set(segment, 0L, index, value); } + /// Sets `frame_presentation_time` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_presentation_time(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeAV1PictureInfo.set_frame_presentation_time(segment, 0L, value); } + /// Sets `frame_presentation_time` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo frame_presentation_timeAt(long index, @CType("uint32_t") int value) { StdVideoEncodeAV1PictureInfo.set_frame_presentation_time(this.segment(), index, value); return this; } + /// Sets `frame_presentation_time` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo frame_presentation_time(@CType("uint32_t") int value) { StdVideoEncodeAV1PictureInfo.set_frame_presentation_time(this.segment(), value); return this; } + + /// {@return `current_frame_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_current_frame_id(MemorySegment segment, long index) { return (int) VH_current_frame_id.get(segment, 0L, index); } + /// {@return `current_frame_id`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_current_frame_id(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_current_frame_id(segment, 0L); } + /// {@return `current_frame_id` at the given index} + /// @param index the index + public @CType("uint32_t") int current_frame_idAt(long index) { return StdVideoEncodeAV1PictureInfo.get_current_frame_id(this.segment(), index); } + /// {@return `current_frame_id`} + public @CType("uint32_t") int current_frame_id() { return StdVideoEncodeAV1PictureInfo.get_current_frame_id(this.segment()); } + /// Sets `current_frame_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_current_frame_id(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_current_frame_id.set(segment, 0L, index, value); } + /// Sets `current_frame_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_current_frame_id(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeAV1PictureInfo.set_current_frame_id(segment, 0L, value); } + /// Sets `current_frame_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo current_frame_idAt(long index, @CType("uint32_t") int value) { StdVideoEncodeAV1PictureInfo.set_current_frame_id(this.segment(), index, value); return this; } + /// Sets `current_frame_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo current_frame_id(@CType("uint32_t") int value) { StdVideoEncodeAV1PictureInfo.set_current_frame_id(this.segment(), value); return this; } + + /// {@return `order_hint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_order_hint(MemorySegment segment, long index) { return (byte) VH_order_hint.get(segment, 0L, index); } + /// {@return `order_hint`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_order_hint(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_order_hint(segment, 0L); } + /// {@return `order_hint` at the given index} + /// @param index the index + public @CType("uint8_t") byte order_hintAt(long index) { return StdVideoEncodeAV1PictureInfo.get_order_hint(this.segment(), index); } + /// {@return `order_hint`} + public @CType("uint8_t") byte order_hint() { return StdVideoEncodeAV1PictureInfo.get_order_hint(this.segment()); } + /// Sets `order_hint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_order_hint(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_order_hint.set(segment, 0L, index, value); } + /// Sets `order_hint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_order_hint(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_order_hint(segment, 0L, value); } + /// Sets `order_hint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo order_hintAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_order_hint(this.segment(), index, value); return this; } + /// Sets `order_hint` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo order_hint(@CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_order_hint(this.segment(), value); return this; } + + /// {@return `primary_ref_frame` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_primary_ref_frame(MemorySegment segment, long index) { return (byte) VH_primary_ref_frame.get(segment, 0L, index); } + /// {@return `primary_ref_frame`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_primary_ref_frame(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_primary_ref_frame(segment, 0L); } + /// {@return `primary_ref_frame` at the given index} + /// @param index the index + public @CType("uint8_t") byte primary_ref_frameAt(long index) { return StdVideoEncodeAV1PictureInfo.get_primary_ref_frame(this.segment(), index); } + /// {@return `primary_ref_frame`} + public @CType("uint8_t") byte primary_ref_frame() { return StdVideoEncodeAV1PictureInfo.get_primary_ref_frame(this.segment()); } + /// Sets `primary_ref_frame` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primary_ref_frame(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_primary_ref_frame.set(segment, 0L, index, value); } + /// Sets `primary_ref_frame` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primary_ref_frame(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_primary_ref_frame(segment, 0L, value); } + /// Sets `primary_ref_frame` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo primary_ref_frameAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_primary_ref_frame(this.segment(), index, value); return this; } + /// Sets `primary_ref_frame` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo primary_ref_frame(@CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_primary_ref_frame(this.segment(), value); return this; } + + /// {@return `refresh_frame_flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_refresh_frame_flags(MemorySegment segment, long index) { return (byte) VH_refresh_frame_flags.get(segment, 0L, index); } + /// {@return `refresh_frame_flags`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_refresh_frame_flags(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_refresh_frame_flags(segment, 0L); } + /// {@return `refresh_frame_flags` at the given index} + /// @param index the index + public @CType("uint8_t") byte refresh_frame_flagsAt(long index) { return StdVideoEncodeAV1PictureInfo.get_refresh_frame_flags(this.segment(), index); } + /// {@return `refresh_frame_flags`} + public @CType("uint8_t") byte refresh_frame_flags() { return StdVideoEncodeAV1PictureInfo.get_refresh_frame_flags(this.segment()); } + /// Sets `refresh_frame_flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_refresh_frame_flags(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_refresh_frame_flags.set(segment, 0L, index, value); } + /// Sets `refresh_frame_flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_refresh_frame_flags(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_refresh_frame_flags(segment, 0L, value); } + /// Sets `refresh_frame_flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo refresh_frame_flagsAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_refresh_frame_flags(this.segment(), index, value); return this; } + /// Sets `refresh_frame_flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo refresh_frame_flags(@CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_refresh_frame_flags(this.segment(), value); return this; } + + /// {@return `coded_denom` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_coded_denom(MemorySegment segment, long index) { return (byte) VH_coded_denom.get(segment, 0L, index); } + /// {@return `coded_denom`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_coded_denom(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_coded_denom(segment, 0L); } + /// {@return `coded_denom` at the given index} + /// @param index the index + public @CType("uint8_t") byte coded_denomAt(long index) { return StdVideoEncodeAV1PictureInfo.get_coded_denom(this.segment(), index); } + /// {@return `coded_denom`} + public @CType("uint8_t") byte coded_denom() { return StdVideoEncodeAV1PictureInfo.get_coded_denom(this.segment()); } + /// Sets `coded_denom` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_coded_denom(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_coded_denom.set(segment, 0L, index, value); } + /// Sets `coded_denom` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_coded_denom(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_coded_denom(segment, 0L, value); } + /// Sets `coded_denom` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo coded_denomAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_coded_denom(this.segment(), index, value); return this; } + /// Sets `coded_denom` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo coded_denom(@CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_coded_denom(this.segment(), value); return this; } + + /// {@return `render_width_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_render_width_minus_1(MemorySegment segment, long index) { return (short) VH_render_width_minus_1.get(segment, 0L, index); } + /// {@return `render_width_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_render_width_minus_1(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_render_width_minus_1(segment, 0L); } + /// {@return `render_width_minus_1` at the given index} + /// @param index the index + public @CType("uint16_t") short render_width_minus_1At(long index) { return StdVideoEncodeAV1PictureInfo.get_render_width_minus_1(this.segment(), index); } + /// {@return `render_width_minus_1`} + public @CType("uint16_t") short render_width_minus_1() { return StdVideoEncodeAV1PictureInfo.get_render_width_minus_1(this.segment()); } + /// Sets `render_width_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_render_width_minus_1(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_render_width_minus_1.set(segment, 0L, index, value); } + /// Sets `render_width_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_render_width_minus_1(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeAV1PictureInfo.set_render_width_minus_1(segment, 0L, value); } + /// Sets `render_width_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo render_width_minus_1At(long index, @CType("uint16_t") short value) { StdVideoEncodeAV1PictureInfo.set_render_width_minus_1(this.segment(), index, value); return this; } + /// Sets `render_width_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo render_width_minus_1(@CType("uint16_t") short value) { StdVideoEncodeAV1PictureInfo.set_render_width_minus_1(this.segment(), value); return this; } + + /// {@return `render_height_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_render_height_minus_1(MemorySegment segment, long index) { return (short) VH_render_height_minus_1.get(segment, 0L, index); } + /// {@return `render_height_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_render_height_minus_1(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_render_height_minus_1(segment, 0L); } + /// {@return `render_height_minus_1` at the given index} + /// @param index the index + public @CType("uint16_t") short render_height_minus_1At(long index) { return StdVideoEncodeAV1PictureInfo.get_render_height_minus_1(this.segment(), index); } + /// {@return `render_height_minus_1`} + public @CType("uint16_t") short render_height_minus_1() { return StdVideoEncodeAV1PictureInfo.get_render_height_minus_1(this.segment()); } + /// Sets `render_height_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_render_height_minus_1(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_render_height_minus_1.set(segment, 0L, index, value); } + /// Sets `render_height_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_render_height_minus_1(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeAV1PictureInfo.set_render_height_minus_1(segment, 0L, value); } + /// Sets `render_height_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo render_height_minus_1At(long index, @CType("uint16_t") short value) { StdVideoEncodeAV1PictureInfo.set_render_height_minus_1(this.segment(), index, value); return this; } + /// Sets `render_height_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo render_height_minus_1(@CType("uint16_t") short value) { StdVideoEncodeAV1PictureInfo.set_render_height_minus_1(this.segment(), value); return this; } + + /// {@return `interpolation_filter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1InterpolationFilter") int get_interpolation_filter(MemorySegment segment, long index) { return (int) VH_interpolation_filter.get(segment, 0L, index); } + /// {@return `interpolation_filter`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1InterpolationFilter") int get_interpolation_filter(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_interpolation_filter(segment, 0L); } + /// {@return `interpolation_filter` at the given index} + /// @param index the index + public @CType("StdVideoAV1InterpolationFilter") int interpolation_filterAt(long index) { return StdVideoEncodeAV1PictureInfo.get_interpolation_filter(this.segment(), index); } + /// {@return `interpolation_filter`} + public @CType("StdVideoAV1InterpolationFilter") int interpolation_filter() { return StdVideoEncodeAV1PictureInfo.get_interpolation_filter(this.segment()); } + /// Sets `interpolation_filter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_interpolation_filter(MemorySegment segment, long index, @CType("StdVideoAV1InterpolationFilter") int value) { VH_interpolation_filter.set(segment, 0L, index, value); } + /// Sets `interpolation_filter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_interpolation_filter(MemorySegment segment, @CType("StdVideoAV1InterpolationFilter") int value) { StdVideoEncodeAV1PictureInfo.set_interpolation_filter(segment, 0L, value); } + /// Sets `interpolation_filter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo interpolation_filterAt(long index, @CType("StdVideoAV1InterpolationFilter") int value) { StdVideoEncodeAV1PictureInfo.set_interpolation_filter(this.segment(), index, value); return this; } + /// Sets `interpolation_filter` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo interpolation_filter(@CType("StdVideoAV1InterpolationFilter") int value) { StdVideoEncodeAV1PictureInfo.set_interpolation_filter(this.segment(), value); return this; } + + /// {@return `TxMode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1TxMode") int get_TxMode(MemorySegment segment, long index) { return (int) VH_TxMode.get(segment, 0L, index); } + /// {@return `TxMode`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1TxMode") int get_TxMode(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_TxMode(segment, 0L); } + /// {@return `TxMode` at the given index} + /// @param index the index + public @CType("StdVideoAV1TxMode") int TxModeAt(long index) { return StdVideoEncodeAV1PictureInfo.get_TxMode(this.segment(), index); } + /// {@return `TxMode`} + public @CType("StdVideoAV1TxMode") int TxMode() { return StdVideoEncodeAV1PictureInfo.get_TxMode(this.segment()); } + /// Sets `TxMode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_TxMode(MemorySegment segment, long index, @CType("StdVideoAV1TxMode") int value) { VH_TxMode.set(segment, 0L, index, value); } + /// Sets `TxMode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_TxMode(MemorySegment segment, @CType("StdVideoAV1TxMode") int value) { StdVideoEncodeAV1PictureInfo.set_TxMode(segment, 0L, value); } + /// Sets `TxMode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo TxModeAt(long index, @CType("StdVideoAV1TxMode") int value) { StdVideoEncodeAV1PictureInfo.set_TxMode(this.segment(), index, value); return this; } + /// Sets `TxMode` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo TxMode(@CType("StdVideoAV1TxMode") int value) { StdVideoEncodeAV1PictureInfo.set_TxMode(this.segment(), value); return this; } + + /// {@return `delta_q_res` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_delta_q_res(MemorySegment segment, long index) { return (byte) VH_delta_q_res.get(segment, 0L, index); } + /// {@return `delta_q_res`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_delta_q_res(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_delta_q_res(segment, 0L); } + /// {@return `delta_q_res` at the given index} + /// @param index the index + public @CType("uint8_t") byte delta_q_resAt(long index) { return StdVideoEncodeAV1PictureInfo.get_delta_q_res(this.segment(), index); } + /// {@return `delta_q_res`} + public @CType("uint8_t") byte delta_q_res() { return StdVideoEncodeAV1PictureInfo.get_delta_q_res(this.segment()); } + /// Sets `delta_q_res` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_q_res(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_delta_q_res.set(segment, 0L, index, value); } + /// Sets `delta_q_res` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_q_res(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_delta_q_res(segment, 0L, value); } + /// Sets `delta_q_res` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo delta_q_resAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_delta_q_res(this.segment(), index, value); return this; } + /// Sets `delta_q_res` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo delta_q_res(@CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_delta_q_res(this.segment(), value); return this; } + + /// {@return `delta_lf_res` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_delta_lf_res(MemorySegment segment, long index) { return (byte) VH_delta_lf_res.get(segment, 0L, index); } + /// {@return `delta_lf_res`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_delta_lf_res(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_delta_lf_res(segment, 0L); } + /// {@return `delta_lf_res` at the given index} + /// @param index the index + public @CType("uint8_t") byte delta_lf_resAt(long index) { return StdVideoEncodeAV1PictureInfo.get_delta_lf_res(this.segment(), index); } + /// {@return `delta_lf_res`} + public @CType("uint8_t") byte delta_lf_res() { return StdVideoEncodeAV1PictureInfo.get_delta_lf_res(this.segment()); } + /// Sets `delta_lf_res` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_lf_res(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_delta_lf_res.set(segment, 0L, index, value); } + /// Sets `delta_lf_res` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_lf_res(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_delta_lf_res(segment, 0L, value); } + /// Sets `delta_lf_res` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo delta_lf_resAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_delta_lf_res(this.segment(), index, value); return this; } + /// Sets `delta_lf_res` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo delta_lf_res(@CType("uint8_t") byte value) { StdVideoEncodeAV1PictureInfo.set_delta_lf_res(this.segment(), value); return this; } + + /// {@return `ref_order_hint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_ref_order_hint(MemorySegment segment, long index) { return (byte) VH_ref_order_hint.get(segment, 0L, index); } + /// {@return `ref_order_hint`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_ref_order_hint(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_ref_order_hint(segment, 0L); } + /// {@return `ref_order_hint` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte ref_order_hintAt(long index) { return StdVideoEncodeAV1PictureInfo.get_ref_order_hint(this.segment(), index); } + /// {@return `ref_order_hint`} + public @CType("uint8_t [ ]") byte ref_order_hint() { return StdVideoEncodeAV1PictureInfo.get_ref_order_hint(this.segment()); } + /// Sets `ref_order_hint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ref_order_hint(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_ref_order_hint.set(segment, 0L, index, value); } + /// Sets `ref_order_hint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ref_order_hint(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoEncodeAV1PictureInfo.set_ref_order_hint(segment, 0L, value); } + /// Sets `ref_order_hint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo ref_order_hintAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoEncodeAV1PictureInfo.set_ref_order_hint(this.segment(), index, value); return this; } + /// Sets `ref_order_hint` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo ref_order_hint(@CType("uint8_t [ ]") byte value) { StdVideoEncodeAV1PictureInfo.set_ref_order_hint(this.segment(), value); return this; } + + /// {@return `ref_frame_idx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_ref_frame_idx(MemorySegment segment, long index) { return (byte) VH_ref_frame_idx.get(segment, 0L, index); } + /// {@return `ref_frame_idx`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_ref_frame_idx(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_ref_frame_idx(segment, 0L); } + /// {@return `ref_frame_idx` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte ref_frame_idxAt(long index) { return StdVideoEncodeAV1PictureInfo.get_ref_frame_idx(this.segment(), index); } + /// {@return `ref_frame_idx`} + public @CType("int8_t [ ]") byte ref_frame_idx() { return StdVideoEncodeAV1PictureInfo.get_ref_frame_idx(this.segment()); } + /// Sets `ref_frame_idx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ref_frame_idx(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_ref_frame_idx.set(segment, 0L, index, value); } + /// Sets `ref_frame_idx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ref_frame_idx(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoEncodeAV1PictureInfo.set_ref_frame_idx(segment, 0L, value); } + /// Sets `ref_frame_idx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo ref_frame_idxAt(long index, @CType("int8_t [ ]") byte value) { StdVideoEncodeAV1PictureInfo.set_ref_frame_idx(this.segment(), index, value); return this; } + /// Sets `ref_frame_idx` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo ref_frame_idx(@CType("int8_t [ ]") byte value) { StdVideoEncodeAV1PictureInfo.set_ref_frame_idx(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [3]") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [3]") byte get_reserved1(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t [3]") byte reserved1At(long index) { return StdVideoEncodeAV1PictureInfo.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t [3]") byte reserved1() { return StdVideoEncodeAV1PictureInfo.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t [3]") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t [3]") byte value) { StdVideoEncodeAV1PictureInfo.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo reserved1At(long index, @CType("uint8_t [3]") byte value) { StdVideoEncodeAV1PictureInfo.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo reserved1(@CType("uint8_t [3]") byte value) { StdVideoEncodeAV1PictureInfo.set_reserved1(this.segment(), value); return this; } + + /// {@return `delta_frame_id_minus_1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t [ ]") int get_delta_frame_id_minus_1(MemorySegment segment, long index) { return (int) VH_delta_frame_id_minus_1.get(segment, 0L, index); } + /// {@return `delta_frame_id_minus_1`} + /// @param segment the segment of the struct + public static @CType("uint32_t [ ]") int get_delta_frame_id_minus_1(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_delta_frame_id_minus_1(segment, 0L); } + /// {@return `delta_frame_id_minus_1` at the given index} + /// @param index the index + public @CType("uint32_t [ ]") int delta_frame_id_minus_1At(long index) { return StdVideoEncodeAV1PictureInfo.get_delta_frame_id_minus_1(this.segment(), index); } + /// {@return `delta_frame_id_minus_1`} + public @CType("uint32_t [ ]") int delta_frame_id_minus_1() { return StdVideoEncodeAV1PictureInfo.get_delta_frame_id_minus_1(this.segment()); } + /// Sets `delta_frame_id_minus_1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_frame_id_minus_1(MemorySegment segment, long index, @CType("uint32_t [ ]") int value) { VH_delta_frame_id_minus_1.set(segment, 0L, index, value); } + /// Sets `delta_frame_id_minus_1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_frame_id_minus_1(MemorySegment segment, @CType("uint32_t [ ]") int value) { StdVideoEncodeAV1PictureInfo.set_delta_frame_id_minus_1(segment, 0L, value); } + /// Sets `delta_frame_id_minus_1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo delta_frame_id_minus_1At(long index, @CType("uint32_t [ ]") int value) { StdVideoEncodeAV1PictureInfo.set_delta_frame_id_minus_1(this.segment(), index, value); return this; } + /// Sets `delta_frame_id_minus_1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo delta_frame_id_minus_1(@CType("uint32_t [ ]") int value) { StdVideoEncodeAV1PictureInfo.set_delta_frame_id_minus_1(this.segment(), value); return this; } + + /// {@return `pTileInfo` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment get_pTileInfo(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pTileInfo.get(segment, 0L, index); } + /// {@return `pTileInfo`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment get_pTileInfo(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_pTileInfo(segment, 0L); } + /// {@return `pTileInfo` at the given index} + /// @param index the index + public @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment pTileInfoAt(long index) { return StdVideoEncodeAV1PictureInfo.get_pTileInfo(this.segment(), index); } + /// {@return `pTileInfo`} + public @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment pTileInfo() { return StdVideoEncodeAV1PictureInfo.get_pTileInfo(this.segment()); } + /// Sets `pTileInfo` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pTileInfo(MemorySegment segment, long index, @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment value) { VH_pTileInfo.set(segment, 0L, index, value); } + /// Sets `pTileInfo` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pTileInfo(MemorySegment segment, @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pTileInfo(segment, 0L, value); } + /// Sets `pTileInfo` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pTileInfoAt(long index, @CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pTileInfo(this.segment(), index, value); return this; } + /// Sets `pTileInfo` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pTileInfo(@CType("const StdVideoAV1TileInfo *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pTileInfo(this.segment(), value); return this; } + + /// {@return `pQuantization` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment get_pQuantization(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pQuantization.get(segment, 0L, index); } + /// {@return `pQuantization`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment get_pQuantization(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_pQuantization(segment, 0L); } + /// {@return `pQuantization` at the given index} + /// @param index the index + public @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment pQuantizationAt(long index) { return StdVideoEncodeAV1PictureInfo.get_pQuantization(this.segment(), index); } + /// {@return `pQuantization`} + public @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment pQuantization() { return StdVideoEncodeAV1PictureInfo.get_pQuantization(this.segment()); } + /// Sets `pQuantization` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pQuantization(MemorySegment segment, long index, @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment value) { VH_pQuantization.set(segment, 0L, index, value); } + /// Sets `pQuantization` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pQuantization(MemorySegment segment, @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pQuantization(segment, 0L, value); } + /// Sets `pQuantization` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pQuantizationAt(long index, @CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pQuantization(this.segment(), index, value); return this; } + /// Sets `pQuantization` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pQuantization(@CType("const StdVideoAV1Quantization *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pQuantization(this.segment(), value); return this; } + + /// {@return `pSegmentation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment get_pSegmentation(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSegmentation.get(segment, 0L, index); } + /// {@return `pSegmentation`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment get_pSegmentation(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_pSegmentation(segment, 0L); } + /// {@return `pSegmentation` at the given index} + /// @param index the index + public @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment pSegmentationAt(long index) { return StdVideoEncodeAV1PictureInfo.get_pSegmentation(this.segment(), index); } + /// {@return `pSegmentation`} + public @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment pSegmentation() { return StdVideoEncodeAV1PictureInfo.get_pSegmentation(this.segment()); } + /// Sets `pSegmentation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSegmentation(MemorySegment segment, long index, @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment value) { VH_pSegmentation.set(segment, 0L, index, value); } + /// Sets `pSegmentation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSegmentation(MemorySegment segment, @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pSegmentation(segment, 0L, value); } + /// Sets `pSegmentation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pSegmentationAt(long index, @CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pSegmentation(this.segment(), index, value); return this; } + /// Sets `pSegmentation` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pSegmentation(@CType("const StdVideoAV1Segmentation *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pSegmentation(this.segment(), value); return this; } + + /// {@return `pLoopFilter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment get_pLoopFilter(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLoopFilter.get(segment, 0L, index); } + /// {@return `pLoopFilter`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment get_pLoopFilter(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_pLoopFilter(segment, 0L); } + /// {@return `pLoopFilter` at the given index} + /// @param index the index + public @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment pLoopFilterAt(long index) { return StdVideoEncodeAV1PictureInfo.get_pLoopFilter(this.segment(), index); } + /// {@return `pLoopFilter`} + public @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment pLoopFilter() { return StdVideoEncodeAV1PictureInfo.get_pLoopFilter(this.segment()); } + /// Sets `pLoopFilter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLoopFilter(MemorySegment segment, long index, @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment value) { VH_pLoopFilter.set(segment, 0L, index, value); } + /// Sets `pLoopFilter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLoopFilter(MemorySegment segment, @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pLoopFilter(segment, 0L, value); } + /// Sets `pLoopFilter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pLoopFilterAt(long index, @CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pLoopFilter(this.segment(), index, value); return this; } + /// Sets `pLoopFilter` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pLoopFilter(@CType("const StdVideoAV1LoopFilter *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pLoopFilter(this.segment(), value); return this; } + + /// {@return `pCDEF` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment get_pCDEF(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pCDEF.get(segment, 0L, index); } + /// {@return `pCDEF`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment get_pCDEF(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_pCDEF(segment, 0L); } + /// {@return `pCDEF` at the given index} + /// @param index the index + public @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment pCDEFAt(long index) { return StdVideoEncodeAV1PictureInfo.get_pCDEF(this.segment(), index); } + /// {@return `pCDEF`} + public @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment pCDEF() { return StdVideoEncodeAV1PictureInfo.get_pCDEF(this.segment()); } + /// Sets `pCDEF` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pCDEF(MemorySegment segment, long index, @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment value) { VH_pCDEF.set(segment, 0L, index, value); } + /// Sets `pCDEF` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pCDEF(MemorySegment segment, @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pCDEF(segment, 0L, value); } + /// Sets `pCDEF` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pCDEFAt(long index, @CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pCDEF(this.segment(), index, value); return this; } + /// Sets `pCDEF` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pCDEF(@CType("const StdVideoAV1CDEF *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pCDEF(this.segment(), value); return this; } + + /// {@return `pLoopRestoration` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment get_pLoopRestoration(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLoopRestoration.get(segment, 0L, index); } + /// {@return `pLoopRestoration`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment get_pLoopRestoration(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_pLoopRestoration(segment, 0L); } + /// {@return `pLoopRestoration` at the given index} + /// @param index the index + public @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment pLoopRestorationAt(long index) { return StdVideoEncodeAV1PictureInfo.get_pLoopRestoration(this.segment(), index); } + /// {@return `pLoopRestoration`} + public @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment pLoopRestoration() { return StdVideoEncodeAV1PictureInfo.get_pLoopRestoration(this.segment()); } + /// Sets `pLoopRestoration` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLoopRestoration(MemorySegment segment, long index, @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment value) { VH_pLoopRestoration.set(segment, 0L, index, value); } + /// Sets `pLoopRestoration` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLoopRestoration(MemorySegment segment, @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pLoopRestoration(segment, 0L, value); } + /// Sets `pLoopRestoration` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pLoopRestorationAt(long index, @CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pLoopRestoration(this.segment(), index, value); return this; } + /// Sets `pLoopRestoration` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pLoopRestoration(@CType("const StdVideoAV1LoopRestoration *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pLoopRestoration(this.segment(), value); return this; } + + /// {@return `pGlobalMotion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment get_pGlobalMotion(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pGlobalMotion.get(segment, 0L, index); } + /// {@return `pGlobalMotion`} + /// @param segment the segment of the struct + public static @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment get_pGlobalMotion(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_pGlobalMotion(segment, 0L); } + /// {@return `pGlobalMotion` at the given index} + /// @param index the index + public @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment pGlobalMotionAt(long index) { return StdVideoEncodeAV1PictureInfo.get_pGlobalMotion(this.segment(), index); } + /// {@return `pGlobalMotion`} + public @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment pGlobalMotion() { return StdVideoEncodeAV1PictureInfo.get_pGlobalMotion(this.segment()); } + /// Sets `pGlobalMotion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pGlobalMotion(MemorySegment segment, long index, @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment value) { VH_pGlobalMotion.set(segment, 0L, index, value); } + /// Sets `pGlobalMotion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pGlobalMotion(MemorySegment segment, @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pGlobalMotion(segment, 0L, value); } + /// Sets `pGlobalMotion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pGlobalMotionAt(long index, @CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pGlobalMotion(this.segment(), index, value); return this; } + /// Sets `pGlobalMotion` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pGlobalMotion(@CType("const StdVideoAV1GlobalMotion *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pGlobalMotion(this.segment(), value); return this; } + + /// {@return `pExtensionHeader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment get_pExtensionHeader(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pExtensionHeader.get(segment, 0L, index); } + /// {@return `pExtensionHeader`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment get_pExtensionHeader(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_pExtensionHeader(segment, 0L); } + /// {@return `pExtensionHeader` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment pExtensionHeaderAt(long index) { return StdVideoEncodeAV1PictureInfo.get_pExtensionHeader(this.segment(), index); } + /// {@return `pExtensionHeader`} + public @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment pExtensionHeader() { return StdVideoEncodeAV1PictureInfo.get_pExtensionHeader(this.segment()); } + /// Sets `pExtensionHeader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pExtensionHeader(MemorySegment segment, long index, @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment value) { VH_pExtensionHeader.set(segment, 0L, index, value); } + /// Sets `pExtensionHeader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pExtensionHeader(MemorySegment segment, @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pExtensionHeader(segment, 0L, value); } + /// Sets `pExtensionHeader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pExtensionHeaderAt(long index, @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pExtensionHeader(this.segment(), index, value); return this; } + /// Sets `pExtensionHeader` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pExtensionHeader(@CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pExtensionHeader(this.segment(), value); return this; } + + /// {@return `pBufferRemovalTimes` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pBufferRemovalTimes(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pBufferRemovalTimes.get(segment, 0L, index); } + /// {@return `pBufferRemovalTimes`} + /// @param segment the segment of the struct + public static @CType("const uint32_t *") java.lang.foreign.MemorySegment get_pBufferRemovalTimes(MemorySegment segment) { return StdVideoEncodeAV1PictureInfo.get_pBufferRemovalTimes(segment, 0L); } + /// {@return `pBufferRemovalTimes` at the given index} + /// @param index the index + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pBufferRemovalTimesAt(long index) { return StdVideoEncodeAV1PictureInfo.get_pBufferRemovalTimes(this.segment(), index); } + /// {@return `pBufferRemovalTimes`} + public @CType("const uint32_t *") java.lang.foreign.MemorySegment pBufferRemovalTimes() { return StdVideoEncodeAV1PictureInfo.get_pBufferRemovalTimes(this.segment()); } + /// Sets `pBufferRemovalTimes` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pBufferRemovalTimes(MemorySegment segment, long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { VH_pBufferRemovalTimes.set(segment, 0L, index, value); } + /// Sets `pBufferRemovalTimes` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pBufferRemovalTimes(MemorySegment segment, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pBufferRemovalTimes(segment, 0L, value); } + /// Sets `pBufferRemovalTimes` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pBufferRemovalTimesAt(long index, @CType("const uint32_t *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pBufferRemovalTimes(this.segment(), index, value); return this; } + /// Sets `pBufferRemovalTimes` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfo pBufferRemovalTimes(@CType("const uint32_t *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1PictureInfo.set_pBufferRemovalTimes(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1PictureInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1PictureInfoFlags.java new file mode 100644 index 00000000..1c3fd3f3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1PictureInfoFlags.java @@ -0,0 +1,1184 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### error_resilient_mode +/// [VarHandle][#VH_error_resilient_mode] - [Getter][#error_resilient_mode()] - [Setter][#error_resilient_mode(int)] +/// ### disable_cdf_update +/// [VarHandle][#VH_disable_cdf_update] - [Getter][#disable_cdf_update()] - [Setter][#disable_cdf_update(int)] +/// ### use_superres +/// [VarHandle][#VH_use_superres] - [Getter][#use_superres()] - [Setter][#use_superres(int)] +/// ### render_and_frame_size_different +/// [VarHandle][#VH_render_and_frame_size_different] - [Getter][#render_and_frame_size_different()] - [Setter][#render_and_frame_size_different(int)] +/// ### allow_screen_content_tools +/// [VarHandle][#VH_allow_screen_content_tools] - [Getter][#allow_screen_content_tools()] - [Setter][#allow_screen_content_tools(int)] +/// ### is_filter_switchable +/// [VarHandle][#VH_is_filter_switchable] - [Getter][#is_filter_switchable()] - [Setter][#is_filter_switchable(int)] +/// ### force_integer_mv +/// [VarHandle][#VH_force_integer_mv] - [Getter][#force_integer_mv()] - [Setter][#force_integer_mv(int)] +/// ### frame_size_override_flag +/// [VarHandle][#VH_frame_size_override_flag] - [Getter][#frame_size_override_flag()] - [Setter][#frame_size_override_flag(int)] +/// ### buffer_removal_time_present_flag +/// [VarHandle][#VH_buffer_removal_time_present_flag] - [Getter][#buffer_removal_time_present_flag()] - [Setter][#buffer_removal_time_present_flag(int)] +/// ### allow_intrabc +/// [VarHandle][#VH_allow_intrabc] - [Getter][#allow_intrabc()] - [Setter][#allow_intrabc(int)] +/// ### frame_refs_short_signaling +/// [VarHandle][#VH_frame_refs_short_signaling] - [Getter][#frame_refs_short_signaling()] - [Setter][#frame_refs_short_signaling(int)] +/// ### allow_high_precision_mv +/// [VarHandle][#VH_allow_high_precision_mv] - [Getter][#allow_high_precision_mv()] - [Setter][#allow_high_precision_mv(int)] +/// ### is_motion_mode_switchable +/// [VarHandle][#VH_is_motion_mode_switchable] - [Getter][#is_motion_mode_switchable()] - [Setter][#is_motion_mode_switchable(int)] +/// ### use_ref_frame_mvs +/// [VarHandle][#VH_use_ref_frame_mvs] - [Getter][#use_ref_frame_mvs()] - [Setter][#use_ref_frame_mvs(int)] +/// ### disable_frame_end_update_cdf +/// [VarHandle][#VH_disable_frame_end_update_cdf] - [Getter][#disable_frame_end_update_cdf()] - [Setter][#disable_frame_end_update_cdf(int)] +/// ### allow_warped_motion +/// [VarHandle][#VH_allow_warped_motion] - [Getter][#allow_warped_motion()] - [Setter][#allow_warped_motion(int)] +/// ### reduced_tx_set +/// [VarHandle][#VH_reduced_tx_set] - [Getter][#reduced_tx_set()] - [Setter][#reduced_tx_set(int)] +/// ### skip_mode_present +/// [VarHandle][#VH_skip_mode_present] - [Getter][#skip_mode_present()] - [Setter][#skip_mode_present(int)] +/// ### delta_q_present +/// [VarHandle][#VH_delta_q_present] - [Getter][#delta_q_present()] - [Setter][#delta_q_present(int)] +/// ### delta_lf_present +/// [VarHandle][#VH_delta_lf_present] - [Getter][#delta_lf_present()] - [Setter][#delta_lf_present(int)] +/// ### delta_lf_multi +/// [VarHandle][#VH_delta_lf_multi] - [Getter][#delta_lf_multi()] - [Setter][#delta_lf_multi(int)] +/// ### segmentation_enabled +/// [VarHandle][#VH_segmentation_enabled] - [Getter][#segmentation_enabled()] - [Setter][#segmentation_enabled(int)] +/// ### segmentation_update_map +/// [VarHandle][#VH_segmentation_update_map] - [Getter][#segmentation_update_map()] - [Setter][#segmentation_update_map(int)] +/// ### segmentation_temporal_update +/// [VarHandle][#VH_segmentation_temporal_update] - [Getter][#segmentation_temporal_update()] - [Setter][#segmentation_temporal_update(int)] +/// ### segmentation_update_data +/// [VarHandle][#VH_segmentation_update_data] - [Getter][#segmentation_update_data()] - [Setter][#segmentation_update_data(int)] +/// ### UsesLr +/// [VarHandle][#VH_UsesLr] - [Getter][#UsesLr()] - [Setter][#UsesLr(int)] +/// ### usesChromaLr +/// [VarHandle][#VH_usesChromaLr] - [Getter][#usesChromaLr()] - [Setter][#usesChromaLr(int)] +/// ### show_frame +/// [VarHandle][#VH_show_frame] - [Getter][#show_frame()] - [Setter][#show_frame(int)] +/// ### showable_frame +/// [VarHandle][#VH_showable_frame] - [Getter][#showable_frame()] - [Setter][#showable_frame(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeAV1PictureInfoFlags { +/// uint32_t : 1 error_resilient_mode; +/// uint32_t : 1 disable_cdf_update; +/// uint32_t : 1 use_superres; +/// uint32_t : 1 render_and_frame_size_different; +/// uint32_t : 1 allow_screen_content_tools; +/// uint32_t : 1 is_filter_switchable; +/// uint32_t : 1 force_integer_mv; +/// uint32_t : 1 frame_size_override_flag; +/// uint32_t : 1 buffer_removal_time_present_flag; +/// uint32_t : 1 allow_intrabc; +/// uint32_t : 1 frame_refs_short_signaling; +/// uint32_t : 1 allow_high_precision_mv; +/// uint32_t : 1 is_motion_mode_switchable; +/// uint32_t : 1 use_ref_frame_mvs; +/// uint32_t : 1 disable_frame_end_update_cdf; +/// uint32_t : 1 allow_warped_motion; +/// uint32_t : 1 reduced_tx_set; +/// uint32_t : 1 skip_mode_present; +/// uint32_t : 1 delta_q_present; +/// uint32_t : 1 delta_lf_present; +/// uint32_t : 1 delta_lf_multi; +/// uint32_t : 1 segmentation_enabled; +/// uint32_t : 1 segmentation_update_map; +/// uint32_t : 1 segmentation_temporal_update; +/// uint32_t : 1 segmentation_update_data; +/// uint32_t : 1 UsesLr; +/// uint32_t : 1 usesChromaLr; +/// uint32_t : 1 show_frame; +/// uint32_t : 1 showable_frame; +/// uint32_t : 3 reserved; +/// } StdVideoEncodeAV1PictureInfoFlags; +/// ``` +public final class StdVideoEncodeAV1PictureInfoFlags extends Struct { + /// The struct layout of `StdVideoEncodeAV1PictureInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("error_resilient_mode"), + ValueLayout.JAVA_INT.withName("disable_cdf_update"), + ValueLayout.JAVA_INT.withName("use_superres"), + ValueLayout.JAVA_INT.withName("render_and_frame_size_different"), + ValueLayout.JAVA_INT.withName("allow_screen_content_tools"), + ValueLayout.JAVA_INT.withName("is_filter_switchable"), + ValueLayout.JAVA_INT.withName("force_integer_mv"), + ValueLayout.JAVA_INT.withName("frame_size_override_flag"), + ValueLayout.JAVA_INT.withName("buffer_removal_time_present_flag"), + ValueLayout.JAVA_INT.withName("allow_intrabc"), + ValueLayout.JAVA_INT.withName("frame_refs_short_signaling"), + ValueLayout.JAVA_INT.withName("allow_high_precision_mv"), + ValueLayout.JAVA_INT.withName("is_motion_mode_switchable"), + ValueLayout.JAVA_INT.withName("use_ref_frame_mvs"), + ValueLayout.JAVA_INT.withName("disable_frame_end_update_cdf"), + ValueLayout.JAVA_INT.withName("allow_warped_motion"), + ValueLayout.JAVA_INT.withName("reduced_tx_set"), + ValueLayout.JAVA_INT.withName("skip_mode_present"), + ValueLayout.JAVA_INT.withName("delta_q_present"), + ValueLayout.JAVA_INT.withName("delta_lf_present"), + ValueLayout.JAVA_INT.withName("delta_lf_multi"), + ValueLayout.JAVA_INT.withName("segmentation_enabled"), + ValueLayout.JAVA_INT.withName("segmentation_update_map"), + ValueLayout.JAVA_INT.withName("segmentation_temporal_update"), + ValueLayout.JAVA_INT.withName("segmentation_update_data"), + ValueLayout.JAVA_INT.withName("UsesLr"), + ValueLayout.JAVA_INT.withName("usesChromaLr"), + ValueLayout.JAVA_INT.withName("show_frame"), + ValueLayout.JAVA_INT.withName("showable_frame"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `error_resilient_mode` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_error_resilient_mode = LAYOUT.arrayElementVarHandle(PathElement.groupElement("error_resilient_mode")); + /// The [VarHandle] of `disable_cdf_update` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disable_cdf_update = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disable_cdf_update")); + /// The [VarHandle] of `use_superres` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_use_superres = LAYOUT.arrayElementVarHandle(PathElement.groupElement("use_superres")); + /// The [VarHandle] of `render_and_frame_size_different` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_render_and_frame_size_different = LAYOUT.arrayElementVarHandle(PathElement.groupElement("render_and_frame_size_different")); + /// The [VarHandle] of `allow_screen_content_tools` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_allow_screen_content_tools = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allow_screen_content_tools")); + /// The [VarHandle] of `is_filter_switchable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_is_filter_switchable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("is_filter_switchable")); + /// The [VarHandle] of `force_integer_mv` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_force_integer_mv = LAYOUT.arrayElementVarHandle(PathElement.groupElement("force_integer_mv")); + /// The [VarHandle] of `frame_size_override_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_size_override_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_size_override_flag")); + /// The [VarHandle] of `buffer_removal_time_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_buffer_removal_time_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("buffer_removal_time_present_flag")); + /// The [VarHandle] of `allow_intrabc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_allow_intrabc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allow_intrabc")); + /// The [VarHandle] of `frame_refs_short_signaling` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_refs_short_signaling = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_refs_short_signaling")); + /// The [VarHandle] of `allow_high_precision_mv` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_allow_high_precision_mv = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allow_high_precision_mv")); + /// The [VarHandle] of `is_motion_mode_switchable` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_is_motion_mode_switchable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("is_motion_mode_switchable")); + /// The [VarHandle] of `use_ref_frame_mvs` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_use_ref_frame_mvs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("use_ref_frame_mvs")); + /// The [VarHandle] of `disable_frame_end_update_cdf` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disable_frame_end_update_cdf = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disable_frame_end_update_cdf")); + /// The [VarHandle] of `allow_warped_motion` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_allow_warped_motion = LAYOUT.arrayElementVarHandle(PathElement.groupElement("allow_warped_motion")); + /// The [VarHandle] of `reduced_tx_set` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reduced_tx_set = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reduced_tx_set")); + /// The [VarHandle] of `skip_mode_present` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_skip_mode_present = LAYOUT.arrayElementVarHandle(PathElement.groupElement("skip_mode_present")); + /// The [VarHandle] of `delta_q_present` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_delta_q_present = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_q_present")); + /// The [VarHandle] of `delta_lf_present` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_delta_lf_present = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_lf_present")); + /// The [VarHandle] of `delta_lf_multi` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_delta_lf_multi = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_lf_multi")); + /// The [VarHandle] of `segmentation_enabled` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_segmentation_enabled = LAYOUT.arrayElementVarHandle(PathElement.groupElement("segmentation_enabled")); + /// The [VarHandle] of `segmentation_update_map` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_segmentation_update_map = LAYOUT.arrayElementVarHandle(PathElement.groupElement("segmentation_update_map")); + /// The [VarHandle] of `segmentation_temporal_update` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_segmentation_temporal_update = LAYOUT.arrayElementVarHandle(PathElement.groupElement("segmentation_temporal_update")); + /// The [VarHandle] of `segmentation_update_data` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_segmentation_update_data = LAYOUT.arrayElementVarHandle(PathElement.groupElement("segmentation_update_data")); + /// The [VarHandle] of `UsesLr` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_UsesLr = LAYOUT.arrayElementVarHandle(PathElement.groupElement("UsesLr")); + /// The [VarHandle] of `usesChromaLr` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_usesChromaLr = LAYOUT.arrayElementVarHandle(PathElement.groupElement("usesChromaLr")); + /// The [VarHandle] of `show_frame` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_show_frame = LAYOUT.arrayElementVarHandle(PathElement.groupElement("show_frame")); + /// The [VarHandle] of `showable_frame` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_showable_frame = LAYOUT.arrayElementVarHandle(PathElement.groupElement("showable_frame")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeAV1PictureInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeAV1PictureInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeAV1PictureInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1PictureInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1PictureInfoFlags(segment); } + + /// Creates `StdVideoEncodeAV1PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1PictureInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeAV1PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1PictureInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeAV1PictureInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeAV1PictureInfoFlags` + public static StdVideoEncodeAV1PictureInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeAV1PictureInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeAV1PictureInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeAV1PictureInfoFlags` + public static StdVideoEncodeAV1PictureInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeAV1PictureInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `error_resilient_mode` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_error_resilient_mode(MemorySegment segment, long index) { return (int) VH_error_resilient_mode.get(segment, 0L, index); } + /// {@return `error_resilient_mode`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_error_resilient_mode(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_error_resilient_mode(segment, 0L); } + /// {@return `error_resilient_mode` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int error_resilient_modeAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_error_resilient_mode(this.segment(), index); } + /// {@return `error_resilient_mode`} + public @CType("uint32_t : 1") int error_resilient_mode() { return StdVideoEncodeAV1PictureInfoFlags.get_error_resilient_mode(this.segment()); } + /// Sets `error_resilient_mode` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_error_resilient_mode(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_error_resilient_mode.set(segment, 0L, index, value); } + /// Sets `error_resilient_mode` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_error_resilient_mode(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_error_resilient_mode(segment, 0L, value); } + /// Sets `error_resilient_mode` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags error_resilient_modeAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_error_resilient_mode(this.segment(), index, value); return this; } + /// Sets `error_resilient_mode` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags error_resilient_mode(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_error_resilient_mode(this.segment(), value); return this; } + + /// {@return `disable_cdf_update` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_disable_cdf_update(MemorySegment segment, long index) { return (int) VH_disable_cdf_update.get(segment, 0L, index); } + /// {@return `disable_cdf_update`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_disable_cdf_update(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_disable_cdf_update(segment, 0L); } + /// {@return `disable_cdf_update` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int disable_cdf_updateAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_disable_cdf_update(this.segment(), index); } + /// {@return `disable_cdf_update`} + public @CType("uint32_t : 1") int disable_cdf_update() { return StdVideoEncodeAV1PictureInfoFlags.get_disable_cdf_update(this.segment()); } + /// Sets `disable_cdf_update` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disable_cdf_update(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_disable_cdf_update.set(segment, 0L, index, value); } + /// Sets `disable_cdf_update` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disable_cdf_update(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_disable_cdf_update(segment, 0L, value); } + /// Sets `disable_cdf_update` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags disable_cdf_updateAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_disable_cdf_update(this.segment(), index, value); return this; } + /// Sets `disable_cdf_update` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags disable_cdf_update(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_disable_cdf_update(this.segment(), value); return this; } + + /// {@return `use_superres` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_use_superres(MemorySegment segment, long index) { return (int) VH_use_superres.get(segment, 0L, index); } + /// {@return `use_superres`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_use_superres(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_use_superres(segment, 0L); } + /// {@return `use_superres` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int use_superresAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_use_superres(this.segment(), index); } + /// {@return `use_superres`} + public @CType("uint32_t : 1") int use_superres() { return StdVideoEncodeAV1PictureInfoFlags.get_use_superres(this.segment()); } + /// Sets `use_superres` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_use_superres(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_use_superres.set(segment, 0L, index, value); } + /// Sets `use_superres` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_use_superres(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_use_superres(segment, 0L, value); } + /// Sets `use_superres` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags use_superresAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_use_superres(this.segment(), index, value); return this; } + /// Sets `use_superres` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags use_superres(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_use_superres(this.segment(), value); return this; } + + /// {@return `render_and_frame_size_different` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_render_and_frame_size_different(MemorySegment segment, long index) { return (int) VH_render_and_frame_size_different.get(segment, 0L, index); } + /// {@return `render_and_frame_size_different`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_render_and_frame_size_different(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_render_and_frame_size_different(segment, 0L); } + /// {@return `render_and_frame_size_different` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int render_and_frame_size_differentAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_render_and_frame_size_different(this.segment(), index); } + /// {@return `render_and_frame_size_different`} + public @CType("uint32_t : 1") int render_and_frame_size_different() { return StdVideoEncodeAV1PictureInfoFlags.get_render_and_frame_size_different(this.segment()); } + /// Sets `render_and_frame_size_different` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_render_and_frame_size_different(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_render_and_frame_size_different.set(segment, 0L, index, value); } + /// Sets `render_and_frame_size_different` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_render_and_frame_size_different(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_render_and_frame_size_different(segment, 0L, value); } + /// Sets `render_and_frame_size_different` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags render_and_frame_size_differentAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_render_and_frame_size_different(this.segment(), index, value); return this; } + /// Sets `render_and_frame_size_different` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags render_and_frame_size_different(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_render_and_frame_size_different(this.segment(), value); return this; } + + /// {@return `allow_screen_content_tools` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_allow_screen_content_tools(MemorySegment segment, long index) { return (int) VH_allow_screen_content_tools.get(segment, 0L, index); } + /// {@return `allow_screen_content_tools`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_allow_screen_content_tools(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_allow_screen_content_tools(segment, 0L); } + /// {@return `allow_screen_content_tools` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int allow_screen_content_toolsAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_allow_screen_content_tools(this.segment(), index); } + /// {@return `allow_screen_content_tools`} + public @CType("uint32_t : 1") int allow_screen_content_tools() { return StdVideoEncodeAV1PictureInfoFlags.get_allow_screen_content_tools(this.segment()); } + /// Sets `allow_screen_content_tools` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allow_screen_content_tools(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_allow_screen_content_tools.set(segment, 0L, index, value); } + /// Sets `allow_screen_content_tools` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allow_screen_content_tools(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_screen_content_tools(segment, 0L, value); } + /// Sets `allow_screen_content_tools` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags allow_screen_content_toolsAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_screen_content_tools(this.segment(), index, value); return this; } + /// Sets `allow_screen_content_tools` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags allow_screen_content_tools(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_screen_content_tools(this.segment(), value); return this; } + + /// {@return `is_filter_switchable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_is_filter_switchable(MemorySegment segment, long index) { return (int) VH_is_filter_switchable.get(segment, 0L, index); } + /// {@return `is_filter_switchable`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_is_filter_switchable(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_is_filter_switchable(segment, 0L); } + /// {@return `is_filter_switchable` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int is_filter_switchableAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_is_filter_switchable(this.segment(), index); } + /// {@return `is_filter_switchable`} + public @CType("uint32_t : 1") int is_filter_switchable() { return StdVideoEncodeAV1PictureInfoFlags.get_is_filter_switchable(this.segment()); } + /// Sets `is_filter_switchable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_is_filter_switchable(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_is_filter_switchable.set(segment, 0L, index, value); } + /// Sets `is_filter_switchable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_is_filter_switchable(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_is_filter_switchable(segment, 0L, value); } + /// Sets `is_filter_switchable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags is_filter_switchableAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_is_filter_switchable(this.segment(), index, value); return this; } + /// Sets `is_filter_switchable` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags is_filter_switchable(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_is_filter_switchable(this.segment(), value); return this; } + + /// {@return `force_integer_mv` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_force_integer_mv(MemorySegment segment, long index) { return (int) VH_force_integer_mv.get(segment, 0L, index); } + /// {@return `force_integer_mv`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_force_integer_mv(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_force_integer_mv(segment, 0L); } + /// {@return `force_integer_mv` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int force_integer_mvAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_force_integer_mv(this.segment(), index); } + /// {@return `force_integer_mv`} + public @CType("uint32_t : 1") int force_integer_mv() { return StdVideoEncodeAV1PictureInfoFlags.get_force_integer_mv(this.segment()); } + /// Sets `force_integer_mv` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_force_integer_mv(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_force_integer_mv.set(segment, 0L, index, value); } + /// Sets `force_integer_mv` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_force_integer_mv(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_force_integer_mv(segment, 0L, value); } + /// Sets `force_integer_mv` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags force_integer_mvAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_force_integer_mv(this.segment(), index, value); return this; } + /// Sets `force_integer_mv` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags force_integer_mv(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_force_integer_mv(this.segment(), value); return this; } + + /// {@return `frame_size_override_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_frame_size_override_flag(MemorySegment segment, long index) { return (int) VH_frame_size_override_flag.get(segment, 0L, index); } + /// {@return `frame_size_override_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_frame_size_override_flag(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_frame_size_override_flag(segment, 0L); } + /// {@return `frame_size_override_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int frame_size_override_flagAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_frame_size_override_flag(this.segment(), index); } + /// {@return `frame_size_override_flag`} + public @CType("uint32_t : 1") int frame_size_override_flag() { return StdVideoEncodeAV1PictureInfoFlags.get_frame_size_override_flag(this.segment()); } + /// Sets `frame_size_override_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_size_override_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_frame_size_override_flag.set(segment, 0L, index, value); } + /// Sets `frame_size_override_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_size_override_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_frame_size_override_flag(segment, 0L, value); } + /// Sets `frame_size_override_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags frame_size_override_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_frame_size_override_flag(this.segment(), index, value); return this; } + /// Sets `frame_size_override_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags frame_size_override_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_frame_size_override_flag(this.segment(), value); return this; } + + /// {@return `buffer_removal_time_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_buffer_removal_time_present_flag(MemorySegment segment, long index) { return (int) VH_buffer_removal_time_present_flag.get(segment, 0L, index); } + /// {@return `buffer_removal_time_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_buffer_removal_time_present_flag(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_buffer_removal_time_present_flag(segment, 0L); } + /// {@return `buffer_removal_time_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int buffer_removal_time_present_flagAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_buffer_removal_time_present_flag(this.segment(), index); } + /// {@return `buffer_removal_time_present_flag`} + public @CType("uint32_t : 1") int buffer_removal_time_present_flag() { return StdVideoEncodeAV1PictureInfoFlags.get_buffer_removal_time_present_flag(this.segment()); } + /// Sets `buffer_removal_time_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_buffer_removal_time_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_buffer_removal_time_present_flag.set(segment, 0L, index, value); } + /// Sets `buffer_removal_time_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_buffer_removal_time_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_buffer_removal_time_present_flag(segment, 0L, value); } + /// Sets `buffer_removal_time_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags buffer_removal_time_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_buffer_removal_time_present_flag(this.segment(), index, value); return this; } + /// Sets `buffer_removal_time_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags buffer_removal_time_present_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_buffer_removal_time_present_flag(this.segment(), value); return this; } + + /// {@return `allow_intrabc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_allow_intrabc(MemorySegment segment, long index) { return (int) VH_allow_intrabc.get(segment, 0L, index); } + /// {@return `allow_intrabc`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_allow_intrabc(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_allow_intrabc(segment, 0L); } + /// {@return `allow_intrabc` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int allow_intrabcAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_allow_intrabc(this.segment(), index); } + /// {@return `allow_intrabc`} + public @CType("uint32_t : 1") int allow_intrabc() { return StdVideoEncodeAV1PictureInfoFlags.get_allow_intrabc(this.segment()); } + /// Sets `allow_intrabc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allow_intrabc(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_allow_intrabc.set(segment, 0L, index, value); } + /// Sets `allow_intrabc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allow_intrabc(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_intrabc(segment, 0L, value); } + /// Sets `allow_intrabc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags allow_intrabcAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_intrabc(this.segment(), index, value); return this; } + /// Sets `allow_intrabc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags allow_intrabc(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_intrabc(this.segment(), value); return this; } + + /// {@return `frame_refs_short_signaling` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_frame_refs_short_signaling(MemorySegment segment, long index) { return (int) VH_frame_refs_short_signaling.get(segment, 0L, index); } + /// {@return `frame_refs_short_signaling`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_frame_refs_short_signaling(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_frame_refs_short_signaling(segment, 0L); } + /// {@return `frame_refs_short_signaling` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int frame_refs_short_signalingAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_frame_refs_short_signaling(this.segment(), index); } + /// {@return `frame_refs_short_signaling`} + public @CType("uint32_t : 1") int frame_refs_short_signaling() { return StdVideoEncodeAV1PictureInfoFlags.get_frame_refs_short_signaling(this.segment()); } + /// Sets `frame_refs_short_signaling` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_refs_short_signaling(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_frame_refs_short_signaling.set(segment, 0L, index, value); } + /// Sets `frame_refs_short_signaling` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_refs_short_signaling(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_frame_refs_short_signaling(segment, 0L, value); } + /// Sets `frame_refs_short_signaling` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags frame_refs_short_signalingAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_frame_refs_short_signaling(this.segment(), index, value); return this; } + /// Sets `frame_refs_short_signaling` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags frame_refs_short_signaling(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_frame_refs_short_signaling(this.segment(), value); return this; } + + /// {@return `allow_high_precision_mv` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_allow_high_precision_mv(MemorySegment segment, long index) { return (int) VH_allow_high_precision_mv.get(segment, 0L, index); } + /// {@return `allow_high_precision_mv`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_allow_high_precision_mv(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_allow_high_precision_mv(segment, 0L); } + /// {@return `allow_high_precision_mv` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int allow_high_precision_mvAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_allow_high_precision_mv(this.segment(), index); } + /// {@return `allow_high_precision_mv`} + public @CType("uint32_t : 1") int allow_high_precision_mv() { return StdVideoEncodeAV1PictureInfoFlags.get_allow_high_precision_mv(this.segment()); } + /// Sets `allow_high_precision_mv` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allow_high_precision_mv(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_allow_high_precision_mv.set(segment, 0L, index, value); } + /// Sets `allow_high_precision_mv` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allow_high_precision_mv(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_high_precision_mv(segment, 0L, value); } + /// Sets `allow_high_precision_mv` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags allow_high_precision_mvAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_high_precision_mv(this.segment(), index, value); return this; } + /// Sets `allow_high_precision_mv` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags allow_high_precision_mv(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_high_precision_mv(this.segment(), value); return this; } + + /// {@return `is_motion_mode_switchable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_is_motion_mode_switchable(MemorySegment segment, long index) { return (int) VH_is_motion_mode_switchable.get(segment, 0L, index); } + /// {@return `is_motion_mode_switchable`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_is_motion_mode_switchable(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_is_motion_mode_switchable(segment, 0L); } + /// {@return `is_motion_mode_switchable` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int is_motion_mode_switchableAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_is_motion_mode_switchable(this.segment(), index); } + /// {@return `is_motion_mode_switchable`} + public @CType("uint32_t : 1") int is_motion_mode_switchable() { return StdVideoEncodeAV1PictureInfoFlags.get_is_motion_mode_switchable(this.segment()); } + /// Sets `is_motion_mode_switchable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_is_motion_mode_switchable(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_is_motion_mode_switchable.set(segment, 0L, index, value); } + /// Sets `is_motion_mode_switchable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_is_motion_mode_switchable(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_is_motion_mode_switchable(segment, 0L, value); } + /// Sets `is_motion_mode_switchable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags is_motion_mode_switchableAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_is_motion_mode_switchable(this.segment(), index, value); return this; } + /// Sets `is_motion_mode_switchable` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags is_motion_mode_switchable(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_is_motion_mode_switchable(this.segment(), value); return this; } + + /// {@return `use_ref_frame_mvs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_use_ref_frame_mvs(MemorySegment segment, long index) { return (int) VH_use_ref_frame_mvs.get(segment, 0L, index); } + /// {@return `use_ref_frame_mvs`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_use_ref_frame_mvs(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_use_ref_frame_mvs(segment, 0L); } + /// {@return `use_ref_frame_mvs` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int use_ref_frame_mvsAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_use_ref_frame_mvs(this.segment(), index); } + /// {@return `use_ref_frame_mvs`} + public @CType("uint32_t : 1") int use_ref_frame_mvs() { return StdVideoEncodeAV1PictureInfoFlags.get_use_ref_frame_mvs(this.segment()); } + /// Sets `use_ref_frame_mvs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_use_ref_frame_mvs(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_use_ref_frame_mvs.set(segment, 0L, index, value); } + /// Sets `use_ref_frame_mvs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_use_ref_frame_mvs(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_use_ref_frame_mvs(segment, 0L, value); } + /// Sets `use_ref_frame_mvs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags use_ref_frame_mvsAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_use_ref_frame_mvs(this.segment(), index, value); return this; } + /// Sets `use_ref_frame_mvs` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags use_ref_frame_mvs(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_use_ref_frame_mvs(this.segment(), value); return this; } + + /// {@return `disable_frame_end_update_cdf` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_disable_frame_end_update_cdf(MemorySegment segment, long index) { return (int) VH_disable_frame_end_update_cdf.get(segment, 0L, index); } + /// {@return `disable_frame_end_update_cdf`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_disable_frame_end_update_cdf(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_disable_frame_end_update_cdf(segment, 0L); } + /// {@return `disable_frame_end_update_cdf` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int disable_frame_end_update_cdfAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_disable_frame_end_update_cdf(this.segment(), index); } + /// {@return `disable_frame_end_update_cdf`} + public @CType("uint32_t : 1") int disable_frame_end_update_cdf() { return StdVideoEncodeAV1PictureInfoFlags.get_disable_frame_end_update_cdf(this.segment()); } + /// Sets `disable_frame_end_update_cdf` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disable_frame_end_update_cdf(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_disable_frame_end_update_cdf.set(segment, 0L, index, value); } + /// Sets `disable_frame_end_update_cdf` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disable_frame_end_update_cdf(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_disable_frame_end_update_cdf(segment, 0L, value); } + /// Sets `disable_frame_end_update_cdf` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags disable_frame_end_update_cdfAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_disable_frame_end_update_cdf(this.segment(), index, value); return this; } + /// Sets `disable_frame_end_update_cdf` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags disable_frame_end_update_cdf(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_disable_frame_end_update_cdf(this.segment(), value); return this; } + + /// {@return `allow_warped_motion` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_allow_warped_motion(MemorySegment segment, long index) { return (int) VH_allow_warped_motion.get(segment, 0L, index); } + /// {@return `allow_warped_motion`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_allow_warped_motion(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_allow_warped_motion(segment, 0L); } + /// {@return `allow_warped_motion` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int allow_warped_motionAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_allow_warped_motion(this.segment(), index); } + /// {@return `allow_warped_motion`} + public @CType("uint32_t : 1") int allow_warped_motion() { return StdVideoEncodeAV1PictureInfoFlags.get_allow_warped_motion(this.segment()); } + /// Sets `allow_warped_motion` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_allow_warped_motion(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_allow_warped_motion.set(segment, 0L, index, value); } + /// Sets `allow_warped_motion` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_allow_warped_motion(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_warped_motion(segment, 0L, value); } + /// Sets `allow_warped_motion` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags allow_warped_motionAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_warped_motion(this.segment(), index, value); return this; } + /// Sets `allow_warped_motion` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags allow_warped_motion(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_allow_warped_motion(this.segment(), value); return this; } + + /// {@return `reduced_tx_set` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_reduced_tx_set(MemorySegment segment, long index) { return (int) VH_reduced_tx_set.get(segment, 0L, index); } + /// {@return `reduced_tx_set`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_reduced_tx_set(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_reduced_tx_set(segment, 0L); } + /// {@return `reduced_tx_set` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int reduced_tx_setAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_reduced_tx_set(this.segment(), index); } + /// {@return `reduced_tx_set`} + public @CType("uint32_t : 1") int reduced_tx_set() { return StdVideoEncodeAV1PictureInfoFlags.get_reduced_tx_set(this.segment()); } + /// Sets `reduced_tx_set` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reduced_tx_set(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_reduced_tx_set.set(segment, 0L, index, value); } + /// Sets `reduced_tx_set` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reduced_tx_set(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_reduced_tx_set(segment, 0L, value); } + /// Sets `reduced_tx_set` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags reduced_tx_setAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_reduced_tx_set(this.segment(), index, value); return this; } + /// Sets `reduced_tx_set` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags reduced_tx_set(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_reduced_tx_set(this.segment(), value); return this; } + + /// {@return `skip_mode_present` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_skip_mode_present(MemorySegment segment, long index) { return (int) VH_skip_mode_present.get(segment, 0L, index); } + /// {@return `skip_mode_present`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_skip_mode_present(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_skip_mode_present(segment, 0L); } + /// {@return `skip_mode_present` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int skip_mode_presentAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_skip_mode_present(this.segment(), index); } + /// {@return `skip_mode_present`} + public @CType("uint32_t : 1") int skip_mode_present() { return StdVideoEncodeAV1PictureInfoFlags.get_skip_mode_present(this.segment()); } + /// Sets `skip_mode_present` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_skip_mode_present(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_skip_mode_present.set(segment, 0L, index, value); } + /// Sets `skip_mode_present` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_skip_mode_present(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_skip_mode_present(segment, 0L, value); } + /// Sets `skip_mode_present` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags skip_mode_presentAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_skip_mode_present(this.segment(), index, value); return this; } + /// Sets `skip_mode_present` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags skip_mode_present(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_skip_mode_present(this.segment(), value); return this; } + + /// {@return `delta_q_present` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_delta_q_present(MemorySegment segment, long index) { return (int) VH_delta_q_present.get(segment, 0L, index); } + /// {@return `delta_q_present`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_delta_q_present(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_delta_q_present(segment, 0L); } + /// {@return `delta_q_present` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int delta_q_presentAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_delta_q_present(this.segment(), index); } + /// {@return `delta_q_present`} + public @CType("uint32_t : 1") int delta_q_present() { return StdVideoEncodeAV1PictureInfoFlags.get_delta_q_present(this.segment()); } + /// Sets `delta_q_present` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_q_present(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_delta_q_present.set(segment, 0L, index, value); } + /// Sets `delta_q_present` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_q_present(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_delta_q_present(segment, 0L, value); } + /// Sets `delta_q_present` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags delta_q_presentAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_delta_q_present(this.segment(), index, value); return this; } + /// Sets `delta_q_present` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags delta_q_present(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_delta_q_present(this.segment(), value); return this; } + + /// {@return `delta_lf_present` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_delta_lf_present(MemorySegment segment, long index) { return (int) VH_delta_lf_present.get(segment, 0L, index); } + /// {@return `delta_lf_present`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_delta_lf_present(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_delta_lf_present(segment, 0L); } + /// {@return `delta_lf_present` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int delta_lf_presentAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_delta_lf_present(this.segment(), index); } + /// {@return `delta_lf_present`} + public @CType("uint32_t : 1") int delta_lf_present() { return StdVideoEncodeAV1PictureInfoFlags.get_delta_lf_present(this.segment()); } + /// Sets `delta_lf_present` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_lf_present(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_delta_lf_present.set(segment, 0L, index, value); } + /// Sets `delta_lf_present` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_lf_present(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_delta_lf_present(segment, 0L, value); } + /// Sets `delta_lf_present` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags delta_lf_presentAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_delta_lf_present(this.segment(), index, value); return this; } + /// Sets `delta_lf_present` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags delta_lf_present(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_delta_lf_present(this.segment(), value); return this; } + + /// {@return `delta_lf_multi` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_delta_lf_multi(MemorySegment segment, long index) { return (int) VH_delta_lf_multi.get(segment, 0L, index); } + /// {@return `delta_lf_multi`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_delta_lf_multi(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_delta_lf_multi(segment, 0L); } + /// {@return `delta_lf_multi` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int delta_lf_multiAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_delta_lf_multi(this.segment(), index); } + /// {@return `delta_lf_multi`} + public @CType("uint32_t : 1") int delta_lf_multi() { return StdVideoEncodeAV1PictureInfoFlags.get_delta_lf_multi(this.segment()); } + /// Sets `delta_lf_multi` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_lf_multi(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_delta_lf_multi.set(segment, 0L, index, value); } + /// Sets `delta_lf_multi` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_lf_multi(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_delta_lf_multi(segment, 0L, value); } + /// Sets `delta_lf_multi` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags delta_lf_multiAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_delta_lf_multi(this.segment(), index, value); return this; } + /// Sets `delta_lf_multi` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags delta_lf_multi(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_delta_lf_multi(this.segment(), value); return this; } + + /// {@return `segmentation_enabled` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_segmentation_enabled(MemorySegment segment, long index) { return (int) VH_segmentation_enabled.get(segment, 0L, index); } + /// {@return `segmentation_enabled`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_segmentation_enabled(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_enabled(segment, 0L); } + /// {@return `segmentation_enabled` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int segmentation_enabledAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_enabled(this.segment(), index); } + /// {@return `segmentation_enabled`} + public @CType("uint32_t : 1") int segmentation_enabled() { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_enabled(this.segment()); } + /// Sets `segmentation_enabled` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_segmentation_enabled(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_segmentation_enabled.set(segment, 0L, index, value); } + /// Sets `segmentation_enabled` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_segmentation_enabled(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_enabled(segment, 0L, value); } + /// Sets `segmentation_enabled` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags segmentation_enabledAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_enabled(this.segment(), index, value); return this; } + /// Sets `segmentation_enabled` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags segmentation_enabled(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_enabled(this.segment(), value); return this; } + + /// {@return `segmentation_update_map` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_segmentation_update_map(MemorySegment segment, long index) { return (int) VH_segmentation_update_map.get(segment, 0L, index); } + /// {@return `segmentation_update_map`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_segmentation_update_map(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_update_map(segment, 0L); } + /// {@return `segmentation_update_map` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int segmentation_update_mapAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_update_map(this.segment(), index); } + /// {@return `segmentation_update_map`} + public @CType("uint32_t : 1") int segmentation_update_map() { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_update_map(this.segment()); } + /// Sets `segmentation_update_map` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_segmentation_update_map(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_segmentation_update_map.set(segment, 0L, index, value); } + /// Sets `segmentation_update_map` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_segmentation_update_map(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_update_map(segment, 0L, value); } + /// Sets `segmentation_update_map` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags segmentation_update_mapAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_update_map(this.segment(), index, value); return this; } + /// Sets `segmentation_update_map` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags segmentation_update_map(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_update_map(this.segment(), value); return this; } + + /// {@return `segmentation_temporal_update` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_segmentation_temporal_update(MemorySegment segment, long index) { return (int) VH_segmentation_temporal_update.get(segment, 0L, index); } + /// {@return `segmentation_temporal_update`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_segmentation_temporal_update(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_temporal_update(segment, 0L); } + /// {@return `segmentation_temporal_update` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int segmentation_temporal_updateAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_temporal_update(this.segment(), index); } + /// {@return `segmentation_temporal_update`} + public @CType("uint32_t : 1") int segmentation_temporal_update() { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_temporal_update(this.segment()); } + /// Sets `segmentation_temporal_update` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_segmentation_temporal_update(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_segmentation_temporal_update.set(segment, 0L, index, value); } + /// Sets `segmentation_temporal_update` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_segmentation_temporal_update(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_temporal_update(segment, 0L, value); } + /// Sets `segmentation_temporal_update` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags segmentation_temporal_updateAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_temporal_update(this.segment(), index, value); return this; } + /// Sets `segmentation_temporal_update` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags segmentation_temporal_update(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_temporal_update(this.segment(), value); return this; } + + /// {@return `segmentation_update_data` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_segmentation_update_data(MemorySegment segment, long index) { return (int) VH_segmentation_update_data.get(segment, 0L, index); } + /// {@return `segmentation_update_data`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_segmentation_update_data(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_update_data(segment, 0L); } + /// {@return `segmentation_update_data` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int segmentation_update_dataAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_update_data(this.segment(), index); } + /// {@return `segmentation_update_data`} + public @CType("uint32_t : 1") int segmentation_update_data() { return StdVideoEncodeAV1PictureInfoFlags.get_segmentation_update_data(this.segment()); } + /// Sets `segmentation_update_data` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_segmentation_update_data(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_segmentation_update_data.set(segment, 0L, index, value); } + /// Sets `segmentation_update_data` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_segmentation_update_data(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_update_data(segment, 0L, value); } + /// Sets `segmentation_update_data` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags segmentation_update_dataAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_update_data(this.segment(), index, value); return this; } + /// Sets `segmentation_update_data` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags segmentation_update_data(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_segmentation_update_data(this.segment(), value); return this; } + + /// {@return `UsesLr` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_UsesLr(MemorySegment segment, long index) { return (int) VH_UsesLr.get(segment, 0L, index); } + /// {@return `UsesLr`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_UsesLr(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_UsesLr(segment, 0L); } + /// {@return `UsesLr` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int UsesLrAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_UsesLr(this.segment(), index); } + /// {@return `UsesLr`} + public @CType("uint32_t : 1") int UsesLr() { return StdVideoEncodeAV1PictureInfoFlags.get_UsesLr(this.segment()); } + /// Sets `UsesLr` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_UsesLr(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_UsesLr.set(segment, 0L, index, value); } + /// Sets `UsesLr` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_UsesLr(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_UsesLr(segment, 0L, value); } + /// Sets `UsesLr` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags UsesLrAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_UsesLr(this.segment(), index, value); return this; } + /// Sets `UsesLr` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags UsesLr(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_UsesLr(this.segment(), value); return this; } + + /// {@return `usesChromaLr` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_usesChromaLr(MemorySegment segment, long index) { return (int) VH_usesChromaLr.get(segment, 0L, index); } + /// {@return `usesChromaLr`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_usesChromaLr(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_usesChromaLr(segment, 0L); } + /// {@return `usesChromaLr` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int usesChromaLrAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_usesChromaLr(this.segment(), index); } + /// {@return `usesChromaLr`} + public @CType("uint32_t : 1") int usesChromaLr() { return StdVideoEncodeAV1PictureInfoFlags.get_usesChromaLr(this.segment()); } + /// Sets `usesChromaLr` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_usesChromaLr(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_usesChromaLr.set(segment, 0L, index, value); } + /// Sets `usesChromaLr` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_usesChromaLr(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_usesChromaLr(segment, 0L, value); } + /// Sets `usesChromaLr` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags usesChromaLrAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_usesChromaLr(this.segment(), index, value); return this; } + /// Sets `usesChromaLr` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags usesChromaLr(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_usesChromaLr(this.segment(), value); return this; } + + /// {@return `show_frame` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_show_frame(MemorySegment segment, long index) { return (int) VH_show_frame.get(segment, 0L, index); } + /// {@return `show_frame`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_show_frame(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_show_frame(segment, 0L); } + /// {@return `show_frame` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int show_frameAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_show_frame(this.segment(), index); } + /// {@return `show_frame`} + public @CType("uint32_t : 1") int show_frame() { return StdVideoEncodeAV1PictureInfoFlags.get_show_frame(this.segment()); } + /// Sets `show_frame` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_show_frame(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_show_frame.set(segment, 0L, index, value); } + /// Sets `show_frame` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_show_frame(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_show_frame(segment, 0L, value); } + /// Sets `show_frame` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags show_frameAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_show_frame(this.segment(), index, value); return this; } + /// Sets `show_frame` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags show_frame(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_show_frame(this.segment(), value); return this; } + + /// {@return `showable_frame` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_showable_frame(MemorySegment segment, long index) { return (int) VH_showable_frame.get(segment, 0L, index); } + /// {@return `showable_frame`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_showable_frame(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_showable_frame(segment, 0L); } + /// {@return `showable_frame` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int showable_frameAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_showable_frame(this.segment(), index); } + /// {@return `showable_frame`} + public @CType("uint32_t : 1") int showable_frame() { return StdVideoEncodeAV1PictureInfoFlags.get_showable_frame(this.segment()); } + /// Sets `showable_frame` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_showable_frame(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_showable_frame.set(segment, 0L, index, value); } + /// Sets `showable_frame` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_showable_frame(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_showable_frame(segment, 0L, value); } + /// Sets `showable_frame` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags showable_frameAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_showable_frame(this.segment(), index, value); return this; } + /// Sets `showable_frame` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags showable_frame(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1PictureInfoFlags.set_showable_frame(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 3") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 3") int get_reserved(MemorySegment segment) { return StdVideoEncodeAV1PictureInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 3") int reservedAt(long index) { return StdVideoEncodeAV1PictureInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 3") int reserved() { return StdVideoEncodeAV1PictureInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 3") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 3") int value) { StdVideoEncodeAV1PictureInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags reservedAt(long index, @CType("uint32_t : 3") int value) { StdVideoEncodeAV1PictureInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1PictureInfoFlags reserved(@CType("uint32_t : 3") int value) { StdVideoEncodeAV1PictureInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1ReferenceInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1ReferenceInfo.java new file mode 100644 index 00000000..ad991483 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1ReferenceInfo.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### RefFrameId +/// [VarHandle][#VH_RefFrameId] - [Getter][#RefFrameId()] - [Setter][#RefFrameId(int)] +/// ### frame_type +/// [VarHandle][#VH_frame_type] - [Getter][#frame_type()] - [Setter][#frame_type(int)] +/// ### OrderHint +/// [VarHandle][#VH_OrderHint] - [Getter][#OrderHint()] - [Setter][#OrderHint(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### pExtensionHeader +/// [VarHandle][#VH_pExtensionHeader] - [Getter][#pExtensionHeader()] - [Setter][#pExtensionHeader(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeAV1ReferenceInfo { +/// StdVideoEncodeAV1ReferenceInfoFlags flags; +/// uint32_t RefFrameId; +/// StdVideoAV1FrameType frame_type; +/// uint8_t OrderHint; +/// uint8_t [3] reserved1; +/// const StdVideoEncodeAV1ExtensionHeader * pExtensionHeader; +/// } StdVideoEncodeAV1ReferenceInfo; +/// ``` +public final class StdVideoEncodeAV1ReferenceInfo extends Struct { + /// The struct layout of `StdVideoEncodeAV1ReferenceInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeAV1ReferenceInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("RefFrameId"), + ValueLayout.JAVA_INT.withName("frame_type"), + ValueLayout.JAVA_BYTE.withName("OrderHint"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.ADDRESS.withName("pExtensionHeader") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `RefFrameId` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_RefFrameId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("RefFrameId")); + /// The [VarHandle] of `frame_type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_type")); + /// The [VarHandle] of `OrderHint` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_OrderHint = LAYOUT.arrayElementVarHandle(PathElement.groupElement("OrderHint")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `pExtensionHeader` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pExtensionHeader = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pExtensionHeader")); + + /// Creates `StdVideoEncodeAV1ReferenceInfo` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeAV1ReferenceInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeAV1ReferenceInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1ReferenceInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1ReferenceInfo(segment); } + + /// Creates `StdVideoEncodeAV1ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1ReferenceInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeAV1ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1ReferenceInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeAV1ReferenceInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeAV1ReferenceInfo` + public static StdVideoEncodeAV1ReferenceInfo alloc(SegmentAllocator allocator) { return new StdVideoEncodeAV1ReferenceInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeAV1ReferenceInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeAV1ReferenceInfo` + public static StdVideoEncodeAV1ReferenceInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeAV1ReferenceInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeAV1ReferenceInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeAV1ReferenceInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeAV1ReferenceInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1ReferenceInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo flagsAt(long index, @CType("StdVideoEncodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1ReferenceInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo flags(@CType("StdVideoEncodeAV1ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1ReferenceInfo.set_flags(this.segment(), value); return this; } + + /// {@return `RefFrameId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_RefFrameId(MemorySegment segment, long index) { return (int) VH_RefFrameId.get(segment, 0L, index); } + /// {@return `RefFrameId`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_RefFrameId(MemorySegment segment) { return StdVideoEncodeAV1ReferenceInfo.get_RefFrameId(segment, 0L); } + /// {@return `RefFrameId` at the given index} + /// @param index the index + public @CType("uint32_t") int RefFrameIdAt(long index) { return StdVideoEncodeAV1ReferenceInfo.get_RefFrameId(this.segment(), index); } + /// {@return `RefFrameId`} + public @CType("uint32_t") int RefFrameId() { return StdVideoEncodeAV1ReferenceInfo.get_RefFrameId(this.segment()); } + /// Sets `RefFrameId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_RefFrameId(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_RefFrameId.set(segment, 0L, index, value); } + /// Sets `RefFrameId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_RefFrameId(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeAV1ReferenceInfo.set_RefFrameId(segment, 0L, value); } + /// Sets `RefFrameId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo RefFrameIdAt(long index, @CType("uint32_t") int value) { StdVideoEncodeAV1ReferenceInfo.set_RefFrameId(this.segment(), index, value); return this; } + /// Sets `RefFrameId` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo RefFrameId(@CType("uint32_t") int value) { StdVideoEncodeAV1ReferenceInfo.set_RefFrameId(this.segment(), value); return this; } + + /// {@return `frame_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoAV1FrameType") int get_frame_type(MemorySegment segment, long index) { return (int) VH_frame_type.get(segment, 0L, index); } + /// {@return `frame_type`} + /// @param segment the segment of the struct + public static @CType("StdVideoAV1FrameType") int get_frame_type(MemorySegment segment) { return StdVideoEncodeAV1ReferenceInfo.get_frame_type(segment, 0L); } + /// {@return `frame_type` at the given index} + /// @param index the index + public @CType("StdVideoAV1FrameType") int frame_typeAt(long index) { return StdVideoEncodeAV1ReferenceInfo.get_frame_type(this.segment(), index); } + /// {@return `frame_type`} + public @CType("StdVideoAV1FrameType") int frame_type() { return StdVideoEncodeAV1ReferenceInfo.get_frame_type(this.segment()); } + /// Sets `frame_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_type(MemorySegment segment, long index, @CType("StdVideoAV1FrameType") int value) { VH_frame_type.set(segment, 0L, index, value); } + /// Sets `frame_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_type(MemorySegment segment, @CType("StdVideoAV1FrameType") int value) { StdVideoEncodeAV1ReferenceInfo.set_frame_type(segment, 0L, value); } + /// Sets `frame_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo frame_typeAt(long index, @CType("StdVideoAV1FrameType") int value) { StdVideoEncodeAV1ReferenceInfo.set_frame_type(this.segment(), index, value); return this; } + /// Sets `frame_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo frame_type(@CType("StdVideoAV1FrameType") int value) { StdVideoEncodeAV1ReferenceInfo.set_frame_type(this.segment(), value); return this; } + + /// {@return `OrderHint` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_OrderHint(MemorySegment segment, long index) { return (byte) VH_OrderHint.get(segment, 0L, index); } + /// {@return `OrderHint`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_OrderHint(MemorySegment segment) { return StdVideoEncodeAV1ReferenceInfo.get_OrderHint(segment, 0L); } + /// {@return `OrderHint` at the given index} + /// @param index the index + public @CType("uint8_t") byte OrderHintAt(long index) { return StdVideoEncodeAV1ReferenceInfo.get_OrderHint(this.segment(), index); } + /// {@return `OrderHint`} + public @CType("uint8_t") byte OrderHint() { return StdVideoEncodeAV1ReferenceInfo.get_OrderHint(this.segment()); } + /// Sets `OrderHint` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_OrderHint(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_OrderHint.set(segment, 0L, index, value); } + /// Sets `OrderHint` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_OrderHint(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeAV1ReferenceInfo.set_OrderHint(segment, 0L, value); } + /// Sets `OrderHint` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo OrderHintAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeAV1ReferenceInfo.set_OrderHint(this.segment(), index, value); return this; } + /// Sets `OrderHint` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo OrderHint(@CType("uint8_t") byte value) { StdVideoEncodeAV1ReferenceInfo.set_OrderHint(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [3]") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [3]") byte get_reserved1(MemorySegment segment) { return StdVideoEncodeAV1ReferenceInfo.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t [3]") byte reserved1At(long index) { return StdVideoEncodeAV1ReferenceInfo.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t [3]") byte reserved1() { return StdVideoEncodeAV1ReferenceInfo.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t [3]") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t [3]") byte value) { StdVideoEncodeAV1ReferenceInfo.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo reserved1At(long index, @CType("uint8_t [3]") byte value) { StdVideoEncodeAV1ReferenceInfo.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo reserved1(@CType("uint8_t [3]") byte value) { StdVideoEncodeAV1ReferenceInfo.set_reserved1(this.segment(), value); return this; } + + /// {@return `pExtensionHeader` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment get_pExtensionHeader(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pExtensionHeader.get(segment, 0L, index); } + /// {@return `pExtensionHeader`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment get_pExtensionHeader(MemorySegment segment) { return StdVideoEncodeAV1ReferenceInfo.get_pExtensionHeader(segment, 0L); } + /// {@return `pExtensionHeader` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment pExtensionHeaderAt(long index) { return StdVideoEncodeAV1ReferenceInfo.get_pExtensionHeader(this.segment(), index); } + /// {@return `pExtensionHeader`} + public @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment pExtensionHeader() { return StdVideoEncodeAV1ReferenceInfo.get_pExtensionHeader(this.segment()); } + /// Sets `pExtensionHeader` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pExtensionHeader(MemorySegment segment, long index, @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment value) { VH_pExtensionHeader.set(segment, 0L, index, value); } + /// Sets `pExtensionHeader` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pExtensionHeader(MemorySegment segment, @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1ReferenceInfo.set_pExtensionHeader(segment, 0L, value); } + /// Sets `pExtensionHeader` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo pExtensionHeaderAt(long index, @CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1ReferenceInfo.set_pExtensionHeader(this.segment(), index, value); return this; } + /// Sets `pExtensionHeader` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfo pExtensionHeader(@CType("const StdVideoEncodeAV1ExtensionHeader *") java.lang.foreign.MemorySegment value) { StdVideoEncodeAV1ReferenceInfo.set_pExtensionHeader(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1ReferenceInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1ReferenceInfoFlags.java new file mode 100644 index 00000000..73e4f28d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeAV1ReferenceInfoFlags.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### disable_frame_end_update_cdf +/// [VarHandle][#VH_disable_frame_end_update_cdf] - [Getter][#disable_frame_end_update_cdf()] - [Setter][#disable_frame_end_update_cdf(int)] +/// ### segmentation_enabled +/// [VarHandle][#VH_segmentation_enabled] - [Getter][#segmentation_enabled()] - [Setter][#segmentation_enabled(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeAV1ReferenceInfoFlags { +/// uint32_t : 1 disable_frame_end_update_cdf; +/// uint32_t : 1 segmentation_enabled; +/// uint32_t : 30 reserved; +/// } StdVideoEncodeAV1ReferenceInfoFlags; +/// ``` +public final class StdVideoEncodeAV1ReferenceInfoFlags extends Struct { + /// The struct layout of `StdVideoEncodeAV1ReferenceInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("disable_frame_end_update_cdf"), + ValueLayout.JAVA_INT.withName("segmentation_enabled"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `disable_frame_end_update_cdf` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disable_frame_end_update_cdf = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disable_frame_end_update_cdf")); + /// The [VarHandle] of `segmentation_enabled` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_segmentation_enabled = LAYOUT.arrayElementVarHandle(PathElement.groupElement("segmentation_enabled")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeAV1ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeAV1ReferenceInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeAV1ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1ReferenceInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1ReferenceInfoFlags(segment); } + + /// Creates `StdVideoEncodeAV1ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1ReferenceInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeAV1ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeAV1ReferenceInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeAV1ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeAV1ReferenceInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeAV1ReferenceInfoFlags` + public static StdVideoEncodeAV1ReferenceInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeAV1ReferenceInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeAV1ReferenceInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeAV1ReferenceInfoFlags` + public static StdVideoEncodeAV1ReferenceInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeAV1ReferenceInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `disable_frame_end_update_cdf` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_disable_frame_end_update_cdf(MemorySegment segment, long index) { return (int) VH_disable_frame_end_update_cdf.get(segment, 0L, index); } + /// {@return `disable_frame_end_update_cdf`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_disable_frame_end_update_cdf(MemorySegment segment) { return StdVideoEncodeAV1ReferenceInfoFlags.get_disable_frame_end_update_cdf(segment, 0L); } + /// {@return `disable_frame_end_update_cdf` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int disable_frame_end_update_cdfAt(long index) { return StdVideoEncodeAV1ReferenceInfoFlags.get_disable_frame_end_update_cdf(this.segment(), index); } + /// {@return `disable_frame_end_update_cdf`} + public @CType("uint32_t : 1") int disable_frame_end_update_cdf() { return StdVideoEncodeAV1ReferenceInfoFlags.get_disable_frame_end_update_cdf(this.segment()); } + /// Sets `disable_frame_end_update_cdf` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disable_frame_end_update_cdf(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_disable_frame_end_update_cdf.set(segment, 0L, index, value); } + /// Sets `disable_frame_end_update_cdf` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disable_frame_end_update_cdf(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1ReferenceInfoFlags.set_disable_frame_end_update_cdf(segment, 0L, value); } + /// Sets `disable_frame_end_update_cdf` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfoFlags disable_frame_end_update_cdfAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1ReferenceInfoFlags.set_disable_frame_end_update_cdf(this.segment(), index, value); return this; } + /// Sets `disable_frame_end_update_cdf` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfoFlags disable_frame_end_update_cdf(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1ReferenceInfoFlags.set_disable_frame_end_update_cdf(this.segment(), value); return this; } + + /// {@return `segmentation_enabled` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_segmentation_enabled(MemorySegment segment, long index) { return (int) VH_segmentation_enabled.get(segment, 0L, index); } + /// {@return `segmentation_enabled`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_segmentation_enabled(MemorySegment segment) { return StdVideoEncodeAV1ReferenceInfoFlags.get_segmentation_enabled(segment, 0L); } + /// {@return `segmentation_enabled` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int segmentation_enabledAt(long index) { return StdVideoEncodeAV1ReferenceInfoFlags.get_segmentation_enabled(this.segment(), index); } + /// {@return `segmentation_enabled`} + public @CType("uint32_t : 1") int segmentation_enabled() { return StdVideoEncodeAV1ReferenceInfoFlags.get_segmentation_enabled(this.segment()); } + /// Sets `segmentation_enabled` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_segmentation_enabled(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_segmentation_enabled.set(segment, 0L, index, value); } + /// Sets `segmentation_enabled` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_segmentation_enabled(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1ReferenceInfoFlags.set_segmentation_enabled(segment, 0L, value); } + /// Sets `segmentation_enabled` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfoFlags segmentation_enabledAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeAV1ReferenceInfoFlags.set_segmentation_enabled(this.segment(), index, value); return this; } + /// Sets `segmentation_enabled` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfoFlags segmentation_enabled(@CType("uint32_t : 1") int value) { StdVideoEncodeAV1ReferenceInfoFlags.set_segmentation_enabled(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment) { return StdVideoEncodeAV1ReferenceInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 30") int reservedAt(long index) { return StdVideoEncodeAV1ReferenceInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 30") int reserved() { return StdVideoEncodeAV1ReferenceInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 30") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 30") int value) { StdVideoEncodeAV1ReferenceInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfoFlags reservedAt(long index, @CType("uint32_t : 30") int value) { StdVideoEncodeAV1ReferenceInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeAV1ReferenceInfoFlags reserved(@CType("uint32_t : 30") int value) { StdVideoEncodeAV1ReferenceInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264PictureInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264PictureInfo.java new file mode 100644 index 00000000..4b0d9ad1 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264PictureInfo.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### seq_parameter_set_id +/// [VarHandle][#VH_seq_parameter_set_id] - [Getter][#seq_parameter_set_id()] - [Setter][#seq_parameter_set_id(byte)] +/// ### pic_parameter_set_id +/// [VarHandle][#VH_pic_parameter_set_id] - [Getter][#pic_parameter_set_id()] - [Setter][#pic_parameter_set_id(byte)] +/// ### idr_pic_id +/// [VarHandle][#VH_idr_pic_id] - [Getter][#idr_pic_id()] - [Setter][#idr_pic_id(short)] +/// ### primary_pic_type +/// [VarHandle][#VH_primary_pic_type] - [Getter][#primary_pic_type()] - [Setter][#primary_pic_type(int)] +/// ### frame_num +/// [VarHandle][#VH_frame_num] - [Getter][#frame_num()] - [Setter][#frame_num(int)] +/// ### PicOrderCnt +/// [VarHandle][#VH_PicOrderCnt] - [Getter][#PicOrderCnt()] - [Setter][#PicOrderCnt(int)] +/// ### temporal_id +/// [VarHandle][#VH_temporal_id] - [Getter][#temporal_id()] - [Setter][#temporal_id(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### pRefLists +/// [VarHandle][#VH_pRefLists] - [Getter][#pRefLists()] - [Setter][#pRefLists(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264PictureInfo { +/// StdVideoEncodeH264PictureInfoFlags flags; +/// uint8_t seq_parameter_set_id; +/// uint8_t pic_parameter_set_id; +/// uint16_t idr_pic_id; +/// StdVideoH264PictureType primary_pic_type; +/// uint32_t frame_num; +/// int32_t PicOrderCnt; +/// uint8_t temporal_id; +/// uint8_t [3] reserved1; +/// const StdVideoEncodeH264ReferenceListsInfo * pRefLists; +/// } StdVideoEncodeH264PictureInfo; +/// ``` +public final class StdVideoEncodeH264PictureInfo extends Struct { + /// The struct layout of `StdVideoEncodeH264PictureInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeH264PictureInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("seq_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("pic_parameter_set_id"), + ValueLayout.JAVA_SHORT.withName("idr_pic_id"), + ValueLayout.JAVA_INT.withName("primary_pic_type"), + ValueLayout.JAVA_INT.withName("frame_num"), + ValueLayout.JAVA_INT.withName("PicOrderCnt"), + ValueLayout.JAVA_BYTE.withName("temporal_id"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.ADDRESS.withName("pRefLists") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `seq_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_seq_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("seq_parameter_set_id")); + /// The [VarHandle] of `pic_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pic_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_parameter_set_id")); + /// The [VarHandle] of `idr_pic_id` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_idr_pic_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("idr_pic_id")); + /// The [VarHandle] of `primary_pic_type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primary_pic_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primary_pic_type")); + /// The [VarHandle] of `frame_num` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_num = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_num")); + /// The [VarHandle] of `PicOrderCnt` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_PicOrderCnt = LAYOUT.arrayElementVarHandle(PathElement.groupElement("PicOrderCnt")); + /// The [VarHandle] of `temporal_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_temporal_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("temporal_id")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `pRefLists` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRefLists = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRefLists")); + + /// Creates `StdVideoEncodeH264PictureInfo` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264PictureInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264PictureInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264PictureInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264PictureInfo(segment); } + + /// Creates `StdVideoEncodeH264PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264PictureInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264PictureInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264PictureInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264PictureInfo` + public static StdVideoEncodeH264PictureInfo alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264PictureInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264PictureInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264PictureInfo` + public static StdVideoEncodeH264PictureInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264PictureInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeH264PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeH264PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeH264PictureInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeH264PictureInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeH264PictureInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeH264PictureInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeH264PictureInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeH264PictureInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeH264PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264PictureInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo flagsAt(long index, @CType("StdVideoEncodeH264PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264PictureInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo flags(@CType("StdVideoEncodeH264PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264PictureInfo.set_flags(this.segment(), value); return this; } + + /// {@return `seq_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_seq_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_seq_parameter_set_id.get(segment, 0L, index); } + /// {@return `seq_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_seq_parameter_set_id(MemorySegment segment) { return StdVideoEncodeH264PictureInfo.get_seq_parameter_set_id(segment, 0L); } + /// {@return `seq_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte seq_parameter_set_idAt(long index) { return StdVideoEncodeH264PictureInfo.get_seq_parameter_set_id(this.segment(), index); } + /// {@return `seq_parameter_set_id`} + public @CType("uint8_t") byte seq_parameter_set_id() { return StdVideoEncodeH264PictureInfo.get_seq_parameter_set_id(this.segment()); } + /// Sets `seq_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_seq_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_seq_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `seq_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_seq_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264PictureInfo.set_seq_parameter_set_id(segment, 0L, value); } + /// Sets `seq_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo seq_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264PictureInfo.set_seq_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `seq_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo seq_parameter_set_id(@CType("uint8_t") byte value) { StdVideoEncodeH264PictureInfo.set_seq_parameter_set_id(this.segment(), value); return this; } + + /// {@return `pic_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pic_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_pic_parameter_set_id.get(segment, 0L, index); } + /// {@return `pic_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pic_parameter_set_id(MemorySegment segment) { return StdVideoEncodeH264PictureInfo.get_pic_parameter_set_id(segment, 0L); } + /// {@return `pic_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte pic_parameter_set_idAt(long index) { return StdVideoEncodeH264PictureInfo.get_pic_parameter_set_id(this.segment(), index); } + /// {@return `pic_parameter_set_id`} + public @CType("uint8_t") byte pic_parameter_set_id() { return StdVideoEncodeH264PictureInfo.get_pic_parameter_set_id(this.segment()); } + /// Sets `pic_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pic_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `pic_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264PictureInfo.set_pic_parameter_set_id(segment, 0L, value); } + /// Sets `pic_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo pic_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264PictureInfo.set_pic_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `pic_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo pic_parameter_set_id(@CType("uint8_t") byte value) { StdVideoEncodeH264PictureInfo.set_pic_parameter_set_id(this.segment(), value); return this; } + + /// {@return `idr_pic_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_idr_pic_id(MemorySegment segment, long index) { return (short) VH_idr_pic_id.get(segment, 0L, index); } + /// {@return `idr_pic_id`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_idr_pic_id(MemorySegment segment) { return StdVideoEncodeH264PictureInfo.get_idr_pic_id(segment, 0L); } + /// {@return `idr_pic_id` at the given index} + /// @param index the index + public @CType("uint16_t") short idr_pic_idAt(long index) { return StdVideoEncodeH264PictureInfo.get_idr_pic_id(this.segment(), index); } + /// {@return `idr_pic_id`} + public @CType("uint16_t") short idr_pic_id() { return StdVideoEncodeH264PictureInfo.get_idr_pic_id(this.segment()); } + /// Sets `idr_pic_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_idr_pic_id(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_idr_pic_id.set(segment, 0L, index, value); } + /// Sets `idr_pic_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_idr_pic_id(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH264PictureInfo.set_idr_pic_id(segment, 0L, value); } + /// Sets `idr_pic_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo idr_pic_idAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH264PictureInfo.set_idr_pic_id(this.segment(), index, value); return this; } + /// Sets `idr_pic_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo idr_pic_id(@CType("uint16_t") short value) { StdVideoEncodeH264PictureInfo.set_idr_pic_id(this.segment(), value); return this; } + + /// {@return `primary_pic_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264PictureType") int get_primary_pic_type(MemorySegment segment, long index) { return (int) VH_primary_pic_type.get(segment, 0L, index); } + /// {@return `primary_pic_type`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264PictureType") int get_primary_pic_type(MemorySegment segment) { return StdVideoEncodeH264PictureInfo.get_primary_pic_type(segment, 0L); } + /// {@return `primary_pic_type` at the given index} + /// @param index the index + public @CType("StdVideoH264PictureType") int primary_pic_typeAt(long index) { return StdVideoEncodeH264PictureInfo.get_primary_pic_type(this.segment(), index); } + /// {@return `primary_pic_type`} + public @CType("StdVideoH264PictureType") int primary_pic_type() { return StdVideoEncodeH264PictureInfo.get_primary_pic_type(this.segment()); } + /// Sets `primary_pic_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primary_pic_type(MemorySegment segment, long index, @CType("StdVideoH264PictureType") int value) { VH_primary_pic_type.set(segment, 0L, index, value); } + /// Sets `primary_pic_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primary_pic_type(MemorySegment segment, @CType("StdVideoH264PictureType") int value) { StdVideoEncodeH264PictureInfo.set_primary_pic_type(segment, 0L, value); } + /// Sets `primary_pic_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo primary_pic_typeAt(long index, @CType("StdVideoH264PictureType") int value) { StdVideoEncodeH264PictureInfo.set_primary_pic_type(this.segment(), index, value); return this; } + /// Sets `primary_pic_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo primary_pic_type(@CType("StdVideoH264PictureType") int value) { StdVideoEncodeH264PictureInfo.set_primary_pic_type(this.segment(), value); return this; } + + /// {@return `frame_num` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frame_num(MemorySegment segment, long index) { return (int) VH_frame_num.get(segment, 0L, index); } + /// {@return `frame_num`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frame_num(MemorySegment segment) { return StdVideoEncodeH264PictureInfo.get_frame_num(segment, 0L); } + /// {@return `frame_num` at the given index} + /// @param index the index + public @CType("uint32_t") int frame_numAt(long index) { return StdVideoEncodeH264PictureInfo.get_frame_num(this.segment(), index); } + /// {@return `frame_num`} + public @CType("uint32_t") int frame_num() { return StdVideoEncodeH264PictureInfo.get_frame_num(this.segment()); } + /// Sets `frame_num` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_num(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frame_num.set(segment, 0L, index, value); } + /// Sets `frame_num` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_num(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeH264PictureInfo.set_frame_num(segment, 0L, value); } + /// Sets `frame_num` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo frame_numAt(long index, @CType("uint32_t") int value) { StdVideoEncodeH264PictureInfo.set_frame_num(this.segment(), index, value); return this; } + /// Sets `frame_num` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo frame_num(@CType("uint32_t") int value) { StdVideoEncodeH264PictureInfo.set_frame_num(this.segment(), value); return this; } + + /// {@return `PicOrderCnt` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_PicOrderCnt(MemorySegment segment, long index) { return (int) VH_PicOrderCnt.get(segment, 0L, index); } + /// {@return `PicOrderCnt`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_PicOrderCnt(MemorySegment segment) { return StdVideoEncodeH264PictureInfo.get_PicOrderCnt(segment, 0L); } + /// {@return `PicOrderCnt` at the given index} + /// @param index the index + public @CType("int32_t") int PicOrderCntAt(long index) { return StdVideoEncodeH264PictureInfo.get_PicOrderCnt(this.segment(), index); } + /// {@return `PicOrderCnt`} + public @CType("int32_t") int PicOrderCnt() { return StdVideoEncodeH264PictureInfo.get_PicOrderCnt(this.segment()); } + /// Sets `PicOrderCnt` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_PicOrderCnt(MemorySegment segment, long index, @CType("int32_t") int value) { VH_PicOrderCnt.set(segment, 0L, index, value); } + /// Sets `PicOrderCnt` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_PicOrderCnt(MemorySegment segment, @CType("int32_t") int value) { StdVideoEncodeH264PictureInfo.set_PicOrderCnt(segment, 0L, value); } + /// Sets `PicOrderCnt` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo PicOrderCntAt(long index, @CType("int32_t") int value) { StdVideoEncodeH264PictureInfo.set_PicOrderCnt(this.segment(), index, value); return this; } + /// Sets `PicOrderCnt` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo PicOrderCnt(@CType("int32_t") int value) { StdVideoEncodeH264PictureInfo.set_PicOrderCnt(this.segment(), value); return this; } + + /// {@return `temporal_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_temporal_id(MemorySegment segment, long index) { return (byte) VH_temporal_id.get(segment, 0L, index); } + /// {@return `temporal_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_temporal_id(MemorySegment segment) { return StdVideoEncodeH264PictureInfo.get_temporal_id(segment, 0L); } + /// {@return `temporal_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte temporal_idAt(long index) { return StdVideoEncodeH264PictureInfo.get_temporal_id(this.segment(), index); } + /// {@return `temporal_id`} + public @CType("uint8_t") byte temporal_id() { return StdVideoEncodeH264PictureInfo.get_temporal_id(this.segment()); } + /// Sets `temporal_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_temporal_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_temporal_id.set(segment, 0L, index, value); } + /// Sets `temporal_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_temporal_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264PictureInfo.set_temporal_id(segment, 0L, value); } + /// Sets `temporal_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo temporal_idAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264PictureInfo.set_temporal_id(this.segment(), index, value); return this; } + /// Sets `temporal_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo temporal_id(@CType("uint8_t") byte value) { StdVideoEncodeH264PictureInfo.set_temporal_id(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [3]") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [3]") byte get_reserved1(MemorySegment segment) { return StdVideoEncodeH264PictureInfo.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t [3]") byte reserved1At(long index) { return StdVideoEncodeH264PictureInfo.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t [3]") byte reserved1() { return StdVideoEncodeH264PictureInfo.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t [3]") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t [3]") byte value) { StdVideoEncodeH264PictureInfo.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo reserved1At(long index, @CType("uint8_t [3]") byte value) { StdVideoEncodeH264PictureInfo.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo reserved1(@CType("uint8_t [3]") byte value) { StdVideoEncodeH264PictureInfo.set_reserved1(this.segment(), value); return this; } + + /// {@return `pRefLists` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH264ReferenceListsInfo *") java.lang.foreign.MemorySegment get_pRefLists(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRefLists.get(segment, 0L, index); } + /// {@return `pRefLists`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH264ReferenceListsInfo *") java.lang.foreign.MemorySegment get_pRefLists(MemorySegment segment) { return StdVideoEncodeH264PictureInfo.get_pRefLists(segment, 0L); } + /// {@return `pRefLists` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH264ReferenceListsInfo *") java.lang.foreign.MemorySegment pRefListsAt(long index) { return StdVideoEncodeH264PictureInfo.get_pRefLists(this.segment(), index); } + /// {@return `pRefLists`} + public @CType("const StdVideoEncodeH264ReferenceListsInfo *") java.lang.foreign.MemorySegment pRefLists() { return StdVideoEncodeH264PictureInfo.get_pRefLists(this.segment()); } + /// Sets `pRefLists` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRefLists(MemorySegment segment, long index, @CType("const StdVideoEncodeH264ReferenceListsInfo *") java.lang.foreign.MemorySegment value) { VH_pRefLists.set(segment, 0L, index, value); } + /// Sets `pRefLists` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRefLists(MemorySegment segment, @CType("const StdVideoEncodeH264ReferenceListsInfo *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264PictureInfo.set_pRefLists(segment, 0L, value); } + /// Sets `pRefLists` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo pRefListsAt(long index, @CType("const StdVideoEncodeH264ReferenceListsInfo *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264PictureInfo.set_pRefLists(this.segment(), index, value); return this; } + /// Sets `pRefLists` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfo pRefLists(@CType("const StdVideoEncodeH264ReferenceListsInfo *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264PictureInfo.set_pRefLists(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264PictureInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264PictureInfoFlags.java new file mode 100644 index 00000000..d9421a8f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264PictureInfoFlags.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### IdrPicFlag +/// [VarHandle][#VH_IdrPicFlag] - [Getter][#IdrPicFlag()] - [Setter][#IdrPicFlag(int)] +/// ### is_reference +/// [VarHandle][#VH_is_reference] - [Getter][#is_reference()] - [Setter][#is_reference(int)] +/// ### no_output_of_prior_pics_flag +/// [VarHandle][#VH_no_output_of_prior_pics_flag] - [Getter][#no_output_of_prior_pics_flag()] - [Setter][#no_output_of_prior_pics_flag(int)] +/// ### long_term_reference_flag +/// [VarHandle][#VH_long_term_reference_flag] - [Getter][#long_term_reference_flag()] - [Setter][#long_term_reference_flag(int)] +/// ### adaptive_ref_pic_marking_mode_flag +/// [VarHandle][#VH_adaptive_ref_pic_marking_mode_flag] - [Getter][#adaptive_ref_pic_marking_mode_flag()] - [Setter][#adaptive_ref_pic_marking_mode_flag(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264PictureInfoFlags { +/// uint32_t : 1 IdrPicFlag; +/// uint32_t : 1 is_reference; +/// uint32_t : 1 no_output_of_prior_pics_flag; +/// uint32_t : 1 long_term_reference_flag; +/// uint32_t : 1 adaptive_ref_pic_marking_mode_flag; +/// uint32_t : 27 reserved; +/// } StdVideoEncodeH264PictureInfoFlags; +/// ``` +public final class StdVideoEncodeH264PictureInfoFlags extends Struct { + /// The struct layout of `StdVideoEncodeH264PictureInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("IdrPicFlag"), + ValueLayout.JAVA_INT.withName("is_reference"), + ValueLayout.JAVA_INT.withName("no_output_of_prior_pics_flag"), + ValueLayout.JAVA_INT.withName("long_term_reference_flag"), + ValueLayout.JAVA_INT.withName("adaptive_ref_pic_marking_mode_flag"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `IdrPicFlag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_IdrPicFlag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("IdrPicFlag")); + /// The [VarHandle] of `is_reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_is_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("is_reference")); + /// The [VarHandle] of `no_output_of_prior_pics_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_no_output_of_prior_pics_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("no_output_of_prior_pics_flag")); + /// The [VarHandle] of `long_term_reference_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_long_term_reference_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("long_term_reference_flag")); + /// The [VarHandle] of `adaptive_ref_pic_marking_mode_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_adaptive_ref_pic_marking_mode_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("adaptive_ref_pic_marking_mode_flag")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeH264PictureInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264PictureInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264PictureInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264PictureInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264PictureInfoFlags(segment); } + + /// Creates `StdVideoEncodeH264PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264PictureInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264PictureInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264PictureInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264PictureInfoFlags` + public static StdVideoEncodeH264PictureInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264PictureInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264PictureInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264PictureInfoFlags` + public static StdVideoEncodeH264PictureInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264PictureInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `IdrPicFlag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_IdrPicFlag(MemorySegment segment, long index) { return (int) VH_IdrPicFlag.get(segment, 0L, index); } + /// {@return `IdrPicFlag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_IdrPicFlag(MemorySegment segment) { return StdVideoEncodeH264PictureInfoFlags.get_IdrPicFlag(segment, 0L); } + /// {@return `IdrPicFlag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int IdrPicFlagAt(long index) { return StdVideoEncodeH264PictureInfoFlags.get_IdrPicFlag(this.segment(), index); } + /// {@return `IdrPicFlag`} + public @CType("uint32_t : 1") int IdrPicFlag() { return StdVideoEncodeH264PictureInfoFlags.get_IdrPicFlag(this.segment()); } + /// Sets `IdrPicFlag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_IdrPicFlag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_IdrPicFlag.set(segment, 0L, index, value); } + /// Sets `IdrPicFlag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_IdrPicFlag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_IdrPicFlag(segment, 0L, value); } + /// Sets `IdrPicFlag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags IdrPicFlagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_IdrPicFlag(this.segment(), index, value); return this; } + /// Sets `IdrPicFlag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags IdrPicFlag(@CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_IdrPicFlag(this.segment(), value); return this; } + + /// {@return `is_reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_is_reference(MemorySegment segment, long index) { return (int) VH_is_reference.get(segment, 0L, index); } + /// {@return `is_reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_is_reference(MemorySegment segment) { return StdVideoEncodeH264PictureInfoFlags.get_is_reference(segment, 0L); } + /// {@return `is_reference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int is_referenceAt(long index) { return StdVideoEncodeH264PictureInfoFlags.get_is_reference(this.segment(), index); } + /// {@return `is_reference`} + public @CType("uint32_t : 1") int is_reference() { return StdVideoEncodeH264PictureInfoFlags.get_is_reference(this.segment()); } + /// Sets `is_reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_is_reference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_is_reference.set(segment, 0L, index, value); } + /// Sets `is_reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_is_reference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_is_reference(segment, 0L, value); } + /// Sets `is_reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags is_referenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_is_reference(this.segment(), index, value); return this; } + /// Sets `is_reference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags is_reference(@CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_is_reference(this.segment(), value); return this; } + + /// {@return `no_output_of_prior_pics_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_no_output_of_prior_pics_flag(MemorySegment segment, long index) { return (int) VH_no_output_of_prior_pics_flag.get(segment, 0L, index); } + /// {@return `no_output_of_prior_pics_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_no_output_of_prior_pics_flag(MemorySegment segment) { return StdVideoEncodeH264PictureInfoFlags.get_no_output_of_prior_pics_flag(segment, 0L); } + /// {@return `no_output_of_prior_pics_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int no_output_of_prior_pics_flagAt(long index) { return StdVideoEncodeH264PictureInfoFlags.get_no_output_of_prior_pics_flag(this.segment(), index); } + /// {@return `no_output_of_prior_pics_flag`} + public @CType("uint32_t : 1") int no_output_of_prior_pics_flag() { return StdVideoEncodeH264PictureInfoFlags.get_no_output_of_prior_pics_flag(this.segment()); } + /// Sets `no_output_of_prior_pics_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_no_output_of_prior_pics_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_no_output_of_prior_pics_flag.set(segment, 0L, index, value); } + /// Sets `no_output_of_prior_pics_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_no_output_of_prior_pics_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_no_output_of_prior_pics_flag(segment, 0L, value); } + /// Sets `no_output_of_prior_pics_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags no_output_of_prior_pics_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_no_output_of_prior_pics_flag(this.segment(), index, value); return this; } + /// Sets `no_output_of_prior_pics_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags no_output_of_prior_pics_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_no_output_of_prior_pics_flag(this.segment(), value); return this; } + + /// {@return `long_term_reference_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_long_term_reference_flag(MemorySegment segment, long index) { return (int) VH_long_term_reference_flag.get(segment, 0L, index); } + /// {@return `long_term_reference_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_long_term_reference_flag(MemorySegment segment) { return StdVideoEncodeH264PictureInfoFlags.get_long_term_reference_flag(segment, 0L); } + /// {@return `long_term_reference_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int long_term_reference_flagAt(long index) { return StdVideoEncodeH264PictureInfoFlags.get_long_term_reference_flag(this.segment(), index); } + /// {@return `long_term_reference_flag`} + public @CType("uint32_t : 1") int long_term_reference_flag() { return StdVideoEncodeH264PictureInfoFlags.get_long_term_reference_flag(this.segment()); } + /// Sets `long_term_reference_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_long_term_reference_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_long_term_reference_flag.set(segment, 0L, index, value); } + /// Sets `long_term_reference_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_long_term_reference_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_long_term_reference_flag(segment, 0L, value); } + /// Sets `long_term_reference_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags long_term_reference_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_long_term_reference_flag(this.segment(), index, value); return this; } + /// Sets `long_term_reference_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags long_term_reference_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_long_term_reference_flag(this.segment(), value); return this; } + + /// {@return `adaptive_ref_pic_marking_mode_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_adaptive_ref_pic_marking_mode_flag(MemorySegment segment, long index) { return (int) VH_adaptive_ref_pic_marking_mode_flag.get(segment, 0L, index); } + /// {@return `adaptive_ref_pic_marking_mode_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_adaptive_ref_pic_marking_mode_flag(MemorySegment segment) { return StdVideoEncodeH264PictureInfoFlags.get_adaptive_ref_pic_marking_mode_flag(segment, 0L); } + /// {@return `adaptive_ref_pic_marking_mode_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int adaptive_ref_pic_marking_mode_flagAt(long index) { return StdVideoEncodeH264PictureInfoFlags.get_adaptive_ref_pic_marking_mode_flag(this.segment(), index); } + /// {@return `adaptive_ref_pic_marking_mode_flag`} + public @CType("uint32_t : 1") int adaptive_ref_pic_marking_mode_flag() { return StdVideoEncodeH264PictureInfoFlags.get_adaptive_ref_pic_marking_mode_flag(this.segment()); } + /// Sets `adaptive_ref_pic_marking_mode_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_adaptive_ref_pic_marking_mode_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_adaptive_ref_pic_marking_mode_flag.set(segment, 0L, index, value); } + /// Sets `adaptive_ref_pic_marking_mode_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_adaptive_ref_pic_marking_mode_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_adaptive_ref_pic_marking_mode_flag(segment, 0L, value); } + /// Sets `adaptive_ref_pic_marking_mode_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags adaptive_ref_pic_marking_mode_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_adaptive_ref_pic_marking_mode_flag(this.segment(), index, value); return this; } + /// Sets `adaptive_ref_pic_marking_mode_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags adaptive_ref_pic_marking_mode_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH264PictureInfoFlags.set_adaptive_ref_pic_marking_mode_flag(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 27") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 27") int get_reserved(MemorySegment segment) { return StdVideoEncodeH264PictureInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 27") int reservedAt(long index) { return StdVideoEncodeH264PictureInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 27") int reserved() { return StdVideoEncodeH264PictureInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 27") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 27") int value) { StdVideoEncodeH264PictureInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags reservedAt(long index, @CType("uint32_t : 27") int value) { StdVideoEncodeH264PictureInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264PictureInfoFlags reserved(@CType("uint32_t : 27") int value) { StdVideoEncodeH264PictureInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264RefListModEntry.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264RefListModEntry.java new file mode 100644 index 00000000..8748b7dd --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264RefListModEntry.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### modification_of_pic_nums_idc +/// [VarHandle][#VH_modification_of_pic_nums_idc] - [Getter][#modification_of_pic_nums_idc()] - [Setter][#modification_of_pic_nums_idc(int)] +/// ### abs_diff_pic_num_minus1 +/// [VarHandle][#VH_abs_diff_pic_num_minus1] - [Getter][#abs_diff_pic_num_minus1()] - [Setter][#abs_diff_pic_num_minus1(short)] +/// ### long_term_pic_num +/// [VarHandle][#VH_long_term_pic_num] - [Getter][#long_term_pic_num()] - [Setter][#long_term_pic_num(short)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264RefListModEntry { +/// StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc; +/// uint16_t abs_diff_pic_num_minus1; +/// uint16_t long_term_pic_num; +/// } StdVideoEncodeH264RefListModEntry; +/// ``` +public final class StdVideoEncodeH264RefListModEntry extends Struct { + /// The struct layout of `StdVideoEncodeH264RefListModEntry`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("modification_of_pic_nums_idc"), + ValueLayout.JAVA_SHORT.withName("abs_diff_pic_num_minus1"), + ValueLayout.JAVA_SHORT.withName("long_term_pic_num") + ); + /// The [VarHandle] of `modification_of_pic_nums_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_modification_of_pic_nums_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("modification_of_pic_nums_idc")); + /// The [VarHandle] of `abs_diff_pic_num_minus1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_abs_diff_pic_num_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("abs_diff_pic_num_minus1")); + /// The [VarHandle] of `long_term_pic_num` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_long_term_pic_num = LAYOUT.arrayElementVarHandle(PathElement.groupElement("long_term_pic_num")); + + /// Creates `StdVideoEncodeH264RefListModEntry` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264RefListModEntry(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264RefListModEntry` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264RefListModEntry of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264RefListModEntry(segment); } + + /// Creates `StdVideoEncodeH264RefListModEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264RefListModEntry ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264RefListModEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264RefListModEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264RefListModEntry ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264RefListModEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264RefListModEntry` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264RefListModEntry` + public static StdVideoEncodeH264RefListModEntry alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264RefListModEntry(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264RefListModEntry` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264RefListModEntry` + public static StdVideoEncodeH264RefListModEntry alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264RefListModEntry(allocator.allocate(LAYOUT, count)); } + + /// {@return `modification_of_pic_nums_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264ModificationOfPicNumsIdc") int get_modification_of_pic_nums_idc(MemorySegment segment, long index) { return (int) VH_modification_of_pic_nums_idc.get(segment, 0L, index); } + /// {@return `modification_of_pic_nums_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264ModificationOfPicNumsIdc") int get_modification_of_pic_nums_idc(MemorySegment segment) { return StdVideoEncodeH264RefListModEntry.get_modification_of_pic_nums_idc(segment, 0L); } + /// {@return `modification_of_pic_nums_idc` at the given index} + /// @param index the index + public @CType("StdVideoH264ModificationOfPicNumsIdc") int modification_of_pic_nums_idcAt(long index) { return StdVideoEncodeH264RefListModEntry.get_modification_of_pic_nums_idc(this.segment(), index); } + /// {@return `modification_of_pic_nums_idc`} + public @CType("StdVideoH264ModificationOfPicNumsIdc") int modification_of_pic_nums_idc() { return StdVideoEncodeH264RefListModEntry.get_modification_of_pic_nums_idc(this.segment()); } + /// Sets `modification_of_pic_nums_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_modification_of_pic_nums_idc(MemorySegment segment, long index, @CType("StdVideoH264ModificationOfPicNumsIdc") int value) { VH_modification_of_pic_nums_idc.set(segment, 0L, index, value); } + /// Sets `modification_of_pic_nums_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_modification_of_pic_nums_idc(MemorySegment segment, @CType("StdVideoH264ModificationOfPicNumsIdc") int value) { StdVideoEncodeH264RefListModEntry.set_modification_of_pic_nums_idc(segment, 0L, value); } + /// Sets `modification_of_pic_nums_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefListModEntry modification_of_pic_nums_idcAt(long index, @CType("StdVideoH264ModificationOfPicNumsIdc") int value) { StdVideoEncodeH264RefListModEntry.set_modification_of_pic_nums_idc(this.segment(), index, value); return this; } + /// Sets `modification_of_pic_nums_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefListModEntry modification_of_pic_nums_idc(@CType("StdVideoH264ModificationOfPicNumsIdc") int value) { StdVideoEncodeH264RefListModEntry.set_modification_of_pic_nums_idc(this.segment(), value); return this; } + + /// {@return `abs_diff_pic_num_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_abs_diff_pic_num_minus1(MemorySegment segment, long index) { return (short) VH_abs_diff_pic_num_minus1.get(segment, 0L, index); } + /// {@return `abs_diff_pic_num_minus1`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_abs_diff_pic_num_minus1(MemorySegment segment) { return StdVideoEncodeH264RefListModEntry.get_abs_diff_pic_num_minus1(segment, 0L); } + /// {@return `abs_diff_pic_num_minus1` at the given index} + /// @param index the index + public @CType("uint16_t") short abs_diff_pic_num_minus1At(long index) { return StdVideoEncodeH264RefListModEntry.get_abs_diff_pic_num_minus1(this.segment(), index); } + /// {@return `abs_diff_pic_num_minus1`} + public @CType("uint16_t") short abs_diff_pic_num_minus1() { return StdVideoEncodeH264RefListModEntry.get_abs_diff_pic_num_minus1(this.segment()); } + /// Sets `abs_diff_pic_num_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_abs_diff_pic_num_minus1(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_abs_diff_pic_num_minus1.set(segment, 0L, index, value); } + /// Sets `abs_diff_pic_num_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_abs_diff_pic_num_minus1(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH264RefListModEntry.set_abs_diff_pic_num_minus1(segment, 0L, value); } + /// Sets `abs_diff_pic_num_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefListModEntry abs_diff_pic_num_minus1At(long index, @CType("uint16_t") short value) { StdVideoEncodeH264RefListModEntry.set_abs_diff_pic_num_minus1(this.segment(), index, value); return this; } + /// Sets `abs_diff_pic_num_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefListModEntry abs_diff_pic_num_minus1(@CType("uint16_t") short value) { StdVideoEncodeH264RefListModEntry.set_abs_diff_pic_num_minus1(this.segment(), value); return this; } + + /// {@return `long_term_pic_num` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_long_term_pic_num(MemorySegment segment, long index) { return (short) VH_long_term_pic_num.get(segment, 0L, index); } + /// {@return `long_term_pic_num`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_long_term_pic_num(MemorySegment segment) { return StdVideoEncodeH264RefListModEntry.get_long_term_pic_num(segment, 0L); } + /// {@return `long_term_pic_num` at the given index} + /// @param index the index + public @CType("uint16_t") short long_term_pic_numAt(long index) { return StdVideoEncodeH264RefListModEntry.get_long_term_pic_num(this.segment(), index); } + /// {@return `long_term_pic_num`} + public @CType("uint16_t") short long_term_pic_num() { return StdVideoEncodeH264RefListModEntry.get_long_term_pic_num(this.segment()); } + /// Sets `long_term_pic_num` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_long_term_pic_num(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_long_term_pic_num.set(segment, 0L, index, value); } + /// Sets `long_term_pic_num` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_long_term_pic_num(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH264RefListModEntry.set_long_term_pic_num(segment, 0L, value); } + /// Sets `long_term_pic_num` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefListModEntry long_term_pic_numAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH264RefListModEntry.set_long_term_pic_num(this.segment(), index, value); return this; } + /// Sets `long_term_pic_num` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefListModEntry long_term_pic_num(@CType("uint16_t") short value) { StdVideoEncodeH264RefListModEntry.set_long_term_pic_num(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264RefPicMarkingEntry.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264RefPicMarkingEntry.java new file mode 100644 index 00000000..56e20d46 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264RefPicMarkingEntry.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### memory_management_control_operation +/// [VarHandle][#VH_memory_management_control_operation] - [Getter][#memory_management_control_operation()] - [Setter][#memory_management_control_operation(int)] +/// ### difference_of_pic_nums_minus1 +/// [VarHandle][#VH_difference_of_pic_nums_minus1] - [Getter][#difference_of_pic_nums_minus1()] - [Setter][#difference_of_pic_nums_minus1(short)] +/// ### long_term_pic_num +/// [VarHandle][#VH_long_term_pic_num] - [Getter][#long_term_pic_num()] - [Setter][#long_term_pic_num(short)] +/// ### long_term_frame_idx +/// [VarHandle][#VH_long_term_frame_idx] - [Getter][#long_term_frame_idx()] - [Setter][#long_term_frame_idx(short)] +/// ### max_long_term_frame_idx_plus1 +/// [VarHandle][#VH_max_long_term_frame_idx_plus1] - [Getter][#max_long_term_frame_idx_plus1()] - [Setter][#max_long_term_frame_idx_plus1(short)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264RefPicMarkingEntry { +/// StdVideoH264MemMgmtControlOp memory_management_control_operation; +/// uint16_t difference_of_pic_nums_minus1; +/// uint16_t long_term_pic_num; +/// uint16_t long_term_frame_idx; +/// uint16_t max_long_term_frame_idx_plus1; +/// } StdVideoEncodeH264RefPicMarkingEntry; +/// ``` +public final class StdVideoEncodeH264RefPicMarkingEntry extends Struct { + /// The struct layout of `StdVideoEncodeH264RefPicMarkingEntry`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("memory_management_control_operation"), + ValueLayout.JAVA_SHORT.withName("difference_of_pic_nums_minus1"), + ValueLayout.JAVA_SHORT.withName("long_term_pic_num"), + ValueLayout.JAVA_SHORT.withName("long_term_frame_idx"), + ValueLayout.JAVA_SHORT.withName("max_long_term_frame_idx_plus1") + ); + /// The [VarHandle] of `memory_management_control_operation` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_memory_management_control_operation = LAYOUT.arrayElementVarHandle(PathElement.groupElement("memory_management_control_operation")); + /// The [VarHandle] of `difference_of_pic_nums_minus1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_difference_of_pic_nums_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("difference_of_pic_nums_minus1")); + /// The [VarHandle] of `long_term_pic_num` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_long_term_pic_num = LAYOUT.arrayElementVarHandle(PathElement.groupElement("long_term_pic_num")); + /// The [VarHandle] of `long_term_frame_idx` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_long_term_frame_idx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("long_term_frame_idx")); + /// The [VarHandle] of `max_long_term_frame_idx_plus1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_max_long_term_frame_idx_plus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_long_term_frame_idx_plus1")); + + /// Creates `StdVideoEncodeH264RefPicMarkingEntry` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264RefPicMarkingEntry(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264RefPicMarkingEntry` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264RefPicMarkingEntry of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264RefPicMarkingEntry(segment); } + + /// Creates `StdVideoEncodeH264RefPicMarkingEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264RefPicMarkingEntry ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264RefPicMarkingEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264RefPicMarkingEntry` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264RefPicMarkingEntry ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264RefPicMarkingEntry(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264RefPicMarkingEntry` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264RefPicMarkingEntry` + public static StdVideoEncodeH264RefPicMarkingEntry alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264RefPicMarkingEntry(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264RefPicMarkingEntry` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264RefPicMarkingEntry` + public static StdVideoEncodeH264RefPicMarkingEntry alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264RefPicMarkingEntry(allocator.allocate(LAYOUT, count)); } + + /// {@return `memory_management_control_operation` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264MemMgmtControlOp") int get_memory_management_control_operation(MemorySegment segment, long index) { return (int) VH_memory_management_control_operation.get(segment, 0L, index); } + /// {@return `memory_management_control_operation`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264MemMgmtControlOp") int get_memory_management_control_operation(MemorySegment segment) { return StdVideoEncodeH264RefPicMarkingEntry.get_memory_management_control_operation(segment, 0L); } + /// {@return `memory_management_control_operation` at the given index} + /// @param index the index + public @CType("StdVideoH264MemMgmtControlOp") int memory_management_control_operationAt(long index) { return StdVideoEncodeH264RefPicMarkingEntry.get_memory_management_control_operation(this.segment(), index); } + /// {@return `memory_management_control_operation`} + public @CType("StdVideoH264MemMgmtControlOp") int memory_management_control_operation() { return StdVideoEncodeH264RefPicMarkingEntry.get_memory_management_control_operation(this.segment()); } + /// Sets `memory_management_control_operation` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_memory_management_control_operation(MemorySegment segment, long index, @CType("StdVideoH264MemMgmtControlOp") int value) { VH_memory_management_control_operation.set(segment, 0L, index, value); } + /// Sets `memory_management_control_operation` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_memory_management_control_operation(MemorySegment segment, @CType("StdVideoH264MemMgmtControlOp") int value) { StdVideoEncodeH264RefPicMarkingEntry.set_memory_management_control_operation(segment, 0L, value); } + /// Sets `memory_management_control_operation` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefPicMarkingEntry memory_management_control_operationAt(long index, @CType("StdVideoH264MemMgmtControlOp") int value) { StdVideoEncodeH264RefPicMarkingEntry.set_memory_management_control_operation(this.segment(), index, value); return this; } + /// Sets `memory_management_control_operation` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefPicMarkingEntry memory_management_control_operation(@CType("StdVideoH264MemMgmtControlOp") int value) { StdVideoEncodeH264RefPicMarkingEntry.set_memory_management_control_operation(this.segment(), value); return this; } + + /// {@return `difference_of_pic_nums_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_difference_of_pic_nums_minus1(MemorySegment segment, long index) { return (short) VH_difference_of_pic_nums_minus1.get(segment, 0L, index); } + /// {@return `difference_of_pic_nums_minus1`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_difference_of_pic_nums_minus1(MemorySegment segment) { return StdVideoEncodeH264RefPicMarkingEntry.get_difference_of_pic_nums_minus1(segment, 0L); } + /// {@return `difference_of_pic_nums_minus1` at the given index} + /// @param index the index + public @CType("uint16_t") short difference_of_pic_nums_minus1At(long index) { return StdVideoEncodeH264RefPicMarkingEntry.get_difference_of_pic_nums_minus1(this.segment(), index); } + /// {@return `difference_of_pic_nums_minus1`} + public @CType("uint16_t") short difference_of_pic_nums_minus1() { return StdVideoEncodeH264RefPicMarkingEntry.get_difference_of_pic_nums_minus1(this.segment()); } + /// Sets `difference_of_pic_nums_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_difference_of_pic_nums_minus1(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_difference_of_pic_nums_minus1.set(segment, 0L, index, value); } + /// Sets `difference_of_pic_nums_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_difference_of_pic_nums_minus1(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_difference_of_pic_nums_minus1(segment, 0L, value); } + /// Sets `difference_of_pic_nums_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefPicMarkingEntry difference_of_pic_nums_minus1At(long index, @CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_difference_of_pic_nums_minus1(this.segment(), index, value); return this; } + /// Sets `difference_of_pic_nums_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefPicMarkingEntry difference_of_pic_nums_minus1(@CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_difference_of_pic_nums_minus1(this.segment(), value); return this; } + + /// {@return `long_term_pic_num` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_long_term_pic_num(MemorySegment segment, long index) { return (short) VH_long_term_pic_num.get(segment, 0L, index); } + /// {@return `long_term_pic_num`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_long_term_pic_num(MemorySegment segment) { return StdVideoEncodeH264RefPicMarkingEntry.get_long_term_pic_num(segment, 0L); } + /// {@return `long_term_pic_num` at the given index} + /// @param index the index + public @CType("uint16_t") short long_term_pic_numAt(long index) { return StdVideoEncodeH264RefPicMarkingEntry.get_long_term_pic_num(this.segment(), index); } + /// {@return `long_term_pic_num`} + public @CType("uint16_t") short long_term_pic_num() { return StdVideoEncodeH264RefPicMarkingEntry.get_long_term_pic_num(this.segment()); } + /// Sets `long_term_pic_num` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_long_term_pic_num(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_long_term_pic_num.set(segment, 0L, index, value); } + /// Sets `long_term_pic_num` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_long_term_pic_num(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_long_term_pic_num(segment, 0L, value); } + /// Sets `long_term_pic_num` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefPicMarkingEntry long_term_pic_numAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_long_term_pic_num(this.segment(), index, value); return this; } + /// Sets `long_term_pic_num` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefPicMarkingEntry long_term_pic_num(@CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_long_term_pic_num(this.segment(), value); return this; } + + /// {@return `long_term_frame_idx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_long_term_frame_idx(MemorySegment segment, long index) { return (short) VH_long_term_frame_idx.get(segment, 0L, index); } + /// {@return `long_term_frame_idx`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_long_term_frame_idx(MemorySegment segment) { return StdVideoEncodeH264RefPicMarkingEntry.get_long_term_frame_idx(segment, 0L); } + /// {@return `long_term_frame_idx` at the given index} + /// @param index the index + public @CType("uint16_t") short long_term_frame_idxAt(long index) { return StdVideoEncodeH264RefPicMarkingEntry.get_long_term_frame_idx(this.segment(), index); } + /// {@return `long_term_frame_idx`} + public @CType("uint16_t") short long_term_frame_idx() { return StdVideoEncodeH264RefPicMarkingEntry.get_long_term_frame_idx(this.segment()); } + /// Sets `long_term_frame_idx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_long_term_frame_idx(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_long_term_frame_idx.set(segment, 0L, index, value); } + /// Sets `long_term_frame_idx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_long_term_frame_idx(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_long_term_frame_idx(segment, 0L, value); } + /// Sets `long_term_frame_idx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefPicMarkingEntry long_term_frame_idxAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_long_term_frame_idx(this.segment(), index, value); return this; } + /// Sets `long_term_frame_idx` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefPicMarkingEntry long_term_frame_idx(@CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_long_term_frame_idx(this.segment(), value); return this; } + + /// {@return `max_long_term_frame_idx_plus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_max_long_term_frame_idx_plus1(MemorySegment segment, long index) { return (short) VH_max_long_term_frame_idx_plus1.get(segment, 0L, index); } + /// {@return `max_long_term_frame_idx_plus1`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_max_long_term_frame_idx_plus1(MemorySegment segment) { return StdVideoEncodeH264RefPicMarkingEntry.get_max_long_term_frame_idx_plus1(segment, 0L); } + /// {@return `max_long_term_frame_idx_plus1` at the given index} + /// @param index the index + public @CType("uint16_t") short max_long_term_frame_idx_plus1At(long index) { return StdVideoEncodeH264RefPicMarkingEntry.get_max_long_term_frame_idx_plus1(this.segment(), index); } + /// {@return `max_long_term_frame_idx_plus1`} + public @CType("uint16_t") short max_long_term_frame_idx_plus1() { return StdVideoEncodeH264RefPicMarkingEntry.get_max_long_term_frame_idx_plus1(this.segment()); } + /// Sets `max_long_term_frame_idx_plus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_long_term_frame_idx_plus1(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_max_long_term_frame_idx_plus1.set(segment, 0L, index, value); } + /// Sets `max_long_term_frame_idx_plus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_long_term_frame_idx_plus1(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_max_long_term_frame_idx_plus1(segment, 0L, value); } + /// Sets `max_long_term_frame_idx_plus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefPicMarkingEntry max_long_term_frame_idx_plus1At(long index, @CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_max_long_term_frame_idx_plus1(this.segment(), index, value); return this; } + /// Sets `max_long_term_frame_idx_plus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264RefPicMarkingEntry max_long_term_frame_idx_plus1(@CType("uint16_t") short value) { StdVideoEncodeH264RefPicMarkingEntry.set_max_long_term_frame_idx_plus1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceInfo.java new file mode 100644 index 00000000..99cb8566 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### primary_pic_type +/// [VarHandle][#VH_primary_pic_type] - [Getter][#primary_pic_type()] - [Setter][#primary_pic_type(int)] +/// ### FrameNum +/// [VarHandle][#VH_FrameNum] - [Getter][#FrameNum()] - [Setter][#FrameNum(int)] +/// ### PicOrderCnt +/// [VarHandle][#VH_PicOrderCnt] - [Getter][#PicOrderCnt()] - [Setter][#PicOrderCnt(int)] +/// ### long_term_pic_num +/// [VarHandle][#VH_long_term_pic_num] - [Getter][#long_term_pic_num()] - [Setter][#long_term_pic_num(short)] +/// ### long_term_frame_idx +/// [VarHandle][#VH_long_term_frame_idx] - [Getter][#long_term_frame_idx()] - [Setter][#long_term_frame_idx(short)] +/// ### temporal_id +/// [VarHandle][#VH_temporal_id] - [Getter][#temporal_id()] - [Setter][#temporal_id(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264ReferenceInfo { +/// StdVideoEncodeH264ReferenceInfoFlags flags; +/// StdVideoH264PictureType primary_pic_type; +/// uint32_t FrameNum; +/// int32_t PicOrderCnt; +/// uint16_t long_term_pic_num; +/// uint16_t long_term_frame_idx; +/// uint8_t temporal_id; +/// } StdVideoEncodeH264ReferenceInfo; +/// ``` +public final class StdVideoEncodeH264ReferenceInfo extends Struct { + /// The struct layout of `StdVideoEncodeH264ReferenceInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeH264ReferenceInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("primary_pic_type"), + ValueLayout.JAVA_INT.withName("FrameNum"), + ValueLayout.JAVA_INT.withName("PicOrderCnt"), + ValueLayout.JAVA_SHORT.withName("long_term_pic_num"), + ValueLayout.JAVA_SHORT.withName("long_term_frame_idx"), + ValueLayout.JAVA_BYTE.withName("temporal_id") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `primary_pic_type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_primary_pic_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("primary_pic_type")); + /// The [VarHandle] of `FrameNum` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_FrameNum = LAYOUT.arrayElementVarHandle(PathElement.groupElement("FrameNum")); + /// The [VarHandle] of `PicOrderCnt` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_PicOrderCnt = LAYOUT.arrayElementVarHandle(PathElement.groupElement("PicOrderCnt")); + /// The [VarHandle] of `long_term_pic_num` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_long_term_pic_num = LAYOUT.arrayElementVarHandle(PathElement.groupElement("long_term_pic_num")); + /// The [VarHandle] of `long_term_frame_idx` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_long_term_frame_idx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("long_term_frame_idx")); + /// The [VarHandle] of `temporal_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_temporal_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("temporal_id")); + + /// Creates `StdVideoEncodeH264ReferenceInfo` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264ReferenceInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264ReferenceInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceInfo(segment); } + + /// Creates `StdVideoEncodeH264ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264ReferenceInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264ReferenceInfo` + public static StdVideoEncodeH264ReferenceInfo alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264ReferenceInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264ReferenceInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264ReferenceInfo` + public static StdVideoEncodeH264ReferenceInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264ReferenceInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeH264ReferenceInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeH264ReferenceInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeH264ReferenceInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo flagsAt(long index, @CType("StdVideoEncodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo flags(@CType("StdVideoEncodeH264ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceInfo.set_flags(this.segment(), value); return this; } + + /// {@return `primary_pic_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264PictureType") int get_primary_pic_type(MemorySegment segment, long index) { return (int) VH_primary_pic_type.get(segment, 0L, index); } + /// {@return `primary_pic_type`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264PictureType") int get_primary_pic_type(MemorySegment segment) { return StdVideoEncodeH264ReferenceInfo.get_primary_pic_type(segment, 0L); } + /// {@return `primary_pic_type` at the given index} + /// @param index the index + public @CType("StdVideoH264PictureType") int primary_pic_typeAt(long index) { return StdVideoEncodeH264ReferenceInfo.get_primary_pic_type(this.segment(), index); } + /// {@return `primary_pic_type`} + public @CType("StdVideoH264PictureType") int primary_pic_type() { return StdVideoEncodeH264ReferenceInfo.get_primary_pic_type(this.segment()); } + /// Sets `primary_pic_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_primary_pic_type(MemorySegment segment, long index, @CType("StdVideoH264PictureType") int value) { VH_primary_pic_type.set(segment, 0L, index, value); } + /// Sets `primary_pic_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_primary_pic_type(MemorySegment segment, @CType("StdVideoH264PictureType") int value) { StdVideoEncodeH264ReferenceInfo.set_primary_pic_type(segment, 0L, value); } + /// Sets `primary_pic_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo primary_pic_typeAt(long index, @CType("StdVideoH264PictureType") int value) { StdVideoEncodeH264ReferenceInfo.set_primary_pic_type(this.segment(), index, value); return this; } + /// Sets `primary_pic_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo primary_pic_type(@CType("StdVideoH264PictureType") int value) { StdVideoEncodeH264ReferenceInfo.set_primary_pic_type(this.segment(), value); return this; } + + /// {@return `FrameNum` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_FrameNum(MemorySegment segment, long index) { return (int) VH_FrameNum.get(segment, 0L, index); } + /// {@return `FrameNum`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_FrameNum(MemorySegment segment) { return StdVideoEncodeH264ReferenceInfo.get_FrameNum(segment, 0L); } + /// {@return `FrameNum` at the given index} + /// @param index the index + public @CType("uint32_t") int FrameNumAt(long index) { return StdVideoEncodeH264ReferenceInfo.get_FrameNum(this.segment(), index); } + /// {@return `FrameNum`} + public @CType("uint32_t") int FrameNum() { return StdVideoEncodeH264ReferenceInfo.get_FrameNum(this.segment()); } + /// Sets `FrameNum` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_FrameNum(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_FrameNum.set(segment, 0L, index, value); } + /// Sets `FrameNum` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_FrameNum(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeH264ReferenceInfo.set_FrameNum(segment, 0L, value); } + /// Sets `FrameNum` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo FrameNumAt(long index, @CType("uint32_t") int value) { StdVideoEncodeH264ReferenceInfo.set_FrameNum(this.segment(), index, value); return this; } + /// Sets `FrameNum` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo FrameNum(@CType("uint32_t") int value) { StdVideoEncodeH264ReferenceInfo.set_FrameNum(this.segment(), value); return this; } + + /// {@return `PicOrderCnt` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_PicOrderCnt(MemorySegment segment, long index) { return (int) VH_PicOrderCnt.get(segment, 0L, index); } + /// {@return `PicOrderCnt`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_PicOrderCnt(MemorySegment segment) { return StdVideoEncodeH264ReferenceInfo.get_PicOrderCnt(segment, 0L); } + /// {@return `PicOrderCnt` at the given index} + /// @param index the index + public @CType("int32_t") int PicOrderCntAt(long index) { return StdVideoEncodeH264ReferenceInfo.get_PicOrderCnt(this.segment(), index); } + /// {@return `PicOrderCnt`} + public @CType("int32_t") int PicOrderCnt() { return StdVideoEncodeH264ReferenceInfo.get_PicOrderCnt(this.segment()); } + /// Sets `PicOrderCnt` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_PicOrderCnt(MemorySegment segment, long index, @CType("int32_t") int value) { VH_PicOrderCnt.set(segment, 0L, index, value); } + /// Sets `PicOrderCnt` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_PicOrderCnt(MemorySegment segment, @CType("int32_t") int value) { StdVideoEncodeH264ReferenceInfo.set_PicOrderCnt(segment, 0L, value); } + /// Sets `PicOrderCnt` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo PicOrderCntAt(long index, @CType("int32_t") int value) { StdVideoEncodeH264ReferenceInfo.set_PicOrderCnt(this.segment(), index, value); return this; } + /// Sets `PicOrderCnt` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo PicOrderCnt(@CType("int32_t") int value) { StdVideoEncodeH264ReferenceInfo.set_PicOrderCnt(this.segment(), value); return this; } + + /// {@return `long_term_pic_num` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_long_term_pic_num(MemorySegment segment, long index) { return (short) VH_long_term_pic_num.get(segment, 0L, index); } + /// {@return `long_term_pic_num`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_long_term_pic_num(MemorySegment segment) { return StdVideoEncodeH264ReferenceInfo.get_long_term_pic_num(segment, 0L); } + /// {@return `long_term_pic_num` at the given index} + /// @param index the index + public @CType("uint16_t") short long_term_pic_numAt(long index) { return StdVideoEncodeH264ReferenceInfo.get_long_term_pic_num(this.segment(), index); } + /// {@return `long_term_pic_num`} + public @CType("uint16_t") short long_term_pic_num() { return StdVideoEncodeH264ReferenceInfo.get_long_term_pic_num(this.segment()); } + /// Sets `long_term_pic_num` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_long_term_pic_num(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_long_term_pic_num.set(segment, 0L, index, value); } + /// Sets `long_term_pic_num` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_long_term_pic_num(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH264ReferenceInfo.set_long_term_pic_num(segment, 0L, value); } + /// Sets `long_term_pic_num` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo long_term_pic_numAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH264ReferenceInfo.set_long_term_pic_num(this.segment(), index, value); return this; } + /// Sets `long_term_pic_num` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo long_term_pic_num(@CType("uint16_t") short value) { StdVideoEncodeH264ReferenceInfo.set_long_term_pic_num(this.segment(), value); return this; } + + /// {@return `long_term_frame_idx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_long_term_frame_idx(MemorySegment segment, long index) { return (short) VH_long_term_frame_idx.get(segment, 0L, index); } + /// {@return `long_term_frame_idx`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_long_term_frame_idx(MemorySegment segment) { return StdVideoEncodeH264ReferenceInfo.get_long_term_frame_idx(segment, 0L); } + /// {@return `long_term_frame_idx` at the given index} + /// @param index the index + public @CType("uint16_t") short long_term_frame_idxAt(long index) { return StdVideoEncodeH264ReferenceInfo.get_long_term_frame_idx(this.segment(), index); } + /// {@return `long_term_frame_idx`} + public @CType("uint16_t") short long_term_frame_idx() { return StdVideoEncodeH264ReferenceInfo.get_long_term_frame_idx(this.segment()); } + /// Sets `long_term_frame_idx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_long_term_frame_idx(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_long_term_frame_idx.set(segment, 0L, index, value); } + /// Sets `long_term_frame_idx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_long_term_frame_idx(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH264ReferenceInfo.set_long_term_frame_idx(segment, 0L, value); } + /// Sets `long_term_frame_idx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo long_term_frame_idxAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH264ReferenceInfo.set_long_term_frame_idx(this.segment(), index, value); return this; } + /// Sets `long_term_frame_idx` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo long_term_frame_idx(@CType("uint16_t") short value) { StdVideoEncodeH264ReferenceInfo.set_long_term_frame_idx(this.segment(), value); return this; } + + /// {@return `temporal_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_temporal_id(MemorySegment segment, long index) { return (byte) VH_temporal_id.get(segment, 0L, index); } + /// {@return `temporal_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_temporal_id(MemorySegment segment) { return StdVideoEncodeH264ReferenceInfo.get_temporal_id(segment, 0L); } + /// {@return `temporal_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte temporal_idAt(long index) { return StdVideoEncodeH264ReferenceInfo.get_temporal_id(this.segment(), index); } + /// {@return `temporal_id`} + public @CType("uint8_t") byte temporal_id() { return StdVideoEncodeH264ReferenceInfo.get_temporal_id(this.segment()); } + /// Sets `temporal_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_temporal_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_temporal_id.set(segment, 0L, index, value); } + /// Sets `temporal_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_temporal_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceInfo.set_temporal_id(segment, 0L, value); } + /// Sets `temporal_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo temporal_idAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceInfo.set_temporal_id(this.segment(), index, value); return this; } + /// Sets `temporal_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfo temporal_id(@CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceInfo.set_temporal_id(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceInfoFlags.java new file mode 100644 index 00000000..692c9c73 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceInfoFlags.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### used_for_long_term_reference +/// [VarHandle][#VH_used_for_long_term_reference] - [Getter][#used_for_long_term_reference()] - [Setter][#used_for_long_term_reference(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264ReferenceInfoFlags { +/// uint32_t : 1 used_for_long_term_reference; +/// uint32_t : 31 reserved; +/// } StdVideoEncodeH264ReferenceInfoFlags; +/// ``` +public final class StdVideoEncodeH264ReferenceInfoFlags extends Struct { + /// The struct layout of `StdVideoEncodeH264ReferenceInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("used_for_long_term_reference"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `used_for_long_term_reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_used_for_long_term_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("used_for_long_term_reference")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeH264ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264ReferenceInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceInfoFlags(segment); } + + /// Creates `StdVideoEncodeH264ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264ReferenceInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264ReferenceInfoFlags` + public static StdVideoEncodeH264ReferenceInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264ReferenceInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264ReferenceInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264ReferenceInfoFlags` + public static StdVideoEncodeH264ReferenceInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264ReferenceInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `used_for_long_term_reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_used_for_long_term_reference(MemorySegment segment, long index) { return (int) VH_used_for_long_term_reference.get(segment, 0L, index); } + /// {@return `used_for_long_term_reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_used_for_long_term_reference(MemorySegment segment) { return StdVideoEncodeH264ReferenceInfoFlags.get_used_for_long_term_reference(segment, 0L); } + /// {@return `used_for_long_term_reference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int used_for_long_term_referenceAt(long index) { return StdVideoEncodeH264ReferenceInfoFlags.get_used_for_long_term_reference(this.segment(), index); } + /// {@return `used_for_long_term_reference`} + public @CType("uint32_t : 1") int used_for_long_term_reference() { return StdVideoEncodeH264ReferenceInfoFlags.get_used_for_long_term_reference(this.segment()); } + /// Sets `used_for_long_term_reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_used_for_long_term_reference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_used_for_long_term_reference.set(segment, 0L, index, value); } + /// Sets `used_for_long_term_reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_used_for_long_term_reference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH264ReferenceInfoFlags.set_used_for_long_term_reference(segment, 0L, value); } + /// Sets `used_for_long_term_reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfoFlags used_for_long_term_referenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH264ReferenceInfoFlags.set_used_for_long_term_reference(this.segment(), index, value); return this; } + /// Sets `used_for_long_term_reference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfoFlags used_for_long_term_reference(@CType("uint32_t : 1") int value) { StdVideoEncodeH264ReferenceInfoFlags.set_used_for_long_term_reference(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 31") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 31") int get_reserved(MemorySegment segment) { return StdVideoEncodeH264ReferenceInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 31") int reservedAt(long index) { return StdVideoEncodeH264ReferenceInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 31") int reserved() { return StdVideoEncodeH264ReferenceInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 31") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 31") int value) { StdVideoEncodeH264ReferenceInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfoFlags reservedAt(long index, @CType("uint32_t : 31") int value) { StdVideoEncodeH264ReferenceInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceInfoFlags reserved(@CType("uint32_t : 31") int value) { StdVideoEncodeH264ReferenceInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceListsInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceListsInfo.java new file mode 100644 index 00000000..8ec5b535 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceListsInfo.java @@ -0,0 +1,518 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### num_ref_idx_l0_active_minus1 +/// [VarHandle][#VH_num_ref_idx_l0_active_minus1] - [Getter][#num_ref_idx_l0_active_minus1()] - [Setter][#num_ref_idx_l0_active_minus1(byte)] +/// ### num_ref_idx_l1_active_minus1 +/// [VarHandle][#VH_num_ref_idx_l1_active_minus1] - [Getter][#num_ref_idx_l1_active_minus1()] - [Setter][#num_ref_idx_l1_active_minus1(byte)] +/// ### RefPicList0 +/// [VarHandle][#VH_RefPicList0] - [Getter][#RefPicList0()] - [Setter][#RefPicList0(byte)] +/// ### RefPicList1 +/// [VarHandle][#VH_RefPicList1] - [Getter][#RefPicList1()] - [Setter][#RefPicList1(byte)] +/// ### refList0ModOpCount +/// [VarHandle][#VH_refList0ModOpCount] - [Getter][#refList0ModOpCount()] - [Setter][#refList0ModOpCount(byte)] +/// ### refList1ModOpCount +/// [VarHandle][#VH_refList1ModOpCount] - [Getter][#refList1ModOpCount()] - [Setter][#refList1ModOpCount(byte)] +/// ### refPicMarkingOpCount +/// [VarHandle][#VH_refPicMarkingOpCount] - [Getter][#refPicMarkingOpCount()] - [Setter][#refPicMarkingOpCount(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### pRefList0ModOperations +/// [VarHandle][#VH_pRefList0ModOperations] - [Getter][#pRefList0ModOperations()] - [Setter][#pRefList0ModOperations(java.lang.foreign.MemorySegment)] +/// ### pRefList1ModOperations +/// [VarHandle][#VH_pRefList1ModOperations] - [Getter][#pRefList1ModOperations()] - [Setter][#pRefList1ModOperations(java.lang.foreign.MemorySegment)] +/// ### pRefPicMarkingOperations +/// [VarHandle][#VH_pRefPicMarkingOperations] - [Getter][#pRefPicMarkingOperations()] - [Setter][#pRefPicMarkingOperations(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264ReferenceListsInfo { +/// StdVideoEncodeH264ReferenceListsInfoFlags flags; +/// uint8_t num_ref_idx_l0_active_minus1; +/// uint8_t num_ref_idx_l1_active_minus1; +/// uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF] RefPicList0; +/// uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF] RefPicList1; +/// uint8_t refList0ModOpCount; +/// uint8_t refList1ModOpCount; +/// uint8_t refPicMarkingOpCount; +/// uint8_t [7] reserved1; +/// const StdVideoEncodeH264RefListModEntry * pRefList0ModOperations; +/// const StdVideoEncodeH264RefListModEntry * pRefList1ModOperations; +/// const StdVideoEncodeH264RefPicMarkingEntry * pRefPicMarkingOperations; +/// } StdVideoEncodeH264ReferenceListsInfo; +/// ``` +public final class StdVideoEncodeH264ReferenceListsInfo extends Struct { + /// The struct layout of `StdVideoEncodeH264ReferenceListsInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeH264ReferenceListsInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("num_ref_idx_l0_active_minus1"), + ValueLayout.JAVA_BYTE.withName("num_ref_idx_l1_active_minus1"), + ValueLayout.JAVA_BYTE.withName("RefPicList0"), + ValueLayout.JAVA_BYTE.withName("RefPicList1"), + ValueLayout.JAVA_BYTE.withName("refList0ModOpCount"), + ValueLayout.JAVA_BYTE.withName("refList1ModOpCount"), + ValueLayout.JAVA_BYTE.withName("refPicMarkingOpCount"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.ADDRESS.withName("pRefList0ModOperations"), + ValueLayout.ADDRESS.withName("pRefList1ModOperations"), + ValueLayout.ADDRESS.withName("pRefPicMarkingOperations") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `num_ref_idx_l0_active_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_ref_idx_l0_active_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_idx_l0_active_minus1")); + /// The [VarHandle] of `num_ref_idx_l1_active_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_ref_idx_l1_active_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_idx_l1_active_minus1")); + /// The [VarHandle] of `RefPicList0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_RefPicList0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("RefPicList0")); + /// The [VarHandle] of `RefPicList1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_RefPicList1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("RefPicList1")); + /// The [VarHandle] of `refList0ModOpCount` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_refList0ModOpCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("refList0ModOpCount")); + /// The [VarHandle] of `refList1ModOpCount` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_refList1ModOpCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("refList1ModOpCount")); + /// The [VarHandle] of `refPicMarkingOpCount` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_refPicMarkingOpCount = LAYOUT.arrayElementVarHandle(PathElement.groupElement("refPicMarkingOpCount")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `pRefList0ModOperations` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRefList0ModOperations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRefList0ModOperations")); + /// The [VarHandle] of `pRefList1ModOperations` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRefList1ModOperations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRefList1ModOperations")); + /// The [VarHandle] of `pRefPicMarkingOperations` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRefPicMarkingOperations = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRefPicMarkingOperations")); + + /// Creates `StdVideoEncodeH264ReferenceListsInfo` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264ReferenceListsInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264ReferenceListsInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceListsInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceListsInfo(segment); } + + /// Creates `StdVideoEncodeH264ReferenceListsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceListsInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceListsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264ReferenceListsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceListsInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceListsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264ReferenceListsInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264ReferenceListsInfo` + public static StdVideoEncodeH264ReferenceListsInfo alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264ReferenceListsInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264ReferenceListsInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264ReferenceListsInfo` + public static StdVideoEncodeH264ReferenceListsInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264ReferenceListsInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeH264ReferenceListsInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeH264ReferenceListsInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeH264ReferenceListsInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeH264ReferenceListsInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeH264ReferenceListsInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeH264ReferenceListsInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeH264ReferenceListsInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo flagsAt(long index, @CType("StdVideoEncodeH264ReferenceListsInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo flags(@CType("StdVideoEncodeH264ReferenceListsInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_flags(this.segment(), value); return this; } + + /// {@return `num_ref_idx_l0_active_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_ref_idx_l0_active_minus1(MemorySegment segment, long index) { return (byte) VH_num_ref_idx_l0_active_minus1.get(segment, 0L, index); } + /// {@return `num_ref_idx_l0_active_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_ref_idx_l0_active_minus1(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_num_ref_idx_l0_active_minus1(segment, 0L); } + /// {@return `num_ref_idx_l0_active_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_ref_idx_l0_active_minus1At(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_num_ref_idx_l0_active_minus1(this.segment(), index); } + /// {@return `num_ref_idx_l0_active_minus1`} + public @CType("uint8_t") byte num_ref_idx_l0_active_minus1() { return StdVideoEncodeH264ReferenceListsInfo.get_num_ref_idx_l0_active_minus1(this.segment()); } + /// Sets `num_ref_idx_l0_active_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_idx_l0_active_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_ref_idx_l0_active_minus1.set(segment, 0L, index, value); } + /// Sets `num_ref_idx_l0_active_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_idx_l0_active_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_num_ref_idx_l0_active_minus1(segment, 0L, value); } + /// Sets `num_ref_idx_l0_active_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo num_ref_idx_l0_active_minus1At(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_num_ref_idx_l0_active_minus1(this.segment(), index, value); return this; } + /// Sets `num_ref_idx_l0_active_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo num_ref_idx_l0_active_minus1(@CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_num_ref_idx_l0_active_minus1(this.segment(), value); return this; } + + /// {@return `num_ref_idx_l1_active_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_ref_idx_l1_active_minus1(MemorySegment segment, long index) { return (byte) VH_num_ref_idx_l1_active_minus1.get(segment, 0L, index); } + /// {@return `num_ref_idx_l1_active_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_ref_idx_l1_active_minus1(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_num_ref_idx_l1_active_minus1(segment, 0L); } + /// {@return `num_ref_idx_l1_active_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_ref_idx_l1_active_minus1At(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_num_ref_idx_l1_active_minus1(this.segment(), index); } + /// {@return `num_ref_idx_l1_active_minus1`} + public @CType("uint8_t") byte num_ref_idx_l1_active_minus1() { return StdVideoEncodeH264ReferenceListsInfo.get_num_ref_idx_l1_active_minus1(this.segment()); } + /// Sets `num_ref_idx_l1_active_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_idx_l1_active_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_ref_idx_l1_active_minus1.set(segment, 0L, index, value); } + /// Sets `num_ref_idx_l1_active_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_idx_l1_active_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_num_ref_idx_l1_active_minus1(segment, 0L, value); } + /// Sets `num_ref_idx_l1_active_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo num_ref_idx_l1_active_minus1At(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_num_ref_idx_l1_active_minus1(this.segment(), index, value); return this; } + /// Sets `num_ref_idx_l1_active_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo num_ref_idx_l1_active_minus1(@CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_num_ref_idx_l1_active_minus1(this.segment(), value); return this; } + + /// {@return `RefPicList0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte get_RefPicList0(MemorySegment segment, long index) { return (byte) VH_RefPicList0.get(segment, 0L, index); } + /// {@return `RefPicList0`} + /// @param segment the segment of the struct + public static @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte get_RefPicList0(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_RefPicList0(segment, 0L); } + /// {@return `RefPicList0` at the given index} + /// @param index the index + public @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte RefPicList0At(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_RefPicList0(this.segment(), index); } + /// {@return `RefPicList0`} + public @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte RefPicList0() { return StdVideoEncodeH264ReferenceListsInfo.get_RefPicList0(this.segment()); } + /// Sets `RefPicList0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_RefPicList0(MemorySegment segment, long index, @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte value) { VH_RefPicList0.set(segment, 0L, index, value); } + /// Sets `RefPicList0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_RefPicList0(MemorySegment segment, @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_RefPicList0(segment, 0L, value); } + /// Sets `RefPicList0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo RefPicList0At(long index, @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_RefPicList0(this.segment(), index, value); return this; } + /// Sets `RefPicList0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo RefPicList0(@CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_RefPicList0(this.segment(), value); return this; } + + /// {@return `RefPicList1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte get_RefPicList1(MemorySegment segment, long index) { return (byte) VH_RefPicList1.get(segment, 0L, index); } + /// {@return `RefPicList1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte get_RefPicList1(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_RefPicList1(segment, 0L); } + /// {@return `RefPicList1` at the given index} + /// @param index the index + public @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte RefPicList1At(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_RefPicList1(this.segment(), index); } + /// {@return `RefPicList1`} + public @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte RefPicList1() { return StdVideoEncodeH264ReferenceListsInfo.get_RefPicList1(this.segment()); } + /// Sets `RefPicList1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_RefPicList1(MemorySegment segment, long index, @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte value) { VH_RefPicList1.set(segment, 0L, index, value); } + /// Sets `RefPicList1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_RefPicList1(MemorySegment segment, @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_RefPicList1(segment, 0L, value); } + /// Sets `RefPicList1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo RefPicList1At(long index, @CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_RefPicList1(this.segment(), index, value); return this; } + /// Sets `RefPicList1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo RefPicList1(@CType("uint8_t [STD_VIDEO_H264_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_RefPicList1(this.segment(), value); return this; } + + /// {@return `refList0ModOpCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_refList0ModOpCount(MemorySegment segment, long index) { return (byte) VH_refList0ModOpCount.get(segment, 0L, index); } + /// {@return `refList0ModOpCount`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_refList0ModOpCount(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_refList0ModOpCount(segment, 0L); } + /// {@return `refList0ModOpCount` at the given index} + /// @param index the index + public @CType("uint8_t") byte refList0ModOpCountAt(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_refList0ModOpCount(this.segment(), index); } + /// {@return `refList0ModOpCount`} + public @CType("uint8_t") byte refList0ModOpCount() { return StdVideoEncodeH264ReferenceListsInfo.get_refList0ModOpCount(this.segment()); } + /// Sets `refList0ModOpCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_refList0ModOpCount(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_refList0ModOpCount.set(segment, 0L, index, value); } + /// Sets `refList0ModOpCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_refList0ModOpCount(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_refList0ModOpCount(segment, 0L, value); } + /// Sets `refList0ModOpCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo refList0ModOpCountAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_refList0ModOpCount(this.segment(), index, value); return this; } + /// Sets `refList0ModOpCount` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo refList0ModOpCount(@CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_refList0ModOpCount(this.segment(), value); return this; } + + /// {@return `refList1ModOpCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_refList1ModOpCount(MemorySegment segment, long index) { return (byte) VH_refList1ModOpCount.get(segment, 0L, index); } + /// {@return `refList1ModOpCount`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_refList1ModOpCount(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_refList1ModOpCount(segment, 0L); } + /// {@return `refList1ModOpCount` at the given index} + /// @param index the index + public @CType("uint8_t") byte refList1ModOpCountAt(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_refList1ModOpCount(this.segment(), index); } + /// {@return `refList1ModOpCount`} + public @CType("uint8_t") byte refList1ModOpCount() { return StdVideoEncodeH264ReferenceListsInfo.get_refList1ModOpCount(this.segment()); } + /// Sets `refList1ModOpCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_refList1ModOpCount(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_refList1ModOpCount.set(segment, 0L, index, value); } + /// Sets `refList1ModOpCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_refList1ModOpCount(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_refList1ModOpCount(segment, 0L, value); } + /// Sets `refList1ModOpCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo refList1ModOpCountAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_refList1ModOpCount(this.segment(), index, value); return this; } + /// Sets `refList1ModOpCount` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo refList1ModOpCount(@CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_refList1ModOpCount(this.segment(), value); return this; } + + /// {@return `refPicMarkingOpCount` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_refPicMarkingOpCount(MemorySegment segment, long index) { return (byte) VH_refPicMarkingOpCount.get(segment, 0L, index); } + /// {@return `refPicMarkingOpCount`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_refPicMarkingOpCount(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_refPicMarkingOpCount(segment, 0L); } + /// {@return `refPicMarkingOpCount` at the given index} + /// @param index the index + public @CType("uint8_t") byte refPicMarkingOpCountAt(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_refPicMarkingOpCount(this.segment(), index); } + /// {@return `refPicMarkingOpCount`} + public @CType("uint8_t") byte refPicMarkingOpCount() { return StdVideoEncodeH264ReferenceListsInfo.get_refPicMarkingOpCount(this.segment()); } + /// Sets `refPicMarkingOpCount` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_refPicMarkingOpCount(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_refPicMarkingOpCount.set(segment, 0L, index, value); } + /// Sets `refPicMarkingOpCount` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_refPicMarkingOpCount(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_refPicMarkingOpCount(segment, 0L, value); } + /// Sets `refPicMarkingOpCount` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo refPicMarkingOpCountAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_refPicMarkingOpCount(this.segment(), index, value); return this; } + /// Sets `refPicMarkingOpCount` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo refPicMarkingOpCount(@CType("uint8_t") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_refPicMarkingOpCount(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [7]") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [7]") byte get_reserved1(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t [7]") byte reserved1At(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t [7]") byte reserved1() { return StdVideoEncodeH264ReferenceListsInfo.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t [7]") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t [7]") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo reserved1At(long index, @CType("uint8_t [7]") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo reserved1(@CType("uint8_t [7]") byte value) { StdVideoEncodeH264ReferenceListsInfo.set_reserved1(this.segment(), value); return this; } + + /// {@return `pRefList0ModOperations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment get_pRefList0ModOperations(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRefList0ModOperations.get(segment, 0L, index); } + /// {@return `pRefList0ModOperations`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment get_pRefList0ModOperations(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_pRefList0ModOperations(segment, 0L); } + /// {@return `pRefList0ModOperations` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment pRefList0ModOperationsAt(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_pRefList0ModOperations(this.segment(), index); } + /// {@return `pRefList0ModOperations`} + public @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment pRefList0ModOperations() { return StdVideoEncodeH264ReferenceListsInfo.get_pRefList0ModOperations(this.segment()); } + /// Sets `pRefList0ModOperations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRefList0ModOperations(MemorySegment segment, long index, @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment value) { VH_pRefList0ModOperations.set(segment, 0L, index, value); } + /// Sets `pRefList0ModOperations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRefList0ModOperations(MemorySegment segment, @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_pRefList0ModOperations(segment, 0L, value); } + /// Sets `pRefList0ModOperations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo pRefList0ModOperationsAt(long index, @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_pRefList0ModOperations(this.segment(), index, value); return this; } + /// Sets `pRefList0ModOperations` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo pRefList0ModOperations(@CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_pRefList0ModOperations(this.segment(), value); return this; } + + /// {@return `pRefList1ModOperations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment get_pRefList1ModOperations(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRefList1ModOperations.get(segment, 0L, index); } + /// {@return `pRefList1ModOperations`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment get_pRefList1ModOperations(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_pRefList1ModOperations(segment, 0L); } + /// {@return `pRefList1ModOperations` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment pRefList1ModOperationsAt(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_pRefList1ModOperations(this.segment(), index); } + /// {@return `pRefList1ModOperations`} + public @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment pRefList1ModOperations() { return StdVideoEncodeH264ReferenceListsInfo.get_pRefList1ModOperations(this.segment()); } + /// Sets `pRefList1ModOperations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRefList1ModOperations(MemorySegment segment, long index, @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment value) { VH_pRefList1ModOperations.set(segment, 0L, index, value); } + /// Sets `pRefList1ModOperations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRefList1ModOperations(MemorySegment segment, @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_pRefList1ModOperations(segment, 0L, value); } + /// Sets `pRefList1ModOperations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo pRefList1ModOperationsAt(long index, @CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_pRefList1ModOperations(this.segment(), index, value); return this; } + /// Sets `pRefList1ModOperations` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo pRefList1ModOperations(@CType("const StdVideoEncodeH264RefListModEntry *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_pRefList1ModOperations(this.segment(), value); return this; } + + /// {@return `pRefPicMarkingOperations` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH264RefPicMarkingEntry *") java.lang.foreign.MemorySegment get_pRefPicMarkingOperations(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRefPicMarkingOperations.get(segment, 0L, index); } + /// {@return `pRefPicMarkingOperations`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH264RefPicMarkingEntry *") java.lang.foreign.MemorySegment get_pRefPicMarkingOperations(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfo.get_pRefPicMarkingOperations(segment, 0L); } + /// {@return `pRefPicMarkingOperations` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH264RefPicMarkingEntry *") java.lang.foreign.MemorySegment pRefPicMarkingOperationsAt(long index) { return StdVideoEncodeH264ReferenceListsInfo.get_pRefPicMarkingOperations(this.segment(), index); } + /// {@return `pRefPicMarkingOperations`} + public @CType("const StdVideoEncodeH264RefPicMarkingEntry *") java.lang.foreign.MemorySegment pRefPicMarkingOperations() { return StdVideoEncodeH264ReferenceListsInfo.get_pRefPicMarkingOperations(this.segment()); } + /// Sets `pRefPicMarkingOperations` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRefPicMarkingOperations(MemorySegment segment, long index, @CType("const StdVideoEncodeH264RefPicMarkingEntry *") java.lang.foreign.MemorySegment value) { VH_pRefPicMarkingOperations.set(segment, 0L, index, value); } + /// Sets `pRefPicMarkingOperations` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRefPicMarkingOperations(MemorySegment segment, @CType("const StdVideoEncodeH264RefPicMarkingEntry *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_pRefPicMarkingOperations(segment, 0L, value); } + /// Sets `pRefPicMarkingOperations` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo pRefPicMarkingOperationsAt(long index, @CType("const StdVideoEncodeH264RefPicMarkingEntry *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_pRefPicMarkingOperations(this.segment(), index, value); return this; } + /// Sets `pRefPicMarkingOperations` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfo pRefPicMarkingOperations(@CType("const StdVideoEncodeH264RefPicMarkingEntry *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264ReferenceListsInfo.set_pRefPicMarkingOperations(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceListsInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceListsInfoFlags.java new file mode 100644 index 00000000..2abdd182 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264ReferenceListsInfoFlags.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### ref_pic_list_modification_flag_l0 +/// [VarHandle][#VH_ref_pic_list_modification_flag_l0] - [Getter][#ref_pic_list_modification_flag_l0()] - [Setter][#ref_pic_list_modification_flag_l0(int)] +/// ### ref_pic_list_modification_flag_l1 +/// [VarHandle][#VH_ref_pic_list_modification_flag_l1] - [Getter][#ref_pic_list_modification_flag_l1()] - [Setter][#ref_pic_list_modification_flag_l1(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264ReferenceListsInfoFlags { +/// uint32_t : 1 ref_pic_list_modification_flag_l0; +/// uint32_t : 1 ref_pic_list_modification_flag_l1; +/// uint32_t : 30 reserved; +/// } StdVideoEncodeH264ReferenceListsInfoFlags; +/// ``` +public final class StdVideoEncodeH264ReferenceListsInfoFlags extends Struct { + /// The struct layout of `StdVideoEncodeH264ReferenceListsInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("ref_pic_list_modification_flag_l0"), + ValueLayout.JAVA_INT.withName("ref_pic_list_modification_flag_l1"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `ref_pic_list_modification_flag_l0` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ref_pic_list_modification_flag_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ref_pic_list_modification_flag_l0")); + /// The [VarHandle] of `ref_pic_list_modification_flag_l1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ref_pic_list_modification_flag_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ref_pic_list_modification_flag_l1")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeH264ReferenceListsInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264ReferenceListsInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264ReferenceListsInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceListsInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceListsInfoFlags(segment); } + + /// Creates `StdVideoEncodeH264ReferenceListsInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceListsInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceListsInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264ReferenceListsInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264ReferenceListsInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264ReferenceListsInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264ReferenceListsInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264ReferenceListsInfoFlags` + public static StdVideoEncodeH264ReferenceListsInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264ReferenceListsInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264ReferenceListsInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264ReferenceListsInfoFlags` + public static StdVideoEncodeH264ReferenceListsInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264ReferenceListsInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `ref_pic_list_modification_flag_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_ref_pic_list_modification_flag_l0(MemorySegment segment, long index) { return (int) VH_ref_pic_list_modification_flag_l0.get(segment, 0L, index); } + /// {@return `ref_pic_list_modification_flag_l0`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_ref_pic_list_modification_flag_l0(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l0(segment, 0L); } + /// {@return `ref_pic_list_modification_flag_l0` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int ref_pic_list_modification_flag_l0At(long index) { return StdVideoEncodeH264ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l0(this.segment(), index); } + /// {@return `ref_pic_list_modification_flag_l0`} + public @CType("uint32_t : 1") int ref_pic_list_modification_flag_l0() { return StdVideoEncodeH264ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l0(this.segment()); } + /// Sets `ref_pic_list_modification_flag_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ref_pic_list_modification_flag_l0(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_ref_pic_list_modification_flag_l0.set(segment, 0L, index, value); } + /// Sets `ref_pic_list_modification_flag_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ref_pic_list_modification_flag_l0(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH264ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l0(segment, 0L, value); } + /// Sets `ref_pic_list_modification_flag_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfoFlags ref_pic_list_modification_flag_l0At(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH264ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l0(this.segment(), index, value); return this; } + /// Sets `ref_pic_list_modification_flag_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfoFlags ref_pic_list_modification_flag_l0(@CType("uint32_t : 1") int value) { StdVideoEncodeH264ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l0(this.segment(), value); return this; } + + /// {@return `ref_pic_list_modification_flag_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_ref_pic_list_modification_flag_l1(MemorySegment segment, long index) { return (int) VH_ref_pic_list_modification_flag_l1.get(segment, 0L, index); } + /// {@return `ref_pic_list_modification_flag_l1`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_ref_pic_list_modification_flag_l1(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l1(segment, 0L); } + /// {@return `ref_pic_list_modification_flag_l1` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int ref_pic_list_modification_flag_l1At(long index) { return StdVideoEncodeH264ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l1(this.segment(), index); } + /// {@return `ref_pic_list_modification_flag_l1`} + public @CType("uint32_t : 1") int ref_pic_list_modification_flag_l1() { return StdVideoEncodeH264ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l1(this.segment()); } + /// Sets `ref_pic_list_modification_flag_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ref_pic_list_modification_flag_l1(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_ref_pic_list_modification_flag_l1.set(segment, 0L, index, value); } + /// Sets `ref_pic_list_modification_flag_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ref_pic_list_modification_flag_l1(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH264ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l1(segment, 0L, value); } + /// Sets `ref_pic_list_modification_flag_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfoFlags ref_pic_list_modification_flag_l1At(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH264ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l1(this.segment(), index, value); return this; } + /// Sets `ref_pic_list_modification_flag_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfoFlags ref_pic_list_modification_flag_l1(@CType("uint32_t : 1") int value) { StdVideoEncodeH264ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l1(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment) { return StdVideoEncodeH264ReferenceListsInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 30") int reservedAt(long index) { return StdVideoEncodeH264ReferenceListsInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 30") int reserved() { return StdVideoEncodeH264ReferenceListsInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 30") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 30") int value) { StdVideoEncodeH264ReferenceListsInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfoFlags reservedAt(long index, @CType("uint32_t : 30") int value) { StdVideoEncodeH264ReferenceListsInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264ReferenceListsInfoFlags reserved(@CType("uint32_t : 30") int value) { StdVideoEncodeH264ReferenceListsInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264SliceHeader.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264SliceHeader.java new file mode 100644 index 00000000..352fad7e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264SliceHeader.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### first_mb_in_slice +/// [VarHandle][#VH_first_mb_in_slice] - [Getter][#first_mb_in_slice()] - [Setter][#first_mb_in_slice(int)] +/// ### slice_type +/// [VarHandle][#VH_slice_type] - [Getter][#slice_type()] - [Setter][#slice_type(int)] +/// ### slice_alpha_c0_offset_div2 +/// [VarHandle][#VH_slice_alpha_c0_offset_div2] - [Getter][#slice_alpha_c0_offset_div2()] - [Setter][#slice_alpha_c0_offset_div2(byte)] +/// ### slice_beta_offset_div2 +/// [VarHandle][#VH_slice_beta_offset_div2] - [Getter][#slice_beta_offset_div2()] - [Setter][#slice_beta_offset_div2(byte)] +/// ### slice_qp_delta +/// [VarHandle][#VH_slice_qp_delta] - [Getter][#slice_qp_delta()] - [Setter][#slice_qp_delta(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### cabac_init_idc +/// [VarHandle][#VH_cabac_init_idc] - [Getter][#cabac_init_idc()] - [Setter][#cabac_init_idc(int)] +/// ### disable_deblocking_filter_idc +/// [VarHandle][#VH_disable_deblocking_filter_idc] - [Getter][#disable_deblocking_filter_idc()] - [Setter][#disable_deblocking_filter_idc(int)] +/// ### pWeightTable +/// [VarHandle][#VH_pWeightTable] - [Getter][#pWeightTable()] - [Setter][#pWeightTable(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264SliceHeader { +/// StdVideoEncodeH264SliceHeaderFlags flags; +/// uint32_t first_mb_in_slice; +/// StdVideoH264SliceType slice_type; +/// int8_t slice_alpha_c0_offset_div2; +/// int8_t slice_beta_offset_div2; +/// int8_t slice_qp_delta; +/// uint8_t reserved1; +/// StdVideoH264CabacInitIdc cabac_init_idc; +/// StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc; +/// const StdVideoEncodeH264WeightTable * pWeightTable; +/// } StdVideoEncodeH264SliceHeader; +/// ``` +public final class StdVideoEncodeH264SliceHeader extends Struct { + /// The struct layout of `StdVideoEncodeH264SliceHeader`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeH264SliceHeaderFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("first_mb_in_slice"), + ValueLayout.JAVA_INT.withName("slice_type"), + ValueLayout.JAVA_BYTE.withName("slice_alpha_c0_offset_div2"), + ValueLayout.JAVA_BYTE.withName("slice_beta_offset_div2"), + ValueLayout.JAVA_BYTE.withName("slice_qp_delta"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_INT.withName("cabac_init_idc"), + ValueLayout.JAVA_INT.withName("disable_deblocking_filter_idc"), + ValueLayout.ADDRESS.withName("pWeightTable") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `first_mb_in_slice` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_first_mb_in_slice = LAYOUT.arrayElementVarHandle(PathElement.groupElement("first_mb_in_slice")); + /// The [VarHandle] of `slice_type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_slice_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_type")); + /// The [VarHandle] of `slice_alpha_c0_offset_div2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_alpha_c0_offset_div2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_alpha_c0_offset_div2")); + /// The [VarHandle] of `slice_beta_offset_div2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_beta_offset_div2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_beta_offset_div2")); + /// The [VarHandle] of `slice_qp_delta` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_qp_delta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_qp_delta")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `cabac_init_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cabac_init_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cabac_init_idc")); + /// The [VarHandle] of `disable_deblocking_filter_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_disable_deblocking_filter_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("disable_deblocking_filter_idc")); + /// The [VarHandle] of `pWeightTable` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWeightTable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWeightTable")); + + /// Creates `StdVideoEncodeH264SliceHeader` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264SliceHeader(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264SliceHeader` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264SliceHeader of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264SliceHeader(segment); } + + /// Creates `StdVideoEncodeH264SliceHeader` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264SliceHeader ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264SliceHeader(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264SliceHeader` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264SliceHeader ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264SliceHeader(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264SliceHeader` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264SliceHeader` + public static StdVideoEncodeH264SliceHeader alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264SliceHeader(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264SliceHeader` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264SliceHeader` + public static StdVideoEncodeH264SliceHeader alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264SliceHeader(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeH264SliceHeaderFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeH264SliceHeaderFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeH264SliceHeader.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeH264SliceHeaderFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeH264SliceHeader.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeH264SliceHeaderFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeH264SliceHeader.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeH264SliceHeaderFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeH264SliceHeaderFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264SliceHeader.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader flagsAt(long index, @CType("StdVideoEncodeH264SliceHeaderFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264SliceHeader.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader flags(@CType("StdVideoEncodeH264SliceHeaderFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264SliceHeader.set_flags(this.segment(), value); return this; } + + /// {@return `first_mb_in_slice` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_first_mb_in_slice(MemorySegment segment, long index) { return (int) VH_first_mb_in_slice.get(segment, 0L, index); } + /// {@return `first_mb_in_slice`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_first_mb_in_slice(MemorySegment segment) { return StdVideoEncodeH264SliceHeader.get_first_mb_in_slice(segment, 0L); } + /// {@return `first_mb_in_slice` at the given index} + /// @param index the index + public @CType("uint32_t") int first_mb_in_sliceAt(long index) { return StdVideoEncodeH264SliceHeader.get_first_mb_in_slice(this.segment(), index); } + /// {@return `first_mb_in_slice`} + public @CType("uint32_t") int first_mb_in_slice() { return StdVideoEncodeH264SliceHeader.get_first_mb_in_slice(this.segment()); } + /// Sets `first_mb_in_slice` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_first_mb_in_slice(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_first_mb_in_slice.set(segment, 0L, index, value); } + /// Sets `first_mb_in_slice` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_first_mb_in_slice(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeH264SliceHeader.set_first_mb_in_slice(segment, 0L, value); } + /// Sets `first_mb_in_slice` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader first_mb_in_sliceAt(long index, @CType("uint32_t") int value) { StdVideoEncodeH264SliceHeader.set_first_mb_in_slice(this.segment(), index, value); return this; } + /// Sets `first_mb_in_slice` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader first_mb_in_slice(@CType("uint32_t") int value) { StdVideoEncodeH264SliceHeader.set_first_mb_in_slice(this.segment(), value); return this; } + + /// {@return `slice_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264SliceType") int get_slice_type(MemorySegment segment, long index) { return (int) VH_slice_type.get(segment, 0L, index); } + /// {@return `slice_type`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264SliceType") int get_slice_type(MemorySegment segment) { return StdVideoEncodeH264SliceHeader.get_slice_type(segment, 0L); } + /// {@return `slice_type` at the given index} + /// @param index the index + public @CType("StdVideoH264SliceType") int slice_typeAt(long index) { return StdVideoEncodeH264SliceHeader.get_slice_type(this.segment(), index); } + /// {@return `slice_type`} + public @CType("StdVideoH264SliceType") int slice_type() { return StdVideoEncodeH264SliceHeader.get_slice_type(this.segment()); } + /// Sets `slice_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_type(MemorySegment segment, long index, @CType("StdVideoH264SliceType") int value) { VH_slice_type.set(segment, 0L, index, value); } + /// Sets `slice_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_type(MemorySegment segment, @CType("StdVideoH264SliceType") int value) { StdVideoEncodeH264SliceHeader.set_slice_type(segment, 0L, value); } + /// Sets `slice_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader slice_typeAt(long index, @CType("StdVideoH264SliceType") int value) { StdVideoEncodeH264SliceHeader.set_slice_type(this.segment(), index, value); return this; } + /// Sets `slice_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader slice_type(@CType("StdVideoH264SliceType") int value) { StdVideoEncodeH264SliceHeader.set_slice_type(this.segment(), value); return this; } + + /// {@return `slice_alpha_c0_offset_div2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_alpha_c0_offset_div2(MemorySegment segment, long index) { return (byte) VH_slice_alpha_c0_offset_div2.get(segment, 0L, index); } + /// {@return `slice_alpha_c0_offset_div2`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_alpha_c0_offset_div2(MemorySegment segment) { return StdVideoEncodeH264SliceHeader.get_slice_alpha_c0_offset_div2(segment, 0L); } + /// {@return `slice_alpha_c0_offset_div2` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_alpha_c0_offset_div2At(long index) { return StdVideoEncodeH264SliceHeader.get_slice_alpha_c0_offset_div2(this.segment(), index); } + /// {@return `slice_alpha_c0_offset_div2`} + public @CType("int8_t") byte slice_alpha_c0_offset_div2() { return StdVideoEncodeH264SliceHeader.get_slice_alpha_c0_offset_div2(this.segment()); } + /// Sets `slice_alpha_c0_offset_div2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_alpha_c0_offset_div2(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_alpha_c0_offset_div2.set(segment, 0L, index, value); } + /// Sets `slice_alpha_c0_offset_div2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_alpha_c0_offset_div2(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH264SliceHeader.set_slice_alpha_c0_offset_div2(segment, 0L, value); } + /// Sets `slice_alpha_c0_offset_div2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader slice_alpha_c0_offset_div2At(long index, @CType("int8_t") byte value) { StdVideoEncodeH264SliceHeader.set_slice_alpha_c0_offset_div2(this.segment(), index, value); return this; } + /// Sets `slice_alpha_c0_offset_div2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader slice_alpha_c0_offset_div2(@CType("int8_t") byte value) { StdVideoEncodeH264SliceHeader.set_slice_alpha_c0_offset_div2(this.segment(), value); return this; } + + /// {@return `slice_beta_offset_div2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_beta_offset_div2(MemorySegment segment, long index) { return (byte) VH_slice_beta_offset_div2.get(segment, 0L, index); } + /// {@return `slice_beta_offset_div2`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_beta_offset_div2(MemorySegment segment) { return StdVideoEncodeH264SliceHeader.get_slice_beta_offset_div2(segment, 0L); } + /// {@return `slice_beta_offset_div2` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_beta_offset_div2At(long index) { return StdVideoEncodeH264SliceHeader.get_slice_beta_offset_div2(this.segment(), index); } + /// {@return `slice_beta_offset_div2`} + public @CType("int8_t") byte slice_beta_offset_div2() { return StdVideoEncodeH264SliceHeader.get_slice_beta_offset_div2(this.segment()); } + /// Sets `slice_beta_offset_div2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_beta_offset_div2(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_beta_offset_div2.set(segment, 0L, index, value); } + /// Sets `slice_beta_offset_div2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_beta_offset_div2(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH264SliceHeader.set_slice_beta_offset_div2(segment, 0L, value); } + /// Sets `slice_beta_offset_div2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader slice_beta_offset_div2At(long index, @CType("int8_t") byte value) { StdVideoEncodeH264SliceHeader.set_slice_beta_offset_div2(this.segment(), index, value); return this; } + /// Sets `slice_beta_offset_div2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader slice_beta_offset_div2(@CType("int8_t") byte value) { StdVideoEncodeH264SliceHeader.set_slice_beta_offset_div2(this.segment(), value); return this; } + + /// {@return `slice_qp_delta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_qp_delta(MemorySegment segment, long index) { return (byte) VH_slice_qp_delta.get(segment, 0L, index); } + /// {@return `slice_qp_delta`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_qp_delta(MemorySegment segment) { return StdVideoEncodeH264SliceHeader.get_slice_qp_delta(segment, 0L); } + /// {@return `slice_qp_delta` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_qp_deltaAt(long index) { return StdVideoEncodeH264SliceHeader.get_slice_qp_delta(this.segment(), index); } + /// {@return `slice_qp_delta`} + public @CType("int8_t") byte slice_qp_delta() { return StdVideoEncodeH264SliceHeader.get_slice_qp_delta(this.segment()); } + /// Sets `slice_qp_delta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_qp_delta(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_qp_delta.set(segment, 0L, index, value); } + /// Sets `slice_qp_delta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_qp_delta(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH264SliceHeader.set_slice_qp_delta(segment, 0L, value); } + /// Sets `slice_qp_delta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader slice_qp_deltaAt(long index, @CType("int8_t") byte value) { StdVideoEncodeH264SliceHeader.set_slice_qp_delta(this.segment(), index, value); return this; } + /// Sets `slice_qp_delta` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader slice_qp_delta(@CType("int8_t") byte value) { StdVideoEncodeH264SliceHeader.set_slice_qp_delta(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoEncodeH264SliceHeader.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoEncodeH264SliceHeader.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoEncodeH264SliceHeader.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264SliceHeader.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader reserved1At(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264SliceHeader.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader reserved1(@CType("uint8_t") byte value) { StdVideoEncodeH264SliceHeader.set_reserved1(this.segment(), value); return this; } + + /// {@return `cabac_init_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264CabacInitIdc") int get_cabac_init_idc(MemorySegment segment, long index) { return (int) VH_cabac_init_idc.get(segment, 0L, index); } + /// {@return `cabac_init_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264CabacInitIdc") int get_cabac_init_idc(MemorySegment segment) { return StdVideoEncodeH264SliceHeader.get_cabac_init_idc(segment, 0L); } + /// {@return `cabac_init_idc` at the given index} + /// @param index the index + public @CType("StdVideoH264CabacInitIdc") int cabac_init_idcAt(long index) { return StdVideoEncodeH264SliceHeader.get_cabac_init_idc(this.segment(), index); } + /// {@return `cabac_init_idc`} + public @CType("StdVideoH264CabacInitIdc") int cabac_init_idc() { return StdVideoEncodeH264SliceHeader.get_cabac_init_idc(this.segment()); } + /// Sets `cabac_init_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cabac_init_idc(MemorySegment segment, long index, @CType("StdVideoH264CabacInitIdc") int value) { VH_cabac_init_idc.set(segment, 0L, index, value); } + /// Sets `cabac_init_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cabac_init_idc(MemorySegment segment, @CType("StdVideoH264CabacInitIdc") int value) { StdVideoEncodeH264SliceHeader.set_cabac_init_idc(segment, 0L, value); } + /// Sets `cabac_init_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader cabac_init_idcAt(long index, @CType("StdVideoH264CabacInitIdc") int value) { StdVideoEncodeH264SliceHeader.set_cabac_init_idc(this.segment(), index, value); return this; } + /// Sets `cabac_init_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader cabac_init_idc(@CType("StdVideoH264CabacInitIdc") int value) { StdVideoEncodeH264SliceHeader.set_cabac_init_idc(this.segment(), value); return this; } + + /// {@return `disable_deblocking_filter_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264DisableDeblockingFilterIdc") int get_disable_deblocking_filter_idc(MemorySegment segment, long index) { return (int) VH_disable_deblocking_filter_idc.get(segment, 0L, index); } + /// {@return `disable_deblocking_filter_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264DisableDeblockingFilterIdc") int get_disable_deblocking_filter_idc(MemorySegment segment) { return StdVideoEncodeH264SliceHeader.get_disable_deblocking_filter_idc(segment, 0L); } + /// {@return `disable_deblocking_filter_idc` at the given index} + /// @param index the index + public @CType("StdVideoH264DisableDeblockingFilterIdc") int disable_deblocking_filter_idcAt(long index) { return StdVideoEncodeH264SliceHeader.get_disable_deblocking_filter_idc(this.segment(), index); } + /// {@return `disable_deblocking_filter_idc`} + public @CType("StdVideoH264DisableDeblockingFilterIdc") int disable_deblocking_filter_idc() { return StdVideoEncodeH264SliceHeader.get_disable_deblocking_filter_idc(this.segment()); } + /// Sets `disable_deblocking_filter_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_disable_deblocking_filter_idc(MemorySegment segment, long index, @CType("StdVideoH264DisableDeblockingFilterIdc") int value) { VH_disable_deblocking_filter_idc.set(segment, 0L, index, value); } + /// Sets `disable_deblocking_filter_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_disable_deblocking_filter_idc(MemorySegment segment, @CType("StdVideoH264DisableDeblockingFilterIdc") int value) { StdVideoEncodeH264SliceHeader.set_disable_deblocking_filter_idc(segment, 0L, value); } + /// Sets `disable_deblocking_filter_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader disable_deblocking_filter_idcAt(long index, @CType("StdVideoH264DisableDeblockingFilterIdc") int value) { StdVideoEncodeH264SliceHeader.set_disable_deblocking_filter_idc(this.segment(), index, value); return this; } + /// Sets `disable_deblocking_filter_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader disable_deblocking_filter_idc(@CType("StdVideoH264DisableDeblockingFilterIdc") int value) { StdVideoEncodeH264SliceHeader.set_disable_deblocking_filter_idc(this.segment(), value); return this; } + + /// {@return `pWeightTable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH264WeightTable *") java.lang.foreign.MemorySegment get_pWeightTable(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWeightTable.get(segment, 0L, index); } + /// {@return `pWeightTable`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH264WeightTable *") java.lang.foreign.MemorySegment get_pWeightTable(MemorySegment segment) { return StdVideoEncodeH264SliceHeader.get_pWeightTable(segment, 0L); } + /// {@return `pWeightTable` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH264WeightTable *") java.lang.foreign.MemorySegment pWeightTableAt(long index) { return StdVideoEncodeH264SliceHeader.get_pWeightTable(this.segment(), index); } + /// {@return `pWeightTable`} + public @CType("const StdVideoEncodeH264WeightTable *") java.lang.foreign.MemorySegment pWeightTable() { return StdVideoEncodeH264SliceHeader.get_pWeightTable(this.segment()); } + /// Sets `pWeightTable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWeightTable(MemorySegment segment, long index, @CType("const StdVideoEncodeH264WeightTable *") java.lang.foreign.MemorySegment value) { VH_pWeightTable.set(segment, 0L, index, value); } + /// Sets `pWeightTable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWeightTable(MemorySegment segment, @CType("const StdVideoEncodeH264WeightTable *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264SliceHeader.set_pWeightTable(segment, 0L, value); } + /// Sets `pWeightTable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader pWeightTableAt(long index, @CType("const StdVideoEncodeH264WeightTable *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264SliceHeader.set_pWeightTable(this.segment(), index, value); return this; } + /// Sets `pWeightTable` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeader pWeightTable(@CType("const StdVideoEncodeH264WeightTable *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264SliceHeader.set_pWeightTable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264SliceHeaderFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264SliceHeaderFlags.java new file mode 100644 index 00000000..eaa1191e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264SliceHeaderFlags.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### direct_spatial_mv_pred_flag +/// [VarHandle][#VH_direct_spatial_mv_pred_flag] - [Getter][#direct_spatial_mv_pred_flag()] - [Setter][#direct_spatial_mv_pred_flag(int)] +/// ### num_ref_idx_active_override_flag +/// [VarHandle][#VH_num_ref_idx_active_override_flag] - [Getter][#num_ref_idx_active_override_flag()] - [Setter][#num_ref_idx_active_override_flag(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264SliceHeaderFlags { +/// uint32_t : 1 direct_spatial_mv_pred_flag; +/// uint32_t : 1 num_ref_idx_active_override_flag; +/// uint32_t : 30 reserved; +/// } StdVideoEncodeH264SliceHeaderFlags; +/// ``` +public final class StdVideoEncodeH264SliceHeaderFlags extends Struct { + /// The struct layout of `StdVideoEncodeH264SliceHeaderFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("direct_spatial_mv_pred_flag"), + ValueLayout.JAVA_INT.withName("num_ref_idx_active_override_flag"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `direct_spatial_mv_pred_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_direct_spatial_mv_pred_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("direct_spatial_mv_pred_flag")); + /// The [VarHandle] of `num_ref_idx_active_override_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_num_ref_idx_active_override_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_idx_active_override_flag")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeH264SliceHeaderFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264SliceHeaderFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264SliceHeaderFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264SliceHeaderFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264SliceHeaderFlags(segment); } + + /// Creates `StdVideoEncodeH264SliceHeaderFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264SliceHeaderFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264SliceHeaderFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264SliceHeaderFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264SliceHeaderFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264SliceHeaderFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264SliceHeaderFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264SliceHeaderFlags` + public static StdVideoEncodeH264SliceHeaderFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264SliceHeaderFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264SliceHeaderFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264SliceHeaderFlags` + public static StdVideoEncodeH264SliceHeaderFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264SliceHeaderFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `direct_spatial_mv_pred_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_direct_spatial_mv_pred_flag(MemorySegment segment, long index) { return (int) VH_direct_spatial_mv_pred_flag.get(segment, 0L, index); } + /// {@return `direct_spatial_mv_pred_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_direct_spatial_mv_pred_flag(MemorySegment segment) { return StdVideoEncodeH264SliceHeaderFlags.get_direct_spatial_mv_pred_flag(segment, 0L); } + /// {@return `direct_spatial_mv_pred_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int direct_spatial_mv_pred_flagAt(long index) { return StdVideoEncodeH264SliceHeaderFlags.get_direct_spatial_mv_pred_flag(this.segment(), index); } + /// {@return `direct_spatial_mv_pred_flag`} + public @CType("uint32_t : 1") int direct_spatial_mv_pred_flag() { return StdVideoEncodeH264SliceHeaderFlags.get_direct_spatial_mv_pred_flag(this.segment()); } + /// Sets `direct_spatial_mv_pred_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_direct_spatial_mv_pred_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_direct_spatial_mv_pred_flag.set(segment, 0L, index, value); } + /// Sets `direct_spatial_mv_pred_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_direct_spatial_mv_pred_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH264SliceHeaderFlags.set_direct_spatial_mv_pred_flag(segment, 0L, value); } + /// Sets `direct_spatial_mv_pred_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeaderFlags direct_spatial_mv_pred_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH264SliceHeaderFlags.set_direct_spatial_mv_pred_flag(this.segment(), index, value); return this; } + /// Sets `direct_spatial_mv_pred_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeaderFlags direct_spatial_mv_pred_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH264SliceHeaderFlags.set_direct_spatial_mv_pred_flag(this.segment(), value); return this; } + + /// {@return `num_ref_idx_active_override_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_num_ref_idx_active_override_flag(MemorySegment segment, long index) { return (int) VH_num_ref_idx_active_override_flag.get(segment, 0L, index); } + /// {@return `num_ref_idx_active_override_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_num_ref_idx_active_override_flag(MemorySegment segment) { return StdVideoEncodeH264SliceHeaderFlags.get_num_ref_idx_active_override_flag(segment, 0L); } + /// {@return `num_ref_idx_active_override_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int num_ref_idx_active_override_flagAt(long index) { return StdVideoEncodeH264SliceHeaderFlags.get_num_ref_idx_active_override_flag(this.segment(), index); } + /// {@return `num_ref_idx_active_override_flag`} + public @CType("uint32_t : 1") int num_ref_idx_active_override_flag() { return StdVideoEncodeH264SliceHeaderFlags.get_num_ref_idx_active_override_flag(this.segment()); } + /// Sets `num_ref_idx_active_override_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_idx_active_override_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_num_ref_idx_active_override_flag.set(segment, 0L, index, value); } + /// Sets `num_ref_idx_active_override_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_idx_active_override_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH264SliceHeaderFlags.set_num_ref_idx_active_override_flag(segment, 0L, value); } + /// Sets `num_ref_idx_active_override_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeaderFlags num_ref_idx_active_override_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH264SliceHeaderFlags.set_num_ref_idx_active_override_flag(this.segment(), index, value); return this; } + /// Sets `num_ref_idx_active_override_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeaderFlags num_ref_idx_active_override_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH264SliceHeaderFlags.set_num_ref_idx_active_override_flag(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment) { return StdVideoEncodeH264SliceHeaderFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 30") int reservedAt(long index) { return StdVideoEncodeH264SliceHeaderFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 30") int reserved() { return StdVideoEncodeH264SliceHeaderFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 30") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 30") int value) { StdVideoEncodeH264SliceHeaderFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeaderFlags reservedAt(long index, @CType("uint32_t : 30") int value) { StdVideoEncodeH264SliceHeaderFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264SliceHeaderFlags reserved(@CType("uint32_t : 30") int value) { StdVideoEncodeH264SliceHeaderFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264WeightTable.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264WeightTable.java new file mode 100644 index 00000000..1d94c59f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264WeightTable.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### luma_log2_weight_denom +/// [VarHandle][#VH_luma_log2_weight_denom] - [Getter][#luma_log2_weight_denom()] - [Setter][#luma_log2_weight_denom(byte)] +/// ### chroma_log2_weight_denom +/// [VarHandle][#VH_chroma_log2_weight_denom] - [Getter][#chroma_log2_weight_denom()] - [Setter][#chroma_log2_weight_denom(byte)] +/// ### luma_weight_l0 +/// [VarHandle][#VH_luma_weight_l0] - [Getter][#luma_weight_l0()] - [Setter][#luma_weight_l0(byte)] +/// ### luma_offset_l0 +/// [VarHandle][#VH_luma_offset_l0] - [Getter][#luma_offset_l0()] - [Setter][#luma_offset_l0(byte)] +/// ### chroma_weight_l0 +/// [VarHandle][#VH_chroma_weight_l0] - [Getter][#chroma_weight_l0()] - [Setter][#chroma_weight_l0(byte)] +/// ### chroma_offset_l0 +/// [VarHandle][#VH_chroma_offset_l0] - [Getter][#chroma_offset_l0()] - [Setter][#chroma_offset_l0(byte)] +/// ### luma_weight_l1 +/// [VarHandle][#VH_luma_weight_l1] - [Getter][#luma_weight_l1()] - [Setter][#luma_weight_l1(byte)] +/// ### luma_offset_l1 +/// [VarHandle][#VH_luma_offset_l1] - [Getter][#luma_offset_l1()] - [Setter][#luma_offset_l1(byte)] +/// ### chroma_weight_l1 +/// [VarHandle][#VH_chroma_weight_l1] - [Getter][#chroma_weight_l1()] - [Setter][#chroma_weight_l1(byte)] +/// ### chroma_offset_l1 +/// [VarHandle][#VH_chroma_offset_l1] - [Getter][#chroma_offset_l1()] - [Setter][#chroma_offset_l1(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264WeightTable { +/// StdVideoEncodeH264WeightTableFlags flags; +/// uint8_t luma_log2_weight_denom; +/// uint8_t chroma_log2_weight_denom; +/// int8_t [ ] luma_weight_l0; +/// int8_t [ ] luma_offset_l0; +/// int8_t [ ][ ] chroma_weight_l0; +/// int8_t [ ][ ] chroma_offset_l0; +/// int8_t [ ] luma_weight_l1; +/// int8_t [ ] luma_offset_l1; +/// int8_t [ ][ ] chroma_weight_l1; +/// int8_t [ ][ ] chroma_offset_l1; +/// } StdVideoEncodeH264WeightTable; +/// ``` +public final class StdVideoEncodeH264WeightTable extends Struct { + /// The struct layout of `StdVideoEncodeH264WeightTable`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeH264WeightTableFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("luma_log2_weight_denom"), + ValueLayout.JAVA_BYTE.withName("chroma_log2_weight_denom"), + ValueLayout.JAVA_BYTE.withName("luma_weight_l0"), + ValueLayout.JAVA_BYTE.withName("luma_offset_l0"), + ValueLayout.JAVA_BYTE.withName("chroma_weight_l0"), + ValueLayout.JAVA_BYTE.withName("chroma_offset_l0"), + ValueLayout.JAVA_BYTE.withName("luma_weight_l1"), + ValueLayout.JAVA_BYTE.withName("luma_offset_l1"), + ValueLayout.JAVA_BYTE.withName("chroma_weight_l1"), + ValueLayout.JAVA_BYTE.withName("chroma_offset_l1") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `luma_log2_weight_denom` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_luma_log2_weight_denom = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_log2_weight_denom")); + /// The [VarHandle] of `chroma_log2_weight_denom` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_log2_weight_denom = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_log2_weight_denom")); + /// The [VarHandle] of `luma_weight_l0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_luma_weight_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_weight_l0")); + /// The [VarHandle] of `luma_offset_l0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_luma_offset_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_offset_l0")); + /// The [VarHandle] of `chroma_weight_l0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_weight_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_weight_l0")); + /// The [VarHandle] of `chroma_offset_l0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_offset_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_offset_l0")); + /// The [VarHandle] of `luma_weight_l1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_luma_weight_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_weight_l1")); + /// The [VarHandle] of `luma_offset_l1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_luma_offset_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_offset_l1")); + /// The [VarHandle] of `chroma_weight_l1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_weight_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_weight_l1")); + /// The [VarHandle] of `chroma_offset_l1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_offset_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_offset_l1")); + + /// Creates `StdVideoEncodeH264WeightTable` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264WeightTable(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264WeightTable` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264WeightTable of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264WeightTable(segment); } + + /// Creates `StdVideoEncodeH264WeightTable` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264WeightTable ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264WeightTable(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264WeightTable` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264WeightTable ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264WeightTable(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264WeightTable` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264WeightTable` + public static StdVideoEncodeH264WeightTable alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264WeightTable(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264WeightTable` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264WeightTable` + public static StdVideoEncodeH264WeightTable alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264WeightTable(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeH264WeightTableFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeH264WeightTableFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeH264WeightTableFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeH264WeightTable.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeH264WeightTableFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeH264WeightTable.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeH264WeightTableFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeH264WeightTableFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264WeightTable.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable flagsAt(long index, @CType("StdVideoEncodeH264WeightTableFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264WeightTable.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable flags(@CType("StdVideoEncodeH264WeightTableFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH264WeightTable.set_flags(this.segment(), value); return this; } + + /// {@return `luma_log2_weight_denom` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_luma_log2_weight_denom(MemorySegment segment, long index) { return (byte) VH_luma_log2_weight_denom.get(segment, 0L, index); } + /// {@return `luma_log2_weight_denom`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_luma_log2_weight_denom(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_luma_log2_weight_denom(segment, 0L); } + /// {@return `luma_log2_weight_denom` at the given index} + /// @param index the index + public @CType("uint8_t") byte luma_log2_weight_denomAt(long index) { return StdVideoEncodeH264WeightTable.get_luma_log2_weight_denom(this.segment(), index); } + /// {@return `luma_log2_weight_denom`} + public @CType("uint8_t") byte luma_log2_weight_denom() { return StdVideoEncodeH264WeightTable.get_luma_log2_weight_denom(this.segment()); } + /// Sets `luma_log2_weight_denom` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_log2_weight_denom(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_luma_log2_weight_denom.set(segment, 0L, index, value); } + /// Sets `luma_log2_weight_denom` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_log2_weight_denom(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264WeightTable.set_luma_log2_weight_denom(segment, 0L, value); } + /// Sets `luma_log2_weight_denom` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable luma_log2_weight_denomAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264WeightTable.set_luma_log2_weight_denom(this.segment(), index, value); return this; } + /// Sets `luma_log2_weight_denom` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable luma_log2_weight_denom(@CType("uint8_t") byte value) { StdVideoEncodeH264WeightTable.set_luma_log2_weight_denom(this.segment(), value); return this; } + + /// {@return `chroma_log2_weight_denom` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_chroma_log2_weight_denom(MemorySegment segment, long index) { return (byte) VH_chroma_log2_weight_denom.get(segment, 0L, index); } + /// {@return `chroma_log2_weight_denom`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_chroma_log2_weight_denom(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_chroma_log2_weight_denom(segment, 0L); } + /// {@return `chroma_log2_weight_denom` at the given index} + /// @param index the index + public @CType("uint8_t") byte chroma_log2_weight_denomAt(long index) { return StdVideoEncodeH264WeightTable.get_chroma_log2_weight_denom(this.segment(), index); } + /// {@return `chroma_log2_weight_denom`} + public @CType("uint8_t") byte chroma_log2_weight_denom() { return StdVideoEncodeH264WeightTable.get_chroma_log2_weight_denom(this.segment()); } + /// Sets `chroma_log2_weight_denom` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_log2_weight_denom(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_chroma_log2_weight_denom.set(segment, 0L, index, value); } + /// Sets `chroma_log2_weight_denom` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_log2_weight_denom(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH264WeightTable.set_chroma_log2_weight_denom(segment, 0L, value); } + /// Sets `chroma_log2_weight_denom` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable chroma_log2_weight_denomAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH264WeightTable.set_chroma_log2_weight_denom(this.segment(), index, value); return this; } + /// Sets `chroma_log2_weight_denom` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable chroma_log2_weight_denom(@CType("uint8_t") byte value) { StdVideoEncodeH264WeightTable.set_chroma_log2_weight_denom(this.segment(), value); return this; } + + /// {@return `luma_weight_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_luma_weight_l0(MemorySegment segment, long index) { return (byte) VH_luma_weight_l0.get(segment, 0L, index); } + /// {@return `luma_weight_l0`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_luma_weight_l0(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_luma_weight_l0(segment, 0L); } + /// {@return `luma_weight_l0` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte luma_weight_l0At(long index) { return StdVideoEncodeH264WeightTable.get_luma_weight_l0(this.segment(), index); } + /// {@return `luma_weight_l0`} + public @CType("int8_t [ ]") byte luma_weight_l0() { return StdVideoEncodeH264WeightTable.get_luma_weight_l0(this.segment()); } + /// Sets `luma_weight_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_weight_l0(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_luma_weight_l0.set(segment, 0L, index, value); } + /// Sets `luma_weight_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_weight_l0(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_weight_l0(segment, 0L, value); } + /// Sets `luma_weight_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable luma_weight_l0At(long index, @CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_weight_l0(this.segment(), index, value); return this; } + /// Sets `luma_weight_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable luma_weight_l0(@CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_weight_l0(this.segment(), value); return this; } + + /// {@return `luma_offset_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_luma_offset_l0(MemorySegment segment, long index) { return (byte) VH_luma_offset_l0.get(segment, 0L, index); } + /// {@return `luma_offset_l0`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_luma_offset_l0(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_luma_offset_l0(segment, 0L); } + /// {@return `luma_offset_l0` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte luma_offset_l0At(long index) { return StdVideoEncodeH264WeightTable.get_luma_offset_l0(this.segment(), index); } + /// {@return `luma_offset_l0`} + public @CType("int8_t [ ]") byte luma_offset_l0() { return StdVideoEncodeH264WeightTable.get_luma_offset_l0(this.segment()); } + /// Sets `luma_offset_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_offset_l0(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_luma_offset_l0.set(segment, 0L, index, value); } + /// Sets `luma_offset_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_offset_l0(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_offset_l0(segment, 0L, value); } + /// Sets `luma_offset_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable luma_offset_l0At(long index, @CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_offset_l0(this.segment(), index, value); return this; } + /// Sets `luma_offset_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable luma_offset_l0(@CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_offset_l0(this.segment(), value); return this; } + + /// {@return `chroma_weight_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ][ ]") byte get_chroma_weight_l0(MemorySegment segment, long index) { return (byte) VH_chroma_weight_l0.get(segment, 0L, index); } + /// {@return `chroma_weight_l0`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ][ ]") byte get_chroma_weight_l0(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_chroma_weight_l0(segment, 0L); } + /// {@return `chroma_weight_l0` at the given index} + /// @param index the index + public @CType("int8_t [ ][ ]") byte chroma_weight_l0At(long index) { return StdVideoEncodeH264WeightTable.get_chroma_weight_l0(this.segment(), index); } + /// {@return `chroma_weight_l0`} + public @CType("int8_t [ ][ ]") byte chroma_weight_l0() { return StdVideoEncodeH264WeightTable.get_chroma_weight_l0(this.segment()); } + /// Sets `chroma_weight_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_weight_l0(MemorySegment segment, long index, @CType("int8_t [ ][ ]") byte value) { VH_chroma_weight_l0.set(segment, 0L, index, value); } + /// Sets `chroma_weight_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_weight_l0(MemorySegment segment, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_weight_l0(segment, 0L, value); } + /// Sets `chroma_weight_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable chroma_weight_l0At(long index, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_weight_l0(this.segment(), index, value); return this; } + /// Sets `chroma_weight_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable chroma_weight_l0(@CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_weight_l0(this.segment(), value); return this; } + + /// {@return `chroma_offset_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ][ ]") byte get_chroma_offset_l0(MemorySegment segment, long index) { return (byte) VH_chroma_offset_l0.get(segment, 0L, index); } + /// {@return `chroma_offset_l0`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ][ ]") byte get_chroma_offset_l0(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_chroma_offset_l0(segment, 0L); } + /// {@return `chroma_offset_l0` at the given index} + /// @param index the index + public @CType("int8_t [ ][ ]") byte chroma_offset_l0At(long index) { return StdVideoEncodeH264WeightTable.get_chroma_offset_l0(this.segment(), index); } + /// {@return `chroma_offset_l0`} + public @CType("int8_t [ ][ ]") byte chroma_offset_l0() { return StdVideoEncodeH264WeightTable.get_chroma_offset_l0(this.segment()); } + /// Sets `chroma_offset_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_offset_l0(MemorySegment segment, long index, @CType("int8_t [ ][ ]") byte value) { VH_chroma_offset_l0.set(segment, 0L, index, value); } + /// Sets `chroma_offset_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_offset_l0(MemorySegment segment, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_offset_l0(segment, 0L, value); } + /// Sets `chroma_offset_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable chroma_offset_l0At(long index, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_offset_l0(this.segment(), index, value); return this; } + /// Sets `chroma_offset_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable chroma_offset_l0(@CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_offset_l0(this.segment(), value); return this; } + + /// {@return `luma_weight_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_luma_weight_l1(MemorySegment segment, long index) { return (byte) VH_luma_weight_l1.get(segment, 0L, index); } + /// {@return `luma_weight_l1`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_luma_weight_l1(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_luma_weight_l1(segment, 0L); } + /// {@return `luma_weight_l1` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte luma_weight_l1At(long index) { return StdVideoEncodeH264WeightTable.get_luma_weight_l1(this.segment(), index); } + /// {@return `luma_weight_l1`} + public @CType("int8_t [ ]") byte luma_weight_l1() { return StdVideoEncodeH264WeightTable.get_luma_weight_l1(this.segment()); } + /// Sets `luma_weight_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_weight_l1(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_luma_weight_l1.set(segment, 0L, index, value); } + /// Sets `luma_weight_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_weight_l1(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_weight_l1(segment, 0L, value); } + /// Sets `luma_weight_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable luma_weight_l1At(long index, @CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_weight_l1(this.segment(), index, value); return this; } + /// Sets `luma_weight_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable luma_weight_l1(@CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_weight_l1(this.segment(), value); return this; } + + /// {@return `luma_offset_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_luma_offset_l1(MemorySegment segment, long index) { return (byte) VH_luma_offset_l1.get(segment, 0L, index); } + /// {@return `luma_offset_l1`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_luma_offset_l1(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_luma_offset_l1(segment, 0L); } + /// {@return `luma_offset_l1` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte luma_offset_l1At(long index) { return StdVideoEncodeH264WeightTable.get_luma_offset_l1(this.segment(), index); } + /// {@return `luma_offset_l1`} + public @CType("int8_t [ ]") byte luma_offset_l1() { return StdVideoEncodeH264WeightTable.get_luma_offset_l1(this.segment()); } + /// Sets `luma_offset_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_offset_l1(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_luma_offset_l1.set(segment, 0L, index, value); } + /// Sets `luma_offset_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_offset_l1(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_offset_l1(segment, 0L, value); } + /// Sets `luma_offset_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable luma_offset_l1At(long index, @CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_offset_l1(this.segment(), index, value); return this; } + /// Sets `luma_offset_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable luma_offset_l1(@CType("int8_t [ ]") byte value) { StdVideoEncodeH264WeightTable.set_luma_offset_l1(this.segment(), value); return this; } + + /// {@return `chroma_weight_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ][ ]") byte get_chroma_weight_l1(MemorySegment segment, long index) { return (byte) VH_chroma_weight_l1.get(segment, 0L, index); } + /// {@return `chroma_weight_l1`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ][ ]") byte get_chroma_weight_l1(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_chroma_weight_l1(segment, 0L); } + /// {@return `chroma_weight_l1` at the given index} + /// @param index the index + public @CType("int8_t [ ][ ]") byte chroma_weight_l1At(long index) { return StdVideoEncodeH264WeightTable.get_chroma_weight_l1(this.segment(), index); } + /// {@return `chroma_weight_l1`} + public @CType("int8_t [ ][ ]") byte chroma_weight_l1() { return StdVideoEncodeH264WeightTable.get_chroma_weight_l1(this.segment()); } + /// Sets `chroma_weight_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_weight_l1(MemorySegment segment, long index, @CType("int8_t [ ][ ]") byte value) { VH_chroma_weight_l1.set(segment, 0L, index, value); } + /// Sets `chroma_weight_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_weight_l1(MemorySegment segment, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_weight_l1(segment, 0L, value); } + /// Sets `chroma_weight_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable chroma_weight_l1At(long index, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_weight_l1(this.segment(), index, value); return this; } + /// Sets `chroma_weight_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable chroma_weight_l1(@CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_weight_l1(this.segment(), value); return this; } + + /// {@return `chroma_offset_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ][ ]") byte get_chroma_offset_l1(MemorySegment segment, long index) { return (byte) VH_chroma_offset_l1.get(segment, 0L, index); } + /// {@return `chroma_offset_l1`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ][ ]") byte get_chroma_offset_l1(MemorySegment segment) { return StdVideoEncodeH264WeightTable.get_chroma_offset_l1(segment, 0L); } + /// {@return `chroma_offset_l1` at the given index} + /// @param index the index + public @CType("int8_t [ ][ ]") byte chroma_offset_l1At(long index) { return StdVideoEncodeH264WeightTable.get_chroma_offset_l1(this.segment(), index); } + /// {@return `chroma_offset_l1`} + public @CType("int8_t [ ][ ]") byte chroma_offset_l1() { return StdVideoEncodeH264WeightTable.get_chroma_offset_l1(this.segment()); } + /// Sets `chroma_offset_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_offset_l1(MemorySegment segment, long index, @CType("int8_t [ ][ ]") byte value) { VH_chroma_offset_l1.set(segment, 0L, index, value); } + /// Sets `chroma_offset_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_offset_l1(MemorySegment segment, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_offset_l1(segment, 0L, value); } + /// Sets `chroma_offset_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable chroma_offset_l1At(long index, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_offset_l1(this.segment(), index, value); return this; } + /// Sets `chroma_offset_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTable chroma_offset_l1(@CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH264WeightTable.set_chroma_offset_l1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264WeightTableFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264WeightTableFlags.java new file mode 100644 index 00000000..11dc49df --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH264WeightTableFlags.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### luma_weight_l0_flag +/// [VarHandle][#VH_luma_weight_l0_flag] - [Getter][#luma_weight_l0_flag()] - [Setter][#luma_weight_l0_flag(int)] +/// ### chroma_weight_l0_flag +/// [VarHandle][#VH_chroma_weight_l0_flag] - [Getter][#chroma_weight_l0_flag()] - [Setter][#chroma_weight_l0_flag(int)] +/// ### luma_weight_l1_flag +/// [VarHandle][#VH_luma_weight_l1_flag] - [Getter][#luma_weight_l1_flag()] - [Setter][#luma_weight_l1_flag(int)] +/// ### chroma_weight_l1_flag +/// [VarHandle][#VH_chroma_weight_l1_flag] - [Getter][#chroma_weight_l1_flag()] - [Setter][#chroma_weight_l1_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH264WeightTableFlags { +/// uint32_t luma_weight_l0_flag; +/// uint32_t chroma_weight_l0_flag; +/// uint32_t luma_weight_l1_flag; +/// uint32_t chroma_weight_l1_flag; +/// } StdVideoEncodeH264WeightTableFlags; +/// ``` +public final class StdVideoEncodeH264WeightTableFlags extends Struct { + /// The struct layout of `StdVideoEncodeH264WeightTableFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("luma_weight_l0_flag"), + ValueLayout.JAVA_INT.withName("chroma_weight_l0_flag"), + ValueLayout.JAVA_INT.withName("luma_weight_l1_flag"), + ValueLayout.JAVA_INT.withName("chroma_weight_l1_flag") + ); + /// The [VarHandle] of `luma_weight_l0_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_luma_weight_l0_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_weight_l0_flag")); + /// The [VarHandle] of `chroma_weight_l0_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chroma_weight_l0_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_weight_l0_flag")); + /// The [VarHandle] of `luma_weight_l1_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_luma_weight_l1_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_weight_l1_flag")); + /// The [VarHandle] of `chroma_weight_l1_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chroma_weight_l1_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_weight_l1_flag")); + + /// Creates `StdVideoEncodeH264WeightTableFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH264WeightTableFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH264WeightTableFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264WeightTableFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264WeightTableFlags(segment); } + + /// Creates `StdVideoEncodeH264WeightTableFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264WeightTableFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264WeightTableFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH264WeightTableFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH264WeightTableFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH264WeightTableFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH264WeightTableFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH264WeightTableFlags` + public static StdVideoEncodeH264WeightTableFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeH264WeightTableFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH264WeightTableFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH264WeightTableFlags` + public static StdVideoEncodeH264WeightTableFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH264WeightTableFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `luma_weight_l0_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_luma_weight_l0_flag(MemorySegment segment, long index) { return (int) VH_luma_weight_l0_flag.get(segment, 0L, index); } + /// {@return `luma_weight_l0_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_luma_weight_l0_flag(MemorySegment segment) { return StdVideoEncodeH264WeightTableFlags.get_luma_weight_l0_flag(segment, 0L); } + /// {@return `luma_weight_l0_flag` at the given index} + /// @param index the index + public @CType("uint32_t") int luma_weight_l0_flagAt(long index) { return StdVideoEncodeH264WeightTableFlags.get_luma_weight_l0_flag(this.segment(), index); } + /// {@return `luma_weight_l0_flag`} + public @CType("uint32_t") int luma_weight_l0_flag() { return StdVideoEncodeH264WeightTableFlags.get_luma_weight_l0_flag(this.segment()); } + /// Sets `luma_weight_l0_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_weight_l0_flag(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_luma_weight_l0_flag.set(segment, 0L, index, value); } + /// Sets `luma_weight_l0_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_weight_l0_flag(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_luma_weight_l0_flag(segment, 0L, value); } + /// Sets `luma_weight_l0_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTableFlags luma_weight_l0_flagAt(long index, @CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_luma_weight_l0_flag(this.segment(), index, value); return this; } + /// Sets `luma_weight_l0_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTableFlags luma_weight_l0_flag(@CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_luma_weight_l0_flag(this.segment(), value); return this; } + + /// {@return `chroma_weight_l0_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_chroma_weight_l0_flag(MemorySegment segment, long index) { return (int) VH_chroma_weight_l0_flag.get(segment, 0L, index); } + /// {@return `chroma_weight_l0_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_chroma_weight_l0_flag(MemorySegment segment) { return StdVideoEncodeH264WeightTableFlags.get_chroma_weight_l0_flag(segment, 0L); } + /// {@return `chroma_weight_l0_flag` at the given index} + /// @param index the index + public @CType("uint32_t") int chroma_weight_l0_flagAt(long index) { return StdVideoEncodeH264WeightTableFlags.get_chroma_weight_l0_flag(this.segment(), index); } + /// {@return `chroma_weight_l0_flag`} + public @CType("uint32_t") int chroma_weight_l0_flag() { return StdVideoEncodeH264WeightTableFlags.get_chroma_weight_l0_flag(this.segment()); } + /// Sets `chroma_weight_l0_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_weight_l0_flag(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_chroma_weight_l0_flag.set(segment, 0L, index, value); } + /// Sets `chroma_weight_l0_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_weight_l0_flag(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_chroma_weight_l0_flag(segment, 0L, value); } + /// Sets `chroma_weight_l0_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTableFlags chroma_weight_l0_flagAt(long index, @CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_chroma_weight_l0_flag(this.segment(), index, value); return this; } + /// Sets `chroma_weight_l0_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTableFlags chroma_weight_l0_flag(@CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_chroma_weight_l0_flag(this.segment(), value); return this; } + + /// {@return `luma_weight_l1_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_luma_weight_l1_flag(MemorySegment segment, long index) { return (int) VH_luma_weight_l1_flag.get(segment, 0L, index); } + /// {@return `luma_weight_l1_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_luma_weight_l1_flag(MemorySegment segment) { return StdVideoEncodeH264WeightTableFlags.get_luma_weight_l1_flag(segment, 0L); } + /// {@return `luma_weight_l1_flag` at the given index} + /// @param index the index + public @CType("uint32_t") int luma_weight_l1_flagAt(long index) { return StdVideoEncodeH264WeightTableFlags.get_luma_weight_l1_flag(this.segment(), index); } + /// {@return `luma_weight_l1_flag`} + public @CType("uint32_t") int luma_weight_l1_flag() { return StdVideoEncodeH264WeightTableFlags.get_luma_weight_l1_flag(this.segment()); } + /// Sets `luma_weight_l1_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_weight_l1_flag(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_luma_weight_l1_flag.set(segment, 0L, index, value); } + /// Sets `luma_weight_l1_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_weight_l1_flag(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_luma_weight_l1_flag(segment, 0L, value); } + /// Sets `luma_weight_l1_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTableFlags luma_weight_l1_flagAt(long index, @CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_luma_weight_l1_flag(this.segment(), index, value); return this; } + /// Sets `luma_weight_l1_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTableFlags luma_weight_l1_flag(@CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_luma_weight_l1_flag(this.segment(), value); return this; } + + /// {@return `chroma_weight_l1_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_chroma_weight_l1_flag(MemorySegment segment, long index) { return (int) VH_chroma_weight_l1_flag.get(segment, 0L, index); } + /// {@return `chroma_weight_l1_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_chroma_weight_l1_flag(MemorySegment segment) { return StdVideoEncodeH264WeightTableFlags.get_chroma_weight_l1_flag(segment, 0L); } + /// {@return `chroma_weight_l1_flag` at the given index} + /// @param index the index + public @CType("uint32_t") int chroma_weight_l1_flagAt(long index) { return StdVideoEncodeH264WeightTableFlags.get_chroma_weight_l1_flag(this.segment(), index); } + /// {@return `chroma_weight_l1_flag`} + public @CType("uint32_t") int chroma_weight_l1_flag() { return StdVideoEncodeH264WeightTableFlags.get_chroma_weight_l1_flag(this.segment()); } + /// Sets `chroma_weight_l1_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_weight_l1_flag(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_chroma_weight_l1_flag.set(segment, 0L, index, value); } + /// Sets `chroma_weight_l1_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_weight_l1_flag(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_chroma_weight_l1_flag(segment, 0L, value); } + /// Sets `chroma_weight_l1_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTableFlags chroma_weight_l1_flagAt(long index, @CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_chroma_weight_l1_flag(this.segment(), index, value); return this; } + /// Sets `chroma_weight_l1_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH264WeightTableFlags chroma_weight_l1_flag(@CType("uint32_t") int value) { StdVideoEncodeH264WeightTableFlags.set_chroma_weight_l1_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265LongTermRefPics.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265LongTermRefPics.java new file mode 100644 index 00000000..26cead2d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265LongTermRefPics.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### num_long_term_sps +/// [VarHandle][#VH_num_long_term_sps] - [Getter][#num_long_term_sps()] - [Setter][#num_long_term_sps(byte)] +/// ### num_long_term_pics +/// [VarHandle][#VH_num_long_term_pics] - [Getter][#num_long_term_pics()] - [Setter][#num_long_term_pics(byte)] +/// ### lt_idx_sps +/// [VarHandle][#VH_lt_idx_sps] - [Getter][#lt_idx_sps()] - [Setter][#lt_idx_sps(byte)] +/// ### poc_lsb_lt +/// [VarHandle][#VH_poc_lsb_lt] - [Getter][#poc_lsb_lt()] - [Setter][#poc_lsb_lt(byte)] +/// ### used_by_curr_pic_lt_flag +/// [VarHandle][#VH_used_by_curr_pic_lt_flag] - [Getter][#used_by_curr_pic_lt_flag()] - [Setter][#used_by_curr_pic_lt_flag(short)] +/// ### delta_poc_msb_present_flag +/// [VarHandle][#VH_delta_poc_msb_present_flag] - [Getter][#delta_poc_msb_present_flag()] - [Setter][#delta_poc_msb_present_flag(byte)] +/// ### delta_poc_msb_cycle_lt +/// [VarHandle][#VH_delta_poc_msb_cycle_lt] - [Getter][#delta_poc_msb_cycle_lt()] - [Setter][#delta_poc_msb_cycle_lt(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265LongTermRefPics { +/// uint8_t num_long_term_sps; +/// uint8_t num_long_term_pics; +/// uint8_t [ ] lt_idx_sps; +/// uint8_t [ ] poc_lsb_lt; +/// uint16_t used_by_curr_pic_lt_flag; +/// uint8_t [ ] delta_poc_msb_present_flag; +/// uint8_t [ ] delta_poc_msb_cycle_lt; +/// } StdVideoEncodeH265LongTermRefPics; +/// ``` +public final class StdVideoEncodeH265LongTermRefPics extends Struct { + /// The struct layout of `StdVideoEncodeH265LongTermRefPics`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_BYTE.withName("num_long_term_sps"), + ValueLayout.JAVA_BYTE.withName("num_long_term_pics"), + ValueLayout.JAVA_BYTE.withName("lt_idx_sps"), + ValueLayout.JAVA_BYTE.withName("poc_lsb_lt"), + ValueLayout.JAVA_SHORT.withName("used_by_curr_pic_lt_flag"), + ValueLayout.JAVA_BYTE.withName("delta_poc_msb_present_flag"), + ValueLayout.JAVA_BYTE.withName("delta_poc_msb_cycle_lt") + ); + /// The [VarHandle] of `num_long_term_sps` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_long_term_sps = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_long_term_sps")); + /// The [VarHandle] of `num_long_term_pics` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_long_term_pics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_long_term_pics")); + /// The [VarHandle] of `lt_idx_sps` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_lt_idx_sps = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lt_idx_sps")); + /// The [VarHandle] of `poc_lsb_lt` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_poc_lsb_lt = LAYOUT.arrayElementVarHandle(PathElement.groupElement("poc_lsb_lt")); + /// The [VarHandle] of `used_by_curr_pic_lt_flag` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_used_by_curr_pic_lt_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("used_by_curr_pic_lt_flag")); + /// The [VarHandle] of `delta_poc_msb_present_flag` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_poc_msb_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_poc_msb_present_flag")); + /// The [VarHandle] of `delta_poc_msb_cycle_lt` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_poc_msb_cycle_lt = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_poc_msb_cycle_lt")); + + /// Creates `StdVideoEncodeH265LongTermRefPics` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265LongTermRefPics(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265LongTermRefPics` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265LongTermRefPics of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265LongTermRefPics(segment); } + + /// Creates `StdVideoEncodeH265LongTermRefPics` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265LongTermRefPics ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265LongTermRefPics(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265LongTermRefPics` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265LongTermRefPics ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265LongTermRefPics(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265LongTermRefPics` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265LongTermRefPics` + public static StdVideoEncodeH265LongTermRefPics alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265LongTermRefPics(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265LongTermRefPics` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265LongTermRefPics` + public static StdVideoEncodeH265LongTermRefPics alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265LongTermRefPics(allocator.allocate(LAYOUT, count)); } + + /// {@return `num_long_term_sps` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_long_term_sps(MemorySegment segment, long index) { return (byte) VH_num_long_term_sps.get(segment, 0L, index); } + /// {@return `num_long_term_sps`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_long_term_sps(MemorySegment segment) { return StdVideoEncodeH265LongTermRefPics.get_num_long_term_sps(segment, 0L); } + /// {@return `num_long_term_sps` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_long_term_spsAt(long index) { return StdVideoEncodeH265LongTermRefPics.get_num_long_term_sps(this.segment(), index); } + /// {@return `num_long_term_sps`} + public @CType("uint8_t") byte num_long_term_sps() { return StdVideoEncodeH265LongTermRefPics.get_num_long_term_sps(this.segment()); } + /// Sets `num_long_term_sps` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_long_term_sps(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_long_term_sps.set(segment, 0L, index, value); } + /// Sets `num_long_term_sps` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_long_term_sps(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265LongTermRefPics.set_num_long_term_sps(segment, 0L, value); } + /// Sets `num_long_term_sps` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics num_long_term_spsAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265LongTermRefPics.set_num_long_term_sps(this.segment(), index, value); return this; } + /// Sets `num_long_term_sps` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics num_long_term_sps(@CType("uint8_t") byte value) { StdVideoEncodeH265LongTermRefPics.set_num_long_term_sps(this.segment(), value); return this; } + + /// {@return `num_long_term_pics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_long_term_pics(MemorySegment segment, long index) { return (byte) VH_num_long_term_pics.get(segment, 0L, index); } + /// {@return `num_long_term_pics`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_long_term_pics(MemorySegment segment) { return StdVideoEncodeH265LongTermRefPics.get_num_long_term_pics(segment, 0L); } + /// {@return `num_long_term_pics` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_long_term_picsAt(long index) { return StdVideoEncodeH265LongTermRefPics.get_num_long_term_pics(this.segment(), index); } + /// {@return `num_long_term_pics`} + public @CType("uint8_t") byte num_long_term_pics() { return StdVideoEncodeH265LongTermRefPics.get_num_long_term_pics(this.segment()); } + /// Sets `num_long_term_pics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_long_term_pics(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_long_term_pics.set(segment, 0L, index, value); } + /// Sets `num_long_term_pics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_long_term_pics(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265LongTermRefPics.set_num_long_term_pics(segment, 0L, value); } + /// Sets `num_long_term_pics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics num_long_term_picsAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265LongTermRefPics.set_num_long_term_pics(this.segment(), index, value); return this; } + /// Sets `num_long_term_pics` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics num_long_term_pics(@CType("uint8_t") byte value) { StdVideoEncodeH265LongTermRefPics.set_num_long_term_pics(this.segment(), value); return this; } + + /// {@return `lt_idx_sps` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_lt_idx_sps(MemorySegment segment, long index) { return (byte) VH_lt_idx_sps.get(segment, 0L, index); } + /// {@return `lt_idx_sps`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_lt_idx_sps(MemorySegment segment) { return StdVideoEncodeH265LongTermRefPics.get_lt_idx_sps(segment, 0L); } + /// {@return `lt_idx_sps` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte lt_idx_spsAt(long index) { return StdVideoEncodeH265LongTermRefPics.get_lt_idx_sps(this.segment(), index); } + /// {@return `lt_idx_sps`} + public @CType("uint8_t [ ]") byte lt_idx_sps() { return StdVideoEncodeH265LongTermRefPics.get_lt_idx_sps(this.segment()); } + /// Sets `lt_idx_sps` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lt_idx_sps(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_lt_idx_sps.set(segment, 0L, index, value); } + /// Sets `lt_idx_sps` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lt_idx_sps(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_lt_idx_sps(segment, 0L, value); } + /// Sets `lt_idx_sps` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics lt_idx_spsAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_lt_idx_sps(this.segment(), index, value); return this; } + /// Sets `lt_idx_sps` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics lt_idx_sps(@CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_lt_idx_sps(this.segment(), value); return this; } + + /// {@return `poc_lsb_lt` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_poc_lsb_lt(MemorySegment segment, long index) { return (byte) VH_poc_lsb_lt.get(segment, 0L, index); } + /// {@return `poc_lsb_lt`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_poc_lsb_lt(MemorySegment segment) { return StdVideoEncodeH265LongTermRefPics.get_poc_lsb_lt(segment, 0L); } + /// {@return `poc_lsb_lt` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte poc_lsb_ltAt(long index) { return StdVideoEncodeH265LongTermRefPics.get_poc_lsb_lt(this.segment(), index); } + /// {@return `poc_lsb_lt`} + public @CType("uint8_t [ ]") byte poc_lsb_lt() { return StdVideoEncodeH265LongTermRefPics.get_poc_lsb_lt(this.segment()); } + /// Sets `poc_lsb_lt` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_poc_lsb_lt(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_poc_lsb_lt.set(segment, 0L, index, value); } + /// Sets `poc_lsb_lt` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_poc_lsb_lt(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_poc_lsb_lt(segment, 0L, value); } + /// Sets `poc_lsb_lt` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics poc_lsb_ltAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_poc_lsb_lt(this.segment(), index, value); return this; } + /// Sets `poc_lsb_lt` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics poc_lsb_lt(@CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_poc_lsb_lt(this.segment(), value); return this; } + + /// {@return `used_by_curr_pic_lt_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_used_by_curr_pic_lt_flag(MemorySegment segment, long index) { return (short) VH_used_by_curr_pic_lt_flag.get(segment, 0L, index); } + /// {@return `used_by_curr_pic_lt_flag`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_used_by_curr_pic_lt_flag(MemorySegment segment) { return StdVideoEncodeH265LongTermRefPics.get_used_by_curr_pic_lt_flag(segment, 0L); } + /// {@return `used_by_curr_pic_lt_flag` at the given index} + /// @param index the index + public @CType("uint16_t") short used_by_curr_pic_lt_flagAt(long index) { return StdVideoEncodeH265LongTermRefPics.get_used_by_curr_pic_lt_flag(this.segment(), index); } + /// {@return `used_by_curr_pic_lt_flag`} + public @CType("uint16_t") short used_by_curr_pic_lt_flag() { return StdVideoEncodeH265LongTermRefPics.get_used_by_curr_pic_lt_flag(this.segment()); } + /// Sets `used_by_curr_pic_lt_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_used_by_curr_pic_lt_flag(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_used_by_curr_pic_lt_flag.set(segment, 0L, index, value); } + /// Sets `used_by_curr_pic_lt_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_used_by_curr_pic_lt_flag(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH265LongTermRefPics.set_used_by_curr_pic_lt_flag(segment, 0L, value); } + /// Sets `used_by_curr_pic_lt_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics used_by_curr_pic_lt_flagAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH265LongTermRefPics.set_used_by_curr_pic_lt_flag(this.segment(), index, value); return this; } + /// Sets `used_by_curr_pic_lt_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics used_by_curr_pic_lt_flag(@CType("uint16_t") short value) { StdVideoEncodeH265LongTermRefPics.set_used_by_curr_pic_lt_flag(this.segment(), value); return this; } + + /// {@return `delta_poc_msb_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_delta_poc_msb_present_flag(MemorySegment segment, long index) { return (byte) VH_delta_poc_msb_present_flag.get(segment, 0L, index); } + /// {@return `delta_poc_msb_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_delta_poc_msb_present_flag(MemorySegment segment) { return StdVideoEncodeH265LongTermRefPics.get_delta_poc_msb_present_flag(segment, 0L); } + /// {@return `delta_poc_msb_present_flag` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte delta_poc_msb_present_flagAt(long index) { return StdVideoEncodeH265LongTermRefPics.get_delta_poc_msb_present_flag(this.segment(), index); } + /// {@return `delta_poc_msb_present_flag`} + public @CType("uint8_t [ ]") byte delta_poc_msb_present_flag() { return StdVideoEncodeH265LongTermRefPics.get_delta_poc_msb_present_flag(this.segment()); } + /// Sets `delta_poc_msb_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_poc_msb_present_flag(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_delta_poc_msb_present_flag.set(segment, 0L, index, value); } + /// Sets `delta_poc_msb_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_poc_msb_present_flag(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_delta_poc_msb_present_flag(segment, 0L, value); } + /// Sets `delta_poc_msb_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics delta_poc_msb_present_flagAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_delta_poc_msb_present_flag(this.segment(), index, value); return this; } + /// Sets `delta_poc_msb_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics delta_poc_msb_present_flag(@CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_delta_poc_msb_present_flag(this.segment(), value); return this; } + + /// {@return `delta_poc_msb_cycle_lt` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_delta_poc_msb_cycle_lt(MemorySegment segment, long index) { return (byte) VH_delta_poc_msb_cycle_lt.get(segment, 0L, index); } + /// {@return `delta_poc_msb_cycle_lt`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_delta_poc_msb_cycle_lt(MemorySegment segment) { return StdVideoEncodeH265LongTermRefPics.get_delta_poc_msb_cycle_lt(segment, 0L); } + /// {@return `delta_poc_msb_cycle_lt` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte delta_poc_msb_cycle_ltAt(long index) { return StdVideoEncodeH265LongTermRefPics.get_delta_poc_msb_cycle_lt(this.segment(), index); } + /// {@return `delta_poc_msb_cycle_lt`} + public @CType("uint8_t [ ]") byte delta_poc_msb_cycle_lt() { return StdVideoEncodeH265LongTermRefPics.get_delta_poc_msb_cycle_lt(this.segment()); } + /// Sets `delta_poc_msb_cycle_lt` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_poc_msb_cycle_lt(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_delta_poc_msb_cycle_lt.set(segment, 0L, index, value); } + /// Sets `delta_poc_msb_cycle_lt` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_poc_msb_cycle_lt(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_delta_poc_msb_cycle_lt(segment, 0L, value); } + /// Sets `delta_poc_msb_cycle_lt` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics delta_poc_msb_cycle_ltAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_delta_poc_msb_cycle_lt(this.segment(), index, value); return this; } + /// Sets `delta_poc_msb_cycle_lt` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265LongTermRefPics delta_poc_msb_cycle_lt(@CType("uint8_t [ ]") byte value) { StdVideoEncodeH265LongTermRefPics.set_delta_poc_msb_cycle_lt(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265PictureInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265PictureInfo.java new file mode 100644 index 00000000..177c9af7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265PictureInfo.java @@ -0,0 +1,518 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### pic_type +/// [VarHandle][#VH_pic_type] - [Getter][#pic_type()] - [Setter][#pic_type(int)] +/// ### sps_video_parameter_set_id +/// [VarHandle][#VH_sps_video_parameter_set_id] - [Getter][#sps_video_parameter_set_id()] - [Setter][#sps_video_parameter_set_id(byte)] +/// ### pps_seq_parameter_set_id +/// [VarHandle][#VH_pps_seq_parameter_set_id] - [Getter][#pps_seq_parameter_set_id()] - [Setter][#pps_seq_parameter_set_id(byte)] +/// ### pps_pic_parameter_set_id +/// [VarHandle][#VH_pps_pic_parameter_set_id] - [Getter][#pps_pic_parameter_set_id()] - [Setter][#pps_pic_parameter_set_id(byte)] +/// ### short_term_ref_pic_set_idx +/// [VarHandle][#VH_short_term_ref_pic_set_idx] - [Getter][#short_term_ref_pic_set_idx()] - [Setter][#short_term_ref_pic_set_idx(byte)] +/// ### PicOrderCntVal +/// [VarHandle][#VH_PicOrderCntVal] - [Getter][#PicOrderCntVal()] - [Setter][#PicOrderCntVal(int)] +/// ### TemporalId +/// [VarHandle][#VH_TemporalId] - [Getter][#TemporalId()] - [Setter][#TemporalId(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### pRefLists +/// [VarHandle][#VH_pRefLists] - [Getter][#pRefLists()] - [Setter][#pRefLists(java.lang.foreign.MemorySegment)] +/// ### pShortTermRefPicSet +/// [VarHandle][#VH_pShortTermRefPicSet] - [Getter][#pShortTermRefPicSet()] - [Setter][#pShortTermRefPicSet(java.lang.foreign.MemorySegment)] +/// ### pLongTermRefPics +/// [VarHandle][#VH_pLongTermRefPics] - [Getter][#pLongTermRefPics()] - [Setter][#pLongTermRefPics(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265PictureInfo { +/// StdVideoEncodeH265PictureInfoFlags flags; +/// StdVideoH265PictureType pic_type; +/// uint8_t sps_video_parameter_set_id; +/// uint8_t pps_seq_parameter_set_id; +/// uint8_t pps_pic_parameter_set_id; +/// uint8_t short_term_ref_pic_set_idx; +/// int32_t PicOrderCntVal; +/// uint8_t TemporalId; +/// uint8_t [7] reserved1; +/// const StdVideoEncodeH265ReferenceListsInfo * pRefLists; +/// const StdVideoH265ShortTermRefPicSet * pShortTermRefPicSet; +/// const StdVideoEncodeH265LongTermRefPics * pLongTermRefPics; +/// } StdVideoEncodeH265PictureInfo; +/// ``` +public final class StdVideoEncodeH265PictureInfo extends Struct { + /// The struct layout of `StdVideoEncodeH265PictureInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeH265PictureInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("pic_type"), + ValueLayout.JAVA_BYTE.withName("sps_video_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("pps_seq_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("pps_pic_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("short_term_ref_pic_set_idx"), + ValueLayout.JAVA_INT.withName("PicOrderCntVal"), + ValueLayout.JAVA_BYTE.withName("TemporalId"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.ADDRESS.withName("pRefLists"), + ValueLayout.ADDRESS.withName("pShortTermRefPicSet"), + ValueLayout.ADDRESS.withName("pLongTermRefPics") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pic_type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pic_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_type")); + /// The [VarHandle] of `sps_video_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_sps_video_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_video_parameter_set_id")); + /// The [VarHandle] of `pps_seq_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_seq_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_seq_parameter_set_id")); + /// The [VarHandle] of `pps_pic_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_pic_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_pic_parameter_set_id")); + /// The [VarHandle] of `short_term_ref_pic_set_idx` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_short_term_ref_pic_set_idx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("short_term_ref_pic_set_idx")); + /// The [VarHandle] of `PicOrderCntVal` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_PicOrderCntVal = LAYOUT.arrayElementVarHandle(PathElement.groupElement("PicOrderCntVal")); + /// The [VarHandle] of `TemporalId` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_TemporalId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("TemporalId")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `pRefLists` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pRefLists = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pRefLists")); + /// The [VarHandle] of `pShortTermRefPicSet` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pShortTermRefPicSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pShortTermRefPicSet")); + /// The [VarHandle] of `pLongTermRefPics` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLongTermRefPics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLongTermRefPics")); + + /// Creates `StdVideoEncodeH265PictureInfo` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265PictureInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265PictureInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265PictureInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265PictureInfo(segment); } + + /// Creates `StdVideoEncodeH265PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265PictureInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265PictureInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265PictureInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265PictureInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265PictureInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265PictureInfo` + public static StdVideoEncodeH265PictureInfo alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265PictureInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265PictureInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265PictureInfo` + public static StdVideoEncodeH265PictureInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265PictureInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeH265PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeH265PictureInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeH265PictureInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeH265PictureInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeH265PictureInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeH265PictureInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeH265PictureInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeH265PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo flagsAt(long index, @CType("StdVideoEncodeH265PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo flags(@CType("StdVideoEncodeH265PictureInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_flags(this.segment(), value); return this; } + + /// {@return `pic_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265PictureType") int get_pic_type(MemorySegment segment, long index) { return (int) VH_pic_type.get(segment, 0L, index); } + /// {@return `pic_type`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265PictureType") int get_pic_type(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_pic_type(segment, 0L); } + /// {@return `pic_type` at the given index} + /// @param index the index + public @CType("StdVideoH265PictureType") int pic_typeAt(long index) { return StdVideoEncodeH265PictureInfo.get_pic_type(this.segment(), index); } + /// {@return `pic_type`} + public @CType("StdVideoH265PictureType") int pic_type() { return StdVideoEncodeH265PictureInfo.get_pic_type(this.segment()); } + /// Sets `pic_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_type(MemorySegment segment, long index, @CType("StdVideoH265PictureType") int value) { VH_pic_type.set(segment, 0L, index, value); } + /// Sets `pic_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_type(MemorySegment segment, @CType("StdVideoH265PictureType") int value) { StdVideoEncodeH265PictureInfo.set_pic_type(segment, 0L, value); } + /// Sets `pic_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pic_typeAt(long index, @CType("StdVideoH265PictureType") int value) { StdVideoEncodeH265PictureInfo.set_pic_type(this.segment(), index, value); return this; } + /// Sets `pic_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pic_type(@CType("StdVideoH265PictureType") int value) { StdVideoEncodeH265PictureInfo.set_pic_type(this.segment(), value); return this; } + + /// {@return `sps_video_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_sps_video_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_sps_video_parameter_set_id.get(segment, 0L, index); } + /// {@return `sps_video_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_sps_video_parameter_set_id(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_sps_video_parameter_set_id(segment, 0L); } + /// {@return `sps_video_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte sps_video_parameter_set_idAt(long index) { return StdVideoEncodeH265PictureInfo.get_sps_video_parameter_set_id(this.segment(), index); } + /// {@return `sps_video_parameter_set_id`} + public @CType("uint8_t") byte sps_video_parameter_set_id() { return StdVideoEncodeH265PictureInfo.get_sps_video_parameter_set_id(this.segment()); } + /// Sets `sps_video_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_video_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_sps_video_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `sps_video_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_video_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_sps_video_parameter_set_id(segment, 0L, value); } + /// Sets `sps_video_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo sps_video_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_sps_video_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `sps_video_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo sps_video_parameter_set_id(@CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_sps_video_parameter_set_id(this.segment(), value); return this; } + + /// {@return `pps_seq_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pps_seq_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_pps_seq_parameter_set_id.get(segment, 0L, index); } + /// {@return `pps_seq_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pps_seq_parameter_set_id(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_pps_seq_parameter_set_id(segment, 0L); } + /// {@return `pps_seq_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte pps_seq_parameter_set_idAt(long index) { return StdVideoEncodeH265PictureInfo.get_pps_seq_parameter_set_id(this.segment(), index); } + /// {@return `pps_seq_parameter_set_id`} + public @CType("uint8_t") byte pps_seq_parameter_set_id() { return StdVideoEncodeH265PictureInfo.get_pps_seq_parameter_set_id(this.segment()); } + /// Sets `pps_seq_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_seq_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pps_seq_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `pps_seq_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_seq_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_pps_seq_parameter_set_id(segment, 0L, value); } + /// Sets `pps_seq_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pps_seq_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_pps_seq_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `pps_seq_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pps_seq_parameter_set_id(@CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_pps_seq_parameter_set_id(this.segment(), value); return this; } + + /// {@return `pps_pic_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pps_pic_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_pps_pic_parameter_set_id.get(segment, 0L, index); } + /// {@return `pps_pic_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pps_pic_parameter_set_id(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_pps_pic_parameter_set_id(segment, 0L); } + /// {@return `pps_pic_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte pps_pic_parameter_set_idAt(long index) { return StdVideoEncodeH265PictureInfo.get_pps_pic_parameter_set_id(this.segment(), index); } + /// {@return `pps_pic_parameter_set_id`} + public @CType("uint8_t") byte pps_pic_parameter_set_id() { return StdVideoEncodeH265PictureInfo.get_pps_pic_parameter_set_id(this.segment()); } + /// Sets `pps_pic_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_pic_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pps_pic_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `pps_pic_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_pic_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_pps_pic_parameter_set_id(segment, 0L, value); } + /// Sets `pps_pic_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pps_pic_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_pps_pic_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `pps_pic_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pps_pic_parameter_set_id(@CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_pps_pic_parameter_set_id(this.segment(), value); return this; } + + /// {@return `short_term_ref_pic_set_idx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_short_term_ref_pic_set_idx(MemorySegment segment, long index) { return (byte) VH_short_term_ref_pic_set_idx.get(segment, 0L, index); } + /// {@return `short_term_ref_pic_set_idx`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_short_term_ref_pic_set_idx(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_short_term_ref_pic_set_idx(segment, 0L); } + /// {@return `short_term_ref_pic_set_idx` at the given index} + /// @param index the index + public @CType("uint8_t") byte short_term_ref_pic_set_idxAt(long index) { return StdVideoEncodeH265PictureInfo.get_short_term_ref_pic_set_idx(this.segment(), index); } + /// {@return `short_term_ref_pic_set_idx`} + public @CType("uint8_t") byte short_term_ref_pic_set_idx() { return StdVideoEncodeH265PictureInfo.get_short_term_ref_pic_set_idx(this.segment()); } + /// Sets `short_term_ref_pic_set_idx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_short_term_ref_pic_set_idx(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_short_term_ref_pic_set_idx.set(segment, 0L, index, value); } + /// Sets `short_term_ref_pic_set_idx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_short_term_ref_pic_set_idx(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_short_term_ref_pic_set_idx(segment, 0L, value); } + /// Sets `short_term_ref_pic_set_idx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo short_term_ref_pic_set_idxAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_short_term_ref_pic_set_idx(this.segment(), index, value); return this; } + /// Sets `short_term_ref_pic_set_idx` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo short_term_ref_pic_set_idx(@CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_short_term_ref_pic_set_idx(this.segment(), value); return this; } + + /// {@return `PicOrderCntVal` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_PicOrderCntVal(MemorySegment segment, long index) { return (int) VH_PicOrderCntVal.get(segment, 0L, index); } + /// {@return `PicOrderCntVal`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_PicOrderCntVal(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_PicOrderCntVal(segment, 0L); } + /// {@return `PicOrderCntVal` at the given index} + /// @param index the index + public @CType("int32_t") int PicOrderCntValAt(long index) { return StdVideoEncodeH265PictureInfo.get_PicOrderCntVal(this.segment(), index); } + /// {@return `PicOrderCntVal`} + public @CType("int32_t") int PicOrderCntVal() { return StdVideoEncodeH265PictureInfo.get_PicOrderCntVal(this.segment()); } + /// Sets `PicOrderCntVal` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_PicOrderCntVal(MemorySegment segment, long index, @CType("int32_t") int value) { VH_PicOrderCntVal.set(segment, 0L, index, value); } + /// Sets `PicOrderCntVal` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_PicOrderCntVal(MemorySegment segment, @CType("int32_t") int value) { StdVideoEncodeH265PictureInfo.set_PicOrderCntVal(segment, 0L, value); } + /// Sets `PicOrderCntVal` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo PicOrderCntValAt(long index, @CType("int32_t") int value) { StdVideoEncodeH265PictureInfo.set_PicOrderCntVal(this.segment(), index, value); return this; } + /// Sets `PicOrderCntVal` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo PicOrderCntVal(@CType("int32_t") int value) { StdVideoEncodeH265PictureInfo.set_PicOrderCntVal(this.segment(), value); return this; } + + /// {@return `TemporalId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_TemporalId(MemorySegment segment, long index) { return (byte) VH_TemporalId.get(segment, 0L, index); } + /// {@return `TemporalId`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_TemporalId(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_TemporalId(segment, 0L); } + /// {@return `TemporalId` at the given index} + /// @param index the index + public @CType("uint8_t") byte TemporalIdAt(long index) { return StdVideoEncodeH265PictureInfo.get_TemporalId(this.segment(), index); } + /// {@return `TemporalId`} + public @CType("uint8_t") byte TemporalId() { return StdVideoEncodeH265PictureInfo.get_TemporalId(this.segment()); } + /// Sets `TemporalId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_TemporalId(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_TemporalId.set(segment, 0L, index, value); } + /// Sets `TemporalId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_TemporalId(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_TemporalId(segment, 0L, value); } + /// Sets `TemporalId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo TemporalIdAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_TemporalId(this.segment(), index, value); return this; } + /// Sets `TemporalId` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo TemporalId(@CType("uint8_t") byte value) { StdVideoEncodeH265PictureInfo.set_TemporalId(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [7]") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [7]") byte get_reserved1(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t [7]") byte reserved1At(long index) { return StdVideoEncodeH265PictureInfo.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t [7]") byte reserved1() { return StdVideoEncodeH265PictureInfo.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t [7]") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t [7]") byte value) { StdVideoEncodeH265PictureInfo.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo reserved1At(long index, @CType("uint8_t [7]") byte value) { StdVideoEncodeH265PictureInfo.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo reserved1(@CType("uint8_t [7]") byte value) { StdVideoEncodeH265PictureInfo.set_reserved1(this.segment(), value); return this; } + + /// {@return `pRefLists` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH265ReferenceListsInfo *") java.lang.foreign.MemorySegment get_pRefLists(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pRefLists.get(segment, 0L, index); } + /// {@return `pRefLists`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH265ReferenceListsInfo *") java.lang.foreign.MemorySegment get_pRefLists(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_pRefLists(segment, 0L); } + /// {@return `pRefLists` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH265ReferenceListsInfo *") java.lang.foreign.MemorySegment pRefListsAt(long index) { return StdVideoEncodeH265PictureInfo.get_pRefLists(this.segment(), index); } + /// {@return `pRefLists`} + public @CType("const StdVideoEncodeH265ReferenceListsInfo *") java.lang.foreign.MemorySegment pRefLists() { return StdVideoEncodeH265PictureInfo.get_pRefLists(this.segment()); } + /// Sets `pRefLists` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pRefLists(MemorySegment segment, long index, @CType("const StdVideoEncodeH265ReferenceListsInfo *") java.lang.foreign.MemorySegment value) { VH_pRefLists.set(segment, 0L, index, value); } + /// Sets `pRefLists` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pRefLists(MemorySegment segment, @CType("const StdVideoEncodeH265ReferenceListsInfo *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_pRefLists(segment, 0L, value); } + /// Sets `pRefLists` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pRefListsAt(long index, @CType("const StdVideoEncodeH265ReferenceListsInfo *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_pRefLists(this.segment(), index, value); return this; } + /// Sets `pRefLists` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pRefLists(@CType("const StdVideoEncodeH265ReferenceListsInfo *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_pRefLists(this.segment(), value); return this; } + + /// {@return `pShortTermRefPicSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment get_pShortTermRefPicSet(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pShortTermRefPicSet.get(segment, 0L, index); } + /// {@return `pShortTermRefPicSet`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment get_pShortTermRefPicSet(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_pShortTermRefPicSet(segment, 0L); } + /// {@return `pShortTermRefPicSet` at the given index} + /// @param index the index + public @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment pShortTermRefPicSetAt(long index) { return StdVideoEncodeH265PictureInfo.get_pShortTermRefPicSet(this.segment(), index); } + /// {@return `pShortTermRefPicSet`} + public @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment pShortTermRefPicSet() { return StdVideoEncodeH265PictureInfo.get_pShortTermRefPicSet(this.segment()); } + /// Sets `pShortTermRefPicSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pShortTermRefPicSet(MemorySegment segment, long index, @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment value) { VH_pShortTermRefPicSet.set(segment, 0L, index, value); } + /// Sets `pShortTermRefPicSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pShortTermRefPicSet(MemorySegment segment, @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_pShortTermRefPicSet(segment, 0L, value); } + /// Sets `pShortTermRefPicSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pShortTermRefPicSetAt(long index, @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_pShortTermRefPicSet(this.segment(), index, value); return this; } + /// Sets `pShortTermRefPicSet` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pShortTermRefPicSet(@CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_pShortTermRefPicSet(this.segment(), value); return this; } + + /// {@return `pLongTermRefPics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH265LongTermRefPics *") java.lang.foreign.MemorySegment get_pLongTermRefPics(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLongTermRefPics.get(segment, 0L, index); } + /// {@return `pLongTermRefPics`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH265LongTermRefPics *") java.lang.foreign.MemorySegment get_pLongTermRefPics(MemorySegment segment) { return StdVideoEncodeH265PictureInfo.get_pLongTermRefPics(segment, 0L); } + /// {@return `pLongTermRefPics` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH265LongTermRefPics *") java.lang.foreign.MemorySegment pLongTermRefPicsAt(long index) { return StdVideoEncodeH265PictureInfo.get_pLongTermRefPics(this.segment(), index); } + /// {@return `pLongTermRefPics`} + public @CType("const StdVideoEncodeH265LongTermRefPics *") java.lang.foreign.MemorySegment pLongTermRefPics() { return StdVideoEncodeH265PictureInfo.get_pLongTermRefPics(this.segment()); } + /// Sets `pLongTermRefPics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLongTermRefPics(MemorySegment segment, long index, @CType("const StdVideoEncodeH265LongTermRefPics *") java.lang.foreign.MemorySegment value) { VH_pLongTermRefPics.set(segment, 0L, index, value); } + /// Sets `pLongTermRefPics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLongTermRefPics(MemorySegment segment, @CType("const StdVideoEncodeH265LongTermRefPics *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_pLongTermRefPics(segment, 0L, value); } + /// Sets `pLongTermRefPics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pLongTermRefPicsAt(long index, @CType("const StdVideoEncodeH265LongTermRefPics *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_pLongTermRefPics(this.segment(), index, value); return this; } + /// Sets `pLongTermRefPics` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfo pLongTermRefPics(@CType("const StdVideoEncodeH265LongTermRefPics *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265PictureInfo.set_pLongTermRefPics(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265PictureInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265PictureInfoFlags.java new file mode 100644 index 00000000..db99fe64 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265PictureInfoFlags.java @@ -0,0 +1,444 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### is_reference +/// [VarHandle][#VH_is_reference] - [Getter][#is_reference()] - [Setter][#is_reference(int)] +/// ### IrapPicFlag +/// [VarHandle][#VH_IrapPicFlag] - [Getter][#IrapPicFlag()] - [Setter][#IrapPicFlag(int)] +/// ### used_for_long_term_reference +/// [VarHandle][#VH_used_for_long_term_reference] - [Getter][#used_for_long_term_reference()] - [Setter][#used_for_long_term_reference(int)] +/// ### discardable_flag +/// [VarHandle][#VH_discardable_flag] - [Getter][#discardable_flag()] - [Setter][#discardable_flag(int)] +/// ### cross_layer_bla_flag +/// [VarHandle][#VH_cross_layer_bla_flag] - [Getter][#cross_layer_bla_flag()] - [Setter][#cross_layer_bla_flag(int)] +/// ### pic_output_flag +/// [VarHandle][#VH_pic_output_flag] - [Getter][#pic_output_flag()] - [Setter][#pic_output_flag(int)] +/// ### no_output_of_prior_pics_flag +/// [VarHandle][#VH_no_output_of_prior_pics_flag] - [Getter][#no_output_of_prior_pics_flag()] - [Setter][#no_output_of_prior_pics_flag(int)] +/// ### short_term_ref_pic_set_sps_flag +/// [VarHandle][#VH_short_term_ref_pic_set_sps_flag] - [Getter][#short_term_ref_pic_set_sps_flag()] - [Setter][#short_term_ref_pic_set_sps_flag(int)] +/// ### slice_temporal_mvp_enabled_flag +/// [VarHandle][#VH_slice_temporal_mvp_enabled_flag] - [Getter][#slice_temporal_mvp_enabled_flag()] - [Setter][#slice_temporal_mvp_enabled_flag(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265PictureInfoFlags { +/// uint32_t : 1 is_reference; +/// uint32_t : 1 IrapPicFlag; +/// uint32_t : 1 used_for_long_term_reference; +/// uint32_t : 1 discardable_flag; +/// uint32_t : 1 cross_layer_bla_flag; +/// uint32_t : 1 pic_output_flag; +/// uint32_t : 1 no_output_of_prior_pics_flag; +/// uint32_t : 1 short_term_ref_pic_set_sps_flag; +/// uint32_t : 1 slice_temporal_mvp_enabled_flag; +/// uint32_t : 23 reserved; +/// } StdVideoEncodeH265PictureInfoFlags; +/// ``` +public final class StdVideoEncodeH265PictureInfoFlags extends Struct { + /// The struct layout of `StdVideoEncodeH265PictureInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("is_reference"), + ValueLayout.JAVA_INT.withName("IrapPicFlag"), + ValueLayout.JAVA_INT.withName("used_for_long_term_reference"), + ValueLayout.JAVA_INT.withName("discardable_flag"), + ValueLayout.JAVA_INT.withName("cross_layer_bla_flag"), + ValueLayout.JAVA_INT.withName("pic_output_flag"), + ValueLayout.JAVA_INT.withName("no_output_of_prior_pics_flag"), + ValueLayout.JAVA_INT.withName("short_term_ref_pic_set_sps_flag"), + ValueLayout.JAVA_INT.withName("slice_temporal_mvp_enabled_flag"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `is_reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_is_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("is_reference")); + /// The [VarHandle] of `IrapPicFlag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_IrapPicFlag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("IrapPicFlag")); + /// The [VarHandle] of `used_for_long_term_reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_used_for_long_term_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("used_for_long_term_reference")); + /// The [VarHandle] of `discardable_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_discardable_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("discardable_flag")); + /// The [VarHandle] of `cross_layer_bla_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cross_layer_bla_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cross_layer_bla_flag")); + /// The [VarHandle] of `pic_output_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pic_output_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_output_flag")); + /// The [VarHandle] of `no_output_of_prior_pics_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_no_output_of_prior_pics_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("no_output_of_prior_pics_flag")); + /// The [VarHandle] of `short_term_ref_pic_set_sps_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_short_term_ref_pic_set_sps_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("short_term_ref_pic_set_sps_flag")); + /// The [VarHandle] of `slice_temporal_mvp_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_slice_temporal_mvp_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_temporal_mvp_enabled_flag")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeH265PictureInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265PictureInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265PictureInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265PictureInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265PictureInfoFlags(segment); } + + /// Creates `StdVideoEncodeH265PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265PictureInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265PictureInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265PictureInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265PictureInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265PictureInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265PictureInfoFlags` + public static StdVideoEncodeH265PictureInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265PictureInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265PictureInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265PictureInfoFlags` + public static StdVideoEncodeH265PictureInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265PictureInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `is_reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_is_reference(MemorySegment segment, long index) { return (int) VH_is_reference.get(segment, 0L, index); } + /// {@return `is_reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_is_reference(MemorySegment segment) { return StdVideoEncodeH265PictureInfoFlags.get_is_reference(segment, 0L); } + /// {@return `is_reference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int is_referenceAt(long index) { return StdVideoEncodeH265PictureInfoFlags.get_is_reference(this.segment(), index); } + /// {@return `is_reference`} + public @CType("uint32_t : 1") int is_reference() { return StdVideoEncodeH265PictureInfoFlags.get_is_reference(this.segment()); } + /// Sets `is_reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_is_reference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_is_reference.set(segment, 0L, index, value); } + /// Sets `is_reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_is_reference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_is_reference(segment, 0L, value); } + /// Sets `is_reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags is_referenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_is_reference(this.segment(), index, value); return this; } + /// Sets `is_reference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags is_reference(@CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_is_reference(this.segment(), value); return this; } + + /// {@return `IrapPicFlag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_IrapPicFlag(MemorySegment segment, long index) { return (int) VH_IrapPicFlag.get(segment, 0L, index); } + /// {@return `IrapPicFlag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_IrapPicFlag(MemorySegment segment) { return StdVideoEncodeH265PictureInfoFlags.get_IrapPicFlag(segment, 0L); } + /// {@return `IrapPicFlag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int IrapPicFlagAt(long index) { return StdVideoEncodeH265PictureInfoFlags.get_IrapPicFlag(this.segment(), index); } + /// {@return `IrapPicFlag`} + public @CType("uint32_t : 1") int IrapPicFlag() { return StdVideoEncodeH265PictureInfoFlags.get_IrapPicFlag(this.segment()); } + /// Sets `IrapPicFlag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_IrapPicFlag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_IrapPicFlag.set(segment, 0L, index, value); } + /// Sets `IrapPicFlag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_IrapPicFlag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_IrapPicFlag(segment, 0L, value); } + /// Sets `IrapPicFlag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags IrapPicFlagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_IrapPicFlag(this.segment(), index, value); return this; } + /// Sets `IrapPicFlag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags IrapPicFlag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_IrapPicFlag(this.segment(), value); return this; } + + /// {@return `used_for_long_term_reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_used_for_long_term_reference(MemorySegment segment, long index) { return (int) VH_used_for_long_term_reference.get(segment, 0L, index); } + /// {@return `used_for_long_term_reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_used_for_long_term_reference(MemorySegment segment) { return StdVideoEncodeH265PictureInfoFlags.get_used_for_long_term_reference(segment, 0L); } + /// {@return `used_for_long_term_reference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int used_for_long_term_referenceAt(long index) { return StdVideoEncodeH265PictureInfoFlags.get_used_for_long_term_reference(this.segment(), index); } + /// {@return `used_for_long_term_reference`} + public @CType("uint32_t : 1") int used_for_long_term_reference() { return StdVideoEncodeH265PictureInfoFlags.get_used_for_long_term_reference(this.segment()); } + /// Sets `used_for_long_term_reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_used_for_long_term_reference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_used_for_long_term_reference.set(segment, 0L, index, value); } + /// Sets `used_for_long_term_reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_used_for_long_term_reference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_used_for_long_term_reference(segment, 0L, value); } + /// Sets `used_for_long_term_reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags used_for_long_term_referenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_used_for_long_term_reference(this.segment(), index, value); return this; } + /// Sets `used_for_long_term_reference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags used_for_long_term_reference(@CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_used_for_long_term_reference(this.segment(), value); return this; } + + /// {@return `discardable_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_discardable_flag(MemorySegment segment, long index) { return (int) VH_discardable_flag.get(segment, 0L, index); } + /// {@return `discardable_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_discardable_flag(MemorySegment segment) { return StdVideoEncodeH265PictureInfoFlags.get_discardable_flag(segment, 0L); } + /// {@return `discardable_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int discardable_flagAt(long index) { return StdVideoEncodeH265PictureInfoFlags.get_discardable_flag(this.segment(), index); } + /// {@return `discardable_flag`} + public @CType("uint32_t : 1") int discardable_flag() { return StdVideoEncodeH265PictureInfoFlags.get_discardable_flag(this.segment()); } + /// Sets `discardable_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_discardable_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_discardable_flag.set(segment, 0L, index, value); } + /// Sets `discardable_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_discardable_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_discardable_flag(segment, 0L, value); } + /// Sets `discardable_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags discardable_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_discardable_flag(this.segment(), index, value); return this; } + /// Sets `discardable_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags discardable_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_discardable_flag(this.segment(), value); return this; } + + /// {@return `cross_layer_bla_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_cross_layer_bla_flag(MemorySegment segment, long index) { return (int) VH_cross_layer_bla_flag.get(segment, 0L, index); } + /// {@return `cross_layer_bla_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_cross_layer_bla_flag(MemorySegment segment) { return StdVideoEncodeH265PictureInfoFlags.get_cross_layer_bla_flag(segment, 0L); } + /// {@return `cross_layer_bla_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int cross_layer_bla_flagAt(long index) { return StdVideoEncodeH265PictureInfoFlags.get_cross_layer_bla_flag(this.segment(), index); } + /// {@return `cross_layer_bla_flag`} + public @CType("uint32_t : 1") int cross_layer_bla_flag() { return StdVideoEncodeH265PictureInfoFlags.get_cross_layer_bla_flag(this.segment()); } + /// Sets `cross_layer_bla_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cross_layer_bla_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_cross_layer_bla_flag.set(segment, 0L, index, value); } + /// Sets `cross_layer_bla_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cross_layer_bla_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_cross_layer_bla_flag(segment, 0L, value); } + /// Sets `cross_layer_bla_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags cross_layer_bla_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_cross_layer_bla_flag(this.segment(), index, value); return this; } + /// Sets `cross_layer_bla_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags cross_layer_bla_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_cross_layer_bla_flag(this.segment(), value); return this; } + + /// {@return `pic_output_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pic_output_flag(MemorySegment segment, long index) { return (int) VH_pic_output_flag.get(segment, 0L, index); } + /// {@return `pic_output_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pic_output_flag(MemorySegment segment) { return StdVideoEncodeH265PictureInfoFlags.get_pic_output_flag(segment, 0L); } + /// {@return `pic_output_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pic_output_flagAt(long index) { return StdVideoEncodeH265PictureInfoFlags.get_pic_output_flag(this.segment(), index); } + /// {@return `pic_output_flag`} + public @CType("uint32_t : 1") int pic_output_flag() { return StdVideoEncodeH265PictureInfoFlags.get_pic_output_flag(this.segment()); } + /// Sets `pic_output_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_output_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pic_output_flag.set(segment, 0L, index, value); } + /// Sets `pic_output_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_output_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_pic_output_flag(segment, 0L, value); } + /// Sets `pic_output_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags pic_output_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_pic_output_flag(this.segment(), index, value); return this; } + /// Sets `pic_output_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags pic_output_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_pic_output_flag(this.segment(), value); return this; } + + /// {@return `no_output_of_prior_pics_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_no_output_of_prior_pics_flag(MemorySegment segment, long index) { return (int) VH_no_output_of_prior_pics_flag.get(segment, 0L, index); } + /// {@return `no_output_of_prior_pics_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_no_output_of_prior_pics_flag(MemorySegment segment) { return StdVideoEncodeH265PictureInfoFlags.get_no_output_of_prior_pics_flag(segment, 0L); } + /// {@return `no_output_of_prior_pics_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int no_output_of_prior_pics_flagAt(long index) { return StdVideoEncodeH265PictureInfoFlags.get_no_output_of_prior_pics_flag(this.segment(), index); } + /// {@return `no_output_of_prior_pics_flag`} + public @CType("uint32_t : 1") int no_output_of_prior_pics_flag() { return StdVideoEncodeH265PictureInfoFlags.get_no_output_of_prior_pics_flag(this.segment()); } + /// Sets `no_output_of_prior_pics_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_no_output_of_prior_pics_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_no_output_of_prior_pics_flag.set(segment, 0L, index, value); } + /// Sets `no_output_of_prior_pics_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_no_output_of_prior_pics_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_no_output_of_prior_pics_flag(segment, 0L, value); } + /// Sets `no_output_of_prior_pics_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags no_output_of_prior_pics_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_no_output_of_prior_pics_flag(this.segment(), index, value); return this; } + /// Sets `no_output_of_prior_pics_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags no_output_of_prior_pics_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_no_output_of_prior_pics_flag(this.segment(), value); return this; } + + /// {@return `short_term_ref_pic_set_sps_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_short_term_ref_pic_set_sps_flag(MemorySegment segment, long index) { return (int) VH_short_term_ref_pic_set_sps_flag.get(segment, 0L, index); } + /// {@return `short_term_ref_pic_set_sps_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_short_term_ref_pic_set_sps_flag(MemorySegment segment) { return StdVideoEncodeH265PictureInfoFlags.get_short_term_ref_pic_set_sps_flag(segment, 0L); } + /// {@return `short_term_ref_pic_set_sps_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int short_term_ref_pic_set_sps_flagAt(long index) { return StdVideoEncodeH265PictureInfoFlags.get_short_term_ref_pic_set_sps_flag(this.segment(), index); } + /// {@return `short_term_ref_pic_set_sps_flag`} + public @CType("uint32_t : 1") int short_term_ref_pic_set_sps_flag() { return StdVideoEncodeH265PictureInfoFlags.get_short_term_ref_pic_set_sps_flag(this.segment()); } + /// Sets `short_term_ref_pic_set_sps_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_short_term_ref_pic_set_sps_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_short_term_ref_pic_set_sps_flag.set(segment, 0L, index, value); } + /// Sets `short_term_ref_pic_set_sps_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_short_term_ref_pic_set_sps_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_short_term_ref_pic_set_sps_flag(segment, 0L, value); } + /// Sets `short_term_ref_pic_set_sps_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags short_term_ref_pic_set_sps_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_short_term_ref_pic_set_sps_flag(this.segment(), index, value); return this; } + /// Sets `short_term_ref_pic_set_sps_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags short_term_ref_pic_set_sps_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_short_term_ref_pic_set_sps_flag(this.segment(), value); return this; } + + /// {@return `slice_temporal_mvp_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_slice_temporal_mvp_enabled_flag(MemorySegment segment, long index) { return (int) VH_slice_temporal_mvp_enabled_flag.get(segment, 0L, index); } + /// {@return `slice_temporal_mvp_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_slice_temporal_mvp_enabled_flag(MemorySegment segment) { return StdVideoEncodeH265PictureInfoFlags.get_slice_temporal_mvp_enabled_flag(segment, 0L); } + /// {@return `slice_temporal_mvp_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int slice_temporal_mvp_enabled_flagAt(long index) { return StdVideoEncodeH265PictureInfoFlags.get_slice_temporal_mvp_enabled_flag(this.segment(), index); } + /// {@return `slice_temporal_mvp_enabled_flag`} + public @CType("uint32_t : 1") int slice_temporal_mvp_enabled_flag() { return StdVideoEncodeH265PictureInfoFlags.get_slice_temporal_mvp_enabled_flag(this.segment()); } + /// Sets `slice_temporal_mvp_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_temporal_mvp_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_slice_temporal_mvp_enabled_flag.set(segment, 0L, index, value); } + /// Sets `slice_temporal_mvp_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_temporal_mvp_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_slice_temporal_mvp_enabled_flag(segment, 0L, value); } + /// Sets `slice_temporal_mvp_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags slice_temporal_mvp_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_slice_temporal_mvp_enabled_flag(this.segment(), index, value); return this; } + /// Sets `slice_temporal_mvp_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags slice_temporal_mvp_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265PictureInfoFlags.set_slice_temporal_mvp_enabled_flag(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 23") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 23") int get_reserved(MemorySegment segment) { return StdVideoEncodeH265PictureInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 23") int reservedAt(long index) { return StdVideoEncodeH265PictureInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 23") int reserved() { return StdVideoEncodeH265PictureInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 23") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 23") int value) { StdVideoEncodeH265PictureInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags reservedAt(long index, @CType("uint32_t : 23") int value) { StdVideoEncodeH265PictureInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265PictureInfoFlags reserved(@CType("uint32_t : 23") int value) { StdVideoEncodeH265PictureInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceInfo.java new file mode 100644 index 00000000..5a748400 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceInfo.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### pic_type +/// [VarHandle][#VH_pic_type] - [Getter][#pic_type()] - [Setter][#pic_type(int)] +/// ### PicOrderCntVal +/// [VarHandle][#VH_PicOrderCntVal] - [Getter][#PicOrderCntVal()] - [Setter][#PicOrderCntVal(int)] +/// ### TemporalId +/// [VarHandle][#VH_TemporalId] - [Getter][#TemporalId()] - [Setter][#TemporalId(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265ReferenceInfo { +/// StdVideoEncodeH265ReferenceInfoFlags flags; +/// StdVideoH265PictureType pic_type; +/// int32_t PicOrderCntVal; +/// uint8_t TemporalId; +/// } StdVideoEncodeH265ReferenceInfo; +/// ``` +public final class StdVideoEncodeH265ReferenceInfo extends Struct { + /// The struct layout of `StdVideoEncodeH265ReferenceInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeH265ReferenceInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("pic_type"), + ValueLayout.JAVA_INT.withName("PicOrderCntVal"), + ValueLayout.JAVA_BYTE.withName("TemporalId") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pic_type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pic_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_type")); + /// The [VarHandle] of `PicOrderCntVal` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_PicOrderCntVal = LAYOUT.arrayElementVarHandle(PathElement.groupElement("PicOrderCntVal")); + /// The [VarHandle] of `TemporalId` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_TemporalId = LAYOUT.arrayElementVarHandle(PathElement.groupElement("TemporalId")); + + /// Creates `StdVideoEncodeH265ReferenceInfo` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265ReferenceInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265ReferenceInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceInfo(segment); } + + /// Creates `StdVideoEncodeH265ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265ReferenceInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265ReferenceInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265ReferenceInfo` + public static StdVideoEncodeH265ReferenceInfo alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265ReferenceInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265ReferenceInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265ReferenceInfo` + public static StdVideoEncodeH265ReferenceInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265ReferenceInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeH265ReferenceInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeH265ReferenceInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeH265ReferenceInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265ReferenceInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfo flagsAt(long index, @CType("StdVideoEncodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265ReferenceInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfo flags(@CType("StdVideoEncodeH265ReferenceInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265ReferenceInfo.set_flags(this.segment(), value); return this; } + + /// {@return `pic_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265PictureType") int get_pic_type(MemorySegment segment, long index) { return (int) VH_pic_type.get(segment, 0L, index); } + /// {@return `pic_type`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265PictureType") int get_pic_type(MemorySegment segment) { return StdVideoEncodeH265ReferenceInfo.get_pic_type(segment, 0L); } + /// {@return `pic_type` at the given index} + /// @param index the index + public @CType("StdVideoH265PictureType") int pic_typeAt(long index) { return StdVideoEncodeH265ReferenceInfo.get_pic_type(this.segment(), index); } + /// {@return `pic_type`} + public @CType("StdVideoH265PictureType") int pic_type() { return StdVideoEncodeH265ReferenceInfo.get_pic_type(this.segment()); } + /// Sets `pic_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_type(MemorySegment segment, long index, @CType("StdVideoH265PictureType") int value) { VH_pic_type.set(segment, 0L, index, value); } + /// Sets `pic_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_type(MemorySegment segment, @CType("StdVideoH265PictureType") int value) { StdVideoEncodeH265ReferenceInfo.set_pic_type(segment, 0L, value); } + /// Sets `pic_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfo pic_typeAt(long index, @CType("StdVideoH265PictureType") int value) { StdVideoEncodeH265ReferenceInfo.set_pic_type(this.segment(), index, value); return this; } + /// Sets `pic_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfo pic_type(@CType("StdVideoH265PictureType") int value) { StdVideoEncodeH265ReferenceInfo.set_pic_type(this.segment(), value); return this; } + + /// {@return `PicOrderCntVal` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_PicOrderCntVal(MemorySegment segment, long index) { return (int) VH_PicOrderCntVal.get(segment, 0L, index); } + /// {@return `PicOrderCntVal`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_PicOrderCntVal(MemorySegment segment) { return StdVideoEncodeH265ReferenceInfo.get_PicOrderCntVal(segment, 0L); } + /// {@return `PicOrderCntVal` at the given index} + /// @param index the index + public @CType("int32_t") int PicOrderCntValAt(long index) { return StdVideoEncodeH265ReferenceInfo.get_PicOrderCntVal(this.segment(), index); } + /// {@return `PicOrderCntVal`} + public @CType("int32_t") int PicOrderCntVal() { return StdVideoEncodeH265ReferenceInfo.get_PicOrderCntVal(this.segment()); } + /// Sets `PicOrderCntVal` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_PicOrderCntVal(MemorySegment segment, long index, @CType("int32_t") int value) { VH_PicOrderCntVal.set(segment, 0L, index, value); } + /// Sets `PicOrderCntVal` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_PicOrderCntVal(MemorySegment segment, @CType("int32_t") int value) { StdVideoEncodeH265ReferenceInfo.set_PicOrderCntVal(segment, 0L, value); } + /// Sets `PicOrderCntVal` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfo PicOrderCntValAt(long index, @CType("int32_t") int value) { StdVideoEncodeH265ReferenceInfo.set_PicOrderCntVal(this.segment(), index, value); return this; } + /// Sets `PicOrderCntVal` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfo PicOrderCntVal(@CType("int32_t") int value) { StdVideoEncodeH265ReferenceInfo.set_PicOrderCntVal(this.segment(), value); return this; } + + /// {@return `TemporalId` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_TemporalId(MemorySegment segment, long index) { return (byte) VH_TemporalId.get(segment, 0L, index); } + /// {@return `TemporalId`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_TemporalId(MemorySegment segment) { return StdVideoEncodeH265ReferenceInfo.get_TemporalId(segment, 0L); } + /// {@return `TemporalId` at the given index} + /// @param index the index + public @CType("uint8_t") byte TemporalIdAt(long index) { return StdVideoEncodeH265ReferenceInfo.get_TemporalId(this.segment(), index); } + /// {@return `TemporalId`} + public @CType("uint8_t") byte TemporalId() { return StdVideoEncodeH265ReferenceInfo.get_TemporalId(this.segment()); } + /// Sets `TemporalId` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_TemporalId(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_TemporalId.set(segment, 0L, index, value); } + /// Sets `TemporalId` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_TemporalId(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265ReferenceInfo.set_TemporalId(segment, 0L, value); } + /// Sets `TemporalId` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfo TemporalIdAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265ReferenceInfo.set_TemporalId(this.segment(), index, value); return this; } + /// Sets `TemporalId` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfo TemporalId(@CType("uint8_t") byte value) { StdVideoEncodeH265ReferenceInfo.set_TemporalId(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceInfoFlags.java new file mode 100644 index 00000000..928ef508 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceInfoFlags.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### used_for_long_term_reference +/// [VarHandle][#VH_used_for_long_term_reference] - [Getter][#used_for_long_term_reference()] - [Setter][#used_for_long_term_reference(int)] +/// ### unused_for_reference +/// [VarHandle][#VH_unused_for_reference] - [Getter][#unused_for_reference()] - [Setter][#unused_for_reference(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265ReferenceInfoFlags { +/// uint32_t : 1 used_for_long_term_reference; +/// uint32_t : 1 unused_for_reference; +/// uint32_t : 30 reserved; +/// } StdVideoEncodeH265ReferenceInfoFlags; +/// ``` +public final class StdVideoEncodeH265ReferenceInfoFlags extends Struct { + /// The struct layout of `StdVideoEncodeH265ReferenceInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("used_for_long_term_reference"), + ValueLayout.JAVA_INT.withName("unused_for_reference"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `used_for_long_term_reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_used_for_long_term_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("used_for_long_term_reference")); + /// The [VarHandle] of `unused_for_reference` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_unused_for_reference = LAYOUT.arrayElementVarHandle(PathElement.groupElement("unused_for_reference")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeH265ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265ReferenceInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265ReferenceInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceInfoFlags(segment); } + + /// Creates `StdVideoEncodeH265ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265ReferenceInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265ReferenceInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265ReferenceInfoFlags` + public static StdVideoEncodeH265ReferenceInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265ReferenceInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265ReferenceInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265ReferenceInfoFlags` + public static StdVideoEncodeH265ReferenceInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265ReferenceInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `used_for_long_term_reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_used_for_long_term_reference(MemorySegment segment, long index) { return (int) VH_used_for_long_term_reference.get(segment, 0L, index); } + /// {@return `used_for_long_term_reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_used_for_long_term_reference(MemorySegment segment) { return StdVideoEncodeH265ReferenceInfoFlags.get_used_for_long_term_reference(segment, 0L); } + /// {@return `used_for_long_term_reference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int used_for_long_term_referenceAt(long index) { return StdVideoEncodeH265ReferenceInfoFlags.get_used_for_long_term_reference(this.segment(), index); } + /// {@return `used_for_long_term_reference`} + public @CType("uint32_t : 1") int used_for_long_term_reference() { return StdVideoEncodeH265ReferenceInfoFlags.get_used_for_long_term_reference(this.segment()); } + /// Sets `used_for_long_term_reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_used_for_long_term_reference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_used_for_long_term_reference.set(segment, 0L, index, value); } + /// Sets `used_for_long_term_reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_used_for_long_term_reference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceInfoFlags.set_used_for_long_term_reference(segment, 0L, value); } + /// Sets `used_for_long_term_reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfoFlags used_for_long_term_referenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceInfoFlags.set_used_for_long_term_reference(this.segment(), index, value); return this; } + /// Sets `used_for_long_term_reference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfoFlags used_for_long_term_reference(@CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceInfoFlags.set_used_for_long_term_reference(this.segment(), value); return this; } + + /// {@return `unused_for_reference` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_unused_for_reference(MemorySegment segment, long index) { return (int) VH_unused_for_reference.get(segment, 0L, index); } + /// {@return `unused_for_reference`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_unused_for_reference(MemorySegment segment) { return StdVideoEncodeH265ReferenceInfoFlags.get_unused_for_reference(segment, 0L); } + /// {@return `unused_for_reference` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int unused_for_referenceAt(long index) { return StdVideoEncodeH265ReferenceInfoFlags.get_unused_for_reference(this.segment(), index); } + /// {@return `unused_for_reference`} + public @CType("uint32_t : 1") int unused_for_reference() { return StdVideoEncodeH265ReferenceInfoFlags.get_unused_for_reference(this.segment()); } + /// Sets `unused_for_reference` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_unused_for_reference(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_unused_for_reference.set(segment, 0L, index, value); } + /// Sets `unused_for_reference` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_unused_for_reference(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceInfoFlags.set_unused_for_reference(segment, 0L, value); } + /// Sets `unused_for_reference` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfoFlags unused_for_referenceAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceInfoFlags.set_unused_for_reference(this.segment(), index, value); return this; } + /// Sets `unused_for_reference` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfoFlags unused_for_reference(@CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceInfoFlags.set_unused_for_reference(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment) { return StdVideoEncodeH265ReferenceInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 30") int reservedAt(long index) { return StdVideoEncodeH265ReferenceInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 30") int reserved() { return StdVideoEncodeH265ReferenceInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 30") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 30") int value) { StdVideoEncodeH265ReferenceInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfoFlags reservedAt(long index, @CType("uint32_t : 30") int value) { StdVideoEncodeH265ReferenceInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceInfoFlags reserved(@CType("uint32_t : 30") int value) { StdVideoEncodeH265ReferenceInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceListsInfo.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceListsInfo.java new file mode 100644 index 00000000..11910dfc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceListsInfo.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### num_ref_idx_l0_active_minus1 +/// [VarHandle][#VH_num_ref_idx_l0_active_minus1] - [Getter][#num_ref_idx_l0_active_minus1()] - [Setter][#num_ref_idx_l0_active_minus1(byte)] +/// ### num_ref_idx_l1_active_minus1 +/// [VarHandle][#VH_num_ref_idx_l1_active_minus1] - [Getter][#num_ref_idx_l1_active_minus1()] - [Setter][#num_ref_idx_l1_active_minus1(byte)] +/// ### RefPicList0 +/// [VarHandle][#VH_RefPicList0] - [Getter][#RefPicList0()] - [Setter][#RefPicList0(byte)] +/// ### RefPicList1 +/// [VarHandle][#VH_RefPicList1] - [Getter][#RefPicList1()] - [Setter][#RefPicList1(byte)] +/// ### list_entry_l0 +/// [VarHandle][#VH_list_entry_l0] - [Getter][#list_entry_l0()] - [Setter][#list_entry_l0(byte)] +/// ### list_entry_l1 +/// [VarHandle][#VH_list_entry_l1] - [Getter][#list_entry_l1()] - [Setter][#list_entry_l1(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265ReferenceListsInfo { +/// StdVideoEncodeH265ReferenceListsInfoFlags flags; +/// uint8_t num_ref_idx_l0_active_minus1; +/// uint8_t num_ref_idx_l1_active_minus1; +/// uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF] RefPicList0; +/// uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF] RefPicList1; +/// uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF] list_entry_l0; +/// uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF] list_entry_l1; +/// } StdVideoEncodeH265ReferenceListsInfo; +/// ``` +public final class StdVideoEncodeH265ReferenceListsInfo extends Struct { + /// The struct layout of `StdVideoEncodeH265ReferenceListsInfo`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeH265ReferenceListsInfoFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("num_ref_idx_l0_active_minus1"), + ValueLayout.JAVA_BYTE.withName("num_ref_idx_l1_active_minus1"), + ValueLayout.JAVA_BYTE.withName("RefPicList0"), + ValueLayout.JAVA_BYTE.withName("RefPicList1"), + ValueLayout.JAVA_BYTE.withName("list_entry_l0"), + ValueLayout.JAVA_BYTE.withName("list_entry_l1") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `num_ref_idx_l0_active_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_ref_idx_l0_active_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_idx_l0_active_minus1")); + /// The [VarHandle] of `num_ref_idx_l1_active_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_ref_idx_l1_active_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_idx_l1_active_minus1")); + /// The [VarHandle] of `RefPicList0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_RefPicList0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("RefPicList0")); + /// The [VarHandle] of `RefPicList1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_RefPicList1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("RefPicList1")); + /// The [VarHandle] of `list_entry_l0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_list_entry_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("list_entry_l0")); + /// The [VarHandle] of `list_entry_l1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_list_entry_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("list_entry_l1")); + + /// Creates `StdVideoEncodeH265ReferenceListsInfo` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265ReferenceListsInfo(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265ReferenceListsInfo` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceListsInfo of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceListsInfo(segment); } + + /// Creates `StdVideoEncodeH265ReferenceListsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceListsInfo ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceListsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265ReferenceListsInfo` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceListsInfo ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceListsInfo(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265ReferenceListsInfo` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265ReferenceListsInfo` + public static StdVideoEncodeH265ReferenceListsInfo alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265ReferenceListsInfo(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265ReferenceListsInfo` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265ReferenceListsInfo` + public static StdVideoEncodeH265ReferenceListsInfo alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265ReferenceListsInfo(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeH265ReferenceListsInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeH265ReferenceListsInfoFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeH265ReferenceListsInfo.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeH265ReferenceListsInfoFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeH265ReferenceListsInfo.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeH265ReferenceListsInfoFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeH265ReferenceListsInfo.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeH265ReferenceListsInfoFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeH265ReferenceListsInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265ReferenceListsInfo.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo flagsAt(long index, @CType("StdVideoEncodeH265ReferenceListsInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265ReferenceListsInfo.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo flags(@CType("StdVideoEncodeH265ReferenceListsInfoFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265ReferenceListsInfo.set_flags(this.segment(), value); return this; } + + /// {@return `num_ref_idx_l0_active_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_ref_idx_l0_active_minus1(MemorySegment segment, long index) { return (byte) VH_num_ref_idx_l0_active_minus1.get(segment, 0L, index); } + /// {@return `num_ref_idx_l0_active_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_ref_idx_l0_active_minus1(MemorySegment segment) { return StdVideoEncodeH265ReferenceListsInfo.get_num_ref_idx_l0_active_minus1(segment, 0L); } + /// {@return `num_ref_idx_l0_active_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_ref_idx_l0_active_minus1At(long index) { return StdVideoEncodeH265ReferenceListsInfo.get_num_ref_idx_l0_active_minus1(this.segment(), index); } + /// {@return `num_ref_idx_l0_active_minus1`} + public @CType("uint8_t") byte num_ref_idx_l0_active_minus1() { return StdVideoEncodeH265ReferenceListsInfo.get_num_ref_idx_l0_active_minus1(this.segment()); } + /// Sets `num_ref_idx_l0_active_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_idx_l0_active_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_ref_idx_l0_active_minus1.set(segment, 0L, index, value); } + /// Sets `num_ref_idx_l0_active_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_idx_l0_active_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_num_ref_idx_l0_active_minus1(segment, 0L, value); } + /// Sets `num_ref_idx_l0_active_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo num_ref_idx_l0_active_minus1At(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_num_ref_idx_l0_active_minus1(this.segment(), index, value); return this; } + /// Sets `num_ref_idx_l0_active_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo num_ref_idx_l0_active_minus1(@CType("uint8_t") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_num_ref_idx_l0_active_minus1(this.segment(), value); return this; } + + /// {@return `num_ref_idx_l1_active_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_ref_idx_l1_active_minus1(MemorySegment segment, long index) { return (byte) VH_num_ref_idx_l1_active_minus1.get(segment, 0L, index); } + /// {@return `num_ref_idx_l1_active_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_ref_idx_l1_active_minus1(MemorySegment segment) { return StdVideoEncodeH265ReferenceListsInfo.get_num_ref_idx_l1_active_minus1(segment, 0L); } + /// {@return `num_ref_idx_l1_active_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_ref_idx_l1_active_minus1At(long index) { return StdVideoEncodeH265ReferenceListsInfo.get_num_ref_idx_l1_active_minus1(this.segment(), index); } + /// {@return `num_ref_idx_l1_active_minus1`} + public @CType("uint8_t") byte num_ref_idx_l1_active_minus1() { return StdVideoEncodeH265ReferenceListsInfo.get_num_ref_idx_l1_active_minus1(this.segment()); } + /// Sets `num_ref_idx_l1_active_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_idx_l1_active_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_ref_idx_l1_active_minus1.set(segment, 0L, index, value); } + /// Sets `num_ref_idx_l1_active_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_idx_l1_active_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_num_ref_idx_l1_active_minus1(segment, 0L, value); } + /// Sets `num_ref_idx_l1_active_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo num_ref_idx_l1_active_minus1At(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_num_ref_idx_l1_active_minus1(this.segment(), index, value); return this; } + /// Sets `num_ref_idx_l1_active_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo num_ref_idx_l1_active_minus1(@CType("uint8_t") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_num_ref_idx_l1_active_minus1(this.segment(), value); return this; } + + /// {@return `RefPicList0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte get_RefPicList0(MemorySegment segment, long index) { return (byte) VH_RefPicList0.get(segment, 0L, index); } + /// {@return `RefPicList0`} + /// @param segment the segment of the struct + public static @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte get_RefPicList0(MemorySegment segment) { return StdVideoEncodeH265ReferenceListsInfo.get_RefPicList0(segment, 0L); } + /// {@return `RefPicList0` at the given index} + /// @param index the index + public @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte RefPicList0At(long index) { return StdVideoEncodeH265ReferenceListsInfo.get_RefPicList0(this.segment(), index); } + /// {@return `RefPicList0`} + public @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte RefPicList0() { return StdVideoEncodeH265ReferenceListsInfo.get_RefPicList0(this.segment()); } + /// Sets `RefPicList0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_RefPicList0(MemorySegment segment, long index, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { VH_RefPicList0.set(segment, 0L, index, value); } + /// Sets `RefPicList0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_RefPicList0(MemorySegment segment, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_RefPicList0(segment, 0L, value); } + /// Sets `RefPicList0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo RefPicList0At(long index, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_RefPicList0(this.segment(), index, value); return this; } + /// Sets `RefPicList0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo RefPicList0(@CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_RefPicList0(this.segment(), value); return this; } + + /// {@return `RefPicList1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte get_RefPicList1(MemorySegment segment, long index) { return (byte) VH_RefPicList1.get(segment, 0L, index); } + /// {@return `RefPicList1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte get_RefPicList1(MemorySegment segment) { return StdVideoEncodeH265ReferenceListsInfo.get_RefPicList1(segment, 0L); } + /// {@return `RefPicList1` at the given index} + /// @param index the index + public @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte RefPicList1At(long index) { return StdVideoEncodeH265ReferenceListsInfo.get_RefPicList1(this.segment(), index); } + /// {@return `RefPicList1`} + public @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte RefPicList1() { return StdVideoEncodeH265ReferenceListsInfo.get_RefPicList1(this.segment()); } + /// Sets `RefPicList1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_RefPicList1(MemorySegment segment, long index, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { VH_RefPicList1.set(segment, 0L, index, value); } + /// Sets `RefPicList1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_RefPicList1(MemorySegment segment, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_RefPicList1(segment, 0L, value); } + /// Sets `RefPicList1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo RefPicList1At(long index, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_RefPicList1(this.segment(), index, value); return this; } + /// Sets `RefPicList1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo RefPicList1(@CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_RefPicList1(this.segment(), value); return this; } + + /// {@return `list_entry_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte get_list_entry_l0(MemorySegment segment, long index) { return (byte) VH_list_entry_l0.get(segment, 0L, index); } + /// {@return `list_entry_l0`} + /// @param segment the segment of the struct + public static @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte get_list_entry_l0(MemorySegment segment) { return StdVideoEncodeH265ReferenceListsInfo.get_list_entry_l0(segment, 0L); } + /// {@return `list_entry_l0` at the given index} + /// @param index the index + public @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte list_entry_l0At(long index) { return StdVideoEncodeH265ReferenceListsInfo.get_list_entry_l0(this.segment(), index); } + /// {@return `list_entry_l0`} + public @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte list_entry_l0() { return StdVideoEncodeH265ReferenceListsInfo.get_list_entry_l0(this.segment()); } + /// Sets `list_entry_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_list_entry_l0(MemorySegment segment, long index, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { VH_list_entry_l0.set(segment, 0L, index, value); } + /// Sets `list_entry_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_list_entry_l0(MemorySegment segment, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_list_entry_l0(segment, 0L, value); } + /// Sets `list_entry_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo list_entry_l0At(long index, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_list_entry_l0(this.segment(), index, value); return this; } + /// Sets `list_entry_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo list_entry_l0(@CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_list_entry_l0(this.segment(), value); return this; } + + /// {@return `list_entry_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte get_list_entry_l1(MemorySegment segment, long index) { return (byte) VH_list_entry_l1.get(segment, 0L, index); } + /// {@return `list_entry_l1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte get_list_entry_l1(MemorySegment segment) { return StdVideoEncodeH265ReferenceListsInfo.get_list_entry_l1(segment, 0L); } + /// {@return `list_entry_l1` at the given index} + /// @param index the index + public @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte list_entry_l1At(long index) { return StdVideoEncodeH265ReferenceListsInfo.get_list_entry_l1(this.segment(), index); } + /// {@return `list_entry_l1`} + public @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte list_entry_l1() { return StdVideoEncodeH265ReferenceListsInfo.get_list_entry_l1(this.segment()); } + /// Sets `list_entry_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_list_entry_l1(MemorySegment segment, long index, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { VH_list_entry_l1.set(segment, 0L, index, value); } + /// Sets `list_entry_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_list_entry_l1(MemorySegment segment, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_list_entry_l1(segment, 0L, value); } + /// Sets `list_entry_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo list_entry_l1At(long index, @CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_list_entry_l1(this.segment(), index, value); return this; } + /// Sets `list_entry_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfo list_entry_l1(@CType("uint8_t [STD_VIDEO_H265_MAX_NUM_LIST_REF]") byte value) { StdVideoEncodeH265ReferenceListsInfo.set_list_entry_l1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceListsInfoFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceListsInfoFlags.java new file mode 100644 index 00000000..2b8a641c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265ReferenceListsInfoFlags.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### ref_pic_list_modification_flag_l0 +/// [VarHandle][#VH_ref_pic_list_modification_flag_l0] - [Getter][#ref_pic_list_modification_flag_l0()] - [Setter][#ref_pic_list_modification_flag_l0(int)] +/// ### ref_pic_list_modification_flag_l1 +/// [VarHandle][#VH_ref_pic_list_modification_flag_l1] - [Getter][#ref_pic_list_modification_flag_l1()] - [Setter][#ref_pic_list_modification_flag_l1(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265ReferenceListsInfoFlags { +/// uint32_t : 1 ref_pic_list_modification_flag_l0; +/// uint32_t : 1 ref_pic_list_modification_flag_l1; +/// uint32_t : 30 reserved; +/// } StdVideoEncodeH265ReferenceListsInfoFlags; +/// ``` +public final class StdVideoEncodeH265ReferenceListsInfoFlags extends Struct { + /// The struct layout of `StdVideoEncodeH265ReferenceListsInfoFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("ref_pic_list_modification_flag_l0"), + ValueLayout.JAVA_INT.withName("ref_pic_list_modification_flag_l1"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `ref_pic_list_modification_flag_l0` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ref_pic_list_modification_flag_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ref_pic_list_modification_flag_l0")); + /// The [VarHandle] of `ref_pic_list_modification_flag_l1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_ref_pic_list_modification_flag_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ref_pic_list_modification_flag_l1")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeH265ReferenceListsInfoFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265ReferenceListsInfoFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265ReferenceListsInfoFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceListsInfoFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceListsInfoFlags(segment); } + + /// Creates `StdVideoEncodeH265ReferenceListsInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceListsInfoFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceListsInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265ReferenceListsInfoFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265ReferenceListsInfoFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265ReferenceListsInfoFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265ReferenceListsInfoFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265ReferenceListsInfoFlags` + public static StdVideoEncodeH265ReferenceListsInfoFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265ReferenceListsInfoFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265ReferenceListsInfoFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265ReferenceListsInfoFlags` + public static StdVideoEncodeH265ReferenceListsInfoFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265ReferenceListsInfoFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `ref_pic_list_modification_flag_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_ref_pic_list_modification_flag_l0(MemorySegment segment, long index) { return (int) VH_ref_pic_list_modification_flag_l0.get(segment, 0L, index); } + /// {@return `ref_pic_list_modification_flag_l0`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_ref_pic_list_modification_flag_l0(MemorySegment segment) { return StdVideoEncodeH265ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l0(segment, 0L); } + /// {@return `ref_pic_list_modification_flag_l0` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int ref_pic_list_modification_flag_l0At(long index) { return StdVideoEncodeH265ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l0(this.segment(), index); } + /// {@return `ref_pic_list_modification_flag_l0`} + public @CType("uint32_t : 1") int ref_pic_list_modification_flag_l0() { return StdVideoEncodeH265ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l0(this.segment()); } + /// Sets `ref_pic_list_modification_flag_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ref_pic_list_modification_flag_l0(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_ref_pic_list_modification_flag_l0.set(segment, 0L, index, value); } + /// Sets `ref_pic_list_modification_flag_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ref_pic_list_modification_flag_l0(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l0(segment, 0L, value); } + /// Sets `ref_pic_list_modification_flag_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfoFlags ref_pic_list_modification_flag_l0At(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l0(this.segment(), index, value); return this; } + /// Sets `ref_pic_list_modification_flag_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfoFlags ref_pic_list_modification_flag_l0(@CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l0(this.segment(), value); return this; } + + /// {@return `ref_pic_list_modification_flag_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_ref_pic_list_modification_flag_l1(MemorySegment segment, long index) { return (int) VH_ref_pic_list_modification_flag_l1.get(segment, 0L, index); } + /// {@return `ref_pic_list_modification_flag_l1`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_ref_pic_list_modification_flag_l1(MemorySegment segment) { return StdVideoEncodeH265ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l1(segment, 0L); } + /// {@return `ref_pic_list_modification_flag_l1` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int ref_pic_list_modification_flag_l1At(long index) { return StdVideoEncodeH265ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l1(this.segment(), index); } + /// {@return `ref_pic_list_modification_flag_l1`} + public @CType("uint32_t : 1") int ref_pic_list_modification_flag_l1() { return StdVideoEncodeH265ReferenceListsInfoFlags.get_ref_pic_list_modification_flag_l1(this.segment()); } + /// Sets `ref_pic_list_modification_flag_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ref_pic_list_modification_flag_l1(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_ref_pic_list_modification_flag_l1.set(segment, 0L, index, value); } + /// Sets `ref_pic_list_modification_flag_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ref_pic_list_modification_flag_l1(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l1(segment, 0L, value); } + /// Sets `ref_pic_list_modification_flag_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfoFlags ref_pic_list_modification_flag_l1At(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l1(this.segment(), index, value); return this; } + /// Sets `ref_pic_list_modification_flag_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfoFlags ref_pic_list_modification_flag_l1(@CType("uint32_t : 1") int value) { StdVideoEncodeH265ReferenceListsInfoFlags.set_ref_pic_list_modification_flag_l1(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 30") int get_reserved(MemorySegment segment) { return StdVideoEncodeH265ReferenceListsInfoFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 30") int reservedAt(long index) { return StdVideoEncodeH265ReferenceListsInfoFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 30") int reserved() { return StdVideoEncodeH265ReferenceListsInfoFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 30") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 30") int value) { StdVideoEncodeH265ReferenceListsInfoFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfoFlags reservedAt(long index, @CType("uint32_t : 30") int value) { StdVideoEncodeH265ReferenceListsInfoFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265ReferenceListsInfoFlags reserved(@CType("uint32_t : 30") int value) { StdVideoEncodeH265ReferenceListsInfoFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265SliceSegmentHeader.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265SliceSegmentHeader.java new file mode 100644 index 00000000..e624079c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265SliceSegmentHeader.java @@ -0,0 +1,629 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### slice_type +/// [VarHandle][#VH_slice_type] - [Getter][#slice_type()] - [Setter][#slice_type(int)] +/// ### slice_segment_address +/// [VarHandle][#VH_slice_segment_address] - [Getter][#slice_segment_address()] - [Setter][#slice_segment_address(int)] +/// ### collocated_ref_idx +/// [VarHandle][#VH_collocated_ref_idx] - [Getter][#collocated_ref_idx()] - [Setter][#collocated_ref_idx(byte)] +/// ### MaxNumMergeCand +/// [VarHandle][#VH_MaxNumMergeCand] - [Getter][#MaxNumMergeCand()] - [Setter][#MaxNumMergeCand(byte)] +/// ### slice_cb_qp_offset +/// [VarHandle][#VH_slice_cb_qp_offset] - [Getter][#slice_cb_qp_offset()] - [Setter][#slice_cb_qp_offset(byte)] +/// ### slice_cr_qp_offset +/// [VarHandle][#VH_slice_cr_qp_offset] - [Getter][#slice_cr_qp_offset()] - [Setter][#slice_cr_qp_offset(byte)] +/// ### slice_beta_offset_div2 +/// [VarHandle][#VH_slice_beta_offset_div2] - [Getter][#slice_beta_offset_div2()] - [Setter][#slice_beta_offset_div2(byte)] +/// ### slice_tc_offset_div2 +/// [VarHandle][#VH_slice_tc_offset_div2] - [Getter][#slice_tc_offset_div2()] - [Setter][#slice_tc_offset_div2(byte)] +/// ### slice_act_y_qp_offset +/// [VarHandle][#VH_slice_act_y_qp_offset] - [Getter][#slice_act_y_qp_offset()] - [Setter][#slice_act_y_qp_offset(byte)] +/// ### slice_act_cb_qp_offset +/// [VarHandle][#VH_slice_act_cb_qp_offset] - [Getter][#slice_act_cb_qp_offset()] - [Setter][#slice_act_cb_qp_offset(byte)] +/// ### slice_act_cr_qp_offset +/// [VarHandle][#VH_slice_act_cr_qp_offset] - [Getter][#slice_act_cr_qp_offset()] - [Setter][#slice_act_cr_qp_offset(byte)] +/// ### slice_qp_delta +/// [VarHandle][#VH_slice_qp_delta] - [Getter][#slice_qp_delta()] - [Setter][#slice_qp_delta(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(short)] +/// ### pWeightTable +/// [VarHandle][#VH_pWeightTable] - [Getter][#pWeightTable()] - [Setter][#pWeightTable(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265SliceSegmentHeader { +/// StdVideoEncodeH265SliceSegmentHeaderFlags flags; +/// StdVideoH265SliceType slice_type; +/// uint32_t slice_segment_address; +/// uint8_t collocated_ref_idx; +/// uint8_t MaxNumMergeCand; +/// int8_t slice_cb_qp_offset; +/// int8_t slice_cr_qp_offset; +/// int8_t slice_beta_offset_div2; +/// int8_t slice_tc_offset_div2; +/// int8_t slice_act_y_qp_offset; +/// int8_t slice_act_cb_qp_offset; +/// int8_t slice_act_cr_qp_offset; +/// int8_t slice_qp_delta; +/// uint16_t reserved1; +/// const StdVideoEncodeH265WeightTable * pWeightTable; +/// } StdVideoEncodeH265SliceSegmentHeader; +/// ``` +public final class StdVideoEncodeH265SliceSegmentHeader extends Struct { + /// The struct layout of `StdVideoEncodeH265SliceSegmentHeader`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeH265SliceSegmentHeaderFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("slice_type"), + ValueLayout.JAVA_INT.withName("slice_segment_address"), + ValueLayout.JAVA_BYTE.withName("collocated_ref_idx"), + ValueLayout.JAVA_BYTE.withName("MaxNumMergeCand"), + ValueLayout.JAVA_BYTE.withName("slice_cb_qp_offset"), + ValueLayout.JAVA_BYTE.withName("slice_cr_qp_offset"), + ValueLayout.JAVA_BYTE.withName("slice_beta_offset_div2"), + ValueLayout.JAVA_BYTE.withName("slice_tc_offset_div2"), + ValueLayout.JAVA_BYTE.withName("slice_act_y_qp_offset"), + ValueLayout.JAVA_BYTE.withName("slice_act_cb_qp_offset"), + ValueLayout.JAVA_BYTE.withName("slice_act_cr_qp_offset"), + ValueLayout.JAVA_BYTE.withName("slice_qp_delta"), + ValueLayout.JAVA_SHORT.withName("reserved1"), + ValueLayout.ADDRESS.withName("pWeightTable") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `slice_type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_slice_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_type")); + /// The [VarHandle] of `slice_segment_address` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_slice_segment_address = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_segment_address")); + /// The [VarHandle] of `collocated_ref_idx` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_collocated_ref_idx = LAYOUT.arrayElementVarHandle(PathElement.groupElement("collocated_ref_idx")); + /// The [VarHandle] of `MaxNumMergeCand` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_MaxNumMergeCand = LAYOUT.arrayElementVarHandle(PathElement.groupElement("MaxNumMergeCand")); + /// The [VarHandle] of `slice_cb_qp_offset` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_cb_qp_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_cb_qp_offset")); + /// The [VarHandle] of `slice_cr_qp_offset` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_cr_qp_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_cr_qp_offset")); + /// The [VarHandle] of `slice_beta_offset_div2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_beta_offset_div2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_beta_offset_div2")); + /// The [VarHandle] of `slice_tc_offset_div2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_tc_offset_div2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_tc_offset_div2")); + /// The [VarHandle] of `slice_act_y_qp_offset` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_act_y_qp_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_act_y_qp_offset")); + /// The [VarHandle] of `slice_act_cb_qp_offset` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_act_cb_qp_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_act_cb_qp_offset")); + /// The [VarHandle] of `slice_act_cr_qp_offset` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_act_cr_qp_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_act_cr_qp_offset")); + /// The [VarHandle] of `slice_qp_delta` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_slice_qp_delta = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_qp_delta")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `pWeightTable` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pWeightTable = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pWeightTable")); + + /// Creates `StdVideoEncodeH265SliceSegmentHeader` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265SliceSegmentHeader(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265SliceSegmentHeader` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265SliceSegmentHeader of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265SliceSegmentHeader(segment); } + + /// Creates `StdVideoEncodeH265SliceSegmentHeader` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265SliceSegmentHeader ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265SliceSegmentHeader(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265SliceSegmentHeader` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265SliceSegmentHeader ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265SliceSegmentHeader(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265SliceSegmentHeader` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265SliceSegmentHeader` + public static StdVideoEncodeH265SliceSegmentHeader alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265SliceSegmentHeader(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265SliceSegmentHeader` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265SliceSegmentHeader` + public static StdVideoEncodeH265SliceSegmentHeader alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265SliceSegmentHeader(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeH265SliceSegmentHeaderFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeH265SliceSegmentHeaderFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeH265SliceSegmentHeaderFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeH265SliceSegmentHeaderFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeH265SliceSegmentHeader.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeH265SliceSegmentHeaderFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeH265SliceSegmentHeaderFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265SliceSegmentHeader.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader flagsAt(long index, @CType("StdVideoEncodeH265SliceSegmentHeaderFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265SliceSegmentHeader.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader flags(@CType("StdVideoEncodeH265SliceSegmentHeaderFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265SliceSegmentHeader.set_flags(this.segment(), value); return this; } + + /// {@return `slice_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265SliceType") int get_slice_type(MemorySegment segment, long index) { return (int) VH_slice_type.get(segment, 0L, index); } + /// {@return `slice_type`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265SliceType") int get_slice_type(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_type(segment, 0L); } + /// {@return `slice_type` at the given index} + /// @param index the index + public @CType("StdVideoH265SliceType") int slice_typeAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_type(this.segment(), index); } + /// {@return `slice_type`} + public @CType("StdVideoH265SliceType") int slice_type() { return StdVideoEncodeH265SliceSegmentHeader.get_slice_type(this.segment()); } + /// Sets `slice_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_type(MemorySegment segment, long index, @CType("StdVideoH265SliceType") int value) { VH_slice_type.set(segment, 0L, index, value); } + /// Sets `slice_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_type(MemorySegment segment, @CType("StdVideoH265SliceType") int value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_type(segment, 0L, value); } + /// Sets `slice_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_typeAt(long index, @CType("StdVideoH265SliceType") int value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_type(this.segment(), index, value); return this; } + /// Sets `slice_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_type(@CType("StdVideoH265SliceType") int value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_type(this.segment(), value); return this; } + + /// {@return `slice_segment_address` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_slice_segment_address(MemorySegment segment, long index) { return (int) VH_slice_segment_address.get(segment, 0L, index); } + /// {@return `slice_segment_address`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_slice_segment_address(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_segment_address(segment, 0L); } + /// {@return `slice_segment_address` at the given index} + /// @param index the index + public @CType("uint32_t") int slice_segment_addressAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_segment_address(this.segment(), index); } + /// {@return `slice_segment_address`} + public @CType("uint32_t") int slice_segment_address() { return StdVideoEncodeH265SliceSegmentHeader.get_slice_segment_address(this.segment()); } + /// Sets `slice_segment_address` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_segment_address(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_slice_segment_address.set(segment, 0L, index, value); } + /// Sets `slice_segment_address` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_segment_address(MemorySegment segment, @CType("uint32_t") int value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_segment_address(segment, 0L, value); } + /// Sets `slice_segment_address` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_segment_addressAt(long index, @CType("uint32_t") int value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_segment_address(this.segment(), index, value); return this; } + /// Sets `slice_segment_address` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_segment_address(@CType("uint32_t") int value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_segment_address(this.segment(), value); return this; } + + /// {@return `collocated_ref_idx` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_collocated_ref_idx(MemorySegment segment, long index) { return (byte) VH_collocated_ref_idx.get(segment, 0L, index); } + /// {@return `collocated_ref_idx`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_collocated_ref_idx(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_collocated_ref_idx(segment, 0L); } + /// {@return `collocated_ref_idx` at the given index} + /// @param index the index + public @CType("uint8_t") byte collocated_ref_idxAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_collocated_ref_idx(this.segment(), index); } + /// {@return `collocated_ref_idx`} + public @CType("uint8_t") byte collocated_ref_idx() { return StdVideoEncodeH265SliceSegmentHeader.get_collocated_ref_idx(this.segment()); } + /// Sets `collocated_ref_idx` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_collocated_ref_idx(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_collocated_ref_idx.set(segment, 0L, index, value); } + /// Sets `collocated_ref_idx` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_collocated_ref_idx(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_collocated_ref_idx(segment, 0L, value); } + /// Sets `collocated_ref_idx` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader collocated_ref_idxAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_collocated_ref_idx(this.segment(), index, value); return this; } + /// Sets `collocated_ref_idx` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader collocated_ref_idx(@CType("uint8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_collocated_ref_idx(this.segment(), value); return this; } + + /// {@return `MaxNumMergeCand` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_MaxNumMergeCand(MemorySegment segment, long index) { return (byte) VH_MaxNumMergeCand.get(segment, 0L, index); } + /// {@return `MaxNumMergeCand`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_MaxNumMergeCand(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_MaxNumMergeCand(segment, 0L); } + /// {@return `MaxNumMergeCand` at the given index} + /// @param index the index + public @CType("uint8_t") byte MaxNumMergeCandAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_MaxNumMergeCand(this.segment(), index); } + /// {@return `MaxNumMergeCand`} + public @CType("uint8_t") byte MaxNumMergeCand() { return StdVideoEncodeH265SliceSegmentHeader.get_MaxNumMergeCand(this.segment()); } + /// Sets `MaxNumMergeCand` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_MaxNumMergeCand(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_MaxNumMergeCand.set(segment, 0L, index, value); } + /// Sets `MaxNumMergeCand` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_MaxNumMergeCand(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_MaxNumMergeCand(segment, 0L, value); } + /// Sets `MaxNumMergeCand` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader MaxNumMergeCandAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_MaxNumMergeCand(this.segment(), index, value); return this; } + /// Sets `MaxNumMergeCand` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader MaxNumMergeCand(@CType("uint8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_MaxNumMergeCand(this.segment(), value); return this; } + + /// {@return `slice_cb_qp_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_cb_qp_offset(MemorySegment segment, long index) { return (byte) VH_slice_cb_qp_offset.get(segment, 0L, index); } + /// {@return `slice_cb_qp_offset`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_cb_qp_offset(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_cb_qp_offset(segment, 0L); } + /// {@return `slice_cb_qp_offset` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_cb_qp_offsetAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_cb_qp_offset(this.segment(), index); } + /// {@return `slice_cb_qp_offset`} + public @CType("int8_t") byte slice_cb_qp_offset() { return StdVideoEncodeH265SliceSegmentHeader.get_slice_cb_qp_offset(this.segment()); } + /// Sets `slice_cb_qp_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_cb_qp_offset(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_cb_qp_offset.set(segment, 0L, index, value); } + /// Sets `slice_cb_qp_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_cb_qp_offset(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_cb_qp_offset(segment, 0L, value); } + /// Sets `slice_cb_qp_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_cb_qp_offsetAt(long index, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_cb_qp_offset(this.segment(), index, value); return this; } + /// Sets `slice_cb_qp_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_cb_qp_offset(@CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_cb_qp_offset(this.segment(), value); return this; } + + /// {@return `slice_cr_qp_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_cr_qp_offset(MemorySegment segment, long index) { return (byte) VH_slice_cr_qp_offset.get(segment, 0L, index); } + /// {@return `slice_cr_qp_offset`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_cr_qp_offset(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_cr_qp_offset(segment, 0L); } + /// {@return `slice_cr_qp_offset` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_cr_qp_offsetAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_cr_qp_offset(this.segment(), index); } + /// {@return `slice_cr_qp_offset`} + public @CType("int8_t") byte slice_cr_qp_offset() { return StdVideoEncodeH265SliceSegmentHeader.get_slice_cr_qp_offset(this.segment()); } + /// Sets `slice_cr_qp_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_cr_qp_offset(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_cr_qp_offset.set(segment, 0L, index, value); } + /// Sets `slice_cr_qp_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_cr_qp_offset(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_cr_qp_offset(segment, 0L, value); } + /// Sets `slice_cr_qp_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_cr_qp_offsetAt(long index, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_cr_qp_offset(this.segment(), index, value); return this; } + /// Sets `slice_cr_qp_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_cr_qp_offset(@CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_cr_qp_offset(this.segment(), value); return this; } + + /// {@return `slice_beta_offset_div2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_beta_offset_div2(MemorySegment segment, long index) { return (byte) VH_slice_beta_offset_div2.get(segment, 0L, index); } + /// {@return `slice_beta_offset_div2`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_beta_offset_div2(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_beta_offset_div2(segment, 0L); } + /// {@return `slice_beta_offset_div2` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_beta_offset_div2At(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_beta_offset_div2(this.segment(), index); } + /// {@return `slice_beta_offset_div2`} + public @CType("int8_t") byte slice_beta_offset_div2() { return StdVideoEncodeH265SliceSegmentHeader.get_slice_beta_offset_div2(this.segment()); } + /// Sets `slice_beta_offset_div2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_beta_offset_div2(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_beta_offset_div2.set(segment, 0L, index, value); } + /// Sets `slice_beta_offset_div2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_beta_offset_div2(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_beta_offset_div2(segment, 0L, value); } + /// Sets `slice_beta_offset_div2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_beta_offset_div2At(long index, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_beta_offset_div2(this.segment(), index, value); return this; } + /// Sets `slice_beta_offset_div2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_beta_offset_div2(@CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_beta_offset_div2(this.segment(), value); return this; } + + /// {@return `slice_tc_offset_div2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_tc_offset_div2(MemorySegment segment, long index) { return (byte) VH_slice_tc_offset_div2.get(segment, 0L, index); } + /// {@return `slice_tc_offset_div2`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_tc_offset_div2(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_tc_offset_div2(segment, 0L); } + /// {@return `slice_tc_offset_div2` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_tc_offset_div2At(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_tc_offset_div2(this.segment(), index); } + /// {@return `slice_tc_offset_div2`} + public @CType("int8_t") byte slice_tc_offset_div2() { return StdVideoEncodeH265SliceSegmentHeader.get_slice_tc_offset_div2(this.segment()); } + /// Sets `slice_tc_offset_div2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_tc_offset_div2(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_tc_offset_div2.set(segment, 0L, index, value); } + /// Sets `slice_tc_offset_div2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_tc_offset_div2(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_tc_offset_div2(segment, 0L, value); } + /// Sets `slice_tc_offset_div2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_tc_offset_div2At(long index, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_tc_offset_div2(this.segment(), index, value); return this; } + /// Sets `slice_tc_offset_div2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_tc_offset_div2(@CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_tc_offset_div2(this.segment(), value); return this; } + + /// {@return `slice_act_y_qp_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_act_y_qp_offset(MemorySegment segment, long index) { return (byte) VH_slice_act_y_qp_offset.get(segment, 0L, index); } + /// {@return `slice_act_y_qp_offset`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_act_y_qp_offset(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_act_y_qp_offset(segment, 0L); } + /// {@return `slice_act_y_qp_offset` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_act_y_qp_offsetAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_act_y_qp_offset(this.segment(), index); } + /// {@return `slice_act_y_qp_offset`} + public @CType("int8_t") byte slice_act_y_qp_offset() { return StdVideoEncodeH265SliceSegmentHeader.get_slice_act_y_qp_offset(this.segment()); } + /// Sets `slice_act_y_qp_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_act_y_qp_offset(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_act_y_qp_offset.set(segment, 0L, index, value); } + /// Sets `slice_act_y_qp_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_act_y_qp_offset(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_act_y_qp_offset(segment, 0L, value); } + /// Sets `slice_act_y_qp_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_act_y_qp_offsetAt(long index, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_act_y_qp_offset(this.segment(), index, value); return this; } + /// Sets `slice_act_y_qp_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_act_y_qp_offset(@CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_act_y_qp_offset(this.segment(), value); return this; } + + /// {@return `slice_act_cb_qp_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_act_cb_qp_offset(MemorySegment segment, long index) { return (byte) VH_slice_act_cb_qp_offset.get(segment, 0L, index); } + /// {@return `slice_act_cb_qp_offset`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_act_cb_qp_offset(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_act_cb_qp_offset(segment, 0L); } + /// {@return `slice_act_cb_qp_offset` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_act_cb_qp_offsetAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_act_cb_qp_offset(this.segment(), index); } + /// {@return `slice_act_cb_qp_offset`} + public @CType("int8_t") byte slice_act_cb_qp_offset() { return StdVideoEncodeH265SliceSegmentHeader.get_slice_act_cb_qp_offset(this.segment()); } + /// Sets `slice_act_cb_qp_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_act_cb_qp_offset(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_act_cb_qp_offset.set(segment, 0L, index, value); } + /// Sets `slice_act_cb_qp_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_act_cb_qp_offset(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_act_cb_qp_offset(segment, 0L, value); } + /// Sets `slice_act_cb_qp_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_act_cb_qp_offsetAt(long index, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_act_cb_qp_offset(this.segment(), index, value); return this; } + /// Sets `slice_act_cb_qp_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_act_cb_qp_offset(@CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_act_cb_qp_offset(this.segment(), value); return this; } + + /// {@return `slice_act_cr_qp_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_act_cr_qp_offset(MemorySegment segment, long index) { return (byte) VH_slice_act_cr_qp_offset.get(segment, 0L, index); } + /// {@return `slice_act_cr_qp_offset`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_act_cr_qp_offset(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_act_cr_qp_offset(segment, 0L); } + /// {@return `slice_act_cr_qp_offset` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_act_cr_qp_offsetAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_act_cr_qp_offset(this.segment(), index); } + /// {@return `slice_act_cr_qp_offset`} + public @CType("int8_t") byte slice_act_cr_qp_offset() { return StdVideoEncodeH265SliceSegmentHeader.get_slice_act_cr_qp_offset(this.segment()); } + /// Sets `slice_act_cr_qp_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_act_cr_qp_offset(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_act_cr_qp_offset.set(segment, 0L, index, value); } + /// Sets `slice_act_cr_qp_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_act_cr_qp_offset(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_act_cr_qp_offset(segment, 0L, value); } + /// Sets `slice_act_cr_qp_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_act_cr_qp_offsetAt(long index, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_act_cr_qp_offset(this.segment(), index, value); return this; } + /// Sets `slice_act_cr_qp_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_act_cr_qp_offset(@CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_act_cr_qp_offset(this.segment(), value); return this; } + + /// {@return `slice_qp_delta` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_slice_qp_delta(MemorySegment segment, long index) { return (byte) VH_slice_qp_delta.get(segment, 0L, index); } + /// {@return `slice_qp_delta`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_slice_qp_delta(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_qp_delta(segment, 0L); } + /// {@return `slice_qp_delta` at the given index} + /// @param index the index + public @CType("int8_t") byte slice_qp_deltaAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_slice_qp_delta(this.segment(), index); } + /// {@return `slice_qp_delta`} + public @CType("int8_t") byte slice_qp_delta() { return StdVideoEncodeH265SliceSegmentHeader.get_slice_qp_delta(this.segment()); } + /// Sets `slice_qp_delta` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_qp_delta(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_slice_qp_delta.set(segment, 0L, index, value); } + /// Sets `slice_qp_delta` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_qp_delta(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_qp_delta(segment, 0L, value); } + /// Sets `slice_qp_delta` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_qp_deltaAt(long index, @CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_qp_delta(this.segment(), index, value); return this; } + /// Sets `slice_qp_delta` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader slice_qp_delta(@CType("int8_t") byte value) { StdVideoEncodeH265SliceSegmentHeader.set_slice_qp_delta(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_reserved1(MemorySegment segment, long index) { return (short) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_reserved1(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint16_t") short reserved1At(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint16_t") short reserved1() { return StdVideoEncodeH265SliceSegmentHeader.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH265SliceSegmentHeader.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader reserved1At(long index, @CType("uint16_t") short value) { StdVideoEncodeH265SliceSegmentHeader.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader reserved1(@CType("uint16_t") short value) { StdVideoEncodeH265SliceSegmentHeader.set_reserved1(this.segment(), value); return this; } + + /// {@return `pWeightTable` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoEncodeH265WeightTable *") java.lang.foreign.MemorySegment get_pWeightTable(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pWeightTable.get(segment, 0L, index); } + /// {@return `pWeightTable`} + /// @param segment the segment of the struct + public static @CType("const StdVideoEncodeH265WeightTable *") java.lang.foreign.MemorySegment get_pWeightTable(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeader.get_pWeightTable(segment, 0L); } + /// {@return `pWeightTable` at the given index} + /// @param index the index + public @CType("const StdVideoEncodeH265WeightTable *") java.lang.foreign.MemorySegment pWeightTableAt(long index) { return StdVideoEncodeH265SliceSegmentHeader.get_pWeightTable(this.segment(), index); } + /// {@return `pWeightTable`} + public @CType("const StdVideoEncodeH265WeightTable *") java.lang.foreign.MemorySegment pWeightTable() { return StdVideoEncodeH265SliceSegmentHeader.get_pWeightTable(this.segment()); } + /// Sets `pWeightTable` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pWeightTable(MemorySegment segment, long index, @CType("const StdVideoEncodeH265WeightTable *") java.lang.foreign.MemorySegment value) { VH_pWeightTable.set(segment, 0L, index, value); } + /// Sets `pWeightTable` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pWeightTable(MemorySegment segment, @CType("const StdVideoEncodeH265WeightTable *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265SliceSegmentHeader.set_pWeightTable(segment, 0L, value); } + /// Sets `pWeightTable` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader pWeightTableAt(long index, @CType("const StdVideoEncodeH265WeightTable *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265SliceSegmentHeader.set_pWeightTable(this.segment(), index, value); return this; } + /// Sets `pWeightTable` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeader pWeightTable(@CType("const StdVideoEncodeH265WeightTable *") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265SliceSegmentHeader.set_pWeightTable(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265SliceSegmentHeaderFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265SliceSegmentHeaderFlags.java new file mode 100644 index 00000000..ec1a0b99 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265SliceSegmentHeaderFlags.java @@ -0,0 +1,555 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### first_slice_segment_in_pic_flag +/// [VarHandle][#VH_first_slice_segment_in_pic_flag] - [Getter][#first_slice_segment_in_pic_flag()] - [Setter][#first_slice_segment_in_pic_flag(int)] +/// ### dependent_slice_segment_flag +/// [VarHandle][#VH_dependent_slice_segment_flag] - [Getter][#dependent_slice_segment_flag()] - [Setter][#dependent_slice_segment_flag(int)] +/// ### slice_sao_luma_flag +/// [VarHandle][#VH_slice_sao_luma_flag] - [Getter][#slice_sao_luma_flag()] - [Setter][#slice_sao_luma_flag(int)] +/// ### slice_sao_chroma_flag +/// [VarHandle][#VH_slice_sao_chroma_flag] - [Getter][#slice_sao_chroma_flag()] - [Setter][#slice_sao_chroma_flag(int)] +/// ### num_ref_idx_active_override_flag +/// [VarHandle][#VH_num_ref_idx_active_override_flag] - [Getter][#num_ref_idx_active_override_flag()] - [Setter][#num_ref_idx_active_override_flag(int)] +/// ### mvd_l1_zero_flag +/// [VarHandle][#VH_mvd_l1_zero_flag] - [Getter][#mvd_l1_zero_flag()] - [Setter][#mvd_l1_zero_flag(int)] +/// ### cabac_init_flag +/// [VarHandle][#VH_cabac_init_flag] - [Getter][#cabac_init_flag()] - [Setter][#cabac_init_flag(int)] +/// ### cu_chroma_qp_offset_enabled_flag +/// [VarHandle][#VH_cu_chroma_qp_offset_enabled_flag] - [Getter][#cu_chroma_qp_offset_enabled_flag()] - [Setter][#cu_chroma_qp_offset_enabled_flag(int)] +/// ### deblocking_filter_override_flag +/// [VarHandle][#VH_deblocking_filter_override_flag] - [Getter][#deblocking_filter_override_flag()] - [Setter][#deblocking_filter_override_flag(int)] +/// ### slice_deblocking_filter_disabled_flag +/// [VarHandle][#VH_slice_deblocking_filter_disabled_flag] - [Getter][#slice_deblocking_filter_disabled_flag()] - [Setter][#slice_deblocking_filter_disabled_flag(int)] +/// ### collocated_from_l0_flag +/// [VarHandle][#VH_collocated_from_l0_flag] - [Getter][#collocated_from_l0_flag()] - [Setter][#collocated_from_l0_flag(int)] +/// ### slice_loop_filter_across_slices_enabled_flag +/// [VarHandle][#VH_slice_loop_filter_across_slices_enabled_flag] - [Getter][#slice_loop_filter_across_slices_enabled_flag()] - [Setter][#slice_loop_filter_across_slices_enabled_flag(int)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265SliceSegmentHeaderFlags { +/// uint32_t : 1 first_slice_segment_in_pic_flag; +/// uint32_t : 1 dependent_slice_segment_flag; +/// uint32_t : 1 slice_sao_luma_flag; +/// uint32_t : 1 slice_sao_chroma_flag; +/// uint32_t : 1 num_ref_idx_active_override_flag; +/// uint32_t : 1 mvd_l1_zero_flag; +/// uint32_t : 1 cabac_init_flag; +/// uint32_t : 1 cu_chroma_qp_offset_enabled_flag; +/// uint32_t : 1 deblocking_filter_override_flag; +/// uint32_t : 1 slice_deblocking_filter_disabled_flag; +/// uint32_t : 1 collocated_from_l0_flag; +/// uint32_t : 1 slice_loop_filter_across_slices_enabled_flag; +/// uint32_t : 20 reserved; +/// } StdVideoEncodeH265SliceSegmentHeaderFlags; +/// ``` +public final class StdVideoEncodeH265SliceSegmentHeaderFlags extends Struct { + /// The struct layout of `StdVideoEncodeH265SliceSegmentHeaderFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("first_slice_segment_in_pic_flag"), + ValueLayout.JAVA_INT.withName("dependent_slice_segment_flag"), + ValueLayout.JAVA_INT.withName("slice_sao_luma_flag"), + ValueLayout.JAVA_INT.withName("slice_sao_chroma_flag"), + ValueLayout.JAVA_INT.withName("num_ref_idx_active_override_flag"), + ValueLayout.JAVA_INT.withName("mvd_l1_zero_flag"), + ValueLayout.JAVA_INT.withName("cabac_init_flag"), + ValueLayout.JAVA_INT.withName("cu_chroma_qp_offset_enabled_flag"), + ValueLayout.JAVA_INT.withName("deblocking_filter_override_flag"), + ValueLayout.JAVA_INT.withName("slice_deblocking_filter_disabled_flag"), + ValueLayout.JAVA_INT.withName("collocated_from_l0_flag"), + ValueLayout.JAVA_INT.withName("slice_loop_filter_across_slices_enabled_flag"), + ValueLayout.JAVA_INT.withName("reserved") + ); + /// The [VarHandle] of `first_slice_segment_in_pic_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_first_slice_segment_in_pic_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("first_slice_segment_in_pic_flag")); + /// The [VarHandle] of `dependent_slice_segment_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dependent_slice_segment_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dependent_slice_segment_flag")); + /// The [VarHandle] of `slice_sao_luma_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_slice_sao_luma_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_sao_luma_flag")); + /// The [VarHandle] of `slice_sao_chroma_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_slice_sao_chroma_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_sao_chroma_flag")); + /// The [VarHandle] of `num_ref_idx_active_override_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_num_ref_idx_active_override_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_idx_active_override_flag")); + /// The [VarHandle] of `mvd_l1_zero_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mvd_l1_zero_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mvd_l1_zero_flag")); + /// The [VarHandle] of `cabac_init_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cabac_init_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cabac_init_flag")); + /// The [VarHandle] of `cu_chroma_qp_offset_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cu_chroma_qp_offset_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cu_chroma_qp_offset_enabled_flag")); + /// The [VarHandle] of `deblocking_filter_override_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deblocking_filter_override_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deblocking_filter_override_flag")); + /// The [VarHandle] of `slice_deblocking_filter_disabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_slice_deblocking_filter_disabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_deblocking_filter_disabled_flag")); + /// The [VarHandle] of `collocated_from_l0_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_collocated_from_l0_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("collocated_from_l0_flag")); + /// The [VarHandle] of `slice_loop_filter_across_slices_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_slice_loop_filter_across_slices_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_loop_filter_across_slices_enabled_flag")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + + /// Creates `StdVideoEncodeH265SliceSegmentHeaderFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265SliceSegmentHeaderFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265SliceSegmentHeaderFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265SliceSegmentHeaderFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265SliceSegmentHeaderFlags(segment); } + + /// Creates `StdVideoEncodeH265SliceSegmentHeaderFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265SliceSegmentHeaderFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265SliceSegmentHeaderFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265SliceSegmentHeaderFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265SliceSegmentHeaderFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265SliceSegmentHeaderFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265SliceSegmentHeaderFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265SliceSegmentHeaderFlags` + public static StdVideoEncodeH265SliceSegmentHeaderFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265SliceSegmentHeaderFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265SliceSegmentHeaderFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265SliceSegmentHeaderFlags` + public static StdVideoEncodeH265SliceSegmentHeaderFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265SliceSegmentHeaderFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `first_slice_segment_in_pic_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_first_slice_segment_in_pic_flag(MemorySegment segment, long index) { return (int) VH_first_slice_segment_in_pic_flag.get(segment, 0L, index); } + /// {@return `first_slice_segment_in_pic_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_first_slice_segment_in_pic_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_first_slice_segment_in_pic_flag(segment, 0L); } + /// {@return `first_slice_segment_in_pic_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int first_slice_segment_in_pic_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_first_slice_segment_in_pic_flag(this.segment(), index); } + /// {@return `first_slice_segment_in_pic_flag`} + public @CType("uint32_t : 1") int first_slice_segment_in_pic_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_first_slice_segment_in_pic_flag(this.segment()); } + /// Sets `first_slice_segment_in_pic_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_first_slice_segment_in_pic_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_first_slice_segment_in_pic_flag.set(segment, 0L, index, value); } + /// Sets `first_slice_segment_in_pic_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_first_slice_segment_in_pic_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_first_slice_segment_in_pic_flag(segment, 0L, value); } + /// Sets `first_slice_segment_in_pic_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags first_slice_segment_in_pic_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_first_slice_segment_in_pic_flag(this.segment(), index, value); return this; } + /// Sets `first_slice_segment_in_pic_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags first_slice_segment_in_pic_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_first_slice_segment_in_pic_flag(this.segment(), value); return this; } + + /// {@return `dependent_slice_segment_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_dependent_slice_segment_flag(MemorySegment segment, long index) { return (int) VH_dependent_slice_segment_flag.get(segment, 0L, index); } + /// {@return `dependent_slice_segment_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_dependent_slice_segment_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_dependent_slice_segment_flag(segment, 0L); } + /// {@return `dependent_slice_segment_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int dependent_slice_segment_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_dependent_slice_segment_flag(this.segment(), index); } + /// {@return `dependent_slice_segment_flag`} + public @CType("uint32_t : 1") int dependent_slice_segment_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_dependent_slice_segment_flag(this.segment()); } + /// Sets `dependent_slice_segment_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dependent_slice_segment_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_dependent_slice_segment_flag.set(segment, 0L, index, value); } + /// Sets `dependent_slice_segment_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dependent_slice_segment_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_dependent_slice_segment_flag(segment, 0L, value); } + /// Sets `dependent_slice_segment_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags dependent_slice_segment_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_dependent_slice_segment_flag(this.segment(), index, value); return this; } + /// Sets `dependent_slice_segment_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags dependent_slice_segment_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_dependent_slice_segment_flag(this.segment(), value); return this; } + + /// {@return `slice_sao_luma_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_slice_sao_luma_flag(MemorySegment segment, long index) { return (int) VH_slice_sao_luma_flag.get(segment, 0L, index); } + /// {@return `slice_sao_luma_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_slice_sao_luma_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_sao_luma_flag(segment, 0L); } + /// {@return `slice_sao_luma_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int slice_sao_luma_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_sao_luma_flag(this.segment(), index); } + /// {@return `slice_sao_luma_flag`} + public @CType("uint32_t : 1") int slice_sao_luma_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_sao_luma_flag(this.segment()); } + /// Sets `slice_sao_luma_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_sao_luma_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_slice_sao_luma_flag.set(segment, 0L, index, value); } + /// Sets `slice_sao_luma_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_sao_luma_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_sao_luma_flag(segment, 0L, value); } + /// Sets `slice_sao_luma_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags slice_sao_luma_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_sao_luma_flag(this.segment(), index, value); return this; } + /// Sets `slice_sao_luma_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags slice_sao_luma_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_sao_luma_flag(this.segment(), value); return this; } + + /// {@return `slice_sao_chroma_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_slice_sao_chroma_flag(MemorySegment segment, long index) { return (int) VH_slice_sao_chroma_flag.get(segment, 0L, index); } + /// {@return `slice_sao_chroma_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_slice_sao_chroma_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_sao_chroma_flag(segment, 0L); } + /// {@return `slice_sao_chroma_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int slice_sao_chroma_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_sao_chroma_flag(this.segment(), index); } + /// {@return `slice_sao_chroma_flag`} + public @CType("uint32_t : 1") int slice_sao_chroma_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_sao_chroma_flag(this.segment()); } + /// Sets `slice_sao_chroma_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_sao_chroma_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_slice_sao_chroma_flag.set(segment, 0L, index, value); } + /// Sets `slice_sao_chroma_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_sao_chroma_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_sao_chroma_flag(segment, 0L, value); } + /// Sets `slice_sao_chroma_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags slice_sao_chroma_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_sao_chroma_flag(this.segment(), index, value); return this; } + /// Sets `slice_sao_chroma_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags slice_sao_chroma_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_sao_chroma_flag(this.segment(), value); return this; } + + /// {@return `num_ref_idx_active_override_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_num_ref_idx_active_override_flag(MemorySegment segment, long index) { return (int) VH_num_ref_idx_active_override_flag.get(segment, 0L, index); } + /// {@return `num_ref_idx_active_override_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_num_ref_idx_active_override_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_num_ref_idx_active_override_flag(segment, 0L); } + /// {@return `num_ref_idx_active_override_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int num_ref_idx_active_override_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_num_ref_idx_active_override_flag(this.segment(), index); } + /// {@return `num_ref_idx_active_override_flag`} + public @CType("uint32_t : 1") int num_ref_idx_active_override_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_num_ref_idx_active_override_flag(this.segment()); } + /// Sets `num_ref_idx_active_override_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_idx_active_override_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_num_ref_idx_active_override_flag.set(segment, 0L, index, value); } + /// Sets `num_ref_idx_active_override_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_idx_active_override_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_num_ref_idx_active_override_flag(segment, 0L, value); } + /// Sets `num_ref_idx_active_override_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags num_ref_idx_active_override_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_num_ref_idx_active_override_flag(this.segment(), index, value); return this; } + /// Sets `num_ref_idx_active_override_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags num_ref_idx_active_override_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_num_ref_idx_active_override_flag(this.segment(), value); return this; } + + /// {@return `mvd_l1_zero_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_mvd_l1_zero_flag(MemorySegment segment, long index) { return (int) VH_mvd_l1_zero_flag.get(segment, 0L, index); } + /// {@return `mvd_l1_zero_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_mvd_l1_zero_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_mvd_l1_zero_flag(segment, 0L); } + /// {@return `mvd_l1_zero_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int mvd_l1_zero_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_mvd_l1_zero_flag(this.segment(), index); } + /// {@return `mvd_l1_zero_flag`} + public @CType("uint32_t : 1") int mvd_l1_zero_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_mvd_l1_zero_flag(this.segment()); } + /// Sets `mvd_l1_zero_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mvd_l1_zero_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_mvd_l1_zero_flag.set(segment, 0L, index, value); } + /// Sets `mvd_l1_zero_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mvd_l1_zero_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_mvd_l1_zero_flag(segment, 0L, value); } + /// Sets `mvd_l1_zero_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags mvd_l1_zero_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_mvd_l1_zero_flag(this.segment(), index, value); return this; } + /// Sets `mvd_l1_zero_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags mvd_l1_zero_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_mvd_l1_zero_flag(this.segment(), value); return this; } + + /// {@return `cabac_init_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_cabac_init_flag(MemorySegment segment, long index) { return (int) VH_cabac_init_flag.get(segment, 0L, index); } + /// {@return `cabac_init_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_cabac_init_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_cabac_init_flag(segment, 0L); } + /// {@return `cabac_init_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int cabac_init_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_cabac_init_flag(this.segment(), index); } + /// {@return `cabac_init_flag`} + public @CType("uint32_t : 1") int cabac_init_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_cabac_init_flag(this.segment()); } + /// Sets `cabac_init_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cabac_init_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_cabac_init_flag.set(segment, 0L, index, value); } + /// Sets `cabac_init_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cabac_init_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_cabac_init_flag(segment, 0L, value); } + /// Sets `cabac_init_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags cabac_init_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_cabac_init_flag(this.segment(), index, value); return this; } + /// Sets `cabac_init_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags cabac_init_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_cabac_init_flag(this.segment(), value); return this; } + + /// {@return `cu_chroma_qp_offset_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_cu_chroma_qp_offset_enabled_flag(MemorySegment segment, long index) { return (int) VH_cu_chroma_qp_offset_enabled_flag.get(segment, 0L, index); } + /// {@return `cu_chroma_qp_offset_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_cu_chroma_qp_offset_enabled_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_cu_chroma_qp_offset_enabled_flag(segment, 0L); } + /// {@return `cu_chroma_qp_offset_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int cu_chroma_qp_offset_enabled_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_cu_chroma_qp_offset_enabled_flag(this.segment(), index); } + /// {@return `cu_chroma_qp_offset_enabled_flag`} + public @CType("uint32_t : 1") int cu_chroma_qp_offset_enabled_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_cu_chroma_qp_offset_enabled_flag(this.segment()); } + /// Sets `cu_chroma_qp_offset_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cu_chroma_qp_offset_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_cu_chroma_qp_offset_enabled_flag.set(segment, 0L, index, value); } + /// Sets `cu_chroma_qp_offset_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cu_chroma_qp_offset_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_cu_chroma_qp_offset_enabled_flag(segment, 0L, value); } + /// Sets `cu_chroma_qp_offset_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags cu_chroma_qp_offset_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_cu_chroma_qp_offset_enabled_flag(this.segment(), index, value); return this; } + /// Sets `cu_chroma_qp_offset_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags cu_chroma_qp_offset_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_cu_chroma_qp_offset_enabled_flag(this.segment(), value); return this; } + + /// {@return `deblocking_filter_override_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_deblocking_filter_override_flag(MemorySegment segment, long index) { return (int) VH_deblocking_filter_override_flag.get(segment, 0L, index); } + /// {@return `deblocking_filter_override_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_deblocking_filter_override_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_deblocking_filter_override_flag(segment, 0L); } + /// {@return `deblocking_filter_override_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int deblocking_filter_override_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_deblocking_filter_override_flag(this.segment(), index); } + /// {@return `deblocking_filter_override_flag`} + public @CType("uint32_t : 1") int deblocking_filter_override_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_deblocking_filter_override_flag(this.segment()); } + /// Sets `deblocking_filter_override_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deblocking_filter_override_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_deblocking_filter_override_flag.set(segment, 0L, index, value); } + /// Sets `deblocking_filter_override_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deblocking_filter_override_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_deblocking_filter_override_flag(segment, 0L, value); } + /// Sets `deblocking_filter_override_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags deblocking_filter_override_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_deblocking_filter_override_flag(this.segment(), index, value); return this; } + /// Sets `deblocking_filter_override_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags deblocking_filter_override_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_deblocking_filter_override_flag(this.segment(), value); return this; } + + /// {@return `slice_deblocking_filter_disabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_slice_deblocking_filter_disabled_flag(MemorySegment segment, long index) { return (int) VH_slice_deblocking_filter_disabled_flag.get(segment, 0L, index); } + /// {@return `slice_deblocking_filter_disabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_slice_deblocking_filter_disabled_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_deblocking_filter_disabled_flag(segment, 0L); } + /// {@return `slice_deblocking_filter_disabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int slice_deblocking_filter_disabled_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_deblocking_filter_disabled_flag(this.segment(), index); } + /// {@return `slice_deblocking_filter_disabled_flag`} + public @CType("uint32_t : 1") int slice_deblocking_filter_disabled_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_deblocking_filter_disabled_flag(this.segment()); } + /// Sets `slice_deblocking_filter_disabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_deblocking_filter_disabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_slice_deblocking_filter_disabled_flag.set(segment, 0L, index, value); } + /// Sets `slice_deblocking_filter_disabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_deblocking_filter_disabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_deblocking_filter_disabled_flag(segment, 0L, value); } + /// Sets `slice_deblocking_filter_disabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags slice_deblocking_filter_disabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_deblocking_filter_disabled_flag(this.segment(), index, value); return this; } + /// Sets `slice_deblocking_filter_disabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags slice_deblocking_filter_disabled_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_deblocking_filter_disabled_flag(this.segment(), value); return this; } + + /// {@return `collocated_from_l0_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_collocated_from_l0_flag(MemorySegment segment, long index) { return (int) VH_collocated_from_l0_flag.get(segment, 0L, index); } + /// {@return `collocated_from_l0_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_collocated_from_l0_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_collocated_from_l0_flag(segment, 0L); } + /// {@return `collocated_from_l0_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int collocated_from_l0_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_collocated_from_l0_flag(this.segment(), index); } + /// {@return `collocated_from_l0_flag`} + public @CType("uint32_t : 1") int collocated_from_l0_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_collocated_from_l0_flag(this.segment()); } + /// Sets `collocated_from_l0_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_collocated_from_l0_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_collocated_from_l0_flag.set(segment, 0L, index, value); } + /// Sets `collocated_from_l0_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_collocated_from_l0_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_collocated_from_l0_flag(segment, 0L, value); } + /// Sets `collocated_from_l0_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags collocated_from_l0_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_collocated_from_l0_flag(this.segment(), index, value); return this; } + /// Sets `collocated_from_l0_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags collocated_from_l0_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_collocated_from_l0_flag(this.segment(), value); return this; } + + /// {@return `slice_loop_filter_across_slices_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_slice_loop_filter_across_slices_enabled_flag(MemorySegment segment, long index) { return (int) VH_slice_loop_filter_across_slices_enabled_flag.get(segment, 0L, index); } + /// {@return `slice_loop_filter_across_slices_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_slice_loop_filter_across_slices_enabled_flag(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_loop_filter_across_slices_enabled_flag(segment, 0L); } + /// {@return `slice_loop_filter_across_slices_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int slice_loop_filter_across_slices_enabled_flagAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_loop_filter_across_slices_enabled_flag(this.segment(), index); } + /// {@return `slice_loop_filter_across_slices_enabled_flag`} + public @CType("uint32_t : 1") int slice_loop_filter_across_slices_enabled_flag() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_slice_loop_filter_across_slices_enabled_flag(this.segment()); } + /// Sets `slice_loop_filter_across_slices_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_loop_filter_across_slices_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_slice_loop_filter_across_slices_enabled_flag.set(segment, 0L, index, value); } + /// Sets `slice_loop_filter_across_slices_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_loop_filter_across_slices_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_loop_filter_across_slices_enabled_flag(segment, 0L, value); } + /// Sets `slice_loop_filter_across_slices_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags slice_loop_filter_across_slices_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_loop_filter_across_slices_enabled_flag(this.segment(), index, value); return this; } + /// Sets `slice_loop_filter_across_slices_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags slice_loop_filter_across_slices_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_slice_loop_filter_across_slices_enabled_flag(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 20") int get_reserved(MemorySegment segment, long index) { return (int) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 20") int get_reserved(MemorySegment segment) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint32_t : 20") int reservedAt(long index) { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint32_t : 20") int reserved() { return StdVideoEncodeH265SliceSegmentHeaderFlags.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint32_t : 20") int value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint32_t : 20") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags reservedAt(long index, @CType("uint32_t : 20") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265SliceSegmentHeaderFlags reserved(@CType("uint32_t : 20") int value) { StdVideoEncodeH265SliceSegmentHeaderFlags.set_reserved(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265WeightTable.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265WeightTable.java new file mode 100644 index 00000000..ca378530 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265WeightTable.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### luma_log2_weight_denom +/// [VarHandle][#VH_luma_log2_weight_denom] - [Getter][#luma_log2_weight_denom()] - [Setter][#luma_log2_weight_denom(byte)] +/// ### delta_chroma_log2_weight_denom +/// [VarHandle][#VH_delta_chroma_log2_weight_denom] - [Getter][#delta_chroma_log2_weight_denom()] - [Setter][#delta_chroma_log2_weight_denom(byte)] +/// ### delta_luma_weight_l0 +/// [VarHandle][#VH_delta_luma_weight_l0] - [Getter][#delta_luma_weight_l0()] - [Setter][#delta_luma_weight_l0(byte)] +/// ### luma_offset_l0 +/// [VarHandle][#VH_luma_offset_l0] - [Getter][#luma_offset_l0()] - [Setter][#luma_offset_l0(byte)] +/// ### delta_chroma_weight_l0 +/// [VarHandle][#VH_delta_chroma_weight_l0] - [Getter][#delta_chroma_weight_l0()] - [Setter][#delta_chroma_weight_l0(byte)] +/// ### delta_chroma_offset_l0 +/// [VarHandle][#VH_delta_chroma_offset_l0] - [Getter][#delta_chroma_offset_l0()] - [Setter][#delta_chroma_offset_l0(byte)] +/// ### delta_luma_weight_l1 +/// [VarHandle][#VH_delta_luma_weight_l1] - [Getter][#delta_luma_weight_l1()] - [Setter][#delta_luma_weight_l1(byte)] +/// ### luma_offset_l1 +/// [VarHandle][#VH_luma_offset_l1] - [Getter][#luma_offset_l1()] - [Setter][#luma_offset_l1(byte)] +/// ### delta_chroma_weight_l1 +/// [VarHandle][#VH_delta_chroma_weight_l1] - [Getter][#delta_chroma_weight_l1()] - [Setter][#delta_chroma_weight_l1(byte)] +/// ### delta_chroma_offset_l1 +/// [VarHandle][#VH_delta_chroma_offset_l1] - [Getter][#delta_chroma_offset_l1()] - [Setter][#delta_chroma_offset_l1(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265WeightTable { +/// StdVideoEncodeH265WeightTableFlags flags; +/// uint8_t luma_log2_weight_denom; +/// int8_t delta_chroma_log2_weight_denom; +/// int8_t [ ] delta_luma_weight_l0; +/// int8_t [ ] luma_offset_l0; +/// int8_t [ ][ ] delta_chroma_weight_l0; +/// int8_t [ ][ ] delta_chroma_offset_l0; +/// int8_t [ ] delta_luma_weight_l1; +/// int8_t [ ] luma_offset_l1; +/// int8_t [ ][ ] delta_chroma_weight_l1; +/// int8_t [ ][ ] delta_chroma_offset_l1; +/// } StdVideoEncodeH265WeightTable; +/// ``` +public final class StdVideoEncodeH265WeightTable extends Struct { + /// The struct layout of `StdVideoEncodeH265WeightTable`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoEncodeH265WeightTableFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("luma_log2_weight_denom"), + ValueLayout.JAVA_BYTE.withName("delta_chroma_log2_weight_denom"), + ValueLayout.JAVA_BYTE.withName("delta_luma_weight_l0"), + ValueLayout.JAVA_BYTE.withName("luma_offset_l0"), + ValueLayout.JAVA_BYTE.withName("delta_chroma_weight_l0"), + ValueLayout.JAVA_BYTE.withName("delta_chroma_offset_l0"), + ValueLayout.JAVA_BYTE.withName("delta_luma_weight_l1"), + ValueLayout.JAVA_BYTE.withName("luma_offset_l1"), + ValueLayout.JAVA_BYTE.withName("delta_chroma_weight_l1"), + ValueLayout.JAVA_BYTE.withName("delta_chroma_offset_l1") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `luma_log2_weight_denom` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_luma_log2_weight_denom = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_log2_weight_denom")); + /// The [VarHandle] of `delta_chroma_log2_weight_denom` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_chroma_log2_weight_denom = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_chroma_log2_weight_denom")); + /// The [VarHandle] of `delta_luma_weight_l0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_luma_weight_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_luma_weight_l0")); + /// The [VarHandle] of `luma_offset_l0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_luma_offset_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_offset_l0")); + /// The [VarHandle] of `delta_chroma_weight_l0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_chroma_weight_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_chroma_weight_l0")); + /// The [VarHandle] of `delta_chroma_offset_l0` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_chroma_offset_l0 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_chroma_offset_l0")); + /// The [VarHandle] of `delta_luma_weight_l1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_luma_weight_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_luma_weight_l1")); + /// The [VarHandle] of `luma_offset_l1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_luma_offset_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_offset_l1")); + /// The [VarHandle] of `delta_chroma_weight_l1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_chroma_weight_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_chroma_weight_l1")); + /// The [VarHandle] of `delta_chroma_offset_l1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_chroma_offset_l1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_chroma_offset_l1")); + + /// Creates `StdVideoEncodeH265WeightTable` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265WeightTable(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265WeightTable` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265WeightTable of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265WeightTable(segment); } + + /// Creates `StdVideoEncodeH265WeightTable` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265WeightTable ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265WeightTable(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265WeightTable` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265WeightTable ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265WeightTable(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265WeightTable` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265WeightTable` + public static StdVideoEncodeH265WeightTable alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265WeightTable(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265WeightTable` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265WeightTable` + public static StdVideoEncodeH265WeightTable alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265WeightTable(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoEncodeH265WeightTableFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoEncodeH265WeightTableFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoEncodeH265WeightTableFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoEncodeH265WeightTable.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoEncodeH265WeightTableFlags") java.lang.foreign.MemorySegment flags() { return StdVideoEncodeH265WeightTable.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoEncodeH265WeightTableFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoEncodeH265WeightTableFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265WeightTable.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable flagsAt(long index, @CType("StdVideoEncodeH265WeightTableFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265WeightTable.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable flags(@CType("StdVideoEncodeH265WeightTableFlags") java.lang.foreign.MemorySegment value) { StdVideoEncodeH265WeightTable.set_flags(this.segment(), value); return this; } + + /// {@return `luma_log2_weight_denom` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_luma_log2_weight_denom(MemorySegment segment, long index) { return (byte) VH_luma_log2_weight_denom.get(segment, 0L, index); } + /// {@return `luma_log2_weight_denom`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_luma_log2_weight_denom(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_luma_log2_weight_denom(segment, 0L); } + /// {@return `luma_log2_weight_denom` at the given index} + /// @param index the index + public @CType("uint8_t") byte luma_log2_weight_denomAt(long index) { return StdVideoEncodeH265WeightTable.get_luma_log2_weight_denom(this.segment(), index); } + /// {@return `luma_log2_weight_denom`} + public @CType("uint8_t") byte luma_log2_weight_denom() { return StdVideoEncodeH265WeightTable.get_luma_log2_weight_denom(this.segment()); } + /// Sets `luma_log2_weight_denom` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_log2_weight_denom(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_luma_log2_weight_denom.set(segment, 0L, index, value); } + /// Sets `luma_log2_weight_denom` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_log2_weight_denom(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoEncodeH265WeightTable.set_luma_log2_weight_denom(segment, 0L, value); } + /// Sets `luma_log2_weight_denom` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable luma_log2_weight_denomAt(long index, @CType("uint8_t") byte value) { StdVideoEncodeH265WeightTable.set_luma_log2_weight_denom(this.segment(), index, value); return this; } + /// Sets `luma_log2_weight_denom` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable luma_log2_weight_denom(@CType("uint8_t") byte value) { StdVideoEncodeH265WeightTable.set_luma_log2_weight_denom(this.segment(), value); return this; } + + /// {@return `delta_chroma_log2_weight_denom` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_delta_chroma_log2_weight_denom(MemorySegment segment, long index) { return (byte) VH_delta_chroma_log2_weight_denom.get(segment, 0L, index); } + /// {@return `delta_chroma_log2_weight_denom`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_delta_chroma_log2_weight_denom(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_delta_chroma_log2_weight_denom(segment, 0L); } + /// {@return `delta_chroma_log2_weight_denom` at the given index} + /// @param index the index + public @CType("int8_t") byte delta_chroma_log2_weight_denomAt(long index) { return StdVideoEncodeH265WeightTable.get_delta_chroma_log2_weight_denom(this.segment(), index); } + /// {@return `delta_chroma_log2_weight_denom`} + public @CType("int8_t") byte delta_chroma_log2_weight_denom() { return StdVideoEncodeH265WeightTable.get_delta_chroma_log2_weight_denom(this.segment()); } + /// Sets `delta_chroma_log2_weight_denom` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_chroma_log2_weight_denom(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_delta_chroma_log2_weight_denom.set(segment, 0L, index, value); } + /// Sets `delta_chroma_log2_weight_denom` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_chroma_log2_weight_denom(MemorySegment segment, @CType("int8_t") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_log2_weight_denom(segment, 0L, value); } + /// Sets `delta_chroma_log2_weight_denom` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_chroma_log2_weight_denomAt(long index, @CType("int8_t") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_log2_weight_denom(this.segment(), index, value); return this; } + /// Sets `delta_chroma_log2_weight_denom` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_chroma_log2_weight_denom(@CType("int8_t") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_log2_weight_denom(this.segment(), value); return this; } + + /// {@return `delta_luma_weight_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_delta_luma_weight_l0(MemorySegment segment, long index) { return (byte) VH_delta_luma_weight_l0.get(segment, 0L, index); } + /// {@return `delta_luma_weight_l0`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_delta_luma_weight_l0(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_delta_luma_weight_l0(segment, 0L); } + /// {@return `delta_luma_weight_l0` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte delta_luma_weight_l0At(long index) { return StdVideoEncodeH265WeightTable.get_delta_luma_weight_l0(this.segment(), index); } + /// {@return `delta_luma_weight_l0`} + public @CType("int8_t [ ]") byte delta_luma_weight_l0() { return StdVideoEncodeH265WeightTable.get_delta_luma_weight_l0(this.segment()); } + /// Sets `delta_luma_weight_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_luma_weight_l0(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_delta_luma_weight_l0.set(segment, 0L, index, value); } + /// Sets `delta_luma_weight_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_luma_weight_l0(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_luma_weight_l0(segment, 0L, value); } + /// Sets `delta_luma_weight_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_luma_weight_l0At(long index, @CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_luma_weight_l0(this.segment(), index, value); return this; } + /// Sets `delta_luma_weight_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_luma_weight_l0(@CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_luma_weight_l0(this.segment(), value); return this; } + + /// {@return `luma_offset_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_luma_offset_l0(MemorySegment segment, long index) { return (byte) VH_luma_offset_l0.get(segment, 0L, index); } + /// {@return `luma_offset_l0`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_luma_offset_l0(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_luma_offset_l0(segment, 0L); } + /// {@return `luma_offset_l0` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte luma_offset_l0At(long index) { return StdVideoEncodeH265WeightTable.get_luma_offset_l0(this.segment(), index); } + /// {@return `luma_offset_l0`} + public @CType("int8_t [ ]") byte luma_offset_l0() { return StdVideoEncodeH265WeightTable.get_luma_offset_l0(this.segment()); } + /// Sets `luma_offset_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_offset_l0(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_luma_offset_l0.set(segment, 0L, index, value); } + /// Sets `luma_offset_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_offset_l0(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_luma_offset_l0(segment, 0L, value); } + /// Sets `luma_offset_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable luma_offset_l0At(long index, @CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_luma_offset_l0(this.segment(), index, value); return this; } + /// Sets `luma_offset_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable luma_offset_l0(@CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_luma_offset_l0(this.segment(), value); return this; } + + /// {@return `delta_chroma_weight_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ][ ]") byte get_delta_chroma_weight_l0(MemorySegment segment, long index) { return (byte) VH_delta_chroma_weight_l0.get(segment, 0L, index); } + /// {@return `delta_chroma_weight_l0`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ][ ]") byte get_delta_chroma_weight_l0(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_delta_chroma_weight_l0(segment, 0L); } + /// {@return `delta_chroma_weight_l0` at the given index} + /// @param index the index + public @CType("int8_t [ ][ ]") byte delta_chroma_weight_l0At(long index) { return StdVideoEncodeH265WeightTable.get_delta_chroma_weight_l0(this.segment(), index); } + /// {@return `delta_chroma_weight_l0`} + public @CType("int8_t [ ][ ]") byte delta_chroma_weight_l0() { return StdVideoEncodeH265WeightTable.get_delta_chroma_weight_l0(this.segment()); } + /// Sets `delta_chroma_weight_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_chroma_weight_l0(MemorySegment segment, long index, @CType("int8_t [ ][ ]") byte value) { VH_delta_chroma_weight_l0.set(segment, 0L, index, value); } + /// Sets `delta_chroma_weight_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_chroma_weight_l0(MemorySegment segment, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_weight_l0(segment, 0L, value); } + /// Sets `delta_chroma_weight_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_chroma_weight_l0At(long index, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_weight_l0(this.segment(), index, value); return this; } + /// Sets `delta_chroma_weight_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_chroma_weight_l0(@CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_weight_l0(this.segment(), value); return this; } + + /// {@return `delta_chroma_offset_l0` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ][ ]") byte get_delta_chroma_offset_l0(MemorySegment segment, long index) { return (byte) VH_delta_chroma_offset_l0.get(segment, 0L, index); } + /// {@return `delta_chroma_offset_l0`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ][ ]") byte get_delta_chroma_offset_l0(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_delta_chroma_offset_l0(segment, 0L); } + /// {@return `delta_chroma_offset_l0` at the given index} + /// @param index the index + public @CType("int8_t [ ][ ]") byte delta_chroma_offset_l0At(long index) { return StdVideoEncodeH265WeightTable.get_delta_chroma_offset_l0(this.segment(), index); } + /// {@return `delta_chroma_offset_l0`} + public @CType("int8_t [ ][ ]") byte delta_chroma_offset_l0() { return StdVideoEncodeH265WeightTable.get_delta_chroma_offset_l0(this.segment()); } + /// Sets `delta_chroma_offset_l0` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_chroma_offset_l0(MemorySegment segment, long index, @CType("int8_t [ ][ ]") byte value) { VH_delta_chroma_offset_l0.set(segment, 0L, index, value); } + /// Sets `delta_chroma_offset_l0` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_chroma_offset_l0(MemorySegment segment, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_offset_l0(segment, 0L, value); } + /// Sets `delta_chroma_offset_l0` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_chroma_offset_l0At(long index, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_offset_l0(this.segment(), index, value); return this; } + /// Sets `delta_chroma_offset_l0` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_chroma_offset_l0(@CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_offset_l0(this.segment(), value); return this; } + + /// {@return `delta_luma_weight_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_delta_luma_weight_l1(MemorySegment segment, long index) { return (byte) VH_delta_luma_weight_l1.get(segment, 0L, index); } + /// {@return `delta_luma_weight_l1`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_delta_luma_weight_l1(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_delta_luma_weight_l1(segment, 0L); } + /// {@return `delta_luma_weight_l1` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte delta_luma_weight_l1At(long index) { return StdVideoEncodeH265WeightTable.get_delta_luma_weight_l1(this.segment(), index); } + /// {@return `delta_luma_weight_l1`} + public @CType("int8_t [ ]") byte delta_luma_weight_l1() { return StdVideoEncodeH265WeightTable.get_delta_luma_weight_l1(this.segment()); } + /// Sets `delta_luma_weight_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_luma_weight_l1(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_delta_luma_weight_l1.set(segment, 0L, index, value); } + /// Sets `delta_luma_weight_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_luma_weight_l1(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_luma_weight_l1(segment, 0L, value); } + /// Sets `delta_luma_weight_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_luma_weight_l1At(long index, @CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_luma_weight_l1(this.segment(), index, value); return this; } + /// Sets `delta_luma_weight_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_luma_weight_l1(@CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_luma_weight_l1(this.segment(), value); return this; } + + /// {@return `luma_offset_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_luma_offset_l1(MemorySegment segment, long index) { return (byte) VH_luma_offset_l1.get(segment, 0L, index); } + /// {@return `luma_offset_l1`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_luma_offset_l1(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_luma_offset_l1(segment, 0L); } + /// {@return `luma_offset_l1` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte luma_offset_l1At(long index) { return StdVideoEncodeH265WeightTable.get_luma_offset_l1(this.segment(), index); } + /// {@return `luma_offset_l1`} + public @CType("int8_t [ ]") byte luma_offset_l1() { return StdVideoEncodeH265WeightTable.get_luma_offset_l1(this.segment()); } + /// Sets `luma_offset_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_offset_l1(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_luma_offset_l1.set(segment, 0L, index, value); } + /// Sets `luma_offset_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_offset_l1(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_luma_offset_l1(segment, 0L, value); } + /// Sets `luma_offset_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable luma_offset_l1At(long index, @CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_luma_offset_l1(this.segment(), index, value); return this; } + /// Sets `luma_offset_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable luma_offset_l1(@CType("int8_t [ ]") byte value) { StdVideoEncodeH265WeightTable.set_luma_offset_l1(this.segment(), value); return this; } + + /// {@return `delta_chroma_weight_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ][ ]") byte get_delta_chroma_weight_l1(MemorySegment segment, long index) { return (byte) VH_delta_chroma_weight_l1.get(segment, 0L, index); } + /// {@return `delta_chroma_weight_l1`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ][ ]") byte get_delta_chroma_weight_l1(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_delta_chroma_weight_l1(segment, 0L); } + /// {@return `delta_chroma_weight_l1` at the given index} + /// @param index the index + public @CType("int8_t [ ][ ]") byte delta_chroma_weight_l1At(long index) { return StdVideoEncodeH265WeightTable.get_delta_chroma_weight_l1(this.segment(), index); } + /// {@return `delta_chroma_weight_l1`} + public @CType("int8_t [ ][ ]") byte delta_chroma_weight_l1() { return StdVideoEncodeH265WeightTable.get_delta_chroma_weight_l1(this.segment()); } + /// Sets `delta_chroma_weight_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_chroma_weight_l1(MemorySegment segment, long index, @CType("int8_t [ ][ ]") byte value) { VH_delta_chroma_weight_l1.set(segment, 0L, index, value); } + /// Sets `delta_chroma_weight_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_chroma_weight_l1(MemorySegment segment, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_weight_l1(segment, 0L, value); } + /// Sets `delta_chroma_weight_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_chroma_weight_l1At(long index, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_weight_l1(this.segment(), index, value); return this; } + /// Sets `delta_chroma_weight_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_chroma_weight_l1(@CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_weight_l1(this.segment(), value); return this; } + + /// {@return `delta_chroma_offset_l1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ][ ]") byte get_delta_chroma_offset_l1(MemorySegment segment, long index) { return (byte) VH_delta_chroma_offset_l1.get(segment, 0L, index); } + /// {@return `delta_chroma_offset_l1`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ][ ]") byte get_delta_chroma_offset_l1(MemorySegment segment) { return StdVideoEncodeH265WeightTable.get_delta_chroma_offset_l1(segment, 0L); } + /// {@return `delta_chroma_offset_l1` at the given index} + /// @param index the index + public @CType("int8_t [ ][ ]") byte delta_chroma_offset_l1At(long index) { return StdVideoEncodeH265WeightTable.get_delta_chroma_offset_l1(this.segment(), index); } + /// {@return `delta_chroma_offset_l1`} + public @CType("int8_t [ ][ ]") byte delta_chroma_offset_l1() { return StdVideoEncodeH265WeightTable.get_delta_chroma_offset_l1(this.segment()); } + /// Sets `delta_chroma_offset_l1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_chroma_offset_l1(MemorySegment segment, long index, @CType("int8_t [ ][ ]") byte value) { VH_delta_chroma_offset_l1.set(segment, 0L, index, value); } + /// Sets `delta_chroma_offset_l1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_chroma_offset_l1(MemorySegment segment, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_offset_l1(segment, 0L, value); } + /// Sets `delta_chroma_offset_l1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_chroma_offset_l1At(long index, @CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_offset_l1(this.segment(), index, value); return this; } + /// Sets `delta_chroma_offset_l1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTable delta_chroma_offset_l1(@CType("int8_t [ ][ ]") byte value) { StdVideoEncodeH265WeightTable.set_delta_chroma_offset_l1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265WeightTableFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265WeightTableFlags.java new file mode 100644 index 00000000..0d88681c --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoEncodeH265WeightTableFlags.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### luma_weight_l0_flag +/// [VarHandle][#VH_luma_weight_l0_flag] - [Getter][#luma_weight_l0_flag()] - [Setter][#luma_weight_l0_flag(short)] +/// ### chroma_weight_l0_flag +/// [VarHandle][#VH_chroma_weight_l0_flag] - [Getter][#chroma_weight_l0_flag()] - [Setter][#chroma_weight_l0_flag(short)] +/// ### luma_weight_l1_flag +/// [VarHandle][#VH_luma_weight_l1_flag] - [Getter][#luma_weight_l1_flag()] - [Setter][#luma_weight_l1_flag(short)] +/// ### chroma_weight_l1_flag +/// [VarHandle][#VH_chroma_weight_l1_flag] - [Getter][#chroma_weight_l1_flag()] - [Setter][#chroma_weight_l1_flag(short)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoEncodeH265WeightTableFlags { +/// uint16_t luma_weight_l0_flag; +/// uint16_t chroma_weight_l0_flag; +/// uint16_t luma_weight_l1_flag; +/// uint16_t chroma_weight_l1_flag; +/// } StdVideoEncodeH265WeightTableFlags; +/// ``` +public final class StdVideoEncodeH265WeightTableFlags extends Struct { + /// The struct layout of `StdVideoEncodeH265WeightTableFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_SHORT.withName("luma_weight_l0_flag"), + ValueLayout.JAVA_SHORT.withName("chroma_weight_l0_flag"), + ValueLayout.JAVA_SHORT.withName("luma_weight_l1_flag"), + ValueLayout.JAVA_SHORT.withName("chroma_weight_l1_flag") + ); + /// The [VarHandle] of `luma_weight_l0_flag` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_luma_weight_l0_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_weight_l0_flag")); + /// The [VarHandle] of `chroma_weight_l0_flag` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_chroma_weight_l0_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_weight_l0_flag")); + /// The [VarHandle] of `luma_weight_l1_flag` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_luma_weight_l1_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_weight_l1_flag")); + /// The [VarHandle] of `chroma_weight_l1_flag` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_chroma_weight_l1_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_weight_l1_flag")); + + /// Creates `StdVideoEncodeH265WeightTableFlags` with the given segment. + /// @param segment the memory segment + public StdVideoEncodeH265WeightTableFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoEncodeH265WeightTableFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265WeightTableFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265WeightTableFlags(segment); } + + /// Creates `StdVideoEncodeH265WeightTableFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265WeightTableFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265WeightTableFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoEncodeH265WeightTableFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoEncodeH265WeightTableFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoEncodeH265WeightTableFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoEncodeH265WeightTableFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoEncodeH265WeightTableFlags` + public static StdVideoEncodeH265WeightTableFlags alloc(SegmentAllocator allocator) { return new StdVideoEncodeH265WeightTableFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoEncodeH265WeightTableFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoEncodeH265WeightTableFlags` + public static StdVideoEncodeH265WeightTableFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoEncodeH265WeightTableFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `luma_weight_l0_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_luma_weight_l0_flag(MemorySegment segment, long index) { return (short) VH_luma_weight_l0_flag.get(segment, 0L, index); } + /// {@return `luma_weight_l0_flag`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_luma_weight_l0_flag(MemorySegment segment) { return StdVideoEncodeH265WeightTableFlags.get_luma_weight_l0_flag(segment, 0L); } + /// {@return `luma_weight_l0_flag` at the given index} + /// @param index the index + public @CType("uint16_t") short luma_weight_l0_flagAt(long index) { return StdVideoEncodeH265WeightTableFlags.get_luma_weight_l0_flag(this.segment(), index); } + /// {@return `luma_weight_l0_flag`} + public @CType("uint16_t") short luma_weight_l0_flag() { return StdVideoEncodeH265WeightTableFlags.get_luma_weight_l0_flag(this.segment()); } + /// Sets `luma_weight_l0_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_weight_l0_flag(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_luma_weight_l0_flag.set(segment, 0L, index, value); } + /// Sets `luma_weight_l0_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_weight_l0_flag(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_luma_weight_l0_flag(segment, 0L, value); } + /// Sets `luma_weight_l0_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTableFlags luma_weight_l0_flagAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_luma_weight_l0_flag(this.segment(), index, value); return this; } + /// Sets `luma_weight_l0_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTableFlags luma_weight_l0_flag(@CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_luma_weight_l0_flag(this.segment(), value); return this; } + + /// {@return `chroma_weight_l0_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_chroma_weight_l0_flag(MemorySegment segment, long index) { return (short) VH_chroma_weight_l0_flag.get(segment, 0L, index); } + /// {@return `chroma_weight_l0_flag`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_chroma_weight_l0_flag(MemorySegment segment) { return StdVideoEncodeH265WeightTableFlags.get_chroma_weight_l0_flag(segment, 0L); } + /// {@return `chroma_weight_l0_flag` at the given index} + /// @param index the index + public @CType("uint16_t") short chroma_weight_l0_flagAt(long index) { return StdVideoEncodeH265WeightTableFlags.get_chroma_weight_l0_flag(this.segment(), index); } + /// {@return `chroma_weight_l0_flag`} + public @CType("uint16_t") short chroma_weight_l0_flag() { return StdVideoEncodeH265WeightTableFlags.get_chroma_weight_l0_flag(this.segment()); } + /// Sets `chroma_weight_l0_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_weight_l0_flag(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_chroma_weight_l0_flag.set(segment, 0L, index, value); } + /// Sets `chroma_weight_l0_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_weight_l0_flag(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_chroma_weight_l0_flag(segment, 0L, value); } + /// Sets `chroma_weight_l0_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTableFlags chroma_weight_l0_flagAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_chroma_weight_l0_flag(this.segment(), index, value); return this; } + /// Sets `chroma_weight_l0_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTableFlags chroma_weight_l0_flag(@CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_chroma_weight_l0_flag(this.segment(), value); return this; } + + /// {@return `luma_weight_l1_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_luma_weight_l1_flag(MemorySegment segment, long index) { return (short) VH_luma_weight_l1_flag.get(segment, 0L, index); } + /// {@return `luma_weight_l1_flag`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_luma_weight_l1_flag(MemorySegment segment) { return StdVideoEncodeH265WeightTableFlags.get_luma_weight_l1_flag(segment, 0L); } + /// {@return `luma_weight_l1_flag` at the given index} + /// @param index the index + public @CType("uint16_t") short luma_weight_l1_flagAt(long index) { return StdVideoEncodeH265WeightTableFlags.get_luma_weight_l1_flag(this.segment(), index); } + /// {@return `luma_weight_l1_flag`} + public @CType("uint16_t") short luma_weight_l1_flag() { return StdVideoEncodeH265WeightTableFlags.get_luma_weight_l1_flag(this.segment()); } + /// Sets `luma_weight_l1_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_weight_l1_flag(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_luma_weight_l1_flag.set(segment, 0L, index, value); } + /// Sets `luma_weight_l1_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_weight_l1_flag(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_luma_weight_l1_flag(segment, 0L, value); } + /// Sets `luma_weight_l1_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTableFlags luma_weight_l1_flagAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_luma_weight_l1_flag(this.segment(), index, value); return this; } + /// Sets `luma_weight_l1_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTableFlags luma_weight_l1_flag(@CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_luma_weight_l1_flag(this.segment(), value); return this; } + + /// {@return `chroma_weight_l1_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_chroma_weight_l1_flag(MemorySegment segment, long index) { return (short) VH_chroma_weight_l1_flag.get(segment, 0L, index); } + /// {@return `chroma_weight_l1_flag`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_chroma_weight_l1_flag(MemorySegment segment) { return StdVideoEncodeH265WeightTableFlags.get_chroma_weight_l1_flag(segment, 0L); } + /// {@return `chroma_weight_l1_flag` at the given index} + /// @param index the index + public @CType("uint16_t") short chroma_weight_l1_flagAt(long index) { return StdVideoEncodeH265WeightTableFlags.get_chroma_weight_l1_flag(this.segment(), index); } + /// {@return `chroma_weight_l1_flag`} + public @CType("uint16_t") short chroma_weight_l1_flag() { return StdVideoEncodeH265WeightTableFlags.get_chroma_weight_l1_flag(this.segment()); } + /// Sets `chroma_weight_l1_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_weight_l1_flag(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_chroma_weight_l1_flag.set(segment, 0L, index, value); } + /// Sets `chroma_weight_l1_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_weight_l1_flag(MemorySegment segment, @CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_chroma_weight_l1_flag(segment, 0L, value); } + /// Sets `chroma_weight_l1_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTableFlags chroma_weight_l1_flagAt(long index, @CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_chroma_weight_l1_flag(this.segment(), index, value); return this; } + /// Sets `chroma_weight_l1_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoEncodeH265WeightTableFlags chroma_weight_l1_flag(@CType("uint16_t") short value) { StdVideoEncodeH265WeightTableFlags.set_chroma_weight_l1_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264HrdParameters.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264HrdParameters.java new file mode 100644 index 00000000..8400f459 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264HrdParameters.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### cpb_cnt_minus1 +/// [VarHandle][#VH_cpb_cnt_minus1] - [Getter][#cpb_cnt_minus1()] - [Setter][#cpb_cnt_minus1(byte)] +/// ### bit_rate_scale +/// [VarHandle][#VH_bit_rate_scale] - [Getter][#bit_rate_scale()] - [Setter][#bit_rate_scale(byte)] +/// ### cpb_size_scale +/// [VarHandle][#VH_cpb_size_scale] - [Getter][#cpb_size_scale()] - [Setter][#cpb_size_scale(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### bit_rate_value_minus1 +/// [VarHandle][#VH_bit_rate_value_minus1] - [Getter][#bit_rate_value_minus1()] - [Setter][#bit_rate_value_minus1(int)] +/// ### cpb_size_value_minus1 +/// [VarHandle][#VH_cpb_size_value_minus1] - [Getter][#cpb_size_value_minus1()] - [Setter][#cpb_size_value_minus1(int)] +/// ### cbr_flag +/// [VarHandle][#VH_cbr_flag] - [Getter][#cbr_flag()] - [Setter][#cbr_flag(byte)] +/// ### initial_cpb_removal_delay_length_minus1 +/// [VarHandle][#VH_initial_cpb_removal_delay_length_minus1] - [Getter][#initial_cpb_removal_delay_length_minus1()] - [Setter][#initial_cpb_removal_delay_length_minus1(int)] +/// ### cpb_removal_delay_length_minus1 +/// [VarHandle][#VH_cpb_removal_delay_length_minus1] - [Getter][#cpb_removal_delay_length_minus1()] - [Setter][#cpb_removal_delay_length_minus1(int)] +/// ### dpb_output_delay_length_minus1 +/// [VarHandle][#VH_dpb_output_delay_length_minus1] - [Getter][#dpb_output_delay_length_minus1()] - [Setter][#dpb_output_delay_length_minus1(int)] +/// ### time_offset_length +/// [VarHandle][#VH_time_offset_length] - [Getter][#time_offset_length()] - [Setter][#time_offset_length(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH264HrdParameters { +/// uint8_t cpb_cnt_minus1; +/// uint8_t bit_rate_scale; +/// uint8_t cpb_size_scale; +/// uint8_t reserved1; +/// uint32_t [ ] bit_rate_value_minus1; +/// uint32_t [ ] cpb_size_value_minus1; +/// uint8_t [ ] cbr_flag; +/// uint32_t initial_cpb_removal_delay_length_minus1; +/// uint32_t cpb_removal_delay_length_minus1; +/// uint32_t dpb_output_delay_length_minus1; +/// uint32_t time_offset_length; +/// } StdVideoH264HrdParameters; +/// ``` +public final class StdVideoH264HrdParameters extends Struct { + /// The struct layout of `StdVideoH264HrdParameters`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_BYTE.withName("cpb_cnt_minus1"), + ValueLayout.JAVA_BYTE.withName("bit_rate_scale"), + ValueLayout.JAVA_BYTE.withName("cpb_size_scale"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_INT.withName("bit_rate_value_minus1"), + ValueLayout.JAVA_INT.withName("cpb_size_value_minus1"), + ValueLayout.JAVA_BYTE.withName("cbr_flag"), + ValueLayout.JAVA_INT.withName("initial_cpb_removal_delay_length_minus1"), + ValueLayout.JAVA_INT.withName("cpb_removal_delay_length_minus1"), + ValueLayout.JAVA_INT.withName("dpb_output_delay_length_minus1"), + ValueLayout.JAVA_INT.withName("time_offset_length") + ); + /// The [VarHandle] of `cpb_cnt_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cpb_cnt_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cpb_cnt_minus1")); + /// The [VarHandle] of `bit_rate_scale` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_bit_rate_scale = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bit_rate_scale")); + /// The [VarHandle] of `cpb_size_scale` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cpb_size_scale = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cpb_size_scale")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `bit_rate_value_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bit_rate_value_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bit_rate_value_minus1")); + /// The [VarHandle] of `cpb_size_value_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cpb_size_value_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cpb_size_value_minus1")); + /// The [VarHandle] of `cbr_flag` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cbr_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cbr_flag")); + /// The [VarHandle] of `initial_cpb_removal_delay_length_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_initial_cpb_removal_delay_length_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initial_cpb_removal_delay_length_minus1")); + /// The [VarHandle] of `cpb_removal_delay_length_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cpb_removal_delay_length_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cpb_removal_delay_length_minus1")); + /// The [VarHandle] of `dpb_output_delay_length_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dpb_output_delay_length_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dpb_output_delay_length_minus1")); + /// The [VarHandle] of `time_offset_length` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_time_offset_length = LAYOUT.arrayElementVarHandle(PathElement.groupElement("time_offset_length")); + + /// Creates `StdVideoH264HrdParameters` with the given segment. + /// @param segment the memory segment + public StdVideoH264HrdParameters(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH264HrdParameters` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264HrdParameters of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264HrdParameters(segment); } + + /// Creates `StdVideoH264HrdParameters` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264HrdParameters ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264HrdParameters(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH264HrdParameters` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264HrdParameters ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264HrdParameters(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH264HrdParameters` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH264HrdParameters` + public static StdVideoH264HrdParameters alloc(SegmentAllocator allocator) { return new StdVideoH264HrdParameters(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH264HrdParameters` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH264HrdParameters` + public static StdVideoH264HrdParameters alloc(SegmentAllocator allocator, long count) { return new StdVideoH264HrdParameters(allocator.allocate(LAYOUT, count)); } + + /// {@return `cpb_cnt_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_cpb_cnt_minus1(MemorySegment segment, long index) { return (byte) VH_cpb_cnt_minus1.get(segment, 0L, index); } + /// {@return `cpb_cnt_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_cpb_cnt_minus1(MemorySegment segment) { return StdVideoH264HrdParameters.get_cpb_cnt_minus1(segment, 0L); } + /// {@return `cpb_cnt_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte cpb_cnt_minus1At(long index) { return StdVideoH264HrdParameters.get_cpb_cnt_minus1(this.segment(), index); } + /// {@return `cpb_cnt_minus1`} + public @CType("uint8_t") byte cpb_cnt_minus1() { return StdVideoH264HrdParameters.get_cpb_cnt_minus1(this.segment()); } + /// Sets `cpb_cnt_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cpb_cnt_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_cpb_cnt_minus1.set(segment, 0L, index, value); } + /// Sets `cpb_cnt_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cpb_cnt_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_cpb_cnt_minus1(segment, 0L, value); } + /// Sets `cpb_cnt_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters cpb_cnt_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_cpb_cnt_minus1(this.segment(), index, value); return this; } + /// Sets `cpb_cnt_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters cpb_cnt_minus1(@CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_cpb_cnt_minus1(this.segment(), value); return this; } + + /// {@return `bit_rate_scale` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_bit_rate_scale(MemorySegment segment, long index) { return (byte) VH_bit_rate_scale.get(segment, 0L, index); } + /// {@return `bit_rate_scale`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_bit_rate_scale(MemorySegment segment) { return StdVideoH264HrdParameters.get_bit_rate_scale(segment, 0L); } + /// {@return `bit_rate_scale` at the given index} + /// @param index the index + public @CType("uint8_t") byte bit_rate_scaleAt(long index) { return StdVideoH264HrdParameters.get_bit_rate_scale(this.segment(), index); } + /// {@return `bit_rate_scale`} + public @CType("uint8_t") byte bit_rate_scale() { return StdVideoH264HrdParameters.get_bit_rate_scale(this.segment()); } + /// Sets `bit_rate_scale` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bit_rate_scale(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_bit_rate_scale.set(segment, 0L, index, value); } + /// Sets `bit_rate_scale` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bit_rate_scale(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_bit_rate_scale(segment, 0L, value); } + /// Sets `bit_rate_scale` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters bit_rate_scaleAt(long index, @CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_bit_rate_scale(this.segment(), index, value); return this; } + /// Sets `bit_rate_scale` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters bit_rate_scale(@CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_bit_rate_scale(this.segment(), value); return this; } + + /// {@return `cpb_size_scale` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_cpb_size_scale(MemorySegment segment, long index) { return (byte) VH_cpb_size_scale.get(segment, 0L, index); } + /// {@return `cpb_size_scale`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_cpb_size_scale(MemorySegment segment) { return StdVideoH264HrdParameters.get_cpb_size_scale(segment, 0L); } + /// {@return `cpb_size_scale` at the given index} + /// @param index the index + public @CType("uint8_t") byte cpb_size_scaleAt(long index) { return StdVideoH264HrdParameters.get_cpb_size_scale(this.segment(), index); } + /// {@return `cpb_size_scale`} + public @CType("uint8_t") byte cpb_size_scale() { return StdVideoH264HrdParameters.get_cpb_size_scale(this.segment()); } + /// Sets `cpb_size_scale` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cpb_size_scale(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_cpb_size_scale.set(segment, 0L, index, value); } + /// Sets `cpb_size_scale` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cpb_size_scale(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_cpb_size_scale(segment, 0L, value); } + /// Sets `cpb_size_scale` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters cpb_size_scaleAt(long index, @CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_cpb_size_scale(this.segment(), index, value); return this; } + /// Sets `cpb_size_scale` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters cpb_size_scale(@CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_cpb_size_scale(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoH264HrdParameters.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoH264HrdParameters.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoH264HrdParameters.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters reserved1At(long index, @CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters reserved1(@CType("uint8_t") byte value) { StdVideoH264HrdParameters.set_reserved1(this.segment(), value); return this; } + + /// {@return `bit_rate_value_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t [ ]") int get_bit_rate_value_minus1(MemorySegment segment, long index) { return (int) VH_bit_rate_value_minus1.get(segment, 0L, index); } + /// {@return `bit_rate_value_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t [ ]") int get_bit_rate_value_minus1(MemorySegment segment) { return StdVideoH264HrdParameters.get_bit_rate_value_minus1(segment, 0L); } + /// {@return `bit_rate_value_minus1` at the given index} + /// @param index the index + public @CType("uint32_t [ ]") int bit_rate_value_minus1At(long index) { return StdVideoH264HrdParameters.get_bit_rate_value_minus1(this.segment(), index); } + /// {@return `bit_rate_value_minus1`} + public @CType("uint32_t [ ]") int bit_rate_value_minus1() { return StdVideoH264HrdParameters.get_bit_rate_value_minus1(this.segment()); } + /// Sets `bit_rate_value_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bit_rate_value_minus1(MemorySegment segment, long index, @CType("uint32_t [ ]") int value) { VH_bit_rate_value_minus1.set(segment, 0L, index, value); } + /// Sets `bit_rate_value_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bit_rate_value_minus1(MemorySegment segment, @CType("uint32_t [ ]") int value) { StdVideoH264HrdParameters.set_bit_rate_value_minus1(segment, 0L, value); } + /// Sets `bit_rate_value_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters bit_rate_value_minus1At(long index, @CType("uint32_t [ ]") int value) { StdVideoH264HrdParameters.set_bit_rate_value_minus1(this.segment(), index, value); return this; } + /// Sets `bit_rate_value_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters bit_rate_value_minus1(@CType("uint32_t [ ]") int value) { StdVideoH264HrdParameters.set_bit_rate_value_minus1(this.segment(), value); return this; } + + /// {@return `cpb_size_value_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t [ ]") int get_cpb_size_value_minus1(MemorySegment segment, long index) { return (int) VH_cpb_size_value_minus1.get(segment, 0L, index); } + /// {@return `cpb_size_value_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t [ ]") int get_cpb_size_value_minus1(MemorySegment segment) { return StdVideoH264HrdParameters.get_cpb_size_value_minus1(segment, 0L); } + /// {@return `cpb_size_value_minus1` at the given index} + /// @param index the index + public @CType("uint32_t [ ]") int cpb_size_value_minus1At(long index) { return StdVideoH264HrdParameters.get_cpb_size_value_minus1(this.segment(), index); } + /// {@return `cpb_size_value_minus1`} + public @CType("uint32_t [ ]") int cpb_size_value_minus1() { return StdVideoH264HrdParameters.get_cpb_size_value_minus1(this.segment()); } + /// Sets `cpb_size_value_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cpb_size_value_minus1(MemorySegment segment, long index, @CType("uint32_t [ ]") int value) { VH_cpb_size_value_minus1.set(segment, 0L, index, value); } + /// Sets `cpb_size_value_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cpb_size_value_minus1(MemorySegment segment, @CType("uint32_t [ ]") int value) { StdVideoH264HrdParameters.set_cpb_size_value_minus1(segment, 0L, value); } + /// Sets `cpb_size_value_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters cpb_size_value_minus1At(long index, @CType("uint32_t [ ]") int value) { StdVideoH264HrdParameters.set_cpb_size_value_minus1(this.segment(), index, value); return this; } + /// Sets `cpb_size_value_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters cpb_size_value_minus1(@CType("uint32_t [ ]") int value) { StdVideoH264HrdParameters.set_cpb_size_value_minus1(this.segment(), value); return this; } + + /// {@return `cbr_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_cbr_flag(MemorySegment segment, long index) { return (byte) VH_cbr_flag.get(segment, 0L, index); } + /// {@return `cbr_flag`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_cbr_flag(MemorySegment segment) { return StdVideoH264HrdParameters.get_cbr_flag(segment, 0L); } + /// {@return `cbr_flag` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte cbr_flagAt(long index) { return StdVideoH264HrdParameters.get_cbr_flag(this.segment(), index); } + /// {@return `cbr_flag`} + public @CType("uint8_t [ ]") byte cbr_flag() { return StdVideoH264HrdParameters.get_cbr_flag(this.segment()); } + /// Sets `cbr_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cbr_flag(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_cbr_flag.set(segment, 0L, index, value); } + /// Sets `cbr_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cbr_flag(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoH264HrdParameters.set_cbr_flag(segment, 0L, value); } + /// Sets `cbr_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters cbr_flagAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoH264HrdParameters.set_cbr_flag(this.segment(), index, value); return this; } + /// Sets `cbr_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters cbr_flag(@CType("uint8_t [ ]") byte value) { StdVideoH264HrdParameters.set_cbr_flag(this.segment(), value); return this; } + + /// {@return `initial_cpb_removal_delay_length_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_initial_cpb_removal_delay_length_minus1(MemorySegment segment, long index) { return (int) VH_initial_cpb_removal_delay_length_minus1.get(segment, 0L, index); } + /// {@return `initial_cpb_removal_delay_length_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_initial_cpb_removal_delay_length_minus1(MemorySegment segment) { return StdVideoH264HrdParameters.get_initial_cpb_removal_delay_length_minus1(segment, 0L); } + /// {@return `initial_cpb_removal_delay_length_minus1` at the given index} + /// @param index the index + public @CType("uint32_t") int initial_cpb_removal_delay_length_minus1At(long index) { return StdVideoH264HrdParameters.get_initial_cpb_removal_delay_length_minus1(this.segment(), index); } + /// {@return `initial_cpb_removal_delay_length_minus1`} + public @CType("uint32_t") int initial_cpb_removal_delay_length_minus1() { return StdVideoH264HrdParameters.get_initial_cpb_removal_delay_length_minus1(this.segment()); } + /// Sets `initial_cpb_removal_delay_length_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initial_cpb_removal_delay_length_minus1(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_initial_cpb_removal_delay_length_minus1.set(segment, 0L, index, value); } + /// Sets `initial_cpb_removal_delay_length_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initial_cpb_removal_delay_length_minus1(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264HrdParameters.set_initial_cpb_removal_delay_length_minus1(segment, 0L, value); } + /// Sets `initial_cpb_removal_delay_length_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters initial_cpb_removal_delay_length_minus1At(long index, @CType("uint32_t") int value) { StdVideoH264HrdParameters.set_initial_cpb_removal_delay_length_minus1(this.segment(), index, value); return this; } + /// Sets `initial_cpb_removal_delay_length_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters initial_cpb_removal_delay_length_minus1(@CType("uint32_t") int value) { StdVideoH264HrdParameters.set_initial_cpb_removal_delay_length_minus1(this.segment(), value); return this; } + + /// {@return `cpb_removal_delay_length_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_cpb_removal_delay_length_minus1(MemorySegment segment, long index) { return (int) VH_cpb_removal_delay_length_minus1.get(segment, 0L, index); } + /// {@return `cpb_removal_delay_length_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_cpb_removal_delay_length_minus1(MemorySegment segment) { return StdVideoH264HrdParameters.get_cpb_removal_delay_length_minus1(segment, 0L); } + /// {@return `cpb_removal_delay_length_minus1` at the given index} + /// @param index the index + public @CType("uint32_t") int cpb_removal_delay_length_minus1At(long index) { return StdVideoH264HrdParameters.get_cpb_removal_delay_length_minus1(this.segment(), index); } + /// {@return `cpb_removal_delay_length_minus1`} + public @CType("uint32_t") int cpb_removal_delay_length_minus1() { return StdVideoH264HrdParameters.get_cpb_removal_delay_length_minus1(this.segment()); } + /// Sets `cpb_removal_delay_length_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cpb_removal_delay_length_minus1(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_cpb_removal_delay_length_minus1.set(segment, 0L, index, value); } + /// Sets `cpb_removal_delay_length_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cpb_removal_delay_length_minus1(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264HrdParameters.set_cpb_removal_delay_length_minus1(segment, 0L, value); } + /// Sets `cpb_removal_delay_length_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters cpb_removal_delay_length_minus1At(long index, @CType("uint32_t") int value) { StdVideoH264HrdParameters.set_cpb_removal_delay_length_minus1(this.segment(), index, value); return this; } + /// Sets `cpb_removal_delay_length_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters cpb_removal_delay_length_minus1(@CType("uint32_t") int value) { StdVideoH264HrdParameters.set_cpb_removal_delay_length_minus1(this.segment(), value); return this; } + + /// {@return `dpb_output_delay_length_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_dpb_output_delay_length_minus1(MemorySegment segment, long index) { return (int) VH_dpb_output_delay_length_minus1.get(segment, 0L, index); } + /// {@return `dpb_output_delay_length_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_dpb_output_delay_length_minus1(MemorySegment segment) { return StdVideoH264HrdParameters.get_dpb_output_delay_length_minus1(segment, 0L); } + /// {@return `dpb_output_delay_length_minus1` at the given index} + /// @param index the index + public @CType("uint32_t") int dpb_output_delay_length_minus1At(long index) { return StdVideoH264HrdParameters.get_dpb_output_delay_length_minus1(this.segment(), index); } + /// {@return `dpb_output_delay_length_minus1`} + public @CType("uint32_t") int dpb_output_delay_length_minus1() { return StdVideoH264HrdParameters.get_dpb_output_delay_length_minus1(this.segment()); } + /// Sets `dpb_output_delay_length_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dpb_output_delay_length_minus1(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_dpb_output_delay_length_minus1.set(segment, 0L, index, value); } + /// Sets `dpb_output_delay_length_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dpb_output_delay_length_minus1(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264HrdParameters.set_dpb_output_delay_length_minus1(segment, 0L, value); } + /// Sets `dpb_output_delay_length_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters dpb_output_delay_length_minus1At(long index, @CType("uint32_t") int value) { StdVideoH264HrdParameters.set_dpb_output_delay_length_minus1(this.segment(), index, value); return this; } + /// Sets `dpb_output_delay_length_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters dpb_output_delay_length_minus1(@CType("uint32_t") int value) { StdVideoH264HrdParameters.set_dpb_output_delay_length_minus1(this.segment(), value); return this; } + + /// {@return `time_offset_length` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_time_offset_length(MemorySegment segment, long index) { return (int) VH_time_offset_length.get(segment, 0L, index); } + /// {@return `time_offset_length`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_time_offset_length(MemorySegment segment) { return StdVideoH264HrdParameters.get_time_offset_length(segment, 0L); } + /// {@return `time_offset_length` at the given index} + /// @param index the index + public @CType("uint32_t") int time_offset_lengthAt(long index) { return StdVideoH264HrdParameters.get_time_offset_length(this.segment(), index); } + /// {@return `time_offset_length`} + public @CType("uint32_t") int time_offset_length() { return StdVideoH264HrdParameters.get_time_offset_length(this.segment()); } + /// Sets `time_offset_length` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_time_offset_length(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_time_offset_length.set(segment, 0L, index, value); } + /// Sets `time_offset_length` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_time_offset_length(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264HrdParameters.set_time_offset_length(segment, 0L, value); } + /// Sets `time_offset_length` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters time_offset_lengthAt(long index, @CType("uint32_t") int value) { StdVideoH264HrdParameters.set_time_offset_length(this.segment(), index, value); return this; } + /// Sets `time_offset_length` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264HrdParameters time_offset_length(@CType("uint32_t") int value) { StdVideoH264HrdParameters.set_time_offset_length(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264PictureParameterSet.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264PictureParameterSet.java new file mode 100644 index 00000000..c23b0af3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264PictureParameterSet.java @@ -0,0 +1,481 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### seq_parameter_set_id +/// [VarHandle][#VH_seq_parameter_set_id] - [Getter][#seq_parameter_set_id()] - [Setter][#seq_parameter_set_id(byte)] +/// ### pic_parameter_set_id +/// [VarHandle][#VH_pic_parameter_set_id] - [Getter][#pic_parameter_set_id()] - [Setter][#pic_parameter_set_id(byte)] +/// ### num_ref_idx_l0_default_active_minus1 +/// [VarHandle][#VH_num_ref_idx_l0_default_active_minus1] - [Getter][#num_ref_idx_l0_default_active_minus1()] - [Setter][#num_ref_idx_l0_default_active_minus1(byte)] +/// ### num_ref_idx_l1_default_active_minus1 +/// [VarHandle][#VH_num_ref_idx_l1_default_active_minus1] - [Getter][#num_ref_idx_l1_default_active_minus1()] - [Setter][#num_ref_idx_l1_default_active_minus1(byte)] +/// ### weighted_bipred_idc +/// [VarHandle][#VH_weighted_bipred_idc] - [Getter][#weighted_bipred_idc()] - [Setter][#weighted_bipred_idc(int)] +/// ### pic_init_qp_minus26 +/// [VarHandle][#VH_pic_init_qp_minus26] - [Getter][#pic_init_qp_minus26()] - [Setter][#pic_init_qp_minus26(byte)] +/// ### pic_init_qs_minus26 +/// [VarHandle][#VH_pic_init_qs_minus26] - [Getter][#pic_init_qs_minus26()] - [Setter][#pic_init_qs_minus26(byte)] +/// ### chroma_qp_index_offset +/// [VarHandle][#VH_chroma_qp_index_offset] - [Getter][#chroma_qp_index_offset()] - [Setter][#chroma_qp_index_offset(byte)] +/// ### second_chroma_qp_index_offset +/// [VarHandle][#VH_second_chroma_qp_index_offset] - [Getter][#second_chroma_qp_index_offset()] - [Setter][#second_chroma_qp_index_offset(byte)] +/// ### pScalingLists +/// [VarHandle][#VH_pScalingLists] - [Getter][#pScalingLists()] - [Setter][#pScalingLists(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH264PictureParameterSet { +/// StdVideoH264PpsFlags flags; +/// uint8_t seq_parameter_set_id; +/// uint8_t pic_parameter_set_id; +/// uint8_t num_ref_idx_l0_default_active_minus1; +/// uint8_t num_ref_idx_l1_default_active_minus1; +/// StdVideoH264WeightedBipredIdc weighted_bipred_idc; +/// int8_t pic_init_qp_minus26; +/// int8_t pic_init_qs_minus26; +/// int8_t chroma_qp_index_offset; +/// int8_t second_chroma_qp_index_offset; +/// const StdVideoH264ScalingLists * pScalingLists; +/// } StdVideoH264PictureParameterSet; +/// ``` +public final class StdVideoH264PictureParameterSet extends Struct { + /// The struct layout of `StdVideoH264PictureParameterSet`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoH264PpsFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("seq_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("pic_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("num_ref_idx_l0_default_active_minus1"), + ValueLayout.JAVA_BYTE.withName("num_ref_idx_l1_default_active_minus1"), + ValueLayout.JAVA_INT.withName("weighted_bipred_idc"), + ValueLayout.JAVA_BYTE.withName("pic_init_qp_minus26"), + ValueLayout.JAVA_BYTE.withName("pic_init_qs_minus26"), + ValueLayout.JAVA_BYTE.withName("chroma_qp_index_offset"), + ValueLayout.JAVA_BYTE.withName("second_chroma_qp_index_offset"), + ValueLayout.ADDRESS.withName("pScalingLists") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `seq_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_seq_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("seq_parameter_set_id")); + /// The [VarHandle] of `pic_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pic_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_parameter_set_id")); + /// The [VarHandle] of `num_ref_idx_l0_default_active_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_ref_idx_l0_default_active_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_idx_l0_default_active_minus1")); + /// The [VarHandle] of `num_ref_idx_l1_default_active_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_ref_idx_l1_default_active_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_idx_l1_default_active_minus1")); + /// The [VarHandle] of `weighted_bipred_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_weighted_bipred_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("weighted_bipred_idc")); + /// The [VarHandle] of `pic_init_qp_minus26` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pic_init_qp_minus26 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_init_qp_minus26")); + /// The [VarHandle] of `pic_init_qs_minus26` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pic_init_qs_minus26 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_init_qs_minus26")); + /// The [VarHandle] of `chroma_qp_index_offset` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_qp_index_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_qp_index_offset")); + /// The [VarHandle] of `second_chroma_qp_index_offset` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_second_chroma_qp_index_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("second_chroma_qp_index_offset")); + /// The [VarHandle] of `pScalingLists` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pScalingLists = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pScalingLists")); + + /// Creates `StdVideoH264PictureParameterSet` with the given segment. + /// @param segment the memory segment + public StdVideoH264PictureParameterSet(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH264PictureParameterSet` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264PictureParameterSet of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264PictureParameterSet(segment); } + + /// Creates `StdVideoH264PictureParameterSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264PictureParameterSet ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264PictureParameterSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH264PictureParameterSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264PictureParameterSet ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264PictureParameterSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH264PictureParameterSet` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH264PictureParameterSet` + public static StdVideoH264PictureParameterSet alloc(SegmentAllocator allocator) { return new StdVideoH264PictureParameterSet(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH264PictureParameterSet` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH264PictureParameterSet` + public static StdVideoH264PictureParameterSet alloc(SegmentAllocator allocator, long count) { return new StdVideoH264PictureParameterSet(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264PpsFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264PpsFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoH264PpsFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoH264PictureParameterSet.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoH264PpsFlags") java.lang.foreign.MemorySegment flags() { return StdVideoH264PictureParameterSet.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoH264PpsFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoH264PpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH264PictureParameterSet.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet flagsAt(long index, @CType("StdVideoH264PpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH264PictureParameterSet.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet flags(@CType("StdVideoH264PpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH264PictureParameterSet.set_flags(this.segment(), value); return this; } + + /// {@return `seq_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_seq_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_seq_parameter_set_id.get(segment, 0L, index); } + /// {@return `seq_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_seq_parameter_set_id(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_seq_parameter_set_id(segment, 0L); } + /// {@return `seq_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte seq_parameter_set_idAt(long index) { return StdVideoH264PictureParameterSet.get_seq_parameter_set_id(this.segment(), index); } + /// {@return `seq_parameter_set_id`} + public @CType("uint8_t") byte seq_parameter_set_id() { return StdVideoH264PictureParameterSet.get_seq_parameter_set_id(this.segment()); } + /// Sets `seq_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_seq_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_seq_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `seq_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_seq_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_seq_parameter_set_id(segment, 0L, value); } + /// Sets `seq_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet seq_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_seq_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `seq_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet seq_parameter_set_id(@CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_seq_parameter_set_id(this.segment(), value); return this; } + + /// {@return `pic_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pic_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_pic_parameter_set_id.get(segment, 0L, index); } + /// {@return `pic_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pic_parameter_set_id(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_pic_parameter_set_id(segment, 0L); } + /// {@return `pic_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte pic_parameter_set_idAt(long index) { return StdVideoH264PictureParameterSet.get_pic_parameter_set_id(this.segment(), index); } + /// {@return `pic_parameter_set_id`} + public @CType("uint8_t") byte pic_parameter_set_id() { return StdVideoH264PictureParameterSet.get_pic_parameter_set_id(this.segment()); } + /// Sets `pic_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pic_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `pic_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_pic_parameter_set_id(segment, 0L, value); } + /// Sets `pic_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet pic_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_pic_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `pic_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet pic_parameter_set_id(@CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_pic_parameter_set_id(this.segment(), value); return this; } + + /// {@return `num_ref_idx_l0_default_active_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_ref_idx_l0_default_active_minus1(MemorySegment segment, long index) { return (byte) VH_num_ref_idx_l0_default_active_minus1.get(segment, 0L, index); } + /// {@return `num_ref_idx_l0_default_active_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_ref_idx_l0_default_active_minus1(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_num_ref_idx_l0_default_active_minus1(segment, 0L); } + /// {@return `num_ref_idx_l0_default_active_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_ref_idx_l0_default_active_minus1At(long index) { return StdVideoH264PictureParameterSet.get_num_ref_idx_l0_default_active_minus1(this.segment(), index); } + /// {@return `num_ref_idx_l0_default_active_minus1`} + public @CType("uint8_t") byte num_ref_idx_l0_default_active_minus1() { return StdVideoH264PictureParameterSet.get_num_ref_idx_l0_default_active_minus1(this.segment()); } + /// Sets `num_ref_idx_l0_default_active_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_idx_l0_default_active_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_ref_idx_l0_default_active_minus1.set(segment, 0L, index, value); } + /// Sets `num_ref_idx_l0_default_active_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_idx_l0_default_active_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_num_ref_idx_l0_default_active_minus1(segment, 0L, value); } + /// Sets `num_ref_idx_l0_default_active_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet num_ref_idx_l0_default_active_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_num_ref_idx_l0_default_active_minus1(this.segment(), index, value); return this; } + /// Sets `num_ref_idx_l0_default_active_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet num_ref_idx_l0_default_active_minus1(@CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_num_ref_idx_l0_default_active_minus1(this.segment(), value); return this; } + + /// {@return `num_ref_idx_l1_default_active_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_ref_idx_l1_default_active_minus1(MemorySegment segment, long index) { return (byte) VH_num_ref_idx_l1_default_active_minus1.get(segment, 0L, index); } + /// {@return `num_ref_idx_l1_default_active_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_ref_idx_l1_default_active_minus1(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_num_ref_idx_l1_default_active_minus1(segment, 0L); } + /// {@return `num_ref_idx_l1_default_active_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_ref_idx_l1_default_active_minus1At(long index) { return StdVideoH264PictureParameterSet.get_num_ref_idx_l1_default_active_minus1(this.segment(), index); } + /// {@return `num_ref_idx_l1_default_active_minus1`} + public @CType("uint8_t") byte num_ref_idx_l1_default_active_minus1() { return StdVideoH264PictureParameterSet.get_num_ref_idx_l1_default_active_minus1(this.segment()); } + /// Sets `num_ref_idx_l1_default_active_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_idx_l1_default_active_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_ref_idx_l1_default_active_minus1.set(segment, 0L, index, value); } + /// Sets `num_ref_idx_l1_default_active_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_idx_l1_default_active_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_num_ref_idx_l1_default_active_minus1(segment, 0L, value); } + /// Sets `num_ref_idx_l1_default_active_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet num_ref_idx_l1_default_active_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_num_ref_idx_l1_default_active_minus1(this.segment(), index, value); return this; } + /// Sets `num_ref_idx_l1_default_active_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet num_ref_idx_l1_default_active_minus1(@CType("uint8_t") byte value) { StdVideoH264PictureParameterSet.set_num_ref_idx_l1_default_active_minus1(this.segment(), value); return this; } + + /// {@return `weighted_bipred_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264WeightedBipredIdc") int get_weighted_bipred_idc(MemorySegment segment, long index) { return (int) VH_weighted_bipred_idc.get(segment, 0L, index); } + /// {@return `weighted_bipred_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264WeightedBipredIdc") int get_weighted_bipred_idc(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_weighted_bipred_idc(segment, 0L); } + /// {@return `weighted_bipred_idc` at the given index} + /// @param index the index + public @CType("StdVideoH264WeightedBipredIdc") int weighted_bipred_idcAt(long index) { return StdVideoH264PictureParameterSet.get_weighted_bipred_idc(this.segment(), index); } + /// {@return `weighted_bipred_idc`} + public @CType("StdVideoH264WeightedBipredIdc") int weighted_bipred_idc() { return StdVideoH264PictureParameterSet.get_weighted_bipred_idc(this.segment()); } + /// Sets `weighted_bipred_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_weighted_bipred_idc(MemorySegment segment, long index, @CType("StdVideoH264WeightedBipredIdc") int value) { VH_weighted_bipred_idc.set(segment, 0L, index, value); } + /// Sets `weighted_bipred_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_weighted_bipred_idc(MemorySegment segment, @CType("StdVideoH264WeightedBipredIdc") int value) { StdVideoH264PictureParameterSet.set_weighted_bipred_idc(segment, 0L, value); } + /// Sets `weighted_bipred_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet weighted_bipred_idcAt(long index, @CType("StdVideoH264WeightedBipredIdc") int value) { StdVideoH264PictureParameterSet.set_weighted_bipred_idc(this.segment(), index, value); return this; } + /// Sets `weighted_bipred_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet weighted_bipred_idc(@CType("StdVideoH264WeightedBipredIdc") int value) { StdVideoH264PictureParameterSet.set_weighted_bipred_idc(this.segment(), value); return this; } + + /// {@return `pic_init_qp_minus26` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_pic_init_qp_minus26(MemorySegment segment, long index) { return (byte) VH_pic_init_qp_minus26.get(segment, 0L, index); } + /// {@return `pic_init_qp_minus26`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_pic_init_qp_minus26(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_pic_init_qp_minus26(segment, 0L); } + /// {@return `pic_init_qp_minus26` at the given index} + /// @param index the index + public @CType("int8_t") byte pic_init_qp_minus26At(long index) { return StdVideoH264PictureParameterSet.get_pic_init_qp_minus26(this.segment(), index); } + /// {@return `pic_init_qp_minus26`} + public @CType("int8_t") byte pic_init_qp_minus26() { return StdVideoH264PictureParameterSet.get_pic_init_qp_minus26(this.segment()); } + /// Sets `pic_init_qp_minus26` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_init_qp_minus26(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_pic_init_qp_minus26.set(segment, 0L, index, value); } + /// Sets `pic_init_qp_minus26` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_init_qp_minus26(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_pic_init_qp_minus26(segment, 0L, value); } + /// Sets `pic_init_qp_minus26` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet pic_init_qp_minus26At(long index, @CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_pic_init_qp_minus26(this.segment(), index, value); return this; } + /// Sets `pic_init_qp_minus26` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet pic_init_qp_minus26(@CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_pic_init_qp_minus26(this.segment(), value); return this; } + + /// {@return `pic_init_qs_minus26` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_pic_init_qs_minus26(MemorySegment segment, long index) { return (byte) VH_pic_init_qs_minus26.get(segment, 0L, index); } + /// {@return `pic_init_qs_minus26`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_pic_init_qs_minus26(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_pic_init_qs_minus26(segment, 0L); } + /// {@return `pic_init_qs_minus26` at the given index} + /// @param index the index + public @CType("int8_t") byte pic_init_qs_minus26At(long index) { return StdVideoH264PictureParameterSet.get_pic_init_qs_minus26(this.segment(), index); } + /// {@return `pic_init_qs_minus26`} + public @CType("int8_t") byte pic_init_qs_minus26() { return StdVideoH264PictureParameterSet.get_pic_init_qs_minus26(this.segment()); } + /// Sets `pic_init_qs_minus26` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_init_qs_minus26(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_pic_init_qs_minus26.set(segment, 0L, index, value); } + /// Sets `pic_init_qs_minus26` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_init_qs_minus26(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_pic_init_qs_minus26(segment, 0L, value); } + /// Sets `pic_init_qs_minus26` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet pic_init_qs_minus26At(long index, @CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_pic_init_qs_minus26(this.segment(), index, value); return this; } + /// Sets `pic_init_qs_minus26` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet pic_init_qs_minus26(@CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_pic_init_qs_minus26(this.segment(), value); return this; } + + /// {@return `chroma_qp_index_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_chroma_qp_index_offset(MemorySegment segment, long index) { return (byte) VH_chroma_qp_index_offset.get(segment, 0L, index); } + /// {@return `chroma_qp_index_offset`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_chroma_qp_index_offset(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_chroma_qp_index_offset(segment, 0L); } + /// {@return `chroma_qp_index_offset` at the given index} + /// @param index the index + public @CType("int8_t") byte chroma_qp_index_offsetAt(long index) { return StdVideoH264PictureParameterSet.get_chroma_qp_index_offset(this.segment(), index); } + /// {@return `chroma_qp_index_offset`} + public @CType("int8_t") byte chroma_qp_index_offset() { return StdVideoH264PictureParameterSet.get_chroma_qp_index_offset(this.segment()); } + /// Sets `chroma_qp_index_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_qp_index_offset(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_chroma_qp_index_offset.set(segment, 0L, index, value); } + /// Sets `chroma_qp_index_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_qp_index_offset(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_chroma_qp_index_offset(segment, 0L, value); } + /// Sets `chroma_qp_index_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet chroma_qp_index_offsetAt(long index, @CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_chroma_qp_index_offset(this.segment(), index, value); return this; } + /// Sets `chroma_qp_index_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet chroma_qp_index_offset(@CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_chroma_qp_index_offset(this.segment(), value); return this; } + + /// {@return `second_chroma_qp_index_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_second_chroma_qp_index_offset(MemorySegment segment, long index) { return (byte) VH_second_chroma_qp_index_offset.get(segment, 0L, index); } + /// {@return `second_chroma_qp_index_offset`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_second_chroma_qp_index_offset(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_second_chroma_qp_index_offset(segment, 0L); } + /// {@return `second_chroma_qp_index_offset` at the given index} + /// @param index the index + public @CType("int8_t") byte second_chroma_qp_index_offsetAt(long index) { return StdVideoH264PictureParameterSet.get_second_chroma_qp_index_offset(this.segment(), index); } + /// {@return `second_chroma_qp_index_offset`} + public @CType("int8_t") byte second_chroma_qp_index_offset() { return StdVideoH264PictureParameterSet.get_second_chroma_qp_index_offset(this.segment()); } + /// Sets `second_chroma_qp_index_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_second_chroma_qp_index_offset(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_second_chroma_qp_index_offset.set(segment, 0L, index, value); } + /// Sets `second_chroma_qp_index_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_second_chroma_qp_index_offset(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_second_chroma_qp_index_offset(segment, 0L, value); } + /// Sets `second_chroma_qp_index_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet second_chroma_qp_index_offsetAt(long index, @CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_second_chroma_qp_index_offset(this.segment(), index, value); return this; } + /// Sets `second_chroma_qp_index_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet second_chroma_qp_index_offset(@CType("int8_t") byte value) { StdVideoH264PictureParameterSet.set_second_chroma_qp_index_offset(this.segment(), value); return this; } + + /// {@return `pScalingLists` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment get_pScalingLists(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pScalingLists.get(segment, 0L, index); } + /// {@return `pScalingLists`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment get_pScalingLists(MemorySegment segment) { return StdVideoH264PictureParameterSet.get_pScalingLists(segment, 0L); } + /// {@return `pScalingLists` at the given index} + /// @param index the index + public @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment pScalingListsAt(long index) { return StdVideoH264PictureParameterSet.get_pScalingLists(this.segment(), index); } + /// {@return `pScalingLists`} + public @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment pScalingLists() { return StdVideoH264PictureParameterSet.get_pScalingLists(this.segment()); } + /// Sets `pScalingLists` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pScalingLists(MemorySegment segment, long index, @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment value) { VH_pScalingLists.set(segment, 0L, index, value); } + /// Sets `pScalingLists` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pScalingLists(MemorySegment segment, @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH264PictureParameterSet.set_pScalingLists(segment, 0L, value); } + /// Sets `pScalingLists` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet pScalingListsAt(long index, @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH264PictureParameterSet.set_pScalingLists(this.segment(), index, value); return this; } + /// Sets `pScalingLists` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PictureParameterSet pScalingLists(@CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH264PictureParameterSet.set_pScalingLists(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264PpsFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264PpsFlags.java new file mode 100644 index 00000000..3524c154 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264PpsFlags.java @@ -0,0 +1,370 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### transform_8x8_mode_flag +/// [VarHandle][#VH_transform_8x8_mode_flag] - [Getter][#transform_8x8_mode_flag()] - [Setter][#transform_8x8_mode_flag(int)] +/// ### redundant_pic_cnt_present_flag +/// [VarHandle][#VH_redundant_pic_cnt_present_flag] - [Getter][#redundant_pic_cnt_present_flag()] - [Setter][#redundant_pic_cnt_present_flag(int)] +/// ### constrained_intra_pred_flag +/// [VarHandle][#VH_constrained_intra_pred_flag] - [Getter][#constrained_intra_pred_flag()] - [Setter][#constrained_intra_pred_flag(int)] +/// ### deblocking_filter_control_present_flag +/// [VarHandle][#VH_deblocking_filter_control_present_flag] - [Getter][#deblocking_filter_control_present_flag()] - [Setter][#deblocking_filter_control_present_flag(int)] +/// ### weighted_pred_flag +/// [VarHandle][#VH_weighted_pred_flag] - [Getter][#weighted_pred_flag()] - [Setter][#weighted_pred_flag(int)] +/// ### bottom_field_pic_order_in_frame_present_flag +/// [VarHandle][#VH_bottom_field_pic_order_in_frame_present_flag] - [Getter][#bottom_field_pic_order_in_frame_present_flag()] - [Setter][#bottom_field_pic_order_in_frame_present_flag(int)] +/// ### entropy_coding_mode_flag +/// [VarHandle][#VH_entropy_coding_mode_flag] - [Getter][#entropy_coding_mode_flag()] - [Setter][#entropy_coding_mode_flag(int)] +/// ### pic_scaling_matrix_present_flag +/// [VarHandle][#VH_pic_scaling_matrix_present_flag] - [Getter][#pic_scaling_matrix_present_flag()] - [Setter][#pic_scaling_matrix_present_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH264PpsFlags { +/// uint32_t : 1 transform_8x8_mode_flag; +/// uint32_t : 1 redundant_pic_cnt_present_flag; +/// uint32_t : 1 constrained_intra_pred_flag; +/// uint32_t : 1 deblocking_filter_control_present_flag; +/// uint32_t : 1 weighted_pred_flag; +/// uint32_t : 1 bottom_field_pic_order_in_frame_present_flag; +/// uint32_t : 1 entropy_coding_mode_flag; +/// uint32_t : 1 pic_scaling_matrix_present_flag; +/// } StdVideoH264PpsFlags; +/// ``` +public final class StdVideoH264PpsFlags extends Struct { + /// The struct layout of `StdVideoH264PpsFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("transform_8x8_mode_flag"), + ValueLayout.JAVA_INT.withName("redundant_pic_cnt_present_flag"), + ValueLayout.JAVA_INT.withName("constrained_intra_pred_flag"), + ValueLayout.JAVA_INT.withName("deblocking_filter_control_present_flag"), + ValueLayout.JAVA_INT.withName("weighted_pred_flag"), + ValueLayout.JAVA_INT.withName("bottom_field_pic_order_in_frame_present_flag"), + ValueLayout.JAVA_INT.withName("entropy_coding_mode_flag"), + ValueLayout.JAVA_INT.withName("pic_scaling_matrix_present_flag") + ); + /// The [VarHandle] of `transform_8x8_mode_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transform_8x8_mode_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transform_8x8_mode_flag")); + /// The [VarHandle] of `redundant_pic_cnt_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_redundant_pic_cnt_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("redundant_pic_cnt_present_flag")); + /// The [VarHandle] of `constrained_intra_pred_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constrained_intra_pred_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constrained_intra_pred_flag")); + /// The [VarHandle] of `deblocking_filter_control_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deblocking_filter_control_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deblocking_filter_control_present_flag")); + /// The [VarHandle] of `weighted_pred_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_weighted_pred_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("weighted_pred_flag")); + /// The [VarHandle] of `bottom_field_pic_order_in_frame_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bottom_field_pic_order_in_frame_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bottom_field_pic_order_in_frame_present_flag")); + /// The [VarHandle] of `entropy_coding_mode_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_entropy_coding_mode_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("entropy_coding_mode_flag")); + /// The [VarHandle] of `pic_scaling_matrix_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pic_scaling_matrix_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_scaling_matrix_present_flag")); + + /// Creates `StdVideoH264PpsFlags` with the given segment. + /// @param segment the memory segment + public StdVideoH264PpsFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH264PpsFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264PpsFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264PpsFlags(segment); } + + /// Creates `StdVideoH264PpsFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264PpsFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264PpsFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH264PpsFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264PpsFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264PpsFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH264PpsFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH264PpsFlags` + public static StdVideoH264PpsFlags alloc(SegmentAllocator allocator) { return new StdVideoH264PpsFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH264PpsFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH264PpsFlags` + public static StdVideoH264PpsFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoH264PpsFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `transform_8x8_mode_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_transform_8x8_mode_flag(MemorySegment segment, long index) { return (int) VH_transform_8x8_mode_flag.get(segment, 0L, index); } + /// {@return `transform_8x8_mode_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_transform_8x8_mode_flag(MemorySegment segment) { return StdVideoH264PpsFlags.get_transform_8x8_mode_flag(segment, 0L); } + /// {@return `transform_8x8_mode_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int transform_8x8_mode_flagAt(long index) { return StdVideoH264PpsFlags.get_transform_8x8_mode_flag(this.segment(), index); } + /// {@return `transform_8x8_mode_flag`} + public @CType("uint32_t : 1") int transform_8x8_mode_flag() { return StdVideoH264PpsFlags.get_transform_8x8_mode_flag(this.segment()); } + /// Sets `transform_8x8_mode_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transform_8x8_mode_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_transform_8x8_mode_flag.set(segment, 0L, index, value); } + /// Sets `transform_8x8_mode_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transform_8x8_mode_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_transform_8x8_mode_flag(segment, 0L, value); } + /// Sets `transform_8x8_mode_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags transform_8x8_mode_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_transform_8x8_mode_flag(this.segment(), index, value); return this; } + /// Sets `transform_8x8_mode_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags transform_8x8_mode_flag(@CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_transform_8x8_mode_flag(this.segment(), value); return this; } + + /// {@return `redundant_pic_cnt_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_redundant_pic_cnt_present_flag(MemorySegment segment, long index) { return (int) VH_redundant_pic_cnt_present_flag.get(segment, 0L, index); } + /// {@return `redundant_pic_cnt_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_redundant_pic_cnt_present_flag(MemorySegment segment) { return StdVideoH264PpsFlags.get_redundant_pic_cnt_present_flag(segment, 0L); } + /// {@return `redundant_pic_cnt_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int redundant_pic_cnt_present_flagAt(long index) { return StdVideoH264PpsFlags.get_redundant_pic_cnt_present_flag(this.segment(), index); } + /// {@return `redundant_pic_cnt_present_flag`} + public @CType("uint32_t : 1") int redundant_pic_cnt_present_flag() { return StdVideoH264PpsFlags.get_redundant_pic_cnt_present_flag(this.segment()); } + /// Sets `redundant_pic_cnt_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_redundant_pic_cnt_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_redundant_pic_cnt_present_flag.set(segment, 0L, index, value); } + /// Sets `redundant_pic_cnt_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_redundant_pic_cnt_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_redundant_pic_cnt_present_flag(segment, 0L, value); } + /// Sets `redundant_pic_cnt_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags redundant_pic_cnt_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_redundant_pic_cnt_present_flag(this.segment(), index, value); return this; } + /// Sets `redundant_pic_cnt_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags redundant_pic_cnt_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_redundant_pic_cnt_present_flag(this.segment(), value); return this; } + + /// {@return `constrained_intra_pred_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_constrained_intra_pred_flag(MemorySegment segment, long index) { return (int) VH_constrained_intra_pred_flag.get(segment, 0L, index); } + /// {@return `constrained_intra_pred_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_constrained_intra_pred_flag(MemorySegment segment) { return StdVideoH264PpsFlags.get_constrained_intra_pred_flag(segment, 0L); } + /// {@return `constrained_intra_pred_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int constrained_intra_pred_flagAt(long index) { return StdVideoH264PpsFlags.get_constrained_intra_pred_flag(this.segment(), index); } + /// {@return `constrained_intra_pred_flag`} + public @CType("uint32_t : 1") int constrained_intra_pred_flag() { return StdVideoH264PpsFlags.get_constrained_intra_pred_flag(this.segment()); } + /// Sets `constrained_intra_pred_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constrained_intra_pred_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_constrained_intra_pred_flag.set(segment, 0L, index, value); } + /// Sets `constrained_intra_pred_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constrained_intra_pred_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_constrained_intra_pred_flag(segment, 0L, value); } + /// Sets `constrained_intra_pred_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags constrained_intra_pred_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_constrained_intra_pred_flag(this.segment(), index, value); return this; } + /// Sets `constrained_intra_pred_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags constrained_intra_pred_flag(@CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_constrained_intra_pred_flag(this.segment(), value); return this; } + + /// {@return `deblocking_filter_control_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_deblocking_filter_control_present_flag(MemorySegment segment, long index) { return (int) VH_deblocking_filter_control_present_flag.get(segment, 0L, index); } + /// {@return `deblocking_filter_control_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_deblocking_filter_control_present_flag(MemorySegment segment) { return StdVideoH264PpsFlags.get_deblocking_filter_control_present_flag(segment, 0L); } + /// {@return `deblocking_filter_control_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int deblocking_filter_control_present_flagAt(long index) { return StdVideoH264PpsFlags.get_deblocking_filter_control_present_flag(this.segment(), index); } + /// {@return `deblocking_filter_control_present_flag`} + public @CType("uint32_t : 1") int deblocking_filter_control_present_flag() { return StdVideoH264PpsFlags.get_deblocking_filter_control_present_flag(this.segment()); } + /// Sets `deblocking_filter_control_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deblocking_filter_control_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_deblocking_filter_control_present_flag.set(segment, 0L, index, value); } + /// Sets `deblocking_filter_control_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deblocking_filter_control_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_deblocking_filter_control_present_flag(segment, 0L, value); } + /// Sets `deblocking_filter_control_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags deblocking_filter_control_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_deblocking_filter_control_present_flag(this.segment(), index, value); return this; } + /// Sets `deblocking_filter_control_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags deblocking_filter_control_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_deblocking_filter_control_present_flag(this.segment(), value); return this; } + + /// {@return `weighted_pred_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_weighted_pred_flag(MemorySegment segment, long index) { return (int) VH_weighted_pred_flag.get(segment, 0L, index); } + /// {@return `weighted_pred_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_weighted_pred_flag(MemorySegment segment) { return StdVideoH264PpsFlags.get_weighted_pred_flag(segment, 0L); } + /// {@return `weighted_pred_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int weighted_pred_flagAt(long index) { return StdVideoH264PpsFlags.get_weighted_pred_flag(this.segment(), index); } + /// {@return `weighted_pred_flag`} + public @CType("uint32_t : 1") int weighted_pred_flag() { return StdVideoH264PpsFlags.get_weighted_pred_flag(this.segment()); } + /// Sets `weighted_pred_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_weighted_pred_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_weighted_pred_flag.set(segment, 0L, index, value); } + /// Sets `weighted_pred_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_weighted_pred_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_weighted_pred_flag(segment, 0L, value); } + /// Sets `weighted_pred_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags weighted_pred_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_weighted_pred_flag(this.segment(), index, value); return this; } + /// Sets `weighted_pred_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags weighted_pred_flag(@CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_weighted_pred_flag(this.segment(), value); return this; } + + /// {@return `bottom_field_pic_order_in_frame_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_bottom_field_pic_order_in_frame_present_flag(MemorySegment segment, long index) { return (int) VH_bottom_field_pic_order_in_frame_present_flag.get(segment, 0L, index); } + /// {@return `bottom_field_pic_order_in_frame_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_bottom_field_pic_order_in_frame_present_flag(MemorySegment segment) { return StdVideoH264PpsFlags.get_bottom_field_pic_order_in_frame_present_flag(segment, 0L); } + /// {@return `bottom_field_pic_order_in_frame_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int bottom_field_pic_order_in_frame_present_flagAt(long index) { return StdVideoH264PpsFlags.get_bottom_field_pic_order_in_frame_present_flag(this.segment(), index); } + /// {@return `bottom_field_pic_order_in_frame_present_flag`} + public @CType("uint32_t : 1") int bottom_field_pic_order_in_frame_present_flag() { return StdVideoH264PpsFlags.get_bottom_field_pic_order_in_frame_present_flag(this.segment()); } + /// Sets `bottom_field_pic_order_in_frame_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bottom_field_pic_order_in_frame_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_bottom_field_pic_order_in_frame_present_flag.set(segment, 0L, index, value); } + /// Sets `bottom_field_pic_order_in_frame_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bottom_field_pic_order_in_frame_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_bottom_field_pic_order_in_frame_present_flag(segment, 0L, value); } + /// Sets `bottom_field_pic_order_in_frame_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags bottom_field_pic_order_in_frame_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_bottom_field_pic_order_in_frame_present_flag(this.segment(), index, value); return this; } + /// Sets `bottom_field_pic_order_in_frame_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags bottom_field_pic_order_in_frame_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_bottom_field_pic_order_in_frame_present_flag(this.segment(), value); return this; } + + /// {@return `entropy_coding_mode_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_entropy_coding_mode_flag(MemorySegment segment, long index) { return (int) VH_entropy_coding_mode_flag.get(segment, 0L, index); } + /// {@return `entropy_coding_mode_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_entropy_coding_mode_flag(MemorySegment segment) { return StdVideoH264PpsFlags.get_entropy_coding_mode_flag(segment, 0L); } + /// {@return `entropy_coding_mode_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int entropy_coding_mode_flagAt(long index) { return StdVideoH264PpsFlags.get_entropy_coding_mode_flag(this.segment(), index); } + /// {@return `entropy_coding_mode_flag`} + public @CType("uint32_t : 1") int entropy_coding_mode_flag() { return StdVideoH264PpsFlags.get_entropy_coding_mode_flag(this.segment()); } + /// Sets `entropy_coding_mode_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_entropy_coding_mode_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_entropy_coding_mode_flag.set(segment, 0L, index, value); } + /// Sets `entropy_coding_mode_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_entropy_coding_mode_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_entropy_coding_mode_flag(segment, 0L, value); } + /// Sets `entropy_coding_mode_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags entropy_coding_mode_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_entropy_coding_mode_flag(this.segment(), index, value); return this; } + /// Sets `entropy_coding_mode_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags entropy_coding_mode_flag(@CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_entropy_coding_mode_flag(this.segment(), value); return this; } + + /// {@return `pic_scaling_matrix_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pic_scaling_matrix_present_flag(MemorySegment segment, long index) { return (int) VH_pic_scaling_matrix_present_flag.get(segment, 0L, index); } + /// {@return `pic_scaling_matrix_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pic_scaling_matrix_present_flag(MemorySegment segment) { return StdVideoH264PpsFlags.get_pic_scaling_matrix_present_flag(segment, 0L); } + /// {@return `pic_scaling_matrix_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pic_scaling_matrix_present_flagAt(long index) { return StdVideoH264PpsFlags.get_pic_scaling_matrix_present_flag(this.segment(), index); } + /// {@return `pic_scaling_matrix_present_flag`} + public @CType("uint32_t : 1") int pic_scaling_matrix_present_flag() { return StdVideoH264PpsFlags.get_pic_scaling_matrix_present_flag(this.segment()); } + /// Sets `pic_scaling_matrix_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_scaling_matrix_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pic_scaling_matrix_present_flag.set(segment, 0L, index, value); } + /// Sets `pic_scaling_matrix_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_scaling_matrix_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_pic_scaling_matrix_present_flag(segment, 0L, value); } + /// Sets `pic_scaling_matrix_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags pic_scaling_matrix_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_pic_scaling_matrix_present_flag(this.segment(), index, value); return this; } + /// Sets `pic_scaling_matrix_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264PpsFlags pic_scaling_matrix_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264PpsFlags.set_pic_scaling_matrix_present_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264ScalingLists.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264ScalingLists.java new file mode 100644 index 00000000..c7315105 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264ScalingLists.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### scaling_list_present_mask +/// [VarHandle][#VH_scaling_list_present_mask] - [Getter][#scaling_list_present_mask()] - [Setter][#scaling_list_present_mask(short)] +/// ### use_default_scaling_matrix_mask +/// [VarHandle][#VH_use_default_scaling_matrix_mask] - [Getter][#use_default_scaling_matrix_mask()] - [Setter][#use_default_scaling_matrix_mask(short)] +/// ### ScalingList4x4 +/// [VarHandle][#VH_ScalingList4x4] - [Getter][#ScalingList4x4()] - [Setter][#ScalingList4x4(byte)] +/// ### ScalingList8x8 +/// [VarHandle][#VH_ScalingList8x8] - [Getter][#ScalingList8x8()] - [Setter][#ScalingList8x8(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH264ScalingLists { +/// uint16_t scaling_list_present_mask; +/// uint16_t use_default_scaling_matrix_mask; +/// uint8_t [ ][ ] ScalingList4x4; +/// uint8_t [ ][ ] ScalingList8x8; +/// } StdVideoH264ScalingLists; +/// ``` +public final class StdVideoH264ScalingLists extends Struct { + /// The struct layout of `StdVideoH264ScalingLists`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_SHORT.withName("scaling_list_present_mask"), + ValueLayout.JAVA_SHORT.withName("use_default_scaling_matrix_mask"), + ValueLayout.JAVA_BYTE.withName("ScalingList4x4"), + ValueLayout.JAVA_BYTE.withName("ScalingList8x8") + ); + /// The [VarHandle] of `scaling_list_present_mask` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_scaling_list_present_mask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scaling_list_present_mask")); + /// The [VarHandle] of `use_default_scaling_matrix_mask` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_use_default_scaling_matrix_mask = LAYOUT.arrayElementVarHandle(PathElement.groupElement("use_default_scaling_matrix_mask")); + /// The [VarHandle] of `ScalingList4x4` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ScalingList4x4 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ScalingList4x4")); + /// The [VarHandle] of `ScalingList8x8` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ScalingList8x8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ScalingList8x8")); + + /// Creates `StdVideoH264ScalingLists` with the given segment. + /// @param segment the memory segment + public StdVideoH264ScalingLists(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH264ScalingLists` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264ScalingLists of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264ScalingLists(segment); } + + /// Creates `StdVideoH264ScalingLists` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264ScalingLists ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264ScalingLists(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH264ScalingLists` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264ScalingLists ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264ScalingLists(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH264ScalingLists` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH264ScalingLists` + public static StdVideoH264ScalingLists alloc(SegmentAllocator allocator) { return new StdVideoH264ScalingLists(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH264ScalingLists` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH264ScalingLists` + public static StdVideoH264ScalingLists alloc(SegmentAllocator allocator, long count) { return new StdVideoH264ScalingLists(allocator.allocate(LAYOUT, count)); } + + /// {@return `scaling_list_present_mask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_scaling_list_present_mask(MemorySegment segment, long index) { return (short) VH_scaling_list_present_mask.get(segment, 0L, index); } + /// {@return `scaling_list_present_mask`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_scaling_list_present_mask(MemorySegment segment) { return StdVideoH264ScalingLists.get_scaling_list_present_mask(segment, 0L); } + /// {@return `scaling_list_present_mask` at the given index} + /// @param index the index + public @CType("uint16_t") short scaling_list_present_maskAt(long index) { return StdVideoH264ScalingLists.get_scaling_list_present_mask(this.segment(), index); } + /// {@return `scaling_list_present_mask`} + public @CType("uint16_t") short scaling_list_present_mask() { return StdVideoH264ScalingLists.get_scaling_list_present_mask(this.segment()); } + /// Sets `scaling_list_present_mask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scaling_list_present_mask(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_scaling_list_present_mask.set(segment, 0L, index, value); } + /// Sets `scaling_list_present_mask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scaling_list_present_mask(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH264ScalingLists.set_scaling_list_present_mask(segment, 0L, value); } + /// Sets `scaling_list_present_mask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264ScalingLists scaling_list_present_maskAt(long index, @CType("uint16_t") short value) { StdVideoH264ScalingLists.set_scaling_list_present_mask(this.segment(), index, value); return this; } + /// Sets `scaling_list_present_mask` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264ScalingLists scaling_list_present_mask(@CType("uint16_t") short value) { StdVideoH264ScalingLists.set_scaling_list_present_mask(this.segment(), value); return this; } + + /// {@return `use_default_scaling_matrix_mask` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_use_default_scaling_matrix_mask(MemorySegment segment, long index) { return (short) VH_use_default_scaling_matrix_mask.get(segment, 0L, index); } + /// {@return `use_default_scaling_matrix_mask`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_use_default_scaling_matrix_mask(MemorySegment segment) { return StdVideoH264ScalingLists.get_use_default_scaling_matrix_mask(segment, 0L); } + /// {@return `use_default_scaling_matrix_mask` at the given index} + /// @param index the index + public @CType("uint16_t") short use_default_scaling_matrix_maskAt(long index) { return StdVideoH264ScalingLists.get_use_default_scaling_matrix_mask(this.segment(), index); } + /// {@return `use_default_scaling_matrix_mask`} + public @CType("uint16_t") short use_default_scaling_matrix_mask() { return StdVideoH264ScalingLists.get_use_default_scaling_matrix_mask(this.segment()); } + /// Sets `use_default_scaling_matrix_mask` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_use_default_scaling_matrix_mask(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_use_default_scaling_matrix_mask.set(segment, 0L, index, value); } + /// Sets `use_default_scaling_matrix_mask` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_use_default_scaling_matrix_mask(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH264ScalingLists.set_use_default_scaling_matrix_mask(segment, 0L, value); } + /// Sets `use_default_scaling_matrix_mask` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264ScalingLists use_default_scaling_matrix_maskAt(long index, @CType("uint16_t") short value) { StdVideoH264ScalingLists.set_use_default_scaling_matrix_mask(this.segment(), index, value); return this; } + /// Sets `use_default_scaling_matrix_mask` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264ScalingLists use_default_scaling_matrix_mask(@CType("uint16_t") short value) { StdVideoH264ScalingLists.set_use_default_scaling_matrix_mask(this.segment(), value); return this; } + + /// {@return `ScalingList4x4` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ][ ]") byte get_ScalingList4x4(MemorySegment segment, long index) { return (byte) VH_ScalingList4x4.get(segment, 0L, index); } + /// {@return `ScalingList4x4`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ][ ]") byte get_ScalingList4x4(MemorySegment segment) { return StdVideoH264ScalingLists.get_ScalingList4x4(segment, 0L); } + /// {@return `ScalingList4x4` at the given index} + /// @param index the index + public @CType("uint8_t [ ][ ]") byte ScalingList4x4At(long index) { return StdVideoH264ScalingLists.get_ScalingList4x4(this.segment(), index); } + /// {@return `ScalingList4x4`} + public @CType("uint8_t [ ][ ]") byte ScalingList4x4() { return StdVideoH264ScalingLists.get_ScalingList4x4(this.segment()); } + /// Sets `ScalingList4x4` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ScalingList4x4(MemorySegment segment, long index, @CType("uint8_t [ ][ ]") byte value) { VH_ScalingList4x4.set(segment, 0L, index, value); } + /// Sets `ScalingList4x4` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ScalingList4x4(MemorySegment segment, @CType("uint8_t [ ][ ]") byte value) { StdVideoH264ScalingLists.set_ScalingList4x4(segment, 0L, value); } + /// Sets `ScalingList4x4` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264ScalingLists ScalingList4x4At(long index, @CType("uint8_t [ ][ ]") byte value) { StdVideoH264ScalingLists.set_ScalingList4x4(this.segment(), index, value); return this; } + /// Sets `ScalingList4x4` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264ScalingLists ScalingList4x4(@CType("uint8_t [ ][ ]") byte value) { StdVideoH264ScalingLists.set_ScalingList4x4(this.segment(), value); return this; } + + /// {@return `ScalingList8x8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ][ ]") byte get_ScalingList8x8(MemorySegment segment, long index) { return (byte) VH_ScalingList8x8.get(segment, 0L, index); } + /// {@return `ScalingList8x8`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ][ ]") byte get_ScalingList8x8(MemorySegment segment) { return StdVideoH264ScalingLists.get_ScalingList8x8(segment, 0L); } + /// {@return `ScalingList8x8` at the given index} + /// @param index the index + public @CType("uint8_t [ ][ ]") byte ScalingList8x8At(long index) { return StdVideoH264ScalingLists.get_ScalingList8x8(this.segment(), index); } + /// {@return `ScalingList8x8`} + public @CType("uint8_t [ ][ ]") byte ScalingList8x8() { return StdVideoH264ScalingLists.get_ScalingList8x8(this.segment()); } + /// Sets `ScalingList8x8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ScalingList8x8(MemorySegment segment, long index, @CType("uint8_t [ ][ ]") byte value) { VH_ScalingList8x8.set(segment, 0L, index, value); } + /// Sets `ScalingList8x8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ScalingList8x8(MemorySegment segment, @CType("uint8_t [ ][ ]") byte value) { StdVideoH264ScalingLists.set_ScalingList8x8(segment, 0L, value); } + /// Sets `ScalingList8x8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264ScalingLists ScalingList8x8At(long index, @CType("uint8_t [ ][ ]") byte value) { StdVideoH264ScalingLists.set_ScalingList8x8(this.segment(), index, value); return this; } + /// Sets `ScalingList8x8` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264ScalingLists ScalingList8x8(@CType("uint8_t [ ][ ]") byte value) { StdVideoH264ScalingLists.set_ScalingList8x8(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SequenceParameterSet.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SequenceParameterSet.java new file mode 100644 index 00000000..09fb2d09 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SequenceParameterSet.java @@ -0,0 +1,999 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### profile_idc +/// [VarHandle][#VH_profile_idc] - [Getter][#profile_idc()] - [Setter][#profile_idc(int)] +/// ### level_idc +/// [VarHandle][#VH_level_idc] - [Getter][#level_idc()] - [Setter][#level_idc(int)] +/// ### chroma_format_idc +/// [VarHandle][#VH_chroma_format_idc] - [Getter][#chroma_format_idc()] - [Setter][#chroma_format_idc(int)] +/// ### seq_parameter_set_id +/// [VarHandle][#VH_seq_parameter_set_id] - [Getter][#seq_parameter_set_id()] - [Setter][#seq_parameter_set_id(byte)] +/// ### bit_depth_luma_minus8 +/// [VarHandle][#VH_bit_depth_luma_minus8] - [Getter][#bit_depth_luma_minus8()] - [Setter][#bit_depth_luma_minus8(byte)] +/// ### bit_depth_chroma_minus8 +/// [VarHandle][#VH_bit_depth_chroma_minus8] - [Getter][#bit_depth_chroma_minus8()] - [Setter][#bit_depth_chroma_minus8(byte)] +/// ### log2_max_frame_num_minus4 +/// [VarHandle][#VH_log2_max_frame_num_minus4] - [Getter][#log2_max_frame_num_minus4()] - [Setter][#log2_max_frame_num_minus4(byte)] +/// ### pic_order_cnt_type +/// [VarHandle][#VH_pic_order_cnt_type] - [Getter][#pic_order_cnt_type()] - [Setter][#pic_order_cnt_type(int)] +/// ### offset_for_non_ref_pic +/// [VarHandle][#VH_offset_for_non_ref_pic] - [Getter][#offset_for_non_ref_pic()] - [Setter][#offset_for_non_ref_pic(int)] +/// ### offset_for_top_to_bottom_field +/// [VarHandle][#VH_offset_for_top_to_bottom_field] - [Getter][#offset_for_top_to_bottom_field()] - [Setter][#offset_for_top_to_bottom_field(int)] +/// ### log2_max_pic_order_cnt_lsb_minus4 +/// [VarHandle][#VH_log2_max_pic_order_cnt_lsb_minus4] - [Getter][#log2_max_pic_order_cnt_lsb_minus4()] - [Setter][#log2_max_pic_order_cnt_lsb_minus4(byte)] +/// ### num_ref_frames_in_pic_order_cnt_cycle +/// [VarHandle][#VH_num_ref_frames_in_pic_order_cnt_cycle] - [Getter][#num_ref_frames_in_pic_order_cnt_cycle()] - [Setter][#num_ref_frames_in_pic_order_cnt_cycle(byte)] +/// ### max_num_ref_frames +/// [VarHandle][#VH_max_num_ref_frames] - [Getter][#max_num_ref_frames()] - [Setter][#max_num_ref_frames(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### pic_width_in_mbs_minus1 +/// [VarHandle][#VH_pic_width_in_mbs_minus1] - [Getter][#pic_width_in_mbs_minus1()] - [Setter][#pic_width_in_mbs_minus1(int)] +/// ### pic_height_in_map_units_minus1 +/// [VarHandle][#VH_pic_height_in_map_units_minus1] - [Getter][#pic_height_in_map_units_minus1()] - [Setter][#pic_height_in_map_units_minus1(int)] +/// ### frame_crop_left_offset +/// [VarHandle][#VH_frame_crop_left_offset] - [Getter][#frame_crop_left_offset()] - [Setter][#frame_crop_left_offset(int)] +/// ### frame_crop_right_offset +/// [VarHandle][#VH_frame_crop_right_offset] - [Getter][#frame_crop_right_offset()] - [Setter][#frame_crop_right_offset(int)] +/// ### frame_crop_top_offset +/// [VarHandle][#VH_frame_crop_top_offset] - [Getter][#frame_crop_top_offset()] - [Setter][#frame_crop_top_offset(int)] +/// ### frame_crop_bottom_offset +/// [VarHandle][#VH_frame_crop_bottom_offset] - [Getter][#frame_crop_bottom_offset()] - [Setter][#frame_crop_bottom_offset(int)] +/// ### reserved2 +/// [VarHandle][#VH_reserved2] - [Getter][#reserved2()] - [Setter][#reserved2(int)] +/// ### pOffsetForRefFrame +/// [VarHandle][#VH_pOffsetForRefFrame] - [Getter][#pOffsetForRefFrame()] - [Setter][#pOffsetForRefFrame(java.lang.foreign.MemorySegment)] +/// ### pScalingLists +/// [VarHandle][#VH_pScalingLists] - [Getter][#pScalingLists()] - [Setter][#pScalingLists(java.lang.foreign.MemorySegment)] +/// ### pSequenceParameterSetVui +/// [VarHandle][#VH_pSequenceParameterSetVui] - [Getter][#pSequenceParameterSetVui()] - [Setter][#pSequenceParameterSetVui(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH264SequenceParameterSet { +/// StdVideoH264SpsFlags flags; +/// StdVideoH264ProfileIdc profile_idc; +/// StdVideoH264LevelIdc level_idc; +/// StdVideoH264ChromaFormatIdc chroma_format_idc; +/// uint8_t seq_parameter_set_id; +/// uint8_t bit_depth_luma_minus8; +/// uint8_t bit_depth_chroma_minus8; +/// uint8_t log2_max_frame_num_minus4; +/// StdVideoH264PocType pic_order_cnt_type; +/// int32_t offset_for_non_ref_pic; +/// int32_t offset_for_top_to_bottom_field; +/// uint8_t log2_max_pic_order_cnt_lsb_minus4; +/// uint8_t num_ref_frames_in_pic_order_cnt_cycle; +/// uint8_t max_num_ref_frames; +/// uint8_t reserved1; +/// uint32_t pic_width_in_mbs_minus1; +/// uint32_t pic_height_in_map_units_minus1; +/// uint32_t frame_crop_left_offset; +/// uint32_t frame_crop_right_offset; +/// uint32_t frame_crop_top_offset; +/// uint32_t frame_crop_bottom_offset; +/// uint32_t reserved2; +/// const int32_t * pOffsetForRefFrame; +/// const StdVideoH264ScalingLists * pScalingLists; +/// const StdVideoH264SequenceParameterSetVui * pSequenceParameterSetVui; +/// } StdVideoH264SequenceParameterSet; +/// ``` +public final class StdVideoH264SequenceParameterSet extends Struct { + /// The struct layout of `StdVideoH264SequenceParameterSet`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoH264SpsFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("profile_idc"), + ValueLayout.JAVA_INT.withName("level_idc"), + ValueLayout.JAVA_INT.withName("chroma_format_idc"), + ValueLayout.JAVA_BYTE.withName("seq_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("bit_depth_luma_minus8"), + ValueLayout.JAVA_BYTE.withName("bit_depth_chroma_minus8"), + ValueLayout.JAVA_BYTE.withName("log2_max_frame_num_minus4"), + ValueLayout.JAVA_INT.withName("pic_order_cnt_type"), + ValueLayout.JAVA_INT.withName("offset_for_non_ref_pic"), + ValueLayout.JAVA_INT.withName("offset_for_top_to_bottom_field"), + ValueLayout.JAVA_BYTE.withName("log2_max_pic_order_cnt_lsb_minus4"), + ValueLayout.JAVA_BYTE.withName("num_ref_frames_in_pic_order_cnt_cycle"), + ValueLayout.JAVA_BYTE.withName("max_num_ref_frames"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_INT.withName("pic_width_in_mbs_minus1"), + ValueLayout.JAVA_INT.withName("pic_height_in_map_units_minus1"), + ValueLayout.JAVA_INT.withName("frame_crop_left_offset"), + ValueLayout.JAVA_INT.withName("frame_crop_right_offset"), + ValueLayout.JAVA_INT.withName("frame_crop_top_offset"), + ValueLayout.JAVA_INT.withName("frame_crop_bottom_offset"), + ValueLayout.JAVA_INT.withName("reserved2"), + ValueLayout.ADDRESS.withName("pOffsetForRefFrame"), + ValueLayout.ADDRESS.withName("pScalingLists"), + ValueLayout.ADDRESS.withName("pSequenceParameterSetVui") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `profile_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_profile_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("profile_idc")); + /// The [VarHandle] of `level_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_level_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("level_idc")); + /// The [VarHandle] of `chroma_format_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chroma_format_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_format_idc")); + /// The [VarHandle] of `seq_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_seq_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("seq_parameter_set_id")); + /// The [VarHandle] of `bit_depth_luma_minus8` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_bit_depth_luma_minus8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bit_depth_luma_minus8")); + /// The [VarHandle] of `bit_depth_chroma_minus8` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_bit_depth_chroma_minus8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bit_depth_chroma_minus8")); + /// The [VarHandle] of `log2_max_frame_num_minus4` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_max_frame_num_minus4 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_max_frame_num_minus4")); + /// The [VarHandle] of `pic_order_cnt_type` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pic_order_cnt_type = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_order_cnt_type")); + /// The [VarHandle] of `offset_for_non_ref_pic` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_offset_for_non_ref_pic = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset_for_non_ref_pic")); + /// The [VarHandle] of `offset_for_top_to_bottom_field` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_offset_for_top_to_bottom_field = LAYOUT.arrayElementVarHandle(PathElement.groupElement("offset_for_top_to_bottom_field")); + /// The [VarHandle] of `log2_max_pic_order_cnt_lsb_minus4` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_max_pic_order_cnt_lsb_minus4 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_max_pic_order_cnt_lsb_minus4")); + /// The [VarHandle] of `num_ref_frames_in_pic_order_cnt_cycle` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_ref_frames_in_pic_order_cnt_cycle = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_frames_in_pic_order_cnt_cycle")); + /// The [VarHandle] of `max_num_ref_frames` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_max_num_ref_frames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_num_ref_frames")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `pic_width_in_mbs_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pic_width_in_mbs_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_width_in_mbs_minus1")); + /// The [VarHandle] of `pic_height_in_map_units_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pic_height_in_map_units_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_height_in_map_units_minus1")); + /// The [VarHandle] of `frame_crop_left_offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_crop_left_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_crop_left_offset")); + /// The [VarHandle] of `frame_crop_right_offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_crop_right_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_crop_right_offset")); + /// The [VarHandle] of `frame_crop_top_offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_crop_top_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_crop_top_offset")); + /// The [VarHandle] of `frame_crop_bottom_offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_crop_bottom_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_crop_bottom_offset")); + /// The [VarHandle] of `reserved2` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved2")); + /// The [VarHandle] of `pOffsetForRefFrame` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pOffsetForRefFrame = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pOffsetForRefFrame")); + /// The [VarHandle] of `pScalingLists` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pScalingLists = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pScalingLists")); + /// The [VarHandle] of `pSequenceParameterSetVui` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSequenceParameterSetVui = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSequenceParameterSetVui")); + + /// Creates `StdVideoH264SequenceParameterSet` with the given segment. + /// @param segment the memory segment + public StdVideoH264SequenceParameterSet(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH264SequenceParameterSet` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SequenceParameterSet of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SequenceParameterSet(segment); } + + /// Creates `StdVideoH264SequenceParameterSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SequenceParameterSet ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SequenceParameterSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH264SequenceParameterSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SequenceParameterSet ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SequenceParameterSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH264SequenceParameterSet` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH264SequenceParameterSet` + public static StdVideoH264SequenceParameterSet alloc(SegmentAllocator allocator) { return new StdVideoH264SequenceParameterSet(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH264SequenceParameterSet` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH264SequenceParameterSet` + public static StdVideoH264SequenceParameterSet alloc(SegmentAllocator allocator, long count) { return new StdVideoH264SequenceParameterSet(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264SpsFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264SpsFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoH264SpsFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoH264SequenceParameterSet.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoH264SpsFlags") java.lang.foreign.MemorySegment flags() { return StdVideoH264SequenceParameterSet.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoH264SpsFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoH264SpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet flagsAt(long index, @CType("StdVideoH264SpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet flags(@CType("StdVideoH264SpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_flags(this.segment(), value); return this; } + + /// {@return `profile_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264ProfileIdc") int get_profile_idc(MemorySegment segment, long index) { return (int) VH_profile_idc.get(segment, 0L, index); } + /// {@return `profile_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264ProfileIdc") int get_profile_idc(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_profile_idc(segment, 0L); } + /// {@return `profile_idc` at the given index} + /// @param index the index + public @CType("StdVideoH264ProfileIdc") int profile_idcAt(long index) { return StdVideoH264SequenceParameterSet.get_profile_idc(this.segment(), index); } + /// {@return `profile_idc`} + public @CType("StdVideoH264ProfileIdc") int profile_idc() { return StdVideoH264SequenceParameterSet.get_profile_idc(this.segment()); } + /// Sets `profile_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_profile_idc(MemorySegment segment, long index, @CType("StdVideoH264ProfileIdc") int value) { VH_profile_idc.set(segment, 0L, index, value); } + /// Sets `profile_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_profile_idc(MemorySegment segment, @CType("StdVideoH264ProfileIdc") int value) { StdVideoH264SequenceParameterSet.set_profile_idc(segment, 0L, value); } + /// Sets `profile_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet profile_idcAt(long index, @CType("StdVideoH264ProfileIdc") int value) { StdVideoH264SequenceParameterSet.set_profile_idc(this.segment(), index, value); return this; } + /// Sets `profile_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet profile_idc(@CType("StdVideoH264ProfileIdc") int value) { StdVideoH264SequenceParameterSet.set_profile_idc(this.segment(), value); return this; } + + /// {@return `level_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264LevelIdc") int get_level_idc(MemorySegment segment, long index) { return (int) VH_level_idc.get(segment, 0L, index); } + /// {@return `level_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264LevelIdc") int get_level_idc(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_level_idc(segment, 0L); } + /// {@return `level_idc` at the given index} + /// @param index the index + public @CType("StdVideoH264LevelIdc") int level_idcAt(long index) { return StdVideoH264SequenceParameterSet.get_level_idc(this.segment(), index); } + /// {@return `level_idc`} + public @CType("StdVideoH264LevelIdc") int level_idc() { return StdVideoH264SequenceParameterSet.get_level_idc(this.segment()); } + /// Sets `level_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_level_idc(MemorySegment segment, long index, @CType("StdVideoH264LevelIdc") int value) { VH_level_idc.set(segment, 0L, index, value); } + /// Sets `level_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_level_idc(MemorySegment segment, @CType("StdVideoH264LevelIdc") int value) { StdVideoH264SequenceParameterSet.set_level_idc(segment, 0L, value); } + /// Sets `level_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet level_idcAt(long index, @CType("StdVideoH264LevelIdc") int value) { StdVideoH264SequenceParameterSet.set_level_idc(this.segment(), index, value); return this; } + /// Sets `level_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet level_idc(@CType("StdVideoH264LevelIdc") int value) { StdVideoH264SequenceParameterSet.set_level_idc(this.segment(), value); return this; } + + /// {@return `chroma_format_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264ChromaFormatIdc") int get_chroma_format_idc(MemorySegment segment, long index) { return (int) VH_chroma_format_idc.get(segment, 0L, index); } + /// {@return `chroma_format_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264ChromaFormatIdc") int get_chroma_format_idc(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_chroma_format_idc(segment, 0L); } + /// {@return `chroma_format_idc` at the given index} + /// @param index the index + public @CType("StdVideoH264ChromaFormatIdc") int chroma_format_idcAt(long index) { return StdVideoH264SequenceParameterSet.get_chroma_format_idc(this.segment(), index); } + /// {@return `chroma_format_idc`} + public @CType("StdVideoH264ChromaFormatIdc") int chroma_format_idc() { return StdVideoH264SequenceParameterSet.get_chroma_format_idc(this.segment()); } + /// Sets `chroma_format_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_format_idc(MemorySegment segment, long index, @CType("StdVideoH264ChromaFormatIdc") int value) { VH_chroma_format_idc.set(segment, 0L, index, value); } + /// Sets `chroma_format_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_format_idc(MemorySegment segment, @CType("StdVideoH264ChromaFormatIdc") int value) { StdVideoH264SequenceParameterSet.set_chroma_format_idc(segment, 0L, value); } + /// Sets `chroma_format_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet chroma_format_idcAt(long index, @CType("StdVideoH264ChromaFormatIdc") int value) { StdVideoH264SequenceParameterSet.set_chroma_format_idc(this.segment(), index, value); return this; } + /// Sets `chroma_format_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet chroma_format_idc(@CType("StdVideoH264ChromaFormatIdc") int value) { StdVideoH264SequenceParameterSet.set_chroma_format_idc(this.segment(), value); return this; } + + /// {@return `seq_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_seq_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_seq_parameter_set_id.get(segment, 0L, index); } + /// {@return `seq_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_seq_parameter_set_id(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_seq_parameter_set_id(segment, 0L); } + /// {@return `seq_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte seq_parameter_set_idAt(long index) { return StdVideoH264SequenceParameterSet.get_seq_parameter_set_id(this.segment(), index); } + /// {@return `seq_parameter_set_id`} + public @CType("uint8_t") byte seq_parameter_set_id() { return StdVideoH264SequenceParameterSet.get_seq_parameter_set_id(this.segment()); } + /// Sets `seq_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_seq_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_seq_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `seq_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_seq_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_seq_parameter_set_id(segment, 0L, value); } + /// Sets `seq_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet seq_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_seq_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `seq_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet seq_parameter_set_id(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_seq_parameter_set_id(this.segment(), value); return this; } + + /// {@return `bit_depth_luma_minus8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_bit_depth_luma_minus8(MemorySegment segment, long index) { return (byte) VH_bit_depth_luma_minus8.get(segment, 0L, index); } + /// {@return `bit_depth_luma_minus8`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_bit_depth_luma_minus8(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_bit_depth_luma_minus8(segment, 0L); } + /// {@return `bit_depth_luma_minus8` at the given index} + /// @param index the index + public @CType("uint8_t") byte bit_depth_luma_minus8At(long index) { return StdVideoH264SequenceParameterSet.get_bit_depth_luma_minus8(this.segment(), index); } + /// {@return `bit_depth_luma_minus8`} + public @CType("uint8_t") byte bit_depth_luma_minus8() { return StdVideoH264SequenceParameterSet.get_bit_depth_luma_minus8(this.segment()); } + /// Sets `bit_depth_luma_minus8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bit_depth_luma_minus8(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_bit_depth_luma_minus8.set(segment, 0L, index, value); } + /// Sets `bit_depth_luma_minus8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bit_depth_luma_minus8(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_bit_depth_luma_minus8(segment, 0L, value); } + /// Sets `bit_depth_luma_minus8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet bit_depth_luma_minus8At(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_bit_depth_luma_minus8(this.segment(), index, value); return this; } + /// Sets `bit_depth_luma_minus8` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet bit_depth_luma_minus8(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_bit_depth_luma_minus8(this.segment(), value); return this; } + + /// {@return `bit_depth_chroma_minus8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_bit_depth_chroma_minus8(MemorySegment segment, long index) { return (byte) VH_bit_depth_chroma_minus8.get(segment, 0L, index); } + /// {@return `bit_depth_chroma_minus8`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_bit_depth_chroma_minus8(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_bit_depth_chroma_minus8(segment, 0L); } + /// {@return `bit_depth_chroma_minus8` at the given index} + /// @param index the index + public @CType("uint8_t") byte bit_depth_chroma_minus8At(long index) { return StdVideoH264SequenceParameterSet.get_bit_depth_chroma_minus8(this.segment(), index); } + /// {@return `bit_depth_chroma_minus8`} + public @CType("uint8_t") byte bit_depth_chroma_minus8() { return StdVideoH264SequenceParameterSet.get_bit_depth_chroma_minus8(this.segment()); } + /// Sets `bit_depth_chroma_minus8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bit_depth_chroma_minus8(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_bit_depth_chroma_minus8.set(segment, 0L, index, value); } + /// Sets `bit_depth_chroma_minus8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bit_depth_chroma_minus8(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_bit_depth_chroma_minus8(segment, 0L, value); } + /// Sets `bit_depth_chroma_minus8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet bit_depth_chroma_minus8At(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_bit_depth_chroma_minus8(this.segment(), index, value); return this; } + /// Sets `bit_depth_chroma_minus8` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet bit_depth_chroma_minus8(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_bit_depth_chroma_minus8(this.segment(), value); return this; } + + /// {@return `log2_max_frame_num_minus4` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_max_frame_num_minus4(MemorySegment segment, long index) { return (byte) VH_log2_max_frame_num_minus4.get(segment, 0L, index); } + /// {@return `log2_max_frame_num_minus4`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_max_frame_num_minus4(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_log2_max_frame_num_minus4(segment, 0L); } + /// {@return `log2_max_frame_num_minus4` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_max_frame_num_minus4At(long index) { return StdVideoH264SequenceParameterSet.get_log2_max_frame_num_minus4(this.segment(), index); } + /// {@return `log2_max_frame_num_minus4`} + public @CType("uint8_t") byte log2_max_frame_num_minus4() { return StdVideoH264SequenceParameterSet.get_log2_max_frame_num_minus4(this.segment()); } + /// Sets `log2_max_frame_num_minus4` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_max_frame_num_minus4(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_max_frame_num_minus4.set(segment, 0L, index, value); } + /// Sets `log2_max_frame_num_minus4` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_max_frame_num_minus4(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_log2_max_frame_num_minus4(segment, 0L, value); } + /// Sets `log2_max_frame_num_minus4` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet log2_max_frame_num_minus4At(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_log2_max_frame_num_minus4(this.segment(), index, value); return this; } + /// Sets `log2_max_frame_num_minus4` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet log2_max_frame_num_minus4(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_log2_max_frame_num_minus4(this.segment(), value); return this; } + + /// {@return `pic_order_cnt_type` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264PocType") int get_pic_order_cnt_type(MemorySegment segment, long index) { return (int) VH_pic_order_cnt_type.get(segment, 0L, index); } + /// {@return `pic_order_cnt_type`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264PocType") int get_pic_order_cnt_type(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_pic_order_cnt_type(segment, 0L); } + /// {@return `pic_order_cnt_type` at the given index} + /// @param index the index + public @CType("StdVideoH264PocType") int pic_order_cnt_typeAt(long index) { return StdVideoH264SequenceParameterSet.get_pic_order_cnt_type(this.segment(), index); } + /// {@return `pic_order_cnt_type`} + public @CType("StdVideoH264PocType") int pic_order_cnt_type() { return StdVideoH264SequenceParameterSet.get_pic_order_cnt_type(this.segment()); } + /// Sets `pic_order_cnt_type` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_order_cnt_type(MemorySegment segment, long index, @CType("StdVideoH264PocType") int value) { VH_pic_order_cnt_type.set(segment, 0L, index, value); } + /// Sets `pic_order_cnt_type` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_order_cnt_type(MemorySegment segment, @CType("StdVideoH264PocType") int value) { StdVideoH264SequenceParameterSet.set_pic_order_cnt_type(segment, 0L, value); } + /// Sets `pic_order_cnt_type` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pic_order_cnt_typeAt(long index, @CType("StdVideoH264PocType") int value) { StdVideoH264SequenceParameterSet.set_pic_order_cnt_type(this.segment(), index, value); return this; } + /// Sets `pic_order_cnt_type` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pic_order_cnt_type(@CType("StdVideoH264PocType") int value) { StdVideoH264SequenceParameterSet.set_pic_order_cnt_type(this.segment(), value); return this; } + + /// {@return `offset_for_non_ref_pic` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_offset_for_non_ref_pic(MemorySegment segment, long index) { return (int) VH_offset_for_non_ref_pic.get(segment, 0L, index); } + /// {@return `offset_for_non_ref_pic`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_offset_for_non_ref_pic(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_offset_for_non_ref_pic(segment, 0L); } + /// {@return `offset_for_non_ref_pic` at the given index} + /// @param index the index + public @CType("int32_t") int offset_for_non_ref_picAt(long index) { return StdVideoH264SequenceParameterSet.get_offset_for_non_ref_pic(this.segment(), index); } + /// {@return `offset_for_non_ref_pic`} + public @CType("int32_t") int offset_for_non_ref_pic() { return StdVideoH264SequenceParameterSet.get_offset_for_non_ref_pic(this.segment()); } + /// Sets `offset_for_non_ref_pic` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset_for_non_ref_pic(MemorySegment segment, long index, @CType("int32_t") int value) { VH_offset_for_non_ref_pic.set(segment, 0L, index, value); } + /// Sets `offset_for_non_ref_pic` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset_for_non_ref_pic(MemorySegment segment, @CType("int32_t") int value) { StdVideoH264SequenceParameterSet.set_offset_for_non_ref_pic(segment, 0L, value); } + /// Sets `offset_for_non_ref_pic` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet offset_for_non_ref_picAt(long index, @CType("int32_t") int value) { StdVideoH264SequenceParameterSet.set_offset_for_non_ref_pic(this.segment(), index, value); return this; } + /// Sets `offset_for_non_ref_pic` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet offset_for_non_ref_pic(@CType("int32_t") int value) { StdVideoH264SequenceParameterSet.set_offset_for_non_ref_pic(this.segment(), value); return this; } + + /// {@return `offset_for_top_to_bottom_field` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int32_t") int get_offset_for_top_to_bottom_field(MemorySegment segment, long index) { return (int) VH_offset_for_top_to_bottom_field.get(segment, 0L, index); } + /// {@return `offset_for_top_to_bottom_field`} + /// @param segment the segment of the struct + public static @CType("int32_t") int get_offset_for_top_to_bottom_field(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_offset_for_top_to_bottom_field(segment, 0L); } + /// {@return `offset_for_top_to_bottom_field` at the given index} + /// @param index the index + public @CType("int32_t") int offset_for_top_to_bottom_fieldAt(long index) { return StdVideoH264SequenceParameterSet.get_offset_for_top_to_bottom_field(this.segment(), index); } + /// {@return `offset_for_top_to_bottom_field`} + public @CType("int32_t") int offset_for_top_to_bottom_field() { return StdVideoH264SequenceParameterSet.get_offset_for_top_to_bottom_field(this.segment()); } + /// Sets `offset_for_top_to_bottom_field` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_offset_for_top_to_bottom_field(MemorySegment segment, long index, @CType("int32_t") int value) { VH_offset_for_top_to_bottom_field.set(segment, 0L, index, value); } + /// Sets `offset_for_top_to_bottom_field` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_offset_for_top_to_bottom_field(MemorySegment segment, @CType("int32_t") int value) { StdVideoH264SequenceParameterSet.set_offset_for_top_to_bottom_field(segment, 0L, value); } + /// Sets `offset_for_top_to_bottom_field` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet offset_for_top_to_bottom_fieldAt(long index, @CType("int32_t") int value) { StdVideoH264SequenceParameterSet.set_offset_for_top_to_bottom_field(this.segment(), index, value); return this; } + /// Sets `offset_for_top_to_bottom_field` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet offset_for_top_to_bottom_field(@CType("int32_t") int value) { StdVideoH264SequenceParameterSet.set_offset_for_top_to_bottom_field(this.segment(), value); return this; } + + /// {@return `log2_max_pic_order_cnt_lsb_minus4` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_max_pic_order_cnt_lsb_minus4(MemorySegment segment, long index) { return (byte) VH_log2_max_pic_order_cnt_lsb_minus4.get(segment, 0L, index); } + /// {@return `log2_max_pic_order_cnt_lsb_minus4`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_max_pic_order_cnt_lsb_minus4(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_log2_max_pic_order_cnt_lsb_minus4(segment, 0L); } + /// {@return `log2_max_pic_order_cnt_lsb_minus4` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_max_pic_order_cnt_lsb_minus4At(long index) { return StdVideoH264SequenceParameterSet.get_log2_max_pic_order_cnt_lsb_minus4(this.segment(), index); } + /// {@return `log2_max_pic_order_cnt_lsb_minus4`} + public @CType("uint8_t") byte log2_max_pic_order_cnt_lsb_minus4() { return StdVideoH264SequenceParameterSet.get_log2_max_pic_order_cnt_lsb_minus4(this.segment()); } + /// Sets `log2_max_pic_order_cnt_lsb_minus4` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_max_pic_order_cnt_lsb_minus4(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_max_pic_order_cnt_lsb_minus4.set(segment, 0L, index, value); } + /// Sets `log2_max_pic_order_cnt_lsb_minus4` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_max_pic_order_cnt_lsb_minus4(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_log2_max_pic_order_cnt_lsb_minus4(segment, 0L, value); } + /// Sets `log2_max_pic_order_cnt_lsb_minus4` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet log2_max_pic_order_cnt_lsb_minus4At(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_log2_max_pic_order_cnt_lsb_minus4(this.segment(), index, value); return this; } + /// Sets `log2_max_pic_order_cnt_lsb_minus4` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet log2_max_pic_order_cnt_lsb_minus4(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_log2_max_pic_order_cnt_lsb_minus4(this.segment(), value); return this; } + + /// {@return `num_ref_frames_in_pic_order_cnt_cycle` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_ref_frames_in_pic_order_cnt_cycle(MemorySegment segment, long index) { return (byte) VH_num_ref_frames_in_pic_order_cnt_cycle.get(segment, 0L, index); } + /// {@return `num_ref_frames_in_pic_order_cnt_cycle`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_ref_frames_in_pic_order_cnt_cycle(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_num_ref_frames_in_pic_order_cnt_cycle(segment, 0L); } + /// {@return `num_ref_frames_in_pic_order_cnt_cycle` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_ref_frames_in_pic_order_cnt_cycleAt(long index) { return StdVideoH264SequenceParameterSet.get_num_ref_frames_in_pic_order_cnt_cycle(this.segment(), index); } + /// {@return `num_ref_frames_in_pic_order_cnt_cycle`} + public @CType("uint8_t") byte num_ref_frames_in_pic_order_cnt_cycle() { return StdVideoH264SequenceParameterSet.get_num_ref_frames_in_pic_order_cnt_cycle(this.segment()); } + /// Sets `num_ref_frames_in_pic_order_cnt_cycle` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_frames_in_pic_order_cnt_cycle(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_ref_frames_in_pic_order_cnt_cycle.set(segment, 0L, index, value); } + /// Sets `num_ref_frames_in_pic_order_cnt_cycle` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_frames_in_pic_order_cnt_cycle(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_num_ref_frames_in_pic_order_cnt_cycle(segment, 0L, value); } + /// Sets `num_ref_frames_in_pic_order_cnt_cycle` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet num_ref_frames_in_pic_order_cnt_cycleAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_num_ref_frames_in_pic_order_cnt_cycle(this.segment(), index, value); return this; } + /// Sets `num_ref_frames_in_pic_order_cnt_cycle` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet num_ref_frames_in_pic_order_cnt_cycle(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_num_ref_frames_in_pic_order_cnt_cycle(this.segment(), value); return this; } + + /// {@return `max_num_ref_frames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_max_num_ref_frames(MemorySegment segment, long index) { return (byte) VH_max_num_ref_frames.get(segment, 0L, index); } + /// {@return `max_num_ref_frames`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_max_num_ref_frames(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_max_num_ref_frames(segment, 0L); } + /// {@return `max_num_ref_frames` at the given index} + /// @param index the index + public @CType("uint8_t") byte max_num_ref_framesAt(long index) { return StdVideoH264SequenceParameterSet.get_max_num_ref_frames(this.segment(), index); } + /// {@return `max_num_ref_frames`} + public @CType("uint8_t") byte max_num_ref_frames() { return StdVideoH264SequenceParameterSet.get_max_num_ref_frames(this.segment()); } + /// Sets `max_num_ref_frames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_num_ref_frames(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_max_num_ref_frames.set(segment, 0L, index, value); } + /// Sets `max_num_ref_frames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_num_ref_frames(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_max_num_ref_frames(segment, 0L, value); } + /// Sets `max_num_ref_frames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet max_num_ref_framesAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_max_num_ref_frames(this.segment(), index, value); return this; } + /// Sets `max_num_ref_frames` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet max_num_ref_frames(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_max_num_ref_frames(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoH264SequenceParameterSet.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoH264SequenceParameterSet.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet reserved1At(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet reserved1(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSet.set_reserved1(this.segment(), value); return this; } + + /// {@return `pic_width_in_mbs_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pic_width_in_mbs_minus1(MemorySegment segment, long index) { return (int) VH_pic_width_in_mbs_minus1.get(segment, 0L, index); } + /// {@return `pic_width_in_mbs_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pic_width_in_mbs_minus1(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_pic_width_in_mbs_minus1(segment, 0L); } + /// {@return `pic_width_in_mbs_minus1` at the given index} + /// @param index the index + public @CType("uint32_t") int pic_width_in_mbs_minus1At(long index) { return StdVideoH264SequenceParameterSet.get_pic_width_in_mbs_minus1(this.segment(), index); } + /// {@return `pic_width_in_mbs_minus1`} + public @CType("uint32_t") int pic_width_in_mbs_minus1() { return StdVideoH264SequenceParameterSet.get_pic_width_in_mbs_minus1(this.segment()); } + /// Sets `pic_width_in_mbs_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_width_in_mbs_minus1(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pic_width_in_mbs_minus1.set(segment, 0L, index, value); } + /// Sets `pic_width_in_mbs_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_width_in_mbs_minus1(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_pic_width_in_mbs_minus1(segment, 0L, value); } + /// Sets `pic_width_in_mbs_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pic_width_in_mbs_minus1At(long index, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_pic_width_in_mbs_minus1(this.segment(), index, value); return this; } + /// Sets `pic_width_in_mbs_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pic_width_in_mbs_minus1(@CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_pic_width_in_mbs_minus1(this.segment(), value); return this; } + + /// {@return `pic_height_in_map_units_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pic_height_in_map_units_minus1(MemorySegment segment, long index) { return (int) VH_pic_height_in_map_units_minus1.get(segment, 0L, index); } + /// {@return `pic_height_in_map_units_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pic_height_in_map_units_minus1(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_pic_height_in_map_units_minus1(segment, 0L); } + /// {@return `pic_height_in_map_units_minus1` at the given index} + /// @param index the index + public @CType("uint32_t") int pic_height_in_map_units_minus1At(long index) { return StdVideoH264SequenceParameterSet.get_pic_height_in_map_units_minus1(this.segment(), index); } + /// {@return `pic_height_in_map_units_minus1`} + public @CType("uint32_t") int pic_height_in_map_units_minus1() { return StdVideoH264SequenceParameterSet.get_pic_height_in_map_units_minus1(this.segment()); } + /// Sets `pic_height_in_map_units_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_height_in_map_units_minus1(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pic_height_in_map_units_minus1.set(segment, 0L, index, value); } + /// Sets `pic_height_in_map_units_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_height_in_map_units_minus1(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_pic_height_in_map_units_minus1(segment, 0L, value); } + /// Sets `pic_height_in_map_units_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pic_height_in_map_units_minus1At(long index, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_pic_height_in_map_units_minus1(this.segment(), index, value); return this; } + /// Sets `pic_height_in_map_units_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pic_height_in_map_units_minus1(@CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_pic_height_in_map_units_minus1(this.segment(), value); return this; } + + /// {@return `frame_crop_left_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frame_crop_left_offset(MemorySegment segment, long index) { return (int) VH_frame_crop_left_offset.get(segment, 0L, index); } + /// {@return `frame_crop_left_offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frame_crop_left_offset(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_frame_crop_left_offset(segment, 0L); } + /// {@return `frame_crop_left_offset` at the given index} + /// @param index the index + public @CType("uint32_t") int frame_crop_left_offsetAt(long index) { return StdVideoH264SequenceParameterSet.get_frame_crop_left_offset(this.segment(), index); } + /// {@return `frame_crop_left_offset`} + public @CType("uint32_t") int frame_crop_left_offset() { return StdVideoH264SequenceParameterSet.get_frame_crop_left_offset(this.segment()); } + /// Sets `frame_crop_left_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_crop_left_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frame_crop_left_offset.set(segment, 0L, index, value); } + /// Sets `frame_crop_left_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_crop_left_offset(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_left_offset(segment, 0L, value); } + /// Sets `frame_crop_left_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet frame_crop_left_offsetAt(long index, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_left_offset(this.segment(), index, value); return this; } + /// Sets `frame_crop_left_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet frame_crop_left_offset(@CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_left_offset(this.segment(), value); return this; } + + /// {@return `frame_crop_right_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frame_crop_right_offset(MemorySegment segment, long index) { return (int) VH_frame_crop_right_offset.get(segment, 0L, index); } + /// {@return `frame_crop_right_offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frame_crop_right_offset(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_frame_crop_right_offset(segment, 0L); } + /// {@return `frame_crop_right_offset` at the given index} + /// @param index the index + public @CType("uint32_t") int frame_crop_right_offsetAt(long index) { return StdVideoH264SequenceParameterSet.get_frame_crop_right_offset(this.segment(), index); } + /// {@return `frame_crop_right_offset`} + public @CType("uint32_t") int frame_crop_right_offset() { return StdVideoH264SequenceParameterSet.get_frame_crop_right_offset(this.segment()); } + /// Sets `frame_crop_right_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_crop_right_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frame_crop_right_offset.set(segment, 0L, index, value); } + /// Sets `frame_crop_right_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_crop_right_offset(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_right_offset(segment, 0L, value); } + /// Sets `frame_crop_right_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet frame_crop_right_offsetAt(long index, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_right_offset(this.segment(), index, value); return this; } + /// Sets `frame_crop_right_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet frame_crop_right_offset(@CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_right_offset(this.segment(), value); return this; } + + /// {@return `frame_crop_top_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frame_crop_top_offset(MemorySegment segment, long index) { return (int) VH_frame_crop_top_offset.get(segment, 0L, index); } + /// {@return `frame_crop_top_offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frame_crop_top_offset(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_frame_crop_top_offset(segment, 0L); } + /// {@return `frame_crop_top_offset` at the given index} + /// @param index the index + public @CType("uint32_t") int frame_crop_top_offsetAt(long index) { return StdVideoH264SequenceParameterSet.get_frame_crop_top_offset(this.segment(), index); } + /// {@return `frame_crop_top_offset`} + public @CType("uint32_t") int frame_crop_top_offset() { return StdVideoH264SequenceParameterSet.get_frame_crop_top_offset(this.segment()); } + /// Sets `frame_crop_top_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_crop_top_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frame_crop_top_offset.set(segment, 0L, index, value); } + /// Sets `frame_crop_top_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_crop_top_offset(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_top_offset(segment, 0L, value); } + /// Sets `frame_crop_top_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet frame_crop_top_offsetAt(long index, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_top_offset(this.segment(), index, value); return this; } + /// Sets `frame_crop_top_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet frame_crop_top_offset(@CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_top_offset(this.segment(), value); return this; } + + /// {@return `frame_crop_bottom_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_frame_crop_bottom_offset(MemorySegment segment, long index) { return (int) VH_frame_crop_bottom_offset.get(segment, 0L, index); } + /// {@return `frame_crop_bottom_offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_frame_crop_bottom_offset(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_frame_crop_bottom_offset(segment, 0L); } + /// {@return `frame_crop_bottom_offset` at the given index} + /// @param index the index + public @CType("uint32_t") int frame_crop_bottom_offsetAt(long index) { return StdVideoH264SequenceParameterSet.get_frame_crop_bottom_offset(this.segment(), index); } + /// {@return `frame_crop_bottom_offset`} + public @CType("uint32_t") int frame_crop_bottom_offset() { return StdVideoH264SequenceParameterSet.get_frame_crop_bottom_offset(this.segment()); } + /// Sets `frame_crop_bottom_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_crop_bottom_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_frame_crop_bottom_offset.set(segment, 0L, index, value); } + /// Sets `frame_crop_bottom_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_crop_bottom_offset(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_bottom_offset(segment, 0L, value); } + /// Sets `frame_crop_bottom_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet frame_crop_bottom_offsetAt(long index, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_bottom_offset(this.segment(), index, value); return this; } + /// Sets `frame_crop_bottom_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet frame_crop_bottom_offset(@CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_frame_crop_bottom_offset(this.segment(), value); return this; } + + /// {@return `reserved2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_reserved2(MemorySegment segment, long index) { return (int) VH_reserved2.get(segment, 0L, index); } + /// {@return `reserved2`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_reserved2(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_reserved2(segment, 0L); } + /// {@return `reserved2` at the given index} + /// @param index the index + public @CType("uint32_t") int reserved2At(long index) { return StdVideoH264SequenceParameterSet.get_reserved2(this.segment(), index); } + /// {@return `reserved2`} + public @CType("uint32_t") int reserved2() { return StdVideoH264SequenceParameterSet.get_reserved2(this.segment()); } + /// Sets `reserved2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved2(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_reserved2.set(segment, 0L, index, value); } + /// Sets `reserved2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved2(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_reserved2(segment, 0L, value); } + /// Sets `reserved2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet reserved2At(long index, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_reserved2(this.segment(), index, value); return this; } + /// Sets `reserved2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet reserved2(@CType("uint32_t") int value) { StdVideoH264SequenceParameterSet.set_reserved2(this.segment(), value); return this; } + + /// {@return `pOffsetForRefFrame` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const int32_t *") java.lang.foreign.MemorySegment get_pOffsetForRefFrame(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pOffsetForRefFrame.get(segment, 0L, index); } + /// {@return `pOffsetForRefFrame`} + /// @param segment the segment of the struct + public static @CType("const int32_t *") java.lang.foreign.MemorySegment get_pOffsetForRefFrame(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_pOffsetForRefFrame(segment, 0L); } + /// {@return `pOffsetForRefFrame` at the given index} + /// @param index the index + public @CType("const int32_t *") java.lang.foreign.MemorySegment pOffsetForRefFrameAt(long index) { return StdVideoH264SequenceParameterSet.get_pOffsetForRefFrame(this.segment(), index); } + /// {@return `pOffsetForRefFrame`} + public @CType("const int32_t *") java.lang.foreign.MemorySegment pOffsetForRefFrame() { return StdVideoH264SequenceParameterSet.get_pOffsetForRefFrame(this.segment()); } + /// Sets `pOffsetForRefFrame` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pOffsetForRefFrame(MemorySegment segment, long index, @CType("const int32_t *") java.lang.foreign.MemorySegment value) { VH_pOffsetForRefFrame.set(segment, 0L, index, value); } + /// Sets `pOffsetForRefFrame` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pOffsetForRefFrame(MemorySegment segment, @CType("const int32_t *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_pOffsetForRefFrame(segment, 0L, value); } + /// Sets `pOffsetForRefFrame` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pOffsetForRefFrameAt(long index, @CType("const int32_t *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_pOffsetForRefFrame(this.segment(), index, value); return this; } + /// Sets `pOffsetForRefFrame` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pOffsetForRefFrame(@CType("const int32_t *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_pOffsetForRefFrame(this.segment(), value); return this; } + + /// {@return `pScalingLists` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment get_pScalingLists(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pScalingLists.get(segment, 0L, index); } + /// {@return `pScalingLists`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment get_pScalingLists(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_pScalingLists(segment, 0L); } + /// {@return `pScalingLists` at the given index} + /// @param index the index + public @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment pScalingListsAt(long index) { return StdVideoH264SequenceParameterSet.get_pScalingLists(this.segment(), index); } + /// {@return `pScalingLists`} + public @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment pScalingLists() { return StdVideoH264SequenceParameterSet.get_pScalingLists(this.segment()); } + /// Sets `pScalingLists` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pScalingLists(MemorySegment segment, long index, @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment value) { VH_pScalingLists.set(segment, 0L, index, value); } + /// Sets `pScalingLists` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pScalingLists(MemorySegment segment, @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_pScalingLists(segment, 0L, value); } + /// Sets `pScalingLists` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pScalingListsAt(long index, @CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_pScalingLists(this.segment(), index, value); return this; } + /// Sets `pScalingLists` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pScalingLists(@CType("const StdVideoH264ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_pScalingLists(this.segment(), value); return this; } + + /// {@return `pSequenceParameterSetVui` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH264SequenceParameterSetVui *") java.lang.foreign.MemorySegment get_pSequenceParameterSetVui(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSequenceParameterSetVui.get(segment, 0L, index); } + /// {@return `pSequenceParameterSetVui`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH264SequenceParameterSetVui *") java.lang.foreign.MemorySegment get_pSequenceParameterSetVui(MemorySegment segment) { return StdVideoH264SequenceParameterSet.get_pSequenceParameterSetVui(segment, 0L); } + /// {@return `pSequenceParameterSetVui` at the given index} + /// @param index the index + public @CType("const StdVideoH264SequenceParameterSetVui *") java.lang.foreign.MemorySegment pSequenceParameterSetVuiAt(long index) { return StdVideoH264SequenceParameterSet.get_pSequenceParameterSetVui(this.segment(), index); } + /// {@return `pSequenceParameterSetVui`} + public @CType("const StdVideoH264SequenceParameterSetVui *") java.lang.foreign.MemorySegment pSequenceParameterSetVui() { return StdVideoH264SequenceParameterSet.get_pSequenceParameterSetVui(this.segment()); } + /// Sets `pSequenceParameterSetVui` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSequenceParameterSetVui(MemorySegment segment, long index, @CType("const StdVideoH264SequenceParameterSetVui *") java.lang.foreign.MemorySegment value) { VH_pSequenceParameterSetVui.set(segment, 0L, index, value); } + /// Sets `pSequenceParameterSetVui` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSequenceParameterSetVui(MemorySegment segment, @CType("const StdVideoH264SequenceParameterSetVui *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_pSequenceParameterSetVui(segment, 0L, value); } + /// Sets `pSequenceParameterSetVui` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pSequenceParameterSetVuiAt(long index, @CType("const StdVideoH264SequenceParameterSetVui *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_pSequenceParameterSetVui(this.segment(), index, value); return this; } + /// Sets `pSequenceParameterSetVui` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSet pSequenceParameterSetVui(@CType("const StdVideoH264SequenceParameterSetVui *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSet.set_pSequenceParameterSetVui(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SequenceParameterSetVui.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SequenceParameterSetVui.java new file mode 100644 index 00000000..f3ec6a4a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SequenceParameterSetVui.java @@ -0,0 +1,666 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### aspect_ratio_idc +/// [VarHandle][#VH_aspect_ratio_idc] - [Getter][#aspect_ratio_idc()] - [Setter][#aspect_ratio_idc(int)] +/// ### sar_width +/// [VarHandle][#VH_sar_width] - [Getter][#sar_width()] - [Setter][#sar_width(short)] +/// ### sar_height +/// [VarHandle][#VH_sar_height] - [Getter][#sar_height()] - [Setter][#sar_height(short)] +/// ### video_format +/// [VarHandle][#VH_video_format] - [Getter][#video_format()] - [Setter][#video_format(byte)] +/// ### colour_primaries +/// [VarHandle][#VH_colour_primaries] - [Getter][#colour_primaries()] - [Setter][#colour_primaries(byte)] +/// ### transfer_characteristics +/// [VarHandle][#VH_transfer_characteristics] - [Getter][#transfer_characteristics()] - [Setter][#transfer_characteristics(byte)] +/// ### matrix_coefficients +/// [VarHandle][#VH_matrix_coefficients] - [Getter][#matrix_coefficients()] - [Setter][#matrix_coefficients(byte)] +/// ### num_units_in_tick +/// [VarHandle][#VH_num_units_in_tick] - [Getter][#num_units_in_tick()] - [Setter][#num_units_in_tick(int)] +/// ### time_scale +/// [VarHandle][#VH_time_scale] - [Getter][#time_scale()] - [Setter][#time_scale(int)] +/// ### max_num_reorder_frames +/// [VarHandle][#VH_max_num_reorder_frames] - [Getter][#max_num_reorder_frames()] - [Setter][#max_num_reorder_frames(byte)] +/// ### max_dec_frame_buffering +/// [VarHandle][#VH_max_dec_frame_buffering] - [Getter][#max_dec_frame_buffering()] - [Setter][#max_dec_frame_buffering(byte)] +/// ### chroma_sample_loc_type_top_field +/// [VarHandle][#VH_chroma_sample_loc_type_top_field] - [Getter][#chroma_sample_loc_type_top_field()] - [Setter][#chroma_sample_loc_type_top_field(byte)] +/// ### chroma_sample_loc_type_bottom_field +/// [VarHandle][#VH_chroma_sample_loc_type_bottom_field] - [Getter][#chroma_sample_loc_type_bottom_field()] - [Setter][#chroma_sample_loc_type_bottom_field(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(int)] +/// ### pHrdParameters +/// [VarHandle][#VH_pHrdParameters] - [Getter][#pHrdParameters()] - [Setter][#pHrdParameters(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH264SequenceParameterSetVui { +/// StdVideoH264SpsVuiFlags flags; +/// StdVideoH264AspectRatioIdc aspect_ratio_idc; +/// uint16_t sar_width; +/// uint16_t sar_height; +/// uint8_t video_format; +/// uint8_t colour_primaries; +/// uint8_t transfer_characteristics; +/// uint8_t matrix_coefficients; +/// uint32_t num_units_in_tick; +/// uint32_t time_scale; +/// uint8_t max_num_reorder_frames; +/// uint8_t max_dec_frame_buffering; +/// uint8_t chroma_sample_loc_type_top_field; +/// uint8_t chroma_sample_loc_type_bottom_field; +/// uint32_t reserved1; +/// const StdVideoH264HrdParameters * pHrdParameters; +/// } StdVideoH264SequenceParameterSetVui; +/// ``` +public final class StdVideoH264SequenceParameterSetVui extends Struct { + /// The struct layout of `StdVideoH264SequenceParameterSetVui`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoH264SpsVuiFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("aspect_ratio_idc"), + ValueLayout.JAVA_SHORT.withName("sar_width"), + ValueLayout.JAVA_SHORT.withName("sar_height"), + ValueLayout.JAVA_BYTE.withName("video_format"), + ValueLayout.JAVA_BYTE.withName("colour_primaries"), + ValueLayout.JAVA_BYTE.withName("transfer_characteristics"), + ValueLayout.JAVA_BYTE.withName("matrix_coefficients"), + ValueLayout.JAVA_INT.withName("num_units_in_tick"), + ValueLayout.JAVA_INT.withName("time_scale"), + ValueLayout.JAVA_BYTE.withName("max_num_reorder_frames"), + ValueLayout.JAVA_BYTE.withName("max_dec_frame_buffering"), + ValueLayout.JAVA_BYTE.withName("chroma_sample_loc_type_top_field"), + ValueLayout.JAVA_BYTE.withName("chroma_sample_loc_type_bottom_field"), + ValueLayout.JAVA_INT.withName("reserved1"), + ValueLayout.ADDRESS.withName("pHrdParameters") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `aspect_ratio_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspect_ratio_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspect_ratio_idc")); + /// The [VarHandle] of `sar_width` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_sar_width = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sar_width")); + /// The [VarHandle] of `sar_height` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_sar_height = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sar_height")); + /// The [VarHandle] of `video_format` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_video_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("video_format")); + /// The [VarHandle] of `colour_primaries` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_colour_primaries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colour_primaries")); + /// The [VarHandle] of `transfer_characteristics` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_transfer_characteristics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transfer_characteristics")); + /// The [VarHandle] of `matrix_coefficients` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_matrix_coefficients = LAYOUT.arrayElementVarHandle(PathElement.groupElement("matrix_coefficients")); + /// The [VarHandle] of `num_units_in_tick` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_num_units_in_tick = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_units_in_tick")); + /// The [VarHandle] of `time_scale` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_time_scale = LAYOUT.arrayElementVarHandle(PathElement.groupElement("time_scale")); + /// The [VarHandle] of `max_num_reorder_frames` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_max_num_reorder_frames = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_num_reorder_frames")); + /// The [VarHandle] of `max_dec_frame_buffering` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_max_dec_frame_buffering = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_dec_frame_buffering")); + /// The [VarHandle] of `chroma_sample_loc_type_top_field` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_sample_loc_type_top_field = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_sample_loc_type_top_field")); + /// The [VarHandle] of `chroma_sample_loc_type_bottom_field` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_sample_loc_type_bottom_field = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_sample_loc_type_bottom_field")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `pHrdParameters` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pHrdParameters = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pHrdParameters")); + + /// Creates `StdVideoH264SequenceParameterSetVui` with the given segment. + /// @param segment the memory segment + public StdVideoH264SequenceParameterSetVui(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH264SequenceParameterSetVui` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SequenceParameterSetVui of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SequenceParameterSetVui(segment); } + + /// Creates `StdVideoH264SequenceParameterSetVui` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SequenceParameterSetVui ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SequenceParameterSetVui(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH264SequenceParameterSetVui` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SequenceParameterSetVui ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SequenceParameterSetVui(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH264SequenceParameterSetVui` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH264SequenceParameterSetVui` + public static StdVideoH264SequenceParameterSetVui alloc(SegmentAllocator allocator) { return new StdVideoH264SequenceParameterSetVui(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH264SequenceParameterSetVui` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH264SequenceParameterSetVui` + public static StdVideoH264SequenceParameterSetVui alloc(SegmentAllocator allocator, long count) { return new StdVideoH264SequenceParameterSetVui(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264SpsVuiFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264SpsVuiFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoH264SpsVuiFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoH264SequenceParameterSetVui.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoH264SpsVuiFlags") java.lang.foreign.MemorySegment flags() { return StdVideoH264SequenceParameterSetVui.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoH264SpsVuiFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoH264SpsVuiFlags") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSetVui.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui flagsAt(long index, @CType("StdVideoH264SpsVuiFlags") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSetVui.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui flags(@CType("StdVideoH264SpsVuiFlags") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSetVui.set_flags(this.segment(), value); return this; } + + /// {@return `aspect_ratio_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH264AspectRatioIdc") int get_aspect_ratio_idc(MemorySegment segment, long index) { return (int) VH_aspect_ratio_idc.get(segment, 0L, index); } + /// {@return `aspect_ratio_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH264AspectRatioIdc") int get_aspect_ratio_idc(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_aspect_ratio_idc(segment, 0L); } + /// {@return `aspect_ratio_idc` at the given index} + /// @param index the index + public @CType("StdVideoH264AspectRatioIdc") int aspect_ratio_idcAt(long index) { return StdVideoH264SequenceParameterSetVui.get_aspect_ratio_idc(this.segment(), index); } + /// {@return `aspect_ratio_idc`} + public @CType("StdVideoH264AspectRatioIdc") int aspect_ratio_idc() { return StdVideoH264SequenceParameterSetVui.get_aspect_ratio_idc(this.segment()); } + /// Sets `aspect_ratio_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspect_ratio_idc(MemorySegment segment, long index, @CType("StdVideoH264AspectRatioIdc") int value) { VH_aspect_ratio_idc.set(segment, 0L, index, value); } + /// Sets `aspect_ratio_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspect_ratio_idc(MemorySegment segment, @CType("StdVideoH264AspectRatioIdc") int value) { StdVideoH264SequenceParameterSetVui.set_aspect_ratio_idc(segment, 0L, value); } + /// Sets `aspect_ratio_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui aspect_ratio_idcAt(long index, @CType("StdVideoH264AspectRatioIdc") int value) { StdVideoH264SequenceParameterSetVui.set_aspect_ratio_idc(this.segment(), index, value); return this; } + /// Sets `aspect_ratio_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui aspect_ratio_idc(@CType("StdVideoH264AspectRatioIdc") int value) { StdVideoH264SequenceParameterSetVui.set_aspect_ratio_idc(this.segment(), value); return this; } + + /// {@return `sar_width` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_sar_width(MemorySegment segment, long index) { return (short) VH_sar_width.get(segment, 0L, index); } + /// {@return `sar_width`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_sar_width(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_sar_width(segment, 0L); } + /// {@return `sar_width` at the given index} + /// @param index the index + public @CType("uint16_t") short sar_widthAt(long index) { return StdVideoH264SequenceParameterSetVui.get_sar_width(this.segment(), index); } + /// {@return `sar_width`} + public @CType("uint16_t") short sar_width() { return StdVideoH264SequenceParameterSetVui.get_sar_width(this.segment()); } + /// Sets `sar_width` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sar_width(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_sar_width.set(segment, 0L, index, value); } + /// Sets `sar_width` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sar_width(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH264SequenceParameterSetVui.set_sar_width(segment, 0L, value); } + /// Sets `sar_width` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui sar_widthAt(long index, @CType("uint16_t") short value) { StdVideoH264SequenceParameterSetVui.set_sar_width(this.segment(), index, value); return this; } + /// Sets `sar_width` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui sar_width(@CType("uint16_t") short value) { StdVideoH264SequenceParameterSetVui.set_sar_width(this.segment(), value); return this; } + + /// {@return `sar_height` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_sar_height(MemorySegment segment, long index) { return (short) VH_sar_height.get(segment, 0L, index); } + /// {@return `sar_height`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_sar_height(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_sar_height(segment, 0L); } + /// {@return `sar_height` at the given index} + /// @param index the index + public @CType("uint16_t") short sar_heightAt(long index) { return StdVideoH264SequenceParameterSetVui.get_sar_height(this.segment(), index); } + /// {@return `sar_height`} + public @CType("uint16_t") short sar_height() { return StdVideoH264SequenceParameterSetVui.get_sar_height(this.segment()); } + /// Sets `sar_height` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sar_height(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_sar_height.set(segment, 0L, index, value); } + /// Sets `sar_height` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sar_height(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH264SequenceParameterSetVui.set_sar_height(segment, 0L, value); } + /// Sets `sar_height` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui sar_heightAt(long index, @CType("uint16_t") short value) { StdVideoH264SequenceParameterSetVui.set_sar_height(this.segment(), index, value); return this; } + /// Sets `sar_height` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui sar_height(@CType("uint16_t") short value) { StdVideoH264SequenceParameterSetVui.set_sar_height(this.segment(), value); return this; } + + /// {@return `video_format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_video_format(MemorySegment segment, long index) { return (byte) VH_video_format.get(segment, 0L, index); } + /// {@return `video_format`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_video_format(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_video_format(segment, 0L); } + /// {@return `video_format` at the given index} + /// @param index the index + public @CType("uint8_t") byte video_formatAt(long index) { return StdVideoH264SequenceParameterSetVui.get_video_format(this.segment(), index); } + /// {@return `video_format`} + public @CType("uint8_t") byte video_format() { return StdVideoH264SequenceParameterSetVui.get_video_format(this.segment()); } + /// Sets `video_format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_video_format(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_video_format.set(segment, 0L, index, value); } + /// Sets `video_format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_video_format(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_video_format(segment, 0L, value); } + /// Sets `video_format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui video_formatAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_video_format(this.segment(), index, value); return this; } + /// Sets `video_format` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui video_format(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_video_format(this.segment(), value); return this; } + + /// {@return `colour_primaries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_colour_primaries(MemorySegment segment, long index) { return (byte) VH_colour_primaries.get(segment, 0L, index); } + /// {@return `colour_primaries`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_colour_primaries(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_colour_primaries(segment, 0L); } + /// {@return `colour_primaries` at the given index} + /// @param index the index + public @CType("uint8_t") byte colour_primariesAt(long index) { return StdVideoH264SequenceParameterSetVui.get_colour_primaries(this.segment(), index); } + /// {@return `colour_primaries`} + public @CType("uint8_t") byte colour_primaries() { return StdVideoH264SequenceParameterSetVui.get_colour_primaries(this.segment()); } + /// Sets `colour_primaries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colour_primaries(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_colour_primaries.set(segment, 0L, index, value); } + /// Sets `colour_primaries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colour_primaries(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_colour_primaries(segment, 0L, value); } + /// Sets `colour_primaries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui colour_primariesAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_colour_primaries(this.segment(), index, value); return this; } + /// Sets `colour_primaries` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui colour_primaries(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_colour_primaries(this.segment(), value); return this; } + + /// {@return `transfer_characteristics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_transfer_characteristics(MemorySegment segment, long index) { return (byte) VH_transfer_characteristics.get(segment, 0L, index); } + /// {@return `transfer_characteristics`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_transfer_characteristics(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_transfer_characteristics(segment, 0L); } + /// {@return `transfer_characteristics` at the given index} + /// @param index the index + public @CType("uint8_t") byte transfer_characteristicsAt(long index) { return StdVideoH264SequenceParameterSetVui.get_transfer_characteristics(this.segment(), index); } + /// {@return `transfer_characteristics`} + public @CType("uint8_t") byte transfer_characteristics() { return StdVideoH264SequenceParameterSetVui.get_transfer_characteristics(this.segment()); } + /// Sets `transfer_characteristics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transfer_characteristics(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_transfer_characteristics.set(segment, 0L, index, value); } + /// Sets `transfer_characteristics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transfer_characteristics(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_transfer_characteristics(segment, 0L, value); } + /// Sets `transfer_characteristics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui transfer_characteristicsAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_transfer_characteristics(this.segment(), index, value); return this; } + /// Sets `transfer_characteristics` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui transfer_characteristics(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_transfer_characteristics(this.segment(), value); return this; } + + /// {@return `matrix_coefficients` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_matrix_coefficients(MemorySegment segment, long index) { return (byte) VH_matrix_coefficients.get(segment, 0L, index); } + /// {@return `matrix_coefficients`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_matrix_coefficients(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_matrix_coefficients(segment, 0L); } + /// {@return `matrix_coefficients` at the given index} + /// @param index the index + public @CType("uint8_t") byte matrix_coefficientsAt(long index) { return StdVideoH264SequenceParameterSetVui.get_matrix_coefficients(this.segment(), index); } + /// {@return `matrix_coefficients`} + public @CType("uint8_t") byte matrix_coefficients() { return StdVideoH264SequenceParameterSetVui.get_matrix_coefficients(this.segment()); } + /// Sets `matrix_coefficients` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_matrix_coefficients(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_matrix_coefficients.set(segment, 0L, index, value); } + /// Sets `matrix_coefficients` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_matrix_coefficients(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_matrix_coefficients(segment, 0L, value); } + /// Sets `matrix_coefficients` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui matrix_coefficientsAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_matrix_coefficients(this.segment(), index, value); return this; } + /// Sets `matrix_coefficients` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui matrix_coefficients(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_matrix_coefficients(this.segment(), value); return this; } + + /// {@return `num_units_in_tick` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_num_units_in_tick(MemorySegment segment, long index) { return (int) VH_num_units_in_tick.get(segment, 0L, index); } + /// {@return `num_units_in_tick`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_num_units_in_tick(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_num_units_in_tick(segment, 0L); } + /// {@return `num_units_in_tick` at the given index} + /// @param index the index + public @CType("uint32_t") int num_units_in_tickAt(long index) { return StdVideoH264SequenceParameterSetVui.get_num_units_in_tick(this.segment(), index); } + /// {@return `num_units_in_tick`} + public @CType("uint32_t") int num_units_in_tick() { return StdVideoH264SequenceParameterSetVui.get_num_units_in_tick(this.segment()); } + /// Sets `num_units_in_tick` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_units_in_tick(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_num_units_in_tick.set(segment, 0L, index, value); } + /// Sets `num_units_in_tick` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_units_in_tick(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSetVui.set_num_units_in_tick(segment, 0L, value); } + /// Sets `num_units_in_tick` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui num_units_in_tickAt(long index, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSetVui.set_num_units_in_tick(this.segment(), index, value); return this; } + /// Sets `num_units_in_tick` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui num_units_in_tick(@CType("uint32_t") int value) { StdVideoH264SequenceParameterSetVui.set_num_units_in_tick(this.segment(), value); return this; } + + /// {@return `time_scale` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_time_scale(MemorySegment segment, long index) { return (int) VH_time_scale.get(segment, 0L, index); } + /// {@return `time_scale`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_time_scale(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_time_scale(segment, 0L); } + /// {@return `time_scale` at the given index} + /// @param index the index + public @CType("uint32_t") int time_scaleAt(long index) { return StdVideoH264SequenceParameterSetVui.get_time_scale(this.segment(), index); } + /// {@return `time_scale`} + public @CType("uint32_t") int time_scale() { return StdVideoH264SequenceParameterSetVui.get_time_scale(this.segment()); } + /// Sets `time_scale` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_time_scale(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_time_scale.set(segment, 0L, index, value); } + /// Sets `time_scale` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_time_scale(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSetVui.set_time_scale(segment, 0L, value); } + /// Sets `time_scale` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui time_scaleAt(long index, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSetVui.set_time_scale(this.segment(), index, value); return this; } + /// Sets `time_scale` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui time_scale(@CType("uint32_t") int value) { StdVideoH264SequenceParameterSetVui.set_time_scale(this.segment(), value); return this; } + + /// {@return `max_num_reorder_frames` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_max_num_reorder_frames(MemorySegment segment, long index) { return (byte) VH_max_num_reorder_frames.get(segment, 0L, index); } + /// {@return `max_num_reorder_frames`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_max_num_reorder_frames(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_max_num_reorder_frames(segment, 0L); } + /// {@return `max_num_reorder_frames` at the given index} + /// @param index the index + public @CType("uint8_t") byte max_num_reorder_framesAt(long index) { return StdVideoH264SequenceParameterSetVui.get_max_num_reorder_frames(this.segment(), index); } + /// {@return `max_num_reorder_frames`} + public @CType("uint8_t") byte max_num_reorder_frames() { return StdVideoH264SequenceParameterSetVui.get_max_num_reorder_frames(this.segment()); } + /// Sets `max_num_reorder_frames` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_num_reorder_frames(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_max_num_reorder_frames.set(segment, 0L, index, value); } + /// Sets `max_num_reorder_frames` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_num_reorder_frames(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_max_num_reorder_frames(segment, 0L, value); } + /// Sets `max_num_reorder_frames` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui max_num_reorder_framesAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_max_num_reorder_frames(this.segment(), index, value); return this; } + /// Sets `max_num_reorder_frames` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui max_num_reorder_frames(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_max_num_reorder_frames(this.segment(), value); return this; } + + /// {@return `max_dec_frame_buffering` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_max_dec_frame_buffering(MemorySegment segment, long index) { return (byte) VH_max_dec_frame_buffering.get(segment, 0L, index); } + /// {@return `max_dec_frame_buffering`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_max_dec_frame_buffering(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_max_dec_frame_buffering(segment, 0L); } + /// {@return `max_dec_frame_buffering` at the given index} + /// @param index the index + public @CType("uint8_t") byte max_dec_frame_bufferingAt(long index) { return StdVideoH264SequenceParameterSetVui.get_max_dec_frame_buffering(this.segment(), index); } + /// {@return `max_dec_frame_buffering`} + public @CType("uint8_t") byte max_dec_frame_buffering() { return StdVideoH264SequenceParameterSetVui.get_max_dec_frame_buffering(this.segment()); } + /// Sets `max_dec_frame_buffering` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_dec_frame_buffering(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_max_dec_frame_buffering.set(segment, 0L, index, value); } + /// Sets `max_dec_frame_buffering` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_dec_frame_buffering(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_max_dec_frame_buffering(segment, 0L, value); } + /// Sets `max_dec_frame_buffering` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui max_dec_frame_bufferingAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_max_dec_frame_buffering(this.segment(), index, value); return this; } + /// Sets `max_dec_frame_buffering` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui max_dec_frame_buffering(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_max_dec_frame_buffering(this.segment(), value); return this; } + + /// {@return `chroma_sample_loc_type_top_field` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_chroma_sample_loc_type_top_field(MemorySegment segment, long index) { return (byte) VH_chroma_sample_loc_type_top_field.get(segment, 0L, index); } + /// {@return `chroma_sample_loc_type_top_field`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_chroma_sample_loc_type_top_field(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_chroma_sample_loc_type_top_field(segment, 0L); } + /// {@return `chroma_sample_loc_type_top_field` at the given index} + /// @param index the index + public @CType("uint8_t") byte chroma_sample_loc_type_top_fieldAt(long index) { return StdVideoH264SequenceParameterSetVui.get_chroma_sample_loc_type_top_field(this.segment(), index); } + /// {@return `chroma_sample_loc_type_top_field`} + public @CType("uint8_t") byte chroma_sample_loc_type_top_field() { return StdVideoH264SequenceParameterSetVui.get_chroma_sample_loc_type_top_field(this.segment()); } + /// Sets `chroma_sample_loc_type_top_field` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_sample_loc_type_top_field(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_chroma_sample_loc_type_top_field.set(segment, 0L, index, value); } + /// Sets `chroma_sample_loc_type_top_field` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_sample_loc_type_top_field(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_chroma_sample_loc_type_top_field(segment, 0L, value); } + /// Sets `chroma_sample_loc_type_top_field` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui chroma_sample_loc_type_top_fieldAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_chroma_sample_loc_type_top_field(this.segment(), index, value); return this; } + /// Sets `chroma_sample_loc_type_top_field` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui chroma_sample_loc_type_top_field(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_chroma_sample_loc_type_top_field(this.segment(), value); return this; } + + /// {@return `chroma_sample_loc_type_bottom_field` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_chroma_sample_loc_type_bottom_field(MemorySegment segment, long index) { return (byte) VH_chroma_sample_loc_type_bottom_field.get(segment, 0L, index); } + /// {@return `chroma_sample_loc_type_bottom_field`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_chroma_sample_loc_type_bottom_field(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_chroma_sample_loc_type_bottom_field(segment, 0L); } + /// {@return `chroma_sample_loc_type_bottom_field` at the given index} + /// @param index the index + public @CType("uint8_t") byte chroma_sample_loc_type_bottom_fieldAt(long index) { return StdVideoH264SequenceParameterSetVui.get_chroma_sample_loc_type_bottom_field(this.segment(), index); } + /// {@return `chroma_sample_loc_type_bottom_field`} + public @CType("uint8_t") byte chroma_sample_loc_type_bottom_field() { return StdVideoH264SequenceParameterSetVui.get_chroma_sample_loc_type_bottom_field(this.segment()); } + /// Sets `chroma_sample_loc_type_bottom_field` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_sample_loc_type_bottom_field(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_chroma_sample_loc_type_bottom_field.set(segment, 0L, index, value); } + /// Sets `chroma_sample_loc_type_bottom_field` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_sample_loc_type_bottom_field(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_chroma_sample_loc_type_bottom_field(segment, 0L, value); } + /// Sets `chroma_sample_loc_type_bottom_field` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui chroma_sample_loc_type_bottom_fieldAt(long index, @CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_chroma_sample_loc_type_bottom_field(this.segment(), index, value); return this; } + /// Sets `chroma_sample_loc_type_bottom_field` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui chroma_sample_loc_type_bottom_field(@CType("uint8_t") byte value) { StdVideoH264SequenceParameterSetVui.set_chroma_sample_loc_type_bottom_field(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_reserved1(MemorySegment segment, long index) { return (int) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_reserved1(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint32_t") int reserved1At(long index) { return StdVideoH264SequenceParameterSetVui.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint32_t") int reserved1() { return StdVideoH264SequenceParameterSetVui.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSetVui.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui reserved1At(long index, @CType("uint32_t") int value) { StdVideoH264SequenceParameterSetVui.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui reserved1(@CType("uint32_t") int value) { StdVideoH264SequenceParameterSetVui.set_reserved1(this.segment(), value); return this; } + + /// {@return `pHrdParameters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH264HrdParameters *") java.lang.foreign.MemorySegment get_pHrdParameters(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pHrdParameters.get(segment, 0L, index); } + /// {@return `pHrdParameters`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH264HrdParameters *") java.lang.foreign.MemorySegment get_pHrdParameters(MemorySegment segment) { return StdVideoH264SequenceParameterSetVui.get_pHrdParameters(segment, 0L); } + /// {@return `pHrdParameters` at the given index} + /// @param index the index + public @CType("const StdVideoH264HrdParameters *") java.lang.foreign.MemorySegment pHrdParametersAt(long index) { return StdVideoH264SequenceParameterSetVui.get_pHrdParameters(this.segment(), index); } + /// {@return `pHrdParameters`} + public @CType("const StdVideoH264HrdParameters *") java.lang.foreign.MemorySegment pHrdParameters() { return StdVideoH264SequenceParameterSetVui.get_pHrdParameters(this.segment()); } + /// Sets `pHrdParameters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pHrdParameters(MemorySegment segment, long index, @CType("const StdVideoH264HrdParameters *") java.lang.foreign.MemorySegment value) { VH_pHrdParameters.set(segment, 0L, index, value); } + /// Sets `pHrdParameters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pHrdParameters(MemorySegment segment, @CType("const StdVideoH264HrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSetVui.set_pHrdParameters(segment, 0L, value); } + /// Sets `pHrdParameters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui pHrdParametersAt(long index, @CType("const StdVideoH264HrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSetVui.set_pHrdParameters(this.segment(), index, value); return this; } + /// Sets `pHrdParameters` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SequenceParameterSetVui pHrdParameters(@CType("const StdVideoH264HrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH264SequenceParameterSetVui.set_pHrdParameters(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SpsFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SpsFlags.java new file mode 100644 index 00000000..7655ad5f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SpsFlags.java @@ -0,0 +1,666 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### constraint_set0_flag +/// [VarHandle][#VH_constraint_set0_flag] - [Getter][#constraint_set0_flag()] - [Setter][#constraint_set0_flag(int)] +/// ### constraint_set1_flag +/// [VarHandle][#VH_constraint_set1_flag] - [Getter][#constraint_set1_flag()] - [Setter][#constraint_set1_flag(int)] +/// ### constraint_set2_flag +/// [VarHandle][#VH_constraint_set2_flag] - [Getter][#constraint_set2_flag()] - [Setter][#constraint_set2_flag(int)] +/// ### constraint_set3_flag +/// [VarHandle][#VH_constraint_set3_flag] - [Getter][#constraint_set3_flag()] - [Setter][#constraint_set3_flag(int)] +/// ### constraint_set4_flag +/// [VarHandle][#VH_constraint_set4_flag] - [Getter][#constraint_set4_flag()] - [Setter][#constraint_set4_flag(int)] +/// ### constraint_set5_flag +/// [VarHandle][#VH_constraint_set5_flag] - [Getter][#constraint_set5_flag()] - [Setter][#constraint_set5_flag(int)] +/// ### direct_8x8_inference_flag +/// [VarHandle][#VH_direct_8x8_inference_flag] - [Getter][#direct_8x8_inference_flag()] - [Setter][#direct_8x8_inference_flag(int)] +/// ### mb_adaptive_frame_field_flag +/// [VarHandle][#VH_mb_adaptive_frame_field_flag] - [Getter][#mb_adaptive_frame_field_flag()] - [Setter][#mb_adaptive_frame_field_flag(int)] +/// ### frame_mbs_only_flag +/// [VarHandle][#VH_frame_mbs_only_flag] - [Getter][#frame_mbs_only_flag()] - [Setter][#frame_mbs_only_flag(int)] +/// ### delta_pic_order_always_zero_flag +/// [VarHandle][#VH_delta_pic_order_always_zero_flag] - [Getter][#delta_pic_order_always_zero_flag()] - [Setter][#delta_pic_order_always_zero_flag(int)] +/// ### separate_colour_plane_flag +/// [VarHandle][#VH_separate_colour_plane_flag] - [Getter][#separate_colour_plane_flag()] - [Setter][#separate_colour_plane_flag(int)] +/// ### gaps_in_frame_num_value_allowed_flag +/// [VarHandle][#VH_gaps_in_frame_num_value_allowed_flag] - [Getter][#gaps_in_frame_num_value_allowed_flag()] - [Setter][#gaps_in_frame_num_value_allowed_flag(int)] +/// ### qpprime_y_zero_transform_bypass_flag +/// [VarHandle][#VH_qpprime_y_zero_transform_bypass_flag] - [Getter][#qpprime_y_zero_transform_bypass_flag()] - [Setter][#qpprime_y_zero_transform_bypass_flag(int)] +/// ### frame_cropping_flag +/// [VarHandle][#VH_frame_cropping_flag] - [Getter][#frame_cropping_flag()] - [Setter][#frame_cropping_flag(int)] +/// ### seq_scaling_matrix_present_flag +/// [VarHandle][#VH_seq_scaling_matrix_present_flag] - [Getter][#seq_scaling_matrix_present_flag()] - [Setter][#seq_scaling_matrix_present_flag(int)] +/// ### vui_parameters_present_flag +/// [VarHandle][#VH_vui_parameters_present_flag] - [Getter][#vui_parameters_present_flag()] - [Setter][#vui_parameters_present_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH264SpsFlags { +/// uint32_t : 1 constraint_set0_flag; +/// uint32_t : 1 constraint_set1_flag; +/// uint32_t : 1 constraint_set2_flag; +/// uint32_t : 1 constraint_set3_flag; +/// uint32_t : 1 constraint_set4_flag; +/// uint32_t : 1 constraint_set5_flag; +/// uint32_t : 1 direct_8x8_inference_flag; +/// uint32_t : 1 mb_adaptive_frame_field_flag; +/// uint32_t : 1 frame_mbs_only_flag; +/// uint32_t : 1 delta_pic_order_always_zero_flag; +/// uint32_t : 1 separate_colour_plane_flag; +/// uint32_t : 1 gaps_in_frame_num_value_allowed_flag; +/// uint32_t : 1 qpprime_y_zero_transform_bypass_flag; +/// uint32_t : 1 frame_cropping_flag; +/// uint32_t : 1 seq_scaling_matrix_present_flag; +/// uint32_t : 1 vui_parameters_present_flag; +/// } StdVideoH264SpsFlags; +/// ``` +public final class StdVideoH264SpsFlags extends Struct { + /// The struct layout of `StdVideoH264SpsFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("constraint_set0_flag"), + ValueLayout.JAVA_INT.withName("constraint_set1_flag"), + ValueLayout.JAVA_INT.withName("constraint_set2_flag"), + ValueLayout.JAVA_INT.withName("constraint_set3_flag"), + ValueLayout.JAVA_INT.withName("constraint_set4_flag"), + ValueLayout.JAVA_INT.withName("constraint_set5_flag"), + ValueLayout.JAVA_INT.withName("direct_8x8_inference_flag"), + ValueLayout.JAVA_INT.withName("mb_adaptive_frame_field_flag"), + ValueLayout.JAVA_INT.withName("frame_mbs_only_flag"), + ValueLayout.JAVA_INT.withName("delta_pic_order_always_zero_flag"), + ValueLayout.JAVA_INT.withName("separate_colour_plane_flag"), + ValueLayout.JAVA_INT.withName("gaps_in_frame_num_value_allowed_flag"), + ValueLayout.JAVA_INT.withName("qpprime_y_zero_transform_bypass_flag"), + ValueLayout.JAVA_INT.withName("frame_cropping_flag"), + ValueLayout.JAVA_INT.withName("seq_scaling_matrix_present_flag"), + ValueLayout.JAVA_INT.withName("vui_parameters_present_flag") + ); + /// The [VarHandle] of `constraint_set0_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constraint_set0_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constraint_set0_flag")); + /// The [VarHandle] of `constraint_set1_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constraint_set1_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constraint_set1_flag")); + /// The [VarHandle] of `constraint_set2_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constraint_set2_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constraint_set2_flag")); + /// The [VarHandle] of `constraint_set3_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constraint_set3_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constraint_set3_flag")); + /// The [VarHandle] of `constraint_set4_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constraint_set4_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constraint_set4_flag")); + /// The [VarHandle] of `constraint_set5_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constraint_set5_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constraint_set5_flag")); + /// The [VarHandle] of `direct_8x8_inference_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_direct_8x8_inference_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("direct_8x8_inference_flag")); + /// The [VarHandle] of `mb_adaptive_frame_field_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_mb_adaptive_frame_field_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("mb_adaptive_frame_field_flag")); + /// The [VarHandle] of `frame_mbs_only_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_mbs_only_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_mbs_only_flag")); + /// The [VarHandle] of `delta_pic_order_always_zero_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_delta_pic_order_always_zero_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_pic_order_always_zero_flag")); + /// The [VarHandle] of `separate_colour_plane_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_separate_colour_plane_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("separate_colour_plane_flag")); + /// The [VarHandle] of `gaps_in_frame_num_value_allowed_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_gaps_in_frame_num_value_allowed_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("gaps_in_frame_num_value_allowed_flag")); + /// The [VarHandle] of `qpprime_y_zero_transform_bypass_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_qpprime_y_zero_transform_bypass_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("qpprime_y_zero_transform_bypass_flag")); + /// The [VarHandle] of `frame_cropping_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_cropping_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_cropping_flag")); + /// The [VarHandle] of `seq_scaling_matrix_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_seq_scaling_matrix_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("seq_scaling_matrix_present_flag")); + /// The [VarHandle] of `vui_parameters_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vui_parameters_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vui_parameters_present_flag")); + + /// Creates `StdVideoH264SpsFlags` with the given segment. + /// @param segment the memory segment + public StdVideoH264SpsFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH264SpsFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SpsFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SpsFlags(segment); } + + /// Creates `StdVideoH264SpsFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SpsFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SpsFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH264SpsFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SpsFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SpsFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH264SpsFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH264SpsFlags` + public static StdVideoH264SpsFlags alloc(SegmentAllocator allocator) { return new StdVideoH264SpsFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH264SpsFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH264SpsFlags` + public static StdVideoH264SpsFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoH264SpsFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `constraint_set0_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_constraint_set0_flag(MemorySegment segment, long index) { return (int) VH_constraint_set0_flag.get(segment, 0L, index); } + /// {@return `constraint_set0_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_constraint_set0_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_constraint_set0_flag(segment, 0L); } + /// {@return `constraint_set0_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int constraint_set0_flagAt(long index) { return StdVideoH264SpsFlags.get_constraint_set0_flag(this.segment(), index); } + /// {@return `constraint_set0_flag`} + public @CType("uint32_t : 1") int constraint_set0_flag() { return StdVideoH264SpsFlags.get_constraint_set0_flag(this.segment()); } + /// Sets `constraint_set0_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constraint_set0_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_constraint_set0_flag.set(segment, 0L, index, value); } + /// Sets `constraint_set0_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constraint_set0_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set0_flag(segment, 0L, value); } + /// Sets `constraint_set0_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set0_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set0_flag(this.segment(), index, value); return this; } + /// Sets `constraint_set0_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set0_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set0_flag(this.segment(), value); return this; } + + /// {@return `constraint_set1_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_constraint_set1_flag(MemorySegment segment, long index) { return (int) VH_constraint_set1_flag.get(segment, 0L, index); } + /// {@return `constraint_set1_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_constraint_set1_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_constraint_set1_flag(segment, 0L); } + /// {@return `constraint_set1_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int constraint_set1_flagAt(long index) { return StdVideoH264SpsFlags.get_constraint_set1_flag(this.segment(), index); } + /// {@return `constraint_set1_flag`} + public @CType("uint32_t : 1") int constraint_set1_flag() { return StdVideoH264SpsFlags.get_constraint_set1_flag(this.segment()); } + /// Sets `constraint_set1_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constraint_set1_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_constraint_set1_flag.set(segment, 0L, index, value); } + /// Sets `constraint_set1_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constraint_set1_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set1_flag(segment, 0L, value); } + /// Sets `constraint_set1_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set1_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set1_flag(this.segment(), index, value); return this; } + /// Sets `constraint_set1_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set1_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set1_flag(this.segment(), value); return this; } + + /// {@return `constraint_set2_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_constraint_set2_flag(MemorySegment segment, long index) { return (int) VH_constraint_set2_flag.get(segment, 0L, index); } + /// {@return `constraint_set2_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_constraint_set2_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_constraint_set2_flag(segment, 0L); } + /// {@return `constraint_set2_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int constraint_set2_flagAt(long index) { return StdVideoH264SpsFlags.get_constraint_set2_flag(this.segment(), index); } + /// {@return `constraint_set2_flag`} + public @CType("uint32_t : 1") int constraint_set2_flag() { return StdVideoH264SpsFlags.get_constraint_set2_flag(this.segment()); } + /// Sets `constraint_set2_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constraint_set2_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_constraint_set2_flag.set(segment, 0L, index, value); } + /// Sets `constraint_set2_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constraint_set2_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set2_flag(segment, 0L, value); } + /// Sets `constraint_set2_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set2_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set2_flag(this.segment(), index, value); return this; } + /// Sets `constraint_set2_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set2_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set2_flag(this.segment(), value); return this; } + + /// {@return `constraint_set3_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_constraint_set3_flag(MemorySegment segment, long index) { return (int) VH_constraint_set3_flag.get(segment, 0L, index); } + /// {@return `constraint_set3_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_constraint_set3_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_constraint_set3_flag(segment, 0L); } + /// {@return `constraint_set3_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int constraint_set3_flagAt(long index) { return StdVideoH264SpsFlags.get_constraint_set3_flag(this.segment(), index); } + /// {@return `constraint_set3_flag`} + public @CType("uint32_t : 1") int constraint_set3_flag() { return StdVideoH264SpsFlags.get_constraint_set3_flag(this.segment()); } + /// Sets `constraint_set3_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constraint_set3_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_constraint_set3_flag.set(segment, 0L, index, value); } + /// Sets `constraint_set3_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constraint_set3_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set3_flag(segment, 0L, value); } + /// Sets `constraint_set3_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set3_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set3_flag(this.segment(), index, value); return this; } + /// Sets `constraint_set3_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set3_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set3_flag(this.segment(), value); return this; } + + /// {@return `constraint_set4_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_constraint_set4_flag(MemorySegment segment, long index) { return (int) VH_constraint_set4_flag.get(segment, 0L, index); } + /// {@return `constraint_set4_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_constraint_set4_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_constraint_set4_flag(segment, 0L); } + /// {@return `constraint_set4_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int constraint_set4_flagAt(long index) { return StdVideoH264SpsFlags.get_constraint_set4_flag(this.segment(), index); } + /// {@return `constraint_set4_flag`} + public @CType("uint32_t : 1") int constraint_set4_flag() { return StdVideoH264SpsFlags.get_constraint_set4_flag(this.segment()); } + /// Sets `constraint_set4_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constraint_set4_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_constraint_set4_flag.set(segment, 0L, index, value); } + /// Sets `constraint_set4_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constraint_set4_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set4_flag(segment, 0L, value); } + /// Sets `constraint_set4_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set4_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set4_flag(this.segment(), index, value); return this; } + /// Sets `constraint_set4_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set4_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set4_flag(this.segment(), value); return this; } + + /// {@return `constraint_set5_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_constraint_set5_flag(MemorySegment segment, long index) { return (int) VH_constraint_set5_flag.get(segment, 0L, index); } + /// {@return `constraint_set5_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_constraint_set5_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_constraint_set5_flag(segment, 0L); } + /// {@return `constraint_set5_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int constraint_set5_flagAt(long index) { return StdVideoH264SpsFlags.get_constraint_set5_flag(this.segment(), index); } + /// {@return `constraint_set5_flag`} + public @CType("uint32_t : 1") int constraint_set5_flag() { return StdVideoH264SpsFlags.get_constraint_set5_flag(this.segment()); } + /// Sets `constraint_set5_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constraint_set5_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_constraint_set5_flag.set(segment, 0L, index, value); } + /// Sets `constraint_set5_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constraint_set5_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set5_flag(segment, 0L, value); } + /// Sets `constraint_set5_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set5_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set5_flag(this.segment(), index, value); return this; } + /// Sets `constraint_set5_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags constraint_set5_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_constraint_set5_flag(this.segment(), value); return this; } + + /// {@return `direct_8x8_inference_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_direct_8x8_inference_flag(MemorySegment segment, long index) { return (int) VH_direct_8x8_inference_flag.get(segment, 0L, index); } + /// {@return `direct_8x8_inference_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_direct_8x8_inference_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_direct_8x8_inference_flag(segment, 0L); } + /// {@return `direct_8x8_inference_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int direct_8x8_inference_flagAt(long index) { return StdVideoH264SpsFlags.get_direct_8x8_inference_flag(this.segment(), index); } + /// {@return `direct_8x8_inference_flag`} + public @CType("uint32_t : 1") int direct_8x8_inference_flag() { return StdVideoH264SpsFlags.get_direct_8x8_inference_flag(this.segment()); } + /// Sets `direct_8x8_inference_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_direct_8x8_inference_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_direct_8x8_inference_flag.set(segment, 0L, index, value); } + /// Sets `direct_8x8_inference_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_direct_8x8_inference_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_direct_8x8_inference_flag(segment, 0L, value); } + /// Sets `direct_8x8_inference_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags direct_8x8_inference_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_direct_8x8_inference_flag(this.segment(), index, value); return this; } + /// Sets `direct_8x8_inference_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags direct_8x8_inference_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_direct_8x8_inference_flag(this.segment(), value); return this; } + + /// {@return `mb_adaptive_frame_field_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_mb_adaptive_frame_field_flag(MemorySegment segment, long index) { return (int) VH_mb_adaptive_frame_field_flag.get(segment, 0L, index); } + /// {@return `mb_adaptive_frame_field_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_mb_adaptive_frame_field_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_mb_adaptive_frame_field_flag(segment, 0L); } + /// {@return `mb_adaptive_frame_field_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int mb_adaptive_frame_field_flagAt(long index) { return StdVideoH264SpsFlags.get_mb_adaptive_frame_field_flag(this.segment(), index); } + /// {@return `mb_adaptive_frame_field_flag`} + public @CType("uint32_t : 1") int mb_adaptive_frame_field_flag() { return StdVideoH264SpsFlags.get_mb_adaptive_frame_field_flag(this.segment()); } + /// Sets `mb_adaptive_frame_field_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_mb_adaptive_frame_field_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_mb_adaptive_frame_field_flag.set(segment, 0L, index, value); } + /// Sets `mb_adaptive_frame_field_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_mb_adaptive_frame_field_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_mb_adaptive_frame_field_flag(segment, 0L, value); } + /// Sets `mb_adaptive_frame_field_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags mb_adaptive_frame_field_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_mb_adaptive_frame_field_flag(this.segment(), index, value); return this; } + /// Sets `mb_adaptive_frame_field_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags mb_adaptive_frame_field_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_mb_adaptive_frame_field_flag(this.segment(), value); return this; } + + /// {@return `frame_mbs_only_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_frame_mbs_only_flag(MemorySegment segment, long index) { return (int) VH_frame_mbs_only_flag.get(segment, 0L, index); } + /// {@return `frame_mbs_only_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_frame_mbs_only_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_frame_mbs_only_flag(segment, 0L); } + /// {@return `frame_mbs_only_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int frame_mbs_only_flagAt(long index) { return StdVideoH264SpsFlags.get_frame_mbs_only_flag(this.segment(), index); } + /// {@return `frame_mbs_only_flag`} + public @CType("uint32_t : 1") int frame_mbs_only_flag() { return StdVideoH264SpsFlags.get_frame_mbs_only_flag(this.segment()); } + /// Sets `frame_mbs_only_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_mbs_only_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_frame_mbs_only_flag.set(segment, 0L, index, value); } + /// Sets `frame_mbs_only_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_mbs_only_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_frame_mbs_only_flag(segment, 0L, value); } + /// Sets `frame_mbs_only_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags frame_mbs_only_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_frame_mbs_only_flag(this.segment(), index, value); return this; } + /// Sets `frame_mbs_only_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags frame_mbs_only_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_frame_mbs_only_flag(this.segment(), value); return this; } + + /// {@return `delta_pic_order_always_zero_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_delta_pic_order_always_zero_flag(MemorySegment segment, long index) { return (int) VH_delta_pic_order_always_zero_flag.get(segment, 0L, index); } + /// {@return `delta_pic_order_always_zero_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_delta_pic_order_always_zero_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_delta_pic_order_always_zero_flag(segment, 0L); } + /// {@return `delta_pic_order_always_zero_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int delta_pic_order_always_zero_flagAt(long index) { return StdVideoH264SpsFlags.get_delta_pic_order_always_zero_flag(this.segment(), index); } + /// {@return `delta_pic_order_always_zero_flag`} + public @CType("uint32_t : 1") int delta_pic_order_always_zero_flag() { return StdVideoH264SpsFlags.get_delta_pic_order_always_zero_flag(this.segment()); } + /// Sets `delta_pic_order_always_zero_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_pic_order_always_zero_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_delta_pic_order_always_zero_flag.set(segment, 0L, index, value); } + /// Sets `delta_pic_order_always_zero_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_pic_order_always_zero_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_delta_pic_order_always_zero_flag(segment, 0L, value); } + /// Sets `delta_pic_order_always_zero_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags delta_pic_order_always_zero_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_delta_pic_order_always_zero_flag(this.segment(), index, value); return this; } + /// Sets `delta_pic_order_always_zero_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags delta_pic_order_always_zero_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_delta_pic_order_always_zero_flag(this.segment(), value); return this; } + + /// {@return `separate_colour_plane_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_separate_colour_plane_flag(MemorySegment segment, long index) { return (int) VH_separate_colour_plane_flag.get(segment, 0L, index); } + /// {@return `separate_colour_plane_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_separate_colour_plane_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_separate_colour_plane_flag(segment, 0L); } + /// {@return `separate_colour_plane_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int separate_colour_plane_flagAt(long index) { return StdVideoH264SpsFlags.get_separate_colour_plane_flag(this.segment(), index); } + /// {@return `separate_colour_plane_flag`} + public @CType("uint32_t : 1") int separate_colour_plane_flag() { return StdVideoH264SpsFlags.get_separate_colour_plane_flag(this.segment()); } + /// Sets `separate_colour_plane_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_separate_colour_plane_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_separate_colour_plane_flag.set(segment, 0L, index, value); } + /// Sets `separate_colour_plane_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_separate_colour_plane_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_separate_colour_plane_flag(segment, 0L, value); } + /// Sets `separate_colour_plane_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags separate_colour_plane_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_separate_colour_plane_flag(this.segment(), index, value); return this; } + /// Sets `separate_colour_plane_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags separate_colour_plane_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_separate_colour_plane_flag(this.segment(), value); return this; } + + /// {@return `gaps_in_frame_num_value_allowed_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_gaps_in_frame_num_value_allowed_flag(MemorySegment segment, long index) { return (int) VH_gaps_in_frame_num_value_allowed_flag.get(segment, 0L, index); } + /// {@return `gaps_in_frame_num_value_allowed_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_gaps_in_frame_num_value_allowed_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_gaps_in_frame_num_value_allowed_flag(segment, 0L); } + /// {@return `gaps_in_frame_num_value_allowed_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int gaps_in_frame_num_value_allowed_flagAt(long index) { return StdVideoH264SpsFlags.get_gaps_in_frame_num_value_allowed_flag(this.segment(), index); } + /// {@return `gaps_in_frame_num_value_allowed_flag`} + public @CType("uint32_t : 1") int gaps_in_frame_num_value_allowed_flag() { return StdVideoH264SpsFlags.get_gaps_in_frame_num_value_allowed_flag(this.segment()); } + /// Sets `gaps_in_frame_num_value_allowed_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_gaps_in_frame_num_value_allowed_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_gaps_in_frame_num_value_allowed_flag.set(segment, 0L, index, value); } + /// Sets `gaps_in_frame_num_value_allowed_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_gaps_in_frame_num_value_allowed_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_gaps_in_frame_num_value_allowed_flag(segment, 0L, value); } + /// Sets `gaps_in_frame_num_value_allowed_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags gaps_in_frame_num_value_allowed_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_gaps_in_frame_num_value_allowed_flag(this.segment(), index, value); return this; } + /// Sets `gaps_in_frame_num_value_allowed_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags gaps_in_frame_num_value_allowed_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_gaps_in_frame_num_value_allowed_flag(this.segment(), value); return this; } + + /// {@return `qpprime_y_zero_transform_bypass_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_qpprime_y_zero_transform_bypass_flag(MemorySegment segment, long index) { return (int) VH_qpprime_y_zero_transform_bypass_flag.get(segment, 0L, index); } + /// {@return `qpprime_y_zero_transform_bypass_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_qpprime_y_zero_transform_bypass_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_qpprime_y_zero_transform_bypass_flag(segment, 0L); } + /// {@return `qpprime_y_zero_transform_bypass_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int qpprime_y_zero_transform_bypass_flagAt(long index) { return StdVideoH264SpsFlags.get_qpprime_y_zero_transform_bypass_flag(this.segment(), index); } + /// {@return `qpprime_y_zero_transform_bypass_flag`} + public @CType("uint32_t : 1") int qpprime_y_zero_transform_bypass_flag() { return StdVideoH264SpsFlags.get_qpprime_y_zero_transform_bypass_flag(this.segment()); } + /// Sets `qpprime_y_zero_transform_bypass_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_qpprime_y_zero_transform_bypass_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_qpprime_y_zero_transform_bypass_flag.set(segment, 0L, index, value); } + /// Sets `qpprime_y_zero_transform_bypass_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_qpprime_y_zero_transform_bypass_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_qpprime_y_zero_transform_bypass_flag(segment, 0L, value); } + /// Sets `qpprime_y_zero_transform_bypass_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags qpprime_y_zero_transform_bypass_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_qpprime_y_zero_transform_bypass_flag(this.segment(), index, value); return this; } + /// Sets `qpprime_y_zero_transform_bypass_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags qpprime_y_zero_transform_bypass_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_qpprime_y_zero_transform_bypass_flag(this.segment(), value); return this; } + + /// {@return `frame_cropping_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_frame_cropping_flag(MemorySegment segment, long index) { return (int) VH_frame_cropping_flag.get(segment, 0L, index); } + /// {@return `frame_cropping_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_frame_cropping_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_frame_cropping_flag(segment, 0L); } + /// {@return `frame_cropping_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int frame_cropping_flagAt(long index) { return StdVideoH264SpsFlags.get_frame_cropping_flag(this.segment(), index); } + /// {@return `frame_cropping_flag`} + public @CType("uint32_t : 1") int frame_cropping_flag() { return StdVideoH264SpsFlags.get_frame_cropping_flag(this.segment()); } + /// Sets `frame_cropping_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_cropping_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_frame_cropping_flag.set(segment, 0L, index, value); } + /// Sets `frame_cropping_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_cropping_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_frame_cropping_flag(segment, 0L, value); } + /// Sets `frame_cropping_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags frame_cropping_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_frame_cropping_flag(this.segment(), index, value); return this; } + /// Sets `frame_cropping_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags frame_cropping_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_frame_cropping_flag(this.segment(), value); return this; } + + /// {@return `seq_scaling_matrix_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_seq_scaling_matrix_present_flag(MemorySegment segment, long index) { return (int) VH_seq_scaling_matrix_present_flag.get(segment, 0L, index); } + /// {@return `seq_scaling_matrix_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_seq_scaling_matrix_present_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_seq_scaling_matrix_present_flag(segment, 0L); } + /// {@return `seq_scaling_matrix_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int seq_scaling_matrix_present_flagAt(long index) { return StdVideoH264SpsFlags.get_seq_scaling_matrix_present_flag(this.segment(), index); } + /// {@return `seq_scaling_matrix_present_flag`} + public @CType("uint32_t : 1") int seq_scaling_matrix_present_flag() { return StdVideoH264SpsFlags.get_seq_scaling_matrix_present_flag(this.segment()); } + /// Sets `seq_scaling_matrix_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_seq_scaling_matrix_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_seq_scaling_matrix_present_flag.set(segment, 0L, index, value); } + /// Sets `seq_scaling_matrix_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_seq_scaling_matrix_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_seq_scaling_matrix_present_flag(segment, 0L, value); } + /// Sets `seq_scaling_matrix_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags seq_scaling_matrix_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_seq_scaling_matrix_present_flag(this.segment(), index, value); return this; } + /// Sets `seq_scaling_matrix_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags seq_scaling_matrix_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_seq_scaling_matrix_present_flag(this.segment(), value); return this; } + + /// {@return `vui_parameters_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vui_parameters_present_flag(MemorySegment segment, long index) { return (int) VH_vui_parameters_present_flag.get(segment, 0L, index); } + /// {@return `vui_parameters_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vui_parameters_present_flag(MemorySegment segment) { return StdVideoH264SpsFlags.get_vui_parameters_present_flag(segment, 0L); } + /// {@return `vui_parameters_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vui_parameters_present_flagAt(long index) { return StdVideoH264SpsFlags.get_vui_parameters_present_flag(this.segment(), index); } + /// {@return `vui_parameters_present_flag`} + public @CType("uint32_t : 1") int vui_parameters_present_flag() { return StdVideoH264SpsFlags.get_vui_parameters_present_flag(this.segment()); } + /// Sets `vui_parameters_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vui_parameters_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vui_parameters_present_flag.set(segment, 0L, index, value); } + /// Sets `vui_parameters_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vui_parameters_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_vui_parameters_present_flag(segment, 0L, value); } + /// Sets `vui_parameters_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags vui_parameters_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_vui_parameters_present_flag(this.segment(), index, value); return this; } + /// Sets `vui_parameters_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsFlags vui_parameters_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsFlags.set_vui_parameters_present_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SpsVuiFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SpsVuiFlags.java new file mode 100644 index 00000000..90faf199 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH264SpsVuiFlags.java @@ -0,0 +1,518 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### aspect_ratio_info_present_flag +/// [VarHandle][#VH_aspect_ratio_info_present_flag] - [Getter][#aspect_ratio_info_present_flag()] - [Setter][#aspect_ratio_info_present_flag(int)] +/// ### overscan_info_present_flag +/// [VarHandle][#VH_overscan_info_present_flag] - [Getter][#overscan_info_present_flag()] - [Setter][#overscan_info_present_flag(int)] +/// ### overscan_appropriate_flag +/// [VarHandle][#VH_overscan_appropriate_flag] - [Getter][#overscan_appropriate_flag()] - [Setter][#overscan_appropriate_flag(int)] +/// ### video_signal_type_present_flag +/// [VarHandle][#VH_video_signal_type_present_flag] - [Getter][#video_signal_type_present_flag()] - [Setter][#video_signal_type_present_flag(int)] +/// ### video_full_range_flag +/// [VarHandle][#VH_video_full_range_flag] - [Getter][#video_full_range_flag()] - [Setter][#video_full_range_flag(int)] +/// ### color_description_present_flag +/// [VarHandle][#VH_color_description_present_flag] - [Getter][#color_description_present_flag()] - [Setter][#color_description_present_flag(int)] +/// ### chroma_loc_info_present_flag +/// [VarHandle][#VH_chroma_loc_info_present_flag] - [Getter][#chroma_loc_info_present_flag()] - [Setter][#chroma_loc_info_present_flag(int)] +/// ### timing_info_present_flag +/// [VarHandle][#VH_timing_info_present_flag] - [Getter][#timing_info_present_flag()] - [Setter][#timing_info_present_flag(int)] +/// ### fixed_frame_rate_flag +/// [VarHandle][#VH_fixed_frame_rate_flag] - [Getter][#fixed_frame_rate_flag()] - [Setter][#fixed_frame_rate_flag(int)] +/// ### bitstream_restriction_flag +/// [VarHandle][#VH_bitstream_restriction_flag] - [Getter][#bitstream_restriction_flag()] - [Setter][#bitstream_restriction_flag(int)] +/// ### nal_hrd_parameters_present_flag +/// [VarHandle][#VH_nal_hrd_parameters_present_flag] - [Getter][#nal_hrd_parameters_present_flag()] - [Setter][#nal_hrd_parameters_present_flag(int)] +/// ### vcl_hrd_parameters_present_flag +/// [VarHandle][#VH_vcl_hrd_parameters_present_flag] - [Getter][#vcl_hrd_parameters_present_flag()] - [Setter][#vcl_hrd_parameters_present_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH264SpsVuiFlags { +/// uint32_t : 1 aspect_ratio_info_present_flag; +/// uint32_t : 1 overscan_info_present_flag; +/// uint32_t : 1 overscan_appropriate_flag; +/// uint32_t : 1 video_signal_type_present_flag; +/// uint32_t : 1 video_full_range_flag; +/// uint32_t : 1 color_description_present_flag; +/// uint32_t : 1 chroma_loc_info_present_flag; +/// uint32_t : 1 timing_info_present_flag; +/// uint32_t : 1 fixed_frame_rate_flag; +/// uint32_t : 1 bitstream_restriction_flag; +/// uint32_t : 1 nal_hrd_parameters_present_flag; +/// uint32_t : 1 vcl_hrd_parameters_present_flag; +/// } StdVideoH264SpsVuiFlags; +/// ``` +public final class StdVideoH264SpsVuiFlags extends Struct { + /// The struct layout of `StdVideoH264SpsVuiFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("aspect_ratio_info_present_flag"), + ValueLayout.JAVA_INT.withName("overscan_info_present_flag"), + ValueLayout.JAVA_INT.withName("overscan_appropriate_flag"), + ValueLayout.JAVA_INT.withName("video_signal_type_present_flag"), + ValueLayout.JAVA_INT.withName("video_full_range_flag"), + ValueLayout.JAVA_INT.withName("color_description_present_flag"), + ValueLayout.JAVA_INT.withName("chroma_loc_info_present_flag"), + ValueLayout.JAVA_INT.withName("timing_info_present_flag"), + ValueLayout.JAVA_INT.withName("fixed_frame_rate_flag"), + ValueLayout.JAVA_INT.withName("bitstream_restriction_flag"), + ValueLayout.JAVA_INT.withName("nal_hrd_parameters_present_flag"), + ValueLayout.JAVA_INT.withName("vcl_hrd_parameters_present_flag") + ); + /// The [VarHandle] of `aspect_ratio_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspect_ratio_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspect_ratio_info_present_flag")); + /// The [VarHandle] of `overscan_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_overscan_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("overscan_info_present_flag")); + /// The [VarHandle] of `overscan_appropriate_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_overscan_appropriate_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("overscan_appropriate_flag")); + /// The [VarHandle] of `video_signal_type_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_video_signal_type_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("video_signal_type_present_flag")); + /// The [VarHandle] of `video_full_range_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_video_full_range_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("video_full_range_flag")); + /// The [VarHandle] of `color_description_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_color_description_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("color_description_present_flag")); + /// The [VarHandle] of `chroma_loc_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chroma_loc_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_loc_info_present_flag")); + /// The [VarHandle] of `timing_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_timing_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("timing_info_present_flag")); + /// The [VarHandle] of `fixed_frame_rate_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fixed_frame_rate_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fixed_frame_rate_flag")); + /// The [VarHandle] of `bitstream_restriction_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bitstream_restriction_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bitstream_restriction_flag")); + /// The [VarHandle] of `nal_hrd_parameters_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nal_hrd_parameters_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nal_hrd_parameters_present_flag")); + /// The [VarHandle] of `vcl_hrd_parameters_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vcl_hrd_parameters_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vcl_hrd_parameters_present_flag")); + + /// Creates `StdVideoH264SpsVuiFlags` with the given segment. + /// @param segment the memory segment + public StdVideoH264SpsVuiFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH264SpsVuiFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SpsVuiFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SpsVuiFlags(segment); } + + /// Creates `StdVideoH264SpsVuiFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SpsVuiFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SpsVuiFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH264SpsVuiFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH264SpsVuiFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH264SpsVuiFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH264SpsVuiFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH264SpsVuiFlags` + public static StdVideoH264SpsVuiFlags alloc(SegmentAllocator allocator) { return new StdVideoH264SpsVuiFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH264SpsVuiFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH264SpsVuiFlags` + public static StdVideoH264SpsVuiFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoH264SpsVuiFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `aspect_ratio_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_aspect_ratio_info_present_flag(MemorySegment segment, long index) { return (int) VH_aspect_ratio_info_present_flag.get(segment, 0L, index); } + /// {@return `aspect_ratio_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_aspect_ratio_info_present_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_aspect_ratio_info_present_flag(segment, 0L); } + /// {@return `aspect_ratio_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int aspect_ratio_info_present_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_aspect_ratio_info_present_flag(this.segment(), index); } + /// {@return `aspect_ratio_info_present_flag`} + public @CType("uint32_t : 1") int aspect_ratio_info_present_flag() { return StdVideoH264SpsVuiFlags.get_aspect_ratio_info_present_flag(this.segment()); } + /// Sets `aspect_ratio_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspect_ratio_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_aspect_ratio_info_present_flag.set(segment, 0L, index, value); } + /// Sets `aspect_ratio_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspect_ratio_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_aspect_ratio_info_present_flag(segment, 0L, value); } + /// Sets `aspect_ratio_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags aspect_ratio_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_aspect_ratio_info_present_flag(this.segment(), index, value); return this; } + /// Sets `aspect_ratio_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags aspect_ratio_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_aspect_ratio_info_present_flag(this.segment(), value); return this; } + + /// {@return `overscan_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_overscan_info_present_flag(MemorySegment segment, long index) { return (int) VH_overscan_info_present_flag.get(segment, 0L, index); } + /// {@return `overscan_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_overscan_info_present_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_overscan_info_present_flag(segment, 0L); } + /// {@return `overscan_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int overscan_info_present_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_overscan_info_present_flag(this.segment(), index); } + /// {@return `overscan_info_present_flag`} + public @CType("uint32_t : 1") int overscan_info_present_flag() { return StdVideoH264SpsVuiFlags.get_overscan_info_present_flag(this.segment()); } + /// Sets `overscan_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_overscan_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_overscan_info_present_flag.set(segment, 0L, index, value); } + /// Sets `overscan_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_overscan_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_overscan_info_present_flag(segment, 0L, value); } + /// Sets `overscan_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags overscan_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_overscan_info_present_flag(this.segment(), index, value); return this; } + /// Sets `overscan_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags overscan_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_overscan_info_present_flag(this.segment(), value); return this; } + + /// {@return `overscan_appropriate_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_overscan_appropriate_flag(MemorySegment segment, long index) { return (int) VH_overscan_appropriate_flag.get(segment, 0L, index); } + /// {@return `overscan_appropriate_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_overscan_appropriate_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_overscan_appropriate_flag(segment, 0L); } + /// {@return `overscan_appropriate_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int overscan_appropriate_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_overscan_appropriate_flag(this.segment(), index); } + /// {@return `overscan_appropriate_flag`} + public @CType("uint32_t : 1") int overscan_appropriate_flag() { return StdVideoH264SpsVuiFlags.get_overscan_appropriate_flag(this.segment()); } + /// Sets `overscan_appropriate_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_overscan_appropriate_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_overscan_appropriate_flag.set(segment, 0L, index, value); } + /// Sets `overscan_appropriate_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_overscan_appropriate_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_overscan_appropriate_flag(segment, 0L, value); } + /// Sets `overscan_appropriate_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags overscan_appropriate_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_overscan_appropriate_flag(this.segment(), index, value); return this; } + /// Sets `overscan_appropriate_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags overscan_appropriate_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_overscan_appropriate_flag(this.segment(), value); return this; } + + /// {@return `video_signal_type_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_video_signal_type_present_flag(MemorySegment segment, long index) { return (int) VH_video_signal_type_present_flag.get(segment, 0L, index); } + /// {@return `video_signal_type_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_video_signal_type_present_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_video_signal_type_present_flag(segment, 0L); } + /// {@return `video_signal_type_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int video_signal_type_present_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_video_signal_type_present_flag(this.segment(), index); } + /// {@return `video_signal_type_present_flag`} + public @CType("uint32_t : 1") int video_signal_type_present_flag() { return StdVideoH264SpsVuiFlags.get_video_signal_type_present_flag(this.segment()); } + /// Sets `video_signal_type_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_video_signal_type_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_video_signal_type_present_flag.set(segment, 0L, index, value); } + /// Sets `video_signal_type_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_video_signal_type_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_video_signal_type_present_flag(segment, 0L, value); } + /// Sets `video_signal_type_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags video_signal_type_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_video_signal_type_present_flag(this.segment(), index, value); return this; } + /// Sets `video_signal_type_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags video_signal_type_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_video_signal_type_present_flag(this.segment(), value); return this; } + + /// {@return `video_full_range_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_video_full_range_flag(MemorySegment segment, long index) { return (int) VH_video_full_range_flag.get(segment, 0L, index); } + /// {@return `video_full_range_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_video_full_range_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_video_full_range_flag(segment, 0L); } + /// {@return `video_full_range_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int video_full_range_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_video_full_range_flag(this.segment(), index); } + /// {@return `video_full_range_flag`} + public @CType("uint32_t : 1") int video_full_range_flag() { return StdVideoH264SpsVuiFlags.get_video_full_range_flag(this.segment()); } + /// Sets `video_full_range_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_video_full_range_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_video_full_range_flag.set(segment, 0L, index, value); } + /// Sets `video_full_range_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_video_full_range_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_video_full_range_flag(segment, 0L, value); } + /// Sets `video_full_range_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags video_full_range_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_video_full_range_flag(this.segment(), index, value); return this; } + /// Sets `video_full_range_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags video_full_range_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_video_full_range_flag(this.segment(), value); return this; } + + /// {@return `color_description_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_color_description_present_flag(MemorySegment segment, long index) { return (int) VH_color_description_present_flag.get(segment, 0L, index); } + /// {@return `color_description_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_color_description_present_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_color_description_present_flag(segment, 0L); } + /// {@return `color_description_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int color_description_present_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_color_description_present_flag(this.segment(), index); } + /// {@return `color_description_present_flag`} + public @CType("uint32_t : 1") int color_description_present_flag() { return StdVideoH264SpsVuiFlags.get_color_description_present_flag(this.segment()); } + /// Sets `color_description_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_color_description_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_color_description_present_flag.set(segment, 0L, index, value); } + /// Sets `color_description_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_color_description_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_color_description_present_flag(segment, 0L, value); } + /// Sets `color_description_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags color_description_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_color_description_present_flag(this.segment(), index, value); return this; } + /// Sets `color_description_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags color_description_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_color_description_present_flag(this.segment(), value); return this; } + + /// {@return `chroma_loc_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_chroma_loc_info_present_flag(MemorySegment segment, long index) { return (int) VH_chroma_loc_info_present_flag.get(segment, 0L, index); } + /// {@return `chroma_loc_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_chroma_loc_info_present_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_chroma_loc_info_present_flag(segment, 0L); } + /// {@return `chroma_loc_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int chroma_loc_info_present_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_chroma_loc_info_present_flag(this.segment(), index); } + /// {@return `chroma_loc_info_present_flag`} + public @CType("uint32_t : 1") int chroma_loc_info_present_flag() { return StdVideoH264SpsVuiFlags.get_chroma_loc_info_present_flag(this.segment()); } + /// Sets `chroma_loc_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_loc_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_chroma_loc_info_present_flag.set(segment, 0L, index, value); } + /// Sets `chroma_loc_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_loc_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_chroma_loc_info_present_flag(segment, 0L, value); } + /// Sets `chroma_loc_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags chroma_loc_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_chroma_loc_info_present_flag(this.segment(), index, value); return this; } + /// Sets `chroma_loc_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags chroma_loc_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_chroma_loc_info_present_flag(this.segment(), value); return this; } + + /// {@return `timing_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_timing_info_present_flag(MemorySegment segment, long index) { return (int) VH_timing_info_present_flag.get(segment, 0L, index); } + /// {@return `timing_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_timing_info_present_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_timing_info_present_flag(segment, 0L); } + /// {@return `timing_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int timing_info_present_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_timing_info_present_flag(this.segment(), index); } + /// {@return `timing_info_present_flag`} + public @CType("uint32_t : 1") int timing_info_present_flag() { return StdVideoH264SpsVuiFlags.get_timing_info_present_flag(this.segment()); } + /// Sets `timing_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_timing_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_timing_info_present_flag.set(segment, 0L, index, value); } + /// Sets `timing_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_timing_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_timing_info_present_flag(segment, 0L, value); } + /// Sets `timing_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags timing_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_timing_info_present_flag(this.segment(), index, value); return this; } + /// Sets `timing_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags timing_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_timing_info_present_flag(this.segment(), value); return this; } + + /// {@return `fixed_frame_rate_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_fixed_frame_rate_flag(MemorySegment segment, long index) { return (int) VH_fixed_frame_rate_flag.get(segment, 0L, index); } + /// {@return `fixed_frame_rate_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_fixed_frame_rate_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_fixed_frame_rate_flag(segment, 0L); } + /// {@return `fixed_frame_rate_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int fixed_frame_rate_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_fixed_frame_rate_flag(this.segment(), index); } + /// {@return `fixed_frame_rate_flag`} + public @CType("uint32_t : 1") int fixed_frame_rate_flag() { return StdVideoH264SpsVuiFlags.get_fixed_frame_rate_flag(this.segment()); } + /// Sets `fixed_frame_rate_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fixed_frame_rate_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_fixed_frame_rate_flag.set(segment, 0L, index, value); } + /// Sets `fixed_frame_rate_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fixed_frame_rate_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_fixed_frame_rate_flag(segment, 0L, value); } + /// Sets `fixed_frame_rate_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags fixed_frame_rate_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_fixed_frame_rate_flag(this.segment(), index, value); return this; } + /// Sets `fixed_frame_rate_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags fixed_frame_rate_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_fixed_frame_rate_flag(this.segment(), value); return this; } + + /// {@return `bitstream_restriction_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_bitstream_restriction_flag(MemorySegment segment, long index) { return (int) VH_bitstream_restriction_flag.get(segment, 0L, index); } + /// {@return `bitstream_restriction_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_bitstream_restriction_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_bitstream_restriction_flag(segment, 0L); } + /// {@return `bitstream_restriction_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int bitstream_restriction_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_bitstream_restriction_flag(this.segment(), index); } + /// {@return `bitstream_restriction_flag`} + public @CType("uint32_t : 1") int bitstream_restriction_flag() { return StdVideoH264SpsVuiFlags.get_bitstream_restriction_flag(this.segment()); } + /// Sets `bitstream_restriction_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bitstream_restriction_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_bitstream_restriction_flag.set(segment, 0L, index, value); } + /// Sets `bitstream_restriction_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bitstream_restriction_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_bitstream_restriction_flag(segment, 0L, value); } + /// Sets `bitstream_restriction_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags bitstream_restriction_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_bitstream_restriction_flag(this.segment(), index, value); return this; } + /// Sets `bitstream_restriction_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags bitstream_restriction_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_bitstream_restriction_flag(this.segment(), value); return this; } + + /// {@return `nal_hrd_parameters_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_nal_hrd_parameters_present_flag(MemorySegment segment, long index) { return (int) VH_nal_hrd_parameters_present_flag.get(segment, 0L, index); } + /// {@return `nal_hrd_parameters_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_nal_hrd_parameters_present_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_nal_hrd_parameters_present_flag(segment, 0L); } + /// {@return `nal_hrd_parameters_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int nal_hrd_parameters_present_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_nal_hrd_parameters_present_flag(this.segment(), index); } + /// {@return `nal_hrd_parameters_present_flag`} + public @CType("uint32_t : 1") int nal_hrd_parameters_present_flag() { return StdVideoH264SpsVuiFlags.get_nal_hrd_parameters_present_flag(this.segment()); } + /// Sets `nal_hrd_parameters_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nal_hrd_parameters_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_nal_hrd_parameters_present_flag.set(segment, 0L, index, value); } + /// Sets `nal_hrd_parameters_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nal_hrd_parameters_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_nal_hrd_parameters_present_flag(segment, 0L, value); } + /// Sets `nal_hrd_parameters_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags nal_hrd_parameters_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_nal_hrd_parameters_present_flag(this.segment(), index, value); return this; } + /// Sets `nal_hrd_parameters_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags nal_hrd_parameters_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_nal_hrd_parameters_present_flag(this.segment(), value); return this; } + + /// {@return `vcl_hrd_parameters_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vcl_hrd_parameters_present_flag(MemorySegment segment, long index) { return (int) VH_vcl_hrd_parameters_present_flag.get(segment, 0L, index); } + /// {@return `vcl_hrd_parameters_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vcl_hrd_parameters_present_flag(MemorySegment segment) { return StdVideoH264SpsVuiFlags.get_vcl_hrd_parameters_present_flag(segment, 0L); } + /// {@return `vcl_hrd_parameters_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vcl_hrd_parameters_present_flagAt(long index) { return StdVideoH264SpsVuiFlags.get_vcl_hrd_parameters_present_flag(this.segment(), index); } + /// {@return `vcl_hrd_parameters_present_flag`} + public @CType("uint32_t : 1") int vcl_hrd_parameters_present_flag() { return StdVideoH264SpsVuiFlags.get_vcl_hrd_parameters_present_flag(this.segment()); } + /// Sets `vcl_hrd_parameters_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vcl_hrd_parameters_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vcl_hrd_parameters_present_flag.set(segment, 0L, index, value); } + /// Sets `vcl_hrd_parameters_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vcl_hrd_parameters_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_vcl_hrd_parameters_present_flag(segment, 0L, value); } + /// Sets `vcl_hrd_parameters_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags vcl_hrd_parameters_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_vcl_hrd_parameters_present_flag(this.segment(), index, value); return this; } + /// Sets `vcl_hrd_parameters_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH264SpsVuiFlags vcl_hrd_parameters_present_flag(@CType("uint32_t : 1") int value) { StdVideoH264SpsVuiFlags.set_vcl_hrd_parameters_present_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265DecPicBufMgr.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265DecPicBufMgr.java new file mode 100644 index 00000000..759c5acc --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265DecPicBufMgr.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### max_latency_increase_plus1 +/// [VarHandle][#VH_max_latency_increase_plus1] - [Getter][#max_latency_increase_plus1()] - [Setter][#max_latency_increase_plus1(int)] +/// ### max_dec_pic_buffering_minus1 +/// [VarHandle][#VH_max_dec_pic_buffering_minus1] - [Getter][#max_dec_pic_buffering_minus1()] - [Setter][#max_dec_pic_buffering_minus1(byte)] +/// ### max_num_reorder_pics +/// [VarHandle][#VH_max_num_reorder_pics] - [Getter][#max_num_reorder_pics()] - [Setter][#max_num_reorder_pics(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265DecPicBufMgr { +/// uint32_t [ ] max_latency_increase_plus1; +/// uint8_t [ ] max_dec_pic_buffering_minus1; +/// uint8_t [ ] max_num_reorder_pics; +/// } StdVideoH265DecPicBufMgr; +/// ``` +public final class StdVideoH265DecPicBufMgr extends Struct { + /// The struct layout of `StdVideoH265DecPicBufMgr`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("max_latency_increase_plus1"), + ValueLayout.JAVA_BYTE.withName("max_dec_pic_buffering_minus1"), + ValueLayout.JAVA_BYTE.withName("max_num_reorder_pics") + ); + /// The [VarHandle] of `max_latency_increase_plus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_max_latency_increase_plus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_latency_increase_plus1")); + /// The [VarHandle] of `max_dec_pic_buffering_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_max_dec_pic_buffering_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_dec_pic_buffering_minus1")); + /// The [VarHandle] of `max_num_reorder_pics` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_max_num_reorder_pics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_num_reorder_pics")); + + /// Creates `StdVideoH265DecPicBufMgr` with the given segment. + /// @param segment the memory segment + public StdVideoH265DecPicBufMgr(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265DecPicBufMgr` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265DecPicBufMgr of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265DecPicBufMgr(segment); } + + /// Creates `StdVideoH265DecPicBufMgr` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265DecPicBufMgr ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265DecPicBufMgr(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265DecPicBufMgr` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265DecPicBufMgr ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265DecPicBufMgr(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265DecPicBufMgr` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265DecPicBufMgr` + public static StdVideoH265DecPicBufMgr alloc(SegmentAllocator allocator) { return new StdVideoH265DecPicBufMgr(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265DecPicBufMgr` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265DecPicBufMgr` + public static StdVideoH265DecPicBufMgr alloc(SegmentAllocator allocator, long count) { return new StdVideoH265DecPicBufMgr(allocator.allocate(LAYOUT, count)); } + + /// {@return `max_latency_increase_plus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t [ ]") int get_max_latency_increase_plus1(MemorySegment segment, long index) { return (int) VH_max_latency_increase_plus1.get(segment, 0L, index); } + /// {@return `max_latency_increase_plus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t [ ]") int get_max_latency_increase_plus1(MemorySegment segment) { return StdVideoH265DecPicBufMgr.get_max_latency_increase_plus1(segment, 0L); } + /// {@return `max_latency_increase_plus1` at the given index} + /// @param index the index + public @CType("uint32_t [ ]") int max_latency_increase_plus1At(long index) { return StdVideoH265DecPicBufMgr.get_max_latency_increase_plus1(this.segment(), index); } + /// {@return `max_latency_increase_plus1`} + public @CType("uint32_t [ ]") int max_latency_increase_plus1() { return StdVideoH265DecPicBufMgr.get_max_latency_increase_plus1(this.segment()); } + /// Sets `max_latency_increase_plus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_latency_increase_plus1(MemorySegment segment, long index, @CType("uint32_t [ ]") int value) { VH_max_latency_increase_plus1.set(segment, 0L, index, value); } + /// Sets `max_latency_increase_plus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_latency_increase_plus1(MemorySegment segment, @CType("uint32_t [ ]") int value) { StdVideoH265DecPicBufMgr.set_max_latency_increase_plus1(segment, 0L, value); } + /// Sets `max_latency_increase_plus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265DecPicBufMgr max_latency_increase_plus1At(long index, @CType("uint32_t [ ]") int value) { StdVideoH265DecPicBufMgr.set_max_latency_increase_plus1(this.segment(), index, value); return this; } + /// Sets `max_latency_increase_plus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265DecPicBufMgr max_latency_increase_plus1(@CType("uint32_t [ ]") int value) { StdVideoH265DecPicBufMgr.set_max_latency_increase_plus1(this.segment(), value); return this; } + + /// {@return `max_dec_pic_buffering_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_max_dec_pic_buffering_minus1(MemorySegment segment, long index) { return (byte) VH_max_dec_pic_buffering_minus1.get(segment, 0L, index); } + /// {@return `max_dec_pic_buffering_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_max_dec_pic_buffering_minus1(MemorySegment segment) { return StdVideoH265DecPicBufMgr.get_max_dec_pic_buffering_minus1(segment, 0L); } + /// {@return `max_dec_pic_buffering_minus1` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte max_dec_pic_buffering_minus1At(long index) { return StdVideoH265DecPicBufMgr.get_max_dec_pic_buffering_minus1(this.segment(), index); } + /// {@return `max_dec_pic_buffering_minus1`} + public @CType("uint8_t [ ]") byte max_dec_pic_buffering_minus1() { return StdVideoH265DecPicBufMgr.get_max_dec_pic_buffering_minus1(this.segment()); } + /// Sets `max_dec_pic_buffering_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_dec_pic_buffering_minus1(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_max_dec_pic_buffering_minus1.set(segment, 0L, index, value); } + /// Sets `max_dec_pic_buffering_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_dec_pic_buffering_minus1(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoH265DecPicBufMgr.set_max_dec_pic_buffering_minus1(segment, 0L, value); } + /// Sets `max_dec_pic_buffering_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265DecPicBufMgr max_dec_pic_buffering_minus1At(long index, @CType("uint8_t [ ]") byte value) { StdVideoH265DecPicBufMgr.set_max_dec_pic_buffering_minus1(this.segment(), index, value); return this; } + /// Sets `max_dec_pic_buffering_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265DecPicBufMgr max_dec_pic_buffering_minus1(@CType("uint8_t [ ]") byte value) { StdVideoH265DecPicBufMgr.set_max_dec_pic_buffering_minus1(this.segment(), value); return this; } + + /// {@return `max_num_reorder_pics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_max_num_reorder_pics(MemorySegment segment, long index) { return (byte) VH_max_num_reorder_pics.get(segment, 0L, index); } + /// {@return `max_num_reorder_pics`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_max_num_reorder_pics(MemorySegment segment) { return StdVideoH265DecPicBufMgr.get_max_num_reorder_pics(segment, 0L); } + /// {@return `max_num_reorder_pics` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte max_num_reorder_picsAt(long index) { return StdVideoH265DecPicBufMgr.get_max_num_reorder_pics(this.segment(), index); } + /// {@return `max_num_reorder_pics`} + public @CType("uint8_t [ ]") byte max_num_reorder_pics() { return StdVideoH265DecPicBufMgr.get_max_num_reorder_pics(this.segment()); } + /// Sets `max_num_reorder_pics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_num_reorder_pics(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_max_num_reorder_pics.set(segment, 0L, index, value); } + /// Sets `max_num_reorder_pics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_num_reorder_pics(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoH265DecPicBufMgr.set_max_num_reorder_pics(segment, 0L, value); } + /// Sets `max_num_reorder_pics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265DecPicBufMgr max_num_reorder_picsAt(long index, @CType("uint8_t [ ]") byte value) { StdVideoH265DecPicBufMgr.set_max_num_reorder_pics(this.segment(), index, value); return this; } + /// Sets `max_num_reorder_pics` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265DecPicBufMgr max_num_reorder_pics(@CType("uint8_t [ ]") byte value) { StdVideoH265DecPicBufMgr.set_max_num_reorder_pics(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265HrdFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265HrdFlags.java new file mode 100644 index 00000000..32809349 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265HrdFlags.java @@ -0,0 +1,333 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### nal_hrd_parameters_present_flag +/// [VarHandle][#VH_nal_hrd_parameters_present_flag] - [Getter][#nal_hrd_parameters_present_flag()] - [Setter][#nal_hrd_parameters_present_flag(int)] +/// ### vcl_hrd_parameters_present_flag +/// [VarHandle][#VH_vcl_hrd_parameters_present_flag] - [Getter][#vcl_hrd_parameters_present_flag()] - [Setter][#vcl_hrd_parameters_present_flag(int)] +/// ### sub_pic_hrd_params_present_flag +/// [VarHandle][#VH_sub_pic_hrd_params_present_flag] - [Getter][#sub_pic_hrd_params_present_flag()] - [Setter][#sub_pic_hrd_params_present_flag(int)] +/// ### sub_pic_cpb_params_in_pic_timing_sei_flag +/// [VarHandle][#VH_sub_pic_cpb_params_in_pic_timing_sei_flag] - [Getter][#sub_pic_cpb_params_in_pic_timing_sei_flag()] - [Setter][#sub_pic_cpb_params_in_pic_timing_sei_flag(int)] +/// ### fixed_pic_rate_general_flag +/// [VarHandle][#VH_fixed_pic_rate_general_flag] - [Getter][#fixed_pic_rate_general_flag()] - [Setter][#fixed_pic_rate_general_flag(int)] +/// ### fixed_pic_rate_within_cvs_flag +/// [VarHandle][#VH_fixed_pic_rate_within_cvs_flag] - [Getter][#fixed_pic_rate_within_cvs_flag()] - [Setter][#fixed_pic_rate_within_cvs_flag(int)] +/// ### low_delay_hrd_flag +/// [VarHandle][#VH_low_delay_hrd_flag] - [Getter][#low_delay_hrd_flag()] - [Setter][#low_delay_hrd_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265HrdFlags { +/// uint32_t : 1 nal_hrd_parameters_present_flag; +/// uint32_t : 1 vcl_hrd_parameters_present_flag; +/// uint32_t : 1 sub_pic_hrd_params_present_flag; +/// uint32_t : 1 sub_pic_cpb_params_in_pic_timing_sei_flag; +/// uint32_t : 8 fixed_pic_rate_general_flag; +/// uint32_t : 8 fixed_pic_rate_within_cvs_flag; +/// uint32_t : 8 low_delay_hrd_flag; +/// } StdVideoH265HrdFlags; +/// ``` +public final class StdVideoH265HrdFlags extends Struct { + /// The struct layout of `StdVideoH265HrdFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("nal_hrd_parameters_present_flag"), + ValueLayout.JAVA_INT.withName("vcl_hrd_parameters_present_flag"), + ValueLayout.JAVA_INT.withName("sub_pic_hrd_params_present_flag"), + ValueLayout.JAVA_INT.withName("sub_pic_cpb_params_in_pic_timing_sei_flag"), + ValueLayout.JAVA_INT.withName("fixed_pic_rate_general_flag"), + ValueLayout.JAVA_INT.withName("fixed_pic_rate_within_cvs_flag"), + ValueLayout.JAVA_INT.withName("low_delay_hrd_flag") + ); + /// The [VarHandle] of `nal_hrd_parameters_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_nal_hrd_parameters_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("nal_hrd_parameters_present_flag")); + /// The [VarHandle] of `vcl_hrd_parameters_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vcl_hrd_parameters_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vcl_hrd_parameters_present_flag")); + /// The [VarHandle] of `sub_pic_hrd_params_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sub_pic_hrd_params_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sub_pic_hrd_params_present_flag")); + /// The [VarHandle] of `sub_pic_cpb_params_in_pic_timing_sei_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sub_pic_cpb_params_in_pic_timing_sei_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sub_pic_cpb_params_in_pic_timing_sei_flag")); + /// The [VarHandle] of `fixed_pic_rate_general_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fixed_pic_rate_general_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fixed_pic_rate_general_flag")); + /// The [VarHandle] of `fixed_pic_rate_within_cvs_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_fixed_pic_rate_within_cvs_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("fixed_pic_rate_within_cvs_flag")); + /// The [VarHandle] of `low_delay_hrd_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_low_delay_hrd_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("low_delay_hrd_flag")); + + /// Creates `StdVideoH265HrdFlags` with the given segment. + /// @param segment the memory segment + public StdVideoH265HrdFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265HrdFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265HrdFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265HrdFlags(segment); } + + /// Creates `StdVideoH265HrdFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265HrdFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265HrdFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265HrdFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265HrdFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265HrdFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265HrdFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265HrdFlags` + public static StdVideoH265HrdFlags alloc(SegmentAllocator allocator) { return new StdVideoH265HrdFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265HrdFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265HrdFlags` + public static StdVideoH265HrdFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoH265HrdFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `nal_hrd_parameters_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_nal_hrd_parameters_present_flag(MemorySegment segment, long index) { return (int) VH_nal_hrd_parameters_present_flag.get(segment, 0L, index); } + /// {@return `nal_hrd_parameters_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_nal_hrd_parameters_present_flag(MemorySegment segment) { return StdVideoH265HrdFlags.get_nal_hrd_parameters_present_flag(segment, 0L); } + /// {@return `nal_hrd_parameters_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int nal_hrd_parameters_present_flagAt(long index) { return StdVideoH265HrdFlags.get_nal_hrd_parameters_present_flag(this.segment(), index); } + /// {@return `nal_hrd_parameters_present_flag`} + public @CType("uint32_t : 1") int nal_hrd_parameters_present_flag() { return StdVideoH265HrdFlags.get_nal_hrd_parameters_present_flag(this.segment()); } + /// Sets `nal_hrd_parameters_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_nal_hrd_parameters_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_nal_hrd_parameters_present_flag.set(segment, 0L, index, value); } + /// Sets `nal_hrd_parameters_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_nal_hrd_parameters_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_nal_hrd_parameters_present_flag(segment, 0L, value); } + /// Sets `nal_hrd_parameters_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags nal_hrd_parameters_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_nal_hrd_parameters_present_flag(this.segment(), index, value); return this; } + /// Sets `nal_hrd_parameters_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags nal_hrd_parameters_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_nal_hrd_parameters_present_flag(this.segment(), value); return this; } + + /// {@return `vcl_hrd_parameters_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vcl_hrd_parameters_present_flag(MemorySegment segment, long index) { return (int) VH_vcl_hrd_parameters_present_flag.get(segment, 0L, index); } + /// {@return `vcl_hrd_parameters_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vcl_hrd_parameters_present_flag(MemorySegment segment) { return StdVideoH265HrdFlags.get_vcl_hrd_parameters_present_flag(segment, 0L); } + /// {@return `vcl_hrd_parameters_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vcl_hrd_parameters_present_flagAt(long index) { return StdVideoH265HrdFlags.get_vcl_hrd_parameters_present_flag(this.segment(), index); } + /// {@return `vcl_hrd_parameters_present_flag`} + public @CType("uint32_t : 1") int vcl_hrd_parameters_present_flag() { return StdVideoH265HrdFlags.get_vcl_hrd_parameters_present_flag(this.segment()); } + /// Sets `vcl_hrd_parameters_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vcl_hrd_parameters_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vcl_hrd_parameters_present_flag.set(segment, 0L, index, value); } + /// Sets `vcl_hrd_parameters_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vcl_hrd_parameters_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_vcl_hrd_parameters_present_flag(segment, 0L, value); } + /// Sets `vcl_hrd_parameters_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags vcl_hrd_parameters_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_vcl_hrd_parameters_present_flag(this.segment(), index, value); return this; } + /// Sets `vcl_hrd_parameters_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags vcl_hrd_parameters_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_vcl_hrd_parameters_present_flag(this.segment(), value); return this; } + + /// {@return `sub_pic_hrd_params_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sub_pic_hrd_params_present_flag(MemorySegment segment, long index) { return (int) VH_sub_pic_hrd_params_present_flag.get(segment, 0L, index); } + /// {@return `sub_pic_hrd_params_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sub_pic_hrd_params_present_flag(MemorySegment segment) { return StdVideoH265HrdFlags.get_sub_pic_hrd_params_present_flag(segment, 0L); } + /// {@return `sub_pic_hrd_params_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sub_pic_hrd_params_present_flagAt(long index) { return StdVideoH265HrdFlags.get_sub_pic_hrd_params_present_flag(this.segment(), index); } + /// {@return `sub_pic_hrd_params_present_flag`} + public @CType("uint32_t : 1") int sub_pic_hrd_params_present_flag() { return StdVideoH265HrdFlags.get_sub_pic_hrd_params_present_flag(this.segment()); } + /// Sets `sub_pic_hrd_params_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sub_pic_hrd_params_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sub_pic_hrd_params_present_flag.set(segment, 0L, index, value); } + /// Sets `sub_pic_hrd_params_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sub_pic_hrd_params_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_sub_pic_hrd_params_present_flag(segment, 0L, value); } + /// Sets `sub_pic_hrd_params_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags sub_pic_hrd_params_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_sub_pic_hrd_params_present_flag(this.segment(), index, value); return this; } + /// Sets `sub_pic_hrd_params_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags sub_pic_hrd_params_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_sub_pic_hrd_params_present_flag(this.segment(), value); return this; } + + /// {@return `sub_pic_cpb_params_in_pic_timing_sei_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sub_pic_cpb_params_in_pic_timing_sei_flag(MemorySegment segment, long index) { return (int) VH_sub_pic_cpb_params_in_pic_timing_sei_flag.get(segment, 0L, index); } + /// {@return `sub_pic_cpb_params_in_pic_timing_sei_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sub_pic_cpb_params_in_pic_timing_sei_flag(MemorySegment segment) { return StdVideoH265HrdFlags.get_sub_pic_cpb_params_in_pic_timing_sei_flag(segment, 0L); } + /// {@return `sub_pic_cpb_params_in_pic_timing_sei_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sub_pic_cpb_params_in_pic_timing_sei_flagAt(long index) { return StdVideoH265HrdFlags.get_sub_pic_cpb_params_in_pic_timing_sei_flag(this.segment(), index); } + /// {@return `sub_pic_cpb_params_in_pic_timing_sei_flag`} + public @CType("uint32_t : 1") int sub_pic_cpb_params_in_pic_timing_sei_flag() { return StdVideoH265HrdFlags.get_sub_pic_cpb_params_in_pic_timing_sei_flag(this.segment()); } + /// Sets `sub_pic_cpb_params_in_pic_timing_sei_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sub_pic_cpb_params_in_pic_timing_sei_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sub_pic_cpb_params_in_pic_timing_sei_flag.set(segment, 0L, index, value); } + /// Sets `sub_pic_cpb_params_in_pic_timing_sei_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sub_pic_cpb_params_in_pic_timing_sei_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_sub_pic_cpb_params_in_pic_timing_sei_flag(segment, 0L, value); } + /// Sets `sub_pic_cpb_params_in_pic_timing_sei_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags sub_pic_cpb_params_in_pic_timing_sei_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_sub_pic_cpb_params_in_pic_timing_sei_flag(this.segment(), index, value); return this; } + /// Sets `sub_pic_cpb_params_in_pic_timing_sei_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags sub_pic_cpb_params_in_pic_timing_sei_flag(@CType("uint32_t : 1") int value) { StdVideoH265HrdFlags.set_sub_pic_cpb_params_in_pic_timing_sei_flag(this.segment(), value); return this; } + + /// {@return `fixed_pic_rate_general_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 8") int get_fixed_pic_rate_general_flag(MemorySegment segment, long index) { return (int) VH_fixed_pic_rate_general_flag.get(segment, 0L, index); } + /// {@return `fixed_pic_rate_general_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 8") int get_fixed_pic_rate_general_flag(MemorySegment segment) { return StdVideoH265HrdFlags.get_fixed_pic_rate_general_flag(segment, 0L); } + /// {@return `fixed_pic_rate_general_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 8") int fixed_pic_rate_general_flagAt(long index) { return StdVideoH265HrdFlags.get_fixed_pic_rate_general_flag(this.segment(), index); } + /// {@return `fixed_pic_rate_general_flag`} + public @CType("uint32_t : 8") int fixed_pic_rate_general_flag() { return StdVideoH265HrdFlags.get_fixed_pic_rate_general_flag(this.segment()); } + /// Sets `fixed_pic_rate_general_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fixed_pic_rate_general_flag(MemorySegment segment, long index, @CType("uint32_t : 8") int value) { VH_fixed_pic_rate_general_flag.set(segment, 0L, index, value); } + /// Sets `fixed_pic_rate_general_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fixed_pic_rate_general_flag(MemorySegment segment, @CType("uint32_t : 8") int value) { StdVideoH265HrdFlags.set_fixed_pic_rate_general_flag(segment, 0L, value); } + /// Sets `fixed_pic_rate_general_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags fixed_pic_rate_general_flagAt(long index, @CType("uint32_t : 8") int value) { StdVideoH265HrdFlags.set_fixed_pic_rate_general_flag(this.segment(), index, value); return this; } + /// Sets `fixed_pic_rate_general_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags fixed_pic_rate_general_flag(@CType("uint32_t : 8") int value) { StdVideoH265HrdFlags.set_fixed_pic_rate_general_flag(this.segment(), value); return this; } + + /// {@return `fixed_pic_rate_within_cvs_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 8") int get_fixed_pic_rate_within_cvs_flag(MemorySegment segment, long index) { return (int) VH_fixed_pic_rate_within_cvs_flag.get(segment, 0L, index); } + /// {@return `fixed_pic_rate_within_cvs_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 8") int get_fixed_pic_rate_within_cvs_flag(MemorySegment segment) { return StdVideoH265HrdFlags.get_fixed_pic_rate_within_cvs_flag(segment, 0L); } + /// {@return `fixed_pic_rate_within_cvs_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 8") int fixed_pic_rate_within_cvs_flagAt(long index) { return StdVideoH265HrdFlags.get_fixed_pic_rate_within_cvs_flag(this.segment(), index); } + /// {@return `fixed_pic_rate_within_cvs_flag`} + public @CType("uint32_t : 8") int fixed_pic_rate_within_cvs_flag() { return StdVideoH265HrdFlags.get_fixed_pic_rate_within_cvs_flag(this.segment()); } + /// Sets `fixed_pic_rate_within_cvs_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_fixed_pic_rate_within_cvs_flag(MemorySegment segment, long index, @CType("uint32_t : 8") int value) { VH_fixed_pic_rate_within_cvs_flag.set(segment, 0L, index, value); } + /// Sets `fixed_pic_rate_within_cvs_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_fixed_pic_rate_within_cvs_flag(MemorySegment segment, @CType("uint32_t : 8") int value) { StdVideoH265HrdFlags.set_fixed_pic_rate_within_cvs_flag(segment, 0L, value); } + /// Sets `fixed_pic_rate_within_cvs_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags fixed_pic_rate_within_cvs_flagAt(long index, @CType("uint32_t : 8") int value) { StdVideoH265HrdFlags.set_fixed_pic_rate_within_cvs_flag(this.segment(), index, value); return this; } + /// Sets `fixed_pic_rate_within_cvs_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags fixed_pic_rate_within_cvs_flag(@CType("uint32_t : 8") int value) { StdVideoH265HrdFlags.set_fixed_pic_rate_within_cvs_flag(this.segment(), value); return this; } + + /// {@return `low_delay_hrd_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 8") int get_low_delay_hrd_flag(MemorySegment segment, long index) { return (int) VH_low_delay_hrd_flag.get(segment, 0L, index); } + /// {@return `low_delay_hrd_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 8") int get_low_delay_hrd_flag(MemorySegment segment) { return StdVideoH265HrdFlags.get_low_delay_hrd_flag(segment, 0L); } + /// {@return `low_delay_hrd_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 8") int low_delay_hrd_flagAt(long index) { return StdVideoH265HrdFlags.get_low_delay_hrd_flag(this.segment(), index); } + /// {@return `low_delay_hrd_flag`} + public @CType("uint32_t : 8") int low_delay_hrd_flag() { return StdVideoH265HrdFlags.get_low_delay_hrd_flag(this.segment()); } + /// Sets `low_delay_hrd_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_low_delay_hrd_flag(MemorySegment segment, long index, @CType("uint32_t : 8") int value) { VH_low_delay_hrd_flag.set(segment, 0L, index, value); } + /// Sets `low_delay_hrd_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_low_delay_hrd_flag(MemorySegment segment, @CType("uint32_t : 8") int value) { StdVideoH265HrdFlags.set_low_delay_hrd_flag(segment, 0L, value); } + /// Sets `low_delay_hrd_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags low_delay_hrd_flagAt(long index, @CType("uint32_t : 8") int value) { StdVideoH265HrdFlags.set_low_delay_hrd_flag(this.segment(), index, value); return this; } + /// Sets `low_delay_hrd_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdFlags low_delay_hrd_flag(@CType("uint32_t : 8") int value) { StdVideoH265HrdFlags.set_low_delay_hrd_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265HrdParameters.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265HrdParameters.java new file mode 100644 index 00000000..28ccf767 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265HrdParameters.java @@ -0,0 +1,629 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### tick_divisor_minus2 +/// [VarHandle][#VH_tick_divisor_minus2] - [Getter][#tick_divisor_minus2()] - [Setter][#tick_divisor_minus2(byte)] +/// ### du_cpb_removal_delay_increment_length_minus1 +/// [VarHandle][#VH_du_cpb_removal_delay_increment_length_minus1] - [Getter][#du_cpb_removal_delay_increment_length_minus1()] - [Setter][#du_cpb_removal_delay_increment_length_minus1(byte)] +/// ### dpb_output_delay_du_length_minus1 +/// [VarHandle][#VH_dpb_output_delay_du_length_minus1] - [Getter][#dpb_output_delay_du_length_minus1()] - [Setter][#dpb_output_delay_du_length_minus1(byte)] +/// ### bit_rate_scale +/// [VarHandle][#VH_bit_rate_scale] - [Getter][#bit_rate_scale()] - [Setter][#bit_rate_scale(byte)] +/// ### cpb_size_scale +/// [VarHandle][#VH_cpb_size_scale] - [Getter][#cpb_size_scale()] - [Setter][#cpb_size_scale(byte)] +/// ### cpb_size_du_scale +/// [VarHandle][#VH_cpb_size_du_scale] - [Getter][#cpb_size_du_scale()] - [Setter][#cpb_size_du_scale(byte)] +/// ### initial_cpb_removal_delay_length_minus1 +/// [VarHandle][#VH_initial_cpb_removal_delay_length_minus1] - [Getter][#initial_cpb_removal_delay_length_minus1()] - [Setter][#initial_cpb_removal_delay_length_minus1(byte)] +/// ### au_cpb_removal_delay_length_minus1 +/// [VarHandle][#VH_au_cpb_removal_delay_length_minus1] - [Getter][#au_cpb_removal_delay_length_minus1()] - [Setter][#au_cpb_removal_delay_length_minus1(byte)] +/// ### dpb_output_delay_length_minus1 +/// [VarHandle][#VH_dpb_output_delay_length_minus1] - [Getter][#dpb_output_delay_length_minus1()] - [Setter][#dpb_output_delay_length_minus1(byte)] +/// ### cpb_cnt_minus1 +/// [VarHandle][#VH_cpb_cnt_minus1] - [Getter][#cpb_cnt_minus1()] - [Setter][#cpb_cnt_minus1(byte)] +/// ### elemental_duration_in_tc_minus1 +/// [VarHandle][#VH_elemental_duration_in_tc_minus1] - [Getter][#elemental_duration_in_tc_minus1()] - [Setter][#elemental_duration_in_tc_minus1(short)] +/// ### reserved +/// [VarHandle][#VH_reserved] - [Getter][#reserved()] - [Setter][#reserved(short)] +/// ### pSubLayerHrdParametersNal +/// [VarHandle][#VH_pSubLayerHrdParametersNal] - [Getter][#pSubLayerHrdParametersNal()] - [Setter][#pSubLayerHrdParametersNal(java.lang.foreign.MemorySegment)] +/// ### pSubLayerHrdParametersVcl +/// [VarHandle][#VH_pSubLayerHrdParametersVcl] - [Getter][#pSubLayerHrdParametersVcl()] - [Setter][#pSubLayerHrdParametersVcl(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265HrdParameters { +/// StdVideoH265HrdFlags flags; +/// uint8_t tick_divisor_minus2; +/// uint8_t du_cpb_removal_delay_increment_length_minus1; +/// uint8_t dpb_output_delay_du_length_minus1; +/// uint8_t bit_rate_scale; +/// uint8_t cpb_size_scale; +/// uint8_t cpb_size_du_scale; +/// uint8_t initial_cpb_removal_delay_length_minus1; +/// uint8_t au_cpb_removal_delay_length_minus1; +/// uint8_t dpb_output_delay_length_minus1; +/// uint8_t [ ] cpb_cnt_minus1; +/// uint16_t [ ] elemental_duration_in_tc_minus1; +/// uint16_t [3] reserved; +/// const StdVideoH265SubLayerHrdParameters * pSubLayerHrdParametersNal; +/// const StdVideoH265SubLayerHrdParameters * pSubLayerHrdParametersVcl; +/// } StdVideoH265HrdParameters; +/// ``` +public final class StdVideoH265HrdParameters extends Struct { + /// The struct layout of `StdVideoH265HrdParameters`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoH265HrdFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("tick_divisor_minus2"), + ValueLayout.JAVA_BYTE.withName("du_cpb_removal_delay_increment_length_minus1"), + ValueLayout.JAVA_BYTE.withName("dpb_output_delay_du_length_minus1"), + ValueLayout.JAVA_BYTE.withName("bit_rate_scale"), + ValueLayout.JAVA_BYTE.withName("cpb_size_scale"), + ValueLayout.JAVA_BYTE.withName("cpb_size_du_scale"), + ValueLayout.JAVA_BYTE.withName("initial_cpb_removal_delay_length_minus1"), + ValueLayout.JAVA_BYTE.withName("au_cpb_removal_delay_length_minus1"), + ValueLayout.JAVA_BYTE.withName("dpb_output_delay_length_minus1"), + ValueLayout.JAVA_BYTE.withName("cpb_cnt_minus1"), + ValueLayout.JAVA_SHORT.withName("elemental_duration_in_tc_minus1"), + ValueLayout.JAVA_SHORT.withName("reserved"), + ValueLayout.ADDRESS.withName("pSubLayerHrdParametersNal"), + ValueLayout.ADDRESS.withName("pSubLayerHrdParametersVcl") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `tick_divisor_minus2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_tick_divisor_minus2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tick_divisor_minus2")); + /// The [VarHandle] of `du_cpb_removal_delay_increment_length_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_du_cpb_removal_delay_increment_length_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("du_cpb_removal_delay_increment_length_minus1")); + /// The [VarHandle] of `dpb_output_delay_du_length_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_dpb_output_delay_du_length_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dpb_output_delay_du_length_minus1")); + /// The [VarHandle] of `bit_rate_scale` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_bit_rate_scale = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bit_rate_scale")); + /// The [VarHandle] of `cpb_size_scale` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cpb_size_scale = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cpb_size_scale")); + /// The [VarHandle] of `cpb_size_du_scale` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cpb_size_du_scale = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cpb_size_du_scale")); + /// The [VarHandle] of `initial_cpb_removal_delay_length_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_initial_cpb_removal_delay_length_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("initial_cpb_removal_delay_length_minus1")); + /// The [VarHandle] of `au_cpb_removal_delay_length_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_au_cpb_removal_delay_length_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("au_cpb_removal_delay_length_minus1")); + /// The [VarHandle] of `dpb_output_delay_length_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_dpb_output_delay_length_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dpb_output_delay_length_minus1")); + /// The [VarHandle] of `cpb_cnt_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cpb_cnt_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cpb_cnt_minus1")); + /// The [VarHandle] of `elemental_duration_in_tc_minus1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_elemental_duration_in_tc_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("elemental_duration_in_tc_minus1")); + /// The [VarHandle] of `reserved` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_reserved = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved")); + /// The [VarHandle] of `pSubLayerHrdParametersNal` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSubLayerHrdParametersNal = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSubLayerHrdParametersNal")); + /// The [VarHandle] of `pSubLayerHrdParametersVcl` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSubLayerHrdParametersVcl = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSubLayerHrdParametersVcl")); + + /// Creates `StdVideoH265HrdParameters` with the given segment. + /// @param segment the memory segment + public StdVideoH265HrdParameters(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265HrdParameters` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265HrdParameters of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265HrdParameters(segment); } + + /// Creates `StdVideoH265HrdParameters` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265HrdParameters ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265HrdParameters(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265HrdParameters` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265HrdParameters ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265HrdParameters(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265HrdParameters` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265HrdParameters` + public static StdVideoH265HrdParameters alloc(SegmentAllocator allocator) { return new StdVideoH265HrdParameters(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265HrdParameters` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265HrdParameters` + public static StdVideoH265HrdParameters alloc(SegmentAllocator allocator, long count) { return new StdVideoH265HrdParameters(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265HrdFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265HrdFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoH265HrdParameters.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoH265HrdFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoH265HrdParameters.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoH265HrdFlags") java.lang.foreign.MemorySegment flags() { return StdVideoH265HrdParameters.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoH265HrdFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoH265HrdFlags") java.lang.foreign.MemorySegment value) { StdVideoH265HrdParameters.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters flagsAt(long index, @CType("StdVideoH265HrdFlags") java.lang.foreign.MemorySegment value) { StdVideoH265HrdParameters.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters flags(@CType("StdVideoH265HrdFlags") java.lang.foreign.MemorySegment value) { StdVideoH265HrdParameters.set_flags(this.segment(), value); return this; } + + /// {@return `tick_divisor_minus2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_tick_divisor_minus2(MemorySegment segment, long index) { return (byte) VH_tick_divisor_minus2.get(segment, 0L, index); } + /// {@return `tick_divisor_minus2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_tick_divisor_minus2(MemorySegment segment) { return StdVideoH265HrdParameters.get_tick_divisor_minus2(segment, 0L); } + /// {@return `tick_divisor_minus2` at the given index} + /// @param index the index + public @CType("uint8_t") byte tick_divisor_minus2At(long index) { return StdVideoH265HrdParameters.get_tick_divisor_minus2(this.segment(), index); } + /// {@return `tick_divisor_minus2`} + public @CType("uint8_t") byte tick_divisor_minus2() { return StdVideoH265HrdParameters.get_tick_divisor_minus2(this.segment()); } + /// Sets `tick_divisor_minus2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tick_divisor_minus2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_tick_divisor_minus2.set(segment, 0L, index, value); } + /// Sets `tick_divisor_minus2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tick_divisor_minus2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_tick_divisor_minus2(segment, 0L, value); } + /// Sets `tick_divisor_minus2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters tick_divisor_minus2At(long index, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_tick_divisor_minus2(this.segment(), index, value); return this; } + /// Sets `tick_divisor_minus2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters tick_divisor_minus2(@CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_tick_divisor_minus2(this.segment(), value); return this; } + + /// {@return `du_cpb_removal_delay_increment_length_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_du_cpb_removal_delay_increment_length_minus1(MemorySegment segment, long index) { return (byte) VH_du_cpb_removal_delay_increment_length_minus1.get(segment, 0L, index); } + /// {@return `du_cpb_removal_delay_increment_length_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_du_cpb_removal_delay_increment_length_minus1(MemorySegment segment) { return StdVideoH265HrdParameters.get_du_cpb_removal_delay_increment_length_minus1(segment, 0L); } + /// {@return `du_cpb_removal_delay_increment_length_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte du_cpb_removal_delay_increment_length_minus1At(long index) { return StdVideoH265HrdParameters.get_du_cpb_removal_delay_increment_length_minus1(this.segment(), index); } + /// {@return `du_cpb_removal_delay_increment_length_minus1`} + public @CType("uint8_t") byte du_cpb_removal_delay_increment_length_minus1() { return StdVideoH265HrdParameters.get_du_cpb_removal_delay_increment_length_minus1(this.segment()); } + /// Sets `du_cpb_removal_delay_increment_length_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_du_cpb_removal_delay_increment_length_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_du_cpb_removal_delay_increment_length_minus1.set(segment, 0L, index, value); } + /// Sets `du_cpb_removal_delay_increment_length_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_du_cpb_removal_delay_increment_length_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_du_cpb_removal_delay_increment_length_minus1(segment, 0L, value); } + /// Sets `du_cpb_removal_delay_increment_length_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters du_cpb_removal_delay_increment_length_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_du_cpb_removal_delay_increment_length_minus1(this.segment(), index, value); return this; } + /// Sets `du_cpb_removal_delay_increment_length_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters du_cpb_removal_delay_increment_length_minus1(@CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_du_cpb_removal_delay_increment_length_minus1(this.segment(), value); return this; } + + /// {@return `dpb_output_delay_du_length_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_dpb_output_delay_du_length_minus1(MemorySegment segment, long index) { return (byte) VH_dpb_output_delay_du_length_minus1.get(segment, 0L, index); } + /// {@return `dpb_output_delay_du_length_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_dpb_output_delay_du_length_minus1(MemorySegment segment) { return StdVideoH265HrdParameters.get_dpb_output_delay_du_length_minus1(segment, 0L); } + /// {@return `dpb_output_delay_du_length_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte dpb_output_delay_du_length_minus1At(long index) { return StdVideoH265HrdParameters.get_dpb_output_delay_du_length_minus1(this.segment(), index); } + /// {@return `dpb_output_delay_du_length_minus1`} + public @CType("uint8_t") byte dpb_output_delay_du_length_minus1() { return StdVideoH265HrdParameters.get_dpb_output_delay_du_length_minus1(this.segment()); } + /// Sets `dpb_output_delay_du_length_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dpb_output_delay_du_length_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_dpb_output_delay_du_length_minus1.set(segment, 0L, index, value); } + /// Sets `dpb_output_delay_du_length_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dpb_output_delay_du_length_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_dpb_output_delay_du_length_minus1(segment, 0L, value); } + /// Sets `dpb_output_delay_du_length_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters dpb_output_delay_du_length_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_dpb_output_delay_du_length_minus1(this.segment(), index, value); return this; } + /// Sets `dpb_output_delay_du_length_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters dpb_output_delay_du_length_minus1(@CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_dpb_output_delay_du_length_minus1(this.segment(), value); return this; } + + /// {@return `bit_rate_scale` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_bit_rate_scale(MemorySegment segment, long index) { return (byte) VH_bit_rate_scale.get(segment, 0L, index); } + /// {@return `bit_rate_scale`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_bit_rate_scale(MemorySegment segment) { return StdVideoH265HrdParameters.get_bit_rate_scale(segment, 0L); } + /// {@return `bit_rate_scale` at the given index} + /// @param index the index + public @CType("uint8_t") byte bit_rate_scaleAt(long index) { return StdVideoH265HrdParameters.get_bit_rate_scale(this.segment(), index); } + /// {@return `bit_rate_scale`} + public @CType("uint8_t") byte bit_rate_scale() { return StdVideoH265HrdParameters.get_bit_rate_scale(this.segment()); } + /// Sets `bit_rate_scale` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bit_rate_scale(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_bit_rate_scale.set(segment, 0L, index, value); } + /// Sets `bit_rate_scale` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bit_rate_scale(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_bit_rate_scale(segment, 0L, value); } + /// Sets `bit_rate_scale` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters bit_rate_scaleAt(long index, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_bit_rate_scale(this.segment(), index, value); return this; } + /// Sets `bit_rate_scale` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters bit_rate_scale(@CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_bit_rate_scale(this.segment(), value); return this; } + + /// {@return `cpb_size_scale` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_cpb_size_scale(MemorySegment segment, long index) { return (byte) VH_cpb_size_scale.get(segment, 0L, index); } + /// {@return `cpb_size_scale`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_cpb_size_scale(MemorySegment segment) { return StdVideoH265HrdParameters.get_cpb_size_scale(segment, 0L); } + /// {@return `cpb_size_scale` at the given index} + /// @param index the index + public @CType("uint8_t") byte cpb_size_scaleAt(long index) { return StdVideoH265HrdParameters.get_cpb_size_scale(this.segment(), index); } + /// {@return `cpb_size_scale`} + public @CType("uint8_t") byte cpb_size_scale() { return StdVideoH265HrdParameters.get_cpb_size_scale(this.segment()); } + /// Sets `cpb_size_scale` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cpb_size_scale(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_cpb_size_scale.set(segment, 0L, index, value); } + /// Sets `cpb_size_scale` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cpb_size_scale(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_cpb_size_scale(segment, 0L, value); } + /// Sets `cpb_size_scale` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters cpb_size_scaleAt(long index, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_cpb_size_scale(this.segment(), index, value); return this; } + /// Sets `cpb_size_scale` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters cpb_size_scale(@CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_cpb_size_scale(this.segment(), value); return this; } + + /// {@return `cpb_size_du_scale` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_cpb_size_du_scale(MemorySegment segment, long index) { return (byte) VH_cpb_size_du_scale.get(segment, 0L, index); } + /// {@return `cpb_size_du_scale`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_cpb_size_du_scale(MemorySegment segment) { return StdVideoH265HrdParameters.get_cpb_size_du_scale(segment, 0L); } + /// {@return `cpb_size_du_scale` at the given index} + /// @param index the index + public @CType("uint8_t") byte cpb_size_du_scaleAt(long index) { return StdVideoH265HrdParameters.get_cpb_size_du_scale(this.segment(), index); } + /// {@return `cpb_size_du_scale`} + public @CType("uint8_t") byte cpb_size_du_scale() { return StdVideoH265HrdParameters.get_cpb_size_du_scale(this.segment()); } + /// Sets `cpb_size_du_scale` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cpb_size_du_scale(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_cpb_size_du_scale.set(segment, 0L, index, value); } + /// Sets `cpb_size_du_scale` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cpb_size_du_scale(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_cpb_size_du_scale(segment, 0L, value); } + /// Sets `cpb_size_du_scale` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters cpb_size_du_scaleAt(long index, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_cpb_size_du_scale(this.segment(), index, value); return this; } + /// Sets `cpb_size_du_scale` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters cpb_size_du_scale(@CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_cpb_size_du_scale(this.segment(), value); return this; } + + /// {@return `initial_cpb_removal_delay_length_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_initial_cpb_removal_delay_length_minus1(MemorySegment segment, long index) { return (byte) VH_initial_cpb_removal_delay_length_minus1.get(segment, 0L, index); } + /// {@return `initial_cpb_removal_delay_length_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_initial_cpb_removal_delay_length_minus1(MemorySegment segment) { return StdVideoH265HrdParameters.get_initial_cpb_removal_delay_length_minus1(segment, 0L); } + /// {@return `initial_cpb_removal_delay_length_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte initial_cpb_removal_delay_length_minus1At(long index) { return StdVideoH265HrdParameters.get_initial_cpb_removal_delay_length_minus1(this.segment(), index); } + /// {@return `initial_cpb_removal_delay_length_minus1`} + public @CType("uint8_t") byte initial_cpb_removal_delay_length_minus1() { return StdVideoH265HrdParameters.get_initial_cpb_removal_delay_length_minus1(this.segment()); } + /// Sets `initial_cpb_removal_delay_length_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_initial_cpb_removal_delay_length_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_initial_cpb_removal_delay_length_minus1.set(segment, 0L, index, value); } + /// Sets `initial_cpb_removal_delay_length_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_initial_cpb_removal_delay_length_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_initial_cpb_removal_delay_length_minus1(segment, 0L, value); } + /// Sets `initial_cpb_removal_delay_length_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters initial_cpb_removal_delay_length_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_initial_cpb_removal_delay_length_minus1(this.segment(), index, value); return this; } + /// Sets `initial_cpb_removal_delay_length_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters initial_cpb_removal_delay_length_minus1(@CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_initial_cpb_removal_delay_length_minus1(this.segment(), value); return this; } + + /// {@return `au_cpb_removal_delay_length_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_au_cpb_removal_delay_length_minus1(MemorySegment segment, long index) { return (byte) VH_au_cpb_removal_delay_length_minus1.get(segment, 0L, index); } + /// {@return `au_cpb_removal_delay_length_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_au_cpb_removal_delay_length_minus1(MemorySegment segment) { return StdVideoH265HrdParameters.get_au_cpb_removal_delay_length_minus1(segment, 0L); } + /// {@return `au_cpb_removal_delay_length_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte au_cpb_removal_delay_length_minus1At(long index) { return StdVideoH265HrdParameters.get_au_cpb_removal_delay_length_minus1(this.segment(), index); } + /// {@return `au_cpb_removal_delay_length_minus1`} + public @CType("uint8_t") byte au_cpb_removal_delay_length_minus1() { return StdVideoH265HrdParameters.get_au_cpb_removal_delay_length_minus1(this.segment()); } + /// Sets `au_cpb_removal_delay_length_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_au_cpb_removal_delay_length_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_au_cpb_removal_delay_length_minus1.set(segment, 0L, index, value); } + /// Sets `au_cpb_removal_delay_length_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_au_cpb_removal_delay_length_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_au_cpb_removal_delay_length_minus1(segment, 0L, value); } + /// Sets `au_cpb_removal_delay_length_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters au_cpb_removal_delay_length_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_au_cpb_removal_delay_length_minus1(this.segment(), index, value); return this; } + /// Sets `au_cpb_removal_delay_length_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters au_cpb_removal_delay_length_minus1(@CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_au_cpb_removal_delay_length_minus1(this.segment(), value); return this; } + + /// {@return `dpb_output_delay_length_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_dpb_output_delay_length_minus1(MemorySegment segment, long index) { return (byte) VH_dpb_output_delay_length_minus1.get(segment, 0L, index); } + /// {@return `dpb_output_delay_length_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_dpb_output_delay_length_minus1(MemorySegment segment) { return StdVideoH265HrdParameters.get_dpb_output_delay_length_minus1(segment, 0L); } + /// {@return `dpb_output_delay_length_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte dpb_output_delay_length_minus1At(long index) { return StdVideoH265HrdParameters.get_dpb_output_delay_length_minus1(this.segment(), index); } + /// {@return `dpb_output_delay_length_minus1`} + public @CType("uint8_t") byte dpb_output_delay_length_minus1() { return StdVideoH265HrdParameters.get_dpb_output_delay_length_minus1(this.segment()); } + /// Sets `dpb_output_delay_length_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dpb_output_delay_length_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_dpb_output_delay_length_minus1.set(segment, 0L, index, value); } + /// Sets `dpb_output_delay_length_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dpb_output_delay_length_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_dpb_output_delay_length_minus1(segment, 0L, value); } + /// Sets `dpb_output_delay_length_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters dpb_output_delay_length_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_dpb_output_delay_length_minus1(this.segment(), index, value); return this; } + /// Sets `dpb_output_delay_length_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters dpb_output_delay_length_minus1(@CType("uint8_t") byte value) { StdVideoH265HrdParameters.set_dpb_output_delay_length_minus1(this.segment(), value); return this; } + + /// {@return `cpb_cnt_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_cpb_cnt_minus1(MemorySegment segment, long index) { return (byte) VH_cpb_cnt_minus1.get(segment, 0L, index); } + /// {@return `cpb_cnt_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_cpb_cnt_minus1(MemorySegment segment) { return StdVideoH265HrdParameters.get_cpb_cnt_minus1(segment, 0L); } + /// {@return `cpb_cnt_minus1` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte cpb_cnt_minus1At(long index) { return StdVideoH265HrdParameters.get_cpb_cnt_minus1(this.segment(), index); } + /// {@return `cpb_cnt_minus1`} + public @CType("uint8_t [ ]") byte cpb_cnt_minus1() { return StdVideoH265HrdParameters.get_cpb_cnt_minus1(this.segment()); } + /// Sets `cpb_cnt_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cpb_cnt_minus1(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_cpb_cnt_minus1.set(segment, 0L, index, value); } + /// Sets `cpb_cnt_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cpb_cnt_minus1(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoH265HrdParameters.set_cpb_cnt_minus1(segment, 0L, value); } + /// Sets `cpb_cnt_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters cpb_cnt_minus1At(long index, @CType("uint8_t [ ]") byte value) { StdVideoH265HrdParameters.set_cpb_cnt_minus1(this.segment(), index, value); return this; } + /// Sets `cpb_cnt_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters cpb_cnt_minus1(@CType("uint8_t [ ]") byte value) { StdVideoH265HrdParameters.set_cpb_cnt_minus1(this.segment(), value); return this; } + + /// {@return `elemental_duration_in_tc_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t [ ]") short get_elemental_duration_in_tc_minus1(MemorySegment segment, long index) { return (short) VH_elemental_duration_in_tc_minus1.get(segment, 0L, index); } + /// {@return `elemental_duration_in_tc_minus1`} + /// @param segment the segment of the struct + public static @CType("uint16_t [ ]") short get_elemental_duration_in_tc_minus1(MemorySegment segment) { return StdVideoH265HrdParameters.get_elemental_duration_in_tc_minus1(segment, 0L); } + /// {@return `elemental_duration_in_tc_minus1` at the given index} + /// @param index the index + public @CType("uint16_t [ ]") short elemental_duration_in_tc_minus1At(long index) { return StdVideoH265HrdParameters.get_elemental_duration_in_tc_minus1(this.segment(), index); } + /// {@return `elemental_duration_in_tc_minus1`} + public @CType("uint16_t [ ]") short elemental_duration_in_tc_minus1() { return StdVideoH265HrdParameters.get_elemental_duration_in_tc_minus1(this.segment()); } + /// Sets `elemental_duration_in_tc_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_elemental_duration_in_tc_minus1(MemorySegment segment, long index, @CType("uint16_t [ ]") short value) { VH_elemental_duration_in_tc_minus1.set(segment, 0L, index, value); } + /// Sets `elemental_duration_in_tc_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_elemental_duration_in_tc_minus1(MemorySegment segment, @CType("uint16_t [ ]") short value) { StdVideoH265HrdParameters.set_elemental_duration_in_tc_minus1(segment, 0L, value); } + /// Sets `elemental_duration_in_tc_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters elemental_duration_in_tc_minus1At(long index, @CType("uint16_t [ ]") short value) { StdVideoH265HrdParameters.set_elemental_duration_in_tc_minus1(this.segment(), index, value); return this; } + /// Sets `elemental_duration_in_tc_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters elemental_duration_in_tc_minus1(@CType("uint16_t [ ]") short value) { StdVideoH265HrdParameters.set_elemental_duration_in_tc_minus1(this.segment(), value); return this; } + + /// {@return `reserved` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t [3]") short get_reserved(MemorySegment segment, long index) { return (short) VH_reserved.get(segment, 0L, index); } + /// {@return `reserved`} + /// @param segment the segment of the struct + public static @CType("uint16_t [3]") short get_reserved(MemorySegment segment) { return StdVideoH265HrdParameters.get_reserved(segment, 0L); } + /// {@return `reserved` at the given index} + /// @param index the index + public @CType("uint16_t [3]") short reservedAt(long index) { return StdVideoH265HrdParameters.get_reserved(this.segment(), index); } + /// {@return `reserved`} + public @CType("uint16_t [3]") short reserved() { return StdVideoH265HrdParameters.get_reserved(this.segment()); } + /// Sets `reserved` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved(MemorySegment segment, long index, @CType("uint16_t [3]") short value) { VH_reserved.set(segment, 0L, index, value); } + /// Sets `reserved` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved(MemorySegment segment, @CType("uint16_t [3]") short value) { StdVideoH265HrdParameters.set_reserved(segment, 0L, value); } + /// Sets `reserved` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters reservedAt(long index, @CType("uint16_t [3]") short value) { StdVideoH265HrdParameters.set_reserved(this.segment(), index, value); return this; } + /// Sets `reserved` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters reserved(@CType("uint16_t [3]") short value) { StdVideoH265HrdParameters.set_reserved(this.segment(), value); return this; } + + /// {@return `pSubLayerHrdParametersNal` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment get_pSubLayerHrdParametersNal(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSubLayerHrdParametersNal.get(segment, 0L, index); } + /// {@return `pSubLayerHrdParametersNal`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment get_pSubLayerHrdParametersNal(MemorySegment segment) { return StdVideoH265HrdParameters.get_pSubLayerHrdParametersNal(segment, 0L); } + /// {@return `pSubLayerHrdParametersNal` at the given index} + /// @param index the index + public @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment pSubLayerHrdParametersNalAt(long index) { return StdVideoH265HrdParameters.get_pSubLayerHrdParametersNal(this.segment(), index); } + /// {@return `pSubLayerHrdParametersNal`} + public @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment pSubLayerHrdParametersNal() { return StdVideoH265HrdParameters.get_pSubLayerHrdParametersNal(this.segment()); } + /// Sets `pSubLayerHrdParametersNal` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSubLayerHrdParametersNal(MemorySegment segment, long index, @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment value) { VH_pSubLayerHrdParametersNal.set(segment, 0L, index, value); } + /// Sets `pSubLayerHrdParametersNal` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSubLayerHrdParametersNal(MemorySegment segment, @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265HrdParameters.set_pSubLayerHrdParametersNal(segment, 0L, value); } + /// Sets `pSubLayerHrdParametersNal` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters pSubLayerHrdParametersNalAt(long index, @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265HrdParameters.set_pSubLayerHrdParametersNal(this.segment(), index, value); return this; } + /// Sets `pSubLayerHrdParametersNal` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters pSubLayerHrdParametersNal(@CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265HrdParameters.set_pSubLayerHrdParametersNal(this.segment(), value); return this; } + + /// {@return `pSubLayerHrdParametersVcl` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment get_pSubLayerHrdParametersVcl(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSubLayerHrdParametersVcl.get(segment, 0L, index); } + /// {@return `pSubLayerHrdParametersVcl`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment get_pSubLayerHrdParametersVcl(MemorySegment segment) { return StdVideoH265HrdParameters.get_pSubLayerHrdParametersVcl(segment, 0L); } + /// {@return `pSubLayerHrdParametersVcl` at the given index} + /// @param index the index + public @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment pSubLayerHrdParametersVclAt(long index) { return StdVideoH265HrdParameters.get_pSubLayerHrdParametersVcl(this.segment(), index); } + /// {@return `pSubLayerHrdParametersVcl`} + public @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment pSubLayerHrdParametersVcl() { return StdVideoH265HrdParameters.get_pSubLayerHrdParametersVcl(this.segment()); } + /// Sets `pSubLayerHrdParametersVcl` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSubLayerHrdParametersVcl(MemorySegment segment, long index, @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment value) { VH_pSubLayerHrdParametersVcl.set(segment, 0L, index, value); } + /// Sets `pSubLayerHrdParametersVcl` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSubLayerHrdParametersVcl(MemorySegment segment, @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265HrdParameters.set_pSubLayerHrdParametersVcl(segment, 0L, value); } + /// Sets `pSubLayerHrdParametersVcl` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters pSubLayerHrdParametersVclAt(long index, @CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265HrdParameters.set_pSubLayerHrdParametersVcl(this.segment(), index, value); return this; } + /// Sets `pSubLayerHrdParametersVcl` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265HrdParameters pSubLayerHrdParametersVcl(@CType("const StdVideoH265SubLayerHrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265HrdParameters.set_pSubLayerHrdParametersVcl(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265LongTermRefPicsSps.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265LongTermRefPicsSps.java new file mode 100644 index 00000000..d7e216fe --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265LongTermRefPicsSps.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### used_by_curr_pic_lt_sps_flag +/// [VarHandle][#VH_used_by_curr_pic_lt_sps_flag] - [Getter][#used_by_curr_pic_lt_sps_flag()] - [Setter][#used_by_curr_pic_lt_sps_flag(int)] +/// ### lt_ref_pic_poc_lsb_sps +/// [VarHandle][#VH_lt_ref_pic_poc_lsb_sps] - [Getter][#lt_ref_pic_poc_lsb_sps()] - [Setter][#lt_ref_pic_poc_lsb_sps(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265LongTermRefPicsSps { +/// uint32_t used_by_curr_pic_lt_sps_flag; +/// uint32_t [ ] lt_ref_pic_poc_lsb_sps; +/// } StdVideoH265LongTermRefPicsSps; +/// ``` +public final class StdVideoH265LongTermRefPicsSps extends Struct { + /// The struct layout of `StdVideoH265LongTermRefPicsSps`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("used_by_curr_pic_lt_sps_flag"), + ValueLayout.JAVA_INT.withName("lt_ref_pic_poc_lsb_sps") + ); + /// The [VarHandle] of `used_by_curr_pic_lt_sps_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_used_by_curr_pic_lt_sps_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("used_by_curr_pic_lt_sps_flag")); + /// The [VarHandle] of `lt_ref_pic_poc_lsb_sps` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_lt_ref_pic_poc_lsb_sps = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lt_ref_pic_poc_lsb_sps")); + + /// Creates `StdVideoH265LongTermRefPicsSps` with the given segment. + /// @param segment the memory segment + public StdVideoH265LongTermRefPicsSps(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265LongTermRefPicsSps` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265LongTermRefPicsSps of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265LongTermRefPicsSps(segment); } + + /// Creates `StdVideoH265LongTermRefPicsSps` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265LongTermRefPicsSps ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265LongTermRefPicsSps(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265LongTermRefPicsSps` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265LongTermRefPicsSps ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265LongTermRefPicsSps(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265LongTermRefPicsSps` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265LongTermRefPicsSps` + public static StdVideoH265LongTermRefPicsSps alloc(SegmentAllocator allocator) { return new StdVideoH265LongTermRefPicsSps(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265LongTermRefPicsSps` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265LongTermRefPicsSps` + public static StdVideoH265LongTermRefPicsSps alloc(SegmentAllocator allocator, long count) { return new StdVideoH265LongTermRefPicsSps(allocator.allocate(LAYOUT, count)); } + + /// {@return `used_by_curr_pic_lt_sps_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_used_by_curr_pic_lt_sps_flag(MemorySegment segment, long index) { return (int) VH_used_by_curr_pic_lt_sps_flag.get(segment, 0L, index); } + /// {@return `used_by_curr_pic_lt_sps_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_used_by_curr_pic_lt_sps_flag(MemorySegment segment) { return StdVideoH265LongTermRefPicsSps.get_used_by_curr_pic_lt_sps_flag(segment, 0L); } + /// {@return `used_by_curr_pic_lt_sps_flag` at the given index} + /// @param index the index + public @CType("uint32_t") int used_by_curr_pic_lt_sps_flagAt(long index) { return StdVideoH265LongTermRefPicsSps.get_used_by_curr_pic_lt_sps_flag(this.segment(), index); } + /// {@return `used_by_curr_pic_lt_sps_flag`} + public @CType("uint32_t") int used_by_curr_pic_lt_sps_flag() { return StdVideoH265LongTermRefPicsSps.get_used_by_curr_pic_lt_sps_flag(this.segment()); } + /// Sets `used_by_curr_pic_lt_sps_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_used_by_curr_pic_lt_sps_flag(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_used_by_curr_pic_lt_sps_flag.set(segment, 0L, index, value); } + /// Sets `used_by_curr_pic_lt_sps_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_used_by_curr_pic_lt_sps_flag(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265LongTermRefPicsSps.set_used_by_curr_pic_lt_sps_flag(segment, 0L, value); } + /// Sets `used_by_curr_pic_lt_sps_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265LongTermRefPicsSps used_by_curr_pic_lt_sps_flagAt(long index, @CType("uint32_t") int value) { StdVideoH265LongTermRefPicsSps.set_used_by_curr_pic_lt_sps_flag(this.segment(), index, value); return this; } + /// Sets `used_by_curr_pic_lt_sps_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265LongTermRefPicsSps used_by_curr_pic_lt_sps_flag(@CType("uint32_t") int value) { StdVideoH265LongTermRefPicsSps.set_used_by_curr_pic_lt_sps_flag(this.segment(), value); return this; } + + /// {@return `lt_ref_pic_poc_lsb_sps` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t [ ]") int get_lt_ref_pic_poc_lsb_sps(MemorySegment segment, long index) { return (int) VH_lt_ref_pic_poc_lsb_sps.get(segment, 0L, index); } + /// {@return `lt_ref_pic_poc_lsb_sps`} + /// @param segment the segment of the struct + public static @CType("uint32_t [ ]") int get_lt_ref_pic_poc_lsb_sps(MemorySegment segment) { return StdVideoH265LongTermRefPicsSps.get_lt_ref_pic_poc_lsb_sps(segment, 0L); } + /// {@return `lt_ref_pic_poc_lsb_sps` at the given index} + /// @param index the index + public @CType("uint32_t [ ]") int lt_ref_pic_poc_lsb_spsAt(long index) { return StdVideoH265LongTermRefPicsSps.get_lt_ref_pic_poc_lsb_sps(this.segment(), index); } + /// {@return `lt_ref_pic_poc_lsb_sps`} + public @CType("uint32_t [ ]") int lt_ref_pic_poc_lsb_sps() { return StdVideoH265LongTermRefPicsSps.get_lt_ref_pic_poc_lsb_sps(this.segment()); } + /// Sets `lt_ref_pic_poc_lsb_sps` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lt_ref_pic_poc_lsb_sps(MemorySegment segment, long index, @CType("uint32_t [ ]") int value) { VH_lt_ref_pic_poc_lsb_sps.set(segment, 0L, index, value); } + /// Sets `lt_ref_pic_poc_lsb_sps` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lt_ref_pic_poc_lsb_sps(MemorySegment segment, @CType("uint32_t [ ]") int value) { StdVideoH265LongTermRefPicsSps.set_lt_ref_pic_poc_lsb_sps(segment, 0L, value); } + /// Sets `lt_ref_pic_poc_lsb_sps` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265LongTermRefPicsSps lt_ref_pic_poc_lsb_spsAt(long index, @CType("uint32_t [ ]") int value) { StdVideoH265LongTermRefPicsSps.set_lt_ref_pic_poc_lsb_sps(this.segment(), index, value); return this; } + /// Sets `lt_ref_pic_poc_lsb_sps` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265LongTermRefPicsSps lt_ref_pic_poc_lsb_sps(@CType("uint32_t [ ]") int value) { StdVideoH265LongTermRefPicsSps.set_lt_ref_pic_poc_lsb_sps(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265PictureParameterSet.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265PictureParameterSet.java new file mode 100644 index 00000000..7fe1f1c8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265PictureParameterSet.java @@ -0,0 +1,1406 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### pps_pic_parameter_set_id +/// [VarHandle][#VH_pps_pic_parameter_set_id] - [Getter][#pps_pic_parameter_set_id()] - [Setter][#pps_pic_parameter_set_id(byte)] +/// ### pps_seq_parameter_set_id +/// [VarHandle][#VH_pps_seq_parameter_set_id] - [Getter][#pps_seq_parameter_set_id()] - [Setter][#pps_seq_parameter_set_id(byte)] +/// ### sps_video_parameter_set_id +/// [VarHandle][#VH_sps_video_parameter_set_id] - [Getter][#sps_video_parameter_set_id()] - [Setter][#sps_video_parameter_set_id(byte)] +/// ### num_extra_slice_header_bits +/// [VarHandle][#VH_num_extra_slice_header_bits] - [Getter][#num_extra_slice_header_bits()] - [Setter][#num_extra_slice_header_bits(byte)] +/// ### num_ref_idx_l0_default_active_minus1 +/// [VarHandle][#VH_num_ref_idx_l0_default_active_minus1] - [Getter][#num_ref_idx_l0_default_active_minus1()] - [Setter][#num_ref_idx_l0_default_active_minus1(byte)] +/// ### num_ref_idx_l1_default_active_minus1 +/// [VarHandle][#VH_num_ref_idx_l1_default_active_minus1] - [Getter][#num_ref_idx_l1_default_active_minus1()] - [Setter][#num_ref_idx_l1_default_active_minus1(byte)] +/// ### init_qp_minus26 +/// [VarHandle][#VH_init_qp_minus26] - [Getter][#init_qp_minus26()] - [Setter][#init_qp_minus26(byte)] +/// ### diff_cu_qp_delta_depth +/// [VarHandle][#VH_diff_cu_qp_delta_depth] - [Getter][#diff_cu_qp_delta_depth()] - [Setter][#diff_cu_qp_delta_depth(byte)] +/// ### pps_cb_qp_offset +/// [VarHandle][#VH_pps_cb_qp_offset] - [Getter][#pps_cb_qp_offset()] - [Setter][#pps_cb_qp_offset(byte)] +/// ### pps_cr_qp_offset +/// [VarHandle][#VH_pps_cr_qp_offset] - [Getter][#pps_cr_qp_offset()] - [Setter][#pps_cr_qp_offset(byte)] +/// ### pps_beta_offset_div2 +/// [VarHandle][#VH_pps_beta_offset_div2] - [Getter][#pps_beta_offset_div2()] - [Setter][#pps_beta_offset_div2(byte)] +/// ### pps_tc_offset_div2 +/// [VarHandle][#VH_pps_tc_offset_div2] - [Getter][#pps_tc_offset_div2()] - [Setter][#pps_tc_offset_div2(byte)] +/// ### log2_parallel_merge_level_minus2 +/// [VarHandle][#VH_log2_parallel_merge_level_minus2] - [Getter][#log2_parallel_merge_level_minus2()] - [Setter][#log2_parallel_merge_level_minus2(byte)] +/// ### log2_max_transform_skip_block_size_minus2 +/// [VarHandle][#VH_log2_max_transform_skip_block_size_minus2] - [Getter][#log2_max_transform_skip_block_size_minus2()] - [Setter][#log2_max_transform_skip_block_size_minus2(byte)] +/// ### diff_cu_chroma_qp_offset_depth +/// [VarHandle][#VH_diff_cu_chroma_qp_offset_depth] - [Getter][#diff_cu_chroma_qp_offset_depth()] - [Setter][#diff_cu_chroma_qp_offset_depth(byte)] +/// ### chroma_qp_offset_list_len_minus1 +/// [VarHandle][#VH_chroma_qp_offset_list_len_minus1] - [Getter][#chroma_qp_offset_list_len_minus1()] - [Setter][#chroma_qp_offset_list_len_minus1(byte)] +/// ### cb_qp_offset_list +/// [VarHandle][#VH_cb_qp_offset_list] - [Getter][#cb_qp_offset_list()] - [Setter][#cb_qp_offset_list(byte)] +/// ### cr_qp_offset_list +/// [VarHandle][#VH_cr_qp_offset_list] - [Getter][#cr_qp_offset_list()] - [Setter][#cr_qp_offset_list(byte)] +/// ### log2_sao_offset_scale_luma +/// [VarHandle][#VH_log2_sao_offset_scale_luma] - [Getter][#log2_sao_offset_scale_luma()] - [Setter][#log2_sao_offset_scale_luma(byte)] +/// ### log2_sao_offset_scale_chroma +/// [VarHandle][#VH_log2_sao_offset_scale_chroma] - [Getter][#log2_sao_offset_scale_chroma()] - [Setter][#log2_sao_offset_scale_chroma(byte)] +/// ### pps_act_y_qp_offset_plus5 +/// [VarHandle][#VH_pps_act_y_qp_offset_plus5] - [Getter][#pps_act_y_qp_offset_plus5()] - [Setter][#pps_act_y_qp_offset_plus5(byte)] +/// ### pps_act_cb_qp_offset_plus5 +/// [VarHandle][#VH_pps_act_cb_qp_offset_plus5] - [Getter][#pps_act_cb_qp_offset_plus5()] - [Setter][#pps_act_cb_qp_offset_plus5(byte)] +/// ### pps_act_cr_qp_offset_plus3 +/// [VarHandle][#VH_pps_act_cr_qp_offset_plus3] - [Getter][#pps_act_cr_qp_offset_plus3()] - [Setter][#pps_act_cr_qp_offset_plus3(byte)] +/// ### pps_num_palette_predictor_initializers +/// [VarHandle][#VH_pps_num_palette_predictor_initializers] - [Getter][#pps_num_palette_predictor_initializers()] - [Setter][#pps_num_palette_predictor_initializers(byte)] +/// ### luma_bit_depth_entry_minus8 +/// [VarHandle][#VH_luma_bit_depth_entry_minus8] - [Getter][#luma_bit_depth_entry_minus8()] - [Setter][#luma_bit_depth_entry_minus8(byte)] +/// ### chroma_bit_depth_entry_minus8 +/// [VarHandle][#VH_chroma_bit_depth_entry_minus8] - [Getter][#chroma_bit_depth_entry_minus8()] - [Setter][#chroma_bit_depth_entry_minus8(byte)] +/// ### num_tile_columns_minus1 +/// [VarHandle][#VH_num_tile_columns_minus1] - [Getter][#num_tile_columns_minus1()] - [Setter][#num_tile_columns_minus1(byte)] +/// ### num_tile_rows_minus1 +/// [VarHandle][#VH_num_tile_rows_minus1] - [Getter][#num_tile_rows_minus1()] - [Setter][#num_tile_rows_minus1(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### reserved2 +/// [VarHandle][#VH_reserved2] - [Getter][#reserved2()] - [Setter][#reserved2(byte)] +/// ### column_width_minus1 +/// [VarHandle][#VH_column_width_minus1] - [Getter][#column_width_minus1()] - [Setter][#column_width_minus1(short)] +/// ### row_height_minus1 +/// [VarHandle][#VH_row_height_minus1] - [Getter][#row_height_minus1()] - [Setter][#row_height_minus1(short)] +/// ### reserved3 +/// [VarHandle][#VH_reserved3] - [Getter][#reserved3()] - [Setter][#reserved3(int)] +/// ### pScalingLists +/// [VarHandle][#VH_pScalingLists] - [Getter][#pScalingLists()] - [Setter][#pScalingLists(java.lang.foreign.MemorySegment)] +/// ### pPredictorPaletteEntries +/// [VarHandle][#VH_pPredictorPaletteEntries] - [Getter][#pPredictorPaletteEntries()] - [Setter][#pPredictorPaletteEntries(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265PictureParameterSet { +/// StdVideoH265PpsFlags flags; +/// uint8_t pps_pic_parameter_set_id; +/// uint8_t pps_seq_parameter_set_id; +/// uint8_t sps_video_parameter_set_id; +/// uint8_t num_extra_slice_header_bits; +/// uint8_t num_ref_idx_l0_default_active_minus1; +/// uint8_t num_ref_idx_l1_default_active_minus1; +/// int8_t init_qp_minus26; +/// uint8_t diff_cu_qp_delta_depth; +/// int8_t pps_cb_qp_offset; +/// int8_t pps_cr_qp_offset; +/// int8_t pps_beta_offset_div2; +/// int8_t pps_tc_offset_div2; +/// uint8_t log2_parallel_merge_level_minus2; +/// uint8_t log2_max_transform_skip_block_size_minus2; +/// uint8_t diff_cu_chroma_qp_offset_depth; +/// uint8_t chroma_qp_offset_list_len_minus1; +/// int8_t [ ] cb_qp_offset_list; +/// int8_t [ ] cr_qp_offset_list; +/// uint8_t log2_sao_offset_scale_luma; +/// uint8_t log2_sao_offset_scale_chroma; +/// int8_t pps_act_y_qp_offset_plus5; +/// int8_t pps_act_cb_qp_offset_plus5; +/// int8_t pps_act_cr_qp_offset_plus3; +/// uint8_t pps_num_palette_predictor_initializers; +/// uint8_t luma_bit_depth_entry_minus8; +/// uint8_t chroma_bit_depth_entry_minus8; +/// uint8_t num_tile_columns_minus1; +/// uint8_t num_tile_rows_minus1; +/// uint8_t reserved1; +/// uint8_t reserved2; +/// uint16_t [ ] column_width_minus1; +/// uint16_t [ ] row_height_minus1; +/// uint32_t reserved3; +/// const StdVideoH265ScalingLists * pScalingLists; +/// const StdVideoH265PredictorPaletteEntries * pPredictorPaletteEntries; +/// } StdVideoH265PictureParameterSet; +/// ``` +public final class StdVideoH265PictureParameterSet extends Struct { + /// The struct layout of `StdVideoH265PictureParameterSet`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoH265PpsFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("pps_pic_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("pps_seq_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("sps_video_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("num_extra_slice_header_bits"), + ValueLayout.JAVA_BYTE.withName("num_ref_idx_l0_default_active_minus1"), + ValueLayout.JAVA_BYTE.withName("num_ref_idx_l1_default_active_minus1"), + ValueLayout.JAVA_BYTE.withName("init_qp_minus26"), + ValueLayout.JAVA_BYTE.withName("diff_cu_qp_delta_depth"), + ValueLayout.JAVA_BYTE.withName("pps_cb_qp_offset"), + ValueLayout.JAVA_BYTE.withName("pps_cr_qp_offset"), + ValueLayout.JAVA_BYTE.withName("pps_beta_offset_div2"), + ValueLayout.JAVA_BYTE.withName("pps_tc_offset_div2"), + ValueLayout.JAVA_BYTE.withName("log2_parallel_merge_level_minus2"), + ValueLayout.JAVA_BYTE.withName("log2_max_transform_skip_block_size_minus2"), + ValueLayout.JAVA_BYTE.withName("diff_cu_chroma_qp_offset_depth"), + ValueLayout.JAVA_BYTE.withName("chroma_qp_offset_list_len_minus1"), + ValueLayout.JAVA_BYTE.withName("cb_qp_offset_list"), + ValueLayout.JAVA_BYTE.withName("cr_qp_offset_list"), + ValueLayout.JAVA_BYTE.withName("log2_sao_offset_scale_luma"), + ValueLayout.JAVA_BYTE.withName("log2_sao_offset_scale_chroma"), + ValueLayout.JAVA_BYTE.withName("pps_act_y_qp_offset_plus5"), + ValueLayout.JAVA_BYTE.withName("pps_act_cb_qp_offset_plus5"), + ValueLayout.JAVA_BYTE.withName("pps_act_cr_qp_offset_plus3"), + ValueLayout.JAVA_BYTE.withName("pps_num_palette_predictor_initializers"), + ValueLayout.JAVA_BYTE.withName("luma_bit_depth_entry_minus8"), + ValueLayout.JAVA_BYTE.withName("chroma_bit_depth_entry_minus8"), + ValueLayout.JAVA_BYTE.withName("num_tile_columns_minus1"), + ValueLayout.JAVA_BYTE.withName("num_tile_rows_minus1"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_BYTE.withName("reserved2"), + ValueLayout.JAVA_SHORT.withName("column_width_minus1"), + ValueLayout.JAVA_SHORT.withName("row_height_minus1"), + ValueLayout.JAVA_INT.withName("reserved3"), + ValueLayout.ADDRESS.withName("pScalingLists"), + ValueLayout.ADDRESS.withName("pPredictorPaletteEntries") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `pps_pic_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_pic_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_pic_parameter_set_id")); + /// The [VarHandle] of `pps_seq_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_seq_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_seq_parameter_set_id")); + /// The [VarHandle] of `sps_video_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_sps_video_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_video_parameter_set_id")); + /// The [VarHandle] of `num_extra_slice_header_bits` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_extra_slice_header_bits = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_extra_slice_header_bits")); + /// The [VarHandle] of `num_ref_idx_l0_default_active_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_ref_idx_l0_default_active_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_idx_l0_default_active_minus1")); + /// The [VarHandle] of `num_ref_idx_l1_default_active_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_ref_idx_l1_default_active_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_ref_idx_l1_default_active_minus1")); + /// The [VarHandle] of `init_qp_minus26` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_init_qp_minus26 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("init_qp_minus26")); + /// The [VarHandle] of `diff_cu_qp_delta_depth` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_diff_cu_qp_delta_depth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("diff_cu_qp_delta_depth")); + /// The [VarHandle] of `pps_cb_qp_offset` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_cb_qp_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_cb_qp_offset")); + /// The [VarHandle] of `pps_cr_qp_offset` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_cr_qp_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_cr_qp_offset")); + /// The [VarHandle] of `pps_beta_offset_div2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_beta_offset_div2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_beta_offset_div2")); + /// The [VarHandle] of `pps_tc_offset_div2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_tc_offset_div2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_tc_offset_div2")); + /// The [VarHandle] of `log2_parallel_merge_level_minus2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_parallel_merge_level_minus2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_parallel_merge_level_minus2")); + /// The [VarHandle] of `log2_max_transform_skip_block_size_minus2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_max_transform_skip_block_size_minus2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_max_transform_skip_block_size_minus2")); + /// The [VarHandle] of `diff_cu_chroma_qp_offset_depth` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_diff_cu_chroma_qp_offset_depth = LAYOUT.arrayElementVarHandle(PathElement.groupElement("diff_cu_chroma_qp_offset_depth")); + /// The [VarHandle] of `chroma_qp_offset_list_len_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_qp_offset_list_len_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_qp_offset_list_len_minus1")); + /// The [VarHandle] of `cb_qp_offset_list` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cb_qp_offset_list = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cb_qp_offset_list")); + /// The [VarHandle] of `cr_qp_offset_list` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_cr_qp_offset_list = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cr_qp_offset_list")); + /// The [VarHandle] of `log2_sao_offset_scale_luma` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_sao_offset_scale_luma = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_sao_offset_scale_luma")); + /// The [VarHandle] of `log2_sao_offset_scale_chroma` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_sao_offset_scale_chroma = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_sao_offset_scale_chroma")); + /// The [VarHandle] of `pps_act_y_qp_offset_plus5` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_act_y_qp_offset_plus5 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_act_y_qp_offset_plus5")); + /// The [VarHandle] of `pps_act_cb_qp_offset_plus5` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_act_cb_qp_offset_plus5 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_act_cb_qp_offset_plus5")); + /// The [VarHandle] of `pps_act_cr_qp_offset_plus3` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_act_cr_qp_offset_plus3 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_act_cr_qp_offset_plus3")); + /// The [VarHandle] of `pps_num_palette_predictor_initializers` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pps_num_palette_predictor_initializers = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_num_palette_predictor_initializers")); + /// The [VarHandle] of `luma_bit_depth_entry_minus8` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_luma_bit_depth_entry_minus8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("luma_bit_depth_entry_minus8")); + /// The [VarHandle] of `chroma_bit_depth_entry_minus8` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_bit_depth_entry_minus8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_bit_depth_entry_minus8")); + /// The [VarHandle] of `num_tile_columns_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_tile_columns_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_tile_columns_minus1")); + /// The [VarHandle] of `num_tile_rows_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_tile_rows_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_tile_rows_minus1")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `reserved2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved2")); + /// The [VarHandle] of `column_width_minus1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_column_width_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("column_width_minus1")); + /// The [VarHandle] of `row_height_minus1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_row_height_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("row_height_minus1")); + /// The [VarHandle] of `reserved3` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved3 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved3")); + /// The [VarHandle] of `pScalingLists` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pScalingLists = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pScalingLists")); + /// The [VarHandle] of `pPredictorPaletteEntries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPredictorPaletteEntries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPredictorPaletteEntries")); + + /// Creates `StdVideoH265PictureParameterSet` with the given segment. + /// @param segment the memory segment + public StdVideoH265PictureParameterSet(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265PictureParameterSet` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265PictureParameterSet of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265PictureParameterSet(segment); } + + /// Creates `StdVideoH265PictureParameterSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265PictureParameterSet ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265PictureParameterSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265PictureParameterSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265PictureParameterSet ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265PictureParameterSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265PictureParameterSet` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265PictureParameterSet` + public static StdVideoH265PictureParameterSet alloc(SegmentAllocator allocator) { return new StdVideoH265PictureParameterSet(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265PictureParameterSet` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265PictureParameterSet` + public static StdVideoH265PictureParameterSet alloc(SegmentAllocator allocator, long count) { return new StdVideoH265PictureParameterSet(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265PpsFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265PpsFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoH265PpsFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoH265PictureParameterSet.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoH265PpsFlags") java.lang.foreign.MemorySegment flags() { return StdVideoH265PictureParameterSet.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoH265PpsFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoH265PpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH265PictureParameterSet.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet flagsAt(long index, @CType("StdVideoH265PpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH265PictureParameterSet.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet flags(@CType("StdVideoH265PpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH265PictureParameterSet.set_flags(this.segment(), value); return this; } + + /// {@return `pps_pic_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pps_pic_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_pps_pic_parameter_set_id.get(segment, 0L, index); } + /// {@return `pps_pic_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pps_pic_parameter_set_id(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pps_pic_parameter_set_id(segment, 0L); } + /// {@return `pps_pic_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte pps_pic_parameter_set_idAt(long index) { return StdVideoH265PictureParameterSet.get_pps_pic_parameter_set_id(this.segment(), index); } + /// {@return `pps_pic_parameter_set_id`} + public @CType("uint8_t") byte pps_pic_parameter_set_id() { return StdVideoH265PictureParameterSet.get_pps_pic_parameter_set_id(this.segment()); } + /// Sets `pps_pic_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_pic_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pps_pic_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `pps_pic_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_pic_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_pic_parameter_set_id(segment, 0L, value); } + /// Sets `pps_pic_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_pic_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_pic_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `pps_pic_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_pic_parameter_set_id(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_pic_parameter_set_id(this.segment(), value); return this; } + + /// {@return `pps_seq_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pps_seq_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_pps_seq_parameter_set_id.get(segment, 0L, index); } + /// {@return `pps_seq_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pps_seq_parameter_set_id(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pps_seq_parameter_set_id(segment, 0L); } + /// {@return `pps_seq_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte pps_seq_parameter_set_idAt(long index) { return StdVideoH265PictureParameterSet.get_pps_seq_parameter_set_id(this.segment(), index); } + /// {@return `pps_seq_parameter_set_id`} + public @CType("uint8_t") byte pps_seq_parameter_set_id() { return StdVideoH265PictureParameterSet.get_pps_seq_parameter_set_id(this.segment()); } + /// Sets `pps_seq_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_seq_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pps_seq_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `pps_seq_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_seq_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_seq_parameter_set_id(segment, 0L, value); } + /// Sets `pps_seq_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_seq_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_seq_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `pps_seq_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_seq_parameter_set_id(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_seq_parameter_set_id(this.segment(), value); return this; } + + /// {@return `sps_video_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_sps_video_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_sps_video_parameter_set_id.get(segment, 0L, index); } + /// {@return `sps_video_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_sps_video_parameter_set_id(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_sps_video_parameter_set_id(segment, 0L); } + /// {@return `sps_video_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte sps_video_parameter_set_idAt(long index) { return StdVideoH265PictureParameterSet.get_sps_video_parameter_set_id(this.segment(), index); } + /// {@return `sps_video_parameter_set_id`} + public @CType("uint8_t") byte sps_video_parameter_set_id() { return StdVideoH265PictureParameterSet.get_sps_video_parameter_set_id(this.segment()); } + /// Sets `sps_video_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_video_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_sps_video_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `sps_video_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_video_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_sps_video_parameter_set_id(segment, 0L, value); } + /// Sets `sps_video_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet sps_video_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_sps_video_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `sps_video_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet sps_video_parameter_set_id(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_sps_video_parameter_set_id(this.segment(), value); return this; } + + /// {@return `num_extra_slice_header_bits` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_extra_slice_header_bits(MemorySegment segment, long index) { return (byte) VH_num_extra_slice_header_bits.get(segment, 0L, index); } + /// {@return `num_extra_slice_header_bits`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_extra_slice_header_bits(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_num_extra_slice_header_bits(segment, 0L); } + /// {@return `num_extra_slice_header_bits` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_extra_slice_header_bitsAt(long index) { return StdVideoH265PictureParameterSet.get_num_extra_slice_header_bits(this.segment(), index); } + /// {@return `num_extra_slice_header_bits`} + public @CType("uint8_t") byte num_extra_slice_header_bits() { return StdVideoH265PictureParameterSet.get_num_extra_slice_header_bits(this.segment()); } + /// Sets `num_extra_slice_header_bits` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_extra_slice_header_bits(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_extra_slice_header_bits.set(segment, 0L, index, value); } + /// Sets `num_extra_slice_header_bits` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_extra_slice_header_bits(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_extra_slice_header_bits(segment, 0L, value); } + /// Sets `num_extra_slice_header_bits` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet num_extra_slice_header_bitsAt(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_extra_slice_header_bits(this.segment(), index, value); return this; } + /// Sets `num_extra_slice_header_bits` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet num_extra_slice_header_bits(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_extra_slice_header_bits(this.segment(), value); return this; } + + /// {@return `num_ref_idx_l0_default_active_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_ref_idx_l0_default_active_minus1(MemorySegment segment, long index) { return (byte) VH_num_ref_idx_l0_default_active_minus1.get(segment, 0L, index); } + /// {@return `num_ref_idx_l0_default_active_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_ref_idx_l0_default_active_minus1(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_num_ref_idx_l0_default_active_minus1(segment, 0L); } + /// {@return `num_ref_idx_l0_default_active_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_ref_idx_l0_default_active_minus1At(long index) { return StdVideoH265PictureParameterSet.get_num_ref_idx_l0_default_active_minus1(this.segment(), index); } + /// {@return `num_ref_idx_l0_default_active_minus1`} + public @CType("uint8_t") byte num_ref_idx_l0_default_active_minus1() { return StdVideoH265PictureParameterSet.get_num_ref_idx_l0_default_active_minus1(this.segment()); } + /// Sets `num_ref_idx_l0_default_active_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_idx_l0_default_active_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_ref_idx_l0_default_active_minus1.set(segment, 0L, index, value); } + /// Sets `num_ref_idx_l0_default_active_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_idx_l0_default_active_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_ref_idx_l0_default_active_minus1(segment, 0L, value); } + /// Sets `num_ref_idx_l0_default_active_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet num_ref_idx_l0_default_active_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_ref_idx_l0_default_active_minus1(this.segment(), index, value); return this; } + /// Sets `num_ref_idx_l0_default_active_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet num_ref_idx_l0_default_active_minus1(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_ref_idx_l0_default_active_minus1(this.segment(), value); return this; } + + /// {@return `num_ref_idx_l1_default_active_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_ref_idx_l1_default_active_minus1(MemorySegment segment, long index) { return (byte) VH_num_ref_idx_l1_default_active_minus1.get(segment, 0L, index); } + /// {@return `num_ref_idx_l1_default_active_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_ref_idx_l1_default_active_minus1(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_num_ref_idx_l1_default_active_minus1(segment, 0L); } + /// {@return `num_ref_idx_l1_default_active_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_ref_idx_l1_default_active_minus1At(long index) { return StdVideoH265PictureParameterSet.get_num_ref_idx_l1_default_active_minus1(this.segment(), index); } + /// {@return `num_ref_idx_l1_default_active_minus1`} + public @CType("uint8_t") byte num_ref_idx_l1_default_active_minus1() { return StdVideoH265PictureParameterSet.get_num_ref_idx_l1_default_active_minus1(this.segment()); } + /// Sets `num_ref_idx_l1_default_active_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_ref_idx_l1_default_active_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_ref_idx_l1_default_active_minus1.set(segment, 0L, index, value); } + /// Sets `num_ref_idx_l1_default_active_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_ref_idx_l1_default_active_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_ref_idx_l1_default_active_minus1(segment, 0L, value); } + /// Sets `num_ref_idx_l1_default_active_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet num_ref_idx_l1_default_active_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_ref_idx_l1_default_active_minus1(this.segment(), index, value); return this; } + /// Sets `num_ref_idx_l1_default_active_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet num_ref_idx_l1_default_active_minus1(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_ref_idx_l1_default_active_minus1(this.segment(), value); return this; } + + /// {@return `init_qp_minus26` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_init_qp_minus26(MemorySegment segment, long index) { return (byte) VH_init_qp_minus26.get(segment, 0L, index); } + /// {@return `init_qp_minus26`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_init_qp_minus26(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_init_qp_minus26(segment, 0L); } + /// {@return `init_qp_minus26` at the given index} + /// @param index the index + public @CType("int8_t") byte init_qp_minus26At(long index) { return StdVideoH265PictureParameterSet.get_init_qp_minus26(this.segment(), index); } + /// {@return `init_qp_minus26`} + public @CType("int8_t") byte init_qp_minus26() { return StdVideoH265PictureParameterSet.get_init_qp_minus26(this.segment()); } + /// Sets `init_qp_minus26` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_init_qp_minus26(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_init_qp_minus26.set(segment, 0L, index, value); } + /// Sets `init_qp_minus26` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_init_qp_minus26(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_init_qp_minus26(segment, 0L, value); } + /// Sets `init_qp_minus26` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet init_qp_minus26At(long index, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_init_qp_minus26(this.segment(), index, value); return this; } + /// Sets `init_qp_minus26` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet init_qp_minus26(@CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_init_qp_minus26(this.segment(), value); return this; } + + /// {@return `diff_cu_qp_delta_depth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_diff_cu_qp_delta_depth(MemorySegment segment, long index) { return (byte) VH_diff_cu_qp_delta_depth.get(segment, 0L, index); } + /// {@return `diff_cu_qp_delta_depth`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_diff_cu_qp_delta_depth(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_diff_cu_qp_delta_depth(segment, 0L); } + /// {@return `diff_cu_qp_delta_depth` at the given index} + /// @param index the index + public @CType("uint8_t") byte diff_cu_qp_delta_depthAt(long index) { return StdVideoH265PictureParameterSet.get_diff_cu_qp_delta_depth(this.segment(), index); } + /// {@return `diff_cu_qp_delta_depth`} + public @CType("uint8_t") byte diff_cu_qp_delta_depth() { return StdVideoH265PictureParameterSet.get_diff_cu_qp_delta_depth(this.segment()); } + /// Sets `diff_cu_qp_delta_depth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_diff_cu_qp_delta_depth(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_diff_cu_qp_delta_depth.set(segment, 0L, index, value); } + /// Sets `diff_cu_qp_delta_depth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_diff_cu_qp_delta_depth(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_diff_cu_qp_delta_depth(segment, 0L, value); } + /// Sets `diff_cu_qp_delta_depth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet diff_cu_qp_delta_depthAt(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_diff_cu_qp_delta_depth(this.segment(), index, value); return this; } + /// Sets `diff_cu_qp_delta_depth` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet diff_cu_qp_delta_depth(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_diff_cu_qp_delta_depth(this.segment(), value); return this; } + + /// {@return `pps_cb_qp_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_pps_cb_qp_offset(MemorySegment segment, long index) { return (byte) VH_pps_cb_qp_offset.get(segment, 0L, index); } + /// {@return `pps_cb_qp_offset`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_pps_cb_qp_offset(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pps_cb_qp_offset(segment, 0L); } + /// {@return `pps_cb_qp_offset` at the given index} + /// @param index the index + public @CType("int8_t") byte pps_cb_qp_offsetAt(long index) { return StdVideoH265PictureParameterSet.get_pps_cb_qp_offset(this.segment(), index); } + /// {@return `pps_cb_qp_offset`} + public @CType("int8_t") byte pps_cb_qp_offset() { return StdVideoH265PictureParameterSet.get_pps_cb_qp_offset(this.segment()); } + /// Sets `pps_cb_qp_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_cb_qp_offset(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_pps_cb_qp_offset.set(segment, 0L, index, value); } + /// Sets `pps_cb_qp_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_cb_qp_offset(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_cb_qp_offset(segment, 0L, value); } + /// Sets `pps_cb_qp_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_cb_qp_offsetAt(long index, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_cb_qp_offset(this.segment(), index, value); return this; } + /// Sets `pps_cb_qp_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_cb_qp_offset(@CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_cb_qp_offset(this.segment(), value); return this; } + + /// {@return `pps_cr_qp_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_pps_cr_qp_offset(MemorySegment segment, long index) { return (byte) VH_pps_cr_qp_offset.get(segment, 0L, index); } + /// {@return `pps_cr_qp_offset`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_pps_cr_qp_offset(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pps_cr_qp_offset(segment, 0L); } + /// {@return `pps_cr_qp_offset` at the given index} + /// @param index the index + public @CType("int8_t") byte pps_cr_qp_offsetAt(long index) { return StdVideoH265PictureParameterSet.get_pps_cr_qp_offset(this.segment(), index); } + /// {@return `pps_cr_qp_offset`} + public @CType("int8_t") byte pps_cr_qp_offset() { return StdVideoH265PictureParameterSet.get_pps_cr_qp_offset(this.segment()); } + /// Sets `pps_cr_qp_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_cr_qp_offset(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_pps_cr_qp_offset.set(segment, 0L, index, value); } + /// Sets `pps_cr_qp_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_cr_qp_offset(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_cr_qp_offset(segment, 0L, value); } + /// Sets `pps_cr_qp_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_cr_qp_offsetAt(long index, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_cr_qp_offset(this.segment(), index, value); return this; } + /// Sets `pps_cr_qp_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_cr_qp_offset(@CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_cr_qp_offset(this.segment(), value); return this; } + + /// {@return `pps_beta_offset_div2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_pps_beta_offset_div2(MemorySegment segment, long index) { return (byte) VH_pps_beta_offset_div2.get(segment, 0L, index); } + /// {@return `pps_beta_offset_div2`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_pps_beta_offset_div2(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pps_beta_offset_div2(segment, 0L); } + /// {@return `pps_beta_offset_div2` at the given index} + /// @param index the index + public @CType("int8_t") byte pps_beta_offset_div2At(long index) { return StdVideoH265PictureParameterSet.get_pps_beta_offset_div2(this.segment(), index); } + /// {@return `pps_beta_offset_div2`} + public @CType("int8_t") byte pps_beta_offset_div2() { return StdVideoH265PictureParameterSet.get_pps_beta_offset_div2(this.segment()); } + /// Sets `pps_beta_offset_div2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_beta_offset_div2(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_pps_beta_offset_div2.set(segment, 0L, index, value); } + /// Sets `pps_beta_offset_div2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_beta_offset_div2(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_beta_offset_div2(segment, 0L, value); } + /// Sets `pps_beta_offset_div2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_beta_offset_div2At(long index, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_beta_offset_div2(this.segment(), index, value); return this; } + /// Sets `pps_beta_offset_div2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_beta_offset_div2(@CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_beta_offset_div2(this.segment(), value); return this; } + + /// {@return `pps_tc_offset_div2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_pps_tc_offset_div2(MemorySegment segment, long index) { return (byte) VH_pps_tc_offset_div2.get(segment, 0L, index); } + /// {@return `pps_tc_offset_div2`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_pps_tc_offset_div2(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pps_tc_offset_div2(segment, 0L); } + /// {@return `pps_tc_offset_div2` at the given index} + /// @param index the index + public @CType("int8_t") byte pps_tc_offset_div2At(long index) { return StdVideoH265PictureParameterSet.get_pps_tc_offset_div2(this.segment(), index); } + /// {@return `pps_tc_offset_div2`} + public @CType("int8_t") byte pps_tc_offset_div2() { return StdVideoH265PictureParameterSet.get_pps_tc_offset_div2(this.segment()); } + /// Sets `pps_tc_offset_div2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_tc_offset_div2(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_pps_tc_offset_div2.set(segment, 0L, index, value); } + /// Sets `pps_tc_offset_div2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_tc_offset_div2(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_tc_offset_div2(segment, 0L, value); } + /// Sets `pps_tc_offset_div2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_tc_offset_div2At(long index, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_tc_offset_div2(this.segment(), index, value); return this; } + /// Sets `pps_tc_offset_div2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_tc_offset_div2(@CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_tc_offset_div2(this.segment(), value); return this; } + + /// {@return `log2_parallel_merge_level_minus2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_parallel_merge_level_minus2(MemorySegment segment, long index) { return (byte) VH_log2_parallel_merge_level_minus2.get(segment, 0L, index); } + /// {@return `log2_parallel_merge_level_minus2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_parallel_merge_level_minus2(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_log2_parallel_merge_level_minus2(segment, 0L); } + /// {@return `log2_parallel_merge_level_minus2` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_parallel_merge_level_minus2At(long index) { return StdVideoH265PictureParameterSet.get_log2_parallel_merge_level_minus2(this.segment(), index); } + /// {@return `log2_parallel_merge_level_minus2`} + public @CType("uint8_t") byte log2_parallel_merge_level_minus2() { return StdVideoH265PictureParameterSet.get_log2_parallel_merge_level_minus2(this.segment()); } + /// Sets `log2_parallel_merge_level_minus2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_parallel_merge_level_minus2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_parallel_merge_level_minus2.set(segment, 0L, index, value); } + /// Sets `log2_parallel_merge_level_minus2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_parallel_merge_level_minus2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_parallel_merge_level_minus2(segment, 0L, value); } + /// Sets `log2_parallel_merge_level_minus2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet log2_parallel_merge_level_minus2At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_parallel_merge_level_minus2(this.segment(), index, value); return this; } + /// Sets `log2_parallel_merge_level_minus2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet log2_parallel_merge_level_minus2(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_parallel_merge_level_minus2(this.segment(), value); return this; } + + /// {@return `log2_max_transform_skip_block_size_minus2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_max_transform_skip_block_size_minus2(MemorySegment segment, long index) { return (byte) VH_log2_max_transform_skip_block_size_minus2.get(segment, 0L, index); } + /// {@return `log2_max_transform_skip_block_size_minus2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_max_transform_skip_block_size_minus2(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_log2_max_transform_skip_block_size_minus2(segment, 0L); } + /// {@return `log2_max_transform_skip_block_size_minus2` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_max_transform_skip_block_size_minus2At(long index) { return StdVideoH265PictureParameterSet.get_log2_max_transform_skip_block_size_minus2(this.segment(), index); } + /// {@return `log2_max_transform_skip_block_size_minus2`} + public @CType("uint8_t") byte log2_max_transform_skip_block_size_minus2() { return StdVideoH265PictureParameterSet.get_log2_max_transform_skip_block_size_minus2(this.segment()); } + /// Sets `log2_max_transform_skip_block_size_minus2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_max_transform_skip_block_size_minus2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_max_transform_skip_block_size_minus2.set(segment, 0L, index, value); } + /// Sets `log2_max_transform_skip_block_size_minus2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_max_transform_skip_block_size_minus2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_max_transform_skip_block_size_minus2(segment, 0L, value); } + /// Sets `log2_max_transform_skip_block_size_minus2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet log2_max_transform_skip_block_size_minus2At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_max_transform_skip_block_size_minus2(this.segment(), index, value); return this; } + /// Sets `log2_max_transform_skip_block_size_minus2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet log2_max_transform_skip_block_size_minus2(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_max_transform_skip_block_size_minus2(this.segment(), value); return this; } + + /// {@return `diff_cu_chroma_qp_offset_depth` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_diff_cu_chroma_qp_offset_depth(MemorySegment segment, long index) { return (byte) VH_diff_cu_chroma_qp_offset_depth.get(segment, 0L, index); } + /// {@return `diff_cu_chroma_qp_offset_depth`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_diff_cu_chroma_qp_offset_depth(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_diff_cu_chroma_qp_offset_depth(segment, 0L); } + /// {@return `diff_cu_chroma_qp_offset_depth` at the given index} + /// @param index the index + public @CType("uint8_t") byte diff_cu_chroma_qp_offset_depthAt(long index) { return StdVideoH265PictureParameterSet.get_diff_cu_chroma_qp_offset_depth(this.segment(), index); } + /// {@return `diff_cu_chroma_qp_offset_depth`} + public @CType("uint8_t") byte diff_cu_chroma_qp_offset_depth() { return StdVideoH265PictureParameterSet.get_diff_cu_chroma_qp_offset_depth(this.segment()); } + /// Sets `diff_cu_chroma_qp_offset_depth` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_diff_cu_chroma_qp_offset_depth(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_diff_cu_chroma_qp_offset_depth.set(segment, 0L, index, value); } + /// Sets `diff_cu_chroma_qp_offset_depth` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_diff_cu_chroma_qp_offset_depth(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_diff_cu_chroma_qp_offset_depth(segment, 0L, value); } + /// Sets `diff_cu_chroma_qp_offset_depth` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet diff_cu_chroma_qp_offset_depthAt(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_diff_cu_chroma_qp_offset_depth(this.segment(), index, value); return this; } + /// Sets `diff_cu_chroma_qp_offset_depth` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet diff_cu_chroma_qp_offset_depth(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_diff_cu_chroma_qp_offset_depth(this.segment(), value); return this; } + + /// {@return `chroma_qp_offset_list_len_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_chroma_qp_offset_list_len_minus1(MemorySegment segment, long index) { return (byte) VH_chroma_qp_offset_list_len_minus1.get(segment, 0L, index); } + /// {@return `chroma_qp_offset_list_len_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_chroma_qp_offset_list_len_minus1(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_chroma_qp_offset_list_len_minus1(segment, 0L); } + /// {@return `chroma_qp_offset_list_len_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte chroma_qp_offset_list_len_minus1At(long index) { return StdVideoH265PictureParameterSet.get_chroma_qp_offset_list_len_minus1(this.segment(), index); } + /// {@return `chroma_qp_offset_list_len_minus1`} + public @CType("uint8_t") byte chroma_qp_offset_list_len_minus1() { return StdVideoH265PictureParameterSet.get_chroma_qp_offset_list_len_minus1(this.segment()); } + /// Sets `chroma_qp_offset_list_len_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_qp_offset_list_len_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_chroma_qp_offset_list_len_minus1.set(segment, 0L, index, value); } + /// Sets `chroma_qp_offset_list_len_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_qp_offset_list_len_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_chroma_qp_offset_list_len_minus1(segment, 0L, value); } + /// Sets `chroma_qp_offset_list_len_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet chroma_qp_offset_list_len_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_chroma_qp_offset_list_len_minus1(this.segment(), index, value); return this; } + /// Sets `chroma_qp_offset_list_len_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet chroma_qp_offset_list_len_minus1(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_chroma_qp_offset_list_len_minus1(this.segment(), value); return this; } + + /// {@return `cb_qp_offset_list` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_cb_qp_offset_list(MemorySegment segment, long index) { return (byte) VH_cb_qp_offset_list.get(segment, 0L, index); } + /// {@return `cb_qp_offset_list`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_cb_qp_offset_list(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_cb_qp_offset_list(segment, 0L); } + /// {@return `cb_qp_offset_list` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte cb_qp_offset_listAt(long index) { return StdVideoH265PictureParameterSet.get_cb_qp_offset_list(this.segment(), index); } + /// {@return `cb_qp_offset_list`} + public @CType("int8_t [ ]") byte cb_qp_offset_list() { return StdVideoH265PictureParameterSet.get_cb_qp_offset_list(this.segment()); } + /// Sets `cb_qp_offset_list` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cb_qp_offset_list(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_cb_qp_offset_list.set(segment, 0L, index, value); } + /// Sets `cb_qp_offset_list` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cb_qp_offset_list(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoH265PictureParameterSet.set_cb_qp_offset_list(segment, 0L, value); } + /// Sets `cb_qp_offset_list` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet cb_qp_offset_listAt(long index, @CType("int8_t [ ]") byte value) { StdVideoH265PictureParameterSet.set_cb_qp_offset_list(this.segment(), index, value); return this; } + /// Sets `cb_qp_offset_list` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet cb_qp_offset_list(@CType("int8_t [ ]") byte value) { StdVideoH265PictureParameterSet.set_cb_qp_offset_list(this.segment(), value); return this; } + + /// {@return `cr_qp_offset_list` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t [ ]") byte get_cr_qp_offset_list(MemorySegment segment, long index) { return (byte) VH_cr_qp_offset_list.get(segment, 0L, index); } + /// {@return `cr_qp_offset_list`} + /// @param segment the segment of the struct + public static @CType("int8_t [ ]") byte get_cr_qp_offset_list(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_cr_qp_offset_list(segment, 0L); } + /// {@return `cr_qp_offset_list` at the given index} + /// @param index the index + public @CType("int8_t [ ]") byte cr_qp_offset_listAt(long index) { return StdVideoH265PictureParameterSet.get_cr_qp_offset_list(this.segment(), index); } + /// {@return `cr_qp_offset_list`} + public @CType("int8_t [ ]") byte cr_qp_offset_list() { return StdVideoH265PictureParameterSet.get_cr_qp_offset_list(this.segment()); } + /// Sets `cr_qp_offset_list` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cr_qp_offset_list(MemorySegment segment, long index, @CType("int8_t [ ]") byte value) { VH_cr_qp_offset_list.set(segment, 0L, index, value); } + /// Sets `cr_qp_offset_list` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cr_qp_offset_list(MemorySegment segment, @CType("int8_t [ ]") byte value) { StdVideoH265PictureParameterSet.set_cr_qp_offset_list(segment, 0L, value); } + /// Sets `cr_qp_offset_list` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet cr_qp_offset_listAt(long index, @CType("int8_t [ ]") byte value) { StdVideoH265PictureParameterSet.set_cr_qp_offset_list(this.segment(), index, value); return this; } + /// Sets `cr_qp_offset_list` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet cr_qp_offset_list(@CType("int8_t [ ]") byte value) { StdVideoH265PictureParameterSet.set_cr_qp_offset_list(this.segment(), value); return this; } + + /// {@return `log2_sao_offset_scale_luma` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_sao_offset_scale_luma(MemorySegment segment, long index) { return (byte) VH_log2_sao_offset_scale_luma.get(segment, 0L, index); } + /// {@return `log2_sao_offset_scale_luma`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_sao_offset_scale_luma(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_log2_sao_offset_scale_luma(segment, 0L); } + /// {@return `log2_sao_offset_scale_luma` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_sao_offset_scale_lumaAt(long index) { return StdVideoH265PictureParameterSet.get_log2_sao_offset_scale_luma(this.segment(), index); } + /// {@return `log2_sao_offset_scale_luma`} + public @CType("uint8_t") byte log2_sao_offset_scale_luma() { return StdVideoH265PictureParameterSet.get_log2_sao_offset_scale_luma(this.segment()); } + /// Sets `log2_sao_offset_scale_luma` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_sao_offset_scale_luma(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_sao_offset_scale_luma.set(segment, 0L, index, value); } + /// Sets `log2_sao_offset_scale_luma` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_sao_offset_scale_luma(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_sao_offset_scale_luma(segment, 0L, value); } + /// Sets `log2_sao_offset_scale_luma` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet log2_sao_offset_scale_lumaAt(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_sao_offset_scale_luma(this.segment(), index, value); return this; } + /// Sets `log2_sao_offset_scale_luma` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet log2_sao_offset_scale_luma(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_sao_offset_scale_luma(this.segment(), value); return this; } + + /// {@return `log2_sao_offset_scale_chroma` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_sao_offset_scale_chroma(MemorySegment segment, long index) { return (byte) VH_log2_sao_offset_scale_chroma.get(segment, 0L, index); } + /// {@return `log2_sao_offset_scale_chroma`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_sao_offset_scale_chroma(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_log2_sao_offset_scale_chroma(segment, 0L); } + /// {@return `log2_sao_offset_scale_chroma` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_sao_offset_scale_chromaAt(long index) { return StdVideoH265PictureParameterSet.get_log2_sao_offset_scale_chroma(this.segment(), index); } + /// {@return `log2_sao_offset_scale_chroma`} + public @CType("uint8_t") byte log2_sao_offset_scale_chroma() { return StdVideoH265PictureParameterSet.get_log2_sao_offset_scale_chroma(this.segment()); } + /// Sets `log2_sao_offset_scale_chroma` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_sao_offset_scale_chroma(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_sao_offset_scale_chroma.set(segment, 0L, index, value); } + /// Sets `log2_sao_offset_scale_chroma` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_sao_offset_scale_chroma(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_sao_offset_scale_chroma(segment, 0L, value); } + /// Sets `log2_sao_offset_scale_chroma` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet log2_sao_offset_scale_chromaAt(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_sao_offset_scale_chroma(this.segment(), index, value); return this; } + /// Sets `log2_sao_offset_scale_chroma` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet log2_sao_offset_scale_chroma(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_log2_sao_offset_scale_chroma(this.segment(), value); return this; } + + /// {@return `pps_act_y_qp_offset_plus5` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_pps_act_y_qp_offset_plus5(MemorySegment segment, long index) { return (byte) VH_pps_act_y_qp_offset_plus5.get(segment, 0L, index); } + /// {@return `pps_act_y_qp_offset_plus5`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_pps_act_y_qp_offset_plus5(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pps_act_y_qp_offset_plus5(segment, 0L); } + /// {@return `pps_act_y_qp_offset_plus5` at the given index} + /// @param index the index + public @CType("int8_t") byte pps_act_y_qp_offset_plus5At(long index) { return StdVideoH265PictureParameterSet.get_pps_act_y_qp_offset_plus5(this.segment(), index); } + /// {@return `pps_act_y_qp_offset_plus5`} + public @CType("int8_t") byte pps_act_y_qp_offset_plus5() { return StdVideoH265PictureParameterSet.get_pps_act_y_qp_offset_plus5(this.segment()); } + /// Sets `pps_act_y_qp_offset_plus5` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_act_y_qp_offset_plus5(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_pps_act_y_qp_offset_plus5.set(segment, 0L, index, value); } + /// Sets `pps_act_y_qp_offset_plus5` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_act_y_qp_offset_plus5(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_act_y_qp_offset_plus5(segment, 0L, value); } + /// Sets `pps_act_y_qp_offset_plus5` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_act_y_qp_offset_plus5At(long index, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_act_y_qp_offset_plus5(this.segment(), index, value); return this; } + /// Sets `pps_act_y_qp_offset_plus5` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_act_y_qp_offset_plus5(@CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_act_y_qp_offset_plus5(this.segment(), value); return this; } + + /// {@return `pps_act_cb_qp_offset_plus5` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_pps_act_cb_qp_offset_plus5(MemorySegment segment, long index) { return (byte) VH_pps_act_cb_qp_offset_plus5.get(segment, 0L, index); } + /// {@return `pps_act_cb_qp_offset_plus5`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_pps_act_cb_qp_offset_plus5(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pps_act_cb_qp_offset_plus5(segment, 0L); } + /// {@return `pps_act_cb_qp_offset_plus5` at the given index} + /// @param index the index + public @CType("int8_t") byte pps_act_cb_qp_offset_plus5At(long index) { return StdVideoH265PictureParameterSet.get_pps_act_cb_qp_offset_plus5(this.segment(), index); } + /// {@return `pps_act_cb_qp_offset_plus5`} + public @CType("int8_t") byte pps_act_cb_qp_offset_plus5() { return StdVideoH265PictureParameterSet.get_pps_act_cb_qp_offset_plus5(this.segment()); } + /// Sets `pps_act_cb_qp_offset_plus5` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_act_cb_qp_offset_plus5(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_pps_act_cb_qp_offset_plus5.set(segment, 0L, index, value); } + /// Sets `pps_act_cb_qp_offset_plus5` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_act_cb_qp_offset_plus5(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_act_cb_qp_offset_plus5(segment, 0L, value); } + /// Sets `pps_act_cb_qp_offset_plus5` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_act_cb_qp_offset_plus5At(long index, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_act_cb_qp_offset_plus5(this.segment(), index, value); return this; } + /// Sets `pps_act_cb_qp_offset_plus5` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_act_cb_qp_offset_plus5(@CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_act_cb_qp_offset_plus5(this.segment(), value); return this; } + + /// {@return `pps_act_cr_qp_offset_plus3` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("int8_t") byte get_pps_act_cr_qp_offset_plus3(MemorySegment segment, long index) { return (byte) VH_pps_act_cr_qp_offset_plus3.get(segment, 0L, index); } + /// {@return `pps_act_cr_qp_offset_plus3`} + /// @param segment the segment of the struct + public static @CType("int8_t") byte get_pps_act_cr_qp_offset_plus3(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pps_act_cr_qp_offset_plus3(segment, 0L); } + /// {@return `pps_act_cr_qp_offset_plus3` at the given index} + /// @param index the index + public @CType("int8_t") byte pps_act_cr_qp_offset_plus3At(long index) { return StdVideoH265PictureParameterSet.get_pps_act_cr_qp_offset_plus3(this.segment(), index); } + /// {@return `pps_act_cr_qp_offset_plus3`} + public @CType("int8_t") byte pps_act_cr_qp_offset_plus3() { return StdVideoH265PictureParameterSet.get_pps_act_cr_qp_offset_plus3(this.segment()); } + /// Sets `pps_act_cr_qp_offset_plus3` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_act_cr_qp_offset_plus3(MemorySegment segment, long index, @CType("int8_t") byte value) { VH_pps_act_cr_qp_offset_plus3.set(segment, 0L, index, value); } + /// Sets `pps_act_cr_qp_offset_plus3` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_act_cr_qp_offset_plus3(MemorySegment segment, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_act_cr_qp_offset_plus3(segment, 0L, value); } + /// Sets `pps_act_cr_qp_offset_plus3` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_act_cr_qp_offset_plus3At(long index, @CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_act_cr_qp_offset_plus3(this.segment(), index, value); return this; } + /// Sets `pps_act_cr_qp_offset_plus3` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_act_cr_qp_offset_plus3(@CType("int8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_act_cr_qp_offset_plus3(this.segment(), value); return this; } + + /// {@return `pps_num_palette_predictor_initializers` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pps_num_palette_predictor_initializers(MemorySegment segment, long index) { return (byte) VH_pps_num_palette_predictor_initializers.get(segment, 0L, index); } + /// {@return `pps_num_palette_predictor_initializers`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pps_num_palette_predictor_initializers(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pps_num_palette_predictor_initializers(segment, 0L); } + /// {@return `pps_num_palette_predictor_initializers` at the given index} + /// @param index the index + public @CType("uint8_t") byte pps_num_palette_predictor_initializersAt(long index) { return StdVideoH265PictureParameterSet.get_pps_num_palette_predictor_initializers(this.segment(), index); } + /// {@return `pps_num_palette_predictor_initializers`} + public @CType("uint8_t") byte pps_num_palette_predictor_initializers() { return StdVideoH265PictureParameterSet.get_pps_num_palette_predictor_initializers(this.segment()); } + /// Sets `pps_num_palette_predictor_initializers` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_num_palette_predictor_initializers(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pps_num_palette_predictor_initializers.set(segment, 0L, index, value); } + /// Sets `pps_num_palette_predictor_initializers` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_num_palette_predictor_initializers(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_num_palette_predictor_initializers(segment, 0L, value); } + /// Sets `pps_num_palette_predictor_initializers` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_num_palette_predictor_initializersAt(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_num_palette_predictor_initializers(this.segment(), index, value); return this; } + /// Sets `pps_num_palette_predictor_initializers` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pps_num_palette_predictor_initializers(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_pps_num_palette_predictor_initializers(this.segment(), value); return this; } + + /// {@return `luma_bit_depth_entry_minus8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_luma_bit_depth_entry_minus8(MemorySegment segment, long index) { return (byte) VH_luma_bit_depth_entry_minus8.get(segment, 0L, index); } + /// {@return `luma_bit_depth_entry_minus8`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_luma_bit_depth_entry_minus8(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_luma_bit_depth_entry_minus8(segment, 0L); } + /// {@return `luma_bit_depth_entry_minus8` at the given index} + /// @param index the index + public @CType("uint8_t") byte luma_bit_depth_entry_minus8At(long index) { return StdVideoH265PictureParameterSet.get_luma_bit_depth_entry_minus8(this.segment(), index); } + /// {@return `luma_bit_depth_entry_minus8`} + public @CType("uint8_t") byte luma_bit_depth_entry_minus8() { return StdVideoH265PictureParameterSet.get_luma_bit_depth_entry_minus8(this.segment()); } + /// Sets `luma_bit_depth_entry_minus8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_luma_bit_depth_entry_minus8(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_luma_bit_depth_entry_minus8.set(segment, 0L, index, value); } + /// Sets `luma_bit_depth_entry_minus8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_luma_bit_depth_entry_minus8(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_luma_bit_depth_entry_minus8(segment, 0L, value); } + /// Sets `luma_bit_depth_entry_minus8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet luma_bit_depth_entry_minus8At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_luma_bit_depth_entry_minus8(this.segment(), index, value); return this; } + /// Sets `luma_bit_depth_entry_minus8` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet luma_bit_depth_entry_minus8(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_luma_bit_depth_entry_minus8(this.segment(), value); return this; } + + /// {@return `chroma_bit_depth_entry_minus8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_chroma_bit_depth_entry_minus8(MemorySegment segment, long index) { return (byte) VH_chroma_bit_depth_entry_minus8.get(segment, 0L, index); } + /// {@return `chroma_bit_depth_entry_minus8`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_chroma_bit_depth_entry_minus8(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_chroma_bit_depth_entry_minus8(segment, 0L); } + /// {@return `chroma_bit_depth_entry_minus8` at the given index} + /// @param index the index + public @CType("uint8_t") byte chroma_bit_depth_entry_minus8At(long index) { return StdVideoH265PictureParameterSet.get_chroma_bit_depth_entry_minus8(this.segment(), index); } + /// {@return `chroma_bit_depth_entry_minus8`} + public @CType("uint8_t") byte chroma_bit_depth_entry_minus8() { return StdVideoH265PictureParameterSet.get_chroma_bit_depth_entry_minus8(this.segment()); } + /// Sets `chroma_bit_depth_entry_minus8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_bit_depth_entry_minus8(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_chroma_bit_depth_entry_minus8.set(segment, 0L, index, value); } + /// Sets `chroma_bit_depth_entry_minus8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_bit_depth_entry_minus8(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_chroma_bit_depth_entry_minus8(segment, 0L, value); } + /// Sets `chroma_bit_depth_entry_minus8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet chroma_bit_depth_entry_minus8At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_chroma_bit_depth_entry_minus8(this.segment(), index, value); return this; } + /// Sets `chroma_bit_depth_entry_minus8` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet chroma_bit_depth_entry_minus8(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_chroma_bit_depth_entry_minus8(this.segment(), value); return this; } + + /// {@return `num_tile_columns_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_tile_columns_minus1(MemorySegment segment, long index) { return (byte) VH_num_tile_columns_minus1.get(segment, 0L, index); } + /// {@return `num_tile_columns_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_tile_columns_minus1(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_num_tile_columns_minus1(segment, 0L); } + /// {@return `num_tile_columns_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_tile_columns_minus1At(long index) { return StdVideoH265PictureParameterSet.get_num_tile_columns_minus1(this.segment(), index); } + /// {@return `num_tile_columns_minus1`} + public @CType("uint8_t") byte num_tile_columns_minus1() { return StdVideoH265PictureParameterSet.get_num_tile_columns_minus1(this.segment()); } + /// Sets `num_tile_columns_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_tile_columns_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_tile_columns_minus1.set(segment, 0L, index, value); } + /// Sets `num_tile_columns_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_tile_columns_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_tile_columns_minus1(segment, 0L, value); } + /// Sets `num_tile_columns_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet num_tile_columns_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_tile_columns_minus1(this.segment(), index, value); return this; } + /// Sets `num_tile_columns_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet num_tile_columns_minus1(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_tile_columns_minus1(this.segment(), value); return this; } + + /// {@return `num_tile_rows_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_tile_rows_minus1(MemorySegment segment, long index) { return (byte) VH_num_tile_rows_minus1.get(segment, 0L, index); } + /// {@return `num_tile_rows_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_tile_rows_minus1(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_num_tile_rows_minus1(segment, 0L); } + /// {@return `num_tile_rows_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_tile_rows_minus1At(long index) { return StdVideoH265PictureParameterSet.get_num_tile_rows_minus1(this.segment(), index); } + /// {@return `num_tile_rows_minus1`} + public @CType("uint8_t") byte num_tile_rows_minus1() { return StdVideoH265PictureParameterSet.get_num_tile_rows_minus1(this.segment()); } + /// Sets `num_tile_rows_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_tile_rows_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_tile_rows_minus1.set(segment, 0L, index, value); } + /// Sets `num_tile_rows_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_tile_rows_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_tile_rows_minus1(segment, 0L, value); } + /// Sets `num_tile_rows_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet num_tile_rows_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_tile_rows_minus1(this.segment(), index, value); return this; } + /// Sets `num_tile_rows_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet num_tile_rows_minus1(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_num_tile_rows_minus1(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoH265PictureParameterSet.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoH265PictureParameterSet.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet reserved1At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet reserved1(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_reserved1(this.segment(), value); return this; } + + /// {@return `reserved2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment, long index) { return (byte) VH_reserved2.get(segment, 0L, index); } + /// {@return `reserved2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_reserved2(segment, 0L); } + /// {@return `reserved2` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved2At(long index) { return StdVideoH265PictureParameterSet.get_reserved2(this.segment(), index); } + /// {@return `reserved2`} + public @CType("uint8_t") byte reserved2() { return StdVideoH265PictureParameterSet.get_reserved2(this.segment()); } + /// Sets `reserved2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved2.set(segment, 0L, index, value); } + /// Sets `reserved2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_reserved2(segment, 0L, value); } + /// Sets `reserved2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet reserved2At(long index, @CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_reserved2(this.segment(), index, value); return this; } + /// Sets `reserved2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet reserved2(@CType("uint8_t") byte value) { StdVideoH265PictureParameterSet.set_reserved2(this.segment(), value); return this; } + + /// {@return `column_width_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t [ ]") short get_column_width_minus1(MemorySegment segment, long index) { return (short) VH_column_width_minus1.get(segment, 0L, index); } + /// {@return `column_width_minus1`} + /// @param segment the segment of the struct + public static @CType("uint16_t [ ]") short get_column_width_minus1(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_column_width_minus1(segment, 0L); } + /// {@return `column_width_minus1` at the given index} + /// @param index the index + public @CType("uint16_t [ ]") short column_width_minus1At(long index) { return StdVideoH265PictureParameterSet.get_column_width_minus1(this.segment(), index); } + /// {@return `column_width_minus1`} + public @CType("uint16_t [ ]") short column_width_minus1() { return StdVideoH265PictureParameterSet.get_column_width_minus1(this.segment()); } + /// Sets `column_width_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_column_width_minus1(MemorySegment segment, long index, @CType("uint16_t [ ]") short value) { VH_column_width_minus1.set(segment, 0L, index, value); } + /// Sets `column_width_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_column_width_minus1(MemorySegment segment, @CType("uint16_t [ ]") short value) { StdVideoH265PictureParameterSet.set_column_width_minus1(segment, 0L, value); } + /// Sets `column_width_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet column_width_minus1At(long index, @CType("uint16_t [ ]") short value) { StdVideoH265PictureParameterSet.set_column_width_minus1(this.segment(), index, value); return this; } + /// Sets `column_width_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet column_width_minus1(@CType("uint16_t [ ]") short value) { StdVideoH265PictureParameterSet.set_column_width_minus1(this.segment(), value); return this; } + + /// {@return `row_height_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t [ ]") short get_row_height_minus1(MemorySegment segment, long index) { return (short) VH_row_height_minus1.get(segment, 0L, index); } + /// {@return `row_height_minus1`} + /// @param segment the segment of the struct + public static @CType("uint16_t [ ]") short get_row_height_minus1(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_row_height_minus1(segment, 0L); } + /// {@return `row_height_minus1` at the given index} + /// @param index the index + public @CType("uint16_t [ ]") short row_height_minus1At(long index) { return StdVideoH265PictureParameterSet.get_row_height_minus1(this.segment(), index); } + /// {@return `row_height_minus1`} + public @CType("uint16_t [ ]") short row_height_minus1() { return StdVideoH265PictureParameterSet.get_row_height_minus1(this.segment()); } + /// Sets `row_height_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_row_height_minus1(MemorySegment segment, long index, @CType("uint16_t [ ]") short value) { VH_row_height_minus1.set(segment, 0L, index, value); } + /// Sets `row_height_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_row_height_minus1(MemorySegment segment, @CType("uint16_t [ ]") short value) { StdVideoH265PictureParameterSet.set_row_height_minus1(segment, 0L, value); } + /// Sets `row_height_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet row_height_minus1At(long index, @CType("uint16_t [ ]") short value) { StdVideoH265PictureParameterSet.set_row_height_minus1(this.segment(), index, value); return this; } + /// Sets `row_height_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet row_height_minus1(@CType("uint16_t [ ]") short value) { StdVideoH265PictureParameterSet.set_row_height_minus1(this.segment(), value); return this; } + + /// {@return `reserved3` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_reserved3(MemorySegment segment, long index) { return (int) VH_reserved3.get(segment, 0L, index); } + /// {@return `reserved3`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_reserved3(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_reserved3(segment, 0L); } + /// {@return `reserved3` at the given index} + /// @param index the index + public @CType("uint32_t") int reserved3At(long index) { return StdVideoH265PictureParameterSet.get_reserved3(this.segment(), index); } + /// {@return `reserved3`} + public @CType("uint32_t") int reserved3() { return StdVideoH265PictureParameterSet.get_reserved3(this.segment()); } + /// Sets `reserved3` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved3(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_reserved3.set(segment, 0L, index, value); } + /// Sets `reserved3` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved3(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265PictureParameterSet.set_reserved3(segment, 0L, value); } + /// Sets `reserved3` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet reserved3At(long index, @CType("uint32_t") int value) { StdVideoH265PictureParameterSet.set_reserved3(this.segment(), index, value); return this; } + /// Sets `reserved3` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet reserved3(@CType("uint32_t") int value) { StdVideoH265PictureParameterSet.set_reserved3(this.segment(), value); return this; } + + /// {@return `pScalingLists` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment get_pScalingLists(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pScalingLists.get(segment, 0L, index); } + /// {@return `pScalingLists`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment get_pScalingLists(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pScalingLists(segment, 0L); } + /// {@return `pScalingLists` at the given index} + /// @param index the index + public @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment pScalingListsAt(long index) { return StdVideoH265PictureParameterSet.get_pScalingLists(this.segment(), index); } + /// {@return `pScalingLists`} + public @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment pScalingLists() { return StdVideoH265PictureParameterSet.get_pScalingLists(this.segment()); } + /// Sets `pScalingLists` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pScalingLists(MemorySegment segment, long index, @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment value) { VH_pScalingLists.set(segment, 0L, index, value); } + /// Sets `pScalingLists` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pScalingLists(MemorySegment segment, @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH265PictureParameterSet.set_pScalingLists(segment, 0L, value); } + /// Sets `pScalingLists` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pScalingListsAt(long index, @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH265PictureParameterSet.set_pScalingLists(this.segment(), index, value); return this; } + /// Sets `pScalingLists` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pScalingLists(@CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH265PictureParameterSet.set_pScalingLists(this.segment(), value); return this; } + + /// {@return `pPredictorPaletteEntries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment get_pPredictorPaletteEntries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPredictorPaletteEntries.get(segment, 0L, index); } + /// {@return `pPredictorPaletteEntries`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment get_pPredictorPaletteEntries(MemorySegment segment) { return StdVideoH265PictureParameterSet.get_pPredictorPaletteEntries(segment, 0L); } + /// {@return `pPredictorPaletteEntries` at the given index} + /// @param index the index + public @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment pPredictorPaletteEntriesAt(long index) { return StdVideoH265PictureParameterSet.get_pPredictorPaletteEntries(this.segment(), index); } + /// {@return `pPredictorPaletteEntries`} + public @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment pPredictorPaletteEntries() { return StdVideoH265PictureParameterSet.get_pPredictorPaletteEntries(this.segment()); } + /// Sets `pPredictorPaletteEntries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPredictorPaletteEntries(MemorySegment segment, long index, @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment value) { VH_pPredictorPaletteEntries.set(segment, 0L, index, value); } + /// Sets `pPredictorPaletteEntries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPredictorPaletteEntries(MemorySegment segment, @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment value) { StdVideoH265PictureParameterSet.set_pPredictorPaletteEntries(segment, 0L, value); } + /// Sets `pPredictorPaletteEntries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pPredictorPaletteEntriesAt(long index, @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment value) { StdVideoH265PictureParameterSet.set_pPredictorPaletteEntries(this.segment(), index, value); return this; } + /// Sets `pPredictorPaletteEntries` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PictureParameterSet pPredictorPaletteEntries(@CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment value) { StdVideoH265PictureParameterSet.set_pPredictorPaletteEntries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265PpsFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265PpsFlags.java new file mode 100644 index 00000000..3a24d971 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265PpsFlags.java @@ -0,0 +1,1221 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### dependent_slice_segments_enabled_flag +/// [VarHandle][#VH_dependent_slice_segments_enabled_flag] - [Getter][#dependent_slice_segments_enabled_flag()] - [Setter][#dependent_slice_segments_enabled_flag(int)] +/// ### output_flag_present_flag +/// [VarHandle][#VH_output_flag_present_flag] - [Getter][#output_flag_present_flag()] - [Setter][#output_flag_present_flag(int)] +/// ### sign_data_hiding_enabled_flag +/// [VarHandle][#VH_sign_data_hiding_enabled_flag] - [Getter][#sign_data_hiding_enabled_flag()] - [Setter][#sign_data_hiding_enabled_flag(int)] +/// ### cabac_init_present_flag +/// [VarHandle][#VH_cabac_init_present_flag] - [Getter][#cabac_init_present_flag()] - [Setter][#cabac_init_present_flag(int)] +/// ### constrained_intra_pred_flag +/// [VarHandle][#VH_constrained_intra_pred_flag] - [Getter][#constrained_intra_pred_flag()] - [Setter][#constrained_intra_pred_flag(int)] +/// ### transform_skip_enabled_flag +/// [VarHandle][#VH_transform_skip_enabled_flag] - [Getter][#transform_skip_enabled_flag()] - [Setter][#transform_skip_enabled_flag(int)] +/// ### cu_qp_delta_enabled_flag +/// [VarHandle][#VH_cu_qp_delta_enabled_flag] - [Getter][#cu_qp_delta_enabled_flag()] - [Setter][#cu_qp_delta_enabled_flag(int)] +/// ### pps_slice_chroma_qp_offsets_present_flag +/// [VarHandle][#VH_pps_slice_chroma_qp_offsets_present_flag] - [Getter][#pps_slice_chroma_qp_offsets_present_flag()] - [Setter][#pps_slice_chroma_qp_offsets_present_flag(int)] +/// ### weighted_pred_flag +/// [VarHandle][#VH_weighted_pred_flag] - [Getter][#weighted_pred_flag()] - [Setter][#weighted_pred_flag(int)] +/// ### weighted_bipred_flag +/// [VarHandle][#VH_weighted_bipred_flag] - [Getter][#weighted_bipred_flag()] - [Setter][#weighted_bipred_flag(int)] +/// ### transquant_bypass_enabled_flag +/// [VarHandle][#VH_transquant_bypass_enabled_flag] - [Getter][#transquant_bypass_enabled_flag()] - [Setter][#transquant_bypass_enabled_flag(int)] +/// ### tiles_enabled_flag +/// [VarHandle][#VH_tiles_enabled_flag] - [Getter][#tiles_enabled_flag()] - [Setter][#tiles_enabled_flag(int)] +/// ### entropy_coding_sync_enabled_flag +/// [VarHandle][#VH_entropy_coding_sync_enabled_flag] - [Getter][#entropy_coding_sync_enabled_flag()] - [Setter][#entropy_coding_sync_enabled_flag(int)] +/// ### uniform_spacing_flag +/// [VarHandle][#VH_uniform_spacing_flag] - [Getter][#uniform_spacing_flag()] - [Setter][#uniform_spacing_flag(int)] +/// ### loop_filter_across_tiles_enabled_flag +/// [VarHandle][#VH_loop_filter_across_tiles_enabled_flag] - [Getter][#loop_filter_across_tiles_enabled_flag()] - [Setter][#loop_filter_across_tiles_enabled_flag(int)] +/// ### pps_loop_filter_across_slices_enabled_flag +/// [VarHandle][#VH_pps_loop_filter_across_slices_enabled_flag] - [Getter][#pps_loop_filter_across_slices_enabled_flag()] - [Setter][#pps_loop_filter_across_slices_enabled_flag(int)] +/// ### deblocking_filter_control_present_flag +/// [VarHandle][#VH_deblocking_filter_control_present_flag] - [Getter][#deblocking_filter_control_present_flag()] - [Setter][#deblocking_filter_control_present_flag(int)] +/// ### deblocking_filter_override_enabled_flag +/// [VarHandle][#VH_deblocking_filter_override_enabled_flag] - [Getter][#deblocking_filter_override_enabled_flag()] - [Setter][#deblocking_filter_override_enabled_flag(int)] +/// ### pps_deblocking_filter_disabled_flag +/// [VarHandle][#VH_pps_deblocking_filter_disabled_flag] - [Getter][#pps_deblocking_filter_disabled_flag()] - [Setter][#pps_deblocking_filter_disabled_flag(int)] +/// ### pps_scaling_list_data_present_flag +/// [VarHandle][#VH_pps_scaling_list_data_present_flag] - [Getter][#pps_scaling_list_data_present_flag()] - [Setter][#pps_scaling_list_data_present_flag(int)] +/// ### lists_modification_present_flag +/// [VarHandle][#VH_lists_modification_present_flag] - [Getter][#lists_modification_present_flag()] - [Setter][#lists_modification_present_flag(int)] +/// ### slice_segment_header_extension_present_flag +/// [VarHandle][#VH_slice_segment_header_extension_present_flag] - [Getter][#slice_segment_header_extension_present_flag()] - [Setter][#slice_segment_header_extension_present_flag(int)] +/// ### pps_extension_present_flag +/// [VarHandle][#VH_pps_extension_present_flag] - [Getter][#pps_extension_present_flag()] - [Setter][#pps_extension_present_flag(int)] +/// ### cross_component_prediction_enabled_flag +/// [VarHandle][#VH_cross_component_prediction_enabled_flag] - [Getter][#cross_component_prediction_enabled_flag()] - [Setter][#cross_component_prediction_enabled_flag(int)] +/// ### chroma_qp_offset_list_enabled_flag +/// [VarHandle][#VH_chroma_qp_offset_list_enabled_flag] - [Getter][#chroma_qp_offset_list_enabled_flag()] - [Setter][#chroma_qp_offset_list_enabled_flag(int)] +/// ### pps_curr_pic_ref_enabled_flag +/// [VarHandle][#VH_pps_curr_pic_ref_enabled_flag] - [Getter][#pps_curr_pic_ref_enabled_flag()] - [Setter][#pps_curr_pic_ref_enabled_flag(int)] +/// ### residual_adaptive_colour_transform_enabled_flag +/// [VarHandle][#VH_residual_adaptive_colour_transform_enabled_flag] - [Getter][#residual_adaptive_colour_transform_enabled_flag()] - [Setter][#residual_adaptive_colour_transform_enabled_flag(int)] +/// ### pps_slice_act_qp_offsets_present_flag +/// [VarHandle][#VH_pps_slice_act_qp_offsets_present_flag] - [Getter][#pps_slice_act_qp_offsets_present_flag()] - [Setter][#pps_slice_act_qp_offsets_present_flag(int)] +/// ### pps_palette_predictor_initializers_present_flag +/// [VarHandle][#VH_pps_palette_predictor_initializers_present_flag] - [Getter][#pps_palette_predictor_initializers_present_flag()] - [Setter][#pps_palette_predictor_initializers_present_flag(int)] +/// ### monochrome_palette_flag +/// [VarHandle][#VH_monochrome_palette_flag] - [Getter][#monochrome_palette_flag()] - [Setter][#monochrome_palette_flag(int)] +/// ### pps_range_extension_flag +/// [VarHandle][#VH_pps_range_extension_flag] - [Getter][#pps_range_extension_flag()] - [Setter][#pps_range_extension_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265PpsFlags { +/// uint32_t : 1 dependent_slice_segments_enabled_flag; +/// uint32_t : 1 output_flag_present_flag; +/// uint32_t : 1 sign_data_hiding_enabled_flag; +/// uint32_t : 1 cabac_init_present_flag; +/// uint32_t : 1 constrained_intra_pred_flag; +/// uint32_t : 1 transform_skip_enabled_flag; +/// uint32_t : 1 cu_qp_delta_enabled_flag; +/// uint32_t : 1 pps_slice_chroma_qp_offsets_present_flag; +/// uint32_t : 1 weighted_pred_flag; +/// uint32_t : 1 weighted_bipred_flag; +/// uint32_t : 1 transquant_bypass_enabled_flag; +/// uint32_t : 1 tiles_enabled_flag; +/// uint32_t : 1 entropy_coding_sync_enabled_flag; +/// uint32_t : 1 uniform_spacing_flag; +/// uint32_t : 1 loop_filter_across_tiles_enabled_flag; +/// uint32_t : 1 pps_loop_filter_across_slices_enabled_flag; +/// uint32_t : 1 deblocking_filter_control_present_flag; +/// uint32_t : 1 deblocking_filter_override_enabled_flag; +/// uint32_t : 1 pps_deblocking_filter_disabled_flag; +/// uint32_t : 1 pps_scaling_list_data_present_flag; +/// uint32_t : 1 lists_modification_present_flag; +/// uint32_t : 1 slice_segment_header_extension_present_flag; +/// uint32_t : 1 pps_extension_present_flag; +/// uint32_t : 1 cross_component_prediction_enabled_flag; +/// uint32_t : 1 chroma_qp_offset_list_enabled_flag; +/// uint32_t : 1 pps_curr_pic_ref_enabled_flag; +/// uint32_t : 1 residual_adaptive_colour_transform_enabled_flag; +/// uint32_t : 1 pps_slice_act_qp_offsets_present_flag; +/// uint32_t : 1 pps_palette_predictor_initializers_present_flag; +/// uint32_t : 1 monochrome_palette_flag; +/// uint32_t : 1 pps_range_extension_flag; +/// } StdVideoH265PpsFlags; +/// ``` +public final class StdVideoH265PpsFlags extends Struct { + /// The struct layout of `StdVideoH265PpsFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("dependent_slice_segments_enabled_flag"), + ValueLayout.JAVA_INT.withName("output_flag_present_flag"), + ValueLayout.JAVA_INT.withName("sign_data_hiding_enabled_flag"), + ValueLayout.JAVA_INT.withName("cabac_init_present_flag"), + ValueLayout.JAVA_INT.withName("constrained_intra_pred_flag"), + ValueLayout.JAVA_INT.withName("transform_skip_enabled_flag"), + ValueLayout.JAVA_INT.withName("cu_qp_delta_enabled_flag"), + ValueLayout.JAVA_INT.withName("pps_slice_chroma_qp_offsets_present_flag"), + ValueLayout.JAVA_INT.withName("weighted_pred_flag"), + ValueLayout.JAVA_INT.withName("weighted_bipred_flag"), + ValueLayout.JAVA_INT.withName("transquant_bypass_enabled_flag"), + ValueLayout.JAVA_INT.withName("tiles_enabled_flag"), + ValueLayout.JAVA_INT.withName("entropy_coding_sync_enabled_flag"), + ValueLayout.JAVA_INT.withName("uniform_spacing_flag"), + ValueLayout.JAVA_INT.withName("loop_filter_across_tiles_enabled_flag"), + ValueLayout.JAVA_INT.withName("pps_loop_filter_across_slices_enabled_flag"), + ValueLayout.JAVA_INT.withName("deblocking_filter_control_present_flag"), + ValueLayout.JAVA_INT.withName("deblocking_filter_override_enabled_flag"), + ValueLayout.JAVA_INT.withName("pps_deblocking_filter_disabled_flag"), + ValueLayout.JAVA_INT.withName("pps_scaling_list_data_present_flag"), + ValueLayout.JAVA_INT.withName("lists_modification_present_flag"), + ValueLayout.JAVA_INT.withName("slice_segment_header_extension_present_flag"), + ValueLayout.JAVA_INT.withName("pps_extension_present_flag"), + ValueLayout.JAVA_INT.withName("cross_component_prediction_enabled_flag"), + ValueLayout.JAVA_INT.withName("chroma_qp_offset_list_enabled_flag"), + ValueLayout.JAVA_INT.withName("pps_curr_pic_ref_enabled_flag"), + ValueLayout.JAVA_INT.withName("residual_adaptive_colour_transform_enabled_flag"), + ValueLayout.JAVA_INT.withName("pps_slice_act_qp_offsets_present_flag"), + ValueLayout.JAVA_INT.withName("pps_palette_predictor_initializers_present_flag"), + ValueLayout.JAVA_INT.withName("monochrome_palette_flag"), + ValueLayout.JAVA_INT.withName("pps_range_extension_flag") + ); + /// The [VarHandle] of `dependent_slice_segments_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_dependent_slice_segments_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("dependent_slice_segments_enabled_flag")); + /// The [VarHandle] of `output_flag_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_output_flag_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("output_flag_present_flag")); + /// The [VarHandle] of `sign_data_hiding_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sign_data_hiding_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sign_data_hiding_enabled_flag")); + /// The [VarHandle] of `cabac_init_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cabac_init_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cabac_init_present_flag")); + /// The [VarHandle] of `constrained_intra_pred_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_constrained_intra_pred_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("constrained_intra_pred_flag")); + /// The [VarHandle] of `transform_skip_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transform_skip_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transform_skip_enabled_flag")); + /// The [VarHandle] of `cu_qp_delta_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cu_qp_delta_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cu_qp_delta_enabled_flag")); + /// The [VarHandle] of `pps_slice_chroma_qp_offsets_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pps_slice_chroma_qp_offsets_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_slice_chroma_qp_offsets_present_flag")); + /// The [VarHandle] of `weighted_pred_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_weighted_pred_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("weighted_pred_flag")); + /// The [VarHandle] of `weighted_bipred_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_weighted_bipred_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("weighted_bipred_flag")); + /// The [VarHandle] of `transquant_bypass_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transquant_bypass_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transquant_bypass_enabled_flag")); + /// The [VarHandle] of `tiles_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tiles_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tiles_enabled_flag")); + /// The [VarHandle] of `entropy_coding_sync_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_entropy_coding_sync_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("entropy_coding_sync_enabled_flag")); + /// The [VarHandle] of `uniform_spacing_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_uniform_spacing_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("uniform_spacing_flag")); + /// The [VarHandle] of `loop_filter_across_tiles_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_loop_filter_across_tiles_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("loop_filter_across_tiles_enabled_flag")); + /// The [VarHandle] of `pps_loop_filter_across_slices_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pps_loop_filter_across_slices_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_loop_filter_across_slices_enabled_flag")); + /// The [VarHandle] of `deblocking_filter_control_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deblocking_filter_control_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deblocking_filter_control_present_flag")); + /// The [VarHandle] of `deblocking_filter_override_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_deblocking_filter_override_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("deblocking_filter_override_enabled_flag")); + /// The [VarHandle] of `pps_deblocking_filter_disabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pps_deblocking_filter_disabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_deblocking_filter_disabled_flag")); + /// The [VarHandle] of `pps_scaling_list_data_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pps_scaling_list_data_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_scaling_list_data_present_flag")); + /// The [VarHandle] of `lists_modification_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_lists_modification_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("lists_modification_present_flag")); + /// The [VarHandle] of `slice_segment_header_extension_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_slice_segment_header_extension_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("slice_segment_header_extension_present_flag")); + /// The [VarHandle] of `pps_extension_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pps_extension_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_extension_present_flag")); + /// The [VarHandle] of `cross_component_prediction_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cross_component_prediction_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cross_component_prediction_enabled_flag")); + /// The [VarHandle] of `chroma_qp_offset_list_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chroma_qp_offset_list_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_qp_offset_list_enabled_flag")); + /// The [VarHandle] of `pps_curr_pic_ref_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pps_curr_pic_ref_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_curr_pic_ref_enabled_flag")); + /// The [VarHandle] of `residual_adaptive_colour_transform_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_residual_adaptive_colour_transform_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("residual_adaptive_colour_transform_enabled_flag")); + /// The [VarHandle] of `pps_slice_act_qp_offsets_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pps_slice_act_qp_offsets_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_slice_act_qp_offsets_present_flag")); + /// The [VarHandle] of `pps_palette_predictor_initializers_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pps_palette_predictor_initializers_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_palette_predictor_initializers_present_flag")); + /// The [VarHandle] of `monochrome_palette_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_monochrome_palette_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("monochrome_palette_flag")); + /// The [VarHandle] of `pps_range_extension_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pps_range_extension_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pps_range_extension_flag")); + + /// Creates `StdVideoH265PpsFlags` with the given segment. + /// @param segment the memory segment + public StdVideoH265PpsFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265PpsFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265PpsFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265PpsFlags(segment); } + + /// Creates `StdVideoH265PpsFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265PpsFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265PpsFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265PpsFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265PpsFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265PpsFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265PpsFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265PpsFlags` + public static StdVideoH265PpsFlags alloc(SegmentAllocator allocator) { return new StdVideoH265PpsFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265PpsFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265PpsFlags` + public static StdVideoH265PpsFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoH265PpsFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `dependent_slice_segments_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_dependent_slice_segments_enabled_flag(MemorySegment segment, long index) { return (int) VH_dependent_slice_segments_enabled_flag.get(segment, 0L, index); } + /// {@return `dependent_slice_segments_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_dependent_slice_segments_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_dependent_slice_segments_enabled_flag(segment, 0L); } + /// {@return `dependent_slice_segments_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int dependent_slice_segments_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_dependent_slice_segments_enabled_flag(this.segment(), index); } + /// {@return `dependent_slice_segments_enabled_flag`} + public @CType("uint32_t : 1") int dependent_slice_segments_enabled_flag() { return StdVideoH265PpsFlags.get_dependent_slice_segments_enabled_flag(this.segment()); } + /// Sets `dependent_slice_segments_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_dependent_slice_segments_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_dependent_slice_segments_enabled_flag.set(segment, 0L, index, value); } + /// Sets `dependent_slice_segments_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_dependent_slice_segments_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_dependent_slice_segments_enabled_flag(segment, 0L, value); } + /// Sets `dependent_slice_segments_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags dependent_slice_segments_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_dependent_slice_segments_enabled_flag(this.segment(), index, value); return this; } + /// Sets `dependent_slice_segments_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags dependent_slice_segments_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_dependent_slice_segments_enabled_flag(this.segment(), value); return this; } + + /// {@return `output_flag_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_output_flag_present_flag(MemorySegment segment, long index) { return (int) VH_output_flag_present_flag.get(segment, 0L, index); } + /// {@return `output_flag_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_output_flag_present_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_output_flag_present_flag(segment, 0L); } + /// {@return `output_flag_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int output_flag_present_flagAt(long index) { return StdVideoH265PpsFlags.get_output_flag_present_flag(this.segment(), index); } + /// {@return `output_flag_present_flag`} + public @CType("uint32_t : 1") int output_flag_present_flag() { return StdVideoH265PpsFlags.get_output_flag_present_flag(this.segment()); } + /// Sets `output_flag_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_output_flag_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_output_flag_present_flag.set(segment, 0L, index, value); } + /// Sets `output_flag_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_output_flag_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_output_flag_present_flag(segment, 0L, value); } + /// Sets `output_flag_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags output_flag_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_output_flag_present_flag(this.segment(), index, value); return this; } + /// Sets `output_flag_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags output_flag_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_output_flag_present_flag(this.segment(), value); return this; } + + /// {@return `sign_data_hiding_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sign_data_hiding_enabled_flag(MemorySegment segment, long index) { return (int) VH_sign_data_hiding_enabled_flag.get(segment, 0L, index); } + /// {@return `sign_data_hiding_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sign_data_hiding_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_sign_data_hiding_enabled_flag(segment, 0L); } + /// {@return `sign_data_hiding_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sign_data_hiding_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_sign_data_hiding_enabled_flag(this.segment(), index); } + /// {@return `sign_data_hiding_enabled_flag`} + public @CType("uint32_t : 1") int sign_data_hiding_enabled_flag() { return StdVideoH265PpsFlags.get_sign_data_hiding_enabled_flag(this.segment()); } + /// Sets `sign_data_hiding_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sign_data_hiding_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sign_data_hiding_enabled_flag.set(segment, 0L, index, value); } + /// Sets `sign_data_hiding_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sign_data_hiding_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_sign_data_hiding_enabled_flag(segment, 0L, value); } + /// Sets `sign_data_hiding_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags sign_data_hiding_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_sign_data_hiding_enabled_flag(this.segment(), index, value); return this; } + /// Sets `sign_data_hiding_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags sign_data_hiding_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_sign_data_hiding_enabled_flag(this.segment(), value); return this; } + + /// {@return `cabac_init_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_cabac_init_present_flag(MemorySegment segment, long index) { return (int) VH_cabac_init_present_flag.get(segment, 0L, index); } + /// {@return `cabac_init_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_cabac_init_present_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_cabac_init_present_flag(segment, 0L); } + /// {@return `cabac_init_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int cabac_init_present_flagAt(long index) { return StdVideoH265PpsFlags.get_cabac_init_present_flag(this.segment(), index); } + /// {@return `cabac_init_present_flag`} + public @CType("uint32_t : 1") int cabac_init_present_flag() { return StdVideoH265PpsFlags.get_cabac_init_present_flag(this.segment()); } + /// Sets `cabac_init_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cabac_init_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_cabac_init_present_flag.set(segment, 0L, index, value); } + /// Sets `cabac_init_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cabac_init_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_cabac_init_present_flag(segment, 0L, value); } + /// Sets `cabac_init_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags cabac_init_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_cabac_init_present_flag(this.segment(), index, value); return this; } + /// Sets `cabac_init_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags cabac_init_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_cabac_init_present_flag(this.segment(), value); return this; } + + /// {@return `constrained_intra_pred_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_constrained_intra_pred_flag(MemorySegment segment, long index) { return (int) VH_constrained_intra_pred_flag.get(segment, 0L, index); } + /// {@return `constrained_intra_pred_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_constrained_intra_pred_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_constrained_intra_pred_flag(segment, 0L); } + /// {@return `constrained_intra_pred_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int constrained_intra_pred_flagAt(long index) { return StdVideoH265PpsFlags.get_constrained_intra_pred_flag(this.segment(), index); } + /// {@return `constrained_intra_pred_flag`} + public @CType("uint32_t : 1") int constrained_intra_pred_flag() { return StdVideoH265PpsFlags.get_constrained_intra_pred_flag(this.segment()); } + /// Sets `constrained_intra_pred_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_constrained_intra_pred_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_constrained_intra_pred_flag.set(segment, 0L, index, value); } + /// Sets `constrained_intra_pred_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_constrained_intra_pred_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_constrained_intra_pred_flag(segment, 0L, value); } + /// Sets `constrained_intra_pred_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags constrained_intra_pred_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_constrained_intra_pred_flag(this.segment(), index, value); return this; } + /// Sets `constrained_intra_pred_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags constrained_intra_pred_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_constrained_intra_pred_flag(this.segment(), value); return this; } + + /// {@return `transform_skip_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_transform_skip_enabled_flag(MemorySegment segment, long index) { return (int) VH_transform_skip_enabled_flag.get(segment, 0L, index); } + /// {@return `transform_skip_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_transform_skip_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_transform_skip_enabled_flag(segment, 0L); } + /// {@return `transform_skip_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int transform_skip_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_transform_skip_enabled_flag(this.segment(), index); } + /// {@return `transform_skip_enabled_flag`} + public @CType("uint32_t : 1") int transform_skip_enabled_flag() { return StdVideoH265PpsFlags.get_transform_skip_enabled_flag(this.segment()); } + /// Sets `transform_skip_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transform_skip_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_transform_skip_enabled_flag.set(segment, 0L, index, value); } + /// Sets `transform_skip_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transform_skip_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_transform_skip_enabled_flag(segment, 0L, value); } + /// Sets `transform_skip_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags transform_skip_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_transform_skip_enabled_flag(this.segment(), index, value); return this; } + /// Sets `transform_skip_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags transform_skip_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_transform_skip_enabled_flag(this.segment(), value); return this; } + + /// {@return `cu_qp_delta_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_cu_qp_delta_enabled_flag(MemorySegment segment, long index) { return (int) VH_cu_qp_delta_enabled_flag.get(segment, 0L, index); } + /// {@return `cu_qp_delta_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_cu_qp_delta_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_cu_qp_delta_enabled_flag(segment, 0L); } + /// {@return `cu_qp_delta_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int cu_qp_delta_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_cu_qp_delta_enabled_flag(this.segment(), index); } + /// {@return `cu_qp_delta_enabled_flag`} + public @CType("uint32_t : 1") int cu_qp_delta_enabled_flag() { return StdVideoH265PpsFlags.get_cu_qp_delta_enabled_flag(this.segment()); } + /// Sets `cu_qp_delta_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cu_qp_delta_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_cu_qp_delta_enabled_flag.set(segment, 0L, index, value); } + /// Sets `cu_qp_delta_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cu_qp_delta_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_cu_qp_delta_enabled_flag(segment, 0L, value); } + /// Sets `cu_qp_delta_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags cu_qp_delta_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_cu_qp_delta_enabled_flag(this.segment(), index, value); return this; } + /// Sets `cu_qp_delta_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags cu_qp_delta_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_cu_qp_delta_enabled_flag(this.segment(), value); return this; } + + /// {@return `pps_slice_chroma_qp_offsets_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pps_slice_chroma_qp_offsets_present_flag(MemorySegment segment, long index) { return (int) VH_pps_slice_chroma_qp_offsets_present_flag.get(segment, 0L, index); } + /// {@return `pps_slice_chroma_qp_offsets_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pps_slice_chroma_qp_offsets_present_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_pps_slice_chroma_qp_offsets_present_flag(segment, 0L); } + /// {@return `pps_slice_chroma_qp_offsets_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pps_slice_chroma_qp_offsets_present_flagAt(long index) { return StdVideoH265PpsFlags.get_pps_slice_chroma_qp_offsets_present_flag(this.segment(), index); } + /// {@return `pps_slice_chroma_qp_offsets_present_flag`} + public @CType("uint32_t : 1") int pps_slice_chroma_qp_offsets_present_flag() { return StdVideoH265PpsFlags.get_pps_slice_chroma_qp_offsets_present_flag(this.segment()); } + /// Sets `pps_slice_chroma_qp_offsets_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_slice_chroma_qp_offsets_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pps_slice_chroma_qp_offsets_present_flag.set(segment, 0L, index, value); } + /// Sets `pps_slice_chroma_qp_offsets_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_slice_chroma_qp_offsets_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_slice_chroma_qp_offsets_present_flag(segment, 0L, value); } + /// Sets `pps_slice_chroma_qp_offsets_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_slice_chroma_qp_offsets_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_slice_chroma_qp_offsets_present_flag(this.segment(), index, value); return this; } + /// Sets `pps_slice_chroma_qp_offsets_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_slice_chroma_qp_offsets_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_slice_chroma_qp_offsets_present_flag(this.segment(), value); return this; } + + /// {@return `weighted_pred_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_weighted_pred_flag(MemorySegment segment, long index) { return (int) VH_weighted_pred_flag.get(segment, 0L, index); } + /// {@return `weighted_pred_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_weighted_pred_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_weighted_pred_flag(segment, 0L); } + /// {@return `weighted_pred_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int weighted_pred_flagAt(long index) { return StdVideoH265PpsFlags.get_weighted_pred_flag(this.segment(), index); } + /// {@return `weighted_pred_flag`} + public @CType("uint32_t : 1") int weighted_pred_flag() { return StdVideoH265PpsFlags.get_weighted_pred_flag(this.segment()); } + /// Sets `weighted_pred_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_weighted_pred_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_weighted_pred_flag.set(segment, 0L, index, value); } + /// Sets `weighted_pred_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_weighted_pred_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_weighted_pred_flag(segment, 0L, value); } + /// Sets `weighted_pred_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags weighted_pred_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_weighted_pred_flag(this.segment(), index, value); return this; } + /// Sets `weighted_pred_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags weighted_pred_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_weighted_pred_flag(this.segment(), value); return this; } + + /// {@return `weighted_bipred_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_weighted_bipred_flag(MemorySegment segment, long index) { return (int) VH_weighted_bipred_flag.get(segment, 0L, index); } + /// {@return `weighted_bipred_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_weighted_bipred_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_weighted_bipred_flag(segment, 0L); } + /// {@return `weighted_bipred_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int weighted_bipred_flagAt(long index) { return StdVideoH265PpsFlags.get_weighted_bipred_flag(this.segment(), index); } + /// {@return `weighted_bipred_flag`} + public @CType("uint32_t : 1") int weighted_bipred_flag() { return StdVideoH265PpsFlags.get_weighted_bipred_flag(this.segment()); } + /// Sets `weighted_bipred_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_weighted_bipred_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_weighted_bipred_flag.set(segment, 0L, index, value); } + /// Sets `weighted_bipred_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_weighted_bipred_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_weighted_bipred_flag(segment, 0L, value); } + /// Sets `weighted_bipred_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags weighted_bipred_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_weighted_bipred_flag(this.segment(), index, value); return this; } + /// Sets `weighted_bipred_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags weighted_bipred_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_weighted_bipred_flag(this.segment(), value); return this; } + + /// {@return `transquant_bypass_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_transquant_bypass_enabled_flag(MemorySegment segment, long index) { return (int) VH_transquant_bypass_enabled_flag.get(segment, 0L, index); } + /// {@return `transquant_bypass_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_transquant_bypass_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_transquant_bypass_enabled_flag(segment, 0L); } + /// {@return `transquant_bypass_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int transquant_bypass_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_transquant_bypass_enabled_flag(this.segment(), index); } + /// {@return `transquant_bypass_enabled_flag`} + public @CType("uint32_t : 1") int transquant_bypass_enabled_flag() { return StdVideoH265PpsFlags.get_transquant_bypass_enabled_flag(this.segment()); } + /// Sets `transquant_bypass_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transquant_bypass_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_transquant_bypass_enabled_flag.set(segment, 0L, index, value); } + /// Sets `transquant_bypass_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transquant_bypass_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_transquant_bypass_enabled_flag(segment, 0L, value); } + /// Sets `transquant_bypass_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags transquant_bypass_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_transquant_bypass_enabled_flag(this.segment(), index, value); return this; } + /// Sets `transquant_bypass_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags transquant_bypass_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_transquant_bypass_enabled_flag(this.segment(), value); return this; } + + /// {@return `tiles_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_tiles_enabled_flag(MemorySegment segment, long index) { return (int) VH_tiles_enabled_flag.get(segment, 0L, index); } + /// {@return `tiles_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_tiles_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_tiles_enabled_flag(segment, 0L); } + /// {@return `tiles_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int tiles_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_tiles_enabled_flag(this.segment(), index); } + /// {@return `tiles_enabled_flag`} + public @CType("uint32_t : 1") int tiles_enabled_flag() { return StdVideoH265PpsFlags.get_tiles_enabled_flag(this.segment()); } + /// Sets `tiles_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tiles_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_tiles_enabled_flag.set(segment, 0L, index, value); } + /// Sets `tiles_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tiles_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_tiles_enabled_flag(segment, 0L, value); } + /// Sets `tiles_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags tiles_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_tiles_enabled_flag(this.segment(), index, value); return this; } + /// Sets `tiles_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags tiles_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_tiles_enabled_flag(this.segment(), value); return this; } + + /// {@return `entropy_coding_sync_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_entropy_coding_sync_enabled_flag(MemorySegment segment, long index) { return (int) VH_entropy_coding_sync_enabled_flag.get(segment, 0L, index); } + /// {@return `entropy_coding_sync_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_entropy_coding_sync_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_entropy_coding_sync_enabled_flag(segment, 0L); } + /// {@return `entropy_coding_sync_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int entropy_coding_sync_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_entropy_coding_sync_enabled_flag(this.segment(), index); } + /// {@return `entropy_coding_sync_enabled_flag`} + public @CType("uint32_t : 1") int entropy_coding_sync_enabled_flag() { return StdVideoH265PpsFlags.get_entropy_coding_sync_enabled_flag(this.segment()); } + /// Sets `entropy_coding_sync_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_entropy_coding_sync_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_entropy_coding_sync_enabled_flag.set(segment, 0L, index, value); } + /// Sets `entropy_coding_sync_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_entropy_coding_sync_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_entropy_coding_sync_enabled_flag(segment, 0L, value); } + /// Sets `entropy_coding_sync_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags entropy_coding_sync_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_entropy_coding_sync_enabled_flag(this.segment(), index, value); return this; } + /// Sets `entropy_coding_sync_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags entropy_coding_sync_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_entropy_coding_sync_enabled_flag(this.segment(), value); return this; } + + /// {@return `uniform_spacing_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_uniform_spacing_flag(MemorySegment segment, long index) { return (int) VH_uniform_spacing_flag.get(segment, 0L, index); } + /// {@return `uniform_spacing_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_uniform_spacing_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_uniform_spacing_flag(segment, 0L); } + /// {@return `uniform_spacing_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int uniform_spacing_flagAt(long index) { return StdVideoH265PpsFlags.get_uniform_spacing_flag(this.segment(), index); } + /// {@return `uniform_spacing_flag`} + public @CType("uint32_t : 1") int uniform_spacing_flag() { return StdVideoH265PpsFlags.get_uniform_spacing_flag(this.segment()); } + /// Sets `uniform_spacing_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_uniform_spacing_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_uniform_spacing_flag.set(segment, 0L, index, value); } + /// Sets `uniform_spacing_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_uniform_spacing_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_uniform_spacing_flag(segment, 0L, value); } + /// Sets `uniform_spacing_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags uniform_spacing_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_uniform_spacing_flag(this.segment(), index, value); return this; } + /// Sets `uniform_spacing_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags uniform_spacing_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_uniform_spacing_flag(this.segment(), value); return this; } + + /// {@return `loop_filter_across_tiles_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_loop_filter_across_tiles_enabled_flag(MemorySegment segment, long index) { return (int) VH_loop_filter_across_tiles_enabled_flag.get(segment, 0L, index); } + /// {@return `loop_filter_across_tiles_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_loop_filter_across_tiles_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_loop_filter_across_tiles_enabled_flag(segment, 0L); } + /// {@return `loop_filter_across_tiles_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int loop_filter_across_tiles_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_loop_filter_across_tiles_enabled_flag(this.segment(), index); } + /// {@return `loop_filter_across_tiles_enabled_flag`} + public @CType("uint32_t : 1") int loop_filter_across_tiles_enabled_flag() { return StdVideoH265PpsFlags.get_loop_filter_across_tiles_enabled_flag(this.segment()); } + /// Sets `loop_filter_across_tiles_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_loop_filter_across_tiles_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_loop_filter_across_tiles_enabled_flag.set(segment, 0L, index, value); } + /// Sets `loop_filter_across_tiles_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_loop_filter_across_tiles_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_loop_filter_across_tiles_enabled_flag(segment, 0L, value); } + /// Sets `loop_filter_across_tiles_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags loop_filter_across_tiles_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_loop_filter_across_tiles_enabled_flag(this.segment(), index, value); return this; } + /// Sets `loop_filter_across_tiles_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags loop_filter_across_tiles_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_loop_filter_across_tiles_enabled_flag(this.segment(), value); return this; } + + /// {@return `pps_loop_filter_across_slices_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pps_loop_filter_across_slices_enabled_flag(MemorySegment segment, long index) { return (int) VH_pps_loop_filter_across_slices_enabled_flag.get(segment, 0L, index); } + /// {@return `pps_loop_filter_across_slices_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pps_loop_filter_across_slices_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_pps_loop_filter_across_slices_enabled_flag(segment, 0L); } + /// {@return `pps_loop_filter_across_slices_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pps_loop_filter_across_slices_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_pps_loop_filter_across_slices_enabled_flag(this.segment(), index); } + /// {@return `pps_loop_filter_across_slices_enabled_flag`} + public @CType("uint32_t : 1") int pps_loop_filter_across_slices_enabled_flag() { return StdVideoH265PpsFlags.get_pps_loop_filter_across_slices_enabled_flag(this.segment()); } + /// Sets `pps_loop_filter_across_slices_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_loop_filter_across_slices_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pps_loop_filter_across_slices_enabled_flag.set(segment, 0L, index, value); } + /// Sets `pps_loop_filter_across_slices_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_loop_filter_across_slices_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_loop_filter_across_slices_enabled_flag(segment, 0L, value); } + /// Sets `pps_loop_filter_across_slices_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_loop_filter_across_slices_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_loop_filter_across_slices_enabled_flag(this.segment(), index, value); return this; } + /// Sets `pps_loop_filter_across_slices_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_loop_filter_across_slices_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_loop_filter_across_slices_enabled_flag(this.segment(), value); return this; } + + /// {@return `deblocking_filter_control_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_deblocking_filter_control_present_flag(MemorySegment segment, long index) { return (int) VH_deblocking_filter_control_present_flag.get(segment, 0L, index); } + /// {@return `deblocking_filter_control_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_deblocking_filter_control_present_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_deblocking_filter_control_present_flag(segment, 0L); } + /// {@return `deblocking_filter_control_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int deblocking_filter_control_present_flagAt(long index) { return StdVideoH265PpsFlags.get_deblocking_filter_control_present_flag(this.segment(), index); } + /// {@return `deblocking_filter_control_present_flag`} + public @CType("uint32_t : 1") int deblocking_filter_control_present_flag() { return StdVideoH265PpsFlags.get_deblocking_filter_control_present_flag(this.segment()); } + /// Sets `deblocking_filter_control_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deblocking_filter_control_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_deblocking_filter_control_present_flag.set(segment, 0L, index, value); } + /// Sets `deblocking_filter_control_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deblocking_filter_control_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_deblocking_filter_control_present_flag(segment, 0L, value); } + /// Sets `deblocking_filter_control_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags deblocking_filter_control_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_deblocking_filter_control_present_flag(this.segment(), index, value); return this; } + /// Sets `deblocking_filter_control_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags deblocking_filter_control_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_deblocking_filter_control_present_flag(this.segment(), value); return this; } + + /// {@return `deblocking_filter_override_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_deblocking_filter_override_enabled_flag(MemorySegment segment, long index) { return (int) VH_deblocking_filter_override_enabled_flag.get(segment, 0L, index); } + /// {@return `deblocking_filter_override_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_deblocking_filter_override_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_deblocking_filter_override_enabled_flag(segment, 0L); } + /// {@return `deblocking_filter_override_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int deblocking_filter_override_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_deblocking_filter_override_enabled_flag(this.segment(), index); } + /// {@return `deblocking_filter_override_enabled_flag`} + public @CType("uint32_t : 1") int deblocking_filter_override_enabled_flag() { return StdVideoH265PpsFlags.get_deblocking_filter_override_enabled_flag(this.segment()); } + /// Sets `deblocking_filter_override_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_deblocking_filter_override_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_deblocking_filter_override_enabled_flag.set(segment, 0L, index, value); } + /// Sets `deblocking_filter_override_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_deblocking_filter_override_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_deblocking_filter_override_enabled_flag(segment, 0L, value); } + /// Sets `deblocking_filter_override_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags deblocking_filter_override_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_deblocking_filter_override_enabled_flag(this.segment(), index, value); return this; } + /// Sets `deblocking_filter_override_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags deblocking_filter_override_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_deblocking_filter_override_enabled_flag(this.segment(), value); return this; } + + /// {@return `pps_deblocking_filter_disabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pps_deblocking_filter_disabled_flag(MemorySegment segment, long index) { return (int) VH_pps_deblocking_filter_disabled_flag.get(segment, 0L, index); } + /// {@return `pps_deblocking_filter_disabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pps_deblocking_filter_disabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_pps_deblocking_filter_disabled_flag(segment, 0L); } + /// {@return `pps_deblocking_filter_disabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pps_deblocking_filter_disabled_flagAt(long index) { return StdVideoH265PpsFlags.get_pps_deblocking_filter_disabled_flag(this.segment(), index); } + /// {@return `pps_deblocking_filter_disabled_flag`} + public @CType("uint32_t : 1") int pps_deblocking_filter_disabled_flag() { return StdVideoH265PpsFlags.get_pps_deblocking_filter_disabled_flag(this.segment()); } + /// Sets `pps_deblocking_filter_disabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_deblocking_filter_disabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pps_deblocking_filter_disabled_flag.set(segment, 0L, index, value); } + /// Sets `pps_deblocking_filter_disabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_deblocking_filter_disabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_deblocking_filter_disabled_flag(segment, 0L, value); } + /// Sets `pps_deblocking_filter_disabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_deblocking_filter_disabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_deblocking_filter_disabled_flag(this.segment(), index, value); return this; } + /// Sets `pps_deblocking_filter_disabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_deblocking_filter_disabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_deblocking_filter_disabled_flag(this.segment(), value); return this; } + + /// {@return `pps_scaling_list_data_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pps_scaling_list_data_present_flag(MemorySegment segment, long index) { return (int) VH_pps_scaling_list_data_present_flag.get(segment, 0L, index); } + /// {@return `pps_scaling_list_data_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pps_scaling_list_data_present_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_pps_scaling_list_data_present_flag(segment, 0L); } + /// {@return `pps_scaling_list_data_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pps_scaling_list_data_present_flagAt(long index) { return StdVideoH265PpsFlags.get_pps_scaling_list_data_present_flag(this.segment(), index); } + /// {@return `pps_scaling_list_data_present_flag`} + public @CType("uint32_t : 1") int pps_scaling_list_data_present_flag() { return StdVideoH265PpsFlags.get_pps_scaling_list_data_present_flag(this.segment()); } + /// Sets `pps_scaling_list_data_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_scaling_list_data_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pps_scaling_list_data_present_flag.set(segment, 0L, index, value); } + /// Sets `pps_scaling_list_data_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_scaling_list_data_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_scaling_list_data_present_flag(segment, 0L, value); } + /// Sets `pps_scaling_list_data_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_scaling_list_data_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_scaling_list_data_present_flag(this.segment(), index, value); return this; } + /// Sets `pps_scaling_list_data_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_scaling_list_data_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_scaling_list_data_present_flag(this.segment(), value); return this; } + + /// {@return `lists_modification_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_lists_modification_present_flag(MemorySegment segment, long index) { return (int) VH_lists_modification_present_flag.get(segment, 0L, index); } + /// {@return `lists_modification_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_lists_modification_present_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_lists_modification_present_flag(segment, 0L); } + /// {@return `lists_modification_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int lists_modification_present_flagAt(long index) { return StdVideoH265PpsFlags.get_lists_modification_present_flag(this.segment(), index); } + /// {@return `lists_modification_present_flag`} + public @CType("uint32_t : 1") int lists_modification_present_flag() { return StdVideoH265PpsFlags.get_lists_modification_present_flag(this.segment()); } + /// Sets `lists_modification_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_lists_modification_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_lists_modification_present_flag.set(segment, 0L, index, value); } + /// Sets `lists_modification_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_lists_modification_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_lists_modification_present_flag(segment, 0L, value); } + /// Sets `lists_modification_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags lists_modification_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_lists_modification_present_flag(this.segment(), index, value); return this; } + /// Sets `lists_modification_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags lists_modification_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_lists_modification_present_flag(this.segment(), value); return this; } + + /// {@return `slice_segment_header_extension_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_slice_segment_header_extension_present_flag(MemorySegment segment, long index) { return (int) VH_slice_segment_header_extension_present_flag.get(segment, 0L, index); } + /// {@return `slice_segment_header_extension_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_slice_segment_header_extension_present_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_slice_segment_header_extension_present_flag(segment, 0L); } + /// {@return `slice_segment_header_extension_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int slice_segment_header_extension_present_flagAt(long index) { return StdVideoH265PpsFlags.get_slice_segment_header_extension_present_flag(this.segment(), index); } + /// {@return `slice_segment_header_extension_present_flag`} + public @CType("uint32_t : 1") int slice_segment_header_extension_present_flag() { return StdVideoH265PpsFlags.get_slice_segment_header_extension_present_flag(this.segment()); } + /// Sets `slice_segment_header_extension_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_slice_segment_header_extension_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_slice_segment_header_extension_present_flag.set(segment, 0L, index, value); } + /// Sets `slice_segment_header_extension_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_slice_segment_header_extension_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_slice_segment_header_extension_present_flag(segment, 0L, value); } + /// Sets `slice_segment_header_extension_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags slice_segment_header_extension_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_slice_segment_header_extension_present_flag(this.segment(), index, value); return this; } + /// Sets `slice_segment_header_extension_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags slice_segment_header_extension_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_slice_segment_header_extension_present_flag(this.segment(), value); return this; } + + /// {@return `pps_extension_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pps_extension_present_flag(MemorySegment segment, long index) { return (int) VH_pps_extension_present_flag.get(segment, 0L, index); } + /// {@return `pps_extension_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pps_extension_present_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_pps_extension_present_flag(segment, 0L); } + /// {@return `pps_extension_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pps_extension_present_flagAt(long index) { return StdVideoH265PpsFlags.get_pps_extension_present_flag(this.segment(), index); } + /// {@return `pps_extension_present_flag`} + public @CType("uint32_t : 1") int pps_extension_present_flag() { return StdVideoH265PpsFlags.get_pps_extension_present_flag(this.segment()); } + /// Sets `pps_extension_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_extension_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pps_extension_present_flag.set(segment, 0L, index, value); } + /// Sets `pps_extension_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_extension_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_extension_present_flag(segment, 0L, value); } + /// Sets `pps_extension_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_extension_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_extension_present_flag(this.segment(), index, value); return this; } + /// Sets `pps_extension_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_extension_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_extension_present_flag(this.segment(), value); return this; } + + /// {@return `cross_component_prediction_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_cross_component_prediction_enabled_flag(MemorySegment segment, long index) { return (int) VH_cross_component_prediction_enabled_flag.get(segment, 0L, index); } + /// {@return `cross_component_prediction_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_cross_component_prediction_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_cross_component_prediction_enabled_flag(segment, 0L); } + /// {@return `cross_component_prediction_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int cross_component_prediction_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_cross_component_prediction_enabled_flag(this.segment(), index); } + /// {@return `cross_component_prediction_enabled_flag`} + public @CType("uint32_t : 1") int cross_component_prediction_enabled_flag() { return StdVideoH265PpsFlags.get_cross_component_prediction_enabled_flag(this.segment()); } + /// Sets `cross_component_prediction_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cross_component_prediction_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_cross_component_prediction_enabled_flag.set(segment, 0L, index, value); } + /// Sets `cross_component_prediction_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cross_component_prediction_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_cross_component_prediction_enabled_flag(segment, 0L, value); } + /// Sets `cross_component_prediction_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags cross_component_prediction_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_cross_component_prediction_enabled_flag(this.segment(), index, value); return this; } + /// Sets `cross_component_prediction_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags cross_component_prediction_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_cross_component_prediction_enabled_flag(this.segment(), value); return this; } + + /// {@return `chroma_qp_offset_list_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_chroma_qp_offset_list_enabled_flag(MemorySegment segment, long index) { return (int) VH_chroma_qp_offset_list_enabled_flag.get(segment, 0L, index); } + /// {@return `chroma_qp_offset_list_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_chroma_qp_offset_list_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_chroma_qp_offset_list_enabled_flag(segment, 0L); } + /// {@return `chroma_qp_offset_list_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int chroma_qp_offset_list_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_chroma_qp_offset_list_enabled_flag(this.segment(), index); } + /// {@return `chroma_qp_offset_list_enabled_flag`} + public @CType("uint32_t : 1") int chroma_qp_offset_list_enabled_flag() { return StdVideoH265PpsFlags.get_chroma_qp_offset_list_enabled_flag(this.segment()); } + /// Sets `chroma_qp_offset_list_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_qp_offset_list_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_chroma_qp_offset_list_enabled_flag.set(segment, 0L, index, value); } + /// Sets `chroma_qp_offset_list_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_qp_offset_list_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_chroma_qp_offset_list_enabled_flag(segment, 0L, value); } + /// Sets `chroma_qp_offset_list_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags chroma_qp_offset_list_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_chroma_qp_offset_list_enabled_flag(this.segment(), index, value); return this; } + /// Sets `chroma_qp_offset_list_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags chroma_qp_offset_list_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_chroma_qp_offset_list_enabled_flag(this.segment(), value); return this; } + + /// {@return `pps_curr_pic_ref_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pps_curr_pic_ref_enabled_flag(MemorySegment segment, long index) { return (int) VH_pps_curr_pic_ref_enabled_flag.get(segment, 0L, index); } + /// {@return `pps_curr_pic_ref_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pps_curr_pic_ref_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_pps_curr_pic_ref_enabled_flag(segment, 0L); } + /// {@return `pps_curr_pic_ref_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pps_curr_pic_ref_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_pps_curr_pic_ref_enabled_flag(this.segment(), index); } + /// {@return `pps_curr_pic_ref_enabled_flag`} + public @CType("uint32_t : 1") int pps_curr_pic_ref_enabled_flag() { return StdVideoH265PpsFlags.get_pps_curr_pic_ref_enabled_flag(this.segment()); } + /// Sets `pps_curr_pic_ref_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_curr_pic_ref_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pps_curr_pic_ref_enabled_flag.set(segment, 0L, index, value); } + /// Sets `pps_curr_pic_ref_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_curr_pic_ref_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_curr_pic_ref_enabled_flag(segment, 0L, value); } + /// Sets `pps_curr_pic_ref_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_curr_pic_ref_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_curr_pic_ref_enabled_flag(this.segment(), index, value); return this; } + /// Sets `pps_curr_pic_ref_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_curr_pic_ref_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_curr_pic_ref_enabled_flag(this.segment(), value); return this; } + + /// {@return `residual_adaptive_colour_transform_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_residual_adaptive_colour_transform_enabled_flag(MemorySegment segment, long index) { return (int) VH_residual_adaptive_colour_transform_enabled_flag.get(segment, 0L, index); } + /// {@return `residual_adaptive_colour_transform_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_residual_adaptive_colour_transform_enabled_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_residual_adaptive_colour_transform_enabled_flag(segment, 0L); } + /// {@return `residual_adaptive_colour_transform_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int residual_adaptive_colour_transform_enabled_flagAt(long index) { return StdVideoH265PpsFlags.get_residual_adaptive_colour_transform_enabled_flag(this.segment(), index); } + /// {@return `residual_adaptive_colour_transform_enabled_flag`} + public @CType("uint32_t : 1") int residual_adaptive_colour_transform_enabled_flag() { return StdVideoH265PpsFlags.get_residual_adaptive_colour_transform_enabled_flag(this.segment()); } + /// Sets `residual_adaptive_colour_transform_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_residual_adaptive_colour_transform_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_residual_adaptive_colour_transform_enabled_flag.set(segment, 0L, index, value); } + /// Sets `residual_adaptive_colour_transform_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_residual_adaptive_colour_transform_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_residual_adaptive_colour_transform_enabled_flag(segment, 0L, value); } + /// Sets `residual_adaptive_colour_transform_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags residual_adaptive_colour_transform_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_residual_adaptive_colour_transform_enabled_flag(this.segment(), index, value); return this; } + /// Sets `residual_adaptive_colour_transform_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags residual_adaptive_colour_transform_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_residual_adaptive_colour_transform_enabled_flag(this.segment(), value); return this; } + + /// {@return `pps_slice_act_qp_offsets_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pps_slice_act_qp_offsets_present_flag(MemorySegment segment, long index) { return (int) VH_pps_slice_act_qp_offsets_present_flag.get(segment, 0L, index); } + /// {@return `pps_slice_act_qp_offsets_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pps_slice_act_qp_offsets_present_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_pps_slice_act_qp_offsets_present_flag(segment, 0L); } + /// {@return `pps_slice_act_qp_offsets_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pps_slice_act_qp_offsets_present_flagAt(long index) { return StdVideoH265PpsFlags.get_pps_slice_act_qp_offsets_present_flag(this.segment(), index); } + /// {@return `pps_slice_act_qp_offsets_present_flag`} + public @CType("uint32_t : 1") int pps_slice_act_qp_offsets_present_flag() { return StdVideoH265PpsFlags.get_pps_slice_act_qp_offsets_present_flag(this.segment()); } + /// Sets `pps_slice_act_qp_offsets_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_slice_act_qp_offsets_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pps_slice_act_qp_offsets_present_flag.set(segment, 0L, index, value); } + /// Sets `pps_slice_act_qp_offsets_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_slice_act_qp_offsets_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_slice_act_qp_offsets_present_flag(segment, 0L, value); } + /// Sets `pps_slice_act_qp_offsets_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_slice_act_qp_offsets_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_slice_act_qp_offsets_present_flag(this.segment(), index, value); return this; } + /// Sets `pps_slice_act_qp_offsets_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_slice_act_qp_offsets_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_slice_act_qp_offsets_present_flag(this.segment(), value); return this; } + + /// {@return `pps_palette_predictor_initializers_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pps_palette_predictor_initializers_present_flag(MemorySegment segment, long index) { return (int) VH_pps_palette_predictor_initializers_present_flag.get(segment, 0L, index); } + /// {@return `pps_palette_predictor_initializers_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pps_palette_predictor_initializers_present_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_pps_palette_predictor_initializers_present_flag(segment, 0L); } + /// {@return `pps_palette_predictor_initializers_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pps_palette_predictor_initializers_present_flagAt(long index) { return StdVideoH265PpsFlags.get_pps_palette_predictor_initializers_present_flag(this.segment(), index); } + /// {@return `pps_palette_predictor_initializers_present_flag`} + public @CType("uint32_t : 1") int pps_palette_predictor_initializers_present_flag() { return StdVideoH265PpsFlags.get_pps_palette_predictor_initializers_present_flag(this.segment()); } + /// Sets `pps_palette_predictor_initializers_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_palette_predictor_initializers_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pps_palette_predictor_initializers_present_flag.set(segment, 0L, index, value); } + /// Sets `pps_palette_predictor_initializers_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_palette_predictor_initializers_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_palette_predictor_initializers_present_flag(segment, 0L, value); } + /// Sets `pps_palette_predictor_initializers_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_palette_predictor_initializers_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_palette_predictor_initializers_present_flag(this.segment(), index, value); return this; } + /// Sets `pps_palette_predictor_initializers_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_palette_predictor_initializers_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_palette_predictor_initializers_present_flag(this.segment(), value); return this; } + + /// {@return `monochrome_palette_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_monochrome_palette_flag(MemorySegment segment, long index) { return (int) VH_monochrome_palette_flag.get(segment, 0L, index); } + /// {@return `monochrome_palette_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_monochrome_palette_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_monochrome_palette_flag(segment, 0L); } + /// {@return `monochrome_palette_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int monochrome_palette_flagAt(long index) { return StdVideoH265PpsFlags.get_monochrome_palette_flag(this.segment(), index); } + /// {@return `monochrome_palette_flag`} + public @CType("uint32_t : 1") int monochrome_palette_flag() { return StdVideoH265PpsFlags.get_monochrome_palette_flag(this.segment()); } + /// Sets `monochrome_palette_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_monochrome_palette_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_monochrome_palette_flag.set(segment, 0L, index, value); } + /// Sets `monochrome_palette_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_monochrome_palette_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_monochrome_palette_flag(segment, 0L, value); } + /// Sets `monochrome_palette_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags monochrome_palette_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_monochrome_palette_flag(this.segment(), index, value); return this; } + /// Sets `monochrome_palette_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags monochrome_palette_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_monochrome_palette_flag(this.segment(), value); return this; } + + /// {@return `pps_range_extension_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pps_range_extension_flag(MemorySegment segment, long index) { return (int) VH_pps_range_extension_flag.get(segment, 0L, index); } + /// {@return `pps_range_extension_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pps_range_extension_flag(MemorySegment segment) { return StdVideoH265PpsFlags.get_pps_range_extension_flag(segment, 0L); } + /// {@return `pps_range_extension_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pps_range_extension_flagAt(long index) { return StdVideoH265PpsFlags.get_pps_range_extension_flag(this.segment(), index); } + /// {@return `pps_range_extension_flag`} + public @CType("uint32_t : 1") int pps_range_extension_flag() { return StdVideoH265PpsFlags.get_pps_range_extension_flag(this.segment()); } + /// Sets `pps_range_extension_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pps_range_extension_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pps_range_extension_flag.set(segment, 0L, index, value); } + /// Sets `pps_range_extension_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pps_range_extension_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_range_extension_flag(segment, 0L, value); } + /// Sets `pps_range_extension_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_range_extension_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_range_extension_flag(this.segment(), index, value); return this; } + /// Sets `pps_range_extension_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PpsFlags pps_range_extension_flag(@CType("uint32_t : 1") int value) { StdVideoH265PpsFlags.set_pps_range_extension_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265PredictorPaletteEntries.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265PredictorPaletteEntries.java new file mode 100644 index 00000000..ebddcdd7 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265PredictorPaletteEntries.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### PredictorPaletteEntries +/// [VarHandle][#VH_PredictorPaletteEntries] - [Getter][#PredictorPaletteEntries()] - [Setter][#PredictorPaletteEntries(short)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265PredictorPaletteEntries { +/// uint16_t [ ][ ] PredictorPaletteEntries; +/// } StdVideoH265PredictorPaletteEntries; +/// ``` +public final class StdVideoH265PredictorPaletteEntries extends Struct { + /// The struct layout of `StdVideoH265PredictorPaletteEntries`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_SHORT.withName("PredictorPaletteEntries") + ); + /// The [VarHandle] of `PredictorPaletteEntries` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_PredictorPaletteEntries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("PredictorPaletteEntries")); + + /// Creates `StdVideoH265PredictorPaletteEntries` with the given segment. + /// @param segment the memory segment + public StdVideoH265PredictorPaletteEntries(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265PredictorPaletteEntries` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265PredictorPaletteEntries of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265PredictorPaletteEntries(segment); } + + /// Creates `StdVideoH265PredictorPaletteEntries` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265PredictorPaletteEntries ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265PredictorPaletteEntries(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265PredictorPaletteEntries` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265PredictorPaletteEntries ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265PredictorPaletteEntries(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265PredictorPaletteEntries` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265PredictorPaletteEntries` + public static StdVideoH265PredictorPaletteEntries alloc(SegmentAllocator allocator) { return new StdVideoH265PredictorPaletteEntries(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265PredictorPaletteEntries` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265PredictorPaletteEntries` + public static StdVideoH265PredictorPaletteEntries alloc(SegmentAllocator allocator, long count) { return new StdVideoH265PredictorPaletteEntries(allocator.allocate(LAYOUT, count)); } + + /// {@return `PredictorPaletteEntries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t [ ][ ]") short get_PredictorPaletteEntries(MemorySegment segment, long index) { return (short) VH_PredictorPaletteEntries.get(segment, 0L, index); } + /// {@return `PredictorPaletteEntries`} + /// @param segment the segment of the struct + public static @CType("uint16_t [ ][ ]") short get_PredictorPaletteEntries(MemorySegment segment) { return StdVideoH265PredictorPaletteEntries.get_PredictorPaletteEntries(segment, 0L); } + /// {@return `PredictorPaletteEntries` at the given index} + /// @param index the index + public @CType("uint16_t [ ][ ]") short PredictorPaletteEntriesAt(long index) { return StdVideoH265PredictorPaletteEntries.get_PredictorPaletteEntries(this.segment(), index); } + /// {@return `PredictorPaletteEntries`} + public @CType("uint16_t [ ][ ]") short PredictorPaletteEntries() { return StdVideoH265PredictorPaletteEntries.get_PredictorPaletteEntries(this.segment()); } + /// Sets `PredictorPaletteEntries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_PredictorPaletteEntries(MemorySegment segment, long index, @CType("uint16_t [ ][ ]") short value) { VH_PredictorPaletteEntries.set(segment, 0L, index, value); } + /// Sets `PredictorPaletteEntries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_PredictorPaletteEntries(MemorySegment segment, @CType("uint16_t [ ][ ]") short value) { StdVideoH265PredictorPaletteEntries.set_PredictorPaletteEntries(segment, 0L, value); } + /// Sets `PredictorPaletteEntries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265PredictorPaletteEntries PredictorPaletteEntriesAt(long index, @CType("uint16_t [ ][ ]") short value) { StdVideoH265PredictorPaletteEntries.set_PredictorPaletteEntries(this.segment(), index, value); return this; } + /// Sets `PredictorPaletteEntries` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265PredictorPaletteEntries PredictorPaletteEntries(@CType("uint16_t [ ][ ]") short value) { StdVideoH265PredictorPaletteEntries.set_PredictorPaletteEntries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ProfileTierLevel.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ProfileTierLevel.java new file mode 100644 index 00000000..1b927186 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ProfileTierLevel.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### general_profile_idc +/// [VarHandle][#VH_general_profile_idc] - [Getter][#general_profile_idc()] - [Setter][#general_profile_idc(int)] +/// ### general_level_idc +/// [VarHandle][#VH_general_level_idc] - [Getter][#general_level_idc()] - [Setter][#general_level_idc(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265ProfileTierLevel { +/// StdVideoH265ProfileTierLevelFlags flags; +/// StdVideoH265ProfileIdc general_profile_idc; +/// StdVideoH265LevelIdc general_level_idc; +/// } StdVideoH265ProfileTierLevel; +/// ``` +public final class StdVideoH265ProfileTierLevel extends Struct { + /// The struct layout of `StdVideoH265ProfileTierLevel`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoH265ProfileTierLevelFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("general_profile_idc"), + ValueLayout.JAVA_INT.withName("general_level_idc") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `general_profile_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_general_profile_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("general_profile_idc")); + /// The [VarHandle] of `general_level_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_general_level_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("general_level_idc")); + + /// Creates `StdVideoH265ProfileTierLevel` with the given segment. + /// @param segment the memory segment + public StdVideoH265ProfileTierLevel(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265ProfileTierLevel` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ProfileTierLevel of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ProfileTierLevel(segment); } + + /// Creates `StdVideoH265ProfileTierLevel` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ProfileTierLevel ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ProfileTierLevel(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265ProfileTierLevel` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ProfileTierLevel ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ProfileTierLevel(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265ProfileTierLevel` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265ProfileTierLevel` + public static StdVideoH265ProfileTierLevel alloc(SegmentAllocator allocator) { return new StdVideoH265ProfileTierLevel(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265ProfileTierLevel` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265ProfileTierLevel` + public static StdVideoH265ProfileTierLevel alloc(SegmentAllocator allocator, long count) { return new StdVideoH265ProfileTierLevel(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265ProfileTierLevelFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265ProfileTierLevelFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoH265ProfileTierLevel.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoH265ProfileTierLevelFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoH265ProfileTierLevel.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoH265ProfileTierLevelFlags") java.lang.foreign.MemorySegment flags() { return StdVideoH265ProfileTierLevel.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoH265ProfileTierLevelFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoH265ProfileTierLevelFlags") java.lang.foreign.MemorySegment value) { StdVideoH265ProfileTierLevel.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevel flagsAt(long index, @CType("StdVideoH265ProfileTierLevelFlags") java.lang.foreign.MemorySegment value) { StdVideoH265ProfileTierLevel.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevel flags(@CType("StdVideoH265ProfileTierLevelFlags") java.lang.foreign.MemorySegment value) { StdVideoH265ProfileTierLevel.set_flags(this.segment(), value); return this; } + + /// {@return `general_profile_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265ProfileIdc") int get_general_profile_idc(MemorySegment segment, long index) { return (int) VH_general_profile_idc.get(segment, 0L, index); } + /// {@return `general_profile_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265ProfileIdc") int get_general_profile_idc(MemorySegment segment) { return StdVideoH265ProfileTierLevel.get_general_profile_idc(segment, 0L); } + /// {@return `general_profile_idc` at the given index} + /// @param index the index + public @CType("StdVideoH265ProfileIdc") int general_profile_idcAt(long index) { return StdVideoH265ProfileTierLevel.get_general_profile_idc(this.segment(), index); } + /// {@return `general_profile_idc`} + public @CType("StdVideoH265ProfileIdc") int general_profile_idc() { return StdVideoH265ProfileTierLevel.get_general_profile_idc(this.segment()); } + /// Sets `general_profile_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_general_profile_idc(MemorySegment segment, long index, @CType("StdVideoH265ProfileIdc") int value) { VH_general_profile_idc.set(segment, 0L, index, value); } + /// Sets `general_profile_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_general_profile_idc(MemorySegment segment, @CType("StdVideoH265ProfileIdc") int value) { StdVideoH265ProfileTierLevel.set_general_profile_idc(segment, 0L, value); } + /// Sets `general_profile_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevel general_profile_idcAt(long index, @CType("StdVideoH265ProfileIdc") int value) { StdVideoH265ProfileTierLevel.set_general_profile_idc(this.segment(), index, value); return this; } + /// Sets `general_profile_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevel general_profile_idc(@CType("StdVideoH265ProfileIdc") int value) { StdVideoH265ProfileTierLevel.set_general_profile_idc(this.segment(), value); return this; } + + /// {@return `general_level_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265LevelIdc") int get_general_level_idc(MemorySegment segment, long index) { return (int) VH_general_level_idc.get(segment, 0L, index); } + /// {@return `general_level_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265LevelIdc") int get_general_level_idc(MemorySegment segment) { return StdVideoH265ProfileTierLevel.get_general_level_idc(segment, 0L); } + /// {@return `general_level_idc` at the given index} + /// @param index the index + public @CType("StdVideoH265LevelIdc") int general_level_idcAt(long index) { return StdVideoH265ProfileTierLevel.get_general_level_idc(this.segment(), index); } + /// {@return `general_level_idc`} + public @CType("StdVideoH265LevelIdc") int general_level_idc() { return StdVideoH265ProfileTierLevel.get_general_level_idc(this.segment()); } + /// Sets `general_level_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_general_level_idc(MemorySegment segment, long index, @CType("StdVideoH265LevelIdc") int value) { VH_general_level_idc.set(segment, 0L, index, value); } + /// Sets `general_level_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_general_level_idc(MemorySegment segment, @CType("StdVideoH265LevelIdc") int value) { StdVideoH265ProfileTierLevel.set_general_level_idc(segment, 0L, value); } + /// Sets `general_level_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevel general_level_idcAt(long index, @CType("StdVideoH265LevelIdc") int value) { StdVideoH265ProfileTierLevel.set_general_level_idc(this.segment(), index, value); return this; } + /// Sets `general_level_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevel general_level_idc(@CType("StdVideoH265LevelIdc") int value) { StdVideoH265ProfileTierLevel.set_general_level_idc(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ProfileTierLevelFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ProfileTierLevelFlags.java new file mode 100644 index 00000000..4e816925 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ProfileTierLevelFlags.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### general_tier_flag +/// [VarHandle][#VH_general_tier_flag] - [Getter][#general_tier_flag()] - [Setter][#general_tier_flag(int)] +/// ### general_progressive_source_flag +/// [VarHandle][#VH_general_progressive_source_flag] - [Getter][#general_progressive_source_flag()] - [Setter][#general_progressive_source_flag(int)] +/// ### general_interlaced_source_flag +/// [VarHandle][#VH_general_interlaced_source_flag] - [Getter][#general_interlaced_source_flag()] - [Setter][#general_interlaced_source_flag(int)] +/// ### general_non_packed_constraint_flag +/// [VarHandle][#VH_general_non_packed_constraint_flag] - [Getter][#general_non_packed_constraint_flag()] - [Setter][#general_non_packed_constraint_flag(int)] +/// ### general_frame_only_constraint_flag +/// [VarHandle][#VH_general_frame_only_constraint_flag] - [Getter][#general_frame_only_constraint_flag()] - [Setter][#general_frame_only_constraint_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265ProfileTierLevelFlags { +/// uint32_t : 1 general_tier_flag; +/// uint32_t : 1 general_progressive_source_flag; +/// uint32_t : 1 general_interlaced_source_flag; +/// uint32_t : 1 general_non_packed_constraint_flag; +/// uint32_t : 1 general_frame_only_constraint_flag; +/// } StdVideoH265ProfileTierLevelFlags; +/// ``` +public final class StdVideoH265ProfileTierLevelFlags extends Struct { + /// The struct layout of `StdVideoH265ProfileTierLevelFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("general_tier_flag"), + ValueLayout.JAVA_INT.withName("general_progressive_source_flag"), + ValueLayout.JAVA_INT.withName("general_interlaced_source_flag"), + ValueLayout.JAVA_INT.withName("general_non_packed_constraint_flag"), + ValueLayout.JAVA_INT.withName("general_frame_only_constraint_flag") + ); + /// The [VarHandle] of `general_tier_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_general_tier_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("general_tier_flag")); + /// The [VarHandle] of `general_progressive_source_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_general_progressive_source_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("general_progressive_source_flag")); + /// The [VarHandle] of `general_interlaced_source_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_general_interlaced_source_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("general_interlaced_source_flag")); + /// The [VarHandle] of `general_non_packed_constraint_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_general_non_packed_constraint_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("general_non_packed_constraint_flag")); + /// The [VarHandle] of `general_frame_only_constraint_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_general_frame_only_constraint_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("general_frame_only_constraint_flag")); + + /// Creates `StdVideoH265ProfileTierLevelFlags` with the given segment. + /// @param segment the memory segment + public StdVideoH265ProfileTierLevelFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265ProfileTierLevelFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ProfileTierLevelFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ProfileTierLevelFlags(segment); } + + /// Creates `StdVideoH265ProfileTierLevelFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ProfileTierLevelFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ProfileTierLevelFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265ProfileTierLevelFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ProfileTierLevelFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ProfileTierLevelFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265ProfileTierLevelFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265ProfileTierLevelFlags` + public static StdVideoH265ProfileTierLevelFlags alloc(SegmentAllocator allocator) { return new StdVideoH265ProfileTierLevelFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265ProfileTierLevelFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265ProfileTierLevelFlags` + public static StdVideoH265ProfileTierLevelFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoH265ProfileTierLevelFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `general_tier_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_general_tier_flag(MemorySegment segment, long index) { return (int) VH_general_tier_flag.get(segment, 0L, index); } + /// {@return `general_tier_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_general_tier_flag(MemorySegment segment) { return StdVideoH265ProfileTierLevelFlags.get_general_tier_flag(segment, 0L); } + /// {@return `general_tier_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int general_tier_flagAt(long index) { return StdVideoH265ProfileTierLevelFlags.get_general_tier_flag(this.segment(), index); } + /// {@return `general_tier_flag`} + public @CType("uint32_t : 1") int general_tier_flag() { return StdVideoH265ProfileTierLevelFlags.get_general_tier_flag(this.segment()); } + /// Sets `general_tier_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_general_tier_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_general_tier_flag.set(segment, 0L, index, value); } + /// Sets `general_tier_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_general_tier_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_tier_flag(segment, 0L, value); } + /// Sets `general_tier_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevelFlags general_tier_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_tier_flag(this.segment(), index, value); return this; } + /// Sets `general_tier_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevelFlags general_tier_flag(@CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_tier_flag(this.segment(), value); return this; } + + /// {@return `general_progressive_source_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_general_progressive_source_flag(MemorySegment segment, long index) { return (int) VH_general_progressive_source_flag.get(segment, 0L, index); } + /// {@return `general_progressive_source_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_general_progressive_source_flag(MemorySegment segment) { return StdVideoH265ProfileTierLevelFlags.get_general_progressive_source_flag(segment, 0L); } + /// {@return `general_progressive_source_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int general_progressive_source_flagAt(long index) { return StdVideoH265ProfileTierLevelFlags.get_general_progressive_source_flag(this.segment(), index); } + /// {@return `general_progressive_source_flag`} + public @CType("uint32_t : 1") int general_progressive_source_flag() { return StdVideoH265ProfileTierLevelFlags.get_general_progressive_source_flag(this.segment()); } + /// Sets `general_progressive_source_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_general_progressive_source_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_general_progressive_source_flag.set(segment, 0L, index, value); } + /// Sets `general_progressive_source_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_general_progressive_source_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_progressive_source_flag(segment, 0L, value); } + /// Sets `general_progressive_source_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevelFlags general_progressive_source_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_progressive_source_flag(this.segment(), index, value); return this; } + /// Sets `general_progressive_source_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevelFlags general_progressive_source_flag(@CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_progressive_source_flag(this.segment(), value); return this; } + + /// {@return `general_interlaced_source_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_general_interlaced_source_flag(MemorySegment segment, long index) { return (int) VH_general_interlaced_source_flag.get(segment, 0L, index); } + /// {@return `general_interlaced_source_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_general_interlaced_source_flag(MemorySegment segment) { return StdVideoH265ProfileTierLevelFlags.get_general_interlaced_source_flag(segment, 0L); } + /// {@return `general_interlaced_source_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int general_interlaced_source_flagAt(long index) { return StdVideoH265ProfileTierLevelFlags.get_general_interlaced_source_flag(this.segment(), index); } + /// {@return `general_interlaced_source_flag`} + public @CType("uint32_t : 1") int general_interlaced_source_flag() { return StdVideoH265ProfileTierLevelFlags.get_general_interlaced_source_flag(this.segment()); } + /// Sets `general_interlaced_source_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_general_interlaced_source_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_general_interlaced_source_flag.set(segment, 0L, index, value); } + /// Sets `general_interlaced_source_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_general_interlaced_source_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_interlaced_source_flag(segment, 0L, value); } + /// Sets `general_interlaced_source_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevelFlags general_interlaced_source_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_interlaced_source_flag(this.segment(), index, value); return this; } + /// Sets `general_interlaced_source_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevelFlags general_interlaced_source_flag(@CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_interlaced_source_flag(this.segment(), value); return this; } + + /// {@return `general_non_packed_constraint_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_general_non_packed_constraint_flag(MemorySegment segment, long index) { return (int) VH_general_non_packed_constraint_flag.get(segment, 0L, index); } + /// {@return `general_non_packed_constraint_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_general_non_packed_constraint_flag(MemorySegment segment) { return StdVideoH265ProfileTierLevelFlags.get_general_non_packed_constraint_flag(segment, 0L); } + /// {@return `general_non_packed_constraint_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int general_non_packed_constraint_flagAt(long index) { return StdVideoH265ProfileTierLevelFlags.get_general_non_packed_constraint_flag(this.segment(), index); } + /// {@return `general_non_packed_constraint_flag`} + public @CType("uint32_t : 1") int general_non_packed_constraint_flag() { return StdVideoH265ProfileTierLevelFlags.get_general_non_packed_constraint_flag(this.segment()); } + /// Sets `general_non_packed_constraint_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_general_non_packed_constraint_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_general_non_packed_constraint_flag.set(segment, 0L, index, value); } + /// Sets `general_non_packed_constraint_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_general_non_packed_constraint_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_non_packed_constraint_flag(segment, 0L, value); } + /// Sets `general_non_packed_constraint_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevelFlags general_non_packed_constraint_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_non_packed_constraint_flag(this.segment(), index, value); return this; } + /// Sets `general_non_packed_constraint_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevelFlags general_non_packed_constraint_flag(@CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_non_packed_constraint_flag(this.segment(), value); return this; } + + /// {@return `general_frame_only_constraint_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_general_frame_only_constraint_flag(MemorySegment segment, long index) { return (int) VH_general_frame_only_constraint_flag.get(segment, 0L, index); } + /// {@return `general_frame_only_constraint_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_general_frame_only_constraint_flag(MemorySegment segment) { return StdVideoH265ProfileTierLevelFlags.get_general_frame_only_constraint_flag(segment, 0L); } + /// {@return `general_frame_only_constraint_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int general_frame_only_constraint_flagAt(long index) { return StdVideoH265ProfileTierLevelFlags.get_general_frame_only_constraint_flag(this.segment(), index); } + /// {@return `general_frame_only_constraint_flag`} + public @CType("uint32_t : 1") int general_frame_only_constraint_flag() { return StdVideoH265ProfileTierLevelFlags.get_general_frame_only_constraint_flag(this.segment()); } + /// Sets `general_frame_only_constraint_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_general_frame_only_constraint_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_general_frame_only_constraint_flag.set(segment, 0L, index, value); } + /// Sets `general_frame_only_constraint_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_general_frame_only_constraint_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_frame_only_constraint_flag(segment, 0L, value); } + /// Sets `general_frame_only_constraint_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevelFlags general_frame_only_constraint_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_frame_only_constraint_flag(this.segment(), index, value); return this; } + /// Sets `general_frame_only_constraint_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ProfileTierLevelFlags general_frame_only_constraint_flag(@CType("uint32_t : 1") int value) { StdVideoH265ProfileTierLevelFlags.set_general_frame_only_constraint_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ScalingLists.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ScalingLists.java new file mode 100644 index 00000000..288f7092 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ScalingLists.java @@ -0,0 +1,296 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### ScalingList4x4 +/// [VarHandle][#VH_ScalingList4x4] - [Getter][#ScalingList4x4()] - [Setter][#ScalingList4x4(byte)] +/// ### ScalingList8x8 +/// [VarHandle][#VH_ScalingList8x8] - [Getter][#ScalingList8x8()] - [Setter][#ScalingList8x8(byte)] +/// ### ScalingList16x16 +/// [VarHandle][#VH_ScalingList16x16] - [Getter][#ScalingList16x16()] - [Setter][#ScalingList16x16(byte)] +/// ### ScalingList32x32 +/// [VarHandle][#VH_ScalingList32x32] - [Getter][#ScalingList32x32()] - [Setter][#ScalingList32x32(byte)] +/// ### ScalingListDCCoef16x16 +/// [VarHandle][#VH_ScalingListDCCoef16x16] - [Getter][#ScalingListDCCoef16x16()] - [Setter][#ScalingListDCCoef16x16(byte)] +/// ### ScalingListDCCoef32x32 +/// [VarHandle][#VH_ScalingListDCCoef32x32] - [Getter][#ScalingListDCCoef32x32()] - [Setter][#ScalingListDCCoef32x32(byte)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265ScalingLists { +/// uint8_t [ ][ ] ScalingList4x4; +/// uint8_t [ ][ ] ScalingList8x8; +/// uint8_t [ ][ ] ScalingList16x16; +/// uint8_t [ ][ ] ScalingList32x32; +/// uint8_t [ ] ScalingListDCCoef16x16; +/// uint8_t [ ] ScalingListDCCoef32x32; +/// } StdVideoH265ScalingLists; +/// ``` +public final class StdVideoH265ScalingLists extends Struct { + /// The struct layout of `StdVideoH265ScalingLists`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_BYTE.withName("ScalingList4x4"), + ValueLayout.JAVA_BYTE.withName("ScalingList8x8"), + ValueLayout.JAVA_BYTE.withName("ScalingList16x16"), + ValueLayout.JAVA_BYTE.withName("ScalingList32x32"), + ValueLayout.JAVA_BYTE.withName("ScalingListDCCoef16x16"), + ValueLayout.JAVA_BYTE.withName("ScalingListDCCoef32x32") + ); + /// The [VarHandle] of `ScalingList4x4` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ScalingList4x4 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ScalingList4x4")); + /// The [VarHandle] of `ScalingList8x8` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ScalingList8x8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ScalingList8x8")); + /// The [VarHandle] of `ScalingList16x16` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ScalingList16x16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ScalingList16x16")); + /// The [VarHandle] of `ScalingList32x32` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ScalingList32x32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ScalingList32x32")); + /// The [VarHandle] of `ScalingListDCCoef16x16` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ScalingListDCCoef16x16 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ScalingListDCCoef16x16")); + /// The [VarHandle] of `ScalingListDCCoef32x32` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_ScalingListDCCoef32x32 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("ScalingListDCCoef32x32")); + + /// Creates `StdVideoH265ScalingLists` with the given segment. + /// @param segment the memory segment + public StdVideoH265ScalingLists(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265ScalingLists` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ScalingLists of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ScalingLists(segment); } + + /// Creates `StdVideoH265ScalingLists` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ScalingLists ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ScalingLists(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265ScalingLists` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ScalingLists ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ScalingLists(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265ScalingLists` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265ScalingLists` + public static StdVideoH265ScalingLists alloc(SegmentAllocator allocator) { return new StdVideoH265ScalingLists(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265ScalingLists` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265ScalingLists` + public static StdVideoH265ScalingLists alloc(SegmentAllocator allocator, long count) { return new StdVideoH265ScalingLists(allocator.allocate(LAYOUT, count)); } + + /// {@return `ScalingList4x4` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ][ ]") byte get_ScalingList4x4(MemorySegment segment, long index) { return (byte) VH_ScalingList4x4.get(segment, 0L, index); } + /// {@return `ScalingList4x4`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ][ ]") byte get_ScalingList4x4(MemorySegment segment) { return StdVideoH265ScalingLists.get_ScalingList4x4(segment, 0L); } + /// {@return `ScalingList4x4` at the given index} + /// @param index the index + public @CType("uint8_t [ ][ ]") byte ScalingList4x4At(long index) { return StdVideoH265ScalingLists.get_ScalingList4x4(this.segment(), index); } + /// {@return `ScalingList4x4`} + public @CType("uint8_t [ ][ ]") byte ScalingList4x4() { return StdVideoH265ScalingLists.get_ScalingList4x4(this.segment()); } + /// Sets `ScalingList4x4` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ScalingList4x4(MemorySegment segment, long index, @CType("uint8_t [ ][ ]") byte value) { VH_ScalingList4x4.set(segment, 0L, index, value); } + /// Sets `ScalingList4x4` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ScalingList4x4(MemorySegment segment, @CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList4x4(segment, 0L, value); } + /// Sets `ScalingList4x4` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingList4x4At(long index, @CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList4x4(this.segment(), index, value); return this; } + /// Sets `ScalingList4x4` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingList4x4(@CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList4x4(this.segment(), value); return this; } + + /// {@return `ScalingList8x8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ][ ]") byte get_ScalingList8x8(MemorySegment segment, long index) { return (byte) VH_ScalingList8x8.get(segment, 0L, index); } + /// {@return `ScalingList8x8`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ][ ]") byte get_ScalingList8x8(MemorySegment segment) { return StdVideoH265ScalingLists.get_ScalingList8x8(segment, 0L); } + /// {@return `ScalingList8x8` at the given index} + /// @param index the index + public @CType("uint8_t [ ][ ]") byte ScalingList8x8At(long index) { return StdVideoH265ScalingLists.get_ScalingList8x8(this.segment(), index); } + /// {@return `ScalingList8x8`} + public @CType("uint8_t [ ][ ]") byte ScalingList8x8() { return StdVideoH265ScalingLists.get_ScalingList8x8(this.segment()); } + /// Sets `ScalingList8x8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ScalingList8x8(MemorySegment segment, long index, @CType("uint8_t [ ][ ]") byte value) { VH_ScalingList8x8.set(segment, 0L, index, value); } + /// Sets `ScalingList8x8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ScalingList8x8(MemorySegment segment, @CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList8x8(segment, 0L, value); } + /// Sets `ScalingList8x8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingList8x8At(long index, @CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList8x8(this.segment(), index, value); return this; } + /// Sets `ScalingList8x8` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingList8x8(@CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList8x8(this.segment(), value); return this; } + + /// {@return `ScalingList16x16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ][ ]") byte get_ScalingList16x16(MemorySegment segment, long index) { return (byte) VH_ScalingList16x16.get(segment, 0L, index); } + /// {@return `ScalingList16x16`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ][ ]") byte get_ScalingList16x16(MemorySegment segment) { return StdVideoH265ScalingLists.get_ScalingList16x16(segment, 0L); } + /// {@return `ScalingList16x16` at the given index} + /// @param index the index + public @CType("uint8_t [ ][ ]") byte ScalingList16x16At(long index) { return StdVideoH265ScalingLists.get_ScalingList16x16(this.segment(), index); } + /// {@return `ScalingList16x16`} + public @CType("uint8_t [ ][ ]") byte ScalingList16x16() { return StdVideoH265ScalingLists.get_ScalingList16x16(this.segment()); } + /// Sets `ScalingList16x16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ScalingList16x16(MemorySegment segment, long index, @CType("uint8_t [ ][ ]") byte value) { VH_ScalingList16x16.set(segment, 0L, index, value); } + /// Sets `ScalingList16x16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ScalingList16x16(MemorySegment segment, @CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList16x16(segment, 0L, value); } + /// Sets `ScalingList16x16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingList16x16At(long index, @CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList16x16(this.segment(), index, value); return this; } + /// Sets `ScalingList16x16` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingList16x16(@CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList16x16(this.segment(), value); return this; } + + /// {@return `ScalingList32x32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ][ ]") byte get_ScalingList32x32(MemorySegment segment, long index) { return (byte) VH_ScalingList32x32.get(segment, 0L, index); } + /// {@return `ScalingList32x32`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ][ ]") byte get_ScalingList32x32(MemorySegment segment) { return StdVideoH265ScalingLists.get_ScalingList32x32(segment, 0L); } + /// {@return `ScalingList32x32` at the given index} + /// @param index the index + public @CType("uint8_t [ ][ ]") byte ScalingList32x32At(long index) { return StdVideoH265ScalingLists.get_ScalingList32x32(this.segment(), index); } + /// {@return `ScalingList32x32`} + public @CType("uint8_t [ ][ ]") byte ScalingList32x32() { return StdVideoH265ScalingLists.get_ScalingList32x32(this.segment()); } + /// Sets `ScalingList32x32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ScalingList32x32(MemorySegment segment, long index, @CType("uint8_t [ ][ ]") byte value) { VH_ScalingList32x32.set(segment, 0L, index, value); } + /// Sets `ScalingList32x32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ScalingList32x32(MemorySegment segment, @CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList32x32(segment, 0L, value); } + /// Sets `ScalingList32x32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingList32x32At(long index, @CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList32x32(this.segment(), index, value); return this; } + /// Sets `ScalingList32x32` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingList32x32(@CType("uint8_t [ ][ ]") byte value) { StdVideoH265ScalingLists.set_ScalingList32x32(this.segment(), value); return this; } + + /// {@return `ScalingListDCCoef16x16` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_ScalingListDCCoef16x16(MemorySegment segment, long index) { return (byte) VH_ScalingListDCCoef16x16.get(segment, 0L, index); } + /// {@return `ScalingListDCCoef16x16`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_ScalingListDCCoef16x16(MemorySegment segment) { return StdVideoH265ScalingLists.get_ScalingListDCCoef16x16(segment, 0L); } + /// {@return `ScalingListDCCoef16x16` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte ScalingListDCCoef16x16At(long index) { return StdVideoH265ScalingLists.get_ScalingListDCCoef16x16(this.segment(), index); } + /// {@return `ScalingListDCCoef16x16`} + public @CType("uint8_t [ ]") byte ScalingListDCCoef16x16() { return StdVideoH265ScalingLists.get_ScalingListDCCoef16x16(this.segment()); } + /// Sets `ScalingListDCCoef16x16` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ScalingListDCCoef16x16(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_ScalingListDCCoef16x16.set(segment, 0L, index, value); } + /// Sets `ScalingListDCCoef16x16` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ScalingListDCCoef16x16(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoH265ScalingLists.set_ScalingListDCCoef16x16(segment, 0L, value); } + /// Sets `ScalingListDCCoef16x16` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingListDCCoef16x16At(long index, @CType("uint8_t [ ]") byte value) { StdVideoH265ScalingLists.set_ScalingListDCCoef16x16(this.segment(), index, value); return this; } + /// Sets `ScalingListDCCoef16x16` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingListDCCoef16x16(@CType("uint8_t [ ]") byte value) { StdVideoH265ScalingLists.set_ScalingListDCCoef16x16(this.segment(), value); return this; } + + /// {@return `ScalingListDCCoef32x32` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t [ ]") byte get_ScalingListDCCoef32x32(MemorySegment segment, long index) { return (byte) VH_ScalingListDCCoef32x32.get(segment, 0L, index); } + /// {@return `ScalingListDCCoef32x32`} + /// @param segment the segment of the struct + public static @CType("uint8_t [ ]") byte get_ScalingListDCCoef32x32(MemorySegment segment) { return StdVideoH265ScalingLists.get_ScalingListDCCoef32x32(segment, 0L); } + /// {@return `ScalingListDCCoef32x32` at the given index} + /// @param index the index + public @CType("uint8_t [ ]") byte ScalingListDCCoef32x32At(long index) { return StdVideoH265ScalingLists.get_ScalingListDCCoef32x32(this.segment(), index); } + /// {@return `ScalingListDCCoef32x32`} + public @CType("uint8_t [ ]") byte ScalingListDCCoef32x32() { return StdVideoH265ScalingLists.get_ScalingListDCCoef32x32(this.segment()); } + /// Sets `ScalingListDCCoef32x32` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_ScalingListDCCoef32x32(MemorySegment segment, long index, @CType("uint8_t [ ]") byte value) { VH_ScalingListDCCoef32x32.set(segment, 0L, index, value); } + /// Sets `ScalingListDCCoef32x32` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_ScalingListDCCoef32x32(MemorySegment segment, @CType("uint8_t [ ]") byte value) { StdVideoH265ScalingLists.set_ScalingListDCCoef32x32(segment, 0L, value); } + /// Sets `ScalingListDCCoef32x32` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingListDCCoef32x32At(long index, @CType("uint8_t [ ]") byte value) { StdVideoH265ScalingLists.set_ScalingListDCCoef32x32(this.segment(), index, value); return this; } + /// Sets `ScalingListDCCoef32x32` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ScalingLists ScalingListDCCoef32x32(@CType("uint8_t [ ]") byte value) { StdVideoH265ScalingLists.set_ScalingListDCCoef32x32(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SequenceParameterSet.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SequenceParameterSet.java new file mode 100644 index 00000000..722a9a2e --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SequenceParameterSet.java @@ -0,0 +1,1517 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### chroma_format_idc +/// [VarHandle][#VH_chroma_format_idc] - [Getter][#chroma_format_idc()] - [Setter][#chroma_format_idc(int)] +/// ### pic_width_in_luma_samples +/// [VarHandle][#VH_pic_width_in_luma_samples] - [Getter][#pic_width_in_luma_samples()] - [Setter][#pic_width_in_luma_samples(int)] +/// ### pic_height_in_luma_samples +/// [VarHandle][#VH_pic_height_in_luma_samples] - [Getter][#pic_height_in_luma_samples()] - [Setter][#pic_height_in_luma_samples(int)] +/// ### sps_video_parameter_set_id +/// [VarHandle][#VH_sps_video_parameter_set_id] - [Getter][#sps_video_parameter_set_id()] - [Setter][#sps_video_parameter_set_id(byte)] +/// ### sps_max_sub_layers_minus1 +/// [VarHandle][#VH_sps_max_sub_layers_minus1] - [Getter][#sps_max_sub_layers_minus1()] - [Setter][#sps_max_sub_layers_minus1(byte)] +/// ### sps_seq_parameter_set_id +/// [VarHandle][#VH_sps_seq_parameter_set_id] - [Getter][#sps_seq_parameter_set_id()] - [Setter][#sps_seq_parameter_set_id(byte)] +/// ### bit_depth_luma_minus8 +/// [VarHandle][#VH_bit_depth_luma_minus8] - [Getter][#bit_depth_luma_minus8()] - [Setter][#bit_depth_luma_minus8(byte)] +/// ### bit_depth_chroma_minus8 +/// [VarHandle][#VH_bit_depth_chroma_minus8] - [Getter][#bit_depth_chroma_minus8()] - [Setter][#bit_depth_chroma_minus8(byte)] +/// ### log2_max_pic_order_cnt_lsb_minus4 +/// [VarHandle][#VH_log2_max_pic_order_cnt_lsb_minus4] - [Getter][#log2_max_pic_order_cnt_lsb_minus4()] - [Setter][#log2_max_pic_order_cnt_lsb_minus4(byte)] +/// ### log2_min_luma_coding_block_size_minus3 +/// [VarHandle][#VH_log2_min_luma_coding_block_size_minus3] - [Getter][#log2_min_luma_coding_block_size_minus3()] - [Setter][#log2_min_luma_coding_block_size_minus3(byte)] +/// ### log2_diff_max_min_luma_coding_block_size +/// [VarHandle][#VH_log2_diff_max_min_luma_coding_block_size] - [Getter][#log2_diff_max_min_luma_coding_block_size()] - [Setter][#log2_diff_max_min_luma_coding_block_size(byte)] +/// ### log2_min_luma_transform_block_size_minus2 +/// [VarHandle][#VH_log2_min_luma_transform_block_size_minus2] - [Getter][#log2_min_luma_transform_block_size_minus2()] - [Setter][#log2_min_luma_transform_block_size_minus2(byte)] +/// ### log2_diff_max_min_luma_transform_block_size +/// [VarHandle][#VH_log2_diff_max_min_luma_transform_block_size] - [Getter][#log2_diff_max_min_luma_transform_block_size()] - [Setter][#log2_diff_max_min_luma_transform_block_size(byte)] +/// ### max_transform_hierarchy_depth_inter +/// [VarHandle][#VH_max_transform_hierarchy_depth_inter] - [Getter][#max_transform_hierarchy_depth_inter()] - [Setter][#max_transform_hierarchy_depth_inter(byte)] +/// ### max_transform_hierarchy_depth_intra +/// [VarHandle][#VH_max_transform_hierarchy_depth_intra] - [Getter][#max_transform_hierarchy_depth_intra()] - [Setter][#max_transform_hierarchy_depth_intra(byte)] +/// ### num_short_term_ref_pic_sets +/// [VarHandle][#VH_num_short_term_ref_pic_sets] - [Getter][#num_short_term_ref_pic_sets()] - [Setter][#num_short_term_ref_pic_sets(byte)] +/// ### num_long_term_ref_pics_sps +/// [VarHandle][#VH_num_long_term_ref_pics_sps] - [Getter][#num_long_term_ref_pics_sps()] - [Setter][#num_long_term_ref_pics_sps(byte)] +/// ### pcm_sample_bit_depth_luma_minus1 +/// [VarHandle][#VH_pcm_sample_bit_depth_luma_minus1] - [Getter][#pcm_sample_bit_depth_luma_minus1()] - [Setter][#pcm_sample_bit_depth_luma_minus1(byte)] +/// ### pcm_sample_bit_depth_chroma_minus1 +/// [VarHandle][#VH_pcm_sample_bit_depth_chroma_minus1] - [Getter][#pcm_sample_bit_depth_chroma_minus1()] - [Setter][#pcm_sample_bit_depth_chroma_minus1(byte)] +/// ### log2_min_pcm_luma_coding_block_size_minus3 +/// [VarHandle][#VH_log2_min_pcm_luma_coding_block_size_minus3] - [Getter][#log2_min_pcm_luma_coding_block_size_minus3()] - [Setter][#log2_min_pcm_luma_coding_block_size_minus3(byte)] +/// ### log2_diff_max_min_pcm_luma_coding_block_size +/// [VarHandle][#VH_log2_diff_max_min_pcm_luma_coding_block_size] - [Getter][#log2_diff_max_min_pcm_luma_coding_block_size()] - [Setter][#log2_diff_max_min_pcm_luma_coding_block_size(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### reserved2 +/// [VarHandle][#VH_reserved2] - [Getter][#reserved2()] - [Setter][#reserved2(byte)] +/// ### palette_max_size +/// [VarHandle][#VH_palette_max_size] - [Getter][#palette_max_size()] - [Setter][#palette_max_size(byte)] +/// ### delta_palette_max_predictor_size +/// [VarHandle][#VH_delta_palette_max_predictor_size] - [Getter][#delta_palette_max_predictor_size()] - [Setter][#delta_palette_max_predictor_size(byte)] +/// ### motion_vector_resolution_control_idc +/// [VarHandle][#VH_motion_vector_resolution_control_idc] - [Getter][#motion_vector_resolution_control_idc()] - [Setter][#motion_vector_resolution_control_idc(byte)] +/// ### sps_num_palette_predictor_initializers_minus1 +/// [VarHandle][#VH_sps_num_palette_predictor_initializers_minus1] - [Getter][#sps_num_palette_predictor_initializers_minus1()] - [Setter][#sps_num_palette_predictor_initializers_minus1(byte)] +/// ### conf_win_left_offset +/// [VarHandle][#VH_conf_win_left_offset] - [Getter][#conf_win_left_offset()] - [Setter][#conf_win_left_offset(int)] +/// ### conf_win_right_offset +/// [VarHandle][#VH_conf_win_right_offset] - [Getter][#conf_win_right_offset()] - [Setter][#conf_win_right_offset(int)] +/// ### conf_win_top_offset +/// [VarHandle][#VH_conf_win_top_offset] - [Getter][#conf_win_top_offset()] - [Setter][#conf_win_top_offset(int)] +/// ### conf_win_bottom_offset +/// [VarHandle][#VH_conf_win_bottom_offset] - [Getter][#conf_win_bottom_offset()] - [Setter][#conf_win_bottom_offset(int)] +/// ### pProfileTierLevel +/// [VarHandle][#VH_pProfileTierLevel] - [Getter][#pProfileTierLevel()] - [Setter][#pProfileTierLevel(java.lang.foreign.MemorySegment)] +/// ### pDecPicBufMgr +/// [VarHandle][#VH_pDecPicBufMgr] - [Getter][#pDecPicBufMgr()] - [Setter][#pDecPicBufMgr(java.lang.foreign.MemorySegment)] +/// ### pScalingLists +/// [VarHandle][#VH_pScalingLists] - [Getter][#pScalingLists()] - [Setter][#pScalingLists(java.lang.foreign.MemorySegment)] +/// ### pShortTermRefPicSet +/// [VarHandle][#VH_pShortTermRefPicSet] - [Getter][#pShortTermRefPicSet()] - [Setter][#pShortTermRefPicSet(java.lang.foreign.MemorySegment)] +/// ### pLongTermRefPicsSps +/// [VarHandle][#VH_pLongTermRefPicsSps] - [Getter][#pLongTermRefPicsSps()] - [Setter][#pLongTermRefPicsSps(java.lang.foreign.MemorySegment)] +/// ### pSequenceParameterSetVui +/// [VarHandle][#VH_pSequenceParameterSetVui] - [Getter][#pSequenceParameterSetVui()] - [Setter][#pSequenceParameterSetVui(java.lang.foreign.MemorySegment)] +/// ### pPredictorPaletteEntries +/// [VarHandle][#VH_pPredictorPaletteEntries] - [Getter][#pPredictorPaletteEntries()] - [Setter][#pPredictorPaletteEntries(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265SequenceParameterSet { +/// StdVideoH265SpsFlags flags; +/// StdVideoH265ChromaFormatIdc chroma_format_idc; +/// uint32_t pic_width_in_luma_samples; +/// uint32_t pic_height_in_luma_samples; +/// uint8_t sps_video_parameter_set_id; +/// uint8_t sps_max_sub_layers_minus1; +/// uint8_t sps_seq_parameter_set_id; +/// uint8_t bit_depth_luma_minus8; +/// uint8_t bit_depth_chroma_minus8; +/// uint8_t log2_max_pic_order_cnt_lsb_minus4; +/// uint8_t log2_min_luma_coding_block_size_minus3; +/// uint8_t log2_diff_max_min_luma_coding_block_size; +/// uint8_t log2_min_luma_transform_block_size_minus2; +/// uint8_t log2_diff_max_min_luma_transform_block_size; +/// uint8_t max_transform_hierarchy_depth_inter; +/// uint8_t max_transform_hierarchy_depth_intra; +/// uint8_t num_short_term_ref_pic_sets; +/// uint8_t num_long_term_ref_pics_sps; +/// uint8_t pcm_sample_bit_depth_luma_minus1; +/// uint8_t pcm_sample_bit_depth_chroma_minus1; +/// uint8_t log2_min_pcm_luma_coding_block_size_minus3; +/// uint8_t log2_diff_max_min_pcm_luma_coding_block_size; +/// uint8_t reserved1; +/// uint8_t reserved2; +/// uint8_t palette_max_size; +/// uint8_t delta_palette_max_predictor_size; +/// uint8_t motion_vector_resolution_control_idc; +/// uint8_t sps_num_palette_predictor_initializers_minus1; +/// uint32_t conf_win_left_offset; +/// uint32_t conf_win_right_offset; +/// uint32_t conf_win_top_offset; +/// uint32_t conf_win_bottom_offset; +/// const StdVideoH265ProfileTierLevel * pProfileTierLevel; +/// const StdVideoH265DecPicBufMgr * pDecPicBufMgr; +/// const StdVideoH265ScalingLists * pScalingLists; +/// const StdVideoH265ShortTermRefPicSet * pShortTermRefPicSet; +/// const StdVideoH265LongTermRefPicsSps * pLongTermRefPicsSps; +/// const StdVideoH265SequenceParameterSetVui * pSequenceParameterSetVui; +/// const StdVideoH265PredictorPaletteEntries * pPredictorPaletteEntries; +/// } StdVideoH265SequenceParameterSet; +/// ``` +public final class StdVideoH265SequenceParameterSet extends Struct { + /// The struct layout of `StdVideoH265SequenceParameterSet`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoH265SpsFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("chroma_format_idc"), + ValueLayout.JAVA_INT.withName("pic_width_in_luma_samples"), + ValueLayout.JAVA_INT.withName("pic_height_in_luma_samples"), + ValueLayout.JAVA_BYTE.withName("sps_video_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("sps_max_sub_layers_minus1"), + ValueLayout.JAVA_BYTE.withName("sps_seq_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("bit_depth_luma_minus8"), + ValueLayout.JAVA_BYTE.withName("bit_depth_chroma_minus8"), + ValueLayout.JAVA_BYTE.withName("log2_max_pic_order_cnt_lsb_minus4"), + ValueLayout.JAVA_BYTE.withName("log2_min_luma_coding_block_size_minus3"), + ValueLayout.JAVA_BYTE.withName("log2_diff_max_min_luma_coding_block_size"), + ValueLayout.JAVA_BYTE.withName("log2_min_luma_transform_block_size_minus2"), + ValueLayout.JAVA_BYTE.withName("log2_diff_max_min_luma_transform_block_size"), + ValueLayout.JAVA_BYTE.withName("max_transform_hierarchy_depth_inter"), + ValueLayout.JAVA_BYTE.withName("max_transform_hierarchy_depth_intra"), + ValueLayout.JAVA_BYTE.withName("num_short_term_ref_pic_sets"), + ValueLayout.JAVA_BYTE.withName("num_long_term_ref_pics_sps"), + ValueLayout.JAVA_BYTE.withName("pcm_sample_bit_depth_luma_minus1"), + ValueLayout.JAVA_BYTE.withName("pcm_sample_bit_depth_chroma_minus1"), + ValueLayout.JAVA_BYTE.withName("log2_min_pcm_luma_coding_block_size_minus3"), + ValueLayout.JAVA_BYTE.withName("log2_diff_max_min_pcm_luma_coding_block_size"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_BYTE.withName("reserved2"), + ValueLayout.JAVA_BYTE.withName("palette_max_size"), + ValueLayout.JAVA_BYTE.withName("delta_palette_max_predictor_size"), + ValueLayout.JAVA_BYTE.withName("motion_vector_resolution_control_idc"), + ValueLayout.JAVA_BYTE.withName("sps_num_palette_predictor_initializers_minus1"), + ValueLayout.JAVA_INT.withName("conf_win_left_offset"), + ValueLayout.JAVA_INT.withName("conf_win_right_offset"), + ValueLayout.JAVA_INT.withName("conf_win_top_offset"), + ValueLayout.JAVA_INT.withName("conf_win_bottom_offset"), + ValueLayout.ADDRESS.withName("pProfileTierLevel"), + ValueLayout.ADDRESS.withName("pDecPicBufMgr"), + ValueLayout.ADDRESS.withName("pScalingLists"), + ValueLayout.ADDRESS.withName("pShortTermRefPicSet"), + ValueLayout.ADDRESS.withName("pLongTermRefPicsSps"), + ValueLayout.ADDRESS.withName("pSequenceParameterSetVui"), + ValueLayout.ADDRESS.withName("pPredictorPaletteEntries") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `chroma_format_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chroma_format_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_format_idc")); + /// The [VarHandle] of `pic_width_in_luma_samples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pic_width_in_luma_samples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_width_in_luma_samples")); + /// The [VarHandle] of `pic_height_in_luma_samples` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pic_height_in_luma_samples = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pic_height_in_luma_samples")); + /// The [VarHandle] of `sps_video_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_sps_video_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_video_parameter_set_id")); + /// The [VarHandle] of `sps_max_sub_layers_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_sps_max_sub_layers_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_max_sub_layers_minus1")); + /// The [VarHandle] of `sps_seq_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_sps_seq_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_seq_parameter_set_id")); + /// The [VarHandle] of `bit_depth_luma_minus8` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_bit_depth_luma_minus8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bit_depth_luma_minus8")); + /// The [VarHandle] of `bit_depth_chroma_minus8` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_bit_depth_chroma_minus8 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bit_depth_chroma_minus8")); + /// The [VarHandle] of `log2_max_pic_order_cnt_lsb_minus4` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_max_pic_order_cnt_lsb_minus4 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_max_pic_order_cnt_lsb_minus4")); + /// The [VarHandle] of `log2_min_luma_coding_block_size_minus3` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_min_luma_coding_block_size_minus3 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_min_luma_coding_block_size_minus3")); + /// The [VarHandle] of `log2_diff_max_min_luma_coding_block_size` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_diff_max_min_luma_coding_block_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_diff_max_min_luma_coding_block_size")); + /// The [VarHandle] of `log2_min_luma_transform_block_size_minus2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_min_luma_transform_block_size_minus2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_min_luma_transform_block_size_minus2")); + /// The [VarHandle] of `log2_diff_max_min_luma_transform_block_size` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_diff_max_min_luma_transform_block_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_diff_max_min_luma_transform_block_size")); + /// The [VarHandle] of `max_transform_hierarchy_depth_inter` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_max_transform_hierarchy_depth_inter = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_transform_hierarchy_depth_inter")); + /// The [VarHandle] of `max_transform_hierarchy_depth_intra` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_max_transform_hierarchy_depth_intra = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_transform_hierarchy_depth_intra")); + /// The [VarHandle] of `num_short_term_ref_pic_sets` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_short_term_ref_pic_sets = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_short_term_ref_pic_sets")); + /// The [VarHandle] of `num_long_term_ref_pics_sps` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_long_term_ref_pics_sps = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_long_term_ref_pics_sps")); + /// The [VarHandle] of `pcm_sample_bit_depth_luma_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pcm_sample_bit_depth_luma_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pcm_sample_bit_depth_luma_minus1")); + /// The [VarHandle] of `pcm_sample_bit_depth_chroma_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_pcm_sample_bit_depth_chroma_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pcm_sample_bit_depth_chroma_minus1")); + /// The [VarHandle] of `log2_min_pcm_luma_coding_block_size_minus3` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_min_pcm_luma_coding_block_size_minus3 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_min_pcm_luma_coding_block_size_minus3")); + /// The [VarHandle] of `log2_diff_max_min_pcm_luma_coding_block_size` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_diff_max_min_pcm_luma_coding_block_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_diff_max_min_pcm_luma_coding_block_size")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `reserved2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved2")); + /// The [VarHandle] of `palette_max_size` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_palette_max_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("palette_max_size")); + /// The [VarHandle] of `delta_palette_max_predictor_size` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_delta_palette_max_predictor_size = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_palette_max_predictor_size")); + /// The [VarHandle] of `motion_vector_resolution_control_idc` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_motion_vector_resolution_control_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("motion_vector_resolution_control_idc")); + /// The [VarHandle] of `sps_num_palette_predictor_initializers_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_sps_num_palette_predictor_initializers_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_num_palette_predictor_initializers_minus1")); + /// The [VarHandle] of `conf_win_left_offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_conf_win_left_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conf_win_left_offset")); + /// The [VarHandle] of `conf_win_right_offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_conf_win_right_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conf_win_right_offset")); + /// The [VarHandle] of `conf_win_top_offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_conf_win_top_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conf_win_top_offset")); + /// The [VarHandle] of `conf_win_bottom_offset` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_conf_win_bottom_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conf_win_bottom_offset")); + /// The [VarHandle] of `pProfileTierLevel` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pProfileTierLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pProfileTierLevel")); + /// The [VarHandle] of `pDecPicBufMgr` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDecPicBufMgr = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDecPicBufMgr")); + /// The [VarHandle] of `pScalingLists` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pScalingLists = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pScalingLists")); + /// The [VarHandle] of `pShortTermRefPicSet` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pShortTermRefPicSet = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pShortTermRefPicSet")); + /// The [VarHandle] of `pLongTermRefPicsSps` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pLongTermRefPicsSps = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pLongTermRefPicsSps")); + /// The [VarHandle] of `pSequenceParameterSetVui` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pSequenceParameterSetVui = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pSequenceParameterSetVui")); + /// The [VarHandle] of `pPredictorPaletteEntries` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pPredictorPaletteEntries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pPredictorPaletteEntries")); + + /// Creates `StdVideoH265SequenceParameterSet` with the given segment. + /// @param segment the memory segment + public StdVideoH265SequenceParameterSet(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265SequenceParameterSet` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SequenceParameterSet of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SequenceParameterSet(segment); } + + /// Creates `StdVideoH265SequenceParameterSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SequenceParameterSet ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SequenceParameterSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265SequenceParameterSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SequenceParameterSet ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SequenceParameterSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265SequenceParameterSet` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265SequenceParameterSet` + public static StdVideoH265SequenceParameterSet alloc(SegmentAllocator allocator) { return new StdVideoH265SequenceParameterSet(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265SequenceParameterSet` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265SequenceParameterSet` + public static StdVideoH265SequenceParameterSet alloc(SegmentAllocator allocator, long count) { return new StdVideoH265SequenceParameterSet(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265SpsFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265SpsFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoH265SpsFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoH265SequenceParameterSet.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoH265SpsFlags") java.lang.foreign.MemorySegment flags() { return StdVideoH265SequenceParameterSet.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoH265SpsFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoH265SpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet flagsAt(long index, @CType("StdVideoH265SpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet flags(@CType("StdVideoH265SpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_flags(this.segment(), value); return this; } + + /// {@return `chroma_format_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265ChromaFormatIdc") int get_chroma_format_idc(MemorySegment segment, long index) { return (int) VH_chroma_format_idc.get(segment, 0L, index); } + /// {@return `chroma_format_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265ChromaFormatIdc") int get_chroma_format_idc(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_chroma_format_idc(segment, 0L); } + /// {@return `chroma_format_idc` at the given index} + /// @param index the index + public @CType("StdVideoH265ChromaFormatIdc") int chroma_format_idcAt(long index) { return StdVideoH265SequenceParameterSet.get_chroma_format_idc(this.segment(), index); } + /// {@return `chroma_format_idc`} + public @CType("StdVideoH265ChromaFormatIdc") int chroma_format_idc() { return StdVideoH265SequenceParameterSet.get_chroma_format_idc(this.segment()); } + /// Sets `chroma_format_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_format_idc(MemorySegment segment, long index, @CType("StdVideoH265ChromaFormatIdc") int value) { VH_chroma_format_idc.set(segment, 0L, index, value); } + /// Sets `chroma_format_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_format_idc(MemorySegment segment, @CType("StdVideoH265ChromaFormatIdc") int value) { StdVideoH265SequenceParameterSet.set_chroma_format_idc(segment, 0L, value); } + /// Sets `chroma_format_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet chroma_format_idcAt(long index, @CType("StdVideoH265ChromaFormatIdc") int value) { StdVideoH265SequenceParameterSet.set_chroma_format_idc(this.segment(), index, value); return this; } + /// Sets `chroma_format_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet chroma_format_idc(@CType("StdVideoH265ChromaFormatIdc") int value) { StdVideoH265SequenceParameterSet.set_chroma_format_idc(this.segment(), value); return this; } + + /// {@return `pic_width_in_luma_samples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pic_width_in_luma_samples(MemorySegment segment, long index) { return (int) VH_pic_width_in_luma_samples.get(segment, 0L, index); } + /// {@return `pic_width_in_luma_samples`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pic_width_in_luma_samples(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pic_width_in_luma_samples(segment, 0L); } + /// {@return `pic_width_in_luma_samples` at the given index} + /// @param index the index + public @CType("uint32_t") int pic_width_in_luma_samplesAt(long index) { return StdVideoH265SequenceParameterSet.get_pic_width_in_luma_samples(this.segment(), index); } + /// {@return `pic_width_in_luma_samples`} + public @CType("uint32_t") int pic_width_in_luma_samples() { return StdVideoH265SequenceParameterSet.get_pic_width_in_luma_samples(this.segment()); } + /// Sets `pic_width_in_luma_samples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_width_in_luma_samples(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pic_width_in_luma_samples.set(segment, 0L, index, value); } + /// Sets `pic_width_in_luma_samples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_width_in_luma_samples(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_pic_width_in_luma_samples(segment, 0L, value); } + /// Sets `pic_width_in_luma_samples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pic_width_in_luma_samplesAt(long index, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_pic_width_in_luma_samples(this.segment(), index, value); return this; } + /// Sets `pic_width_in_luma_samples` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pic_width_in_luma_samples(@CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_pic_width_in_luma_samples(this.segment(), value); return this; } + + /// {@return `pic_height_in_luma_samples` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_pic_height_in_luma_samples(MemorySegment segment, long index) { return (int) VH_pic_height_in_luma_samples.get(segment, 0L, index); } + /// {@return `pic_height_in_luma_samples`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_pic_height_in_luma_samples(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pic_height_in_luma_samples(segment, 0L); } + /// {@return `pic_height_in_luma_samples` at the given index} + /// @param index the index + public @CType("uint32_t") int pic_height_in_luma_samplesAt(long index) { return StdVideoH265SequenceParameterSet.get_pic_height_in_luma_samples(this.segment(), index); } + /// {@return `pic_height_in_luma_samples`} + public @CType("uint32_t") int pic_height_in_luma_samples() { return StdVideoH265SequenceParameterSet.get_pic_height_in_luma_samples(this.segment()); } + /// Sets `pic_height_in_luma_samples` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pic_height_in_luma_samples(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_pic_height_in_luma_samples.set(segment, 0L, index, value); } + /// Sets `pic_height_in_luma_samples` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pic_height_in_luma_samples(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_pic_height_in_luma_samples(segment, 0L, value); } + /// Sets `pic_height_in_luma_samples` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pic_height_in_luma_samplesAt(long index, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_pic_height_in_luma_samples(this.segment(), index, value); return this; } + /// Sets `pic_height_in_luma_samples` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pic_height_in_luma_samples(@CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_pic_height_in_luma_samples(this.segment(), value); return this; } + + /// {@return `sps_video_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_sps_video_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_sps_video_parameter_set_id.get(segment, 0L, index); } + /// {@return `sps_video_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_sps_video_parameter_set_id(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_sps_video_parameter_set_id(segment, 0L); } + /// {@return `sps_video_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte sps_video_parameter_set_idAt(long index) { return StdVideoH265SequenceParameterSet.get_sps_video_parameter_set_id(this.segment(), index); } + /// {@return `sps_video_parameter_set_id`} + public @CType("uint8_t") byte sps_video_parameter_set_id() { return StdVideoH265SequenceParameterSet.get_sps_video_parameter_set_id(this.segment()); } + /// Sets `sps_video_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_video_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_sps_video_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `sps_video_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_video_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_video_parameter_set_id(segment, 0L, value); } + /// Sets `sps_video_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet sps_video_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_video_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `sps_video_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet sps_video_parameter_set_id(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_video_parameter_set_id(this.segment(), value); return this; } + + /// {@return `sps_max_sub_layers_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_sps_max_sub_layers_minus1(MemorySegment segment, long index) { return (byte) VH_sps_max_sub_layers_minus1.get(segment, 0L, index); } + /// {@return `sps_max_sub_layers_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_sps_max_sub_layers_minus1(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_sps_max_sub_layers_minus1(segment, 0L); } + /// {@return `sps_max_sub_layers_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte sps_max_sub_layers_minus1At(long index) { return StdVideoH265SequenceParameterSet.get_sps_max_sub_layers_minus1(this.segment(), index); } + /// {@return `sps_max_sub_layers_minus1`} + public @CType("uint8_t") byte sps_max_sub_layers_minus1() { return StdVideoH265SequenceParameterSet.get_sps_max_sub_layers_minus1(this.segment()); } + /// Sets `sps_max_sub_layers_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_max_sub_layers_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_sps_max_sub_layers_minus1.set(segment, 0L, index, value); } + /// Sets `sps_max_sub_layers_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_max_sub_layers_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_max_sub_layers_minus1(segment, 0L, value); } + /// Sets `sps_max_sub_layers_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet sps_max_sub_layers_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_max_sub_layers_minus1(this.segment(), index, value); return this; } + /// Sets `sps_max_sub_layers_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet sps_max_sub_layers_minus1(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_max_sub_layers_minus1(this.segment(), value); return this; } + + /// {@return `sps_seq_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_sps_seq_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_sps_seq_parameter_set_id.get(segment, 0L, index); } + /// {@return `sps_seq_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_sps_seq_parameter_set_id(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_sps_seq_parameter_set_id(segment, 0L); } + /// {@return `sps_seq_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte sps_seq_parameter_set_idAt(long index) { return StdVideoH265SequenceParameterSet.get_sps_seq_parameter_set_id(this.segment(), index); } + /// {@return `sps_seq_parameter_set_id`} + public @CType("uint8_t") byte sps_seq_parameter_set_id() { return StdVideoH265SequenceParameterSet.get_sps_seq_parameter_set_id(this.segment()); } + /// Sets `sps_seq_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_seq_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_sps_seq_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `sps_seq_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_seq_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_seq_parameter_set_id(segment, 0L, value); } + /// Sets `sps_seq_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet sps_seq_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_seq_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `sps_seq_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet sps_seq_parameter_set_id(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_seq_parameter_set_id(this.segment(), value); return this; } + + /// {@return `bit_depth_luma_minus8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_bit_depth_luma_minus8(MemorySegment segment, long index) { return (byte) VH_bit_depth_luma_minus8.get(segment, 0L, index); } + /// {@return `bit_depth_luma_minus8`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_bit_depth_luma_minus8(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_bit_depth_luma_minus8(segment, 0L); } + /// {@return `bit_depth_luma_minus8` at the given index} + /// @param index the index + public @CType("uint8_t") byte bit_depth_luma_minus8At(long index) { return StdVideoH265SequenceParameterSet.get_bit_depth_luma_minus8(this.segment(), index); } + /// {@return `bit_depth_luma_minus8`} + public @CType("uint8_t") byte bit_depth_luma_minus8() { return StdVideoH265SequenceParameterSet.get_bit_depth_luma_minus8(this.segment()); } + /// Sets `bit_depth_luma_minus8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bit_depth_luma_minus8(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_bit_depth_luma_minus8.set(segment, 0L, index, value); } + /// Sets `bit_depth_luma_minus8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bit_depth_luma_minus8(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_bit_depth_luma_minus8(segment, 0L, value); } + /// Sets `bit_depth_luma_minus8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet bit_depth_luma_minus8At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_bit_depth_luma_minus8(this.segment(), index, value); return this; } + /// Sets `bit_depth_luma_minus8` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet bit_depth_luma_minus8(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_bit_depth_luma_minus8(this.segment(), value); return this; } + + /// {@return `bit_depth_chroma_minus8` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_bit_depth_chroma_minus8(MemorySegment segment, long index) { return (byte) VH_bit_depth_chroma_minus8.get(segment, 0L, index); } + /// {@return `bit_depth_chroma_minus8`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_bit_depth_chroma_minus8(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_bit_depth_chroma_minus8(segment, 0L); } + /// {@return `bit_depth_chroma_minus8` at the given index} + /// @param index the index + public @CType("uint8_t") byte bit_depth_chroma_minus8At(long index) { return StdVideoH265SequenceParameterSet.get_bit_depth_chroma_minus8(this.segment(), index); } + /// {@return `bit_depth_chroma_minus8`} + public @CType("uint8_t") byte bit_depth_chroma_minus8() { return StdVideoH265SequenceParameterSet.get_bit_depth_chroma_minus8(this.segment()); } + /// Sets `bit_depth_chroma_minus8` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bit_depth_chroma_minus8(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_bit_depth_chroma_minus8.set(segment, 0L, index, value); } + /// Sets `bit_depth_chroma_minus8` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bit_depth_chroma_minus8(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_bit_depth_chroma_minus8(segment, 0L, value); } + /// Sets `bit_depth_chroma_minus8` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet bit_depth_chroma_minus8At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_bit_depth_chroma_minus8(this.segment(), index, value); return this; } + /// Sets `bit_depth_chroma_minus8` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet bit_depth_chroma_minus8(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_bit_depth_chroma_minus8(this.segment(), value); return this; } + + /// {@return `log2_max_pic_order_cnt_lsb_minus4` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_max_pic_order_cnt_lsb_minus4(MemorySegment segment, long index) { return (byte) VH_log2_max_pic_order_cnt_lsb_minus4.get(segment, 0L, index); } + /// {@return `log2_max_pic_order_cnt_lsb_minus4`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_max_pic_order_cnt_lsb_minus4(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_log2_max_pic_order_cnt_lsb_minus4(segment, 0L); } + /// {@return `log2_max_pic_order_cnt_lsb_minus4` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_max_pic_order_cnt_lsb_minus4At(long index) { return StdVideoH265SequenceParameterSet.get_log2_max_pic_order_cnt_lsb_minus4(this.segment(), index); } + /// {@return `log2_max_pic_order_cnt_lsb_minus4`} + public @CType("uint8_t") byte log2_max_pic_order_cnt_lsb_minus4() { return StdVideoH265SequenceParameterSet.get_log2_max_pic_order_cnt_lsb_minus4(this.segment()); } + /// Sets `log2_max_pic_order_cnt_lsb_minus4` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_max_pic_order_cnt_lsb_minus4(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_max_pic_order_cnt_lsb_minus4.set(segment, 0L, index, value); } + /// Sets `log2_max_pic_order_cnt_lsb_minus4` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_max_pic_order_cnt_lsb_minus4(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_max_pic_order_cnt_lsb_minus4(segment, 0L, value); } + /// Sets `log2_max_pic_order_cnt_lsb_minus4` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_max_pic_order_cnt_lsb_minus4At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_max_pic_order_cnt_lsb_minus4(this.segment(), index, value); return this; } + /// Sets `log2_max_pic_order_cnt_lsb_minus4` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_max_pic_order_cnt_lsb_minus4(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_max_pic_order_cnt_lsb_minus4(this.segment(), value); return this; } + + /// {@return `log2_min_luma_coding_block_size_minus3` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_min_luma_coding_block_size_minus3(MemorySegment segment, long index) { return (byte) VH_log2_min_luma_coding_block_size_minus3.get(segment, 0L, index); } + /// {@return `log2_min_luma_coding_block_size_minus3`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_min_luma_coding_block_size_minus3(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_log2_min_luma_coding_block_size_minus3(segment, 0L); } + /// {@return `log2_min_luma_coding_block_size_minus3` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_min_luma_coding_block_size_minus3At(long index) { return StdVideoH265SequenceParameterSet.get_log2_min_luma_coding_block_size_minus3(this.segment(), index); } + /// {@return `log2_min_luma_coding_block_size_minus3`} + public @CType("uint8_t") byte log2_min_luma_coding_block_size_minus3() { return StdVideoH265SequenceParameterSet.get_log2_min_luma_coding_block_size_minus3(this.segment()); } + /// Sets `log2_min_luma_coding_block_size_minus3` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_min_luma_coding_block_size_minus3(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_min_luma_coding_block_size_minus3.set(segment, 0L, index, value); } + /// Sets `log2_min_luma_coding_block_size_minus3` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_min_luma_coding_block_size_minus3(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_min_luma_coding_block_size_minus3(segment, 0L, value); } + /// Sets `log2_min_luma_coding_block_size_minus3` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_min_luma_coding_block_size_minus3At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_min_luma_coding_block_size_minus3(this.segment(), index, value); return this; } + /// Sets `log2_min_luma_coding_block_size_minus3` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_min_luma_coding_block_size_minus3(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_min_luma_coding_block_size_minus3(this.segment(), value); return this; } + + /// {@return `log2_diff_max_min_luma_coding_block_size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_diff_max_min_luma_coding_block_size(MemorySegment segment, long index) { return (byte) VH_log2_diff_max_min_luma_coding_block_size.get(segment, 0L, index); } + /// {@return `log2_diff_max_min_luma_coding_block_size`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_diff_max_min_luma_coding_block_size(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_log2_diff_max_min_luma_coding_block_size(segment, 0L); } + /// {@return `log2_diff_max_min_luma_coding_block_size` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_diff_max_min_luma_coding_block_sizeAt(long index) { return StdVideoH265SequenceParameterSet.get_log2_diff_max_min_luma_coding_block_size(this.segment(), index); } + /// {@return `log2_diff_max_min_luma_coding_block_size`} + public @CType("uint8_t") byte log2_diff_max_min_luma_coding_block_size() { return StdVideoH265SequenceParameterSet.get_log2_diff_max_min_luma_coding_block_size(this.segment()); } + /// Sets `log2_diff_max_min_luma_coding_block_size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_diff_max_min_luma_coding_block_size(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_diff_max_min_luma_coding_block_size.set(segment, 0L, index, value); } + /// Sets `log2_diff_max_min_luma_coding_block_size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_diff_max_min_luma_coding_block_size(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_diff_max_min_luma_coding_block_size(segment, 0L, value); } + /// Sets `log2_diff_max_min_luma_coding_block_size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_diff_max_min_luma_coding_block_sizeAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_diff_max_min_luma_coding_block_size(this.segment(), index, value); return this; } + /// Sets `log2_diff_max_min_luma_coding_block_size` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_diff_max_min_luma_coding_block_size(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_diff_max_min_luma_coding_block_size(this.segment(), value); return this; } + + /// {@return `log2_min_luma_transform_block_size_minus2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_min_luma_transform_block_size_minus2(MemorySegment segment, long index) { return (byte) VH_log2_min_luma_transform_block_size_minus2.get(segment, 0L, index); } + /// {@return `log2_min_luma_transform_block_size_minus2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_min_luma_transform_block_size_minus2(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_log2_min_luma_transform_block_size_minus2(segment, 0L); } + /// {@return `log2_min_luma_transform_block_size_minus2` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_min_luma_transform_block_size_minus2At(long index) { return StdVideoH265SequenceParameterSet.get_log2_min_luma_transform_block_size_minus2(this.segment(), index); } + /// {@return `log2_min_luma_transform_block_size_minus2`} + public @CType("uint8_t") byte log2_min_luma_transform_block_size_minus2() { return StdVideoH265SequenceParameterSet.get_log2_min_luma_transform_block_size_minus2(this.segment()); } + /// Sets `log2_min_luma_transform_block_size_minus2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_min_luma_transform_block_size_minus2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_min_luma_transform_block_size_minus2.set(segment, 0L, index, value); } + /// Sets `log2_min_luma_transform_block_size_minus2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_min_luma_transform_block_size_minus2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_min_luma_transform_block_size_minus2(segment, 0L, value); } + /// Sets `log2_min_luma_transform_block_size_minus2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_min_luma_transform_block_size_minus2At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_min_luma_transform_block_size_minus2(this.segment(), index, value); return this; } + /// Sets `log2_min_luma_transform_block_size_minus2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_min_luma_transform_block_size_minus2(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_min_luma_transform_block_size_minus2(this.segment(), value); return this; } + + /// {@return `log2_diff_max_min_luma_transform_block_size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_diff_max_min_luma_transform_block_size(MemorySegment segment, long index) { return (byte) VH_log2_diff_max_min_luma_transform_block_size.get(segment, 0L, index); } + /// {@return `log2_diff_max_min_luma_transform_block_size`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_diff_max_min_luma_transform_block_size(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_log2_diff_max_min_luma_transform_block_size(segment, 0L); } + /// {@return `log2_diff_max_min_luma_transform_block_size` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_diff_max_min_luma_transform_block_sizeAt(long index) { return StdVideoH265SequenceParameterSet.get_log2_diff_max_min_luma_transform_block_size(this.segment(), index); } + /// {@return `log2_diff_max_min_luma_transform_block_size`} + public @CType("uint8_t") byte log2_diff_max_min_luma_transform_block_size() { return StdVideoH265SequenceParameterSet.get_log2_diff_max_min_luma_transform_block_size(this.segment()); } + /// Sets `log2_diff_max_min_luma_transform_block_size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_diff_max_min_luma_transform_block_size(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_diff_max_min_luma_transform_block_size.set(segment, 0L, index, value); } + /// Sets `log2_diff_max_min_luma_transform_block_size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_diff_max_min_luma_transform_block_size(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_diff_max_min_luma_transform_block_size(segment, 0L, value); } + /// Sets `log2_diff_max_min_luma_transform_block_size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_diff_max_min_luma_transform_block_sizeAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_diff_max_min_luma_transform_block_size(this.segment(), index, value); return this; } + /// Sets `log2_diff_max_min_luma_transform_block_size` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_diff_max_min_luma_transform_block_size(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_diff_max_min_luma_transform_block_size(this.segment(), value); return this; } + + /// {@return `max_transform_hierarchy_depth_inter` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_max_transform_hierarchy_depth_inter(MemorySegment segment, long index) { return (byte) VH_max_transform_hierarchy_depth_inter.get(segment, 0L, index); } + /// {@return `max_transform_hierarchy_depth_inter`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_max_transform_hierarchy_depth_inter(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_max_transform_hierarchy_depth_inter(segment, 0L); } + /// {@return `max_transform_hierarchy_depth_inter` at the given index} + /// @param index the index + public @CType("uint8_t") byte max_transform_hierarchy_depth_interAt(long index) { return StdVideoH265SequenceParameterSet.get_max_transform_hierarchy_depth_inter(this.segment(), index); } + /// {@return `max_transform_hierarchy_depth_inter`} + public @CType("uint8_t") byte max_transform_hierarchy_depth_inter() { return StdVideoH265SequenceParameterSet.get_max_transform_hierarchy_depth_inter(this.segment()); } + /// Sets `max_transform_hierarchy_depth_inter` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_transform_hierarchy_depth_inter(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_max_transform_hierarchy_depth_inter.set(segment, 0L, index, value); } + /// Sets `max_transform_hierarchy_depth_inter` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_transform_hierarchy_depth_inter(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_max_transform_hierarchy_depth_inter(segment, 0L, value); } + /// Sets `max_transform_hierarchy_depth_inter` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet max_transform_hierarchy_depth_interAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_max_transform_hierarchy_depth_inter(this.segment(), index, value); return this; } + /// Sets `max_transform_hierarchy_depth_inter` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet max_transform_hierarchy_depth_inter(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_max_transform_hierarchy_depth_inter(this.segment(), value); return this; } + + /// {@return `max_transform_hierarchy_depth_intra` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_max_transform_hierarchy_depth_intra(MemorySegment segment, long index) { return (byte) VH_max_transform_hierarchy_depth_intra.get(segment, 0L, index); } + /// {@return `max_transform_hierarchy_depth_intra`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_max_transform_hierarchy_depth_intra(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_max_transform_hierarchy_depth_intra(segment, 0L); } + /// {@return `max_transform_hierarchy_depth_intra` at the given index} + /// @param index the index + public @CType("uint8_t") byte max_transform_hierarchy_depth_intraAt(long index) { return StdVideoH265SequenceParameterSet.get_max_transform_hierarchy_depth_intra(this.segment(), index); } + /// {@return `max_transform_hierarchy_depth_intra`} + public @CType("uint8_t") byte max_transform_hierarchy_depth_intra() { return StdVideoH265SequenceParameterSet.get_max_transform_hierarchy_depth_intra(this.segment()); } + /// Sets `max_transform_hierarchy_depth_intra` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_transform_hierarchy_depth_intra(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_max_transform_hierarchy_depth_intra.set(segment, 0L, index, value); } + /// Sets `max_transform_hierarchy_depth_intra` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_transform_hierarchy_depth_intra(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_max_transform_hierarchy_depth_intra(segment, 0L, value); } + /// Sets `max_transform_hierarchy_depth_intra` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet max_transform_hierarchy_depth_intraAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_max_transform_hierarchy_depth_intra(this.segment(), index, value); return this; } + /// Sets `max_transform_hierarchy_depth_intra` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet max_transform_hierarchy_depth_intra(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_max_transform_hierarchy_depth_intra(this.segment(), value); return this; } + + /// {@return `num_short_term_ref_pic_sets` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_short_term_ref_pic_sets(MemorySegment segment, long index) { return (byte) VH_num_short_term_ref_pic_sets.get(segment, 0L, index); } + /// {@return `num_short_term_ref_pic_sets`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_short_term_ref_pic_sets(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_num_short_term_ref_pic_sets(segment, 0L); } + /// {@return `num_short_term_ref_pic_sets` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_short_term_ref_pic_setsAt(long index) { return StdVideoH265SequenceParameterSet.get_num_short_term_ref_pic_sets(this.segment(), index); } + /// {@return `num_short_term_ref_pic_sets`} + public @CType("uint8_t") byte num_short_term_ref_pic_sets() { return StdVideoH265SequenceParameterSet.get_num_short_term_ref_pic_sets(this.segment()); } + /// Sets `num_short_term_ref_pic_sets` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_short_term_ref_pic_sets(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_short_term_ref_pic_sets.set(segment, 0L, index, value); } + /// Sets `num_short_term_ref_pic_sets` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_short_term_ref_pic_sets(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_num_short_term_ref_pic_sets(segment, 0L, value); } + /// Sets `num_short_term_ref_pic_sets` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet num_short_term_ref_pic_setsAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_num_short_term_ref_pic_sets(this.segment(), index, value); return this; } + /// Sets `num_short_term_ref_pic_sets` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet num_short_term_ref_pic_sets(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_num_short_term_ref_pic_sets(this.segment(), value); return this; } + + /// {@return `num_long_term_ref_pics_sps` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_long_term_ref_pics_sps(MemorySegment segment, long index) { return (byte) VH_num_long_term_ref_pics_sps.get(segment, 0L, index); } + /// {@return `num_long_term_ref_pics_sps`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_long_term_ref_pics_sps(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_num_long_term_ref_pics_sps(segment, 0L); } + /// {@return `num_long_term_ref_pics_sps` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_long_term_ref_pics_spsAt(long index) { return StdVideoH265SequenceParameterSet.get_num_long_term_ref_pics_sps(this.segment(), index); } + /// {@return `num_long_term_ref_pics_sps`} + public @CType("uint8_t") byte num_long_term_ref_pics_sps() { return StdVideoH265SequenceParameterSet.get_num_long_term_ref_pics_sps(this.segment()); } + /// Sets `num_long_term_ref_pics_sps` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_long_term_ref_pics_sps(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_long_term_ref_pics_sps.set(segment, 0L, index, value); } + /// Sets `num_long_term_ref_pics_sps` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_long_term_ref_pics_sps(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_num_long_term_ref_pics_sps(segment, 0L, value); } + /// Sets `num_long_term_ref_pics_sps` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet num_long_term_ref_pics_spsAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_num_long_term_ref_pics_sps(this.segment(), index, value); return this; } + /// Sets `num_long_term_ref_pics_sps` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet num_long_term_ref_pics_sps(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_num_long_term_ref_pics_sps(this.segment(), value); return this; } + + /// {@return `pcm_sample_bit_depth_luma_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pcm_sample_bit_depth_luma_minus1(MemorySegment segment, long index) { return (byte) VH_pcm_sample_bit_depth_luma_minus1.get(segment, 0L, index); } + /// {@return `pcm_sample_bit_depth_luma_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pcm_sample_bit_depth_luma_minus1(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pcm_sample_bit_depth_luma_minus1(segment, 0L); } + /// {@return `pcm_sample_bit_depth_luma_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte pcm_sample_bit_depth_luma_minus1At(long index) { return StdVideoH265SequenceParameterSet.get_pcm_sample_bit_depth_luma_minus1(this.segment(), index); } + /// {@return `pcm_sample_bit_depth_luma_minus1`} + public @CType("uint8_t") byte pcm_sample_bit_depth_luma_minus1() { return StdVideoH265SequenceParameterSet.get_pcm_sample_bit_depth_luma_minus1(this.segment()); } + /// Sets `pcm_sample_bit_depth_luma_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pcm_sample_bit_depth_luma_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pcm_sample_bit_depth_luma_minus1.set(segment, 0L, index, value); } + /// Sets `pcm_sample_bit_depth_luma_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pcm_sample_bit_depth_luma_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_pcm_sample_bit_depth_luma_minus1(segment, 0L, value); } + /// Sets `pcm_sample_bit_depth_luma_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pcm_sample_bit_depth_luma_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_pcm_sample_bit_depth_luma_minus1(this.segment(), index, value); return this; } + /// Sets `pcm_sample_bit_depth_luma_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pcm_sample_bit_depth_luma_minus1(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_pcm_sample_bit_depth_luma_minus1(this.segment(), value); return this; } + + /// {@return `pcm_sample_bit_depth_chroma_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_pcm_sample_bit_depth_chroma_minus1(MemorySegment segment, long index) { return (byte) VH_pcm_sample_bit_depth_chroma_minus1.get(segment, 0L, index); } + /// {@return `pcm_sample_bit_depth_chroma_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_pcm_sample_bit_depth_chroma_minus1(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pcm_sample_bit_depth_chroma_minus1(segment, 0L); } + /// {@return `pcm_sample_bit_depth_chroma_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte pcm_sample_bit_depth_chroma_minus1At(long index) { return StdVideoH265SequenceParameterSet.get_pcm_sample_bit_depth_chroma_minus1(this.segment(), index); } + /// {@return `pcm_sample_bit_depth_chroma_minus1`} + public @CType("uint8_t") byte pcm_sample_bit_depth_chroma_minus1() { return StdVideoH265SequenceParameterSet.get_pcm_sample_bit_depth_chroma_minus1(this.segment()); } + /// Sets `pcm_sample_bit_depth_chroma_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pcm_sample_bit_depth_chroma_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_pcm_sample_bit_depth_chroma_minus1.set(segment, 0L, index, value); } + /// Sets `pcm_sample_bit_depth_chroma_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pcm_sample_bit_depth_chroma_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_pcm_sample_bit_depth_chroma_minus1(segment, 0L, value); } + /// Sets `pcm_sample_bit_depth_chroma_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pcm_sample_bit_depth_chroma_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_pcm_sample_bit_depth_chroma_minus1(this.segment(), index, value); return this; } + /// Sets `pcm_sample_bit_depth_chroma_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pcm_sample_bit_depth_chroma_minus1(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_pcm_sample_bit_depth_chroma_minus1(this.segment(), value); return this; } + + /// {@return `log2_min_pcm_luma_coding_block_size_minus3` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_min_pcm_luma_coding_block_size_minus3(MemorySegment segment, long index) { return (byte) VH_log2_min_pcm_luma_coding_block_size_minus3.get(segment, 0L, index); } + /// {@return `log2_min_pcm_luma_coding_block_size_minus3`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_min_pcm_luma_coding_block_size_minus3(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_log2_min_pcm_luma_coding_block_size_minus3(segment, 0L); } + /// {@return `log2_min_pcm_luma_coding_block_size_minus3` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_min_pcm_luma_coding_block_size_minus3At(long index) { return StdVideoH265SequenceParameterSet.get_log2_min_pcm_luma_coding_block_size_minus3(this.segment(), index); } + /// {@return `log2_min_pcm_luma_coding_block_size_minus3`} + public @CType("uint8_t") byte log2_min_pcm_luma_coding_block_size_minus3() { return StdVideoH265SequenceParameterSet.get_log2_min_pcm_luma_coding_block_size_minus3(this.segment()); } + /// Sets `log2_min_pcm_luma_coding_block_size_minus3` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_min_pcm_luma_coding_block_size_minus3(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_min_pcm_luma_coding_block_size_minus3.set(segment, 0L, index, value); } + /// Sets `log2_min_pcm_luma_coding_block_size_minus3` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_min_pcm_luma_coding_block_size_minus3(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_min_pcm_luma_coding_block_size_minus3(segment, 0L, value); } + /// Sets `log2_min_pcm_luma_coding_block_size_minus3` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_min_pcm_luma_coding_block_size_minus3At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_min_pcm_luma_coding_block_size_minus3(this.segment(), index, value); return this; } + /// Sets `log2_min_pcm_luma_coding_block_size_minus3` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_min_pcm_luma_coding_block_size_minus3(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_min_pcm_luma_coding_block_size_minus3(this.segment(), value); return this; } + + /// {@return `log2_diff_max_min_pcm_luma_coding_block_size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_diff_max_min_pcm_luma_coding_block_size(MemorySegment segment, long index) { return (byte) VH_log2_diff_max_min_pcm_luma_coding_block_size.get(segment, 0L, index); } + /// {@return `log2_diff_max_min_pcm_luma_coding_block_size`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_diff_max_min_pcm_luma_coding_block_size(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_log2_diff_max_min_pcm_luma_coding_block_size(segment, 0L); } + /// {@return `log2_diff_max_min_pcm_luma_coding_block_size` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_diff_max_min_pcm_luma_coding_block_sizeAt(long index) { return StdVideoH265SequenceParameterSet.get_log2_diff_max_min_pcm_luma_coding_block_size(this.segment(), index); } + /// {@return `log2_diff_max_min_pcm_luma_coding_block_size`} + public @CType("uint8_t") byte log2_diff_max_min_pcm_luma_coding_block_size() { return StdVideoH265SequenceParameterSet.get_log2_diff_max_min_pcm_luma_coding_block_size(this.segment()); } + /// Sets `log2_diff_max_min_pcm_luma_coding_block_size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_diff_max_min_pcm_luma_coding_block_size(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_diff_max_min_pcm_luma_coding_block_size.set(segment, 0L, index, value); } + /// Sets `log2_diff_max_min_pcm_luma_coding_block_size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_diff_max_min_pcm_luma_coding_block_size(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_diff_max_min_pcm_luma_coding_block_size(segment, 0L, value); } + /// Sets `log2_diff_max_min_pcm_luma_coding_block_size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_diff_max_min_pcm_luma_coding_block_sizeAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_diff_max_min_pcm_luma_coding_block_size(this.segment(), index, value); return this; } + /// Sets `log2_diff_max_min_pcm_luma_coding_block_size` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet log2_diff_max_min_pcm_luma_coding_block_size(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_log2_diff_max_min_pcm_luma_coding_block_size(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoH265SequenceParameterSet.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoH265SequenceParameterSet.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet reserved1At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet reserved1(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_reserved1(this.segment(), value); return this; } + + /// {@return `reserved2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment, long index) { return (byte) VH_reserved2.get(segment, 0L, index); } + /// {@return `reserved2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_reserved2(segment, 0L); } + /// {@return `reserved2` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved2At(long index) { return StdVideoH265SequenceParameterSet.get_reserved2(this.segment(), index); } + /// {@return `reserved2`} + public @CType("uint8_t") byte reserved2() { return StdVideoH265SequenceParameterSet.get_reserved2(this.segment()); } + /// Sets `reserved2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved2.set(segment, 0L, index, value); } + /// Sets `reserved2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_reserved2(segment, 0L, value); } + /// Sets `reserved2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet reserved2At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_reserved2(this.segment(), index, value); return this; } + /// Sets `reserved2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet reserved2(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_reserved2(this.segment(), value); return this; } + + /// {@return `palette_max_size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_palette_max_size(MemorySegment segment, long index) { return (byte) VH_palette_max_size.get(segment, 0L, index); } + /// {@return `palette_max_size`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_palette_max_size(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_palette_max_size(segment, 0L); } + /// {@return `palette_max_size` at the given index} + /// @param index the index + public @CType("uint8_t") byte palette_max_sizeAt(long index) { return StdVideoH265SequenceParameterSet.get_palette_max_size(this.segment(), index); } + /// {@return `palette_max_size`} + public @CType("uint8_t") byte palette_max_size() { return StdVideoH265SequenceParameterSet.get_palette_max_size(this.segment()); } + /// Sets `palette_max_size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_palette_max_size(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_palette_max_size.set(segment, 0L, index, value); } + /// Sets `palette_max_size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_palette_max_size(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_palette_max_size(segment, 0L, value); } + /// Sets `palette_max_size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet palette_max_sizeAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_palette_max_size(this.segment(), index, value); return this; } + /// Sets `palette_max_size` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet palette_max_size(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_palette_max_size(this.segment(), value); return this; } + + /// {@return `delta_palette_max_predictor_size` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_delta_palette_max_predictor_size(MemorySegment segment, long index) { return (byte) VH_delta_palette_max_predictor_size.get(segment, 0L, index); } + /// {@return `delta_palette_max_predictor_size`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_delta_palette_max_predictor_size(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_delta_palette_max_predictor_size(segment, 0L); } + /// {@return `delta_palette_max_predictor_size` at the given index} + /// @param index the index + public @CType("uint8_t") byte delta_palette_max_predictor_sizeAt(long index) { return StdVideoH265SequenceParameterSet.get_delta_palette_max_predictor_size(this.segment(), index); } + /// {@return `delta_palette_max_predictor_size`} + public @CType("uint8_t") byte delta_palette_max_predictor_size() { return StdVideoH265SequenceParameterSet.get_delta_palette_max_predictor_size(this.segment()); } + /// Sets `delta_palette_max_predictor_size` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_palette_max_predictor_size(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_delta_palette_max_predictor_size.set(segment, 0L, index, value); } + /// Sets `delta_palette_max_predictor_size` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_palette_max_predictor_size(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_delta_palette_max_predictor_size(segment, 0L, value); } + /// Sets `delta_palette_max_predictor_size` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet delta_palette_max_predictor_sizeAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_delta_palette_max_predictor_size(this.segment(), index, value); return this; } + /// Sets `delta_palette_max_predictor_size` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet delta_palette_max_predictor_size(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_delta_palette_max_predictor_size(this.segment(), value); return this; } + + /// {@return `motion_vector_resolution_control_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_motion_vector_resolution_control_idc(MemorySegment segment, long index) { return (byte) VH_motion_vector_resolution_control_idc.get(segment, 0L, index); } + /// {@return `motion_vector_resolution_control_idc`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_motion_vector_resolution_control_idc(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_motion_vector_resolution_control_idc(segment, 0L); } + /// {@return `motion_vector_resolution_control_idc` at the given index} + /// @param index the index + public @CType("uint8_t") byte motion_vector_resolution_control_idcAt(long index) { return StdVideoH265SequenceParameterSet.get_motion_vector_resolution_control_idc(this.segment(), index); } + /// {@return `motion_vector_resolution_control_idc`} + public @CType("uint8_t") byte motion_vector_resolution_control_idc() { return StdVideoH265SequenceParameterSet.get_motion_vector_resolution_control_idc(this.segment()); } + /// Sets `motion_vector_resolution_control_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_motion_vector_resolution_control_idc(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_motion_vector_resolution_control_idc.set(segment, 0L, index, value); } + /// Sets `motion_vector_resolution_control_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_motion_vector_resolution_control_idc(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_motion_vector_resolution_control_idc(segment, 0L, value); } + /// Sets `motion_vector_resolution_control_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet motion_vector_resolution_control_idcAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_motion_vector_resolution_control_idc(this.segment(), index, value); return this; } + /// Sets `motion_vector_resolution_control_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet motion_vector_resolution_control_idc(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_motion_vector_resolution_control_idc(this.segment(), value); return this; } + + /// {@return `sps_num_palette_predictor_initializers_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_sps_num_palette_predictor_initializers_minus1(MemorySegment segment, long index) { return (byte) VH_sps_num_palette_predictor_initializers_minus1.get(segment, 0L, index); } + /// {@return `sps_num_palette_predictor_initializers_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_sps_num_palette_predictor_initializers_minus1(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_sps_num_palette_predictor_initializers_minus1(segment, 0L); } + /// {@return `sps_num_palette_predictor_initializers_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte sps_num_palette_predictor_initializers_minus1At(long index) { return StdVideoH265SequenceParameterSet.get_sps_num_palette_predictor_initializers_minus1(this.segment(), index); } + /// {@return `sps_num_palette_predictor_initializers_minus1`} + public @CType("uint8_t") byte sps_num_palette_predictor_initializers_minus1() { return StdVideoH265SequenceParameterSet.get_sps_num_palette_predictor_initializers_minus1(this.segment()); } + /// Sets `sps_num_palette_predictor_initializers_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_num_palette_predictor_initializers_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_sps_num_palette_predictor_initializers_minus1.set(segment, 0L, index, value); } + /// Sets `sps_num_palette_predictor_initializers_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_num_palette_predictor_initializers_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_num_palette_predictor_initializers_minus1(segment, 0L, value); } + /// Sets `sps_num_palette_predictor_initializers_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet sps_num_palette_predictor_initializers_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_num_palette_predictor_initializers_minus1(this.segment(), index, value); return this; } + /// Sets `sps_num_palette_predictor_initializers_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet sps_num_palette_predictor_initializers_minus1(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSet.set_sps_num_palette_predictor_initializers_minus1(this.segment(), value); return this; } + + /// {@return `conf_win_left_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_conf_win_left_offset(MemorySegment segment, long index) { return (int) VH_conf_win_left_offset.get(segment, 0L, index); } + /// {@return `conf_win_left_offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_conf_win_left_offset(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_conf_win_left_offset(segment, 0L); } + /// {@return `conf_win_left_offset` at the given index} + /// @param index the index + public @CType("uint32_t") int conf_win_left_offsetAt(long index) { return StdVideoH265SequenceParameterSet.get_conf_win_left_offset(this.segment(), index); } + /// {@return `conf_win_left_offset`} + public @CType("uint32_t") int conf_win_left_offset() { return StdVideoH265SequenceParameterSet.get_conf_win_left_offset(this.segment()); } + /// Sets `conf_win_left_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conf_win_left_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_conf_win_left_offset.set(segment, 0L, index, value); } + /// Sets `conf_win_left_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conf_win_left_offset(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_left_offset(segment, 0L, value); } + /// Sets `conf_win_left_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet conf_win_left_offsetAt(long index, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_left_offset(this.segment(), index, value); return this; } + /// Sets `conf_win_left_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet conf_win_left_offset(@CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_left_offset(this.segment(), value); return this; } + + /// {@return `conf_win_right_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_conf_win_right_offset(MemorySegment segment, long index) { return (int) VH_conf_win_right_offset.get(segment, 0L, index); } + /// {@return `conf_win_right_offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_conf_win_right_offset(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_conf_win_right_offset(segment, 0L); } + /// {@return `conf_win_right_offset` at the given index} + /// @param index the index + public @CType("uint32_t") int conf_win_right_offsetAt(long index) { return StdVideoH265SequenceParameterSet.get_conf_win_right_offset(this.segment(), index); } + /// {@return `conf_win_right_offset`} + public @CType("uint32_t") int conf_win_right_offset() { return StdVideoH265SequenceParameterSet.get_conf_win_right_offset(this.segment()); } + /// Sets `conf_win_right_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conf_win_right_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_conf_win_right_offset.set(segment, 0L, index, value); } + /// Sets `conf_win_right_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conf_win_right_offset(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_right_offset(segment, 0L, value); } + /// Sets `conf_win_right_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet conf_win_right_offsetAt(long index, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_right_offset(this.segment(), index, value); return this; } + /// Sets `conf_win_right_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet conf_win_right_offset(@CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_right_offset(this.segment(), value); return this; } + + /// {@return `conf_win_top_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_conf_win_top_offset(MemorySegment segment, long index) { return (int) VH_conf_win_top_offset.get(segment, 0L, index); } + /// {@return `conf_win_top_offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_conf_win_top_offset(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_conf_win_top_offset(segment, 0L); } + /// {@return `conf_win_top_offset` at the given index} + /// @param index the index + public @CType("uint32_t") int conf_win_top_offsetAt(long index) { return StdVideoH265SequenceParameterSet.get_conf_win_top_offset(this.segment(), index); } + /// {@return `conf_win_top_offset`} + public @CType("uint32_t") int conf_win_top_offset() { return StdVideoH265SequenceParameterSet.get_conf_win_top_offset(this.segment()); } + /// Sets `conf_win_top_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conf_win_top_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_conf_win_top_offset.set(segment, 0L, index, value); } + /// Sets `conf_win_top_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conf_win_top_offset(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_top_offset(segment, 0L, value); } + /// Sets `conf_win_top_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet conf_win_top_offsetAt(long index, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_top_offset(this.segment(), index, value); return this; } + /// Sets `conf_win_top_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet conf_win_top_offset(@CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_top_offset(this.segment(), value); return this; } + + /// {@return `conf_win_bottom_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_conf_win_bottom_offset(MemorySegment segment, long index) { return (int) VH_conf_win_bottom_offset.get(segment, 0L, index); } + /// {@return `conf_win_bottom_offset`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_conf_win_bottom_offset(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_conf_win_bottom_offset(segment, 0L); } + /// {@return `conf_win_bottom_offset` at the given index} + /// @param index the index + public @CType("uint32_t") int conf_win_bottom_offsetAt(long index) { return StdVideoH265SequenceParameterSet.get_conf_win_bottom_offset(this.segment(), index); } + /// {@return `conf_win_bottom_offset`} + public @CType("uint32_t") int conf_win_bottom_offset() { return StdVideoH265SequenceParameterSet.get_conf_win_bottom_offset(this.segment()); } + /// Sets `conf_win_bottom_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conf_win_bottom_offset(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_conf_win_bottom_offset.set(segment, 0L, index, value); } + /// Sets `conf_win_bottom_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conf_win_bottom_offset(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_bottom_offset(segment, 0L, value); } + /// Sets `conf_win_bottom_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet conf_win_bottom_offsetAt(long index, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_bottom_offset(this.segment(), index, value); return this; } + /// Sets `conf_win_bottom_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet conf_win_bottom_offset(@CType("uint32_t") int value) { StdVideoH265SequenceParameterSet.set_conf_win_bottom_offset(this.segment(), value); return this; } + + /// {@return `pProfileTierLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment get_pProfileTierLevel(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pProfileTierLevel.get(segment, 0L, index); } + /// {@return `pProfileTierLevel`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment get_pProfileTierLevel(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pProfileTierLevel(segment, 0L); } + /// {@return `pProfileTierLevel` at the given index} + /// @param index the index + public @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment pProfileTierLevelAt(long index) { return StdVideoH265SequenceParameterSet.get_pProfileTierLevel(this.segment(), index); } + /// {@return `pProfileTierLevel`} + public @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment pProfileTierLevel() { return StdVideoH265SequenceParameterSet.get_pProfileTierLevel(this.segment()); } + /// Sets `pProfileTierLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pProfileTierLevel(MemorySegment segment, long index, @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment value) { VH_pProfileTierLevel.set(segment, 0L, index, value); } + /// Sets `pProfileTierLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pProfileTierLevel(MemorySegment segment, @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pProfileTierLevel(segment, 0L, value); } + /// Sets `pProfileTierLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pProfileTierLevelAt(long index, @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pProfileTierLevel(this.segment(), index, value); return this; } + /// Sets `pProfileTierLevel` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pProfileTierLevel(@CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pProfileTierLevel(this.segment(), value); return this; } + + /// {@return `pDecPicBufMgr` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment get_pDecPicBufMgr(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDecPicBufMgr.get(segment, 0L, index); } + /// {@return `pDecPicBufMgr`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment get_pDecPicBufMgr(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pDecPicBufMgr(segment, 0L); } + /// {@return `pDecPicBufMgr` at the given index} + /// @param index the index + public @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment pDecPicBufMgrAt(long index) { return StdVideoH265SequenceParameterSet.get_pDecPicBufMgr(this.segment(), index); } + /// {@return `pDecPicBufMgr`} + public @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment pDecPicBufMgr() { return StdVideoH265SequenceParameterSet.get_pDecPicBufMgr(this.segment()); } + /// Sets `pDecPicBufMgr` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDecPicBufMgr(MemorySegment segment, long index, @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment value) { VH_pDecPicBufMgr.set(segment, 0L, index, value); } + /// Sets `pDecPicBufMgr` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDecPicBufMgr(MemorySegment segment, @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pDecPicBufMgr(segment, 0L, value); } + /// Sets `pDecPicBufMgr` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pDecPicBufMgrAt(long index, @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pDecPicBufMgr(this.segment(), index, value); return this; } + /// Sets `pDecPicBufMgr` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pDecPicBufMgr(@CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pDecPicBufMgr(this.segment(), value); return this; } + + /// {@return `pScalingLists` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment get_pScalingLists(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pScalingLists.get(segment, 0L, index); } + /// {@return `pScalingLists`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment get_pScalingLists(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pScalingLists(segment, 0L); } + /// {@return `pScalingLists` at the given index} + /// @param index the index + public @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment pScalingListsAt(long index) { return StdVideoH265SequenceParameterSet.get_pScalingLists(this.segment(), index); } + /// {@return `pScalingLists`} + public @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment pScalingLists() { return StdVideoH265SequenceParameterSet.get_pScalingLists(this.segment()); } + /// Sets `pScalingLists` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pScalingLists(MemorySegment segment, long index, @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment value) { VH_pScalingLists.set(segment, 0L, index, value); } + /// Sets `pScalingLists` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pScalingLists(MemorySegment segment, @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pScalingLists(segment, 0L, value); } + /// Sets `pScalingLists` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pScalingListsAt(long index, @CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pScalingLists(this.segment(), index, value); return this; } + /// Sets `pScalingLists` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pScalingLists(@CType("const StdVideoH265ScalingLists *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pScalingLists(this.segment(), value); return this; } + + /// {@return `pShortTermRefPicSet` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment get_pShortTermRefPicSet(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pShortTermRefPicSet.get(segment, 0L, index); } + /// {@return `pShortTermRefPicSet`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment get_pShortTermRefPicSet(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pShortTermRefPicSet(segment, 0L); } + /// {@return `pShortTermRefPicSet` at the given index} + /// @param index the index + public @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment pShortTermRefPicSetAt(long index) { return StdVideoH265SequenceParameterSet.get_pShortTermRefPicSet(this.segment(), index); } + /// {@return `pShortTermRefPicSet`} + public @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment pShortTermRefPicSet() { return StdVideoH265SequenceParameterSet.get_pShortTermRefPicSet(this.segment()); } + /// Sets `pShortTermRefPicSet` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pShortTermRefPicSet(MemorySegment segment, long index, @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment value) { VH_pShortTermRefPicSet.set(segment, 0L, index, value); } + /// Sets `pShortTermRefPicSet` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pShortTermRefPicSet(MemorySegment segment, @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pShortTermRefPicSet(segment, 0L, value); } + /// Sets `pShortTermRefPicSet` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pShortTermRefPicSetAt(long index, @CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pShortTermRefPicSet(this.segment(), index, value); return this; } + /// Sets `pShortTermRefPicSet` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pShortTermRefPicSet(@CType("const StdVideoH265ShortTermRefPicSet *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pShortTermRefPicSet(this.segment(), value); return this; } + + /// {@return `pLongTermRefPicsSps` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265LongTermRefPicsSps *") java.lang.foreign.MemorySegment get_pLongTermRefPicsSps(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pLongTermRefPicsSps.get(segment, 0L, index); } + /// {@return `pLongTermRefPicsSps`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265LongTermRefPicsSps *") java.lang.foreign.MemorySegment get_pLongTermRefPicsSps(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pLongTermRefPicsSps(segment, 0L); } + /// {@return `pLongTermRefPicsSps` at the given index} + /// @param index the index + public @CType("const StdVideoH265LongTermRefPicsSps *") java.lang.foreign.MemorySegment pLongTermRefPicsSpsAt(long index) { return StdVideoH265SequenceParameterSet.get_pLongTermRefPicsSps(this.segment(), index); } + /// {@return `pLongTermRefPicsSps`} + public @CType("const StdVideoH265LongTermRefPicsSps *") java.lang.foreign.MemorySegment pLongTermRefPicsSps() { return StdVideoH265SequenceParameterSet.get_pLongTermRefPicsSps(this.segment()); } + /// Sets `pLongTermRefPicsSps` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pLongTermRefPicsSps(MemorySegment segment, long index, @CType("const StdVideoH265LongTermRefPicsSps *") java.lang.foreign.MemorySegment value) { VH_pLongTermRefPicsSps.set(segment, 0L, index, value); } + /// Sets `pLongTermRefPicsSps` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pLongTermRefPicsSps(MemorySegment segment, @CType("const StdVideoH265LongTermRefPicsSps *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pLongTermRefPicsSps(segment, 0L, value); } + /// Sets `pLongTermRefPicsSps` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pLongTermRefPicsSpsAt(long index, @CType("const StdVideoH265LongTermRefPicsSps *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pLongTermRefPicsSps(this.segment(), index, value); return this; } + /// Sets `pLongTermRefPicsSps` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pLongTermRefPicsSps(@CType("const StdVideoH265LongTermRefPicsSps *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pLongTermRefPicsSps(this.segment(), value); return this; } + + /// {@return `pSequenceParameterSetVui` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265SequenceParameterSetVui *") java.lang.foreign.MemorySegment get_pSequenceParameterSetVui(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pSequenceParameterSetVui.get(segment, 0L, index); } + /// {@return `pSequenceParameterSetVui`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265SequenceParameterSetVui *") java.lang.foreign.MemorySegment get_pSequenceParameterSetVui(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pSequenceParameterSetVui(segment, 0L); } + /// {@return `pSequenceParameterSetVui` at the given index} + /// @param index the index + public @CType("const StdVideoH265SequenceParameterSetVui *") java.lang.foreign.MemorySegment pSequenceParameterSetVuiAt(long index) { return StdVideoH265SequenceParameterSet.get_pSequenceParameterSetVui(this.segment(), index); } + /// {@return `pSequenceParameterSetVui`} + public @CType("const StdVideoH265SequenceParameterSetVui *") java.lang.foreign.MemorySegment pSequenceParameterSetVui() { return StdVideoH265SequenceParameterSet.get_pSequenceParameterSetVui(this.segment()); } + /// Sets `pSequenceParameterSetVui` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pSequenceParameterSetVui(MemorySegment segment, long index, @CType("const StdVideoH265SequenceParameterSetVui *") java.lang.foreign.MemorySegment value) { VH_pSequenceParameterSetVui.set(segment, 0L, index, value); } + /// Sets `pSequenceParameterSetVui` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pSequenceParameterSetVui(MemorySegment segment, @CType("const StdVideoH265SequenceParameterSetVui *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pSequenceParameterSetVui(segment, 0L, value); } + /// Sets `pSequenceParameterSetVui` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pSequenceParameterSetVuiAt(long index, @CType("const StdVideoH265SequenceParameterSetVui *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pSequenceParameterSetVui(this.segment(), index, value); return this; } + /// Sets `pSequenceParameterSetVui` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pSequenceParameterSetVui(@CType("const StdVideoH265SequenceParameterSetVui *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pSequenceParameterSetVui(this.segment(), value); return this; } + + /// {@return `pPredictorPaletteEntries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment get_pPredictorPaletteEntries(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pPredictorPaletteEntries.get(segment, 0L, index); } + /// {@return `pPredictorPaletteEntries`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment get_pPredictorPaletteEntries(MemorySegment segment) { return StdVideoH265SequenceParameterSet.get_pPredictorPaletteEntries(segment, 0L); } + /// {@return `pPredictorPaletteEntries` at the given index} + /// @param index the index + public @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment pPredictorPaletteEntriesAt(long index) { return StdVideoH265SequenceParameterSet.get_pPredictorPaletteEntries(this.segment(), index); } + /// {@return `pPredictorPaletteEntries`} + public @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment pPredictorPaletteEntries() { return StdVideoH265SequenceParameterSet.get_pPredictorPaletteEntries(this.segment()); } + /// Sets `pPredictorPaletteEntries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pPredictorPaletteEntries(MemorySegment segment, long index, @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment value) { VH_pPredictorPaletteEntries.set(segment, 0L, index, value); } + /// Sets `pPredictorPaletteEntries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pPredictorPaletteEntries(MemorySegment segment, @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pPredictorPaletteEntries(segment, 0L, value); } + /// Sets `pPredictorPaletteEntries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pPredictorPaletteEntriesAt(long index, @CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pPredictorPaletteEntries(this.segment(), index, value); return this; } + /// Sets `pPredictorPaletteEntries` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSet pPredictorPaletteEntries(@CType("const StdVideoH265PredictorPaletteEntries *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSet.set_pPredictorPaletteEntries(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SequenceParameterSetVui.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SequenceParameterSetVui.java new file mode 100644 index 00000000..08d9d90b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SequenceParameterSetVui.java @@ -0,0 +1,1036 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### aspect_ratio_idc +/// [VarHandle][#VH_aspect_ratio_idc] - [Getter][#aspect_ratio_idc()] - [Setter][#aspect_ratio_idc(int)] +/// ### sar_width +/// [VarHandle][#VH_sar_width] - [Getter][#sar_width()] - [Setter][#sar_width(short)] +/// ### sar_height +/// [VarHandle][#VH_sar_height] - [Getter][#sar_height()] - [Setter][#sar_height(short)] +/// ### video_format +/// [VarHandle][#VH_video_format] - [Getter][#video_format()] - [Setter][#video_format(byte)] +/// ### colour_primaries +/// [VarHandle][#VH_colour_primaries] - [Getter][#colour_primaries()] - [Setter][#colour_primaries(byte)] +/// ### transfer_characteristics +/// [VarHandle][#VH_transfer_characteristics] - [Getter][#transfer_characteristics()] - [Setter][#transfer_characteristics(byte)] +/// ### matrix_coeffs +/// [VarHandle][#VH_matrix_coeffs] - [Getter][#matrix_coeffs()] - [Setter][#matrix_coeffs(byte)] +/// ### chroma_sample_loc_type_top_field +/// [VarHandle][#VH_chroma_sample_loc_type_top_field] - [Getter][#chroma_sample_loc_type_top_field()] - [Setter][#chroma_sample_loc_type_top_field(byte)] +/// ### chroma_sample_loc_type_bottom_field +/// [VarHandle][#VH_chroma_sample_loc_type_bottom_field] - [Getter][#chroma_sample_loc_type_bottom_field()] - [Setter][#chroma_sample_loc_type_bottom_field(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### reserved2 +/// [VarHandle][#VH_reserved2] - [Getter][#reserved2()] - [Setter][#reserved2(byte)] +/// ### def_disp_win_left_offset +/// [VarHandle][#VH_def_disp_win_left_offset] - [Getter][#def_disp_win_left_offset()] - [Setter][#def_disp_win_left_offset(short)] +/// ### def_disp_win_right_offset +/// [VarHandle][#VH_def_disp_win_right_offset] - [Getter][#def_disp_win_right_offset()] - [Setter][#def_disp_win_right_offset(short)] +/// ### def_disp_win_top_offset +/// [VarHandle][#VH_def_disp_win_top_offset] - [Getter][#def_disp_win_top_offset()] - [Setter][#def_disp_win_top_offset(short)] +/// ### def_disp_win_bottom_offset +/// [VarHandle][#VH_def_disp_win_bottom_offset] - [Getter][#def_disp_win_bottom_offset()] - [Setter][#def_disp_win_bottom_offset(short)] +/// ### vui_num_units_in_tick +/// [VarHandle][#VH_vui_num_units_in_tick] - [Getter][#vui_num_units_in_tick()] - [Setter][#vui_num_units_in_tick(int)] +/// ### vui_time_scale +/// [VarHandle][#VH_vui_time_scale] - [Getter][#vui_time_scale()] - [Setter][#vui_time_scale(int)] +/// ### vui_num_ticks_poc_diff_one_minus1 +/// [VarHandle][#VH_vui_num_ticks_poc_diff_one_minus1] - [Getter][#vui_num_ticks_poc_diff_one_minus1()] - [Setter][#vui_num_ticks_poc_diff_one_minus1(int)] +/// ### min_spatial_segmentation_idc +/// [VarHandle][#VH_min_spatial_segmentation_idc] - [Getter][#min_spatial_segmentation_idc()] - [Setter][#min_spatial_segmentation_idc(short)] +/// ### reserved3 +/// [VarHandle][#VH_reserved3] - [Getter][#reserved3()] - [Setter][#reserved3(short)] +/// ### max_bytes_per_pic_denom +/// [VarHandle][#VH_max_bytes_per_pic_denom] - [Getter][#max_bytes_per_pic_denom()] - [Setter][#max_bytes_per_pic_denom(byte)] +/// ### max_bits_per_min_cu_denom +/// [VarHandle][#VH_max_bits_per_min_cu_denom] - [Getter][#max_bits_per_min_cu_denom()] - [Setter][#max_bits_per_min_cu_denom(byte)] +/// ### log2_max_mv_length_horizontal +/// [VarHandle][#VH_log2_max_mv_length_horizontal] - [Getter][#log2_max_mv_length_horizontal()] - [Setter][#log2_max_mv_length_horizontal(byte)] +/// ### log2_max_mv_length_vertical +/// [VarHandle][#VH_log2_max_mv_length_vertical] - [Getter][#log2_max_mv_length_vertical()] - [Setter][#log2_max_mv_length_vertical(byte)] +/// ### pHrdParameters +/// [VarHandle][#VH_pHrdParameters] - [Getter][#pHrdParameters()] - [Setter][#pHrdParameters(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265SequenceParameterSetVui { +/// StdVideoH265SpsVuiFlags flags; +/// StdVideoH265AspectRatioIdc aspect_ratio_idc; +/// uint16_t sar_width; +/// uint16_t sar_height; +/// uint8_t video_format; +/// uint8_t colour_primaries; +/// uint8_t transfer_characteristics; +/// uint8_t matrix_coeffs; +/// uint8_t chroma_sample_loc_type_top_field; +/// uint8_t chroma_sample_loc_type_bottom_field; +/// uint8_t reserved1; +/// uint8_t reserved2; +/// uint16_t def_disp_win_left_offset; +/// uint16_t def_disp_win_right_offset; +/// uint16_t def_disp_win_top_offset; +/// uint16_t def_disp_win_bottom_offset; +/// uint32_t vui_num_units_in_tick; +/// uint32_t vui_time_scale; +/// uint32_t vui_num_ticks_poc_diff_one_minus1; +/// uint16_t min_spatial_segmentation_idc; +/// uint16_t reserved3; +/// uint8_t max_bytes_per_pic_denom; +/// uint8_t max_bits_per_min_cu_denom; +/// uint8_t log2_max_mv_length_horizontal; +/// uint8_t log2_max_mv_length_vertical; +/// const StdVideoH265HrdParameters * pHrdParameters; +/// } StdVideoH265SequenceParameterSetVui; +/// ``` +public final class StdVideoH265SequenceParameterSetVui extends Struct { + /// The struct layout of `StdVideoH265SequenceParameterSetVui`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoH265SpsVuiFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("aspect_ratio_idc"), + ValueLayout.JAVA_SHORT.withName("sar_width"), + ValueLayout.JAVA_SHORT.withName("sar_height"), + ValueLayout.JAVA_BYTE.withName("video_format"), + ValueLayout.JAVA_BYTE.withName("colour_primaries"), + ValueLayout.JAVA_BYTE.withName("transfer_characteristics"), + ValueLayout.JAVA_BYTE.withName("matrix_coeffs"), + ValueLayout.JAVA_BYTE.withName("chroma_sample_loc_type_top_field"), + ValueLayout.JAVA_BYTE.withName("chroma_sample_loc_type_bottom_field"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_BYTE.withName("reserved2"), + ValueLayout.JAVA_SHORT.withName("def_disp_win_left_offset"), + ValueLayout.JAVA_SHORT.withName("def_disp_win_right_offset"), + ValueLayout.JAVA_SHORT.withName("def_disp_win_top_offset"), + ValueLayout.JAVA_SHORT.withName("def_disp_win_bottom_offset"), + ValueLayout.JAVA_INT.withName("vui_num_units_in_tick"), + ValueLayout.JAVA_INT.withName("vui_time_scale"), + ValueLayout.JAVA_INT.withName("vui_num_ticks_poc_diff_one_minus1"), + ValueLayout.JAVA_SHORT.withName("min_spatial_segmentation_idc"), + ValueLayout.JAVA_SHORT.withName("reserved3"), + ValueLayout.JAVA_BYTE.withName("max_bytes_per_pic_denom"), + ValueLayout.JAVA_BYTE.withName("max_bits_per_min_cu_denom"), + ValueLayout.JAVA_BYTE.withName("log2_max_mv_length_horizontal"), + ValueLayout.JAVA_BYTE.withName("log2_max_mv_length_vertical"), + ValueLayout.ADDRESS.withName("pHrdParameters") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `aspect_ratio_idc` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspect_ratio_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspect_ratio_idc")); + /// The [VarHandle] of `sar_width` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_sar_width = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sar_width")); + /// The [VarHandle] of `sar_height` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_sar_height = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sar_height")); + /// The [VarHandle] of `video_format` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_video_format = LAYOUT.arrayElementVarHandle(PathElement.groupElement("video_format")); + /// The [VarHandle] of `colour_primaries` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_colour_primaries = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colour_primaries")); + /// The [VarHandle] of `transfer_characteristics` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_transfer_characteristics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transfer_characteristics")); + /// The [VarHandle] of `matrix_coeffs` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_matrix_coeffs = LAYOUT.arrayElementVarHandle(PathElement.groupElement("matrix_coeffs")); + /// The [VarHandle] of `chroma_sample_loc_type_top_field` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_sample_loc_type_top_field = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_sample_loc_type_top_field")); + /// The [VarHandle] of `chroma_sample_loc_type_bottom_field` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_chroma_sample_loc_type_bottom_field = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_sample_loc_type_bottom_field")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `reserved2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved2")); + /// The [VarHandle] of `def_disp_win_left_offset` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_def_disp_win_left_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("def_disp_win_left_offset")); + /// The [VarHandle] of `def_disp_win_right_offset` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_def_disp_win_right_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("def_disp_win_right_offset")); + /// The [VarHandle] of `def_disp_win_top_offset` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_def_disp_win_top_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("def_disp_win_top_offset")); + /// The [VarHandle] of `def_disp_win_bottom_offset` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_def_disp_win_bottom_offset = LAYOUT.arrayElementVarHandle(PathElement.groupElement("def_disp_win_bottom_offset")); + /// The [VarHandle] of `vui_num_units_in_tick` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vui_num_units_in_tick = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vui_num_units_in_tick")); + /// The [VarHandle] of `vui_time_scale` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vui_time_scale = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vui_time_scale")); + /// The [VarHandle] of `vui_num_ticks_poc_diff_one_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vui_num_ticks_poc_diff_one_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vui_num_ticks_poc_diff_one_minus1")); + /// The [VarHandle] of `min_spatial_segmentation_idc` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_min_spatial_segmentation_idc = LAYOUT.arrayElementVarHandle(PathElement.groupElement("min_spatial_segmentation_idc")); + /// The [VarHandle] of `reserved3` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_reserved3 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved3")); + /// The [VarHandle] of `max_bytes_per_pic_denom` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_max_bytes_per_pic_denom = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_bytes_per_pic_denom")); + /// The [VarHandle] of `max_bits_per_min_cu_denom` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_max_bits_per_min_cu_denom = LAYOUT.arrayElementVarHandle(PathElement.groupElement("max_bits_per_min_cu_denom")); + /// The [VarHandle] of `log2_max_mv_length_horizontal` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_max_mv_length_horizontal = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_max_mv_length_horizontal")); + /// The [VarHandle] of `log2_max_mv_length_vertical` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_log2_max_mv_length_vertical = LAYOUT.arrayElementVarHandle(PathElement.groupElement("log2_max_mv_length_vertical")); + /// The [VarHandle] of `pHrdParameters` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pHrdParameters = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pHrdParameters")); + + /// Creates `StdVideoH265SequenceParameterSetVui` with the given segment. + /// @param segment the memory segment + public StdVideoH265SequenceParameterSetVui(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265SequenceParameterSetVui` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SequenceParameterSetVui of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SequenceParameterSetVui(segment); } + + /// Creates `StdVideoH265SequenceParameterSetVui` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SequenceParameterSetVui ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SequenceParameterSetVui(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265SequenceParameterSetVui` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SequenceParameterSetVui ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SequenceParameterSetVui(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265SequenceParameterSetVui` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265SequenceParameterSetVui` + public static StdVideoH265SequenceParameterSetVui alloc(SegmentAllocator allocator) { return new StdVideoH265SequenceParameterSetVui(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265SequenceParameterSetVui` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265SequenceParameterSetVui` + public static StdVideoH265SequenceParameterSetVui alloc(SegmentAllocator allocator, long count) { return new StdVideoH265SequenceParameterSetVui(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265SpsVuiFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265SpsVuiFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoH265SpsVuiFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoH265SequenceParameterSetVui.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoH265SpsVuiFlags") java.lang.foreign.MemorySegment flags() { return StdVideoH265SequenceParameterSetVui.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoH265SpsVuiFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoH265SpsVuiFlags") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSetVui.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui flagsAt(long index, @CType("StdVideoH265SpsVuiFlags") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSetVui.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui flags(@CType("StdVideoH265SpsVuiFlags") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSetVui.set_flags(this.segment(), value); return this; } + + /// {@return `aspect_ratio_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265AspectRatioIdc") int get_aspect_ratio_idc(MemorySegment segment, long index) { return (int) VH_aspect_ratio_idc.get(segment, 0L, index); } + /// {@return `aspect_ratio_idc`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265AspectRatioIdc") int get_aspect_ratio_idc(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_aspect_ratio_idc(segment, 0L); } + /// {@return `aspect_ratio_idc` at the given index} + /// @param index the index + public @CType("StdVideoH265AspectRatioIdc") int aspect_ratio_idcAt(long index) { return StdVideoH265SequenceParameterSetVui.get_aspect_ratio_idc(this.segment(), index); } + /// {@return `aspect_ratio_idc`} + public @CType("StdVideoH265AspectRatioIdc") int aspect_ratio_idc() { return StdVideoH265SequenceParameterSetVui.get_aspect_ratio_idc(this.segment()); } + /// Sets `aspect_ratio_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspect_ratio_idc(MemorySegment segment, long index, @CType("StdVideoH265AspectRatioIdc") int value) { VH_aspect_ratio_idc.set(segment, 0L, index, value); } + /// Sets `aspect_ratio_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspect_ratio_idc(MemorySegment segment, @CType("StdVideoH265AspectRatioIdc") int value) { StdVideoH265SequenceParameterSetVui.set_aspect_ratio_idc(segment, 0L, value); } + /// Sets `aspect_ratio_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui aspect_ratio_idcAt(long index, @CType("StdVideoH265AspectRatioIdc") int value) { StdVideoH265SequenceParameterSetVui.set_aspect_ratio_idc(this.segment(), index, value); return this; } + /// Sets `aspect_ratio_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui aspect_ratio_idc(@CType("StdVideoH265AspectRatioIdc") int value) { StdVideoH265SequenceParameterSetVui.set_aspect_ratio_idc(this.segment(), value); return this; } + + /// {@return `sar_width` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_sar_width(MemorySegment segment, long index) { return (short) VH_sar_width.get(segment, 0L, index); } + /// {@return `sar_width`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_sar_width(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_sar_width(segment, 0L); } + /// {@return `sar_width` at the given index} + /// @param index the index + public @CType("uint16_t") short sar_widthAt(long index) { return StdVideoH265SequenceParameterSetVui.get_sar_width(this.segment(), index); } + /// {@return `sar_width`} + public @CType("uint16_t") short sar_width() { return StdVideoH265SequenceParameterSetVui.get_sar_width(this.segment()); } + /// Sets `sar_width` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sar_width(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_sar_width.set(segment, 0L, index, value); } + /// Sets `sar_width` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sar_width(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_sar_width(segment, 0L, value); } + /// Sets `sar_width` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui sar_widthAt(long index, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_sar_width(this.segment(), index, value); return this; } + /// Sets `sar_width` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui sar_width(@CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_sar_width(this.segment(), value); return this; } + + /// {@return `sar_height` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_sar_height(MemorySegment segment, long index) { return (short) VH_sar_height.get(segment, 0L, index); } + /// {@return `sar_height`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_sar_height(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_sar_height(segment, 0L); } + /// {@return `sar_height` at the given index} + /// @param index the index + public @CType("uint16_t") short sar_heightAt(long index) { return StdVideoH265SequenceParameterSetVui.get_sar_height(this.segment(), index); } + /// {@return `sar_height`} + public @CType("uint16_t") short sar_height() { return StdVideoH265SequenceParameterSetVui.get_sar_height(this.segment()); } + /// Sets `sar_height` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sar_height(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_sar_height.set(segment, 0L, index, value); } + /// Sets `sar_height` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sar_height(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_sar_height(segment, 0L, value); } + /// Sets `sar_height` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui sar_heightAt(long index, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_sar_height(this.segment(), index, value); return this; } + /// Sets `sar_height` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui sar_height(@CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_sar_height(this.segment(), value); return this; } + + /// {@return `video_format` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_video_format(MemorySegment segment, long index) { return (byte) VH_video_format.get(segment, 0L, index); } + /// {@return `video_format`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_video_format(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_video_format(segment, 0L); } + /// {@return `video_format` at the given index} + /// @param index the index + public @CType("uint8_t") byte video_formatAt(long index) { return StdVideoH265SequenceParameterSetVui.get_video_format(this.segment(), index); } + /// {@return `video_format`} + public @CType("uint8_t") byte video_format() { return StdVideoH265SequenceParameterSetVui.get_video_format(this.segment()); } + /// Sets `video_format` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_video_format(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_video_format.set(segment, 0L, index, value); } + /// Sets `video_format` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_video_format(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_video_format(segment, 0L, value); } + /// Sets `video_format` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui video_formatAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_video_format(this.segment(), index, value); return this; } + /// Sets `video_format` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui video_format(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_video_format(this.segment(), value); return this; } + + /// {@return `colour_primaries` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_colour_primaries(MemorySegment segment, long index) { return (byte) VH_colour_primaries.get(segment, 0L, index); } + /// {@return `colour_primaries`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_colour_primaries(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_colour_primaries(segment, 0L); } + /// {@return `colour_primaries` at the given index} + /// @param index the index + public @CType("uint8_t") byte colour_primariesAt(long index) { return StdVideoH265SequenceParameterSetVui.get_colour_primaries(this.segment(), index); } + /// {@return `colour_primaries`} + public @CType("uint8_t") byte colour_primaries() { return StdVideoH265SequenceParameterSetVui.get_colour_primaries(this.segment()); } + /// Sets `colour_primaries` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colour_primaries(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_colour_primaries.set(segment, 0L, index, value); } + /// Sets `colour_primaries` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colour_primaries(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_colour_primaries(segment, 0L, value); } + /// Sets `colour_primaries` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui colour_primariesAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_colour_primaries(this.segment(), index, value); return this; } + /// Sets `colour_primaries` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui colour_primaries(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_colour_primaries(this.segment(), value); return this; } + + /// {@return `transfer_characteristics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_transfer_characteristics(MemorySegment segment, long index) { return (byte) VH_transfer_characteristics.get(segment, 0L, index); } + /// {@return `transfer_characteristics`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_transfer_characteristics(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_transfer_characteristics(segment, 0L); } + /// {@return `transfer_characteristics` at the given index} + /// @param index the index + public @CType("uint8_t") byte transfer_characteristicsAt(long index) { return StdVideoH265SequenceParameterSetVui.get_transfer_characteristics(this.segment(), index); } + /// {@return `transfer_characteristics`} + public @CType("uint8_t") byte transfer_characteristics() { return StdVideoH265SequenceParameterSetVui.get_transfer_characteristics(this.segment()); } + /// Sets `transfer_characteristics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transfer_characteristics(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_transfer_characteristics.set(segment, 0L, index, value); } + /// Sets `transfer_characteristics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transfer_characteristics(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_transfer_characteristics(segment, 0L, value); } + /// Sets `transfer_characteristics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui transfer_characteristicsAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_transfer_characteristics(this.segment(), index, value); return this; } + /// Sets `transfer_characteristics` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui transfer_characteristics(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_transfer_characteristics(this.segment(), value); return this; } + + /// {@return `matrix_coeffs` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_matrix_coeffs(MemorySegment segment, long index) { return (byte) VH_matrix_coeffs.get(segment, 0L, index); } + /// {@return `matrix_coeffs`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_matrix_coeffs(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_matrix_coeffs(segment, 0L); } + /// {@return `matrix_coeffs` at the given index} + /// @param index the index + public @CType("uint8_t") byte matrix_coeffsAt(long index) { return StdVideoH265SequenceParameterSetVui.get_matrix_coeffs(this.segment(), index); } + /// {@return `matrix_coeffs`} + public @CType("uint8_t") byte matrix_coeffs() { return StdVideoH265SequenceParameterSetVui.get_matrix_coeffs(this.segment()); } + /// Sets `matrix_coeffs` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_matrix_coeffs(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_matrix_coeffs.set(segment, 0L, index, value); } + /// Sets `matrix_coeffs` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_matrix_coeffs(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_matrix_coeffs(segment, 0L, value); } + /// Sets `matrix_coeffs` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui matrix_coeffsAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_matrix_coeffs(this.segment(), index, value); return this; } + /// Sets `matrix_coeffs` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui matrix_coeffs(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_matrix_coeffs(this.segment(), value); return this; } + + /// {@return `chroma_sample_loc_type_top_field` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_chroma_sample_loc_type_top_field(MemorySegment segment, long index) { return (byte) VH_chroma_sample_loc_type_top_field.get(segment, 0L, index); } + /// {@return `chroma_sample_loc_type_top_field`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_chroma_sample_loc_type_top_field(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_chroma_sample_loc_type_top_field(segment, 0L); } + /// {@return `chroma_sample_loc_type_top_field` at the given index} + /// @param index the index + public @CType("uint8_t") byte chroma_sample_loc_type_top_fieldAt(long index) { return StdVideoH265SequenceParameterSetVui.get_chroma_sample_loc_type_top_field(this.segment(), index); } + /// {@return `chroma_sample_loc_type_top_field`} + public @CType("uint8_t") byte chroma_sample_loc_type_top_field() { return StdVideoH265SequenceParameterSetVui.get_chroma_sample_loc_type_top_field(this.segment()); } + /// Sets `chroma_sample_loc_type_top_field` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_sample_loc_type_top_field(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_chroma_sample_loc_type_top_field.set(segment, 0L, index, value); } + /// Sets `chroma_sample_loc_type_top_field` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_sample_loc_type_top_field(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_chroma_sample_loc_type_top_field(segment, 0L, value); } + /// Sets `chroma_sample_loc_type_top_field` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui chroma_sample_loc_type_top_fieldAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_chroma_sample_loc_type_top_field(this.segment(), index, value); return this; } + /// Sets `chroma_sample_loc_type_top_field` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui chroma_sample_loc_type_top_field(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_chroma_sample_loc_type_top_field(this.segment(), value); return this; } + + /// {@return `chroma_sample_loc_type_bottom_field` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_chroma_sample_loc_type_bottom_field(MemorySegment segment, long index) { return (byte) VH_chroma_sample_loc_type_bottom_field.get(segment, 0L, index); } + /// {@return `chroma_sample_loc_type_bottom_field`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_chroma_sample_loc_type_bottom_field(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_chroma_sample_loc_type_bottom_field(segment, 0L); } + /// {@return `chroma_sample_loc_type_bottom_field` at the given index} + /// @param index the index + public @CType("uint8_t") byte chroma_sample_loc_type_bottom_fieldAt(long index) { return StdVideoH265SequenceParameterSetVui.get_chroma_sample_loc_type_bottom_field(this.segment(), index); } + /// {@return `chroma_sample_loc_type_bottom_field`} + public @CType("uint8_t") byte chroma_sample_loc_type_bottom_field() { return StdVideoH265SequenceParameterSetVui.get_chroma_sample_loc_type_bottom_field(this.segment()); } + /// Sets `chroma_sample_loc_type_bottom_field` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_sample_loc_type_bottom_field(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_chroma_sample_loc_type_bottom_field.set(segment, 0L, index, value); } + /// Sets `chroma_sample_loc_type_bottom_field` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_sample_loc_type_bottom_field(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_chroma_sample_loc_type_bottom_field(segment, 0L, value); } + /// Sets `chroma_sample_loc_type_bottom_field` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui chroma_sample_loc_type_bottom_fieldAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_chroma_sample_loc_type_bottom_field(this.segment(), index, value); return this; } + /// Sets `chroma_sample_loc_type_bottom_field` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui chroma_sample_loc_type_bottom_field(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_chroma_sample_loc_type_bottom_field(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoH265SequenceParameterSetVui.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoH265SequenceParameterSetVui.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui reserved1At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui reserved1(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_reserved1(this.segment(), value); return this; } + + /// {@return `reserved2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment, long index) { return (byte) VH_reserved2.get(segment, 0L, index); } + /// {@return `reserved2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_reserved2(segment, 0L); } + /// {@return `reserved2` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved2At(long index) { return StdVideoH265SequenceParameterSetVui.get_reserved2(this.segment(), index); } + /// {@return `reserved2`} + public @CType("uint8_t") byte reserved2() { return StdVideoH265SequenceParameterSetVui.get_reserved2(this.segment()); } + /// Sets `reserved2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved2.set(segment, 0L, index, value); } + /// Sets `reserved2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_reserved2(segment, 0L, value); } + /// Sets `reserved2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui reserved2At(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_reserved2(this.segment(), index, value); return this; } + /// Sets `reserved2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui reserved2(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_reserved2(this.segment(), value); return this; } + + /// {@return `def_disp_win_left_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_def_disp_win_left_offset(MemorySegment segment, long index) { return (short) VH_def_disp_win_left_offset.get(segment, 0L, index); } + /// {@return `def_disp_win_left_offset`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_def_disp_win_left_offset(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_left_offset(segment, 0L); } + /// {@return `def_disp_win_left_offset` at the given index} + /// @param index the index + public @CType("uint16_t") short def_disp_win_left_offsetAt(long index) { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_left_offset(this.segment(), index); } + /// {@return `def_disp_win_left_offset`} + public @CType("uint16_t") short def_disp_win_left_offset() { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_left_offset(this.segment()); } + /// Sets `def_disp_win_left_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_def_disp_win_left_offset(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_def_disp_win_left_offset.set(segment, 0L, index, value); } + /// Sets `def_disp_win_left_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_def_disp_win_left_offset(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_left_offset(segment, 0L, value); } + /// Sets `def_disp_win_left_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui def_disp_win_left_offsetAt(long index, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_left_offset(this.segment(), index, value); return this; } + /// Sets `def_disp_win_left_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui def_disp_win_left_offset(@CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_left_offset(this.segment(), value); return this; } + + /// {@return `def_disp_win_right_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_def_disp_win_right_offset(MemorySegment segment, long index) { return (short) VH_def_disp_win_right_offset.get(segment, 0L, index); } + /// {@return `def_disp_win_right_offset`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_def_disp_win_right_offset(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_right_offset(segment, 0L); } + /// {@return `def_disp_win_right_offset` at the given index} + /// @param index the index + public @CType("uint16_t") short def_disp_win_right_offsetAt(long index) { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_right_offset(this.segment(), index); } + /// {@return `def_disp_win_right_offset`} + public @CType("uint16_t") short def_disp_win_right_offset() { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_right_offset(this.segment()); } + /// Sets `def_disp_win_right_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_def_disp_win_right_offset(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_def_disp_win_right_offset.set(segment, 0L, index, value); } + /// Sets `def_disp_win_right_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_def_disp_win_right_offset(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_right_offset(segment, 0L, value); } + /// Sets `def_disp_win_right_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui def_disp_win_right_offsetAt(long index, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_right_offset(this.segment(), index, value); return this; } + /// Sets `def_disp_win_right_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui def_disp_win_right_offset(@CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_right_offset(this.segment(), value); return this; } + + /// {@return `def_disp_win_top_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_def_disp_win_top_offset(MemorySegment segment, long index) { return (short) VH_def_disp_win_top_offset.get(segment, 0L, index); } + /// {@return `def_disp_win_top_offset`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_def_disp_win_top_offset(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_top_offset(segment, 0L); } + /// {@return `def_disp_win_top_offset` at the given index} + /// @param index the index + public @CType("uint16_t") short def_disp_win_top_offsetAt(long index) { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_top_offset(this.segment(), index); } + /// {@return `def_disp_win_top_offset`} + public @CType("uint16_t") short def_disp_win_top_offset() { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_top_offset(this.segment()); } + /// Sets `def_disp_win_top_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_def_disp_win_top_offset(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_def_disp_win_top_offset.set(segment, 0L, index, value); } + /// Sets `def_disp_win_top_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_def_disp_win_top_offset(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_top_offset(segment, 0L, value); } + /// Sets `def_disp_win_top_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui def_disp_win_top_offsetAt(long index, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_top_offset(this.segment(), index, value); return this; } + /// Sets `def_disp_win_top_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui def_disp_win_top_offset(@CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_top_offset(this.segment(), value); return this; } + + /// {@return `def_disp_win_bottom_offset` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_def_disp_win_bottom_offset(MemorySegment segment, long index) { return (short) VH_def_disp_win_bottom_offset.get(segment, 0L, index); } + /// {@return `def_disp_win_bottom_offset`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_def_disp_win_bottom_offset(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_bottom_offset(segment, 0L); } + /// {@return `def_disp_win_bottom_offset` at the given index} + /// @param index the index + public @CType("uint16_t") short def_disp_win_bottom_offsetAt(long index) { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_bottom_offset(this.segment(), index); } + /// {@return `def_disp_win_bottom_offset`} + public @CType("uint16_t") short def_disp_win_bottom_offset() { return StdVideoH265SequenceParameterSetVui.get_def_disp_win_bottom_offset(this.segment()); } + /// Sets `def_disp_win_bottom_offset` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_def_disp_win_bottom_offset(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_def_disp_win_bottom_offset.set(segment, 0L, index, value); } + /// Sets `def_disp_win_bottom_offset` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_def_disp_win_bottom_offset(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_bottom_offset(segment, 0L, value); } + /// Sets `def_disp_win_bottom_offset` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui def_disp_win_bottom_offsetAt(long index, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_bottom_offset(this.segment(), index, value); return this; } + /// Sets `def_disp_win_bottom_offset` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui def_disp_win_bottom_offset(@CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_def_disp_win_bottom_offset(this.segment(), value); return this; } + + /// {@return `vui_num_units_in_tick` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vui_num_units_in_tick(MemorySegment segment, long index) { return (int) VH_vui_num_units_in_tick.get(segment, 0L, index); } + /// {@return `vui_num_units_in_tick`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vui_num_units_in_tick(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_vui_num_units_in_tick(segment, 0L); } + /// {@return `vui_num_units_in_tick` at the given index} + /// @param index the index + public @CType("uint32_t") int vui_num_units_in_tickAt(long index) { return StdVideoH265SequenceParameterSetVui.get_vui_num_units_in_tick(this.segment(), index); } + /// {@return `vui_num_units_in_tick`} + public @CType("uint32_t") int vui_num_units_in_tick() { return StdVideoH265SequenceParameterSetVui.get_vui_num_units_in_tick(this.segment()); } + /// Sets `vui_num_units_in_tick` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vui_num_units_in_tick(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vui_num_units_in_tick.set(segment, 0L, index, value); } + /// Sets `vui_num_units_in_tick` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vui_num_units_in_tick(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSetVui.set_vui_num_units_in_tick(segment, 0L, value); } + /// Sets `vui_num_units_in_tick` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui vui_num_units_in_tickAt(long index, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSetVui.set_vui_num_units_in_tick(this.segment(), index, value); return this; } + /// Sets `vui_num_units_in_tick` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui vui_num_units_in_tick(@CType("uint32_t") int value) { StdVideoH265SequenceParameterSetVui.set_vui_num_units_in_tick(this.segment(), value); return this; } + + /// {@return `vui_time_scale` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vui_time_scale(MemorySegment segment, long index) { return (int) VH_vui_time_scale.get(segment, 0L, index); } + /// {@return `vui_time_scale`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vui_time_scale(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_vui_time_scale(segment, 0L); } + /// {@return `vui_time_scale` at the given index} + /// @param index the index + public @CType("uint32_t") int vui_time_scaleAt(long index) { return StdVideoH265SequenceParameterSetVui.get_vui_time_scale(this.segment(), index); } + /// {@return `vui_time_scale`} + public @CType("uint32_t") int vui_time_scale() { return StdVideoH265SequenceParameterSetVui.get_vui_time_scale(this.segment()); } + /// Sets `vui_time_scale` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vui_time_scale(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vui_time_scale.set(segment, 0L, index, value); } + /// Sets `vui_time_scale` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vui_time_scale(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSetVui.set_vui_time_scale(segment, 0L, value); } + /// Sets `vui_time_scale` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui vui_time_scaleAt(long index, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSetVui.set_vui_time_scale(this.segment(), index, value); return this; } + /// Sets `vui_time_scale` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui vui_time_scale(@CType("uint32_t") int value) { StdVideoH265SequenceParameterSetVui.set_vui_time_scale(this.segment(), value); return this; } + + /// {@return `vui_num_ticks_poc_diff_one_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vui_num_ticks_poc_diff_one_minus1(MemorySegment segment, long index) { return (int) VH_vui_num_ticks_poc_diff_one_minus1.get(segment, 0L, index); } + /// {@return `vui_num_ticks_poc_diff_one_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vui_num_ticks_poc_diff_one_minus1(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_vui_num_ticks_poc_diff_one_minus1(segment, 0L); } + /// {@return `vui_num_ticks_poc_diff_one_minus1` at the given index} + /// @param index the index + public @CType("uint32_t") int vui_num_ticks_poc_diff_one_minus1At(long index) { return StdVideoH265SequenceParameterSetVui.get_vui_num_ticks_poc_diff_one_minus1(this.segment(), index); } + /// {@return `vui_num_ticks_poc_diff_one_minus1`} + public @CType("uint32_t") int vui_num_ticks_poc_diff_one_minus1() { return StdVideoH265SequenceParameterSetVui.get_vui_num_ticks_poc_diff_one_minus1(this.segment()); } + /// Sets `vui_num_ticks_poc_diff_one_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vui_num_ticks_poc_diff_one_minus1(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vui_num_ticks_poc_diff_one_minus1.set(segment, 0L, index, value); } + /// Sets `vui_num_ticks_poc_diff_one_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vui_num_ticks_poc_diff_one_minus1(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSetVui.set_vui_num_ticks_poc_diff_one_minus1(segment, 0L, value); } + /// Sets `vui_num_ticks_poc_diff_one_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui vui_num_ticks_poc_diff_one_minus1At(long index, @CType("uint32_t") int value) { StdVideoH265SequenceParameterSetVui.set_vui_num_ticks_poc_diff_one_minus1(this.segment(), index, value); return this; } + /// Sets `vui_num_ticks_poc_diff_one_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui vui_num_ticks_poc_diff_one_minus1(@CType("uint32_t") int value) { StdVideoH265SequenceParameterSetVui.set_vui_num_ticks_poc_diff_one_minus1(this.segment(), value); return this; } + + /// {@return `min_spatial_segmentation_idc` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_min_spatial_segmentation_idc(MemorySegment segment, long index) { return (short) VH_min_spatial_segmentation_idc.get(segment, 0L, index); } + /// {@return `min_spatial_segmentation_idc`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_min_spatial_segmentation_idc(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_min_spatial_segmentation_idc(segment, 0L); } + /// {@return `min_spatial_segmentation_idc` at the given index} + /// @param index the index + public @CType("uint16_t") short min_spatial_segmentation_idcAt(long index) { return StdVideoH265SequenceParameterSetVui.get_min_spatial_segmentation_idc(this.segment(), index); } + /// {@return `min_spatial_segmentation_idc`} + public @CType("uint16_t") short min_spatial_segmentation_idc() { return StdVideoH265SequenceParameterSetVui.get_min_spatial_segmentation_idc(this.segment()); } + /// Sets `min_spatial_segmentation_idc` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_min_spatial_segmentation_idc(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_min_spatial_segmentation_idc.set(segment, 0L, index, value); } + /// Sets `min_spatial_segmentation_idc` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_min_spatial_segmentation_idc(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_min_spatial_segmentation_idc(segment, 0L, value); } + /// Sets `min_spatial_segmentation_idc` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui min_spatial_segmentation_idcAt(long index, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_min_spatial_segmentation_idc(this.segment(), index, value); return this; } + /// Sets `min_spatial_segmentation_idc` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui min_spatial_segmentation_idc(@CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_min_spatial_segmentation_idc(this.segment(), value); return this; } + + /// {@return `reserved3` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_reserved3(MemorySegment segment, long index) { return (short) VH_reserved3.get(segment, 0L, index); } + /// {@return `reserved3`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_reserved3(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_reserved3(segment, 0L); } + /// {@return `reserved3` at the given index} + /// @param index the index + public @CType("uint16_t") short reserved3At(long index) { return StdVideoH265SequenceParameterSetVui.get_reserved3(this.segment(), index); } + /// {@return `reserved3`} + public @CType("uint16_t") short reserved3() { return StdVideoH265SequenceParameterSetVui.get_reserved3(this.segment()); } + /// Sets `reserved3` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved3(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_reserved3.set(segment, 0L, index, value); } + /// Sets `reserved3` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved3(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_reserved3(segment, 0L, value); } + /// Sets `reserved3` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui reserved3At(long index, @CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_reserved3(this.segment(), index, value); return this; } + /// Sets `reserved3` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui reserved3(@CType("uint16_t") short value) { StdVideoH265SequenceParameterSetVui.set_reserved3(this.segment(), value); return this; } + + /// {@return `max_bytes_per_pic_denom` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_max_bytes_per_pic_denom(MemorySegment segment, long index) { return (byte) VH_max_bytes_per_pic_denom.get(segment, 0L, index); } + /// {@return `max_bytes_per_pic_denom`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_max_bytes_per_pic_denom(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_max_bytes_per_pic_denom(segment, 0L); } + /// {@return `max_bytes_per_pic_denom` at the given index} + /// @param index the index + public @CType("uint8_t") byte max_bytes_per_pic_denomAt(long index) { return StdVideoH265SequenceParameterSetVui.get_max_bytes_per_pic_denom(this.segment(), index); } + /// {@return `max_bytes_per_pic_denom`} + public @CType("uint8_t") byte max_bytes_per_pic_denom() { return StdVideoH265SequenceParameterSetVui.get_max_bytes_per_pic_denom(this.segment()); } + /// Sets `max_bytes_per_pic_denom` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_bytes_per_pic_denom(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_max_bytes_per_pic_denom.set(segment, 0L, index, value); } + /// Sets `max_bytes_per_pic_denom` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_bytes_per_pic_denom(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_max_bytes_per_pic_denom(segment, 0L, value); } + /// Sets `max_bytes_per_pic_denom` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui max_bytes_per_pic_denomAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_max_bytes_per_pic_denom(this.segment(), index, value); return this; } + /// Sets `max_bytes_per_pic_denom` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui max_bytes_per_pic_denom(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_max_bytes_per_pic_denom(this.segment(), value); return this; } + + /// {@return `max_bits_per_min_cu_denom` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_max_bits_per_min_cu_denom(MemorySegment segment, long index) { return (byte) VH_max_bits_per_min_cu_denom.get(segment, 0L, index); } + /// {@return `max_bits_per_min_cu_denom`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_max_bits_per_min_cu_denom(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_max_bits_per_min_cu_denom(segment, 0L); } + /// {@return `max_bits_per_min_cu_denom` at the given index} + /// @param index the index + public @CType("uint8_t") byte max_bits_per_min_cu_denomAt(long index) { return StdVideoH265SequenceParameterSetVui.get_max_bits_per_min_cu_denom(this.segment(), index); } + /// {@return `max_bits_per_min_cu_denom`} + public @CType("uint8_t") byte max_bits_per_min_cu_denom() { return StdVideoH265SequenceParameterSetVui.get_max_bits_per_min_cu_denom(this.segment()); } + /// Sets `max_bits_per_min_cu_denom` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_max_bits_per_min_cu_denom(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_max_bits_per_min_cu_denom.set(segment, 0L, index, value); } + /// Sets `max_bits_per_min_cu_denom` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_max_bits_per_min_cu_denom(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_max_bits_per_min_cu_denom(segment, 0L, value); } + /// Sets `max_bits_per_min_cu_denom` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui max_bits_per_min_cu_denomAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_max_bits_per_min_cu_denom(this.segment(), index, value); return this; } + /// Sets `max_bits_per_min_cu_denom` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui max_bits_per_min_cu_denom(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_max_bits_per_min_cu_denom(this.segment(), value); return this; } + + /// {@return `log2_max_mv_length_horizontal` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_max_mv_length_horizontal(MemorySegment segment, long index) { return (byte) VH_log2_max_mv_length_horizontal.get(segment, 0L, index); } + /// {@return `log2_max_mv_length_horizontal`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_max_mv_length_horizontal(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_log2_max_mv_length_horizontal(segment, 0L); } + /// {@return `log2_max_mv_length_horizontal` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_max_mv_length_horizontalAt(long index) { return StdVideoH265SequenceParameterSetVui.get_log2_max_mv_length_horizontal(this.segment(), index); } + /// {@return `log2_max_mv_length_horizontal`} + public @CType("uint8_t") byte log2_max_mv_length_horizontal() { return StdVideoH265SequenceParameterSetVui.get_log2_max_mv_length_horizontal(this.segment()); } + /// Sets `log2_max_mv_length_horizontal` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_max_mv_length_horizontal(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_max_mv_length_horizontal.set(segment, 0L, index, value); } + /// Sets `log2_max_mv_length_horizontal` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_max_mv_length_horizontal(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_log2_max_mv_length_horizontal(segment, 0L, value); } + /// Sets `log2_max_mv_length_horizontal` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui log2_max_mv_length_horizontalAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_log2_max_mv_length_horizontal(this.segment(), index, value); return this; } + /// Sets `log2_max_mv_length_horizontal` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui log2_max_mv_length_horizontal(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_log2_max_mv_length_horizontal(this.segment(), value); return this; } + + /// {@return `log2_max_mv_length_vertical` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_log2_max_mv_length_vertical(MemorySegment segment, long index) { return (byte) VH_log2_max_mv_length_vertical.get(segment, 0L, index); } + /// {@return `log2_max_mv_length_vertical`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_log2_max_mv_length_vertical(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_log2_max_mv_length_vertical(segment, 0L); } + /// {@return `log2_max_mv_length_vertical` at the given index} + /// @param index the index + public @CType("uint8_t") byte log2_max_mv_length_verticalAt(long index) { return StdVideoH265SequenceParameterSetVui.get_log2_max_mv_length_vertical(this.segment(), index); } + /// {@return `log2_max_mv_length_vertical`} + public @CType("uint8_t") byte log2_max_mv_length_vertical() { return StdVideoH265SequenceParameterSetVui.get_log2_max_mv_length_vertical(this.segment()); } + /// Sets `log2_max_mv_length_vertical` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_log2_max_mv_length_vertical(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_log2_max_mv_length_vertical.set(segment, 0L, index, value); } + /// Sets `log2_max_mv_length_vertical` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_log2_max_mv_length_vertical(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_log2_max_mv_length_vertical(segment, 0L, value); } + /// Sets `log2_max_mv_length_vertical` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui log2_max_mv_length_verticalAt(long index, @CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_log2_max_mv_length_vertical(this.segment(), index, value); return this; } + /// Sets `log2_max_mv_length_vertical` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui log2_max_mv_length_vertical(@CType("uint8_t") byte value) { StdVideoH265SequenceParameterSetVui.set_log2_max_mv_length_vertical(this.segment(), value); return this; } + + /// {@return `pHrdParameters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment get_pHrdParameters(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pHrdParameters.get(segment, 0L, index); } + /// {@return `pHrdParameters`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment get_pHrdParameters(MemorySegment segment) { return StdVideoH265SequenceParameterSetVui.get_pHrdParameters(segment, 0L); } + /// {@return `pHrdParameters` at the given index} + /// @param index the index + public @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment pHrdParametersAt(long index) { return StdVideoH265SequenceParameterSetVui.get_pHrdParameters(this.segment(), index); } + /// {@return `pHrdParameters`} + public @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment pHrdParameters() { return StdVideoH265SequenceParameterSetVui.get_pHrdParameters(this.segment()); } + /// Sets `pHrdParameters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pHrdParameters(MemorySegment segment, long index, @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment value) { VH_pHrdParameters.set(segment, 0L, index, value); } + /// Sets `pHrdParameters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pHrdParameters(MemorySegment segment, @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSetVui.set_pHrdParameters(segment, 0L, value); } + /// Sets `pHrdParameters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui pHrdParametersAt(long index, @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSetVui.set_pHrdParameters(this.segment(), index, value); return this; } + /// Sets `pHrdParameters` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SequenceParameterSetVui pHrdParameters(@CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265SequenceParameterSetVui.set_pHrdParameters(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ShortTermRefPicSet.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ShortTermRefPicSet.java new file mode 100644 index 00000000..f06eb2c9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ShortTermRefPicSet.java @@ -0,0 +1,592 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### delta_idx_minus1 +/// [VarHandle][#VH_delta_idx_minus1] - [Getter][#delta_idx_minus1()] - [Setter][#delta_idx_minus1(int)] +/// ### use_delta_flag +/// [VarHandle][#VH_use_delta_flag] - [Getter][#use_delta_flag()] - [Setter][#use_delta_flag(short)] +/// ### abs_delta_rps_minus1 +/// [VarHandle][#VH_abs_delta_rps_minus1] - [Getter][#abs_delta_rps_minus1()] - [Setter][#abs_delta_rps_minus1(short)] +/// ### used_by_curr_pic_flag +/// [VarHandle][#VH_used_by_curr_pic_flag] - [Getter][#used_by_curr_pic_flag()] - [Setter][#used_by_curr_pic_flag(short)] +/// ### used_by_curr_pic_s0_flag +/// [VarHandle][#VH_used_by_curr_pic_s0_flag] - [Getter][#used_by_curr_pic_s0_flag()] - [Setter][#used_by_curr_pic_s0_flag(short)] +/// ### used_by_curr_pic_s1_flag +/// [VarHandle][#VH_used_by_curr_pic_s1_flag] - [Getter][#used_by_curr_pic_s1_flag()] - [Setter][#used_by_curr_pic_s1_flag(short)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(short)] +/// ### reserved2 +/// [VarHandle][#VH_reserved2] - [Getter][#reserved2()] - [Setter][#reserved2(byte)] +/// ### reserved3 +/// [VarHandle][#VH_reserved3] - [Getter][#reserved3()] - [Setter][#reserved3(byte)] +/// ### num_negative_pics +/// [VarHandle][#VH_num_negative_pics] - [Getter][#num_negative_pics()] - [Setter][#num_negative_pics(byte)] +/// ### num_positive_pics +/// [VarHandle][#VH_num_positive_pics] - [Getter][#num_positive_pics()] - [Setter][#num_positive_pics(byte)] +/// ### delta_poc_s0_minus1 +/// [VarHandle][#VH_delta_poc_s0_minus1] - [Getter][#delta_poc_s0_minus1()] - [Setter][#delta_poc_s0_minus1(short)] +/// ### delta_poc_s1_minus1 +/// [VarHandle][#VH_delta_poc_s1_minus1] - [Getter][#delta_poc_s1_minus1()] - [Setter][#delta_poc_s1_minus1(short)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265ShortTermRefPicSet { +/// StdVideoH265ShortTermRefPicSetFlags flags; +/// uint32_t delta_idx_minus1; +/// uint16_t use_delta_flag; +/// uint16_t abs_delta_rps_minus1; +/// uint16_t used_by_curr_pic_flag; +/// uint16_t used_by_curr_pic_s0_flag; +/// uint16_t used_by_curr_pic_s1_flag; +/// uint16_t reserved1; +/// uint8_t reserved2; +/// uint8_t reserved3; +/// uint8_t num_negative_pics; +/// uint8_t num_positive_pics; +/// uint16_t [ ] delta_poc_s0_minus1; +/// uint16_t [ ] delta_poc_s1_minus1; +/// } StdVideoH265ShortTermRefPicSet; +/// ``` +public final class StdVideoH265ShortTermRefPicSet extends Struct { + /// The struct layout of `StdVideoH265ShortTermRefPicSet`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoH265ShortTermRefPicSetFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_INT.withName("delta_idx_minus1"), + ValueLayout.JAVA_SHORT.withName("use_delta_flag"), + ValueLayout.JAVA_SHORT.withName("abs_delta_rps_minus1"), + ValueLayout.JAVA_SHORT.withName("used_by_curr_pic_flag"), + ValueLayout.JAVA_SHORT.withName("used_by_curr_pic_s0_flag"), + ValueLayout.JAVA_SHORT.withName("used_by_curr_pic_s1_flag"), + ValueLayout.JAVA_SHORT.withName("reserved1"), + ValueLayout.JAVA_BYTE.withName("reserved2"), + ValueLayout.JAVA_BYTE.withName("reserved3"), + ValueLayout.JAVA_BYTE.withName("num_negative_pics"), + ValueLayout.JAVA_BYTE.withName("num_positive_pics"), + ValueLayout.JAVA_SHORT.withName("delta_poc_s0_minus1"), + ValueLayout.JAVA_SHORT.withName("delta_poc_s1_minus1") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `delta_idx_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_delta_idx_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_idx_minus1")); + /// The [VarHandle] of `use_delta_flag` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_use_delta_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("use_delta_flag")); + /// The [VarHandle] of `abs_delta_rps_minus1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_abs_delta_rps_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("abs_delta_rps_minus1")); + /// The [VarHandle] of `used_by_curr_pic_flag` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_used_by_curr_pic_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("used_by_curr_pic_flag")); + /// The [VarHandle] of `used_by_curr_pic_s0_flag` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_used_by_curr_pic_s0_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("used_by_curr_pic_s0_flag")); + /// The [VarHandle] of `used_by_curr_pic_s1_flag` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_used_by_curr_pic_s1_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("used_by_curr_pic_s1_flag")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `reserved2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved2")); + /// The [VarHandle] of `reserved3` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved3 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved3")); + /// The [VarHandle] of `num_negative_pics` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_negative_pics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_negative_pics")); + /// The [VarHandle] of `num_positive_pics` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_num_positive_pics = LAYOUT.arrayElementVarHandle(PathElement.groupElement("num_positive_pics")); + /// The [VarHandle] of `delta_poc_s0_minus1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_delta_poc_s0_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_poc_s0_minus1")); + /// The [VarHandle] of `delta_poc_s1_minus1` of type `(MemorySegment base, long baseOffset, long index)short`. + public static final VarHandle VH_delta_poc_s1_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_poc_s1_minus1")); + + /// Creates `StdVideoH265ShortTermRefPicSet` with the given segment. + /// @param segment the memory segment + public StdVideoH265ShortTermRefPicSet(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265ShortTermRefPicSet` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ShortTermRefPicSet of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ShortTermRefPicSet(segment); } + + /// Creates `StdVideoH265ShortTermRefPicSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ShortTermRefPicSet ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ShortTermRefPicSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265ShortTermRefPicSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ShortTermRefPicSet ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ShortTermRefPicSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265ShortTermRefPicSet` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265ShortTermRefPicSet` + public static StdVideoH265ShortTermRefPicSet alloc(SegmentAllocator allocator) { return new StdVideoH265ShortTermRefPicSet(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265ShortTermRefPicSet` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265ShortTermRefPicSet` + public static StdVideoH265ShortTermRefPicSet alloc(SegmentAllocator allocator, long count) { return new StdVideoH265ShortTermRefPicSet(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265ShortTermRefPicSetFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265ShortTermRefPicSetFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoH265ShortTermRefPicSetFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoH265ShortTermRefPicSet.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoH265ShortTermRefPicSetFlags") java.lang.foreign.MemorySegment flags() { return StdVideoH265ShortTermRefPicSet.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoH265ShortTermRefPicSetFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoH265ShortTermRefPicSetFlags") java.lang.foreign.MemorySegment value) { StdVideoH265ShortTermRefPicSet.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet flagsAt(long index, @CType("StdVideoH265ShortTermRefPicSetFlags") java.lang.foreign.MemorySegment value) { StdVideoH265ShortTermRefPicSet.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet flags(@CType("StdVideoH265ShortTermRefPicSetFlags") java.lang.foreign.MemorySegment value) { StdVideoH265ShortTermRefPicSet.set_flags(this.segment(), value); return this; } + + /// {@return `delta_idx_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_delta_idx_minus1(MemorySegment segment, long index) { return (int) VH_delta_idx_minus1.get(segment, 0L, index); } + /// {@return `delta_idx_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_delta_idx_minus1(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_delta_idx_minus1(segment, 0L); } + /// {@return `delta_idx_minus1` at the given index} + /// @param index the index + public @CType("uint32_t") int delta_idx_minus1At(long index) { return StdVideoH265ShortTermRefPicSet.get_delta_idx_minus1(this.segment(), index); } + /// {@return `delta_idx_minus1`} + public @CType("uint32_t") int delta_idx_minus1() { return StdVideoH265ShortTermRefPicSet.get_delta_idx_minus1(this.segment()); } + /// Sets `delta_idx_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_idx_minus1(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_delta_idx_minus1.set(segment, 0L, index, value); } + /// Sets `delta_idx_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_idx_minus1(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265ShortTermRefPicSet.set_delta_idx_minus1(segment, 0L, value); } + /// Sets `delta_idx_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet delta_idx_minus1At(long index, @CType("uint32_t") int value) { StdVideoH265ShortTermRefPicSet.set_delta_idx_minus1(this.segment(), index, value); return this; } + /// Sets `delta_idx_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet delta_idx_minus1(@CType("uint32_t") int value) { StdVideoH265ShortTermRefPicSet.set_delta_idx_minus1(this.segment(), value); return this; } + + /// {@return `use_delta_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_use_delta_flag(MemorySegment segment, long index) { return (short) VH_use_delta_flag.get(segment, 0L, index); } + /// {@return `use_delta_flag`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_use_delta_flag(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_use_delta_flag(segment, 0L); } + /// {@return `use_delta_flag` at the given index} + /// @param index the index + public @CType("uint16_t") short use_delta_flagAt(long index) { return StdVideoH265ShortTermRefPicSet.get_use_delta_flag(this.segment(), index); } + /// {@return `use_delta_flag`} + public @CType("uint16_t") short use_delta_flag() { return StdVideoH265ShortTermRefPicSet.get_use_delta_flag(this.segment()); } + /// Sets `use_delta_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_use_delta_flag(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_use_delta_flag.set(segment, 0L, index, value); } + /// Sets `use_delta_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_use_delta_flag(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_use_delta_flag(segment, 0L, value); } + /// Sets `use_delta_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet use_delta_flagAt(long index, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_use_delta_flag(this.segment(), index, value); return this; } + /// Sets `use_delta_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet use_delta_flag(@CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_use_delta_flag(this.segment(), value); return this; } + + /// {@return `abs_delta_rps_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_abs_delta_rps_minus1(MemorySegment segment, long index) { return (short) VH_abs_delta_rps_minus1.get(segment, 0L, index); } + /// {@return `abs_delta_rps_minus1`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_abs_delta_rps_minus1(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_abs_delta_rps_minus1(segment, 0L); } + /// {@return `abs_delta_rps_minus1` at the given index} + /// @param index the index + public @CType("uint16_t") short abs_delta_rps_minus1At(long index) { return StdVideoH265ShortTermRefPicSet.get_abs_delta_rps_minus1(this.segment(), index); } + /// {@return `abs_delta_rps_minus1`} + public @CType("uint16_t") short abs_delta_rps_minus1() { return StdVideoH265ShortTermRefPicSet.get_abs_delta_rps_minus1(this.segment()); } + /// Sets `abs_delta_rps_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_abs_delta_rps_minus1(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_abs_delta_rps_minus1.set(segment, 0L, index, value); } + /// Sets `abs_delta_rps_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_abs_delta_rps_minus1(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_abs_delta_rps_minus1(segment, 0L, value); } + /// Sets `abs_delta_rps_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet abs_delta_rps_minus1At(long index, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_abs_delta_rps_minus1(this.segment(), index, value); return this; } + /// Sets `abs_delta_rps_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet abs_delta_rps_minus1(@CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_abs_delta_rps_minus1(this.segment(), value); return this; } + + /// {@return `used_by_curr_pic_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_used_by_curr_pic_flag(MemorySegment segment, long index) { return (short) VH_used_by_curr_pic_flag.get(segment, 0L, index); } + /// {@return `used_by_curr_pic_flag`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_used_by_curr_pic_flag(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_used_by_curr_pic_flag(segment, 0L); } + /// {@return `used_by_curr_pic_flag` at the given index} + /// @param index the index + public @CType("uint16_t") short used_by_curr_pic_flagAt(long index) { return StdVideoH265ShortTermRefPicSet.get_used_by_curr_pic_flag(this.segment(), index); } + /// {@return `used_by_curr_pic_flag`} + public @CType("uint16_t") short used_by_curr_pic_flag() { return StdVideoH265ShortTermRefPicSet.get_used_by_curr_pic_flag(this.segment()); } + /// Sets `used_by_curr_pic_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_used_by_curr_pic_flag(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_used_by_curr_pic_flag.set(segment, 0L, index, value); } + /// Sets `used_by_curr_pic_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_used_by_curr_pic_flag(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_used_by_curr_pic_flag(segment, 0L, value); } + /// Sets `used_by_curr_pic_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet used_by_curr_pic_flagAt(long index, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_used_by_curr_pic_flag(this.segment(), index, value); return this; } + /// Sets `used_by_curr_pic_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet used_by_curr_pic_flag(@CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_used_by_curr_pic_flag(this.segment(), value); return this; } + + /// {@return `used_by_curr_pic_s0_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_used_by_curr_pic_s0_flag(MemorySegment segment, long index) { return (short) VH_used_by_curr_pic_s0_flag.get(segment, 0L, index); } + /// {@return `used_by_curr_pic_s0_flag`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_used_by_curr_pic_s0_flag(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_used_by_curr_pic_s0_flag(segment, 0L); } + /// {@return `used_by_curr_pic_s0_flag` at the given index} + /// @param index the index + public @CType("uint16_t") short used_by_curr_pic_s0_flagAt(long index) { return StdVideoH265ShortTermRefPicSet.get_used_by_curr_pic_s0_flag(this.segment(), index); } + /// {@return `used_by_curr_pic_s0_flag`} + public @CType("uint16_t") short used_by_curr_pic_s0_flag() { return StdVideoH265ShortTermRefPicSet.get_used_by_curr_pic_s0_flag(this.segment()); } + /// Sets `used_by_curr_pic_s0_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_used_by_curr_pic_s0_flag(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_used_by_curr_pic_s0_flag.set(segment, 0L, index, value); } + /// Sets `used_by_curr_pic_s0_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_used_by_curr_pic_s0_flag(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_used_by_curr_pic_s0_flag(segment, 0L, value); } + /// Sets `used_by_curr_pic_s0_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet used_by_curr_pic_s0_flagAt(long index, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_used_by_curr_pic_s0_flag(this.segment(), index, value); return this; } + /// Sets `used_by_curr_pic_s0_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet used_by_curr_pic_s0_flag(@CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_used_by_curr_pic_s0_flag(this.segment(), value); return this; } + + /// {@return `used_by_curr_pic_s1_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_used_by_curr_pic_s1_flag(MemorySegment segment, long index) { return (short) VH_used_by_curr_pic_s1_flag.get(segment, 0L, index); } + /// {@return `used_by_curr_pic_s1_flag`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_used_by_curr_pic_s1_flag(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_used_by_curr_pic_s1_flag(segment, 0L); } + /// {@return `used_by_curr_pic_s1_flag` at the given index} + /// @param index the index + public @CType("uint16_t") short used_by_curr_pic_s1_flagAt(long index) { return StdVideoH265ShortTermRefPicSet.get_used_by_curr_pic_s1_flag(this.segment(), index); } + /// {@return `used_by_curr_pic_s1_flag`} + public @CType("uint16_t") short used_by_curr_pic_s1_flag() { return StdVideoH265ShortTermRefPicSet.get_used_by_curr_pic_s1_flag(this.segment()); } + /// Sets `used_by_curr_pic_s1_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_used_by_curr_pic_s1_flag(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_used_by_curr_pic_s1_flag.set(segment, 0L, index, value); } + /// Sets `used_by_curr_pic_s1_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_used_by_curr_pic_s1_flag(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_used_by_curr_pic_s1_flag(segment, 0L, value); } + /// Sets `used_by_curr_pic_s1_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet used_by_curr_pic_s1_flagAt(long index, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_used_by_curr_pic_s1_flag(this.segment(), index, value); return this; } + /// Sets `used_by_curr_pic_s1_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet used_by_curr_pic_s1_flag(@CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_used_by_curr_pic_s1_flag(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t") short get_reserved1(MemorySegment segment, long index) { return (short) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint16_t") short get_reserved1(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint16_t") short reserved1At(long index) { return StdVideoH265ShortTermRefPicSet.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint16_t") short reserved1() { return StdVideoH265ShortTermRefPicSet.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint16_t") short value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet reserved1At(long index, @CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet reserved1(@CType("uint16_t") short value) { StdVideoH265ShortTermRefPicSet.set_reserved1(this.segment(), value); return this; } + + /// {@return `reserved2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment, long index) { return (byte) VH_reserved2.get(segment, 0L, index); } + /// {@return `reserved2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_reserved2(segment, 0L); } + /// {@return `reserved2` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved2At(long index) { return StdVideoH265ShortTermRefPicSet.get_reserved2(this.segment(), index); } + /// {@return `reserved2`} + public @CType("uint8_t") byte reserved2() { return StdVideoH265ShortTermRefPicSet.get_reserved2(this.segment()); } + /// Sets `reserved2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved2.set(segment, 0L, index, value); } + /// Sets `reserved2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_reserved2(segment, 0L, value); } + /// Sets `reserved2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet reserved2At(long index, @CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_reserved2(this.segment(), index, value); return this; } + /// Sets `reserved2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet reserved2(@CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_reserved2(this.segment(), value); return this; } + + /// {@return `reserved3` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved3(MemorySegment segment, long index) { return (byte) VH_reserved3.get(segment, 0L, index); } + /// {@return `reserved3`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved3(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_reserved3(segment, 0L); } + /// {@return `reserved3` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved3At(long index) { return StdVideoH265ShortTermRefPicSet.get_reserved3(this.segment(), index); } + /// {@return `reserved3`} + public @CType("uint8_t") byte reserved3() { return StdVideoH265ShortTermRefPicSet.get_reserved3(this.segment()); } + /// Sets `reserved3` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved3(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved3.set(segment, 0L, index, value); } + /// Sets `reserved3` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved3(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_reserved3(segment, 0L, value); } + /// Sets `reserved3` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet reserved3At(long index, @CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_reserved3(this.segment(), index, value); return this; } + /// Sets `reserved3` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet reserved3(@CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_reserved3(this.segment(), value); return this; } + + /// {@return `num_negative_pics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_negative_pics(MemorySegment segment, long index) { return (byte) VH_num_negative_pics.get(segment, 0L, index); } + /// {@return `num_negative_pics`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_negative_pics(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_num_negative_pics(segment, 0L); } + /// {@return `num_negative_pics` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_negative_picsAt(long index) { return StdVideoH265ShortTermRefPicSet.get_num_negative_pics(this.segment(), index); } + /// {@return `num_negative_pics`} + public @CType("uint8_t") byte num_negative_pics() { return StdVideoH265ShortTermRefPicSet.get_num_negative_pics(this.segment()); } + /// Sets `num_negative_pics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_negative_pics(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_negative_pics.set(segment, 0L, index, value); } + /// Sets `num_negative_pics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_negative_pics(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_num_negative_pics(segment, 0L, value); } + /// Sets `num_negative_pics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet num_negative_picsAt(long index, @CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_num_negative_pics(this.segment(), index, value); return this; } + /// Sets `num_negative_pics` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet num_negative_pics(@CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_num_negative_pics(this.segment(), value); return this; } + + /// {@return `num_positive_pics` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_num_positive_pics(MemorySegment segment, long index) { return (byte) VH_num_positive_pics.get(segment, 0L, index); } + /// {@return `num_positive_pics`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_num_positive_pics(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_num_positive_pics(segment, 0L); } + /// {@return `num_positive_pics` at the given index} + /// @param index the index + public @CType("uint8_t") byte num_positive_picsAt(long index) { return StdVideoH265ShortTermRefPicSet.get_num_positive_pics(this.segment(), index); } + /// {@return `num_positive_pics`} + public @CType("uint8_t") byte num_positive_pics() { return StdVideoH265ShortTermRefPicSet.get_num_positive_pics(this.segment()); } + /// Sets `num_positive_pics` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_num_positive_pics(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_num_positive_pics.set(segment, 0L, index, value); } + /// Sets `num_positive_pics` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_num_positive_pics(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_num_positive_pics(segment, 0L, value); } + /// Sets `num_positive_pics` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet num_positive_picsAt(long index, @CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_num_positive_pics(this.segment(), index, value); return this; } + /// Sets `num_positive_pics` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet num_positive_pics(@CType("uint8_t") byte value) { StdVideoH265ShortTermRefPicSet.set_num_positive_pics(this.segment(), value); return this; } + + /// {@return `delta_poc_s0_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t [ ]") short get_delta_poc_s0_minus1(MemorySegment segment, long index) { return (short) VH_delta_poc_s0_minus1.get(segment, 0L, index); } + /// {@return `delta_poc_s0_minus1`} + /// @param segment the segment of the struct + public static @CType("uint16_t [ ]") short get_delta_poc_s0_minus1(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_delta_poc_s0_minus1(segment, 0L); } + /// {@return `delta_poc_s0_minus1` at the given index} + /// @param index the index + public @CType("uint16_t [ ]") short delta_poc_s0_minus1At(long index) { return StdVideoH265ShortTermRefPicSet.get_delta_poc_s0_minus1(this.segment(), index); } + /// {@return `delta_poc_s0_minus1`} + public @CType("uint16_t [ ]") short delta_poc_s0_minus1() { return StdVideoH265ShortTermRefPicSet.get_delta_poc_s0_minus1(this.segment()); } + /// Sets `delta_poc_s0_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_poc_s0_minus1(MemorySegment segment, long index, @CType("uint16_t [ ]") short value) { VH_delta_poc_s0_minus1.set(segment, 0L, index, value); } + /// Sets `delta_poc_s0_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_poc_s0_minus1(MemorySegment segment, @CType("uint16_t [ ]") short value) { StdVideoH265ShortTermRefPicSet.set_delta_poc_s0_minus1(segment, 0L, value); } + /// Sets `delta_poc_s0_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet delta_poc_s0_minus1At(long index, @CType("uint16_t [ ]") short value) { StdVideoH265ShortTermRefPicSet.set_delta_poc_s0_minus1(this.segment(), index, value); return this; } + /// Sets `delta_poc_s0_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet delta_poc_s0_minus1(@CType("uint16_t [ ]") short value) { StdVideoH265ShortTermRefPicSet.set_delta_poc_s0_minus1(this.segment(), value); return this; } + + /// {@return `delta_poc_s1_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint16_t [ ]") short get_delta_poc_s1_minus1(MemorySegment segment, long index) { return (short) VH_delta_poc_s1_minus1.get(segment, 0L, index); } + /// {@return `delta_poc_s1_minus1`} + /// @param segment the segment of the struct + public static @CType("uint16_t [ ]") short get_delta_poc_s1_minus1(MemorySegment segment) { return StdVideoH265ShortTermRefPicSet.get_delta_poc_s1_minus1(segment, 0L); } + /// {@return `delta_poc_s1_minus1` at the given index} + /// @param index the index + public @CType("uint16_t [ ]") short delta_poc_s1_minus1At(long index) { return StdVideoH265ShortTermRefPicSet.get_delta_poc_s1_minus1(this.segment(), index); } + /// {@return `delta_poc_s1_minus1`} + public @CType("uint16_t [ ]") short delta_poc_s1_minus1() { return StdVideoH265ShortTermRefPicSet.get_delta_poc_s1_minus1(this.segment()); } + /// Sets `delta_poc_s1_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_poc_s1_minus1(MemorySegment segment, long index, @CType("uint16_t [ ]") short value) { VH_delta_poc_s1_minus1.set(segment, 0L, index, value); } + /// Sets `delta_poc_s1_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_poc_s1_minus1(MemorySegment segment, @CType("uint16_t [ ]") short value) { StdVideoH265ShortTermRefPicSet.set_delta_poc_s1_minus1(segment, 0L, value); } + /// Sets `delta_poc_s1_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet delta_poc_s1_minus1At(long index, @CType("uint16_t [ ]") short value) { StdVideoH265ShortTermRefPicSet.set_delta_poc_s1_minus1(this.segment(), index, value); return this; } + /// Sets `delta_poc_s1_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSet delta_poc_s1_minus1(@CType("uint16_t [ ]") short value) { StdVideoH265ShortTermRefPicSet.set_delta_poc_s1_minus1(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ShortTermRefPicSetFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ShortTermRefPicSetFlags.java new file mode 100644 index 00000000..e1e19d1f --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265ShortTermRefPicSetFlags.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### inter_ref_pic_set_prediction_flag +/// [VarHandle][#VH_inter_ref_pic_set_prediction_flag] - [Getter][#inter_ref_pic_set_prediction_flag()] - [Setter][#inter_ref_pic_set_prediction_flag(int)] +/// ### delta_rps_sign +/// [VarHandle][#VH_delta_rps_sign] - [Getter][#delta_rps_sign()] - [Setter][#delta_rps_sign(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265ShortTermRefPicSetFlags { +/// uint32_t : 1 inter_ref_pic_set_prediction_flag; +/// uint32_t : 1 delta_rps_sign; +/// } StdVideoH265ShortTermRefPicSetFlags; +/// ``` +public final class StdVideoH265ShortTermRefPicSetFlags extends Struct { + /// The struct layout of `StdVideoH265ShortTermRefPicSetFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("inter_ref_pic_set_prediction_flag"), + ValueLayout.JAVA_INT.withName("delta_rps_sign") + ); + /// The [VarHandle] of `inter_ref_pic_set_prediction_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_inter_ref_pic_set_prediction_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("inter_ref_pic_set_prediction_flag")); + /// The [VarHandle] of `delta_rps_sign` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_delta_rps_sign = LAYOUT.arrayElementVarHandle(PathElement.groupElement("delta_rps_sign")); + + /// Creates `StdVideoH265ShortTermRefPicSetFlags` with the given segment. + /// @param segment the memory segment + public StdVideoH265ShortTermRefPicSetFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265ShortTermRefPicSetFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ShortTermRefPicSetFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ShortTermRefPicSetFlags(segment); } + + /// Creates `StdVideoH265ShortTermRefPicSetFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ShortTermRefPicSetFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ShortTermRefPicSetFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265ShortTermRefPicSetFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265ShortTermRefPicSetFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265ShortTermRefPicSetFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265ShortTermRefPicSetFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265ShortTermRefPicSetFlags` + public static StdVideoH265ShortTermRefPicSetFlags alloc(SegmentAllocator allocator) { return new StdVideoH265ShortTermRefPicSetFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265ShortTermRefPicSetFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265ShortTermRefPicSetFlags` + public static StdVideoH265ShortTermRefPicSetFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoH265ShortTermRefPicSetFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `inter_ref_pic_set_prediction_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_inter_ref_pic_set_prediction_flag(MemorySegment segment, long index) { return (int) VH_inter_ref_pic_set_prediction_flag.get(segment, 0L, index); } + /// {@return `inter_ref_pic_set_prediction_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_inter_ref_pic_set_prediction_flag(MemorySegment segment) { return StdVideoH265ShortTermRefPicSetFlags.get_inter_ref_pic_set_prediction_flag(segment, 0L); } + /// {@return `inter_ref_pic_set_prediction_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int inter_ref_pic_set_prediction_flagAt(long index) { return StdVideoH265ShortTermRefPicSetFlags.get_inter_ref_pic_set_prediction_flag(this.segment(), index); } + /// {@return `inter_ref_pic_set_prediction_flag`} + public @CType("uint32_t : 1") int inter_ref_pic_set_prediction_flag() { return StdVideoH265ShortTermRefPicSetFlags.get_inter_ref_pic_set_prediction_flag(this.segment()); } + /// Sets `inter_ref_pic_set_prediction_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_inter_ref_pic_set_prediction_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_inter_ref_pic_set_prediction_flag.set(segment, 0L, index, value); } + /// Sets `inter_ref_pic_set_prediction_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_inter_ref_pic_set_prediction_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265ShortTermRefPicSetFlags.set_inter_ref_pic_set_prediction_flag(segment, 0L, value); } + /// Sets `inter_ref_pic_set_prediction_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSetFlags inter_ref_pic_set_prediction_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265ShortTermRefPicSetFlags.set_inter_ref_pic_set_prediction_flag(this.segment(), index, value); return this; } + /// Sets `inter_ref_pic_set_prediction_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSetFlags inter_ref_pic_set_prediction_flag(@CType("uint32_t : 1") int value) { StdVideoH265ShortTermRefPicSetFlags.set_inter_ref_pic_set_prediction_flag(this.segment(), value); return this; } + + /// {@return `delta_rps_sign` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_delta_rps_sign(MemorySegment segment, long index) { return (int) VH_delta_rps_sign.get(segment, 0L, index); } + /// {@return `delta_rps_sign`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_delta_rps_sign(MemorySegment segment) { return StdVideoH265ShortTermRefPicSetFlags.get_delta_rps_sign(segment, 0L); } + /// {@return `delta_rps_sign` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int delta_rps_signAt(long index) { return StdVideoH265ShortTermRefPicSetFlags.get_delta_rps_sign(this.segment(), index); } + /// {@return `delta_rps_sign`} + public @CType("uint32_t : 1") int delta_rps_sign() { return StdVideoH265ShortTermRefPicSetFlags.get_delta_rps_sign(this.segment()); } + /// Sets `delta_rps_sign` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_delta_rps_sign(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_delta_rps_sign.set(segment, 0L, index, value); } + /// Sets `delta_rps_sign` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_delta_rps_sign(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265ShortTermRefPicSetFlags.set_delta_rps_sign(segment, 0L, value); } + /// Sets `delta_rps_sign` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSetFlags delta_rps_signAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265ShortTermRefPicSetFlags.set_delta_rps_sign(this.segment(), index, value); return this; } + /// Sets `delta_rps_sign` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265ShortTermRefPicSetFlags delta_rps_sign(@CType("uint32_t : 1") int value) { StdVideoH265ShortTermRefPicSetFlags.set_delta_rps_sign(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SpsFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SpsFlags.java new file mode 100644 index 00000000..ad30a966 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SpsFlags.java @@ -0,0 +1,1184 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### sps_temporal_id_nesting_flag +/// [VarHandle][#VH_sps_temporal_id_nesting_flag] - [Getter][#sps_temporal_id_nesting_flag()] - [Setter][#sps_temporal_id_nesting_flag(int)] +/// ### separate_colour_plane_flag +/// [VarHandle][#VH_separate_colour_plane_flag] - [Getter][#separate_colour_plane_flag()] - [Setter][#separate_colour_plane_flag(int)] +/// ### conformance_window_flag +/// [VarHandle][#VH_conformance_window_flag] - [Getter][#conformance_window_flag()] - [Setter][#conformance_window_flag(int)] +/// ### sps_sub_layer_ordering_info_present_flag +/// [VarHandle][#VH_sps_sub_layer_ordering_info_present_flag] - [Getter][#sps_sub_layer_ordering_info_present_flag()] - [Setter][#sps_sub_layer_ordering_info_present_flag(int)] +/// ### scaling_list_enabled_flag +/// [VarHandle][#VH_scaling_list_enabled_flag] - [Getter][#scaling_list_enabled_flag()] - [Setter][#scaling_list_enabled_flag(int)] +/// ### sps_scaling_list_data_present_flag +/// [VarHandle][#VH_sps_scaling_list_data_present_flag] - [Getter][#sps_scaling_list_data_present_flag()] - [Setter][#sps_scaling_list_data_present_flag(int)] +/// ### amp_enabled_flag +/// [VarHandle][#VH_amp_enabled_flag] - [Getter][#amp_enabled_flag()] - [Setter][#amp_enabled_flag(int)] +/// ### sample_adaptive_offset_enabled_flag +/// [VarHandle][#VH_sample_adaptive_offset_enabled_flag] - [Getter][#sample_adaptive_offset_enabled_flag()] - [Setter][#sample_adaptive_offset_enabled_flag(int)] +/// ### pcm_enabled_flag +/// [VarHandle][#VH_pcm_enabled_flag] - [Getter][#pcm_enabled_flag()] - [Setter][#pcm_enabled_flag(int)] +/// ### pcm_loop_filter_disabled_flag +/// [VarHandle][#VH_pcm_loop_filter_disabled_flag] - [Getter][#pcm_loop_filter_disabled_flag()] - [Setter][#pcm_loop_filter_disabled_flag(int)] +/// ### long_term_ref_pics_present_flag +/// [VarHandle][#VH_long_term_ref_pics_present_flag] - [Getter][#long_term_ref_pics_present_flag()] - [Setter][#long_term_ref_pics_present_flag(int)] +/// ### sps_temporal_mvp_enabled_flag +/// [VarHandle][#VH_sps_temporal_mvp_enabled_flag] - [Getter][#sps_temporal_mvp_enabled_flag()] - [Setter][#sps_temporal_mvp_enabled_flag(int)] +/// ### strong_intra_smoothing_enabled_flag +/// [VarHandle][#VH_strong_intra_smoothing_enabled_flag] - [Getter][#strong_intra_smoothing_enabled_flag()] - [Setter][#strong_intra_smoothing_enabled_flag(int)] +/// ### vui_parameters_present_flag +/// [VarHandle][#VH_vui_parameters_present_flag] - [Getter][#vui_parameters_present_flag()] - [Setter][#vui_parameters_present_flag(int)] +/// ### sps_extension_present_flag +/// [VarHandle][#VH_sps_extension_present_flag] - [Getter][#sps_extension_present_flag()] - [Setter][#sps_extension_present_flag(int)] +/// ### sps_range_extension_flag +/// [VarHandle][#VH_sps_range_extension_flag] - [Getter][#sps_range_extension_flag()] - [Setter][#sps_range_extension_flag(int)] +/// ### transform_skip_rotation_enabled_flag +/// [VarHandle][#VH_transform_skip_rotation_enabled_flag] - [Getter][#transform_skip_rotation_enabled_flag()] - [Setter][#transform_skip_rotation_enabled_flag(int)] +/// ### transform_skip_context_enabled_flag +/// [VarHandle][#VH_transform_skip_context_enabled_flag] - [Getter][#transform_skip_context_enabled_flag()] - [Setter][#transform_skip_context_enabled_flag(int)] +/// ### implicit_rdpcm_enabled_flag +/// [VarHandle][#VH_implicit_rdpcm_enabled_flag] - [Getter][#implicit_rdpcm_enabled_flag()] - [Setter][#implicit_rdpcm_enabled_flag(int)] +/// ### explicit_rdpcm_enabled_flag +/// [VarHandle][#VH_explicit_rdpcm_enabled_flag] - [Getter][#explicit_rdpcm_enabled_flag()] - [Setter][#explicit_rdpcm_enabled_flag(int)] +/// ### extended_precision_processing_flag +/// [VarHandle][#VH_extended_precision_processing_flag] - [Getter][#extended_precision_processing_flag()] - [Setter][#extended_precision_processing_flag(int)] +/// ### intra_smoothing_disabled_flag +/// [VarHandle][#VH_intra_smoothing_disabled_flag] - [Getter][#intra_smoothing_disabled_flag()] - [Setter][#intra_smoothing_disabled_flag(int)] +/// ### high_precision_offsets_enabled_flag +/// [VarHandle][#VH_high_precision_offsets_enabled_flag] - [Getter][#high_precision_offsets_enabled_flag()] - [Setter][#high_precision_offsets_enabled_flag(int)] +/// ### persistent_rice_adaptation_enabled_flag +/// [VarHandle][#VH_persistent_rice_adaptation_enabled_flag] - [Getter][#persistent_rice_adaptation_enabled_flag()] - [Setter][#persistent_rice_adaptation_enabled_flag(int)] +/// ### cabac_bypass_alignment_enabled_flag +/// [VarHandle][#VH_cabac_bypass_alignment_enabled_flag] - [Getter][#cabac_bypass_alignment_enabled_flag()] - [Setter][#cabac_bypass_alignment_enabled_flag(int)] +/// ### sps_scc_extension_flag +/// [VarHandle][#VH_sps_scc_extension_flag] - [Getter][#sps_scc_extension_flag()] - [Setter][#sps_scc_extension_flag(int)] +/// ### sps_curr_pic_ref_enabled_flag +/// [VarHandle][#VH_sps_curr_pic_ref_enabled_flag] - [Getter][#sps_curr_pic_ref_enabled_flag()] - [Setter][#sps_curr_pic_ref_enabled_flag(int)] +/// ### palette_mode_enabled_flag +/// [VarHandle][#VH_palette_mode_enabled_flag] - [Getter][#palette_mode_enabled_flag()] - [Setter][#palette_mode_enabled_flag(int)] +/// ### sps_palette_predictor_initializers_present_flag +/// [VarHandle][#VH_sps_palette_predictor_initializers_present_flag] - [Getter][#sps_palette_predictor_initializers_present_flag()] - [Setter][#sps_palette_predictor_initializers_present_flag(int)] +/// ### intra_boundary_filtering_disabled_flag +/// [VarHandle][#VH_intra_boundary_filtering_disabled_flag] - [Getter][#intra_boundary_filtering_disabled_flag()] - [Setter][#intra_boundary_filtering_disabled_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265SpsFlags { +/// uint32_t : 1 sps_temporal_id_nesting_flag; +/// uint32_t : 1 separate_colour_plane_flag; +/// uint32_t : 1 conformance_window_flag; +/// uint32_t : 1 sps_sub_layer_ordering_info_present_flag; +/// uint32_t : 1 scaling_list_enabled_flag; +/// uint32_t : 1 sps_scaling_list_data_present_flag; +/// uint32_t : 1 amp_enabled_flag; +/// uint32_t : 1 sample_adaptive_offset_enabled_flag; +/// uint32_t : 1 pcm_enabled_flag; +/// uint32_t : 1 pcm_loop_filter_disabled_flag; +/// uint32_t : 1 long_term_ref_pics_present_flag; +/// uint32_t : 1 sps_temporal_mvp_enabled_flag; +/// uint32_t : 1 strong_intra_smoothing_enabled_flag; +/// uint32_t : 1 vui_parameters_present_flag; +/// uint32_t : 1 sps_extension_present_flag; +/// uint32_t : 1 sps_range_extension_flag; +/// uint32_t : 1 transform_skip_rotation_enabled_flag; +/// uint32_t : 1 transform_skip_context_enabled_flag; +/// uint32_t : 1 implicit_rdpcm_enabled_flag; +/// uint32_t : 1 explicit_rdpcm_enabled_flag; +/// uint32_t : 1 extended_precision_processing_flag; +/// uint32_t : 1 intra_smoothing_disabled_flag; +/// uint32_t : 1 high_precision_offsets_enabled_flag; +/// uint32_t : 1 persistent_rice_adaptation_enabled_flag; +/// uint32_t : 1 cabac_bypass_alignment_enabled_flag; +/// uint32_t : 1 sps_scc_extension_flag; +/// uint32_t : 1 sps_curr_pic_ref_enabled_flag; +/// uint32_t : 1 palette_mode_enabled_flag; +/// uint32_t : 1 sps_palette_predictor_initializers_present_flag; +/// uint32_t : 1 intra_boundary_filtering_disabled_flag; +/// } StdVideoH265SpsFlags; +/// ``` +public final class StdVideoH265SpsFlags extends Struct { + /// The struct layout of `StdVideoH265SpsFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("sps_temporal_id_nesting_flag"), + ValueLayout.JAVA_INT.withName("separate_colour_plane_flag"), + ValueLayout.JAVA_INT.withName("conformance_window_flag"), + ValueLayout.JAVA_INT.withName("sps_sub_layer_ordering_info_present_flag"), + ValueLayout.JAVA_INT.withName("scaling_list_enabled_flag"), + ValueLayout.JAVA_INT.withName("sps_scaling_list_data_present_flag"), + ValueLayout.JAVA_INT.withName("amp_enabled_flag"), + ValueLayout.JAVA_INT.withName("sample_adaptive_offset_enabled_flag"), + ValueLayout.JAVA_INT.withName("pcm_enabled_flag"), + ValueLayout.JAVA_INT.withName("pcm_loop_filter_disabled_flag"), + ValueLayout.JAVA_INT.withName("long_term_ref_pics_present_flag"), + ValueLayout.JAVA_INT.withName("sps_temporal_mvp_enabled_flag"), + ValueLayout.JAVA_INT.withName("strong_intra_smoothing_enabled_flag"), + ValueLayout.JAVA_INT.withName("vui_parameters_present_flag"), + ValueLayout.JAVA_INT.withName("sps_extension_present_flag"), + ValueLayout.JAVA_INT.withName("sps_range_extension_flag"), + ValueLayout.JAVA_INT.withName("transform_skip_rotation_enabled_flag"), + ValueLayout.JAVA_INT.withName("transform_skip_context_enabled_flag"), + ValueLayout.JAVA_INT.withName("implicit_rdpcm_enabled_flag"), + ValueLayout.JAVA_INT.withName("explicit_rdpcm_enabled_flag"), + ValueLayout.JAVA_INT.withName("extended_precision_processing_flag"), + ValueLayout.JAVA_INT.withName("intra_smoothing_disabled_flag"), + ValueLayout.JAVA_INT.withName("high_precision_offsets_enabled_flag"), + ValueLayout.JAVA_INT.withName("persistent_rice_adaptation_enabled_flag"), + ValueLayout.JAVA_INT.withName("cabac_bypass_alignment_enabled_flag"), + ValueLayout.JAVA_INT.withName("sps_scc_extension_flag"), + ValueLayout.JAVA_INT.withName("sps_curr_pic_ref_enabled_flag"), + ValueLayout.JAVA_INT.withName("palette_mode_enabled_flag"), + ValueLayout.JAVA_INT.withName("sps_palette_predictor_initializers_present_flag"), + ValueLayout.JAVA_INT.withName("intra_boundary_filtering_disabled_flag") + ); + /// The [VarHandle] of `sps_temporal_id_nesting_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sps_temporal_id_nesting_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_temporal_id_nesting_flag")); + /// The [VarHandle] of `separate_colour_plane_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_separate_colour_plane_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("separate_colour_plane_flag")); + /// The [VarHandle] of `conformance_window_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_conformance_window_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("conformance_window_flag")); + /// The [VarHandle] of `sps_sub_layer_ordering_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sps_sub_layer_ordering_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_sub_layer_ordering_info_present_flag")); + /// The [VarHandle] of `scaling_list_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_scaling_list_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("scaling_list_enabled_flag")); + /// The [VarHandle] of `sps_scaling_list_data_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sps_scaling_list_data_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_scaling_list_data_present_flag")); + /// The [VarHandle] of `amp_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_amp_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("amp_enabled_flag")); + /// The [VarHandle] of `sample_adaptive_offset_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sample_adaptive_offset_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sample_adaptive_offset_enabled_flag")); + /// The [VarHandle] of `pcm_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pcm_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pcm_enabled_flag")); + /// The [VarHandle] of `pcm_loop_filter_disabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_pcm_loop_filter_disabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pcm_loop_filter_disabled_flag")); + /// The [VarHandle] of `long_term_ref_pics_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_long_term_ref_pics_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("long_term_ref_pics_present_flag")); + /// The [VarHandle] of `sps_temporal_mvp_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sps_temporal_mvp_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_temporal_mvp_enabled_flag")); + /// The [VarHandle] of `strong_intra_smoothing_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_strong_intra_smoothing_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("strong_intra_smoothing_enabled_flag")); + /// The [VarHandle] of `vui_parameters_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vui_parameters_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vui_parameters_present_flag")); + /// The [VarHandle] of `sps_extension_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sps_extension_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_extension_present_flag")); + /// The [VarHandle] of `sps_range_extension_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sps_range_extension_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_range_extension_flag")); + /// The [VarHandle] of `transform_skip_rotation_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transform_skip_rotation_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transform_skip_rotation_enabled_flag")); + /// The [VarHandle] of `transform_skip_context_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_transform_skip_context_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("transform_skip_context_enabled_flag")); + /// The [VarHandle] of `implicit_rdpcm_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_implicit_rdpcm_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("implicit_rdpcm_enabled_flag")); + /// The [VarHandle] of `explicit_rdpcm_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_explicit_rdpcm_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("explicit_rdpcm_enabled_flag")); + /// The [VarHandle] of `extended_precision_processing_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_extended_precision_processing_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("extended_precision_processing_flag")); + /// The [VarHandle] of `intra_smoothing_disabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_intra_smoothing_disabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("intra_smoothing_disabled_flag")); + /// The [VarHandle] of `high_precision_offsets_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_high_precision_offsets_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("high_precision_offsets_enabled_flag")); + /// The [VarHandle] of `persistent_rice_adaptation_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_persistent_rice_adaptation_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("persistent_rice_adaptation_enabled_flag")); + /// The [VarHandle] of `cabac_bypass_alignment_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cabac_bypass_alignment_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cabac_bypass_alignment_enabled_flag")); + /// The [VarHandle] of `sps_scc_extension_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sps_scc_extension_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_scc_extension_flag")); + /// The [VarHandle] of `sps_curr_pic_ref_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sps_curr_pic_ref_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_curr_pic_ref_enabled_flag")); + /// The [VarHandle] of `palette_mode_enabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_palette_mode_enabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("palette_mode_enabled_flag")); + /// The [VarHandle] of `sps_palette_predictor_initializers_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_sps_palette_predictor_initializers_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("sps_palette_predictor_initializers_present_flag")); + /// The [VarHandle] of `intra_boundary_filtering_disabled_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_intra_boundary_filtering_disabled_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("intra_boundary_filtering_disabled_flag")); + + /// Creates `StdVideoH265SpsFlags` with the given segment. + /// @param segment the memory segment + public StdVideoH265SpsFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265SpsFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SpsFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SpsFlags(segment); } + + /// Creates `StdVideoH265SpsFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SpsFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SpsFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265SpsFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SpsFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SpsFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265SpsFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265SpsFlags` + public static StdVideoH265SpsFlags alloc(SegmentAllocator allocator) { return new StdVideoH265SpsFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265SpsFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265SpsFlags` + public static StdVideoH265SpsFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoH265SpsFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `sps_temporal_id_nesting_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sps_temporal_id_nesting_flag(MemorySegment segment, long index) { return (int) VH_sps_temporal_id_nesting_flag.get(segment, 0L, index); } + /// {@return `sps_temporal_id_nesting_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sps_temporal_id_nesting_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_sps_temporal_id_nesting_flag(segment, 0L); } + /// {@return `sps_temporal_id_nesting_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sps_temporal_id_nesting_flagAt(long index) { return StdVideoH265SpsFlags.get_sps_temporal_id_nesting_flag(this.segment(), index); } + /// {@return `sps_temporal_id_nesting_flag`} + public @CType("uint32_t : 1") int sps_temporal_id_nesting_flag() { return StdVideoH265SpsFlags.get_sps_temporal_id_nesting_flag(this.segment()); } + /// Sets `sps_temporal_id_nesting_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_temporal_id_nesting_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sps_temporal_id_nesting_flag.set(segment, 0L, index, value); } + /// Sets `sps_temporal_id_nesting_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_temporal_id_nesting_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_temporal_id_nesting_flag(segment, 0L, value); } + /// Sets `sps_temporal_id_nesting_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_temporal_id_nesting_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_temporal_id_nesting_flag(this.segment(), index, value); return this; } + /// Sets `sps_temporal_id_nesting_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_temporal_id_nesting_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_temporal_id_nesting_flag(this.segment(), value); return this; } + + /// {@return `separate_colour_plane_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_separate_colour_plane_flag(MemorySegment segment, long index) { return (int) VH_separate_colour_plane_flag.get(segment, 0L, index); } + /// {@return `separate_colour_plane_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_separate_colour_plane_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_separate_colour_plane_flag(segment, 0L); } + /// {@return `separate_colour_plane_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int separate_colour_plane_flagAt(long index) { return StdVideoH265SpsFlags.get_separate_colour_plane_flag(this.segment(), index); } + /// {@return `separate_colour_plane_flag`} + public @CType("uint32_t : 1") int separate_colour_plane_flag() { return StdVideoH265SpsFlags.get_separate_colour_plane_flag(this.segment()); } + /// Sets `separate_colour_plane_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_separate_colour_plane_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_separate_colour_plane_flag.set(segment, 0L, index, value); } + /// Sets `separate_colour_plane_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_separate_colour_plane_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_separate_colour_plane_flag(segment, 0L, value); } + /// Sets `separate_colour_plane_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags separate_colour_plane_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_separate_colour_plane_flag(this.segment(), index, value); return this; } + /// Sets `separate_colour_plane_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags separate_colour_plane_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_separate_colour_plane_flag(this.segment(), value); return this; } + + /// {@return `conformance_window_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_conformance_window_flag(MemorySegment segment, long index) { return (int) VH_conformance_window_flag.get(segment, 0L, index); } + /// {@return `conformance_window_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_conformance_window_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_conformance_window_flag(segment, 0L); } + /// {@return `conformance_window_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int conformance_window_flagAt(long index) { return StdVideoH265SpsFlags.get_conformance_window_flag(this.segment(), index); } + /// {@return `conformance_window_flag`} + public @CType("uint32_t : 1") int conformance_window_flag() { return StdVideoH265SpsFlags.get_conformance_window_flag(this.segment()); } + /// Sets `conformance_window_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_conformance_window_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_conformance_window_flag.set(segment, 0L, index, value); } + /// Sets `conformance_window_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_conformance_window_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_conformance_window_flag(segment, 0L, value); } + /// Sets `conformance_window_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags conformance_window_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_conformance_window_flag(this.segment(), index, value); return this; } + /// Sets `conformance_window_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags conformance_window_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_conformance_window_flag(this.segment(), value); return this; } + + /// {@return `sps_sub_layer_ordering_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sps_sub_layer_ordering_info_present_flag(MemorySegment segment, long index) { return (int) VH_sps_sub_layer_ordering_info_present_flag.get(segment, 0L, index); } + /// {@return `sps_sub_layer_ordering_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sps_sub_layer_ordering_info_present_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_sps_sub_layer_ordering_info_present_flag(segment, 0L); } + /// {@return `sps_sub_layer_ordering_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sps_sub_layer_ordering_info_present_flagAt(long index) { return StdVideoH265SpsFlags.get_sps_sub_layer_ordering_info_present_flag(this.segment(), index); } + /// {@return `sps_sub_layer_ordering_info_present_flag`} + public @CType("uint32_t : 1") int sps_sub_layer_ordering_info_present_flag() { return StdVideoH265SpsFlags.get_sps_sub_layer_ordering_info_present_flag(this.segment()); } + /// Sets `sps_sub_layer_ordering_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_sub_layer_ordering_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sps_sub_layer_ordering_info_present_flag.set(segment, 0L, index, value); } + /// Sets `sps_sub_layer_ordering_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_sub_layer_ordering_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_sub_layer_ordering_info_present_flag(segment, 0L, value); } + /// Sets `sps_sub_layer_ordering_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_sub_layer_ordering_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_sub_layer_ordering_info_present_flag(this.segment(), index, value); return this; } + /// Sets `sps_sub_layer_ordering_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_sub_layer_ordering_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_sub_layer_ordering_info_present_flag(this.segment(), value); return this; } + + /// {@return `scaling_list_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_scaling_list_enabled_flag(MemorySegment segment, long index) { return (int) VH_scaling_list_enabled_flag.get(segment, 0L, index); } + /// {@return `scaling_list_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_scaling_list_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_scaling_list_enabled_flag(segment, 0L); } + /// {@return `scaling_list_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int scaling_list_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_scaling_list_enabled_flag(this.segment(), index); } + /// {@return `scaling_list_enabled_flag`} + public @CType("uint32_t : 1") int scaling_list_enabled_flag() { return StdVideoH265SpsFlags.get_scaling_list_enabled_flag(this.segment()); } + /// Sets `scaling_list_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_scaling_list_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_scaling_list_enabled_flag.set(segment, 0L, index, value); } + /// Sets `scaling_list_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_scaling_list_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_scaling_list_enabled_flag(segment, 0L, value); } + /// Sets `scaling_list_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags scaling_list_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_scaling_list_enabled_flag(this.segment(), index, value); return this; } + /// Sets `scaling_list_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags scaling_list_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_scaling_list_enabled_flag(this.segment(), value); return this; } + + /// {@return `sps_scaling_list_data_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sps_scaling_list_data_present_flag(MemorySegment segment, long index) { return (int) VH_sps_scaling_list_data_present_flag.get(segment, 0L, index); } + /// {@return `sps_scaling_list_data_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sps_scaling_list_data_present_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_sps_scaling_list_data_present_flag(segment, 0L); } + /// {@return `sps_scaling_list_data_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sps_scaling_list_data_present_flagAt(long index) { return StdVideoH265SpsFlags.get_sps_scaling_list_data_present_flag(this.segment(), index); } + /// {@return `sps_scaling_list_data_present_flag`} + public @CType("uint32_t : 1") int sps_scaling_list_data_present_flag() { return StdVideoH265SpsFlags.get_sps_scaling_list_data_present_flag(this.segment()); } + /// Sets `sps_scaling_list_data_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_scaling_list_data_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sps_scaling_list_data_present_flag.set(segment, 0L, index, value); } + /// Sets `sps_scaling_list_data_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_scaling_list_data_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_scaling_list_data_present_flag(segment, 0L, value); } + /// Sets `sps_scaling_list_data_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_scaling_list_data_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_scaling_list_data_present_flag(this.segment(), index, value); return this; } + /// Sets `sps_scaling_list_data_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_scaling_list_data_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_scaling_list_data_present_flag(this.segment(), value); return this; } + + /// {@return `amp_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_amp_enabled_flag(MemorySegment segment, long index) { return (int) VH_amp_enabled_flag.get(segment, 0L, index); } + /// {@return `amp_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_amp_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_amp_enabled_flag(segment, 0L); } + /// {@return `amp_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int amp_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_amp_enabled_flag(this.segment(), index); } + /// {@return `amp_enabled_flag`} + public @CType("uint32_t : 1") int amp_enabled_flag() { return StdVideoH265SpsFlags.get_amp_enabled_flag(this.segment()); } + /// Sets `amp_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_amp_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_amp_enabled_flag.set(segment, 0L, index, value); } + /// Sets `amp_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_amp_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_amp_enabled_flag(segment, 0L, value); } + /// Sets `amp_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags amp_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_amp_enabled_flag(this.segment(), index, value); return this; } + /// Sets `amp_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags amp_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_amp_enabled_flag(this.segment(), value); return this; } + + /// {@return `sample_adaptive_offset_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sample_adaptive_offset_enabled_flag(MemorySegment segment, long index) { return (int) VH_sample_adaptive_offset_enabled_flag.get(segment, 0L, index); } + /// {@return `sample_adaptive_offset_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sample_adaptive_offset_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_sample_adaptive_offset_enabled_flag(segment, 0L); } + /// {@return `sample_adaptive_offset_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sample_adaptive_offset_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_sample_adaptive_offset_enabled_flag(this.segment(), index); } + /// {@return `sample_adaptive_offset_enabled_flag`} + public @CType("uint32_t : 1") int sample_adaptive_offset_enabled_flag() { return StdVideoH265SpsFlags.get_sample_adaptive_offset_enabled_flag(this.segment()); } + /// Sets `sample_adaptive_offset_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sample_adaptive_offset_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sample_adaptive_offset_enabled_flag.set(segment, 0L, index, value); } + /// Sets `sample_adaptive_offset_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sample_adaptive_offset_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sample_adaptive_offset_enabled_flag(segment, 0L, value); } + /// Sets `sample_adaptive_offset_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sample_adaptive_offset_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sample_adaptive_offset_enabled_flag(this.segment(), index, value); return this; } + /// Sets `sample_adaptive_offset_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sample_adaptive_offset_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sample_adaptive_offset_enabled_flag(this.segment(), value); return this; } + + /// {@return `pcm_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pcm_enabled_flag(MemorySegment segment, long index) { return (int) VH_pcm_enabled_flag.get(segment, 0L, index); } + /// {@return `pcm_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pcm_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_pcm_enabled_flag(segment, 0L); } + /// {@return `pcm_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pcm_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_pcm_enabled_flag(this.segment(), index); } + /// {@return `pcm_enabled_flag`} + public @CType("uint32_t : 1") int pcm_enabled_flag() { return StdVideoH265SpsFlags.get_pcm_enabled_flag(this.segment()); } + /// Sets `pcm_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pcm_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pcm_enabled_flag.set(segment, 0L, index, value); } + /// Sets `pcm_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pcm_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_pcm_enabled_flag(segment, 0L, value); } + /// Sets `pcm_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags pcm_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_pcm_enabled_flag(this.segment(), index, value); return this; } + /// Sets `pcm_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags pcm_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_pcm_enabled_flag(this.segment(), value); return this; } + + /// {@return `pcm_loop_filter_disabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_pcm_loop_filter_disabled_flag(MemorySegment segment, long index) { return (int) VH_pcm_loop_filter_disabled_flag.get(segment, 0L, index); } + /// {@return `pcm_loop_filter_disabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_pcm_loop_filter_disabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_pcm_loop_filter_disabled_flag(segment, 0L); } + /// {@return `pcm_loop_filter_disabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int pcm_loop_filter_disabled_flagAt(long index) { return StdVideoH265SpsFlags.get_pcm_loop_filter_disabled_flag(this.segment(), index); } + /// {@return `pcm_loop_filter_disabled_flag`} + public @CType("uint32_t : 1") int pcm_loop_filter_disabled_flag() { return StdVideoH265SpsFlags.get_pcm_loop_filter_disabled_flag(this.segment()); } + /// Sets `pcm_loop_filter_disabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pcm_loop_filter_disabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_pcm_loop_filter_disabled_flag.set(segment, 0L, index, value); } + /// Sets `pcm_loop_filter_disabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pcm_loop_filter_disabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_pcm_loop_filter_disabled_flag(segment, 0L, value); } + /// Sets `pcm_loop_filter_disabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags pcm_loop_filter_disabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_pcm_loop_filter_disabled_flag(this.segment(), index, value); return this; } + /// Sets `pcm_loop_filter_disabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags pcm_loop_filter_disabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_pcm_loop_filter_disabled_flag(this.segment(), value); return this; } + + /// {@return `long_term_ref_pics_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_long_term_ref_pics_present_flag(MemorySegment segment, long index) { return (int) VH_long_term_ref_pics_present_flag.get(segment, 0L, index); } + /// {@return `long_term_ref_pics_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_long_term_ref_pics_present_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_long_term_ref_pics_present_flag(segment, 0L); } + /// {@return `long_term_ref_pics_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int long_term_ref_pics_present_flagAt(long index) { return StdVideoH265SpsFlags.get_long_term_ref_pics_present_flag(this.segment(), index); } + /// {@return `long_term_ref_pics_present_flag`} + public @CType("uint32_t : 1") int long_term_ref_pics_present_flag() { return StdVideoH265SpsFlags.get_long_term_ref_pics_present_flag(this.segment()); } + /// Sets `long_term_ref_pics_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_long_term_ref_pics_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_long_term_ref_pics_present_flag.set(segment, 0L, index, value); } + /// Sets `long_term_ref_pics_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_long_term_ref_pics_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_long_term_ref_pics_present_flag(segment, 0L, value); } + /// Sets `long_term_ref_pics_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags long_term_ref_pics_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_long_term_ref_pics_present_flag(this.segment(), index, value); return this; } + /// Sets `long_term_ref_pics_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags long_term_ref_pics_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_long_term_ref_pics_present_flag(this.segment(), value); return this; } + + /// {@return `sps_temporal_mvp_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sps_temporal_mvp_enabled_flag(MemorySegment segment, long index) { return (int) VH_sps_temporal_mvp_enabled_flag.get(segment, 0L, index); } + /// {@return `sps_temporal_mvp_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sps_temporal_mvp_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_sps_temporal_mvp_enabled_flag(segment, 0L); } + /// {@return `sps_temporal_mvp_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sps_temporal_mvp_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_sps_temporal_mvp_enabled_flag(this.segment(), index); } + /// {@return `sps_temporal_mvp_enabled_flag`} + public @CType("uint32_t : 1") int sps_temporal_mvp_enabled_flag() { return StdVideoH265SpsFlags.get_sps_temporal_mvp_enabled_flag(this.segment()); } + /// Sets `sps_temporal_mvp_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_temporal_mvp_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sps_temporal_mvp_enabled_flag.set(segment, 0L, index, value); } + /// Sets `sps_temporal_mvp_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_temporal_mvp_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_temporal_mvp_enabled_flag(segment, 0L, value); } + /// Sets `sps_temporal_mvp_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_temporal_mvp_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_temporal_mvp_enabled_flag(this.segment(), index, value); return this; } + /// Sets `sps_temporal_mvp_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_temporal_mvp_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_temporal_mvp_enabled_flag(this.segment(), value); return this; } + + /// {@return `strong_intra_smoothing_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_strong_intra_smoothing_enabled_flag(MemorySegment segment, long index) { return (int) VH_strong_intra_smoothing_enabled_flag.get(segment, 0L, index); } + /// {@return `strong_intra_smoothing_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_strong_intra_smoothing_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_strong_intra_smoothing_enabled_flag(segment, 0L); } + /// {@return `strong_intra_smoothing_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int strong_intra_smoothing_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_strong_intra_smoothing_enabled_flag(this.segment(), index); } + /// {@return `strong_intra_smoothing_enabled_flag`} + public @CType("uint32_t : 1") int strong_intra_smoothing_enabled_flag() { return StdVideoH265SpsFlags.get_strong_intra_smoothing_enabled_flag(this.segment()); } + /// Sets `strong_intra_smoothing_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_strong_intra_smoothing_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_strong_intra_smoothing_enabled_flag.set(segment, 0L, index, value); } + /// Sets `strong_intra_smoothing_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_strong_intra_smoothing_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_strong_intra_smoothing_enabled_flag(segment, 0L, value); } + /// Sets `strong_intra_smoothing_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags strong_intra_smoothing_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_strong_intra_smoothing_enabled_flag(this.segment(), index, value); return this; } + /// Sets `strong_intra_smoothing_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags strong_intra_smoothing_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_strong_intra_smoothing_enabled_flag(this.segment(), value); return this; } + + /// {@return `vui_parameters_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vui_parameters_present_flag(MemorySegment segment, long index) { return (int) VH_vui_parameters_present_flag.get(segment, 0L, index); } + /// {@return `vui_parameters_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vui_parameters_present_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_vui_parameters_present_flag(segment, 0L); } + /// {@return `vui_parameters_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vui_parameters_present_flagAt(long index) { return StdVideoH265SpsFlags.get_vui_parameters_present_flag(this.segment(), index); } + /// {@return `vui_parameters_present_flag`} + public @CType("uint32_t : 1") int vui_parameters_present_flag() { return StdVideoH265SpsFlags.get_vui_parameters_present_flag(this.segment()); } + /// Sets `vui_parameters_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vui_parameters_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vui_parameters_present_flag.set(segment, 0L, index, value); } + /// Sets `vui_parameters_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vui_parameters_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_vui_parameters_present_flag(segment, 0L, value); } + /// Sets `vui_parameters_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags vui_parameters_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_vui_parameters_present_flag(this.segment(), index, value); return this; } + /// Sets `vui_parameters_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags vui_parameters_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_vui_parameters_present_flag(this.segment(), value); return this; } + + /// {@return `sps_extension_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sps_extension_present_flag(MemorySegment segment, long index) { return (int) VH_sps_extension_present_flag.get(segment, 0L, index); } + /// {@return `sps_extension_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sps_extension_present_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_sps_extension_present_flag(segment, 0L); } + /// {@return `sps_extension_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sps_extension_present_flagAt(long index) { return StdVideoH265SpsFlags.get_sps_extension_present_flag(this.segment(), index); } + /// {@return `sps_extension_present_flag`} + public @CType("uint32_t : 1") int sps_extension_present_flag() { return StdVideoH265SpsFlags.get_sps_extension_present_flag(this.segment()); } + /// Sets `sps_extension_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_extension_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sps_extension_present_flag.set(segment, 0L, index, value); } + /// Sets `sps_extension_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_extension_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_extension_present_flag(segment, 0L, value); } + /// Sets `sps_extension_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_extension_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_extension_present_flag(this.segment(), index, value); return this; } + /// Sets `sps_extension_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_extension_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_extension_present_flag(this.segment(), value); return this; } + + /// {@return `sps_range_extension_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sps_range_extension_flag(MemorySegment segment, long index) { return (int) VH_sps_range_extension_flag.get(segment, 0L, index); } + /// {@return `sps_range_extension_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sps_range_extension_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_sps_range_extension_flag(segment, 0L); } + /// {@return `sps_range_extension_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sps_range_extension_flagAt(long index) { return StdVideoH265SpsFlags.get_sps_range_extension_flag(this.segment(), index); } + /// {@return `sps_range_extension_flag`} + public @CType("uint32_t : 1") int sps_range_extension_flag() { return StdVideoH265SpsFlags.get_sps_range_extension_flag(this.segment()); } + /// Sets `sps_range_extension_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_range_extension_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sps_range_extension_flag.set(segment, 0L, index, value); } + /// Sets `sps_range_extension_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_range_extension_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_range_extension_flag(segment, 0L, value); } + /// Sets `sps_range_extension_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_range_extension_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_range_extension_flag(this.segment(), index, value); return this; } + /// Sets `sps_range_extension_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_range_extension_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_range_extension_flag(this.segment(), value); return this; } + + /// {@return `transform_skip_rotation_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_transform_skip_rotation_enabled_flag(MemorySegment segment, long index) { return (int) VH_transform_skip_rotation_enabled_flag.get(segment, 0L, index); } + /// {@return `transform_skip_rotation_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_transform_skip_rotation_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_transform_skip_rotation_enabled_flag(segment, 0L); } + /// {@return `transform_skip_rotation_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int transform_skip_rotation_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_transform_skip_rotation_enabled_flag(this.segment(), index); } + /// {@return `transform_skip_rotation_enabled_flag`} + public @CType("uint32_t : 1") int transform_skip_rotation_enabled_flag() { return StdVideoH265SpsFlags.get_transform_skip_rotation_enabled_flag(this.segment()); } + /// Sets `transform_skip_rotation_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transform_skip_rotation_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_transform_skip_rotation_enabled_flag.set(segment, 0L, index, value); } + /// Sets `transform_skip_rotation_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transform_skip_rotation_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_transform_skip_rotation_enabled_flag(segment, 0L, value); } + /// Sets `transform_skip_rotation_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags transform_skip_rotation_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_transform_skip_rotation_enabled_flag(this.segment(), index, value); return this; } + /// Sets `transform_skip_rotation_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags transform_skip_rotation_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_transform_skip_rotation_enabled_flag(this.segment(), value); return this; } + + /// {@return `transform_skip_context_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_transform_skip_context_enabled_flag(MemorySegment segment, long index) { return (int) VH_transform_skip_context_enabled_flag.get(segment, 0L, index); } + /// {@return `transform_skip_context_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_transform_skip_context_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_transform_skip_context_enabled_flag(segment, 0L); } + /// {@return `transform_skip_context_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int transform_skip_context_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_transform_skip_context_enabled_flag(this.segment(), index); } + /// {@return `transform_skip_context_enabled_flag`} + public @CType("uint32_t : 1") int transform_skip_context_enabled_flag() { return StdVideoH265SpsFlags.get_transform_skip_context_enabled_flag(this.segment()); } + /// Sets `transform_skip_context_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_transform_skip_context_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_transform_skip_context_enabled_flag.set(segment, 0L, index, value); } + /// Sets `transform_skip_context_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_transform_skip_context_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_transform_skip_context_enabled_flag(segment, 0L, value); } + /// Sets `transform_skip_context_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags transform_skip_context_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_transform_skip_context_enabled_flag(this.segment(), index, value); return this; } + /// Sets `transform_skip_context_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags transform_skip_context_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_transform_skip_context_enabled_flag(this.segment(), value); return this; } + + /// {@return `implicit_rdpcm_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_implicit_rdpcm_enabled_flag(MemorySegment segment, long index) { return (int) VH_implicit_rdpcm_enabled_flag.get(segment, 0L, index); } + /// {@return `implicit_rdpcm_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_implicit_rdpcm_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_implicit_rdpcm_enabled_flag(segment, 0L); } + /// {@return `implicit_rdpcm_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int implicit_rdpcm_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_implicit_rdpcm_enabled_flag(this.segment(), index); } + /// {@return `implicit_rdpcm_enabled_flag`} + public @CType("uint32_t : 1") int implicit_rdpcm_enabled_flag() { return StdVideoH265SpsFlags.get_implicit_rdpcm_enabled_flag(this.segment()); } + /// Sets `implicit_rdpcm_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_implicit_rdpcm_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_implicit_rdpcm_enabled_flag.set(segment, 0L, index, value); } + /// Sets `implicit_rdpcm_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_implicit_rdpcm_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_implicit_rdpcm_enabled_flag(segment, 0L, value); } + /// Sets `implicit_rdpcm_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags implicit_rdpcm_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_implicit_rdpcm_enabled_flag(this.segment(), index, value); return this; } + /// Sets `implicit_rdpcm_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags implicit_rdpcm_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_implicit_rdpcm_enabled_flag(this.segment(), value); return this; } + + /// {@return `explicit_rdpcm_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_explicit_rdpcm_enabled_flag(MemorySegment segment, long index) { return (int) VH_explicit_rdpcm_enabled_flag.get(segment, 0L, index); } + /// {@return `explicit_rdpcm_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_explicit_rdpcm_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_explicit_rdpcm_enabled_flag(segment, 0L); } + /// {@return `explicit_rdpcm_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int explicit_rdpcm_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_explicit_rdpcm_enabled_flag(this.segment(), index); } + /// {@return `explicit_rdpcm_enabled_flag`} + public @CType("uint32_t : 1") int explicit_rdpcm_enabled_flag() { return StdVideoH265SpsFlags.get_explicit_rdpcm_enabled_flag(this.segment()); } + /// Sets `explicit_rdpcm_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_explicit_rdpcm_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_explicit_rdpcm_enabled_flag.set(segment, 0L, index, value); } + /// Sets `explicit_rdpcm_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_explicit_rdpcm_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_explicit_rdpcm_enabled_flag(segment, 0L, value); } + /// Sets `explicit_rdpcm_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags explicit_rdpcm_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_explicit_rdpcm_enabled_flag(this.segment(), index, value); return this; } + /// Sets `explicit_rdpcm_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags explicit_rdpcm_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_explicit_rdpcm_enabled_flag(this.segment(), value); return this; } + + /// {@return `extended_precision_processing_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_extended_precision_processing_flag(MemorySegment segment, long index) { return (int) VH_extended_precision_processing_flag.get(segment, 0L, index); } + /// {@return `extended_precision_processing_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_extended_precision_processing_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_extended_precision_processing_flag(segment, 0L); } + /// {@return `extended_precision_processing_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int extended_precision_processing_flagAt(long index) { return StdVideoH265SpsFlags.get_extended_precision_processing_flag(this.segment(), index); } + /// {@return `extended_precision_processing_flag`} + public @CType("uint32_t : 1") int extended_precision_processing_flag() { return StdVideoH265SpsFlags.get_extended_precision_processing_flag(this.segment()); } + /// Sets `extended_precision_processing_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_extended_precision_processing_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_extended_precision_processing_flag.set(segment, 0L, index, value); } + /// Sets `extended_precision_processing_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_extended_precision_processing_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_extended_precision_processing_flag(segment, 0L, value); } + /// Sets `extended_precision_processing_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags extended_precision_processing_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_extended_precision_processing_flag(this.segment(), index, value); return this; } + /// Sets `extended_precision_processing_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags extended_precision_processing_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_extended_precision_processing_flag(this.segment(), value); return this; } + + /// {@return `intra_smoothing_disabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_intra_smoothing_disabled_flag(MemorySegment segment, long index) { return (int) VH_intra_smoothing_disabled_flag.get(segment, 0L, index); } + /// {@return `intra_smoothing_disabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_intra_smoothing_disabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_intra_smoothing_disabled_flag(segment, 0L); } + /// {@return `intra_smoothing_disabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int intra_smoothing_disabled_flagAt(long index) { return StdVideoH265SpsFlags.get_intra_smoothing_disabled_flag(this.segment(), index); } + /// {@return `intra_smoothing_disabled_flag`} + public @CType("uint32_t : 1") int intra_smoothing_disabled_flag() { return StdVideoH265SpsFlags.get_intra_smoothing_disabled_flag(this.segment()); } + /// Sets `intra_smoothing_disabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_intra_smoothing_disabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_intra_smoothing_disabled_flag.set(segment, 0L, index, value); } + /// Sets `intra_smoothing_disabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_intra_smoothing_disabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_intra_smoothing_disabled_flag(segment, 0L, value); } + /// Sets `intra_smoothing_disabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags intra_smoothing_disabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_intra_smoothing_disabled_flag(this.segment(), index, value); return this; } + /// Sets `intra_smoothing_disabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags intra_smoothing_disabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_intra_smoothing_disabled_flag(this.segment(), value); return this; } + + /// {@return `high_precision_offsets_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_high_precision_offsets_enabled_flag(MemorySegment segment, long index) { return (int) VH_high_precision_offsets_enabled_flag.get(segment, 0L, index); } + /// {@return `high_precision_offsets_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_high_precision_offsets_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_high_precision_offsets_enabled_flag(segment, 0L); } + /// {@return `high_precision_offsets_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int high_precision_offsets_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_high_precision_offsets_enabled_flag(this.segment(), index); } + /// {@return `high_precision_offsets_enabled_flag`} + public @CType("uint32_t : 1") int high_precision_offsets_enabled_flag() { return StdVideoH265SpsFlags.get_high_precision_offsets_enabled_flag(this.segment()); } + /// Sets `high_precision_offsets_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_high_precision_offsets_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_high_precision_offsets_enabled_flag.set(segment, 0L, index, value); } + /// Sets `high_precision_offsets_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_high_precision_offsets_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_high_precision_offsets_enabled_flag(segment, 0L, value); } + /// Sets `high_precision_offsets_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags high_precision_offsets_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_high_precision_offsets_enabled_flag(this.segment(), index, value); return this; } + /// Sets `high_precision_offsets_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags high_precision_offsets_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_high_precision_offsets_enabled_flag(this.segment(), value); return this; } + + /// {@return `persistent_rice_adaptation_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_persistent_rice_adaptation_enabled_flag(MemorySegment segment, long index) { return (int) VH_persistent_rice_adaptation_enabled_flag.get(segment, 0L, index); } + /// {@return `persistent_rice_adaptation_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_persistent_rice_adaptation_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_persistent_rice_adaptation_enabled_flag(segment, 0L); } + /// {@return `persistent_rice_adaptation_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int persistent_rice_adaptation_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_persistent_rice_adaptation_enabled_flag(this.segment(), index); } + /// {@return `persistent_rice_adaptation_enabled_flag`} + public @CType("uint32_t : 1") int persistent_rice_adaptation_enabled_flag() { return StdVideoH265SpsFlags.get_persistent_rice_adaptation_enabled_flag(this.segment()); } + /// Sets `persistent_rice_adaptation_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_persistent_rice_adaptation_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_persistent_rice_adaptation_enabled_flag.set(segment, 0L, index, value); } + /// Sets `persistent_rice_adaptation_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_persistent_rice_adaptation_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_persistent_rice_adaptation_enabled_flag(segment, 0L, value); } + /// Sets `persistent_rice_adaptation_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags persistent_rice_adaptation_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_persistent_rice_adaptation_enabled_flag(this.segment(), index, value); return this; } + /// Sets `persistent_rice_adaptation_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags persistent_rice_adaptation_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_persistent_rice_adaptation_enabled_flag(this.segment(), value); return this; } + + /// {@return `cabac_bypass_alignment_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_cabac_bypass_alignment_enabled_flag(MemorySegment segment, long index) { return (int) VH_cabac_bypass_alignment_enabled_flag.get(segment, 0L, index); } + /// {@return `cabac_bypass_alignment_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_cabac_bypass_alignment_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_cabac_bypass_alignment_enabled_flag(segment, 0L); } + /// {@return `cabac_bypass_alignment_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int cabac_bypass_alignment_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_cabac_bypass_alignment_enabled_flag(this.segment(), index); } + /// {@return `cabac_bypass_alignment_enabled_flag`} + public @CType("uint32_t : 1") int cabac_bypass_alignment_enabled_flag() { return StdVideoH265SpsFlags.get_cabac_bypass_alignment_enabled_flag(this.segment()); } + /// Sets `cabac_bypass_alignment_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cabac_bypass_alignment_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_cabac_bypass_alignment_enabled_flag.set(segment, 0L, index, value); } + /// Sets `cabac_bypass_alignment_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cabac_bypass_alignment_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_cabac_bypass_alignment_enabled_flag(segment, 0L, value); } + /// Sets `cabac_bypass_alignment_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags cabac_bypass_alignment_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_cabac_bypass_alignment_enabled_flag(this.segment(), index, value); return this; } + /// Sets `cabac_bypass_alignment_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags cabac_bypass_alignment_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_cabac_bypass_alignment_enabled_flag(this.segment(), value); return this; } + + /// {@return `sps_scc_extension_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sps_scc_extension_flag(MemorySegment segment, long index) { return (int) VH_sps_scc_extension_flag.get(segment, 0L, index); } + /// {@return `sps_scc_extension_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sps_scc_extension_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_sps_scc_extension_flag(segment, 0L); } + /// {@return `sps_scc_extension_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sps_scc_extension_flagAt(long index) { return StdVideoH265SpsFlags.get_sps_scc_extension_flag(this.segment(), index); } + /// {@return `sps_scc_extension_flag`} + public @CType("uint32_t : 1") int sps_scc_extension_flag() { return StdVideoH265SpsFlags.get_sps_scc_extension_flag(this.segment()); } + /// Sets `sps_scc_extension_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_scc_extension_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sps_scc_extension_flag.set(segment, 0L, index, value); } + /// Sets `sps_scc_extension_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_scc_extension_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_scc_extension_flag(segment, 0L, value); } + /// Sets `sps_scc_extension_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_scc_extension_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_scc_extension_flag(this.segment(), index, value); return this; } + /// Sets `sps_scc_extension_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_scc_extension_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_scc_extension_flag(this.segment(), value); return this; } + + /// {@return `sps_curr_pic_ref_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sps_curr_pic_ref_enabled_flag(MemorySegment segment, long index) { return (int) VH_sps_curr_pic_ref_enabled_flag.get(segment, 0L, index); } + /// {@return `sps_curr_pic_ref_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sps_curr_pic_ref_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_sps_curr_pic_ref_enabled_flag(segment, 0L); } + /// {@return `sps_curr_pic_ref_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sps_curr_pic_ref_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_sps_curr_pic_ref_enabled_flag(this.segment(), index); } + /// {@return `sps_curr_pic_ref_enabled_flag`} + public @CType("uint32_t : 1") int sps_curr_pic_ref_enabled_flag() { return StdVideoH265SpsFlags.get_sps_curr_pic_ref_enabled_flag(this.segment()); } + /// Sets `sps_curr_pic_ref_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_curr_pic_ref_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sps_curr_pic_ref_enabled_flag.set(segment, 0L, index, value); } + /// Sets `sps_curr_pic_ref_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_curr_pic_ref_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_curr_pic_ref_enabled_flag(segment, 0L, value); } + /// Sets `sps_curr_pic_ref_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_curr_pic_ref_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_curr_pic_ref_enabled_flag(this.segment(), index, value); return this; } + /// Sets `sps_curr_pic_ref_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_curr_pic_ref_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_curr_pic_ref_enabled_flag(this.segment(), value); return this; } + + /// {@return `palette_mode_enabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_palette_mode_enabled_flag(MemorySegment segment, long index) { return (int) VH_palette_mode_enabled_flag.get(segment, 0L, index); } + /// {@return `palette_mode_enabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_palette_mode_enabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_palette_mode_enabled_flag(segment, 0L); } + /// {@return `palette_mode_enabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int palette_mode_enabled_flagAt(long index) { return StdVideoH265SpsFlags.get_palette_mode_enabled_flag(this.segment(), index); } + /// {@return `palette_mode_enabled_flag`} + public @CType("uint32_t : 1") int palette_mode_enabled_flag() { return StdVideoH265SpsFlags.get_palette_mode_enabled_flag(this.segment()); } + /// Sets `palette_mode_enabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_palette_mode_enabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_palette_mode_enabled_flag.set(segment, 0L, index, value); } + /// Sets `palette_mode_enabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_palette_mode_enabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_palette_mode_enabled_flag(segment, 0L, value); } + /// Sets `palette_mode_enabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags palette_mode_enabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_palette_mode_enabled_flag(this.segment(), index, value); return this; } + /// Sets `palette_mode_enabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags palette_mode_enabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_palette_mode_enabled_flag(this.segment(), value); return this; } + + /// {@return `sps_palette_predictor_initializers_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_sps_palette_predictor_initializers_present_flag(MemorySegment segment, long index) { return (int) VH_sps_palette_predictor_initializers_present_flag.get(segment, 0L, index); } + /// {@return `sps_palette_predictor_initializers_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_sps_palette_predictor_initializers_present_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_sps_palette_predictor_initializers_present_flag(segment, 0L); } + /// {@return `sps_palette_predictor_initializers_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int sps_palette_predictor_initializers_present_flagAt(long index) { return StdVideoH265SpsFlags.get_sps_palette_predictor_initializers_present_flag(this.segment(), index); } + /// {@return `sps_palette_predictor_initializers_present_flag`} + public @CType("uint32_t : 1") int sps_palette_predictor_initializers_present_flag() { return StdVideoH265SpsFlags.get_sps_palette_predictor_initializers_present_flag(this.segment()); } + /// Sets `sps_palette_predictor_initializers_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_sps_palette_predictor_initializers_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_sps_palette_predictor_initializers_present_flag.set(segment, 0L, index, value); } + /// Sets `sps_palette_predictor_initializers_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_sps_palette_predictor_initializers_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_palette_predictor_initializers_present_flag(segment, 0L, value); } + /// Sets `sps_palette_predictor_initializers_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_palette_predictor_initializers_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_palette_predictor_initializers_present_flag(this.segment(), index, value); return this; } + /// Sets `sps_palette_predictor_initializers_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags sps_palette_predictor_initializers_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_sps_palette_predictor_initializers_present_flag(this.segment(), value); return this; } + + /// {@return `intra_boundary_filtering_disabled_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_intra_boundary_filtering_disabled_flag(MemorySegment segment, long index) { return (int) VH_intra_boundary_filtering_disabled_flag.get(segment, 0L, index); } + /// {@return `intra_boundary_filtering_disabled_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_intra_boundary_filtering_disabled_flag(MemorySegment segment) { return StdVideoH265SpsFlags.get_intra_boundary_filtering_disabled_flag(segment, 0L); } + /// {@return `intra_boundary_filtering_disabled_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int intra_boundary_filtering_disabled_flagAt(long index) { return StdVideoH265SpsFlags.get_intra_boundary_filtering_disabled_flag(this.segment(), index); } + /// {@return `intra_boundary_filtering_disabled_flag`} + public @CType("uint32_t : 1") int intra_boundary_filtering_disabled_flag() { return StdVideoH265SpsFlags.get_intra_boundary_filtering_disabled_flag(this.segment()); } + /// Sets `intra_boundary_filtering_disabled_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_intra_boundary_filtering_disabled_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_intra_boundary_filtering_disabled_flag.set(segment, 0L, index, value); } + /// Sets `intra_boundary_filtering_disabled_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_intra_boundary_filtering_disabled_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_intra_boundary_filtering_disabled_flag(segment, 0L, value); } + /// Sets `intra_boundary_filtering_disabled_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags intra_boundary_filtering_disabled_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_intra_boundary_filtering_disabled_flag(this.segment(), index, value); return this; } + /// Sets `intra_boundary_filtering_disabled_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsFlags intra_boundary_filtering_disabled_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsFlags.set_intra_boundary_filtering_disabled_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SpsVuiFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SpsVuiFlags.java new file mode 100644 index 00000000..3365630a --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SpsVuiFlags.java @@ -0,0 +1,740 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### aspect_ratio_info_present_flag +/// [VarHandle][#VH_aspect_ratio_info_present_flag] - [Getter][#aspect_ratio_info_present_flag()] - [Setter][#aspect_ratio_info_present_flag(int)] +/// ### overscan_info_present_flag +/// [VarHandle][#VH_overscan_info_present_flag] - [Getter][#overscan_info_present_flag()] - [Setter][#overscan_info_present_flag(int)] +/// ### overscan_appropriate_flag +/// [VarHandle][#VH_overscan_appropriate_flag] - [Getter][#overscan_appropriate_flag()] - [Setter][#overscan_appropriate_flag(int)] +/// ### video_signal_type_present_flag +/// [VarHandle][#VH_video_signal_type_present_flag] - [Getter][#video_signal_type_present_flag()] - [Setter][#video_signal_type_present_flag(int)] +/// ### video_full_range_flag +/// [VarHandle][#VH_video_full_range_flag] - [Getter][#video_full_range_flag()] - [Setter][#video_full_range_flag(int)] +/// ### colour_description_present_flag +/// [VarHandle][#VH_colour_description_present_flag] - [Getter][#colour_description_present_flag()] - [Setter][#colour_description_present_flag(int)] +/// ### chroma_loc_info_present_flag +/// [VarHandle][#VH_chroma_loc_info_present_flag] - [Getter][#chroma_loc_info_present_flag()] - [Setter][#chroma_loc_info_present_flag(int)] +/// ### neutral_chroma_indication_flag +/// [VarHandle][#VH_neutral_chroma_indication_flag] - [Getter][#neutral_chroma_indication_flag()] - [Setter][#neutral_chroma_indication_flag(int)] +/// ### field_seq_flag +/// [VarHandle][#VH_field_seq_flag] - [Getter][#field_seq_flag()] - [Setter][#field_seq_flag(int)] +/// ### frame_field_info_present_flag +/// [VarHandle][#VH_frame_field_info_present_flag] - [Getter][#frame_field_info_present_flag()] - [Setter][#frame_field_info_present_flag(int)] +/// ### default_display_window_flag +/// [VarHandle][#VH_default_display_window_flag] - [Getter][#default_display_window_flag()] - [Setter][#default_display_window_flag(int)] +/// ### vui_timing_info_present_flag +/// [VarHandle][#VH_vui_timing_info_present_flag] - [Getter][#vui_timing_info_present_flag()] - [Setter][#vui_timing_info_present_flag(int)] +/// ### vui_poc_proportional_to_timing_flag +/// [VarHandle][#VH_vui_poc_proportional_to_timing_flag] - [Getter][#vui_poc_proportional_to_timing_flag()] - [Setter][#vui_poc_proportional_to_timing_flag(int)] +/// ### vui_hrd_parameters_present_flag +/// [VarHandle][#VH_vui_hrd_parameters_present_flag] - [Getter][#vui_hrd_parameters_present_flag()] - [Setter][#vui_hrd_parameters_present_flag(int)] +/// ### bitstream_restriction_flag +/// [VarHandle][#VH_bitstream_restriction_flag] - [Getter][#bitstream_restriction_flag()] - [Setter][#bitstream_restriction_flag(int)] +/// ### tiles_fixed_structure_flag +/// [VarHandle][#VH_tiles_fixed_structure_flag] - [Getter][#tiles_fixed_structure_flag()] - [Setter][#tiles_fixed_structure_flag(int)] +/// ### motion_vectors_over_pic_boundaries_flag +/// [VarHandle][#VH_motion_vectors_over_pic_boundaries_flag] - [Getter][#motion_vectors_over_pic_boundaries_flag()] - [Setter][#motion_vectors_over_pic_boundaries_flag(int)] +/// ### restricted_ref_pic_lists_flag +/// [VarHandle][#VH_restricted_ref_pic_lists_flag] - [Getter][#restricted_ref_pic_lists_flag()] - [Setter][#restricted_ref_pic_lists_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265SpsVuiFlags { +/// uint32_t : 1 aspect_ratio_info_present_flag; +/// uint32_t : 1 overscan_info_present_flag; +/// uint32_t : 1 overscan_appropriate_flag; +/// uint32_t : 1 video_signal_type_present_flag; +/// uint32_t : 1 video_full_range_flag; +/// uint32_t : 1 colour_description_present_flag; +/// uint32_t : 1 chroma_loc_info_present_flag; +/// uint32_t : 1 neutral_chroma_indication_flag; +/// uint32_t : 1 field_seq_flag; +/// uint32_t : 1 frame_field_info_present_flag; +/// uint32_t : 1 default_display_window_flag; +/// uint32_t : 1 vui_timing_info_present_flag; +/// uint32_t : 1 vui_poc_proportional_to_timing_flag; +/// uint32_t : 1 vui_hrd_parameters_present_flag; +/// uint32_t : 1 bitstream_restriction_flag; +/// uint32_t : 1 tiles_fixed_structure_flag; +/// uint32_t : 1 motion_vectors_over_pic_boundaries_flag; +/// uint32_t : 1 restricted_ref_pic_lists_flag; +/// } StdVideoH265SpsVuiFlags; +/// ``` +public final class StdVideoH265SpsVuiFlags extends Struct { + /// The struct layout of `StdVideoH265SpsVuiFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("aspect_ratio_info_present_flag"), + ValueLayout.JAVA_INT.withName("overscan_info_present_flag"), + ValueLayout.JAVA_INT.withName("overscan_appropriate_flag"), + ValueLayout.JAVA_INT.withName("video_signal_type_present_flag"), + ValueLayout.JAVA_INT.withName("video_full_range_flag"), + ValueLayout.JAVA_INT.withName("colour_description_present_flag"), + ValueLayout.JAVA_INT.withName("chroma_loc_info_present_flag"), + ValueLayout.JAVA_INT.withName("neutral_chroma_indication_flag"), + ValueLayout.JAVA_INT.withName("field_seq_flag"), + ValueLayout.JAVA_INT.withName("frame_field_info_present_flag"), + ValueLayout.JAVA_INT.withName("default_display_window_flag"), + ValueLayout.JAVA_INT.withName("vui_timing_info_present_flag"), + ValueLayout.JAVA_INT.withName("vui_poc_proportional_to_timing_flag"), + ValueLayout.JAVA_INT.withName("vui_hrd_parameters_present_flag"), + ValueLayout.JAVA_INT.withName("bitstream_restriction_flag"), + ValueLayout.JAVA_INT.withName("tiles_fixed_structure_flag"), + ValueLayout.JAVA_INT.withName("motion_vectors_over_pic_boundaries_flag"), + ValueLayout.JAVA_INT.withName("restricted_ref_pic_lists_flag") + ); + /// The [VarHandle] of `aspect_ratio_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_aspect_ratio_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("aspect_ratio_info_present_flag")); + /// The [VarHandle] of `overscan_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_overscan_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("overscan_info_present_flag")); + /// The [VarHandle] of `overscan_appropriate_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_overscan_appropriate_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("overscan_appropriate_flag")); + /// The [VarHandle] of `video_signal_type_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_video_signal_type_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("video_signal_type_present_flag")); + /// The [VarHandle] of `video_full_range_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_video_full_range_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("video_full_range_flag")); + /// The [VarHandle] of `colour_description_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_colour_description_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("colour_description_present_flag")); + /// The [VarHandle] of `chroma_loc_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_chroma_loc_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("chroma_loc_info_present_flag")); + /// The [VarHandle] of `neutral_chroma_indication_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_neutral_chroma_indication_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("neutral_chroma_indication_flag")); + /// The [VarHandle] of `field_seq_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_field_seq_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("field_seq_flag")); + /// The [VarHandle] of `frame_field_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_frame_field_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("frame_field_info_present_flag")); + /// The [VarHandle] of `default_display_window_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_default_display_window_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("default_display_window_flag")); + /// The [VarHandle] of `vui_timing_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vui_timing_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vui_timing_info_present_flag")); + /// The [VarHandle] of `vui_poc_proportional_to_timing_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vui_poc_proportional_to_timing_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vui_poc_proportional_to_timing_flag")); + /// The [VarHandle] of `vui_hrd_parameters_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vui_hrd_parameters_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vui_hrd_parameters_present_flag")); + /// The [VarHandle] of `bitstream_restriction_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bitstream_restriction_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bitstream_restriction_flag")); + /// The [VarHandle] of `tiles_fixed_structure_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_tiles_fixed_structure_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("tiles_fixed_structure_flag")); + /// The [VarHandle] of `motion_vectors_over_pic_boundaries_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_motion_vectors_over_pic_boundaries_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("motion_vectors_over_pic_boundaries_flag")); + /// The [VarHandle] of `restricted_ref_pic_lists_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_restricted_ref_pic_lists_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("restricted_ref_pic_lists_flag")); + + /// Creates `StdVideoH265SpsVuiFlags` with the given segment. + /// @param segment the memory segment + public StdVideoH265SpsVuiFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265SpsVuiFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SpsVuiFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SpsVuiFlags(segment); } + + /// Creates `StdVideoH265SpsVuiFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SpsVuiFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SpsVuiFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265SpsVuiFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SpsVuiFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SpsVuiFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265SpsVuiFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265SpsVuiFlags` + public static StdVideoH265SpsVuiFlags alloc(SegmentAllocator allocator) { return new StdVideoH265SpsVuiFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265SpsVuiFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265SpsVuiFlags` + public static StdVideoH265SpsVuiFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoH265SpsVuiFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `aspect_ratio_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_aspect_ratio_info_present_flag(MemorySegment segment, long index) { return (int) VH_aspect_ratio_info_present_flag.get(segment, 0L, index); } + /// {@return `aspect_ratio_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_aspect_ratio_info_present_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_aspect_ratio_info_present_flag(segment, 0L); } + /// {@return `aspect_ratio_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int aspect_ratio_info_present_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_aspect_ratio_info_present_flag(this.segment(), index); } + /// {@return `aspect_ratio_info_present_flag`} + public @CType("uint32_t : 1") int aspect_ratio_info_present_flag() { return StdVideoH265SpsVuiFlags.get_aspect_ratio_info_present_flag(this.segment()); } + /// Sets `aspect_ratio_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_aspect_ratio_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_aspect_ratio_info_present_flag.set(segment, 0L, index, value); } + /// Sets `aspect_ratio_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_aspect_ratio_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_aspect_ratio_info_present_flag(segment, 0L, value); } + /// Sets `aspect_ratio_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags aspect_ratio_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_aspect_ratio_info_present_flag(this.segment(), index, value); return this; } + /// Sets `aspect_ratio_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags aspect_ratio_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_aspect_ratio_info_present_flag(this.segment(), value); return this; } + + /// {@return `overscan_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_overscan_info_present_flag(MemorySegment segment, long index) { return (int) VH_overscan_info_present_flag.get(segment, 0L, index); } + /// {@return `overscan_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_overscan_info_present_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_overscan_info_present_flag(segment, 0L); } + /// {@return `overscan_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int overscan_info_present_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_overscan_info_present_flag(this.segment(), index); } + /// {@return `overscan_info_present_flag`} + public @CType("uint32_t : 1") int overscan_info_present_flag() { return StdVideoH265SpsVuiFlags.get_overscan_info_present_flag(this.segment()); } + /// Sets `overscan_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_overscan_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_overscan_info_present_flag.set(segment, 0L, index, value); } + /// Sets `overscan_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_overscan_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_overscan_info_present_flag(segment, 0L, value); } + /// Sets `overscan_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags overscan_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_overscan_info_present_flag(this.segment(), index, value); return this; } + /// Sets `overscan_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags overscan_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_overscan_info_present_flag(this.segment(), value); return this; } + + /// {@return `overscan_appropriate_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_overscan_appropriate_flag(MemorySegment segment, long index) { return (int) VH_overscan_appropriate_flag.get(segment, 0L, index); } + /// {@return `overscan_appropriate_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_overscan_appropriate_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_overscan_appropriate_flag(segment, 0L); } + /// {@return `overscan_appropriate_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int overscan_appropriate_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_overscan_appropriate_flag(this.segment(), index); } + /// {@return `overscan_appropriate_flag`} + public @CType("uint32_t : 1") int overscan_appropriate_flag() { return StdVideoH265SpsVuiFlags.get_overscan_appropriate_flag(this.segment()); } + /// Sets `overscan_appropriate_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_overscan_appropriate_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_overscan_appropriate_flag.set(segment, 0L, index, value); } + /// Sets `overscan_appropriate_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_overscan_appropriate_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_overscan_appropriate_flag(segment, 0L, value); } + /// Sets `overscan_appropriate_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags overscan_appropriate_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_overscan_appropriate_flag(this.segment(), index, value); return this; } + /// Sets `overscan_appropriate_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags overscan_appropriate_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_overscan_appropriate_flag(this.segment(), value); return this; } + + /// {@return `video_signal_type_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_video_signal_type_present_flag(MemorySegment segment, long index) { return (int) VH_video_signal_type_present_flag.get(segment, 0L, index); } + /// {@return `video_signal_type_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_video_signal_type_present_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_video_signal_type_present_flag(segment, 0L); } + /// {@return `video_signal_type_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int video_signal_type_present_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_video_signal_type_present_flag(this.segment(), index); } + /// {@return `video_signal_type_present_flag`} + public @CType("uint32_t : 1") int video_signal_type_present_flag() { return StdVideoH265SpsVuiFlags.get_video_signal_type_present_flag(this.segment()); } + /// Sets `video_signal_type_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_video_signal_type_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_video_signal_type_present_flag.set(segment, 0L, index, value); } + /// Sets `video_signal_type_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_video_signal_type_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_video_signal_type_present_flag(segment, 0L, value); } + /// Sets `video_signal_type_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags video_signal_type_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_video_signal_type_present_flag(this.segment(), index, value); return this; } + /// Sets `video_signal_type_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags video_signal_type_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_video_signal_type_present_flag(this.segment(), value); return this; } + + /// {@return `video_full_range_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_video_full_range_flag(MemorySegment segment, long index) { return (int) VH_video_full_range_flag.get(segment, 0L, index); } + /// {@return `video_full_range_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_video_full_range_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_video_full_range_flag(segment, 0L); } + /// {@return `video_full_range_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int video_full_range_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_video_full_range_flag(this.segment(), index); } + /// {@return `video_full_range_flag`} + public @CType("uint32_t : 1") int video_full_range_flag() { return StdVideoH265SpsVuiFlags.get_video_full_range_flag(this.segment()); } + /// Sets `video_full_range_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_video_full_range_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_video_full_range_flag.set(segment, 0L, index, value); } + /// Sets `video_full_range_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_video_full_range_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_video_full_range_flag(segment, 0L, value); } + /// Sets `video_full_range_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags video_full_range_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_video_full_range_flag(this.segment(), index, value); return this; } + /// Sets `video_full_range_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags video_full_range_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_video_full_range_flag(this.segment(), value); return this; } + + /// {@return `colour_description_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_colour_description_present_flag(MemorySegment segment, long index) { return (int) VH_colour_description_present_flag.get(segment, 0L, index); } + /// {@return `colour_description_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_colour_description_present_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_colour_description_present_flag(segment, 0L); } + /// {@return `colour_description_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int colour_description_present_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_colour_description_present_flag(this.segment(), index); } + /// {@return `colour_description_present_flag`} + public @CType("uint32_t : 1") int colour_description_present_flag() { return StdVideoH265SpsVuiFlags.get_colour_description_present_flag(this.segment()); } + /// Sets `colour_description_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_colour_description_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_colour_description_present_flag.set(segment, 0L, index, value); } + /// Sets `colour_description_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_colour_description_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_colour_description_present_flag(segment, 0L, value); } + /// Sets `colour_description_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags colour_description_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_colour_description_present_flag(this.segment(), index, value); return this; } + /// Sets `colour_description_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags colour_description_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_colour_description_present_flag(this.segment(), value); return this; } + + /// {@return `chroma_loc_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_chroma_loc_info_present_flag(MemorySegment segment, long index) { return (int) VH_chroma_loc_info_present_flag.get(segment, 0L, index); } + /// {@return `chroma_loc_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_chroma_loc_info_present_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_chroma_loc_info_present_flag(segment, 0L); } + /// {@return `chroma_loc_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int chroma_loc_info_present_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_chroma_loc_info_present_flag(this.segment(), index); } + /// {@return `chroma_loc_info_present_flag`} + public @CType("uint32_t : 1") int chroma_loc_info_present_flag() { return StdVideoH265SpsVuiFlags.get_chroma_loc_info_present_flag(this.segment()); } + /// Sets `chroma_loc_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_chroma_loc_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_chroma_loc_info_present_flag.set(segment, 0L, index, value); } + /// Sets `chroma_loc_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_chroma_loc_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_chroma_loc_info_present_flag(segment, 0L, value); } + /// Sets `chroma_loc_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags chroma_loc_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_chroma_loc_info_present_flag(this.segment(), index, value); return this; } + /// Sets `chroma_loc_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags chroma_loc_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_chroma_loc_info_present_flag(this.segment(), value); return this; } + + /// {@return `neutral_chroma_indication_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_neutral_chroma_indication_flag(MemorySegment segment, long index) { return (int) VH_neutral_chroma_indication_flag.get(segment, 0L, index); } + /// {@return `neutral_chroma_indication_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_neutral_chroma_indication_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_neutral_chroma_indication_flag(segment, 0L); } + /// {@return `neutral_chroma_indication_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int neutral_chroma_indication_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_neutral_chroma_indication_flag(this.segment(), index); } + /// {@return `neutral_chroma_indication_flag`} + public @CType("uint32_t : 1") int neutral_chroma_indication_flag() { return StdVideoH265SpsVuiFlags.get_neutral_chroma_indication_flag(this.segment()); } + /// Sets `neutral_chroma_indication_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_neutral_chroma_indication_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_neutral_chroma_indication_flag.set(segment, 0L, index, value); } + /// Sets `neutral_chroma_indication_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_neutral_chroma_indication_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_neutral_chroma_indication_flag(segment, 0L, value); } + /// Sets `neutral_chroma_indication_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags neutral_chroma_indication_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_neutral_chroma_indication_flag(this.segment(), index, value); return this; } + /// Sets `neutral_chroma_indication_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags neutral_chroma_indication_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_neutral_chroma_indication_flag(this.segment(), value); return this; } + + /// {@return `field_seq_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_field_seq_flag(MemorySegment segment, long index) { return (int) VH_field_seq_flag.get(segment, 0L, index); } + /// {@return `field_seq_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_field_seq_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_field_seq_flag(segment, 0L); } + /// {@return `field_seq_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int field_seq_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_field_seq_flag(this.segment(), index); } + /// {@return `field_seq_flag`} + public @CType("uint32_t : 1") int field_seq_flag() { return StdVideoH265SpsVuiFlags.get_field_seq_flag(this.segment()); } + /// Sets `field_seq_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_field_seq_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_field_seq_flag.set(segment, 0L, index, value); } + /// Sets `field_seq_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_field_seq_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_field_seq_flag(segment, 0L, value); } + /// Sets `field_seq_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags field_seq_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_field_seq_flag(this.segment(), index, value); return this; } + /// Sets `field_seq_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags field_seq_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_field_seq_flag(this.segment(), value); return this; } + + /// {@return `frame_field_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_frame_field_info_present_flag(MemorySegment segment, long index) { return (int) VH_frame_field_info_present_flag.get(segment, 0L, index); } + /// {@return `frame_field_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_frame_field_info_present_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_frame_field_info_present_flag(segment, 0L); } + /// {@return `frame_field_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int frame_field_info_present_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_frame_field_info_present_flag(this.segment(), index); } + /// {@return `frame_field_info_present_flag`} + public @CType("uint32_t : 1") int frame_field_info_present_flag() { return StdVideoH265SpsVuiFlags.get_frame_field_info_present_flag(this.segment()); } + /// Sets `frame_field_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_frame_field_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_frame_field_info_present_flag.set(segment, 0L, index, value); } + /// Sets `frame_field_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_frame_field_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_frame_field_info_present_flag(segment, 0L, value); } + /// Sets `frame_field_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags frame_field_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_frame_field_info_present_flag(this.segment(), index, value); return this; } + /// Sets `frame_field_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags frame_field_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_frame_field_info_present_flag(this.segment(), value); return this; } + + /// {@return `default_display_window_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_default_display_window_flag(MemorySegment segment, long index) { return (int) VH_default_display_window_flag.get(segment, 0L, index); } + /// {@return `default_display_window_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_default_display_window_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_default_display_window_flag(segment, 0L); } + /// {@return `default_display_window_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int default_display_window_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_default_display_window_flag(this.segment(), index); } + /// {@return `default_display_window_flag`} + public @CType("uint32_t : 1") int default_display_window_flag() { return StdVideoH265SpsVuiFlags.get_default_display_window_flag(this.segment()); } + /// Sets `default_display_window_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_default_display_window_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_default_display_window_flag.set(segment, 0L, index, value); } + /// Sets `default_display_window_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_default_display_window_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_default_display_window_flag(segment, 0L, value); } + /// Sets `default_display_window_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags default_display_window_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_default_display_window_flag(this.segment(), index, value); return this; } + /// Sets `default_display_window_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags default_display_window_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_default_display_window_flag(this.segment(), value); return this; } + + /// {@return `vui_timing_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vui_timing_info_present_flag(MemorySegment segment, long index) { return (int) VH_vui_timing_info_present_flag.get(segment, 0L, index); } + /// {@return `vui_timing_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vui_timing_info_present_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_vui_timing_info_present_flag(segment, 0L); } + /// {@return `vui_timing_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vui_timing_info_present_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_vui_timing_info_present_flag(this.segment(), index); } + /// {@return `vui_timing_info_present_flag`} + public @CType("uint32_t : 1") int vui_timing_info_present_flag() { return StdVideoH265SpsVuiFlags.get_vui_timing_info_present_flag(this.segment()); } + /// Sets `vui_timing_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vui_timing_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vui_timing_info_present_flag.set(segment, 0L, index, value); } + /// Sets `vui_timing_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vui_timing_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_vui_timing_info_present_flag(segment, 0L, value); } + /// Sets `vui_timing_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags vui_timing_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_vui_timing_info_present_flag(this.segment(), index, value); return this; } + /// Sets `vui_timing_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags vui_timing_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_vui_timing_info_present_flag(this.segment(), value); return this; } + + /// {@return `vui_poc_proportional_to_timing_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vui_poc_proportional_to_timing_flag(MemorySegment segment, long index) { return (int) VH_vui_poc_proportional_to_timing_flag.get(segment, 0L, index); } + /// {@return `vui_poc_proportional_to_timing_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vui_poc_proportional_to_timing_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_vui_poc_proportional_to_timing_flag(segment, 0L); } + /// {@return `vui_poc_proportional_to_timing_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vui_poc_proportional_to_timing_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_vui_poc_proportional_to_timing_flag(this.segment(), index); } + /// {@return `vui_poc_proportional_to_timing_flag`} + public @CType("uint32_t : 1") int vui_poc_proportional_to_timing_flag() { return StdVideoH265SpsVuiFlags.get_vui_poc_proportional_to_timing_flag(this.segment()); } + /// Sets `vui_poc_proportional_to_timing_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vui_poc_proportional_to_timing_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vui_poc_proportional_to_timing_flag.set(segment, 0L, index, value); } + /// Sets `vui_poc_proportional_to_timing_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vui_poc_proportional_to_timing_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_vui_poc_proportional_to_timing_flag(segment, 0L, value); } + /// Sets `vui_poc_proportional_to_timing_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags vui_poc_proportional_to_timing_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_vui_poc_proportional_to_timing_flag(this.segment(), index, value); return this; } + /// Sets `vui_poc_proportional_to_timing_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags vui_poc_proportional_to_timing_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_vui_poc_proportional_to_timing_flag(this.segment(), value); return this; } + + /// {@return `vui_hrd_parameters_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vui_hrd_parameters_present_flag(MemorySegment segment, long index) { return (int) VH_vui_hrd_parameters_present_flag.get(segment, 0L, index); } + /// {@return `vui_hrd_parameters_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vui_hrd_parameters_present_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_vui_hrd_parameters_present_flag(segment, 0L); } + /// {@return `vui_hrd_parameters_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vui_hrd_parameters_present_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_vui_hrd_parameters_present_flag(this.segment(), index); } + /// {@return `vui_hrd_parameters_present_flag`} + public @CType("uint32_t : 1") int vui_hrd_parameters_present_flag() { return StdVideoH265SpsVuiFlags.get_vui_hrd_parameters_present_flag(this.segment()); } + /// Sets `vui_hrd_parameters_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vui_hrd_parameters_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vui_hrd_parameters_present_flag.set(segment, 0L, index, value); } + /// Sets `vui_hrd_parameters_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vui_hrd_parameters_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_vui_hrd_parameters_present_flag(segment, 0L, value); } + /// Sets `vui_hrd_parameters_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags vui_hrd_parameters_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_vui_hrd_parameters_present_flag(this.segment(), index, value); return this; } + /// Sets `vui_hrd_parameters_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags vui_hrd_parameters_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_vui_hrd_parameters_present_flag(this.segment(), value); return this; } + + /// {@return `bitstream_restriction_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_bitstream_restriction_flag(MemorySegment segment, long index) { return (int) VH_bitstream_restriction_flag.get(segment, 0L, index); } + /// {@return `bitstream_restriction_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_bitstream_restriction_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_bitstream_restriction_flag(segment, 0L); } + /// {@return `bitstream_restriction_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int bitstream_restriction_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_bitstream_restriction_flag(this.segment(), index); } + /// {@return `bitstream_restriction_flag`} + public @CType("uint32_t : 1") int bitstream_restriction_flag() { return StdVideoH265SpsVuiFlags.get_bitstream_restriction_flag(this.segment()); } + /// Sets `bitstream_restriction_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bitstream_restriction_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_bitstream_restriction_flag.set(segment, 0L, index, value); } + /// Sets `bitstream_restriction_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bitstream_restriction_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_bitstream_restriction_flag(segment, 0L, value); } + /// Sets `bitstream_restriction_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags bitstream_restriction_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_bitstream_restriction_flag(this.segment(), index, value); return this; } + /// Sets `bitstream_restriction_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags bitstream_restriction_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_bitstream_restriction_flag(this.segment(), value); return this; } + + /// {@return `tiles_fixed_structure_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_tiles_fixed_structure_flag(MemorySegment segment, long index) { return (int) VH_tiles_fixed_structure_flag.get(segment, 0L, index); } + /// {@return `tiles_fixed_structure_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_tiles_fixed_structure_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_tiles_fixed_structure_flag(segment, 0L); } + /// {@return `tiles_fixed_structure_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int tiles_fixed_structure_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_tiles_fixed_structure_flag(this.segment(), index); } + /// {@return `tiles_fixed_structure_flag`} + public @CType("uint32_t : 1") int tiles_fixed_structure_flag() { return StdVideoH265SpsVuiFlags.get_tiles_fixed_structure_flag(this.segment()); } + /// Sets `tiles_fixed_structure_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_tiles_fixed_structure_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_tiles_fixed_structure_flag.set(segment, 0L, index, value); } + /// Sets `tiles_fixed_structure_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_tiles_fixed_structure_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_tiles_fixed_structure_flag(segment, 0L, value); } + /// Sets `tiles_fixed_structure_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags tiles_fixed_structure_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_tiles_fixed_structure_flag(this.segment(), index, value); return this; } + /// Sets `tiles_fixed_structure_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags tiles_fixed_structure_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_tiles_fixed_structure_flag(this.segment(), value); return this; } + + /// {@return `motion_vectors_over_pic_boundaries_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_motion_vectors_over_pic_boundaries_flag(MemorySegment segment, long index) { return (int) VH_motion_vectors_over_pic_boundaries_flag.get(segment, 0L, index); } + /// {@return `motion_vectors_over_pic_boundaries_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_motion_vectors_over_pic_boundaries_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_motion_vectors_over_pic_boundaries_flag(segment, 0L); } + /// {@return `motion_vectors_over_pic_boundaries_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int motion_vectors_over_pic_boundaries_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_motion_vectors_over_pic_boundaries_flag(this.segment(), index); } + /// {@return `motion_vectors_over_pic_boundaries_flag`} + public @CType("uint32_t : 1") int motion_vectors_over_pic_boundaries_flag() { return StdVideoH265SpsVuiFlags.get_motion_vectors_over_pic_boundaries_flag(this.segment()); } + /// Sets `motion_vectors_over_pic_boundaries_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_motion_vectors_over_pic_boundaries_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_motion_vectors_over_pic_boundaries_flag.set(segment, 0L, index, value); } + /// Sets `motion_vectors_over_pic_boundaries_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_motion_vectors_over_pic_boundaries_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_motion_vectors_over_pic_boundaries_flag(segment, 0L, value); } + /// Sets `motion_vectors_over_pic_boundaries_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags motion_vectors_over_pic_boundaries_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_motion_vectors_over_pic_boundaries_flag(this.segment(), index, value); return this; } + /// Sets `motion_vectors_over_pic_boundaries_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags motion_vectors_over_pic_boundaries_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_motion_vectors_over_pic_boundaries_flag(this.segment(), value); return this; } + + /// {@return `restricted_ref_pic_lists_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_restricted_ref_pic_lists_flag(MemorySegment segment, long index) { return (int) VH_restricted_ref_pic_lists_flag.get(segment, 0L, index); } + /// {@return `restricted_ref_pic_lists_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_restricted_ref_pic_lists_flag(MemorySegment segment) { return StdVideoH265SpsVuiFlags.get_restricted_ref_pic_lists_flag(segment, 0L); } + /// {@return `restricted_ref_pic_lists_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int restricted_ref_pic_lists_flagAt(long index) { return StdVideoH265SpsVuiFlags.get_restricted_ref_pic_lists_flag(this.segment(), index); } + /// {@return `restricted_ref_pic_lists_flag`} + public @CType("uint32_t : 1") int restricted_ref_pic_lists_flag() { return StdVideoH265SpsVuiFlags.get_restricted_ref_pic_lists_flag(this.segment()); } + /// Sets `restricted_ref_pic_lists_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_restricted_ref_pic_lists_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_restricted_ref_pic_lists_flag.set(segment, 0L, index, value); } + /// Sets `restricted_ref_pic_lists_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_restricted_ref_pic_lists_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_restricted_ref_pic_lists_flag(segment, 0L, value); } + /// Sets `restricted_ref_pic_lists_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags restricted_ref_pic_lists_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_restricted_ref_pic_lists_flag(this.segment(), index, value); return this; } + /// Sets `restricted_ref_pic_lists_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SpsVuiFlags restricted_ref_pic_lists_flag(@CType("uint32_t : 1") int value) { StdVideoH265SpsVuiFlags.set_restricted_ref_pic_lists_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SubLayerHrdParameters.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SubLayerHrdParameters.java new file mode 100644 index 00000000..54ff991b --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265SubLayerHrdParameters.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### bit_rate_value_minus1 +/// [VarHandle][#VH_bit_rate_value_minus1] - [Getter][#bit_rate_value_minus1()] - [Setter][#bit_rate_value_minus1(int)] +/// ### cpb_size_value_minus1 +/// [VarHandle][#VH_cpb_size_value_minus1] - [Getter][#cpb_size_value_minus1()] - [Setter][#cpb_size_value_minus1(int)] +/// ### cpb_size_du_value_minus1 +/// [VarHandle][#VH_cpb_size_du_value_minus1] - [Getter][#cpb_size_du_value_minus1()] - [Setter][#cpb_size_du_value_minus1(int)] +/// ### bit_rate_du_value_minus1 +/// [VarHandle][#VH_bit_rate_du_value_minus1] - [Getter][#bit_rate_du_value_minus1()] - [Setter][#bit_rate_du_value_minus1(int)] +/// ### cbr_flag +/// [VarHandle][#VH_cbr_flag] - [Getter][#cbr_flag()] - [Setter][#cbr_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265SubLayerHrdParameters { +/// uint32_t [ ] bit_rate_value_minus1; +/// uint32_t [ ] cpb_size_value_minus1; +/// uint32_t [ ] cpb_size_du_value_minus1; +/// uint32_t [ ] bit_rate_du_value_minus1; +/// uint32_t cbr_flag; +/// } StdVideoH265SubLayerHrdParameters; +/// ``` +public final class StdVideoH265SubLayerHrdParameters extends Struct { + /// The struct layout of `StdVideoH265SubLayerHrdParameters`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("bit_rate_value_minus1"), + ValueLayout.JAVA_INT.withName("cpb_size_value_minus1"), + ValueLayout.JAVA_INT.withName("cpb_size_du_value_minus1"), + ValueLayout.JAVA_INT.withName("bit_rate_du_value_minus1"), + ValueLayout.JAVA_INT.withName("cbr_flag") + ); + /// The [VarHandle] of `bit_rate_value_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bit_rate_value_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bit_rate_value_minus1")); + /// The [VarHandle] of `cpb_size_value_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cpb_size_value_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cpb_size_value_minus1")); + /// The [VarHandle] of `cpb_size_du_value_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cpb_size_du_value_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cpb_size_du_value_minus1")); + /// The [VarHandle] of `bit_rate_du_value_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_bit_rate_du_value_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("bit_rate_du_value_minus1")); + /// The [VarHandle] of `cbr_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_cbr_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("cbr_flag")); + + /// Creates `StdVideoH265SubLayerHrdParameters` with the given segment. + /// @param segment the memory segment + public StdVideoH265SubLayerHrdParameters(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265SubLayerHrdParameters` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SubLayerHrdParameters of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SubLayerHrdParameters(segment); } + + /// Creates `StdVideoH265SubLayerHrdParameters` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SubLayerHrdParameters ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SubLayerHrdParameters(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265SubLayerHrdParameters` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265SubLayerHrdParameters ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265SubLayerHrdParameters(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265SubLayerHrdParameters` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265SubLayerHrdParameters` + public static StdVideoH265SubLayerHrdParameters alloc(SegmentAllocator allocator) { return new StdVideoH265SubLayerHrdParameters(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265SubLayerHrdParameters` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265SubLayerHrdParameters` + public static StdVideoH265SubLayerHrdParameters alloc(SegmentAllocator allocator, long count) { return new StdVideoH265SubLayerHrdParameters(allocator.allocate(LAYOUT, count)); } + + /// {@return `bit_rate_value_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t [ ]") int get_bit_rate_value_minus1(MemorySegment segment, long index) { return (int) VH_bit_rate_value_minus1.get(segment, 0L, index); } + /// {@return `bit_rate_value_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t [ ]") int get_bit_rate_value_minus1(MemorySegment segment) { return StdVideoH265SubLayerHrdParameters.get_bit_rate_value_minus1(segment, 0L); } + /// {@return `bit_rate_value_minus1` at the given index} + /// @param index the index + public @CType("uint32_t [ ]") int bit_rate_value_minus1At(long index) { return StdVideoH265SubLayerHrdParameters.get_bit_rate_value_minus1(this.segment(), index); } + /// {@return `bit_rate_value_minus1`} + public @CType("uint32_t [ ]") int bit_rate_value_minus1() { return StdVideoH265SubLayerHrdParameters.get_bit_rate_value_minus1(this.segment()); } + /// Sets `bit_rate_value_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bit_rate_value_minus1(MemorySegment segment, long index, @CType("uint32_t [ ]") int value) { VH_bit_rate_value_minus1.set(segment, 0L, index, value); } + /// Sets `bit_rate_value_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bit_rate_value_minus1(MemorySegment segment, @CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_bit_rate_value_minus1(segment, 0L, value); } + /// Sets `bit_rate_value_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SubLayerHrdParameters bit_rate_value_minus1At(long index, @CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_bit_rate_value_minus1(this.segment(), index, value); return this; } + /// Sets `bit_rate_value_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SubLayerHrdParameters bit_rate_value_minus1(@CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_bit_rate_value_minus1(this.segment(), value); return this; } + + /// {@return `cpb_size_value_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t [ ]") int get_cpb_size_value_minus1(MemorySegment segment, long index) { return (int) VH_cpb_size_value_minus1.get(segment, 0L, index); } + /// {@return `cpb_size_value_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t [ ]") int get_cpb_size_value_minus1(MemorySegment segment) { return StdVideoH265SubLayerHrdParameters.get_cpb_size_value_minus1(segment, 0L); } + /// {@return `cpb_size_value_minus1` at the given index} + /// @param index the index + public @CType("uint32_t [ ]") int cpb_size_value_minus1At(long index) { return StdVideoH265SubLayerHrdParameters.get_cpb_size_value_minus1(this.segment(), index); } + /// {@return `cpb_size_value_minus1`} + public @CType("uint32_t [ ]") int cpb_size_value_minus1() { return StdVideoH265SubLayerHrdParameters.get_cpb_size_value_minus1(this.segment()); } + /// Sets `cpb_size_value_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cpb_size_value_minus1(MemorySegment segment, long index, @CType("uint32_t [ ]") int value) { VH_cpb_size_value_minus1.set(segment, 0L, index, value); } + /// Sets `cpb_size_value_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cpb_size_value_minus1(MemorySegment segment, @CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_cpb_size_value_minus1(segment, 0L, value); } + /// Sets `cpb_size_value_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SubLayerHrdParameters cpb_size_value_minus1At(long index, @CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_cpb_size_value_minus1(this.segment(), index, value); return this; } + /// Sets `cpb_size_value_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SubLayerHrdParameters cpb_size_value_minus1(@CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_cpb_size_value_minus1(this.segment(), value); return this; } + + /// {@return `cpb_size_du_value_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t [ ]") int get_cpb_size_du_value_minus1(MemorySegment segment, long index) { return (int) VH_cpb_size_du_value_minus1.get(segment, 0L, index); } + /// {@return `cpb_size_du_value_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t [ ]") int get_cpb_size_du_value_minus1(MemorySegment segment) { return StdVideoH265SubLayerHrdParameters.get_cpb_size_du_value_minus1(segment, 0L); } + /// {@return `cpb_size_du_value_minus1` at the given index} + /// @param index the index + public @CType("uint32_t [ ]") int cpb_size_du_value_minus1At(long index) { return StdVideoH265SubLayerHrdParameters.get_cpb_size_du_value_minus1(this.segment(), index); } + /// {@return `cpb_size_du_value_minus1`} + public @CType("uint32_t [ ]") int cpb_size_du_value_minus1() { return StdVideoH265SubLayerHrdParameters.get_cpb_size_du_value_minus1(this.segment()); } + /// Sets `cpb_size_du_value_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cpb_size_du_value_minus1(MemorySegment segment, long index, @CType("uint32_t [ ]") int value) { VH_cpb_size_du_value_minus1.set(segment, 0L, index, value); } + /// Sets `cpb_size_du_value_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cpb_size_du_value_minus1(MemorySegment segment, @CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_cpb_size_du_value_minus1(segment, 0L, value); } + /// Sets `cpb_size_du_value_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SubLayerHrdParameters cpb_size_du_value_minus1At(long index, @CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_cpb_size_du_value_minus1(this.segment(), index, value); return this; } + /// Sets `cpb_size_du_value_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SubLayerHrdParameters cpb_size_du_value_minus1(@CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_cpb_size_du_value_minus1(this.segment(), value); return this; } + + /// {@return `bit_rate_du_value_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t [ ]") int get_bit_rate_du_value_minus1(MemorySegment segment, long index) { return (int) VH_bit_rate_du_value_minus1.get(segment, 0L, index); } + /// {@return `bit_rate_du_value_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t [ ]") int get_bit_rate_du_value_minus1(MemorySegment segment) { return StdVideoH265SubLayerHrdParameters.get_bit_rate_du_value_minus1(segment, 0L); } + /// {@return `bit_rate_du_value_minus1` at the given index} + /// @param index the index + public @CType("uint32_t [ ]") int bit_rate_du_value_minus1At(long index) { return StdVideoH265SubLayerHrdParameters.get_bit_rate_du_value_minus1(this.segment(), index); } + /// {@return `bit_rate_du_value_minus1`} + public @CType("uint32_t [ ]") int bit_rate_du_value_minus1() { return StdVideoH265SubLayerHrdParameters.get_bit_rate_du_value_minus1(this.segment()); } + /// Sets `bit_rate_du_value_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_bit_rate_du_value_minus1(MemorySegment segment, long index, @CType("uint32_t [ ]") int value) { VH_bit_rate_du_value_minus1.set(segment, 0L, index, value); } + /// Sets `bit_rate_du_value_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_bit_rate_du_value_minus1(MemorySegment segment, @CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_bit_rate_du_value_minus1(segment, 0L, value); } + /// Sets `bit_rate_du_value_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SubLayerHrdParameters bit_rate_du_value_minus1At(long index, @CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_bit_rate_du_value_minus1(this.segment(), index, value); return this; } + /// Sets `bit_rate_du_value_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SubLayerHrdParameters bit_rate_du_value_minus1(@CType("uint32_t [ ]") int value) { StdVideoH265SubLayerHrdParameters.set_bit_rate_du_value_minus1(this.segment(), value); return this; } + + /// {@return `cbr_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_cbr_flag(MemorySegment segment, long index) { return (int) VH_cbr_flag.get(segment, 0L, index); } + /// {@return `cbr_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_cbr_flag(MemorySegment segment) { return StdVideoH265SubLayerHrdParameters.get_cbr_flag(segment, 0L); } + /// {@return `cbr_flag` at the given index} + /// @param index the index + public @CType("uint32_t") int cbr_flagAt(long index) { return StdVideoH265SubLayerHrdParameters.get_cbr_flag(this.segment(), index); } + /// {@return `cbr_flag`} + public @CType("uint32_t") int cbr_flag() { return StdVideoH265SubLayerHrdParameters.get_cbr_flag(this.segment()); } + /// Sets `cbr_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_cbr_flag(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_cbr_flag.set(segment, 0L, index, value); } + /// Sets `cbr_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_cbr_flag(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265SubLayerHrdParameters.set_cbr_flag(segment, 0L, value); } + /// Sets `cbr_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265SubLayerHrdParameters cbr_flagAt(long index, @CType("uint32_t") int value) { StdVideoH265SubLayerHrdParameters.set_cbr_flag(this.segment(), index, value); return this; } + /// Sets `cbr_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265SubLayerHrdParameters cbr_flag(@CType("uint32_t") int value) { StdVideoH265SubLayerHrdParameters.set_cbr_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265VideoParameterSet.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265VideoParameterSet.java new file mode 100644 index 00000000..c5a2d341 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265VideoParameterSet.java @@ -0,0 +1,518 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### flags +/// [VarHandle][#VH_flags] - [Getter][#flags()] - [Setter][#flags(java.lang.foreign.MemorySegment)] +/// ### vps_video_parameter_set_id +/// [VarHandle][#VH_vps_video_parameter_set_id] - [Getter][#vps_video_parameter_set_id()] - [Setter][#vps_video_parameter_set_id(byte)] +/// ### vps_max_sub_layers_minus1 +/// [VarHandle][#VH_vps_max_sub_layers_minus1] - [Getter][#vps_max_sub_layers_minus1()] - [Setter][#vps_max_sub_layers_minus1(byte)] +/// ### reserved1 +/// [VarHandle][#VH_reserved1] - [Getter][#reserved1()] - [Setter][#reserved1(byte)] +/// ### reserved2 +/// [VarHandle][#VH_reserved2] - [Getter][#reserved2()] - [Setter][#reserved2(byte)] +/// ### vps_num_units_in_tick +/// [VarHandle][#VH_vps_num_units_in_tick] - [Getter][#vps_num_units_in_tick()] - [Setter][#vps_num_units_in_tick(int)] +/// ### vps_time_scale +/// [VarHandle][#VH_vps_time_scale] - [Getter][#vps_time_scale()] - [Setter][#vps_time_scale(int)] +/// ### vps_num_ticks_poc_diff_one_minus1 +/// [VarHandle][#VH_vps_num_ticks_poc_diff_one_minus1] - [Getter][#vps_num_ticks_poc_diff_one_minus1()] - [Setter][#vps_num_ticks_poc_diff_one_minus1(int)] +/// ### reserved3 +/// [VarHandle][#VH_reserved3] - [Getter][#reserved3()] - [Setter][#reserved3(int)] +/// ### pDecPicBufMgr +/// [VarHandle][#VH_pDecPicBufMgr] - [Getter][#pDecPicBufMgr()] - [Setter][#pDecPicBufMgr(java.lang.foreign.MemorySegment)] +/// ### pHrdParameters +/// [VarHandle][#VH_pHrdParameters] - [Getter][#pHrdParameters()] - [Setter][#pHrdParameters(java.lang.foreign.MemorySegment)] +/// ### pProfileTierLevel +/// [VarHandle][#VH_pProfileTierLevel] - [Getter][#pProfileTierLevel()] - [Setter][#pProfileTierLevel(java.lang.foreign.MemorySegment)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265VideoParameterSet { +/// StdVideoH265VpsFlags flags; +/// uint8_t vps_video_parameter_set_id; +/// uint8_t vps_max_sub_layers_minus1; +/// uint8_t reserved1; +/// uint8_t reserved2; +/// uint32_t vps_num_units_in_tick; +/// uint32_t vps_time_scale; +/// uint32_t vps_num_ticks_poc_diff_one_minus1; +/// uint32_t reserved3; +/// const StdVideoH265DecPicBufMgr * pDecPicBufMgr; +/// const StdVideoH265HrdParameters * pHrdParameters; +/// const StdVideoH265ProfileTierLevel * pProfileTierLevel; +/// } StdVideoH265VideoParameterSet; +/// ``` +public final class StdVideoH265VideoParameterSet extends Struct { + /// The struct layout of `StdVideoH265VideoParameterSet`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + StdVideoH265VpsFlags.LAYOUT.withName("flags"), + ValueLayout.JAVA_BYTE.withName("vps_video_parameter_set_id"), + ValueLayout.JAVA_BYTE.withName("vps_max_sub_layers_minus1"), + ValueLayout.JAVA_BYTE.withName("reserved1"), + ValueLayout.JAVA_BYTE.withName("reserved2"), + ValueLayout.JAVA_INT.withName("vps_num_units_in_tick"), + ValueLayout.JAVA_INT.withName("vps_time_scale"), + ValueLayout.JAVA_INT.withName("vps_num_ticks_poc_diff_one_minus1"), + ValueLayout.JAVA_INT.withName("reserved3"), + ValueLayout.ADDRESS.withName("pDecPicBufMgr"), + ValueLayout.ADDRESS.withName("pHrdParameters"), + ValueLayout.ADDRESS.withName("pProfileTierLevel") + ); + /// The [VarHandle] of `flags` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_flags = LAYOUT.arrayElementVarHandle(PathElement.groupElement("flags")); + /// The [VarHandle] of `vps_video_parameter_set_id` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_vps_video_parameter_set_id = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vps_video_parameter_set_id")); + /// The [VarHandle] of `vps_max_sub_layers_minus1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_vps_max_sub_layers_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vps_max_sub_layers_minus1")); + /// The [VarHandle] of `reserved1` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved1")); + /// The [VarHandle] of `reserved2` of type `(MemorySegment base, long baseOffset, long index)byte`. + public static final VarHandle VH_reserved2 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved2")); + /// The [VarHandle] of `vps_num_units_in_tick` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vps_num_units_in_tick = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vps_num_units_in_tick")); + /// The [VarHandle] of `vps_time_scale` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vps_time_scale = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vps_time_scale")); + /// The [VarHandle] of `vps_num_ticks_poc_diff_one_minus1` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vps_num_ticks_poc_diff_one_minus1 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vps_num_ticks_poc_diff_one_minus1")); + /// The [VarHandle] of `reserved3` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_reserved3 = LAYOUT.arrayElementVarHandle(PathElement.groupElement("reserved3")); + /// The [VarHandle] of `pDecPicBufMgr` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pDecPicBufMgr = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pDecPicBufMgr")); + /// The [VarHandle] of `pHrdParameters` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pHrdParameters = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pHrdParameters")); + /// The [VarHandle] of `pProfileTierLevel` of type `(MemorySegment base, long baseOffset, long index)java.lang.foreign.MemorySegment`. + public static final VarHandle VH_pProfileTierLevel = LAYOUT.arrayElementVarHandle(PathElement.groupElement("pProfileTierLevel")); + + /// Creates `StdVideoH265VideoParameterSet` with the given segment. + /// @param segment the memory segment + public StdVideoH265VideoParameterSet(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265VideoParameterSet` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265VideoParameterSet of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265VideoParameterSet(segment); } + + /// Creates `StdVideoH265VideoParameterSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265VideoParameterSet ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265VideoParameterSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265VideoParameterSet` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265VideoParameterSet ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265VideoParameterSet(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265VideoParameterSet` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265VideoParameterSet` + public static StdVideoH265VideoParameterSet alloc(SegmentAllocator allocator) { return new StdVideoH265VideoParameterSet(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265VideoParameterSet` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265VideoParameterSet` + public static StdVideoH265VideoParameterSet alloc(SegmentAllocator allocator, long count) { return new StdVideoH265VideoParameterSet(allocator.allocate(LAYOUT, count)); } + + /// {@return `flags` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("StdVideoH265VpsFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_flags.get(segment, 0L, index); } + /// {@return `flags`} + /// @param segment the segment of the struct + public static @CType("StdVideoH265VpsFlags") java.lang.foreign.MemorySegment get_flags(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_flags(segment, 0L); } + /// {@return `flags` at the given index} + /// @param index the index + public @CType("StdVideoH265VpsFlags") java.lang.foreign.MemorySegment flagsAt(long index) { return StdVideoH265VideoParameterSet.get_flags(this.segment(), index); } + /// {@return `flags`} + public @CType("StdVideoH265VpsFlags") java.lang.foreign.MemorySegment flags() { return StdVideoH265VideoParameterSet.get_flags(this.segment()); } + /// Sets `flags` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_flags(MemorySegment segment, long index, @CType("StdVideoH265VpsFlags") java.lang.foreign.MemorySegment value) { VH_flags.set(segment, 0L, index, value); } + /// Sets `flags` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_flags(MemorySegment segment, @CType("StdVideoH265VpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_flags(segment, 0L, value); } + /// Sets `flags` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet flagsAt(long index, @CType("StdVideoH265VpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_flags(this.segment(), index, value); return this; } + /// Sets `flags` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet flags(@CType("StdVideoH265VpsFlags") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_flags(this.segment(), value); return this; } + + /// {@return `vps_video_parameter_set_id` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_vps_video_parameter_set_id(MemorySegment segment, long index) { return (byte) VH_vps_video_parameter_set_id.get(segment, 0L, index); } + /// {@return `vps_video_parameter_set_id`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_vps_video_parameter_set_id(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_vps_video_parameter_set_id(segment, 0L); } + /// {@return `vps_video_parameter_set_id` at the given index} + /// @param index the index + public @CType("uint8_t") byte vps_video_parameter_set_idAt(long index) { return StdVideoH265VideoParameterSet.get_vps_video_parameter_set_id(this.segment(), index); } + /// {@return `vps_video_parameter_set_id`} + public @CType("uint8_t") byte vps_video_parameter_set_id() { return StdVideoH265VideoParameterSet.get_vps_video_parameter_set_id(this.segment()); } + /// Sets `vps_video_parameter_set_id` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vps_video_parameter_set_id(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_vps_video_parameter_set_id.set(segment, 0L, index, value); } + /// Sets `vps_video_parameter_set_id` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vps_video_parameter_set_id(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_vps_video_parameter_set_id(segment, 0L, value); } + /// Sets `vps_video_parameter_set_id` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet vps_video_parameter_set_idAt(long index, @CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_vps_video_parameter_set_id(this.segment(), index, value); return this; } + /// Sets `vps_video_parameter_set_id` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet vps_video_parameter_set_id(@CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_vps_video_parameter_set_id(this.segment(), value); return this; } + + /// {@return `vps_max_sub_layers_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_vps_max_sub_layers_minus1(MemorySegment segment, long index) { return (byte) VH_vps_max_sub_layers_minus1.get(segment, 0L, index); } + /// {@return `vps_max_sub_layers_minus1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_vps_max_sub_layers_minus1(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_vps_max_sub_layers_minus1(segment, 0L); } + /// {@return `vps_max_sub_layers_minus1` at the given index} + /// @param index the index + public @CType("uint8_t") byte vps_max_sub_layers_minus1At(long index) { return StdVideoH265VideoParameterSet.get_vps_max_sub_layers_minus1(this.segment(), index); } + /// {@return `vps_max_sub_layers_minus1`} + public @CType("uint8_t") byte vps_max_sub_layers_minus1() { return StdVideoH265VideoParameterSet.get_vps_max_sub_layers_minus1(this.segment()); } + /// Sets `vps_max_sub_layers_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vps_max_sub_layers_minus1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_vps_max_sub_layers_minus1.set(segment, 0L, index, value); } + /// Sets `vps_max_sub_layers_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vps_max_sub_layers_minus1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_vps_max_sub_layers_minus1(segment, 0L, value); } + /// Sets `vps_max_sub_layers_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet vps_max_sub_layers_minus1At(long index, @CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_vps_max_sub_layers_minus1(this.segment(), index, value); return this; } + /// Sets `vps_max_sub_layers_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet vps_max_sub_layers_minus1(@CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_vps_max_sub_layers_minus1(this.segment(), value); return this; } + + /// {@return `reserved1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment, long index) { return (byte) VH_reserved1.get(segment, 0L, index); } + /// {@return `reserved1`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved1(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_reserved1(segment, 0L); } + /// {@return `reserved1` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved1At(long index) { return StdVideoH265VideoParameterSet.get_reserved1(this.segment(), index); } + /// {@return `reserved1`} + public @CType("uint8_t") byte reserved1() { return StdVideoH265VideoParameterSet.get_reserved1(this.segment()); } + /// Sets `reserved1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved1(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved1.set(segment, 0L, index, value); } + /// Sets `reserved1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved1(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_reserved1(segment, 0L, value); } + /// Sets `reserved1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet reserved1At(long index, @CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_reserved1(this.segment(), index, value); return this; } + /// Sets `reserved1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet reserved1(@CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_reserved1(this.segment(), value); return this; } + + /// {@return `reserved2` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment, long index) { return (byte) VH_reserved2.get(segment, 0L, index); } + /// {@return `reserved2`} + /// @param segment the segment of the struct + public static @CType("uint8_t") byte get_reserved2(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_reserved2(segment, 0L); } + /// {@return `reserved2` at the given index} + /// @param index the index + public @CType("uint8_t") byte reserved2At(long index) { return StdVideoH265VideoParameterSet.get_reserved2(this.segment(), index); } + /// {@return `reserved2`} + public @CType("uint8_t") byte reserved2() { return StdVideoH265VideoParameterSet.get_reserved2(this.segment()); } + /// Sets `reserved2` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved2(MemorySegment segment, long index, @CType("uint8_t") byte value) { VH_reserved2.set(segment, 0L, index, value); } + /// Sets `reserved2` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved2(MemorySegment segment, @CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_reserved2(segment, 0L, value); } + /// Sets `reserved2` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet reserved2At(long index, @CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_reserved2(this.segment(), index, value); return this; } + /// Sets `reserved2` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet reserved2(@CType("uint8_t") byte value) { StdVideoH265VideoParameterSet.set_reserved2(this.segment(), value); return this; } + + /// {@return `vps_num_units_in_tick` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vps_num_units_in_tick(MemorySegment segment, long index) { return (int) VH_vps_num_units_in_tick.get(segment, 0L, index); } + /// {@return `vps_num_units_in_tick`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vps_num_units_in_tick(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_vps_num_units_in_tick(segment, 0L); } + /// {@return `vps_num_units_in_tick` at the given index} + /// @param index the index + public @CType("uint32_t") int vps_num_units_in_tickAt(long index) { return StdVideoH265VideoParameterSet.get_vps_num_units_in_tick(this.segment(), index); } + /// {@return `vps_num_units_in_tick`} + public @CType("uint32_t") int vps_num_units_in_tick() { return StdVideoH265VideoParameterSet.get_vps_num_units_in_tick(this.segment()); } + /// Sets `vps_num_units_in_tick` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vps_num_units_in_tick(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vps_num_units_in_tick.set(segment, 0L, index, value); } + /// Sets `vps_num_units_in_tick` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vps_num_units_in_tick(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_vps_num_units_in_tick(segment, 0L, value); } + /// Sets `vps_num_units_in_tick` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet vps_num_units_in_tickAt(long index, @CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_vps_num_units_in_tick(this.segment(), index, value); return this; } + /// Sets `vps_num_units_in_tick` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet vps_num_units_in_tick(@CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_vps_num_units_in_tick(this.segment(), value); return this; } + + /// {@return `vps_time_scale` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vps_time_scale(MemorySegment segment, long index) { return (int) VH_vps_time_scale.get(segment, 0L, index); } + /// {@return `vps_time_scale`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vps_time_scale(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_vps_time_scale(segment, 0L); } + /// {@return `vps_time_scale` at the given index} + /// @param index the index + public @CType("uint32_t") int vps_time_scaleAt(long index) { return StdVideoH265VideoParameterSet.get_vps_time_scale(this.segment(), index); } + /// {@return `vps_time_scale`} + public @CType("uint32_t") int vps_time_scale() { return StdVideoH265VideoParameterSet.get_vps_time_scale(this.segment()); } + /// Sets `vps_time_scale` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vps_time_scale(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vps_time_scale.set(segment, 0L, index, value); } + /// Sets `vps_time_scale` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vps_time_scale(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_vps_time_scale(segment, 0L, value); } + /// Sets `vps_time_scale` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet vps_time_scaleAt(long index, @CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_vps_time_scale(this.segment(), index, value); return this; } + /// Sets `vps_time_scale` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet vps_time_scale(@CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_vps_time_scale(this.segment(), value); return this; } + + /// {@return `vps_num_ticks_poc_diff_one_minus1` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_vps_num_ticks_poc_diff_one_minus1(MemorySegment segment, long index) { return (int) VH_vps_num_ticks_poc_diff_one_minus1.get(segment, 0L, index); } + /// {@return `vps_num_ticks_poc_diff_one_minus1`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_vps_num_ticks_poc_diff_one_minus1(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_vps_num_ticks_poc_diff_one_minus1(segment, 0L); } + /// {@return `vps_num_ticks_poc_diff_one_minus1` at the given index} + /// @param index the index + public @CType("uint32_t") int vps_num_ticks_poc_diff_one_minus1At(long index) { return StdVideoH265VideoParameterSet.get_vps_num_ticks_poc_diff_one_minus1(this.segment(), index); } + /// {@return `vps_num_ticks_poc_diff_one_minus1`} + public @CType("uint32_t") int vps_num_ticks_poc_diff_one_minus1() { return StdVideoH265VideoParameterSet.get_vps_num_ticks_poc_diff_one_minus1(this.segment()); } + /// Sets `vps_num_ticks_poc_diff_one_minus1` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vps_num_ticks_poc_diff_one_minus1(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_vps_num_ticks_poc_diff_one_minus1.set(segment, 0L, index, value); } + /// Sets `vps_num_ticks_poc_diff_one_minus1` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vps_num_ticks_poc_diff_one_minus1(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_vps_num_ticks_poc_diff_one_minus1(segment, 0L, value); } + /// Sets `vps_num_ticks_poc_diff_one_minus1` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet vps_num_ticks_poc_diff_one_minus1At(long index, @CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_vps_num_ticks_poc_diff_one_minus1(this.segment(), index, value); return this; } + /// Sets `vps_num_ticks_poc_diff_one_minus1` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet vps_num_ticks_poc_diff_one_minus1(@CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_vps_num_ticks_poc_diff_one_minus1(this.segment(), value); return this; } + + /// {@return `reserved3` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t") int get_reserved3(MemorySegment segment, long index) { return (int) VH_reserved3.get(segment, 0L, index); } + /// {@return `reserved3`} + /// @param segment the segment of the struct + public static @CType("uint32_t") int get_reserved3(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_reserved3(segment, 0L); } + /// {@return `reserved3` at the given index} + /// @param index the index + public @CType("uint32_t") int reserved3At(long index) { return StdVideoH265VideoParameterSet.get_reserved3(this.segment(), index); } + /// {@return `reserved3`} + public @CType("uint32_t") int reserved3() { return StdVideoH265VideoParameterSet.get_reserved3(this.segment()); } + /// Sets `reserved3` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_reserved3(MemorySegment segment, long index, @CType("uint32_t") int value) { VH_reserved3.set(segment, 0L, index, value); } + /// Sets `reserved3` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_reserved3(MemorySegment segment, @CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_reserved3(segment, 0L, value); } + /// Sets `reserved3` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet reserved3At(long index, @CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_reserved3(this.segment(), index, value); return this; } + /// Sets `reserved3` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet reserved3(@CType("uint32_t") int value) { StdVideoH265VideoParameterSet.set_reserved3(this.segment(), value); return this; } + + /// {@return `pDecPicBufMgr` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment get_pDecPicBufMgr(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pDecPicBufMgr.get(segment, 0L, index); } + /// {@return `pDecPicBufMgr`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment get_pDecPicBufMgr(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_pDecPicBufMgr(segment, 0L); } + /// {@return `pDecPicBufMgr` at the given index} + /// @param index the index + public @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment pDecPicBufMgrAt(long index) { return StdVideoH265VideoParameterSet.get_pDecPicBufMgr(this.segment(), index); } + /// {@return `pDecPicBufMgr`} + public @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment pDecPicBufMgr() { return StdVideoH265VideoParameterSet.get_pDecPicBufMgr(this.segment()); } + /// Sets `pDecPicBufMgr` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pDecPicBufMgr(MemorySegment segment, long index, @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment value) { VH_pDecPicBufMgr.set(segment, 0L, index, value); } + /// Sets `pDecPicBufMgr` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pDecPicBufMgr(MemorySegment segment, @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_pDecPicBufMgr(segment, 0L, value); } + /// Sets `pDecPicBufMgr` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet pDecPicBufMgrAt(long index, @CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_pDecPicBufMgr(this.segment(), index, value); return this; } + /// Sets `pDecPicBufMgr` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet pDecPicBufMgr(@CType("const StdVideoH265DecPicBufMgr *") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_pDecPicBufMgr(this.segment(), value); return this; } + + /// {@return `pHrdParameters` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment get_pHrdParameters(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pHrdParameters.get(segment, 0L, index); } + /// {@return `pHrdParameters`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment get_pHrdParameters(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_pHrdParameters(segment, 0L); } + /// {@return `pHrdParameters` at the given index} + /// @param index the index + public @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment pHrdParametersAt(long index) { return StdVideoH265VideoParameterSet.get_pHrdParameters(this.segment(), index); } + /// {@return `pHrdParameters`} + public @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment pHrdParameters() { return StdVideoH265VideoParameterSet.get_pHrdParameters(this.segment()); } + /// Sets `pHrdParameters` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pHrdParameters(MemorySegment segment, long index, @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment value) { VH_pHrdParameters.set(segment, 0L, index, value); } + /// Sets `pHrdParameters` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pHrdParameters(MemorySegment segment, @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_pHrdParameters(segment, 0L, value); } + /// Sets `pHrdParameters` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet pHrdParametersAt(long index, @CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_pHrdParameters(this.segment(), index, value); return this; } + /// Sets `pHrdParameters` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet pHrdParameters(@CType("const StdVideoH265HrdParameters *") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_pHrdParameters(this.segment(), value); return this; } + + /// {@return `pProfileTierLevel` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment get_pProfileTierLevel(MemorySegment segment, long index) { return (java.lang.foreign.MemorySegment) VH_pProfileTierLevel.get(segment, 0L, index); } + /// {@return `pProfileTierLevel`} + /// @param segment the segment of the struct + public static @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment get_pProfileTierLevel(MemorySegment segment) { return StdVideoH265VideoParameterSet.get_pProfileTierLevel(segment, 0L); } + /// {@return `pProfileTierLevel` at the given index} + /// @param index the index + public @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment pProfileTierLevelAt(long index) { return StdVideoH265VideoParameterSet.get_pProfileTierLevel(this.segment(), index); } + /// {@return `pProfileTierLevel`} + public @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment pProfileTierLevel() { return StdVideoH265VideoParameterSet.get_pProfileTierLevel(this.segment()); } + /// Sets `pProfileTierLevel` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_pProfileTierLevel(MemorySegment segment, long index, @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment value) { VH_pProfileTierLevel.set(segment, 0L, index, value); } + /// Sets `pProfileTierLevel` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_pProfileTierLevel(MemorySegment segment, @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_pProfileTierLevel(segment, 0L, value); } + /// Sets `pProfileTierLevel` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet pProfileTierLevelAt(long index, @CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_pProfileTierLevel(this.segment(), index, value); return this; } + /// Sets `pProfileTierLevel` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VideoParameterSet pProfileTierLevel(@CType("const StdVideoH265ProfileTierLevel *") java.lang.foreign.MemorySegment value) { StdVideoH265VideoParameterSet.set_pProfileTierLevel(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265VpsFlags.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265VpsFlags.java new file mode 100644 index 00000000..01ab9af0 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/StdVideoH265VpsFlags.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; + +import java.lang.foreign.*; +import java.lang.foreign.MemoryLayout.PathElement; +import java.lang.invoke.*; +import overrungl.annotation.*; +import overrungl.struct.*; +import overrungl.util.*; + +/// ## Members +/// ### vps_temporal_id_nesting_flag +/// [VarHandle][#VH_vps_temporal_id_nesting_flag] - [Getter][#vps_temporal_id_nesting_flag()] - [Setter][#vps_temporal_id_nesting_flag(int)] +/// ### vps_sub_layer_ordering_info_present_flag +/// [VarHandle][#VH_vps_sub_layer_ordering_info_present_flag] - [Getter][#vps_sub_layer_ordering_info_present_flag()] - [Setter][#vps_sub_layer_ordering_info_present_flag(int)] +/// ### vps_timing_info_present_flag +/// [VarHandle][#VH_vps_timing_info_present_flag] - [Getter][#vps_timing_info_present_flag()] - [Setter][#vps_timing_info_present_flag(int)] +/// ### vps_poc_proportional_to_timing_flag +/// [VarHandle][#VH_vps_poc_proportional_to_timing_flag] - [Getter][#vps_poc_proportional_to_timing_flag()] - [Setter][#vps_poc_proportional_to_timing_flag(int)] +/// ## Layout +/// [Java definition][#LAYOUT] +/// ```c +/// typedef struct StdVideoH265VpsFlags { +/// uint32_t : 1 vps_temporal_id_nesting_flag; +/// uint32_t : 1 vps_sub_layer_ordering_info_present_flag; +/// uint32_t : 1 vps_timing_info_present_flag; +/// uint32_t : 1 vps_poc_proportional_to_timing_flag; +/// } StdVideoH265VpsFlags; +/// ``` +public final class StdVideoH265VpsFlags extends Struct { + /// The struct layout of `StdVideoH265VpsFlags`. + public static final StructLayout LAYOUT = LayoutBuilder.struct( + ValueLayout.JAVA_INT.withName("vps_temporal_id_nesting_flag"), + ValueLayout.JAVA_INT.withName("vps_sub_layer_ordering_info_present_flag"), + ValueLayout.JAVA_INT.withName("vps_timing_info_present_flag"), + ValueLayout.JAVA_INT.withName("vps_poc_proportional_to_timing_flag") + ); + /// The [VarHandle] of `vps_temporal_id_nesting_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vps_temporal_id_nesting_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vps_temporal_id_nesting_flag")); + /// The [VarHandle] of `vps_sub_layer_ordering_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vps_sub_layer_ordering_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vps_sub_layer_ordering_info_present_flag")); + /// The [VarHandle] of `vps_timing_info_present_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vps_timing_info_present_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vps_timing_info_present_flag")); + /// The [VarHandle] of `vps_poc_proportional_to_timing_flag` of type `(MemorySegment base, long baseOffset, long index)int`. + public static final VarHandle VH_vps_poc_proportional_to_timing_flag = LAYOUT.arrayElementVarHandle(PathElement.groupElement("vps_poc_proportional_to_timing_flag")); + + /// Creates `StdVideoH265VpsFlags` with the given segment. + /// @param segment the memory segment + public StdVideoH265VpsFlags(MemorySegment segment) { super(segment, LAYOUT); } + + /// Creates `StdVideoH265VpsFlags` with the given segment. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265VpsFlags of(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265VpsFlags(segment); } + + /// Creates `StdVideoH265VpsFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265VpsFlags ofNative(MemorySegment segment) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265VpsFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.byteSize()) : segment); } + + /// Creates `StdVideoH265VpsFlags` with the given segment. + /// + /// Reinterprets the segment if zero-length. + /// @param segment the memory segment + /// @param count the count of the buffer + /// @return the created instance or `null` if the segment is `NULL` + public static StdVideoH265VpsFlags ofNative(MemorySegment segment, long count) { return Unmarshal.isNullPointer(segment) ? null : new StdVideoH265VpsFlags(segment.byteSize() == 0 ? segment.reinterpret(LAYOUT.scale(0, count)) : segment); } + + /// Allocates a `StdVideoH265VpsFlags` with the given segment allocator. + /// @param allocator the segment allocator + /// @return the allocated `StdVideoH265VpsFlags` + public static StdVideoH265VpsFlags alloc(SegmentAllocator allocator) { return new StdVideoH265VpsFlags(allocator.allocate(LAYOUT)); } + + /// Allocates a `StdVideoH265VpsFlags` with the given segment allocator and count. + /// @param allocator the segment allocator + /// @param count the count + /// @return the allocated `StdVideoH265VpsFlags` + public static StdVideoH265VpsFlags alloc(SegmentAllocator allocator, long count) { return new StdVideoH265VpsFlags(allocator.allocate(LAYOUT, count)); } + + /// {@return `vps_temporal_id_nesting_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vps_temporal_id_nesting_flag(MemorySegment segment, long index) { return (int) VH_vps_temporal_id_nesting_flag.get(segment, 0L, index); } + /// {@return `vps_temporal_id_nesting_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vps_temporal_id_nesting_flag(MemorySegment segment) { return StdVideoH265VpsFlags.get_vps_temporal_id_nesting_flag(segment, 0L); } + /// {@return `vps_temporal_id_nesting_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vps_temporal_id_nesting_flagAt(long index) { return StdVideoH265VpsFlags.get_vps_temporal_id_nesting_flag(this.segment(), index); } + /// {@return `vps_temporal_id_nesting_flag`} + public @CType("uint32_t : 1") int vps_temporal_id_nesting_flag() { return StdVideoH265VpsFlags.get_vps_temporal_id_nesting_flag(this.segment()); } + /// Sets `vps_temporal_id_nesting_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vps_temporal_id_nesting_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vps_temporal_id_nesting_flag.set(segment, 0L, index, value); } + /// Sets `vps_temporal_id_nesting_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vps_temporal_id_nesting_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_temporal_id_nesting_flag(segment, 0L, value); } + /// Sets `vps_temporal_id_nesting_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VpsFlags vps_temporal_id_nesting_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_temporal_id_nesting_flag(this.segment(), index, value); return this; } + /// Sets `vps_temporal_id_nesting_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VpsFlags vps_temporal_id_nesting_flag(@CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_temporal_id_nesting_flag(this.segment(), value); return this; } + + /// {@return `vps_sub_layer_ordering_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vps_sub_layer_ordering_info_present_flag(MemorySegment segment, long index) { return (int) VH_vps_sub_layer_ordering_info_present_flag.get(segment, 0L, index); } + /// {@return `vps_sub_layer_ordering_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vps_sub_layer_ordering_info_present_flag(MemorySegment segment) { return StdVideoH265VpsFlags.get_vps_sub_layer_ordering_info_present_flag(segment, 0L); } + /// {@return `vps_sub_layer_ordering_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vps_sub_layer_ordering_info_present_flagAt(long index) { return StdVideoH265VpsFlags.get_vps_sub_layer_ordering_info_present_flag(this.segment(), index); } + /// {@return `vps_sub_layer_ordering_info_present_flag`} + public @CType("uint32_t : 1") int vps_sub_layer_ordering_info_present_flag() { return StdVideoH265VpsFlags.get_vps_sub_layer_ordering_info_present_flag(this.segment()); } + /// Sets `vps_sub_layer_ordering_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vps_sub_layer_ordering_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vps_sub_layer_ordering_info_present_flag.set(segment, 0L, index, value); } + /// Sets `vps_sub_layer_ordering_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vps_sub_layer_ordering_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_sub_layer_ordering_info_present_flag(segment, 0L, value); } + /// Sets `vps_sub_layer_ordering_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VpsFlags vps_sub_layer_ordering_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_sub_layer_ordering_info_present_flag(this.segment(), index, value); return this; } + /// Sets `vps_sub_layer_ordering_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VpsFlags vps_sub_layer_ordering_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_sub_layer_ordering_info_present_flag(this.segment(), value); return this; } + + /// {@return `vps_timing_info_present_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vps_timing_info_present_flag(MemorySegment segment, long index) { return (int) VH_vps_timing_info_present_flag.get(segment, 0L, index); } + /// {@return `vps_timing_info_present_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vps_timing_info_present_flag(MemorySegment segment) { return StdVideoH265VpsFlags.get_vps_timing_info_present_flag(segment, 0L); } + /// {@return `vps_timing_info_present_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vps_timing_info_present_flagAt(long index) { return StdVideoH265VpsFlags.get_vps_timing_info_present_flag(this.segment(), index); } + /// {@return `vps_timing_info_present_flag`} + public @CType("uint32_t : 1") int vps_timing_info_present_flag() { return StdVideoH265VpsFlags.get_vps_timing_info_present_flag(this.segment()); } + /// Sets `vps_timing_info_present_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vps_timing_info_present_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vps_timing_info_present_flag.set(segment, 0L, index, value); } + /// Sets `vps_timing_info_present_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vps_timing_info_present_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_timing_info_present_flag(segment, 0L, value); } + /// Sets `vps_timing_info_present_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VpsFlags vps_timing_info_present_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_timing_info_present_flag(this.segment(), index, value); return this; } + /// Sets `vps_timing_info_present_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VpsFlags vps_timing_info_present_flag(@CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_timing_info_present_flag(this.segment(), value); return this; } + + /// {@return `vps_poc_proportional_to_timing_flag` at the given index} + /// @param segment the segment of the struct + /// @param index the index + public static @CType("uint32_t : 1") int get_vps_poc_proportional_to_timing_flag(MemorySegment segment, long index) { return (int) VH_vps_poc_proportional_to_timing_flag.get(segment, 0L, index); } + /// {@return `vps_poc_proportional_to_timing_flag`} + /// @param segment the segment of the struct + public static @CType("uint32_t : 1") int get_vps_poc_proportional_to_timing_flag(MemorySegment segment) { return StdVideoH265VpsFlags.get_vps_poc_proportional_to_timing_flag(segment, 0L); } + /// {@return `vps_poc_proportional_to_timing_flag` at the given index} + /// @param index the index + public @CType("uint32_t : 1") int vps_poc_proportional_to_timing_flagAt(long index) { return StdVideoH265VpsFlags.get_vps_poc_proportional_to_timing_flag(this.segment(), index); } + /// {@return `vps_poc_proportional_to_timing_flag`} + public @CType("uint32_t : 1") int vps_poc_proportional_to_timing_flag() { return StdVideoH265VpsFlags.get_vps_poc_proportional_to_timing_flag(this.segment()); } + /// Sets `vps_poc_proportional_to_timing_flag` with the given value at the given index. + /// @param segment the segment of the struct + /// @param index the index + /// @param value the value + public static void set_vps_poc_proportional_to_timing_flag(MemorySegment segment, long index, @CType("uint32_t : 1") int value) { VH_vps_poc_proportional_to_timing_flag.set(segment, 0L, index, value); } + /// Sets `vps_poc_proportional_to_timing_flag` with the given value. + /// @param segment the segment of the struct + /// @param value the value + public static void set_vps_poc_proportional_to_timing_flag(MemorySegment segment, @CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_poc_proportional_to_timing_flag(segment, 0L, value); } + /// Sets `vps_poc_proportional_to_timing_flag` with the given value at the given index. + /// @param index the index + /// @param value the value + /// @return `this` + public StdVideoH265VpsFlags vps_poc_proportional_to_timing_flagAt(long index, @CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_poc_proportional_to_timing_flag(this.segment(), index, value); return this; } + /// Sets `vps_poc_proportional_to_timing_flag` with the given value. + /// @param value the value + /// @return `this` + public StdVideoH265VpsFlags vps_poc_proportional_to_timing_flag(@CType("uint32_t : 1") int value) { StdVideoH265VpsFlags.set_vps_poc_proportional_to_timing_flag(this.segment(), value); return this; } + +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecAv1std.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecAv1std.java new file mode 100644 index 00000000..74c68cea --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecAv1std.java @@ -0,0 +1,156 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; +import static overrungl.vulkan.video.VulkanVideoCodecsCommon.*; +public final class VulkanVideoCodecAv1std { + public static final int STD_VIDEO_AV1_NUM_REF_FRAMES = 8; + public static final int STD_VIDEO_AV1_REFS_PER_FRAME = 7; + public static final int STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME = 8; + public static final int STD_VIDEO_AV1_MAX_TILE_COLS = 64; + public static final int STD_VIDEO_AV1_MAX_TILE_ROWS = 64; + public static final int STD_VIDEO_AV1_MAX_SEGMENTS = 8; + public static final int STD_VIDEO_AV1_SEG_LVL_MAX = 8; + public static final int STD_VIDEO_AV1_PRIMARY_REF_NONE = 7; + public static final int STD_VIDEO_AV1_SELECT_INTEGER_MV = 2; + public static final int STD_VIDEO_AV1_SELECT_SCREEN_CONTENT_TOOLS = 2; + public static final int STD_VIDEO_AV1_SKIP_MODE_FRAMES = 2; + public static final int STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS = 4; + public static final int STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS = 2; + public static final int STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS = 8; + public static final int STD_VIDEO_AV1_MAX_NUM_PLANES = 3; + public static final int STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS = 6; + public static final int STD_VIDEO_AV1_MAX_NUM_Y_POINTS = 14; + public static final int STD_VIDEO_AV1_MAX_NUM_CB_POINTS = 10; + public static final int STD_VIDEO_AV1_MAX_NUM_CR_POINTS = 10; + public static final int STD_VIDEO_AV1_MAX_NUM_POS_LUMA = 24; + public static final int STD_VIDEO_AV1_MAX_NUM_POS_CHROMA = 25; + public static final int STD_VIDEO_AV1_PROFILE_MAIN = 0; + public static final int STD_VIDEO_AV1_PROFILE_HIGH = 1; + public static final int STD_VIDEO_AV1_PROFILE_PROFESSIONAL = 2; + public static final int STD_VIDEO_AV1_PROFILE_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_AV1_LEVEL_2_0 = 0; + public static final int STD_VIDEO_AV1_LEVEL_2_1 = 1; + public static final int STD_VIDEO_AV1_LEVEL_2_2 = 2; + public static final int STD_VIDEO_AV1_LEVEL_2_3 = 3; + public static final int STD_VIDEO_AV1_LEVEL_3_0 = 4; + public static final int STD_VIDEO_AV1_LEVEL_3_1 = 5; + public static final int STD_VIDEO_AV1_LEVEL_3_2 = 6; + public static final int STD_VIDEO_AV1_LEVEL_3_3 = 7; + public static final int STD_VIDEO_AV1_LEVEL_4_0 = 8; + public static final int STD_VIDEO_AV1_LEVEL_4_1 = 9; + public static final int STD_VIDEO_AV1_LEVEL_4_2 = 10; + public static final int STD_VIDEO_AV1_LEVEL_4_3 = 11; + public static final int STD_VIDEO_AV1_LEVEL_5_0 = 12; + public static final int STD_VIDEO_AV1_LEVEL_5_1 = 13; + public static final int STD_VIDEO_AV1_LEVEL_5_2 = 14; + public static final int STD_VIDEO_AV1_LEVEL_5_3 = 15; + public static final int STD_VIDEO_AV1_LEVEL_6_0 = 16; + public static final int STD_VIDEO_AV1_LEVEL_6_1 = 17; + public static final int STD_VIDEO_AV1_LEVEL_6_2 = 18; + public static final int STD_VIDEO_AV1_LEVEL_6_3 = 19; + public static final int STD_VIDEO_AV1_LEVEL_7_0 = 20; + public static final int STD_VIDEO_AV1_LEVEL_7_1 = 21; + public static final int STD_VIDEO_AV1_LEVEL_7_2 = 22; + public static final int STD_VIDEO_AV1_LEVEL_7_3 = 23; + public static final int STD_VIDEO_AV1_LEVEL_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_AV1_FRAME_TYPE_KEY = 0; + public static final int STD_VIDEO_AV1_FRAME_TYPE_INTER = 1; + public static final int STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY = 2; + public static final int STD_VIDEO_AV1_FRAME_TYPE_SWITCH = 3; + public static final int STD_VIDEO_AV1_FRAME_TYPE_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_AV1_REFERENCE_NAME_INTRA_FRAME = 0; + public static final int STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME = 1; + public static final int STD_VIDEO_AV1_REFERENCE_NAME_LAST2_FRAME = 2; + public static final int STD_VIDEO_AV1_REFERENCE_NAME_LAST3_FRAME = 3; + public static final int STD_VIDEO_AV1_REFERENCE_NAME_GOLDEN_FRAME = 4; + public static final int STD_VIDEO_AV1_REFERENCE_NAME_BWDREF_FRAME = 5; + public static final int STD_VIDEO_AV1_REFERENCE_NAME_ALTREF2_FRAME = 6; + public static final int STD_VIDEO_AV1_REFERENCE_NAME_ALTREF_FRAME = 7; + public static final int STD_VIDEO_AV1_REFERENCE_NAME_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP = 0; + public static final int STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH = 1; + public static final int STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP = 2; + public static final int STD_VIDEO_AV1_INTERPOLATION_FILTER_BILINEAR = 3; + public static final int STD_VIDEO_AV1_INTERPOLATION_FILTER_SWITCHABLE = 4; + public static final int STD_VIDEO_AV1_INTERPOLATION_FILTER_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_AV1_TX_MODE_ONLY_4X4 = 0; + public static final int STD_VIDEO_AV1_TX_MODE_LARGEST = 1; + public static final int STD_VIDEO_AV1_TX_MODE_SELECT = 2; + public static final int STD_VIDEO_AV1_TX_MODE_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_NONE = 0; + public static final int STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_WIENER = 1; + public static final int STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SGRPROJ = 2; + public static final int STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SWITCHABLE = 3; + public static final int STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_BT_709 = 1; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED = 2; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED = STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_M = 4; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_B_G = 5; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_BT_601 = 6; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_240 = 7; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_GENERIC_FILM = 8; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_BT_2020 = 9; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_XYZ = 10; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_431 = 11; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_432 = 12; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_EBU_3213 = 22; + public static final int STD_VIDEO_AV1_COLOR_PRIMARIES_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_0 = 0; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_709 = 1; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_UNSPECIFIED = 2; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_3 = 3; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_M = 4; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_B_G = 5; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_601 = 6; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_240 = 7; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LINEAR = 8; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100 = 9; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100_SQRT10 = 10; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_IEC_61966 = 11; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_1361 = 12; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SRGB = 13; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_10_BIT = 14; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_12_BIT = 15; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_2084 = 16; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_428 = 17; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_HLG = 18; + public static final int STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_IDENTITY = 0; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_709 = 1; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_UNSPECIFIED = 2; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_RESERVED_3 = 3; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_FCC = 4; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_470_B_G = 5; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_601 = 6; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_240 = 7; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_YCGCO = 8; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_NCL = 9; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_CL = 10; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_2085 = 11; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_NCL = 12; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_CL = 13; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_ICTCP = 14; + public static final int STD_VIDEO_AV1_MATRIX_COEFFICIENTS_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_UNKNOWN = 0; + public static final int STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_VERTICAL = 1; + public static final int STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_COLOCATED = 2; + public static final int STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_RESERVED = 3; + public static final int STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_INVALID = 0x7FFFFFFF; + private VulkanVideoCodecAv1std() { } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecAv1stdDecode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecAv1stdDecode.java new file mode 100644 index 00000000..d318aec9 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecAv1stdDecode.java @@ -0,0 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; +import static overrungl.vulkan.video.VulkanVideoCodecsCommon.*; +public final class VulkanVideoCodecAv1stdDecode { + public static final int VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0); + public static final int VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION = VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0; + public static final String VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_av1_decode"; + private VulkanVideoCodecAv1stdDecode() { } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecAv1stdEncode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecAv1stdEncode.java new file mode 100644 index 00000000..8dc7f848 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecAv1stdEncode.java @@ -0,0 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; +import static overrungl.vulkan.video.VulkanVideoCodecsCommon.*; +public final class VulkanVideoCodecAv1stdEncode { + public static final int VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0); + public static final int VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_SPEC_VERSION = VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0; + public static final String VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_av1_encode"; + private VulkanVideoCodecAv1stdEncode() { } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH264std.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH264std.java new file mode 100644 index 00000000..00233d75 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH264std.java @@ -0,0 +1,125 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; +import static overrungl.vulkan.video.VulkanVideoCodecsCommon.*; +public final class VulkanVideoCodecH264std { + public static final int STD_VIDEO_H264_CPB_CNT_LIST_SIZE = 32; + public static final int STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS = 6; + public static final int STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS = 16; + public static final int STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS = 6; + public static final int STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS = 64; + public static final int STD_VIDEO_H264_MAX_NUM_LIST_REF = 32; + public static final int STD_VIDEO_H264_MAX_CHROMA_PLANES = 2; + public static final int STD_VIDEO_H264_NO_REFERENCE_PICTURE = 0xFF; + public static final int STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME = 0; + public static final int STD_VIDEO_H264_CHROMA_FORMAT_IDC_420 = 1; + public static final int STD_VIDEO_H264_CHROMA_FORMAT_IDC_422 = 2; + public static final int STD_VIDEO_H264_CHROMA_FORMAT_IDC_444 = 3; + public static final int STD_VIDEO_H264_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_PROFILE_IDC_BASELINE = 66; + public static final int STD_VIDEO_H264_PROFILE_IDC_MAIN = 77; + public static final int STD_VIDEO_H264_PROFILE_IDC_HIGH = 100; + public static final int STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE = 244; + public static final int STD_VIDEO_H264_PROFILE_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_LEVEL_IDC_1_0 = 0; + public static final int STD_VIDEO_H264_LEVEL_IDC_1_1 = 1; + public static final int STD_VIDEO_H264_LEVEL_IDC_1_2 = 2; + public static final int STD_VIDEO_H264_LEVEL_IDC_1_3 = 3; + public static final int STD_VIDEO_H264_LEVEL_IDC_2_0 = 4; + public static final int STD_VIDEO_H264_LEVEL_IDC_2_1 = 5; + public static final int STD_VIDEO_H264_LEVEL_IDC_2_2 = 6; + public static final int STD_VIDEO_H264_LEVEL_IDC_3_0 = 7; + public static final int STD_VIDEO_H264_LEVEL_IDC_3_1 = 8; + public static final int STD_VIDEO_H264_LEVEL_IDC_3_2 = 9; + public static final int STD_VIDEO_H264_LEVEL_IDC_4_0 = 10; + public static final int STD_VIDEO_H264_LEVEL_IDC_4_1 = 11; + public static final int STD_VIDEO_H264_LEVEL_IDC_4_2 = 12; + public static final int STD_VIDEO_H264_LEVEL_IDC_5_0 = 13; + public static final int STD_VIDEO_H264_LEVEL_IDC_5_1 = 14; + public static final int STD_VIDEO_H264_LEVEL_IDC_5_2 = 15; + public static final int STD_VIDEO_H264_LEVEL_IDC_6_0 = 16; + public static final int STD_VIDEO_H264_LEVEL_IDC_6_1 = 17; + public static final int STD_VIDEO_H264_LEVEL_IDC_6_2 = 18; + public static final int STD_VIDEO_H264_LEVEL_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_POC_TYPE_0 = 0; + public static final int STD_VIDEO_H264_POC_TYPE_1 = 1; + public static final int STD_VIDEO_H264_POC_TYPE_2 = 2; + public static final int STD_VIDEO_H264_POC_TYPE_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_UNSPECIFIED = 0; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_SQUARE = 1; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_12_11 = 2; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_10_11 = 3; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_16_11 = 4; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_40_33 = 5; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_24_11 = 6; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_20_11 = 7; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_32_11 = 8; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_80_33 = 9; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_18_11 = 10; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_15_11 = 11; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_64_33 = 12; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_160_99 = 13; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_4_3 = 14; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_3_2 = 15; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_2_1 = 16; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_EXTENDED_SAR = 255; + public static final int STD_VIDEO_H264_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_DEFAULT = 0; + public static final int STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT = 1; + public static final int STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT = 2; + public static final int STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_SUBTRACT = 0; + public static final int STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_ADD = 1; + public static final int STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_LONG_TERM = 2; + public static final int STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_END = 3; + public static final int STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_END = 0; + public static final int STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_SHORT_TERM = 1; + public static final int STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_LONG_TERM = 2; + public static final int STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_LONG_TERM = 3; + public static final int STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_SET_MAX_LONG_TERM_INDEX = 4; + public static final int STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_ALL = 5; + public static final int STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_CURRENT_AS_LONG_TERM = 6; + public static final int STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_CABAC_INIT_IDC_0 = 0; + public static final int STD_VIDEO_H264_CABAC_INIT_IDC_1 = 1; + public static final int STD_VIDEO_H264_CABAC_INIT_IDC_2 = 2; + public static final int STD_VIDEO_H264_CABAC_INIT_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED = 0; + public static final int STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED = 1; + public static final int STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL = 2; + public static final int STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_SLICE_TYPE_P = 0; + public static final int STD_VIDEO_H264_SLICE_TYPE_B = 1; + public static final int STD_VIDEO_H264_SLICE_TYPE_I = 2; + public static final int STD_VIDEO_H264_SLICE_TYPE_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_PICTURE_TYPE_P = 0; + public static final int STD_VIDEO_H264_PICTURE_TYPE_B = 1; + public static final int STD_VIDEO_H264_PICTURE_TYPE_I = 2; + public static final int STD_VIDEO_H264_PICTURE_TYPE_IDR = 5; + public static final int STD_VIDEO_H264_PICTURE_TYPE_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H264_NON_VCL_NALU_TYPE_SPS = 0; + public static final int STD_VIDEO_H264_NON_VCL_NALU_TYPE_PPS = 1; + public static final int STD_VIDEO_H264_NON_VCL_NALU_TYPE_AUD = 2; + public static final int STD_VIDEO_H264_NON_VCL_NALU_TYPE_PREFIX = 3; + public static final int STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_SEQUENCE = 4; + public static final int STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_STREAM = 5; + public static final int STD_VIDEO_H264_NON_VCL_NALU_TYPE_PRECODED = 6; + public static final int STD_VIDEO_H264_NON_VCL_NALU_TYPE_INVALID = 0x7FFFFFFF; + private VulkanVideoCodecH264std() { } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH264stdDecode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH264stdDecode.java new file mode 100644 index 00000000..517ba5fe --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH264stdDecode.java @@ -0,0 +1,29 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; +import static overrungl.vulkan.video.VulkanVideoCodecsCommon.*; +public final class VulkanVideoCodecH264stdDecode { + public static final int VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0); + public static final int VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION = VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0; + public static final String VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h264_decode"; + public static final int STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE = 2; + public static final int STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP = 0; + public static final int STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_BOTTOM = 1; + public static final int STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_INVALID = 0x7FFFFFFF; + private VulkanVideoCodecH264stdDecode() { } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH264stdEncode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH264stdEncode.java new file mode 100644 index 00000000..24da30d8 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH264stdEncode.java @@ -0,0 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; +import static overrungl.vulkan.video.VulkanVideoCodecsCommon.*; +public final class VulkanVideoCodecH264stdEncode { + public static final int VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0); + public static final int VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION = VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0; + public static final String VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h264_encode"; + private VulkanVideoCodecH264stdEncode() { } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH265std.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH265std.java new file mode 100644 index 00000000..fd63206d --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH265std.java @@ -0,0 +1,98 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; +import static overrungl.vulkan.video.VulkanVideoCodecsCommon.*; +public final class VulkanVideoCodecH265std { + public static final int STD_VIDEO_H265_CPB_CNT_LIST_SIZE = 32; + public static final int STD_VIDEO_H265_SUBLAYERS_LIST_SIZE = 7; + public static final int STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS = 6; + public static final int STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS = 16; + public static final int STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS = 6; + public static final int STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS = 64; + public static final int STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS = 6; + public static final int STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS = 64; + public static final int STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS = 2; + public static final int STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS = 64; + public static final int STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE = 6; + public static final int STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE = 19; + public static final int STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE = 21; + public static final int STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE = 3; + public static final int STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE = 128; + public static final int STD_VIDEO_H265_MAX_NUM_LIST_REF = 15; + public static final int STD_VIDEO_H265_MAX_CHROMA_PLANES = 2; + public static final int STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS = 64; + public static final int STD_VIDEO_H265_MAX_DPB_SIZE = 16; + public static final int STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS = 32; + public static final int STD_VIDEO_H265_MAX_LONG_TERM_PICS = 16; + public static final int STD_VIDEO_H265_MAX_DELTA_POC = 48; + public static final int STD_VIDEO_H265_NO_REFERENCE_PICTURE = 0xFF; + public static final int STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME = 0; + public static final int STD_VIDEO_H265_CHROMA_FORMAT_IDC_420 = 1; + public static final int STD_VIDEO_H265_CHROMA_FORMAT_IDC_422 = 2; + public static final int STD_VIDEO_H265_CHROMA_FORMAT_IDC_444 = 3; + public static final int STD_VIDEO_H265_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H265_PROFILE_IDC_MAIN = 1; + public static final int STD_VIDEO_H265_PROFILE_IDC_MAIN_10 = 2; + public static final int STD_VIDEO_H265_PROFILE_IDC_MAIN_STILL_PICTURE = 3; + public static final int STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS = 4; + public static final int STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS = 9; + public static final int STD_VIDEO_H265_PROFILE_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H265_LEVEL_IDC_1_0 = 0; + public static final int STD_VIDEO_H265_LEVEL_IDC_2_0 = 1; + public static final int STD_VIDEO_H265_LEVEL_IDC_2_1 = 2; + public static final int STD_VIDEO_H265_LEVEL_IDC_3_0 = 3; + public static final int STD_VIDEO_H265_LEVEL_IDC_3_1 = 4; + public static final int STD_VIDEO_H265_LEVEL_IDC_4_0 = 5; + public static final int STD_VIDEO_H265_LEVEL_IDC_4_1 = 6; + public static final int STD_VIDEO_H265_LEVEL_IDC_5_0 = 7; + public static final int STD_VIDEO_H265_LEVEL_IDC_5_1 = 8; + public static final int STD_VIDEO_H265_LEVEL_IDC_5_2 = 9; + public static final int STD_VIDEO_H265_LEVEL_IDC_6_0 = 10; + public static final int STD_VIDEO_H265_LEVEL_IDC_6_1 = 11; + public static final int STD_VIDEO_H265_LEVEL_IDC_6_2 = 12; + public static final int STD_VIDEO_H265_LEVEL_IDC_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H265_SLICE_TYPE_B = 0; + public static final int STD_VIDEO_H265_SLICE_TYPE_P = 1; + public static final int STD_VIDEO_H265_SLICE_TYPE_I = 2; + public static final int STD_VIDEO_H265_SLICE_TYPE_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H265_PICTURE_TYPE_P = 0; + public static final int STD_VIDEO_H265_PICTURE_TYPE_B = 1; + public static final int STD_VIDEO_H265_PICTURE_TYPE_I = 2; + public static final int STD_VIDEO_H265_PICTURE_TYPE_IDR = 3; + public static final int STD_VIDEO_H265_PICTURE_TYPE_INVALID = 0x7FFFFFFF; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_UNSPECIFIED = 0; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_SQUARE = 1; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_12_11 = 2; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_10_11 = 3; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_16_11 = 4; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_40_33 = 5; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_24_11 = 6; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_20_11 = 7; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_32_11 = 8; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_80_33 = 9; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_18_11 = 10; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_15_11 = 11; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_64_33 = 12; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_160_99 = 13; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_4_3 = 14; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_3_2 = 15; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_2_1 = 16; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_EXTENDED_SAR = 255; + public static final int STD_VIDEO_H265_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF; + private VulkanVideoCodecH265std() { } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH265stdDecode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH265stdDecode.java new file mode 100644 index 00000000..4a465b62 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH265stdDecode.java @@ -0,0 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; +import static overrungl.vulkan.video.VulkanVideoCodecsCommon.*; +public final class VulkanVideoCodecH265stdDecode { + public static final int VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0); + public static final int VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION = VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0; + public static final String VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h265_decode"; + public static final int STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE = 8; + private VulkanVideoCodecH265stdDecode() { } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH265stdEncode.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH265stdEncode.java new file mode 100644 index 00000000..e677c1d3 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecH265stdEncode.java @@ -0,0 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; +import static overrungl.vulkan.video.VulkanVideoCodecsCommon.*; +public final class VulkanVideoCodecH265stdEncode { + public static final int VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 = VK_MAKE_VIDEO_STD_VERSION(1, 0, 0); + public static final int VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION = VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0; + public static final String VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h265_encode"; + private VulkanVideoCodecH265stdEncode() { } +} diff --git a/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecsCommon.java b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecsCommon.java new file mode 100644 index 00000000..c5c45aa6 --- /dev/null +++ b/modules/overrungl.vulkan/src/main/java/overrungl/vulkan/video/VulkanVideoCodecsCommon.java @@ -0,0 +1,24 @@ +/* + * MIT License + * + * Copyright (c) 2022-2025 Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT! +package overrungl.vulkan.video; +public final class VulkanVideoCodecsCommon { + public static int VK_MAKE_VIDEO_STD_VERSION(int major, int minor, int patch) { + return (major << 22) | (minor << 12) | patch; + } + private VulkanVideoCodecsCommon() { } +}